text: !function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=107)}([function(e,t){e.exports=React},function(e,t){e.exports=PropTypes},function(e,t,n){"use strict";n.r(t),n.d(t,"__extends",(function(){return i})),n.d(t,"__assign",(function(){return o})),n.d(t,"__rest",(function(){return a})),n.d(t,"__decorate",(function(){return s})),n.d(t,"__param",(function(){return u})),n.d(t,"__metadata",(function(){return l})),n.d(t,"__awaiter",(function(){return c})),n.d(t,"__generator",(function(){return d})),n.d(t,"__createBinding",(function(){return f})),n.d(t,"__exportStar",(function(){return h})),n.d(t,"__values",(function(){return p})),n.d(t,"__read",(function(){return _})),n.d(t,"__spread",(function(){return E})),n.d(t,"__spreadArrays",(function(){return m})),n.d(t,"__await",(function(){return g})),n.d(t,"__asyncGenerator",(function(){return v})),n.d(t,"__asyncDelegator",(function(){return y})),n.d(t,"__asyncValues",(function(){return T})),n.d(t,"__makeTemplateObject",(function(){return C})),n.d(t,"__importStar",(function(){return S})),n.d(t,"__importDefault",(function(){return b})),n.d(t,"__classPrivateFieldGet",(function(){return R})),n.d(t,"__classPrivateFieldSet",(function(){return I}));
  /*! *****************************************************************************
  Copyright (c) Microsoft Corporation.
  
  Permission to use, copy, modify, and/or distribute this software for any
  purpose with or without fee is hereby granted.
  
  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
  REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
  AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
  INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  PERFORMANCE OF THIS SOFTWARE.
  ***************************************************************************** */
  var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function i(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var o=function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function a(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}function s(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a}function u(e,t){return function(n,r){t(n,r,e)}}function l(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function c(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))}function d(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}function f(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}function h(e,t){for(var n in e)"default"===n||t.hasOwnProperty(n)||(t[n]=e[n])}function p(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function _(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function E(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(_(arguments[t]));return e}function m(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r}function g(e){return this instanceof g?(this.v=e,this):new g(e)}function v(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,i=n.apply(e,t||[]),o=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(e){i[e]&&(r[e]=function(t){return new Promise((function(n,r){o.push([e,t,n,r])>1||s(e,t)}))})}function s(e,t){try{(n=i[e](t)).value instanceof g?Promise.resolve(n.value.v).then(u,l):c(o[0][2],n)}catch(e){c(o[0][3],e)}var n}function u(e){s("next",e)}function l(e){s("throw",e)}function c(e,t){e(t),o.shift(),o.length&&s(o[0][0],o[0][1])}}function y(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,i){t[r]=e[r]?function(t){return(n=!n)?{value:g(e[r](t)),done:"return"===r}:i?i(t):t}:i}}function T(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=p(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,i){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,i,(t=e[n](t)).done,t.value)}))}}}function C(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function S(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function b(e){return e&&e.__esModule?e:{default:e}}function R(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function I(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if(!(e instanceof Object)||Array.isArray(e))throw new Error("keyMirror(...): Argument must be an object.");var t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=n);return t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2).__importStar(n(155));t.DEFAULT_LIMIT_AFTER=r.DEFAULT_LIMIT_AFTER,t.DEFAULT_LIMIT_BEFORE=r.DEFAULT_LIMIT_BEFORE,t.HEADER_X_VERSION_ID=r.HEADER_X_VERSION_ID;var i=new r.default;t.Client4=i},function(e,t,n){(function(t){var n=function(e){return e&&e.Math==Math&&e};e.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof t&&t)||Function("return this")()}).call(this,n(52))},function(e,t,n){var r=n(5),i=n(75),o=n(12),a=n(76),s=n(81),u=n(116),l=i("wks"),c=r.Symbol,d=u?c:c&&c.withoutSetter||a;e.exports=function(e){return o(l,e)||(s&&o(c,e)?l[e]=c[e]:l[e]=d("Symbol."+e)),l[e]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=r.__importDefault(n(140));t.General=i.default;var o=r.__importDefault(n(141));t.RequestStatus=o.default;var a=r.__importDefault(n(142));t.WebsocketEvents=a.default;var s=r.__importDefault(n(143));t.Preferences=s.default;var u=r.__importDefault(n(144));t.Posts=u.default;var l=r.__importDefault(n(145));t.Files=l.default;var c=r.__importDefault(n(146));t.Alerts=c.default;var d=r.__importDefault(n(147));t.Teams=d.default;var f=r.__importDefault(n(148));t.Stats=f.default;var h=r.__importDefault(n(149));t.Permissions=h.default;var p=r.__importDefault(n(150));t.Emoji=p.default;var _=r.__importDefault(n(151));t.Plugins=_.default;var E=r.__importDefault(n(152));t.Groups=E.default;var m=r.__importDefault(n(153));t.Users=m.default;var g=r.__importDefault(n(154));t.Roles=g.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7);t.makeStyleFromTheme=function(e){var t,n;return function(r){return n&&r===t||(n=e(r),t=r),n}};var i=/^rgba?\((\d+),(\d+),(\d+)(?:,([\d.]+))?\)$/;function o(e){var t=e,n=i.exec(t);if(n)return{red:parseInt(n[1],10),green:parseInt(n[2],10),blue:parseInt(n[3],10),alpha:n[4]?parseFloat(n[4]):1};if("#"===t[0]&&(t=t.slice(1)),3===t.length){var r=t;t="",t+=r[0]+r[0],t+=r[1]+r[1],t+=r[2]+r[2]}return{red:parseInt(t.substring(0,2),16),green:parseInt(t.substring(2,4),16),blue:parseInt(t.substring(4,6),16),alpha:1}}function a(e,t,n){return(1-n)*e+n*t}t.getComponents=o,t.changeOpacity=function(e,t){var n=o(e);return"rgba("+n.red+","+n.green+","+n.blue+","+n.alpha*t+")"},t.blendColors=function(e,t,n){var r=o(e),i=o(t);return"rgba("+Math.floor(a(r.red,i.red,n))+","+Math.floor(a(r.green,i.green,n))+","+Math.floor(a(r.blue,i.blue,n))+","+a(r.alpha,i.alpha,n)+")"},t.setThemeDefaults=function(e){var t=r.Preferences.THEMES.default;for(var n in t)"type"!==n&&null==e[n]&&(e[n]=t[n]);return e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=n(14),o=n(15),a=n(7);function s(e){return e.entities.general.config}function u(e){return e.entities.general.license}t.getConfig=s,t.getLicense=u,t.getSupportedTimezones=function(e){return e.entities.general.timezones},t.getCurrentUrl=function(e){return e.entities.general.credentials.url},t.isCompatibleWithJoinViewTeamPermissions=function(e){var t=e.entities.general.serverVersion;return o.isMinimumServerVersion(t,5,10,0)||-1!==t.indexOf("dev")&&o.isMinimumServerVersion(t,5,8,0)||null!==t.match(/^5.8.\d.\d\d\d\d.*$/)&&o.isMinimumServerVersion(t,5,8,0)},t.hasNewPermissions=function(e){var t=e.entities.general.serverVersion;return o.isMinimumServerVersion(t,4,9,0)||-1!==t.indexOf("dev")&&o.isMinimumServerVersion(t,4,8,0)||null!==t.match(/^4.8.\d.\d\d\d\d.*$/)&&o.isMinimumServerVersion(t,4,8,0)},t.canUploadFilesOnMobile=i.createSelector(s,u,(function(e,t){return"false"!==e.EnableFileAttachments&&("false"===t.IsLicensed||"false"===t.Compliance||"false"!==e.EnableMobileFileUpload)})),t.canDownloadFilesOnMobile=i.createSelector(s,u,(function(e,t){return"false"===t.IsLicensed||"false"===t.Compliance||"false"!==e.EnableMobileFileDownload})),t.getAutolinkedUrlSchemes=i.createSelector(s,(function(e){return e.CustomUrlSchemes?r.__spread(a.General.DEFAULT_AUTOLINKED_URL_SCHEMES,e.CustomUrlSchemes.split(",")):a.General.DEFAULT_AUTOLINKED_URL_SCHEMES})),t.getServerVersion=function(e){return e.entities.general.serverVersion}},function(e,t){e.exports=ReactRedux},function(e,t){e.exports=Redux},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){var r=n(17);e.exports=function(e){if(!r(e))throw TypeError(String(e)+" is not an object");return e}},function(e,t,n){"use strict";function r(e,t){return e===t}function i(e,t,n){if(null===t||null===n||t.length!==n.length)return!1;for(var r=t.length,i=0;i<r;i++)if(!e(t[i],n[i]))return!1;return!0}function o(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r,n=null,o=null;return function(){return i(t,n,arguments)||(o=e.apply(null,arguments)),n=arguments,o}}function a(e){var t=Array.isArray(e[0])?e[0]:e;if(!t.every((function(e){return"function"==typeof e}))){var n=t.map((function(e){return typeof e})).join(", ");throw new Error("Selector creators expect all input-selectors to be functions, instead received the following types: ["+n+"]")}return t}function s(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return function(){for(var t=arguments.length,r=Array(t),i=0;i<t;i++)r[i]=arguments[i];var o=0,s=r.pop(),u=a(r),l=e.apply(void 0,[function(){return o++,s.apply(null,arguments)}].concat(n)),c=e((function(){for(var e=[],t=u.length,n=0;n<t;n++)e.push(u[n].apply(null,arguments));return l.apply(null,e)}));return c.resultFunc=s,c.dependencies=u,c.recomputations=function(){return o},c.resetRecomputations=function(){return o=0},c}}n.r(t),n.d(t,"defaultMemoize",(function(){return o})),n.d(t,"createSelectorCreator",(function(){return s})),n.d(t,"createSelector",(function(){return u})),n.d(t,"createStructuredSelector",(function(){return l}));var u=s(o);function l(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u;if("object"!=typeof e)throw new Error("createStructuredSelector expects first argument to be an object where each property is a selector, instead received a "+typeof e);var n=Object.keys(e);return t(n.map((function(t){return e[t]})),(function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.reduce((function(e,t,r){return e[n[r]]=t,e}),{})}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=r.__importStar(n(14)),o=r.__importDefault(n(139));function a(e){var t=null,n=null;return function(){if(!o.default(t,arguments)){var r=Reflect.apply(e,null,arguments);o.default(n,r)||(n=r)}return t=arguments,n}}t.memoizeResult=a,t.createIdsSelector=i.createSelectorCreator(a),t.createShallowSelector=i.createSelectorCreator(i.defaultMemoize,o.default),t.isMinimumServerVersion=function(e,t,n,r){if(void 0===t&&(t=0),void 0===n&&(n=0),void 0===r&&(r=0),!e||"string"!=typeof e)return!1;var i=e.split("."),o=parseInt(i[0],10),a=parseInt(i[1]||"0",10),s=parseInt(i[2]||"0",10);return o>t||!(o<t)&&(a>n||!(a<n)&&(s>r||!(s<r)))},t.generateId=function(){var e="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx";return e=e.replace(/[xy]/g,(function(e){var t=Math.floor(16*Math.random());return("x"===e?t:3&t|8).toString(16)}))},t.isEmail=function(e){return/^[^ ,@]+@[^ ,@]+$/.test(e)},t.buildQueryString=function(e){var t=Object.keys(e);if(0===t.length)return"";for(var n="?",r=0;r<t.length;r++){var i=t[r];n+=i+"="+encodeURIComponent(e[i]),r<t.length-1&&(n+="&")}return n}},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=r.__importDefault(n(160));t.ChannelTypes=i.default;var o=r.__importDefault(n(161));t.ErrorTypes=o.default;var a=r.__importDefault(n(162));t.GeneralTypes=a.default;var s=r.__importDefault(n(163));t.UserTypes=s.default;var u=r.__importDefault(n(164));t.TeamTypes=u.default;var l=r.__importDefault(n(165));t.PostTypes=l.default;var c=r.__importDefault(n(166));t.FileTypes=c.default;var d=r.__importDefault(n(167));t.PreferenceTypes=d.default;var f=r.__importDefault(n(168));t.IntegrationTypes=f.default;var h=r.__importDefault(n(169));t.EmojiTypes=h.default;var p=r.__importDefault(n(170));t.GifTypes=p.default;var _=r.__importDefault(n(171));t.AdminTypes=_.default;var E=r.__importDefault(n(172));t.AlertTypes=E.default;var m=r.__importDefault(n(173));t.JobTypes=m.default;var g=r.__importDefault(n(174));t.SearchTypes=g.default;var v=r.__importDefault(n(175));t.RoleTypes=v.default;var y=r.__importDefault(n(176));t.SchemeTypes=y.default;var T=r.__importDefault(n(177));t.GroupTypes=T.default;var C=r.__importDefault(n(178));t.BotTypes=C.default;var S=r.__importDefault(n(179));t.PluginTypes=S.default;var b=r.__importDefault(n(180));t.ChannelCategoryTypes=b.default},function(e,t,n){var r=n(16);e.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},function(e,t,n){var r=n(19),i=n(21),o=n(34);e.exports=r?function(e,t,n){return i.f(e,t,o(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){var r=n(19),i=n(73),o=n(13),a=n(53),s=Object.defineProperty;t.f=r?s:function(e,t,n){if(o(e),t=a(t,!0),o(n),i)try{return s(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=n(4),o=n(18),a=n(38),s=n(32);function u(e,t,n){var r=n().entities.users.currentUserId;"status_code"in e&&401===e.status_code&&e.url&&-1===e.url.indexOf("/login")&&r&&(i.Client4.setToken(""),t({type:o.UserTypes.LOGOUT_SUCCESS,data:{}}))}function l(e,t,n,r){-1===e.indexOf("SUCCESS")?n(d(e,t)):n(c(e))}function c(e){return{type:e,data:null}}function d(e,t){return{type:e,data:t}}function f(e,t){return{type:e,error:t}}t.forceLogoutIfNecessary=u,t.requestData=c,t.requestSuccess=d,t.requestFailure=f,t.bindClientFunc=function(e){var t=this,n=e.clientFunc,i=e.onRequest,o=e.onSuccess,d=e.onFailure,h=e.params,p=void 0===h?[]:h;return function(e,h){return r.__awaiter(t,void 0,void 0,(function(){var t,_,E;return r.__generator(this,(function(m){switch(m.label){case 0:i&&e(c(i)),t=null,m.label=1;case 1:return m.trys.push([1,3,,4]),[4,n.apply(void 0,r.__spread(p))];case 2:return t=m.sent(),[3,4];case 3:return u(_=m.sent(),e,h),E=[s.logError(_)],d&&E.push(f(d,_)),e(a.batchActions(E)),[2,{error:_}];case 4:return Array.isArray(o)?o.forEach((function(n){l(n,t,e)})):o&&l(o,t,e),[2,{data:t}]}}))}))}},t.debounce=function(e,t,n,r){var i;return function(){for(var o=this,a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];var u=function(){i=null,n||(Reflect.apply(e,o,a),r&&r())},l=n&&!i;i&&clearTimeout(i),i=setTimeout(u,t),l&&(Reflect.apply(e,this,a),r&&r())}};var h=function(e){function t(t,n,r){void 0===r&&(r={});var i=e.call(this,n)||this;return i.intl={id:t,defaultMessage:n,values:r},i}return r.__extends(t,e),t}(Error);t.FormattedError=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=n(38),o=n(4),a=n(7),s=n(18),u=n(181),l=n(188),c=n(189),d=n(50),f=n(65),h=n(37),p=n(15),_=n(9),E=n(41),m=n(32),g=n(22),v=n(103);function y(e){var t=this;return function(n,a){return r.__awaiter(t,void 0,void 0,(function(){var t,a;return r.__generator(this,(function(r){switch(r.label){case 0:n({type:s.UserTypes.CHECK_MFA_REQUEST,data:null}),r.label=1;case 1:return r.trys.push([1,3,,4]),[4,o.Client4.checkUserMfa(e)];case 2:return t=r.sent(),n({type:s.UserTypes.CHECK_MFA_SUCCESS,data:null}),[2,{data:t.mfa_required}];case 3:return a=r.sent(),n(i.batchActions([{type:s.UserTypes.CHECK_MFA_FAILURE,error:a},m.logError(a)])),[2,{error:a}];case 4:return[2]}}))}))}}function T(e){return g.bindClientFunc({clientFunc:o.Client4.generateMfaSecret,params:[e]})}function C(e,t,n,a){var u=this;return void 0===n&&(n=""),void 0===a&&(a=!1),function(l,c){return r.__awaiter(u,void 0,void 0,(function(){var u,d,f;return r.__generator(this,(function(r){switch(r.label){case 0:l({type:s.UserTypes.LOGIN_REQUEST,data:null}),u=c().entities.general.deviceToken,r.label=1;case 1:return r.trys.push([1,3,,4]),[4,o.Client4.login(e,t,n,u,a)];case 2:return d=r.sent(),[3,4];case 3:return f=r.sent(),l(i.batchActions([{type:s.UserTypes.LOGIN_FAILURE,error:f},m.logError(f)])),[2,{error:f}];case 4:return[2,S(d)(l,c)]}}))}))}}function S(e){var t=this;return function(n,a){return r.__awaiter(t,void 0,void 0,(function(){var t,f,h,E,g,y,T,C,S,b,R,I,A,N,O,w,L,P,M,U,D,k,F,x,H,G,V,B,j;return r.__generator(this,(function(z){switch(z.label){case 0:n({type:s.UserTypes.RECEIVED_ME,data:e}),o.Client4.setUserId(e.id),o.Client4.setUserRoles(e.roles),z.label=1;case 1:return z.trys.push([1,4,,5]),f=o.Client4.getMyTeamMembers(),h=o.Client4.getMyTeamUnreads(),[4,f];case 2:return t=z.sent(),[4,h];case 3:if(E=z.sent()){g=function(e){var n=t.findIndex((function(t){return t.team_id===e.team_id})),r=t[n];r.mention_count=e.mention_count,r.msg_count=e.msg_count};try{for(y=r.__values(E),T=y.next();!T.done;T=y.next())C=T.value,g(C)}catch(e){k={error:e}}finally{try{T&&!T.done&&(F=y.return)&&F.call(y)}finally{if(k)throw k.error}}}return[3,5];case 4:return S=z.sent(),n(i.batchActions([{type:s.UserTypes.LOGIN_FAILURE,error:S},m.logError(S)])),[2,{error:S}];case 5:b=[n(v.getMyPreferences()),n(c.getMyTeams()),n(l.getClientConfig())],R=o.Client4.getServerVersion(),n(l.setServerVersion(R)),p.isMinimumServerVersion(R,4,7)||"true"!==_.getConfig(a()).EnableCustomEmoji||n(u.getAllCustomEmojis()),z.label=6;case 6:return z.trys.push([6,8,,9]),[4,Promise.all(b)];case 7:return z.sent(),[3,9];case 8:return I=z.sent(),n(i.batchActions([{type:s.UserTypes.LOGIN_FAILURE,error:I},m.logError(I)])),[2,{error:I}];case 9:n(i.batchActions([{type:s.TeamTypes.RECEIVED_MY_TEAM_MEMBERS,data:t},{type:s.UserTypes.LOGIN_SUCCESS}])),A=new Set;try{for(N=r.__values(e.roles.split(" ")),O=N.next();!O.done;O=N.next())D=O.value,A.add(D)}catch(e){x={error:e}}finally{try{O&&!O.done&&(H=N.return)&&H.call(N)}finally{if(x)throw x.error}}try{for(w=r.__values(t),L=w.next();!L.done;L=w.next()){P=L.value;try{for(B=void 0,M=r.__values(P.roles.split(" ")),U=M.next();!U.done;U=M.next())D=U.value,A.add(D)}catch(e){B={error:e}}finally{try{U&&!U.done&&(j=M.return)&&j.call(M)}finally{if(B)throw B.error}}}}catch(e){G={error:e}}finally{try{L&&!L.done&&(V=w.return)&&V.call(w)}finally{if(G)throw G.error}}return A.size>0&&n(d.loadRolesIfNeeded(A)),[2,{data:!0}]}}))}))}}function b(){var e=this;return function(t,n){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){switch(e.label){case 0:t({type:s.UserTypes.LOGOUT_REQUEST,data:null}),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,o.Client4.logout()];case 2:return e.sent(),[3,4];case 3:return e.sent(),[3,4];case 4:return t({type:s.UserTypes.LOGOUT_SUCCESS,data:null}),[2,{data:!0}]}}))}))}}function R(){return g.bindClientFunc({clientFunc:o.Client4.getTotalUsersStats,onSuccess:s.UserTypes.RECEIVED_USER_STATS})}function I(e,t,n){var i=this;return void 0===e&&(e=0),void 0===t&&(t=a.General.PROFILE_CHUNK_SIZE),void 0===n&&(n={}),function(a,u){return r.__awaiter(i,void 0,void 0,(function(){var i,l,c;return r.__generator(this,(function(r){switch(r.label){case 0:i=u().entities.users.currentUserId,r.label=1;case 1:return r.trys.push([1,3,,4]),[4,o.Client4.getProfiles(e,t,n)];case 2:return l=r.sent(),h.removeUserFromList(i,l),[3,4];case 3:return c=r.sent(),g.forceLogoutIfNecessary(c,a,u),a(m.logError(c)),[2,{error:c}];case 4:return a({type:s.UserTypes.RECEIVED_PROFILES_LIST,data:l}),[2,{data:l}]}}))}))}}function A(e,t){var n=this;return function(i,a){return r.__awaiter(n,void 0,void 0,(function(){var n,u,l;return r.__generator(this,(function(r){switch(r.label){case 0:n=a().entities.users.currentUserId,r.label=1;case 1:return r.trys.push([1,3,,4]),[4,o.Client4.getProfilesByIds(e,t)];case 2:return u=r.sent(),h.removeUserFromList(n,u),[3,4];case 3:return l=r.sent(),g.forceLogoutIfNecessary(l,i,a),i(m.logError(l)),[2,{error:l}];case 4:return i({type:s.UserTypes.RECEIVED_PROFILES_LIST,data:u}),[2,{data:u}]}}))}))}}function N(e){var t=this;return function(n,i){return r.__awaiter(t,void 0,void 0,(function(){var t,a,u;return r.__generator(this,(function(r){switch(r.label){case 0:t=i().entities.users.currentUserId,r.label=1;case 1:return r.trys.push([1,3,,4]),[4,o.Client4.getProfilesByUsernames(e)];case 2:return a=r.sent(),h.removeUserFromList(t,a),[3,4];case 3:return u=r.sent(),g.forceLogoutIfNecessary(u,n,i),n(m.logError(u)),[2,{error:u}];case 4:return n({type:s.UserTypes.RECEIVED_PROFILES_LIST,data:a}),[2,{data:a}]}}))}))}}function O(e,t,n,u,l){var c=this;return void 0===n&&(n=a.General.PROFILE_CHUNK_SIZE),void 0===u&&(u=""),void 0===l&&(l={}),function(a,d){return r.__awaiter(c,void 0,void 0,(function(){var c,f,p;return r.__generator(this,(function(_){switch(_.label){case 0:c=d().entities.users.currentUserId,_.label=1;case 1:return _.trys.push([1,3,,4]),[4,o.Client4.getProfilesInTeam(e,t,n,u,l)];case 2:return f=_.sent(),[3,4];case 3:return p=_.sent(),g.forceLogoutIfNecessary(p,a,d),a(m.logError(p)),[2,{error:p}];case 4:return a(i.batchActions([{type:s.UserTypes.RECEIVED_PROFILES_LIST_IN_TEAM,data:f,id:e},{type:s.UserTypes.RECEIVED_PROFILES_LIST,data:h.removeUserFromList(c,r.__spread(f))}])),[2,{data:f}]}}))}))}}function w(e,t,n,u){var l=this;return void 0===n&&(n=a.General.PROFILE_CHUNK_SIZE),void 0===u&&(u=""),function(a,c){return r.__awaiter(l,void 0,void 0,(function(){var l,d,f;return r.__generator(this,(function(p){switch(p.label){case 0:l=c().entities.users.currentUserId,p.label=1;case 1:return p.trys.push([1,3,,4]),[4,o.Client4.getProfilesInChannel(e,t,n,u)];case 2:return d=p.sent(),[3,4];case 3:return f=p.sent(),g.forceLogoutIfNecessary(f,a,c),a(m.logError(f)),[2,{error:f}];case 4:return a(i.batchActions([{type:s.UserTypes.RECEIVED_PROFILES_LIST_IN_CHANNEL,data:d,id:e},{type:s.UserTypes.RECEIVED_PROFILES_LIST,data:h.removeUserFromList(l,r.__spread(d))}])),[2,{data:d}]}}))}))}}function L(e,t,n,u,l){var c=this;return void 0===l&&(l=a.General.PROFILE_CHUNK_SIZE),function(a,d){return r.__awaiter(c,void 0,void 0,(function(){var c,f,p,_;return r.__generator(this,(function(E){switch(E.label){case 0:c=d().entities.users.currentUserId,E.label=1;case 1:return E.trys.push([1,3,,4]),[4,o.Client4.getProfilesNotInChannel(e,t,n,u,l)];case 2:return f=E.sent(),[3,4];case 3:return p=E.sent(),g.forceLogoutIfNecessary(p,a,d),a(m.logError(p)),[2,{error:p}];case 4:return _=n?s.UserTypes.RECEIVED_PROFILES_LIST_NOT_IN_CHANNEL_AND_REPLACE:s.UserTypes.RECEIVED_PROFILES_LIST_NOT_IN_CHANNEL,a(i.batchActions([{type:_,data:f,id:t},{type:s.UserTypes.RECEIVED_PROFILES_LIST,data:h.removeUserFromList(c,r.__spread(f))}])),[2,{data:f}]}}))}))}}function P(){var e=this;return function(t,n){return r.__awaiter(e,void 0,void 0,(function(){var e;return r.__generator(this,(function(r){switch(r.label){case 0:return[4,g.bindClientFunc({clientFunc:o.Client4.getMe,onSuccess:s.UserTypes.RECEIVED_ME})(t,n)];case 1:return"error"in(e=r.sent())||"data"in e&&t(d.loadRolesIfNeeded(e.data.roles.split(" "))),[2,e]}}))}))}}function M(e,t){var n=this;return function(i,a){return r.__awaiter(n,void 0,void 0,(function(){var n;return r.__generator(this,(function(r){switch(r.label){case 0:return[4,i(g.bindClientFunc({clientFunc:o.Client4.updateMyTermsOfServiceStatus,params:[e,t]}))];case 1:return"data"in(n=r.sent())?(t&&i({type:s.UserTypes.RECEIVED_TERMS_OF_SERVICE_STATUS,data:{terms_of_service_create_at:(new Date).getTime(),terms_of_service_id:t?e:null,user_id:E.getCurrentUserId(a())}}),[2,{data:n.data}]):[2,{error:n.error}]}}))}))}}function U(){return g.bindClientFunc({clientFunc:o.Client4.getTermsOfService})}function D(e){return g.bindClientFunc({clientFunc:o.Client4.createTermsOfService,params:[e]})}function k(e){return g.bindClientFunc({clientFunc:o.Client4.getUser,onSuccess:s.UserTypes.RECEIVED_PROFILE,params:[e]})}function F(e){return g.bindClientFunc({clientFunc:o.Client4.getUserByUsername,onSuccess:s.UserTypes.RECEIVED_PROFILE,params:[e]})}t.checkMfa=y,t.generateMfaSecret=T,t.createUser=function(e,t,n){var i=this;return function(a,u){return r.__awaiter(i,void 0,void 0,(function(){var i,l,c,d;return r.__generator(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,o.Client4.createUser(e,t,n)];case 1:return i=r.sent(),[3,3];case 2:return l=r.sent(),g.forceLogoutIfNecessary(l,a,u),a(m.logError(l)),[2,{error:l}];case 3:return(d={})[i.id]=i,c=d,a({type:s.UserTypes.RECEIVED_PROFILES,data:c}),[2,{data:i}]}}))}))}},t.login=C,t.loginById=function(e,t,n){var a=this;return void 0===n&&(n=""),function(u,l){return r.__awaiter(a,void 0,void 0,(function(){var a,c,d;return r.__generator(this,(function(r){switch(r.label){case 0:u({type:s.UserTypes.LOGIN_REQUEST,data:null}),a=l().entities.general.deviceToken,r.label=1;case 1:return r.trys.push([1,3,,4]),[4,o.Client4.loginById(e,t,n,a)];case 2:return c=r.sent(),[3,4];case 3:return d=r.sent(),u(i.batchActions([{type:s.UserTypes.LOGIN_FAILURE,error:d},m.logError(d)])),[2,{error:d}];case 4:return[2,S(c)(u,l)]}}))}))}},t.loadMe=function(){var e=this;return function(t,n){return r.__awaiter(e,void 0,void 0,(function(){var e,i,a,s,d,f,h;return r.__generator(this,(function(r){switch(r.label){case 0:return e=n(),i=_.getConfig(e),(a=e.entities.general.deviceToken)&&o.Client4.attachDevice(a),s=[t(P()),t(v.getMyPreferences()),t(c.getMyTeams()),t(c.getMyTeamMembers()),t(c.getMyTeamUnreads())],d=o.Client4.getServerVersion()||n().entities.general.serverVersion,t(l.setServerVersion(d)),p.isMinimumServerVersion(d,4,7)||"true"!==i.EnableCustomEmoji||t(u.getAllCustomEmojis()),[4,Promise.all(s)];case 1:return r.sent(),f=n().entities.users.currentUserId,h=n().entities.users.profiles[f],f&&o.Client4.setUserId(f),h&&o.Client4.setUserRoles(h.roles),[2,{data:!0}]}}))}))}},t.logout=b,t.getTotalUsersStats=R,t.getProfiles=I,t.getMissingProfilesByIds=function(e){var t=this;return function(n,i){return r.__awaiter(t,void 0,void 0,(function(){var t,o;return r.__generator(this,(function(r){return t=i().entities.users.profiles,o=[],e.forEach((function(e){t[e]||o.push(e)})),o.length>0?(V(o)(n,i),[2,A(o)(n,i)]):[2,{data:[]}]}))}))}},t.getMissingProfilesByUsernames=function(e){var t=this;return function(n,i){return r.__awaiter(t,void 0,void 0,(function(){var t,o,a;return r.__generator(this,(function(r){return t=i().entities.users.profiles,o=Object.values(t).reduce((function(e,t){return e[t.username]=t,e}),{}),a=[],e.forEach((function(e){o[e]||a.push(e)})),a.length>0?[2,N(a)(n,i)]:[2,{data:[]}]}))}))}},t.getProfilesByIds=A,t.getProfilesByUsernames=N,t.getProfilesInTeam=O,t.getProfilesNotInTeam=function(e,t,n,u){var l=this;return void 0===u&&(u=a.General.PROFILE_CHUNK_SIZE),function(a,c){return r.__awaiter(l,void 0,void 0,(function(){var l,d,f;return r.__generator(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,o.Client4.getProfilesNotInTeam(e,t,n,u)];case 1:return l=r.sent(),[3,3];case 2:return d=r.sent(),g.forceLogoutIfNecessary(d,a,c),a(m.logError(d)),[2,{error:d}];case 3:return f=t?s.UserTypes.RECEIVED_PROFILES_LIST_NOT_IN_TEAM_AND_REPLACE:s.UserTypes.RECEIVED_PROFILES_LIST_NOT_IN_TEAM,a(i.batchActions([{type:f,data:l,id:e},{type:s.UserTypes.RECEIVED_PROFILES_LIST,data:l}])),[2,{data:l}]}}))}))}},t.getProfilesWithoutTeam=function(e,t,n){var u=this;return void 0===t&&(t=a.General.PROFILE_CHUNK_SIZE),void 0===n&&(n={}),function(a,l){return r.__awaiter(u,void 0,void 0,(function(){var u,c;return r.__generator(this,(function(r){switch(r.label){case 0:u=null,r.label=1;case 1:return r.trys.push([1,3,,4]),[4,o.Client4.getProfilesWithoutTeam(e,t,n)];case 2:return u=r.sent(),[3,4];case 3:return c=r.sent(),g.forceLogoutIfNecessary(c,a,l),a(m.logError(c)),[2,{error:c}];case 4:return a(i.batchActions([{type:s.UserTypes.RECEIVED_PROFILES_LIST_WITHOUT_TEAM,data:u},{type:s.UserTypes.RECEIVED_PROFILES_LIST,data:u}])),[2,{data:u}]}}))}))}},t.getProfilesInChannel=w,t.getProfilesInGroupChannels=function(e){var t=this;return function(n,u){return r.__awaiter(t,void 0,void 0,(function(){var t,l,c,d,f,p;return r.__generator(this,(function(_){switch(_.label){case 0:t=u().entities.users.currentUserId,_.label=1;case 1:return _.trys.push([1,3,,4]),[4,o.Client4.getProfilesInGroupChannels(e.slice(0,a.General.MAX_GROUP_CHANNELS_FOR_PROFILES))];case 2:return l=_.sent(),[3,4];case 3:return c=_.sent(),g.forceLogoutIfNecessary(c,n,u),n(m.logError(c)),[2,{error:c}];case 4:for(f in d=[],l)l.hasOwnProperty(f)&&(p=l[f],d.push({type:s.UserTypes.RECEIVED_PROFILES_LIST_IN_CHANNEL,data:p,id:f},{type:s.UserTypes.RECEIVED_PROFILES_LIST,data:h.removeUserFromList(t,r.__spread(p))}));return n(i.batchActions(d)),[2,{data:l}]}}))}))}},t.getProfilesNotInChannel=L,t.getMe=P,t.updateMyTermsOfServiceStatus=M,t.getTermsOfService=U,t.promoteGuestToUser=function(e){return g.bindClientFunc({clientFunc:o.Client4.promoteGuestToUser,params:[e]})},t.demoteUserToGuest=function(e){return g.bindClientFunc({clientFunc:o.Client4.demoteUserToGuest,params:[e]})},t.createTermsOfService=D,t.getUser=k,t.getUserByUsername=F,t.getUserByEmail=function(e){return g.bindClientFunc({clientFunc:o.Client4.getUserByEmail,onSuccess:s.UserTypes.RECEIVED_PROFILE,params:[e]})};var x,H=[],G=g.debounce((function(e,t){return r.__awaiter(void 0,void 0,void 0,(function(){return r.__generator(this,(function(n){return V(r.__spread(new Set(H)))(e,t),[2]}))}))}),20,!1,(function(){H=[]}));function V(e){return g.bindClientFunc({clientFunc:o.Client4.getStatusesByIds,onSuccess:s.UserTypes.RECEIVED_STATUSES,params:[e]})}function B(e){return g.bindClientFunc({clientFunc:o.Client4.getStatus,onSuccess:s.UserTypes.RECEIVED_STATUS,params:[e]})}function j(e){return g.bindClientFunc({clientFunc:o.Client4.getSessions,onSuccess:s.UserTypes.RECEIVED_SESSIONS,params:[e]})}function z(e,t){var n=this;return function(i,a){return r.__awaiter(n,void 0,void 0,(function(){var n;return r.__generator(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,o.Client4.revokeSession(e,t)];case 1:return r.sent(),[3,3];case 2:return n=r.sent(),g.forceLogoutIfNecessary(n,i,a),i(m.logError(n)),[2,{error:n}];case 3:return i({type:s.UserTypes.RECEIVED_REVOKED_SESSION,sessionId:t,data:null}),[2,{data:!0}]}}))}))}}function Y(e){var t=this;return function(n,a){return r.__awaiter(t,void 0,void 0,(function(){var t,u;return r.__generator(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,o.Client4.revokeAllSessionsForUser(e)];case 1:return r.sent(),[3,3];case 2:return t=r.sent(),g.forceLogoutIfNecessary(t,n,a),n(m.logError(t)),[2,{error:t}];case 3:return u={isCurrentUser:e===E.getCurrentUserId(a())},n(i.batchActions([{type:s.UserTypes.REVOKE_ALL_USER_SESSIONS_SUCCESS,data:u}])),[2,{data:!0}]}}))}))}}function W(){var e=this;return function(t,n){return r.__awaiter(e,void 0,void 0,(function(){var e;return r.__generator(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,o.Client4.revokeSessionsForAllUsers()];case 1:return r.sent(),[3,3];case 2:return e=r.sent(),g.forceLogoutIfNecessary(e,t,n),t(m.logError(e)),[2,{error:e}];case 3:return t({type:s.UserTypes.REVOKE_SESSIONS_FOR_ALL_USERS_SUCCESS,data:null}),[2,{data:!0}]}}))}))}}function Q(){var e=this;return function(t,n){return r.__awaiter(e,void 0,void 0,(function(){var e,i,o,a,s,u,l,c,d,h,p,_,E,m;return r.__generator(this,(function(r){for(e=n(),i=e.entities.general.config,o=e.entities.channels,a=o.channels,s=o.myMembers,u=e.entities.preferences.myPreferences,l=e.entities.users,c=l.currentUserId,d=l.profiles,h=Object.values(a),p=0;p<h.length;p++)_=h[p],E=s[_.id],(f.isDirectChannel(_)||f.isGroupChannel(_))&&E&&(E.mention_count>0&&f.isDirectChannel(_)?(m=f.getUserIdFromChannelName(c,_.name),f.isDirectChannelVisible(d[m]||m,i,u,_)||v.makeDirectChannelVisibleIfNecessary(m)(t,n)):(E.mention_count>0||E.msg_count<_.total_msg_count)&&f.isGroupChannel(_)&&!f.isGroupChannelVisible(i,u,_)&&v.makeGroupMessageVisibleIfNecessary(_.id)(t,n));return[2,{data:!0}]}))}))}}function J(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=a.General.AUDITS_CHUNK_SIZE),g.bindClientFunc({clientFunc:o.Client4.getUserAudits,onSuccess:s.UserTypes.RECEIVED_AUDITS,params:[e,t,n]})}function K(e,t){var n=this;return void 0===t&&(t={}),function(a,u){return r.__awaiter(n,void 0,void 0,(function(){var n,l,c,d;return r.__generator(this,(function(f){switch(f.label){case 0:n=u().entities.users.currentUserId,f.label=1;case 1:return f.trys.push([1,3,,4]),[4,o.Client4.searchUsers(e,t)];case 2:return l=f.sent(),[3,4];case 3:return c=f.sent(),g.forceLogoutIfNecessary(c,a,u),a(m.logError(c)),[2,{error:c}];case 4:return d=[{type:s.UserTypes.RECEIVED_PROFILES_LIST,data:h.removeUserFromList(n,r.__spread(l))}],t.in_channel_id&&d.push({type:s.UserTypes.RECEIVED_PROFILES_LIST_IN_CHANNEL,data:l,id:t.in_channel_id}),t.not_in_channel_id&&d.push({type:s.UserTypes.RECEIVED_PROFILES_LIST_NOT_IN_CHANNEL,data:l,id:t.not_in_channel_id}),t.team_id&&d.push({type:s.UserTypes.RECEIVED_PROFILES_LIST_IN_TEAM,data:l,id:t.team_id}),t.not_in_team_id&&d.push({type:s.UserTypes.RECEIVED_PROFILES_LIST_NOT_IN_TEAM,data:l,id:t.not_in_team_id}),a(i.batchActions(d)),[2,{data:l}]}}))}))}}function q(){var e=this;return function(t,n){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return x&&clearInterval(x),x=setInterval((function(){var e=n().entities.users.statuses;if(e){var r=Object.keys(e);r.length&&V(r)(t,n)}}),a.General.STATUS_INTERVAL),[2,{data:!0}]}))}))}}function X(){var e=this;return function(){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return x&&clearInterval(x),[2,{data:!0}]}))}))}}function Z(e){var t=this;return function(n,a){return r.__awaiter(t,void 0,void 0,(function(){var t,a;return r.__generator(this,(function(r){switch(r.label){case 0:n({type:s.UserTypes.UPDATE_ME_REQUEST,data:null}),r.label=1;case 1:return r.trys.push([1,3,,4]),[4,o.Client4.patchMe(e)];case 2:return t=r.sent(),[3,4];case 3:return a=r.sent(),n(i.batchActions([{type:s.UserTypes.UPDATE_ME_FAILURE,error:a},m.logError(a)])),[2,{error:a}];case 4:return n(i.batchActions([{type:s.UserTypes.RECEIVED_ME,data:t},{type:s.UserTypes.UPDATE_ME_SUCCESS}])),n(d.loadRolesIfNeeded(t.roles.split(" "))),[2,{data:t}]}}))}))}}function $(e,t){var n=this;return function(i,a){return r.__awaiter(n,void 0,void 0,(function(){var n;return r.__generator(this,(function(u){switch(u.label){case 0:return u.trys.push([0,2,,3]),[4,o.Client4.updateUserRoles(e,t)];case 1:return u.sent(),[3,3];case 2:return[2,{error:u.sent()}];case 3:return(n=a().entities.users.profiles[e])&&i({type:s.UserTypes.RECEIVED_PROFILE,data:r.__assign(r.__assign({},n),{roles:t})}),[2,{data:!0}]}}))}))}}function ee(e,t,n){var i=this;return void 0===n&&(n=""),function(a,u){return r.__awaiter(i,void 0,void 0,(function(){var i,l;return r.__generator(this,(function(c){switch(c.label){case 0:return c.trys.push([0,2,,3]),[4,o.Client4.updateUserMfa(e,t,n)];case 1:return c.sent(),[3,3];case 2:return i=c.sent(),a(m.logError(i)),[2,{error:i}];case 3:return(l=u().entities.users.profiles[e])&&a({type:s.UserTypes.RECEIVED_PROFILE,data:r.__assign(r.__assign({},l),{mfa_active:t})}),[2,{data:!0}]}}))}))}}function te(e,t,n){var i=this;return function(a,u){return r.__awaiter(i,void 0,void 0,(function(){var i,l;return r.__generator(this,(function(c){switch(c.label){case 0:return c.trys.push([0,2,,3]),[4,o.Client4.updateUserPassword(e,t,n)];case 1:return c.sent(),[3,3];case 2:return i=c.sent(),a(m.logError(i)),[2,{error:i}];case 3:return(l=u().entities.users.profiles[e])&&a({type:s.UserTypes.RECEIVED_PROFILE,data:r.__assign(r.__assign({},l),{last_password_update_at:(new Date).getTime()})}),[2,{data:!0}]}}))}))}}function ne(e,t){var n=this;return function(i,a){return r.__awaiter(n,void 0,void 0,(function(){var n,u,l;return r.__generator(this,(function(c){switch(c.label){case 0:return c.trys.push([0,2,,3]),[4,o.Client4.updateUserActive(e,t)];case 1:return c.sent(),[3,3];case 2:return n=c.sent(),i(m.logError(n)),[2,{error:n}];case 3:return(u=a().entities.users.profiles[e])&&(l=t?0:(new Date).getTime(),i({type:s.UserTypes.RECEIVED_PROFILE,data:r.__assign(r.__assign({},u),{delete_at:l})})),[2,{data:!0}]}}))}))}}function re(e){return g.bindClientFunc({clientFunc:o.Client4.verifyUserEmail,params:[e]})}function ie(e){return g.bindClientFunc({clientFunc:o.Client4.sendVerificationEmail,params:[e]})}function oe(e,t){return g.bindClientFunc({clientFunc:o.Client4.resetUserPassword,params:[e,t]})}function ae(e){return g.bindClientFunc({clientFunc:o.Client4.sendPasswordResetEmail,params:[e]})}function se(e,t){var n=this;return function(i,a){return r.__awaiter(n,void 0,void 0,(function(){var n;return r.__generator(this,(function(u){switch(u.label){case 0:return u.trys.push([0,2,,3]),[4,o.Client4.uploadProfileImage(e,t)];case 1:return u.sent(),[3,3];case 2:return[2,{error:u.sent()}];case 3:return(n=a().entities.users.profiles[e])&&i({type:s.UserTypes.RECEIVED_PROFILE,data:r.__assign(r.__assign({},n),{last_picture_update:(new Date).getTime()})}),[2,{data:!0}]}}))}))}}function ue(e,t,n,r){return void 0===r&&(r=""),g.bindClientFunc({clientFunc:o.Client4.switchEmailToOAuth,params:[e,t,n,r]})}function le(e,t,n){return g.bindClientFunc({clientFunc:o.Client4.switchOAuthToEmail,params:[e,t,n]})}function ce(e,t,n,r,i){return void 0===i&&(i=""),g.bindClientFunc({clientFunc:o.Client4.switchEmailToLdap,params:[e,t,n,r,i]})}function de(e,t,n,r){return void 0===r&&(r=""),g.bindClientFunc({clientFunc:o.Client4.switchLdapToEmail,params:[e,t,n,r]})}function fe(e,t){var n=this;return function(a,u){return r.__awaiter(n,void 0,void 0,(function(){var n,l,c,d;return r.__generator(this,(function(f){switch(f.label){case 0:return f.trys.push([0,2,,3]),[4,o.Client4.createUserAccessToken(e,t)];case 1:return n=f.sent(),[3,3];case 2:return l=f.sent(),g.forceLogoutIfNecessary(l,a,u),a(m.logError(l)),[2,{error:l}];case 3:return c=[{type:s.AdminTypes.RECEIVED_USER_ACCESS_TOKEN,data:r.__assign(r.__assign({},n),{token:""})}],d=u().entities.users.currentUserId,e===d&&c.push({type:s.UserTypes.RECEIVED_MY_USER_ACCESS_TOKEN,data:r.__assign(r.__assign({},n),{token:""})}),a(i.batchActions(c)),[2,{data:n}]}}))}))}}function he(e){var t=this;return function(n,a){return r.__awaiter(t,void 0,void 0,(function(){var t,u,l,c;return r.__generator(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,o.Client4.getUserAccessToken(e)];case 1:return t=r.sent(),[3,3];case 2:return u=r.sent(),g.forceLogoutIfNecessary(u,n,a),n(m.logError(u)),[2,{error:u}];case 3:return l=[{type:s.AdminTypes.RECEIVED_USER_ACCESS_TOKEN,data:t}],c=a().entities.users.currentUserId,t.user_id===c&&l.push({type:s.UserTypes.RECEIVED_MY_USER_ACCESS_TOKEN,data:t}),n(i.batchActions(l)),[2,{data:t}]}}))}))}}function pe(e,t,n){var u=this;return void 0===t&&(t=0),void 0===n&&(n=a.General.PROFILE_CHUNK_SIZE),function(a,l){return r.__awaiter(u,void 0,void 0,(function(){var u,c,d,f;return r.__generator(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,o.Client4.getUserAccessTokensForUser(e,t,n)];case 1:return u=r.sent(),[3,3];case 2:return c=r.sent(),g.forceLogoutIfNecessary(c,a,l),a(m.logError(c)),[2,{error:c}];case 3:return d=[{type:s.AdminTypes.RECEIVED_USER_ACCESS_TOKENS_FOR_USER,data:u,userId:e}],f=l().entities.users.currentUserId,e===f&&d.push({type:s.UserTypes.RECEIVED_MY_USER_ACCESS_TOKENS,data:u}),a(i.batchActions(d)),[2,{data:u}]}}))}))}}function _e(e){var t=this;return function(n,i){return r.__awaiter(t,void 0,void 0,(function(){var t;return r.__generator(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,o.Client4.revokeUserAccessToken(e)];case 1:return r.sent(),[3,3];case 2:return t=r.sent(),g.forceLogoutIfNecessary(t,n,i),n(m.logError(t)),[2,{error:t}];case 3:return n({type:s.UserTypes.REVOKED_USER_ACCESS_TOKEN,data:e}),[2,{data:!0}]}}))}))}}function Ee(e){var t=this;return function(n,i){return r.__awaiter(t,void 0,void 0,(function(){var t;return r.__generator(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,o.Client4.disableUserAccessToken(e)];case 1:return r.sent(),[3,3];case 2:return t=r.sent(),g.forceLogoutIfNecessary(t,n,i),n(m.logError(t)),[2,{error:t}];case 3:return n({type:s.UserTypes.DISABLED_USER_ACCESS_TOKEN,data:e}),[2,{data:!0}]}}))}))}}function me(e){var t=this;return function(n,i){return r.__awaiter(t,void 0,void 0,(function(){var t;return r.__generator(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,o.Client4.enableUserAccessToken(e)];case 1:return r.sent(),[3,3];case 2:return t=r.sent(),g.forceLogoutIfNecessary(t,n,i),n(m.logError(t)),[2,{error:t}];case 3:return n({type:s.UserTypes.ENABLED_USER_ACCESS_TOKEN,data:e}),[2,{data:!0}]}}))}))}}function ge(){var e=this;return function(t,n){return r.__awaiter(e,void 0,void 0,(function(){var e,i,o,a;return r.__generator(this,(function(r){switch(r.label){case 0:return e=n(),i=E.getUsers(e),o=e.websocket.lastDisconnectAt,a=_.getServerVersion(e),p.isMinimumServerVersion(a,5,14)?[4,t(A(Object.keys(i),{since:o}))]:[2,{data:!0}];case 1:return r.sent(),[2,{data:!0}]}}))}))}}t.getStatusesByIdsBatchedDebounced=function(e){return H=r.__spread(H,[e]),G},t.getStatusesByIds=V,t.getStatus=B,t.setStatus=function(e){var t=this;return function(n,i){return r.__awaiter(t,void 0,void 0,(function(){var t;return r.__generator(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,o.Client4.updateStatus(e)];case 1:return r.sent(),[3,3];case 2:return t=r.sent(),g.forceLogoutIfNecessary(t,n,i),n(m.logError(t)),[2,{error:t}];case 3:return n({type:s.UserTypes.RECEIVED_STATUS,data:e}),[2,{data:e}]}}))}))}},t.getSessions=j,t.revokeSession=z,t.revokeAllSessionsForUser=Y,t.revokeSessionsForAllUsers=W,t.loadProfilesForDirect=Q,t.getUserAudits=J,t.autocompleteUsers=function(e,t,n,u){var l=this;return void 0===t&&(t=""),void 0===n&&(n=""),void 0===u&&(u={limit:a.General.AUTOCOMPLETE_LIMIT_DEFAULT}),function(a,c){return r.__awaiter(l,void 0,void 0,(function(){var l,d,f,p,_;return r.__generator(this,(function(E){switch(E.label){case 0:a({type:s.UserTypes.AUTOCOMPLETE_USERS_REQUEST,data:null}),l=c().entities.users.currentUserId,E.label=1;case 1:return E.trys.push([1,3,,4]),[4,o.Client4.autocompleteUsers(e,t,n,u)];case 2:return d=E.sent(),[3,4];case 3:return f=E.sent(),g.forceLogoutIfNecessary(f,a,c),a(i.batchActions([{type:s.UserTypes.AUTOCOMPLETE_USERS_FAILURE,error:f},m.logError(f)])),[2,{error:f}];case 4:return p=r.__spread(d.users),d.out_of_channel&&(p=r.__spread(p,d.out_of_channel)),h.removeUserFromList(l,p),_=[{type:s.UserTypes.RECEIVED_PROFILES_LIST,data:p},{type:s.UserTypes.AUTOCOMPLETE_USERS_SUCCESS}],n&&(_.push({type:s.UserTypes.RECEIVED_PROFILES_LIST_IN_CHANNEL,data:d.users,id:n}),_.push({type:s.UserTypes.RECEIVED_PROFILES_LIST_NOT_IN_CHANNEL,data:d.out_of_channel,id:n})),t&&_.push({type:s.UserTypes.RECEIVED_PROFILES_LIST_IN_TEAM,data:p,id:t}),a(i.batchActions(_)),[2,{data:d}]}}))}))}},t.searchProfiles=K,t.startPeriodicStatusUpdates=q,t.stopPeriodicStatusUpdates=X,t.updateMe=Z,t.patchUser=function(e){var t=this;return function(n){return r.__awaiter(t,void 0,void 0,(function(){var t,i;return r.__generator(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,o.Client4.patchUser(e)];case 1:return t=r.sent(),[3,3];case 2:return i=r.sent(),n(m.logError(i)),[2,{error:i}];case 3:return n({type:s.UserTypes.RECEIVED_PROFILE,data:t}),[2,{data:t}]}}))}))}},t.updateUserRoles=$,t.updateUserMfa=ee,t.updateUserPassword=te,t.updateUserActive=ne,t.verifyUserEmail=re,t.sendVerificationEmail=ie,t.resetUserPassword=oe,t.sendPasswordResetEmail=ae,t.setDefaultProfileImage=function(e){var t=this;return function(n,i){return r.__awaiter(t,void 0,void 0,(function(){var t,a;return r.__generator(this,(function(u){switch(u.label){case 0:return u.trys.push([0,2,,3]),[4,o.Client4.setDefaultProfileImage(e)];case 1:return u.sent(),[3,3];case 2:return t=u.sent(),n(m.logError(t)),[2,{error:t}];case 3:return(a=i().entities.users.profiles[e])&&n({type:s.UserTypes.RECEIVED_PROFILE,data:r.__assign(r.__assign({},a),{last_picture_update:0})}),[2,{data:!0}]}}))}))}},t.uploadProfileImage=se,t.switchEmailToOAuth=ue,t.switchOAuthToEmail=le,t.switchEmailToLdap=ce,t.switchLdapToEmail=de,t.createUserAccessToken=fe,t.getUserAccessToken=he,t.getUserAccessTokens=function(e,t){var n=this;return void 0===e&&(e=0),void 0===t&&(t=a.General.PROFILE_CHUNK_SIZE),function(a,u){return r.__awaiter(n,void 0,void 0,(function(){var n,l,c;return r.__generator(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,o.Client4.getUserAccessTokens(e,t)];case 1:return n=r.sent(),[3,3];case 2:return l=r.sent(),g.forceLogoutIfNecessary(l,a,u),a(m.logError(l)),[2,{error:l}];case 3:return c=[{type:s.AdminTypes.RECEIVED_USER_ACCESS_TOKENS,data:n}],a(i.batchActions(c)),[2,{data:n}]}}))}))}},t.getUserAccessTokensForUser=pe,t.revokeUserAccessToken=_e,t.disableUserAccessToken=Ee,t.enableUserAccessToken=me,t.getKnownUsers=function(){return g.bindClientFunc({clientFunc:o.Client4.getKnownUsers})},t.clearUserAccessTokens=function(){var e=this;return function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return t({type:s.UserTypes.CLEAR_MY_USER_ACCESS_TOKENS,data:null}),[2,{data:!0}]}))}))}},t.checkForModifiedUsers=ge,t.default={checkMfa:y,generateMfaSecret:T,login:C,logout:b,getProfiles:I,getProfilesByIds:A,getProfilesInTeam:O,getProfilesInChannel:w,getProfilesNotInChannel:L,getUser:k,getMe:P,getUserByUsername:F,getStatus:B,getStatusesByIds:V,getSessions:j,getTotalUsersStats:R,loadProfilesForDirect:Q,revokeSession:z,revokeAllSessionsForUser:Y,revokeSessionsForAllUsers:W,getUserAudits:J,searchProfiles:K,startPeriodicStatusUpdates:q,stopPeriodicStatusUpdates:X,updateMe:Z,updateUserRoles:$,updateUserMfa:ee,updateUserPassword:te,updateUserActive:ne,verifyUserEmail:re,sendVerificationEmail:ie,resetUserPassword:oe,sendPasswordResetEmail:ae,uploadProfileImage:se,switchEmailToOAuth:ue,switchOAuthToEmail:le,switchEmailToLdap:ce,switchLdapToEmail:de,getTermsOfService:U,createTermsOfService:D,updateMyTermsOfServiceStatus:M,createUserAccessToken:fe,getUserAccessToken:he,getUserAccessTokensForUser:pe,revokeUserAccessToken:_e,disableUserAccessToken:Ee,enableUserAccessToken:me,checkForModifiedUsers:ge}},function(e,t){e.exports=ReactBootstrap},function(e,t,n){var r=n(5),i=n(43).f,o=n(20),a=n(27),s=n(55),u=n(109),l=n(79);e.exports=function(e,t){var n,c,d,f,h,p=e.target,_=e.global,E=e.stat;if(n=_?r:E?r[p]||s(p,{}):(r[p]||{}).prototype)for(c in t){if(f=t[c],d=e.noTargetGet?(h=i(n,c))&&h.value:n[c],!l(_?c:p+(E?".":"#")+c,e.forced)&&void 0!==d){if(typeof f==typeof d)continue;u(f,d)}(e.sham||d&&d.sham)&&o(f,"sham",!0),a(n,c,f,e)}}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t,n){var r=n(5),i=n(20),o=n(12),a=n(55),s=n(56),u=n(28),l=u.get,c=u.enforce,d=String(String).split("String");(e.exports=function(e,t,n,s){var u=!!s&&!!s.unsafe,l=!!s&&!!s.enumerable,f=!!s&&!!s.noTargetGet;"function"==typeof n&&("string"!=typeof t||o(n,"name")||i(n,"name",t),c(n).source=d.join("string"==typeof t?t:"")),e!==r?(u?!f&&e[t]&&(l=!0):delete e[t],l?e[t]=n:i(e,t,n)):l?e[t]=n:a(t,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&l(this).source||s(this)}))},function(e,t,n){var r,i,o,a=n(108),s=n(5),u=n(17),l=n(20),c=n(12),d=n(57),f=n(58),h=s.WeakMap;if(a){var p=new h,_=p.get,E=p.has,m=p.set;r=function(e,t){return m.call(p,e,t),t},i=function(e){return _.call(p,e)||{}},o=function(e){return E.call(p,e)}}else{var g=d("state");f[g]=!0,r=function(e,t){return l(e,g,t),t},i=function(e){return c(e,g)?e[g]:{}},o=function(e){return c(e,g)}}e.exports={set:r,get:i,has:o,enforce:function(e){return o(e)?i(e):r(e,{})},getterFor:function(e){return function(t){var n;if(!u(t)||(n=i(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}}},function(e,t){e.exports=!1},function(e,t,n){var r=n(111),i=n(5),o=function(e){return"function"==typeof e?e:void 0};e.exports=function(e,t){return arguments.length<2?o(r[e])||o(i[e]):r[e]&&r[e][t]||i[e]&&i[e][t]}},function(e,t,n){var r=n(5),i=n(127),o=n(90),a=n(20),s=n(6),u=s("iterator"),l=s("toStringTag"),c=o.values;for(var d in i){var f=r[d],h=f&&f.prototype;if(h){if(h[u]!==c)try{a(h,u,c)}catch(e){h[u]=c}if(h[l]||a(h,l,d),i[d])for(var p in o)if(h[p]!==o[p])try{a(h,p,o[p])}catch(e){h[p]=o[p]}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=n(18),o=n(184),a=n(4),s=r.__importDefault(n(101));function u(e){return{type:i.ErrorTypes.DISMISS_ERROR,index:e,data:null}}function l(e,t){return void 0===t&&(t=!1),{type:i.ErrorTypes.LOG_ERROR,displayable:t,error:e,data:null}}t.dismissErrorObject=u,t.dismissError=function(e){var t=this;return function(n){return r.__awaiter(t,void 0,void 0,(function(){return r.__generator(this,(function(t){return n(u(e)),[2,{data:!0}]}))}))}},t.getLogErrorAction=l,t.logError=function(e,t){var n=this;return void 0===t&&(t=!1),function(u){return r.__awaiter(n,void 0,void 0,(function(){var n,c,d;return r.__generator(this,(function(r){switch(r.label){case 0:if("api.context.session_expired.app_error"===e.server_error_id)return[2,{data:!0}];if(n=o.serializeError(e),c=!0,e.stack&&e.stack.includes("TypeError: Failed to fetch")&&(c=!1),e.server_error_id&&(c=!1),!c)return[3,4];r.label=1;case 1:return r.trys.push([1,3,,4]),d=JSON.stringify(n).toString(),[4,a.Client4.logClientError(d)];case 2:return r.sent(),[3,4];case 3:return r.sent(),[3,4];case 4:return s.default.emit(i.ErrorTypes.LOG_ERROR,e),u(l(n,t)),[2,{data:!0}]}}))}))}},t.clearErrors=function(){var e=this;return function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return t({type:i.ErrorTypes.CLEAR_ERRORS,data:null}),[2,{data:!0}]}))}))}}},function(e,t,n){"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE){0;try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}}(),e.exports=n(194)},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){var r=n(21).f,i=n(12),o=n(6)("toStringTag");e.exports=function(e,t,n){e&&!i(e=n?e:e.prototype,o)&&r(e,o,{configurable:!0,value:t})}},function(e,t){e.exports={}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=n(7),o=n(157);function a(e){return e.first_name&&e.last_name?e.first_name+" "+e.last_name:e.first_name?e.first_name:e.last_name?e.last_name:""}function s(e,t){return e.split(" ").includes(t)}function u(e){return s(e,i.General.TEAM_ADMIN_ROLE)}function l(e){return s(e,i.General.SYSTEM_ADMIN_ROLE)}function c(e,t){var n=e.split(t),r=n.map((function(e,r){return n.slice(r).join(t)}));return" "===t?r:r.reduce((function(e,n){return 0===e.length?e.push(n):e.push(t+n,n),e}),[])}function d(e,t){var n=t.reduce((function(t,n){return c(e,n).forEach((function(e){return t.add(e)})),t}),new Set);return r.__spread(n)}t.getFullName=a,t.displayUsername=function(e,t,n){void 0===n&&(n=!0);var r=n?o.localizeMessage("channel_loader.someone","Someone"):"";return e&&((r=t===i.Preferences.DISPLAY_PREFER_NICKNAME?e.nickname||a(e):t===i.Preferences.DISPLAY_PREFER_FULL_NAME?a(e):e.username)&&0!==r.trim().length||(r=e.username)),r},t.rolesIncludePermission=s,t.isAdmin=function(e){return l(e)||u(e)},t.isGuest=function(e){return s(e,"system_guest")},t.isTeamAdmin=u,t.isSystemAdmin=l,t.isChannelAdmin=function(e){return s(e,i.General.CHANNEL_ADMIN_ROLE)},t.hasUserAccessTokenRole=function(e){return s(e,i.General.SYSTEM_USER_ACCESS_TOKEN_ROLE)},t.hasPostAllRole=function(e){return s(e,i.General.SYSTEM_POST_ALL_ROLE)},t.hasPostAllPublicRole=function(e){return s(e,i.General.SYSTEM_POST_ALL_PUBLIC_ROLE)},t.profileListToMap=function(e){for(var t={},n=0;n<e.length;n++)t[e[n].id]=e[n];return t},t.removeUserFromList=function(e,t){for(var n=t.length-1;n>=0;n--)if(t[n].id===e)return t.splice(n,1),t;return t},t.getSuggestionsSplitBy=c,t.getSuggestionsSplitByMultiple=d,t.filterProfilesMatchingTerm=function(e,t){var n=t.toLowerCase();return n.startsWith("@")&&(n=n.substr(1)),e.filter((function(e){if(!e)return!1;var t=[],o=d((e.username||"").toLowerCase(),i.General.AUTOCOMPLETE_SPLIT_CHARACTERS);t.push.apply(t,r.__spread(o));var a=(e.first_name||"").toLowerCase(),s=(e.last_name||"").toLowerCase(),u=a+" "+s;t.push(a,s,u),t.push((e.nickname||"").toLowerCase());var l=(e.email||"").toLowerCase();t.push(l),t.push((e.nickname||"").toLowerCase());var c=l.split("@");return c.length>1&&t.push(c[1]),t.filter((function(e){return""!==e})).some((function(e){return e.startsWith(n)}))}))},t.sortByUsername=function(e,t){var n=e.username,r=t.username;return n.localeCompare(r)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BATCH="BATCHING_REDUCER.BATCH",t.batchActions=function(e,n){return void 0===n&&(n=t.BATCH),{type:n,meta:{batch:!0},payload:e}},t.enableBatching=function(e){return function t(n,r){return r&&"meta"in r&&r.meta.batch?r.payload.reduce(t,n):e(n,r)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(14);function i(e){return e.entities.channels.currentChannelId}function o(e){return e.entities.channels.myMembers}function a(e){return e.entities.users.currentUserId}t.getCurrentChannelId=i,t.getMyChannelMemberships=o,t.getMyCurrentChannelMembership=r.createSelector(i,o,(function(e,t){return t[e]||null})),t.getCurrentUser=function(e){return e.entities.users.profiles[a(e)]},t.getCurrentUserId=a,t.getUsers=function(e){return e.entities.users.profiles}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=r.__importStar(n(14)),o=n(7),a=n(9),s=n(64),u=n(15),l=n(37),c=n(190);function d(e){return e.entities.teams.currentTeamId}function f(e){return e.entities.teams.teams}function h(e){return e.entities.teams.stats}function p(e){return e.entities.teams.myMembers}function _(e){return e.entities.teams.membersInTeam}t.getCurrentTeamId=d,t.getTeamByName=i.createSelector(f,(function(e,t){return t}),(function(e,t){return Object.values(e).find((function(e){return e.name===t}))})),t.getTeams=f,t.getTeamStats=h,t.getTeamMemberships=p,t.getMembersInTeams=_,t.getTeamsList=i.createSelector(f,(function(e){return Object.values(e)})),t.getCurrentTeam=i.createSelector(f,d,(function(e,t){return e[t]})),t.getTeam=function(e,t){return f(e)[t]},t.getCurrentTeamMembership=i.createSelector(d,p,(function(e,t){return t[e]})),t.isCurrentUserCurrentTeamAdmin=i.createSelector(t.getCurrentTeamMembership,(function(e){if(e){var t=e.roles||"";return l.isTeamAdmin(t)}return!1})),t.getCurrentTeamUrl=i.createSelector(a.getCurrentUrl,t.getCurrentTeam,(function(e){return a.getConfig(e).SiteURL}),(function(e,t,n){var r=""+(e||n);return t?r+"/"+t.name:r})),t.getCurrentRelativeTeamUrl=i.createSelector(t.getCurrentTeam,(function(e){return e?"/"+e.name:"/"})),t.getCurrentTeamStats=i.createSelector(d,h,(function(e,t){return t[e]})),t.getMyTeams=i.createSelector(f,p,(function(e,t){return Object.values(e).filter((function(e){return t[e.id]&&0===e.delete_at}))})),t.getMyTeamMember=i.createSelector(p,(function(e,t){return t}),(function(e,t){return e[t]||{}})),t.getMembersInCurrentTeam=i.createSelector(d,_,(function(e,t){return t[e]})),t.getTeamMember=function(e,t,n){var r=_(e)[t];return r?r[n]:null},t.getListableTeamIds=u.createIdsSelector(f,p,(function(e){return s.haveISystemPermission(e,{permission:o.Permissions.LIST_PUBLIC_TEAMS})}),(function(e){return s.haveISystemPermission(e,{permission:o.Permissions.LIST_PRIVATE_TEAMS})}),a.isCompatibleWithJoinViewTeamPermissions,(function(e,t,n,r,i){return Object.keys(e).filter((function(o){var a=e[o],s=t[o],u=a.allow_open_invite;return i&&(u=r&&!a.allow_open_invite||n&&a.allow_open_invite),0===a.delete_at&&u&&!s}))})),t.getListableTeams=i.createSelector(f,t.getListableTeamIds,(function(e,t){return t.map((function(t){return e[t]}))})),t.getSortedListableTeams=i.createSelector(f,t.getListableTeamIds,(function(e,t){return t}),(function(e,t,n){var i,o,a={};try{for(var s=r.__values(t),u=s.next();!u.done;u=s.next()){var l=u.value;a[l]=e[l]}}catch(e){i={error:e}}finally{try{u&&!u.done&&(o=s.return)&&o.call(s)}finally{if(i)throw i.error}}return Object.values(a).sort(c.sortTeamsWithLocale(n))})),t.getJoinableTeamIds=u.createIdsSelector(f,p,(function(e){return s.haveISystemPermission(e,{permission:o.Permissions.JOIN_PUBLIC_TEAMS})}),(function(e){return s.haveISystemPermission(e,{permission:o.Permissions.JOIN_PRIVATE_TEAMS})}),a.isCompatibleWithJoinViewTeamPermissions,(function(e,t,n,r,i){return Object.keys(e).filter((function(o){var a=e[o],s=t[o],u=a.allow_open_invite;return i&&(u=r&&!a.allow_open_invite||n&&a.allow_open_invite),0===a.delete_at&&u&&!s}))})),t.getJoinableTeams=i.createSelector(f,t.getJoinableTeamIds,(function(e,t){return t.map((function(t){return e[t]}))})),t.getSortedJoinableTeams=i.createSelector(f,t.getJoinableTeamIds,(function(e,t){return t}),(function(e,t,n){var i,o,a={};try{for(var s=r.__values(t),u=s.next();!u.done;u=s.next()){var l=u.value;a[l]=e[l]}}catch(e){i={error:e}}finally{try{u&&!u.done&&(o=s.return)&&o.call(s)}finally{if(i)throw i.error}}return Object.values(a).sort(c.sortTeamsWithLocale(n))})),t.getMySortedTeamIds=u.createIdsSelector(t.getMyTeams,(function(e,t){return t}),(function(e,t){return e.sort(c.sortTeamsWithLocale(t)).map((function(e){return e.id}))})),t.getMyTeamsCount=i.createSelector(t.getMyTeams,(function(e){return e.length})),t.getChannelDrawerBadgeCount=i.createSelector(d,p,(function(e,t){var n=0,r=0;Object.values(t).forEach((function(t){t.team_id!==e&&(n+=t.mention_count||0,r+=t.msg_count||0)}));var i=0;return n?i=n:r&&(i=-1),i})),t.makeGetBadgeCountForTeamId=function(){return i.createSelector(p,(function(e,t){return t}),(function(e,t){var n=e[t],r=0;return n&&(n.mention_count?r=n.mention_count:n.msg_count&&(r=-1)),r}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=n(14),o=n(39);t.getCurrentUser=o.getCurrentUser,t.getCurrentUserId=o.getCurrentUserId,t.getUsers=o.getUsers;var a=n(9),s=n(51),u=n(37);function l(e){return e.entities.users.profilesInChannel}function c(e){return e.entities.users.profilesNotInChannel}function d(e){return e.entities.users.profilesInTeam}function f(e){return e.entities.users.profilesNotInTeam}function h(e){return e.entities.users.profilesWithoutTeam}function p(e){return e.entities.users.statuses}function _(e,t){return e.entities.users.profiles[t]}t.getUserIdsInChannels=l,t.getUserIdsNotInChannels=c,t.getUserIdsInTeams=d,t.getUserIdsNotInTeams=f,t.getUserIdsWithoutTeam=h,t.getUserStatuses=p,t.getUserSessions=function(e){return e.entities.users.mySessions},t.getUserAudits=function(e){return e.entities.users.myAudits},t.getUser=_,t.getUsersByUsername=i.createSelector(o.getUsers,(function(e){var t={};for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];t[r.username]=r}return t})),t.getUserByUsername=function(e,n){return t.getUsersByUsername(e)[n]},t.getUsersByEmail=i.createSelector(o.getUsers,(function(e){var t,n,i={};try{for(var o=r.__values(Object.keys(e).map((function(t){return e[t]}))),a=o.next();!a.done;a=o.next()){var s=a.value;i[s.email]=s}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return i})),t.getUserByEmail=function(e,n){return t.getUsersByEmail(e)[n]},t.isCurrentUserSystemAdmin=i.createSelector(o.getCurrentUser,(function(e){var t=e.roles||"";return u.isSystemAdmin(t)})),t.getCurrentUserRoles=i.createSelector(o.getMyCurrentChannelMembership,(function(e){return e.entities.teams.myMembers[e.entities.teams.currentTeamId]}),o.getCurrentUser,(function(e,t,n){var r="";return t&&(r+=t.roles+" "),e&&(r+=e.roles+" "),n&&(r+=n.roles),r.trim()})),t.getCurrentUserMentionKeys=i.createSelector(o.getCurrentUser,(function(e){var t=[];if(!e||!e.notify_props)return t;e.notify_props.mention_keys&&(t=t.concat(e.notify_props.mention_keys.split(",").map((function(e){return{key:e}})))),"true"===e.notify_props.first_name&&e.first_name&&t.push({key:e.first_name,caseSensitive:!0}),"true"===e.notify_props.channel&&(t.push({key:"@channel"}),t.push({key:"@all"}),t.push({key:"@here"}));var n="@"+e.username;return-1===t.findIndex((function(e){return e.key===n}))&&t.push({key:n}),t})),t.getProfileSetInCurrentChannel=i.createSelector(o.getCurrentChannelId,l,(function(e,t){return t[e]})),t.getProfileSetNotInCurrentChannel=i.createSelector(o.getCurrentChannelId,c,(function(e,t){return t[e]})),t.getProfileSetInCurrentTeam=i.createSelector((function(e){return e.entities.teams.currentTeamId}),d,(function(e,t){return t[e]})),t.getProfileSetNotInCurrentTeam=i.createSelector((function(e){return e.entities.teams.currentTeamId}),f,(function(e,t){return t[e]}));function E(e,t,n){void 0===n&&(n=!1);var r=[];return void 0===t?r:(r=(r="all"===t?Object.keys(e).map((function(t){return e[t]})):Array.from(t).map((function(t){return e[t]}))).filter((function(e){return Boolean(e)})),n&&(r=r.filter((function(e){return!(e.delete_at&&0!==e.delete_at)}))),r.sort(u.sortByUsername))}function m(e,t){if(!t)return e;var n=Object.keys(e).map((function(t){return e[t]}));return t.role&&""!==t.role&&(n=n.filter((function(e){return e.roles&&e.roles.includes(t&&t.role||"")}))),t.inactive&&(n=n.filter((function(e){return 0!==e.delete_at}))),n.reduce((function(e,t){return e[t.id]=t,e}),{})}function g(e,t){var n=e.findIndex((function(e){return e.id===t}));n>=0&&e.splice(n,1)}t.getProfiles=i.createSelector(o.getUsers,(function(e,t){return t}),(function(e,t){return E(m(e,t),"all")})),t.getIsManualStatusForUserId=function(e,t){return e.entities.users.isManualStatus[t]},t.getProfilesInCurrentChannel=i.createSelector(o.getUsers,t.getProfileSetInCurrentChannel,(function(e,t){return E(e,t)})),t.getProfilesNotInCurrentChannel=i.createSelector(o.getUsers,t.getProfileSetNotInCurrentChannel,(function(e,t){return E(e,t)})),t.getProfilesInCurrentTeam=i.createSelector(o.getUsers,t.getProfileSetInCurrentTeam,(function(e,t){return E(e,t)})),t.getProfilesInTeam=i.createSelector(o.getUsers,d,(function(e,t){return t}),(function(e,t,n){return n}),(function(e,t,n,r){return E(m(e,r),t[n]||new Set)})),t.getProfilesNotInCurrentTeam=i.createSelector(o.getUsers,t.getProfileSetNotInCurrentTeam,(function(e,t){return E(e,t)})),t.getProfilesWithoutTeam=i.createSelector(o.getUsers,h,(function(e,t){return t}),(function(e,t,n){return E(m(e,n),t)})),t.getStatusForUserId=function(e,t){return p(e)[t]},t.getTotalUsersStats=function(e){return e.entities.users.stats},t.searchProfiles=function(e,t,n,r){void 0===n&&(n=!1);var i=o.getUsers(e),a=u.filterProfilesMatchingTerm(Object.keys(i).map((function(e){return i[e]})),t),s=m(u.profileListToMap(a),r),l=Object.keys(s).map((function(e){return s[e]}));return n&&g(l,o.getCurrentUserId(e)),l},t.searchProfilesInCurrentChannel=function(e,n,r){void 0===r&&(r=!1);var i=u.filterProfilesMatchingTerm(t.getProfilesInCurrentChannel(e),n);return r&&g(i,o.getCurrentUserId(e)),i},t.searchProfilesNotInCurrentChannel=function(e,n,r){void 0===r&&(r=!1);var i=u.filterProfilesMatchingTerm(t.getProfilesNotInCurrentChannel(e),n);return r&&g(i,o.getCurrentUserId(e)),i},t.searchProfilesInCurrentTeam=function(e,n,r){void 0===r&&(r=!1);var i=u.filterProfilesMatchingTerm(t.getProfilesInCurrentTeam(e),n);return r&&g(i,o.getCurrentUserId(e)),i},t.searchProfilesInTeam=function(e,n,r,i,a){void 0===i&&(i=!1);var s=u.filterProfilesMatchingTerm(t.getProfilesInTeam(e,n),r),l=m(u.profileListToMap(s),a),c=Object.keys(l).map((function(e){return l[e]}));return i&&g(c,o.getCurrentUserId(e)),c},t.searchProfilesNotInCurrentTeam=function(e,n,r){void 0===r&&(r=!1);var i=u.filterProfilesMatchingTerm(t.getProfilesNotInCurrentTeam(e),n);return r&&g(i,o.getCurrentUserId(e)),i},t.searchProfilesWithoutTeam=function(e,n,r,i){void 0===r&&(r=!1);var a=u.filterProfilesMatchingTerm(t.getProfilesWithoutTeam(e,i),n);return r&&g(a,o.getCurrentUserId(e)),a},t.shouldShowTermsOfService=i.createSelector(a.getConfig,o.getCurrentUser,a.getLicense,(function(e,t,n){var r=t?t.terms_of_service_id:"",i=t?t.terms_of_service_create_at:0,o="true"===n.IsLicensed&&"true"===e.EnableCustomTermsOfService,a=1e3*parseInt(e.CustomTermsOfServiceReAcceptancePeriod,10)*60*60*24,s=(new Date).getTime()-i;return Boolean(t&&o&&(e.CustomTermsOfServiceId!==r||s>a))})),t.getUsersInVisibleDMs=i.createSelector(o.getUsers,s.getDirectShowPreferences,(function(e,t){var n=[];return t.forEach((function(t){"true"===t.value&&e[t.name]&&n.push(e[t.name])})),n})),t.makeGetProfilesForReactions=function(){return i.createSelector(o.getUsers,(function(e,t){return t}),(function(e,t){var n=[];return t.forEach((function(t){e[t.user_id]&&n.push(e[t.user_id])})),n}))},t.makeGetProfilesInChannel=function(){return i.createSelector(o.getUsers,l,(function(e,t){return t}),(function(e,t,n){return n}),(function(e,t,n,r){void 0===r&&(r=!1);var i=t[n];return i?E(e,i,r):[]}))},t.makeGetProfilesNotInChannel=function(){return i.createSelector(o.getUsers,c,(function(e,t){return t}),(function(e,t,n){return n}),(function(e,t,n,r){void 0===r&&(r=!1);var i=t[n];return i?E(e,i,r):[]}))},t.makeGetProfilesByIdsAndUsernames=function(){return i.createSelector(o.getUsers,t.getUsersByUsername,(function(e,t){return t.allUserIds}),(function(e,t){return t.allUsernames}),(function(e,t,n,i){var o=[];if(n&&n.length>0){var a=n.filter((function(t){return e[t]})).map((function(t){return e[t]}));a&&a.length>0&&o.push.apply(o,r.__spread(a))}if(i&&i.length>0){var s=i.filter((function(e){return t[e]})).map((function(e){return t[e]}));s&&s.length>0&&o.push.apply(o,r.__spread(s))}return o}))},t.makeGetDisplayName=function(){return i.createSelector((function(e,t){return _(e,t)}),s.getTeammateNameDisplaySetting,(function(e,t,n){return void 0===n&&(n=!0),n}),(function(e,t,n){return u.displayUsername(e,t,n)}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7);function i(e,t){return e+"--"+t}t.getPreferenceKey=i,t.getPreferencesByCategory=function(e,t){var n=t+"--",r=new Map;return Object.keys(e).forEach((function(t){t.startsWith(n)&&r.set(t.substring(n.length),e[t])})),r},t.isChannelFavorite=function(e,t){var n=e[i(r.Preferences.CATEGORY_FAVORITE_CHANNEL,t)];return Boolean(n&&"false"!==n.value)}},function(e,t,n){var r=n(19),i=n(71),o=n(34),a=n(44),s=n(53),u=n(12),l=n(73),c=Object.getOwnPropertyDescriptor;t.f=r?c:function(e,t){if(e=a(e),t=s(t,!0),l)try{return c(e,t)}catch(e){}if(u(e,t))return o(!i.f.call(e,t),e[t])}},function(e,t,n){var r=n(72),i=n(45);e.exports=function(e){return r(i(e))}},function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,n){var r=n(59),i=Math.min;e.exports=function(e){return e>0?i(r(e),9007199254740991):0}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e}},function(e,t,n){var r=n(47);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 0:return function(){return e.call(t)};case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}}},function(e,t,n){var r=n(83),i=n(36),o=n(6)("iterator");e.exports=function(e){if(null!=e)return e[o]||e["@@iterator"]||i[r(e)]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=n(4),o=n(18),a=n(64),s=n(9),u=n(22);function l(e){return u.bindClientFunc({clientFunc:i.Client4.getRolesByNames,onRequest:o.RoleTypes.ROLES_BY_NAMES_REQUEST,onSuccess:[o.RoleTypes.RECEIVED_ROLES,o.RoleTypes.ROLES_BY_NAMES_SUCCESS],onFailure:o.RoleTypes.ROLES_BY_NAMES_FAILURE,params:[e]})}function c(e){var t=this;return function(n,i){return r.__awaiter(t,void 0,void 0,(function(){return r.__generator(this,(function(t){return n({type:o.RoleTypes.SET_PENDING_ROLES,data:e}),[2,{data:e}]}))}))}}t.getRolesByNames=l,t.getRoleByName=function(e){return u.bindClientFunc({clientFunc:i.Client4.getRoleByName,onRequest:o.RoleTypes.ROLE_BY_NAME_REQUEST,onSuccess:[o.RoleTypes.RECEIVED_ROLE,o.RoleTypes.ROLE_BY_NAME_SUCCESS],onFailure:o.RoleTypes.ROLE_BY_NAME_FAILURE,params:[e]})},t.getRole=function(e){return u.bindClientFunc({clientFunc:i.Client4.getRole,onRequest:o.RoleTypes.ROLE_BY_ID_REQUEST,onSuccess:[o.RoleTypes.RECEIVED_ROLE,o.RoleTypes.ROLE_BY_ID_SUCCESS],onFailure:o.RoleTypes.ROLE_BY_ID_FAILURE,params:[e]})},t.editRole=function(e){return u.bindClientFunc({clientFunc:i.Client4.patchRole,onRequest:o.RoleTypes.EDIT_ROLE_REQUEST,onSuccess:[o.RoleTypes.RECEIVED_ROLE,o.RoleTypes.EDIT_ROLE_SUCCESS],onFailure:o.RoleTypes.EDIT_ROLE_FAILURE,params:[e.id,e]})},t.setPendingRoles=c,t.loadRolesIfNeeded=function e(t){var n=this;return function(i,o){return r.__awaiter(n,void 0,void 0,(function(){var n,u,d,f,h,p,_,E,m,g,v,y,T;return r.__generator(this,(function(C){switch(C.label){case 0:n=o(),u=new Set;try{u=new Set(n.entities.roles.pending)}catch(e){}try{for(d=r.__values(t),f=d.next();!f.done;f=d.next())m=f.value,u.add(m)}catch(e){g={error:e}}finally{try{f&&!f.done&&(v=d.return)&&v.call(d)}finally{if(g)throw g.error}}return n.entities.general.serverVersion?s.hasNewPermissions(n)?[3,3]:n.entities.roles.pending?[4,c([])(i,o)]:[3,2]:(c(Array.from(u))(i,o),setTimeout((function(){return i(e([]))}),500),[2,{data:[]}]);case 1:C.sent(),C.label=2;case 2:return[2,{data:[]}];case 3:h=a.getRoles(n),p=new Set;try{for(_=r.__values(u),E=_.next();!E.done;E=_.next())m=E.value,h[m]||""===m.trim()||p.add(m)}catch(e){y={error:e}}finally{try{E&&!E.done&&(T=_.return)&&T.call(_)}finally{if(y)throw y.error}}return n.entities.roles.pending?[4,c([])(i,o)]:[3,5];case 4:C.sent(),C.label=5;case 5:return p.size>0?[2,l(Array.from(p))(i,o)]:[2,{data:n.entities.roles.roles}]}}))}))}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=r.__importStar(n(14)),o=n(7),a=n(9),s=n(40),u=n(15),l=n(42);function c(e){return e.entities.preferences.myPreferences}function d(e,t,n,r){void 0===r&&(r="");var i=l.getPreferenceKey(t,n),o=c(e);return i in o?o[i].value:r}function f(e,t,n,r){return void 0===r&&(r=!1),"false"!==d(e,t,n,String(r))}function h(){return i.createSelector(c,(function(e,t){return t}),(function(e,t){var n=t+"--",r=[];for(var i in e)i.startsWith(n)&&r.push(e[i]);return r}))}t.getMyPreferences=c,t.get=d,t.getBool=f,t.getInt=function(e,t,n,r){void 0===r&&(r=0);var i=d(e,t,n,r);return parseInt(i,10)},t.makeGetCategory=h;var p=h();function _(e){return p(e,o.Preferences.CATEGORY_DIRECT_CHANNEL_SHOW)}t.getDirectShowPreferences=_;var E=h();function m(e){return E(e,o.Preferences.CATEGORY_GROUP_CHANNEL_SHOW)}t.getGroupShowPreferences=m;var g=h();t.getFavoritesPreferences=function(e){return g(e,o.Preferences.CATEGORY_FAVORITE_CHANNEL).filter((function(e){return"true"===e.value})).map((function(e){return e.name}))},t.getVisibleTeammate=i.createSelector(_,(function(e){return e.filter((function(e){return"true"===e.value&&e.name})).map((function(e){return e.name}))})),t.getVisibleGroupIds=i.createSelector(m,(function(e){return e.filter((function(e){return"true"===e.value&&e.name})).map((function(e){return e.name}))})),t.getTeammateNameDisplaySetting=i.createSelector(a.getConfig,c,a.getLicense,(function(e,t,n){var r=n&&"true"===n.LockTeammateNameDisplay&&"true"===e.LockTeammateNameDisplay,i=l.getPreferenceKey(o.Preferences.CATEGORY_DISPLAY_SETTINGS,o.Preferences.NAME_NAME_FORMAT);return t[i]&&!r?t[i].value:e.TeammateNameDisplay?e.TeammateNameDisplay:o.General.TEAMMATE_NAME_DISPLAY.SHOW_USERNAME}));var v=i.createSelector(c,s.getCurrentTeamId,(function(e,t){var n;return t&&(n=e[l.getPreferenceKey(o.Preferences.CATEGORY_THEME,t)]),n||(n=e[l.getPreferenceKey(o.Preferences.CATEGORY_THEME,"")]),n})),y=i.createSelector(a.getConfig,(function(e){if(e.DefaultTheme){var t=o.Preferences.THEMES[e.DefaultTheme];if(t)return t}return o.Preferences.THEMES.default}));t.getTheme=u.createShallowSelector(v,y,(function(e,t){var n,i,a;if("string"==typeof(a=e?e.value:t)&&(a=JSON.parse(a)),a.type&&"custom"!==a.type){var s=Object.values(o.Preferences.THEMES).find((function(e){return e.type===a.type}));if(s)return s.mentionBg||(s.mentionBg=s.mentionBj),s}try{for(var u=r.__values(Object.keys(t)),l=u.next();!l.done;l=u.next()){var c=l.value;a[c]&&(a[c]=a[c].toLowerCase())}}catch(e){n={error:e}}finally{try{l&&!l.done&&(i=u.return)&&i.call(u)}finally{if(n)throw n.error}}return a.mentionBg||(a.mentionBg=a.mentionBj),Object.assign({},t,a)})),t.makeGetStyleFromTheme=function(){return i.createSelector(t.getTheme,(function(e,t){return t}),(function(e,t){return t(e)}))};var T={grouping:"by_type",unreads_at_top:"true",favorite_at_top:"true",sorting:"alpha"};t.getSidebarPreferences=i.createSelector((function(e){var t=a.getConfig(e);return t.ExperimentalGroupUnreadChannels!==o.General.DISABLED&&f(e,o.Preferences.CATEGORY_SIDEBAR_SETTINGS,"show_unread_section",t.ExperimentalGroupUnreadChannels===o.General.DEFAULT_ON)}),(function(e){return d(e,o.Preferences.CATEGORY_SIDEBAR_SETTINGS,"",null)}),(function(e,t){var n=JSON.parse(t);return null===n&&(n=r.__assign(r.__assign({},T),{unreads_at_top:e?"true":"false"})),n})),t.getNewSidebarPreference=i.createSelector((function(e){return a.getConfig(e).ExperimentalChannelSidebarOrganization}),(function(e){return d(e,o.Preferences.CATEGORY_SIDEBAR_SETTINGS,o.Preferences.CHANNEL_SIDEBAR_ORGANIZATION,null)}),(function(e,t){switch(e){case o.General.DISABLED:return!1;case o.General.DEFAULT_ON:return!t||"true"===t;case o.General.DEFAULT_OFF:return!!t&&"true"===t;default:return!1}})),t.shouldAutocloseDMs=function(e){var t=a.getConfig(e);return!(!t.CloseUnusedDirectMessages||"false"===t.CloseUnusedDirectMessages)&&d(e,o.Preferences.CATEGORY_SIDEBAR_SETTINGS,o.Preferences.CHANNEL_SIDEBAR_AUTOCLOSE_DMS,o.Preferences.AUTOCLOSE_DMS_ENABLED)===o.Preferences.AUTOCLOSE_DMS_ENABLED}},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){var r=n(17);e.exports=function(e,t){if(!r(e))return e;var n,i;if(t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;if("function"==typeof(n=e.valueOf)&&!r(i=n.call(e)))return i;if(!t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},function(e,t,n){var r=n(5),i=n(17),o=r.document,a=i(o)&&i(o.createElement);e.exports=function(e){return a?o.createElement(e):{}}},function(e,t,n){var r=n(5),i=n(20);e.exports=function(e,t){try{i(r,e,t)}catch(n){r[e]=t}return t}},function(e,t,n){var r=n(74),i=Function.toString;"function"!=typeof r.inspectSource&&(r.inspectSource=function(e){return i.call(e)}),e.exports=r.inspectSource},function(e,t,n){var r=n(75),i=n(76),o=r("keys");e.exports=function(e){return o[e]||(o[e]=i(e))}},function(e,t){e.exports={}},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},function(e,t){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(e,t){e.exports=function(e,t,n){if(!(e instanceof t))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return e}},function(e,t,n){var r,i=n(13),o=n(91),a=n(60),s=n(58),u=n(86),l=n(54),c=n(57),d=c("IE_PROTO"),f=function(){},h=function(e){return"<script>"+e+"<\/script>"},p=function(){try{r=document.domain&&new ActiveXObject("htmlfile")}catch(e){}var e,t;p=r?function(e){e.write(h("")),e.close();var t=e.parentWindow.Object;return e=null,t}(r):((t=l("iframe")).style.display="none",u.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(h("document.F=Object")),e.close(),e.F);for(var n=a.length;n--;)delete p.prototype[a[n]];return p()};s[d]=!0,e.exports=Object.create||function(e,t){var n;return null!==e?(f.prototype=i(e),n=new f,f.prototype=null,n[d]=e):n=p(),void 0===t?n:o(n,t)}},function(e,t,n){var r=n(45);e.exports=function(e){return Object(r(e))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=r.__importStar(n(14)),o=n(39);function a(e){return e.entities.roles.roles}t.getRoles=a,t.getMySystemRoles=i.createSelector(o.getCurrentUser,(function(e){return e?new Set(e.roles.split(" ")):new Set})),t.getMySystemPermissions=i.createSelector(t.getMySystemRoles,a,(function(e,t){var n,i,o,a,s=new Set;try{for(var u=r.__values(e),l=u.next();!l.done;l=u.next()){var c=l.value;if(t[c])try{for(var d=(o=void 0,r.__values(t[c].permissions)),f=d.next();!f.done;f=d.next()){var h=f.value;s.add(h)}}catch(e){o={error:e}}finally{try{f&&!f.done&&(a=d.return)&&a.call(d)}finally{if(o)throw o.error}}}}catch(e){n={error:e}}finally{try{l&&!l.done&&(i=u.return)&&i.call(u)}finally{if(n)throw n.error}}return s})),t.haveISystemPermission=i.createSelector(t.getMySystemPermissions,(function(e,t){return t.permission}),(function(e,t){return e.has(t)}))},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),o=n(7),a=n(9),s=n(66),u=n(42),l=n(37),c=((r={})[o.General.OPEN_CHANNEL]=0,r[o.General.PRIVATE_CHANNEL]=1,r[o.General.DM_CHANNEL]=2,r[o.General.GM_CHANNEL]=2,r);function d(e,t,n){if(_(n)){var r=h(e.currentUserId,n.name);return i.__assign(i.__assign({},n),{display_name:l.displayUsername(e.profiles[r],t,!1),teammate_id:r,status:e.statuses[r]||"offline"})}return m(n)?function(e,t,n){var r=e.currentUserId,o=e.profiles,a=e.profilesInChannel[n.id],s=i.__assign({},n);if(a)return s.display_name=y(a,o,r,t),s;var u=s.display_name.split(", "),l=Object.keys(o).map((function(e){return o[e]})),c=[];if(u.forEach((function(e){var t=l.find((function(t){return t.username===e}));t&&c.push(t.id)})),u.length===c.length)return s.display_name=y(c,o,r,t),s;return n}(e,t,n):n}function f(e,t){return t>e?e+"__"+t:t+"__"+e}function h(e,t){var n=t.split("__");return n[0]===e?n[1]:n[0]}function p(e,t,n,r,i,a,s){void 0===a&&(a=""),void 0===s&&(s=Date.now());var l=s-6048e5,c=t[o.Preferences.CATEGORY_CHANNEL_APPROXIMATE_VIEW_TIME+"--"+n.id];if((c?parseInt(c.value,10):0)>l)return!1;var d=t[o.Preferences.CATEGORY_CHANNEL_OPEN_TIME+"--"+n.id],f=d?parseInt(d.value,10):0;if(n.id!==a&&i&&i>f)return!0;if("true"!==e.CloseUnusedDirectMessages||T(t,n.id))return!1;var h=t[u.getPreferenceKey(o.Preferences.CATEGORY_SIDEBAR_SETTINGS,o.Preferences.CHANNEL_SIDEBAR_AUTOCLOSE_DMS)];if(!h||h.value===o.Preferences.AUTOCLOSE_DMS_ENABLED){if(r&&r>l)return!1;if(f>l)return!1;var p=n.last_post_at;return!p||p<l}return!1}function _(e){return e.type===o.General.DM_CHANNEL}function E(e,t,n,r,i,a,s,u){void 0===s&&(s="");var l="object"==typeof e?e:null,c="object"==typeof e?e.id:e,d=n[o.Preferences.CATEGORY_DIRECT_CHANNEL_SHOW+"--"+c];return!(!d||"true"!==d.value)&&(a||!p(t,n,r,i?i.create_at:0,l?l.delete_at:0,s,u))}function m(e){return e.type===o.General.GM_CHANNEL}function g(e,t,n,r,i,a){var s=t[o.Preferences.CATEGORY_GROUP_CHANNEL_SHOW+"--"+n.id];return!(!s||"true"!==s.value)&&(i||!p(e,t,n,r?r.create_at:0,0,"",a))}function v(e,t,n,r,i,o,a,s,u){var l=a[e.id];if(m(e)&&g(n,r,e,l,R(t,e),u))return!0;if(!_(e))return!1;var c=h(i,e.name);return E(o[c]||c,n,r,e,l,R(t,e),s,u)}function y(e,t,n,r){var i=[];return e.forEach((function(e){e!==n&&i.push(l.displayUsername(t[e],r))})),i.sort((function(e,r){var i=M(n,t);return e.localeCompare(r,i,{numeric:!0})})).join(", ")}function T(e,t){var n=e[o.Preferences.CATEGORY_FAVORITE_CHANNEL+"--"+t];return!!n&&"true"===n.value}function C(e,t,n){return n.type===o.General.DM_CHANNEL&&h(e,n.name)===t}function S(e,t){var n=e[t.id];return!!n&&n.mention_count>0}function b(e,t){var n=e[t.id];if(n){var r=t.total_msg_count-n.msg_count,i=n.notify_props&&n.notify_props.mark_unread===o.General.MENTION;return Boolean(r)&&!i&&0===n.mention_count}return!1}function R(e,t){var n=e[t.id];if(n){var r=t.total_msg_count-n.msg_count,i=n.notify_props&&n.notify_props.mark_unread===o.General.MENTION;return n.mention_count>0||Boolean(r)&&!i}return!1}function I(e){return 0===e.delete_at}function A(e){return e.type===o.General.OPEN_CHANNEL}function N(e){return e.type===o.General.PRIVATE_CHANNEL}function O(e,t,n){if(c[t.type]!==c[n.type])return c[t.type]<c[n.type]?-1:1;var r=w(t.display_name),i=w(n.display_name);return r!==i?r.toLowerCase().localeCompare(i.toLowerCase(),e,{numeric:!0}):t.name.toLowerCase().localeCompare(n.name.toLowerCase(),e,{numeric:!0})}function w(e){return e.replace(/[.,'"\/#!$%\^&\*;:{}=\-_`~()]/g,"")}function L(e,t,n){return t.display_name&&n.display_name&&t.display_name!==n.display_name?t.display_name.toLowerCase().localeCompare(n.display_name.toLowerCase(),e,{numeric:!0}):t.name.toLowerCase().localeCompare(n.name.toLowerCase(),e,{numeric:!0})}function P(e){return!(!e||!e.notify_props)&&"mention"===e.notify_props.mark_unread}function M(e,t){var n=o.General.DEFAULT_LOCALE;return t&&t[e]&&t[e].locale&&(n=t[e].locale),n}t.buildDisplayableChannelListWithUnreadSection=function(e,t,n,r,a,s,l){var c=e.currentUserId,h=e.profiles,p=M(c,h),_=function(e,t,n,r,i){return t.concat(n).map((function(t){return d(e,r,t)})).filter(I).sort(O.bind(null,i))}(e,t,function(e,t,n){var r=u.getPreferencesByCategory(n,o.Preferences.CATEGORY_DIRECT_CHANNEL_SHOW);return Array.from(r).filter((function(e){return"true"===e[1]})).map((function(e){return e[0]})).filter((function(n){return!t.some(C.bind(null,e,n))})).map((i=e,function(e){return function(e,t){return{name:f(e,t),create_at:0,update_at:0,delete_at:0,extra_update_at:0,last_post_at:0,total_msg_count:0,type:o.General.DM_CHANNEL,fake:!0,team_id:"",scheme_id:"",purpose:"",header:"",id:"",display_name:"",creator_id:"",group_constrained:!1}}(i,e)}));var i}(c,t,a),s,p),E=i.__spread(function(e,t,n){return e.filter(S.bind(null,t)).sort(L.bind(null,n))}(_,n,p),function(e,t,n){return e.filter(b.bind(null,t)).sort(L.bind(null,n))}(_,n,p)),m=_.filter((function(e){return!R(n,e)})),g=function(e,t,n){return e.filter((function(e){return T(t,e.id)})).sort(L.bind(null,n))}(m,a,p),y=function(e,t){return e.filter((function(e){return!T(t,e.id)}))}(m,a),w=function(e,t,n,r,i,o,a){return e.filter((function(e){return v(e,t,n,r,i,o,a)}))}(y,n,r,a,c,h,l);return{unreadChannels:E,favoriteChannels:g,publicChannels:y.filter(A),privateChannels:y.filter(N),directAndGroupChannels:w}},t.completeDirectChannelInfo=d,t.completeDirectChannelDisplayName=function(e,t,n,r,o){if(_(o)){var a=i.__assign({},o),s=h(e,o.name);return Object.assign(a,{display_name:l.displayUsername(t[s],r)})}if(m(o)&&n&&n.size>0){var u=y(Array.from(n),t,e,r);return i.__assign(i.__assign({},o),{display_name:u})}return o},t.cleanUpUrlable=function(e){var t=e.trim().replace(/-/g," ").replace(/[^\w\s]/gi,"").toLowerCase().replace(/\s/g,"-");return t=(t=(t=t.replace(/-{2,}/,"-")).replace(/^-+/,"")).replace(/-+$/,"")},t.getChannelByName=function(e,t){for(var n=Object.keys(e),r=0;r<n.length;r++){var i=n[r];if(e[i].name===t)return e[i]}return null},t.getDirectChannelName=f,t.getUserIdFromChannelName=h,t.isAutoClosed=p,t.isDirectChannel=_,t.isDirectChannelVisible=E,t.isGroupChannel=m,t.isGroupChannelVisible=g,t.isGroupOrDirectChannelVisible=v,t.showCreateOption=function(e,t,n,r,i,u,l){if(a.hasNewPermissions(e))return i===o.General.OPEN_CHANNEL?s.haveITeamPermission(e,{team:r,permission:o.Permissions.CREATE_PUBLIC_CHANNEL}):i!==o.General.PRIVATE_CHANNEL||s.haveITeamPermission(e,{team:r,permission:o.Permissions.CREATE_PRIVATE_CHANNEL});if("true"!==n.IsLicensed)return!0;if(i===o.General.OPEN_CHANNEL){if(t.RestrictPublicChannelCreation===o.General.SYSTEM_ADMIN_ROLE&&!l)return!1;if(t.RestrictPublicChannelCreation===o.General.TEAM_ADMIN_ROLE&&!u)return!1}else if(i===o.General.PRIVATE_CHANNEL){if(t.RestrictPrivateChannelCreation===o.General.SYSTEM_ADMIN_ROLE&&!l)return!1;if(t.RestrictPrivateChannelCreation===o.General.TEAM_ADMIN_ROLE&&!u)return!1}return!0},t.showManagementOptions=function(e,t,n,r,i,u,l){if(a.hasNewPermissions(e))return r.type===o.General.OPEN_CHANNEL?s.haveIChannelPermission(e,{channel:r.id,team:r.team_id,permission:o.Permissions.MANAGE_PUBLIC_CHANNEL_PROPERTIES}):r.type!==o.General.PRIVATE_CHANNEL||s.haveIChannelPermission(e,{channel:r.id,team:r.team_id,permission:o.Permissions.MANAGE_PRIVATE_CHANNEL_PROPERTIES});if("true"!==n.IsLicensed)return!0;if(r.type===o.General.OPEN_CHANNEL){if(t.RestrictPublicChannelManagement===o.General.SYSTEM_ADMIN_ROLE&&!u)return!1;if(t.RestrictPublicChannelManagement===o.General.TEAM_ADMIN_ROLE&&!i)return!1;if(t.RestrictPublicChannelManagement===o.General.CHANNEL_ADMIN_ROLE&&!l&&!i)return!1}else if(r.type===o.General.PRIVATE_CHANNEL){if(t.RestrictPrivateChannelManagement===o.General.SYSTEM_ADMIN_ROLE&&!u)return!1;if(t.RestrictPrivateChannelManagement===o.General.TEAM_ADMIN_ROLE&&!i)return!1;if(t.RestrictPrivateChannelManagement===o.General.CHANNEL_ADMIN_ROLE&&!l&&!i)return!1}return!0},t.showDeleteOption=function(e,t,n,r,i,u,l){if(a.hasNewPermissions(e))return r.type===o.General.OPEN_CHANNEL?s.haveIChannelPermission(e,{channel:r.id,team:r.team_id,permission:o.Permissions.DELETE_PUBLIC_CHANNEL}):r.type!==o.General.PRIVATE_CHANNEL||s.haveIChannelPermission(e,{channel:r.id,team:r.team_id,permission:o.Permissions.DELETE_PRIVATE_CHANNEL});if("true"!==n.IsLicensed)return!0;if(r.type===o.General.OPEN_CHANNEL){if(t.RestrictPublicChannelDeletion===o.General.SYSTEM_ADMIN_ROLE&&!u)return!1;if(t.RestrictPublicChannelDeletion===o.General.TEAM_ADMIN_ROLE&&!i)return!1;if(t.RestrictPublicChannelDeletion===o.General.CHANNEL_ADMIN_ROLE&&!l&&!i)return!1}else if(r.type===o.General.PRIVATE_CHANNEL){if(t.RestrictPrivateChannelDeletion===o.General.SYSTEM_ADMIN_ROLE&&!u)return!1;if(t.RestrictPrivateChannelDeletion===o.General.TEAM_ADMIN_ROLE&&!i)return!1;if(t.RestrictPrivateChannelDeletion===o.General.CHANNEL_ADMIN_ROLE&&!l&&!i)return!1}return!0},t.canManageMembersOldPermissions=function(e,t,n,r,i,a){if(e.type===o.General.DM_CHANNEL||e.type===o.General.GM_CHANNEL||e.name===o.General.DEFAULT_CHANNEL)return!1;if("true"!==a.IsLicensed)return!0;if(e.type===o.General.PRIVATE_CHANNEL){var s=t.roles.includes(o.General.SYSTEM_ADMIN_ROLE);if(i.RestrictPrivateChannelManageMembers===o.General.PERMISSIONS_SYSTEM_ADMIN&&!s)return!1;var u=n.roles.includes(o.General.TEAM_ADMIN_ROLE);if(i.RestrictPrivateChannelManageMembers===o.General.PERMISSIONS_TEAM_ADMIN&&!u&&!s)return!1;var l=r.roles.includes(o.General.CHANNEL_ADMIN_ROLE);if(i.RestrictPrivateChannelManageMembers===o.General.PERMISSIONS_CHANNEL_ADMIN&&!l&&!u&&!s)return!1}return!0},t.getChannelsIdForTeam=function(e,t){var n=e.entities.channels.channels;return Object.keys(n).map((function(e){return n[e]})).reduce((function(e,n){return n.team_id===t&&e.push(n.id),e}),[])},t.getGroupDisplayNameFromUserIds=y,t.isFavoriteChannel=T,t.isDefault=function(e){return e.name===o.General.DEFAULT_CHANNEL},t.isUnreadChannel=R,t.isOpenChannel=A,t.isPrivateChannel=N,t.sortChannelsByTypeAndDisplayName=O,t.sortChannelsByDisplayName=L,t.sortChannelsByDisplayNameAndMuted=function(e,t,n,r){var i=t[n.id],o=t[r.id];return P(o)===P(i)?L(e,n,r):!P(o)&&P(i)?1:-1},t.sortChannelsByRecency=function(e,t,n){var r=t.last_post_at;e[t.id]&&e[t.id].create_at>t.last_post_at&&(r=e[t.id].create_at);var i=n.last_post_at;return e[n.id]&&e[n.id].create_at>n.last_post_at&&(i=e[n.id].create_at),i-r},t.isChannelMuted=P,t.areChannelMentionsIgnored=function(e,t){var n=o.Users.IGNORE_CHANNEL_MENTIONS_OFF;t.channel&&"false"===t.channel&&(n=o.Users.IGNORE_CHANNEL_MENTIONS_ON);var r=e&&e.ignore_channel_mentions;return r&&r!==o.Users.IGNORE_CHANNEL_MENTIONS_DEFAULT||(r=n),r!==o.Users.IGNORE_CHANNEL_MENTIONS_OFF},t.filterChannelsMatchingTerm=function(e,t){var n=t.toLowerCase();return e.filter((function(e){if(!e)return!1;var t=(e.name||"").toLowerCase(),r=(e.display_name||"").toLowerCase();return t.startsWith(n)||r.startsWith(n)}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=r.__importStar(n(14)),o=n(39),a=n(40),s=n(64);t.getMySystemPermissions=s.getMySystemPermissions,t.getMySystemRoles=s.getMySystemRoles,t.getRoles=s.getRoles,t.getMyTeamRoles=i.createSelector(a.getTeamMemberships,(function(e){var t={};if(e)for(var n in e)e.hasOwnProperty(n)&&e[n].roles&&(t[n]=new Set(e[n].roles.split(" ")));return t})),t.getMyChannelRoles=i.createSelector((function(e){return e.entities.channels.myMembers}),(function(e){var t={};if(e)for(var n in e)e.hasOwnProperty(n)&&e[n].roles&&(t[n]=new Set(e[n].roles.split(" ")));return t})),t.getMyRoles=i.createSelector(s.getMySystemRoles,t.getMyTeamRoles,t.getMyChannelRoles,(function(e,t,n){return{system:e,team:t,channel:n}})),t.getRolesById=i.createSelector(s.getRoles,(function(e){var t,n,i={};try{for(var o=r.__values(Object.values(e)),a=o.next();!a.done;a=o.next()){var s=a.value;i[s.id]=s}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return i})),t.getMyCurrentTeamPermissions=i.createSelector(t.getMyTeamRoles,s.getRoles,s.getMySystemPermissions,a.getCurrentTeamId,(function(e,t,n,i){var o,a,s,u,l,c,d=new Set;if(e[i])try{for(var f=r.__values(e[i]),h=f.next();!h.done;h=f.next()){var p=h.value;if(t[p])try{for(var _=(s=void 0,r.__values(t[p].permissions)),E=_.next();!E.done;E=_.next()){var m=E.value;d.add(m)}}catch(e){s={error:e}}finally{try{E&&!E.done&&(u=_.return)&&u.call(_)}finally{if(s)throw s.error}}}}catch(e){o={error:e}}finally{try{h&&!h.done&&(a=f.return)&&a.call(f)}finally{if(o)throw o.error}}try{for(var g=r.__values(n),v=g.next();!v.done;v=g.next()){m=v.value;d.add(m)}}catch(e){l={error:e}}finally{try{v&&!v.done&&(c=g.return)&&c.call(g)}finally{if(l)throw l.error}}return d})),t.getMyCurrentChannelPermissions=i.createSelector(t.getMyChannelRoles,s.getRoles,t.getMyCurrentTeamPermissions,o.getCurrentChannelId,(function(e,t,n,i){var o,a,s,u,l,c,d=new Set;if(e[i])try{for(var f=r.__values(e[i]),h=f.next();!h.done;h=f.next()){var p=h.value;if(t[p])try{for(var _=(s=void 0,r.__values(t[p].permissions)),E=_.next();!E.done;E=_.next()){var m=E.value;d.add(m)}}catch(e){s={error:e}}finally{try{E&&!E.done&&(u=_.return)&&u.call(_)}finally{if(s)throw s.error}}}}catch(e){o={error:e}}finally{try{h&&!h.done&&(a=f.return)&&a.call(f)}finally{if(o)throw o.error}}try{for(var g=r.__values(n),v=g.next();!v.done;v=g.next()){m=v.value;d.add(m)}}catch(e){l={error:e}}finally{try{v&&!v.done&&(c=g.return)&&c.call(g)}finally{if(l)throw l.error}}return d})),t.getMyTeamPermissions=i.createSelector(t.getMyTeamRoles,s.getRoles,s.getMySystemPermissions,(function(e,t){return t.team}),(function(e,t,n,i){var o,a,s,u,l,c,d=new Set;if(e[i])try{for(var f=r.__values(e[i]),h=f.next();!h.done;h=f.next()){var p=h.value;if(t[p])try{for(var _=(s=void 0,r.__values(t[p].permissions)),E=_.next();!E.done;E=_.next()){var m=E.value;d.add(m)}}catch(e){s={error:e}}finally{try{E&&!E.done&&(u=_.return)&&u.call(_)}finally{if(s)throw s.error}}}}catch(e){o={error:e}}finally{try{h&&!h.done&&(a=f.return)&&a.call(f)}finally{if(o)throw o.error}}try{for(var g=r.__values(n),v=g.next();!v.done;v=g.next()){m=v.value;d.add(m)}}catch(e){l={error:e}}finally{try{v&&!v.done&&(c=g.return)&&c.call(g)}finally{if(l)throw l.error}}return d})),t.getMyChannelPermissions=i.createSelector(t.getMyChannelRoles,s.getRoles,t.getMyTeamPermissions,(function(e,t){return t.channel}),(function(e,t,n,i){var o,a,s,u,l,c,d=new Set;if(e[i])try{for(var f=r.__values(e[i]),h=f.next();!h.done;h=f.next()){var p=h.value;if(t[p])try{for(var _=(s=void 0,r.__values(t[p].permissions)),E=_.next();!E.done;E=_.next()){var m=E.value;d.add(m)}}catch(e){s={error:e}}finally{try{E&&!E.done&&(u=_.return)&&u.call(_)}finally{if(s)throw s.error}}}}catch(e){o={error:e}}finally{try{h&&!h.done&&(a=f.return)&&a.call(f)}finally{if(o)throw o.error}}try{for(var g=r.__values(n),v=g.next();!v.done;v=g.next()){m=v.value;d.add(m)}}catch(e){l={error:e}}finally{try{v&&!v.done&&(c=g.return)&&c.call(g)}finally{if(l)throw l.error}}return d})),t.haveISystemPermission=i.createSelector(s.getMySystemPermissions,(function(e,t){return t.permission}),(function(e,t){return e.has(t)})),t.haveITeamPermission=i.createSelector(t.getMyTeamPermissions,(function(e,t){return t.permission}),(function(e,t){return e.has(t)})),t.haveIChannelPermission=i.createSelector(t.getMyChannelPermissions,(function(e,t){return t.permission}),(function(e,t){return e.has(t)})),t.haveICurrentTeamPermission=i.createSelector(t.getMyCurrentTeamPermissions,(function(e,t){return t.permission}),(function(e,t){return e.has(t)})),t.haveICurrentChannelPermission=i.createSelector(t.getMyCurrentChannelPermissions,(function(e,t){return t.permission}),(function(e,t){return e.has(t)}))},function(e,t,n){"use strict";var r,i=function(){return void 0===r&&(r=Boolean(window&&document&&document.all&&!window.atob)),r},o=function(){var e={};return function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}e[t]=n}return e[t]}}(),a=[];function s(e){for(var t=-1,n=0;n<a.length;n++)if(a[n].identifier===e){t=n;break}return t}function u(e,t){for(var n={},r=[],i=0;i<e.length;i++){var o=e[i],u=t.base?o[0]+t.base:o[0],l=n[u]||0,c="".concat(u," ").concat(l);n[u]=l+1;var d=s(c),f={css:o[1],media:o[2],sourceMap:o[3]};-1!==d?(a[d].references++,a[d].updater(f)):a.push({identifier:c,updater:E(f,t),references:1}),r.push(c)}return r}function l(e){var t=document.createElement("style"),r=e.attributes||{};if(void 0===r.nonce){var i=n.nc;i&&(r.nonce=i)}if(Object.keys(r).forEach((function(e){t.setAttribute(e,r[e])})),"function"==typeof e.insert)e.insert(t);else{var a=o(e.insert||"head");if(!a)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");a.appendChild(t)}return t}var c,d=(c=[],function(e,t){return c[e]=t,c.filter(Boolean).join("\n")});function f(e,t,n,r){var i=n?"":r.media?"@media ".concat(r.media," {").concat(r.css,"}"):r.css;if(e.styleSheet)e.styleSheet.cssText=d(t,i);else{var o=document.createTextNode(i),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(o,a[t]):e.appendChild(o)}}function h(e,t,n){var r=n.css,i=n.media,o=n.sourceMap;if(i?e.setAttribute("media",i):e.removeAttribute("media"),o&&btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),e.styleSheet)e.styleSheet.cssText=r;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(r))}}var p=null,_=0;function E(e,t){var n,r,i;if(t.singleton){var o=_++;n=p||(p=l(t)),r=f.bind(null,n,o,!1),i=f.bind(null,n,o,!0)}else n=l(t),r=h.bind(null,n,t),i=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(n)};return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else i()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=i());var n=u(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var r=0;r<n.length;r++){var i=s(n[r]);a[i].references--}for(var o=u(e,t),l=0;l<n.length;l++){var c=s(n[l]);0===a[c].references&&(a[c].updater(),a.splice(c,1))}n=o}}}},function(e,t,n){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=function(e,t){var n=e[1]||"",r=e[3];if(!r)return n;if(t&&"function"==typeof btoa){var i=(a=r,s=btoa(unescape(encodeURIComponent(JSON.stringify(a)))),u="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(s),"/*# ".concat(u," */")),o=r.sources.map((function(e){return"/*# sourceURL=".concat(r.sourceRoot||"").concat(e," */")}));return[n].concat(o).concat([i]).join("\n")}var a,s,u;return[n].join("\n")}(t,e);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n})).join("")},t.i=function(e,n,r){"string"==typeof e&&(e=[[null,e,""]]);var i={};if(r)for(var o=0;o<this.length;o++){var a=this[o][0];null!=a&&(i[a]=!0)}for(var s=0;s<e.length;s++){var u=[].concat(e[s]);r&&i[u[0]]||(n&&(u[2]?u[2]="".concat(n," and ").concat(u[2]):u[2]=n),t.push(u))}},t}},function(e,t,n){var r=n(25),i=n(99);r({target:"Object",stat:!0,forced:Object.assign!==i},{assign:i})},function(e,t,n){"use strict";var r,i,o,a,s=n(25),u=n(29),l=n(5),c=n(30),d=n(115),f=n(27),h=n(80),p=n(35),_=n(117),E=n(17),m=n(47),g=n(61),v=n(26),y=n(56),T=n(118),C=n(120),S=n(121),b=n(85).set,R=n(122),I=n(123),A=n(124),N=n(89),O=n(125),w=n(28),L=n(79),P=n(6),M=n(126),U=P("species"),D="Promise",k=w.get,F=w.set,x=w.getterFor(D),H=d,G=l.TypeError,V=l.document,B=l.process,j=c("fetch"),z=N.f,Y=z,W="process"==v(B),Q=!!(V&&V.createEvent&&l.dispatchEvent),J=L(D,(function(){if(!(y(H)!==String(H))){if(66===M)return!0;if(!W&&"function"!=typeof PromiseRejectionEvent)return!0}if(u&&!H.prototype.finally)return!0;if(M>=51&&/native code/.test(H))return!1;var e=H.resolve(1),t=function(e){e((function(){}),(function(){}))};return(e.constructor={})[U]=t,!(e.then((function(){}))instanceof t)})),K=J||!C((function(e){H.all(e).catch((function(){}))})),q=function(e){var t;return!(!E(e)||"function"!=typeof(t=e.then))&&t},X=function(e,t,n){if(!t.notified){t.notified=!0;var r=t.reactions;R((function(){for(var i=t.value,o=1==t.state,a=0;r.length>a;){var s,u,l,c=r[a++],d=o?c.ok:c.fail,f=c.resolve,h=c.reject,p=c.domain;try{d?(o||(2===t.rejection&&te(e,t),t.rejection=1),!0===d?s=i:(p&&p.enter(),s=d(i),p&&(p.exit(),l=!0)),s===c.promise?h(G("Promise-chain cycle")):(u=q(s))?u.call(s,f,h):f(s)):h(i)}catch(e){p&&!l&&p.exit(),h(e)}}t.reactions=[],t.notified=!1,n&&!t.rejection&&$(e,t)}))}},Z=function(e,t,n){var r,i;Q?((r=V.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),l.dispatchEvent(r)):r={promise:t,reason:n},(i=l["on"+e])?i(r):"unhandledrejection"===e&&A("Unhandled promise rejection",n)},$=function(e,t){b.call(l,(function(){var n,r=t.value;if(ee(t)&&(n=O((function(){W?B.emit("unhandledRejection",r,e):Z("unhandledrejection",e,r)})),t.rejection=W||ee(t)?2:1,n.error))throw n.value}))},ee=function(e){return 1!==e.rejection&&!e.parent},te=function(e,t){b.call(l,(function(){W?B.emit("rejectionHandled",e):Z("rejectionhandled",e,t.value)}))},ne=function(e,t,n,r){return function(i){e(t,n,i,r)}},re=function(e,t,n,r){t.done||(t.done=!0,r&&(t=r),t.value=n,t.state=2,X(e,t,!0))},ie=function(e,t,n,r){if(!t.done){t.done=!0,r&&(t=r);try{if(e===n)throw G("Promise can't be resolved itself");var i=q(n);i?R((function(){var r={done:!1};try{i.call(n,ne(ie,e,r,t),ne(re,e,r,t))}catch(n){re(e,r,n,t)}})):(t.value=n,t.state=1,X(e,t,!1))}catch(n){re(e,{done:!1},n,t)}}};J&&(H=function(e){g(this,H,D),m(e),r.call(this);var t=k(this);try{e(ne(ie,this,t),ne(re,this,t))}catch(e){re(this,t,e)}},(r=function(e){F(this,{type:D,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=h(H.prototype,{then:function(e,t){var n=x(this),r=z(S(this,H));return r.ok="function"!=typeof e||e,r.fail="function"==typeof t&&t,r.domain=W?B.domain:void 0,n.parent=!0,n.reactions.push(r),0!=n.state&&X(this,n,!1),r.promise},catch:function(e){return this.then(void 0,e)}}),i=function(){var e=new r,t=k(e);this.promise=e,this.resolve=ne(ie,e,t),this.reject=ne(re,e,t)},N.f=z=function(e){return e===H||e===o?new i(e):Y(e)},u||"function"!=typeof d||(a=d.prototype.then,f(d.prototype,"then",(function(e,t){var n=this;return new H((function(e,t){a.call(n,e,t)})).then(e,t)}),{unsafe:!0}),"function"==typeof j&&s({global:!0,enumerable:!0,forced:!0},{fetch:function(e){return I(H,j.apply(l,arguments))}}))),s({global:!0,wrap:!0,forced:J},{Promise:H}),p(H,D,!1,!0),_(D),o=c(D),s({target:D,stat:!0,forced:J},{reject:function(e){var t=z(this);return t.reject.call(void 0,e),t.promise}}),s({target:D,stat:!0,forced:u||J},{resolve:function(e){return I(u&&this===o?H:this,e)}}),s({target:D,stat:!0,forced:K},{all:function(e){var t=this,n=z(t),r=n.resolve,i=n.reject,o=O((function(){var n=m(t.resolve),o=[],a=0,s=1;T(e,(function(e){var u=a++,l=!1;o.push(void 0),s++,n.call(t,e).then((function(e){l||(l=!0,o[u]=e,--s||r(o))}),i)})),--s||r(o)}));return o.error&&i(o.value),n.promise},race:function(e){var t=this,n=z(t),r=n.reject,i=O((function(){var i=m(t.resolve);T(e,(function(e){i.call(t,e).then(n.resolve,r)}))}));return i.error&&r(i.value),n.promise}})},function(e,t,n){"use strict";var r={}.propertyIsEnumerable,i=Object.getOwnPropertyDescriptor,o=i&&!r.call({1:2},1);t.f=o?function(e){var t=i(this,e);return!!t&&t.enumerable}:r},function(e,t,n){var r=n(16),i=n(26),o="".split;e.exports=r((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==i(e)?o.call(e,""):Object(e)}:Object},function(e,t,n){var r=n(19),i=n(16),o=n(54);e.exports=!r&&!i((function(){return 7!=Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},function(e,t,n){var r=n(5),i=n(55),o=r["__core-js_shared__"]||i("__core-js_shared__",{});e.exports=o},function(e,t,n){var r=n(29),i=n(74);(e.exports=function(e,t){return i[e]||(i[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.6.5",mode:r?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++n+r).toString(36)}},function(e,t,n){var r=n(12),i=n(44),o=n(113).indexOf,a=n(58);e.exports=function(e,t){var n,s=i(e),u=0,l=[];for(n in s)!r(a,n)&&r(s,n)&&l.push(n);for(;t.length>u;)r(s,n=t[u++])&&(~o(l,n)||l.push(n));return l}},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,n){var r=n(16),i=/#|\.prototype\./,o=function(e,t){var n=s[a(e)];return n==l||n!=u&&("function"==typeof t?r(t):!!t)},a=o.normalize=function(e){return String(e).replace(i,".").toLowerCase()},s=o.data={},u=o.NATIVE="N",l=o.POLYFILL="P";e.exports=o},function(e,t,n){var r=n(27);e.exports=function(e,t,n){for(var i in t)r(e,i,t[i],n);return e}},function(e,t,n){var r=n(16);e.exports=!!Object.getOwnPropertySymbols&&!r((function(){return!String(Symbol())}))},function(e,t,n){var r=n(6),i=n(36),o=r("iterator"),a=Array.prototype;e.exports=function(e){return void 0!==e&&(i.Array===e||a[o]===e)}},function(e,t,n){var r=n(119),i=n(26),o=n(6)("toStringTag"),a="Arguments"==i(function(){return arguments}());e.exports=r?i:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),o))?n:a?i(t):"Object"==(r=i(t))&&"function"==typeof t.callee?"Arguments":r}},function(e,t,n){var r=n(13);e.exports=function(e,t,n,i){try{return i?t(r(n)[0],n[1]):t(n)}catch(t){var o=e.return;throw void 0!==o&&r(o.call(e)),t}}},function(e,t,n){var r,i,o,a=n(5),s=n(16),u=n(26),l=n(48),c=n(86),d=n(54),f=n(87),h=a.location,p=a.setImmediate,_=a.clearImmediate,E=a.process,m=a.MessageChannel,g=a.Dispatch,v=0,y={},T=function(e){if(y.hasOwnProperty(e)){var t=y[e];delete y[e],t()}},C=function(e){return function(){T(e)}},S=function(e){T(e.data)},b=function(e){a.postMessage(e+"",h.protocol+"//"+h.host)};p&&_||(p=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return y[++v]=function(){("function"==typeof e?e:Function(e)).apply(void 0,t)},r(v),v},_=function(e){delete y[e]},"process"==u(E)?r=function(e){E.nextTick(C(e))}:g&&g.now?r=function(e){g.now(C(e))}:m&&!f?(o=(i=new m).port2,i.port1.onmessage=S,r=l(o.postMessage,o,1)):!a.addEventListener||"function"!=typeof postMessage||a.importScripts||s(b)||"file:"===h.protocol?r="onreadystatechange"in d("script")?function(e){c.appendChild(d("script")).onreadystatechange=function(){c.removeChild(this),T(e)}}:function(e){setTimeout(C(e),0)}:(r=b,a.addEventListener("message",S,!1))),e.exports={set:p,clear:_}},function(e,t,n){var r=n(30);e.exports=r("document","documentElement")},function(e,t,n){var r=n(88);e.exports=/(iphone|ipod|ipad).*applewebkit/i.test(r)},function(e,t,n){var r=n(30);e.exports=r("navigator","userAgent")||""},function(e,t,n){"use strict";var r=n(47),i=function(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=r})),this.resolve=r(t),this.reject=r(n)};e.exports.f=function(e){return new i(e)}},function(e,t,n){"use strict";var r=n(44),i=n(128),o=n(36),a=n(28),s=n(93),u=a.set,l=a.getterFor("Array Iterator");e.exports=s(Array,"Array",(function(e,t){u(this,{type:"Array Iterator",target:r(e),index:0,kind:t})}),(function(){var e=l(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:t[r],done:!1}:{value:[r,t[r]],done:!1}}),"values"),o.Arguments=o.Array,i("keys"),i("values"),i("entries")},function(e,t,n){var r=n(19),i=n(21),o=n(13),a=n(92);e.exports=r?Object.defineProperties:function(e,t){o(e);for(var n,r=a(t),s=r.length,u=0;s>u;)i.f(e,n=r[u++],t[n]);return e}},function(e,t,n){var r=n(77),i=n(60);e.exports=Object.keys||function(e){return r(e,i)}},function(e,t,n){"use strict";var r=n(25),i=n(94),o=n(96),a=n(130),s=n(35),u=n(20),l=n(27),c=n(6),d=n(29),f=n(36),h=n(95),p=h.IteratorPrototype,_=h.BUGGY_SAFARI_ITERATORS,E=c("iterator"),m=function(){return this};e.exports=function(e,t,n,c,h,g,v){i(n,t,c);var y,T,C,S=function(e){if(e===h&&N)return N;if(!_&&e in I)return I[e];switch(e){case"keys":case"values":case"entries":return function(){return new n(this,e)}}return function(){return new n(this)}},b=t+" Iterator",R=!1,I=e.prototype,A=I[E]||I["@@iterator"]||h&&I[h],N=!_&&A||S(h),O="Array"==t&&I.entries||A;if(O&&(y=o(O.call(new e)),p!==Object.prototype&&y.next&&(d||o(y)===p||(a?a(y,p):"function"!=typeof y[E]&&u(y,E,m)),s(y,b,!0,!0),d&&(f[b]=m))),"values"==h&&A&&"values"!==A.name&&(R=!0,N=function(){return A.call(this)}),d&&!v||I[E]===N||u(I,E,N),f[t]=N,h)if(T={values:S("values"),keys:g?N:S("keys"),entries:S("entries")},v)for(C in T)(_||R||!(C in I))&&l(I,C,T[C]);else r({target:t,proto:!0,forced:_||R},T);return T}},function(e,t,n){"use strict";var r=n(95).IteratorPrototype,i=n(62),o=n(34),a=n(35),s=n(36),u=function(){return this};e.exports=function(e,t,n){var l=t+" Iterator";return e.prototype=i(r,{next:o(1,n)}),a(e,l,!1,!0),s[l]=u,e}},function(e,t,n){"use strict";var r,i,o,a=n(96),s=n(20),u=n(12),l=n(6),c=n(29),d=l("iterator"),f=!1;[].keys&&("next"in(o=[].keys())?(i=a(a(o)))!==Object.prototype&&(r=i):f=!0),null==r&&(r={}),c||u(r,d)||s(r,d,(function(){return this})),e.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:f}},function(e,t,n){var r=n(12),i=n(63),o=n(57),a=n(129),s=o("IE_PROTO"),u=Object.prototype;e.exports=a?Object.getPrototypeOf:function(e){return e=i(e),r(e,s)?e[s]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?u:null}},function(e,t,n){var r=n(59),i=n(45),o=function(e){return function(t,n){var o,a,s=String(i(t)),u=r(n),l=s.length;return u<0||u>=l?e?"":void 0:(o=s.charCodeAt(u))<55296||o>56319||u+1===l||(a=s.charCodeAt(u+1))<56320||a>57343?e?s.charAt(u):o:e?s.slice(u,u+2):a-56320+(o-55296<<10)+65536}};e.exports={codeAt:o(!1),charAt:o(!0)}},function(e,t,n){var r=n(16),i=n(6),o=n(29),a=i("iterator");e.exports=!r((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,n="";return e.pathname="c%20d",t.forEach((function(e,r){t.delete("b"),n+=r+e})),o&&!e.toJSON||!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[a]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==n||"x"!==new URL("http://x",void 0).host}))},function(e,t,n){"use strict";var r=n(19),i=n(16),o=n(92),a=n(78),s=n(71),u=n(63),l=n(72),c=Object.assign,d=Object.defineProperty;e.exports=!c||i((function(){if(r&&1!==c({b:1},c(d({},"a",{enumerable:!0,get:function(){d(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol();return e[n]=7,"abcdefghijklmnopqrst".split("").forEach((function(e){t[e]=e})),7!=c({},e)[n]||"abcdefghijklmnopqrst"!=o(c({},t)).join("")}))?function(e,t){for(var n=u(e),i=arguments.length,c=1,d=a.f,f=s.f;i>c;)for(var h,p=l(arguments[c++]),_=d?o(p).concat(d(p)):o(p),E=_.length,m=0;E>m;)h=_[m++],r&&!f.call(p,h)||(n[h]=p[h]);return n}:c},function(e,t){var n,r,i=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(e){n=o}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var u,l=[],c=!1,d=-1;function f(){c&&u&&(c=!1,u.length?l=u.concat(l):d=-1,l.length&&h())}function h(){if(!c){var e=s(f);c=!0;for(var t=l.length;t;){for(u=l,l=[];++d<t;)u&&u[d].run();d=-1,t=l.length}u=null,c=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function _(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];l.push(new p(e,t)),1!==l.length||c||s(h)},p.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=_,i.addListener=_,i.once=_,i.off=_,i.removeListener=_,i.removeAllListeners=_,i.emit=_,i.prependListener=_,i.prependOnceListener=_,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2);var i=function(){function e(){this.listeners=new Map}return e.prototype.addListener=function(e,t){this.listeners.has(e)||this.listeners.set(e,[]),this.listeners.get(e).push(t)},e.prototype.on=function(e,t){this.addListener(e,t)},e.prototype.removeListener=function(e,t){var n,r=this.listeners.get(e);return!!(r&&r.length&&(n=r.reduce((function(e,n,r){return"function"==typeof n&&n===t?r:e}),-1))>-1)&&(r.splice(n,1),this.listeners.set(e,r),!0)},e.prototype.off=function(e,t){this.removeListener(e,t)},e.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var i=this.listeners.get(e);return!(!i||!i.length)&&(i.forEach((function(e){e.apply(void 0,r.__spread(t))})),!0)},e}();t.default=new i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=n(4),o=n(7),a=n(18),s=n(103),u=n(65),l=n(191),c=n(40),d=n(9),f=n(15),h=n(38),p=n(32),_=n(22),E=n(23),m=n(50);function g(e){return{type:a.ChannelTypes.SELECT_CHANNEL,data:e}}function v(e,t){var n=this;return function(s,u){return r.__awaiter(n,void 0,void 0,(function(){var n,l,c,d,f,E,g;return r.__generator(this,(function(v){switch(v.label){case 0:return v.trys.push([0,2,,3]),[4,i.Client4.createChannel(e)];case 1:return n=v.sent(),[3,3];case 2:return l=v.sent(),_.forceLogoutIfNecessary(l,s,u),s(h.batchActions([{type:a.ChannelTypes.CREATE_CHANNEL_FAILURE,error:l},p.logError(l)])),[2,{error:l}];case 3:return c={channel_id:n.id,user_id:t,roles:o.General.CHANNEL_USER_ROLE+" "+o.General.CHANNEL_ADMIN_ROLE,last_viewed_at:0,msg_count:0,mention_count:0,notify_props:{desktop:"default",mark_unread:"all"},last_update_at:n.create_at},d=[],f=u().entities.channels,E=f.channels,g=f.myMembers,E[n.id]||d.push({type:a.ChannelTypes.RECEIVED_CHANNEL,data:n}),g[n.id]||(d.push({type:a.ChannelTypes.RECEIVED_MY_CHANNEL_MEMBER,data:c}),s(m.loadRolesIfNeeded(c.roles.split(" ")))),s(h.batchActions(r.__spread(d,[{type:a.ChannelTypes.CREATE_CHANNEL_SUCCESS}]))),[2,{data:n}]}}))}))}}function y(e,t){var n=this;return function(u,l){return r.__awaiter(n,void 0,void 0,(function(){var n,c,d,f;return r.__generator(this,(function(r){switch(r.label){case 0:u({type:a.ChannelTypes.CREATE_CHANNEL_REQUEST,data:null}),r.label=1;case 1:return r.trys.push([1,3,,4]),[4,i.Client4.createDirectChannel([e,t])];case 2:return n=r.sent(),[3,4];case 3:return c=r.sent(),_.forceLogoutIfNecessary(c,u,l),u(h.batchActions([{type:a.ChannelTypes.CREATE_CHANNEL_FAILURE,error:c},p.logError(c)])),[2,{error:c}];case 4:return d={channel_id:n.id,user_id:e,roles:""+o.General.CHANNEL_USER_ROLE,last_viewed_at:0,msg_count:0,mention_count:0,notify_props:{desktop:"default",mark_unread:"all"},last_update_at:n.create_at},f=[{user_id:e,category:o.Preferences.CATEGORY_DIRECT_CHANNEL_SHOW,name:t,value:"true"},{user_id:e,category:o.Preferences.CATEGORY_CHANNEL_OPEN_TIME,name:n.id,value:(new Date).getTime().toString()}],s.savePreferences(e,f)(u),u(h.batchActions([{type:a.ChannelTypes.RECEIVED_CHANNEL,data:n},{type:a.ChannelTypes.RECEIVED_MY_CHANNEL_MEMBER,data:d},{type:a.PreferenceTypes.RECEIVED_PREFERENCES,data:f},{type:a.ChannelTypes.CREATE_CHANNEL_SUCCESS},{type:a.UserTypes.RECEIVED_PROFILES_LIST_IN_CHANNEL,id:n.id,data:[{id:e},{id:t}]}])),u(m.loadRolesIfNeeded(d.roles.split(" "))),[2,{data:n}]}}))}))}}function T(e){var t=this;return function(n,i){return r.__awaiter(t,void 0,void 0,(function(){var t,a;return r.__generator(this,(function(r){return t=i().entities.users.currentUserId,a=[{user_id:t,category:o.Preferences.CATEGORY_GROUP_CHANNEL_SHOW,name:e,value:"true"},{user_id:t,category:o.Preferences.CATEGORY_CHANNEL_OPEN_TIME,name:e,value:(new Date).getTime().toString()}],[2,n(s.savePreferences(t,a))]}))}))}}function C(e,t){var n=this;return function(o,s){return r.__awaiter(n,void 0,void 0,(function(){var n,u;return r.__generator(this,(function(r){switch(r.label){case 0:o({type:a.ChannelTypes.UPDATE_CHANNEL_REQUEST,data:null}),r.label=1;case 1:return r.trys.push([1,3,,4]),[4,i.Client4.patchChannel(e,t)];case 2:return n=r.sent(),[3,4];case 3:return u=r.sent(),_.forceLogoutIfNecessary(u,o,s),o(h.batchActions([{type:a.ChannelTypes.UPDATE_CHANNEL_FAILURE,error:u},p.logError(u)])),[2,{error:u}];case 4:return o(h.batchActions([{type:a.ChannelTypes.RECEIVED_CHANNEL,data:n},{type:a.ChannelTypes.UPDATE_CHANNEL_SUCCESS}])),[2,{data:n}]}}))}))}}function S(e){var t=this;return function(n,o){return r.__awaiter(t,void 0,void 0,(function(){var t,s;return r.__generator(this,(function(r){switch(r.label){case 0:n({type:a.ChannelTypes.UPDATE_CHANNEL_REQUEST,data:null}),r.label=1;case 1:return r.trys.push([1,3,,4]),[4,i.Client4.updateChannel(e)];case 2:return t=r.sent(),[3,4];case 3:return s=r.sent(),_.forceLogoutIfNecessary(s,n,o),n(h.batchActions([{type:a.ChannelTypes.UPDATE_CHANNEL_FAILURE,error:s},p.logError(s)])),[2,{error:s}];case 4:return n(h.batchActions([{type:a.ChannelTypes.RECEIVED_CHANNEL,data:t},{type:a.ChannelTypes.UPDATE_CHANNEL_SUCCESS}])),[2,{data:t}]}}))}))}}function b(e,t,n){var o=this;return function(s,u){return r.__awaiter(o,void 0,void 0,(function(){var o,l,c,d;return r.__generator(this,(function(f){switch(f.label){case 0:o=r.__assign({user_id:e,channel_id:t},n),f.label=1;case 1:return f.trys.push([1,3,,4]),[4,i.Client4.updateChannelNotifyProps(o)];case 2:return f.sent(),[3,4];case 3:return l=f.sent(),_.forceLogoutIfNecessary(l,s,u),s(p.logError(l)),[2,{error:l}];case 4:return c=u().entities.channels.myMembers[t]||{},d=c.notify_props||{},s({type:a.ChannelTypes.RECEIVED_CHANNEL_PROPS,data:{channel_id:t,notifyProps:r.__assign(r.__assign({},d),o)}}),[2,{data:!0}]}}))}))}}function R(e){var t=this;return function(n,o){return r.__awaiter(t,void 0,void 0,(function(){var t,s;return r.__generator(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,i.Client4.getChannel(e)];case 1:return t=r.sent(),[3,3];case 2:return s=r.sent(),_.forceLogoutIfNecessary(s,n,o),n(h.batchActions([{type:a.ChannelTypes.CHANNELS_FAILURE,error:s},p.logError(s)])),[2,{error:s}];case 3:return n({type:a.ChannelTypes.RECEIVED_CHANNEL,data:t}),[2,{data:t}]}}))}))}}function I(e){var t=this;return function(n,o){return r.__awaiter(t,void 0,void 0,(function(){var t,a;return r.__generator(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,i.Client4.getChannelTimezones(e)];case 1:return t=r.sent(),[3,3];case 2:return a=r.sent(),_.forceLogoutIfNecessary(a,n,o),n(p.logError(a)),[2,{error:a}];case 3:return[2,{data:t}]}}))}))}}function A(e){var t=this;return function(n,o){return r.__awaiter(t,void 0,void 0,(function(){var t,s,l,c,E,g,v,y,T,C,S,b,R,I,A,N,O,w,L,P;return r.__generator(this,(function(M){switch(M.label){case 0:n({type:a.ChannelTypes.CHANNELS_REQUEST,data:null}),l=o(),c=f.isMinimumServerVersion(d.getServerVersion(l),5,21),M.label=1;case 1:return M.trys.push([1,4,,5]),E=i.Client4.getMyChannels(e,c),g=i.Client4.getMyChannelMembers(e),[4,E];case 2:return t=M.sent(),[4,g];case 3:return s=M.sent(),[3,5];case 4:return v=M.sent(),_.forceLogoutIfNecessary(v,n,o),n(h.batchActions([{type:a.ChannelTypes.CHANNELS_FAILURE,error:v},p.logError(v)])),[2,{error:v}];case 5:y=l.entities.users.currentUserId,T=l.entities.channels.currentChannelId,n(h.batchActions([{type:a.ChannelTypes.RECEIVED_CHANNELS,teamId:e,data:t,currentChannelId:T},{type:a.ChannelTypes.CHANNELS_SUCCESS},{type:a.ChannelTypes.RECEIVED_MY_CHANNEL_MEMBERS,data:s,sync:!c,channels:t,remove:u.getChannelsIdForTeam(l,e),currentUserId:y,currentChannelId:T}])),C=new Set;try{for(S=r.__values(s),b=S.next();!b.done;b=S.next()){R=b.value;try{for(L=void 0,I=r.__values(R.roles.split(" ")),A=I.next();!A.done;A=I.next())N=A.value,C.add(N)}catch(e){L={error:e}}finally{try{A&&!A.done&&(P=I.return)&&P.call(I)}finally{if(L)throw L.error}}}}catch(e){O={error:e}}finally{try{b&&!b.done&&(w=S.return)&&w.call(S)}finally{if(O)throw O.error}}return C.size>0&&n(m.loadRolesIfNeeded(C)),[2,{data:{channels:t,members:s}}]}}))}))}}function N(e){var t=this;return function(n,o){return r.__awaiter(t,void 0,void 0,(function(){var t,s,l,c,d,f,h,E,g,v,y,T,C,S,b,R;return r.__generator(this,(function(I){switch(I.label){case 0:return I.trys.push([0,2,,3]),[4,i.Client4.getMyChannelMembers(e)];case 1:return t=I.sent(),[3,3];case 2:return s=I.sent(),_.forceLogoutIfNecessary(s,n,o),n(p.logError(s)),[2,{error:s}];case 3:l=o(),c=l.entities.users.currentUserId,d=l.entities.channels.currentChannelId,n({type:a.ChannelTypes.RECEIVED_MY_CHANNEL_MEMBERS,data:t,remove:u.getChannelsIdForTeam(o(),e),currentUserId:c,currentChannelId:d}),f=new Set;try{for(h=r.__values(t),E=h.next();!E.done;E=h.next()){g=E.value;try{for(b=void 0,v=r.__values(g.roles.split(" ")),y=v.next();!y.done;y=v.next())T=y.value,f.add(T)}catch(e){b={error:e}}finally{try{y&&!y.done&&(R=v.return)&&R.call(v)}finally{if(b)throw b.error}}}}catch(e){C={error:e}}finally{try{E&&!E.done&&(S=h.return)&&S.call(h)}finally{if(C)throw C.error}}return f.size>0&&n(m.loadRolesIfNeeded(f)),[2,{data:t}]}}))}))}}function O(e){var t=this;return function(n,o){return r.__awaiter(t,void 0,void 0,(function(){var t,s,u,l,c,d,f;return r.__generator(this,(function(r){return t=o(),s=t.entities.users.currentUserId,u=t.entities.channels,l=u.channels,c=u.myMembers,d=l[e],f=c[e],i.Client4.trackEvent("action","action_channels_leave",{channel_id:e}),n({type:a.ChannelTypes.LEAVE_CHANNEL,data:{id:e,user_id:s,team_id:d.team_id,type:d.type},meta:{offline:{effect:function(){return i.Client4.removeFromChannel(s,e)},commit:{type:"do_nothing"},rollback:function(){n(h.batchActions([{type:a.ChannelTypes.RECEIVED_CHANNEL,data:d},{type:a.ChannelTypes.RECEIVED_MY_CHANNEL_MEMBER,data:f}]))}}}}),[2,{data:!0}]}))}))}}function w(e,t,n,s){var u=this;return function(l,c){return r.__awaiter(u,void 0,void 0,(function(){var u,d,f;return r.__generator(this,(function(r){switch(r.label){case 0:return r.trys.push([0,9,,10]),n?[4,i.Client4.addToChannel(e,n)]:[3,3];case 1:return u=r.sent(),[4,i.Client4.getChannel(n)];case 2:return d=r.sent(),[3,8];case 3:return s?[4,i.Client4.getChannelByName(t,s,!0)]:[3,8];case 4:return(d=r.sent()).type!==o.General.GM_CHANNEL&&d.type!==o.General.DM_CHANNEL?[3,6]:[4,i.Client4.getChannelMember(d.id,e)];case 5:return u=r.sent(),[3,8];case 6:return[4,i.Client4.addToChannel(e,d.id)];case 7:u=r.sent(),r.label=8;case 8:return[3,10];case 9:return f=r.sent(),_.forceLogoutIfNecessary(f,l,c),l(p.logError(f)),[2,{error:f}];case 10:return i.Client4.trackEvent("action","action_channels_join",{channel_id:n}),l(h.batchActions([{type:a.ChannelTypes.RECEIVED_CHANNEL,data:d},{type:a.ChannelTypes.RECEIVED_MY_CHANNEL_MEMBER,data:u}])),u&&l(m.loadRolesIfNeeded(u.roles.split(" "))),[2,{data:{channel:d,member:u}}]}}))}))}}function L(e){var t=this;return function(n,o){return r.__awaiter(t,void 0,void 0,(function(){var t,s,d,f,h,E,m;return r.__generator(this,(function(r){switch(r.label){case 0:t=o(),s="true"===t.entities.general.config.ExperimentalViewArchivedChannels,r.label=1;case 1:return r.trys.push([1,3,,4]),[4,i.Client4.deleteChannel(e)];case 2:return r.sent(),[3,4];case 3:return d=r.sent(),_.forceLogoutIfNecessary(d,n,o),n(p.logError(d)),[2,{error:d}];case 4:return t=o(),f=t.entities.channels.currentChannelId,e!==f||s||(h=c.getCurrentTeamId(t),E=l.getChannelsNameMapInTeam(t,h),(m=u.getChannelByName(E,l.getRedirectChannelNameForTeam(t,h)))&&m.id&&n({type:a.ChannelTypes.SELECT_CHANNEL,data:m.id})),n({type:a.ChannelTypes.DELETE_CHANNEL_SUCCESS,data:{id:e,viewArchivedChannels:s}}),[2,{data:!0}]}}))}))}}function P(e){var t=this;return function(n,o){return r.__awaiter(t,void 0,void 0,(function(){var t,s,u,l;return r.__generator(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,i.Client4.unarchiveChannel(e)];case 1:return r.sent(),[3,3];case 2:return t=r.sent(),_.forceLogoutIfNecessary(t,n,o),n(p.logError(t)),[2,{error:t}];case 3:return s=o(),u=d.getConfig(s),l="true"===u.ExperimentalViewArchivedChannels,n({type:a.ChannelTypes.UNARCHIVED_CHANNEL_SUCCESS,data:{id:e,viewArchivedChannels:l}}),[2,{data:!0}]}}))}))}}function M(e,t){var n=this;return void 0===t&&(t=""),function(u,c){return r.__awaiter(n,void 0,void 0,(function(){var n,d,f,E,g,v,y,T,C,S,b;return r.__generator(this,(function(R){switch(R.label){case 0:n=c().entities.users.currentUserId,d=c().entities.preferences.myPreferences,f=d[o.Preferences.CATEGORY_CHANNEL_APPROXIMATE_VIEW_TIME+"--"+e],E=f?parseInt(f.value,10):0,g=l.isManuallyUnread(c(),t),E<(new Date).getTime()-108e5&&(v=[{user_id:n,category:o.Preferences.CATEGORY_CHANNEL_APPROXIMATE_VIEW_TIME,name:e,value:(new Date).getTime().toString()}],s.savePreferences(n,v)(u)),R.label=1;case 1:return R.trys.push([1,3,,4]),[4,i.Client4.viewMyChannel(e,g?"":t)];case 2:return R.sent(),[3,4];case 3:return y=R.sent(),_.forceLogoutIfNecessary(y,u,c),u(p.logError(y)),[2,{error:y}];case 4:return T=[],C=c().entities.channels.myMembers,(S=C[e])&&(l.isManuallyUnread(c(),e)&&T.push({type:a.ChannelTypes.REMOVE_MANUALLY_UNREAD,data:{channelId:e}}),T.push({type:a.ChannelTypes.RECEIVED_MY_CHANNEL_MEMBER,data:r.__assign(r.__assign({},S),{last_viewed_at:(new Date).getTime()})}),u(m.loadRolesIfNeeded(S.roles.split(" ")))),b=C[t],!g&&b&&(T.push({type:a.ChannelTypes.RECEIVED_MY_CHANNEL_MEMBER,data:r.__assign(r.__assign({},b),{last_viewed_at:(new Date).getTime()})}),u(m.loadRolesIfNeeded(b.roles.split(" ")))),u(h.batchActions(T)),[2,{data:!0}]}}))}))}}function U(e,t){return void 0===t&&(t=""),function(n,i){var o=[],s=i().entities.channels.myMembers,u=s[e],c=i();u&&(o.push({type:a.ChannelTypes.RECEIVED_MY_CHANNEL_MEMBER,data:r.__assign(r.__assign({},u),{last_viewed_at:Date.now()})}),l.isManuallyUnread(c,e)&&o.push({type:a.ChannelTypes.REMOVE_MANUALLY_UNREAD,data:{channelId:e}}),n(m.loadRolesIfNeeded(u.roles.split(" "))));var d=s[t];return d&&!l.isManuallyUnread(i(),t)&&(o.push({type:a.ChannelTypes.RECEIVED_MY_CHANNEL_MEMBER,data:r.__assign(r.__assign({},d),{last_viewed_at:Date.now()})}),n(m.loadRolesIfNeeded(d.roles.split(" ")))),o.length&&n(h.batchActions(o)),{data:!0}}}function D(e,t,n){var s=this;return void 0===t&&(t=0),void 0===n&&(n=o.General.CHANNELS_CHUNK_SIZE),function(o,u){return r.__awaiter(s,void 0,void 0,(function(){var s,l;return r.__generator(this,(function(r){switch(r.label){case 0:o({type:a.ChannelTypes.GET_CHANNELS_REQUEST,data:null}),r.label=1;case 1:return r.trys.push([1,3,,4]),[4,i.Client4.getChannels(e,t,n)];case 2:return s=r.sent(),[3,4];case 3:return l=r.sent(),_.forceLogoutIfNecessary(l,o,u),o(h.batchActions([{type:a.ChannelTypes.GET_CHANNELS_FAILURE,error:l},p.logError(l)])),[2,{error:l}];case 4:return o(h.batchActions([{type:a.ChannelTypes.RECEIVED_CHANNELS,teamId:e,data:s},{type:a.ChannelTypes.GET_CHANNELS_SUCCESS}])),[2,{data:s}]}}))}))}}function k(e,t){var n=this;return function(o,s){return r.__awaiter(n,void 0,void 0,(function(){var n,u;return r.__generator(this,(function(r){switch(r.label){case 0:o({type:a.ChannelTypes.GET_CHANNELS_REQUEST,data:null}),r.label=1;case 1:return r.trys.push([1,3,,4]),[4,i.Client4.autocompleteChannels(e,t)];case 2:return n=r.sent(),[3,4];case 3:return u=r.sent(),_.forceLogoutIfNecessary(u,o,s),o(h.batchActions([{type:a.ChannelTypes.GET_CHANNELS_FAILURE,error:u},p.logError(u)])),[2,{error:u}];case 4:return o(h.batchActions([{type:a.ChannelTypes.RECEIVED_CHANNELS,teamId:e,data:n},{type:a.ChannelTypes.GET_CHANNELS_SUCCESS}])),[2,{data:n}]}}))}))}}function F(e,t){var n=this;return function(o,s){return r.__awaiter(n,void 0,void 0,(function(){var n,u;return r.__generator(this,(function(r){switch(r.label){case 0:o({type:a.ChannelTypes.GET_CHANNELS_REQUEST,data:null}),r.label=1;case 1:return r.trys.push([1,3,,4]),[4,i.Client4.autocompleteChannelsForSearch(e,t)];case 2:return n=r.sent(),[3,4];case 3:return u=r.sent(),_.forceLogoutIfNecessary(u,o,s),o(h.batchActions([{type:a.ChannelTypes.GET_CHANNELS_FAILURE,error:u},p.logError(u)])),[2,{error:u}];case 4:return o(h.batchActions([{type:a.ChannelTypes.RECEIVED_CHANNELS,teamId:e,data:n},{type:a.ChannelTypes.GET_CHANNELS_SUCCESS}])),[2,{data:n}]}}))}))}}function x(e,t,n){var o=this;return function(s,u){return r.__awaiter(o,void 0,void 0,(function(){var o,l;return r.__generator(this,(function(r){switch(r.label){case 0:s({type:a.ChannelTypes.GET_CHANNELS_REQUEST,data:null}),r.label=1;case 1:return r.trys.push([1,6,,7]),n?[4,i.Client4.searchArchivedChannels(e,t)]:[3,3];case 2:return o=r.sent(),[3,5];case 3:return[4,i.Client4.searchChannels(e,t)];case 4:o=r.sent(),r.label=5;case 5:return[3,7];case 6:return l=r.sent(),_.forceLogoutIfNecessary(l,s,u),s(h.batchActions([{type:a.ChannelTypes.GET_CHANNELS_FAILURE,error:l},p.logError(l)])),[2,{error:l}];case 7:return s(h.batchActions([{type:a.ChannelTypes.RECEIVED_CHANNELS,teamId:e,data:o},{type:a.ChannelTypes.GET_CHANNELS_SUCCESS}])),[2,{data:o}]}}))}))}}function H(e){return _.bindClientFunc({clientFunc:i.Client4.searchGroupChannels,params:[e]})}function G(e){var t=this;return function(n,o){return r.__awaiter(t,void 0,void 0,(function(){var t,s;return r.__generator(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,i.Client4.getChannelStats(e)];case 1:return t=r.sent(),[3,3];case 2:return s=r.sent(),_.forceLogoutIfNecessary(s,n,o),n(p.logError(s)),[2,{error:s}];case 3:return n({type:a.ChannelTypes.RECEIVED_CHANNEL_STATS,data:t}),[2,{data:t}]}}))}))}}function V(e,t,n){var o=this;return void 0===n&&(n=""),function(s,u){return r.__awaiter(o,void 0,void 0,(function(){var o,l;return r.__generator(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,i.Client4.addToChannel(t,e,n)];case 1:return o=r.sent(),[3,3];case 2:return l=r.sent(),_.forceLogoutIfNecessary(l,s,u),s(p.logError(l)),[2,{error:l}];case 3:return i.Client4.trackEvent("action","action_channels_add_member",{channel_id:e}),s(h.batchActions([{type:a.UserTypes.RECEIVED_PROFILE_IN_CHANNEL,data:{id:e,user_id:t}},{type:a.ChannelTypes.RECEIVED_CHANNEL_MEMBER,data:o},{type:a.ChannelTypes.ADD_CHANNEL_MEMBER_SUCCESS,id:e}],"ADD_CHANNEL_MEMBER.BATCH")),[2,{data:o}]}}))}))}}function B(e,t){var n=this;return function(o,s){return r.__awaiter(n,void 0,void 0,(function(){var n;return r.__generator(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,i.Client4.removeFromChannel(t,e)];case 1:return r.sent(),[3,3];case 2:return n=r.sent(),_.forceLogoutIfNecessary(n,o,s),o(p.logError(n)),[2,{error:n}];case 3:return i.Client4.trackEvent("action","action_channels_remove_member",{channel_id:e}),o(h.batchActions([{type:a.UserTypes.RECEIVED_PROFILE_NOT_IN_CHANNEL,data:{id:e,user_id:t}},{type:a.ChannelTypes.REMOVE_CHANNEL_MEMBER_SUCCESS,id:e}],"REMOVE_CHANNEL_MEMBER.BATCH")),[2,{data:!0}]}}))}))}}function j(e,t){var n=this;return function(o,s){return r.__awaiter(n,void 0,void 0,(function(){return r.__generator(this,(function(n){return i.Client4.trackEvent("action","action_channels_update_header",{channel_id:e}),o({type:a.ChannelTypes.UPDATE_CHANNEL_HEADER,data:{channelId:e,header:t}}),[2,{data:!0}]}))}))}}function z(e,t){var n=this;return function(o,s){return r.__awaiter(n,void 0,void 0,(function(){return r.__generator(this,(function(n){return i.Client4.trackEvent("action","action_channels_update_purpose",{channel_id:e}),o({type:a.ChannelTypes.UPDATE_CHANNEL_PURPOSE,data:{channelId:e,purpose:t}}),[2,{data:!0}]}))}))}}function Y(e,t,n){var o=this;return void 0===n&&(n=!0),function(s,u){return r.__awaiter(o,void 0,void 0,(function(){var o,c,d,f,E,m,g,v,y,T;return r.__generator(this,(function(r){return o=l.isManuallyUnread(u(),t),n&&i.Client4.viewMyChannel(e,o?"":t).then().catch((function(e){return _.forceLogoutIfNecessary(e,s,u),s(p.logError(e)),{error:e}})),c=u(),d=c.entities.channels,f=d.channels,E=d.myMembers,m=f[e],g=!o&&t?f[t]:null,v=E[e],y=!o&&t?E[t]:null,T=[],m&&v&&(T.push({type:a.ChannelTypes.DECREMENT_UNREAD_MSG_COUNT,data:{teamId:m.team_id,channelId:e,amount:m.total_msg_count-v.msg_count}}),T.push({type:a.ChannelTypes.DECREMENT_UNREAD_MENTION_COUNT,data:{teamId:m.team_id,channelId:e,amount:v.mention_count}})),m&&l.isManuallyUnread(u(),e)&&T.push({type:a.ChannelTypes.REMOVE_MANUALLY_UNREAD,data:{channelId:e}}),g&&y&&(T.push({type:a.ChannelTypes.DECREMENT_UNREAD_MSG_COUNT,data:{teamId:g.team_id,channelId:t,amount:g.total_msg_count-y.msg_count}}),T.push({type:a.ChannelTypes.DECREMENT_UNREAD_MENTION_COUNT,data:{teamId:g.team_id,channelId:t,amount:y.mention_count}})),T.length>0&&s(h.batchActions(T)),[2,{data:!0}]}))}))}}function W(e,t,n){var i=this;return function(s,u){return r.__awaiter(i,void 0,void 0,(function(){var i,l,c,d;return r.__generator(this,(function(r){return i=u(),l=i.entities.channels.myMembers,c=i.entities.users.currentUserId,d=[{type:a.ChannelTypes.INCREMENT_TOTAL_MSG_COUNT,data:{channelId:t,amount:1}},{type:a.ChannelTypes.INCREMENT_UNREAD_MSG_COUNT,data:{teamId:e,channelId:t,amount:1,onlyMentions:l[t]&&l[t].notify_props&&l[t].notify_props.mark_unread===o.General.MENTION}}],n&&-1!==n.indexOf(c)&&d.push({type:a.ChannelTypes.INCREMENT_UNREAD_MENTION_COUNT,data:{teamId:e,channelId:t,amount:1}}),s(h.batchActions(d)),[2,{data:!0}]}))}))}}function Q(e,t){return _.bindClientFunc({clientFunc:i.Client4.getChannelMembersByIds,onSuccess:a.ChannelTypes.RECEIVED_CHANNEL_MEMBERS,params:[e,t]})}function J(e){var t=this;return function(n,a){return r.__awaiter(t,void 0,void 0,(function(){var t,u;return r.__generator(this,(function(r){return t=a().entities.users.currentUserId,u={user_id:t,category:o.Preferences.CATEGORY_FAVORITE_CHANNEL,name:e,value:"true"},i.Client4.trackEvent("action","action_channels_favorite"),[2,s.savePreferences(t,[u])(n)]}))}))}}function K(e){var t=this;return function(n,a){return r.__awaiter(t,void 0,void 0,(function(){var t,u;return r.__generator(this,(function(r){return t=a().entities.users.currentUserId,u={user_id:t,category:o.Preferences.CATEGORY_FAVORITE_CHANNEL,name:e,value:""},i.Client4.trackEvent("action","action_channels_unfavorite"),[2,s.deletePreferences(t,[u])(n,a)]}))}))}}function q(e,t,n,r){return void 0===n&&(n=0),void 0===r&&(r=o.General.PROFILE_CHUNK_SIZE),_.bindClientFunc({clientFunc:i.Client4.channelMembersMinusGroupMembers,onSuccess:a.ChannelTypes.RECEIVED_CHANNEL_MEMBERS_MINUS_GROUP_MEMBERS,params:[e,t,n,r]})}function X(e){var t=this;return _.bindClientFunc({clientFunc:function(){return r.__awaiter(t,void 0,void 0,(function(){var t;return r.__generator(this,(function(n){switch(n.label){case 0:return[4,i.Client4.getChannelModerations(e)];case 1:return t=n.sent(),[2,{channelId:e,moderations:t}]}}))}))},onSuccess:a.ChannelTypes.RECEIVED_CHANNEL_MODERATIONS,params:[e]})}t.selectChannel=g,t.createChannel=v,t.createDirectChannel=y,t.markGroupChannelOpen=T,t.createGroupChannel=function(e){var t=this;return function(n,s){return r.__awaiter(t,void 0,void 0,(function(){var t,u,c,d,f,E,g;return r.__generator(this,(function(r){switch(r.label){case 0:n({type:a.ChannelTypes.CREATE_CHANNEL_REQUEST,data:null}),t=s().entities.users.currentUserId,r.label=1;case 1:return r.trys.push([1,3,,4]),[4,i.Client4.createGroupChannel(e)];case 2:return u=r.sent(),[3,4];case 3:return c=r.sent(),_.forceLogoutIfNecessary(c,n,s),n(h.batchActions([{type:a.ChannelTypes.CREATE_CHANNEL_FAILURE,error:c},p.logError(c)])),[2,{error:c}];case 4:if(d={channel_id:u.id,user_id:t,roles:""+o.General.CHANNEL_USER_ROLE,last_viewed_at:0,msg_count:0,mention_count:0,notify_props:{desktop:"default",mark_unread:"all"},last_update_at:u.create_at},!(u.total_msg_count>0))return[3,10];if(null!==(f=l.getMyChannelMember(s(),u.id)))return[3,9];r.label=5;case 5:return r.trys.push([5,7,,8]),[4,i.Client4.getMyChannelMember(u.id)];case 6:return d=r.sent(),[3,8];case 7:return E=r.sent(),n(p.logError(E)),[3,8];case 8:return[3,10];case 9:d=f,r.label=10;case 10:return n(T(u.id)),(g=e.map((function(e){return{id:e}}))).push({id:t}),n(h.batchActions([{type:a.ChannelTypes.RECEIVED_CHANNEL,data:u},{type:a.ChannelTypes.RECEIVED_MY_CHANNEL_MEMBER,data:d},{type:a.ChannelTypes.CREATE_CHANNEL_SUCCESS},{type:a.UserTypes.RECEIVED_PROFILES_LIST_IN_CHANNEL,id:u.id,data:g}])),n(m.loadRolesIfNeeded(d&&d.roles&&d.roles.split(" ")||[])),[2,{data:u}]}}))}))}},t.patchChannel=C,t.updateChannel=S,t.updateChannelPrivacy=function(e,t){var n=this;return function(o,s){return r.__awaiter(n,void 0,void 0,(function(){var n,u;return r.__generator(this,(function(r){switch(r.label){case 0:o({type:a.ChannelTypes.UPDATE_CHANNEL_REQUEST,data:null}),r.label=1;case 1:return r.trys.push([1,3,,4]),[4,i.Client4.updateChannelPrivacy(e,t)];case 2:return n=r.sent(),[3,4];case 3:return u=r.sent(),_.forceLogoutIfNecessary(u,o,s),o(h.batchActions([{type:a.ChannelTypes.UPDATE_CHANNEL_FAILURE,error:u},p.logError(u)])),[2,{error:u}];case 4:return o(h.batchActions([{type:a.ChannelTypes.RECEIVED_CHANNEL,data:n},{type:a.ChannelTypes.UPDATE_CHANNEL_SUCCESS}])),[2,{data:n}]}}))}))}},t.convertChannelToPrivate=function(e){var t=this;return function(n,o){return r.__awaiter(t,void 0,void 0,(function(){var t,s;return r.__generator(this,(function(r){switch(r.label){case 0:n({type:a.ChannelTypes.UPDATE_CHANNEL_REQUEST,data:null}),r.label=1;case 1:return r.trys.push([1,3,,4]),[4,i.Client4.convertChannelToPrivate(e)];case 2:return t=r.sent(),[3,4];case 3:return s=r.sent(),_.forceLogoutIfNecessary(s,n,o),n(h.batchActions([{type:a.ChannelTypes.UPDATE_CHANNEL_FAILURE,error:s},p.logError(s)])),[2,{error:s}];case 4:return n(h.batchActions([{type:a.ChannelTypes.RECEIVED_CHANNEL,data:t},{type:a.ChannelTypes.UPDATE_CHANNEL_SUCCESS}])),[2,{data:t}]}}))}))}},t.updateChannelNotifyProps=b,t.getChannelByNameAndTeamName=function(e,t,n){var o=this;return void 0===n&&(n=!1),function(s,u){return r.__awaiter(o,void 0,void 0,(function(){var o,l;return r.__generator(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,i.Client4.getChannelByNameAndTeamName(e,t,n)];case 1:return o=r.sent(),[3,3];case 2:return l=r.sent(),_.forceLogoutIfNecessary(l,s,u),s(h.batchActions([{type:a.ChannelTypes.CHANNELS_FAILURE,error:l},p.logError(l)])),[2,{error:l}];case 3:return s({type:a.ChannelTypes.RECEIVED_CHANNEL,data:o}),[2,{data:o}]}}))}))}},t.getChannel=R,t.getChannelAndMyMember=function(e){var t=this;return function(n,o){return r.__awaiter(t,void 0,void 0,(function(){var t,s,u,l,c;return r.__generator(this,(function(r){switch(r.label){case 0:return r.trys.push([0,3,,4]),u=i.Client4.getChannel(e),l=i.Client4.getMyChannelMember(e),[4,u];case 1:return t=r.sent(),[4,l];case 2:return s=r.sent(),[3,4];case 3:return c=r.sent(),_.forceLogoutIfNecessary(c,n,o),n(h.batchActions([{type:a.ChannelTypes.CHANNELS_FAILURE,error:c},p.logError(c)])),[2,{error:c}];case 4:return n(h.batchActions([{type:a.ChannelTypes.RECEIVED_CHANNEL,data:t},{type:a.ChannelTypes.RECEIVED_MY_CHANNEL_MEMBER,data:s}])),n(m.loadRolesIfNeeded(s.roles.split(" "))),[2,{data:{channel:t,member:s}}]}}))}))}},t.getChannelTimezones=I,t.fetchMyChannelsAndMembers=A,t.getMyChannelMembers=N,t.getChannelMembers=function(e,t,n){var s=this;return void 0===t&&(t=0),void 0===n&&(n=o.General.CHANNELS_CHUNK_SIZE),function(o,u){return r.__awaiter(s,void 0,void 0,(function(){var s,l,c;return r.__generator(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,i.Client4.getChannelMembers(e,t,n)];case 1:return s=r.sent(),[3,3];case 2:return l=r.sent(),_.forceLogoutIfNecessary(l,o,u),o(p.logError(l)),[2,{error:l}];case 3:return c=s.map((function(e){return e.user_id})),E.getMissingProfilesByIds(c)(o,u),o({type:a.ChannelTypes.RECEIVED_CHANNEL_MEMBERS,data:s}),[2,{data:s}]}}))}))}},t.leaveChannel=O,t.joinChannel=w,t.deleteChannel=L,t.unarchiveChannel=P,t.viewChannel=M,t.markChannelAsViewed=U,t.getChannels=D,t.getArchivedChannels=function(e,t,n){var s=this;return void 0===t&&(t=0),void 0===n&&(n=o.General.CHANNELS_CHUNK_SIZE),function(o,u){return r.__awaiter(s,void 0,void 0,(function(){var s,l;return r.__generator(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,i.Client4.getArchivedChannels(e,t,n)];case 1:return s=r.sent(),[3,3];case 2:return l=r.sent(),_.forceLogoutIfNecessary(l,o,u),[2,{error:l}];case 3:return o({type:a.ChannelTypes.RECEIVED_CHANNELS,teamId:e,data:s}),[2,{data:s}]}}))}))}},t.getAllChannelsWithCount=function(e,t,n,s){var u=this;return void 0===e&&(e=0),void 0===t&&(t=o.General.CHANNELS_CHUNK_SIZE),void 0===n&&(n=""),void 0===s&&(s=!1),function(o,l){return r.__awaiter(u,void 0,void 0,(function(){var u,c;return r.__generator(this,(function(r){switch(r.label){case 0:o({type:a.ChannelTypes.GET_ALL_CHANNELS_REQUEST,data:null}),r.label=1;case 1:return r.trys.push([1,3,,4]),[4,i.Client4.getAllChannels(e,t,n,s,!0)];case 2:return u=r.sent(),[3,4];case 3:return c=r.sent(),_.forceLogoutIfNecessary(c,o,l),o(h.batchActions([{type:a.ChannelTypes.GET_ALL_CHANNELS_FAILURE,error:c},p.logError(c)])),[2,{error:c}];case 4:return o(h.batchActions([{type:a.ChannelTypes.RECEIVED_ALL_CHANNELS,data:u.channels},{type:a.ChannelTypes.GET_ALL_CHANNELS_SUCCESS},{type:a.ChannelTypes.RECEIVED_TOTAL_CHANNEL_COUNT,data:u.total_count}])),[2,{data:u}]}}))}))}},t.getAllChannels=function(e,t,n,s){var u=this;return void 0===e&&(e=0),void 0===t&&(t=o.General.CHANNELS_CHUNK_SIZE),void 0===n&&(n=""),void 0===s&&(s=!1),function(o,l){return r.__awaiter(u,void 0,void 0,(function(){var u,c;return r.__generator(this,(function(r){switch(r.label){case 0:o({type:a.ChannelTypes.GET_ALL_CHANNELS_REQUEST,data:null}),r.label=1;case 1:return r.trys.push([1,3,,4]),[4,i.Client4.getAllChannels(e,t,n,s)];case 2:return u=r.sent(),[3,4];case 3:return c=r.sent(),_.forceLogoutIfNecessary(c,o,l),o(h.batchActions([{type:a.ChannelTypes.GET_ALL_CHANNELS_FAILURE,error:c},p.logError(c)])),[2,{error:c}];case 4:return o(h.batchActions([{type:a.ChannelTypes.RECEIVED_ALL_CHANNELS,data:u},{type:a.ChannelTypes.GET_ALL_CHANNELS_SUCCESS}])),[2,{data:u}]}}))}))}},t.autocompleteChannels=k,t.autocompleteChannelsForSearch=F,t.searchChannels=x,t.searchAllChannels=function(e,t,n,o,s){var u=this;return void 0===t&&(t=""),void 0===n&&(n=!1),function(l,c){return r.__awaiter(u,void 0,void 0,(function(){var u,d,f;return r.__generator(this,(function(r){switch(r.label){case 0:l({type:a.ChannelTypes.GET_ALL_CHANNELS_REQUEST,data:null}),r.label=1;case 1:return r.trys.push([1,3,,4]),[4,i.Client4.searchAllChannels(e,t,n,o,s)];case 2:return u=r.sent(),[3,4];case 3:return d=r.sent(),_.forceLogoutIfNecessary(d,l,c),l(h.batchActions([{type:a.ChannelTypes.GET_ALL_CHANNELS_FAILURE,error:d},p.logError(d)])),[2,{error:d}];case 4:return f=u.channels||u,l(h.batchActions([{type:a.ChannelTypes.RECEIVED_ALL_CHANNELS,data:f},{type:a.ChannelTypes.GET_ALL_CHANNELS_SUCCESS}])),[2,{data:u}]}}))}))}},t.searchGroupChannels=H,t.getChannelStats=G,t.addChannelMember=V,t.removeChannelMember=B,t.updateChannelMemberRoles=function(e,t,n){var o=this;return function(s,u){return r.__awaiter(o,void 0,void 0,(function(){var o,l;return r.__generator(this,(function(c){switch(c.label){case 0:return c.trys.push([0,2,,3]),[4,i.Client4.updateChannelMemberRoles(e,t,n)];case 1:return c.sent(),[3,3];case 2:return o=c.sent(),_.forceLogoutIfNecessary(o,s,u),s(p.logError(o)),[2,{error:o}];case 3:return(l=u().entities.channels.membersInChannel[e])&&l[t]&&s({type:a.ChannelTypes.RECEIVED_CHANNEL_MEMBER,data:r.__assign(r.__assign({},l[t]),{roles:n})}),[2,{data:!0}]}}))}))}},t.updateChannelHeader=j,t.updateChannelPurpose=z,t.markChannelAsRead=Y,t.markChannelAsUnread=W,t.getChannelMembersByIds=Q,t.getChannelMember=function(e,t){return _.bindClientFunc({clientFunc:i.Client4.getChannelMember,onSuccess:a.ChannelTypes.RECEIVED_CHANNEL_MEMBER,params:[e,t]})},t.getMyChannelMember=function(e){return _.bindClientFunc({clientFunc:i.Client4.getMyChannelMember,onSuccess:a.ChannelTypes.RECEIVED_MY_CHANNEL_MEMBER,params:[e]})},t.favoriteChannel=J,t.unfavoriteChannel=K,t.updateChannelScheme=function(e,t){var n=this;return _.bindClientFunc({clientFunc:function(){return r.__awaiter(n,void 0,void 0,(function(){return r.__generator(this,(function(n){switch(n.label){case 0:return[4,i.Client4.updateChannelScheme(e,t)];case 1:return n.sent(),[2,{channelId:e,schemeId:t}]}}))}))},onSuccess:a.ChannelTypes.UPDATED_CHANNEL_SCHEME})},t.updateChannelMemberSchemeRoles=function(e,t,n,o){var s=this;return _.bindClientFunc({clientFunc:function(){return r.__awaiter(s,void 0,void 0,(function(){return r.__generator(this,(function(r){switch(r.label){case 0:return[4,i.Client4.updateChannelMemberSchemeRoles(e,t,n,o)];case 1:return r.sent(),[2,{channelId:e,userId:t,isSchemeUser:n,isSchemeAdmin:o}]}}))}))},onSuccess:a.ChannelTypes.UPDATED_CHANNEL_MEMBER_SCHEME_ROLES})},t.membersMinusGroupMembers=q,t.getChannelModerations=X,t.patchChannelModerations=function(e,t){var n=this;return _.bindClientFunc({clientFunc:function(){return r.__awaiter(n,void 0,void 0,(function(){var n;return r.__generator(this,(function(r){switch(r.label){case 0:return[4,i.Client4.patchChannelModerations(e,t)];case 1:return n=r.sent(),[2,{channelId:e,moderations:n}]}}))}))},onSuccess:a.ChannelTypes.RECEIVED_CHANNEL_MODERATIONS,params:[e]})},t.default={selectChannel:g,createChannel:v,createDirectChannel:y,updateChannel:S,patchChannel:C,updateChannelNotifyProps:b,getChannel:R,fetchMyChannelsAndMembers:A,getMyChannelMembers:N,getChannelTimezones:I,getChannelMembersByIds:Q,leaveChannel:O,joinChannel:w,deleteChannel:L,unarchiveChannel:P,viewChannel:M,markChannelAsViewed:U,getChannels:D,autocompleteChannels:k,autocompleteChannelsForSearch:F,searchChannels:x,searchGroupChannels:H,getChannelStats:G,addChannelMember:V,removeChannelMember:B,updateChannelHeader:j,updateChannelPurpose:z,markChannelAsRead:Y,markChannelAsUnread:W,favoriteChannel:J,unfavoriteChannel:K,membersMinusGroupMembers:q,getChannelModerations:X}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=n(4),o=n(7),a=n(18),s=n(51),u=n(41),l=n(42),c=n(22),d=n(23),f=n(102);function h(e,t){var n=this;return function(o,u){return r.__awaiter(n,void 0,void 0,(function(){var n,c,d;return r.__generator(this,(function(r){return n=u(),c=s.getMyPreferences(n),d=t.map((function(e){return c[l.getPreferenceKey(e.category,e.name)]})),o({type:a.PreferenceTypes.DELETED_PREFERENCES,data:t,meta:{offline:{effect:function(){return i.Client4.deletePreferences(e,t)},commit:{type:a.PreferenceTypes.DELETED_PREFERENCES},rollback:{type:a.PreferenceTypes.RECEIVED_PREFERENCES,data:d}}}}),[2,{data:!0}]}))}))}}function p(e,t){var n=this;return function(o){return r.__awaiter(n,void 0,void 0,(function(){return r.__generator(this,(function(n){return o({type:a.PreferenceTypes.RECEIVED_PREFERENCES,data:t,meta:{offline:{effect:function(){return i.Client4.savePreferences(e,t)},commit:{type:a.PreferenceTypes.RECEIVED_PREFERENCES},rollback:{type:a.PreferenceTypes.DELETED_PREFERENCES,data:t}}}}),[2,{data:!0}]}))}))}}t.deletePreferences=h,t.getMyPreferences=function(){return c.bindClientFunc({clientFunc:i.Client4.getMyPreferences,onSuccess:a.PreferenceTypes.RECEIVED_ALL_PREFERENCES})},t.makeDirectChannelVisibleIfNecessary=function(e){var t=this;return function(n,i){return r.__awaiter(t,void 0,void 0,(function(){var t,a,c,f;return r.__generator(this,(function(r){return t=i(),a=s.getMyPreferences(t),c=u.getCurrentUserId(t),(f=a[l.getPreferenceKey(o.Preferences.CATEGORY_DIRECT_CHANNEL_SHOW,e)])&&"false"!==f.value||(f={user_id:c,category:o.Preferences.CATEGORY_DIRECT_CHANNEL_SHOW,name:e,value:"true"},d.getProfilesByIds([e])(n,i),p(c,[f])(n)),[2,{data:!0}]}))}))}},t.makeGroupMessageVisibleIfNecessary=function(e){var t=this;return function(n,i){return r.__awaiter(t,void 0,void 0,(function(){var t,a,c,h,_;return r.__generator(this,(function(r){return t=i(),a=s.getMyPreferences(t),c=u.getCurrentUserId(t),h=t.entities.channels.channels,(_=a[l.getPreferenceKey(o.Preferences.CATEGORY_GROUP_CHANNEL_SHOW,e)])&&"false"!==_.value||(_={user_id:c,category:o.Preferences.CATEGORY_GROUP_CHANNEL_SHOW,name:e,value:"true"},h[e]?f.getMyChannelMember(e)(n,i):f.getChannelAndMyMember(e)(n,i),d.getProfilesInChannel(e,0)(n,i),p(c,[_])(n)),[2,{data:!0}]}))}))}},t.savePreferences=p,t.saveTheme=function(e,t){var n=this;return function(i,a){return r.__awaiter(n,void 0,void 0,(function(){var n,s,l;return r.__generator(this,(function(r){switch(r.label){case 0:return n=a(),s=u.getCurrentUserId(n),l={user_id:s,category:o.Preferences.CATEGORY_THEME,name:e||"",value:JSON.stringify(t)},[4,p(s,[l])(i)];case 1:return r.sent(),[2,{data:!0}]}}))}))}},t.deleteTeamSpecificThemes=function(){var e=this;return function(t,n){return r.__awaiter(e,void 0,void 0,(function(){var e,i,a,l,c;return r.__generator(this,(function(r){switch(r.label){case 0:return e=n(),i=s.makeGetCategory(),a=i(e,o.Preferences.CATEGORY_THEME),l=u.getCurrentUserId(e),(c=a.filter((function(e){return""!==e.name}))).length>0?[4,h(l,c)(t,n)]:[3,2];case 1:r.sent(),r.label=2;case 2:return[2,{data:!0}]}}))}))}}},function(e,t,n){var r=n(207),i=n(208),o={float:"cssFloat"},a=n(211);function s(e,t,n){var s=o[t];if(void 0===s&&(s=function(e){var t=i(e),n=r(t);return o[t]=o[e]=o[n]=n,n}(t)),s){if(void 0===n)return e.style[s];e.style[s]=a(s,n)}}function u(e,t){for(var n in t)t.hasOwnProperty(n)&&s(e,n,t[n])}function l(){2===arguments.length?"string"==typeof arguments[1]?arguments[0].style.cssText=arguments[1]:u(arguments[0],arguments[1]):s(arguments[0],arguments[1],arguments[2])}e.exports=l,e.exports.set=l,e.exports.get=function(e,t){return Array.isArray(t)?t.reduce((function(t,n){return t[n]=s(e,n||""),t}),{}):s(e,t||"")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Scrollbars=void 0;var r,i=n(204),o=(r=i)&&r.__esModule?r:{default:r};t.default=o.default,t.Scrollbars=o.default},,function(e,t,n){e.exports=n(223)},function(e,t,n){var r=n(5),i=n(56),o=r.WeakMap;e.exports="function"==typeof o&&/native code/.test(i(o))},function(e,t,n){var r=n(12),i=n(110),o=n(43),a=n(21);e.exports=function(e,t){for(var n=i(t),s=a.f,u=o.f,l=0;l<n.length;l++){var c=n[l];r(e,c)||s(e,c,u(t,c))}}},function(e,t,n){var r=n(30),i=n(112),o=n(78),a=n(13);e.exports=r("Reflect","ownKeys")||function(e){var t=i.f(a(e)),n=o.f;return n?t.concat(n(e)):t}},function(e,t,n){var r=n(5);e.exports=r},function(e,t,n){var r=n(77),i=n(60).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,i)}},function(e,t,n){var r=n(44),i=n(46),o=n(114),a=function(e){return function(t,n,a){var s,u=r(t),l=i(u.length),c=o(a,l);if(e&&n!=n){for(;l>c;)if((s=u[c++])!=s)return!0}else for(;l>c;c++)if((e||c in u)&&u[c]===n)return e||c||0;return!e&&-1}};e.exports={includes:a(!0),indexOf:a(!1)}},function(e,t,n){var r=n(59),i=Math.max,o=Math.min;e.exports=function(e,t){var n=r(e);return n<0?i(n+t,0):o(n,t)}},function(e,t,n){var r=n(5);e.exports=r.Promise},function(e,t,n){var r=n(81);e.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},function(e,t,n){"use strict";var r=n(30),i=n(21),o=n(6),a=n(19),s=o("species");e.exports=function(e){var t=r(e),n=i.f;a&&t&&!t[s]&&n(t,s,{configurable:!0,get:function(){return this}})}},function(e,t,n){var r=n(13),i=n(82),o=n(46),a=n(48),s=n(49),u=n(84),l=function(e,t){this.stopped=e,this.result=t};(e.exports=function(e,t,n,c,d){var f,h,p,_,E,m,g,v=a(t,n,c?2:1);if(d)f=e;else{if("function"!=typeof(h=s(e)))throw TypeError("Target is not iterable");if(i(h)){for(p=0,_=o(e.length);_>p;p++)if((E=c?v(r(g=e[p])[0],g[1]):v(e[p]))&&E instanceof l)return E;return new l(!1)}f=h.call(e)}for(m=f.next;!(g=m.call(f)).done;)if("object"==typeof(E=u(f,v,g.value,c))&&E&&E instanceof l)return E;return new l(!1)}).stop=function(e){return new l(!0,e)}},function(e,t,n){var r={};r[n(6)("toStringTag")]="z",e.exports="[object z]"===String(r)},function(e,t,n){var r=n(6)("iterator"),i=!1;try{var o=0,a={next:function(){return{done:!!o++}},return:function(){i=!0}};a[r]=function(){return this},Array.from(a,(function(){throw 2}))}catch(e){}e.exports=function(e,t){if(!t&&!i)return!1;var n=!1;try{var o={};o[r]=function(){return{next:function(){return{done:n=!0}}}},e(o)}catch(e){}return n}},function(e,t,n){var r=n(13),i=n(47),o=n(6)("species");e.exports=function(e,t){var n,a=r(e).constructor;return void 0===a||null==(n=r(a)[o])?t:i(n)}},function(e,t,n){var r,i,o,a,s,u,l,c,d=n(5),f=n(43).f,h=n(26),p=n(85).set,_=n(87),E=d.MutationObserver||d.WebKitMutationObserver,m=d.process,g=d.Promise,v="process"==h(m),y=f(d,"queueMicrotask"),T=y&&y.value;T||(r=function(){var e,t;for(v&&(e=m.domain)&&e.exit();i;){t=i.fn,i=i.next;try{t()}catch(e){throw i?a():o=void 0,e}}o=void 0,e&&e.enter()},v?a=function(){m.nextTick(r)}:E&&!_?(s=!0,u=document.createTextNode(""),new E(r).observe(u,{characterData:!0}),a=function(){u.data=s=!s}):g&&g.resolve?(l=g.resolve(void 0),c=l.then,a=function(){c.call(l,r)}):a=function(){p.call(d,r)}),e.exports=T||function(e){var t={fn:e,next:void 0};o&&(o.next=t),i||(i=t,a()),o=t}},function(e,t,n){var r=n(13),i=n(17),o=n(89);e.exports=function(e,t){if(r(e),i(t)&&t.constructor===e)return t;var n=o.f(e);return(0,n.resolve)(t),n.promise}},function(e,t,n){var r=n(5);e.exports=function(e,t){var n=r.console;n&&n.error&&(1===arguments.length?n.error(e):n.error(e,t))}},function(e,t){e.exports=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}}},function(e,t,n){var r,i,o=n(5),a=n(88),s=o.process,u=s&&s.versions,l=u&&u.v8;l?i=(r=l.split("."))[0]+r[1]:a&&(!(r=a.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=a.match(/Chrome\/(\d+)/))&&(i=r[1]),e.exports=i&&+i},function(e,t){e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},function(e,t,n){var r=n(6),i=n(62),o=n(21),a=r("unscopables"),s=Array.prototype;null==s[a]&&o.f(s,a,{configurable:!0,value:i(null)}),e.exports=function(e){s[a][e]=!0}},function(e,t,n){var r=n(16);e.exports=!r((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},function(e,t,n){var r=n(13),i=n(131);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),t=n instanceof Array}catch(e){}return function(n,o){return r(n),i(o),t?e.call(n,o):n.__proto__=o,n}}():void 0)},function(e,t,n){var r=n(17);e.exports=function(e){if(!r(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype");return e}},function(e,t,n){"use strict";n(133);var r,i=n(25),o=n(19),a=n(98),s=n(5),u=n(91),l=n(27),c=n(61),d=n(12),f=n(99),h=n(134),p=n(97).codeAt,_=n(136),E=n(35),m=n(137),g=n(28),v=s.URL,y=m.URLSearchParams,T=m.getState,C=g.set,S=g.getterFor("URL"),b=Math.floor,R=Math.pow,I=/[A-Za-z]/,A=/[\d+-.A-Za-z]/,N=/\d/,O=/^(0x|0X)/,w=/^[0-7]+$/,L=/^\d+$/,P=/^[\dA-Fa-f]+$/,M=/[\u0000\u0009\u000A\u000D #%/:?@[\\]]/,U=/[\u0000\u0009\u000A\u000D #/:?@[\\]]/,D=/^[\u0000-\u001F ]+|[\u0000-\u001F ]+$/g,k=/[\u0009\u000A\u000D]/g,F=function(e,t){var n,r,i;if("["==t.charAt(0)){if("]"!=t.charAt(t.length-1))return"Invalid host";if(!(n=H(t.slice(1,-1))))return"Invalid host";e.host=n}else if(Q(e)){if(t=_(t),M.test(t))return"Invalid host";if(null===(n=x(t)))return"Invalid host";e.host=n}else{if(U.test(t))return"Invalid host";for(n="",r=h(t),i=0;i<r.length;i++)n+=Y(r[i],V);e.host=n}},x=function(e){var t,n,r,i,o,a,s,u=e.split(".");if(u.length&&""==u[u.length-1]&&u.pop(),(t=u.length)>4)return e;for(n=[],r=0;r<t;r++){if(""==(i=u[r]))return e;if(o=10,i.length>1&&"0"==i.charAt(0)&&(o=O.test(i)?16:8,i=i.slice(8==o?1:2)),""===i)a=0;else{if(!(10==o?L:8==o?w:P).test(i))return e;a=parseInt(i,o)}n.push(a)}for(r=0;r<t;r++)if(a=n[r],r==t-1){if(a>=R(256,5-t))return null}else if(a>255)return null;for(s=n.pop(),r=0;r<n.length;r++)s+=n[r]*R(256,3-r);return s},H=function(e){var t,n,r,i,o,a,s,u=[0,0,0,0,0,0,0,0],l=0,c=null,d=0,f=function(){return e.charAt(d)};if(":"==f()){if(":"!=e.charAt(1))return;d+=2,c=++l}for(;f();){if(8==l)return;if(":"!=f()){for(t=n=0;n<4&&P.test(f());)t=16*t+parseInt(f(),16),d++,n++;if("."==f()){if(0==n)return;if(d-=n,l>6)return;for(r=0;f();){if(i=null,r>0){if(!("."==f()&&r<4))return;d++}if(!N.test(f()))return;for(;N.test(f());){if(o=parseInt(f(),10),null===i)i=o;else{if(0==i)return;i=10*i+o}if(i>255)return;d++}u[l]=256*u[l]+i,2!=++r&&4!=r||l++}if(4!=r)return;break}if(":"==f()){if(d++,!f())return}else if(f())return;u[l++]=t}else{if(null!==c)return;d++,c=++l}}if(null!==c)for(a=l-c,l=7;0!=l&&a>0;)s=u[l],u[l--]=u[c+a-1],u[c+--a]=s;else if(8!=l)return;return u},G=function(e){var t,n,r,i;if("number"==typeof e){for(t=[],n=0;n<4;n++)t.unshift(e%256),e=b(e/256);return t.join(".")}if("object"==typeof e){for(t="",r=function(e){for(var t=null,n=1,r=null,i=0,o=0;o<8;o++)0!==e[o]?(i>n&&(t=r,n=i),r=null,i=0):(null===r&&(r=o),++i);return i>n&&(t=r,n=i),t}(e),n=0;n<8;n++)i&&0===e[n]||(i&&(i=!1),r===n?(t+=n?":":"::",i=!0):(t+=e[n].toString(16),n<7&&(t+=":")));return"["+t+"]"}return e},V={},B=f({},V,{" ":1,'"':1,"<":1,">":1,"`":1}),j=f({},B,{"#":1,"?":1,"{":1,"}":1}),z=f({},j,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),Y=function(e,t){var n=p(e,0);return n>32&&n<127&&!d(t,e)?e:encodeURIComponent(e)},W={ftp:21,file:null,http:80,https:443,ws:80,wss:443},Q=function(e){return d(W,e.scheme)},J=function(e){return""!=e.username||""!=e.password},K=function(e){return!e.host||e.cannotBeABaseURL||"file"==e.scheme},q=function(e,t){var n;return 2==e.length&&I.test(e.charAt(0))&&(":"==(n=e.charAt(1))||!t&&"|"==n)},X=function(e){var t;return e.length>1&&q(e.slice(0,2))&&(2==e.length||"/"===(t=e.charAt(2))||"\\"===t||"?"===t||"#"===t)},Z=function(e){var t=e.path,n=t.length;!n||"file"==e.scheme&&1==n&&q(t[0],!0)||t.pop()},$=function(e){return"."===e||"%2e"===e.toLowerCase()},ee={},te={},ne={},re={},ie={},oe={},ae={},se={},ue={},le={},ce={},de={},fe={},he={},pe={},_e={},Ee={},me={},ge={},ve={},ye={},Te=function(e,t,n,i){var o,a,s,u,l,c=n||ee,f=0,p="",_=!1,E=!1,m=!1;for(n||(e.scheme="",e.username="",e.password="",e.host=null,e.port=null,e.path=[],e.query=null,e.fragment=null,e.cannotBeABaseURL=!1,t=t.replace(D,"")),t=t.replace(k,""),o=h(t);f<=o.length;){switch(a=o[f],c){case ee:if(!a||!I.test(a)){if(n)return"Invalid scheme";c=ne;continue}p+=a.toLowerCase(),c=te;break;case te:if(a&&(A.test(a)||"+"==a||"-"==a||"."==a))p+=a.toLowerCase();else{if(":"!=a){if(n)return"Invalid scheme";p="",c=ne,f=0;continue}if(n&&(Q(e)!=d(W,p)||"file"==p&&(J(e)||null!==e.port)||"file"==e.scheme&&!e.host))return;if(e.scheme=p,n)return void(Q(e)&&W[e.scheme]==e.port&&(e.port=null));p="","file"==e.scheme?c=he:Q(e)&&i&&i.scheme==e.scheme?c=re:Q(e)?c=se:"/"==o[f+1]?(c=ie,f++):(e.cannotBeABaseURL=!0,e.path.push(""),c=ge)}break;case ne:if(!i||i.cannotBeABaseURL&&"#"!=a)return"Invalid scheme";if(i.cannotBeABaseURL&&"#"==a){e.scheme=i.scheme,e.path=i.path.slice(),e.query=i.query,e.fragment="",e.cannotBeABaseURL=!0,c=ye;break}c="file"==i.scheme?he:oe;continue;case re:if("/"!=a||"/"!=o[f+1]){c=oe;continue}c=ue,f++;break;case ie:if("/"==a){c=le;break}c=me;continue;case oe:if(e.scheme=i.scheme,a==r)e.username=i.username,e.password=i.password,e.host=i.host,e.port=i.port,e.path=i.path.slice(),e.query=i.query;else if("/"==a||"\\"==a&&Q(e))c=ae;else if("?"==a)e.username=i.username,e.password=i.password,e.host=i.host,e.port=i.port,e.path=i.path.slice(),e.query="",c=ve;else{if("#"!=a){e.username=i.username,e.password=i.password,e.host=i.host,e.port=i.port,e.path=i.path.slice(),e.path.pop(),c=me;continue}e.username=i.username,e.password=i.password,e.host=i.host,e.port=i.port,e.path=i.path.slice(),e.query=i.query,e.fragment="",c=ye}break;case ae:if(!Q(e)||"/"!=a&&"\\"!=a){if("/"!=a){e.username=i.username,e.password=i.password,e.host=i.host,e.port=i.port,c=me;continue}c=le}else c=ue;break;case se:if(c=ue,"/"!=a||"/"!=p.charAt(f+1))continue;f++;break;case ue:if("/"!=a&&"\\"!=a){c=le;continue}break;case le:if("@"==a){_&&(p="%40"+p),_=!0,s=h(p);for(var g=0;g<s.length;g++){var v=s[g];if(":"!=v||m){var y=Y(v,z);m?e.password+=y:e.username+=y}else m=!0}p=""}else if(a==r||"/"==a||"?"==a||"#"==a||"\\"==a&&Q(e)){if(_&&""==p)return"Invalid authority";f-=h(p).length+1,p="",c=ce}else p+=a;break;case ce:case de:if(n&&"file"==e.scheme){c=_e;continue}if(":"!=a||E){if(a==r||"/"==a||"?"==a||"#"==a||"\\"==a&&Q(e)){if(Q(e)&&""==p)return"Invalid host";if(n&&""==p&&(J(e)||null!==e.port))return;if(u=F(e,p))return u;if(p="",c=Ee,n)return;continue}"["==a?E=!0:"]"==a&&(E=!1),p+=a}else{if(""==p)return"Invalid host";if(u=F(e,p))return u;if(p="",c=fe,n==de)return}break;case fe:if(!N.test(a)){if(a==r||"/"==a||"?"==a||"#"==a||"\\"==a&&Q(e)||n){if(""!=p){var T=parseInt(p,10);if(T>65535)return"Invalid port";e.port=Q(e)&&T===W[e.scheme]?null:T,p=""}if(n)return;c=Ee;continue}return"Invalid port"}p+=a;break;case he:if(e.scheme="file","/"==a||"\\"==a)c=pe;else{if(!i||"file"!=i.scheme){c=me;continue}if(a==r)e.host=i.host,e.path=i.path.slice(),e.query=i.query;else if("?"==a)e.host=i.host,e.path=i.path.slice(),e.query="",c=ve;else{if("#"!=a){X(o.slice(f).join(""))||(e.host=i.host,e.path=i.path.slice(),Z(e)),c=me;continue}e.host=i.host,e.path=i.path.slice(),e.query=i.query,e.fragment="",c=ye}}break;case pe:if("/"==a||"\\"==a){c=_e;break}i&&"file"==i.scheme&&!X(o.slice(f).join(""))&&(q(i.path[0],!0)?e.path.push(i.path[0]):e.host=i.host),c=me;continue;case _e:if(a==r||"/"==a||"\\"==a||"?"==a||"#"==a){if(!n&&q(p))c=me;else if(""==p){if(e.host="",n)return;c=Ee}else{if(u=F(e,p))return u;if("localhost"==e.host&&(e.host=""),n)return;p="",c=Ee}continue}p+=a;break;case Ee:if(Q(e)){if(c=me,"/"!=a&&"\\"!=a)continue}else if(n||"?"!=a)if(n||"#"!=a){if(a!=r&&(c=me,"/"!=a))continue}else e.fragment="",c=ye;else e.query="",c=ve;break;case me:if(a==r||"/"==a||"\\"==a&&Q(e)||!n&&("?"==a||"#"==a)){if(".."===(l=(l=p).toLowerCase())||"%2e."===l||".%2e"===l||"%2e%2e"===l?(Z(e),"/"==a||"\\"==a&&Q(e)||e.path.push("")):$(p)?"/"==a||"\\"==a&&Q(e)||e.path.push(""):("file"==e.scheme&&!e.path.length&&q(p)&&(e.host&&(e.host=""),p=p.charAt(0)+":"),e.path.push(p)),p="","file"==e.scheme&&(a==r||"?"==a||"#"==a))for(;e.path.length>1&&""===e.path[0];)e.path.shift();"?"==a?(e.query="",c=ve):"#"==a&&(e.fragment="",c=ye)}else p+=Y(a,j);break;case ge:"?"==a?(e.query="",c=ve):"#"==a?(e.fragment="",c=ye):a!=r&&(e.path[0]+=Y(a,V));break;case ve:n||"#"!=a?a!=r&&("'"==a&&Q(e)?e.query+="%27":e.query+="#"==a?"%23":Y(a,V)):(e.fragment="",c=ye);break;case ye:a!=r&&(e.fragment+=Y(a,B))}f++}},Ce=function(e){var t,n,r=c(this,Ce,"URL"),i=arguments.length>1?arguments[1]:void 0,a=String(e),s=C(r,{type:"URL"});if(void 0!==i)if(i instanceof Ce)t=S(i);else if(n=Te(t={},String(i)))throw TypeError(n);if(n=Te(s,a,null,t))throw TypeError(n);var u=s.searchParams=new y,l=T(u);l.updateSearchParams(s.query),l.updateURL=function(){s.query=String(u)||null},o||(r.href=be.call(r),r.origin=Re.call(r),r.protocol=Ie.call(r),r.username=Ae.call(r),r.password=Ne.call(r),r.host=Oe.call(r),r.hostname=we.call(r),r.port=Le.call(r),r.pathname=Pe.call(r),r.search=Me.call(r),r.searchParams=Ue.call(r),r.hash=De.call(r))},Se=Ce.prototype,be=function(){var e=S(this),t=e.scheme,n=e.username,r=e.password,i=e.host,o=e.port,a=e.path,s=e.query,u=e.fragment,l=t+":";return null!==i?(l+="//",J(e)&&(l+=n+(r?":"+r:"")+"@"),l+=G(i),null!==o&&(l+=":"+o)):"file"==t&&(l+="//"),l+=e.cannotBeABaseURL?a[0]:a.length?"/"+a.join("/"):"",null!==s&&(l+="?"+s),null!==u&&(l+="#"+u),l},Re=function(){var e=S(this),t=e.scheme,n=e.port;if("blob"==t)try{return new URL(t.path[0]).origin}catch(e){return"null"}return"file"!=t&&Q(e)?t+"://"+G(e.host)+(null!==n?":"+n:""):"null"},Ie=function(){return S(this).scheme+":"},Ae=function(){return S(this).username},Ne=function(){return S(this).password},Oe=function(){var e=S(this),t=e.host,n=e.port;return null===t?"":null===n?G(t):G(t)+":"+n},we=function(){var e=S(this).host;return null===e?"":G(e)},Le=function(){var e=S(this).port;return null===e?"":String(e)},Pe=function(){var e=S(this),t=e.path;return e.cannotBeABaseURL?t[0]:t.length?"/"+t.join("/"):""},Me=function(){var e=S(this).query;return e?"?"+e:""},Ue=function(){return S(this).searchParams},De=function(){var e=S(this).fragment;return e?"#"+e:""},ke=function(e,t){return{get:e,set:t,configurable:!0,enumerable:!0}};if(o&&u(Se,{href:ke(be,(function(e){var t=S(this),n=String(e),r=Te(t,n);if(r)throw TypeError(r);T(t.searchParams).updateSearchParams(t.query)})),origin:ke(Re),protocol:ke(Ie,(function(e){var t=S(this);Te(t,String(e)+":",ee)})),username:ke(Ae,(function(e){var t=S(this),n=h(String(e));if(!K(t)){t.username="";for(var r=0;r<n.length;r++)t.username+=Y(n[r],z)}})),password:ke(Ne,(function(e){var t=S(this),n=h(String(e));if(!K(t)){t.password="";for(var r=0;r<n.length;r++)t.password+=Y(n[r],z)}})),host:ke(Oe,(function(e){var t=S(this);t.cannotBeABaseURL||Te(t,String(e),ce)})),hostname:ke(we,(function(e){var t=S(this);t.cannotBeABaseURL||Te(t,String(e),de)})),port:ke(Le,(function(e){var t=S(this);K(t)||(""==(e=String(e))?t.port=null:Te(t,e,fe))})),pathname:ke(Pe,(function(e){var t=S(this);t.cannotBeABaseURL||(t.path=[],Te(t,e+"",Ee))})),search:ke(Me,(function(e){var t=S(this);""==(e=String(e))?t.query=null:("?"==e.charAt(0)&&(e=e.slice(1)),t.query="",Te(t,e,ve)),T(t.searchParams).updateSearchParams(t.query)})),searchParams:ke(Ue),hash:ke(De,(function(e){var t=S(this);""!=(e=String(e))?("#"==e.charAt(0)&&(e=e.slice(1)),t.fragment="",Te(t,e,ye)):t.fragment=null}))}),l(Se,"toJSON",(function(){return be.call(this)}),{enumerable:!0}),l(Se,"toString",(function(){return be.call(this)}),{enumerable:!0}),v){var Fe=v.createObjectURL,xe=v.revokeObjectURL;Fe&&l(Ce,"createObjectURL",(function(e){return Fe.apply(v,arguments)})),xe&&l(Ce,"revokeObjectURL",(function(e){return xe.apply(v,arguments)}))}E(Ce,"URL"),i({global:!0,forced:!a,sham:!o},{URL:Ce})},function(e,t,n){"use strict";var r=n(97).charAt,i=n(28),o=n(93),a=i.set,s=i.getterFor("String Iterator");o(String,"String",(function(e){a(this,{type:"String Iterator",string:String(e),index:0})}),(function(){var e,t=s(this),n=t.string,i=t.index;return i>=n.length?{value:void 0,done:!0}:(e=r(n,i),t.index+=e.length,{value:e,done:!1})}))},function(e,t,n){"use strict";var r=n(48),i=n(63),o=n(84),a=n(82),s=n(46),u=n(135),l=n(49);e.exports=function(e){var t,n,c,d,f,h,p=i(e),_="function"==typeof this?this:Array,E=arguments.length,m=E>1?arguments[1]:void 0,g=void 0!==m,v=l(p),y=0;if(g&&(m=r(m,E>2?arguments[2]:void 0,2)),null==v||_==Array&&a(v))for(n=new _(t=s(p.length));t>y;y++)h=g?m(p[y],y):p[y],u(n,y,h);else for(f=(d=v.call(p)).next,n=new _;!(c=f.call(d)).done;y++)h=g?o(d,m,[c.value,y],!0):c.value,u(n,y,h);return n.length=y,n}},function(e,t,n){"use strict";var r=n(53),i=n(21),o=n(34);e.exports=function(e,t,n){var a=r(t);a in e?i.f(e,a,o(0,n)):e[a]=n}},function(e,t,n){"use strict";var r=/[^\0-\u007E]/,i=/[.\u3002\uFF0E\uFF61]/g,o="Overflow: input needs wider integers to process",a=Math.floor,s=String.fromCharCode,u=function(e){return e+22+75*(e<26)},l=function(e,t,n){var r=0;for(e=n?a(e/700):e>>1,e+=a(e/t);e>455;r+=36)e=a(e/35);return a(r+36*e/(e+38))},c=function(e){var t,n,r=[],i=(e=function(e){for(var t=[],n=0,r=e.length;n<r;){var i=e.charCodeAt(n++);if(i>=55296&&i<=56319&&n<r){var o=e.charCodeAt(n++);56320==(64512&o)?t.push(((1023&i)<<10)+(1023&o)+65536):(t.push(i),n--)}else t.push(i)}return t}(e)).length,c=128,d=0,f=72;for(t=0;t<e.length;t++)(n=e[t])<128&&r.push(s(n));var h=r.length,p=h;for(h&&r.push("-");p<i;){var _=2147483647;for(t=0;t<e.length;t++)(n=e[t])>=c&&n<_&&(_=n);var E=p+1;if(_-c>a((2147483647-d)/E))throw RangeError(o);for(d+=(_-c)*E,c=_,t=0;t<e.length;t++){if((n=e[t])<c&&++d>2147483647)throw RangeError(o);if(n==c){for(var m=d,g=36;;g+=36){var v=g<=f?1:g>=f+26?26:g-f;if(m<v)break;var y=m-v,T=36-v;r.push(s(u(v+y%T))),m=a(y/T)}r.push(s(u(m))),f=l(d,E,p==h),d=0,++p}}++d,++c}return r.join("")};e.exports=function(e){var t,n,o=[],a=e.toLowerCase().replace(i,".").split(".");for(t=0;t<a.length;t++)n=a[t],o.push(r.test(n)?"xn--"+c(n):n);return o.join(".")}},function(e,t,n){"use strict";n(90);var r=n(25),i=n(30),o=n(98),a=n(27),s=n(80),u=n(35),l=n(94),c=n(28),d=n(61),f=n(12),h=n(48),p=n(83),_=n(13),E=n(17),m=n(62),g=n(34),v=n(138),y=n(49),T=n(6),C=i("fetch"),S=i("Headers"),b=T("iterator"),R=c.set,I=c.getterFor("URLSearchParams"),A=c.getterFor("URLSearchParamsIterator"),N=/\+/g,O=Array(4),w=function(e){return O[e-1]||(O[e-1]=RegExp("((?:%[\\da-f]{2}){"+e+"})","gi"))},L=function(e){try{return decodeURIComponent(e)}catch(t){return e}},P=function(e){var t=e.replace(N," "),n=4;try{return decodeURIComponent(t)}catch(e){for(;n;)t=t.replace(w(n--),L);return t}},M=/[!'()~]|%20/g,U={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},D=function(e){return U[e]},k=function(e){return encodeURIComponent(e).replace(M,D)},F=function(e,t){if(t)for(var n,r,i=t.split("&"),o=0;o<i.length;)(n=i[o++]).length&&(r=n.split("="),e.push({key:P(r.shift()),value:P(r.join("="))}))},x=function(e){this.entries.length=0,F(this.entries,e)},H=function(e,t){if(e<t)throw TypeError("Not enough arguments")},G=l((function(e,t){R(this,{type:"URLSearchParamsIterator",iterator:v(I(e).entries),kind:t})}),"Iterator",(function(){var e=A(this),t=e.kind,n=e.iterator.next(),r=n.value;return n.done||(n.value="keys"===t?r.key:"values"===t?r.value:[r.key,r.value]),n})),V=function(){d(this,V,"URLSearchParams");var e,t,n,r,i,o,a,s,u,l=arguments.length>0?arguments[0]:void 0,c=this,h=[];if(R(c,{type:"URLSearchParams",entries:h,updateURL:function(){},updateSearchParams:x}),void 0!==l)if(E(l))if("function"==typeof(e=y(l)))for(n=(t=e.call(l)).next;!(r=n.call(t)).done;){if((a=(o=(i=v(_(r.value))).next).call(i)).done||(s=o.call(i)).done||!o.call(i).done)throw TypeError("Expected sequence with length 2");h.push({key:a.value+"",value:s.value+""})}else for(u in l)f(l,u)&&h.push({key:u,value:l[u]+""});else F(h,"string"==typeof l?"?"===l.charAt(0)?l.slice(1):l:l+"")},B=V.prototype;s(B,{append:function(e,t){H(arguments.length,2);var n=I(this);n.entries.push({key:e+"",value:t+""}),n.updateURL()},delete:function(e){H(arguments.length,1);for(var t=I(this),n=t.entries,r=e+"",i=0;i<n.length;)n[i].key===r?n.splice(i,1):i++;t.updateURL()},get:function(e){H(arguments.length,1);for(var t=I(this).entries,n=e+"",r=0;r<t.length;r++)if(t[r].key===n)return t[r].value;return null},getAll:function(e){H(arguments.length,1);for(var t=I(this).entries,n=e+"",r=[],i=0;i<t.length;i++)t[i].key===n&&r.push(t[i].value);return r},has:function(e){H(arguments.length,1);for(var t=I(this).entries,n=e+"",r=0;r<t.length;)if(t[r++].key===n)return!0;return!1},set:function(e,t){H(arguments.length,1);for(var n,r=I(this),i=r.entries,o=!1,a=e+"",s=t+"",u=0;u<i.length;u++)(n=i[u]).key===a&&(o?i.splice(u--,1):(o=!0,n.value=s));o||i.push({key:a,value:s}),r.updateURL()},sort:function(){var e,t,n,r=I(this),i=r.entries,o=i.slice();for(i.length=0,n=0;n<o.length;n++){for(e=o[n],t=0;t<n;t++)if(i[t].key>e.key){i.splice(t,0,e);break}t===n&&i.push(e)}r.updateURL()},forEach:function(e){for(var t,n=I(this).entries,r=h(e,arguments.length>1?arguments[1]:void 0,3),i=0;i<n.length;)r((t=n[i++]).value,t.key,this)},keys:function(){return new G(this,"keys")},values:function(){return new G(this,"values")},entries:function(){return new G(this,"entries")}},{enumerable:!0}),a(B,b,B.entries),a(B,"toString",(function(){for(var e,t=I(this).entries,n=[],r=0;r<t.length;)e=t[r++],n.push(k(e.key)+"="+k(e.value));return n.join("&")}),{enumerable:!0}),u(V,"URLSearchParams"),r({global:!0,forced:!o},{URLSearchParams:V}),o||"function"!=typeof C||"function"!=typeof S||r({global:!0,enumerable:!0,forced:!0},{fetch:function(e){var t,n,r,i=[e];return arguments.length>1&&(E(t=arguments[1])&&(n=t.body,"URLSearchParams"===p(n)&&((r=t.headers?new S(t.headers):new S).has("content-type")||r.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"),t=m(t,{body:g(0,String(n)),headers:g(0,r)}))),i.push(t)),C.apply(this,i)}}),e.exports={URLSearchParams:V,getState:I}},function(e,t,n){var r=n(13),i=n(49);e.exports=function(e){var t=i(e);if("function"!=typeof t)throw TypeError(String(e)+" is not iterable");return r(t.call(e))}},function(e,t){e.exports=function(e,t,n){if(null===e!=(null===t))return!1;var r=Array.isArray(e),i=Array.isArray(t);if(r!==i)return!1;var o=typeof e;return o===typeof t&&(function(e){return"function"!==e&&"object"!==e}(o)?n?n(e,t):e===t:r?function(e,t,n){var r=e.length;if(r!==t.length)return!1;if(n){for(var i=0;i<r;i++)if(!n(e[i],t[i]))return!1}else for(i=0;i<r;i++)if(e[i]!==t[i])return!1;return!0}(e,t,n):function(e,t,n){var r=0,i=0;if(n)for(var o in e){if(e.hasOwnProperty(o)&&!n(e[o],t[o]))return!1;r++}else for(var o in e){if(e.hasOwnProperty(o)&&e[o]!==t[o])return!1;r++}for(var o in t)t.hasOwnProperty(o)&&i++;return r===i}(e,t,n))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={CONFIG_CHANGED:"config_changed",SERVER_VERSION_CHANGED:"server_version_changed",PAGE_SIZE_DEFAULT:60,PAGE_SIZE_MAXIMUM:200,LOGS_PAGE_SIZE_DEFAULT:1e4,AUDITS_CHUNK_SIZE:100,PROFILE_CHUNK_SIZE:100,CHANNELS_CHUNK_SIZE:50,TEAMS_CHUNK_SIZE:50,JOBS_CHUNK_SIZE:50,SEARCH_TIMEOUT_MILLISECONDS:100,STATUS_INTERVAL:6e4,AUTOCOMPLETE_LIMIT_DEFAULT:25,AUTOCOMPLETE_SPLIT_CHARACTERS:[".","-","_"],MENTION:"mention",OUT_OF_OFFICE:"ooo",OFFLINE:"offline",AWAY:"away",ONLINE:"online",DND:"dnd",PERMISSIONS_ALL:"all",PERMISSIONS_CHANNEL_ADMIN:"channel_admin",PERMISSIONS_TEAM_ADMIN:"team_admin",PERMISSIONS_SYSTEM_ADMIN:"system_admin",TEAM_GUEST_ROLE:"team_guest",TEAM_USER_ROLE:"team_user",TEAM_ADMIN_ROLE:"team_admin",CHANNEL_GUEST_ROLE:"channel_guest",CHANNEL_USER_ROLE:"channel_user",CHANNEL_ADMIN_ROLE:"channel_admin",SYSTEM_GUEST_ROLE:"system_guest",SYSTEM_USER_ROLE:"system_user",SYSTEM_ADMIN_ROLE:"system_admin",SYSTEM_USER_ACCESS_TOKEN_ROLE:"system_user_access_token",SYSTEM_POST_ALL_ROLE:"system_post_all",SYSTEM_POST_ALL_PUBLIC_ROLE:"system_post_all_public",ALLOW_EDIT_POST_ALWAYS:"always",ALLOW_EDIT_POST_NEVER:"never",ALLOW_EDIT_POST_TIME_LIMIT:"time_limit",DEFAULT_POST_EDIT_TIME_LIMIT:300,RESTRICT_DIRECT_MESSAGE_ANY:"any",RESTRICT_DIRECT_MESSAGE_TEAM:"team",SWITCH_TO_DEFAULT_CHANNEL:"switch_to_default_channel",DEFAULT_CHANNEL:"town-square",DM_CHANNEL:"D",OPEN_CHANNEL:"O",PRIVATE_CHANNEL:"P",GM_CHANNEL:"G",PUSH_NOTIFY_APPLE_REACT_NATIVE:"apple_rn",PUSH_NOTIFY_ANDROID_REACT_NATIVE:"android_rn",STORE_REHYDRATION_COMPLETE:"store_hydation_complete",OFFLINE_STORE_RESET:"offline_store_reset",OFFLINE_STORE_PURGE:"offline_store_purge",TEAMMATE_NAME_DISPLAY:{SHOW_USERNAME:"username",SHOW_NICKNAME_FULLNAME:"nickname_full_name",SHOW_FULLNAME:"full_name"},SPECIAL_MENTIONS:["all","channel","here"],MAX_USERS_IN_GM:8,MIN_USERS_IN_GM:3,MAX_GROUP_CHANNELS_FOR_PROFILES:50,DEFAULT_LOCALE:"en",DEFAULT_AUTOLINKED_URL_SCHEMES:["http","https","ftp","mailto","tel","mattermost"],DISABLED:"disabled",DEFAULT_ON:"default_on",DEFAULT_OFF:"default_off"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default={NOT_STARTED:"not_started",STARTED:"started",SUCCESS:"success",FAILURE:"failure",CANCELLED:"cancelled"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default={POSTED:"posted",POST_EDITED:"post_edited",POST_DELETED:"post_deleted",POST_UNREAD:"post_unread",CHANNEL_CONVERTED:"channel_converted",CHANNEL_CREATED:"channel_created",CHANNEL_DELETED:"channel_deleted",CHANNEL_UNARCHIVED:"channel_restored",CHANNEL_UPDATED:"channel_updated",CHANNEL_VIEWED:"channel_viewed",CHANNEL_MEMBER_UPDATED:"channel_member_updated",CHANNEL_SCHEME_UPDATED:"channel_scheme_updated",DIRECT_ADDED:"direct_added",ADDED_TO_TEAM:"added_to_team",LEAVE_TEAM:"leave_team",UPDATE_TEAM:"update_team",USER_ADDED:"user_added",USER_REMOVED:"user_removed",USER_UPDATED:"user_updated",USER_ROLE_UPDATED:"user_role_updated",ROLE_ADDED:"role_added",ROLE_REMOVED:"role_removed",ROLE_UPDATED:"role_updated",TYPING:"typing",STOP_TYPING:"stop_typing",PREFERENCE_CHANGED:"preference_changed",PREFERENCES_CHANGED:"preferences_changed",PREFERENCES_DELETED:"preferences_deleted",EPHEMERAL_MESSAGE:"ephemeral_message",STATUS_CHANGED:"status_change",HELLO:"hello",WEBRTC:"webrtc",REACTION_ADDED:"reaction_added",REACTION_REMOVED:"reaction_removed",EMOJI_ADDED:"emoji_added",LICENSE_CHANGED:"license_changed",CONFIG_CHANGED:"config_changed",PLUGIN_STATUSES_CHANGED:"plugin_statuses_changed",OPEN_DIALOG:"open_dialog",INCREASE_POST_VISIBILITY_BY_ONE:"increase_post_visibility_by_one"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default={CATEGORY_CHANNEL_OPEN_TIME:"channel_open_time",CATEGORY_CHANNEL_APPROXIMATE_VIEW_TIME:"channel_approximate_view_time",CATEGORY_DIRECT_CHANNEL_SHOW:"direct_channel_show",CATEGORY_GROUP_CHANNEL_SHOW:"group_channel_show",CATEGORY_FLAGGED_POST:"flagged_post",CATEGORY_FAVORITE_CHANNEL:"favorite_channel",CATEGORY_AUTO_RESET_MANUAL_STATUS:"auto_reset_manual_status",CATEGORY_NOTIFICATIONS:"notifications",COMMENTS:"comments",COMMENTS_ANY:"any",COMMENTS_ROOT:"root",COMMENTS_NEVER:"never",EMAIL:"email",EMAIL_INTERVAL:"email_interval",INTERVAL_FIFTEEN_MINUTES:900,INTERVAL_HOUR:3600,INTERVAL_IMMEDIATE:30,INTERVAL_NEVER:0,INTERVAL_NOT_SET:-1,CATEGORY_DISPLAY_SETTINGS:"display_settings",NAME_NAME_FORMAT:"name_format",DISPLAY_PREFER_NICKNAME:"nickname_full_name",DISPLAY_PREFER_FULL_NAME:"full_name",DISPLAY_PREFER_USERNAME:"username",MENTION_KEYS:"mention_keys",USE_MILITARY_TIME:"use_military_time",CATEGORY_SIDEBAR_SETTINGS:"sidebar_settings",CHANNEL_SIDEBAR_ORGANIZATION:"channel_sidebar_organization",CHANNEL_SIDEBAR_AUTOCLOSE_DMS:"close_unused_direct_messages",AUTOCLOSE_DMS_ENABLED:"after_seven_days",CATEGORY_ADVANCED_SETTINGS:"advanced_settings",ADVANCED_FILTER_JOIN_LEAVE:"join_leave",ADVANCED_CODE_BLOCK_ON_CTRL_ENTER:"code_block_ctrl_enter",ADVANCED_SEND_ON_CTRL_ENTER:"send_on_ctrl_enter",CATEGORY_THEME:"theme",THEMES:{default:{type:"Mattermost",sidebarBg:"#145dbf",sidebarText:"#ffffff",sidebarUnreadText:"#ffffff",sidebarTextHoverBg:"#4578bf",sidebarTextActiveBorder:"#579eff",sidebarTextActiveColor:"#ffffff",sidebarHeaderBg:"#1153ab",sidebarHeaderTextColor:"#ffffff",onlineIndicator:"#06d6a0",awayIndicator:"#ffbc42",dndIndicator:"#f74343",mentionBg:"#ffffff",mentionBj:"#ffffff",mentionColor:"#145dbf",centerChannelBg:"#ffffff",centerChannelColor:"#3d3c40",newMessageSeparator:"#ff8800",linkColor:"#2389d7",buttonBg:"#166de0",buttonColor:"#ffffff",errorTextColor:"#fd5960",mentionHighlightBg:"#ffe577",mentionHighlightLink:"#166de0",codeTheme:"github"},organization:{type:"Organization",sidebarBg:"#2071a7",sidebarText:"#ffffff",sidebarUnreadText:"#ffffff",sidebarTextHoverBg:"#136197",sidebarTextActiveBorder:"#7ab0d6",sidebarTextActiveColor:"#ffffff",sidebarHeaderBg:"#2f81b7",sidebarHeaderTextColor:"#ffffff",onlineIndicator:"#7dbe00",awayIndicator:"#dcbd4e",dndIndicator:"#ff6a6a",mentionBg:"#fbfbfb",mentionBj:"#fbfbfb",mentionColor:"#2071f7",centerChannelBg:"#f2f4f8",centerChannelColor:"#333333",newMessageSeparator:"#ff8800",linkColor:"#2f81b7",buttonBg:"#1dacfc",buttonColor:"#ffffff",errorTextColor:"#a94442",mentionHighlightBg:"#f3e197",mentionHighlightLink:"#2f81b7",codeTheme:"github"},mattermostDark:{type:"Mattermost Dark",sidebarBg:"#1b2c3e",sidebarText:"#ffffff",sidebarUnreadText:"#ffffff",sidebarTextHoverBg:"#4a5664",sidebarTextActiveBorder:"#66b9a7",sidebarTextActiveColor:"#ffffff",sidebarHeaderBg:"#1b2c3e",sidebarHeaderTextColor:"#ffffff",onlineIndicator:"#65dcc8",awayIndicator:"#c1b966",dndIndicator:"#e81023",mentionBg:"#b74a4a",mentionBj:"#b74a4a",mentionColor:"#ffffff",centerChannelBg:"#2f3e4e",centerChannelColor:"#dddddd",newMessageSeparator:"#5de5da",linkColor:"#a4ffeb",buttonBg:"#4cbba4",buttonColor:"#ffffff",errorTextColor:"#ff6461",mentionHighlightBg:"#984063",mentionHighlightLink:"#a4ffeb",codeTheme:"solarized-dark"},windows10:{type:"Windows Dark",sidebarBg:"#171717",sidebarText:"#ffffff",sidebarUnreadText:"#ffffff",sidebarTextHoverBg:"#302e30",sidebarTextActiveBorder:"#196caf",sidebarTextActiveColor:"#ffffff",sidebarHeaderBg:"#1f1f1f",sidebarHeaderTextColor:"#ffffff",onlineIndicator:"#399fff",awayIndicator:"#c1b966",dndIndicator:"#e81023",mentionBg:"#0177e7",mentionBj:"#0177e7",mentionColor:"#ffffff",centerChannelBg:"#1f1f1f",centerChannelColor:"#dddddd",newMessageSeparator:"#cc992d",linkColor:"#0d93ff",buttonBg:"#0177e7",buttonColor:"#ffffff",errorTextColor:"#ff6461",mentionHighlightBg:"#784098",mentionHighlightLink:"#a4ffeb",codeTheme:"monokai"}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PostTypes={CHANNEL_DELETED:"system_channel_deleted",CHANNEL_UNARCHIVED:"system_channel_restored",DISPLAYNAME_CHANGE:"system_displayname_change",CONVERT_CHANNEL:"system_convert_channel",EPHEMERAL:"system_ephemeral",EPHEMERAL_ADD_TO_CHANNEL:"system_ephemeral_add_to_channel",HEADER_CHANGE:"system_header_change",PURPOSE_CHANGE:"system_purpose_change",JOIN_LEAVE:"system_join_leave",JOIN_CHANNEL:"system_join_channel",GUEST_JOIN_CHANNEL:"system_guest_join_channel",LEAVE_CHANNEL:"system_leave_channel",ADD_REMOVE:"system_add_remove",ADD_TO_CHANNEL:"system_add_to_channel",ADD_GUEST_TO_CHANNEL:"system_add_guest_to_chan",REMOVE_FROM_CHANNEL:"system_remove_from_channel",JOIN_TEAM:"system_join_team",LEAVE_TEAM:"system_leave_team",ADD_TO_TEAM:"system_add_to_team",REMOVE_FROM_TEAM:"system_remove_from_team",COMBINED_USER_ACTIVITY:"system_combined_user_activity",ME:"me",ADD_BOT_TEAMS_CHANNELS:"add_bot_teams_channels"},t.default={POST_CHUNK_SIZE:60,POST_DELETED:"DELETED",SYSTEM_MESSAGE_PREFIX:"system_",SYSTEM_AUTO_RESPONDER:"system_auto_responder",POST_TYPES:t.PostTypes,MESSAGE_TYPES:{POST:"post",COMMENT:"comment"},MAX_PREV_MSGS:100,POST_COLLAPSE_TIMEOUT:3e5,IGNORE_POST_TYPES:[t.PostTypes.ADD_REMOVE,t.PostTypes.ADD_TO_CHANNEL,t.PostTypes.CHANNEL_DELETED,t.PostTypes.CHANNEL_UNARCHIVED,t.PostTypes.JOIN_LEAVE,t.PostTypes.JOIN_CHANNEL,t.PostTypes.LEAVE_CHANNEL,t.PostTypes.REMOVE_FROM_CHANNEL,t.PostTypes.JOIN_TEAM,t.PostTypes.LEAVE_TEAM,t.PostTypes.ADD_TO_TEAM,t.PostTypes.REMOVE_FROM_TEAM],USER_ACTIVITY_POST_TYPES:[t.PostTypes.ADD_TO_CHANNEL,t.PostTypes.JOIN_CHANNEL,t.PostTypes.LEAVE_CHANNEL,t.PostTypes.REMOVE_FROM_CHANNEL,t.PostTypes.ADD_TO_TEAM,t.PostTypes.JOIN_TEAM,t.PostTypes.LEAVE_TEAM,t.PostTypes.REMOVE_FROM_TEAM]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default={AUDIO_TYPES:["mp3","wav","wma","m4a","flac","aac","ogg"],CODE_TYPES:["as","applescript","osascript","scpt","bash","sh","zsh","clj","boot","cl2","cljc","cljs","cljs.hl","cljscm","cljx","hic","coffee","_coffee","cake","cjsx","cson","iced","cpp","c","cc","h","c++","h++","hpp","cs","csharp","css","d","di","dart","delphi","dpr","dfm","pas","pascal","freepascal","lazarus","lpr","lfm","diff","django","jinja","dockerfile","docker","erl","f90","f95","fsharp","fs","gcode","nc","go","groovy","handlebars","hbs","html.hbs","html.handlebars","hs","hx","java","jsp","js","jsx","json","jl","kt","ktm","kts","less","lisp","lua","mk","mak","md","mkdown","mkd","matlab","m","mm","objc","obj-c","ml","perl","pl","php","php3","php4","php5","php6","ps","ps1","pp","py","gyp","r","ruby","rb","gemspec","podspec","thor","irb","rs","scala","scm","sld","scss","st","sql","swift","tex","vbnet","vb","bas","vbs","v","veo","xml","html","xhtml","rss","atom","xsl","plist","yaml"],IMAGE_TYPES:["jpg","gif","bmp","png","jpeg","tiff","tif"],PATCH_TYPES:["patch"],PDF_TYPES:["pdf"],PRESENTATION_TYPES:["ppt","pptx"],SPREADSHEET_TYPES:["xlsx","csv"],TEXT_TYPES:["txt","rtf"],VIDEO_TYPES:["mp4","avi","webm","mkv","wmv","mpg","mov","flv"],WORD_TYPES:["doc","docx"]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default={ALERT_NOTIFICATION:"notification",ALERT_DEVELOPER:"developer",ALERT_ERROR:"error"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={TEAM_TYPE_OPEN:"O",TEAM_TYPE_INVITE:"I",SORT_USERNAME_OPTION:"Username"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2).__importDefault(n(3));t.default=r.default({TOTAL_USERS:null,TOTAL_INACTIVE_USERS:null,TOTAL_PUBLIC_CHANNELS:null,TOTAL_PRIVATE_GROUPS:null,TOTAL_POSTS:null,TOTAL_TEAMS:null,TOTAL_FILE_POSTS:null,TOTAL_HASHTAG_POSTS:null,TOTAL_IHOOKS:null,TOTAL_OHOOKS:null,TOTAL_COMMANDS:null,TOTAL_SESSIONS:null,POST_PER_DAY:null,BOT_POST_PER_DAY:null,USERS_WITH_POSTS_PER_DAY:null,RECENTLY_ACTIVE_USERS:null,NEWLY_CREATED_USERS:null,TOTAL_WEBSOCKET_CONNECTIONS:null,TOTAL_MASTER_DB_CONNECTIONS:null,TOTAL_READ_DB_CONNECTIONS:null,DAILY_ACTIVE_USERS:null,MONTHLY_ACTIVE_USERS:null})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={INVITE_USER:"invite_user",ADD_USER_TO_TEAM:"add_user_to_team",USE_SLASH_COMMANDS:"use_slash_commands",MANAGE_SLASH_COMMANDS:"manage_slash_commands",MANAGE_OTHERS_SLASH_COMMANDS:"manage_others_slash_commands",CREATE_PUBLIC_CHANNEL:"create_public_channel",CREATE_PRIVATE_CHANNEL:"create_private_channel",MANAGE_PUBLIC_CHANNEL_MEMBERS:"manage_public_channel_members",MANAGE_PRIVATE_CHANNEL_MEMBERS:"manage_private_channel_members",ASSIGN_SYSTEM_ADMIN_ROLE:"assign_system_admin_role",MANAGE_ROLES:"manage_roles",MANAGE_TEAM_ROLES:"manage_team_roles",MANAGE_CHANNEL_ROLES:"manage_channel_roles",MANAGE_SYSTEM:"manage_system",CREATE_DIRECT_CHANNEL:"create_direct_channel",CREATE_GROUP_CHANNEL:"create_group_channel",MANAGE_PUBLIC_CHANNEL_PROPERTIES:"manage_public_channel_properties",MANAGE_PRIVATE_CHANNEL_PROPERTIES:"manage_private_channel_properties",LIST_PUBLIC_TEAMS:"list_public_teams",JOIN_PUBLIC_TEAMS:"join_public_teams",LIST_PRIVATE_TEAMS:"list_private_teams",JOIN_PRIVATE_TEAMS:"join_private_teams",LIST_TEAM_CHANNELS:"list_team_channels",JOIN_PUBLIC_CHANNELS:"join_public_channels",DELETE_PUBLIC_CHANNEL:"delete_public_channel",DELETE_PRIVATE_CHANNEL:"delete_private_channel",EDIT_OTHER_USERS:"edit_other_users",READ_CHANNEL:"read_channel",READ_PUBLIC_CHANNEL:"read_public_channel",ADD_REACTION:"add_reaction",REMOVE_REACTION:"remove_reaction",REMOVE_OTHERS_REACTIONS:"remove_others_reactions",PERMANENT_DELETE_USER:"permanent_delete_user",UPLOAD_FILE:"upload_file",GET_PUBLIC_LINK:"get_public_link",MANAGE_WEBHOOKS:"manage_webhooks",MANAGE_OTHERS_WEBHOOKS:"manage_others_webhooks",MANAGE_INCOMING_WEBHOOKS:"manage_incoming_webhooks",MANAGE_OTHERS_INCOMING_WEBHOOKS:"manage_others_incoming_webhooks",MANAGE_OUTGOING_WEBHOOKS:"manage_outgoing_webhooks",MANAGE_OTHERS_OUTGOING_WEBHOOKS:"manage_others_outgoing_webhooks",MANAGE_OAUTH:"manage_oauth",MANAGE_SYSTEM_WIDE_OAUTH:"manage_system_wide_oauth",CREATE_POST:"create_post",CREATE_POST_PUBLIC:"create_post_public",EDIT_POST:"edit_post",EDIT_OTHERS_POSTS:"edit_others_posts",DELETE_POST:"delete_post",DELETE_OTHERS_POSTS:"delete_others_posts",REMOVE_USER_FROM_TEAM:"remove_user_from_team",CREATE_TEAM:"create_team",MANAGE_TEAM:"manage_team",IMPORT_TEAM:"import_team",VIEW_TEAM:"view_team",LIST_USERS_WITHOUT_TEAM:"list_users_without_team",CREATE_USER_ACCESS_TOKEN:"create_user_access_token",READ_USER_ACCESS_TOKEN:"read_user_access_token",REVOKE_USER_ACCESS_TOKEN:"revoke_user_access_token",MANAGE_JOBS:"manage_jobs",MANAGE_EMOJIS:"manage_emojis",MANAGE_OTHERS_EMOJIS:"manage_others_emojis",CREATE_EMOJIS:"create_emojis",DELETE_EMOJIS:"delete_emojis",DELETE_OTHERS_EMOJIS:"delete_others_emojis",VIEW_MEMBERS:"view_members",INVITE_GUEST:"invite_guest",PROMOTE_GUEST:"promote_guest",DEMOTE_TO_GUEST:"demote_to_guest",USE_CHANNEL_MENTIONS:"use_channel_mentions",USE_GROUP_MENTIONS:"use_group_mentions",CHANNEL_MODERATED_PERMISSIONS:{CREATE_POST:"create_post",CREATE_REACTIONS:"create_reactions",MANAGE_MEMBERS:"manage_members",USE_CHANNEL_MENTIONS:"use_channel_mentions"},MANAGE_BOTS:"manage_bots",MANAGE_OTHERS_BOTS:"manage_others_bots"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={SORT_BY_NAME:"name"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={PLUGIN_STATE_NOT_RUNNING:0,PLUGIN_STATE_STARTING:1,PLUGIN_STATE_RUNNING:2,PLUGIN_STATE_FAILED_TO_START:3,PLUGIN_STATE_FAILED_TO_STAY_RUNNING:4,PLUGIN_STATE_STOPPING:5}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={SYNCABLE_TYPE_TEAM:"team",SYNCABLE_TYPE_CHANNEL:"channel"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={IGNORE_CHANNEL_MENTIONS_ON:"on",IGNORE_CHANNEL_MENTIONS_OFF:"off",IGNORE_CHANNEL_MENTIONS_DEFAULT:"default"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={MEMBERS:"members",GUESTS:"guests",ADMINS:"admins"}},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=n(15),o=n(156),a=n(7),s=n(37),u=r.__importDefault(n(158)),l=n(159);t.HEADER_X_VERSION_ID="X-Version-Id";t.DEFAULT_LIMIT_BEFORE=30,t.DEFAULT_LIMIT_AFTER=30;var c=function(){function n(){var e=this;this.logToConsole=!1,this.serverVersion="",this.clusterId="",this.token="",this.csrf="",this.url="",this.urlVersion="/api/v4",this.userAgent=null,this.enableLogging=!1,this.defaultHeaders={},this.userId="",this.diagnosticId="",this.includeCookies=!0,this.translations={connectionError:"There appears to be a problem with your internet connection.",unknownError:"We received an unexpected status code from the server."},this.createUser=function(t,n,o){return r.__awaiter(e,void 0,void 0,(function(){var e;return r.__generator(this,(function(r){return this.trackEvent("api","api_users_create"),e={},n&&(e.t=n),o&&(e.iid=o),[2,this.doFetch(""+this.getUsersRoute()+i.buildQueryString(e),{method:"post",body:JSON.stringify(t)})]}))}))},this.patchMe=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getUserRoute("me")+"/patch",{method:"put",body:JSON.stringify(t)})]}))}))},this.patchUser=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return this.trackEvent("api","api_users_patch"),[2,this.doFetch(this.getUserRoute(t.id)+"/patch",{method:"put",body:JSON.stringify(t)})]}))}))},this.updateUser=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return this.trackEvent("api","api_users_update"),[2,this.doFetch(""+this.getUserRoute(t.id),{method:"put",body:JSON.stringify(t)})]}))}))},this.promoteGuestToUser=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return this.trackEvent("api","api_users_promote_guest_to_user"),[2,this.doFetch(this.getUserRoute(t)+"/promote",{method:"post"})]}))}))},this.demoteUserToGuest=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return this.trackEvent("api","api_users_demote_user_to_guest"),[2,this.doFetch(this.getUserRoute(t)+"/demote",{method:"post"})]}))}))},this.updateUserRoles=function(t,n){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return this.trackEvent("api","api_users_update_roles"),[2,this.doFetch(this.getUserRoute(t)+"/roles",{method:"put",body:JSON.stringify({roles:n})})]}))}))},this.updateUserMfa=function(t,n,i){return r.__awaiter(e,void 0,void 0,(function(){var e;return r.__generator(this,(function(r){return e={activate:n},n&&(e.code=i),[2,this.doFetch(this.getUserRoute(t)+"/mfa",{method:"put",body:JSON.stringify(e)})]}))}))},this.updateUserPassword=function(t,n,i){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return this.trackEvent("api","api_users_newpassword"),[2,this.doFetch(this.getUserRoute(t)+"/password",{method:"put",body:JSON.stringify({current_password:n,new_password:i})})]}))}))},this.resetUserPassword=function(t,n){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return this.trackEvent("api","api_users_reset_password"),[2,this.doFetch(this.getUsersRoute()+"/password/reset",{method:"post",body:JSON.stringify({token:t,new_password:n})})]}))}))},this.getKnownUsers=function(){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return this.trackEvent("api","api_get_known_users"),[2,this.doFetch(this.getUsersRoute()+"/known",{method:"get"})]}))}))},this.sendPasswordResetEmail=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return this.trackEvent("api","api_users_send_password_reset"),[2,this.doFetch(this.getUsersRoute()+"/password/reset/send",{method:"post",body:JSON.stringify({email:t})})]}))}))},this.updateUserActive=function(t,n){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return this.trackEvent("api","api_users_update_active"),[2,this.doFetch(this.getUserRoute(t)+"/active",{method:"put",body:JSON.stringify({active:n})})]}))}))},this.uploadProfileImage=function(t,n){return r.__awaiter(e,void 0,void 0,(function(){var e,i;return r.__generator(this,(function(r){return this.trackEvent("api","api_users_update_profile_picture"),(e=new l).append("image",n),i={method:"post",body:e},e.getBoundary&&(i.headers={"Content-Type":"multipart/form-data; boundary="+e.getBoundary()}),[2,this.doFetch(this.getUserRoute(t)+"/image",i)]}))}))},this.setDefaultProfileImage=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return this.trackEvent("api","api_users_set_default_profile_picture"),[2,this.doFetch(this.getUserRoute(t)+"/image",{method:"delete"})]}))}))},this.verifyUserEmail=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getUsersRoute()+"/email/verify",{method:"post",body:JSON.stringify({token:t})})]}))}))},this.updateMyTermsOfServiceStatus=function(t,n){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getUserRoute("me")+"/terms_of_service",{method:"post",body:JSON.stringify({termsOfServiceId:t,accepted:n})})]}))}))},this.getTermsOfService=function(){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getBaseRoute()+"/terms_of_service",{method:"get"})]}))}))},this.createTermsOfService=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getBaseRoute()+"/terms_of_service",{method:"post",body:JSON.stringify({text:t})})]}))}))},this.sendVerificationEmail=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getUsersRoute()+"/email/verify/send",{method:"post",body:JSON.stringify({email:t})})]}))}))},this.login=function(t,n,i,o,a){return void 0===i&&(i=""),void 0===o&&(o=""),void 0===a&&(a=!1),r.__awaiter(e,void 0,void 0,(function(){var e;return r.__generator(this,(function(r){switch(r.label){case 0:return this.trackEvent("api","api_users_login"),a&&this.trackEvent("api","api_users_login_ldap"),e={device_id:o,login_id:t,password:n,token:i},a&&(e.ldap_only="true"),[4,this.doFetchWithResponse(this.getUsersRoute()+"/login",{method:"post",body:JSON.stringify(e)})];case 1:return[2,r.sent().data]}}))}))},this.loginById=function(t,n,i,o){return void 0===i&&(i=""),void 0===o&&(o=""),r.__awaiter(e,void 0,void 0,(function(){var e;return r.__generator(this,(function(r){switch(r.label){case 0:return this.trackEvent("api","api_users_login"),e={device_id:o,id:t,password:n,token:i},[4,this.doFetchWithResponse(this.getUsersRoute()+"/login",{method:"post",body:JSON.stringify(e)})];case 1:return[2,r.sent().data]}}))}))},this.logout=function(){return r.__awaiter(e,void 0,void 0,(function(){var e;return r.__generator(this,(function(t){switch(t.label){case 0:return this.trackEvent("api","api_users_logout"),[4,this.doFetchWithResponse(this.getUsersRoute()+"/logout",{method:"post"})];case 1:return(e=t.sent().response).ok&&(this.token=""),this.serverVersion="",[2,e]}}))}))},this.getProfiles=function(t,n,o){return void 0===t&&(t=0),void 0===n&&(n=60),void 0===o&&(o={}),r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return this.trackEvent("api","api_profiles_get"),[2,this.doFetch(""+this.getUsersRoute()+i.buildQueryString(r.__assign({page:t,per_page:n},o)),{method:"get"})]}))}))},this.getProfilesByIds=function(t,n){return void 0===n&&(n={}),r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return this.trackEvent("api","api_profiles_get_by_ids"),[2,this.doFetch(this.getUsersRoute()+"/ids"+i.buildQueryString(n),{method:"post",body:JSON.stringify(t)})]}))}))},this.getProfilesByUsernames=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return this.trackEvent("api","api_profiles_get_by_usernames"),[2,this.doFetch(this.getUsersRoute()+"/usernames",{method:"post",body:JSON.stringify(t)})]}))}))},this.getProfilesInTeam=function(t,n,o,a,s){return void 0===n&&(n=0),void 0===o&&(o=60),void 0===a&&(a=""),void 0===s&&(s={}),r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return this.trackEvent("api","api_profiles_get_in_team",{team_id:t,sort:a}),[2,this.doFetch(""+this.getUsersRoute()+i.buildQueryString(r.__assign(r.__assign({},s),{in_team:t,page:n,per_page:o,sort:a})),{method:"get"})]}))}))},this.getProfilesNotInTeam=function(t,n,o,a){return void 0===o&&(o=0),void 0===a&&(a=60),r.__awaiter(e,void 0,void 0,(function(){var e;return r.__generator(this,(function(r){return this.trackEvent("api","api_profiles_get_not_in_team",{team_id:t,group_constrained:n}),e={not_in_team:t,page:o,per_page:a},n&&(e.group_constrained=!0),[2,this.doFetch(""+this.getUsersRoute()+i.buildQueryString(e),{method:"get"})]}))}))},this.getProfilesWithoutTeam=function(t,n,o){return void 0===t&&(t=0),void 0===n&&(n=60),void 0===o&&(o={}),r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return this.trackEvent("api","api_profiles_get_without_team"),[2,this.doFetch(""+this.getUsersRoute()+i.buildQueryString(r.__assign(r.__assign({},o),{without_team:1,page:t,per_page:n})),{method:"get"})]}))}))},this.getProfilesInChannel=function(t,n,o,a){return void 0===n&&(n=0),void 0===o&&(o=60),void 0===a&&(a=""),r.__awaiter(e,void 0,void 0,(function(){var e,s;return r.__generator(this,(function(r){return this.trackEvent("api","api_profiles_get_in_channel",{channel_id:t}),e=this.getServerVersion(),s=i.isMinimumServerVersion(e,4,7)?{in_channel:t,page:n,per_page:o,sort:a}:{in_channel:t,page:n,per_page:o},[2,this.doFetch(""+this.getUsersRoute()+i.buildQueryString(s),{method:"get"})]}))}))},this.getProfilesInGroupChannels=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return this.trackEvent("api","api_profiles_get_in_group_channels",{channelsIds:t}),[2,this.doFetch(this.getUsersRoute()+"/group_channels",{method:"post",body:JSON.stringify(t)})]}))}))},this.getProfilesNotInChannel=function(t,n,o,a,s){return void 0===a&&(a=0),void 0===s&&(s=60),r.__awaiter(e,void 0,void 0,(function(){var e;return r.__generator(this,(function(r){return this.trackEvent("api","api_profiles_get_not_in_channel",{team_id:t,channel_id:n,group_constrained:o}),e={in_team:t,not_in_channel:n,page:a,per_page:s},o&&(e.group_constrained=!0),[2,this.doFetch(""+this.getUsersRoute()+i.buildQueryString(e),{method:"get"})]}))}))},this.getMe=function(){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(""+this.getUserRoute("me"),{method:"get"})]}))}))},this.getUser=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(""+this.getUserRoute(t),{method:"get"})]}))}))},this.getUserByUsername=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getUsersRoute()+"/username/"+t,{method:"get"})]}))}))},this.getUserByEmail=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getUsersRoute()+"/email/"+t,{method:"get"})]}))}))},this.getProfilePictureUrl=function(t,n){var r={};return n&&(r._=n),e.getUserRoute(t)+"/image"+i.buildQueryString(r)},this.getDefaultProfilePictureUrl=function(t){return e.getUserRoute(t)+"/image/default"},this.autocompleteUsers=function(t,n,o,s){return void 0===s&&(s={limit:a.General.AUTOCOMPLETE_LIMIT_DEFAULT}),r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getUsersRoute()+"/autocomplete"+i.buildQueryString({in_team:n,in_channel:o,name:t,limit:s.limit}),{method:"get"})]}))}))},this.getSessions=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getUserRoute(t)+"/sessions",{method:"get"})]}))}))},this.revokeSession=function(t,n){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getUserRoute(t)+"/sessions/revoke",{method:"post",body:JSON.stringify({session_id:n})})]}))}))},this.revokeAllSessionsForUser=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getUserRoute(t)+"/sessions/revoke/all",{method:"post"})]}))}))},this.revokeSessionsForAllUsers=function(){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getUsersRoute()+"/sessions/revoke/all",{method:"post"})]}))}))},this.getUserAudits=function(t,n,o){return void 0===n&&(n=0),void 0===o&&(o=60),r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getUserRoute(t)+"/audits"+i.buildQueryString({page:n,per_page:o}),{method:"get"})]}))}))},this.checkUserMfa=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getUsersRoute()+"/mfa",{method:"post",body:JSON.stringify({login_id:t})})]}))}))},this.generateMfaSecret=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getUserRoute(t)+"/mfa/generate",{method:"post"})]}))}))},this.attachDevice=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getUsersRoute()+"/sessions/device",{method:"put",body:JSON.stringify({device_id:t})})]}))}))},this.searchUsers=function(t,n){return e.trackEvent("api","api_search_users"),e.doFetch(e.getUsersRoute()+"/search",{method:"post",body:JSON.stringify(r.__assign({term:t},n))})},this.getStatusesByIds=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getUsersRoute()+"/status/ids",{method:"post",body:JSON.stringify(t)})]}))}))},this.getStatus=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getUserRoute(t)+"/status",{method:"get"})]}))}))},this.updateStatus=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getUserRoute(t.user_id)+"/status",{method:"put",body:JSON.stringify(t)})]}))}))},this.switchEmailToOAuth=function(t,n,i,o){return void 0===o&&(o=""),r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return this.trackEvent("api","api_users_email_to_oauth"),[2,this.doFetch(this.getUsersRoute()+"/login/switch",{method:"post",body:JSON.stringify({current_service:"email",new_service:t,email:n,password:i,mfa_code:o})})]}))}))},this.switchOAuthToEmail=function(t,n,i){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return this.trackEvent("api","api_users_oauth_to_email"),[2,this.doFetch(this.getUsersRoute()+"/login/switch",{method:"post",body:JSON.stringify({current_service:t,new_service:"email",email:n,new_password:i})})]}))}))},this.switchEmailToLdap=function(t,n,i,o,a){return void 0===a&&(a=""),r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return this.trackEvent("api","api_users_email_to_ldap"),[2,this.doFetch(this.getUsersRoute()+"/login/switch",{method:"post",body:JSON.stringify({current_service:"email",new_service:"ldap",email:t,password:n,ldap_id:i,new_password:o,mfa_code:a})})]}))}))},this.switchLdapToEmail=function(t,n,i,o){return void 0===o&&(o=""),r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return this.trackEvent("api","api_users_ldap_to_email"),[2,this.doFetch(this.getUsersRoute()+"/login/switch",{method:"post",body:JSON.stringify({current_service:"ldap",new_service:"email",email:n,password:t,new_password:i,mfa_code:o})})]}))}))},this.getAuthorizedOAuthApps=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getUserRoute(t)+"/oauth/apps/authorized",{method:"get"})]}))}))},this.authorizeOAuthApp=function(t,n,i,o,a){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.url+"/oauth/authorize",{method:"post",body:JSON.stringify({client_id:n,response_type:t,redirect_uri:i,state:o,scope:a})})]}))}))},this.deauthorizeOAuthApp=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.url+"/oauth/deauthorize",{method:"post",body:JSON.stringify({client_id:t})})]}))}))},this.createUserAccessToken=function(t,n){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return this.trackEvent("api","api_users_create_access_token"),[2,this.doFetch(this.getUserRoute(t)+"/tokens",{method:"post",body:JSON.stringify({description:n})})]}))}))},this.getUserAccessToken=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getUsersRoute()+"/tokens/"+t,{method:"get"})]}))}))},this.getUserAccessTokensForUser=function(t,n,o){return void 0===n&&(n=0),void 0===o&&(o=60),r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getUserRoute(t)+"/tokens"+i.buildQueryString({page:n,per_page:o}),{method:"get"})]}))}))},this.getUserAccessTokens=function(t,n){return void 0===t&&(t=0),void 0===n&&(n=60),r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getUsersRoute()+"/tokens"+i.buildQueryString({page:t,per_page:n}),{method:"get"})]}))}))},this.revokeUserAccessToken=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return this.trackEvent("api","api_users_revoke_access_token"),[2,this.doFetch(this.getUsersRoute()+"/tokens/revoke",{method:"post",body:JSON.stringify({token_id:t})})]}))}))},this.disableUserAccessToken=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getUsersRoute()+"/tokens/disable",{method:"post",body:JSON.stringify({token_id:t})})]}))}))},this.enableUserAccessToken=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getUsersRoute()+"/tokens/enable",{method:"post",body:JSON.stringify({token_id:t})})]}))}))},this.createTeam=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return this.trackEvent("api","api_teams_create"),[2,this.doFetch(""+this.getTeamsRoute(),{method:"post",body:JSON.stringify(t)})]}))}))},this.deleteTeam=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return this.trackEvent("api","api_teams_delete"),[2,this.doFetch(""+this.getTeamRoute(t),{method:"delete"})]}))}))},this.updateTeam=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return this.trackEvent("api","api_teams_update_name",{team_id:t.id}),[2,this.doFetch(""+this.getTeamRoute(t.id),{method:"put",body:JSON.stringify(t)})]}))}))},this.patchTeam=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return this.trackEvent("api","api_teams_patch_name",{team_id:t.id}),[2,this.doFetch(this.getTeamRoute(t.id)+"/patch",{method:"put",body:JSON.stringify(t)})]}))}))},this.regenerateTeamInviteId=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return this.trackEvent("api","api_teams_regenerate_invite_id",{team_id:t}),[2,this.doFetch(this.getTeamRoute(t)+"/regenerate_invite_id",{method:"post"})]}))}))},this.updateTeamScheme=function(t,n){return r.__awaiter(e,void 0,void 0,(function(){var e;return r.__generator(this,(function(i){return e={scheme_id:n},this.trackEvent("api","api_teams_update_scheme",r.__assign({team_id:t},e)),[2,this.doFetch(""+this.getTeamSchemeRoute(t),{method:"put",body:JSON.stringify(e)})]}))}))},this.checkIfTeamExists=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getTeamNameRoute(t)+"/exists",{method:"get"})]}))}))},this.getTeams=function(t,n,o){return void 0===t&&(t=0),void 0===n&&(n=60),void 0===o&&(o=!1),r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(""+this.getTeamsRoute()+i.buildQueryString({page:t,per_page:n,include_total_count:o}),{method:"get"})]}))}))},this.searchTeams=function(t,n,r){return e.trackEvent("api","api_search_teams"),e.doFetch(e.getTeamsRoute()+"/search",{method:"post",body:JSON.stringify({term:t,page:n,per_page:r})})},this.getTeam=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getTeamRoute(t),{method:"get"})]}))}))},this.getTeamByName=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return this.trackEvent("api","api_teams_get_team_by_name"),[2,this.doFetch(this.getTeamNameRoute(t),{method:"get"})]}))}))},this.getMyTeams=function(){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getUserRoute("me")+"/teams",{method:"get"})]}))}))},this.getTeamsForUser=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getUserRoute(t)+"/teams",{method:"get"})]}))}))},this.getMyTeamMembers=function(){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getUserRoute("me")+"/teams/members",{method:"get"})]}))}))},this.getMyTeamUnreads=function(){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getUserRoute("me")+"/teams/unread",{method:"get"})]}))}))},this.getTeamMembers=function(t,n,o,a){return void 0===n&&(n=0),void 0===o&&(o=60),r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(""+this.getTeamMembersRoute(t)+i.buildQueryString(r.__assign({page:n,per_page:o},a)),{method:"get"})]}))}))},this.getTeamMembersForUser=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getUserRoute(t)+"/teams/members",{method:"get"})]}))}))},this.getTeamMember=function(t,n){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(""+this.getTeamMemberRoute(t,n),{method:"get"})]}))}))},this.getTeamMembersByIds=function(t,n){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getTeamMembersRoute(t)+"/ids",{method:"post",body:JSON.stringify(n)})]}))}))},this.addToTeam=function(t,n){return r.__awaiter(e,void 0,void 0,(function(){var e;return r.__generator(this,(function(r){return this.trackEvent("api","api_teams_invite_members",{team_id:t}),e={user_id:n,team_id:t},[2,this.doFetch(""+this.getTeamMembersRoute(t),{method:"post",body:JSON.stringify(e)})]}))}))},this.addToTeamFromInvite=function(t,n){return void 0===t&&(t=""),void 0===n&&(n=""),r.__awaiter(e,void 0,void 0,(function(){var e;return r.__generator(this,(function(r){return this.trackEvent("api","api_teams_invite_members"),e=i.buildQueryString({token:t,invite_id:n}),[2,this.doFetch(this.getTeamsRoute()+"/members/invite"+e,{method:"post"})]}))}))},this.addUsersToTeam=function(t,n){return r.__awaiter(e,void 0,void 0,(function(){var e;return r.__generator(this,(function(r){return this.trackEvent("api","api_teams_batch_add_members",{team_id:t,count:n.length}),e=[],n.forEach((function(n){return e.push({team_id:t,user_id:n})})),[2,this.doFetch(this.getTeamMembersRoute(t)+"/batch",{method:"post",body:JSON.stringify(e)})]}))}))},this.addUsersToTeamGracefully=function(t,n){return r.__awaiter(e,void 0,void 0,(function(){var e;return r.__generator(this,(function(r){return this.trackEvent("api","api_teams_batch_add_members",{team_id:t,count:n.length}),e=[],n.forEach((function(n){return e.push({team_id:t,user_id:n})})),[2,this.doFetch(this.getTeamMembersRoute(t)+"/batch?graceful=true",{method:"post",body:JSON.stringify(e)})]}))}))},this.joinTeam=function(t){return r.__awaiter(e,void 0,void 0,(function(){var e;return r.__generator(this,(function(n){return e=i.buildQueryString({invite_id:t}),[2,this.doFetch(this.getTeamsRoute()+"/members/invite"+e,{method:"post"})]}))}))},this.removeFromTeam=function(t,n){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return this.trackEvent("api","api_teams_remove_members",{team_id:t}),[2,this.doFetch(""+this.getTeamMemberRoute(t,n),{method:"delete"})]}))}))},this.getTeamStats=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getTeamRoute(t)+"/stats",{method:"get"})]}))}))},this.getTotalUsersStats=function(){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getUsersRoute()+"/stats",{method:"get"})]}))}))},this.invalidateAllEmailInvites=function(){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getTeamsRoute()+"/invites/email",{method:"delete"})]}))}))},this.getTeamInviteInfo=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getTeamsRoute()+"/invite/"+t,{method:"get"})]}))}))},this.updateTeamMemberRoles=function(t,n,i){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return this.trackEvent("api","api_teams_update_member_roles",{team_id:t}),[2,this.doFetch(this.getTeamMemberRoute(t,n)+"/roles",{method:"put",body:JSON.stringify({roles:i})})]}))}))},this.sendEmailInvitesToTeam=function(t,n){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return this.trackEvent("api","api_teams_invite_members",{team_id:t}),[2,this.doFetch(this.getTeamRoute(t)+"/invite/email",{method:"post",body:JSON.stringify(n)})]}))}))},this.sendEmailGuestInvitesToChannels=function(t,n,i,o){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return this.trackEvent("api","api_teams_invite_guests",{team_id:t,channel_ids:n}),[2,this.doFetch(this.getTeamRoute(t)+"/invite-guests/email",{method:"post",body:JSON.stringify({emails:i,channels:n,message:o})})]}))}))},this.sendEmailInvitesToTeamGracefully=function(t,n){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return this.trackEvent("api","api_teams_invite_members",{team_id:t}),[2,this.doFetch(this.getTeamRoute(t)+"/invite/email?graceful=true",{method:"post",body:JSON.stringify(n)})]}))}))},this.sendEmailGuestInvitesToChannelsGracefully=function(t,n,i,o){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return this.trackEvent("api","api_teams_invite_guests",{team_id:t,channel_ids:n}),[2,this.doFetch(this.getTeamRoute(t)+"/invite-guests/email?graceful=true",{method:"post",body:JSON.stringify({emails:i,channels:n,message:o})})]}))}))},this.importTeam=function(t,n,i){return r.__awaiter(e,void 0,void 0,(function(){var e,o;return r.__generator(this,(function(r){return(e=new l).append("file",n,n.name),e.append("filesize",n.size),e.append("importFrom",i),o={method:"post",body:e},e.getBoundary&&(o.headers={"Content-Type":"multipart/form-data; boundary="+e.getBoundary()}),[2,this.doFetch(this.getTeamRoute(t)+"/import",o)]}))}))},this.getTeamIconUrl=function(t,n){var r={};return n&&(r._=n),e.getTeamRoute(t)+"/image"+i.buildQueryString(r)},this.setTeamIcon=function(t,n){return r.__awaiter(e,void 0,void 0,(function(){var e,i;return r.__generator(this,(function(r){return this.trackEvent("api","api_team_set_team_icon"),(e=new l).append("image",n),i={method:"post",body:e},e.getBoundary&&(i.headers={"Content-Type":"multipart/form-data; boundary="+e.getBoundary()}),[2,this.doFetch(this.getTeamRoute(t)+"/image",i)]}))}))},this.removeTeamIcon=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return this.trackEvent("api","api_team_remove_team_icon"),[2,this.doFetch(this.getTeamRoute(t)+"/image",{method:"delete"})]}))}))},this.updateTeamMemberSchemeRoles=function(t,n,i,o){return r.__awaiter(e,void 0,void 0,(function(){var e;return r.__generator(this,(function(r){return e={scheme_user:i,scheme_admin:o},[2,this.doFetch(this.getTeamRoute(t)+"/members/"+n+"/schemeRoles",{method:"put",body:JSON.stringify(e)})]}))}))},this.getAllChannels=function(t,n,o,a,s){return void 0===t&&(t=0),void 0===n&&(n=60),void 0===o&&(o=""),void 0===a&&(a=!1),void 0===s&&(s=!1),r.__awaiter(e,void 0,void 0,(function(){var e;return r.__generator(this,(function(r){return e={page:t,per_page:n,not_associated_to_group:o,exclude_default_channels:a,include_total_count:s},[2,this.doFetch(""+this.getChannelsRoute()+i.buildQueryString(e),{method:"get"})]}))}))},this.createChannel=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return this.trackEvent("api","api_channels_create",{team_id:t.team_id}),[2,this.doFetch(""+this.getChannelsRoute(),{method:"post",body:JSON.stringify(t)})]}))}))},this.createDirectChannel=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return this.trackEvent("api","api_channels_create_direct"),[2,this.doFetch(this.getChannelsRoute()+"/direct",{method:"post",body:JSON.stringify(t)})]}))}))},this.createGroupChannel=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return this.trackEvent("api","api_channels_create_group"),[2,this.doFetch(this.getChannelsRoute()+"/group",{method:"post",body:JSON.stringify(t)})]}))}))},this.deleteChannel=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return this.trackEvent("api","api_channels_delete",{channel_id:t}),[2,this.doFetch(""+this.getChannelRoute(t),{method:"delete"})]}))}))},this.unarchiveChannel=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return this.trackEvent("api","api_channels_unarchive",{channel_id:t}),[2,this.doFetch(this.getChannelRoute(t)+"/restore",{method:"post"})]}))}))},this.updateChannel=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return this.trackEvent("api","api_channels_update",{channel_id:t.id}),[2,this.doFetch(""+this.getChannelRoute(t.id),{method:"put",body:JSON.stringify(t)})]}))}))},this.convertChannelToPrivate=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return this.trackEvent("api","api_channels_convert_to_private",{channel_id:t}),[2,this.doFetch(this.getChannelRoute(t)+"/convert",{method:"post"})]}))}))},this.updateChannelPrivacy=function(t,n){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return this.trackEvent("api","api_channels_update_privacy",{channel_id:t,privacy:n}),[2,this.doFetch(this.getChannelRoute(t)+"/privacy",{method:"put",body:JSON.stringify({privacy:n})})]}))}))},this.patchChannel=function(t,n){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return this.trackEvent("api","api_channels_patch",{channel_id:t}),[2,this.doFetch(this.getChannelRoute(t)+"/patch",{method:"put",body:JSON.stringify(n)})]}))}))},this.updateChannelNotifyProps=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return this.trackEvent("api","api_users_update_channel_notifcations",{channel_id:t.channel_id}),[2,this.doFetch(this.getChannelMemberRoute(t.channel_id,t.user_id)+"/notify_props",{method:"put",body:JSON.stringify(t)})]}))}))},this.updateChannelScheme=function(t,n){return r.__awaiter(e,void 0,void 0,(function(){var e;return r.__generator(this,(function(i){return e={scheme_id:n},this.trackEvent("api","api_channels_update_scheme",r.__assign({channel_id:t},e)),[2,this.doFetch(""+this.getChannelSchemeRoute(t),{method:"put",body:JSON.stringify(e)})]}))}))},this.getChannel=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return this.trackEvent("api","api_channel_get",{channel_id:t}),[2,this.doFetch(""+this.getChannelRoute(t),{method:"get"})]}))}))},this.getChannelByName=function(t,n,i){return void 0===i&&(i=!1),r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getTeamRoute(t)+"/channels/name/"+n+"?include_deleted="+i,{method:"get"})]}))}))},this.getChannelByNameAndTeamName=function(t,n,i){return void 0===i&&(i=!1),r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return this.trackEvent("api","api_channel_get_by_name_and_teamName",{include_deleted:i}),[2,this.doFetch(this.getTeamNameRoute(t)+"/channels/name/"+n+"?include_deleted="+i,{method:"get"})]}))}))},this.getChannels=function(t,n,o){return void 0===n&&(n=0),void 0===o&&(o=60),r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getTeamRoute(t)+"/channels"+i.buildQueryString({page:n,per_page:o}),{method:"get"})]}))}))},this.getArchivedChannels=function(t,n,o){return void 0===n&&(n=0),void 0===o&&(o=60),r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getTeamRoute(t)+"/channels/deleted"+i.buildQueryString({page:n,per_page:o}),{method:"get"})]}))}))},this.getMyChannels=function(t,n){return void 0===n&&(n=!1),r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getUserRoute("me")+"/teams/"+t+"/channels"+i.buildQueryString({include_deleted:n}),{method:"get"})]}))}))},this.getMyChannelMember=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(""+this.getChannelMemberRoute(t,"me"),{method:"get"})]}))}))},this.getMyChannelMembers=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getUserRoute("me")+"/teams/"+t+"/channels/members",{method:"get"})]}))}))},this.getChannelMembers=function(t,n,o){return void 0===n&&(n=0),void 0===o&&(o=60),r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(""+this.getChannelMembersRoute(t)+i.buildQueryString({page:n,per_page:o}),{method:"get"})]}))}))},this.getChannelTimezones=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getChannelRoute(t)+"/timezones",{method:"get"})]}))}))},this.getChannelMember=function(t,n){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(""+this.getChannelMemberRoute(t,n),{method:"get"})]}))}))},this.getChannelMembersByIds=function(t,n){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getChannelMembersRoute(t)+"/ids",{method:"post",body:JSON.stringify(n)})]}))}))},this.addToChannel=function(t,n,i){return void 0===i&&(i=""),r.__awaiter(e,void 0,void 0,(function(){var e;return r.__generator(this,(function(r){return this.trackEvent("api","api_channels_add_member",{channel_id:n}),e={user_id:t,channel_id:n,post_root_id:i},[2,this.doFetch(""+this.getChannelMembersRoute(n),{method:"post",body:JSON.stringify(e)})]}))}))},this.removeFromChannel=function(t,n){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return this.trackEvent("api","api_channels_remove_member",{channel_id:n}),[2,this.doFetch(""+this.getChannelMemberRoute(n,t),{method:"delete"})]}))}))},this.updateChannelMemberRoles=function(t,n,i){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getChannelMemberRoute(t,n)+"/roles",{method:"put",body:JSON.stringify({roles:i})})]}))}))},this.getChannelStats=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getChannelRoute(t)+"/stats",{method:"get"})]}))}))},this.getChannelModerations=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getChannelRoute(t)+"/moderations",{method:"get"})]}))}))},this.patchChannelModerations=function(t,n){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getChannelRoute(t)+"/moderations/patch",{method:"put",body:JSON.stringify(n)})]}))}))},this.viewMyChannel=function(t,n){return r.__awaiter(e,void 0,void 0,(function(){var e;return r.__generator(this,(function(r){return e={channel_id:t,prev_channel_id:n},[2,this.doFetch(this.getChannelsRoute()+"/members/me/view",{method:"post",body:JSON.stringify(e)})]}))}))},this.autocompleteChannels=function(t,n){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getTeamRoute(t)+"/channels/autocomplete"+i.buildQueryString({name:n}),{method:"get"})]}))}))},this.autocompleteChannelsForSearch=function(t,n){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getTeamRoute(t)+"/channels/search_autocomplete"+i.buildQueryString({name:n}),{method:"get"})]}))}))},this.searchChannels=function(t,n){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getTeamRoute(t)+"/channels/search",{method:"post",body:JSON.stringify({term:n})})]}))}))},this.searchArchivedChannels=function(t,n){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getTeamRoute(t)+"/channels/search_archived",{method:"post",body:JSON.stringify({term:n})})]}))}))},this.searchAllChannels=function(t,n,i,o,a){return void 0===n&&(n=""),void 0===i&&(i=!1),r.__awaiter(e,void 0,void 0,(function(){var e;return r.__generator(this,(function(r){return e={term:t,not_associated_to_group:n,exclude_default_channels:i,page:o,per_page:a},[2,this.doFetch(this.getChannelsRoute()+"/search",{method:"post",body:JSON.stringify(e)})]}))}))},this.searchGroupChannels=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getChannelsRoute()+"/group/search",{method:"post",body:JSON.stringify({term:t})})]}))}))},this.updateChannelMemberSchemeRoles=function(t,n,i,o){return r.__awaiter(e,void 0,void 0,(function(){var e;return r.__generator(this,(function(r){return e={scheme_user:i,scheme_admin:o},[2,this.doFetch(this.getChannelRoute(t)+"/members/"+n+"/schemeRoles",{method:"put",body:JSON.stringify(e)})]}))}))},this.createPost=function(t){return r.__awaiter(e,void 0,void 0,(function(){var e,n;return r.__generator(this,(function(r){switch(r.label){case 0:return[4,this.doFetch(""+this.getPostsRoute(),{method:"post",body:JSON.stringify(t)})];case 1:return e=r.sent(),n={channel_id:e.channel_id,post_id:e.id,user_actual_id:e.user_id,root_id:e.root_id},this.trackEvent("api","api_posts_create",n),null!=e.root_id&&""!==e.root_id&&this.trackEvent("api","api_posts_replied",n),[2,e]}}))}))},this.updatePost=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return this.trackEvent("api","api_posts_update",{channel_id:t.channel_id,post_id:t.id}),[2,this.doFetch(""+this.getPostRoute(t.id),{method:"put",body:JSON.stringify(t)})]}))}))},this.getPost=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(""+this.getPostRoute(t),{method:"get"})]}))}))},this.patchPost=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return this.trackEvent("api","api_posts_patch",{channel_id:t.channel_id,post_id:t.id}),[2,this.doFetch(this.getPostRoute(t.id)+"/patch",{method:"put",body:JSON.stringify(t)})]}))}))},this.deletePost=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return this.trackEvent("api","api_posts_delete"),[2,this.doFetch(""+this.getPostRoute(t),{method:"delete"})]}))}))},this.getPostThread=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getPostRoute(t)+"/thread",{method:"get"})]}))}))},this.getPosts=function(t,n,o){return void 0===n&&(n=0),void 0===o&&(o=60),r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getChannelRoute(t)+"/posts"+i.buildQueryString({page:n,per_page:o}),{method:"get"})]}))}))},this.getPostsUnread=function(n,o,a,s){return void 0===a&&(a=t.DEFAULT_LIMIT_AFTER),void 0===s&&(s=t.DEFAULT_LIMIT_BEFORE),r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getUserRoute(o)+"/channels/"+n+"/posts/unread"+i.buildQueryString({limit_after:a,limit_before:s}),{method:"get"})]}))}))},this.getPostsSince=function(t,n){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getChannelRoute(t)+"/posts"+i.buildQueryString({since:n}),{method:"get"})]}))}))},this.getPostsBefore=function(t,n,o,a){return void 0===o&&(o=0),void 0===a&&(a=60),r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return this.trackEvent("api","api_posts_get_before",{channel_id:t}),[2,this.doFetch(this.getChannelRoute(t)+"/posts"+i.buildQueryString({before:n,page:o,per_page:a}),{method:"get"})]}))}))},this.getPostsAfter=function(t,n,o,a){return void 0===o&&(o=0),void 0===a&&(a=60),r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return this.trackEvent("api","api_posts_get_after",{channel_id:t}),[2,this.doFetch(this.getChannelRoute(t)+"/posts"+i.buildQueryString({after:n,page:o,per_page:a}),{method:"get"})]}))}))},this.getFileInfosForPost=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getPostRoute(t)+"/files/info",{method:"get"})]}))}))},this.getFlaggedPosts=function(t,n,o,a,s){return void 0===n&&(n=""),void 0===o&&(o=""),void 0===a&&(a=0),void 0===s&&(s=60),r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return this.trackEvent("api","api_posts_get_flagged",{team_id:o}),[2,this.doFetch(this.getUserRoute(t)+"/posts/flagged"+i.buildQueryString({channel_id:n,team_id:o,page:a,per_page:s}),{method:"get"})]}))}))},this.getPinnedPosts=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return this.trackEvent("api","api_posts_get_pinned",{channel_id:t}),[2,this.doFetch(this.getChannelRoute(t)+"/pinned",{method:"get"})]}))}))},this.markPostAsUnread=function(t,n){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return this.trackEvent("api","api_post_set_unread_post"),[2,this.doFetch(this.getUserRoute(t)+"/posts/"+n+"/set_unread",{method:"post"})]}))}))},this.pinPost=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return this.trackEvent("api","api_posts_pin"),[2,this.doFetch(this.getPostRoute(t)+"/pin",{method:"post"})]}))}))},this.unpinPost=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return this.trackEvent("api","api_posts_unpin"),[2,this.doFetch(this.getPostRoute(t)+"/unpin",{method:"post"})]}))}))},this.addReaction=function(t,n,i){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return this.trackEvent("api","api_reactions_save",{post_id:n}),[2,this.doFetch(""+this.getReactionsRoute(),{method:"post",body:JSON.stringify({user_id:t,post_id:n,emoji_name:i})})]}))}))},this.removeReaction=function(t,n,i){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return this.trackEvent("api","api_reactions_delete",{post_id:n}),[2,this.doFetch(this.getUserRoute(t)+"/posts/"+n+"/reactions/"+i,{method:"delete"})]}))}))},this.getReactionsForPost=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getPostRoute(t)+"/reactions",{method:"get"})]}))}))},this.searchPostsWithParams=function(t,n){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return this.trackEvent("api","api_posts_search",{team_id:t}),[2,this.doFetch(this.getTeamRoute(t)+"/posts/search",{method:"post",body:JSON.stringify(n)})]}))}))},this.searchPosts=function(t,n,i){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.searchPostsWithParams(t,{terms:n,is_or_search:i})]}))}))},this.getOpenGraphMetadata=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getBaseRoute()+"/opengraph",{method:"post",body:JSON.stringify({url:t})})]}))}))},this.doPostAction=function(t,n,i){return void 0===i&&(i=""),r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doPostActionWithCookie(t,n,"",i)]}))}))},this.doPostActionWithCookie=function(t,n,i,o){return void 0===o&&(o=""),r.__awaiter(e,void 0,void 0,(function(){var e;return r.__generator(this,(function(r){return o?this.trackEvent("api","api_interactive_messages_menu_selected"):this.trackEvent("api","api_interactive_messages_button_clicked"),e={selected_option:o},""!==i&&(e.cookie=i),[2,this.doFetch(this.getPostRoute(t)+"/actions/"+encodeURIComponent(n),{method:"post",body:JSON.stringify(e)})]}))}))},this.uploadFile=function(t,n){return r.__awaiter(e,void 0,void 0,(function(){var e;return r.__generator(this,(function(r){return this.trackEvent("api","api_files_upload"),e={method:"post",body:t},n&&(e.headers={"Content-Type":"multipart/form-data; boundary="+n}),[2,this.doFetch(""+this.getFilesRoute(),e)]}))}))},this.getFilePublicLink=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getFileRoute(t)+"/link",{method:"get"})]}))}))},this.savePreferences=function(t,n){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(""+this.getPreferencesRoute(t),{method:"put",body:JSON.stringify(n)})]}))}))},this.getMyPreferences=function(){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(""+this.getPreferencesRoute("me"),{method:"get"})]}))}))},this.deletePreferences=function(t,n){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getPreferencesRoute(t)+"/delete",{method:"post",body:JSON.stringify(n)})]}))}))},this.ping=function(){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getBaseRoute()+"/system/ping?time="+Date.now(),{method:"get"})]}))}))},this.logClientError=function(t,n){return void 0===n&&(n="ERROR"),r.__awaiter(e,void 0,void 0,(function(){var e;return r.__generator(this,(function(r){if(e=this.getBaseRoute()+"/logs",!this.enableLogging)throw new d(this.getUrl(),{message:"Logging disabled.",url:e});return[2,this.doFetch(e,{method:"post",body:JSON.stringify({message:t,level:n})})]}))}))},this.getClientConfigOld=function(){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getBaseRoute()+"/config/client?format=old",{method:"get"})]}))}))},this.getClientLicenseOld=function(){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getBaseRoute()+"/license/client?format=old",{method:"get"})]}))}))},this.getTranslations=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(t,{method:"get"})]}))}))},this.getWebSocketUrl=function(){return e.getBaseRoute()+"/websocket"},this.webrtcToken=function(){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getBaseRoute()+"/webrtc/token",{method:"get"})]}))}))},this.createIncomingWebhook=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return this.trackEvent("api","api_integrations_created",{team_id:t.team_id}),[2,this.doFetch(""+this.getIncomingHooksRoute(),{method:"post",body:JSON.stringify(t)})]}))}))},this.getIncomingWebhook=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(""+this.getIncomingHookRoute(t),{method:"get"})]}))}))},this.getIncomingWebhooks=function(t,n,o){return void 0===t&&(t=""),void 0===n&&(n=0),void 0===o&&(o=60),r.__awaiter(e,void 0,void 0,(function(){var e;return r.__generator(this,(function(r){return e={page:n,per_page:o},t&&(e.team_id=t),[2,this.doFetch(""+this.getIncomingHooksRoute()+i.buildQueryString(e),{method:"get"})]}))}))},this.removeIncomingWebhook=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return this.trackEvent("api","api_integrations_deleted"),[2,this.doFetch(""+this.getIncomingHookRoute(t),{method:"delete"})]}))}))},this.updateIncomingWebhook=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return this.trackEvent("api","api_integrations_updated",{team_id:t.team_id}),[2,this.doFetch(""+this.getIncomingHookRoute(t.id),{method:"put",body:JSON.stringify(t)})]}))}))},this.createOutgoingWebhook=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return this.trackEvent("api","api_integrations_created",{team_id:t.team_id}),[2,this.doFetch(""+this.getOutgoingHooksRoute(),{method:"post",body:JSON.stringify(t)})]}))}))},this.getOutgoingWebhook=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(""+this.getOutgoingHookRoute(t),{method:"get"})]}))}))},this.getOutgoingWebhooks=function(t,n,o,a){return void 0===t&&(t=""),void 0===n&&(n=""),void 0===o&&(o=0),void 0===a&&(a=60),r.__awaiter(e,void 0,void 0,(function(){var e;return r.__generator(this,(function(r){return e={page:o,per_page:a},t&&(e.channel_id=t),n&&(e.team_id=n),[2,this.doFetch(""+this.getOutgoingHooksRoute()+i.buildQueryString(e),{method:"get"})]}))}))},this.removeOutgoingWebhook=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return this.trackEvent("api","api_integrations_deleted"),[2,this.doFetch(""+this.getOutgoingHookRoute(t),{method:"delete"})]}))}))},this.updateOutgoingWebhook=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return this.trackEvent("api","api_integrations_updated",{team_id:t.team_id}),[2,this.doFetch(""+this.getOutgoingHookRoute(t.id),{method:"put",body:JSON.stringify(t)})]}))}))},this.regenOutgoingHookToken=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getOutgoingHookRoute(t)+"/regen_token",{method:"post"})]}))}))},this.getCommandsList=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getCommandsRoute()+"?team_id="+t,{method:"get"})]}))}))},this.getAutocompleteCommandsList=function(t,n,o){return void 0===n&&(n=0),void 0===o&&(o=60),r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getTeamRoute(t)+"/commands/autocomplete"+i.buildQueryString({page:n,per_page:o}),{method:"get"})]}))}))},this.getCustomTeamCommands=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getCommandsRoute()+"?team_id="+t+"&custom_only=true",{method:"get"})]}))}))},this.executeCommand=function(t,n){return void 0===n&&(n={}),r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return this.trackEvent("api","api_integrations_used"),[2,this.doFetch(this.getCommandsRoute()+"/execute",{method:"post",body:JSON.stringify(r.__assign({command:t},n))})]}))}))},this.addCommand=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return this.trackEvent("api","api_integrations_created"),[2,this.doFetch(""+this.getCommandsRoute(),{method:"post",body:JSON.stringify(t)})]}))}))},this.editCommand=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return this.trackEvent("api","api_integrations_created"),[2,this.doFetch(this.getCommandsRoute()+"/"+t.id,{method:"put",body:JSON.stringify(t)})]}))}))},this.regenCommandToken=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getCommandsRoute()+"/"+t+"/regen_token",{method:"put"})]}))}))},this.deleteCommand=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return this.trackEvent("api","api_integrations_deleted"),[2,this.doFetch(this.getCommandsRoute()+"/"+t,{method:"delete"})]}))}))},this.createOAuthApp=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return this.trackEvent("api","api_apps_register"),[2,this.doFetch(""+this.getOAuthAppsRoute(),{method:"post",body:JSON.stringify(t)})]}))}))},this.editOAuthApp=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getOAuthAppsRoute()+"/"+t.id,{method:"put",body:JSON.stringify(t)})]}))}))},this.getOAuthApps=function(t,n){return void 0===t&&(t=0),void 0===n&&(n=60),r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(""+this.getOAuthAppsRoute()+i.buildQueryString({page:t,per_page:n}),{method:"get"})]}))}))},this.getOAuthApp=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(""+this.getOAuthAppRoute(t),{method:"get"})]}))}))},this.getOAuthAppInfo=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getOAuthAppRoute(t)+"/info",{method:"get"})]}))}))},this.deleteOAuthApp=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return this.trackEvent("api","api_apps_delete"),[2,this.doFetch(""+this.getOAuthAppRoute(t),{method:"delete"})]}))}))},this.regenOAuthAppSecret=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getOAuthAppRoute(t)+"/regen_secret",{method:"post"})]}))}))},this.submitInteractiveDialog=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return this.trackEvent("api","api_interactive_messages_dialog_submitted"),[2,this.doFetch(this.getBaseRoute()+"/actions/dialogs/submit",{method:"post",body:JSON.stringify(t)})]}))}))},this.createCustomEmoji=function(t,n){return r.__awaiter(e,void 0,void 0,(function(){var e,i;return r.__generator(this,(function(r){return this.trackEvent("api","api_emoji_custom_add"),(e=new l).append("image",n),e.append("emoji",JSON.stringify(t)),i={method:"post",body:e},e.getBoundary&&(i.headers={"Content-Type":"multipart/form-data; boundary="+e.getBoundary()}),[2,this.doFetch(""+this.getEmojisRoute(),i)]}))}))},this.getCustomEmoji=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getEmojisRoute()+"/"+t,{method:"get"})]}))}))},this.getCustomEmojiByName=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getEmojisRoute()+"/name/"+t,{method:"get"})]}))}))},this.getCustomEmojis=function(t,n,o){return void 0===t&&(t=0),void 0===n&&(n=60),void 0===o&&(o=""),r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(""+this.getEmojisRoute()+i.buildQueryString({page:t,per_page:n,sort:o}),{method:"get"})]}))}))},this.deleteCustomEmoji=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return this.trackEvent("api","api_emoji_custom_delete"),[2,this.doFetch(""+this.getEmojiRoute(t),{method:"delete"})]}))}))},this.getSystemEmojiImageUrl=function(t){return e.url+"/static/emoji/"+t+".png"},this.getCustomEmojiImageUrl=function(t){return e.getEmojiRoute(t)+"/image"},this.searchCustomEmoji=function(t,n){return void 0===n&&(n={}),r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getEmojisRoute()+"/search",{method:"post",body:JSON.stringify(r.__assign({term:t},n))})]}))}))},this.autocompleteCustomEmoji=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getEmojisRoute()+"/autocomplete"+i.buildQueryString({name:t}),{method:"get"})]}))}))},this.getTimezones=function(){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(""+this.getTimezonesRoute(),{method:"get"})]}))}))},this.getDataRetentionPolicy=function(){return e.doFetch(e.getDataRetentionRoute()+"/policy",{method:"get"})},this.getJob=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getJobsRoute()+"/"+t,{method:"get"})]}))}))},this.getJobs=function(t,n){return void 0===t&&(t=0),void 0===n&&(n=60),r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(""+this.getJobsRoute()+i.buildQueryString({page:t,per_page:n}),{method:"get"})]}))}))},this.getJobsByType=function(t,n,o){return void 0===n&&(n=0),void 0===o&&(o=60),r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getJobsRoute()+"/type/"+t+i.buildQueryString({page:n,per_page:o}),{method:"get"})]}))}))},this.createJob=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(""+this.getJobsRoute(),{method:"post",body:JSON.stringify(t)})]}))}))},this.cancelJob=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getJobsRoute()+"/"+t+"/cancel",{method:"post"})]}))}))},this.getLogs=function(t,n){return void 0===t&&(t=0),void 0===n&&(n=1e4),r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getBaseRoute()+"/logs"+i.buildQueryString({page:t,logs_per_page:n}),{method:"get"})]}))}))},this.getAudits=function(t,n){return void 0===t&&(t=0),void 0===n&&(n=60),r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getBaseRoute()+"/audits"+i.buildQueryString({page:t,per_page:n}),{method:"get"})]}))}))},this.getConfig=function(){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getBaseRoute()+"/config",{method:"get"})]}))}))},this.updateConfig=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getBaseRoute()+"/config",{method:"put",body:JSON.stringify(t)})]}))}))},this.reloadConfig=function(){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getBaseRoute()+"/config/reload",{method:"post"})]}))}))},this.getEnvironmentConfig=function(){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getBaseRoute()+"/config/environment",{method:"get"})]}))}))},this.testEmail=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getBaseRoute()+"/email/test",{method:"post",body:JSON.stringify(t)})]}))}))},this.testSiteURL=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getBaseRoute()+"/site_url/test",{method:"post",body:JSON.stringify({site_url:t})})]}))}))},this.testS3Connection=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getBaseRoute()+"/file/s3_test",{method:"post",body:JSON.stringify(t)})]}))}))},this.invalidateCaches=function(){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getBaseRoute()+"/caches/invalidate",{method:"post"})]}))}))},this.recycleDatabase=function(){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getBaseRoute()+"/database/recycle",{method:"post"})]}))}))},this.createComplianceReport=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getBaseRoute()+"/compliance/reports",{method:"post",body:JSON.stringify(t)})]}))}))},this.getComplianceReport=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getBaseRoute()+"/compliance/reports/"+t,{method:"get"})]}))}))},this.getComplianceReports=function(t,n){return void 0===t&&(t=0),void 0===n&&(n=60),r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getBaseRoute()+"/compliance/reports"+i.buildQueryString({page:t,per_page:n}),{method:"get"})]}))}))},this.uploadBrandImage=function(t){return r.__awaiter(e,void 0,void 0,(function(){var e,n;return r.__generator(this,(function(r){return(e=new l).append("image",t),n={method:"post",body:e},e.getBoundary&&(n.headers={"Content-Type":"multipart/form-data; boundary="+e.getBoundary()}),[2,this.doFetch(this.getBrandRoute()+"/image",n)]}))}))},this.deleteBrandImage=function(){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getBrandRoute()+"/image",{method:"delete"})]}))}))},this.getClusterStatus=function(){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getBaseRoute()+"/cluster/status",{method:"get"})]}))}))},this.testLdap=function(){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getBaseRoute()+"/ldap/test",{method:"post"})]}))}))},this.syncLdap=function(){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getBaseRoute()+"/ldap/sync",{method:"post"})]}))}))},this.getLdapGroups=function(t,n,o){return void 0===t&&(t=0),void 0===n&&(n=60),void 0===o&&(o={}),r.__awaiter(e,void 0,void 0,(function(){var e;return r.__generator(this,(function(a){return e=r.__assign({page:t,per_page:n},o),[2,this.doFetch(this.getBaseRoute()+"/ldap/groups"+i.buildQueryString(e),{method:"get"})]}))}))},this.linkLdapGroup=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getBaseRoute()+"/ldap/groups/"+encodeURI(t)+"/link",{method:"post"})]}))}))},this.unlinkLdapGroup=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getBaseRoute()+"/ldap/groups/"+encodeURI(t)+"/link",{method:"delete"})]}))}))},this.getSamlCertificateStatus=function(){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getBaseRoute()+"/saml/certificate/status",{method:"get"})]}))}))},this.uploadPublicSamlCertificate=function(t){return r.__awaiter(e,void 0,void 0,(function(){var e;return r.__generator(this,(function(n){return(e=new l).append("certificate",t),[2,this.doFetch(this.getBaseRoute()+"/saml/certificate/public",{method:"post",body:e})]}))}))},this.uploadPrivateSamlCertificate=function(t){return r.__awaiter(e,void 0,void 0,(function(){var e;return r.__generator(this,(function(n){return(e=new l).append("certificate",t),[2,this.doFetch(this.getBaseRoute()+"/saml/certificate/private",{method:"post",body:e})]}))}))},this.uploadIdpSamlCertificate=function(t){return r.__awaiter(e,void 0,void 0,(function(){var e;return r.__generator(this,(function(n){return(e=new l).append("certificate",t),[2,this.doFetch(this.getBaseRoute()+"/saml/certificate/idp",{method:"post",body:e})]}))}))},this.deletePublicSamlCertificate=function(){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getBaseRoute()+"/saml/certificate/public",{method:"delete"})]}))}))},this.deletePrivateSamlCertificate=function(){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getBaseRoute()+"/saml/certificate/private",{method:"delete"})]}))}))},this.deleteIdpSamlCertificate=function(){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getBaseRoute()+"/saml/certificate/idp",{method:"delete"})]}))}))},this.testElasticsearch=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getBaseRoute()+"/elasticsearch/test",{method:"post",body:JSON.stringify(t)})]}))}))},this.purgeElasticsearchIndexes=function(){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getBaseRoute()+"/elasticsearch/purge_indexes",{method:"post"})]}))}))},this.uploadLicense=function(t){return r.__awaiter(e,void 0,void 0,(function(){var e,n;return r.__generator(this,(function(r){return this.trackEvent("api","api_license_upload"),(e=new l).append("license",t),n={method:"post",body:e},e.getBoundary&&(n.headers={"Content-Type":"multipart/form-data; boundary="+e.getBoundary()}),[2,this.doFetch(this.getBaseRoute()+"/license",n)]}))}))},this.removeLicense=function(){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getBaseRoute()+"/license",{method:"delete"})]}))}))},this.getAnalytics=function(t,n){return void 0===t&&(t="standard"),void 0===n&&(n=""),r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getBaseRoute()+"/analytics/old"+i.buildQueryString({name:t,team_id:n}),{method:"get"})]}))}))},this.getRole=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getRolesRoute()+"/"+t,{method:"get"})]}))}))},this.getRoleByName=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getRolesRoute()+"/name/"+t,{method:"get"})]}))}))},this.getRolesByNames=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getRolesRoute()+"/names",{method:"post",body:JSON.stringify(t)})]}))}))},this.patchRole=function(t,n){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getRolesRoute()+"/"+t+"/patch",{method:"put",body:JSON.stringify(n)})]}))}))},this.getSchemes=function(t,n,o){return void 0===t&&(t=""),void 0===n&&(n=0),void 0===o&&(o=60),r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(""+this.getSchemesRoute()+i.buildQueryString({scope:t,page:n,per_page:o}),{method:"get"})]}))}))},this.createScheme=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return this.trackEvent("api","api_schemes_create"),[2,this.doFetch(""+this.getSchemesRoute(),{method:"post",body:JSON.stringify(t)})]}))}))},this.getScheme=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getSchemesRoute()+"/"+t,{method:"get"})]}))}))},this.deleteScheme=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return this.trackEvent("api","api_schemes_delete"),[2,this.doFetch(this.getSchemesRoute()+"/"+t,{method:"delete"})]}))}))},this.patchScheme=function(t,n){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return this.trackEvent("api","api_schemes_patch",{scheme_id:t}),[2,this.doFetch(this.getSchemesRoute()+"/"+t+"/patch",{method:"put",body:JSON.stringify(n)})]}))}))},this.getSchemeTeams=function(t,n,o){return void 0===n&&(n=0),void 0===o&&(o=60),r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getSchemesRoute()+"/"+t+"/teams"+i.buildQueryString({page:n,per_page:o}),{method:"get"})]}))}))},this.getSchemeChannels=function(t,n,o){return void 0===n&&(n=0),void 0===o&&(o=60),r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getSchemesRoute()+"/"+t+"/channels"+i.buildQueryString({page:n,per_page:o}),{method:"get"})]}))}))},this.uploadPlugin=function(t,n){return void 0===n&&(n=!1),r.__awaiter(e,void 0,void 0,(function(){var e,i;return r.__generator(this,(function(r){return this.trackEvent("api","api_plugin_upload"),e=new l,n&&e.append("force","true"),e.append("plugin",t),i={method:"post",body:e},e.getBoundary&&(i.headers={"Content-Type":"multipart/form-data; boundary="+e.getBoundary()}),[2,this.doFetch(this.getPluginsRoute(),i)]}))}))},this.installPluginFromUrl=function(t,n){return void 0===n&&(n=!1),r.__awaiter(e,void 0,void 0,(function(){var e;return r.__generator(this,(function(r){return this.trackEvent("api","api_install_plugin"),e={plugin_download_url:t,force:n},[2,this.doFetch(this.getPluginsRoute()+"/install_from_url"+i.buildQueryString(e),{method:"post"})]}))}))},this.getPlugins=function(){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getPluginsRoute(),{method:"get"})]}))}))},this.getMarketplacePlugins=function(t,n){return void 0===n&&(n=!1),r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(""+this.getPluginsMarketplaceRoute()+i.buildQueryString({filter:t||"",local_only:n}),{method:"get"})]}))}))},this.installMarketplacePlugin=function(t,n){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return this.trackEvent("api","api_install_marketplace_plugin"),[2,this.doFetch(""+this.getPluginsMarketplaceRoute(),{method:"post",body:JSON.stringify({id:t,version:n})})]}))}))},this.getPluginStatuses=function(){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getPluginsRoute()+"/statuses",{method:"get"})]}))}))},this.removePlugin=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getPluginRoute(t),{method:"delete"})]}))}))},this.getWebappPlugins=function(){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getPluginsRoute()+"/webapp",{method:"get"})]}))}))},this.enablePlugin=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getPluginRoute(t)+"/enable",{method:"post"})]}))}))},this.disablePlugin=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getPluginRoute(t)+"/disable",{method:"post"})]}))}))},this.linkGroupSyncable=function(t,n,i,o){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getBaseRoute()+"/groups/"+t+"/"+i+"s/"+n+"/link",{method:"post",body:JSON.stringify(o)})]}))}))},this.unlinkGroupSyncable=function(t,n,i){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getBaseRoute()+"/groups/"+t+"/"+i+"s/"+n+"/link",{method:"delete"})]}))}))},this.getGroupSyncables=function(t,n){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getBaseRoute()+"/groups/"+t+"/"+n+"s",{method:"get"})]}))}))},this.getGroupMembers=function(t,n,o){return void 0===n&&(n=0),void 0===o&&(o=60),r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getBaseRoute()+"/groups/"+t+"/members"+i.buildQueryString({page:n,per_page:o}),{method:"get"})]}))}))},this.getGroup=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getBaseRoute()+"/groups/"+t,{method:"get"})]}))}))},this.getGroupsNotAssociatedToTeam=function(t,n,o,a){return void 0===n&&(n=""),void 0===o&&(o=0),void 0===a&&(a=60),r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return this.trackEvent("api","api_groups_get_not_associated_to_team",{team_id:t}),[2,this.doFetch(this.getBaseRoute()+"/groups"+i.buildQueryString({not_associated_to_team:t,page:o,per_page:a,q:n,include_member_count:!0}),{method:"get"})]}))}))},this.getGroupsNotAssociatedToChannel=function(t,n,o,a){return void 0===n&&(n=""),void 0===o&&(o=0),void 0===a&&(a=60),r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return this.trackEvent("api","api_groups_get_not_associated_to_channel",{channel_id:t}),[2,this.doFetch(this.getBaseRoute()+"/groups"+i.buildQueryString({not_associated_to_channel:t,page:o,per_page:a,q:n,include_member_count:!0}),{method:"get"})]}))}))},this.getGroupsAssociatedToTeam=function(t,n,o,a){return void 0===n&&(n=""),void 0===o&&(o=0),void 0===a&&(a=60),r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return this.trackEvent("api","api_groups_get_associated_to_team",{team_id:t}),[2,this.doFetch(this.getBaseRoute()+"/teams/"+t+"/groups"+i.buildQueryString({page:o,per_page:a,q:n,include_member_count:!0}),{method:"get"})]}))}))},this.getGroupsAssociatedToChannel=function(t,n,o,a){return void 0===n&&(n=""),void 0===o&&(o=0),void 0===a&&(a=60),r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return this.trackEvent("api","api_groups_get_associated_to_channel",{channel_id:t}),[2,this.doFetch(this.getBaseRoute()+"/channels/"+t+"/groups"+i.buildQueryString({page:o,per_page:a,q:n,include_member_count:!0}),{method:"get"})]}))}))},this.getAllGroupsAssociatedToTeam=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getBaseRoute()+"/teams/"+t+"/groups?paginate=false",{method:"get"})]}))}))},this.getAllGroupsAssociatedToChannel=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getBaseRoute()+"/channels/"+t+"/groups?paginate=false",{method:"get"})]}))}))},this.patchGroupSyncable=function(t,n,i,o){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getBaseRoute()+"/groups/"+t+"/"+i+"s/"+n+"/patch",{method:"put",body:JSON.stringify(o)})]}))}))},this.getRedirectLocation=function(t){return r.__awaiter(e,void 0,void 0,(function(){var e;return r.__generator(this,(function(n){return t.length?(e=""+this.getRedirectLocationRoute()+i.buildQueryString({url:t}),[2,this.doFetch(e,{method:"get"})]):[2,Promise.resolve()]}))}))},this.createBot=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(""+this.getBotsRoute(),{method:"post",body:JSON.stringify(t)})]}))}))},this.patchBot=function(t,n){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(""+this.getBotRoute(t),{method:"put",body:JSON.stringify(n)})]}))}))},this.getBot=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(""+this.getBotRoute(t),{method:"get"})]}))}))},this.getBots=function(t,n){return void 0===t&&(t=0),void 0===n&&(n=60),r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(""+this.getBotsRoute()+i.buildQueryString({page:t,per_page:n}),{method:"get"})]}))}))},this.getBotsIncludeDeleted=function(t,n){return void 0===t&&(t=0),void 0===n&&(n=60),r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(""+this.getBotsRoute()+i.buildQueryString({include_deleted:!0,page:t,per_page:n}),{method:"get"})]}))}))},this.getBotsOrphaned=function(t,n){return void 0===t&&(t=0),void 0===n&&(n=60),r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(""+this.getBotsRoute()+i.buildQueryString({only_orphaned:!0,page:t,per_page:n}),{method:"get"})]}))}))},this.disableBot=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getBotRoute(t)+"/disable",{method:"post"})]}))}))},this.enableBot=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getBotRoute(t)+"/enable",{method:"post"})]}))}))},this.assignBot=function(t,n){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getBotRoute(t)+"/assign/"+n,{method:"post"})]}))}))},this.teamMembersMinusGroupMembers=function(t,n,i,o){return r.__awaiter(e,void 0,void 0,(function(){var e;return r.__generator(this,(function(r){return e="group_ids="+n.join(",")+"&page="+i+"&per_page="+o,[2,this.doFetch(this.getTeamRoute(t)+"/members_minus_group_members?"+e,{method:"get"})]}))}))},this.channelMembersMinusGroupMembers=function(t,n,i,o){return r.__awaiter(e,void 0,void 0,(function(){var e;return r.__generator(this,(function(r){return e="group_ids="+n.join(",")+"&page="+i+"&per_page="+o,[2,this.doFetch(this.getChannelRoute(t)+"/members_minus_group_members?"+e,{method:"get"})]}))}))},this.getSamlMetadataFromIdp=function(t){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.doFetch(this.getBaseRoute()+"/saml/metadatafromidp",{method:"post",body:JSON.stringify({saml_metadata_url:t})})]}))}))},this.setSamlIdpCertificateFromMetadata=function(t){return r.__awaiter(e,void 0,void 0,(function(){var e;return r.__generator(this,(function(n){return(e={method:"post",body:t}).headers={"Content-Type":"application/x-pem-file"},[2,this.doFetch(this.getBaseRoute()+"/saml/certificate/idp",e)]}))}))},this.doFetch=function(t,n){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){switch(e.label){case 0:return[4,this.doFetchWithResponse(t,n)];case 1:return[2,e.sent().data]}}))}))},this.doFetchWithResponse=function(n,i){return r.__awaiter(e,void 0,void 0,(function(){var e,o,a,s,l,c;return r.__generator(this,(function(f){switch(f.label){case 0:return[4,u.default(n,this.getOptions(i))];case 1:e=f.sent(),o=function(e){var t=new Map,n=new Map;return e.forEach((function(e,i){var o=i.replace(/\b[a-z]/g,(function(e){return e.toUpperCase()})),a=e;if(e&&e.match(/\n\S+:\s\S+/)){var s=e.split("\n");a=s.shift();var u=new Map(s.map((function(e){return e.split(/:\s/)})));n=new Map(r.__spread(n,u))}t.set(o,a)})),new Map(r.__spread(t,n))}(e.headers),f.label=2;case 2:return f.trys.push([2,4,,5]),[4,e.json()];case 3:return a=f.sent(),[3,5];case 4:throw f.sent(),new d(this.getUrl(),{message:"Received invalid response from the server.",intl:{id:"mobile.request.invalid_response",defaultMessage:"Received invalid response from the server."},url:n});case 5:if(o.has(t.HEADER_X_VERSION_ID)&&!o.get("Cache-Control")&&(s=o.get(t.HEADER_X_VERSION_ID))&&this.serverVersion!==s&&(this.serverVersion=s),o.has("X-Cluster-Id")&&(l=o.get("X-Cluster-Id"))&&this.clusterId!==l&&(this.clusterId=l),e.ok)return[2,{response:e,headers:o,data:a}];throw c=a.message||"",this.logToConsole&&console.error(c),new d(this.getUrl(),{message:c,server_error_id:a.id,status_code:a.status_code,url:n})}}))}))}}return n.prototype.getUrl=function(){return this.url},n.prototype.getAbsoluteUrl=function(e){return"string"==typeof e&&e.startsWith("/")?this.getUrl()+e:e},n.prototype.setUrl=function(e){this.url=e},n.prototype.setUserAgent=function(e){this.userAgent=e},n.prototype.getToken=function(){return this.token},n.prototype.setToken=function(e){this.token=e},n.prototype.setCSRF=function(e){this.csrf=e},n.prototype.setAcceptLanguage=function(e){this.defaultHeaders["Accept-Language"]=e},n.prototype.setEnableLogging=function(e){this.enableLogging=e},n.prototype.setIncludeCookies=function(e){this.includeCookies=e},n.prototype.setUserId=function(e){this.userId=e},n.prototype.setUserRoles=function(e){this.userRoles=e},n.prototype.setDiagnosticId=function(e){this.diagnosticId=e},n.prototype.getServerVersion=function(){return this.serverVersion},n.prototype.getUrlVersion=function(){return this.urlVersion},n.prototype.getBaseRoute=function(){return""+this.url+this.urlVersion},n.prototype.getUsersRoute=function(){return this.getBaseRoute()+"/users"},n.prototype.getUserRoute=function(e){return this.getUsersRoute()+"/"+e},n.prototype.getTeamsRoute=function(){return this.getBaseRoute()+"/teams"},n.prototype.getTeamRoute=function(e){return this.getTeamsRoute()+"/"+e},n.prototype.getTeamSchemeRoute=function(e){return this.getTeamRoute(e)+"/scheme"},n.prototype.getTeamNameRoute=function(e){return this.getTeamsRoute()+"/name/"+e},n.prototype.getTeamMembersRoute=function(e){return this.getTeamRoute(e)+"/members"},n.prototype.getTeamMemberRoute=function(e,t){return this.getTeamMembersRoute(e)+"/"+t},n.prototype.getChannelsRoute=function(){return this.getBaseRoute()+"/channels"},n.prototype.getChannelRoute=function(e){return this.getChannelsRoute()+"/"+e},n.prototype.getChannelMembersRoute=function(e){return this.getChannelRoute(e)+"/members"},n.prototype.getChannelMemberRoute=function(e,t){return this.getChannelMembersRoute(e)+"/"+t},n.prototype.getChannelSchemeRoute=function(e){return this.getChannelRoute(e)+"/scheme"},n.prototype.getPostsRoute=function(){return this.getBaseRoute()+"/posts"},n.prototype.getPostRoute=function(e){return this.getPostsRoute()+"/"+e},n.prototype.getReactionsRoute=function(){return this.getBaseRoute()+"/reactions"},n.prototype.getCommandsRoute=function(){return this.getBaseRoute()+"/commands"},n.prototype.getFilesRoute=function(){return this.getBaseRoute()+"/files"},n.prototype.getFileRoute=function(e){return this.getFilesRoute()+"/"+e},n.prototype.getPreferencesRoute=function(e){return this.getUserRoute(e)+"/preferences"},n.prototype.getIncomingHooksRoute=function(){return this.getBaseRoute()+"/hooks/incoming"},n.prototype.getIncomingHookRoute=function(e){return this.getBaseRoute()+"/hooks/incoming/"+e},n.prototype.getOutgoingHooksRoute=function(){return this.getBaseRoute()+"/hooks/outgoing"},n.prototype.getOutgoingHookRoute=function(e){return this.getBaseRoute()+"/hooks/outgoing/"+e},n.prototype.getOAuthRoute=function(){return this.url+"/oauth"},n.prototype.getOAuthAppsRoute=function(){return this.getBaseRoute()+"/oauth/apps"},n.prototype.getOAuthAppRoute=function(e){return this.getOAuthAppsRoute()+"/"+e},n.prototype.getEmojisRoute=function(){return this.getBaseRoute()+"/emoji"},n.prototype.getEmojiRoute=function(e){return this.getEmojisRoute()+"/"+e},n.prototype.getBrandRoute=function(){return this.getBaseRoute()+"/brand"},n.prototype.getBrandImageUrl=function(e){return this.getBrandRoute()+"/image?t="+e},n.prototype.getDataRetentionRoute=function(){return this.getBaseRoute()+"/data_retention"},n.prototype.getJobsRoute=function(){return this.getBaseRoute()+"/jobs"},n.prototype.getPluginsRoute=function(){return this.getBaseRoute()+"/plugins"},n.prototype.getPluginRoute=function(e){return this.getPluginsRoute()+"/"+e},n.prototype.getPluginsMarketplaceRoute=function(){return this.getPluginsRoute()+"/marketplace"},n.prototype.getRolesRoute=function(){return this.getBaseRoute()+"/roles"},n.prototype.getTimezonesRoute=function(){return this.getBaseRoute()+"/system/timezones"},n.prototype.getSchemesRoute=function(){return this.getBaseRoute()+"/schemes"},n.prototype.getRedirectLocationRoute=function(){return this.getBaseRoute()+"/redirect_location"},n.prototype.getBotsRoute=function(){return this.getBaseRoute()+"/bots"},n.prototype.getBotRoute=function(e){return this.getBotsRoute()+"/"+e},n.prototype.getCSRFFromCookie=function(){if("undefined"!=typeof document&&void 0!==document.cookie)for(var e=document.cookie.split(";"),t=0;t<e.length;t++){var n=e[t].trim();if(n.startsWith("MMCSRF="))return n.replace("MMCSRF=","")}return""},n.prototype.getOptions=function(e){var t,n=r.__assign({},e),i=r.__assign(((t={})["X-Requested-With"]="XMLHttpRequest",t),this.defaultHeaders);this.token&&(i.Authorization="BEARER "+this.token);var o=this.csrf||this.getCSRFFromCookie();return e.method&&"get"!==e.method.toLowerCase()&&o&&(i["X-CSRF-Token"]=o),this.includeCookies&&(n.credentials="include"),this.userAgent&&(i["User-Agent"]=this.userAgent),n.headers&&Object.assign(i,n.headers),r.__assign(r.__assign({},n),{headers:i})},n.prototype.getFileUrl=function(e,t){var n=""+this.getFileRoute(e);return t&&(n+="?"+t),n},n.prototype.getFileThumbnailUrl=function(e,t){var n=this.getFileRoute(e)+"/thumbnail";return t&&(n+="?"+t),n},n.prototype.getFilePreviewUrl=function(e,t){var n=this.getFileRoute(e)+"/preview";return t&&(n+="?"+t),n},n.prototype.trackEvent=function(t,n,r){var i=Object.assign({category:t,type:n,user_actual_role:this.userRoles&&s.isSystemAdmin(this.userRoles)?"system_admin, system_user":"system_user",user_actual_id:this.userId},r),o={context:{ip:"0.0.0.0"},page:{path:"",referrer:"",search:"",title:"",url:""},anonymousId:"00000000000000000000000000"},a=e;a&&a.window&&a.window.rudderanalytics?a.window.rudderanalytics.track("event",i,o):a&&a.rudderanalytics&&(a.analytics_context&&(o.context=a.analytics_context),a.rudderanalytics.track(Object.assign({event:"event",userId:this.diagnosticId},{properties:i},o))),("admin"===t||["api_posts_create","api_interactive_messages_button_clicked","api_interactive_messages_menu_selected","api_interactive_messages_dialog_submitted","ui_marketplace_download","ui_marketplace_download_update","ui_marketplace_configure","ui_marketplace_opened","ui_marketplace_closed","ui_marketplace_search","signup_user_01_welcome","signup_select_team","signup_team_01_name","signup_team_02_url","click_back","click_signin_account","click_create_account","click_create_team","click_system_console","click_logout","click_next","click_finish","click_dismiss_bar","diagnostics_disabled"].includes(n))&&(a&&a.window&&a.window.analytics&&a.window.analytics.initialized?a.window.analytics.track("event",i,o):a&&a.analytics&&(a.analytics_context&&(o.context=a.analytics_context),a.analytics.track(Object.assign({event:"event",userId:this.diagnosticId},{properties:i},o))))},n}();t.default=c;var d=function(e){function t(t,n){var r=e.call(this,n.message+": "+o.cleanUrlForLogging(t,n.url))||this;return r.message=n.message,r.url=n.url,r.intl=n.intl,r.server_error_id=n.server_error_id,r.status_code=n.status_code,Object.defineProperty(r,"message",{enumerable:!0}),r}return r.__extends(t,e),t}(Error);t.ClientError=d}).call(this,n(52))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.cleanUrlForLogging=function(e,t){var n=t,r=(n=n.substring(e.length)).indexOf("?");-1!==r&&(n=n.substring(0,r));var i=["api","v4","users","teams","scheme","name","members","channels","posts","reactions","commands","files","preferences","hooks","incoming","outgoing","oauth","apps","emoji","brand","image","data_retention","jobs","plugins","roles","system","timezones","schemes","redirect_location","patch","mfa","password","reset","send","active","verify","terms_of_service","login","logout","ids","usernames","me","username","email","default","sessions","revoke","all","audits","device","status","search","switch","authorized","authorize","deauthorize","tokens","disable","enable","exists","unread","invite","batch","stats","import","schemeRoles","direct","group","convert","view","search_autocomplete","thread","info","flagged","pinned","pin","unpin","opengraph","actions","thumbnail","preview","link","delete","logs","ping","config","client","license","websocket","webrtc","token","regen_token","autocomplete","execute","regen_secret","policy","type","cancel","reload","environment","s3_test","file","caches","invalidate","database","recycle","compliance","reports","cluster","ldap","test","sync","saml","certificate","public","private","idp","elasticsearch","purge_indexes","analytics","old","webapp","fake"];return n=n.split("/").map((function(e){return""!==e&&-1===i.indexOf(e)?"<filtered>":e})).join("/"),-1!==r&&(n+="?<filtered>"),n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=null;t.setLocalizeFunction=function(e){r=e},t.localizeMessage=function(e,t){return r?r(e,t):t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={},i={};t.default=function(e,t){if(void 0===t&&(t={headers:{}}),e=e||t.url,"GET"===t.method||!t.method){var n=i[e],o=r[""+e+n];return n&&(t.headers["If-None-Match"]=n),fetch(e,t).then((function(t){if(304===t.status)return o.clone();if(200===t.status){var n=t.headers.get("Etag");n&&(r[""+e+n]=t.clone(),i[e]=n)}return t}))}return Reflect.apply(fetch,void 0,[e,t])}},function(e,t){e.exports="object"==typeof self?self.FormData:window.FormData},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2).__importDefault(n(3));t.default=r.default({CHANNEL_REQUEST:null,CHANNEL_SUCCESS:null,CHANNEL_FAILURE:null,CHANNELS_REQUEST:null,CHANNELS_SUCCESS:null,CHANNELS_FAILURE:null,CREATE_CHANNEL_REQUEST:null,CREATE_CHANNEL_SUCCESS:null,CREATE_CHANNEL_FAILURE:null,UPDATE_CHANNEL_REQUEST:null,UPDATE_CHANNEL_SUCCESS:null,UPDATE_CHANNEL_FAILURE:null,DELETE_CHANNEL_SUCCESS:null,UNARCHIVED_CHANNEL_SUCCESS:null,GET_CHANNELS_REQUEST:null,GET_CHANNELS_SUCCESS:null,GET_CHANNELS_FAILURE:null,GET_ALL_CHANNELS_REQUEST:null,GET_ALL_CHANNELS_SUCCESS:null,GET_ALL_CHANNELS_FAILURE:null,GET_CHANNELS_TIMEZONE_REQUEST:null,GET_CHANNELS_TIMEZONE_SUCCESS:null,GET_CHANNELS_TIMEZONE_FAILURE:null,CHANNEL_STATS_REQUEST:null,CHANNEL_STATS_SUCCESS:null,CHANNEL_STATS_FAILURE:null,ADD_CHANNEL_MEMBER_REQUEST:null,ADD_CHANNEL_MEMBER_SUCCESS:null,REMOVE_CHANNEL_MEMBER_SUCCESS:null,SELECT_CHANNEL:null,LEAVE_CHANNEL:null,REMOVE_MEMBER_FROM_CHANNEL:null,RECEIVED_CHANNEL:null,RECEIVED_CHANNELS:null,RECEIVED_ALL_CHANNELS:null,RECEIVED_CHANNELS_LIST:null,RECEIVED_MY_CHANNEL_MEMBERS:null,RECEIVED_MY_CHANNEL_MEMBER:null,RECEIVED_CHANNEL_MEMBERS:null,RECEIVED_CHANNEL_MEMBER:null,RECEIVED_CHANNEL_STATS:null,RECEIVED_CHANNEL_PROPS:null,RECEIVED_CHANNEL_DELETED:null,RECEIVED_CHANNEL_UNARCHIVED:null,RECEIVED_LAST_VIEWED_AT:null,UPDATE_CHANNEL_HEADER:null,UPDATE_CHANNEL_PURPOSE:null,CHANNEL_MEMBER_ADDED:null,CHANNEL_MEMBER_REMOVED:null,INCREMENT_TOTAL_MSG_COUNT:null,INCREMENT_UNREAD_MSG_COUNT:null,DECREMENT_UNREAD_MSG_COUNT:null,INCREMENT_UNREAD_MENTION_COUNT:null,DECREMENT_UNREAD_MENTION_COUNT:null,UPDATED_CHANNEL_SCHEME:null,UPDATED_CHANNEL_MEMBER_SCHEME_ROLES:null,RECEIVED_CHANNEL_MEMBERS_MINUS_GROUP_MEMBERS:null,RECEIVED_CHANNEL_MODERATIONS:null,RECEIVED_TOTAL_CHANNEL_COUNT:null,POST_UNREAD_SUCCESS:null,ADD_MANUALLY_UNREAD:null,REMOVE_MANUALLY_UNREAD:null,RECEIVED_MY_CHANNELS_WITH_MEMBERS:null})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2).__importDefault(n(3));t.default=r.default({DISMISS_ERROR:null,LOG_ERROR:null,CLEAR_ERRORS:null,RESTORE_ERRORS:null})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2).__importDefault(n(3));t.default=r.default({RECEIVED_APP_STATE:null,RECEIVED_APP_CREDENTIALS:null,REMOVED_APP_CREDENTIALS:null,RECEIVED_APP_DEVICE_TOKEN:null,PING_RESET:null,RECEIVED_SERVER_VERSION:null,CLIENT_CONFIG_RECEIVED:null,CLIENT_CONFIG_RESET:null,CLIENT_LICENSE_RECEIVED:null,CLIENT_LICENSE_RESET:null,RECEIVED_DATA_RETENTION_POLICY:null,LOG_CLIENT_ERROR_REQUEST:null,LOG_CLIENT_ERROR_SUCCESS:null,LOG_CLIENT_ERROR_FAILURE:null,SUPPORTED_TIMEZONES_REQUEST:null,SUPPORTED_TIMEZONES_SUCCESS:null,SUPPORTED_TIMEZONES_FAILURE:null,SUPPORTED_TIMEZONES_RECEIVED:null,WEBSOCKET_REQUEST:null,WEBSOCKET_SUCCESS:null,WEBSOCKET_FAILURE:null,WEBSOCKET_CLOSED:null,REDIRECT_LOCATION_SUCCESS:null,REDIRECT_LOCATION_FAILURE:null,SET_CONFIG_AND_LICENSE:null})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2).__importDefault(n(3));t.default=r.default({CREATE_USER_REQUEST:null,CREATE_USER_SUCCESS:null,CREATE_USER_FAILURE:null,LOGIN_REQUEST:null,LOGIN_SUCCESS:null,LOGIN_FAILURE:null,LOGOUT_REQUEST:null,LOGOUT_SUCCESS:null,LOGOUT_FAILURE:null,REVOKE_ALL_USER_SESSIONS_SUCCESS:null,REVOKE_SESSIONS_FOR_ALL_USERS_SUCCESS:null,CHECK_MFA_REQUEST:null,CHECK_MFA_SUCCESS:null,CHECK_MFA_FAILURE:null,AUTOCOMPLETE_USERS_REQUEST:null,AUTOCOMPLETE_USERS_SUCCESS:null,AUTOCOMPLETE_USERS_FAILURE:null,UPDATE_ME_REQUEST:null,UPDATE_ME_SUCCESS:null,UPDATE_ME_FAILURE:null,RECEIVED_ME:null,RECEIVED_TERMS_OF_SERVICE_STATUS:null,RECEIVED_PROFILE:null,RECEIVED_PROFILES:null,RECEIVED_PROFILES_LIST:null,RECEIVED_PROFILES_IN_TEAM:null,RECEIVED_PROFILE_IN_TEAM:null,RECEIVED_PROFILES_LIST_IN_TEAM:null,RECEIVED_PROFILE_NOT_IN_TEAM:null,RECEIVED_PROFILES_LIST_NOT_IN_TEAM:null,RECEIVED_PROFILES_LIST_NOT_IN_TEAM_AND_REPLACE:null,RECEIVED_PROFILE_WITHOUT_TEAM:null,RECEIVED_PROFILES_LIST_WITHOUT_TEAM:null,RECEIVED_PROFILES_IN_CHANNEL:null,RECEIVED_PROFILES_LIST_IN_CHANNEL:null,RECEIVED_PROFILE_IN_CHANNEL:null,RECEIVED_PROFILES_NOT_IN_CHANNEL:null,RECEIVED_PROFILES_LIST_NOT_IN_CHANNEL:null,RECEIVED_PROFILES_LIST_NOT_IN_CHANNEL_AND_REPLACE:null,RECEIVED_PROFILE_NOT_IN_CHANNEL:null,RECEIVED_SESSIONS:null,RECEIVED_REVOKED_SESSION:null,RECEIVED_AUDITS:null,RECEIVED_STATUS:null,RECEIVED_STATUSES:null,RECEIVED_AUTOCOMPLETE_IN_CHANNEL:null,RESET_LOGOUT_STATE:null,RECEIVED_MY_USER_ACCESS_TOKEN:null,RECEIVED_MY_USER_ACCESS_TOKENS:null,CLEAR_MY_USER_ACCESS_TOKENS:null,REVOKED_USER_ACCESS_TOKEN:null,DISABLED_USER_ACCESS_TOKEN:null,ENABLED_USER_ACCESS_TOKEN:null,RECEIVED_USER_STATS:null,PROFILE_NO_LONGER_VISIBLE:null,LOGIN:null,RECEIVED_BATCHED_PROFILES_IN_CHANNEL:null})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2).__importDefault(n(3));t.default=r.default({GET_TEAMS_REQUEST:null,GET_TEAMS_SUCCESS:null,GET_TEAMS_FAILURE:null,MY_TEAMS_REQUEST:null,MY_TEAMS_SUCCESS:null,MY_TEAMS_FAILURE:null,CREATE_TEAM_REQUEST:null,CREATE_TEAM_SUCCESS:null,CREATE_TEAM_FAILURE:null,GET_TEAM_MEMBERS_REQUEST:null,GET_TEAM_MEMBERS_SUCCESS:null,GET_TEAM_MEMBERS_FAILURE:null,JOIN_TEAM_REQUEST:null,JOIN_TEAM_SUCCESS:null,JOIN_TEAM_FAILURE:null,TEAM_INVITE_INFO_REQUEST:null,TEAM_INVITE_INFO_SUCCESS:null,TEAM_INVITE_INFO_FAILURE:null,ADD_TO_TEAM_FROM_INVITE_REQUEST:null,ADD_TO_TEAM_FROM_INVITE_SUCCESS:null,ADD_TO_TEAM_FROM_INVITE_FAILURE:null,CREATED_TEAM:null,SELECT_TEAM:null,UPDATED_TEAM:null,PATCHED_TEAM:null,REGENERATED_TEAM_INVITE_ID:null,RECEIVED_TEAM:null,RECEIVED_TEAMS:null,RECEIVED_TEAM_DELETED:null,RECEIVED_TEAMS_LIST:null,RECEIVED_MY_TEAM_MEMBERS:null,RECEIVED_MY_TEAM_MEMBER:null,RECEIVED_TEAM_MEMBERS:null,RECEIVED_MEMBERS_IN_TEAM:null,RECEIVED_MEMBER_IN_TEAM:null,REMOVE_MEMBER_FROM_TEAM:null,RECEIVED_TEAM_STATS:null,RECEIVED_MY_TEAM_UNREADS:null,LEAVE_TEAM:null,UPDATED_TEAM_SCHEME:null,UPDATED_TEAM_MEMBER_SCHEME_ROLES:null,RECEIVED_TEAM_MEMBERS_MINUS_GROUP_MEMBERS:null,RECEIVED_TOTAL_TEAM_COUNT:null})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2).__importDefault(n(3));t.default=r.default({CREATE_POST_REQUEST:null,CREATE_POST_SUCCESS:null,CREATE_POST_FAILURE:null,CREATE_POST_RESET_REQUEST:null,EDIT_POST_REQUEST:null,EDIT_POST_SUCCESS:null,EDIT_POST_FAILURE:null,GET_POST_THREAD_REQUEST:null,GET_POST_THREAD_SUCCESS:null,GET_POST_THREAD_FAILURE:null,GET_POSTS_SUCCESS:null,GET_POSTS_FAILURE:null,GET_POSTS_SINCE_SUCCESS:null,GET_POST_THREAD_WITH_RETRY_ATTEMPT:null,GET_POSTS_WITH_RETRY_ATTEMPT:null,GET_POSTS_SINCE_WITH_RETRY_ATTEMPT:null,GET_POSTS_BEFORE_WITH_RETRY_ATTEMPT:null,GET_POSTS_AFTER_WITH_RETRY_ATTEMPT:null,RECEIVED_POST:null,RECEIVED_NEW_POST:null,RECEIVED_POSTS:null,RECEIVED_POSTS_AFTER:null,RECEIVED_POSTS_BEFORE:null,RECEIVED_POSTS_IN_CHANNEL:null,RECEIVED_POSTS_IN_THREAD:null,RECEIVED_POSTS_SINCE:null,POST_DELETED:null,POST_REMOVED:null,RECEIVED_FOCUSED_POST:null,RECEIVED_POST_SELECTED:null,RECEIVED_EDIT_POST:null,RECEIVED_REACTION:null,RECEIVED_REACTIONS:null,REACTION_DELETED:null,RECEIVED_OPEN_GRAPH_METADATA:null,ADD_MESSAGE_INTO_HISTORY:null,RESET_HISTORY_INDEX:null,MOVE_HISTORY_INDEX_BACK:null,MOVE_HISTORY_INDEX_FORWARD:null})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2).__importDefault(n(3));t.default=r.default({UPLOAD_FILES_REQUEST:null,UPLOAD_FILES_SUCCESS:null,UPLOAD_FILES_FAILURE:null,UPLOAD_FILES_CANCEL:null,RECEIVED_FILES_FOR_POST:null,RECEIVED_UPLOAD_FILES:null,RECEIVED_FILE_PUBLIC_LINK:null})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2).__importDefault(n(3));t.default=r.default({RECEIVED_PREFERENCES:null,RECEIVED_ALL_PREFERENCES:null,DELETED_PREFERENCES:null})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2).__importDefault(n(3));t.default=r.default({RECEIVED_INCOMING_HOOK:null,RECEIVED_INCOMING_HOOKS:null,DELETED_INCOMING_HOOK:null,RECEIVED_OUTGOING_HOOK:null,RECEIVED_OUTGOING_HOOKS:null,DELETED_OUTGOING_HOOK:null,RECEIVED_CUSTOM_TEAM_COMMANDS:null,RECEIVED_COMMAND:null,RECEIVED_COMMANDS:null,RECEIVED_COMMAND_TOKEN:null,DELETED_COMMAND:null,RECEIVED_OAUTH_APP:null,RECEIVED_OAUTH_APPS:null,DELETED_OAUTH_APP:null,RECEIVED_DIALOG_TRIGGER_ID:null,RECEIVED_DIALOG:null})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2).__importDefault(n(3));t.default=r.default({CLEAR_CUSTOM_EMOJIS:null,RECEIVED_CUSTOM_EMOJI:null,RECEIVED_CUSTOM_EMOJIS:null,DELETED_CUSTOM_EMOJI:null,CUSTOM_EMOJI_DOES_NOT_EXIST:null})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2).__importDefault(n(3));t.default=r.default({SAVE_APP_PROPS:null,SEARCH_REQUEST:null,SEARCH_FAILURE:null,SEARCH_SUCCESS:null,SEARCH_BY_ID_REQUEST:null,SEARCH_BY_ID_FAILURE:null,SEARCH_BY_ID_SUCCESS:null,SELECT_SEARCH_TEXT:null,INVALIDATE_SEARCH_TEXT:null,REQUEST_SEARCH:null,RECEIVE_SEARCH:null,RECEIVE_SEARCH_END:null,RECEIVE_CATEGORY_SEARCH:null,CLEAR_SEARCH_RESULTS:null,SAVE_SEARCH_SCROLL_POSITION:null,SAVE_SEARCH_PRIOR_LOCATION:null,UPDATE_SEARCH_TEXT:null,SAVE_SEARCH_BAR_TEXT:null,REQUEST_CATEGORIES_LIST:null,CATEGORIES_LIST_RECEIVED:null,CATEGORIES_LIST_FAILURE:null,CACHE_GIFS:null,CACHE_REQUEST:null})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2).__importDefault(n(3));t.default=r.default({GET_LOGS_REQUEST:null,GET_LOGS_SUCCESS:null,GET_LOGS_FAILURE:null,GET_AUDITS_REQUEST:null,GET_AUDITS_SUCCESS:null,GET_AUDITS_FAILURE:null,GET_CONFIG_REQUEST:null,GET_CONFIG_SUCCESS:null,GET_CONFIG_FAILURE:null,UPDATE_CONFIG_REQUEST:null,UPDATE_CONFIG_SUCCESS:null,UPDATE_CONFIG_FAILURE:null,RELOAD_CONFIG_REQUEST:null,RELOAD_CONFIG_SUCCESS:null,RELOAD_CONFIG_FAILURE:null,GET_ENVIRONMENT_CONFIG_REQUEST:null,GET_ENVIRONMENT_CONFIG_SUCCESS:null,GET_ENVIRONMENT_CONFIG_FAILURE:null,TEST_EMAIL_REQUEST:null,TEST_EMAIL_SUCCESS:null,TEST_EMAIL_FAILURE:null,TEST_SITE_URL_REQUEST:null,TEST_SITE_URL_SUCCESS:null,TEST_SITE_URL_FAILURE:null,TEST_S3_REQUEST:null,TEST_S3_SUCCESS:null,TEST_S3_FAILURE:null,INVALIDATE_CACHES_REQUEST:null,INVALIDATE_CACHES_SUCCESS:null,INVALIDATE_CACHES_FAILURE:null,RECYCLE_DATABASE_REQUEST:null,RECYCLE_DATABASE_SUCCESS:null,RECYCLE_DATABASE_FAILURE:null,CREATE_COMPLIANCE_REQUEST:null,CREATE_COMPLIANCE_SUCCESS:null,CREATE_COMPLIANCE_FAILURE:null,GET_COMPLIANCE_REQUEST:null,GET_COMPLIANCE_SUCCESS:null,GET_COMPLIANCE_FAILURE:null,UPLOAD_BRAND_IMAGE_REQUEST:null,UPLOAD_BRAND_IMAGE_SUCCESS:null,UPLOAD_BRAND_IMAGE_FAILURE:null,DELETE_BRAND_IMAGE_REQUEST:null,DELETE_BRAND_IMAGE_SUCCESS:null,DELETE_BRAND_IMAGE_FAILURE:null,GET_CLUSTER_STATUS_REQUEST:null,GET_CLUSTER_STATUS_SUCCESS:null,GET_CLUSTER_STATUS_FAILURE:null,TEST_LDAP_REQUEST:null,TEST_LDAP_SUCCESS:null,TEST_LDAP_FAILURE:null,SYNC_LDAP_REQUEST:null,SYNC_LDAP_SUCCESS:null,SYNC_LDAP_FAILURE:null,GET_LDAP_GROUPS_REQUEST:null,GET_LDAP_GROUPS_SUCCESS:null,GET_LDAP_GROUPS_FAILURE:null,LINK_LDAP_GROUP_REQUEST:null,LINK_LDAP_GROUP_SUCCESS:null,LINK_LDAP_GROUP_FAILURE:null,UNLINK_LDAP_GROUP_REQUEST:null,UNLINK_LDAP_GROUP_SUCCESS:null,UNLINK_LDAP_GROUP_FAILURE:null,SAML_CERT_STATUS_REQUEST:null,SAML_CERT_STATUS_SUCCESS:null,SAML_CERT_STATUS_FAILURE:null,UPLOAD_SAML_PUBLIC_REQUEST:null,UPLOAD_SAML_PUBLIC_SUCCESS:null,UPLOAD_SAML_PUBLIC_FAILURE:null,UPLOAD_SAML_PRIVATE_REQUEST:null,UPLOAD_SAML_PRIVATE_SUCCESS:null,UPLOAD_SAML_PRIVATE_FAILURE:null,UPLOAD_SAML_IDP_REQUEST:null,UPLOAD_SAML_IDP_SUCCESS:null,UPLOAD_SAML_IDP_FAILURE:null,DELETE_SAML_PUBLIC_REQUEST:null,DELETE_SAML_PUBLIC_SUCCESS:null,DELETE_SAML_PUBLIC_FAILURE:null,DELETE_SAML_PRIVATE_REQUEST:null,DELETE_SAML_PRIVATE_SUCCESS:null,DELETE_SAML_PRIVATE_FAILURE:null,DELETE_SAML_IDP_REQUEST:null,DELETE_SAML_IDP_SUCCESS:null,DELETE_SAML_IDP_FAILURE:null,UPLOAD_LICENSE_REQUEST:null,UPLOAD_LICENSE_SUCCESS:null,UPLOAD_LICENSE_FAILURE:null,REMOVE_LICENSE_REQUEST:null,REMOVE_LICENSE_SUCCESS:null,REMOVE_LICENSE_FAILURE:null,GET_ANALYTICS_REQUEST:null,GET_ANALYTICS_SUCCESS:null,GET_ANALYTICS_FAILURE:null,TEST_ELASTICSEARCH_REQUEST:null,TEST_ELASTICSEARCH_SUCCESS:null,TEST_ELASTICSEARCH_FAILURE:null,PURGE_ELASTICSEARCH_INDEXES_REQUEST:null,PURGE_ELASTICSEARCH_INDEXES_SUCCESS:null,PURGE_ELASTICSEARCH_INDEXES_FAILURE:null,UPLOAD_PLUGIN_REQUEST:null,UPLOAD_PLUGIN_SUCCESS:null,UPLOAD_PLUGIN_FAILURE:null,INSTALL_PLUGIN_FROM_URL_REQUEST:null,INSTALL_PLUGIN_FROM_URL_SUCCESS:null,INSTALL_PLUGIN_FROM_URL_FAILURE:null,GET_PLUGIN_REQUEST:null,GET_PLUGIN_SUCCESS:null,GET_PLUGIN_FAILURE:null,GET_PLUGIN_STATUSES_REQUEST:null,GET_PLUGIN_STATUSES_SUCCESS:null,GET_PLUGIN_STATUSES_FAILURE:null,REMOVE_PLUGIN_REQUEST:null,REMOVE_PLUGIN_SUCCESS:null,REMOVE_PLUGIN_FAILURE:null,ENABLE_PLUGIN_REQUEST:null,ENABLE_PLUGIN_SUCCESS:null,ENABLE_PLUGIN_FAILURE:null,DISABLE_PLUGIN_REQUEST:null,DISABLE_PLUGIN_SUCCESS:null,DISABLE_PLUGIN_FAILURE:null,RECEIVED_LOGS:null,RECEIVED_AUDITS:null,RECEIVED_CONFIG:null,RECEIVED_ENVIRONMENT_CONFIG:null,RECEIVED_COMPLIANCE_REPORT:null,RECEIVED_COMPLIANCE_REPORTS:null,RECEIVED_CLUSTER_STATUS:null,RECEIVED_SAML_CERT_STATUS:null,RECEIVED_SYSTEM_ANALYTICS:null,RECEIVED_TEAM_ANALYTICS:null,RECEIVED_USER_ACCESS_TOKEN:null,RECEIVED_USER_ACCESS_TOKENS:null,RECEIVED_USER_ACCESS_TOKENS_FOR_USER:null,RECEIVED_PLUGINS:null,RECEIVED_PLUGIN_STATUSES:null,RECEIVED_LDAP_GROUPS:null,LINKED_LDAP_GROUP:null,UNLINKED_LDAP_GROUP:null,REMOVED_PLUGIN:null,ENABLED_PLUGIN:null,DISABLED_PLUGIN:null,RECEIVED_SAML_METADATA_RESPONSE:null,SET_SAML_IDP_SUCCESS:null})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2).__importDefault(n(3));t.default=r.default({PUSH_ALERT:null,CLEAR_ALERT:null})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2).__importDefault(n(3));t.default=r.default({CREATE_JOB_REQUEST:null,CREATE_JOB_SUCCESS:null,CREATE_JOB_FAILURE:null,CANCEL_JOB_REQUEST:null,CANCEL_JOB_SUCCESS:null,CANCEL_JOB_FAILURE:null,GET_JOB_REQUEST:null,GET_JOB_SUCCESS:null,GET_JOB_FAILURE:null,GET_JOBS_REQUEST:null,GET_JOBS_SUCCESS:null,GET_JOBS_FAILURE:null,RECEIVED_JOB:null,RECEIVED_JOBS:null,RECEIVED_JOBS_BY_TYPE:null})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2).__importDefault(n(3));t.default=r.default({SEARCH_POSTS_REQUEST:null,SEARCH_POSTS_SUCCESS:null,SEARCH_FLAGGED_POSTS_REQUEST:null,SEARCH_FLAGGED_POSTS_SUCCESS:null,SEARCH_FLAGGED_POSTS_FAILURE:null,SEARCH_PINNED_POSTS_REQUEST:null,SEARCH_PINNED_POSTS_SUCCESS:null,SEARCH_PINNED_POSTS_FAILURE:null,REMOVE_SEARCH_PINNED_POSTS:null,RECEIVED_SEARCH_POSTS:null,RECEIVED_SEARCH_FLAGGED_POSTS:null,RECEIVED_SEARCH_PINNED_POSTS:null,RECEIVED_SEARCH_TERM:null,REMOVE_SEARCH_POSTS:null,REMOVE_SEARCH_TERM:null})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2).__importDefault(n(3));t.default=r.default({ROLES_BY_NAMES_REQUEST:null,ROLES_BY_NAMES_SUCCESS:null,ROLES_BY_NAMES_FAILURE:null,ROLE_BY_NAME_REQUEST:null,ROLE_BY_NAME_SUCCESS:null,ROLE_BY_NAME_FAILURE:null,ROLE_BY_ID_REQUEST:null,ROLE_BY_ID_SUCCESS:null,ROLE_BY_ID_FAILURE:null,EDIT_ROLE_REQUEST:null,EDIT_ROLE_SUCCESS:null,EDIT_ROLE_FAILURE:null,RECEIVED_ROLES:null,RECEIVED_ROLE:null,ROLE_DELETED:null,SET_PENDING_ROLES:null})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2).__importDefault(n(3));t.default=r.default({RECEIVED_SCHEME:null,RECEIVED_SCHEMES:null,CREATED_SCHEME:null,DELETED_SCHEME:null,PATCHED_SCHEME:null,RECEIVED_SCHEME_TEAMS:null,RECEIVED_SCHEME_CHANNELS:null})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2).__importDefault(n(3));t.default=r.default({LINKED_GROUP_TEAM:null,LINKED_GROUP_CHANNEL:null,UNLINKED_GROUP_TEAM:null,UNLINKED_GROUP_CHANNEL:null,RECEIVED_GROUP_TEAMS:null,RECEIVED_GROUP_CHANNELS:null,RECEIVED_GROUP_MEMBERS:null,RECEIVED_GROUP:null,RECEIVED_GROUPS:null,RECEIVED_GROUPS_ASSOCIATED_TO_TEAM:null,RECEIVED_GROUPS_ASSOCIATED_TO_CHANNEL:null,RECEIVED_ALL_GROUPS_ASSOCIATED_TO_TEAM:null,RECEIVED_ALL_GROUPS_ASSOCIATED_TO_CHANNEL:null,RECEIVED_GROUPS_NOT_ASSOCIATED_TO_TEAM:null,RECEIVED_GROUPS_NOT_ASSOCIATED_TO_CHANNEL:null,PATCHED_GROUP_TEAM:null,PATCHED_GROUP_CHANNEL:null})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2).__importDefault(n(3));t.default=r.default({RECEIVED_BOT_ACCOUNTS:null,RECEIVED_BOT_ACCOUNT:null})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2).__importDefault(n(3));t.default=r.default({RECEIVED_MARKETPLACE_PLUGINS:null,GET_MARKETPLACE_PLUGINS_FAILURE:null})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2).__importDefault(n(3));t.default=r.default({RECEIVED_CATEGORY:null,RECEIVED_CATEGORIES:null,RECEIVED_CATEGORY_ORDER:null,CATEGORY_COLLAPSED:null,CATEGORY_EXPANDED:null,CATEGORY_DELETED:null})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=n(4),o=n(18),a=n(7),s=n(23),u=n(182),l=n(183),c=n(32),d=n(22);function f(e){var t=this;return function(n,a){return r.__awaiter(t,void 0,void 0,(function(){var t,s;return r.__generator(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,i.Client4.getCustomEmojiByName(e)];case 1:return t=r.sent(),[3,3];case 2:return s=r.sent(),d.forceLogoutIfNecessary(s,n,a),404===s.status_code?n({type:o.EmojiTypes.CUSTOM_EMOJI_DOES_NOT_EXIST,data:e}):n(c.logError(s)),[2,{error:s}];case 3:return n({type:o.EmojiTypes.RECEIVED_CUSTOM_EMOJI,data:t}),[2,{data:t}]}}))}))}}function h(e){var t=this;return function(n){return r.__awaiter(t,void 0,void 0,(function(){var t;return r.__generator(this,(function(r){switch(r.label){case 0:return e&&0!==e.length?(t=[],e.forEach((function(e){return t.push(n(f(e)))})),[4,Promise.all(t)]):[2,{data:!0}];case 1:return r.sent(),[2,{data:!0}]}}))}))}}function p(e){var t=this;return function(n,i){return r.__awaiter(t,void 0,void 0,(function(){var t,o;return r.__generator(this,(function(r){switch(r.label){case 0:return t={},e.forEach((function(e){i().entities.users.profiles[e.creator_id]||(t[e.creator_id]=!0)})),(o=Object.keys(t)).length>0?[4,n(s.getProfilesByIds(o))]:[3,2];case 1:r.sent(),r.label=2;case 2:return[2,{data:!0}]}}))}))}}t.systemEmojis=new Map,t.setSystemEmojis=function(e){t.systemEmojis=e},t.createCustomEmoji=function(e,t){return d.bindClientFunc({clientFunc:i.Client4.createCustomEmoji,onSuccess:o.EmojiTypes.RECEIVED_CUSTOM_EMOJI,params:[e,t]})},t.getCustomEmoji=function(e){return d.bindClientFunc({clientFunc:i.Client4.getCustomEmoji,onSuccess:o.EmojiTypes.RECEIVED_CUSTOM_EMOJI,params:[e]})},t.getCustomEmojiByName=f,t.getCustomEmojisByName=h,t.getCustomEmojisInText=function(e){var n=this;return function(i,o){return r.__awaiter(n,void 0,void 0,(function(){var n,a,s,c;return r.__generator(this,(function(r){return e?(n=o(),a=n.entities.emojis.nonExistentEmoji,s=u.getCustomEmojisByName(n),c=l.parseNeededCustomEmojisFromText(e,t.systemEmojis,s,a),[2,h(Array.from(c))(i,o)]):[2,{data:!0}]}))}))}},t.getCustomEmojis=function(e,t,n,s){var u=this;return void 0===e&&(e=0),void 0===t&&(t=a.General.PAGE_SIZE_DEFAULT),void 0===n&&(n=a.Emoji.SORT_BY_NAME),void 0===s&&(s=!1),function(a,l){return r.__awaiter(u,void 0,void 0,(function(){var u,f;return r.__generator(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,i.Client4.getCustomEmojis(e,t,n)];case 1:return u=r.sent(),[3,3];case 2:return f=r.sent(),d.forceLogoutIfNecessary(f,a,l),a(c.logError(f)),[2,{error:f}];case 3:return s&&a(p(u)),a({type:o.EmojiTypes.RECEIVED_CUSTOM_EMOJIS,data:u}),[2,{data:u}]}}))}))}},t.loadProfilesForCustomEmojis=p,t.getAllCustomEmojis=function(e){var t=this;return void 0===e&&(e=a.General.PAGE_SIZE_MAXIMUM),function(n,s){return r.__awaiter(t,void 0,void 0,(function(){var t,u,l,f,h;return r.__generator(this,(function(p){switch(p.label){case 0:n({type:o.EmojiTypes.CLEAR_CUSTOM_EMOJIS,data:null}),t=!0,u=0,l=[],p.label=1;case 1:return p.trys.push([1,3,,4]),f=[],[4,i.Client4.getCustomEmojis(u,e,a.Emoji.SORT_BY_NAME)];case 2:return(f=p.sent()).length<e?t=!1:u+=1,l.push.apply(l,r.__spread(f)),[3,4];case 3:return h=p.sent(),d.forceLogoutIfNecessary(h,n,s),n(c.logError(h)),[2,{error:!0}];case 4:if(t)return[3,1];p.label=5;case 5:return n({type:o.EmojiTypes.RECEIVED_CUSTOM_EMOJIS,data:l}),[2,{data:!0}]}}))}))}},t.deleteCustomEmoji=function(e){var t=this;return function(n,a){return r.__awaiter(t,void 0,void 0,(function(){var t;return r.__generator(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,i.Client4.deleteCustomEmoji(e)];case 1:return r.sent(),[3,3];case 2:return t=r.sent(),d.forceLogoutIfNecessary(t,n,a),n(c.logError(t)),[2,{error:t}];case 3:return n({type:o.EmojiTypes.DELETED_CUSTOM_EMOJI,data:{id:e}}),[2,{data:!0}]}}))}))}},t.searchCustomEmojis=function(e,t,n){var a=this;return void 0===t&&(t={}),void 0===n&&(n=!1),function(s,u){return r.__awaiter(a,void 0,void 0,(function(){var a,l;return r.__generator(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,i.Client4.searchCustomEmoji(e,t)];case 1:return a=r.sent(),[3,3];case 2:return l=r.sent(),d.forceLogoutIfNecessary(l,s,u),s(c.logError(l)),[2,{error:l}];case 3:return n&&s(p(a)),s({type:o.EmojiTypes.RECEIVED_CUSTOM_EMOJIS,data:a}),[2,{data:a}]}}))}))}},t.autocompleteCustomEmojis=function(e){var t=this;return function(n,a){return r.__awaiter(t,void 0,void 0,(function(){var t,s;return r.__generator(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,i.Client4.autocompleteCustomEmoji(e)];case 1:return t=r.sent(),[3,3];case 2:return s=r.sent(),d.forceLogoutIfNecessary(s,n,a),n(c.logError(s)),[2,{error:s}];case 3:return n({type:o.EmojiTypes.RECEIVED_CUSTOM_EMOJIS,data:t}),[2,{data:t}]}}))}))}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(14),i=n(15);function o(e){return"true"!==e.entities.general.config.EnableCustomEmoji?{}:e.entities.emojis.customEmoji}t.getCustomEmojis=o,t.getCustomEmojisAsMap=r.createSelector(o,(function(e){var t=new Map;return Object.keys(e).forEach((function(n){t.set(n,e[n])})),t})),t.getCustomEmojisByName=r.createSelector(o,(function(e){var t=new Map;return Object.keys(e).forEach((function(n){t.set(e[n].name,e[n])})),t})),t.getCustomEmojiIdsSortedByName=i.createIdsSelector((function(e){return e.entities.emojis.customEmoji}),(function(e){return Object.keys(e).sort((function(t,n){return e[t].name.localeCompare(e[n].name)}))}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4);function i(e){return"id"in e}t.isSystemEmoji=function(e){return"batch"in e},t.isCustomEmoji=i,t.getEmojiImageUrl=function(e){if(i(e))return r.Client4.getEmojiRoute(e.id)+"/image";var t=e.filename||e.aliases[0];return r.Client4.getSystemEmojiImageUrl(t)},t.parseNeededCustomEmojisFromText=function(e,t,n,r){if(!e.includes(":"))return new Set;for(var i,o=/:([A-Za-z0-9_-]+):/gi,a=new Set;null!==(i=o.exec(e));)i&&(t.has(i[1])||r.has(i[1])||n.has(i[1])||a.add(i[1]));return a}},function(e,t,n){"use strict";const{inspect:r}=n(185);class i extends Error{constructor(e){super(r(e)),this.name="NonError",Error.captureStackTrace(this,i)}}const o=["name","message","stack","code"],a=(e,t,n)=>{const r=n||(Array.isArray(e)?[]:{});t.push(e);for(const[n,i]of Object.entries(e))"function"!=typeof i&&(i&&"object"==typeof i?t.includes(e[n])?r[n]="[Circular]":r[n]=a(e[n],t.slice()):r[n]=i);for(const t of o)"string"==typeof e[t]&&(r[t]=e[t]);return r};e.exports={serializeError:e=>"object"==typeof e&&null!==e?a(e,[]):"function"==typeof e?`[Function: ${e.name||"anonymous"}]`:e,deserializeError:e=>{if(e instanceof Error)return e;if("object"==typeof e&&null!==e&&!Array.isArray(e)){const t=new Error;return a(e,[],t),t}return new i(e)}}},function(e,t,n){(function(e){var r=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),n={},r=0;r<t.length;r++)n[t[r]]=Object.getOwnPropertyDescriptor(e,t[r]);return n},i=/%[sdj%]/g;t.format=function(e){if(!m(e)){for(var t=[],n=0;n<arguments.length;n++)t.push(s(arguments[n]));return t.join(" ")}n=1;for(var r=arguments,o=r.length,a=String(e).replace(i,(function(e){if("%%"===e)return"%";if(n>=o)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return e}})),u=r[n];n<o;u=r[++n])_(u)||!y(u)?a+=" "+u:a+=" "+s(u);return a},t.deprecate=function(n,r){if(void 0!==e&&!0===e.noDeprecation)return n;if(void 0===e)return function(){return t.deprecate(n,r).apply(this,arguments)};var i=!1;return function(){if(!i){if(e.throwDeprecation)throw new Error(r);e.traceDeprecation?console.trace(r):console.error(r),i=!0}return n.apply(this,arguments)}};var o,a={};function s(e,n){var r={seen:[],stylize:l};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),p(n)?r.showHidden=n:n&&t._extend(r,n),g(r.showHidden)&&(r.showHidden=!1),g(r.depth)&&(r.depth=2),g(r.colors)&&(r.colors=!1),g(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=u),c(r,e,r.depth)}function u(e,t){var n=s.styles[t];return n?"["+s.colors[n][0]+"m"+e+"["+s.colors[n][1]+"m":e}function l(e,t){return e}function c(e,n,r){if(e.customInspect&&n&&S(n.inspect)&&n.inspect!==t.inspect&&(!n.constructor||n.constructor.prototype!==n)){var i=n.inspect(r,e);return m(i)||(i=c(e,i,r)),i}var o=function(e,t){if(g(t))return e.stylize("undefined","undefined");if(m(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}if(E(t))return e.stylize(""+t,"number");if(p(t))return e.stylize(""+t,"boolean");if(_(t))return e.stylize("null","null")}(e,n);if(o)return o;var a=Object.keys(n),s=function(e){var t={};return e.forEach((function(e,n){t[e]=!0})),t}(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(n)),C(n)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return d(n);if(0===a.length){if(S(n)){var u=n.name?": "+n.name:"";return e.stylize("[Function"+u+"]","special")}if(v(n))return e.stylize(RegExp.prototype.toString.call(n),"regexp");if(T(n))return e.stylize(Date.prototype.toString.call(n),"date");if(C(n))return d(n)}var l,y="",b=!1,R=["{","}"];(h(n)&&(b=!0,R=["[","]"]),S(n))&&(y=" [Function"+(n.name?": "+n.name:"")+"]");return v(n)&&(y=" "+RegExp.prototype.toString.call(n)),T(n)&&(y=" "+Date.prototype.toUTCString.call(n)),C(n)&&(y=" "+d(n)),0!==a.length||b&&0!=n.length?r<0?v(n)?e.stylize(RegExp.prototype.toString.call(n),"regexp"):e.stylize("[Object]","special"):(e.seen.push(n),l=b?function(e,t,n,r,i){for(var o=[],a=0,s=t.length;a<s;++a)N(t,String(a))?o.push(f(e,t,n,r,String(a),!0)):o.push("");return i.forEach((function(i){i.match(/^\d+$/)||o.push(f(e,t,n,r,i,!0))})),o}(e,n,r,s,a):a.map((function(t){return f(e,n,r,s,t,b)})),e.seen.pop(),function(e,t,n){if(e.reduce((function(e,t){return t.indexOf("\n")>=0&&0,e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60)return n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n  ")+" "+n[1];return n[0]+t+" "+e.join(", ")+" "+n[1]}(l,y,R)):R[0]+y+R[1]}function d(e){return"["+Error.prototype.toString.call(e)+"]"}function f(e,t,n,r,i,o){var a,s,u;if((u=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?s=u.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):u.set&&(s=e.stylize("[Setter]","special")),N(r,i)||(a="["+i+"]"),s||(e.seen.indexOf(u.value)<0?(s=_(n)?c(e,u.value,null):c(e,u.value,n-1)).indexOf("\n")>-1&&(s=o?s.split("\n").map((function(e){return"  "+e})).join("\n").substr(2):"\n"+s.split("\n").map((function(e){return"   "+e})).join("\n")):s=e.stylize("[Circular]","special")),g(a)){if(o&&i.match(/^\d+$/))return s;(a=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function h(e){return Array.isArray(e)}function p(e){return"boolean"==typeof e}function _(e){return null===e}function E(e){return"number"==typeof e}function m(e){return"string"==typeof e}function g(e){return void 0===e}function v(e){return y(e)&&"[object RegExp]"===b(e)}function y(e){return"object"==typeof e&&null!==e}function T(e){return y(e)&&"[object Date]"===b(e)}function C(e){return y(e)&&("[object Error]"===b(e)||e instanceof Error)}function S(e){return"function"==typeof e}function b(e){return Object.prototype.toString.call(e)}function R(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(n){if(g(o)&&(o=e.env.NODE_DEBUG||""),n=n.toUpperCase(),!a[n])if(new RegExp("\\b"+n+"\\b","i").test(o)){var r=e.pid;a[n]=function(){var e=t.format.apply(t,arguments);console.error("%s %d: %s",n,r,e)}}else a[n]=function(){};return a[n]},t.inspect=s,s.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=h,t.isBoolean=p,t.isNull=_,t.isNullOrUndefined=function(e){return null==e},t.isNumber=E,t.isString=m,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=g,t.isRegExp=v,t.isObject=y,t.isDate=T,t.isError=C,t.isFunction=S,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=n(186);var I=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function A(){var e=new Date,t=[R(e.getHours()),R(e.getMinutes()),R(e.getSeconds())].join(":");return[e.getDate(),I[e.getMonth()],t].join(" ")}function N(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){console.log("%s - %s",A(),t.format.apply(t,arguments))},t.inherits=n(187),t._extend=function(e,t){if(!t||!y(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e};var O="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function w(e,t){if(!e){var n=new Error("Promise was rejected with a falsy value");n.reason=e,e=n}return t(e)}t.promisify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');if(O&&e[O]){var t;if("function"!=typeof(t=e[O]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,O,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var t,n,r=new Promise((function(e,r){t=e,n=r})),i=[],o=0;o<arguments.length;o++)i.push(arguments[o]);i.push((function(e,r){e?n(e):t(r)}));try{e.apply(this,i)}catch(e){n(e)}return r}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),O&&Object.defineProperty(t,O,{value:t,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(t,r(e))},t.promisify.custom=O,t.callbackify=function(t){if("function"!=typeof t)throw new TypeError('The "original" argument must be of type Function');function n(){for(var n=[],r=0;r<arguments.length;r++)n.push(arguments[r]);var i=n.pop();if("function"!=typeof i)throw new TypeError("The last argument must be of type Function");var o=this,a=function(){return i.apply(o,arguments)};t.apply(this,n).then((function(t){e.nextTick(a,null,t)}),(function(t){e.nextTick(w,t,a)}))}return Object.setPrototypeOf(n,Object.getPrototypeOf(t)),Object.defineProperties(n,r(t)),n}}).call(this,n(100))},function(e,t){e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=n(4),o=n(18),a=n(9),s=n(15),u=n(38),l=n(32),c=n(50),d=n(23),f=n(22);function h(){var e=this;return function(){return r.__awaiter(e,void 0,void 0,(function(){var e,t,n;return r.__generator(this,(function(r){switch(r.label){case 0:t=new f.FormattedError("mobile.server_ping_failed","Cannot connect to the server. Please check your server URL and internet connection."),r.label=1;case 1:return r.trys.push([1,3,,4]),[4,i.Client4.ping()];case 2:return"OK"!==(e=r.sent()).status?[2,{error:t}]:[3,4];case 3:return 401===(n=r.sent()).status_code&&(t=n),[2,{error:t}];case 4:return[2,{data:e}]}}))}))}}function p(){var e=this;return function(t,n){return r.__awaiter(e,void 0,void 0,(function(){var e,a;return r.__generator(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,i.Client4.getClientConfigOld()];case 1:return e=r.sent(),[3,3];case 2:return a=r.sent(),f.forceLogoutIfNecessary(a,t,n),[2,{error:a}];case 3:return i.Client4.setEnableLogging("true"===e.EnableDeveloper),i.Client4.setDiagnosticId(e.DiagnosticId),t(u.batchActions([{type:o.GeneralTypes.CLIENT_CONFIG_RECEIVED,data:e}])),[2,{data:e}]}}))}))}}function _(){var e=this;return function(t,n){return r.__awaiter(e,void 0,void 0,(function(){var e,a;return r.__generator(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,i.Client4.getDataRetentionPolicy()];case 1:return e=r.sent(),[3,3];case 2:return a=r.sent(),f.forceLogoutIfNecessary(a,t,n),t(u.batchActions([{type:o.GeneralTypes.RECEIVED_DATA_RETENTION_POLICY,error:a},l.logError(a)])),[2,{error:a}];case 3:return t(u.batchActions([{type:o.GeneralTypes.RECEIVED_DATA_RETENTION_POLICY,data:e}])),[2,{data:e}]}}))}))}}function E(){return f.bindClientFunc({clientFunc:i.Client4.getClientLicenseOld,onSuccess:[o.GeneralTypes.CLIENT_LICENSE_RECEIVED]})}function m(e,t){return void 0===t&&(t="ERROR"),f.bindClientFunc({clientFunc:i.Client4.logClientError,onRequest:o.GeneralTypes.LOG_CLIENT_ERROR_REQUEST,onSuccess:o.GeneralTypes.LOG_CLIENT_ERROR_SUCCESS,onFailure:o.GeneralTypes.LOG_CLIENT_ERROR_FAILURE,params:[e,t]})}function g(e){var t=this;return function(n,i){return r.__awaiter(t,void 0,void 0,(function(){return r.__generator(this,(function(t){return n({type:o.GeneralTypes.RECEIVED_APP_STATE,data:e}),[2,{data:!0}]}))}))}}function v(e){var t=this;return function(n,i){return r.__awaiter(t,void 0,void 0,(function(){return r.__generator(this,(function(t){return n({type:o.GeneralTypes.RECEIVED_APP_DEVICE_TOKEN,data:e}),[2,{data:!0}]}))}))}}function y(e){var t=this;return function(n,i){return r.__awaiter(t,void 0,void 0,(function(){return r.__generator(this,(function(t){return n({type:o.GeneralTypes.RECEIVED_SERVER_VERSION,data:e}),n(c.loadRolesIfNeeded([])),[2,{data:!0}]}))}))}}function T(e){var t=this;return function(n,o){return r.__awaiter(t,void 0,void 0,(function(){return r.__generator(this,(function(t){return i.Client4.setToken(e.token),i.Client4.setUrl(e.url),[2,d.loadMe()(n,o)]}))}))}}function C(){return f.bindClientFunc({clientFunc:i.Client4.getTimezones,onRequest:o.GeneralTypes.SUPPORTED_TIMEZONES_REQUEST,onSuccess:[o.GeneralTypes.SUPPORTED_TIMEZONES_RECEIVED,o.GeneralTypes.SUPPORTED_TIMEZONES_SUCCESS],onFailure:o.GeneralTypes.SUPPORTED_TIMEZONES_FAILURE})}function S(e){return i.Client4.setUrl(e),!0}function b(e){var t=this;return function(n,u){return r.__awaiter(t,void 0,void 0,(function(){var t,l,c;return r.__generator(this,(function(d){switch(d.label){case 0:t=s.isMinimumServerVersion(a.getServerVersion(u()),5,3)?i.Client4.getRedirectLocation(e):Promise.resolve({location:e}),d.label=1;case 1:return d.trys.push([1,3,,4]),[4,t];case 2:return l=d.sent(),[3,4];case 3:return c=d.sent(),f.forceLogoutIfNecessary(c,n,u),n({type:o.GeneralTypes.REDIRECT_LOCATION_FAILURE,data:{error:c,url:e}}),[2,{error:c}];case 4:return n({type:o.GeneralTypes.REDIRECT_LOCATION_SUCCESS,data:r.__assign(r.__assign({},l),{url:e})}),[2,{data:l}]}}))}))}}t.getPing=h,t.resetPing=function(){var e=this;return function(t,n){return r.__awaiter(e,void 0,void 0,(function(){return r.__generator(this,(function(e){return t({type:o.GeneralTypes.PING_RESET,data:{}}),[2,{data:!0}]}))}))}},t.getClientConfig=p,t.getDataRetentionPolicy=_,t.getLicenseConfig=E,t.logClientError=m,t.setAppState=g,t.setDeviceToken=v,t.setServerVersion=y,t.setStoreFromLocalData=T,t.getSupportedTimezones=C,t.setUrl=S,t.getRedirectLocation=b,t.default={getPing:h,getClientConfig:p,getDataRetentionPolicy:_,getSupportedTimezones:C,getLicenseConfig:E,logClientError:m,setAppState:g,setDeviceToken:v,setServerVersion:y,setStoreFromLocalData:T,setUrl:S,getRedirectLocation:b}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=n(4),o=n(7),a=n(18),s=r.__importDefault(n(101)),u=n(9),l=n(40),c=n(41),d=n(38),f=n(102),h=n(32),p=n(22),_=n(23),E=n(50);function m(e,t,n){return r.__awaiter(this,void 0,void 0,(function(){var i,o,a,s,u,l,c;return r.__generator(this,(function(r){switch(r.label){case 0:return i=n().entities.users,o=i.currentUserId,a=i.profiles,s=i.statuses,u=[],l=[],e.forEach((function(e){a[e]||u.includes(e)||e===o||u.push(e),s[e]||l.includes(e)||e===o||l.push(e)})),c=[],u.length&&c.push(t(_.getProfilesByIds(u))),l.length&&c.push(t(_.getStatusesByIds(l))),[4,Promise.all(c)];case 1:return r.sent(),[2]}}))}))}function g(){return p.bindClientFunc({clientFunc:i.Client4.getMyTeamUnreads,onSuccess:a.TeamTypes.RECEIVED_MY_TEAM_UNREADS})}function v(e){return p.bindClientFunc({clientFunc:i.Client4.getTeam,onSuccess:a.TeamTypes.RECEIVED_TEAM,params:[e]})}function y(){var e=this;return function(t,n){return r.__awaiter(e,void 0,void 0,(function(){var e,o,s,u,l,c,d,f,h,_,m,g;return r.__generator(this,(function(v){switch(v.label){case 0:return[4,p.bindClientFunc({clientFunc:i.Client4.getMyTeamMembers,onSuccess:a.TeamTypes.RECEIVED_MY_TEAM_MEMBERS})(t,n)];case 1:if("data"in(e=v.sent())&&e.data){o=new Set;try{for(s=r.__values(e.data),u=s.next();!u.done;u=s.next()){l=u.value;try{for(m=void 0,c=r.__values(l.roles.split(" ")),d=c.next();!d.done;d=c.next())f=d.value,o.add(f)}catch(e){m={error:e}}finally{try{d&&!d.done&&(g=c.return)&&g.call(c)}finally{if(m)throw m.error}}}}catch(e){h={error:e}}finally{try{u&&!u.done&&(_=s.return)&&_.call(s)}finally{if(h)throw h.error}}o.size>0&&t(E.loadRolesIfNeeded(r.__spread(o)))}return[2,e]}}))}))}}t.selectTeam=function(e){var t=this;return function(n,i){return r.__awaiter(t,void 0,void 0,(function(){var t;return r.__generator(this,(function(r){return t="string"==typeof e?e:e.id,n({type:a.TeamTypes.SELECT_TEAM,data:t}),[2,{data:!0}]}))}))}},t.getMyTeams=function(){return p.bindClientFunc({clientFunc:i.Client4.getMyTeams,onRequest:a.TeamTypes.MY_TEAMS_REQUEST,onSuccess:[a.TeamTypes.RECEIVED_TEAMS_LIST,a.TeamTypes.MY_TEAMS_SUCCESS],onFailure:a.TeamTypes.MY_TEAMS_FAILURE})},t.getMyTeamUnreads=g,t.getTeam=v,t.getTeamByName=function(e){return p.bindClientFunc({clientFunc:i.Client4.getTeamByName,onSuccess:a.TeamTypes.RECEIVED_TEAM,params:[e]})},t.getTeams=function(e,t,n){var s=this;return void 0===e&&(e=0),void 0===t&&(t=o.General.TEAMS_CHUNK_SIZE),void 0===n&&(n=!1),function(o,u){return r.__awaiter(s,void 0,void 0,(function(){var s,l,c;return r.__generator(this,(function(r){switch(r.label){case 0:o({type:a.TeamTypes.GET_TEAMS_REQUEST,data:s}),r.label=1;case 1:return r.trys.push([1,3,,4]),[4,i.Client4.getTeams(e,t,n)];case 2:return s=r.sent(),[3,4];case 3:return l=r.sent(),p.forceLogoutIfNecessary(l,o,u),o({type:a.TeamTypes.GET_TEAMS_FAILURE,data:s}),o(h.logError(l)),[2,{error:l}];case 4:return c=[{type:a.TeamTypes.RECEIVED_TEAMS_LIST,data:n?s.teams:s},{type:a.TeamTypes.GET_TEAMS_SUCCESS,data:s}],n&&c.push({type:a.TeamTypes.RECEIVED_TOTAL_TEAM_COUNT,data:s.total_count}),o(d.batchActions(c)),[2,{data:s}]}}))}))}},t.searchTeams=function(e,t,n){var o=this;return function(s,u){return r.__awaiter(o,void 0,void 0,(function(){var o,l,c;return r.__generator(this,(function(r){switch(r.label){case 0:s({type:a.TeamTypes.GET_TEAMS_REQUEST,data:null}),r.label=1;case 1:return r.trys.push([1,3,,4]),[4,i.Client4.searchTeams(e,t,n)];case 2:return o=r.sent(),[3,4];case 3:return l=r.sent(),p.forceLogoutIfNecessary(l,s,u),s(d.batchActions([{type:a.TeamTypes.GET_TEAMS_FAILURE,error:l},h.logError(l)])),[2,{error:l}];case 4:return c=o.teams||o,s(d.batchActions([{type:a.TeamTypes.RECEIVED_TEAMS_LIST,data:c},{type:a.TeamTypes.GET_TEAMS_SUCCESS}])),[2,{data:o}]}}))}))}},t.createTeam=function(e){var t=this;return function(n,s){return r.__awaiter(t,void 0,void 0,(function(){var t,u,l;return r.__generator(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,i.Client4.createTeam(e)];case 1:return t=r.sent(),[3,3];case 2:return u=r.sent(),p.forceLogoutIfNecessary(u,n,s),n(h.logError(u)),[2,{error:u}];case 3:return l={team_id:t.id,user_id:s().entities.users.currentUserId,roles:o.General.TEAM_ADMIN_ROLE+" "+o.General.TEAM_USER_ROLE,delete_at:0,msg_count:0,mention_count:0},n(d.batchActions([{type:a.TeamTypes.CREATED_TEAM,data:t},{type:a.TeamTypes.RECEIVED_MY_TEAM_MEMBER,data:l},{type:a.TeamTypes.SELECT_TEAM,data:t.id}])),n(E.loadRolesIfNeeded(l.roles.split(" "))),[2,{data:t}]}}))}))}},t.deleteTeam=function(e){var t=this;return function(n,o){return r.__awaiter(t,void 0,void 0,(function(){var t,u,l,c;return r.__generator(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,i.Client4.deleteTeam(e)];case 1:return r.sent(),[3,3];case 2:return t=r.sent(),p.forceLogoutIfNecessary(t,n,o),n(h.logError(t)),[2,{error:t}];case 3:return u=o().entities,l=u.teams.currentTeamId,c=[],e===l&&(s.default.emit("leave_team"),c.push({type:a.ChannelTypes.SELECT_CHANNEL,data:""})),c.push({type:a.TeamTypes.RECEIVED_TEAM_DELETED,data:{id:e}}),n(d.batchActions(c)),[2,{data:!0}]}}))}))}},t.updateTeam=function(e){return p.bindClientFunc({clientFunc:i.Client4.updateTeam,onSuccess:a.TeamTypes.UPDATED_TEAM,params:[e]})},t.patchTeam=function(e){return p.bindClientFunc({clientFunc:i.Client4.patchTeam,onSuccess:a.TeamTypes.PATCHED_TEAM,params:[e]})},t.regenerateTeamInviteId=function(e){return p.bindClientFunc({clientFunc:i.Client4.regenerateTeamInviteId,onSuccess:a.TeamTypes.REGENERATED_TEAM_INVITE_ID,params:[e]})},t.getMyTeamMembers=y,t.getTeamMembers=function(e,t,n,r){return void 0===t&&(t=0),void 0===n&&(n=o.General.TEAMS_CHUNK_SIZE),p.bindClientFunc({clientFunc:i.Client4.getTeamMembers,onRequest:a.TeamTypes.GET_TEAM_MEMBERS_REQUEST,onSuccess:[a.TeamTypes.RECEIVED_MEMBERS_IN_TEAM,a.TeamTypes.GET_TEAM_MEMBERS_SUCCESS],onFailure:a.TeamTypes.GET_TEAM_MEMBERS_FAILURE,params:[e,t,n,r]})},t.getTeamMember=function(e,t){var n=this;return function(o,s){return r.__awaiter(n,void 0,void 0,(function(){var n,u,l;return r.__generator(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),u=i.Client4.getTeamMember(e,t),m([t],o,s),[4,u];case 1:return n=r.sent(),[3,3];case 2:return l=r.sent(),p.forceLogoutIfNecessary(l,o,s),o(h.logError(l)),[2,{error:l}];case 3:return o({type:a.TeamTypes.RECEIVED_MEMBERS_IN_TEAM,data:[n]}),[2,{data:n}]}}))}))}},t.getTeamMembersByIds=function(e,t){var n=this;return function(o,s){return r.__awaiter(n,void 0,void 0,(function(){var n,u,l;return r.__generator(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),u=i.Client4.getTeamMembersByIds(e,t),m(t,o,s),[4,u];case 1:return n=r.sent(),[3,3];case 2:return l=r.sent(),p.forceLogoutIfNecessary(l,o,s),o(h.logError(l)),[2,{error:l}];case 3:return o({type:a.TeamTypes.RECEIVED_MEMBERS_IN_TEAM,data:n}),[2,{data:n}]}}))}))}},t.getTeamsForUser=function(e){return p.bindClientFunc({clientFunc:i.Client4.getTeamsForUser,onRequest:a.TeamTypes.GET_TEAMS_REQUEST,onSuccess:[a.TeamTypes.RECEIVED_TEAMS_LIST,a.TeamTypes.GET_TEAMS_SUCCESS],onFailure:a.TeamTypes.GET_TEAMS_FAILURE,params:[e]})},t.getTeamMembersForUser=function(e){return p.bindClientFunc({clientFunc:i.Client4.getTeamMembersForUser,onSuccess:a.TeamTypes.RECEIVED_TEAM_MEMBERS,params:[e]})},t.getTeamStats=function(e){return p.bindClientFunc({clientFunc:i.Client4.getTeamStats,onSuccess:a.TeamTypes.RECEIVED_TEAM_STATS,params:[e]})},t.addUserToTeamFromInvite=function(e,t){return p.bindClientFunc({clientFunc:i.Client4.addToTeamFromInvite,onRequest:a.TeamTypes.ADD_TO_TEAM_FROM_INVITE_REQUEST,onSuccess:a.TeamTypes.ADD_TO_TEAM_FROM_INVITE_SUCCESS,onFailure:a.TeamTypes.ADD_TO_TEAM_FROM_INVITE_FAILURE,params:[e,t]})},t.addUserToTeam=function(e,t){var n=this;return function(o,s){return r.__awaiter(n,void 0,void 0,(function(){var n,u;return r.__generator(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,i.Client4.addToTeam(e,t)];case 1:return n=r.sent(),[3,3];case 2:return u=r.sent(),p.forceLogoutIfNecessary(u,o,s),o(h.logError(u)),[2,{error:u}];case 3:return o(d.batchActions([{type:a.UserTypes.RECEIVED_PROFILE_IN_TEAM,data:{id:e,user_id:t}},{type:a.TeamTypes.RECEIVED_MEMBER_IN_TEAM,data:n}])),[2,{data:n}]}}))}))}},t.addUsersToTeam=function(e,t){var n=this;return function(o,s){return r.__awaiter(n,void 0,void 0,(function(){var n,u,l;return r.__generator(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,i.Client4.addUsersToTeam(e,t)];case 1:return n=r.sent(),[3,3];case 2:return u=r.sent(),p.forceLogoutIfNecessary(u,o,s),o(h.logError(u)),[2,{error:u}];case 3:return l=[],n.forEach((function(e){return l.push({id:e.user_id})})),o(d.batchActions([{type:a.UserTypes.RECEIVED_PROFILES_LIST_IN_TEAM,data:l,id:e},{type:a.TeamTypes.RECEIVED_MEMBERS_IN_TEAM,data:n}])),[2,{data:n}]}}))}))}},t.addUsersToTeamGracefully=function(e,t){var n=this;return function(o,s){return r.__awaiter(n,void 0,void 0,(function(){var n,u,l,c,f;return r.__generator(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,i.Client4.addUsersToTeamGracefully(e,t)];case 1:return n=r.sent(),[3,3];case 2:return u=r.sent(),p.forceLogoutIfNecessary(u,o,s),o(h.logError(u)),[2,{error:u}];case 3:return l=n?n.filter((function(e){return!e.error})):[],c=l.map((function(e){return{id:e.user_id}})),f=l.map((function(e){return e.member})),o(d.batchActions([{type:a.UserTypes.RECEIVED_PROFILES_LIST_IN_TEAM,data:c,id:e},{type:a.TeamTypes.RECEIVED_MEMBERS_IN_TEAM,data:f}])),[2,{data:n}]}}))}))}},t.removeUserFromTeam=function(e,t){var n=this;return function(o,s){return r.__awaiter(n,void 0,void 0,(function(){var n,u,_,E,m,g,v,y,T,C,S,b,R,I;return r.__generator(this,(function(A){switch(A.label){case 0:return A.trys.push([0,2,,3]),[4,i.Client4.removeFromTeam(e,t)];case 1:return A.sent(),[3,3];case 2:return n=A.sent(),p.forceLogoutIfNecessary(n,o,s),o(h.logError(n)),[2,{error:n}];case 3:if(u={team_id:e,user_id:t},_=[{type:a.UserTypes.RECEIVED_PROFILE_NOT_IN_TEAM,data:{id:e,user_id:t}},{type:a.TeamTypes.REMOVE_MEMBER_FROM_TEAM,data:u}],E=s(),m=c.getCurrentUserId(E),t===m){g=E.entities.channels,v=g.channels,y=g.myMembers;try{for(T=r.__values(Object.values(y)),C=T.next();!C.done;C=T.next())S=C.value,(b=v[S.channel_id])&&b.team_id===e&&_.push({type:a.ChannelTypes.LEAVE_CHANNEL,data:b})}catch(e){R={error:e}}finally{try{C&&!C.done&&(I=T.return)&&I.call(T)}finally{if(R)throw R.error}}e===l.getCurrentTeamId(E)&&_.push(f.selectChannel(""))}return o(d.batchActions(_)),[2,{data:!0}]}}))}))}},t.updateTeamMemberRoles=function(e,t,n){var o=this;return function(s,u){return r.__awaiter(o,void 0,void 0,(function(){var o,l;return r.__generator(this,(function(c){switch(c.label){case 0:return c.trys.push([0,2,,3]),[4,i.Client4.updateTeamMemberRoles(e,t,n)];case 1:return c.sent(),[3,3];case 2:return o=c.sent(),p.forceLogoutIfNecessary(o,s,u),s(h.logError(o)),[2,{error:o}];case 3:return(l=u().entities.teams.membersInTeam[e])&&l[t]&&s({type:a.TeamTypes.RECEIVED_MEMBER_IN_TEAM,data:r.__assign(r.__assign({},l[t]),{roles:n})}),[2,{data:!0}]}}))}))}},t.sendEmailInvitesToTeam=function(e,t){return p.bindClientFunc({clientFunc:i.Client4.sendEmailInvitesToTeam,params:[e,t]})},t.sendEmailGuestInvitesToChannels=function(e,t,n,r){return p.bindClientFunc({clientFunc:i.Client4.sendEmailGuestInvitesToChannels,params:[e,t,n,r]})},t.sendEmailInvitesToTeamGracefully=function(e,t){return p.bindClientFunc({clientFunc:i.Client4.sendEmailInvitesToTeamGracefully,params:[e,t]})},t.sendEmailGuestInvitesToChannelsGracefully=function(e,t,n,r){return p.bindClientFunc({clientFunc:i.Client4.sendEmailGuestInvitesToChannelsGracefully,params:[e,t,n,r]})},t.getTeamInviteInfo=function(e){return p.bindClientFunc({clientFunc:i.Client4.getTeamInviteInfo,onRequest:a.TeamTypes.TEAM_INVITE_INFO_REQUEST,onSuccess:a.TeamTypes.TEAM_INVITE_INFO_SUCCESS,onFailure:a.TeamTypes.TEAM_INVITE_INFO_FAILURE,params:[e]})},t.checkIfTeamExists=function(e){var t=this;return function(n,o){return r.__awaiter(t,void 0,void 0,(function(){var t,a;return r.__generator(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,i.Client4.checkIfTeamExists(e)];case 1:return t=r.sent(),[3,3];case 2:return a=r.sent(),p.forceLogoutIfNecessary(a,n,o),n(h.logError(a)),[2,{error:a}];case 3:return[2,{data:t.exists}]}}))}))}},t.joinTeam=function(e,t){var n=this;return function(o,s){return r.__awaiter(n,void 0,void 0,(function(){var n,l,c;return r.__generator(this,(function(r){switch(r.label){case 0:o({type:a.TeamTypes.JOIN_TEAM_REQUEST,data:null}),n=s(),r.label=1;case 1:return r.trys.push([1,6,,7]),u.isCompatibleWithJoinViewTeamPermissions(n)?(l=n.entities.users.currentUserId,[4,i.Client4.addToTeam(t,l)]):[3,3];case 2:return r.sent(),[3,5];case 3:return[4,i.Client4.joinTeam(e)];case 4:r.sent(),r.label=5;case 5:return[3,7];case 6:return c=r.sent(),p.forceLogoutIfNecessary(c,o,s),o(d.batchActions([{type:a.TeamTypes.JOIN_TEAM_FAILURE,error:c},h.logError(c)])),[2,{error:c}];case 7:return g()(o,s),[4,Promise.all([v(t)(o,s),y()(o,s)])];case 8:return r.sent(),o({type:a.TeamTypes.JOIN_TEAM_SUCCESS,data:null}),[2,{data:!0}]}}))}))}},t.setTeamIcon=function(e,t){return p.bindClientFunc({clientFunc:i.Client4.setTeamIcon,params:[e,t]})},t.removeTeamIcon=function(e){return p.bindClientFunc({clientFunc:i.Client4.removeTeamIcon,params:[e]})},t.updateTeamScheme=function(e,t){var n=this;return p.bindClientFunc({clientFunc:function(){return r.__awaiter(n,void 0,void 0,(function(){return r.__generator(this,(function(n){switch(n.label){case 0:return[4,i.Client4.updateTeamScheme(e,t)];case 1:return n.sent(),[2,{teamId:e,schemeId:t}]}}))}))},onSuccess:a.TeamTypes.UPDATED_TEAM_SCHEME})},t.updateTeamMemberSchemeRoles=function(e,t,n,o){var s=this;return p.bindClientFunc({clientFunc:function(){return r.__awaiter(s,void 0,void 0,(function(){return r.__generator(this,(function(r){switch(r.label){case 0:return[4,i.Client4.updateTeamMemberSchemeRoles(e,t,n,o)];case 1:return r.sent(),[2,{teamId:e,userId:t,isSchemeUser:n,isSchemeAdmin:o}]}}))}))},onSuccess:a.TeamTypes.UPDATED_TEAM_MEMBER_SCHEME_ROLES})},t.invalidateAllEmailInvites=function(){return p.bindClientFunc({clientFunc:i.Client4.invalidateAllEmailInvites})},t.membersMinusGroupMembers=function(e,t,n,r){return void 0===n&&(n=0),void 0===r&&(r=o.General.PROFILE_CHUNK_SIZE),p.bindClientFunc({clientFunc:i.Client4.teamMembersMinusGroupMembers,onSuccess:a.TeamTypes.RECEIVED_TEAM_MEMBERS_MINUS_GROUP_MEMBERS,params:[e,t,n,r]})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7);t.teamListToMap=function(e){for(var t={},n=0;n<e.length;n++)t[e[n].id]=e[n];return t},t.sortTeamsWithLocale=function(e){return function(t,n){return t.display_name!==n.display_name?t.display_name.toLowerCase().localeCompare(n.display_name.toLowerCase(),e||r.General.DEFAULT_LOCALE,{numeric:!0}):t.name.toLowerCase().localeCompare(n.name.toLowerCase(),e||r.General.DEFAULT_LOCALE,{numeric:!0})}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=n(14),o=n(7),a=n(39);t.getCurrentChannelId=a.getCurrentChannelId,t.getMyChannelMemberships=a.getMyChannelMemberships,t.getMyCurrentChannelMembership=a.getMyCurrentChannelMembership;var s=n(9),u=n(51),l=n(192),c=n(40),d=n(66),f=n(41),h=n(65),p=n(15),_=n(41);function E(e){return e.entities.channels.channels}function m(e){return e.entities.channels.stats}function g(e){return e.entities.channels.channelsInTeam}function v(e){return e.entities.channels.membersInChannel}function y(e,t,n,r,i){return"recent"===n?h.sortChannelsByRecency(t,r,i):h.sortChannelsByDisplayName(e,r,i)}function T(e,t,n,r,i){var o=n;return r&&(o=o.filter((function(t){return!e.includes(t)}))),i&&(o=o.filter((function(e){return!t.includes(e)}))),o}function C(e,t){return t&&t.name===o.General.DEFAULT_CHANNEL&&!f.isCurrentUserSystemAdmin(e)&&"true"===s.getConfig(e).ExperimentalTownSquareIsReadOnly}t.getAllChannels=E,t.getAllChannelStats=m,t.getChannelsInTeam=g,t.getDirectChannelsSet=i.createSelector(g,(function(e){return e&&new Set(e[""])||new Set})),t.getChannelMembersInChannels=v,t.mapAndSortChannelIds=function(e,t,n,r,i,a){void 0===a&&(a=!1);var s=t.locale||o.General.DEFAULT_LOCALE,u=e.filter((function(e){return h.isChannelMuted(n[e.id])})).sort(y.bind(null,s,r,i)).map((function(e){return e.id})),l=[];a&&(l=e.filter((function(e){var t=n[e.id];return t&&t.mention_count>0&&!h.isChannelMuted(t)})).sort(y.bind(null,s,r,i)).map((function(e){return e.id})));var c=e.filter((function(e){return!u.includes(e.id)&&!l.includes(e.id)})).sort(y.bind(null,s,r,i)).map((function(e){return e.id}));return a?l.concat(u,c):c.concat(u)},t.filterChannels=T,t.makeGetChannel=function(){return i.createSelector(E,(function(e,t){return t.id}),(function(e){return e.entities.users}),u.getTeammateNameDisplaySetting,(function(e,t,n,r){var i=e[t];return i?h.completeDirectChannelInfo(n,r,i):i}))},t.getChannel=i.createSelector(E,(function(e,t){return t}),(function(e){return e.entities.users}),u.getTeammateNameDisplaySetting,(function(e,t,n,r){var i=e[t];return i?h.completeDirectChannelInfo(n,r,i):i})),t.getCurrentChannel=i.createSelector(E,a.getCurrentChannelId,(function(e){return e.entities.users}),u.getTeammateNameDisplaySetting,(function(e,t,n,r){var i=e[t];return i?h.completeDirectChannelInfo(n,r,i):i})),t.getMyChannelMember=i.createSelector(a.getMyChannelMemberships,(function(e,t){return t}),(function(e,t){return e[t]||null})),t.getCurrentChannelStats=i.createSelector(m,a.getCurrentChannelId,(function(e,t){return e[t]})),t.isCurrentChannelFavorite=i.createSelector(u.getMyPreferences,a.getCurrentChannelId,(function(e,t){return h.isFavoriteChannel(e,t)})),t.isCurrentChannelMuted=i.createSelector(a.getMyCurrentChannelMembership,(function(e){return!!e&&h.isChannelMuted(e)})),t.isCurrentChannelArchived=i.createSelector(t.getCurrentChannel,(function(e){return 0!==e.delete_at})),t.isCurrentChannelDefault=i.createSelector(t.getCurrentChannel,(function(e){return h.isDefault(e)})),t.isCurrentChannelReadOnly=function(e){return C(e,t.getCurrentChannel(e))},t.isChannelReadOnlyById=function(e,n){return C(e,t.getChannel(e,n))},t.isChannelReadOnly=C,t.shouldHideDefaultChannel=function(e,t){return t&&t.name===o.General.DEFAULT_CHANNEL&&!f.isCurrentUserSystemAdmin(e)&&"true"===s.getConfig(e).ExperimentalHideTownSquareinLHS},t.countCurrentChannelUnreadMessages=i.createSelector(t.getCurrentChannel,a.getMyCurrentChannelMembership,(function(e,t){return t?e.total_msg_count-t.msg_count:0})),t.getChannelByName=function(e,t){return h.getChannelByName(E(e),t)},t.getChannelSetInCurrentTeam=i.createSelector(c.getCurrentTeamId,g,(function(e,t){return t&&t[e]||[]})),t.getChannelsInCurrentTeam=i.createSelector(E,t.getChannelSetInCurrentTeam,a.getCurrentUser,(function(e,t,n){var r=o.General.DEFAULT_LOCALE;return n&&n.locale&&(r=n.locale),function(e,t,n){var r=[];return void 0===t?r:(t.forEach((function(t){r.push(e[t])})),r.sort(h.sortChannelsByDisplayName.bind(null,n)))}(e,t,r)})),t.getChannelsNameMapInTeam=i.createSelector(E,g,(function(e,t){return t}),(function(e,t,n){var r=t[n]||[],i={};return r.forEach((function(t){var n=e[t];i[n.name]=n})),i})),t.getChannelsNameMapInCurrentTeam=i.createSelector(E,t.getChannelSetInCurrentTeam,(function(e,t){var n={};return t.forEach((function(t){var r=e[t];n[r.name]=r})),n})),t.getAllDirectChannels=i.createSelector(E,t.getDirectChannelsSet,(function(e){return e.entities.users}),u.getTeammateNameDisplaySetting,(function(e,t,n,r){var i=[];return t.forEach((function(t){i.push(h.completeDirectChannelInfo(n,r,e[t]))})),i})),t.getGroupChannels=i.createSelector(E,t.getDirectChannelsSet,(function(e){return e.entities.users}),u.getTeammateNameDisplaySetting,(function(e,t,n,r){var i=[];return t.forEach((function(t){var a=e[t];a.type===o.General.GM_CHANNEL&&i.push(h.completeDirectChannelInfo(n,r,a))})),i})),t.getMyChannels=i.createSelector(t.getChannelsInCurrentTeam,t.getAllDirectChannels,a.getMyChannelMemberships,(function(e,t,n){return r.__spread(e,t).filter((function(e){return n.hasOwnProperty(e.id)}))})),t.getOtherChannels=i.createSelector(t.getChannelsInCurrentTeam,a.getMyChannelMemberships,(function(e,t){return void 0===t&&(t=!0),t}),(function(e,t,n){return e.filter((function(e){return!(t.hasOwnProperty(e.id)||e.type!==o.General.OPEN_CHANNEL||!n&&0!==e.delete_at)}))})),t.getArchivedChannels=i.createSelector(t.getChannelsInCurrentTeam,a.getMyChannelMemberships,(function(e,t){return e.filter((function(e){return t.hasOwnProperty(e.id)&&0!==e.delete_at}))})),t.getChannelsWithUnreadSection=i.createSelector(a.getCurrentChannelId,t.getMyChannels,a.getMyChannelMemberships,s.getConfig,u.getMyPreferences,u.getTeammateNameDisplaySetting,(function(e){return e.entities.users}),l.getLastPostPerChannel,(function(e,t,n,i,o,a,s,u){var l=t.map((function(t){var n=r.__assign({},t);return n.isCurrent=t.id===e,n}));return h.buildDisplayableChannelListWithUnreadSection(s,l,n,i,o,a,u)})),t.getDefaultChannel=i.createSelector(E,c.getCurrentTeamId,(function(e,t){return Object.keys(e).map((function(t){return e[t]})).find((function(e){return e&&e.team_id===t&&e.name===o.General.DEFAULT_CHANNEL}))})),t.getMembersInCurrentChannel=i.createSelector(a.getCurrentChannelId,v,(function(e,t){return t[e]})),t.getUnreads=i.createSelector(E,a.getMyChannelMemberships,a.getUsers,f.getCurrentUserId,c.getCurrentTeamId,c.getMyTeams,c.getTeamMemberships,(function(e,t,n,r,i,a,s){var u=0,l=0;Object.keys(t).forEach((function(a){var s=e[a],c=t[a];if(s&&c&&(s.team_id===i||s.type===o.General.DM_CHANNEL||s.type===o.General.GM_CHANNEL)){var d="";s.type===o.General.DM_CHANNEL?(d=h.getUserIdFromChannelName(r,s.name),n[d]&&0===n[d].delete_at&&(l+=c.mention_count)):c.mention_count>0&&0===s.delete_at&&(l+=c.mention_count),c.notify_props&&"mention"!==c.notify_props.mark_unread&&s.total_msg_count-c.msg_count>0&&(s.type===o.General.DM_CHANNEL?n[d]&&0===n[d].delete_at&&(u+=1):0===s.delete_at&&(u+=1))}}));var c=a.reduce((function(e,t){if(i!==t.id){var n=s[t.id];e.messageCount+=n.msg_count,e.mentionCount+=n.mention_count}return e}),{messageCount:0,mentionCount:0});return{messageCount:u+c.messageCount,mentionCount:l+c.mentionCount}})),t.getUnreadsInCurrentTeam=i.createSelector(a.getCurrentChannelId,t.getMyChannels,a.getMyChannelMemberships,a.getUsers,f.getCurrentUserId,(function(e,t,n,r,i){var o=0,a=0;return t.forEach((function(t){var s=n[t.id];if(s&&t.id!==e){var u="";"D"===t.type?(u=h.getUserIdFromChannelName(i,t.name),r[u]&&0===r[u].delete_at&&(a+=t.total_msg_count-s.msg_count)):s.mention_count>0&&0===t.delete_at&&(a+=s.mention_count),s.notify_props&&"mention"!==s.notify_props.mark_unread&&t.total_msg_count-s.msg_count>0&&("D"===t.type?r[u]&&0===r[u].delete_at&&(o+=1):0===t.delete_at&&(o+=1))}})),{messageCount:o,mentionCount:a}})),t.canManageChannelMembers=i.createSelector(t.getCurrentChannel,a.getCurrentUser,c.getCurrentTeamMembership,a.getMyCurrentChannelMembership,s.getConfig,s.getLicense,s.hasNewPermissions,(function(e){return d.haveICurrentChannelPermission(e,{permission:o.Permissions.MANAGE_PRIVATE_CHANNEL_MEMBERS})}),(function(e){return d.haveICurrentChannelPermission(e,{permission:o.Permissions.MANAGE_PUBLIC_CHANNEL_MEMBERS})}),(function(e,t,n,r,i,a,s,u,l){return!!e&&(0===e.delete_at&&(e.type!==o.General.DM_CHANNEL&&e.type!==o.General.GM_CHANNEL&&e.name!==o.General.DEFAULT_CHANNEL&&(s?e.type===o.General.OPEN_CHANNEL?l:e.type!==o.General.PRIVATE_CHANNEL||u:!!r&&h.canManageMembersOldPermissions(e,t,n,r,i,a))))})),t.canManageAnyChannelMembersInCurrentTeam=i.createSelector(a.getMyChannelMemberships,c.getCurrentTeamId,(function(e){return e}),(function(e,n,i){var a,s;try{for(var u=r.__values(Object.keys(e)),l=u.next();!l.done;l=u.next()){var c=l.value,f=t.getChannel(i,c);if(f&&f.team_id===n){if(f.type===o.General.OPEN_CHANNEL&&d.haveIChannelPermission(i,{permission:o.Permissions.MANAGE_PUBLIC_CHANNEL_MEMBERS,channel:c,team:n}))return!0;if(f.type===o.General.PRIVATE_CHANNEL&&d.haveIChannelPermission(i,{permission:o.Permissions.MANAGE_PRIVATE_CHANNEL_MEMBERS,channel:c,team:n}))return!0}}}catch(e){a={error:e}}finally{try{l&&!l.done&&(s=u.return)&&s.call(u)}finally{if(a)throw a.error}}return!1})),t.getAllDirectChannelIds=p.createIdsSelector(t.getDirectChannelsSet,(function(e){return Array.from(e)})),t.getChannelIdsInCurrentTeam=p.createIdsSelector(c.getCurrentTeamId,g,(function(e,t){return Array.from(t[e]||[])})),t.getChannelIdsForCurrentTeam=p.createIdsSelector(t.getChannelIdsInCurrentTeam,t.getAllDirectChannelIds,(function(e,t){return r.__spread(e,t)})),t.getUnreadChannelIds=p.createIdsSelector(E,a.getMyChannelMemberships,t.getChannelIdsForCurrentTeam,(function(e,t){return void 0===t&&(t=null),t}),(function(e,t,n,r){var i=n.filter((function(n){var r=e[n],i=t[n];if(r&&i){var o=r.total_msg_count-i.msg_count>0,a=i.mention_count>0;if(i.notify_props&&"mention"!==i.notify_props.mark_unread&&o||a)return!0}return!1}));return r&&!i.includes(r.id)&&i.push(r.id),i})),t.getUnreadChannels=p.createIdsSelector(a.getCurrentUser,a.getUsers,_.getUserIdsInChannels,E,t.getUnreadChannelIds,u.getTeammateNameDisplaySetting,(function(e,t,n,r,i,a){return e?i.filter((function(e){return r[e]&&0===r[e].delete_at})).map((function(i){var s=r[i];return s.type===o.General.DM_CHANNEL||s.type===o.General.GM_CHANNEL?h.completeDirectChannelDisplayName(e.id,t,n[i],a,s):s})):[]})),t.getMapAndSortedUnreadChannelIds=p.createIdsSelector(t.getUnreadChannels,a.getCurrentUser,a.getMyChannelMemberships,l.getLastPostPerChannel,(function(e,t,n){return void 0===n&&(n="alpha"),n}),(function(e,n,r,i,o){return t.mapAndSortChannelIds(e,n,r,i,o,!0)})),t.getSortedUnreadChannelIds=p.createIdsSelector(t.getUnreadChannelIds,(function(e,n,r,i,o){return void 0===o&&(o="alpha"),t.getMapAndSortedUnreadChannelIds(e,n,o)}),(function(e,t){return t})),t.getFavoriteChannels=p.createIdsSelector(a.getCurrentUser,a.getUsers,_.getUserIdsInChannels,E,a.getMyChannelMemberships,u.getFavoritesPreferences,t.getChannelIdsForCurrentTeam,u.getTeammateNameDisplaySetting,s.getConfig,u.getMyPreferences,a.getCurrentChannelId,(function(e,t,n,r,i,a,s,u,l,c,d){return e?a.filter((function(n){if(!i[n]||!r[n])return!1;var a=r[n],u=h.getUserIdFromChannelName(e.id,a.name);return(0===a.delete_at||a.id===d)&&(!(a.type===o.General.DM_CHANNEL&&!t[u])&&(!(a.type===o.General.DM_CHANNEL&&!h.isDirectChannelVisible(t[u]||u,l,c,a,null,!1,d))&&(!(a.type===o.General.GM_CHANNEL&&!h.isGroupChannelVisible(l,c,a))&&s.includes(n))))})).map((function(i){var a=r[i];return a.type===o.General.DM_CHANNEL||a.type===o.General.GM_CHANNEL?h.completeDirectChannelDisplayName(e.id,t,n[i],u,a):a})):[]})),t.getFavoriteChannelIds=p.createIdsSelector(t.getFavoriteChannels,a.getCurrentUser,a.getMyChannelMemberships,l.getLastPostPerChannel,(function(e,t,n,r,i){return void 0===i&&(i="alpha"),i}),t.mapAndSortChannelIds),t.getSortedFavoriteChannelIds=p.createIdsSelector(t.getUnreadChannelIds,u.getFavoritesPreferences,(function(e,n,r,i,o){return t.getFavoriteChannelIds(e,n,r,i,o)}),(function(e,t,n){return void 0===n&&(n=!0),n}),(function(e,t,n,r){return T(e,t,n,r,!1)})),t.getPublicChannels=i.createSelector(a.getCurrentUser,E,a.getMyChannelMemberships,t.getChannelIdsForCurrentTeam,(function(e,t,n,r){return e?r.filter((function(e){if(!n[e])return!1;var i=t[e];return r.includes(e)&&i.type===o.General.OPEN_CHANNEL})).map((function(e){return t[e]})):[]})),t.getPublicChannelIds=p.createIdsSelector(t.getPublicChannels,a.getCurrentUser,a.getMyChannelMemberships,l.getLastPostPerChannel,(function(e,t,n,r,i){return void 0===i&&(i="alpha"),i}),t.mapAndSortChannelIds),t.getSortedPublicChannelIds=p.createIdsSelector(t.getUnreadChannelIds,u.getFavoritesPreferences,(function(e,n,r,i,o){return void 0===o&&(o="alpha"),t.getPublicChannelIds(e,n,r,i,o)}),(function(e,t,n){return void 0===n&&(n=!0),n}),(function(e,t,n,r){return void 0===r&&(r=!0),r}),T),t.getPrivateChannels=i.createSelector(a.getCurrentUser,E,a.getMyChannelMemberships,t.getChannelIdsForCurrentTeam,(function(e,t,n,r){return e?r.filter((function(e){if(!n[e])return!1;var i=t[e];return r.includes(e)&&i.type===o.General.PRIVATE_CHANNEL})).map((function(e){return t[e]})):[]})),t.getPrivateChannelIds=p.createIdsSelector(t.getPrivateChannels,a.getCurrentUser,a.getMyChannelMemberships,l.getLastPostPerChannel,(function(e,t,n,r,i){return void 0===i&&(i="alpha"),i}),t.mapAndSortChannelIds),t.getSortedPrivateChannelIds=p.createIdsSelector(t.getUnreadChannelIds,u.getFavoritesPreferences,(function(e,n,r,i,o){return void 0===o&&(o="alpha"),t.getPrivateChannelIds(e,n,r,i,o)}),(function(e,t,n){return void 0===n&&(n=!0),n}),(function(e,t,n,r){return void 0===r&&(r=!0),r}),T),t.getDirectChannels=i.createSelector(a.getCurrentUser,a.getUsers,_.getUserIdsInChannels,E,u.getVisibleTeammate,u.getVisibleGroupIds,u.getTeammateNameDisplaySetting,s.getConfig,u.getMyPreferences,l.getLastPostPerChannel,a.getCurrentChannelId,(function(e,t,n,r,i,a,s,u,l,c,d){if(!e)return[];var f=Object.keys(r).map((function(e){return r[e]})),p=[];return i.reduce((function(n,r){var i=h.getDirectChannelName(e.id,r),o=f.find((function(e){return e&&e.name===i}));if(o){var a=c[o.id],s=t[h.getUserIdFromChannelName(e.id,o.name)];h.isAutoClosed(u,l,o,a?a.create_at:0,s?s.delete_at:0,d)||n.push(o.id)}return n}),p),a.filter((function(e){var t=r[e];if(t&&(t.type===o.General.DM_CHANNEL||t.type===o.General.GM_CHANNEL)){var n=c[t.id];return!h.isAutoClosed(u,l,r[e],n?n.create_at:0,0,d)}return!1})).concat(p).map((function(i){var o=r[i];return h.completeDirectChannelDisplayName(e.id,t,n[i],s,o)}))})),t.getDirectAndGroupChannels=i.createSelector(a.getCurrentUser,a.getUsers,_.getUserIdsInChannels,E,u.getTeammateNameDisplaySetting,(function(e,t,n,r,i){return e?Object.keys(r).map((function(e){return r[e]})).filter((function(e){return Boolean(e)})).filter((function(e){return e.type===o.General.DM_CHANNEL||e.type===o.General.GM_CHANNEL})).map((function(r){return h.completeDirectChannelDisplayName(e.id,t,n[r.id],i,r)})):[]})),t.getDirectChannelIds=p.createIdsSelector(t.getDirectChannels,a.getCurrentUser,a.getMyChannelMemberships,l.getLastPostPerChannel,(function(e,t,n,r,i){return void 0===i&&(i="alpha"),i}),t.mapAndSortChannelIds),t.getSortedDirectChannelIds=p.createIdsSelector(t.getUnreadChannelIds,u.getFavoritesPreferences,(function(e,n,r,i,o){return void 0===o&&(o="alpha"),t.getDirectChannelIds(e,n,r,i,o)}),(function(e,t,n){return void 0===n&&(n=!0),n}),(function(e,t,n,r){return void 0===r&&(r=!0),r}),T),t.getGroupOrDirectChannelVisibility=function(e,n){return h.isGroupOrDirectChannelVisible(t.getChannel(e,n),a.getMyChannelMemberships(e),s.getConfig(e),u.getMyPreferences(e),a.getCurrentUser(e).id,a.getUsers(e),l.getLastPostPerChannel(e))},t.filterPostIds=function(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return i.createSelector(E,l.getAllPosts,(function(e,t){return t}),(function(t,n,r){return r.filter((function(r){var i,o=n[r];return o&&(i=t[o.channel_id]),o&&i&&e(i,o)}))}))};t.getChannelsWithUserProfiles=i.createSelector(_.getUserIdsInChannels,a.getUsers,t.getGroupChannels,f.getCurrentUserId,(function(e,t,n,i){return n.map((function(n){var o=function(e,t,n){var r=[];return t.forEach((function(t){t!==e&&r.push(n[t])})),r}(i,e[n.id]||[],t);return r.__assign(r.__assign({},n),{profiles:o})}))}));var S,b=i.createSelector(t.getPublicChannels,t.getPrivateChannels,t.getDirectChannels,(function(e,t,n){return r.__spread(e,t,n)}));t.getAllChannelIds=p.createIdsSelector(b,a.getCurrentUser,a.getMyChannelMemberships,l.getLastPostPerChannel,(function(e,t,n,r,i){return void 0===i&&(i="alpha"),i}),t.mapAndSortChannelIds),t.getAllSortedChannelIds=p.createIdsSelector(t.getUnreadChannelIds,u.getFavoritesPreferences,(function(e,n,r,i,o){return void 0===o&&(o="alpha"),t.getAllChannelIds(e,n,r,i,o)}),(function(e,t,n){return void 0===n&&(n=!0),n}),(function(e,t,n,r){return void 0===r&&(r=!0),r}),T);t.getOrderedChannelIds=function(e,n,r,i,o,a){var s=[];if("by_type"===r)s.push({type:"public",name:"PUBLIC CHANNELS",items:t.getSortedPublicChannelIds(e,n,o,a,i)}),s.push({type:"private",name:"PRIVATE CHANNELS",items:t.getSortedPrivateChannelIds(e,n,o,a,i)}),s.push({type:"direct",name:"DIRECT MESSAGES",items:t.getSortedDirectChannelIds(e,n,o,a,i)});else{var u="alpha",l="CHANNELS";"recent"===i&&(u="recent",l="RECENT ACTIVITY"),s.push({type:u,name:l,items:t.getAllSortedChannelIds(e,n,o,a,i)})}return a&&s.unshift({type:"favorite",name:"FAVORITE CHANNELS",items:t.getSortedFavoriteChannelIds(e,n,o,a,i)}),o&&s.unshift({type:"unreads",name:"UNREADS",items:t.getSortedUnreadChannelIds(e,n,o,a,i)}),function(e){if(!S||S.length!==e.length)return!0;for(var t=0;t<e.length;t++)if(e[t].type!==S[t].type||e[t].items!==S[t].items)return!0;return!1}(s)&&(S=s),S},t.getSortedPublicChannelWithUnreadsIds=p.createIdsSelector(t.getUnreadChannelIds,u.getFavoritesPreferences,t.getPublicChannelIds,(function(e,t,n,r){return void 0===r&&(r=!0),r}),(function(e,t,n,r){return T(e,t,n,!1,r)})),t.getSortedPrivateChannelWithUnreadsIds=p.createIdsSelector(t.getUnreadChannelIds,u.getFavoritesPreferences,t.getPrivateChannelIds,(function(e,t,n,r){return void 0===r&&(r=!0),r}),(function(e,t,n,r){return T(e,t,n,!1,r)})),t.getSortedFavoriteChannelWithUnreadsIds=p.createIdsSelector(t.getUnreadChannelIds,t.getFavoriteChannelIds,(function(e,t){return t})),t.getSortedDirectChannelWithUnreadsIds=p.createIdsSelector(t.getUnreadChannelIds,u.getFavoritesPreferences,t.getDirectChannelIds,(function(e,t,n,r){return void 0===r&&(r=!0),r}),(function(e,t,n,r){return T(e,t,n,!1,r)})),t.getDefaultChannelForTeams=i.createSelector(E,(function(e){var t,n,i={};try{for(var a=r.__values(Object.keys(e).map((function(t){return e[t]}))),s=a.next();!s.done;s=a.next()){var u=s.value;u&&u.name===o.General.DEFAULT_CHANNEL&&(i[u.team_id]=u)}}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}return i})),t.getMyFirstChannelForTeams=i.createSelector(E,a.getMyChannelMemberships,c.getMyTeams,a.getCurrentUser,(function(e,t,n,i){var a,s,u=i.locale||o.General.DEFAULT_LOCALE,l={},c=function(n){var r=Object.values(e).filter((function(e){return e&&e.team_id===n.id&&Boolean(t[e.id])})).sort(h.sortChannelsByDisplayName.bind(null,u));if(0===r.length)return"continue";l[n.id]=r[0]};try{for(var d=r.__values(n),f=d.next();!f.done;f=d.next()){c(f.value)}}catch(e){a={error:e}}finally{try{f&&!f.done&&(s=d.return)&&s.call(d)}finally{if(a)throw a.error}}return l})),t.getRedirectChannelNameForTeam=function(e,n){var r=t.getDefaultChannelForTeams(e)[n],i=t.getMyFirstChannelForTeams(e)[n],u=!s.hasNewPermissions(e)||d.haveITeamPermission(e,{team:n,permission:o.Permissions.JOIN_PUBLIC_CHANNELS}),l=a.getMyChannelMemberships(e);return Boolean(r&&l[r.id])||u?o.General.DEFAULT_CHANNEL:i&&i.name||o.General.DEFAULT_CHANNEL},t.isManuallyUnread=function(e,t){return!!t&&Boolean(e.entities.channels.manuallyUnread[t])},t.getChannelModerations=function(e,t){return e.entities.channels.channelModerations[t]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(2),o=n(14),a=n(39),s=n(51),u=n(15),l=n(7),c=n(193),d=n(42);function f(e){return e.entities.posts.posts}function h(e,t){return f(e)[t]}function p(e){return e.entities.posts.postsInThread}function _(e){return e.entities.posts.reactions}function E(){return u.createIdsSelector((function(e,t,n){return e.entities.posts.postsInChannel[n]}),(function(e,t){return t}),(function(e,t){var n,r,o;if(!e)return null;try{for(var a=i.__values(e),s=a.next();!s.done;s=a.next()){var u=s.value;-1!==u.order.indexOf(t)&&(o=u)}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return o}))}function m(){var e=E();return u.createIdsSelector((function(t,n,r){return e(t,n,r)}),(function(e,t){return t}),(function(e,t,n,r){return r&&r.postsBeforeCount}),(function(e,t,n,r){return r&&r.postsAfterCount}),(function(e,t,n,r){if(void 0===n&&(n=l.Posts.POST_CHUNK_SIZE/2),void 0===r&&(r=l.Posts.POST_CHUNK_SIZE/2),!e||!e.order)return null;var i=e.order,o=i.indexOf(t),a=-1===r?0:Math.max(o-r,0),s=-1===n?i.length:Math.min(o+n+1,i.length);return i.slice(a,s)}))}function g(e,t,n,r,o,a,s,u){var d,f,h,p=!1,_=!1,E=!1;e.id===u&&(E=!0),e.root_id&&(t&&t.root_id!==e.root_id&&(p=!0,t&&t.id!==e.root_id&&(h=r[e.root_id])),(n-1<0||r[a[n-1]].root_id!==e.root_id)&&(_=!0));var m=!1;t&&t.root_id&&(m=!0);var g=Boolean(e.props&&e.props.from_webhook),v=Boolean(t&&t.props&&t.props.from_webhook),y=!1;!(t&&t.user_id===e.user_id&&e.create_at-t.create_at<=l.Posts.POST_COLLAPSE_TIMEOUT)||g||v||c.isSystemMessage(e)||c.isSystemMessage(t)||(y=!0);var T=!1,C=0,S=!1;if(s){var b=e.root_id||e.id,R=o[b]||[];try{for(var I=i.__values(R),A=I.next();!A.done;A=I.next()){var N=r[A.value];N&&(N.user_id===s.id&&(T=!0),c.isPostEphemeral(N)||(C+=1))}}catch(e){d={error:e}}finally{try{A&&!A.done&&(f=I.return)&&f.call(I)}finally{if(d)throw d.error}}var O=r[b];S=c.isPostCommentMention({post:e,currentUser:s,threadRepliedToByCurrentUser:T,rootPost:O})}return i.__assign(i.__assign({},e),{isFirstReply:p,isLastReply:_,previousPostIsComment:m,commentedOnPost:h,consecutivePostByUser:y,replyCount:C,isCommentMention:S,highlight:E})}function v(){return o.createSelector(f,p,(function(e,t){return C(e,t)}),a.getCurrentUser,s.getMyPreferences,(function(e,t,n){return n||l.Posts.POST_CHUNK_SIZE}),(function(e,t,n,r,i,o){if(!n)return null;for(var a=[],s=i[d.getPreferenceKey(l.Preferences.CATEGORY_ADVANCED_SETTINGS,l.Preferences.ADVANCED_FILTER_JOIN_LEAVE)],u=!s||"false"!==s.value,f=-1===o?n:n.slice(0,o),h=0;h<f.length;h++){var p=e[f[h]];if(!c.shouldFilterJoinLeavePost(p,u,r?r.username:"")){var _=e[f[h+1]]||null;a.push(g(p,_,h,e,t,f,r,""))}}return a}))}function y(e,t){var n=e.entities.posts.postsInChannel[t];return n?n.find((function(e){return e.recent})):null}function T(e,t){var n=e.entities.posts.postsInChannel[t];return n?n.find((function(e){return e.oldest})):null}function C(e,t){var n=y(e,t);return n?n.order:null}function S(e,t,n){var r=e.entities.posts,i=r.postsInChannel[t],o=r.posts;return i?i.find((function(e){var t=e.order,r=o[t[0]],i=o[t[t.length-1]];return!(!r||!i)&&(r.create_at>=n&&i.create_at<=n)})):null}t.getAllPosts=f,t.getPost=h,t.getPostsInThread=p,t.getReactionsForPosts=_,t.makeGetReactionsForPost=function(){return o.createSelector(_,(function(e,t){return t}),(function(e,t){return e[t]?e[t]:null}))},t.getOpenGraphMetadata=function(e){return e.entities.posts.openGraph},t.getOpenGraphMetadataForUrl=function(e,t,n){var r=e.entities.posts.openGraph[t];return r?r[n]:void 0},t.getPostIdsInCurrentChannel=function(e){return C(e,e.entities.channels.currentChannelId)},t.getPostsInCurrentChannel=(r=v(),function(e){return r(e,e.entities.channels.currentChannelId,-1)}),t.makeGetPostIdsForThread=function(){return u.createIdsSelector(f,(function(e,t){return e.entities.posts.postsInThread[t]||[]}),(function(e,t){return e.entities.posts.posts[t]}),(function(e,t,n){var r=[];return n&&r.push(n),t.forEach((function(t){var n=e[t];n&&r.push(n)})),r.sort(c.comparePosts),r.map((function(e){return e.id}))}))},t.makeGetPostsChunkAroundPost=E,t.makeGetPostIdsAroundPost=m,t.makeGetPostsInChannel=v,t.makeGetPostsAroundPost=function(){var e=m(),t={postsBeforeCount:-1,postsAfterCount:l.Posts.POST_CHUNK_SIZE/2};return o.createSelector((function(n,r,i){return e(n,r,i,t)}),f,p,(function(e,t){return t}),a.getCurrentUser,s.getMyPreferences,(function(e,t,n,r,i,o){if(!e||!i)return null;for(var a=[],s=o[d.getPreferenceKey(l.Preferences.CATEGORY_ADVANCED_SETTINGS,l.Preferences.ADVANCED_FILTER_JOIN_LEAVE)],u=!s||"false"!==s.value,f=0;f<e.length;f++){var h=t[e[f]];if(!c.shouldFilterJoinLeavePost(h,u,i.username)){var p=g(h,t[e[f+1]]||null,f,t,n,e,i,r);a.push(p)}}return a}))},t.makeGetPostsForThread=function(){return o.createSelector(f,(function(e,t){var n=t.rootId;return e.entities.posts.postsInThread[n]||[]}),(function(e,t){var n=t.rootId;return e.entities.posts.posts[n]}),(function(e,t,n){var r=[];return n&&r.push(n),t.forEach((function(t){var n=e[t];n&&r.push(n)})),r.sort(c.comparePosts),r}))},t.makeGetCommentCountForPost=function(){return o.createSelector(f,(function(e,t){var n=t.post;return e.entities.posts.postsInThread[n?n.id:""]||[]}),(function(e,t){return t}),(function(e,t,n){if(!n.post)return 0;var r=0;return t.forEach((function(t){var n=e[t];n&&n.state!==l.Posts.POST_DELETED&&!c.isPostEphemeral(n)&&(r+=1)})),r}))},t.getSearchResults=o.createSelector(f,(function(e){return e.entities.search.results}),(function(e,t){return t?t.map((function(t){return e[t]})):[]})),t.getSearchMatches=function(e){return e.entities.search.matches},t.makeGetMessageInHistoryItem=function(e){return o.createSelector((function(e){return e.entities.posts.messagesHistory}),(function(t){var n=t.index[e],r=t.messages;return n>=0&&r&&r.length>n?r[n]:""}))},t.makeGetPostsForIds=function(){return u.createIdsSelector(f,(function(e,t){return t}),(function(e,t){return t?t.map((function(t){return e[t]})):[]}))},t.getLastPostPerChannel=o.createSelector(f,(function(e){return e.entities.posts.postsInChannel}),(function(e,t){var n,r,o={};try{for(var a=i.__values(Object.entries(t)),s=a.next();!s.done;s=a.next()){var u=i.__read(s.value,2),l=u[0],c=u[1].find((function(e){return e.recent}));if(c){var d=c.order[0];e.hasOwnProperty(d)&&(o[l]=e[d])}}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return o})),t.getMostRecentPostIdInChannel=o.createSelector(f,(function(e,t){return C(e,t)}),s.getMyPreferences,(function(e,t,n){if(!t)return"";var r=d.getPreferenceKey(l.Preferences.CATEGORY_ADVANCED_SETTINGS,l.Preferences.ADVANCED_FILTER_JOIN_LEAVE);if(!(!n[r]||"true"===n[r].value)){for(var i=void 0,o=0;o<t.length;o++){var a=e[t[o]];if(!a.type||!a.type.startsWith(l.Posts.SYSTEM_MESSAGE_PREFIX)){i=a.id;break}}return i}return t[0]})),t.getLatestReplyablePostId=o.createSelector(t.getPostsInCurrentChannel,(function(e){if(!e)return"";var t=e.find((function(e){return e.state!==l.Posts.POST_DELETED&&!c.isSystemMessage(e)&&!c.isPostEphemeral(e)}));return t?t.id:""})),t.getCurrentUsersLatestPost=o.createSelector(t.getPostsInCurrentChannel,a.getCurrentUser,(function(e,t){return t}),(function(e,t,n){return e?e.find((function(e){return!(e.user_id!==t.id||e.props&&e.props.from_webhook||e.state===l.Posts.POST_DELETED||c.isSystemMessage(e)||c.isPostEphemeral(e)||c.isPostPendingOrFailed(e))&&(!n||(e.root_id===n||e.id===n))})):null})),t.getRecentPostsChunkInChannel=y,t.getOldestPostsChunkInChannel=T,t.getPostIdsInChannel=C,t.getPostsChunkInChannelAroundTime=S,t.getUnreadPostsChunk=function(e,t,n){var r=e.entities.posts.posts,i=y(e,t);if(i){if(!i.order.length)return i;if(r[(o=i.order)[o.length-1]].create_at<=n)return i}var o,a=T(e,t);return a&&a.order.length&&r[(o=a.order)[o.length-1]].create_at>=n?a:S(e,t,n)},t.isPostIdSending=function(e,t){return e.entities.posts.pendingPostIds.some((function(e){return e===t}))},t.makeIsPostCommentMention=function(){return o.createSelector(f,p,a.getCurrentUser,h,(function(e,t,n,r){var o,a;if(!r)return!1;var s=!1,u=!1;if(n){var l=r.root_id||r.id,d=t[l]||[];try{for(var f=i.__values(d),h=f.next();!h.done;h=f.next()){var p=e[h.value];p&&(p.user_id===n.id&&(s=!0))}}catch(e){o={error:e}}finally{try{h&&!h.done&&(a=f.return)&&a.call(f)}finally{if(o)throw o.error}}var _=e[l];u=c.isPostCommentMention({post:r,currentUser:n,threadRepliedToByCurrentUser:s,rootPost:_})}return u}))},t.getExpandedLink=function(e,t){return e.entities.posts.expandedURLs[t]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=n(7),o=n(9),a=n(66),s=n(42);function u(e){return Boolean(e.type&&e.type.startsWith(i.Posts.SYSTEM_MESSAGE_PREFIX))}function l(e,t){return e===t.user_id}t.isPostFlagged=function(e,t){var n=s.getPreferenceKey(i.Preferences.CATEGORY_FLAGGED_POST,e);return t.hasOwnProperty(n)},t.isSystemMessage=u,t.isMeMessage=function(e){return Boolean(e.type&&e.type===i.Posts.POST_TYPES.ME)},t.isFromWebhook=function(e){return e.props&&e.props.from_webhook},t.isPostEphemeral=function(e){return e.type===i.Posts.POST_TYPES.EPHEMERAL||e.type===i.Posts.POST_TYPES.EPHEMERAL_ADD_TO_CHANNEL||e.state===i.Posts.POST_DELETED},t.shouldIgnorePost=function(e){return i.Posts.IGNORE_POST_TYPES.includes(e.type)},t.isUserActivityPost=function(e){return i.Posts.USER_ACTIVITY_POST_TYPES.includes(e)},t.isPostOwner=l,t.isEdited=function(e){return e.edit_at>0},t.canDeletePost=function(e,t,n,r,s,u,c,d,f){if(!c)return!1;var h=l(u,c);if(o.hasNewPermissions(e)){var p=a.haveIChannelPermission(e,{team:r,channel:s,permission:i.Permissions.DELETE_POST});return h?p:p&&a.haveIChannelPermission(e,{team:r,channel:s,permission:i.Permissions.DELETE_OTHERS_POSTS})}return"true"===n.IsLicensed?t.RestrictPostDelete===i.General.PERMISSIONS_ALL&&(h||d)||t.RestrictPostDelete===i.General.PERMISSIONS_TEAM_ADMIN&&d||t.RestrictPostDelete===i.General.PERMISSIONS_SYSTEM_ADMIN&&f:h||d},t.canEditPost=function(e,t,n,r,s,c,d){if(!d||u(d))return!1;var f=l(c,d),h=!0;return o.hasNewPermissions(e)?(h=h&&a.haveIChannelPermission(e,{team:r,channel:s,permission:i.Permissions.EDIT_POST}),f||(h=h&&a.haveIChannelPermission(e,{team:r,channel:s,permission:i.Permissions.EDIT_OTHERS_POSTS})),"true"===n.IsLicensed&&"-1"!==t.PostEditTimeLimit&&-1!==t.PostEditTimeLimit&&d.create_at+1e3*t.PostEditTimeLimit-Date.now()<=0&&(h=!1)):(h=f&&"never"!==t.AllowEditPost,t.AllowEditPost===i.General.ALLOW_EDIT_POST_TIME_LIMIT&&d.create_at+1e3*t.PostEditTimeLimit-Date.now()<=0&&(h=!1)),h},t.getLastCreateAt=function(e){var t=e.map((function(e){return e.create_at}));return t.length?Reflect.apply(Math.max,null,t):0};var c=[i.Posts.POST_TYPES.JOIN_LEAVE,i.Posts.POST_TYPES.JOIN_CHANNEL,i.Posts.POST_TYPES.LEAVE_CHANNEL,i.Posts.POST_TYPES.ADD_REMOVE,i.Posts.POST_TYPES.ADD_TO_CHANNEL,i.Posts.POST_TYPES.REMOVE_FROM_CHANNEL,i.Posts.POST_TYPES.JOIN_TEAM,i.Posts.POST_TYPES.LEAVE_TEAM,i.Posts.POST_TYPES.ADD_TO_TEAM,i.Posts.POST_TYPES.REMOVE_FROM_TEAM,i.Posts.POST_TYPES.COMBINED_USER_ACTIVITY];function d(e){return e.failed||e.id===e.pending_post_id}t.shouldFilterJoinLeavePost=function(e,t,n){return!t&&(-1!==c.indexOf(e.type)&&!function e(t,n){var i,o;if(!t.props||!n)return!1;if(t.user_activity_posts)try{for(var a=r.__values(t.user_activity_posts),s=a.next();!s.done;s=a.next()){var u=s.value;if(e(u,n))return!0}}catch(e){i={error:e}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}return t.props.username===n||t.props.addedUsername===n||t.props.removedUsername===n}(e,n))},t.isPostPendingOrFailed=d,t.comparePosts=function(e,t){var n=d(e),r=d(t);return n&&!r?-1:!n&&r?1:e.create_at>t.create_at?-1:e.create_at<t.create_at?1:0},t.isPostCommentMention=function(e){var t=e.post,n=e.currentUser,r=e.threadRepliedToByCurrentUser,o=e.rootPost,a=i.Preferences.COMMENTS_NEVER,s=!1,u=!1;return o&&o.user_id===n.id&&(u=!0),n.notify_props&&n.notify_props.comments&&(a=n.notify_props.comments),(t.user_id!==n.id||t.props&&t.props.from_webhook)&&(a===i.Preferences.COMMENTS_ANY&&(u||r)||a===i.Preferences.COMMENTS_ROOT&&u)&&(s=!0),s},t.fromAutoResponder=function(e){return Boolean(e.type&&e.type===i.Posts.SYSTEM_AUTO_RESPONDER)},t.getEmbedFromMetadata=function(e){return e&&e.embeds&&0!==e.embeds.length?e.embeds[0]:null}},function(e,t,n){"use strict";
  /** @license React v16.13.1
   * react-dom.production.min.js
   *
   * Copyright (c) Facebook, Inc. and its affiliates.
   *
   * This source code is licensed under the MIT license found in the
   * LICENSE file in the root directory of this source tree.
   */var r=n(0),i=n(195),o=n(196);function a(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}if(!r)throw Error(a(227));function s(e,t,n,r,i,o,a,s,u){var l=Array.prototype.slice.call(arguments,3);try{t.apply(n,l)}catch(e){this.onError(e)}}var u=!1,l=null,c=!1,d=null,f={onError:function(e){u=!0,l=e}};function h(e,t,n,r,i,o,a,c,d){u=!1,l=null,s.apply(f,arguments)}var p=null,_=null,E=null;function m(e,t,n){var r=e.type||"unknown-event";e.currentTarget=E(n),function(e,t,n,r,i,o,s,f,p){if(h.apply(this,arguments),u){if(!u)throw Error(a(198));var _=l;u=!1,l=null,c||(c=!0,d=_)}}(r,t,void 0,e),e.currentTarget=null}var g=null,v={};function y(){if(g)for(var e in v){var t=v[e],n=g.indexOf(e);if(!(-1<n))throw Error(a(96,e));if(!C[n]){if(!t.extractEvents)throw Error(a(97,e));for(var r in C[n]=t,n=t.eventTypes){var i=void 0,o=n[r],s=t,u=r;if(S.hasOwnProperty(u))throw Error(a(99,u));S[u]=o;var l=o.phasedRegistrationNames;if(l){for(i in l)l.hasOwnProperty(i)&&T(l[i],s,u);i=!0}else o.registrationName?(T(o.registrationName,s,u),i=!0):i=!1;if(!i)throw Error(a(98,r,e))}}}}function T(e,t,n){if(b[e])throw Error(a(100,e));b[e]=t,R[e]=t.eventTypes[n].dependencies}var C=[],S={},b={},R={};function I(e){var t,n=!1;for(t in e)if(e.hasOwnProperty(t)){var r=e[t];if(!v.hasOwnProperty(t)||v[t]!==r){if(v[t])throw Error(a(102,t));v[t]=r,n=!0}}n&&y()}var A=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),N=null,O=null,w=null;function L(e){if(e=_(e)){if("function"!=typeof N)throw Error(a(280));var t=e.stateNode;t&&(t=p(t),N(e.stateNode,e.type,t))}}function P(e){O?w?w.push(e):w=[e]:O=e}function M(){if(O){var e=O,t=w;if(w=O=null,L(e),t)for(e=0;e<t.length;e++)L(t[e])}}function U(e,t){return e(t)}function D(e,t,n,r,i){return e(t,n,r,i)}function k(){}var F=U,x=!1,H=!1;function G(){null===O&&null===w||(k(),M())}function V(e,t,n){if(H)return e(t,n);H=!0;try{return F(e,t,n)}finally{H=!1,G()}}var B=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,j=Object.prototype.hasOwnProperty,z={},Y={};function W(e,t,n,r,i,o){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o}var Q={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){Q[e]=new W(e,0,!1,e,null,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];Q[t]=new W(t,1,!1,e[1],null,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){Q[e]=new W(e,2,!1,e.toLowerCase(),null,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){Q[e]=new W(e,2,!1,e,null,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){Q[e]=new W(e,3,!1,e.toLowerCase(),null,!1)})),["checked","multiple","muted","selected"].forEach((function(e){Q[e]=new W(e,3,!0,e,null,!1)})),["capture","download"].forEach((function(e){Q[e]=new W(e,4,!1,e,null,!1)})),["cols","rows","size","span"].forEach((function(e){Q[e]=new W(e,6,!1,e,null,!1)})),["rowSpan","start"].forEach((function(e){Q[e]=new W(e,5,!1,e.toLowerCase(),null,!1)}));var J=/[\-:]([a-z])/g;function K(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(J,K);Q[t]=new W(t,1,!1,e,null,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(J,K);Q[t]=new W(t,1,!1,e,"http://www.w3.org/1999/xlink",!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(J,K);Q[t]=new W(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1)})),["tabIndex","crossOrigin"].forEach((function(e){Q[e]=new W(e,1,!1,e.toLowerCase(),null,!1)})),Q.xlinkHref=new W("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0),["src","href","action","formAction"].forEach((function(e){Q[e]=new W(e,1,!1,e.toLowerCase(),null,!0)}));var q=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function X(e,t,n,r){var i=Q.hasOwnProperty(t)?Q[t]:null;(null!==i?0===i.type:!r&&(2<t.length&&("o"===t[0]||"O"===t[0])&&("n"===t[1]||"N"===t[1])))||(function(e,t,n,r){if(null==t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,i,r)&&(n=null),r||null===i?function(e){return!!j.call(Y,e)||!j.call(z,e)&&(B.test(e)?Y[e]=!0:(z[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=null===n?3!==i.type&&"":n:(t=i.attributeName,r=i.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(i=i.type)||4===i&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}q.hasOwnProperty("ReactCurrentDispatcher")||(q.ReactCurrentDispatcher={current:null}),q.hasOwnProperty("ReactCurrentBatchConfig")||(q.ReactCurrentBatchConfig={suspense:null});var Z=/^(.*)[\\\/]/,$="function"==typeof Symbol&&Symbol.for,ee=$?Symbol.for("react.element"):60103,te=$?Symbol.for("react.portal"):60106,ne=$?Symbol.for("react.fragment"):60107,re=$?Symbol.for("react.strict_mode"):60108,ie=$?Symbol.for("react.profiler"):60114,oe=$?Symbol.for("react.provider"):60109,ae=$?Symbol.for("react.context"):60110,se=$?Symbol.for("react.concurrent_mode"):60111,ue=$?Symbol.for("react.forward_ref"):60112,le=$?Symbol.for("react.suspense"):60113,ce=$?Symbol.for("react.suspense_list"):60120,de=$?Symbol.for("react.memo"):60115,fe=$?Symbol.for("react.lazy"):60116,he=$?Symbol.for("react.block"):60121,pe="function"==typeof Symbol&&Symbol.iterator;function _e(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=pe&&e[pe]||e["@@iterator"])?e:null}function Ee(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case ne:return"Fragment";case te:return"Portal";case ie:return"Profiler";case re:return"StrictMode";case le:return"Suspense";case ce:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case ae:return"Context.Consumer";case oe:return"Context.Provider";case ue:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case de:return Ee(e.type);case he:return Ee(e.render);case fe:if(e=1===e._status?e._result:null)return Ee(e)}return null}function me(e){var t="";do{e:switch(e.tag){case 3:case 4:case 6:case 7:case 10:case 9:var n="";break e;default:var r=e._debugOwner,i=e._debugSource,o=Ee(e.type);n=null,r&&(n=Ee(r.type)),r=o,o="",i?o=" (at "+i.fileName.replace(Z,"")+":"+i.lineNumber+")":n&&(o=" (created by "+n+")"),n="\n    in "+(r||"Unknown")+o}t+=n,e=e.return}while(e);return t}function ge(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function ve(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function ye(e){e._valueTracker||(e._valueTracker=function(e){var t=ve(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=""+e,o.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function Te(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=ve(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function Ce(e,t){var n=t.checked;return i({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function Se(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=ge(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function be(e,t){null!=(t=t.checked)&&X(e,"checked",t,!1)}function Re(e,t){be(e,t);var n=ge(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?Ae(e,t.type,n):t.hasOwnProperty("defaultValue")&&Ae(e,t.type,ge(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function Ie(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function Ae(e,t,n){"number"===t&&e.ownerDocument.activeElement===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function Ne(e,t){return e=i({children:void 0},t),(t=function(e){var t="";return r.Children.forEach(e,(function(e){null!=e&&(t+=e)})),t}(t.children))&&(e.children=t),e}function Oe(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+ge(n),t=null,i=0;i<e.length;i++){if(e[i].value===n)return e[i].selected=!0,void(r&&(e[i].defaultSelected=!0));null!==t||e[i].disabled||(t=e[i])}null!==t&&(t.selected=!0)}}function we(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(a(91));return i({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Le(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(a(92));if(Array.isArray(n)){if(!(1>=n.length))throw Error(a(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:ge(n)}}function Pe(e,t){var n=ge(t.value),r=ge(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function Me(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}var Ue="http://www.w3.org/1999/xhtml",De="http://www.w3.org/2000/svg";function ke(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Fe(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?ke(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var xe,He=function(e){return"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction((function(){return e(t,n)}))}:e}((function(e,t){if(e.namespaceURI!==De||"innerHTML"in e)e.innerHTML=t;else{for((xe=xe||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=xe.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}}));function Ge(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}function Ve(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Be={animationend:Ve("Animation","AnimationEnd"),animationiteration:Ve("Animation","AnimationIteration"),animationstart:Ve("Animation","AnimationStart"),transitionend:Ve("Transition","TransitionEnd")},je={},ze={};function Ye(e){if(je[e])return je[e];if(!Be[e])return e;var t,n=Be[e];for(t in n)if(n.hasOwnProperty(t)&&t in ze)return je[e]=n[t];return e}A&&(ze=document.createElement("div").style,"AnimationEvent"in window||(delete Be.animationend.animation,delete Be.animationiteration.animation,delete Be.animationstart.animation),"TransitionEvent"in window||delete Be.transitionend.transition);var We=Ye("animationend"),Qe=Ye("animationiteration"),Je=Ye("animationstart"),Ke=Ye("transitionend"),qe="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Xe=new("function"==typeof WeakMap?WeakMap:Map);function Ze(e){var t=Xe.get(e);return void 0===t&&(t=new Map,Xe.set(e,t)),t}function $e(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!=(1026&(t=e).effectTag)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function et(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function tt(e){if($e(e)!==e)throw Error(a(188))}function nt(e){if(!(e=function(e){var t=e.alternate;if(!t){if(null===(t=$e(e)))throw Error(a(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(null===i)break;var o=i.alternate;if(null===o){if(null!==(r=i.return)){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return tt(i),e;if(o===r)return tt(i),t;o=o.sibling}throw Error(a(188))}if(n.return!==r.return)n=i,r=o;else{for(var s=!1,u=i.child;u;){if(u===n){s=!0,n=i,r=o;break}if(u===r){s=!0,r=i,n=o;break}u=u.sibling}if(!s){for(u=o.child;u;){if(u===n){s=!0,n=o,r=i;break}if(u===r){s=!0,r=o,n=i;break}u=u.sibling}if(!s)throw Error(a(189))}}if(n.alternate!==r)throw Error(a(190))}if(3!==n.tag)throw Error(a(188));return n.stateNode.current===n?e:t}(e)))return null;for(var t=e;;){if(5===t.tag||6===t.tag)return t;if(t.child)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null}function rt(e,t){if(null==t)throw Error(a(30));return null==e?t:Array.isArray(e)?Array.isArray(t)?(e.push.apply(e,t),e):(e.push(t),e):Array.isArray(t)?[e].concat(t):[e,t]}function it(e,t,n){Array.isArray(e)?e.forEach(t,n):e&&t.call(n,e)}var ot=null;function at(e){if(e){var t=e._dispatchListeners,n=e._dispatchInstances;if(Array.isArray(t))for(var r=0;r<t.length&&!e.isPropagationStopped();r++)m(e,t[r],n[r]);else t&&m(e,t,n);e._dispatchListeners=null,e._dispatchInstances=null,e.isPersistent()||e.constructor.release(e)}}function st(e){if(null!==e&&(ot=rt(ot,e)),e=ot,ot=null,e){if(it(e,at),ot)throw Error(a(95));if(c)throw e=d,c=!1,d=null,e}}function ut(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}function lt(e){if(!A)return!1;var t=(e="on"+e)in document;return t||((t=document.createElement("div")).setAttribute(e,"return;"),t="function"==typeof t[e]),t}var ct=[];function dt(e){e.topLevelType=null,e.nativeEvent=null,e.targetInst=null,e.ancestors.length=0,10>ct.length&&ct.push(e)}function ft(e,t,n,r){if(ct.length){var i=ct.pop();return i.topLevelType=e,i.eventSystemFlags=r,i.nativeEvent=t,i.targetInst=n,i}return{topLevelType:e,eventSystemFlags:r,nativeEvent:t,targetInst:n,ancestors:[]}}function ht(e){var t=e.targetInst,n=t;do{if(!n){e.ancestors.push(n);break}var r=n;if(3===r.tag)r=r.stateNode.containerInfo;else{for(;r.return;)r=r.return;r=3!==r.tag?null:r.stateNode.containerInfo}if(!r)break;5!==(t=n.tag)&&6!==t||e.ancestors.push(n),n=An(r)}while(n);for(n=0;n<e.ancestors.length;n++){t=e.ancestors[n];var i=ut(e.nativeEvent);r=e.topLevelType;var o=e.nativeEvent,a=e.eventSystemFlags;0===n&&(a|=64);for(var s=null,u=0;u<C.length;u++){var l=C[u];l&&(l=l.extractEvents(r,t,o,i,a))&&(s=rt(s,l))}st(s)}}function pt(e,t,n){if(!n.has(e)){switch(e){case"scroll":Jt(t,"scroll",!0);break;case"focus":case"blur":Jt(t,"focus",!0),Jt(t,"blur",!0),n.set("blur",null),n.set("focus",null);break;case"cancel":case"close":lt(e)&&Jt(t,e,!0);break;case"invalid":case"submit":case"reset":break;default:-1===qe.indexOf(e)&&Qt(e,t)}n.set(e,null)}}var _t,Et,mt,gt=!1,vt=[],yt=null,Tt=null,Ct=null,St=new Map,bt=new Map,Rt=[],It="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput close cancel copy cut paste click change contextmenu reset submit".split(" "),At="focus blur dragenter dragleave mouseover mouseout pointerover pointerout gotpointercapture lostpointercapture".split(" ");function Nt(e,t,n,r,i){return{blockedOn:e,topLevelType:t,eventSystemFlags:32|n,nativeEvent:i,container:r}}function Ot(e,t){switch(e){case"focus":case"blur":yt=null;break;case"dragenter":case"dragleave":Tt=null;break;case"mouseover":case"mouseout":Ct=null;break;case"pointerover":case"pointerout":St.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":bt.delete(t.pointerId)}}function wt(e,t,n,r,i,o){return null===e||e.nativeEvent!==o?(e=Nt(t,n,r,i,o),null!==t&&(null!==(t=Nn(t))&&Et(t)),e):(e.eventSystemFlags|=r,e)}function Lt(e){var t=An(e.target);if(null!==t){var n=$e(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=et(n)))return e.blockedOn=t,void o.unstable_runWithPriority(e.priority,(function(){mt(n)}))}else if(3===t&&n.stateNode.hydrate)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function Pt(e){if(null!==e.blockedOn)return!1;var t=Zt(e.topLevelType,e.eventSystemFlags,e.container,e.nativeEvent);if(null!==t){var n=Nn(t);return null!==n&&Et(n),e.blockedOn=t,!1}return!0}function Mt(e,t,n){Pt(e)&&n.delete(t)}function Ut(){for(gt=!1;0<vt.length;){var e=vt[0];if(null!==e.blockedOn){null!==(e=Nn(e.blockedOn))&&_t(e);break}var t=Zt(e.topLevelType,e.eventSystemFlags,e.container,e.nativeEvent);null!==t?e.blockedOn=t:vt.shift()}null!==yt&&Pt(yt)&&(yt=null),null!==Tt&&Pt(Tt)&&(Tt=null),null!==Ct&&Pt(Ct)&&(Ct=null),St.forEach(Mt),bt.forEach(Mt)}function Dt(e,t){e.blockedOn===t&&(e.blockedOn=null,gt||(gt=!0,o.unstable_scheduleCallback(o.unstable_NormalPriority,Ut)))}function kt(e){function t(t){return Dt(t,e)}if(0<vt.length){Dt(vt[0],e);for(var n=1;n<vt.length;n++){var r=vt[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==yt&&Dt(yt,e),null!==Tt&&Dt(Tt,e),null!==Ct&&Dt(Ct,e),St.forEach(t),bt.forEach(t),n=0;n<Rt.length;n++)(r=Rt[n]).blockedOn===e&&(r.blockedOn=null);for(;0<Rt.length&&null===(n=Rt[0]).blockedOn;)Lt(n),null===n.blockedOn&&Rt.shift()}var Ft={},xt=new Map,Ht=new Map,Gt=["abort","abort",We,"animationEnd",Qe,"animationIteration",Je,"animationStart","canplay","canPlay","canplaythrough","canPlayThrough","durationchange","durationChange","emptied","emptied","encrypted","encrypted","ended","ended","error","error","gotpointercapture","gotPointerCapture","load","load","loadeddata","loadedData","loadedmetadata","loadedMetadata","loadstart","loadStart","lostpointercapture","lostPointerCapture","playing","playing","progress","progress","seeking","seeking","stalled","stalled","suspend","suspend","timeupdate","timeUpdate",Ke,"transitionEnd","waiting","waiting"];function Vt(e,t){for(var n=0;n<e.length;n+=2){var r=e[n],i=e[n+1],o="on"+(i[0].toUpperCase()+i.slice(1));o={phasedRegistrationNames:{bubbled:o,captured:o+"Capture"},dependencies:[r],eventPriority:t},Ht.set(r,t),xt.set(r,o),Ft[i]=o}}Vt("blur blur cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focus focus input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange".split(" "),0),Vt("drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel".split(" "),1),Vt(Gt,2);for(var Bt="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),jt=0;jt<Bt.length;jt++)Ht.set(Bt[jt],0);var zt=o.unstable_UserBlockingPriority,Yt=o.unstable_runWithPriority,Wt=!0;function Qt(e,t){Jt(t,e,!1)}function Jt(e,t,n){var r=Ht.get(t);switch(void 0===r?2:r){case 0:r=Kt.bind(null,t,1,e);break;case 1:r=qt.bind(null,t,1,e);break;default:r=Xt.bind(null,t,1,e)}n?e.addEventListener(t,r,!0):e.addEventListener(t,r,!1)}function Kt(e,t,n,r){x||k();var i=Xt,o=x;x=!0;try{D(i,e,t,n,r)}finally{(x=o)||G()}}function qt(e,t,n,r){Yt(zt,Xt.bind(null,e,t,n,r))}function Xt(e,t,n,r){if(Wt)if(0<vt.length&&-1<It.indexOf(e))e=Nt(null,e,t,n,r),vt.push(e);else{var i=Zt(e,t,n,r);if(null===i)Ot(e,r);else if(-1<It.indexOf(e))e=Nt(i,e,t,n,r),vt.push(e);else if(!function(e,t,n,r,i){switch(t){case"focus":return yt=wt(yt,e,t,n,r,i),!0;case"dragenter":return Tt=wt(Tt,e,t,n,r,i),!0;case"mouseover":return Ct=wt(Ct,e,t,n,r,i),!0;case"pointerover":var o=i.pointerId;return St.set(o,wt(St.get(o)||null,e,t,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,bt.set(o,wt(bt.get(o)||null,e,t,n,r,i)),!0}return!1}(i,e,t,n,r)){Ot(e,r),e=ft(e,r,null,t);try{V(ht,e)}finally{dt(e)}}}}function Zt(e,t,n,r){if(null!==(n=An(n=ut(r)))){var i=$e(n);if(null===i)n=null;else{var o=i.tag;if(13===o){if(null!==(n=et(i)))return n;n=null}else if(3===o){if(i.stateNode.hydrate)return 3===i.tag?i.stateNode.containerInfo:null;n=null}else i!==n&&(n=null)}}e=ft(e,r,n,t);try{V(ht,e)}finally{dt(e)}return null}var $t={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},en=["Webkit","ms","Moz","O"];function tn(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||$t.hasOwnProperty(e)&&$t[e]?(""+t).trim():t+"px"}function nn(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=tn(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}Object.keys($t).forEach((function(e){en.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),$t[t]=$t[e]}))}));var rn=i({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function on(e,t){if(t){if(rn[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(a(137,e,""));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(a(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(a(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(a(62,""))}}function an(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var sn=Ue;function un(e,t){var n=Ze(e=9===e.nodeType||11===e.nodeType?e:e.ownerDocument);t=R[t];for(var r=0;r<t.length;r++)pt(t[r],e,n)}function ln(){}function cn(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function dn(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function fn(e,t){var n,r=dn(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=dn(r)}}function hn(){for(var e=window,t=cn();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(e){n=!1}if(!n)break;t=cn((e=t.contentWindow).document)}return t}function pn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var _n=null,En=null;function mn(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function gn(e,t){return"textarea"===e||"option"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var vn="function"==typeof setTimeout?setTimeout:void 0,yn="function"==typeof clearTimeout?clearTimeout:void 0;function Tn(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break}return e}function Cn(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var Sn=Math.random().toString(36).slice(2),bn="__reactInternalInstance$"+Sn,Rn="__reactEventHandlers$"+Sn,In="__reactContainere$"+Sn;function An(e){var t=e[bn];if(t)return t;for(var n=e.parentNode;n;){if(t=n[In]||n[bn]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=Cn(e);null!==e;){if(n=e[bn])return n;e=Cn(e)}return t}n=(e=n).parentNode}return null}function Nn(e){return!(e=e[bn]||e[In])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function On(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(a(33))}function wn(e){return e[Rn]||null}function Ln(e){do{e=e.return}while(e&&5!==e.tag);return e||null}function Pn(e,t){var n=e.stateNode;if(!n)return null;var r=p(n);if(!r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!=typeof n)throw Error(a(231,t,typeof n));return n}function Mn(e,t,n){(t=Pn(e,n.dispatchConfig.phasedRegistrationNames[t]))&&(n._dispatchListeners=rt(n._dispatchListeners,t),n._dispatchInstances=rt(n._dispatchInstances,e))}function Un(e){if(e&&e.dispatchConfig.phasedRegistrationNames){for(var t=e._targetInst,n=[];t;)n.push(t),t=Ln(t);for(t=n.length;0<t--;)Mn(n[t],"captured",e);for(t=0;t<n.length;t++)Mn(n[t],"bubbled",e)}}function Dn(e,t,n){e&&n&&n.dispatchConfig.registrationName&&(t=Pn(e,n.dispatchConfig.registrationName))&&(n._dispatchListeners=rt(n._dispatchListeners,t),n._dispatchInstances=rt(n._dispatchInstances,e))}function kn(e){e&&e.dispatchConfig.registrationName&&Dn(e._targetInst,null,e)}function Fn(e){it(e,Un)}var xn=null,Hn=null,Gn=null;function Vn(){if(Gn)return Gn;var e,t,n=Hn,r=n.length,i="value"in xn?xn.value:xn.textContent,o=i.length;for(e=0;e<r&&n[e]===i[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===i[o-t];t++);return Gn=i.slice(e,1<t?1-t:void 0)}function Bn(){return!0}function jn(){return!1}function zn(e,t,n,r){for(var i in this.dispatchConfig=e,this._targetInst=t,this.nativeEvent=n,e=this.constructor.Interface)e.hasOwnProperty(i)&&((t=e[i])?this[i]=t(n):"target"===i?this.target=r:this[i]=n[i]);return this.isDefaultPrevented=(null!=n.defaultPrevented?n.defaultPrevented:!1===n.returnValue)?Bn:jn,this.isPropagationStopped=jn,this}function Yn(e,t,n,r){if(this.eventPool.length){var i=this.eventPool.pop();return this.call(i,e,t,n,r),i}return new this(e,t,n,r)}function Wn(e){if(!(e instanceof this))throw Error(a(279));e.destructor(),10>this.eventPool.length&&this.eventPool.push(e)}function Qn(e){e.eventPool=[],e.getPooled=Yn,e.release=Wn}i(zn.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=Bn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=Bn)},persist:function(){this.isPersistent=Bn},isPersistent:jn,destructor:function(){var e,t=this.constructor.Interface;for(e in t)this[e]=null;this.nativeEvent=this._targetInst=this.dispatchConfig=null,this.isPropagationStopped=this.isDefaultPrevented=jn,this._dispatchInstances=this._dispatchListeners=null}}),zn.Interface={type:null,target:null,currentTarget:function(){return null},eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null},zn.extend=function(e){function t(){}function n(){return r.apply(this,arguments)}var r=this;t.prototype=r.prototype;var o=new t;return i(o,n.prototype),n.prototype=o,n.prototype.constructor=n,n.Interface=i({},r.Interface,e),n.extend=r.extend,Qn(n),n},Qn(zn);var Jn=zn.extend({data:null}),Kn=zn.extend({data:null}),qn=[9,13,27,32],Xn=A&&"CompositionEvent"in window,Zn=null;A&&"documentMode"in document&&(Zn=document.documentMode);var $n=A&&"TextEvent"in window&&!Zn,er=A&&(!Xn||Zn&&8<Zn&&11>=Zn),tr=String.fromCharCode(32),nr={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["compositionend","keypress","textInput","paste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"blur compositionend keydown keypress keyup mousedown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:"blur compositionstart keydown keypress keyup mousedown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"blur compositionupdate keydown keypress keyup mousedown".split(" ")}},rr=!1;function ir(e,t){switch(e){case"keyup":return-1!==qn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"blur":return!0;default:return!1}}function or(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var ar=!1;var sr={eventTypes:nr,extractEvents:function(e,t,n,r){var i;if(Xn)e:{switch(e){case"compositionstart":var o=nr.compositionStart;break e;case"compositionend":o=nr.compositionEnd;break e;case"compositionupdate":o=nr.compositionUpdate;break e}o=void 0}else ar?ir(e,n)&&(o=nr.compositionEnd):"keydown"===e&&229===n.keyCode&&(o=nr.compositionStart);return o?(er&&"ko"!==n.locale&&(ar||o!==nr.compositionStart?o===nr.compositionEnd&&ar&&(i=Vn()):(Hn="value"in(xn=r)?xn.value:xn.textContent,ar=!0)),o=Jn.getPooled(o,t,n,r),i?o.data=i:null!==(i=or(n))&&(o.data=i),Fn(o),i=o):i=null,(e=$n?function(e,t){switch(e){case"compositionend":return or(t);case"keypress":return 32!==t.which?null:(rr=!0,tr);case"textInput":return(e=t.data)===tr&&rr?null:e;default:return null}}(e,n):function(e,t){if(ar)return"compositionend"===e||!Xn&&ir(e,t)?(e=Vn(),Gn=Hn=xn=null,ar=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return er&&"ko"!==t.locale?null:t.data;default:return null}}(e,n))?((t=Kn.getPooled(nr.beforeInput,t,n,r)).data=e,Fn(t)):t=null,null===i?t:null===t?i:[i,t]}},ur={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function lr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!ur[e.type]:"textarea"===t}var cr={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:"blur change click focus input keydown keyup selectionchange".split(" ")}};function dr(e,t,n){return(e=zn.getPooled(cr.change,e,t,n)).type="change",P(n),Fn(e),e}var fr=null,hr=null;function pr(e){st(e)}function _r(e){if(Te(On(e)))return e}function Er(e,t){if("change"===e)return t}var mr=!1;function gr(){fr&&(fr.detachEvent("onpropertychange",vr),hr=fr=null)}function vr(e){if("value"===e.propertyName&&_r(hr))if(e=dr(hr,e,ut(e)),x)st(e);else{x=!0;try{U(pr,e)}finally{x=!1,G()}}}function yr(e,t,n){"focus"===e?(gr(),hr=n,(fr=t).attachEvent("onpropertychange",vr)):"blur"===e&&gr()}function Tr(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return _r(hr)}function Cr(e,t){if("click"===e)return _r(t)}function Sr(e,t){if("input"===e||"change"===e)return _r(t)}A&&(mr=lt("input")&&(!document.documentMode||9<document.documentMode));var br={eventTypes:cr,_isInputEventSupported:mr,extractEvents:function(e,t,n,r){var i=t?On(t):window,o=i.nodeName&&i.nodeName.toLowerCase();if("select"===o||"input"===o&&"file"===i.type)var a=Er;else if(lr(i))if(mr)a=Sr;else{a=Tr;var s=yr}else(o=i.nodeName)&&"input"===o.toLowerCase()&&("checkbox"===i.type||"radio"===i.type)&&(a=Cr);if(a&&(a=a(e,t)))return dr(a,n,r);s&&s(e,i,t),"blur"===e&&(e=i._wrapperState)&&e.controlled&&"number"===i.type&&Ae(i,"number",i.value)}},Rr=zn.extend({view:null,detail:null}),Ir={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Ar(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=Ir[e])&&!!t[e]}function Nr(){return Ar}var Or=0,wr=0,Lr=!1,Pr=!1,Mr=Rr.extend({screenX:null,screenY:null,clientX:null,clientY:null,pageX:null,pageY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:Nr,button:null,buttons:null,relatedTarget:function(e){return e.relatedTarget||(e.fromElement===e.srcElement?e.toElement:e.fromElement)},movementX:function(e){if("movementX"in e)return e.movementX;var t=Or;return Or=e.screenX,Lr?"mousemove"===e.type?e.screenX-t:0:(Lr=!0,0)},movementY:function(e){if("movementY"in e)return e.movementY;var t=wr;return wr=e.screenY,Pr?"mousemove"===e.type?e.screenY-t:0:(Pr=!0,0)}}),Ur=Mr.extend({pointerId:null,width:null,height:null,pressure:null,tangentialPressure:null,tiltX:null,tiltY:null,twist:null,pointerType:null,isPrimary:null}),Dr={mouseEnter:{registrationName:"onMouseEnter",dependencies:["mouseout","mouseover"]},mouseLeave:{registrationName:"onMouseLeave",dependencies:["mouseout","mouseover"]},pointerEnter:{registrationName:"onPointerEnter",dependencies:["pointerout","pointerover"]},pointerLeave:{registrationName:"onPointerLeave",dependencies:["pointerout","pointerover"]}},kr={eventTypes:Dr,extractEvents:function(e,t,n,r,i){var o="mouseover"===e||"pointerover"===e,a="mouseout"===e||"pointerout"===e;if(o&&0==(32&i)&&(n.relatedTarget||n.fromElement)||!a&&!o)return null;(o=r.window===r?r:(o=r.ownerDocument)?o.defaultView||o.parentWindow:window,a)?(a=t,null!==(t=(t=n.relatedTarget||n.toElement)?An(t):null)&&(t!==$e(t)||5!==t.tag&&6!==t.tag)&&(t=null)):a=null;if(a===t)return null;if("mouseout"===e||"mouseover"===e)var s=Mr,u=Dr.mouseLeave,l=Dr.mouseEnter,c="mouse";else"pointerout"!==e&&"pointerover"!==e||(s=Ur,u=Dr.pointerLeave,l=Dr.pointerEnter,c="pointer");if(e=null==a?o:On(a),o=null==t?o:On(t),(u=s.getPooled(u,a,n,r)).type=c+"leave",u.target=e,u.relatedTarget=o,(n=s.getPooled(l,t,n,r)).type=c+"enter",n.target=o,n.relatedTarget=e,c=t,(r=a)&&c)e:{for(l=c,a=0,e=s=r;e;e=Ln(e))a++;for(e=0,t=l;t;t=Ln(t))e++;for(;0<a-e;)s=Ln(s),a--;for(;0<e-a;)l=Ln(l),e--;for(;a--;){if(s===l||s===l.alternate)break e;s=Ln(s),l=Ln(l)}s=null}else s=null;for(l=s,s=[];r&&r!==l&&(null===(a=r.alternate)||a!==l);)s.push(r),r=Ln(r);for(r=[];c&&c!==l&&(null===(a=c.alternate)||a!==l);)r.push(c),c=Ln(c);for(c=0;c<s.length;c++)Dn(s[c],"bubbled",u);for(c=r.length;0<c--;)Dn(r[c],"captured",n);return 0==(64&i)?[u]:[u,n]}};var Fr="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},xr=Object.prototype.hasOwnProperty;function Hr(e,t){if(Fr(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++)if(!xr.call(t,n[r])||!Fr(e[n[r]],t[n[r]]))return!1;return!0}var Gr=A&&"documentMode"in document&&11>=document.documentMode,Vr={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:"blur contextmenu dragend focus keydown keyup mousedown mouseup selectionchange".split(" ")}},Br=null,jr=null,zr=null,Yr=!1;function Wr(e,t){var n=t.window===t?t.document:9===t.nodeType?t:t.ownerDocument;return Yr||null==Br||Br!==cn(n)?null:("selectionStart"in(n=Br)&&pn(n)?n={start:n.selectionStart,end:n.selectionEnd}:n={anchorNode:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset},zr&&Hr(zr,n)?null:(zr=n,(e=zn.getPooled(Vr.select,jr,e,t)).type="select",e.target=Br,Fn(e),e))}var Qr={eventTypes:Vr,extractEvents:function(e,t,n,r,i,o){if(!(o=!(i=o||(r.window===r?r.document:9===r.nodeType?r:r.ownerDocument)))){e:{i=Ze(i),o=R.onSelect;for(var a=0;a<o.length;a++)if(!i.has(o[a])){i=!1;break e}i=!0}o=!i}if(o)return null;switch(i=t?On(t):window,e){case"focus":(lr(i)||"true"===i.contentEditable)&&(Br=i,jr=t,zr=null);break;case"blur":zr=jr=Br=null;break;case"mousedown":Yr=!0;break;case"contextmenu":case"mouseup":case"dragend":return Yr=!1,Wr(n,r);case"selectionchange":if(Gr)break;case"keydown":case"keyup":return Wr(n,r)}return null}},Jr=zn.extend({animationName:null,elapsedTime:null,pseudoElement:null}),Kr=zn.extend({clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),qr=Rr.extend({relatedTarget:null});function Xr(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}var Zr={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},$r={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},ei=Rr.extend({key:function(e){if(e.key){var t=Zr[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=Xr(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?$r[e.keyCode]||"Unidentified":""},location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:Nr,charCode:function(e){return"keypress"===e.type?Xr(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?Xr(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),ti=Mr.extend({dataTransfer:null}),ni=Rr.extend({touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:Nr}),ri=zn.extend({propertyName:null,elapsedTime:null,pseudoElement:null}),ii=Mr.extend({deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:null,deltaMode:null}),oi={eventTypes:Ft,extractEvents:function(e,t,n,r){var i=xt.get(e);if(!i)return null;switch(e){case"keypress":if(0===Xr(n))return null;case"keydown":case"keyup":e=ei;break;case"blur":case"focus":e=qr;break;case"click":if(2===n.button)return null;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":e=Mr;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":e=ti;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":e=ni;break;case We:case Qe:case Je:e=Jr;break;case Ke:e=ri;break;case"scroll":e=Rr;break;case"wheel":e=ii;break;case"copy":case"cut":case"paste":e=Kr;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":e=Ur;break;default:e=zn}return Fn(t=e.getPooled(i,t,n,r)),t}};if(g)throw Error(a(101));g=Array.prototype.slice.call("ResponderEventPlugin SimpleEventPlugin EnterLeaveEventPlugin ChangeEventPlugin SelectEventPlugin BeforeInputEventPlugin".split(" ")),y(),p=wn,_=Nn,E=On,I({SimpleEventPlugin:oi,EnterLeaveEventPlugin:kr,ChangeEventPlugin:br,SelectEventPlugin:Qr,BeforeInputEventPlugin:sr});var ai=[],si=-1;function ui(e){0>si||(e.current=ai[si],ai[si]=null,si--)}function li(e,t){si++,ai[si]=e.current,e.current=t}var ci={},di={current:ci},fi={current:!1},hi=ci;function pi(e,t){var n=e.type.contextTypes;if(!n)return ci;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i,o={};for(i in n)o[i]=t[i];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function _i(e){return null!=(e=e.childContextTypes)}function Ei(){ui(fi),ui(di)}function mi(e,t,n){if(di.current!==ci)throw Error(a(168));li(di,t),li(fi,n)}function gi(e,t,n){var r=e.stateNode;if(e=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var o in r=r.getChildContext())if(!(o in e))throw Error(a(108,Ee(t)||"Unknown",o));return i({},n,{},r)}function vi(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ci,hi=di.current,li(di,e),li(fi,fi.current),!0}function yi(e,t,n){var r=e.stateNode;if(!r)throw Error(a(169));n?(e=gi(e,t,hi),r.__reactInternalMemoizedMergedChildContext=e,ui(fi),ui(di),li(di,e)):ui(fi),li(fi,n)}var Ti=o.unstable_runWithPriority,Ci=o.unstable_scheduleCallback,Si=o.unstable_cancelCallback,bi=o.unstable_requestPaint,Ri=o.unstable_now,Ii=o.unstable_getCurrentPriorityLevel,Ai=o.unstable_ImmediatePriority,Ni=o.unstable_UserBlockingPriority,Oi=o.unstable_NormalPriority,wi=o.unstable_LowPriority,Li=o.unstable_IdlePriority,Pi={},Mi=o.unstable_shouldYield,Ui=void 0!==bi?bi:function(){},Di=null,ki=null,Fi=!1,xi=Ri(),Hi=1e4>xi?Ri:function(){return Ri()-xi};function Gi(){switch(Ii()){case Ai:return 99;case Ni:return 98;case Oi:return 97;case wi:return 96;case Li:return 95;default:throw Error(a(332))}}function Vi(e){switch(e){case 99:return Ai;case 98:return Ni;case 97:return Oi;case 96:return wi;case 95:return Li;default:throw Error(a(332))}}function Bi(e,t){return e=Vi(e),Ti(e,t)}function ji(e,t,n){return e=Vi(e),Ci(e,t,n)}function zi(e){return null===Di?(Di=[e],ki=Ci(Ai,Wi)):Di.push(e),Pi}function Yi(){if(null!==ki){var e=ki;ki=null,Si(e)}Wi()}function Wi(){if(!Fi&&null!==Di){Fi=!0;var e=0;try{var t=Di;Bi(99,(function(){for(;e<t.length;e++){var n=t[e];do{n=n(!0)}while(null!==n)}})),Di=null}catch(t){throw null!==Di&&(Di=Di.slice(e+1)),Ci(Ai,Yi),t}finally{Fi=!1}}}function Qi(e,t,n){return 1073741821-(1+((1073741821-e+t/10)/(n/=10)|0))*n}function Ji(e,t){if(e&&e.defaultProps)for(var n in t=i({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}var Ki={current:null},qi=null,Xi=null,Zi=null;function $i(){Zi=Xi=qi=null}function eo(e){var t=Ki.current;ui(Ki),e.type._context._currentValue=t}function to(e,t){for(;null!==e;){var n=e.alternate;if(e.childExpirationTime<t)e.childExpirationTime=t,null!==n&&n.childExpirationTime<t&&(n.childExpirationTime=t);else{if(!(null!==n&&n.childExpirationTime<t))break;n.childExpirationTime=t}e=e.return}}function no(e,t){qi=e,Zi=Xi=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(e.expirationTime>=t&&(wa=!0),e.firstContext=null)}function ro(e,t){if(Zi!==e&&!1!==t&&0!==t)if("number"==typeof t&&1073741823!==t||(Zi=e,t=1073741823),t={context:e,observedBits:t,next:null},null===Xi){if(null===qi)throw Error(a(308));Xi=t,qi.dependencies={expirationTime:0,firstContext:t,responders:null}}else Xi=Xi.next=t;return e._currentValue}var io=!1;function oo(e){e.updateQueue={baseState:e.memoizedState,baseQueue:null,shared:{pending:null},effects:null}}function ao(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,baseQueue:e.baseQueue,shared:e.shared,effects:e.effects})}function so(e,t){return(e={expirationTime:e,suspenseConfig:t,tag:0,payload:null,callback:null,next:null}).next=e}function uo(e,t){if(null!==(e=e.updateQueue)){var n=(e=e.shared).pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}}function lo(e,t){var n=e.alternate;null!==n&&ao(n,e),null===(n=(e=e.updateQueue).baseQueue)?(e.baseQueue=t.next=t,t.next=t):(t.next=n.next,n.next=t)}function co(e,t,n,r){var o=e.updateQueue;io=!1;var a=o.baseQueue,s=o.shared.pending;if(null!==s){if(null!==a){var u=a.next;a.next=s.next,s.next=u}a=s,o.shared.pending=null,null!==(u=e.alternate)&&(null!==(u=u.updateQueue)&&(u.baseQueue=s))}if(null!==a){u=a.next;var l=o.baseState,c=0,d=null,f=null,h=null;if(null!==u)for(var p=u;;){if((s=p.expirationTime)<r){var _={expirationTime:p.expirationTime,suspenseConfig:p.suspenseConfig,tag:p.tag,payload:p.payload,callback:p.callback,next:null};null===h?(f=h=_,d=l):h=h.next=_,s>c&&(c=s)}else{null!==h&&(h=h.next={expirationTime:1073741823,suspenseConfig:p.suspenseConfig,tag:p.tag,payload:p.payload,callback:p.callback,next:null}),ou(s,p.suspenseConfig);e:{var E=e,m=p;switch(s=t,_=n,m.tag){case 1:if("function"==typeof(E=m.payload)){l=E.call(_,l,s);break e}l=E;break e;case 3:E.effectTag=-4097&E.effectTag|64;case 0:if(null==(s="function"==typeof(E=m.payload)?E.call(_,l,s):E))break e;l=i({},l,s);break e;case 2:io=!0}}null!==p.callback&&(e.effectTag|=32,null===(s=o.effects)?o.effects=[p]:s.push(p))}if(null===(p=p.next)||p===u){if(null===(s=o.shared.pending))break;p=a.next=s.next,s.next=u,o.baseQueue=a=s,o.shared.pending=null}}null===h?d=l:h.next=f,o.baseState=d,o.baseQueue=h,au(c),e.expirationTime=c,e.memoizedState=l}}function fo(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(null!==i){if(r.callback=null,r=i,i=n,"function"!=typeof r)throw Error(a(191,r));r.call(i)}}}var ho=q.ReactCurrentBatchConfig,po=(new r.Component).refs;function _o(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:i({},t,n),e.memoizedState=n,0===e.expirationTime&&(e.updateQueue.baseState=n)}var Eo={isMounted:function(e){return!!(e=e._reactInternalFiber)&&$e(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternalFiber;var r=Ws(),i=ho.suspense;(i=so(r=Qs(r,e,i),i)).payload=t,null!=n&&(i.callback=n),uo(e,i),Js(e,r)},enqueueReplaceState:function(e,t,n){e=e._reactInternalFiber;var r=Ws(),i=ho.suspense;(i=so(r=Qs(r,e,i),i)).tag=1,i.payload=t,null!=n&&(i.callback=n),uo(e,i),Js(e,r)},enqueueForceUpdate:function(e,t){e=e._reactInternalFiber;var n=Ws(),r=ho.suspense;(r=so(n=Qs(n,e,r),r)).tag=2,null!=t&&(r.callback=t),uo(e,r),Js(e,n)}};function mo(e,t,n,r,i,o,a){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,o,a):!t.prototype||!t.prototype.isPureReactComponent||(!Hr(n,r)||!Hr(i,o))}function go(e,t,n){var r=!1,i=ci,o=t.contextType;return"object"==typeof o&&null!==o?o=ro(o):(i=_i(t)?hi:di.current,o=(r=null!=(r=t.contextTypes))?pi(e,i):ci),t=new t(n,o),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=Eo,e.stateNode=t,t._reactInternalFiber=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function vo(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Eo.enqueueReplaceState(t,t.state,null)}function yo(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs=po,oo(e);var o=t.contextType;"object"==typeof o&&null!==o?i.context=ro(o):(o=_i(t)?hi:di.current,i.context=pi(e,o)),co(e,n,i,r),i.state=e.memoizedState,"function"==typeof(o=t.getDerivedStateFromProps)&&(_o(e,t,o,n),i.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof i.getSnapshotBeforeUpdate||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||(t=i.state,"function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),t!==i.state&&Eo.enqueueReplaceState(i,i.state,null),co(e,n,i,r),i.state=e.memoizedState),"function"==typeof i.componentDidMount&&(e.effectTag|=4)}var To=Array.isArray;function Co(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(a(309));var r=n.stateNode}if(!r)throw Error(a(147,e));var i=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===i?t.ref:((t=function(e){var t=r.refs;t===po&&(t=r.refs={}),null===e?delete t[i]:t[i]=e})._stringRef=i,t)}if("string"!=typeof e)throw Error(a(284));if(!n._owner)throw Error(a(290,e))}return e}function So(e,t){if("textarea"!==e.type)throw Error(a(31,"[object Object]"===Object.prototype.toString.call(t)?"object with keys {"+Object.keys(t).join(", ")+"}":t,""))}function bo(e){function t(t,n){if(e){var r=t.lastEffect;null!==r?(r.nextEffect=n,t.lastEffect=n):t.firstEffect=t.lastEffect=n,n.nextEffect=null,n.effectTag=8}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function i(e,t){return(e=Iu(e,t)).index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.effectTag=2,n):r:(t.effectTag=2,n):n}function s(t){return e&&null===t.alternate&&(t.effectTag=2),t}function u(e,t,n,r){return null===t||6!==t.tag?((t=Ou(n,e.mode,r)).return=e,t):((t=i(t,n)).return=e,t)}function l(e,t,n,r){return null!==t&&t.elementType===n.type?((r=i(t,n.props)).ref=Co(e,t,n),r.return=e,r):((r=Au(n.type,n.key,n.props,null,e.mode,r)).ref=Co(e,t,n),r.return=e,r)}function c(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=wu(n,e.mode,r)).return=e,t):((t=i(t,n.children||[])).return=e,t)}function d(e,t,n,r,o){return null===t||7!==t.tag?((t=Nu(n,e.mode,r,o)).return=e,t):((t=i(t,n)).return=e,t)}function f(e,t,n){if("string"==typeof t||"number"==typeof t)return(t=Ou(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case ee:return(n=Au(t.type,t.key,t.props,null,e.mode,n)).ref=Co(e,null,t),n.return=e,n;case te:return(t=wu(t,e.mode,n)).return=e,t}if(To(t)||_e(t))return(t=Nu(t,e.mode,n,null)).return=e,t;So(e,t)}return null}function h(e,t,n,r){var i=null!==t?t.key:null;if("string"==typeof n||"number"==typeof n)return null!==i?null:u(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case ee:return n.key===i?n.type===ne?d(e,t,n.props.children,r,i):l(e,t,n,r):null;case te:return n.key===i?c(e,t,n,r):null}if(To(n)||_e(n))return null!==i?null:d(e,t,n,r,null);So(e,n)}return null}function p(e,t,n,r,i){if("string"==typeof r||"number"==typeof r)return u(t,e=e.get(n)||null,""+r,i);if("object"==typeof r&&null!==r){switch(r.$$typeof){case ee:return e=e.get(null===r.key?n:r.key)||null,r.type===ne?d(t,e,r.props.children,i,r.key):l(t,e,r,i);case te:return c(t,e=e.get(null===r.key?n:r.key)||null,r,i)}if(To(r)||_e(r))return d(t,e=e.get(n)||null,r,i,null);So(t,r)}return null}function _(i,a,s,u){for(var l=null,c=null,d=a,_=a=0,E=null;null!==d&&_<s.length;_++){d.index>_?(E=d,d=null):E=d.sibling;var m=h(i,d,s[_],u);if(null===m){null===d&&(d=E);break}e&&d&&null===m.alternate&&t(i,d),a=o(m,a,_),null===c?l=m:c.sibling=m,c=m,d=E}if(_===s.length)return n(i,d),l;if(null===d){for(;_<s.length;_++)null!==(d=f(i,s[_],u))&&(a=o(d,a,_),null===c?l=d:c.sibling=d,c=d);return l}for(d=r(i,d);_<s.length;_++)null!==(E=p(d,i,_,s[_],u))&&(e&&null!==E.alternate&&d.delete(null===E.key?_:E.key),a=o(E,a,_),null===c?l=E:c.sibling=E,c=E);return e&&d.forEach((function(e){return t(i,e)})),l}function E(i,s,u,l){var c=_e(u);if("function"!=typeof c)throw Error(a(150));if(null==(u=c.call(u)))throw Error(a(151));for(var d=c=null,_=s,E=s=0,m=null,g=u.next();null!==_&&!g.done;E++,g=u.next()){_.index>E?(m=_,_=null):m=_.sibling;var v=h(i,_,g.value,l);if(null===v){null===_&&(_=m);break}e&&_&&null===v.alternate&&t(i,_),s=o(v,s,E),null===d?c=v:d.sibling=v,d=v,_=m}if(g.done)return n(i,_),c;if(null===_){for(;!g.done;E++,g=u.next())null!==(g=f(i,g.value,l))&&(s=o(g,s,E),null===d?c=g:d.sibling=g,d=g);return c}for(_=r(i,_);!g.done;E++,g=u.next())null!==(g=p(_,i,E,g.value,l))&&(e&&null!==g.alternate&&_.delete(null===g.key?E:g.key),s=o(g,s,E),null===d?c=g:d.sibling=g,d=g);return e&&_.forEach((function(e){return t(i,e)})),c}return function(e,r,o,u){var l="object"==typeof o&&null!==o&&o.type===ne&&null===o.key;l&&(o=o.props.children);var c="object"==typeof o&&null!==o;if(c)switch(o.$$typeof){case ee:e:{for(c=o.key,l=r;null!==l;){if(l.key===c){switch(l.tag){case 7:if(o.type===ne){n(e,l.sibling),(r=i(l,o.props.children)).return=e,e=r;break e}break;default:if(l.elementType===o.type){n(e,l.sibling),(r=i(l,o.props)).ref=Co(e,l,o),r.return=e,e=r;break e}}n(e,l);break}t(e,l),l=l.sibling}o.type===ne?((r=Nu(o.props.children,e.mode,u,o.key)).return=e,e=r):((u=Au(o.type,o.key,o.props,null,e.mode,u)).ref=Co(e,r,o),u.return=e,e=u)}return s(e);case te:e:{for(l=o.key;null!==r;){if(r.key===l){if(4===r.tag&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),(r=i(r,o.children||[])).return=e,e=r;break e}n(e,r);break}t(e,r),r=r.sibling}(r=wu(o,e.mode,u)).return=e,e=r}return s(e)}if("string"==typeof o||"number"==typeof o)return o=""+o,null!==r&&6===r.tag?(n(e,r.sibling),(r=i(r,o)).return=e,e=r):(n(e,r),(r=Ou(o,e.mode,u)).return=e,e=r),s(e);if(To(o))return _(e,r,o,u);if(_e(o))return E(e,r,o,u);if(c&&So(e,o),void 0===o&&!l)switch(e.tag){case 1:case 0:throw e=e.type,Error(a(152,e.displayName||e.name||"Component"))}return n(e,r)}}var Ro=bo(!0),Io=bo(!1),Ao={},No={current:Ao},Oo={current:Ao},wo={current:Ao};function Lo(e){if(e===Ao)throw Error(a(174));return e}function Po(e,t){switch(li(wo,t),li(Oo,e),li(No,Ao),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Fe(null,"");break;default:t=Fe(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}ui(No),li(No,t)}function Mo(){ui(No),ui(Oo),ui(wo)}function Uo(e){Lo(wo.current);var t=Lo(No.current),n=Fe(t,e.type);t!==n&&(li(Oo,e),li(No,n))}function Do(e){Oo.current===e&&(ui(No),ui(Oo))}var ko={current:0};function Fo(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!=(64&t.effectTag))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}function xo(e,t){return{responder:e,props:t}}var Ho=q.ReactCurrentDispatcher,Go=q.ReactCurrentBatchConfig,Vo=0,Bo=null,jo=null,zo=null,Yo=!1;function Wo(){throw Error(a(321))}function Qo(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Fr(e[n],t[n]))return!1;return!0}function Jo(e,t,n,r,i,o){if(Vo=o,Bo=t,t.memoizedState=null,t.updateQueue=null,t.expirationTime=0,Ho.current=null===e||null===e.memoizedState?ma:ga,e=n(r,i),t.expirationTime===Vo){o=0;do{if(t.expirationTime=0,!(25>o))throw Error(a(301));o+=1,zo=jo=null,t.updateQueue=null,Ho.current=va,e=n(r,i)}while(t.expirationTime===Vo)}if(Ho.current=Ea,t=null!==jo&&null!==jo.next,Vo=0,zo=jo=Bo=null,Yo=!1,t)throw Error(a(300));return e}function Ko(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===zo?Bo.memoizedState=zo=e:zo=zo.next=e,zo}function qo(){if(null===jo){var e=Bo.alternate;e=null!==e?e.memoizedState:null}else e=jo.next;var t=null===zo?Bo.memoizedState:zo.next;if(null!==t)zo=t,jo=e;else{if(null===e)throw Error(a(310));e={memoizedState:(jo=e).memoizedState,baseState:jo.baseState,baseQueue:jo.baseQueue,queue:jo.queue,next:null},null===zo?Bo.memoizedState=zo=e:zo=zo.next=e}return zo}function Xo(e,t){return"function"==typeof t?t(e):t}function Zo(e){var t=qo(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=jo,i=r.baseQueue,o=n.pending;if(null!==o){if(null!==i){var s=i.next;i.next=o.next,o.next=s}r.baseQueue=i=o,n.pending=null}if(null!==i){i=i.next,r=r.baseState;var u=s=o=null,l=i;do{var c=l.expirationTime;if(c<Vo){var d={expirationTime:l.expirationTime,suspenseConfig:l.suspenseConfig,action:l.action,eagerReducer:l.eagerReducer,eagerState:l.eagerState,next:null};null===u?(s=u=d,o=r):u=u.next=d,c>Bo.expirationTime&&(Bo.expirationTime=c,au(c))}else null!==u&&(u=u.next={expirationTime:1073741823,suspenseConfig:l.suspenseConfig,action:l.action,eagerReducer:l.eagerReducer,eagerState:l.eagerState,next:null}),ou(c,l.suspenseConfig),r=l.eagerReducer===e?l.eagerState:e(r,l.action);l=l.next}while(null!==l&&l!==i);null===u?o=r:u.next=s,Fr(r,t.memoizedState)||(wa=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=u,n.lastRenderedState=r}return[t.memoizedState,n.dispatch]}function $o(e){var t=qo(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(null!==i){n.pending=null;var s=i=i.next;do{o=e(o,s.action),s=s.next}while(s!==i);Fr(o,t.memoizedState)||(wa=!0),t.memoizedState=o,null===t.baseQueue&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function ea(e){var t=Ko();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e=(e=t.queue={pending:null,dispatch:null,lastRenderedReducer:Xo,lastRenderedState:e}).dispatch=_a.bind(null,Bo,e),[t.memoizedState,e]}function ta(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=Bo.updateQueue)?(t={lastEffect:null},Bo.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function na(){return qo().memoizedState}function ra(e,t,n,r){var i=Ko();Bo.effectTag|=e,i.memoizedState=ta(1|t,n,void 0,void 0===r?null:r)}function ia(e,t,n,r){var i=qo();r=void 0===r?null:r;var o=void 0;if(null!==jo){var a=jo.memoizedState;if(o=a.destroy,null!==r&&Qo(r,a.deps))return void ta(t,n,o,r)}Bo.effectTag|=e,i.memoizedState=ta(1|t,n,o,r)}function oa(e,t){return ra(516,4,e,t)}function aa(e,t){return ia(516,4,e,t)}function sa(e,t){return ia(4,2,e,t)}function ua(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function la(e,t,n){return n=null!=n?n.concat([e]):null,ia(4,2,ua.bind(null,t,e),n)}function ca(){}function da(e,t){return Ko().memoizedState=[e,void 0===t?null:t],e}function fa(e,t){var n=qo();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&Qo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function ha(e,t){var n=qo();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&Qo(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function pa(e,t,n){var r=Gi();Bi(98>r?98:r,(function(){e(!0)})),Bi(97<r?97:r,(function(){var r=Go.suspense;Go.suspense=void 0===t?null:t;try{e(!1),n()}finally{Go.suspense=r}}))}function _a(e,t,n){var r=Ws(),i=ho.suspense;i={expirationTime:r=Qs(r,e,i),suspenseConfig:i,action:n,eagerReducer:null,eagerState:null,next:null};var o=t.pending;if(null===o?i.next=i:(i.next=o.next,o.next=i),t.pending=i,o=e.alternate,e===Bo||null!==o&&o===Bo)Yo=!0,i.expirationTime=Vo,Bo.expirationTime=Vo;else{if(0===e.expirationTime&&(null===o||0===o.expirationTime)&&null!==(o=t.lastRenderedReducer))try{var a=t.lastRenderedState,s=o(a,n);if(i.eagerReducer=o,i.eagerState=s,Fr(s,a))return}catch(e){}Js(e,r)}}var Ea={readContext:ro,useCallback:Wo,useContext:Wo,useEffect:Wo,useImperativeHandle:Wo,useLayoutEffect:Wo,useMemo:Wo,useReducer:Wo,useRef:Wo,useState:Wo,useDebugValue:Wo,useResponder:Wo,useDeferredValue:Wo,useTransition:Wo},ma={readContext:ro,useCallback:da,useContext:ro,useEffect:oa,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,ra(4,2,ua.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ra(4,2,e,t)},useMemo:function(e,t){var n=Ko();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Ko();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e=(e=r.queue={pending:null,dispatch:null,lastRenderedReducer:e,lastRenderedState:t}).dispatch=_a.bind(null,Bo,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},Ko().memoizedState=e},useState:ea,useDebugValue:ca,useResponder:xo,useDeferredValue:function(e,t){var n=ea(e),r=n[0],i=n[1];return oa((function(){var n=Go.suspense;Go.suspense=void 0===t?null:t;try{i(e)}finally{Go.suspense=n}}),[e,t]),r},useTransition:function(e){var t=ea(!1),n=t[0];return t=t[1],[da(pa.bind(null,t,e),[t,e]),n]}},ga={readContext:ro,useCallback:fa,useContext:ro,useEffect:aa,useImperativeHandle:la,useLayoutEffect:sa,useMemo:ha,useReducer:Zo,useRef:na,useState:function(){return Zo(Xo)},useDebugValue:ca,useResponder:xo,useDeferredValue:function(e,t){var n=Zo(Xo),r=n[0],i=n[1];return aa((function(){var n=Go.suspense;Go.suspense=void 0===t?null:t;try{i(e)}finally{Go.suspense=n}}),[e,t]),r},useTransition:function(e){var t=Zo(Xo),n=t[0];return t=t[1],[fa(pa.bind(null,t,e),[t,e]),n]}},va={readContext:ro,useCallback:fa,useContext:ro,useEffect:aa,useImperativeHandle:la,useLayoutEffect:sa,useMemo:ha,useReducer:$o,useRef:na,useState:function(){return $o(Xo)},useDebugValue:ca,useResponder:xo,useDeferredValue:function(e,t){var n=$o(Xo),r=n[0],i=n[1];return aa((function(){var n=Go.suspense;Go.suspense=void 0===t?null:t;try{i(e)}finally{Go.suspense=n}}),[e,t]),r},useTransition:function(e){var t=$o(Xo),n=t[0];return t=t[1],[fa(pa.bind(null,t,e),[t,e]),n]}},ya=null,Ta=null,Ca=!1;function Sa(e,t){var n=bu(5,null,null,0);n.elementType="DELETED",n.type="DELETED",n.stateNode=t,n.return=e,n.effectTag=8,null!==e.lastEffect?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function ba(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,!0);case 13:default:return!1}}function Ra(e){if(Ca){var t=Ta;if(t){var n=t;if(!ba(e,t)){if(!(t=Tn(n.nextSibling))||!ba(e,t))return e.effectTag=-1025&e.effectTag|2,Ca=!1,void(ya=e);Sa(ya,n)}ya=e,Ta=Tn(t.firstChild)}else e.effectTag=-1025&e.effectTag|2,Ca=!1,ya=e}}function Ia(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;ya=e}function Aa(e){if(e!==ya)return!1;if(!Ca)return Ia(e),Ca=!0,!1;var t=e.type;if(5!==e.tag||"head"!==t&&"body"!==t&&!gn(t,e.memoizedProps))for(t=Ta;t;)Sa(e,t),t=Tn(t.nextSibling);if(Ia(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(a(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){Ta=Tn(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}Ta=null}}else Ta=ya?Tn(e.stateNode.nextSibling):null;return!0}function Na(){Ta=ya=null,Ca=!1}var Oa=q.ReactCurrentOwner,wa=!1;function La(e,t,n,r){t.child=null===e?Io(t,null,n,r):Ro(t,e.child,n,r)}function Pa(e,t,n,r,i){n=n.render;var o=t.ref;return no(t,i),r=Jo(e,t,n,r,o,i),null===e||wa?(t.effectTag|=1,La(e,t,r,i),t.child):(t.updateQueue=e.updateQueue,t.effectTag&=-517,e.expirationTime<=i&&(e.expirationTime=0),Ja(e,t,i))}function Ma(e,t,n,r,i,o){if(null===e){var a=n.type;return"function"!=typeof a||Ru(a)||void 0!==a.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Au(n.type,null,r,null,t.mode,o)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=a,Ua(e,t,a,r,i,o))}return a=e.child,i<o&&(i=a.memoizedProps,(n=null!==(n=n.compare)?n:Hr)(i,r)&&e.ref===t.ref)?Ja(e,t,o):(t.effectTag|=1,(e=Iu(a,r)).ref=t.ref,e.return=t,t.child=e)}function Ua(e,t,n,r,i,o){return null!==e&&Hr(e.memoizedProps,r)&&e.ref===t.ref&&(wa=!1,i<o)?(t.expirationTime=e.expirationTime,Ja(e,t,o)):ka(e,t,n,r,o)}function Da(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.effectTag|=128)}function ka(e,t,n,r,i){var o=_i(n)?hi:di.current;return o=pi(t,o),no(t,i),n=Jo(e,t,n,r,o,i),null===e||wa?(t.effectTag|=1,La(e,t,n,i),t.child):(t.updateQueue=e.updateQueue,t.effectTag&=-517,e.expirationTime<=i&&(e.expirationTime=0),Ja(e,t,i))}function Fa(e,t,n,r,i){if(_i(n)){var o=!0;vi(t)}else o=!1;if(no(t,i),null===t.stateNode)null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),go(t,n,r),yo(t,n,r,i),r=!0;else if(null===e){var a=t.stateNode,s=t.memoizedProps;a.props=s;var u=a.context,l=n.contextType;"object"==typeof l&&null!==l?l=ro(l):l=pi(t,l=_i(n)?hi:di.current);var c=n.getDerivedStateFromProps,d="function"==typeof c||"function"==typeof a.getSnapshotBeforeUpdate;d||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==r||u!==l)&&vo(t,a,r,l),io=!1;var f=t.memoizedState;a.state=f,co(t,r,a,i),u=t.memoizedState,s!==r||f!==u||fi.current||io?("function"==typeof c&&(_o(t,n,c,r),u=t.memoizedState),(s=io||mo(t,n,s,r,f,u,l))?(d||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||("function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"==typeof a.componentDidMount&&(t.effectTag|=4)):("function"==typeof a.componentDidMount&&(t.effectTag|=4),t.memoizedProps=r,t.memoizedState=u),a.props=r,a.state=u,a.context=l,r=s):("function"==typeof a.componentDidMount&&(t.effectTag|=4),r=!1)}else a=t.stateNode,ao(e,t),s=t.memoizedProps,a.props=t.type===t.elementType?s:Ji(t.type,s),u=a.context,"object"==typeof(l=n.contextType)&&null!==l?l=ro(l):l=pi(t,l=_i(n)?hi:di.current),(d="function"==typeof(c=n.getDerivedStateFromProps)||"function"==typeof a.getSnapshotBeforeUpdate)||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==r||u!==l)&&vo(t,a,r,l),io=!1,u=t.memoizedState,a.state=u,co(t,r,a,i),f=t.memoizedState,s!==r||u!==f||fi.current||io?("function"==typeof c&&(_o(t,n,c,r),f=t.memoizedState),(c=io||mo(t,n,s,r,u,f,l))?(d||"function"!=typeof a.UNSAFE_componentWillUpdate&&"function"!=typeof a.componentWillUpdate||("function"==typeof a.componentWillUpdate&&a.componentWillUpdate(r,f,l),"function"==typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,f,l)),"function"==typeof a.componentDidUpdate&&(t.effectTag|=4),"function"==typeof a.getSnapshotBeforeUpdate&&(t.effectTag|=256)):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&u===e.memoizedState||(t.effectTag|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&u===e.memoizedState||(t.effectTag|=256),t.memoizedProps=r,t.memoizedState=f),a.props=r,a.state=f,a.context=l,r=c):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&u===e.memoizedState||(t.effectTag|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&u===e.memoizedState||(t.effectTag|=256),r=!1);return xa(e,t,n,r,o,i)}function xa(e,t,n,r,i,o){Da(e,t);var a=0!=(64&t.effectTag);if(!r&&!a)return i&&yi(t,n,!1),Ja(e,t,o);r=t.stateNode,Oa.current=t;var s=a&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.effectTag|=1,null!==e&&a?(t.child=Ro(t,e.child,null,o),t.child=Ro(t,null,s,o)):La(e,t,s,o),t.memoizedState=r.state,i&&yi(t,n,!0),t.child}function Ha(e){var t=e.stateNode;t.pendingContext?mi(0,t.pendingContext,t.pendingContext!==t.context):t.context&&mi(0,t.context,!1),Po(e,t.containerInfo)}var Ga,Va,Ba,ja={dehydrated:null,retryTime:0};function za(e,t,n){var r,i=t.mode,o=t.pendingProps,a=ko.current,s=!1;if((r=0!=(64&t.effectTag))||(r=0!=(2&a)&&(null===e||null!==e.memoizedState)),r?(s=!0,t.effectTag&=-65):null!==e&&null===e.memoizedState||void 0===o.fallback||!0===o.unstable_avoidThisFallback||(a|=1),li(ko,1&a),null===e){if(void 0!==o.fallback&&Ra(t),s){if(s=o.fallback,(o=Nu(null,i,0,null)).return=t,0==(2&t.mode))for(e=null!==t.memoizedState?t.child.child:t.child,o.child=e;null!==e;)e.return=o,e=e.sibling;return(n=Nu(s,i,n,null)).return=t,o.sibling=n,t.memoizedState=ja,t.child=o,n}return i=o.children,t.memoizedState=null,t.child=Io(t,null,i,n)}if(null!==e.memoizedState){if(i=(e=e.child).sibling,s){if(o=o.fallback,(n=Iu(e,e.pendingProps)).return=t,0==(2&t.mode)&&(s=null!==t.memoizedState?t.child.child:t.child)!==e.child)for(n.child=s;null!==s;)s.return=n,s=s.sibling;return(i=Iu(i,o)).return=t,n.sibling=i,n.childExpirationTime=0,t.memoizedState=ja,t.child=n,i}return n=Ro(t,e.child,o.children,n),t.memoizedState=null,t.child=n}if(e=e.child,s){if(s=o.fallback,(o=Nu(null,i,0,null)).return=t,o.child=e,null!==e&&(e.return=o),0==(2&t.mode))for(e=null!==t.memoizedState?t.child.child:t.child,o.child=e;null!==e;)e.return=o,e=e.sibling;return(n=Nu(s,i,n,null)).return=t,o.sibling=n,n.effectTag|=2,o.childExpirationTime=0,t.memoizedState=ja,t.child=o,n}return t.memoizedState=null,t.child=Ro(t,e,o.children,n)}function Ya(e,t){e.expirationTime<t&&(e.expirationTime=t);var n=e.alternate;null!==n&&n.expirationTime<t&&(n.expirationTime=t),to(e.return,t)}function Wa(e,t,n,r,i,o){var a=e.memoizedState;null===a?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailExpiration:0,tailMode:i,lastEffect:o}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailExpiration=0,a.tailMode=i,a.lastEffect=o)}function Qa(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(La(e,t,r.children,n),0!=(2&(r=ko.current)))r=1&r|2,t.effectTag|=64;else{if(null!==e&&0!=(64&e.effectTag))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&Ya(e,n);else if(19===e.tag)Ya(e,n);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(li(ko,r),0==(2&t.mode))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;null!==n;)null!==(e=n.alternate)&&null===Fo(e)&&(i=n),n=n.sibling;null===(n=i)?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Wa(t,!1,i,n,o,t.lastEffect);break;case"backwards":for(n=null,i=t.child,t.child=null;null!==i;){if(null!==(e=i.alternate)&&null===Fo(e)){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Wa(t,!0,n,null,o,t.lastEffect);break;case"together":Wa(t,!1,null,null,void 0,t.lastEffect);break;default:t.memoizedState=null}return t.child}function Ja(e,t,n){null!==e&&(t.dependencies=e.dependencies);var r=t.expirationTime;if(0!==r&&au(r),t.childExpirationTime<n)return null;if(null!==e&&t.child!==e.child)throw Error(a(153));if(null!==t.child){for(n=Iu(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Iu(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function Ka(e,t){switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function qa(e,t,n){var r=t.pendingProps;switch(t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:return _i(t.type)&&Ei(),null;case 3:return Mo(),ui(fi),ui(di),(n=t.stateNode).pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),null!==e&&null!==e.child||!Aa(t)||(t.effectTag|=4),null;case 5:Do(t),n=Lo(wo.current);var o=t.type;if(null!==e&&null!=t.stateNode)Va(e,t,o,r,n),e.ref!==t.ref&&(t.effectTag|=128);else{if(!r){if(null===t.stateNode)throw Error(a(166));return null}if(e=Lo(No.current),Aa(t)){r=t.stateNode,o=t.type;var s=t.memoizedProps;switch(r[bn]=t,r[Rn]=s,o){case"iframe":case"object":case"embed":Qt("load",r);break;case"video":case"audio":for(e=0;e<qe.length;e++)Qt(qe[e],r);break;case"source":Qt("error",r);break;case"img":case"image":case"link":Qt("error",r),Qt("load",r);break;case"form":Qt("reset",r),Qt("submit",r);break;case"details":Qt("toggle",r);break;case"input":Se(r,s),Qt("invalid",r),un(n,"onChange");break;case"select":r._wrapperState={wasMultiple:!!s.multiple},Qt("invalid",r),un(n,"onChange");break;case"textarea":Le(r,s),Qt("invalid",r),un(n,"onChange")}for(var u in on(o,s),e=null,s)if(s.hasOwnProperty(u)){var l=s[u];"children"===u?"string"==typeof l?r.textContent!==l&&(e=["children",l]):"number"==typeof l&&r.textContent!==""+l&&(e=["children",""+l]):b.hasOwnProperty(u)&&null!=l&&un(n,u)}switch(o){case"input":ye(r),Ie(r,s,!0);break;case"textarea":ye(r),Me(r);break;case"select":case"option":break;default:"function"==typeof s.onClick&&(r.onclick=ln)}n=e,t.updateQueue=n,null!==n&&(t.effectTag|=4)}else{switch(u=9===n.nodeType?n:n.ownerDocument,e===sn&&(e=ke(o)),e===sn?"script"===o?((e=u.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"==typeof r.is?e=u.createElement(o,{is:r.is}):(e=u.createElement(o),"select"===o&&(u=e,r.multiple?u.multiple=!0:r.size&&(u.size=r.size))):e=u.createElementNS(e,o),e[bn]=t,e[Rn]=r,Ga(e,t),t.stateNode=e,u=an(o,r),o){case"iframe":case"object":case"embed":Qt("load",e),l=r;break;case"video":case"audio":for(l=0;l<qe.length;l++)Qt(qe[l],e);l=r;break;case"source":Qt("error",e),l=r;break;case"img":case"image":case"link":Qt("error",e),Qt("load",e),l=r;break;case"form":Qt("reset",e),Qt("submit",e),l=r;break;case"details":Qt("toggle",e),l=r;break;case"input":Se(e,r),l=Ce(e,r),Qt("invalid",e),un(n,"onChange");break;case"option":l=Ne(e,r);break;case"select":e._wrapperState={wasMultiple:!!r.multiple},l=i({},r,{value:void 0}),Qt("invalid",e),un(n,"onChange");break;case"textarea":Le(e,r),l=we(e,r),Qt("invalid",e),un(n,"onChange");break;default:l=r}on(o,l);var c=l;for(s in c)if(c.hasOwnProperty(s)){var d=c[s];"style"===s?nn(e,d):"dangerouslySetInnerHTML"===s?null!=(d=d?d.__html:void 0)&&He(e,d):"children"===s?"string"==typeof d?("textarea"!==o||""!==d)&&Ge(e,d):"number"==typeof d&&Ge(e,""+d):"suppressContentEditableWarning"!==s&&"suppressHydrationWarning"!==s&&"autoFocus"!==s&&(b.hasOwnProperty(s)?null!=d&&un(n,s):null!=d&&X(e,s,d,u))}switch(o){case"input":ye(e),Ie(e,r,!1);break;case"textarea":ye(e),Me(e);break;case"option":null!=r.value&&e.setAttribute("value",""+ge(r.value));break;case"select":e.multiple=!!r.multiple,null!=(n=r.value)?Oe(e,!!r.multiple,n,!1):null!=r.defaultValue&&Oe(e,!!r.multiple,r.defaultValue,!0);break;default:"function"==typeof l.onClick&&(e.onclick=ln)}mn(o,r)&&(t.effectTag|=4)}null!==t.ref&&(t.effectTag|=128)}return null;case 6:if(e&&null!=t.stateNode)Ba(0,t,e.memoizedProps,r);else{if("string"!=typeof r&&null===t.stateNode)throw Error(a(166));n=Lo(wo.current),Lo(No.current),Aa(t)?(n=t.stateNode,r=t.memoizedProps,n[bn]=t,n.nodeValue!==r&&(t.effectTag|=4)):((n=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[bn]=t,t.stateNode=n)}return null;case 13:return ui(ko),r=t.memoizedState,0!=(64&t.effectTag)?(t.expirationTime=n,t):(n=null!==r,r=!1,null===e?void 0!==t.memoizedProps.fallback&&Aa(t):(r=null!==(o=e.memoizedState),n||null===o||null!==(o=e.child.sibling)&&(null!==(s=t.firstEffect)?(t.firstEffect=o,o.nextEffect=s):(t.firstEffect=t.lastEffect=o,o.nextEffect=null),o.effectTag=8)),n&&!r&&0!=(2&t.mode)&&(null===e&&!0!==t.memoizedProps.unstable_avoidThisFallback||0!=(1&ko.current)?As===ys&&(As=Ts):(As!==ys&&As!==Ts||(As=Cs),0!==Ps&&null!==bs&&(Mu(bs,Is),Uu(bs,Ps)))),(n||r)&&(t.effectTag|=4),null);case 4:return Mo(),null;case 10:return eo(t),null;case 17:return _i(t.type)&&Ei(),null;case 19:if(ui(ko),null===(r=t.memoizedState))return null;if(o=0!=(64&t.effectTag),null===(s=r.rendering)){if(o)Ka(r,!1);else if(As!==ys||null!==e&&0!=(64&e.effectTag))for(s=t.child;null!==s;){if(null!==(e=Fo(s))){for(t.effectTag|=64,Ka(r,!1),null!==(o=e.updateQueue)&&(t.updateQueue=o,t.effectTag|=4),null===r.lastEffect&&(t.firstEffect=null),t.lastEffect=r.lastEffect,r=t.child;null!==r;)s=n,(o=r).effectTag&=2,o.nextEffect=null,o.firstEffect=null,o.lastEffect=null,null===(e=o.alternate)?(o.childExpirationTime=0,o.expirationTime=s,o.child=null,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null):(o.childExpirationTime=e.childExpirationTime,o.expirationTime=e.expirationTime,o.child=e.child,o.memoizedProps=e.memoizedProps,o.memoizedState=e.memoizedState,o.updateQueue=e.updateQueue,s=e.dependencies,o.dependencies=null===s?null:{expirationTime:s.expirationTime,firstContext:s.firstContext,responders:s.responders}),r=r.sibling;return li(ko,1&ko.current|2),t.child}s=s.sibling}}else{if(!o)if(null!==(e=Fo(s))){if(t.effectTag|=64,o=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.effectTag|=4),Ka(r,!0),null===r.tail&&"hidden"===r.tailMode&&!s.alternate)return null!==(t=t.lastEffect=r.lastEffect)&&(t.nextEffect=null),null}else 2*Hi()-r.renderingStartTime>r.tailExpiration&&1<n&&(t.effectTag|=64,o=!0,Ka(r,!1),t.expirationTime=t.childExpirationTime=n-1);r.isBackwards?(s.sibling=t.child,t.child=s):(null!==(n=r.last)?n.sibling=s:t.child=s,r.last=s)}return null!==r.tail?(0===r.tailExpiration&&(r.tailExpiration=Hi()+500),n=r.tail,r.rendering=n,r.tail=n.sibling,r.lastEffect=t.lastEffect,r.renderingStartTime=Hi(),n.sibling=null,t=ko.current,li(ko,o?1&t|2:1&t),n):null}throw Error(a(156,t.tag))}function Xa(e){switch(e.tag){case 1:_i(e.type)&&Ei();var t=e.effectTag;return 4096&t?(e.effectTag=-4097&t|64,e):null;case 3:if(Mo(),ui(fi),ui(di),0!=(64&(t=e.effectTag)))throw Error(a(285));return e.effectTag=-4097&t|64,e;case 5:return Do(e),null;case 13:return ui(ko),4096&(t=e.effectTag)?(e.effectTag=-4097&t|64,e):null;case 19:return ui(ko),null;case 4:return Mo(),null;case 10:return eo(e),null;default:return null}}function Za(e,t){return{value:e,source:t,stack:me(t)}}Ga=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Va=function(e,t,n,r,o){var a=e.memoizedProps;if(a!==r){var s,u,l=t.stateNode;switch(Lo(No.current),e=null,n){case"input":a=Ce(l,a),r=Ce(l,r),e=[];break;case"option":a=Ne(l,a),r=Ne(l,r),e=[];break;case"select":a=i({},a,{value:void 0}),r=i({},r,{value:void 0}),e=[];break;case"textarea":a=we(l,a),r=we(l,r),e=[];break;default:"function"!=typeof a.onClick&&"function"==typeof r.onClick&&(l.onclick=ln)}for(s in on(n,r),n=null,a)if(!r.hasOwnProperty(s)&&a.hasOwnProperty(s)&&null!=a[s])if("style"===s)for(u in l=a[s])l.hasOwnProperty(u)&&(n||(n={}),n[u]="");else"dangerouslySetInnerHTML"!==s&&"children"!==s&&"suppressContentEditableWarning"!==s&&"suppressHydrationWarning"!==s&&"autoFocus"!==s&&(b.hasOwnProperty(s)?e||(e=[]):(e=e||[]).push(s,null));for(s in r){var c=r[s];if(l=null!=a?a[s]:void 0,r.hasOwnProperty(s)&&c!==l&&(null!=c||null!=l))if("style"===s)if(l){for(u in l)!l.hasOwnProperty(u)||c&&c.hasOwnProperty(u)||(n||(n={}),n[u]="");for(u in c)c.hasOwnProperty(u)&&l[u]!==c[u]&&(n||(n={}),n[u]=c[u])}else n||(e||(e=[]),e.push(s,n)),n=c;else"dangerouslySetInnerHTML"===s?(c=c?c.__html:void 0,l=l?l.__html:void 0,null!=c&&l!==c&&(e=e||[]).push(s,c)):"children"===s?l===c||"string"!=typeof c&&"number"!=typeof c||(e=e||[]).push(s,""+c):"suppressContentEditableWarning"!==s&&"suppressHydrationWarning"!==s&&(b.hasOwnProperty(s)?(null!=c&&un(o,s),e||l===c||(e=[])):(e=e||[]).push(s,c))}n&&(e=e||[]).push("style",n),o=e,(t.updateQueue=o)&&(t.effectTag|=4)}},Ba=function(e,t,n,r){n!==r&&(t.effectTag|=4)};var $a="function"==typeof WeakSet?WeakSet:Set;function es(e,t){var n=t.source,r=t.stack;null===r&&null!==n&&(r=me(n)),null!==n&&Ee(n.type),t=t.value,null!==e&&1===e.tag&&Ee(e.type);try{console.error(t)}catch(e){setTimeout((function(){throw e}))}}function ts(e){var t=e.ref;if(null!==t)if("function"==typeof t)try{t(null)}catch(t){gu(e,t)}else t.current=null}function ns(e,t){switch(t.tag){case 0:case 11:case 15:case 22:return;case 1:if(256&t.effectTag&&null!==e){var n=e.memoizedProps,r=e.memoizedState;t=(e=t.stateNode).getSnapshotBeforeUpdate(t.elementType===t.type?n:Ji(t.type,n),r),e.__reactInternalSnapshotBeforeUpdate=t}return;case 3:case 5:case 6:case 4:case 17:return}throw Error(a(163))}function rs(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.destroy;n.destroy=void 0,void 0!==r&&r()}n=n.next}while(n!==t)}}function is(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function os(e,t,n){switch(n.tag){case 0:case 11:case 15:case 22:return void is(3,n);case 1:if(e=n.stateNode,4&n.effectTag)if(null===t)e.componentDidMount();else{var r=n.elementType===n.type?t.memoizedProps:Ji(n.type,t.memoizedProps);e.componentDidUpdate(r,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate)}return void(null!==(t=n.updateQueue)&&fo(n,t,e));case 3:if(null!==(t=n.updateQueue)){if(e=null,null!==n.child)switch(n.child.tag){case 5:e=n.child.stateNode;break;case 1:e=n.child.stateNode}fo(n,t,e)}return;case 5:return e=n.stateNode,void(null===t&&4&n.effectTag&&mn(n.type,n.memoizedProps)&&e.focus());case 6:case 4:case 12:return;case 13:return void(null===n.memoizedState&&(n=n.alternate,null!==n&&(n=n.memoizedState,null!==n&&(n=n.dehydrated,null!==n&&kt(n)))));case 19:case 17:case 20:case 21:return}throw Error(a(163))}function as(e,t,n){switch("function"==typeof Cu&&Cu(t),t.tag){case 0:case 11:case 14:case 15:case 22:if(null!==(e=t.updateQueue)&&null!==(e=e.lastEffect)){var r=e.next;Bi(97<n?97:n,(function(){var e=r;do{var n=e.destroy;if(void 0!==n){var i=t;try{n()}catch(e){gu(i,e)}}e=e.next}while(e!==r)}))}break;case 1:ts(t),"function"==typeof(n=t.stateNode).componentWillUnmount&&function(e,t){try{t.props=e.memoizedProps,t.state=e.memoizedState,t.componentWillUnmount()}catch(t){gu(e,t)}}(t,n);break;case 5:ts(t);break;case 4:cs(e,t,n)}}function ss(e){var t=e.alternate;e.return=null,e.child=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.alternate=null,e.firstEffect=null,e.lastEffect=null,e.pendingProps=null,e.memoizedProps=null,e.stateNode=null,null!==t&&ss(t)}function us(e){return 5===e.tag||3===e.tag||4===e.tag}function ls(e){e:{for(var t=e.return;null!==t;){if(us(t)){var n=t;break e}t=t.return}throw Error(a(160))}switch(t=n.stateNode,n.tag){case 5:var r=!1;break;case 3:case 4:t=t.containerInfo,r=!0;break;default:throw Error(a(161))}16&n.effectTag&&(Ge(t,""),n.effectTag&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||us(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag&&18!==n.tag;){if(2&n.effectTag)continue t;if(null===n.child||4===n.tag)continue t;n.child.return=n,n=n.child}if(!(2&n.effectTag)){n=n.stateNode;break e}}r?function e(t,n,r){var i=t.tag,o=5===i||6===i;if(o)t=o?t.stateNode:t.stateNode.instance,n?8===r.nodeType?r.parentNode.insertBefore(t,n):r.insertBefore(t,n):(8===r.nodeType?(n=r.parentNode).insertBefore(t,r):(n=r).appendChild(t),null!==(r=r._reactRootContainer)&&void 0!==r||null!==n.onclick||(n.onclick=ln));else if(4!==i&&null!==(t=t.child))for(e(t,n,r),t=t.sibling;null!==t;)e(t,n,r),t=t.sibling}(e,n,t):function e(t,n,r){var i=t.tag,o=5===i||6===i;if(o)t=o?t.stateNode:t.stateNode.instance,n?r.insertBefore(t,n):r.appendChild(t);else if(4!==i&&null!==(t=t.child))for(e(t,n,r),t=t.sibling;null!==t;)e(t,n,r),t=t.sibling}(e,n,t)}function cs(e,t,n){for(var r,i,o=t,s=!1;;){if(!s){s=o.return;e:for(;;){if(null===s)throw Error(a(160));switch(r=s.stateNode,s.tag){case 5:i=!1;break e;case 3:case 4:r=r.containerInfo,i=!0;break e}s=s.return}s=!0}if(5===o.tag||6===o.tag){e:for(var u=e,l=o,c=n,d=l;;)if(as(u,d,c),null!==d.child&&4!==d.tag)d.child.return=d,d=d.child;else{if(d===l)break e;for(;null===d.sibling;){if(null===d.return||d.return===l)break e;d=d.return}d.sibling.return=d.return,d=d.sibling}i?(u=r,l=o.stateNode,8===u.nodeType?u.parentNode.removeChild(l):u.removeChild(l)):r.removeChild(o.stateNode)}else if(4===o.tag){if(null!==o.child){r=o.stateNode.containerInfo,i=!0,o.child.return=o,o=o.child;continue}}else if(as(e,o,n),null!==o.child){o.child.return=o,o=o.child;continue}if(o===t)break;for(;null===o.sibling;){if(null===o.return||o.return===t)return;4===(o=o.return).tag&&(s=!1)}o.sibling.return=o.return,o=o.sibling}}function ds(e,t){switch(t.tag){case 0:case 11:case 14:case 15:case 22:return void rs(3,t);case 1:return;case 5:var n=t.stateNode;if(null!=n){var r=t.memoizedProps,i=null!==e?e.memoizedProps:r;e=t.type;var o=t.updateQueue;if(t.updateQueue=null,null!==o){for(n[Rn]=r,"input"===e&&"radio"===r.type&&null!=r.name&&be(n,r),an(e,i),t=an(e,r),i=0;i<o.length;i+=2){var s=o[i],u=o[i+1];"style"===s?nn(n,u):"dangerouslySetInnerHTML"===s?He(n,u):"children"===s?Ge(n,u):X(n,s,u,t)}switch(e){case"input":Re(n,r);break;case"textarea":Pe(n,r);break;case"select":t=n._wrapperState.wasMultiple,n._wrapperState.wasMultiple=!!r.multiple,null!=(e=r.value)?Oe(n,!!r.multiple,e,!1):t!==!!r.multiple&&(null!=r.defaultValue?Oe(n,!!r.multiple,r.defaultValue,!0):Oe(n,!!r.multiple,r.multiple?[]:"",!1))}}}return;case 6:if(null===t.stateNode)throw Error(a(162));return void(t.stateNode.nodeValue=t.memoizedProps);case 3:return void((t=t.stateNode).hydrate&&(t.hydrate=!1,kt(t.containerInfo)));case 12:return;case 13:if(n=t,null===t.memoizedState?r=!1:(r=!0,n=t.child,Us=Hi()),null!==n)e:for(e=n;;){if(5===e.tag)o=e.stateNode,r?"function"==typeof(o=o.style).setProperty?o.setProperty("display","none","important"):o.display="none":(o=e.stateNode,i=null!=(i=e.memoizedProps.style)&&i.hasOwnProperty("display")?i.display:null,o.style.display=tn("display",i));else if(6===e.tag)e.stateNode.nodeValue=r?"":e.memoizedProps;else{if(13===e.tag&&null!==e.memoizedState&&null===e.memoizedState.dehydrated){(o=e.child.sibling).return=e,e=o;continue}if(null!==e.child){e.child.return=e,e=e.child;continue}}if(e===n)break;for(;null===e.sibling;){if(null===e.return||e.return===n)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}return void fs(t);case 19:return void fs(t);case 17:return}throw Error(a(163))}function fs(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new $a),t.forEach((function(t){var r=yu.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}var hs="function"==typeof WeakMap?WeakMap:Map;function ps(e,t,n){(n=so(n,null)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){ks||(ks=!0,Fs=r),es(e,t)},n}function _s(e,t,n){(n=so(n,null)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var i=t.value;n.payload=function(){return es(e,t),r(i)}}var o=e.stateNode;return null!==o&&"function"==typeof o.componentDidCatch&&(n.callback=function(){"function"!=typeof r&&(null===xs?xs=new Set([this]):xs.add(this),es(e,t));var n=t.stack;this.componentDidCatch(t.value,{componentStack:null!==n?n:""})}),n}var Es,ms=Math.ceil,gs=q.ReactCurrentDispatcher,vs=q.ReactCurrentOwner,ys=0,Ts=3,Cs=4,Ss=0,bs=null,Rs=null,Is=0,As=ys,Ns=null,Os=1073741823,ws=1073741823,Ls=null,Ps=0,Ms=!1,Us=0,Ds=null,ks=!1,Fs=null,xs=null,Hs=!1,Gs=null,Vs=90,Bs=null,js=0,zs=null,Ys=0;function Ws(){return 0!=(48&Ss)?1073741821-(Hi()/10|0):0!==Ys?Ys:Ys=1073741821-(Hi()/10|0)}function Qs(e,t,n){if(0==(2&(t=t.mode)))return 1073741823;var r=Gi();if(0==(4&t))return 99===r?1073741823:1073741822;if(0!=(16&Ss))return Is;if(null!==n)e=Qi(e,0|n.timeoutMs||5e3,250);else switch(r){case 99:e=1073741823;break;case 98:e=Qi(e,150,100);break;case 97:case 96:e=Qi(e,5e3,250);break;case 95:e=2;break;default:throw Error(a(326))}return null!==bs&&e===Is&&--e,e}function Js(e,t){if(50<js)throw js=0,zs=null,Error(a(185));if(null!==(e=Ks(e,t))){var n=Gi();1073741823===t?0!=(8&Ss)&&0==(48&Ss)?$s(e):(Xs(e),0===Ss&&Yi()):Xs(e),0==(4&Ss)||98!==n&&99!==n||(null===Bs?Bs=new Map([[e,t]]):(void 0===(n=Bs.get(e))||n>t)&&Bs.set(e,t))}}function Ks(e,t){e.expirationTime<t&&(e.expirationTime=t);var n=e.alternate;null!==n&&n.expirationTime<t&&(n.expirationTime=t);var r=e.return,i=null;if(null===r&&3===e.tag)i=e.stateNode;else for(;null!==r;){if(n=r.alternate,r.childExpirationTime<t&&(r.childExpirationTime=t),null!==n&&n.childExpirationTime<t&&(n.childExpirationTime=t),null===r.return&&3===r.tag){i=r.stateNode;break}r=r.return}return null!==i&&(bs===i&&(au(t),As===Cs&&Mu(i,Is)),Uu(i,t)),i}function qs(e){var t=e.lastExpiredTime;if(0!==t)return t;if(!Pu(e,t=e.firstPendingTime))return t;var n=e.lastPingedTime;return 2>=(e=n>(e=e.nextKnownPendingLevel)?n:e)&&t!==e?0:e}function Xs(e){if(0!==e.lastExpiredTime)e.callbackExpirationTime=1073741823,e.callbackPriority=99,e.callbackNode=zi($s.bind(null,e));else{var t=qs(e),n=e.callbackNode;if(0===t)null!==n&&(e.callbackNode=null,e.callbackExpirationTime=0,e.callbackPriority=90);else{var r=Ws();if(1073741823===t?r=99:1===t||2===t?r=95:r=0>=(r=10*(1073741821-t)-10*(1073741821-r))?99:250>=r?98:5250>=r?97:95,null!==n){var i=e.callbackPriority;if(e.callbackExpirationTime===t&&i>=r)return;n!==Pi&&Si(n)}e.callbackExpirationTime=t,e.callbackPriority=r,t=1073741823===t?zi($s.bind(null,e)):ji(r,Zs.bind(null,e),{timeout:10*(1073741821-t)-Hi()}),e.callbackNode=t}}}function Zs(e,t){if(Ys=0,t)return Du(e,t=Ws()),Xs(e),null;var n=qs(e);if(0!==n){if(t=e.callbackNode,0!=(48&Ss))throw Error(a(327));if(_u(),e===bs&&n===Is||nu(e,n),null!==Rs){var r=Ss;Ss|=16;for(var i=iu();;)try{uu();break}catch(t){ru(e,t)}if($i(),Ss=r,gs.current=i,1===As)throw t=Ns,nu(e,n),Mu(e,n),Xs(e),t;if(null===Rs)switch(i=e.finishedWork=e.current.alternate,e.finishedExpirationTime=n,r=As,bs=null,r){case ys:case 1:throw Error(a(345));case 2:Du(e,2<n?2:n);break;case Ts:if(Mu(e,n),n===(r=e.lastSuspendedTime)&&(e.nextKnownPendingLevel=du(i)),1073741823===Os&&10<(i=Us+500-Hi())){if(Ms){var o=e.lastPingedTime;if(0===o||o>=n){e.lastPingedTime=n,nu(e,n);break}}if(0!==(o=qs(e))&&o!==n)break;if(0!==r&&r!==n){e.lastPingedTime=r;break}e.timeoutHandle=vn(fu.bind(null,e),i);break}fu(e);break;case Cs:if(Mu(e,n),n===(r=e.lastSuspendedTime)&&(e.nextKnownPendingLevel=du(i)),Ms&&(0===(i=e.lastPingedTime)||i>=n)){e.lastPingedTime=n,nu(e,n);break}if(0!==(i=qs(e))&&i!==n)break;if(0!==r&&r!==n){e.lastPingedTime=r;break}if(1073741823!==ws?r=10*(1073741821-ws)-Hi():1073741823===Os?r=0:(r=10*(1073741821-Os)-5e3,0>(r=(i=Hi())-r)&&(r=0),(n=10*(1073741821-n)-i)<(r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*ms(r/1960))-r)&&(r=n)),10<r){e.timeoutHandle=vn(fu.bind(null,e),r);break}fu(e);break;case 5:if(1073741823!==Os&&null!==Ls){o=Os;var s=Ls;if(0>=(r=0|s.busyMinDurationMs)?r=0:(i=0|s.busyDelayMs,r=(o=Hi()-(10*(1073741821-o)-(0|s.timeoutMs||5e3)))<=i?0:i+r-o),10<r){Mu(e,n),e.timeoutHandle=vn(fu.bind(null,e),r);break}}fu(e);break;default:throw Error(a(329))}if(Xs(e),e.callbackNode===t)return Zs.bind(null,e)}}return null}function $s(e){var t=e.lastExpiredTime;if(t=0!==t?t:1073741823,0!=(48&Ss))throw Error(a(327));if(_u(),e===bs&&t===Is||nu(e,t),null!==Rs){var n=Ss;Ss|=16;for(var r=iu();;)try{su();break}catch(t){ru(e,t)}if($i(),Ss=n,gs.current=r,1===As)throw n=Ns,nu(e,t),Mu(e,t),Xs(e),n;if(null!==Rs)throw Error(a(261));e.finishedWork=e.current.alternate,e.finishedExpirationTime=t,bs=null,fu(e),Xs(e)}return null}function eu(e,t){var n=Ss;Ss|=1;try{return e(t)}finally{0===(Ss=n)&&Yi()}}function tu(e,t){var n=Ss;Ss&=-2,Ss|=8;try{return e(t)}finally{0===(Ss=n)&&Yi()}}function nu(e,t){e.finishedWork=null,e.finishedExpirationTime=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,yn(n)),null!==Rs)for(n=Rs.return;null!==n;){var r=n;switch(r.tag){case 1:null!=(r=r.type.childContextTypes)&&Ei();break;case 3:Mo(),ui(fi),ui(di);break;case 5:Do(r);break;case 4:Mo();break;case 13:case 19:ui(ko);break;case 10:eo(r)}n=n.return}bs=e,Rs=Iu(e.current,null),Is=t,As=ys,Ns=null,ws=Os=1073741823,Ls=null,Ps=0,Ms=!1}function ru(e,t){for(;;){try{if($i(),Ho.current=Ea,Yo)for(var n=Bo.memoizedState;null!==n;){var r=n.queue;null!==r&&(r.pending=null),n=n.next}if(Vo=0,zo=jo=Bo=null,Yo=!1,null===Rs||null===Rs.return)return As=1,Ns=t,Rs=null;e:{var i=e,o=Rs.return,a=Rs,s=t;if(t=Is,a.effectTag|=2048,a.firstEffect=a.lastEffect=null,null!==s&&"object"==typeof s&&"function"==typeof s.then){var u=s;if(0==(2&a.mode)){var l=a.alternate;l?(a.updateQueue=l.updateQueue,a.memoizedState=l.memoizedState,a.expirationTime=l.expirationTime):(a.updateQueue=null,a.memoizedState=null)}var c=0!=(1&ko.current),d=o;do{var f;if(f=13===d.tag){var h=d.memoizedState;if(null!==h)f=null!==h.dehydrated;else{var p=d.memoizedProps;f=void 0!==p.fallback&&(!0!==p.unstable_avoidThisFallback||!c)}}if(f){var _=d.updateQueue;if(null===_){var E=new Set;E.add(u),d.updateQueue=E}else _.add(u);if(0==(2&d.mode)){if(d.effectTag|=64,a.effectTag&=-2981,1===a.tag)if(null===a.alternate)a.tag=17;else{var m=so(1073741823,null);m.tag=2,uo(a,m)}a.expirationTime=1073741823;break e}s=void 0,a=t;var g=i.pingCache;if(null===g?(g=i.pingCache=new hs,s=new Set,g.set(u,s)):void 0===(s=g.get(u))&&(s=new Set,g.set(u,s)),!s.has(a)){s.add(a);var v=vu.bind(null,i,u,a);u.then(v,v)}d.effectTag|=4096,d.expirationTime=t;break e}d=d.return}while(null!==d);s=Error((Ee(a.type)||"A React component")+" suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display."+me(a))}5!==As&&(As=2),s=Za(s,a),d=o;do{switch(d.tag){case 3:u=s,d.effectTag|=4096,d.expirationTime=t,lo(d,ps(d,u,t));break e;case 1:u=s;var y=d.type,T=d.stateNode;if(0==(64&d.effectTag)&&("function"==typeof y.getDerivedStateFromError||null!==T&&"function"==typeof T.componentDidCatch&&(null===xs||!xs.has(T)))){d.effectTag|=4096,d.expirationTime=t,lo(d,_s(d,u,t));break e}}d=d.return}while(null!==d)}Rs=cu(Rs)}catch(e){t=e;continue}break}}function iu(){var e=gs.current;return gs.current=Ea,null===e?Ea:e}function ou(e,t){e<Os&&2<e&&(Os=e),null!==t&&e<ws&&2<e&&(ws=e,Ls=t)}function au(e){e>Ps&&(Ps=e)}function su(){for(;null!==Rs;)Rs=lu(Rs)}function uu(){for(;null!==Rs&&!Mi();)Rs=lu(Rs)}function lu(e){var t=Es(e.alternate,e,Is);return e.memoizedProps=e.pendingProps,null===t&&(t=cu(e)),vs.current=null,t}function cu(e){Rs=e;do{var t=Rs.alternate;if(e=Rs.return,0==(2048&Rs.effectTag)){if(t=qa(t,Rs,Is),1===Is||1!==Rs.childExpirationTime){for(var n=0,r=Rs.child;null!==r;){var i=r.expirationTime,o=r.childExpirationTime;i>n&&(n=i),o>n&&(n=o),r=r.sibling}Rs.childExpirationTime=n}if(null!==t)return t;null!==e&&0==(2048&e.effectTag)&&(null===e.firstEffect&&(e.firstEffect=Rs.firstEffect),null!==Rs.lastEffect&&(null!==e.lastEffect&&(e.lastEffect.nextEffect=Rs.firstEffect),e.lastEffect=Rs.lastEffect),1<Rs.effectTag&&(null!==e.lastEffect?e.lastEffect.nextEffect=Rs:e.firstEffect=Rs,e.lastEffect=Rs))}else{if(null!==(t=Xa(Rs)))return t.effectTag&=2047,t;null!==e&&(e.firstEffect=e.lastEffect=null,e.effectTag|=2048)}if(null!==(t=Rs.sibling))return t;Rs=e}while(null!==Rs);return As===ys&&(As=5),null}function du(e){var t=e.expirationTime;return t>(e=e.childExpirationTime)?t:e}function fu(e){var t=Gi();return Bi(99,hu.bind(null,e,t)),null}function hu(e,t){do{_u()}while(null!==Gs);if(0!=(48&Ss))throw Error(a(327));var n=e.finishedWork,r=e.finishedExpirationTime;if(null===n)return null;if(e.finishedWork=null,e.finishedExpirationTime=0,n===e.current)throw Error(a(177));e.callbackNode=null,e.callbackExpirationTime=0,e.callbackPriority=90,e.nextKnownPendingLevel=0;var i=du(n);if(e.firstPendingTime=i,r<=e.lastSuspendedTime?e.firstSuspendedTime=e.lastSuspendedTime=e.nextKnownPendingLevel=0:r<=e.firstSuspendedTime&&(e.firstSuspendedTime=r-1),r<=e.lastPingedTime&&(e.lastPingedTime=0),r<=e.lastExpiredTime&&(e.lastExpiredTime=0),e===bs&&(Rs=bs=null,Is=0),1<n.effectTag?null!==n.lastEffect?(n.lastEffect.nextEffect=n,i=n.firstEffect):i=n:i=n.firstEffect,null!==i){var o=Ss;Ss|=32,vs.current=null,_n=Wt;var s=hn();if(pn(s)){if("selectionStart"in s)var u={start:s.selectionStart,end:s.selectionEnd};else e:{var l=(u=(u=s.ownerDocument)&&u.defaultView||window).getSelection&&u.getSelection();if(l&&0!==l.rangeCount){u=l.anchorNode;var c=l.anchorOffset,d=l.focusNode;l=l.focusOffset;try{u.nodeType,d.nodeType}catch(e){u=null;break e}var f=0,h=-1,p=-1,_=0,E=0,m=s,g=null;t:for(;;){for(var v;m!==u||0!==c&&3!==m.nodeType||(h=f+c),m!==d||0!==l&&3!==m.nodeType||(p=f+l),3===m.nodeType&&(f+=m.nodeValue.length),null!==(v=m.firstChild);)g=m,m=v;for(;;){if(m===s)break t;if(g===u&&++_===c&&(h=f),g===d&&++E===l&&(p=f),null!==(v=m.nextSibling))break;g=(m=g).parentNode}m=v}u=-1===h||-1===p?null:{start:h,end:p}}else u=null}u=u||{start:0,end:0}}else u=null;En={activeElementDetached:null,focusedElem:s,selectionRange:u},Wt=!1,Ds=i;do{try{pu()}catch(e){if(null===Ds)throw Error(a(330));gu(Ds,e),Ds=Ds.nextEffect}}while(null!==Ds);Ds=i;do{try{for(s=e,u=t;null!==Ds;){var y=Ds.effectTag;if(16&y&&Ge(Ds.stateNode,""),128&y){var T=Ds.alternate;if(null!==T){var C=T.ref;null!==C&&("function"==typeof C?C(null):C.current=null)}}switch(1038&y){case 2:ls(Ds),Ds.effectTag&=-3;break;case 6:ls(Ds),Ds.effectTag&=-3,ds(Ds.alternate,Ds);break;case 1024:Ds.effectTag&=-1025;break;case 1028:Ds.effectTag&=-1025,ds(Ds.alternate,Ds);break;case 4:ds(Ds.alternate,Ds);break;case 8:cs(s,c=Ds,u),ss(c)}Ds=Ds.nextEffect}}catch(e){if(null===Ds)throw Error(a(330));gu(Ds,e),Ds=Ds.nextEffect}}while(null!==Ds);if(C=En,T=hn(),y=C.focusedElem,u=C.selectionRange,T!==y&&y&&y.ownerDocument&&function e(t,n){return!(!t||!n)&&(t===n||(!t||3!==t.nodeType)&&(n&&3===n.nodeType?e(t,n.parentNode):"contains"in t?t.contains(n):!!t.compareDocumentPosition&&!!(16&t.compareDocumentPosition(n))))}(y.ownerDocument.documentElement,y)){null!==u&&pn(y)&&(T=u.start,void 0===(C=u.end)&&(C=T),"selectionStart"in y?(y.selectionStart=T,y.selectionEnd=Math.min(C,y.value.length)):(C=(T=y.ownerDocument||document)&&T.defaultView||window).getSelection&&(C=C.getSelection(),c=y.textContent.length,s=Math.min(u.start,c),u=void 0===u.end?s:Math.min(u.end,c),!C.extend&&s>u&&(c=u,u=s,s=c),c=fn(y,s),d=fn(y,u),c&&d&&(1!==C.rangeCount||C.anchorNode!==c.node||C.anchorOffset!==c.offset||C.focusNode!==d.node||C.focusOffset!==d.offset)&&((T=T.createRange()).setStart(c.node,c.offset),C.removeAllRanges(),s>u?(C.addRange(T),C.extend(d.node,d.offset)):(T.setEnd(d.node,d.offset),C.addRange(T))))),T=[];for(C=y;C=C.parentNode;)1===C.nodeType&&T.push({element:C,left:C.scrollLeft,top:C.scrollTop});for("function"==typeof y.focus&&y.focus(),y=0;y<T.length;y++)(C=T[y]).element.scrollLeft=C.left,C.element.scrollTop=C.top}Wt=!!_n,En=_n=null,e.current=n,Ds=i;do{try{for(y=e;null!==Ds;){var S=Ds.effectTag;if(36&S&&os(y,Ds.alternate,Ds),128&S){T=void 0;var b=Ds.ref;if(null!==b){var R=Ds.stateNode;switch(Ds.tag){case 5:T=R;break;default:T=R}"function"==typeof b?b(T):b.current=T}}Ds=Ds.nextEffect}}catch(e){if(null===Ds)throw Error(a(330));gu(Ds,e),Ds=Ds.nextEffect}}while(null!==Ds);Ds=null,Ui(),Ss=o}else e.current=n;if(Hs)Hs=!1,Gs=e,Vs=t;else for(Ds=i;null!==Ds;)t=Ds.nextEffect,Ds.nextEffect=null,Ds=t;if(0===(t=e.firstPendingTime)&&(xs=null),1073741823===t?e===zs?js++:(js=0,zs=e):js=0,"function"==typeof Tu&&Tu(n.stateNode,r),Xs(e),ks)throw ks=!1,e=Fs,Fs=null,e;return 0!=(8&Ss)||Yi(),null}function pu(){for(;null!==Ds;){var e=Ds.effectTag;0!=(256&e)&&ns(Ds.alternate,Ds),0==(512&e)||Hs||(Hs=!0,ji(97,(function(){return _u(),null}))),Ds=Ds.nextEffect}}function _u(){if(90!==Vs){var e=97<Vs?97:Vs;return Vs=90,Bi(e,Eu)}}function Eu(){if(null===Gs)return!1;var e=Gs;if(Gs=null,0!=(48&Ss))throw Error(a(331));var t=Ss;for(Ss|=32,e=e.current.firstEffect;null!==e;){try{var n=e;if(0!=(512&n.effectTag))switch(n.tag){case 0:case 11:case 15:case 22:rs(5,n),is(5,n)}}catch(t){if(null===e)throw Error(a(330));gu(e,t)}n=e.nextEffect,e.nextEffect=null,e=n}return Ss=t,Yi(),!0}function mu(e,t,n){uo(e,t=ps(e,t=Za(n,t),1073741823)),null!==(e=Ks(e,1073741823))&&Xs(e)}function gu(e,t){if(3===e.tag)mu(e,e,t);else for(var n=e.return;null!==n;){if(3===n.tag){mu(n,e,t);break}if(1===n.tag){var r=n.stateNode;if("function"==typeof n.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===xs||!xs.has(r))){uo(n,e=_s(n,e=Za(t,e),1073741823)),null!==(n=Ks(n,1073741823))&&Xs(n);break}}n=n.return}}function vu(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),bs===e&&Is===n?As===Cs||As===Ts&&1073741823===Os&&Hi()-Us<500?nu(e,Is):Ms=!0:Pu(e,n)&&(0!==(t=e.lastPingedTime)&&t<n||(e.lastPingedTime=n,Xs(e)))}function yu(e,t){var n=e.stateNode;null!==n&&n.delete(t),0===(t=0)&&(t=Qs(t=Ws(),e,null)),null!==(e=Ks(e,t))&&Xs(e)}Es=function(e,t,n){var r=t.expirationTime;if(null!==e){var i=t.pendingProps;if(e.memoizedProps!==i||fi.current)wa=!0;else{if(r<n){switch(wa=!1,t.tag){case 3:Ha(t),Na();break;case 5:if(Uo(t),4&t.mode&&1!==n&&i.hidden)return t.expirationTime=t.childExpirationTime=1,null;break;case 1:_i(t.type)&&vi(t);break;case 4:Po(t,t.stateNode.containerInfo);break;case 10:r=t.memoizedProps.value,i=t.type._context,li(Ki,i._currentValue),i._currentValue=r;break;case 13:if(null!==t.memoizedState)return 0!==(r=t.child.childExpirationTime)&&r>=n?za(e,t,n):(li(ko,1&ko.current),null!==(t=Ja(e,t,n))?t.sibling:null);li(ko,1&ko.current);break;case 19:if(r=t.childExpirationTime>=n,0!=(64&e.effectTag)){if(r)return Qa(e,t,n);t.effectTag|=64}if(null!==(i=t.memoizedState)&&(i.rendering=null,i.tail=null),li(ko,ko.current),!r)return null}return Ja(e,t,n)}wa=!1}}else wa=!1;switch(t.expirationTime=0,t.tag){case 2:if(r=t.type,null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),e=t.pendingProps,i=pi(t,di.current),no(t,n),i=Jo(null,t,r,e,i,n),t.effectTag|=1,"object"==typeof i&&null!==i&&"function"==typeof i.render&&void 0===i.$$typeof){if(t.tag=1,t.memoizedState=null,t.updateQueue=null,_i(r)){var o=!0;vi(t)}else o=!1;t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,oo(t);var s=r.getDerivedStateFromProps;"function"==typeof s&&_o(t,r,s,e),i.updater=Eo,t.stateNode=i,i._reactInternalFiber=t,yo(t,r,e,n),t=xa(null,t,r,!0,o,n)}else t.tag=0,La(null,t,i,n),t=t.child;return t;case 16:e:{if(i=t.elementType,null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),e=t.pendingProps,function(e){if(-1===e._status){e._status=0;var t=e._ctor;t=t(),e._result=t,t.then((function(t){0===e._status&&(t=t.default,e._status=1,e._result=t)}),(function(t){0===e._status&&(e._status=2,e._result=t)}))}}(i),1!==i._status)throw i._result;switch(i=i._result,t.type=i,o=t.tag=function(e){if("function"==typeof e)return Ru(e)?1:0;if(null!=e){if((e=e.$$typeof)===ue)return 11;if(e===de)return 14}return 2}(i),e=Ji(i,e),o){case 0:t=ka(null,t,i,e,n);break e;case 1:t=Fa(null,t,i,e,n);break e;case 11:t=Pa(null,t,i,e,n);break e;case 14:t=Ma(null,t,i,Ji(i.type,e),r,n);break e}throw Error(a(306,i,""))}return t;case 0:return r=t.type,i=t.pendingProps,ka(e,t,r,i=t.elementType===r?i:Ji(r,i),n);case 1:return r=t.type,i=t.pendingProps,Fa(e,t,r,i=t.elementType===r?i:Ji(r,i),n);case 3:if(Ha(t),r=t.updateQueue,null===e||null===r)throw Error(a(282));if(r=t.pendingProps,i=null!==(i=t.memoizedState)?i.element:null,ao(e,t),co(t,r,null,n),(r=t.memoizedState.element)===i)Na(),t=Ja(e,t,n);else{if((i=t.stateNode.hydrate)&&(Ta=Tn(t.stateNode.containerInfo.firstChild),ya=t,i=Ca=!0),i)for(n=Io(t,null,r,n),t.child=n;n;)n.effectTag=-3&n.effectTag|1024,n=n.sibling;else La(e,t,r,n),Na();t=t.child}return t;case 5:return Uo(t),null===e&&Ra(t),r=t.type,i=t.pendingProps,o=null!==e?e.memoizedProps:null,s=i.children,gn(r,i)?s=null:null!==o&&gn(r,o)&&(t.effectTag|=16),Da(e,t),4&t.mode&&1!==n&&i.hidden?(t.expirationTime=t.childExpirationTime=1,t=null):(La(e,t,s,n),t=t.child),t;case 6:return null===e&&Ra(t),null;case 13:return za(e,t,n);case 4:return Po(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=Ro(t,null,r,n):La(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,Pa(e,t,r,i=t.elementType===r?i:Ji(r,i),n);case 7:return La(e,t,t.pendingProps,n),t.child;case 8:case 12:return La(e,t,t.pendingProps.children,n),t.child;case 10:e:{r=t.type._context,i=t.pendingProps,s=t.memoizedProps,o=i.value;var u=t.type._context;if(li(Ki,u._currentValue),u._currentValue=o,null!==s)if(u=s.value,0===(o=Fr(u,o)?0:0|("function"==typeof r._calculateChangedBits?r._calculateChangedBits(u,o):1073741823))){if(s.children===i.children&&!fi.current){t=Ja(e,t,n);break e}}else for(null!==(u=t.child)&&(u.return=t);null!==u;){var l=u.dependencies;if(null!==l){s=u.child;for(var c=l.firstContext;null!==c;){if(c.context===r&&0!=(c.observedBits&o)){1===u.tag&&((c=so(n,null)).tag=2,uo(u,c)),u.expirationTime<n&&(u.expirationTime=n),null!==(c=u.alternate)&&c.expirationTime<n&&(c.expirationTime=n),to(u.return,n),l.expirationTime<n&&(l.expirationTime=n);break}c=c.next}}else s=10===u.tag&&u.type===t.type?null:u.child;if(null!==s)s.return=u;else for(s=u;null!==s;){if(s===t){s=null;break}if(null!==(u=s.sibling)){u.return=s.return,s=u;break}s=s.return}u=s}La(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=(o=t.pendingProps).children,no(t,n),r=r(i=ro(i,o.unstable_observedBits)),t.effectTag|=1,La(e,t,r,n),t.child;case 14:return o=Ji(i=t.type,t.pendingProps),Ma(e,t,i,o=Ji(i.type,o),r,n);case 15:return Ua(e,t,t.type,t.pendingProps,r,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ji(r,i),null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),t.tag=1,_i(r)?(e=!0,vi(t)):e=!1,no(t,n),go(t,r,i),yo(t,r,i,n),xa(null,t,r,!0,e,n);case 19:return Qa(e,t,n)}throw Error(a(156,t.tag))};var Tu=null,Cu=null;function Su(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.effectTag=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childExpirationTime=this.expirationTime=0,this.alternate=null}function bu(e,t,n,r){return new Su(e,t,n,r)}function Ru(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Iu(e,t){var n=e.alternate;return null===n?((n=bu(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.effectTag=0,n.nextEffect=null,n.firstEffect=null,n.lastEffect=null),n.childExpirationTime=e.childExpirationTime,n.expirationTime=e.expirationTime,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{expirationTime:t.expirationTime,firstContext:t.firstContext,responders:t.responders},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Au(e,t,n,r,i,o){var s=2;if(r=e,"function"==typeof e)Ru(e)&&(s=1);else if("string"==typeof e)s=5;else e:switch(e){case ne:return Nu(n.children,i,o,t);case se:s=8,i|=7;break;case re:s=8,i|=1;break;case ie:return(e=bu(12,n,t,8|i)).elementType=ie,e.type=ie,e.expirationTime=o,e;case le:return(e=bu(13,n,t,i)).type=le,e.elementType=le,e.expirationTime=o,e;case ce:return(e=bu(19,n,t,i)).elementType=ce,e.expirationTime=o,e;default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case oe:s=10;break e;case ae:s=9;break e;case ue:s=11;break e;case de:s=14;break e;case fe:s=16,r=null;break e;case he:s=22;break e}throw Error(a(130,null==e?e:typeof e,""))}return(t=bu(s,n,t,i)).elementType=e,t.type=r,t.expirationTime=o,t}function Nu(e,t,n,r){return(e=bu(7,e,r,t)).expirationTime=n,e}function Ou(e,t,n){return(e=bu(6,e,null,t)).expirationTime=n,e}function wu(e,t,n){return(t=bu(4,null!==e.children?e.children:[],e.key,t)).expirationTime=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Lu(e,t,n){this.tag=t,this.current=null,this.containerInfo=e,this.pingCache=this.pendingChildren=null,this.finishedExpirationTime=0,this.finishedWork=null,this.timeoutHandle=-1,this.pendingContext=this.context=null,this.hydrate=n,this.callbackNode=null,this.callbackPriority=90,this.lastExpiredTime=this.lastPingedTime=this.nextKnownPendingLevel=this.lastSuspendedTime=this.firstSuspendedTime=this.firstPendingTime=0}function Pu(e,t){var n=e.firstSuspendedTime;return e=e.lastSuspendedTime,0!==n&&n>=t&&e<=t}function Mu(e,t){var n=e.firstSuspendedTime,r=e.lastSuspendedTime;n<t&&(e.firstSuspendedTime=t),(r>t||0===n)&&(e.lastSuspendedTime=t),t<=e.lastPingedTime&&(e.lastPingedTime=0),t<=e.lastExpiredTime&&(e.lastExpiredTime=0)}function Uu(e,t){t>e.firstPendingTime&&(e.firstPendingTime=t);var n=e.firstSuspendedTime;0!==n&&(t>=n?e.firstSuspendedTime=e.lastSuspendedTime=e.nextKnownPendingLevel=0:t>=e.lastSuspendedTime&&(e.lastSuspendedTime=t+1),t>e.nextKnownPendingLevel&&(e.nextKnownPendingLevel=t))}function Du(e,t){var n=e.lastExpiredTime;(0===n||n>t)&&(e.lastExpiredTime=t)}function ku(e,t,n,r){var i=t.current,o=Ws(),s=ho.suspense;o=Qs(o,i,s);e:if(n){t:{if($e(n=n._reactInternalFiber)!==n||1!==n.tag)throw Error(a(170));var u=n;do{switch(u.tag){case 3:u=u.stateNode.context;break t;case 1:if(_i(u.type)){u=u.stateNode.__reactInternalMemoizedMergedChildContext;break t}}u=u.return}while(null!==u);throw Error(a(171))}if(1===n.tag){var l=n.type;if(_i(l)){n=gi(n,l,u);break e}}n=u}else n=ci;return null===t.context?t.context=n:t.pendingContext=n,(t=so(o,s)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),uo(i,t),Js(i,o),o}function Fu(e){if(!(e=e.current).child)return null;switch(e.child.tag){case 5:default:return e.child.stateNode}}function xu(e,t){null!==(e=e.memoizedState)&&null!==e.dehydrated&&e.retryTime<t&&(e.retryTime=t)}function Hu(e,t){xu(e,t),(e=e.alternate)&&xu(e,t)}function Gu(e,t,n){var r=new Lu(e,t,n=null!=n&&!0===n.hydrate),i=bu(3,null,null,2===t?7:1===t?3:0);r.current=i,i.stateNode=r,oo(i),e[In]=r.current,n&&0!==t&&function(e,t){var n=Ze(t);It.forEach((function(e){pt(e,t,n)})),At.forEach((function(e){pt(e,t,n)}))}(0,9===e.nodeType?e:e.ownerDocument),this._internalRoot=r}function Vu(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function Bu(e,t,n,r,i){var o=n._reactRootContainer;if(o){var a=o._internalRoot;if("function"==typeof i){var s=i;i=function(){var e=Fu(a);s.call(e)}}ku(t,a,e,i)}else{if(o=n._reactRootContainer=function(e,t){if(t||(t=!(!(t=e?9===e.nodeType?e.documentElement:e.firstChild:null)||1!==t.nodeType||!t.hasAttribute("data-reactroot"))),!t)for(var n;n=e.lastChild;)e.removeChild(n);return new Gu(e,0,t?{hydrate:!0}:void 0)}(n,r),a=o._internalRoot,"function"==typeof i){var u=i;i=function(){var e=Fu(a);u.call(e)}}tu((function(){ku(t,a,e,i)}))}return Fu(a)}function ju(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:te,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}function zu(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Vu(t))throw Error(a(200));return ju(e,t,null,n)}Gu.prototype.render=function(e){ku(e,this._internalRoot,null,null)},Gu.prototype.unmount=function(){var e=this._internalRoot,t=e.containerInfo;ku(null,e,null,(function(){t[In]=null}))},_t=function(e){if(13===e.tag){var t=Qi(Ws(),150,100);Js(e,t),Hu(e,t)}},Et=function(e){13===e.tag&&(Js(e,3),Hu(e,3))},mt=function(e){if(13===e.tag){var t=Ws();Js(e,t=Qs(t,e,null)),Hu(e,t)}},N=function(e,t,n){switch(t){case"input":if(Re(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=wn(r);if(!i)throw Error(a(90));Te(r),Re(r,i)}}}break;case"textarea":Pe(e,n);break;case"select":null!=(t=n.value)&&Oe(e,!!n.multiple,t,!1)}},U=eu,D=function(e,t,n,r,i){var o=Ss;Ss|=4;try{return Bi(98,e.bind(null,t,n,r,i))}finally{0===(Ss=o)&&Yi()}},k=function(){0==(49&Ss)&&(function(){if(null!==Bs){var e=Bs;Bs=null,e.forEach((function(e,t){Du(t,e),Xs(t)})),Yi()}}(),_u())},F=function(e,t){var n=Ss;Ss|=2;try{return e(t)}finally{0===(Ss=n)&&Yi()}};var Yu,Wu,Qu={Events:[Nn,On,wn,I,S,Fn,function(e){it(e,kn)},P,M,Xt,st,_u,{current:!1}]};Wu=(Yu={findFiberByHostInstance:An,bundleType:0,version:"16.13.1",rendererPackageName:"react-dom"}).findFiberByHostInstance,function(e){if("undefined"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var t=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(t.isDisabled||!t.supportsFiber)return!0;try{var n=t.inject(e);Tu=function(e){try{t.onCommitFiberRoot(n,e,void 0,64==(64&e.current.effectTag))}catch(e){}},Cu=function(e){try{t.onCommitFiberUnmount(n,e)}catch(e){}}}catch(e){}}(i({},Yu,{overrideHookState:null,overrideProps:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:q.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=nt(e))?null:e.stateNode},findFiberByHostInstance:function(e){return Wu?Wu(e):null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null})),t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Qu,t.createPortal=zu,t.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternalFiber;if(void 0===t){if("function"==typeof e.render)throw Error(a(188));throw Error(a(268,Object.keys(e)))}return e=null===(e=nt(t))?null:e.stateNode},t.flushSync=function(e,t){if(0!=(48&Ss))throw Error(a(187));var n=Ss;Ss|=1;try{return Bi(99,e.bind(null,t))}finally{Ss=n,Yi()}},t.hydrate=function(e,t,n){if(!Vu(t))throw Error(a(200));return Bu(null,e,t,!0,n)},t.render=function(e,t,n){if(!Vu(t))throw Error(a(200));return Bu(null,e,t,!1,n)},t.unmountComponentAtNode=function(e){if(!Vu(e))throw Error(a(40));return!!e._reactRootContainer&&(tu((function(){Bu(null,null,e,!1,(function(){e._reactRootContainer=null,e[In]=null}))})),!0)},t.unstable_batchedUpdates=eu,t.unstable_createPortal=function(e,t){return zu(e,t,2<arguments.length&&void 0!==arguments[2]?arguments[2]:null)},t.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Vu(n))throw Error(a(200));if(null==e||void 0===e._reactInternalFiber)throw Error(a(38));return Bu(e,t,n,!1,r)},t.version="16.13.1"},function(e,t,n){"use strict";
  /*
  object-assign
  (c) Sindre Sorhus
  @license MIT
  */var r=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;function a(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,s,u=a(e),l=1;l<arguments.length;l++){for(var c in n=Object(arguments[l]))i.call(n,c)&&(u[c]=n[c]);if(r){s=r(n);for(var d=0;d<s.length;d++)o.call(n,s[d])&&(u[s[d]]=n[s[d]])}}return u}},function(e,t,n){"use strict";e.exports=n(197)},function(e,t,n){"use strict";
  /** @license React v0.19.1
   * scheduler.production.min.js
   *
   * Copyright (c) Facebook, Inc. and its affiliates.
   *
   * This source code is licensed under the MIT license found in the
   * LICENSE file in the root directory of this source tree.
   */var r,i,o,a,s;if("undefined"==typeof window||"function"!=typeof MessageChannel){var u=null,l=null,c=function(){if(null!==u)try{var e=t.unstable_now();u(!0,e),u=null}catch(e){throw setTimeout(c,0),e}},d=Date.now();t.unstable_now=function(){return Date.now()-d},r=function(e){null!==u?setTimeout(r,0,e):(u=e,setTimeout(c,0))},i=function(e,t){l=setTimeout(e,t)},o=function(){clearTimeout(l)},a=function(){return!1},s=t.unstable_forceFrameRate=function(){}}else{var f=window.performance,h=window.Date,p=window.setTimeout,_=window.clearTimeout;if("undefined"!=typeof console){var E=window.cancelAnimationFrame;"function"!=typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),"function"!=typeof E&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills")}if("object"==typeof f&&"function"==typeof f.now)t.unstable_now=function(){return f.now()};else{var m=h.now();t.unstable_now=function(){return h.now()-m}}var g=!1,v=null,y=-1,T=5,C=0;a=function(){return t.unstable_now()>=C},s=function(){},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing framerates higher than 125 fps is not unsupported"):T=0<e?Math.floor(1e3/e):5};var S=new MessageChannel,b=S.port2;S.port1.onmessage=function(){if(null!==v){var e=t.unstable_now();C=e+T;try{v(!0,e)?b.postMessage(null):(g=!1,v=null)}catch(e){throw b.postMessage(null),e}}else g=!1},r=function(e){v=e,g||(g=!0,b.postMessage(null))},i=function(e,n){y=p((function(){e(t.unstable_now())}),n)},o=function(){_(y),y=-1}}function R(e,t){var n=e.length;e.push(t);e:for(;;){var r=n-1>>>1,i=e[r];if(!(void 0!==i&&0<N(i,t)))break e;e[r]=t,e[n]=i,n=r}}function I(e){return void 0===(e=e[0])?null:e}function A(e){var t=e[0];if(void 0!==t){var n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,i=e.length;r<i;){var o=2*(r+1)-1,a=e[o],s=o+1,u=e[s];if(void 0!==a&&0>N(a,n))void 0!==u&&0>N(u,a)?(e[r]=u,e[s]=n,r=s):(e[r]=a,e[o]=n,r=o);else{if(!(void 0!==u&&0>N(u,n)))break e;e[r]=u,e[s]=n,r=s}}}return t}return null}function N(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var O=[],w=[],L=1,P=null,M=3,U=!1,D=!1,k=!1;function F(e){for(var t=I(w);null!==t;){if(null===t.callback)A(w);else{if(!(t.startTime<=e))break;A(w),t.sortIndex=t.expirationTime,R(O,t)}t=I(w)}}function x(e){if(k=!1,F(e),!D)if(null!==I(O))D=!0,r(H);else{var t=I(w);null!==t&&i(x,t.startTime-e)}}function H(e,n){D=!1,k&&(k=!1,o()),U=!0;var r=M;try{for(F(n),P=I(O);null!==P&&(!(P.expirationTime>n)||e&&!a());){var s=P.callback;if(null!==s){P.callback=null,M=P.priorityLevel;var u=s(P.expirationTime<=n);n=t.unstable_now(),"function"==typeof u?P.callback=u:P===I(O)&&A(O),F(n)}else A(O);P=I(O)}if(null!==P)var l=!0;else{var c=I(w);null!==c&&i(x,c.startTime-n),l=!1}return l}finally{P=null,M=r,U=!1}}function G(e){switch(e){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1e4;default:return 5e3}}var V=s;t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){D||U||(D=!0,r(H))},t.unstable_getCurrentPriorityLevel=function(){return M},t.unstable_getFirstCallbackNode=function(){return I(O)},t.unstable_next=function(e){switch(M){case 1:case 2:case 3:var t=3;break;default:t=M}var n=M;M=t;try{return e()}finally{M=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=V,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=M;M=e;try{return t()}finally{M=n}},t.unstable_scheduleCallback=function(e,n,a){var s=t.unstable_now();if("object"==typeof a&&null!==a){var u=a.delay;u="number"==typeof u&&0<u?s+u:s,a="number"==typeof a.timeout?a.timeout:G(e)}else a=G(e),u=s;return e={id:L++,callback:n,priorityLevel:e,startTime:u,expirationTime:a=u+a,sortIndex:-1},u>s?(e.sortIndex=u,R(w,e),null===I(O)&&e===I(w)&&(k?o():k=!0,i(x,u-s))):(e.sortIndex=a,R(O,e),D||U||(D=!0,r(H))),e},t.unstable_shouldYield=function(){var e=t.unstable_now();F(e);var n=I(O);return n!==P&&null!==P&&null!==n&&null!==n.callback&&n.startTime<=e&&n.expirationTime<P.expirationTime||a()},t.unstable_wrapCallback=function(e){var t=M;return function(){var n=M;M=t;try{return e.apply(this,arguments)}finally{M=n}}}},function(e,t,n){var r=n(67),i=n(199);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);var o={insert:"head",singleton:!1};r(i,o);e.exports=i.locals||{}},function(e,t,n){(t=n(68)(!1)).push([e.i,".ToDoPluginRootModal{display:flex;flex-direction:column;padding-top:60px;width:100%;height:100%;align-items:center;font-size:16px}@media (max-width: 768px){.ToDoPluginRootModal{padding-left:15px;padding-right:15px}}.ToDoPluginRootModal h1{font-size:32px;margin-bottom:40px;margin-top:16px;text-align:center;font-weight:300;line-height:1}.ToDoPluginRootModal h1 strong{font-weight:400}.ToDoPluginRootModal h2{font-weight:300}.ToDoPluginRootModal h2 strong{font-weight:400}.ToDoPluginRootModal .todoplugin-modal-icon{text-align:center}.ToDoPluginRootModal .todoplugin-modal-icon svg{height:32px;width:126px;margin-right:85px}.ToDoPluginRootModal .todoplugin-issue{max-width:720px;width:100%;margin-bottom:28px}.ToDoPluginRootModal .todoplugin-issue .todoplugin-input{height:144px;border:1px solid var(--center-channel-color-16);border-radius:4px;padding:12px 14px;width:100%;font-size:14px;resize:none;overflow:auto}.ToDoPluginRootModal .todoplugin-issue .todoplugin-input.todoplugin-one-line{height:48px}.ToDoPluginRootModal .todoplugin-issue .todoplugin-input:focus{border-color:var(--center-channel-color-32)}.ToDoPluginRootModal .todoplugin-issue .todoplugin-help-text{margin-top:8px}.ToDoPluginRootModal .todoplugin-button-container{margin-bottom:28px}.ToDoPluginRootModal .todoplugin-button-container button{padding:13px 26px;font-size:16px;font-weight:600;border-radius:4px}.ToDoPluginRootModal .todoplugin-button-container button:focus,.ToDoPluginRootModal .todoplugin-button-container button:active,.ToDoPluginRootModal .todoplugin-button-container button:focus:active{outline:none;border-color:transparent}.ToDoPluginRootModal .todoplugin-divider{border-bottom:1px solid var(--center-channel-color-32);height:1px;width:65%;margin-top:28px;margin-bottom:28px}.ToDoPluginRootModal .todoplugin-clarification{max-width:720px;width:100%;margin-bottom:28px}.ToDoPluginRootModal .todoplugin-clarification .todoplugin-question{font-weight:300;font-size:14px;width:100%}.ToDoPluginRootModal .todoplugin-clarification .todoplugin-answer{font-size:12px;width:100%;margin-bottom:15px}.ToDoPluginRootModal .todoplugin-add-to-thread{max-width:720px;margin-bottom:10px}\n",""]),e.exports=t},function(e,t,n){"use strict";var r,i=n(25),o=n(43).f,a=n(46),s=n(201),u=n(45),l=n(203),c=n(29),d="".endsWith,f=Math.min,h=l("endsWith");i({target:"String",proto:!0,forced:!!(c||h||(r=o(String.prototype,"endsWith"),!r||r.writable))&&!h},{endsWith:function(e){var t=String(u(this));s(e);var n=arguments.length>1?arguments[1]:void 0,r=a(t.length),i=void 0===n?r:f(a(n),r),o=String(e);return d?d.call(t,o,i):t.slice(i-o.length,i)===o}})},function(e,t,n){var r=n(202);e.exports=function(e){if(r(e))throw TypeError("The method doesn't accept regular expressions");return e}},function(e,t,n){var r=n(17),i=n(26),o=n(6)("match");e.exports=function(e){var t;return r(e)&&(void 0!==(t=e[o])?!!t:"RegExp"==i(e))}},function(e,t,n){var r=n(6)("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[r]=!1,"/./"[e](t)}catch(e){}}return!1}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=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},i=function(){function e(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)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=n(205),a=m(o),s=m(n(104)),u=n(0),l=m(n(1)),c=m(n(212)),d=m(n(213)),f=m(n(214)),h=m(n(215)),p=m(n(216)),_=n(217),E=n(218);function m(e){return e&&e.__esModule?e:{default:e}}function g(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var y=function(e){function t(e){var n;g(this,t);for(var r=arguments.length,i=Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];var a=v(this,(n=t.__proto__||Object.getPrototypeOf(t)).call.apply(n,[this,e].concat(i)));return a.getScrollLeft=a.getScrollLeft.bind(a),a.getScrollTop=a.getScrollTop.bind(a),a.getScrollWidth=a.getScrollWidth.bind(a),a.getScrollHeight=a.getScrollHeight.bind(a),a.getClientWidth=a.getClientWidth.bind(a),a.getClientHeight=a.getClientHeight.bind(a),a.getValues=a.getValues.bind(a),a.getThumbHorizontalWidth=a.getThumbHorizontalWidth.bind(a),a.getThumbVerticalHeight=a.getThumbVerticalHeight.bind(a),a.getScrollLeftForOffset=a.getScrollLeftForOffset.bind(a),a.getScrollTopForOffset=a.getScrollTopForOffset.bind(a),a.scrollLeft=a.scrollLeft.bind(a),a.scrollTop=a.scrollTop.bind(a),a.scrollToLeft=a.scrollToLeft.bind(a),a.scrollToTop=a.scrollToTop.bind(a),a.scrollToRight=a.scrollToRight.bind(a),a.scrollToBottom=a.scrollToBottom.bind(a),a.handleTrackMouseEnter=a.handleTrackMouseEnter.bind(a),a.handleTrackMouseLeave=a.handleTrackMouseLeave.bind(a),a.handleHorizontalTrackMouseDown=a.handleHorizontalTrackMouseDown.bind(a),a.handleVerticalTrackMouseDown=a.handleVerticalTrackMouseDown.bind(a),a.handleHorizontalThumbMouseDown=a.handleHorizontalThumbMouseDown.bind(a),a.handleVerticalThumbMouseDown=a.handleVerticalThumbMouseDown.bind(a),a.handleWindowResize=a.handleWindowResize.bind(a),a.handleScroll=a.handleScroll.bind(a),a.handleDrag=a.handleDrag.bind(a),a.handleDragEnd=a.handleDragEnd.bind(a),a.state={didMountUniversal:!1},a}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"componentDidMount",value:function(){this.addListeners(),this.update(),this.componentDidMountUniversal()}},{key:"componentDidMountUniversal",value:function(){this.props.universal&&this.setState({didMountUniversal:!0})}},{key:"componentDidUpdate",value:function(){this.update()}},{key:"componentWillUnmount",value:function(){this.removeListeners(),(0,o.cancel)(this.requestFrame),clearTimeout(this.hideTracksTimeout),clearInterval(this.detectScrollingInterval)}},{key:"getScrollLeft",value:function(){return this.view?this.view.scrollLeft:0}},{key:"getScrollTop",value:function(){return this.view?this.view.scrollTop:0}},{key:"getScrollWidth",value:function(){return this.view?this.view.scrollWidth:0}},{key:"getScrollHeight",value:function(){return this.view?this.view.scrollHeight:0}},{key:"getClientWidth",value:function(){return this.view?this.view.clientWidth:0}},{key:"getClientHeight",value:function(){return this.view?this.view.clientHeight:0}},{key:"getValues",value:function(){var e=this.view||{},t=e.scrollLeft,n=void 0===t?0:t,r=e.scrollTop,i=void 0===r?0:r,o=e.scrollWidth,a=void 0===o?0:o,s=e.scrollHeight,u=void 0===s?0:s,l=e.clientWidth,c=void 0===l?0:l,d=e.clientHeight,f=void 0===d?0:d;return{left:n/(a-c)||0,top:i/(u-f)||0,scrollLeft:n,scrollTop:i,scrollWidth:a,scrollHeight:u,clientWidth:c,clientHeight:f}}},{key:"getThumbHorizontalWidth",value:function(){var e=this.props,t=e.thumbSize,n=e.thumbMinSize,r=this.view,i=r.scrollWidth,o=r.clientWidth,a=(0,h.default)(this.trackHorizontal),s=Math.ceil(o/i*a);return a===s?0:t||Math.max(s,n)}},{key:"getThumbVerticalHeight",value:function(){var e=this.props,t=e.thumbSize,n=e.thumbMinSize,r=this.view,i=r.scrollHeight,o=r.clientHeight,a=(0,p.default)(this.trackVertical),s=Math.ceil(o/i*a);return a===s?0:t||Math.max(s,n)}},{key:"getScrollLeftForOffset",value:function(e){var t=this.view,n=t.scrollWidth,r=t.clientWidth;return e/((0,h.default)(this.trackHorizontal)-this.getThumbHorizontalWidth())*(n-r)}},{key:"getScrollTopForOffset",value:function(e){var t=this.view,n=t.scrollHeight,r=t.clientHeight;return e/((0,p.default)(this.trackVertical)-this.getThumbVerticalHeight())*(n-r)}},{key:"scrollLeft",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.view&&(this.view.scrollLeft=e)}},{key:"scrollTop",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.view&&(this.view.scrollTop=e)}},{key:"scrollToLeft",value:function(){this.view&&(this.view.scrollLeft=0)}},{key:"scrollToTop",value:function(){this.view&&(this.view.scrollTop=0)}},{key:"scrollToRight",value:function(){this.view&&(this.view.scrollLeft=this.view.scrollWidth)}},{key:"scrollToBottom",value:function(){this.view&&(this.view.scrollTop=this.view.scrollHeight)}},{key:"addListeners",value:function(){if("undefined"!=typeof document&&this.view){var e=this.view,t=this.trackHorizontal,n=this.trackVertical,r=this.thumbHorizontal,i=this.thumbVertical;e.addEventListener("scroll",this.handleScroll),(0,d.default)()&&(t.addEventListener("mouseenter",this.handleTrackMouseEnter),t.addEventListener("mouseleave",this.handleTrackMouseLeave),t.addEventListener("mousedown",this.handleHorizontalTrackMouseDown),n.addEventListener("mouseenter",this.handleTrackMouseEnter),n.addEventListener("mouseleave",this.handleTrackMouseLeave),n.addEventListener("mousedown",this.handleVerticalTrackMouseDown),r.addEventListener("mousedown",this.handleHorizontalThumbMouseDown),i.addEventListener("mousedown",this.handleVerticalThumbMouseDown),window.addEventListener("resize",this.handleWindowResize))}}},{key:"removeListeners",value:function(){if("undefined"!=typeof document&&this.view){var e=this.view,t=this.trackHorizontal,n=this.trackVertical,r=this.thumbHorizontal,i=this.thumbVertical;e.removeEventListener("scroll",this.handleScroll),(0,d.default)()&&(t.removeEventListener("mouseenter",this.handleTrackMouseEnter),t.removeEventListener("mouseleave",this.handleTrackMouseLeave),t.removeEventListener("mousedown",this.handleHorizontalTrackMouseDown),n.removeEventListener("mouseenter",this.handleTrackMouseEnter),n.removeEventListener("mouseleave",this.handleTrackMouseLeave),n.removeEventListener("mousedown",this.handleVerticalTrackMouseDown),r.removeEventListener("mousedown",this.handleHorizontalThumbMouseDown),i.removeEventListener("mousedown",this.handleVerticalThumbMouseDown),window.removeEventListener("resize",this.handleWindowResize),this.teardownDragging())}}},{key:"handleScroll",value:function(e){var t=this,n=this.props,r=n.onScroll,i=n.onScrollFrame;r&&r(e),this.update((function(e){var n=e.scrollLeft,r=e.scrollTop;t.viewScrollLeft=n,t.viewScrollTop=r,i&&i(e)})),this.detectScrolling()}},{key:"handleScrollStart",value:function(){var e=this.props.onScrollStart;e&&e(),this.handleScrollStartAutoHide()}},{key:"handleScrollStartAutoHide",value:function(){this.props.autoHide&&this.showTracks()}},{key:"handleScrollStop",value:function(){var e=this.props.onScrollStop;e&&e(),this.handleScrollStopAutoHide()}},{key:"handleScrollStopAutoHide",value:function(){this.props.autoHide&&this.hideTracks()}},{key:"handleWindowResize",value:function(){this.update()}},{key:"handleHorizontalTrackMouseDown",value:function(e){e.preventDefault();var t=e.target,n=e.clientX,r=t.getBoundingClientRect().left,i=this.getThumbHorizontalWidth(),o=Math.abs(r-n)-i/2;this.view.scrollLeft=this.getScrollLeftForOffset(o)}},{key:"handleVerticalTrackMouseDown",value:function(e){e.preventDefault();var t=e.target,n=e.clientY,r=t.getBoundingClientRect().top,i=this.getThumbVerticalHeight(),o=Math.abs(r-n)-i/2;this.view.scrollTop=this.getScrollTopForOffset(o)}},{key:"handleHorizontalThumbMouseDown",value:function(e){e.preventDefault(),this.handleDragStart(e);var t=e.target,n=e.clientX,r=t.offsetWidth,i=t.getBoundingClientRect().left;this.prevPageX=r-(n-i)}},{key:"handleVerticalThumbMouseDown",value:function(e){e.preventDefault(),this.handleDragStart(e);var t=e.target,n=e.clientY,r=t.offsetHeight,i=t.getBoundingClientRect().top;this.prevPageY=r-(n-i)}},{key:"setupDragging",value:function(){(0,s.default)(document.body,_.disableSelectStyle),document.addEventListener("mousemove",this.handleDrag),document.addEventListener("mouseup",this.handleDragEnd),document.onselectstart=f.default}},{key:"teardownDragging",value:function(){(0,s.default)(document.body,_.disableSelectStyleReset),document.removeEventListener("mousemove",this.handleDrag),document.removeEventListener("mouseup",this.handleDragEnd),document.onselectstart=void 0}},{key:"handleDragStart",value:function(e){this.dragging=!0,e.stopImmediatePropagation(),this.setupDragging()}},{key:"handleDrag",value:function(e){if(this.prevPageX){var t=e.clientX,n=-this.trackHorizontal.getBoundingClientRect().left+t-(this.getThumbHorizontalWidth()-this.prevPageX);this.view.scrollLeft=this.getScrollLeftForOffset(n)}if(this.prevPageY){var r=e.clientY,i=-this.trackVertical.getBoundingClientRect().top+r-(this.getThumbVerticalHeight()-this.prevPageY);this.view.scrollTop=this.getScrollTopForOffset(i)}return!1}},{key:"handleDragEnd",value:function(){this.dragging=!1,this.prevPageX=this.prevPageY=0,this.teardownDragging(),this.handleDragEndAutoHide()}},{key:"handleDragEndAutoHide",value:function(){this.props.autoHide&&this.hideTracks()}},{key:"handleTrackMouseEnter",value:function(){this.trackMouseOver=!0,this.handleTrackMouseEnterAutoHide()}},{key:"handleTrackMouseEnterAutoHide",value:function(){this.props.autoHide&&this.showTracks()}},{key:"handleTrackMouseLeave",value:function(){this.trackMouseOver=!1,this.handleTrackMouseLeaveAutoHide()}},{key:"handleTrackMouseLeaveAutoHide",value:function(){this.props.autoHide&&this.hideTracks()}},{key:"showTracks",value:function(){clearTimeout(this.hideTracksTimeout),(0,s.default)(this.trackHorizontal,{opacity:1}),(0,s.default)(this.trackVertical,{opacity:1})}},{key:"hideTracks",value:function(){var e=this;if(!this.dragging&&!this.scrolling&&!this.trackMouseOver){var t=this.props.autoHideTimeout;clearTimeout(this.hideTracksTimeout),this.hideTracksTimeout=setTimeout((function(){(0,s.default)(e.trackHorizontal,{opacity:0}),(0,s.default)(e.trackVertical,{opacity:0})}),t)}}},{key:"detectScrolling",value:function(){var e=this;this.scrolling||(this.scrolling=!0,this.handleScrollStart(),this.detectScrollingInterval=setInterval((function(){e.lastViewScrollLeft===e.viewScrollLeft&&e.lastViewScrollTop===e.viewScrollTop&&(clearInterval(e.detectScrollingInterval),e.scrolling=!1,e.handleScrollStop()),e.lastViewScrollLeft=e.viewScrollLeft,e.lastViewScrollTop=e.viewScrollTop}),100))}},{key:"raf",value:function(e){var t=this;this.requestFrame&&a.default.cancel(this.requestFrame),this.requestFrame=(0,a.default)((function(){t.requestFrame=void 0,e()}))}},{key:"update",value:function(e){var t=this;this.raf((function(){return t._update(e)}))}},{key:"_update",value:function(e){var t=this.props,n=t.onUpdate,r=t.hideTracksWhenNotNeeded,i=this.getValues();if((0,d.default)()){var o=i.scrollLeft,a=i.clientWidth,u=i.scrollWidth,l=(0,h.default)(this.trackHorizontal),c=this.getThumbHorizontalWidth(),f={width:c,transform:"translateX("+o/(u-a)*(l-c)+"px)"},_=i.scrollTop,E=i.clientHeight,m=i.scrollHeight,g=(0,p.default)(this.trackVertical),v=this.getThumbVerticalHeight(),y={height:v,transform:"translateY("+_/(m-E)*(g-v)+"px)"};if(r){var T={visibility:u>a?"visible":"hidden"},C={visibility:m>E?"visible":"hidden"};(0,s.default)(this.trackHorizontal,T),(0,s.default)(this.trackVertical,C)}(0,s.default)(this.thumbHorizontal,f),(0,s.default)(this.thumbVertical,y)}n&&n(i),"function"==typeof e&&e(i)}},{key:"render",value:function(){var e=this,t=(0,d.default)(),n=this.props,i=(n.onScroll,n.onScrollFrame,n.onScrollStart,n.onScrollStop,n.onUpdate,n.renderView),o=n.renderTrackHorizontal,a=n.renderTrackVertical,s=n.renderThumbHorizontal,l=n.renderThumbVertical,f=n.tagName,h=(n.hideTracksWhenNotNeeded,n.autoHide),p=(n.autoHideTimeout,n.autoHideDuration),E=(n.thumbSize,n.thumbMinSize,n.universal),m=n.autoHeight,g=n.autoHeightMin,v=n.autoHeightMax,y=n.style,T=n.children,C=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(n,["onScroll","onScrollFrame","onScrollStart","onScrollStop","onUpdate","renderView","renderTrackHorizontal","renderTrackVertical","renderThumbHorizontal","renderThumbVertical","tagName","hideTracksWhenNotNeeded","autoHide","autoHideTimeout","autoHideDuration","thumbSize","thumbMinSize","universal","autoHeight","autoHeightMin","autoHeightMax","style","children"]),S=this.state.didMountUniversal,b=r({},_.containerStyleDefault,m&&r({},_.containerStyleAutoHeight,{minHeight:g,maxHeight:v}),y),R=r({},_.viewStyleDefault,{marginRight:t?-t:0,marginBottom:t?-t:0},m&&r({},_.viewStyleAutoHeight,{minHeight:(0,c.default)(g)?"calc("+g+" + "+t+"px)":g+t,maxHeight:(0,c.default)(v)?"calc("+v+" + "+t+"px)":v+t}),m&&E&&!S&&{minHeight:g,maxHeight:v},E&&!S&&_.viewStyleUniversalInitial),I={transition:"opacity "+p+"ms",opacity:0},A=r({},_.trackHorizontalStyleDefault,h&&I,(!t||E&&!S)&&{display:"none"}),N=r({},_.trackVerticalStyleDefault,h&&I,(!t||E&&!S)&&{display:"none"});return(0,u.createElement)(f,r({},C,{style:b,ref:function(t){e.container=t}}),[(0,u.cloneElement)(i({style:R}),{key:"view",ref:function(t){e.view=t}},T),(0,u.cloneElement)(o({style:A}),{key:"trackHorizontal",ref:function(t){e.trackHorizontal=t}},(0,u.cloneElement)(s({style:_.thumbHorizontalStyleDefault}),{ref:function(t){e.thumbHorizontal=t}})),(0,u.cloneElement)(a({style:N}),{key:"trackVertical",ref:function(t){e.trackVertical=t}},(0,u.cloneElement)(l({style:_.thumbVerticalStyleDefault}),{ref:function(t){e.thumbVertical=t}}))])}}]),t}(u.Component);t.default=y,y.propTypes={onScroll:l.default.func,onScrollFrame:l.default.func,onScrollStart:l.default.func,onScrollStop:l.default.func,onUpdate:l.default.func,renderView:l.default.func,renderTrackHorizontal:l.default.func,renderTrackVertical:l.default.func,renderThumbHorizontal:l.default.func,renderThumbVertical:l.default.func,tagName:l.default.string,thumbSize:l.default.number,thumbMinSize:l.default.number,hideTracksWhenNotNeeded:l.default.bool,autoHide:l.default.bool,autoHideTimeout:l.default.number,autoHideDuration:l.default.number,autoHeight:l.default.bool,autoHeightMin:l.default.oneOfType([l.default.number,l.default.string]),autoHeightMax:l.default.oneOfType([l.default.number,l.default.string]),universal:l.default.bool,style:l.default.object,children:l.default.node},y.defaultProps={renderView:E.renderViewDefault,renderTrackHorizontal:E.renderTrackHorizontalDefault,renderTrackVertical:E.renderTrackVerticalDefault,renderThumbHorizontal:E.renderThumbHorizontalDefault,renderThumbVertical:E.renderThumbVerticalDefault,tagName:"div",thumbMinSize:30,hideTracksWhenNotNeeded:!1,autoHide:!1,autoHideTimeout:1e3,autoHideDuration:200,autoHeight:!1,autoHeightMin:0,autoHeightMax:200,universal:!1}},function(e,t,n){(function(t){for(var r=n(206),i="undefined"==typeof window?t:window,o=["moz","webkit"],a="AnimationFrame",s=i["request"+a],u=i["cancel"+a]||i["cancelRequest"+a],l=0;!s&&l<o.length;l++)s=i[o[l]+"Request"+a],u=i[o[l]+"Cancel"+a]||i[o[l]+"CancelRequest"+a];if(!s||!u){var c=0,d=0,f=[];s=function(e){if(0===f.length){var t=r(),n=Math.max(0,1e3/60-(t-c));c=n+t,setTimeout((function(){var e=f.slice(0);f.length=0;for(var t=0;t<e.length;t++)if(!e[t].cancelled)try{e[t].callback(c)}catch(e){setTimeout((function(){throw e}),0)}}),Math.round(n))}return f.push({handle:++d,callback:e,cancelled:!1}),d},u=function(e){for(var t=0;t<f.length;t++)f[t].handle===e&&(f[t].cancelled=!0)}}e.exports=function(e){return s.call(i,e)},e.exports.cancel=function(){u.apply(i,arguments)},e.exports.polyfill=function(e){e||(e=i),e.requestAnimationFrame=s,e.cancelAnimationFrame=u}}).call(this,n(52))},function(e,t,n){(function(t){(function(){var n,r,i,o,a,s;"undefined"!=typeof performance&&null!==performance&&performance.now?e.exports=function(){return performance.now()}:null!=t&&t.hrtime?(e.exports=function(){return(n()-a)/1e6},r=t.hrtime,o=(n=function(){var e;return 1e9*(e=r())[0]+e[1]})(),s=1e9*t.uptime(),a=o-s):Date.now?(e.exports=function(){return Date.now()-i},i=Date.now()):(e.exports=function(){return(new Date).getTime()-i},i=(new Date).getTime())}).call(this)}).call(this,n(100))},function(e,t){var n=null,r=["Webkit","Moz","O","ms"];e.exports=function(e){n||(n=document.createElement("div"));var t=n.style;if(e in t)return e;for(var i=e.charAt(0).toUpperCase()+e.slice(1),o=r.length;o>=0;o--){var a=r[o]+i;if(a in t)return a}return!1}},function(e,t,n){var r=n(209);e.exports=function(e){return r(e).replace(/\s(\w)/g,(function(e,t){return t.toUpperCase()}))}},function(e,t,n){var r=n(210);e.exports=function(e){return r(e).replace(/[\W_]+(.|$)/g,(function(e,t){return t?" "+t:""})).trim()}},function(e,t){e.exports=function(e){return n.test(e)?e.toLowerCase():r.test(e)?(function(e){return e.replace(o,(function(e,t){return t?" "+t:""}))}(e)||e).toLowerCase():i.test(e)?function(e){return e.replace(a,(function(e,t,n){return t+" "+n.toLowerCase().split("").join(" ")}))}(e).toLowerCase():e.toLowerCase()};var n=/\s/,r=/(_|-|\.|:)/,i=/([a-z][A-Z]|[A-Z][a-z])/;var o=/[\W_]+(.|$)/g;var a=/(.)([A-Z]+)/g},function(e,t){var n={animationIterationCount:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridColumn:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,stopOpacity:!0,strokeDashoffset:!0,strokeOpacity:!0,strokeWidth:!0};e.exports=function(e,t){return"number"!=typeof t||n[e]?t:t+"px"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return"string"==typeof e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){if(!1!==a)return a;if("undefined"!=typeof document){var e=document.createElement("div");(0,o.default)(e,{width:100,height:100,position:"absolute",top:-9999,overflow:"scroll",MsOverflowStyle:"scrollbar"}),document.body.appendChild(e),a=e.offsetWidth-e.clientWidth,document.body.removeChild(e)}else a=0;return a||0};var r,i=n(104),o=(r=i)&&r.__esModule?r:{default:r};var a=!1},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return!1}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.clientWidth,n=getComputedStyle(e),r=n.paddingLeft,i=n.paddingRight;return t-parseFloat(r)-parseFloat(i)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.clientHeight,n=getComputedStyle(e),r=n.paddingTop,i=n.paddingBottom;return t-parseFloat(r)-parseFloat(i)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.containerStyleDefault={position:"relative",overflow:"hidden",width:"100%",height:"100%"},t.containerStyleAutoHeight={height:"auto"},t.viewStyleDefault={position:"absolute",top:0,left:0,right:0,bottom:0,overflow:"scroll",WebkitOverflowScrolling:"touch"},t.viewStyleAutoHeight={position:"relative",top:void 0,left:void 0,right:void 0,bottom:void 0},t.viewStyleUniversalInitial={overflow:"hidden",marginRight:0,marginBottom:0},t.trackHorizontalStyleDefault={position:"absolute",height:6},t.trackVerticalStyleDefault={position:"absolute",width:6},t.thumbHorizontalStyleDefault={position:"relative",display:"block",height:"100%"},t.thumbVerticalStyleDefault={position:"relative",display:"block",width:"100%"},t.disableSelectStyle={userSelect:"none"},t.disableSelectStyleReset={userSelect:""}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=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};t.renderViewDefault=function(e){return a.default.createElement("div",e)},t.renderTrackHorizontalDefault=function(e){var t=e.style,n=s(e,["style"]),i=r({},t,{right:2,bottom:2,left:2,borderRadius:3});return a.default.createElement("div",r({style:i},n))},t.renderTrackVerticalDefault=function(e){var t=e.style,n=s(e,["style"]),i=r({},t,{right:2,bottom:2,top:2,borderRadius:3});return a.default.createElement("div",r({style:i},n))},t.renderThumbHorizontalDefault=function(e){var t=e.style,n=s(e,["style"]),i=r({},t,{cursor:"pointer",borderRadius:"inherit",backgroundColor:"rgba(0,0,0,.2)"});return a.default.createElement("div",r({style:i},n))},t.renderThumbVerticalDefault=function(e){var t=e.style,n=s(e,["style"]),i=r({},t,{cursor:"pointer",borderRadius:"inherit",backgroundColor:"rgba(0,0,0,.2)"});return a.default.createElement("div",r({style:i},n))};var i,o=n(0),a=(i=o)&&i.__esModule?i:{default:i};function s(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}},function(e,t,n){var r=n(67),i=n(220);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);var o={insert:"head",singleton:!1};r(i,o);e.exports=i.locals||{}},function(e,t,n){(t=n(68)(!1)).push([e.i,".SidebarRight .section-header{padding:15px;text-align:center;cursor:pointer}.SidebarRight .section-header:hover{background-color:var(--center-channel-color-04)}.SidebarRight .section-header:active{background-color:var(--center-channel-color-08)}.SidebarRight .section-header i{color:var(--center-channel-color)}.SidebarRight .header-menu{padding:15px;display:flex}.SidebarRight .header-menu .btn.btn-primary{cursor:pointer;flex-grow:1;text-align:center;height:100%;margin-left:5px;margin-right:5px;color:var(--center-channel-color-56);background-color:unset;box-shadow:unset;border:3px solid transparent}.SidebarRight .header-menu .btn.btn-primary:hover{background-color:var(--center-channel-color-04)}.SidebarRight .header-menu .btn.btn-primary:active{background-color:var(--center-channel-color-08);color:var(--center-channel-color)}.SidebarRight .header-menu .btn.btn-primary.selected{background-color:var(--center-channel-color-08);border-bottom:3px solid var(--button-bg);color:var(--center-channel-color)}.SidebarRight .action-buttons{padding:2px;display:flex}.SidebarRight .action-buttons .btn{flex-grow:1;text-align:center;height:100%;margin-left:5px;margin-right:5px}.SidebarRight .todo-separator{font-size:130%;color:var(--link-color);padding-left:5px}.SidebarRight .todo-text{padding:0 0 0.2em;width:100%;word-wrap:break-word}.SidebarRight .todo-text p{font-size:13.5px;line-height:1.6em;margin:0;white-space:pre-wrap;width:100%;word-break:break-word}.SidebarRight .todo-text p+p{margin:0.5em 0 0}.SidebarRight .todo-text ul,.SidebarRight .todo-text ol{font-size:13.5px}.SidebarRight .todo-text ul p,.SidebarRight .todo-text ol p{margin-bottom:0}.SidebarRight .todo-text ul li p,.SidebarRight .todo-text ol li p{display:inline}.SidebarRight .todo-text ul li ul,.SidebarRight .todo-text ol li ul{font-size:1em;margin:0;padding:0 0 0 20px}.SidebarRight .todo-text ul li.list-item--task-list ul,.SidebarRight .todo-text ul li.list-item--task-list ol,.SidebarRight .todo-text ol li.list-item--task-list ul,.SidebarRight .todo-text ol li.list-item--task-list ol{margin-left:20px}.SidebarRight .todo-text ul li.list-item--task-list ul,.SidebarRight .todo-text ol li.list-item--task-list ul{padding-left:0}.SidebarRight .todo-text ul li:not(.list-item--task-list) li.list-item--task-list,.SidebarRight .todo-text ul li:not(.list-item--task-list) li.list-item--task-list ~ li,.SidebarRight .todo-text ol li:not(.list-item--task-list) li.list-item--task-list,.SidebarRight .todo-text ol li:not(.list-item--task-list) li.list-item--task-list ~ li{margin-left:-20px}.SidebarRight .todo-text ul li input[type='checkbox']:disabled,.SidebarRight .todo-text ol li input[type='checkbox']:disabled{cursor:default;vertical-align:top}.SidebarRight .todo-text ul li.list-item--task-list,.SidebarRight .todo-text ul li.list-item--task-list ~ li{list-style-type:none}.SidebarRight .todo-text ul li.list-item--task-list ~ li:not(.list-item--task-list){text-indent:3px}.SidebarRight .todo-text ul li.list-item--task-list ~ li:not(.list-item--task-list):before{content:'\\2022';margin-right:8px}.SidebarRight .todo-text ul+p,.SidebarRight .todo-text ol+p{margin-top:.6em}.SidebarRight .todo-text p+ul,.SidebarRight .todo-text p+ol{margin-top:.6em}.post__content .todo-post .btn{margin-left:5px;margin-right:5px}\n",""]),e.exports=t},function(e,t,n){var r=n(67),i=n(222);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);var o={insert:"head",singleton:!1};r(i,o);e.exports=i.locals||{}},function(e,t,n){(t=n(68)(!1)).push([e.i,".todo-plugin-icon:active,.todo-plugin-icon--active,.todo-plugin-icon--active:hover{fill:var(--button-bg);color:var(--button-bg)}\n",""]),e.exports=t},function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return Ut}));var r=n(0),i=n.n(r);const o=JSON.parse('\n{\n    "id": "com.mattermost.plugin-todo",\n    "name": "Todo",\n    "description": "This plugin makes it easy to keep track of Todo issues and get daily reminders.",\n    "homepage_url": "https://github.com/mattermost/mattermost-plugin-todo",\n    "support_url": "https://github.com/mattermost/mattermost-plugin-todo/issues",\n    "release_notes_url": "https://github.com/mattermost/mattermost-plugin-todo/releases/tag/v0.4.0",\n    "version": "0.4.0",\n    "min_server_version": "5.12.0",\n    "server": {\n        "executables": {\n            "linux-amd64": "server/dist/plugin-linux-amd64",\n            "darwin-amd64": "server/dist/plugin-darwin-amd64",\n            "windows-amd64": "server/dist/plugin-windows-amd64.exe"\n        },\n        "executable": ""\n    },\n    "webapp": {\n        "bundle_path": "webapp/dist/main.js"\n    },\n    "settings_schema": {\n        "header": "",\n        "footer": "",\n        "settings": [\n            {\n                "key": "hide_team_sidebar",\n                "display_name": "Hide team sidebar buttons",\n                "type": "bool",\n                "help_text": "When true, the buttons in the team sidebar on the left toolbar will be hidden.",\n                "placeholder": "",\n                "default": null\n            }\n        ]\n    }\n}\n');const a=o.id;o.version;var s=n(10),u=n(11),l=(n(70),n(31),n(132),n(9)),c=n(4),d=n(23);const f=a+"_open_root_modal",h=a+"_close_root_modal",p=a+"_get_issues",_=a+"_get_out_issues",E=a+"_get_in_issues",m=a+"_show_rhs",g=a+"_update_rhs_state",v=a+"_set_rhs_visible",y=a+"_set_hide_team_sidebar",T=e=>t=>{t({type:f,postID:e})},C=()=>e=>{e({type:h})};function S(e){return{type:v,payload:e}}function b(e){return{type:g,state:e}}const R=e=>{const t=Object(l.getConfig)(e);let n="";return t&&t.SiteURL&&(n=new URL(t.SiteURL).pathname,n&&"/"===n[n.length-1]&&(n=n.substr(0,n.length-1))),n+"/plugins/"+a},I=(e,t)=>async(n,r)=>{await fetch(R(r())+"/telemetry",c.Client4.getOptions({method:"post",body:JSON.stringify({event:e,properties:t})}))},A=(e,t,n)=>async(r,i)=>{await fetch(R(i())+"/add",c.Client4.getOptions({method:"post",body:JSON.stringify({message:e,send_to:t,post_id:n})})),r(N()),t&&r(N(!1,"out"))},N=(e=!1,t="my")=>async(n,r)=>{let i,o;try{i=await fetch(R(r())+"/list?reminder="+e+"&list="+t,c.Client4.getOptions({method:"get"})),o=await i.json()}catch(e){return{error:e}}let a=p;switch(t){case"my":a=p;break;case"in":a=E;break;case"out":a=_}return n({type:a,data:o}),{data:o}},O=e=>async(t,n)=>{await fetch(R(n())+"/remove",c.Client4.getOptions({method:"post",body:JSON.stringify({id:e})})),t(N(!1,"my")),t(N(!1,"in")),t(N(!1,"out"))},w=e=>async(t,n)=>{await fetch(R(n())+"/complete",c.Client4.getOptions({method:"post",body:JSON.stringify({id:e})})),t(N(!1,"my")),t(N(!1,"in"))},L=e=>async(t,n)=>{await fetch(R(n())+"/accept",c.Client4.getOptions({method:"post",body:JSON.stringify({id:e})})),t(N(!1,"in")),t(N(!1,"my"))},P=e=>async(t,n)=>{await fetch(R(n())+"/bump",c.Client4.getOptions({method:"post",body:JSON.stringify({id:e})})),t(N(!1,"out"))};function M(e){return async t=>{const{data:n}=await t(d.autocompleteUsers(e));return n}}function U(e){return{type:y,payload:e}}const D=e=>e["plugins-"+a]||{},k=e=>D(e).rootModalVisible,F=e=>D(e).postID,x=e=>{const t=D(e).postID;if(!t)return"";const n=e.entities.posts.posts[t];return n?n.message:""},H=e=>D(e).issues,G=e=>D(e).inIssues,V=e=>D(e).outIssues,B=e=>j()+"/"+e.entities.teams.teams[e.entities.teams.currentTeamId].name+"/",j=()=>{let e=window.location.protocol+"//"+window.location.hostname+(window.location.port?":"+window.location.port:"");return window.location.origin&&(e=window.location.origin),"/"===e[e.length-1]&&(e=e.substring(0,e.length-1)),window.basename&&(e+=window.basename),"/"===e[e.length-1]&&(e=e.substring(0,e.length-1)),e},z=e=>D(e).isRhsVisible,Y=e=>!D(e).isTeamSidebarHidden;var W=n(1),Q=n.n(W),J=n(8);function K(){return(K=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}).apply(this,arguments)}function q(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}function X(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function Z(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}var ee=n(33),te=n.n(ee),ne=!1,re=i.a.createContext(null),ie=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var i,o=n&&!n.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?o?(i="exited",r.appearStatus="entering"):i="entered":i=t.unmountOnExit||t.mountOnEnter?"unmounted":"exited",r.state={status:i},r.nextCallback=null,r}X(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&"unmounted"===t.status?{status:"exited"}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?"entering"!==n&&"entered"!==n&&(t="entering"):"entering"!==n&&"entered"!==n||(t="exiting")}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!=typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){void 0===e&&(e=!1),null!==t?(this.cancelNextCallback(),"entering"===t?this.performEnter(e):this.performExit()):this.props.unmountOnExit&&"exited"===this.state.status&&this.setState({status:"unmounted"})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,i=this.props.nodeRef?[r]:[te.a.findDOMNode(this),r],o=i[0],a=i[1],s=this.getTimeouts(),u=r?s.appear:s.enter;!e&&!n||ne?this.safeSetState({status:"entered"},(function(){t.props.onEntered(o)})):(this.props.onEnter(o,a),this.safeSetState({status:"entering"},(function(){t.props.onEntering(o,a),t.onTransitionEnd(u,(function(){t.safeSetState({status:"entered"},(function(){t.props.onEntered(o,a)}))}))})))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:te.a.findDOMNode(this);t&&!ne?(this.props.onExit(r),this.safeSetState({status:"exiting"},(function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,(function(){e.safeSetState({status:"exited"},(function(){e.props.onExited(r)}))}))}))):this.safeSetState({status:"exited"},(function(){e.props.onExited(r)}))},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:te.a.findDOMNode(this),r=null==e&&!this.props.addEndListener;if(n&&!r){if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],o=i[0],a=i[1];this.props.addEndListener(o,a)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if("unmounted"===e)return null;var t=this.props,n=t.children,r=(t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef,q(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return i.a.createElement(re.Provider,{value:null},"function"==typeof n?n(e,r):i.a.cloneElement(i.a.Children.only(n),r))},t}(i.a.Component);function oe(){}ie.contextType=re,ie.propTypes={},ie.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:oe,onEntering:oe,onEntered:oe,onExit:oe,onExiting:oe,onExited:oe},ie.UNMOUNTED="unmounted",ie.EXITED="exited",ie.ENTERING="entering",ie.ENTERED="entered",ie.EXITING="exiting";var ae=ie,se=function(e,t){return e&&t&&t.split(" ").forEach((function(t){return r=t,void((n=e).classList?n.classList.remove(r):"string"==typeof n.className?n.className=Z(n.className,r):n.setAttribute("class",Z(n.className&&n.className.baseVal||"",r)));var n,r}))},ue=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this).appliedClasses={appear:{},enter:{},exit:{}},t.onEnter=function(e,n){var r=t.resolveArguments(e,n),i=r[0],o=r[1];t.removeClasses(i,"exit"),t.addClass(i,o?"appear":"enter","base"),t.props.onEnter&&t.props.onEnter(e,n)},t.onEntering=function(e,n){var r=t.resolveArguments(e,n),i=r[0],o=r[1]?"appear":"enter";t.addClass(i,o,"active"),t.props.onEntering&&t.props.onEntering(e,n)},t.onEntered=function(e,n){var r=t.resolveArguments(e,n),i=r[0],o=r[1]?"appear":"enter";t.removeClasses(i,o),t.addClass(i,o,"done"),t.props.onEntered&&t.props.onEntered(e,n)},t.onExit=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,"appear"),t.removeClasses(n,"enter"),t.addClass(n,"exit","base"),t.props.onExit&&t.props.onExit(e)},t.onExiting=function(e){var n=t.resolveArguments(e)[0];t.addClass(n,"exit","active"),t.props.onExiting&&t.props.onExiting(e)},t.onExited=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,"exit"),t.addClass(n,"exit","done"),t.props.onExited&&t.props.onExited(e)},t.resolveArguments=function(e,n){return t.props.nodeRef?[t.props.nodeRef.current,e]:[e,n]},t.getClassNames=function(e){var n=t.props.classNames,r="string"==typeof n,i=r?""+(r&&n?n+"-":"")+e:n[e];return{baseClassName:i,activeClassName:r?i+"-active":n[e+"Active"],doneClassName:r?i+"-done":n[e+"Done"]}},t}X(t,e);var n=t.prototype;return n.addClass=function(e,t,n){var r=this.getClassNames(t)[n+"ClassName"],i=this.getClassNames("enter").doneClassName;"appear"===t&&"done"===n&&i&&(r+=" "+i),"active"===n&&e&&e.scrollTop,r&&(this.appliedClasses[t][n]=r,function(e,t){e&&t&&t.split(" ").forEach((function(t){return r=t,void((n=e).classList?n.classList.add(r):function(e,t){return e.classList?!!t&&e.classList.contains(t):-1!==(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")}(n,r)||("string"==typeof n.className?n.className=n.className+" "+r:n.setAttribute("class",(n.className&&n.className.baseVal||"")+" "+r)));var n,r}))}(e,r))},n.removeClasses=function(e,t){var n=this.appliedClasses[t],r=n.base,i=n.active,o=n.done;this.appliedClasses[t]={},r&&se(e,r),i&&se(e,i),o&&se(e,o)},n.render=function(){var e=this.props,t=(e.classNames,q(e,["classNames"]));return i.a.createElement(ae,K({},t,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t}(i.a.Component);ue.defaultProps={classNames:""},ue.propTypes={};var le=ue;class ce extends i.a.PureComponent{render(){return i.a.createElement("span",this.props,i.a.createElement("svg",{width:"24px",height:"24px",viewBox:"0 0 24 24",role:"icon"},i.a.createElement("path",{d:"M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z"})))}}function de(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class fe extends i.a.Component{constructor(...e){super(...e),de(this,"handleKeypress",e=>{"Escape"===e.key&&this.props.show&&this.close()}),de(this,"close",()=>{this.props.onClose()})}componentDidMount(){document.addEventListener("keydown",this.handleKeypress)}componentWillUnmount(){document.removeEventListener("keydown",this.handleKeypress)}render(){return i.a.createElement(le,{in:this.props.show,classNames:"FullScreenModal",mountOnEnter:!0,unmountOnExit:!0,timeout:100,appear:!0},i.a.createElement("div",{className:"FullScreenModal"},i.a.createElement(ce,{className:"close-x",onClick:this.close}),this.props.children))}}de(fe,"propTypes",{show:Q.a.bool.isRequired,children:Q.a.node.isRequired,onClose:Q.a.func.isRequired});n(198),n(69),n(200);function he(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function pe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?he(Object(n),!0).forEach((function(t){Ee(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):he(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function _e(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Ee(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class me extends i.a.PureComponent{constructor(...e){super(...e),Ee(this,"updateInputFromProps",()=>{this.input&&this.input.value!==this.props.value&&(this.input.value=this.props.value)}),Ee(this,"getInput",()=>this.input),Ee(this,"setInput",e=>{this.input=e})}componentDidUpdate(e){e.value!==this.props.value&&(this.props.delayInputUpdate?requestAnimationFrame(this.updateInputFromProps):this.updateInputFromProps())}get value(){return this.input.value}set value(e){this.input.value=e}focus(){this.input.focus()}blur(){this.input.blur()}render(){const e=this.props,{value:t,inputComponent:n}=e,r=_e(e,["value","inputComponent"]);Reflect.deleteProperty(r,"delayInputUpdate");const o=i.a.createElement(n||"input",pe(pe({},r),{},{ref:this.setInput,defaultValue:t}));return i.a.createElement("div",null,o)}}Ee(me,"propTypes",{delayInputUpdate:Q.a.bool,inputComponent:Q.a.elementType,value:Q.a.string.isRequired}),Ee(me,"defaultProps",{delayInputUpdate:!1,value:""});const ge="my",ve="out";var ye={SUGGESTION_LIST_MAXHEIGHT:292,KeyCodes:{BACKSPACE:["Backspace",8],TAB:["Tab",9],ENTER:["Enter",13],SHIFT:["Shift",16],CTRL:["Control",17],ALT:["Alt",18],CAPS_LOCK:["CapsLock",20],ESCAPE:["Escape",27],SPACE:[" ",32],PAGE_UP:["PageUp",33],PAGE_DOWN:["PageDown",34],END:["End",35],HOME:["Home",36],LEFT:["ArrowLeft",37],UP:["ArrowUp",38],RIGHT:["ArrowRight",39],DOWN:["ArrowDown",40],INSERT:["Insert",45],DELETE:["Delete",46],ZERO:["0",48],ONE:["1",49],TWO:["2",50],THREE:["3",51],FOUR:["4",52],FIVE:["5",53],SIX:["6",54],SEVEN:["7",55],EIGHT:["8",56],NINE:["9",57],A:["a",65],B:["b",66],C:["c",67],D:["d",68],E:["e",69],F:["f",70],G:["g",71],H:["h",72],I:["i",73],J:["j",74],K:["k",75],L:["l",76],M:["m",77],N:["n",78],O:["o",79],P:["p",80],Q:["q",81],R:["r",82],S:["s",83],T:["t",84],U:["u",85],V:["v",86],W:["w",87],X:["x",88],Y:["y",89],Z:["z",90],CMD:["Meta",91],MENU:["ContextMenu",93],NUMPAD_0:["0",96],NUMPAD_1:["1",97],NUMPAD_2:["2",98],NUMPAD_3:["3",99],NUMPAD_4:["4",100],NUMPAD_5:["5",101],NUMPAD_6:["6",102],NUMPAD_7:["7",103],NUMPAD_8:["8",104],NUMPAD_9:["9",105],MULTIPLY:["*",106],ADD:["+",107],SUBTRACT:["-",109],DECIMAL:[".",110],DIVIDE:["/",111],F1:["F1",112],F2:["F2",113],F3:["F3",114],F4:["F4",115],F5:["F5",116],F6:["F6",117],F7:["F7",118],F8:["F8",119],F9:["F9",120],F10:["F10",121],F11:["F11",122],F12:["F12",123],NUM_LOCK:["NumLock",144],SEMICOLON:[";",186],EQUAL:["=",187],COMMA:[",",188],DASH:["-",189],PERIOD:[".",190],FORWARD_SLASH:["/",191],TILDE:["~",192],OPEN_BRACKET:["[",219],BACK_SLASH:["\\",220],CLOSE_BRACKET:["]",221],COMPOSING:["Composing",229]},SETTING_BUTTONS_TEAM:"team"};function Te(e,t){return"my"===e||"in"===e||"in"===t}function Ce(e){return"my"===e||"in"===e}function Se(e){return"in"===e}function be(e,t){return"out"===e&&"in"===t}function Re(e,t){if(e.keyCode===ye.KeyCodes.COMPOSING[1])return!1;if(void 0!==e.key&&"Unidentified"!==e.key&&"Dead"!==e.key){if(e.key===t[0]||e.key===t[0].toUpperCase())return!0}return e.keyCode===t[1]}function Ie(e){return e.first_name&&e.last_name?e.first_name+" "+e.last_name:e.first_name?e.first_name:e.last_name?e.last_name:""}function Ae(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Ne(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Oe=ye.KeyCodes;class we extends i.a.Component{constructor(e){super(e),Ne(this,"getTextbox",()=>{if(!this.inputRef.current)return null;const e=this.inputRef.current.getInput();return e.getDOMNode?e.getDOMNode():e}),Ne(this,"handleEmitClearSuggestions",(e=0)=>{setTimeout(()=>{this.clear()},e)}),Ne(this,"preventSuggestionListClose",()=>{this.preventSuggestionListCloseFlag=!0}),Ne(this,"handleFocusOut",e=>{this.preventSuggestionListCloseFlag?this.preventSuggestionListCloseFlag=!1:this.container.contains(e.relatedTarget)||(this.handleEmitClearSuggestions(),this.setState({focused:!1}),this.props.onBlur&&this.props.onBlur())}),Ne(this,"handleFocusIn",e=>{this.container.contains(e.relatedTarget)||this.preventSuggestionListCloseFlag||(this.setState({focused:!0}),(this.props.openOnFocus||this.props.openWhenEmpty)&&setTimeout(()=>{const e=this.getTextbox();if(e){const t=e.value.substring(0,e.selectionEnd);(this.props.openWhenEmpty||t.length>=this.props.requiredCharacters)&&this.handlePretextChanged(t)}}),this.props.onFocus&&this.props.onFocus())}),Ne(this,"handleChange",e=>{const t=this.getTextbox(),n=t.value.substring(0,t.selectionEnd).toLowerCase();this.composing||this.pretext===n||this.handlePretextChanged(n),this.props.onChange&&this.props.onChange(e)}),Ne(this,"handleCompositionStart",()=>{this.composing=!0,this.props.onComposition&&this.props.onComposition()}),Ne(this,"handleCompositionUpdate",e=>{if(!e.data)return;const t=this.getTextbox(),n=t.value.substring(0,t.selectionStart)+e.data;this.handlePretextChanged(n),this.props.onComposition&&this.props.onComposition()}),Ne(this,"handleCompositionEnd",()=>{this.composing=!1,this.props.onComposition&&this.props.onComposition()}),Ne(this,"addTextAtCaret",(e,t)=>{const n=this.getTextbox(),r=n.selectionEnd,i=this.props.value,o=n.value.substring(0,n.selectionEnd);let a,s=!1;if(o.toLowerCase().endsWith(t.toLowerCase()))a=o.substring(0,o.length-t.length);else{const n=e.substring(t.length),r=we.findOverlap(o,n);s=0===r.length,a=o.substring(0,o.length-r.length-t.length)}const u=i.substring(r);let l;if(l=s?o:a+e+" "+u,n.value=l,this.props.onChange){const e={target:n};this.props.onChange(e)}window.requestAnimationFrame(()=>{var t,r;n.value===l&&(t=n,r=a.length+e.length+1,function(e,t,n){if(e.setSelectionRange)e.focus(),e.setSelectionRange(t,n);else if(e.createTextRange){var r=e.createTextRange();r.collapse(!0),r.moveEnd("character",n),r.moveStart("character",t),r.select()}}(t,r,r))})}),Ne(this,"replaceText",e=>{const t=this.getTextbox();if(t.value=e,this.props.onChange){const e={target:t};this.props.onChange(e)}}),Ne(this,"handleCompleteWord",(e,t)=>{if(this.props.replaceAllInputOnSelect?this.replaceText(e):this.addTextAtCaret(e,t),this.props.onItemSelected){const t=this.state.items,n=this.state.terms;for(let r=0;r<n.length;r++)if(n[r]===e){this.props.onItemSelected(t[r]);break}}this.clear(),this.inputRef.current.focus();for(const n of this.props.providers)n.handleCompleteWord&&n.handleCompleteWord(e,t)}),Ne(this,"selectNext",()=>{this.setSelectionByDelta(1)}),Ne(this,"selectPrevious",()=>{this.setSelectionByDelta(-1)}),Ne(this,"setSelectionByDelta",e=>{let t=this.state.terms.indexOf(this.state.selection);-1!==t?(t+=e,t<0?t=0:t>this.state.terms.length-1&&(t=this.state.terms.length-1),this.setState({selection:this.state.terms[t]})):this.setState({selection:""})}),Ne(this,"setSelection",e=>{this.setState({selection:e})}),Ne(this,"clear",()=>{this.state.cleared||this.setState({cleared:!0,matchedPretext:[],terms:[],items:[],components:[],selection:""})}),Ne(this,"hasSuggestions",()=>this.state.items.some(e=>!e.loading)),Ne(this,"handleKeyDown",e=>{if((this.props.openWhenEmpty||this.props.value)&&this.hasSuggestions())if(Re(e,Oe.UP))this.selectPrevious(),e.preventDefault();else if(Re(e,Oe.DOWN))this.selectNext(),e.preventDefault();else if(Re(e,Oe.ENTER)||this.props.completeOnTab&&Re(e,Oe.TAB)){let t="";for(let e=0;e<this.state.terms.length;e++)this.state.terms[e]===this.state.selection&&(t=this.state.matchedPretext[e]);this.pretext.endsWith(t)?this.handleCompleteWord(this.state.selection,t):(clearTimeout(this.timeoutId),this.nonDebouncedPretextChanged(this.pretext,!0)),this.props.onKeyDown&&this.props.onKeyDown(e),e.preventDefault()}else Re(e,Oe.ESCAPE)?(this.clear(),e.preventDefault(),e.stopPropagation()):this.props.onKeyDown&&this.props.onKeyDown(e);else this.props.onKeyDown&&this.props.onKeyDown(e)}),Ne(this,"handleReceivedSuggestions",e=>{const t=[],n=[];for(let r=0;r<e.terms.length;r++)t.push(e.component),n.push(e.matchedPretext);const r=e.terms,i=e.items;let o=this.state.selection;return r.length>0?this.state.selection&&-1!==r.indexOf(this.state.selection)||(o=r[0]):this.state.selection&&(o=""),this.setState({cleared:!1,selection:o,terms:r,items:i,components:t,matchedPretext:n}),{selection:o,matchedPretext:e.matchedPretext}}),Ne(this,"handleReceivedSuggestionsAndComplete",e=>{const{selection:t,matchedPretext:n}=this.handleReceivedSuggestions(e);t&&this.handleCompleteWord(t,n)}),Ne(this,"nonDebouncedPretextChanged",(e,t=!1)=>{this.pretext=e;let n=!1,r=this.handleReceivedSuggestions;t&&(r=this.handleReceivedSuggestionsAndComplete);for(const t of this.props.providers)if(n=t.handlePretextChanged(e,r)||n,n){this.setState({allowDividers:t.allowDividers()});break}n||this.clear()}),Ne(this,"debouncedPretextChanged",e=>{clearTimeout(this.timeoutId),this.timeoutId=setTimeout(()=>this.nonDebouncedPretextChanged(e),ye.SEARCH_TIMEOUT_MILLISECONDS)}),Ne(this,"handlePretextChanged",e=>{this.pretext=e,this.debouncedPretextChanged(e)}),Ne(this,"blur",()=>{this.inputRef.current.blur()}),Ne(this,"setContainerRef",e=>{this.container&&(this.container.removeEventListener("focusin",this.handleFocusIn),this.container.removeEventListener("focusout",this.handleFocusOut)),e&&(e.addEventListener("focusin",this.handleFocusIn),e.addEventListener("focusout",this.handleFocusOut)),this.container=e}),this.suggestionReadOut=i.a.createRef(),this.composing=!1,this.pretext="",this.timeoutId="",this.preventSuggestionListCloseFlag=!1,this.state={focused:!1,cleared:!0,matchedPretext:[],items:[],terms:[],components:[],selection:"",allowDividers:!0},this.inputRef=i.a.createRef()}componentDidUpdate(e){const{value:t}=this.props;if(""!==t||this.pretext===t){if(e.contextId!==this.props.contextId){const e=this.getTextbox(),t=e.value.substring(0,e.selectionEnd).toLowerCase();this.handlePretextChanged(t)}}else this.handlePretextChanged(t)}render(){const e=this.props,{listComponent:t,listStyle:n,renderNoResults:r}=e,o=Ae(e,["listComponent","listStyle","renderNoResults"]);Reflect.deleteProperty(o,"providers"),Reflect.deleteProperty(o,"onChange"),Reflect.deleteProperty(o,"onComposition"),Reflect.deleteProperty(o,"onItemSelected"),Reflect.deleteProperty(o,"completeOnTab"),Reflect.deleteProperty(o,"isRHS"),Reflect.deleteProperty(o,"requiredCharacters"),Reflect.deleteProperty(o,"openOnFocus"),Reflect.deleteProperty(o,"openWhenEmpty"),Reflect.deleteProperty(o,"onFocus"),Reflect.deleteProperty(o,"onBlur"),Reflect.deleteProperty(o,"containerClass"),Reflect.deleteProperty(o,"replaceAllInputOnSelect"),Reflect.deleteProperty(o,"contextId"),Reflect.deleteProperty(o,"listenForMentionKeyClick"),Reflect.deleteProperty(o,"wrapperHeight");const a=t;return i.a.createElement("div",{ref:this.setContainerRef,className:this.props.containerClass},i.a.createElement("div",{ref:this.suggestionReadOut,"aria-live":"polite",role:"alert",className:"sr-only"}),i.a.createElement(me,Object.assign({ref:this.inputRef,autoComplete:"off"},o,{onInput:this.handleChange,onCompositionStart:this.handleCompositionStart,onCompositionUpdate:this.handleCompositionUpdate,onCompositionEnd:this.handleCompositionEnd,onKeyDown:this.handleKeyDown})),(this.props.openWhenEmpty||this.props.value.length>=this.props.requiredCharacters)&&i.a.createElement(a,{ariaLiveRef:this.suggestionReadOut,open:this.state.focused,pretext:this.pretext,location:n,renderNoResults:r,onCompleteWord:this.handleCompleteWord,preventClose:this.preventSuggestionListClose,onItemHover:this.setSelection,cleared:this.state.cleared,matchedPretext:this.state.matchedPretext,items:this.state.items,terms:this.state.terms,selection:this.state.selection,components:this.state.components,wrapperHeight:this.props.wrapperHeight}))}static findOverlap(e,t){const n=e.toLowerCase(),r=t.toLowerCase();for(let e=r.length;e>0;e--){const t=r.substring(0,e);if(n.endsWith(t))return t}return""}}function Le(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Pe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Le(Object(n),!0).forEach((function(t){Me(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Le(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Me(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Ne(we,"propTypes",{listComponent:Q.a.func.isRequired,value:Q.a.string.isRequired,providers:Q.a.arrayOf(Q.a.object),listStyle:Q.a.string,containerClass:Q.a.string,renderNoResults:Q.a.bool,completeOnTab:Q.a.bool,onFocus:Q.a.func,onBlur:Q.a.func,onChange:Q.a.func,onKeyDown:Q.a.func,onComposition:Q.a.func,onItemSelected:Q.a.func,isRHS:Q.a.bool,requiredCharacters:Q.a.number,openOnFocus:Q.a.bool,disabled:Q.a.bool,openWhenEmpty:Q.a.bool,replaceAllInputOnSelect:Q.a.bool,contextId:Q.a.string,listenForMentionKeyClick:Q.a.bool,wrapperHeight:Q.a.number}),Ne(we,"defaultProps",{listStyle:"top",containerClass:"",renderNoResults:!1,completeOnTab:!0,isRHS:!1,requiredCharacters:1,openOnFocus:!1,openWhenEmpty:!1,replaceAllInputOnSelect:!1,listenForMentionKeyClick:!1});class Ue extends i.a.PureComponent{constructor(e){super(e),Me(this,"getContent",()=>$(this.contentRef.current)),Me(this,"scrollToItem",e=>{const t=this.getContent();if(!t||0===t.length)return;const n=t[0].clientHeight;if(n<t[0].scrollHeight){const r=t.scrollTop(),i=parseInt(t.css("padding-top"),10),o=parseInt(t.css("padding-top"),10),a=$(te.a.findDOMNode(this.itemRefs.get(e)));if(0===a.length)return;const s=a[0].offsetTop-parseInt(a.css("margin-top"),10),u=parseInt(a.css("margin-bottom"),10)+parseInt(a.css("padding-bottom"),10),l=a[0].offsetTop+a.height()+u;s-i<r?t.scrollTop(s-i):l+i+o>r+n&&t.scrollTop(l-n+i+o)}}),this.contentRef=i.a.createRef(),this.itemRefs=new Map,this.suggestionReadOut=i.a.createRef(),this.currentLabel="",this.currentItem={}}componentDidUpdate(e){this.props.selection!==e.selection&&this.props.selection&&this.scrollToItem(this.props.selection)}renderNoResults(){return i.a.createElement("div",{key:"list-no-results",className:"suggestion-list__no-results",ref:this.contentRef},i.a.createElement("span",{id:"suggestion_list.no_matches"},"No items match "+(this.props.pretext||'""')))}render(){if(!this.props.open||this.props.cleared)return null;const e=[];if(0===this.props.items.length){if(!this.props.renderNoResults)return null;e.push(this.renderNoResults())}for(let t=0;t<this.props.items.length;t++){const n=this.props.items[t],r=this.props.terms[t],o=r===this.props.selection,a=this.props.components[t];n.loading?e.push(i.a.createElement("i",{className:"fa fa-spinner fa-fw fa-pulse spinner",key:n.type})):(o&&(this.currentItem=n),e.push(i.a.createElement(a,{key:r,ref:e=>this.itemRefs.set(r,e),item:this.props.items[t],term:r,matchedPretext:this.props.matchedPretext[t],isSelection:o,onClick:this.props.onCompleteWord,onMouseMove:this.props.onItemHover})))}const t="suggestion-list suggestion-list--"+this.props.location,n="suggestion-list__content suggestion-list__content--"+this.props.location;let r=ye.SUGGESTION_LIST_MAXHEIGHT;this.props.wrapperHeight&&(r=Math.min(window.innerHeight-(this.props.wrapperHeight+ye.SUGGESTION_LIST_MAXHEIGHT),ye.SUGGESTION_LIST_MAXHEIGHT));const o={maxHeight:r};return i.a.createElement("div",{className:t},i.a.createElement("div",{id:"suggestionList",ref:this.contentRef,style:Pe({},o),className:n,onMouseDown:this.props.preventClose},e))}}function De(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Me(Ue,"propTypes",{ariaLiveRef:Q.a.object,open:Q.a.bool.isRequired,location:Q.a.string,renderNoResults:Q.a.bool,onCompleteWord:Q.a.func.isRequired,preventClose:Q.a.func,onItemHover:Q.a.func.isRequired,pretext:Q.a.string.isRequired,cleared:Q.a.bool.isRequired,matchedPretext:Q.a.array.isRequired,items:Q.a.array.isRequired,terms:Q.a.array.isRequired,selection:Q.a.string.isRequired,components:Q.a.array.isRequired,wrapperHeight:Q.a.number}),Me(Ue,"defaultProps",{renderNoResults:!1});class ke extends i.a.PureComponent{constructor(e){super(e),De(this,"onChange",e=>{e&&e.target&&this.setState({input:e.target.value})}),De(this,"handleSelected",e=>{this.setState({input:""}),this.props.onSelected&&this.props.onSelected(e),requestAnimationFrame(()=>{this.suggestionRef&&this.suggestionRef.blur()})}),De(this,"setSuggestionRef",e=>{this.suggestionRef=e}),De(this,"onFocus",()=>{this.setState({focused:!0}),this.props.toggleFocus&&this.props.toggleFocus(!0)}),De(this,"onBlur",()=>{this.setState({focused:!1}),this.props.toggleFocus&&this.props.toggleFocus(!1)}),this.state={input:""}}render(){const{providers:e,placeholder:t,footer:n,label:r,labelClassName:o,helpText:a,inputClassName:s,value:u,disabled:l}=this.props,{focused:c}=this.state;let d,f,{input:h}=this.state;return c||(h=u),r&&(d=i.a.createElement("label",{className:"control-label "+o},r)),a&&(f=i.a.createElement("div",{className:"help-text"},a)),i.a.createElement("div",{"data-testid":"autoCompleteSelector",className:"form-group"},d,i.a.createElement("div",{className:s},i.a.createElement(we,{placeholder:t,ref:this.setSuggestionRef,listComponent:Ue,className:"form-control",containerClass:"select-suggestion-container",value:h,onChange:this.onChange,onItemSelected:this.handleSelected,onFocus:this.onFocus,onBlur:this.onBlur,providers:e,completeOnTab:!0,renderNoResults:!0,openOnFocus:!0,openWhenEmpty:!0,replaceAllInputOnSelect:!0,disabled:l}),f,n))}}De(ke,"propTypes",{providers:Q.a.array.isRequired,value:Q.a.string.isRequired,onSelected:Q.a.func,label:Q.a.node,labelClassName:Q.a.string,inputClassName:Q.a.string,helpText:Q.a.node,placeholder:Q.a.string,footer:Q.a.node,disabled:Q.a.bool,toggleFocus:Q.a.func}),De(ke,"defaultProps",{value:"",id:"",labelClassName:"",inputClassName:""});function Fe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class xe extends i.a.Component{constructor(...e){super(...e),Fe(this,"handleClick",e=>{e.preventDefault(),this.props.onClick(this.props.term,this.props.matchedPretext)}),Fe(this,"handleMouseMove",e=>{e.preventDefault(),this.props.onMouseMove(this.props.term)})}static get propTypes(){return{item:Q.a.oneOfType([Q.a.object,Q.a.string]).isRequired,term:Q.a.string.isRequired,matchedPretext:Q.a.string.isRequired,isSelection:Q.a.bool,onClick:Q.a.func,onMouseMove:Q.a.func}}}Fe(xe,"baseProps",{role:"button",tabIndex:-1});class He extends xe{render(){const{item:e,isSelection:t}=this.props;let n="suggestion-list__item mentions__name";t&&(n+=" suggestion--selected");const r=e.username;let o="";return(e.first_name||e.last_name)&&e.nickname?o="- ".concat(Ie(e)," (").concat(e.nickname,")"):e.nickname?o="- (".concat(e.nickname,")"):(e.first_name||e.last_name)&&(o="- ".concat(Ie(e))),i.a.createElement("div",Object.assign({className:n,onClick:this.handleClick,onMouseMove:this.handleMouseMove},xe.baseProps),i.a.createElement("span",{className:"admin-setting-user--align"},"@"+r),i.a.createElement("span",{className:"admin-setting-user__fullname"}," ",o))}}class Ge extends class{constructor(){this.latestPrefix="",this.latestComplete=!0,this.disableDispatches=!1,this.requestStarted=!1}handlePretextChanged(e){}resetRequest(){this.requestStarted=!1}startNewRequest(e){this.latestPrefix=e,this.latestComplete=!1,this.requestStarted=!0}shouldCancelDispatch(e){if(this.disableDispatches)return!0;if(!this.requestStarted)return!0;if(e===this.latestPrefix)this.latestComplete=!0;else if(this.latestComplete)return!0;return!1}allowDividers(){return!0}presentationType(){return"text"}}{constructor(e){super(),this.autocompleteUsers=e}async handlePretextChanged(e,t){const n=e.toLowerCase();this.startNewRequest(n);const r=await this.autocompleteUsers(n);if(this.shouldCancelDispatch(n))return!1;const i=Object.assign([],r.users);return t({matchedPretext:n,terms:i.map(e=>e.username),items:i,component:He}),!0}}function Ve(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class Be extends i.a.Component{constructor(e){super(e),Ve(this,"handleAttachChange",e=>{const t=e.target.checked;t!==this.state.attachToThread&&this.setState({attachToThread:t})}),Ve(this,"submit",()=>{const{submit:e,close:t,postID:n}=this.props,{message:r,sendTo:i,attachToThread:o}=this.state;o?e(r,i,n):e(r,i),t()}),this.state={message:null,sendTo:null,attachToThread:!1}}static getDerivedStateFromProps(e,t){return e.visible&&null==t.message?{message:e.message}:e.visible||null==t.message&&null==t.sendTo?null:{message:null,sendTo:null,attachToThread:!1}}render(){const{visible:e,theme:t,close:n}=this.props;if(!e)return null;const{message:r}=this.state,o=je(t);return i.a.createElement(fe,{show:e,onClose:n},i.a.createElement("div",{style:o.modal,className:"ToDoPluginRootModal"},i.a.createElement("h1",null,"Add a Todo"),i.a.createElement("div",{className:"todoplugin-issue"},i.a.createElement("h2",null,"Todo Message"),i.a.createElement("textarea",{className:"todoplugin-input",style:o.textarea,value:r,onChange:e=>this.setState({message:e.target.value})})),this.props.postID&&i.a.createElement("div",{className:"todoplugin-add-to-thread"},i.a.createElement("input",{type:"checkbox",checked:this.state.attachToThread,onChange:this.handleAttachChange}),i.a.createElement("b",null," Add to thread"),i.a.createElement("div",{className:"help-text"}," Select to have the Todo Bot respond to the thread when the attached todo is added, modified or completed.")),i.a.createElement("div",null,i.a.createElement(ke,{id:"send_to_user",providers:[new Ge(this.props.autocompleteUsers)],onSelected:e=>this.setState({sendTo:e.username}),label:"Send to user",helpText:"Select a user if you want to send this todo.",placeholder:"",value:this.state.sendTo})),i.a.createElement("div",{className:"todoplugin-button-container"},i.a.createElement("button",{className:"btn btn-primary",style:r?o.button:o.inactiveButton,onClick:this.submit,disabled:!r},"Add Todo")),i.a.createElement("div",{className:"todoplugin-divider"}),i.a.createElement("div",{className:"todoplugin-clarification"},i.a.createElement("div",{className:"todoplugin-question"},"What does this do?"),i.a.createElement("div",{className:"todoplugin-answer"},"Adding a Todo will add an issue to your Todo list. You will get daily reminders about your Todo issues until you mark them as complete."),i.a.createElement("div",{className:"todoplugin-question"},"How is this different from flagging a post?"),i.a.createElement("div",{className:"todoplugin-answer"},"Todo issues are disconnected from posts. You can generate Todo issues from posts but they have no other assoication to the posts. This allows for a cleaner Todo list that does not rely on post history or someone else not deleting or editing the post."))))}}Ve(Be,"propTypes",{visible:Q.a.bool.isRequired,message:Q.a.string.isRequired,postID:Q.a.string.isRequired,close:Q.a.func.isRequired,submit:Q.a.func.isRequired,theme:Q.a.object.isRequired,autocompleteUsers:Q.a.func.isRequired});const je=Object(J.makeStyleFromTheme)(e=>({modal:{color:Object(J.changeOpacity)(e.centerChannelColor,.88)},textarea:{backgroundColor:e.centerChannelBg},helpText:{color:Object(J.changeOpacity)(e.centerChannelColor,.64)},button:{color:e.buttonColor,backgroundColor:e.buttonBg},inactiveButton:{color:Object(J.changeOpacity)(e.buttonColor,.88),backgroundColor:Object(J.changeOpacity)(e.buttonBg,.32)}}));var ze=Object(s.connect)(e=>({visible:k(e),message:x(e)+(F(e)?"\n[Permalink]("+B(e)+"pl/"+F(e)+")":""),postID:F(e)}),e=>Object(u.bindActionCreators)({close:C,submit:A,autocompleteUsers:M},e))(Be),Ye=n(105),We=n.n(Ye);const Qe=e=>i.a.createElement("button",{className:"btn btn-primary",onClick:()=>e.remove(e.issueId)},"out"===e.list?"Cancel":"Won't do");Qe.propTypes={issueId:Q.a.string.isRequired,remove:Q.a.func.isRequired,list:Q.a.string},Qe.defaultProps={list:"my"};var Je=Qe;const Ke=e=>i.a.createElement("button",{className:"btn btn-primary",onClick:()=>e.complete(e.issueId)},"Done");Ke.propTypes={issueId:Q.a.string.isRequired,complete:Q.a.func.isRequired};var qe=Ke;const Xe=e=>i.a.createElement("button",{className:"btn btn-primary",onClick:()=>e.accept(e.issueId)},"Add to my list");Xe.propTypes={issueId:Q.a.string.isRequired,accept:Q.a.func.isRequired};var Ze=Xe;const $e=e=>i.a.createElement("button",{className:"btn btn-primary",onClick:()=>e.bump(e.issueId)},"Bump");$e.propTypes={issueId:Q.a.string.isRequired,bump:Q.a.func.isRequired};var et=$e;const tt=window.PostUtils,nt=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function rt(e){const t=it(e.theme),n=e=>function(e){const t=e.target.getAttributeNode("data-link");if(t){const n=1;e.button===n||e.altKey||e.ctrlKey||e.metaKey||e.shiftKey||(e.preventDefault(),window.WebappUtils.browserHistory.push(t.value))}}(e);return e.issues.length>0?e.issues.map(r=>{const o=new Date(r.create_at),a=o.getFullYear(),s=nt[o.getMonth()],u=o.getDate(),l=o.getHours(),c="0"+o.getMinutes(),d="0"+o.getSeconds(),f=l+":"+c.substr(-2)+":"+d.substr(-2),h=s+" "+u+", "+a,p=tt.formatText(r.message,{siteURL:e.siteURL}),_=tt.messageHtmlToComponent(p);let E="Created ",m="";r.user&&(""===r.list?(E="Sent to "+r.user,m="Accepted. On position "+(r.position+1)+"."):"in"===r.list?(E="Sent to "+r.user,m="In Inbox on position "+(r.position+1)+"."):"out"===r.list&&(E="Received from "+r.user,m=""));const g=i.a.createElement("div",{className:"light",style:t.subtitle},m),v=i.a.createElement(Je,{issueId:r.id,remove:e.remove,list:e.list}),y=i.a.createElement(Ze,{issueId:r.id,accept:e.accept}),T=i.a.createElement(qe,{issueId:r.id,complete:e.complete}),C=i.a.createElement(et,{issueId:r.id,bump:e.bump}),S=i.a.createElement("div",{className:"action-buttons"},Te(e.list,r.list)&&v,Se(e.list)&&y,Ce(e.list)&&T,be(e.list,r.list)&&C);return i.a.createElement("div",{key:r.id,style:t.container},i.a.createElement("div",{className:"todo-text",onClick:n},_),(Te(e.list,r.list)||Ce(e.list)||Se(e.list)||be(e.list,r.list))&&S,i.a.createElement("div",{className:"light",style:t.subtitle},E+" on "+h+" at "+f),m&&g)}):i.a.createElement("div",{style:t.container},"You have no Todo issues")}rt.propTypes={issues:Q.a.array.isRequired,theme:Q.a.object.isRequired,list:Q.a.string.isRequired,remove:Q.a.func.isRequired,complete:Q.a.func.isRequired,accept:Q.a.func.isRequired,bump:Q.a.func.isRequired,siteURL:Q.a.string.isRequired};const it=Object(J.makeStyleFromTheme)(e=>({container:{padding:"15px",borderTop:"1px solid ".concat(Object(J.changeOpacity)(e.centerChannelColor,.2))},issueTitle:{color:e.centerChannelColor,lineHeight:1.7,fontWeight:"bold"},subtitle:{margin:"5px 0 0 0",fontSize:"13px"},message:{width:"100%",overflowWrap:"break-word",whiteSpace:"pre-wrap"}}));var ot=rt;n(219);function at(e){return i.a.createElement("div",Object.assign({},e,{className:"scrollbar--view"}))}function st(e){return i.a.createElement("div",Object.assign({},e,{className:"scrollbar--horizontal"}))}function ut(e){return i.a.createElement("div",Object.assign({},e,{className:"scrollbar--vertical"}))}class lt extends i.a.PureComponent{constructor(e){super(e),this.state={list:e.rhsState||"my",showInbox:!0,showMy:!0}}openList(e){this.state.list!==e&&this.setState({list:e})}toggleInbox(){this.props.actions.telemetry("toggle_inbox",{action:this.state.showInbox?"collapse":"expand"}),this.setState({showInbox:!this.state.showInbox})}toggleMy(){this.props.actions.telemetry("toggle_my",{action:this.state.showMy?"collapse":"expand"}),this.setState({showMy:!this.state.showMy})}componentDidMount(){this.props.actions.list(!1,"my"),this.props.actions.list(!1,"in"),this.props.actions.list(!1,"out"),this.props.actions.setVisible(!0)}componentWillUnmount(){this.props.actions.setVisible(!1)}componentDidUpdate(e){e.rhsState!==this.props.rhsState&&this.openList(this.props.rhsState)}getInIssues(){return this.props.inTodos.length}getOutIssues(){return this.props.outTodos.length}getMyIssues(){return this.props.todos.length}render(){let e,t,n=[],r="",o=[];switch(this.state.list){case"my":n=this.props.todos||[],r="Add new Todo",o=this.props.inTodos||[];break;case"out":n=this.props.outTodos||[],r="Request a Todo from someone"}if(o.length>0){const t=this.state.showInbox?"collapse":"expand";e=i.a.createElement("div",null,i.a.createElement("div",{className:"todo-separator",onClick:()=>this.toggleInbox()},"Incoming Todos (".concat(o.length,") (").concat(t,")")),this.state.showInbox?i.a.createElement(ot,{issues:o,theme:this.props.theme,list:"in",remove:this.props.actions.remove,complete:this.props.actions.complete,accept:this.props.actions.accept,bump:this.props.actions.bump}):"")}if(o.length>0&&n.length>0){const e=this.state.showMy?"collapse":"expand";t=i.a.createElement("div",{className:"todo-separator",onClick:()=>this.toggleMy()},"My Todos (".concat(n.length,") (").concat(e,")"))}return i.a.createElement(i.a.Fragment,null,i.a.createElement(We.a,{autoHide:!0,autoHideTimeout:500,autoHideDuration:500,renderThumbHorizontal:st,renderThumbVertical:ut,renderView:at,className:"SidebarRight"},i.a.createElement("div",{className:"header-menu"},i.a.createElement("div",{className:"btn btn-primary"+("my"===this.state.list?" selected":""),onClick:()=>this.openList("my")},"Todos"," ",this.getMyIssues()>0?" ("+this.getMyIssues()+")":""," ",this.getInIssues()>0?" ("+this.getInIssues()+" received)":""),i.a.createElement("div",{className:"btn btn-primary"+("out"===this.state.list?" selected":""),onClick:()=>this.openList("out")},"Sent"," ",this.getOutIssues()>0?" ("+this.getOutIssues()+")":"")),i.a.createElement("div",{className:"section-header",onClick:()=>{this.props.actions.telemetry("rhs_add",{list:this.state.list}),this.props.actions.openRootModal("")}},r+" ",i.a.createElement("i",{className:"icon fa fa-plus-circle"})),i.a.createElement("div",null,e,t,0===o.length||this.state.showMy&&n.length>0?i.a.createElement(ot,{issues:n,theme:this.props.theme,list:this.state.list,remove:this.props.actions.remove,complete:this.props.actions.complete,accept:this.props.actions.accept,bump:this.props.actions.bump,siteURL:this.props.siteURL}):"")))}}var ct,dt,ft;ct=lt,dt="propTypes",ft={todos:Q.a.arrayOf(Q.a.object),inTodos:Q.a.arrayOf(Q.a.object),outTodos:Q.a.arrayOf(Q.a.object),theme:Q.a.object.isRequired,siteURL:Q.a.string.isRequired,rhsState:Q.a.string,actions:Q.a.shape({remove:Q.a.func.isRequired,complete:Q.a.func.isRequired,accept:Q.a.func.isRequired,bump:Q.a.func.isRequired,list:Q.a.func.isRequired,openRootModal:Q.a.func.isRequired,setVisible:Q.a.func.isRequired,telemetry:Q.a.func.isRequired}).isRequired},dt in ct?Object.defineProperty(ct,dt,{value:ft,enumerable:!0,configurable:!0,writable:!0}):ct[dt]=ft;var ht=Object(s.connect)((function(e){return{todos:H(e),inTodos:G(e),outTodos:V(e),siteURL:j(),rhsState:e["plugins-com.mattermost.plugin-todo"].rhsState}}),(function(e){return{actions:Object(u.bindActionCreators)({remove:O,complete:w,accept:L,bump:P,list:N,openRootModal:T,telemetry:I,setVisible:S},e)}}))(lt);var pt=Object(u.combineReducers)({rootModalVisible:(e=!1,t)=>{switch(t.type){case f:return!0;case h:return!1;default:return e}},postID:(e="",t)=>{switch(t.type){case f:return t.postID;case h:return"";default:return e}},issues:(e=[],t)=>{switch(t.type){case p:return t.data;default:return e}},inIssues:(e=[],t)=>{switch(t.type){case E:return t.data;default:return e}},outIssues:(e=[],t)=>{switch(t.type){case _:return t.data;default:return e}},rhsState:function(e="",t){switch(t.type){case g:return t.state;default:return e}},rhsPluginAction:function(e=null,t){switch(t.type){case m:return t.showRHSPluginAction;default:return e}},isRhsVisible:function(e=!1,t){switch(t.type){case v:return t.payload;default:return e}},isTeamSidebarHidden:function(e=!1,t){switch(t.type){case y:return t.payload;default:return e}}});function _t(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Et=window.PostUtils;class mt extends i.a.PureComponent{constructor(e){super(e),this.state={}}render(){const e=gt(this.props.theme),t=Et.formatText(this.props.post.props.message,{siteURL:this.props.siteURL}),n=Et.messageHtmlToComponent(t),r=Et.formatText(this.props.post.props.todo,{siteURL:this.props.siteURL}),o=Et.messageHtmlToComponent(r),a=i.a.createElement("div",{className:"todo-post",style:e.body},i.a.createElement(Je,{issueId:this.props.post.props.issueId,remove:e=>{this.props.actions.telemetry("custom_post_remove"),this.props.actions.remove(e)}}),i.a.createElement(Ze,{issueId:this.props.post.props.issueId,accept:e=>{this.props.actions.telemetry("custom_post_accept"),this.props.actions.accept(e)}}),i.a.createElement(qe,{issueId:this.props.post.props.issueId,complete:e=>{this.props.actions.telemetry("custom_post_complete"),this.props.actions.complete(e)}}));return i.a.createElement("div",null,"Automated message",i.a.createElement("div",{style:e.attachment},i.a.createElement("div",{style:e.content},i.a.createElement("div",{style:e.container},i.a.createElement("h1",{style:e.title},n),o,i.a.createElement("div",null,this.props.pendingAnswer&&a)))))}}_t(mt,"propTypes",{post:Q.a.object.isRequired,pendingAnswer:Q.a.bool.isRequired,theme:Q.a.object.isRequired,siteURL:Q.a.string.isRequired,actions:Q.a.shape({complete:Q.a.func.isRequired,remove:Q.a.func.isRequired,accept:Q.a.func.isRequired,telemetry:Q.a.func.isRequired}).isRequired}),_t(mt,"defaultProps",{});const gt=Object(J.makeStyleFromTheme)(e=>({attachment:{marginLeft:"-20px",position:"relative"},content:{borderRadius:"4px",borderStyle:"solid",borderWidth:"1px",borderColor:"#BDBDBF",margin:"5px 0 5px 20px",padding:"2px 5px"},container:{borderLeftStyle:"solid",borderLeftWidth:"4px",padding:"10px",borderLeftColor:"#89AECB"},body:{overflowX:"auto",overflowY:"hidden",paddingRight:"5px",width:"100%"},title:{fontSize:"16px",fontWeight:"600",height:"22px",lineHeight:"18px",margin:"5px 0 1px 0",padding:"0"},button:{fontFamily:"Open Sans",fontSize:"12px",fontWeight:"bold",letterSpacing:"1px",lineHeight:"19px",marginTop:"12px",borderRadius:"4px",color:e.buttonColor},buttonIcon:{paddingRight:"8px",fill:e.buttonColor},summary:{fontFamily:"Open Sans",fontSize:"14px",fontWeight:"600",lineHeight:"26px",margin:"0",padding:"14px 0 0 0"},summaryIssue:{fontFamily:"Open Sans",fontSize:"14px",lineHeight:"26px"}}));function vt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function yt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?vt(Object(n),!0).forEach((function(t){Tt(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Tt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ct=Object(s.connect)((function(e,t){return yt(yt({},t),{},{siteURL:j(),pendingAnswer:e["plugins-com.mattermost.plugin-todo"].inIssues.some(e=>e.id===t.post.props.issueId)})}),(function(e){return{actions:Object(u.bindActionCreators)({remove:O,complete:w,accept:L,telemetry:I},e)}}))(mt),St=n(24);function bt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class Rt extends i.a.PureComponent{constructor(e){super(e),bt(this,"openRHS",e=>{this.props.actions.updateRhsState(e),this.props.showRHSPlugin()}),this.state={refreshing:!1}}render(){const e=It(this.props.theme),t=this.props.isTeamSidebar;let n=e.containerHeader,r=e.buttonHeader,o="bottom";t&&(o="right",r=e.buttonTeam,n=e.containerTeam);const a=this.props.issues||[],s=this.props.inIssues||[],u=this.props.outIssues||[];return i.a.createElement("div",{style:n},i.a.createElement(St.OverlayTrigger,{key:"myTodosLink",placement:o,overlay:i.a.createElement(St.Tooltip,{id:"myTodosTooltip"},"Your Todos")},i.a.createElement("a",{style:r,onClick:()=>{this.props.actions.telemetry("click_lhs_my"),this.openRHS(ge)}},i.a.createElement("i",{className:"icon icon-check"})," "+a.length)),i.a.createElement(St.OverlayTrigger,{key:"incomingTodosLink",placement:o,overlay:i.a.createElement(St.Tooltip,{id:"incomingTodosTooltip"},"Incoming Todos")},i.a.createElement("a",{onClick:()=>{this.props.actions.telemetry("click_lhs_in"),this.openRHS(ge)},style:r},i.a.createElement("i",{className:"icon icon-arrow-down"})," "+s.length)),i.a.createElement(St.OverlayTrigger,{key:"outgoingTodosLink",placement:o,overlay:i.a.createElement(St.Tooltip,{id:"outgoingTodosTooltip"},"Outgoing Todos")},i.a.createElement("a",{onClick:()=>{this.props.actions.telemetry("click_lhs_out"),this.openRHS(ve)},style:r},i.a.createElement("i",{className:"icon icon-arrow-up"})," "+u.length)))}}bt(Rt,"propTypes",{theme:Q.a.object.isRequired,isTeamSidebar:Q.a.bool,showRHSPlugin:Q.a.func.isRequired,issues:Q.a.arrayOf(Q.a.object),inIssues:Q.a.arrayOf(Q.a.object),outIssues:Q.a.arrayOf(Q.a.object),actions:Q.a.shape({list:Q.a.func.isRequired,updateRhsState:Q.a.func.isRequired,telemetry:Q.a.func.isRequired}).isRequired});const It=Object(J.makeStyleFromTheme)(e=>({buttonTeam:{color:Object(J.changeOpacity)(e.sidebarText,.6),display:"block",marginBottom:"10px",width:"100%"},buttonHeader:{color:Object(J.changeOpacity)(e.sidebarText,.6),textAlign:"center",cursor:"pointer"},containerHeader:{marginTop:"10px",marginBottom:"5px",display:"flex",alignItems:"center",justifyContent:"space-around",padding:"0 10px"},containerTeam:{}}));var At=Object(s.connect)((function(e){return{issues:e["plugins-com.mattermost.plugin-todo"].issues,inIssues:e["plugins-com.mattermost.plugin-todo"].inIssues,outIssues:e["plugins-com.mattermost.plugin-todo"].outIssues,showRHSPlugin:e["plugins-com.mattermost.plugin-todo"].rhsPluginAction}}),(function(e){return{actions:Object(u.bindActionCreators)({list:N,updateRhsState:b,telemetry:I},e)}}))(Rt);class Nt extends i.a.PureComponent{render(){return this.props.show&&this.props.visible?i.a.createElement(At,{theme:this.props.theme,isTeamSidebar:!0}):null}}!function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(Nt,"propTypes",{show:Q.a.bool.isRequired,theme:Q.a.object.isRequired,visible:Q.a.bool.isRequired});var Ot=Object(s.connect)((function(e){const t=e.entities.teams.myMembers||{};return{show:Object.keys(t).length>1,visible:Y(e)}}))(Nt);n(221);function wt(e){let t="icon fa fa-list";return e.shouldHighlight&&(t+=" todo-plugin-icon--active"),i.a.createElement("i",{className:t})}wt.propTypes={shouldHighlight:Q.a.bool.isRequired};var Lt=Object(s.connect)((function(e){return{shouldHighlight:z(e)}}),(function(e){return{actions:Object(u.bindActionCreators)({showRHSPlugin:void 0},e)}}))(wt);let Pt,Mt=Number.MAX_SAFE_INTEGER;class Ut{initialize(e,t){e.registerReducer(pt),e.registerRootComponent(ze),e.registerBottomTeamSidebarComponent(Ot),e.registerPostDropdownMenuAction("Add Todo",e=>{I("post_action_click"),t.dispatch(T(e))});const{toggleRHSPlugin:n,showRHSPlugin:r}=e.registerRightHandSidebarComponent(ht,"Todo List");t.dispatch({type:m,showRHSPluginAction:()=>t.dispatch(r)}),e.registerChannelHeaderButtonAction(i.a.createElement(Lt,null),()=>{I("channel_header_click"),t.dispatch(n)},"Todo","Open your list of Todo issues.");const o=()=>{t.dispatch(N(!1,"my")),t.dispatch(N(!1,"in")),t.dispatch(N(!1,"out"))};e.registerWebSocketEventHandler("custom_".concat(a,"_refresh"),o),e.registerReconnectHandler(o),t.dispatch(N(!0)),t.dispatch(N(!1,"in")),t.dispatch(N(!1,"out"));e.registerWebSocketEventHandler("custom_".concat(a,"_config_update"),({data:e})=>{t.dispatch(U(e.hide_team_sidebar))}),t.dispatch(async(e,t)=>{let n,r;try{n=await fetch(R(t())+"/config",c.Client4.getOptions({method:"get"})),r=await n.json()}catch(e){return{error:e}}return e(U(r.hide_team_sidebar)),{data:r}}),Pt=()=>{const e=(new Date).getTime();e-Mt>36e5&&t.dispatch(N(!0)),Mt=e},document.addEventListener("click",Pt),e.registerPostTypeComponent("custom_todo",Ct)}deinitialize(){document.removeEventListener("click",Pt)}}window.registerPlugin(a,new Ut)}]);