"use strict";(self.webpackChunkalvanon_analytics_platform_frontend=self.webpackChunkalvanon_analytics_platform_frontend||[]).push([[8792],{7308(e,t,n){n.d(t,{A:()=>g});var a=n(58168),i=n(96540),l=n(5556),o=n.n(l),r=n(60431),s=n(93688),c=n(81714),d=n.n(c),p=n(93710),m=n(94972);const u=({text:e,color:t="default",onClick:n=d(),disabled:l=!1,style:o=p.t0,variant:c="contained",size:u="medium",hoverStyle:g=p.t0,...y})=>i.createElement(s.A,{theme:m.w},i.createElement(r.A,(0,a.A)({variant:c,color:t,onClick:n,disabled:l,size:u,sx:{height:"small"===u?"28px":"32px",borderRadius:"32px",fontWeight:"100",boxShadow:"none",color:"outlined"!==c&&"#FFFFFF",textTransform:"none","&:hover":{color:"outlined"===c?"#EC7700":"#FFFFFF",backgroundColor:"outlined"===c?"rgba(236, 119, 0, 0.04)":"#E07000",border:"outlined"===c?"1px solid #EC7700":"none",...g},...o}},y),e));u.propTypes={text:o().string.isRequired,color:o().string,onClick:o().func,style:o().instanceOf(Object),disabled:o().bool,variant:o().string,size:o().string,hoverStyle:o().instanceOf(Object)};const g=u},64124(e,t,n){n.d(t,{A:()=>h});var a=n(96540),i=n(5556),l=n.n(i),o=n(15279),r=n(51275),s=n(53830),c=n(49068),d=n(93688),p=n(81714),m=n.n(p),u=n(94972),g=n(93710);const y=({label:e,options:t,value:n,onChange:i,disabled:l=!1,style:p=g.t0})=>a.createElement(d.A,{theme:u.w},a.createElement(s.A,{direction:"row",spacing:1,sx:p},a.createElement(c.A,{sx:{color:"#000000"}},e),a.createElement(r.A,{value:n,exclusive:!0,onChange:(e,t)=>null!==t?i(t):m(),disabled:l,size:"small",sx:{height:"22px",padding:"2px",backgroundColor:"#f3f3f3",borderRadius:"24px"}},t.map(e=>a.createElement(o.A,{value:e,key:`toggle-btn-${e}`,sx:{p:"0 10px",height:"22px",lineHeight:"22px",borderRadius:"24px !important",border:"none",color:"#000000",fontWeight:400,"&.Mui-selected":{borderRadius:"24px",backgroundColor:"#ffd1a3"}}},(0,g.wR)(e))))));y.propTypes={label:l().string.isRequired,options:l().instanceOf(Array).isRequired,value:l().string.isRequired,onChange:l().func.isRequired,style:l().instanceOf(Object),disabled:l().bool};const h=y},27214(e,t,n){n.d(t,{A:()=>m});var a=n(96540),i=n(5556),l=n.n(i),o=n(81714),r=n.n(o),s=n(17862),c=n(93688),d=n(94972);const p=({text:e,color:t="defalut",onClick:n=r(),selected:i=!1})=>a.createElement(c.A,{theme:d.w},a.createElement(s.A,{label:e,variant:i?"":"outlined",color:t,sx:{height:"22px",fontWeight:"500",color:i?"#FFFFFF":d.w[t]},onClick:n}));p.propTypes={text:l().string.isRequired,color:l().string,onClick:l().func,selected:l().bool};const m=p},39197(e,t,n){n.d(t,{A:()=>b});var a=n(96540),i=n(5556),l=n.n(i),o=n(55370),r=n(85916),s=n(25418),c=n(57862),d=n(49530),p=n(40665),m=n(7308),u=n(8094),g=n(93710);const y=[{key:"PROJECT_VIEW",value:"Scan Data Analysis"},{key:"MYALVA",value:"MyAlva Analysis"},{key:"COMPETITOR_VIEW",value:"Competitor Overview Analysis"}],h=({id:e,source:t,title:n,onClose:i})=>{const[l,h]=(0,a.useState)(!1),[b,A]=(0,a.useState)(""),E="project"===t?t:"analysis",v=e=>{A(""),h(!1),i(e)},x=(e,t,n)=>{"project"===t?(0,u.xx)(e,n).then(e=>{n?.confirmed?v(!0):e?.status?h(!0):e?.username&&A(e.username)}):(0,p.G8)(e,t,n).then(e=>{n?.confirmed?v(!0):e?.status?h(!0):e?.username&&A(e.username)})};return(0,a.useEffect)(()=>{x(e,t,{})},[e,t]),a.createElement(o.A,{onClose:()=>v(!1),open:l||0!==b.length,transitionDuration:0},a.createElement(r.A,null,`Delete ${"project"===t?(0,g.wR)(t):y.find(e=>e.key===t).value}`),a.createElement(s.A,null,0!==b.length?a.createElement(d.A,{id:"alert-dialog-description"},"You are not authorized to delete this",` ${E}`,". To proceed, please contact the",` ${E} `,"creator at",a.createElement("b",null,` ${b}`)):a.createElement(a.Fragment,null,a.createElement(d.A,{id:"alert-dialog-description1"},"Are you sure to delete the",a.createElement("b",null,` "${n||""}" `),E,"?"),a.createElement(d.A,{id:"alert-dialog-description2"},"After deleting, you will not be able to restore the",` ${E} `,"and others won't be able to see the",` ${E} `,"in the system."))),a.createElement(c.A,null,0!==b.length?a.createElement(m.A,{text:"Ok",color:"primary",onClick:()=>v(!1)}):a.createElement(a.Fragment,null,a.createElement(m.A,{text:"Cancel",color:"default",variant:"outlined",onClick:()=>v(!1)}),a.createElement(m.A,{text:"Yes",color:"primary",onClick:()=>x(e,t,{confirmed:!0})}))))};h.propTypes={id:l().string.isRequired,source:l().string.isRequired,title:l().string.isRequired,onClose:l().func.isRequired};const b=h},50540(e,t,n){n.d(t,{A:()=>E});var a=n(58168),i=n(96540),l=n(5556),o=n.n(l),r=n(44166),s=n(91799),c=n(87714),d=n(49068),p=n(58132),m=n(16738),u=n(93688),g=n(81714),y=n.n(g),h=n(93710),b=n(94972);const A=({error:e=!1,field:t="",options:n,onChange:l,value:o,required:g=!1,multiple:A=!1,onClose:E=y(),onOpen:v=y(),disabled:x=!1,placeholder:f="",group:C,style:w=h.t0})=>i.createElement(u.A,{theme:b.w},i.createElement(s.A,{color:"primary",disabled:x},0!==t.length&&i.createElement(d.A,{id:`${t}-select-label`,sx:{position:"relative",transform:"none",transition:"none",marginBottom:"5px"}},`${(0,h.wR)(t)}${g?"*":""}`),i.createElement(r.A,{value:0!==o.length||A?o:"",onChange:(e,t)=>l(A?t.map(e=>e?.value||e):t?.value||t),multiple:A,onClose:E,onOpen:v,options:n,getOptionLabel:e=>(0,h.wR)(e?.value||e),disableClearable:!A,groupBy:e=>e[C],size:"small",disableCloseOnSelect:A,isOptionEqualToValue:(e,t)=>(e?.value||e)===t,renderGroup:e=>{return i.createElement("li",{key:e.key},i.createElement(m.A,{onClick:()=>(e=>{const t=n.filter(t=>t.group===e).map(e=>e?.value||e);if(t.every(e=>o.includes(e))){const e=o.filter(e=>!t.includes(e));l(e)}else{const e=t.filter(e=>!o.includes(e));l([...o,...e])}})(e.group),style:{color:"#9B9B9B",padding:0!==C.length?"10px":0,margin:0,cursor:"pointer",backgroundColor:(t=e.group,n.filter(e=>e.group===t).map(e=>e?.value||e).every(e=>o.includes(e))?"rgba(236, 119, 0, 0.12)":"transparent")}},e.group),i.createElement("ul",{style:{padding:0}},e.children));var t},renderInput:t=>i.createElement(p.A,(0,a.A)({},t,{autoComplete:"off",placeholder:f,label:"",sx:{padding:"0",minHeight:"40px",borderRadius:"10px",marginRight:"10px",backgroundColor:"#F9F9F9",border:"1px solid "+(e?"#FB4E3B":"#D9D9D9"),boxShadow:"inset 0px 0px 5px "+(e?"#FB4E3B":"#00000038"),width:"300px",boxSizing:"content-box",color:"#5F504D","&:before":{border:"none"},"&:after":{border:"none"},"&:hover:not(.Mui-disabled, .Mui-error):before":{border:"none"},".MuiOutlinedInput-notchedOutline":{border:"none"},".MuiInputBase-root":{fontSize:"14px"},...w}}))}),e&&i.createElement(c.A,null,"Please select a value in this field!")));A.propTypes={required:o().bool,error:o().bool,field:o().string,options:o().instanceOf(Array).isRequired,onChange:o().func.isRequired,value:o().oneOfType([o().string,o().instanceOf(Array),o().instanceOf(Object)]).isRequired,multiple:o().bool,onClose:o().func,onOpen:o().func,disabled:o().bool,style:o().instanceOf(Object),placeholder:o().string,group:o().string.isRequired};const E=A},50841(e,t,n){n.d(t,{A:()=>g});var a=n(58168),i=n(96540),l=n(5556),o=n.n(l),r=n(81714),s=n.n(r),c=n(60431),d=n(93688),p=n(94972),m=n(93710);const u=({text:e,color:t="default",onClick:n=s(),style:l=m.t0,variant:o="contained",hoverStyle:r=m.t0,...u})=>i.createElement(d.A,{theme:p.w},i.createElement(c.A,(0,a.A)({variant:o,color:t,onClick:n,sx:{height:"32px",borderRadius:"32px",fontWeight:"contained"===o?"100":"500",boxShadow:"none",color:"contained"===o?"#FFFFFF":p.w.palette[t].main,textTransform:"none","&:hover":{color:"contained"===o?"#FFFFFF":p.w.palette[t].main,backgroundColor:"contained"===o?"#E07000":"transparent",...r},...l}},u),e));u.propTypes={text:o().string.isRequired,color:o().string,onClick:o().func,style:o().instanceOf(Object),variant:o().string,hoverStyle:o().instanceOf(Object)};const g=u},96294(e,t,n){n.d(t,{A:()=>u});var a=n(58168),i=n(96540),l=n(5556),o=n.n(l),r=n(91799),s=n(78164),c=n(81714),d=n.n(c),p=n(93710);const m=({label:e,placeholder:t="",onChange:n=d(),endAdornment:l=null,startAdornment:o=null,value:c="",style:m=p.t0,width:u=500,multiline:g=!1,inputProps:y=p.t0,onBlur:h=d(),onFocus:b=d(),disabled:A=!1,err:E=!1,rows:v=1,...x})=>i.createElement(r.A,{variant:"outlined",sx:{padding:"5px 15px",height:"30px",borderRadius:"10px",marginRight:"10px",backgroundColor:"#F9F9F9",border:"1px solid "+(E?"#FB4E3B":"#D9D9D9"),boxShadow:"inset 0px 0px 5px "+(E?"#FB4E3B":"#00000038"),width:`${u}px`,...m}},i.createElement(s.A,(0,a.A)({id:`outlined-${e}`,placeholder:t,endAdornment:l,startAdornment:o,"aria-describedby":e,value:c,multiline:g,rows:v,inputProps:{"aria-label":e,...y},sx:{color:"#5F504D",fontSize:"14px","&:before":{border:"none"},"&:after":{border:"none"},"&:hover:not(.Mui-disabled, .Mui-error):before":{border:"none"},"&.Mui-disabled:before":{borderBottomStyle:"hidden"}},onChange:n,onBlur:h,onFocus:b,disabled:A},x)));m.propTypes={label:o().string.isRequired,placeholder:o().string,onChange:o().func,endAdornment:o().element,startAdornment:o().element,value:o().oneOfType([o().string,o().number]),style:o().instanceOf(Object),width:o().number,multiline:o().bool,inputProps:o().instanceOf(Object),onBlur:o().func,onFocus:o().func,disabled:o().bool,err:o().bool,rows:o().number};const u=m},14109(e,t,n){n.d(t,{A:()=>d});var a=n(96540),i=n(78164),l=n(91799),o=n(5556),r=n.n(o),s=n(93710);const c=({label:e,onValueChange:t,inputValue:n,width:o=50,style:r=s.t0,showErr:c=!1,placeholder:d=""})=>{const[p,m]=(0,a.useState)(!1),[u,g]=(0,a.useState)("");return(0,a.useEffect)(()=>{g(n)},[n]),a.createElement(l.A,{variant:"outlined",sx:{padding:"0 15px",height:"30px",borderRadius:"10px",backgroundColor:"#F9F9F9",border:"1px solid "+(c||p?"#EC7700":"#D9D9D9"),boxShadow:"inset 0px 0px 5px #00000038",width:`${o}px`,marginTop:"10px",...r}},a.createElement(i.A,{label:e,error:c&&p,required:!0,onBlur:()=>{t(u),p&&m(!1)},value:u,inputProps:{inputMode:"number",pattern:"[0-9]*"},placeholder:d,onChange:e=>{return t=e.target.value,g(t),void(0===t.length||t.includes(" ")||Number.isNaN(+t)?m(!0):p&&m(!1));var t},sx:{color:"#5F504D",fontSize:"14px","&:before":{border:"none"},"&:after":{border:"none"},"&:hover:not(.Mui-disabled, .Mui-error):before":{border:"none"}}}))};c.propTypes={label:r().string.isRequired,onValueChange:r().func.isRequired,inputValue:r().string.isRequired,width:r().number,style:r().instanceOf(Object),showErr:r().bool,placeholder:r().string};const d=c},81724(e,t,n){n.d(t,{A:()=>d});var a=n(96540),i=n(5556),l=n.n(i),o=n(78164),r=n(91799),s=n(93710);const c=({label:e,placeholder:t="",onChange:n,endAdornment:i=null,startAdornment:l=null,value:c="",style:d=s.t0,disabled:p=!1})=>a.createElement(r.A,{variant:"outlined",sx:{padding:"0 15px",height:"30px",borderRadius:"30px",marginRight:"10px",backgroundColor:"#FFFFFF",border:"1px solid #BCBCBC",...d}},a.createElement(o.A,{id:`outlined-${e}`,placeholder:t,endAdornment:i,startAdornment:l,"aria-describedby":e,value:c,disabled:p,inputProps:{"aria-label":e},sx:{"&:before":{border:"none"},"&:after":{border:"none"},"&:hover:not(.Mui-disabled, .Mui-error):before":{border:"none"},"&.Mui-disabled":{color:"transparent"}},onChange:n}));c.propTypes={label:l().string.isRequired,placeholder:l().string,onChange:l().func.isRequired,endAdornment:l().element,startAdornment:l().element,value:l().string,style:l().instanceOf(Object),disabled:l().bool};const d=c},72456(e,t,n){n.d(t,{A:()=>f});var a=n(58168),i=n(96540),l=n(5556),o=n.n(l),r=n(45549),s=n(44166),c=n(91799),d=n(87714),p=n(49068),m=n(58132),u=n(53830),g=n(32483),y=n(60440),h=n(93688),b=n(81714),A=n.n(b),E=n(93710),v=n(94972);const x=({error:e=!1,field:t="",options:n,onChange:l,value:o,required:b=!1,multiple:x=!1,onClose:f=A(),onOpen:C=A(),disabled:w=!1,placeholder:_="",width:S=300,style:k=E.t0,showClearIcon:z=!1,onClear:R=A()})=>i.createElement(h.A,{theme:v.w},i.createElement(c.A,{color:"primary",disabled:w,sx:z?{"#size-set-clear-btn":{visibility:"hidden"},"&:hover":{"#size-set-clear-btn":{visibility:0===o.length?"hidden":"visible"}}}:{}},i.createElement(u.A,{direction:"row",justifyContent:"space-between"},0!==t.length&&i.createElement(p.A,{id:`${t}-select-label`,sx:{position:"relative",transform:"none",transition:"none",marginBottom:"5px"}},`${(0,E.wR)(t)}${b?"*":""}`),z&&i.createElement(g.A,{id:"size-set-clear-btn",onClick:R,sx:{width:"20px",height:"20px",marginRight:"6px"}},i.createElement(y.A,null,i.createElement(r.A,{sx:{width:"20px",height:"20px"}})))),i.createElement(s.A,{value:0!==o.length||x?o:null,onChange:l,multiple:x,onClose:f,onOpen:C,options:n,disabled:w,getOptionLabel:e=>e?.value||e?.label||e||(0,E.wR)(e),disableClearable:!x,size:"small",disableCloseOnSelect:x,isOptionEqualToValue:(e,t)=>t===e?.key||t===e||t?.key&&t.key===e.key,renderInput:t=>i.createElement(m.A,(0,a.A)({},t,{autoComplete:"off",placeholder:_,label:"",sx:{padding:"0",minHeight:"40px",borderRadius:"10px",marginRight:"10px",backgroundColor:"#F9F9F9",border:"1px solid "+(e?"#FB4E3B":"#D9D9D9"),boxShadow:"inset 0px 0px 5px "+(e?"#FB4E3B":"#00000038"),width:`${S}px`,boxSizing:"content-box",color:"#5F504D","&:before":{border:"none"},"&:after":{border:"none"},"&:hover:not(.Mui-disabled, .Mui-error):before":{border:"none"},".MuiOutlinedInput-notchedOutline":{border:"none"},".MuiInputBase-root":{fontSize:"14px"},...k}}))}),e&&i.createElement(d.A,null,"Please select a value in this field!")));x.propTypes={required:o().bool,error:o().bool,field:o().string,options:o().instanceOf(Array).isRequired,onChange:o().func.isRequired,value:o().oneOfType([o().string,o().number,o().instanceOf(Array),o().instanceOf(Object)]).isRequired,multiple:o().bool,onClose:o().func,onOpen:o().func,disabled:o().bool,style:o().instanceOf(Object),width:o().number,placeholder:o().string,showClearIcon:o().bool,onClear:o().func};const f=x},91759(e,t,n){n.d(t,{A:()=>b});var a=n(96540),i=n(5556),l=n.n(i),o=n(60431),r=n(51475),s=n(37603),c=n(88564),d=n(16738),p=n(12070),m=n(93688),u=n(1812),g=n(73708),y=n(94972);const h=({field:e,label:t,selected:n,options:i,onChange:l,hasSecondLevel:h=!1,disabled:b=!1,isColoredOption:A=!1,color:E="primary"})=>{const[v,x]=(0,a.useState)(null),f=Boolean(v),C=e=>{e&&l(e),x(null)};return a.createElement(m.A,{theme:y.w},a.createElement(o.A,{id:`${e}-select-toggle`,"aria-controls":f?`${e}-menu`:void 0,"aria-haspopup":"true","aria-expanded":f?"true":void 0,onClick:e=>x(e.currentTarget),endIcon:a.createElement(u.A,null),color:E,size:"small",disabled:b,sx:{textTransform:"none",".MuiButton-icon":{marginLeft:"0"}}},`${0!==t.length?`${t}:`:""} ${h?(()=>{const e=i.find(e=>n.includes(e.key)),t=(e?.children||[]).find(e=>e.key===n);return`${e?.value||"None"} ${t?.value||""}`})():i.find(e=>e.key===n)?.value||n}`),a.createElement(r.A,{id:`${e}-menu`,anchorEl:v,open:f,dense:"true",transitionDuration:0,onClose:()=>C(),color:E},0!==i.length&&i.map(e=>a.createElement(s.A,{id:`option-${e?.key||e}`,key:`option-${e?.key||e}`,onClick:()=>h?{}:C(e?.key||e?.value||e),selected:h?n.includes(e?.key||e):n===(e?.key||e?.value||e),sx:h?{"&:hover":{".MuiList-root":{visibility:"visible"}}}:{}},h&&0!==e?.children?.length&&a.createElement(p.A,{sx:{minWidth:"24px !important"}},a.createElement(g.A,{fontSize:"small"})),A&&a.createElement("div",{style:{width:"12px",height:"12px",backgroundColor:y.w.palette[e?.color]?.main||"#ffffff",borderRadius:"12px",marginRight:"8px"}}," "),a.createElement(d.A,null,e?.value||e),h&&0!==e?.children?.length&&a.createElement(c.A,{sx:{visibility:"hidden",marginLeft:"-135px",width:"120px",position:"fixed",backgroundColor:"#ffffff",boxShadow:"-1px 0px 2px #00000038"},open:!0},e.children.map(e=>a.createElement(s.A,{key:`suboption-${e.key}`,onClick:t=>{t.preventDefault(),C(e?.key||e)},selected:n===(e?.key||e)},e?.value||e)))))))};h.propTypes={field:l().string.isRequired,label:l().string.isRequired,selected:l().string.isRequired,options:l().instanceOf(Array).isRequired,onChange:l().func.isRequired,hasSecondLevel:l().bool,disabled:l().bool,isColoredOption:l().bool,color:l().string};const b=h},99845(e,t,n){n.d(t,{A:()=>y});var a=n(96540),i=n(5556),l=n.n(i),o=n(60431),r=n(51475),s=n(37603),c=n(16738),d=n(27629),p=n(93688),m=n(1812),u=n(94972);const g=({field:e,label:t,selected:n,options:i,onChange:l,color:g="primary"})=>{const[y,h]=(0,a.useState)(null),b=Boolean(y),[A,E]=(0,a.useState)([]);return(0,a.useEffect)(()=>{E(n)},[n]),a.createElement(p.A,{theme:u.w},a.createElement(o.A,{id:`${e}-select-toggle`,"aria-controls":b?`${e}-menu`:void 0,"aria-haspopup":"true","aria-expanded":b?"true":void 0,onClick:e=>h(e.currentTarget),endIcon:a.createElement(m.A,null),color:g,size:"small",sx:{textTransform:"none",".MuiButton-icon":{marginLeft:"0"}}},`${0!==t.length?`${t}:`:""} ${0===n.length?"All":`${n.length} User(s)`}`),a.createElement(r.A,{id:`${e}-menu`,anchorEl:y,open:b,dense:"true",transitionDuration:0,onClose:()=>(l(A),void h(null)),color:g,MenuListProps:{"aria-labelledby":`${e}-select-toggle`}},0!==i.length&&i.map(e=>a.createElement(s.A,{id:`option-${e?.id||e}`,key:`option-${e?.id||e}`,onClick:()=>{return t=e?.id||e,void(A.includes(t)?E(e=>e.filter(e=>e!==t)):E(e=>[...e,t]));var t},selected:A.includes(e?.id||e)},a.createElement(d.A,{checked:A.includes(e?.id||e),tabIndex:-1,disableRipple:!0,size:"small",sx:{padding:0,marginRight:"4px"}}),a.createElement(c.A,null,`${e?.first_name||""} ${e?.last_name||""}${e?.email?`<${e.email}>`:e||""}`)))))};g.propTypes={field:l().string.isRequired,label:l().string.isRequired,selected:l().instanceOf(Array).isRequired,options:l().instanceOf(Array).isRequired,onChange:l().func.isRequired,color:l().string};const y=g},4710(e,t,n){n.d(t,{_:()=>l});var a=n(96540),i=n(5076);const l=({href:e,children:t})=>a.createElement(i.A,{href:e,target:"_blank",rel:"noopener",sx:{color:"primary.main"}},t)},33042(e,t,n){n.d(t,{A:()=>c});var a=n(96540),i=n(5556),l=n.n(i),o=n(30016),r=n(8861);const s=({isLoading:e,isSingleChart:t=!1,isDQ:n=!1})=>a.createElement(o.A,{sx:{backgroundColor:"rgba(255, 255, 255, 0.5)",color:"#EC7700",zIndex:n?1301:899,position:t?"absolute":"fixed",borderRadius:t?"10px":0},open:e},a.createElement(r.A,{color:"inherit"}));s.propTypes={isLoading:l().bool.isRequired,isSingleChart:l().bool,isDQ:l().bool};const c=s},94972(e,t,n){n.d(t,{w:()=>a});const a=(0,n(1642).A)({palette:{primary:{main:"#EC7700",secondary:"#FFFFFF"},success:{main:"#1AA464"},error:{main:"#FB4E3B"},disabled:{main:"#9B9B9B"},pale:{main:"#EEEEEE"},white:{main:"#FFFFFF"},inProgress:{main:"#2F80ED"},onHold:{main:"#BDBDBD"},default:{main:"#5F504D"}}})},4891(e,t,n){n.d(t,{A:()=>a});const a={ADMIN:{userList:"api/v1/users",groups:"api/v1/groups",resetPassword:"api/v1/users/reset_password/",getTimezoneOptions:"api/v1/users/get_all_timezones"},AUTH:{login:"api/v1/login",logout:"api/v1/logout"},USER:{star:"api/v1/user_favorites_view",downloadList:"api/v1/download/record/management",settings:"api/v1/user_settings_view",releaseNote:"api/v1/release_note/management",releaseNoteCount:"api/v1/release_note/unread_note_count",readReleaseNote:"api/v1/release_note/read"},DATA_QUERY:{option:"api/v1/data_query/option",data:"api/v1/data_query/management",download:"api/v1/data_query/download"},SIZE_CHART:{getAllSizes:"api/v1/chart_summary",getAllBrands:"api/v1/size_chart/brands",getAllFilters:"api/v1/size_chart/multi_filter",getFilterOptions:"api/v1/competitor_overview_analysis/brand_size_option"},DATASET_PROFILER:{options:"api/v1/dataset/profile/option",data:"api/v1/dataset/profile/management",summary:"api/v1/dataset/profile/summary"},COMPETITOR_VIEW:{analysisList:"api/v1/competitor_overview_analysis",deliverables:"api/v1/competitor_overview_deliverables",downloadOverviewFiles:"api/v1/competitor_overview_analysis/download"},IKO:{getScatterPlotData:"api/v1/scatter_plots",getDistributionData:"api/v1/distribution",getRegionalPopulation:"api/v1/region_population"},SALES_BY_SIZE:{getBrands:"api/v1/sales_by_size/brand",getBrandFilters:"api/v1/sales_by_size/filter",getChartData:"api/v1/sales_by_size"},PROJECT_VIEW:{getProjectList:"api/v1/project_view",getProjectHistory:"api/v1/project_history_view",getOptions:"api/v1/admin/options_management",pptSource:"api/v1/project/ppt/selection",ppt:"api/v1/project/download_ppt",downloadSDAFile:"api/v1/scan_data_analysis/download",checkDownloadStatus:"api/v1/download/status",analysisList:"api/v1/scan_data_analysis/management",deliverables:"api/v1/scan_data_analysis/deliverables",deliverableSummaryStats:"api/v1/scan_data_analysis/deliverables/stats",summaryBM:"api/v1/consultant/analysis/summary_body_measurement",population:"api/v1/scan_data_analysis/population",populationMap:"api/v1/scan_data_analysis/population/dataset",populationOptions:"api/v1/scan_data_analysis/population/option",checkM4MData:"api/v1/scan_data_analysis/validate_pom_data",marketCoverage:"api/v1/scan_data_analysis/market_coverage",marketCoverageCharts:"api/v1/scan_data_analysis/market_coverage",standardSizeChartList:"api/v1/scan_data_analysis/market_coverage/standard_size_chart",getPomMapping:"api/v1/measurement_point_mapping",sbsList:"api/v1/project/sales_by_size",sbsDeliverables:"api/v1/project/sbs_deliverables"},ORGANIZATION:{organizations:"api/v1/organizations",permissionTemplate:"api/v1/organizations/get_permission_template"},MYALVA:{overviewOptions:"api/v1/myalva/overview/options",overviewData:"api/v1/myalva/overview",measurementOptions:"api/v1/myalva/options/body_measurement",analysisList:"api/v1/myalva/analysis/management",model3D:"api/v1/myalva/analysis/3d_model",deliverables:"api/v1/myalva/analysis/deliverables",populationOptions:"api/v1/myalva/options/population",populationCount:"api/v1/myalva/analysis/population_stats",summaryBM:"api/v1/myalva/analysis/summary_body_measurement",standardCollectionDetail:"api/v1/avatar_collection",deliverablesBatchUpdate:"api/v1/myalva/analysis/deliverables_batch",deliverableSummaryStats:"api/v1/myalva/analysis/deliverables/stats",listSizeset:"api/v1/avatar_size_set",encrytedObj:"api/v1/myalva/overview_3d_file"},THREE_D_AVATAR:{checkDraft:"api/v1/insights_3d/management_draft",project:"api/v1/insights_3d/management",avatar:"api/v1/insights_3d/management_avatars",deliverables:"api/v1/insights_3d/deliverables",pomStats:"api/v1/insights_3d/population_poms",nearestPom:"api/v1/insights_3d/nearest_poms",options:"api/v1/insights_3d/avatar_option",encrytedObj:"api/v1/deliverables/preview",avatarSetComparison:"api/v1/avatar_comparison/standard_size_set/management",avatarSingleComparison:"api/v1/avatar_comparison/single_avatar/management",comparisonOptions:"api/v1/avatar_comparison/options",comparisonCharts:"api/v1/avatar_comparison/standard_size_set/sp_charts"}}},31611(e,t,n){var a=n(96540),i=n(5338),l=n(69733),o=n(80817),r=n(75737),s=n(601),c=n(92826),d=(n(52463),n(93688)),p=n(16858),m=n(94972),u=(n(24172),n(45483),n(66718),n(23024),n(41625),n(45588)),g=n(84976),y=n(47767),h=n(60431),b=n(58132),A=n(88634),E=n(32483),v=n(31600),x=n(70791),f=n(9314),C=n(78477);const w=n.p+"75552c9aa59338309dae.png";var _=n(85072),S=n.n(_),k=n(97825),z=n.n(k),R=n(77659),D=n.n(R),O=n(55056),F=n.n(O),I=n(10540),T=n.n(I),j=n(41113),$=n.n(j),P=n(38328),B={};B.styleTagTransform=$(),B.setAttributes=F(),B.insert=D().bind(null,"head"),B.domAPI=z(),B.insertStyleElement=T(),S()(P.A,B),P.A&&P.A.locals&&P.A.locals;var M=n(26680);const L=()=>{const[e,t]=(0,a.useState)(""),[n,i]=(0,a.useState)(""),[o,r]=(0,a.useState)(!1),[s,c]=(0,a.useState)([]),[p,u]=(0,a.useState)(!1),[_]=(0,g.ok)(),S=(0,l.useSelector)(f.ug),k=(0,l.useDispatch)();(0,a.useEffect)(()=>{S&&0!==Object.keys(S).length&&(c(S.permissions||[]),r(!0))},[S]);const z=(0,a.useCallback)(()=>{"visible"===document.visibilityState&&(0,C.Cl)().then(e=>{e&&(c(e?.permissions||[]),k((0,f.Jv)(e)),r(!0))})},[k]);(0,a.useEffect)(()=>(z(),document.addEventListener("visibilitychange",z),()=>{document.removeEventListener("visibilitychange",z)}),[z]);const R=(0,M.h)(s),D=_.get("from")||R,O=(e,n)=>{"username"===e?t(n):i(n)};return a.createElement("div",{className:"login-container"},o&&a.createElement(y.C5,{to:D,replace:!0}),a.createElement("img",{alt:"logo",src:w}),a.createElement("form",{onSubmit:async t=>{t.preventDefault(),(0,C.Gb)({username:e,password:n}).then(e=>{e&&(c(e?.permissions||[]),k((0,f.Jv)(e)),r(!0))})}},a.createElement(b.A,{className:"user-input",id:"email-input",label:"Email",variant:"outlined",required:!0,onChange:e=>O("username",e.target.value)}),a.createElement(b.A,{className:"user-input",id:"password-input",type:p?"text":"password",label:"Password",variant:"outlined",autoComplete:"aap-password",required:!0,onChange:e=>O("password",e.target.value),sx:{"& .MuiOutlinedInput-root":{"&:has(> input:-webkit-autofill)":{backgroundColor:"rgb(232, 240, 254)"}}},InputProps:{endAdornment:a.createElement(A.A,{position:"end"},a.createElement(E.A,{"aria-label":"toggle password visibility",onClick:()=>u(e=>!e),onMouseDown:e=>{e.preventDefault()},onMouseUp:e=>{e.preventDefault()}},p?a.createElement(x.A,null):a.createElement(v.A,null)))}}),a.createElement(d.A,{theme:m.w},a.createElement(h.A,{type:"submit",variant:"contained",color:"primary",sx:{height:"32px",borderRadius:"32px",fontWeight:"100",boxShadow:"none",color:"#FFFFFF",textTransform:"none"}},"Login"))))},N=()=>a.createElement(L,null);var W=n(91800),V=n(74263);const G=()=>{const e=(0,y.r5)();return a.createElement("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",width:"100vw",height:"100vh"}},a.createElement("img",{className:"logo-container",alt:"logo",src:V,style:{height:"80px",width:"auto"}}),a.createElement("h1",{style:{color:"#EC7700"}},"Sorry!"),a.createElement("p",null,"The page you are looking for is not available at the moment."),a.createElement("p",null,"Please go back to the previous page or refer to the error message down below:"),a.createElement("p",null,a.createElement("i",null,e.statusText||e.message)))},q=()=>a.createElement(y.sv,null),Y=()=>a.createElement(y.sv,null);var H=n(41975),Z=n(64951),U=n(34477),J=n(40665),Q=n(31814),X=n(5556),K=n.n(X),ee=n(53830),te=n(35124),ne=n(55370),ae=n(85916),ie=n(25418),le=n(57862),oe=n(49068),re=n(17862),se=n(51475),ce=n(37603),de=n(43504),pe=n(75911),me=n(63083),ue=n(24490),ge=n(96294),ye=n(7308),he=n(64124),be=n(67385),Ae=n(43375),Ee=n(43627),ve=n(58168),xe=n(73514),fe=n(56775),Ce=n(81714),we=n.n(Ce),_e=n(93710);const Se=e=>[...e].sort().reduce((e,t)=>{const n=t.includes("-")?t.split("-"):t.split(">"),a=e.length;if(0===a)return[n];if(""===n[0]){if(parseInt(e[a-1][1])===parseInt(n[1])){const t=e.pop();return[...e,[t[0]]]}return[...e,[n[1]]]}if(parseInt(e[a-1][1],10)===parseInt(n[0])-1){const t=e.pop();return[...e,[t[0],n[1]]]}return[...e,n]},[]).map(e=>1!==e.length?e.join("-"):`≥${64===parseInt(e[0])?"65":e[0]}`).join(", "),ke=(0,a.forwardRef)(({id:e,item:t,disabled:n=!0,withOpacity:i=!1,isDragging:l,style:o=_e.t0,index:r=0,onMoveClick:s,onEditClick:c=we(),onDelete:d=we(),...p},m)=>{const u={opacity:i?"0.5":"1",padding:"16px",border:"1px solid #DBDBDB",background:"#FDFDFD",borderRadius:"10px",width:"190px",height:"230px",display:"flex",flexDirection:"column",color:"#8c8c8c",cursor:n&&!l?"poniter":"move",boxShadow:l?"rgb(63 63 68 / 5%) 0px 2px 0px 2px, rgb(34 33 81 / 15%) 0px 2px 3px 2px":"rgb(63 63 68 / 5%) 0px 0px 0px 1px, rgb(34 33 81 / 15%) 0px 1px 3px 0px",transform:l?"scale(1.05)":"scale(1)",...o};return a.createElement("div",(0,ve.A)({ref:m,style:u},p),a.createElement(ee.A,{direction:"row",alignItems:"center",spacing:1},a.createElement("div",{style:{width:"5px",height:"16px",backgroundColor:t.color,borderRadius:"0 3px 3px 0",display:"inline-block",margin:"3px 5px 3px -16px",verticalAlign:"baseline"}}," "),a.createElement("div",{style:{display:"inline-block",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",width:"180px",fontWeight:700,lineHeight:"24px",color:"#5F504D"},title:t.label},t.label),!n&&a.createElement(a.Fragment,null,a.createElement(E.A,{sx:{color:"#5F504D",padding:0},size:"small",onClick:()=>c(r)},a.createElement(ue.A,{size:"small"})),a.createElement(E.A,{sx:{color:"#FB4E3B",padding:0},size:"small",onClick:()=>d(r)},a.createElement(pe.A,{size:"small"})))),a.createElement(te.A,{variant:"caption",sx:{fontSize:"16px"}},"Total Body Data"),a.createElement(te.A,{variant:"h5",sx:{color:"#5F504D"}},t?.statistics?.total||0),a.createElement(te.A,{variant:"caption",sx:{fontSize:"14px"}}," "),a.createElement(te.A,{variant:"caption",sx:{fontSize:"16px"}},"Conditions"),"ABP"===t?.type&&a.createElement(a.Fragment,null,a.createElement(te.A,{noWrap:!0,variant:"caption",title:`Name: ${t?.name||"N/A"}`,sx:{width:"190px",display:"inline-block",fontSize:"14px"}},`Name: ${t?.name||"N/A"}`),a.createElement(te.A,{noWrap:!0,variant:"caption",title:`Body Type: ${t?.body_type||"N/A"}`,sx:{width:"190px",display:"inline-block",fontSize:"14px"}},`Body Type: ${t?.body_type||"N/A"}`),a.createElement(te.A,{noWrap:!0,variant:"caption",title:`Size Range: ${t?.size_range&&0!==t.size_range.length?t.size_range.join("-"):"N/A"}`,sx:{width:"190px",display:"inline-block",fontSize:"14px"}},`Size Range: ${t?.size_range&&0!==t.size_range.length?t.size_range.join("-"):"N/A"}`),a.createElement(te.A,{noWrap:!0,title:`Country/Region: ${t?.country&&0!==t.country.length?t.country.join(", "):"All"}`,variant:"caption",sx:{width:"190px",display:"inline-block",fontSize:"14px"}},`Country/Region: ${t?.country&&0!==t.country.length?t.country.join(", "):"All"}`)),"MyAlva"===t?.type&&a.createElement(a.Fragment,null,a.createElement(te.A,{noWrap:!0,title:`Ethnicity: ${t?.ethnicity&&0!==t.ethnicity.length?t.ethnicity.join(", "):"All"}`,variant:"caption",sx:{width:"190px",display:"inline-block",fontSize:"14px"}},`Ethnicity: ${t?.ethnicity&&0!==t.ethnicity.length?t.ethnicity.join(", "):"All"}`),a.createElement(te.A,{noWrap:!0,title:`Gender: ${t?.gender&&0!==t.gender.length?t.gender:"Male & Female"}`,variant:"caption",sx:{width:"190px",display:"inline-block",fontSize:"14px"}},`Gender: ${t?.gender&&0!==t.gender.length?t.gender.join("&"):"Male & Female"}`),a.createElement(te.A,{noWrap:!0,title:`Age: ${t?.age_bucket&&0!==t.age_bucket.length?Se(t.age_bucket):"All"}`,variant:"caption",sx:{width:"190px",display:"inline-block",fontSize:"14px"}},`Age: ${t?.age_bucket&&0!==t.age_bucket.length?Se(t.age_bucket):"All"}`),a.createElement(te.A,{noWrap:!0,title:`Country/Region: ${t?.country&&0!==t.country.length?t.country.join(", "):"All"}`,variant:"caption",sx:{width:"190px",display:"inline-block",fontSize:"14px"}},`Country/Region: ${t?.country&&0!==t.country.length?t.country.join(", "):"All"}`)),"BodyScan"===t?.type&&a.createElement(a.Fragment,null,a.createElement(te.A,{noWrap:!0,title:`Ethnicity: ${t?.ethnicity&&0!==t.ethnicity.length?t.ethnicity.join(", "):"All"}`,variant:"caption",sx:{width:"190px",display:"inline-block",fontSize:"14px"}},`Ethnicity: ${t?.ethnicity&&0!==t.ethnicity.length?t.ethnicity.join(", "):"All"}`),a.createElement(te.A,{noWrap:!0,title:`Gender: ${t?.gender?.join("&")||"Male & Female"}`,variant:"caption",sx:{width:"190px",display:"inline-block",fontSize:"14px"}},`Gender: ${1!==t?.gender?.length?"Male & Female":t.gender[0]}`),a.createElement(te.A,{noWrap:!0,title:`Age: ${t?.age_range&&0!==t.age_range.length?(0,_e.F_)("age",t.age_range[0],t.age_range[1]):"N/A"}`,variant:"caption",sx:{width:"190px",display:"inline-block",fontSize:"14px"}},`Age: ${t?.age_range&&0!==t.age_range.length?(0,_e.F_)("age",t.age_range[0],t.age_range[1]):"N/A"}`),a.createElement(te.A,{noWrap:!0,title:`Country/Region: ${t?.country&&0!==t.country.length?t.country.join(", "):"All"}`,variant:"caption",sx:{width:"190px",display:"inline-block",fontSize:"14px"}},`Country/Region: ${t?.country&&0!==t.country.length?t.country.join(", "):"All"}`)),"Sizeset"===t?.type&&a.createElement(a.Fragment,null,a.createElement(te.A,{noWrap:!0,variant:"caption",title:`Name: ${t?.name||"N/A"}`,sx:{width:"190px",display:"inline-block",fontSize:"14px"}},`Name: ${t?.name||"N/A"}`),a.createElement(te.A,{noWrap:!0,variant:"caption",title:`Body Type: ${t?.body_type&&0!==t.body_type.length?t.body_type.join(", "):"N/A"}`,sx:{width:"190px",display:"inline-block",fontSize:"14px"}},`Body Type: ${t?.body_type&&0!==t.body_type.length?t.body_type.join(", "):"N/A"}`),a.createElement(te.A,{noWrap:!0,variant:"caption",title:`Size Range: ${t?.size_range&&0!==t.size_range.length?t.size_range.join("-"):"N/A"}`,sx:{width:"190px",display:"inline-block",fontSize:"14px"}},`Size Range: ${t?.size_range&&0!==t.size_range.length?t.size_range.join("-"):"N/A"}`),a.createElement(te.A,{noWrap:!0,variant:"caption",sx:{width:"190px",display:"inline-block",fontSize:"14px",color:"#ffffff",minHeight:"23.34px"}}," ")),a.createElement(ee.A,{direction:"row",justifyContent:"space-between",alignItems:"center"},a.createElement(re.A,{size:"small",label:"ABP"===t.type?"Standard":t.type,sx:{backgroundColor:"rgba(229, 229, 229, 1)",color:"#000000",width:"40%",fontSize:"14px",borderRadius:"5px",marginTop:"5px",span:{padding:0}}}),void 0!==s&&a.createElement(xe.A,{disableFocusListener:!0,disableTouchListener:!0,title:"Move to Analyze"},a.createElement(E.A,{sx:{color:"#8C8C8C",padding:0},size:"small",onClick:()=>s()},a.createElement(fe.A,{size:"small"})))))});ke.propTypes={id:K().string.isRequired,withOpacity:K().bool,isDragging:K().bool.isRequired,item:K().instanceOf(Object).isRequired,disabled:K().bool,index:K().number,onEditClick:K().func,onDelete:K().func,style:K().instanceOf(Object)};const ze=ke;var Re=n(74979);const De=({item:e,disabled:t,id:n,index:i,onEditClick:l,onDelete:o,onMoveClick:r})=>{const{isDragging:s,attributes:c,listeners:d,setNodeRef:p,transform:m,transition:u}=(0,Ee.gl)({id:n}),g={transform:Re.Ks.Transform.toString(m),transition:u||void 0};return a.createElement(ze,(0,ve.A)({ref:p,style:g,id:n,withOpacity:s,item:e,index:i,onEditClick:l,onDelete:o,disabled:t,isDragging:s,onMoveClick:r},c,d))},Oe=({populations:e,disabled:t,onEditClick:n,onDelete:i,onOrderChange:l,onAddClicked:o,isNew:r})=>{const[s,c]=(0,a.useState)([]),[p,u]=(0,a.useState)(null),[g,y]=(0,a.useState)({}),b=(0,Ae.FR)((0,Ae.MS)(Ae.cA,{activationConstraint:{distance:5}}),(0,Ae.MS)(Ae.IG),(0,Ae.MS)(Ae.AN,{activationConstraint:{distance:5}}));return(0,a.useEffect)(()=>{c(e)},[e]),a.createElement(Ae.Mp,{sensors:b,collisionDetection:Ae.fp,onDragEnd:e=>{const{active:t,over:n}=e;if(t.id!==n.id){const e=s.map(e=>e.label),a=e.indexOf(t.id),i=e.indexOf(n.id),o=(0,Ee.be)(s,a,i);c(o),l(o)}},onDragStart:e=>{u(e.active.id),y(s.find(t=>t.label===e.active.id))},onDragCancel:()=>{u(null),y({})}},a.createElement(Ee.gB,{items:s,strategy:Ee.kL,disabled:t},a.createElement(ee.A,{direction:"row",useFlexGap:!0,flexWrap:"wrap",spacing:1,mt:.5},s.map((e,l)=>a.createElement(De,{key:e.label,id:e.label,index:l,onEditClick:n,onDelete:i,item:e,disabled:t})),!t&&e.length<10&&a.createElement(d.A,{theme:m.w},a.createElement(h.A,{size:"small",onClick:o,color:"primary",sx:{width:"223px",height:"264px",border:"1px solid #DBDBDB",borderRadius:"10px",padding:"16px",alignItems:"start",justifyContent:"start"}},"+ Add "+(r?"Object":"Comparison"))))),a.createElement(Ae.Hd,{adjustScale:!0,style:{transformOrigin:"0 0 "}},p?a.createElement(ze,{item:g,id:p,isDragging:!0}):null))};Oe.propTypes={onOrderChange:K().func.isRequired,populations:K().instanceOf(Array).isRequired,disabled:K().bool.isRequired,onEditClick:K().func.isRequired,onDelete:K().func.isRequired,onAddClicked:K().func.isRequired,isNew:K().bool.isRequired};const Fe=Oe;var Ie=n(39992),Te=n(72817),je=n(8094),$e=n(49530),Pe=n(66853),Be=n(33042);const Me=({open:e,project:t,selectedPopulation:n,isNew:i,onPopulationEditClose:o,myAlvaOptions:r,populationMap:s,dbVersion:c})=>{const p=(0,l.useSelector)(Pe.PL),[u,g]=(0,a.useState)(!1),[y,b]=(0,a.useState)({}),[A,E]=(0,a.useState)(!1),[v,x]=(0,a.useState)(!1),[f,C]=(0,a.useState)(!1),[w,_]=(0,a.useState)(""),[S,k]=(0,a.useState)([]),[z,R]=(0,a.useState)([]),[D,O]=(0,a.useState)([]),F=z.map(e=>e.id),I=D.filter(e=>!F.includes(e.id)),T=I.map(e=>e.id),[j,$]=(0,a.useState)(null),[P,B]=(0,a.useState)({}),M=p?.gender||"Male",L=p?.types||["BODY"],N="Female"===M?"Female":"Male",W=(0,Ae.FR)((0,Ae.MS)(Ae.cA,{activationConstraint:{distance:5}}),(0,Ae.MS)(Ae.IG),(0,Ae.MS)(Ae.AN,{activationConstraint:{distance:5}}));(0,a.useEffect)(()=>{g(!0);const e={project:t,page_size:999};(0,je.m4)(e).then(e=>{O(e?.data||[]),g(!1)})},[t]),(0,a.useEffect)(()=>{R(n)},[n]);const V=e=>{x(!0),_(e)},G=e=>{"del"===e?x(!1):C(!1),_("")},q=()=>{E(!1)},Y=e=>{const t=D.find(t=>t.id===e)||{};b(t)},H=e=>F.includes(e)?z:T.includes(e)?I:[];return a.createElement(ne.A,{open:e,sx:{".MuiPaper-root":{maxWidth:"98vw",width:"98vw",zIndex:2e3}},transitionDuration:0},a.createElement(ae.A,null,"Edit Populations"),a.createElement(ie.A,null,a.createElement(Ae.Mp,{sensors:W,collisionDetection:Ae.y$,onDragEnd:e=>{const{active:t,over:n}=e,a=F.includes(n.id),i=F.includes(t.id);if(0===z.length&&t.rect.current.translated.top+160t.rect.current.initial.top){const e=F.indexOf(t.id),n=z.toSpliced(e,1);R(n)}if(t.id!==n.id)if(a){const e=F.indexOf(n.id);if(i){const n=F.indexOf(t.id),a=(0,Ee.be)(H(t.id),n,e);R(a)}else{const t=z.toSpliced(e,0,P);R(t)}}else if(!a&&i){const e=F.indexOf(t.id),n=z.toSpliced(e,1);R(n)}},onDragStart:e=>{$(e.active.id);const t=H(e.active.id).find(t=>t.id===e.active.id);B(t)},onDragCancel:()=>{$(null),B({})}},a.createElement(te.A,{variant:"h6"},"Populations to Analyze"),a.createElement(te.A,{variant:"caption",sx:{color:"#808080"}},"At leaset one population is required to generate valid results. "),a.createElement(te.A,{variant:"caption",sx:{color:"#808080"}},"Drag the population cards to reorder the legends for all charts."+(i?"":" Once saved, the charts will update based on this new order.")),a.createElement(Ee.gB,{items:z,strategy:Ee.kL},a.createElement(ee.A,{direction:"row",useFlexGap:!0,flexWrap:"wrap",spacing:1,mt:.5,sx:{minHeight:"244px"}},z.map((e,t)=>a.createElement(De,{key:e.id,id:e.id,index:t,onEditClick:()=>Y(e.id),onDelete:()=>V(e.id),item:e,disabled:!1})),a.createElement(d.A,{theme:m.w},a.createElement(h.A,{size:"small",onClick:()=>{b({id:"newpopulationid",label:"",color:"#E7AF53",include_dataset:[],gender:[N],isNew:!0,age_range:[0,80],extra_filter:[],type:"BodyScan"})},color:"primary",sx:{width:"223px",height:"264px",border:"1px solid #DBDBDB",borderRadius:"10px",padding:"16px",alignItems:"start",justifyContent:"start"}},"+ Add Comparison")))),a.createElement(te.A,{variant:"h6"},"Available Populations"),a.createElement(te.A,{variant:"caption",sx:{color:"#808080"}},'Drag a population card from "Available Populations" to "Populations to Analyze" to set it as the data set for this analysis.'),a.createElement(Ee.gB,{items:I,strategy:Ee.kL},a.createElement(ee.A,{direction:"row",useFlexGap:!0,flexWrap:"wrap",spacing:1,mt:.5,sx:{minHeight:"150px"}},I.map((e,t)=>a.createElement(De,{key:e.id,id:e.id,index:t,onEditClick:()=>Y(e.id),onDelete:()=>V(e.id),item:e,disabled:!1,onMoveClick:()=>R(t=>[...t,e])})))),a.createElement(Ae.Hd,{adjustScale:!0,style:{transformOrigin:"0 0 "}},j?a.createElement(ze,{item:P,id:j,isDragging:!0}):null))),a.createElement(le.A,null,a.createElement(ye.A,{text:"Cancel",variant:"outlined",color:"default",onClick:()=>o()}),a.createElement(ye.A,{text:"Save",color:"primary",disabled:z.length<1,onClick:()=>o(F)})),a.createElement(Ie.A,{open:0!==Object.keys(y).length,onClose:(e,n)=>((e,n)=>{const{id:a}=e;"save"===n?"newpopulationid"===a?(0,je.Mk)({project:t,...e}).then(e=>{e&&(O([...D,e]),R([...z,e]),b({}))}):(0,je.j4)(a,e).then(t=>{if(t?.data)C(!0),k(t.data),_(a),b(e);else if(t?.id){const e=D.filter(e=>e.id!==t.id);if(O([t,...e]),F.includes(t.id||"")){const e=F.findIndex(e=>e===t.id);R(n=>n.toSpliced(e,1,t))}b({})}}):b({})})(e,n),rowDetail:y,prefilledGender:N,populationMap:{BodyScan:s,MyAlva:r?.dataset||[]},populationOptions:r,projectTypes:L,dbVersion:c}),u&&a.createElement(Be.A,{isLoading:u,isSingleChart:!0}),a.createElement(ne.A,{onClose:()=>G("del"),open:v},a.createElement(ae.A,null,"Please Confirm"),a.createElement(ie.A,null,a.createElement($e.A,{id:"alert-dialog-description"},"Are you sure that you want to delete this population?")),a.createElement(le.A,null,a.createElement(ye.A,{text:"Cancel",variant:"outlined",color:"default",onClick:()=>G("del")}),a.createElement(ye.A,{text:"Yes",color:"primary",onClick:()=>{return e=w,x(!1),void(0,je.Js)(e).then(t=>{t?.data?(E(!0),k(t.data)):(O(D.filter(t=>t.id!==e)),F.includes(e)&&R(t=>t.filter(t=>t.id!==e)))});var e}}))),a.createElement(ne.A,{onClose:q,open:A},a.createElement(ae.A,null,"Warning"),a.createElement(ie.A,null,a.createElement($e.A,{id:"alert-dialog-description"},`This population is currently in use in analysis ${S.map(e=>e.title).join(" & ")}, please remove this population from the analysis mentioned above in order to delete it.`)),a.createElement(le.A,null,a.createElement(ye.A,{text:"Ok",color:"primary",onClick:q}))),a.createElement(ne.A,{onClose:()=>G("edit"),open:f},a.createElement(ae.A,null,"Please Confirm"),a.createElement(ie.A,null,a.createElement($e.A,{id:"alert-dialog-description"},`This population is currently in use in analysis ${S.map(e=>e.title).join(" & ")}. Are you sure that you want to save these changes?`),u&&a.createElement(Be.A,{isLoading:u,isSingleChart:!0})),a.createElement(le.A,null,a.createElement(ye.A,{text:"Cancel",variant:"outlined",color:"default",onClick:()=>G("edit")}),a.createElement(ye.A,{text:"Yes",color:"primary",onClick:()=>{return e=w,g(!0),void(0,je.j4)(e,{...y,force:!0}).then(e=>{if(e?.id){const t=D.filter(t=>t.id!==e.id);if(F.includes(e?.id)){const t=F.findIndex(t=>t===e.id);R(n=>n.toSpliced(t,1,e))}O([e,...t]),_(""),C(!1),b({})}g(!1)});var e}}))))};Me.propTypes={open:K().bool.isRequired,project:K().string.isRequired,selectedPopulation:K().instanceOf(Array).isRequired,onPopulationEditClose:K().func.isRequired,isNew:K().bool.isRequired,populationMap:K().instanceOf(Array).isRequired,myAlvaOptions:K().instanceOf(Object).isRequired,dbVersion:K().string.isRequired};const Le=Me;var Ne=n(39197),We=n(96467);const Ve={label:"",color:"#E7AF53",include_dataset:[],ethnicity:[],gender:[],isNew:!0,age_bucket:[],extra_filter:[],type:"MyAlva"},Ge=({id:e,data:t,source:n})=>{const i=(0,l.useSelector)(Pe.PL),[o,r]=(0,a.useState)(!1),[s,c]=(0,a.useState)(!1),d=(0,l.useDispatch)(),p=(0,y.Zp)(),[m,u]=(0,a.useState)(""),[g,h]=(0,a.useState)(""),[b,A]=(0,a.useState)([]),[v,x]=(0,a.useState)(null),[f,C]=(0,a.useState)([]),[w,_]=(0,a.useState)([]),[S,k]=(0,a.useState)({}),[z,R]=(0,a.useState)(""),D=b.map(e=>e.label),O=void 0===t?.populations||0===t.populations.length,F=b.map(e=>e.label),I=(0,l.useSelector)(Te.FZ),[T,j]=(0,a.useState)(null),$=Boolean(T),[P,B]=(0,a.useState)(!1),M="PROJECT_VIEW"===n&&i?.types||["BODY"],L="PROJECT_VIEW"===n?0!==I.length&&"normal"!==I:"normal"===I;(0,a.useEffect)(()=>{n&&(0,be.m5)({type:n,return_tree:!0}).then(e=>{e?.data&&C(e.data)})},[n]),(0,a.useEffect)(()=>{u(t?.title||""),h(t?.description||""),k({unit:t?.unit||"cm",unit_weight:t?.unit_weight||"kg"}),A(t?.populations||[]),(0,je.Kj)({project_types:M,project_id:"PROJECT_VIEW"===n&&i?.id||""}).then(e=>{_(e?.data||[]),"PROJECT_VIEW"===n&&R(e?.db_version||"latest")}),void 0!==t?.populations&&0!==t.populations.length||"MYALVA"!==n||c(!0)},[t]),(0,a.useEffect)(()=>{const e=b.filter(e=>void 0===e?.statistics&&!e.isNew);0!==e.length&&e.forEach(e=>{(0,be.ds)(e).then(n=>{if(n){const a=0!==b.length?b:t.populations,i=a.findIndex(t=>t.label===e.label),l="Sizeset"===e.type?{...e,...n}:{...e,statistics:n?.statistics,country:n?.country||e.country},o=a.toSpliced(i,1,l);A(o)}})})},[b]),(0,a.useEffect)(()=>{(0===Object.keys(S).length||S.unit===t?.unit&&S.unit_weight===t?.unit_weight)&&(o||0===m.length||m===t.title&&g===t.description)||(0,J.ev)(e,{title:m,description:g,...S},n).then(e=>{e&&(d((0,Q.yZ)(e)),r(!1))})},[S,o]);const N=t=>{(0,J.ev)(e,{populations:t||b},n).then(e=>{e&&(d((0,Q.yZ)(e)),c(!1))})};return a.createElement(ee.A,{direction:"column",spacing:.5,mt:-1},a.createElement(ee.A,{direction:"row",alignItems:"center",justifyContent:"space-between",sx:{height:"28px"}},a.createElement(E.A,{"aria-label":"back",onClick:()=>p("../"),sx:{color:"#808080",padding:0,"&:hover":{color:"#EC7700",backgroundColor:"transparent"}}},a.createElement(de.A,{fontSize:"small"}),a.createElement(te.A,{variant:"body1",style:{padding:"0 2px",fontSize:"14px"}},"Back to all "+("PROJECT_VIEW"===n?"scan data analysis":"projects"))),"MYALVA"!==n&&a.createElement(ee.A,{direction:"row",spacing:1,alignItems:"baseline"},0!==b.length&&a.createElement(a.Fragment,null,a.createElement(te.A,{variant:"caption",component:"i"},`Last Modified: ${(0,_e.kS)(t?.last_modified)}`),a.createElement(ye.A,{text:"Download All",color:"primary",disabled:L,onClick:t=>{0!==I.length&&t.preventDefault(),d((0,Te.A3)({analysisToDownload:e,source:"analysis_scan_data"})),(0,je.N0)(e).then(e=>{null!==e?(0,We.S)(e):d((0,Te.A3)({analysisToDownload:""}))})}})),a.createElement(E.A,{onClick:e=>j(e.currentTarget)},a.createElement(me.A,{fontSize:"small"})),a.createElement(se.A,{id:`${n}-action-menu`,anchorEl:T,open:$,dense:"true",transitionDuration:0,onClose:()=>j(null)},a.createElement(ce.A,{onClick:()=>{j(null),B(!0)}},a.createElement(pe.A,{fontSize:"small"}),"Delete")))),a.createElement(ee.A,{direction:"row",justifyContent:"space-between",sx:{".MuiStack-root #edit-btn":{display:"none"},"&:hover":{".MuiStack-root #edit-btn":{display:"inline-flex"}}}},a.createElement("div",null,a.createElement(ee.A,{direction:"row"},a.createElement(te.A,{variant:"h4",sx:{fontSize:"30px"}},t?.title||""),a.createElement(E.A,{id:"edit-btn",size:"small",sx:{color:"#5F504D",width:"37px",height:"37px",marginLeft:"5px"},onClick:()=>r(!0)},a.createElement(ue.A,null))),t?.description&&0!==t.description.length&&a.createElement(te.A,{variant:"body1",sx:{color:"#808080",fontSize:"14px"}},`Description: ${t?.description}`)),a.createElement(ee.A,{direction:"column",alignItems:"end",spacing:1,mt:1},a.createElement(he.A,{label:"Measurement",options:["cm","inch"],value:S?.unit||"cm",color:"primary",onChange:e=>k(t=>({...t,unit:e}))}),"PROJECT_VIEW"!==n&&a.createElement(he.A,{label:"Weight",options:["kg","lbs"],value:S?.unit_weight||"kg",color:"primary",onChange:e=>k(t=>({...t,unit_weight:e}))}))),a.createElement(ee.A,{direction:"column",spacing:0},"PROJECT_VIEW"===n?a.createElement(a.Fragment,null,a.createElement(ee.A,{direction:"row",spacing:1,alignItems:"center"},a.createElement(te.A,{variant:"h6"},"Populations"),a.createElement(ye.A,{size:"small",text:"Edit",color:"default",variant:"outlined",onClick:()=>c(!0)})),a.createElement(ee.A,{direction:"row",spacing:.5,mt:.5,useFlexGap:!0,flexWrap:"wrap"},b.map(e=>a.createElement("div",{key:`display-card-${e.id}`,style:{padding:"16px",border:"1px solid #DBDBDB",background:"#FDFDFD",borderRadius:"10px",width:"190px",height:"115px",display:"flex",flexDirection:"column",color:"#8c8c8c",boxShadow:"rgb(63 63 68 / 5%) 0px 0px 0px 1px, rgb(34 33 81 / 15%) 0px 1px 3px 0px"}},a.createElement(ee.A,{direction:"row",alignItems:"center",spacing:1},a.createElement("div",{style:{width:"5px",height:"16px",backgroundColor:e.color,borderRadius:"0 3px 3px 0",display:"inline-block",margin:"3px 5px 3px -16px",verticalAlign:"baseline"}}," "),a.createElement("div",{style:{display:"inline-block",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",width:"180px",fontWeight:700,lineHeight:"24px",color:"#5F504D"},title:e.label},e.label)),a.createElement(te.A,{variant:"caption",sx:{fontSize:"16px"}},"Total Body Data"),a.createElement(te.A,{variant:"h5",sx:{color:"#5F504D"}},e?.statistics?.total||0),a.createElement(re.A,{size:"small",label:"ABP"===e.type?"Standard":e.type,sx:{backgroundColor:"rgba(229, 229, 229, 1)",color:"#000000",width:"40%",fontSize:"14px",borderRadius:"5px",marginTop:"5px",span:{padding:0}}}))))):a.createElement(a.Fragment,null,a.createElement(ee.A,{direction:"row",spacing:1,alignItems:"center"},a.createElement(te.A,{variant:"h6"},"Analysis Objects"),s?a.createElement(a.Fragment,null,a.createElement(ye.A,{disabled:0===b.length,size:"small",text:"Save",color:"primary",onClick:()=>N()}),!O&&a.createElement(ye.A,{size:"small",variant:"outlined",text:"Cancel",color:"default",onClick:()=>{c(!1),A(t?.populations||[])}})):a.createElement(ye.A,{size:"small",text:"Edit",color:"default",variant:"outlined",onClick:()=>c(!0)})),s&&a.createElement(a.Fragment,null,a.createElement(te.A,{variant:"caption",sx:{color:"#808080"}},"At leaset one object is required to generate valid results. "),a.createElement(te.A,{variant:"caption",sx:{color:"#808080"}},"Drag the object cards to reorder the legends for all charts."+(O?"":" Once saved, the charts will update based on this new order."))),a.createElement(ee.A,{direction:"row",spacing:0,alignItems:"center"},a.createElement(Fe,{order:D,onOrderChange:e=>{A(e)},populations:b,disabled:!s,onEditClick:e=>{x(e)},onDelete:e=>{const t=b.toSpliced(e,1);A(t)},onAddClicked:()=>{const e=[...b,Ve];A(e),x(e.length-1)},isNew:O})))),a.createElement(ne.A,{open:o,maxWidth:"md",transitionDuration:0},a.createElement(ae.A,null,"Edit Analysis Info"),a.createElement(ie.A,null,a.createElement(ee.A,{direction:"row",spacing:2},a.createElement(ee.A,{direction:"column",spacing:2},a.createElement("div",{style:{width:"510px"}},a.createElement(oe.A,{sx:{position:"relative",transform:"none",transition:"none",marginBottom:"5px"}},"Title"),a.createElement(ge.A,{label:"title",placeholder:"Title",value:m,width:500,style:{marginRight:0},onChange:e=>u(e.target.value)})),a.createElement("div",null,a.createElement(oe.A,{sx:{position:"relative",transform:"none",transition:"none",marginBottom:"5px"}},"Description"),a.createElement(ge.A,{label:"description",value:g,multiline:!0,rows:10,width:500,onChange:e=>h(e.target.value),style:{minHeight:"200px",marginRight:0}}))))),a.createElement(le.A,null,a.createElement(ye.A,{variant:"outlined",color:"default",text:"Cancel",onClick:()=>{u(t?.title||""),h(t?.description||""),r(!1)}}),a.createElement(ye.A,{color:"primary",text:"Save",onClick:()=>{r(!1)}}))),"PROJECT_VIEW"===n&&s&&a.createElement(Le,{open:"PROJECT_VIEW"===n&&s,selectedPopulation:b,project:t.project,isNew:O,onPopulationEditClose:e=>{e&&N(e),c(!1)},myAlvaOptions:f,populationMap:w,dbVersion:z}),null!==v&&a.createElement(Ie.A,{open:null!==v,onClose:(e,t)=>((e,t)=>{if("save"===t){const t="ABP"===e.type?{label:e.label,collection:e.collection,color:e.color,type:e.type,name:e.name,body_type:e.body_type,size_range:e.size_range,country:e.country}:e;(0,be.ds)(t).then(e=>{if(e){const n="Sizeset"===t.type?{...t,...e,isNew:!1}:{...t,statistics:e?.statistics,country:e?.country||t.country,isNew:!1},a=b.toSpliced(v,1,n);A(a),x(null)}})}else{if(e.isNew){const e=b.toSpliced(v,1);A(e)}x(null)}})(e,t),rowDetail:b.at(v),populationMap:{BodyScan:w,MyAlva:f?.dataset||[],ABP:f?.standard||[]},populationOptions:f,existingName:F,unit:S?.unit||"cm",projectTypes:[]}),P&&a.createElement(Ne.A,{title:m,id:e,source:n,onClose:e=>{e?p("../"):B(!1)}}))};Ge.propTypes={id:K().string.isRequired,data:K().instanceOf(Object).isRequired,source:K().string.isRequired};const qe=Ge,Ye=[{value:"Body Data Distribution",key:"dc"},{key:"sp",value:"Market Analysis"},{key:"dt",value:"DT"},{key:"m4m",value:"M4M"},{key:"mc",value:"MC"}],He={minWidth:"80px",borderRadius:"10px 10px 0 0",backgroundColor:"#FFFFFF",borderBottom:"1px solid #CBCBCB",minHeight:"30px",zIndex:"inherit",p:"0 20px","&.Mui-selected":{backgroundColor:"#FFFFFF",borderBottom:"2px solid #EC7700"},"&:hover":{color:"#EC7700"}},Ze=()=>{const e=(0,y.zy)(),t=(0,l.useDispatch)(),n=e.pathname.split("/")[3],[i,o]=(0,a.useState)({}),r=(0,l.useSelector)(Q.Mu),s=(0,l.useSelector)(Pe.PL),c=s.types?.includes("BODY"),p=(t=>{for(let n=0;n{r?.id===n?o(r||{}):(0,J.wl)(n,"PROJECT_VIEW").then(e=>{e&&(o(e||{}),t((0,Q.yZ)(e)))})},[n,r]),a.createElement(U.A,{sx:{padding:"10px 20px"}},0!==Object.keys(i).length&&a.createElement(qe,{id:n,data:i,source:"PROJECT_VIEW"}),i?.populations&&0!==i.populations.length&&a.createElement(a.Fragment,null,a.createElement(d.A,{theme:m.w},a.createElement(H.A,{color:"primary",value:h,"aria-label":"basic tabs",sx:{marginTop:"16px",minHeight:"30px",".MuiTabs-indicator":{display:"none"}}},a.createElement(Z.A,{label:"Summary",value:":id/scans/:scanid",component:g.N_,to:"./",sx:He}),(c?Ye:Ye.filter(e=>"mc"!==e.key)).map(e=>a.createElement(Z.A,{key:e.key,label:e.value,value:`:id/scans/:scanid/${e.key}`,component:g.N_,to:`./${e.key}`,sx:He})))),a.createElement(U.A,{sx:{padding:"0 10px 20px",height:"calc(100% - 97px)",minHeight:"500px"}},a.createElement(a.Suspense,{fallback:a.createElement(Be.A,{isLoading:!0})},a.createElement(y.sv,null)))))},Ue=()=>a.createElement(y.sv,null),Je=()=>a.createElement(y.sv,null);var Qe=n(73053),Xe=n(30073),Ke=n(95884),et=n(16738),tt=n(22535);const nt=[{text:"Info & Permissions",path:"info"},{text:"User List",path:"user"},{text:"Role",path:"role"}],at=()=>{const e=(0,y.zy)(),t=(0,y.Ew)("orgs");return a.createElement(ee.A,{spacing:1,justifyContent:"space-between",direction:"column",sx:{backgroundColor:"#E5E5E5",height:"100%"}},a.createElement(ee.A,{sx:{height:"42px",padding:"5px 20px",backgroundColor:"#FFFFFF"},spacing:0},a.createElement(te.A,{variant:"h6",sx:{lineHeight:1}},t.name),a.createElement(tt.A,{separator:">","aria-label":"breadcrumb"},a.createElement(g.N_,{underline:"hover",color:"inherit",to:"/sys-admin/organization"},"System Admin"),a.createElement(g.N_,{underline:"hover",color:"inherit",to:"/sys-admin/organization"},"All Organizations"),a.createElement(te.A,null,t.name))),a.createElement(U.A,{sx:{padding:"0 8px",height:"calc(100vh - 140px)"}},a.createElement(Qe.Ay,{sx:{".MuiDrawer-paper":{position:"absolute",top:"auto",left:"auto",zIndex:"auto",width:"180px",height:"calc(100% - 68px)"},a:{color:"inherit"}},variant:"permanent",anchor:"left"},a.createElement(Xe.A,null,nt.map(t=>a.createElement(Ke.A,{selected:e.pathname.includes(t.path),key:t.text},a.createElement(g.N_,{className:"sidebar-tabs",to:t.path,style:{width:"100%"}},a.createElement(et.A,{primary:t.text})))))),a.createElement(U.A,{sx:{width:"calc(100% - 220px)",marginLeft:"188px",p:2,backgroundColor:"#FFFFFF",height:"calc(100% - 40px)"},component:"main"},a.createElement(y.sv,null))))};var it=n(74353),lt=n.n(it),ot=n(88569),rt=n.n(ot),st=n(83826),ct=n.n(st),dt=n(60492),pt=n(19373),mt=n(72456);lt().extend(ct()),lt().extend(rt());const ut=["email","first_name","last_name","password"],gt=()=>{const e=(0,l.useSelector)(f.ug),t=(0,l.useDispatch)(),n=(0,y.Zp)(),[i,o]=(0,a.useState)({}),[r,s]=(0,a.useState)(!1),[c,d]=(0,a.useState)([]),[p,m]=(0,a.useState)(""),u=lt().tz.guess();(0,a.useEffect)(()=>{(0,C.qt)().then(e=>{if(e?.data){const t=e.data.map(e=>({key:e.key,value:e.label}));d(t)}})},[]),(0,a.useEffect)(()=>{(0,C.vF)(e.id).then(e=>{o(e),m(e?.timezone||"")})},[e]);const g=()=>{s(!1)};return(0,a.useEffect)(()=>{p!==i.timezone&&0!==p.length&&(0,dt.Wo)(e.id,{timezone:p}).then(n=>{n&&t((0,f.Jv)({...e,timezone:p}))})},[p]),a.createElement(U.A,{sx:{padding:8}},a.createElement(te.A,{variant:"h5"},"My Profile"),a.createElement(ee.A,{spacing:2,mt:2,mb:2,direction:"row",useFlexGap:!0,flexWrap:"wrap"},ut.map(e=>a.createElement("div",{key:e,style:{width:"email"===e?"100%":"calc(50% - 16px)",position:"relative"}},a.createElement(oe.A,{style:{display:"block",minWidth:"120px",boxSizing:"border-box",marginBottom:"5px"}},`${(0,_e.wR)(e)}*`),a.createElement(ge.A,{label:(0,_e.wR)(e),value:"password"===e?"123456":i?.[e]||"",inputProps:"password"===e?{type:"password"}:{},disabled:!0,style:{width:"email"===e?"calc(100% - 50px)":"330px"}}))),a.createElement(ye.A,{variant:"outlined",color:"default",text:"Change Password",onClick:()=>s(!0),style:{alignSelf:"end",marginBottom:"6px"}})),0!==c.length&&a.createElement(mt.A,{style:{minWidth:360},field:"Timezone",onChange:(e,t)=>m(t.key),value:c.find(e=>e.key===p)||c.find(e=>e.key===u),options:c}),r&&a.createElement(pt.A,{open:r,onClose:g,onSubmit:a=>{const i={id:e.id,password:a};(0,dt.xw)(i).then(e=>{e&&(g(),(0,C.MQ)().then(e=>{e&&t((0,f.CI)())}).then(()=>{n("/login",{replace:!0})}))})}}))};var yt=n(70466);const ht={minWidth:"80px",borderRadius:"10px 10px 0 0",backgroundColor:"#FFFFFF",borderBottom:"1px solid #CBCBCB",minHeight:"30px",zIndex:"inherit",p:"0 20px","&.Mui-selected":{backgroundColor:"#FFFFFF",borderBottom:"2px solid #EC7700"},"&:hover":{color:"#EC7700"}},bt=()=>{const e=(0,y.zy)(),t=(0,l.useSelector)(f.ug),n=t?.permissions||[],i=(0,l.useDispatch)(),o=e.pathname.split("/")[2],[r,s]=(0,a.useState)({}),c=(0,l.useSelector)(Q.Mu),p=(t=>{for(let n=0;n{c?.id===o?s(c||{}):(0,J.wl)(o,"MYALVA").then(e=>{s(e||{}),i((0,Q.yZ)(e))})},[o,c]),a.createElement(U.A,null,0!==Object.keys(r).length&&a.createElement(qe,{id:o,data:r,source:"MYALVA"}),r?.populations&&0!==r.populations.length&&a.createElement(a.Fragment,null,a.createElement(d.A,{theme:m.w},a.createElement(H.A,{color:"primary",value:h,"aria-label":"basic tabs",sx:{zIndex:999,minHeight:"30px",marginTop:"16px",".MuiTabs-indicator":{display:"none"}}},a.createElement(Z.A,{label:"Summary",value:"analysis/:id",component:g.N_,to:"./",sx:ht}),a.createElement(Z.A,{label:"Body Data Distribution",value:"analysis/:id/dc",component:g.N_,to:"./dc",sx:ht}),a.createElement(Z.A,{label:"Market Analysis",value:"analysis/:id/mc",component:g.N_,to:"./mc",sx:ht}),n.includes("insights_3d_model")&&a.createElement(Z.A,{label:"3D Models",value:"analysis/:id/avatars",component:g.N_,to:"./avatars",sx:ht}))),a.createElement(U.A,{sx:{padding:"0 10px 20px",height:"calc(100% - 97px)",minHeight:"500px"}},a.createElement(y.sv,null))))};var At=n(33173),Et=n(54026),vt=n(51361),xt=n(96120),ft=n(86700),Ct=n(78828),wt=n(26739),_t=n(95243),St=n(57360),kt=n(39818),zt=n(83272),Rt=n(12250),Dt=n(40357);const Ot=(0,wt.Ay)(zt.A)(()=>({[`&.${Rt.A.root}`]:{color:"#544744"},[`&.${Rt.A.head}`]:{fontSize:"16px"}})),Ft=(0,wt.Ay)(Ct.A)(()=>({height:"100px",width:"100%",borderRadius:"10px",position:"relative","&:hover":{"&::after":{content:'""',display:"block",position:"absolute",boxShadow:"0px 0px 3px 3px rgba(236, 119, 0, 0.66)",height:"calc(100% - 6px)",width:"calc(100% - 8px)",borderRadius:"10px",left:"3px",top:"3px"}},"&:nth-of-type(even)":{backgroundColor:"rgba(236, 119, 0, 0.05)"}})),It=({data:e,onViewMoreClicked:t,totalCount:n,listHeight:i,onAnalysisDelete:l,onProjectStarred:o,viewBy:r,hasFilterOptions:s})=>a.createElement(xt.A,{key:"myalva-list-table",id:"myalva-list-table",className:i,component:"div"},a.createElement(Et.A,{stickyHeader:!0,"aria-label":"myalva-list-table",component:"div"},a.createElement(ft.A,{component:"div"},a.createElement(Ct.A,{component:"div"},a.createElement(Ot,{component:"div"}," "),Dt.cb.map(e=>a.createElement(Ot,{key:e.label,component:"div"},e.label)),a.createElement(Ot,{component:"div"}," "))),a.createElement(vt.A,{component:"div"},0!==e.length&&e.map(e=>a.createElement(Ft,{key:e.id,component:g.N_,to:`./${e.id}`,sx:{"#del-btn":{visibility:"hidden"},"&:hover":{"#del-btn":{visibility:"visible"}}}},a.createElement(Ot,{align:"left",component:"div"},a.createElement(E.A,{size:"small",sx:{color:"#5F504D",zIndex:1},onClick:t=>{t.preventDefault(),o(e,!e?.is_favorites)}},e?.is_favorites?a.createElement(kt.A,{fontSize:"small"}):a.createElement(St.A,{fontSize:"small"}))),Dt.cb.map(t=>a.createElement(Ot,{align:"left",key:`${t.name}-${e.acid}-${t.id}`,style:{fontWeight:"acid"===t.id||"client"===t.id?"600":"400"},component:"div"},"created_by"===t.id?(0,Dt.eK)(e[t.id]):(0,Dt.X8)(t.id,e[t.id])||"N/A")),a.createElement(Ot,{align:"left",component:"div"},a.createElement(E.A,{id:"del-btn",size:"small",sx:{color:"#5F504D",zIndex:588},onClick:t=>{t.preventDefault(),l(e.id,e.title)}},a.createElement(pe.A,null)))))),0===n&&s&&a.createElement(zt.A,{colSpan:8,rowSpan:8,sx:{padding:0}},a.createElement("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",height:"calc(100vh - 250px)",justifyContent:"center"}},a.createElement(te.A,{variant:"h5"},"No Results"))),0===n&&!s&&a.createElement(zt.A,{colSpan:8,rowSpan:8,sx:{padding:0}},a.createElement("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",height:"calc(100vh - 250px)",justifyContent:"center"}},a.createElement(te.A,{variant:"h5"},`No${"is_favorites"===r?" starred":""} projects${"is_my"===r?" created by you":""}`),"is_favorites"===r?a.createElement("p",null,"Add stars to projects that you want to easily find later"):a.createElement("p",null,`Start adding${"is_my"===r?" your":""} projects by clicking the Add New Project button above`))),e.length{const[e,t]=(0,a.useState)([]),[n,i]=(0,a.useState)({page:1,view_by:"all"}),[l,o]=(0,a.useState)(-1),[r,s]=(0,a.useState)(1),[c,d]=(0,a.useState)(window.scrollY),[p,m]=(0,a.useState)(!0),[u,g]=(0,a.useState)({}),y=0!==Object.keys(u).length,{view_by:h,page:b,search:A,ordering:E,...v}=n,x=0!==Object.keys(v).length&&!Object.values(v).includes("All"),f=()=>{(0,J.hC)(n,"MYALVA").then(a=>{if(n?.page&&n.page!==r&&1!==n.page){const i=a?.data||[];t([...e,...i]),s(n.page)}else t(a?.data||[]);o(a?.count||0)})};(0,a.useEffect)(()=>{0!==Object.keys(n).length&&f()},[n]);const C=()=>{const e=document.getElementById("myalva-list-table").scrollTop;m(c>e),d(e)};return(0,a.useLayoutEffect)(()=>{const e=document.getElementById("myalva-list-table");return e.addEventListener("scroll",C,{passive:!0}),()=>{e.removeEventListener("scroll",C)}},[c,p]),a.createElement(U.A,{className:"project-list-page "+(p?"is-visible":"is-hidden"),style:{"--header-hide-offset":"-62px","--list-move-offset":"-93px","--container-padding":"0px"}},a.createElement(At.A,{onSearch:e=>{i({...n,search:e,page:1}),s(1)},type:"myAlva",styles:"header-transition",params:n,onParamsChange:(e,t)=>{if(n?.[e]!==t)if("All"===t){const{...t}=n;delete t[e],i({...t,page:1}),s(1)}else i(n=>({...n,[e]:t,page:1})),s(1)}}),a.createElement(Tt,{data:e,onViewMoreClicked:()=>{return e=r,void i({...n,page:e+1});var e},totalCount:l,listHeight:"list-transition",onAnalysisDelete:(e,t)=>g({id:e,title:t}),onProjectStarred:(n,a)=>{const i={id:n.id,model_type:"MyAlvaAnalysisFavorites",option_type:a?"Add":"Cancel"};(0,jt.Wf)(i).then(i=>{if(!0===i?.status){const i=e.findIndex(e=>e.id===n.id);t(e=>e.toSpliced(i,1,{...n,is_favorites:a}))}})},viewBy:h||"all",hasFilterOptions:x}),a.createElement(ne.A,{onClose:()=>g({}),open:y,transitionDuration:0},a.createElement(ae.A,null,"Delete Analysis Project"),a.createElement(ie.A,null,a.createElement($e.A,{id:"alert-dialog-description"},"Are you sure to delete the “",a.createElement("b",null,`${u?.title||""}`),"” project?"),a.createElement($e.A,{id:"alert-dialog-description"},"After deleting, you will not be able to restore the project and others won't be able to see the project in the system.")),a.createElement(le.A,null,a.createElement(ye.A,{text:"Cancel",color:"default",variant:"outlined",onClick:()=>g({})}),a.createElement(ye.A,{text:"Yes",color:"primary",onClick:()=>{return e=u.id,void(0,J.G8)(e,"MYALVA").then(e=>{e&&(f(),g({}))});var e}}))))};var Pt=n(52764),Bt=n(57599);const Mt=[{id:"filename",label:"File Name",type:"text"},{id:"status",label:"Status",type:"chip"},{id:"created_at",label:"Creation Date",type:"datetime"},{id:"expired_at",label:"File Expiration time",type:"datetime"}],Lt=[{id:"pending",label:"Generating",color:"#2254C5",background:"#EBF2FE"},{id:"done",label:"Generated",color:"#3A6C50",background:"#E3FEF2"},{id:"failed",label:"Generating failed",color:"#E55238",background:"#FBE8E5"},{id:"expired",label:"File expired",color:"#72624E",background:"#FAEDCC"}];var Nt=n(81724);const Wt=(0,wt.Ay)(zt.A)(()=>({[`&.${Rt.A.root}`]:{color:"#544744",borderBottom:"none"},[`&.${Rt.A.head}`]:{fontSize:"16px",backgroundColor:"#FFFFFF",borderBottom:"none"}})),Vt=()=>{const e=(0,l.useDispatch)(),[t,n]=(0,a.useState)([]),[i,o]=(0,a.useState)(-1),[r,s]=(0,a.useState)(""),[c,d]=(0,a.useState)(!1),[p,m]=(0,a.useState)({}),u=(0,l.useSelector)(Te.FZ),y=()=>{(0,jt.Rr)(p).then(e=>{e?.data&&void 0!==e?.count&&(n(e.data),o(e.count),0===e.data.filter(e=>"pending"===e.status).length&&d(!0))})};(0,a.useEffect)(()=>{let e;return c||(y(),e=setInterval(()=>{y()},1e3)),()=>clearInterval(e)},[c]),(0,a.useEffect)(()=>{const e=setTimeout(()=>{m({filename__icontains:r}),d(!1)},1e3);return()=>clearTimeout(e)},[r]);const h=t=>{"normal"===u&&t.preventDefault(),e((0,Te.A3)({analysisToDownload:"normal"}))};return a.createElement(ee.A,{direction:"column",spacing:1},a.createElement(Nt.A,{label:"Search",placeholder:"Search File Name",onChange:e=>s(e.target.value),startAdornment:a.createElement(A.A,{position:"start"},a.createElement(Pt.A,null)),endAdornment:a.createElement(A.A,{position:"end"},a.createElement(E.A,{onClick:()=>s(""),sx:{visibility:0===r.length?"hidden":"visible"}},a.createElement(Bt.A,{fontSize:"small"}))),style:{width:"300px",alignSelf:"end"},value:r}),a.createElement(xt.A,{key:"download-list-table",id:"download-list-table",style:{backgroundColor:"#FFFFFF",color:"#544744",position:"relative",width:"auto"}},a.createElement(Et.A,{stickyHeader:!0,"aria-label":"download-list-table"},a.createElement(ft.A,null,a.createElement(Ct.A,null,Mt.map(e=>a.createElement(Wt,{key:e.label},e.label)),a.createElement(Wt,null," "))),a.createElement(vt.A,null,0!==t.length&&t.map(e=>a.createElement(Ct.A,{key:e.id,to:e.id},Mt.map(t=>a.createElement(Wt,{align:"left",key:`${t.name}-${e.acid}-${t.id}`,style:{fontWeight:"acid"===t.id||"client"===t.id?"600":"400"}},((e,t)=>{if("datetime"===e)return(0,_e.kS)(t);if("text"===e)return t;const n=Lt.find(e=>e.id===t)||{};return a.createElement(re.A,{size:"medium",label:n.label,sx:{backgroundColor:`${n.background}`,color:`${n.color}`,height:"24px",fontSize:"14px",borderRadius:"8px"}})})(t.type,e[t.id]))),a.createElement(Wt,{align:"left"},"done"===e.status&&a.createElement(g.N_,{to:`${W.VY}api/v1/download/record/resource/${e.id}/`,download:e.id,target:"_blank",rel:"noreferrer",onClick:h},a.createElement(ye.A,{text:"Download",color:"primary",variant:"outlined",size:"small",style:{border:"none",fontWeight:"400"},hoverStyle:{border:"none"}})))))),0===i&&a.createElement(Wt,{colSpan:8,rowSpan:3,sx:{padding:0}},a.createElement("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",height:"calc(100vh - 250px)",justifyContent:"center"}},a.createElement(te.A,{variant:"h5"},"No Records"))))),a.createElement(Be.A,{isLoading:-1===i}))};var Gt=n(34588),qt=n(82077),Yt=n(50841),Ht=n(91759),Zt=n(27659),Ut=n(99845);const Jt=({onSearch:e,styles:t,params:n=_e.t0,onParamsChange:i=we(),headerInUse:l})=>{const o=(0,y.Zp)(),r=(0,y.zy)().pathname.split("/")[1]||"insight",[s,c]=(0,a.useState)(""),[d,p]=(0,a.useState)({}),m=l.filter(e=>e.sortable),[u,g]=(0,a.useState)([]),h="manual-sizeset"===r?"sizeset":"insight",b=m.map(e=>"creation_date"===e.id||"created_at"===e.id?{key:e.id,value:e.label,children:[{key:`-${e.id}`,value:"Newest first"},{key:e.id,value:"Oldest first"}]}:{key:e.id,value:e.label,children:[{key:e.id,value:"A-Z"},{key:`-${e.id}`,value:"Z-A"}]});return(0,a.useEffect)(()=>{const t=setTimeout(()=>{e(s)},1e3);return()=>clearTimeout(t)},[s]),(0,a.useEffect)(()=>{(0,dt.CF)().then(e=>{e?.results&&g(e.results)})},[]),a.createElement(ee.A,{spacing:1,direction:"column",className:t},a.createElement(U.A,{className:"project-list-header"},a.createElement("div",{className:"project-list-header title"},a.createElement(te.A,{variant:"h4",component:"h4"},"manual-sizeset"===r?"Manual Sizesets":"3D Model Insights"),a.createElement(Yt.A,{startIcon:a.createElement(qt.A,null),text:`Add New ${(0,_e.wR)(h)}`,color:"primary",onClick:()=>{(0,Gt.By)({title:`New ${(0,_e.wR)(h)}`,unit:"cm",unit_weight:"kg",type:"manual-sizeset"===r?"manual_sizeset":"3d_analysis"}).then(e=>{e&&o("./new")})}})),a.createElement("div",null,a.createElement(Nt.A,{label:"Search",placeholder:`Search ${(0,_e.wR)(h)} Name`,onChange:e=>c(e.target.value),startAdornment:a.createElement(A.A,{position:"start"},a.createElement(Pt.A,null)),endAdornment:a.createElement(A.A,{position:"end"},a.createElement(E.A,{onClick:()=>c(""),sx:{visibility:0===s.length?"hidden":"visible"}},a.createElement(Bt.A,{fontSize:"small"}))),style:{width:"300px"},value:s}))),a.createElement(ee.A,{direction:"row",justifyContent:"space-between",alignItems:"center",className:"filters-container"},a.createElement(ee.A,{spacing:1,direction:"row",className:"chips-container",alignItems:"center"},a.createElement(re.A,{size:"small",label:"All",onClick:()=>i("view_by","all"),className:"chip "+("all"===n?.view_by?"is-active":"")}),a.createElement(re.A,{size:"small",label:"Starred",onClick:()=>i("view_by","is_favorites"),className:"chip "+("is_favorites"===n?.view_by?"is-active":"")}),a.createElement(re.A,{size:"small",label:"My",onClick:()=>i("view_by","is_my"),className:"chip "+("is_my"===n?.view_by?"is-active":"")})),a.createElement(ee.A,{spacing:1,direction:"row"},a.createElement(Ut.A,{label:"Created by",field:"created_by__in",onChange:e=>i("created_by__in",e),options:u,selected:n?.created_by__in||[]}),a.createElement(Zt.A,{value:d,onChange:e=>{p(e),i("created_at__gte",e.datetime_gte),i("created_at__lte",e.datetime_lte)},type:"button"}),a.createElement(Ht.A,{label:"Sort by",field:"ordering",selected:n?.ordering||"-created_at",options:b,onChange:e=>i("ordering",e),hasSecondLevel:!0}))))};Jt.propTypes={onSearch:K().func.isRequired,styles:K().string.isRequired,params:K().instanceOf(Object),onParamsChange:K().func,headerInUse:K().instanceOf(Array).isRequired};const Qt=Jt,Xt=(0,wt.Ay)(zt.A)(()=>({[`&.${Rt.A.root}`]:{color:"#544744"},[`&.${Rt.A.head}`]:{fontSize:"16px"}})),Kt=(0,wt.Ay)(Ct.A)(()=>({height:"100px",width:"100%",borderRadius:"10px",position:"relative","&:hover":{"&::after":{content:'""',display:"block",position:"absolute",boxShadow:"0px 0px 3px 3px rgba(236, 119, 0, 0.66)",height:"calc(100% - 6px)",width:"calc(100% - 8px)",borderRadius:"10px",left:"3px",top:"3px"}},"&:nth-of-type(even)":{backgroundColor:"rgba(236, 119, 0, 0.05)"}})),en=({data:e,onViewMoreClicked:t,totalCount:n,listHeight:i,onAnalysisDelete:l,onProjectStarred:o,viewBy:r,hasFilterOptions:s,headerInUse:c})=>a.createElement(xt.A,{key:"avatar-list-table",id:"avatar-list-table",className:i,component:"div"},a.createElement(Et.A,{stickyHeader:!0,"aria-label":"avatar-list-table",component:"div"},a.createElement(ft.A,{component:"div"},a.createElement(Ct.A,{component:"div"},a.createElement(Xt,{component:"div"}," "),c.map(e=>a.createElement(Xt,{key:e.label,component:"div"},e.label)),a.createElement(Xt,{component:"div"}," "))),a.createElement(vt.A,{component:"div"},0!==e.length&&e.map(e=>a.createElement(Kt,{key:e.id,component:g.N_,to:`./${e.id}`,sx:{"#del-btn":{visibility:"hidden"},"&:hover":{"#del-btn":{visibility:"visible"}}}},a.createElement(Xt,{align:"left",component:"div"},a.createElement(E.A,{size:"small",sx:{color:"#5F504D",zIndex:1},onClick:t=>{t.preventDefault(),o(e,!e?.is_favorites)}},e?.is_favorites?a.createElement(kt.A,{fontSize:"small"}):a.createElement(St.A,{fontSize:"small"}))),c.map(t=>a.createElement(Xt,{align:"left",key:`${t.name}-${e.acid}-${t.id}`,style:{fontWeight:"acid"===t.id||"client"===t.id?"600":"400"},component:"div"},"created_by"===t.id?(0,Dt.eK)(e[t.id]):(0,Dt.X8)(t.id,e[t.id])||"N/A")),a.createElement(Xt,{align:"left",component:"div"},a.createElement(E.A,{id:"del-btn",size:"small",sx:{color:"#5F504D",zIndex:588},onClick:t=>{t.preventDefault(),l(e.id,e.title)}},a.createElement(pe.A,null)))))),0===n&&s&&a.createElement(zt.A,{colSpan:8,rowSpan:8,sx:{padding:0}},a.createElement("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",height:"calc(100vh - 250px)",justifyContent:"center"}},a.createElement(te.A,{variant:"h5"},"No Results"))),0===n&&!s&&a.createElement(zt.A,{colSpan:8,rowSpan:8,sx:{padding:0}},a.createElement("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",height:"calc(100vh - 250px)",justifyContent:"center"}},a.createElement(te.A,{variant:"h5"},`No${"is_favorites"===r?" starred":""} insights${"is_my"===r?" created by you":""}`),"is_favorites"===r?a.createElement("p",null,"Add stars to insights that you want to easily find later"):a.createElement("p",null,`Start adding${"is_my"===r?" your":""} insights by clicking the Add New Insights button above`))),e.length{const[e,t]=(0,a.useState)([]),[n,i]=(0,a.useState)({view_by:"all",page:1}),l=(0,y.zy)().pathname.split("/")[1]||"insight",o="manual-sizeset"===l?Dt.nh:Dt.Bk,[r,s]=(0,a.useState)(-1),[c,d]=(0,a.useState)(1),[p,m]=(0,a.useState)(window.scrollY),[u,g]=(0,a.useState)(!0),[h,b]=(0,a.useState)({}),A=0!==Object.keys(h).length,E="manual-sizeset"===l?"sizeset":"insight",{view_by:v,page:x,search:f,ordering:C,...w}=n,_=0!==Object.keys(w).length&&!Object.values(w).includes("All"),S=()=>{const a={...n};"manual-sizeset"===l&&(a.type="manual_sizeset"),(0,Gt.wD)(a).then(a=>{if(a){if(n?.page&&n.page!==c&&1!==n.page){const i=a?.data||[];t([...e,...i]),d(n.page)}else t(a?.data||[]);s(a?.count||0)}})};(0,a.useEffect)(()=>{0!==Object.keys(n).length&&S()},[n]);const k=()=>{const e=document.getElementById("avatar-list-table");if(e.getElementsByClassName("MuiTable-root")[0].offsetHeight>e.offsetHeight+200){const t=e.scrollTop;g(p>t),m(t)}};return(0,a.useLayoutEffect)(()=>{const e=document.getElementById("avatar-list-table");return e.addEventListener("scroll",k,{passive:!0}),()=>{e.removeEventListener("scroll",k)}},[p,u]),a.createElement(U.A,{className:"project-list-page "+(u?"is-visible":"is-hidden"),style:{"--header-hide-offset":"-62px","--list-move-offset":"-93px"}},a.createElement(Qt,{onSearch:e=>{i({...n,search:e,page:1}),d(1)},styles:"header-transition",params:n,onParamsChange:(e,t)=>{if(n?.[e]!==t)if("All"===t){const{...t}=n;delete t[e],i({...t,page:1}),d(1)}else i(n=>({...n,[e]:t,page:1})),d(1)},headerInUse:o}),a.createElement(tn,{data:e,onViewMoreClicked:()=>{return e=c,void i({...n,page:e+1});var e},totalCount:r,listHeight:"list-transition",viewBy:v||"all",onAnalysisDelete:(e,t)=>b({id:e,title:t}),hasFilterOptions:_,onProjectStarred:(e,t)=>{const n={id:e.id,model_type:"Insights3DFavorites",option_type:t?"Add":"Cancel"};(0,jt.Wf)(n).then(e=>{!0===e?.status&&S()})},headerInUse:o}),a.createElement(ne.A,{onClose:()=>b({}),open:A,transitionDuration:0},a.createElement(ae.A,null,`Delete ${(0,_e.wR)(E)}`),a.createElement(ie.A,null,a.createElement($e.A,{id:"alert-dialog-description"},'Are you sure to delete the "',a.createElement("b",null,h?.title||""),`" ${E}?`),a.createElement($e.A,{id:"alert-dialog-description"},`After deleting, you will not be able to restore the ${E} and others won't be able to see the ${E} in the system.`)),a.createElement(le.A,null,a.createElement(ye.A,{text:"Cancel",color:"default",variant:"outlined",onClick:()=>b({})}),a.createElement(ye.A,{text:"Yes",color:"primary",onClick:()=>{return e=h.id,void(0,Gt.xx)(e).then(e=>{e&&(S(),b({}))});var e}}))))};var an=n(43952),ln=n(5744),on=n(15548),rn=n(96224),sn=n(4710);const cn=()=>{const[e,t]=(0,a.useState)([]),[n,i]=(0,a.useState)(1),[l,o]=(0,a.useState)(0);return(0,a.useEffect)(()=>{var e;e=n,(0,jt.sT)({page_size:5,page:e}).then(e=>{if(e?.status){const n=e?.data||[];t(e=>[...e,...n]),o(e?.count||0)}})},[n]),a.createElement(U.A,{sx:{width:"100vw",height:"100vh"}},a.createElement(d.A,{theme:m.w},a.createElement(ln.A,{sx:{justifyContent:"center",backgroundColor:"#FFFFFF",height:"41px",padding:"0 10px",boxShadow:"none",borderBottom:"1px #ccc solid",alignItems:"center"}},a.createElement(rn.A,{disableGutters:!0,sx:{justifyContent:"space-between",minHeight:"40px !important",width:"700px"}},a.createElement(ee.A,{direction:"row",spacing:1,alignItems:"center"},a.createElement("img",{className:"logo-container",alt:"logo",src:V,style:{height:"40px",width:"125.71px"}}),a.createElement(te.A,{variant:"h6"},"Alvanon"),a.createElement(te.A,{variant:"body1"},"Changelog"),a.createElement(re.A,{size:"small",label:"uat".toUpperCase(),sx:{height:"20px",backgroundColor:"rgba(236, 119, 0, 0.1)",color:"#EC7700",fontWeight:700,borderRadius:"4px",".MuiChip-label":{padding:"0 8px",marginTop:"1px",letterSpacing:"1px",fontSize:"12px"}}})))),a.createElement(ee.A,{sx:{padding:"20px",overflowY:"scroll"}},a.createElement(ee.A,{direction:"column",spacing:4,sx:{margin:"100px auto",width:"1000px"}},e.map((e,t)=>a.createElement(a.Fragment,null,0!==t&&a.createElement(on.A,null),a.createElement(ee.A,{key:`note-${e.id}`,direction:"row",spacing:1,alignItems:"flex-start",justifyContent:"end"},a.createElement(te.A,{color:"disabled",variant:"h6",sx:{}},new Date(e?.date||void 0).toLocaleDateString(void 0,{month:"long",day:"numeric",year:"numeric"})),a.createElement(ee.A,{direction:"column",spacing:1,sx:{width:"750px"}},a.createElement(te.A,{variant:"h6",sx:{fontSize:"24px"}},e?.title||""),a.createElement(re.A,{color:"primary",size:"small",label:new Date(e?.date||void 0).toLocaleDateString(void 0,{month:"short"}),sx:{color:"#FFFFFF",height:"18px",maxWidth:"50px"}}),a.createElement(U.A,{className:"markdown-preview",sx:{display:"inline-block",marginLeft:"5px","& h1":{fontSize:"2rem",fontWeight:"bold"},"& h2":{fontSize:"1.5rem",fontWeight:"bold"},"& h3":{fontSize:"1.25rem",fontWeight:"bold"},"& pre":{backgroundColor:"grey.100",p:2,borderRadius:1,overflow:"auto"},"& blockquote":{borderLeft:"4px solid",borderColor:"primary.main",pl:2,ml:0,fontStyle:"italic",color:"text.secondary"}}},a.createElement(an.oz,{components:{a:sn._}},e?.content||"")),e?.attachments&&0!==e.attachments.length&&a.createElement("img",{src:e.attachments,alt:"New feature sample",style:{width:"100%",height:"auto"}}))))),l>e.length&&a.createElement(h.A,{color:"primary",endIcon:a.createElement(_t.A,null),onClick:()=>i(e=>e+1),sx:{width:"100%",height:"60px"}},"Show previous changelogs")))))},dn=()=>{const e=(0,l.useDispatch)();(0,W.Cz)();const t=(e,n=2)=>async()=>{try{return await e()}catch(a){if(n>0)return await new Promise(e=>{setTimeout(e,1e3)}),t(e,n-1)();throw a}},i=async({request:t})=>{const n=new URL(t.url),a="/login"===n.pathname,i=await(0,C.Cl)();if(i){if(e((0,f.Jv)(i)),(0,W.Cz)(),a){const e=(0,M.h)(i.permissions||[]);return(0,u.V2)(e)}return i}if(a)return null;const l=n.pathname+n.search;return(0,u.V2)(`/login?from=${encodeURIComponent(l)}`)},o=(0,g.Ys)([{path:"/login",element:a.createElement(N,null)},{path:"/",loader:i,lazy:async()=>{const{default:e}=await t(()=>Promise.all([n.e(243),n.e(1587)]).then(n.bind(n,1587)))();return{Component:e}},errorElement:a.createElement(G,null),children:[{index:!0,lazy:()=>t(()=>n.e(1807).then(n.bind(n,51807)))().then(e=>({Component:e.default}))},{path:"/:id",lazy:async()=>{const{default:e}=await t(()=>Promise.all([n.e(243),n.e(5279),n.e(9870)]).then(n.bind(n,69268)))();return{Component:e}},children:[{path:"scans",element:a.createElement(q,null),children:[{index:!0,lazy:()=>t(()=>Promise.all([n.e(243),n.e(7179)]).then(n.bind(n,37179)))().then(e=>({Component:e.default}))},{path:":scanid",element:a.createElement(Ze,null),children:[{index:!0,lazy:()=>t(()=>Promise.all([n.e(243),n.e(6311),n.e(9679),n.e(8674),n.e(7316),n.e(2763),n.e(6275),n.e(8706),n.e(9176),n.e(159),n.e(4113),n.e(1601),n.e(7024),n.e(5639),n.e(3895),n.e(4484),n.e(5810),n.e(8952),n.e(572),n.e(9889),n.e(556)]).then(n.bind(n,70556)))().then(e=>({Component:e.default}))},{path:"sp",lazy:async()=>{const{default:e}=await t(()=>Promise.all([n.e(243),n.e(6311),n.e(9679),n.e(8674),n.e(7316),n.e(2763),n.e(6275),n.e(8706),n.e(9176),n.e(159),n.e(4113),n.e(1601),n.e(7024),n.e(5639),n.e(3895),n.e(4484),n.e(5810),n.e(8952),n.e(2879),n.e(4189)]).then(n.bind(n,54189)))();return{element:a.createElement(e,{source:"PROJECT_VIEW"})}}},{path:"dc",lazy:async()=>{const{default:e}=await t(()=>Promise.all([n.e(243),n.e(6311),n.e(9679),n.e(8674),n.e(7316),n.e(2763),n.e(6275),n.e(8706),n.e(9176),n.e(159),n.e(4113),n.e(1601),n.e(7024),n.e(5639),n.e(3895),n.e(4484),n.e(5810),n.e(8952),n.e(2879),n.e(2510)]).then(n.bind(n,32510)))();return{element:a.createElement(e,{source:"PROJECT_VIEW"})}}},{path:"dt",lazy:()=>t(()=>Promise.all([n.e(243),n.e(6829)]).then(n.bind(n,26829)))().then(e=>({Component:e.default}))},{path:"m4m",lazy:()=>t(()=>Promise.all([n.e(243),n.e(4560)]).then(n.bind(n,24560)))().then(e=>({Component:e.default}))},{path:"mc",lazy:()=>t(()=>Promise.all([n.e(243),n.e(6311),n.e(9679),n.e(8674),n.e(7316),n.e(2763),n.e(6275),n.e(8706),n.e(9176),n.e(159),n.e(4113),n.e(1601),n.e(7024),n.e(5639),n.e(3895),n.e(4484),n.e(5853),n.e(8197),n.e(5810),n.e(8952),n.e(9889),n.e(1265)]).then(n.bind(n,24637)))().then(e=>({Component:e.default}))}]}]},{path:"overview",element:a.createElement(Y,null),children:[{index:!0,lazy:()=>t(()=>Promise.all([n.e(243),n.e(3097)]).then(n.bind(n,43097)))().then(e=>({Component:e.default}))},{path:"new",lazy:()=>t(()=>Promise.all([n.e(243),n.e(5279),n.e(4164)]).then(n.bind(n,13302)))().then(e=>({Component:e.default}))},{path:"/:id/overview/:overviewId",lazy:()=>t(()=>Promise.all([n.e(243),n.e(6311),n.e(9679),n.e(8674),n.e(7316),n.e(2763),n.e(6275),n.e(8706),n.e(9176),n.e(159),n.e(4113),n.e(1601),n.e(7024),n.e(5639),n.e(3895),n.e(4484),n.e(5810),n.e(8952),n.e(6094)]).then(n.bind(n,56094)))().then(e=>({Component:e.default}))},{path:"/:id/overview/:overviewId/edit",lazy:()=>t(()=>Promise.all([n.e(243),n.e(5279),n.e(4164)]).then(n.bind(n,13302)))().then(e=>({Component:e.default}))}]},{path:"sbs",lazy:async()=>{const{default:e}=await t(()=>n.e(7906).then(n.bind(n,67906)))();return{Component:e}},children:[{index:!0,lazy:()=>t(()=>Promise.all([n.e(243),n.e(5279),n.e(3817),n.e(461)]).then(n.bind(n,90461)))().then(e=>({Component:e.default}))},{path:"data-management",element:a.createElement(Ue,null),children:[{index:!0,lazy:()=>t(()=>Promise.all([n.e(243),n.e(5279),n.e(3817),n.e(3973)]).then(n.bind(n,13973)))().then(e=>({Component:e.default}))},{path:"new",lazy:()=>t(()=>n.e(7073).then(n.bind(n,57073)))().then(e=>({Component:e.default}))},{path:"edit/:groupId",lazy:()=>t(()=>n.e(7073).then(n.bind(n,57073)))().then(e=>({Component:e.default}))}]}]},{path:"history",lazy:()=>t(()=>n.e(1807).then(n.bind(n,51807)))().then(e=>({Component:e.default}))}]},{path:"/new",lazy:()=>t(()=>Promise.all([n.e(243),n.e(5279),n.e(9870)]).then(n.bind(n,69268)))().then(e=>({Component:e.default}))},{path:"/data-query",lazy:()=>t(()=>Promise.all([n.e(243),n.e(5279),n.e(7355)]).then(n.bind(n,27207)))().then(e=>({Component:e.default}))},{path:"/dataset-profiler",lazy:()=>t(()=>Promise.all([n.e(243),n.e(5279),n.e(6311),n.e(9679),n.e(8674),n.e(7316),n.e(2763),n.e(6275),n.e(8706),n.e(9176),n.e(159),n.e(4113),n.e(1601),n.e(7024),n.e(5639),n.e(3895),n.e(4484),n.e(5810),n.e(8952),n.e(9992)]).then(n.bind(n,88010)))().then(e=>({Component:e.default}))},{path:"/3d-model",lazy:async()=>{const{default:e}=await t(()=>n.e(4541).then(n.bind(n,44541)))();return{Component:e}},children:[{index:!0,element:a.createElement(nn,null)},{path:"new",lazy:()=>t(()=>Promise.all([n.e(243),n.e(6311),n.e(9679),n.e(8674),n.e(7316),n.e(2763),n.e(6275),n.e(8706),n.e(9176),n.e(159),n.e(4113),n.e(1601),n.e(7024),n.e(5639),n.e(3895),n.e(4484),n.e(1628),n.e(8565),n.e(1155),n.e(2254),n.e(4756),n.e(1038),n.e(3921),n.e(2709),n.e(3149),n.e(5810),n.e(6287),n.e(8952),n.e(498),n.e(8388)]).then(n.bind(n,28388)))().then(e=>({Component:e.default}))},{path:":id",lazy:()=>t(()=>Promise.all([n.e(243),n.e(6311),n.e(9679),n.e(8674),n.e(7316),n.e(2763),n.e(6275),n.e(8706),n.e(9176),n.e(159),n.e(4113),n.e(1601),n.e(7024),n.e(5639),n.e(3895),n.e(4484),n.e(1628),n.e(8565),n.e(1155),n.e(2254),n.e(4756),n.e(1038),n.e(3921),n.e(2709),n.e(3149),n.e(5810),n.e(6287),n.e(8952),n.e(498),n.e(8388)]).then(n.bind(n,28388)))().then(e=>({Component:e.default}))}]},{path:"/manual-sizeset",lazy:async()=>{const{default:e}=await t(()=>n.e(4541).then(n.bind(n,44541)))();return{Component:e}},children:[{index:!0,element:a.createElement(nn,null)},{path:"new",lazy:()=>t(()=>Promise.all([n.e(243),n.e(6311),n.e(9679),n.e(8674),n.e(7316),n.e(2763),n.e(6275),n.e(8706),n.e(9176),n.e(159),n.e(4113),n.e(1601),n.e(7024),n.e(5639),n.e(3895),n.e(4484),n.e(1628),n.e(8565),n.e(1155),n.e(2254),n.e(4756),n.e(1038),n.e(3921),n.e(2709),n.e(3149),n.e(5810),n.e(6287),n.e(8952),n.e(498),n.e(8388)]).then(n.bind(n,28388)))().then(e=>({Component:e.default}))},{path:":id",lazy:()=>t(()=>Promise.all([n.e(243),n.e(6311),n.e(9679),n.e(8674),n.e(7316),n.e(2763),n.e(6275),n.e(8706),n.e(9176),n.e(159),n.e(4113),n.e(1601),n.e(7024),n.e(5639),n.e(3895),n.e(4484),n.e(1628),n.e(8565),n.e(1155),n.e(2254),n.e(4756),n.e(1038),n.e(3921),n.e(2709),n.e(3149),n.e(5810),n.e(6287),n.e(8952),n.e(498),n.e(8388)]).then(n.bind(n,28388)))().then(e=>({Component:e.default}))}]},{path:"/admin",lazy:async()=>{const{default:e}=await t(()=>n.e(3434).then(n.bind(n,83434)))();return{Component:e}},children:[{path:"user-management",lazy:()=>t(()=>Promise.all([n.e(243),n.e(5279),n.e(1755)]).then(n.bind(n,75191)))().then(e=>({Component:e.default}))},{path:"client-management",lazy:()=>t(()=>Promise.all([n.e(243),n.e(5279),n.e(3667)]).then(n.bind(n,58511)))().then(e=>({Component:e.default}))},{path:"role-management",lazy:()=>t(()=>Promise.all([n.e(243),n.e(5279),n.e(1337),n.e(6349)]).then(n.bind(n,84269)))().then(e=>({Component:e.default}))}]},{path:"/sys-admin",lazy:async()=>{const{default:e}=await t(()=>n.e(3485).then(n.bind(n,53485)))();return{Component:e}},children:[{path:"organization",element:a.createElement(Je,null),children:[{index:!0,lazy:()=>t(()=>Promise.all([n.e(243),n.e(5279),n.e(1337),n.e(8875)]).then(n.bind(n,81431)))().then(e=>({Component:e.default}))},{path:":orgid",id:"orgs",element:a.createElement(at,null),shouldRevalidate:({currentUrl:e})=>e.pathname.includes("info"),loader:async({params:e})=>(0,yt.F6)(e.orgid),children:[{path:"info",lazy:()=>t(()=>Promise.all([n.e(1337),n.e(1070)]).then(n.bind(n,21070)))().then(e=>({Component:e.default}))},{path:"user",lazy:()=>t(()=>Promise.all([n.e(243),n.e(5279),n.e(9461)]).then(n.bind(n,95989)))().then(e=>({Component:e.default}))},{path:"role",lazy:()=>t(()=>Promise.all([n.e(243),n.e(5279),n.e(1337),n.e(6349)]).then(n.bind(n,84269)))().then(e=>({Component:e.default}))}]}]},{path:"/sys-admin/release-notes",lazy:()=>t(()=>Promise.all([n.e(243),n.e(5279),n.e(331)]).then(n.bind(n,75735)))().then(e=>({Component:e.default}))},{path:"/sys-admin/myalva-project",lazy:()=>t(()=>Promise.all([n.e(243),n.e(5279),n.e(3494)]).then(n.bind(n,47692)))().then(e=>({Component:e.default}))}]},{path:"analysis",lazy:async()=>{const{default:e}=await t(()=>n.e(9855).then(n.bind(n,19855)))();return{Component:e}},children:[{index:!0,element:a.createElement($t,null)},{path:"/analysis/:id",element:a.createElement(bt,null),children:[{index:!0,lazy:()=>t(()=>Promise.all([n.e(6311),n.e(9679),n.e(8674),n.e(7316),n.e(2763),n.e(6275),n.e(8706),n.e(9176),n.e(159),n.e(4113),n.e(1601),n.e(7024),n.e(5639),n.e(3895),n.e(4484),n.e(5810),n.e(8952),n.e(572),n.e(9473)]).then(n.bind(n,39473)))().then(e=>({Component:e.default}))},{path:"mc",lazy:async()=>{const{default:e}=await t(()=>Promise.all([n.e(243),n.e(6311),n.e(9679),n.e(8674),n.e(7316),n.e(2763),n.e(6275),n.e(8706),n.e(9176),n.e(159),n.e(4113),n.e(1601),n.e(7024),n.e(5639),n.e(3895),n.e(4484),n.e(5810),n.e(8952),n.e(2879),n.e(4189)]).then(n.bind(n,54189)))();return{element:a.createElement(e,{source:"MYALVA"})}}},{path:"dc",lazy:async()=>{const{default:e}=await t(()=>Promise.all([n.e(243),n.e(6311),n.e(9679),n.e(8674),n.e(7316),n.e(2763),n.e(6275),n.e(8706),n.e(9176),n.e(159),n.e(4113),n.e(1601),n.e(7024),n.e(5639),n.e(3895),n.e(4484),n.e(5810),n.e(8952),n.e(2879),n.e(2510)]).then(n.bind(n,32510)))();return{element:a.createElement(e,{source:"MYALVA"})}}},{path:"avatars",lazy:()=>t(()=>Promise.all([n.e(243),n.e(1628),n.e(8565),n.e(1155),n.e(2254),n.e(4756),n.e(1038),n.e(3921),n.e(2709),n.e(3149),n.e(6287),n.e(498),n.e(4917)]).then(n.bind(n,14917)))().then(e=>({Component:e.default}))}]}]},{path:"user-settings",lazy:async()=>{const{default:e}=await t(()=>n.e(1433).then(n.bind(n,71433)))();return{Component:e}},children:[{path:"my",element:a.createElement(gt,null)},{path:"downloads",element:a.createElement(Vt,null)}]},{path:"myalva-overview",lazy:()=>t(()=>Promise.all([n.e(243),n.e(6311),n.e(9679),n.e(8674),n.e(7316),n.e(2763),n.e(6275),n.e(8706),n.e(9176),n.e(159),n.e(4113),n.e(1601),n.e(7024),n.e(5639),n.e(3895),n.e(4484),n.e(1628),n.e(8565),n.e(1155),n.e(2254),n.e(4756),n.e(1038),n.e(3921),n.e(2709),n.e(3149),n.e(5810),n.e(6287),n.e(8952),n.e(498),n.e(2210)]).then(n.bind(n,12210)))().then(e=>({Component:e.default}))},{path:"avatar-comparison",lazy:()=>t(()=>Promise.all([n.e(243),n.e(6311),n.e(9679),n.e(8674),n.e(7316),n.e(2763),n.e(6275),n.e(8706),n.e(9176),n.e(159),n.e(4113),n.e(1601),n.e(7024),n.e(5639),n.e(3895),n.e(4484),n.e(1628),n.e(8565),n.e(1155),n.e(2254),n.e(4756),n.e(1038),n.e(3921),n.e(2709),n.e(3149),n.e(5810),n.e(6287),n.e(8952),n.e(498),n.e(6285)]).then(n.bind(n,36285)))().then(e=>({Component:e.default}))}]},{path:"/release-notes",loader:i,element:a.createElement(cn,null)}]);return a.createElement(g.pg,{router:o,fallbackElement:a.createElement(Be.A,{isLoading:!0}),future:{v7_startTransition:!0,v7_relativeSplatPath:!0}})};var pn=n(14654),mn=n(61221),un={};un.styleTagTransform=$(),un.setAttributes=F(),un.insert=D().bind(null,"head"),un.domAPI=z(),un.insertStyleElement=T(),S()(mn.A,un),mn.A&&mn.A.locals&&mn.A.locals;const gn=document.querySelector("#root");(0,i.H)(gn).render(a.createElement(l.Provider,{store:pn.M},a.createElement(c.Q,{loading:null,persistor:pn.q},a.createElement(r.$,{dateAdapter:s.R},a.createElement(d.A,{theme:m.w},a.createElement(p.A,null),a.createElement(dn,null))),a.createElement(o.Ay,{timeOut:5e3,newestOnTop:!1,preventDuplicates:!0,position:"bottom-right",getState:e=>e.toastr,transitionIn:"fadeIn",transitionOut:"fadeOut"}))))},82881(e,t,n){n.d(t,{A:()=>C});var a=n(96540),i=n(5556),l=n.n(i),o=n(45549),r=n(60431),s=n(55370),c=n(85916),d=n(25418),p=n(57862),m=n(43760),u=n(60440),g=n(32483),y=n(53830),h=n(35124),b=n(7308),A=n(72456),E=n(40665),v=n(50540),x=n(93710);const f=({error:e=!1,value:t,onValueChange:n,style:i=x.t0,isPopulation:l=!1,disabled:f=!1,isSingleAvatar:C=!1,isComparison:w=!1})=>{const[_,S]=(0,a.useState)(!1),[k,z]=(0,a.useState)({}),[R,D]=(0,a.useState)([]),[O,F]=(0,a.useState)([]),[I,T]=(0,a.useState)([]),[j,$]=(0,a.useState)(""),P=I.sort((e,t)=>e.body_type.localeCompare(t.body_type))||[],B=(e,t)=>{(0,E.c_)(e).then(e=>{if(e?.data){const n=e.data.map(e=>({...e,key:e?.id||e.vbid,value:e?.name||`${e.vbid} (${e.size})${e?.is_active?"":" - Inactive"}`,group:e?.body_type||""}))||[];"size_set"===t?F(n):"vbids"===t?T(n):D(n)}})};(0,a.useEffect)(()=>{B({},"brand"),z(t),t?.brand&&l&&t.brand!==k?.brand&&B({brand:t.brand?.id||t.brand},"size_set"),t?.size_set&&l&&t?.size_set!==k?.size_set&&B({brand:t.brand?.id||t.brand,size_set:t.size_set?.id||t.size_set,show_inactive:w},"vbids")},[t,l,w]);const M=(e,t)=>{const a={...k};if("brand"===e)z({[e]:t}),F([]),T([]),B({brand:t.id},"size_set"),l&&n({[e]:t});else if("size_set"===e)z({brand:a.brand,size_set:t}),T([]),B({brand:a.brand.id,size_set:t.id,show_inactive:w},"vbids"),l&&n({brand:a.brand,size_set:t});else{const i=P.filter(e=>t.includes(e.value));z(t=>({...t,[e]:i})),l&&n({brand:a.brand,size_set:a.size_set,[e]:i})}};return l?a.createElement(y.A,{direction:"column",spacing:2},a.createElement(A.A,{sx:{m:1,minWidth:200},field:"Brand*",value:R.find(e=>e.id===k?.brand||e.id===k?.brand?.id)||"",onChange:(e,t)=>M("brand",t),options:R}),a.createElement(A.A,{sx:{m:1,minWidth:200},field:"Sizeset*",value:O.find(e=>e.id===k?.size_set||e.id===k?.size_set?.id)||"",onChange:(e,t)=>M("size_set",t),options:O}),C?a.createElement(v.A,{sx:{m:1,minWidth:200},field:"Size",value:k?.vbid?.value?k.vbid.value:P.find(e=>k?.vbid===e.key)?.value||[],onChange:e=>M("vbid",e),group:"group",options:P}):a.createElement(v.A,{sx:{m:1,minWidth:200},field:"Size",value:k?.vbids?.[0]?.vbid?k?.vbids.map(e=>e.value):P.filter(e=>k?.vbids?.includes(e.key)).map(e=>e.value)||[],onChange:e=>M("vbids",e),multiple:!0,group:"group",options:P}),0!==j.length&&a.createElement(h.A,{variant:"caption",sx:{color:"#FB4E3B"}},j)):a.createElement(y.A,{direction:"column",sx:{width:250,"#size-set-clear-btn":{visibility:"hidden"},"&:hover":{"#size-set-clear-btn":{visibility:0===Object.keys(k).length?"hidden":"visible"}}}},a.createElement(y.A,{direction:"row",justifyContent:"space-between"},a.createElement(m.A,{disabled:f},"Sizeset"),a.createElement(g.A,{disabled:f,id:"size-set-clear-btn",onClick:()=>n({}),sx:{width:"20px",height:"20px"}},a.createElement(u.A,null,a.createElement(o.A,{sx:{width:"20px",height:"20px",color:"#5F504D"}})))),a.createElement(r.A,{onClick:()=>S(!0),disabled:f,sx:{marginTop:"4.5px",padding:"0 12px",textTransform:"none",minHeight:"40px",borderRadius:"10px",marginRight:"10px",backgroundColor:"#F9F9F9",border:"1px solid "+(e?"#FB4E3B":"#D9D9D9"),boxShadow:"inset 0px 0px 5px "+(e?"#FB4E3B":"#00000038"),width:225,fontWeight:"400",fontSize:"14px",boxSizing:"content-box",color:"#000000",justifyContent:"start",...i}},`${k?.brand?.name||""} ${k?.brand?.name&&k?.size_set?.name?"-":""} ${k?.size_set?.name||""}`),a.createElement(s.A,{open:_,maxWidth:"md",transitionDuration:0},a.createElement(c.A,null,"Add New Sizeset"),a.createElement(d.A,null,a.createElement(y.A,{direction:"column",spacing:2},a.createElement(A.A,{sx:{m:1,minWidth:200},field:"Brand*",value:k?.brand||"",onChange:(e,t)=>M("brand",t),options:R}),a.createElement(A.A,{sx:{m:1,minWidth:200},field:"Sizeset*",value:k?.size_set||"",onChange:(e,t)=>M("size_set",t),options:O}),a.createElement(v.A,{sx:{m:1,minWidth:200},field:"Size",value:k?.vbids?.map(e=>e?.value)||[],onChange:e=>M("vbids",e),multiple:!0,group:"group",options:P}),0!==j.length&&a.createElement(h.A,{variant:"caption",sx:{color:"#FB4E3B"}},j))),a.createElement(p.A,null,a.createElement(b.A,{variant:"outlined",color:"default",text:"Cancel",onClick:()=>{$(""),z(t),S(!1)}}),a.createElement(b.A,{color:"primary",text:"Save",onClick:()=>{Object.keys(k).length>1?($(""),n(k),S(!1)):$("Please select a sizeset to continue")}}))))};f.propTypes={error:l().bool,value:l().oneOfType([l().string,l().instanceOf(Object)]).isRequired,onValueChange:l().func.isRequired,style:l().instanceOf(Object),isPopulation:l().bool,disabled:l().bool,isSingleAvatar:l().bool,isComparison:l().bool};const C=f},27659(e,t,n){n.d(t,{A:()=>j});var a=n(96540),i=n(74353),l=n.n(i),o=n(5556),r=n.n(o),s=n(22687),c=n(76647),d=n(1812),p=n(88569),m=n.n(p),u=n(83826),g=n.n(u),y=n(34477),h=n(60440),b=n(30073),A=n(7527),E=n(95884),v=n(16738),x=n(42116),f=n(58132),C=n(88634),w=n(53830),_=n(49068),S=n(60431),k=n(1642),z=n(93688),R=n(93951),D=n(7308),O=n(14654),F=n(94972);l().extend(g()),l().extend(m());const I=(0,k.A)({...F.w,components:{MuiPickersDay:{styleOverrides:{root:{color:"#5F504D",borderRadius:"20px",backgroundColor:"transparent","&:hover":{backgroundColor:"rgba(236, 119, 0, 0.1)"},"&.Mui-selected":{backgroundColor:"#EC7700",color:"#FFFFFF","&:hover, &:focus":{backgroundColor:"#EC7700"}}}}}}}),T=({value:e,onChange:t,type:n="input",page:i="consultant",disabled:o=!1})=>{const[r,p]=(0,a.useState)(null),m=Boolean(r),[u,g]=(0,a.useState)({}),k=e?.title||"All",F=O.M.getState().auth.currentUser.timezone||l().tz.guess();l().tz.setDefault(F);const T=(e=>({all:{title:"All",datetime_gte:"",datetime_lte:""},today:{title:"Today",datetime_gte:l()().tz(e).startOf("day").toISOString(),datetime_lte:""},last7:{title:"Last 7 days",datetime_gte:l()().tz(e).startOf("day").subtract(7,"days").toISOString(),datetime_lte:""},last30:{title:"Last 30 days",datetime_gte:l()().tz(e).startOf("day").subtract(30,"days").toISOString(),datetime_lte:""},thisYear:{title:"This Year",datetime_gte:l()().tz(e).startOf("year").toISOString(),datetime_lte:""},lastYear:{title:"Last Year",datetime_gte:l()().tz(e).subtract(1,"year").startOf("year").toISOString(),datetime_lte:l()().tz(e).subtract(1,"year").endOf("year").toISOString()}}))(F),j=(e=>({title:"Custom Range",datetime_gte:l()().tz(e).startOf("day"),datetime_lte:l()().tz(e).endOf("day")}))(F);return(0,a.useEffect)(()=>{g(e)},[e]),a.createElement(z.A,{theme:I},"button"===n?a.createElement(S.A,{id:"time-range-picker-toggle","aria-controls":m?"time-range-picker":void 0,"aria-haspopup":"true","aria-expanded":m?"true":void 0,onClick:e=>p(e.currentTarget),endIcon:a.createElement(d.A,null),color:"primary",size:"small",disabled:o,sx:{textTransform:"none",".MuiButton-icon":{marginLeft:"0"}}},`${"consultant"===i?"Open":"Creation"} Date: ${k}`):a.createElement("div",null,a.createElement(_.A,{style:{boxSizing:"border-box",marginBottom:"4px"}},"Time"),a.createElement(f.A,{label:"",name:"rangePicker",variant:"outlined",placeholder:"Select Range",onClick:e=>{p(e.currentTarget)},sx:{borderRadius:"10px",marginRight:"10px",backgroundColor:"#F9F9F9",border:"1px solid #D9D9D9",boxShadow:"inset 0px 0px 5px #00000038",width:"249px",".MuiInputBase-root":{height:"40px",fieldset:{border:"none"}}},inputProps:{autoComplete:"off"},value:k,InputProps:{endAdornment:a.createElement(C.A,{position:"end"},a.createElement(h.A,null,a.createElement(s.A,null)))}})),m&&a.createElement(x.Ay,{id:"time-range-picker",open:m,anchorEl:r,onClose:()=>p(null),anchorOrigin:{vertical:"bottom",horizontal:"left"},slotProps:{paper:{"aria-labelledby":"time-range-picker-toggle"}}},a.createElement(y.A,{sx:{display:"flex",width:"Custom Range"===u?.title?"530px":"249px"}},a.createElement(y.A,{sx:{minWidth:"249px",mr:1,pr:1,borderRight:"Custom Range"===u?.title?"1px solid rgba(0,0,0,0.1)":"none"}},a.createElement(b.A,{sx:{p:"8px 0"}},Object.keys(T).map(e=>a.createElement(A.Ay,{key:e,disablePadding:!0,onClick:()=>{return n=T[e],p(null),void t(n);var n}},a.createElement(E.A,{sx:{paddingTop:"4px",paddingBottom:"4px"}},a.createElement(v.A,{primary:T[e].title})))),a.createElement(A.Ay,{disablePadding:!0,onClick:()=>g(j)},a.createElement(E.A,{sx:{paddingTop:"4px",paddingBottom:"4px"}},a.createElement(v.A,{primary:"Custom Range"}),a.createElement(c.A,null))))),"Custom Range"===u?.title&&a.createElement(w.A,{direction:"column",spacing:2,p:2},a.createElement("div",null,a.createElement(_.A,{style:{display:"inline-block",boxSizing:"border-box",marginRight:"5px"}},"Start Time"),a.createElement(R.l,{timezone:F,value:l().utc(u.datetime_gte||void 0),onChange:e=>g(t=>({...t,datetime_gte:e})),slotProps:{textField:{size:"small",sx:{padding:"0 15px",borderRadius:"10px",marginRight:"10px",backgroundColor:"#F9F9F9",border:"1px solid #D9D9D9",boxShadow:"inset 0px 0px 5px #00000038",width:"200px",".MuiInputBase-root":{height:"40px",fieldset:{border:"none"}}}}}})),a.createElement("div",null,a.createElement(_.A,{style:{display:"inline-block",boxSizing:"border-box",marginRight:"5px"}},"End Time"),a.createElement(R.l,{timezone:F,value:l().utc(u.datetime_lte||void 0),onChange:e=>g(t=>({...t,datetime_lte:e})),slotProps:{textField:{size:"small",sx:{padding:"0 15px",borderRadius:"10px",marginRight:"10px",backgroundColor:"#F9F9F9",border:"1px solid #D9D9D9",boxShadow:"inset 0px 0px 5px #00000038",width:"200px",".MuiInputBase-root":{height:"40px",fieldset:{border:"none"}}}}}})))),"Custom Range"===u?.title&&a.createElement(y.A,{sx:{borderTop:"1px solid rgba(0,0,0,0.1)",textAlign:"right",p:2}},a.createElement(D.A,{text:"Cancel",variant:"outlined",color:"default",onClick:()=>{p(null)}}),a.createElement(D.A,{text:"OK",color:"primary",onClick:()=>{p(null),t(u)},style:{marginLeft:"8px"}}))))};T.propTypes={value:r().instanceOf(Object).isRequired,onChange:r().func.isRequired,type:r().string,page:r().string,disabled:r().bool};const j=T},26680(e,t,n){n.d(t,{h:()=>i,l:()=>a});const a=[{key:"myalva_overview",label:"OVERVIEW",path:"/myalva-overview",value:"myalva-overview"},{key:"consultant_projects",label:"CONSULTING",path:"/",value:"consultant"},{key:"myalva_analysis",label:"Analysis",path:"/analysis",value:"myalva-analysis"},{key:"data_query",label:"DATA QUERY",path:"/data-query",value:"query"},{key:"dataset_profile",label:"DATASET PROFILER",path:"/dataset-profiler",value:"dataset-profiler"},{key:"insights_3d_model",label:"3D Insights",path:"/3d-model/new",value:"3d-model"},{key:"avatar_comparison",label:"Avatar Comparison",path:"/avatar-comparison",value:"avatar-comparison"},{key:"manual_sizeset",label:"Manual Sizeset",path:"/manual-sizeset/new",value:"manual-sizeset"}],i=e=>a.find(t=>e.includes(t.key))?.path||"/login"},19373(e,t,n){n.d(t,{A:()=>h});var a=n(96540),i=n(5556),l=n.n(i),o=n(55370),r=n(85916),s=n(25418),c=n(57862),d=n(63410),p=n(7308),m=n(96294),u=n(93710);const g=[{type:"number",regex:/[0-9]/},{type:"alphabet",regex:/[A-Za-z]/},{type:"special character",regex:/[^\da-zA-Z]/}],y=({open:e,onClose:t,onSubmit:n,user:i=u.t0})=>{const[l,y]=(0,a.useState)(""),h=g.map(e=>e.regex.test(l)).includes(!1)||l.length<8;return a.createElement(o.A,{onClose:t,open:e},a.createElement(r.A,null,i?.username?`Change Password for: ${i.username}`:"Change Your Password"),a.createElement(s.A,null,a.createElement(m.A,{label:"New Password",value:l,placeholder:"New Password",onChange:e=>y(e.target.value)}),a.createElement("div",{style:{display:"flex",marginTop:"10px"}},a.createElement(d.A,{fontSize:"small",sx:{color:l.length>=8?"#1AA464":"#9B9B9B"}}),a.createElement("span",{style:{color:l.length>=8?"#1AA464":"#9B9B9B",fontSize:"14px"}},"New password must be longer than 8 characters")),g.map(e=>{return t=e.regex,n=e.type,a.createElement("div",{key:`regex-requirement-${n}`,style:{display:"flex",marginTop:"10px"}},a.createElement(d.A,{fontSize:"small",sx:{color:l.match(t)?"#1AA464":"#9B9B9B"}}),a.createElement("span",{style:{color:l.match(t)?"#1AA464":"#9B9B9B",fontSize:"14px"}},`New password must contains at least one ${n}`));var t,n})),a.createElement(c.A,null,a.createElement(p.A,{text:"Cancel",variant:"outlined",color:"default",onClick:t}),a.createElement(p.A,{text:"Ok",disabled:h,color:"primary",onClick:()=>n(l)})))};y.propTypes={open:l().bool.isRequired,onClose:l().func.isRequired,onSubmit:l().func.isRequired,user:l().instanceOf(Object)};const h=y},87971(e,t,n){n.d(t,{A:()=>u,K:()=>p});var a=n(96540),i=n(60431),l=n(42116),o=n(49068),r=n(5556),s=n.n(r),c=n(30679);const d=["#E7AF53","#5D70B5","#E9D23D","#4EB79B","#EF4873","#5ACAEE","#9754A1","#99CB4A","#EF4643","#4B4B93","#C587B8","#2DB2C9","#58BB61","#858AC0","#E89184","#DE6643","#9C4847","#9B8B87"],p=["#EC7700","#5F504D","#000000","#AE7814","#666779","#934A36","#1C5566","#1A5023","#660A29","#4F2C55"],m=({color:e,onColorChange:t,required:n,label:r="Color",isABPSource:s=!1})=>{const[m,u]=(0,a.useState)(null),g=Boolean(m),y=g?"simple-popover":void 0;return a.createElement("div",null,a.createElement(o.A,{sx:{position:"relative",transform:"none",transition:"none",marginBottom:"5px"}},`${r}${n?"*":""}`),a.createElement(i.A,{"aria-describedby":y,variant:"contained",onClick:e=>{u(e.currentTarget)},sx:{backgroundColor:e,height:"38px",width:"60px",borderRadius:"10px",":hover":{backgroundColor:e}}}),a.createElement(l.Ay,{id:y,open:g,anchorEl:m,onClose:()=>{u(null)},anchorOrigin:{vertical:"bottom",horizontal:"left"},sx:{padding:"10px"}},a.createElement("div",{style:{padding:"14px",margin:0}},a.createElement(c.z0,{color:e||d[0],colors:s?p:d,onChange:e=>t(e)}))))};m.propTypes={color:s().string.isRequired,onColorChange:s().func.isRequired,required:s().bool.isRequired,label:s().string,isABPSource:s().bool};const u=m},83470(e,t,n){n.d(t,{A:()=>g});var a=n(96540),i=n(5556),l=n.n(i),o=n(52412),r=n(18516),s=n(32483),c=n(53830),d=n(35124),p=n(63518),m=n(93710);const u=({datasetDetail:e,setDatasetDetail:t,isDQ:n=!1})=>a.createElement(o.A,{variant:"outlined",sx:n?{}:{position:"fixed",width:"calc(50% - 460px)",top:"30%",right:"calc(50% + 455px)"}},a.createElement(r.A,null,a.createElement(c.A,{direction:"row",justifyContent:"space-between"},a.createElement(d.A,{variant:"h5",component:"div"},e.name),a.createElement(s.A,{onClick:()=>t({}),sx:{"&:hover":{color:"#ec7700",backgroundColor:"transparent"}}},a.createElement(p.A,null))),a.createElement(d.A,{sx:{mb:1.5},color:"text.secondary"},a.createElement("b",null,"Title: "),e?.title||"N/A"),a.createElement(d.A,{sx:{mb:1.5},color:"text.secondary"},a.createElement("b",null,"Start Date: "),e?.start_date||"N/A"),a.createElement(d.A,{sx:{mb:1.5},color:"text.secondary"},a.createElement("b",null,"End Date: "),e?.end_date||"N/A"),a.createElement(d.A,{sx:{mb:1.5},color:"text.secondary"},a.createElement("b",null,"Scanner: "),e?.scanner||"N/A"),a.createElement(d.A,{sx:{mb:1.5},color:"text.secondary"},a.createElement("b",null,"Count: "),e?.count?Object.keys(e?.count).map(t=>a.createElement("p",{key:`count-${t}`},`${(0,m.wR)(t)}: ${e?.count?.[t]||0}`)):"N/A"),e?.description&&a.createElement(d.A,{sx:{mb:1.5},color:"text.secondary"},a.createElement("b",null,"Remarks: "),e.description)));u.propTypes={datasetDetail:l().instanceOf(Object).isRequired,setDatasetDetail:l().func.isRequired,isDQ:l().bool};const g=u},85778(e,t,n){n.d(t,{A:()=>d});var a=n(96540),i=n(5556),l=n.n(i),o=n(35124),r=n(49068),s=n(14109);const c=({value:e,onRangeChange:t,err:n=!1,errMsg:i="",isDQ:l=!1})=>a.createElement("div",null,a.createElement(r.A,{sx:{position:"relative",transform:"none",transition:"none",marginBottom:"5px"}},"Age Range"+(l?"":"*")),a.createElement("div",{style:{display:"flex"}},a.createElement(s.A,{label:"min",inputValue:`${e[0]}`,showErr:n,onValueChange:n=>t([n,e[1]]),style:{margin:0},width:30}),a.createElement("div",{style:{padding:"5px"}},"-"),a.createElement(s.A,{label:"max",inputValue:`${e[1]}`,showErr:n,onValueChange:n=>t([e[0],n]),style:{margin:0},width:30})),0!==i.length&&a.createElement(o.A,{component:"div",variant:"body1",sx:{fontSize:"12px",color:"#FB4E3B",maxWidth:120}},i));c.propTypes={value:l().instanceOf(Array).isRequired,onRangeChange:l().func.isRequired,err:l().bool,errMsg:l().string,isDQ:l().bool};const d=c},36712(e,t,n){n.d(t,{A:()=>f});var a=n(96540),i=n(5556),l=n.n(i),o=n(34477),r=n(27629),s=n(49068),c=n(35124),d=n(53830),p=n(93688),m=n(16638),u=n(68635),g=n(81714),y=n.n(g),h=n(88629),b=n(76647),A=n(98786),E=n(94972);const v=(e,t)=>{const n=[...e];for(;n.length>0;){const e=n.shift();if(e.name===t)return e;e.children&&n.push(...e.children)}return[]},x=({data:e,selected:t,onNodeSelect:n,error:i=!1,onNodeExpand:l=y(),type:g,isPopUp:x=!1,projectType:f=""})=>{const C=(e,t=[])=>(t.push(e.name),e.children&&e.children.forEach(e=>C(e,t)),t),w=t=>C(v(e,t)),_=(t,n=[])=>{const a=v(e,t);return a.parent?(n.push(a.parent),_(a.parent,n)):n},S=(e,n)=>{const a=w(e.name),i=a.indexOf(e.name);return a.splice(i,1),0!==a.length&&a.every(e=>t.concat(n).includes(e))},k=e=>{e.stopPropagation()},z=(e,n)=>{const a=w(e.name),i=a.indexOf(e.name);a.splice(i,1);const l=a.filter(e=>t.concat(n).includes(e));return 0!==l.length&&l.length!==a.length},R=i=>a.createElement(u.y,{key:i.name,itemId:i.name,onClick:Array.isArray(i.children)?k:()=>l(i.name),sx:{".MuiTreeItem-content":{padding:"0 8px"}},label:a.createElement(a.Fragment,null,a.createElement(r.A,{checked:S(i,[])||t.includes(i.name),indeterminate:z(i,[]),tabIndex:-1,disableRipple:!0,onClick:a=>((a,i)=>{a.stopPropagation();const l=w(i),o=_(i);if(t.includes(i)){const e=t.filter(e=>!l.concat(o).includes(e));n(e)}else{const a=l;for(let t=0;tR(e)):null);return a.createElement(o.A,{sx:{flexGrow:1,maxWidth:500}},!x&&a.createElement(d.A,{direction:"row",spacing:1,alignItems:"center"},a.createElement(s.A,{sx:{position:"relative",transform:"none",transition:"none",marginBottom:"5px",color:i&&"#FB4E3B"}},"Dataset*"),0!==f.length&&a.createElement(c.A,{variant:"caption",sx:{marginLeft:"5px",color:"#A0A0A0"}},f)),a.createElement(p.A,{theme:E.w},a.createElement(m.G,{"aria-label":"rich object",defaultExpandedItems:["root"],slots:{expandIcon:b.A,collapseIcon:h.A},multiSelect:!0,selectedItems:t},e.map(e=>R(e)))))};x.propTypes={data:l().instanceOf(Array).isRequired,selected:l().instanceOf(Array).isRequired,onNodeSelect:l().func.isRequired,error:l().bool,onNodeExpand:l().func,type:l().string.isRequired,isPopUp:l().bool,projectType:l().string};const f=x},39992(e,t,n){n.d(t,{A:()=>se});var a=n(96540),i=n(5556),l=n.n(i),o=n(74353),r=n.n(o),s=n(88569),c=n.n(s),d=n(83826),p=n.n(d),m=n(53830),u=n(55370),g=n(85916),y=n(25418),h=n(57862),b=n(49068),A=n(35124),E=n(73514),v=n(32483),x=n(98786),f=n(1642),C=n(93688),w=n(93951),_=n(7308),S=n(96294),k=n(72456),z=n(87971),R=n(82077),D=n(63518),O=n(27214),F=n(14109),I=n(50841),T=n(40665),j=n(93710);const $=["BODY"],P=({filters:e,onFilterPomSelect:t,onExtraFilterAdd:n,onExtraFilterDel:i,error:l=!1,source:o,projectTypes:r=$})=>{const[s,c]=(0,a.useState)([]);return(0,a.useEffect)(()=>{o&&r&&(0,T.jl)((0,j.pv)(o,r||["BODY"])).then(e=>c(e?.results||[]))},[o,r]),a.createElement("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",width:"321px"}},a.createElement(b.A,{sx:{position:"relative",transform:"none",transition:"none",marginBottom:"5px",width:"100%",color:l&&"#FB4E3B"}},"Extra Filters(optional)"),e?.length>0&&e.map((e,n)=>a.createElement("div",{key:`extra-select-pom-${n}`,style:{display:"flex",flexDirection:"row",alignItems:"center"}},a.createElement("div",{style:{display:"flex",flexDirection:"column",alignItems:"center"}},a.createElement(k.A,{field:"",value:s.find(t=>t.key===e.pom)||"",options:s,onChange:(e,a)=>t(a.key,n,"pom"),placeholder:"Measurement",style:{width:"280px",marginRight:0}}),a.createElement(F.A,{label:"min",inputValue:`${e.min||""}`,width:250,onValueChange:e=>t(e,n,"min"),placeholder:"Min",showErr:!1,style:{padding:"5px 15px"}}),a.createElement(F.A,{label:"max",inputValue:`${e.max||""}`,width:250,placeholder:"Max",onValueChange:e=>t(e,n,"max"),showErr:!1,style:{padding:"5px 15px"}}),"weight"===e?.pom?a.createElement("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",margin:"10px 0"}},a.createElement(O.A,{text:"kg",color:"primary",selected:e?.unit&&"kg"===e.unit,onClick:()=>t("kg",n,"unit")}),a.createElement(A.A,{variant:"body1",component:"div",sx:{color:"#A0A0A0",margin:"0 20px"}},"/"),a.createElement(O.A,{text:"lbs",color:"primary",selected:e?.unit&&"lbs"===e.unit,onClick:()=>t("lbs",n,"unit")})):a.createElement("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",margin:"10px 0"}},a.createElement(O.A,{text:"cm",color:"primary",selected:e?.unit&&"cm"===e.unit,onClick:()=>t("cm",n,"unit")}),a.createElement(A.A,{variant:"body1",component:"div",sx:{color:"#A0A0A0",margin:"0 20px"}},"/"),a.createElement(O.A,{text:"inch",color:"primary",selected:e?.unit&&"inch"===e.unit,onClick:()=>t("inch",n,"unit")}))),a.createElement(v.A,{sx:{color:"#5F504D"},onClick:()=>i(n)},a.createElement(D.A,null)))),a.createElement(I.A,{color:"primary",startIcon:a.createElement(R.A,null),onClick:n,text:"Add more filter",style:{alignSelf:"flex-start"}}))};P.propTypes={filters:l().instanceOf(Array).isRequired,onFilterPomSelect:l().func.isRequired,onExtraFilterAdd:l().func.isRequired,onExtraFilterDel:l().func.isRequired,error:l().bool,source:l().string.isRequired,projectTypes:l().instanceOf(Array)};const B=P;var M=n(14654),L=n(67385),N=n(96120),W=n(54026),V=n(86700),G=n(78828),q=n(51361),Y=n(83272),H=n(64124);const Z=({data:e,analysisUnit:t})=>{const{avatars:n,display_poms:i}=e,[l,o]=(0,a.useState)("cm"),r=0!==n.length?n.map(e=>e.size):[],s=n.length||1;return(0,a.useEffect)(()=>{o(t)},[t]),a.createElement(m.A,{direction:"row",spacing:1,sx:{width:"100%"},justifyContent:"center",flexWrap:"wrap",useFlexGap:!0},a.createElement(m.A,{direction:"row",spacing:0,justifyContent:"center"},n.map(e=>a.createElement("img",{key:`avatar-standard-${e.size}`,alt:`avatar-standard-${e.size}`,src:e.preview_img,style:{width:`calc(100% / ${s})`,height:"auto"}}))),a.createElement(m.A,{direction:"column",p:.5,spacing:.5,sx:{borderRadius:"8px",border:"1px solid #E0E0E0",maxWidth:"100%"}},a.createElement(m.A,{direction:"row",justifyContent:"end"},a.createElement(H.A,{label:"Unit",options:["cm","inch"],value:l,color:"primary",onChange:e=>o(e)})),a.createElement(N.A,{key:`table-${e.id}`,sx:{width:"100%",overflowX:"auto"}},a.createElement(W.A,{size:"small","aria-label":"collection detail table"},a.createElement(V.A,null,a.createElement(G.A,null,a.createElement(Y.A,{align:"left",sx:{p:"0 8px",fontSize:"12px"}},a.createElement("span",null,"Size")),r.map(e=>a.createElement(Y.A,{align:"right",key:e,sx:{p:"0 8px",borderLeft:"1px solid #f4f4f4",fontSize:"12px"}},e)))),a.createElement(q.A,null,i.map(t=>a.createElement(G.A,{key:t,sx:{"&:last-child td, &:last-child th":{border:0}}},a.createElement(Y.A,{align:"left",key:"cell-pom",sx:{p:"0 8px",fontSize:"12px"}},t),r.map(n=>a.createElement(Y.A,{align:"right",key:`cell-${t}-${n}`,sx:{p:"0 8px",borderLeft:"1px solid #f4f4f4",fontSize:"12px",whiteSpace:"nowrap"}},e[l].find(e=>e.size===n)?.[t]||"/")))))))))};Z.propTypes={data:l().instanceOf(Object).isRequired,analysisUnit:l().string.isRequired};const U=Z;var J=n(36712),Q=n(85778),X=n(33042),K=n(40357),ee=n(94972),te=n(83470),ne=n(82881);r().extend(p()),r().extend(c());const ae={pom:"",max:null,min:null,unit:"cm"},ie=(0,f.A)({...ee.w,components:{MuiPickersDay:{styleOverrides:{root:{color:"#5F504D",borderRadius:"20px",backgroundColor:"transparent","&:hover":{backgroundColor:"rgba(236, 119, 0, 0.1)"},"&.Mui-selected":{backgroundColor:"#EC7700",color:"#FFFFFF","&:hover, &:focus":{backgroundColor:"#EC7700"}}}}}}}),le=e=>e?.children?e.children?.flatMap(e=>le(e)):e,oe=["Body"],re=({open:e,onClose:t,rowDetail:n,populationOptions:i,populationMap:l,existingName:o=j.Ml,unit:s="cm",prefilledGender:c="",projectTypes:d=oe,dbVersion:p=""})=>{const[f,R]=(0,a.useState)([]),[D,O]=(0,a.useState)({}),[F,I]=(0,a.useState)(""),[T,$]=(0,a.useState)({}),[P,N]=(0,a.useState)(""),[W,V]=(0,a.useState)(!1),[G,q]=(0,a.useState)({}),Y=M.M.getState().auth.currentUser.timezone||r().tz.guess(),H=l?.ABP?.map(e=>({key:e.id,value:e.name,...e}))||[],Z=D?.type&&"ABP"!==D.type&&"Sizeset"!==D.type?l[D.type]:[],ee="MyAlva"===D?.type&&"Cloth Fitting Size Data"===D?.my_alva_type?i?.dataset_size_recommend||[]:Z;(0,a.useEffect)(()=>{const e={...n};return O(e),N(n?.collection||""),()=>{N(""),V(!1)}},[n]),(0,a.useEffect)(()=>{0!==P.length&&(0,L.Me)(P).then(e=>{e?.data&&q(e.data)})},[P]);const re=e=>0!==e.length&&e.map(e=>!(0===e.pom.length||null===e.max&&null===e.min||null!==e.max&&+e.max<+e.min||"weight"===e.pom&&("cm"===e.unit||"inch"===e.unit)||"weight"!==e.pom&&("kg"===e.unit||"lbs"===e.unit))).includes(!1),se=(e,t)=>{if(f.includes(e)){const t=f.filter(t=>!(t===e));R(t)}const n={...D,[e]:t};O(n)};return a.createElement(u.A,{open:e,maxWidth:"md",fullWidth:!0,transitionDuration:0},a.createElement(g.A,null,(D.isNew?"Add New":"Edit")+" Analysis Object"),a.createElement(y.A,null,a.createElement(m.A,{direction:"row",justifyContent:"space-between",spacing:"10px",sx:{m:1}},a.createElement(m.A,{direction:"column",spacing:"10px",sx:{m:1}},a.createElement(m.A,{direction:"row",spacing:"10px",sx:{m:1}},a.createElement("div",{style:{width:"400px"}},a.createElement(b.A,{sx:{position:"relative",transform:"none",transition:"none",marginBottom:"5px"}},"Label*"),a.createElement(S.A,{label:"",value:D?.label,onChange:e=>(e=>{if(f.includes("label")){const e=f.filter(e=>!("label"===e));R(e)}const t={...D,label:e};O(t)})(e.target.value),width:300,err:f.includes("label")})),a.createElement("div",{style:{width:"30%"}},a.createElement(z.A,{color:D?.color||"#E7AF53",onColorChange:e=>{const t={...D,color:e.hex};O(t)},required:!0,isABPSource:"ABP"===D.type||"Sizeset"===D.type}))),a.createElement(m.A,{direction:"row",spacing:"10px",sx:{m:1}},a.createElement("div",{style:{width:"30%"}},a.createElement(k.A,{field:"Data Source*",value:{key:D?.type,value:"ABP"===D?.type?"Standard":D?.type},options:void 0!==i?.type?i.type.map(e=>({key:e,value:"ABP"===e?"Standard":e})):[],onChange:(e,t)=>(e=>{R([]);const t={...D,type:e,gender:0!==c.length?[c]:[],age_range:"BodyScan"===e?[0,80]:[18,80],include_dataset:[],ethnicity:[],color:"ABP"===e||"Sizeset"===e?"#EC7700":"#E7AF53"};O(t),$({})})(t.key),error:f.includes("type"),style:{width:"140px"}})),"MyAlva"===D.type&&a.createElement("div",{style:{width:"70%"}},a.createElement(k.A,{field:"Type*",value:"Cloth Fitting Size Data"===D?.my_alva_type?{key:"Cloth Fitting Size Data",value:"Size Recommended Body Data"}:{key:"Customer Body Data",value:"All Body Data"},options:[{key:"Customer Body Data",value:"All Body Data"},{key:"Cloth Fitting Size Data",value:"Size Recommended Body Data"}],onChange:(e,t)=>(e=>{if(f.includes("my_alva_type")){const e=f.filter(e=>!("my_alva_type"===e));R(e)}const t={...D,my_alva_type:e,include_dataset:[]};O(t)})(t.key),error:f.includes("my_alva_type"),style:{width:"250px"}})),"BodyScan"===D.type&&0!==p.length&&a.createElement("div",null,a.createElement(m.A,{direction:"row",spacing:.5,alignItems:"center",sx:{marginBottom:"5px"}},a.createElement(b.A,{sx:{position:"relative",transform:"none",transition:"none"}},"Version*"),a.createElement(E.A,{disableFocusListener:!0,disableTouchListener:!0,title:"We started recording data versions on 2025-02-06. If your project was created before this date, editing project may lead to updated results. To use the latest data, it’s best to create a new project."},a.createElement(v.A,{"aria-label":"info",size:"small",sx:{borderRadius:"16px",height:"16px",width:"16px"}},a.createElement(x.A,{fontSize:"small"})))),a.createElement(S.A,{label:"Version*",value:p,disabled:!0,style:{width:"233px"}}))),0!==ee.length&&a.createElement(J.A,{data:ee,selected:D?.include_dataset||[],onNodeSelect:e=>se("include_dataset",e),error:f?.includes("include_dataset")||!1,onNodeExpand:e=>{if("BodyScan"===D.type){const t=l.BodyScan?.flatMap(e=>le(e)),n=t.find(t=>t.name===e)||{};$(n)}},projectType:0===d.length||"BodyScan"!==D.type?"":`(Type: ${d.map(e=>K.Av.find(t=>t.key===e)?.value||"").join(" & ")})`,type:D.type})),a.createElement(C.A,{theme:ie},a.createElement(m.A,{direction:"column",spacing:"10px",sx:{m:1}},"MyAlva"===D.type&&a.createElement(a.Fragment,null,a.createElement("div",null,a.createElement(b.A,{style:{boxSizing:"border-box",marginRight:"5px"}},"Start Time"),a.createElement(w.l,{value:D?.datetime_gte?r()(D.datetime_gte):null,onChange:e=>se("datetime_gte",e.tz(Y,!0).startOf("day").toISOString()),slotProps:{textField:{size:"small",sx:{padding:"0 15px",borderRadius:"10px",marginRight:"10px",backgroundColor:"#F9F9F9",border:"1px solid #D9D9D9",boxShadow:"inset 0px 0px 5px #00000038",width:"200px",".MuiInputBase-root":{height:"40px",fieldset:{border:"none"}}}}}})),a.createElement("div",null,a.createElement(b.A,{style:{boxSizing:"border-box",marginRight:"5px"}},"End Time"),a.createElement(w.l,{value:D?.datetime_lte?r()(D.datetime_lte):null,onChange:e=>se("datetime_lte",e.tz(Y,!0).endOf("day").toISOString()),slotProps:{textField:{size:"small",sx:{padding:"0 15px",borderRadius:"10px",marginRight:"10px",backgroundColor:"#F9F9F9",border:"1px solid #D9D9D9",boxShadow:"inset 0px 0px 5px #00000038",width:"200px",".MuiInputBase-root":{height:"40px",fieldset:{border:"none"}}}}}})),a.createElement(k.A,{field:"Ethnicity",value:D?.ethnicity||[],options:i?.ethnicity||[],onChange:(e,t)=>se("ethnicity",t),multiple:!0,placeholder:D?.ethnicity&&0!==D.ethnicity.length?"":"All",error:f.includes("ethnicity"),width:350}),a.createElement(k.A,{field:"Gender",value:D?.gender||[],options:i?.gender||[],onChange:(e,t)=>se("gender",t),multiple:!0,placeholder:D?.gender&&0!==D.gender.length?"":"All",error:f.includes("gender"),width:350}),a.createElement(k.A,{field:"Age Range",value:D?.age_bucket||[],options:i?.age_bucket||[],onChange:(e,t)=>se("age_bucket",t),multiple:!0,placeholder:D?.age_bucket&&0!==D.age_bucket.length?"":"All",error:f.includes("age_bucket"),width:350}),a.createElement(k.A,{field:"Country/Region",value:D?.country||[],options:i?.country||[],onChange:(e,t)=>se("country",t),multiple:!0,placeholder:D?.country&&0!==D.country.length?"":"All",error:f.includes("country"),width:350}),"Cloth Fitting Size Data"===D?.my_alva_type&&a.createElement(a.Fragment,null,a.createElement(k.A,{field:"Category",value:D?.category||[],options:i?.category||[],onChange:(e,t)=>se("category",t),multiple:!0,placeholder:D?.category&&0!==D.category.length?"":"All",error:f.includes("category"),width:350}),a.createElement(k.A,{field:"Clothing Sizes",value:D?.size||[],options:i?.size||[],onChange:(e,t)=>se("size",t),multiple:!0,placeholder:D?.size&&0!==D.size.length?"":"All",error:f.includes("size"),width:350}))),"BodyScan"===D.type&&a.createElement(a.Fragment,null,a.createElement(k.A,{field:"Gender*",value:D?.gender||[],options:i?.gender||[],onChange:(e,t)=>se("gender",t),multiple:!0,error:f.includes("gender"),placeholder:D?.gender&&0!==D.gender.length?"":"Please Select",width:350}),a.createElement(Q.A,{value:D?.age_range||[0,80],onRangeChange:e=>se("age_range",e),err:f.includes("age_range"),errMsg:F})),"ABP"===D.type&&a.createElement(k.A,{field:"Standard*",value:H.find(e=>e.key===D.collection)||"",onChange:(e,t)=>(e=>{if(f.includes("collection")){const e=f.filter(e=>!("collection"===e));R(e)}N(e.key);const t={...D,collection:e.key,name:e.name,body_type:e.body_type,size_range:e.size_range,country:e.country};O(t)})(t),options:H,style:{width:"300px"}}),"Sizeset"===D.type&&a.createElement(ne.A,{value:D,onValueChange:e=>(e=>{const{brand:t,size_set:n,vbids:a,...i}=D;O({...i,...e})})(e),isPopulation:!0}),("MyAlva"===D.type||"BodyScan"===D.type)&&a.createElement(B,{filters:D?.extra_filter&&0!==D.extra_filter.length?D.extra_filter:[],onFilterPomSelect:(e,t,n)=>{if(f.includes("extra_filter")){const e=f.filter(e=>!("extra_filter"===e));R(e)}const a=D,i=D?.extra_filter?D.extra_filter:[ae],l=i.at(t)||ae,o={...a,extra_filter:i.toSpliced(t,1,{...l,[n]:""===e?null:e})};O(o)},onExtraFilterAdd:()=>{const e={...D,extra_filter:[...D.extra_filter,ae]};O(e)},onExtraFilterDel:e=>{const t={...D,extra_filter:(D?.extra_filter?D.extra_filter:[ae]).toSpliced(e,1)};O(t)},error:f.includes("extra_filter"),source:D?.type||"BodyScan",projectTypes:d})))),"ABP"===D.type&&0!==P.length&&0!==Object.keys(G).length&&a.createElement(U,{data:G,analysisUnit:s}),f.includes("label")&&!(0===D.label.length)&&a.createElement(A.A,{component:"div",variant:"body1",sx:{color:"#FB4E3B"}},"Label already exists!"),0!==f.length&&!(f.includes("label")&&0!==D.label.length)&&a.createElement(A.A,{component:"div",variant:"body1",sx:{color:"#FB4E3B"}},"Please input all required fields!"),0!==Object.keys(T).length&&a.createElement(te.A,{datasetDetail:T,setDatasetDetail:$})),a.createElement(h.A,null,a.createElement(_.A,{variant:"outlined",color:"default",text:"Cancel",onClick:()=>{t(D,"cancel"),R([]),I(""),$({})}}),a.createElement(_.A,{color:"primary",text:"Save",disabled:W,onClick:()=>{let e;if("BodyScan"===D.type?e=(()=>{let e=[];const t=re(D.extra_filter);return""===D.label&&(e=[...e,"label"]),0===D.include_dataset.length&&(e=[...e,"include_dataset"]),+D.age_range[0]>=+D.age_range[1]&&(e=[...e,"age_range"],I("Min age cannot be bigger than max age.")),+D.age_range[1]>80&&(e=[...e,"age_range"],I("Sorry, we only support ages under 80 at the moment.")),t&&(e=[...e,"extra_filter"]),e})():"ABP"===D.type?e=(()=>{let e=[];return(""===D.label||o.includes(D.label)&&D.label!==n.label)&&(e=[...e,"label"]),void 0!==D?.collection&&""!==D?.collection||(e=[...e,"collection"]),e})():"MyAlva"===D.type?e=(()=>{let e=[];const t=re(D.extra_filter);return(""===D.label||o.includes(D.label)&&D.label!==n.label)&&(e=[...e,"label"]),0===D.include_dataset.length&&(e=[...e,"include_dataset"]),t&&(e=[...e,"extra_filter"]),e})():"Sizeset"===D.type&&(e=(()=>{let e=[];return(""===D.label||o.includes(D.label)&&D.label!==n.label)&&(e=[...e,"label"]),void 0!==D?.size_set&&""!==D?.size_set||(e=[...e,"size_set"]),e})()),0!==e.length)return void R(e);const a={...D};"Sizeset"===D.type&&(a.brand=D.brand?.id||D.brand,a.size_set=D.size_set?.id||D.size_set,a.vbids=D?.vbids?.map(e=>e?.vbid||e)||[]),V(!0),t(a,"save"),R([]),I(""),$({})}})),W&&a.createElement(X.A,{isLoading:W,isSingleChart:!0}))};re.propTypes={open:l().bool.isRequired,onClose:l().func.isRequired,rowDetail:l().instanceOf(Object).isRequired,populationMap:l().instanceOf(Object).isRequired,populationOptions:l().instanceOf(Object).isRequired,existingName:l().instanceOf(Array),unit:l().string,prefilledGender:l().string,projectTypes:l().instanceOf(Array),dbVersion:l().string};const se=re},40357(e,t,n){n.d(t,{$e:()=>v,Av:()=>d,BU:()=>s,Bk:()=>g,PU:()=>A,Rm:()=>p,X8:()=>E,ZS:()=>m,cb:()=>u,eK:()=>b,nh:()=>y});var a=n(96540),i=n(17862),l=n(5076),o=n(93710),r=n(27214);const s=[{value:"Initialized",color:"inProgress"},{value:"PA Sent",color:"inProgress"},{value:"PA Received",color:"inProgress"},{value:"In Progress",color:"inProgress"},{value:"Result Submitted",color:"success"},{value:"Completed",color:"success"},{value:"Cancelled",color:"error"},{value:"On Hold",color:"onHold"}],c=s.map(e=>e.value),d=[{key:"BODY",value:"Body",pomPathKey:"consultant"},{key:"HEAD",value:"Head",pomPathKey:"consultant_head"},{key:"HAND",value:"Hand",pomPathKey:"consultant_hand"}],p=[{id:"is_private",label:"Visibility*",type:"radio-group",display:c,options:[{key:"false",value:"Public"},{key:"true",value:"Private"}]},{id:"acid",label:"ACID*",type:"text",display:c,showInNew:!0},{id:"client",label:"Client*",type:"autocomplete",display:c,showInNew:!0},{id:"name",label:"Project Name*",type:"text",display:c,showInNew:!0},{id:"types",label:"Project Type*",type:"radio-group-multi-select",display:c},{id:"gender",label:"Gender*",type:"radio-group",display:c,options:["Male","Female","Male & Female"]},{id:"coordinator",label:"Project Manager / Coordinator*",type:"select",display:c},{id:"consultants",label:"Lead Consultant(s)*",type:"multi-select",display:c},{id:"consulting_coordinator",label:"Technical Project Manager*",type:"select",display:c},{id:"consulting_support",label:"Consulting Support*",type:"select",display:c},{id:"status",label:"Project Status",type:"colored-select",display:c},{id:"file_link",label:"Project Files Link*",type:"text",display:["Result Submitted","Completed"]},{id:"creation_date",label:"Open Date*",type:"datetime",display:c},{id:"close_date",label:"Close Date*",type:"datetime",display:["Completed","Cancelled"]},{id:"description",label:"Description",type:"text",display:c}],m=[{id:"acid",label:"ACID",sortable:!0,display:!0},{id:"client",label:"Client",sortable:!0,display:!0},{id:"name",label:"Project Name",sortable:!0,display:!0},{id:"gender",label:"Gender",sortable:!1,display:!0},{id:"creation_date",label:"Open Date",sortable:!0,display:!0},{id:"personnel",label:"Personnel",sortable:!1,display:!0},{id:"status",label:"Project Status",sortable:!1,display:!0},{id:"created_at",label:"Creation Date",sortable:!0,display:!1}],u=[{id:"title",label:"Project Name",sortable:!0},{id:"created_at",label:"Creation Date",sortable:!0},{id:"created_by",label:"Created By",sortable:!1},{id:"populations",label:"Analysis Objects",sortable:!1}],g=[{id:"title",label:"Insight Name",sortable:!0},{id:"created_at",label:"Creation Date",sortable:!0},{id:"created_by",label:"Created By",sortable:!1}],y=[{id:"title",label:"Sizeset Name",sortable:!0},{id:"created_at",label:"Creation Date",sortable:!0},{id:"created_by",label:"Created By",sortable:!1}],h=[{id:"coordinator",label:"Project Manager / Coordinator"},{id:"consultants",label:"Lead Consultant(s)"},{id:"consulting_coordinator",label:"Technical Project Manager"},{id:"consulting_support",label:"Consulting Support"}],b=(e,t)=>a.createElement("div",{key:`user-info-${e?.firstName}`,style:{display:"flex",flexDirection:"row",paddingBottom:"detail"===t?0:"10px",marginRight:"detail"===t?"10px":0}},"detail"===t?a.createElement("div",{style:{display:"flex",flexDirection:"column",alignItems:"left"}},a.createElement("div",{style:{height:"20px"}},a.createElement("b",null,`${e?.first_name||""} ${e?.last_name||""}`),!e?.is_active&&a.createElement(i.A,{label:"Inactive",size:"small",sx:{borderRadius:"5px",height:"20px",marginLeft:"8px",backgroundColor:"#FFEAE8",color:"#FB4E3B"}})),a.createElement("span",{style:{color:"#EC7700",textDecoration:"underline",fontWeight:"100",fontSize:"small"}},e?.email)):a.createElement("span",null,`${e?.first_name||""} ${e?.last_name||""}`)),A=e=>/^(https?:\/\/)?(www\.)?(drive|docs)\.google\.com\/([a-zA-Z0-9_-]+)/.test(e),E=(e,t,n,i)=>"coordinator"===e||"consulting_coordinator"===e||"consulting_support"===e?b(0!==Object.keys(i).length?i:t,n):"consultants"===e?"detail"===n?a.createElement("div",{style:{display:"flex"}},t.map(e=>b(0!==Object.keys(i).length?i:e,n))):a.createElement("div",null,t.map(e=>b(0!==Object.keys(i).length?i:e))):"creation_date"===e||"close_date"===e||"created_at"===e?t?(0,o.R8)(t):"N/A":"is_private"===e?t?"Private":"Public":"status"===e?a.createElement(r.A,{text:t,color:s.find(e=>e.value===t)?.color||"primary"}):"file_link"===e?a.createElement(l.A,{href:t,target:"_blank",sx:{textDecoration:"underline !important"}},t):"populations"===e?a.createElement("div",{style:{display:"flex",flexDirection:"column"}},t.map(e=>a.createElement("div",{key:`population-${e.type}-${e.label}`,style:{display:"flex",flexDirection:"row",paddingBottom:"10px",marginRight:0}},a.createElement("div",{style:{width:"40%",minWidth:"40%",maxWidth:"40%",display:"inline-block",fontWeight:500,marginRight:"10px"}},`${"ABP"===e.type?"Standard":e.type}:`),a.createElement("div",{style:{width:"60%",display:"inline-block",fontWeight:500,marginRight:"10px"}},e.label)))):"types"===e?t.map(e=>d.find(t=>t.key===e)?.value||"").join(" & "):t,v=(e,t)=>a.createElement("div",{style:{display:"flex",flexDirection:"column"}},h.map(n=>a.createElement("div",{key:`personel-${n.id}`,style:{display:"flex",flexDirection:"row",paddingBottom:"10px",marginRight:0}},a.createElement("div",{style:{width:"40%",minWidth:"40%",maxWidth:"40%",display:"inline-block",fontWeight:500,marginRight:"10px"}},`${n.label}:`),E(n.id,e[n.id],"",t))))},33173(e,t,n){n.d(t,{A:()=>I});var a=n(96540),i=n(5556),l=n.n(i),o=n(81714),r=n.n(o),s=n(84976),c=n(47767),d=n(34477),p=n(88634),m=n(35124),u=n(53830),g=n(17862),y=n(32483),h=n(60431),b=n(93688),A=n(98014),E=n(82077),v=n(52764),x=n(57599),f=n(50841),C=n(81724),w=n(40357),_=n(93710),S=n(40665),k=n(91759),z=n(27659),R=n(60492),D=n(99845),O=n(94972);const F=({onSearch:e,type:t="consultant",styles:n,params:i=_.t0,disabled:l=!1,onParamsChange:o=r(),isClientView:F=!1,setIsClientView:I=r(),client:T="",onBackClicked:j=r()})=>{const $=(0,c.Zp)(),[P,B]=(0,a.useState)(""),[M,L]=(0,a.useState)({}),N=("consultant"===t?w.ZS:w.cb).filter(e=>e.sortable),[W,V]=(0,a.useState)([]),G=N.map(e=>"creation_date"===e.id||"created_at"===e.id?{key:e.id,value:e.label,children:[{key:`-${e.id}`,value:"Newest first"},{key:e.id,value:"Oldest first"}]}:{key:e.id,value:e.label,children:[{key:e.id,value:"A-Z"},{key:`-${e.id}`,value:"Z-A"}]});return(0,a.useEffect)(()=>{const t=setTimeout(()=>{e(P)},1e3);return()=>clearTimeout(t)},[P]),(0,a.useEffect)(()=>{"myAlva"===t&&(0,R.CF)().then(e=>{e?.results&&V(e.results)})},[t]),a.createElement(u.A,{spacing:1,direction:"column",className:n},a.createElement(d.A,{className:"project-list-header"},a.createElement("div",{className:"project-list-header title"},a.createElement(m.A,{variant:"h4",component:"h4"},("consultant"===t?"Consulting":"Analysis")+" Projects"),"myAlva"!==t?a.createElement(f.A,{startIcon:a.createElement(E.A,null),text:"Add New Project",color:"primary",component:s.N_,to:("consultant"!==t?".":"")+"/new"}):a.createElement(f.A,{startIcon:a.createElement(E.A,null),text:"Add New Project",color:"primary",onClick:()=>{const e={title:`New Analysis - ${(0,_.kS)(new Date)}`,description:"New Analysis",unit:"cm",unit_weight:"kg"};(0,S.T4)(e,"MYALVA").then(e=>{e?.id&&$(`./${e.id}`)})}})),a.createElement("div",null,a.createElement(C.A,{label:"Search",disabled:l,placeholder:`Search ${"consultant"===t?"ACID/Client/":""}Project Name`,onChange:e=>B(e.target.value),startAdornment:a.createElement(p.A,{position:"start"},a.createElement(v.A,null)),endAdornment:a.createElement(p.A,{position:"end"},a.createElement(y.A,{disabled:l,onClick:()=>B(""),sx:{visibility:0===P.length?"hidden":"visible"}},a.createElement(x.A,{fontSize:"small"}))),style:{width:"320px"},value:P}))),a.createElement(u.A,{direction:"row",justifyContent:"space-between",alignItems:"center",className:"filters-container"},a.createElement(u.A,{spacing:1,direction:"row",className:"chips-container",alignItems:"center"},a.createElement(g.A,{size:"small",label:"All",disabled:l,onClick:()=>o("view_by","all"),className:"chip "+("all"===i?.view_by?"is-active":"")}),a.createElement(g.A,{size:"small",label:"Starred",disabled:l,onClick:()=>o("view_by","is_favorites"),className:"chip "+("is_favorites"===i?.view_by?"is-active":"")}),a.createElement(g.A,{size:"small",label:"My",disabled:l,onClick:()=>o("view_by","is_my"),className:"chip "+("is_my"===i?.view_by?"is-active":"")})),a.createElement(u.A,{spacing:1,direction:"row"},"consultant"===t?a.createElement(a.Fragment,null,a.createElement(k.A,{label:"Visibility",field:"visibility",selected:i?.visibility||"All",disabled:l,options:["All","Private","Public"],onChange:e=>o("visibility",e)}),a.createElement(k.A,{label:"Status",field:"status",selected:i?.status||"All",disabled:l,isColoredOption:!0,options:[{value:"All",color:"transparent"},...w.BU],onChange:e=>o("status",e)}),a.createElement(k.A,{label:"Gender",field:"gender",disabled:l,selected:i?.gender||"All",options:["All","Male","Female","Male & Female"],onChange:e=>o("gender",e)})):a.createElement(D.A,{label:"Created by",field:"created_by__in",onChange:e=>o("created_by__in",e),options:W,selected:i?.created_by__in||[]}),a.createElement(z.A,{value:M,onChange:e=>{L(e),o("created_at__gte",e.datetime_gte),o("created_at__lte",e.datetime_lte)},type:"button",disabled:l,page:t}),a.createElement(k.A,{label:"Sort by",field:"ordering",selected:i?.ordering||("consultant"===t?"-creation_date":"-created_at"),options:G,disabled:l,onChange:e=>o("ordering",e),hasSecondLevel:!0}),"consultant"===t&&!l&&a.createElement(b.A,{theme:O.w},a.createElement(h.A,{id:"time-range-picker-toggle",onClick:()=>I(!F),color:"primary",variant:"outlined",size:"small",sx:{textTransform:"none",".MuiButton-icon":{marginLeft:"0"}}},`Switch to ${F?"List":"Grid"} View`)))),0!==T.length&&a.createElement(y.A,{"aria-label":"back",onClick:j,sx:{mt:1,alignSelf:"start",padding:0,"&:hover":{color:"#EC7700",backgroundColor:"transparent"}}},a.createElement(A.A,{fontSize:"small"}),a.createElement(m.A,{variant:"body1",style:{padding:"0 2px",fontSize:"14px",fontWeight:700}},T)))};F.propTypes={onSearch:l().func.isRequired,type:l().string,styles:l().string.isRequired,params:l().instanceOf(Object),disabled:l().bool,onParamsChange:l().func,isClientView:l().bool,setIsClientView:l().func,client:l().string,onBackClicked:l().func};const I=F},31814(e,t,n){n.d(t,{Ay:()=>o,Mu:()=>l,yZ:()=>i});const a=(0,n(60258).Z0)({name:"analysis",initialState:{currentAnalysis:{}},reducers:{setCurrentAnalysis:(e,t)=>({...e,currentAnalysis:t.payload})}}),{setCurrentAnalysis:i}=a.actions,l=e=>e.analysis.currentAnalysis,o=a.reducer},9314(e,t,n){n.d(t,{Ay:()=>r,CI:()=>l,Jv:()=>i,ug:()=>o});const a=(0,n(60258).Z0)({name:"auth",initialState:{currentUser:{}},reducers:{signIn:(e,t)=>({...e,currentUser:t.payload}),signOut:e=>({...e,currentUser:{}})}}),{signIn:i,signOut:l}=a.actions,o=e=>e.auth.currentUser,r=a.reducer},14654(e,t,n){n.d(t,{q:()=>v,M:()=>E});var a=n(60258),i=n(70960),l=n(69282),o=n(51869),r=n(80817);const s=(0,a.Z0)({name:"role",initialState:{currentRole:""},reducers:{switchToAdmin:e=>({...e,currentRole:"admin"}),switchToUser:e=>({...e,currentRole:""})}}),{switchToAdmin:c,switchToUser:d}=s.actions,p=s.reducer;var m=n(9314),u=n(31814),g=n(66853),y=n(72817),h=n(53006);const b={key:"root",storage:l.A,stateReconciler:o.A},A=(0,i.rL)(b,p),E=(0,a.U1)({reducer:{auth:m.Ay,role:A,analysis:u.Ay,toastr:r.Ff,project:g.Ay,snack:y.Ay,salesBySize:h.Ay},middleware:e=>e({serializableCheck:!1})}),v=(0,i.GM)(E)},66853(e,t,n){n.d(t,{Ay:()=>o,PL:()=>l,lK:()=>i});const a=(0,n(60258).Z0)({name:"project",initialState:{currentProject:{}},reducers:{setCurrentProject:(e,t)=>({...e,currentProject:t.payload})}}),{setCurrentProject:i}=a.actions,l=e=>e.project.currentProject,o=a.reducer},53006(e,t,n){n.d(t,{Ay:()=>o,fl:()=>i,h6:()=>l});const a=(0,n(60258).Z0)({name:"salesBySize",initialState:{list:[]},reducers:{setSalesBySizeList:(e,t)=>({...e,list:t.payload})}}),{setSalesBySizeList:i}=a.actions,l=e=>e.salesBySize.list,o=a.reducer},72817(e,t,n){n.d(t,{A3:()=>i,Ay:()=>r,FZ:()=>l,G7:()=>o});const a=(0,n(60258).Z0)({name:"snack",initialState:{analysisToDownload:"",source:""},reducers:{setAnalysisToDownload:(e,t)=>({...e,analysisToDownload:t.payload.analysisToDownload,source:t.payload?.source||"analysis_scan_data"})}}),{setAnalysisToDownload:i}=a.actions,l=e=>e.snack.analysisToDownload,o=e=>e.snack.source,r=a.reducer},60492(e,t,n){n.d(t,{$E:()=>c,BZ:()=>y,CF:()=>l,D3:()=>d,H9:()=>o,Le:()=>g,Pj:()=>b,Wo:()=>r,Ww:()=>u,bJ:()=>E,bd:()=>s,c2:()=>A,je:()=>v,jo:()=>p,ke:()=>h,xw:()=>m});var a=n(91800),i=n(4891);const l=async e=>(0,a.fG)(i.A.ADMIN.userList,e),o=async e=>(0,a.LO)(`${i.A.ADMIN.userList}/`,e),r=async(e,t)=>(0,a.D9)(`${i.A.ADMIN.userList}/${e}/`,t),s=async(e,t)=>(0,a.D9)(`${i.A.ADMIN.userList}/${e}/`,t),c=async e=>(0,a.fG)(i.A.PROJECT_VIEW.getOptions,{domain:e}),d=async(e,t)=>(0,a.D9)(`${i.A.PROJECT_VIEW.getOptions}/${e}/`,t),p=async e=>(0,a.IY)(`${i.A.PROJECT_VIEW.getOptions}/${e}/`),m=async e=>(0,a.LO)(i.A.ADMIN.resetPassword,e),u=async(e,t)=>(0,a.LO)(i.A.PROJECT_VIEW.getOptions,e,t),g=async e=>(0,a.fG)(i.A.ADMIN.groups,e),y=async e=>(0,a.fG)(`${i.A.ADMIN.groups}/${e}`),h=async(e,t)=>(0,a.D9)(`${i.A.ADMIN.groups}/${e}/`,t),b=async e=>(0,a.LO)(`${i.A.ADMIN.groups}/`,e),A=async e=>(0,a.LO)(i.A.USER.releaseNote,e),E=async(e,t)=>(0,a.D9)(`${i.A.USER.releaseNote}/${e}/`,t),v=async e=>(0,a.IY)(`${i.A.USER.releaseNote}/${e}/`)},40665(e,t,n){n.d(t,{G8:()=>s,Jg:()=>y,KE:()=>A,T4:()=>r,VH:()=>m,YG:()=>x,c_:()=>v,ev:()=>c,fW:()=>b,gY:()=>g,hC:()=>l,i5:()=>p,jl:()=>E,lL:()=>u,s5:()=>d,wi:()=>h,wl:()=>o});var a=n(91800),i=n(4891);const l=async(e,t)=>(0,a.fG)(i.A[t].analysisList,e),o=async(e,t)=>(0,a.fG)(`${i.A[t].analysisList}/${e}/`),r=async(e,t)=>(0,a.LO)(i.A[t].analysisList,e),s=async(e,t,n)=>(0,a.IY)(`${i.A[t].analysisList}/${e}/`,n),c=async(e,t,n)=>(0,a.D9)(`${i.A[n].analysisList}/${e}/`,t),d=async(e,t)=>(0,a.fG)(i.A[t].summaryBM,e),p=async(e,t)=>(0,a.D9)(`${i.A[t].summaryBM}`,e),m=async(e,t)=>(0,a.fG)(i.A[t].deliverables,e),u=async e=>(0,a.fG)(i.A.MYALVA.model3D,e),g=async e=>(0,a.D9)(i.A.MYALVA.model3D,e),y=async(e,t)=>(0,a.fG)(`${i.A[t].deliverables}/${e}/`),h=async(e,t)=>(0,a.LO)(i.A[t].deliverables,e),b=async(e,t,n)=>(0,a.D9)(`${i.A[n].deliverables}/${e}/`,t),A=async(e,t)=>(0,a.IY)(`${i.A[t].deliverables}/${e}/`),E=async e=>(0,a.fG)(i.A.PROJECT_VIEW.getPomMapping,{type:e}),v=async e=>(0,a.fG)(i.A.MYALVA.listSizeset,e),x=async(e,t)=>(0,a.fG)(i.A[t].deliverableSummaryStats,e)},78477(e,t,n){n.d(t,{Cl:()=>l,Gb:()=>o,MQ:()=>r,qt:()=>c,vF:()=>s});var a=n(91800),i=n(4891);const l=async()=>(0,a.fG)(i.A.AUTH.login),o=async e=>(0,a.LO)(i.A.AUTH.login,e),r=async()=>(0,a.LO)(i.A.AUTH.logout),s=async e=>(0,a.fG)(`${i.A.ADMIN.userList}/${e}`),c=async()=>(0,a.fG)(i.A.ADMIN.getTimezoneOptions)},34588(e,t,n){n.d(t,{By:()=>c,Ht:()=>C,QS:()=>A,VB:()=>E,ZA:()=>y,_9:()=>x,ek:()=>f,gZ:()=>d,kn:()=>u,mF:()=>h,oG:()=>l,p_:()=>m,qL:()=>p,rW:()=>b,rY:()=>v,vF:()=>r,wD:()=>o,xx:()=>s,zT:()=>g});var a=n(91800),i=n(4891);const l=async e=>(0,a.fG)(i.A.THREE_D_AVATAR.checkDraft,e),o=async e=>(0,a.fG)(i.A.THREE_D_AVATAR.project,e),r=async e=>(0,a.fG)(`${i.A.THREE_D_AVATAR.project}/${e}/`),s=async e=>(0,a.IY)(`${i.A.THREE_D_AVATAR.project}/${e}/`),c=async e=>(0,a.LO)(i.A.THREE_D_AVATAR.project,e),d=async(e,t)=>(0,a.D9)(`${i.A.THREE_D_AVATAR.project}/${e}/`,t),p=async e=>(0,a.fG)(`${i.A.THREE_D_AVATAR.avatar}/${e}/`),m=async(e,t)=>(0,a.D9)(`${i.A.THREE_D_AVATAR.avatar}/${t}/`,e),u=async e=>(0,a.LO)(i.A.THREE_D_AVATAR.pomStats,e),g=async e=>(0,a.LO)(i.A.THREE_D_AVATAR.nearestPom,e),y=async e=>(0,a.fG)(i.A.THREE_D_AVATAR.options,{analysis:e}),h=async(e,t,n)=>(0,a.fG)(`${i.A[n].encrytedObj}${0!==e.length?`/${e}`:""}`,t),b=async()=>(0,a.fG)(i.A.THREE_D_AVATAR.comparisonOptions),A=async()=>(0,a.fG)(i.A.THREE_D_AVATAR.avatarSetComparison),E=async e=>(0,a.LO)(i.A.THREE_D_AVATAR.avatarSetComparison,e),v=async e=>(0,a.D9)(i.A.THREE_D_AVATAR.avatarSetComparison,e),x=async()=>(0,a.fG)(i.A.THREE_D_AVATAR.comparisonCharts),f=async()=>(0,a.fG)(i.A.THREE_D_AVATAR.avatarSingleComparison),C=async e=>(0,a.LO)(i.A.THREE_D_AVATAR.avatarSingleComparison,e)},91800(e,t,n){n.d(t,{Cz:()=>m,D9:()=>h,IY:()=>b,LO:()=>y,VY:()=>c,fG:()=>g});var a=n(96540),i=n(80817),l=n(53292),o=n(88943),r=n(93710),s=n(96467);const c="https://uat.aap.alva-services.com/",d=new Headers;d.append("User-Agent","Apifox/1.0.0 (https://www.apifox.cn)"),d.append("Accept","*/*"),d.append("Accept-Encoding","gzip, compress, br"),d.append("Access-Control-Allow-Headers","Origin, X-Requested-With, Content-Type, Accept");const p={headers:d,redirect:"follow",credentials:"include"},m=()=>{const e=(0,s.R)("csrftoken");d.set("x-csrftoken",e),d.set("Content-Type","application/json")},u=async(e,t)=>{try{const n=`${c}${e}`,r=await fetch(n,{...p,...t});if(r.ok){const e=r.headers.get("content-type");if("application/json"===e)return await r.json();if("image/png"===e)return await r.blob();if("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"===e||"application/x-zip-compressed"===e){return{fileBlob:await r.blob(),fileName:r.headers.get("content-disposition")}}}if(401===r.status&&"/login"!==window.location.pathname||403===r.status){const e=window.location.pathname+window.location.search;return"/login"!==window.location.pathname?window.location.assign(`/login?from=${encodeURIComponent(e)}`):window.location.assign("/login"),null}const s=await r.json();return i.ih.error("",{component:a.createElement(l.A,{open:!0,anchorOrigin:{vertical:"bottom",horizontal:"right"},autoHideDuration:5e3,sx:{bottom:"52px !important",right:"68px !important",".MuiPaper-root":{alignItems:"center",backgroundColor:"#f8332fd6"}}},a.createElement(o.A,{severity:"error",variant:"filled",sx:{".MuiAlert-message":{display:"flex",flexDirection:"row",minHeight:"30px",width:"200px",justifyContent:"space-between",alignItems:"center",overflow:"hidden",margin:0}}},a.createElement("p",null,s.detail)))}),null}catch(e){return i.ih.error("",{component:a.createElement(l.A,{open:!0,anchorOrigin:{vertical:"bottom",horizontal:"right"},autoHideDuration:5e3,sx:{bottom:"52px !important",right:"68px !important",".MuiPaper-root":{alignItems:"center",backgroundColor:"#f8332fd6"}}},a.createElement(o.A,{severity:"error",variant:"filled",sx:{".MuiAlert-message":{display:"flex",flexDirection:"row",minHeight:"30px",width:"200px",justifyContent:"space-between",alignItems:"center",overflow:"hidden",margin:0}}},a.createElement("p",null,"Sorry, unknown error occurred, please contact administrators")))}),null}},g=async(e,t)=>{const n=t?`${e}${(0,r.YK)(t)}`:e;return await u(n,{method:"GET"})},y=async(e,t,n)=>{const a=n?`${e}${(0,r.YK)(n)}`:e;return await u(a,{body:JSON.stringify(t||{}),method:"POST"})},h=async(e,t,n)=>{const a=n?`${e}${(0,r.YK)(n)}`:e;return await u(a,{body:JSON.stringify(t),method:"PATCH"})},b=async(e,t)=>{const n=t?`${e}${(0,r.YK)(t)}`:e;return await u(n,{method:"DELETE"})}},67385(e,t,n){n.d(t,{G$:()=>u,Hb:()=>o,Hs:()=>s,Me:()=>b,WL:()=>d,Yd:()=>l,d8:()=>c,ds:()=>h,hL:()=>r,jP:()=>m,m5:()=>y,rr:()=>p,wB:()=>g});var a=n(4891),i=n(91800);const l=async e=>(0,i.fG)(a.A.MYALVA.overviewOptions,e),o=async()=>(0,i.fG)(a.A.MYALVA.measurementOptions),r=async e=>(0,i.LO)(a.A.MYALVA.overviewData,{key:"ethnicity",common_config:e}),s=async e=>(0,i.LO)(a.A.MYALVA.overviewData,{key:"gender_age",common_config:e}),c=async e=>(0,i.LO)(a.A.MYALVA.overviewData,{key:"locations",common_config:e}),d=async(e,t)=>(0,i.LO)(a.A.MYALVA.overviewData,{key:"category_size",common_config:e,config:t}),p=async(e,t,n)=>(0,i.LO)(a.A.MYALVA.overviewData,{key:"dc",common_config:e,config:t,type:n}),m=async(e,t,n)=>(0,i.LO)(a.A.MYALVA.overviewData,{key:"sp",common_config:e,config:t,type:n}),u=async(e,t,n)=>(0,i.LO)(a.A.MYALVA.overviewData,{key:"avatars",common_config:e,config:t,type:n}),g=async(e,t,n)=>(0,i.D9)(a.A.MYALVA.deliverablesBatchUpdate,{config:n},{analysis:e,delivery_type:t}),y=async e=>(0,i.fG)(a.A.MYALVA.populationOptions,e),h=async e=>(0,i.LO)(a.A.MYALVA.populationCount,e),b=async e=>(0,i.fG)(`${a.A.MYALVA.standardCollectionDetail}/${e}/`)},70466(e,t,n){n.d(t,{EC:()=>r,F6:()=>o,L_:()=>s,kH:()=>l,uf:()=>c});var a=n(91800),i=n(4891);const l=async e=>(0,a.fG)(i.A.ORGANIZATION.organizations,e),o=async e=>(0,a.fG)(`${i.A.ORGANIZATION.organizations}/${e}`),r=async e=>(0,a.LO)(`${i.A.ORGANIZATION.organizations}/`,e),s=async(e,t)=>(0,a.D9)(`${i.A.ORGANIZATION.organizations}/${e}/`,t),c=async e=>(0,a.fG)(i.A.ORGANIZATION.permissionTemplate,e)},8094(e,t,n){n.d(t,{$X:()=>j,C:()=>d,E0:()=>u,EM:()=>$,ER:()=>L,GG:()=>B,GS:()=>v,I2:()=>F,Js:()=>_,Kj:()=>k,Mk:()=>S,N0:()=>g,Ng:()=>h,QU:()=>R,TY:()=>x,U$:()=>M,WE:()=>m,Wm:()=>A,Yk:()=>z,b1:()=>y,e_:()=>b,j4:()=>w,m4:()=>C,oj:()=>O,pN:()=>T,q4:()=>D,sL:()=>I,sw:()=>r,uQ:()=>E,vF:()=>o,vr:()=>s,wD:()=>l,xx:()=>c,y$:()=>p,yO:()=>P,z1:()=>f});var a=n(91800),i=n(4891);const l=async e=>(0,a.fG)(i.A.PROJECT_VIEW.getProjectList,e),o=async e=>(0,a.fG)(`${i.A.PROJECT_VIEW.getProjectList}/${e}/`),r=async e=>(0,a.LO)(i.A.PROJECT_VIEW.getProjectList,e),s=async(e,t)=>(0,a.D9)(`${i.A.PROJECT_VIEW.getProjectList}/${e}/`,t),c=async(e,t)=>(0,a.IY)(`${i.A.PROJECT_VIEW.getProjectList}/${e}`,t),d=async e=>(0,a.fG)(i.A.PROJECT_VIEW.getProjectHistory,e),p=async()=>(0,a.fG)(i.A.PROJECT_VIEW.getOptions,{domain:"ProjectClient"}),m=async e=>(0,a.fG)(`${i.A.PROJECT_VIEW.pptSource}/${e}/`),u=async(e,t)=>(0,a.fG)(`${i.A.PROJECT_VIEW.ppt}/${e}/`,t),g=async e=>(0,a.fG)(`${i.A.PROJECT_VIEW.downloadSDAFile}/${e}/`),y=async(e,t)=>(0,a.fG)(i.A.PROJECT_VIEW.checkDownloadStatus,{pk:e,domain:t}),h=async e=>(0,a.fG)(i.A.PROJECT_VIEW.checkM4MData,e),b=async e=>(0,a.fG)(i.A.PROJECT_VIEW.marketCoverage,e),A=async e=>(0,a.LO)(i.A.PROJECT_VIEW.marketCoverage,e),E=async e=>(0,a.IY)(`${i.A.PROJECT_VIEW.marketCoverage}/${e}/`),v=async(e,t)=>(0,a.fG)(`${i.A.PROJECT_VIEW.marketCoverageCharts}/${e}/`,{type:t}),x=async(e,t)=>(0,a.fG)(`${i.A.PROJECT_VIEW.marketCoverage}/download/${e}/`,t),f=async e=>(0,a.fG)(i.A.PROJECT_VIEW.standardSizeChartList,e),C=async e=>(0,a.fG)(i.A.PROJECT_VIEW.population,e),w=async(e,t)=>(0,a.D9)(`${i.A.PROJECT_VIEW.population}/${e}/`,t),_=async e=>(0,a.IY)(`${i.A.PROJECT_VIEW.population}/${e}/`),S=async e=>(0,a.LO)(i.A.PROJECT_VIEW.population,e),k=async e=>(0,a.fG)(i.A.PROJECT_VIEW.populationMap,{...e,return_tree:!0}),z=async e=>(0,a.fG)(`${i.A.COMPETITOR_VIEW.downloadOverviewFiles}/${e}/`),R=async e=>(0,a.fG)(i.A.SIZE_CHART.getFilterOptions,{...e,main_option:"category"}),D=async e=>(0,a.fG)(i.A.SIZE_CHART.getFilterOptions,{...e,main_option:"measurement_method"}),O=async e=>(0,a.fG)(i.A.SIZE_CHART.getFilterOptions,{...e,main_option:"country"}),F=async e=>(0,a.fG)(i.A.SIZE_CHART.getFilterOptions,{...e,main_option:"garment_size"}),I=async e=>(0,a.fG)(i.A.SIZE_CHART.getFilterOptions,{...e,main_option:"inseam_type"}),T=async e=>(0,a.fG)(i.A.PROJECT_VIEW.sbsList,e),j=async e=>(0,a.fG)(i.A.PROJECT_VIEW.sbsDeliverables,e),$=async(e,t)=>(0,a.D9)(`${i.A.PROJECT_VIEW.sbsDeliverables}/${e}/`,t),P=async e=>(0,a.LO)(i.A.PROJECT_VIEW.sbsDeliverables,e),B=async e=>(0,a.IY)(`${i.A.PROJECT_VIEW.sbsDeliverables}/${e}/`),M=async e=>(0,a.LO)(i.A.PROJECT_VIEW.sbsList,e),L=async(e,t)=>(0,a.IY)(`${i.A.PROJECT_VIEW.sbsList}/${e}/`,t)},57162(e,t,n){n.d(t,{$E:()=>l,$h:()=>d,E1:()=>o,Oz:()=>g,Q_:()=>u,Rr:()=>s,Tj:()=>m,Ur:()=>h,Wf:()=>r,ZC:()=>b,as:()=>c,g0:()=>E,n4:()=>p,sT:()=>A,wv:()=>y});var a=n(91800),i=n(4891);const l=async e=>(0,a.fG)(i.A.SIZE_CHART.getAllSizes,e),o=async()=>(0,a.fG)(i.A.SIZE_CHART.getAllBrands),r=async e=>(0,a.LO)(i.A.USER.star,e),s=async e=>(0,a.fG)(i.A.USER.downloadList,e),c=async()=>(0,a.fG)(i.A.DATA_QUERY.option),d=async e=>(0,a.LO)(i.A.DATA_QUERY.data,e),p=async e=>(0,a.LO)(i.A.DATA_QUERY.download,e),m=async e=>(0,a.fG)(i.A.USER.settings,e),u=async e=>(0,a.D9)(i.A.USER.settings,e),g=async()=>(0,a.fG)(i.A.DATASET_PROFILER.options),y=async e=>(0,a.fG)(i.A.DATASET_PROFILER.data,e),h=async e=>(0,a.fG)(i.A.DATASET_PROFILER.summary,e),b=async()=>(0,a.fG)(i.A.USER.releaseNoteCount),A=async e=>(0,a.fG)(i.A.USER.releaseNote,e),E=async e=>(0,a.LO)(i.A.USER.readReleaseNote,{release_note_ids:e})},96467(e,t,n){n.d(t,{R:()=>a,S:()=>i});const a=e=>{const t=`${e}=`,n=document.cookie.split(";").filter(e=>e.includes(t)).at(-1)||"";return n?.split("=")?.[1]||null},i=e=>{const{fileBlob:t,fileName:n}=e,a=decodeURI(n).split("=")[1],i=URL.createObjectURL(t),l=document.createElement("a");l.setAttribute("href",i),l.setAttribute("download",a),document.body.appendChild(l),l.click(),document.body.removeChild(l),setTimeout(()=>{URL.revokeObjectURL(i)},1e4)}},93710(e,t,n){n.d(t,{A2:()=>b,Eg:()=>p,F_:()=>v,Ml:()=>_,R8:()=>s,WG:()=>A,YK:()=>g,go:()=>d,jp:()=>f,kS:()=>c,or:()=>y,pv:()=>C,ql:()=>E,s5:()=>x,t0:()=>w,wR:()=>h});var a=n(40357),i=n(14654);const l={year:"numeric",month:"2-digit",day:"2-digit"},o={year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"},r={year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"},s=e=>e?new Date(e).toLocaleString("zh",{...l,timeZone:i.M.getState().auth.currentUser.timezone||void 0}).replaceAll("/","-"):"----",c=e=>new Date(e).toLocaleString("zh-cn",{...o,timeZone:i.M.getState().auth.currentUser.timezone||void 0}).replaceAll("/","-"),d=e=>new Date(e).toLocaleString("zh-cn",{...r,timeZone:i.M.getState().auth.currentUser.timezone||void 0}).replaceAll("/","-"),p=e=>e.toLocaleString("en-GB"),m=e=>Array.from(new Set(e.map(e=>Object.keys(e)).flat())),u=e=>"string"==typeof e?e.replaceAll("&","%26"):e,g=e=>`?${Object.keys(e).map(t=>Array.isArray(e[t])?`${t}=${u(e[t].join(","))}`:`${t}=${u(e[t])}`).join("&")}`,y=e=>e.replaceAll("_"," ").toUpperCase(),h=e=>"string"==typeof e?e.split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" "):e,b=e=>{const t=e.map(e=>({size:e?.size,...e?.country})),n=e.map(e=>({size:e?.size,...e?.pom?.cm})),a=e.map(e=>({size:e?.size,...e?.pom?.inch}));return[{name:"Size Conversion",headers:m(t),data:t},{name:"cm",headers:m(n),data:n},{name:"inch",headers:m(a),data:a}]},A=(e,t)=>Array.isArray(t)?!!t.find(n=>e.includes(n)||t.includes("Global")):e.includes(t),E=(e,t)=>{if("core_size"===t)return e.map(e=>e.size);if("unit"===t)return["cm","inch"];if("pom"===t){const t=(e=>{const t=e.map(e=>({size:e?.size,...e?.country})),n=e.map(e=>({size:e?.size,...e?.pom?.cm})),a=e.map(e=>({size:e?.size,...e?.pom?.inch}));return[{name:"Size Conversion",headers:m(t),data:t},{name:"Size Chart - cm",headers:m(n),data:n},{name:"Size Chart - inch",headers:m(a),data:a}]})(e),n=t[1],a=t[2];return Array.from(new Set([...n.headers,...a.headers])).filter(e=>"size"!==e)}return[]},v=(e,t,n)=>"age"===e&&null!==n&&null!==t?`${t} - ${n}`:null===n?`${e||""} >= ${t}`:null===t?`${e||""} <= ${n}`:`${0===t?"":`${t} <=`} ${e} ${0===n?"":`<= ${n}`}`,x=e=>Array.isArray(e)?e.map(e=>"object"==typeof e?Object.entries(e).map(e=>e.join(": ")).join(", "):e).join("; "):"object"==typeof e?Object.entries(e).map(e=>e.join(": ")).join(", "):e,f=e=>{const t=Object.keys(e).sort();return t.length>0?t.map(t=>e?.[t].map(e=>({value:e,group:t}))).flat():[]},C=(e,t)=>"PROJECT_VIEW"===e||"BodyScan"===e?void 0!==t&&0!==t.length?t.map(e=>a.Av.find(t=>t.key===e)?.pomPathKey):"consultant":"my_alva",w={},_=[]},61221(e,t,n){n.d(t,{A:()=>m});var a=n(31601),i=n.n(a),l=n(76314),o=n.n(l),r=n(4417),s=n.n(r),c=new URL(n(46008),n.b),d=o()(i()),p=s()(c);d.push([e.id,`body{font-family:"Roboto",sans-serif;margin:0;overscroll-behavior:none}body #root{display:flex;color:#5f504d;background-color:#fff}body #root #card-container{padding:32px;width:1130px;justify-self:center}body #root a{text-decoration:none}body #root #detail{background-color:#fff}body #root .h4-title{font-weight:500}body #root .alvanon-app-bar{justify-content:center;background-color:#fff;height:40px;padding:0 10px;box-shadow:none;border-bottom:1px #ccc solid}body #root .alvanon-app-bar .MuiTabs-indicator{display:none}body #root .alvanon-app-bar .env-tag{height:20px;background-color:rgba(236,119,0,.1);color:#ec7700;font-weight:700;border-radius:4px}body #root .alvanon-app-bar .env-tag .MuiChip-label{padding:0 8px;margin-top:1px;letter-spacing:1px;font-size:12px}body #root .alvanon-app-bar .alvanon-app-bar-container{justify-content:space-between;min-height:40px !important}body #root .alvanon-app-bar .alvanon-app-bar-container img{height:40px;width:125.71px}body #root .app-bar-tabs{min-width:80px;background-color:#fff;border-bottom:none;min-height:32px;z-index:inherit;margin-right:10px;margin-top:8px;font-size:12px;padding:5px 20px;font-weight:800;border-top:3px solid rgba(0,0,0,0)}body #root .app-bar-tabs.Mui-selected{background-color:#fff;border-top:3px solid #ec7700}body #root .app-bar-tabs:hover{color:#ec7700}body #root .alvanon-content{padding-top:40px;width:100%;height:calc(100% - 40px);background-image:url(${p});position:relative;display:flex;justify-content:center;align-items:start;min-height:calc(100vh - 40px)}body #root .overview-tab-style{border-radius:10px 10px 0 0;text-transform:none}body #root .overview-section-title{color:#383838}body #root .overview-section-title.sub{font-size:17px}body #root .selected-filter-display{width:100%;grid-template-columns:repeat(var(--repeat-count), var(--track-size)) var(--expand-col)}body #root .selected-filter-display.expand{display:flex;grid-template-columns:none}body #root .selected-filter-display.collaspe{display:grid}body #root .selected-filter-display.hide{height:0}body #root .selected-filter-display.show{height:auto}body #root .selected-filter-display .expand-button{padding:0;width:64px}body #root .selected-filter-display .filter-text{position:relative;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;min-width:100px}body #root .selected-filter-display .filter-text .filter-text-block{max-width:calc(100%/var(--col-count, 1) - 16px)}body #root .project-list-page{padding:var(--container-padding, 20px);height:calc(100vh - 100px);position:relative;overflow-y:hidden}body #root .project-list-page .header-transition{position:relative;top:0;transition:top .3s ease-out}body #root .project-list-page .header-transition .project-list-header{width:100%;display:flex;flex-direction:row;justify-content:space-between;align-items:center}body #root .project-list-page .header-transition .project-list-header .title{padding:0 10px;justify-content:flex-start}body #root .project-list-page .header-transition .project-list-header .title h4{padding-right:15px}body #root .project-list-page .header-transition .filters-container{padding-left:10px}body #root .project-list-page .header-transition .filters-container .chips-container{margin-right:34px}body #root .project-list-page .header-transition .filters-container .chips-container .chip{background-color:rgba(229,229,229,.42);color:gray;border-radius:8px}body #root .project-list-page .header-transition .filters-container .chips-container .chip.is-active{background-color:rgba(255,141,26,.4);color:#000}body #root .project-list-page .list-transition{background-color:#fff;color:#544744;position:relative;width:auto;top:0;height:calc(100vh - 180px);transition:all .3s ease-out}body #root .project-list-page.is-hidden .header-transition{top:var(--header-hide-offset, -62px)}body #root .project-list-page.is-hidden .list-transition{top:var(--list-move-offset, -93px);height:calc(100vh - 93px)}body #root .project-page-header{width:100%;padding:0 20px;box-sizing:border-box;display:flex;flex-direction:row;justify-content:space-between;align-items:center}body *::-webkit-scrollbar{width:.5rem;height:.5rem}body *::-webkit-scrollbar-thumb{background-color:#aaa;border-radius:40px}body *::-webkit-scrollbar-track{background-color:#fff}body .rv-discrete-color-legend-item{padding:0 10px}body .redux-toastr .bottom-right{width:200px}body .redux-toastr .toastr{background-color:rgba(0,0,0,0);box-shadow:none;opacity:1}body .redux-toastr .toastr:hover:not(.rrt-message){box-shadow:none}body .redux-toastr .toastr.rrt-error{background-color:rgba(0,0,0,0)}body .redux-toastr .toastr .close-toastr{display:none}body .js-plotly-plot .plotly,body .js-plotly-plot .plotly div,body .js-plotly-plot .plotly canvas{font-family:"source-han-sans-cn-variable",sans-serif;font-variation-settings:"wght" 450}body .jexcel>tbody>tr>td.readonly{color:#5f504d}`,""]);const m=d},38328(e,t,n){n.d(t,{A:()=>r});var a=n(31601),i=n.n(a),l=n(76314),o=n.n(l)()(i());o.push([e.id,".login-container{height:100vh;width:100vw;display:flex;justify-content:center;align-items:center;flex-direction:column}.login-container .user-input{margin:10px}.login-container img{width:300px}.login-container form{display:flex;flex-direction:column}",""]);const r=o},97721(e){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAACXBIWXMAAAsTAAALEwEAmpwYAAAFuGlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS42LWMxNDUgNzkuMTYzNDk5LCAyMDE4LzA4LzEzLTE2OjQwOjIyICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdEV2dD0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlRXZlbnQjIiB4bWxuczpkYz0iaHR0cDovL3B1cmwub3JnL2RjL2VsZW1lbnRzLzEuMS8iIHhtbG5zOnBob3Rvc2hvcD0iaHR0cDovL25zLmFkb2JlLmNvbS9waG90b3Nob3AvMS4wLyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ0MgMjAxOSAoV2luZG93cykiIHhtcDpDcmVhdGVEYXRlPSIyMDE5LTAxLTMxVDE4OjU1OjA4WiIgeG1wOk1ldGFkYXRhRGF0ZT0iMjAxOS0wMS0zMVQxODo1NTowOFoiIHhtcDpNb2RpZnlEYXRlPSIyMDE5LTAxLTMxVDE4OjU1OjA4WiIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDphMTlhZDJmOC1kMDI2LTI1NDItODhjOS1iZTRkYjkyMmQ0MmQiIHhtcE1NOkRvY3VtZW50SUQ9ImFkb2JlOmRvY2lkOnBob3Rvc2hvcDpkOGI5NDUyMS00ZjEwLWQ5NDktYjUwNC0wZmU1N2I3Nzk1MDEiIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDplMzdjYmE1ZS1hYTMwLWNkNDUtYTAyNS1lOWYxZjk2MzUzOGUiIGRjOmZvcm1hdD0iaW1hZ2UvcG5nIiBwaG90b3Nob3A6Q29sb3JNb2RlPSIzIj4gPHhtcE1NOkhpc3Rvcnk+IDxyZGY6U2VxPiA8cmRmOmxpIHN0RXZ0OmFjdGlvbj0iY3JlYXRlZCIgc3RFdnQ6aW5zdGFuY2VJRD0ieG1wLmlpZDplMzdjYmE1ZS1hYTMwLWNkNDUtYTAyNS1lOWYxZjk2MzUzOGUiIHN0RXZ0OndoZW49IjIwMTktMDEtMzFUMTg6NTU6MDhaIiBzdEV2dDpzb2Z0d2FyZUFnZW50PSJBZG9iZSBQaG90b3Nob3AgQ0MgMjAxOSAoV2luZG93cykiLz4gPHJkZjpsaSBzdEV2dDphY3Rpb249InNhdmVkIiBzdEV2dDppbnN0YW5jZUlEPSJ4bXAuaWlkOmExOWFkMmY4LWQwMjYtMjU0Mi04OGM5LWJlNGRiOTIyZDQyZCIgc3RFdnQ6d2hlbj0iMjAxOS0wMS0zMVQxODo1NTowOFoiIHN0RXZ0OnNvZnR3YXJlQWdlbnQ9IkFkb2JlIFBob3Rvc2hvcCBDQyAyMDE5IChXaW5kb3dzKSIgc3RFdnQ6Y2hhbmdlZD0iLyIvPiA8L3JkZjpTZXE+IDwveG1wTU06SGlzdG9yeT4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz4En6MDAAAAX0lEQVQYlX3KOw6AIBBAwS32RpJADXfx0pTET+ERZJ8F8RODFtONsG0QAoh0CSDM82dqodaBdQXnfoLZQM7gPai+wjNNE8R4pTuAYNZSKZASqL7CMy0LxNgJp30fKYUDi3+vIqb/+rUAAAAASUVORK5CYII="},41795(e){e.exports="data:image/svg+xml,%0A%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2724%27 height=%2724%27 viewBox=%270 0 24 24%27%3E%3Cpath fill=%27none%27 d=%27M0 0h24v24H0V0z%27/%3E%3Cpath d=%27M7 10l5 5 5-5H7z%27 fill=%27gray%27/%3E%3C/svg%3E"},81417(e){e.exports="data:image/svg+xml,%0A%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2724%27 height=%2724%27 viewBox=%270 0 24 24%27%3E%3Cpath fill=%27none%27 d=%27M0 0h24v24H0V0z%27/%3E%3Cpath d=%27M7 10l5 5 5-5H7z%27 fill=%27lightgray%27/%3E%3C/svg%3E"},37311(e){e.exports="data:image/svg+xml,%0A%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2724%27 height=%2724%27 viewBox=%270 0 24 24%27%3E%3Cpath fill=%27none%27 d=%27M0 0h24v24H0V0z%27/%3E%3Cpath d=%27M7 14l5-5 5 5H7z%27 fill=%27gray%27/%3E%3C/svg%3E"},67392(e){e.exports="data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 fill=%27gray%27 width=%2718px%27 height=%2718px%27%3E%3Cpath d=%27M10 18h4v-2h-4v2zM3 6v2h18V6H3zm3 7h12v-2H6v2z%27/%3E%3Cpath d=%27M0 0h24v24H0z%27 fill=%27none%27/%3E%3C/svg%3E"},11455(e){e.exports="data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2724%27 height=%2724%27 viewBox=%270 0 24 24%27%3E%3Cpath d=%27M10 17l5-5-5-5v10z%27/%3E%3Cpath fill=%27none%27 d=%27M0 24V0h24v24H0z%27/%3E%3C/svg%3E"},18420(e){e.exports="data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2724%27 height=%2724%27 viewBox=%270 0 24 24%27%3E%3Cpath d=%27M14 7l-5 5 5 5V7z%27/%3E%3Cpath fill=%27none%27 d=%27M24 0v24H0V0h24z%27/%3E%3C/svg%3E"},93553(e){e.exports="data:image/svg+xml;base64,PHN2ZyBmaWxsPSdibGFjaycgaGVpZ2h0PScyNCcgdmlld0JveD0nMCAwIDI0IDI0JyB3aWR0aD0nMjQnIHhtbG5zPSdodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2Zyc+PHBhdGggZD0nTTcgMTBsNSA1IDUtNXonLz48cGF0aCBkPSdNMCAwaDI0djI0SDB6JyBmaWxsPSdub25lJy8+PC9zdmc+"},46008(e,t,n){e.exports=n.p+"2b9bbbe4f8f81b5a1cb0.png"},74263(e,t,n){e.exports=n.p+"31fa6b1654379c025876.png"}},e=>{e.O(0,[243,6311,5853,5244,8023,231,7843,940,5961,4514,5052,7930,6800,6837,9851,9171,6877,1144,5090,7053,7162,8607,578,3825,6730,2059,3935,620],()=>e(e.s=31611)),e.O()}]);