@reltio/remotes 1.4.1409 → 1.4.1410
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/1268.js +1 -1
- package/1268.js.map +1 -1
- package/1375.js +1 -1
- package/2114.js +1 -1
- package/2491.js +2 -0
- package/2491.js.map +1 -0
- package/2890.js +1 -1
- package/3273.js +1 -1
- package/3540.js +1 -1
- package/3575.js +2 -0
- package/3575.js.map +1 -0
- package/4015.js +1 -1
- package/4407.js +1 -1
- package/447.js +1 -1
- package/4571.css +635 -0
- package/4571.css.map +1 -0
- package/4571.js +2 -0
- package/4571.js.map +1 -0
- package/461.js +1 -1
- package/4843.js +1 -1
- package/4881.js +1 -1
- package/4889.js +1 -1
- package/5400.js +1 -1
- package/5706.js +2 -0
- package/5706.js.map +1 -0
- package/5709.js +1 -1
- package/5720.js +1 -1
- package/5937.js +1 -1
- package/5937.js.map +1 -1
- package/6103.js +1 -1
- package/6119.js +2 -0
- package/6119.js.map +1 -0
- package/6138.js +2 -0
- package/6138.js.map +1 -0
- package/6233.js +2 -0
- package/6233.js.map +1 -0
- package/6312.js +1 -1
- package/6617.js +1 -1
- package/6669.js +1 -1
- package/8051.js +1 -1
- package/8183.js +1 -1
- package/8225.js +2 -0
- package/8225.js.map +1 -0
- package/84.js +1 -1
- package/84.js.map +1 -1
- package/8443.js +1 -1
- package/8448.js +2 -0
- package/8448.js.map +1 -0
- package/8684.js +1 -1
- package/8684.js.map +1 -1
- package/8847.js +1 -1
- package/9043.js +1 -1
- package/9258.js +2 -0
- package/9258.js.map +1 -0
- package/9630.js +1 -1
- package/package.json +1 -1
- package/remoteEntry.js +1 -1
- package/remoteEntry.js.map +1 -1
- package/1219.js +0 -2
- package/1219.js.map +0 -1
- package/3149.js +0 -2
- package/3149.js.map +0 -1
- package/3602.js +0 -2
- package/3602.js.map +0 -1
- package/6495.js +0 -2
- package/6495.js.map +0 -1
- package/6710.js +0 -2
- package/6710.js.map +0 -1
- package/6913.js +0 -2
- package/6913.js.map +0 -1
- package/7937.js +0 -2
- package/7937.js.map +0 -1
- package/8420.js +0 -2
- package/8420.js.map +0 -1
- package/99.js +0 -2
- package/99.js.map +0 -1
package/6103.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[6103],{97991:(e,t,r)=>{r.d(t,{Z:()=>u});var n,a=r(94079),l=r(71153),o=r.n(l),i=r(24328),s=r.n(i);function c(){return c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},c.apply(this,arguments)}!function(e){e[e.ICON_MODE=0]="ICON_MODE",e[e.TEXT_MODE=1]="TEXT_MODE",e[e.ERROR_MODE=2]="ERROR_MODE"}(n||(n={}));const u=e=>{let{className:t,icon:r,avatarText:l,rootClasses:u}=e,p=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["className","icon","avatarText","rootClasses"]);const[d,m]=(0,i.useState)(null);(0,i.useEffect)((()=>{m(r?n.ICON_MODE:n.TEXT_MODE)}),[r,l]);const b=()=>{m(n.ERROR_MODE)};switch(d){case n.ICON_MODE:return s().createElement(a.Avatar,c({className:o()(t,null==u?void 0:u.iconRoot),src:r,onError:b},p));case n.TEXT_MODE:case n.ERROR_MODE:return s().createElement(a.Avatar,c({className:o()(t,null==u?void 0:u.textRoot)},p),l);default:return null}}},74402:(e,t,r)=>{r.d(t,{Z:()=>s});var n=r(24328),a=r(17440),l=r(55046);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const i=e=>{let{rowIndex:t,columnData:{id:r},cellIndex:n}=e;return`${r}[${t}][${n}]`},s=()=>{const[e,t]=(0,n.useState)({}),r=(0,n.useRef)({}),s=(0,n.useCallback)((0,l.DsO)((()=>{t(function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){o(e,t,r[t])}))}return e}({},r.current))})),[]),c=(0,n.useCallback)((()=>{r.current={}}),[]);return{getDynamicRowCellHeight:(0,n.useCallback)((0,a.pipe)(i,(0,a.prop)(a.__,e)),[e]),changeRowCellHeight:(0,n.useCallback)((0,a.curry)((0,a.useWith)((0,a.pipe)(((e,t)=>{r.current[e]=t}),s),[i,a.identity])),[]),clearHeightsCache:c}}},97946:(e,t,r)=>{r.d(t,{Z:()=>p});var n=r(24328),a=r.n(n),l=r(13980),o=r.n(l),i=r(44443),s=r(94079),c=r(20562);const u=e=>{let{onChangeHeight:t,children:r}=e,l=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["onChangeHeight","children"]);const o=(0,n.useRef)(null),{rowValue:u,rowIndex:p,columnData:d,cellIndex:m}=l,b=t({rowIndex:p,cellIndex:m,columnData:d}),g=()=>o.current&&b(o.current.clientHeight);return(0,c.D)(g,[u.rawValue]),a().createElement("div",null,a().createElement(i.Z,{handleHeight:!0,onResize:g}),a().createElement(s.RootRef,{rootRef:o},r))};u.propTypes={onChangeHeight:o().func,children:o().node};const p=u},85209:(e,t,r)=>{r.d(t,{Z:()=>s});var n=r(24328),a=r.n(n),l=r(87918),o=r.n(l),i=r(94079);const s=e=>{let{open:t,onClose:r,onConfirm:n}=e;return a().createElement(i.Dialog,{open:t},a().createElement(i.DialogContent,null,a().createElement(i.DialogContentText,null,o().text("Are you sure you want to delete this?"))),a().createElement(i.DialogActions,null,a().createElement(i.Button,{onClick:r,color:"primary"},o().text("No")),a().createElement(i.Button,{onClick:()=>{n(),r()},color:"primary"},o().text("Yes"))))}},94111:(e,t,r)=>{r.d(t,{Z:()=>s});var n=r(24328),a=r.n(n),l=r(80030);const o=(0,r(79692).Z)((e=>({tooltip:{backgroundColor:e.palette.background.paper,color:e.palette.text.primary,filter:"drop-shadow(0px 1px 5px #00000033) drop-shadow(0px 3px 1px #0000001F) drop-shadow(0px 2px 2px #00000024)",padding:"10px",maxWidth:"none"},arrow:{color:e.palette.background.paper}})));function i(){return i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},i.apply(this,arguments)}const s=e=>{const t=o();return a().createElement(l.ZP,i({},e,{classes:t,arrow:!0}))}},96955:(e,t,r)=>{r.d(t,{Z:()=>f});var n=r(24328),a=r.n(n),l=r(71153),o=r.n(l),i=r(13980),s=r.n(i),c=r(31396),u=r(60364);const p=(0,r(79692).Z)((()=>({container:{position:"relative","& .Resizer":{zIndex:1,boxSizing:"border-box",backgroundClip:"padding-box","&.disabled":{cursor:"initial",height:0,margin:0},"&.horizontal":{height:"11px",backgroundImage:"linear-gradient(rgba(0,0,0,0.33), rgba(0,0,0,0.33))",backgroundRepeat:"no-repeat",backgroundSize:"100% 1px",backgroundPosition:"top",width:"100%",marginBottom:"-10px","&:not(.disabled):hover":{cursor:"row-resize",backgroundImage:"linear-gradient(rgba(0, 114, 206, 0), rgba(0, 114, 206, 0.35), rgba(0, 114, 206, 1))",backgroundSize:"100% 3px"}},"&.vertical":{width:"11px",backgroundImage:"linear-gradient(rgba(0,0,0,0.33), rgba(0,0,0,0.33))",backgroundRepeat:"no-repeat",backgroundSize:"1px 100%",backgroundPosition:"left",height:"100%",marginRight:"-10px","&:not(.disabled):hover":{cursor:"col-resize",backgroundImage:"linear-gradient(to left, rgba(0, 114, 206, 0.35), rgba(0, 114, 206, 1), rgba(0, 114, 206, 0.35))",backgroundSize:"3px 100%"}}}}})));var d=r(55046);const m=e=>"horizontal"===e,b=e=>{let{className:t,children:r,orientation:l,defaultSize:i,size:s,minSize:b,maxSize:g,allowResize:f,onChange:y}=e;const v=p(),h=(0,u.Z)(),[E,w]=(0,n.useState)(),[x,O]=(0,n.useState)(!0),k=(0,n.useCallback)((()=>O(!0)),[]),C=(0,n.useCallback)((()=>O(!1)),[]),T=()=>m(l)?null==E?void 0:E.clientHeight:null==E?void 0:E.clientWidth,S=(0,n.useCallback)((0,d.DsO)((e=>{const t=T();y({percentageSize:e/t*100+"%",isMaxSize:g>0?e===g:e===t+g,isMinSize:e===b})}),250),[y,l,g,E]),I=(0,n.useMemo)((()=>({transition:h.transitions.create(m(l)?"height":"width",{easing:h.transitions.easing.sharp,duration:h.transitions.duration.leavingScreen})})),[l,h]);return"number"==typeof s&&s<0&&(s=(T()||0)+s),a().createElement("div",{ref:w,className:o()(v.container,t)},a().createElement(c.Z,{split:l,size:s,allowResize:f,onChange:S,defaultSize:i,minSize:b,maxSize:g,onDragStarted:C,onDragFinished:k,pane1Style:x?I:void 0},r))},g=s().oneOfType([s().number,s().string]);b.propTypes={className:s().string,children:s().arrayOf(s().node).isRequired,orientation:s().oneOf(["horizontal","vertical"]).isRequired,defaultSize:g,size:g,minSize:g,maxSize:g,allowResize:s().bool,onChange:s().func};const f=b},40715:(e,t,r)=>{r.d(t,{n:()=>f});var n=r(24328),a=r.n(n),l=r(71153),o=r.n(l),i=r(55046),s=r(64459),c=r(93873),u=r(94646),p=r(3515),d=r(19603),m=r(7718),b=r(3409);const g=(0,r(79692).Z)({profileBandNavigation:{marginBottom:"10px"},comments:{display:"flex",justifyContent:"flex-end"}}),f=(0,n.memo)((e=>{let{entity:t,className:r,historySlice:l}=e;const f=g(),y=(0,n.useMemo)((()=>(0,i.L5S)(t)),[t]),v=(0,m.C)({objectIds:y}),h=(0,i.wwR)(t);return a().createElement(p.h.Provider,{value:v},a().createElement(s.Z,{className:o()(r,d.U),entity:(null==l?void 0:l.aEntity)||t},l?a().createElement(b.Z,null):a().createElement(a().Fragment,null,a().createElement(c.a,{className:f.profileBandNavigation}),a().createElement(u.Z,{className:f.comments,uri:h,relatedObjectUris:(0,i.wp9)(i.q7e.ENTITY,{entityUri:h}),objectType:i.q7e.ENTITY}))))}));f.displayName="ScreenProfileBand"},94175:(e,t,r)=>{r.d(t,{Z:()=>c});var n=r(24328),a=r.n(n),l=r(52730),o=r(49885),i=r(55046),s=r(97991);const c=e=>{let{sourceType:t,className:r,classes:n}=e;const c=(0,l.useSelector)(o.ZP.selectors.getMetadata),{uri:u,icon:p}=(0,i.PWK)(c,t)||{},d=u?(0,i.tH7)(c,u)[0]:"",m=p?(0,i.vPL)("https://s3.amazonaws.com/reltio.images/api",p):null;return a().createElement(s.Z,{className:r,avatarText:d,icon:m,variant:"square",rootClasses:n})}},4073:(e,t,r)=>{r.d(t,{Z:()=>ne});var n=r(24328),a=r.n(n),l=r(55046),o=r(48554),i=r(12437),s=r(22983),c=r(27604),u=r(43054),p=r(71153),d=r.n(p),m=r(87918),b=r.n(m),g=r(72768),f=r(55847),y=r(94079),v=r(17440),h=r(28117),E=r(40879),w=r(79692);const x=(0,w.Z)((()=>({textField:{margin:0},input:{borderRadius:0},inputMultiline:{"&$input":{paddingTop:0,paddingBottom:0}},booleanEditor:{paddingLeft:"10px"},timestampEditor:{"&$paper":{minWidth:"255px"}},paper:e=>{let{color:t,containerWidth:r}=e;return{border:`3px solid ${t}`,borderRadius:"4px",width:r,minWidth:"160px"}},popoverRoot:{zIndex:"10!important"}})));function O(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const k=[l.oS0.TYPE_TEXT,l.oS0.TYPE_BLOB],C=e=>{let{attributeType:t,attributeValue:r,color:o,containerRef:i,onClose:s,onEdit:c}=e;const u=x({color:o,containerWidth:i.current?i.current.getBoundingClientRect().width:0}),p=(0,l.PFL)(t),m=(0,E.AG)(r,p),[b,g]=(0,n.useState)(m),f={className:u.textField,InputProps:{disableUnderline:!0,classes:{root:u.input,multiline:u.inputMultiline}}},w=()=>{const e=(0,E.Ho)(t,b);if(!(0,v.isNil)(b)&&!(0,v.equals)(b,m)){const n=(0,l.CwH)(t)?{value:e.value,lookupCode:e.lookupCode}:{value:""===b&&(0,l.FVt)(p.type)?null:e};c(function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){O(e,t,r[t])}))}return e}({},r,n))}s()};return a().createElement(y.Popover,{open:!!i,anchorEl:i.current,anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},classes:{paper:d()(u.paper,{[u.booleanEditor]:(0,l.T6Y)(p.type),[u.timestampEditor]:(0,l.j5n)(p.type)}),root:u.popoverRoot},onKeyUp:e=>{"Enter"!==e.key||k.includes(p.type)?"Escape"===e.key&&s():w()},onBackdropClick:w},a().createElement(h.Z,{autoFocus:!0,dataTypeDefinition:p,fieldName:(0,l.Tde)(t.uri),onChange:g,TextFieldProps:f,value:b,fullWidth:!0}))};var T=r(8818),S=r(57507),I=r(35315),j=r(83348),Z=r(77585);const A=(0,w.Z)((e=>({menuItem:{minHeight:"32px",color:e.palette.text.secondary},menuText:{color:e.palette.text.primary,fontSize:"13px",lineHeight:"15px",letterSpacing:0,marginLeft:"16px"},sourceItem:{borderBottom:"1px solid rgba(0, 0, 0, 0.12)",paddingBottom:"8px",paddingLeft:"16px",maxWidth:"200px"}}))),N=(0,j.Z)(y.MenuItem),P=e=>{let{styles:t,icon:r,text:n}=e;return a().createElement(a().Fragment,null,r,a().createElement(y.Typography,{classes:{root:t.menuText}},n))},D=(0,n.forwardRef)(((e,t)=>{let{item:r,onMenuClose:n=(()=>{})}=e;const l=A(),{disabled:o,text:i,tooltip:s,onClick:c,id:u="",icon:p,crosswalk:d,color:m}=r;return d?a().createElement(Z.Z,{className:l.sourceItem,color:m,crosswalk:d,focusable:!0}):a().createElement(N,{tooltipTitle:s,showForDisabled:!0,classes:{root:l.menuItem},onClick:e=>{n(e),c(e)},disabled:o,ref:t,"data-reltio-id":`crosswalk-menu-item${u}`},a().createElement(P,{icon:p,text:i,styles:l}))}));D.displayName="CrosswalkMenuItem";const R=D;var V=r(26905),M=r(63149);function z(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const L=(0,w.Z)((()=>({root:e=>{let{fullyColored:t,opaque:r,color:n,variant:a}=e;return function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){z(e,t,r[t])}))}return e}({minHeight:"28px",wordBreak:"break-word"},"filled"===a&&{borderRadius:"4px",background:t?n:`linear-gradient(to right, ${n} 8px, rgba(0,0,0,0.05) 8px)`},"outlined"===a&&{"&::after":{content:'""',position:"absolute",background:n,borderRadius:"4px 0px 0px 4px",width:"8px",height:"100%",pointerEvents:"none"},"&::before":{content:'""',position:"absolute",boxSizing:"border-box",borderRadius:"4px",border:t?`${n} solid 2px`:"rgba(0,0,0,0.12) solid 1px",width:"100%",height:"100%",pointerEvents:"none"}},{display:"flex",alignItems:"center",opacity:r?1:.38,filter:r?null:"saturate(20%)",transition:"opacity 0.3s",position:"relative"})},attributeValue:{marginLeft:"16px",padding:"6px 0",lineHeight:"14px",width:"calc(100% - 71px)"},actions:{display:"flex",width:"71px",justifyContent:"flex-end",marginRight:"4px"}}))),U=e=>{let{className:t,dataReltioId:r,attributeType:o=null,attributeValue:i,crosswalk:p,disableEdit:m,disableDelete:y,onIgnore:v,onEdit:h,onPin:E,onDelete:w}=e;const{isReadingMode:x,isEditingMode:O,isHovered:k,onMouseEnter:j,onMouseLeave:Z,setReadingMode:A,setEditingMode:N}=(0,V.p)(),P=(0,n.useRef)(),D=(0,l.nIW)(i.uri),z=(0,l.x_)(p),U=!o.system&&!z,W=U&&!m&&(0,l.Z5t)(l.fO_.EDITING,o),B=U&&!y&&(0,l.Edd)(l.fO_.EDITING,o),F=(0,l.ZiX)(i.uri),H=!F&&(!x&&W||i.pin),Y=!F&&(!x&&W||i.ignored),_=(0,M.nX)(p),{isHighlighted:G,isDimmed:q,highlightCrosswalk:X,removeHighlight:$}=(0,M.pu)(p),Q=L({variant:z?"outlined":"filled",opaque:!q,fullyColored:G,color:_}),J=[{crosswalk:p,color:_},{disabled:!W,text:b().text("Edit"),icon:a().createElement(c.Z,null),tooltip:W?null:b().text("You don't have permissions to edit"),onClick:()=>N(),id:"edit"},{disabled:!B,text:b().text("Delete"),icon:a().createElement(s.Z,null),tooltip:B?null:b().text("You don't have permissions to delete"),onClick:()=>w({attributeType:o,attributeValue:i,crosswalks:[p]}),id:"delete"}],K=()=>{$(),A()};return a().createElement("div",{ref:P,className:d()(t,Q.root),onMouseEnter:()=>{X(),j()},onMouseLeave:()=>{$(),Z()},"data-reltio-id":r},a().createElement("div",{className:Q.attributeValue},a().createElement(g.Z,{value:(0,l.kDl)(i),dataTypeDefinition:(0,l.PFL)(o)})),a().createElement("div",{className:Q.actions},H&&a().createElement(I.Z,{isPinned:i.pin,onClick:()=>E({attributeValue:i}),disabled:!W}),Y&&a().createElement(S.Z,{isIgnored:i.ignored,onClick:()=>v({attributeValue:i}),disabled:!W}),k&&a().createElement(f.Z,{MenuItemRenderer:R,menuId:`simple-attribute-additional-actions-${D}`,buttonComponent:T.k,buttonProps:{icon:u.Z,size:"XS",tooltipTitle:b().text("More actions")},onMenuClose:K,menuItems:J})),O&&a().createElement(C,{attributeType:o,attributeValue:i,color:_,onClose:K,onEdit:e=>h({attributeType:o,attributeValue:e,crosswalk:p}),containerRef:P}))};var W=r(13896);const B=(0,w.Z)((()=>({simpleAttributesWrapper:{display:"flex",flexWrap:"wrap",gap:"4px",width:"100%",minHeight:"28px"},dropIndicator:{height:"28px",color:"#828282",fontSize:"13px",lineHeight:"28px",background:"rgba(0, 0, 0, 0.04)",border:"1px dashed #828282",borderRadius:"4px",boxSizing:"border-box",padding:"0 12px"}})));function F(){return F=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},F.apply(this,arguments)}const H=e=>{let{attributeValues:t,attributeType:r,parentUri:n,disableEdit:o,crosswalksMap:i,onAdd:s}=e,c=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["attributeValues","attributeType","parentUri","disableEdit","crosswalksMap","onAdd"]);const u=B(),[{isDragItemOver:p},d]=(0,W.useDrop)({accept:"Crosswalk",canDrop:e=>{let{crosswalk:t}=e;const n=(0,l.bC9)(t.uri)||"relation"===t.ownerType,a=(0,l.WgC)(t.uri)&&"entity"===t.ownerType;return(0,l.d89)(l.fO_.EDITING,r)&&!o&&(n&&(0,l.$NE)(r.uri)||a&&(0,l.EdS)(r.uri))},collect:e=>({isDragItemOver:e.isOver()&&e.canDrop()}),drop:(e,a)=>{let{crosswalk:l}=e;s({attributeType:r,crosswalk:l,parentUri:n,index:t.length})}});let m=0;return a().createElement("div",{ref:d,className:u.simpleAttributesWrapper},t.map((e=>{var t;return null===(t=i[e.uri])||void 0===t?void 0:t.map((t=>a().createElement(U,F({key:e.uri+t.uri,attributeType:r,attributeValue:e,crosswalk:t,disableEdit:o,dataReltioId:"value-index-"+m++},c))))})),p&&a().createElement("div",{className:u.dropIndicator},b().text("Drop here")))};var Y=r(58896);function _(){return _=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},_.apply(this,arguments)}const G=e=>{let{className:t,attributeValues:r,attributeType:n,onAdd:o,parentUri:i,disableEdit:s}=e,c=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["className","attributeValues","attributeType","onAdd","parentUri","disableEdit"]);const u=!s&&(0,l.d89)(l.fO_.EDITING,n);return 0===r.length&&u?a().createElement(y.Button,{variant:"text",color:"primary",onClick:()=>o({parentUri:i,attributeType:n,index:0})},b().text("Create attribute")):a().createElement("div",{className:t},r.map((e=>a().createElement(Y.Z,_({key:e.uri,attributeValue:e,attributeType:n,onAdd:o,disableEdit:s},c)))))};var q=r(85592);function X(){return X=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},X.apply(this,arguments)}const $=e=>{let{className:t,attributeValues:r}=e,n=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["className","attributeValues"]);return a().createElement("div",{className:t},r.map((e=>a().createElement(q.Z,X({key:e.uri,attributeValue:e},n)))))};var Q=r(22246);function J(){return J=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},J.apply(this,arguments)}const K=e=>{let{className:t,attributeValues:r}=e,n=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["className","attributeValues"]);return a().createElement("div",{className:t},r.map((e=>a().createElement(Q.Z,J({key:e.uri,attributeValue:e},n)))))},ee=(0,w.Z)((()=>({wrapper:{display:"flex",flexDirection:"column",alignItems:"flex-start"},complexAttributesWrapper:{width:"100%"}})));function te(){return te=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},te.apply(this,arguments)}function re(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}const ne=e=>{let{attributeType:t,attributeValues:r=[],paging:s={},max:c=1/0,requestNextPage:u}=e,p=re(e,["attributeType","attributeValues","paging","max","requestNextPage"]);const d=ee(),[m,b]=(0,n.useState)(c),g=(0,v.propOr)(r.length,"totalValues",s),f=c<g,y=f&&m<g,h=f&&m>=g,E=r.slice(0,m),w=g-m;return a().createElement("div",{className:d.wrapper},(e=>{switch(t.type){case l.oS0.TYPE_NESTED:return a().createElement(G,te({className:d.complexAttributesWrapper,attributeValues:e,attributeType:t},p));case l.oS0.TYPE_REFERENCE:{const{crosswalksMap:r}=p,n=re(p,["crosswalksMap"]);return a().createElement($,te({className:d.complexAttributesWrapper,attributeValues:e,attributeType:t,crosswalksMap:r},n))}case l.oS0.TYPE_IMAGE:return a().createElement(K,te({className:d.complexAttributesWrapper,attributeValues:e,attributeType:t},p));default:return a().createElement(H,te({attributeValues:e,attributeType:t},p))}})(E),y&&a().createElement(o.Z,{moreNumber:Math.min(c,w),valueNumber:w,onClick:()=>{r.length<g&&u(),b(m+c)}}),h&&a().createElement(i.Z,{onClick:()=>{b(c)}}))}},8148:(e,t,r)=>{r.d(t,{Z:()=>D});var n=r(24328),a=r.n(n),l=r(55046),o=r(26905),i=r(51229),s=r(63149),c=r(77585),u=r(94111),p=r(71153),d=r.n(p),m=r(32625);const b=e=>{let{crosswalk:t,className:r}=e;const n=(0,s.nX)(t),{isDimmed:l,highlightCrosswalk:o,removeHighlight:i}=(0,s.pu)(t),p=(0,m.y)({isOpaque:!l,color:n});return a().createElement(u.Z,{title:a().createElement(c.Z,{crosswalk:t,color:n}),placement:"top"},a().createElement("div",{className:d()(p.crosswalkIcon,r),onMouseEnter:()=>o(),onMouseLeave:()=>i()}))};var g=r(17440),f=r(19592),y=r(4073),v=r(95629),h=r(95974),E=r(79692);const w=(0,E.Z)((e=>({title:{fontSize:"12px",lineHeight:"14px",paddingBottom:"4px",display:"inline-block",color:e.palette.text.secondary}})));function x(){return x=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},x.apply(this,arguments)}const O=e=>{let{attributeTypes:t,attributes:r}=e,n=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["attributeTypes","attributes"]);const o=w();return a().createElement(a().Fragment,null,t.filter(l.Uty).map((e=>a().createElement(h.Z,{key:e.uri,enabled:!0},a().createElement(v.Z,{className:o.title,label:e.label}),a().createElement(y.Z,x({attributeType:e,attributeValues:r[e.name],paging:(0,g.path)(["paging",e.uri],r)},n))))))};var k=r(35315),C=r(57507),T=r(8818),S=r(22983),I=r(87918),j=r.n(I);const Z=e=>{let{onClick:t}=e;return a().createElement(T.k,{icon:S.Z,tooltipTitle:j().text("Delete"),onClick:t,size:"XS",disableRipple:!0})};var A=r(20562),N=r(66095);const P=(0,E.Z)((()=>({root:{display:"flex",minHeight:"20px"},actions:{display:"flex",width:"65px",justifyContent:"flex-end",flexShrink:0,alignSelf:"center"},crosswalkIcon:{display:"inline-block",verticalAlign:"middle","& + &":{marginLeft:"4px"}}}))),D=e=>{let{attributeType:t,attributeValue:r,attributeTypesList:s,label:c,crosswalksMap:u,disableEdit:p,disableDelete:d,onPin:m,onIgnore:y,onDelete:v,onEdit:h,onAdd:E}=e;const w=P(),{isReadingMode:x,onMouseEnter:T,onMouseLeave:S}=(0,o.p)(),I=!p&&(0,l.Z5t)(l.fO_.EDITING,t),j=!d&&(0,l.Edd)(l.fO_.EDITING,t),D=(0,l.ZiX)(r.uri),R=!D&&(!x&&I||r.pin),V=!D&&(!x&&I||r.ignored),M=!x&&j,z=(0,N.Q)(r.uri),[L,U]=(0,n.useState)(z||D);(0,A.D)((()=>{z&&U(z)}),[z]);const W=(0,g.pipe)((0,g.pickBy)(((e,t)=>(0,l.sOy)(t,null==r?void 0:r.uri))),g.values,g.flatten,(0,g.uniqBy)((0,g.prop)("uri")))(u);return a().createElement(a().Fragment,null,a().createElement("div",{className:w.root,onMouseEnter:T,onMouseLeave:S},a().createElement(f.Z,{onClick:()=>U((e=>!e)),expanded:L}),a().createElement("span",null,c,W.map((e=>a().createElement(b,{key:(0,l.uKF)(e),crosswalk:e,className:w.crosswalkIcon})))),a().createElement(i.Z,null),a().createElement("div",{className:w.actions},R&&a().createElement(k.Z,{disabled:!I,isPinned:r.pin,onClick:()=>m({attributeValue:r})}),V&&a().createElement(C.Z,{disabled:!I,isIgnored:r.ignored,onClick:()=>y({attributeValue:r})}),M&&a().createElement(Z,{onClick:()=>v({attributeType:t,attributeValue:r,crosswalks:u[r.uri]})}))),L&&a().createElement(O,{attributeTypes:s,attributes:r.value,parentUri:r.uri,crosswalksMap:u,disableEdit:!I,disableDelete:!j,onPin:m,onIgnore:y,onDelete:v,onEdit:h,onAdd:E}))}},22246:(e,t,r)=>{r.d(t,{Z:()=>p});var n=r(24328),a=r.n(n),l=r(55046),o=r(27952),i=r(8148);const s=(0,r(79692).Z)((()=>({image:{borderRadius:"4px",background:"white",display:"inline-block",verticalAlign:"middle"},imageContainer:{display:"inline",lineHeight:"45px",paddingRight:"8px"}})));function c(){return c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},c.apply(this,arguments)}const u={imageWidth:55,imageHeight:45},p=e=>{let{attributeValue:t,attributeType:r}=e,n=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["attributeValue","attributeType"]);const p=s();return a().createElement(i.Z,c({attributeValue:t,attributeType:r,attributeTypesList:r.attributes,label:a().createElement(o.Z,{containerClassName:p.imageContainer,className:p.image,src:(0,l.Ysv)(t),size:u})},n))}},58896:(e,t,r)=>{r.d(t,{Z:()=>c});var n=r(24328),a=r.n(n),l=r(55046),o=r(8148),i=r(10174);function s(){return s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s.apply(this,arguments)}const c=e=>{let{attributeValue:t,attributeType:r}=e,n=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["attributeValue","attributeType"]);const c=a().createElement(i.x,null,(0,l.idV)(null==t?void 0:t.label));return a().createElement(o.Z,s({attributeValue:t,attributeType:r,attributeTypesList:r.attributes,label:c},n))}},85592:(e,t,r)=>{r.d(t,{Z:()=>b});var n=r(24328),a=r.n(n),l=r(52730),o=r(49885),i=r(55046),s=r(8148),c=r(17440),u=r(10174),p=r(95470);const d=(0,r(79692).Z)((e=>({relationshipLabel:{marginLeft:"4px",color:e.palette.text.primary}})));function m(){return m=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},m.apply(this,arguments)}const b=e=>{let{attributeValue:t,attributeType:r}=e,n=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["attributeValue","attributeType"]);const b=d(),g=(0,l.useSelector)(o.ZP.selectors.getMetadata),f=(0,l.useSelector)(o.ZP.selectors.getUIPath),y=a().createElement(u.x,null,a().createElement(p.Z,{href:(0,i.ChB)({uiPath:f,uri:(0,i.bwT)(t)})},(0,i.idV)(t.label),t.relationshipLabel&&a().createElement("span",{className:b.relationshipLabel},t.relationshipLabel))),v=(0,c.pipe)(i.tF$,(0,c.map)((e=>(0,i.zeJ)(g,e))),(0,c.reject)(c.isNil))(r);return a().createElement(s.Z,m({attributeValue:t,attributeType:r,attributeTypesList:v,label:y},n))}},10174:(e,t,r)=>{r.d(t,{x:()=>i});var n=r(24328),a=r.n(n),l=r(94079),o=r(32625);const i=e=>{let{children:t}=e;const r=(0,o.q)();return a().createElement(l.Typography,{component:"span",variant:"body2",classes:{body2:r.label}},t)}},57507:(e,t,r)=>{r.d(t,{Z:()=>d});var n=r(24328),a=r.n(n),l=r(8818);function o(){return o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},o.apply(this,arguments)}const i=e=>a().createElement("svg",o({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),a().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 3.5A8.503 8.503 0 003.5 12c0 4.692 3.808 8.5 8.5 8.5s8.5-3.808 8.5-8.5-3.808-8.5-8.5-8.5zM6.1 12c0-3.26 2.64-5.9 5.9-5.9 1.161 0 2.24.336 3.149.917L7.017 15.15A5.821 5.821 0 016.101 12zm5.9 5.9c-1.16 0-2.24-.336-3.148-.917l8.131-8.131c.581.908.917 1.987.917 3.148 0 3.26-2.64 5.9-5.9 5.9z",fill:"#000",fillOpacity:.54}));function s(){return s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s.apply(this,arguments)}const c=e=>a().createElement("svg",s({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),a().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M17.847 9.402a6.34 6.34 0 00-.8-1.322L8.08 17.048A6.34 6.34 0 0012 18.4a6.398 6.398 0 005.847-8.998zm-7.283 7.283l6.121-6.121a4.898 4.898 0 01-6.121 6.121zm1.437-11.084a6.334 6.334 0 013.92 1.352L6.953 15.92A6.334 6.334 0 015.6 12c0-3.536 2.864-6.4 6.4-6.4zm0 1.5c.5 0 .982.075 1.436.215l-6.121 6.12A4.898 4.898 0 0112 7.1zM6.6 17.903A7.967 7.967 0 0012 20c4.417-.001 8.001-3.585 8.001-8.001a7.967 7.967 0 00-2.601-5.902A7.988 7.988 0 0012 4c-4.416 0-8 3.584-8 8a7.967 7.967 0 002.602 5.902zM12 2.5c-5.244 0-9.5 4.256-9.5 9.5s4.256 9.5 9.5 9.5 9.5-4.256 9.5-9.5-4.256-9.5-9.5-9.5z",fill:"#000",fillOpacity:.54}));var u=r(87918),p=r.n(u);const d=e=>{let{isIgnored:t,onClick:r,disabled:n}=e;return a().createElement(l.k,{disabled:n,showForDisabled:!0,icon:t?i:c,tooltipTitle:n?p().text("You don't have permissions to ignore"):p().text("Ignore"),onClick:r,size:"XS",disableRipple:!0})}},35315:(e,t,r)=>{r.d(t,{Z:()=>d});var n=r(24328),a=r.n(n),l=r(8818);function o(){return o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},o.apply(this,arguments)}const i=e=>a().createElement("svg",o({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),a().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16 4v6l2 2v2h-5v7l-.992 1L11 21v-7H6v-2l2-2V4H7V2h10v2h-1z",fill:"#000",fillOpacity:.54}));function s(){return s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s.apply(this,arguments)}const c=e=>a().createElement("svg",s({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),a().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16 10V4h1V2H7v2h1v6l-2 2v2h5v7l1.008 1L13 21v-7h5v-2l-2-2zm-6-6h4v7l1 1H9l1-1V4z",fill:"#000",fillOpacity:.54}));var u=r(87918),p=r.n(u);const d=e=>{let{isPinned:t,onClick:r,disabled:n}=e;return a().createElement(l.k,{disabled:n,showForDisabled:!0,onClick:r,icon:t?i:c,tooltipTitle:n?"You don't have permissions to pin":p().text("Pin"),size:"XS",disableRipple:!0})}},77585:(e,t,r)=>{r.d(t,{Z:()=>y});var n=r(24328),a=r.n(n),l=r(87918),o=r.n(l),i=r(49885),s=r(55046),c=r(52730),u=r(72753),p=r(94175),d=r(71153),m=r.n(d),b=r(63149),g=r(8818),f=r(32625);const y=e=>{let{crosswalk:t,color:r,className:n,focusable:l=!1}=e;const{toggleCrosswalkFocus:d,isFocused:y}=(0,b.BF)(t),v=(0,f.y)({color:r,isFocused:y}),h=(0,c.useSelector)(i.ZP.selectors.getMetadata),{label:E}=(0,s.PWK)(h,t.type);return a().createElement("div",{className:m()(v.sourceItem,n)},a().createElement(p.Z,{className:v.sourceIcon,sourceType:t.type}),a().createElement("div",{className:v.sourceInfo},a().createElement("div",null,a().createElement("span",{className:v.label},E),l&&a().createElement(g.k,{icon:u.Z,className:v.eyeIcon,size:"XXS",tooltipTitle:o().text("Focus"),onClick:()=>d()})),a().createElement("div",{className:v.crosswalkValue},t.value)))}},32625:(e,t,r)=>{r.d(t,{y:()=>a,q:()=>l});var n=r(79692);const a=(0,n.Z)({sourceItem:{display:"flex",overflow:"hidden"},eyeIcon:e=>{let{isFocused:t}=e;return{marginLeft:"10px",color:t?"#000":"rgba(0, 0, 0, 0.54)"}},label:{color:"rgba(0, 0, 0, 0.87)",verticalAlign:"top",fontSize:"13px",lineHeight:"16px"},sourceInfo:{overflow:"hidden"},crosswalkValue:{color:"rgba(0, 0, 0, 0.54)",fontSize:"12px",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},sourceIcon:e=>{let{color:t}=e;return{height:"16px",width:"16px",marginRight:"9px",fontSize:"14px",backgroundColor:t}},crosswalkIcon:e=>{let{color:t,isOpaque:r}=e;return{backgroundColor:t,height:"12px",width:"12px",borderRadius:"30px",opacity:r?1:.38,transition:"opacity 0.3s"}}}),l=(0,n.Z)((()=>({label:{fontSize:"13px",lineHeight:"15px",letterSpacing:"normal",marginLeft:"2px",marginRight:"8px"}})))},26905:(e,t,r)=>{r.d(t,{p:()=>o});var n,a=r(55046),l=r(24328);!function(e){e.READING="READING",e.HOVERED="HOVERED",e.EDITING="EDITING"}(n||(n={}));const o=()=>{const[e,t]=(0,l.useState)(null),r=e===n.READING,o=e===n.EDITING,i=e===n.HOVERED;(0,l.useEffect)((()=>{t(n.READING)}),[]);const s=(0,l.useCallback)((0,a.DsO)(t,50),[]),c=(0,l.useCallback)((()=>{o||s(n.HOVERED)}),[s,o]),u=(0,l.useCallback)((()=>{o||s(n.READING)}),[s,o]);return{setReadingMode:(0,l.useCallback)((()=>t(n.READING)),[t]),setEditingMode:(0,l.useCallback)((()=>t(n.EDITING)),[t]),onMouseLeave:u,onMouseEnter:c,isReadingMode:r,isEditingMode:o,isHovered:i}}},87760:(e,t,r)=>{r.d(t,{Z:()=>m});var n=r(55046),a=r(24328),l=r.n(a),o=r(81303),i=r(13074);function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){c(e,t,r[t])}))}return e}function c(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function u(){return u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},u.apply(this,arguments)}function p(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}const d=e=>{let{values:t,valueContainerClassName:r}=e,n=p(e,["values","valueContainerClassName"]);return l().createElement(l().Fragment,null,(t||[]).map((e=>l().createElement("div",{key:e.uri,className:r},l().createElement(o.Z,u({attributeValue:e},n))))))},m=(0,a.memo)((e=>{let{expanded:t,LabelRenderer:r,RightSlot:a}=e,o=p(e,["expanded","LabelRenderer","RightSlot"]);const{attributeType:c,values:u,valueContainerClassName:m}=o;switch(c.type){case n.oS0.TYPE_NESTED:case n.oS0.TYPE_REFERENCE:return d(s({expanded:t,LabelRenderer:r,RightSlot:a},o));case n.oS0.TYPE_IMAGE:return l().createElement("div",{className:m},l().createElement(i.Z,{attributeType:c,attributeValues:u,imageSize:{imageHeight:40,imageWidth:40,imageMargin:2}}));default:return d(s({},o))}}))},20982:(e,t,r)=>{r.d(t,{Z:()=>Te});var n=r(24328),a=r.n(n),l=r(52730),o=r(71153),i=r.n(o),s=r(87918),c=r.n(s),u=r(49885),p=r(55046),d=r(74402),m=r(97946),b=r(60894),g=r(85709),f=r(92778),y=r(17440),v=r(92332),h=r(79692);const E=(0,h.Z)((e=>({coloredCell:{"&::before":{content:'""',position:"absolute",right:0,top:0,width:"100%",height:"100%",background:"rgba(0,0,0,0.06)",pointerEvents:"none"}},headCell:{display:"flex",alignItems:"center",fontSize:"12px",height:"100%",color:e.palette.text.secondary},rowCell:{fontSize:"13px",overflow:"hidden"},cellValueWrapper:{padding:"15px 15px 0 15px","&:last-child":{paddingBottom:"15px"}},attributeTitle:{display:"block",marginLeft:"3px","&:not(:last-child)":{marginBottom:"5px"}},ovValue:{"& + &":{marginTop:"4px"}},count:{textAlign:"center"},ruleType:{display:"flex",alignItems:"center"},ruleTypeLabel:{marginRight:"5px"},rulePopup:{width:"270px",overflowY:"hidden"},popupItem:{paddingBottom:"5px",paddingTop:"5px"},sourceIcon:{height:"16px",width:"16px",marginRight:"9px",fontSize:"14px"},closeButton:{height:24,width:24},popupTitle:{fontWeight:500,marginLeft:"12px"},popupTitleWrapper:{display:"flex",paddingLeft:16,paddingTop:16},popupItemsWrapper:{overflowY:"auto",maxHeight:"280px"},winnerSourceItemWrapper:{paddingBottom:"2px",paddingTop:"2px"},winnerSourceItem:{display:"flex",alignItems:"center",width:"100%",paddingLeft:"8px"},winnerSourceItemLabel:{fontSize:13}}))),w=e=>{const t=E();return a().createElement("div",{className:i()(t.headCell,t.coloredCell)},a().createElement(v.default,e),e.children)};var x=r(90473),O=r(32528);const k=(0,h.Z)({root:{marginBottom:"-6px"}}),C=(0,O.Z)((0,y.pick)(["parentUri","parentTypeUri","onAdd","selectedAttributeTypes","onSelectAttributeTypes"]))((e=>{let{parentTypeUri:t,parentUri:r,selectedAttributeTypes:n,onSelectAttributeTypes:o,onAdd:i}=e;const s=k(),d=(0,l.useSelector)(u.ZP.selectors.getMetadata),m=[...d.entityTypes,...d.relationTypes||[]].find((0,y.propEq)("uri",t)),b=e=>!(null!=n&&n.find((0,y.propEq)("uri",e.uri))),g=(0,y.pipe)((0,y.propOr)([],"attributes"),(0,y.reject)((0,y.either)(p.YkG,p.Or$)),(0,y.filter)((0,y.either)(p.QZu,b)),(0,y.filter)((0,y.both)(p.Uty,(e=>(0,p.Vg3)({attributeType:e,mode:p.fO_.EDITING})))))(m);return a().createElement("div",{className:s.root},a().createElement(x.Z,{label:c().text("Attribute"),popupTitle:c().text("Add attributes"),data:g,onApply:e=>{const t=e.filter(b);t.length>0&&o([...t,...n]),e.filter(p.QZu).forEach((e=>{i({attributeType:e,parentUri:r})}))}}))}));var T=r(51229);const S=(0,O.Z)((0,y.pick)(["readOnly"]))((e=>{let{readOnly:t}=e,r=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["readOnly"]);return t?a().createElement(w,r):a().createElement(w,r,a().createElement(T.Z,null),a().createElement(C,null))})),I=e=>{let{value:t}=e;const r=E();return a().createElement("div",{className:r.cellValueWrapper},t)};var j=r(4073);const Z=(0,h.Z)((()=>({simpleAttributeWrapper:{padding:"15px"},complexAttributeWrapper:{padding:"15px","& + &":{borderTop:"1px solid rgba(0,0,0,.1)"}}})));function A(){return A=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},A.apply(this,arguments)}const N=e=>{let{attributeValues:t}=e,r=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["attributeValues"]);const n=Z();return a().createElement("div",{className:n.simpleAttributeWrapper},a().createElement(j.Z,A({attributeValues:t},r)))};var P=r(58896);function D(){return D=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},D.apply(this,arguments)}const R=e=>{let{attributeValues:t}=e,r=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["attributeValues"]);const n=Z(),l=null==t?void 0:t.map(((e,t)=>a().createElement("div",{key:null==e?void 0:e.uri,className:n.complexAttributeWrapper,"data-reltio-id":`value-index-${t}`},a().createElement(P.Z,D({attributeValue:e},r)))));return a().createElement(a().Fragment,null,l)};var V=r(85592);function M(){return M=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},M.apply(this,arguments)}const z=e=>{let{attributeValues:t,crosswalksMap:r}=e,n=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["attributeValues","crosswalksMap"]);const l=Z(),o=null==t?void 0:t.map(((e,t)=>a().createElement("div",{key:null==e?void 0:e.uri,className:l.complexAttributeWrapper,"data-reltio-id":`value-index-${t}`},a().createElement(V.Z,M({attributeValue:e,crosswalksMap:r},n)))));return a().createElement(a().Fragment,null,o)};var L=r(22246);function U(){return U=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},U.apply(this,arguments)}const W=e=>{let{attributeValues:t}=e,r=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["attributeValues"]);const n=Z();return a().createElement(a().Fragment,null,null==t?void 0:t.map(((e,t)=>a().createElement("div",{key:null==e?void 0:e.uri,className:n.complexAttributeWrapper,"data-reltio-id":`value-index-${t}`},a().createElement(L.Z,U({attributeValue:e},r))))))};function B(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const F=(0,O.Z)((0,y.pick)(["onDelete","onPin","onIgnore","onEdit","onAdd","parentUri","readOnly"]))((e=>{let{value:t,onDelete:r,onEdit:n,onPin:l,onIgnore:o,onAdd:i,parentUri:s,readOnly:c}=e;return class{static build(e,t){switch(e){case p.oS0.TYPE_NESTED:return a().createElement(R,t);case p.oS0.TYPE_REFERENCE:return a().createElement(z,t);case p.oS0.TYPE_IMAGE:return a().createElement(W,t);default:return a().createElement(N,t)}}}.build(t.attributeType.type,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){B(e,t,r[t])}))}return e}({},t,{parentUri:s,onDelete:r,onEdit:n,onPin:l,onIgnore:o,onAdd:i,disableEdit:c,disableDelete:c}))}));var H=r(95629),Y=r(87760);const _=e=>{let{value:{values:t,attributeType:r}}=e;const n=E();return a().createElement("div",{className:n.cellValueWrapper},a().createElement(H.Z,{className:n.attributeTitle,label:r.label}),a().createElement(Y.Z,{values:t,attributeType:r,valueContainerClassName:n.ovValue}))},G=e=>{let{value:t}=e;const r=E();return a().createElement("div",{className:i()(r.cellValueWrapper,r.count)},t)};var q=r(94079),X=r(87685),$=r(99144),Q=r(8818),J=r(94175);const K=e=>{let{sourcesUriOrder:t}=e;const r=E(),n=(0,l.useSelector)(u.ZP.selectors.getMetadata);return a().createElement(a().Fragment,null,t.map((e=>a().createElement(q.ListItem,{key:e,className:r.popupItem},a().createElement(J.Z,{className:r.sourceIcon,sourceType:e}),a().createElement(q.ListItemText,{primary:(0,p.tH7)(n,e),primaryTypographyProps:{variant:"body2"}})))))},ee=e=>{let{attributeUri:t}=e;const r=E(),n=(0,l.useSelector)(u.ZP.selectors.getMetadata),o=(0,p.zeJ)(n,t);return a().createElement(q.ListItem,{key:o.uri,className:r.popupItem},a().createElement(q.ListItemText,{primary:(0,p.idV)(o.label),primaryTypographyProps:{variant:"body2"}}))},te=(0,y.cond)([[(0,y.prop)("sourcesUriOrder"),()=>c().text("Source sequence")],[(0,y.prop)("primaryAttributeUri"),()=>c().text("Attribute winner")],[(0,y.prop)("comparisonAttributeUri"),()=>c().text("Comparison attribute")]]),re=(0,y.cond)([[(0,y.prop)("sourcesUriOrder"),e=>{let{sourcesUriOrder:t}=e;return a().createElement(K,{sourcesUriOrder:t})}],[(0,y.prop)("primaryAttributeUri"),e=>{let{primaryAttributeUri:t}=e;return a().createElement(ee,{attributeUri:t})}],[(0,y.prop)("comparisonAttributeUri"),e=>{let{comparisonAttributeUri:t}=e;return a().createElement(ee,{attributeUri:t})}]]),ne=e=>{let{info:t}=e;const r=E(),[l,o]=(0,n.useState)(null),i=()=>o(null);return a().createElement(a().Fragment,null,a().createElement(Q.k,{icon:$.Z,tooltipTitle:c().text("View details"),size:"XS",onClick:e=>o(e.currentTarget)}),a().createElement(q.Popover,{classes:{paper:r.rulePopup},open:!!l,anchorEl:l,onClose:i,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"}},a().createElement("div",{className:r.popupTitleWrapper},a().createElement(q.IconButton,{className:r.closeButton,onClick:i},a().createElement(X.default,null)),a().createElement(q.Typography,{variant:"subtitle1",className:r.popupTitle},te(t))),a().createElement(q.List,{component:"div",className:r.popupItemsWrapper},re(t))))},ae=e=>{let{value:{ruleType:t,sourcesUriOrder:r,primaryAttributeUri:n,comparisonAttributeUri:l}}=e;const o=E(),s=r||n||l;return a().createElement("div",{className:i()(o.cellValueWrapper,o.ruleType)},a().createElement("div",{className:o.ruleTypeLabel},t.label),s&&a().createElement(ne,{info:{sourcesUriOrder:r,primaryAttributeUri:n,comparisonAttributeUri:l}}))};var le=r(63149),oe=r(40625);const ie=e=>{let{crosswalk:t}=e;const r=E(),n=(0,l.useSelector)(u.ZP.selectors.getMetadata),{isDimmed:o,highlightCrosswalk:i,removeHighlight:s}=(0,le.pu)(t);return a().createElement(oe.Z,{className:r.winnerSourceItem,color:(0,p.CJp)((0,p.uKF)(t)),opacity:o?.19:1,onMouseEnter:()=>i(),onMouseLeave:()=>s()},a().createElement(J.Z,{className:r.sourceIcon,sourceType:t.type}),a().createElement(q.ListItemText,{primary:(0,p.tH7)(n,t.type),primaryTypographyProps:{variant:"body2"},classes:{primary:r.winnerSourceItemLabel}}))},se=e=>{let{value:{crosswalks:t}}=e;const r=E();return a().createElement(q.List,{component:"div"},t.map((e=>a().createElement(q.ListItem,{key:e.uri,className:r.winnerSourceItemWrapper},a().createElement(ie,{crosswalk:e})))))},ce=[{id:"ovValues",get label(){return c().text("Attributes & OV")},hideable:!1,initialWidth:360,minWidth:250},{id:"winnerSources",get label(){return c().text("Winner source systems")},initialWidth:220},{id:"ruleType",get label(){return c().text("Rule type")},initialWidth:200},{id:"count",get label(){return c().text("Count")},initialWidth:80,minWidth:80},{id:"values",get label(){return c().text("Attribute values")},hideable:!1}],ue=e=>(0,p.OXP)(e)&&!(0,p.ZiX)(e.uri),pe=["ovValues","ruleType","values"],de=e=>{switch(e){case"ovValues":return _;case"values":return F;case"count":return G;case"ruleType":return ae;case"winnerSources":return se;default:return I}},me=(0,y.pipe)(p.cwx,(0,y.sortWith)([(0,y.descend)((0,y.propOr)(-1,"priority"))]),(0,y.map)((0,y.prop)("uri"))),be=(0,y.curry)(((e,t)=>(0,p.YkG)(e)&&t&&(0,y.pipe)(p.c31,(0,y.find)((r=>r.slice((0,p.u5q)(r).length)===t.slice(e.uri.length))))(e)||t)),ge=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;return(0,y.pipe)((0,y.filter)(ue),(0,y.chain)((e=>(0,y.pipe)((0,y.pickBy)(((t,r)=>{const n=(0,p.sOy)(r,e.uri),a=n?r.slice(e.uri.length+1):"",l=a&&(0,p.IM5)(e.value,a);return n&&(!l||ue(l))})),y.values,y.flatten)(t))),(0,y.uniqBy)((0,y.prop)("uri")))(e)},fe=(0,y.map)((e=>{let{id:t,label:r,initialWidth:n,minWidth:a}=e;return{id:t,label:r,initialWidth:n,minWidth:a,autoResize:!n,resizable:!0,sortable:!1,headCellRenderer:"ovValues"===t?S:w,rowCellValueRenderer:de(t)}})),ye=(e,t,r,n,a,l,o)=>{switch(e){case"ovValues":return{attributeType:n,values:null==l?void 0:l.filter(ue)};case"values":return{attributeType:n,attributeValues:l,crosswalksMap:a};case"count":return function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2?arguments[2]:void 0;switch(e){case p.oS0.TYPE_REFERENCE:case p.oS0.TYPE_NESTED:case p.oS0.TYPE_IMAGE:return t.length;default:return t.reduce(((e,t)=>e+r[t.uri].length),0)}}(n.type,l,a);case"ruleType":return((e,t,r,n)=>{var a,l;const o=[...e.entityTypes,...e.relationTypes||[]].find((0,y.propEq)("uri",r)),i=null!==(a=null==o?void 0:o.survivorshipGroups)&&void 0!==a?a:[],s=n&&i.find((0,y.propEq)("uri",n))||i.find((0,y.propEq)("default",!0)),c=null==s||null===(l=s.mapping)||void 0===l?void 0:l.find((0,y.propEq)("attribute",t.uri)),u=(0,p.o_J)(e,null==c?void 0:c.survivorshipStrategy)||(0,p.Xaq)(e),d=(e=>"configuration/survivorshipStrategies/SRC_SYS"===(null==e?void 0:e.uri))(u)?(0,y.uniq)([...(null==c?void 0:c.sourcesUriOrder)||[],...(null==s?void 0:s.sourcesUriOrder)||[],...me(e)]):void 0,m=be(t),b=(e=>"configuration/survivorshipStrategies/OtherAttributeWinnerCrosswalk"===(null==e?void 0:e.uri))(u)?m(null==c?void 0:c.primaryAttributeUri):void 0,g=(0,p.YkM)(t)&&(e=>"configuration/survivorshipStrategies/MinValue"===(null==e?void 0:e.uri)||"configuration/survivorshipStrategies/MaxValue"===(null==e?void 0:e.uri))(u)?m(null==c?void 0:c.comparisonAttributeUri):void 0;return{ruleType:u,sourcesUriOrder:d,primaryAttributeUri:b,comparisonAttributeUri:g}})(t,n,r,o);case"winnerSources":return{crosswalks:ge(l,a)};default:return null}};function ve(){return ve=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ve.apply(this,arguments)}const he=e=>{let{cell:t,CellValueRenderer:r,columnIndex:n,columnData:l}=e,o=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["cell","CellValueRenderer","columnIndex","columnData"]);const s=E(),c=0===n;return a().createElement("div",{className:i()(s.rowCell,c&&s.coloredCell),"data-reltio-id":`column-name-${l.id}`},t.values.map(((e,t)=>a().createElement(r,ve({key:t,value:e},o)))))};var Ee=r(99136),we=r(85209),xe=r(31276);const Oe=e=>{let{open:t,onClose:r,onConfirmEditWithoutIgnore:l,onConfirmEditWithIgnore:o}=e;const[i,s]=(0,n.useState)("without");return a().createElement(q.Dialog,{open:t,onEnter:()=>s("without")},a().createElement(q.DialogContent,null,a().createElement(q.DialogContentText,null,c().text("You are attempting to change a value that is presently ignored.")),a().createElement(q.FormControl,{component:"fieldset"},a().createElement(q.FormLabel,{component:"legend"},c().text("Please choose an option:")),a().createElement(q.RadioGroup,{value:i,onChange:(0,y.pipe)(xe.NA,s)},a().createElement(q.FormControlLabel,{value:"without",control:a().createElement(q.Radio,null),label:c().text("Save without Ignore")}),a().createElement(q.FormControlLabel,{value:"with",control:a().createElement(q.Radio,null),label:c().text("Save and apply Ignore to new value")})))),a().createElement(q.DialogActions,null,a().createElement(q.Button,{onClick:r,color:"primary"},c().text("Cancel")),a().createElement(q.Button,{onClick:()=>{"with"===i?o():l(),r()},color:"primary"},c().text("Ok"))))},ke=(0,h.Z)({tableContainer:{height:"100%",overflow:"hidden",display:"flex",flexDirection:"column"},tableHeader:{display:"flex",flexDirection:"row"},tableTitle:{marginRight:"auto"},tableContent:{display:"flex",flexDirection:"column",flex:1,overflow:"hidden",position:"relative"}});function Ce(){return Ce=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ce.apply(this,arguments)}const Te=(0,n.memo)((e=>{let{entity:t,isLoading:r,crosswalksMap:o,visibleColumns:s=pe,onChangeVisibleColumns:v,readOnly:h,onDelete:E=xe.ZT,onPin:w=xe.ZT,onIgnore:x=xe.ZT,onEdit:O=xe.ZT,onAdd:k=xe.ZT,selectedAttributeTypes:C,onSelectAttributeTypes:T=xe.ZT,additionalHeaderItems:S,className:I,activeSurvivorshipGroupUri:j}=e;const Z=ke(),A=(0,n.useMemo)((()=>(0,y.pipe)((0,y.filter)((e=>{let{id:t}=e;return s.includes(t)})),fe)(ce)),[s]),{type:N,uri:P,attributes:D={}}=t||{},R=(0,l.useSelector)(u.ZP.selectors.getMetadata);(0,n.useEffect)((()=>{if(t&&(0,y.isNil)(C)){const e=(0,y.pipe)(y.keys,(0,y.without)(["paging"]),(0,y.map)((0,p.tCm)(N)),(0,y.map)((e=>(0,p.zeJ)(R,e,N))),(0,y.filter)(p.Uty))(D);T(e)}}),[t,C]);const V=(0,n.useMemo)((()=>N?function(e,t){let r=arguments.length>3?arguments[3]:void 0,n=arguments.length>4?arguments[4]:void 0,a=arguments.length>5?arguments[5]:void 0,l=arguments.length>6?arguments[6]:void 0;return(arguments.length>2&&void 0!==arguments[2]?arguments[2]:[]).map((o=>{const i=(0,p.nIW)(o.uri),s=a[i],c=(0,p.YkG)(o)?n.relation:n.entity;return(0,y.pipe)((0,y.reduce)(((r,n)=>(0,y.assoc)(n,ye(n,e,t,o,c,s,l),r)),{}),(0,y.assoc)("rawValue",s))(r)}))}(R,N,C,s,o,D,j):[]),[R,N,C,s,D,o,j]),{getDynamicRowCellHeight:M,changeRowCellHeight:z}=(0,d.Z)(),L=(0,n.useCallback)((e=>a().createElement(m.Z,Ce({onChangeHeight:z},e),a().createElement(he,e))),[z]),U=(0,n.useCallback)((0,y.either)(M,(0,y.always)(68)),[M]),[W,B]=(0,n.useState)(null),[F,H]=(0,n.useState)(null),Y=(0,n.useCallback)((e=>{e.attributeValue.ignored?H(e):O(e)}),[O,H]),_=(0,n.useMemo)((()=>({onDelete:B,onPin:w,onIgnore:x,onEdit:Y,onAdd:k,parentUri:P,parentTypeUri:N,selectedAttributeTypes:C,onSelectAttributeTypes:T,readOnly:h})),[B,w,x,Y,k,P,N,C,T,h]);return a().createElement("div",{className:i()(Z.tableContainer,I)},a().createElement(f.Z,{classes:{root:Z.tableHeader,title:Z.tableTitle},title:c().text("Sources")},S,a().createElement(b.Z,{columnsData:ce,selectedColumns:s,onChangeColumns:v})),a().createElement("div",{className:Z.tableContent},r&&a().createElement(Ee.Z,null),a().createElement(g.Z,{fixFirstColumn:!0,headRowHeight:48,defaultColumnWidth:250,defaultColumnMinWidth:200,columnsData:A,rowsData:V,renderRowCell:L,getRowCellHeight:U,context:_})),a().createElement(we.Z,{open:!!W,onClose:()=>B(null),onConfirm:()=>E(W)}),a().createElement(Oe,{open:!!F,onClose:()=>H(null),onConfirmEditWithIgnore:()=>O(F),onConfirmEditWithoutIgnore:()=>{x({attributeValue:F.attributeValue}),O(F)}}))}))},40625:(e,t,r)=>{r.d(t,{Z:()=>b});var n=r(24328),a=r.n(n),l=r(87918),o=r.n(l),i=r(71153),s=r.n(i),c=r(71519),u=r(94079);function p(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const d=(0,r(79692).Z)({item:e=>{let{color:t,opacity:r,variant:n}=e;return function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){p(e,t,r[t])}))}return e}({},"standart"===n&&{backgroundColor:t,paddingRight:"29px"},"disabled"===n&&{border:`${t} solid 2px`},{opacity:r,filter:r&&1!==r?"saturate(20%)":null,transition:"opacity 0.3s",boxSizing:"border-box"})},endDatedCrosswalkIcon:{margin:"0 4px",width:"20px",height:"20px",color:"#ff1744"}});function m(){return m=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},m.apply(this,arguments)}const b=(0,n.forwardRef)(((e,t)=>{let{color:r,opacity:n,variant:l="standart",children:i,className:p}=e,b=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["color","opacity","variant","children","className"]);const g=d({color:r,opacity:n,variant:l});return a().createElement("div",m({ref:t,className:s()(g.item,p)},b),i,"disabled"===l&&a().createElement(u.Tooltip,{title:o().text("End-dated crosswalk")},a().createElement(c.Z,{className:g.endDatedCrosswalkIcon})))}))},61305:(e,t,r)=>{r.d(t,{Z:()=>P});var n=r(24328),a=r.n(n),l=r(52730),o=r(85209),i=r(90473),s=r(31517),c=r(8818),u=r(94175),p=r(81174),d=r(94079),m=r(22983),b=r(55046),g=r(17440),f=r(87918),y=r.n(f),v=r(49885),h=r(22385);function E(){return E=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},E.apply(this,arguments)}const w=e=>a().createElement("svg",E({width:24,height:24,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},e),a().createElement("defs",null,a().createElement("path",{d:"M20.222 6C21.21 6 22 6.8 22 7.778v12.444C22 21.2 21.209 22 20.222 22H7.778C6.79 22 6 21.2 6 20.222V7.778C6 6.8 6.791 6 7.778 6h12.444zM20 8H8v12h12V8zM4 18H2V4c0-1.1.9-2 2-2h14v2H4v14z",id:"Copy_svg__a"})),a().createElement("g",{stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a().createElement("mask",{id:"Copy_svg__b",fill:"#fff"},a().createElement("use",{xlinkHref:"#Copy_svg__a"})),a().createElement("path",{fillOpacity:.54,fill:"#000",mask:"url(#Copy_svg__b)",d:"M0 0h24v24H0z"})));var x=r(79692);const O=(0,x.Z)((()=>({root:{display:"flex",justifyContent:"space-between",alignItems:"center",overflowWrap:"anywhere"},text:{fontSize:13},button:{flexShrink:0,marginLeft:8,padding:0,textTransform:"none"}}))),k=e=>{let{value:t}=e;const r=O();return a().createElement("div",{className:r.root},a().createElement(d.Typography,{className:r.text,variant:"body2"},t),a().createElement(h.Z,{size:"XXS",icon:w,color:"primary",className:r.button,onClick:()=>navigator.clipboard.writeText(t)}))};var C=r(71153),T=r.n(C),S=r(43305);const I=(0,x.Z)((()=>({timestampEditorInput:{paddingTop:15,paddingBottom:15,fontSize:13},timestampEditor:{height:38}}))),j=e=>{let{value:t,classes:r={},disabled:l=!1,onChange:o}=e;const i=I(),[s,c]=(0,n.useState)(!1),u=e=>o(null==e?void 0:e.valueOf());return a().createElement(S.Z,{variant:"filled",value:t||null,disabled:l,onChange:(0,g.unless)((0,g.always)(s),u),onAccept:u,onOpen:()=>c(!0),onClose:()=>c(!1),InputProps:{disableUnderline:!0,classes:{input:i.timestampEditorInput,root:T()(i.timestampEditor,r.root)}}})};var Z=r(95038),A=r.n(Z);const N=(0,x.Z)((e=>({text:{fontSize:13},attributeWrapper:{display:"flex",alignItems:"center",paddingTop:5,paddingBottom:5,marginLeft:12},attributeTitle:{fontSize:13,width:135,color:e.palette.text.secondary},attributeValue:{paddingLeft:10,display:"flex",alignItems:"center",flexGrow:1},input:{paddingTop:14,paddingBottom:14,fontSize:13},editor:{flexGrow:1},moreButton:{marginLeft:24},sourceIcon:{height:"16px",width:"16px",marginRight:"9px",fontSize:"14px"}}))),P=e=>{let{crosswalk:t,canEditAttribute:r=!0,onEditAttribute:f,onDeleteAttribute:h}=e;const E=N(),w=!("uri"in t),x=(0,l.useSelector)(v.ZP.selectors.getMetadata),[O,C]=(0,n.useState)([]),[T,S]=(0,n.useState)(null),I=(0,n.useMemo)((()=>[{label:b.G39.sourceSystems.label,uri:"type"},{label:b.G39.value.label,uri:"value"},{label:b.G39.sourceTable.label,uri:"sourceTable",canBeAdded:w,canBeDeleted:w},{label:b.G39.createDate.label,uri:"createDate"},{label:b.G39.updateDate.label,uri:"updateDate"},{label:b.G39.deleteDate.label,uri:"deleteDate",canBeAdded:!0,canBeDeleted:!0},{label:b.G39.reltioLoadDate.label,uri:"reltioLoadDate"},{label:b.G39.publishDate.label,uri:"sourcePublishDate"}]),[]),Z=(0,g.pipe)((0,g.filter)((0,g.propEq)("canBeAdded",!0)),(0,g.filter)((e=>!(0,g.has)(e.uri,t))),(0,g.filter)((e=>!O.includes(e.uri))))(I);return a().createElement(a().Fragment,null,Z.length>0&&r&&a().createElement(i.Z,{label:y().text("Add attributes"),onApply:e=>{e.length>0&&C((t=>t.concat((0,g.map)((0,g.prop)("uri"),e))))},data:Z}),I.map((e=>e.uri in t||O.includes(e.uri)?a().createElement("div",{key:e.uri,className:E.attributeWrapper},a().createElement(d.Typography,{variant:"body2",className:E.attributeTitle},`${e.label}:`),a().createElement("div",{className:E.attributeValue},((e,t)=>{switch(e){case"type":{const r=(0,b.tH7)(x,t);return w?a().createElement(s.Z,{label:"",placeholder:t,className:E.editor,value:{value:t,label:r},options:(0,b.cwx)(x).sort((0,g.ascend)((0,g.prop)("label"))).map((e=>{let{uri:t,label:r}=e;return{value:t,label:r}})),onChange:t=>{let{value:r}=t;return f(e,r)},TextFieldProps:{InputProps:{disableUnderline:!0}}}):a().createElement(a().Fragment,null,a().createElement(u.Z,{className:E.sourceIcon,sourceType:t}),a().createElement(d.Typography,{className:E.text,variant:"body2"},r))}case"sourceTable":return w?a().createElement(p.Z,{multiple:!1,multiline:!1,getValueLabel:void 0,classes:{root:E.editor},required:!0,variant:"filled",value:t,onInput:t=>f(e,t.target.value),margin:"dense",InputProps:{disableUnderline:!0,classes:{input:E.input}}}):a().createElement(d.Typography,{className:E.text,variant:"body2"},t);case"value":return w?a().createElement(p.Z,{multiple:!1,multiline:!1,getValueLabel:void 0,classes:{root:E.editor},required:!0,variant:"filled",value:t,onInput:t=>f(e,t.target.value),margin:"dense",InputProps:{disableUnderline:!0,classes:{input:E.input}}}):a().createElement(k,{value:t});case"deleteDate":return a().createElement(j,{value:t&&A().utc((0,b.ZBU)(t)).valueOf(),onChange:t=>f(e,null==t?void 0:t.toString()),classes:{root:E.editor},disabled:!r});case"sourcePublishDate":case"createDate":case"updateDate":case"reltioLoadDate":return a().createElement(d.Typography,{className:E.text,variant:"body2"},(0,b.o0x)(t));default:return null}})(e.uri,t[e.uri]),e.canBeDeleted&&a().createElement(c.k,{icon:m.Z,disabled:!r,onClick:()=>S(e.uri),size:"XS",tooltipTitle:y().text("Delete attribute"),showForDisabled:!0}))):null)),a().createElement(o.Z,{open:!!T,onClose:()=>S(null),onConfirm:()=>{return e=T,C((t=>(0,g.without)([e],t))),void((0,g.isNil)(t[e])||h(e));var e}}))}},48017:(e,t,r)=>{r.d(t,{Z:()=>g});var n=r(24328),a=r.n(n),l=r(13896),o=r(52730),i=r(55046),s=r(40625),c=r(63149),u=r(94175),p=r(94079),d=r(49885);const m=(0,r(79692).Z)({dragLayer:{position:"fixed",top:0,left:0,width:"100%",height:"100%",overflow:"hidden",zIndex:1300,pointerEvents:"none"},crosswalkPreview:{height:"28px",maxWidth:"394px",display:"flex",overflow:"hidden",padding:"6px",alignItems:"center",boxSizing:"border-box"},sourceLabel:{fontSize:"13px",whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden"},sourceIcon:{width:"16px",height:"16px",marginRight:"9px"}}),b=e=>{let{crosswalk:t}=e;const r=m(),n=(0,c.nX)(t),l=(0,o.useSelector)(d.ZP.selectors.getMetadata),b=(0,i.tH7)(l,t.type);return a().createElement(s.Z,{color:n,className:r.crosswalkPreview},a().createElement(u.Z,{className:r.sourceIcon,sourceType:t.type}),a().createElement(p.Typography,{className:r.sourceLabel,variant:"body2"},b))},g=(0,n.memo)((()=>{var e;const t=m(),{isDragging:r,clientOffset:o,item:i}=(0,l.useDragLayer)((e=>({isDragging:e.isDragging(),clientOffset:e.getClientOffset(),item:e.getItem()}))),s=(0,n.useRef)(),c=(null===(e=s.current)||void 0===e?void 0:e.getBoundingClientRect())||{x:0,y:0},u=`translate(${(null==o?void 0:o.x)-(null==c?void 0:c.x)}px, ${(null==o?void 0:o.y)-(null==c?void 0:c.y)}px`;return r&&a().createElement("div",{ref:s,className:t.dragLayer},a().createElement("div",{style:{display:"flex",transform:u,WebkitTransform:u}},"Crosswalk"===i.type&&a().createElement(b,{crosswalk:i.crosswalk})))}))},79769:(e,t,r)=>{r.d(t,{Z:()=>p});var n=r(24328),a=r.n(n),l=r(87918),o=r.n(l),i=r(94079),s=r(61305),c=r(17440);const u=(0,r(79692).Z)({caption:{paddingLeft:15,paddingTop:16,paddingBottom:8},controlButtons:{display:"flex",justifyContent:"flex-end",paddingBottom:10,paddingTop:20},cancelButton:{marginRight:20}}),p=e=>{let{className:t,onAdd:r,onClose:l}=e;const p=u(),[d,m]=(0,n.useState)({type:"",value:""});return a().createElement("div",{className:t},a().createElement(i.Typography,{variant:"body1",className:p.caption},o().text("Add crosswalk")),a().createElement(s.Z,{crosswalk:d,onDeleteAttribute:e=>{m((0,c.dissoc)(e))},onEditAttribute:(e,t)=>{m((0,c.assoc)(e,t))}}),a().createElement("div",{className:p.controlButtons},a().createElement(i.Button,{className:p.cancelButton,onClick:l},o().text("Cancel")),a().createElement(i.Button,{color:"primary",onClick:()=>{r(d),l()},disabled:!d.type||!d.value},o().text("Add"))))}},52017:(e,t,r)=>{r.d(t,{Z:()=>D});var n=r(24328),a=r.n(n),l=r(63149),o=r(77243),i=r(55046),s=r(52730),c=r(94079),u=r(72753),p=r(94175),d=r(22385),m=r(49885),b=r(79692);const g=(0,b.Z)((()=>({root:e=>{let{isOpaque:t}=e;return{display:"flex",opacity:t?1:.38,transition:"opacity 0.3s"}},wrapper:{width:"100%",display:"flex",alignItems:"center",height:28,backgroundImage:"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNXG14zYAAAAWdEVYdENyZWF0aW9uIFRpbWUAMDcvMjYvMTMEw7WpAAAAeElEQVQ4ja3VuwrAIBBE0aup0uX/v9ImCCGSdIL4WF136+EwxcC6+3k/hAsxSREArvPAW2LAGFzFhqAG64JarAnuYBW4ixWgBZZBKwzAW2Ig7HAVCzHJ4AoGQsNVbAhqsC6oxZrgDlaBu1gBWmAZtMIA3MwLmMUAfmyqQ9/LD+oDAAAAAElFTkSuQmCC)"},focusedIcon:{width:28,height:28,backgroundColor:"rgba(0, 0, 0, 0.12)",borderRadius:0,borderRight:"1px solid #fff"},sourceIcon:{height:"16px",width:"16px",marginLeft:"16px",marginRight:"9px",fontSize:"14px"}}))),f=(0,n.memo)((e=>{let{crosswalkType:t,focusable:r=!0}=e;const{isDimmed:n}=(0,l.pu)(),o=g({isOpaque:!n}),b=(0,s.useSelector)(m.ZP.selectors.getMetadata),f=(0,i.tH7)(b,t);return a().createElement("div",{className:o.root},a().createElement(d.Z,{size:"XXS",className:o.focusedIcon,icon:r&&u.Z,disabled:!0}),a().createElement("div",{className:o.wrapper},a().createElement(p.Z,{className:o.sourceIcon,sourceType:t}),a().createElement(c.Typography,{variant:"body2"},f)))}));var y=r(87918),v=r.n(y),h=r(22983),E=r(19592),w=r(95613),x=r(40625),O=r(85209),k=r(8818),C=r(51229),T=r(71543),S=r(13896),I=r(42484),j=r(61305);const Z=(0,b.Z)({root:e=>{let{isOpaque:t}=e;return{display:"flex",filter:t?null:"saturate(20%)",opacity:t?1:.19,transition:"opacity 0.3s"}},header:{width:"100%",display:"flex",alignItems:"center",height:"28px"},focusedIcon:e=>{let{isFocused:t}=e;return{width:"26px","&:not([disabled])":{border:"1px solid rgba(0, 0, 0, 0.12)"},height:"28px",color:t?"#000":"rgba(0, 0, 0, 0.54)",borderRadius:0,margin:"0px 1px"}},crosswalkWrapper:{width:"100%",overflow:"hidden"},sourceIcon:{height:"16px",width:"16px",marginRight:"9px",fontSize:"14px"},attributesWrapper:e=>{let{color:t}=e;return{border:"1px solid",borderColor:t,position:"relative"}},deleteCrosswalkButton:{position:"absolute",top:5,right:5},labelValue:{marginLeft:5},dependentIcon:{width:"16px",height:"16px",fillOpacity:.38}}),A=(0,n.memo)((e=>{let{crosswalk:t,isDependent:r,isEmpty:o=!1,isColored:d=!0,focusable:b=!0,disableEdit:g,disableDelete:f,onDelete:y,onEdit:A}=e;const N=(0,n.useRef)(null),P=(0,l.nX)(t),{toggleCrosswalkFocus:D,isFocused:R}=(0,l.BF)(t),V=o?"#FFF":d?P:"#CACCD1",{isDimmed:M,highlightCrosswalk:z,removeHighlight:L}=(0,l.pu)(t),[U]=(0,l.RT)(),W=Z({color:V,isOpaque:!M,isFocused:R}),[B,F]=(0,n.useState)(!1),[H,Y]=(0,n.useState)(!1),_=(0,s.useSelector)(m.ZP.selectors.getMetadata),G=(0,i.tH7)(_,t.type),q=(0,i.nIW)(t.uri),X=(0,i.x_)(t),[,$,Q]=(0,S.useDrag)({item:{type:"Crosswalk",crosswalk:t},canDrag:!X}),J=!X&&"relation"!==t.ownerType;return(0,n.useEffect)((()=>{Q((0,I.r)(),{captureDraggingState:!0})}),[]),(0,n.useEffect)((()=>{var e;b&&U&&(0,i.aFF)(U,t)&&U!==t&&(null==N||null===(e=N.current)||void 0===e||e.scrollIntoView({behavior:"smooth"}))}),[U]),a().createElement("div",{className:W.root,ref:N},a().createElement(k.k,{size:"XXS",className:W.focusedIcon,icon:b&&u.Z,onClick:()=>D(),disabled:!b,tooltipTitle:b&&v().text("Focus")}),a().createElement("div",{className:W.crosswalkWrapper},a().createElement(x.Z,{ref:$,className:W.header,color:V,variant:X?"disabled":"standart",onMouseEnter:()=>z(),onMouseLeave:()=>L()},r&&a().createElement(T.Z,{className:W.dependentIcon}),a().createElement(E.Z,{onClick:()=>F((e=>!e)),expanded:B}),a().createElement(p.Z,{className:W.sourceIcon,sourceType:t.type}),a().createElement(w.Z,{value:G},a().createElement(c.Typography,{variant:"body2",noWrap:!0},G)),a().createElement(C.Z,null),a().createElement(w.Z,{value:t.value},a().createElement(c.Typography,{variant:"body2",className:W.labelValue,noWrap:!0},t.value))),B&&a().createElement("div",{className:W.attributesWrapper},J&&a().createElement("div",{className:W.deleteCrosswalkButton},a().createElement(k.k,{icon:h.Z,disabled:f,onClick:()=>Y(!0),size:"XS",tooltipTitle:f?v().text("You don't have permissions to delete"):v().text("Delete crosswalk"),showForDisabled:!0}),a().createElement(O.Z,{open:H,onConfirm:()=>{R&&D(),y(q)},onClose:()=>Y(!1)})),a().createElement(j.Z,{crosswalk:t,canEditAttribute:!g,onEditAttribute:(e,t)=>{A({crosswalkId:q,attributeName:e,value:t})},onDeleteAttribute:e=>{A({crosswalkId:q,attributeName:e})}}))))})),N=(0,b.Z)((()=>({root:{display:"flex",alignItems:"center",height:"28px",paddingLeft:"37px"}}))),P=e=>{let{showMore:t,onClick:r}=e;const n=N();return a().createElement(c.Link,{className:n.root,component:"button",variant:"caption",underline:"none",onClick:r},a().createElement("span",null,t?v().text("View dependent crosswalks"):v().text("Hide dependent crosswalks")))},D=e=>{let{source:t,crosswalksByTypes:r,showCrosswalkColors:s=!0,crosswalksFocusEnabled:c=!0,expanded:u,disableEditCrosswalk:p,disableDeleteCrosswalk:d,onEdit:m,onDelete:b,onToggleExpanded:g}=e;const y=(0,l.RT)();return(0,n.useEffect)((()=>{!u&&c&&r[o.Y.Dependent].some((e=>y.some((0,i.aFF)(e))))&&g()}),[y]),a().createElement(a().Fragment,null,0===r[o.Y.Simple].length&&0===r[o.Y.Empty].length&&a().createElement(f,{crosswalkType:t,focusable:c}),r[o.Y.Simple].map((e=>a().createElement(A,{key:e.uri,crosswalk:e,focusable:c,disableEdit:p,disableDelete:d,onDelete:b,onEdit:m,isColored:s}))),r[o.Y.Empty].map((e=>a().createElement(A,{key:e.uri,crosswalk:e,focusable:c,isEmpty:!0,disableEdit:p,disableDelete:d,onDelete:b,onEdit:m,isColored:s}))),u&&r[o.Y.Dependent].map((e=>a().createElement(A,{key:e.uri,crosswalk:e,isDependent:!0,disableEdit:p,disableDelete:d,onDelete:b,onEdit:m,focusable:c,isColored:s}))),r[o.Y.Dependent].length>0&&a().createElement(P,{showMore:!u,onClick:()=>g()}))}},39417:(e,t,r)=>{r.d(t,{P:()=>i});var n=r(24328),a=r(17440),l=r(55046),o=r(31276);const i=e=>{let{onLoad:t=o.ZT,onSuccess:r=o.ZT,onError:i=o.ZT}=e;const s=(0,n.useCallback)((e=>{t(),e.then((e=>{let{errors:t}=e;if(t)throw t;r()})).catch(i)}),[t,i,r]);return{addCrosswalk:(0,n.useCallback)((e=>{let{entity:t,contributorCrosswalk:r,crosswalk:n}=e;const o=r?(0,l.psB)({entityTypeUri:t.type,contributorCrosswalkType:r.type,contributorCrosswalkValue:r.value,contributorCrosswalkSourceTable:r.sourceTable,crosswalkType:n.type,crosswalkValue:n.value,crosswalkSourceTable:n.sourceTable,crosswalkDeleteDate:n.deleteDate}):(0,l.kRE)({entityUri:t.uri,crosswalk:n});(0,a.pipe)((0,a.andThen)((e=>{let[t]=e;return t})),s)(o)}),[s]),editCrosswalk:(0,n.useCallback)((e=>{let{entityUri:t,crosswalkId:r,attributeName:n,value:o}=e;(0,a.pipe)((0,a.ifElse)((e=>{let{value:t}=e;return(0,a.isNil)(t)}),l.K$w,l.WVU),(0,a.andThen)((e=>{let[t]=e;return t})),s)({entityUri:t,crosswalkId:r,attributeName:n,value:o})}),[s]),deleteCrosswalk:(0,n.useCallback)((e=>{let{entityUri:t,crosswalkId:r}=e;(0,a.pipe)(l.Gmt,s)({entityUri:t,crosswalkId:r})}),[s])}}},85965:(e,t,r)=>{r.d(t,{Q:()=>u});var n=r(24328),a=r(55046),l=r(17440),o=r(31276);function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){s(e,t,r[t])}))}return e}function s(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const c=[],u=e=>{let{entity:t,onLoad:r=o.ZT,onModify:s=o.ZT,onError:u=o.ZT}=e;const[p,d]=(0,n.useState)(null),[m,b]=(0,n.useState)(null),g=(0,n.useRef)([]),f=(0,n.useRef)(null),y=(0,n.useCallback)((()=>{f.current=null}),[]),[v,h]=(0,n.useState)(c),E=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.reduce(((e,t)=>((0,a.sJj)(t).forEach((r=>{e[r]=[...e[r]||[],t]})),e)),{})};(0,n.useEffect)((()=>{const e={entity:E(null==t?void 0:t.crosswalks),relation:(0,l.pipe)(a.PUO,E)(t)};if((null==p?void 0:p.uri)===(null==t?void 0:t.uri)&&f.current){const{ownerType:t}=f.current,r=Object.keys(e[t]),n=Object.keys(m[t]);h((0,l.difference)(r,n))}else h(c);y(),d(t),b(e),g.current=[]}),[t]);const w=(0,n.useCallback)((0,l.pipe)(u,y),[u,y]),{deleteAttribute:x,ignoreAttribute:O,pinAttribute:k,createAttribute:C,updateAttribute:T}=(e=>{let{onSuccess:t=o.ZT,onError:r=o.ZT,onLoad:i=o.ZT}=e;const s=(0,n.useCallback)((e=>{i(),e.then((()=>{t()})).catch(r)}),[r,t,i]),c=(0,n.useCallback)((e=>e.then((e=>{if("error"in e)throw e.error;return e}))),[]);return{deleteAttribute:(0,n.useCallback)((e=>{let{attributeValue:t,attributeType:r,crosswalks:n}=e;const o=(0,a.YkG)(r)?(0,l.pipe)(a.o96,(0,l.prop)("objectURI"),a.VGk,c)(t):Promise.all((n||[]).map((e=>{let{type:r,value:n,sourceTable:l}=e;return c((0,a.xZs)({attributeUri:t.uri,sourceUri:r,crosswalkValue:n,crosswalkSourceTable:l}))})));s(o)}),[s,c]),pinAttribute:(0,n.useCallback)((e=>{let{attributeValue:t}=e;(0,l.pipe)(a.xkv,c,s)({attributeUri:t.uri,value:!t.pin})}),[s,c]),ignoreAttribute:(0,n.useCallback)((e=>{let{attributeValue:t}=e;(0,l.pipe)(a.P8_,c,s)({attributeUri:t.uri,value:!t.ignored})}),[s,c]),updateAttribute:(0,n.useCallback)((e=>{let{attributeValue:t,attributeType:r,crosswalk:n}=e;(0,a.YkM)(r)||(0,a.Or$)(r)||(0,l.pipe)(a.tCj,c,s)({attributeUri:t.uri,sourceUri:n.type,crosswalkValue:n.value,crosswalkSourceTable:n.sourceTable,value:(0,a.CwH)(r)?t.lookupCode:t.value})}),[s,c]),createAttribute:(0,n.useCallback)((e=>{let{attributeValue:t,crosswalk:r}=e;(0,l.pipe)(a.JV_,(0,l.andThen)((e=>{let[{errors:t}]=e;if(t)throw t})),s)({attributeUri:t.uri,sourceUri:r.type,crosswalkValue:r.value,crosswalkSourceTable:r.sourceTable,value:t.value})}),[s])}})({onLoad:r,onSuccess:s,onError:w}),S=(0,n.useCallback)((e=>{let{attributeType:t,parentUri:r,crosswalk:n,index:o}=e;const s=(0,a.gjI)({parentUri:r,attributeType:t}),{uri:c}=s;if(n){const{ownerType:e}=n;b((t=>i({},t,{[e]:i({},t[e],{[c]:[n]})})))}d((e=>{var n;return(0,l.isNil)(o)&&(o=null===(n=(0,a.JQy)(e,r,t.name))||void 0===n?void 0:n.length),(0,a.wLZ)({entity:e,attributeType:t,newAttribute:s,index:o})})),g.current.some((e=>(0,a.sOy)(c,e)))||g.current.push(c)}),[]),I=(0,n.useCallback)((e=>{const{attributeValue:{uri:t},attributeType:r}=e;(0,a.ZiX)(t)?(d((e=>(0,a.d$I)({entity:e,attributeType:r,uri:t}))),b((0,l.evolve)({entity:(0,l.dissoc)(t),relation:(0,l.dissoc)(t)})),g.current=(0,l.without)([t],g.current)):x(e)}),[x]),j=(0,n.useCallback)((e=>{if((0,a.ZiX)(e.attributeValue.uri)){const{attributeValue:t,attributeType:r,crosswalk:n}=e;if(!(0,l.isNil)(t.value)){const{uri:e}=t,l=g.current.find((t=>(0,a.sOy)(e,t))),o=(0,a.ww$)({entity:p,attributeType:r,uri:e,value:(0,a.kDl)(t)});C({attributeValue:(0,a.dLR)(o,l),crosswalk:n}),f.current=n}}else T(e)}),[C,T,p]);return{modifiedEntity:p,crosswalksMap:m,onAddAttribute:S,onDeleteAttribute:I,onPinAttribute:k,onIgnoreAttribute:O,onEditAttribute:j,newlyCreatedAttributes:v}}},77243:(e,t,r)=>{let n;r.d(t,{Y:()=>n}),function(e){e.Simple="simple",e.Empty="empty",e.Dependent="dependent"}(n||(n={}))},90186:(e,t,r)=>{r.d(t,{o:()=>s});var n=r(55046),a=r(17440),l=r(77243);const o=e=>e[l.Y.Simple].length>0?1:e[l.Y.Dependent].length>0?e[l.Y.Empty].length>0?2:3:4,i=(0,a.evolve)({[l.Y.Dependent]:(0,a.sort)(((e,t)=>{const r=e.sourceTable||"",n=t.sourceTable||"";return r===n?0:r?n?r<n?-1:1:-1:1}))}),s=(0,a.curry)(((e,t,r)=>{const s=(r||[]).reduce(((r,o)=>(r[o.type]||(r[o.type]={[l.Y.Simple]:[],[l.Y.Empty]:[],[l.Y.Dependent]:[]}),"relation"===o.ownerType?r[o.type][l.Y.Dependent].push(o):((e,t,r)=>0===(0,n.sJj)(r).filter((r=>{const l=(0,n.AFK)(r,e);return t.some((0,a.propEq)("uri",l))})).length)(e,t,o)?r[o.type][l.Y.Empty].push(o):((e,t,r)=>!(0,n.sJj)(r).some((r=>{const l=(0,n.AFK)(r,e),o=t.find((0,a.propEq)("uri",l));return o&&!(0,n.YkM)(o)})))(e,t,o)?r[o.type][l.Y.Dependent].push(o):r[o.type][l.Y.Simple].push(o),r)),{});return Object.keys(s).sort(((e,t)=>o(s[e])-o(s[t])||(e<t?-1:1))).map((e=>({source:e,crosswalksByTypes:i(s[e])})))}))},63149:(e,t,r)=>{r.d(t,{hR:()=>c,nX:()=>u,RT:()=>p,pu:()=>d,BF:()=>m});var n=r(24328),a=r.n(n),l=r(55046),o=r(17440),i=r(31276);const s=(0,n.createContext)(null),c=e=>{let{children:t}=e,r=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["children"]);return a().createElement(s.Provider,{value:r},t)},u=e=>{const{getCrosswalkColor:t=(0,o.pipe)(l.uKF,l.CJp)}=(0,n.useContext)(s)||{};return e?t(e):""},p=()=>{const{highlightedCrosswalks:e=[]}=(0,n.useContext)(s)||{};return e},d=e=>{const{highlightedCrosswalks:t=[],setCrosswalkHighlighted:r=i.ZT}=(0,n.useContext)(s)||{},a=!!e&&!!t.find((0,o.eqBy)(l.uKF,e));return{isHighlighted:a,isDimmed:t.length>0&&!a,highlightCrosswalk:(0,n.useCallback)((()=>r(e,!0)),[e,r]),removeHighlight:(0,n.useCallback)((()=>r(e,!1)),[e,r])}},m=e=>{const{toggleCrosswalkFocus:t=i.ZT,focusedCrosswalks:r=[]}=(0,n.useContext)(s)||{};return{isFocused:!!e&&r.some((0,o.eqBy)(l.uKF,e)),toggleCrosswalkFocus:(0,n.useCallback)((()=>t(e)),[e,t])}}},66095:(e,t,r)=>{r.d(t,{R:()=>i,Q:()=>s});var n=r(24328),a=r.n(n),l=r(55046);const o=(0,n.createContext)(null),i=e=>{let{children:t,attributeUris:r}=e;return a().createElement(o.Provider,{value:r},t)},s=e=>((0,n.useContext)(o)||[]).some((t=>(0,l.sOy)(t,e)))}}]);
|
|
1
|
+
"use strict";(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[6103],{97991:(e,t,r)=>{r.d(t,{Z:()=>u});var n,a=r(94079),l=r(71153),o=r.n(l),i=r(24328),s=r.n(i);function c(){return c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},c.apply(this,arguments)}!function(e){e[e.ICON_MODE=0]="ICON_MODE",e[e.TEXT_MODE=1]="TEXT_MODE",e[e.ERROR_MODE=2]="ERROR_MODE"}(n||(n={}));const u=e=>{let{className:t,icon:r,avatarText:l,rootClasses:u}=e,p=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["className","icon","avatarText","rootClasses"]);const[d,m]=(0,i.useState)(null);(0,i.useEffect)((()=>{m(r?n.ICON_MODE:n.TEXT_MODE)}),[r,l]);const b=()=>{m(n.ERROR_MODE)};switch(d){case n.ICON_MODE:return s().createElement(a.Avatar,c({className:o()(t,null==u?void 0:u.iconRoot),src:r,onError:b},p));case n.TEXT_MODE:case n.ERROR_MODE:return s().createElement(a.Avatar,c({className:o()(t,null==u?void 0:u.textRoot)},p),l);default:return null}}},74402:(e,t,r)=>{r.d(t,{Z:()=>s});var n=r(24328),a=r(17440),l=r(57014);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const i=e=>{let{rowIndex:t,columnData:{id:r},cellIndex:n}=e;return`${r}[${t}][${n}]`},s=()=>{const[e,t]=(0,n.useState)({}),r=(0,n.useRef)({}),s=(0,n.useCallback)((0,l.DsO)((()=>{t(function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){o(e,t,r[t])}))}return e}({},r.current))})),[]),c=(0,n.useCallback)((()=>{r.current={}}),[]);return{getDynamicRowCellHeight:(0,n.useCallback)((0,a.pipe)(i,(0,a.prop)(a.__,e)),[e]),changeRowCellHeight:(0,n.useCallback)((0,a.curry)((0,a.useWith)((0,a.pipe)(((e,t)=>{r.current[e]=t}),s),[i,a.identity])),[]),clearHeightsCache:c}}},97946:(e,t,r)=>{r.d(t,{Z:()=>p});var n=r(24328),a=r.n(n),l=r(13980),o=r.n(l),i=r(44443),s=r(94079),c=r(20562);const u=e=>{let{onChangeHeight:t,children:r}=e,l=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["onChangeHeight","children"]);const o=(0,n.useRef)(null),{rowValue:u,rowIndex:p,columnData:d,cellIndex:m}=l,b=t({rowIndex:p,cellIndex:m,columnData:d}),g=()=>o.current&&b(o.current.clientHeight);return(0,c.D)(g,[u.rawValue]),a().createElement("div",null,a().createElement(i.Z,{handleHeight:!0,onResize:g}),a().createElement(s.RootRef,{rootRef:o},r))};u.propTypes={onChangeHeight:o().func,children:o().node};const p=u},85209:(e,t,r)=>{r.d(t,{Z:()=>s});var n=r(24328),a=r.n(n),l=r(87918),o=r.n(l),i=r(94079);const s=e=>{let{open:t,onClose:r,onConfirm:n}=e;return a().createElement(i.Dialog,{open:t},a().createElement(i.DialogContent,null,a().createElement(i.DialogContentText,null,o().text("Are you sure you want to delete this?"))),a().createElement(i.DialogActions,null,a().createElement(i.Button,{onClick:r,color:"primary"},o().text("No")),a().createElement(i.Button,{onClick:()=>{n(),r()},color:"primary"},o().text("Yes"))))}},94111:(e,t,r)=>{r.d(t,{Z:()=>s});var n=r(24328),a=r.n(n),l=r(80030);const o=(0,r(79692).Z)((e=>({tooltip:{backgroundColor:e.palette.background.paper,color:e.palette.text.primary,filter:"drop-shadow(0px 1px 5px #00000033) drop-shadow(0px 3px 1px #0000001F) drop-shadow(0px 2px 2px #00000024)",padding:"10px",maxWidth:"none"},arrow:{color:e.palette.background.paper}})));function i(){return i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},i.apply(this,arguments)}const s=e=>{const t=o();return a().createElement(l.ZP,i({},e,{classes:t,arrow:!0}))}},96955:(e,t,r)=>{r.d(t,{Z:()=>f});var n=r(24328),a=r.n(n),l=r(71153),o=r.n(l),i=r(13980),s=r.n(i),c=r(31396),u=r(60364);const p=(0,r(79692).Z)((()=>({container:{position:"relative","& .Resizer":{zIndex:1,boxSizing:"border-box",backgroundClip:"padding-box","&.disabled":{cursor:"initial",height:0,margin:0},"&.horizontal":{height:"11px",backgroundImage:"linear-gradient(rgba(0,0,0,0.33), rgba(0,0,0,0.33))",backgroundRepeat:"no-repeat",backgroundSize:"100% 1px",backgroundPosition:"top",width:"100%",marginBottom:"-10px","&:not(.disabled):hover":{cursor:"row-resize",backgroundImage:"linear-gradient(rgba(0, 114, 206, 0), rgba(0, 114, 206, 0.35), rgba(0, 114, 206, 1))",backgroundSize:"100% 3px"}},"&.vertical":{width:"11px",backgroundImage:"linear-gradient(rgba(0,0,0,0.33), rgba(0,0,0,0.33))",backgroundRepeat:"no-repeat",backgroundSize:"1px 100%",backgroundPosition:"left",height:"100%",marginRight:"-10px","&:not(.disabled):hover":{cursor:"col-resize",backgroundImage:"linear-gradient(to left, rgba(0, 114, 206, 0.35), rgba(0, 114, 206, 1), rgba(0, 114, 206, 0.35))",backgroundSize:"3px 100%"}}}}})));var d=r(57014);const m=e=>"horizontal"===e,b=e=>{let{className:t,children:r,orientation:l,defaultSize:i,size:s,minSize:b,maxSize:g,allowResize:f,onChange:y}=e;const v=p(),h=(0,u.Z)(),[E,w]=(0,n.useState)(),[x,O]=(0,n.useState)(!0),k=(0,n.useCallback)((()=>O(!0)),[]),C=(0,n.useCallback)((()=>O(!1)),[]),T=()=>m(l)?null==E?void 0:E.clientHeight:null==E?void 0:E.clientWidth,S=(0,n.useCallback)((0,d.DsO)((e=>{const t=T();y({percentageSize:e/t*100+"%",isMaxSize:g>0?e===g:e===t+g,isMinSize:e===b})}),250),[y,l,g,E]),I=(0,n.useMemo)((()=>({transition:h.transitions.create(m(l)?"height":"width",{easing:h.transitions.easing.sharp,duration:h.transitions.duration.leavingScreen})})),[l,h]);return"number"==typeof s&&s<0&&(s=(T()||0)+s),a().createElement("div",{ref:w,className:o()(v.container,t)},a().createElement(c.Z,{split:l,size:s,allowResize:f,onChange:S,defaultSize:i,minSize:b,maxSize:g,onDragStarted:C,onDragFinished:k,pane1Style:x?I:void 0},r))},g=s().oneOfType([s().number,s().string]);b.propTypes={className:s().string,children:s().arrayOf(s().node).isRequired,orientation:s().oneOf(["horizontal","vertical"]).isRequired,defaultSize:g,size:g,minSize:g,maxSize:g,allowResize:s().bool,onChange:s().func};const f=b},40715:(e,t,r)=>{r.d(t,{n:()=>f});var n=r(24328),a=r.n(n),l=r(71153),o=r.n(l),i=r(57014),s=r(64459),c=r(93873),u=r(94646),p=r(3515),d=r(19603),m=r(7718),b=r(3409);const g=(0,r(79692).Z)({profileBandNavigation:{marginBottom:"10px"},comments:{display:"flex",justifyContent:"flex-end"}}),f=(0,n.memo)((e=>{let{entity:t,className:r,historySlice:l}=e;const f=g(),y=(0,n.useMemo)((()=>(0,i.L5S)(t)),[t]),v=(0,m.C)({objectIds:y}),h=(0,i.wwR)(t);return a().createElement(p.h.Provider,{value:v},a().createElement(s.Z,{className:o()(r,d.U),entity:(null==l?void 0:l.aEntity)||t},l?a().createElement(b.Z,null):a().createElement(a().Fragment,null,a().createElement(c.a,{className:f.profileBandNavigation}),a().createElement(u.Z,{className:f.comments,uri:h,relatedObjectUris:(0,i.wp9)(i.q7e.ENTITY,{entityUri:h}),objectType:i.q7e.ENTITY}))))}));f.displayName="ScreenProfileBand"},94175:(e,t,r)=>{r.d(t,{Z:()=>c});var n=r(24328),a=r.n(n),l=r(52730),o=r(49885),i=r(57014),s=r(97991);const c=e=>{let{sourceType:t,className:r,classes:n}=e;const c=(0,l.useSelector)(o.ZP.selectors.getMetadata),{uri:u,icon:p}=(0,i.PWK)(c,t)||{},d=u?(0,i.tH7)(c,u)[0]:"",m=p?(0,i.vPL)("https://s3.amazonaws.com/reltio.images/api",p):null;return a().createElement(s.Z,{className:r,avatarText:d,icon:m,variant:"square",rootClasses:n})}},4073:(e,t,r)=>{r.d(t,{Z:()=>ne});var n=r(24328),a=r.n(n),l=r(57014),o=r(48554),i=r(12437),s=r(22983),c=r(27604),u=r(43054),p=r(71153),d=r.n(p),m=r(87918),b=r.n(m),g=r(72768),f=r(55847),y=r(94079),v=r(17440),h=r(28117),E=r(40879),w=r(79692);const x=(0,w.Z)((()=>({textField:{margin:0},input:{borderRadius:0},inputMultiline:{"&$input":{paddingTop:0,paddingBottom:0}},booleanEditor:{paddingLeft:"10px"},timestampEditor:{"&$paper":{minWidth:"255px"}},paper:e=>{let{color:t,containerWidth:r}=e;return{border:`3px solid ${t}`,borderRadius:"4px",width:r,minWidth:"160px"}},popoverRoot:{zIndex:"10!important"}})));function O(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const k=[l.oS0.TYPE_TEXT,l.oS0.TYPE_BLOB],C=e=>{let{attributeType:t,attributeValue:r,color:o,containerRef:i,onClose:s,onEdit:c}=e;const u=x({color:o,containerWidth:i.current?i.current.getBoundingClientRect().width:0}),p=(0,l.PFL)(t),m=(0,E.AG)(r,p),[b,g]=(0,n.useState)(m),f={className:u.textField,InputProps:{disableUnderline:!0,classes:{root:u.input,multiline:u.inputMultiline}}},w=()=>{const e=(0,E.Ho)(t,b);if(!(0,v.isNil)(b)&&!(0,v.equals)(b,m)){const n=(0,l.CwH)(t)?{value:e.value,lookupCode:e.lookupCode}:{value:""===b&&(0,l.FVt)(p.type)?null:e};c(function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){O(e,t,r[t])}))}return e}({},r,n))}s()};return a().createElement(y.Popover,{open:!!i,anchorEl:i.current,anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},classes:{paper:d()(u.paper,{[u.booleanEditor]:(0,l.T6Y)(p.type),[u.timestampEditor]:(0,l.j5n)(p.type)}),root:u.popoverRoot},onKeyUp:e=>{"Enter"!==e.key||k.includes(p.type)?"Escape"===e.key&&s():w()},onBackdropClick:w},a().createElement(h.Z,{autoFocus:!0,dataTypeDefinition:p,fieldName:(0,l.Tde)(t.uri),onChange:g,TextFieldProps:f,value:b,fullWidth:!0}))};var T=r(8818),S=r(57507),I=r(35315),j=r(83348),Z=r(77585);const A=(0,w.Z)((e=>({menuItem:{minHeight:"32px",color:e.palette.text.secondary},menuText:{color:e.palette.text.primary,fontSize:"13px",lineHeight:"15px",letterSpacing:0,marginLeft:"16px"},sourceItem:{borderBottom:"1px solid rgba(0, 0, 0, 0.12)",paddingBottom:"8px",paddingLeft:"16px",maxWidth:"200px"}}))),N=(0,j.Z)(y.MenuItem),P=e=>{let{styles:t,icon:r,text:n}=e;return a().createElement(a().Fragment,null,r,a().createElement(y.Typography,{classes:{root:t.menuText}},n))},D=(0,n.forwardRef)(((e,t)=>{let{item:r,onMenuClose:n=(()=>{})}=e;const l=A(),{disabled:o,text:i,tooltip:s,onClick:c,id:u="",icon:p,crosswalk:d,color:m}=r;return d?a().createElement(Z.Z,{className:l.sourceItem,color:m,crosswalk:d,focusable:!0}):a().createElement(N,{tooltipTitle:s,showForDisabled:!0,classes:{root:l.menuItem},onClick:e=>{n(e),c(e)},disabled:o,ref:t,"data-reltio-id":`crosswalk-menu-item${u}`},a().createElement(P,{icon:p,text:i,styles:l}))}));D.displayName="CrosswalkMenuItem";const R=D;var V=r(26905),M=r(63149);function z(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const L=(0,w.Z)((()=>({root:e=>{let{fullyColored:t,opaque:r,color:n,variant:a}=e;return function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){z(e,t,r[t])}))}return e}({minHeight:"28px",wordBreak:"break-word"},"filled"===a&&{borderRadius:"4px",background:t?n:`linear-gradient(to right, ${n} 8px, rgba(0,0,0,0.05) 8px)`},"outlined"===a&&{"&::after":{content:'""',position:"absolute",background:n,borderRadius:"4px 0px 0px 4px",width:"8px",height:"100%",pointerEvents:"none"},"&::before":{content:'""',position:"absolute",boxSizing:"border-box",borderRadius:"4px",border:t?`${n} solid 2px`:"rgba(0,0,0,0.12) solid 1px",width:"100%",height:"100%",pointerEvents:"none"}},{display:"flex",alignItems:"center",opacity:r?1:.38,filter:r?null:"saturate(20%)",transition:"opacity 0.3s",position:"relative"})},attributeValue:{marginLeft:"16px",padding:"6px 0",lineHeight:"14px",width:"calc(100% - 71px)"},actions:{display:"flex",width:"71px",justifyContent:"flex-end",marginRight:"4px"}}))),U=e=>{let{className:t,dataReltioId:r,attributeType:o=null,attributeValue:i,crosswalk:p,disableEdit:m,disableDelete:y,onIgnore:v,onEdit:h,onPin:E,onDelete:w}=e;const{isReadingMode:x,isEditingMode:O,isHovered:k,onMouseEnter:j,onMouseLeave:Z,setReadingMode:A,setEditingMode:N}=(0,V.p)(),P=(0,n.useRef)(),D=(0,l.nIW)(i.uri),z=(0,l.x_)(p),U=!o.system&&!z,W=U&&!m&&(0,l.Z5t)(l.fO_.EDITING,o),B=U&&!y&&(0,l.Edd)(l.fO_.EDITING,o),F=(0,l.ZiX)(i.uri),H=!F&&(!x&&W||i.pin),Y=!F&&(!x&&W||i.ignored),_=(0,M.nX)(p),{isHighlighted:G,isDimmed:q,highlightCrosswalk:X,removeHighlight:$}=(0,M.pu)(p),Q=L({variant:z?"outlined":"filled",opaque:!q,fullyColored:G,color:_}),J=[{crosswalk:p,color:_},{disabled:!W,text:b().text("Edit"),icon:a().createElement(c.Z,null),tooltip:W?null:b().text("You don't have permissions to edit"),onClick:()=>N(),id:"edit"},{disabled:!B,text:b().text("Delete"),icon:a().createElement(s.Z,null),tooltip:B?null:b().text("You don't have permissions to delete"),onClick:()=>w({attributeType:o,attributeValue:i,crosswalks:[p]}),id:"delete"}],K=()=>{$(),A()};return a().createElement("div",{ref:P,className:d()(t,Q.root),onMouseEnter:()=>{X(),j()},onMouseLeave:()=>{$(),Z()},"data-reltio-id":r},a().createElement("div",{className:Q.attributeValue},a().createElement(g.Z,{value:(0,l.kDl)(i),dataTypeDefinition:(0,l.PFL)(o)})),a().createElement("div",{className:Q.actions},H&&a().createElement(I.Z,{isPinned:i.pin,onClick:()=>E({attributeValue:i}),disabled:!W}),Y&&a().createElement(S.Z,{isIgnored:i.ignored,onClick:()=>v({attributeValue:i}),disabled:!W}),k&&a().createElement(f.Z,{MenuItemRenderer:R,menuId:`simple-attribute-additional-actions-${D}`,buttonComponent:T.k,buttonProps:{icon:u.Z,size:"XS",tooltipTitle:b().text("More actions")},onMenuClose:K,menuItems:J})),O&&a().createElement(C,{attributeType:o,attributeValue:i,color:_,onClose:K,onEdit:e=>h({attributeType:o,attributeValue:e,crosswalk:p}),containerRef:P}))};var W=r(13896);const B=(0,w.Z)((()=>({simpleAttributesWrapper:{display:"flex",flexWrap:"wrap",gap:"4px",width:"100%",minHeight:"28px"},dropIndicator:{height:"28px",color:"#828282",fontSize:"13px",lineHeight:"28px",background:"rgba(0, 0, 0, 0.04)",border:"1px dashed #828282",borderRadius:"4px",boxSizing:"border-box",padding:"0 12px"}})));function F(){return F=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},F.apply(this,arguments)}const H=e=>{let{attributeValues:t,attributeType:r,parentUri:n,disableEdit:o,crosswalksMap:i,onAdd:s}=e,c=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["attributeValues","attributeType","parentUri","disableEdit","crosswalksMap","onAdd"]);const u=B(),[{isDragItemOver:p},d]=(0,W.useDrop)({accept:"Crosswalk",canDrop:e=>{let{crosswalk:t}=e;const n=(0,l.bC9)(t.uri)||"relation"===t.ownerType,a=(0,l.WgC)(t.uri)&&"entity"===t.ownerType;return(0,l.d89)(l.fO_.EDITING,r)&&!o&&(n&&(0,l.$NE)(r.uri)||a&&(0,l.EdS)(r.uri))},collect:e=>({isDragItemOver:e.isOver()&&e.canDrop()}),drop:(e,a)=>{let{crosswalk:l}=e;s({attributeType:r,crosswalk:l,parentUri:n,index:t.length})}});let m=0;return a().createElement("div",{ref:d,className:u.simpleAttributesWrapper},t.map((e=>{var t;return null===(t=i[e.uri])||void 0===t?void 0:t.map((t=>a().createElement(U,F({key:e.uri+t.uri,attributeType:r,attributeValue:e,crosswalk:t,disableEdit:o,dataReltioId:"value-index-"+m++},c))))})),p&&a().createElement("div",{className:u.dropIndicator},b().text("Drop here")))};var Y=r(58896);function _(){return _=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},_.apply(this,arguments)}const G=e=>{let{className:t,attributeValues:r,attributeType:n,onAdd:o,parentUri:i,disableEdit:s}=e,c=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["className","attributeValues","attributeType","onAdd","parentUri","disableEdit"]);const u=!s&&(0,l.d89)(l.fO_.EDITING,n);return 0===r.length&&u?a().createElement(y.Button,{variant:"text",color:"primary",onClick:()=>o({parentUri:i,attributeType:n,index:0})},b().text("Create attribute")):a().createElement("div",{className:t},r.map((e=>a().createElement(Y.Z,_({key:e.uri,attributeValue:e,attributeType:n,onAdd:o,disableEdit:s},c)))))};var q=r(85592);function X(){return X=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},X.apply(this,arguments)}const $=e=>{let{className:t,attributeValues:r}=e,n=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["className","attributeValues"]);return a().createElement("div",{className:t},r.map((e=>a().createElement(q.Z,X({key:e.uri,attributeValue:e},n)))))};var Q=r(22246);function J(){return J=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},J.apply(this,arguments)}const K=e=>{let{className:t,attributeValues:r}=e,n=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["className","attributeValues"]);return a().createElement("div",{className:t},r.map((e=>a().createElement(Q.Z,J({key:e.uri,attributeValue:e},n)))))},ee=(0,w.Z)((()=>({wrapper:{display:"flex",flexDirection:"column",alignItems:"flex-start"},complexAttributesWrapper:{width:"100%"}})));function te(){return te=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},te.apply(this,arguments)}function re(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}const ne=e=>{let{attributeType:t,attributeValues:r=[],paging:s={},max:c=1/0,requestNextPage:u}=e,p=re(e,["attributeType","attributeValues","paging","max","requestNextPage"]);const d=ee(),[m,b]=(0,n.useState)(c),g=(0,v.propOr)(r.length,"totalValues",s),f=c<g,y=f&&m<g,h=f&&m>=g,E=r.slice(0,m),w=g-m;return a().createElement("div",{className:d.wrapper},(e=>{switch(t.type){case l.oS0.TYPE_NESTED:return a().createElement(G,te({className:d.complexAttributesWrapper,attributeValues:e,attributeType:t},p));case l.oS0.TYPE_REFERENCE:{const{crosswalksMap:r}=p,n=re(p,["crosswalksMap"]);return a().createElement($,te({className:d.complexAttributesWrapper,attributeValues:e,attributeType:t,crosswalksMap:r},n))}case l.oS0.TYPE_IMAGE:return a().createElement(K,te({className:d.complexAttributesWrapper,attributeValues:e,attributeType:t},p));default:return a().createElement(H,te({attributeValues:e,attributeType:t},p))}})(E),y&&a().createElement(o.Z,{moreNumber:Math.min(c,w),valueNumber:w,onClick:()=>{r.length<g&&u(),b(m+c)}}),h&&a().createElement(i.Z,{onClick:()=>{b(c)}}))}},8148:(e,t,r)=>{r.d(t,{Z:()=>D});var n=r(24328),a=r.n(n),l=r(57014),o=r(26905),i=r(51229),s=r(63149),c=r(77585),u=r(94111),p=r(71153),d=r.n(p),m=r(32625);const b=e=>{let{crosswalk:t,className:r}=e;const n=(0,s.nX)(t),{isDimmed:l,highlightCrosswalk:o,removeHighlight:i}=(0,s.pu)(t),p=(0,m.y)({isOpaque:!l,color:n});return a().createElement(u.Z,{title:a().createElement(c.Z,{crosswalk:t,color:n}),placement:"top"},a().createElement("div",{className:d()(p.crosswalkIcon,r),onMouseEnter:()=>o(),onMouseLeave:()=>i()}))};var g=r(17440),f=r(19592),y=r(4073),v=r(95629),h=r(95974),E=r(79692);const w=(0,E.Z)((e=>({title:{fontSize:"12px",lineHeight:"14px",paddingBottom:"4px",display:"inline-block",color:e.palette.text.secondary}})));function x(){return x=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},x.apply(this,arguments)}const O=e=>{let{attributeTypes:t,attributes:r}=e,n=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["attributeTypes","attributes"]);const o=w();return a().createElement(a().Fragment,null,t.filter(l.Uty).map((e=>a().createElement(h.Z,{key:e.uri,enabled:!0},a().createElement(v.Z,{className:o.title,label:e.label}),a().createElement(y.Z,x({attributeType:e,attributeValues:r[e.name],paging:(0,g.path)(["paging",e.uri],r)},n))))))};var k=r(35315),C=r(57507),T=r(8818),S=r(22983),I=r(87918),j=r.n(I);const Z=e=>{let{onClick:t}=e;return a().createElement(T.k,{icon:S.Z,tooltipTitle:j().text("Delete"),onClick:t,size:"XS",disableRipple:!0})};var A=r(20562),N=r(66095);const P=(0,E.Z)((()=>({root:{display:"flex",minHeight:"20px"},actions:{display:"flex",width:"65px",justifyContent:"flex-end",flexShrink:0,alignSelf:"center"},crosswalkIcon:{display:"inline-block",verticalAlign:"middle","& + &":{marginLeft:"4px"}}}))),D=e=>{let{attributeType:t,attributeValue:r,attributeTypesList:s,label:c,crosswalksMap:u,disableEdit:p,disableDelete:d,onPin:m,onIgnore:y,onDelete:v,onEdit:h,onAdd:E}=e;const w=P(),{isReadingMode:x,onMouseEnter:T,onMouseLeave:S}=(0,o.p)(),I=!p&&(0,l.Z5t)(l.fO_.EDITING,t),j=!d&&(0,l.Edd)(l.fO_.EDITING,t),D=(0,l.ZiX)(r.uri),R=!D&&(!x&&I||r.pin),V=!D&&(!x&&I||r.ignored),M=!x&&j,z=(0,N.Q)(r.uri),[L,U]=(0,n.useState)(z||D);(0,A.D)((()=>{z&&U(z)}),[z]);const W=(0,g.pipe)((0,g.pickBy)(((e,t)=>(0,l.sOy)(t,null==r?void 0:r.uri))),g.values,g.flatten,(0,g.uniqBy)((0,g.prop)("uri")))(u);return a().createElement(a().Fragment,null,a().createElement("div",{className:w.root,onMouseEnter:T,onMouseLeave:S},a().createElement(f.Z,{onClick:()=>U((e=>!e)),expanded:L}),a().createElement("span",null,c,W.map((e=>a().createElement(b,{key:(0,l.uKF)(e),crosswalk:e,className:w.crosswalkIcon})))),a().createElement(i.Z,null),a().createElement("div",{className:w.actions},R&&a().createElement(k.Z,{disabled:!I,isPinned:r.pin,onClick:()=>m({attributeValue:r})}),V&&a().createElement(C.Z,{disabled:!I,isIgnored:r.ignored,onClick:()=>y({attributeValue:r})}),M&&a().createElement(Z,{onClick:()=>v({attributeType:t,attributeValue:r,crosswalks:u[r.uri]})}))),L&&a().createElement(O,{attributeTypes:s,attributes:r.value,parentUri:r.uri,crosswalksMap:u,disableEdit:!I,disableDelete:!j,onPin:m,onIgnore:y,onDelete:v,onEdit:h,onAdd:E}))}},22246:(e,t,r)=>{r.d(t,{Z:()=>p});var n=r(24328),a=r.n(n),l=r(57014),o=r(27952),i=r(8148);const s=(0,r(79692).Z)((()=>({image:{borderRadius:"4px",background:"white",display:"inline-block",verticalAlign:"middle"},imageContainer:{display:"inline",lineHeight:"45px",paddingRight:"8px"}})));function c(){return c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},c.apply(this,arguments)}const u={imageWidth:55,imageHeight:45},p=e=>{let{attributeValue:t,attributeType:r}=e,n=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["attributeValue","attributeType"]);const p=s();return a().createElement(i.Z,c({attributeValue:t,attributeType:r,attributeTypesList:r.attributes,label:a().createElement(o.Z,{containerClassName:p.imageContainer,className:p.image,src:(0,l.Ysv)(t),size:u})},n))}},58896:(e,t,r)=>{r.d(t,{Z:()=>c});var n=r(24328),a=r.n(n),l=r(57014),o=r(8148),i=r(10174);function s(){return s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s.apply(this,arguments)}const c=e=>{let{attributeValue:t,attributeType:r}=e,n=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["attributeValue","attributeType"]);const c=a().createElement(i.x,null,(0,l.idV)(null==t?void 0:t.label));return a().createElement(o.Z,s({attributeValue:t,attributeType:r,attributeTypesList:r.attributes,label:c},n))}},85592:(e,t,r)=>{r.d(t,{Z:()=>b});var n=r(24328),a=r.n(n),l=r(52730),o=r(49885),i=r(57014),s=r(8148),c=r(17440),u=r(10174),p=r(95470);const d=(0,r(79692).Z)((e=>({relationshipLabel:{marginLeft:"4px",color:e.palette.text.primary}})));function m(){return m=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},m.apply(this,arguments)}const b=e=>{let{attributeValue:t,attributeType:r}=e,n=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["attributeValue","attributeType"]);const b=d(),g=(0,l.useSelector)(o.ZP.selectors.getMetadata),f=(0,l.useSelector)(o.ZP.selectors.getUIPath),y=a().createElement(u.x,null,a().createElement(p.Z,{href:(0,i.ChB)({uiPath:f,uri:(0,i.bwT)(t)})},(0,i.idV)(t.label),t.relationshipLabel&&a().createElement("span",{className:b.relationshipLabel},t.relationshipLabel))),v=(0,c.pipe)(i.tF$,(0,c.map)((e=>(0,i.zeJ)(g,e))),(0,c.reject)(c.isNil))(r);return a().createElement(s.Z,m({attributeValue:t,attributeType:r,attributeTypesList:v,label:y},n))}},10174:(e,t,r)=>{r.d(t,{x:()=>i});var n=r(24328),a=r.n(n),l=r(94079),o=r(32625);const i=e=>{let{children:t}=e;const r=(0,o.q)();return a().createElement(l.Typography,{component:"span",variant:"body2",classes:{body2:r.label}},t)}},57507:(e,t,r)=>{r.d(t,{Z:()=>d});var n=r(24328),a=r.n(n),l=r(8818);function o(){return o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},o.apply(this,arguments)}const i=e=>a().createElement("svg",o({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),a().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 3.5A8.503 8.503 0 003.5 12c0 4.692 3.808 8.5 8.5 8.5s8.5-3.808 8.5-8.5-3.808-8.5-8.5-8.5zM6.1 12c0-3.26 2.64-5.9 5.9-5.9 1.161 0 2.24.336 3.149.917L7.017 15.15A5.821 5.821 0 016.101 12zm5.9 5.9c-1.16 0-2.24-.336-3.148-.917l8.131-8.131c.581.908.917 1.987.917 3.148 0 3.26-2.64 5.9-5.9 5.9z",fill:"#000",fillOpacity:.54}));function s(){return s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s.apply(this,arguments)}const c=e=>a().createElement("svg",s({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),a().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M17.847 9.402a6.34 6.34 0 00-.8-1.322L8.08 17.048A6.34 6.34 0 0012 18.4a6.398 6.398 0 005.847-8.998zm-7.283 7.283l6.121-6.121a4.898 4.898 0 01-6.121 6.121zm1.437-11.084a6.334 6.334 0 013.92 1.352L6.953 15.92A6.334 6.334 0 015.6 12c0-3.536 2.864-6.4 6.4-6.4zm0 1.5c.5 0 .982.075 1.436.215l-6.121 6.12A4.898 4.898 0 0112 7.1zM6.6 17.903A7.967 7.967 0 0012 20c4.417-.001 8.001-3.585 8.001-8.001a7.967 7.967 0 00-2.601-5.902A7.988 7.988 0 0012 4c-4.416 0-8 3.584-8 8a7.967 7.967 0 002.602 5.902zM12 2.5c-5.244 0-9.5 4.256-9.5 9.5s4.256 9.5 9.5 9.5 9.5-4.256 9.5-9.5-4.256-9.5-9.5-9.5z",fill:"#000",fillOpacity:.54}));var u=r(87918),p=r.n(u);const d=e=>{let{isIgnored:t,onClick:r,disabled:n}=e;return a().createElement(l.k,{disabled:n,showForDisabled:!0,icon:t?i:c,tooltipTitle:n?p().text("You don't have permissions to ignore"):p().text("Ignore"),onClick:r,size:"XS",disableRipple:!0})}},35315:(e,t,r)=>{r.d(t,{Z:()=>d});var n=r(24328),a=r.n(n),l=r(8818);function o(){return o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},o.apply(this,arguments)}const i=e=>a().createElement("svg",o({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),a().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16 4v6l2 2v2h-5v7l-.992 1L11 21v-7H6v-2l2-2V4H7V2h10v2h-1z",fill:"#000",fillOpacity:.54}));function s(){return s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s.apply(this,arguments)}const c=e=>a().createElement("svg",s({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),a().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16 10V4h1V2H7v2h1v6l-2 2v2h5v7l1.008 1L13 21v-7h5v-2l-2-2zm-6-6h4v7l1 1H9l1-1V4z",fill:"#000",fillOpacity:.54}));var u=r(87918),p=r.n(u);const d=e=>{let{isPinned:t,onClick:r,disabled:n}=e;return a().createElement(l.k,{disabled:n,showForDisabled:!0,onClick:r,icon:t?i:c,tooltipTitle:n?"You don't have permissions to pin":p().text("Pin"),size:"XS",disableRipple:!0})}},77585:(e,t,r)=>{r.d(t,{Z:()=>y});var n=r(24328),a=r.n(n),l=r(87918),o=r.n(l),i=r(49885),s=r(57014),c=r(52730),u=r(72753),p=r(94175),d=r(71153),m=r.n(d),b=r(63149),g=r(8818),f=r(32625);const y=e=>{let{crosswalk:t,color:r,className:n,focusable:l=!1}=e;const{toggleCrosswalkFocus:d,isFocused:y}=(0,b.BF)(t),v=(0,f.y)({color:r,isFocused:y}),h=(0,c.useSelector)(i.ZP.selectors.getMetadata),{label:E}=(0,s.PWK)(h,t.type);return a().createElement("div",{className:m()(v.sourceItem,n)},a().createElement(p.Z,{className:v.sourceIcon,sourceType:t.type}),a().createElement("div",{className:v.sourceInfo},a().createElement("div",null,a().createElement("span",{className:v.label},E),l&&a().createElement(g.k,{icon:u.Z,className:v.eyeIcon,size:"XXS",tooltipTitle:o().text("Focus"),onClick:()=>d()})),a().createElement("div",{className:v.crosswalkValue},t.value)))}},32625:(e,t,r)=>{r.d(t,{y:()=>a,q:()=>l});var n=r(79692);const a=(0,n.Z)({sourceItem:{display:"flex",overflow:"hidden"},eyeIcon:e=>{let{isFocused:t}=e;return{marginLeft:"10px",color:t?"#000":"rgba(0, 0, 0, 0.54)"}},label:{color:"rgba(0, 0, 0, 0.87)",verticalAlign:"top",fontSize:"13px",lineHeight:"16px"},sourceInfo:{overflow:"hidden"},crosswalkValue:{color:"rgba(0, 0, 0, 0.54)",fontSize:"12px",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},sourceIcon:e=>{let{color:t}=e;return{height:"16px",width:"16px",marginRight:"9px",fontSize:"14px",backgroundColor:t}},crosswalkIcon:e=>{let{color:t,isOpaque:r}=e;return{backgroundColor:t,height:"12px",width:"12px",borderRadius:"30px",opacity:r?1:.38,transition:"opacity 0.3s"}}}),l=(0,n.Z)((()=>({label:{fontSize:"13px",lineHeight:"15px",letterSpacing:"normal",marginLeft:"2px",marginRight:"8px"}})))},26905:(e,t,r)=>{r.d(t,{p:()=>o});var n,a=r(57014),l=r(24328);!function(e){e.READING="READING",e.HOVERED="HOVERED",e.EDITING="EDITING"}(n||(n={}));const o=()=>{const[e,t]=(0,l.useState)(null),r=e===n.READING,o=e===n.EDITING,i=e===n.HOVERED;(0,l.useEffect)((()=>{t(n.READING)}),[]);const s=(0,l.useCallback)((0,a.DsO)(t,50),[]),c=(0,l.useCallback)((()=>{o||s(n.HOVERED)}),[s,o]),u=(0,l.useCallback)((()=>{o||s(n.READING)}),[s,o]);return{setReadingMode:(0,l.useCallback)((()=>t(n.READING)),[t]),setEditingMode:(0,l.useCallback)((()=>t(n.EDITING)),[t]),onMouseLeave:u,onMouseEnter:c,isReadingMode:r,isEditingMode:o,isHovered:i}}},87760:(e,t,r)=>{r.d(t,{Z:()=>m});var n=r(57014),a=r(24328),l=r.n(a),o=r(81303),i=r(13074);function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){c(e,t,r[t])}))}return e}function c(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function u(){return u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},u.apply(this,arguments)}function p(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}const d=e=>{let{values:t,valueContainerClassName:r}=e,n=p(e,["values","valueContainerClassName"]);return l().createElement(l().Fragment,null,(t||[]).map((e=>l().createElement("div",{key:e.uri,className:r},l().createElement(o.Z,u({attributeValue:e},n))))))},m=(0,a.memo)((e=>{let{expanded:t,LabelRenderer:r,RightSlot:a}=e,o=p(e,["expanded","LabelRenderer","RightSlot"]);const{attributeType:c,values:u,valueContainerClassName:m}=o;switch(c.type){case n.oS0.TYPE_NESTED:case n.oS0.TYPE_REFERENCE:return d(s({expanded:t,LabelRenderer:r,RightSlot:a},o));case n.oS0.TYPE_IMAGE:return l().createElement("div",{className:m},l().createElement(i.Z,{attributeType:c,attributeValues:u,imageSize:{imageHeight:40,imageWidth:40,imageMargin:2}}));default:return d(s({},o))}}))},20982:(e,t,r)=>{r.d(t,{Z:()=>Te});var n=r(24328),a=r.n(n),l=r(52730),o=r(71153),i=r.n(o),s=r(87918),c=r.n(s),u=r(49885),p=r(57014),d=r(74402),m=r(97946),b=r(60894),g=r(85709),f=r(92778),y=r(17440),v=r(92332),h=r(79692);const E=(0,h.Z)((e=>({coloredCell:{"&::before":{content:'""',position:"absolute",right:0,top:0,width:"100%",height:"100%",background:"rgba(0,0,0,0.06)",pointerEvents:"none"}},headCell:{display:"flex",alignItems:"center",fontSize:"12px",height:"100%",color:e.palette.text.secondary},rowCell:{fontSize:"13px",overflow:"hidden"},cellValueWrapper:{padding:"15px 15px 0 15px","&:last-child":{paddingBottom:"15px"}},attributeTitle:{display:"block",marginLeft:"3px","&:not(:last-child)":{marginBottom:"5px"}},ovValue:{"& + &":{marginTop:"4px"}},count:{textAlign:"center"},ruleType:{display:"flex",alignItems:"center"},ruleTypeLabel:{marginRight:"5px"},rulePopup:{width:"270px",overflowY:"hidden"},popupItem:{paddingBottom:"5px",paddingTop:"5px"},sourceIcon:{height:"16px",width:"16px",marginRight:"9px",fontSize:"14px"},closeButton:{height:24,width:24},popupTitle:{fontWeight:500,marginLeft:"12px"},popupTitleWrapper:{display:"flex",paddingLeft:16,paddingTop:16},popupItemsWrapper:{overflowY:"auto",maxHeight:"280px"},winnerSourceItemWrapper:{paddingBottom:"2px",paddingTop:"2px"},winnerSourceItem:{display:"flex",alignItems:"center",width:"100%",paddingLeft:"8px"},winnerSourceItemLabel:{fontSize:13}}))),w=e=>{const t=E();return a().createElement("div",{className:i()(t.headCell,t.coloredCell)},a().createElement(v.default,e),e.children)};var x=r(90473),O=r(32528);const k=(0,h.Z)({root:{marginBottom:"-6px"}}),C=(0,O.Z)((0,y.pick)(["parentUri","parentTypeUri","onAdd","selectedAttributeTypes","onSelectAttributeTypes"]))((e=>{let{parentTypeUri:t,parentUri:r,selectedAttributeTypes:n,onSelectAttributeTypes:o,onAdd:i}=e;const s=k(),d=(0,l.useSelector)(u.ZP.selectors.getMetadata),m=[...d.entityTypes,...d.relationTypes||[]].find((0,y.propEq)("uri",t)),b=e=>!(null!=n&&n.find((0,y.propEq)("uri",e.uri))),g=(0,y.pipe)((0,y.propOr)([],"attributes"),(0,y.reject)((0,y.either)(p.YkG,p.Or$)),(0,y.filter)((0,y.either)(p.QZu,b)),(0,y.filter)((0,y.both)(p.Uty,(e=>(0,p.Vg3)({attributeType:e,mode:p.fO_.EDITING})))))(m);return a().createElement("div",{className:s.root},a().createElement(x.Z,{label:c().text("Attribute"),popupTitle:c().text("Add attributes"),data:g,onApply:e=>{const t=e.filter(b);t.length>0&&o([...t,...n]),e.filter(p.QZu).forEach((e=>{i({attributeType:e,parentUri:r})}))}}))}));var T=r(51229);const S=(0,O.Z)((0,y.pick)(["readOnly"]))((e=>{let{readOnly:t}=e,r=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["readOnly"]);return t?a().createElement(w,r):a().createElement(w,r,a().createElement(T.Z,null),a().createElement(C,null))})),I=e=>{let{value:t}=e;const r=E();return a().createElement("div",{className:r.cellValueWrapper},t)};var j=r(4073);const Z=(0,h.Z)((()=>({simpleAttributeWrapper:{padding:"15px"},complexAttributeWrapper:{padding:"15px","& + &":{borderTop:"1px solid rgba(0,0,0,.1)"}}})));function A(){return A=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},A.apply(this,arguments)}const N=e=>{let{attributeValues:t}=e,r=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["attributeValues"]);const n=Z();return a().createElement("div",{className:n.simpleAttributeWrapper},a().createElement(j.Z,A({attributeValues:t},r)))};var P=r(58896);function D(){return D=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},D.apply(this,arguments)}const R=e=>{let{attributeValues:t}=e,r=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["attributeValues"]);const n=Z(),l=null==t?void 0:t.map(((e,t)=>a().createElement("div",{key:null==e?void 0:e.uri,className:n.complexAttributeWrapper,"data-reltio-id":`value-index-${t}`},a().createElement(P.Z,D({attributeValue:e},r)))));return a().createElement(a().Fragment,null,l)};var V=r(85592);function M(){return M=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},M.apply(this,arguments)}const z=e=>{let{attributeValues:t,crosswalksMap:r}=e,n=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["attributeValues","crosswalksMap"]);const l=Z(),o=null==t?void 0:t.map(((e,t)=>a().createElement("div",{key:null==e?void 0:e.uri,className:l.complexAttributeWrapper,"data-reltio-id":`value-index-${t}`},a().createElement(V.Z,M({attributeValue:e,crosswalksMap:r},n)))));return a().createElement(a().Fragment,null,o)};var L=r(22246);function U(){return U=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},U.apply(this,arguments)}const W=e=>{let{attributeValues:t}=e,r=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["attributeValues"]);const n=Z();return a().createElement(a().Fragment,null,null==t?void 0:t.map(((e,t)=>a().createElement("div",{key:null==e?void 0:e.uri,className:n.complexAttributeWrapper,"data-reltio-id":`value-index-${t}`},a().createElement(L.Z,U({attributeValue:e},r))))))};function B(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const F=(0,O.Z)((0,y.pick)(["onDelete","onPin","onIgnore","onEdit","onAdd","parentUri","readOnly"]))((e=>{let{value:t,onDelete:r,onEdit:n,onPin:l,onIgnore:o,onAdd:i,parentUri:s,readOnly:c}=e;return class{static build(e,t){switch(e){case p.oS0.TYPE_NESTED:return a().createElement(R,t);case p.oS0.TYPE_REFERENCE:return a().createElement(z,t);case p.oS0.TYPE_IMAGE:return a().createElement(W,t);default:return a().createElement(N,t)}}}.build(t.attributeType.type,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){B(e,t,r[t])}))}return e}({},t,{parentUri:s,onDelete:r,onEdit:n,onPin:l,onIgnore:o,onAdd:i,disableEdit:c,disableDelete:c}))}));var H=r(95629),Y=r(87760);const _=e=>{let{value:{values:t,attributeType:r}}=e;const n=E();return a().createElement("div",{className:n.cellValueWrapper},a().createElement(H.Z,{className:n.attributeTitle,label:r.label}),a().createElement(Y.Z,{values:t,attributeType:r,valueContainerClassName:n.ovValue}))},G=e=>{let{value:t}=e;const r=E();return a().createElement("div",{className:i()(r.cellValueWrapper,r.count)},t)};var q=r(94079),X=r(87685),$=r(99144),Q=r(8818),J=r(94175);const K=e=>{let{sourcesUriOrder:t}=e;const r=E(),n=(0,l.useSelector)(u.ZP.selectors.getMetadata);return a().createElement(a().Fragment,null,t.map((e=>a().createElement(q.ListItem,{key:e,className:r.popupItem},a().createElement(J.Z,{className:r.sourceIcon,sourceType:e}),a().createElement(q.ListItemText,{primary:(0,p.tH7)(n,e),primaryTypographyProps:{variant:"body2"}})))))},ee=e=>{let{attributeUri:t}=e;const r=E(),n=(0,l.useSelector)(u.ZP.selectors.getMetadata),o=(0,p.zeJ)(n,t);return a().createElement(q.ListItem,{key:o.uri,className:r.popupItem},a().createElement(q.ListItemText,{primary:(0,p.idV)(o.label),primaryTypographyProps:{variant:"body2"}}))},te=(0,y.cond)([[(0,y.prop)("sourcesUriOrder"),()=>c().text("Source sequence")],[(0,y.prop)("primaryAttributeUri"),()=>c().text("Attribute winner")],[(0,y.prop)("comparisonAttributeUri"),()=>c().text("Comparison attribute")]]),re=(0,y.cond)([[(0,y.prop)("sourcesUriOrder"),e=>{let{sourcesUriOrder:t}=e;return a().createElement(K,{sourcesUriOrder:t})}],[(0,y.prop)("primaryAttributeUri"),e=>{let{primaryAttributeUri:t}=e;return a().createElement(ee,{attributeUri:t})}],[(0,y.prop)("comparisonAttributeUri"),e=>{let{comparisonAttributeUri:t}=e;return a().createElement(ee,{attributeUri:t})}]]),ne=e=>{let{info:t}=e;const r=E(),[l,o]=(0,n.useState)(null),i=()=>o(null);return a().createElement(a().Fragment,null,a().createElement(Q.k,{icon:$.Z,tooltipTitle:c().text("View details"),size:"XS",onClick:e=>o(e.currentTarget)}),a().createElement(q.Popover,{classes:{paper:r.rulePopup},open:!!l,anchorEl:l,onClose:i,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"}},a().createElement("div",{className:r.popupTitleWrapper},a().createElement(q.IconButton,{className:r.closeButton,onClick:i},a().createElement(X.default,null)),a().createElement(q.Typography,{variant:"subtitle1",className:r.popupTitle},te(t))),a().createElement(q.List,{component:"div",className:r.popupItemsWrapper},re(t))))},ae=e=>{let{value:{ruleType:t,sourcesUriOrder:r,primaryAttributeUri:n,comparisonAttributeUri:l}}=e;const o=E(),s=r||n||l;return a().createElement("div",{className:i()(o.cellValueWrapper,o.ruleType)},a().createElement("div",{className:o.ruleTypeLabel},t.label),s&&a().createElement(ne,{info:{sourcesUriOrder:r,primaryAttributeUri:n,comparisonAttributeUri:l}}))};var le=r(63149),oe=r(40625);const ie=e=>{let{crosswalk:t}=e;const r=E(),n=(0,l.useSelector)(u.ZP.selectors.getMetadata),{isDimmed:o,highlightCrosswalk:i,removeHighlight:s}=(0,le.pu)(t);return a().createElement(oe.Z,{className:r.winnerSourceItem,color:(0,p.CJp)((0,p.uKF)(t)),opacity:o?.19:1,onMouseEnter:()=>i(),onMouseLeave:()=>s()},a().createElement(J.Z,{className:r.sourceIcon,sourceType:t.type}),a().createElement(q.ListItemText,{primary:(0,p.tH7)(n,t.type),primaryTypographyProps:{variant:"body2"},classes:{primary:r.winnerSourceItemLabel}}))},se=e=>{let{value:{crosswalks:t}}=e;const r=E();return a().createElement(q.List,{component:"div"},t.map((e=>a().createElement(q.ListItem,{key:e.uri,className:r.winnerSourceItemWrapper},a().createElement(ie,{crosswalk:e})))))},ce=[{id:"ovValues",get label(){return c().text("Attributes & OV")},hideable:!1,initialWidth:360,minWidth:250},{id:"winnerSources",get label(){return c().text("Winner source systems")},initialWidth:220},{id:"ruleType",get label(){return c().text("Rule type")},initialWidth:200},{id:"count",get label(){return c().text("Count")},initialWidth:80,minWidth:80},{id:"values",get label(){return c().text("Attribute values")},hideable:!1}],ue=e=>(0,p.OXP)(e)&&!(0,p.ZiX)(e.uri),pe=["ovValues","ruleType","values"],de=e=>{switch(e){case"ovValues":return _;case"values":return F;case"count":return G;case"ruleType":return ae;case"winnerSources":return se;default:return I}},me=(0,y.pipe)(p.cwx,(0,y.sortWith)([(0,y.descend)((0,y.propOr)(-1,"priority"))]),(0,y.map)((0,y.prop)("uri"))),be=(0,y.curry)(((e,t)=>(0,p.YkG)(e)&&t&&(0,y.pipe)(p.c31,(0,y.find)((r=>r.slice((0,p.u5q)(r).length)===t.slice(e.uri.length))))(e)||t)),ge=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;return(0,y.pipe)((0,y.filter)(ue),(0,y.chain)((e=>(0,y.pipe)((0,y.pickBy)(((t,r)=>{const n=(0,p.sOy)(r,e.uri),a=n?r.slice(e.uri.length+1):"",l=a&&(0,p.IM5)(e.value,a);return n&&(!l||ue(l))})),y.values,y.flatten)(t))),(0,y.uniqBy)((0,y.prop)("uri")))(e)},fe=(0,y.map)((e=>{let{id:t,label:r,initialWidth:n,minWidth:a}=e;return{id:t,label:r,initialWidth:n,minWidth:a,autoResize:!n,resizable:!0,sortable:!1,headCellRenderer:"ovValues"===t?S:w,rowCellValueRenderer:de(t)}})),ye=(e,t,r,n,a,l,o)=>{switch(e){case"ovValues":return{attributeType:n,values:null==l?void 0:l.filter(ue)};case"values":return{attributeType:n,attributeValues:l,crosswalksMap:a};case"count":return function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2?arguments[2]:void 0;switch(e){case p.oS0.TYPE_REFERENCE:case p.oS0.TYPE_NESTED:case p.oS0.TYPE_IMAGE:return t.length;default:return t.reduce(((e,t)=>e+r[t.uri].length),0)}}(n.type,l,a);case"ruleType":return((e,t,r,n)=>{var a,l;const o=[...e.entityTypes,...e.relationTypes||[]].find((0,y.propEq)("uri",r)),i=null!==(a=null==o?void 0:o.survivorshipGroups)&&void 0!==a?a:[],s=n&&i.find((0,y.propEq)("uri",n))||i.find((0,y.propEq)("default",!0)),c=null==s||null===(l=s.mapping)||void 0===l?void 0:l.find((0,y.propEq)("attribute",t.uri)),u=(0,p.o_J)(e,null==c?void 0:c.survivorshipStrategy)||(0,p.Xaq)(e),d=(e=>"configuration/survivorshipStrategies/SRC_SYS"===(null==e?void 0:e.uri))(u)?(0,y.uniq)([...(null==c?void 0:c.sourcesUriOrder)||[],...(null==s?void 0:s.sourcesUriOrder)||[],...me(e)]):void 0,m=be(t),b=(e=>"configuration/survivorshipStrategies/OtherAttributeWinnerCrosswalk"===(null==e?void 0:e.uri))(u)?m(null==c?void 0:c.primaryAttributeUri):void 0,g=(0,p.YkM)(t)&&(e=>"configuration/survivorshipStrategies/MinValue"===(null==e?void 0:e.uri)||"configuration/survivorshipStrategies/MaxValue"===(null==e?void 0:e.uri))(u)?m(null==c?void 0:c.comparisonAttributeUri):void 0;return{ruleType:u,sourcesUriOrder:d,primaryAttributeUri:b,comparisonAttributeUri:g}})(t,n,r,o);case"winnerSources":return{crosswalks:ge(l,a)};default:return null}};function ve(){return ve=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ve.apply(this,arguments)}const he=e=>{let{cell:t,CellValueRenderer:r,columnIndex:n,columnData:l}=e,o=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["cell","CellValueRenderer","columnIndex","columnData"]);const s=E(),c=0===n;return a().createElement("div",{className:i()(s.rowCell,c&&s.coloredCell),"data-reltio-id":`column-name-${l.id}`},t.values.map(((e,t)=>a().createElement(r,ve({key:t,value:e},o)))))};var Ee=r(99136),we=r(85209),xe=r(31276);const Oe=e=>{let{open:t,onClose:r,onConfirmEditWithoutIgnore:l,onConfirmEditWithIgnore:o}=e;const[i,s]=(0,n.useState)("without");return a().createElement(q.Dialog,{open:t,onEnter:()=>s("without")},a().createElement(q.DialogContent,null,a().createElement(q.DialogContentText,null,c().text("You are attempting to change a value that is presently ignored.")),a().createElement(q.FormControl,{component:"fieldset"},a().createElement(q.FormLabel,{component:"legend"},c().text("Please choose an option:")),a().createElement(q.RadioGroup,{value:i,onChange:(0,y.pipe)(xe.NA,s)},a().createElement(q.FormControlLabel,{value:"without",control:a().createElement(q.Radio,null),label:c().text("Save without Ignore")}),a().createElement(q.FormControlLabel,{value:"with",control:a().createElement(q.Radio,null),label:c().text("Save and apply Ignore to new value")})))),a().createElement(q.DialogActions,null,a().createElement(q.Button,{onClick:r,color:"primary"},c().text("Cancel")),a().createElement(q.Button,{onClick:()=>{"with"===i?o():l(),r()},color:"primary"},c().text("Ok"))))},ke=(0,h.Z)({tableContainer:{height:"100%",overflow:"hidden",display:"flex",flexDirection:"column"},tableHeader:{display:"flex",flexDirection:"row"},tableTitle:{marginRight:"auto"},tableContent:{display:"flex",flexDirection:"column",flex:1,overflow:"hidden",position:"relative"}});function Ce(){return Ce=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ce.apply(this,arguments)}const Te=(0,n.memo)((e=>{let{entity:t,isLoading:r,crosswalksMap:o,visibleColumns:s=pe,onChangeVisibleColumns:v,readOnly:h,onDelete:E=xe.ZT,onPin:w=xe.ZT,onIgnore:x=xe.ZT,onEdit:O=xe.ZT,onAdd:k=xe.ZT,selectedAttributeTypes:C,onSelectAttributeTypes:T=xe.ZT,additionalHeaderItems:S,className:I,activeSurvivorshipGroupUri:j}=e;const Z=ke(),A=(0,n.useMemo)((()=>(0,y.pipe)((0,y.filter)((e=>{let{id:t}=e;return s.includes(t)})),fe)(ce)),[s]),{type:N,uri:P,attributes:D={}}=t||{},R=(0,l.useSelector)(u.ZP.selectors.getMetadata);(0,n.useEffect)((()=>{if(t&&(0,y.isNil)(C)){const e=(0,y.pipe)(y.keys,(0,y.without)(["paging"]),(0,y.map)((0,p.tCm)(N)),(0,y.map)((e=>(0,p.zeJ)(R,e,N))),(0,y.filter)(p.Uty))(D);T(e)}}),[t,C]);const V=(0,n.useMemo)((()=>N?function(e,t){let r=arguments.length>3?arguments[3]:void 0,n=arguments.length>4?arguments[4]:void 0,a=arguments.length>5?arguments[5]:void 0,l=arguments.length>6?arguments[6]:void 0;return(arguments.length>2&&void 0!==arguments[2]?arguments[2]:[]).map((o=>{const i=(0,p.nIW)(o.uri),s=a[i],c=(0,p.YkG)(o)?n.relation:n.entity;return(0,y.pipe)((0,y.reduce)(((r,n)=>(0,y.assoc)(n,ye(n,e,t,o,c,s,l),r)),{}),(0,y.assoc)("rawValue",s))(r)}))}(R,N,C,s,o,D,j):[]),[R,N,C,s,D,o,j]),{getDynamicRowCellHeight:M,changeRowCellHeight:z}=(0,d.Z)(),L=(0,n.useCallback)((e=>a().createElement(m.Z,Ce({onChangeHeight:z},e),a().createElement(he,e))),[z]),U=(0,n.useCallback)((0,y.either)(M,(0,y.always)(68)),[M]),[W,B]=(0,n.useState)(null),[F,H]=(0,n.useState)(null),Y=(0,n.useCallback)((e=>{e.attributeValue.ignored?H(e):O(e)}),[O,H]),_=(0,n.useMemo)((()=>({onDelete:B,onPin:w,onIgnore:x,onEdit:Y,onAdd:k,parentUri:P,parentTypeUri:N,selectedAttributeTypes:C,onSelectAttributeTypes:T,readOnly:h})),[B,w,x,Y,k,P,N,C,T,h]);return a().createElement("div",{className:i()(Z.tableContainer,I)},a().createElement(f.Z,{classes:{root:Z.tableHeader,title:Z.tableTitle},title:c().text("Sources")},S,a().createElement(b.Z,{columnsData:ce,selectedColumns:s,onChangeColumns:v})),a().createElement("div",{className:Z.tableContent},r&&a().createElement(Ee.Z,null),a().createElement(g.Z,{fixFirstColumn:!0,headRowHeight:48,defaultColumnWidth:250,defaultColumnMinWidth:200,columnsData:A,rowsData:V,renderRowCell:L,getRowCellHeight:U,context:_})),a().createElement(we.Z,{open:!!W,onClose:()=>B(null),onConfirm:()=>E(W)}),a().createElement(Oe,{open:!!F,onClose:()=>H(null),onConfirmEditWithIgnore:()=>O(F),onConfirmEditWithoutIgnore:()=>{x({attributeValue:F.attributeValue}),O(F)}}))}))},40625:(e,t,r)=>{r.d(t,{Z:()=>b});var n=r(24328),a=r.n(n),l=r(87918),o=r.n(l),i=r(71153),s=r.n(i),c=r(71519),u=r(94079);function p(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const d=(0,r(79692).Z)({item:e=>{let{color:t,opacity:r,variant:n}=e;return function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){p(e,t,r[t])}))}return e}({},"standart"===n&&{backgroundColor:t,paddingRight:"29px"},"disabled"===n&&{border:`${t} solid 2px`},{opacity:r,filter:r&&1!==r?"saturate(20%)":null,transition:"opacity 0.3s",boxSizing:"border-box"})},endDatedCrosswalkIcon:{margin:"0 4px",width:"20px",height:"20px",color:"#ff1744"}});function m(){return m=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},m.apply(this,arguments)}const b=(0,n.forwardRef)(((e,t)=>{let{color:r,opacity:n,variant:l="standart",children:i,className:p}=e,b=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["color","opacity","variant","children","className"]);const g=d({color:r,opacity:n,variant:l});return a().createElement("div",m({ref:t,className:s()(g.item,p)},b),i,"disabled"===l&&a().createElement(u.Tooltip,{title:o().text("End-dated crosswalk")},a().createElement(c.Z,{className:g.endDatedCrosswalkIcon})))}))},61305:(e,t,r)=>{r.d(t,{Z:()=>P});var n=r(24328),a=r.n(n),l=r(52730),o=r(85209),i=r(90473),s=r(31517),c=r(8818),u=r(94175),p=r(81174),d=r(94079),m=r(22983),b=r(57014),g=r(17440),f=r(87918),y=r.n(f),v=r(49885),h=r(22385);function E(){return E=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},E.apply(this,arguments)}const w=e=>a().createElement("svg",E({width:24,height:24,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},e),a().createElement("defs",null,a().createElement("path",{d:"M20.222 6C21.21 6 22 6.8 22 7.778v12.444C22 21.2 21.209 22 20.222 22H7.778C6.79 22 6 21.2 6 20.222V7.778C6 6.8 6.791 6 7.778 6h12.444zM20 8H8v12h12V8zM4 18H2V4c0-1.1.9-2 2-2h14v2H4v14z",id:"Copy_svg__a"})),a().createElement("g",{stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a().createElement("mask",{id:"Copy_svg__b",fill:"#fff"},a().createElement("use",{xlinkHref:"#Copy_svg__a"})),a().createElement("path",{fillOpacity:.54,fill:"#000",mask:"url(#Copy_svg__b)",d:"M0 0h24v24H0z"})));var x=r(79692);const O=(0,x.Z)((()=>({root:{display:"flex",justifyContent:"space-between",alignItems:"center",overflowWrap:"anywhere"},text:{fontSize:13},button:{flexShrink:0,marginLeft:8,padding:0,textTransform:"none"}}))),k=e=>{let{value:t}=e;const r=O();return a().createElement("div",{className:r.root},a().createElement(d.Typography,{className:r.text,variant:"body2"},t),a().createElement(h.Z,{size:"XXS",icon:w,color:"primary",className:r.button,onClick:()=>navigator.clipboard.writeText(t)}))};var C=r(71153),T=r.n(C),S=r(43305);const I=(0,x.Z)((()=>({timestampEditorInput:{paddingTop:15,paddingBottom:15,fontSize:13},timestampEditor:{height:38}}))),j=e=>{let{value:t,classes:r={},disabled:l=!1,onChange:o}=e;const i=I(),[s,c]=(0,n.useState)(!1),u=e=>o(null==e?void 0:e.valueOf());return a().createElement(S.Z,{variant:"filled",value:t||null,disabled:l,onChange:(0,g.unless)((0,g.always)(s),u),onAccept:u,onOpen:()=>c(!0),onClose:()=>c(!1),InputProps:{disableUnderline:!0,classes:{input:i.timestampEditorInput,root:T()(i.timestampEditor,r.root)}}})};var Z=r(95038),A=r.n(Z);const N=(0,x.Z)((e=>({text:{fontSize:13},attributeWrapper:{display:"flex",alignItems:"center",paddingTop:5,paddingBottom:5,marginLeft:12},attributeTitle:{fontSize:13,width:135,color:e.palette.text.secondary},attributeValue:{paddingLeft:10,display:"flex",alignItems:"center",flexGrow:1},input:{paddingTop:14,paddingBottom:14,fontSize:13},editor:{flexGrow:1},moreButton:{marginLeft:24},sourceIcon:{height:"16px",width:"16px",marginRight:"9px",fontSize:"14px"}}))),P=e=>{let{crosswalk:t,canEditAttribute:r=!0,onEditAttribute:f,onDeleteAttribute:h}=e;const E=N(),w=!("uri"in t),x=(0,l.useSelector)(v.ZP.selectors.getMetadata),[O,C]=(0,n.useState)([]),[T,S]=(0,n.useState)(null),I=(0,n.useMemo)((()=>[{label:b.G39.sourceSystems.label,uri:"type"},{label:b.G39.value.label,uri:"value"},{label:b.G39.sourceTable.label,uri:"sourceTable",canBeAdded:w,canBeDeleted:w},{label:b.G39.createDate.label,uri:"createDate"},{label:b.G39.updateDate.label,uri:"updateDate"},{label:b.G39.deleteDate.label,uri:"deleteDate",canBeAdded:!0,canBeDeleted:!0},{label:b.G39.reltioLoadDate.label,uri:"reltioLoadDate"},{label:b.G39.publishDate.label,uri:"sourcePublishDate"}]),[]),Z=(0,g.pipe)((0,g.filter)((0,g.propEq)("canBeAdded",!0)),(0,g.filter)((e=>!(0,g.has)(e.uri,t))),(0,g.filter)((e=>!O.includes(e.uri))))(I);return a().createElement(a().Fragment,null,Z.length>0&&r&&a().createElement(i.Z,{label:y().text("Add attributes"),onApply:e=>{e.length>0&&C((t=>t.concat((0,g.map)((0,g.prop)("uri"),e))))},data:Z}),I.map((e=>e.uri in t||O.includes(e.uri)?a().createElement("div",{key:e.uri,className:E.attributeWrapper},a().createElement(d.Typography,{variant:"body2",className:E.attributeTitle},`${e.label}:`),a().createElement("div",{className:E.attributeValue},((e,t)=>{switch(e){case"type":{const r=(0,b.tH7)(x,t);return w?a().createElement(s.Z,{label:"",placeholder:t,className:E.editor,value:{value:t,label:r},options:(0,b.cwx)(x).sort((0,g.ascend)((0,g.prop)("label"))).map((e=>{let{uri:t,label:r}=e;return{value:t,label:r}})),onChange:t=>{let{value:r}=t;return f(e,r)},TextFieldProps:{InputProps:{disableUnderline:!0}}}):a().createElement(a().Fragment,null,a().createElement(u.Z,{className:E.sourceIcon,sourceType:t}),a().createElement(d.Typography,{className:E.text,variant:"body2"},r))}case"sourceTable":return w?a().createElement(p.Z,{multiple:!1,multiline:!1,getValueLabel:void 0,classes:{root:E.editor},required:!0,variant:"filled",value:t,onInput:t=>f(e,t.target.value),margin:"dense",InputProps:{disableUnderline:!0,classes:{input:E.input}}}):a().createElement(d.Typography,{className:E.text,variant:"body2"},t);case"value":return w?a().createElement(p.Z,{multiple:!1,multiline:!1,getValueLabel:void 0,classes:{root:E.editor},required:!0,variant:"filled",value:t,onInput:t=>f(e,t.target.value),margin:"dense",InputProps:{disableUnderline:!0,classes:{input:E.input}}}):a().createElement(k,{value:t});case"deleteDate":return a().createElement(j,{value:t&&A().utc((0,b.ZBU)(t)).valueOf(),onChange:t=>f(e,null==t?void 0:t.toString()),classes:{root:E.editor},disabled:!r});case"sourcePublishDate":case"createDate":case"updateDate":case"reltioLoadDate":return a().createElement(d.Typography,{className:E.text,variant:"body2"},(0,b.o0x)(t));default:return null}})(e.uri,t[e.uri]),e.canBeDeleted&&a().createElement(c.k,{icon:m.Z,disabled:!r,onClick:()=>S(e.uri),size:"XS",tooltipTitle:y().text("Delete attribute"),showForDisabled:!0}))):null)),a().createElement(o.Z,{open:!!T,onClose:()=>S(null),onConfirm:()=>{return e=T,C((t=>(0,g.without)([e],t))),void((0,g.isNil)(t[e])||h(e));var e}}))}},48017:(e,t,r)=>{r.d(t,{Z:()=>g});var n=r(24328),a=r.n(n),l=r(13896),o=r(52730),i=r(57014),s=r(40625),c=r(63149),u=r(94175),p=r(94079),d=r(49885);const m=(0,r(79692).Z)({dragLayer:{position:"fixed",top:0,left:0,width:"100%",height:"100%",overflow:"hidden",zIndex:1300,pointerEvents:"none"},crosswalkPreview:{height:"28px",maxWidth:"394px",display:"flex",overflow:"hidden",padding:"6px",alignItems:"center",boxSizing:"border-box"},sourceLabel:{fontSize:"13px",whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden"},sourceIcon:{width:"16px",height:"16px",marginRight:"9px"}}),b=e=>{let{crosswalk:t}=e;const r=m(),n=(0,c.nX)(t),l=(0,o.useSelector)(d.ZP.selectors.getMetadata),b=(0,i.tH7)(l,t.type);return a().createElement(s.Z,{color:n,className:r.crosswalkPreview},a().createElement(u.Z,{className:r.sourceIcon,sourceType:t.type}),a().createElement(p.Typography,{className:r.sourceLabel,variant:"body2"},b))},g=(0,n.memo)((()=>{var e;const t=m(),{isDragging:r,clientOffset:o,item:i}=(0,l.useDragLayer)((e=>({isDragging:e.isDragging(),clientOffset:e.getClientOffset(),item:e.getItem()}))),s=(0,n.useRef)(),c=(null===(e=s.current)||void 0===e?void 0:e.getBoundingClientRect())||{x:0,y:0},u=`translate(${(null==o?void 0:o.x)-(null==c?void 0:c.x)}px, ${(null==o?void 0:o.y)-(null==c?void 0:c.y)}px`;return r&&a().createElement("div",{ref:s,className:t.dragLayer},a().createElement("div",{style:{display:"flex",transform:u,WebkitTransform:u}},"Crosswalk"===i.type&&a().createElement(b,{crosswalk:i.crosswalk})))}))},79769:(e,t,r)=>{r.d(t,{Z:()=>p});var n=r(24328),a=r.n(n),l=r(87918),o=r.n(l),i=r(94079),s=r(61305),c=r(17440);const u=(0,r(79692).Z)({caption:{paddingLeft:15,paddingTop:16,paddingBottom:8},controlButtons:{display:"flex",justifyContent:"flex-end",paddingBottom:10,paddingTop:20},cancelButton:{marginRight:20}}),p=e=>{let{className:t,onAdd:r,onClose:l}=e;const p=u(),[d,m]=(0,n.useState)({type:"",value:""});return a().createElement("div",{className:t},a().createElement(i.Typography,{variant:"body1",className:p.caption},o().text("Add crosswalk")),a().createElement(s.Z,{crosswalk:d,onDeleteAttribute:e=>{m((0,c.dissoc)(e))},onEditAttribute:(e,t)=>{m((0,c.assoc)(e,t))}}),a().createElement("div",{className:p.controlButtons},a().createElement(i.Button,{className:p.cancelButton,onClick:l},o().text("Cancel")),a().createElement(i.Button,{color:"primary",onClick:()=>{r(d),l()},disabled:!d.type||!d.value},o().text("Add"))))}},52017:(e,t,r)=>{r.d(t,{Z:()=>D});var n=r(24328),a=r.n(n),l=r(63149),o=r(77243),i=r(57014),s=r(52730),c=r(94079),u=r(72753),p=r(94175),d=r(22385),m=r(49885),b=r(79692);const g=(0,b.Z)((()=>({root:e=>{let{isOpaque:t}=e;return{display:"flex",opacity:t?1:.38,transition:"opacity 0.3s"}},wrapper:{width:"100%",display:"flex",alignItems:"center",height:28,backgroundImage:"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNXG14zYAAAAWdEVYdENyZWF0aW9uIFRpbWUAMDcvMjYvMTMEw7WpAAAAeElEQVQ4ja3VuwrAIBBE0aup0uX/v9ImCCGSdIL4WF136+EwxcC6+3k/hAsxSREArvPAW2LAGFzFhqAG64JarAnuYBW4ixWgBZZBKwzAW2Ig7HAVCzHJ4AoGQsNVbAhqsC6oxZrgDlaBu1gBWmAZtMIA3MwLmMUAfmyqQ9/LD+oDAAAAAElFTkSuQmCC)"},focusedIcon:{width:28,height:28,backgroundColor:"rgba(0, 0, 0, 0.12)",borderRadius:0,borderRight:"1px solid #fff"},sourceIcon:{height:"16px",width:"16px",marginLeft:"16px",marginRight:"9px",fontSize:"14px"}}))),f=(0,n.memo)((e=>{let{crosswalkType:t,focusable:r=!0}=e;const{isDimmed:n}=(0,l.pu)(),o=g({isOpaque:!n}),b=(0,s.useSelector)(m.ZP.selectors.getMetadata),f=(0,i.tH7)(b,t);return a().createElement("div",{className:o.root},a().createElement(d.Z,{size:"XXS",className:o.focusedIcon,icon:r&&u.Z,disabled:!0}),a().createElement("div",{className:o.wrapper},a().createElement(p.Z,{className:o.sourceIcon,sourceType:t}),a().createElement(c.Typography,{variant:"body2"},f)))}));var y=r(87918),v=r.n(y),h=r(22983),E=r(19592),w=r(95613),x=r(40625),O=r(85209),k=r(8818),C=r(51229),T=r(71543),S=r(13896),I=r(42484),j=r(61305);const Z=(0,b.Z)({root:e=>{let{isOpaque:t}=e;return{display:"flex",filter:t?null:"saturate(20%)",opacity:t?1:.19,transition:"opacity 0.3s"}},header:{width:"100%",display:"flex",alignItems:"center",height:"28px"},focusedIcon:e=>{let{isFocused:t}=e;return{width:"26px","&:not([disabled])":{border:"1px solid rgba(0, 0, 0, 0.12)"},height:"28px",color:t?"#000":"rgba(0, 0, 0, 0.54)",borderRadius:0,margin:"0px 1px"}},crosswalkWrapper:{width:"100%",overflow:"hidden"},sourceIcon:{height:"16px",width:"16px",marginRight:"9px",fontSize:"14px"},attributesWrapper:e=>{let{color:t}=e;return{border:"1px solid",borderColor:t,position:"relative"}},deleteCrosswalkButton:{position:"absolute",top:5,right:5},labelValue:{marginLeft:5},dependentIcon:{width:"16px",height:"16px",fillOpacity:.38}}),A=(0,n.memo)((e=>{let{crosswalk:t,isDependent:r,isEmpty:o=!1,isColored:d=!0,focusable:b=!0,disableEdit:g,disableDelete:f,onDelete:y,onEdit:A}=e;const N=(0,n.useRef)(null),P=(0,l.nX)(t),{toggleCrosswalkFocus:D,isFocused:R}=(0,l.BF)(t),V=o?"#FFF":d?P:"#CACCD1",{isDimmed:M,highlightCrosswalk:z,removeHighlight:L}=(0,l.pu)(t),[U]=(0,l.RT)(),W=Z({color:V,isOpaque:!M,isFocused:R}),[B,F]=(0,n.useState)(!1),[H,Y]=(0,n.useState)(!1),_=(0,s.useSelector)(m.ZP.selectors.getMetadata),G=(0,i.tH7)(_,t.type),q=(0,i.nIW)(t.uri),X=(0,i.x_)(t),[,$,Q]=(0,S.useDrag)({item:{type:"Crosswalk",crosswalk:t},canDrag:!X}),J=!X&&"relation"!==t.ownerType;return(0,n.useEffect)((()=>{Q((0,I.r)(),{captureDraggingState:!0})}),[]),(0,n.useEffect)((()=>{var e;b&&U&&(0,i.aFF)(U,t)&&U!==t&&(null==N||null===(e=N.current)||void 0===e||e.scrollIntoView({behavior:"smooth"}))}),[U]),a().createElement("div",{className:W.root,ref:N},a().createElement(k.k,{size:"XXS",className:W.focusedIcon,icon:b&&u.Z,onClick:()=>D(),disabled:!b,tooltipTitle:b&&v().text("Focus")}),a().createElement("div",{className:W.crosswalkWrapper},a().createElement(x.Z,{ref:$,className:W.header,color:V,variant:X?"disabled":"standart",onMouseEnter:()=>z(),onMouseLeave:()=>L()},r&&a().createElement(T.Z,{className:W.dependentIcon}),a().createElement(E.Z,{onClick:()=>F((e=>!e)),expanded:B}),a().createElement(p.Z,{className:W.sourceIcon,sourceType:t.type}),a().createElement(w.Z,{value:G},a().createElement(c.Typography,{variant:"body2",noWrap:!0},G)),a().createElement(C.Z,null),a().createElement(w.Z,{value:t.value},a().createElement(c.Typography,{variant:"body2",className:W.labelValue,noWrap:!0},t.value))),B&&a().createElement("div",{className:W.attributesWrapper},J&&a().createElement("div",{className:W.deleteCrosswalkButton},a().createElement(k.k,{icon:h.Z,disabled:f,onClick:()=>Y(!0),size:"XS",tooltipTitle:f?v().text("You don't have permissions to delete"):v().text("Delete crosswalk"),showForDisabled:!0}),a().createElement(O.Z,{open:H,onConfirm:()=>{R&&D(),y(q)},onClose:()=>Y(!1)})),a().createElement(j.Z,{crosswalk:t,canEditAttribute:!g,onEditAttribute:(e,t)=>{A({crosswalkId:q,attributeName:e,value:t})},onDeleteAttribute:e=>{A({crosswalkId:q,attributeName:e})}}))))})),N=(0,b.Z)((()=>({root:{display:"flex",alignItems:"center",height:"28px",paddingLeft:"37px"}}))),P=e=>{let{showMore:t,onClick:r}=e;const n=N();return a().createElement(c.Link,{className:n.root,component:"button",variant:"caption",underline:"none",onClick:r},a().createElement("span",null,t?v().text("View dependent crosswalks"):v().text("Hide dependent crosswalks")))},D=e=>{let{source:t,crosswalksByTypes:r,showCrosswalkColors:s=!0,crosswalksFocusEnabled:c=!0,expanded:u,disableEditCrosswalk:p,disableDeleteCrosswalk:d,onEdit:m,onDelete:b,onToggleExpanded:g}=e;const y=(0,l.RT)();return(0,n.useEffect)((()=>{!u&&c&&r[o.Y.Dependent].some((e=>y.some((0,i.aFF)(e))))&&g()}),[y]),a().createElement(a().Fragment,null,0===r[o.Y.Simple].length&&0===r[o.Y.Empty].length&&a().createElement(f,{crosswalkType:t,focusable:c}),r[o.Y.Simple].map((e=>a().createElement(A,{key:e.uri,crosswalk:e,focusable:c,disableEdit:p,disableDelete:d,onDelete:b,onEdit:m,isColored:s}))),r[o.Y.Empty].map((e=>a().createElement(A,{key:e.uri,crosswalk:e,focusable:c,isEmpty:!0,disableEdit:p,disableDelete:d,onDelete:b,onEdit:m,isColored:s}))),u&&r[o.Y.Dependent].map((e=>a().createElement(A,{key:e.uri,crosswalk:e,isDependent:!0,disableEdit:p,disableDelete:d,onDelete:b,onEdit:m,focusable:c,isColored:s}))),r[o.Y.Dependent].length>0&&a().createElement(P,{showMore:!u,onClick:()=>g()}))}},39417:(e,t,r)=>{r.d(t,{P:()=>i});var n=r(24328),a=r(17440),l=r(57014),o=r(31276);const i=e=>{let{onLoad:t=o.ZT,onSuccess:r=o.ZT,onError:i=o.ZT}=e;const s=(0,n.useCallback)((e=>{t(),e.then((e=>{let{errors:t}=e;if(t)throw t;r()})).catch(i)}),[t,i,r]);return{addCrosswalk:(0,n.useCallback)((e=>{let{entity:t,contributorCrosswalk:r,crosswalk:n}=e;const o=r?(0,l.psB)({entityTypeUri:t.type,contributorCrosswalkType:r.type,contributorCrosswalkValue:r.value,contributorCrosswalkSourceTable:r.sourceTable,crosswalkType:n.type,crosswalkValue:n.value,crosswalkSourceTable:n.sourceTable,crosswalkDeleteDate:n.deleteDate}):(0,l.kRE)({entityUri:t.uri,crosswalk:n});(0,a.pipe)((0,a.andThen)((e=>{let[t]=e;return t})),s)(o)}),[s]),editCrosswalk:(0,n.useCallback)((e=>{let{entityUri:t,crosswalkId:r,attributeName:n,value:o}=e;(0,a.pipe)((0,a.ifElse)((e=>{let{value:t}=e;return(0,a.isNil)(t)}),l.K$w,l.WVU),(0,a.andThen)((e=>{let[t]=e;return t})),s)({entityUri:t,crosswalkId:r,attributeName:n,value:o})}),[s]),deleteCrosswalk:(0,n.useCallback)((e=>{let{entityUri:t,crosswalkId:r}=e;(0,a.pipe)(l.Gmt,s)({entityUri:t,crosswalkId:r})}),[s])}}},85965:(e,t,r)=>{r.d(t,{Q:()=>u});var n=r(24328),a=r(57014),l=r(17440),o=r(31276);function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){s(e,t,r[t])}))}return e}function s(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const c=[],u=e=>{let{entity:t,onLoad:r=o.ZT,onModify:s=o.ZT,onError:u=o.ZT}=e;const[p,d]=(0,n.useState)(null),[m,b]=(0,n.useState)(null),g=(0,n.useRef)([]),f=(0,n.useRef)(null),y=(0,n.useCallback)((()=>{f.current=null}),[]),[v,h]=(0,n.useState)(c),E=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.reduce(((e,t)=>((0,a.sJj)(t).forEach((r=>{e[r]=[...e[r]||[],t]})),e)),{})};(0,n.useEffect)((()=>{const e={entity:E(null==t?void 0:t.crosswalks),relation:(0,l.pipe)(a.PUO,E)(t)};if((null==p?void 0:p.uri)===(null==t?void 0:t.uri)&&f.current){const{ownerType:t}=f.current,r=Object.keys(e[t]),n=Object.keys(m[t]);h((0,l.difference)(r,n))}else h(c);y(),d(t),b(e),g.current=[]}),[t]);const w=(0,n.useCallback)((0,l.pipe)(u,y),[u,y]),{deleteAttribute:x,ignoreAttribute:O,pinAttribute:k,createAttribute:C,updateAttribute:T}=(e=>{let{onSuccess:t=o.ZT,onError:r=o.ZT,onLoad:i=o.ZT}=e;const s=(0,n.useCallback)((e=>{i(),e.then((()=>{t()})).catch(r)}),[r,t,i]),c=(0,n.useCallback)((e=>e.then((e=>{if("error"in e)throw e.error;return e}))),[]);return{deleteAttribute:(0,n.useCallback)((e=>{let{attributeValue:t,attributeType:r,crosswalks:n}=e;const o=(0,a.YkG)(r)?(0,l.pipe)(a.o96,(0,l.prop)("objectURI"),a.VGk,c)(t):Promise.all((n||[]).map((e=>{let{type:r,value:n,sourceTable:l}=e;return c((0,a.xZs)({attributeUri:t.uri,sourceUri:r,crosswalkValue:n,crosswalkSourceTable:l}))})));s(o)}),[s,c]),pinAttribute:(0,n.useCallback)((e=>{let{attributeValue:t}=e;(0,l.pipe)(a.xkv,c,s)({attributeUri:t.uri,value:!t.pin})}),[s,c]),ignoreAttribute:(0,n.useCallback)((e=>{let{attributeValue:t}=e;(0,l.pipe)(a.P8_,c,s)({attributeUri:t.uri,value:!t.ignored})}),[s,c]),updateAttribute:(0,n.useCallback)((e=>{let{attributeValue:t,attributeType:r,crosswalk:n}=e;(0,a.YkM)(r)||(0,a.Or$)(r)||(0,l.pipe)(a.tCj,c,s)({attributeUri:t.uri,sourceUri:n.type,crosswalkValue:n.value,crosswalkSourceTable:n.sourceTable,value:(0,a.CwH)(r)?t.lookupCode:t.value})}),[s,c]),createAttribute:(0,n.useCallback)((e=>{let{attributeValue:t,crosswalk:r}=e;(0,l.pipe)(a.JV_,(0,l.andThen)((e=>{let[{errors:t}]=e;if(t)throw t})),s)({attributeUri:t.uri,sourceUri:r.type,crosswalkValue:r.value,crosswalkSourceTable:r.sourceTable,value:t.value})}),[s])}})({onLoad:r,onSuccess:s,onError:w}),S=(0,n.useCallback)((e=>{let{attributeType:t,parentUri:r,crosswalk:n,index:o}=e;const s=(0,a.gjI)({parentUri:r,attributeType:t}),{uri:c}=s;if(n){const{ownerType:e}=n;b((t=>i({},t,{[e]:i({},t[e],{[c]:[n]})})))}d((e=>{var n;return(0,l.isNil)(o)&&(o=null===(n=(0,a.JQy)(e,r,t.name))||void 0===n?void 0:n.length),(0,a.wLZ)({entity:e,attributeType:t,newAttribute:s,index:o})})),g.current.some((e=>(0,a.sOy)(c,e)))||g.current.push(c)}),[]),I=(0,n.useCallback)((e=>{const{attributeValue:{uri:t},attributeType:r}=e;(0,a.ZiX)(t)?(d((e=>(0,a.d$I)({entity:e,attributeType:r,uri:t}))),b((0,l.evolve)({entity:(0,l.dissoc)(t),relation:(0,l.dissoc)(t)})),g.current=(0,l.without)([t],g.current)):x(e)}),[x]),j=(0,n.useCallback)((e=>{if((0,a.ZiX)(e.attributeValue.uri)){const{attributeValue:t,attributeType:r,crosswalk:n}=e;if(!(0,l.isNil)(t.value)){const{uri:e}=t,l=g.current.find((t=>(0,a.sOy)(e,t))),o=(0,a.ww$)({entity:p,attributeType:r,uri:e,value:(0,a.kDl)(t)});C({attributeValue:(0,a.dLR)(o,l),crosswalk:n}),f.current=n}}else T(e)}),[C,T,p]);return{modifiedEntity:p,crosswalksMap:m,onAddAttribute:S,onDeleteAttribute:I,onPinAttribute:k,onIgnoreAttribute:O,onEditAttribute:j,newlyCreatedAttributes:v}}},77243:(e,t,r)=>{let n;r.d(t,{Y:()=>n}),function(e){e.Simple="simple",e.Empty="empty",e.Dependent="dependent"}(n||(n={}))},90186:(e,t,r)=>{r.d(t,{o:()=>s});var n=r(57014),a=r(17440),l=r(77243);const o=e=>e[l.Y.Simple].length>0?1:e[l.Y.Dependent].length>0?e[l.Y.Empty].length>0?2:3:4,i=(0,a.evolve)({[l.Y.Dependent]:(0,a.sort)(((e,t)=>{const r=e.sourceTable||"",n=t.sourceTable||"";return r===n?0:r?n?r<n?-1:1:-1:1}))}),s=(0,a.curry)(((e,t,r)=>{const s=(r||[]).reduce(((r,o)=>(r[o.type]||(r[o.type]={[l.Y.Simple]:[],[l.Y.Empty]:[],[l.Y.Dependent]:[]}),"relation"===o.ownerType?r[o.type][l.Y.Dependent].push(o):((e,t,r)=>0===(0,n.sJj)(r).filter((r=>{const l=(0,n.AFK)(r,e);return t.some((0,a.propEq)("uri",l))})).length)(e,t,o)?r[o.type][l.Y.Empty].push(o):((e,t,r)=>!(0,n.sJj)(r).some((r=>{const l=(0,n.AFK)(r,e),o=t.find((0,a.propEq)("uri",l));return o&&!(0,n.YkM)(o)})))(e,t,o)?r[o.type][l.Y.Dependent].push(o):r[o.type][l.Y.Simple].push(o),r)),{});return Object.keys(s).sort(((e,t)=>o(s[e])-o(s[t])||(e<t?-1:1))).map((e=>({source:e,crosswalksByTypes:i(s[e])})))}))},63149:(e,t,r)=>{r.d(t,{hR:()=>c,nX:()=>u,RT:()=>p,pu:()=>d,BF:()=>m});var n=r(24328),a=r.n(n),l=r(57014),o=r(17440),i=r(31276);const s=(0,n.createContext)(null),c=e=>{let{children:t}=e,r=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["children"]);return a().createElement(s.Provider,{value:r},t)},u=e=>{const{getCrosswalkColor:t=(0,o.pipe)(l.uKF,l.CJp)}=(0,n.useContext)(s)||{};return e?t(e):""},p=()=>{const{highlightedCrosswalks:e=[]}=(0,n.useContext)(s)||{};return e},d=e=>{const{highlightedCrosswalks:t=[],setCrosswalkHighlighted:r=i.ZT}=(0,n.useContext)(s)||{},a=!!e&&!!t.find((0,o.eqBy)(l.uKF,e));return{isHighlighted:a,isDimmed:t.length>0&&!a,highlightCrosswalk:(0,n.useCallback)((()=>r(e,!0)),[e,r]),removeHighlight:(0,n.useCallback)((()=>r(e,!1)),[e,r])}},m=e=>{const{toggleCrosswalkFocus:t=i.ZT,focusedCrosswalks:r=[]}=(0,n.useContext)(s)||{};return{isFocused:!!e&&r.some((0,o.eqBy)(l.uKF,e)),toggleCrosswalkFocus:(0,n.useCallback)((()=>t(e)),[e,t])}}},66095:(e,t,r)=>{r.d(t,{R:()=>i,Q:()=>s});var n=r(24328),a=r.n(n),l=r(57014);const o=(0,n.createContext)(null),i=e=>{let{children:t,attributeUris:r}=e;return a().createElement(o.Provider,{value:r},t)},s=e=>((0,n.useContext)(o)||[]).some((t=>(0,l.sOy)(t,e)))}}]);
|
|
2
2
|
//# sourceMappingURL=6103.js.map
|
package/6119.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[6119],{30739:(e,t,n)=>{n.d(t,{Z:()=>m});var a=n(24328),r=n.n(a),l=n(50166),i=n(44443),o=n(57014);const s=(0,n(79692).Z)({item:{overflow:"hidden"}});function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){p(e,t,n[t])}))}return e}function p(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const m=(0,a.memo)((e=>{let{width:t=0,height:n=0,defaultItemSize:p,data:m,children:u,itemKey:d,showNotMeasuredItems:E,listRef:h}=e;const v=s(),g=(0,a.useRef)({}),[f,y]=(0,a.useState)({}),T=(0,a.useCallback)((0,o.DsO)((()=>{y(c({},g.current))})),[]),b=(0,a.useCallback)(((e,t)=>d?d(t,e):t),[d]),I=(0,a.useRef)(),x=h||I;x.current&&x.current.resetAfterIndex(0,!1);const O=(0,a.useMemo)((()=>e=>{let{data:t,index:n,style:a}=e;const l=b(t,n);return r().createElement("div",{style:a,className:v.item},r().createElement("div",{style:E?void 0:{visibility:l in f?void 0:"hidden"}},r().createElement(i.Z,{handleHeight:!0,onResize:(e,t)=>{g.current[l]!==t&&(((e,t)=>{g.current=c({},g.current,{[e]:t})})(l,t),T())}}),u({data:t,index:n})))}),[u,E,b,T,!E&&f]);return r().createElement(l.VariableSizeList,{ref:x,width:t,height:n,itemCount:m.length,itemData:m,itemSize:e=>f[(e=>b(m,e))(e)]||p,itemKey:d},O)}))},4094:(e,t,n)=>{n.d(t,{Z:()=>c});var a=n(24328),r=n.n(a),l=n(71153),i=n.n(l);const o=(0,n(79692).Z)({"basic-view-content":{flex:"1 1 auto",padding:"0 24px 24px","&:first-child":{paddingTop:"24px"}}});function s(){return s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},s.apply(this,arguments)}const c=e=>{let{children:t,className:n}=e,a=function(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},l=Object.keys(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(e,["children","className"]);const l=o();return r().createElement("div",s({className:i()(l["basic-view-content"],n)},a),t)}},88234:(e,t,n)=>{n.d(t,{Z:()=>Ve});var a=n(94079),r=n(24328),l=n.n(r),i=n(58662),o=n(87918),s=n.n(o),c=n(30739),p=n(17440),m=n(95038),u=n.n(m);const d=(0,p.pipe)((0,p.groupBy)((e=>{let{timestamp:t}=e;return u()(t).startOf("day")})),p.toPairs,(0,p.map)((e=>{let[t,n]=e;return{timestamp:u()(t).valueOf(),collapsed:!1,children:n}}))),E=(0,p.addIndex)(p.chain)(((e,t)=>{let{children:n,collapsed:a,timestamp:r}=e;const l={collapsed:a,timestamp:r,index:t};return a?[l]:[l,...n]})),h=(0,p.has)("collapsed"),v=(e,t)=>{const n=t[e];return"uri"in n?n.uri:`${n.index}`};var g=n(34606),f=n(51229),y=n(58241),T=n(57014),b=n(79692);const I=(0,b.Z)({groupItem:{display:"flex",height:"40px",alignItems:"center",paddingTop:"10px",boxSizing:"border-box"},groupIcon:{marginLeft:"-5px",marginRight:"22px",width:"10px",height:"10px",background:"white",border:"2px solid #D8D8D8",borderRadius:"50%",boxSizing:"border-box",flexShrink:0},groupTitle:{fontWeight:500}}),x=e=>{let{item:{index:t,timestamp:n,collapsed:r},onToggle:i}=e;const o=I();return l().createElement("div",{className:o.groupItem},l().createElement("div",{className:o.groupIcon}),l().createElement(a.Typography,{className:o.groupTitle,variant:"subtitle1"},(0,T.zkt)(n)?s().text("Today"):s().date(n,"LL")),l().createElement(f.Z,null),l().createElement(y.Z,{isOpen:!r,onClick:()=>i(t)}))};var O=n(31537);const N=(0,b.Z)((e=>({activityTitle:{display:"block",fontWeight:500,fontSize:13,lineHeight:"15px",color:e.palette.text.primary,marginBottom:8,marginRight:70},activityType:{flexShrink:0,marginRight:8,whiteSpace:"nowrap"}}))),w=e=>{let{type:t,children:n}=e;const a=N();return l().createElement("span",{className:a.activityTitle},l().createElement("span",{className:a.activityType},(0,g.Xr)(t)),n)},C=e=>{let{type:t}=e;return l().createElement(w,{type:t})};var S=n(52730),R=n(49885);const D=(0,b.Z)((e=>({link:{color:"#0072CE",textDecoration:"none",fontWeight:400,cursor:"pointer"},objectLabel:{color:e.palette.text.secondary,lineHeight:"15px",fontWeight:400},relationUri:{color:e.palette.text.primary,fontWeight:400}}))),_=e=>{var t,n;let{data:a,type:r}=e;const i=D(),o=(0,S.useSelector)(R.ZP.selectors.getMetadata),s=(0,T.T6O)(o,null===(t=a.items)||void 0===t||null===(n=t[0])||void 0===n?void 0:n.objectType);return l().createElement(w,{type:r},l().createElement("span",{className:i.objectLabel},(0,T.idV)(s)))},P=3,A=(0,r.createContext)(null),M=e=>{let{children:t}=e;const[n,a]=(0,r.useState)([]);return l().createElement(A.Provider,{value:{expandedItems:n,addExpandedItems:e=>{n.includes(e)||a((t=>[...t,e]))}}},t)},L=e=>{let{itemsId:t,items:n=[],limit:a=P}=e;const{expandedItems:l,addExpandedItems:i}=(0,r.useContext)(A),o=(0,r.useCallback)((()=>i(t)),[t]),s=l.includes(t),c=n.slice(0,s?n.length:a);return{onExpand:o,itemsToShow:c,collapsedItemsCount:n.length-c.length}};function H(){return H=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},H.apply(this,arguments)}const j=e=>{let{itemsCount:t,itemsLabel:n}=e,r=function(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},l=Object.keys(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(e,["itemsCount","itemsLabel"]);return l().createElement(a.Link,H({component:"button",variant:"caption"},r,{underline:"none"}),l().createElement("span",null,s().text("${itemsCount} more",{itemsCount:t})," ",n))},U=e=>{let{RecordComponent:t,items:n,activityUri:a}=e;const{onExpand:r,itemsToShow:i,collapsedItemsCount:o}=L({itemsId:a,items:n});return l().createElement(l().Fragment,null,i.map((e=>l().createElement(t,{key:e.id,item:e}))),o?l().createElement(j,{itemsCount:o,itemsLabel:1===o?s().text("record"):s().text("records"),onClick:r}):null)};var k=n(71153),Z=n.n(k),z=n(31039);const G=(0,b.Z)((e=>({link:{fontSize:13,lineHeight:"15px",color:"#0072CE",textDecoration:"none",fontWeight:400,"&.removed":{pointerEvents:"none",color:e.palette.text.secondary}}}))),V=e=>{let{item:t}=e;const n=G(),{objectLabel:a,objectUri:r,data:i}=t,o=(null==i?void 0:i.type)===O.I.ENTITY_REMOVED;return l().createElement(z.Z,{className:Z()(n.link,{removed:o}),value:r},(0,T.idV)(a))},W=(0,b.Z)((e=>({field:{fontSize:12,lineHeight:"20px",color:e.palette.text.primary,marginTop:4,display:"block"},fieldName:{color:e.palette.text.secondary,marginRight:8},link:{color:"#0072CE",textDecoration:"none",fontWeight:400}}))),B=(0,b.Z)((e=>({arrow:{margin:"0 8px",fontSize:12,color:e.palette.text.primary},chip:{height:20,width:53,fontSize:10,fontWeight:500,lineHeight:"16px",marginLeft:9,flexShrink:0,textTransform:"capitalize","& span":{padding:0},"&.edited":{color:"#6973C2",borderColor:"#6973C2"},"&.added":{color:"#75C378",borderColor:"#75C378"},"&.deleted":{color:"#F97061",borderColor:"#F97061"}},expandLabel:{fontSize:12},andLabel:{color:e.palette.text.secondary}}))),F=e=>{let{item:{id:t,data:n}}=e;const a=W(),r=B(),i=(null==n?void 0:n.potentialMatches)||(null==n?void 0:n.newUri),{onExpand:o,collapsedItemsCount:c,itemsToShow:p}=L({itemsId:t,items:i.split(",")}),m=null==n?void 0:n.type;return l().createElement("div",{className:a.field},l().createElement("span",{className:a.fieldName},(e=>({[O.I.POTENTIAL_MATCHES_FOUND]:s().text("Matches found"),[O.I.POTENTIAL_MATCHES_REMOVED]:s().text("Matches removed"),[O.I.NOT_MATCHES_SET]:s().text("Were set"),[O.I.NOT_MATCHES_RESET]:s().text("Were reset"),[O.I.ENTITIES_MERGED_MANUALLY]:s().text("Merged with"),[O.I.ENTITIES_MERGED]:s().text("Merged automatically with"),[O.I.ENTITIES_SPLITTED]:s().text("Un-merged with")}[e]||""))(m),":"),p.map(((e,t)=>l().createElement(z.Z,{key:t,value:e,className:a.link},(0,T.idV)(n[e])))).reduce(((e,t)=>[e,", ",t])),c?l().createElement(l().Fragment,null,l().createElement("span",{className:r.andLabel}," ",s().text("and")," "),l().createElement(j,{itemsCount:c,itemsLabel:1===c?s().text("match"):s().text("matches"),onClick:o,className:r.expandLabel})):null)},K=(0,b.Z)((e=>({record:{background:"rgba(0, 0, 0, 0.03)",border:"1px solid rgba(0, 0, 0, 0.03)",boxSizing:"border-box",borderRadius:"3px",padding:"7px 14px",marginBottom:8,position:"relative","&:hover $restoreIcon":{visibility:"visible"}},label:{color:e.palette.text.primary,fontSize:12,lineHeight:"16px"},description:{marginRight:8,flexShrink:0},restoreIcon:{visibility:"hidden",color:e.palette.text.secondary,position:"absolute",right:4,top:3,cursor:"pointer"},moreLabel:{marginTop:4}}))),$=e=>{let{item:t}=e;const n=K(),{potentialMatches:a,newUri:r}=t.data;return a||r?l().createElement("div",{className:n.record},l().createElement("span",{className:n.label},l().createElement(V,{item:t})),l().createElement(F,{item:t})):null},Y=e=>{let{type:t,data:n}=e;const{itemsTotal:a,items:r,uri:i}=n,o=1===a&&!(r[0].data.potentialMatches||r[0].data.newUri);return l().createElement("div",null,l().createElement(w,{type:t},o&&l().createElement(V,{item:r[0]})),!o&&l().createElement(U,{activityUri:i,items:r,RecordComponent:$}))},q=e=>{let{type:t,data:n}=e;return l().createElement("div",null,l().createElement(w,{type:t}),l().createElement(U,{activityUri:n.uri,items:n.items,RecordComponent:$}))};var X=n(42668),J=n(27597),Q=n(99601);const ee=e=>{var t,n;let{delta:r}=e;const i=B(),o=W(),s=(0,S.useSelector)(R.ZP.selectors.getMetadata),c=(0,S.useSelector)(R.ZP.selectors.getAttributePresentations),p=(0,T.zeJ)(s,r.attributeType),m=null===(t=r.newValue)||void 0===t?void 0:t.value,u=null===(n=r.oldValue)||void 0===n?void 0:n.value,d=u||m,E=Q.w[r.type],h=e=>(0,g._V)(e,r.attributeType,s,c);return l().createElement("div",{className:o.field},l().createElement("span",{className:o.fieldName},(null==p?void 0:p.label)||(null==p?void 0:p.name),":"),l().createElement("span",null,d&&h(d),m&&u&&l().createElement(l().Fragment,null,l().createElement(J.Z,{className:i.arrow}),h(m))),E&&l().createElement(a.Chip,{variant:"outlined",label:E,className:Z()(i.chip,E)}))},te=e=>{let{updates:t,recordId:n}=e;const a=K(),{onExpand:r,collapsedItemsCount:i,itemsToShow:o}=L({itemsId:n,items:t});return l().createElement(l().Fragment,null,o.map(((e,t)=>l().createElement(ee,{key:t,delta:e}))),i?l().createElement(j,{itemsCount:i,itemsLabel:1===i?s().text("update"):s().text("updates"),onClick:r,className:a.moreLabel}):null)},ne=e=>{var t;let{item:n}=e;const r=K(),i=(0,S.useDispatch)(),o=null===(t=n.deltaCollection)||void 0===t?void 0:t.delta,c=(0,p.path)(["data","type"])(n)===O.I.ENTITY_CHANGED;return l().createElement("div",{className:r.record},l().createElement(a.Typography,{className:r.label},!o&&l().createElement("span",{className:r.description},s().text("Profile changed")),l().createElement(V,{item:n})),c&&l().createElement(X.Z,{className:r.restoreIcon,onClick:()=>{(0,T.fAQ)(n.objectUri,n.timestamp).then((e=>{if(-1!==e){const t={aStamp:n.timestamp,bStamp:e};i(R.ui.actions.openHistoryEvent({entityUri:n.objectUri,historyEvent:t}))}})).catch((e=>console.error(e)))}}),l().createElement(te,{updates:o,recordId:n.id}))},ae=e=>{var t;let{type:n,data:a}=e;const r=1===a.itemsTotal&&!(null!==(t=a.items[0].deltaCollection)&&void 0!==t&&t.delta);return l().createElement("div",null,l().createElement(w,{type:n},r&&l().createElement(V,{item:a.items[0]})),!r&&l().createElement(U,{activityUri:a.uri,items:a.items,RecordComponent:ne}))},re=(0,b.Z)((e=>({relationship:{fontSize:13,lineHeight:"15px",color:e.palette.text.secondary,overflow:"hidden"},link:{color:"#0072CE",textDecoration:"none",fontWeight:400},delimiter:{margin:"0 8px"}}))),le=e=>{let{item:t}=e;const n=re(),{startObjectLabel:a,startObjectUri:r,endObjectLabel:i,endObjectUri:o}=t;return l().createElement("span",{className:n.relationship},l().createElement(z.Z,{className:n.link,value:r},(0,T.idV)(a)),l().createElement("span",{className:n.delimiter},s().text("to")),l().createElement(z.Z,{className:n.link,value:o},(0,T.idV)(i)))},ie=e=>{var t;let{item:n}=e;const r=K(),i=null===(t=n.deltaCollection)||void 0===t?void 0:t.delta;return l().createElement("div",{className:r.record},l().createElement(a.Typography,{className:r.label},!i&&l().createElement("span",{className:r.description},s().text("Relationship updated")),l().createElement(le,{item:n})),l().createElement(te,{updates:i,recordId:n.id}))},oe=e=>{var t;let{type:n,data:a}=e;const r=1===a.itemsTotal&&!(null!==(t=a.items[0].deltaCollection)&&void 0!==t&&t.delta);return l().createElement("div",null,l().createElement(w,{type:n},r&&l().createElement(le,{item:a.items[0]})),!r&&l().createElement(U,{activityUri:a.uri,items:a.items,RecordComponent:ie}))};var se=n(31276),ce=n(41188);const pe=e=>{let{data:t,type:n}=e;const a=D(),i=(0,S.useDispatch)(),o=(0,r.useMemo)((()=>{const e=(0,se.Rx)(t.description);return"2.0"===e.version?e.activity.uiState:e}),[t.description]),c=(0,p.pipe)((0,p.always)(o),R.ui.actions.openSearch,i),m=(0,ce.v)(o);return l().createElement(w,{type:n},l().createElement("span",{className:a.link,onClick:c},m||s().text("all profiles")))},me=e=>{let{type:t,data:n}=e;const a=D(),r=(0,se.Rx)(n.description),i=n.itemsTotal;return l().createElement(w,{type:t},r&&l().createElement(z.Z,{className:a.link,value:r.uri},(0,T.idV)(r.label)),i>1&&l().createElement("span",{className:a.objectLabel},s().text("(${itemsTotal} records)",{itemsTotal:i})))},ue=e=>{let{type:t,data:n}=e;const a=D(),r=(0,se.Rx)(n.description),i=n.itemsTotal,o=n.items[0].objectUri;return l().createElement(w,{type:t},l().createElement(l().Fragment,null,(0,T.bC9)(o)?l().createElement("span",{className:a.relationUri},o):l().createElement(V,{item:n.items[0]}),r&&l().createElement("div",{className:a.objectLabel},r.label)),i>1&&l().createElement("div",{className:a.objectLabel},s().text("(${itemsTotal} records)",{itemsTotal:i})))};function de(){return de=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},de.apply(this,arguments)}const Ee=e=>l().createElement("svg",de({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),l().createElement("path",{d:"M17.4 13.08h-4.32v4.32h-2.16v-4.32H6.6v-2.16h4.32V6.6h2.16v4.32h4.32v2.16z",fill:"#fff"}));var he=n(12147);function ve(){return ve=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},ve.apply(this,arguments)}const ge=e=>l().createElement("svg",ve({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),l().createElement("path",{d:"M16.35 6h-8.7C6.74 6 6 6.804 6 7.793v5.788c0 .986.737 1.79 1.644 1.793V18l3.472-2.626h5.234c.91 0 1.65-.805 1.65-1.793V7.793C18 6.804 17.26 6 16.35 6zm-1.562 6.726H9.212v-.765h5.576v.765zm0-1.63H9.212v-.765h5.576v.764zm0-1.631H9.212V8.7h5.576v.764z",fill:"#fff"}));function fe(){return fe=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},fe.apply(this,arguments)}const ye=e=>l().createElement("svg",fe({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),l().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.6 15.15v2.25h2.25l6.636-6.636-2.25-2.25L6.6 15.15zm10.626-6.126a.598.598 0 000-.846l-1.404-1.404a.598.598 0 00-.846 0l-1.098 1.098 2.25 2.25 1.098-1.098z",fill:"#fff"}));function Te(){return Te=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},Te.apply(this,arguments)}const be=e=>l().createElement("svg",Te({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),l().createElement("path",{d:"M15.6 6H9c-.662 0-1.2.539-1.2 1.2V9H9V7.2h6.6v9.6H9V15H7.8v1.8c0 .662.538 1.2 1.2 1.2h6.6c.662 0 1.2-.538 1.2-1.2V7.2c0-.661-.538-1.2-1.2-1.2z",fill:"#fff"}),l().createElement("path",{d:"M10.975 13.976l.85.848 2.823-2.83-2.824-2.819-.848.85 1.378 1.375H7.2v1.2h5.15l-1.375 1.376z",fill:"#fff"}));function Ie(){return Ie=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},Ie.apply(this,arguments)}const xe=e=>l().createElement("svg",Ie({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),l().createElement("path",{d:"M7.4 6H14c.662 0 1.2.539 1.2 1.2V9H14V7.2H7.4v9.6H14V15h1.2v1.8c0 .662-.538 1.2-1.2 1.2H7.4c-.662 0-1.2-.538-1.2-1.2V7.2c0-.661.538-1.2 1.2-1.2z"}),l().createElement("path",{d:"M15.127 13.976l.85.848 2.823-2.83-2.824-2.819-.849.85 1.379 1.375h-5.154v1.2H16.5l-1.374 1.376z"}));function Oe(){return Oe=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},Oe.apply(this,arguments)}const Ne=e=>l().createElement("svg",Oe({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),l().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.764 11.152V9.659l2.334 2.217-2.334 2.217v-1.444H13.12c-1.023 0-1.333.314-1.918 1.632-.797 1.796-1.514 2.52-3.3 2.52h-1.69v-1.495h1.69c1.036 0 1.35-.319 1.937-1.639.348-.784.68-1.363 1.09-1.766-.41-.403-.742-.982-1.09-1.766-.586-1.32-.901-1.64-1.938-1.64H6.213V7H7.9c1.787 0 2.504.725 3.301 2.52.585 1.318.895 1.633 1.918 1.633h2.644z",fill:"#fff"}));function we(){return we=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},we.apply(this,arguments)}const Ce=e=>l().createElement("svg",we({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),l().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16.8 15.6V7.2H8.4V6h8.4c.66 0 1.2.54 1.2 1.2v8.4h-1.2zM7.2 18c-.66 0-1.2-.54-1.2-1.2V9.6c0-.66.54-1.2 1.2-1.2h7.2c.66 0 1.2.54 1.2 1.2v7.2c0 .66-.54 1.2-1.2 1.2H7.2zm4.937-2.8l.663-.663-1.337-1.337 1.337-1.337-.663-.663-1.337 1.337L9.463 11.2l-.663.663 1.337 1.337L8.8 14.537l.663.663 1.337-1.337 1.337 1.337z",fill:"#fff"}));function Se(){return Se=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},Se.apply(this,arguments)}const Re=e=>l().createElement("svg",Se({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),l().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16.8 7.2v8.4H18V7.2c0-.66-.54-1.2-1.2-1.2H8.4v1.2h8.4zM6 16.8c0 .66.54 1.2 1.2 1.2h7.2c.66 0 1.2-.54 1.2-1.2V9.6c0-.66-.54-1.2-1.2-1.2H7.2c-.66 0-1.2.54-1.2 1.2v7.2z",fill:"#fff"}));function De(){return De=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},De.apply(this,arguments)}const _e=e=>l().createElement("svg",De({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),l().createElement("path",{d:"M11.727 5c1.66 0 3 1.376 3 3.08 0 1.704-1.34 3.08-3 3.08s-3-1.376-3-3.08c0-1.704 1.34-3.08 3-3.08zM12 19c-2.5 0-4.71-1.365-6-3.435.03-2.122 4-3.285 6-3.285 1.99 0 5.97 1.163 6 3.285C16.71 17.635 14.5 19 12 19z",fill:"#fff"}));function Pe(){return Pe=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},Pe.apply(this,arguments)}const Ae=e=>l().createElement("svg",Pe({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),l().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14.125 7.583h2.042V8.75H8V7.583h2.042L10.625 7h2.917l.583.583zM9.75 17.5a1.17 1.17 0 01-1.167-1.167v-7h7v7a1.17 1.17 0 01-1.166 1.167H9.75z",fill:"#fff"}));function Me(){return Me=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},Me.apply(this,arguments)}const Le=e=>l().createElement("svg",Me({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),l().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14.432 13.358h-.568l-.197-.196a4.627 4.627 0 001.121-3.023 4.65 4.65 0 10-4.649 4.65 4.628 4.628 0 003.022-1.12l.198.195v.567L16.933 18 18 16.934l-3.568-3.576zm-4.293 0a3.218 3.218 0 11.152-.004l-.152.004z",fill:"#fff"}));function He(){return He=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},He.apply(this,arguments)}const je=e=>l().createElement("svg",He({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),l().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M20.134 7.718L17.8 5.5V7h-1.604c-1.786 0-2.503.725-3.3 2.52-.585 1.318-.895 1.633-1.918 1.633H8.301v1.495h2.677c1.023 0 1.333.314 1.918 1.632.797 1.796 1.514 2.52 3.3 2.52h1.69v-1.495h-1.69c-1.036 0-1.35-.319-1.937-1.639-.348-.784-.68-1.363-1.09-1.766.41-.403.742-.982 1.09-1.766.586-1.32.901-1.639 1.938-1.639H17.8v1.44l2.334-2.217z",fill:"#fff"}));class Ue{}Ue.getComponent=e=>{let{type:t,data:n}=e;switch(t){case O.I.COMMENT_ADDED:case O.I.COMMENT_DELETED:case O.I.COMMENT_UPDATED:return l().createElement(C,{data:n,type:t});case O.I.ENTITIES_MERGED_MANUALLY:case O.I.ENTITIES_MERGED:case O.I.ENTITIES_MERGED_ON_THE_FLY:case O.I.ENTITIES_SPLITTED:case O.I.ENTITY_LOST_MERGE:return l().createElement(Y,{data:n,type:t});case O.I.POTENTIAL_MATCHES_FOUND:case O.I.POTENTIAL_MATCHES_REMOVED:case O.I.NOT_MATCHES_SET:case O.I.NOT_MATCHES_RESET:return l().createElement(q,{data:n,type:t});case O.I.ENTITY_CHANGED:case O.I.ENTITY_CREATED:case O.I.ENTITY_REMOVED:case O.I.ANALYTICS_ATTRIBUTES_CHANGED:return l().createElement(ae,{data:n,type:t});case O.I.RELATIONSHIP_CHANGED:case O.I.RELATIONSHIP_CREATED:case O.I.RELATIONSHIP_REMOVED:return l().createElement(oe,{data:n,type:t});case O.I.USER_SEARCH:return l().createElement(pe,{data:n,type:t});case O.I.GROUP_CHANGED:case O.I.GROUP_CREATED:case O.I.GROUP_REMOVED:return l().createElement(_,{data:n,type:t});case O.I.USER_LOGIN:case O.I.USER_LOGOUT:case O.I.MODEL_UPDATED:case O.I.PERIODIC_TASK_SCHEDULED:case O.I.USER_PROFILE_VIEW:return l().createElement(me,{data:n,type:t});case O.I.SFDC_CONNECTOR_SYNCHRONIZATION_ISSUE:return l().createElement(ue,{data:n,type:t});default:return l().createElement("div",null,t," NOT IMPLEMENTED")}},Ue.getIcon=e=>{switch(e){case O.I.USER_LOGIN:return l().createElement(be,null);case O.I.USER_LOGOUT:return l().createElement(xe,null);case O.I.USER_PROFILE_VIEW:return l().createElement(_e,null);case O.I.PERIODIC_TASK_SCHEDULED:return l().createElement(he.Z,null);case O.I.ENTITIES_SPLITTED:return l().createElement(je,null);case O.I.ENTITIES_MERGED_MANUALLY:case O.I.ENTITIES_MERGED:case O.I.ENTITIES_MERGED_ON_THE_FLY:case O.I.ENTITY_LOST_MERGE:return l().createElement(Ne,null);case O.I.ENTITY_CREATED:case O.I.RELATIONSHIP_CREATED:case O.I.GROUP_CREATED:return l().createElement(Ee,null);case O.I.ENTITY_REMOVED:case O.I.RELATIONSHIP_REMOVED:case O.I.POTENTIAL_MATCHES_REMOVED:case O.I.GROUP_REMOVED:return l().createElement(Ae,null);case O.I.USER_SEARCH:return l().createElement(Le,null);case O.I.POTENTIAL_MATCHES_FOUND:return l().createElement(Re,null);case O.I.NOT_MATCHES_RESET:case O.I.NOT_MATCHES_SET:return l().createElement(Ce,null);case O.I.COMMENT_ADDED:case O.I.COMMENT_UPDATED:case O.I.COMMENT_DELETED:return l().createElement(ge,null);case O.I.ENTITY_CHANGED:case O.I.MODEL_UPDATED:case O.I.RELATIONSHIP_CHANGED:case O.I.GROUP_CHANGED:default:return l().createElement(ye,null)}};const ke=Ue,Ze=(0,b.Z)((e=>({activityItem:{display:"flex",minHeight:"40px",padding:"10px 0 5px 0",boxSizing:"border-box"},activityIcon:{marginLeft:"-13px",marginRight:"15px",width:"24px",height:"24px",background:"#4896DF",borderRadius:"50%",border:"1px solid white",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,"& svg":{fill:"white",fontSize:"14px"}},activityInfo:{flex:1,overflow:"hidden",position:"relative"},activityUser:{fontSize:13,lineHeight:"15px",color:e.palette.text.secondary,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},activityEvent:{marginTop:"5px"},date:{position:"absolute",right:0,marginTop:"5px",fontSize:12,lineHeight:"16px",color:e.palette.text.primary,marginLeft:"auto",flexShrink:0,paddingLeft:8}}))),ze=e=>{let{item:t}=e;const n=Ze(),r=(0,g.te)(t),i=(0,g.rx)(t);return l().createElement("div",{className:n.activityItem},l().createElement("div",{className:n.activityIcon},ke.getIcon(r)),l().createElement("div",{className:n.activityInfo},l().createElement(a.Typography,{className:n.activityUser},t.user),l().createElement("span",{className:n.date},s().date(t.timestamp,"LT")),i.map(((e,t)=>l().createElement("div",{key:t,className:n.activityEvent},ke.getComponent({type:(0,g.te)(e),data:e}))))))},Ge=(0,b.Z)({rowDivider:{marginLeft:"28px"},listRow:{paddingLeft:"12px","&::before":{content:'""',width:"2px",position:"absolute",height:"100%",top:0,left:"11px",backgroundColor:"#D8D8D8",zIndex:"-1"},overflow:"hidden"},firstRow:{"&$listRow::before":{height:"calc(100% - 20px)",top:"20px"}},lastRow:{"&$listRow::before":{height:"20px"}},singleRow:{"&$listRow::before":{display:"none"}}}),Ve=e=>{let{width:t,height:n,activities:o,count:m,page:u,onChangePage:f,rowsPerPage:y,onChangeRowsPerPage:T,rowsPerPageOptions:b}=e;const I=Ge(),[O,N]=(0,r.useState)([]),w=e=>{N((0,p.adjust)(e,(0,p.evolve)({collapsed:p.not})))};(0,r.useEffect)((()=>{(0,p.pipe)((0,p.map)(g.Io),(0,p.filter)((e=>{let{itemsTotal:t}=e;return 0!==t})),d,N)(o)}),[o]);const C=(0,r.useMemo)((()=>E(O)),[O]),S=(0,r.useCallback)((e=>{let{data:t,index:n}=e;const r=t[n];return l().createElement("div",{className:Z()(I.listRow,{[I.singleRow]:1===t.length,[I.firstRow]:0===n,[I.lastRow]:n===t.length-1})},h(r)?l().createElement(x,{item:r,onToggle:w}):l().createElement(l().Fragment,null,l().createElement(ze,{item:r}),l().createElement(a.Divider,{className:I.rowDivider,light:!0,variant:"inset"})))}),[]);return l().createElement(l().Fragment,null,l().createElement(M,null,l().createElement(c.Z,{width:t,height:n-60,data:C,defaultItemSize:40,itemKey:v},S)),l().createElement(i.Z,{count:m,onChangePage:f,page:u,rowsPerPage:y,onChangeRowsPerPage:T,rowsPerPageOptions:b,labelRowsPerPage:s().text("Events per page:")}))}},34359:(e,t,n)=>{n.d(t,{Z:()=>ee});var a=n(24328),r=n.n(a),l=n(52730),i=n(87918),o=n.n(i),s=n(94079),c=n(36444),p=n(17440),m=n(57014),u=n(67885),d=n(34606),E=n(8818),h=n(71153),v=n.n(h),g=n(79692),f=n(41128);const y=(0,g.Z)((e=>({header:{width:"auto",display:"flex",alignItems:"center"},label:{paddingLeft:"7px",fontSize:"14px"},icon:{margin:"4px","&.activeIcon":{backgroundColor:(0,f.U1)(e.palette.primary.main,.12),color:"#0072CE"}},buttonsWrapper:{marginLeft:"auto",display:"flex"}}))),T=e=>{let{children:t,onToggle:n,filters:a,isApplied:l=!1}=e;const i=y(),h=(e=>{const t=(0,p.curry)(((e,t,n)=>n.length<=1?n[0]:`${n[0]} + ${n.length-1} ${2===n.length?e:t}`)),n=(0,p.pipe)((0,p.map)(d.Xr),t(o().text("activity"),o().text("activities")))(e.activities),a=t(o().text("user"),o().text("users"),e.users),r=(0,p.pipe)((0,p.defaultTo)([]),(0,p.pluck)("label"),(0,p.sortBy)(p.identity),t(o().text("type"),o().text("types")))(e.entityTypes),l=(0,p.pipe)((0,p.defaultTo)([]),(0,p.pluck)("label"),(0,p.sortBy)(p.identity),t(o().text("attribute"),o().text("attributes")))(e.attributes),i=(0,p.pipe)((0,p.defaultTo)([]),(0,p.pluck)("label"),t(o().text("source"),o().text("sources")))(e.sources);return(0,p.pipe)((0,p.reject)(p.isNil),(0,p.join)(" | "))([n,r,l,i,(e=>{const t=e=>`${(0,m.mB6)({dataTypeDefinition:{type:m.oS0.TYPE_ACTIVENESS_DATE}},e)}`;switch(e.type){case u.K.WITHIN:return o().text("Within ${amount} ${unit}",{amount:e.period[0],unit:e.period[1]});case u.K.AGO:return o().text("More than ${amount} ${unit} ago",{amount:e.period[0],unit:e.period[1]});case u.K.BETWEEN:return o().text("${startDate} to ${endDate}",{startDate:t(e.period[0]),endDate:t(e.period[1])});default:return null}})(e.dateRange),a])})(a);return r().createElement("div",{className:i.header},r().createElement(s.Typography,{variant:"body2",className:i.label},o().text("Filter:")),r().createElement(s.Tooltip,{title:h},r().createElement(s.Typography,{variant:"body2",className:i.label,color:"textSecondary",display:"block",noWrap:!0},h)),r().createElement("div",{className:i.buttonsWrapper},t,r().createElement(E.k,{icon:c.Z,size:"L",onClick:n,tooltipTitle:o().text("Filter"),className:v()(i.icon,{activeIcon:l})})))};var b=n(49885),I=n(31537);const x=[I.I.ENTITY_CREATED,I.I.ENTITY_CHANGED,I.I.ENTITIES_MERGED,I.I.ENTITIES_SPLITTED,I.I.ENTITY_LOST_MERGE,I.I.RELATIONSHIP_CREATED,I.I.RELATIONSHIP_REMOVED,I.I.RELATIONSHIP_CHANGED,I.I.POTENTIAL_MATCHES_FOUND,I.I.POTENTIAL_MATCHES_REMOVED,I.I.NOT_MATCHES_SET,I.I.NOT_MATCHES_RESET,I.I.ENTITIES_MERGED_MANUALLY,I.I.ENTITIES_MERGED_ON_THE_FLY],O=[I.I.GROUP_CREATED,I.I.GROUP_REMOVED,I.I.GROUP_CHANGED],N=(e,t)=>t?x:(0,p.pipe)(Object.keys,(0,p.filter)((t=>(0,p.has)("groupTypes",e)&&!(0,p.isEmpty)(e.groupTypes)||!(0,p.includes)(t,O))))(I.I);var w=n(92575),C=n(96808);function S(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const R={input:e=>function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){S(e,t,n[t])}))}return e}({},e,{fontSize:"14px"})},D=(0,g.Z)({container:{padding:"12px 7px 0px",borderBottom:"solid 1px rgba(0, 0, 0, 0.12)"},labels:{fontSize:"14px"},filterSubtitle:{paddingBottom:"10px",paddingLeft:"5px"},agoLabel:{minWidth:"30px",textAlign:"end",margin:"auto"},dateOption:{display:"flex",marginRight:"30px"},dateOptionAgo:{display:"flex",marginBottom:"10px"},dateOptionWithin:{display:"flex",marginRight:"30px",marginBottom:"10px"},dateOptionLabel:{minWidth:"100px"},dropDownInput:{width:"100%",justifyContent:"center",backgroundColor:"rgba(0, 0, 0, 0.03)",borderTop:"4px"},filterControls:{display:"flex",paddingTop:"30px",marginBottom:8},clearButton:{marginRight:"auto"},selectorWrapper:{marginBottom:"12px"},option:{fontSize:"14px",height:"32px"},selectorsGroup:{display:"flex",flexDirection:"column"},selectorHint:{fontSize:12,lineHeight:"16px",color:"rgba(0,0,0,0.54)"},divider:{marginBottom:12}}),_=e=>{let{activityTypes:t,selectedActivityTypes:n,onChange:a}=e;const l=D(),i=e=>({value:e,label:(0,d.Xr)(e)}),c=e=>e.map(i),m=n.length>1&&n.includes(I.I.ENTITY_CHANGED),u=(0,p.pipe)((0,p.sortBy)((e=>(0,d.Xr)(e))),c)(t);return r().createElement("div",{className:l.selectorWrapper},r().createElement(s.Typography,{className:v()(l.filterSubtitle,l.labels),variant:"subtitle1"},o().text("Activity")),r().createElement(w.Z,{value:c(n),onChange:(0,p.pipe)((0,p.defaultTo)([]),(0,p.pluck)("value"),a),options:u,TextFieldProps:{InputProps:{disableUnderline:!0},classes:{root:l.dropDownInput}},components:{DropdownIndicator:C.Z},styles:R,classes:l,menuPlacement:"bottom"}),m&&r().createElement("span",{className:l.selectorHint},o().text("One at a time! Select a single Activity and any of its filters -OR- multiple Activities with no filters.")))};var P=n(85451),A=n(39621),M=n(31276),L=n(51843),H=n(20562);function j(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const U=[null,null],k=[null,"minutes"],Z=e=>{let{value:t,onChange:n}=e;const l=D(),i=e=>(null==t?void 0:t.type)===e?t.period:e===u.K.WITHIN||e===u.K.AGO?k:e===u.K.BETWEEN?U:void 0,[c,m]=(0,a.useState)(i(u.K.BETWEEN)),[d,E]=(0,a.useState)(i(u.K.WITHIN)),[h,g]=(0,a.useState)(i(u.K.AGO)),f=e=>e===u.K.WITHIN?d:e===u.K.AGO?h:e===u.K.BETWEEN?c:void 0,y=e=>{(null==t?void 0:t.type)!==e&&n({period:f(e),type:e})},T=e=>{n(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){j(e,t,n[t])}))}return e}({},t,{period:e}))};return(0,H.D)((()=>{t?t.type===u.K.WITHIN?E(t.period):t.type===u.K.AGO?g(t.period):t.type===u.K.BETWEEN&&m(t.period):(m(U),E(k),g(k))}),[t]),r().createElement("div",{className:l.selectorWrapper},r().createElement(s.Typography,{className:v()(l.filterSubtitle,l.labels),variant:"subtitle1"},o().text("Date")),r().createElement(s.RadioGroup,{value:(null==t?void 0:t.type)||null,onChange:(0,p.pipe)(M.NA,y)},r().createElement("div",{className:l.dateOptionWithin},r().createElement(s.FormControlLabel,{value:u.K.WITHIN,control:r().createElement(s.Radio,null),label:o().text("Within the last"),classes:{label:v()(l.dateOptionLabel,l.labels)}}),r().createElement(A.Z,{interval:d,onChange:T,onFocus:()=>y(u.K.WITHIN)})),r().createElement("div",{className:l.dateOptionAgo},r().createElement(s.FormControlLabel,{value:u.K.AGO,control:r().createElement(s.Radio,null),label:o().text("More than"),classes:{label:v()(l.dateOptionLabel,l.labels)}}),r().createElement(A.Z,{interval:h,onChange:T,onFocus:()=>y(u.K.AGO)}),r().createElement(s.Typography,{className:v()(l.agoLabel,l.labels),variant:"subtitle1"},o().text("Ago"))),r().createElement("div",{className:l.dateOption},r().createElement(s.FormControlLabel,{value:u.K.BETWEEN,control:r().createElement(s.Radio,null),label:o().text("Date range"),classes:{label:v()(l.dateOptionLabel,l.labels)}}),r().createElement(L.Z,{values:c,onChange:T,onFocus:()=>y(u.K.BETWEEN)}))))};var z=n(27815);const G=e=>{let{entityTypes:t,selectedEntityTypes:n,onChange:a}=e;const l=D(),i=e=>({value:e.uri,label:e.label,entityType:e}),c=e=>e.map(i),m=(0,p.pipe)((0,p.sortBy)((e=>e.label)),c)(t);return r().createElement("div",{className:l.selectorWrapper},r().createElement(s.Typography,{className:v()(l.filterSubtitle,l.labels),variant:"subtitle1"},o().text("Type")),r().createElement(w.Z,{value:c(n),onChange:(0,p.pipe)((0,p.defaultTo)([]),(0,p.pluck)("entityType"),a),options:m,TextFieldProps:{InputProps:{disableUnderline:!0},classes:{root:l.dropDownInput}},components:{DropdownIndicator:C.Z},styles:R,classes:l,menuPlacement:"bottom"}))},V=e=>{let{selectedSources:t,onChange:n}=e;const a=D(),i=(0,l.useSelector)(b.ZP.selectors.getMetadata),c=(0,p.sortBy)((e=>e.label))(i.sources);return r().createElement("div",{className:a.selectorWrapper},r().createElement(s.Typography,{className:v()(a.filterSubtitle,a.labels),variant:"subtitle1"},o().text("Source")),r().createElement(w.Z,{value:t,onChange:(0,p.pipe)((0,p.defaultTo)([]),n),options:c,TextFieldProps:{InputProps:{disableUnderline:!0},classes:{root:a.dropDownInput}},components:{DropdownIndicator:C.Z},styles:R,classes:a,getOptionValue:(0,p.prop)("abbreviation"),menuPlacement:"bottom"}))},W=e=>{let{filter:t,entityType:n,onPropChange:a}=e;const i=D(),o=(0,l.useSelector)(b.ZP.selectors.getMetadata),{attributes:s=[],sources:c=[],entityTypes:u=[]}=t||{},d=(0,m.Ug0)(o,(0,p.map)((0,p.prop)("uri"),u)),E=n||(0,m.nt9)(o,d);return r().createElement("div",{className:i.selectorsGroup},!n&&r().createElement(G,{entityTypes:o.entityTypes,selectedEntityTypes:u,onChange:a("entityTypes")}),r().createElement(z.Z,{selectedAttributes:s,entityType:E,onChange:a("attributes"),className:i.selectorWrapper,disableUnderline:!0}),r().createElement(V,{selectedSources:c,onChange:a("sources")}))},B=e=>{let{value:t,open:n,entityType:i,onApply:c,onCancel:m,onClear:u}=e;const d=D(),E=(0,l.useSelector)(b.ZP.selectors.getMetadata),[h,v]=(0,a.useState)(t),g=(0,p.curry)(((e,t)=>{v((0,p.pipe)((0,p.when)((0,p.always)("entityTypes"===e),(0,p.assoc)("attributes",[])),(0,p.when)((0,p.always)("activities"===e),(0,p.mergeLeft)({attributes:[],entityTypes:[],sources:[]})),(0,p.assoc)(e,t)))}));(0,H.D)((()=>{v(t)}),[t]);const{activities:f=[],dateRange:y=null,users:T=[]}=h||{},x=1===f.length&&f.includes(I.I.ENTITY_CHANGED);return n?r().createElement("div",{className:d.container},r().createElement(_,{activityTypes:N(E,i),selectedActivityTypes:f,onChange:g("activities")}),x&&r().createElement(W,{filter:h,entityType:i,onPropChange:g}),r().createElement(s.Divider,{light:!0,className:d.divider}),r().createElement(Z,{value:y,onChange:g("dateRange")}),r().createElement(s.Divider,{light:!0,className:d.divider}),r().createElement(P.Z,{selectedUsers:T,onChange:g("users"),disableUnderline:!0}),r().createElement("div",{className:d.filterControls},r().createElement(s.Button,{onClick:(0,p.pipe)((()=>v(null)),u),className:d.clearButton},o().text("Clear all")),r().createElement(s.Button,{onClick:m},o().text("Cancel")),r().createElement(s.Button,{color:"primary",onClick:()=>c(h)},o().text("Apply")))):null};var F=n(28113),K=n(585),$=n(55847),Y=n(56764);const q=(0,g.Z)((e=>({snackbar:{maxWidth:500},icon:{margin:"4px"},exportButton:{color:e.palette.primary.main}}))),X=e=>{let{filters:t,exportTypes:n=[]}=e;const i=q(),c=(0,l.useDispatch)(),[p,u]=(0,a.useState)(!1),d=(0,l.useSelector)(b.ZP.selectors.getExportPath),h=(0,l.useSelector)(b.ZP.selectors.getTenant),v=(0,a.useCallback)((e=>{const n={filter:(0,Y.U)(t),fileFormat:e};(0,m.CrF)({exportPath:d,tenant:h,options:n}).then((()=>u(!0))).catch(g)}),[t,h,d]),g=e=>{console.error(e),K.Z.addError({title:o().text("Error"),message:(0,m.xU7)(e,o().text("Can't export activities"))})},f=(0,a.useCallback)((()=>{c(b.ui.actions.openConsoleApp("Export"))}),[c]),y=(0,a.useMemo)((()=>n.map((e=>({text:e.toUpperCase(),onClick:()=>v(e)})))),[n,v]);return r().createElement(r().Fragment,null,y.length?r().createElement($.Z,{buttonComponent:E.k,buttonProps:{icon:F.Z,tooltipTitle:o().text("Export"),size:"L",className:i.icon},menuItems:y,menuId:"export-menu"}):r().createElement(E.k,{icon:F.Z,size:"L",onClick:()=>v(),tooltipTitle:o().text("Export"),className:i.icon}),r().createElement(s.Portal,{container:document.body},r().createElement(s.Snackbar,{open:p,autoHideDuration:5e3,className:i.snackbar,onClose:()=>u(!1),message:o().text("Export operation is currently in progress. You will receive an email notification once completed. Go to Export Application to view the status."),action:r().createElement(s.Button,{className:i.exportButton,onClick:f},o().text("Export application"))})))};function J(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){Q(e,t,n[t])}))}return e}function Q(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const ee=e=>{let{value:t,entityType:n,entityUri:i,onChange:o,exportTypes:s}=e;const c=(0,a.useRef)(t),m=!(0,p.equals)(t,c.current),u=(0,l.useSelector)(b.ZP.selectors.getCanUserMakeActivitiesExport),[d,E]=(0,a.useState)(!1);return r().createElement(r().Fragment,null,r().createElement(T,{onToggle:()=>E((e=>!e)),filters:t,isApplied:m},u&&r().createElement(X,{filters:J({},t,{entityUri:i}),exportTypes:s})),r().createElement(B,{value:t,open:d,entityType:n,onApply:o,onCancel:()=>E(!1),onClear:()=>o(J({},c.current))}))}},99601:(e,t,n)=>{let a;n.d(t,{w:()=>a}),function(e){e.ATTRIBUTE_CHANGED="edited",e.ATTRIBUTE_ADDED="added",e.ATTRIBUTE_REMOVED="deleted"}(a||(a={}))},56764:(e,t,n)=>{n.d(t,{U:()=>f});var a=n(17440),r=n(95038),l=n.n(r),i=n(67885),o=n(57014);const s=e=>t=>t.map(e).join(" or "),c=e=>`equals(user, '${(0,o.HRH)(e)}')`,p=e=>e.startsWith("USER_")||e.startsWith("COMMENT_")||e.startsWith("SFDC_")?`startsWith(label, '${e}')`:`equals(items.data.type, ${e})`,m=e=>`equals(items.delta.sources, '${e.abbreviation}')`,u=e=>`equals(items.objectType, '${e.uri}')`,d=e=>`equals(items.delta.attributeType, '${e.value}')`,E=e=>{const[t,n]=e;return l()().subtract(t,n).valueOf()},h=e=>{const{period:t,type:n}=e;if(!(e=>{if(e.type===i.K.AGO||e.type===i.K.WITHIN){const[t,n]=e.period;return"Number"===(0,a.type)(t)&&"String"===(0,a.type)(n)&&t>0}if(e.type===i.K.BETWEEN){const[t,n]=e.period;return t instanceof Date&&n instanceof Date}})(e))return"";switch(n){case i.K.WITHIN:return`gte(timestamp, ${E(t)})`;case i.K.AGO:return`lte(timestamp, ${E(t)})`;case i.K.BETWEEN:{const[e,n]=t;return`range(timestamp, ${e.valueOf()}, ${l()(n).endOf("date").valueOf()})`}default:return""}},v=e=>[`equals(items.objectUri, '${e}')`,`equals(items.startObjectUri, '${e}')`,`equals(items.endObjectUri, '${e}')`].join(" or "),g=(0,a.cond)([[(0,a.equals)("users"),()=>s(c)],[(0,a.equals)("activities"),()=>s(p)],[(0,a.equals)("sources"),()=>s(m)],[(0,a.equals)("attributes"),()=>s(d)],[(0,a.equals)("entityTypes"),()=>s(u)],[(0,a.equals)("dateRange"),()=>h],[(0,a.equals)("entityUri"),()=>v],[(0,a.equals)("rawFilter"),()=>a.identity]]),f=(0,a.pipe)((0,a.defaultTo)({}),(0,a.reject)(o.O27),a.toPairs,(0,a.append)(["rawFilter","not equals(user, 'collaboration-service')"]),(0,a.map)((e=>{let[t,n]=e;return g(t)(n)})),(0,a.reject)(o.O27),(0,a.map)((e=>`(${e})`)),(0,a.join)(" and "))},41188:(e,t,n)=>{n.d(t,{v:()=>s});var a=n(24328),r=n(52730),l=n(49885),i=n(57014),o=n(17440);const s=e=>{const t=(0,r.useSelector)(l.ZP.selectors.getMetadata),n=(0,r.useSelector)(l.ZP.selectors.getDataTenants),s=(0,r.useSelector)(l.ZP.selectors.getAttributePresentations),c=(0,r.useSelector)(l.ZP.selectors.getLookups),{map:p}=e,m=(0,i.CL1)(e),u=(0,i.hM2)(t,n,!0,e),d=(0,i.mxe)(u,c),E=(0,r.useDispatch)();return(0,a.useEffect)((()=>{d.length>0&&(0,o.pipe)((0,o.chain)((e=>{let{type:t,codeValues:n}=e;return n.map((e=>({type:t,codeValue:e})))})),i.hK$,(0,o.andThen)((0,o.pipe)(l.N5.lookups.actions.lookupsListResolved,E)))(d)}),[e]),(0,i.ZxB)(t,s,c,u,m,p)}}}]);
|
|
2
|
+
//# sourceMappingURL=6119.js.map
|