define("metaserver/static/js/modules/clean/search/single_page/constants",["require","exports","metaserver/static/js/modules/clean/search/types","metaserver/static/js/modules/core/i18n"],(function(e,t,s,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FILE_CATEGORIES_NO_PAPER=t.FILE_CATEGORIES_PAPER=t.SEARCH_MAX_NUM_FILTER_PEOPLE_SUGGESTIONS=t.SEARCH_POSTERIOR_QUERY_SUGGESTIONS_CAPACITY=t.SEARCH_TAB_HEIGHT=t.SEARCH_WEB_TIMER=t.SEARCH_HISTORY_DELAY=t.COLLECTIONS_URL_REGEX=t.HOME_URL_REGEX=t.BACKUP_LANDING_URL_REGEX=t.BACKUP_BROWSE_URL_REGEX=t.AUTOMATIONS_URL_REGEX=t.REQUESTS_URL_REGEX=t.PHOTOS_URL_REGEX=t.SHARE_URL_REGEX=t.RECENTS_URL_REGEX=t.STARRED_URL_REGEX=t.BROWSE_URL_REGEX=t.SEARCH_URL_REGEX=t.SEARCH_URL_ROOT=t.SEARCH_SECOND_PAGE_DEBOUNCE=t.SEARCH_ADDITIONAL_PAGE_SIZE=t.SEARCH_DROPDOWN_PAGE_SIZE=t.SEARCH_MIN_PAGE_SIZE=t.SEARCH_FIRST_PAGE_SIZE=t.SEARCH_QUERY_SUGGESTIONS_DEBOUNCE=t.POPULAR_FILTERS_DEBOUNCE=t.SEARCH_QUERY_DEBOUNCE=void 0,t.SEARCH_QUERY_DEBOUNCE=50,t.POPULAR_FILTERS_DEBOUNCE=50,t.SEARCH_QUERY_SUGGESTIONS_DEBOUNCE=100,t.SEARCH_FIRST_PAGE_SIZE=10,t.SEARCH_MIN_PAGE_SIZE=t.SEARCH_FIRST_PAGE_SIZE,t.SEARCH_DROPDOWN_PAGE_SIZE=8,t.SEARCH_ADDITIONAL_PAGE_SIZE=50,t.SEARCH_SECOND_PAGE_DEBOUNCE=200,t.SEARCH_URL_ROOT="/search",t.SEARCH_URL_REGEX=/^\/search\//,t.BROWSE_URL_REGEX=/^\/(home|personal|work)/,t.STARRED_URL_REGEX=/^\/starred/,t.RECENTS_URL_REGEX=/^\/recents/,t.SHARE_URL_REGEX=/^\/share/,t.PHOTOS_URL_REGEX=/^\/photos/,t.REQUESTS_URL_REGEX=/^\/requests/,t.AUTOMATIONS_URL_REGEX=/^\/automations/,t.BACKUP_BROWSE_URL_REGEX=/^\/backups/,t.BACKUP_LANDING_URL_REGEX=/^\/backup\/all/,t.HOME_URL_REGEX=/^\/h([^\w]|$)/,t.COLLECTIONS_URL_REGEX=/^\/collections/,t.SEARCH_HISTORY_DELAY=500,t.SEARCH_WEB_TIMER="single-page-search",t.SEARCH_TAB_HEIGHT=40,t.SEARCH_POSTERIOR_QUERY_SUGGESTIONS_CAPACITY=3,t.SEARCH_MAX_NUM_FILTER_PEOPLE_SUGGESTIONS=5,t.FILE_CATEGORIES_PAPER=[{category:s.FileCategory.IMAGE,label:a.intl.formatMessage({id:"ZnS57e",defaultMessage:"Images"}),tooltip:a.intl.formatMessage({id:"AZvTRu",defaultMessage:"JPG, PNG, GIF, and more"}),icon:"image-small"},{category:s.FileCategory.DOCUMENT,label:a.intl.formatMessage({id:"EYw1Cy",defaultMessage:"Documents"}),tooltip:a.intl.formatMessage({id:"PFhg9W",defaultMessage:"DOC, DOCX, TXT, and more"}),icon:"txt-small"},{category:s.FileCategory.PDF,label:a.intl.formatMessage({id:"lKbROR",defaultMessage:"PDFs"}),tooltip:a.intl.formatMessage({id:"s39/fs",defaultMessage:"PDF"}),icon:"pdf-small"},{category:s.FileCategory.SPREADSHEET,label:a.intl.formatMessage({id:"GRyN3w",defaultMessage:"Spreadsheets"}),tooltip:a.intl.formatMessage({id:"IrhSVL",defaultMessage:"XLSX, XLS, CSV, and more"}),icon:"numbers-small"},{category:s.FileCategory.PRESENTATION,label:a.intl.formatMessage({id:"noyhQI",defaultMessage:"Presentations"}),tooltip:a.intl.formatMessage({id:"cHykwm",defaultMessage:"PPT, PPTX, KEY, and more"}),icon:"keynote-small"},{category:s.FileCategory.AUDIO,label:a.intl.formatMessage({id:"UYx/2r",defaultMessage:"Audio"}),tooltip:a.intl.formatMessage({id:"qT1l41",defaultMessage:"MP3, WAV, MID, and more"}),icon:"audio-small"},{category:s.FileCategory.VIDEO,label:a.intl.formatMessage({id:"AF+/tL",defaultMessage:"Video"}),tooltip:a.intl.formatMessage({id:"ZXY9/v",defaultMessage:"MOV, WMV, MP4, and more"}),icon:"video-small"},{category:s.FileCategory.FOLDER,label:a.intl.formatMessage({id:"U6qGE8",defaultMessage:"Folders"}),tooltip:a.intl.formatMessage({id:"rJEV8X",defaultMessage:"Dropbox folders"}),icon:"folder-small"},{category:s.FileCategory.PAPER,label:a.intl.formatMessage({id:"+rsEJ/",defaultMessage:"Paper docs"}),tooltip:a.intl.formatMessage({id:"iYnBgp",defaultMessage:"Dropbox Paper docs"}),icon:"paper-small"},{category:s.FileCategory.OTHER,label:a.intl.formatMessage({id:"MYByNv",defaultMessage:"Other"}),tooltip:a.intl.formatMessage({id:"tS6aDQ",defaultMessage:"Other file types"}),icon:"unknown-small"}],t.FILE_CATEGORIES_NO_PAPER=t.FILE_CATEGORIES_PAPER.filter(e=>e.category!==s.FileCategory.PAPER)})),define("metaserver/static/js/modules/clean/search/single_page/input/wrapper",["require","exports","tslib","classnames","react","react-intl","react-redux","metaserver/static/js/api_v2/user_client","metaserver/static/js/modules/clean/filepath/filepath","metaserver/static/js/modules/clean/react/components/css","metaserver/static/js/modules/clean/react/error_boundary","metaserver/static/js/modules/clean/search/single_page/input/component","metaserver/static/js/modules/clean/search/single_page/navigation","metaserver/static/js/modules/clean/web_timing_logger","metaserver/static/js/modules/core/cancelable_promise","metaserver/static/js/modules/core/exception","metaserver/static/js/modules/core/i18n","metaserver/static/js/modules/clean/search/constants"],(function(e,t,s,a,i,r,o,n,l,c,u,h,d,g,p,m,S,E){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SearchInput=void 0,a=s.__importDefault(a),i=s.__importStar(i),l=s.__importStar(l);const _=new n.UserApiV2Client;class R extends i.Component{constructor(t){super(t),this.loadConnectedInput=()=>s.__awaiter(this,void 0,void 0,(function*(){const[{ConnectedSearchInput:t},{ConnectedSearchSuggestions:r},{getStoreForSearch:n},{clear:l,setVariant:c,setQuery:u,setUser:h,setPath:g,updateFromUrl:p,setExperiments:m,setSessionId:S,fetchPeopleSuggestions:E},{sessionId:R},{generateRandomId:f},{logSearchBoxFocus:v},{SearchDropdown:y},{user_options:T,experiments:P}]=yield Promise.all([new Promise((t,s)=>{e(["metaserver/static/js/modules/clean/search/single_page/input/connected"],t,s)}).then(s.__importStar),new Promise((t,s)=>{e(["metaserver/static/js/modules/clean/search/single_page/input/suggestions"],t,s)}).then(s.__importStar),new Promise((t,s)=>{e(["metaserver/static/js/modules/clean/search/single_page/data/store"],t,s)}).then(s.__importStar),new Promise((t,s)=>{e(["metaserver/static/js/modules/clean/search/single_page/data/action_creators/index"],t,s)}).then(s.__importStar),new Promise((t,s)=>{e(["metaserver/static/js/modules/clean/search/single_page/data/selectors/index"],t,s)}).then(s.__importStar),new Promise((t,s)=>{e(["metaserver/static/js/modules/clean/search/single_page/utils"],t,s)}).then(s.__importStar),new Promise((t,s)=>{e(["metaserver/static/js/modules/clean/search/single_page/logger"],t,s)}).then(s.__importStar),new Promise((t,s)=>{e(["metaserver/static/js/modules/clean/search/single_page/dropdown"],t,s)}).then(s.__importStar),_.ns("search").rpc("get_experiment_data",void 0,{subjectUserId:this.props.user.id})]),A=n();A.dispatch(c({variant:this.props.variant})),A.dispatch(h({user:this.props.user,options:T})),void 0!==this.props.path&&A.dispatch(g({path:this.props.path})),A.dispatch(m({experiments:P})),A.dispatch(E({user:this.props.user,query:""})),"full-page"===this.props.variant&&(d.searchNavigationManager.removeListener("update",this.handleUrlUpdate),d.searchNavigationManager.removeListener("exit",this.handleUrlExit),d.searchNavigationManager.addListener("update",e=>{e.query&&!this.props.isActive&&this.props.onSearchEnter&&this.props.onSearchEnter(),A.dispatch(p(e))}),d.searchNavigationManager.addListener("exit",()=>{this.props.onSearchExit&&this.props.onSearchExit(),A.dispatch(l())}),d.searchNavigationManager.load()),R(A.getState())||A.dispatch(S({sessionId:f()})),this.state.query&&A.dispatch(u({query:this.state.query})),this.handleSearchEnter=()=>{v(),this.props.onSearchEnter&&this.props.onSearchEnter(),this.setState({hasFocus:!0}),this.updateSearchUrl()},this.renderInput=()=>"full-page"===this.props.variant?i.createElement(o.Provider,{store:A},i.createElement("div",{className:a.default({"global-header__search":!0,"global-header__search--active":this.props.isActive})},i.createElement(t,Object.assign({},this.props,{autoFocus:this.state.hasFocus,onInputBlur:this.handleInputBlur,onSearchEnter:this.handleSearchEnter})),i.createElement(r,{onFocusInput:this.handleFocusInput}))):i.createElement(o.Provider,{store:A},i.createElement("div",{className:a.default({"dig-Theme--dark":this.props.shouldRenderDarkMode,"search__dark-mode-wrapper":this.props.shouldRenderDarkMode,"global-header__search":!0,"global-header__search---input-drop":!0})},i.createElement(t,Object.assign({},this.props,{autoFocus:this.state.hasFocus,onInputBlur:this.handleInputBlur,onSearchEnter:this.handleSearchEnter})),i.createElement(y,{inputBox:this.props.inputBoxRef,hasFocus:this.state.hasFocus,shouldOpenTabOnNavigate:this.props.shouldOpenTabOnNavigate})))})),this.handleInputBlur=()=>{this.setState({hasFocus:!1})},this.handleFocusInput=()=>{this.setState({hasFocus:!0})},this.handleUrlUpdate=e=>{e.query&&(this.props.isActive||this.handleSearchEnter(),this.handleSetQuery({query:e.query}))},this.handleUrlExit=()=>{this.handleSearchExit()},this.updateSearchUrl=()=>{"full-page"===this.props.variant&&d.searchNavigationManager.setOnEnter(`/search/${this.props.user.role}`)},this.handleSearchEnter=()=>{this.setState({hasFocus:!0}),this.props.onSearchEnter&&this.props.onSearchEnter(),this.updateSearchUrl()},this.handleSearchExit=()=>{this.handleSetQuery({query:""}),this.props.onSearchExit&&this.props.onSearchExit()},this.handleSetQuery=({query:e})=>{this.setState({query:e}),g.get_timer("single_page_search").restart()},this.handleSetPath=({path:e})=>{this.setState({path:e})},this.handleClear=()=>{this.setState({query:"",path:"",filteredSuggestion:void 0})},this.state={hasReduxStoreLoaded:!1,hasFocus:!1,query:"",path:t.path||"",highlightedRow:-1,highlightedSuggestionData:void 0,highlightedSuggestion:void 0,allSuggestionData:E.emptyAllSuggestionData,filteredContact:void 0,filteredSuggestion:void 0}}onSearchError(e,t){m.reportException({err:e,tags:["search"],severity:"critical",exc_extra:{component_stack:null==t?void 0:t.componentStack}})}componentDidMount(){"full-page"===this.props.variant&&(d.searchNavigationManager.init(this.props.user),d.searchNavigationManager.addListener("update",this.handleUrlUpdate),d.searchNavigationManager.addListener("exit",this.handleUrlExit),d.searchNavigationManager.load()),0!==document.location.pathname.indexOf("/search")?this.cancellablePromise=p.makeCancelable(g.waitForTTI().then(this.loadConnectedInput)):this.cancellablePromise=p.makeCancelable(this.loadConnectedInput()),this.cancellablePromise.then(()=>{this.setState({hasReduxStoreLoaded:!0})})}UNSAFE_componentWillReceiveProps(t){return s.__awaiter(this,void 0,void 0,(function*(){if(this.state.hasReduxStoreLoaded&&!this.props.isActive&&!l.paths_are_equal(t.path,this.props.path)&&void 0!==t.path){const{getStoreForSearch:a}=yield new Promise((t,s)=>{e(["metaserver/static/js/modules/clean/search/single_page/data/store"],t,s)}).then(s.__importStar),{setPath:i}=yield new Promise((t,s)=>{e(["metaserver/static/js/modules/clean/search/single_page/data/action_creators/index"],t,s)}).then(s.__importStar);a().dispatch(i({path:t.path,viewport:"input"}))}}))}componentWillUnmount(){var e;null===(e=this.cancellablePromise)||void 0===e||e.cancel(),"full-page"===this.props.variant&&(d.searchNavigationManager.removeListener("update"),d.searchNavigationManager.removeListener("exit"))}renderSearchWrapper(){return this.state.hasReduxStoreLoaded?this.renderInput():"full-page"===this.props.variant?i.createElement("span",{className:a.default({"global-header__search":!0,"global-header__search--active":this.props.isActive})},i.createElement(h.SearchInputComponent,Object.assign({},this.props,this.state,{setQuery:this.handleSetQuery,setPath:this.handleSetPath,clear:this.handleClear,onSearchEnter:this.handleSearchEnter,onSearchExit:this.handleSearchExit}))):i.createElement("div",{className:a.default({"dig-Theme--dark":this.props.shouldRenderDarkMode,"search__dark-mode-wrapper":this.props.shouldRenderDarkMode,"global-header__search":!0,"global-header__search---input-drop":!0})},i.createElement(h.SearchInputComponent,Object.assign({},this.props,this.state,{setQuery:this.handleSetQuery,setPath:this.handleSetPath,clear:this.handleClear,onSearchEnter:this.handleSearchEnter,onSearchExit:this.handleSearchExit})))}render(){return i.createElement(u.ErrorBoundary,{onCatch:this.onSearchError},i.createElement(r.RawIntlProvider,{value:S.intl},this.renderSearchWrapper()))}}R.displayName="SearchInputWrapper",t.SearchInput=c.requireCssWithComponent(R,["/static/css/search/input-vfl2GUBCe.css","/static/js/typescript/component_libraries/retrieval-components/src/index.web-vflN9HMso.css"])})),define("metaserver/static/js/modules/clean/search/single_page/input/component",["require","exports","tslib","react","metaserver/static/js/modules/clean/search/types","metaserver/static/js/modules/clean/filepath/filepath","ts-key-enum","metaserver/static/js/modules/clean/react/async/loadable","metaserver/static/js/modules/clean/search/search_helpers","metaserver/static/js/modules/clean/search/single_page/navigation","metaserver/static/js/modules/clean/search/store_helpers","metaserver/static/js/modules/clean/web_timing_logger","metaserver/static/js/modules/core/i18n","dig-components/global_header","metaserver/static/js/modules/clean/tagging/experiments","typescript/component_libraries/retrieval-components/src/search-suggestions/index","metaserver/static/js/modules/clean/web_user_action_events"],(function(e,t,s,a,i,r,o,n,l,c,u,h,d,g,p,m,S){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SearchInputComponent=void 0,a=s.__importStar(a),r=s.__importStar(r);const E=n.Loadable({loader:()=>h.waitForTTI().then(()=>new Promise((t,s)=>{e(["metaserver/static/js/modules/clean/search/single_page/input/chips"],t,s)}).then(s.__importStar).then(({SearchChips:e})=>e)),loading:a.createElement("span",{className:"search-chips"})});let _,R,f,v,y;h.waitForTTI().then(()=>{new Promise((t,s)=>{e(["metaserver/static/js/modules/clean/search/single_page/logger"],t,s)}).then(s.__importStar).then(({logTypeaheadSuggestionClicked:e,logPeopleFilterClicked:t,logQuerySuggestionClicked:s,logTagSuggestionsClicked:a,logQueryCleared:i})=>{_=e,R=t,f=s,v=a,y=i})});class T extends a.PureComponent{constructor(){super(...arguments),this.hasEmptyQuery=()=>!u.normalize(this.props.query),this.handleChange=e=>{this.props.setQuery({query:e.target.value})},this.handleFocus=()=>{this.props.onSearchEnter(),this.props.setIsActiveInGlobalHeader&&this.props.setIsActiveInGlobalHeader({isActiveInGlobalHeader:!0})},this.handleBlur=()=>{this.hasSuggestions()||(this.props.onInputBlur&&this.props.onInputBlur(),this.props.setIsActiveInGlobalHeader&&this.props.setIsActiveInGlobalHeader({isActiveInGlobalHeader:!1}))},this.hasSuggestions=()=>this.getNumOfSuggestions()>0,this.getNumOfQuerySuggestions=()=>{var e,t;return this.props.query.length>0&&null!==(t=null===(e=this.props.allSuggestionData[i.SuggestionSection.QUERY])||void 0===e?void 0:e.length)&&void 0!==t?t:0},this.getNumOfPeopleSuggestions=()=>{var e,t;return this.props.query.length>0&&null!==(t=null===(e=this.props.allSuggestionData[i.SuggestionSection.PEOPLE])||void 0===e?void 0:e.length)&&void 0!==t?t:0},this.getNumOfTagsSuggestions=()=>{var e,t;return p.isTaggingEnabled(this.props.manualTaggingVariant)&&l.normalizeForTagsSuggestions(this.props.query).length>0&&null!==(t=null===(e=this.props.allSuggestionData[i.SuggestionSection.TAGS])||void 0===e?void 0:e.length)&&void 0!==t?t:0},this.getNumOfPopularFilters=()=>{var e,t;return l.normalizeForTagsSuggestions(this.props.query).length>0&&null!==(t=null===(e=this.props.allSuggestionData[i.SuggestionSection.POPULAR])||void 0===e?void 0:e.length)&&void 0!==t?t:0},this.getNumOfResultSuggestions=()=>{var e,t;return this.props.query.length>0&&null!==(t=null===(e=this.props.allSuggestionData[i.SuggestionSection.RESULT])||void 0===e?void 0:e.length)&&void 0!==t?t:0},this.getNumOfSuggestions=()=>this.getNumOfQuerySuggestions()+this.getNumOfPeopleSuggestions()+this.getNumOfTagsSuggestions()+this.getNumOfPopularFilters()+this.getNumOfResultSuggestions(),this.dismissSuggestions=()=>{this.props.setHighlightedRow&&this.props.dismissAllSuggestions&&(this.props.setHighlightedRow({index:void 0}),this.props.dismissAllSuggestions({query:this.props.query}))},this.handleSearchExit=(e=!0)=>{c.searchNavigationManager.exit(),this.props.onSearchExit(),this.input&&e&&this.input.blur()},this.onCloseButtonClick=(e=!0)=>{y(),this.handleSearchExit(e)},this.handleEscape=()=>{this.hasSuggestions()?this.dismissSuggestions():this.hasEmptyQuery()?this.handleSearchExit():(y(),this.props.clear(),this.input&&this.input.focus())},this.handleKeyArrowDown=e=>{if(this.props.setHighlightedRow)if(e.preventDefault(),this.hasSuggestions()){const e=void 0===this.props.highlightedRow?0:Math.min(this.props.highlightedRow+1,this.getNumOfSuggestions()-1);this.props.setHighlightedRow({index:e})}else if(this.props.results&&!this.props.results.isEmpty()){const e=void 0===this.props.highlightedRow?0:Math.min(this.props.highlightedRow+1,this.props.results.count());this.props.setHighlightedRow({index:e})}},this.handleKeyArrowUp=e=>{if(this.props.setHighlightedRow)if(e.preventDefault(),this.hasSuggestions()){const e=void 0===this.props.highlightedRow?this.getNumOfSuggestions()-1:Math.max(this.props.highlightedRow-1,0);this.props.setHighlightedRow({index:e})}else if(this.props.results&&!this.props.results.isEmpty()){const e=void 0===this.props.highlightedRow?this.props.results.count()-1:Math.max(this.props.highlightedRow-1,0);this.props.setHighlightedRow({index:e})}},this.handleKeyBackspace=()=>{var e;this.input&&0===this.input.selectionStart&&0===this.input.selectionEnd&&(this.props.filteredContact?this.props.setFilteredAccountId({filteredAccountId:void 0}):(null===(e=this.props.filteredSuggestion)||void 0===e?void 0:e.type)&&this.props.setFilteredSearchSuggestion?this.props.setFilteredSearchSuggestion({type:void 0,query:""}):r.paths_are_equal(this.props.path,"/")||this.props.setPath({path:"/",viewport:"input"}))},this.getGroupIndexOfSuggestion=(e,t)=>{const s=this.props.allSuggestionData[t];if(s)for(let t=0;t{var t,s;if((this.props.highlightedRow||this.props.highlightedSuggestionData)&&e.preventDefault(),this.hasSuggestions()){const e=this.props.highlightedSuggestionData;if(this.dismissSuggestions(),void 0===e)return void(this.props.isSearchAsYouTypeDisabled&&this.props.onSearch&&this.props.onSearch());l.isQuerySuggestionData(e)?(f(this.getGroupIndexOfSuggestion(e,i.SuggestionSection.QUERY),null!==(t=this.props.allSuggestionData[i.SuggestionSection.QUERY])&&void 0!==t?t:[]),this.props.setQuery({query:e.text,alwaysTriggerSearch:!0})):l.isTagsSuggestionData(e)?(v(this.getGroupIndexOfSuggestion(e,i.SuggestionSection.TAGS),null!==(s=this.props.allSuggestionData[i.SuggestionSection.TAGS])&&void 0!==s?s:[]),this.props.setQuery({query:l.updateQueryWithTagsSuggestion(this.props.query,e.tag_text),alwaysTriggerSearch:!0})):l.isPopularFiltersSuggestionData(e)?(_(e.searchFilter,e.count),l.handleTypeaheadSuggestionClicked(e.searchFilter,this.props.query,this.props.setQuery,!!this.props.isSearchAsYouTypeDisabled,this.props.setFilteredSearchSuggestion)):l.isPeopleSuggestionData(e)?(R(this.getGroupIndexOfSuggestion(e,i.SuggestionSection.PEOPLE),this.getNumOfPeopleSuggestions()),this.props.setFilteredAccountId({filteredAccountId:e.dbx_account_id}),this.props.setQuery({query:"",alwaysTriggerSearch:!0})):l.isResultSuggestionData(e)&&this.props.onResultSuggestionClick&&this.props.onResultSuggestionClick({result:e}),this.input&&this.input.focus()}else"dropdown"===this.props.variant&&void 0!==this.props.highlightedRow&&this.props.results&&!this.props.results.isEmpty()?0===this.props.highlightedRow?this.props.onSearch&&this.props.onSearch():this.props.results.has(this.props.highlightedRow-1)&&this.props.redirectToResultDispatch&&this.props.redirectToResultDispatch({result:this.props.results.get(this.props.highlightedRow-1),shouldOpenTabOnNavigate:this.props.shouldOpenTabOnNavigate,actionSurface:S.ActionSurfaceLogValue.TOP_NAVIGATION,actionSource:S.ActionSourceValue.KEYBOARD}):this.props.isSearchAsYouTypeDisabled&&this.props.onSearch&&(this.dismissSuggestions(),this.props.onSearch())},this.handleKeyDown=e=>{switch(e.key){case o.Key.Escape:this.handleEscape();break;case o.Key.ArrowDown:this.handleKeyArrowDown(e);break;case o.Key.ArrowUp:this.handleKeyArrowUp(e);break;case o.Key.Enter:this.handleKeyEnter(e);break;case o.Key.Backspace:this.handleKeyBackspace();break;case o.Key.Tab:e.shiftKey&&this.hasEmptyQuery()&&this.handleSearchExit(!1)}},this.handleSubmit=e=>{e.preventDefault(),this.props.onSearch&&this.props.onSearch()},this.handleDocumentClick=e=>{this.props.isActive&&e.srcElement&&(this.hasSuggestions()?e.srcElement.closest(".search__form")||this.dismissSuggestions():this.hasEmptyQuery()&&(e.srcElement.closest(".maestro-nav__container")||e.srcElement.closest(".pagelet-top-menu__container")||e.srcElement.closest(".maestro-header")&&!e.srcElement.closest(".search__form"))&&this.handleSearchExit())}}componentDidMount(){document.addEventListener("click",this.handleDocumentClick,!1),this.props.autoFocus&&this.input&&(this.input.value="",this.input.focus(),this.input.value=this.props.query)}componentWillUnmount(){document.removeEventListener("click",this.handleDocumentClick,!1)}componentDidUpdate(e){!this.props.isActive&&e.isActive&&this.input&&setTimeout(()=>this.input.blur(),5),this.props.autoFocus&&!e.autoFocus&&this.input&&this.input.focus()}get input(){return this.props.inputBoxRef&&this.props.inputBoxRef.current}render(){const{isActive:e,query:t,filteredContact:s,path:i,placeholder:o,manualTaggingVariant:n}=this.props,l=o||(s?d.intl.formatMessage({id:"BffPZc",defaultMessage:"Add search terms to improve your results"}):p.isTaggingEnabled(n)&&e?d.intl.formatMessage({id:"S3XJFn",defaultMessage:"Search for keywords, people, and tags"}):d.intl.formatMessage({id:"9+lBHX",defaultMessage:"Search"})),c=o||(s?d.intl.formatMessage({id:"bSdTWj",defaultMessage:"Search for content from “{name}”"},{name:s.name}):i?d.intl.formatMessage({id:"cOMGEP",defaultMessage:"Search in folder “{folder}”"},{folder:r.filename(i)}):d.intl.formatMessage({id:"5RccSl",defaultMessage:"Search"})),u=d.intl.formatMessage({id:"T7tcC/",defaultMessage:"Exit search"});return a.createElement(g.GlobalHeader.Search,{inputProps:{onFocus:this.handleFocus,onBlur:this.handleBlur,onChange:this.handleChange,onKeyDown:this.handleKeyDown,placeholder:l,"aria-owns":"rc-search-suggestions__list","aria-autocomplete":"list",role:"combobox",value:t,"aria-activedescendant":this.props.highlightedSuggestion?m.generateIdForSuggestion(this.props.highlightedSuggestion):void 0},inputBoxRef:this.props.inputBoxRef,ariaLabels:{input:c,closeIcon:u},onCloseButtonClick:this.onCloseButtonClick,onSubmit:()=>this.handleSubmit,chips:a.createElement(E,{path:i,setPath:this.props.setPath,user:this.props.user,filteredContact:this.props.filteredContact,setFilteredAccountId:this.props.setFilteredAccountId,filteredSuggestion:this.props.filteredSuggestion,setFilteredSearchSuggestion:this.props.setFilteredSearchSuggestion,hideText:!e}),hasExpandableAnimation:"full-page"===this.props.variant,isActive:e})}}t.SearchInputComponent=T,T.defaultProps={onSearchEnter:()=>{},onSearchExit:()=>{}},T.displayName="SearchInputComponent"})),define("metaserver/static/js/modules/clean/search/single_page/navigation",["require","exports","tslib","eventemitter3","metaserver/static/js/modules/clean/browse_uri_interface","metaserver/static/js/modules/core/transport/query_string_helpers","metaserver/static/js/modules/clean/search/single_page/constants","metaserver/static/js/modules/core/browser","metaserver/static/js/modules/core/i18n","metaserver/static/js/modules/clean/react/edison/router_utils","metaserver/static/js/modules/clean/history_singleton"],(function(e,t,s,a,i,r,o,n,l,c,u){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.searchNavigationManager=t.SearchNavigationManager=t.DESKTOP_FROM_PATHS=t.SEARCH_TITLE=void 0,a=s.__importDefault(a),t.SEARCH_TITLE=l.intl.formatMessage({id:"dcywUW",defaultMessage:"Search results - Dropbox"}),t.DESKTOP_FROM_PATHS=["assistant","collab_browse"];class h extends a.default{constructor(e,s){super(),this.lastHistoryMs=0,this.initialPath="",this.setSearchUrl=(e,s)=>{e!==this.document.location.pathname+this.document.location.search&&(c.shouldUseReactRouter()?u.getBrowserHistory().replace(e):(this.returnTo||o.SEARCH_URL_REGEX.test(this.document.location.pathname)||(this.returnTo=this.document.location.pathname+this.document.location.search),s||this.shouldPushHistory()?this.window.history.pushState({},t.SEARCH_TITLE,e):this.window.history.replaceState({},t.SEARCH_TITLE,e),this.lastHistoryMs=(new Date).getTime(),this.previousTitle||(this.previousTitle=this.document.title,this.document.title=t.SEARCH_TITLE)))},this.setNonSearchUrl=e=>{this.shouldRedirect(e)?n.redirect(e):c.shouldUseReactRouter()?u.getBrowserHistory().push(e):(this.window.history.pushState({},this.previousTitle||"",e),this.emit("exit"),this.previousTitle&&(this.document.title=this.previousTitle,this.previousTitle=void 0))},this.handlePopState=()=>{o.SEARCH_URL_REGEX.test(this.document.location.pathname)?(this.lastHistoryMs=(new Date).getTime(),this.emit("update",r.parseQueryString(this.document.location.search))):this.shouldRedirect(this.document.location.pathname)?n.reload():this.emit("exit")},this.shouldPushHistory=()=>(new Date).getTime()-this.lastHistoryMs>=o.SEARCH_HISTORY_DELAY,this.shouldRedirect=e=>(!c.shouldUseReactRouter(this.initialPath)||!c.shouldUseReactRouter(e))&&((!o.HOME_URL_REGEX.test(this.initialPath)||!o.HOME_URL_REGEX.test(e))&&((!o.BROWSE_URL_REGEX.test(this.initialPath)||!o.BROWSE_URL_REGEX.test(e))&&((!o.STARRED_URL_REGEX.test(this.initialPath)||!o.STARRED_URL_REGEX.test(e))&&((!o.RECENTS_URL_REGEX.test(this.initialPath)||!o.RECENTS_URL_REGEX.test(e))&&((!o.SHARE_URL_REGEX.test(this.initialPath)||!o.SHARE_URL_REGEX.test(e))&&((!o.PHOTOS_URL_REGEX.test(this.initialPath)||!o.PHOTOS_URL_REGEX.test(e))&&((!o.REQUESTS_URL_REGEX.test(this.initialPath)||!o.REQUESTS_URL_REGEX.test(e))&&((!o.AUTOMATIONS_URL_REGEX.test(this.initialPath)||!o.AUTOMATIONS_URL_REGEX.test(e))&&((!o.BACKUP_BROWSE_URL_REGEX.test(this.initialPath)||!o.BACKUP_BROWSE_URL_REGEX.test(e))&&((!o.BACKUP_LANDING_URL_REGEX.test(this.initialPath)||!o.BACKUP_LANDING_URL_REGEX.test(e))&&(!o.COLLECTIONS_URL_REGEX.test(this.initialPath)||!o.COLLECTIONS_URL_REGEX.test(e)))))))))))),this.document=e,this.window=s}get source(){return o.HOME_URL_REGEX.test(this.initialPath)?"home":o.BROWSE_URL_REGEX.test(this.initialPath)?"browse":o.STARRED_URL_REGEX.test(this.initialPath)?"starred":o.RECENTS_URL_REGEX.test(this.initialPath)?"recents":o.SHARE_URL_REGEX.test(this.initialPath)?"share":o.PHOTOS_URL_REGEX.test(this.initialPath)?"photos":o.REQUESTS_URL_REGEX.test(this.initialPath)?"requests":o.AUTOMATIONS_URL_REGEX.test(this.initialPath)?"automations":o.SEARCH_URL_REGEX.test(this.initialPath)?"search":o.BACKUP_LANDING_URL_REGEX.test(this.initialPath)||o.BACKUP_BROWSE_URL_REGEX.test(this.initialPath)?"backup":null}init(e){this.user=e,this.initialPath=this.document.location.pathname,c.shouldUseReactRouter()||this.window.addEventListener("popstate",this.handlePopState)}load(){if(!c.shouldUseReactRouter()&&o.SEARCH_URL_REGEX.test(this.document.location.pathname)){this.emit("update",r.parseQueryString(this.document.location.search));const e=r.parseQueryString(this.document.location.search);e.search_from&&!o.SEARCH_URL_REGEX.test(e.search_from)&&-1===t.DESKTOP_FROM_PATHS.indexOf(e.search_from)&&(this.returnTo=e.search_from)}}setOnEnter(e){c.shouldUseReactRouter()||o.SEARCH_URL_REGEX.test(this.document.location.pathname)||this.set(e)}set(e,t){e&&(o.SEARCH_URL_REGEX.test(e)?this.setSearchUrl(e,t):this.setNonSearchUrl(e))}exit(){c.shouldUseReactRouter()||o.SEARCH_URL_REGEX.test(this.document.location.pathname)&&(this.returnTo&&!o.SEARCH_URL_REGEX.test(this.returnTo)||(this.returnTo=i.get_browse_root(this.user)),this.set(this.returnTo),this.returnTo=void 0)}}t.SearchNavigationManager=h,t.searchNavigationManager=new h(document,window)})),define("metaserver/static/js/modules/clean/react/maestro/layout/header",["require","exports","tslib","classnames","react","dig-components/typography","metaserver/static/js/modules/clean/react/components/css","metaserver/static/js/modules/clean/react/maestro/components/header_portal","metaserver/static/js/modules/clean/react/maestro/layout/top_menu_container","metaserver/static/js/modules/clean/react/maestro/responsive","metaserver/static/js/modules/clean/react/maestro_nav/shared_code/dropbox_logo","metaserver/static/js/modules/clean/user_education/react/user_education_effect","metaserver/static/js/modules/clean/react/maestro/layout/global_header/events","metaserver/static/js/modules/clean/react/edison/router_utils","metaserver/static/js/modules/clean/react/activation/experiments_context","metaserver/static/js/modules/clean/react/admin/teams/onboarding/web/trackers/personalization_tracker"],(function(e,t,s,a,i,r,o,n,l,c,u,h,d,g,p,m){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MaestroHeaderLogo=t.MaestroHeaderTitle=t.MaestroHeaderTitleWithUE=t.PageletMaestroHeader=t.PageletMaestroHeaderWithoutCSS=void 0,a=s.__importDefault(a),i=s.__importDefault(i);class S extends i.default.Component{constructor(){super(...arguments),this.hasLoggedSharingMadeEasyExposure=!1,this.state={deferSearchRenderToGlobalHeader:g.shouldUseReactRouter(),isSharingMadeEasyBannerDismissed:!1}}getRelevantSearchPropsForGlobalHeader(){return{overrideSearchBar:this.props.overrideSearchBar||this.state.deferSearchRenderToGlobalHeader?i.default.createElement(l.TopMenuContainer,Object.assign({},this.props)):void 0,shouldLoadSearchInGH:this.state.deferSearchRenderToGlobalHeader}}componentDidMount(){g.shouldUseReactRouter()||(d.globalHeaderBufferedEventEmitter.on(d.SEARCH_REQUEST_PROPS,()=>{this.setState({deferSearchRenderToGlobalHeader:!0})}),d.globalHeaderBufferedEventEmitter.emit(d.SEARCH_SET_PROPS,this.getRelevantSearchPropsForGlobalHeader()))}componentDidUpdate(e,t){(g.shouldUseReactRouter()||e.isSearching===this.props.isSearching&&e.isSearchBarExpanded===this.props.isSearchBarExpanded)&&t.deferSearchRenderToGlobalHeader===this.state.deferSearchRenderToGlobalHeader||d.globalHeaderBufferedEventEmitter.emit(d.SEARCH_SET_PROPS,this.getRelevantSearchPropsForGlobalHeader())}componentWillUnmount(){g.shouldUseReactRouter()||d.globalHeaderBufferedEventEmitter.removeListener(d.SEARCH_REQUEST_PROPS)}showSmeExperiment({userHasSharedFileOrFolderInfo:t,activationBoltInfo:a}){const{sharing_made_easy_feature:r,sharing_made_easy_variant:o,sharing_made_easy_metadata:n,has_shared_file_or_folder:l,has_dismissed_sharing_made_easy_banner:c}=null!=t?t:{};if(!o||!["CONTROL","V2"].includes(o))return i.default.createElement(i.default.Fragment,null);const u=()=>{this.setState({isSharingMadeEasyBannerDismissed:!0})},h=()=>{m.trackDismissSharingMadeEasyBanner(),this.hasLoggedSharingMadeEasyExposure=!0},d=i.default.lazy(()=>s.__awaiter(this,void 0,void 0,(function*(){const{SmeBanner:t}=yield new Promise((t,s)=>{e(["metaserver/static/js/modules/clean/react/activation/sharing_made_easy/sme_banner"],t,s)}).then(s.__importStar);return{default:e=>{var s,d,g;return i.default.createElement(t,Object.assign({feature:r,variant:o,shared:l,stormcrow_metadata:n,isBannerDismissed:c||this.state.isSharingMadeEasyBannerDismissed,hasLoggedSharingMadeEasyExposure:this.hasLoggedSharingMadeEasyExposure,handleHasLoggedSharingMadeEasyExposure:h,handleDismiss:u,boltId:null===(s=null==a?void 0:a.CoreActSharingMadeEasyBoltInfo)||void 0===s?void 0:s.id,boltToken:null===(d=null==a?void 0:a.CoreActSharingMadeEasyBoltInfo)||void 0===d?void 0:d.token,boltRevision:null===(g=null==a?void 0:a.CoreActSharingMadeEasyBoltInfo)||void 0===g?void 0:g.revision},e))}}})));return i.default.createElement(i.default.Suspense,{fallback:i.default.createElement(i.default.Fragment,null)},i.default.createElement(d,null))}render(){const e=this.props,{chromeClass:t,useMaestroPortal:a}=e,r=s.__rest(e,["chromeClass","useMaestroPortal"]);return a?i.default.createElement(i.default.Fragment,null,i.default.createElement(n.MaestroPortal,{element:n.MaestroPortalElement.TITLE,chromeClass:t},i.default.createElement(p.ExperimentsContext.Consumer,null,e=>this.showSmeExperiment(e)),i.default.createElement(E,{className:this.props.titleClass},r.title))):i.default.createElement("header",{className:"maestro-header page-header__shadow"},i.default.createElement(c.VerticallyFixedWrapper,{className:"page-header",responsive:this.props.responsive},i.default.createElement(E,{className:this.props.titleClass},r.title)))}}t.PageletMaestroHeaderWithoutCSS=S,S.defaultProps={isSearchBarExpanded:!1},S.displayName="PageletMaestroHeaderWithoutCSS";const E=({className:e,children:t})=>i.default.createElement("div",{className:a.default("page-header__title",e)},i.default.createElement(h.UserEducationEffect,{containerName:"PageletMaestroHeader",name:"Title",useSpan:!1},t));t.MaestroHeaderTitleWithUE=E,E.displayName="MaestroHeaderTitleWithUE";t.MaestroHeaderTitle=({children:e})=>i.default.createElement(r.Title,{className:"page-header__heading",tagName:"h1"},e);t.MaestroHeaderLogo=()=>i.default.createElement("a",{href:"/",className:"page-header__logo"},i.default.createElement(u.DropboxLogo,{alt:"Dropbox"}));const _=o.requireCssWithComponent(S,["/static/css/dig-components/index.web-vflDvlKi_.css","/static/css/maestro_layout-vflen4FrE.css"]);t.PageletMaestroHeader=_})),define("metaserver/static/js/modules/clean/react/maestro/layout/chrome",["require","exports","tslib","react","classnames","spectrum/match/index","metaserver/static/js/modules/clean/react/maestro/layout/header","metaserver/static/js/modules/clean/react/maestro/layout/secondary_sidebar","metaserver/static/js/modules/clean/react/maestro/responsive","metaserver/static/js/modules/clean/react/maestro/components/header_portal"],(function(e,t,s,a,i,r,o,n,l,c){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MaestroChrome=void 0,a=s.__importDefault(a),i=s.__importDefault(i);const u=({actionSidebarRegion:e,responsive:t,sidebarClass:s,useRightRail:r})=>a.default.createElement(a.default.Fragment,null,e&&(r?a.default.createElement("div",{className:"maestro-secondary-sidebar-v2"},"function"==typeof e?e(t):e):a.default.createElement("div",{className:i.default(["maestro-secondary-sidebar__shadow",s]),role:"complementary","aria-label":"sidebar"},a.default.createElement(n.MaestroSecondarySidebar,{responsive:t},"function"==typeof e?e(t):e))));u.displayName="SidebarRegion";class h extends a.default.PureComponent{constructor(e){super(e),this.isPageResponsive=()=>!(!document||!document.documentElement)&&document.documentElement.classList.contains(l.RESPONSIVE_CLASS),this.handleSetup=()=>{this.setState({setupComplete:!0})},this.handleMatchMedium=()=>{!1===this.state.responsive.isMatchedMedium&&this.setState(e=>({responsive:Object.assign(Object.assign({},e.responsive),{isMatchedMedium:!0})}))},this.handleUnmatchMedium=()=>{!0===this.state.responsive.isMatchedMedium&&this.setState(e=>({responsive:Object.assign(Object.assign({},e.responsive),{isMatchedMedium:!1})}))},this.handleMatchLarge=()=>{!1===this.state.responsive.isMatchedLarge&&this.setState(e=>({responsive:Object.assign(Object.assign({},e.responsive),{isMatchedLarge:!0})}))},this.handleUnmatchLarge=()=>{!0===this.state.responsive.isMatchedLarge&&this.setState(e=>({responsive:Object.assign(Object.assign({},e.responsive),{isMatchedLarge:!1})}))};const t=this.isPageResponsive();this.state={responsive:{isResponsive:t,isMatchedMedium:!t,isMatchedLarge:!t},setupComplete:!t}}render(){const{user:e,titleRegion:t,titleClass:s,chromeClass:n,embeddedAppRegion:h,searchBarProps:d,useMaestroPortal:g,actionSidebarRegion:p,useRightRail:m,useModernSearchDropdown:S,sidebarClass:E}=this.props,{setupComplete:_,responsive:R}=this.state,f=g,v=!g;return a.default.createElement("div",{className:i.default(["maestro-chrome",n])},R.isResponsive&&a.default.createElement(r.Match,{media:l.BREAKPOINT_LARGE,onSetup:this.handleSetup,onMatch:this.handleMatchLarge,onUnmatch:this.handleUnmatchLarge}),R.isResponsive&&a.default.createElement(r.Match,{media:l.BREAKPOINT_MEDIUM,onSetup:this.handleSetup,onMatch:this.handleMatchMedium,onUnmatch:this.handleUnmatchMedium}),_&&(v||f)&&a.default.createElement(o.PageletMaestroHeader,Object.assign({user:e,title:"function"==typeof t?t(R):t,titleClass:s,chromeClass:n,responsive:R},d||{},{useMaestroPortal:g,useModernSearchDropdown:S})),_&&f&&a.default.createElement(c.MaestroPortal,{element:c.MaestroPortalElement.SIDEBAR,chromeClass:i.default(["maestro-sidebar-chrome",n])},a.default.createElement(u,{actionSidebarRegion:p,useRightRail:m,responsive:R,sidebarClass:E})),_&&a.default.createElement(c.MaestroPortal,{element:c.MaestroPortalElement.CONTENT,chromeClass:i.default(["maestro-content-chrome",n])},a.default.createElement("div",{className:"maestro-app"},a.default.createElement("div",{className:"maestro-app-content"},"function"==typeof h?h(R):h),!f&&a.default.createElement(u,{actionSidebarRegion:p,useRightRail:m,responsive:R}))))}}t.MaestroChrome=h,h.displayName="MaestroChrome"})),define("metaserver/static/js/modules/clean/react/maestro/responsive",["require","exports","tslib","react","spectrum/vertically_fixed/index"],(function(e,t,s,a,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VerticallyFixedWrapper=t.BREAKPOINT_LARGE=t.BREAKPOINT_MEDIUM=t.RESPONSIVE_CLASS=void 0,a=s.__importDefault(a),t.RESPONSIVE_CLASS="maestro--responsive",t.BREAKPOINT_MEDIUM="(min-width: 736px)",t.BREAKPOINT_LARGE="(min-width: 1025px)";class r extends a.default.Component{render(){const e=this.props,{responsive:t}=e,r=s.__rest(e,["responsive"]),o=t&&t.isResponsive?"div":i.VerticallyFixed;return a.default.createElement(o,r)}}t.VerticallyFixedWrapper=r,r.displayName="VerticallyFixedWrapper"})),define("metaserver/static/js/modules/clean/react/maestro/layout/secondary_sidebar",["require","exports","tslib","react","metaserver/static/js/modules/clean/react/maestro/responsive"],(function(e,t,s,a,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MaestroSecondarySidebar=void 0,a=s.__importDefault(a);class r extends a.default.Component{constructor(e){super(e),this.state={}}render(){return a.default.createElement(i.VerticallyFixedWrapper,{responsive:this.props.responsive,className:"maestro-secondary-sidebar"},this.props.children)}}t.MaestroSecondarySidebar=r,r.displayName="MaestroSecondarySidebar"})),define("metaserver/static/js/modules/clean/react/maestro/layout/top_menu_container",["require","exports","tslib","react","metaserver/static/js/modules/clean/react/components/css","metaserver/static/js/modules/clean/search/single_page/input/wrapper"],(function(e,t,s,a,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TopMenuContainer=void 0,a=s.__importDefault(a);class o extends a.default.Component{renderSearchBar(){const{searchVariant:e}=this.props;if(this.props.user){if(this.props.overrideSearchBar)return this.props.overrideSearchBar;if("dropdown"===e)return a.default.createElement(r.SearchInput,{variant:e,user:this.props.user});if("full-page"===e)return a.default.createElement(r.SearchInput,{variant:e,user:this.props.user,path:this.props.currentPath,isActive:!!this.props.isSearching,onSearchEnter:this.props.onSearchEnter,onSearchExit:this.props.onSearchExit,inputBoxRef:this.props.inputBoxRef})}return null}render(){return this.renderSearchBar()}}o.defaultProps={searchVariant:"dropdown",isSearchBarExpanded:!1,currentPath:"/"},o.displayName="TopMenuContainerWithoutCSS",t.TopMenuContainer=i.requireCssWithComponent(o,["/static/css/pagelet-vflQZ-elc.css"])})),define("metaserver/static/js/modules/clean/react/maestro/components/header_portal",["require","exports","tslib","classnames","react","react-dom","metaserver/static/js/modules/clean/react/components/css","metaserver/static/js/modules/core/browser","metaserver/static/js/modules/clean/sync_everything/constants"],(function(e,t,s,a,i,r,o,n,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MaestroPortal=t.doesRouteSupportPortals=t.MaestroPortalElement=void 0,a=s.__importDefault(a),i=s.__importDefault(i),r=s.__importDefault(r);var c;(function(e){e.TITLE="maestro-title-portal",e.PROMPT="maestro-prompt-portal",e.TOP_MENU="maestro-top-menu-portal",e.NAV="maestro-nav-portal",e.CONTENT="maestro-content-portal",e.SIDEBAR="sidebar-portal",e.GLOBAL_HEADER="global-header-portal",e.CAMPAIGNS_TOOLKIT="campaigns-toolkit"})(c=t.MaestroPortalElement||(t.MaestroPortalElement={}));const u=["edison_test/home","edison_test/personal","edison_test/work","edison_test/starred","edison_test/recents","deleted_files","h","recents","home","work","personal","photos","search/personal","search/work","share","scl","starred","requests","collections","automations","backups","backup/all","manage","manage/billing","manage/subscriptions","team/admin/security/passwords"];function h(e=n.get_pathname()){var t,s;const a=Boolean(u.find(t=>e===`/${t}`||0===e.indexOf(`/${t}/`)));let i=!1;if(null===(t=document.body)||void 0===t?void 0:t.classList){const t=Array.from(null===(s=document.body)||void 0===s?void 0:s.classList).includes("sl-folder-app");i=0===e.indexOf("/scl/")&&t}return a&&!i}t.doesRouteSupportPortals=h;const d=({element:e,chromeClass:t,children:s})=>{i.default.useEffect(()=>(l.isBackupBrowse()?document.body.style.setProperty("--maestro-left-nav-width","0px"):document.body.style.removeProperty("--maestro-left-nav-width"),()=>{document.body.style.removeProperty("--maestro-left-nav-width")}),[]);const o=i.default.useMemo(()=>(function(e){if(window.RUNNING_IN_REACTSERVER)return null;let t=document.getElementById("maestro-portal");if(!t){t=document.createElement("div"),t.setAttribute("id","maestro-portal"),t.setAttribute("class","maestro-portal");const e=document.createElement("div");e.setAttribute("id",c.PROMPT),e.setAttribute("class",c.PROMPT);const s=document.createElement("div");s.setAttribute("id",c.NAV),s.setAttribute("class",c.NAV);const a=document.createElement("div");a.setAttribute("id",c.TITLE),a.setAttribute("class",c.TITLE);const i=document.createElement("div");i.setAttribute("id",c.TOP_MENU),i.setAttribute("class",c.TOP_MENU);const r=document.createElement("div");r.setAttribute("id",c.CONTENT),r.setAttribute("class",c.CONTENT);const o=document.createElement("div");o.setAttribute("id",c.CAMPAIGNS_TOOLKIT),o.setAttribute("class",c.CAMPAIGNS_TOOLKIT),t.classList.add("global-header-exp"),document.body.classList.add("global-header--portaled");const n=document.createElement("div");n.setAttribute("id",c.GLOBAL_HEADER),n.setAttribute("class",c.GLOBAL_HEADER);const l=document.createElement("div");l.setAttribute("id",c.SIDEBAR),l.setAttribute("class",c.SIDEBAR),t.appendChild(e),t.appendChild(n),t.appendChild(s),t.appendChild(a),t.appendChild(r),t.appendChild(l),document.body.insertBefore(t,document.body.firstChild)}return document.getElementById(e)})(e),[e]);return o?i.default.createElement(i.default.Fragment,null,i.default.createElement("div",{className:a.default(`${e}__shadow`)}),r.default.createPortal(i.default.createElement("div",{className:t},s),o)):null};d.displayName="MaestroPortalWithoutCSS";const g=o.requireCssWithComponent(d,["/static/css/maestro-nav/maestro-portal-vfl-46ImO.css"]);t.MaestroPortal=e=>h()?i.default.createElement(g,Object.assign({},e)):i.default.createElement(i.default.Fragment,null,e.children),t.MaestroPortal.displayName="MaestroPortal",t.MaestroPortal.displayName="MaestroPortal"})),define("metaserver/static/js/modules/clean/react/error_boundary",["require","exports","tslib","react"],(function(e,t,s,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorBoundary=void 0,a=s.__importDefault(a);class i extends a.default.Component{constructor(){super(...arguments),this.state={hasError:!1}}static getDerivedStateFromError(e){return{hasError:!0}}componentDidCatch(e,t){this.props.onCatch(e,t)}render(){return this.state.hasError?a.default.createElement(a.default.Fragment,null,this.props.fallbackComponent):a.default.createElement(a.default.Fragment,null,this.props.children)}}t.ErrorBoundary=i,i.displayName="ErrorBoundary"})),define("typescript/component_libraries/retrieval-components/src/search-suggestions/index",["require","exports","tslib","classnames","react","dig-components/avatar","dig-components/buttons","dig-components/chips","dig-components/icons","dig-components/icons/src","dig-components/typography","dig-components/tooltips","react-intl","typescript/libraries/spectrum-content-icon-compatibility/src/index","typescript/libraries/spectrum-content-icon-compatibility/src/index"],(function(e,t,s,a,i,r,o,n,l,c,u,h,d,g,p){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.generateIdForSuggestion=t.PopularFiltersSuggestionList=t.isResultSuggestion=t.isQuerySuggestion=t.isPopularFiltersSuggestion=t.isTagsSuggestion=t.isPeopleSuggestion=t.SearchSuggestions=t.extractQueryWithoutTags=void 0,a=s.__importDefault(a),i=s.__importStar(i),t.extractQueryWithoutTags=function(e){return e?e.replace(/\#\w*[\s,]?/g,"").trim():""},t.SearchSuggestions=e=>{const{id:t,className:s,ariaLabel:r,suggestions:o,highlightedSuggestion:n,onSuggestionClick:l,showViewProfileButton:c,showTagsSuggestions:u=!1,query:h,popularFilters:d,suggestionSectionOrder:g}=e,p=(function(e){const t={querySuggestions:[],peopleSuggestions:[],tagsSuggestions:[],popularFiltersSuggestions:[],resultSuggestions:[]};return e.forEach(e=>{S(e.suggestions)?(t.peopleSuggestions=e.suggestions,t.peopleTitle=e.title):_(e.suggestions)?(t.tagsSuggestions=e.suggestions,t.tagsTitle=e.title):R(e.suggestions)?t.popularFiltersSuggestions=e.suggestions:E(e.suggestions)?(t.querySuggestions=e.suggestions,t.queryTitle=e.title):f(e.suggestions)&&(t.resultSuggestions=e.suggestions,t.resultTitle=e.title)}),t})(o);return i.createElement("ul",{id:t,className:a.default("rc-search-suggestions__list",s),role:"listbox","aria-label":r},g.map(e=>{switch(e){case"popular":return i.createElement(A,{suggestions:p.popularFiltersSuggestions,highlightedSuggestion:n,onSuggestionClick:l,query:h,popularFilters:d});case"query":return i.createElement(y,{suggestions:p.querySuggestions,highlightedSuggestion:n,onSuggestionClick:l,sectionTitle:p.queryTitle});case"people":return i.createElement(T,{suggestions:p.peopleSuggestions,highlightedSuggestion:n,onSuggestionClick:l,showViewProfileButton:c,sectionTitle:p.peopleTitle});case"tags":return i.createElement(P,{suggestions:p.tagsSuggestions,highlightedSuggestion:n,onSuggestionClick:l,sectionTitle:p.tagsTitle,showTagsSuggestions:u});case"result":return i.createElement(N,{suggestions:p.resultSuggestions,highlightedSuggestion:n,onSuggestionClick:l,sectionTitle:p.resultTitle});default:return null}}))},t.SearchSuggestions.displayName="SearchSuggestions";const m=({title:e})=>i.createElement("li",{className:a.default("rc-search-suggestions__header",{"rc-search-suggestions__header--empty":void 0===e}),role:"option","aria-selected":!1},e&&i.createElement(u.Text,{color:"faint"},e));m.displayName="SearchSuggestionHeader",t.isPeopleSuggestion=e=>"name"in e;const S=e=>!!e.length&&t.isPeopleSuggestion(e[0]);t.isTagsSuggestion=e=>"tag"in e,t.isPopularFiltersSuggestion=e=>"searchFilter"in e,t.isQuerySuggestion=e=>"query"in e;const E=e=>!!e.length&&t.isQuerySuggestion(e[0]),_=e=>!!e.length&&t.isTagsSuggestion(e[0]),R=e=>!!e.length&&t.isPopularFiltersSuggestion(e[0]);t.isResultSuggestion=e=>"resultId"in e;const f=e=>!!e.length&&t.isResultSuggestion(e[0]),v=(e,s)=>!!e&&(t.isPeopleSuggestion(e)&&t.isPeopleSuggestion(s)?e.emailAddress===s.emailAddress:t.isTagsSuggestion(e)&&t.isTagsSuggestion(s)?e.tag===s.tag:t.isQuerySuggestion(e)&&t.isQuerySuggestion(s)?e.query===s.query:t.isPopularFiltersSuggestion(e)&&t.isPopularFiltersSuggestion(s)?e.searchFilter===s.searchFilter:!(!t.isResultSuggestion(e)||!t.isResultSuggestion(s))&&e.resultId===s.resultId),y=({suggestions:e,highlightedSuggestion:t,onSuggestionClick:s,sectionTitle:a})=>e.length>0?i.createElement(i.Fragment,null,i.createElement(m,{title:a}),e.map(e=>i.createElement(I,{key:e.query,suggestion:e,isHighlighted:v(t,e),onSuggestionClick:s}))):null;y.displayName="QuerySuggestionSection";const T=({suggestions:e,highlightedSuggestion:t,onSuggestionClick:s,showViewProfileButton:a,sectionTitle:r})=>e.length>0?i.createElement(i.Fragment,null,i.createElement(m,{title:r}),e.map(e=>i.createElement(O,{key:e.emailAddress,suggestion:e,isHighlighted:v(t,e),onSuggestionClick:s,showViewProfileButton:a}))):null;T.displayName="PeopleSuggestionSection";const P=({suggestions:e,highlightedSuggestion:t,onSuggestionClick:s,sectionTitle:a,showTagsSuggestions:r})=>r&&e.length>0?i.createElement(i.Fragment,null,i.createElement(m,{title:a}),i.createElement("li",{className:"rc-search-suggestions__tags-row",id:"suggestion-tags-container"},e.map(e=>i.createElement(b,{key:e.tag,suggestion:e,isHighlighted:v(t,e),onSuggestionClick:s})))):null;P.displayName="TagsSuggestionSection";const A=({popularFilters:e,suggestions:s,query:a,highlightedSuggestion:r,onSuggestionClick:o})=>e&&s.length>0?i.createElement(i.Fragment,null,i.createElement(m,null),e.all.count>0&&i.createElement(t.PopularFiltersSuggestionList,{icon:i.createElement(l.UIIcon,{src:c.SearchLine,style:{marginRight:10}}),text:"All matches for ",suggestion:s[0],isBold:!0,query:t.extractQueryWithoutTags(a),counter:e.all.count.toString(),hasMore:e.all.hasMore,highlightedSuggestion:r,onSuggestionClick:o}),e.names.count>0&&i.createElement(t.PopularFiltersSuggestionList,{icon:i.createElement(l.UIIcon,{src:c.FileLine,style:{marginRight:10}}),text:"File or folder name includes ",suggestion:s.find(e=>"names"===e.searchFilter),isBold:!1,query:t.extractQueryWithoutTags(a),counter:e.names.count.toString(),hasMore:e.names.hasMore,highlightedSuggestion:r,onSuggestionClick:o}),e.metadata.count>0&&i.createElement(t.PopularFiltersSuggestionList,{icon:i.createElement(l.UIIcon,{src:c.ImageLine,style:{marginRight:10}}),text:"Image metadata contains ",suggestion:s.find(e=>"metadata"===e.searchFilter),isBold:!1,query:t.extractQueryWithoutTags(a),counter:e.metadata.count.toString(),hasMore:e.metadata.hasMore,highlightedSuggestion:r,onSuggestionClick:o})):null;A.displayName="PopularFiltersSuggestionSection",t.PopularFiltersSuggestionList=({icon:e,text:t,suggestion:s,query:a,counter:r,hasMore:o,isBold:n,highlightedSuggestion:l,onSuggestionClick:c})=>i.createElement(M,{key:t,suggestion:s,isHighlighted:v(l,s),onSuggestionClick:c},i.createElement("div",{className:"rc-search-suggestions-row__container"},e,i.createElement(u.Text,{isBold:n,className:"rc-search-suggestions-row__text"},t),i.createElement(u.Text,{isBold:n,className:"rc-search-suggestions-row__text",color:"faint"},a),i.createElement(u.Text,{className:"rc-search-suggestions-row__text_float",color:"faint"},o?`${r}+`:r))),t.PopularFiltersSuggestionList.displayName="PopularFiltersSuggestionList";const C=({initials:e,avatar:t})=>i.createElement(r.Avatar,{size:"small",src:t,className:"rc-search-suggestions__row-icon",alt:e,"aria-hidden":!0,hasNoOutline:!0,backgroundColor:r.avatarColorForUserIdentifier(e)},e);C.displayName="PeopleAvatar",t.generateIdForSuggestion=e=>t.isPeopleSuggestion(e)?`suggestion-people-${e.emailAddress}`:t.isTagsSuggestion(e)?`suggestion-tags-${e.tag}`:t.isPopularFiltersSuggestion(e)?`suggestion-query-${e.searchFilter}`:t.isResultSuggestion(e)?`suggestion-result-${e.resultName}`:`suggestion-query-${e.query}`;class M extends i.PureComponent{constructor(){super(...arguments),this.handleClick=()=>{this.props.onSuggestionClick(this.props.suggestion)}}render(){const{isHighlighted:e,children:s,className:r,suggestion:o}=this.props;return i.createElement("li",{className:a.default("rc-search-suggestions__row",r,{"rc-search-suggestions__row--highlighted":e}),role:"option",onClick:this.handleClick,"aria-selected":e,id:t.generateIdForSuggestion(o),"aria-label":o.ariaLabel},s)}}M.displayName="SuggestionRow";const O=e=>i.createElement(M,Object.assign({},e,{className:"rc-search-suggestions__row--people"}),i.createElement(C,{initials:e.suggestion.initials,avatar:e.suggestion.avatar}),i.createElement(U,{highlightSpans:e.suggestion.nameHighlights,fallbackText:e.suggestion.name}),i.createElement(U,{highlightSpans:e.suggestion.emailAddressHighlights,fallbackText:e.suggestion.emailAddress,isFaint:!0}),e.showViewProfileButton&&"createViewProfileHandler"in e.suggestion&&i.createElement(o.Button,{variant:"transparent",size:"small",className:"rc-search-suggestions__view-profile",onClick:e.suggestion.createViewProfileHandler(e.suggestion),onKeyDown:e.suggestion.handleViewProfileKeyDown,hasNoUnderline:!0},e.suggestion.viewProfileButtonText));O.displayName="PeopleSuggestionRow";const I=e=>i.createElement(M,Object.assign({},e),i.createElement(l.UIIcon,{src:c.SearchLine,className:"rc-search-suggestions__row-icon"}),i.createElement(U,{highlightSpans:e.suggestion.highlightSpans,fallbackText:e.suggestion.query}));I.displayName="QuerySuggestionRow";const b=e=>{const{suggestion:t,isHighlighted:s,onSuggestionClick:r}=e,o=d.useIntl(),u=t.isSmartTag?t.tag:`#${t.tag}`;const g=t.isSmartTag?{withIconLeft:i.createElement(l.UIIcon,{src:c.Twinkle2Line,size:"small"})}:{},p=i.createElement(n.FilterChip,Object.assign({className:a.default("rc-search-suggestions__chip",{"rc-search-suggestions__chip--highlighted":s})},g,{onClick:()=>{r(t)},"aria-label":t.ariaLabel,size:"small"}),u);return t.isSmartTag?i.createElement(h.Tooltip,{title:o.formatMessage({id:"84w/ba",defaultMessage:"Find files that we tagged for you"}),placement:"bottom"},p):p};b.displayName="TagsSuggestionItem";const N=({suggestions:e,highlightedSuggestion:t,onSuggestionClick:s,sectionTitle:a})=>e.length>0?i.createElement(i.Fragment,null,i.createElement(m,{title:a}),e.map(e=>i.createElement(L,{key:e.resultId,suggestion:e,isHighlighted:v(t,e),onSuggestionClick:s}))):null;N.displayName="ResultSuggestionSection";const L=e=>{var t;const{suggestion:s}=e,a=d.useIntl();return i.createElement(M,Object.assign({},e,{className:"rc-search-suggestions-result-row"}),s.filePath?i.createElement(p.FileIcon,{className:"rc-search-suggestions__row-icon",path:s.filePath}):i.createElement(g.IconContent,{className:"rc-search-suggestions__row-icon",name:s.iconType}),i.createElement("div",{className:"rc-search-suggestions-result-row__details"},i.createElement(u.Text,{className:"rc-search-suggestions-result-row__text"},s.resultName),i.createElement(u.Text,{className:"rc-search-suggestions-result-row__text",color:"faint",size:"small"},null!==(t=s.lastModifiedByPerson)&&void 0!==t?t:a.formatMessage({id:"Rom+x1",defaultMessage:"You"}))),i.createElement(u.Text,{className:"rc-search-suggestions-result-row__datetime",color:"faint",size:"small"},s.lastModifiedDateOrTime))};L.displayName="ResultSuggestionRow";const U=({highlightSpans:e,fallbackText:t,isFaint:s})=>i.createElement(u.Text,{color:s?"faint":"standard",className:"rc-search-suggestions__row-text"},e.length?e.map((e,t)=>e.isHighlighted?i.createElement(u.Text,{color:"inherit",isBold:!0,key:t},e.string):i.createElement("span",{key:t},e.string)):t);U.displayName="HighlightedText"})),define("metaserver/static/js/modules/clean/react/admin/teams/onboarding/web/trackers/personalization_tracker",["require","exports","tslib","metaserver/static/js/modules/core/exception","metaserver/static/js/modules/clean/growth/user_action/trackers/personalization_tracker","metaserver/static/js/modules/clean/active_user"],(function(e,t,s,a,i,r){"use strict";function o(e,t){return s.__awaiter(this,void 0,void 0,(function*(){let s;try{s=r.getActiveUser()}catch(t){return void a.reportStack(`Error tracking personalization step: ${t.message}`,{severity:a.SEVERITY.NONCRITICAL,tags:[i.PersonalizationProjectTag],exc_extra:{action:e}})}if(!s)return;const o=new i.PersonalizationTracker(s.id);try{yield o.track(e,t)}catch(t){a.reportStack(`Error tracking personalization step: ${t.message}`,{severity:a.SEVERITY.NONCRITICAL,tags:[i.PersonalizationProjectTag],exc_extra:{action:e}})}}))}Object.defineProperty(t,"__esModule",{value:!0}),t.trackDismissSharingMadeEasyBanner=t.trackDismissJtbdCreateButtonTooltip=t.trackDismissJtbdNextStepsOverlay=t.trackDismissJtbdUploadButtonTooltip=t.trackDismissCreateSuggestedFolderTooltip=t.trackDismissAllSuggestedItemsToMove=t.trackDismissSuggestedItemToMove=t.trackQuickActionSeeSuggestedFolders=t.trackMinimizeCollectionsQuickActions=t.trackDismissCollectionsQuickAction=t.trackDismissDownloadAppZone=t.trackClickDesktopCTA=t.trackHideSuggestedFolder=t.trackCreateSuggestedFolder=void 0,t.trackCreateSuggestedFolder=function(e){o(i.PersonalizationActions.CREATE_SUGGESTED_FOLDER,{extra:{created_folder:e}})},t.trackHideSuggestedFolder=function(e){o(i.PersonalizationActions.HIDE_SUGGESTED_FOLDER,{extra:{hidden_folder:e}})},t.trackClickDesktopCTA=function(){o(i.PersonalizationActions.CLICK_DESKTOP_CTA)},t.trackDismissDownloadAppZone=function(){o(i.PersonalizationActions.DISMISS_DOWNLOAD_APP_PANEL)},t.trackDismissCollectionsQuickAction=function(e){o(i.PersonalizationActions.DISMISS_COLLECTIONS_QUICK_ACTION,{extra:{dismissed_quick_action:e}})},t.trackMinimizeCollectionsQuickActions=function(e){o(i.PersonalizationActions.MINIMIZE_COLLECTIONS_QUICK_ACTIONS,{extra:{minimize_quick_actions:e}})},t.trackQuickActionSeeSuggestedFolders=function(){o(i.PersonalizationActions.QUICK_ACTION_SEE_SUGGESTED_FOLDERS)},t.trackDismissSuggestedItemToMove=function(e,t){o(i.PersonalizationActions.DISMISS_SUGGESTED_ITEM_TO_MOVE,{extra:t?{oid:t}:{ns_id:e}})},t.trackDismissAllSuggestedItemsToMove=function(){o(i.PersonalizationActions.DISMISS_ALL_SUGGESTED_ITEMS_TO_MOVE)},t.trackDismissCreateSuggestedFolderTooltip=function(){o(i.PersonalizationActions.DISMISS_CREATE_SUGGESTED_FOLDER_TOOLTIP)},t.trackDismissJtbdUploadButtonTooltip=function(){o(i.PersonalizationActions.DISMISS_JTBD_UPLOAD_BUTTON_TOOLTIP)},t.trackDismissJtbdNextStepsOverlay=function(){o(i.PersonalizationActions.DISMISS_JTBD_NEXT_STEPS_OVERLAY)},t.trackDismissJtbdCreateButtonTooltip=function(){o(i.PersonalizationActions.DISMISS_JTBD_CREATE_BUTTON_TOOLTIP)},t.trackDismissSharingMadeEasyBanner=function(){o(i.PersonalizationActions.DISMISS_SHARING_MADE_EASY_BANNER)}})); //# sourceMappingURL=pkg-embedded_app_search.min.js-vflTLbMwl.map