@reltio/remotes 1.4.1084 → 1.4.1085
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/5092.js +1 -1
- package/9002.js +1 -1
- package/package.json +1 -1
package/5092.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[5092],{67462:(e,t,r)=>{r.d(t,{Z:()=>i});var n=r(24328),a=r.n(n),l=r(27536);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}},85777:(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(40435),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))}},17998:(e,t,r)=>{r.d(t,{Z:()=>c});var n=r(24328),a=r.n(n),l=r(15223),o=r(90436);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.Z,{className:n.title,classes:{root:u.title},variant:"h6"},t),r)}},89925:(e,t,r)=>{r.d(t,{J:()=>$});var n=r(24328),a=r.n(n),l=r(95544),o=r(87918),i=r.n(o),s=r(86689),c=r(90436),u=r(43054),p=r(98538),m=r(39475),d=r(52730),g=r(71153),b=r.n(g),f=r(35674),h=r(22241),y=r(63929),x=r(18527);const v=(e,t)=>{const r=e.relatedObjectUris.indexOf(t);if(r>=0)return e.relatedObjectUris[1-r]},E=e=>`${i().date(e,"LT")} ${i().date(e,"LL")}`;var w=r(79692);const C=(0,w.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"}}))),O=e=>{let{comment:t,className:r}=e;const o=C(),s=(0,d.useSelector)(f.ZP.selectors.getEntity),u=(0,d.useSelector)(f.ZP.selectors.getMetadata),p=(0,n.useContext)(y.X);return a().createElement(l.Z,{className:r},(()=>{switch(t.objectType){case h.q7e.ENTITY_ATTRIBUTE:{const e=(0,h.AFK)(t.objectId,s.type),r=(0,h.zeJ)(u,e);return a().createElement(a().Fragment,null,a().createElement(c.Z,{className:o.title},i().text("Selected attribute:")),a().createElement(c.Z,{className:o.label},null==r?void 0:r.label))}case h.q7e.ENTITY:return a().createElement(a().Fragment,null,a().createElement(c.Z,{className:o.title},i().text("Selected profile:")),a().createElement(x.Z,{className:b()(o.label,o.link),value:(0,h.wwR)(s)},(0,h.idV)(s.label)));case h.q7e.RELATION:{var e;const r=v(t,s.uri),n={uri:r,label:null===(e=p[r])||void 0===e?void 0:e.label};return a().createElement(a().Fragment,null,a().createElement(c.Z,{className:o.title},i().text("Selected relation:")),a().createElement(c.Z,{className:o.label},a().createElement(x.Z,{className:o.link,value:(0,h.wwR)(s)},(0,h.idV)(s.label)),r&&a().createElement(a().Fragment,null,` ${i().text("to")} `,a().createElement(x.Z,{className:o.link,value:(0,h.wwR)(n)},n.label?(0,h.idV)(n.label):(0,h.BTI)(n)))))}case h.q7e.POTENTIAL_MATCH:{var r;const e=v(t,s.uri),n={uri:e,label:null===(r=p[e])||void 0===r?void 0:r.label};return a().createElement(a().Fragment,null,a().createElement(c.Z,{className:o.title},i().text("Selected potential match:")),a().createElement(c.Z,{className:o.label},a().createElement(x.Z,{className:o.link,value:(0,h.wwR)(s)},(0,h.idV)(s.label)),e&&a().createElement(a().Fragment,null,` ${i().text("and")} `,a().createElement(x.Z,{className:o.link,value:(0,h.wwR)(n)},n.label?(0,h.idV)(n.label):(0,h.BTI)(n)))))}default:return null}})())};var N=r(89575);const T=(0,w.Z)((e=>({root:{color:e.palette.text.primary,fontSize:"13px",lineHeight:"15px",wordBreak:"break-word"}}))),Z=e=>{let{comment:t,className:r}=e;const l=T(),o=(0,n.useContext)(N.s);return a().createElement(c.Z,{className:b()(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 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=o.find((t=>t.username===e.slice(1)));return t?a().createElement(s.Z,{href:`mailto:${t.email}`},e):e})).map(((e,t)=>a().createElement(n.Fragment,{key:t},e))))};var S=r(43434);const k=(0,w.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:b()(l.root,t)}),r.split(".").map((e=>e[0].toUpperCase())).join(""))};var I=r(58142);const L=(0,w.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:o,comment:g,onStartEditing:b}=e;const h=L(),y=(0,d.useSelector)(f.ZP.selectors.getUserName),x=g.createdBy===y,{resolveThread:v,reOpenThread:w,sending:C,deleteComment:N}=(0,n.useContext)(I.h),T=(0,n.useMemo)((()=>[{text:i().text("Edit"),onClick:b},{text:i().text("Delete"),onClick:()=>N({uri:o,commentId:g.commentId})}]),[b,N,o,g]);return a().createElement(l.Z,{className:r},a().createElement(l.Z,{className:h.header},a().createElement(P,{classes:{root:h.avatar}},g.createdBy),a().createElement(l.Z,{width:"100%"},a().createElement(c.Z,{className:h.username},g.createdBy)),a().createElement(c.Z,{className:h.createdAt},E(g.createdTime)),x&&a().createElement(p.Z,{buttonComponent:m.k,buttonProps:{icon:u.Z,tooltipTitle:i().text("Open menu")},popoverProps:{PopoverClasses:{root:h.dropdownMenu}},menuItems:T,menuId:"collaboration-comment-menu"})),a().createElement(l.Z,{className:h.body},a().createElement(O,{comment:g,className:h.commentTarget}),a().createElement(Z,{comment:g,className:h.message}),a().createElement(l.Z,{className:h.buttons},a().createElement(s.Z,{className:h.button,onClick:t,component:"button"},i().text("Reply")),"open"===g.status&&a().createElement(s.Z,{disabled:C,className:h.button,onClick:()=>{v({commentId:g.commentId,uri:o})},component:"button"},i().text("Resolve")),"resolved"===g.status&&a().createElement(s.Z,{disabled:C,className:h.button,onClick:()=>{w({commentId:g.commentId,uri:o})},component:"button"},i().text("Re-open")))))},D=(0,w.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:o,createdTime:s}=r,u=D();return a().createElement(l.Z,{className:b()(u.root,t)},a().createElement(P,{classes:{root:u.avatar}},n),a().createElement(l.Z,null,a().createElement(l.Z,{className:u.header},a().createElement(c.Z,{className:u.username},n),"resolve"===o&&a().createElement(c.Z,{className:u.marked},i().text("Marked as resolved")),"reopen"===o&&a().createElement(c.Z,{className:u.marked},i().text("Re-opened"))),"resolve"!==o&&a().createElement(Z,{className:u.message,comment:r}),a().createElement(c.Z,{className:u.createdAt},E(s))))};var V=r(77277),M=r(17440),U=r(2271);const z=(0,w.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 _(){return _=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},_.apply(this,arguments)}const B=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=z(),i=(0,n.useContext)(N.s);return a().createElement(U.r,_({},l,{onChange:(e,r,n,a)=>{t(r,n,(0,M.uniq)(a.map((e=>{let{display:t}=e;return t.slice(1)}))))},className:b()(o.root,r)}),a().createElement(U.p,{trigger:"+",data:i.map((e=>{let{username:t}=e;return{id:t,display:t}})),displayTransform:(e,t)=>`+${t}`,appendSpaceOnAdd:!0,className:o.mention}))},H=(0,w.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 W=r(29627);const F=e=>{switch(e){case"open":return i().text("Reply...");case"resolved":return i().text("Adding a comment will re-open this");default:return""}},q=e=>{let{inputRef:t,className:r,uri:o,relatedObjectUris:s,objectType:c,popperRef:u,comment:p,isEditingComment:m,onCancel:g}=e;const h=H(),y=(0,d.useSelector)(f.ZP.selectors.getUserName),{createReply:x,createComment:v,sending:E,editComment:w}=(0,n.useContext)(I.h),[C,O]=(0,n.useState)(""),[N,T]=(0,n.useState)(""),[Z,S]=(0,n.useState)([]),[k,A]=(0,n.useState)(!1),L=(0,W._)(),j=""!==C.trim(),D=k||j,R=null==p?void 0:p.status,U=(e,t,r)=>{S(r),O(e),T(t)},z=()=>{null==g||g(),U("","",[])};return(0,n.useEffect)((()=>{u&&u.current.update()}),[u,D]),(0,n.useEffect)((()=>{m?O(p.content):z()}),[m]),a().createElement(l.Z,{className:b()(h.root,r)},a().createElement("form",{onSubmit:e=>{e.preventDefault();const t=(0,M.cond)([[(0,M.always)(!p),()=>v({content:N,namedUsers:Z,objectType:c,uri:o,relatedObjectUris:s})],[(0,M.always)(m),()=>w({content:N,namedUsers:Z,commentId:p.commentId,objectType:c,replies:p.replies,relatedObjectUris:s,uri:o})],[M.T,()=>x({content:N,namedUsers:Z,commentId:p.commentId,action:"open"===p.status?"none":"reopen",uri:o})]]);return L(t()).then(z).catch(console.log)},className:h.form},a().createElement(l.Z,{className:h.main},a().createElement(P,{classes:{root:h.avatar}},y),a().createElement(B,{className:h.textField,disabled:E,onChange:(e,t,r)=>{U(e,t,r)},inputRef:t,value:C,onFocus:()=>A(!0),onBlur:()=>A(!1),placeholder:F(R)})),D&&a().createElement(l.Z,{className:h.buttons},a().createElement(V.Z,{className:h.button,variant:"contained",color:"primary",disabled:!j||E,type:"submit"},((e,t)=>t?i().text("Edit"):"open"===e||"resolved"===e?i().text("Reply"):i().text("Comment"))(R,m)),a().createElement(V.Z,{disabled:E,onClick:()=>z(),className:h.button,variant:"outlined",color:"primary"},i().text("Cancel")))))},Y=(0,w.Z)((()=>({root:{maxWidth:"100%",padding:"8px 4px 10px 16px"},messages:{},repliedComment:{marginBottom:"2px"},replies:{marginLeft:"40px"},sendMessageArea:{marginLeft:"40px"},comment:{}}))),$=(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=Y({classes:i}),[d,g]=(0,n.useState)(!1),b=a().createElement(q,{className:m.sendMessageArea,inputRef:p,popperRef:s,uri:t,relatedObjectUris:r,objectType:o,comment:u,onCancel:()=>g(!1),isEditingComment:d});return a().createElement(l.Z,{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(l.Z,{className:m.replies},u.replies.map((e=>a().createElement(R,{key:e.replyId,className:m.repliedComment,reply:e}))))),b),!u&&b)}))},72316:(e,t,r)=>{r.d(t,{Z:()=>I});var n=r(24328),a=r.n(n),l=r(71153),o=r.n(l),i=r(79692),s=r(62901);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(55962),p=r(58142),m=r(38309),d=r(87918),g=r.n(d),b=r(80030);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.ZP,{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.ZP,{title:g().text("Add comment")},a().createElement("div",{className:o()(n.root,t),onClick:r},a().createElement(w,{className:n.icon})))};var O=r(95544),N=r(90436),T=r(27291),Z=r(89925),S=r(39475),k=r(80233);const A=(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"}}))),P=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=A({scrollWidth:u,hasScroll:0!==u}),b=(0,n.useRef)(null),{resolveThread:f,loading:h,sending:y}=(0,n.useContext)(p.h),x=1+(null==c?void 0:c.replies.length);return a().createElement(k.Z,{popperRef:b,anchorEl:o,open:s,placement:"right-start",onClose:i,className:d.popper},a().createElement(O.Z,{className:d.header},a().createElement(O.Z,{className:d.headerInfo},a().createElement(N.Z,{className:d.title},g().text("Comments")),c&&!h&&a().createElement(N.Z,{className:d.counter},g().number(x)," ",1===x?g().text("item"):g().text("items"))),c&&!h&&a().createElement(S.k,{className:d.resolveButton,size:"S",onClick:()=>{f({commentId:c.commentId,uri:t})},disabled:y,showForDisabled:!0,tooltipTitle:g().text("Resolve"),icon:T.Z,color:"primary"})),!h&&a().createElement(Z.J,{popperRef:b,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}))},I=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:N,clearCurrentComment:T,objectTypes:Z}=(0,n.useContext)(p.h),S=!!O&&(!Z||Z.includes(l)),k=((null==O?void 0:O[r])||[]).filter((e=>{let{status:t}=e;return"resolved"!==t})).reverse(),A=!d||d&&0===k.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 S&&a().createElement("div",{className:o()(b.root,t)},A&&a().createElement(C,{className:o()(b.addButton,{[b.showAlways]:g||I}),onClick:e=>{h(e.currentTarget),x(!0)}}),k.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=>{N(e),x(!0)})(r)},1+t)})),a().createElement(P,{anchorEl:f,open:E,onClose:()=>{h(null),T(),x(!1)},uri:r,relatedObjectUris:j,objectType:l,comment:w}))}},98538:(e,t,r)=>{r.d(t,{Z:()=>w});var n=r(24328),a=r.n(n),l=r(71153),o=r.n(l),i=r(17440),s=r(77277),c=r(48348),u=r(55962),p=r(12231),m=r(90436),d=r(78223),g=r(79692),b=r(41128);const f=(0,g.Z)((e=>({buttonRoot:{"&$selected":{color:e.palette.action.active,backgroundColor:(0,b.U1)(e.palette.action.active,.12),"&:hover":{backgroundColor:(0,b.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}}))),h=(0,d.Z)(p.Z),y=(0,n.forwardRef)(((e,t)=>{let{item:r,onMenuClose:n=i.identity}=e;const l=f(),{disabled:o,text:s,tooltip:c,onClick:u,id:p=""}=r;return a().createElement(h,{tooltipTitle:c,showForDisabled:!0,classes:{root:l.menuItem},onClick:e=>{n(e),u(e)},disabled:o,ref:t,"data-modal":!0,"data-reltio-id":`reltio-search-menu-item${p}`},a().createElement(m.Z,{classes:{root:l.menuText}},s))}));y.displayName="MenuItemRenderer";const x=y;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 E(e){let{className:t,menuId:r,buttonComponent:l=s.Z,buttonContent:p,menuItems:m=[],buttonProps:d={},popoverProps:g={},onMenuOpen:b=i.identity,onMenuClose:h=i.identity,MenuItemRenderer:y=x}=e;const E=l,w=f(),C=(0,n.useRef)(),[O,N]=(0,n.useState)(!1);(0,u.D)((()=>{O?b():h()}),[O]);const T=(0,n.useCallback)((e=>{null==e||e.stopPropagation(),N((e=>!e))}),[]);return a().createElement(a().Fragment,null,a().createElement(E,v({ref:C,className:o()(w.buttonRoot,{[w.selected]:O},t),onClick:T,"aria-pressed":O,"aria-controls":O?r:void 0,"aria-haspopup":"true"},d),p),a().createElement(c.Z,v({id:r,variant:"menu",open:O,autoFocus:!1,classes:{paper:w.paper},anchorEl:C.current,onClose:T,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},elevation:2,getContentAnchorEl:null,MenuListProps:{autoFocusItem:O}},g),m.map(((e,t)=>a().createElement(y,{item:e,key:t,onMenuClose:T})))))}E.displayName="DropDownMenuButton";const w=E},37573:(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(43434),c=r(22241),u=r(35674);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.Z,{className:i()(r,n),src:m,imgProps:{onError:g}},a().createElement("img",{className:n,src:d,alt:"fallback entity avatar",onError:g}))}},42662:(e,t,r)=>{r.d(t,{Z:()=>c});var n=r(24328),a=r.n(n),l=r(52730),o=r(35674),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}},55401:(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(90436),s=r(95063);const c=e=>{let{className:t,message:r}=e;const n=(0,s.y)();return r?a().createElement(i.Z,{variant:"caption",className:o()(n.caption,t)},r):null}},93555:(e,t,r)=>{r.d(t,{Z:()=>m});var n=r(71153),a=r.n(n),l=r(55401),o=r(42494),i=r(74828),s=r(24328),c=r.n(s),u=r(95063);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.Z,{className:a()(d.helperText,null==s?void 0:s.helperText)},c().createElement(l.Z,{message:t})))}))},95063:(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"}})))},94792:(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)}},26729:(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(22241);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)}))},22349:(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(77277),p=r(43054),m=r(40435),d=r(98538),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(36746),v=r(79573);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,N=E(),[T,Z]=(0,n.useState)(!1),S=(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]),k=e=>()=>(0,i.ifElse)((0,i.equals)(!0),g,b)(e),A=r&&(l||T||s),P=!s&&!l&&T,I=r&&l;return a().createElement("div",{className:c()(N.overlay,{[N.selected]:l,[N.selectionMode]:s}),onMouseEnter:()=>Z(!0),onMouseLeave:()=>Z(!1),onClick:s?k(l):e=>{e.currentTarget===e.target&&O()}},A&&a().createElement(y,{className:N.checkedIcon,checked:l,onClick:k(l)}),P&&a().createElement("div",{className:N.actions},a().createElement(m.Z,{onClick:C,className:N.actionButton,icon:x.Z}),a().createElement(d.Z,{menuId:`image-overlay-actions-${t}`,buttonComponent:m.Z,buttonProps:{icon:p.Z,className:c()(N.actionButton,N.dropDownMenuButton)},menuItems:S})),I&&a().createElement(u.Z,{className:N.button,variant:"outlined",onClick:g},o().text("Deselect")))}))},95596:(e,t,r)=>{r.d(t,{C:()=>v,A:()=>x});var n=r(24328),a=r.n(n),l=r(87918),o=r.n(l),i=r(8629),s=r(38724),c=r(70331),u=r(15223),p=r(95544),m=r(87685),d=r(73115);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: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 f=r(39475),h=r(4270);const y=(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 x;!function(e){e.GALLERY_MODE="gallery",e.DETAILS_MODE="details"}(x||(x={}));const v=e=>{let{open:t,mode:r,children:l,header:g,onClose:v,onChangeMode:E}=e;const w=y(),C=(0,n.useMemo)((()=>[{id:x.GALLERY_MODE,title:o().text("Gallery"),Icon:d.Z},{id:x.DETAILS_MODE,title:o().text("Details"),Icon:b}]),[]);return a().createElement(i.Z,{classes:{paper:w.paper},open:t,BackdropProps:{className:w.backdrop},fullScreen:!0},a().createElement(c.Z,{classes:{colorPrimary:w.appBar}},a().createElement(u.Z,{className:w.toolbar},a().createElement(p.Z,{className:w.headerLeft},a().createElement(f.k,{tooltipTitle:o().text("Close"),onClick:v,className:w.closeButton,iconClassName:w.closeIcon,icon:m.default}),null==g?void 0:g.left),a().createElement(p.Z,{className:w.headerCenter},a().createElement(h.Z,{modes:C,modeId:r,onChange:E,className:w.modeSwitcher})),a().createElement(p.Z,{className:w.headerRight},null==g?void 0:g.right))),a().createElement(s.Z,{className:w.content},l))}},87378:(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(67358);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.Z,{color:"secondary"})))}},4270:(e,t,r)=>{r.d(t,{Z:()=>g});var n=r(24328),a=r.n(n),l=r(77277),o=r(38592),i=r(71153),s=r.n(i),c=r(78223),u=r(79692),p=r(41128);const m=(0,u.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,p.U1)(e.palette.primary.main,.12),fill:e.palette.primary.main,color:e.palette.primary.main,"&:hover":{backgroundColor:(0,p.U1)(e.palette.primary.main,.24)}}}))),d=(0,c.Z)(l.Z),g=e=>{let{className:t,classes:r={},modes:n=[],modeId:l,onChange:i}=e;const c=m();return a().createElement(o.Z,{className:t},n.map((e=>{let{id:t,title:n,tooltipTitle:o,Icon:u}=e;return a().createElement(d,{key:String(t),className:s()(c.button,{[c.current]:l===t},r.button),tooltipTitle:o,onClick:(p=t,()=>i(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})))}},80233:(e,t,r)=>{r.d(t,{Z:()=>m});var n=r(24328),a=r.n(n),l=r(71153),o=r.n(l),i=r(27556),s=r(1292),c=r(95544),u=r(7421);const p=(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)"}}}})),m=e=>{let{anchorEl:t,placement:r="top",arrow:n=!0,open:l,onClose:m=(()=>{}),children:d,className:g,popperRef:b}=e;const f=p(),[h,y]=a().useState(null);return a().createElement(u.Z,{anchorEl:t,placement:r,className:o()(f.popper,g),modifiers:{preventOverflow:{enabled:!0,boundariesElement:"window"},arrow:{enabled:n,element:h}},open:l,modal:!1,popperRef:b},a().createElement(c.Z,null,a().createElement(s.Z,{onClickAway:e=>{var t;t=e.target,Array.from(document.querySelectorAll("[data-modal]")).some((e=>e.contains(t)))||m()}},a().createElement(i.Z,{className:f.popoverRoot},n?a().createElement("span",{className:f.arrow,ref:y}):null,a().createElement(c.Z,null,d)))))}},33662:(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(50581),m=r(87685),d=r(21853),g=r(79573),b=r(40435),f=r(15311);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,N]=(0,o.useState)(""),T=(0,l.pipe)((0,l.tap)(n),N),Z=(0,l.isNil)(t)?O:t;return i().createElement(u.Z,h({startAdornment:i().createElement(p.Z,{position:"start"},i().createElement(d.default,{className:C.icon})),endAdornment:i().createElement(p.Z,{position:"end"},Z.length>0&&i().createElement(b.Z,{icon:m.default,className:C.clearButton,onClick:()=>T("")})),autoFocus:r,classes:y({},x,{input:a()(C.input,x.input),root:a()(C.container,x.root)}),placeholder:E,value:Z,onChange:(0,l.pipe)(g.NA,T),disableUnderline:!0,ref:s},w))}))},15311:(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)"}})))},22311:(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(54275),p=r(33662);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))}},26638:(e,t,r)=>{r.d(t,{t:()=>o});var n=r(24328),a=r(17440),l=r(63485);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}}},54275:(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}}})))},14699:(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(32701),s=r(90436);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.Z,u({className:o()(p.label,n),component:"span"},l),t,r&&a().createElement(i.Z,null))}},63485:(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(41008);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]),N={topMargin:0},T=(0,n.useMemo)((()=>!h||(t||[]).some((e=>null!==e.titleItemIndex))),[t,h]),Z=(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]),S=(0,n.useCallback)((e=>t[e].titleItemIndex),[t]),k=(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),A();const e=(e=>{const t=e.findIndex((e=>e.item.moveTo));if(t>-1){Z(t);const e=S(t);return{offset:O.current[t],titleHeight:r(e,k(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)}))}}),[Z,k,r,S,d,O,t,E]);const A=()=>{C.current&&w.current&&(C.current.style.width=w.current.offsetWidth+"px")},P=(0,n.useCallback)((e=>{let r=null,n=0;return t.some(((t,a)=>{Z(a+10);const l=O.current[a+1];return e>=n&&e<l&&(r={index:a,offset:n,listItem:t}),n=l,r})),r}),[Z,O,t]),I=(0,n.useCallback)((e=>r(e,k(e).item)),[k,r]),L=(0,n.useCallback)((e=>{let{index:t,style:r,data:n}=e;const a=k(t);return a.item&&(p(a)&&o(r,a.item)||l(r,a.item,t,n))}),[k,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||!T)return;const l=P(n),o=l&&S(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",N.index=i):e.style.visibility="hidden"}))),A();const s=null!==o&&r(o,k(o).item),c=P(n+s+N.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=>(Z(e),O.current[e]))(e);e>-1&&n<r&&s>=r-n&&(u=s-(r-n))}}(e=>{C.current&&(N.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},41008:(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}}},52239:(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)}},43253:(e,t,r)=>{r.d(t,{Z:()=>Ne});var n=r(24328),a=r.n(n),l=r(52730),o=r(44443),i=r(90436),s=r(35674),c=r(22241),u=r(65510),p=r(17440),m=r(95544),d=r(45203),g=r(15762),b=r(71153),f=r.n(b),h=r(26729),y=r(40435),x=r(79692);const v=(0,x.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%)"}})));var E=r(60905);const w=(0,x.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)"}}))),C=e=>{let{attributeValues:t,setAttributeValueIndex:r,attributeValueIndex:l}=e;const o=w(),i=(0,n.useRef)(null);return(0,n.useEffect)((()=>{if(null!=i&&i.current){const e=i.current.scrollLeft,t=i.current.offsetWidth+e,r=96*l+16*l+12;t<r?i.current.scroll&&(r>t+96+16?i.current.scroll(r,0):i.current.scroll(112+e,0)):e+96>r&&i.current.scroll&&i.current.scroll(r-96,0)}}),[l,i]),a().createElement("div",{ref:i,className:o.thumbnails},a().createElement(E.Z,{container:!0,wrap:"nowrap",direction:"row",spacing:1,className:o.gridContainer},t.map(((e,t)=>{let{uri:n,value:i}=e;return a().createElement(E.Z,{item:!0,key:n},a().createElement(h.Z,{onClick:()=>r(t),className:f()(o.thumb,{[o.inactiveThumb]:l!==t}),src:(0,c.efz)({value:i})}))}))))},O=e=>{let{className:t,attributeValues:r,attributeValueIndex:n,setAttributeValueIndex:l}=e;const o=v(),i=r[n],s=(0,c.QXK)(i);return a().createElement("div",{className:f()(o.root,t)},a().createElement("div",{className:o.main},n>0&&a().createElement(y.Z,{icon:d.Z,className:f()(o.arrowButton,o.arrowButtonPrev),onClick:()=>{l(n-1)},size:"XL"}),a().createElement(h.Z,{containerClassName:o.mainImageContainer,className:o.mainImage,size:s&&h.f.OVERRIDE,src:s}),n!==r.length-1&&a().createElement(y.Z,{icon:g.Z,className:f()(o.arrowButton,o.arrowButtonNext),onClick:()=>{l(n+1)},size:"XL"})),a().createElement(C,{attributeValues:r,attributeValueIndex:n,setAttributeValueIndex:l}))};var N=r(87918),T=r.n(N),Z=r(21324),S=r(5806),k=r(33016),A=r(36138),P=r(85256),I=r(89913),L=r(95038),j=r.n(L);const D={get CreationTime(){return T().text("Creation Time")},get CreationDate(){return T().text("Creation Date")},get Dimensions(){return T().text("Dimensions")},get MimeType(){return T().text("Mime Type")},get Size(){return T().text("Size")},get Url(){return T().text("Full image URL (S3)")},get UrlPreview(){return T().text("Preview image URL (S3)")},get UrlThumbnail(){return T().text("Small image URL (S3)")},get CdnUrl(){return T().text("Full image URL (CDN)")},get CdnUrlPreview(){return T().text("Preview image URL (CDN)")},get CdnUrlThumbnail(){return T().text("Small image URL (CDN)")}},R=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)?j()(e.CreationTimestamp[0].value).format("MM-DD-YYYY"):"CreationTime"===t&&(0,p.path)(["CreationTimestamp",0,"value"],e)?j()(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} ${T().text("pixels")}`:"Size"===t&&(0,p.path)(["Size",0,"value"],e)?`${(Number(e.Size[0].value)/1e3).toFixed(2)} KB`:void 0},V=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.filter((e=>{let{system:t}=e;return!t}))},M=(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}))},U=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=V(t.attributes);return M(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}),[])},z=e=>["Url","UrlPreview","UrlThumbnail","CdnUrl","CdnUrlPreview","CdnUrlThumbnail"].includes(e),_=(0,x.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:{}}),B=e=>{let{attributeType:t,onAddAttributes:r,uri:l}=e;const o=_(),s=V(t.attributes),c=Boolean(r);return a().createElement(m.Z,null,a().createElement(i.Z,{className:f()(o.title,{[o.canAdd]:c})},T().text("Meta info")),c&&a().createElement(n.Fragment,null,a().createElement(I.Z,{label:T().text("Attributes"),data:s,dense:!1,onApply:e=>{r&&r(e.map((e=>({attributeType:e,parentUri:l}))))}}),a().createElement(P.Z,{className:o.divider})))};var H=r(47972);const W=(0,x.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"}}))),F=e=>{let{title:t,content:r,isLink:n,children:l}=e;const o=W();return a().createElement("div",{className:o.root},a().createElement("span",{className:o.title},t),n?a().createElement("a",{className:o.link,href:r},T().text("link")):a().createElement("span",{className:o.content},r||l))},q=(0,x.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"}}),Y=e=>{let{attributeValue:t,attributeType:r,imageAttributeFieldsOrder:n}=e;const o=q(),i=(0,l.useSelector)(s.ZP.selectors.getIsViewMode),c=(u=t,p=n,M(Object.keys(D),p).map((e=>R(u,e)?{title:D[e],value:R(u,e),isLink:z(e)}:null)).filter(Boolean));var u,p;const d=U(t,r,n);return a().createElement(m.Z,{className:o.root},c.map((e=>{let{title:t,value:r,isLink:n}=e;return a().createElement(F,{key:t,isLink:n,title:t,content:r})})),i&&d.map((e=>{let{attrType:r,values:n}=e;return a().createElement(H.Z,{key:r.uri,attributeType:r,drawLines:!1,values:n,titleClassName:o.title,contentClassName:o.content,parentUri:t.uri})})))};var $=r(77277),X=r(92203);const G=(0,x.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"}}),K=e=>{let{attributeType:t,imageAttributeFieldsOrder:r,attributeValue:n,hasChanges:l,onDeleteAttribute:o,onChangeAttribute:i,onAddAttributes:s,onCancel:u,onApply:p,mode:d}=e;const g=G(),b=U(n,t,r),f=0!==b.length||0===b.length&&l;return a().createElement(m.Z,{className:g.root},a().createElement(m.Z,{className:g.form},b.map((e=>{let{attrType:t,values:r}=e;return a().createElement(X.ZP,{key:t.uri,parentUri:n.uri,attributeType:t,values:r,showEmptyEditors:(0,c.ZiX)(n.uri),mode:d,drawLines:!1,onDeleteAttribute:o,onChangeAttribute:i,onAddAttributes:s})}))),f&&a().createElement(a().Fragment,null,a().createElement(P.Z,{className:g.divider}),a().createElement(m.Z,{className:g.actions},a().createElement($.Z,{disabled:!l,onClick:u,className:g.cancelButton},T().text("Cancel")),a().createElement($.Z,{disabled:!l,onClick:p,color:"primary"},T().text("Apply")))))};var Q=r(12212);const J={palette:{type:"dark",primary:c.rSc.palette.primary,secondary:c.rSc.palette.secondary}},ee=(0,k.Z)(J),te=e=>{let{imageAttributeFieldsOrder:t,attributeType:r,attributeValue:o}=e;const{addAttributes:i,changeAttribute:u,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(A.ThemeProvider,{theme:ee},a().createElement(m.Z,null,a().createElement(B,{attributeType:r,uri:null==f?void 0:f.uri,onAddAttributes:x?i:void 0}),a().createElement(Y,{attributeType:r,attributeValue:f,imageAttributeFieldsOrder:t}),x&&a().createElement(K,{mode:y,imageAttributeFieldsOrder:t,attributeType:r,attributeValue:f,hasChanges:h,onDeleteAttribute:d,onChangeAttribute:u,onAddAttributes:i,onCancel:g,onApply:b})))},re=(0,x.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}}))),ne=e=>{let{className:t,attributeValue:r,handleSetAsDefault:o,attributeType:c}=e;const u=re(),p=(0,l.useSelector)(s.ZP.selectors.getEntity)||{},d=(0,l.useSelector)((e=>s.ZP.selectors.getModifiedEntity(e,null==p?void 0:p.uri)))||{},g=(0,l.useSelector)(s.ZP.selectors.getIsViewMode)?p:d,b=(0,l.useSelector)(s.ZP.selectors.getImageAttributesFieldsOrder)||{},h=b[null==p?void 0:p.type]||(null==b?void 0:b.default)||{},[y,x]=(0,n.useState)(!1);(0,n.useEffect)((()=>{x((null==g?void 0:g.defaultProfilePic)===(null==r?void 0:r.uri))}),[null==r?void 0:r.uri,g]);const v=(0,n.useCallback)((()=>{o(r.uri)}),[null==r?void 0:r.uri]);return a().createElement(m.Z,{className:f()(u.root,t)},a().createElement(m.Z,{className:u.header},a().createElement(i.Z,{className:u.headerTitle},T().text("Details"))),a().createElement(m.Z,{className:u.bodyWrapper},a().createElement(m.Z,{className:u.body},a().createElement(S.Z,{classes:{root:u.formControlLabel,label:u.checkboxLabel},control:a().createElement(Z.Z,{className:u.checkbox,checked:y,onChange:v,color:"default"}),label:T().text("Set as default")}),a().createElement(te,{attributeType:c,imageAttributeFieldsOrder:h,attributeValue:r}))))},ae=(0,x.Z)((()=>({root:{display:"flex",width:"100%",overflowY:"auto",height:"calc(100vh - 64px)"},main:{flex:"1 0 auto"},details:{width:"340px"}}))),le=e=>{let{attributeValues:t=[],currentAttributeValueUri:r,setCurrentAttributeValueUri:l,handleSetAsDefault:o,attributeType:i}=e;const[s,c]=(0,n.useState)(0);(0,n.useEffect)((()=>{u(r?t.findIndex((e=>e.uri===r)):0)}),[r,t]);const u=(0,n.useCallback)((e=>{var r;c(e),l(null===(r=t[e])||void 0===r?void 0:r.uri)}),[t]),p=ae();return a().createElement(m.Z,{className:p.root},a().createElement(O,{attributeValueIndex:s,setAttributeValueIndex:u,attributeValues:t,className:p.main}),a().createElement(ne,{handleSetAsDefault:o,attributeValue:t[s],className:p.details,attributeType:i}))};var oe=r(95596),ie=r(22349);const se=(0,x.Z)((()=>({root:{padding:"0 24px",overflowY:"auto",height:"calc(100vh - 64px)"},item:{padding:"2px"}}))),ce=e=>{let{items:t,selectedItems:r,onSelectImage:n,onDeselectImage:l,onShareLink:o,onSetAsDefault:i,onDownload:s,onClickImage:c,onDelete:u}=e;const p=se(),d=e=>a().createElement(ie.Z,{id:e,selected:r.includes(e),selectionMode:0!==r.length,onSelect:()=>n(e),onDeselect:()=>l(e),onShareLink:()=>o(e),onSetAsDefault:()=>i(e),onDownload:()=>s(e),onClick:()=>c(e),onDelete:u?()=>u(e):void 0,canBeSelected:!0});return a().createElement(m.Z,{className:p.root},a().createElement(E.Z,{container:!0},t.map((e=>{let{id:t,src:r}=e;return a().createElement(E.Z,{key:t,classes:{item:p.item},item:!0},a().createElement(h.Z,{size:h.f.LARGE,onClick:()=>c(t),src:r,overlay:d(t)}))}))))};var ue=r(86689);const pe=(0,x.Z)((e=>({selectButton:{fontSize:"14px",fontWeight:500,color:e.palette.primary.main,textTransform:"uppercase"}}))),me=e=>{let{selectedItems:t,items:r,onSelectAll:n,onClearAll:l}=e;const o=pe(),i=t.length===r.length;return a().createElement(ue.Z,{component:"button",underline:"none",classes:{button:o.selectButton},onClick:i?l:n},i?T().text("Clear selection"):T().text("Select all images"))};var de=r(94438),ge=r(22983),be=r(35292),fe=r(36746),he=r(39475);const ye=(0,x.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)"}}))),xe=e=>{let{onDownload:t,onShare:r,onUpload:n,onDelete:l}=e;const o=ye();return a().createElement(a().Fragment,null,n&&a().createElement($.Z,{variant:"contained",color:"primary",onClick:n,startIcon:a().createElement(de.Z,null)},T().text("Upload")),t&&n&&a().createElement("div",{className:o.divider}),t&&a().createElement(he.k,{className:o.downloadButton,tooltipTitle:T().text("Download selected items"),icon:fe.Z,onClick:t}),r&&a().createElement(he.k,{className:o.shareButton,tooltipTitle:T().text("Copy link"),icon:be.Z,onClick:r}),l&&a().createElement(he.k,{className:o.deleteButton,tooltipTitle:T().text("Delete selected items"),icon:ge.Z,onClick:l}))},ve=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)(oe.A.GALLERY_MODE),w=(0,l.useSelector)(s.ZP.selectors.getIsViewMode);(0,n.useEffect)((()=>{E(i?oe.A.DETAILS_MODE:oe.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)},N=e=>{const r=t.find((t=>{let{uri:r}=t;return r===e}));b(r)},T=e=>{h({uri:e,attributeType:m})},Z=v===oe.A.GALLERY_MODE,S=v===oe.A.DETAILS_MODE,k=y.length>0,A=S||Z&&k,P=!w&&A,I=!w&&(S||Z&&!k),L=Z&&k&&a().createElement(me,{items:C,selectedItems:y,onClearAll:()=>{x([])},onSelectAll:()=>{x((0,p.pluck)("id",C))}}),j=a().createElement(xe,{onDelete:P?()=>{(Z?y:[i]).forEach((e=>{T(e)})),y.length&&x([])}:void 0,onDownload:A?()=>{const e=Z?(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:S?()=>{O(i)}:void 0,onUpload:I?f:void 0});return a().createElement(oe.C,{mode:v,open:r,onChangeMode:E,header:{left:L,right:j},onClose:o},Z&&a().createElement(ce,{items:C,selectedItems:y,onSelectImage:e=>{x((t=>[...t,e]))},onDeselectImage:e=>{x((t=>t.filter((t=>t!==e))))},onShareLink:O,onSetAsDefault:N,onDownload:e=>{d([C.find((0,p.propEq)("id",e)).downloadURL])},onClickImage:e=>{u(e),E(oe.A.DETAILS_MODE)},onDelete:w?void 0:T}),S&&a().createElement(le,{handleSetAsDefault:N,setCurrentAttributeValueUri:u,currentAttributeValueUri:i,attributeValues:t,attributeType:m}))};var Ee=r(91446),we=r(94079);const Ce=(0,x.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,we.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 Oe(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Ne=e=>{let{attributeType:t,attributeValues:r=[],renderImage:p,overlay:m=!1,countFixedItems:d=0,children:g,onUpload:b,onDeleteAttribute:f,imageSize:h=Ee.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)(),N=Ce(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 T=(0,n.useRef)(),[Z,S]=(0,n.useState)(0),[k,A]=(0,n.useState)(0),P=(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)<Ee.lc;S(a),r.length>a?A(r.length-a+(l?1:0)):A(0)}),[r.length,d,h]),V=(0,n.useCallback)((e=>{R(e),T.current=e}),[R]);(0,n.useEffect)((()=>{T.current&&R(T.current)}),[r.length,R]);const M=(0,n.useCallback)((e=>{P||(D(e),L(!0))}),[P]),U=(0,n.useCallback)((()=>{L(!1)}),[]),z=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),_=e=>navigator.clipboard.writeText(e),B=(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){Oe(e,t,r[t])}))}return e}({onOpenImageGalleryDialog:M},m&&{onDownload:z,onShareLink:_,onSetAsDefault:B});return a().createElement(a().Fragment,null,a().createElement(o.Z,{handleWidth:!0,onResize:V}),a().createElement(ve,{attributeValues:r,open:I,onClose:U,setCurrentAttributeValueUri:D,currentAttributeValueUri:j,attributeType:t,onDownload:z,onShareLink:_,onSetAsDefault:B,onUpload:b,onDeleteAttribute:f}),a().createElement("div",{className:N.imageBox},g,r.slice(0,Z).map(p(H)),k>0&&a().createElement("div",{className:N.moreButtonContainer},a().createElement("div",{className:N.moreButton,onClick:()=>M()},a().createElement(i.Z,{className:N.number},`+${k}`)))))}},91446:(e,t,r)=>{r.d(t,{lc:()=>o,By:()=>i});var n=r(26729);const a=n.f.SMALL.imageWidth,l=n.f.SMALL.imageHeight,o=8,i={imageMargin:4,imageWidth:a,imageHeight:l}},37457:(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(7089),u=r(22241),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(67586);const b=(0,r(78223).Z)(c.Z),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},31569:(e,t,r)=>{r.d(t,{m:()=>S});var n=r(24328),a=r.n(n),l=r(52730),o=r(80030),i=r(35674),s=r(22241),c=r(17440),u=r(80687);const p=(e,t)=>{const r=(0,s.xy8)(e);return t.reduce(((t,n)=>{for(const a in n){const l=(e[r]||[]).find((e=>e.uri===a));return Array.isArray(n[a])&&"object"==typeof n[a][0]?t=(t||[]).concat(p(l,n[a])):(t.push(m(n[a],l)),t)}}),[])},m=(e,t)=>e&&e.length&&!(0,c.isNil)(e[0])&&""!==e[0]?{fieldName:(0,s.Tde)(t.uri),filter:t.type===s.oS0.TYPE_BLOB?s.j5E.FULL_TEXT:s.j5E.EQUALS,values:e}:{fieldName:(0,s.Tde)(t.uri),filter:"missing"},d=(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=g(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}),[])},g=(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(b(a,l)):a&&"object"==typeof a&&!Array.isArray(a)&&e.push(d(l,a,r,t))}return e}),[])},b=(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 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: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 y=r(87918),x=r.n(y),v=r(37573),E=r(18527),w=r(29627),C=r(79692);const O=(0,C.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"}}))),N=(0,C.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 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 Z=e=>{let{value:t,attributeType:r,config:o={},onSeeAllClick:c}=e;const[u,d]=(0,n.useState)([]),[g,b]=(0,n.useState)(0),f=(0,l.useSelector)(i.ZP.selectors.getEntity)||{},h=(0,w._)(),y=O(),C=(0,l.useSelector)(i.ZP.selectors.getGlobalSearchRequestOptions)||{},N=o.entityType||f.type,Z=g>6;(0,n.useEffect)((()=>{const e=function(e,t){let r=[{fieldName:"type",filter:"equals",values:[arguments.length>2&&void 0!==arguments[2]?arguments[2]:""]}];return Array.isArray(e)?r=r.concat(p(t,e)):r.push(m([e],t)),r}(t,r,N),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){T(e,t,r[t])}))}return e}({max:6},C);h(Promise.all([(0,s.ZOr)(e,n),(0,s.j_Q)(e,n)])).then((e=>{const[t,{total:r}]=e;d(Array.isArray(t)?t:[]),b(r)})).catch((()=>{d([]),b(0)}))}),[]);const S=Boolean(o.label);return a().createElement("div",{className:y.container},a().createElement("div",{className:y.header},a().createElement("div",{className:y.title},x().text("Pivot profiles")),a().createElement("div",{className:y.divider}),a().createElement("div",{className:y.headerCount},x().number(g,"0,0")+" "+(1===g?x().text("item"):x().text("items")))),S&&a().createElement("div",{className:y.entityTypeLabel},o.label),a().createElement("div",{className:y.body},u.map((e=>a().createElement("div",{key:e.uri,className:y.entityContainer},a().createElement(v.Z,{entity:e,avatarClassName:y.profileIcon}),a().createElement(E.Z,{className:y.entityLabel,value:(0,s.wwR)(e)},(0,s.idV)(e.label)))))),Z&&a().createElement("div",{className:y.footer},a().createElement("a",{className:y.seeAllButton,onClick:c},x().text("See all"))))},S=e=>{let{value:t,attributeType:r,children:p,className:m}=e;const g=N(),f=O(),y=(0,l.useDispatch)(),x=(0,n.useContext)(u.J)||[],v=(0,s.QZu)(r),E=(0,l.useSelector)(i.ZP.selectors.getMetadata)||{},w=v?d(r,t.value,x,E):b(t.lookupCode||t.value,r),C=x.some((e=>{let{uri:t}=e;return t===r.uri}))&&(Array.isArray(w)&&w.length||!Array.isArray(w)&&!(0,c.isNil)(w)),T=x.find((e=>{let{uri:t}=e;return t===r.uri})),S=()=>{const e=Array.isArray(w)?w.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,w);y(i.ui.actions.openPivotingPerspective({value:e,attributeType:r}))};return C?a().createElement(o.ZP,{interactive:!0,arrow:!0,placement:"right-start",classes:g,title:a().createElement(Z,{value:w,attributeType:r,config:T.popup,onSeeAllClick:S})},a().createElement("span",{className:m},a().createElement(h,{className:f.icon}),a().createElement("span",{className:f.content,onClick:S},p))):a().createElement(a().Fragment,null,p)}},30410:(e,t,r)=>{r.d(t,{Z:()=>u});var n=r(24328),a=r.n(n),l=r(22241),o=r(39390),i=r(3853),s=r(10768);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)}},76141:(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(22241),u=r(17440),p=r(92203),m=r(52239),d=r(89913),g=r(86602),b=r(26978);var f=r(1108);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:N,additionalControlsRenderer:T,showNonOv:Z}=e;const{attributes:S={}}=r,k=(0,n.useMemo)((()=>(0,c._kX)(i,t)),[t,i]),A=((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))})))(k,r),P=(0,n.useContext)(f.c),I=(0,n.useMemo)((()=>(0,c.Gtj)(t,i,r,o,Z,P)),[t,i,r,o,Z,P]),[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}),k.length>0&&a().createElement(d.Z,{label:s().text("More attributes"),onApply:D,dense:x,data:A})),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],S),parentUri:l,showEmptyEditors:o,mode:i,crosswalks:y,onAddAttributes:C,onChangeAttribute:O,onDeleteAttribute:N,additionalControlsRenderer:T,showNonOv:Z})})))};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)},63928:(e,t,r)=>{r.d(t,{Z:()=>v});var n=r(24328),a=r.n(n),l=r(22241),o=r(90436),i=r(17440),s=r(40901),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.Z,{variant:"caption",className:r.caption},y(t))};x.propTypes={cardinality:l.oA3};const v=x},92203:(e,t,r)=>{r.d(t,{ZP:()=>W});var n=r(52730),a=r(35674),l=r(22241),o=r(24328),i=r.n(o),s=r(17440),c=r(52239),u=r(66078),p=r(55401),m=r(14699),d=r(31992),g=r(35039),b=r(30410),f=r(63928),h=r(40901);const y=(0,s.filter)((0,s.propSatisfies)(l.ZiX,"uri"));var x=r(1108),v=r(37457);const E=e=>{let{max:t,values:r,attributeType:n,parentUri:a,mode:u,drawLines:E,showEmptyEditors:w,errorMessage:C,errors:O,paging:N,crosswalks:T,showNonOv:Z,nonVisibleValues:S,onAddAttributes:k,onDeleteAttribute:A,onChangeAttribute:P,onDeactivateError:I,additionalControlsRenderer:L,requestNextPageOfAttributeValues:j}=e;const D=(0,h.y)(),[R,V]=(0,o.useState)(t),[M,U]=(0,o.useState)(!1),{label:z,required:_,cardinality:B,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),X=(!M&&w||_||Y)&&$,G=(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 k(X&&!(0,l.YkM)(n.type)?[e,e]:[e])}),[R,k,a,n,X]),Q=(0,o.useCallback)((0,s.pipe)(A,s.T,U),[A,U]);if($&&!X)return null;if(X&&$&&(r=[G.current]),(0,l.O27)(r))return null;const J=(y(r)||[]).length,ee=Z?"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))(N),re=null!=N&&N.totalValues?N.totalValues-te:null==S?void 0:S.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:z,isRequired:_,className:D.title,"data-reltio-id":"reltio-attribute-label"}),i().createElement(v.Z,{nonOvValues:S,attributeType:n,className:D.ovIcon,nonOvTotal:re})),F&&i().createElement(f.Z,{cardinality:B}),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:X&&!_,showEmptyEditors:w,errors:O,ownError:(0,l.ADq)(e,t,n.uri,O),mode:u,crosswalks:T,onAddOneMore:ie===t?K:null,onAddAttributes:k,onDeleteAttribute:Q,onChangeAttribute:P,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(95544),C=r(90590),O=r(92145),N=r(79692);const T=(0,N.Z)({container:{display:"flex",flex:1,alignItems:"flex-start",marginBottom:"10px"},roleContainer:{width:"100%"},valueContainer:{marginLeft:"8px",width:0},deleteButton:{marginLeft:"8px"}});var Z=r(40435),S=r(22983);const k={MultiValue:O.Z},A=e=>{let{values:t,onChange:r,onDelete:c}=e;const u=T(),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:k,classes:u,className:u.roleContainer}),!!c&&i().createElement(Z.Z,{className:u.deleteButton,icon:S.Z,onClick:h,size:"L"}))};var P=r(7766);const I=(0,N.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(P.Z,{fullWidth:!0,multiple:!0,variant:"filled",className:t,value:r||[],onChange:m,getSuggestions:D}),!!c&&i().createElement(Z.Z,{className:u.deleteButton,icon:S.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 M(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const U=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),[N,T]=(0,o.useState)(!1),Z=(0,o.useCallback)((0,s.pipe)(u,s.T,T),[u,T]),S=(0,l.O27)(t),k=!N&&g&&S,P=(0,o.useRef)((0,l.gjI)({parentUri:n,attributeType:r}));return(0,l.j2U)(r)&&S&&!k?null:i().createElement(w.Z,{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.Z,{className:x.attributesWrapper},(()=>{switch(r.uri){case l.xPW.tags.uri:return i().createElement(R,{values:t,onDelete:Z,onChange:d});case l.xPW.roles.uri:return i().createElement(A,{values:t,onDelete:Z,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){M(e,t,r[t])}))}return e}({},P.current,{value:t[0]||""});return i().createElement(b.Z,V({attributeValue:e,attributeType:r,mode:a,onDeleteAttribute:Z,onChangeAttribute:d},y))}}})()))};function z(){return z=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},z.apply(this,arguments)}var _;!function(e){e.imageLine="imageLine",e.special="special",e.default="default"}(_||(_={}));const B=(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:N,requestNextPageOfAttributeValues:T}=e;const Z=(0,h.y)(),S=(0,s.partition)(l.OXP),[k,A]=S(t),P=x?t:k,I=x?[]:A,L={errorMessage:b,errors:g,mode:n,parentUri:d,onAddAttributes:v,onDeleteAttribute:w,onChangeAttribute:C,onDeactivateError:O,additionalControlsRenderer:N,showEmptyEditors:y};return(()=>{switch((0,s.cond)([[l.kqr,(0,s.always)(_.special)],[l.Or$,(0,s.always)(_.imageLine)],[s.T,(0,s.always)(_.default)]])(r)){case _.special:return i().createElement(c.Z,{enabled:o},i().createElement(U,z({values:P,attributeType:r},L)));case _.imageLine:return i().createElement(c.Z,{enabled:o},i().createElement("div",{className:Z.wrapper},i().createElement(m.Z,{label:null==r?void 0:r.label,"data-reltio-id":"reltio-attribute-label"}),i().createElement(u.Z,{attributeValues:P,attributeType:r,paging:p,onDeleteAttribute:w,parentUri:d,onChangeAttribute:C,requestNextPageOfAttributeValues:T,showNonOv:x})));default:return i().createElement(E,z({values:P,attributeType:r,max:f,paging:p,crosswalks:a,drawLines:o,requestNextPageOfAttributeValues:T,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)(B)},40901:(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"}})))},21548:(e,t,r)=>{r.d(t,{Z:()=>w});var n=r(24328),a=r.n(n),l=r(13980),o=r.n(l),i=r(71153),s=r.n(i),c=r(77277),u=r(40435),p=r(22983),m=r(90436),d=r(87918),g=r.n(d),b=r(22241);const f=(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 h=r(93555),y=r(76141),x=r(85777);function v(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const E=e=>{let{label:t,attributeTypesList:r,attributeType:l,attributeValue:o,children:i,errors:d,ownError:v,mode:E,metadata:w,crosswalks:C,lazy:O,showEmptyEditors:N,onAddOneMore:T,onAddAttributes:Z,onDeleteAttribute:S,onChangeAttribute:k,additionalControlsRenderer:A,hideDeleteButton:P,state:I,showNonOv:L}=e;const j=f(),D="deleted"===I,R="edited"===I,V=o.uri,M=(0,b.ZiX)(V),[U,z]=(0,n.useState)(M),_=(0,n.useMemo)((()=>(0,b.xv5)({attributeType:l,attributeValue:o,mode:E,metadata:w,isReltioCrosswalk:(0,b.KVV)(C,o)})),[l,o,E,w,C]),B=!D&&!P&&!!S&&_,H=(0,n.useMemo)((()=>(0,b.J6q)(o,d)),[d,o]);(0,n.useEffect)((()=>{H&&z(!0)}),[d,H]),(0,n.useEffect)((()=>{D&&z(!1)}),[D]);const W=(r||[]).some((e=>(0,b.kQw)(e))),F=(0,n.useMemo)((()=>({attributes:W?null:o.value,analyticsAttributes:W?o.value:null})),[o,W]),q=(0,b.e$p)(v)||H&&g().text("Has an incorrect value")||"";return O?a().createElement(c.Z,{variant:"text",color:"primary",onClick:T},"Create attribute"):a().createElement(a().Fragment,null,a().createElement("div",{className:j.editor},a().createElement("div",{className:j.titleContainer},a().createElement(x.Z,{onClick:()=>z((e=>!e)),expanded:U,className:j.expandButton,disabled:D}),a().createElement(h.Z,{errorMessage:q,classes:{helperText:j.errorWrapperHelperText}},a().createElement("div",{className:s()(j.label,{[j.deleted]:D}),"data-reltio-id":"reltio-attribute-complex-label"},t))),a().createElement("div",{className:j.actions},R&&a().createElement(m.Z,{variant:"caption",className:j.editedLabel},"(",g().text("edited"),")"),A&&A({attributeType:l,attributeValue:o}),B&&a().createElement(u.Z,{icon:p.Z,onClick:()=>S({uri:V,attributeType:l,attributeValue:o}),size:"L"}))),U&&a().createElement(y.Z,{attrTypes:r,entity:F,showEmptyEditors:N||M,drawLines:!0,parentUri:V,mode:E,crosswalks:C,onAddAttributes:Z,onChangeAttribute:k,onDeleteAttribute:S,additionalControlsRenderer:A,showNonOv:L},i))};E.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){v(e,t,r[t])}))}return e}({label:o().string,children:o().node,attributeTypesList:o().arrayOf(b.EMD),attributeValue:o().oneOfType([b.dMV,b.Rtp])},b.KVe);const w=E},54255:(e,t,r)=>{r.d(t,{Z:()=>b});var n=r(52730),a=r(35674),l=r(24328),o=r.n(l),i=r(13980),s=r.n(i),c=r(76141),u=r(22241);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)},72283:(e,t,r)=>{r.d(t,{Z:()=>Y});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(22241),p=r(84425),m=r(42662),d=r(12231),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.Z,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.Z,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),N=r(35674),T=r(90436),Z=r(12212);const S=e=>{const{selectProps:{currentEntityType:t,menuIsOpen:r,disableLinkClick:l},children:o,data:i}=e,p=f(),m=(0,O.useDispatch)(),d=(0,n.useContext)(Z.m),g=(0,O.useSelector)(N.ZP.selectors.getUIPath),b=(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:d}),N.ui.actions.openEntity,m)()},onClick:e=>e.preventDefault(),href:(0,u.ChB)({uiPath:g,uri:i.entityUri}),component:"a"};return!r&&a().createElement(T.Z,b,(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),P=r(61837);const I=e=>{const{selectProps:{onClear:t}}=e,r=y();return a().createElement(P.Z,{onClick:t},a().createElement(A.Z,{className:r.clearIcon}))};I.propTypes={selectProps:o().object.isRequired};const L=I;var j=r(54255),D=r(79573),R=r(92391),V=r(65549);const{Group:M}=R.F,U=e=>{const{selectProps:{inputValue:t,onCreate:r},data:n,children:l}=e,o=h();return a().createElement(M,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(V.Z,{className:o.addIcon}),s().text(`Create ${t?`"${t}" as `:""}new ${n.label}`))),l)};U.propTypes={selectProps:o().object.isRequired,data:o().object,children:o().array};const z=U,_=(0,g.Z)({creatorWrapper:{marginTop:"20px"}});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)}function H(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 W(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){F(e,t,r[t])}))}return e}function F(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const q=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=H(e,["entity","entityTypesUris","mode","max","onChange","onCreate","metadata","globalSearchRequestOptions","attributeTypesSelectionStrategy","disableLinkClick"]);const y=_(),[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=W({},g,{max:o}),N=m?(e,t)=>{m(t||r[0],e),v("")}:void 0,T=e=>{null!==e&&(v(""),i(e))},Z=(0,n.useMemo)((()=>1!==w.length),[w]),S=((0,c.isEmpty)(t)?w[0]:(0,u.nt9)(d,t.entityType))||{},A=m&&s().text(`Create ${x?`"${x}" as `:""}new ${S.label}`),P=s().text(`Select ${1===w.length?`${w[0].label} `:""}profile`),I=!(0,c.isEmpty)(t)&&(0,u.ZiX)(t.entityUri),R=Z?{Group:z,GroupHeading:D.Vd}:{},V=I?{ClearIndicator:L}:{},{TextFieldProps:M}=h,U=H(h,["TextFieldProps"]),F=(0,n.useMemo)((()=>W({},M||{},{"data-reltio-id":"reltio-entity-selector"})),[M]);return a().createElement(a().Fragment,null,a().createElement(p.Z,B({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=>W({},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:T,onCreate:N,onClear:()=>{T({})},label:P,createLabel:A,components:W({Option:E,SingleValue:k},R,V),currentEntityType:S,isClearable:!0,disableLinkClick:f,TextFieldProps:F},U)),I&&a().createElement("div",{className:y.creatorWrapper},a().createElement(j.Z,{mode:l,attributeTypesSelectionStrategy:b,entityType:S,entityUri:t.entityUri})))};q.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 Y=q},66078:(e,t,r)=>{r.d(t,{Z:()=>$});var n=r(24328),a=r.n(n),l=r(52730),o=r(94438),i=r(35674),s=r(22241),c=r(26729),u=r(22349),p=r(40435),m=r(87918),d=r.n(m),g=r(13896),b=r(58651),f=r(95544),h=r(8629),y=r(90436),x=r(87378),v=r(27556),E=r(74603),w=r(77277),C=r(79692);const O=(0,C.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}}))),N=e=>0===e.trim().length,T=e=>{let{onSend:t}=e;const r=O(),[l,o]=(0,n.useState)(""),[i,s]=(0,n.useState)(null);return a().createElement(f.Z,{className:r.root},a().createElement(v.Z,{className:r.paper},a().createElement(E.Z,{value:l,onChange:e=>{const t=e.target.value,r=new RegExp(/^(ftp|http|https):\/\/[^ "]+$/).test(t);o(t),r||N(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(w.Z,{disabled:Boolean(i)||N(l),variant:"outlined",color:"primary",onClick:()=>{t(l),o(""),s(null)}},d().text("Send"))),i&&a().createElement(y.Z,{className:r.errorMessage},i))};var Z=r(71153),S=r.n(Z),k=r(83997);const A=["image/png","image/jpeg","image/tiff","image/gif","image/bmp"],P=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:A.join(","),id:"upload-image-button",type:"file"}),a().createElement("label",{htmlFor:"upload-image-button"},a().createElement(w.Z,{className:t,variant:"contained",color:"primary",component:"span"},d().text("Select image"))))};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 L=e=>a().createElement("svg",I({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)"})))),j=(0,C.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"}}))),D=e=>{let{onAppendFile:t,className:r}=e;const n=j(),[{canDrop:l,isOver:o},i]=(0,g.useDrop)({accept:[k.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:S()(n.root,{[n.isActive]:s},r)},a().createElement(L,{className:n.icon}),a().createElement(y.Z,{className:n.title},d().text("Drag an image here")),a().createElement(y.Z,{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(P,{onAppendFile:t}))},R=(0,C.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"}}))),V=e=>{let{children:t,className:r}=e;const n=R();return a().createElement(f.Z,{className:S()(n.root,r)},a().createElement(f.Z,{className:n.border}),a().createElement(y.Z,{className:n.text},t),a().createElement(f.Z,{className:n.border}))};var M=r(87685),U=r(37265),z=r(39475);const _=(0,C.Z)({closeIcon:{color:"#fff"}}),B=e=>{let{error:t,onClose:r}=e;const n=_();return a().createElement(U.Z,{open:Boolean(t),onClose:r,message:t,action:a().createElement(z.k,{className:n.closeIcon,tooltipTitle:d().text("Close"),icon:M.default,onClick:r})})},H=(0,C.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"}}))),W=e=>{let{open:t,onClose:r,onUpload:o}=e;const c=H(),u=(0,l.useSelector)(i.ZP.selectors.getImageServicePath),p=(0,l.useSelector)(i.ZP.selectors.getEnvironment),m=(0,l.useSelector)(i.ZP.selectors.getTenant),[v,E]=(0,n.useState)(!1),[w,C]=(0,n.useState)(null),O=e=>{E(!0),(0,s.Ixr)({image:e,imageServicePath:u,environment:p,tenant:m}).then((e=>{o(e),r()})).catch((e=>C(e.errorMessage))).finally((()=>E(!1)))};return a().createElement(g.DndProvider,{backend:b.default},a().createElement(h.Z,{open:t,onClose:r,classes:{paper:c.dialogPaper}},a().createElement(y.Z,{className:c.title},d().text("Add new image")),a().createElement(f.Z,{className:c.body},a().createElement(D,{className:c.targetBox,onAppendFile:e=>{const t=Number((e.size/1024/1024).toFixed(2)),r=A.includes(e.type);t>20?C(d().text("File size exceeds configured max file size.")):r?O(e):C(d().text("File format is not supported."))}}),a().createElement(V,{className:c.divider},d().text("or")),a().createElement(T,{onSend:e=>{O(e)}})),v&&a().createElement(x.Z,null),a().createElement(B,{error:w,onClose:()=>C(null)})))};var F=r(43253),q=r(91446);const Y=(0,C.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=q.By}=e;const x=Y(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),N=(0,n.useCallback)((()=>{O((e=>!e))}),[]),T=(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]),Z=(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]),S=(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:()=>Z({uri:p,attributeType:t}),onDownload:()=>l([c]),onClick:()=>n(p)})};return a().createElement("div",{className:x.root},a().createElement(F.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:S(e,t),onClick:()=>l(n),size:{imageWidth:y.imageWidth,imageHeight:y.imageHeight},"data-reltio-id":"reltio-attribute-value"}))},overlay:!0,countFixedItems:1,onUpload:N,onDeleteAttribute:Z,imageSize:y,requestNextPageOfAttributeValues:g,paging:f,parentUri:b,showNonOv:h},a().createElement("div",{className:x.uploadContainer,onClick:N},a().createElement(p.Z,{className:x.uploadButton,iconClassName:x.uploadIcon,icon:o.Z}))),a().createElement(W,{open:C,onUpload:T,onClose:N}))}},89913:(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(77277);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(22311),d=r(33117),g=r(41008),b=r(63485),f=r(26638),h=r(65549),y=r(94792);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,N]=(0,n.useState)(""),[T,Z]=(0,n.useState)([]),S=(0,n.useCallback)(((e,t)=>{Z((0,c.ifElse)((0,c.always)(t),(0,c.append)(e),(0,c.reject)((0,c.propEq)("id",e.id)))(T))}),[T]),k=(0,n.useMemo)((()=>(0,c.pipe)(x(O),(0,c.map)((e=>({item:{id:e.uri,label:e.label,attrType:e}}))))(l)),[l,O]),A=(0,n.useMemo)((()=>(0,g.LG)(k)),[k]),P=(0,n.useCallback)((()=>28),[]),I=(0,n.useCallback)((e=>{let{item:t}=e;S(t,(0,c.not)((0,c.any)((0,c.propEq)("id",t.id))(T)))}),[S,T]),{focusIndex:L,handleKeyDown:j}=(0,f.t)({items:A,open:w,onSelectFocusedItem:I,selectedItems:T}),D=(0,n.useRef)(null);D.current=L;const R=Math.min(255,28*A.length),V=Math.max(140,R+112),M=(0,n.useCallback)(((e,t,r)=>{let{item:n,level:l=0}=t;const o=(0,c.any)((0,c.propEq)("id",n.id))(T),i=D.current===r;return a().createElement(d.Z,{key:n.uri,onClick:S,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,S,T]);return a().createElement("div",{className:o()(v.moreAttributes,{[v.dense]:i})},a().createElement(u.Z,{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)((()=>{T.length>0&&s((0,c.pluck)("attrType",T))}),(()=>C(!1)),(()=>N("")),(()=>Z([]))),onSearch:N,containerHeight:V,title:r,containerWidth:320,searchInputOnKeyDown:j},a().createElement(b.Z,{getItemSize:P,renderItem:M,items:A,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},3853:(e,t,r)=>{r.d(t,{Z:()=>c});var n=r(24328),a=r.n(n),l=r(22241),o=r(21548);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)},10768:(e,t,r)=>{r.d(t,{Z:()=>C});var n=r(52730),a=r(35674),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(22241),d=r(21548),g=r(72283),b=r(93555);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:N}=x,T=(0,l.useRef)(v),Z=(0,m.CZ8)(v),S=(0,m.o96)(v),k=(0,m.Poc)(E),A=(0,m.nt9)(n,k),P=r?(0,m.Kxm)(r,A.dataLabelPattern):v.label,I=(0,l.useMemo)((()=>[k]),[k]),L=(0,l.useMemo)((()=>(0,m.EtK)(C,S)),[C,S]),j=(0,l.useMemo)((()=>(0,m.mbo)(v,O)),[v,O]),D=(0,l.useMemo)((()=>Z&&{entityUri:(0,m.ZTM)(Z),entityType:(0,m.uGi)(Z),entityLabel:v.label}),[Z,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]),M=(0,l.useCallback)((e=>{r&&i(r.uri);const t=T.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)});N({value:a,attributeType:E,uri:v.uri}),j&&c((0,m.iFp)(j))}),[v,E,r,N,i,c,j]),U=(0,l.useCallback)(((e,t)=>{const r=(0,p.pipe)(V,(0,m._kX)(w))(A),a=(0,m.pBq)({entityTypeUri:e,initValue:t,attributeTypes:r,metadata:n,mode:w});M(a),s(a)}),[V,w,A,n,M,s]),z=(0,l.useMemo)((()=>(0,m.yv0)({attributeType:E,attributeValue:v,mode:w,isReltioCrosswalk:(0,m.KVV)(C,v)})),[E,v,w,C]),_=(0,l.useMemo)((()=>(0,m.d89)(w,A)),[w,A]),B=(0,m.e$p)(j);return o().createElement(d.Z,h({},x,{label:(0,m.idV)(P),attributeTypesList:R,crosswalks:L,metadata:n}),o().createElement(b.Z,{errorMessage:B},o().createElement(g.Z,{className:u()(t.item,{[t.dense]:B||D&&(0,m.ZiX)(D.entityUri)}),entity:D||{},entityTypesUris:I,max:20,globalSearchRequestOptions:a,mode:w,onChange:z?M:void 0,onCreate:_?U: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)},39390:(e,t,r)=>{r.d(t,{Z:()=>A});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(90436),g=r(87918),b=r.n(g),f=r(22241),h=r(67586),y=r(65314),x=r(93555),v=r(40435),E=r(12980),w=r(67462),C=r(35674);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){N(e,t,r[t])}))}return e}function N(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={};const Z=(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 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=>{let{className:t,attributeValue:r,attributeType:n,isReltioCrosswalk:l,ownError:o,mode:s,onAddOneMore:g,onDeleteAttribute:w,onChangeAttribute:N,onDeactivateError:k,additionalControlsRenderer:A,state:P}=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=Z(),j="deleted"===P,D="edited"===P,R=(0,f.KIu)(s),V=(0,f.PFL)(n),M=(0,E.AG)(r,V),U=(0,f.Vg3)({attributeType:n,mode:s}),z=(0,f.yv0)({attributeType:n,attributeValue:r,mode:s,isReltioCrosswalk:l}),_=(0,f.xv5)({attributeType:n,attributeValue:r,mode:s,isReltioCrosswalk:l}),B=z&&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=T[e];return(0,u.equals)(t,r)?r:((0,u.equals)(null==r?void 0:r.parents,t.parents)&&(t.parents=r.parents),T[e]=t,t)})(o,h)}var a,l})(e,r,null==n?void 0:n.uri):null)),F=()=>{o&&k((0,f.iFp)(o))},q=!!g&&U&&!n.singleValue,Y=!j&&!!w&&_,$=!!H,X=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"]]:!B}),"data-reltio-id":"reltio-attribute-value"},B?a().createElement(y.Z,S({fieldName:(0,f.Tde)(n.uri),value:M,dataTypeDefinition:V,error:$,onChange:(0,u.pipe)((0,E.pp)(r,n),N,F),fullWidth:!0},W,I,X)):a().createElement(h.Z,{value:(0,f.kDl)(r),dataTypeDefinition:V}))),a().createElement("div",{className:L["editor-actions"]},D&&a().createElement(d.Z,{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)}),A&&A({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"})))};k.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 A=(0,n.memo)((0,w.Z)(k,(()=>{const e=Z();return a().createElement("div",{className:e.placeholder})})))},12980:(e,t,r)=>{r.d(t,{AG:()=>i,Ho:()=>s,pp:()=>c});var n=r(95038),a=r.n(n),l=r(22241),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})))},1108:(e,t,r)=>{r.d(t,{c:()=>a});var n=r(24328);const a=r.n(n)().createContext(null)},26978:(e,t,r)=>{r.d(t,{U:()=>l,A:()=>o});var n=r(17440),a=r(22241);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)},31992:(e,t,r)=>{r.d(t,{Z:()=>u});var n=r(96971),a=r(86689),l=r(24328),o=r.n(l),i=r(87918),s=r.n(i),c=r(47608);const u=e=>{let{onClick:t}=e;const r=(0,c.y)();return o().createElement(a.Z,{component:"button",variant:"caption",className:r.link,onClick:t,underline:"none"},o().createElement(n.Z,{className:r["svg-icon__root"]}),s().text("Show less"))}},35039:(e,t,r)=>{r.d(t,{Z:()=>u});var n=r(4426),a=r(86689),l=r(24328),o=r.n(l),i=r(87918),s=r.n(i),c=r(47608);const u=e=>{let{moreNumber:t,valueNumber:r,onClick:l}=e;const i=(0,c.y)();return o().createElement(a.Z,{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"))}},47608:(e,t,r)=>{r.d(t,{y:()=>n});const n=(0,r(79692).Z)({link:{display:"flex",marginTop:4},"svg-icon__root":{fontSize:"1rem"}})},11013:(e,t,r)=>{r.d(t,{Z:()=>c});var n=r(24328),a=r.n(n),l=r(22241),o=r(81489),i=r(88610),s=r(95492);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)}},89978:(e,t,r)=>{r.d(t,{Z:()=>d});var n=r(24328),a=r.n(n),l=r(17440),o=r(22241),i=r(52239),s=r(47972),c=r(35039),u=r(31992),p=r(86602),m=r(26978);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]),N=O.slice(0,v),T=h&&N.length<O.length,Z=h&&N.length>=O.length&&h<N.length,S={enabled:g};return a().createElement("div",{className:f},b&&a().createElement(i.Z,S,b),N.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})})),T&&a().createElement(c.Z,{onClick:()=>{E(1/0)}}),Z&&a().createElement(u.Z,{onClick:()=>{E(h)}}))}))},47972:(e,t,r)=>{r.d(t,{Z:()=>K});var n=r(52730),a=r(35674),l=r(71153),o=r.n(l),i=r(24328),s=r.n(i),c=r(17440),u=r(22241),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(14699),E=r(52239),w=r(62901),C=r(72316),O=r(37457),N=r(11013);const T=e=>{let{value:t,nonVisibleValues:r,attributeType:n,titleClassName:a,contentClassName:l,showNonOv:i,totalNonVisibleValues:c}=e;const p=y(),{label:m}=n;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(N.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)(u.q7e.ENTITY_ATTRIBUTE,{uri:t.uri}),objectType:u.q7e.ENTITY_ATTRIBUTE}))};var Z=r(35039),S=r(31992);const k=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:T}=l,k=r.slice(0,h),A=a-h;return s().createElement("div",{className:f.wrapper},s().createElement("div",{className:f.titleRow},s().createElement(v.Z,{label:T,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},k.map((e=>s().createElement(N.Z,{key:e.uri,className:o()(f.attribute,d),attributeValue:e,attributeType:l,showNonOv:g})))),w&&s().createElement(Z.Z,{moreNumber:(0,c.min)(t,A),valueNumber:A,onClick:()=>{r.length<a&&p({parentUri:u,attributeTypeUri:l.uri,attributeTypeName:l.name,values:r,defaultMaxValues:t}),y(h+t)}}),C&&s().createElement(S.Z,{onClick:()=>{y(t)}}))};var A=r(61347),P=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(62228),j=r(10591);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])}),M=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))},U=e=>{let{className:t,values:r}=e;return s().createElement(I,{values:r,className:t,dataReltioId:"reltio-attribute-value",Component:M})};var z=r(86689),_=r(10609);const B=e=>{let{value:t}=e;const r=V(),l=(0,n.useSelector)(a.ZP.selectors.getUIPath),o=(0,i.useContext)(_.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(z.Z,{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:B})},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(P.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(U,{className:e,values:t});default:return s().createElement(N.Z,{className:e,attributeValue:{value:t[0]},attributeType:r,inlined:!0})}})(n.attribute));var l},F="oneLine",q="multiLine",Y="imageLine",$="special",X=(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",N=(0,c.ifElse)((0,c.has)(O),(0,c.prop)(O),(0,c.always)(w.length))(a),Z=null!=a&&a.totalValues?a.totalValues-N:C.length,S=1===N&&!(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)(S),(0,c.always)(F)],[c.T,(0,c.always)(q)]])(r)){case F:return s().createElement(T,{value:w[0],nonVisibleValues:C,totalNonVisibleValues:Z,attributeType:r,titleClassName:m,contentClassName:d,showNonOv:g});case q:return s().createElement(k,{values:w,nonVisibleValues:C,totalVisibleValues:N,totalNonVisibleValues:Z,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(A.Z,{attributeValues:w,attributeType:r,paging:a,parentUri:l,requestNextPageOfAttributeValues:p,showNonOv:g}));case $:return s().createElement(W,{values:w,attributeType:r})}})()))})),G={requestNextPageOfAttributeValues:a.N5.actions.requestNextPageOfAttributeValues},K=(0,n.connect)(((e,t)=>{let{max:r}=t;return{max:r||a.ZP.selectors.getDefaultMaxValues(e)}}),G)(X)},13870:(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(22241),u=r(90436),p=r(89978),m=r(85777),d=r(72316),g=r(62901);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}=e;const h=b(),y=r.uri,[x,v]=(0,n.useState)(!1);(0,n.useEffect)((()=>{v(o)}),[o]);const E=(t||[]).some((e=>(0,c.kQw)(e))),w=(0,n.useMemo)((()=>({attributes:E?null:r.value,analyticsAttributes:E?r.value:null})),[r,E]);return a().createElement("div",{className:h.complexContainer},a().createElement("div",{className:s()(h.labelContainer,g.U)},a().createElement(m.Z,{onClick:()=>v((e=>!e)),expanded:x}),a().createElement(u.Z,{component:"span",variant:"body2",classes:{body2:h.label},"data-reltio-id":"reltio-attribute-complex-label"},l),a().createElement("div",{className:h.spacer}),a().createElement(d.Z,{uri:r.uri,relatedObjectUris:(0,c.wp9)(c.q7e.ENTITY_ATTRIBUTE,{uri:r.uri}),objectType:c.q7e.ENTITY_ATTRIBUTE})),x&&a().createElement(p.Z,{attrTypes:t,entity:w,drawLines:!0,parentUri:y,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};const h=f},61347:(e,t,r)=>{r.d(t,{Z:()=>g});var n=r(24328),a=r.n(n),l=r(22241),o=r(71153),i=r.n(o),s=r(62228),c=r(26729),u=r(43253),p=r(91446),m=r(10591);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})}},88610:(e,t,r)=>{r.d(t,{Z:()=>y});var n=r(24328),a=r.n(n),l=r(95544),o=r(71153),i=r.n(o),s=r(22241),c=r(62228),u=r(10591),p=r(13870),m=r(31569);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.Z,{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)},o))};h.propTypes=s.j2V;const y=(0,n.memo)(h)},95492:(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(22241),c=r(62228),u=r(13870),p=r(10591);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},m))};f.propTypes=s.NkU;const h=(0,a.memo)(f);var y=r(35674);const x=(0,n.connect)((e=>({metadata:y.ZP.selectors.getMetadata(e),uiPath:y.ZP.selectors.getUIPath(e)})))(h)},81489:(e,t,r)=>{r.d(t,{Z:()=>h});var n=r(24328),a=r.n(n),l=r(22241),o=r(71153),i=r.n(o),s=r(62901),c=r(62228),u=r(72316),p=r(67586),m=r(31569),d=r(10591);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)});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)(l.q7e.ENTITY_ATTRIBUTE,{uri:o.uri}),objectType:l.q7e.ENTITY_ATTRIBUTE}))}},10591:(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]}},86602:(e,t,r)=>{r.d(t,{S:()=>a});var n=r(22241);const a=[n.xPW.roles.uri,n.xPW.tags.uri]},62901:(e,t,r)=>{r.d(t,{U:()=>n});const n="commentsContainerVisibilityArea"},76572:(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"},65510:(e,t,r)=>{r.d(t,{P:()=>a});var n=r(24328);const a=r.n(n)().createContext(!1);a.displayName="BlockImageGalleryDialogContext"},58142:(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"},63929:(e,t,r)=>{r.d(t,{X:()=>a});var n=r(24328);const a=r.n(n)().createContext({});a.displayName="EntitiesMapContext"},10609:(e,t,r)=>{r.d(t,{u:()=>a});var n=r(24328);const a=r.n(n)().createContext(null);a.displayName="EntityContext"},62228:(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"},80687:(e,t,r)=>{r.d(t,{J:()=>a});var n=r(24328);const a=r.n(n)().createContext([])},38309:(e,t,r)=>{r.d(t,{A:()=>a});var n=r(24328);const a=r.n(n)().createContext([]);a.displayName="RelatedObjectUrisContext"},89575:(e,t,r)=>{r.d(t,{s:()=>a});var n=r(24328);const a=r.n(n)().createContext([]);a.displayName="UsersContext"},27536:(e,t,r)=>{r.d(t,{S:()=>o});var n=r(24328),a=r(76572);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}},36746:(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([[5092],{67462:(e,t,r)=>{r.d(t,{Z:()=>i});var n=r(24328),a=r.n(n),l=r(27536);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}},85777:(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(40435),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))}},17998:(e,t,r)=>{r.d(t,{Z:()=>c});var n=r(24328),a=r.n(n),l=r(15223),o=r(90436);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.Z,{className:n.title,classes:{root:u.title},variant:"h6"},t),r)}},89925:(e,t,r)=>{r.d(t,{J:()=>$});var n=r(24328),a=r.n(n),l=r(95544),o=r(87918),i=r.n(o),s=r(86689),c=r(90436),u=r(43054),p=r(98538),m=r(39475),d=r(52730),g=r(71153),b=r.n(g),f=r(17440),h=r(35674),y=r(22241),x=r(63929),v=r(18527);const E=(e,t)=>{const r=e.relatedObjectUris.indexOf(t);if(r>=0)return e.relatedObjectUris[1-r]},w=e=>`${i().date(e,"LT")} ${i().date(e,"LL")}`;var C=r(79692);const O=(0,C.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"}}))),N=e=>{let{comment:t,className:r}=e;const o=O(),s=(0,d.useSelector)(h.ZP.selectors.getEntity),u=(0,d.useSelector)(h.ZP.selectors.getMetadata),p=(0,n.useContext)(x.X);return a().createElement(l.Z,{className:r},(()=>{switch(t.objectType){case y.q7e.ENTITY_ATTRIBUTE:{const e=(0,y.AFK)(t.objectId,s.type),r=(0,y.zeJ)(u,e);return a().createElement(a().Fragment,null,a().createElement(c.Z,{className:o.title},i().text("Selected attribute:")),a().createElement(c.Z,{className:o.label},null==r?void 0:r.label))}case y.q7e.RELATION_ATTRIBUTE:{const e=t.relatedObjectUris.find((0,f.startsWith)("configuration/relationTypes")),r=(0,y.AFK)(t.objectId,e),n=(0,y.zeJ)(u,r);return a().createElement(a().Fragment,null,a().createElement(c.Z,{className:o.title},i().text("Selected attribute:")),a().createElement(c.Z,{className:o.label},null==n?void 0:n.label))}case y.q7e.ENTITY:return a().createElement(a().Fragment,null,a().createElement(c.Z,{className:o.title},i().text("Selected profile:")),a().createElement(v.Z,{className:b()(o.label,o.link),value:(0,y.wwR)(s)},(0,y.idV)(s.label)));case y.q7e.RELATION:{var e;const r=E(t,s.uri),n={uri:r,label:null===(e=p[r])||void 0===e?void 0:e.label};return a().createElement(a().Fragment,null,a().createElement(c.Z,{className:o.title},i().text("Selected relation:")),a().createElement(c.Z,{className:o.label},a().createElement(v.Z,{className:o.link,value:(0,y.wwR)(s)},(0,y.idV)(s.label)),r&&a().createElement(a().Fragment,null,` ${i().text("to")} `,a().createElement(v.Z,{className:o.link,value:(0,y.wwR)(n)},n.label?(0,y.idV)(n.label):(0,y.BTI)(n)))))}case y.q7e.POTENTIAL_MATCH:{var r;const e=E(t,s.uri),n={uri:e,label:null===(r=p[e])||void 0===r?void 0:r.label};return a().createElement(a().Fragment,null,a().createElement(c.Z,{className:o.title},i().text("Selected potential match:")),a().createElement(c.Z,{className:o.label},a().createElement(v.Z,{className:o.link,value:(0,y.wwR)(s)},(0,y.idV)(s.label)),e&&a().createElement(a().Fragment,null,` ${i().text("and")} `,a().createElement(v.Z,{className:o.link,value:(0,y.wwR)(n)},n.label?(0,y.idV)(n.label):(0,y.BTI)(n)))))}default:return null}})())};var T=r(89575);const Z=(0,C.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=Z(),o=(0,n.useContext)(T.s);return a().createElement(c.Z,{className:b()(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 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=o.find((t=>t.username===e.slice(1)));return t?a().createElement(s.Z,{href:`mailto:${t.email}`},e):e})).map(((e,t)=>a().createElement(n.Fragment,{key:t},e))))};var k=r(43434);const A=(0,C.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 I=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=A();return a().createElement(k.Z,P({},n,{className:b()(l.root,t)}),r.split(".").map((e=>e[0].toUpperCase())).join(""))};var L=r(58142);const j=(0,C.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"}}))),D=e=>{let{onReply:t,className:r,uri:o,comment:g,onStartEditing:b}=e;const f=j(),y=(0,d.useSelector)(h.ZP.selectors.getUserName),x=g.createdBy===y,{resolveThread:v,reOpenThread:E,sending:C,deleteComment:O}=(0,n.useContext)(L.h),T=(0,n.useMemo)((()=>[{text:i().text("Edit"),onClick:b},{text:i().text("Delete"),onClick:()=>O({uri:o,commentId:g.commentId})}]),[b,O,o,g]);return a().createElement(l.Z,{className:r},a().createElement(l.Z,{className:f.header},a().createElement(I,{classes:{root:f.avatar}},g.createdBy),a().createElement(l.Z,{width:"100%"},a().createElement(c.Z,{className:f.username},g.createdBy)),a().createElement(c.Z,{className:f.createdAt},w(g.createdTime)),x&&a().createElement(p.Z,{buttonComponent:m.k,buttonProps:{icon:u.Z,tooltipTitle:i().text("Open menu")},popoverProps:{PopoverClasses:{root:f.dropdownMenu}},menuItems:T,menuId:"collaboration-comment-menu"})),a().createElement(l.Z,{className:f.body},a().createElement(N,{comment:g,className:f.commentTarget}),a().createElement(S,{comment:g,className:f.message}),a().createElement(l.Z,{className:f.buttons},a().createElement(s.Z,{className:f.button,onClick:t,component:"button"},i().text("Reply")),"open"===g.status&&a().createElement(s.Z,{disabled:C,className:f.button,onClick:()=>{v({commentId:g.commentId,uri:o})},component:"button"},i().text("Resolve")),"resolved"===g.status&&a().createElement(s.Z,{disabled:C,className:f.button,onClick:()=>{E({commentId:g.commentId,uri:o})},component:"button"},i().text("Re-open")))))},R=(0,C.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"}}))),V=e=>{let{className:t,reply:r}=e;const{createdBy:n,action:o,createdTime:s}=r,u=R();return a().createElement(l.Z,{className:b()(u.root,t)},a().createElement(I,{classes:{root:u.avatar}},n),a().createElement(l.Z,null,a().createElement(l.Z,{className:u.header},a().createElement(c.Z,{className:u.username},n),"resolve"===o&&a().createElement(c.Z,{className:u.marked},i().text("Marked as resolved")),"reopen"===o&&a().createElement(c.Z,{className:u.marked},i().text("Re-opened"))),"resolve"!==o&&a().createElement(S,{className:u.message,comment:r}),a().createElement(c.Z,{className:u.createdAt},w(s))))};var U=r(77277),M=r(2271);const z=(0,C.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 _(){return _=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},_.apply(this,arguments)}const B=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=z(),i=(0,n.useContext)(T.s);return a().createElement(M.r,_({},l,{onChange:(e,r,n,a)=>{t(r,n,(0,f.uniq)(a.map((e=>{let{display:t}=e;return t.slice(1)}))))},className:b()(o.root,r)}),a().createElement(M.p,{trigger:"+",data:i.map((e=>{let{username:t}=e;return{id:t,display:t}})),displayTransform:(e,t)=>`+${t}`,appendSpaceOnAdd:!0,className:o.mention}))},H=(0,C.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 W=r(29627);const F=e=>{switch(e){case"open":return i().text("Reply...");case"resolved":return i().text("Adding a comment will re-open this");default:return""}},q=e=>{let{inputRef:t,className:r,uri:o,relatedObjectUris:s,objectType:c,popperRef:u,comment:p,isEditingComment:m,onCancel:g}=e;const y=H(),x=(0,d.useSelector)(h.ZP.selectors.getUserName),{createReply:v,createComment:E,sending:w,editComment:C}=(0,n.useContext)(L.h),[O,N]=(0,n.useState)(""),[T,Z]=(0,n.useState)(""),[S,k]=(0,n.useState)([]),[A,P]=(0,n.useState)(!1),j=(0,W._)(),D=""!==O.trim(),R=A||D,V=null==p?void 0:p.status,M=(e,t,r)=>{k(r),N(e),Z(t)},z=()=>{null==g||g(),M("","",[])};return(0,n.useEffect)((()=>{u&&u.current.update()}),[u,R]),(0,n.useEffect)((()=>{m?N(p.content):z()}),[m]),a().createElement(l.Z,{className:b()(y.root,r)},a().createElement("form",{onSubmit:e=>{e.preventDefault();const t=(0,f.cond)([[(0,f.always)(!p),()=>E({content:T,namedUsers:S,objectType:c,uri:o,relatedObjectUris:s})],[(0,f.always)(m),()=>C({content:T,namedUsers:S,commentId:p.commentId,objectType:c,replies:p.replies,relatedObjectUris:s,uri:o})],[f.T,()=>v({content:T,namedUsers:S,commentId:p.commentId,action:"open"===p.status?"none":"reopen",uri:o})]]);return j(t()).then(z).catch(console.log)},className:y.form},a().createElement(l.Z,{className:y.main},a().createElement(I,{classes:{root:y.avatar}},x),a().createElement(B,{className:y.textField,disabled:w,onChange:(e,t,r)=>{M(e,t,r)},inputRef:t,value:O,onFocus:()=>P(!0),onBlur:()=>P(!1),placeholder:F(V)})),R&&a().createElement(l.Z,{className:y.buttons},a().createElement(U.Z,{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,m)),a().createElement(U.Z,{disabled:w,onClick:()=>z(),className:y.button,variant:"outlined",color:"primary"},i().text("Cancel")))))},Y=(0,C.Z)((()=>({root:{maxWidth:"100%",padding:"8px 4px 10px 16px"},messages:{},repliedComment:{marginBottom:"2px"},replies:{marginLeft:"40px"},sendMessageArea:{marginLeft:"40px"},comment:{}}))),$=(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=Y({classes:i}),[d,g]=(0,n.useState)(!1),b=a().createElement(q,{className:m.sendMessageArea,inputRef:p,popperRef:s,uri:t,relatedObjectUris:r,objectType:o,comment:u,onCancel:()=>g(!1),isEditingComment:d});return a().createElement(l.Z,{className:m.root},u&&a().createElement(a().Fragment,null,a().createElement("div",{className:m.messages,ref:c},a().createElement(D,{comment:u,uri:t,onReply:()=>{d&&g(!1),p.current.focus()},onStartEditing:()=>{g(!0)},className:m.comment}),a().createElement(l.Z,{className:m.replies},u.replies.map((e=>a().createElement(V,{key:e.replyId,className:m.repliedComment,reply:e}))))),b),!u&&b)}))},72316:(e,t,r)=>{r.d(t,{Z:()=>I});var n=r(24328),a=r.n(n),l=r(71153),o=r.n(l),i=r(79692),s=r(62901);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(55962),p=r(58142),m=r(38309),d=r(87918),g=r.n(d),b=r(80030);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.ZP,{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.ZP,{title:g().text("Add comment")},a().createElement("div",{className:o()(n.root,t),onClick:r},a().createElement(w,{className:n.icon})))};var O=r(95544),N=r(90436),T=r(27291),Z=r(89925),S=r(39475),k=r(80233);const A=(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"}}))),P=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=A({scrollWidth:u,hasScroll:0!==u}),b=(0,n.useRef)(null),{resolveThread:f,loading:h,sending:y}=(0,n.useContext)(p.h),x=1+(null==c?void 0:c.replies.length);return a().createElement(k.Z,{popperRef:b,anchorEl:o,open:s,placement:"right-start",onClose:i,className:d.popper},a().createElement(O.Z,{className:d.header},a().createElement(O.Z,{className:d.headerInfo},a().createElement(N.Z,{className:d.title},g().text("Comments")),c&&!h&&a().createElement(N.Z,{className:d.counter},g().number(x)," ",1===x?g().text("item"):g().text("items"))),c&&!h&&a().createElement(S.k,{className:d.resolveButton,size:"S",onClick:()=>{f({commentId:c.commentId,uri:t})},disabled:y,showForDisabled:!0,tooltipTitle:g().text("Resolve"),icon:T.Z,color:"primary"})),!h&&a().createElement(Z.J,{popperRef:b,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}))},I=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:N,clearCurrentComment:T,objectTypes:Z}=(0,n.useContext)(p.h),S=!!O&&(!Z||Z.includes(l)),k=((null==O?void 0:O[r])||[]).filter((e=>{let{status:t}=e;return"resolved"!==t})).reverse(),A=!d||d&&0===k.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 S&&a().createElement("div",{className:o()(b.root,t)},A&&a().createElement(C,{className:o()(b.addButton,{[b.showAlways]:g||I}),onClick:e=>{h(e.currentTarget),x(!0)}}),k.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=>{N(e),x(!0)})(r)},1+t)})),a().createElement(P,{anchorEl:f,open:E,onClose:()=>{h(null),T(),x(!1)},uri:r,relatedObjectUris:j,objectType:l,comment:w}))}},98538:(e,t,r)=>{r.d(t,{Z:()=>w});var n=r(24328),a=r.n(n),l=r(71153),o=r.n(l),i=r(17440),s=r(77277),c=r(48348),u=r(55962),p=r(12231),m=r(90436),d=r(78223),g=r(79692),b=r(41128);const f=(0,g.Z)((e=>({buttonRoot:{"&$selected":{color:e.palette.action.active,backgroundColor:(0,b.U1)(e.palette.action.active,.12),"&:hover":{backgroundColor:(0,b.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}}))),h=(0,d.Z)(p.Z),y=(0,n.forwardRef)(((e,t)=>{let{item:r,onMenuClose:n=i.identity}=e;const l=f(),{disabled:o,text:s,tooltip:c,onClick:u,id:p=""}=r;return a().createElement(h,{tooltipTitle:c,showForDisabled:!0,classes:{root:l.menuItem},onClick:e=>{n(e),u(e)},disabled:o,ref:t,"data-modal":!0,"data-reltio-id":`reltio-search-menu-item${p}`},a().createElement(m.Z,{classes:{root:l.menuText}},s))}));y.displayName="MenuItemRenderer";const x=y;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 E(e){let{className:t,menuId:r,buttonComponent:l=s.Z,buttonContent:p,menuItems:m=[],buttonProps:d={},popoverProps:g={},onMenuOpen:b=i.identity,onMenuClose:h=i.identity,MenuItemRenderer:y=x}=e;const E=l,w=f(),C=(0,n.useRef)(),[O,N]=(0,n.useState)(!1);(0,u.D)((()=>{O?b():h()}),[O]);const T=(0,n.useCallback)((e=>{null==e||e.stopPropagation(),N((e=>!e))}),[]);return a().createElement(a().Fragment,null,a().createElement(E,v({ref:C,className:o()(w.buttonRoot,{[w.selected]:O},t),onClick:T,"aria-pressed":O,"aria-controls":O?r:void 0,"aria-haspopup":"true"},d),p),a().createElement(c.Z,v({id:r,variant:"menu",open:O,autoFocus:!1,classes:{paper:w.paper},anchorEl:C.current,onClose:T,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},elevation:2,getContentAnchorEl:null,MenuListProps:{autoFocusItem:O}},g),m.map(((e,t)=>a().createElement(y,{item:e,key:t,onMenuClose:T})))))}E.displayName="DropDownMenuButton";const w=E},37573:(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(43434),c=r(22241),u=r(35674);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.Z,{className:i()(r,n),src:m,imgProps:{onError:g}},a().createElement("img",{className:n,src:d,alt:"fallback entity avatar",onError:g}))}},42662:(e,t,r)=>{r.d(t,{Z:()=>c});var n=r(24328),a=r.n(n),l=r(52730),o=r(35674),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}},55401:(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(90436),s=r(95063);const c=e=>{let{className:t,message:r}=e;const n=(0,s.y)();return r?a().createElement(i.Z,{variant:"caption",className:o()(n.caption,t)},r):null}},93555:(e,t,r)=>{r.d(t,{Z:()=>m});var n=r(71153),a=r.n(n),l=r(55401),o=r(42494),i=r(74828),s=r(24328),c=r.n(s),u=r(95063);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.Z,{className:a()(d.helperText,null==s?void 0:s.helperText)},c().createElement(l.Z,{message:t})))}))},95063:(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"}})))},94792:(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)}},26729:(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(22241);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)}))},22349:(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(77277),p=r(43054),m=r(40435),d=r(98538),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(36746),v=r(79573);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,N=E(),[T,Z]=(0,n.useState)(!1),S=(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]),k=e=>()=>(0,i.ifElse)((0,i.equals)(!0),g,b)(e),A=r&&(l||T||s),P=!s&&!l&&T,I=r&&l;return a().createElement("div",{className:c()(N.overlay,{[N.selected]:l,[N.selectionMode]:s}),onMouseEnter:()=>Z(!0),onMouseLeave:()=>Z(!1),onClick:s?k(l):e=>{e.currentTarget===e.target&&O()}},A&&a().createElement(y,{className:N.checkedIcon,checked:l,onClick:k(l)}),P&&a().createElement("div",{className:N.actions},a().createElement(m.Z,{onClick:C,className:N.actionButton,icon:x.Z}),a().createElement(d.Z,{menuId:`image-overlay-actions-${t}`,buttonComponent:m.Z,buttonProps:{icon:p.Z,className:c()(N.actionButton,N.dropDownMenuButton)},menuItems:S})),I&&a().createElement(u.Z,{className:N.button,variant:"outlined",onClick:g},o().text("Deselect")))}))},95596:(e,t,r)=>{r.d(t,{C:()=>v,A:()=>x});var n=r(24328),a=r.n(n),l=r(87918),o=r.n(l),i=r(8629),s=r(38724),c=r(70331),u=r(15223),p=r(95544),m=r(87685),d=r(73115);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: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 f=r(39475),h=r(4270);const y=(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 x;!function(e){e.GALLERY_MODE="gallery",e.DETAILS_MODE="details"}(x||(x={}));const v=e=>{let{open:t,mode:r,children:l,header:g,onClose:v,onChangeMode:E}=e;const w=y(),C=(0,n.useMemo)((()=>[{id:x.GALLERY_MODE,title:o().text("Gallery"),Icon:d.Z},{id:x.DETAILS_MODE,title:o().text("Details"),Icon:b}]),[]);return a().createElement(i.Z,{classes:{paper:w.paper},open:t,BackdropProps:{className:w.backdrop},fullScreen:!0},a().createElement(c.Z,{classes:{colorPrimary:w.appBar}},a().createElement(u.Z,{className:w.toolbar},a().createElement(p.Z,{className:w.headerLeft},a().createElement(f.k,{tooltipTitle:o().text("Close"),onClick:v,className:w.closeButton,iconClassName:w.closeIcon,icon:m.default}),null==g?void 0:g.left),a().createElement(p.Z,{className:w.headerCenter},a().createElement(h.Z,{modes:C,modeId:r,onChange:E,className:w.modeSwitcher})),a().createElement(p.Z,{className:w.headerRight},null==g?void 0:g.right))),a().createElement(s.Z,{className:w.content},l))}},87378:(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(67358);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.Z,{color:"secondary"})))}},4270:(e,t,r)=>{r.d(t,{Z:()=>g});var n=r(24328),a=r.n(n),l=r(77277),o=r(38592),i=r(71153),s=r.n(i),c=r(78223),u=r(79692),p=r(41128);const m=(0,u.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,p.U1)(e.palette.primary.main,.12),fill:e.palette.primary.main,color:e.palette.primary.main,"&:hover":{backgroundColor:(0,p.U1)(e.palette.primary.main,.24)}}}))),d=(0,c.Z)(l.Z),g=e=>{let{className:t,classes:r={},modes:n=[],modeId:l,onChange:i}=e;const c=m();return a().createElement(o.Z,{className:t},n.map((e=>{let{id:t,title:n,tooltipTitle:o,Icon:u}=e;return a().createElement(d,{key:String(t),className:s()(c.button,{[c.current]:l===t},r.button),tooltipTitle:o,onClick:(p=t,()=>i(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})))}},80233:(e,t,r)=>{r.d(t,{Z:()=>m});var n=r(24328),a=r.n(n),l=r(71153),o=r.n(l),i=r(27556),s=r(1292),c=r(95544),u=r(7421);const p=(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)"}}}})),m=e=>{let{anchorEl:t,placement:r="top",arrow:n=!0,open:l,onClose:m=(()=>{}),children:d,className:g,popperRef:b}=e;const f=p(),[h,y]=a().useState(null);return a().createElement(u.Z,{anchorEl:t,placement:r,className:o()(f.popper,g),modifiers:{preventOverflow:{enabled:!0,boundariesElement:"window"},arrow:{enabled:n,element:h}},open:l,modal:!1,popperRef:b},a().createElement(c.Z,null,a().createElement(s.Z,{onClickAway:e=>{var t;t=e.target,Array.from(document.querySelectorAll("[data-modal]")).some((e=>e.contains(t)))||m()}},a().createElement(i.Z,{className:f.popoverRoot},n?a().createElement("span",{className:f.arrow,ref:y}):null,a().createElement(c.Z,null,d)))))}},33662:(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(50581),m=r(87685),d=r(21853),g=r(79573),b=r(40435),f=r(15311);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,N]=(0,o.useState)(""),T=(0,l.pipe)((0,l.tap)(n),N),Z=(0,l.isNil)(t)?O:t;return i().createElement(u.Z,h({startAdornment:i().createElement(p.Z,{position:"start"},i().createElement(d.default,{className:C.icon})),endAdornment:i().createElement(p.Z,{position:"end"},Z.length>0&&i().createElement(b.Z,{icon:m.default,className:C.clearButton,onClick:()=>T("")})),autoFocus:r,classes:y({},x,{input:a()(C.input,x.input),root:a()(C.container,x.root)}),placeholder:E,value:Z,onChange:(0,l.pipe)(g.NA,T),disableUnderline:!0,ref:s},w))}))},15311:(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)"}})))},22311:(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(54275),p=r(33662);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))}},26638:(e,t,r)=>{r.d(t,{t:()=>o});var n=r(24328),a=r(17440),l=r(63485);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}}},54275:(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}}})))},14699:(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(32701),s=r(90436);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.Z,u({className:o()(p.label,n),component:"span"},l),t,r&&a().createElement(i.Z,null))}},63485:(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(41008);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]),N={topMargin:0},T=(0,n.useMemo)((()=>!h||(t||[]).some((e=>null!==e.titleItemIndex))),[t,h]),Z=(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]),S=(0,n.useCallback)((e=>t[e].titleItemIndex),[t]),k=(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),A();const e=(e=>{const t=e.findIndex((e=>e.item.moveTo));if(t>-1){Z(t);const e=S(t);return{offset:O.current[t],titleHeight:r(e,k(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)}))}}),[Z,k,r,S,d,O,t,E]);const A=()=>{C.current&&w.current&&(C.current.style.width=w.current.offsetWidth+"px")},P=(0,n.useCallback)((e=>{let r=null,n=0;return t.some(((t,a)=>{Z(a+10);const l=O.current[a+1];return e>=n&&e<l&&(r={index:a,offset:n,listItem:t}),n=l,r})),r}),[Z,O,t]),I=(0,n.useCallback)((e=>r(e,k(e).item)),[k,r]),L=(0,n.useCallback)((e=>{let{index:t,style:r,data:n}=e;const a=k(t);return a.item&&(p(a)&&o(r,a.item)||l(r,a.item,t,n))}),[k,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||!T)return;const l=P(n),o=l&&S(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",N.index=i):e.style.visibility="hidden"}))),A();const s=null!==o&&r(o,k(o).item),c=P(n+s+N.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=>(Z(e),O.current[e]))(e);e>-1&&n<r&&s>=r-n&&(u=s-(r-n))}}(e=>{C.current&&(N.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},41008:(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}}},52239:(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)}},43253:(e,t,r)=>{r.d(t,{Z:()=>Ne});var n=r(24328),a=r.n(n),l=r(52730),o=r(44443),i=r(90436),s=r(35674),c=r(22241),u=r(65510),p=r(17440),m=r(95544),d=r(45203),g=r(15762),b=r(71153),f=r.n(b),h=r(26729),y=r(40435),x=r(79692);const v=(0,x.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%)"}})));var E=r(60905);const w=(0,x.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)"}}))),C=e=>{let{attributeValues:t,setAttributeValueIndex:r,attributeValueIndex:l}=e;const o=w(),i=(0,n.useRef)(null);return(0,n.useEffect)((()=>{if(null!=i&&i.current){const e=i.current.scrollLeft,t=i.current.offsetWidth+e,r=96*l+16*l+12;t<r?i.current.scroll&&(r>t+96+16?i.current.scroll(r,0):i.current.scroll(112+e,0)):e+96>r&&i.current.scroll&&i.current.scroll(r-96,0)}}),[l,i]),a().createElement("div",{ref:i,className:o.thumbnails},a().createElement(E.Z,{container:!0,wrap:"nowrap",direction:"row",spacing:1,className:o.gridContainer},t.map(((e,t)=>{let{uri:n,value:i}=e;return a().createElement(E.Z,{item:!0,key:n},a().createElement(h.Z,{onClick:()=>r(t),className:f()(o.thumb,{[o.inactiveThumb]:l!==t}),src:(0,c.efz)({value:i})}))}))))},O=e=>{let{className:t,attributeValues:r,attributeValueIndex:n,setAttributeValueIndex:l}=e;const o=v(),i=r[n],s=(0,c.QXK)(i);return a().createElement("div",{className:f()(o.root,t)},a().createElement("div",{className:o.main},n>0&&a().createElement(y.Z,{icon:d.Z,className:f()(o.arrowButton,o.arrowButtonPrev),onClick:()=>{l(n-1)},size:"XL"}),a().createElement(h.Z,{containerClassName:o.mainImageContainer,className:o.mainImage,size:s&&h.f.OVERRIDE,src:s}),n!==r.length-1&&a().createElement(y.Z,{icon:g.Z,className:f()(o.arrowButton,o.arrowButtonNext),onClick:()=>{l(n+1)},size:"XL"})),a().createElement(C,{attributeValues:r,attributeValueIndex:n,setAttributeValueIndex:l}))};var N=r(87918),T=r.n(N),Z=r(21324),S=r(5806),k=r(33016),A=r(36138),P=r(85256),I=r(89913),L=r(95038),j=r.n(L);const D={get CreationTime(){return T().text("Creation Time")},get CreationDate(){return T().text("Creation Date")},get Dimensions(){return T().text("Dimensions")},get MimeType(){return T().text("Mime Type")},get Size(){return T().text("Size")},get Url(){return T().text("Full image URL (S3)")},get UrlPreview(){return T().text("Preview image URL (S3)")},get UrlThumbnail(){return T().text("Small image URL (S3)")},get CdnUrl(){return T().text("Full image URL (CDN)")},get CdnUrlPreview(){return T().text("Preview image URL (CDN)")},get CdnUrlThumbnail(){return T().text("Small image URL (CDN)")}},R=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)?j()(e.CreationTimestamp[0].value).format("MM-DD-YYYY"):"CreationTime"===t&&(0,p.path)(["CreationTimestamp",0,"value"],e)?j()(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} ${T().text("pixels")}`:"Size"===t&&(0,p.path)(["Size",0,"value"],e)?`${(Number(e.Size[0].value)/1e3).toFixed(2)} KB`:void 0},V=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.filter((e=>{let{system:t}=e;return!t}))},U=(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}))},M=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=V(t.attributes);return U(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}),[])},z=e=>["Url","UrlPreview","UrlThumbnail","CdnUrl","CdnUrlPreview","CdnUrlThumbnail"].includes(e),_=(0,x.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:{}}),B=e=>{let{attributeType:t,onAddAttributes:r,uri:l}=e;const o=_(),s=V(t.attributes),c=Boolean(r);return a().createElement(m.Z,null,a().createElement(i.Z,{className:f()(o.title,{[o.canAdd]:c})},T().text("Meta info")),c&&a().createElement(n.Fragment,null,a().createElement(I.Z,{label:T().text("Attributes"),data:s,dense:!1,onApply:e=>{r&&r(e.map((e=>({attributeType:e,parentUri:l}))))}}),a().createElement(P.Z,{className:o.divider})))};var H=r(47972);const W=(0,x.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"}}))),F=e=>{let{title:t,content:r,isLink:n,children:l}=e;const o=W();return a().createElement("div",{className:o.root},a().createElement("span",{className:o.title},t),n?a().createElement("a",{className:o.link,href:r},T().text("link")):a().createElement("span",{className:o.content},r||l))},q=(0,x.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"}}),Y=e=>{let{attributeValue:t,attributeType:r,imageAttributeFieldsOrder:n}=e;const o=q(),i=(0,l.useSelector)(s.ZP.selectors.getIsViewMode),c=(u=t,p=n,U(Object.keys(D),p).map((e=>R(u,e)?{title:D[e],value:R(u,e),isLink:z(e)}:null)).filter(Boolean));var u,p;const d=M(t,r,n);return a().createElement(m.Z,{className:o.root},c.map((e=>{let{title:t,value:r,isLink:n}=e;return a().createElement(F,{key:t,isLink:n,title:t,content:r})})),i&&d.map((e=>{let{attrType:r,values:n}=e;return a().createElement(H.Z,{key:r.uri,attributeType:r,drawLines:!1,values:n,titleClassName:o.title,contentClassName:o.content,parentUri:t.uri})})))};var $=r(77277),X=r(92203);const G=(0,x.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"}}),K=e=>{let{attributeType:t,imageAttributeFieldsOrder:r,attributeValue:n,hasChanges:l,onDeleteAttribute:o,onChangeAttribute:i,onAddAttributes:s,onCancel:u,onApply:p,mode:d}=e;const g=G(),b=M(n,t,r),f=0!==b.length||0===b.length&&l;return a().createElement(m.Z,{className:g.root},a().createElement(m.Z,{className:g.form},b.map((e=>{let{attrType:t,values:r}=e;return a().createElement(X.ZP,{key:t.uri,parentUri:n.uri,attributeType:t,values:r,showEmptyEditors:(0,c.ZiX)(n.uri),mode:d,drawLines:!1,onDeleteAttribute:o,onChangeAttribute:i,onAddAttributes:s})}))),f&&a().createElement(a().Fragment,null,a().createElement(P.Z,{className:g.divider}),a().createElement(m.Z,{className:g.actions},a().createElement($.Z,{disabled:!l,onClick:u,className:g.cancelButton},T().text("Cancel")),a().createElement($.Z,{disabled:!l,onClick:p,color:"primary"},T().text("Apply")))))};var Q=r(12212);const J={palette:{type:"dark",primary:c.rSc.palette.primary,secondary:c.rSc.palette.secondary}},ee=(0,k.Z)(J),te=e=>{let{imageAttributeFieldsOrder:t,attributeType:r,attributeValue:o}=e;const{addAttributes:i,changeAttribute:u,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(A.ThemeProvider,{theme:ee},a().createElement(m.Z,null,a().createElement(B,{attributeType:r,uri:null==f?void 0:f.uri,onAddAttributes:x?i:void 0}),a().createElement(Y,{attributeType:r,attributeValue:f,imageAttributeFieldsOrder:t}),x&&a().createElement(K,{mode:y,imageAttributeFieldsOrder:t,attributeType:r,attributeValue:f,hasChanges:h,onDeleteAttribute:d,onChangeAttribute:u,onAddAttributes:i,onCancel:g,onApply:b})))},re=(0,x.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}}))),ne=e=>{let{className:t,attributeValue:r,handleSetAsDefault:o,attributeType:c}=e;const u=re(),p=(0,l.useSelector)(s.ZP.selectors.getEntity)||{},d=(0,l.useSelector)((e=>s.ZP.selectors.getModifiedEntity(e,null==p?void 0:p.uri)))||{},g=(0,l.useSelector)(s.ZP.selectors.getIsViewMode)?p:d,b=(0,l.useSelector)(s.ZP.selectors.getImageAttributesFieldsOrder)||{},h=b[null==p?void 0:p.type]||(null==b?void 0:b.default)||{},[y,x]=(0,n.useState)(!1);(0,n.useEffect)((()=>{x((null==g?void 0:g.defaultProfilePic)===(null==r?void 0:r.uri))}),[null==r?void 0:r.uri,g]);const v=(0,n.useCallback)((()=>{o(r.uri)}),[null==r?void 0:r.uri]);return a().createElement(m.Z,{className:f()(u.root,t)},a().createElement(m.Z,{className:u.header},a().createElement(i.Z,{className:u.headerTitle},T().text("Details"))),a().createElement(m.Z,{className:u.bodyWrapper},a().createElement(m.Z,{className:u.body},a().createElement(S.Z,{classes:{root:u.formControlLabel,label:u.checkboxLabel},control:a().createElement(Z.Z,{className:u.checkbox,checked:y,onChange:v,color:"default"}),label:T().text("Set as default")}),a().createElement(te,{attributeType:c,imageAttributeFieldsOrder:h,attributeValue:r}))))},ae=(0,x.Z)((()=>({root:{display:"flex",width:"100%",overflowY:"auto",height:"calc(100vh - 64px)"},main:{flex:"1 0 auto"},details:{width:"340px"}}))),le=e=>{let{attributeValues:t=[],currentAttributeValueUri:r,setCurrentAttributeValueUri:l,handleSetAsDefault:o,attributeType:i}=e;const[s,c]=(0,n.useState)(0);(0,n.useEffect)((()=>{u(r?t.findIndex((e=>e.uri===r)):0)}),[r,t]);const u=(0,n.useCallback)((e=>{var r;c(e),l(null===(r=t[e])||void 0===r?void 0:r.uri)}),[t]),p=ae();return a().createElement(m.Z,{className:p.root},a().createElement(O,{attributeValueIndex:s,setAttributeValueIndex:u,attributeValues:t,className:p.main}),a().createElement(ne,{handleSetAsDefault:o,attributeValue:t[s],className:p.details,attributeType:i}))};var oe=r(95596),ie=r(22349);const se=(0,x.Z)((()=>({root:{padding:"0 24px",overflowY:"auto",height:"calc(100vh - 64px)"},item:{padding:"2px"}}))),ce=e=>{let{items:t,selectedItems:r,onSelectImage:n,onDeselectImage:l,onShareLink:o,onSetAsDefault:i,onDownload:s,onClickImage:c,onDelete:u}=e;const p=se(),d=e=>a().createElement(ie.Z,{id:e,selected:r.includes(e),selectionMode:0!==r.length,onSelect:()=>n(e),onDeselect:()=>l(e),onShareLink:()=>o(e),onSetAsDefault:()=>i(e),onDownload:()=>s(e),onClick:()=>c(e),onDelete:u?()=>u(e):void 0,canBeSelected:!0});return a().createElement(m.Z,{className:p.root},a().createElement(E.Z,{container:!0},t.map((e=>{let{id:t,src:r}=e;return a().createElement(E.Z,{key:t,classes:{item:p.item},item:!0},a().createElement(h.Z,{size:h.f.LARGE,onClick:()=>c(t),src:r,overlay:d(t)}))}))))};var ue=r(86689);const pe=(0,x.Z)((e=>({selectButton:{fontSize:"14px",fontWeight:500,color:e.palette.primary.main,textTransform:"uppercase"}}))),me=e=>{let{selectedItems:t,items:r,onSelectAll:n,onClearAll:l}=e;const o=pe(),i=t.length===r.length;return a().createElement(ue.Z,{component:"button",underline:"none",classes:{button:o.selectButton},onClick:i?l:n},i?T().text("Clear selection"):T().text("Select all images"))};var de=r(94438),ge=r(22983),be=r(35292),fe=r(36746),he=r(39475);const ye=(0,x.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)"}}))),xe=e=>{let{onDownload:t,onShare:r,onUpload:n,onDelete:l}=e;const o=ye();return a().createElement(a().Fragment,null,n&&a().createElement($.Z,{variant:"contained",color:"primary",onClick:n,startIcon:a().createElement(de.Z,null)},T().text("Upload")),t&&n&&a().createElement("div",{className:o.divider}),t&&a().createElement(he.k,{className:o.downloadButton,tooltipTitle:T().text("Download selected items"),icon:fe.Z,onClick:t}),r&&a().createElement(he.k,{className:o.shareButton,tooltipTitle:T().text("Copy link"),icon:be.Z,onClick:r}),l&&a().createElement(he.k,{className:o.deleteButton,tooltipTitle:T().text("Delete selected items"),icon:ge.Z,onClick:l}))},ve=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)(oe.A.GALLERY_MODE),w=(0,l.useSelector)(s.ZP.selectors.getIsViewMode);(0,n.useEffect)((()=>{E(i?oe.A.DETAILS_MODE:oe.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)},N=e=>{const r=t.find((t=>{let{uri:r}=t;return r===e}));b(r)},T=e=>{h({uri:e,attributeType:m})},Z=v===oe.A.GALLERY_MODE,S=v===oe.A.DETAILS_MODE,k=y.length>0,A=S||Z&&k,P=!w&&A,I=!w&&(S||Z&&!k),L=Z&&k&&a().createElement(me,{items:C,selectedItems:y,onClearAll:()=>{x([])},onSelectAll:()=>{x((0,p.pluck)("id",C))}}),j=a().createElement(xe,{onDelete:P?()=>{(Z?y:[i]).forEach((e=>{T(e)})),y.length&&x([])}:void 0,onDownload:A?()=>{const e=Z?(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:S?()=>{O(i)}:void 0,onUpload:I?f:void 0});return a().createElement(oe.C,{mode:v,open:r,onChangeMode:E,header:{left:L,right:j},onClose:o},Z&&a().createElement(ce,{items:C,selectedItems:y,onSelectImage:e=>{x((t=>[...t,e]))},onDeselectImage:e=>{x((t=>t.filter((t=>t!==e))))},onShareLink:O,onSetAsDefault:N,onDownload:e=>{d([C.find((0,p.propEq)("id",e)).downloadURL])},onClickImage:e=>{u(e),E(oe.A.DETAILS_MODE)},onDelete:w?void 0:T}),S&&a().createElement(le,{handleSetAsDefault:N,setCurrentAttributeValueUri:u,currentAttributeValueUri:i,attributeValues:t,attributeType:m}))};var Ee=r(91446),we=r(94079);const Ce=(0,x.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,we.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 Oe(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Ne=e=>{let{attributeType:t,attributeValues:r=[],renderImage:p,overlay:m=!1,countFixedItems:d=0,children:g,onUpload:b,onDeleteAttribute:f,imageSize:h=Ee.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)(),N=Ce(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 T=(0,n.useRef)(),[Z,S]=(0,n.useState)(0),[k,A]=(0,n.useState)(0),P=(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)<Ee.lc;S(a),r.length>a?A(r.length-a+(l?1:0)):A(0)}),[r.length,d,h]),V=(0,n.useCallback)((e=>{R(e),T.current=e}),[R]);(0,n.useEffect)((()=>{T.current&&R(T.current)}),[r.length,R]);const U=(0,n.useCallback)((e=>{P||(D(e),L(!0))}),[P]),M=(0,n.useCallback)((()=>{L(!1)}),[]),z=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),_=e=>navigator.clipboard.writeText(e),B=(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){Oe(e,t,r[t])}))}return e}({onOpenImageGalleryDialog:U},m&&{onDownload:z,onShareLink:_,onSetAsDefault:B});return a().createElement(a().Fragment,null,a().createElement(o.Z,{handleWidth:!0,onResize:V}),a().createElement(ve,{attributeValues:r,open:I,onClose:M,setCurrentAttributeValueUri:D,currentAttributeValueUri:j,attributeType:t,onDownload:z,onShareLink:_,onSetAsDefault:B,onUpload:b,onDeleteAttribute:f}),a().createElement("div",{className:N.imageBox},g,r.slice(0,Z).map(p(H)),k>0&&a().createElement("div",{className:N.moreButtonContainer},a().createElement("div",{className:N.moreButton,onClick:()=>U()},a().createElement(i.Z,{className:N.number},`+${k}`)))))}},91446:(e,t,r)=>{r.d(t,{lc:()=>o,By:()=>i});var n=r(26729);const a=n.f.SMALL.imageWidth,l=n.f.SMALL.imageHeight,o=8,i={imageMargin:4,imageWidth:a,imageHeight:l}},37457:(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(7089),u=r(22241),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(67586);const b=(0,r(78223).Z)(c.Z),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},31569:(e,t,r)=>{r.d(t,{m:()=>S});var n=r(24328),a=r.n(n),l=r(52730),o=r(80030),i=r(35674),s=r(22241),c=r(17440),u=r(80687);const p=(e,t)=>{const r=(0,s.xy8)(e);return t.reduce(((t,n)=>{for(const a in n){const l=(e[r]||[]).find((e=>e.uri===a));return Array.isArray(n[a])&&"object"==typeof n[a][0]?t=(t||[]).concat(p(l,n[a])):(t.push(m(n[a],l)),t)}}),[])},m=(e,t)=>e&&e.length&&!(0,c.isNil)(e[0])&&""!==e[0]?{fieldName:(0,s.Tde)(t.uri),filter:t.type===s.oS0.TYPE_BLOB?s.j5E.FULL_TEXT:s.j5E.EQUALS,values:e}:{fieldName:(0,s.Tde)(t.uri),filter:"missing"},d=(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=g(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}),[])},g=(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(b(a,l)):a&&"object"==typeof a&&!Array.isArray(a)&&e.push(d(l,a,r,t))}return e}),[])},b=(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 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: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 y=r(87918),x=r.n(y),v=r(37573),E=r(18527),w=r(29627),C=r(79692);const O=(0,C.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"}}))),N=(0,C.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 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 Z=e=>{let{value:t,attributeType:r,config:o={},onSeeAllClick:c}=e;const[u,d]=(0,n.useState)([]),[g,b]=(0,n.useState)(0),f=(0,l.useSelector)(i.ZP.selectors.getEntity)||{},h=(0,w._)(),y=O(),C=(0,l.useSelector)(i.ZP.selectors.getGlobalSearchRequestOptions)||{},N=o.entityType||f.type,Z=g>6;(0,n.useEffect)((()=>{const e=function(e,t){let r=[{fieldName:"type",filter:"equals",values:[arguments.length>2&&void 0!==arguments[2]?arguments[2]:""]}];return Array.isArray(e)?r=r.concat(p(t,e)):r.push(m([e],t)),r}(t,r,N),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){T(e,t,r[t])}))}return e}({max:6},C);h(Promise.all([(0,s.ZOr)(e,n),(0,s.j_Q)(e,n)])).then((e=>{const[t,{total:r}]=e;d(Array.isArray(t)?t:[]),b(r)})).catch((()=>{d([]),b(0)}))}),[]);const S=Boolean(o.label);return a().createElement("div",{className:y.container},a().createElement("div",{className:y.header},a().createElement("div",{className:y.title},x().text("Pivot profiles")),a().createElement("div",{className:y.divider}),a().createElement("div",{className:y.headerCount},x().number(g,"0,0")+" "+(1===g?x().text("item"):x().text("items")))),S&&a().createElement("div",{className:y.entityTypeLabel},o.label),a().createElement("div",{className:y.body},u.map((e=>a().createElement("div",{key:e.uri,className:y.entityContainer},a().createElement(v.Z,{entity:e,avatarClassName:y.profileIcon}),a().createElement(E.Z,{className:y.entityLabel,value:(0,s.wwR)(e)},(0,s.idV)(e.label)))))),Z&&a().createElement("div",{className:y.footer},a().createElement("a",{className:y.seeAllButton,onClick:c},x().text("See all"))))},S=e=>{let{value:t,attributeType:r,children:p,className:m}=e;const g=N(),f=O(),y=(0,l.useDispatch)(),x=(0,n.useContext)(u.J)||[],v=(0,s.QZu)(r),E=(0,l.useSelector)(i.ZP.selectors.getMetadata)||{},w=v?d(r,t.value,x,E):b(t.lookupCode||t.value,r),C=x.some((e=>{let{uri:t}=e;return t===r.uri}))&&(Array.isArray(w)&&w.length||!Array.isArray(w)&&!(0,c.isNil)(w)),T=x.find((e=>{let{uri:t}=e;return t===r.uri})),S=()=>{const e=Array.isArray(w)?w.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,w);y(i.ui.actions.openPivotingPerspective({value:e,attributeType:r}))};return C?a().createElement(o.ZP,{interactive:!0,arrow:!0,placement:"right-start",classes:g,title:a().createElement(Z,{value:w,attributeType:r,config:T.popup,onSeeAllClick:S})},a().createElement("span",{className:m},a().createElement(h,{className:f.icon}),a().createElement("span",{className:f.content,onClick:S},p))):a().createElement(a().Fragment,null,p)}},30410:(e,t,r)=>{r.d(t,{Z:()=>u});var n=r(24328),a=r.n(n),l=r(22241),o=r(39390),i=r(3853),s=r(10768);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)}},76141:(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(22241),u=r(17440),p=r(92203),m=r(52239),d=r(89913),g=r(86602),b=r(26978);var f=r(1108);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:N,additionalControlsRenderer:T,showNonOv:Z}=e;const{attributes:S={}}=r,k=(0,n.useMemo)((()=>(0,c._kX)(i,t)),[t,i]),A=((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))})))(k,r),P=(0,n.useContext)(f.c),I=(0,n.useMemo)((()=>(0,c.Gtj)(t,i,r,o,Z,P)),[t,i,r,o,Z,P]),[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}),k.length>0&&a().createElement(d.Z,{label:s().text("More attributes"),onApply:D,dense:x,data:A})),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],S),parentUri:l,showEmptyEditors:o,mode:i,crosswalks:y,onAddAttributes:C,onChangeAttribute:O,onDeleteAttribute:N,additionalControlsRenderer:T,showNonOv:Z})})))};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)},63928:(e,t,r)=>{r.d(t,{Z:()=>v});var n=r(24328),a=r.n(n),l=r(22241),o=r(90436),i=r(17440),s=r(40901),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.Z,{variant:"caption",className:r.caption},y(t))};x.propTypes={cardinality:l.oA3};const v=x},92203:(e,t,r)=>{r.d(t,{ZP:()=>W});var n=r(52730),a=r(35674),l=r(22241),o=r(24328),i=r.n(o),s=r(17440),c=r(52239),u=r(66078),p=r(55401),m=r(14699),d=r(31992),g=r(35039),b=r(30410),f=r(63928),h=r(40901);const y=(0,s.filter)((0,s.propSatisfies)(l.ZiX,"uri"));var x=r(1108),v=r(37457);const E=e=>{let{max:t,values:r,attributeType:n,parentUri:a,mode:u,drawLines:E,showEmptyEditors:w,errorMessage:C,errors:O,paging:N,crosswalks:T,showNonOv:Z,nonVisibleValues:S,onAddAttributes:k,onDeleteAttribute:A,onChangeAttribute:P,onDeactivateError:I,additionalControlsRenderer:L,requestNextPageOfAttributeValues:j}=e;const D=(0,h.y)(),[R,V]=(0,o.useState)(t),[U,M]=(0,o.useState)(!1),{label:z,required:_,cardinality:B,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),X=(!U&&w||_||Y)&&$,G=(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 k(X&&!(0,l.YkM)(n.type)?[e,e]:[e])}),[R,k,a,n,X]),Q=(0,o.useCallback)((0,s.pipe)(A,s.T,M),[A,M]);if($&&!X)return null;if(X&&$&&(r=[G.current]),(0,l.O27)(r))return null;const J=(y(r)||[]).length,ee=Z?"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))(N),re=null!=N&&N.totalValues?N.totalValues-te:null==S?void 0:S.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:z,isRequired:_,className:D.title,"data-reltio-id":"reltio-attribute-label"}),i().createElement(v.Z,{nonOvValues:S,attributeType:n,className:D.ovIcon,nonOvTotal:re})),F&&i().createElement(f.Z,{cardinality:B}),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:X&&!_,showEmptyEditors:w,errors:O,ownError:(0,l.ADq)(e,t,n.uri,O),mode:u,crosswalks:T,onAddOneMore:ie===t?K:null,onAddAttributes:k,onDeleteAttribute:Q,onChangeAttribute:P,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(95544),C=r(90590),O=r(92145),N=r(79692);const T=(0,N.Z)({container:{display:"flex",flex:1,alignItems:"flex-start",marginBottom:"10px"},roleContainer:{width:"100%"},valueContainer:{marginLeft:"8px",width:0},deleteButton:{marginLeft:"8px"}});var Z=r(40435),S=r(22983);const k={MultiValue:O.Z},A=e=>{let{values:t,onChange:r,onDelete:c}=e;const u=T(),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:k,classes:u,className:u.roleContainer}),!!c&&i().createElement(Z.Z,{className:u.deleteButton,icon:S.Z,onClick:h,size:"L"}))};var P=r(7766);const I=(0,N.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(P.Z,{fullWidth:!0,multiple:!0,variant:"filled",className:t,value:r||[],onChange:m,getSuggestions:D}),!!c&&i().createElement(Z.Z,{className:u.deleteButton,icon:S.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 U(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),[N,T]=(0,o.useState)(!1),Z=(0,o.useCallback)((0,s.pipe)(u,s.T,T),[u,T]),S=(0,l.O27)(t),k=!N&&g&&S,P=(0,o.useRef)((0,l.gjI)({parentUri:n,attributeType:r}));return(0,l.j2U)(r)&&S&&!k?null:i().createElement(w.Z,{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.Z,{className:x.attributesWrapper},(()=>{switch(r.uri){case l.xPW.tags.uri:return i().createElement(R,{values:t,onDelete:Z,onChange:d});case l.xPW.roles.uri:return i().createElement(A,{values:t,onDelete:Z,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){U(e,t,r[t])}))}return e}({},P.current,{value:t[0]||""});return i().createElement(b.Z,V({attributeValue:e,attributeType:r,mode:a,onDeleteAttribute:Z,onChangeAttribute:d},y))}}})()))};function z(){return z=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},z.apply(this,arguments)}var _;!function(e){e.imageLine="imageLine",e.special="special",e.default="default"}(_||(_={}));const B=(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:N,requestNextPageOfAttributeValues:T}=e;const Z=(0,h.y)(),S=(0,s.partition)(l.OXP),[k,A]=S(t),P=x?t:k,I=x?[]:A,L={errorMessage:b,errors:g,mode:n,parentUri:d,onAddAttributes:v,onDeleteAttribute:w,onChangeAttribute:C,onDeactivateError:O,additionalControlsRenderer:N,showEmptyEditors:y};return(()=>{switch((0,s.cond)([[l.kqr,(0,s.always)(_.special)],[l.Or$,(0,s.always)(_.imageLine)],[s.T,(0,s.always)(_.default)]])(r)){case _.special:return i().createElement(c.Z,{enabled:o},i().createElement(M,z({values:P,attributeType:r},L)));case _.imageLine:return i().createElement(c.Z,{enabled:o},i().createElement("div",{className:Z.wrapper},i().createElement(m.Z,{label:null==r?void 0:r.label,"data-reltio-id":"reltio-attribute-label"}),i().createElement(u.Z,{attributeValues:P,attributeType:r,paging:p,onDeleteAttribute:w,parentUri:d,onChangeAttribute:C,requestNextPageOfAttributeValues:T,showNonOv:x})));default:return i().createElement(E,z({values:P,attributeType:r,max:f,paging:p,crosswalks:a,drawLines:o,requestNextPageOfAttributeValues:T,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)(B)},40901:(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"}})))},21548:(e,t,r)=>{r.d(t,{Z:()=>w});var n=r(24328),a=r.n(n),l=r(13980),o=r.n(l),i=r(71153),s=r.n(i),c=r(77277),u=r(40435),p=r(22983),m=r(90436),d=r(87918),g=r.n(d),b=r(22241);const f=(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 h=r(93555),y=r(76141),x=r(85777);function v(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const E=e=>{let{label:t,attributeTypesList:r,attributeType:l,attributeValue:o,children:i,errors:d,ownError:v,mode:E,metadata:w,crosswalks:C,lazy:O,showEmptyEditors:N,onAddOneMore:T,onAddAttributes:Z,onDeleteAttribute:S,onChangeAttribute:k,additionalControlsRenderer:A,hideDeleteButton:P,state:I,showNonOv:L}=e;const j=f(),D="deleted"===I,R="edited"===I,V=o.uri,U=(0,b.ZiX)(V),[M,z]=(0,n.useState)(U),_=(0,n.useMemo)((()=>(0,b.xv5)({attributeType:l,attributeValue:o,mode:E,metadata:w,isReltioCrosswalk:(0,b.KVV)(C,o)})),[l,o,E,w,C]),B=!D&&!P&&!!S&&_,H=(0,n.useMemo)((()=>(0,b.J6q)(o,d)),[d,o]);(0,n.useEffect)((()=>{H&&z(!0)}),[d,H]),(0,n.useEffect)((()=>{D&&z(!1)}),[D]);const W=(r||[]).some((e=>(0,b.kQw)(e))),F=(0,n.useMemo)((()=>({attributes:W?null:o.value,analyticsAttributes:W?o.value:null})),[o,W]),q=(0,b.e$p)(v)||H&&g().text("Has an incorrect value")||"";return O?a().createElement(c.Z,{variant:"text",color:"primary",onClick:T},"Create attribute"):a().createElement(a().Fragment,null,a().createElement("div",{className:j.editor},a().createElement("div",{className:j.titleContainer},a().createElement(x.Z,{onClick:()=>z((e=>!e)),expanded:M,className:j.expandButton,disabled:D}),a().createElement(h.Z,{errorMessage:q,classes:{helperText:j.errorWrapperHelperText}},a().createElement("div",{className:s()(j.label,{[j.deleted]:D}),"data-reltio-id":"reltio-attribute-complex-label"},t))),a().createElement("div",{className:j.actions},R&&a().createElement(m.Z,{variant:"caption",className:j.editedLabel},"(",g().text("edited"),")"),A&&A({attributeType:l,attributeValue:o}),B&&a().createElement(u.Z,{icon:p.Z,onClick:()=>S({uri:V,attributeType:l,attributeValue:o}),size:"L"}))),M&&a().createElement(y.Z,{attrTypes:r,entity:F,showEmptyEditors:N||U,drawLines:!0,parentUri:V,mode:E,crosswalks:C,onAddAttributes:Z,onChangeAttribute:k,onDeleteAttribute:S,additionalControlsRenderer:A,showNonOv:L},i))};E.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){v(e,t,r[t])}))}return e}({label:o().string,children:o().node,attributeTypesList:o().arrayOf(b.EMD),attributeValue:o().oneOfType([b.dMV,b.Rtp])},b.KVe);const w=E},54255:(e,t,r)=>{r.d(t,{Z:()=>b});var n=r(52730),a=r(35674),l=r(24328),o=r.n(l),i=r(13980),s=r.n(i),c=r(76141),u=r(22241);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)},72283:(e,t,r)=>{r.d(t,{Z:()=>Y});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(22241),p=r(84425),m=r(42662),d=r(12231),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.Z,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.Z,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),N=r(35674),T=r(90436),Z=r(12212);const S=e=>{const{selectProps:{currentEntityType:t,menuIsOpen:r,disableLinkClick:l},children:o,data:i}=e,p=f(),m=(0,O.useDispatch)(),d=(0,n.useContext)(Z.m),g=(0,O.useSelector)(N.ZP.selectors.getUIPath),b=(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:d}),N.ui.actions.openEntity,m)()},onClick:e=>e.preventDefault(),href:(0,u.ChB)({uiPath:g,uri:i.entityUri}),component:"a"};return!r&&a().createElement(T.Z,b,(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),P=r(61837);const I=e=>{const{selectProps:{onClear:t}}=e,r=y();return a().createElement(P.Z,{onClick:t},a().createElement(A.Z,{className:r.clearIcon}))};I.propTypes={selectProps:o().object.isRequired};const L=I;var j=r(54255),D=r(79573),R=r(92391),V=r(65549);const{Group:U}=R.F,M=e=>{const{selectProps:{inputValue:t,onCreate:r},data:n,children:l}=e,o=h();return a().createElement(U,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(V.Z,{className:o.addIcon}),s().text(`Create ${t?`"${t}" as `:""}new ${n.label}`))),l)};M.propTypes={selectProps:o().object.isRequired,data:o().object,children:o().array};const z=M,_=(0,g.Z)({creatorWrapper:{marginTop:"20px"}});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)}function H(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 W(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){F(e,t,r[t])}))}return e}function F(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const q=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=H(e,["entity","entityTypesUris","mode","max","onChange","onCreate","metadata","globalSearchRequestOptions","attributeTypesSelectionStrategy","disableLinkClick"]);const y=_(),[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=W({},g,{max:o}),N=m?(e,t)=>{m(t||r[0],e),v("")}:void 0,T=e=>{null!==e&&(v(""),i(e))},Z=(0,n.useMemo)((()=>1!==w.length),[w]),S=((0,c.isEmpty)(t)?w[0]:(0,u.nt9)(d,t.entityType))||{},A=m&&s().text(`Create ${x?`"${x}" as `:""}new ${S.label}`),P=s().text(`Select ${1===w.length?`${w[0].label} `:""}profile`),I=!(0,c.isEmpty)(t)&&(0,u.ZiX)(t.entityUri),R=Z?{Group:z,GroupHeading:D.Vd}:{},V=I?{ClearIndicator:L}:{},{TextFieldProps:U}=h,M=H(h,["TextFieldProps"]),F=(0,n.useMemo)((()=>W({},U||{},{"data-reltio-id":"reltio-entity-selector"})),[U]);return a().createElement(a().Fragment,null,a().createElement(p.Z,B({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=>W({},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:T,onCreate:N,onClear:()=>{T({})},label:P,createLabel:A,components:W({Option:E,SingleValue:k},R,V),currentEntityType:S,isClearable:!0,disableLinkClick:f,TextFieldProps:F},M)),I&&a().createElement("div",{className:y.creatorWrapper},a().createElement(j.Z,{mode:l,attributeTypesSelectionStrategy:b,entityType:S,entityUri:t.entityUri})))};q.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 Y=q},66078:(e,t,r)=>{r.d(t,{Z:()=>$});var n=r(24328),a=r.n(n),l=r(52730),o=r(94438),i=r(35674),s=r(22241),c=r(26729),u=r(22349),p=r(40435),m=r(87918),d=r.n(m),g=r(13896),b=r(58651),f=r(95544),h=r(8629),y=r(90436),x=r(87378),v=r(27556),E=r(74603),w=r(77277),C=r(79692);const O=(0,C.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}}))),N=e=>0===e.trim().length,T=e=>{let{onSend:t}=e;const r=O(),[l,o]=(0,n.useState)(""),[i,s]=(0,n.useState)(null);return a().createElement(f.Z,{className:r.root},a().createElement(v.Z,{className:r.paper},a().createElement(E.Z,{value:l,onChange:e=>{const t=e.target.value,r=new RegExp(/^(ftp|http|https):\/\/[^ "]+$/).test(t);o(t),r||N(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(w.Z,{disabled:Boolean(i)||N(l),variant:"outlined",color:"primary",onClick:()=>{t(l),o(""),s(null)}},d().text("Send"))),i&&a().createElement(y.Z,{className:r.errorMessage},i))};var Z=r(71153),S=r.n(Z),k=r(83997);const A=["image/png","image/jpeg","image/tiff","image/gif","image/bmp"],P=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:A.join(","),id:"upload-image-button",type:"file"}),a().createElement("label",{htmlFor:"upload-image-button"},a().createElement(w.Z,{className:t,variant:"contained",color:"primary",component:"span"},d().text("Select image"))))};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 L=e=>a().createElement("svg",I({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)"})))),j=(0,C.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"}}))),D=e=>{let{onAppendFile:t,className:r}=e;const n=j(),[{canDrop:l,isOver:o},i]=(0,g.useDrop)({accept:[k.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:S()(n.root,{[n.isActive]:s},r)},a().createElement(L,{className:n.icon}),a().createElement(y.Z,{className:n.title},d().text("Drag an image here")),a().createElement(y.Z,{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(P,{onAppendFile:t}))},R=(0,C.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"}}))),V=e=>{let{children:t,className:r}=e;const n=R();return a().createElement(f.Z,{className:S()(n.root,r)},a().createElement(f.Z,{className:n.border}),a().createElement(y.Z,{className:n.text},t),a().createElement(f.Z,{className:n.border}))};var U=r(87685),M=r(37265),z=r(39475);const _=(0,C.Z)({closeIcon:{color:"#fff"}}),B=e=>{let{error:t,onClose:r}=e;const n=_();return a().createElement(M.Z,{open:Boolean(t),onClose:r,message:t,action:a().createElement(z.k,{className:n.closeIcon,tooltipTitle:d().text("Close"),icon:U.default,onClick:r})})},H=(0,C.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"}}))),W=e=>{let{open:t,onClose:r,onUpload:o}=e;const c=H(),u=(0,l.useSelector)(i.ZP.selectors.getImageServicePath),p=(0,l.useSelector)(i.ZP.selectors.getEnvironment),m=(0,l.useSelector)(i.ZP.selectors.getTenant),[v,E]=(0,n.useState)(!1),[w,C]=(0,n.useState)(null),O=e=>{E(!0),(0,s.Ixr)({image:e,imageServicePath:u,environment:p,tenant:m}).then((e=>{o(e),r()})).catch((e=>C(e.errorMessage))).finally((()=>E(!1)))};return a().createElement(g.DndProvider,{backend:b.default},a().createElement(h.Z,{open:t,onClose:r,classes:{paper:c.dialogPaper}},a().createElement(y.Z,{className:c.title},d().text("Add new image")),a().createElement(f.Z,{className:c.body},a().createElement(D,{className:c.targetBox,onAppendFile:e=>{const t=Number((e.size/1024/1024).toFixed(2)),r=A.includes(e.type);t>20?C(d().text("File size exceeds configured max file size.")):r?O(e):C(d().text("File format is not supported."))}}),a().createElement(V,{className:c.divider},d().text("or")),a().createElement(T,{onSend:e=>{O(e)}})),v&&a().createElement(x.Z,null),a().createElement(B,{error:w,onClose:()=>C(null)})))};var F=r(43253),q=r(91446);const Y=(0,C.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=q.By}=e;const x=Y(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),N=(0,n.useCallback)((()=>{O((e=>!e))}),[]),T=(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]),Z=(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]),S=(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:()=>Z({uri:p,attributeType:t}),onDownload:()=>l([c]),onClick:()=>n(p)})};return a().createElement("div",{className:x.root},a().createElement(F.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:S(e,t),onClick:()=>l(n),size:{imageWidth:y.imageWidth,imageHeight:y.imageHeight},"data-reltio-id":"reltio-attribute-value"}))},overlay:!0,countFixedItems:1,onUpload:N,onDeleteAttribute:Z,imageSize:y,requestNextPageOfAttributeValues:g,paging:f,parentUri:b,showNonOv:h},a().createElement("div",{className:x.uploadContainer,onClick:N},a().createElement(p.Z,{className:x.uploadButton,iconClassName:x.uploadIcon,icon:o.Z}))),a().createElement(W,{open:C,onUpload:T,onClose:N}))}},89913:(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(77277);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(22311),d=r(33117),g=r(41008),b=r(63485),f=r(26638),h=r(65549),y=r(94792);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,N]=(0,n.useState)(""),[T,Z]=(0,n.useState)([]),S=(0,n.useCallback)(((e,t)=>{Z((0,c.ifElse)((0,c.always)(t),(0,c.append)(e),(0,c.reject)((0,c.propEq)("id",e.id)))(T))}),[T]),k=(0,n.useMemo)((()=>(0,c.pipe)(x(O),(0,c.map)((e=>({item:{id:e.uri,label:e.label,attrType:e}}))))(l)),[l,O]),A=(0,n.useMemo)((()=>(0,g.LG)(k)),[k]),P=(0,n.useCallback)((()=>28),[]),I=(0,n.useCallback)((e=>{let{item:t}=e;S(t,(0,c.not)((0,c.any)((0,c.propEq)("id",t.id))(T)))}),[S,T]),{focusIndex:L,handleKeyDown:j}=(0,f.t)({items:A,open:w,onSelectFocusedItem:I,selectedItems:T}),D=(0,n.useRef)(null);D.current=L;const R=Math.min(255,28*A.length),V=Math.max(140,R+112),U=(0,n.useCallback)(((e,t,r)=>{let{item:n,level:l=0}=t;const o=(0,c.any)((0,c.propEq)("id",n.id))(T),i=D.current===r;return a().createElement(d.Z,{key:n.uri,onClick:S,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,S,T]);return a().createElement("div",{className:o()(v.moreAttributes,{[v.dense]:i})},a().createElement(u.Z,{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)((()=>{T.length>0&&s((0,c.pluck)("attrType",T))}),(()=>C(!1)),(()=>N("")),(()=>Z([]))),onSearch:N,containerHeight:V,title:r,containerWidth:320,searchInputOnKeyDown:j},a().createElement(b.Z,{getItemSize:P,renderItem:U,items:A,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},3853:(e,t,r)=>{r.d(t,{Z:()=>c});var n=r(24328),a=r.n(n),l=r(22241),o=r(21548);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)},10768:(e,t,r)=>{r.d(t,{Z:()=>C});var n=r(52730),a=r(35674),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(22241),d=r(21548),g=r(72283),b=r(93555);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:N}=x,T=(0,l.useRef)(v),Z=(0,m.CZ8)(v),S=(0,m.o96)(v),k=(0,m.Poc)(E),A=(0,m.nt9)(n,k),P=r?(0,m.Kxm)(r,A.dataLabelPattern):v.label,I=(0,l.useMemo)((()=>[k]),[k]),L=(0,l.useMemo)((()=>(0,m.EtK)(C,S)),[C,S]),j=(0,l.useMemo)((()=>(0,m.mbo)(v,O)),[v,O]),D=(0,l.useMemo)((()=>Z&&{entityUri:(0,m.ZTM)(Z),entityType:(0,m.uGi)(Z),entityLabel:v.label}),[Z,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]),U=(0,l.useCallback)((e=>{r&&i(r.uri);const t=T.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)});N({value:a,attributeType:E,uri:v.uri}),j&&c((0,m.iFp)(j))}),[v,E,r,N,i,c,j]),M=(0,l.useCallback)(((e,t)=>{const r=(0,p.pipe)(V,(0,m._kX)(w))(A),a=(0,m.pBq)({entityTypeUri:e,initValue:t,attributeTypes:r,metadata:n,mode:w});U(a),s(a)}),[V,w,A,n,U,s]),z=(0,l.useMemo)((()=>(0,m.yv0)({attributeType:E,attributeValue:v,mode:w,isReltioCrosswalk:(0,m.KVV)(C,v)})),[E,v,w,C]),_=(0,l.useMemo)((()=>(0,m.d89)(w,A)),[w,A]),B=(0,m.e$p)(j);return o().createElement(d.Z,h({},x,{label:(0,m.idV)(P),attributeTypesList:R,crosswalks:L,metadata:n}),o().createElement(b.Z,{errorMessage:B},o().createElement(g.Z,{className:u()(t.item,{[t.dense]:B||D&&(0,m.ZiX)(D.entityUri)}),entity:D||{},entityTypesUris:I,max:20,globalSearchRequestOptions:a,mode:w,onChange:z?U:void 0,onCreate:_?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)},39390:(e,t,r)=>{r.d(t,{Z:()=>A});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(90436),g=r(87918),b=r.n(g),f=r(22241),h=r(67586),y=r(65314),x=r(93555),v=r(40435),E=r(12980),w=r(67462),C=r(35674);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){N(e,t,r[t])}))}return e}function N(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={};const Z=(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 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=>{let{className:t,attributeValue:r,attributeType:n,isReltioCrosswalk:l,ownError:o,mode:s,onAddOneMore:g,onDeleteAttribute:w,onChangeAttribute:N,onDeactivateError:k,additionalControlsRenderer:A,state:P}=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=Z(),j="deleted"===P,D="edited"===P,R=(0,f.KIu)(s),V=(0,f.PFL)(n),U=(0,E.AG)(r,V),M=(0,f.Vg3)({attributeType:n,mode:s}),z=(0,f.yv0)({attributeType:n,attributeValue:r,mode:s,isReltioCrosswalk:l}),_=(0,f.xv5)({attributeType:n,attributeValue:r,mode:s,isReltioCrosswalk:l}),B=z&&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=T[e];return(0,u.equals)(t,r)?r:((0,u.equals)(null==r?void 0:r.parents,t.parents)&&(t.parents=r.parents),T[e]=t,t)})(o,h)}var a,l})(e,r,null==n?void 0:n.uri):null)),F=()=>{o&&k((0,f.iFp)(o))},q=!!g&&M&&!n.singleValue,Y=!j&&!!w&&_,$=!!H,X=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"]]:!B}),"data-reltio-id":"reltio-attribute-value"},B?a().createElement(y.Z,S({fieldName:(0,f.Tde)(n.uri),value:U,dataTypeDefinition:V,error:$,onChange:(0,u.pipe)((0,E.pp)(r,n),N,F),fullWidth:!0},W,I,X)):a().createElement(h.Z,{value:(0,f.kDl)(r),dataTypeDefinition:V}))),a().createElement("div",{className:L["editor-actions"]},D&&a().createElement(d.Z,{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)}),A&&A({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"})))};k.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 A=(0,n.memo)((0,w.Z)(k,(()=>{const e=Z();return a().createElement("div",{className:e.placeholder})})))},12980:(e,t,r)=>{r.d(t,{AG:()=>i,Ho:()=>s,pp:()=>c});var n=r(95038),a=r.n(n),l=r(22241),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})))},1108:(e,t,r)=>{r.d(t,{c:()=>a});var n=r(24328);const a=r.n(n)().createContext(null)},26978:(e,t,r)=>{r.d(t,{U:()=>l,A:()=>o});var n=r(17440),a=r(22241);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)},31992:(e,t,r)=>{r.d(t,{Z:()=>u});var n=r(96971),a=r(86689),l=r(24328),o=r.n(l),i=r(87918),s=r.n(i),c=r(47608);const u=e=>{let{onClick:t}=e;const r=(0,c.y)();return o().createElement(a.Z,{component:"button",variant:"caption",className:r.link,onClick:t,underline:"none"},o().createElement(n.Z,{className:r["svg-icon__root"]}),s().text("Show less"))}},35039:(e,t,r)=>{r.d(t,{Z:()=>u});var n=r(4426),a=r(86689),l=r(24328),o=r.n(l),i=r(87918),s=r.n(i),c=r(47608);const u=e=>{let{moreNumber:t,valueNumber:r,onClick:l}=e;const i=(0,c.y)();return o().createElement(a.Z,{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"))}},47608:(e,t,r)=>{r.d(t,{y:()=>n});const n=(0,r(79692).Z)({link:{display:"flex",marginTop:4},"svg-icon__root":{fontSize:"1rem"}})},11013:(e,t,r)=>{r.d(t,{Z:()=>c});var n=r(24328),a=r.n(n),l=r(22241),o=r(81489),i=r(88610),s=r(95492);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)}},89978:(e,t,r)=>{r.d(t,{Z:()=>d});var n=r(24328),a=r.n(n),l=r(17440),o=r(22241),i=r(52239),s=r(47972),c=r(35039),u=r(31992),p=r(86602),m=r(26978);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]),N=O.slice(0,v),T=h&&N.length<O.length,Z=h&&N.length>=O.length&&h<N.length,S={enabled:g};return a().createElement("div",{className:f},b&&a().createElement(i.Z,S,b),N.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})})),T&&a().createElement(c.Z,{onClick:()=>{E(1/0)}}),Z&&a().createElement(u.Z,{onClick:()=>{E(h)}}))}))},47972:(e,t,r)=>{r.d(t,{Z:()=>K});var n=r(52730),a=r(35674),l=r(71153),o=r.n(l),i=r(24328),s=r.n(i),c=r(17440),u=r(22241),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(14699),E=r(52239),w=r(62901),C=r(72316),O=r(37457),N=r(11013);const T=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(N.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 Z=r(35039),S=r(31992);const k=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:T}=l,k=r.slice(0,h),A=a-h;return s().createElement("div",{className:f.wrapper},s().createElement("div",{className:f.titleRow},s().createElement(v.Z,{label:T,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},k.map((e=>s().createElement(N.Z,{key:e.uri,className:o()(f.attribute,d),attributeValue:e,attributeType:l,showNonOv:g})))),w&&s().createElement(Z.Z,{moreNumber:(0,c.min)(t,A),valueNumber:A,onClick:()=>{r.length<a&&p({parentUri:u,attributeTypeUri:l.uri,attributeTypeName:l.name,values:r,defaultMaxValues:t}),y(h+t)}}),C&&s().createElement(S.Z,{onClick:()=>{y(t)}}))};var A=r(61347),P=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(62228),j=r(10591);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])}),U=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:U})};var z=r(86689),_=r(10609);const B=e=>{let{value:t}=e;const r=V(),l=(0,n.useSelector)(a.ZP.selectors.getUIPath),o=(0,i.useContext)(_.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(z.Z,{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:B})},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(P.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(N.Z,{className:e,attributeValue:{value:t[0]},attributeType:r,inlined:!0})}})(n.attribute));var l},F="oneLine",q="multiLine",Y="imageLine",$="special",X=(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",N=(0,c.ifElse)((0,c.has)(O),(0,c.prop)(O),(0,c.always)(w.length))(a),Z=null!=a&&a.totalValues?a.totalValues-N:C.length,S=1===N&&!(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)(S),(0,c.always)(F)],[c.T,(0,c.always)(q)]])(r)){case F:return s().createElement(T,{value:w[0],nonVisibleValues:C,totalNonVisibleValues:Z,attributeType:r,titleClassName:m,contentClassName:d,showNonOv:g});case q:return s().createElement(k,{values:w,nonVisibleValues:C,totalVisibleValues:N,totalNonVisibleValues:Z,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(A.Z,{attributeValues:w,attributeType:r,paging:a,parentUri:l,requestNextPageOfAttributeValues:p,showNonOv:g}));case $:return s().createElement(W,{values:w,attributeType:r})}})()))})),G={requestNextPageOfAttributeValues:a.N5.actions.requestNextPageOfAttributeValues},K=(0,n.connect)(((e,t)=>{let{max:r}=t;return{max:r||a.ZP.selectors.getDefaultMaxValues(e)}}),G)(X)},13870:(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(22241),u=r(90436),p=r(89978),m=r(85777),d=r(72316),g=r(62901);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.Z,{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},61347:(e,t,r)=>{r.d(t,{Z:()=>g});var n=r(24328),a=r.n(n),l=r(22241),o=r(71153),i=r.n(o),s=r(62228),c=r(26729),u=r(43253),p=r(91446),m=r(10591);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})}},88610:(e,t,r)=>{r.d(t,{Z:()=>y});var n=r(24328),a=r.n(n),l=r(95544),o=r(71153),i=r.n(o),s=r(22241),c=r(62228),u=r(10591),p=r(13870),m=r(31569);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.Z,{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)},95492:(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(22241),c=r(62228),u=r(13870),p=r(10591);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(35674);const x=(0,n.connect)((e=>({metadata:y.ZP.selectors.getMetadata(e),uiPath:y.ZP.selectors.getUIPath(e)})))(h)},81489:(e,t,r)=>{r.d(t,{Z:()=>h});var n=r(24328),a=r.n(n),l=r(22241),o=r(71153),i=r.n(o),s=r(62901),c=r(62228),u=r(72316),p=r(67586),m=r(31569),d=r(10591);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}))}},10591:(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]}},86602:(e,t,r)=>{r.d(t,{S:()=>a});var n=r(22241);const a=[n.xPW.roles.uri,n.xPW.tags.uri]},62901:(e,t,r)=>{r.d(t,{U:()=>n});const n="commentsContainerVisibilityArea"},76572:(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"},65510:(e,t,r)=>{r.d(t,{P:()=>a});var n=r(24328);const a=r.n(n)().createContext(!1);a.displayName="BlockImageGalleryDialogContext"},58142:(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"},63929:(e,t,r)=>{r.d(t,{X:()=>a});var n=r(24328);const a=r.n(n)().createContext({});a.displayName="EntitiesMapContext"},10609:(e,t,r)=>{r.d(t,{u:()=>a});var n=r(24328);const a=r.n(n)().createContext(null);a.displayName="EntityContext"},62228:(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"},80687:(e,t,r)=>{r.d(t,{J:()=>a});var n=r(24328);const a=r.n(n)().createContext([])},38309:(e,t,r)=>{r.d(t,{A:()=>a});var n=r(24328);const a=r.n(n)().createContext([]);a.displayName="RelatedObjectUrisContext"},89575:(e,t,r)=>{r.d(t,{s:()=>a});var n=r(24328);const a=r.n(n)().createContext([]);a.displayName="UsersContext"},27536:(e,t,r)=>{r.d(t,{S:()=>o});var n=r(24328),a=r(76572);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}},36746:(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"})))}}]);
|