(function(){"use strict";var e={5187:function(e,t,o){var n=o(9242),a=o(3396);function s(e,t){const o=(0,a.up)("router-view");return(0,a.wg)(),(0,a.j4)(o)}var r=o(89);const i={},l=(0,r.Z)(i,[["render",s]]);var c=l,d=o(678);const u={id:"main",style:{overflow:"hidden"}},h={class:"content-center-full"};function g(e,t,o,n,s,r){const i=(0,a.up)("PeopleSearch"),l=(0,a.up)("OrgChart");return(0,a.wg)(),(0,a.iD)("div",u,[(0,a._)("section",h,[(0,a._)("section",null,[(0,a.Wm)(i,{onOnPersonSelected:r.selectPerson,ref:"peopleSearchBox"},null,8,["onOnPersonSelected"]),(0,a.Wm)(l,{ref:"orgchart"},null,512)])])])}var p=o(7139);const f=e=>((0,a.dD)("data-v-9bde5b9e"),e=e(),(0,a.Cn)(),e),m=f((()=>(0,a._)("link",{href:"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css",integrity:"sha384-DyZ88mC6Up2uqS4h/KRgHuoeGwBcD4Ng9SiP4dIRy0EXTlnuz47vAwmeGwVChigm",crossorigin:"anonymous",rel:"stylesheet"},null,-1))),y={style:{position:"absolute",top:"140px",right:"1em"}},w={style:{display:"none","padding-right":"1em"}},v=f((()=>(0,a._)("br",null,null,-1))),k=f((()=>(0,a._)("br",null,null,-1))),_=["src"],x={style:{height:"55px",width:"80px","align-self":"flex-end",position:"absolute"}},b={style:{"margin-top":"1ex","font-size":"18px"}},I={class:"greyed"},R={class:"group"},C={class:"group"},S={key:0,class:"greyed"},D={key:0},U=f((()=>(0,a._)("i",{class:"far fa-clipboard"},null,-1))),B=f((()=>(0,a._)("i",{class:"fas fa-check"},null,-1))),P=[U,B],L={key:1,class:"greyed"},O={key:0},z=f((()=>(0,a._)("i",{class:"far fa-clipboard"},null,-1))),T=f((()=>(0,a._)("i",{class:"fas fa-check"},null,-1))),$=[z,T],A={class:"group"},E={key:0,class:"greyed"},N=f((()=>(0,a._)("i",{class:"fas fa-map-marker-alt"},null,-1))),q=["title"],F=f((()=>(0,a._)("i",{class:"far fa-clock"},null,-1))),G={class:"group"},W={key:0,class:"greyed"},H=["href"],M={class:"greyed"},j=["href"],K={key:1,id:"department-label"},Z={style:{"margin-top":"1ex"}},Q={style:{"font-size":"small","margin-top":"1ex"}},Y={key:2,class:"loadingContainer"},V=f((()=>(0,a._)("div",{class:"ball1"},null,-1))),X=f((()=>(0,a._)("div",{class:"ball2"},null,-1))),J=f((()=>(0,a._)("div",{class:"ball3"},null,-1))),ee=f((()=>(0,a._)("div",{class:"ball4"},null,-1))),te=[V,X,J,ee];function oe(e,t,o,s,r,i){const l=(0,a.up)("WoltLogo"),c=(0,a.up)("DoordashLogo");return(0,a.wg)(),(0,a.iD)(a.HY,null,[m,(0,a._)("div",y,[r.currentRoot&&r.currentRoot.parentId?((0,a.wg)(),(0,a.iD)("button",{key:0,onClick:t[0]||(t[0]=e=>{i.switchRoot(r.currentRoot.parentId)})},"Up")):(0,a.kq)("",!0),(0,a._)("div",w,[(0,a._)("button",{onClick:t[1]||(t[1]=e=>i.centerChart())},"center chart"),v,(0,a._)("button",{onClick:t[2]||(t[2]=e=>i.navigateToCurrentUser())},"goto myself"),k])]),r.personalInfoBox?((0,a.wg)(),(0,a.iD)("div",{key:0,class:"overlay",onClick:t[5]||(t[5]=(0,n.iM)((e=>r.personalInfoBox=null),["self"]))},[(0,a._)("div",{class:"personalInfoBox",onClick:e=>!1,style:(0,p.j5)({left:r.personalInfoBox.xPos+"px",top:r.personalInfoBox.yPos+"px"})},[(0,a._)("img",{class:"profileImg",src:r.personalInfoBox.imageUrl&&"_"!=r.personalInfoBox.imageUrl?r.personalInfoBox.imageUrl:"/static/noprofile.png"},null,8,_),(0,a._)("div",x,["dd"!=r.personalInfoBox.company?((0,a.wg)(),(0,a.j4)(l,{key:0})):(0,a.kq)("",!0),"dd"==r.personalInfoBox.company?((0,a.wg)(),(0,a.j4)(c,{key:1})):(0,a.kq)("",!0)]),(0,a._)("div",b,(0,p.zw)(r.personalInfoBox.name),1),(0,a._)("div",I,(0,p.zw)(r.personalInfoBox.positionName),1),(0,a._)("div",R,[(0,a._)("div",null,(0,p.zw)(r.personalInfoBox.email),1)]),(0,a._)("div",C,[r.personalInfoBox.supOrg?((0,a.wg)(),(0,a.iD)("div",S,[(0,a.Uk)((0,p.zw)(r.personalInfoBox.supOrg)+" ",1),r.personalInfoBox.supOrgId?((0,a.wg)(),(0,a.iD)("span",D,"("+(0,p.zw)(r.personalInfoBox.supOrgId)+")",1)):(0,a.kq)("",!0),(0,a._)("button",{class:"clipboard",onClick:t[3]||(t[3]=e=>i.copyToClipboard(e,r.personalInfoBox.supOrg))},P)])):(0,a.kq)("",!0),r.personalInfoBox.costCenterName?((0,a.wg)(),(0,a.iD)("div",L,[(0,a.Uk)((0,p.zw)(r.personalInfoBox.costCenterName)+" ",1),r.personalInfoBox.costCenterId?((0,a.wg)(),(0,a.iD)("span",O,"("+(0,p.zw)(r.personalInfoBox.costCenterId)+")",1)):(0,a.kq)("",!0),(0,a._)("button",{class:"clipboard",onClick:t[4]||(t[4]=e=>i.copyToClipboard(e,r.personalInfoBox.costCenterName))},$)])):(0,a.kq)("",!0)]),(0,a._)("div",A,[r.personalInfoBox.office?((0,a.wg)(),(0,a.iD)("div",E,[N,(0,a.Uk)(" "+(0,p.zw)(r.personalInfoBox.office)+" ",1),(0,a._)("span",{class:(0,p.C_)(i.getFlag(r.personalInfoBox.country))},null,2)])):(0,a.kq)("",!0),r.personalInfoBox.timezone?((0,a.wg)(),(0,a.iD)("div",{key:1,class:"greyed",title:r.personalInfoBox.timezone},[F,(0,a.Uk)(" "+(0,p.zw)(i.getLocalTime(r.personalInfoBox.timezone)),1)],8,q)):(0,a.kq)("",!0)]),(0,a._)("div",G,[r.showWorkdayLink&&r.personalInfoBox.profileUrl?((0,a.wg)(),(0,a.iD)("div",W,[(0,a._)("a",{href:r.personalInfoBox.profileUrl,target:"_blank"},"Workday profile",8,H)])):(0,a.kq)("",!0),(0,a._)("div",M,[(0,a._)("a",{href:i.getSlackUrl(r.personalInfoBox.slackId),target:"_blank"},"Start chat in Slack",8,j)])])],4)])):(0,a.kq)("",!0),r.currentRoot?((0,a.wg)(),(0,a.iD)("div",K,["dd"!=r.currentRoot.company?((0,a.wg)(),(0,a.j4)(l,{key:0})):(0,a.kq)("",!0),"dd"==r.currentRoot.company?((0,a.wg)(),(0,a.j4)(c,{key:1})):(0,a.kq)("",!0),(0,a._)("div",Z,(0,p.zw)(r.currentRoot.supOrg),1),(0,a._)("div",Q,(0,p.zw)(r.currentRoot.supOrgId),1)])):(0,a.kq)("",!0),(0,a._)("div",{id:"chart-container",onClick:t[6]||(t[6]=(...e)=>i.chartClick&&i.chartClick(...e)),class:"chart-container"}),r.loading?((0,a.wg)(),(0,a.iD)("div",Y,te)):(0,a.kq)("",!0)],64)}var ne=o(8574),ae=new ne.UserManager({userStore:new ne.WebStorageStateStore,authority:"https://doordash.okta.com",client_id:"0oa16hkac2dCvmZ3C0x8",redirect_uri:`${window.location.origin}/static/callback.html`,response_type:"code",post_logout_redirect_uri:"https://doordash.okta.com/login/signout",silent_redirect_uri:`${window.location.origin}/static/silent-renew.html`,automaticSilentRenew:!0,filterProtocolClaims:!0,loadUserInfo:!0,response_mode:"fragment",scope:"openid profile email"});ne.Log.logger=console,ne.Log.level=ne.Log.NONE;class se{async _GetUserData(){let e=await ae.getUser();return null==e?(this.SignIn(null,!0),null):e}async IsSignedIn(){return null!=await this._GetUserData()}async GetIDToken(){let e=await this._GetUserData();if(null!=e)return e.id_token}async RenewToken(){let e=await ae.signinSilent();return null==e&&this.SignIn(null,!0),e}async GetProfile(){let e=await this._GetUserData();if(null!=e)return e.profile}async GetSessionState(){let e=await this._GetUserData();if(null!=e)return e.session_state}async GetAccessToken(){let e=await this._GetUserData();if(null!=e)return e.access_token}async GetUserScopes(){let e=await this.GetProfile();if(e)return e.scope}async GetUserRoles(){let e=await this.GetProfile();if(e)return e.role}async GetUserEmail(){let e=await this._GetUserData();if(null!=e)return e.profile.email}async IsAllowedDomain(){let e=["@wolt.com","@external.wolt.com","@doordash.com","@ext.doordash.com"],t=await this.GetUserEmail();return e.some((e=>t.endsWith(e)))}async SignIn(e=null,t=!1){t&&"true"==window.localStorage.getItem("ss_prevent_auto_login")||(window.localStorage.removeItem("ss_prevent_auto_login"),console.log("Signing in..."),ae.signinRedirect({state:e}).catch((e=>{console.error(e)})))}async SignOut(e=!1){console.log("Signing out..."),window.localStorage.setItem("ss_prevent_auto_login",!0),ae.signoutRedirect().then((e=>{console.log("Signed out: ",e)})).catch((e=>{console.error(e)}))}}const re=new se;ae.events.addUserLoaded((e=>{console.log("New User Loaded:",e),console.log("Access_token: ",e.access_token)})),ae.events.addAccessTokenExpiring((()=>{console.log("AccessToken expiring...")})),ae.events.addAccessTokenExpired((()=>{console.log("AccessToken expired!"),re.SignOut(!0),window.location.reload()})),ae.events.addSilentRenewError((()=>{console.error("Silent renew error!")})),ae.events.addUserSignedOut((()=>{console.log("User signed out."),ae.signoutRedirect().then((e=>{console.log("Signed out: ",e)})).catch((e=>{console.error(e)}))}));var ie=re;const le={class:"w-logo"};function ce(e,t,o,n,s,r){return(0,a.wg)(),(0,a.iD)("div",le)}var de={name:"WoltLogo"};const ue=(0,r.Z)(de,[["render",ce],["__scopeId","data-v-748e4aca"]]);var he=ue;const ge={class:"dd-logo"};function pe(e,t,o,n,s,r){return(0,a.wg)(),(0,a.iD)("div",ge)}var fe={name:"DoordashLogo"};const me=(0,r.Z)(fe,[["render",pe],["__scopeId","data-v-2bdb1292"]]);var ye=me,we=o(8335);const ve="",ke="tony@doordash.com",_e={Finland:"fi fi-fi",Sweden:"fi fi-se",Estonia:"fi fi-ee",Lativa:"fi fi-lv",Lithuania:"fi fi-lt",Norway:"fi fi-no",Denmark:"fi fi-dk",Germany:"fi fi-de",Greece:"fi fi-gr",Poland:"fi fi-pl",Slovakia:"fi fi-sk",Czechia:"fi fi-cz",Slovenia:"fi fi-si",Hungary:"fi fi-hu",Croatia:"fi fi-hr",Serbia:"fi fi-rs",Azerbaijan:"fi fi-az",Georgia:"fi fi-ge",Kazakhstan:"fi fi-kz",Israel:"fi fi-il",Japan:"fi fi-jp",Canada:"fi fi-ca",Australia:"fi fi-au","United States of America":"fi fi-us",Mexico:"fi fi-mx","North Macedonia":"fi fi-mk",Luxembourg:"fi fi-lu","United Kingdom":"fi fi-gb",Iceland:"fi fi-is",Switzerland:"fi fi-ch"};let xe=null,be=window.d3,Ie=null;var Re={name:"OrgChart",components:{WoltLogo:he,DoordashLogo:ye},data(){return{currentRoot:null,personalInfoBox:null,loading:!0,showWorkdayLink:!document.URL.includes("doordash.com")}},methods:{copyToClipboard(e,t){navigator.clipboard.writeText(t),e.target.parentNode.classList.add("copied"),setTimeout((()=>{e.target.parentNode.classList.remove("copied")}),1e3)},getLocalTime(e){return we.ou.now().setZone(e).toLocaleString(we.ou.TIME_24_SIMPLE)},getFlag(e){return _e[e]},getSlackUrl(e){return"https://slack.com/app_redirect?channel="+e},async navigateToCurrentUser(){let e=await ie.GetProfile(),t=this.findNode(e.email);this.switchRoot(t.parentId)},findNode(e){return e.includes("@")?Ie.filter((t=>t.email==e))[0]:Ie.filter((t=>t.id==e))[0]},switchRoot(e){let t=this.findNode(e),o=Ie.filter((e=>e.hierarchy.startsWith(t.hierarchy)));if(t.parentId){let e=null==t.supOrg||""===t.supOrg.trim()?"Up":t.supOrg;o.push({imageUrl:"",id:t.parentId,parentId:null,name:e,up:!0})}o.forEach((e=>{e._expanded=e.id==t.id||e.parentId==t.id}));let n=xe.getChartState();n.data=o,this.currentRoot=t,xe.updateNodesState(),this.centerChart(),this.addHashToLocation(this.currentRoot.id)},addHashToLocation(e){const t=this.$route.path+"#"+encodeURIComponent(e);history.pushState({},null,t)},centerChart(){let e=document.getElementsByClassName("svg-chart-container")[0],t=e.getAttribute("width"),o=this.currentRoot.parentId?0:50,n=xe.getChartState().lastTransform;n.x=t/2,n.y=o,n.k=1,document.querySelectorAll(".svg-chart-container g.center-group")[0].setAttribute("transform",""),document.querySelectorAll(".svg-chart-container g.chart")[0].setAttribute("transform",`translate(${t/2},${o}) scale(1)`)},showDetails(e,t,o){this.personalInfoBox=Object.assign({},this.findNode(e)),this.personalInfoBox.xPos=t,this.personalInfoBox.yPos=o},chartClick(e){let t=this,o=e.target.closest(".open-details-event");if(o)return void t.showDetails(o.parentNode.getAttribute("data-id"),e.clientX,e.clientY);let n=e.target.closest(".slack-chat");if(n)return void window.open(t.getSlackUrl(n.getAttribute("data-slackid")),"_blank");let a=e.target.closest(".org-node")||e.target.closest("#up-node");if(a){let e=a.getAttribute("data-id");e!=t.currentRoot.id&&t.switchRoot(e)}}},async beforeMount(){let e=this,t=ve+"/api/orgdata";const o=await ie.GetIDToken();let n=await be.csv(t,{headers:{Authorization:o}});Ie=n,window.allPeople=n;for(let a=0;a120)).nodeWidth((e=>200)).childrenMargin((e=>50)).compactMarginBetween((e=>30)).compactMarginPair((e=>50)).neightbourMargin(((e,t)=>30)).siblingsMargin((e=>30)).buttonContent((({node:e,state:t})=>e.data.up?"":`
\n ${e.children?'':''} \n ${e.data._directSubordinates}
`)).linkUpdate((function(e,t,o){be.select(this).attr("stroke",(e=>e.data._upToTheRootHighlighted?"#152785":"#E4E2E9")).attr("stroke-width",(e=>e.data._upToTheRootHighlighted?5:1)),e.data._upToTheRootHighlighted&&be.select(this).raise()})).nodeContent((function(t,o,n,a){if(1==t.data.up)return`\n
\n \n
${t.data.name}
\n
\n `;let s="";return"dd"==t.data.company&&(s="dd"),t.data.name.includes("[C]")&&(s="contractor"),`\n
\n \n
\n\n
${t.data.name}
\n
${t.data.positionName}
\n
${t.data.supOrg}
\n
\n \n ${t.data.office}\n ${e.getLocalTime(t.data.timezone)}\n
\n
\n `})),xe.render(),e.loading=!1,xe.fit({animate:!1,nodes:null,scale:!1}),this.switchRoot(this.$route.hash.replace("#","")||ke),setTimeout((function(){e.centerChart()}),100)}};const Ce=(0,r.Z)(Re,[["render",oe],["__scopeId","data-v-9bde5b9e"]]);var Se=Ce;const De=e=>((0,a.dD)("data-v-4c3fb789"),e=e(),(0,a.Cn)(),e),Ue={id:"searchBox"},Be={id:"outerSearch"},Pe=De((()=>(0,a._)("i",{class:"fa fa-search","aria-hidden":"true"},null,-1))),Le={key:0,class:"searchResults"},Oe={class:"searchFilters"},ze=De((()=>(0,a._)("option",{value:"any",selected:""},"Any country",-1))),Te=["value","selected"],$e={class:"teamFilter"},Ae=De((()=>(0,a._)("div",{class:"",style:{left:"50%",top:"-24.5px",width:"20px",position:"absolute",transform:"translate(-50%, 0)"}},[(0,a._)("svg",{viewBox:"0 0 32 16",style:{filter:"drop-shadow(rgba(0, 0, 0, 0.09) 0px 0px 2px)",fill:"rgb(255, 255, 255)"}},[(0,a._)("path",{d:"M 16,0 L32,16 H0 Z",style:{fill:"rgb(210, 210, 210)"}}),(0,a._)("path",{d:"M 16,1 L31,16 H1 Z"})])],-1))),Ee=["onClick"],Ne=["src"],qe={class:"header"},Fe={class:"positionName",style:{"margin-top":"1ex",color:"#716E7B","font-size":"13px"}},Ge={key:0,class:"company"},We={key:1,class:"company"},He={key:2,class:"ctrlInfo"},Me={key:0,class:"searchEntry notFoundMessage"},je={key:0},Ke={key:1},Ze={key:2};function Qe(e,t,o,s,r,i){const l=(0,a.up)("WoltLogo"),c=(0,a.up)("DoordashLogo");return(0,a.wg)(),(0,a.iD)(a.HY,null,[(0,a._)("div",Ue,[(0,a._)("div",Be,[Pe,(0,a.wy)((0,a._)("input",{id:"orgchartsearch",autocomplete:"off",name:"orgchartsearch",type:"text",ref:"searchBox",autofocus:"",onFocus:t[0]||(t[0]=e=>i.searchPeople()),"onUpdate:modelValue":t[1]||(t[1]=e=>r.searchQuery=e),onKeydown:t[2]||(t[2]=e=>i.handleKeyDown(e)),onKeyup:t[3]||(t[3]=e=>i.handleSearchKey(e)),placeholder:"Search people..."},null,544),[[n.nr,r.searchQuery]])]),r.showResults?((0,a.wg)(),(0,a.iD)("div",Le,[(0,a._)("div",Oe,[(0,a._)("select",{class:"countryFilter",onChange:t[4]||(t[4]=e=>{r.country=e.currentTarget.value,i.searchPeople()})},[ze,((0,a.wg)(!0),(0,a.iD)(a.HY,null,(0,a.Ko)(r.allCountries,(e=>((0,a.wg)(),(0,a.iD)("option",{value:e,key:e,selected:e==r.country},(0,p.zw)(e),9,Te)))),128))],32),(0,a._)("div",$e,[(0,a._)("button",{class:(0,p.C_)({active:"any"===this.teamFilter}),onClick:t[5]||(t[5]=e=>{this.teamFilter="any",i.searchPeople()})},"Any",2),(0,a._)("button",{class:(0,p.C_)({active:"dd"===this.teamFilter}),onClick:t[6]||(t[6]=e=>{this.teamFilter="dd",i.searchPeople()})},"DoorDash",2),(0,a._)("button",{class:(0,p.C_)({active:"w"===this.teamFilter}),onClick:t[7]||(t[7]=e=>{this.teamFilter="w",i.searchPeople()})},"Wolt",2)])]),Ae,((0,a.wg)(!0),(0,a.iD)(a.HY,null,(0,a.Ko)(r.searchResult,(e=>((0,a.wg)(),(0,a.iD)("div",{onClick:t=>i.onSelect(e),class:(0,p.C_)({searchEntry:!0,selected:e.searchSelected,ctrlPressed:this.ctrlPressed}),key:e.id},[(0,a._)("img",{src:e.imageUrl},null,8,Ne),(0,a._)("div",qe,(0,p.zw)(e.name),1),(0,a._)("div",Fe,(0,p.zw)(e.positionName)+" | "+(0,p.zw)(e.supOrg)+" | "+(0,p.zw)(e.office),1),"w"===e.company?((0,a.wg)(),(0,a.iD)("div",Ge,[(0,a.Wm)(l,{heigth:"1"})])):(0,a.kq)("",!0),"dd"===e.company?((0,a.wg)(),(0,a.iD)("div",We,[(0,a.Wm)(c)])):(0,a.kq)("",!0),e.profileUrl?((0,a.wg)(),(0,a.iD)("div",He,"Press Ctrl+Enter to open in Workday")):(0,a.kq)("",!0)],10,Ee)))),128)),r.searchResult&&0===r.searchResult.length?((0,a.wg)(),(0,a.iD)("div",Me,[r.searchQuery?r.searchQuery.length<3?((0,a.wg)(),(0,a.iD)("span",Ke,"Search query too short")):((0,a.wg)(),(0,a.iD)("span",Ze,"Nothing found :(")):((0,a.wg)(),(0,a.iD)("span",je,"Start typing to search"))])):(0,a.kq)("",!0)])):(0,a.kq)("",!0)]),r.showResults?((0,a.wg)(),(0,a.iD)("div",{key:0,id:"resultsOverlay",onClick:t[8]||(t[8]=e=>r.showResults=!1)})):(0,a.kq)("",!0)],64)}var Ye={emits:["onPersonSelected","resetAndHideSearchBox"],components:{WoltLogo:he,DoordashLogo:ye},data(){return{searchResult:[],searchBoxFocused:!0,searchQuery:"",selectedResult:-1,ctrlPressed:!1,teamFilter:"any",country:"any",allCountries:[],showResults:!1}},beforeMount(){let e=setInterval((()=>{!this.allCountries.length&&window.allPeople&&(clearInterval(e),window.allPeople.forEach((e=>{e.country&&!this.allCountries.includes(e.country)&&this.allCountries.push(e.country)})))}),200)},methods:{resetAndHideSearchBox(){this.$refs.searchBox.value="",this.searchResult=null,this.searchBoxFocused=!1,this.searchQuery="",this.selectedResult=-1,this.ctrlPressed=!1,this.teamFilter="any",this.country="any"},onSelect(e){console.log("onSelect"),this.searchResult=null,this.country="any",this.teamFilter="any",this.showResults=!1,this.$emit("onPersonSelected",e)},handleKeyDown(e){e.target.composing=!1,"Control"===e.key&&(this.ctrlPressed=!0,this.$forceUpdate())},handleSearchKey(e){if(this.ctrlPressed=this.ctrlPressed&&"Control"!==e.key,"ArrowDown"===e.code)return this.searchResult&&this.searchResult.length>0&&(this.selectedResult=(this.selectedResult+1)%this.searchResult.length,this.searchResult.forEach(((e,t)=>{e.searchSelected=t==this.selectedResult}))),void(e.prevent=!0);if("ArrowUp"!==e.code){if("Escape"===e.code)return this.selectedResult=-1,this.showResults=!1,void(this.searchResult=null);if("Enter"!==e.code)"Control"!==e.key&&(this.searchQuery.length<2?this.searchResult=[]:(this.selectedResult=-1,this.searchPeople()));else if(this.selectedResult>=0){let t=this.searchResult[this.selectedResult];if(e.ctrlKey)return void window.open(t.profileUrl,"_blank");this.searchResult=null,this.showResults=!1,this.$emit("onPersonSelected",t)}}else this.searchResult&&this.searchResult.length>0&&(this.selectedResult=(this.selectedResult-1+this.searchResult.length)%this.searchResult.length,this.searchResult.forEach(((e,t)=>{e.searchSelected=t==this.selectedResult})))},searchPeople(){if(this.searchQuery.length<2)return void(this.searchResult=[]);let e=window.allPeople,t=null,o=this.searchQuery.toLowerCase();if(void 0!==e[0].managedOrgId&&/sup[0-9]+/gi.test(o))t=e.filter((e=>o==e.managedOrgId.toLowerCase()));else if(isNaN(o)){let n=o.replace(/\u0142/g,"l").replace(/[æÆ]/g,"ae").normalize("NFKD").replace(/\p{Diacritic}/gu,"").toLowerCase().split(" ");t=e.filter((e=>{let t=e.nameNoAccents.toLowerCase().split(" "),a=e.country.toLowerCase(),s=void 0!==e.managedOrg?e.managedOrg.toLowerCase():"",r=e.supOrg.toLowerCase();if(2==o.length)return o==r;if("any"!==this.teamFilter&&this.teamFilter!==e.company)return!1;if("any"!==this.country&&this.country!==e.country)return!1;if(o.includes(s)&&s)return!0;if(r.includes(o))return!0;if(e.email.toLowerCase().includes(o.toLowerCase()))return!0;for(let o of n)if(!t.some((e=>e.startsWith(o)))&&!a.startsWith(o))return!1;return!0}))}else{let n=o.trim();t=e.filter((e=>n==e.id))}this.searchResult=t.slice(0,10);for(let n=0;n0||"any"!==this.teamFilter||"any"!==this.country}}};const Ve=(0,r.Z)(Ye,[["render",Qe],["__scopeId","data-v-4c3fb789"]]);var Xe=Ve,Je={name:"HomePage",components:{OrgChart:Se,PeopleSearch:Xe},data(){return{options:[]}},methods:{selectPerson(e){this.$refs.orgchart.switchRoot(e.id)}}};const et=(0,r.Z)(Je,[["render",g],["__scopeId","data-v-ff6b125a"]]);var tt=et;const ot={id:"login"},nt={id:"login-background"},at={class:"center-block"},st=(0,a._)("div",{class:"logo-container"},null,-1);function rt(e,t,o,n,s,r){return(0,a.wg)(),(0,a.iD)("div",ot,[(0,a._)("div",nt,[(0,a._)("div",at,[st,(0,a._)("button",{id:"signin",type:"submit",autofocus:"",onClick:t[0]||(t[0]=e=>r.signIn())},"Sign in")])])])}var it={name:"LoginPage",methods:{signIn(){const e=new URLSearchParams(window.location.search),t=e.get("ref");ie.SignIn(t)}},async beforeMount(){const e=new URLSearchParams(window.location.search),t=e.get("ref");t&&await ie.SignIn(t)}};const lt=(0,r.Z)(it,[["render",rt]]);var ct=lt;const dt=[{path:"/",name:"Home",component:tt,meta:{requiresAuth:!0}},{path:"/login",name:"Login",component:ct,meta:{requiresAuth:!1}}];var ut=(0,d.p7)({history:(0,d.PO)("/"),routes:dt});(0,n.ri)(c).use(ut).mount("#app"),ut.beforeEach(((e,t,o)=>{const n=e.matched.some((e=>e.meta.requiresAuth));n?ie.IsSignedIn().then((t=>{t?ie._GetUserData().then((e=>{e.profile.email.endsWith("@wolt.com")||e.profile.email.endsWith("@external.wolt.com")||e.profile.email.endsWith("@doordash.com")||e.profile.email.endsWith("@ext.doordash.com")?o():o("/login")})):o({path:"/login",query:{ref:e.fullPath}})}),(e=>{console.log(e),o("/login")})):o()}))}},t={};function o(n){var a=t[n];if(void 0!==a)return a.exports;var s=t[n]={exports:{}};return e[n].call(s.exports,s,s.exports,o),s.exports}o.m=e,function(){var e=[];o.O=function(t,n,a,s){if(!n){var r=1/0;for(d=0;d=s)&&Object.keys(o.O).every((function(e){return o.O[e](n[l])}))?n.splice(l--,1):(i=!1,s0&&e[d-1][2]>s;d--)e[d]=e[d-1];e[d]=[n,a,s]}}(),function(){o.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return o.d(t,{a:t}),t}}(),function(){o.d=function(e,t){for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}}(),function(){o.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}()}(),function(){o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}}(),function(){var e={143:0};o.O.j=function(t){return 0===e[t]};var t=function(t,n){var a,s,r=n[0],i=n[1],l=n[2],c=0;if(r.some((function(t){return 0!==e[t]}))){for(a in i)o.o(i,a)&&(o.m[a]=i[a]);if(l)var d=l(o)}for(t&&t(n);c