@reltio/remotes 1.4.1119 → 1.4.1122

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/22.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[22],{1292:(e,t,n)=>{n.d(t,{Z:()=>u});var r=n(24328),o=n(75047),i=(n(13980),n(8732)),a=n(85974),c=n(74718);function s(e){return e.substring(2).toLowerCase()}const u=function(e){var t=e.children,n=e.disableReactTree,u=void 0!==n&&n,l=e.mouseEvent,d=void 0===l?"onClick":l,f=e.onClickAway,p=e.touchEvent,m=void 0===p?"onTouchEnd":p,v=r.useRef(!1),h=r.useRef(null),g=r.useRef(!1),E=r.useRef(!1);r.useEffect((function(){return setTimeout((function(){g.current=!0}),0),function(){g.current=!1}}),[]);var Z=r.useCallback((function(e){h.current=o.findDOMNode(e)}),[]),x=(0,a.Z)(t.ref,Z),k=(0,c.Z)((function(e){var t=E.current;if(E.current=!1,g.current&&h.current&&!function(e){return document.documentElement.clientWidth<e.clientX||document.documentElement.clientHeight<e.clientY}(e))if(v.current)v.current=!1;else{(e.composedPath?e.composedPath().indexOf(h.current)>-1:!(0,i.Z)(h.current).documentElement.contains(e.target)||h.current.contains(e.target))||!u&&t||f(e)}})),w=function(e){return function(n){E.current=!0;var r=t.props[e];r&&r(n)}},y={ref:x};return!1!==m&&(y[m]=w(m)),r.useEffect((function(){if(!1!==m){var e=s(m),t=(0,i.Z)(h.current),n=function(){v.current=!0};return t.addEventListener(e,k),t.addEventListener("touchmove",n),function(){t.removeEventListener(e,k),t.removeEventListener("touchmove",n)}}}),[k,m]),!1!==d&&(y[d]=w(d)),r.useEffect((function(){if(!1!==d){var e=s(d),t=(0,i.Z)(h.current);return t.addEventListener(e,k),function(){t.removeEventListener(e,k)}}}),[k,d]),r.createElement(r.Fragment,null,r.cloneElement(t,y))}},4190:(e,t,n)=>{n.d(t,{wE:()=>h,ni:()=>g,ZP:()=>x});var r=n(7560),o=n(54530),i=n(24328),a=(n(13980),n(6277)),c=n(35111),s=n(41262),u=n(15459),l=n(62339),d=n(27556),f=n(97580),p=n(39265),m=n(60364),v={left:"right",right:"left",top:"down",bottom:"up"};function h(e){return-1!==["left","right"].indexOf(e)}function g(e,t){return"rtl"===e.direction&&h(t)?v[t]:t}var E={enter:p.x9.enteringScreen,exit:p.x9.leavingScreen},Z=i.forwardRef((function(e,t){var n=e.anchor,u=void 0===n?"left":n,p=e.BackdropProps,h=e.children,Z=e.classes,x=e.className,k=e.elevation,w=void 0===k?16:k,y=e.ModalProps,b=(y=void 0===y?{}:y).BackdropProps,C=(0,o.Z)(y,["BackdropProps"]),P=e.onClose,T=e.open,R=void 0!==T&&T,D=e.PaperProps,L=void 0===D?{}:D,A=e.SlideProps,B=e.TransitionComponent,N=void 0===B?l.Z:B,S=e.transitionDuration,O=void 0===S?E:S,M=e.variant,Y=void 0===M?"temporary":M,z=(0,o.Z)(e,["anchor","BackdropProps","children","classes","className","elevation","ModalProps","onClose","open","PaperProps","SlideProps","TransitionComponent","transitionDuration","variant"]),H=(0,m.Z)(),I=i.useRef(!1);i.useEffect((function(){I.current=!0}),[]);var X=g(H,u),_=i.createElement(d.Z,(0,r.Z)({elevation:"temporary"===Y?w:0,square:!0},L,{className:(0,a.Z)(Z.paper,Z["paperAnchor".concat((0,f.Z)(X))],L.className,"temporary"!==Y&&Z["paperAnchorDocked".concat((0,f.Z)(X))])}),h);if("permanent"===Y)return i.createElement("div",(0,r.Z)({className:(0,a.Z)(Z.root,Z.docked,x),ref:t},z),_);var W=i.createElement(N,(0,r.Z)({in:R,direction:v[X],timeout:O,appear:I.current},A),_);return"persistent"===Y?i.createElement("div",(0,r.Z)({className:(0,a.Z)(Z.root,Z.docked,x),ref:t},z),W):i.createElement(c.Z,(0,r.Z)({BackdropProps:(0,r.Z)({},p,b,{transitionDuration:O}),BackdropComponent:s.Z,className:(0,a.Z)(Z.root,Z.modal,x),open:R,onClose:P,ref:t},z,C),W)}));const x=(0,u.Z)((function(e){return{root:{},docked:{flex:"0 0 auto"},paper:{overflowY:"auto",display:"flex",flexDirection:"column",height:"100%",flex:"1 0 auto",zIndex:e.zIndex.drawer,WebkitOverflowScrolling:"touch",position:"fixed",top:0,outline:0},paperAnchorLeft:{left:0,right:"auto"},paperAnchorRight:{left:"auto",right:0},paperAnchorTop:{top:0,left:0,bottom:"auto",right:0,height:"auto",maxHeight:"100%"},paperAnchorBottom:{top:"auto",left:0,bottom:0,right:0,height:"auto",maxHeight:"100%"},paperAnchorDockedLeft:{borderRight:"1px solid ".concat(e.palette.divider)},paperAnchorDockedTop:{borderBottom:"1px solid ".concat(e.palette.divider)},paperAnchorDockedRight:{borderLeft:"1px solid ".concat(e.palette.divider)},paperAnchorDockedBottom:{borderTop:"1px solid ".concat(e.palette.divider)},modal:{}}}),{name:"MuiDrawer",flip:!1})(Z)},62339:(e,t,n)=>{n.d(t,{Z:()=>v});var r=n(7560),o=n(54530),i=n(24328),a=(n(13980),n(75047)),c=n(90708),s=n(75614),u=n(85974),l=n(60364),d=n(39265),f=n(41070);function p(e,t){var n=function(e,t){var n,r=t.getBoundingClientRect();if(t.fakeTransform)n=t.fakeTransform;else{var o=window.getComputedStyle(t);n=o.getPropertyValue("-webkit-transform")||o.getPropertyValue("transform")}var i=0,a=0;if(n&&"none"!==n&&"string"==typeof n){var c=n.split("(")[1].split(")")[0].split(",");i=parseInt(c[4],10),a=parseInt(c[5],10)}return"left"===e?"translateX(".concat(window.innerWidth,"px) translateX(").concat(i-r.left,"px)"):"right"===e?"translateX(-".concat(r.left+r.width-i,"px)"):"up"===e?"translateY(".concat(window.innerHeight,"px) translateY(").concat(a-r.top,"px)"):"translateY(-".concat(r.top+r.height-a,"px)")}(e,t);n&&(t.style.webkitTransform=n,t.style.transform=n)}var m={enter:d.x9.enteringScreen,exit:d.x9.leavingScreen};const v=i.forwardRef((function(e,t){var n=e.children,d=e.direction,v=void 0===d?"down":d,h=e.in,g=e.onEnter,E=e.onEntered,Z=e.onEntering,x=e.onExit,k=e.onExited,w=e.onExiting,y=e.style,b=e.timeout,C=void 0===b?m:b,P=e.TransitionComponent,T=void 0===P?s.ZP:P,R=(0,o.Z)(e,["children","direction","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"]),D=(0,l.Z)(),L=i.useRef(null),A=i.useCallback((function(e){L.current=a.findDOMNode(e)}),[]),B=(0,u.Z)(n.ref,A),N=(0,u.Z)(B,t),S=function(e){return function(t){e&&(void 0===t?e(L.current):e(L.current,t))}},O=S((function(e,t){p(v,e),(0,f.n)(e),g&&g(e,t)})),M=S((function(e,t){var n=(0,f.C)({timeout:C,style:y},{mode:"enter"});e.style.webkitTransition=D.transitions.create("-webkit-transform",(0,r.Z)({},n,{easing:D.transitions.easing.easeOut})),e.style.transition=D.transitions.create("transform",(0,r.Z)({},n,{easing:D.transitions.easing.easeOut})),e.style.webkitTransform="none",e.style.transform="none",Z&&Z(e,t)})),Y=S(E),z=S(w),H=S((function(e){var t=(0,f.C)({timeout:C,style:y},{mode:"exit"});e.style.webkitTransition=D.transitions.create("-webkit-transform",(0,r.Z)({},t,{easing:D.transitions.easing.sharp})),e.style.transition=D.transitions.create("transform",(0,r.Z)({},t,{easing:D.transitions.easing.sharp})),p(v,e),x&&x(e)})),I=S((function(e){e.style.webkitTransition="",e.style.transition="",k&&k(e)})),X=i.useCallback((function(){L.current&&p(v,L.current)}),[v]);return i.useEffect((function(){if(!h&&"down"!==v&&"right"!==v){var e=(0,c.Z)((function(){L.current&&p(v,L.current)}));return window.addEventListener("resize",e),function(){e.clear(),window.removeEventListener("resize",e)}}}),[v,h]),i.useEffect((function(){h||X()}),[h,X]),i.createElement(T,(0,r.Z)({nodeRef:L,onEnter:O,onEntered:Y,onEntering:M,onExit:H,onExited:I,onExiting:z,appear:!0,in:h,timeout:C},R),(function(e,t){return i.cloneElement(n,(0,r.Z)({ref:N,style:(0,r.Z)({visibility:"exited"!==e||h?void 0:"hidden"},y,n.props.style)},t))}))}))}}]);
package/2507.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[2507],{98808:(e,t,n)=>{n.d(t,{K:()=>f,N:()=>d});var r=n(24328),a=n.n(r),l=n(71153),o=n.n(l),s=n(94079);const i=(0,n(79692).Z)((e=>({button:{padding:"9px 16px 9px 12px","& svg g path, & svg path":{fill:e.palette.primary.main,fillOpacity:1}},iconButton:{"& svg g path, & svg path":{fill:e.palette.primary.main,fillOpacity:1}},startIcon:{marginLeft:0,marginRight:"8px",width:"18px",height:"18px",alignItems:"center"},label:{whiteSpace:"nowrap",fontSize:"14px",lineHeight:"16px",letterSpacing:0},overflowStyle:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},menuIcon:{marginRight:"12px"},menuItem:{minHeight:"28px",padding:"2px 16px 2px 12px"},menuText:{color:e.palette.text.primary,fontSize:"13px",lineHeight:"15px",letterSpacing:0}})));var c=n(31276),p=n(88611),u=n(8818);function m(){return m=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},m.apply(this,arguments)}let d;!function(e){e.iconButton="iconButton",e.button="button",e.menuItem="menuItem"}(d||(d={}));const f=(0,r.forwardRef)(((e,t)=>{let{className:n,mode:r=d.iconButton,label:l,disabled:f,icon:g,onClick:h=c.ZT,onMenuClose:b=c.ZT}=e,v=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["className","mode","label","disabled","icon","onClick","onMenuClose"]);const y=i();return(()=>{switch(r){case"iconButton":return a().createElement(u.k,m({disabled:f,className:o()(y.iconButton,n),size:"S",tooltipTitle:l,onClick:h,icon:g},v));case"button":return a().createElement(s.Button,m({className:o()(y.button,n),disabled:f,startIcon:a().createElement(g,null),onClick:h,color:"primary",classes:{startIcon:y.startIcon,label:y.label}},v),a().createElement(p.C,{value:l},a().createElement("div",{className:y.overflowStyle},l)));case"menuItem":{const e=()=>{b(),h()};return a().createElement(s.MenuItem,m({classes:{root:y.menuItem},onClick:e,disabled:f,ref:t},v),a().createElement(a().Fragment,null,a().createElement(g,{className:y.menuIcon}),a().createElement(s.Typography,{classes:{root:y.menuText}},l)))}}})()}));f.displayName="ActionButton"},7154:(e,t,n)=>{n.d(t,{Z:()=>d});var r=n(24328),a=n.n(r),l=n(13980),o=n.n(l),s=n(99493),i=n(17440),c=n(89846),p=n(27185);function u(){return u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u.apply(this,arguments)}const m=e=>{let{relation:t={},inRelationTypes:n=[],outRelationTypes:l=[],onChange:o=i.identity,applyFirstByDefault:s=!1,reversedContextLabels:m=!1}=e,d=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["relation","inRelationTypes","outRelationTypes","onChange","applyFirstByDefault","reversedContextLabels"]);const{getRelationTypesOptions:f,fromEditorValue:g,toEditorValue:h}=(0,c.n)({reversedContextLabels:m}),b=(0,r.useMemo)((()=>f(n,l)),[f,n,l]),v=(0,r.useCallback)((0,i.pipe)(g(n,l),o),[g,n,l,o]),y=!!t.relationType;return(0,r.useEffect)((()=>{s&&b.length&&!y&&v(b[0])}),[b,s,v,y]),a().createElement(p.Z,u({value:h(t,b),options:b,onChange:v},d))};m.propTypes={className:o().string,relation:s.bNA,inRelationTypes:o().arrayOf(s.IYE),outRelationTypes:o().arrayOf(s.IYE),applyFirstByDefault:o().bool,reversedContextLabels:o().bool,onChange:o().func};const d=m},2014:(e,t,n)=>{n.d(t,{Z:()=>u});var r=n(24328),a=n.n(r),l=n(71153),o=n.n(l),s=n(19592);const i=(0,n(79692).Z)((e=>({label:{backgroundColor:"rgba(43,152,240,0.12)",fontSize:"12px",lineHeight:"15px",color:e.palette.text.primary,display:"flex",alignItems:"center",padding:"2px 7px"},container:{display:"flex",alignItems:"center",cursor:"pointer"},expanded:{marginBottom:"8px"}})));function c(){return c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c.apply(this,arguments)}const p=(0,r.forwardRef)(((e,t)=>{let{children:n,expanded:r,onExpand:l,className:p}=e,u=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["children","expanded","onExpand","className"]);const m=i();return a().createElement("div",c({onClick:l,ref:t,className:o()(m.container,p,{[m.expanded]:r})},u),a().createElement(s.Z,{expanded:r}),a().createElement("div",{className:m.label},n))}));p.displayName="MatchRuleBadge";const u=p},83037:(e,t,n)=>{n.d(t,{Z:()=>c});var r=n(24328),a=n.n(r),l=n(99493),o=n(74615),s=n(93301),i=n(66792);const c=e=>{let{entitiesMap:t,entity:n,match:r,metadata:c}=e;return(0,l.Pcm)(r)?a().createElement(s.Z,{transitiveMatchRules:(0,l.wB1)(c,r,t)}):a().createElement(i.Z,{matchRules:(0,l.LS0)(c,n.type,r.matchRules),Component:o.Z})}},41022:(e,t,n)=>{n.d(t,{Z:()=>s});var r=n(24328),a=n.n(r),l=n(87918),o=n.n(l);const s=e=>{let{isMlMatch:t=!1}=e;return a().createElement(a().Fragment,null,t?o().text("Match IQ"):o().text("Match rules"))}},4724:(e,t,n)=>{n.d(t,{Z:()=>s});var r=n(24328),a=n.n(r),l=n(41022);const o=(0,n(79692).Z)({title:{fontWeight:500,marginBottom:"9px"},body:{fontWeight:"normal",marginLeft:"16px"},container:{padding:"8px",fontSize:"12px",lineHeight:"14px"}}),s=e=>{let{isMlMatch:t=!1,matchRules:n}=e;const r=o();return a().createElement("div",{className:r.container},a().createElement("div",{className:r.title},a().createElement(l.Z,{isMlMatch:t})," "),a().createElement("div",{className:r.body},n.map((e=>a().createElement("div",{key:e.uri},`- ${e.label}`)))))}},12896:(e,t,n)=>{n.d(t,{Z:()=>c});var r=n(24328),a=n.n(r),l=n(71153),o=n.n(l),s=n(41022);const i=(0,n(79692).Z)((e=>({container:{fontSize:"13px",lineHeight:"15px"},title:{color:e.palette.text.secondary,marginBottom:"7px"},labelsContainer:{color:e.palette.text.primary,marginBottom:"8px"}}))),c=e=>{let{isMlMatch:t,matchRules:n,className:r}=e;const l=i();return a().createElement("div",{className:o()(l.container,r)},a().createElement("div",{className:l.title},a().createElement(s.Z,{isMlMatch:t})),a().createElement("div",{className:l.labelsContainer},n.map((e=>a().createElement("div",{key:e.uri},`- ${e.label}`)))))}},74615:(e,t,n)=>{n.d(t,{Z:()=>g});var r=n(24328),a=n.n(r),l=n(4724),o=n(12896),s=n(83348),i=n(2014);const c=(0,n(79692).Z)({container:{display:"flex",flexDirection:"column",alignItems:"flex-start"},rulesContainer:{marginLeft:"16px"},icon:{height:"17px",width:"15px",marginRight:"5px"}});function p(){return p=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},p.apply(this,arguments)}const u=e=>a().createElement("svg",p({width:192,height:192,viewBox:"0 0 192 192",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},e),a().createElement("defs",null,a().createElement("linearGradient",{x1:"94.582%",y1:"6.451%",x2:"23.195%",y2:"83.323%",id:"MLMatch_svg__b"},a().createElement("stop",{stopColor:"#CDE1FF",offset:"0%"}),a().createElement("stop",{stopColor:"#AFFBF4",offset:"100%"})),a().createElement("linearGradient",{x1:"94.582%",y1:"6.594%",x2:"23.195%",y2:"83.214%",id:"MLMatch_svg__d"},a().createElement("stop",{stopColor:"#FFF",offset:"0%"}),a().createElement("stop",{stopColor:"#FDFFFF",offset:"100%"})),a().createElement("linearGradient",{x1:"93.837%",y1:"55.274%",x2:"29.292%",y2:"-20.431%",id:"MLMatch_svg__g"},a().createElement("stop",{stopColor:"#FFFCC7",stopOpacity:0,offset:"0%"}),a().createElement("stop",{stopColor:"#FFF470",offset:"100%"})),a().createElement("linearGradient",{x1:"50%",y1:"0%",x2:"50%",y2:"98.152%",id:"MLMatch_svg__i"},a().createElement("stop",{stopColor:"#83D6FF",offset:"0%"}),a().createElement("stop",{stopColor:"#72B9EF",offset:"100%"})),a().createElement("path",{d:"M1.821 66.003L34.263 9.94C36.633 5.813 45.673.594 51.398.072l64.445-.064c5.06-.241 14.821 5.084 17.888 10.395l31.467 54.503c3.186 5.518 2.765 16.592-.13 22.117l-30.948 53.481c-3.776 5.127-14.165 11.126-19.57 11.328l-62.134.061c-5.51-.264-15.934-5.764-18.758-10.655L1.856 86.155C-.846 81.475-.37 70.648 1.82 66.003z",id:"MLMatch_svg__a"}),a().createElement("path",{d:"M11.109 67.042l28.713-49.618C41.92 13.77 49.931 9.158 55.006 8.7l57.143.005c4.486-.209 13.147 4.516 15.871 9.223l27.954 48.298c2.83 4.89 2.467 14.696-.095 19.586l-27.391 47.334c-3.343 4.537-12.55 9.84-17.342 10.013l-55.094-.004c-4.886-.24-14.134-5.12-16.643-9.454L11.16 84.889c-2.4-4.147-1.989-13.735-.05-17.847z",id:"MLMatch_svg__c"}),a().createElement("path",{d:"M.995 0c26.4.684 47.59 22.234 47.59 48.72 0 26.23-23.795 34.53-23.795 56.987 0 3.703-3.011 6.705-6.725 6.705l-17.07-.001V68.985c6.466-1.238 11.353-6.923 11.353-13.75S7.46 42.722.995 41.485V0z",id:"MLMatch_svg__e"}),a().createElement("path",{d:"M47.353 0l-.087 41.235-.225.003c-7.588.167-13.688 6.37-13.688 13.997 0 7.683 6.19 13.92 13.854 14l-.091 43.265H27.887c-1.894-.56-3.197-1.234-3.91-2.025-.712-.79-1.357-2.275-1.933-4.455l-2.335-10.733c-.354-1.265-.674-2.183-.96-2.753-.286-.57-.784-1.281-1.494-2.134L2.002 70.367c-.846-.949-1.383-1.73-1.61-2.343-.228-.613-.356-1.626-.386-3.038V31.34c-.028-.785.044-1.37.216-1.757.173-.387.566-.848 1.18-1.382L28.368.885c.37-.367.665-.601.885-.704.22-.103.557-.163 1.01-.181h17.09z",id:"MLMatch_svg__h"})),a().createElement("g",{stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a().createElement("g",{transform:"translate(12 6)"},a().createElement("use",{fill:"url(#MLMatch_svg__b)",xlinkHref:"#MLMatch_svg__a"}),a().createElement("use",{fill:"url(#MLMatch_svg__d)",opacity:.5,xlinkHref:"#MLMatch_svg__c"})),a().createElement("g",{transform:"translate(69.652 30.765)"},a().createElement("rect",{fill:"#363636",x:15.457,y:132.745,width:21.151,height:23.158,rx:10.576}),a().createElement("path",{d:"M48.146 118.763v18.93c0 7.198-5.944 13.035-13.277 13.035h-16.71c-7.333 0-13.278-5.837-13.278-13.036v-18.929a13 13 0 01.023-.763h43.22a13 13 0 01.022.763z",fill:"#717171"}),a().createElement("path",{d:"M41.348 137.2c0 7.199-4.947 13.035-11.048 13.035H16.395c-6.101 0-11.047-5.836-11.047-13.035v-18.965h36V137.2z",fill:"#828282"}),a().createElement("path",{d:"M47.51 138.235a4 4 0 110 8H4.556a4 4 0 110-8h42.956zm0-11a4 4 0 110 8H4.556a4 4 0 110-8h42.956zm0-11a4 4 0 110 8H4.556a4 4 0 110-8h42.956z",fill:"#B1B1B1"}),a().createElement("path",{d:"M24.999 138.234v8h-16v-8h16zm0-11v8h-16v-8h16zm0-11v8h-16v-8h16z",fill:"#C5C5C5"}),a().createElement("g",{transform:"translate(27)"},a().createElement("mask",{id:"MLMatch_svg__f",fill:"#fff"},a().createElement("use",{xlinkHref:"#MLMatch_svg__e"})),a().createElement("use",{fill:"#FFD44B",xlinkHref:"#MLMatch_svg__e"}),a().createElement("path",{d:"M-49 48.729C-49 21.583-27.155 0-.207 0 26.74 0 48.585 21.817 48.585 48.729c0 26.227-23.75 34.525-23.75 56.98a6.708 6.708 0 01-6.713 6.703h-38.208a6.708 6.708 0 01-6.712-6.704C-26.798 85.217-49 75.875-49 48.73z",fill:"#FFD347",mask:"url(#MLMatch_svg__f)"}),a().createElement("path",{d:"M-49 48.729C-49 21.583-27.155 0-.207 0 26.74 0 48.585 21.817 48.585 48.729c0 26.227-23.75 34.525-23.75 56.98a6.708 6.708 0 01-6.713 6.703h-38.208a6.708 6.708 0 01-6.712-6.704C-26.798 85.217-49 75.875-49 48.73z",fill:"#FFDE72",mask:"url(#MLMatch_svg__f)"}),a().createElement("path",{d:"M11.965 48.645c.17-7.171 7.488-10.693 13.863-6.802 7.245 4.422 4.05 16.311-4.742 16.548l-.268.004h-3.227l-4.608 56.092-5.995-.253 4.413-51.248.185-4.592-10.592.001v-6h10.83l.139-3.585.002-.165zm10.737-1.681c-2.54-1.55-4.64-.58-4.737 1.766l-.005.284-.131 3.38 2.99.001c2.852 0 3.999-3.945 2.011-5.347l-.128-.084z",fill:"#F3BE13",mask:"url(#MLMatch_svg__f)"}),a().createElement("ellipse",{fill:"url(#MLMatch_svg__g)",mask:"url(#MLMatch_svg__f)",cx:-1.89,cy:48.245,rx:36.534,ry:36.667}))),a().createElement("g",{transform:"translate(45.647 30.765)"},a().createElement("mask",{id:"MLMatch_svg__j",fill:"#fff"},a().createElement("use",{xlinkHref:"#MLMatch_svg__h"})),a().createElement("use",{fill:"url(#MLMatch_svg__i)",xlinkHref:"#MLMatch_svg__h"}),a().createElement("path",{fill:"#D6FCFA",fillRule:"nonzero",opacity:.5,mask:"url(#MLMatch_svg__j)",d:"M38.24 11.235v6l-3.55-.001-22.207 22.207h-18.13v-6H9.997l22.207-22.206zM25.682 40.779l13.8 13.799H50v6H36.997L21.439 45.021zM53.311 28.235v6h-13.65l-3.935 4.246-4.4-4.08 5.718-6.166zM14.248 52.235l20.52 20.52h3.695v6h-6.18l-20.52-20.52H-.647v-6zM21.353 84.235h8.95L40.4 94.332h16.753v6H37.915L27.817 90.235z"})),a().createElement("circle",{fill:"#008FD8",cx:94,cy:86,r:9})));var m=n(87918),d=n.n(m);const f=(0,s.Z)(i.Z),g=e=>{let{isMlMatch:t=!1,matchRules:n}=e;const s=c(),[i,p]=(0,r.useState)(!1),m=(0,r.useCallback)((()=>p((e=>!e))),[]);return a().createElement("div",{className:s.container},a().createElement(f,{tooltipTitle:a().createElement(l.Z,{matchRules:n,isMlMatch:t}),tooltipPlacement:"bottom-start",onExpand:m,expanded:i},t?a().createElement(a().Fragment,null,a().createElement(u,{className:s.icon}),d().text("Match IQ")):d().text("Rules")),i?a().createElement(o.Z,{className:s.rulesContainer,matchRules:n,isMlMatch:t}):null)}},66792:(e,t,n)=>{n.d(t,{Z:()=>u});var r=n(24328),a=n.n(r),l=n(13980),o=n.n(l),s=n(17440),i=n(99493);function c(){return c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c.apply(this,arguments)}const p=e=>{let{matchRules:t,Component:n}=e,r=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["matchRules","Component"]);const[l,o]=(0,i.UkJ)(t);return a().createElement(a().Fragment,null,(0,s.isEmpty)(o)?null:a().createElement(n,c({matchRules:o},r)),(0,s.isEmpty)(l)?null:a().createElement(n,c({isMlMatch:!0,matchRules:l},r)))};p.propTypes={matchRules:i.p3$,Component:o().func};const u=p},93301:(e,t,n)=>{n.d(t,{Z:()=>E});var r=n(24328),a=n.n(r),l=n(87918),o=n.n(l),s=n(2014),i=n(19592),c=n(12896),p=n(66792),u=n(79692);const m=(0,u.Z)((e=>({label:{fontSize:"13px",lineHeight:"15px",color:e.palette.primary.light},container:{display:"flex",flexDirection:"column"},badge:{display:"flex",marginBottom:"8px",cursor:"pointer"},matchLabels:{marginLeft:"30px"}}))),d=e=>{let{label:t,matchRules:n}=e;const l=m(),[o,s]=(0,r.useState)(!1),u=(0,r.useCallback)((()=>s((e=>!e))),[]);return a().createElement("div",{className:l.container},a().createElement("div",{onClick:u,className:l.badge},a().createElement(i.Z,{expanded:o}),a().createElement("div",{className:l.label},t)),o?a().createElement(p.Z,{Component:c.Z,matchRules:n,className:l.matchLabels}):null)},f=(0,u.Z)({container:{display:"flex",flexDirection:"column"},rulesWrapper:{display:"flex",flexDirection:"column"}});var g=n(83348),h=n(4724);const b=(0,u.Z)({ruleWrapper:{paddingTop:"8px"},label:{fontWeight:500,fontSize:"12px"}}),v=e=>{let{transitiveMatchRules:t}=e;const n=b();return a().createElement(a().Fragment,null,t.map(((e,t)=>{let{label:r,matchRules:l}=e;return a().createElement("div",{key:t,className:n.ruleWrapper},a().createElement("div",{className:n.label},r),a().createElement(h.Z,{matchRules:l}))})))};function y(){return y=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},y.apply(this,arguments)}const x=(0,g.Z)(s.Z),E=e=>{let{transitiveMatchRules:t}=e;const n=f(),[l,s]=(0,r.useState)(!1),i=(0,r.useCallback)((()=>s((e=>!e))),[]);return a().createElement("div",{className:n.container},a().createElement(x,{tooltipTitle:a().createElement(v,{transitiveMatchRules:t}),tooltipPlacement:"bottom-start",onExpand:i,expanded:l},o().text("Transitive matches")),l?t.map(((e,t)=>a().createElement(d,y({key:t},e)))):null)}},93428:(e,t,n)=>{n.d(t,{H:()=>d});var r=n(24328),a=n.n(r),l=n(87918),o=n.n(l);function s(){return s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s.apply(this,arguments)}const i=e=>a().createElement("svg",s({width:24,height:24,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},e),a().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.955 10.955v-3.5l4.5 4.5-4.5 4.5v-3.5h-6.41l-6-6 1.41-1.41 5.41 5.41h5.59zm-11 7.41l-1.41-1.41 3.41-3.41 1.41 1.41-3.41 3.41z",fill:"#000",fillOpacity:.54}));var c=n(31276),p=n(98808),u=n(84504);function m(){return m=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},m.apply(this,arguments)}const d=(0,r.forwardRef)(((e,t)=>{let{className:n,mode:r=p.N.iconButton,onMenuClose:l=c.ZT,disabled:s=!1,entity:d,entities:f,onStartRequest:g,onFinishRequest:h,onSuccess:b,onError:v}=e,y=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["className","mode","onMenuClose","disabled","entity","entities","onStartRequest","onFinishRequest","onSuccess","onError"]);const{sendMergeAllRequest:x}=(0,u._)({entity:d,entities:f,onStartRequest:g,onFinishRequest:h,onError:v,onSuccess:b});return a().createElement(p.K,m({className:n,disabled:s,mode:r,label:s?"":o().text("Merge"),icon:i,onClick:x,onMenuClose:l,ref:t},y))}));d.displayName="mergeButton"},30885:(e,t,n)=>{n.d(t,{i:()=>d});var r=n(98808),a=n(24328),l=n.n(a);function o(){return o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o.apply(this,arguments)}const s=e=>l().createElement("svg",o({width:24,height:24,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},e),l().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M17 1.5v3.638h-1.247l-11.03 11H2v2h3.55l11.029-11H17V10.5L21.5 6 17 1.5zM8.844 8.785L5.55 5.5H2v2h2.723l2.707 2.7 1.414-1.415zm4.835 4.822l-1.414 1.414 3.488 3.479H17v3.638l4.5-4.5-4.5-4.5V16.5h-.421l-2.9-2.893z",fill:"#000",fillOpacity:.54}));var i=n(31276),c=n(87918),p=n.n(c),u=n(59119);function m(){return m=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},m.apply(this,arguments)}const d=(0,a.forwardRef)(((e,t)=>{let{className:n,mode:a=r.N.iconButton,onMenuClose:o=i.ZT,disabled:c=!1,entity:d,entities:f,onStartRequest:g,onFinishRequest:h,onSuccess:b}=e,v=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["className","mode","onMenuClose","disabled","entity","entities","onStartRequest","onFinishRequest","onSuccess"]);const{sendMarkAsNotMatchRequest:y}=(0,u.m)({entity:d,entities:f,onStartRequest:g,onFinishRequest:h,onSuccess:b});return l().createElement(r.K,m({className:n,disabled:c,mode:a,label:c?"":p().text("Not a match"),icon:s,onClick:y,onMenuClose:o,ref:t},v))}));d.displayName="notMatchButton"},93517:(e,t,n)=>{n.d(t,{Z:()=>h});var r=n(24328),a=n.n(r),l=n(87918),o=n.n(l),s=n(71153),i=n.n(s),c=n(99493);const p=(0,n(79692).Z)((e=>({container:{display:"flex",padding:"16px",overflow:"hidden"},image:{width:"40px",height:"40px"},info:{marginLeft:"12px",overflow:"hidden",display:"flex",flexDirection:"column"},label:{textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",fontWeight:400,fontSize:"13px",lineHeight:"15px",color:e.palette.primary.main},secondaryLabel:{marginTop:"4px",fontWeight:400,fontSize:"10px",lineHeight:"12px",color:e.palette.text.secondary,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},link:{textDecoration:"none"},thirdRow:{display:"flex",alignItems:"center",marginTop:"auto",paddingTop:"4px"},entityId:{display:"flex",alignItems:"baseline",fontWeight:400,fontSize:"12px",lineHeight:"16px"},entityIdLabel:{color:e.palette.text.secondary},entityIdValue:{marginLeft:"8px",color:e.palette.text.primary}})));var u=n(53180),m=n(31039),d=n(88611),f=n(68439);function g(){return g=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},g.apply(this,arguments)}const h=(0,r.memo)((e=>{let{entity:t,classes:n={}}=e,r=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["entity","classes"]);const l=p(),{secondaryLabel:s,label:h,container:b}=n,v=(0,c.idV)(t.label),{secondaryLabel:y}=t;return a().createElement("div",g({className:i()(l.container,b)},r),a().createElement(u.Z,{entity:t,imageClassName:l.image}),a().createElement("div",{className:l.info},a().createElement(m.Z,{value:(0,c.wwR)(t),className:l.link},a().createElement(d.C,{value:v,placement:"top",showOnExceededHeight:!0},a().createElement("div",{className:i()(l.label,h)},v))),y&&a().createElement(d.C,{value:y,placement:"top",showOnExceededHeight:!0},a().createElement("div",{className:i()(l.secondaryLabel,s)},y)),a().createElement("div",{className:l.thirdRow},a().createElement(f.Z,{entity:t,size:"medium"}),a().createElement("div",{className:l.entityId},a().createElement("div",{className:l.entityIdLabel},o().text("ID:")),a().createElement("div",{className:l.entityIdValue},(0,c.BTI)(t))))))}))},39827:(e,t,n)=>{n.d(t,{G:()=>d});var r=n(24328),a=n.n(r),l=n(71153),o=n.n(l),s=n(8818),i=n(79692),c=n(41128);const p=(0,i.Z)((e=>({container:{display:"flex",flexDirection:"column",flexShrink:0,width:"64px",paddingTop:"8px",backgroundColor:e.palette.background.paper,boxShadow:"0 1px 1px 0 rgba(0,0,0,0.14), 0 2px 1px -1px rgba(0,0,0,0.12), 0 1px 3px 0 rgba(0,0,0,0.2)"},active:{backgroundColor:(0,c.U1)(e.palette.primary.main,.12),color:e.palette.primary.main,"&:after":{content:'""',position:"absolute",height:"42px",width:"3px",backgroundColor:e.palette.primary.main,left:"-8px",borderRadius:"0 6px 6px 0"}},buttonWrapper:{position:"relative",width:"48px",height:"44px",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"6px",margin:"2px 8px",color:e.palette.text.secondary}})));function u(){return u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u.apply(this,arguments)}function m(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}const d=e=>{let{buttonsProps:t,activeIndexId:n,className:r,onButtonClick:l,classes:i={}}=e;const c=p(),{active:d,buttonWrapper:f}=i,g=m(i,["active","buttonWrapper"]);return a().createElement("div",{className:o()(c.container,r)},t.map((e=>{let{id:t}=e,r=m(e,["id"]);return a().createElement(s.k,u({},r,{classes:g,size:"S",key:t,className:o()({[o()(c.active,d)]:n===t},c.buttonWrapper,f),onClick:()=>l(t),"data-reltio-id":`reltio-profile-right-side-button-${t}`}))})))}},52043:(e,t,n)=>{n.d(t,{h:()=>o});var r=n(24328),a=n.n(r);const l=(0,n(79692).Z)((e=>({contentWrapper:{display:"flex",flexDirection:"column",backgroundColor:e.palette.background.paper,boxShadow:"0 1px 1px 0 rgba(0,0,0,0.14), 0 2px 1px -1px rgba(0,0,0,0.12), 0 1px 3px 0 rgba(0,0,0,0.2)",marginLeft:"3px",transition:e.transitions.create(["width"],{duration:e.transitions.duration.enteringScreen})}}))),o=e=>{let{width:t,open:n,children:r}=e;const o=l();return a().createElement("div",{className:o.contentWrapper,style:{width:`${n?t:0}px`}},n&&a().createElement(a().Fragment,null,r))}},17308:(e,t,n)=>{n.d(t,{P:()=>u});var r=n(24328),a=n.n(r),l=n(87685);const o=(0,n(79692).Z)({container:{display:"flex",flexShrink:0,height:"63px",alignItems:"center",borderBottom:"1px solid rgba(0,0,0,0.12)"},icon:{margin:"0 12px"},divider:{backgroundColor:"rgba(0,0,0,0.12)",margin:"19px 17px"},secondTitle:{fontSize:"14px"}});var s=n(94079),i=n(87918),c=n.n(i),p=n(8818);const u=e=>{let{onClose:t,mainTitle:n,secondTitle:r,content:i,rightContent:u}=e;const m=o();return a().createElement("div",{className:m.container},a().createElement(p.k,{size:"L",icon:l.default,onClick:t,className:m.icon,tooltipTitle:c().text("Close")}),i||a().createElement(a().Fragment,null,a().createElement(s.Typography,{variant:"h6"},n),r&&a().createElement(a().Fragment,null,a().createElement(s.Divider,{orientation:"vertical",flexItem:!0,className:m.divider}),a().createElement(s.Typography,{variant:"body1",color:"textSecondary",className:m.secondTitle},r)),u))}},27185:(e,t,n)=>{n.d(t,{Z:()=>S});var r=n(24328),a=n.n(r),l=n(13980),o=n.n(l),s=n(87918),i=n.n(s),c=n(17440),p=n(71153),u=n.n(p),m=n(94079);const d=(0,n(79692).Z)({container:{display:"flex",alignItems:"center",height:"32px",minHeight:"32px",padding:0},text:{display:"flex",width:"calc(100% - 68px)"},textItem:{fontSize:"13px",lineHeight:"15px",marginRight:10},primaryTextItem:{flex:"1 0",flexBasis:0,maxWidth:"50%",overflow:"hidden",textOverflow:"ellipsis"},secondaryTextItem:{flex:"1 0",flexBasis:0,overflow:"hidden",textOverflow:"ellipsis"},icons:{transform:"scale(0.5)",position:"relative",flexShrink:0,width:"68px",bottom:"10px"},iconTop:{position:"absolute",top:0,left:0,zIndex:1},iconBottom:{position:"absolute",top:0,left:26,zIndex:0}});var f=n(31254),g=n(88611);function h(){return h=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},h.apply(this,arguments)}const b=e=>{let{innerRef:t,innerProps:n,selectOption:r,data:l}=e;const o=d(),{value:s,label:i,startObject:c,endObject:p}=l,b=c.objectType.label+" ↔ "+p.objectType.label;return a().createElement(m.MenuItem,h({className:o.container,ref:t,key:s,onClick:()=>r({label:i,value:s,startObject:c,endObject:p})},n),a().createElement("div",{className:o.icons},a().createElement(f.Z,{className:o.iconTop,entityType:c.objectType}),a().createElement(f.Z,{className:o.iconBottom,entityType:p.objectType})),a().createElement("div",{className:o.text},a().createElement(g.C,{value:i},a().createElement(m.Typography,{className:u()(o.textItem,o.primaryTextItem)},i)),a().createElement(g.C,{value:b},a().createElement(m.Typography,{color:"textSecondary",className:u()(o.textItem,o.secondaryTextItem)},b))))};b.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({value:o().string.isRequired,label:o().string.isRequired,startObject:o().object,endObject:o().object})};const v=b;var y=n(24737);function x(){return x=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},x.apply(this,arguments)}function E(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const O=e=>{let{value:t={},options:n=[],onChange:l=c.identity,TextFieldProps:o}=e,s=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["value","options","onChange","TextFieldProps"]);const p=(0,r.useMemo)((()=>function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){E(e,t,n[t])}))}return e}({},(0,c.defaultTo)({},o),{"data-reltio-id":"relation-type-selector"})),[o]);return a().createElement(y.Z,x({value:t,options:n,onChange:l,label:i().text("Select relationship type "),components:{Option:v},TextFieldProps:p},s))},C=o().shape({label:o().string.isRequired,value:o().string.isRequired,startObject:o().object,endObject:o().object});O.propTypes={value:C,options:o().arrayOf(C),onChange:o().func};const S=O},89140:(e,t,n)=>{n.d(t,{V:()=>k});var r=n(24328),a=n.n(r),l=n(17440),o=n(94079),s=n(94842),i=n(13980),c=n.n(i),p=n(87918),u=n.n(p),m=n(98685),d=n(71153),f=n.n(d),g=n(79692);const h=(0,g.Z)((e=>({comment:{display:"flex",flexDirection:"row",flex:1,marginLeft:"6px"},avatar:{height:"24px",width:"24px",margin:"3px 13px 0 0"},icon:{fill:"#537280",backgroundColor:"#EAEDEE"},firstLine:{display:"flex",flexDirection:"row"},info:{flex:1},author:{flex:1,fontWeight:"500",color:"rgba(0,0,0,0.87)",fontSize:"13px",lineHeight:"15px"},date:{color:"rgba(0, 0, 0, 0.54)",fontSize:"11px",marginRight:"17px",lineHeight:"15px"},text:{color:"rgba(0, 0, 0, 0.6)",fontSize:"13px",wordWrap:"break-word",wordBreak:"break-all",paddingRight:"10px"}}))),b=(0,g.Z)((e=>({circleButton:{maxWidth:"14px",maxHeight:"14px",border:"1px solid rgba(0, 0, 0, 0.3)",fontSize:"13px",color:"rgba(0, 0, 0, 0.6)",position:"absolute",top:"-11px",left:"5px",backgroundColor:"#ffffff","&:hover":{backgroundColor:"#f7f7f7"},"&.focused":{backgroundColor:"#f7f7f7"}},delimiter:{position:"relative",height:"4px",borderTop:"1px solid rgba(0, 0, 0, 0.3)",borderBottom:"1px solid rgba(0, 0, 0, 0.3)",margin:"15px 0 24px 0"}}))),v=(0,g.Z)((e=>({container:{padding:"5px 0",display:"flex",flexDirection:"column"},commentsContainer:{maxHeight:"300px",overflowY:"auto"},title:{margin:"0 0 8px 5px",fontSize:"14px",color:"rgba(0, 0, 0, 0.87)"},filledInputRoot:{backgroundColor:"rgba(0, 0, 0, 0.03)",padding:"0 6px",height:"40px",margin:"10px 17px 0 6px",fontSize:"14px","&:hover":{backgroundColor:"rgba(0, 0, 0, 0.03)"},"&.focused":{backgroundColor:"rgba(0, 0, 0, 0.03)"}}}))),y=(0,g.Z)((e=>({messageContainer:{borderBottom:"1px solid rgba(0,0,0,0.3)",paddingBottom:"7px",marginBottom:"7px"}}))),x=e=>{let{author:t,classes:n,message:r,time:l}=e;const s=h();return a().createElement("div",{className:s.comment},a().createElement(o.Avatar,{className:s.avatar},a().createElement(m.Z,{className:s.icon})),a().createElement("div",{className:f()(s.info,n.messageContainer)},a().createElement("div",{className:s.firstLine},a().createElement("div",{className:s.author},t),a().createElement("span",{className:s.date},u().date(l,"L LT"))),a().createElement("div",{className:s.text},r)))};x.defaultProps={classes:{}},x.propTypes={classes:c().object,author:c().string,id:c().string,message:c().string,time:c().number};const E=e=>{let{comments:t,onClick:n}=e;const r=b();return a().createElement(a().Fragment,null,a().createElement(x,t[0]),a().createElement("div",{className:r.delimiter},a().createElement(o.IconButton,{className:r.circleButton,onClick:n},t.length-2)),a().createElement(x,t[t.length-1]))};E.propTypes={comments:c().arrayOf(c().shape({author:c().string,id:c().string,message:c().string,time:c().number})),onClick:c().func};const O=e=>{let{comments:t}=e;const n=y();return t.map((e=>{let{author:t,id:r,message:l,time:o}=e;return a().createElement(x,{classes:{messageContainer:n.messageContainer},key:r,author:t,message:l,time:o})}))};O.propTypes={comments:c().arrayOf(c().shape({author:c().string,id:c().string,message:c().string,time:c().number}))};var C=n(43477),S=n(22385);const w=e=>e.target.value,k=e=>{let{processInstanceComments:t,taskId:n,isTaskOpen:i}=e;const c=v(),[p,m]=(0,r.useState)(!1),[d,f]=(0,r.useState)(""),{comments:g,writeComment:h,readOnly:b}=(0,C.W)({processInstanceComments:t,taskId:n,isOpen:i}),y=(0,r.useCallback)((()=>{h(d),f("")}),[d,h]),x=(0,l.pipe)(w,f);return a().createElement("div",{className:c.container},a().createElement("div",{className:c.title}," ",u().text("Comments")," "),a().createElement("div",{className:c.commentsContainer},p||g.length<3?a().createElement(O,{comments:g}):a().createElement(E,{onClick:()=>m(!0),comments:g})),!b&&a().createElement(o.Input,{endAdornment:a().createElement(o.InputAdornment,{position:"end"},a().createElement(S.Z,{icon:s.Z,disabled:0===d.length,onClick:y})),classes:{root:c.filledInputRoot},placeholder:u().text("Write a comment"),value:d,onKeyPress:(0,l.when)((0,l.propEq)("key","Enter"),y),onChange:x,disableUnderline:!0}))};k.propTypes={processInstanceComments:c().arrayOf(c().shape({author:c().string,id:c().string,message:c().string,time:c().number})),taskId:c().string}},75813:(e,t,n)=>{n.d(t,{R:()=>s});var r=n(87918),a=n.n(r),l=n(99493),o=n(585);const s=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{errorMessage:t,errorCode:n}=e;n!==l.Xt7.WORKFLOW_IS_NOT_REGISTERED_ERROR&&(console.error(e),o.Z.addError({title:a().text("Error"),message:t||a().text("Something went wrong...")}))}},21380:(e,t,n)=>{n.d(t,{rc:()=>a,Xs:()=>l,tg:()=>o});var r=n(17440);const a=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.find((0,r.startsWith)("changeRequests/"))},l=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return(0,r.pipe)(a,(0,r.unless)(r.isNil,(0,r.pipe)((0,r.split)("/"),(0,r.nth)(1))))(e)},o=e=>void 0===e||!0===e},5434:(e,t,n)=>{n.d(t,{r:()=>f});var r=n(24328),a=n(17440),l=n(52730),o=n(99493),s=n(87638),i=n(67218),c=n(94150),p=n(75813),u=n(22994),m=n(21380);const d=e=>({label:e,value:e}),f=e=>{let{assignee:t,taskId:n,isOpen:f}=e;const{updateTaskState:g}=(0,r.useContext)(c.O)||{},h=(0,l.useSelector)(s.ZP.selectors.getWorkflowPath),b=(0,l.useSelector)(s.ZP.selectors.getWorkflowEnvironmentUrl),v=(0,l.useSelector)(s.ZP.selectors.getTenant),y=(0,i._)(),x=(0,i._)(),[E,O]=(0,r.useState)(null),[C,S]=(0,r.useState)(),[w,k]=(0,r.useState)(!1),M=(0,u.Z)()("UPDATE_TASK")&&(0,m.tg)(f);(0,r.useEffect)((()=>{O(d(t))}),[t]);const P=(0,r.useCallback)((e=>{if(h&&M&&n){const t=(0,a.filter)((t=>t.value.toLowerCase().includes(e)));return C?Promise.resolve(t(C)):x((0,o.j2$)({taskId:n,workflowPath:h,environment:b,tenant:v})).then((e=>{const{data:n}=e,r=n.sort(((e,t)=>o.P6Y.strings.sort("asc",e,t))).map(d);return S(r),t(r)})).catch(p.R)}}),[h,n,b,v,C,S,M]),_=(0,r.useCallback)((e=>{if(h&&M&&n){const{value:t}=e;k(!0),y((0,o._C4)({taskId:n,workflowPath:h,environment:b,tenant:v,assignee:t})).then((()=>{O(d(t)),null==g||g(n,{assignee:t})})).catch(p.R).finally((()=>{k(!1)}))}}),[h,n,b,v,M]);return{assignee:E,getAssignees:P,updateAssignee:_,updateRequestIsInProgress:w,readOnly:!M}}},22994:(e,t,n)=>{n.d(t,{Z:()=>l});var r=n(52730),a=n(87638);const l=()=>{const e=(0,r.useSelector)(a.ZP.selectors.getWorkflowPath),t=(0,r.useSelector)(a.ZP.selectors.getCanUserStartProcessFromQuery),n=(0,r.useSelector)(a.ZP.selectors.getCanUserViewWorkflowJobs),l=(0,r.useSelector)(a.ZP.selectors.getCanUserViewWorkflowEnvironmentConfigJar),o=(0,r.useSelector)(a.ZP.selectors.getCanUserViewWorkflowDefinition),s=(0,r.useSelector)(a.ZP.selectors.getCanUserViewWorkflowConfigJar),i=(0,r.useSelector)(a.ZP.selectors.getCanUserViewProcessInstanceSearchQuery),c=(0,r.useSelector)(a.ZP.selectors.getCanUserUpdateWorkflowDataTask),p=(0,r.useSelector)(a.ZP.selectors.getCanUserUpdateProcessInstance),u=(0,r.useSelector)(a.ZP.selectors.getCanUserReadWorkflowDataTask),m=(0,r.useSelector)(a.ZP.selectors.getCanUserManageWorkflowEnvironmentDefinition),d=(0,r.useSelector)(a.ZP.selectors.getCanUserManageWorkflowDefinition),f=(0,r.useSelector)(a.ZP.selectors.getCanUserExecuteWorkflowJobsValidateTasks),g=(0,r.useSelector)(a.ZP.selectors.getCanUserExecuteWorkflowJobsUpdateTasks),h=(0,r.useSelector)(a.ZP.selectors.getCanUserExecuteWorkflowJobsTerminateProcessInstance),b=(0,r.useSelector)(a.ZP.selectors.getCanUserExecuteWorkflowJobsSyncBusinessProcessData),v=(0,r.useSelector)(a.ZP.selectors.getCanUserExecuteWorkflowJobs),y=(0,r.useSelector)(a.ZP.selectors.getCanUserCreateWorkflowEnvironmentConfigJar),x=(0,r.useSelector)(a.ZP.selectors.getCanUserRegisterConfigEnvironments),E=(0,r.useSelector)(a.ZP.selectors.getCanUserCreateWorkflowConfigJar);return r=>{if(!e)return!1;switch(r){case"VIEW_PROCESS_DEFINITIONS":return o;case"DEPLOY_GENERIC_PROCESS_DEFINITION":return m;case"VIEW_JOBS":return n;case"START_JOB":return v||b&&h&&g&&f;case"VIEW_CUSTOM_JARS":return s||l;case"UPDATE_PROCESS_INSTANCE":return p;case"VIEW_TASKS":return u;case"REGISTER_TENANT":return x;case"START_PROCESS_INSTANCE":case"START_PROCESS_INSTANCE_SEARCH_QUERY":return t;case"VIEW_PROCESS_INSTANCE_COMMENTS":case"VIEW_PROCESS_INSTANCES":case"VIEW_PROCESS_INSTANCE_COUNT":return i;case"UPDATE_TASK":return c;case"DEPLOY_TENANT_PROCESS_DEFINITION":return d;case"DEPLOY_CUSTOM_JAR":return E&&y}return!1}}},43477:(e,t,n)=>{n.d(t,{W:()=>m});var r=n(24328),a=n(99493),l=n(87638),o=n(52730),s=n(67218),i=n(94150),c=n(75813),p=n(22994),u=n(21380);const m=e=>{let{processInstanceComments:t,taskId:n,isOpen:m}=e;const{updateTaskState:d}=(0,r.useContext)(i.O)||{},f=(0,o.useSelector)(l.ZP.selectors.getWorkflowPath),g=(0,o.useSelector)(l.ZP.selectors.getWorkflowEnvironmentUrl),h=(0,o.useSelector)(l.ZP.selectors.getTenant),b=(0,s._)(),[v,y]=(0,r.useState)([]),[x,E]=(0,r.useState)(!1),O=(0,p.Z)()("UPDATE_TASK")&&(0,u.tg)(m);(0,r.useEffect)((()=>{y(t||[])}),[t]);const C=(0,r.useCallback)((e=>{O&&(E(!0),b((0,a.tZe)({workflowPath:f,environment:g,tenant:h,taskId:n,comment:e}).then((()=>(0,a.yW4)({workflowPath:f,environment:g,tenant:h,taskId:n})))).then((e=>{let{processInstanceComments:t}=e;y(t||[]),null==d||d(n,{processInstanceComments:t})})).catch(c.R).finally((()=>E(!1))))}),[g,n,h,f,b,d,O]);return{comments:v,requestIsInProgress:x,writeComment:C,readOnly:!O}}},94150:(e,t,n)=>{n.d(t,{O:()=>a});var r=n(24328);const a=n.n(r)().createContext(null);a.displayName="WorkflowTasksContext"},59119:(e,t,n)=>{n.d(t,{m:()=>s});var r=n(99493),a=n(52730),l=n(87638),o=n(24328);const s=e=>{let{entities:t,entity:n,onFinishRequest:s,onStartRequest:i,onSuccess:c}=e;const p=(0,a.useSelector)(l.ZP.selectors.getTenant),u=(0,a.useSelector)(l.ZP.selectors.getDtssPath),[m,d]=(0,o.useState)(!1);return{isPending:m,sendMarkAsNotMatchRequest:(0,o.useCallback)((()=>{null==i||i(),d(!0);const e={dtssPath:u,customerTenant:p,entity:n,entities:t};((0,r.biM)(n)?(0,r.bMg)(e):(0,r.fZN)(e)).then((()=>{null==c||c()})).finally((()=>{null==s||s(),d(!1)}))}),[u,t,n,s,i,c,p])}}},28741:(e,t,n)=>{n.d(t,{s:()=>p});var r=n(24328),a=n(52730),l=n(87638),o=n(99493),s=n(20449),i=n(67218),c=n(17440);const p=e=>{let{enabled:t,entity:n,filter:p,onFinishLoading:u,onStartLoading:m,options:d,page:f,rowsPerPage:g,sorting:h}=e;const{order:b,field:v}=h||{},[y,x]=(0,r.useState)(0),[E,O]=(0,r.useState)([]),[C,S]=(0,r.useState)({}),w=(0,a.useSelector)(l.ZP.selectors.getTenant),k=(0,a.useSelector)(l.ZP.selectors.getDtssPath),M=(0,a.useSelector)(l.ZP.selectors.getDataTenants),{activityFilter:P,globalFilter:_}=(0,a.useSelector)(l.ZP.selectors.getGlobalSearchRequestOptions)||{},T="boolean"==typeof d.showInactiveEntities?d.showInactiveEntities?o.YJ7.ALL:o.YJ7.ACTIVE_ONLY:P,N=(0,r.useMemo)((()=>({dtssPath:k,dataTenants:M,entity:n,customerTenant:w,dtssRequest:o.Rgl})),[k,M,n,w]),R=(0,r.useCallback)((0,o.U_T)(N,o.SP6),[N]),I=(0,s.a)(R),j=(0,s.a)(o.bFH),Z=(0,c.prop)("uri",n),L=(0,i._)(),F=(0,r.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!t||(0,o.ZiX)(Z))return x(0),O([]),void S({});null==m||m(),L((0,o.biM)(n)?j({dtssPath:k,entity:n,customerTenant:w,offset:f*g,max:g,force:e}):I({entityUri:Z,offset:f*g,max:g,filter:(0,o.vyX)(_,p)||"",sort:v,order:b,force:e,deep:d.showTransitiveMatches?void 0:1,activeness:T})).then((e=>{const{response:t,total:n,originalResponse:r}=e;x(n),(0,o.B1H)(r).length>0&&S((0,o.KPC)(r)),O(t)})).finally((()=>{null==u||u()}))}),[_,T,k,t,Z,v,p,j,I,u,m,d,b,f,g,L,w]);return(0,r.useEffect)((()=>{F()}),[F]),{total:y,matches:E,entitiesMap:C,loadMatches:(0,r.useCallback)((()=>{F(!0)}),[F])}}},84504:(e,t,n)=>{n.d(t,{_:()=>i});var r=n(24328),a=n(52730),l=n(87638),o=n(99493),s=n(31276);const i=e=>{let{entities:t,entity:n,onFinishRequest:i,onStartRequest:c,onSuccess:p,onError:u=s.ZT}=e;const m=(0,a.useSelector)(l.ZP.selectors.getTenant),d=(0,a.useSelector)(l.ZP.selectors.getDtssPath),[f,g]=(0,r.useState)(!1);return{isPending:f,sendMergeAllRequest:(0,r.useCallback)((()=>{null==c||c(),g(!0);const e={dtssPath:d,customerTenant:m,entity:n,entities:t};((0,o.biM)(n)?(0,o.uJQ)(e):(0,o.OxG)(e)).then((()=>{null==p||p()})).catch(u).finally((()=>{null==i||i(),g(!1)}))}),[d,t,n,u,i,c,p,m])}}},20449:(e,t,n)=>{n.d(t,{a:()=>l});var r=n(24328),a=n(17440);const l=e=>(0,r.useCallback)((e=>{let t={},n=[];return async r=>{let{max:l,offset:o,force:s}=r,i=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(r,["max","offset","force"]),c=s;const p=Object.keys(t);if(c=c||!(0,a.equals)(Object.keys(i),p),!c)for(const e of p)c=c||!(0,a.equals)(t[e],i[e]);return c&&(n=await e(i),t=i),{response:n.slice(o,o+l),total:n.length,originalResponse:n}}})(e),[e])},89846:(e,t,n)=>{n.d(t,{n:()=>o});var r=n(24328),a=n(99493),l=n(17440);const o=e=>{let{reversedContextLabels:t}=e;return{getRelationTypesOptions:(0,r.useCallback)(((e,n)=>{const r={},o=(0,l.pipe)(a.PjQ,(0,l.tap)((e=>r[e]=(0,l.propOr)(0,e,r)+1))),s=(0,l.ascend)((0,l.prop)("label")),i=(0,l.curry)(((e,n)=>{let{uri:r,label:l,startObject:s,endObject:i}=n;const c=e===(t?a.Nsj.OUT:a.Nsj.IN)?s:i;return{label:{directionalLabel:o(c),typeLabel:l},value:`${r},${e}`,startObject:s,endObject:i}}));return e.map(i(a.Nsj.IN)).concat(n.map(i(a.Nsj.OUT))).map((0,l.evolve)({label:e=>{let{directionalLabel:t,typeLabel:n}=e;return t?r[t]>1?`${t} (${n})`:t:n}})).sort(s)}),[t]),fromEditorValue:(0,r.useCallback)(((e,t)=>n=>{const[r,o]=n.value.split(",");return{type:(o===a.Nsj.IN?e:t).find((0,l.propEq)("uri",r)),direction:o}}),[]),toEditorValue:(0,r.useCallback)(((e,t)=>t.find((0,l.propEq)("value",`${e.relationType},${e.direction}`))),[])}}}}]);
package/2725.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[2725],{27815:(e,t,n)=>{n.d(t,{Z:()=>w});var r=n(24328),o=n.n(r),a=n(87918),l=n.n(a),i=n(71153),s=n.n(i),c=n(17440),u=n(52730),p=n(87638),d=n(99493),m=n(94079),g=n(92575),f=n(37285),b=n(96808),h=n(7785),y=n(79692);function E(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){v(e,t,n[t])}))}return e}function v(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const x={input:e=>E({},e,{fontSize:"14px"}),menuPortal:e=>E({},e,{zIndex:1300})},O=(0,y.Z)({root:{flex:1},title:{paddingBottom:"10px",paddingLeft:"5px",fontSize:"14px"},dropDownInput:{width:"100%",justifyContent:"center",backgroundColor:"rgba(0, 0, 0, 0.03)",borderTop:"4px"},option:{fontSize:"14px",height:"32px"},noOptionsMessage:{fontSize:"14px"}});const w=e=>{let{entityType:t,selectedAttributes:n,className:a,onChange:i,title:y,disableUnderline:E,menuPlacement:v="bottom"}=e;const w=(0,u.useSelector)(p.ZP.selectors.getMetadata),S=O(),C=(0,r.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return e.reduce(((e,r)=>{if(r.hidden)return e;const o=`${n&&n+" / "}${r.label}`;e.push({label:r.label,value:r.uri,attrType:r,chipLabel:o,level:t});const a=(0,d.EUG)(w,r);return e.concat(a?C(a,t+1,o):[])}),[])}),[w]),P=(0,r.useMemo)((()=>C((null==t?void 0:t.attributes)||[])),[t,C]);return o().createElement("div",{className:s()(S.root,a)},o().createElement(m.Typography,{className:S.title,variant:"subtitle1"},y||l().text("Attribute")),o().createElement(g.Z,{value:n,options:P,TextFieldProps:{InputProps:{disableUnderline:E},classes:{root:S.dropDownInput}},components:{DropdownIndicator:b.Z,MultiValue:e=>{let{data:t}=e,n=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["data"]);return o().createElement(f.Z,n,t.chipLabel)},Option:e=>{let{isFocused:t,isSelected:n,data:r,label:a,innerProps:l}=e;return o().createElement("div",l,o().createElement(h.Z,{checked:n,level:r.level,data:r,label:a,labelInText:a,isFocused:t}))}},onChange:(0,c.pipe)((0,c.defaultTo)([]),i),styles:x,classes:S,menuPlacement:v,menuPortalTarget:document.body}))}},58241:(e,t,n)=>{n.d(t,{Z:()=>p});var r=n(24328),o=n.n(r),a=n(71153),l=n.n(a),i=n(8818),s=n(38016);const c=(0,n(79692).Z)({collapseButton:{cursor:"pointer"},expandLess:{transform:"rotate( -180deg )"}});function u(){return u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u.apply(this,arguments)}const p=e=>{let{isOpen:t=!1,tooltipTitle:n}=e,r=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["isOpen","tooltipTitle"]);const a=c(),p={icon:s.Z,className:a.collapseButton,iconClassName:l()({[a.expandLess]:t})},d={tooltipTitle:n};return o().createElement(i.k,u({},p,d,r))}},39621:(e,t,n)=>{n.d(t,{Z:()=>g});var r=n(24328),o=n.n(r),a=n(17440),l=n(87918),i=n.n(l),s=n(6782),c=n(94079),u=n(31517),p=n(31276);const d=(0,n(79692).Z)({root:{display:"flex",flex:1},input:{height:"100%",paddingLeft:"12px",paddingRight:"8px",fontSize:"14px"},inputNumber:{minWidth:"60px",marginRight:10,height:"100%",backgroundColor:"rgba(0, 0, 0, 0.03)"},inputUnit:{width:"100%"}}),m=[i().text("minutes"),i().text("hours"),i().text("days"),i().text("weeks"),i().text("months"),i().text("years")],g=e=>{let{interval:[t,n],onChange:r,onFocus:l}=e;const i=d(),g=(0,a.pipe)(p.NA,parseInt,(e=>[e,n]),r),f=(0,a.pipe)((e=>{let{value:n}=e;return[t,n]}),r);return o().createElement("div",{className:i.root},o().createElement(c.TextField,{type:"number",value:t||"",onChange:g,inputProps:{min:1,onFocus:l},InputProps:{classes:{root:i.input}},className:i.inputNumber}),o().createElement(u.Z,{label:"",placeholder:(0,s.Z)(n),className:i.inputUnit,value:{value:n,label:(0,s.Z)(n)},options:m.map((e=>({value:e,label:(0,s.Z)(e)}))),onChange:f,TextFieldProps:{inputProps:{onFocus:l},InputProps:{classes:{root:i.input}}}}))}},92575:(e,t,n)=>{n.d(t,{Z:()=>N});var r=n(24328),o=n.n(r),a=n(13980),l=n.n(a),i=n(17440),s=n(70347);const c=(0,n(5407).Z)(s.ZP);var u=n(5190),p=n(18461),d=n(94079),m=n(71153),g=n.n(m),f=n(88611);function b(){return b=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},b.apply(this,arguments)}function h(e){const{innerProps:t,innerRef:n,children:r,isFocused:a,isSelected:l,selectProps:{classes:i},label:s}=e;return o().createElement(d.MenuItem,b({className:g()(i.option,{[i["option--selected"]]:l}),ref:n,selected:a,component:"div"},t),o().createElement(d.Checkbox,{color:"primary",checked:l}),o().createElement(f.C,{value:s},o().createElement("div",{className:i["option--item"]},r)))}h.propTypes={children:l().node,innerProps:l().shape({id:l().string.isRequired,key:l().string,onClick:l().func.isRequired,onMouseMove:l().func.isRequired,onMouseOver:l().func.isRequired,tabIndex:l().number.isRequired}).isRequired,innerRef:l().oneOfType([l().oneOf([null]),l().func,l().shape({current:l().any.isRequired})]),isFocused:l().bool.isRequired,isSelected:l().bool.isRequired,label:l().string,selectProps:l().shape({classes:l().shape({option:l().string})})};const y={Option:h};var E=n(79692),v=n(31276);function x(){return x=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},x.apply(this,arguments)}function O(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){w(e,t,n[t])}))}return e}function w(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const S=(0,E.Z)((e=>({label:{top:6,left:16},placeholder:e=>({display:!e.placeholder||e.label?"none":void 0}),"option--selected":{fontWeight:400},clearIndicator:{padding:e.spacing(1),margin:e.spacing(.25,.5)},dropdownIndicator:{padding:e.spacing(1),margin:e.spacing(.25,.5)}})));let C=0;function P(e){const{label:t,creatable:n,getOptions:a,loadingIndicator:l,components:s,classes:d,styles:m,onChange:g,onInputChange:f,menuPlacement:b="auto"}=e,h=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["label","creatable","getOptions","loadingIndicator","components","classes","styles","onChange","onInputChange","menuPlacement"]),E=n?c:a?p.Z:u.Z,[w,P]=(0,r.useState)(""),N=S((0,i.omit)(["classes"],e)),T="custom-select-"+C++,I=O({},y,s),k=(0,v.ze)(N,d),R=O({indicatorSeparator:e=>O({},e,{margin:"10px 0"}),loadingIndicator:e=>O({},e,{display:l?e.display:"none"}),loadingMessage:e=>O({},e,{fontFamily:'"Roboto", "Helvetica", "Arial", sans-serif'})},m),Z=t?{inputId:T,TextFieldProps:O({label:t,InputLabelProps:{htmlFor:T,shrink:!(!e.value||!e.value.length)||void 0,className:k.label}},e.TextFieldProps)}:{};return o().createElement(E,x({isMulti:!0,inputId:T,inputValue:w,onChange:function(e,t){g(e,t),"create-option"===t.action&&(P(""),f("",{action:"input-change"}))},onInputChange:function(e,t){let{action:n}=t;f(e,{action:n}),"set-value"!==n&&P(e)},closeMenuOnSelect:!1,hideSelectedOptions:!1,classes:k,components:I,styles:R,menuPlacement:b,loadOptions:a},Z,h))}P.defaultProps={creatable:!1,cacheOptions:!0,components:{},classes:{},placeholder:"",loadingIndicator:!1,onInputChange:()=>{},onChange:()=>{}},P.propTypes={creatable:l().bool,cacheOptions:l().bool,defaultOptions:l().bool,value:l().arrayOf(l().shape({label:l().string.isRequired,value:l().any})),options:l().arrayOf(l().shape({label:l().string.isRequired,value:l().any})),onChange:l().func,onInputChange:l().func,placeholder:l().string,label:l().string,loadingIndicator:l().bool,components:l().shape({ClearIndicator:l().func,Control:l().func,DropdownIndicator:l().func,DownChevron:l().func,CrossIcon:l().func,Group:l().func,GroupHeading:l().func,IndicatorsContainer:l().func,IndicatorSeparator:l().func,Input:l().func,LoadingIndicator:l().func,Menu:l().func,MenuList:l().func,MenuPortal:l().func,LoadingMessage:l().func,NoOptionsMessage:l().func,MultiValue:l().func,MultiValueContainer:l().func,MultiValueLabel:l().func,MultiValueRemove:l().func,Option:l().func,Placeholder:l().func,SelectContainer:l().func,SingleValue:l().func,ValueContainer:l().func}),classes:l().shape({control:l().string,valueContainer:l().string,multiValue:l().string,noOptionsMessage:l().string,singleValue:l().string,placeholder:l().string,menu:l().string,clearIndicator:l().string,dropdownIndicator:l().string,option:l().string,"option--selected":l().string,label:l().string}),styles:l().shape({clearIndicator:l().func,container:l().func,control:l().func,dropdownIndicator:l().func,group:l().func,groupHeading:l().func,indicatorsContainer:l().func,indicatorSeparator:l().func,input:l().func,loadingIndicator:l().func,loadingMessage:l().func,menu:l().func,menuList:l().func,menuPortal:l().func,multiValue:l().func,multiValueLabel:l().func,multiValueRemove:l().func,noOptionsMessage:l().func,option:l().func,placeholder:l().func,singleValue:l().func,valueContainer:l().func}),TextFieldProps:l().object,getOptions:l().func,menuPlacement:l().string,menuPortalTarget:l().object,getOptionValue:l().func,isSearchable:l().bool};const N=P},85451:(e,t,n)=>{n.d(t,{Z:()=>x});var r=n(24328),o=n.n(r),a=n(52730),l=n(87918),i=n.n(l),s=n(17440),c=n(71153),u=n.n(c),p=n(94079),d=n(92575),m=n(96808),g=n(99493),f=n(87638),b=n(79692);function h(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){y(e,t,n[t])}))}return e}function y(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const E={input:e=>h({},e,{fontSize:"14px"}),loadingMessage:e=>h({},e,{fontSize:"14px"}),menuPortal:e=>h({},e,{zIndex:1300})},v=(0,b.Z)({root:{flex:1},title:{paddingBottom:"10px",paddingLeft:"5px",fontSize:"14px"},dropDownInput:{width:"100%",justifyContent:"center",backgroundColor:"rgba(0, 0, 0, 0.03)",borderTop:"4px"},option:{fontSize:"14px",height:"32px"}}),x=e=>{let{selectedUsers:t,onChange:n,className:l,disableUnderline:c}=e;const b=v(),h=e=>({value:e,label:e}),y=e=>e.map(h),x=(0,a.useSelector)(f.ZP.selectors.getTenant),O=(0,a.useSelector)(f.ZP.selectors.getServicesPath),w=(0,r.useRef)();return o().createElement("div",{className:u()(b.root,l)},o().createElement(p.Typography,{className:b.title,variant:"subtitle1"},i().text("User")),o().createElement(d.Z,{value:y(t),onChange:(0,s.pipe)((0,s.defaultTo)([]),(0,s.pluck)("value"),n),defaultOptions:!0,getOptions:e=>(w.current||(w.current=(0,g.kz_)({tenant:x,servicesPath:O})),w.current.then((0,s.pipe)((0,s.prop)("array"),(0,s.pluck)("username"),(e=>t=>e?t.filter((t=>g.P6Y.strings.search(t,e))):t)(e),y))),TextFieldProps:{InputProps:{disableUnderline:c},className:b.dropDownInput},components:{DropdownIndicator:m.Z},styles:E,classes:b,menuPortalTarget:document.body}))}},31537:(e,t,n)=>{let r;n.d(t,{I:()=>r}),function(e){e.MODEL_UPDATED="MODEL_UPDATED",e.ENTITY_REMOVED="ENTITY_REMOVED",e.ENTITY_CREATED="ENTITY_CREATED",e.ENTITY_CHANGED="ENTITY_CHANGED",e.ENTITIES_MERGED="ENTITIES_MERGED",e.ENTITIES_SPLITTED="ENTITIES_SPLITTED",e.ENTITY_LOST_MERGE="ENTITY_LOST_MERGE",e.RELATIONSHIP_CREATED="RELATIONSHIP_CREATED",e.RELATIONSHIP_REMOVED="RELATIONSHIP_REMOVED",e.RELATIONSHIP_CHANGED="RELATIONSHIP_CHANGED",e.POTENTIAL_MATCHES_FOUND="POTENTIAL_MATCHES_FOUND",e.NOT_MATCHES_SET="NOT_MATCHES_SET",e.NOT_MATCHES_RESET="NOT_MATCHES_RESET",e.PERIODIC_TASK_SCHEDULED="PERIODIC_TASK_SCHEDULED",e.ENTITIES_MERGED_MANUALLY="ENTITIES_MERGED_MANUALLY",e.POTENTIAL_MATCHES_REMOVED="POTENTIAL_MATCHES_REMOVED",e.ENTITIES_MERGED_ON_THE_FLY="ENTITIES_MERGED_ON_THE_FLY",e.USER_LOGIN="USER_LOGIN",e.USER_LOGOUT="USER_LOGOUT",e.USER_SEARCH="USER_SEARCH",e.USER_PROFILE_VIEW="USER_PROFILE_VIEW",e.COMMENT_ADDED="COMMENT_ADDED",e.COMMENT_UPDATED="COMMENT_UPDATED",e.COMMENT_DELETED="COMMENT_DELETED",e.ANALYTICS_ATTRIBUTES_CHANGED="ANALYTICS_ATTRIBUTES_CHANGED",e.SFDC_CONNECTOR_SYNCHRONIZATION_ISSUE="SFDC_CONNECTOR_SYNCHRONIZATION_ISSUE",e.GROUP_CREATED="GROUP_CREATED",e.GROUP_REMOVED="GROUP_REMOVED",e.GROUP_CHANGED="GROUP_CHANGED"}(r||(r={}))},34606:(e,t,n)=>{n.d(t,{te:()=>c,VV:()=>u,rx:()=>p,_V:()=>d,Xr:()=>m});var r=n(17440),o=n(87918),a=n.n(o),l=n(31537);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const s=(0,r.path)(["data","type"]),c=e=>{const{items:t,label:n}=e,[r]=t||[];return s(r)||n},u=(0,r.pipe)(c,(e=>(0,r.pipe)(r.values,(0,r.includes)(e))(l.I))),p=e=>(0,r.pipe)((0,r.propOr)([],"items"),(0,r.groupBy)(s),r.values,(0,r.ifElse)((e=>{let{length:t}=e;return t>1}),(0,r.map)((t=>function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){i(e,t,n[t])}))}return e}({},e,{items:t,itemsTotal:t.length}))),(()=>[e])))(e),d=e=>(0,r.isNil)(e)?"":"string"==typeof e?e:Array.isArray(e)?e.map(d).join(", "):(0,r.is)(Object,e)?d("value"in e?e.value:Object.values(e)):e.toString(),m=e=>({[l.I.COMMENT_ADDED]:a().text("Comment added"),[l.I.COMMENT_DELETED]:a().text("Comment deleted"),[l.I.COMMENT_UPDATED]:a().text("Comment updated"),[l.I.ENTITIES_MERGED]:a().text("Profile merged"),[l.I.ENTITIES_MERGED_MANUALLY]:a().text("Profile merged manually"),[l.I.ENTITIES_MERGED_ON_THE_FLY]:a().text("Profile merged on the fly"),[l.I.ENTITIES_SPLITTED]:a().text("Profile un-merged"),[l.I.ENTITY_CHANGED]:a().text("Profile updated"),[l.I.ENTITY_CREATED]:a().text("Profile created"),[l.I.ENTITY_LOST_MERGE]:a().text("Profile lost merge"),[l.I.ENTITY_REMOVED]:a().text("Profile removed"),[l.I.GROUP_CHANGED]:a().text("Group updated"),[l.I.GROUP_CREATED]:a().text("Group created"),[l.I.GROUP_REMOVED]:a().text("Group removed"),[l.I.MODEL_UPDATED]:a().text("Model was updated"),[l.I.NOT_MATCHES_RESET]:a().text("Not matches reset"),[l.I.NOT_MATCHES_SET]:a().text("Not matches set"),[l.I.PERIODIC_TASK_SCHEDULED]:a().text("Periodic task was scheduled"),[l.I.POTENTIAL_MATCHES_FOUND]:a().text("Potential matches found"),[l.I.POTENTIAL_MATCHES_REMOVED]:a().text("Potential matches removed"),[l.I.RELATIONSHIP_CHANGED]:a().text("Relationship updated"),[l.I.RELATIONSHIP_CREATED]:a().text("Relationship created"),[l.I.RELATIONSHIP_REMOVED]:a().text("Relationship removed"),[l.I.USER_LOGIN]:a().text("Logged in"),[l.I.USER_LOGOUT]:a().text("Logged out"),[l.I.USER_PROFILE_VIEW]:a().text("Profile viewed"),[l.I.USER_SEARCH]:a().text("Searched"),[l.I.ANALYTICS_ATTRIBUTES_CHANGED]:a().text("Analytics attribute changed"),[l.I.SFDC_CONNECTOR_SYNCHRONIZATION_ISSUE]:a().text("SFDC connector synchronization issue")}[e]||"")},51843:(e,t,n)=>{n.d(t,{Z:()=>b});var r=n(24328),o=n.n(r),a=n(95038),l=n.n(a),i=n(87918),s=n.n(i),c=n(17440),u=n(99493),p=n(94079),d=n(96808),m=n(37699);const g=(0,n(79692).Z)({root:{flex:1},dropdownIndicator:{transition:"transform .15s ease"},inputRoot:{fontSize:"14px",height:46},input:{padding:"0 12px 0"},dateOptionLabel:{minWidth:"100px"},paper:{minWidth:"112px"}}),f=l().localeData().longDateFormat("L"),b=e=>{let{values:t,onChange:n,onFocus:a}=e;const l=f,i=(0,r.useRef)(null),[b,h]=(0,r.useState)(!1),y=g(),E=(0,r.useCallback)((()=>{h((e=>!e)),a()}),[a]),v=()=>{h(!1)};return o().createElement("div",{className:y.root},o().createElement(p.TextField,{fullWidth:!0,value:t.map((e=>((e,t)=>(0,c.isNil)(e)?`${t}`:`${(0,u.mB6)({dataTypeDefinition:{type:u.oS0.TYPE_ACTIVENESS_DATE}},e)}`)(e,l))).join(" — "),onClick:E,variant:"filled",ref:i,InputProps:{endAdornment:o().createElement(d.Z,{selectProps:{classes:y,menuIsOpen:b},innerProps:{}}),disableUnderline:(0,c.isNil)(t),readOnly:!0,classes:{root:y.inputRoot,input:y.input}},InputLabelProps:{shrink:!1},placeholder:s().text(`${l} — ${l}`)}),o().createElement(p.Menu,{variant:"menu",open:b,autoFocus:!1,classes:{paper:y.paper},anchorEl:i.current,onClose:v,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},elevation:2,getContentAnchorEl:null,MenuListProps:{autoFocusItem:b,style:{width:"100%"}}},o().createElement(m.Z,{values:t,onCancel:v,onApply:e=>{n(e),h(!1)},type:u.oS0.TYPE_ACTIVENESS_DATE})))}},67885:(e,t,n)=>{let r,o;n.d(t,{K:()=>r,o:()=>o}),function(e){e.WITHIN="within",e.AGO="ago",e.BETWEEN="between"}(r||(r={})),function(e){e.INIT="init",e.LOADING="loading",e.LOADED="loaded",e.ERROR="error"}(o||(o={}))},16940:(e,t,n)=>{n.d(t,{_:()=>ca,t:()=>Sa});var r=n(24328),o=n.n(r),a=n(52730),l=n(8598),i=n(17440),s=n(36138),c=n(44443),u=n(22664),p=n(39450),d=n(60115),m=n(585),g=n(99493),f=n(87918),b=n.n(f),h=n(3096),y=n.n(h),E=n(87638),v=n(2804),x=n(7718),O=n(3515),w=n(17554),S=n(61756),C=n(57730),P=n(76536),N=n(26481),T=n(49759),I=n(94150),k=n(26005),R=n(99136),Z=n(21077),D=n(67268),j=n(71153),A=n.n(j),L=n(8962);const M=o().createContext(null);M.displayName="SingleAttributeContext";var U=n(60995),H=n(10237),V=n(58662),_=n(94079),F=n(93416),z=n(75512),B=n(30553),W=n(91181),G=n(32152),q=n(36444),Y=n(79692);const $=(0,Y.Z)((()=>({triggerButton:{minWidth:0,color:"rgba(0,0,0,0.54)",width:"36px"},popupContent:{paddingTop:"19px",paddingBottom:"23px",paddingLeft:"23px",paddingRight:"23px",maxWidth:"180px",width:"40%"},checkboxControlRoot:{marginTop:"6px",marginLeft:"-12px"},checkboxControlLabel:{fontSize:"0.85rem"},checkboxControlCheckbox:{marginRight:"5px"}}))),Q=e=>{let{className:t}=e;const n=$(),a=(0,r.useRef)(),[l,i]=(0,r.useState)(!1),{showInactive:s,toggleShowInactive:c}=(0,r.useContext)(M),u=()=>i((e=>!e));return o().createElement(o().Fragment,null,o().createElement(_.Button,{ref:a,classes:{root:A()(n.triggerButton,t)},onClick:u},o().createElement(q.Z,null)),o().createElement(_.Popover,{open:l,classes:{paper:n.popupContent},anchorEl:a.current,onClose:u,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"}},o().createElement(_.FormControlLabel,{classes:{root:n.checkboxControlRoot,label:n.checkboxControlLabel},control:o().createElement(_.Checkbox,{className:n.checkboxControlCheckbox,checked:s,onChange:e=>c(e.target.checked)}),label:b().text("Show inactive values")})))},X=(0,Y.Z)((()=>({root:{padding:"0 4px 0 16px"},totalCaption:{lineHeight:"19px",fontSize:"14px",letterSpacing:"0.24px",color:"rgba(0,0,0,0.6)",flexShrink:0,justifyContent:"flex-start",paddingTop:"16px",paddingBottom:"13px"},ovIcon:{marginTop:"2px",marginLeft:"5px"}}))),K=e=>{let{caption:t,totalVisibleValues:n,showInactiveValuesMenu:a}=e;const l=X(),{searchQuery:i,setSearchQuery:s,setPage:c,totalNonVisibleValues:u,nonVisibleValues:p,attributeType:d}=(0,r.useContext)(M);return o().createElement(F.Z,{title:b().text(t),className:l.root},o().createElement(z.Z,{widthToHide:500},o().createElement(B.Z,{height:24,margin:16}),o().createElement(_.Typography,{className:l.totalCaption,variant:"caption"},b().number(n)," ",1===n?b().text("item"):b().text("items"))),o().createElement(W.Z,{nonOvTotal:u,className:l.ovIcon,nonOvValues:p,attributeType:d}),o().createElement(G.i,{query:i,onChange:e=>{s(e),c(0)}}),a&&o().createElement(Q,null))};var J=n(65549),ee=n(93140),te=n(76134),ne=n(96698);const re=(0,Y.Z)((e=>({moreButton:{padding:"9px 16px 9px 12px",backgroundColor:"rgba(98, 2, 238, 0)",marginBottom:"4px"},buttonLabel:{fontSize:"14px",fontWeight:500,lineHeight:"16px"},icon:{fontSize:"18px",marginRight:"8px"},divider:{margin:"0 -16px 8px",backgroundColor:"rgba(0,0,0,0.12)"},ovFalse:e.inactive}))),oe=g.nIW,ae=(e,t)=>"object"==typeof e?Object.values(e).some((e=>e.some((e=>{let{value:n}=e;return ae(n,t)})))):g.P6Y.strings.search(String(e),t),le=async e=>{let{metadata:t,entity:n,attributeTypeUri:r,defaultMaxValues:o=1/0,offset:a=0,searchQuery:l=""}=e;const s=(0,i.pipe)(g.XtP,(0,i.filter)((e=>{let{value:t}=e;return ae(t,l)})))(t,n,r),c=(0,i.filter)(g.OXP,s);return{[(0,g.xy8)(r)]:{[oe(r)]:c.slice(a,a+o),paging:{[r]:{totalOvValues:c.length,totalValues:s.length}}}}};function ie(){return ie=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ie.apply(this,arguments)}function se(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){ce(e,t,n[t])}))}return e}function ce(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const ue=[],pe=e=>{let{values:t,attributeType:n,parentUri:l,showInactive:s}=e;const c=re(),{uri:u,required:d,cardinality:m,name:f}=n,h=(0,a.useDispatch)(),y=(0,r.useContext)(p.m),v=(0,a.useSelector)(E.ZP.selectors.getEntity),x=(0,a.useSelector)((e=>E.ZP.selectors.getModifiedEntity(e,v.uri)||{})),O=(0,a.useSelector)((e=>E.ZP.selectors.getActiveErrorsForAttributesPager(e,l,n))),w=(0,a.useSelector)((e=>(0,g.tQX)(l,n,E.ZP.selectors.getProfileErrors(e)))),S=(0,a.useSelector)(E.ZP.selectors.getMode),C=(0,g.xy8)(n),P=(0,i.pipe)((0,i.pathOr)(ue,[C,f]),(0,i.map)((0,i.prop)("uri")))(v),N=(0,i.pathOr)(ue,[C,f],x),T=N.map((0,i.prop)("uri")),I=(0,g.ZiX)(v.uri),k=(0,r.useRef)((0,g.gjI)({parentUri:l,attributeType:n})),R=(0,g.O27)(N),Z=d&&R,D=Z?[k.current]:N.filter((0,i.pipe)((0,i.prop)("uri"),g.ZiX)),j=(0,r.useCallback)((e=>(0,i.pipe)(E.N5.actions.addAttributes,h)(e.map((e=>se({},e,{viewId:y}))))),[y,h]),L=(0,r.useCallback)((e=>(0,i.pipe)(E.N5.actions.modifyAttribute,h)(se({},e,{viewId:y}))),[y,h]),M=(0,r.useCallback)((e=>(0,i.pipe)(E.N5.actions.removeAttribute,h)(se({},e,{viewId:y}))),[y,h]),U=(0,r.useCallback)((0,i.pipe)(E.N5.errors.actions.errorDeactivated,h),[h]),H=(0,r.useCallback)((()=>{const e={parentUri:l,attributeType:n};return j(Z&&!(0,g.YkM)(n.type)?[e,e]:[e])}),[j,l,n,Z]),V=(0,g.Vg3)({attributeType:n,mode:S}),F={attributeType:n,errors:O,crosswalks:x.crosswalks,mode:S,onAddAttributes:j,onChangeAttribute:L,onDeactivateError:U,showNonOv:s};return o().createElement("div",null,o().createElement(ee.Z,{cardinality:m}),o().createElement(te.Z,{message:w}),V&&o().createElement(_.Button,{color:"primary",onClick:H,className:c.moreButton},o().createElement(J.Z,{classes:{root:c.icon}}),o().createElement("div",{className:c.buttonLabel},b().text("Add"))),D.map(((e,t)=>o().createElement(ne.Z,ie({key:e.uri},F,{attributeValue:e,lazy:Z&&!d,showEmptyEditors:I,ownError:(0,g.ADq)(e,t,u,O),onDeleteAttribute:M})))),D.length>0&&t.length>0&&o().createElement(_.Divider,{className:c.divider}),t.map((e=>{const t=N.find((0,i.propEq)("uri",e.uri)),n=t||e,r=P.includes(n.uri)&&!T.includes(n.uri),a=!r&&t&&!((e,t)=>{const n=(0,i.is)(Object,e.value)||(0,i.is)(Object,t.value)?(0,i.over)((0,i.lensPath)(["value"]),(0,g.vKJ)({valueTransformer:(0,i.unless)(g.OXP,(0,i.omit)(["value"])),deleteEmptyComplex:!0})):i.identity;return(0,i.equals)(n(e),n(t))})(t,e),l=(0,i.cond)([[(0,i.always)(r),(0,i.always)("deleted")],[(0,i.always)(a),(0,i.always)("edited")]])();return o().createElement("div",{key:n.uri,className:A()({[c.ovFalse]:!(0,g.OXP)(n)})},o().createElement(ne.Z,ie({},F,{attributeValue:n,ownError:(0,g.ADq)(n,null,u,O),onDeleteAttribute:M,state:l})))})))};var de=n(81303);const me=(0,Y.Z)((e=>({ovFalse:e.inactive}))),ge=e=>{let{values:t,attributeType:n,showInactive:r}=e;const a=me();return o().createElement(o().Fragment,null,t.map((e=>o().createElement("div",{key:e.uri,className:A()({[a.ovFalse]:!(0,g.OXP)(e)})},o().createElement(de.Z,{attributeValue:e,attributeType:n,showNonOv:r})))))},fe=(0,Y.Z)((()=>({root:{display:"flex",flexDirection:"column"},content:{position:"relative",padding:"4px 16px 9px",overflow:"auto",flexGrow:1},noData:{fontSize:"13px",color:"rgba(0,0,0,0.54)"},pagination:{flexGrow:0,flexShrink:0}}))),be=e=>{let{config:t,className:n}=e;const{caption:l,max:i,showInactiveValuesMenu:s}=t,c=fe(),{values:u,totalVisibleValues:p,page:d,setPage:m,isLoading:g,hasPaging:f,attributeType:h,showInactive:y}=(0,r.useContext)(M),v=(0,a.useSelector)(E.ZP.selectors.getEntityUri),x=(0,a.useSelector)(E.ZP.selectors.getIsViewMode),O=(0,a.useSelector)(E.ZP.selectors.getIsEditableMode),w=(0,a.useSelector)(E.ZP.selectors.getPivotingAttributes),S=0!==u.length;return o().createElement(U.J.Provider,{value:w},o().createElement(H.Z,{className:A()(c.root,n)},o().createElement(K,{totalVisibleValues:p,caption:l,showInactiveValuesMenu:s}),o().createElement(_.Box,{className:c.content},(()=>{if(g)return o().createElement(R.Z,null);if(h){if(x&&S){const e={values:u,attributeType:h,showInactive:y};return o().createElement(ge,e)}if(O){const e={values:u,attributeType:h,parentUri:v,showInactive:y};return o().createElement(pe,e)}}return o().createElement(_.Typography,{className:c.noData},b().text("No data"))})()),f&&o().createElement(V.Z,{count:p,page:d,rowsPerPage:i,rowsPerPageOptions:[],onChangePage:m,classes:{root:c.pagination}})))};var he=n(67218),ye=n(20562);function Ee(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const ve=(e,t,n)=>{const{attributeUri:o,max:l=15}=e,s=(0,a.useSelector)(E.ZP.selectors.getMetadata),[c,u]=(0,r.useState)([]),[p,d]=(0,r.useState)(null),[m,f]=(0,r.useState)(!1),b=(0,he._)(),h=(0,r.useRef)(null),y=(0,a.useDispatch)(),v=(0,a.useSelector)(E.ZP.selectors.getApiPath),x=(0,a.useSelector)(E.ZP.selectors.getTenant),O=n?E.ZP.selectors.getEntityWithDiff:E.ZP.selectors.getEntityWithoutDiff,w=(0,a.useSelector)(O),S=(0,a.useSelector)(E.ZP.selectors.getIsViewMode),C=(0,a.useSelector)(E.ZP.selectors.getIsHistoryModeEnabled),P=(0,a.useSelector)(E.ZP.selectors.getHistoryDiff),N=w.uri,T=oe(o),I=(0,g.xy8)(o);h.current=(0,g.JQy)(w,N,T);const k=(0,r.useMemo)((()=>(0,g.zeJ)(s,o)),[s,o]),{globalFilter:R}=(0,a.useSelector)(E.ZP.selectors.getGlobalSearchRequestOptions),{showInactive:Z}=t,D=(0,r.useCallback)((()=>{if(k&&(0,g.Uty)(k)&&!(0,g.ZiX)(N)&&(0,g.YOQ)(o)){f(!0);const{page:e,showInactive:n}=t,r=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(t,["page","showInactive"]),a=(0,g.biM)(w)||C?le:g.KbL;b(a(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Ee(e,t,n[t])}))}return e}({metadata:s,entity:w,apiPath:v,tenant:x,parentUri:N,defaultMaxValues:l,attributeTypeUri:o,offset:l*e,globalFilter:R,options:n?"":void 0},r))).then((e=>{const t=(0,i.path)([I],e),n=(0,i.pathOr)([],[T],t);C||y(E.N5.actions.processNextPageOfAttributeValues({parentUri:N,attributeTypeUri:o,attributeTypeName:T,values:n})),u(n.map((e=>{var t;return(null===(t=h.current)||void 0===t?void 0:t.find((0,i.propEq)("uri",e.uri)))||e}))),d((0,i.path)(["paging",o],t))})).finally((()=>{f(!1)}))}else u([]),d(null)}),[v,N,x,o,l,s,t,R,k,C,P]);(0,r.useEffect)((()=>{D()}),[D]),(0,ye.D)((()=>{S&&D()}),[S]);const j=(0,i.partition)(g.OXP),[,A]=j(h.current||[]),L=Z?[]:A,M=Z?"totalValues":"totalOvValues",U=(0,i.ifElse)((0,i.has)(M),(0,i.prop)(M),(0,i.always)(c.length))(p),H=l<U,V=null!=p&&p.totalValues?p.totalValues-U:L.length;return{values:c,isLoading:m,hasPaging:H,totalVisibleValues:U,attributeType:k,totalNonVisibleValues:V,nonVisibleValues:L}};function xe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Oe=n(37152),we=n(31274),Se=n(79026),Ce=n(8818),Pe=n(90324),Ne=n(70595);const Te=o().createContext(null);Te.displayName="RelationsViewStateContext";const Ie=(0,Y.Z)((e=>({button:{color:e.palette.text.secondary,width:"36px",minWidth:"36px"},popupContent:{padding:"19px 23px"},checkboxControlLabel:{fontSize:"0.85rem"},checkboxControlCheckbox:{marginRight:"5px"},divider:{backgroundColor:"rgba(0,0,0,0.1)",margin:"19px -23px"},title:{marginBottom:"30px"},sortControls:{display:"flex",alignItems:"center"},sortSelectorRoot:{flex:1,padding:"13px 16px",fontSize:"0.85rem"},sortSelectorMenuItem:{fontSize:"0.85rem"},sortOrderButton:{flexShrink:0,margin:"0 8px 0 7px"}}))),ke=e=>{let{className:t}=e;const n=Ie(),a=(0,r.useRef)(),{showInactive:l,toggleShowInactive:i,sortOrder:s,toggleSortOrder:c,sortOption:u,changeSortOption:p,sortOptions:d}=(0,r.useContext)(Te),[m,f]=(0,r.useState)(!1),h=()=>f((e=>!e)),y=!(0,g.O27)(d),E="asc"===s;return o().createElement(o().Fragment,null,o().createElement(_.Button,{ref:a,classes:{root:A()(n.button,t)},onClick:h},o().createElement(q.Z,null)),o().createElement(_.Popover,{open:m,classes:{paper:n.popupContent},anchorEl:a.current,onClose:h,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"}},o().createElement(_.FormControlLabel,{classes:{label:n.checkboxControlLabel},control:o().createElement(_.Checkbox,{className:n.checkboxControlCheckbox,checked:l||!1,onChange:i}),label:b().text("Show inactive Relationships")}),y&&o().createElement(o().Fragment,null,o().createElement(_.Divider,{className:n.divider}),o().createElement(_.Typography,{className:n.title,variant:"h6"},b().text("Sort by")),o().createElement("div",{className:n.sortControls},o().createElement(Se.Z,{entries:d,TextFieldProps:{variant:"filled"},classes:{root:n.sortSelectorRoot,menuItem:n.sortSelectorMenuItem},fullWidth:!0,disableUnderline:!0,value:u,onChange:p,MenuProps:{getContentAnchorEl:null,anchorOrigin:{vertical:"bottom",horizontal:"left"}}}),o().createElement(Ce.k,{tooltipTitle:E?b().text("Ascending"):b().text("Descending"),icon:E?Pe.Z:Ne.Z,onClick:c,className:n.sortOrderButton,size:"L"})))))};ke.displayName="FilterButton";const Re=ke,Ze=(0,Y.Z)({header:{padding:"0 6px 0 16px"},totalCaption:{lineHeight:"19px",fontSize:"14px",letterSpacing:"0.24px",color:"rgba(0,0,0,0.6)",flexShrink:0,marginRight:"5px",justifyContent:"flex-start",paddingTop:"16px",paddingBottom:"13px"}});var De=n(61932),je=n(55847);const Ae=o().createContext(null);function Le(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Me(e,t,n[t])}))}return e}function Me(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Ue=Math.pow(2,31)-1,He=(0,Y.Z)((()=>({tenant:{backgroundColor:"#0000EE",cursor:"pointer",position:"absolute",top:"8px",left:"22px",width:"10px",height:"10px",color:"white",fontSize:"10px",fontWeight:"bold",userSelect:"text",zIndex:1,display:"flex",alignItems:"center",justifyContent:"center"},button:{position:"relative"},badge:{fontSize:"10px",height:"14px",minWidth:"14px",width:"14px",fontWeight:"bold",backgroundColor:"#FF4081",color:"#FFF"},badgePosition:{right:"5px",top:"4px"}})));var Ve=n(81137);const _e=e=>{let{label:t}=e;const n=He();return o().createElement(_.Badge,{classes:{anchorOriginTopRightRectangle:n.badgePosition,badge:n.badge},badgeContent:t},o().createElement(De.Z,null))},Fe=()=>{const{tenants:e,selectedTenant:t,onConfirmImport:n,onCancelConfirmation:l,onImportClick:i}=(()=>{var e;const t=(0,a.useSelector)(E.ZP.selectors.getDataTenants),n=(0,a.useDispatch)(),{config:o,reloadRelations:l}=(0,r.useContext)(Ae),i=(0,a.useSelector)(E.ZP.selectors.getEntityUri),[s,c]=(0,r.useState)([]),[u,p]=(0,r.useState)(null),d=(0,a.useSelector)(E.ZP.selectors.getDtssPath),m=(0,a.useSelector)(E.ZP.selectors.getTenant),f=[Le({},o.content,{offset:0,max:null!==(e=o.maxDtssImport)&&void 0!==e?e:Ue})],h=(0,r.useCallback)((()=>{c([]),o.importFromDT&&!(0,g.ZiX)(i)&&Promise.all((t||[]).map((e=>(0,g.QXb)({entityUri:i,content:f,dtssPath:d,customerTenant:m,dataTenant:e.id}).then((t=>{let{hasNonImportedConnections:n}=t;return Le({},e,{hasNonImportedConnections:n})}))))).then((e=>e.filter((e=>e.hasNonImportedConnections)))).then(c)}),[i,d,m,o,t]),y=(0,r.useCallback)((()=>{(0,g.MOC)({entityUri:i,content:f,dtssPath:d,customerTenant:m,dataTenant:u.id}).then((()=>{l(),h()})).catch((e=>n(E.ui.actions.errorSet((0,g.xU7)(e,b().text("Something went wrong")))))),p(null)}),[i,d,m,o,h,l,u,p]);(0,r.useEffect)((()=>{h()}),[h]);const v=(0,r.useCallback)((()=>p(null)),[]),x=(0,r.useCallback)((e=>p(e)),[]);return{tenants:s,selectedTenant:u,onConfirmImport:y,onCancelConfirmation:v,onImportClick:x}})(),s=He(),c=1===e.length,u=c?0===e[0].label.indexOf("DT:")?e[0].label[3]:e[0].label[0]:e.length;return o().createElement(o().Fragment,null,!!e.length&&o().createElement(o().Fragment,null,c?o().createElement("div",{className:s.button},o().createElement(Ce.k,{size:"L",icon:De.Z,tooltipTitle:b().text("Import connections from ${label}",{label:e[0].label}),onClick:()=>i(e[0])}),o().createElement("div",{className:A()(s.tenant)},u)):o().createElement(je.Z,{menuId:"importDT-table-actions",buttonComponent:Ce.k,buttonProps:{tooltipTitle:b().text("Import connections"),size:"L",icon:()=>o().createElement(_e,{label:u})},menuItems:e.map((e=>({onClick:()=>{i(e)},text:e.label})))}),o().createElement(Ve.Z,{open:!!t,title:b().text("Confirmation"),content:b().text("Import connections from ${label}?",{label:null==t?void 0:t.label}),discardCaption:b().text("Cancel"),saveCaption:b().text("Import"),onDiscard:l,onSave:n})))},ze=e=>{let{title:t,total:n}=e;const a=Ze(),{searchQuery:l,changeSearchQuery:i}=(0,r.useContext)(Te);return o().createElement(F.Z,{title:t||"",className:a.header},n>0&&o().createElement(z.Z,{widthToHide:400},o().createElement(B.Z,{height:24,margin:16}),o().createElement(_.Typography,{className:a.totalCaption,variant:"caption"},n>1?b().text("${count} items",{count:n}):b().text("${count} item",{count:n}))),o().createElement(G.i,{query:l,onChange:i}),o().createElement(Fe,null),o().createElement(Re,null))};var Be=n(11013),We=n(27604),Ge=n(22983),qe=n(31254),Ye=n(31039);const $e=(0,Y.Z)((e=>({tooltip:e.tooltip,tooltipContent:{minWidth:"165px",padding:"4px 2px 2px"},label:{fontSize:"11px",lineHeight:"13px",fontWeight:500,margin:0,color:"white"},secondaryLabel:{color:"rgba(255, 255, 255, 0.7)",fontSize:"10px",marginTop:"4px",fontWeight:500,lineHeight:"11px"},progress:{marginTop:"4px",color:"#FFFFFF"}})));function Qe(){return Qe=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Qe.apply(this,arguments)}const Xe=e=>{let{label:t,entity:n,children:l}=e,s=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["label","entity","children"]);const c=$e(),u=(0,he._)(),p=(0,a.useSelector)(E.ZP.selectors.getTenant),d=(0,a.useSelector)(E.ZP.selectors.getDtssPath),[m,f]=(0,r.useState)(!1),[b,h]=(0,r.useState)(null);(0,r.useEffect)((()=>{h(null)}),[n]);const y=(0,r.useCallback)((()=>{if(null!=n&&n.entityUri&&(0,i.isNil)(b)){const e=(0,i.ifElse)(g.biM,(e=>(0,g.vTU)({entityUri:e.entityUri,dataTenant:e.dataTenant,customerTenant:p,dtssPath:d})),(e=>(0,g.XkT)(e.entityUri)));f(!0),u(e(n)).then((e=>{let{secondaryLabel:t}=e;h(t)})).finally((()=>{f(!1)}))}}),[d,n,p,u,b]),v=o().createElement("div",{className:c.tooltipContent},o().createElement("div",{className:c.label},t),m&&o().createElement(_.CircularProgress,{size:16,classes:{colorPrimary:c.progress}}),b&&o().createElement("div",{className:c.secondaryLabel},b));return o().createElement(_.Tooltip,Qe({onOpen:y,title:v,disableFocusListener:!0,classes:{tooltip:c.tooltip}},s),l)},Ke=(e,t)=>{const{entity:n,relation:r}=e;return{entityType:(0,g.nt9)(t,null==n?void 0:n.entityType),entityLabel:(0,g.idV)(null==n?void 0:n.entityLabel),preparedUri:(0,g.wwR)({uri:null==n?void 0:n.entityUri,dataTenant:null==n?void 0:n.dataTenant}),relationLabel:(null==r?void 0:r.relationLabel)||(0,g.Lmx)(t,null==r?void 0:r.relationType)}};var Je=n(77277);const et=(0,Y.Z)((()=>({container:{display:"flex"}})));function tt(){return tt=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},tt.apply(this,arguments)}const nt=e=>{let{acceptRelation:t,ignoreRelation:n}=e,r=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["acceptRelation","ignoreRelation"]);const a=et();return o().createElement("div",{className:a.container},o().createElement(Je.Z,tt({onClick:t,variant:"text",color:"primary"},r,{style:{alignSelf:"center"}}),b().text("Accept")),o().createElement(Je.Z,tt({onClick:n,variant:"text",color:"primary"},r,{style:{alignSelf:"center"}}),b().text("Ignore")))},rt=(0,Y.Z)((e=>({container:{display:"flex",flexDirection:"column",marginBottom:"2px"},row:{display:"flex",alignItems:"center",flexDirection:"row",minHeight:"24px",padding:"0 16px"},rowInactive:{background:e.inactiveBackground},entityAvatar:{height:"12px",width:"12px",fontSize:"11px",marginRight:"8px"},entityLabelContainer:{textDecoration:"none",cursor:"pointer",paddingRight:"8px"},entityLabel:{color:e.palette.primary.main,fontSize:"13px",letterSpacing:0,lineHeight:"15px"},relationLabel:{color:e.palette.text.secondary,fontSize:"13px",letterSpacing:0,lineHeight:"15px"},editButtonsContent:{marginLeft:"auto",flex:"0 0 40px"},editButtons:{padding:0},removed:{color:e.palette.text.secondary,textDecoration:"line-through"},editedLabel:{fontStyle:"italic",color:e.palette.text.secondary,margin:"0 5px"}}))),ot=(0,r.memo)((e=>{let{connection:t,metadata:n,showControls:a,onRemoveRelation:l,onEditRelation:i,onAcceptRelation:s,onIgnoreRelation:c,renderRelationArrowButton:u}=e;const p=rt(),{entity:d,relation:m}=t,f=(0,g.$qe)(t),h=(0,g.xr3)(t),y=(0,g.iJH)(t),{entityType:E,entityLabel:v,preparedUri:x,relationLabel:O}=Ke(t,n),w=(0,g.Fn9)(m)&&(0,g.Fn9)(d),{canRemove:S,canUpdate:C}=(e=>{let{metadata:t,mode:n,connection:r,onRemoveRelation:o,onEditRelation:a}=e;if((n===g.ARY.Editing||n===g.ARY.Suggesting)&&r){const{relation:{relationType:e}}=r,l=(0,g.$qe)(r),i=(0,g.V3K)(t,e);return{canRemove:o&&!l&&(0,g.Edd)(n,i),canUpdate:a&&!l&&(0,g.Z5t)(n,i)}}return{canRemove:!1,canUpdate:!1}})({mode:g.ARY.Editing,onRemoveRelation:l,onEditRelation:i,metadata:n,connection:t}),P=(0,r.useCallback)((()=>l(t.relation.relationUri)),[l,t]),N=(0,r.useCallback)((()=>i(t)),[i,t]),T=(0,r.useCallback)((()=>{s(t)}),[s,t]),I=(0,r.useCallback)((()=>c(t)),[c,t]),k=(S||C)&&a&&!t.suggested?o().createElement(o().Fragment,null,C&&o().createElement(Ce.k,{icon:We.Z,size:"XS",onClick:N,tooltipTitle:b().text("Edit")}),S&&o().createElement(Ce.k,{icon:Ge.Z,size:"XS",onClick:P,tooltipTitle:b().text("Remove")})):void 0,R=t.suggested?o().createElement(nt,{acceptRelation:T,ignoreRelation:I,size:"small",disabled:y}):void 0,Z=y?b().text("ignored"):b().text("edited");return o().createElement("div",{className:A()(p.container,{[p.rowInactive]:!w},{[p.removed]:f||y})},o().createElement("div",{className:p.row},u&&u(),o().createElement(qe.Z,{className:p.entityAvatar,entityType:E}),o().createElement(Ye.Z,{value:x,className:p.entityLabelContainer},o().createElement(Xe,{label:v,entity:d},o().createElement("span",{className:p.entityLabel},v)),(h||y)&&o().createElement(_.Typography,{variant:"caption",className:p.editedLabel},"(",Z,")"),O&&o().createElement("span",{className:p.relationLabel},`, ${O}`)),o().createElement("div",{className:p.editButtonsContent},k),R))})),at=(e,t)=>{const n=(e,t)=>(t?(0,g.VGB)(t):[]).map((t=>({type:t,direction:e===g.Nsj.IN?g.Nsj.IN:g.Nsj.OUT})));return n(g.Nsj.IN,e).concat(n(g.Nsj.OUT,t))[0]};function lt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var it=n(98989),st=n(83543);const ct=(0,Y.Z)({arrowIcon:{fontSize:"16px",marginRight:"6px"}}),ut=e=>{let{onClick:t,connection:n,config:r,showSecondLevel:a}=e;const l=ct(),{parentEntityUri:i}=n,{contentSecondLevel:s}=r,c={onClick:t,className:l.arrowIcon};return i||!s||(0,g.xvW)(n)?null:a?o().createElement(st.Z,c):o().createElement(it.Z,c)},pt=(0,Y.Z)({row:{display:"flex",alignItems:"center",width:"100%"},secondLevelContent:{paddingLeft:"24px"}}),dt=e=>{let{config:t,connection:n,children:l}=e;const i=pt(),{showInactive:s}=(0,r.useContext)(Te),{connections:c,showSecondLevel:u,toggleShowSecondLevel:p,loadRelations:d,loading:m,total:f}=(e=>{let{config:t,connection:n,relationActivityFilter:o}=e;const l=(0,a.useDispatch)(),[i,s]=(0,r.useState)(!1),[c,u]=(0,r.useState)(!1),[p,d]=(0,r.useState)(0),{contentSecondLevel:m}=t,{entity:f}=n,b=(0,a.useSelector)((e=>E.ZP.selectors.getConnectionsWithDraftsByViewId(e,t.id,f.entityUri)))||[],{activityFilter:h}=(0,a.useSelector)(E.ZP.selectors.getGlobalSearchRequestOptions)||{},y=(0,r.useCallback)((()=>{const e=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){lt(e,t,n[t])}))}return e}({},m,{returnObjects:!0,returnDates:!0,activeness:{relation:o||g.Ng6.ALL,entity:h}});u(!0),(0,g.N6e)(f.entityUri,[e]).then((e=>{const{connections:n,total:r}=e[0];n&&l(E.N5.relations.actions.secondLevelRelationsLoaded({connections:n,parentEntityUri:f.entityUri,id:t.id})),d(r),u(!1)}))}),[t.id,m,l,f.entityUri,h,o]),v=(0,r.useCallback)((()=>{i||n.connections||y(),s((e=>!e))}),[y,n.connections,i]);return{connections:b,showSecondLevel:i,toggleShowSecondLevel:v,loadRelations:y,loading:c,total:p}})({config:t,connection:n,relationActivityFilter:s?g.Ng6.ALL:g.Ng6.ACTIVE_ONLY}),b=(0,r.useMemo)((()=>(0,g.Px$)(c)),[c]);return o().createElement(o().Fragment,null,l((()=>o().createElement(ut,{onClick:p,connection:n,config:t,showSecondLevel:u}))),u&&o().createElement(we.X.Provider,{value:b},o().createElement("div",{className:i.secondLevelContent},o().createElement(zt,{isLoading:m,config:t,loadRelations:d,connections:c,total:f,parentEntityUri:n.entity.entityUri}))))},mt=(0,Y.Z)((e=>({moreButton:{padding:"9px 16px 9px 12px",backgroundColor:"rgba(98, 2, 238, 0)",marginBottom:"4px",marginLeft:"16px"},buttonLabel:{fontSize:"14px",fontWeight:500,lineHeight:"16px"},icon:{fontSize:"18px",marginRight:"8px"},divider:{margin:"0 0 8px",backgroundColor:"rgba(0,0,0,0.12)"},noData:{fontSize:"13px",color:e.palette.text.secondary,padding:"8px 16px"}}))),gt=e=>{let{className:t,connections:n=[],config:l,mode:s,noDataText:c,parentEntityUri:u}=e;const p=(0,a.useSelector)(E.ZP.selectors.getMetadata),d=(0,a.useSelector)((e=>E.ZP.selectors.getRelationToAddByViewId(e,l.id))),m=(0,a.useSelector)((e=>E.ZP.selectors.getRelationsToEditByViewId(e,l.id))),f=(0,a.useSelector)(E.ZP.selectors.getEntity),h=(0,a.useSelector)((e=>E.ZP.selectors.getCheckIfCanAddRelations(e,l.content))),y=(0,a.useDispatch)(),v=mt(),x=(0,r.useCallback)((()=>{const e=(0,g.vlo)({config:l,mode:s,metadata:p,parentEntityUri:u});(0,i.pipe)(E.N5.relations.actions.openRelationEditor(l.id),y)(e)}),[l,s,p,y,u]),O=(0,r.useCallback)((e=>{y(E.N5.relations.actions.closeRelationEditor(l.id,e)),y(E.N5.relations.actions.removeRelation(l.id,e));const t=n.find((t=>E.N5.relations.selectors.getRelationUriFromConnection(t)===e)),r=E.N5.relations.selectors.getEntityUriFromConnection(t);(0,g.ZiX)(r)&&y(E.N5.modifiedEntities.actions.entityDeleted(r))}),[l,n,y]),w=l.content,S=at(w.inRelations,w.outRelations),C=(0,r.useCallback)((e=>{const t=(0,i.pipe)((0,i.omit)(["suggested"]),(0,i.evolve)({relation:{relationType:(0,i.always)(S.type),object:(0,i.evolve)({type:(0,i.always)(S.type),attributes:(0,i.always)(null)})}}))(e);y(E.N5.relations.actions.addRelation(l.id,t))}),[y,l,S]),P=(0,r.useCallback)((e=>{y(E.N5.relations.actions.ignoreRelation(l.id,{relationType:S.type,relationDirection:S.direction,entityUri:e.entity.entityUri,relationUri:e.relation.relationUri}))}),[y,l,S]),[N,T]=(0,i.partition)(g.xvW,n),I=f&&h,k=0===N.length&&0===T.length,R=e=>{var t,n;const r=m.find((t=>{var n,r;return(null==t||null===(n=t.relation)||void 0===n?void 0:n.relationUri)===(null==e||null===(r=e.relation)||void 0===r?void 0:r.relationUri)})),a=!l.allowOnlyCreateNew||(0,g.xvW)(e),c=`${null==e||null===(t=e.relation)||void 0===t?void 0:t.relationUri}-${null==e||null===(n=e.relation)||void 0===n?void 0:n.direction}`;return o().createElement(dt,{config:l,connection:e,key:c},(t=>r?o().createElement(Be.Z,{connection:r,config:l,mode:s,metadata:p}):o().createElement(ot,{renderRelationArrowButton:t,connection:e,metadata:p,showControls:a,onRemoveRelation:O,onEditRelation:(0,i.pipe)(E.N5.relations.actions.openRelationEditor(l.id),y),onAcceptRelation:C,onIgnoreRelation:P})))},Z=I&&(!d||d&&d.parentEntityUri===u),D=d&&d.parentEntityUri===u;return o().createElement("div",{className:t},Z&&o().createElement(_.Button,{color:"primary",onClick:x,className:v.moreButton},o().createElement(J.Z,{classes:{root:v.icon}}),o().createElement("div",{className:v.buttonLabel},b().text("Add"))),D&&o().createElement(Be.Z,{connection:d,config:l,mode:s,metadata:p}),N.map(R),N.length>0&&T.length>0&&o().createElement(_.Divider,{className:v.divider}),T.map(R),k&&o().createElement(_.Typography,{className:v.noData},c))};var ft=n(19603),bt=n(94646),ht=n(78101),yt=n(80931);const Et=(0,Y.Z)((e=>({attributesList:{paddingLeft:"46px",paddingRight:"16px",marginBottom:"10px",color:e.palette.text.secondary,fontSize:"13px",letterSpacing:0}})));function vt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){xt(e,t,n[t])}))}return e}function xt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Ot=e=>{let{connection:t,className:n}=e;const l=Et(),{relation:s}=t,c=(0,a.useSelector)(E.ZP.selectors.getEntityUriWithDataTenant),u=(0,a.useSelector)(E.ZP.selectors.getMetadata),p=(0,r.useMemo)((()=>(0,g.xF8)(u,null==s?void 0:s.relationType)),[null==s?void 0:s.relationType,u]),d=(0,r.useMemo)((()=>vt({attributes:vt({},E.N5.relations.selectors.getRelationAttributesFromConnection(t))},(0,g.p2l)((null==t?void 0:t.relation)||{}))),[t]),m=(0,r.useMemo)((()=>(0,g.fyF)(p,d)),[p,d]).filter((e=>{let{values:t}=e;return!(0,g.O27)(t)})).length>0,f=(0,r.useMemo)((()=>(0,g.R$r)(d.attributes)),[d]),{getCommentsCount:h}=(0,r.useContext)(O.h);(0,r.useEffect)((()=>{!(0,i.isEmpty)(f)&&h(f)}),[h,f]);const y=(0,r.useMemo)((()=>(0,g.wp9)(g.q7e.RELATION,{entityUri:c,connection:t})),[t,c]);return m?o().createElement(ht.A.Provider,{value:y},o().createElement(yt.Z,{className:A()(l.attributesList,n),entity:d,attrTypes:p})):o().createElement("div",{className:A()(l.attributesList,n)},b().text("No attributes"))};var wt=n(86602),St=n(82726);const Ct=e=>{let{show:t,onToggle:n,className:r}=e;return o().createElement(Ce.k,{className:r,tooltipTitle:t?b().text("Hide attributes of the relationship"):b().text("Show attributes of the relationship"),tooltipPlacement:"bottom-end",size:"XXS",icon:t?wt.Z:St.Z,onClick:n})},Pt=(0,Y.Z)((e=>({container:{display:"flex",flexDirection:"column",paddingBottom:"2px"},row:{display:"flex",alignItems:"flex-start",flexDirection:"row",minHeight:"16px",padding:"3px 16px 0 "},rowInactive:{background:e.inactiveBackground},entityAvatar:{height:"12px",width:"12px",fontSize:"11px",marginRight:"8px"},entityLabelContainer:{textDecoration:"none",cursor:"pointer",paddingRight:"8px",wordBreak:"break-all"},entityLabel:{color:e.palette.primary.main,fontSize:"13px",letterSpacing:0,lineHeight:"15px"},relationLabel:{color:e.palette.text.secondary,fontSize:"13px",letterSpacing:0,lineHeight:"15px"},showDetails:{marginLeft:"auto"},attributesList:{paddingLeft:"46px",marginBottom:"10px",color:e.palette.text.secondary,fontSize:"13px",letterSpacing:0},suggestedWrapper:{backgroundColor:e.suggested},commentsContainer:{marginLeft:"auto",alignItems:"center","& + $showDetails":{marginLeft:"4px"}},additionalButtonsWrapper:{marginLeft:"auto",display:"flex"},suggestedLabelWrapper:{marginTop:"6px"},labelWrapper:{display:"flex"}}))),Nt=(0,r.memo)((e=>{let{connection:t,renderRelationArrowButton:n,acceptRelation:l,ignoreRelation:s}=e;const c=Pt(),u=t.suggested,{entity:p,relation:d}=t,[m,f]=(0,r.useState)(!1),b=(0,a.useSelector)(E.ZP.selectors.getMetadata),{entityType:h,entityLabel:y,preparedUri:v,relationLabel:x}=Ke(t,b),O=(0,g.Fn9)(d)&&(0,g.Fn9)(p),w=(0,a.useSelector)(E.ZP.selectors.getEntityUriWithDataTenant),S=p&&d&&(0,g.wp9)(g.q7e.RELATION,{entityUri:w,connection:t})||[];return o().createElement("div",{className:A()(c.container,{[c.rowInactive]:!O},{[c.suggestedWrapper]:u})},o().createElement("div",{className:A()(c.row,ft.U)},n&&n(),o().createElement("div",{className:A()(c.labelWrapper,{[c.suggestedLabelWrapper]:u})},o().createElement(qe.Z,{className:c.entityAvatar,entityType:h}),o().createElement(Ye.Z,{value:v,className:c.entityLabelContainer},o().createElement(Xe,{label:y,entity:p},o().createElement("span",{className:c.entityLabel},y)),x&&o().createElement("span",{className:c.relationLabel},`, ${x}`))),o().createElement("div",{className:c.additionalButtonsWrapper},!(0,i.isEmpty)(S)&&o().createElement(bt.Z,{className:c.commentsContainer,uri:(0,g.gjS)(d),relatedObjectUris:S,objectType:g.q7e.RELATION,allowOnlyOneComment:!0}),u&&o().createElement(nt,{size:"small",acceptRelation:l(t),ignoreRelation:s(t)}),!u&&o().createElement(Ct,{show:m,onToggle:()=>{f((e=>!e))},className:c.showDetails}))),m&&o().createElement(Ot,{connection:t}))}));var Tt=n(52691),It=n(16208);const kt=e=>e.filter((e=>5===e.value)).length,Rt=e=>e.filter((e=>1===e.value)).length,Zt=e=>0===e.length?"0%":kt(e)/e.length*100+"%",Dt=e=>0===e.length?"0%":Rt(e)/e.length*100+"%",jt=(0,Y.Z)((e=>({wrapper:{display:"flex",flexDirection:"column",alignItems:"flex-end"},averageRating:{marginBottom:"7px",fontSize:"16px",letterSpacing:"0.15px",lineHeight:"19px",color:e.palette.text.primary},scale:{display:"flex",marginBottom:"6px",width:"128px",height:"4px"},likesScale:{height:"100%",backgroundColor:"#8CC152"},dislikesScale:{height:"100%",backgroundColor:"rgb(255, 112, 112)"},counts:{display:"flex"},likesCount:{marginRight:"32px"},count:{display:"flex",alignItems:"center",color:e.palette.text.secondary,fontSize:"13px",letterSpacing:0,lineHeight:"15px"},icon:{marginRight:"4px",width:"14px",height:"14px",color:"rgba(0,0,0,0.38)"}}))),At=e=>{let{ratings:t,className:n}=e;const r=jt();return o().createElement("div",{className:A()(r.wrapper,n)},o().createElement(_.Typography,{className:r.averageRating},(e=>(0,i.pipe)((0,i.pluck)("value"),i.mean,(0,i.defaultTo)(0))(e))(t).toFixed(1)),o().createElement("div",{className:r.scale},o().createElement("div",{className:r.likesScale,style:{width:Zt(t)}}),o().createElement("div",{className:r.dislikesScale,style:{width:Dt(t)}})),o().createElement("div",{className:r.counts},o().createElement("div",{className:A()(r.likesCount,r.count)},o().createElement(Tt.Z,{className:r.icon}),kt(t)),o().createElement("div",{className:r.count},o().createElement(It.Z,{className:r.icon}),Rt(t))))},Lt=(0,Y.Z)((e=>({wrapper:{display:"flex"},button:{fontSize:"14px",textTransform:"none",color:e.palette.text.secondary},likeButton:{marginLeft:"-12px",marginRight:"8px"},isActive:{color:e.palette.text.primary}}))),Mt=e=>{let{ratings:t,onAgree:n,onDisagree:r}=e;const l=Lt(),i=(0,a.useSelector)(E.ZP.selectors.getUserName),s=t.find((e=>{let{user:t}=e;return t===i})),c=[{text:b().text("Has left the practice"),onClick:()=>r(b().text("Has left the practice"))},{text:b().text("Has moved away"),onClick:()=>r(b().text("Has moved away"))},{text:b().text("Has passed away"),onClick:()=>r(b().text("Has passed away"))},{text:b().text("Has retired"),onClick:()=>r(b().text("Has retired"))},{text:b().text("Other"),onClick:()=>r(b().text("Other"))}];return o().createElement("div",{className:l.wrapper},o().createElement(_.Button,{onClick:n,variant:"text",size:"small",className:A()(l.button,l.likeButton,{[l.isActive]:5===(null==s?void 0:s.value)})},"Agree"),o().createElement(je.Z,{buttonProps:{endIcon:o().createElement(st.Z,null),variant:"text",size:"small",className:A()(l.button,{[l.isActive]:1===(null==s?void 0:s.value)})},buttonContent:1===(null==s?void 0:s.value)?s.comment:"Disagree",menuItems:c,menuId:"disagree-dropdown-menu-button"}))},Ut=(0,Y.Z)((e=>({wrapper:{padding:"6px 16px 3px"},entityTypeIcon:{marginRight:"16px"},entityLabel:{color:e.palette.primary.main,fontSize:"14px",letterSpacing:0,lineHeight:"16px"},entityLabelContainer:{textDecoration:"none",wordBreak:"break-all"},relationLabel:{color:e.palette.text.secondary,fontSize:"13px",letterSpacing:0,lineHeight:"15px"},ratings:{marginLeft:"auto"},showDetailsButton:{marginLeft:"16px",marginTop:"18px"},relationAttributes:{paddingLeft:"60px"},suggestedWrapper:{padding:"6px 16px 3px",backgroundColor:e.suggested},commentsContainer:{marginTop:"21px","& + $ratings":{marginLeft:"16px"}},additionalButtonsWrapper:{marginLeft:"auto",display:"flex"}}))),Ht=e=>{let{connection:t,loadRelations:n,renderRelationArrowButton:l,acceptRelation:s,ignoreRelation:c}=e;const u=Ut(),p=t.suggested,[d,m]=(0,r.useState)(!1),{entity:f,relation:b}=t,h=(0,a.useSelector)(E.ZP.selectors.getMetadata),{entityLabel:y,entityType:v,preparedUri:x,relationLabel:O}=Ke(t,h),w=(null==b?void 0:b.ratings)||[],S=(0,a.useSelector)(E.ZP.selectors.getEntityUriWithDataTenant),C=f&&b&&(0,g.wp9)(g.q7e.RELATION,{entityUri:S,connection:t})||[];return o().createElement("div",{className:A()(u.wrapper,{[u.suggestedWrapper]:p})},o().createElement(_.Box,{display:"flex",minHeight:"62px",className:ft.U},o().createElement(_.Box,{display:"flex",alignItems:"flex-start"},o().createElement(_.Box,{display:"flex",alignItems:"center"},l&&l(),o().createElement(qe.Z,{entityType:v,className:u.entityTypeIcon})),o().createElement(_.Box,{display:"flex",flexDirection:"column"},o().createElement(Ye.Z,{value:x,className:u.entityLabelContainer},o().createElement(Xe,{label:y,entity:f},o().createElement("span",{className:u.entityLabel},y))),O&&o().createElement("span",{className:u.relationLabel},O),!p&&o().createElement(Mt,{ratings:w,onAgree:()=>{(0,g.Buf)(null==b?void 0:b.relationUri,{comment:"",value:5}).then(n)},onDisagree:e=>{(0,g.Buf)(null==b?void 0:b.relationUri,{comment:e,value:1}).then(n)}}))),o().createElement("div",{className:u.additionalButtonsWrapper},!(0,i.isEmpty)(C)&&o().createElement(bt.Z,{className:u.commentsContainer,uri:(0,g.gjS)(b),relatedObjectUris:C,objectType:g.q7e.RELATION,allowOnlyOneComment:!0}),p&&o().createElement(nt,{acceptRelation:s(t),ignoreRelation:c(t)}),!p&&o().createElement(o().Fragment,null,o().createElement(At,{ratings:w,className:u.ratings}),o().createElement(Ct,{show:d,onToggle:()=>{m((e=>!e))},className:u.showDetailsButton})))),d&&o().createElement(Ot,{connection:t,className:u.relationAttributes}))},Vt=e=>{let{className:t,connections:n=[],loadRelations:l,config:i,mainEnityUri:s}=e;const{isComplex:c,content:u}=i,{ignoreRelation:p,acceptRelation:d}=((e,t,n)=>{const r=at(e.inRelations,e.outRelations),o=(0,a.useDispatch)();return{ignoreRelation:e=>()=>{const{entity:a}=e;(0,g.iiD)(n,{relatedEntityUri:a.entityUri,relationType:r.type,relationDirection:r.direction}).then(t).catch((e=>{o(E.ui.actions.errorSet((0,g.xU7)(e,b().text("Something went wrong"))))}))},acceptRelation:e=>()=>{const{entity:a,relation:l}=e,{startDate:i,endDate:s}=l,c=r.direction===g.Nsj.IN,u=c?a.entityUri:n,p=c?n:a.entityUri;(0,g.DsR)({startEntityUri:u,endEntityUri:p,relationType:r.type,attributes:null,startDate:i,endDate:s}).then(t).catch((e=>{o(E.ui.actions.errorSet((0,g.xU7)(e,b().text("Something went wrong"))))}))}}})(u,l,s),m=(0,r.useMemo)((()=>(0,g.w3p)(n)),[n]),{getCommentsCount:f}=(0,r.useContext)(O.h);return(0,r.useEffect)((()=>{f(m)}),[f,m]),o().createElement("div",{className:t},n.map((e=>{var t,n;const r=`${null==e||null===(t=e.relation)||void 0===t?void 0:t.relationUri}-${null==e||null===(n=e.relation)||void 0===n?void 0:n.direction}`;return o().createElement(dt,{config:i,connection:e,key:r},(t=>c?o().createElement(Ht,{loadRelations:l,connection:e,acceptRelation:d,ignoreRelation:p,renderRelationArrowButton:t}):o().createElement(Nt,{acceptRelation:d,ignoreRelation:p,connection:e,renderRelationArrowButton:t})))})))};Vt.displayName="RelationsList";const _t=Vt,Ft=(0,Y.Z)((e=>({list:{paddingTop:"8px",paddingBottom:"10px",overflow:"auto",flexGrow:1},noData:{fontSize:"13px",color:e.palette.text.secondary,padding:"8px 16px"}}))),zt=e=>{let{isLoading:t,config:n,loadRelations:r,connections:l,total:i,parentEntityUri:s}=e;const c=Ft(),{selectors:u}=E.ZP,p=(0,a.useSelector)(u.getEntity),d=(0,a.useSelector)(u.getMode),m=n["text-empty"]||b().text("No data found");return t?o().createElement(R.Z,null):(0,g.KIu)(d)?o().createElement(gt,{connections:l,className:c.list,key:null==p?void 0:p.uri,config:n,mode:d,noDataText:m,parentEntityUri:s}):i>0?o().createElement(_t,{config:n,loadRelations:r,connections:l,className:c.list,key:null==p?void 0:p.uri,mainEnityUri:p.uri}):o().createElement(_.Typography,{className:c.noData},m)},Bt=(0,Y.Z)({container:{flexGrow:1,display:"flex",flexDirection:"column",minHeight:0},content:{position:"relative",display:"flex",flexGrow:1,flexDirection:"column",minHeight:0},pagination:{height:"52px",flexGrow:0,flexShrink:0}}),Wt=e=>{let{config:t,className:n}=e;const l=Bt(),{page:s,setPage:c,rowsPerPage:u,sortOrder:p,sortOption:d,showInactive:m,searchQuery:f,changeSearchQuery:b}=(0,r.useContext)(Te),{selectors:h}=E.ZP,y=(0,a.useSelector)((e=>h.getConnectionsWithDraftsByViewId(e,t.id))),v=(0,a.useSelector)(h.getEntity),x=(0,a.useSelector)((e=>h.getTotalByViewId(e,t.id))),O=(0,a.useSelector)(h.getMode),w=(0,r.useMemo)((()=>({order:p,field:d})),[p,d]);(0,r.useEffect)((()=>{b("")}),[null==v?void 0:v.uri]);const S=(0,r.useMemo)((()=>(e=>{const t=g.wSh.fromFalsy(e).map(g.zHo).map((e=>`containsWordStartingWith(entity.label,${e}) or containsWordStartingWith(relation.label,${e})`)).orSome("");return(new g.MEy).addClause(t).build()})(f)),[f]),{isLoading:C,reload:P}=(0,Oe.a)({sorting:w,filter:S,page:s,rowsPerPage:u,config:t,entity:v,relationActivityFilter:m?g.Ng6.ALL:g.Ng6.ACTIVE_ONLY,mode:O}),N=(0,r.useMemo)((()=>(0,g.Px$)(y)),[y]),T=(0,r.useMemo)((()=>({reloadRelations:P,config:(0,i.pick)(["content","importFromDT","maxDtssImport"],t)})),[P,t]);return o().createElement(we.X.Provider,{value:N},o().createElement(H.Z,{className:n},o().createElement("div",{className:l.container},o().createElement(Ae.Provider,{value:T},o().createElement(ze,{title:t.caption,total:x})),o().createElement("div",{className:l.content},o().createElement(zt,{isLoading:C,config:t,loadRelations:P,connections:y,total:x}),x>u&&o().createElement(V.Z,{classes:{root:l.pagination},count:x,rowsPerPageOptions:[],rowsPerPage:u,page:s,onChangePage:c})))))};Wt.displayName="RelationsView";const Gt=o().createContext(null);Gt.displayName="SingleAttributeContext";var qt=n(86361),Yt=n(26180),$t=n(31276);function Qt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Xt(e,t,n[t])}))}return e}function Xt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Kt="CHANGE_SEARCH_QUERY",Jt=Qt({},Yt.ZP.actions,{changeSearchQuery:(0,$t.zD)(Kt)}),en=(e,t)=>t.type===Kt?Qt({},e,{searchQuery:t.payload,page:0}):Yt.ZP.reducer(e,t);var tn=n(92332),nn=n(67353);const rn={textDecoration:"line-through",color:"rgba(0,0,0,.54)"},on=(0,Y.Z)((()=>({tableContainer:{height:"477px",display:"flex",fontFamily:"Roboto",color:"rgba(0,0,0,0.54)"},rowCell:{fontSize:"13px",overflow:"hidden"},"row-cell--sorted":{color:"rgba(0,0,0,0.87)"},"row-cell__buttons-container":{position:"absolute"},"row-cell__buttons-wrapper":{display:"flex",paddingLeft:"10px","& > button":{marginLeft:"-10px",transform:"scale(0.9)"}},headCell:{display:"flex",alignItems:"center",height:"100%",fontSize:"12px"},"row-cell--removed":{pointerEvents:"none","& > div":rn}}))),an=(0,nn.Z)((e=>{const t=on();return o().createElement("div",{className:t.headCell},o().createElement(tn.default,e))}));var ln=n(64091);function sn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const cn=(0,i.pipe)((0,i.map)((e=>({id:(0,g.Tde)(e.uri),label:e.label,dataTypeDefinition:(0,g.PFL)(e)}))),(0,i.uniqBy)((0,i.prop)("id"))),un=(0,i.pipe)(g.DK$,cn),pn=(0,i.pipe)((0,i.split)("."),(0,i.slice)(2,1/0)),dn=e=>{if((0,g.vZp)(e)){const t=pn(e);return t.length>1?t.slice(0,-1):null}return null},mn=(0,i.map)((e=>function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){sn(e,t,n[t])}))}return e}({},e,{sortable:!0,resizable:!0,nestedPath:dn(e.id),headCellRenderer:an,rowCellValueRenderer:ln.Z})));var gn=n(99341);function fn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var bn=n(52016),hn=n(1876),yn=n(60894);const En=(0,Y.Z)((()=>({header:{padding:"0 4px 0 16px"}}))),vn=e=>{let{title:t,searchQuery:n,onChangeSearchQuery:r,filtersEnabled:a,onToggleFilters:l,columnsData:i,selectedColumns:s,onChangeColumns:c}=e;const u=En();return o().createElement(F.Z,{title:t,className:u.header},o().createElement(G.i,{query:n,onChange:r}),o().createElement(hn.Z,{enabled:a,onClick:l}),o().createElement(B.Z,{height:24,margin:4}),o().createElement(yn.Z,{columnsData:i,selectedColumns:s,onChangeColumns:c}))};function xn(){return xn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},xn.apply(this,arguments)}const On=(0,n(32528).Z)(((e,t)=>{let{deletedUris:n}=e,{rowValue:{value:r}}=t;return{isRemoved:Boolean(n.find((e=>r.uri===e)))}}))((e=>{let{cell:t,CellValueRenderer:n,isRemoved:r,isSorted:a}=e,l=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["cell","CellValueRenderer","isRemoved","isSorted"]);const i=on();return o().createElement("div",{className:A()({[i["row-cell--sorted"]]:a,[i["row-cell--removed"]]:r},i.rowCell)},t.values.map(((e,t)=>o().createElement(n,xn({key:t,value:e},l)))))}));var wn=n(85709);const Sn=e=>{let{onEdit:t,onRemove:n}=e;return o().createElement(o().Fragment,null,t&&o().createElement(Ce.k,{tooltipTitle:b().text("Edit"),icon:We.Z,size:"L",onClick:t}),n&&o().createElement(Ce.k,{tooltipTitle:b().text("Remove"),icon:Ge.Z,size:"L",onClick:n}))};function Cn(){return Cn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Cn.apply(this,arguments)}const Pn=e=>{let{columnsData:t,values:n,sorting:l,onSort:s,filters:c,onFilter:u,config:p,onEdit:d,onDeleteAttribute:m,deletedUris:f}=e;const b=(0,r.useMemo)((()=>((e,t)=>e.map((e=>(0,i.pipe)((0,i.reduce)(((t,n)=>{let{id:r}=n;return(0,i.assoc)(r,((e,t)=>((e,t)=>(0,i.pipe)((0,i.path)(["value"]),(0,g.tT_)(e))(t))(pn(e),t))(r,e),t)}),{}),(0,i.assoc)("value",e))(t))))(n,t)),[n,t]),h=(0,r.useMemo)((()=>mn(t)),[t]),y=on(),v=(0,a.useSelector)(E.ZP.selectors.getMode),x=(0,g.KIu)(v),O=(0,a.useSelector)(E.ZP.selectors.getMetadata),w=(0,a.useSelector)(E.ZP.selectors.getEntityUri),S=(0,a.useSelector)((e=>E.ZP.selectors.getModifiedEntity(e,w)||{})),{attributeType:C}=(0,r.useContext)(Gt),P=(0,r.useCallback)((e=>o().createElement(On,Cn({},e,{isSorted:!!l&&l.field===e.columnData.id}))),[l]),[N,T]=(0,r.useState)(null),{canUpdate:I,canDelete:k}=(0,bn.l)(),R=(0,r.useMemo)((()=>"number"!=typeof N||!x||f.includes((0,i.pipe)((0,i.path)([N]),(0,i.prop)("uri"))(n))),[N,f,n,x]),Z="number"==typeof N&&(D=(0,i.path)([N],n),k(p)&&(0,g.xv5)({attributeType:C,mode:v,attributeValue:D,metadata:O,isReltioCrosswalk:(0,g.KVV)(S.crosswalks,D)}));var D;const j="number"==typeof N&&(e=>I(p)&&(0,g.yv0)({attributeType:C,mode:v,attributeValue:e,isReltioCrosswalk:(0,g.KVV)(S.crosswalks,e)}))((0,i.path)([N],n)),A=(0,r.useCallback)((()=>{const e=(0,i.path)([N],n);j&&d(e)}),[d,N,n,j]),L=(0,r.useCallback)((()=>{const e=(0,i.path)([N],n);if(!Z)return;const t={parentUri:w,attributeType:C,uri:e.uri,value:e};m(t),T(null)}),[N,n,m,Z,C,w]),M=R||!Z&&!j?void 0:o().createElement(Sn,{onEdit:j?A:void 0,onRemove:Z?L:void 0}),U=(0,r.useMemo)((()=>({deletedUris:f})),[f]);return o().createElement("div",{className:y.tableContainer},o().createElement(wn.Z,{columnsData:h,rowsData:b,sorting:l,onSort:s,filters:c,onFilter:u,hoverStateEnabled:!0,defaultColumnWidth:250,defaultColumnMinWidth:200,headRowHeight:56,renderRowCell:P,onRowHover:T,hoverRowIndex:N,hoveredRowRightContent:M,context:U,classes:{hoveredRowRightContentWrapper:y["row-cell__buttons-wrapper"],hoveredRowRightContentContainer:y["row-cell__buttons-container"]}}))},Nn=(0,Y.Z)((()=>({actionButtons:{display:"flex",justifyContent:"flex-end",margin:"0 8px 10px","& > button":{fontSize:"14px",lineHeight:"16px",marginLeft:"8px",padding:"10px 8px",backgroundColor:"rgba(98, 2, 238, 0)"}}})));function Tn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const In=e=>{let{onChangeAttribute:t,onCancel:n,onApply:l,onDeleteAttribute:s,hasChanges:c,attributeValue:u}=e;const d=Nn(),m=(0,a.useSelector)(E.ZP.selectors.getEntityUri),{attributeType:f}=(0,r.useContext)(Gt),h=(0,a.useSelector)((e=>E.ZP.selectors.getModifiedEntity(e,m)||{})),y=(0,a.useSelector)(E.ZP.selectors.getMode),v=(0,a.useDispatch)(),x=(0,r.useContext)(p.m),O=(0,r.useCallback)((e=>(0,i.pipe)(E.N5.actions.addAttributes,v)(e.map((e=>function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Tn(e,t,n[t])}))}return e}({},e,{viewId:x}))))),[x,v]),w=(0,g.ZiX)(m),S=(0,a.useSelector)((e=>E.ZP.selectors.getActiveErrorsForAttributesPager(e,m,f))),C=(0,r.useCallback)((0,i.pipe)(E.N5.errors.actions.errorDeactivated,v),[v]);return o().createElement(o().Fragment,null,o().createElement(ne.Z,{attributeValue:u,showEmptyEditors:w,onDeleteAttribute:s,onDeactivateError:C,onChangeAttribute:t,onAddAttributes:O,mode:y,crosswalks:h.crosswalks,errors:S,attributeType:f,ownError:(0,g.ADq)(u,null,f.uri,S)}),o().createElement("div",{className:d.actionButtons},o().createElement(_.Button,{onClick:()=>{n(u)}},b().text("Cancel")),o().createElement(_.Button,{color:"primary",disabled:!c,onClick:()=>{l(u)}},b().text("Apply"))))},kn=(0,Y.Z)((()=>({root:{display:"flex",flexDirection:"column"},content:{position:"relative",padding:"4px 16px 9px",flex:1,overflow:"auto"},noData:{fontSize:"13px",paddingLeft:"20px",color:"rgba(0,0,0,0.54)"},tableContainer:{height:"477px",display:"flex",fontFamily:"Roboto",color:"rgba(0,0,0,0.54)"},header:{padding:"0 4px 0 16px"},addButton:{padding:"9px 16px 9px 12px",backgroundColor:"rgba(98, 2, 238, 0)",marginBottom:"4px"},buttonLabel:{fontSize:"14px",fontWeight:500,lineHeight:"16px"},icon:{fontSize:"18px",marginRight:"8px"},editor:{padding:"4px 16px"}})));function Rn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Zn(e,t,n[t])}))}return e}function Zn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Dn=[],jn=e=>{let{config:t,className:n}=e;const{caption:l,max:s}=t,c=kn(),{values:u,page:d,setPage:m,isLoading:f,searchQuery:h,setSearchQuery:y,visibleColumns:v,onFilter:x,onSort:O,onToggleFilters:w,onChangeColumns:S,filters:C,sorting:P,totalVisibleValues:N,hasPaging:T,attributeType:I,showTable:k}=(0,r.useContext)(Gt),Z=(0,r.useMemo)((()=>un(I)),[I]),{checkHasChanges:D,onChangeAttribute:j,onDeleteAttribute:L,onAdd:M,onCancel:U,onApply:z,onStartEditing:B,modifiedValues:W,editingValues:G,deletedUris:q}=(()=>{const[e,t]=(0,r.useState)(),[n,o]=(0,r.useState)([]),l=(0,a.useSelector)(E.ZP.selectors.getMode);(0,r.useEffect)((()=>{o([]),t(null)}),[l]);const s=(0,a.useDispatch)(),c=(0,r.useContext)(p.m),{attributeType:u,values:d}=(0,r.useContext)(Gt),m=(0,a.useSelector)(E.ZP.selectors.getEntityUri),f=(0,a.useSelector)(E.ZP.selectors.getMetadata),b=(0,r.useCallback)((e=>{(0,i.pipe)(E.N5.actions.modifyAttribute,s)(Rn({},e,{viewId:c}))}),[c,s]),h=(0,r.useCallback)((e=>(0,i.pipe)(E.N5.actions.removeAttribute,s)(Rn({},e,{viewId:c}))),[c,s]),y=(0,r.useCallback)((()=>{const e=(0,g.gjI)({parentUri:m,attributeType:u});t(e.uri),b(Rn({},e,{value:(0,g.GPx)({attributeTypes:u.attributes,parentUri:e.uri,mode:l,metadata:f}),attributeType:u}))}),[m,u]),v=(0,r.useCallback)((e=>{o((t=>t.find((0,i.propEq)("uri",e.uri))?t:[...t,e]))}),[o]),x=(0,r.useCallback)((e=>{const r=n.find((0,i.propEq)("uri",e.uri));if(r){const t=Rn({},e,{value:r,attributeType:u,uri:e.uri});o((e=>(0,i.without)([r],e))),b(t)}else{const n={value:e,attributeType:u,uri:e.uri};t(null),h(n)}}),[h,b,o,n]),O=(0,r.useCallback)((e=>{t(null),o((t=>{const n=t.find((0,i.propEq)("uri",e.uri));return n?(0,i.without)([n],t):t}))}),[o,t]),w=(0,a.useSelector)((e=>E.ZP.selectors.getModifiedEntity(e,m)||{})),S=(0,g.KIu)(l),C=(0,g.xy8)(u),P=(0,i.pathOr)(Dn,[C,null==u?void 0:u.name],w),N=(0,r.useMemo)((()=>[...P.filter((0,i.pipe)((0,i.prop)("uri"),(0,i.both)(g.ZiX,(0,i.pipe)((0,i.equals)(e),i.not)))),...(0,i.map)((e=>P.find((0,i.propEq)("uri",e.uri))||e))(d)].map((e=>{var t;return null!==(t=n.find((0,i.propEq)("uri",e.uri)))&&void 0!==t?t:e}))),[P,n,e,d]),T=(0,r.useMemo)((()=>S?(0,i.pipe)((0,i.map)((0,i.prop)("uri")),(0,i.filter)((e=>!P.find((0,i.propEq)("uri",e)))))(d):[]),[P,d]),I=P.filter((t=>{let{uri:r}=t;return r===e||n.find((0,i.propEq)("uri",r))}));return{checkHasChanges:e=>n.find((0,i.propEq)("uri",e.uri))!==e,onChangeAttribute:b,onDeleteAttribute:h,onAdd:y,onCancel:x,onApply:O,onStartEditing:v,modifiedValues:N,editingValues:I,deletedUris:T}})(),Y=(0,a.useSelector)(E.ZP.selectors.getMode),$=(0,g.KIu)(Y),Q=$?W:u,{canCreate:X}=(0,bn.l)(),K=X(t)&&I&&(0,g.Vg3)({attributeType:I,mode:Y})&&!G.length,ee=(0,r.useMemo)((()=>v.map((e=>Z.find((0,i.propEq)("id",e))))),[v,Z]);return o().createElement(H.Z,{className:A()(c.root,n)},k?o().createElement(o().Fragment,null,o().createElement(vn,{title:l,total:N,columnsData:Z,selectedColumns:v,onChangeColumns:S,searchQuery:h,onChangeSearchQuery:y,filtersEnabled:!!C,onToggleFilters:w}),o().createElement("div",{style:{position:"relative"}},$&&o().createElement("div",{className:c.editor},K&&o().createElement(_.Button,{color:"primary",onClick:M,className:c.addButton},o().createElement(J.Z,{classes:{root:c.icon}}),o().createElement("div",{className:c.buttonLabel},b().text("Add"))),G.map((e=>o().createElement(In,{key:e.uri,attributeValue:e,onChangeAttribute:j,onDeleteAttribute:L,onCancel:U,onApply:z,hasChanges:D(e)})))),o().createElement(Pn,{columnsData:ee,config:t,values:Q,filters:C,onFilter:x,sorting:P,onSort:O,onEdit:B,onDeleteAttribute:L,deletedUris:q}),T&&o().createElement(V.Z,{count:N,rowsPerPageOptions:[],rowsPerPage:s,page:d,onChangePage:m}),f&&o().createElement(R.Z,null))):o().createElement(o().Fragment,null,o().createElement(F.Z,{title:l,className:c.header}),o().createElement(_.Typography,{className:c.noData},b().text("No data"))))};var An=n(58600);let Ln=0;const Mn=()=>Ln++,Un=e=>{const t={children:[],nodeId:Mn()};if(e.parentPaths)for(let n=0;n<e.parentPaths.length;n++){const r=e.parentPaths[n];let o=t;for(let t=r.length-1;t>=0;t--){const a=r[t],l=e.entities[a.entityUri],i=t===r.length-1,s={entity:l,children:[],nodeId:Mn(),expanded:!0,rootIndex:i?n+1:void 0};i&&(s.root=i),o.children.push(s),o=s}}return t.children},Hn=(0,Y.Z)((e=>({container:{fontSize:"13px",display:"flex",paddingTop:"6px",position:"relative"},title:{flexGrow:1,minHeight:"15px",color:e.palette.secondary.main,lineHeight:"15px"},link:{cursor:"pointer",color:e.palette.secondary.main,lineHeight:"15px"},selected:{fontWeight:"bold"},wrapper:{width:"100%"},avatar:{height:"16px",width:"16px",marginRight:"8px",marginLeft:"8px"},header:{padding:"0 4px 0 16px"},treeContainer:{flexGrow:1,display:"flex",flexDirection:"column",height:"100%",minHeight:"372px",maxHeight:"507px",overflow:"auto"},tree:{flexGrow:1,height:0},buttonsContainer:{flexShrink:0,marginLeft:"auto","& > * + *":{marginLeft:"-4px"}},button:{padding:"8px"}})));var Vn=n(1242);const _n=o().createContext(null);var Fn=n(55400);const zn=e=>{e.target.src=Vn},Bn=e=>{let{node:t}=e;const n=Hn(),l=(0,a.useDispatch)(),i=t.entity.uri,s=(0,a.useSelector)(E.ZP.selectors.getAbsoluteImagePath),c=(0,a.useSelector)(E.ZP.selectors.getMetadata),u=(0,r.useContext)(_n),p=(0,a.useSelector)(E.ZP.selectors.getUIPath),{uri:d}=(0,a.useSelector)(E.ZP.selectors.getEntity),m=(0,g.ChB)({uiPath:p,uri:i}),f=i===d,b=(0,r.useCallback)((()=>{l(E.ui.actions.openEntity({uri:i,viewId:u.id}))}),[l,u,i]),{entity:{label:h},nodeId:y}=t,v=(0,g.nt9)(c,t.entity.type)||{},x=(0,g.VD3)(c,v,"typeGraphIcon"),O=x&&(0,g.vPL)(s,x);return o().createElement("div",{className:n.wrapper,"data-node-id":y},o().createElement("div",{className:n.container},o().createElement(_.Avatar,{className:A()(n.avatar),src:O||Vn,onError:zn}),o().createElement("span",{className:A()(n.link,{[n.selected]:f})},o().createElement(Fn.Z,{to:m,onClick:b},h))))},Wn=((0,r.memo)(Bn),e=>{let{node:t}=e;return t.nodeId}),Gn=(0,Y.Z)((()=>({lineBlock:{height:"100%",position:"relative",display:"inline-block"},lineChildren:{height:"100%",position:"absolute",display:"inline-block"},rootIndex:{display:"flex",alignItems:"center",color:"rgba(0,0,0,0.54)",height:"100%"},verticalLine:{width:"1px",left:"50%",top:0,height:"50%",position:"absolute",backgroundColor:"rgba(0,122,193,0.3)"},horizontalLineRight:{height:"1px",top:"14px",left:"50%",width:"24%",position:"absolute",backgroundColor:"rgba(0,122,193,0.3)"},node:{minWidth:"100%",position:"relative",textAlign:"left",padding:"0 24px 0 18px",boxSizing:"border-box",whiteSpace:"normal","&:hover":{backgroundColor:"rgba(0,0,0,0.06)"}},nodeContent:{position:"absolute",top:0,bottom:0,paddingLeft:"18px",boxSizing:"border-box"},row:{display:"flex"},rowContents:{position:"relative",borderLeft:"none",paddingLeft:"4px",flex:"1 1 auto",width:0,display:"flex",verticalAlign:"middle",boxSizing:"border-box"},buttonWrapper:{display:"flex",paddingTop:"13px",width:"12px",cursor:"pointer"},collapsedButton:{transform:"rotate(-90deg)"},expandedButton:{transform:"rotate(0deg)"},button:{transition:"transform .15s ease",width:0,height:0,borderLeft:"4px solid transparent",borderRight:"4px solid transparent",borderTop:"4px solid rgba(0, 0, 0, 0.54)"},rowTitle:{flex:"1 1 auto",width:0,paddingRight:"11px"}})));function qn(){return qn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},qn.apply(this,arguments)}function Yn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $n(){return $n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$n.apply(this,arguments)}const Qn={nodeContentRenderer:e=>{const t=(0,i.omit)(["connectDragPreview","connectDragSource","isDragging","canDrop","canDrag","draggedNode","isSearchMatch","isSearchFocus","buttons","didDrop","children","treeId","isOver","parentNode","rowDirection"],e),{scaffoldBlockPxWidth:n,toggleChildrenVisibility:r,node:a,title:l,path:s,treeIndex:c,style:u}=t,p=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(t,["scaffoldBlockPxWidth","toggleChildrenVisibility","node","title","path","treeIndex","style"]),d=l,m=r&&!a.root&&a.children&&a.children.length>0,g=Gn();return o().createElement("div",$n({style:{height:"100%"}},p,{key:a.nodeId}),m&&a.expanded&&o().createElement("div",{style:{width:n-2},className:g.lineChildren}),o().createElement("div",{className:g.row,style:u},o().createElement("div",{className:g.rowContents},m&&o().createElement("div",{className:g.buttonWrapper,onClick:()=>{r({node:a,path:s,treeIndex:c})}},o().createElement("div",{"aria-label":a.expanded?"Collapse":"Expand",className:A()(g.button,a.expanded?g.expandedButton:g.collapsedButton)})),o().createElement("div",{className:g.rowTitle},"function"==typeof d?d({node:a,path:s,treeIndex:c}):d))))},treeNodeRenderer:e=>{const t=(0,i.omit)(["listIndex","swapFrom","swapLength","swapDepth","draggedNode","getPrevRow","connectDropTarget","isOver","canDrop","treeIndex","treeId","path","rowDirection"],e),{children:n,scaffoldBlockPxWidth:r,lowerSiblingCounts:a,node:l}=t,s=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(t,["children","scaffoldBlockPxWidth","lowerSiblingCounts","node"]),c=Gn(),u=a.length,p=[];a.forEach(((e,t)=>{p.push(o().createElement("div",{key:`pre_${1+t}`,style:{width:r},className:c.lineBlock},l.root&&o().createElement("div",{className:c.rootIndex},l.rootIndex,"."),t===u-1&&0!==t&&o().createElement(o().Fragment,null,o().createElement("div",{className:c.verticalLine}),o().createElement("div",{className:c.horizontalLineRight}))))}));const d=l.root?r-4:0,m=r*u-d,g={left:m,width:`calc(100% - ${m}px`},f=`${m+250}px`,b=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Yn(e,t,n[t])}))}return e}({},s.style,{width:f});return o().createElement("div",qn({},s,{className:c.node,style:b}),p,o().createElement("div",{className:c.nodeContent,style:g},n))},scaffoldBlockPxWidth:16,rowHeight:28,slideRegionSize:50};function Xn(){return Xn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Xn.apply(this,arguments)}const Kn=e=>{let{styles:t={}}=e,n=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["styles"]);return o().createElement("svg",Xn({width:"20",height:"20",viewBox:"0 0 20 20",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},n),o().createElement("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",fillOpacity:".54"},o().createElement("path",{d:"M14.5 5a1.5 1.5 0 110-3 1.5 1.5 0 010 3zm4 5a1.5 1.5 0 110-3 1.5 1.5 0 010 3zm-17 1a1.5 1.5 0 110-3 1.5 1.5 0 010 3zM4 4a2 2 0 110-4 2 2 0 010 4zm1 16a2 2 0 110-4 2 2 0 010 4zm4.5-6a4.5 4.5 0 110-9 4.5 4.5 0 010 9zm0-2a2.5 2.5 0 100-5 2.5 2.5 0 000 5zm6 5a1.5 1.5 0 110-3 1.5 1.5 0 010 3z",fill:"#000"})))},Jn=e=>{let{title:t,onGraphOpen:n}=e;const r=Hn();return o().createElement(F.Z,{title:t,className:r.header},o().createElement("div",{className:r.buttonsContainer},o().createElement(Ce.k,{className:r.button,tooltipTitle:b().text("Show Graph"),icon:Kn,onClick:n,size:"L"})))};var er=n(33165),tr=n(59601);const nr=(0,Y.Z)((()=>({root:{position:"relative"},bodyWrapper:{paddingTop:"21px"}})));function rr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){or(e,t,n[t])}))}return e}function or(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ar=n(14940);const lr=(0,Y.Z)({resizableHandleContainer:{position:"relative",width:"100%",height:"inherit"},resizableHandleVisibilityArea:{position:"absolute",top:0,left:0,width:"100%",height:"24px",zIndex:11,"&:hover $resizableHandle":{visibility:"visible"},".react-grid-item.static &:hover $resizableHandle":{visibility:"hidden"}},resizableHandle:{position:"absolute",width:"100%",display:"flex",justifyContent:"center",top:"-3px",zIndex:11,cursor:"move",visibility:"hidden"},dragIcon:{transform:"translateX(-50%) rotate(90deg)",color:"rgba(0, 0, 0, 0.3)"}}),ir=e=>{const t=t=>{const n=lr();return o().createElement("div",{className:n.resizableHandleContainer},o().createElement("div",{className:n.resizableHandleVisibilityArea},o().createElement("div",{className:A()("viewDraggableHandle",n.resizableHandle)},o().createElement(ar.Z,{className:n.dragIcon}))),o().createElement(e,t))};return t.displayName="WithResizableHandle",t},sr=(0,Y.Z)({stubView:{padding:"20px"},fullHeight:{height:"100%"},component:{boxSizing:"border-box",overflow:"auto",boxShadow:"none",borderRadius:"unset"}});var cr=n(29103),ur=n(83911),pr=n(79485),dr=n(22385);const mr=(0,i.pipe)((0,i.path)(["point","lat"]),(0,i.both)((0,i.gt)(90),(0,i.lt)(-90))),gr=(0,Y.Z)((()=>({root:{height:"100%",display:"flex",flexDirection:"column"},fullHeight:{height:"100%"},fullscreenBtn:{position:"absolute",right:"5px",top:"5px",zIndex:100}})));var fr=n(13074),br=n(24338);const hr=(0,Y.Z)((e=>({caption:{color:e.palette.text.secondary,fontSize:"13px"}}))),yr=hr,Er=e=>{let{totalImages:t}=e;const n=yr(),r=t>1?b().text("photos"):b().text("photo");return o().createElement(_.Typography,{variant:"caption",className:n.caption},`${t} ${r}`)};function vr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){xr(e,t,n[t])}))}return e}function xr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Or=e=>{let{config:t,attributeType:n,paging:r,requestNextPageOfAttributeValues:l}=e;const s=(0,a.useDispatch)(),c=(0,a.useSelector)(E.ZP.selectors.getEntity),u=(0,a.useSelector)((e=>E.ZP.selectors.getModifiedEntity(e,c.uri)||{})),p=(0,i.pathOr)([],["attributes",n.name],u),d=t.id;return o().createElement(o().Fragment,null,o().createElement(br.Z,{attributeValues:p,attributeType:n,onDeleteAttribute:e=>(0,i.pipe)(E.N5.actions.removeAttribute,s)(vr({},e,{viewId:d})),parentUri:u.uri,onChangeAttribute:e=>(0,i.pipe)(E.N5.actions.modifyAttribute,s)(vr({},e,{viewId:d})),imageSize:Cr,paging:r,requestNextPageOfAttributeValues:l}),o().createElement(Er,{totalImages:p.length}))},wr=(0,Y.Z)((e=>({container:{padding:"8px 16px"},noData:{fontSize:"13px",color:e.palette.text.secondary}}))),Sr=wr,Cr={imageMargin:4,imageWidth:162,imageHeight:162};var Pr=n(28741);const Nr=(0,Y.Z)((e=>({root:{display:"flex",flexDirection:"column"},matchesContainer:{position:"relative"},footer:{display:"flex",alignItems:"end",flexGrow:1,justifyContent:"flex-start",borderTop:"1px solid rgba(0,0,0, 0.12)",padding:"8px 16px",color:e.palette.primary.main,fontSize:"13px",letterSpacing:"0",lineHeight:"15px"},noData:{paddingLeft:"16px",paddingBottom:"16px",fontSize:"13px",color:"rgba(0,0,0,0.54)"}})));var Tr=n(49734),Ir=n(98808),kr=n(93428),Rr=n(30885);function Zr(){return Zr=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Zr.apply(this,arguments)}const Dr=e=>{let{config:t,match:n,onStartRequest:l,onFinishRequest:i}=e;const s=(0,a.useDispatch)(),c=(0,a.useSelector)(E.ZP.selectors.getMetadata),u=(0,a.useSelector)(E.ZP.selectors.getEntity),{canMerge:d,canMark:m}=(0,g.hXd)(c,t,n.object,u,n.matchRules),f=(0,r.useMemo)((()=>[n.object]),[n.object]),b={entity:u,entities:f,mode:Ir.N.iconButton,onStartRequest:l},h=(0,r.useContext)(p.m),y=(0,r.useCallback)((()=>{i(),s(E.N5.entity.actions.loadEntity({viewId:h,uri:u.uri}))}),[s,u.uri,i,h]);return o().createElement(o().Fragment,null,d&&o().createElement(kr.H,Zr({},b,{onFinishRequest:y})),m&&o().createElement(Rr.i,Zr({},b,{onFinishRequest:i})))},jr=e=>{let{config:t,entitiesMap:n,match:r,onFinishRequest:l,onStartRequest:i}=e;const s=(0,a.useSelector)(E.ZP.selectors.getMetadata),c=(0,a.useSelector)(E.ZP.selectors.getEntity);return o().createElement(Tr.M,{match:r,entity:c,entitiesMap:n,metadata:s,className:ft.U},o().createElement(bt.Z,{uri:(0,g.E_P)(c.uri,r.object.uri),relatedObjectUris:(0,g.wp9)(g.q7e.POTENTIAL_MATCH,{entityUri:c.uri,matchEntityUri:r.object.uri}),objectType:g.q7e.POTENTIAL_MATCH}),o().createElement(Dr,{match:r,config:t,onStartRequest:i,onFinishRequest:l}))},Ar={showTransitiveMatches:!0,showInactiveEntities:!1},Lr={order:"asc",field:"score"};var Mr;!function(e){e[e.Loading=0]="Loading",e[e.NoData=1]="NoData",e[e.Loaded=2]="Loaded"}(Mr||(Mr={}));const Ur=ir((e=>{let{className:t}=e;const n=sr();return o().createElement(H.Z,{className:A()(n.stubView,"viewDraggableHandle",t)},"NOT IMPLEMENTED")})),Hr=ir((e=>{let{className:t,config:n}=e;return o().createElement(L.Z,{className:t,caption:n.caption,excludeUris:n.excludeUris,includeUris:n.includeUris,attributesCount:n.attributesCount,pinnedAttributes:n.pinnedAttributes})})),Vr=ir((e=>{let{className:t,config:n}=e;const a=(e=>{const[t,n]=(0,r.useState)(""),[o,a]=(0,r.useState)(0),[l,i]=(0,r.useState)(!1),s=(0,r.useMemo)((()=>({page:o,searchQuery:t,showInactive:l})),[o,t,l]),c=ve(e,s,!0),u=(0,r.useCallback)((()=>{a(0),i((e=>!e))}),[]);return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){xe(e,t,n[t])}))}return e}({setSearchQuery:n,searchQuery:t,setPage:a,page:o,toggleShowInactive:u,showInactive:l},c)})(n);return o().createElement(M.Provider,{value:a},o().createElement(be,{config:n,className:t}))})),_r=ir((e=>{let{config:t,className:n}=e;const l=(e=>{var t;const{attributeUri:n}=e,o=(0,a.useSelector)(E.ZP.selectors.getMetadata),l=(0,r.useMemo)((()=>(0,g.zeJ)(o,n)),[o,n]),s=(0,r.useMemo)((()=>un(l)),[l]),c=(0,r.useMemo)((()=>({searchQuery:"",filters:null,sorting:void 0,visibleColumns:s.filter((0,i.pipe)((0,i.prop)("dataTypeDefinition"),g.YkM,i.not)).map((e=>{let{id:t}=e;return t})).slice(0,5),page:0})),[s]),[u,p]=(0,r.useReducer)(en,c),{searchQuery:d,filters:m,sorting:f,page:b}=u,h=(0,a.useSelector)(E.ZP.selectors.getIsEditableMode),y=(0,r.useMemo)((()=>{const e=((e,t)=>g.wSh.fromNull(t).map((t=>Object.entries(t).map((t=>{let[n,r]=t;const o=e.find((0,i.propEq)("id",n));return(0,gn.su)(o,r)})))).orSome([]))(s,m);return e.length?e:null}),[m,s]),v=(0,r.useMemo)((()=>(0,i.reject)(i.isNil,{filters:y,page:b,sorting:f,searchQuery:d})),[y,b,f,d]),{changeSearchQuery:x,changePage:O,toggleSort:w,changeFilter:S,toggleFilters:C,changeColumns:P}=(0,qt.o)({actions:Jt,dispatch:p}),N=ve(e,v,!1);return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){fn(e,t,n[t])}))}return e}({},u,{setSearchQuery:x,setPage:O,onSort:w,onFilter:S,onToggleFilters:C,onChangeColumns:P,showTable:Boolean(((null==N||null===(t=N.values)||void 0===t?void 0:t.length)||y||d||h)&&l&&!l.hidden)},N)})(t);return o().createElement(Gt.Provider,{value:l},t&&o().createElement(jn,{config:t,className:n}))})),Fr=ir((e=>{let{config:t,className:n}=e;const a=(e=>{var t;const n=(0,r.useMemo)((()=>Object.entries(e.sortOptions||{}).map((e=>{let[t,n]=e;return{value:t,label:n}}))),[e.sortOptions]),o=e.max||15,[a,l]=(0,r.useState)(0),[i,s]=(0,r.useState)(e.sortOrder||"asc"),[c,u]=(0,r.useState)(null===(t=n[0])||void 0===t?void 0:t.value),[p,d]=(0,r.useState)(""),[m,g]=(0,r.useState)(!1),f=(0,r.useCallback)((()=>{l(0),g((e=>!e))}),[]),b=(0,r.useCallback)((()=>{l(0),s((e=>"asc"===e?"desc":"asc"))}),[]),h=(0,r.useCallback)((e=>{l(0),u(e)}),[]);return{searchQuery:p,changeSearchQuery:(0,r.useCallback)((e=>{l(0),d(e)}),[]),sortOrder:i,toggleSortOrder:b,sortOption:c,changeSortOption:h,sortOptions:n,page:a,setPage:l,rowsPerPage:o,showInactive:m,toggleShowInactive:f}})(t);return o().createElement(Te.Provider,{value:a},o().createElement(Wt,{config:t,className:n}))})),zr=ir((e=>{let{config:t,className:n}=e;const a=(0,r.useRef)(),[l,s]=(0,r.useState)(null),{height:c,width:u,tooltip:p}=t,{html:d,visible:m,tooltip:g,customStyles:f,onClosePopup:b,message:h}=(0,er.E)(t),y=nr(),E=g||p;if((0,r.useEffect)((()=>{a.current&&d&&(a.current.innerHTML="",d.childNodes.forEach((e=>{a.current.appendChild(e)})),s(a.current))}),[d]),!m)return null;const v=(0,i.reject)(i.isNil,{width:u,height:c}),x=o().createElement("div",{ref:a,style:rr({},v,f),className:A()(y.root,n)});return o().createElement("div",{className:y.bodyWrapper},E?o().createElement(_.Tooltip,{title:E},x):x,o().createElement(tr.Z,{placement:"bottom",anchorEl:l,open:!!h,onClose:b},h))})),Br=ir((e=>{let{config:t,className:n}=e;const l=(0,a.useSelector)(E.ZP.selectors.getEntityUri),{treeData:i,setTreeData:s}=((e,t)=>{const n=(0,he._)(),[o,a]=(0,r.useState)([]);return(0,r.useEffect)((()=>((0,g.ZiX)(e)||n((0,g.RFJ)({uri:e,graphUri:t})).then(Un).then(a).catch((e=>{console.warn(e)})),()=>{a([])})),[e,t,n]),{treeData:o,setTreeData:a}})(l,t.graph.type),c=Hn(),u=(0,a.useDispatch)(),{id:p,graph:d}=t,m=(0,r.useCallback)((()=>{u(E.ui.actions.openGraph({viewId:p,graphType:d.type}))}),[u,p,d]),f=(0,r.useCallback)((e=>({title:o().createElement(Bn,{node:e.node})})),[]);return o().createElement(H.Z,{className:n},o().createElement(Jn,{onGraphOpen:m,title:t.caption}),o().createElement(_n.Provider,{value:t},o().createElement("div",{className:c.treeContainer},o().createElement("div",{className:c.tree},o().createElement(An.ZP,{isVirtualized:!1,treeData:i,canDrag:!1,theme:Qn,generateNodeProps:f,onChange:s,getNodeKey:Wn})))))})),Wr=ir((e=>{let{config:t,className:n}=e;const l=Nr(),s=(0,a.useSelector)(E.ZP.selectors.getEntity),c=(0,g.wwR)(s),[u,d]=(0,r.useState)(!1),m=(0,r.useCallback)((()=>{d(!0)}),[]),f=(0,r.useCallback)((()=>{d(!1)}),[]),{matches:h,entitiesMap:y,loadMatches:v,total:x}=(0,Pr.s)({enabled:!!c,entity:s,options:Ar,filter:"",page:0,sorting:Lr,rowsPerPage:3,onStartLoading:m,onFinishLoading:f}),w=(0,r.useCallback)((()=>{v()}),[v]),S=(0,a.useDispatch)(),C=(0,r.useContext)(p.m),P=(0,r.useCallback)((()=>{S(E.ui.actions.openPerspective({perspectiveId:"potentialMatches",viewId:C}))}),[S,C]),N=(0,r.useMemo)((()=>(0,g.NVY)(c,(0,i.map)(g.ev7,h))),[c,h]),{getCommentsCount:T}=(0,r.useContext)(O.h);(0,r.useEffect)((()=>{T(N)}),[T,N]);const I=x>3&&!(0,i.isEmpty)(h),k=u?Mr.Loading:(0,i.isEmpty)(h)?Mr.NoData:Mr.Loaded;return o().createElement(we.X.Provider,{value:y},o().createElement(H.Z,{className:A()(l.root,n)},o().createElement(F.Z,{title:t.caption}),o().createElement("div",{className:l.matchesContainer},k===Mr.Loading&&o().createElement(R.Z,null),k===Mr.NoData&&o().createElement(_.Typography,{className:l.noData},b().text("No matches found")),k===Mr.Loaded&&h.map((e=>o().createElement(jr,{config:t,entitiesMap:y,match:e,onFinishRequest:w,onStartRequest:m,key:e.object.uri})))),I&&o().createElement(o().Fragment,null,o().createElement("div",{className:l.footer},o().createElement(_.Link,{component:"button",variant:"caption",onClick:P,underline:"none"},b().text("See all"))))))})),Gr=(0,r.lazy)((()=>n.e(6596).then(n.bind(n,46596)).then((e=>({default:ir(e.HierarchyTreeView)}))))),qr=(0,r.lazy)((()=>n.e(4361).then(n.bind(n,14361)).then((e=>({default:ir(e.RelationshipsTableView)}))))),Yr=ir((e=>{let{config:t,isFullscreen:n,onToggleFullscreen:l,className:i}=e;const s=gr(),c=(0,a.useSelector)(E.ZP.selectors.getMetadata),u=(0,a.useSelector)(E.ZP.selectors.getEntity),p=(0,a.useSelector)(E.ZP.selectors.getGoogleMapKey),{markers:d,loading:m}=((e,t,n)=>{const[o,a]=(0,r.useState)([]),[l,i]=(0,r.useState)(!0),s=(0,he._)();return(0,r.useEffect)((()=>{i(!0),s((0,g.DBr)(t,[e],n)).then((e=>{a(e.filter(mr))})).catch((()=>{a([])})).finally((()=>{i(!1)}))}),[e,t,n,s]),{markers:o,loading:l}})(u,c,p),f=(0,r.useMemo)((()=>o().createElement("div",{className:s.fullHeight},o().createElement(R.Z,null))),[s]),b=(0,r.useMemo)((()=>({lat:0,lng:0})),[]);return p&&o().createElement(H.Z,{className:A()(s.root,i)},m&&o().createElement(R.Z,null),o().createElement(dr.Z,{size:"S",icon:n?ur.Z:cr.Z,onClick:()=>l(t.id),className:s.fullscreenBtn}),o().createElement(pr.Z,{loadingElement:f,defaultZoom:1,defaultCenter:b,markers:d,mapContainerClassName:s.fullHeight,mapKey:p}))})),$r=ir((e=>{let{config:t,className:n}=e;const{attributeUri:l}=t,s=Sr(),c=(0,a.useDispatch)(),u=(0,a.useSelector)(E.ZP.selectors.getMode),p=(0,a.useSelector)(E.ZP.selectors.getEntityWithDiff),d=(0,a.useSelector)(E.ZP.selectors.getMetadata),m=(0,g.zeJ)(d,l),f=(0,i.pathOr)([],["attributes",null==m?void 0:m.name],p),h=(0,i.path)(["attributes","paging",l],p),y=f.length,v=t["text-empty"]||b().text("No data found"),x=(0,r.useCallback)((e=>c(E.N5.actions.requestNextPageOfAttributeValues(e))),[c]);return o().createElement(H.Z,{className:n},o().createElement(F.Z,{title:t.caption}),o().createElement("div",{className:s.container},(()=>{if(m){if((0,g.KIu)(u)){const e={attributeType:m,config:t,paging:h,requestNextPageOfAttributeValues:x};return o().createElement(Or,e)}if(y>0){const e={attributeValues:f,attributeType:m,imageSize:Cr,paging:h,parentUri:p.uri,requestNextPageOfAttributeValues:x};return o().createElement(o().Fragment,null,o().createElement(fr.Z,e),o().createElement(Er,{totalImages:y}))}}return o().createElement(_.Typography,{className:s.noData},v)})()))}));class Qr{}Qr.ViewTypes=g.ZIY,Qr.getComponentBy=(e,t)=>{let{store:n,config:r,className:a,isFullscreen:l,onToggleFullscreen:i}=t;switch(r[e]){case Qr.ViewTypes.HierarchyTree:return o().createElement(Gr,{config:r,store:n,className:a});case Qr.ViewTypes.HierarchyPaths:return o().createElement(Br,{config:r,className:a});case Qr.ViewTypes.RelationsTable:return o().createElement(qr,{config:r,store:n,className:a});case Qr.ViewTypes.Relations:return o().createElement(Fr,{config:r,className:a});case Qr.ViewTypes.Attributes:return o().createElement(Hr,{className:a,config:r});case Qr.ViewTypes.SingleAttributeView:return o().createElement(Vr,{config:r,className:a});case Qr.ViewTypes.TableAttributeView:return o().createElement(_r,{config:r,className:a});case Qr.ViewTypes.MapView:return o().createElement(Yr,{config:r,isFullscreen:l,onToggleFullscreen:i,className:a});case Qr.ViewTypes.CustomView:return o().createElement(zr,{config:r,className:a});case Qr.ViewTypes.ImageAttributeView:return o().createElement($r,{config:r,className:a});case Qr.ViewTypes.PotentialMatchesView:return o().createElement(Wr,{config:r,className:a})}},Qr.getComponent=e=>Qr.getComponentBy("class",e)||Qr.getComponentBy("react-class",e)||o().createElement(Ur,{className:e.className});const Xr=Qr,Kr=()=>null,Jr=(0,r.memo)((e=>{let{config:t,store:n,isFullscreen:a,isAutosize:l,onToggleFullscreen:i}=e;const s=sr();return o().createElement(r.Suspense,{fallback:o().createElement(Kr,null)},Xr.getComponent({config:t,store:n,className:A()(s.component,{[s.fullHeight]:!l}),isFullscreen:a,onToggleFullscreen:i}))}));Jr.displayName="ViewComponent";const eo=(0,Y.Z)((e=>({item:e.basicView,fixedSizeContainer:{height:"100%"}})));function to(){return to=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},to.apply(this,arguments)}const no=["onConfigChanged","onRemove"],ro=e=>{let{layoutItemConfig:t,views:n,className:l,children:s,style:c,isFullscreen:u,onToggleFullscreen:p,AutosizeComponent:d}=e,m=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["layoutItemConfig","views","className","children","style","isFullscreen","onToggleFullscreen","AutosizeComponent"]);const g=n.find((e=>{let{id:n}=e;return t.i===n})),f=eo(),{store:b}=(0,r.useContext)(a.ReactReduxContext);if(!g)return null;const h=g.class===Xr.ViewTypes.CustomView;return o().createElement("div",to({},(0,i.omit)(no,m),{style:c,className:A()(l,{[f.item]:!h})}),o().createElement("div",{className:A()({[f.fixedSizeContainer]:!d})},d,o().createElement(Jr,{store:b,config:g,isFullscreen:u,onToggleFullscreen:p,isAutosize:Boolean(d)})),s)},oo=e=>{let{views:t,layout:n,layoutOptions:r,onLayoutChanged:a}=e;return o().createElement(D.Z,{LayoutItem:ro,views:t,layout:n,layoutOptions:r,onLayoutChanged:a,draggableHandle:".viewDraggableHandle"})};var ao=n(57304),lo=n(3409),io=n(93873),so=n(22860),co=n(72753),uo=n(43576);function po(){return po=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},po.apply(this,arguments)}const mo=e=>{let{styles:t={}}=e,n=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["styles"]);return o().createElement("svg",po({width:"19",height:"17",viewBox:"0 0 19 17",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},n),o().createElement("defs",null,o().createElement("path",{d:"M14 17v2H4v-2h10zm6-4v2H4v-2l12.884.001H17l.116-.002L20 13zm-8.457-2H4V9h5.82a8.465 8.465 0 001.723 2zM9.139 6.178l-.289.733.035.088L4 7V5l5.713-.002c-.22.375-.412.768-.574 1.18zM17 2.82a6.451 6.451 0 00-6 4.09 6.451 6.451 0 006 4.092 6.451 6.451 0 006-4.091 6.451 6.451 0 00-6-4.091zm0 6.815a2.728 2.728 0 010-5.455 2.728 2.728 0 010 5.455zm0-4.365c-.905 0-1.636.73-1.636 1.636 0 .906.73 1.637 1.636 1.637.905 0 1.636-.731 1.636-1.637 0-.905-.73-1.636-1.636-1.636z",id:"svg1467685497a"})),o().createElement("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},o().createElement("g",{transform:"translate(-4 -2.5)"},o().createElement("mask",{id:"svg1467685497b",fill:"#fff"},o().createElement("use",{xlinkHref:"#svg1467685497a"})),o().createElement("path",{fillOpacity:".54",fill:"#000",mask:"url(#svg1467685497b)",d:"M0 0h24v24H0z"}))))},go=(0,Y.Z)({editingButtons:{display:"flex","& button + button":{width:"88px",marginLeft:"8px"}},searchResults:{width:"150px",height:"25px",backgroundColor:"#ccc"},comments:{display:"flex",justifyContent:"flex-end",marginTop:"10px"}}),fo=e=>o().createElement(_.SvgIcon,e,o().createElement(mo,null)),bo=(e,t,n,r,o)=>e.filter((e=>{let{value:a,permission:l}=e;return!(n&&!(0,g.KIu)(a))&&!!(r&&o||!(0,g.fnZ)(a))&&(0,g.uGe)(l,t)})),ho=e=>{let{className:t}=e;const n=go(),l=(0,a.useDispatch)(),i=(0,a.useSelector)(E.ZP.selectors.getCanUserStartProcessFromQuery),s=(0,a.useSelector)(E.ZP.selectors.getEntityWithoutDiff),c=(0,a.useSelector)((e=>E.ZP.selectors.getModifiedEntity(e,s.uri))),u=(0,a.useSelector)(E.ZP.selectors.getMetadata),p=(0,a.useSelector)(E.ZP.selectors.isWorkflowEnabled),d=(0,a.useSelector)(E.ZP.selectors.getMode),m=(0,a.useSelector)(E.ZP.selectors.getIsEditableMode),f=(0,a.useSelector)(E.ZP.selectors.getIsViewMode),h=(0,a.useSelector)(E.ZP.selectors.getIsHistoryModeEnabled),y=(0,a.useSelector)(E.ZP.selectors.getProfileOperation)===g.OXy.Saving,v=null==s?void 0:s.type,x=(0,r.useMemo)((()=>[{label:b().text("Editing"),value:g.fO_.EDITING,description:b().text("Edit profile directly"),icon:uo.Z,permission:"UPDATE"},{label:b().text("Suggesting"),value:g.fO_.SUGGESTING,description:b().text("Suggest changes and initiate a workflow review"),icon:fo,permission:"INITIATE_CHANGE_REQUEST"},{label:b().text("Viewing"),value:g.fO_.VIEWING,description:b().text("Suggest changes and initiate a workflow review"),icon:co.Z,permission:"READ"}]),[]),O=(0,r.useMemo)((()=>[{label:b().text("Delete"),value:"Delete",description:b().text("Permanently delete profile"),icon:Ge.Z,onClick:()=>{window.confirm(b().text("Are you sure you want to delete this?"))&&l(E.N5.entity.actions.entityRemoveRequested({entityUri:s.uri}))},permission:"DELETE"}]),[l,s.uri]),w=(0,r.useMemo)((()=>(0,g.nt9)(u,v)||{}),[u,v]),S=!h&&!(0,g.biM)(s)&&!(e=>(0,g.uGe)(g.BDP.READ,e)&&!(0,g.uGe)(g.BDP.UPDATE,e)&&!(0,g.uGe)(g.BDP.DELETE,e)&&!(0,g.uGe)(g.BDP.INITIATE_CHANGE_REQUEST,e))(w),C=(0,g.ZiX)(null==s?void 0:s.uri),P=(0,r.useMemo)((()=>bo(x,w,C,p,i)),[x,w,p,i,C]),N=(0,r.useMemo)((()=>bo(O,w,C,p,i)),[O,w,p,i,C]),T=(0,r.useCallback)((e=>{l(E.N5.mode.actions.modeUpdated(e))}),[l]),I=(0,r.useCallback)((()=>{l(E.N5.mode.actions.modeCancelEditing())}),[l]),k=(0,r.useCallback)((()=>{l(E.N5.actions.saveProfile())}),[l]);return o().createElement(ao.Z,{className:A()(t,ft.U),entity:m&&c?c:s},o().createElement(_.Box,{display:"flex",alignItems:"center"},o().createElement(_.Box,{mr:3},m&&o().createElement(_.Box,{className:n.editingButtons},o().createElement(_.Button,{variant:"outlined",onClick:I,"data-reltio-id":"reltio-profile-cancel-editing",disabled:y},b().text("Cancel")),o().createElement(_.Button,{variant:"contained",color:"primary","data-reltio-id":"reltio-profile-save-profile",onClick:k,disabled:y},(0,g.fnZ)(d)?b().text("Suggest"):b().text("Save"))),h&&f?o().createElement(lo.Z,null):f&&o().createElement(io.a,null)),S&&o().createElement(so.T,{optionsGroup:P,buttonsGroup:N,value:d,onChange:T,disabled:y})),o().createElement(_.Box,{className:n.comments},o().createElement(bt.Z,{uri:s.uri,relatedObjectUris:(0,g.wp9)(g.q7e.ENTITY,{entityUri:s.uri}),objectType:g.q7e.ENTITY})))};var yo=n(71820),Eo=n(85890),vo=n(26789),xo=n(54362),Oo=n(6674),wo=n(91515),So=n(52043),Co=n(17308),Po=n(39827),No=n(80147),To=n(76569);const Io=(0,Y.Z)({wrapper:{display:"flex",overflow:"hidden",marginLeft:"auto",flexShrink:0},badge:{fontSize:"12px",height:"18px",minWidth:"18px",backgroundColor:"#FF4081",color:"#FFF"},badgePosition:{right:"5px"}}),ko=()=>{const{total:e}=(0,r.useContext)(I.O),t=Io();return o().createElement(_.Badge,{badgeContent:e,classes:{anchorOriginTopRightRectangle:t.badgePosition,badge:t.badge}},o().createElement(To.Z,null))};var Ro=n(26313),Zo=n(9371),Do=n(4426);const jo=(0,Y.Z)({wrapper:{overflow:"auto",paddingRight:"12px"},showMoreLink:{display:"flex",margin:"16px"},showMoreIcon:{fontSize:"1rem"}}),Ao=()=>{const e=jo(),{getComments:t,comments:n,pageToken:l}=(0,r.useContext)(O.h),i=(0,a.useSelector)(E.ZP.selectors.getEntityUriWithDataTenant);(0,r.useEffect)((()=>{t(i)}),[t,i]);const s=(0,Ro.Q)(n);return o().createElement(we.X.Provider,{value:s},o().createElement(_.Box,{className:e.wrapper},n.map((e=>{const{objectId:t,relatedObjectUris:n,objectType:r,commentId:a}=e;return o().createElement(Zo.J,{key:a,uri:t,relatedObjectUris:n,objectType:r,comment:e})})),l&&o().createElement(_.Link,{component:"button",variant:"caption",className:e.showMoreLink,onClick:()=>{t(i,l)},underline:"none"},o().createElement(Do.Z,{className:e.showMoreIcon}),b().text("Show more"))))};var Lo=n(34120);const Mo=(0,Y.Z)({wrapper:{overflow:"auto",position:"relative",height:"100%"}}),Uo=()=>{const e=Mo(),{tasks:t,loading:n}=(0,r.useContext)(I.O);return o().createElement("div",{className:e.wrapper},n&&o().createElement(R.Z,null),t&&t.map((e=>o().createElement(Lo.s,{key:e.taskId,task:e}))))};function Ho(){return Ho=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ho.apply(this,arguments)}const Vo=e=>{let{styles:t={}}=e,n=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["styles"]);return o().createElement("svg",Ho({width:"20",height:"20",viewBox:"0 0 20 20",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},n),o().createElement("defs",null,o().createElement("path",{d:"M4 17.17L5.17 16H20V4H4v13.17zM20 2c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H6l-4 4V4c0-1.1.9-2 2-2h16zm-3 9H7v2h10v-2zm0-4H7v2h10V7z",id:"svg2697213709a"})),o().createElement("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},o().createElement("g",null,o().createElement("g",{transform:"translate(-2 -2)"},o().createElement("mask",{id:"svg2697213709b",fill:"#fff"},o().createElement("use",{xlinkHref:"#svg2697213709a"})),o().createElement("path",{fillOpacity:".54",fill:"#000",mask:"url(#svg2697213709b)",d:"M0 0h24v24H0z"})))))},_o=()=>{const{commentsMap:e}=(0,r.useContext)(O.h),t=Io();return o().createElement(_.Badge,{badgeContent:(0,g.mdt)(e),classes:{anchorOriginTopRightRectangle:t.badgePosition,badge:t.badge}},o().createElement(Vo,null))};var Fo=n(10159);const zo=()=>o().createElement(Fo.Z,{text:b().text("Ready to go with the flow?"),secondaryText:b().text("Suggest a change or submit a match review, and we’ll kick off a workflow task to get things going.")}),Bo=()=>o().createElement(Fo.Z,{text:b().text("Care to join the conversation?"),secondaryText:b().text("Leave comments for team members anywhere in the Profile page, and we’ll record it here.")});function Wo(){return Wo=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Wo.apply(this,arguments)}let Go;!function(e){e[e.Workflow=0]="Workflow",e[e.Collaboration=1]="Collaboration",e[e.History=2]="History"}(Go||(Go={}));const qo=e=>{if(e)return 1===e?b().text("${total} item",{total:e}):b().text("${total} items",{total:e})},Yo=()=>{var e,t,n;const l=Io(),s=(0,a.useSelector)(E.ZP.selectors.isWorkflowSideViewEnabled),c=(0,a.useSelector)(E.ZP.selectors.isWorkflowEnabled),u=(0,a.useSelector)(E.ZP.selectors.isCollaborationSideViewEnabled),p=(0,a.useSelector)(E.ZP.selectors.isCollaborationEnabled),d=(0,a.useSelector)(E.ZP.selectors.getHistoryEvent),m=(0,a.useSelector)(E.ZP.selectors.getMetadata),f=(0,a.useSelector)(E.ZP.selectors.getEntity),h=(0,r.useContext)(I.O),y=(0,r.useContext)(O.h),[v,x]=(0,r.useState)(null),w=(0,r.useCallback)((e=>{x((t=>t===e?null:e))}),[]),S=(0,r.useCallback)((()=>{x(null)}),[]),C=null!==v,P=v===Go.History,{isHistoryEnabled:N,isProfilePersisted:T}=(0,yo.C)({isHistoryTabActive:P,entity:f}),{historyFilter:k,onApplyFilter:R,onClearFilter:Z,isLoading:D,historicUris:j,historyWithTotal:A,canLoadMore:L,onLoadMore:M}=(0,Eo.k)({entity:f,enabled:N}),U=s&&c&&!(0,g.ZiX)(null==f?void 0:f.uri),H=u&&p,V=(0,g.mdt)(null==y?void 0:y.commentsMap),_=[{buttonProps:{id:Go.Workflow,icon:ko,tooltipTitle:b().text("Workflow")},content:null!=h&&h.total?o().createElement(Uo,null):o().createElement(zo,null),headerProps:{mainTitle:b().text("Workflow"),secondTitle:qo(null==h?void 0:h.total),rightContent:o().createElement(vo.G,null)},hidden:!U},{buttonProps:{id:Go.Collaboration,icon:_o,tooltipTitle:b().text("Collaboration")},content:V?o().createElement(Ao,null):o().createElement(Bo,null),headerProps:{mainTitle:b().text("Collaboration"),secondTitle:qo(V)},hidden:!H},{buttonProps:{id:Go.History,icon:No.Z,tooltipTitle:b().text("History")},content:T?o().createElement(xo.Z,{isLoading:D,historyWithTotal:A,contributorsUris:j,entityUri:null==f?void 0:f.uri,historyEvent:d,onLoadMore:M,canLoadMore:L}):o().createElement(Oo.Z,null),headerProps:{content:o().createElement(wo.Z,{total:T?((null==j?void 0:j.length)||0)+1:void 0,entityType:(0,g.nt9)(m,null==f?void 0:f.type),filter:k,onApplyFilter:R,onClearFilter:Z})}}],F=(0,i.reject)((0,i.propEq)("hidden",!0))(_);return(0,r.useEffect)((()=>{var e;null!==(e=_[v])&&void 0!==e&&e.hidden&&S()}),[v,_,S,F]),o().createElement("div",{className:l.wrapper},o().createElement(So.h,{open:C,width:480},!(null!==(e=_[v])&&void 0!==e&&e.hidden)&&o().createElement(o().Fragment,null,o().createElement(Co.P,Wo({},null===(t=_[v])||void 0===t?void 0:t.headerProps,{onClose:S})),null===(n=_[v])||void 0===n?void 0:n.content)),o().createElement(Po.G,{buttonsProps:(0,i.pipe)((0,i.reject)((0,i.propEq)("hidden",!0)),(0,i.pluck)("buttonProps"))(_),onButtonClick:w,activeIndexId:v}))};var $o=n(39781),Qo=n(16715);const Xo="48px",Ko="1px solid rgba(0, 0, 0, .125)",Jo=(0,Y.Z)((e=>({accordion:{borderTop:Ko,borderBottom:Ko,fontSize:"13px",boxShadow:"none","&:not(:first-child)":{borderTop:0},"&:before":{display:"none"},"&$accordionExpanded":{margin:"auto"}},accordionExpanded:{},accordionSummary:{display:"flex",alignItems:"center",height:Xo,minHeight:Xo,"&$accordionSummaryExpanded":{height:Xo,minHeight:Xo}},accordionSummaryHeading:{flex:1,fontSize:e.typography.pxToRem(13),fontWeight:e.typography.fontWeightRegular},accordionSummaryExpanded:{},accordionSummaryContent:{display:"flex",alignItems:"center"},accordionDetails:{maxHeight:"21vh",overflow:"auto",paddingTop:0,paddingBottom:0,"& ul":{paddingLeft:"23px",marginTop:"3px"},"& li":{paddingLeft:"9px",paddingBottom:"8px"}},parents:{color:e.palette.text.primary},errorsAccordion:{backgroundColor:"#FFF4F6",borderColor:"#FFB8B3"},errorsAccordionDetails:{color:"#DD2C00"},warningsAccordion:{backgroundColor:"#FFF9ED",borderColor:"#FFDD91"},warningsAccordionDetails:{color:"#CC7500"},icon:{marginRight:"8px"},errorIcon:{fill:"#FF1744"},warningIcon:{fill:"#F9A825"}}))),ea=Jo;var ta=n(38016);const na=(0,r.memo)((e=>{let{panels:t,expandedPanelId:n,onToggle:r,ErrorComponent:a}=e;const l=ea();return t.length>0?o().createElement("div",null,t.map((e=>{let{id:t,icon:i,title:s,items:c,accordionClassName:u,accordionDetailsClassName:p}=e;return o().createElement(_.Accordion,{key:t,square:!0,expanded:n===t,onChange:r(t),className:u,classes:{root:l.accordion,expanded:l.accordionExpanded}},o().createElement(_.AccordionSummary,{classes:{root:l.accordionSummary,expanded:l.accordionSummaryExpanded,content:l.accordionSummaryContent},expandIcon:o().createElement(ta.Z,null)},i,o().createElement(_.Typography,{className:l.accordionSummaryHeading},s)),o().createElement(_.AccordionDetails,{className:A()(l.accordionDetails,p)},o().createElement("ul",null,c.map(((e,t)=>o().createElement(a,{key:t,error:e}))))))}))):null}));na.displayName="ErrorsPanel";const ra=(0,i.omit)(["deactivated","path"]),oa=(0,r.memo)((e=>{let{error:t}=e;const n=ea(),r=((e,t)=>{let{type:n,source:r,message:o,attributeTypeUri:a="",attributeType:l}=t;if(n===g.NIO.missed&&r===g.zHr.local){const t=l||(0,g.zeJ)(e,a);return t?b().text("${attribute} is required",{attribute:t.label}):o}return o})((0,a.useSelector)(E.ZP.selectors.getMetadata),t),l=(e=>{let{path:t,uri:n}=e;return null==t?void 0:t.slice(0,n?t.length-1:t.length).filter((e=>{let{type:t}=e;return[g.HAc.attributeValue,g.HAc.relationConnection].includes(t)})).map((e=>{let{label:t}=e;return t})).filter(i.identity).join(" / ")})(t);return o().createElement("li",null,o().createElement("span",null,r),l&&o().createElement(o().Fragment,null,o().createElement("br",null),o().createElement("span",{className:n.parents},l)))}));oa.displayName="Error";const aa=()=>{const e=ea(),t=(e=>{const t=(0,r.useRef)(e);return function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return e.length===t.length&&(0,i.equals)(e.map(ra),t.map(ra))}(e,t.current)||(t.current=e),t.current})((0,a.useSelector)(E.ZP.selectors.getProfileErrors)),[n,l]=(0,r.useMemo)((()=>(0,i.partition)(g.IT0,t)),[t]),[s,c]=(0,r.useState)(null),u=(0,r.useMemo)((()=>[{id:"errors",title:b().text("${number} ${errors}",{number:n.length,errors:1===n.length?b().text("error"):b().text("errors")}),icon:o().createElement($o.Z,{className:A()(e.icon,e.errorIcon)}),items:n,accordionClassName:e.errorsAccordion,accordionDetailsClassName:e.errorsAccordionDetails},{id:"warnings",title:b().text("${number} ${warnings}",{number:l.length,warnings:1===l.length?b().text("warning"):b().text("warnings")}),icon:o().createElement(Qo.Z,{className:A()(e.icon,e.warningIcon)}),items:l,accordionClassName:e.warningsAccordion,accordionDetailsClassName:e.warningsAccordionDetails}].filter((e=>{let{items:t}=e;return t.length>0}))),[n,l,e]);(0,r.useEffect)((()=>{c("errors")}),[n]);const p=(0,r.useCallback)((e=>(t,n)=>{c(n?e:null)}),[]);return u.length>0?o().createElement(na,{panels:u,expandedPanelId:s,onToggle:p,ErrorComponent:oa}):null},la=(0,Y.Z)((e=>({perspectiveView:{position:"absolute",top:0,left:0,right:0,bottom:0,fontFamily:"Roboto, Helvetica, Arial, sans-serif",overflowX:"hidden",overflowY:"auto",display:"flex",flexDirection:"column",backgroundColor:e.palette.background.default},scrollWrapper:{flexGrow:1,overflowY:"auto"},emptyState:{backgroundColor:"#FAFAFA",height:"100%"},profileWrapper:e=>{let{maxWidth:t}=e;return{display:"flex",flexDirection:"column",overflow:"hidden",flexGrow:1,maxWidth:t?`${t}px`:"100%"}},profileContainer:{display:"flex",overflow:"hidden",flexGrow:1},"@global div[role=tooltip]":{fontFamily:"Roboto, Helvetica, Arial, sans-serif"},"@global div[role=presentation]":{fontFamily:"Roboto, Helvetica, Arial, sans-serif"}}))),ia=(0,r.memo)((e=>{let{config:t,saveState:n,getSavedState:l}=e;const i=la({maxWidth:null==t?void 0:t.maxWidth}),s=(0,a.useDispatch)(),c=(0,r.useRef)(),u=(0,r.useCallback)((0,g.DsO)(n,5e3),[n]),{isLoaded:p,savedState:d}=(0,v.a)(l),[m,f]=(0,r.useState)([]),[h,D]=(0,r.useState)([]),j=(0,r.useMemo)((()=>y()(t)),[t]),A=(0,a.useSelector)(E.ZP.selectors.getEntity),L=(0,a.useSelector)(E.ZP.selectors.getIsHistoryModeEnabled),M=(0,r.useMemo)((()=>(0,g.dvH)(A)),[A]),U=(0,x.C)({objectIds:M}),H=(0,r.useContext)(O.h),V=(0,w.U)(),_=(0,S.v)(null==t?void 0:t.workflow),F=(0,a.useSelector)(E.ZP.selectors.getHistoryEvent);(0,C.a)({entity:A,historyEvent:F});const z=(0,P.u)();(0,r.useEffect)((()=>{if(p){const e=j!==d.configHash,{views:n,layout:r}=(0,g.Mfk)({views:e||!d.views?t.views:d.views,layout:e?t.layout:d.layout});D(n),f(r)}}),[p]),(0,r.useEffect)((()=>{s(E.N5.views.actions.profileViewsSet(h))}),[s,h]),(0,r.useEffect)((()=>{t.sidePanelViews&&s(E.N5.sidePanelViews.actions.sidePanelViewsLoaded(t.sidePanelViews))}),[t]),(0,r.useEffect)((()=>{c.current&&(c.current.scrollTop=0)}),[null==A?void 0:A.uri]),(()=>{const e=(0,a.useDispatch)(),t=(0,a.useSelector)(E.ZP.selectors.getValidateReadMode),n=(0,a.useSelector)(E.ZP.selectors.getEntity)||{},{uri:o,updatedTime:l}=n,i=(0,g.biM)(n),s=(0,a.useSelector)(E.ZP.selectors.getMode),c=(0,a.useSelector)(E.ZP.selectors.getProfileViews),u=c&&c.length>0,p=(0,r.useCallback)((0,g.DsO)((t=>{t&&e(E.N5.actions.validateProfile())}),500),[e]);(0,r.useEffect)((()=>{const e=t&&!i&&o&&!(0,g.ZiX)(o)&&s===g.ARY.Viewing&&u;p(e)}),[p,i,t,l,o,s,u])})();const B=(0,r.useCallback)((e=>{u({layout:e,views:h,configHash:j}),f(e)}),[u,j,h]);return o().createElement(N.j.Provider,{value:!0},o().createElement(T.s.Provider,{value:V},o().createElement(O.h.Provider,{value:L?H:U},o().createElement(I.O.Provider,{value:_},o().createElement(k.m.Provider,{value:z},o().createElement("div",{className:i.perspectiveView},(!p||!(null!=A&&A.uri))&&o().createElement(R.Z,null),p&&null!=A&&A.uri?o().createElement("div",{className:i.profileContainer},o().createElement("div",{className:i.profileWrapper},o().createElement(ho,null),!L&&o().createElement(aa,null),o().createElement("div",{ref:c,className:i.scrollWrapper},o().createElement(oo,{layout:m,onLayoutChanged:B,views:h}))),o().createElement(Yo,null)):o().createElement("div",{className:i.emptyState},o().createElement(Z.ZP,{LogoRenderer:Z.B9.NO_DATA,text:b().text("No data to display."),variant:Z.tC.embedded}))))))))}));ia.displayName="ProfilePerspectiveView";const sa=(0,s.createGenerateClassName)({productionPrefix:"profilePerspective",disableGlobal:!0}),ca=e=>{let{config:t,store:n,onResize:f=i.identity,saveState:b,getSavedState:h,qxSandboxApi:y}=e;const E=(0,r.useCallback)((0,g.aYu)(h),[h]),v=(0,r.useMemo)((()=>(0,g.Vr9)(t)),[t]);return o().createElement(a.Provider,{store:n},o().createElement(p.m.Provider,{value:v.id},o().createElement(d.Y.Provider,{value:y},o().createElement(s.StylesProvider,{generateClassName:sa},o().createElement(u.MuiPickersUtilsProvider,{utils:l.Z},o().createElement(c.Z,{handleHeight:!0,onResize:(e,t)=>f(Math.floor(e),Math.floor(t))}),v&&o().createElement(ia,{config:v,saveState:b,getSavedState:E}),o().createElement(m.Z,{showErrorFromStore:!0}))))))};var ua=n(82842),pa=n(51229),da=n(91131);const ma=(0,Y.Z)((e=>({titleContainer:{overflow:"hidden",fontSize:"16px",fontWeight:"normal",whiteSpace:"nowrap",textOverflow:"ellipsis",alignItems:"center",display:"flex",minHeight:"48px",color:e.palette.text.secondary},link:{fontSize:"16px",fontWeight:"normal"},icon:{height:"18px",color:e.palette.text.secondary},totalCaption:{lineHeight:"inherit",fontSize:"14px",color:"rgba(0,0,0,0.6)",flexShrink:0,marginRight:"5px"},totalNumber:{fontSize:"16px",color:"rgba(0,0,0,0.87)",marginRight:"5px",fontWeight:500}}))),ga=e=>{let{total:t=0}=e;const n=ma(),l=(0,a.useDispatch)(),i=(0,r.useContext)(p.m),s=(0,r.useCallback)((()=>{l(E.ui.actions.openPerspective({perspectiveId:"profile",viewId:i}))}),[l,i]);return o().createElement(F.Z,{title:""},o().createElement("div",{className:n.titleContainer},o().createElement(_.Link,{component:"button",variant:"caption",className:n.link,onClick:s,underline:"none"},b().text("Profile")),o().createElement(da.Z,{className:n.icon}),b().text("Tags")),o().createElement(pa.Z,null),o().createElement(_.Typography,{className:n.totalCaption,variant:"caption"},o().createElement("span",{className:n.totalNumber},b().number(t,"0,0")),b().text("total profiles")))};var fa=n(20404);const ba=(0,Y.Z)((e=>({toolbar:{display:"flex",flexShrink:0,background:"white",borderBottom:"1px solid rgba(0,0,0,0.1)",boxSizing:"border-box",paddingLeft:"16px"},avatar:{color:"rgba(0, 0, 0, 0.38)",marginRight:"12px"},label:{fontSize:"20px",letterSpacing:"0.25px",lineHeight:"1.2",fontWeight:500,color:e.palette.text.primary,wordBreak:"break-word"}}))),ha=e=>{let{label:t}=e;const n=ba();return o().createElement(_.Toolbar,{className:n.toolbar},o().createElement(fa.Z,{className:n.avatar}),o().createElement(_.Typography,{variant:"h6",className:n.label},t))};function ya(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Ea(e,t,n[t])}))}return e}function Ea(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const va=(0,Y.Z)((e=>({perspectiveView:{position:"absolute",top:0,left:0,right:0,bottom:0,fontFamily:"Roboto, Helvetica, Arial, sans-serif",overflow:"hidden",display:"flex",flexDirection:"column",backgroundColor:e.palette.background.default},tagsContainer:{display:"flex"},fullHeight:{flexGrow:1,height:0},tagsView:{margin:"16px",width:"100%",paddingTop:"4px"},listContainer:{flex:1,display:"flex",overflow:"hidden",position:"relative",flexDirection:"column",minHeight:"4px"},entitiesList:{overflowY:"auto",flexGrow:1},pagination:{flexGrow:0}}))),xa=[25,50,100],Oa=(0,r.memo)((e=>{let{tag:t,entityUri:n}=e;const l=va(),[s,c]=(0,r.useState)(xa[0]),[u,p]=(0,r.useState)(0),d=(0,a.useSelector)(E.ZP.selectors.getGlobalSearchRequestOptions);(0,r.useEffect)((()=>{p(0)}),[t,n,d]);const{isLoading:m,total:f,entities:h}=(e=>{let{tag:t,entityUri:n,page:o=0,rowsPerPage:l=50}=e;const s=(0,a.useDispatch)(),c=(0,he._)(),u=(0,he._)(),[p,d]=(0,r.useState)(!1),[m,f]=(0,r.useState)(0),[h,y]=(0,r.useState)([]),{requestEntities:v,requestTotal:x}=(e=>{let{entityUri:t,tag:n}=e;const o=(0,a.useSelector)(E.ZP.selectors.getGlobalSearchRequestOptions),l=(0,a.useSelector)(E.ZP.selectors.getTenant),s=(0,a.useSelector)(E.ZP.selectors.getDtssPath),c=(0,r.useMemo)((()=>(0,g.Do$)(t)),[t]),u=(0,r.useMemo)((()=>[{filter:"equals",fieldName:"tags",values:[n]}]),[n]),p=!!c,d=(0,r.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t=ya({select:"uri,label,type,secondaryLabel,defaultProfilePicValue,startDate,endDate"},arguments.length>1&&void 0!==arguments[1]?arguments[1]:{});return p?(0,g.uqV)({filters:e,options:t,customerTenant:l,dataTenant:c,dtssPath:s}).then((0,i.map)((0,i.assoc)("dataTenant",c))):(0,g.ZOr)(e,t)}),[p,c,l,s]);return{requestEntities:(0,r.useCallback)(((e,t)=>d(u,ya({offset:t,max:e},o))),[u,o,d]),requestTotal:(0,r.useCallback)((()=>{const e=o;return(p?(0,g.J$m)({filters:u,options:e,customerTenant:l,dataTenant:c,dtssPath:s}):(0,g.j_Q)(u,e)).then((e=>e.total))}),[u,o,p,c,l,s])}})({entityUri:n,tag:t}),O=(0,r.useCallback)((e=>{s(E.ui.actions.errorSet((0,g.xU7)(e,b().text("Something went wrong")))),f(0)}),[s]);return(0,r.useEffect)((()=>{c(x()).then(f).catch(O)}),[x,c,O]),(0,r.useEffect)((()=>{d(!0),u(v(l,o*l)).then(y).catch(O).finally((()=>d(!1)))}),[o,l,v,u,O]),{isLoading:p,total:m,entities:h}})({tag:t,entityUri:n,page:u,rowsPerPage:s}),y=(0,r.useRef)(null);(0,r.useEffect)((()=>{y.current&&(y.current.scrollTop=0)}),[h]);const v=f>xa[0];return o().createElement("div",{className:l.perspectiveView},o().createElement(ha,{label:t}),o().createElement("div",{className:A()(l.tagsContainer,{[l.fullHeight]:v})},o().createElement(H.Z,{className:l.tagsView},o().createElement(ga,{total:f}),o().createElement("div",{className:l.listContainer},m&&o().createElement(R.Z,null),f>0&&o().createElement("div",{className:l.entitiesList,ref:y},o().createElement(ua.Z,{entities:h})),v&&o().createElement("div",{className:l.pagination},o().createElement(V.Z,{count:f,rowsPerPageOptions:xa,rowsPerPage:s,page:u,onChangePage:p,onChangeRowsPerPage:c}))))))}));Oa.displayName="TagPerspectiveView";const wa=(0,s.createGenerateClassName)({productionPrefix:"tagPerspective",disableGlobal:!0}),Sa=e=>{let{config:t,tag:n,entityUri:r,store:l,onResize:u=i.identity}=e;return o().createElement(a.Provider,{store:l},o().createElement(p.m.Provider,{value:t.id},o().createElement(s.StylesProvider,{generateClassName:wa},o().createElement(c.Z,{handleHeight:!0,onResize:(e,t)=>u(Math.floor(e),Math.floor(t))}),t&&o().createElement(Oa,{tag:n,entityUri:r}),o().createElement(m.Z,{showErrorFromStore:!0}))))}},1242:(e,t,n)=>{e.exports=n.p+"5271a9e7b6651c852e93.png"}}]);