@reltio/remotes 1.4.1104 → 1.4.1107

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/1920.js CHANGED
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[1920],{49965:(e,t,r)=>{r.d(t,{Z:()=>i});var n=r(24328),a=r.n(n),l=r(96479);function o(){return o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},o.apply(this,arguments)}const i=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const r=(0,n.forwardRef)(((r,n)=>(0,l.S)()?a().createElement(e,o({},r,{ref:n})):t&&a().createElement(t,o({},r,{ref:n}))));return r.displayName="WithAsyncMount",r}},19592:(e,t,r)=>{r.d(t,{Z:()=>p});var n=r(24328),a=r.n(n),l=r(71153),o=r.n(l),i=r(22385),s=r(98989);const c=(0,r(79692).Z)({expandButton:{"&:hover":{backgroundColor:"transparent"}},expandIcon:{transition:"transform .15s ease"},expanded:{transform:"rotate(90deg)"}});function u(){return u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},u.apply(this,arguments)}const p=e=>{const t=c(),{expanded:r,className:n}=e,l=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["expanded","className"]);return a().createElement(i.Z,u({icon:s.Z,size:"XXS",disableRipple:!0,iconClassName:o()(t.expandIcon,{[t.expanded]:r}),className:o()(n,t.expandButton)},l))}},92778:(e,t,r)=>{r.d(t,{Z:()=>c});var n=r(24328),a=r.n(n),l=r(15223),o=r(94079);const i=(0,r(79692).Z)({toolbar:{minHeight:"48px",padding:"8px 24px",lineHeight:"28px"},title:{fontSize:"18px",fontWeight:"normal",lineHeight:"inherit",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}});function s(){return s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s.apply(this,arguments)}const c=e=>{let{title:t,children:r=null,classes:n={}}=e,c=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["title","children","classes"]);const u=i();return a().createElement(l.Z,s({className:n.root,classes:{root:u.toolbar}},c),a().createElement(o.Typography,{className:n.title,classes:{root:u.title},variant:"h6"},t),r)}},9371:(e,t,r)=>{r.d(t,{J:()=>F});var n=r(24328),a=r.n(n),l=r(94079),o=r(87918),i=r.n(o),s=r(43054),c=r(55847),u=r(8818),p=r(52730),m=r(71153),d=r.n(m),g=r(17440),b=r(87638),f=r(99493),h=r(31274),y=r(31039);const x=(e,t)=>{const r=e.relatedObjectUris.indexOf(t);if(r>=0)return e.relatedObjectUris[1-r]},v=e=>`${i().date(e,"LT")} ${i().date(e,"LL")}`;var E=r(79692);const w=(0,E.Z)((e=>({title:{marginBottom:"10px",color:e.palette.divider,fontSize:"12px",lineHeight:"14px"},label:{paddingLeft:"9px",borderLeft:"1px solid #D8D8D8",fontSize:"13px",color:e.palette.text.primary,lineHeight:"15px"},link:{color:e.palette.primary.main,textDecoration:"none"}}))),C=e=>{let{comment:t,className:r}=e;const o=w(),s=(0,p.useSelector)(b.ZP.selectors.getEntity),c=(0,p.useSelector)(b.ZP.selectors.getMetadata),u=(0,n.useContext)(h.X);return a().createElement(l.Box,{className:r},(()=>{switch(t.objectType){case f.q7e.ENTITY_ATTRIBUTE:{const e=(0,f.AFK)(t.objectId,s.type),r=(0,f.zeJ)(c,e);return a().createElement(a().Fragment,null,a().createElement(l.Typography,{className:o.title},i().text("Selected attribute:")),a().createElement(l.Typography,{className:o.label},null==r?void 0:r.label))}case f.q7e.RELATION_ATTRIBUTE:{const e=t.relatedObjectUris.find((0,g.startsWith)("configuration/relationTypes")),r=(0,f.AFK)(t.objectId,e),n=(0,f.zeJ)(c,r);return a().createElement(a().Fragment,null,a().createElement(l.Typography,{className:o.title},i().text("Selected attribute:")),a().createElement(l.Typography,{className:o.label},null==n?void 0:n.label))}case f.q7e.ENTITY:return a().createElement(a().Fragment,null,a().createElement(l.Typography,{className:o.title},i().text("Selected profile:")),a().createElement(y.Z,{className:d()(o.label,o.link),value:(0,f.wwR)(s)},(0,f.idV)(s.label)));case f.q7e.RELATION:{var e;const r=x(t,s.uri),n={uri:r,label:null===(e=u[r])||void 0===e?void 0:e.label};return a().createElement(a().Fragment,null,a().createElement(l.Typography,{className:o.title},i().text("Selected relation:")),a().createElement(l.Typography,{className:o.label},a().createElement(y.Z,{className:o.link,value:(0,f.wwR)(s)},(0,f.idV)(s.label)),r&&a().createElement(a().Fragment,null,` ${i().text("to")} `,a().createElement(y.Z,{className:o.link,value:(0,f.wwR)(n)},n.label?(0,f.idV)(n.label):(0,f.BTI)(n)))))}case f.q7e.POTENTIAL_MATCH:{var r;const e=x(t,s.uri),n={uri:e,label:null===(r=u[e])||void 0===r?void 0:r.label};return a().createElement(a().Fragment,null,a().createElement(l.Typography,{className:o.title},i().text("Selected potential match:")),a().createElement(l.Typography,{className:o.label},a().createElement(y.Z,{className:o.link,value:(0,f.wwR)(s)},(0,f.idV)(s.label)),e&&a().createElement(a().Fragment,null,` ${i().text("and")} `,a().createElement(y.Z,{className:o.link,value:(0,f.wwR)(n)},n.label?(0,f.idV)(n.label):(0,f.BTI)(n)))))}default:return null}})())};var O=r(49759);const T=(0,E.Z)((e=>({root:{color:e.palette.text.primary,fontSize:"13px",lineHeight:"15px",wordBreak:"break-word"}}))),N=e=>{let{comment:t,className:r}=e;const o=T(),i=(0,n.useContext)(O.s);return a().createElement(l.Typography,{className:d()(o.root,r)},function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e=>e,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"+";const a=[];let l="",o=!1;for(let i=0;i<=e.length;i++){const s=e[i],c=e[i+1],u=i===e.length-1;l+=s,s===n&&0===i&&(o=!0),o&&t.includes(l.slice(n.length))&&(o=!1,a.push(r(l)),l=""),c===n&&(o=!0,a.push(l),l=""),u&&a.push(l)}return a}(t.content,t.namedUsers,(e=>{const t=i.find((t=>t.username===e.slice(1)));return t?a().createElement(l.Link,{href:`mailto:${t.email}`},e):e})).map(((e,t)=>a().createElement(n.Fragment,{key:t},e))))};var S=r(43434);const k=(0,E.Z)((e=>({root:{width:"32px",height:"32px",fontSize:"12px",color:e.palette.text.secondary,backgroundColor:"rgba(144, 164, 174, 0.2)"}})));function A(){return A=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},A.apply(this,arguments)}const P=e=>{let{className:t,children:r}=e,n=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["className","children"]);const l=k();return a().createElement(S.Z,A({},n,{className:d()(l.root,t)}),r.split(".").map((e=>e[0].toUpperCase())).join(""))};var Z=r(3515);const I=(0,E.Z)((e=>({header:{display:"flex"},avatar:{marginRight:"8px"},username:{marginBottom:"1px",color:e.palette.text.primary,fontSize:"13px",fontWeight:500,lineHeight:"15px"},createdAt:{marginTop:"3px",marginRight:"4px",color:e.palette.text.secondary,fontSize:"11px",lineHeight:"13px",whiteSpace:"nowrap"},body:{marginLeft:"40px"},commentTarget:{marginTop:"-15px"},message:{marginTop:"12px"},dropdownMenu:{zIndex:"3000 !important"},buttons:{marginTop:"15px",marginBottom:"12px",display:"flex","& $button + $button":{marginLeft:"10px"}},button:{fontSize:"13px",lineHeight:"15px"}}))),L=e=>{let{onReply:t,className:r,uri:o,comment:m,onStartEditing:d}=e;const g=I(),f=(0,p.useSelector)(b.ZP.selectors.getUserName),h=m.createdBy===f,{resolveThread:y,reOpenThread:x,sending:E,deleteComment:w}=(0,n.useContext)(Z.h),O=(0,n.useMemo)((()=>[{text:i().text("Edit"),onClick:d},{text:i().text("Delete"),onClick:()=>w({uri:o,commentId:m.commentId})}]),[d,w,o,m]);return a().createElement(l.Box,{className:r},a().createElement(l.Box,{className:g.header},a().createElement(P,{classes:{root:g.avatar}},m.createdBy),a().createElement(l.Box,{width:"100%"},a().createElement(l.Typography,{className:g.username},m.createdBy)),a().createElement(l.Typography,{className:g.createdAt},v(m.createdTime)),h&&a().createElement(c.Z,{buttonComponent:u.k,buttonProps:{icon:s.Z,tooltipTitle:i().text("Open menu")},popoverProps:{PopoverClasses:{root:g.dropdownMenu}},menuItems:O,menuId:"collaboration-comment-menu"})),a().createElement(l.Box,{className:g.body},a().createElement(C,{comment:m,className:g.commentTarget}),a().createElement(N,{comment:m,className:g.message}),a().createElement(l.Box,{className:g.buttons},a().createElement(l.Link,{className:g.button,onClick:t,component:"button"},i().text("Reply")),"open"===m.status&&a().createElement(l.Link,{disabled:E,className:g.button,onClick:()=>{y({commentId:m.commentId,uri:o})},component:"button"},i().text("Resolve")),"resolved"===m.status&&a().createElement(l.Link,{disabled:E,className:g.button,onClick:()=>{x({commentId:m.commentId,uri:o})},component:"button"},i().text("Re-open")))))},j=(0,E.Z)((e=>({root:{display:"flex",padding:"8px",borderRadius:"4px",backgroundColor:"rgba(0,114,206,0.06)"},avatar:{marginRight:"8px"},header:{display:"flex",marginBottom:"8px"},username:{color:e.palette.text.primary,fontSize:"13px",fontWeight:500,lineHeight:"15px"},message:{marginBottom:"8px",color:e.palette.text.primary,fontSize:"13px",lineHeight:"15px"},createdAt:{color:e.palette.text.secondary,fontSize:"11px",lineHeight:"13px",whiteSpace:"nowrap"},marked:{marginLeft:"8px",color:e.palette.text.secondary,fontSize:"13px",fontStyle:"italic",lineHeight:"15px"}}))),D=e=>{let{className:t,reply:r}=e;const{createdBy:n,action:o,createdTime:s}=r,c=j();return a().createElement(l.Box,{className:d()(c.root,t)},a().createElement(P,{classes:{root:c.avatar}},n),a().createElement(l.Box,null,a().createElement(l.Box,{className:c.header},a().createElement(l.Typography,{className:c.username},n),"resolve"===o&&a().createElement(l.Typography,{className:c.marked},i().text("Marked as resolved")),"reopen"===o&&a().createElement(l.Typography,{className:c.marked},i().text("Re-opened"))),"resolve"!==o&&a().createElement(N,{className:c.message,comment:r}),a().createElement(l.Typography,{className:c.createdAt},v(s))))};var R=r(2271);const V=(0,E.Z)((e=>({root:{width:"100%",backgroundColor:"#fff",fontFamily:"Roboto","&__control":{fontSize:"13px"},"&__highlighter":{padding:"10px 22px",border:"1px solid transparent !important",maxHeight:"70px"},"&__input":{borderRadius:"2px",border:"1px solid rgba(0,0,0,0.12)",padding:"10px 22px",outline:0,maxHeight:"70px",overflow:"auto !important"},"&__suggestions":{padding:"8px 0",borderRadius:"4px",backgroundColor:"#fafafa !important",boxShadow:"0 2px 2px 0 rgba(0,0,0,0.14), 0 3px 1px -2px rgba(0,0,0,0.12), 0 1px 5px 0 rgba(0,0,0,0.2)",transform:"translateY(-100%)"},"&__suggestions__list":{maxHeight:"200px",overflowY:"scroll"},"&__suggestions__item":{padding:"6px 12px",color:e.palette.text.primary,fontSize:"13px",transition:e.transitions.create(["background-color"]),"&:hover, &--focused":{backgroundColor:"rgba(0,0,0,0.04)"}}},mention:{position:"relative",zIndex:1,color:e.palette.primary.main,textShadow:"1px 1px 1px white, 1px -1px 1px white, -1px 1px 1px white, -1px -1px 1px white",pointerEvents:"none"}})));function B(){return B=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},B.apply(this,arguments)}const M=e=>{let{onChange:t,className:r}=e,l=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["onChange","className"]);const o=V(),i=(0,n.useContext)(O.s);return a().createElement(R.r,B({},l,{onChange:(e,r,n,a)=>{t(r,n,(0,g.uniq)(a.map((e=>{let{display:t}=e;return t.slice(1)}))))},className:d()(o.root,r)}),a().createElement(R.p,{trigger:"+",data:i.map((e=>{let{username:t}=e;return{id:t,display:t}})),displayTransform:(e,t)=>`+${t}`,appendSpaceOnAdd:!0,className:o.mention}))},U=(0,E.Z)({root:{padding:"6px 6px 6px 8px",borderRadius:"4px",backgroundColor:"rgba(0,114,206,0.06)"},textField:{maxWidth:"calc(100% - 40px)"},form:{marginBottom:0},main:{display:"flex",alignItems:"center"},avatar:{marginRight:"8px"},buttons:{marginLeft:"40px",marginTop:"8px"},button:{"& + $button":{marginLeft:"8px"}}});var z=r(67218);const _=e=>{switch(e){case"open":return i().text("Reply...");case"resolved":return i().text("Adding a comment will re-open this");default:return""}},H=e=>{let{inputRef:t,className:r,uri:o,relatedObjectUris:s,objectType:c,popperRef:u,comment:m,isEditingComment:f,onCancel:h}=e;const y=U(),x=(0,p.useSelector)(b.ZP.selectors.getUserName),{createReply:v,createComment:E,sending:w,editComment:C}=(0,n.useContext)(Z.h),[O,T]=(0,n.useState)(""),[N,S]=(0,n.useState)(""),[k,A]=(0,n.useState)([]),[I,L]=(0,n.useState)(!1),j=(0,z._)(),D=""!==O.trim(),R=I||D,V=null==m?void 0:m.status,B=(e,t,r)=>{A(r),T(e),S(t)},H=()=>{null==h||h(),B("","",[])};return(0,n.useEffect)((()=>{u&&u.current.update()}),[u,R]),(0,n.useEffect)((()=>{f?T(m.content):H()}),[f]),a().createElement(l.Box,{className:d()(y.root,r)},a().createElement("form",{onSubmit:e=>{e.preventDefault();const t=(0,g.cond)([[(0,g.always)(!m),()=>E({content:N,namedUsers:k,objectType:c,uri:o,relatedObjectUris:s})],[(0,g.always)(f),()=>C({content:N,namedUsers:k,commentId:m.commentId,objectType:c,replies:m.replies,relatedObjectUris:s,uri:o})],[g.T,()=>v({content:N,namedUsers:k,commentId:m.commentId,action:"open"===m.status?"none":"reopen",uri:o})]]);return j(t()).then(H).catch(console.log)},className:y.form},a().createElement(l.Box,{className:y.main},a().createElement(P,{classes:{root:y.avatar}},x),a().createElement(M,{className:y.textField,disabled:w,onChange:(e,t,r)=>{B(e,t,r)},inputRef:t,value:O,onFocus:()=>L(!0),onBlur:()=>L(!1),placeholder:_(V)})),R&&a().createElement(l.Box,{className:y.buttons},a().createElement(l.Button,{className:y.button,variant:"contained",color:"primary",disabled:!D||w,type:"submit"},((e,t)=>t?i().text("Edit"):"open"===e||"resolved"===e?i().text("Reply"):i().text("Comment"))(V,f)),a().createElement(l.Button,{disabled:w,onClick:()=>H(),className:y.button,variant:"outlined",color:"primary"},i().text("Cancel")))))},W=(0,E.Z)((()=>({root:{maxWidth:"100%",padding:"8px 4px 10px 16px"},messages:{},repliedComment:{marginBottom:"2px"},replies:{marginLeft:"40px"},sendMessageArea:{marginLeft:"40px"},comment:{}}))),F=(0,n.memo)((e=>{let{uri:t,relatedObjectUris:r,objectType:o,classes:i,popperRef:s,messagesRef:c,comment:u}=e;const p=(0,n.useRef)(),m=W({classes:i}),[d,g]=(0,n.useState)(!1),b=a().createElement(H,{className:m.sendMessageArea,inputRef:p,popperRef:s,uri:t,relatedObjectUris:r,objectType:o,comment:u,onCancel:()=>g(!1),isEditingComment:d});return a().createElement(l.Box,{className:m.root},u&&a().createElement(a().Fragment,null,a().createElement("div",{className:m.messages,ref:c},a().createElement(L,{comment:u,uri:t,onReply:()=>{d&&g(!1),p.current.focus()},onStartEditing:()=>{g(!0)},className:m.comment}),a().createElement(l.Box,{className:m.replies},u.replies.map((e=>a().createElement(D,{key:e.replyId,className:m.repliedComment,reply:e}))))),b),!u&&b)}))},94646:(e,t,r)=>{r.d(t,{Z:()=>P});var n=r(24328),a=r.n(n),l=r(71153),o=r.n(l),i=r(79692),s=r(19603);const c=(0,i.Z)((()=>({root:{display:"flex",alignItems:"start"},addButton:{visibility:"hidden","&$showAlways":{visibility:"visible"},[`.${s.U}:hover &`]:{visibility:"visible"}},showAlways:{}})));var u=r(20562),p=r(3515),m=r(78101),d=r(87918),g=r.n(d),b=r(94079);function f(){return f=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},f.apply(this,arguments)}const h=e=>a().createElement("svg",f({width:20,height:20,fillOpacity:.54,fill:"#000",fillRule:"nonzero",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},e),a().createElement("path",{d:"M2.8 1h14.4c.99 0 1.8.81 1.8 1.8v10.8c0 .99-.81 1.8-1.8 1.8H4.6L1 19V2.8C1 1.81 1.81 1 2.8 1z"})),y=(0,i.Z)((()=>({root:{position:"relative",height:"18px",display:"flex",alignItems:"center",justifyContent:"center",marginLeft:"4px",cursor:"pointer"},icon:{"&:hover":{fillOpacity:.7}},childrenWrapper:{position:"absolute",width:"100%",height:"100%",lineHeight:"15px",display:"flex",alignItems:"center",justifyContent:"center",top:"-2px",left:0,right:0,bottom:0,color:"white",fontSize:"10px",pointerEvents:"none"}}))),x=a().forwardRef(((e,t)=>{let{children:r,onClick:n}=e;const l=y();return a().createElement(b.Tooltip,{title:g().text("Show comment")},a().createElement("div",{ref:t,className:l.root,onClick:n},a().createElement(h,{className:l.icon}),a().createElement("div",{className:l.childrenWrapper},r)))}));x.displayName="CommentButton";const v=x;function E(){return E=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},E.apply(this,arguments)}const w=e=>a().createElement("svg",E({width:20,height:20,fillOpacity:.54,fill:"#000",fillRule:"nonzero",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},e),a().createElement("path",{d:"M2.8 14.653L3.853 13.6H17.2V2.8H2.8v11.853zM17.2 1c.99 0 1.8.81 1.8 1.8v10.8c0 .99-.81 1.8-1.8 1.8H4.6L1 19V2.8C1 1.81 1.81 1 2.8 1h14.4zm-6.3 3.6H9.1v2.699L6.4 7.3v1.8l2.7-.001V11.8h1.8V9.099l2.7.001V7.3l-2.7-.001V4.6z"})),C=e=>{let{className:t,onClick:r}=e;const n=y();return a().createElement(b.Tooltip,{title:g().text("Add comment")},a().createElement("div",{className:o()(n.root,t),onClick:r},a().createElement(w,{className:n.icon})))};var O=r(27291),T=r(9371),N=r(8818),S=r(59601);const k=(0,i.Z)((e=>({root:{},header:{display:"flex",alignItems:"center",height:"48px",paddingLeft:"16px",paddingRight:"8px"},headerInfo:{marginRight:"auto",display:"flex",alignItems:"center"},title:{marginRight:"15px",color:e.palette.text.primary,fontSize:"16px"},counter:{paddingLeft:"15px",borderLeft:"1px solid rgba(0,0,0,0.12)",color:e.palette.text.secondary,fontSize:"14px",lineHeight:"24px"},resolveButton:{zIndex:3e3,"&:hover":{backgroundColor:"transparent"}},popper:{width:"424px",borderRadius:"0 0 4px 4px"},collaborationItem:{padding:"0 0 10px 0"},comment:e=>{let{hasScroll:t}=e;return{marginLeft:"16px",marginRight:t?"2px":"8px"}},replies:e=>{let{hasScroll:t}=e;return{marginLeft:"8px",marginRight:t?"2px":"8px"}},sendMessageArea:e=>{let{hasScroll:t,scrollWidth:r}=e;return{marginLeft:"8px",marginRight:t?r+2:"8px"}},messages:{maxHeight:"400px",overflowY:"auto"}}))),A=e=>{let{uri:t,relatedObjectUris:r,objectType:l,anchorEl:o,onClose:i,open:s,comment:c}=e;const[u,m]=(0,n.useState)(0),d=k({scrollWidth:u,hasScroll:0!==u}),f=(0,n.useRef)(null),{resolveThread:h,loading:y,sending:x}=(0,n.useContext)(p.h),v=1+(null==c?void 0:c.replies.length);return a().createElement(S.Z,{popperRef:f,anchorEl:o,open:s,placement:"right-start",onClose:i,className:d.popper},a().createElement(b.Box,{className:d.header},a().createElement(b.Box,{className:d.headerInfo},a().createElement(b.Typography,{className:d.title},g().text("Comments")),c&&!y&&a().createElement(b.Typography,{className:d.counter},g().number(v)," ",1===v?g().text("item"):g().text("items"))),c&&!y&&a().createElement(N.k,{className:d.resolveButton,size:"S",onClick:()=>{h({commentId:c.commentId,uri:t})},disabled:x,showForDisabled:!0,tooltipTitle:g().text("Resolve"),icon:O.Z,color:"primary"})),!y&&a().createElement(T.J,{popperRef:f,messagesRef:e=>{e&&m(e.offsetWidth-e.clientWidth)},classes:{root:d.collaborationItem,replies:d.replies,sendMessageArea:d.sendMessageArea,messages:d.messages,comment:d.comment},uri:t,relatedObjectUris:r,objectType:l,comment:c}))},P=e=>{let{className:t,uri:r,objectType:l,relatedObjectUris:i,onChangePopupVisibility:s,allowOnlyOneComment:d=!1,showAlways:g=!1}=e;const b=c(),[f,h]=(0,n.useState)(null),[y,x]=(0,n.useState)(!1),E=y&&Boolean(f),{currentComment:w,commentsMap:O,getComment:T,clearCurrentComment:N,objectTypes:S}=(0,n.useContext)(p.h),k=!!O&&(!S||S.includes(l)),P=((null==O?void 0:O[r])||[]).filter((e=>{let{status:t}=e;return"resolved"!==t})).reverse(),Z=!d||d&&0===P.length,I=null===w&&E;(0,u.D)((()=>{s&&s(E)}),[E]);const L=(0,n.useContext)(m.A),j=(0,n.useMemo)((()=>L?[...i,...L]:i),[L,i]);return k&&a().createElement("div",{className:o()(b.root,t)},Z&&a().createElement(C,{className:o()(b.addButton,{[b.showAlways]:g||I}),onClick:e=>{h(e.currentTarget),x(!0)}}),P.map((e=>{let{replies:t,commentId:r}=e;return a().createElement(v,{ref:r===(null==w?void 0:w.commentId)?h:null,key:r,onClick:()=>(e=>{T(e),x(!0)})(r)},1+t)})),a().createElement(A,{anchorEl:f,open:E,onClose:()=>{h(null),N(),x(!1)},uri:r,relatedObjectUris:j,objectType:l,comment:w}))}},55847:(e,t,r)=>{r.d(t,{Z:()=>v});var n=r(24328),a=r.n(n),l=r(71153),o=r.n(l),i=r(17440),s=r(94079),c=r(48348),u=r(20562),p=r(83348),m=r(79692),d=r(41128);const g=(0,m.Z)((e=>({buttonRoot:{"&$selected":{color:e.palette.action.active,backgroundColor:(0,d.U1)(e.palette.action.active,.12),"&:hover":{backgroundColor:(0,d.U1)(e.palette.action.active,.15)}}},selected:{},paper:{minWidth:"112px"},menuItem:{minHeight:"32px"},menuText:{color:e.palette.text.primary,fontSize:"13px",lineHeight:"15px",letterSpacing:0}}))),b=(0,p.Z)(s.MenuItem),f=(0,n.forwardRef)(((e,t)=>{let{item:r,onMenuClose:n=i.identity}=e;const l=g(),{disabled:o,text:c,tooltip:u,onClick:p,id:m=""}=r;return a().createElement(b,{tooltipTitle:u,showForDisabled:!0,classes:{root:l.menuItem},onClick:e=>{n(e),p(e)},disabled:o,ref:t,"data-modal":!0,"data-reltio-id":`reltio-search-menu-item${m}`},a().createElement(s.Typography,{classes:{root:l.menuText}},c))}));f.displayName="MenuItemRenderer";const h=f;function y(){return y=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},y.apply(this,arguments)}function x(e){let{className:t,menuId:r,buttonComponent:l=s.Button,buttonContent:p,menuItems:m=[],buttonProps:d={},popoverProps:b={},onMenuOpen:f=i.identity,onMenuClose:x=i.identity,MenuItemRenderer:v=h}=e;const E=l,w=g(),C=(0,n.useRef)(),[O,T]=(0,n.useState)(!1);(0,u.D)((()=>{O?f():x()}),[O]);const N=(0,n.useCallback)((e=>{null==e||e.stopPropagation(),T((e=>!e))}),[]);return a().createElement(a().Fragment,null,a().createElement(E,y({ref:C,className:o()(w.buttonRoot,{[w.selected]:O},t),onClick:N,"aria-pressed":O,"aria-controls":O?r:void 0,"aria-haspopup":"true"},d),p),a().createElement(c.Z,y({id:r,variant:"menu",open:O,autoFocus:!1,classes:{paper:w.paper},anchorEl:C.current,onClose:N,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},elevation:2,getContentAnchorEl:null,MenuListProps:{autoFocusItem:O}},b),m.map(((e,t)=>a().createElement(v,{item:e,key:t,onMenuClose:N})))))}x.displayName="DropDownMenuButton";const v=x},53180:(e,t,r)=>{r.d(t,{Z:()=>p});var n=r(24328),a=r.n(n),l=r(52730),o=r(71153),i=r.n(o),s=r(94079),c=r(99493),u=r(87638);const p=e=>{let{entity:t,avatarClassName:r,imageClassName:n}=e;const o=(0,l.useSelector)(u.ZP.selectors.getMetadata),p=(0,l.useSelector)(u.ZP.selectors.getAbsoluteImagePath)||"",m=(0,c.uie)(o,p,t),d=(0,c.vPL)(p,(0,c.XH2)(o,t.type)),g=e=>{e.target.onError=null,e.target.src=(0,c.m5F)('\n<svg width="400px" height="400px" viewBox="0 0 400 400" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <title>Group</title>\n <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <g id="Group" fill-rule="nonzero">\n <rect id="Rectangle" fill="#DFE5E9" x="0" y="0" width="400" height="400"></rect>\n <path d="M0,387.023257 L0,399.918908 L400,399.918908 L400,386.023594 C366.631,377.336524 321.866,364.269931 315.979,359.161654 C308.985,353.083704 270.481,310.508063 270.481,310.508063 L270.481,286.186267 C270.481,286.186267 284.478,266.204006 284.478,261.854473 C284.478,257.515936 285.353,246.219746 291.481,241.011503 C297.61,235.792263 311.607,211.471466 312.481,206.253226 C313.355,201.043983 319.484,188.009379 312.481,185.400259 C305.478,182.801135 307.236,173.244359 308.984,168.026119 C310.733,162.817875 319.484,139.355788 322.981,133.277838 C326.488,127.199888 312.481,108.956041 312.481,108.956041 C312.481,108.956041 294.978,80.2857109 245.975,53.3547939 C196.971,26.4138803 168.967,42.9283105 168.967,42.9283105 L161.964,60.3024507 C161.964,60.3024507 138.341,64.6409874 123.46,77.6765909 C108.589,90.7121943 99.837,106.346921 98.963,115.903698 C98.088,125.460475 103.334,159.339048 105.966,164.557289 C108.589,169.765532 112.96,185.400259 112.96,185.400259 C112.96,185.400259 108.589,183.670842 105.966,188.879085 C103.334,194.097325 112.085,218.419122 112.96,220.159535 C113.834,221.897949 114.718,238.403382 119.963,237.532676 C125.218,236.663969 130.463,251.42799 130.463,251.42799 C130.463,251.42799 143.596,271.41125 144.47,275.759783 C145.344,280.09832 147.967,307.039233 147.967,307.039233 L126.967,331.36103 L102.46,355.682827 C102.459,355.682827 34.042,375.886013 0,387.023257 Z" id="Path" fill="#B3BCC4"></path>\n <path d="M0,387.023257 L0,399.918908 L400,399.918908 L400,386.023594 C366.631,377.336524 321.866,364.269931 315.979,359.161654 C308.985,353.083704 270.481,310.508063 270.481,310.508063 L270.481,286.186267 C270.481,286.186267 284.478,266.204006 284.478,261.854473 C284.478,257.515936 285.353,246.219746 291.481,241.011503 C297.61,235.792263 311.607,211.471466 312.481,206.253226 C313.355,201.043983 319.484,188.009379 312.481,185.400259 C305.478,182.801135 307.236,173.244359 308.984,168.026119 C310.733,162.817875 319.484,139.355788 322.981,133.277838 C326.488,127.199888 312.481,108.956041 312.481,108.956041 C312.481,108.956041 294.978,80.2857109 245.975,53.3547939 C196.971,26.4138803 168.967,42.9283105 168.967,42.9283105 L161.964,60.3024507 C161.964,60.3024507 138.341,64.6409874 123.46,77.6765909 C108.589,90.7121943 99.837,106.346921 98.963,115.903698 C98.088,125.460475 103.334,159.339048 105.966,164.557289 C108.589,169.765532 112.96,185.400259 112.96,185.400259 C112.96,185.400259 108.589,183.670842 105.966,188.879085 C103.334,194.097325 112.085,218.419122 112.96,220.159535 C113.834,221.897949 114.718,238.403382 119.963,237.532676 C125.218,236.663969 130.463,251.42799 130.463,251.42799 C130.463,251.42799 143.596,271.41125 144.47,275.759783 C145.344,280.09832 147.967,307.039233 147.967,307.039233 L126.967,331.36103 L102.46,355.682827 C102.459,355.682827 34.042,375.886013 0,387.023257 Z" id="Path" fill="#B3BCC4"></path>\n <path d="M5.68434189e-14,387.023257 L5.68434189e-14,399.918908 L400,399.918908 L400,386.023594 C366.631,377.336524 321.866,364.269931 315.979,359.161654 C308.985,353.083704 270.481,310.508063 270.481,310.508063 L270.481,286.186267 C270.481,286.186267 284.478,266.204006 284.478,261.854473 C284.478,257.515936 285.353,246.219746 291.481,241.011503 C297.61,235.792263 311.607,211.471466 312.481,206.253226 C313.355,201.043983 319.484,188.009379 312.481,185.400259 C305.478,182.801135 307.236,173.244359 308.984,168.026119 C310.733,162.817875 319.484,139.355788 322.981,133.277838 C326.488,127.199888 312.481,108.956041 312.481,108.956041 C312.481,108.956041 294.978,80.2857109 245.975,53.3547939 C196.971,26.4138803 168.967,42.9283105 168.967,42.9283105 L161.964,60.3024507 C161.964,60.3024507 138.341,64.6409874 123.46,77.6765909 C108.589,90.7121943 99.837,106.346921 98.963,115.903698 C98.088,125.460475 103.334,159.339048 105.966,164.557289 C108.589,169.765532 112.96,185.400259 112.96,185.400259 C112.96,185.400259 108.589,183.670842 105.966,188.879085 C103.334,194.097325 112.085,218.419122 112.96,220.159535 C113.834,221.897949 114.718,238.403382 119.963,237.532676 C125.218,236.663969 130.463,251.42799 130.463,251.42799 C130.463,251.42799 143.596,271.41125 144.47,275.759783 C145.344,280.09832 147.967,307.039233 147.967,307.039233 L126.967,331.36103 L102.46,355.682827 C102.459,355.682827 34.042,375.886013 5.68434189e-14,387.023257 Z" id="Path" fill="#B3BCC4"></path>\n </g>\n </g>\n</svg>\n')};return a().createElement(s.Avatar,{className:i()(r,n),src:m,imgProps:{onError:g}},a().createElement("img",{className:n,src:d,alt:"fallback entity avatar",onError:g}))}},31254:(e,t,r)=>{r.d(t,{Z:()=>c});var n=r(24328),a=r.n(n),l=r(52730),o=r(87638),i=r(98018);function s(){return s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s.apply(this,arguments)}const c=e=>{const t=(0,l.useSelector)(o.ZP.selectors.getAbsoluteImagePath)||"";return a().createElement(i.ZP,s({},e,{storagePath:(r=t,r.endsWith("/")?r:r+"/")}));var r}},76134:(e,t,r)=>{r.d(t,{Z:()=>c});var n=r(24328),a=r.n(n),l=r(71153),o=r.n(l),i=r(94079),s=r(73086);const c=e=>{let{className:t,message:r}=e;const n=(0,s.y)();return r?a().createElement(i.Typography,{variant:"caption",className:o()(n.caption,t)},r):null}},26579:(e,t,r)=>{r.d(t,{Z:()=>m});var n=r(71153),a=r.n(n),l=r(76134),o=r(42494),i=r(94079),s=r(24328),c=r.n(s),u=r(73086);function p(){return p=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},p.apply(this,arguments)}const m=(0,s.memo)((e=>{let{errorMessage:t,children:r,className:n,classes:s}=e,m=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["errorMessage","children","className","classes"]);const d=(0,u.y)(),g=!!t;return c().createElement(o.Z,p({className:a()(d.wrapper,n,null==s?void 0:s.root),error:!0},m),r,g&&c().createElement(i.FormHelperText,{className:a()(d.helperText,null==s?void 0:s.helperText)},c().createElement(l.Z,{message:t})))}))},73086:(e,t,r)=>{r.d(t,{y:()=>n});const n=(0,r(79692).Z)((e=>({wrapper:{width:"100%"},helperText:{margin:"3px 0 1px 12px"},caption:{display:"flex",color:e.palette.error.main,fontSize:"12px",lineHeight:"16px"}})))},27239:(e,t,r)=>{r.d(t,{Z:()=>o});var n=r(24328),a=r.n(n);const l=(0,r(79692).Z)({highlight:{fontWeight:600}}),o=e=>{let{text:t="",highlight:r="",className:n}=e;const o=l(),i=r&&t.split(new RegExp(`(${r})`,"gi"));return a().createElement("span",null,r?i.map(((e,t)=>a().createElement("span",{key:t,className:e.toLocaleLowerCase()===r.toLocaleLowerCase()?n||o.highlight:""},e))):t)}},27952:(e,t,r)=>{r.d(t,{f:()=>f,Z:()=>h});var n=r(24328),a=r.n(n),l=r(71153),o=r.n(l),i=r(80079);function s(){return s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s.apply(this,arguments)}const c=e=>a().createElement("svg",s({width:24,height:24,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},e),a().createElement("g",{stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a().createElement("path",{d:"M0 0h24v24H0z"}),a().createElement("path",{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zm-4.5-9l2.5 3.096V18H5l4.5-5.5 2.5 3.01L16.5 10zm-8-4a1.5 1.5 0 110 3 1.5 1.5 0 010-3z",fillOpacity:.12,fill:"#000",fillRule:"nonzero"})));var u=r(99493);const p=(0,r(79692).Z)((e=>({root:{position:"relative"},image:e=>{let{imageWidth:t,imageHeight:r}=e;return{width:t,height:r,objectFit:"cover",verticalAlign:"bottom"}},defaultContainer:{display:"flex",alignItems:"center",backgroundColor:"rgb(247, 247, 247)"},defaultImage:{width:"40px",height:"40px",marginLeft:"auto",marginRight:"auto",color:e.palette.text.secondary},hideImage:{display:"none"}})));function m(){return m=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},m.apply(this,arguments)}const d="loading",g="loaded",b="error",f={SMALL:{imageWidth:114,imageHeight:114},MEDIUM:{imageWidth:162,imageHeight:162},LARGE:{imageWidth:192,imageHeight:192},OVERRIDE:{imageWidth:"unset",imageHeight:"unset"}},h=(0,n.memo)((e=>{const{src:t,className:r,containerClassName:l,size:s=f.SMALL,overlay:h=null}=e,y=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["src","className","containerClassName","size","overlay"]),x=s||f.SMALL,v=p(x),[E,w]=(0,n.useState)(d);(0,n.useEffect)((()=>{w(d)}),[t]);const C=E===d,O=E===g;return E===b?a().createElement("div",m({className:o()(v.defaultContainer,v.image,r)},y),a().createElement(i.Z,{className:v.defaultImage})):a().createElement("div",{className:o()(v.root,l)},!(0,u.O27)(t)&&a().createElement("img",m({src:t,className:o()(v.image,r,{[v.hideImage]:C}),onLoad:()=>{w(g)},onError:()=>{w(b)},alt:"image"},y)),C&&a().createElement("div",m({className:o()(v.defaultContainer,v.image,r)},y),a().createElement(c,{className:v.defaultImage})),O&&h)}))},97193:(e,t,r)=>{r.d(t,{Z:()=>w});var n=r(24328),a=r.n(n),l=r(87918),o=r.n(l),i=r(17440),s=r(71153),c=r.n(s),u=r(94079),p=r(43054),m=r(22385),d=r(55847),g=r(52669),b=r(81556),f=r(79692);const h=(0,f.Z)((()=>({root:{fontSize:"24px",color:"#fff"}}))),y=e=>{let{checked:t,className:r,onClick:n}=e;const l=h(),o=t?b.Z:g.Z;return a().createElement(o,{className:c()(l.root,r),onClick:n})};var x=r(97989),v=r(31276);const E=(0,f.Z)((()=>({overlay:{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",transition:"0.2s linear all","&:not($selected):not($selectionMode):hover":{backgroundColor:"rgba(0,0,0,0.6)"},userSelect:"none"},selected:{backgroundColor:"rgba(0,114,206,0.6)"},selectionMode:{cursor:"pointer","&:not($selected)":{backgroundColor:"rgba(0,0,0,0.6)"}},button:{padding:0,width:"100px",height:"36px",color:"#fff",fontSize:"14px",fontWeight:500,lineHeight:"16px",border:"1px solid rgba(255,255,255,0.25)",backgroundColor:"rgba(98,2,238,0)"},checkedIcon:{position:"absolute",left:"4px",top:"4px",cursor:"pointer"},actions:{display:"flex",alignItems:"center",position:"absolute",top:"4px",right:"4px"},actionButton:{color:"#fff",fontSize:"24px"},dropDownMenuButton:{margin:"0 2px 0 8px"}}))),w=(0,n.memo)((e=>{const{id:t,canBeSelected:r=!1,selected:l=!1,selectionMode:s=!1,onDeselect:g=v.ZT,onSelect:b=v.ZT,onShareLink:f,onSetAsDefault:h,onDelete:w,onDownload:C=v.ZT,onClick:O}=e,T=E(),[N,S]=(0,n.useState)(!1),k=(0,n.useMemo)((()=>[{text:o().text("Share link"),onClick:f},{text:o().text("Set as default"),onClick:h},{text:o().text("Delete"),onClick:w}].filter((0,i.prop)("onClick"))),[f,h,w]),A=e=>()=>(0,i.ifElse)((0,i.equals)(!0),g,b)(e),P=r&&(l||N||s),Z=!s&&!l&&N,I=r&&l;return a().createElement("div",{className:c()(T.overlay,{[T.selected]:l,[T.selectionMode]:s}),onMouseEnter:()=>S(!0),onMouseLeave:()=>S(!1),onClick:s?A(l):e=>{e.currentTarget===e.target&&O()}},P&&a().createElement(y,{className:T.checkedIcon,checked:l,onClick:A(l)}),Z&&a().createElement("div",{className:T.actions},a().createElement(m.Z,{onClick:C,className:T.actionButton,icon:x.Z}),a().createElement(d.Z,{menuId:`image-overlay-actions-${t}`,buttonComponent:m.Z,buttonProps:{icon:p.Z,className:c()(T.actionButton,T.dropDownMenuButton)},menuItems:k})),I&&a().createElement(u.Button,{className:T.button,variant:"outlined",onClick:g},o().text("Deselect")))}))},81853:(e,t,r)=>{r.d(t,{C:()=>f,A:()=>b});var n=r(24328),a=r.n(n),l=r(87918),o=r.n(l),i=r(94079),s=r(87685),c=r(73115);function u(){return u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},u.apply(this,arguments)}const p=e=>a().createElement("svg",u({width:24,height:24,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},e),a().createElement("defs",null,a().createElement("path",{d:"M14 5a1 1 0 011 1v12a1 1 0 01-1 1H4a1 1 0 01-1-1V6a1 1 0 011-1h10zm6 12v2h-3v-2h3zm2-4v2h-5v-2h5zm0-4v2h-5V9h5zm0-4v2h-5V5h5z",id:"Details_svg__a"})),a().createElement("g",{stroke:"none",strokeWidth:1,fillRule:"evenodd"},a().createElement("mask",{id:"Details_svg__b",fill:"#fff"},a().createElement("use",{xlinkHref:"#Details_svg__a"})),a().createElement("path",{mask:"url(#Details_svg__b)",d:"M0 0h24v24H0z"})));var m=r(8818),d=r(83401);const g=(0,r(79692).Z)((()=>({paper:{backgroundColor:"rgba(0, 0, 0, .85)"},backdrop:{backgroundColor:"transparent"},toolbar:{paddingLeft:"20px",paddingRight:"20px"},appBar:{position:"relative",background:"linear-gradient(180deg, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0) 100%)"},closeButton:{marginRight:"28px"},closeIcon:{fontSize:"24px",color:"#fff"},headerLeft:{display:"flex",alignItems:"center",flex:2},headerCenter:{display:"flex",justifyContent:"center",flex:1},headerRight:{flex:2,display:"flex",justifyContent:"flex-end",alignItems:"center"},modeSwitcher:{backgroundColor:"#fff"},content:{padding:0}})));let b;!function(e){e.GALLERY_MODE="gallery",e.DETAILS_MODE="details"}(b||(b={}));const f=e=>{let{open:t,mode:r,children:l,header:u,onClose:f,onChangeMode:h}=e;const y=g(),x=(0,n.useMemo)((()=>[{id:b.GALLERY_MODE,title:o().text("Gallery"),Icon:c.Z},{id:b.DETAILS_MODE,title:o().text("Details"),Icon:p}]),[]);return a().createElement(i.Dialog,{classes:{paper:y.paper},open:t,BackdropProps:{className:y.backdrop},fullScreen:!0},a().createElement(i.AppBar,{classes:{colorPrimary:y.appBar}},a().createElement(i.Toolbar,{className:y.toolbar},a().createElement(i.Box,{className:y.headerLeft},a().createElement(m.k,{tooltipTitle:o().text("Close"),onClick:f,className:y.closeButton,iconClassName:y.closeIcon,icon:s.default}),null==u?void 0:u.left),a().createElement(i.Box,{className:y.headerCenter},a().createElement(d.Z,{modes:x,modeId:r,onChange:h,className:y.modeSwitcher})),a().createElement(i.Box,{className:y.headerRight},null==u?void 0:u.right))),a().createElement(i.DialogContent,{className:y.content},l))}},99136:(e,t,r)=>{r.d(t,{Z:()=>c});var n=r(24328),a=r.n(n),l=r(71153),o=r.n(l),i=r(94079);const s=(0,r(79692).Z)({loadingOverlay:{position:"absolute",width:"100%",height:"100%",top:0,left:0,opacity:.37,zIndex:10,backgroundColor:"#fff"},transparent:{backgroundColor:"transparent"},relativePosition:{"&$loadingOverlay":{position:"relative"}}}),c=e=>{let{transparent:t=!1,relativePosition:r=!1,className:n}=e;const l=s();return a().createElement(a().Fragment,null,a().createElement("div",{className:o()(l.loadingOverlay,n,{[l.transparent]:t,[l.relativePosition]:r})},a().createElement(i.LinearProgress,{color:"secondary"})))}},83401:(e,t,r)=>{r.d(t,{Z:()=>d});var n=r(24328),a=r.n(n),l=r(94079),o=r(71153),i=r.n(o),s=r(83348),c=r(79692),u=r(41128);const p=(0,c.Z)((e=>({button:{minWidth:"30px",padding:"8px 8px",justifyContent:"start",fill:"rgba(0,0,0,0.54)",textTransform:"none",borderColor:"rgba(0,0,0,0.12)"},icon:{color:"rgba(0,0,0,0.54)",width:"20px",height:"20px",marginRight:"8px"},title:{fontSize:"13px",lineHeight:"15px",letterSpacing:0},current:{"& $icon":{color:e.palette.primary.main},backgroundColor:(0,u.U1)(e.palette.primary.main,.12),fill:e.palette.primary.main,color:e.palette.primary.main,"&:hover":{backgroundColor:(0,u.U1)(e.palette.primary.main,.24)}}}))),m=(0,s.Z)(l.Button),d=e=>{let{className:t,classes:r={},modes:n=[],modeId:o,onChange:s}=e;const c=p();return a().createElement(l.ButtonGroup,{className:t},n.map((e=>{let{id:t,title:n,tooltipTitle:l,Icon:u}=e;return a().createElement(m,{key:String(t),className:i()(c.button,{[c.current]:o===t},r.button),tooltipTitle:l,onClick:(p=t,()=>s(p)),"data-reltio-id":`reltio-search-mode-${t}`},u&&a().createElement(u,{className:c.icon}),n&&a().createElement("div",{className:c.title},n));var p})))}},59601:(e,t,r)=>{r.d(t,{Z:()=>u});var n=r(24328),a=r.n(n),l=r(71153),o=r.n(l),i=r(94079),s=r(66130);const c=(0,r(79692).Z)((e=>{const t=e.palette.background.paper;return{popoverRoot:{backgroundColor:t,maxWidth:1e3},popper:{'&[x-placement*="bottom"] $arrow':{top:0,left:0,marginTop:"-0.71em",marginLeft:4,marginRight:4,"&::before":{transformOrigin:"0 100%"}},'&[x-placement*="top"] $arrow':{bottom:0,left:0,marginBottom:"-0.71em",marginLeft:4,marginRight:4,"&::before":{transformOrigin:"100% 0"}},'&[x-placement*="right"] $arrow':{left:0,marginLeft:"-0.71em",height:"1em",width:"0.71em",marginTop:4,marginBottom:4,"&::before":{transformOrigin:"100% 100%"}},'&[x-placement*="left"] $arrow':{right:0,marginRight:"-0.71em",height:"1em",width:"0.71em",marginTop:4,marginBottom:4,"&::before":{transformOrigin:"0 0"}}},arrow:{overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:t,"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",boxShadow:e.shadows[1],backgroundColor:"currentColor",transform:"rotate(45deg)"}}}})),u=e=>{let{anchorEl:t,placement:r="top",arrow:n=!0,open:l,onClose:u=(()=>{}),children:p,className:m,popperRef:d}=e;const g=c(),[b,f]=a().useState(null);return a().createElement(s.Z,{anchorEl:t,placement:r,className:o()(g.popper,m),modifiers:{preventOverflow:{enabled:!0,boundariesElement:"window"},arrow:{enabled:n,element:b}},open:l,modal:!1,popperRef:d},a().createElement(i.Box,null,a().createElement(i.ClickAwayListener,{onClickAway:e=>{var t;t=e.target,Array.from(document.querySelectorAll("[data-modal]")).some((e=>e.contains(t)))||u()}},a().createElement(i.Paper,{className:g.popoverRoot},n?a().createElement("span",{className:g.arrow,ref:f}):null,a().createElement(i.Box,null,p)))))}},94574:(e,t,r)=>{r.d(t,{Z:()=>v});var n=r(71153),a=r.n(n),l=r(17440),o=r(24328),i=r.n(o),s=r(87918),c=r.n(s),u=r(29611),p=r(94079),m=r(87685),d=r(21853),g=r(31276),b=r(22385),f=r(63015);function h(){return h=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},h.apply(this,arguments)}function y(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){x(e,t,r[t])}))}return e}function x(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const v=(0,o.memo)((e=>{let{value:t,autofocus:r,onSearch:n=g.ZT,rootRef:s,classes:x={},height:v,placeholder:E=c().text("Search")}=e,w=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["value","autofocus","onSearch","rootRef","classes","height","placeholder"]);const C=(0,f.y)({height:v}),[O,T]=(0,o.useState)(""),N=(0,l.pipe)((0,l.tap)(n),T),S=(0,l.isNil)(t)?O:t;return i().createElement(u.Z,h({startAdornment:i().createElement(p.InputAdornment,{position:"start"},i().createElement(d.default,{className:C.icon})),endAdornment:i().createElement(p.InputAdornment,{position:"end"},S.length>0&&i().createElement(b.Z,{icon:m.default,className:C.clearButton,onClick:()=>N("")})),autoFocus:r,classes:y({},x,{input:a()(C.input,x.input),root:a()(C.container,x.root)}),placeholder:E,value:S,onChange:(0,l.pipe)(g.NA,N),disableUnderline:!0,ref:s},w))}))},63015:(e,t,r)=>{r.d(t,{y:()=>n});const n=(0,r(79692).Z)((()=>({container:e=>{let{height:t=36}=e;return{height:t,borderRadius:"2px",alignItems:"center",backgroundColor:"rgba(0,0,0,0.03)",minWidth:"100px"}},icon:{opacity:.67,marginLeft:"10px",marginRight:"6px"},input:{fontSize:"13px",width:"100%"},clearButton:{marginRight:"10px"},white:{backgroundColor:"rgb(255, 255, 255)",boxShadow:"0 1px 3px 0 rgba(0,0,0,0.24)"}})))},97820:(e,t,r)=>{r.d(t,{Z:()=>d});var n=r(24328),a=r.n(n),l=r(71153),o=r.n(l),i=r(87918),s=r.n(i),c=r(79784),u=r(25480),p=r(94574);function m(){return m=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},m.apply(this,arguments)}const d=e=>{let{title:t,className:r,onSearch:n,hideTitle:l,hideSearchInput:i,headerPlacement:d="top",containerWidth:g,containerHeight:b,searchInputOnKeyDown:f,children:h,searchInputRef:y,anchorOrigin:x={vertical:"top",horizontal:"right"},transformOrigin:v={vertical:"top",horizontal:"right"}}=e,E=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["title","className","onSearch","hideTitle","hideSearchInput","headerPlacement","containerWidth","containerHeight","searchInputOnKeyDown","children","searchInputRef","anchorOrigin","transformOrigin"]);const w=(0,u.Z)({containerWidth:g,containerHeight:b}),C=a().createElement(a().Fragment,null,!l&&a().createElement("div",{className:w.header},t),!i&&a().createElement(p.Z,{onSearch:n,autofocus:!0,onKeyDown:f,inputRef:y,classes:{root:w.searchInputContainer},placeholder:s().text("Search & add attributes"),height:40}));return a().createElement(c.ZP,m({anchorOrigin:x,transformOrigin:v},E),a().createElement("div",{className:o()(w.container,r),style:{width:g}},"top"===d&&C,a().createElement("div",{className:w.list},h),"bottom"===d&&C))}},54763:(e,t,r)=>{r.d(t,{t:()=>o});var n=r(24328),a=r(17440),l=r(44890);const o=e=>{let{items:t,open:r,onSelectFocusedItem:o,selectedItems:i,onClose:s}=e;const[c,u]=(0,n.useState)(null),p=(0,n.useRef)(!1),m=(0,n.useCallback)((e=>{let r=null===e?m(-1):e;for(;null!==e&&r<t.length&&(r<=e||r>=0&&(0,l.c)(t[r]));)r+=1;return r!==t.length?r:m(-1)}),[t]),d=(0,n.useCallback)((e=>{let r=null===e?t.length-1:e;for(;null!==e&&r>=0&&(r>=e||(0,l.c)(t[r]));)r-=1;return r<0?t.length-1:r}),[t]),g=(0,n.useCallback)((()=>{if(!(0,a.isNil)(c)){const e=t[c].item;!e.item.notSelectable&&o({item:e.item,groupData:e})}}),[o,t,c]),b=(0,n.useCallback)((e=>{if(0!==t.length)switch(e.key){case"Down":case"ArrowDown":return u(m),e.preventDefault(),!1;case"Up":case"ArrowUp":return u(d),e.preventDefault(),!1;case"Enter":p.current=!0,g();break;case"Tab":s&&s(e);break;default:return}}),[t,m,d,g,s]);return(0,n.useEffect)((()=>{if(p.current){p.current=!1;const e=t.findIndex((e=>e.item.moveTo));e>-1&&u(e)}else u(null)}),[t,r,i]),{focusIndex:c,handleKeyDown:b}}},25480:(e,t,r)=>{r.d(t,{Z:()=>a});var n=r(79692);const a=(0,n.Z)((()=>({container:e=>{let{containerHeight:t=553,containerWidth:r}=e;return{display:"flex",flexDirection:"column",height:t,width:r,flexGrow:1}},header:{marginLeft:"16px",marginTop:"16px",marginBottom:"12px",fontSize:"16px",fontWeight:500,letterSpacing:"0.15px",lineHeight:"24px"},searchInputContainer:{margin:"0 16px 12px 16px",flexShrink:"0"},list:{flexGrow:1,height:0,overflow:"hidden",width:"100%",position:"relative","& ul":{paddingBottom:0,paddingTop:0}}})))},95629:(e,t,r)=>{r.d(t,{Z:()=>p});var n=r(24328),a=r.n(n),l=r(71153),o=r.n(l),i=r(55299),s=r(94079);const c=(0,r(79692).Z)({label:{color:"rgba(0,0,0,0.6)",fontSize:"13px",lineHeight:"15px"}});function u(){return u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},u.apply(this,arguments)}const p=e=>{let{label:t,isRequired:r,className:n}=e,l=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["label","isRequired","className"]);const p=c();return a().createElement(s.Typography,u({className:o()(p.label,n),component:"span"},l),t,r&&a().createElement(i.Z,null))}},44890:(e,t,r)=>{r.d(t,{Z:()=>d,c:()=>p});var n=r(24328),a=r.n(n),l=r(13980),o=r.n(l),i=r(50166),s=r(44443);const c=(0,r(79692).Z)({stickyTitlesWrapper:{position:"absolute",top:0,"& > div":{zIndex:1,position:"absolute",top:0,width:"100%",visibility:"hidden"}}});var u=r(56656);const p=e=>e.titleItemIndex===e.index,m=e=>{let{items:t,getItemSize:r,renderItem:l,renderGroupTitle:o,width:m="100%",height:d,fixedTitle:g=!0,itemKey:b=(e=>e),disableHorizontalScrollbar:f,hideSubtitles:h,focusIndex:y=null,onInnerContainerResize:x}=e;const v=c(),E=(0,n.useRef)(null),w=(0,n.useRef)(null),C=(0,n.useRef)(null),O=(0,n.useRef)([0]),T={topMargin:0},N=(0,n.useMemo)((()=>!h||(t||[]).some((e=>null!==e.titleItemIndex))),[t,h]),S=(0,n.useCallback)((e=>{const n=O.current.length;let a=0;t.slice(n-1,e+1).forEach(((e,t)=>{const l=n+t-1;t>0&&(O.current[l]=O.current[l-1]+a),a=r(l,e.item)}))}),[r,t]),k=(0,n.useCallback)((e=>t[e].titleItemIndex),[t]),A=(0,n.useCallback)((e=>t[e]),[t]);(0,n.useEffect)((()=>{requestAnimationFrame((()=>{E.current&&E.current.scrollTo(0)}))}),[t.length]),(0,n.useEffect)((()=>{E.current&&E.current.resetAfterIndex(0),P();const e=(e=>{const t=e.findIndex((e=>e.item.moveTo));if(t>-1){S(t);const e=k(t);return{offset:O.current[t],titleHeight:r(e,A(e).item)}}})(t);if(e&&e.offset&&E.current){const{titleHeight:t}=e,r=e.offset-t;(r<E.current.state.scrollOffset||r>E.current.state.scrollOffset+d)&&requestAnimationFrame((()=>{E.current&&E.current.scrollTo(r-(d-t)/2)}))}}),[S,A,r,k,d,O,t,E]);const P=()=>{C.current&&w.current&&(C.current.style.width=w.current.offsetWidth+"px")},Z=(0,n.useCallback)((e=>{let r=null,n=0;return t.some(((t,a)=>{S(a+10);const l=O.current[a+1];return e>=n&&e<l&&(r={index:a,offset:n,listItem:t}),n=l,r})),r}),[S,O,t]),I=(0,n.useCallback)((e=>r(e,A(e).item)),[A,r]),L=(0,n.useCallback)((e=>{let{index:t,style:r,data:n}=e;const a=A(t);return a.item&&(p(a)&&o(r,a.item)||l(r,a.item,t,n))}),[A,o,l]),{handleOnItemsRendered:j}=(0,u.LW)({items:t,focusIndex:y,listRef:E}),D=(0,n.useCallback)((()=>t.filter((e=>p(e))).map((e=>(e=>a().createElement("div",{className:"stickyTitleItem",style:{visibility:"hidden"},"data-index":e.index,key:e.index},o({height:r(e.index,e.item)},e.item)))(e)))),[r,t,o]);return a().createElement(a().Fragment,null,a().createElement("div",{ref:C,className:v.stickyTitlesWrapper},g&&D()),x&&w.current&&a().createElement(s.Z,{handleHeight:!0,onResize:x,targetDomEl:w.current}),a().createElement(i.VariableSizeList,{ref:E,itemCount:t.length,itemSize:I,width:m,height:d,itemKey:b,innerRef:w,onScroll:e=>{let{scrollOffset:n,scrollDirection:a}=e;if(!g||!N)return;const l=Z(n),o=l&&k(l.index);var i;null!==o&&(i=o,C.current&&[...C.current.querySelectorAll(".stickyTitleItem")].forEach((e=>{e.dataset.index===i.toString()?(e.style.visibility="visible",T.index=i):e.style.visibility="hidden"}))),P();const s=null!==o&&r(o,A(o).item),c=Z(n+s+T.topMargin);let u=0;if(c){switch(a){case"forward":c.offset-n>0&&p(c.listItem)&&(u=s-(c.offset-n));break;case"backward":{const e=o>-1&&(m=o,t.findIndex(((e,t)=>p(e)&&m<t))),r=(e=>(S(e),O.current[e]))(e);e>-1&&n<r&&s>=r-n&&(u=s-(r-n))}}(e=>{C.current&&(T.topMargin=-e,C.current.style.top=-e+"px")})(u)}var m},style:f?{overflowX:"hidden"}:void 0,overscanCount:5,onItemsRendered:j},L))};m.propTypes={items:o().arrayOf(o().object).isRequired,getItemSize:o().func.isRequired,renderItem:o().func.isRequired,width:o().oneOfType([o().number,o().string]),height:o().number.isRequired,renderGroupTitle:o().func,fixedTitle:o().bool,hideSubtitles:o().bool,itemKey:o().func,disableHorizontalScrollbar:o().bool,focusIndex:o().number,onInnerContainerResize:o().func};const d=m},56656:(e,t,r)=>{r.d(t,{LG:()=>l,LW:()=>o});var n=r(17440),a=r(24328);const l=e=>{const t=e=>(0,n.flatten)(e.map((e=>[e].concat(e.items?t(e.items):[]))));let r=null;return t(e).map(((e,t)=>(e&&e.items&&(r=t),{item:e,index:t,titleItemIndex:r})))},o=e=>{let{focusIndex:t,listRef:r,items:n}=e;const l=(0,a.useRef)(null),o=(0,a.useRef)(null),i=(0,a.useCallback)((e=>{let{visibleStartIndex:t,visibleStopIndex:r}=e;l.current=t,o.current=r}),[]);return(0,a.useEffect)((()=>{r.current&&null!==t&&0!==n.length&&(t<Math.max(l.current+3,0)?r.current.scrollToItem(Math.max(t-3,0),"start"):t>Math.min(o.current-3,n.length-1)&&r.current.scrollToItem(Math.min(t+3,n.length-1),"end"))}),[t,n.length,r]),{handleOnItemsRendered:i}}},95974:(e,t,r)=>{r.d(t,{Z:()=>c});var n=r(24328),a=r.n(n),l=r(71153),o=r.n(l);const i="1px solid #AFD4E9",s=(0,r(79692).Z)({decorator:{marginLeft:8,borderLeft:i,"&:last-child":{borderLeft:"none","&:before":{borderLeft:i}},"&:before":{top:0,height:14,width:5,borderBottom:i,content:'""',display:"block",left:"0"},"&$plain":{"&:before":{width:0}}},plain:{},wrapper:{marginLeft:16,marginTop:-8}}),c=e=>{let{className:t,children:r,plain:n=!1,enabled:l=!1}=e;const i=s();return l?a().createElement("div",{className:o()(i.decorator,{[i.plain]:n},t)},a().createElement("div",{className:i.wrapper},r)):a().createElement(a().Fragment,null,r)}},40932:(e,t,r)=>{r.d(t,{Z:()=>he});var n=r(24328),a=r.n(n),l=r(52730),o=r(44443),i=r(94079),s=r(87638),c=r(99493),u=r(69891),p=r(17440),m=r(45203),d=r(15762),g=r(71153),b=r.n(g),f=r(27952),h=r(22385),y=r(79692);const x=(0,y.Z)((e=>({root:{display:"flex",alignContent:"center",flexDirection:"column"},main:{position:"relative",padding:"0 86px",marginTop:"auto"},mainImageContainer:{display:"flex",alignContent:"center",height:"100%",width:"100%"},mainImage:{maxWidth:"calc(100vw - 512px)",maxHeight:"calc(100vh - 192px)",margin:"0 auto",userSelect:"none"},arrowButton:{backgroundColor:e.palette.divider,color:"white","&:hover":{backgroundColor:e.palette.divider}},arrowButtonPrev:{position:"absolute",top:"50%",left:"16px",transform:"translateY(-50%)"},arrowButtonNext:{position:"absolute",top:"50%",right:"16px",transform:"translateY(-50%)"}}))),v=(0,y.Z)((()=>({thumbnails:{marginLeft:"12px",marginBottom:"12px",marginTop:"auto",width:"calc(100vw - 364px)",overflowX:"auto",overflowY:"hidden"},gridContainer:{width:"100%"},thumb:{width:"96px",height:"96px",cursor:"pointer",userSelect:"none"},inactiveThumb:{filter:"brightness(0.5)"}}))),E=e=>{let{attributeValues:t,setAttributeValueIndex:r,attributeValueIndex:l}=e;const o=v(),s=(0,n.useRef)(null);return(0,n.useEffect)((()=>{if(null!=s&&s.current){const e=s.current.scrollLeft,t=s.current.offsetWidth+e,r=96*l+16*l+12;t<r?s.current.scroll&&(r>t+96+16?s.current.scroll(r,0):s.current.scroll(112+e,0)):e+96>r&&s.current.scroll&&s.current.scroll(r-96,0)}}),[l,s]),a().createElement("div",{ref:s,className:o.thumbnails},a().createElement(i.Grid,{container:!0,wrap:"nowrap",direction:"row",spacing:1,className:o.gridContainer},t.map(((e,t)=>{let{uri:n,value:s}=e;return a().createElement(i.Grid,{item:!0,key:n},a().createElement(f.Z,{onClick:()=>r(t),className:b()(o.thumb,{[o.inactiveThumb]:l!==t}),src:(0,c.efz)({value:s})}))}))))},w=e=>{let{className:t,attributeValues:r,attributeValueIndex:n,setAttributeValueIndex:l}=e;const o=x(),i=r[n],s=(0,c.QXK)(i);return a().createElement("div",{className:b()(o.root,t)},a().createElement("div",{className:o.main},n>0&&a().createElement(h.Z,{icon:m.Z,className:b()(o.arrowButton,o.arrowButtonPrev),onClick:()=>{l(n-1)},size:"XL"}),a().createElement(f.Z,{containerClassName:o.mainImageContainer,className:o.mainImage,size:s&&f.f.OVERRIDE,src:s}),n!==r.length-1&&a().createElement(h.Z,{icon:d.Z,className:b()(o.arrowButton,o.arrowButtonNext),onClick:()=>{l(n+1)},size:"XL"})),a().createElement(E,{attributeValues:r,attributeValueIndex:n,setAttributeValueIndex:l}))};var C=r(87918),O=r.n(C),T=r(33016),N=r(36138),S=r(63459),k=r(95038),A=r.n(k);const P={get CreationTime(){return O().text("Creation Time")},get CreationDate(){return O().text("Creation Date")},get Dimensions(){return O().text("Dimensions")},get MimeType(){return O().text("Mime Type")},get Size(){return O().text("Size")},get Url(){return O().text("Full image URL (S3)")},get UrlPreview(){return O().text("Preview image URL (S3)")},get UrlThumbnail(){return O().text("Small image URL (S3)")},get CdnUrl(){return O().text("Full image URL (CDN)")},get CdnUrlPreview(){return O().text("Preview image URL (CDN)")},get CdnUrlThumbnail(){return O().text("Small image URL (CDN)")}},Z=function(){let{value:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return["Url","UrlPreview","UrlThumbnail","CdnUrl","CdnUrlPreview","CdnUrlThumbnail","MimeType"].includes(t)?(0,p.path)([t,0,"value"],e):"CreationDate"===t&&(0,p.path)(["CreationTimestamp",0,"value"],e)?A()(e.CreationTimestamp[0].value).format("MM-DD-YYYY"):"CreationTime"===t&&(0,p.path)(["CreationTimestamp",0,"value"],e)?A()(e.CreationTimestamp[0].value).format("HH:mm:ss"):"Dimensions"===t&&(0,p.path)(["Height",0,"value"],e)&&(0,p.path)(["Width",0,"value"],e)?`${e.Height[0].value} x ${e.Width[0].value} ${O().text("pixels")}`:"Size"===t&&(0,p.path)(["Size",0,"value"],e)?`${(Number(e.Size[0].value)/1e3).toFixed(2)} KB`:void 0},I=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.filter((e=>{let{system:t}=e;return!t}))},L=(e,t)=>{const{includeNames:r=[],excludeNames:n=[],order:a=[]}=t,l=r.length?e.filter((e=>r.includes(e))):e.filter((e=>!n.includes(e)));return 0===a.length?l:l.sort(((e,t)=>{const r=a.indexOf(e),n=a.indexOf(t);return-1===r&&-1!==n?1:-1===n&&-1!==r?-1:r-n}))},j=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0;const n=I(t.attributes);return L(Object.keys(e.value||{}),r).reduce(((t,r)=>{const a=n.find((e=>{let{name:t}=e;return t===r}));return a?[...t,{attrType:a,values:e.value[r]}]:t}),[])},D=e=>["Url","UrlPreview","UrlThumbnail","CdnUrl","CdnUrlPreview","CdnUrlThumbnail"].includes(e),R=(0,y.Z)({title:{marginBottom:"10px",color:"white",fontSize:"18px",lineHeight:"21px","&$canAdd":{marginBottom:"3px"}},divider:{width:"100%",height:"1px",background:"rgba(255,255,255,0.12)"},canAdd:{}}),V=e=>{let{attributeType:t,onAddAttributes:r,uri:l}=e;const o=R(),s=I(t.attributes),c=Boolean(r);return a().createElement(i.Box,null,a().createElement(i.Typography,{className:b()(o.title,{[o.canAdd]:c})},O().text("Meta info")),c&&a().createElement(n.Fragment,null,a().createElement(S.Z,{label:O().text("Attributes"),data:s,dense:!1,onApply:e=>{r&&r(e.map((e=>({attributeType:e,parentUri:l}))))}}),a().createElement(i.Divider,{className:o.divider})))};var B=r(24625);const M=(0,y.Z)((e=>({root:{fontSize:"13px",letterSpacing:0,lineHeight:"15px",marginBottom:"11px"},title:{color:"rgba(255,255,255,0.54)",marginRight:"12px",float:"left"},content:{color:"rgba(255,255,255,0.87)",wordWrap:"break-word"},link:{color:e.palette.primary.main,textDecoration:"none"}}))),U=e=>{let{title:t,content:r,isLink:n,children:l}=e;const o=M();return a().createElement("div",{className:o.root},a().createElement("span",{className:o.title},t),n?a().createElement("a",{className:o.link,href:r},O().text("link")):a().createElement("span",{className:o.content},r||l))},z=(0,y.Z)({root:{padding:"10px 0"},title:{color:"rgba(255,255,255,0.54)",fontSize:"13px"},content:{color:"rgba(255,255,255,0.87)",wordWrap:"break-word"}}),_=e=>{let{attributeValue:t,attributeType:r,imageAttributeFieldsOrder:n}=e;const o=z(),c=(0,l.useSelector)(s.ZP.selectors.getIsViewMode),u=(p=t,m=n,L(Object.keys(P),m).map((e=>Z(p,e)?{title:P[e],value:Z(p,e),isLink:D(e)}:null)).filter(Boolean));var p,m;const d=j(t,r,n);return a().createElement(i.Box,{className:o.root},u.map((e=>{let{title:t,value:r,isLink:n}=e;return a().createElement(U,{key:t,isLink:n,title:t,content:r})})),c&&d.map((e=>{let{attrType:r,values:n}=e;return a().createElement(B.Z,{key:r.uri,attributeType:r,drawLines:!1,values:n,titleClassName:o.title,contentClassName:o.content,parentUri:t.uri})})))};var H=r(57161);const W=(0,y.Z)({root:{},form:{padding:"10px 0"},divider:{width:"100%",height:"1px",background:"rgba(255,255,255,0.12)"},actions:{display:"flex",justifyContent:"flex-end",marginTop:"4px"},cancelButton:{color:"white",marginRight:"8px"}}),F=e=>{let{attributeType:t,imageAttributeFieldsOrder:r,attributeValue:n,hasChanges:l,onDeleteAttribute:o,onChangeAttribute:s,onAddAttributes:u,onCancel:p,onApply:m,mode:d}=e;const g=W(),b=j(n,t,r),f=0!==b.length||0===b.length&&l;return a().createElement(i.Box,{className:g.root},a().createElement(i.Box,{className:g.form},b.map((e=>{let{attrType:t,values:r}=e;return a().createElement(H.ZP,{key:t.uri,parentUri:n.uri,attributeType:t,values:r,showEmptyEditors:(0,c.ZiX)(n.uri),mode:d,drawLines:!1,onDeleteAttribute:o,onChangeAttribute:s,onAddAttributes:u})}))),f&&a().createElement(a().Fragment,null,a().createElement(i.Divider,{className:g.divider}),a().createElement(i.Box,{className:g.actions},a().createElement(i.Button,{disabled:!l,onClick:p,className:g.cancelButton},O().text("Cancel")),a().createElement(i.Button,{disabled:!l,onClick:m,color:"primary"},O().text("Apply")))))};var q=r(39450);const Y={palette:{type:"dark",primary:c.rSc.palette.primary,secondary:c.rSc.palette.secondary}},$=(0,T.Z)(Y),G=e=>{let{imageAttributeFieldsOrder:t,attributeType:r,attributeValue:o}=e;const{addAttributes:u,changeAttribute:m,deleteAttribute:d,clearLocalChanges:g,applyLocalChanges:b,attributeValue:f,hasChanges:h}=(e=>{let{initialAttributeValue:t,attributeType:r}=e;const a=(0,l.useDispatch)(),o=(0,n.useContext)(q.m),[i,u]=(0,n.useState)(t);(0,n.useEffect)((()=>{u(t)}),[t]);const m=!(0,p.equals)(i,t),d=(0,n.useCallback)((e=>{u((t=>e.reduce(((e,t)=>{const{attributeType:r,parentUri:n,index:a}=t;return(0,c.tPT)({entity:e,attributeType:r,parentUri:n,index:a,nestingLevel:1})}),t)))}),[]),g=(0,n.useCallback)((e=>{let{value:t,attributeType:r,uri:n}=e;u((e=>(0,c.ww$)({entity:e,attributeType:r,uri:n,value:t,nestingLevel:1})))}),[]),b=(0,n.useCallback)((e=>{let{attributeType:t,uri:r}=e;u((e=>(0,c.d$I)({entity:e,attributeType:t,uri:r,nestingLevel:1})))}),[]);return{addAttributes:d,changeAttribute:g,deleteAttribute:b,clearLocalChanges:(0,n.useCallback)((()=>{u(t)}),[t]),applyLocalChanges:(0,n.useCallback)((()=>{a(s.N5.actions.modifyAttribute({value:i,attributeType:r,uri:i.uri,viewId:o}))}),[i,r,o,a]),attributeValue:i,hasChanges:m}})({attributeType:r,initialAttributeValue:o}),y=(0,l.useSelector)(s.ZP.selectors.getMode),x=(0,l.useSelector)(s.ZP.selectors.getIsEditableMode);return a().createElement(N.ThemeProvider,{theme:$},a().createElement(i.Box,null,a().createElement(V,{attributeType:r,uri:null==f?void 0:f.uri,onAddAttributes:x?u:void 0}),a().createElement(_,{attributeType:r,attributeValue:f,imageAttributeFieldsOrder:t}),x&&a().createElement(F,{mode:y,imageAttributeFieldsOrder:t,attributeType:r,attributeValue:f,hasChanges:h,onDeleteAttribute:d,onChangeAttribute:m,onAddAttributes:u,onCancel:g,onApply:b})))},X=(0,y.Z)((e=>({root:{position:"relative",backgroundColor:"#333",maxHeight:"calc(100vh - 64px)",overflow:"hidden"},header:{display:"flex",alignItems:"center",height:"56px",paddingLeft:"16px",boxShadow:`0 1px 0 0 ${e.palette.divider}`},headerTitle:{color:"rgba(255, 255, 255, 0.87)",fontSize:"16px",lineHeight:"19px"},bodyWrapper:{maxHeight:"calc(100% - 56px)",overflow:"auto"},body:{padding:"16px"},formControlLabel:{marginLeft:0,marginBottom:"27px"},checkboxLabel:{marginLeft:"8px",color:"rgba(255,255,255,0.87)",fontSize:"13px",lineHeight:"15px"},checkbox:{color:"white",padding:0}}))),K=e=>{let{className:t,attributeValue:r,handleSetAsDefault:o,attributeType:c}=e;const u=X(),p=(0,l.useSelector)(s.ZP.selectors.getEntity)||{},m=(0,l.useSelector)((e=>s.ZP.selectors.getModifiedEntity(e,null==p?void 0:p.uri)))||{},d=(0,l.useSelector)(s.ZP.selectors.getIsViewMode)?p:m,g=(0,l.useSelector)(s.ZP.selectors.getImageAttributesFieldsOrder)||{},f=g[null==p?void 0:p.type]||(null==g?void 0:g.default)||{},[h,y]=(0,n.useState)(!1);(0,n.useEffect)((()=>{y((null==d?void 0:d.defaultProfilePic)===(null==r?void 0:r.uri))}),[null==r?void 0:r.uri,d]);const x=(0,n.useCallback)((()=>{o(r.uri)}),[null==r?void 0:r.uri]);return a().createElement(i.Box,{className:b()(u.root,t)},a().createElement(i.Box,{className:u.header},a().createElement(i.Typography,{className:u.headerTitle},O().text("Details"))),a().createElement(i.Box,{className:u.bodyWrapper},a().createElement(i.Box,{className:u.body},a().createElement(i.FormControlLabel,{classes:{root:u.formControlLabel,label:u.checkboxLabel},control:a().createElement(i.Checkbox,{className:u.checkbox,checked:h,onChange:x,color:"default"}),label:O().text("Set as default")}),a().createElement(G,{attributeType:c,imageAttributeFieldsOrder:f,attributeValue:r}))))},Q=(0,y.Z)((()=>({root:{display:"flex",width:"100%",overflowY:"auto",height:"calc(100vh - 64px)"},main:{flex:"1 0 auto"},details:{width:"340px"}}))),J=e=>{let{attributeValues:t=[],currentAttributeValueUri:r,setCurrentAttributeValueUri:l,handleSetAsDefault:o,attributeType:s}=e;const[c,u]=(0,n.useState)(0);(0,n.useEffect)((()=>{p(r?t.findIndex((e=>e.uri===r)):0)}),[r,t]);const p=(0,n.useCallback)((e=>{var r;u(e),l(null===(r=t[e])||void 0===r?void 0:r.uri)}),[t]),m=Q();return a().createElement(i.Box,{className:m.root},a().createElement(w,{attributeValueIndex:c,setAttributeValueIndex:p,attributeValues:t,className:m.main}),a().createElement(K,{handleSetAsDefault:o,attributeValue:t[c],className:m.details,attributeType:s}))};var ee=r(81853),te=r(97193);const re=(0,y.Z)((()=>({root:{padding:"0 24px",overflowY:"auto",height:"calc(100vh - 64px)"},item:{padding:"2px"}}))),ne=e=>{let{items:t,selectedItems:r,onSelectImage:n,onDeselectImage:l,onShareLink:o,onSetAsDefault:s,onDownload:c,onClickImage:u,onDelete:p}=e;const m=re(),d=e=>a().createElement(te.Z,{id:e,selected:r.includes(e),selectionMode:0!==r.length,onSelect:()=>n(e),onDeselect:()=>l(e),onShareLink:()=>o(e),onSetAsDefault:()=>s(e),onDownload:()=>c(e),onClick:()=>u(e),onDelete:p?()=>p(e):void 0,canBeSelected:!0});return a().createElement(i.Box,{className:m.root},a().createElement(i.Grid,{container:!0},t.map((e=>{let{id:t,src:r}=e;return a().createElement(i.Grid,{key:t,classes:{item:m.item},item:!0},a().createElement(f.Z,{size:f.f.LARGE,onClick:()=>u(t),src:r,overlay:d(t)}))}))))},ae=(0,y.Z)((e=>({selectButton:{fontSize:"14px",fontWeight:500,color:e.palette.primary.main,textTransform:"uppercase"}}))),le=e=>{let{selectedItems:t,items:r,onSelectAll:n,onClearAll:l}=e;const o=ae(),s=t.length===r.length;return a().createElement(i.Link,{component:"button",underline:"none",classes:{button:o.selectButton},onClick:s?l:n},s?O().text("Clear selection"):O().text("Select all images"))};var oe=r(94438),ie=r(22983),se=r(35292),ce=r(97989),ue=r(8818);const pe=(0,y.Z)((()=>({downloadButton:{color:"#fff",fontSize:"24px",marginLeft:"30px"},shareButton:{color:"#fff",fontSize:"24px",marginLeft:"21px"},deleteButton:{color:"#fff",fontSize:"24px",marginLeft:"24px"},divider:{height:"31px",width:"1px",marginLeft:"10px",backgroundColor:"rgba(255,255,255,0.38)"}}))),me=e=>{let{onDownload:t,onShare:r,onUpload:n,onDelete:l}=e;const o=pe();return a().createElement(a().Fragment,null,n&&a().createElement(i.Button,{variant:"contained",color:"primary",onClick:n,startIcon:a().createElement(oe.Z,null)},O().text("Upload")),t&&n&&a().createElement("div",{className:o.divider}),t&&a().createElement(ue.k,{className:o.downloadButton,tooltipTitle:O().text("Download selected items"),icon:ce.Z,onClick:t}),r&&a().createElement(ue.k,{className:o.shareButton,tooltipTitle:O().text("Copy link"),icon:se.Z,onClick:r}),l&&a().createElement(ue.k,{className:o.deleteButton,tooltipTitle:O().text("Delete selected items"),icon:ie.Z,onClick:l}))},de=e=>{let{attributeValues:t,open:r,onClose:o,currentAttributeValueUri:i,setCurrentAttributeValueUri:u,attributeType:m,onDownload:d,onShareLink:g,onSetAsDefault:b,onUpload:f,onDeleteAttribute:h}=e;const[y,x]=(0,n.useState)([]),[v,E]=(0,n.useState)(ee.A.GALLERY_MODE),w=(0,l.useSelector)(s.ZP.selectors.getIsViewMode);(0,n.useEffect)((()=>{E(i?ee.A.DETAILS_MODE:ee.A.GALLERY_MODE)}),[i]);const C=t.map((e=>({src:(0,c.efz)(e),downloadURL:(0,c.Q5d)(e),id:e.uri}))),O=e=>{g(C.find((0,p.propEq)("id",e)).downloadURL)},T=e=>{const r=t.find((t=>{let{uri:r}=t;return r===e}));b(r)},N=e=>{h({uri:e,attributeType:m})},S=v===ee.A.GALLERY_MODE,k=v===ee.A.DETAILS_MODE,A=y.length>0,P=k||S&&A,Z=!w&&P,I=!w&&(k||S&&!A),L=S&&A&&a().createElement(le,{items:C,selectedItems:y,onClearAll:()=>{x([])},onSelectAll:()=>{x((0,p.pluck)("id",C))}}),j=a().createElement(me,{onDelete:Z?()=>{(S?y:[i]).forEach((e=>{N(e)})),y.length&&x([])}:void 0,onDownload:P?()=>{const e=S?(0,p.pipe)((0,p.filter)((e=>{let{id:t}=e;return y.includes(t)})),(0,p.pluck)("downloadURL"))(C):[C.find((0,p.propEq)("id",i)).downloadURL];d(e)}:void 0,onShare:k?()=>{O(i)}:void 0,onUpload:I?f:void 0});return a().createElement(ee.C,{mode:v,open:r,onChangeMode:E,header:{left:L,right:j},onClose:o},S&&a().createElement(ne,{items:C,selectedItems:y,onSelectImage:e=>{x((t=>[...t,e]))},onDeselectImage:e=>{x((t=>t.filter((t=>t!==e))))},onShareLink:O,onSetAsDefault:T,onDownload:e=>{d([C.find((0,p.propEq)("id",e)).downloadURL])},onClickImage:e=>{u(e),E(ee.A.DETAILS_MODE)},onDelete:w?void 0:N}),k&&a().createElement(J,{handleSetAsDefault:T,setCurrentAttributeValueUri:u,currentAttributeValueUri:i,attributeValues:t,attributeType:m}))};var ge=r(95117);const be=(0,y.Z)((e=>({imageBox:{position:"relative",display:"flex",width:"100%",flexGrow:1,flexShrink:0,flexWrap:"nowrap",marginTop:"2px",overflow:"hidden"},moreButtonContainer:e=>{let{imageWidth:t,imageHeight:r}=e;return{backgroundColor:"white",width:t,height:r,position:"absolute",right:0,cursor:"pointer"}},moreButton:t=>{let{imageWidth:r,imageHeight:n}=t;return{display:"flex",justifyContent:"center",alignItems:"center",width:r,height:n,backgroundColor:(0,i.fade)(e.palette.primary.main,.06)}},number:{color:e.palette.primary.main,fontSize:"24px",lineHeight:"42px",letterSpacing:0,textAlign:"center",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}})));function fe(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const he=e=>{let{attributeType:t,attributeValues:r=[],renderImage:p,overlay:m=!1,countFixedItems:d=0,children:g,onUpload:b,onDeleteAttribute:f,imageSize:h=ge.By,paging:y,parentUri:x,showNonOv:v,requestNextPageOfAttributeValues:E}=e;const w=(0,l.useSelector)(s.ZP.selectors.getEntity)||{},C=(0,l.useSelector)(s.ZP.selectors.getIsViewMode),O=(0,l.useDispatch)(),T=be(h);(0,n.useEffect)((()=>{if(y&&E){const e=v?y.totalOvValues:y.totalValues;e>r.length&&E({parentUri:x,attributeTypeUri:t.uri,attributeTypeName:t.name,values:[],defaultMaxValues:e})}}),[y,E,t,x,r.length,v]);const N=(0,n.useRef)(),[S,k]=(0,n.useState)(0),[A,P]=(0,n.useState)(0),Z=(0,n.useContext)(u.P),[I,L]=(0,n.useState)(!1),[j,D]=(0,n.useState)(),R=(0,n.useCallback)((e=>{const{imageMargin:t,imageWidth:n}=h,a=Math.floor((e+t)/(n+t))-d,l=e+t-(a+d)*(n+t)<ge.lc;k(a),r.length>a?P(r.length-a+(l?1:0)):P(0)}),[r.length,d,h]),V=(0,n.useCallback)((e=>{R(e),N.current=e}),[R]);(0,n.useEffect)((()=>{N.current&&R(N.current)}),[r.length,R]);const B=(0,n.useCallback)((e=>{Z||(D(e),L(!0))}),[Z]),M=(0,n.useCallback)((()=>{L(!1)}),[]),U=e=>(e=>{e.forEach(((e,t)=>{try{if((e=>!!(e=>e.indexOf("://")>0||0===e.indexOf("//"))(e)&&new URL(e).host!==location.host)(e)){const r=document.createElement("iframe");r.setAttribute("style","display: none;"),r.setAttribute("src",e),document.body.appendChild(r),setTimeout((()=>document.body.removeChild(r)),3e4*(t+1))}else{const t=document.createElement("a");t.href=e,t.download=(e=>e.split("/").pop())(e),document.body.appendChild(t),t.click(),document.body.removeChild(t)}}catch(e){console.error(e)}}))})(e),z=e=>navigator.clipboard.writeText(e),_=(0,n.useCallback)((e=>{C?(0,c.YL3)(w.uri,e.uri).then((t=>{let{status:r}=t;"success"===r&&O(s.N5.entity.actions.setDefaultProfilePic(e))})):O(s.N5.modifiedEntities.actions.setDefaultProfilePic({entityUri:w.uri,value:e}))}),[C,w.uri,O]),H=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){fe(e,t,r[t])}))}return e}({onOpenImageGalleryDialog:B},m&&{onDownload:U,onShareLink:z,onSetAsDefault:_});return a().createElement(a().Fragment,null,a().createElement(o.Z,{handleWidth:!0,onResize:V}),a().createElement(de,{attributeValues:r,open:I,onClose:M,setCurrentAttributeValueUri:D,currentAttributeValueUri:j,attributeType:t,onDownload:U,onShareLink:z,onSetAsDefault:_,onUpload:b,onDeleteAttribute:f}),a().createElement("div",{className:T.imageBox},g,r.slice(0,S).map(p(H)),A>0&&a().createElement("div",{className:T.moreButtonContainer},a().createElement("div",{className:T.moreButton,onClick:()=>B()},a().createElement(i.Typography,{className:T.number},`+${A}`)))))}},95117:(e,t,r)=>{r.d(t,{lc:()=>o,By:()=>i});var n=r(27952);const a=n.f.SMALL.imageWidth,l=n.f.SMALL.imageHeight,o=8,i={imageMargin:4,imageWidth:a,imageHeight:l}},91181:(e,t,r)=>{r.d(t,{Z:()=>h});var n=r(24328),a=r.n(n),l=r(13980),o=r.n(l),i=r(71153),s=r.n(i),c=r(94079),u=r(99493),p=r(79692),m=r(41128);const d=(0,p.Z)((e=>({container:{height:"16px",borderColor:(0,m.U1)(e.palette.primary.main,.54)},label:{paddingLeft:"4px",paddingRight:"4px",fontSize:"10px",lineHeight:"11px",color:e.palette.primary.main}})));var g=r(72768);const b=(0,r(83348).Z)(c.Chip),f=e=>{let{className:t,attributeType:r,nonOvValues:n=[],nonOvTotal:l}=e;const o=d();if(!l)return null;const i=n.length?n.map(((e,t)=>a().createElement("div",{key:t},(0,u.YkM)(r)?(0,u.idV)(e.label):a().createElement(g.Z,{value:(0,u.kDl)(e),dataTypeDefinition:(0,u.PFL)(r),rich:!1})))):null;return a().createElement(b,{tooltipTitle:i,tooltipPlacement:"top",label:`+ ${l}`,variant:"outlined",classes:{root:s()(o.container,t),label:o.label}})};f.propTypes={className:o().string,nonOvTotal:o().number,attributeType:u.EMD,nonOvValues:o().arrayOf(o().oneOfType([u.cNQ,u.dMV,u.Rtp]))};const h=f},50763:(e,t,r)=>{r.d(t,{m:()=>N});var n=r(24328),a=r.n(n),l=r(52730),o=r(94079),i=r(87638),s=r(99493),c=r(17440),u=r(60995);const p=(e,t,r,n)=>{const a=((e,t)=>{const r=t.find((t=>t.uri===e.uri));return r&&Array.isArray(r.children)?r.children:[]})(e,r);let l=(null==e?void 0:e.attributes)||(null==e?void 0:e.analyticsAttributes)||[];return a.length&&(l=l.filter((e=>a.includes(e.uri)))),l.reduce(((e,a)=>{const l=m(t[a.name],n,r);return l&&l.length&&(Array.isArray(l[0])?e.push({[a.uri]:l[0]}):e.push({[a.uri]:l})),e}),[])},m=(e,t,r)=>{if(e&&0!==e.length)return e.reduce(((e,n)=>{if("type"in n&&n.type){const a="lookupCode"in n?n.lookupCode:n.value,l=(0,s.zeJ)(t,n.type);a&&"object"!=typeof a&&(0,s.OXP)(n)?e.push(d(a,l)):a&&"object"==typeof a&&!Array.isArray(a)&&e.push(p(l,a,r,t))}return e}),[])},d=(e,t)=>{switch(null==t?void 0:t.type){case s.oS0.TYPE_DATE:return new Date(e).getTime();case s.oS0.TYPE_TIMESTAMP:return isNaN(Number(e))?new Date(e).getTime():new Date(Number(e)).getTime();default:return e}};function g(){return g=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},g.apply(this,arguments)}const b=e=>a().createElement("svg",g({width:11,height:11,viewBox:"0 0 11 11"},e),a().createElement("path",{d:"M2.514 5h2.314V3l2.5 2.5-2.5 2.5V6h-3.8a4.5 4.5 0 10.73-3H.6a5.5 5.5 0 11-.577 3H0V5H2.514z",fill:"#6CACE4",stroke:"none",strokeWidth:1,fillRule:"evenodd"}));var f=r(87918),h=r.n(f),y=r(53180),x=r(31039),v=r(67218),E=r(79692);const w=(0,E.Z)((e=>({container:{backgroundColor:"white",width:"360px",minWidth:"360px",maxWidth:"720px"},header:{display:"flex",height:"48px",alignItems:"center",justifyContent:"space-between",paddingLeft:"16px"},title:{color:e.palette.text.primary,fontSize:"16px",letterSpacing:"0.15px",lineHeight:"19px"},entityTypeLabel:{color:"rgba(0,0,0,0.67)",fontSize:"14px",paddingLeft:"16px",paddingBottom:"12px",lineHeight:"16px"},divider:{height:"24px",width:"1px",backgroundColor:"rgba(0,0,0,0.12)"},headerCount:{color:e.palette.text.secondary,fontSize:"14px",letterSpacing:"0.24px",lineHeight:"28px",width:"210px"},body:{borderBottom:"1px solid rgba(0,0,0,0.12)",padding:"0 16px 8px"},footer:{display:"flex",alignItems:"center",height:"31px",paddingLeft:"16px",color:e.palette.primary.main,fontSize:"13px",letterSpacing:"0",lineHeight:"15px"},profileIcon:{height:"16px",width:"16px"},entityContainer:{display:"flex",flexDirection:"row",alignItems:"center"},entityLabel:{color:e.palette.primary.main,fontSize:"13px",letterSpacing:"0",lineHeight:"15px",textDecoration:"none",paddingLeft:"8px"},icon:{margin:"auto 8px auto 0"},content:{color:e.palette.primary.main,cursor:"pointer"},seeAllButton:{cursor:"pointer"}}))),C=(0,E.Z)({tooltip:{backgroundColor:"white",boxShadow:"0 4px 5px 0 rgba(0,0,0,0.14), 0 1px 10px 0 rgba(0,0,0,0.12), 0 2px 4px -1px rgba(0,0,0,0.2)",padding:0,borderRadius:"4px",maxWidth:"none"},arrow:{"&::before":{backgroundColor:"white"}}});function O(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const T=e=>{let{value:t,attributeType:r,config:o={},onSeeAllClick:c}=e;const[u,p]=(0,n.useState)([]),[m,d]=(0,n.useState)(0),g=(0,l.useSelector)(i.ZP.selectors.getEntity)||{},b=(0,v._)(),f=w(),E=(0,l.useSelector)(i.ZP.selectors.getGlobalSearchRequestOptions)||{},C=o.entityType||g.type,T=m>6;(0,n.useEffect)((()=>{const e=(0,s.BlA)({value:t,attributeType:r,entityType:C}),n=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){O(e,t,r[t])}))}return e}({max:6},E);b(Promise.all([(0,s.ZOr)(e,n),(0,s.j_Q)(e,n)])).then((e=>{const[t,{total:r}]=e;p(Array.isArray(t)?t:[]),d(r)})).catch((()=>{p([]),d(0)}))}),[]);const N=Boolean(o.label);return a().createElement("div",{className:f.container},a().createElement("div",{className:f.header},a().createElement("div",{className:f.title},h().text("Pivot profiles")),a().createElement("div",{className:f.divider}),a().createElement("div",{className:f.headerCount},h().number(m,"0,0")+" "+(1===m?h().text("item"):h().text("items")))),N&&a().createElement("div",{className:f.entityTypeLabel},o.label),a().createElement("div",{className:f.body},u.map((e=>a().createElement("div",{key:e.uri,className:f.entityContainer},a().createElement(y.Z,{entity:e,avatarClassName:f.profileIcon}),a().createElement(x.Z,{className:f.entityLabel,value:(0,s.wwR)(e)},(0,s.idV)(e.label)))))),T&&a().createElement("div",{className:f.footer},a().createElement("a",{className:f.seeAllButton,onClick:c},h().text("See all"))))},N=e=>{let{value:t,attributeType:r,children:m,className:g}=e;const f=C(),h=w(),y=(0,l.useDispatch)(),x=(0,n.useContext)(u.J)||[],v=(0,s.QZu)(r),E=(0,l.useSelector)(i.ZP.selectors.getMetadata)||{},O=v?p(r,t.value,x,E):d(t.lookupCode||t.value,r),N=x.some((e=>{let{uri:t}=e;return t===r.uri}))&&(Array.isArray(O)&&O.length||!Array.isArray(O)&&!(0,c.isNil)(O)),S=x.find((e=>{let{uri:t}=e;return t===r.uri})),k=()=>{const e=Array.isArray(O)?O.map((e=>Object.fromEntries(Object.entries(e).map((e=>{let[t,r]=e;return[(0,s.nIW)(t),r]}))))):((e,t)=>[{[e.name]:t}])(r,O);y(i.ui.actions.openPivotingPerspective({value:e,attributeType:r}))};return N?a().createElement(o.Tooltip,{interactive:!0,arrow:!0,placement:"right-start",classes:f,title:a().createElement(T,{value:O,attributeType:r,config:S.popup,onSeeAllClick:k})},a().createElement("span",{className:g},a().createElement(b,{className:h.icon}),a().createElement("span",{className:h.content,onClick:k},m))):a().createElement(a().Fragment,null,m)}},96698:(e,t,r)=>{r.d(t,{Z:()=>u});var n=r(24328),a=r.n(n),l=r(99493),o=r(39462),i=r(62630),s=r(2163);function c(){return c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},c.apply(this,arguments)}const u=e=>{const{attributeType:t}=e;return class{static build(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{showEmptyEditors:r,onAddAttributes:n,lazy:u,errors:p,crosswalks:m,showNonOv:d}=t,g=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(t,["showEmptyEditors","onAddAttributes","lazy","errors","crosswalks","showNonOv"]);switch(e.type){case l.oS0.TYPE_NESTED:return a().createElement(i.Z,t);case l.oS0.TYPE_REFERENCE:return a().createElement(s.Z,t);default:return a().createElement(o.Z,c({isReltioCrosswalk:(0,l.KVV)(m,t.attributeValue)},g))}}}.build(t,e)}},91262:(e,t,r)=>{r.d(t,{Z:()=>x});var n=r(24328),a=r.n(n),l=r(13980),o=r.n(l),i=r(87918),s=r.n(i),c=r(99493),u=r(17440),p=r(57161),m=r(95974),d=r(63459),g=r(78836),b=r(8261);var f=r(66784);function h(){return h=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},h.apply(this,arguments)}const y=e=>{let{attrTypes:t,entity:r,parentUri:l,showEmptyEditors:o,mode:i,crosswalks:y,drawLines:x,children:v,className:E,alwaysVisibleTypeUris:w=g.S,onAddAttributes:C,onChangeAttribute:O,onDeleteAttribute:T,additionalControlsRenderer:N,showNonOv:S}=e;const{attributes:k={}}=r,A=(0,n.useMemo)((()=>(0,c._kX)(i,t)),[t,i]),P=((e,t)=>e.filter((e=>{const r=((e,t)=>{const{attributes:r={},analyticsAttributes:n={}}=t;return(0,u.cond)([[c.kqr,(0,u.always)(t)],[(0,u.both)(c.kQw,(0,u.always)(n)),(0,u.always)(n)],[u.T,(0,u.always)(r)]])(e)})(e,t),n=(e=>(0,c.kqr)(e)?"uri":"name")(e);return!((e.singleValue||(0,c.ian)(e)||(0,c.VFZ)(e))&&(0,u.has)(e[n])(r))})))(A,r),Z=(0,n.useContext)(f.c),I=(0,n.useMemo)((()=>(0,c.Gtj)(t,i,r,o,S,Z)),[t,i,r,o,S,Z]),[L,j]=(0,n.useMemo)((()=>(0,b.A)(w,I)),[I,w]),D=(0,n.useCallback)((e=>{C(e.map((e=>({attributeType:e,parentUri:l}))))}),[C,l]),R={enabled:x};return a().createElement("div",{className:E},v&&a().createElement(m.Z,R,v),a().createElement(m.Z,h({},R,{plain:!0}),A.length>0&&a().createElement(d.Z,{label:s().text("More attributes"),onApply:D,dense:x,data:P})),j.concat(L).map((e=>{let{attrType:t,values:r}=e;return a().createElement(p.ZP,{key:t.uri,attributeType:t,drawLines:x,values:r,paging:(0,u.path)(["paging",t.uri],k),parentUri:l,showEmptyEditors:o,mode:i,crosswalks:y,onAddAttributes:C,onChangeAttribute:O,onDeleteAttribute:T,additionalControlsRenderer:N,showNonOv:S})})))};y.propTypes={attrTypes:o().array,entity:o().object,parentUri:o().string,children:o().node,showEmptyEditors:o().bool,mode:c.XGc,crosswalks:o().array,drawLines:o().bool,showNonOv:o().bool,className:o().string,alwaysVisibleTypeUris:o().array,onAddAttributes:o().func,onChangeAttribute:o().func,onDeleteAttribute:o().func,additionalControlsRenderer:o().func};const x=(0,n.memo)(y)},93140:(e,t,r)=>{r.d(t,{Z:()=>v});var n=r(24328),a=r.n(n),l=r(99493),o=r(94079),i=r(17440),s=r(51201),c=r(87918),u=r.n(c);const p=e=>u().text("${value}",{value:1===e?u().text("value"):u().text("values")}),m=(0,i.has)("minValue"),d=(0,i.has)("maxValue"),g=(0,i.pipe)(d,i.not),b=(0,i.propSatisfies)((e=>1===e),"minValue"),f=e=>{let{minValue:t}=e;return u().text("This attribute can have minimum ${minValue} ${minValueCaption}",{minValue:u().number(t,"0"),minValueCaption:p(t)})},h=e=>{let{maxValue:t}=e;return u().text("This attribute can have maximum ${maxValue} ${maxValueCaption}",{maxValue:u().number(t,"0"),maxValueCaption:p(t)})},y=(0,i.cond)([[i.isNil,(0,i.always)("")],[e=>{let{minValue:t,maxValue:r}=e;return t&&t===r},e=>{let{minValue:t}=e;return u().text("This attribute should have ${minValue} ${minValueCaption}",{minValue:u().number(t,"0"),minValueCaption:p(t)})}],[(0,i.allPass)([b,d]),h],[(0,i.allPass)([b,g]),(0,i.always)("")],[(0,i.allPass)([m,d]),e=>{let{minValue:t,maxValue:r}=e;return u().text("${minCardinality} and maximum ${maxValue} ${maxValueCaption}",{minCardinality:f({minValue:t}),maxValue:u().number(r,"0"),maxValueCaption:p(r)})}],[d,h],[m,f],[i.T,(0,i.always)("")]]),x=e=>{let{cardinality:t}=e;const r=(0,s.y)();return a().createElement(o.Typography,{variant:"caption",className:r.caption},y(t))};x.propTypes={cardinality:l.oA3};const v=x},57161:(e,t,r)=>{r.d(t,{ZP:()=>W});var n=r(52730),a=r(87638),l=r(99493),o=r(24328),i=r.n(o),s=r(17440),c=r(95974),u=r(24338),p=r(76134),m=r(95629),d=r(12437),g=r(48554),b=r(96698),f=r(93140),h=r(51201);const y=(0,s.filter)((0,s.propSatisfies)(l.ZiX,"uri"));var x=r(66784),v=r(91181);const E=e=>{let{max:t,values:r,attributeType:n,parentUri:a,mode:u,drawLines:E,showEmptyEditors:w,errorMessage:C,errors:O,paging:T,crosswalks:N,showNonOv:S,nonVisibleValues:k,onAddAttributes:A,onDeleteAttribute:P,onChangeAttribute:Z,onDeactivateError:I,additionalControlsRenderer:L,requestNextPageOfAttributeValues:j}=e;const D=(0,h.y)(),[R,V]=(0,o.useState)(t),[B,M]=(0,o.useState)(!1),{label:U,required:z,cardinality:_,name:H,uri:W}=n,F=(0,l.KIu)(u),q=(0,o.useContext)(x.c),Y=(0,o.useMemo)((()=>null==q?void 0:q.includes(W)),[W,q]),$=(0,l.O27)(r),G=(!B&&w||z||Y)&&$,X=(0,o.useRef)((0,l.gjI)({parentUri:a,attributeType:n})),K=(0,o.useCallback)((()=>{V(R+1);const e={parentUri:a,index:R,attributeType:n};return A(G&&!(0,l.YkM)(n.type)?[e,e]:[e])}),[R,A,a,n,G]),Q=(0,o.useCallback)((0,s.pipe)(P,s.T,M),[P,M]);if($&&!G)return null;if(G&&$&&(r=[X.current]),(0,l.O27)(r))return null;const J=(y(r)||[]).length,ee=S?"totalValues":"totalOvValues",te=(0,s.ifElse)((0,s.has)(ee),(0,s.pipe)((0,s.prop)(ee),(0,s.add)(J)),(0,s.always)(r.length))(T),re=null!=T&&T.totalValues?T.totalValues-te:null==k?void 0:k.length,ne=t<te,ae=ne&&R<te,le=ne&&R>=te,oe=r.slice(0,R),ie=oe?oe.length-1:0,se=te-R;return i().createElement(c.Z,{enabled:E},i().createElement("div",{className:D.wrapper},i().createElement("div",{className:D.titleWrapper},i().createElement(m.Z,{label:U,isRequired:z,className:D.title,"data-reltio-id":"reltio-attribute-label"}),i().createElement(v.Z,{nonOvValues:k,attributeType:n,className:D.ovIcon,nonOvTotal:re})),F&&i().createElement(f.Z,{cardinality:_}),F&&i().createElement(p.Z,{message:C,className:D.typeError}),i().createElement("div",{className:D.attributesWrapper},oe.map(((e,t)=>i().createElement(b.Z,{key:e.uri,attributeValue:e,attributeType:n,lazy:G&&!z,showEmptyEditors:w,errors:O,ownError:(0,l.ADq)(e,t,n.uri,O),mode:u,crosswalks:N,onAddOneMore:ie===t?K:null,onAddAttributes:A,onDeleteAttribute:Q,onChangeAttribute:Z,onDeactivateError:I,additionalControlsRenderer:L}))),ae&&i().createElement(g.Z,{moreNumber:(0,s.min)(t,se),valueNumber:se,onClick:()=>{r.length<te&&j({parentUri:a,attributeTypeUri:W,attributeTypeName:H,values:r,defaultMaxValues:t}),V(R+t)}}),le&&i().createElement(d.Z,{onClick:()=>{V(t)}}))))};var w=r(94079),C=r(31517),O=r(82455),T=r(79692);const N=(0,T.Z)({container:{display:"flex",flex:1,alignItems:"flex-start",marginBottom:"10px"},roleContainer:{width:"100%"},valueContainer:{marginLeft:"8px",width:0},deleteButton:{marginLeft:"8px"}});var S=r(22385),k=r(22983);const A={MultiValue:O.Z},P=e=>{let{values:t,onChange:r,onDelete:c}=e;const u=N(),p=(0,n.useSelector)(a.ZP.selectors.getMetadata),m=(0,n.useSelector)(a.ZP.selectors.getEntity),d=m.uri,g=(0,l.JvE)(p,m.type).map((e=>({value:e.uri,label:e.label}))),b=(t||[]).map((e=>{var t;return{value:e,label:(null===(t=g.find((0,s.propEq)("value",e)))||void 0===t?void 0:t.label)||(0,l.nIW)(e)}})),f=(0,o.useCallback)((e=>{const t=(null==e?void 0:e.map((0,s.prop)("value")))||[];r({value:t,attributeType:l.xPW.roles,uri:d})}),[d,r]),h=(0,o.useCallback)((()=>{c({uri:d,attributeType:l.xPW.roles})}),[d,c]);return i().createElement("div",{className:u.container,"data-reltio-id":"reltio-attribute-value"},i().createElement(C.Z,{label:"",height:40,isMulti:!0,options:g,value:b,onChange:f,components:A,classes:u,className:u.roleContainer}),!!c&&i().createElement(S.Z,{className:u.deleteButton,icon:k.Z,onClick:h,size:"L"}))};var Z=r(39331);const I=(0,T.Z)({container:{display:"flex",flex:1,alignItems:"flex-start",marginBottom:"10px"},deleteButton:{marginLeft:"8px"}}),L=e=>e?`?filter=${(0,l.Uqd)()((e=>[{filter:"containsWordStartingWith",fieldName:"tags",values:[e]}])(e))}`:"",j=[{fieldName:"tags",orderType:"reversedCount"}],D=e=>(0,l.FK9)({query:L(e),body:j}).then((e=>Object.keys(e.tags))),R=e=>{let{className:t,values:r,onChange:s,onDelete:c}=e;const u=I(),p=(0,n.useSelector)(a.ZP.selectors.getEntityUri),m=(0,o.useCallback)((e=>{s({value:e,attributeType:l.xPW.tags,uri:p})}),[s,p]),d=(0,o.useCallback)((()=>{c({uri:p,attributeType:l.xPW.tags})}),[p,c]);return i().createElement("div",{className:u.container,"data-reltio-id":"reltio-attribute-value"},i().createElement(Z.Z,{fullWidth:!0,multiple:!0,variant:"filled",className:t,value:r||[],onChange:m,getSuggestions:D}),!!c&&i().createElement(S.Z,{className:u.deleteButton,icon:k.Z,onClick:d,size:"L"}))};function V(){return V=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},V.apply(this,arguments)}function B(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const M=e=>{let{values:t,attributeType:r,parentUri:n,mode:a,errorMessage:c,onDeleteAttribute:u,onChangeAttribute:d,showEmptyEditors:g}=e,y=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["values","attributeType","parentUri","mode","errorMessage","onDeleteAttribute","onChangeAttribute","showEmptyEditors"]);const x=(0,h.y)(),{label:v,required:E,cardinality:C}=r,O=(0,l.KIu)(a),[T,N]=(0,o.useState)(!1),S=(0,o.useCallback)((0,s.pipe)(u,s.T,N),[u,N]),k=(0,l.O27)(t),A=!T&&g&&k,Z=(0,o.useRef)((0,l.gjI)({parentUri:n,attributeType:r}));return(0,l.j2U)(r)&&k&&!A?null:i().createElement(w.Box,{className:x.wrapper},i().createElement(m.Z,{label:v,isRequired:E,className:x.title,"data-reltio-id":"reltio-attribute-label"}),O&&i().createElement(f.Z,{cardinality:C}),O&&i().createElement(p.Z,{message:c}),i().createElement(w.Box,{className:x.attributesWrapper},(()=>{switch(r.uri){case l.xPW.tags.uri:return i().createElement(R,{values:t,onDelete:S,onChange:d});case l.xPW.roles.uri:return i().createElement(P,{values:t,onDelete:S,onChange:d});default:{const e=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){B(e,t,r[t])}))}return e}({},Z.current,{value:t[0]||""});return i().createElement(b.Z,V({attributeValue:e,attributeType:r,mode:a,onDeleteAttribute:S,onChangeAttribute:d},y))}}})()))};function U(){return U=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},U.apply(this,arguments)}var z;!function(e){e.imageLine="imageLine",e.special="special",e.default="default"}(z||(z={}));const _=(0,o.memo)((e=>{let{values:t,attributeType:r,mode:n=l.ARY.Viewing,crosswalks:a,drawLines:o,paging:p={},parentUri:d,errors:g,errorMessage:b,max:f=1/0,showEmptyEditors:y,showNonOv:x,onAddAttributes:v,onDeleteAttribute:w,onChangeAttribute:C,onDeactivateError:O,additionalControlsRenderer:T,requestNextPageOfAttributeValues:N}=e;const S=(0,h.y)(),k=(0,s.partition)(l.OXP),[A,P]=k(t),Z=x?t:A,I=x?[]:P,L={errorMessage:b,errors:g,mode:n,parentUri:d,onAddAttributes:v,onDeleteAttribute:w,onChangeAttribute:C,onDeactivateError:O,additionalControlsRenderer:T,showEmptyEditors:y};return(()=>{switch((0,s.cond)([[l.kqr,(0,s.always)(z.special)],[l.Or$,(0,s.always)(z.imageLine)],[s.T,(0,s.always)(z.default)]])(r)){case z.special:return i().createElement(c.Z,{enabled:o},i().createElement(M,U({values:Z,attributeType:r},L)));case z.imageLine:return i().createElement(c.Z,{enabled:o},i().createElement("div",{className:S.wrapper},i().createElement(m.Z,{label:null==r?void 0:r.label,"data-reltio-id":"reltio-attribute-label"}),i().createElement(u.Z,{attributeValues:Z,attributeType:r,paging:p,onDeleteAttribute:w,parentUri:d,onChangeAttribute:C,requestNextPageOfAttributeValues:N,showNonOv:x})));default:return i().createElement(E,U({values:Z,attributeType:r,max:f,paging:p,crosswalks:a,drawLines:o,requestNextPageOfAttributeValues:N,showNonOv:x,nonVisibleValues:I},L))}})()})),H={requestNextPageOfAttributeValues:a.N5.actions.requestNextPageOfAttributeValues,onDeactivateError:a.N5.errors.actions.errorDeactivated},W=(0,n.connect)(((e,t)=>{let{parentUri:r,attributeType:n,max:o}=t;return{errors:a.ZP.selectors.getActiveErrorsForAttributesPager(e,r,n),errorMessage:(0,l.tQX)(r,n,a.ZP.selectors.getProfileErrors(e)),max:o||a.ZP.selectors.getDefaultMaxValues(e)}}),H)(_)},51201:(e,t,r)=>{r.d(t,{y:()=>n});const n=(0,r(79692).Z)((e=>({caption:{fontSize:"0.7rem",opacity:.54},wrapper:{display:"flex",flexDirection:"column",alignItems:"flex-start"},attributesWrapper:{width:"100%",marginBottom:"10px"},link:{display:"flex",marginTop:4},"svg-icon__root":{fontSize:"1rem"},title:{fontSize:"12px",lineHeight:"14px",paddingLeft:"12px",color:e.palette.text.secondary},typeError:{marginLeft:"12px"},ovIcon:{marginLeft:"8px",marginTop:"-1px",textIndent:0},titleWrapper:{flex:1,paddingBottom:"3px"}})))},77325:(e,t,r)=>{r.d(t,{Z:()=>E});var n=r(24328),a=r.n(n),l=r(13980),o=r.n(l),i=r(71153),s=r.n(i),c=r(94079),u=r(22385),p=r(22983),m=r(87918),d=r.n(m),g=r(99493);const b=(0,r(79692).Z)((e=>({editor:{display:"flex",flex:1,height:"36px",alignItems:"center"},label:{flex:1,marginLeft:"2px",marginTop:"2px",fontSize:"13px",lineHeight:"15px"},actions:{display:"flex",alignItems:"center"},titleContainer:{display:"flex",flex:1,minHeight:"20px"},expandButton:{marginTop:"2px"},deleted:{color:e.palette.text.secondary,textDecoration:"line-through"},editedLabel:{fontStyle:"italic",color:e.palette.text.secondary},errorWrapperHelperText:{marginLeft:0}})));var f=r(26579),h=r(91262),y=r(19592);function x(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const v=e=>{let{label:t,attributeTypesList:r,attributeType:l,attributeValue:o,children:i,errors:m,ownError:x,mode:v,metadata:E,crosswalks:w,lazy:C,showEmptyEditors:O,onAddOneMore:T,onAddAttributes:N,onDeleteAttribute:S,onChangeAttribute:k,additionalControlsRenderer:A,hideDeleteButton:P,state:Z,showNonOv:I}=e;const L=b(),j="deleted"===Z,D="edited"===Z,R=o.uri,V=(0,g.ZiX)(R),[B,M]=(0,n.useState)(V),U=(0,n.useMemo)((()=>(0,g.xv5)({attributeType:l,attributeValue:o,mode:v,metadata:E,isReltioCrosswalk:(0,g.KVV)(w,o)})),[l,o,v,E,w]),z=!j&&!P&&!!S&&U,_=(0,n.useMemo)((()=>(0,g.J6q)(o,m)),[m,o]);(0,n.useEffect)((()=>{_&&M(!0)}),[m,_]),(0,n.useEffect)((()=>{j&&M(!1)}),[j]);const H=(r||[]).some((e=>(0,g.kQw)(e))),W=(0,n.useMemo)((()=>({attributes:H?null:o.value,analyticsAttributes:H?o.value:null})),[o,H]),F=(0,g.e$p)(x)||_&&d().text("Has an incorrect value")||"";return C?a().createElement(c.Button,{variant:"text",color:"primary",onClick:T},"Create attribute"):a().createElement(a().Fragment,null,a().createElement("div",{className:L.editor},a().createElement("div",{className:L.titleContainer},a().createElement(y.Z,{onClick:()=>M((e=>!e)),expanded:B,className:L.expandButton,disabled:j}),a().createElement(f.Z,{errorMessage:F,classes:{helperText:L.errorWrapperHelperText}},a().createElement("div",{className:s()(L.label,{[L.deleted]:j}),"data-reltio-id":"reltio-attribute-complex-label"},t))),a().createElement("div",{className:L.actions},D&&a().createElement(c.Typography,{variant:"caption",className:L.editedLabel},"(",d().text("edited"),")"),A&&A({attributeType:l,attributeValue:o}),z&&a().createElement(u.Z,{icon:p.Z,onClick:()=>S({uri:R,attributeType:l,attributeValue:o}),size:"L"}))),B&&a().createElement(h.Z,{attrTypes:r,entity:W,showEmptyEditors:O||V,drawLines:!0,parentUri:R,mode:v,crosswalks:w,onAddAttributes:N,onChangeAttribute:k,onDeleteAttribute:S,additionalControlsRenderer:A,showNonOv:I},i))};v.propTypes=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){x(e,t,r[t])}))}return e}({label:o().string,children:o().node,attributeTypesList:o().arrayOf(g.EMD),attributeValue:o().oneOfType([g.dMV,g.Rtp])},g.KVe);const E=v},31588:(e,t,r)=>{r.d(t,{Z:()=>b});var n=r(52730),a=r(87638),l=r(24328),o=r.n(l),i=r(13980),s=r.n(i),c=r(91262),u=r(99493);const p=e=>e&&e.attributes,m=e=>{let{entity:t,entityType:r,attributeTypesSelectionStrategy:n=p,mode:a,onAddAttributes:i,onDeleteAttribute:s,onChangeAttribute:u}=e;const m=(0,l.useMemo)((()=>n(r)),[n,r]);return t?o().createElement(c.Z,{key:t.uri,attrTypes:m,entity:t,showEmptyEditors:!0,drawLines:!0,parentUri:t.uri,mode:a,crosswalks:t.crosswalks,onAddAttributes:i,onChangeAttribute:u,onDeleteAttribute:s}):null};m.propTypes={entityUri:s().string,parentUri:s().string,entity:s().object,entityType:s().object,attributeTypesSelectionStrategy:s().func,mode:u.XGc,onAddAttributes:s().func,onDeleteAttribute:s().func,onChangeAttribute:s().func};const d=m,g={onAddAttributes:a.N5.actions.addAttributes,onDeleteAttribute:a.N5.actions.removeAttribute,onChangeAttribute:a.N5.actions.modifyAttribute},b=(0,n.connect)(((e,t)=>({entity:t.entityUri&&a.ZP.selectors.getModifiedEntity(e,t.entityUri)})),g)(d)},81077:(e,t,r)=>{r.d(t,{Z:()=>F});var n=r(24328),a=r.n(n),l=r(13980),o=r.n(l),i=r(87918),s=r.n(i),c=r(17440),u=r(99493),p=r(24737),m=r(31254),d=r(94079),g=r(79692);const b=(0,g.Z)({entityContainer:{display:"flex",alignItems:"center",height:"32px",minHeight:"32px",padding:0},entityLabel:{height:"15px",fontSize:"13px",color:"rgba(0,0,0,0.87)",cursor:"pointer",lineHeight:"15px",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"},emptyEntityLabel:{height:"15px",fontSize:"13px",color:"rgba(0,0,0,0.6)",lineHeight:"15px",marginLeft:"16px",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",cursor:"default"},entityAvatar:{transform:"scale(0.5)",marginLeft:"8px",marginRight:"11px"},entitySecondaryLabel:{color:"rgba(0,0,0,0.6)"}}),f=(0,g.Z)((e=>({singleValue:{color:"rgba(0, 0, 0, 0.87)",fontSize:"14px",paddingTop:"18px",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},linkValue:{cursor:"pointer",color:e.palette.primary.main,textDecoration:"none"}}))),h=(0,g.Z)((e=>({addLabel:{color:e.palette.primary.main,display:"flex",fontWeight:"500",cursor:"pointer",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"},groupHeading:{fontSize:"13px",height:"36px",padding:"0 16px",display:"flex",justifyContent:"space-between",alignItems:"center",backgroundColor:"rgba(0, 0, 0, 0.03)"},addIcon:{height:"18px",width:"18px",padding:"0 9px"}}))),y=(0,g.Z)({clearIcon:{cursor:"pointer",height:"20px",width:"20px"}});function x(){return x=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},x.apply(this,arguments)}const v=e=>{let{innerRef:t,innerProps:r,selectOption:n,data:l}=e;const o=b(),{uri:i,entityType:c,label:u,secondaryLabel:p}=l;return""!==i?a().createElement(d.MenuItem,x({className:o.entityContainer,ref:t,key:i,onClick:()=>n({label:u,uri:i,entityType:c})},r),a().createElement(m.Z,{className:o.entityAvatar,entityType:c}),a().createElement("span",{className:o.entityLabel},u,p&&a().createElement("span",{className:o.entitySecondaryLabel},", ",p))):a().createElement(d.MenuItem,x({className:o.entityContainer,ref:t,key:i},r,{disabled:!0}),a().createElement("span",{className:o.emptyEntityLabel},s().text("No results found")))};v.propTypes={innerRef:o().oneOfType([o().oneOf([null]),o().func,o().shape({current:o().any.isRequired})]),innerProps:o().object.isRequired,selectOption:o().func.isRequired,data:o().shape({uri:o().string.isRequired,label:o().string.isRequired,entityType:u.pyR.isRequired})};const E=v;var w=r(71153),C=r.n(w),O=r(52730),T=r(87638),N=r(39450);const S=e=>{const{selectProps:{currentEntityType:t,menuIsOpen:r,disableLinkClick:l},children:o,data:i}=e,p=f(),m=(0,O.useDispatch)(),g=(0,n.useContext)(N.m),b=(0,O.useSelector)(T.ZP.selectors.getUIPath),h=(0,u.ZiX)(i.entityUri)?{className:p.singleValue,component:"span"}:{className:C()(p.singleValue,p.linkValue),onMouseDown:e=>{e.stopPropagation(),l||(0,c.pipe)((0,c.always)({uri:i.entityUri,viewId:g}),T.ui.actions.openEntity,m)()},onClick:e=>e.preventDefault(),href:(0,u.ChB)({uiPath:b,uri:i.entityUri}),component:"a"};return!r&&a().createElement(d.Typography,h,(0,u.ZiX)(i.entityUri)?s().text(`New ${t.label} will be created`):(0,u.idV)(o))};S.propTypes={children:o().string,data:o().object.isRequired,selectProps:o().object.isRequired};const k=S;var A=r(33375);const P=e=>{const{selectProps:{onClear:t}}=e,r=y();return a().createElement(d.IconButton,{onClick:t},a().createElement(A.Z,{className:r.clearIcon}))};P.propTypes={selectProps:o().object.isRequired};const Z=P;var I=r(31588),L=r(31276),j=r(92391),D=r(65549);const{Group:R}=j.F,V=e=>{const{selectProps:{inputValue:t,onCreate:r},data:n,children:l}=e,o=h();return a().createElement(R,e,a().createElement("div",{className:o.groupHeading},a().createElement("span",null,n.label),r&&a().createElement("span",{onClick:()=>r(t,n.entityType),className:o.addLabel},a().createElement(D.Z,{className:o.addIcon}),s().text(`Create ${t?`"${t}" as `:""}new ${n.label}`))),l)};V.propTypes={selectProps:o().object.isRequired,data:o().object,children:o().array};const B=V,M=(0,g.Z)({creatorWrapper:{marginTop:"20px"}});function U(){return U=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},U.apply(this,arguments)}function z(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function _(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){H(e,t,r[t])}))}return e}function H(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const W=e=>{let{entity:t={},entityTypesUris:r=[],mode:l,max:o,onChange:i,onCreate:m,metadata:d,globalSearchRequestOptions:g,attributeTypesSelectionStrategy:b,disableLinkClick:f=!1}=e,h=z(e,["entity","entityTypesUris","mode","max","onChange","onCreate","metadata","globalSearchRequestOptions","attributeTypesSelectionStrategy","disableLinkClick"]);const y=M(),[x,v]=(0,n.useState)(""),w=(0,n.useMemo)((()=>r.map((e=>(0,u.nt9)(d,e)))),[r,d]),C=[{filter:"equals",fieldName:"type",values:r.map(u.nIW)}],O=_({},g,{max:o}),T=m?(e,t)=>{m(t||r[0],e),v("")}:void 0,N=e=>{null!==e&&(v(""),i(e))},S=(0,n.useMemo)((()=>1!==w.length),[w]),A=((0,c.isEmpty)(t)?w[0]:(0,u.nt9)(d,t.entityType))||{},P=m&&s().text(`Create ${x?`"${x}" as `:""}new ${A.label}`),j=s().text(`Select ${1===w.length?`${w[0].label} `:""}profile`),D=!(0,c.isEmpty)(t)&&(0,u.ZiX)(t.entityUri),R=S?{Group:B,GroupHeading:L.Vd}:{},V=D?{ClearIndicator:Z}:{},{TextFieldProps:H}=h,W=z(h,["TextFieldProps"]),F=(0,n.useMemo)((()=>_({},H||{},{"data-reltio-id":"reltio-entity-selector"})),[H]);return a().createElement(a().Fragment,null,a().createElement(p.Z,U({value:(0,c.isEmpty)(t)?void 0:t,inputValue:x,onInputChange:e=>{v(e)},getOptions:e=>(0,u.ZOr)(C,O,e).then(((e,t)=>r=>{const n=r.map((t=>_({},t,{label:(0,u.idV)(t.label),entityType:e.find((e=>{let{uri:r}=e;return r===t.type}))}))),a=e=>(0,c.isEmpty)(e)?[{label:"",uri:"",entityType:{}}]:e,l=t?e:e.filter((e=>n.some((t=>t.type===e.uri))));return l.length>1?l.map((e=>({label:e.label,entityType:e.uri,options:a(n.filter((t=>t.type===e.uri)))}))):a(n)})(w,m)),getOptionLabel:(0,c.prop)("entityLabel"),onChange:N,onCreate:T,onClear:()=>{N({})},label:j,createLabel:P,components:_({Option:E,SingleValue:k},R,V),currentEntityType:A,isClearable:!0,disableLinkClick:f,TextFieldProps:F},W)),D&&a().createElement("div",{className:y.creatorWrapper},a().createElement(I.Z,{mode:l,attributeTypesSelectionStrategy:b,entityType:A,entityUri:t.entityUri})))};W.propTypes={entity:u.oZZ,entityTypesUris:o().arrayOf(o().string),max:o().number,mode:u.XGc,dispatch:o().func,metadata:u.pGS,onChange:o().func.isRequired,onCreate:o().func,attributeTypesSelectionStrategy:o().func,globalSearchRequestOptions:o().object,disableLinkClick:o().bool};const F=W},24338:(e,t,r)=>{r.d(t,{Z:()=>_});var n=r(24328),a=r.n(n),l=r(52730),o=r(94438),i=r(87638),s=r(99493),c=r(27952),u=r(97193),p=r(22385),m=r(87918),d=r.n(m),g=r(13896),b=r(58651),f=r(94079),h=r(99136),y=r(79692);const x=(0,y.Z)((e=>({root:{width:"328px"},paper:{width:"100%",height:"40px",display:"flex",alignItems:"center",boxShadow:"none",backgroundColor:"rgba(0,0,0,0.03)"},inputRoot:{flex:1},input:{padding:"0 12px",fontSize:"14px","&:placeholder":{color:e.palette.text.secondary}},errorMessage:{marginTop:"8px",fontSize:"12px",color:e.palette.error.main}}))),v=e=>0===e.trim().length,E=e=>{let{onSend:t}=e;const r=x(),[l,o]=(0,n.useState)(""),[i,s]=(0,n.useState)(null);return a().createElement(f.Box,{className:r.root},a().createElement(f.Paper,{className:r.paper},a().createElement(f.InputBase,{value:l,onChange:e=>{const t=e.target.value,r=new RegExp(/^(ftp|http|https):\/\/[^ "]+$/).test(t);o(t),r||v(t)?s(null):s(d().text("URL is not correct"))},classes:{root:r.inputRoot,input:r.input},placeholder:d().text("Paste an image URL here")}),a().createElement(f.Button,{disabled:Boolean(i)||v(l),variant:"outlined",color:"primary",onClick:()=>{t(l),o(""),s(null)}},d().text("Send"))),i&&a().createElement(f.Typography,{className:r.errorMessage},i))};var w=r(71153),C=r.n(w),O=r(83997);const T=["image/png","image/jpeg","image/tiff","image/gif","image/bmp"],N=e=>{let{className:t,onAppendFile:r}=e;return a().createElement(a().Fragment,null,a().createElement("input",{onInput:e=>{r&&r(e.currentTarget.files[0])},style:{display:"none"},accept:T.join(","),id:"upload-image-button",type:"file"}),a().createElement("label",{htmlFor:"upload-image-button"},a().createElement(f.Button,{className:t,variant:"contained",color:"primary",component:"span"},d().text("Select image"))))};function S(){return S=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},S.apply(this,arguments)}const k=e=>a().createElement("svg",S({width:256,height:256,viewBox:"0 0 256 256",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},e),a().createElement("defs",null,a().createElement("linearGradient",{x1:"50%",y1:"0%",x2:"50%",y2:"100%",id:"UploadIcon_svg__c"},a().createElement("stop",{stopColor:"#FFF",offset:"0%"}),a().createElement("stop",{stopColor:"#FFF",stopOpacity:0,offset:"100%"})),a().createElement("linearGradient",{x1:"50%",y1:"0%",x2:"50%",y2:"100%",id:"UploadIcon_svg__d"},a().createElement("stop",{stopColor:"#FFF",offset:"0%"}),a().createElement("stop",{stopColor:"#FFF",stopOpacity:0,offset:"100%"})),a().createElement("linearGradient",{x1:"67.572%",y1:"54.952%",x2:"15.212%",y2:"13.907%",id:"UploadIcon_svg__e"},a().createElement("stop",{stopColor:"#000",stopOpacity:0,offset:"0%"}),a().createElement("stop",{stopColor:"#000",offset:"100%"})),a().createElement("linearGradient",{x1:"50%",y1:"0%",x2:"50%",y2:"100%",id:"UploadIcon_svg__f"},a().createElement("stop",{stopColor:"#B8EDFF",offset:"0%"}),a().createElement("stop",{stopColor:"#53ACDE",offset:"100%"})),a().createElement("circle",{id:"UploadIcon_svg__a",cx:128,cy:128,r:128})),a().createElement("g",{stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a().createElement("mask",{id:"UploadIcon_svg__b",fill:"#fff"},a().createElement("use",{xlinkHref:"#UploadIcon_svg__a"})),a().createElement("use",{fillOpacity:.1,fill:"#0072CE",xlinkHref:"#UploadIcon_svg__a"}),a().createElement("g",{mask:"url(#UploadIcon_svg__b)"},a().createElement("g",{strokeWidth:1,fill:"none",transform:"translate(-1 9)"},a().createElement("path",{d:"M0 107.268c0 35.579 28.703 64.409 64.173 64.409h139.021c29.578 0 53.497-24.035 53.497-53.635 0-28.356-21.935-51.562-49.705-53.515C199.577 27.705 167.2 0 128.346 0 97.425 0 70.59 17.582 57.171 43.274 25.027 46.767 0 74.117 0 107.268z",fill:"#FFF",opacity:.3}),a().createElement("ellipse",{fill:"url(#UploadIcon_svg__c)",opacity:.4,cx:64.553,cy:107.664,rx:61.43,ry:62.336}),a().createElement("path",{d:"M127.979 8.91c38.773 0 70.206 31.895 70.206 71.24 0 39.346-31.433 71.241-70.206 71.241-6.067 0-11.954-.78-17.57-2.249 9.688-11.019 15.574-25.551 15.574-41.478 0-33.7-26.352-61.153-59.286-62.299C78.714 23.611 101.654 8.91 127.98 8.91z",fill:"url(#UploadIcon_svg__d)",opacity:.4})),a().createElement("path",{fill:"url(#UploadIcon_svg__e)",opacity:.12,d:"M82.093 128.474l38.374 37.966-10.666 18.958 72.714 71.94 63.578-57.537v-6.11l-71.107-70.352H97.22z",transform:"translate(-1 9)"}),a().createElement("path",{fill:"url(#UploadIcon_svg__f)",d:"M151.004 128.29v57.591h-40.836V128.29H81l49.5-49.409L180 128.29z",transform:"translate(-1 9)"})))),A=(0,y.Z)((e=>({root:{padding:"36px 0 29px"},isActive:{backgroundColor:"rgba(0,114,206,0.12)"},icon:{width:"190px",height:"190px",marginBottom:"24px"},title:{marginBottom:"8px",color:e.palette.text.primary,fontSize:"20px",fontWeight:500,lineHeight:"24px"},description:{marginBottom:"24px",color:e.palette.text.secondary,fontSize:"14px",lineHeight:"16px"}}))),P=e=>{let{onAppendFile:t,className:r}=e;const n=A(),[{canDrop:l,isOver:o},i]=(0,g.useDrop)({accept:[O.FILE],drop:e=>{e&&t(e.files[0])},collect:e=>({isOver:e.isOver(),canDrop:e.canDrop()})}),s=l&&o;return a().createElement("div",{ref:i,className:C()(n.root,{[n.isActive]:s},r)},a().createElement(k,{className:n.icon}),a().createElement(f.Typography,{className:n.title},d().text("Drag an image here")),a().createElement(f.Typography,{className:n.description},d().text("Acceptable image types would include JPG, PNG, TIFF, GIF, BMP. Maximum image size: ${MAX_IMAGE_SIZE}Mb",{MAX_IMAGE_SIZE:20})),a().createElement(N,{onAppendFile:t}))},Z=(0,y.Z)((e=>({root:{width:"100%",display:"flex",alignItems:"center",padding:"0 30px",boxSizing:"border-box"},border:{borderBottom:`1px solid ${e.palette.text.primary}`,flex:1,opacity:.12},text:{padding:"0 10px",color:e.palette.text.secondary,fontSize:"14px",lineHeight:"16px"}}))),I=e=>{let{children:t,className:r}=e;const n=Z();return a().createElement(f.Box,{className:C()(n.root,r)},a().createElement(f.Box,{className:n.border}),a().createElement(f.Typography,{className:n.text},t),a().createElement(f.Box,{className:n.border}))};var L=r(87685),j=r(8818);const D=(0,y.Z)({closeIcon:{color:"#fff"}}),R=e=>{let{error:t,onClose:r}=e;const n=D();return a().createElement(f.Snackbar,{open:Boolean(t),onClose:r,message:t,action:a().createElement(j.k,{className:n.closeIcon,tooltipTitle:d().text("Close"),icon:L.default,onClick:r})})},V=(0,y.Z)((e=>({root:{},dialogPaper:{position:"relative",maxWidth:"480px"},title:{color:e.palette.text.primary,fontSize:"20px",fontWeight:500,letterSpacing:"0.25px",lineHeight:"24px",padding:"16px"},body:{display:"flex",flexDirection:"column",alignItems:"center",padding:"0 8px 49px",textAlign:"center"},targetBox:{marginBottom:"8px"},divider:{marginBottom:"28px"}}))),B=e=>{let{open:t,onClose:r,onUpload:o}=e;const c=V(),u=(0,l.useSelector)(i.ZP.selectors.getImageServicePath),p=(0,l.useSelector)(i.ZP.selectors.getEnvironment),m=(0,l.useSelector)(i.ZP.selectors.getTenant),[y,x]=(0,n.useState)(!1),[v,w]=(0,n.useState)(null),C=e=>{x(!0),(0,s.Ixr)({image:e,imageServicePath:u,environment:p,tenant:m}).then((e=>{o(e),r()})).catch((e=>w(e.errorMessage))).finally((()=>x(!1)))};return a().createElement(g.DndProvider,{backend:b.default},a().createElement(f.Dialog,{open:t,onClose:r,classes:{paper:c.dialogPaper}},a().createElement(f.Typography,{className:c.title},d().text("Add new image")),a().createElement(f.Box,{className:c.body},a().createElement(P,{className:c.targetBox,onAppendFile:e=>{const t=Number((e.size/1024/1024).toFixed(2)),r=T.includes(e.type);t>20?w(d().text("File size exceeds configured max file size.")):r?C(e):w(d().text("File format is not supported."))}}),a().createElement(I,{className:c.divider},d().text("or")),a().createElement(E,{onSend:e=>{C(e)}})),y&&a().createElement(h.Z,null),a().createElement(R,{error:v,onClose:()=>w(null)})))};var M=r(40932),U=r(95117);const z=(0,y.Z)((()=>({root:{width:"100%",marginBottom:"10px"},image:e=>{let{imageMargin:t}=e;return{marginRight:t,cursor:"pointer","&:last-child":{marginRight:0}}},uploadContainer:e=>{let{imageMargin:t,imageWidth:r,imageHeight:n}=e;return{backgroundColor:"white",width:r,height:n,cursor:"pointer",border:"1px dashed #0072CE",boxSizing:"border-box",marginRight:t,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0}},uploadButton:{width:"50px",height:"50px"},uploadIcon:{fontSize:"36px"}}))),_=e=>{let{attributeType:t={},attributeValues:r=[],onDeleteAttribute:m,onChangeAttribute:d,requestNextPageOfAttributeValues:g,parentUri:b,paging:f,showNonOv:h,imageSize:y=U.By}=e;const x=z(y),v=(0,l.useSelector)(i.ZP.selectors.getEntity)||{},E=(0,l.useSelector)((e=>i.ZP.selectors.getModifiedEntityDefaultProfilePic(e,v.uri))),w=(0,l.useDispatch)(),[C,O]=(0,n.useState)(!1),T=(0,n.useCallback)((()=>{O((e=>!e))}),[]),N=(0,n.useCallback)((e=>{const r=(0,s.hm5)(b,t.name),n={};for(const a in e){const l=(t.attributes||[]).find((e=>{let{name:t}=e;return t===a}));l&&(n[a]=[{uri:(0,s.hm5)(r,l.name),ov:!0,value:e[a],type:l.uri}])}d({attributeType:t,uri:r,value:n})}),[d,b,t]),S=(0,n.useCallback)((e=>{if(m(e),E===e.uri){var t;const n=(null===(t=r[0])||void 0===t?void 0:t.uri)===e.uri?r[1]:r[0];w(i.N5.modifiedEntities.actions.setDefaultProfilePic({entityUri:v.uri,value:n||{}}))}}),[m,v,E,r]),k=(e,r)=>{const{onOpenImageGalleryDialog:n,onDownload:l,onShareLink:o,onSetAsDefault:i}=e,c=(0,s.Q5d)(r),{uri:p}=r;return a().createElement(u.Z,{id:p,onShareLink:()=>o(c),onSetAsDefault:()=>i(r),onDelete:()=>S({uri:p,attributeType:t}),onDownload:()=>l([c]),onClick:()=>n(p)})};return a().createElement("div",{className:x.root},a().createElement(M.Z,{attributeValues:r,attributeType:t,renderImage:e=>function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const r=(0,s.efz)(t),{uri:n}=t,{onOpenImageGalleryDialog:l}=e;return a().createElement("div",{className:x.image,key:n},a().createElement(c.Z,{src:r,overlay:k(e,t),onClick:()=>l(n),size:{imageWidth:y.imageWidth,imageHeight:y.imageHeight},"data-reltio-id":"reltio-attribute-value"}))},overlay:!0,countFixedItems:1,onUpload:T,onDeleteAttribute:S,imageSize:y,requestNextPageOfAttributeValues:g,paging:f,parentUri:b,showNonOv:h},a().createElement("div",{className:x.uploadContainer,onClick:T},a().createElement(p.Z,{className:x.uploadButton,iconClassName:x.uploadIcon,icon:o.Z}))),a().createElement(B,{open:C,onUpload:N,onClose:T}))}},63459:(e,t,r)=>{r.d(t,{Z:()=>E});var n=r(24328),a=r.n(n),l=r(71153),o=r.n(l),i=r(13980),s=r.n(i),c=r(17440),u=r(94079);const p=(0,r(79692).Z)({moreAttributes:{display:"flex",paddingBottom:"6px","&$dense":{padding:0}},dense:{},popupContainer:{},moreAttributesPopup:{"&$popupContainer":{}},moreButton:{padding:"9px 16px 9px 12px",backgroundColor:"rgba(98, 2, 238, 0)"},buttonLabel:{fontSize:"14px",fontWeight:500,lineHeight:"16px"},icon:{fontSize:"18px",marginRight:"8px"}});var m=r(97820),d=r(7785),g=r(56656),b=r(44890),f=r(54763),h=r(65549),y=r(27239);const x=(0,c.curry)(((e,t)=>(0,c.filter)((t=>t.label.toLowerCase().includes(e.toLowerCase())))(t))),v=e=>{let{label:t,popupTitle:r=t,data:l,dense:i,onApply:s}=e;const v=p(),E=(0,n.useRef)(),[w,C]=(0,n.useState)(!1),[O,T]=(0,n.useState)(""),[N,S]=(0,n.useState)([]),k=(0,n.useCallback)(((e,t)=>{S((0,c.ifElse)((0,c.always)(t),(0,c.append)(e),(0,c.reject)((0,c.propEq)("id",e.id)))(N))}),[N]),A=(0,n.useMemo)((()=>(0,c.pipe)(x(O),(0,c.map)((e=>({item:{id:e.uri,label:e.label,attrType:e}}))))(l)),[l,O]),P=(0,n.useMemo)((()=>(0,g.LG)(A)),[A]),Z=(0,n.useCallback)((()=>28),[]),I=(0,n.useCallback)((e=>{let{item:t}=e;k(t,(0,c.not)((0,c.any)((0,c.propEq)("id",t.id))(N)))}),[k,N]),{focusIndex:L,handleKeyDown:j}=(0,f.t)({items:P,open:w,onSelectFocusedItem:I,selectedItems:N}),D=(0,n.useRef)(null);D.current=L;const R=Math.min(255,28*P.length),V=Math.max(140,R+112),B=(0,n.useCallback)(((e,t,r)=>{let{item:n,level:l=0}=t;const o=(0,c.any)((0,c.propEq)("id",n.id))(N),i=D.current===r;return a().createElement(d.Z,{key:n.uri,onClick:k,checked:o,level:l,data:n,label:a().createElement(y.Z,{text:n.label,highlight:O}),labelInText:n.label,style:e,isFocused:i,isRequired:!!n.attrType.required,LogoIcon:n.LogoIcon})}),[O,k,N]);return a().createElement("div",{className:o()(v.moreAttributes,{[v.dense]:i})},a().createElement(u.Button,{color:"primary",onClick:()=>C(!w),ref:E,className:v.moreButton},a().createElement(h.Z,{classes:{root:v.icon}}),a().createElement("div",{className:v.buttonLabel},t)),a().createElement(m.Z,{open:w,className:o()(v.moreAttributesPopup,v.popupContainer),anchorEl:E.current,onClose:(0,c.pipe)((()=>{N.length>0&&s((0,c.pluck)("attrType",N))}),(()=>C(!1)),(()=>T("")),(()=>S([]))),onSearch:T,containerHeight:V,title:r,containerWidth:320,searchInputOnKeyDown:j},a().createElement(b.Z,{getItemSize:Z,renderItem:B,items:P,height:R,containerWidth:320,focusIndex:L})))};v.propTypes={label:s().string,popupTitle:s().string,data:s().array,dense:s().bool,onApply:s().func};const E=v},62630:(e,t,r)=>{r.d(t,{Z:()=>c});var n=r(24328),a=r.n(n),l=r(99493),o=r(77325);function i(){return i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},i.apply(this,arguments)}const s=e=>{const{attributeValue:t,attributeType:r}=e,n=(0,l.Kxm)(t,r.dataLabelPattern);return a().createElement(o.Z,i({label:(0,l.idV)(n),attributeTypesList:r.attributes||r.analyticsAttributes},e))};s.propTypes=l.j2V;const c=(0,n.memo)(s)},2163:(e,t,r)=>{r.d(t,{Z:()=>C});var n=r(52730),a=r(87638),l=r(24328),o=r.n(l),i=r(13980),s=r.n(i),c=r(71153),u=r.n(c),p=r(17440),m=r(99493),d=r(77325),g=r(81077),b=r(26579);const f=(0,r(79692).Z)({item:{marginBottom:"20px"},dense:{marginBottom:0}});function h(){return h=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},h.apply(this,arguments)}function y(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){x(e,t,r[t])}))}return e}function x(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const v=e=>{const t=f(),{modifiedEntity:r,metadata:n,globalSearchRequestOptions:a,onDeleteModifiedEntity:i,onUpdateModifiedEntity:s,onDeactivateError:c}=e,x=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["modifiedEntity","metadata","globalSearchRequestOptions","onDeleteModifiedEntity","onUpdateModifiedEntity","onDeactivateError"]),{attributeValue:v,attributeType:E,mode:w,crosswalks:C,errors:O,onChangeAttribute:T}=x,N=(0,l.useRef)(v),S=(0,m.CZ8)(v),k=(0,m.o96)(v),A=(0,m.Poc)(E),P=(0,m.nt9)(n,A),Z=r?(0,m.Kxm)(r,P.dataLabelPattern):v.label,I=(0,l.useMemo)((()=>[A]),[A]),L=(0,l.useMemo)((()=>(0,m.EtK)(C,k)),[C,k]),j=(0,l.useMemo)((()=>(0,m.mbo)(v,O)),[v,O]),D=(0,l.useMemo)((()=>S&&{entityUri:(0,m.ZTM)(S),entityType:(0,m.uGi)(S),entityLabel:v.label}),[S,v.label]),R=(0,l.useMemo)((()=>(0,m.tF$)(E).map((e=>(0,m.zeJ)(n,e))).filter(p.identity)),[E,n]),V=(0,l.useCallback)((e=>(0,m.ct9)(E,e)),[E]),B=(0,l.useCallback)((e=>{r&&i(r.uri);const t=N.current,n=!(0,p.isEmpty)(e)&&e.uri===(0,m.bwT)(t),a=y({},v,{label:e.label,refEntity:n?t.refEntity:(0,m.fmQ)(e),refRelation:n?t.refRelation:(0,m.NBq)(v)});T({value:a,attributeType:E,uri:v.uri}),j&&c((0,m.iFp)(j))}),[v,E,r,T,i,c,j]),M=(0,l.useCallback)(((e,t)=>{const r=(0,p.pipe)(V,(0,m._kX)(w))(P),a=(0,m.pBq)({entityTypeUri:e,initValue:t,attributeTypes:r,metadata:n,mode:w});B(a),s(a)}),[V,w,P,n,B,s]),U=(0,l.useMemo)((()=>(0,m.yv0)({attributeType:E,attributeValue:v,mode:w,isReltioCrosswalk:(0,m.KVV)(C,v)})),[E,v,w,C]),z=(0,l.useMemo)((()=>(0,m.d89)(w,P)),[w,P]),_=(0,m.e$p)(j);return o().createElement(d.Z,h({},x,{label:(0,m.idV)(Z),attributeTypesList:R,crosswalks:L,metadata:n}),o().createElement(b.Z,{errorMessage:_},o().createElement(g.Z,{className:u()(t.item,{[t.dense]:_||D&&(0,m.ZiX)(D.entityUri)}),entity:D||{},entityTypesUris:I,max:20,globalSearchRequestOptions:a,mode:w,onChange:U?B:void 0,onCreate:z?M:void 0,metadata:n,attributeTypesSelectionStrategy:V})))};v.propTypes=y({},m.NkU,{modifiedEntity:m.pyR,metadata:m.pGS,globalSearchRequestOptions:s().object,onDeleteModifiedEntity:s().func,onUpdateModifiedEntity:s().func,onDeactivateError:s().func});const E=(0,l.memo)(v),w={onDeleteModifiedEntity:a.N5.modifiedEntities.actions.entityDeleted,onUpdateModifiedEntity:a.N5.modifiedEntities.actions.entityCreated,onDeactivateError:a.N5.errors.actions.errorDeactivated},C=(0,n.connect)(((e,t)=>{const r=(0,m.bwT)(t.attributeValue);return{modifiedEntity:(0,m.ZiX)(r)?a.ZP.selectors.getModifiedEntity(e,r):null,metadata:a.ZP.selectors.getMetadata(e),globalSearchRequestOptions:a.ZP.selectors.getGlobalSearchRequestOptions(e,["ovOnly"])}}),w)(E)},39462:(e,t,r)=>{r.d(t,{Z:()=>P});var n=r(24328),a=r.n(n),l=r(13980),o=r.n(l),i=r(52730),s=r(71153),c=r.n(s),u=r(17440),p=r(65549),m=r(22983),d=r(94079),g=r(87918),b=r.n(g),f=r(99493),h=r(72768),y=r(25310),x=r(26579),v=r(22385),E=r(40879),w=r(49965),C=r(87638);function O(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){T(e,t,r[t])}))}return e}function T(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const N={};const S=(0,r(79692).Z)((e=>({wrapper:{width:"100%"},errorWrapper:{alignSelf:"stretch"},editor:{display:"flex",flex:1,alignItems:"flex-start",marginBottom:"10px"},"editor-value":{flex:"1 1 auto"},"editor-read-only-value":{marginLeft:"12px",display:"flex",alignItems:"center"},"editor-actions":{display:"flex",alignItems:"center",paddingLeft:"8px"},addButton:{marginRight:"-8px"},button:{color:e.palette.text.secondary},placeholder:{height:"50px"},deleted:{color:e.palette.text.secondary,textDecoration:"line-through"},editedLabel:{fontStyle:"italic",color:e.palette.text.secondary}})));function k(){return k=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},k.apply(this,arguments)}const A=e=>{let{className:t,attributeValue:r,attributeType:n,isReltioCrosswalk:l,ownError:o,mode:s,onAddOneMore:g,onDeleteAttribute:w,onChangeAttribute:T,onDeactivateError:A,additionalControlsRenderer:P,state:Z}=e,I=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["className","attributeValue","attributeType","isReltioCrosswalk","ownError","mode","onAddOneMore","onDeleteAttribute","onChangeAttribute","onDeactivateError","additionalControlsRenderer","state"]);const L=S(),j="deleted"===Z,D="edited"===Z,R=(0,f.KIu)(s),V=(0,f.PFL)(n),B=(0,E.AG)(r,V),M=(0,f.Vg3)({attributeType:n,mode:s}),U=(0,f.yv0)({attributeType:n,attributeValue:r,mode:s,isReltioCrosswalk:l}),z=(0,f.xv5)({attributeType:n,attributeValue:r,mode:s,isReltioCrosswalk:l}),_=U&&R,H=(0,f.e$p)(o),W=(0,i.useSelector)((e=>(0,f.QEi)(n)?((e,t,r)=>{const n=C.ZP.selectors.getDependentLookupsStructureNode(e,r);if(n){const o=t.uri,{parents:i,missedParentsAttributeTypes:s}=((e,t,r)=>{var n;const a=r.parents.flatMap((t=>{const r=C.ZP.selectors.getDependentLookupsStructureNode(e,t);return r.values.map((e=>O({},e,{type:t,dependentLookupCode:r.attrType.dependentLookupCode})))})),l=C.ZP.selectors.getModifiedEntities(e),o=C.ZP.selectors.getEntityUri(e),i=C.ZP.selectors.getAllRelationsToAddAndEdit(e),s=C.ZP.selectors.getMetadata(e),c=(0,f.vUy)({parentValues:a,valueUri:t,entityUri:o,modifiedEntities:l,connections:i}),p=(0,u.pipe)(f.uDV,(0,u.defaultTo)([]),(0,u.map)((0,u.pipe)((0,u.path)(["valueType","uri"]),f.u5q)),(0,u.prepend)(null===(n=l[o])||void 0===n?void 0:n.type),(0,u.reject)(u.isNil),u.uniq)({entityUri:o,entitiesMap:l,connections:i,metadata:s},t),m=r.parents.filter((e=>p.some((0,f.sOy)(e)))).map((t=>C.ZP.selectors.getDependentLookupsStructureNode(e,t).attrType)).filter((e=>!c.some((t=>{let{type:r,value:n}=t;return n&&r===e.uri}))));return{parents:Object.values(c.reduce(((e,t)=>{var r;return O({},e,{[t.dependentLookupCode]:{type:t.dependentLookupCode,codeValues:(0,u.uniq)([t.value,...(null===(r=e[t.dependentLookupCode])||void 0===r?void 0:r.codeValues)||[]]).filter(Boolean).sort()}})}),{})),missedParentsAttributeTypes:m}})(e,o,n),{isBlocked:c=!1}=C.ZP.selectors.getDependentLookupEditorState(e,o)||{},p=(a=s).length?b().text("Please select value for ${labels} ${attributes}.",{labels:(l=a.map((0,u.pipe)((0,u.prop)("label"),(e=>`'${e}'`))),l.reduce(((e,t,r)=>[e,t].join(r===l.length-1?` ${b().text("and")} `:", ")))),attributes:1===a.length?b().text("attribute"):b().text("attributes")}):"",m=C.ZP.selectors.getLookupAutocomplete(e),d=(0,f.Vmh)(m,r),g=!(null!=t&&t.lookupCode||null!=t&&t.value)&&c&&b().text("Populating values...")||p||"",h={parents:i,disabled:!!p||c,placeholder:g,autopopulationId:d?o:null};return g&&(h.value=null),((e,t)=>{const r=N[e];return(0,u.equals)(t,r)?r:((0,u.equals)(null==r?void 0:r.parents,t.parents)&&(t.parents=r.parents),N[e]=t,t)})(o,h)}var a,l})(e,r,null==n?void 0:n.uri):null)),F=()=>{o&&A((0,f.iFp)(o))},q=!!g&&M&&!n.singleValue,Y=!j&&!!w&&z,$=!!H,G=j?{disabled:!0}:{};return a().createElement("div",{className:c()(L.editor,t)},a().createElement(x.Z,{errorMessage:H,className:L.errorWrapper},a().createElement("div",{className:c()(L["editor-value"],{[L.deleted]:j},{[L["editor-read-only-value"]]:!_}),"data-reltio-id":"reltio-attribute-value"},_?a().createElement(y.Z,k({fieldName:(0,f.Tde)(n.uri),value:B,dataTypeDefinition:V,error:$,onChange:(0,u.pipe)((0,E.pp)(r,n),T,F),fullWidth:!0},W,I,G)):a().createElement(h.Z,{value:(0,f.kDl)(r),dataTypeDefinition:V}))),a().createElement("div",{className:L["editor-actions"]},D&&a().createElement(d.Typography,{variant:"caption",className:L.editedLabel},"(",b().text("edited"),")"),q&&a().createElement(v.Z,{icon:p.Z,onClick:g,size:"L",className:c()(L.addButton,L.button)}),P&&P({attributeType:n,attributeValue:r}),Y&&a().createElement(v.Z,{className:L.button,icon:m.Z,onClick:()=>{w({uri:r.uri,attributeType:n}),(0,f.PcX)(o)!==f.NIO.missed&&F()},size:"L"})))};A.propTypes={className:o().string,attributeValue:f.cNQ,attributeType:f.EMD,ownError:f.wfT,isReltioCrosswalk:o().bool,state:o().oneOf(["deleted","edited"]),mode:f.XGc,onAddOneMore:o().func,onDeleteAttribute:o().func,onChangeAttribute:o().func,onDeactivateError:o().func,additionalControlsRenderer:o().func};const P=(0,n.memo)((0,w.Z)(A,(()=>{const e=S();return a().createElement("div",{className:e.placeholder})})))},40879:(e,t,r)=>{r.d(t,{AG:()=>i,Ho:()=>s,pp:()=>c});var n=r(95038),a=r.n(n),l=r(99493),o=r(17440);const i=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{type:t}=arguments.length>1?arguments[1]:void 0;const{value:r,lookupCode:n}=e;switch(t){case l.oS0.TYPE_BOOLEAN:case l.oS0.TYPE_BOOLEAN_RADIO:case l.oS0.TYPE_RDM_LOOKUPS_NOT_RESOLVED:return(0,l.gxP)(r);case l.oS0.TYPE_DATE:return r&&l.P6Y.dates.toLocalDate(r)||null;case l.oS0.TYPE_LOCAL_DATE:case l.oS0.TYPE_TIMESTAMP:case l.oS0.TYPE_ACTIVENESS_DATE:return r&&new Date(r)||null;case l.oS0.TYPE_DEPENDENT_LOOKUP:case l.oS0.TYPE_LOOKUP:return{value:r,lookupCode:n};default:return r}},s=(e,t)=>{const{type:r}=(0,l.PFL)(e);switch(r){case l.oS0.TYPE_BOOLEAN:case l.oS0.TYPE_BOOLEAN_RADIO:case l.oS0.TYPE_RDM_LOOKUPS_NOT_RESOLVED:return t.toString();case l.oS0.TYPE_DATE:return t&&a()(t).format("YYYY-MM-DD")||"";case l.oS0.TYPE_TIMESTAMP:return t&&a()(t).format()||"";case l.oS0.TYPE_ACTIVENESS_DATE:case l.oS0.TYPE_LOCAL_DATE:return t&&t.valueOf();default:return t||""}},c=(0,o.curry)(((e,t,r)=>({value:s(t,r),uri:e.uri,attributeType:t})))},66784:(e,t,r)=>{r.d(t,{c:()=>a});var n=r(24328);const a=r.n(n)().createContext(null)},8261:(e,t,r)=>{r.d(t,{U:()=>l,A:()=>o});var n=r(17440),a=r(99493);const l=(e,t,r,l)=>{const o=(0,n.pipe)(a.nt9,(0,n.defaultTo)({}),(0,n.props)(["attributes","analyticsAttributes"]),(0,n.reject)(n.isNil),n.flatten,(0,n.concat)(n.__,(0,n.pipe)(n.values,(0,n.reject)((0,n.propEq)("uri",a.xPW.id.uri)))(a.xPW)))(e,t);return r.length?o.filter((e=>{let{uri:t}=e;return r.includes(t)})):o.filter((e=>{let{uri:t}=e;return!l.includes(t)}))},o=(e,t)=>(0,n.partition)((0,n.pipe)((0,n.path)(["attrType","uri"]),(0,n.includes)(n.__,e)),t)},12437:(e,t,r)=>{r.d(t,{Z:()=>u});var n=r(96971),a=r(94079),l=r(24328),o=r.n(l),i=r(87918),s=r.n(i),c=r(9125);const u=e=>{let{onClick:t}=e;const r=(0,c.y)();return o().createElement(a.Link,{component:"button",variant:"caption",className:r.link,onClick:t,underline:"none"},o().createElement(n.Z,{className:r["svg-icon__root"]}),s().text("Show less"))}},48554:(e,t,r)=>{r.d(t,{Z:()=>u});var n=r(4426),a=r(94079),l=r(24328),o=r.n(l),i=r(87918),s=r.n(i),c=r(9125);const u=e=>{let{moreNumber:t,valueNumber:r,onClick:l}=e;const i=(0,c.y)();return o().createElement(a.Link,{component:"button",variant:"caption",className:i.link,onClick:l,underline:"none"},o().createElement(n.Z,{className:i["svg-icon__root"]}),t&&r?s().text("Show ${moreNumber} more of remaining ${valueNumber} value",{moreNumber:t,valueNumber:r}):s().text("Show more"))}},9125:(e,t,r)=>{r.d(t,{y:()=>n});const n=(0,r(79692).Z)({link:{display:"flex",marginTop:4},"svg-icon__root":{fontSize:"1rem"}})},81303:(e,t,r)=>{r.d(t,{Z:()=>c});var n=r(24328),a=r.n(n),l=r(99493),o=r(12068),i=r(28751),s=r(72148);const c=e=>{const{attributeType:t}=e;return class{static build(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};switch(e.type){case l.oS0.TYPE_NESTED:return a().createElement(i.Z,t);case l.oS0.TYPE_REFERENCE:return a().createElement(s.Z,t);default:return a().createElement(o.Z,t)}}}.build(t,e)}},80931:(e,t,r)=>{r.d(t,{Z:()=>d});var n=r(24328),a=r.n(n),l=r(17440),o=r(99493),i=r(95974),s=r(24625),c=r(48554),u=r(12437),p=r(78836),m=r(8261);const d=(0,n.memo)((e=>{let{attrTypes:t,entity:r,parentUri:d,drawLines:g,children:b,className:f,max:h,alwaysVisibleTypeUris:y=p.S,showNonOv:x}=e;const[v,E]=(0,n.useState)(h||1/0),w=(0,n.useMemo)((()=>(0,o.fyF)(t,r,x)),[t,r,x]),[C,O]=(0,n.useMemo)((()=>(0,m.A)(y,w)),[w,y]),T=O.slice(0,v),N=h&&T.length<O.length,S=h&&T.length>=O.length&&h<T.length,k={enabled:g};return a().createElement("div",{className:f},b&&a().createElement(i.Z,k,b),T.concat(C).map((e=>{let{attrType:t,values:n}=e;return a().createElement(s.Z,{key:t.uri,attributeType:t,drawLines:g,values:n,paging:(0,l.path)(["paging",t.uri],r.attributes),parentUri:d,showNonOv:x})})),N&&a().createElement(c.Z,{onClick:()=>{E(1/0)}}),S&&a().createElement(u.Z,{onClick:()=>{E(h)}}))}))},24625:(e,t,r)=>{r.d(t,{Z:()=>K});var n=r(52730),a=r(87638),l=r(71153),o=r.n(l),i=r(24328),s=r.n(i),c=r(17440),u=r(99493),p=r(79692);function m(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){d(e,t,r[t])}))}return e}function d(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const g="13px",b="15px",f={titleRow:{display:"block",minHeight:"16px",textIndent:"-1em",paddingLeft:"1em"},title:{whiteSpace:"nowrap"},ovIcon:{marginLeft:"8px",marginRight:"-3px",marginTop:"-1px",textIndent:0}},h=(0,p.Z)({paddingWrapper:{paddingTop:"3px",paddingBottom:"5px","&:last-child":{paddingBottom:"2px"}},paddingWrapperWithLines:{paddingBottom:"1px","&:last-child":{paddingBottom:"2px"}}}),y=(0,p.Z)(m({wrapper:{fontSize:g,lineHeight:b,flex:1},collaborationWrapper:{display:"flex",alignItems:"start",minHeight:"18px"},attribute:{marginLeft:"8px",paddingLeft:"4px",paddingRight:"4px",display:"inline",overflow:"hidden",whiteSpace:"pre-wrap",wordBreak:"break-word"},titleIcon:{width:"16px",height:"16px",marginBottom:"-3px",marginRight:"8px",marginLeft:"1px",color:"rgba(0, 0, 0, 0.38)"}},f)),x=(0,p.Z)(m({wrapper:{display:"flex",flexDirection:"column",alignItems:"flex-start",fontSize:g,lineHeight:b},attribute:{"&:last-child":{marginBottom:0},paddingLeft:"4px",paddingRight:"4px",marginLeft:"5px",marginBottom:"4px",whiteSpace:"pre-wrap",wordBreak:"break-word"},attributes:{alignSelf:"stretch"}},f,{titleRow:m({},f.titleRow,{marginBottom:"3px"})}));var v=r(95629),E=r(95974),w=r(19603),C=r(94646),O=r(91181),T=r(81303);const N=e=>{let{value:t,nonVisibleValues:r,attributeType:n,titleClassName:a,contentClassName:l,showNonOv:i,totalNonVisibleValues:c}=e;const p=y(),{label:m}=n,d=(0,u.xdS)(n)?u.q7e.RELATION_ATTRIBUTE:u.q7e.ENTITY_ATTRIBUTE;return s().createElement("div",{className:o()(p.collaborationWrapper,w.U)},s().createElement("div",{className:o()(p.titleRow,p.wrapper)},s().createElement(v.Z,{label:m,className:o()(p.title,a),"data-reltio-id":"reltio-attribute-label"}),s().createElement(O.Z,{nonOvValues:r,attributeType:n,className:p.ovIcon,nonOvTotal:c}),s().createElement(T.Z,{className:o()(p.attribute,l),attributeValue:t,attributeType:n,showNonOv:i,inlined:!0})),s().createElement(C.Z,{uri:t.uri,relatedObjectUris:(0,u.wp9)(d,{uri:t.uri}),objectType:d}))};var S=r(48554),k=r(12437);const A=e=>{let{max:t,values:r,nonVisibleValues:n,totalVisibleValues:a,attributeType:l,parentUri:u,requestNextPageOfAttributeValues:p,titleClassName:m,contentClassName:d,showNonOv:g,totalNonVisibleValues:b}=e;const f=x(),[h,y]=(0,i.useState)(t),E=t<a,w=E&&h<a,C=E&&h>=a,{label:N}=l,A=r.slice(0,h),P=a-h;return s().createElement("div",{className:f.wrapper},s().createElement("div",{className:f.titleRow},s().createElement(v.Z,{label:N,className:o()(f.title,m),"data-reltio-id":"reltio-attribute-label"}),s().createElement(O.Z,{nonOvValues:n,attributeType:l,className:f.ovIcon,nonOvTotal:b})),s().createElement("div",{className:f.attributes},A.map((e=>s().createElement(T.Z,{key:e.uri,className:o()(f.attribute,d),attributeValue:e,attributeType:l,showNonOv:g})))),w&&s().createElement(S.Z,{moreNumber:(0,c.min)(t,P),valueNumber:P,onClick:()=>{r.length<a&&p({parentUri:u,attributeTypeUri:l.uri,attributeTypeName:l.name,values:r,defaultMaxValues:t}),y(h+t)}}),C&&s().createElement(k.Z,{onClick:()=>{y(t)}}))};var P=r(13074),Z=r(20404);const I=e=>{let{className:t,values:r,Component:n,dataReltioId:a}=e;return s().createElement("div",{className:t,"data-reltio-id":a},r.map(((e,t)=>s().createElement(i.Fragment,{key:e},s().createElement(n,{value:e}),t<r.length-1&&", "))))};var L=r(26005),j=r(35493);function D(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){R(e,t,r[t])}))}return e}function R(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const V=(0,p.Z)({insertAttribute:D({width:"fit-content"},j.zX[j.Y1.insertAttribute]),deleteAttribute:D({width:"fit-content",textDecoration:"line-through",padding:"0 4px"},j.zX[j.Y1.deleteAttribute])}),B=e=>{let{value:t}=e;const r=V(),l=(0,n.useSelector)(a.ZP.selectors.getMetadata),{appearance:o}=(0,i.useContext)(L.m),c=(0,j.YN)("roles",t,o),p=(0,j.o_)(c);return s().createElement("span",{className:r[p]},(0,u.xqc)(l,t))},M=e=>{let{className:t,values:r}=e;return s().createElement(I,{values:r,className:t,dataReltioId:"reltio-attribute-value",Component:B})};var U=r(94079),z=r(3185);const _=e=>{let{value:t}=e;const r=V(),l=(0,n.useSelector)(a.ZP.selectors.getUIPath),o=(0,i.useContext)(z.u),c=(0,n.useSelector)(a.ZP.selectors.getEntity),{appearance:p}=(0,i.useContext)(L.m),m=(0,j.YN)("tags",t,p),d=(0,j.o_)(m),g=o||c;return s().createElement(U.Link,{underline:"none",className:r[d],href:(0,u.hgZ)({uiPath:l,tag:t,entityUri:g.dataTenant?(0,u.Nsy)(g):g.uri})},t)},H=e=>{let{className:t,values:r}=e;return s().createElement(I,{values:r,className:t,dataReltioId:"reltio-attribute-value",Component:_})},W=e=>{let{values:t,attributeType:r}=e;const n=y(),{label:a}=r;return s().createElement("div",{className:o()(n.titleRow,n.wrapper)},(l=n.titleIcon,r.uri===u.xPW.tags.uri?s().createElement(Z.Z,{className:l}):null),s().createElement(v.Z,{label:a,className:n.title,"data-reltio-id":"reltio-attribute-label"}),(e=>{switch(r.uri){case u.xPW.tags.uri:return s().createElement(H,{className:e,values:t});case u.xPW.roles.uri:return s().createElement(M,{className:e,values:t});default:return s().createElement(T.Z,{className:e,attributeValue:{value:t[0]},attributeType:r,inlined:!0})}})(n.attribute));var l},F="oneLine",q="multiLine",Y="imageLine",$="special",G=(0,i.memo)((e=>{let{values:t,attributeType:r,drawLines:n,paging:a={},parentUri:l,max:i=1/0,requestNextPageOfAttributeValues:p,titleClassName:m,contentClassName:d,showNonOv:g}=e;const b=h(),f=(0,c.partition)(u.OXP);if(!t||!t.length)return null;const[y,x]=f(t),w=g?t:y,C=g?[]:x,O=g?"totalValues":"totalOvValues",T=(0,c.ifElse)((0,c.has)(O),(0,c.prop)(O),(0,c.always)(w.length))(a),S=null!=a&&a.totalValues?a.totalValues-T:C.length,k=1===T&&!(0,u.YkM)(r);return s().createElement(E.Z,{enabled:n,className:o()({[b.paddingWrapperWithLines]:n})},s().createElement("div",{className:o()({[b.paddingWrapper]:!n})},(()=>{switch((0,c.cond)([[u.kqr,(0,c.always)($)],[u.Or$,(0,c.always)(Y)],[(0,c.always)(k),(0,c.always)(F)],[c.T,(0,c.always)(q)]])(r)){case F:return s().createElement(N,{value:w[0],nonVisibleValues:C,totalNonVisibleValues:S,attributeType:r,titleClassName:m,contentClassName:d,showNonOv:g});case q:return s().createElement(A,{values:w,nonVisibleValues:C,totalVisibleValues:T,totalNonVisibleValues:S,attributeType:r,parentUri:l,max:i,requestNextPageOfAttributeValues:p,titleClassName:m,contentClassName:d,showNonOv:g});case Y:return s().createElement(s().Fragment,null,s().createElement(v.Z,{label:null==r?void 0:r.label,"data-reltio-id":"reltio-attribute-label"}),s().createElement(P.Z,{attributeValues:w,attributeType:r,paging:a,parentUri:l,requestNextPageOfAttributeValues:p,showNonOv:g}));case $:return s().createElement(W,{values:w,attributeType:r})}})()))})),X={requestNextPageOfAttributeValues:a.N5.actions.requestNextPageOfAttributeValues},K=(0,n.connect)(((e,t)=>{let{max:r}=t;return{max:r||a.ZP.selectors.getDefaultMaxValues(e)}}),X)(G)},83303:(e,t,r)=>{r.d(t,{Z:()=>h});var n=r(24328),a=r.n(n),l=r(13980),o=r.n(l),i=r(71153),s=r.n(i),c=r(99493),u=r(94079),p=r(80931),m=r(19592),d=r(94646),g=r(19603);const b=(0,r(79692).Z)({complexContainer:{marginTop:"1px"},labelContainer:{display:"flex",minHeight:"18px"},label:{fontSize:"13px",lineHeight:"15px",letterSpacing:"normal",paddingTop:"1px",marginLeft:"2px"},spacer:{flex:1}}),f=e=>{let{attributeTypesList:t,attributeValue:r,label:l,expanded:o=!1,children:i,showNonOv:f,attributeType:h}=e;const y=b(),x=r.uri,[v,E]=(0,n.useState)(!1);(0,n.useEffect)((()=>{E(o)}),[o]);const w=(t||[]).some((e=>(0,c.kQw)(e))),C=(0,n.useMemo)((()=>({attributes:w?null:r.value,analyticsAttributes:w?r.value:null})),[r,w]),O=(0,c.xdS)(h)?c.q7e.RELATION_ATTRIBUTE:c.q7e.ENTITY_ATTRIBUTE;return a().createElement("div",{className:y.complexContainer},a().createElement("div",{className:s()(y.labelContainer,g.U)},a().createElement(m.Z,{onClick:()=>E((e=>!e)),expanded:v}),a().createElement(u.Typography,{component:"span",variant:"body2",classes:{body2:y.label},"data-reltio-id":"reltio-attribute-complex-label"},l),a().createElement("div",{className:y.spacer}),a().createElement(d.Z,{uri:r.uri,relatedObjectUris:(0,c.wp9)(O,{uri:r.uri}),objectType:O})),v&&a().createElement(p.Z,{attrTypes:t,entity:C,drawLines:!0,parentUri:x,showNonOv:f},i))};f.propTypes={children:o().node,label:o().oneOfType([o().string,o().node]),attributeTypesList:o().arrayOf(c.EMD),attributeValue:o().oneOfType([c.dMV,c.Rtp]),expanded:o().bool,showNonOv:o().bool,attributeType:c.EMD};const h=f},13074:(e,t,r)=>{r.d(t,{Z:()=>g});var n=r(24328),a=r.n(n),l=r(99493),o=r(71153),i=r.n(o),s=r(26005),c=r(27952),u=r(40932),p=r(95117),m=r(35493);const d=(0,r(79692).Z)((e=>({image:e=>{let{imageMargin:t,imageHeight:r,imageWidth:n}=e;return{marginRight:t,width:n,height:r,cursor:"pointer","&:last-child":{marginRight:0}}},deleteAttributeImage:{position:"relative","&:before":{content:"''",position:"absolute",left:0,top:0,right:0,bottom:0,background:`url('${(0,l.m5F)('<svg xmlns="http://www.w3.org/2000/svg" style="stroke: #D1051E; stroke-width: 1" viewBox="0 0 114 114">\n\t<line x1="5" y1="109" x2="109" y2="5" />\n</svg>')}') no-repeat`,backgroundColor:m.zX[m.Y1.deleteAttribute].backgroundColor,pointerEvents:"none"}},updateAttributeImage:{position:"relative","&:before":{content:"''",position:"absolute",left:0,top:0,right:0,bottom:0,backgroundColor:m.zX[m.Y1.updateAttribute].backgroundColor,pointerEvents:"none"}},deleteAttribute:e=>{let{imageWidth:t,imageHeight:r}=e;return{width:t,height:r,boxSizing:"border-box",outline:`3px solid ${m.zX[m.Y1.deleteAttribute].color}`,outlineOffset:"-3px"}},insertAttribute:e=>{let{imageWidth:t,imageHeight:r}=e;return{width:t,height:r,boxSizing:"border-box",outline:`3px solid ${m.zX[m.Y1.insertAttribute].color}`,outlineOffset:"-3px"}},updateAttribute:e=>{let{imageWidth:t,imageHeight:r}=e;return{width:t,height:r,boxSizing:"border-box",outline:`3px solid ${m.zX[m.Y1.updateAttribute].color}`,outlineOffset:"-3px"}},number:{color:e.palette.primary.main,fontSize:"24px",lineHeight:"42px",letterSpacing:0,padding:"36px 8px",textAlign:"center",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}}))),g=e=>{let{attributeType:t,attributeValues:r=[],paging:o,parentUri:g,requestNextPageOfAttributeValues:b,showNonOv:f,imageSize:h=p.By}=e;const y=d(h),{appearance:x}=(0,n.useContext)(s.m);return a().createElement(u.Z,{attributeValues:r,attributeType:t,renderImage:e=>{let{onOpenImageGalleryDialog:t}=e;return e=>{const r=(0,l.efz)(e),{uri:n}=e,o=(0,m.IF)(n,x),s=(0,m.o_)(o);return a().createElement("div",{className:i()(y.image,{[y[s+"Image"]]:s}),key:n,"data-reltio-id":"reltio-attribute-value"},a().createElement(c.Z,{onClick:()=>t(n),className:y[s],src:r,size:{imageWidth:h.imageWidth,imageHeight:h.imageHeight}}))}},imageSize:h,requestNextPageOfAttributeValues:b,paging:o,parentUri:g,showNonOv:f})}},28751:(e,t,r)=>{r.d(t,{Z:()=>y});var n=r(24328),a=r.n(n),l=r(94079),o=r(71153),i=r.n(o),s=r(99493),c=r(26005),u=r(35493),p=r(83303),m=r(50763);function d(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){g(e,t,r[t])}))}return e}function g(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const b=(0,r(79692).Z)({label:{textDecoration:"none"},updateAttribute:d({width:"fit-content",padding:"0 4px",marginLeft:"-4px"},u.zX[u.Y1.updateAttribute]),insertAttribute:d({width:"fit-content"},u.zX[u.Y1.insertAttribute]),deleteAttribute:d({width:"fit-content",textDecoration:"line-through",padding:"0 4px",marginLeft:"-4px"},u.zX[u.Y1.deleteAttribute]),pivotingTooltip:{marginLeft:"4px"}});function f(){return f=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},f.apply(this,arguments)}const h=e=>{let{attributeValue:t,attributeType:r}=e,o=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["attributeValue","attributeType"]);const d=b(),{appearance:g}=(0,n.useContext)(c.m),h=(0,n.useMemo)((()=>{const e=(0,u.IF)(t.uri,g),n=(0,u.o_)(e),o=t.label?t.label:(0,s.Kxm)(t,r.dataLabelPattern);return a().createElement(m.m,{className:d.pivotingTooltip,value:t,attributeType:r},a().createElement(l.Box,{component:"span",className:i()(d[n],d.label)},(0,s.idV)(o)))}),[g,d,t,r]);return a().createElement(p.Z,f({label:h,attributeValue:t,attributeTypesList:(0,s.EUG)({},r),attributeType:r},o))};h.propTypes=s.j2V;const y=(0,n.memo)(h)},72148:(e,t,r)=>{r.d(t,{Z:()=>x});var n=r(52730),a=r(24328),l=r.n(a),o=r(71153),i=r.n(o),s=r(99493),c=r(26005),u=r(83303),p=r(35493);function m(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){d(e,t,r[t])}))}return e}function d(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const g=(0,r(79692).Z)((e=>({label:{color:e.palette.primary.main,textDecoration:"none"},relationshipLabel:{marginLeft:"4px",color:e.palette.text.primary},updateAttribute:m({width:"fit-content",padding:"0 4px",marginLeft:"-4px"},p.zX[p.Y1.updateAttribute]),insertAttribute:m({width:"fit-content"},p.zX[p.Y1.insertAttribute]),deleteAttribute:m({width:"fit-content",textDecoration:"line-through",padding:"0 4px",marginLeft:"-4px"},p.zX[p.Y1.deleteAttribute])})));function b(){return b=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},b.apply(this,arguments)}const f=e=>{let{attributeValue:t,metadata:r,attributeType:n,uiPath:o}=e,m=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["attributeValue","metadata","attributeType","uiPath"]);const d=g(),f=(0,s.bwT)(t),h=(0,a.useMemo)((()=>(0,s.EUG)(r,n)),[n,r]),{appearance:y}=(0,a.useContext)(c.m),x=(0,a.useMemo)((()=>{const e=(0,p.IF)(t.uri,y),r=(0,p.o_)(e);return l().createElement("a",{href:(0,s.O27)(y)?(0,s.ChB)({uiPath:o,uri:f}):void 0,className:i()(d.label,d[r])},(0,s.idV)(t.label),t.relationshipLabel&&l().createElement("span",{className:d.relationshipLabel},t.relationshipLabel))}),[t.uri,t.label,t.relationshipLabel,y,f,d,o]);return l().createElement(u.Z,b({attributeTypesList:h,attributeValue:t,label:x,attributeType:n},m))};f.propTypes=s.NkU;const h=(0,a.memo)(f);var y=r(87638);const x=(0,n.connect)((e=>({metadata:y.ZP.selectors.getMetadata(e),uiPath:y.ZP.selectors.getUIPath(e)})))(h)},12068:(e,t,r)=>{r.d(t,{Z:()=>h});var n=r(24328),a=r.n(n),l=r(99493),o=r(71153),i=r.n(o),s=r(19603),c=r(26005),u=r(94646),p=r(72768),m=r(50763),d=r(35493);function g(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){b(e,t,r[t])}))}return e}function b(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const f=(0,r(79692).Z)({root:{display:"flex",alignItems:"start",justifyContent:"space-between"},commentsContainer:{height:"15px",marginRight:"-4px"},attributeValue:{flex:1,wordBreak:"break-all"},updateAttribute:g({width:"fit-content",padding:"0 4px",marginLeft:"-4px"},d.zX[d.Y1.updateAttribute],{"& > a":{color:d.zX[d.Y1.updateAttribute].color}}),insertAttribute:g({width:"fit-content"},d.zX[d.Y1.insertAttribute],{"& > a":{color:d.zX[d.Y1.insertAttribute].color}}),deleteAttribute:g({width:"fit-content",padding:"0 4px",marginLeft:"-4px",textDecoration:"line-through"},d.zX[d.Y1.deleteAttribute],{"& > a":{color:d.zX[d.Y1.deleteAttribute].color}}),multilineAttribute:{width:"fit-content"}}),h=e=>{let{className:t,attributeType:r=null,attributeValue:o,inlined:g}=e;const b=f(),{appearance:h}=(0,n.useContext)(c.m),y=(0,d.IF)(o.uri,h),x=(0,d.o_)(y),v=a().createElement(p.Z,{value:(0,l.kDl)(o),dataTypeDefinition:(0,l.PFL)(r)}),E=(0,l.xdS)(r)?l.q7e.RELATION_ATTRIBUTE:l.q7e.ENTITY_ATTRIBUTE;return g||x?a().createElement("div",{className:t},a().createElement(m.m,{value:o,attributeType:r,key:o.uri,className:i()({[b.multilineAttribute]:!g})},a().createElement("span",{className:b[x],"data-reltio-id":"reltio-attribute-value"},v))):a().createElement("div",{className:i()(t,b.root,s.U)},a().createElement(m.m,{value:o,attributeType:r,key:o.uri},a().createElement("span",{className:b.attributeValue,"data-reltio-id":"reltio-attribute-value"},v)),a().createElement(u.Z,{className:b.commentsContainer,uri:o.uri,relatedObjectUris:(0,l.wp9)(E,{uri:o.uri}),objectType:E}))}},35493:(e,t,r)=>{r.d(t,{Y1:()=>a,zX:()=>l,o_:()=>o,IF:()=>m,YN:()=>d});var n=r(17440);let a;!function(e){e.insertAttribute="insertAttribute",e.updateAttribute="updateAttribute",e.deleteAttribute="deleteAttribute"}(a||(a={}));const l={[a.insertAttribute]:{color:"#599E0E"},[a.updateAttribute]:{backgroundColor:"rgba(255, 187, 0, 0.12)",color:"#CC7500"},[a.deleteAttribute]:{backgroundColor:"rgba(255, 50, 0, 0.2)",color:"#CF0E26"}},o=e=>{switch(e){case"UPDATE_ATTRIBUTE":return a.updateAttribute;case"UNDO_IGNORE_ATTRIBUTE":case"INSERT_ATTRIBUTE":return a.insertAttribute;case"IGNORE_ATTRIBUTE":case"DELETE_ATTRIBUTE":return a.deleteAttribute;default:return""}},i="/",s=(0,n.pipe)((0,n.split)(i),(0,n.propSatisfies)((0,n.lte)(2),"length")),c=(0,n.pipe)((0,n.split)(i),(0,n.slice)(0,-2),(0,n.join)(i)),u=(0,n.curry)(((e,t)=>(0,n.cond)([[(0,n.has)(e),(0,n.prop)(e)],[()=>s(e),u(c(e))]])(t))),p=e=>(0,n.pipe)(n.keys,(0,n.any)((0,n.startsWith)(e+i))),m=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=u(e,t);return(0,n.isNil)(r)?p(e)(t)?"UPDATE_ATTRIBUTE":"":r},d=function(e,t){var r;let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return null==n||null===(r=n[e])||void 0===r?void 0:r[t]}},78836:(e,t,r)=>{r.d(t,{S:()=>a});var n=r(99493);const a=[n.xPW.roles.uri,n.xPW.tags.uri]},19603:(e,t,r)=>{r.d(t,{U:()=>n});const n="commentsContainerVisibilityArea"},7142:(e,t,r)=>{r.d(t,{g:()=>i});var n=r(24328),a=r.n(n),l=r(13980),o=r.n(l);const i=a().createContext({enabled:!1,queueSizeThreshold:0});i.Provider.propTypes={value:o().shape({enabled:o().bool,queueSizeThreshold:o().number})},i.displayName="AsyncMountContext"},69891:(e,t,r)=>{r.d(t,{P:()=>a});var n=r(24328);const a=r.n(n)().createContext(!1);a.displayName="BlockImageGalleryDialogContext"},3515:(e,t,r)=>{r.d(t,{h:()=>l});var n=r(24328);const a=()=>{},l=r.n(n)().createContext({comments:[],commentsMap:null,currentComment:null,getComment:a,getComments:()=>new Promise(a),getCommentsCount:a,createComment:()=>new Promise(a),editComment:()=>new Promise(a),createReply:()=>new Promise(a),resolveThread:a,reOpenThread:a,clearCurrentComment:a,deleteComment:a,sending:!1,loading:!1,pageToken:null});l.displayName="CollaborationContext"},31274:(e,t,r)=>{r.d(t,{X:()=>a});var n=r(24328);const a=r.n(n)().createContext({});a.displayName="EntitiesMapContext"},3185:(e,t,r)=>{r.d(t,{u:()=>a});var n=r(24328);const a=r.n(n)().createContext(null);a.displayName="EntityContext"},26005:(e,t,r)=>{r.d(t,{m:()=>a});var n=r(24328);const a=r.n(n)().createContext({appearance:void 0,attributes:void 0,roles:void 0,tags:void 0});a.displayName="HistoryDiffContext"},60995:(e,t,r)=>{r.d(t,{J:()=>a});var n=r(24328);const a=r.n(n)().createContext([])},78101:(e,t,r)=>{r.d(t,{A:()=>a});var n=r(24328);const a=r.n(n)().createContext([]);a.displayName="RelatedObjectUrisContext"},49759:(e,t,r)=>{r.d(t,{s:()=>a});var n=r(24328);const a=r.n(n)().createContext([]);a.displayName="UsersContext"},96479:(e,t,r)=>{r.d(t,{S:()=>o});var n=r(24328),a=r(7142);let l=0;const o=()=>{const e=(0,n.useRef)(!0),{enabled:t,queueSizeThreshold:r=0}=(0,n.useContext)(a.g),[o,i]=(0,n.useState)(!t||t&&l<r);e.current&&l++;const s=(0,n.useRef)();return(0,n.useEffect)((()=>{if(l--,!o)return s.current=setTimeout((()=>{i(!0)}),0),()=>clearTimeout(s.current)}),[]),e.current=!1,o}},97989:(e,t,r)=>{r.d(t,{Z:()=>o});var n=r(24328),a=r.n(n);function l(){return l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},l.apply(this,arguments)}const o=e=>a().createElement("svg",l({width:18,height:18,viewBox:"0 0 18 18",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},e),a().createElement("defs",null,a().createElement("path",{d:"M19 16v3H5v-3H3v3c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-3h-2zm-6-3.33l2.59-2.58L17 11.5l-5 5-5-5 1.41-1.41L11 12.67V3h2v9.67z",id:"Download_svg__a"})),a().createElement("g",{transform:"translate(-3 -3)",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a().createElement("mask",{id:"Download_svg__b",fill:"#fff"},a().createElement("use",{xlinkHref:"#Download_svg__a"})),a().createElement("path",{fillOpacity:.54,fill:"#fff",mask:"url(#Download_svg__b)",d:"M0 0h24v24H0z"})))}}]);
1
+ "use strict";(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[1920],{49965:(e,t,r)=>{r.d(t,{Z:()=>i});var n=r(24328),a=r.n(n),o=r(96479);function l(){return l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},l.apply(this,arguments)}const i=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const r=(0,n.forwardRef)(((r,n)=>(0,o.S)()?a().createElement(e,l({},r,{ref:n})):t&&a().createElement(t,l({},r,{ref:n}))));return r.displayName="WithAsyncMount",r}},19592:(e,t,r)=>{r.d(t,{Z:()=>p});var n=r(24328),a=r.n(n),o=r(71153),l=r.n(o),i=r(22385),s=r(98989);const c=(0,r(79692).Z)({expandButton:{"&:hover":{backgroundColor:"transparent"}},expandIcon:{transition:"transform .15s ease"},expanded:{transform:"rotate(90deg)"}});function u(){return u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},u.apply(this,arguments)}const p=e=>{const t=c(),{expanded:r,className:n}=e,o=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["expanded","className"]);return a().createElement(i.Z,u({icon:s.Z,size:"XXS",disableRipple:!0,iconClassName:l()(t.expandIcon,{[t.expanded]:r}),className:l()(n,t.expandButton)},o))}},92778:(e,t,r)=>{r.d(t,{Z:()=>c});var n=r(24328),a=r.n(n),o=r(15223),l=r(94079);const i=(0,r(79692).Z)({toolbar:{minHeight:"48px",padding:"8px 24px",lineHeight:"28px"},title:{fontSize:"18px",fontWeight:"normal",lineHeight:"inherit",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}});function s(){return s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s.apply(this,arguments)}const c=e=>{let{title:t,children:r=null,classes:n={}}=e,c=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["title","children","classes"]);const u=i();return a().createElement(o.Z,s({className:n.root,classes:{root:u.toolbar}},c),a().createElement(l.Typography,{className:n.title,classes:{root:u.title},variant:"h6"},t),r)}},9371:(e,t,r)=>{r.d(t,{J:()=>q});var n=r(24328),a=r.n(n),o=r(94079),l=r(87918),i=r.n(l),s=r(43054),c=r(55847),u=r(8818),p=r(52730),m=r(71153),d=r.n(m),g=r(17440),b=r(87638),f=r(99493),h=r(31274),y=r(31039);const x=(e,t)=>{const r=e.relatedObjectUris.indexOf(t);if(r>=0)return e.relatedObjectUris[1-r]},v=e=>`${i().date(e,"LT")} ${i().date(e,"LL")}`;var E=r(79692);const w=(0,E.Z)((e=>({title:{marginBottom:"10px",color:e.palette.divider,fontSize:"12px",lineHeight:"14px"},label:{paddingLeft:"9px",borderLeft:"1px solid #D8D8D8",fontSize:"13px",color:e.palette.text.primary,lineHeight:"15px"},link:{color:e.palette.primary.main,textDecoration:"none"}})));function C(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const O=e=>{let{comment:t,className:r}=e;const l=w(),s=(0,p.useSelector)(b.ZP.selectors.getEntity),c=(0,p.useSelector)(b.ZP.selectors.getMetadata),u=(0,n.useContext)(h.X);return a().createElement(o.Box,{className:r},(()=>{switch(t.objectType){case f.q7e.ENTITY_ATTRIBUTE:{const e=(0,f.AFK)(t.objectId,s.type),r=(0,f.zeJ)(c,e);return a().createElement(a().Fragment,null,a().createElement(o.Typography,{className:l.title},i().text("Selected attribute:")),a().createElement(o.Typography,{className:l.label},null==r?void 0:r.label))}case f.q7e.RELATION_ATTRIBUTE:{const e=t.relatedObjectUris.find((0,g.startsWith)("configuration/relationTypes")),r=(0,f.AFK)(t.objectId,e),n=(0,f.zeJ)(c,r);return a().createElement(a().Fragment,null,a().createElement(o.Typography,{className:l.title},i().text("Selected attribute:")),a().createElement(o.Typography,{className:l.label},null==n?void 0:n.label))}case f.q7e.ENTITY:return a().createElement(a().Fragment,null,a().createElement(o.Typography,{className:l.title},i().text("Selected profile:")),a().createElement(y.Z,{className:d()(l.label,l.link),value:(0,f.wwR)(s)},(0,f.idV)(s.label)));case f.q7e.RELATION:{const e=x(t,s.uri),r=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){C(e,t,r[t])}))}return e}({},u[e]||{},{uri:e});return a().createElement(a().Fragment,null,a().createElement(o.Typography,{className:l.title},i().text("Selected relation:")),a().createElement(o.Typography,{className:l.label},a().createElement(y.Z,{className:l.link,value:(0,f.wwR)(s)},(0,f.idV)(s.label)),e&&a().createElement(a().Fragment,null,` ${i().text("to")} `,a().createElement(y.Z,{className:l.link,value:(0,f.wwR)(r)},r.label?(0,f.idV)(r.label):(0,f.BTI)(r)))))}case f.q7e.POTENTIAL_MATCH:{var e;const r=x(t,s.uri),n={uri:r,label:null===(e=u[r])||void 0===e?void 0:e.label};return a().createElement(a().Fragment,null,a().createElement(o.Typography,{className:l.title},i().text("Selected potential match:")),a().createElement(o.Typography,{className:l.label},a().createElement(y.Z,{className:l.link,value:(0,f.wwR)(s)},(0,f.idV)(s.label)),r&&a().createElement(a().Fragment,null,` ${i().text("and")} `,a().createElement(y.Z,{className:l.link,value:(0,f.wwR)(n)},n.label?(0,f.idV)(n.label):(0,f.BTI)(n)))))}default:return null}})())};var T=r(49759);const N=(0,E.Z)((e=>({root:{color:e.palette.text.primary,fontSize:"13px",lineHeight:"15px",wordBreak:"break-word"}}))),S=e=>{let{comment:t,className:r}=e;const l=N(),i=(0,n.useContext)(T.s);return a().createElement(o.Typography,{className:d()(l.root,r)},function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e=>e,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"+";const a=[];let o="",l=!1;for(let i=0;i<=e.length;i++){const s=e[i],c=e[i+1],u=i===e.length-1;o+=s,s===n&&0===i&&(l=!0),l&&t.includes(o.slice(n.length))&&(l=!1,a.push(r(o)),o=""),c===n&&(l=!0,a.push(o),o=""),u&&a.push(o)}return a}(t.content,t.namedUsers,(e=>{const t=i.find((t=>t.username===e.slice(1)));return t?a().createElement(o.Link,{href:`mailto:${t.email}`},e):e})).map(((e,t)=>a().createElement(n.Fragment,{key:t},e))))};var k=r(43434);const A=(0,E.Z)((e=>({root:{width:"32px",height:"32px",fontSize:"12px",color:e.palette.text.secondary,backgroundColor:"rgba(144, 164, 174, 0.2)"}})));function P(){return P=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},P.apply(this,arguments)}const Z=e=>{let{className:t,children:r}=e,n=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["className","children"]);const o=A();return a().createElement(k.Z,P({},n,{className:d()(o.root,t)}),r.split(".").map((e=>e[0].toUpperCase())).join(""))};var I=r(3515);const L=(0,E.Z)((e=>({header:{display:"flex"},avatar:{marginRight:"8px"},username:{marginBottom:"1px",color:e.palette.text.primary,fontSize:"13px",fontWeight:500,lineHeight:"15px"},createdAt:{marginTop:"3px",marginRight:"4px",color:e.palette.text.secondary,fontSize:"11px",lineHeight:"13px",whiteSpace:"nowrap"},body:{marginLeft:"40px"},commentTarget:{marginTop:"-15px"},message:{marginTop:"12px"},dropdownMenu:{zIndex:"3000 !important"},buttons:{marginTop:"15px",marginBottom:"12px",display:"flex","& $button + $button":{marginLeft:"10px"}},button:{fontSize:"13px",lineHeight:"15px"}}))),j=e=>{let{onReply:t,className:r,uri:l,comment:m,onStartEditing:d}=e;const g=L(),f=(0,p.useSelector)(b.ZP.selectors.getUserName),h=m.createdBy===f,{resolveThread:y,reOpenThread:x,sending:E,deleteComment:w}=(0,n.useContext)(I.h),C=(0,n.useMemo)((()=>[{text:i().text("Edit"),onClick:d},{text:i().text("Delete"),onClick:()=>w({uri:l,commentId:m.commentId})}]),[d,w,l,m]);return a().createElement(o.Box,{className:r},a().createElement(o.Box,{className:g.header},a().createElement(Z,{classes:{root:g.avatar}},m.createdBy),a().createElement(o.Box,{width:"100%"},a().createElement(o.Typography,{className:g.username},m.createdBy)),a().createElement(o.Typography,{className:g.createdAt},v(m.createdTime)),h&&a().createElement(c.Z,{buttonComponent:u.k,buttonProps:{icon:s.Z,tooltipTitle:i().text("Open menu")},popoverProps:{PopoverClasses:{root:g.dropdownMenu}},menuItems:C,menuId:"collaboration-comment-menu"})),a().createElement(o.Box,{className:g.body},a().createElement(O,{comment:m,className:g.commentTarget}),a().createElement(S,{comment:m,className:g.message}),a().createElement(o.Box,{className:g.buttons},a().createElement(o.Link,{className:g.button,onClick:t,component:"button"},i().text("Reply")),"open"===m.status&&a().createElement(o.Link,{disabled:E,className:g.button,onClick:()=>{y({commentId:m.commentId,uri:l})},component:"button"},i().text("Resolve")),"resolved"===m.status&&a().createElement(o.Link,{disabled:E,className:g.button,onClick:()=>{x({commentId:m.commentId,uri:l})},component:"button"},i().text("Re-open")))))},D=(0,E.Z)((e=>({root:{display:"flex",padding:"8px",borderRadius:"4px",backgroundColor:"rgba(0,114,206,0.06)"},avatar:{marginRight:"8px"},header:{display:"flex",marginBottom:"8px"},username:{color:e.palette.text.primary,fontSize:"13px",fontWeight:500,lineHeight:"15px"},message:{marginBottom:"8px",color:e.palette.text.primary,fontSize:"13px",lineHeight:"15px"},createdAt:{color:e.palette.text.secondary,fontSize:"11px",lineHeight:"13px",whiteSpace:"nowrap"},marked:{marginLeft:"8px",color:e.palette.text.secondary,fontSize:"13px",fontStyle:"italic",lineHeight:"15px"}}))),R=e=>{let{className:t,reply:r}=e;const{createdBy:n,action:l,createdTime:s}=r,c=D();return a().createElement(o.Box,{className:d()(c.root,t)},a().createElement(Z,{classes:{root:c.avatar}},n),a().createElement(o.Box,null,a().createElement(o.Box,{className:c.header},a().createElement(o.Typography,{className:c.username},n),"resolve"===l&&a().createElement(o.Typography,{className:c.marked},i().text("Marked as resolved")),"reopen"===l&&a().createElement(o.Typography,{className:c.marked},i().text("Re-opened"))),"resolve"!==l&&a().createElement(S,{className:c.message,comment:r}),a().createElement(o.Typography,{className:c.createdAt},v(s))))};var V=r(2271);const B=(0,E.Z)((e=>({root:{width:"100%",backgroundColor:"#fff",fontFamily:"Roboto","&__control":{fontSize:"13px"},"&__highlighter":{padding:"10px 22px",border:"1px solid transparent !important",maxHeight:"70px"},"&__input":{borderRadius:"2px",border:"1px solid rgba(0,0,0,0.12)",padding:"10px 22px",outline:0,maxHeight:"70px",overflow:"auto !important"},"&__suggestions":{padding:"8px 0",borderRadius:"4px",backgroundColor:"#fafafa !important",boxShadow:"0 2px 2px 0 rgba(0,0,0,0.14), 0 3px 1px -2px rgba(0,0,0,0.12), 0 1px 5px 0 rgba(0,0,0,0.2)",transform:"translateY(-100%)"},"&__suggestions__list":{maxHeight:"200px",overflowY:"scroll"},"&__suggestions__item":{padding:"6px 12px",color:e.palette.text.primary,fontSize:"13px",transition:e.transitions.create(["background-color"]),"&:hover, &--focused":{backgroundColor:"rgba(0,0,0,0.04)"}}},mention:{position:"relative",zIndex:1,color:e.palette.primary.main,textShadow:"1px 1px 1px white, 1px -1px 1px white, -1px 1px 1px white, -1px -1px 1px white",pointerEvents:"none"}})));function M(){return M=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},M.apply(this,arguments)}const U=e=>{let{onChange:t,className:r}=e,o=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["onChange","className"]);const l=B(),i=(0,n.useContext)(T.s);return a().createElement(V.r,M({},o,{onChange:(e,r,n,a)=>{t(r,n,(0,g.uniq)(a.map((e=>{let{display:t}=e;return t.slice(1)}))))},className:d()(l.root,r)}),a().createElement(V.p,{trigger:"+",data:i.map((e=>{let{username:t}=e;return{id:t,display:t}})),displayTransform:(e,t)=>`+${t}`,appendSpaceOnAdd:!0,className:l.mention}))},z=(0,E.Z)({root:{padding:"6px 6px 6px 8px",borderRadius:"4px",backgroundColor:"rgba(0,114,206,0.06)"},textField:{maxWidth:"calc(100% - 40px)"},form:{marginBottom:0},main:{display:"flex",alignItems:"center"},avatar:{marginRight:"8px"},buttons:{marginLeft:"40px",marginTop:"8px"},button:{"& + $button":{marginLeft:"8px"}}});var _=r(67218);const H=e=>{switch(e){case"open":return i().text("Reply...");case"resolved":return i().text("Adding a comment will re-open this");default:return""}},W=e=>{let{inputRef:t,className:r,uri:l,relatedObjectUris:s,objectType:c,popperRef:u,comment:m,isEditingComment:f,onCancel:h}=e;const y=z(),x=(0,p.useSelector)(b.ZP.selectors.getUserName),{createReply:v,createComment:E,sending:w,editComment:C}=(0,n.useContext)(I.h),[O,T]=(0,n.useState)(""),[N,S]=(0,n.useState)(""),[k,A]=(0,n.useState)([]),[P,L]=(0,n.useState)(!1),j=(0,_._)(),D=""!==O.trim(),R=P||D,V=null==m?void 0:m.status,B=(e,t,r)=>{A(r),T(e),S(t)},M=()=>{null==h||h(),B("","",[])};return(0,n.useEffect)((()=>{u&&u.current.update()}),[u,R]),(0,n.useEffect)((()=>{f?T(m.content):M()}),[f]),a().createElement(o.Box,{className:d()(y.root,r)},a().createElement("form",{onSubmit:e=>{e.preventDefault();const t=(0,g.cond)([[(0,g.always)(!m),()=>E({content:N,namedUsers:k,objectType:c,uri:l,relatedObjectUris:s})],[(0,g.always)(f),()=>C({content:N,namedUsers:k,commentId:m.commentId,objectType:c,replies:m.replies,relatedObjectUris:s,uri:l})],[g.T,()=>v({content:N,namedUsers:k,commentId:m.commentId,action:"open"===m.status?"none":"reopen",uri:l})]]);return j(t()).then(M).catch(console.log)},className:y.form},a().createElement(o.Box,{className:y.main},a().createElement(Z,{classes:{root:y.avatar}},x),a().createElement(U,{className:y.textField,disabled:w,onChange:(e,t,r)=>{B(e,t,r)},inputRef:t,value:O,onFocus:()=>L(!0),onBlur:()=>L(!1),placeholder:H(V)})),R&&a().createElement(o.Box,{className:y.buttons},a().createElement(o.Button,{className:y.button,variant:"contained",color:"primary",disabled:!D||w,type:"submit"},((e,t)=>t?i().text("Edit"):"open"===e||"resolved"===e?i().text("Reply"):i().text("Comment"))(V,f)),a().createElement(o.Button,{disabled:w,onClick:()=>M(),className:y.button,variant:"outlined",color:"primary"},i().text("Cancel")))))},F=(0,E.Z)((()=>({root:{maxWidth:"100%",padding:"8px 4px 10px 16px"},messages:{},repliedComment:{marginBottom:"2px"},replies:{marginLeft:"40px"},sendMessageArea:{marginLeft:"40px"},comment:{}}))),q=(0,n.memo)((e=>{let{uri:t,relatedObjectUris:r,objectType:l,classes:i,popperRef:s,messagesRef:c,comment:u}=e;const p=(0,n.useRef)(),m=F({classes:i}),[d,g]=(0,n.useState)(!1),b=a().createElement(W,{className:m.sendMessageArea,inputRef:p,popperRef:s,uri:t,relatedObjectUris:r,objectType:l,comment:u,onCancel:()=>g(!1),isEditingComment:d});return a().createElement(o.Box,{className:m.root},u&&a().createElement(a().Fragment,null,a().createElement("div",{className:m.messages,ref:c},a().createElement(j,{comment:u,uri:t,onReply:()=>{d&&g(!1),p.current.focus()},onStartEditing:()=>{g(!0)},className:m.comment}),a().createElement(o.Box,{className:m.replies},u.replies.map((e=>a().createElement(R,{key:e.replyId,className:m.repliedComment,reply:e}))))),b),!u&&b)}))},94646:(e,t,r)=>{r.d(t,{Z:()=>P});var n=r(24328),a=r.n(n),o=r(71153),l=r.n(o),i=r(79692),s=r(19603);const c=(0,i.Z)((()=>({root:{display:"flex",alignItems:"start"},addButton:{visibility:"hidden","&$showAlways":{visibility:"visible"},[`.${s.U}:hover &`]:{visibility:"visible"}},showAlways:{}})));var u=r(20562),p=r(3515),m=r(78101),d=r(87918),g=r.n(d),b=r(94079);function f(){return f=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},f.apply(this,arguments)}const h=e=>a().createElement("svg",f({width:20,height:20,fillOpacity:.54,fill:"#000",fillRule:"nonzero",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},e),a().createElement("path",{d:"M2.8 1h14.4c.99 0 1.8.81 1.8 1.8v10.8c0 .99-.81 1.8-1.8 1.8H4.6L1 19V2.8C1 1.81 1.81 1 2.8 1z"})),y=(0,i.Z)((()=>({root:{position:"relative",height:"18px",display:"flex",alignItems:"center",justifyContent:"center",marginLeft:"4px",cursor:"pointer"},icon:{"&:hover":{fillOpacity:.7}},childrenWrapper:{position:"absolute",width:"100%",height:"100%",lineHeight:"15px",display:"flex",alignItems:"center",justifyContent:"center",top:"-2px",left:0,right:0,bottom:0,color:"white",fontSize:"10px",pointerEvents:"none"}}))),x=a().forwardRef(((e,t)=>{let{children:r,onClick:n}=e;const o=y();return a().createElement(b.Tooltip,{title:g().text("Show comment")},a().createElement("div",{ref:t,className:o.root,onClick:n},a().createElement(h,{className:o.icon}),a().createElement("div",{className:o.childrenWrapper},r)))}));x.displayName="CommentButton";const v=x;function E(){return E=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},E.apply(this,arguments)}const w=e=>a().createElement("svg",E({width:20,height:20,fillOpacity:.54,fill:"#000",fillRule:"nonzero",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},e),a().createElement("path",{d:"M2.8 14.653L3.853 13.6H17.2V2.8H2.8v11.853zM17.2 1c.99 0 1.8.81 1.8 1.8v10.8c0 .99-.81 1.8-1.8 1.8H4.6L1 19V2.8C1 1.81 1.81 1 2.8 1h14.4zm-6.3 3.6H9.1v2.699L6.4 7.3v1.8l2.7-.001V11.8h1.8V9.099l2.7.001V7.3l-2.7-.001V4.6z"})),C=e=>{let{className:t,onClick:r}=e;const n=y();return a().createElement(b.Tooltip,{title:g().text("Add comment")},a().createElement("div",{className:l()(n.root,t),onClick:r},a().createElement(w,{className:n.icon})))};var O=r(27291),T=r(9371),N=r(8818),S=r(59601);const k=(0,i.Z)((e=>({root:{},header:{display:"flex",alignItems:"center",height:"48px",paddingLeft:"16px",paddingRight:"8px"},headerInfo:{marginRight:"auto",display:"flex",alignItems:"center"},title:{marginRight:"15px",color:e.palette.text.primary,fontSize:"16px"},counter:{paddingLeft:"15px",borderLeft:"1px solid rgba(0,0,0,0.12)",color:e.palette.text.secondary,fontSize:"14px",lineHeight:"24px"},resolveButton:{zIndex:3e3,"&:hover":{backgroundColor:"transparent"}},popper:{width:"424px",borderRadius:"0 0 4px 4px"},collaborationItem:{padding:"0 0 10px 0"},comment:e=>{let{hasScroll:t}=e;return{marginLeft:"16px",marginRight:t?"2px":"8px"}},replies:e=>{let{hasScroll:t}=e;return{marginLeft:"8px",marginRight:t?"2px":"8px"}},sendMessageArea:e=>{let{hasScroll:t,scrollWidth:r}=e;return{marginLeft:"8px",marginRight:t?r+2:"8px"}},messages:{maxHeight:"400px",overflowY:"auto"}}))),A=e=>{let{uri:t,relatedObjectUris:r,objectType:o,anchorEl:l,onClose:i,open:s,comment:c}=e;const[u,m]=(0,n.useState)(0),d=k({scrollWidth:u,hasScroll:0!==u}),f=(0,n.useRef)(null),{resolveThread:h,loading:y,sending:x}=(0,n.useContext)(p.h),v=1+(null==c?void 0:c.replies.length);return a().createElement(S.Z,{popperRef:f,anchorEl:l,open:s,placement:"right-start",onClose:i,className:d.popper},a().createElement(b.Box,{className:d.header},a().createElement(b.Box,{className:d.headerInfo},a().createElement(b.Typography,{className:d.title},g().text("Comments")),c&&!y&&a().createElement(b.Typography,{className:d.counter},g().number(v)," ",1===v?g().text("item"):g().text("items"))),c&&!y&&a().createElement(N.k,{className:d.resolveButton,size:"S",onClick:()=>{h({commentId:c.commentId,uri:t})},disabled:x,showForDisabled:!0,tooltipTitle:g().text("Resolve"),icon:O.Z,color:"primary"})),!y&&a().createElement(T.J,{popperRef:f,messagesRef:e=>{e&&m(e.offsetWidth-e.clientWidth)},classes:{root:d.collaborationItem,replies:d.replies,sendMessageArea:d.sendMessageArea,messages:d.messages,comment:d.comment},uri:t,relatedObjectUris:r,objectType:o,comment:c}))},P=e=>{let{className:t,uri:r,objectType:o,relatedObjectUris:i,onChangePopupVisibility:s,allowOnlyOneComment:d=!1,showAlways:g=!1}=e;const b=c(),[f,h]=(0,n.useState)(null),[y,x]=(0,n.useState)(!1),E=y&&Boolean(f),{currentComment:w,commentsMap:O,getComment:T,clearCurrentComment:N,objectTypes:S}=(0,n.useContext)(p.h),k=!!O&&(!S||S.includes(o)),P=((null==O?void 0:O[r])||[]).filter((e=>{let{status:t}=e;return"resolved"!==t})).reverse(),Z=!d||d&&0===P.length,I=null===w&&E;(0,u.D)((()=>{s&&s(E)}),[E]);const L=(0,n.useContext)(m.A),j=(0,n.useMemo)((()=>L?[...i,...L]:i),[L,i]);return k&&a().createElement("div",{className:l()(b.root,t)},Z&&a().createElement(C,{className:l()(b.addButton,{[b.showAlways]:g||I}),onClick:e=>{h(e.currentTarget),x(!0)}}),P.map((e=>{let{replies:t,commentId:r}=e;return a().createElement(v,{ref:r===(null==w?void 0:w.commentId)?h:null,key:r,onClick:()=>(e=>{T(e),x(!0)})(r)},1+t)})),a().createElement(A,{anchorEl:f,open:E,onClose:()=>{h(null),N(),x(!1)},uri:r,relatedObjectUris:j,objectType:o,comment:w}))}},55847:(e,t,r)=>{r.d(t,{Z:()=>v});var n=r(24328),a=r.n(n),o=r(71153),l=r.n(o),i=r(17440),s=r(94079),c=r(48348),u=r(20562),p=r(83348),m=r(79692),d=r(41128);const g=(0,m.Z)((e=>({buttonRoot:{"&$selected":{color:e.palette.action.active,backgroundColor:(0,d.U1)(e.palette.action.active,.12),"&:hover":{backgroundColor:(0,d.U1)(e.palette.action.active,.15)}}},selected:{},paper:{minWidth:"112px"},menuItem:{minHeight:"32px"},menuText:{color:e.palette.text.primary,fontSize:"13px",lineHeight:"15px",letterSpacing:0}}))),b=(0,p.Z)(s.MenuItem),f=(0,n.forwardRef)(((e,t)=>{let{item:r,onMenuClose:n=i.identity}=e;const o=g(),{disabled:l,text:c,tooltip:u,onClick:p,id:m=""}=r;return a().createElement(b,{tooltipTitle:u,showForDisabled:!0,classes:{root:o.menuItem},onClick:e=>{n(e),p(e)},disabled:l,ref:t,"data-modal":!0,"data-reltio-id":`reltio-search-menu-item${m}`},a().createElement(s.Typography,{classes:{root:o.menuText}},c))}));f.displayName="MenuItemRenderer";const h=f;function y(){return y=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},y.apply(this,arguments)}function x(e){let{className:t,menuId:r,buttonComponent:o=s.Button,buttonContent:p,menuItems:m=[],buttonProps:d={},popoverProps:b={},onMenuOpen:f=i.identity,onMenuClose:x=i.identity,MenuItemRenderer:v=h}=e;const E=o,w=g(),C=(0,n.useRef)(),[O,T]=(0,n.useState)(!1);(0,u.D)((()=>{O?f():x()}),[O]);const N=(0,n.useCallback)((e=>{null==e||e.stopPropagation(),T((e=>!e))}),[]);return a().createElement(a().Fragment,null,a().createElement(E,y({ref:C,className:l()(w.buttonRoot,{[w.selected]:O},t),onClick:N,"aria-pressed":O,"aria-controls":O?r:void 0,"aria-haspopup":"true"},d),p),a().createElement(c.Z,y({id:r,variant:"menu",open:O,autoFocus:!1,classes:{paper:w.paper},anchorEl:C.current,onClose:N,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},elevation:2,getContentAnchorEl:null,MenuListProps:{autoFocusItem:O}},b),m.map(((e,t)=>a().createElement(v,{item:e,key:t,onMenuClose:N})))))}x.displayName="DropDownMenuButton";const v=x},53180:(e,t,r)=>{r.d(t,{Z:()=>p});var n=r(24328),a=r.n(n),o=r(52730),l=r(71153),i=r.n(l),s=r(94079),c=r(99493),u=r(87638);const p=e=>{let{entity:t,avatarClassName:r,imageClassName:n}=e;const l=(0,o.useSelector)(u.ZP.selectors.getMetadata),p=(0,o.useSelector)(u.ZP.selectors.getAbsoluteImagePath)||"",m=(0,c.uie)(l,p,t),d=(0,c.vPL)(p,(0,c.XH2)(l,t.type)),g=e=>{e.target.onError=null,e.target.src=(0,c.m5F)('\n<svg width="400px" height="400px" viewBox="0 0 400 400" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <title>Group</title>\n <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <g id="Group" fill-rule="nonzero">\n <rect id="Rectangle" fill="#DFE5E9" x="0" y="0" width="400" height="400"></rect>\n <path d="M0,387.023257 L0,399.918908 L400,399.918908 L400,386.023594 C366.631,377.336524 321.866,364.269931 315.979,359.161654 C308.985,353.083704 270.481,310.508063 270.481,310.508063 L270.481,286.186267 C270.481,286.186267 284.478,266.204006 284.478,261.854473 C284.478,257.515936 285.353,246.219746 291.481,241.011503 C297.61,235.792263 311.607,211.471466 312.481,206.253226 C313.355,201.043983 319.484,188.009379 312.481,185.400259 C305.478,182.801135 307.236,173.244359 308.984,168.026119 C310.733,162.817875 319.484,139.355788 322.981,133.277838 C326.488,127.199888 312.481,108.956041 312.481,108.956041 C312.481,108.956041 294.978,80.2857109 245.975,53.3547939 C196.971,26.4138803 168.967,42.9283105 168.967,42.9283105 L161.964,60.3024507 C161.964,60.3024507 138.341,64.6409874 123.46,77.6765909 C108.589,90.7121943 99.837,106.346921 98.963,115.903698 C98.088,125.460475 103.334,159.339048 105.966,164.557289 C108.589,169.765532 112.96,185.400259 112.96,185.400259 C112.96,185.400259 108.589,183.670842 105.966,188.879085 C103.334,194.097325 112.085,218.419122 112.96,220.159535 C113.834,221.897949 114.718,238.403382 119.963,237.532676 C125.218,236.663969 130.463,251.42799 130.463,251.42799 C130.463,251.42799 143.596,271.41125 144.47,275.759783 C145.344,280.09832 147.967,307.039233 147.967,307.039233 L126.967,331.36103 L102.46,355.682827 C102.459,355.682827 34.042,375.886013 0,387.023257 Z" id="Path" fill="#B3BCC4"></path>\n <path d="M0,387.023257 L0,399.918908 L400,399.918908 L400,386.023594 C366.631,377.336524 321.866,364.269931 315.979,359.161654 C308.985,353.083704 270.481,310.508063 270.481,310.508063 L270.481,286.186267 C270.481,286.186267 284.478,266.204006 284.478,261.854473 C284.478,257.515936 285.353,246.219746 291.481,241.011503 C297.61,235.792263 311.607,211.471466 312.481,206.253226 C313.355,201.043983 319.484,188.009379 312.481,185.400259 C305.478,182.801135 307.236,173.244359 308.984,168.026119 C310.733,162.817875 319.484,139.355788 322.981,133.277838 C326.488,127.199888 312.481,108.956041 312.481,108.956041 C312.481,108.956041 294.978,80.2857109 245.975,53.3547939 C196.971,26.4138803 168.967,42.9283105 168.967,42.9283105 L161.964,60.3024507 C161.964,60.3024507 138.341,64.6409874 123.46,77.6765909 C108.589,90.7121943 99.837,106.346921 98.963,115.903698 C98.088,125.460475 103.334,159.339048 105.966,164.557289 C108.589,169.765532 112.96,185.400259 112.96,185.400259 C112.96,185.400259 108.589,183.670842 105.966,188.879085 C103.334,194.097325 112.085,218.419122 112.96,220.159535 C113.834,221.897949 114.718,238.403382 119.963,237.532676 C125.218,236.663969 130.463,251.42799 130.463,251.42799 C130.463,251.42799 143.596,271.41125 144.47,275.759783 C145.344,280.09832 147.967,307.039233 147.967,307.039233 L126.967,331.36103 L102.46,355.682827 C102.459,355.682827 34.042,375.886013 0,387.023257 Z" id="Path" fill="#B3BCC4"></path>\n <path d="M5.68434189e-14,387.023257 L5.68434189e-14,399.918908 L400,399.918908 L400,386.023594 C366.631,377.336524 321.866,364.269931 315.979,359.161654 C308.985,353.083704 270.481,310.508063 270.481,310.508063 L270.481,286.186267 C270.481,286.186267 284.478,266.204006 284.478,261.854473 C284.478,257.515936 285.353,246.219746 291.481,241.011503 C297.61,235.792263 311.607,211.471466 312.481,206.253226 C313.355,201.043983 319.484,188.009379 312.481,185.400259 C305.478,182.801135 307.236,173.244359 308.984,168.026119 C310.733,162.817875 319.484,139.355788 322.981,133.277838 C326.488,127.199888 312.481,108.956041 312.481,108.956041 C312.481,108.956041 294.978,80.2857109 245.975,53.3547939 C196.971,26.4138803 168.967,42.9283105 168.967,42.9283105 L161.964,60.3024507 C161.964,60.3024507 138.341,64.6409874 123.46,77.6765909 C108.589,90.7121943 99.837,106.346921 98.963,115.903698 C98.088,125.460475 103.334,159.339048 105.966,164.557289 C108.589,169.765532 112.96,185.400259 112.96,185.400259 C112.96,185.400259 108.589,183.670842 105.966,188.879085 C103.334,194.097325 112.085,218.419122 112.96,220.159535 C113.834,221.897949 114.718,238.403382 119.963,237.532676 C125.218,236.663969 130.463,251.42799 130.463,251.42799 C130.463,251.42799 143.596,271.41125 144.47,275.759783 C145.344,280.09832 147.967,307.039233 147.967,307.039233 L126.967,331.36103 L102.46,355.682827 C102.459,355.682827 34.042,375.886013 5.68434189e-14,387.023257 Z" id="Path" fill="#B3BCC4"></path>\n </g>\n </g>\n</svg>\n')};return a().createElement(s.Avatar,{className:i()(r,n),src:m,imgProps:{onError:g}},a().createElement("img",{className:n,src:d,alt:"fallback entity avatar",onError:g}))}},31254:(e,t,r)=>{r.d(t,{Z:()=>c});var n=r(24328),a=r.n(n),o=r(52730),l=r(87638),i=r(98018);function s(){return s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s.apply(this,arguments)}const c=e=>{const t=(0,o.useSelector)(l.ZP.selectors.getAbsoluteImagePath)||"";return a().createElement(i.ZP,s({},e,{storagePath:(r=t,r.endsWith("/")?r:r+"/")}));var r}},76134:(e,t,r)=>{r.d(t,{Z:()=>c});var n=r(24328),a=r.n(n),o=r(71153),l=r.n(o),i=r(94079),s=r(73086);const c=e=>{let{className:t,message:r}=e;const n=(0,s.y)();return r?a().createElement(i.Typography,{variant:"caption",className:l()(n.caption,t)},r):null}},26579:(e,t,r)=>{r.d(t,{Z:()=>m});var n=r(71153),a=r.n(n),o=r(76134),l=r(42494),i=r(94079),s=r(24328),c=r.n(s),u=r(73086);function p(){return p=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},p.apply(this,arguments)}const m=(0,s.memo)((e=>{let{errorMessage:t,children:r,className:n,classes:s}=e,m=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["errorMessage","children","className","classes"]);const d=(0,u.y)(),g=!!t;return c().createElement(l.Z,p({className:a()(d.wrapper,n,null==s?void 0:s.root),error:!0},m),r,g&&c().createElement(i.FormHelperText,{className:a()(d.helperText,null==s?void 0:s.helperText)},c().createElement(o.Z,{message:t})))}))},73086:(e,t,r)=>{r.d(t,{y:()=>n});const n=(0,r(79692).Z)((e=>({wrapper:{width:"100%"},helperText:{margin:"3px 0 1px 12px"},caption:{display:"flex",color:e.palette.error.main,fontSize:"12px",lineHeight:"16px"}})))},27239:(e,t,r)=>{r.d(t,{Z:()=>l});var n=r(24328),a=r.n(n);const o=(0,r(79692).Z)({highlight:{fontWeight:600}}),l=e=>{let{text:t="",highlight:r="",className:n}=e;const l=o(),i=r&&t.split(new RegExp(`(${r})`,"gi"));return a().createElement("span",null,r?i.map(((e,t)=>a().createElement("span",{key:t,className:e.toLocaleLowerCase()===r.toLocaleLowerCase()?n||l.highlight:""},e))):t)}},27952:(e,t,r)=>{r.d(t,{f:()=>f,Z:()=>h});var n=r(24328),a=r.n(n),o=r(71153),l=r.n(o),i=r(80079);function s(){return s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s.apply(this,arguments)}const c=e=>a().createElement("svg",s({width:24,height:24,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},e),a().createElement("g",{stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a().createElement("path",{d:"M0 0h24v24H0z"}),a().createElement("path",{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zm-4.5-9l2.5 3.096V18H5l4.5-5.5 2.5 3.01L16.5 10zm-8-4a1.5 1.5 0 110 3 1.5 1.5 0 010-3z",fillOpacity:.12,fill:"#000",fillRule:"nonzero"})));var u=r(99493);const p=(0,r(79692).Z)((e=>({root:{position:"relative"},image:e=>{let{imageWidth:t,imageHeight:r}=e;return{width:t,height:r,objectFit:"cover",verticalAlign:"bottom"}},defaultContainer:{display:"flex",alignItems:"center",backgroundColor:"rgb(247, 247, 247)"},defaultImage:{width:"40px",height:"40px",marginLeft:"auto",marginRight:"auto",color:e.palette.text.secondary},hideImage:{display:"none"}})));function m(){return m=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},m.apply(this,arguments)}const d="loading",g="loaded",b="error",f={SMALL:{imageWidth:114,imageHeight:114},MEDIUM:{imageWidth:162,imageHeight:162},LARGE:{imageWidth:192,imageHeight:192},OVERRIDE:{imageWidth:"unset",imageHeight:"unset"}},h=(0,n.memo)((e=>{const{src:t,className:r,containerClassName:o,size:s=f.SMALL,overlay:h=null}=e,y=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["src","className","containerClassName","size","overlay"]),x=s||f.SMALL,v=p(x),[E,w]=(0,n.useState)(d);(0,n.useEffect)((()=>{w(d)}),[t]);const C=E===d,O=E===g;return E===b?a().createElement("div",m({className:l()(v.defaultContainer,v.image,r)},y),a().createElement(i.Z,{className:v.defaultImage})):a().createElement("div",{className:l()(v.root,o)},!(0,u.O27)(t)&&a().createElement("img",m({src:t,className:l()(v.image,r,{[v.hideImage]:C}),onLoad:()=>{w(g)},onError:()=>{w(b)},alt:"image"},y)),C&&a().createElement("div",m({className:l()(v.defaultContainer,v.image,r)},y),a().createElement(c,{className:v.defaultImage})),O&&h)}))},97193:(e,t,r)=>{r.d(t,{Z:()=>w});var n=r(24328),a=r.n(n),o=r(87918),l=r.n(o),i=r(17440),s=r(71153),c=r.n(s),u=r(94079),p=r(43054),m=r(22385),d=r(55847),g=r(52669),b=r(81556),f=r(79692);const h=(0,f.Z)((()=>({root:{fontSize:"24px",color:"#fff"}}))),y=e=>{let{checked:t,className:r,onClick:n}=e;const o=h(),l=t?b.Z:g.Z;return a().createElement(l,{className:c()(o.root,r),onClick:n})};var x=r(97989),v=r(31276);const E=(0,f.Z)((()=>({overlay:{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",transition:"0.2s linear all","&:not($selected):not($selectionMode):hover":{backgroundColor:"rgba(0,0,0,0.6)"},userSelect:"none"},selected:{backgroundColor:"rgba(0,114,206,0.6)"},selectionMode:{cursor:"pointer","&:not($selected)":{backgroundColor:"rgba(0,0,0,0.6)"}},button:{padding:0,width:"100px",height:"36px",color:"#fff",fontSize:"14px",fontWeight:500,lineHeight:"16px",border:"1px solid rgba(255,255,255,0.25)",backgroundColor:"rgba(98,2,238,0)"},checkedIcon:{position:"absolute",left:"4px",top:"4px",cursor:"pointer"},actions:{display:"flex",alignItems:"center",position:"absolute",top:"4px",right:"4px"},actionButton:{color:"#fff",fontSize:"24px"},dropDownMenuButton:{margin:"0 2px 0 8px"}}))),w=(0,n.memo)((e=>{const{id:t,canBeSelected:r=!1,selected:o=!1,selectionMode:s=!1,onDeselect:g=v.ZT,onSelect:b=v.ZT,onShareLink:f,onSetAsDefault:h,onDelete:w,onDownload:C=v.ZT,onClick:O}=e,T=E(),[N,S]=(0,n.useState)(!1),k=(0,n.useMemo)((()=>[{text:l().text("Share link"),onClick:f},{text:l().text("Set as default"),onClick:h},{text:l().text("Delete"),onClick:w}].filter((0,i.prop)("onClick"))),[f,h,w]),A=e=>()=>(0,i.ifElse)((0,i.equals)(!0),g,b)(e),P=r&&(o||N||s),Z=!s&&!o&&N,I=r&&o;return a().createElement("div",{className:c()(T.overlay,{[T.selected]:o,[T.selectionMode]:s}),onMouseEnter:()=>S(!0),onMouseLeave:()=>S(!1),onClick:s?A(o):e=>{e.currentTarget===e.target&&O()}},P&&a().createElement(y,{className:T.checkedIcon,checked:o,onClick:A(o)}),Z&&a().createElement("div",{className:T.actions},a().createElement(m.Z,{onClick:C,className:T.actionButton,icon:x.Z}),a().createElement(d.Z,{menuId:`image-overlay-actions-${t}`,buttonComponent:m.Z,buttonProps:{icon:p.Z,className:c()(T.actionButton,T.dropDownMenuButton)},menuItems:k})),I&&a().createElement(u.Button,{className:T.button,variant:"outlined",onClick:g},l().text("Deselect")))}))},81853:(e,t,r)=>{r.d(t,{C:()=>f,A:()=>b});var n=r(24328),a=r.n(n),o=r(87918),l=r.n(o),i=r(94079),s=r(87685),c=r(73115);function u(){return u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},u.apply(this,arguments)}const p=e=>a().createElement("svg",u({width:24,height:24,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},e),a().createElement("defs",null,a().createElement("path",{d:"M14 5a1 1 0 011 1v12a1 1 0 01-1 1H4a1 1 0 01-1-1V6a1 1 0 011-1h10zm6 12v2h-3v-2h3zm2-4v2h-5v-2h5zm0-4v2h-5V9h5zm0-4v2h-5V5h5z",id:"Details_svg__a"})),a().createElement("g",{stroke:"none",strokeWidth:1,fillRule:"evenodd"},a().createElement("mask",{id:"Details_svg__b",fill:"#fff"},a().createElement("use",{xlinkHref:"#Details_svg__a"})),a().createElement("path",{mask:"url(#Details_svg__b)",d:"M0 0h24v24H0z"})));var m=r(8818),d=r(83401);const g=(0,r(79692).Z)((()=>({paper:{backgroundColor:"rgba(0, 0, 0, .85)"},backdrop:{backgroundColor:"transparent"},toolbar:{paddingLeft:"20px",paddingRight:"20px"},appBar:{position:"relative",background:"linear-gradient(180deg, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0) 100%)"},closeButton:{marginRight:"28px"},closeIcon:{fontSize:"24px",color:"#fff"},headerLeft:{display:"flex",alignItems:"center",flex:2},headerCenter:{display:"flex",justifyContent:"center",flex:1},headerRight:{flex:2,display:"flex",justifyContent:"flex-end",alignItems:"center"},modeSwitcher:{backgroundColor:"#fff"},content:{padding:0}})));let b;!function(e){e.GALLERY_MODE="gallery",e.DETAILS_MODE="details"}(b||(b={}));const f=e=>{let{open:t,mode:r,children:o,header:u,onClose:f,onChangeMode:h}=e;const y=g(),x=(0,n.useMemo)((()=>[{id:b.GALLERY_MODE,title:l().text("Gallery"),Icon:c.Z},{id:b.DETAILS_MODE,title:l().text("Details"),Icon:p}]),[]);return a().createElement(i.Dialog,{classes:{paper:y.paper},open:t,BackdropProps:{className:y.backdrop},fullScreen:!0},a().createElement(i.AppBar,{classes:{colorPrimary:y.appBar}},a().createElement(i.Toolbar,{className:y.toolbar},a().createElement(i.Box,{className:y.headerLeft},a().createElement(m.k,{tooltipTitle:l().text("Close"),onClick:f,className:y.closeButton,iconClassName:y.closeIcon,icon:s.default}),null==u?void 0:u.left),a().createElement(i.Box,{className:y.headerCenter},a().createElement(d.Z,{modes:x,modeId:r,onChange:h,className:y.modeSwitcher})),a().createElement(i.Box,{className:y.headerRight},null==u?void 0:u.right))),a().createElement(i.DialogContent,{className:y.content},o))}},99136:(e,t,r)=>{r.d(t,{Z:()=>c});var n=r(24328),a=r.n(n),o=r(71153),l=r.n(o),i=r(94079);const s=(0,r(79692).Z)({loadingOverlay:{position:"absolute",width:"100%",height:"100%",top:0,left:0,opacity:.37,zIndex:10,backgroundColor:"#fff"},transparent:{backgroundColor:"transparent"},relativePosition:{"&$loadingOverlay":{position:"relative"}}}),c=e=>{let{transparent:t=!1,relativePosition:r=!1,className:n}=e;const o=s();return a().createElement(a().Fragment,null,a().createElement("div",{className:l()(o.loadingOverlay,n,{[o.transparent]:t,[o.relativePosition]:r})},a().createElement(i.LinearProgress,{color:"secondary"})))}},83401:(e,t,r)=>{r.d(t,{Z:()=>d});var n=r(24328),a=r.n(n),o=r(94079),l=r(71153),i=r.n(l),s=r(83348),c=r(79692),u=r(41128);const p=(0,c.Z)((e=>({button:{minWidth:"30px",padding:"8px 8px",justifyContent:"start",fill:"rgba(0,0,0,0.54)",textTransform:"none",borderColor:"rgba(0,0,0,0.12)"},icon:{color:"rgba(0,0,0,0.54)",width:"20px",height:"20px",marginRight:"8px"},title:{fontSize:"13px",lineHeight:"15px",letterSpacing:0},current:{"& $icon":{color:e.palette.primary.main},backgroundColor:(0,u.U1)(e.palette.primary.main,.12),fill:e.palette.primary.main,color:e.palette.primary.main,"&:hover":{backgroundColor:(0,u.U1)(e.palette.primary.main,.24)}}}))),m=(0,s.Z)(o.Button),d=e=>{let{className:t,classes:r={},modes:n=[],modeId:l,onChange:s}=e;const c=p();return a().createElement(o.ButtonGroup,{className:t},n.map((e=>{let{id:t,title:n,tooltipTitle:o,Icon:u}=e;return a().createElement(m,{key:String(t),className:i()(c.button,{[c.current]:l===t},r.button),tooltipTitle:o,onClick:(p=t,()=>s(p)),"data-reltio-id":`reltio-search-mode-${t}`},u&&a().createElement(u,{className:c.icon}),n&&a().createElement("div",{className:c.title},n));var p})))}},59601:(e,t,r)=>{r.d(t,{Z:()=>u});var n=r(24328),a=r.n(n),o=r(71153),l=r.n(o),i=r(94079),s=r(66130);const c=(0,r(79692).Z)((e=>{const t=e.palette.background.paper;return{popoverRoot:{backgroundColor:t,maxWidth:1e3},popper:{'&[x-placement*="bottom"] $arrow':{top:0,left:0,marginTop:"-0.71em",marginLeft:4,marginRight:4,"&::before":{transformOrigin:"0 100%"}},'&[x-placement*="top"] $arrow':{bottom:0,left:0,marginBottom:"-0.71em",marginLeft:4,marginRight:4,"&::before":{transformOrigin:"100% 0"}},'&[x-placement*="right"] $arrow':{left:0,marginLeft:"-0.71em",height:"1em",width:"0.71em",marginTop:4,marginBottom:4,"&::before":{transformOrigin:"100% 100%"}},'&[x-placement*="left"] $arrow':{right:0,marginRight:"-0.71em",height:"1em",width:"0.71em",marginTop:4,marginBottom:4,"&::before":{transformOrigin:"0 0"}}},arrow:{overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:t,"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",boxShadow:e.shadows[1],backgroundColor:"currentColor",transform:"rotate(45deg)"}}}})),u=e=>{let{anchorEl:t,placement:r="top",arrow:n=!0,open:o,onClose:u=(()=>{}),children:p,className:m,popperRef:d}=e;const g=c(),[b,f]=a().useState(null);return a().createElement(s.Z,{anchorEl:t,placement:r,className:l()(g.popper,m),modifiers:{preventOverflow:{enabled:!0,boundariesElement:"window"},arrow:{enabled:n,element:b}},open:o,modal:!1,popperRef:d},a().createElement(i.Box,null,a().createElement(i.ClickAwayListener,{onClickAway:e=>{var t;t=e.target,Array.from(document.querySelectorAll("[data-modal]")).some((e=>e.contains(t)))||u()}},a().createElement(i.Paper,{className:g.popoverRoot},n?a().createElement("span",{className:g.arrow,ref:f}):null,a().createElement(i.Box,null,p)))))}},94574:(e,t,r)=>{r.d(t,{Z:()=>v});var n=r(71153),a=r.n(n),o=r(17440),l=r(24328),i=r.n(l),s=r(87918),c=r.n(s),u=r(29611),p=r(94079),m=r(87685),d=r(21853),g=r(31276),b=r(22385),f=r(63015);function h(){return h=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},h.apply(this,arguments)}function y(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){x(e,t,r[t])}))}return e}function x(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const v=(0,l.memo)((e=>{let{value:t,autofocus:r,onSearch:n=g.ZT,rootRef:s,classes:x={},height:v,placeholder:E=c().text("Search")}=e,w=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["value","autofocus","onSearch","rootRef","classes","height","placeholder"]);const C=(0,f.y)({height:v}),[O,T]=(0,l.useState)(""),N=(0,o.pipe)((0,o.tap)(n),T),S=(0,o.isNil)(t)?O:t;return i().createElement(u.Z,h({startAdornment:i().createElement(p.InputAdornment,{position:"start"},i().createElement(d.default,{className:C.icon})),endAdornment:i().createElement(p.InputAdornment,{position:"end"},S.length>0&&i().createElement(b.Z,{icon:m.default,className:C.clearButton,onClick:()=>N("")})),autoFocus:r,classes:y({},x,{input:a()(C.input,x.input),root:a()(C.container,x.root)}),placeholder:E,value:S,onChange:(0,o.pipe)(g.NA,N),disableUnderline:!0,ref:s},w))}))},63015:(e,t,r)=>{r.d(t,{y:()=>n});const n=(0,r(79692).Z)((()=>({container:e=>{let{height:t=36}=e;return{height:t,borderRadius:"2px",alignItems:"center",backgroundColor:"rgba(0,0,0,0.03)",minWidth:"100px"}},icon:{opacity:.67,marginLeft:"10px",marginRight:"6px"},input:{fontSize:"13px",width:"100%"},clearButton:{marginRight:"10px"},white:{backgroundColor:"rgb(255, 255, 255)",boxShadow:"0 1px 3px 0 rgba(0,0,0,0.24)"}})))},97820:(e,t,r)=>{r.d(t,{Z:()=>d});var n=r(24328),a=r.n(n),o=r(71153),l=r.n(o),i=r(87918),s=r.n(i),c=r(79784),u=r(25480),p=r(94574);function m(){return m=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},m.apply(this,arguments)}const d=e=>{let{title:t,className:r,onSearch:n,hideTitle:o,hideSearchInput:i,headerPlacement:d="top",containerWidth:g,containerHeight:b,searchInputOnKeyDown:f,children:h,searchInputRef:y,anchorOrigin:x={vertical:"top",horizontal:"right"},transformOrigin:v={vertical:"top",horizontal:"right"}}=e,E=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["title","className","onSearch","hideTitle","hideSearchInput","headerPlacement","containerWidth","containerHeight","searchInputOnKeyDown","children","searchInputRef","anchorOrigin","transformOrigin"]);const w=(0,u.Z)({containerWidth:g,containerHeight:b}),C=a().createElement(a().Fragment,null,!o&&a().createElement("div",{className:w.header},t),!i&&a().createElement(p.Z,{onSearch:n,autofocus:!0,onKeyDown:f,inputRef:y,classes:{root:w.searchInputContainer},placeholder:s().text("Search & add attributes"),height:40}));return a().createElement(c.ZP,m({anchorOrigin:x,transformOrigin:v},E),a().createElement("div",{className:l()(w.container,r),style:{width:g}},"top"===d&&C,a().createElement("div",{className:w.list},h),"bottom"===d&&C))}},54763:(e,t,r)=>{r.d(t,{t:()=>l});var n=r(24328),a=r(17440),o=r(44890);const l=e=>{let{items:t,open:r,onSelectFocusedItem:l,selectedItems:i,onClose:s}=e;const[c,u]=(0,n.useState)(null),p=(0,n.useRef)(!1),m=(0,n.useCallback)((e=>{let r=null===e?m(-1):e;for(;null!==e&&r<t.length&&(r<=e||r>=0&&(0,o.c)(t[r]));)r+=1;return r!==t.length?r:m(-1)}),[t]),d=(0,n.useCallback)((e=>{let r=null===e?t.length-1:e;for(;null!==e&&r>=0&&(r>=e||(0,o.c)(t[r]));)r-=1;return r<0?t.length-1:r}),[t]),g=(0,n.useCallback)((()=>{if(!(0,a.isNil)(c)){const e=t[c].item;!e.item.notSelectable&&l({item:e.item,groupData:e})}}),[l,t,c]),b=(0,n.useCallback)((e=>{if(0!==t.length)switch(e.key){case"Down":case"ArrowDown":return u(m),e.preventDefault(),!1;case"Up":case"ArrowUp":return u(d),e.preventDefault(),!1;case"Enter":p.current=!0,g();break;case"Tab":s&&s(e);break;default:return}}),[t,m,d,g,s]);return(0,n.useEffect)((()=>{if(p.current){p.current=!1;const e=t.findIndex((e=>e.item.moveTo));e>-1&&u(e)}else u(null)}),[t,r,i]),{focusIndex:c,handleKeyDown:b}}},25480:(e,t,r)=>{r.d(t,{Z:()=>a});var n=r(79692);const a=(0,n.Z)((()=>({container:e=>{let{containerHeight:t=553,containerWidth:r}=e;return{display:"flex",flexDirection:"column",height:t,width:r,flexGrow:1}},header:{marginLeft:"16px",marginTop:"16px",marginBottom:"12px",fontSize:"16px",fontWeight:500,letterSpacing:"0.15px",lineHeight:"24px"},searchInputContainer:{margin:"0 16px 12px 16px",flexShrink:"0"},list:{flexGrow:1,height:0,overflow:"hidden",width:"100%",position:"relative","& ul":{paddingBottom:0,paddingTop:0}}})))},95629:(e,t,r)=>{r.d(t,{Z:()=>p});var n=r(24328),a=r.n(n),o=r(71153),l=r.n(o),i=r(55299),s=r(94079);const c=(0,r(79692).Z)({label:{color:"rgba(0,0,0,0.6)",fontSize:"13px",lineHeight:"15px"}});function u(){return u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},u.apply(this,arguments)}const p=e=>{let{label:t,isRequired:r,className:n}=e,o=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["label","isRequired","className"]);const p=c();return a().createElement(s.Typography,u({className:l()(p.label,n),component:"span"},o),t,r&&a().createElement(i.Z,null))}},44890:(e,t,r)=>{r.d(t,{Z:()=>d,c:()=>p});var n=r(24328),a=r.n(n),o=r(13980),l=r.n(o),i=r(50166),s=r(44443);const c=(0,r(79692).Z)({stickyTitlesWrapper:{position:"absolute",top:0,"& > div":{zIndex:1,position:"absolute",top:0,width:"100%",visibility:"hidden"}}});var u=r(56656);const p=e=>e.titleItemIndex===e.index,m=e=>{let{items:t,getItemSize:r,renderItem:o,renderGroupTitle:l,width:m="100%",height:d,fixedTitle:g=!0,itemKey:b=(e=>e),disableHorizontalScrollbar:f,hideSubtitles:h,focusIndex:y=null,onInnerContainerResize:x}=e;const v=c(),E=(0,n.useRef)(null),w=(0,n.useRef)(null),C=(0,n.useRef)(null),O=(0,n.useRef)([0]),T={topMargin:0},N=(0,n.useMemo)((()=>!h||(t||[]).some((e=>null!==e.titleItemIndex))),[t,h]),S=(0,n.useCallback)((e=>{const n=O.current.length;let a=0;t.slice(n-1,e+1).forEach(((e,t)=>{const o=n+t-1;t>0&&(O.current[o]=O.current[o-1]+a),a=r(o,e.item)}))}),[r,t]),k=(0,n.useCallback)((e=>t[e].titleItemIndex),[t]),A=(0,n.useCallback)((e=>t[e]),[t]);(0,n.useEffect)((()=>{requestAnimationFrame((()=>{E.current&&E.current.scrollTo(0)}))}),[t.length]),(0,n.useEffect)((()=>{E.current&&E.current.resetAfterIndex(0),P();const e=(e=>{const t=e.findIndex((e=>e.item.moveTo));if(t>-1){S(t);const e=k(t);return{offset:O.current[t],titleHeight:r(e,A(e).item)}}})(t);if(e&&e.offset&&E.current){const{titleHeight:t}=e,r=e.offset-t;(r<E.current.state.scrollOffset||r>E.current.state.scrollOffset+d)&&requestAnimationFrame((()=>{E.current&&E.current.scrollTo(r-(d-t)/2)}))}}),[S,A,r,k,d,O,t,E]);const P=()=>{C.current&&w.current&&(C.current.style.width=w.current.offsetWidth+"px")},Z=(0,n.useCallback)((e=>{let r=null,n=0;return t.some(((t,a)=>{S(a+10);const o=O.current[a+1];return e>=n&&e<o&&(r={index:a,offset:n,listItem:t}),n=o,r})),r}),[S,O,t]),I=(0,n.useCallback)((e=>r(e,A(e).item)),[A,r]),L=(0,n.useCallback)((e=>{let{index:t,style:r,data:n}=e;const a=A(t);return a.item&&(p(a)&&l(r,a.item)||o(r,a.item,t,n))}),[A,l,o]),{handleOnItemsRendered:j}=(0,u.LW)({items:t,focusIndex:y,listRef:E}),D=(0,n.useCallback)((()=>t.filter((e=>p(e))).map((e=>(e=>a().createElement("div",{className:"stickyTitleItem",style:{visibility:"hidden"},"data-index":e.index,key:e.index},l({height:r(e.index,e.item)},e.item)))(e)))),[r,t,l]);return a().createElement(a().Fragment,null,a().createElement("div",{ref:C,className:v.stickyTitlesWrapper},g&&D()),x&&w.current&&a().createElement(s.Z,{handleHeight:!0,onResize:x,targetDomEl:w.current}),a().createElement(i.VariableSizeList,{ref:E,itemCount:t.length,itemSize:I,width:m,height:d,itemKey:b,innerRef:w,onScroll:e=>{let{scrollOffset:n,scrollDirection:a}=e;if(!g||!N)return;const o=Z(n),l=o&&k(o.index);var i;null!==l&&(i=l,C.current&&[...C.current.querySelectorAll(".stickyTitleItem")].forEach((e=>{e.dataset.index===i.toString()?(e.style.visibility="visible",T.index=i):e.style.visibility="hidden"}))),P();const s=null!==l&&r(l,A(l).item),c=Z(n+s+T.topMargin);let u=0;if(c){switch(a){case"forward":c.offset-n>0&&p(c.listItem)&&(u=s-(c.offset-n));break;case"backward":{const e=l>-1&&(m=l,t.findIndex(((e,t)=>p(e)&&m<t))),r=(e=>(S(e),O.current[e]))(e);e>-1&&n<r&&s>=r-n&&(u=s-(r-n))}}(e=>{C.current&&(T.topMargin=-e,C.current.style.top=-e+"px")})(u)}var m},style:f?{overflowX:"hidden"}:void 0,overscanCount:5,onItemsRendered:j},L))};m.propTypes={items:l().arrayOf(l().object).isRequired,getItemSize:l().func.isRequired,renderItem:l().func.isRequired,width:l().oneOfType([l().number,l().string]),height:l().number.isRequired,renderGroupTitle:l().func,fixedTitle:l().bool,hideSubtitles:l().bool,itemKey:l().func,disableHorizontalScrollbar:l().bool,focusIndex:l().number,onInnerContainerResize:l().func};const d=m},56656:(e,t,r)=>{r.d(t,{LG:()=>o,LW:()=>l});var n=r(17440),a=r(24328);const o=e=>{const t=e=>(0,n.flatten)(e.map((e=>[e].concat(e.items?t(e.items):[]))));let r=null;return t(e).map(((e,t)=>(e&&e.items&&(r=t),{item:e,index:t,titleItemIndex:r})))},l=e=>{let{focusIndex:t,listRef:r,items:n}=e;const o=(0,a.useRef)(null),l=(0,a.useRef)(null),i=(0,a.useCallback)((e=>{let{visibleStartIndex:t,visibleStopIndex:r}=e;o.current=t,l.current=r}),[]);return(0,a.useEffect)((()=>{r.current&&null!==t&&0!==n.length&&(t<Math.max(o.current+3,0)?r.current.scrollToItem(Math.max(t-3,0),"start"):t>Math.min(l.current-3,n.length-1)&&r.current.scrollToItem(Math.min(t+3,n.length-1),"end"))}),[t,n.length,r]),{handleOnItemsRendered:i}}},95974:(e,t,r)=>{r.d(t,{Z:()=>c});var n=r(24328),a=r.n(n),o=r(71153),l=r.n(o);const i="1px solid #AFD4E9",s=(0,r(79692).Z)({decorator:{marginLeft:8,borderLeft:i,"&:last-child":{borderLeft:"none","&:before":{borderLeft:i}},"&:before":{top:0,height:14,width:5,borderBottom:i,content:'""',display:"block",left:"0"},"&$plain":{"&:before":{width:0}}},plain:{},wrapper:{marginLeft:16,marginTop:-8}}),c=e=>{let{className:t,children:r,plain:n=!1,enabled:o=!1}=e;const i=s();return o?a().createElement("div",{className:l()(i.decorator,{[i.plain]:n},t)},a().createElement("div",{className:i.wrapper},r)):a().createElement(a().Fragment,null,r)}},40932:(e,t,r)=>{r.d(t,{Z:()=>he});var n=r(24328),a=r.n(n),o=r(52730),l=r(44443),i=r(94079),s=r(87638),c=r(99493),u=r(69891),p=r(17440),m=r(45203),d=r(15762),g=r(71153),b=r.n(g),f=r(27952),h=r(22385),y=r(79692);const x=(0,y.Z)((e=>({root:{display:"flex",alignContent:"center",flexDirection:"column"},main:{position:"relative",padding:"0 86px",marginTop:"auto"},mainImageContainer:{display:"flex",alignContent:"center",height:"100%",width:"100%"},mainImage:{maxWidth:"calc(100vw - 512px)",maxHeight:"calc(100vh - 192px)",margin:"0 auto",userSelect:"none"},arrowButton:{backgroundColor:e.palette.divider,color:"white","&:hover":{backgroundColor:e.palette.divider}},arrowButtonPrev:{position:"absolute",top:"50%",left:"16px",transform:"translateY(-50%)"},arrowButtonNext:{position:"absolute",top:"50%",right:"16px",transform:"translateY(-50%)"}}))),v=(0,y.Z)((()=>({thumbnails:{marginLeft:"12px",marginBottom:"12px",marginTop:"auto",width:"calc(100vw - 364px)",overflowX:"auto",overflowY:"hidden"},gridContainer:{width:"100%"},thumb:{width:"96px",height:"96px",cursor:"pointer",userSelect:"none"},inactiveThumb:{filter:"brightness(0.5)"}}))),E=e=>{let{attributeValues:t,setAttributeValueIndex:r,attributeValueIndex:o}=e;const l=v(),s=(0,n.useRef)(null);return(0,n.useEffect)((()=>{if(null!=s&&s.current){const e=s.current.scrollLeft,t=s.current.offsetWidth+e,r=96*o+16*o+12;t<r?s.current.scroll&&(r>t+96+16?s.current.scroll(r,0):s.current.scroll(112+e,0)):e+96>r&&s.current.scroll&&s.current.scroll(r-96,0)}}),[o,s]),a().createElement("div",{ref:s,className:l.thumbnails},a().createElement(i.Grid,{container:!0,wrap:"nowrap",direction:"row",spacing:1,className:l.gridContainer},t.map(((e,t)=>{let{uri:n,value:s}=e;return a().createElement(i.Grid,{item:!0,key:n},a().createElement(f.Z,{onClick:()=>r(t),className:b()(l.thumb,{[l.inactiveThumb]:o!==t}),src:(0,c.efz)({value:s})}))}))))},w=e=>{let{className:t,attributeValues:r,attributeValueIndex:n,setAttributeValueIndex:o}=e;const l=x(),i=r[n],s=(0,c.QXK)(i);return a().createElement("div",{className:b()(l.root,t)},a().createElement("div",{className:l.main},n>0&&a().createElement(h.Z,{icon:m.Z,className:b()(l.arrowButton,l.arrowButtonPrev),onClick:()=>{o(n-1)},size:"XL"}),a().createElement(f.Z,{containerClassName:l.mainImageContainer,className:l.mainImage,size:s&&f.f.OVERRIDE,src:s}),n!==r.length-1&&a().createElement(h.Z,{icon:d.Z,className:b()(l.arrowButton,l.arrowButtonNext),onClick:()=>{o(n+1)},size:"XL"})),a().createElement(E,{attributeValues:r,attributeValueIndex:n,setAttributeValueIndex:o}))};var C=r(87918),O=r.n(C),T=r(33016),N=r(36138),S=r(63459),k=r(95038),A=r.n(k);const P={get CreationTime(){return O().text("Creation Time")},get CreationDate(){return O().text("Creation Date")},get Dimensions(){return O().text("Dimensions")},get MimeType(){return O().text("Mime Type")},get Size(){return O().text("Size")},get Url(){return O().text("Full image URL (S3)")},get UrlPreview(){return O().text("Preview image URL (S3)")},get UrlThumbnail(){return O().text("Small image URL (S3)")},get CdnUrl(){return O().text("Full image URL (CDN)")},get CdnUrlPreview(){return O().text("Preview image URL (CDN)")},get CdnUrlThumbnail(){return O().text("Small image URL (CDN)")}},Z=function(){let{value:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return["Url","UrlPreview","UrlThumbnail","CdnUrl","CdnUrlPreview","CdnUrlThumbnail","MimeType"].includes(t)?(0,p.path)([t,0,"value"],e):"CreationDate"===t&&(0,p.path)(["CreationTimestamp",0,"value"],e)?A()(e.CreationTimestamp[0].value).format("MM-DD-YYYY"):"CreationTime"===t&&(0,p.path)(["CreationTimestamp",0,"value"],e)?A()(e.CreationTimestamp[0].value).format("HH:mm:ss"):"Dimensions"===t&&(0,p.path)(["Height",0,"value"],e)&&(0,p.path)(["Width",0,"value"],e)?`${e.Height[0].value} x ${e.Width[0].value} ${O().text("pixels")}`:"Size"===t&&(0,p.path)(["Size",0,"value"],e)?`${(Number(e.Size[0].value)/1e3).toFixed(2)} KB`:void 0},I=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.filter((e=>{let{system:t}=e;return!t}))},L=(e,t)=>{const{includeNames:r=[],excludeNames:n=[],order:a=[]}=t,o=r.length?e.filter((e=>r.includes(e))):e.filter((e=>!n.includes(e)));return 0===a.length?o:o.sort(((e,t)=>{const r=a.indexOf(e),n=a.indexOf(t);return-1===r&&-1!==n?1:-1===n&&-1!==r?-1:r-n}))},j=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0;const n=I(t.attributes);return L(Object.keys(e.value||{}),r).reduce(((t,r)=>{const a=n.find((e=>{let{name:t}=e;return t===r}));return a?[...t,{attrType:a,values:e.value[r]}]:t}),[])},D=e=>["Url","UrlPreview","UrlThumbnail","CdnUrl","CdnUrlPreview","CdnUrlThumbnail"].includes(e),R=(0,y.Z)({title:{marginBottom:"10px",color:"white",fontSize:"18px",lineHeight:"21px","&$canAdd":{marginBottom:"3px"}},divider:{width:"100%",height:"1px",background:"rgba(255,255,255,0.12)"},canAdd:{}}),V=e=>{let{attributeType:t,onAddAttributes:r,uri:o}=e;const l=R(),s=I(t.attributes),c=Boolean(r);return a().createElement(i.Box,null,a().createElement(i.Typography,{className:b()(l.title,{[l.canAdd]:c})},O().text("Meta info")),c&&a().createElement(n.Fragment,null,a().createElement(S.Z,{label:O().text("Attributes"),data:s,dense:!1,onApply:e=>{r&&r(e.map((e=>({attributeType:e,parentUri:o}))))}}),a().createElement(i.Divider,{className:l.divider})))};var B=r(24625);const M=(0,y.Z)((e=>({root:{fontSize:"13px",letterSpacing:0,lineHeight:"15px",marginBottom:"11px"},title:{color:"rgba(255,255,255,0.54)",marginRight:"12px",float:"left"},content:{color:"rgba(255,255,255,0.87)",wordWrap:"break-word"},link:{color:e.palette.primary.main,textDecoration:"none"}}))),U=e=>{let{title:t,content:r,isLink:n,children:o}=e;const l=M();return a().createElement("div",{className:l.root},a().createElement("span",{className:l.title},t),n?a().createElement("a",{className:l.link,href:r},O().text("link")):a().createElement("span",{className:l.content},r||o))},z=(0,y.Z)({root:{padding:"10px 0"},title:{color:"rgba(255,255,255,0.54)",fontSize:"13px"},content:{color:"rgba(255,255,255,0.87)",wordWrap:"break-word"}}),_=e=>{let{attributeValue:t,attributeType:r,imageAttributeFieldsOrder:n}=e;const l=z(),c=(0,o.useSelector)(s.ZP.selectors.getIsViewMode),u=(p=t,m=n,L(Object.keys(P),m).map((e=>Z(p,e)?{title:P[e],value:Z(p,e),isLink:D(e)}:null)).filter(Boolean));var p,m;const d=j(t,r,n);return a().createElement(i.Box,{className:l.root},u.map((e=>{let{title:t,value:r,isLink:n}=e;return a().createElement(U,{key:t,isLink:n,title:t,content:r})})),c&&d.map((e=>{let{attrType:r,values:n}=e;return a().createElement(B.Z,{key:r.uri,attributeType:r,drawLines:!1,values:n,titleClassName:l.title,contentClassName:l.content,parentUri:t.uri})})))};var H=r(57161);const W=(0,y.Z)({root:{},form:{padding:"10px 0"},divider:{width:"100%",height:"1px",background:"rgba(255,255,255,0.12)"},actions:{display:"flex",justifyContent:"flex-end",marginTop:"4px"},cancelButton:{color:"white",marginRight:"8px"}}),F=e=>{let{attributeType:t,imageAttributeFieldsOrder:r,attributeValue:n,hasChanges:o,onDeleteAttribute:l,onChangeAttribute:s,onAddAttributes:u,onCancel:p,onApply:m,mode:d}=e;const g=W(),b=j(n,t,r),f=0!==b.length||0===b.length&&o;return a().createElement(i.Box,{className:g.root},a().createElement(i.Box,{className:g.form},b.map((e=>{let{attrType:t,values:r}=e;return a().createElement(H.ZP,{key:t.uri,parentUri:n.uri,attributeType:t,values:r,showEmptyEditors:(0,c.ZiX)(n.uri),mode:d,drawLines:!1,onDeleteAttribute:l,onChangeAttribute:s,onAddAttributes:u})}))),f&&a().createElement(a().Fragment,null,a().createElement(i.Divider,{className:g.divider}),a().createElement(i.Box,{className:g.actions},a().createElement(i.Button,{disabled:!o,onClick:p,className:g.cancelButton},O().text("Cancel")),a().createElement(i.Button,{disabled:!o,onClick:m,color:"primary"},O().text("Apply")))))};var q=r(39450);const Y={palette:{type:"dark",primary:c.rSc.palette.primary,secondary:c.rSc.palette.secondary}},$=(0,T.Z)(Y),G=e=>{let{imageAttributeFieldsOrder:t,attributeType:r,attributeValue:l}=e;const{addAttributes:u,changeAttribute:m,deleteAttribute:d,clearLocalChanges:g,applyLocalChanges:b,attributeValue:f,hasChanges:h}=(e=>{let{initialAttributeValue:t,attributeType:r}=e;const a=(0,o.useDispatch)(),l=(0,n.useContext)(q.m),[i,u]=(0,n.useState)(t);(0,n.useEffect)((()=>{u(t)}),[t]);const m=!(0,p.equals)(i,t),d=(0,n.useCallback)((e=>{u((t=>e.reduce(((e,t)=>{const{attributeType:r,parentUri:n,index:a}=t;return(0,c.tPT)({entity:e,attributeType:r,parentUri:n,index:a,nestingLevel:1})}),t)))}),[]),g=(0,n.useCallback)((e=>{let{value:t,attributeType:r,uri:n}=e;u((e=>(0,c.ww$)({entity:e,attributeType:r,uri:n,value:t,nestingLevel:1})))}),[]),b=(0,n.useCallback)((e=>{let{attributeType:t,uri:r}=e;u((e=>(0,c.d$I)({entity:e,attributeType:t,uri:r,nestingLevel:1})))}),[]);return{addAttributes:d,changeAttribute:g,deleteAttribute:b,clearLocalChanges:(0,n.useCallback)((()=>{u(t)}),[t]),applyLocalChanges:(0,n.useCallback)((()=>{a(s.N5.actions.modifyAttribute({value:i,attributeType:r,uri:i.uri,viewId:l}))}),[i,r,l,a]),attributeValue:i,hasChanges:m}})({attributeType:r,initialAttributeValue:l}),y=(0,o.useSelector)(s.ZP.selectors.getMode),x=(0,o.useSelector)(s.ZP.selectors.getIsEditableMode);return a().createElement(N.ThemeProvider,{theme:$},a().createElement(i.Box,null,a().createElement(V,{attributeType:r,uri:null==f?void 0:f.uri,onAddAttributes:x?u:void 0}),a().createElement(_,{attributeType:r,attributeValue:f,imageAttributeFieldsOrder:t}),x&&a().createElement(F,{mode:y,imageAttributeFieldsOrder:t,attributeType:r,attributeValue:f,hasChanges:h,onDeleteAttribute:d,onChangeAttribute:m,onAddAttributes:u,onCancel:g,onApply:b})))},X=(0,y.Z)((e=>({root:{position:"relative",backgroundColor:"#333",maxHeight:"calc(100vh - 64px)",overflow:"hidden"},header:{display:"flex",alignItems:"center",height:"56px",paddingLeft:"16px",boxShadow:`0 1px 0 0 ${e.palette.divider}`},headerTitle:{color:"rgba(255, 255, 255, 0.87)",fontSize:"16px",lineHeight:"19px"},bodyWrapper:{maxHeight:"calc(100% - 56px)",overflow:"auto"},body:{padding:"16px"},formControlLabel:{marginLeft:0,marginBottom:"27px"},checkboxLabel:{marginLeft:"8px",color:"rgba(255,255,255,0.87)",fontSize:"13px",lineHeight:"15px"},checkbox:{color:"white",padding:0}}))),K=e=>{let{className:t,attributeValue:r,handleSetAsDefault:l,attributeType:c}=e;const u=X(),p=(0,o.useSelector)(s.ZP.selectors.getEntity)||{},m=(0,o.useSelector)((e=>s.ZP.selectors.getModifiedEntity(e,null==p?void 0:p.uri)))||{},d=(0,o.useSelector)(s.ZP.selectors.getIsViewMode)?p:m,g=(0,o.useSelector)(s.ZP.selectors.getImageAttributesFieldsOrder)||{},f=g[null==p?void 0:p.type]||(null==g?void 0:g.default)||{},[h,y]=(0,n.useState)(!1);(0,n.useEffect)((()=>{y((null==d?void 0:d.defaultProfilePic)===(null==r?void 0:r.uri))}),[null==r?void 0:r.uri,d]);const x=(0,n.useCallback)((()=>{l(r.uri)}),[null==r?void 0:r.uri]);return a().createElement(i.Box,{className:b()(u.root,t)},a().createElement(i.Box,{className:u.header},a().createElement(i.Typography,{className:u.headerTitle},O().text("Details"))),a().createElement(i.Box,{className:u.bodyWrapper},a().createElement(i.Box,{className:u.body},a().createElement(i.FormControlLabel,{classes:{root:u.formControlLabel,label:u.checkboxLabel},control:a().createElement(i.Checkbox,{className:u.checkbox,checked:h,onChange:x,color:"default"}),label:O().text("Set as default")}),a().createElement(G,{attributeType:c,imageAttributeFieldsOrder:f,attributeValue:r}))))},Q=(0,y.Z)((()=>({root:{display:"flex",width:"100%",overflowY:"auto",height:"calc(100vh - 64px)"},main:{flex:"1 0 auto"},details:{width:"340px"}}))),J=e=>{let{attributeValues:t=[],currentAttributeValueUri:r,setCurrentAttributeValueUri:o,handleSetAsDefault:l,attributeType:s}=e;const[c,u]=(0,n.useState)(0);(0,n.useEffect)((()=>{p(r?t.findIndex((e=>e.uri===r)):0)}),[r,t]);const p=(0,n.useCallback)((e=>{var r;u(e),o(null===(r=t[e])||void 0===r?void 0:r.uri)}),[t]),m=Q();return a().createElement(i.Box,{className:m.root},a().createElement(w,{attributeValueIndex:c,setAttributeValueIndex:p,attributeValues:t,className:m.main}),a().createElement(K,{handleSetAsDefault:l,attributeValue:t[c],className:m.details,attributeType:s}))};var ee=r(81853),te=r(97193);const re=(0,y.Z)((()=>({root:{padding:"0 24px",overflowY:"auto",height:"calc(100vh - 64px)"},item:{padding:"2px"}}))),ne=e=>{let{items:t,selectedItems:r,onSelectImage:n,onDeselectImage:o,onShareLink:l,onSetAsDefault:s,onDownload:c,onClickImage:u,onDelete:p}=e;const m=re(),d=e=>a().createElement(te.Z,{id:e,selected:r.includes(e),selectionMode:0!==r.length,onSelect:()=>n(e),onDeselect:()=>o(e),onShareLink:()=>l(e),onSetAsDefault:()=>s(e),onDownload:()=>c(e),onClick:()=>u(e),onDelete:p?()=>p(e):void 0,canBeSelected:!0});return a().createElement(i.Box,{className:m.root},a().createElement(i.Grid,{container:!0},t.map((e=>{let{id:t,src:r}=e;return a().createElement(i.Grid,{key:t,classes:{item:m.item},item:!0},a().createElement(f.Z,{size:f.f.LARGE,onClick:()=>u(t),src:r,overlay:d(t)}))}))))},ae=(0,y.Z)((e=>({selectButton:{fontSize:"14px",fontWeight:500,color:e.palette.primary.main,textTransform:"uppercase"}}))),oe=e=>{let{selectedItems:t,items:r,onSelectAll:n,onClearAll:o}=e;const l=ae(),s=t.length===r.length;return a().createElement(i.Link,{component:"button",underline:"none",classes:{button:l.selectButton},onClick:s?o:n},s?O().text("Clear selection"):O().text("Select all images"))};var le=r(94438),ie=r(22983),se=r(35292),ce=r(97989),ue=r(8818);const pe=(0,y.Z)((()=>({downloadButton:{color:"#fff",fontSize:"24px",marginLeft:"30px"},shareButton:{color:"#fff",fontSize:"24px",marginLeft:"21px"},deleteButton:{color:"#fff",fontSize:"24px",marginLeft:"24px"},divider:{height:"31px",width:"1px",marginLeft:"10px",backgroundColor:"rgba(255,255,255,0.38)"}}))),me=e=>{let{onDownload:t,onShare:r,onUpload:n,onDelete:o}=e;const l=pe();return a().createElement(a().Fragment,null,n&&a().createElement(i.Button,{variant:"contained",color:"primary",onClick:n,startIcon:a().createElement(le.Z,null)},O().text("Upload")),t&&n&&a().createElement("div",{className:l.divider}),t&&a().createElement(ue.k,{className:l.downloadButton,tooltipTitle:O().text("Download selected items"),icon:ce.Z,onClick:t}),r&&a().createElement(ue.k,{className:l.shareButton,tooltipTitle:O().text("Copy link"),icon:se.Z,onClick:r}),o&&a().createElement(ue.k,{className:l.deleteButton,tooltipTitle:O().text("Delete selected items"),icon:ie.Z,onClick:o}))},de=e=>{let{attributeValues:t,open:r,onClose:l,currentAttributeValueUri:i,setCurrentAttributeValueUri:u,attributeType:m,onDownload:d,onShareLink:g,onSetAsDefault:b,onUpload:f,onDeleteAttribute:h}=e;const[y,x]=(0,n.useState)([]),[v,E]=(0,n.useState)(ee.A.GALLERY_MODE),w=(0,o.useSelector)(s.ZP.selectors.getIsViewMode);(0,n.useEffect)((()=>{E(i?ee.A.DETAILS_MODE:ee.A.GALLERY_MODE)}),[i]);const C=t.map((e=>({src:(0,c.efz)(e),downloadURL:(0,c.Q5d)(e),id:e.uri}))),O=e=>{g(C.find((0,p.propEq)("id",e)).downloadURL)},T=e=>{const r=t.find((t=>{let{uri:r}=t;return r===e}));b(r)},N=e=>{h({uri:e,attributeType:m})},S=v===ee.A.GALLERY_MODE,k=v===ee.A.DETAILS_MODE,A=y.length>0,P=k||S&&A,Z=!w&&P,I=!w&&(k||S&&!A),L=S&&A&&a().createElement(oe,{items:C,selectedItems:y,onClearAll:()=>{x([])},onSelectAll:()=>{x((0,p.pluck)("id",C))}}),j=a().createElement(me,{onDelete:Z?()=>{(S?y:[i]).forEach((e=>{N(e)})),y.length&&x([])}:void 0,onDownload:P?()=>{const e=S?(0,p.pipe)((0,p.filter)((e=>{let{id:t}=e;return y.includes(t)})),(0,p.pluck)("downloadURL"))(C):[C.find((0,p.propEq)("id",i)).downloadURL];d(e)}:void 0,onShare:k?()=>{O(i)}:void 0,onUpload:I?f:void 0});return a().createElement(ee.C,{mode:v,open:r,onChangeMode:E,header:{left:L,right:j},onClose:l},S&&a().createElement(ne,{items:C,selectedItems:y,onSelectImage:e=>{x((t=>[...t,e]))},onDeselectImage:e=>{x((t=>t.filter((t=>t!==e))))},onShareLink:O,onSetAsDefault:T,onDownload:e=>{d([C.find((0,p.propEq)("id",e)).downloadURL])},onClickImage:e=>{u(e),E(ee.A.DETAILS_MODE)},onDelete:w?void 0:N}),k&&a().createElement(J,{handleSetAsDefault:T,setCurrentAttributeValueUri:u,currentAttributeValueUri:i,attributeValues:t,attributeType:m}))};var ge=r(95117);const be=(0,y.Z)((e=>({imageBox:{position:"relative",display:"flex",width:"100%",flexGrow:1,flexShrink:0,flexWrap:"nowrap",marginTop:"2px",overflow:"hidden"},moreButtonContainer:e=>{let{imageWidth:t,imageHeight:r}=e;return{backgroundColor:"white",width:t,height:r,position:"absolute",right:0,cursor:"pointer"}},moreButton:t=>{let{imageWidth:r,imageHeight:n}=t;return{display:"flex",justifyContent:"center",alignItems:"center",width:r,height:n,backgroundColor:(0,i.fade)(e.palette.primary.main,.06)}},number:{color:e.palette.primary.main,fontSize:"24px",lineHeight:"42px",letterSpacing:0,textAlign:"center",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}})));function fe(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const he=e=>{let{attributeType:t,attributeValues:r=[],renderImage:p,overlay:m=!1,countFixedItems:d=0,children:g,onUpload:b,onDeleteAttribute:f,imageSize:h=ge.By,paging:y,parentUri:x,showNonOv:v,requestNextPageOfAttributeValues:E}=e;const w=(0,o.useSelector)(s.ZP.selectors.getEntity)||{},C=(0,o.useSelector)(s.ZP.selectors.getIsViewMode),O=(0,o.useDispatch)(),T=be(h);(0,n.useEffect)((()=>{if(y&&E){const e=v?y.totalOvValues:y.totalValues;e>r.length&&E({parentUri:x,attributeTypeUri:t.uri,attributeTypeName:t.name,values:[],defaultMaxValues:e})}}),[y,E,t,x,r.length,v]);const N=(0,n.useRef)(),[S,k]=(0,n.useState)(0),[A,P]=(0,n.useState)(0),Z=(0,n.useContext)(u.P),[I,L]=(0,n.useState)(!1),[j,D]=(0,n.useState)(),R=(0,n.useCallback)((e=>{const{imageMargin:t,imageWidth:n}=h,a=Math.floor((e+t)/(n+t))-d,o=e+t-(a+d)*(n+t)<ge.lc;k(a),r.length>a?P(r.length-a+(o?1:0)):P(0)}),[r.length,d,h]),V=(0,n.useCallback)((e=>{R(e),N.current=e}),[R]);(0,n.useEffect)((()=>{N.current&&R(N.current)}),[r.length,R]);const B=(0,n.useCallback)((e=>{Z||(D(e),L(!0))}),[Z]),M=(0,n.useCallback)((()=>{L(!1)}),[]),U=e=>(e=>{e.forEach(((e,t)=>{try{if((e=>!!(e=>e.indexOf("://")>0||0===e.indexOf("//"))(e)&&new URL(e).host!==location.host)(e)){const r=document.createElement("iframe");r.setAttribute("style","display: none;"),r.setAttribute("src",e),document.body.appendChild(r),setTimeout((()=>document.body.removeChild(r)),3e4*(t+1))}else{const t=document.createElement("a");t.href=e,t.download=(e=>e.split("/").pop())(e),document.body.appendChild(t),t.click(),document.body.removeChild(t)}}catch(e){console.error(e)}}))})(e),z=e=>navigator.clipboard.writeText(e),_=(0,n.useCallback)((e=>{C?(0,c.YL3)(w.uri,e.uri).then((t=>{let{status:r}=t;"success"===r&&O(s.N5.entity.actions.setDefaultProfilePic(e))})):O(s.N5.modifiedEntities.actions.setDefaultProfilePic({entityUri:w.uri,value:e}))}),[C,w.uri,O]),H=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){fe(e,t,r[t])}))}return e}({onOpenImageGalleryDialog:B},m&&{onDownload:U,onShareLink:z,onSetAsDefault:_});return a().createElement(a().Fragment,null,a().createElement(l.Z,{handleWidth:!0,onResize:V}),a().createElement(de,{attributeValues:r,open:I,onClose:M,setCurrentAttributeValueUri:D,currentAttributeValueUri:j,attributeType:t,onDownload:U,onShareLink:z,onSetAsDefault:_,onUpload:b,onDeleteAttribute:f}),a().createElement("div",{className:T.imageBox},g,r.slice(0,S).map(p(H)),A>0&&a().createElement("div",{className:T.moreButtonContainer},a().createElement("div",{className:T.moreButton,onClick:()=>B()},a().createElement(i.Typography,{className:T.number},`+${A}`)))))}},95117:(e,t,r)=>{r.d(t,{lc:()=>l,By:()=>i});var n=r(27952);const a=n.f.SMALL.imageWidth,o=n.f.SMALL.imageHeight,l=8,i={imageMargin:4,imageWidth:a,imageHeight:o}},91181:(e,t,r)=>{r.d(t,{Z:()=>h});var n=r(24328),a=r.n(n),o=r(13980),l=r.n(o),i=r(71153),s=r.n(i),c=r(94079),u=r(99493),p=r(79692),m=r(41128);const d=(0,p.Z)((e=>({container:{height:"16px",borderColor:(0,m.U1)(e.palette.primary.main,.54)},label:{paddingLeft:"4px",paddingRight:"4px",fontSize:"10px",lineHeight:"11px",color:e.palette.primary.main}})));var g=r(72768);const b=(0,r(83348).Z)(c.Chip),f=e=>{let{className:t,attributeType:r,nonOvValues:n=[],nonOvTotal:o}=e;const l=d();if(!o)return null;const i=n.length?n.map(((e,t)=>a().createElement("div",{key:t},(0,u.YkM)(r)?(0,u.idV)(e.label):a().createElement(g.Z,{value:(0,u.kDl)(e),dataTypeDefinition:(0,u.PFL)(r),rich:!1})))):null;return a().createElement(b,{tooltipTitle:i,tooltipPlacement:"top",label:`+ ${o}`,variant:"outlined",classes:{root:s()(l.container,t),label:l.label}})};f.propTypes={className:l().string,nonOvTotal:l().number,attributeType:u.EMD,nonOvValues:l().arrayOf(l().oneOfType([u.cNQ,u.dMV,u.Rtp]))};const h=f},50763:(e,t,r)=>{r.d(t,{m:()=>N});var n=r(24328),a=r.n(n),o=r(52730),l=r(94079),i=r(87638),s=r(99493),c=r(17440),u=r(60995);const p=(e,t,r,n)=>{const a=((e,t)=>{const r=t.find((t=>t.uri===e.uri));return r&&Array.isArray(r.children)?r.children:[]})(e,r);let o=(null==e?void 0:e.attributes)||(null==e?void 0:e.analyticsAttributes)||[];return a.length&&(o=o.filter((e=>a.includes(e.uri)))),o.reduce(((e,a)=>{const o=m(t[a.name],n,r);return o&&o.length&&(Array.isArray(o[0])?e.push({[a.uri]:o[0]}):e.push({[a.uri]:o})),e}),[])},m=(e,t,r)=>{if(e&&0!==e.length)return e.reduce(((e,n)=>{if("type"in n&&n.type){const a="lookupCode"in n?n.lookupCode:n.value,o=(0,s.zeJ)(t,n.type);a&&"object"!=typeof a&&(0,s.OXP)(n)?e.push(d(a,o)):a&&"object"==typeof a&&!Array.isArray(a)&&e.push(p(o,a,r,t))}return e}),[])},d=(e,t)=>{switch(null==t?void 0:t.type){case s.oS0.TYPE_DATE:return new Date(e).getTime();case s.oS0.TYPE_TIMESTAMP:return isNaN(Number(e))?new Date(e).getTime():new Date(Number(e)).getTime();default:return e}};function g(){return g=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},g.apply(this,arguments)}const b=e=>a().createElement("svg",g({width:11,height:11,viewBox:"0 0 11 11"},e),a().createElement("path",{d:"M2.514 5h2.314V3l2.5 2.5-2.5 2.5V6h-3.8a4.5 4.5 0 10.73-3H.6a5.5 5.5 0 11-.577 3H0V5H2.514z",fill:"#6CACE4",stroke:"none",strokeWidth:1,fillRule:"evenodd"}));var f=r(87918),h=r.n(f),y=r(53180),x=r(31039),v=r(67218),E=r(79692);const w=(0,E.Z)((e=>({container:{backgroundColor:"white",width:"360px",minWidth:"360px",maxWidth:"720px"},header:{display:"flex",height:"48px",alignItems:"center",justifyContent:"space-between",paddingLeft:"16px"},title:{color:e.palette.text.primary,fontSize:"16px",letterSpacing:"0.15px",lineHeight:"19px"},entityTypeLabel:{color:"rgba(0,0,0,0.67)",fontSize:"14px",paddingLeft:"16px",paddingBottom:"12px",lineHeight:"16px"},divider:{height:"24px",width:"1px",backgroundColor:"rgba(0,0,0,0.12)"},headerCount:{color:e.palette.text.secondary,fontSize:"14px",letterSpacing:"0.24px",lineHeight:"28px",width:"210px"},body:{borderBottom:"1px solid rgba(0,0,0,0.12)",padding:"0 16px 8px"},footer:{display:"flex",alignItems:"center",height:"31px",paddingLeft:"16px",color:e.palette.primary.main,fontSize:"13px",letterSpacing:"0",lineHeight:"15px"},profileIcon:{height:"16px",width:"16px"},entityContainer:{display:"flex",flexDirection:"row",alignItems:"center"},entityLabel:{color:e.palette.primary.main,fontSize:"13px",letterSpacing:"0",lineHeight:"15px",textDecoration:"none",paddingLeft:"8px"},icon:{margin:"auto 8px auto 0"},content:{color:e.palette.primary.main,cursor:"pointer"},seeAllButton:{cursor:"pointer"}}))),C=(0,E.Z)({tooltip:{backgroundColor:"white",boxShadow:"0 4px 5px 0 rgba(0,0,0,0.14), 0 1px 10px 0 rgba(0,0,0,0.12), 0 2px 4px -1px rgba(0,0,0,0.2)",padding:0,borderRadius:"4px",maxWidth:"none"},arrow:{"&::before":{backgroundColor:"white"}}});function O(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const T=e=>{let{value:t,attributeType:r,config:l={},onSeeAllClick:c}=e;const[u,p]=(0,n.useState)([]),[m,d]=(0,n.useState)(0),g=(0,o.useSelector)(i.ZP.selectors.getEntity)||{},b=(0,v._)(),f=w(),E=(0,o.useSelector)(i.ZP.selectors.getGlobalSearchRequestOptions)||{},C=l.entityType||g.type,T=m>6;(0,n.useEffect)((()=>{const e=(0,s.BlA)({value:t,attributeType:r,entityType:C}),n=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){O(e,t,r[t])}))}return e}({max:6},E);b(Promise.all([(0,s.ZOr)(e,n),(0,s.j_Q)(e,n)])).then((e=>{const[t,{total:r}]=e;p(Array.isArray(t)?t:[]),d(r)})).catch((()=>{p([]),d(0)}))}),[]);const N=Boolean(l.label);return a().createElement("div",{className:f.container},a().createElement("div",{className:f.header},a().createElement("div",{className:f.title},h().text("Pivot profiles")),a().createElement("div",{className:f.divider}),a().createElement("div",{className:f.headerCount},h().number(m,"0,0")+" "+(1===m?h().text("item"):h().text("items")))),N&&a().createElement("div",{className:f.entityTypeLabel},l.label),a().createElement("div",{className:f.body},u.map((e=>a().createElement("div",{key:e.uri,className:f.entityContainer},a().createElement(y.Z,{entity:e,avatarClassName:f.profileIcon}),a().createElement(x.Z,{className:f.entityLabel,value:(0,s.wwR)(e)},(0,s.idV)(e.label)))))),T&&a().createElement("div",{className:f.footer},a().createElement("a",{className:f.seeAllButton,onClick:c},h().text("See all"))))},N=e=>{let{value:t,attributeType:r,children:m,className:g}=e;const f=C(),h=w(),y=(0,o.useDispatch)(),x=(0,n.useContext)(u.J)||[],v=(0,s.QZu)(r),E=(0,o.useSelector)(i.ZP.selectors.getMetadata)||{},O=v?p(r,t.value,x,E):d(t.lookupCode||t.value,r),N=x.some((e=>{let{uri:t}=e;return t===r.uri}))&&(Array.isArray(O)&&O.length||!Array.isArray(O)&&!(0,c.isNil)(O)),S=x.find((e=>{let{uri:t}=e;return t===r.uri})),k=()=>{const e=Array.isArray(O)?O.map((e=>Object.fromEntries(Object.entries(e).map((e=>{let[t,r]=e;return[(0,s.nIW)(t),r]}))))):((e,t)=>[{[e.name]:t}])(r,O);y(i.ui.actions.openPivotingPerspective({value:e,attributeType:r}))};return N?a().createElement(l.Tooltip,{interactive:!0,arrow:!0,placement:"right-start",classes:f,title:a().createElement(T,{value:O,attributeType:r,config:S.popup,onSeeAllClick:k})},a().createElement("span",{className:g},a().createElement(b,{className:h.icon}),a().createElement("span",{className:h.content,onClick:k},m))):a().createElement(a().Fragment,null,m)}},96698:(e,t,r)=>{r.d(t,{Z:()=>u});var n=r(24328),a=r.n(n),o=r(99493),l=r(39462),i=r(62630),s=r(2163);function c(){return c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},c.apply(this,arguments)}const u=e=>{const{attributeType:t}=e;return class{static build(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{showEmptyEditors:r,onAddAttributes:n,lazy:u,errors:p,crosswalks:m,showNonOv:d}=t,g=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(t,["showEmptyEditors","onAddAttributes","lazy","errors","crosswalks","showNonOv"]);switch(e.type){case o.oS0.TYPE_NESTED:return a().createElement(i.Z,t);case o.oS0.TYPE_REFERENCE:return a().createElement(s.Z,t);default:return a().createElement(l.Z,c({isReltioCrosswalk:(0,o.KVV)(m,t.attributeValue)},g))}}}.build(t,e)}},91262:(e,t,r)=>{r.d(t,{Z:()=>x});var n=r(24328),a=r.n(n),o=r(13980),l=r.n(o),i=r(87918),s=r.n(i),c=r(99493),u=r(17440),p=r(57161),m=r(95974),d=r(63459),g=r(78836),b=r(8261);var f=r(66784);function h(){return h=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},h.apply(this,arguments)}const y=e=>{let{attrTypes:t,entity:r,parentUri:o,showEmptyEditors:l,mode:i,crosswalks:y,drawLines:x,children:v,className:E,alwaysVisibleTypeUris:w=g.S,onAddAttributes:C,onChangeAttribute:O,onDeleteAttribute:T,additionalControlsRenderer:N,showNonOv:S}=e;const{attributes:k={}}=r,A=(0,n.useMemo)((()=>(0,c._kX)(i,t)),[t,i]),P=((e,t)=>e.filter((e=>{const r=((e,t)=>{const{attributes:r={},analyticsAttributes:n={}}=t;return(0,u.cond)([[c.kqr,(0,u.always)(t)],[(0,u.both)(c.kQw,(0,u.always)(n)),(0,u.always)(n)],[u.T,(0,u.always)(r)]])(e)})(e,t),n=(e=>(0,c.kqr)(e)?"uri":"name")(e);return!((e.singleValue||(0,c.ian)(e)||(0,c.VFZ)(e))&&(0,u.has)(e[n])(r))})))(A,r),Z=(0,n.useContext)(f.c),I=(0,n.useMemo)((()=>(0,c.Gtj)(t,i,r,l,S,Z)),[t,i,r,l,S,Z]),[L,j]=(0,n.useMemo)((()=>(0,b.A)(w,I)),[I,w]),D=(0,n.useCallback)((e=>{C(e.map((e=>({attributeType:e,parentUri:o}))))}),[C,o]),R={enabled:x};return a().createElement("div",{className:E},v&&a().createElement(m.Z,R,v),a().createElement(m.Z,h({},R,{plain:!0}),A.length>0&&a().createElement(d.Z,{label:s().text("More attributes"),onApply:D,dense:x,data:P})),j.concat(L).map((e=>{let{attrType:t,values:r}=e;return a().createElement(p.ZP,{key:t.uri,attributeType:t,drawLines:x,values:r,paging:(0,u.path)(["paging",t.uri],k),parentUri:o,showEmptyEditors:l,mode:i,crosswalks:y,onAddAttributes:C,onChangeAttribute:O,onDeleteAttribute:T,additionalControlsRenderer:N,showNonOv:S})})))};y.propTypes={attrTypes:l().array,entity:l().object,parentUri:l().string,children:l().node,showEmptyEditors:l().bool,mode:c.XGc,crosswalks:l().array,drawLines:l().bool,showNonOv:l().bool,className:l().string,alwaysVisibleTypeUris:l().array,onAddAttributes:l().func,onChangeAttribute:l().func,onDeleteAttribute:l().func,additionalControlsRenderer:l().func};const x=(0,n.memo)(y)},93140:(e,t,r)=>{r.d(t,{Z:()=>v});var n=r(24328),a=r.n(n),o=r(99493),l=r(94079),i=r(17440),s=r(51201),c=r(87918),u=r.n(c);const p=e=>u().text("${value}",{value:1===e?u().text("value"):u().text("values")}),m=(0,i.has)("minValue"),d=(0,i.has)("maxValue"),g=(0,i.pipe)(d,i.not),b=(0,i.propSatisfies)((e=>1===e),"minValue"),f=e=>{let{minValue:t}=e;return u().text("This attribute can have minimum ${minValue} ${minValueCaption}",{minValue:u().number(t,"0"),minValueCaption:p(t)})},h=e=>{let{maxValue:t}=e;return u().text("This attribute can have maximum ${maxValue} ${maxValueCaption}",{maxValue:u().number(t,"0"),maxValueCaption:p(t)})},y=(0,i.cond)([[i.isNil,(0,i.always)("")],[e=>{let{minValue:t,maxValue:r}=e;return t&&t===r},e=>{let{minValue:t}=e;return u().text("This attribute should have ${minValue} ${minValueCaption}",{minValue:u().number(t,"0"),minValueCaption:p(t)})}],[(0,i.allPass)([b,d]),h],[(0,i.allPass)([b,g]),(0,i.always)("")],[(0,i.allPass)([m,d]),e=>{let{minValue:t,maxValue:r}=e;return u().text("${minCardinality} and maximum ${maxValue} ${maxValueCaption}",{minCardinality:f({minValue:t}),maxValue:u().number(r,"0"),maxValueCaption:p(r)})}],[d,h],[m,f],[i.T,(0,i.always)("")]]),x=e=>{let{cardinality:t}=e;const r=(0,s.y)();return a().createElement(l.Typography,{variant:"caption",className:r.caption},y(t))};x.propTypes={cardinality:o.oA3};const v=x},57161:(e,t,r)=>{r.d(t,{ZP:()=>W});var n=r(52730),a=r(87638),o=r(99493),l=r(24328),i=r.n(l),s=r(17440),c=r(95974),u=r(24338),p=r(76134),m=r(95629),d=r(12437),g=r(48554),b=r(96698),f=r(93140),h=r(51201);const y=(0,s.filter)((0,s.propSatisfies)(o.ZiX,"uri"));var x=r(66784),v=r(91181);const E=e=>{let{max:t,values:r,attributeType:n,parentUri:a,mode:u,drawLines:E,showEmptyEditors:w,errorMessage:C,errors:O,paging:T,crosswalks:N,showNonOv:S,nonVisibleValues:k,onAddAttributes:A,onDeleteAttribute:P,onChangeAttribute:Z,onDeactivateError:I,additionalControlsRenderer:L,requestNextPageOfAttributeValues:j}=e;const D=(0,h.y)(),[R,V]=(0,l.useState)(t),[B,M]=(0,l.useState)(!1),{label:U,required:z,cardinality:_,name:H,uri:W}=n,F=(0,o.KIu)(u),q=(0,l.useContext)(x.c),Y=(0,l.useMemo)((()=>null==q?void 0:q.includes(W)),[W,q]),$=(0,o.O27)(r),G=(!B&&w||z||Y)&&$,X=(0,l.useRef)((0,o.gjI)({parentUri:a,attributeType:n})),K=(0,l.useCallback)((()=>{V(R+1);const e={parentUri:a,index:R,attributeType:n};return A(G&&!(0,o.YkM)(n.type)?[e,e]:[e])}),[R,A,a,n,G]),Q=(0,l.useCallback)((0,s.pipe)(P,s.T,M),[P,M]);if($&&!G)return null;if(G&&$&&(r=[X.current]),(0,o.O27)(r))return null;const J=(y(r)||[]).length,ee=S?"totalValues":"totalOvValues",te=(0,s.ifElse)((0,s.has)(ee),(0,s.pipe)((0,s.prop)(ee),(0,s.add)(J)),(0,s.always)(r.length))(T),re=null!=T&&T.totalValues?T.totalValues-te:null==k?void 0:k.length,ne=t<te,ae=ne&&R<te,oe=ne&&R>=te,le=r.slice(0,R),ie=le?le.length-1:0,se=te-R;return i().createElement(c.Z,{enabled:E},i().createElement("div",{className:D.wrapper},i().createElement("div",{className:D.titleWrapper},i().createElement(m.Z,{label:U,isRequired:z,className:D.title,"data-reltio-id":"reltio-attribute-label"}),i().createElement(v.Z,{nonOvValues:k,attributeType:n,className:D.ovIcon,nonOvTotal:re})),F&&i().createElement(f.Z,{cardinality:_}),F&&i().createElement(p.Z,{message:C,className:D.typeError}),i().createElement("div",{className:D.attributesWrapper},le.map(((e,t)=>i().createElement(b.Z,{key:e.uri,attributeValue:e,attributeType:n,lazy:G&&!z,showEmptyEditors:w,errors:O,ownError:(0,o.ADq)(e,t,n.uri,O),mode:u,crosswalks:N,onAddOneMore:ie===t?K:null,onAddAttributes:A,onDeleteAttribute:Q,onChangeAttribute:Z,onDeactivateError:I,additionalControlsRenderer:L}))),ae&&i().createElement(g.Z,{moreNumber:(0,s.min)(t,se),valueNumber:se,onClick:()=>{r.length<te&&j({parentUri:a,attributeTypeUri:W,attributeTypeName:H,values:r,defaultMaxValues:t}),V(R+t)}}),oe&&i().createElement(d.Z,{onClick:()=>{V(t)}}))))};var w=r(94079),C=r(31517),O=r(82455),T=r(79692);const N=(0,T.Z)({container:{display:"flex",flex:1,alignItems:"flex-start",marginBottom:"10px"},roleContainer:{width:"100%"},valueContainer:{marginLeft:"8px",width:0},deleteButton:{marginLeft:"8px"}});var S=r(22385),k=r(22983);const A={MultiValue:O.Z},P=e=>{let{values:t,onChange:r,onDelete:c}=e;const u=N(),p=(0,n.useSelector)(a.ZP.selectors.getMetadata),m=(0,n.useSelector)(a.ZP.selectors.getEntity),d=m.uri,g=(0,o.JvE)(p,m.type).map((e=>({value:e.uri,label:e.label}))),b=(t||[]).map((e=>{var t;return{value:e,label:(null===(t=g.find((0,s.propEq)("value",e)))||void 0===t?void 0:t.label)||(0,o.nIW)(e)}})),f=(0,l.useCallback)((e=>{const t=(null==e?void 0:e.map((0,s.prop)("value")))||[];r({value:t,attributeType:o.xPW.roles,uri:d})}),[d,r]),h=(0,l.useCallback)((()=>{c({uri:d,attributeType:o.xPW.roles})}),[d,c]);return i().createElement("div",{className:u.container,"data-reltio-id":"reltio-attribute-value"},i().createElement(C.Z,{label:"",height:40,isMulti:!0,options:g,value:b,onChange:f,components:A,classes:u,className:u.roleContainer}),!!c&&i().createElement(S.Z,{className:u.deleteButton,icon:k.Z,onClick:h,size:"L"}))};var Z=r(39331);const I=(0,T.Z)({container:{display:"flex",flex:1,alignItems:"flex-start",marginBottom:"10px"},deleteButton:{marginLeft:"8px"}}),L=e=>e?`?filter=${(0,o.Uqd)()((e=>[{filter:"containsWordStartingWith",fieldName:"tags",values:[e]}])(e))}`:"",j=[{fieldName:"tags",orderType:"reversedCount"}],D=e=>(0,o.FK9)({query:L(e),body:j}).then((e=>Object.keys(e.tags))),R=e=>{let{className:t,values:r,onChange:s,onDelete:c}=e;const u=I(),p=(0,n.useSelector)(a.ZP.selectors.getEntityUri),m=(0,l.useCallback)((e=>{s({value:e,attributeType:o.xPW.tags,uri:p})}),[s,p]),d=(0,l.useCallback)((()=>{c({uri:p,attributeType:o.xPW.tags})}),[p,c]);return i().createElement("div",{className:u.container,"data-reltio-id":"reltio-attribute-value"},i().createElement(Z.Z,{fullWidth:!0,multiple:!0,variant:"filled",className:t,value:r||[],onChange:m,getSuggestions:D}),!!c&&i().createElement(S.Z,{className:u.deleteButton,icon:k.Z,onClick:d,size:"L"}))};function V(){return V=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},V.apply(this,arguments)}function B(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const M=e=>{let{values:t,attributeType:r,parentUri:n,mode:a,errorMessage:c,onDeleteAttribute:u,onChangeAttribute:d,showEmptyEditors:g}=e,y=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["values","attributeType","parentUri","mode","errorMessage","onDeleteAttribute","onChangeAttribute","showEmptyEditors"]);const x=(0,h.y)(),{label:v,required:E,cardinality:C}=r,O=(0,o.KIu)(a),[T,N]=(0,l.useState)(!1),S=(0,l.useCallback)((0,s.pipe)(u,s.T,N),[u,N]),k=(0,o.O27)(t),A=!T&&g&&k,Z=(0,l.useRef)((0,o.gjI)({parentUri:n,attributeType:r}));return(0,o.j2U)(r)&&k&&!A?null:i().createElement(w.Box,{className:x.wrapper},i().createElement(m.Z,{label:v,isRequired:E,className:x.title,"data-reltio-id":"reltio-attribute-label"}),O&&i().createElement(f.Z,{cardinality:C}),O&&i().createElement(p.Z,{message:c}),i().createElement(w.Box,{className:x.attributesWrapper},(()=>{switch(r.uri){case o.xPW.tags.uri:return i().createElement(R,{values:t,onDelete:S,onChange:d});case o.xPW.roles.uri:return i().createElement(P,{values:t,onDelete:S,onChange:d});default:{const e=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){B(e,t,r[t])}))}return e}({},Z.current,{value:t[0]||""});return i().createElement(b.Z,V({attributeValue:e,attributeType:r,mode:a,onDeleteAttribute:S,onChangeAttribute:d},y))}}})()))};function U(){return U=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},U.apply(this,arguments)}var z;!function(e){e.imageLine="imageLine",e.special="special",e.default="default"}(z||(z={}));const _=(0,l.memo)((e=>{let{values:t,attributeType:r,mode:n=o.ARY.Viewing,crosswalks:a,drawLines:l,paging:p={},parentUri:d,errors:g,errorMessage:b,max:f=1/0,showEmptyEditors:y,showNonOv:x,onAddAttributes:v,onDeleteAttribute:w,onChangeAttribute:C,onDeactivateError:O,additionalControlsRenderer:T,requestNextPageOfAttributeValues:N}=e;const S=(0,h.y)(),k=(0,s.partition)(o.OXP),[A,P]=k(t),Z=x?t:A,I=x?[]:P,L={errorMessage:b,errors:g,mode:n,parentUri:d,onAddAttributes:v,onDeleteAttribute:w,onChangeAttribute:C,onDeactivateError:O,additionalControlsRenderer:T,showEmptyEditors:y};return(()=>{switch((0,s.cond)([[o.kqr,(0,s.always)(z.special)],[o.Or$,(0,s.always)(z.imageLine)],[s.T,(0,s.always)(z.default)]])(r)){case z.special:return i().createElement(c.Z,{enabled:l},i().createElement(M,U({values:Z,attributeType:r},L)));case z.imageLine:return i().createElement(c.Z,{enabled:l},i().createElement("div",{className:S.wrapper},i().createElement(m.Z,{label:null==r?void 0:r.label,"data-reltio-id":"reltio-attribute-label"}),i().createElement(u.Z,{attributeValues:Z,attributeType:r,paging:p,onDeleteAttribute:w,parentUri:d,onChangeAttribute:C,requestNextPageOfAttributeValues:N,showNonOv:x})));default:return i().createElement(E,U({values:Z,attributeType:r,max:f,paging:p,crosswalks:a,drawLines:l,requestNextPageOfAttributeValues:N,showNonOv:x,nonVisibleValues:I},L))}})()})),H={requestNextPageOfAttributeValues:a.N5.actions.requestNextPageOfAttributeValues,onDeactivateError:a.N5.errors.actions.errorDeactivated},W=(0,n.connect)(((e,t)=>{let{parentUri:r,attributeType:n,max:l}=t;return{errors:a.ZP.selectors.getActiveErrorsForAttributesPager(e,r,n),errorMessage:(0,o.tQX)(r,n,a.ZP.selectors.getProfileErrors(e)),max:l||a.ZP.selectors.getDefaultMaxValues(e)}}),H)(_)},51201:(e,t,r)=>{r.d(t,{y:()=>n});const n=(0,r(79692).Z)((e=>({caption:{fontSize:"0.7rem",opacity:.54},wrapper:{display:"flex",flexDirection:"column",alignItems:"flex-start"},attributesWrapper:{width:"100%",marginBottom:"10px"},link:{display:"flex",marginTop:4},"svg-icon__root":{fontSize:"1rem"},title:{fontSize:"12px",lineHeight:"14px",paddingLeft:"12px",color:e.palette.text.secondary},typeError:{marginLeft:"12px"},ovIcon:{marginLeft:"8px",marginTop:"-1px",textIndent:0},titleWrapper:{flex:1,paddingBottom:"3px"}})))},77325:(e,t,r)=>{r.d(t,{Z:()=>E});var n=r(24328),a=r.n(n),o=r(13980),l=r.n(o),i=r(71153),s=r.n(i),c=r(94079),u=r(22385),p=r(22983),m=r(87918),d=r.n(m),g=r(99493);const b=(0,r(79692).Z)((e=>({editor:{display:"flex",flex:1,height:"36px",alignItems:"center"},label:{flex:1,marginLeft:"2px",marginTop:"2px",fontSize:"13px",lineHeight:"15px"},actions:{display:"flex",alignItems:"center"},titleContainer:{display:"flex",flex:1,minHeight:"20px"},expandButton:{marginTop:"2px"},deleted:{color:e.palette.text.secondary,textDecoration:"line-through"},editedLabel:{fontStyle:"italic",color:e.palette.text.secondary},errorWrapperHelperText:{marginLeft:0}})));var f=r(26579),h=r(91262),y=r(19592);function x(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const v=e=>{let{label:t,attributeTypesList:r,attributeType:o,attributeValue:l,children:i,errors:m,ownError:x,mode:v,metadata:E,crosswalks:w,lazy:C,showEmptyEditors:O,onAddOneMore:T,onAddAttributes:N,onDeleteAttribute:S,onChangeAttribute:k,additionalControlsRenderer:A,hideDeleteButton:P,state:Z,showNonOv:I}=e;const L=b(),j="deleted"===Z,D="edited"===Z,R=l.uri,V=(0,g.ZiX)(R),[B,M]=(0,n.useState)(V),U=(0,n.useMemo)((()=>(0,g.xv5)({attributeType:o,attributeValue:l,mode:v,metadata:E,isReltioCrosswalk:(0,g.KVV)(w,l)})),[o,l,v,E,w]),z=!j&&!P&&!!S&&U,_=(0,n.useMemo)((()=>(0,g.J6q)(l,m)),[m,l]);(0,n.useEffect)((()=>{_&&M(!0)}),[m,_]),(0,n.useEffect)((()=>{j&&M(!1)}),[j]);const H=(r||[]).some((e=>(0,g.kQw)(e))),W=(0,n.useMemo)((()=>({attributes:H?null:l.value,analyticsAttributes:H?l.value:null})),[l,H]),F=(0,g.e$p)(x)||_&&d().text("Has an incorrect value")||"";return C?a().createElement(c.Button,{variant:"text",color:"primary",onClick:T},"Create attribute"):a().createElement(a().Fragment,null,a().createElement("div",{className:L.editor},a().createElement("div",{className:L.titleContainer},a().createElement(y.Z,{onClick:()=>M((e=>!e)),expanded:B,className:L.expandButton,disabled:j}),a().createElement(f.Z,{errorMessage:F,classes:{helperText:L.errorWrapperHelperText}},a().createElement("div",{className:s()(L.label,{[L.deleted]:j}),"data-reltio-id":"reltio-attribute-complex-label"},t))),a().createElement("div",{className:L.actions},D&&a().createElement(c.Typography,{variant:"caption",className:L.editedLabel},"(",d().text("edited"),")"),A&&A({attributeType:o,attributeValue:l}),z&&a().createElement(u.Z,{icon:p.Z,onClick:()=>S({uri:R,attributeType:o,attributeValue:l}),size:"L"}))),B&&a().createElement(h.Z,{attrTypes:r,entity:W,showEmptyEditors:O||V,drawLines:!0,parentUri:R,mode:v,crosswalks:w,onAddAttributes:N,onChangeAttribute:k,onDeleteAttribute:S,additionalControlsRenderer:A,showNonOv:I},i))};v.propTypes=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){x(e,t,r[t])}))}return e}({label:l().string,children:l().node,attributeTypesList:l().arrayOf(g.EMD),attributeValue:l().oneOfType([g.dMV,g.Rtp])},g.KVe);const E=v},31588:(e,t,r)=>{r.d(t,{Z:()=>b});var n=r(52730),a=r(87638),o=r(24328),l=r.n(o),i=r(13980),s=r.n(i),c=r(91262),u=r(99493);const p=e=>e&&e.attributes,m=e=>{let{entity:t,entityType:r,attributeTypesSelectionStrategy:n=p,mode:a,onAddAttributes:i,onDeleteAttribute:s,onChangeAttribute:u}=e;const m=(0,o.useMemo)((()=>n(r)),[n,r]);return t?l().createElement(c.Z,{key:t.uri,attrTypes:m,entity:t,showEmptyEditors:!0,drawLines:!0,parentUri:t.uri,mode:a,crosswalks:t.crosswalks,onAddAttributes:i,onChangeAttribute:u,onDeleteAttribute:s}):null};m.propTypes={entityUri:s().string,parentUri:s().string,entity:s().object,entityType:s().object,attributeTypesSelectionStrategy:s().func,mode:u.XGc,onAddAttributes:s().func,onDeleteAttribute:s().func,onChangeAttribute:s().func};const d=m,g={onAddAttributes:a.N5.actions.addAttributes,onDeleteAttribute:a.N5.actions.removeAttribute,onChangeAttribute:a.N5.actions.modifyAttribute},b=(0,n.connect)(((e,t)=>({entity:t.entityUri&&a.ZP.selectors.getModifiedEntity(e,t.entityUri)})),g)(d)},81077:(e,t,r)=>{r.d(t,{Z:()=>F});var n=r(24328),a=r.n(n),o=r(13980),l=r.n(o),i=r(87918),s=r.n(i),c=r(17440),u=r(99493),p=r(24737),m=r(31254),d=r(94079),g=r(79692);const b=(0,g.Z)({entityContainer:{display:"flex",alignItems:"center",height:"32px",minHeight:"32px",padding:0},entityLabel:{height:"15px",fontSize:"13px",color:"rgba(0,0,0,0.87)",cursor:"pointer",lineHeight:"15px",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"},emptyEntityLabel:{height:"15px",fontSize:"13px",color:"rgba(0,0,0,0.6)",lineHeight:"15px",marginLeft:"16px",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",cursor:"default"},entityAvatar:{transform:"scale(0.5)",marginLeft:"8px",marginRight:"11px"},entitySecondaryLabel:{color:"rgba(0,0,0,0.6)"}}),f=(0,g.Z)((e=>({singleValue:{color:"rgba(0, 0, 0, 0.87)",fontSize:"14px",paddingTop:"18px",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},linkValue:{cursor:"pointer",color:e.palette.primary.main,textDecoration:"none"}}))),h=(0,g.Z)((e=>({addLabel:{color:e.palette.primary.main,display:"flex",fontWeight:"500",cursor:"pointer",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"},groupHeading:{fontSize:"13px",height:"36px",padding:"0 16px",display:"flex",justifyContent:"space-between",alignItems:"center",backgroundColor:"rgba(0, 0, 0, 0.03)"},addIcon:{height:"18px",width:"18px",padding:"0 9px"}}))),y=(0,g.Z)({clearIcon:{cursor:"pointer",height:"20px",width:"20px"}});function x(){return x=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},x.apply(this,arguments)}const v=e=>{let{innerRef:t,innerProps:r,selectOption:n,data:o}=e;const l=b(),{uri:i,entityType:c,label:u,secondaryLabel:p}=o;return""!==i?a().createElement(d.MenuItem,x({className:l.entityContainer,ref:t,key:i,onClick:()=>n({label:u,uri:i,entityType:c})},r),a().createElement(m.Z,{className:l.entityAvatar,entityType:c}),a().createElement("span",{className:l.entityLabel},u,p&&a().createElement("span",{className:l.entitySecondaryLabel},", ",p))):a().createElement(d.MenuItem,x({className:l.entityContainer,ref:t,key:i},r,{disabled:!0}),a().createElement("span",{className:l.emptyEntityLabel},s().text("No results found")))};v.propTypes={innerRef:l().oneOfType([l().oneOf([null]),l().func,l().shape({current:l().any.isRequired})]),innerProps:l().object.isRequired,selectOption:l().func.isRequired,data:l().shape({uri:l().string.isRequired,label:l().string.isRequired,entityType:u.pyR.isRequired})};const E=v;var w=r(71153),C=r.n(w),O=r(52730),T=r(87638),N=r(39450);const S=e=>{const{selectProps:{currentEntityType:t,menuIsOpen:r,disableLinkClick:o},children:l,data:i}=e,p=f(),m=(0,O.useDispatch)(),g=(0,n.useContext)(N.m),b=(0,O.useSelector)(T.ZP.selectors.getUIPath),h=(0,u.ZiX)(i.entityUri)?{className:p.singleValue,component:"span"}:{className:C()(p.singleValue,p.linkValue),onMouseDown:e=>{e.stopPropagation(),o||(0,c.pipe)((0,c.always)({uri:i.entityUri,viewId:g}),T.ui.actions.openEntity,m)()},onClick:e=>e.preventDefault(),href:(0,u.ChB)({uiPath:b,uri:i.entityUri}),component:"a"};return!r&&a().createElement(d.Typography,h,(0,u.ZiX)(i.entityUri)?s().text(`New ${t.label} will be created`):(0,u.idV)(l))};S.propTypes={children:l().string,data:l().object.isRequired,selectProps:l().object.isRequired};const k=S;var A=r(33375);const P=e=>{const{selectProps:{onClear:t}}=e,r=y();return a().createElement(d.IconButton,{onClick:t},a().createElement(A.Z,{className:r.clearIcon}))};P.propTypes={selectProps:l().object.isRequired};const Z=P;var I=r(31588),L=r(31276),j=r(92391),D=r(65549);const{Group:R}=j.F,V=e=>{const{selectProps:{inputValue:t,onCreate:r},data:n,children:o}=e,l=h();return a().createElement(R,e,a().createElement("div",{className:l.groupHeading},a().createElement("span",null,n.label),r&&a().createElement("span",{onClick:()=>r(t,n.entityType),className:l.addLabel},a().createElement(D.Z,{className:l.addIcon}),s().text(`Create ${t?`"${t}" as `:""}new ${n.label}`))),o)};V.propTypes={selectProps:l().object.isRequired,data:l().object,children:l().array};const B=V,M=(0,g.Z)({creatorWrapper:{marginTop:"20px"}});function U(){return U=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},U.apply(this,arguments)}function z(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function _(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){H(e,t,r[t])}))}return e}function H(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const W=e=>{let{entity:t={},entityTypesUris:r=[],mode:o,max:l,onChange:i,onCreate:m,metadata:d,globalSearchRequestOptions:g,attributeTypesSelectionStrategy:b,disableLinkClick:f=!1}=e,h=z(e,["entity","entityTypesUris","mode","max","onChange","onCreate","metadata","globalSearchRequestOptions","attributeTypesSelectionStrategy","disableLinkClick"]);const y=M(),[x,v]=(0,n.useState)(""),w=(0,n.useMemo)((()=>r.map((e=>(0,u.nt9)(d,e)))),[r,d]),C=[{filter:"equals",fieldName:"type",values:r.map(u.nIW)}],O=_({},g,{max:l}),T=m?(e,t)=>{m(t||r[0],e),v("")}:void 0,N=e=>{null!==e&&(v(""),i(e))},S=(0,n.useMemo)((()=>1!==w.length),[w]),A=((0,c.isEmpty)(t)?w[0]:(0,u.nt9)(d,t.entityType))||{},P=m&&s().text(`Create ${x?`"${x}" as `:""}new ${A.label}`),j=s().text(`Select ${1===w.length?`${w[0].label} `:""}profile`),D=!(0,c.isEmpty)(t)&&(0,u.ZiX)(t.entityUri),R=S?{Group:B,GroupHeading:L.Vd}:{},V=D?{ClearIndicator:Z}:{},{TextFieldProps:H}=h,W=z(h,["TextFieldProps"]),F=(0,n.useMemo)((()=>_({},H||{},{"data-reltio-id":"reltio-entity-selector"})),[H]);return a().createElement(a().Fragment,null,a().createElement(p.Z,U({value:(0,c.isEmpty)(t)?void 0:t,inputValue:x,onInputChange:e=>{v(e)},getOptions:e=>(0,u.ZOr)(C,O,e).then(((e,t)=>r=>{const n=r.map((t=>_({},t,{label:(0,u.idV)(t.label),entityType:e.find((e=>{let{uri:r}=e;return r===t.type}))}))),a=e=>(0,c.isEmpty)(e)?[{label:"",uri:"",entityType:{}}]:e,o=t?e:e.filter((e=>n.some((t=>t.type===e.uri))));return o.length>1?o.map((e=>({label:e.label,entityType:e.uri,options:a(n.filter((t=>t.type===e.uri)))}))):a(n)})(w,m)),getOptionLabel:(0,c.prop)("entityLabel"),onChange:N,onCreate:T,onClear:()=>{N({})},label:j,createLabel:P,components:_({Option:E,SingleValue:k},R,V),currentEntityType:A,isClearable:!0,disableLinkClick:f,TextFieldProps:F},W)),D&&a().createElement("div",{className:y.creatorWrapper},a().createElement(I.Z,{mode:o,attributeTypesSelectionStrategy:b,entityType:A,entityUri:t.entityUri})))};W.propTypes={entity:u.oZZ,entityTypesUris:l().arrayOf(l().string),max:l().number,mode:u.XGc,dispatch:l().func,metadata:u.pGS,onChange:l().func.isRequired,onCreate:l().func,attributeTypesSelectionStrategy:l().func,globalSearchRequestOptions:l().object,disableLinkClick:l().bool};const F=W},24338:(e,t,r)=>{r.d(t,{Z:()=>_});var n=r(24328),a=r.n(n),o=r(52730),l=r(94438),i=r(87638),s=r(99493),c=r(27952),u=r(97193),p=r(22385),m=r(87918),d=r.n(m),g=r(13896),b=r(58651),f=r(94079),h=r(99136),y=r(79692);const x=(0,y.Z)((e=>({root:{width:"328px"},paper:{width:"100%",height:"40px",display:"flex",alignItems:"center",boxShadow:"none",backgroundColor:"rgba(0,0,0,0.03)"},inputRoot:{flex:1},input:{padding:"0 12px",fontSize:"14px","&:placeholder":{color:e.palette.text.secondary}},errorMessage:{marginTop:"8px",fontSize:"12px",color:e.palette.error.main}}))),v=e=>0===e.trim().length,E=e=>{let{onSend:t}=e;const r=x(),[o,l]=(0,n.useState)(""),[i,s]=(0,n.useState)(null);return a().createElement(f.Box,{className:r.root},a().createElement(f.Paper,{className:r.paper},a().createElement(f.InputBase,{value:o,onChange:e=>{const t=e.target.value,r=new RegExp(/^(ftp|http|https):\/\/[^ "]+$/).test(t);l(t),r||v(t)?s(null):s(d().text("URL is not correct"))},classes:{root:r.inputRoot,input:r.input},placeholder:d().text("Paste an image URL here")}),a().createElement(f.Button,{disabled:Boolean(i)||v(o),variant:"outlined",color:"primary",onClick:()=>{t(o),l(""),s(null)}},d().text("Send"))),i&&a().createElement(f.Typography,{className:r.errorMessage},i))};var w=r(71153),C=r.n(w),O=r(83997);const T=["image/png","image/jpeg","image/tiff","image/gif","image/bmp"],N=e=>{let{className:t,onAppendFile:r}=e;return a().createElement(a().Fragment,null,a().createElement("input",{onInput:e=>{r&&r(e.currentTarget.files[0])},style:{display:"none"},accept:T.join(","),id:"upload-image-button",type:"file"}),a().createElement("label",{htmlFor:"upload-image-button"},a().createElement(f.Button,{className:t,variant:"contained",color:"primary",component:"span"},d().text("Select image"))))};function S(){return S=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},S.apply(this,arguments)}const k=e=>a().createElement("svg",S({width:256,height:256,viewBox:"0 0 256 256",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},e),a().createElement("defs",null,a().createElement("linearGradient",{x1:"50%",y1:"0%",x2:"50%",y2:"100%",id:"UploadIcon_svg__c"},a().createElement("stop",{stopColor:"#FFF",offset:"0%"}),a().createElement("stop",{stopColor:"#FFF",stopOpacity:0,offset:"100%"})),a().createElement("linearGradient",{x1:"50%",y1:"0%",x2:"50%",y2:"100%",id:"UploadIcon_svg__d"},a().createElement("stop",{stopColor:"#FFF",offset:"0%"}),a().createElement("stop",{stopColor:"#FFF",stopOpacity:0,offset:"100%"})),a().createElement("linearGradient",{x1:"67.572%",y1:"54.952%",x2:"15.212%",y2:"13.907%",id:"UploadIcon_svg__e"},a().createElement("stop",{stopColor:"#000",stopOpacity:0,offset:"0%"}),a().createElement("stop",{stopColor:"#000",offset:"100%"})),a().createElement("linearGradient",{x1:"50%",y1:"0%",x2:"50%",y2:"100%",id:"UploadIcon_svg__f"},a().createElement("stop",{stopColor:"#B8EDFF",offset:"0%"}),a().createElement("stop",{stopColor:"#53ACDE",offset:"100%"})),a().createElement("circle",{id:"UploadIcon_svg__a",cx:128,cy:128,r:128})),a().createElement("g",{stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a().createElement("mask",{id:"UploadIcon_svg__b",fill:"#fff"},a().createElement("use",{xlinkHref:"#UploadIcon_svg__a"})),a().createElement("use",{fillOpacity:.1,fill:"#0072CE",xlinkHref:"#UploadIcon_svg__a"}),a().createElement("g",{mask:"url(#UploadIcon_svg__b)"},a().createElement("g",{strokeWidth:1,fill:"none",transform:"translate(-1 9)"},a().createElement("path",{d:"M0 107.268c0 35.579 28.703 64.409 64.173 64.409h139.021c29.578 0 53.497-24.035 53.497-53.635 0-28.356-21.935-51.562-49.705-53.515C199.577 27.705 167.2 0 128.346 0 97.425 0 70.59 17.582 57.171 43.274 25.027 46.767 0 74.117 0 107.268z",fill:"#FFF",opacity:.3}),a().createElement("ellipse",{fill:"url(#UploadIcon_svg__c)",opacity:.4,cx:64.553,cy:107.664,rx:61.43,ry:62.336}),a().createElement("path",{d:"M127.979 8.91c38.773 0 70.206 31.895 70.206 71.24 0 39.346-31.433 71.241-70.206 71.241-6.067 0-11.954-.78-17.57-2.249 9.688-11.019 15.574-25.551 15.574-41.478 0-33.7-26.352-61.153-59.286-62.299C78.714 23.611 101.654 8.91 127.98 8.91z",fill:"url(#UploadIcon_svg__d)",opacity:.4})),a().createElement("path",{fill:"url(#UploadIcon_svg__e)",opacity:.12,d:"M82.093 128.474l38.374 37.966-10.666 18.958 72.714 71.94 63.578-57.537v-6.11l-71.107-70.352H97.22z",transform:"translate(-1 9)"}),a().createElement("path",{fill:"url(#UploadIcon_svg__f)",d:"M151.004 128.29v57.591h-40.836V128.29H81l49.5-49.409L180 128.29z",transform:"translate(-1 9)"})))),A=(0,y.Z)((e=>({root:{padding:"36px 0 29px"},isActive:{backgroundColor:"rgba(0,114,206,0.12)"},icon:{width:"190px",height:"190px",marginBottom:"24px"},title:{marginBottom:"8px",color:e.palette.text.primary,fontSize:"20px",fontWeight:500,lineHeight:"24px"},description:{marginBottom:"24px",color:e.palette.text.secondary,fontSize:"14px",lineHeight:"16px"}}))),P=e=>{let{onAppendFile:t,className:r}=e;const n=A(),[{canDrop:o,isOver:l},i]=(0,g.useDrop)({accept:[O.FILE],drop:e=>{e&&t(e.files[0])},collect:e=>({isOver:e.isOver(),canDrop:e.canDrop()})}),s=o&&l;return a().createElement("div",{ref:i,className:C()(n.root,{[n.isActive]:s},r)},a().createElement(k,{className:n.icon}),a().createElement(f.Typography,{className:n.title},d().text("Drag an image here")),a().createElement(f.Typography,{className:n.description},d().text("Acceptable image types would include JPG, PNG, TIFF, GIF, BMP. Maximum image size: ${MAX_IMAGE_SIZE}Mb",{MAX_IMAGE_SIZE:20})),a().createElement(N,{onAppendFile:t}))},Z=(0,y.Z)((e=>({root:{width:"100%",display:"flex",alignItems:"center",padding:"0 30px",boxSizing:"border-box"},border:{borderBottom:`1px solid ${e.palette.text.primary}`,flex:1,opacity:.12},text:{padding:"0 10px",color:e.palette.text.secondary,fontSize:"14px",lineHeight:"16px"}}))),I=e=>{let{children:t,className:r}=e;const n=Z();return a().createElement(f.Box,{className:C()(n.root,r)},a().createElement(f.Box,{className:n.border}),a().createElement(f.Typography,{className:n.text},t),a().createElement(f.Box,{className:n.border}))};var L=r(87685),j=r(8818);const D=(0,y.Z)({closeIcon:{color:"#fff"}}),R=e=>{let{error:t,onClose:r}=e;const n=D();return a().createElement(f.Snackbar,{open:Boolean(t),onClose:r,message:t,action:a().createElement(j.k,{className:n.closeIcon,tooltipTitle:d().text("Close"),icon:L.default,onClick:r})})},V=(0,y.Z)((e=>({root:{},dialogPaper:{position:"relative",maxWidth:"480px"},title:{color:e.palette.text.primary,fontSize:"20px",fontWeight:500,letterSpacing:"0.25px",lineHeight:"24px",padding:"16px"},body:{display:"flex",flexDirection:"column",alignItems:"center",padding:"0 8px 49px",textAlign:"center"},targetBox:{marginBottom:"8px"},divider:{marginBottom:"28px"}}))),B=e=>{let{open:t,onClose:r,onUpload:l}=e;const c=V(),u=(0,o.useSelector)(i.ZP.selectors.getImageServicePath),p=(0,o.useSelector)(i.ZP.selectors.getEnvironment),m=(0,o.useSelector)(i.ZP.selectors.getTenant),[y,x]=(0,n.useState)(!1),[v,w]=(0,n.useState)(null),C=e=>{x(!0),(0,s.Ixr)({image:e,imageServicePath:u,environment:p,tenant:m}).then((e=>{l(e),r()})).catch((e=>w(e.errorMessage))).finally((()=>x(!1)))};return a().createElement(g.DndProvider,{backend:b.default},a().createElement(f.Dialog,{open:t,onClose:r,classes:{paper:c.dialogPaper}},a().createElement(f.Typography,{className:c.title},d().text("Add new image")),a().createElement(f.Box,{className:c.body},a().createElement(P,{className:c.targetBox,onAppendFile:e=>{const t=Number((e.size/1024/1024).toFixed(2)),r=T.includes(e.type);t>20?w(d().text("File size exceeds configured max file size.")):r?C(e):w(d().text("File format is not supported."))}}),a().createElement(I,{className:c.divider},d().text("or")),a().createElement(E,{onSend:e=>{C(e)}})),y&&a().createElement(h.Z,null),a().createElement(R,{error:v,onClose:()=>w(null)})))};var M=r(40932),U=r(95117);const z=(0,y.Z)((()=>({root:{width:"100%",marginBottom:"10px"},image:e=>{let{imageMargin:t}=e;return{marginRight:t,cursor:"pointer","&:last-child":{marginRight:0}}},uploadContainer:e=>{let{imageMargin:t,imageWidth:r,imageHeight:n}=e;return{backgroundColor:"white",width:r,height:n,cursor:"pointer",border:"1px dashed #0072CE",boxSizing:"border-box",marginRight:t,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0}},uploadButton:{width:"50px",height:"50px"},uploadIcon:{fontSize:"36px"}}))),_=e=>{let{attributeType:t={},attributeValues:r=[],onDeleteAttribute:m,onChangeAttribute:d,requestNextPageOfAttributeValues:g,parentUri:b,paging:f,showNonOv:h,imageSize:y=U.By}=e;const x=z(y),v=(0,o.useSelector)(i.ZP.selectors.getEntity)||{},E=(0,o.useSelector)((e=>i.ZP.selectors.getModifiedEntityDefaultProfilePic(e,v.uri))),w=(0,o.useDispatch)(),[C,O]=(0,n.useState)(!1),T=(0,n.useCallback)((()=>{O((e=>!e))}),[]),N=(0,n.useCallback)((e=>{const r=(0,s.hm5)(b,t.name),n={};for(const a in e){const o=(t.attributes||[]).find((e=>{let{name:t}=e;return t===a}));o&&(n[a]=[{uri:(0,s.hm5)(r,o.name),ov:!0,value:e[a],type:o.uri}])}d({attributeType:t,uri:r,value:n})}),[d,b,t]),S=(0,n.useCallback)((e=>{if(m(e),E===e.uri){var t;const n=(null===(t=r[0])||void 0===t?void 0:t.uri)===e.uri?r[1]:r[0];w(i.N5.modifiedEntities.actions.setDefaultProfilePic({entityUri:v.uri,value:n||{}}))}}),[m,v,E,r]),k=(e,r)=>{const{onOpenImageGalleryDialog:n,onDownload:o,onShareLink:l,onSetAsDefault:i}=e,c=(0,s.Q5d)(r),{uri:p}=r;return a().createElement(u.Z,{id:p,onShareLink:()=>l(c),onSetAsDefault:()=>i(r),onDelete:()=>S({uri:p,attributeType:t}),onDownload:()=>o([c]),onClick:()=>n(p)})};return a().createElement("div",{className:x.root},a().createElement(M.Z,{attributeValues:r,attributeType:t,renderImage:e=>function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const r=(0,s.efz)(t),{uri:n}=t,{onOpenImageGalleryDialog:o}=e;return a().createElement("div",{className:x.image,key:n},a().createElement(c.Z,{src:r,overlay:k(e,t),onClick:()=>o(n),size:{imageWidth:y.imageWidth,imageHeight:y.imageHeight},"data-reltio-id":"reltio-attribute-value"}))},overlay:!0,countFixedItems:1,onUpload:T,onDeleteAttribute:S,imageSize:y,requestNextPageOfAttributeValues:g,paging:f,parentUri:b,showNonOv:h},a().createElement("div",{className:x.uploadContainer,onClick:T},a().createElement(p.Z,{className:x.uploadButton,iconClassName:x.uploadIcon,icon:l.Z}))),a().createElement(B,{open:C,onUpload:N,onClose:T}))}},63459:(e,t,r)=>{r.d(t,{Z:()=>E});var n=r(24328),a=r.n(n),o=r(71153),l=r.n(o),i=r(13980),s=r.n(i),c=r(17440),u=r(94079);const p=(0,r(79692).Z)({moreAttributes:{display:"flex",paddingBottom:"6px","&$dense":{padding:0}},dense:{},popupContainer:{},moreAttributesPopup:{"&$popupContainer":{}},moreButton:{padding:"9px 16px 9px 12px",backgroundColor:"rgba(98, 2, 238, 0)"},buttonLabel:{fontSize:"14px",fontWeight:500,lineHeight:"16px"},icon:{fontSize:"18px",marginRight:"8px"}});var m=r(97820),d=r(7785),g=r(56656),b=r(44890),f=r(54763),h=r(65549),y=r(27239);const x=(0,c.curry)(((e,t)=>(0,c.filter)((t=>t.label.toLowerCase().includes(e.toLowerCase())))(t))),v=e=>{let{label:t,popupTitle:r=t,data:o,dense:i,onApply:s}=e;const v=p(),E=(0,n.useRef)(),[w,C]=(0,n.useState)(!1),[O,T]=(0,n.useState)(""),[N,S]=(0,n.useState)([]),k=(0,n.useCallback)(((e,t)=>{S((0,c.ifElse)((0,c.always)(t),(0,c.append)(e),(0,c.reject)((0,c.propEq)("id",e.id)))(N))}),[N]),A=(0,n.useMemo)((()=>(0,c.pipe)(x(O),(0,c.map)((e=>({item:{id:e.uri,label:e.label,attrType:e}}))))(o)),[o,O]),P=(0,n.useMemo)((()=>(0,g.LG)(A)),[A]),Z=(0,n.useCallback)((()=>28),[]),I=(0,n.useCallback)((e=>{let{item:t}=e;k(t,(0,c.not)((0,c.any)((0,c.propEq)("id",t.id))(N)))}),[k,N]),{focusIndex:L,handleKeyDown:j}=(0,f.t)({items:P,open:w,onSelectFocusedItem:I,selectedItems:N}),D=(0,n.useRef)(null);D.current=L;const R=Math.min(255,28*P.length),V=Math.max(140,R+112),B=(0,n.useCallback)(((e,t,r)=>{let{item:n,level:o=0}=t;const l=(0,c.any)((0,c.propEq)("id",n.id))(N),i=D.current===r;return a().createElement(d.Z,{key:n.uri,onClick:k,checked:l,level:o,data:n,label:a().createElement(y.Z,{text:n.label,highlight:O}),labelInText:n.label,style:e,isFocused:i,isRequired:!!n.attrType.required,LogoIcon:n.LogoIcon})}),[O,k,N]);return a().createElement("div",{className:l()(v.moreAttributes,{[v.dense]:i})},a().createElement(u.Button,{color:"primary",onClick:()=>C(!w),ref:E,className:v.moreButton},a().createElement(h.Z,{classes:{root:v.icon}}),a().createElement("div",{className:v.buttonLabel},t)),a().createElement(m.Z,{open:w,className:l()(v.moreAttributesPopup,v.popupContainer),anchorEl:E.current,onClose:(0,c.pipe)((()=>{N.length>0&&s((0,c.pluck)("attrType",N))}),(()=>C(!1)),(()=>T("")),(()=>S([]))),onSearch:T,containerHeight:V,title:r,containerWidth:320,searchInputOnKeyDown:j},a().createElement(b.Z,{getItemSize:Z,renderItem:B,items:P,height:R,containerWidth:320,focusIndex:L})))};v.propTypes={label:s().string,popupTitle:s().string,data:s().array,dense:s().bool,onApply:s().func};const E=v},62630:(e,t,r)=>{r.d(t,{Z:()=>c});var n=r(24328),a=r.n(n),o=r(99493),l=r(77325);function i(){return i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},i.apply(this,arguments)}const s=e=>{const{attributeValue:t,attributeType:r}=e,n=(0,o.Kxm)(t,r.dataLabelPattern);return a().createElement(l.Z,i({label:(0,o.idV)(n),attributeTypesList:r.attributes||r.analyticsAttributes},e))};s.propTypes=o.j2V;const c=(0,n.memo)(s)},2163:(e,t,r)=>{r.d(t,{Z:()=>C});var n=r(52730),a=r(87638),o=r(24328),l=r.n(o),i=r(13980),s=r.n(i),c=r(71153),u=r.n(c),p=r(17440),m=r(99493),d=r(77325),g=r(81077),b=r(26579);const f=(0,r(79692).Z)({item:{marginBottom:"20px"},dense:{marginBottom:0}});function h(){return h=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},h.apply(this,arguments)}function y(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){x(e,t,r[t])}))}return e}function x(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const v=e=>{const t=f(),{modifiedEntity:r,metadata:n,globalSearchRequestOptions:a,onDeleteModifiedEntity:i,onUpdateModifiedEntity:s,onDeactivateError:c}=e,x=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["modifiedEntity","metadata","globalSearchRequestOptions","onDeleteModifiedEntity","onUpdateModifiedEntity","onDeactivateError"]),{attributeValue:v,attributeType:E,mode:w,crosswalks:C,errors:O,onChangeAttribute:T}=x,N=(0,o.useRef)(v),S=(0,m.CZ8)(v),k=(0,m.o96)(v),A=(0,m.Poc)(E),P=(0,m.nt9)(n,A),Z=r?(0,m.Kxm)(r,P.dataLabelPattern):v.label,I=(0,o.useMemo)((()=>[A]),[A]),L=(0,o.useMemo)((()=>(0,m.EtK)(C,k)),[C,k]),j=(0,o.useMemo)((()=>(0,m.mbo)(v,O)),[v,O]),D=(0,o.useMemo)((()=>S&&{entityUri:(0,m.ZTM)(S),entityType:(0,m.uGi)(S),entityLabel:v.label}),[S,v.label]),R=(0,o.useMemo)((()=>(0,m.tF$)(E).map((e=>(0,m.zeJ)(n,e))).filter(p.identity)),[E,n]),V=(0,o.useCallback)((e=>(0,m.ct9)(E,e)),[E]),B=(0,o.useCallback)((e=>{r&&i(r.uri);const t=N.current,n=!(0,p.isEmpty)(e)&&e.uri===(0,m.bwT)(t),a=y({},v,{label:e.label,refEntity:n?t.refEntity:(0,m.fmQ)(e),refRelation:n?t.refRelation:(0,m.NBq)(v)});T({value:a,attributeType:E,uri:v.uri}),j&&c((0,m.iFp)(j))}),[v,E,r,T,i,c,j]),M=(0,o.useCallback)(((e,t)=>{const r=(0,p.pipe)(V,(0,m._kX)(w))(P),a=(0,m.pBq)({entityTypeUri:e,initValue:t,attributeTypes:r,metadata:n,mode:w});B(a),s(a)}),[V,w,P,n,B,s]),U=(0,o.useMemo)((()=>(0,m.yv0)({attributeType:E,attributeValue:v,mode:w,isReltioCrosswalk:(0,m.KVV)(C,v)})),[E,v,w,C]),z=(0,o.useMemo)((()=>(0,m.d89)(w,P)),[w,P]),_=(0,m.e$p)(j);return l().createElement(d.Z,h({},x,{label:(0,m.idV)(Z),attributeTypesList:R,crosswalks:L,metadata:n}),l().createElement(b.Z,{errorMessage:_},l().createElement(g.Z,{className:u()(t.item,{[t.dense]:_||D&&(0,m.ZiX)(D.entityUri)}),entity:D||{},entityTypesUris:I,max:20,globalSearchRequestOptions:a,mode:w,onChange:U?B:void 0,onCreate:z?M:void 0,metadata:n,attributeTypesSelectionStrategy:V})))};v.propTypes=y({},m.NkU,{modifiedEntity:m.pyR,metadata:m.pGS,globalSearchRequestOptions:s().object,onDeleteModifiedEntity:s().func,onUpdateModifiedEntity:s().func,onDeactivateError:s().func});const E=(0,o.memo)(v),w={onDeleteModifiedEntity:a.N5.modifiedEntities.actions.entityDeleted,onUpdateModifiedEntity:a.N5.modifiedEntities.actions.entityCreated,onDeactivateError:a.N5.errors.actions.errorDeactivated},C=(0,n.connect)(((e,t)=>{const r=(0,m.bwT)(t.attributeValue);return{modifiedEntity:(0,m.ZiX)(r)?a.ZP.selectors.getModifiedEntity(e,r):null,metadata:a.ZP.selectors.getMetadata(e),globalSearchRequestOptions:a.ZP.selectors.getGlobalSearchRequestOptions(e,["ovOnly"])}}),w)(E)},39462:(e,t,r)=>{r.d(t,{Z:()=>P});var n=r(24328),a=r.n(n),o=r(13980),l=r.n(o),i=r(52730),s=r(71153),c=r.n(s),u=r(17440),p=r(65549),m=r(22983),d=r(94079),g=r(87918),b=r.n(g),f=r(99493),h=r(72768),y=r(25310),x=r(26579),v=r(22385),E=r(40879),w=r(49965),C=r(87638);function O(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){T(e,t,r[t])}))}return e}function T(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const N={};const S=(0,r(79692).Z)((e=>({wrapper:{width:"100%"},errorWrapper:{alignSelf:"stretch"},editor:{display:"flex",flex:1,alignItems:"flex-start",marginBottom:"10px"},"editor-value":{flex:"1 1 auto"},"editor-read-only-value":{marginLeft:"12px",display:"flex",alignItems:"center"},"editor-actions":{display:"flex",alignItems:"center",paddingLeft:"8px"},addButton:{marginRight:"-8px"},button:{color:e.palette.text.secondary},placeholder:{height:"50px"},deleted:{color:e.palette.text.secondary,textDecoration:"line-through"},editedLabel:{fontStyle:"italic",color:e.palette.text.secondary}})));function k(){return k=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},k.apply(this,arguments)}const A=e=>{let{className:t,attributeValue:r,attributeType:n,isReltioCrosswalk:o,ownError:l,mode:s,onAddOneMore:g,onDeleteAttribute:w,onChangeAttribute:T,onDeactivateError:A,additionalControlsRenderer:P,state:Z}=e,I=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["className","attributeValue","attributeType","isReltioCrosswalk","ownError","mode","onAddOneMore","onDeleteAttribute","onChangeAttribute","onDeactivateError","additionalControlsRenderer","state"]);const L=S(),j="deleted"===Z,D="edited"===Z,R=(0,f.KIu)(s),V=(0,f.PFL)(n),B=(0,E.AG)(r,V),M=(0,f.Vg3)({attributeType:n,mode:s}),U=(0,f.yv0)({attributeType:n,attributeValue:r,mode:s,isReltioCrosswalk:o}),z=(0,f.xv5)({attributeType:n,attributeValue:r,mode:s,isReltioCrosswalk:o}),_=U&&R,H=(0,f.e$p)(l),W=(0,i.useSelector)((e=>(0,f.QEi)(n)?((e,t,r)=>{const n=C.ZP.selectors.getDependentLookupsStructureNode(e,r);if(n){const l=t.uri,{parents:i,missedParentsAttributeTypes:s}=((e,t,r)=>{var n;const a=r.parents.flatMap((t=>{const r=C.ZP.selectors.getDependentLookupsStructureNode(e,t);return r.values.map((e=>O({},e,{type:t,dependentLookupCode:r.attrType.dependentLookupCode})))})),o=C.ZP.selectors.getModifiedEntities(e),l=C.ZP.selectors.getEntityUri(e),i=C.ZP.selectors.getAllRelationsToAddAndEdit(e),s=C.ZP.selectors.getMetadata(e),c=(0,f.vUy)({parentValues:a,valueUri:t,entityUri:l,modifiedEntities:o,connections:i}),p=(0,u.pipe)(f.uDV,(0,u.defaultTo)([]),(0,u.map)((0,u.pipe)((0,u.path)(["valueType","uri"]),f.u5q)),(0,u.prepend)(null===(n=o[l])||void 0===n?void 0:n.type),(0,u.reject)(u.isNil),u.uniq)({entityUri:l,entitiesMap:o,connections:i,metadata:s},t),m=r.parents.filter((e=>p.some((0,f.sOy)(e)))).map((t=>C.ZP.selectors.getDependentLookupsStructureNode(e,t).attrType)).filter((e=>!c.some((t=>{let{type:r,value:n}=t;return n&&r===e.uri}))));return{parents:Object.values(c.reduce(((e,t)=>{var r;return O({},e,{[t.dependentLookupCode]:{type:t.dependentLookupCode,codeValues:(0,u.uniq)([t.value,...(null===(r=e[t.dependentLookupCode])||void 0===r?void 0:r.codeValues)||[]]).filter(Boolean).sort()}})}),{})),missedParentsAttributeTypes:m}})(e,l,n),{isBlocked:c=!1}=C.ZP.selectors.getDependentLookupEditorState(e,l)||{},p=(a=s).length?b().text("Please select value for ${labels} ${attributes}.",{labels:(o=a.map((0,u.pipe)((0,u.prop)("label"),(e=>`'${e}'`))),o.reduce(((e,t,r)=>[e,t].join(r===o.length-1?` ${b().text("and")} `:", ")))),attributes:1===a.length?b().text("attribute"):b().text("attributes")}):"",m=C.ZP.selectors.getLookupAutocomplete(e),d=(0,f.Vmh)(m,r),g=!(null!=t&&t.lookupCode||null!=t&&t.value)&&c&&b().text("Populating values...")||p||"",h={parents:i,disabled:!!p||c,placeholder:g,autopopulationId:d?l:null};return g&&(h.value=null),((e,t)=>{const r=N[e];return(0,u.equals)(t,r)?r:((0,u.equals)(null==r?void 0:r.parents,t.parents)&&(t.parents=r.parents),N[e]=t,t)})(l,h)}var a,o})(e,r,null==n?void 0:n.uri):null)),F=()=>{l&&A((0,f.iFp)(l))},q=!!g&&M&&!n.singleValue,Y=!j&&!!w&&z,$=!!H,G=j?{disabled:!0}:{};return a().createElement("div",{className:c()(L.editor,t)},a().createElement(x.Z,{errorMessage:H,className:L.errorWrapper},a().createElement("div",{className:c()(L["editor-value"],{[L.deleted]:j},{[L["editor-read-only-value"]]:!_}),"data-reltio-id":"reltio-attribute-value"},_?a().createElement(y.Z,k({fieldName:(0,f.Tde)(n.uri),value:B,dataTypeDefinition:V,error:$,onChange:(0,u.pipe)((0,E.pp)(r,n),T,F),fullWidth:!0},W,I,G)):a().createElement(h.Z,{value:(0,f.kDl)(r),dataTypeDefinition:V}))),a().createElement("div",{className:L["editor-actions"]},D&&a().createElement(d.Typography,{variant:"caption",className:L.editedLabel},"(",b().text("edited"),")"),q&&a().createElement(v.Z,{icon:p.Z,onClick:g,size:"L",className:c()(L.addButton,L.button)}),P&&P({attributeType:n,attributeValue:r}),Y&&a().createElement(v.Z,{className:L.button,icon:m.Z,onClick:()=>{w({uri:r.uri,attributeType:n}),(0,f.PcX)(l)!==f.NIO.missed&&F()},size:"L"})))};A.propTypes={className:l().string,attributeValue:f.cNQ,attributeType:f.EMD,ownError:f.wfT,isReltioCrosswalk:l().bool,state:l().oneOf(["deleted","edited"]),mode:f.XGc,onAddOneMore:l().func,onDeleteAttribute:l().func,onChangeAttribute:l().func,onDeactivateError:l().func,additionalControlsRenderer:l().func};const P=(0,n.memo)((0,w.Z)(A,(()=>{const e=S();return a().createElement("div",{className:e.placeholder})})))},40879:(e,t,r)=>{r.d(t,{AG:()=>i,Ho:()=>s,pp:()=>c});var n=r(95038),a=r.n(n),o=r(99493),l=r(17440);const i=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{type:t}=arguments.length>1?arguments[1]:void 0;const{value:r,lookupCode:n}=e;switch(t){case o.oS0.TYPE_BOOLEAN:case o.oS0.TYPE_BOOLEAN_RADIO:case o.oS0.TYPE_RDM_LOOKUPS_NOT_RESOLVED:return(0,o.gxP)(r);case o.oS0.TYPE_DATE:return r&&o.P6Y.dates.toLocalDate(r)||null;case o.oS0.TYPE_LOCAL_DATE:case o.oS0.TYPE_TIMESTAMP:case o.oS0.TYPE_ACTIVENESS_DATE:return r&&new Date(r)||null;case o.oS0.TYPE_DEPENDENT_LOOKUP:case o.oS0.TYPE_LOOKUP:return{value:r,lookupCode:n};default:return r}},s=(e,t)=>{const{type:r}=(0,o.PFL)(e);switch(r){case o.oS0.TYPE_BOOLEAN:case o.oS0.TYPE_BOOLEAN_RADIO:case o.oS0.TYPE_RDM_LOOKUPS_NOT_RESOLVED:return t.toString();case o.oS0.TYPE_DATE:return t&&a()(t).format("YYYY-MM-DD")||"";case o.oS0.TYPE_TIMESTAMP:return t&&a()(t).format()||"";case o.oS0.TYPE_ACTIVENESS_DATE:case o.oS0.TYPE_LOCAL_DATE:return t&&t.valueOf();default:return t||""}},c=(0,l.curry)(((e,t,r)=>({value:s(t,r),uri:e.uri,attributeType:t})))},66784:(e,t,r)=>{r.d(t,{c:()=>a});var n=r(24328);const a=r.n(n)().createContext(null)},8261:(e,t,r)=>{r.d(t,{U:()=>o,A:()=>l});var n=r(17440),a=r(99493);const o=(e,t,r,o)=>{const l=(0,n.pipe)(a.nt9,(0,n.defaultTo)({}),(0,n.props)(["attributes","analyticsAttributes"]),(0,n.reject)(n.isNil),n.flatten,(0,n.concat)(n.__,(0,n.pipe)(n.values,(0,n.reject)((0,n.propEq)("uri",a.xPW.id.uri)))(a.xPW)))(e,t);return r.length?l.filter((e=>{let{uri:t}=e;return r.includes(t)})):l.filter((e=>{let{uri:t}=e;return!o.includes(t)}))},l=(e,t)=>(0,n.partition)((0,n.pipe)((0,n.path)(["attrType","uri"]),(0,n.includes)(n.__,e)),t)},12437:(e,t,r)=>{r.d(t,{Z:()=>u});var n=r(96971),a=r(94079),o=r(24328),l=r.n(o),i=r(87918),s=r.n(i),c=r(9125);const u=e=>{let{onClick:t}=e;const r=(0,c.y)();return l().createElement(a.Link,{component:"button",variant:"caption",className:r.link,onClick:t,underline:"none"},l().createElement(n.Z,{className:r["svg-icon__root"]}),s().text("Show less"))}},48554:(e,t,r)=>{r.d(t,{Z:()=>u});var n=r(4426),a=r(94079),o=r(24328),l=r.n(o),i=r(87918),s=r.n(i),c=r(9125);const u=e=>{let{moreNumber:t,valueNumber:r,onClick:o}=e;const i=(0,c.y)();return l().createElement(a.Link,{component:"button",variant:"caption",className:i.link,onClick:o,underline:"none"},l().createElement(n.Z,{className:i["svg-icon__root"]}),t&&r?s().text("Show ${moreNumber} more of remaining ${valueNumber} value",{moreNumber:t,valueNumber:r}):s().text("Show more"))}},9125:(e,t,r)=>{r.d(t,{y:()=>n});const n=(0,r(79692).Z)({link:{display:"flex",marginTop:4},"svg-icon__root":{fontSize:"1rem"}})},81303:(e,t,r)=>{r.d(t,{Z:()=>c});var n=r(24328),a=r.n(n),o=r(99493),l=r(12068),i=r(28751),s=r(72148);const c=e=>{const{attributeType:t}=e;return class{static build(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};switch(e.type){case o.oS0.TYPE_NESTED:return a().createElement(i.Z,t);case o.oS0.TYPE_REFERENCE:return a().createElement(s.Z,t);default:return a().createElement(l.Z,t)}}}.build(t,e)}},80931:(e,t,r)=>{r.d(t,{Z:()=>d});var n=r(24328),a=r.n(n),o=r(17440),l=r(99493),i=r(95974),s=r(24625),c=r(48554),u=r(12437),p=r(78836),m=r(8261);const d=(0,n.memo)((e=>{let{attrTypes:t,entity:r,parentUri:d,drawLines:g,children:b,className:f,max:h,alwaysVisibleTypeUris:y=p.S,showNonOv:x}=e;const[v,E]=(0,n.useState)(h||1/0),w=(0,n.useMemo)((()=>(0,l.fyF)(t,r,x)),[t,r,x]),[C,O]=(0,n.useMemo)((()=>(0,m.A)(y,w)),[w,y]),T=O.slice(0,v),N=h&&T.length<O.length,S=h&&T.length>=O.length&&h<T.length,k={enabled:g};return a().createElement("div",{className:f},b&&a().createElement(i.Z,k,b),T.concat(C).map((e=>{let{attrType:t,values:n}=e;return a().createElement(s.Z,{key:t.uri,attributeType:t,drawLines:g,values:n,paging:(0,o.path)(["paging",t.uri],r.attributes),parentUri:d,showNonOv:x})})),N&&a().createElement(c.Z,{onClick:()=>{E(1/0)}}),S&&a().createElement(u.Z,{onClick:()=>{E(h)}}))}))},24625:(e,t,r)=>{r.d(t,{Z:()=>K});var n=r(52730),a=r(87638),o=r(71153),l=r.n(o),i=r(24328),s=r.n(i),c=r(17440),u=r(99493),p=r(79692);function m(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){d(e,t,r[t])}))}return e}function d(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const g="13px",b="15px",f={titleRow:{display:"block",minHeight:"16px",textIndent:"-1em",paddingLeft:"1em"},title:{whiteSpace:"nowrap"},ovIcon:{marginLeft:"8px",marginRight:"-3px",marginTop:"-1px",textIndent:0}},h=(0,p.Z)({paddingWrapper:{paddingTop:"3px",paddingBottom:"5px","&:last-child":{paddingBottom:"2px"}},paddingWrapperWithLines:{paddingBottom:"1px","&:last-child":{paddingBottom:"2px"}}}),y=(0,p.Z)(m({wrapper:{fontSize:g,lineHeight:b,flex:1},collaborationWrapper:{display:"flex",alignItems:"start",minHeight:"18px"},attribute:{marginLeft:"8px",paddingLeft:"4px",paddingRight:"4px",display:"inline",overflow:"hidden",whiteSpace:"pre-wrap",wordBreak:"break-word"},titleIcon:{width:"16px",height:"16px",marginBottom:"-3px",marginRight:"8px",marginLeft:"1px",color:"rgba(0, 0, 0, 0.38)"}},f)),x=(0,p.Z)(m({wrapper:{display:"flex",flexDirection:"column",alignItems:"flex-start",fontSize:g,lineHeight:b},attribute:{"&:last-child":{marginBottom:0},paddingLeft:"4px",paddingRight:"4px",marginLeft:"5px",marginBottom:"4px",whiteSpace:"pre-wrap",wordBreak:"break-word"},attributes:{alignSelf:"stretch"}},f,{titleRow:m({},f.titleRow,{marginBottom:"3px"})}));var v=r(95629),E=r(95974),w=r(19603),C=r(94646),O=r(91181),T=r(81303);const N=e=>{let{value:t,nonVisibleValues:r,attributeType:n,titleClassName:a,contentClassName:o,showNonOv:i,totalNonVisibleValues:c}=e;const p=y(),{label:m}=n,d=(0,u.xdS)(n)?u.q7e.RELATION_ATTRIBUTE:u.q7e.ENTITY_ATTRIBUTE;return s().createElement("div",{className:l()(p.collaborationWrapper,w.U)},s().createElement("div",{className:l()(p.titleRow,p.wrapper)},s().createElement(v.Z,{label:m,className:l()(p.title,a),"data-reltio-id":"reltio-attribute-label"}),s().createElement(O.Z,{nonOvValues:r,attributeType:n,className:p.ovIcon,nonOvTotal:c}),s().createElement(T.Z,{className:l()(p.attribute,o),attributeValue:t,attributeType:n,showNonOv:i,inlined:!0})),s().createElement(C.Z,{uri:t.uri,relatedObjectUris:(0,u.wp9)(d,{uri:t.uri}),objectType:d}))};var S=r(48554),k=r(12437);const A=e=>{let{max:t,values:r,nonVisibleValues:n,totalVisibleValues:a,attributeType:o,parentUri:u,requestNextPageOfAttributeValues:p,titleClassName:m,contentClassName:d,showNonOv:g,totalNonVisibleValues:b}=e;const f=x(),[h,y]=(0,i.useState)(t),E=t<a,w=E&&h<a,C=E&&h>=a,{label:N}=o,A=r.slice(0,h),P=a-h;return s().createElement("div",{className:f.wrapper},s().createElement("div",{className:f.titleRow},s().createElement(v.Z,{label:N,className:l()(f.title,m),"data-reltio-id":"reltio-attribute-label"}),s().createElement(O.Z,{nonOvValues:n,attributeType:o,className:f.ovIcon,nonOvTotal:b})),s().createElement("div",{className:f.attributes},A.map((e=>s().createElement(T.Z,{key:e.uri,className:l()(f.attribute,d),attributeValue:e,attributeType:o,showNonOv:g})))),w&&s().createElement(S.Z,{moreNumber:(0,c.min)(t,P),valueNumber:P,onClick:()=>{r.length<a&&p({parentUri:u,attributeTypeUri:o.uri,attributeTypeName:o.name,values:r,defaultMaxValues:t}),y(h+t)}}),C&&s().createElement(k.Z,{onClick:()=>{y(t)}}))};var P=r(13074),Z=r(20404);const I=e=>{let{className:t,values:r,Component:n,dataReltioId:a}=e;return s().createElement("div",{className:t,"data-reltio-id":a},r.map(((e,t)=>s().createElement(i.Fragment,{key:e},s().createElement(n,{value:e}),t<r.length-1&&", "))))};var L=r(26005),j=r(35493);function D(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){R(e,t,r[t])}))}return e}function R(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const V=(0,p.Z)({insertAttribute:D({width:"fit-content"},j.zX[j.Y1.insertAttribute]),deleteAttribute:D({width:"fit-content",textDecoration:"line-through",padding:"0 4px"},j.zX[j.Y1.deleteAttribute])}),B=e=>{let{value:t}=e;const r=V(),o=(0,n.useSelector)(a.ZP.selectors.getMetadata),{appearance:l}=(0,i.useContext)(L.m),c=(0,j.YN)("roles",t,l),p=(0,j.o_)(c);return s().createElement("span",{className:r[p]},(0,u.xqc)(o,t))},M=e=>{let{className:t,values:r}=e;return s().createElement(I,{values:r,className:t,dataReltioId:"reltio-attribute-value",Component:B})};var U=r(94079),z=r(3185);const _=e=>{let{value:t}=e;const r=V(),o=(0,n.useSelector)(a.ZP.selectors.getUIPath),l=(0,i.useContext)(z.u),c=(0,n.useSelector)(a.ZP.selectors.getEntity),{appearance:p}=(0,i.useContext)(L.m),m=(0,j.YN)("tags",t,p),d=(0,j.o_)(m),g=l||c;return s().createElement(U.Link,{underline:"none",className:r[d],href:(0,u.hgZ)({uiPath:o,tag:t,entityUri:g.dataTenant?(0,u.Nsy)(g):g.uri})},t)},H=e=>{let{className:t,values:r}=e;return s().createElement(I,{values:r,className:t,dataReltioId:"reltio-attribute-value",Component:_})},W=e=>{let{values:t,attributeType:r}=e;const n=y(),{label:a}=r;return s().createElement("div",{className:l()(n.titleRow,n.wrapper)},(o=n.titleIcon,r.uri===u.xPW.tags.uri?s().createElement(Z.Z,{className:o}):null),s().createElement(v.Z,{label:a,className:n.title,"data-reltio-id":"reltio-attribute-label"}),(e=>{switch(r.uri){case u.xPW.tags.uri:return s().createElement(H,{className:e,values:t});case u.xPW.roles.uri:return s().createElement(M,{className:e,values:t});default:return s().createElement(T.Z,{className:e,attributeValue:{value:t[0]},attributeType:r,inlined:!0})}})(n.attribute));var o},F="oneLine",q="multiLine",Y="imageLine",$="special",G=(0,i.memo)((e=>{let{values:t,attributeType:r,drawLines:n,paging:a={},parentUri:o,max:i=1/0,requestNextPageOfAttributeValues:p,titleClassName:m,contentClassName:d,showNonOv:g}=e;const b=h(),f=(0,c.partition)(u.OXP);if(!t||!t.length)return null;const[y,x]=f(t),w=g?t:y,C=g?[]:x,O=g?"totalValues":"totalOvValues",T=(0,c.ifElse)((0,c.has)(O),(0,c.prop)(O),(0,c.always)(w.length))(a),S=null!=a&&a.totalValues?a.totalValues-T:C.length,k=1===T&&!(0,u.YkM)(r);return s().createElement(E.Z,{enabled:n,className:l()({[b.paddingWrapperWithLines]:n})},s().createElement("div",{className:l()({[b.paddingWrapper]:!n})},(()=>{switch((0,c.cond)([[u.kqr,(0,c.always)($)],[u.Or$,(0,c.always)(Y)],[(0,c.always)(k),(0,c.always)(F)],[c.T,(0,c.always)(q)]])(r)){case F:return s().createElement(N,{value:w[0],nonVisibleValues:C,totalNonVisibleValues:S,attributeType:r,titleClassName:m,contentClassName:d,showNonOv:g});case q:return s().createElement(A,{values:w,nonVisibleValues:C,totalVisibleValues:T,totalNonVisibleValues:S,attributeType:r,parentUri:o,max:i,requestNextPageOfAttributeValues:p,titleClassName:m,contentClassName:d,showNonOv:g});case Y:return s().createElement(s().Fragment,null,s().createElement(v.Z,{label:null==r?void 0:r.label,"data-reltio-id":"reltio-attribute-label"}),s().createElement(P.Z,{attributeValues:w,attributeType:r,paging:a,parentUri:o,requestNextPageOfAttributeValues:p,showNonOv:g}));case $:return s().createElement(W,{values:w,attributeType:r})}})()))})),X={requestNextPageOfAttributeValues:a.N5.actions.requestNextPageOfAttributeValues},K=(0,n.connect)(((e,t)=>{let{max:r}=t;return{max:r||a.ZP.selectors.getDefaultMaxValues(e)}}),X)(G)},83303:(e,t,r)=>{r.d(t,{Z:()=>h});var n=r(24328),a=r.n(n),o=r(13980),l=r.n(o),i=r(71153),s=r.n(i),c=r(99493),u=r(94079),p=r(80931),m=r(19592),d=r(94646),g=r(19603);const b=(0,r(79692).Z)({complexContainer:{marginTop:"1px"},labelContainer:{display:"flex",minHeight:"18px"},label:{fontSize:"13px",lineHeight:"15px",letterSpacing:"normal",paddingTop:"1px",marginLeft:"2px"},spacer:{flex:1}}),f=e=>{let{attributeTypesList:t,attributeValue:r,label:o,expanded:l=!1,children:i,showNonOv:f,attributeType:h}=e;const y=b(),x=r.uri,[v,E]=(0,n.useState)(!1);(0,n.useEffect)((()=>{E(l)}),[l]);const w=(t||[]).some((e=>(0,c.kQw)(e))),C=(0,n.useMemo)((()=>({attributes:w?null:r.value,analyticsAttributes:w?r.value:null})),[r,w]),O=(0,c.xdS)(h)?c.q7e.RELATION_ATTRIBUTE:c.q7e.ENTITY_ATTRIBUTE;return a().createElement("div",{className:y.complexContainer},a().createElement("div",{className:s()(y.labelContainer,g.U)},a().createElement(m.Z,{onClick:()=>E((e=>!e)),expanded:v}),a().createElement(u.Typography,{component:"span",variant:"body2",classes:{body2:y.label},"data-reltio-id":"reltio-attribute-complex-label"},o),a().createElement("div",{className:y.spacer}),a().createElement(d.Z,{uri:r.uri,relatedObjectUris:(0,c.wp9)(O,{uri:r.uri}),objectType:O})),v&&a().createElement(p.Z,{attrTypes:t,entity:C,drawLines:!0,parentUri:x,showNonOv:f},i))};f.propTypes={children:l().node,label:l().oneOfType([l().string,l().node]),attributeTypesList:l().arrayOf(c.EMD),attributeValue:l().oneOfType([c.dMV,c.Rtp]),expanded:l().bool,showNonOv:l().bool,attributeType:c.EMD};const h=f},13074:(e,t,r)=>{r.d(t,{Z:()=>g});var n=r(24328),a=r.n(n),o=r(99493),l=r(71153),i=r.n(l),s=r(26005),c=r(27952),u=r(40932),p=r(95117),m=r(35493);const d=(0,r(79692).Z)((e=>({image:e=>{let{imageMargin:t,imageHeight:r,imageWidth:n}=e;return{marginRight:t,width:n,height:r,cursor:"pointer","&:last-child":{marginRight:0}}},deleteAttributeImage:{position:"relative","&:before":{content:"''",position:"absolute",left:0,top:0,right:0,bottom:0,background:`url('${(0,o.m5F)('<svg xmlns="http://www.w3.org/2000/svg" style="stroke: #D1051E; stroke-width: 1" viewBox="0 0 114 114">\n\t<line x1="5" y1="109" x2="109" y2="5" />\n</svg>')}') no-repeat`,backgroundColor:m.zX[m.Y1.deleteAttribute].backgroundColor,pointerEvents:"none"}},updateAttributeImage:{position:"relative","&:before":{content:"''",position:"absolute",left:0,top:0,right:0,bottom:0,backgroundColor:m.zX[m.Y1.updateAttribute].backgroundColor,pointerEvents:"none"}},deleteAttribute:e=>{let{imageWidth:t,imageHeight:r}=e;return{width:t,height:r,boxSizing:"border-box",outline:`3px solid ${m.zX[m.Y1.deleteAttribute].color}`,outlineOffset:"-3px"}},insertAttribute:e=>{let{imageWidth:t,imageHeight:r}=e;return{width:t,height:r,boxSizing:"border-box",outline:`3px solid ${m.zX[m.Y1.insertAttribute].color}`,outlineOffset:"-3px"}},updateAttribute:e=>{let{imageWidth:t,imageHeight:r}=e;return{width:t,height:r,boxSizing:"border-box",outline:`3px solid ${m.zX[m.Y1.updateAttribute].color}`,outlineOffset:"-3px"}},number:{color:e.palette.primary.main,fontSize:"24px",lineHeight:"42px",letterSpacing:0,padding:"36px 8px",textAlign:"center",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}}))),g=e=>{let{attributeType:t,attributeValues:r=[],paging:l,parentUri:g,requestNextPageOfAttributeValues:b,showNonOv:f,imageSize:h=p.By}=e;const y=d(h),{appearance:x}=(0,n.useContext)(s.m);return a().createElement(u.Z,{attributeValues:r,attributeType:t,renderImage:e=>{let{onOpenImageGalleryDialog:t}=e;return e=>{const r=(0,o.efz)(e),{uri:n}=e,l=(0,m.IF)(n,x),s=(0,m.o_)(l);return a().createElement("div",{className:i()(y.image,{[y[s+"Image"]]:s}),key:n,"data-reltio-id":"reltio-attribute-value"},a().createElement(c.Z,{onClick:()=>t(n),className:y[s],src:r,size:{imageWidth:h.imageWidth,imageHeight:h.imageHeight}}))}},imageSize:h,requestNextPageOfAttributeValues:b,paging:l,parentUri:g,showNonOv:f})}},28751:(e,t,r)=>{r.d(t,{Z:()=>y});var n=r(24328),a=r.n(n),o=r(94079),l=r(71153),i=r.n(l),s=r(99493),c=r(26005),u=r(35493),p=r(83303),m=r(50763);function d(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){g(e,t,r[t])}))}return e}function g(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const b=(0,r(79692).Z)({label:{textDecoration:"none"},updateAttribute:d({width:"fit-content",padding:"0 4px",marginLeft:"-4px"},u.zX[u.Y1.updateAttribute]),insertAttribute:d({width:"fit-content"},u.zX[u.Y1.insertAttribute]),deleteAttribute:d({width:"fit-content",textDecoration:"line-through",padding:"0 4px",marginLeft:"-4px"},u.zX[u.Y1.deleteAttribute]),pivotingTooltip:{marginLeft:"4px"}});function f(){return f=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},f.apply(this,arguments)}const h=e=>{let{attributeValue:t,attributeType:r}=e,l=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["attributeValue","attributeType"]);const d=b(),{appearance:g}=(0,n.useContext)(c.m),h=(0,n.useMemo)((()=>{const e=(0,u.IF)(t.uri,g),n=(0,u.o_)(e),l=t.label?t.label:(0,s.Kxm)(t,r.dataLabelPattern);return a().createElement(m.m,{className:d.pivotingTooltip,value:t,attributeType:r},a().createElement(o.Box,{component:"span",className:i()(d[n],d.label)},(0,s.idV)(l)))}),[g,d,t,r]);return a().createElement(p.Z,f({label:h,attributeValue:t,attributeTypesList:(0,s.EUG)({},r),attributeType:r},l))};h.propTypes=s.j2V;const y=(0,n.memo)(h)},72148:(e,t,r)=>{r.d(t,{Z:()=>x});var n=r(52730),a=r(24328),o=r.n(a),l=r(71153),i=r.n(l),s=r(99493),c=r(26005),u=r(83303),p=r(35493);function m(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){d(e,t,r[t])}))}return e}function d(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const g=(0,r(79692).Z)((e=>({label:{color:e.palette.primary.main,textDecoration:"none"},relationshipLabel:{marginLeft:"4px",color:e.palette.text.primary},updateAttribute:m({width:"fit-content",padding:"0 4px",marginLeft:"-4px"},p.zX[p.Y1.updateAttribute]),insertAttribute:m({width:"fit-content"},p.zX[p.Y1.insertAttribute]),deleteAttribute:m({width:"fit-content",textDecoration:"line-through",padding:"0 4px",marginLeft:"-4px"},p.zX[p.Y1.deleteAttribute])})));function b(){return b=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},b.apply(this,arguments)}const f=e=>{let{attributeValue:t,metadata:r,attributeType:n,uiPath:l}=e,m=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["attributeValue","metadata","attributeType","uiPath"]);const d=g(),f=(0,s.bwT)(t),h=(0,a.useMemo)((()=>(0,s.EUG)(r,n)),[n,r]),{appearance:y}=(0,a.useContext)(c.m),x=(0,a.useMemo)((()=>{const e=(0,p.IF)(t.uri,y),r=(0,p.o_)(e);return o().createElement("a",{href:(0,s.O27)(y)?(0,s.ChB)({uiPath:l,uri:f}):void 0,className:i()(d.label,d[r])},(0,s.idV)(t.label),t.relationshipLabel&&o().createElement("span",{className:d.relationshipLabel},t.relationshipLabel))}),[t.uri,t.label,t.relationshipLabel,y,f,d,l]);return o().createElement(u.Z,b({attributeTypesList:h,attributeValue:t,label:x,attributeType:n},m))};f.propTypes=s.NkU;const h=(0,a.memo)(f);var y=r(87638);const x=(0,n.connect)((e=>({metadata:y.ZP.selectors.getMetadata(e),uiPath:y.ZP.selectors.getUIPath(e)})))(h)},12068:(e,t,r)=>{r.d(t,{Z:()=>h});var n=r(24328),a=r.n(n),o=r(99493),l=r(71153),i=r.n(l),s=r(19603),c=r(26005),u=r(94646),p=r(72768),m=r(50763),d=r(35493);function g(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){b(e,t,r[t])}))}return e}function b(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const f=(0,r(79692).Z)({root:{display:"flex",alignItems:"start",justifyContent:"space-between"},commentsContainer:{height:"15px",marginRight:"-4px"},attributeValue:{flex:1,wordBreak:"break-all"},updateAttribute:g({width:"fit-content",padding:"0 4px",marginLeft:"-4px"},d.zX[d.Y1.updateAttribute],{"& > a":{color:d.zX[d.Y1.updateAttribute].color}}),insertAttribute:g({width:"fit-content"},d.zX[d.Y1.insertAttribute],{"& > a":{color:d.zX[d.Y1.insertAttribute].color}}),deleteAttribute:g({width:"fit-content",padding:"0 4px",marginLeft:"-4px",textDecoration:"line-through"},d.zX[d.Y1.deleteAttribute],{"& > a":{color:d.zX[d.Y1.deleteAttribute].color}}),multilineAttribute:{width:"fit-content"}}),h=e=>{let{className:t,attributeType:r=null,attributeValue:l,inlined:g}=e;const b=f(),{appearance:h}=(0,n.useContext)(c.m),y=(0,d.IF)(l.uri,h),x=(0,d.o_)(y),v=a().createElement(p.Z,{value:(0,o.kDl)(l),dataTypeDefinition:(0,o.PFL)(r)}),E=(0,o.xdS)(r)?o.q7e.RELATION_ATTRIBUTE:o.q7e.ENTITY_ATTRIBUTE;return g||x?a().createElement("div",{className:t},a().createElement(m.m,{value:l,attributeType:r,key:l.uri,className:i()({[b.multilineAttribute]:!g})},a().createElement("span",{className:b[x],"data-reltio-id":"reltio-attribute-value"},v))):a().createElement("div",{className:i()(t,b.root,s.U)},a().createElement(m.m,{value:l,attributeType:r,key:l.uri},a().createElement("span",{className:b.attributeValue,"data-reltio-id":"reltio-attribute-value"},v)),a().createElement(u.Z,{className:b.commentsContainer,uri:l.uri,relatedObjectUris:(0,o.wp9)(E,{uri:l.uri}),objectType:E}))}},35493:(e,t,r)=>{r.d(t,{Y1:()=>a,zX:()=>o,o_:()=>l,IF:()=>m,YN:()=>d});var n=r(17440);let a;!function(e){e.insertAttribute="insertAttribute",e.updateAttribute="updateAttribute",e.deleteAttribute="deleteAttribute"}(a||(a={}));const o={[a.insertAttribute]:{color:"#599E0E"},[a.updateAttribute]:{backgroundColor:"rgba(255, 187, 0, 0.12)",color:"#CC7500"},[a.deleteAttribute]:{backgroundColor:"rgba(255, 50, 0, 0.2)",color:"#CF0E26"}},l=e=>{switch(e){case"UPDATE_ATTRIBUTE":return a.updateAttribute;case"UNDO_IGNORE_ATTRIBUTE":case"INSERT_ATTRIBUTE":return a.insertAttribute;case"IGNORE_ATTRIBUTE":case"DELETE_ATTRIBUTE":return a.deleteAttribute;default:return""}},i="/",s=(0,n.pipe)((0,n.split)(i),(0,n.propSatisfies)((0,n.lte)(2),"length")),c=(0,n.pipe)((0,n.split)(i),(0,n.slice)(0,-2),(0,n.join)(i)),u=(0,n.curry)(((e,t)=>(0,n.cond)([[(0,n.has)(e),(0,n.prop)(e)],[()=>s(e),u(c(e))]])(t))),p=e=>(0,n.pipe)(n.keys,(0,n.any)((0,n.startsWith)(e+i))),m=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=u(e,t);return(0,n.isNil)(r)?p(e)(t)?"UPDATE_ATTRIBUTE":"":r},d=function(e,t){var r;let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return null==n||null===(r=n[e])||void 0===r?void 0:r[t]}},78836:(e,t,r)=>{r.d(t,{S:()=>a});var n=r(99493);const a=[n.xPW.roles.uri,n.xPW.tags.uri]},19603:(e,t,r)=>{r.d(t,{U:()=>n});const n="commentsContainerVisibilityArea"},7142:(e,t,r)=>{r.d(t,{g:()=>i});var n=r(24328),a=r.n(n),o=r(13980),l=r.n(o);const i=a().createContext({enabled:!1,queueSizeThreshold:0});i.Provider.propTypes={value:l().shape({enabled:l().bool,queueSizeThreshold:l().number})},i.displayName="AsyncMountContext"},69891:(e,t,r)=>{r.d(t,{P:()=>a});var n=r(24328);const a=r.n(n)().createContext(!1);a.displayName="BlockImageGalleryDialogContext"},3515:(e,t,r)=>{r.d(t,{h:()=>o});var n=r(24328);const a=()=>{},o=r.n(n)().createContext({comments:[],commentsMap:null,currentComment:null,getComment:a,getComments:()=>new Promise(a),getCommentsCount:a,createComment:()=>new Promise(a),editComment:()=>new Promise(a),createReply:()=>new Promise(a),resolveThread:a,reOpenThread:a,clearCurrentComment:a,deleteComment:a,sending:!1,loading:!1,pageToken:null});o.displayName="CollaborationContext"},31274:(e,t,r)=>{r.d(t,{X:()=>a});var n=r(24328);const a=r.n(n)().createContext({});a.displayName="EntitiesMapContext"},3185:(e,t,r)=>{r.d(t,{u:()=>a});var n=r(24328);const a=r.n(n)().createContext(null);a.displayName="EntityContext"},26005:(e,t,r)=>{r.d(t,{m:()=>a});var n=r(24328);const a=r.n(n)().createContext({appearance:void 0,attributes:void 0,roles:void 0,tags:void 0});a.displayName="HistoryDiffContext"},60995:(e,t,r)=>{r.d(t,{J:()=>a});var n=r(24328);const a=r.n(n)().createContext([])},78101:(e,t,r)=>{r.d(t,{A:()=>a});var n=r(24328);const a=r.n(n)().createContext([]);a.displayName="RelatedObjectUrisContext"},49759:(e,t,r)=>{r.d(t,{s:()=>a});var n=r(24328);const a=r.n(n)().createContext([]);a.displayName="UsersContext"},96479:(e,t,r)=>{r.d(t,{S:()=>l});var n=r(24328),a=r(7142);let o=0;const l=()=>{const e=(0,n.useRef)(!0),{enabled:t,queueSizeThreshold:r=0}=(0,n.useContext)(a.g),[l,i]=(0,n.useState)(!t||t&&o<r);e.current&&o++;const s=(0,n.useRef)();return(0,n.useEffect)((()=>{if(o--,!l)return s.current=setTimeout((()=>{i(!0)}),0),()=>clearTimeout(s.current)}),[]),e.current=!1,l}},97989:(e,t,r)=>{r.d(t,{Z:()=>l});var n=r(24328),a=r.n(n);function o(){return o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},o.apply(this,arguments)}const l=e=>a().createElement("svg",o({width:18,height:18,viewBox:"0 0 18 18",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},e),a().createElement("defs",null,a().createElement("path",{d:"M19 16v3H5v-3H3v3c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-3h-2zm-6-3.33l2.59-2.58L17 11.5l-5 5-5-5 1.41-1.41L11 12.67V3h2v9.67z",id:"Download_svg__a"})),a().createElement("g",{transform:"translate(-3 -3)",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a().createElement("mask",{id:"Download_svg__b",fill:"#fff"},a().createElement("use",{xlinkHref:"#Download_svg__a"})),a().createElement("path",{fillOpacity:.54,fill:"#fff",mask:"url(#Download_svg__b)",d:"M0 0h24v24H0z"})))}}]);