VaKeR CYBER ARMY
Logo of a company Server : Apache/2.4.41 (Ubuntu)
System : Linux absol.cf 5.4.0-198-generic #218-Ubuntu SMP Fri Sep 27 20:18:53 UTC 2024 x86_64
User : www-data ( 33)
PHP Version : 7.4.33
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Directory :  /opt/mattermost/client/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //opt/mattermost/client/1748.62380fa76169787cc5e6.js.map
{"version":3,"file":"1748.62380fa76169787cc5e6.js","mappings":"2YAqBO,MAAMA,EAAgBC,GAClBC,QAAQD,aAAC,EAADA,EAAGE,QAiFtB,EA1EuBC,IACnB,MAAM,QAACC,GAAWD,EAEZE,GAAWC,EAAAA,EAAAA,eACXC,GAAOC,EAAAA,EAAAA,WAEPC,GAAYC,EAAAA,EAAAA,aAAYC,EAAAA,IACxBC,GAASF,EAAAA,EAAAA,aAAYG,EAAAA,IA6CrBC,EAAK,gBAAHC,OAAmBX,EAAQF,QAC7Bc,EAAQZ,EAAQY,OAASZ,EAAQF,OAEvC,OACIe,IAAAA,cAACC,EAAAA,EAAW,CACRC,MAAOH,EACPI,YAAY,GAEZH,IAAAA,cAAA,OACIH,GAAIA,EACJ,aAAYE,EACZK,UAAW,gBACXC,QAvDUC,UAClB,MAAMC,GAAUC,EAAAA,EAAAA,IACZrB,EAAQF,OACRE,EAAQsB,SACRjB,EACAG,GAGEe,QAAetB,GAASuB,EAAAA,EAAAA,IAAmBxB,EAASoB,EAASjB,IAEnE,GAAIoB,EAAOE,MAA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OAoBvBP,EAAOC,QAPP,SAAwBO,EAAYL,EAAQC,EAAUC,GAIpD,OAHAE,EAASC,GAAY,SAASZ,EAAO7H,EAAKyI,GACxCL,EAAOE,EAAaT,EAAOQ,EAASR,GAAQY,EAC9C,IACOH,CACT,C,kBClBA,IAAII,EAAa,EAAQ,OAWrBF,EAViB,EAAQ,MAUdG,CAAeD,GAE9BT,EAAOC,QAAUM,C,kBCbjB,IAAII,EAAkB,EAAQ,OAC1BC,EAAiB,EAAQ,OACzBC,EAAe,EAAQ,OACvBC,EAAU,EAAQ,MAmBtBd,EAAOC,QATP,SAA0BE,EAAQY,GAChC,OAAO,SAASP,EAAYJ,GAC1B,IAAIY,EAAOF,EAAQN,GAAcG,EAAkBC,EAC/CP,EAAcU,EAAcA,IAAgB,CAAC,EAEjD,OAAOC,EAAKR,EAAYL,EAAQU,EAAaT,EAAU,GAAIC,EAC7D,CACF,C,kBCpBA,IAAIY,EAAc,EAAQ,OA+B1BjB,EAAOC,QArBP,SAAwBiB,EAAUC,GAChC,OAAO,SAASX,EAAYJ,GAC1B,GAAkB,MAAdI,EACF,OAAOA,EAET,IAAKS,EAAYT,GACf,OAAOU,EAASV,EAAYJ,GAM9B,IAJA,IAAI7D,EAASiE,EAAWjE,OACpB+D,EAAQa,EAAY5E,GAAU,EAC9B6E,EAAWC,OAAOb,IAEdW,EAAYb,MAAYA,EAAQ/D,KACa,IAA/C6D,EAASgB,EAASd,GAAQA,EAAOc,KAIvC,OAAOZ,CACT,CACF,C,kBC7BA,IAsCItE,EAtCmB,EAAQ,MAsCfoF,EAAiB,SAAStL,EAAQ4J,EAAO7H,GACvD/B,EAAO+B,EAAM,EAAI,GAAGwJ,KAAK3B,EAC3B,IAAG,WAAa,MAAO,CAAC,GAAI,GAAK,IAEjCI,EAAOC,QAAU/D,C","sources":["webpack://mattermost-webapp/./src/components/app_bar/app_bar_binding.tsx","webpack://mattermost-webapp/./src/components/app_bar/app_bar_marketplace.tsx","webpack://mattermost-webapp/./src/components/app_bar/app_bar_plugin_component.tsx","webpack://mattermost-webapp/./src/components/app_bar/app_bar.tsx","webpack://mattermost-webapp/./src/components/app_bar/new_channel_with_board_tour_tip.tsx","webpack://mattermost-webapp/./src/packages/mattermost-redux/src/actions/boards.ts","webpack://mattermost-webapp/../node_modules/lodash/_arrayAggregator.js","webpack://mattermost-webapp/../node_modules/lodash/_baseAggregator.js","webpack://mattermost-webapp/../node_modules/lodash/_baseEach.js","webpack://mattermost-webapp/../node_modules/lodash/_createAggregator.js","webpack://mattermost-webapp/../node_modules/lodash/_createBaseEach.js","webpack://mattermost-webapp/../node_modules/lodash/partition.js"],"sourcesContent":["// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.\n// See LICENSE.txt for license information.\n\nimport React from 'react';\nimport {useIntl} from 'react-intl';\nimport {useDispatch, useSelector} from 'react-redux';\n\nimport type {AppBinding, AppCallResponse} from '@mattermost/types/apps';\n\nimport {AppCallResponseTypes} from 'mattermost-redux/constants/apps';\nimport {getCurrentChannelId} from 'mattermost-redux/selectors/entities/common';\nimport {getCurrentTeamId} from 'mattermost-redux/selectors/entities/teams';\n\nimport {handleBindingClick, openAppsModal, postEphemeralCallResponseForContext} from 'actions/apps';\n\nimport WithTooltip from 'components/with_tooltip';\n\nimport {createCallContext} from 'utils/apps';\n\nimport type {DoAppCallResult} from 'types/apps';\n\nexport const isAppBinding = (x: Record<string, any> | undefined): x is AppBinding => {\n    return Boolean(x?.app_id);\n};\n\ntype BindingComponentProps = {\n    binding: AppBinding;\n}\n\nconst AppBarBinding = (props: BindingComponentProps) => {\n    const {binding} = props;\n\n    const dispatch = useDispatch();\n    const intl = useIntl();\n\n    const channelId = useSelector(getCurrentChannelId);\n    const teamId = useSelector(getCurrentTeamId);\n\n    const submitAppCall = async () => {\n        const context = createCallContext(\n            binding.app_id,\n            binding.location,\n            channelId,\n            teamId,\n        );\n\n        const result = await dispatch(handleBindingClick(binding, context, intl)) as DoAppCallResult;\n\n        if (result.error) {\n            const errMsg = result.error.text || 'An error occurred';\n            dispatch(postEphemeralCallResponseForContext(result.error, errMsg, context));\n            return;\n        }\n\n        const callResp = result.data as AppCallResponse;\n\n        switch (callResp.type) {\n        case AppCallResponseTypes.OK:\n            if (callResp.text) {\n                dispatch(postEphemeralCallResponseForContext(callResp, callResp.text, context));\n            }\n            return;\n        case AppCallResponseTypes.FORM:\n            if (callResp.form) {\n                dispatch(openAppsModal(callResp.form, context));\n            }\n            return;\n        case AppCallResponseTypes.NAVIGATE:\n            return;\n        default: {\n            const errorMessage = intl.formatMessage({\n                id: 'apps.error.responses.unknown_type',\n                defaultMessage: 'App response type not supported. Response type: {type}.',\n            }, {\n                type: callResp.type,\n            });\n            dispatch(postEphemeralCallResponseForContext(callResp, errorMessage, context));\n        }\n        }\n    };\n\n    const id = `app-bar-icon-${binding.app_id}`;\n    const label = binding.label || binding.app_id;\n\n    return (\n        <WithTooltip\n            title={label}\n            isVertical={false}\n        >\n            <div\n                id={id}\n                aria-label={label}\n                className={'app-bar__icon'}\n                onClick={submitAppCall}\n            >\n                <div className={'app-bar__icon-inner'}>\n                    <img src={binding.icon}/>\n                </div>\n            </div>\n        </WithTooltip>\n    );\n};\n\nexport default AppBarBinding;\n","// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.\n// See LICENSE.txt for license information.\n\nimport React, {useCallback} from 'react';\nimport {useIntl} from 'react-intl';\nimport {useDispatch} from 'react-redux';\n\nimport {ViewGridPlusOutlineIcon} from '@mattermost/compass-icons/components';\n\nimport {openModal} from 'actions/views/modals';\n\nimport MarketplaceModal from 'components/plugin_marketplace/marketplace_modal';\nimport WithTooltip from 'components/with_tooltip';\n\nimport {ModalIdentifiers} from 'utils/constants';\n\nconst AppBarMarketplace = () => {\n    const {formatMessage} = useIntl();\n    const dispatch = useDispatch();\n\n    const handleOpenMarketplace = useCallback(() => {\n        dispatch(\n            openModal({\n                modalId: ModalIdentifiers.PLUGIN_MARKETPLACE,\n                dialogType: MarketplaceModal,\n                dialogProps: {openedFrom: 'app_bar'},\n            }),\n        );\n    }, [dispatch]);\n\n    const label = formatMessage({id: 'app_bar.marketplace', defaultMessage: 'App Marketplace'});\n\n    return (\n        <WithTooltip\n            title={label}\n            isVertical={false}\n        >\n            <button\n                key='app_bar_marketplace'\n                className='app_bar__marketplace_button'\n                aria-label={label}\n                onClick={handleOpenMarketplace}\n            >\n                <ViewGridPlusOutlineIcon size={18}/>\n            </button>\n        </WithTooltip>\n    );\n};\n\nexport default AppBarMarketplace;\n","// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.\n// See LICENSE.txt for license information.\n\nimport classNames from 'classnames';\nimport React, {useState, useEffect} from 'react';\nimport {useSelector} from 'react-redux';\n\nimport {getCurrentChannel, getMyCurrentChannelMembership} from 'mattermost-redux/selectors/entities/channels';\n\nimport {getActiveRhsComponent} from 'selectors/rhs';\n\nimport PluginIcon from 'components/widgets/icons/plugin_icon';\nimport WithTooltip from 'components/with_tooltip';\n\nimport {suitePluginIds} from 'utils/constants';\n\nimport type {PluginComponent, AppBarComponent} from 'types/store/plugins';\n\nimport NewChannelWithBoardTourTip from './new_channel_with_board_tour_tip';\n\ntype PluginComponentProps = {\n    component: AppBarComponent;\n}\n\nenum ImageLoadState {\n    LOADING = 'loading',\n    LOADED = 'loaded',\n    ERROR = 'error',\n}\n\nexport const isAppBarPluginComponent = (x: Record<string, any> | undefined): x is PluginComponent => {\n    return Boolean(x?.id && x?.pluginId);\n};\n\nconst AppBarPluginComponent = (props: PluginComponentProps) => {\n    const {component} = props;\n\n    const channel = useSelector(getCurrentChannel);\n    const channelMember = useSelector(getMyCurrentChannelMembership);\n    const activeRhsComponent = useSelector(getActiveRhsComponent);\n\n    const [imageLoadState, setImageLoadState] = useState<ImageLoadState>(ImageLoadState.LOADING);\n\n    useEffect(() => {\n        setImageLoadState(ImageLoadState.LOADING);\n    }, [component.iconUrl]);\n\n    const onImageLoadComplete = () => {\n        setImageLoadState(ImageLoadState.LOADED);\n    };\n\n    const onImageLoadError = () => {\n        setImageLoadState(ImageLoadState.ERROR);\n    };\n\n    const buttonId = `app-bar-icon-${component.pluginId}`;\n    const tooltipText = component.tooltipText || component.dropdownText || component.pluginId;\n\n    const iconUrl = component.iconUrl;\n    let content: React.ReactNode = (\n        <div\n            role='button'\n            tabIndex={0}\n            className='app-bar__icon-inner'\n        >\n            <img\n                src={iconUrl}\n                alt={component.pluginId}\n                onLoad={onImageLoadComplete}\n                onError={onImageLoadError}\n            />\n        </div>\n    );\n\n    const isButtonActive = component.rhsComponentId ? activeRhsComponent?.id === component.rhsComponentId : component.pluginId === activeRhsComponent?.pluginId;\n\n    if (!iconUrl) {\n        content = (\n            <div\n                role='button'\n                tabIndex={0}\n                className={classNames('app-bar__old-icon app-bar__icon-inner app-bar__icon-inner--centered', {'app-bar__old-icon--active': isButtonActive})}\n            >\n                {component.icon}\n            </div>\n        );\n    }\n\n    if (imageLoadState === ImageLoadState.ERROR) {\n        content = (\n            <PluginIcon className='icon__plugin'/>\n        );\n    }\n\n    const boardsEnabled = component.pluginId === suitePluginIds.focalboard;\n\n    return (\n        <WithTooltip\n            title={tooltipText}\n            isVertical={false}\n        >\n            <div\n                id={buttonId}\n                className={classNames('app-bar__icon', {'app-bar__icon--active': isButtonActive})}\n                onClick={() => {\n                    component.action?.(channel, channelMember);\n                }}\n            >\n                {content}\n                {boardsEnabled && <NewChannelWithBoardTourTip/>}\n            </div>\n        </WithTooltip>\n    );\n};\n\nexport default AppBarPluginComponent;\n","// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.\n// See LICENSE.txt for license information.\n\nimport partition from 'lodash/partition';\nimport React from 'react';\nimport type {ReactNode} from 'react';\nimport {useSelector} from 'react-redux';\n\nimport type {GlobalState} from '@mattermost/types/store';\n\nimport {Permissions} from 'mattermost-redux/constants';\nimport {getAppBarAppBindings} from 'mattermost-redux/selectors/entities/apps';\nimport {isMarketplaceEnabled} from 'mattermost-redux/selectors/entities/general';\nimport {haveICurrentTeamPermission} from 'mattermost-redux/selectors/entities/roles';\n\nimport {getAppBarPluginComponents, getChannelHeaderPluginComponents, shouldShowAppBar} from 'selectors/plugins';\n\nimport {suitePluginIds} from 'utils/constants';\nimport {useCurrentProduct, useCurrentProductId, inScope} from 'utils/products';\n\nimport AppBarBinding, {isAppBinding} from './app_bar_binding';\nimport AppBarMarketplace from './app_bar_marketplace';\nimport AppBarPluginComponent, {isAppBarPluginComponent} from './app_bar_plugin_component';\n\nimport './app_bar.scss';\n\nexport default function AppBar() {\n    const channelHeaderComponents = useSelector(getChannelHeaderPluginComponents);\n    const appBarPluginComponents = useSelector(getAppBarPluginComponents);\n    const appBarBindings = useSelector(getAppBarAppBindings);\n    const currentProduct = useCurrentProduct();\n    const currentProductId = useCurrentProductId();\n    const enabled = useSelector(shouldShowAppBar);\n    const canOpenMarketplace = useSelector((state: GlobalState) => (\n        isMarketplaceEnabled(state) &&\n        haveICurrentTeamPermission(state, Permissions.SYSCONSOLE_WRITE_PLUGINS)\n    ));\n\n    if (\n        !enabled ||\n        (currentProduct && !currentProduct.showAppBar)\n    ) {\n        return null;\n    }\n\n    const coreProductsPluginIds = [suitePluginIds.focalboard, suitePluginIds.playbooks];\n\n    const [coreProductComponents, pluginComponents] = partition(appBarPluginComponents, ({pluginId}) => {\n        return coreProductsPluginIds.includes(pluginId);\n    });\n\n    const items: ReactNode[] = [\n        ...coreProductComponents,\n        getDivider(coreProductComponents.length, (pluginComponents.length + channelHeaderComponents.length + appBarBindings.length)),\n        ...pluginComponents,\n        ...channelHeaderComponents,\n        ...appBarBindings,\n    ].map((x) => {\n        if (!x) {\n            return x;\n        }\n\n        if (isAppBarPluginComponent(x)) {\n            if (!inScope(x.supportedProductIds ?? null, currentProductId, currentProduct?.pluginId)) {\n                return null;\n            }\n            return (\n                <AppBarPluginComponent\n                    key={x.id}\n                    component={x}\n                />\n            );\n        } else if (isAppBinding(x)) {\n            if (!inScope(x.supported_product_ids ?? null, currentProductId, currentProduct?.pluginId)) {\n                return null;\n            }\n            return (\n                <AppBarBinding\n                    key={`${x.app_id}_${x.label}`}\n                    binding={x}\n                />\n            );\n        }\n        return x;\n    });\n\n    return (\n        <div className={'app-bar'}>\n            <div className={'app-bar__top'}>\n                {items}\n            </div>\n            {canOpenMarketplace && (\n                <div className='app-bar__bottom'>\n                    <AppBarMarketplace/>\n                </div>\n            )}\n        </div>\n    );\n}\n\nconst getDivider = (beforeCount: number, afterCount: number) => (beforeCount && afterCount ? (\n    <hr\n        key='divider'\n        className='app-bar__divider'\n    />\n) : null);\n","// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.\n// See LICENSE.txt for license information.\n\nimport React, {useCallback, useState} from 'react';\nimport {FormattedMessage} from 'react-intl';\nimport {useDispatch, useSelector} from 'react-redux';\nimport type {Placement} from 'tippy.js';\n\nimport {TourTip, useMeasurePunchouts} from '@mattermost/components';\n\nimport {setNewChannelWithBoardPreference} from 'mattermost-redux/actions/boards';\nimport {Preferences} from 'mattermost-redux/constants';\n\nimport {showNewChannelWithBoardPulsatingDot} from 'selectors/plugins';\n\ntype Props = {\n    pulsatingDotPlacement?: Omit<Placement, 'auto'| 'auto-end'>;\n    pulsatingDotTranslate?: {x: number; y: number};\n}\n\nconst NewChannelWithBoardTourTip = ({\n    pulsatingDotPlacement = 'left',\n    pulsatingDotTranslate,\n}: Props): JSX.Element | null => {\n    const dispatch = useDispatch();\n    const showTip = useSelector(showNewChannelWithBoardPulsatingDot);\n\n    const title = (\n        <FormattedMessage\n            id='newChannelWithBoard.tutorialTip.title'\n            defaultMessage='Access linked boards from the App Bar'\n        />\n    );\n\n    const screen = (\n        <FormattedMessage\n            id='newChannelWithBoard.tutorialTip.description'\n            defaultMessage='The board you just created can be quickly accessed by clicking on the Boards icon in the App bar. You can view the boards that are linked to this channel in the right-hand sidebar and open one in full view.'\n        />\n    );\n\n    const [tipOpened, setTipOpened] = useState(showTip);\n\n    const handleDismiss = useCallback((e: React.MouseEvent) => {\n        e.stopPropagation();\n        setTipOpened(false);\n        dispatch(setNewChannelWithBoardPreference({[Preferences.NEW_CHANNEL_WITH_BOARD_TOUR_SHOWED]: true}));\n    }, []);\n\n    const handleOpen = useCallback((e: React.MouseEvent) => {\n        e.stopPropagation();\n        e.preventDefault();\n\n        if (tipOpened) {\n            dispatch(setNewChannelWithBoardPreference({[Preferences.NEW_CHANNEL_WITH_BOARD_TOUR_SHOWED]: true}));\n            setTipOpened(false);\n        } else {\n            setTipOpened(true);\n        }\n    }, []);\n\n    const overlayPunchOut = useMeasurePunchouts(['app-bar-icon-focalboard'], [], {y: -2, height: 4, x: 0, width: 0});\n\n    if (!showTip) {\n        return null;\n    }\n\n    return (\n        <TourTip\n            show={true}\n            screen={screen}\n            title={title}\n            overlayPunchOut={overlayPunchOut}\n            placement='right-start'\n            pulsatingDotPlacement={pulsatingDotPlacement}\n            step={1}\n            singleTip={true}\n            showOptOut={false}\n            interactivePunchOut={true}\n            handleDismiss={handleDismiss}\n            handleOpen={handleOpen}\n            handlePrevious={handleDismiss}\n            offset={[-30, 5]}\n            pulsatingDotTranslate={pulsatingDotTranslate}\n        />\n    );\n};\n\nexport default NewChannelWithBoardTourTip;\n","// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.\n// See LICENSE.txt for license information.\n\nimport type {PreferenceType} from '@mattermost/types/preferences';\n\nimport {getCurrentUserId} from 'mattermost-redux/selectors/entities/users';\nimport type {ActionFuncAsync} from 'mattermost-redux/types/actions';\n\nimport {savePreferences} from './preferences';\n\nimport {Preferences} from '../constants';\n\nexport function setNewChannelWithBoardPreference(initializationState: Record<string, boolean>): ActionFuncAsync {\n    return async (dispatch, getState) => {\n        const state = getState();\n        const currentUserId = getCurrentUserId(state);\n        const preference: PreferenceType = {\n            user_id: currentUserId,\n            category: Preferences.APP_BAR,\n            name: Preferences.NEW_CHANNEL_WITH_BOARD_TOUR_SHOWED,\n            value: JSON.stringify(initializationState),\n        };\n        await dispatch(savePreferences(currentUserId, [preference]));\n        return {data: true};\n    };\n}\n","/**\n * A specialized version of `baseAggregator` for arrays.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} setter The function to set `accumulator` values.\n * @param {Function} iteratee The iteratee to transform keys.\n * @param {Object} accumulator The initial aggregated object.\n * @returns {Function} Returns `accumulator`.\n */\nfunction arrayAggregator(array, setter, iteratee, accumulator) {\n  var index = -1,\n      length = array == null ? 0 : array.length;\n\n  while (++index < length) {\n    var value = array[index];\n    setter(accumulator, value, iteratee(value), array);\n  }\n  return accumulator;\n}\n\nmodule.exports = arrayAggregator;\n","var baseEach = require('./_baseEach');\n\n/**\n * Aggregates elements of `collection` on `accumulator` with keys transformed\n * by `iteratee` and values set by `setter`.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} setter The function to set `accumulator` values.\n * @param {Function} iteratee The iteratee to transform keys.\n * @param {Object} accumulator The initial aggregated object.\n * @returns {Function} Returns `accumulator`.\n */\nfunction baseAggregator(collection, setter, iteratee, accumulator) {\n  baseEach(collection, function(value, key, collection) {\n    setter(accumulator, value, iteratee(value), collection);\n  });\n  return accumulator;\n}\n\nmodule.exports = baseAggregator;\n","var baseForOwn = require('./_baseForOwn'),\n    createBaseEach = require('./_createBaseEach');\n\n/**\n * The base implementation of `_.forEach` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n */\nvar baseEach = createBaseEach(baseForOwn);\n\nmodule.exports = baseEach;\n","var arrayAggregator = require('./_arrayAggregator'),\n    baseAggregator = require('./_baseAggregator'),\n    baseIteratee = require('./_baseIteratee'),\n    isArray = require('./isArray');\n\n/**\n * Creates a function like `_.groupBy`.\n *\n * @private\n * @param {Function} setter The function to set accumulator values.\n * @param {Function} [initializer] The accumulator object initializer.\n * @returns {Function} Returns the new aggregator function.\n */\nfunction createAggregator(setter, initializer) {\n  return function(collection, iteratee) {\n    var func = isArray(collection) ? arrayAggregator : baseAggregator,\n        accumulator = initializer ? initializer() : {};\n\n    return func(collection, setter, baseIteratee(iteratee, 2), accumulator);\n  };\n}\n\nmodule.exports = createAggregator;\n","var isArrayLike = require('./isArrayLike');\n\n/**\n * Creates a `baseEach` or `baseEachRight` function.\n *\n * @private\n * @param {Function} eachFunc The function to iterate over a collection.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseEach(eachFunc, fromRight) {\n  return function(collection, iteratee) {\n    if (collection == null) {\n      return collection;\n    }\n    if (!isArrayLike(collection)) {\n      return eachFunc(collection, iteratee);\n    }\n    var length = collection.length,\n        index = fromRight ? length : -1,\n        iterable = Object(collection);\n\n    while ((fromRight ? index-- : ++index < length)) {\n      if (iteratee(iterable[index], index, iterable) === false) {\n        break;\n      }\n    }\n    return collection;\n  };\n}\n\nmodule.exports = createBaseEach;\n","var createAggregator = require('./_createAggregator');\n\n/**\n * Creates an array of elements split into two groups, the first of which\n * contains elements `predicate` returns truthy for, the second of which\n * contains elements `predicate` returns falsey for. The predicate is\n * invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the array of grouped elements.\n * @example\n *\n * var users = [\n *   { 'user': 'barney',  'age': 36, 'active': false },\n *   { 'user': 'fred',    'age': 40, 'active': true },\n *   { 'user': 'pebbles', 'age': 1,  'active': false }\n * ];\n *\n * _.partition(users, function(o) { return o.active; });\n * // => objects for [['fred'], ['barney', 'pebbles']]\n *\n * // The `_.matches` iteratee shorthand.\n * _.partition(users, { 'age': 1, 'active': false });\n * // => objects for [['pebbles'], ['barney', 'fred']]\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.partition(users, ['active', false]);\n * // => objects for [['barney', 'pebbles'], ['fred']]\n *\n * // The `_.property` iteratee shorthand.\n * _.partition(users, 'active');\n * // => objects for [['fred'], ['barney', 'pebbles']]\n */\nvar partition = createAggregator(function(result, value, key) {\n  result[key ? 0 : 1].push(value);\n}, function() { return [[], []]; });\n\nmodule.exports = partition;\n"],"names":["isAppBinding","x","Boolean","app_id","props","binding","dispatch","useDispatch","intl","useIntl","channelId","useSelector","getCurrentChannelId","teamId","getCurrentTeamId","id","concat","label","React","WithTooltip","title","isVertical","className","onClick","async","context","createCallContext","location","result","handleBindingClick","error","errMsg","text","postEphemeralCallResponseForContext","callResp","data","type","AppCallResponseTypes","OK","FORM","form","openAppsModal","NAVIGATE","errorMessage","formatMessage","defaultMessage","src","icon","AppBarMarketplace","handleOpenMarketplace","useCallback","openModal","modalId","ModalIdentifiers","PLUGIN_MARKETPLACE","dialogType","MarketplaceModal","dialogProps","openedFrom","key","ViewGridPlusOutlineIcon","size","ImageLoadState","isAppBarPluginComponent","pluginId","component","channel","getCurrentChannel","channelMember","getMyCurrentChannelMembership","activeRhsComponent","getActiveRhsComponent","imageLoadState","setImageLoadState","useState","LOADING","useEffect","iconUrl","buttonId","tooltipText","dropdownText","content","role","tabIndex","alt","onLoad","onImageLoadComplete","LOADED","onError","onImageLoadError","ERROR","isButtonActive","rhsComponentId","classNames","PluginIcon","boardsEnabled","suitePluginIds","focalboard","_component$action","action","call","NewChannelWithBoardTourTip","AppBar","channelHeaderComponents","getChannelHeaderPluginComponents","appBarPluginComponents","getAppBarPluginComponents","appBarBindings","getAppBarAppBindings","currentProduct","useCurrentProduct","currentProductId","useCurrentProductId","enabled","shouldShowAppBar","canOpenMarketplace","state","isMarketplaceEnabled","haveICurrentTeamPermission","Permissions","SYSCONSOLE_WRITE_PLUGINS","showAppBar","coreProductsPluginIds","playbooks","coreProductComponents","pluginComponents","partition","_ref","includes","items","getDivider","length","map","inScope","_x$supportedProductId","supportedProductIds","AppBarPluginComponent","_x$supported_product_","supported_product_ids","AppBarBinding","beforeCount","afterCount","pulsatingDotPlacement","pulsatingDotTranslate","showTip","showNewChannelWithBoardPulsatingDot","FormattedMessage","screen","tipOpened","setTipOpened","handleDismiss","e","stopPropagation","setNewChannelWithBoardPreference","Preferences","NEW_CHANNEL_WITH_BOARD_TOUR_SHOWED","handleOpen","preventDefault","overlayPunchOut","useMeasurePunchouts","y","height","width","TourTip","show","placement","step","singleTip","showOptOut","interactivePunchOut","handlePrevious","offset","propTypes","_pt","isRequired","initializationState","getState","currentUserId","getCurrentUserId","preference","user_id","category","APP_BAR","name","value","JSON","stringify","savePreferences","module","exports","array","setter","iteratee","accumulator","index","baseEach","collection","baseForOwn","createBaseEach","arrayAggregator","baseAggregator","baseIteratee","isArray","initializer","func","isArrayLike","eachFunc","fromRight","iterable","Object","createAggregator","push"],"sourceRoot":""}

VaKeR 2022