@reltio/remotes 1.4.1086 → 1.4.1089
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/1396.js +1 -0
- package/{1466.js → 1635.js} +1 -1
- package/183.js +1 -0
- package/1867.js +1 -1
- package/1920.js +1 -0
- package/2605.js +1 -0
- package/2890.js +1 -0
- package/3100.js +2 -0
- package/{2521.js.LICENSE.txt → 3100.js.LICENSE.txt} +0 -0
- package/3405.js +1 -0
- package/350.js +1 -0
- package/3980.js +1 -0
- package/4132.js +1 -0
- package/4190.js +1 -0
- package/4277.js +1 -0
- package/4279.js +1 -0
- package/4361.js +1 -0
- package/4689.js +1 -0
- package/{727.css → 4765.css} +0 -0
- package/4765.js +1 -0
- package/4803.js +1 -1
- package/{1707.js → 4843.js} +1 -1
- package/4944.js +1 -0
- package/5400.js +1 -0
- package/5686.js +1 -0
- package/5701.js +1 -0
- package/5709.js +1 -0
- package/5714.js +1 -0
- package/5884.js +1 -0
- package/5888.js +1 -0
- package/597.js +1 -0
- package/6248.js +1 -0
- package/6250.js +1 -0
- package/6425.js +1 -0
- package/{590.css → 6596.css} +0 -0
- package/6596.js +1 -0
- package/663.js +1 -0
- package/6685.js +1 -0
- package/6897.js +2 -0
- package/{4589.js.LICENSE.txt → 6897.js.LICENSE.txt} +0 -0
- package/6947.js +2 -0
- package/{7478.js.LICENSE.txt → 6947.js.LICENSE.txt} +0 -0
- package/7215.js +1 -0
- package/{3247.css → 7560.css} +0 -0
- package/7560.js +1 -0
- package/7638.js +1 -0
- package/{5411.css → 77.css} +0 -0
- package/77.js +1 -0
- package/7737.js +1 -1
- package/781.js +2 -0
- package/{888.js.LICENSE.txt → 781.js.LICENSE.txt} +0 -0
- package/8047.js +1 -0
- package/8122.js +1 -0
- package/8419.js +1 -0
- package/8421.js +1 -0
- package/845.js +1 -0
- package/8716.js +2 -0
- package/{6952.js.LICENSE.txt → 8716.js.LICENSE.txt} +0 -0
- package/{2400.js → 8753.js} +1 -1
- package/8789.js +1 -0
- package/8794.js +1 -1
- package/8969.js +1 -0
- package/9290.js +1 -0
- package/9446.js +1 -0
- package/9497.js +1 -0
- package/9551.js +1 -0
- package/9678.js +1 -0
- package/9774.js +1 -0
- package/main.js +1 -1
- package/package.json +1 -1
- package/remoteEntry.js +1 -1
- package/1050.js +0 -1
- package/1071.js +0 -1
- package/1157.js +0 -1
- package/174.js +0 -1
- package/1962.js +0 -1
- package/229.js +0 -1
- package/2521.js +0 -2
- package/2547.js +0 -1
- package/2994.js +0 -1
- package/3027.js +0 -1
- package/3247.js +0 -1
- package/3319.js +0 -1
- package/3431.js +0 -1
- package/3628.js +0 -1
- package/3716.js +0 -1
- package/3845.js +0 -1
- package/4397.js +0 -1
- package/4478.js +0 -1
- package/4589.js +0 -2
- package/4614.js +0 -1
- package/5092.js +0 -1
- package/5108.js +0 -1
- package/5242.js +0 -1
- package/5406.js +0 -1
- package/5411.js +0 -1
- package/545.js +0 -1
- package/546.js +0 -1
- package/5674.js +0 -1
- package/590.js +0 -1
- package/6115.js +0 -1
- package/614.js +0 -1
- package/6156.js +0 -1
- package/64.js +0 -1
- package/6517.js +0 -1
- package/6538.js +0 -1
- package/6817.js +0 -1
- package/6952.js +0 -2
- package/696.js +0 -1
- package/727.js +0 -1
- package/7422.js +0 -1
- package/7478.js +0 -2
- package/7830.js +0 -1
- package/7890.js +0 -1
- package/8040.js +0 -1
- package/8405.js +0 -1
- package/86.js +0 -1
- package/8732.js +0 -1
- package/8741.js +0 -1
- package/8862.js +0 -1
- package/888.js +0 -2
- package/8899.js +0 -1
- package/9109.js +0 -1
- package/9147.js +0 -1
package/1157.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[1157],{50548:(e,t,n)=>{n.d(t,{l:()=>a});var r=n(24328),o=n.n(r);function l(){return l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l.apply(this,arguments)}const a=(e,t,n)=>{if(e&&t){const a=(0,r.memo)(n);return n=>o().createElement(e.Consumer,null,(e=>o().createElement(a,l({},n,t(e,n)))))}return n}},30488:(e,t,n)=>{n.d(t,{Z:()=>l});var r=n(38748),o=n(50548);const l=e=>t=>(0,o.l)(r.X,e,t)},20146:(e,t,n)=>{n.d(t,{Z:()=>p});var r=n(24328),o=n.n(r),l=n(52730),a=n(71153),i=n.n(a),s=n(90436),c=n(8813),u=n(35674);const d=(0,n(79692).Z)({"entityType-small":{padding:"1px 4px",fontSize:"10px",lineHeight:"normal",display:"inline-flex",marginRight:"12px",borderRadius:"2px"},"entityType-medium":{padding:"2px 8px 3px",borderRadius:"2px",fontSize:"13px",fontWeight:500,lineHeight:"15px",display:"inline-flex",marginRight:"16px"}}),p=e=>{let{entity:t,className:n,size:r="small"}=e;const a=d(),p=(0,l.useSelector)(u.ZP.selectors.getMetadata),m=t.type,f=(0,c.nt9)(p,m)||{},g=(0,c.VD3)(p,f,"typeColor")||c.rSc.palette.primary.main;return o().createElement(s.Z,{style:{backgroundColor:g,color:c.P6Y.Colors.getColor(g)?"#FFFFFF":"#212121"},className:i()(a[`entityType-${r}`],n),component:"div"},(0,c.jFi)(p,t))}},33109:(e,t,n)=>{n.d(t,{Z:()=>E});var r=n(24328),o=n.n(r),l=n(13980),a=n.n(l),i=n(71153),s=n.n(i),c=n(52730),u=n(17440),d=n(90436),p=n(80030),m=n(87918),f=n.n(m),g=n(8813),h=n(35674),b=n(37573),y=n(20146);const v=(0,n(79692).Z)((e=>({profileBandWrapper:{flexShrink:0},profileBand:{display:"flex",padding:"16px 12px 16px 16px",alignItems:"flex-start",backgroundColor:"#fff",boxShadow:"inset 0 -1px 0 0 rgba(0,114,206,0.06), inset 0 1px 0 0 rgba(0,114,206,0.06);","&:after":{content:'""',minHeight:"inherit",fontSize:0}},inactive:{background:e.inactiveBackground},profileIcon:{marginRight:"12px"},imageProfileIcon:{width:"48px",height:"48px"},profileInfo:{display:"flex",flexDirection:"column",flex:"1 1 50%"},badge:{},label:{lineHeight:"1.2",letterSpacing:"0.25px",color:e.palette.text.primary,wordBreak:"break-word","&+ $specialInfo":{marginTop:"4px"}},secondaryLabel:{display:"inline-flex",color:e.palette.text.primary,marginTop:"2px",lineHeight:"16px",fontSize:"14px",fontWeight:400,"&+ $businessCard":{marginLeft:"12px"}},businessCard:{color:e.palette.text.secondary,display:"inline-flex",fontSize:"14px",marginTop:"4px",lineHeight:"1.2"},specialInfo:{display:"flex",justifyContent:"space-between",flexWrap:"wrap",width:"100%",marginTop:"8px"},entityType:{display:"flex",flexWrap:"wrap"},entityId:{fontSize:"13px",color:e.palette.text.secondary,whiteSpace:"nowrap",cursor:"pointer","&:hover":{textDecoration:"underline"}}}))),x=e=>{let{className:t,entity:n,children:l,classes:a}=e;const i=v({classes:a}),m=(0,c.useSelector)(h.ZP.selectors.getMetadata),x=(0,r.useCallback)((()=>{navigator.clipboard.writeText((0,g.BTI)(n))}),[n]);if((0,u.isNil)(n))return null;const E=(0,g.idV)(n.label),k=n.secondaryLabel,w=(0,g.ptG)(m,n),C=(0,g.Fn9)(n),S=n.uri,O=(0,g.BTI)(n);return o().createElement("div",{className:s()(i.profileBandWrapper,t)},o().createElement("div",{className:s()(i.profileBand,{[i.inactive]:!C}),"data-entity-uri":S},o().createElement(b.Z,{key:n.uri,entity:n,avatarClassName:i.profileIcon,imageClassName:i.imageProfileIcon}),o().createElement("div",{className:i.profileInfo},o().createElement("div",null,o().createElement(d.Z,{variant:"h6",className:i.label},E),k&&o().createElement(d.Z,{variant:"subtitle2",className:i.secondaryLabel},k),w&&o().createElement(d.Z,{variant:"subtitle1",className:i.businessCard},w)),o().createElement("div",{className:i.specialInfo},o().createElement("div",{className:i.entityType},o().createElement(y.Z,{entity:n,size:"medium",className:i.badge}),!(0,g.ZiX)(S)&&o().createElement(p.ZP,{title:f().text("Copy to clipboard")},o().createElement(d.Z,{display:"inline",variant:"body2",className:i.entityId,onClick:x},f().text("Entity ID"),": ",O))))),l&&o().createElement("div",null,l)))};x.propTypes={className:a().string,entity:a().object,children:a().node,classes:a().object};const E=x},81487:(e,t,n)=>{n.r(t),n.d(t,{default:()=>ut});var r=n(24328),o=n.n(r),l=n(52730),a=n(8598),i=n(36138),s=n(44443),c=n(22664),u=n(12212),d=n(97333),p=n(87918),m=n.n(p),f=n(35674),g=n(8813),h=n(69409),b=n(35722),y=n(55962),v=n(11326),x=n(82658),E=n(85457),k=n(70675),w=n(32158),C=n(95085),S=n(23759),O=n(10938),T=n(64435),Z=n(33109),M=n(75647),N=n(76368),R=n(38361),z=n(77194),L=n(28101),P=n(90436),U=n(80147),H=n(87685),F=n(40435),B=n(79692);const D=(0,B.Z)({header:{display:"flex",flexDirection:"row",alignItems:"center",padding:"16px 12px",borderBottom:"1px solid rgba(0, 0, 0, 0.12);"},closeButton:{marginRight:"12px"}}),j=e=>{let{title:t,className:n,onClose:r,children:l}=e;const a=D();return o().createElement("div",{className:n},o().createElement("div",{className:a.header},o().createElement(F.Z,{className:a.closeButton,icon:H.default,onClick:r}),t),l)};var I=n(99144),$=n(17440),A=n(79573),W=n(4270);let V;!function(e){e.Crosswalk="crosswalks",e.Source="source",e.Contributor="contributor"}(V||(V={}));const X=e=>(0,$.pipe)((0,$.map)((0,$.prop)("value")),$.sum)(e);function G(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Y(e,t,n[t])}))}return e}function Y(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const _=e=>{let{data:t,width:n,height:o}=e;return(0,r.useMemo)((()=>{if(!n||!o)return{nodes:[],links:[]};const e=function(){let e=24,t=15,n=10,r=8,o=[1,1];function l(l){let{nodes:i,links:s}=l;const c={nodes:i,links:s};return function(e){let{nodes:t,links:n}=e;t.forEach((e=>{e.sourceLinks=[],e.targetLinks=[]})),n.forEach((e=>{e.source.sourceLinks.push(e),e.target.targetLinks.push(e)}))}(c),function(e){let{nodes:t}=e;t.forEach((e=>{e.value=Math.max(X(e.sourceLinks),X(e.targetLinks))}))}(c),function(t){let{nodes:n}=t;if(!n.length)return;let r,l=[n[0]],a=0;for(;l.length;)r=[],l.forEach((t=>{t.x=a,t.dx=e,t.targetLinks.forEach((e=>{r.indexOf(e.source)<0&&r.push(e.source)}))})),l=r,++a;if(n.forEach((e=>{e.x=a-1-e.x})),a>2){const t=(o[0]-2*e-22)/(a-2);n.forEach((n=>{n.sourceLinks&&0!=n.sourceLinks.length?n.x*=t:n.x=o[0]-e}))}else n[0].x=o[0]-e,n[1].x=n[0].x-22-e}(c),function(e){let{nodes:l,links:a}=e;const i=(0,$.pipe)((0,$.groupBy)((0,$.prop)("x")),$.toPairs,(0,$.sort)(((e,t)=>e[0]-t[0])),(0,$.map)((0,$.nth)(1)))(l);(function(){let e=(0,$.pipe)((0,$.map)((e=>(o[1]-(e.length-1)*r)/X(e))),(0,$.reduce)(Math.min,1/0))(i);const s=(0,$.pipe)((0,$.map)((e=>{var t;return e.value/((null===(t=e.targetLinks)||void 0===t?void 0:t.length)||1)})),(0,$.reduce)(Math.min,1/0))(l);e=Math.max(Math.min(e,t/s),n/s),i.forEach((t=>{t.forEach(((t,n)=>{t.y=n,t.dy=t.value*e}))})),a.forEach((t=>{t.dy=t.value*e}))})(),i.forEach((e=>{let t,n,l,a=0;const i=e.length;for(e.sort(((e,t)=>e.y-t.y)),l=0;l<i;++l)t=e[l],n=a-t.y,n>0&&(t.y+=n),a=t.y+t.dy+r;if(n=a-r-o[1],n>0)for(a=t.y-=n,l=i-2;l>=0;--l)t=e[l],n=t.y+t.dy+r-a,n>0&&(t.y-=n),a=t.y}));const s=(0,$.pipe)((0,$.map)((e=>(e.length-1)*r+(0,$.sum)((0,$.map)((e=>e.dy),e)))),(0,$.reduce)(Math.max,0))(i),c=(o[1]-s)/2;i.forEach((e=>{const{y:t,dy:n}=(0,$.last)(e),r=o[1]-(t+n);e.forEach((e=>{e.y+=r,c>0&&(e.y-=c)}))}))}(c),a(c),function(e){let{nodes:t}=e;(0,$.pipe)((0,$.groupBy)((0,$.prop)("x")),$.toPairs,(0,$.sort)(((e,t)=>t[0]-e[0])),(0,$.map)((0,$.nth)(1)))(t).forEach((e=>{(e=e.concat().sort(((e,t)=>e.y-t.y))).forEach(((t,n)=>{var o;if(null!==(o=t.sourceLinks)&&void 0!==o&&o.length){var l,a,i;const{target:o,ty:s,dy:c}=(0,$.last)(t.sourceLinks);let u=o.y+s+c-t.dy;(null===(l=e[n-1])||void 0===l?void 0:l.x)==t.x&&u<(null===(a=e[n-1])||void 0===a?void 0:a.y)+(null===(i=e[n-1])||void 0===i?void 0:i.dy)+r&&(u=e[n-1].y+e[n-1].dy+r),t.y>u&&(t.y=u)}}))}))}(c),c}function a(e){let{nodes:t}=e;(0,$.pipe)((0,$.groupBy)((0,$.prop)("x")),$.toPairs,(0,$.sort)(((e,t)=>e[0]-t[0])),(0,$.map)((0,$.nth)(1)))(t).forEach((e=>{e.forEach((e=>{var t,n;if(null!==(t=e.targetLinks)&&void 0!==t&&t.length){const t=[],n=e.targetLinks.map((e=>e.crosswalk.uuid)),r=[];e.targetLinks.forEach((function(e){-1==this.indexOf(e.source)&&this.push(e.source)}),r);for(let o=0;o<r.length;o++)for(let l=0;l<r[o].sourceLinks.length;l++){const a=n.indexOf(r[o].sourceLinks[l].crosswalk.uuid);-1!=a&&t.push(e.targetLinks[a])}e.targetLinks=t}if(null!==(n=e.sourceLinks)&&void 0!==n&&n.length){var r;const t=[];if(null!==(r=e.targetLinks)&&void 0!==r&&r.length){const n=e.sourceLinks.map((e=>e.crosswalk.uuid));for(let r=0;r<e.targetLinks.length;r++){const o=n.indexOf(e.targetLinks[r].crosswalk.uuid);-1!=o&&t.push(e.sourceLinks[o])}}const n=t.map((e=>e.crosswalk.uuid)),o=e.sourceLinks.filter((function(e){return-1==this.indexOf(e.crosswalk.uuid)}),n);if(e.sourceLinks=o.concat(t),t.length>0){let t=0;for(let e=0;e<o.length;e++)t+=o[e].dy;e.sizeForNewSources=t}}}))})),t.forEach((e=>{let t=0,n=e.sizeForNewSources||0;delete e.sizeForNewSources,e.sourceLinks.forEach((e=>{e.sy=t,t+=e.dy})),e.targetLinks.forEach((e=>{e.ty=n,n+=e.dy}))}))}return l.nodeWidth=()=>e,l.setNodeWidth=t=>(e=+t,l),l.nodePadding=()=>r,l.setNodePadding=e=>(r=+e,l),l.smallestNodeMaxHeight=()=>t,l.setSmallestNodeMaxHeight=e=>(t=+e,l),l.smallestNodeMinHeight=()=>n,l.setSmallestNodeMinHeight=e=>(n=+e,l),l.size=()=>o,l.setSize=e=>(o=e,l),l.update=e=>(a(e),e),l.link=()=>{let t=.5;function n(n){const r=!n.target.sourceLinks||0==n.target.sourceLinks.length,o=n.source.x+n.source.dx,l=n.target.x,a=(d=+(d=o),p=+(p=l),e=>d*(1-e)+p*e),i=a(t),s=a(1-t),c=n.source.y+n.sy-.13,u=n.target.y+n.ty-.13;var d,p;const m=r?"":`L${l+e},${u} L${l+e},${u+n.dy+.26}`;return c===u?`M${o},${c} \n L${l},${u}${m} \n L${l},${u+n.dy+.26} \n L${o},${c+n.dy+.26} Z`:`M${o},${c}\n C${i},${c} ${s},${u} ${l},${u}${m} \n L${l},${u+n.dy+.26} \n C${s},${u+n.dy+.26} ${i},${c+n.dy+.26} \n ${o},${c+n.dy+.26} Z`}return n.curvature=function(e){return arguments.length?(t=+e,n):t},n},l}().setNodeWidth(14).setNodePadding(20).setSize([o-2,n-2]),r=e.nodeWidth(),l=e.link(),a=(e=>{const t=e.nodes.map((e=>G({},e))),n=n=>{const r=e.nodes.indexOf(n);return t[r]},r=e.links.map((e=>G({},e,{source:n(e.source),target:n(e.target)})));return{nodes:t,links:r}})(t),{nodes:i,links:s}=e(a);return{nodes:i,links:s,nodeWidth:r,path:l}}),[t,o,n])};var q=n(90143),K=n(12147),Q=n(98685);const J=(0,B.Z)({tooltipTitle:{fontWeight:500,fontSize:"16px",lineHeight:"24px",letterSpacing:"0.15px",marginBottom:"8px",userSelect:"none"},tooltipRow:{display:"flex",alignItems:"center",fontSize:"13px",lineHeight:"15px",fontWeight:"normal","&:not(:last-child)":{marginBottom:"4px"}},tooltipIcon:{fontSize:"18px",color:"rgba(0, 0, 0, 0.54)",marginRight:"8px"},node:{stroke:"#000000",strokeWidth:1,strokeOpacity:.38},rootNode:{transform:"rotate(90deg)",userSelect:"none"}}),ee=e=>{let{user:t,time:n,children:r}=e;const l=J(),a=o().createElement("div",null,o().createElement("span",{className:l.tooltipTitle},m().text("Merge details")),o().createElement("div",{className:l.tooltipRow},o().createElement(K.Z,{className:l.tooltipIcon}),m().date(n,"L LTS")),o().createElement("div",{className:l.tooltipRow},o().createElement(Q.Z,{className:l.tooltipIcon}),t));return o().createElement(q.Z,{title:a,placement:"top"},r)},te=e=>{let{node:t,nodeWidth:n,highlightEnabled:l,isColored:a}=e;const i=J(),[s,c]=(0,r.useState)(0),u=(0,r.useRef)(null),{x:d,y:p,name:m,label:f,targetLinks:g,sourceLinks:h,entity:{crosswalks:b=[],merges:y}}=t,[v]=b,{isDimmed:x,highlightCrosswalk:E,removeHighlight:k}=(0,S.pu)(v),w=(0,S.nX)(v),C=null!=b&&b.length?h[b.length-1].sy+h[b.length-1].dy:0;return(0,r.useEffect)((()=>{var e;const n=t.dy,r=(null==u||null===(e=u.current)||void 0===e?void 0:e.clientWidth)||0;n<r&&c(n/2-r/2)}),[]),o().createElement("g",{transform:`translate(${d},${p})`},"ROOT"===m?o().createElement("text",{dy:-5,dx:s,ref:u,className:i.rootNode},f||""):o().createElement(o().Fragment,null,o().createElement("rect",{height:C,width:14,className:i.node,fill:a?w:"#F0F0F0",key:"node-main",opacity:l&&x?.19:1,onMouseEnter:()=>{l&&E()},onMouseLeave:()=>{l&&k()}}),!(null==g||!g.length)&&(()=>{const e=(0,$.pipe)((0,$.map)((0,$.prop)("source")),(0,$.groupBy)((0,$.prop)("time")))(g);return null==y?void 0:y.map(((t,r)=>{let{time:a,user:s}=t;const c=e[a];if(!c)return;const[u,d]=c.reduce(((e,t)=>{let{sourceLinks:n}=t;return[(0,$.min)((0,$.head)(n).ty,e[0]),(0,$.max)((0,$.last)(n).ty+(0,$.last)(n).dy,e[1])]}),[1/0,0]);return o().createElement(ee,{user:s,time:a,key:"node-"+r},o().createElement("rect",{transform:`translate(0,${u})`,height:d-u,width:n,className:i.node,fillOpacity:.54,fill:"#F0F0F0",opacity:l&&x?.38:1}))}))})()))},ne=e=>{let{link:t,path:n,highlightEnabled:r,isColored:l}=e;const{crosswalk:a}=t,i=(0,S.nX)(a),{isDimmed:s,highlightCrosswalk:c,removeHighlight:u}=(0,S.pu)(a);return o().createElement("path",{d:n,fill:l?i:"#F0F0F0",opacity:r&&s?.1:1,onMouseEnter:()=>{r&&c()},onMouseLeave:()=>{r&&u()}})},re=e=>{let{width:t,height:n,data:l,accentContributors:a}=e;const[i,s]=(0,r.useState)(!1),[c,u]=(0,r.useState)(0),[d,p]=(0,r.useState)(0),{links:m,nodes:f,nodeWidth:g,path:h}=_({data:l,width:t,height:n});(0,r.useEffect)((()=>{p(0),u(0)}),[t,n]);const b=(0,r.useMemo)((()=>f.map(((e,t)=>o().createElement(te,{highlightEnabled:a,isColored:a,node:e,nodeWidth:g,key:`SankeyNode-${t}`})))),[f,a,g,t,n]),y=(0,r.useMemo)((()=>m.map(((e,t)=>o().createElement(ne,{highlightEnabled:!a,isColored:!a,link:e,path:h(e),key:`SankeyLink-${t}`})))),[a,m,h]),v=e=>{const t=e.pageX,n=t-c;return u(t),n},x=()=>s(!1),E=i?"none":"auto",k=i?"move":"default";return o().createElement("svg",{width:t,height:n,cursor:k,onPointerDown:e=>{e.preventDefault(),s(!0),v(e)},onPointerMove:e=>{if(!i)return;const t=v(e);p(d+t)},onPointerUp:x,onPointerLeave:x},o().createElement("g",{transform:`translate(${d},${n}) rotate(-90)`,pointerEvents:E},o().createElement("g",null,y),o().createElement("g",null,b)))};function oe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const le=(0,$.curry)(((e,t)=>!e||e.some((0,g.aFF)(t)))),ae=(0,$.curry)(((e,t)=>(0,$.evolve)({crosswalks:(0,$.filter)(le(e)),merges:(0,$.map)((0,$.evolve)({losers:(0,$.map)(ae(e))}))},t))),ie=e=>{let t=1;const n=(0,$.pipe)((0,$.evolve)({crosswalks:(0,$.map)((e=>function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){oe(e,t,n[t])}))}return e}({},e,{uuid:t++})))}),(0,$.evolve)({merges:(0,$.map)((0,$.evolve)({losers:(0,$.map)((e=>n(e)))}))}));return n(e)},se=e=>{const t=[],n=[],r=(e,o,l)=>{const{crosswalks:a=[],merges:i=[],uri:s="",label:c}=e;t.push({entity:e,name:s,time:l,label:c});const u=t.length-1,d=(0,$.pipe)((0,$.chain)((e=>{let{losers:t,time:n}=e;return(0,$.pipe)((0,$.filter)((e=>{var t,n;return(null===(t=e.crosswalks)||void 0===t?void 0:t.length)||(null===(n=e.merges)||void 0===n?void 0:n.length)})),(0,$.chain)((e=>r(e,u,n))))(t)})),(0,$.concat)(a))(i);return-1!=o&&d.forEach((e=>n.push({source:t[u],target:t[o],value:10,crosswalk:e}))),d};r(e,-1,Date.now());const o=(0,$.pipe)((0,$.chain)((e=>{let{source:t,target:n}=e;return[t,n]})),$.uniq)(n);return{nodes:t.filter((e=>o.includes(e))),links:n}},ce=(0,B.Z)((()=>({graph:{padding:"8px 12px",boxSizing:"border-box",height:"100%",width:"100%",maxHeight:"500px"}}))),ue=(0,r.memo)((e=>{let{crosswalkTree:t,entityLabel:n,visibleCrosswalks:r,accentContributors:l}=e;const a=ce(),i=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2?arguments[2]:void 0;return(0,$.pipe)(ae(n),ie,se)({uri:"ROOT",label:t,crosswalks:[],merges:[{time:Date.now(),losers:[e]}]})}(t,n,r);return o().createElement("div",{className:a.graph},o().createElement(s.Z,{refreshMode:"debounce",refreshRate:100,handleWidth:!0,handleHeight:!0},(e=>{let{width:t=0,height:n=200}=e;return o().createElement(re,{width:t,height:n,data:i,accentContributors:l})})))}));var de=n(10765),pe=n(34802);function me(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){fe(e,t,n[t])}))}return e}function fe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ge=n(71285),he=n(89468),be=n(71153),ye=n.n(be),ve=n(72753),xe=n(65549);function Ee(){return Ee=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ee.apply(this,arguments)}const ke=e=>{let{styles:t={}}=e,n=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["styles"]);return o().createElement("svg",Ee({width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},n),o().createElement("defs",null,o().createElement("path",{d:"M17 13.138l4.5 4.5-4.5 4.5V18.5h-1.247l-3.488-3.479 1.413-1.414 2.901 2.893H17v-3.362zM17 1.5L21.5 6 17 10.5V7.138h-.421l-11.03 11H2v-2h2.723l11.03-11H17V1.5zm-11.45 4l3.294 3.286-1.414 1.413L4.723 7.5H2v-2h3.55z",id:"svg457070356a"})),o().createElement("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},o().createElement("mask",{id:"svg457070356b",fill:"#fff"},o().createElement("use",{xlinkHref:"#svg457070356a"})),o().createElement("path",{fillOpacity:".54",fill:"#000",mask:"url(#svg457070356b)",d:"M0 0h24v24H0z"})))};var we=n(22983),Ce=n(39475),Se=n(79935);const Oe=(0,B.Z)((e=>({root:{display:"flex",alignItems:"center",paddingRight:"8px","& button + button":{marginLeft:"4px"}},focusedIcon:e=>{let{isFocused:t}=e;return{width:28,height:28,color:t?"#000":"rgba(0, 0, 0, 0.54)",borderRadius:0}},title:{color:e.palette.text.secondary,paddingLeft:"6px",paddingRight:"2px"},uri:{lineHeight:"15px",color:e.palette.text.primary}}))),Te=e=>{let{contributorUri:t,focusable:n,disableAdd:r,disableUnmerge:l,onAdd:a,onUnmerge:i,onToggleFocus:s,onUnsubscribe:c,isFocused:u}=e;const d=Oe({isFocused:u});return o().createElement("div",{className:d.root},o().createElement(Ce.k,{size:"XXS",onClick:()=>s(),className:d.focusedIcon,icon:n&&ve.Z,disabled:!n,tooltipTitle:n&&m().text("Focus")}),o().createElement(P.Z,{variant:"body2",className:d.uri},o().createElement("span",{className:d.title},m().text("Entity ID:")),(0,g.nIW)(t)),o().createElement(Se.Z,null),a&&o().createElement(Ce.k,{size:"XS",icon:xe.Z,disabled:r,tooltipTitle:m().text("Add crosswalk"),showForDisabled:!0,onClick:()=>a()}),o().createElement(Ce.k,{size:"XS",icon:ke,disabled:l,tooltipTitle:m().text("Unmerge"),showForDisabled:!0,onClick:()=>i()}),c&&o().createElement(Ce.k,{size:"XS",icon:we.Z,disabled:l,tooltipTitle:m().text("Unsubscribe"),showForDisabled:!0,onClick:()=>c()}))},Ze=(0,B.Z)((()=>({root:e=>{let{contributorColor:t}=e;return{fontSize:"13px",position:"relative",display:"flex",flexDirection:"column",alignItems:"stretch",border:"1px solid rgba(0, 0, 0, 0.05)",paddingLeft:"8px","&:before":{content:'" "',borderLeft:`8px solid ${t}`,position:"absolute",top:-1,left:0,bottom:-1},"& > div + div":{marginTop:"1px"}}},editor:{padding:"0px 30px 0px 25px"}}))),Me=e=>{let{className:t,contributorUri:n,accentContributor:a,crosswalksBySources:i,expandedSources:s,disableAddCrosswalk:c,disableEditCrosswalk:u,disableDeleteCrosswalk:d,disableUnmergeContributor:p,onUnmerge:m,onEdit:h,onDelete:b,onAdd:y,onToggleSourceExpanded:v,onUnsubscribeContributor:x}=e;const E=a?(0,g.GtP)(n):"rgba(0, 0, 0, 0.38)",k=Ze({contributorColor:E}),w=(0,l.useSelector)(f.ZP.selectors.getDataTenants),C=(0,r.useRef)(null),[O]=(0,S.RT)();(0,r.useEffect)((()=>{var e;a&&O&&((0,$.pipe)((0,$.find)((e=>{let{source:t}=e;return t===O.type})),(0,$.propOr)({},"crosswalksByTypes"),$.values,$.flatten)(i).some((e=>(0,g.aFF)(O,e)&&e!==O))&&(null==C||null===(e=C.current)||void 0===e||e.scrollIntoView({behavior:"smooth"})))}),[O]);const[T,Z]=(0,r.useState)(!1),M=(0,$.pipe)((0,$.pluck)("crosswalksByTypes"),(0,$.find)((e=>e[pe.Y.Simple].length||e[pe.Y.Empty].length)),(0,$.props)([pe.Y.Simple,pe.Y.Empty]),$.flatten,$.head)(i),{toggleCrosswalkFocus:N,isFocused:R}=(0,S.BF)(M),z=(0,$.pipe)((0,$.pluck)("crosswalksByTypes"),(0,$.chain)($.values),$.flatten)(i),L=(0,g.KMQ)(z,w);return o().createElement("div",{ref:C,className:ye()(k.root,t)},o().createElement(Te,{contributorUri:n,focusable:a&&!!M,disableAdd:c,disableUnmerge:p,isFocused:a&&R,onToggleFocus:N,onAdd:M&&(()=>Z(!0)),onUnmerge:m,onUnsubscribe:L&&(()=>x({contributorUri:n,dataTenant:L,crosswalk:M}))}),i.map((e=>{let{source:t,crosswalksByTypes:n}=e;return o().createElement(ge.Z,{key:t,source:t,crosswalksByTypes:n,showCrosswalkColors:!a,crosswalksFocusEnabled:!a,expanded:null==s?void 0:s.includes(t),disableEditCrosswalk:u,disableDeleteCrosswalk:d,onEdit:h,onDelete:b,onToggleExpanded:()=>v(t)})})),T&&o().createElement(he.Z,{className:k.editor,onAdd:e=>y({contributorCrosswalk:M,crosswalk:e}),onClose:()=>Z(!1)}))},Ne=(0,B.Z)((()=>({table:{overflowY:"auto",overflowX:"hidden",paddingLeft:"16px",paddingRight:"6px"},tableRow:{"& + &":{marginTop:"10px"},margin:"auto",maxWidth:"448px"}})));function Re(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){ze(e,t,n[t])}))}return e}function ze(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Le=(0,r.memo)((e=>{let{accentContributors:t,entity:n,contributors:a,selectedAttributeTypes:i,onChangeVisibleCrosswalks:s,readOnly:c,onAddCrosswalk:u=A.ZT,onEditCrosswalk:d=A.ZT,onDeleteCrosswalk:p=A.ZT,onUnmergeContributor:m=A.ZT,onUnsubscribeContributor:h=A.ZT}=e;const b=(0,l.useSelector)(f.ZP.selectors.getMetadata),y=(0,g.nt9)(b,n.type),v=Ne(),x=(0,r.useMemo)((()=>function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];const r=e.crosswalks,o=(0,g.HQx)(e);return t.filter((e=>!(0,g.O27)(e.crosswalks))).map((t=>{let{uri:l,crosswalks:a}=t;return{contributorUri:l,crosswalksBySources:(0,$.pipe)((0,$.map)((e=>{if("relation"===e.ownerType){const t=o.find((0,g.aFF)(e));return t&&me({ownerType:"relation"},t)}{const t=r.find((0,g.aFF)(e));return t&&me({ownerType:"entity"},t)}})),(0,$.filter)((e=>!!e)),(0,de.o)(e.type,n))(a)}})).filter((e=>{let{crosswalksBySources:t}=e;return t.length>0}))}(n,a,i)),[n,a,i]),[E,k]=(0,r.useState)({}),w=(0,r.useMemo)((()=>((e,t)=>e.reduce(((e,n)=>{let{contributorUri:r,crosswalksBySources:o}=n;const l=(0,$.chain)((e=>{var n;let{source:o,crosswalksByTypes:l}=e;const a=null===(n=t[r])||void 0===n?void 0:n.includes(o);return l[pe.Y.Simple].concat(l[pe.Y.Empty]).concat(a?l[pe.Y.Dependent]:[])}),o);return e.concat(l)}),[]))(x,E)),[x,E]);(0,r.useEffect)((()=>{s(w)}),[w]);const C=(0,r.useCallback)((e=>{p({entityUri:null==n?void 0:n.uri,crosswalkId:e})}),[null==n?void 0:n.uri,p]),S=(0,r.useCallback)((e=>{d(Re({},e,{entityUri:null==n?void 0:n.uri}))}),[null==n?void 0:n.uri,d]);return o().createElement("div",{className:v.table},x.map((e=>{let{contributorUri:r,crosswalksBySources:l}=e;return o().createElement(Me,{key:r,className:v.tableRow,contributorUri:r,accentContributor:t,crosswalksBySources:l,disableAddCrosswalk:c||!(0,g.mkC)(y),disableEditCrosswalk:c||!(0,g.Zm0)(y),disableDeleteCrosswalk:c||!(0,g.a14)(y),disableUnmergeContributor:c||!(0,g.uGe)(g.BDP.UNMERGE,y),onAdd:e=>u(Re({},e,{entity:n})),onDelete:C,onEdit:S,onUnmerge:()=>m(r),onUnsubscribeContributor:h,expandedSources:E[r],onToggleSourceExpanded:e=>{k((0,$.pipe)((0,$.unless)((0,$.has)(r),(0,$.assoc)(r,[])),(0,$.evolve)({[r]:(0,$.ifElse)((0,$.includes)(e),(0,$.without)([e]),(0,$.append)(e))})))}})})))}));var Pe=n(77277),Ue=n(8629),He=n(49429),Fe=n(38724),Be=n(79249),De=n(81556);const je=(0,B.Z)((e=>({container:{display:"flex",flexDirection:"column","& + &":{marginLeft:"16px"}},title:{fontSize:"13px",lineHeight:"15px",color:"#666666",marginBottom:"7px"},hintIcon:{width:"16px",height:"16px",verticalAlign:"middle"},graph:{width:"400px",height:"300px",borderRadius:"8px",background:"rgba(0, 0, 0, 0.03)",border:"1px solid rgba(0, 0, 0, 0.03)",position:"relative"},checkedIcon:{position:"absolute",height:"20px",width:"20px",right:"10px",top:"10px",color:e.palette.primary.main},selectedTree:{border:`1px solid ${e.palette.primary.main}`,background:"rgba(0, 114, 206, 0.05)"}}))),Ie=e=>{let{coloredCrosswalks:t,crosswalkTree:n,selected:l,title:a,onSelect:i=A.ZT}=e;const s=je(),c=(0,r.useCallback)((e=>t.includes(e.uri)?(0,g.CJp)((0,g.uKF)(e)):"#CACCD1"),[t]);return o().createElement(S.hR,{getCrosswalkColor:c},o().createElement("div",{className:s.container,onClick:i},o().createElement("span",{className:s.title},a," ",o().createElement(I.Z,{className:s.hintIcon})),o().createElement("div",{className:ye()(s.graph,{[`${s.selectedTree}`]:l})},l&&o().createElement(De.Z,{className:s.checkedIcon}),o().createElement(ue,{crosswalkTree:n}))))},$e=(0,B.Z)((e=>({dialogContainer:{maxWidth:"unset"},dialogTitle:{padding:"13px 16px 0 16px",fontWeight:500,fontSize:"20px",lineHeight:"23px",letterSpacing:"0.25px"},dialogContent:{display:"flex",flexDirection:"column",padding:"13px 16px 0 16px"},trees:{display:"flex"},uri:{fontSize:"13px",lineHeight:"15px",color:e.palette.text.primary,marginBottom:"15px"},title:{fontSize:"13px",lineHeight:"15px",color:e.palette.text.secondary,paddingRight:"2px"}}))),Ae=e=>{let{canUnmerge:t,contributor:n,crosswalkTree:l,onClose:a,onUnmergeContributor:i}=e;const s=$e(),[c,u]=(0,r.useState)(g.MBD.Unmerge),d=(0,r.useCallback)((e=>(0,g.keo)(n,e).map((e=>{let{uri:t}=e;return t}))),[n]);return o().createElement(Ue.Z,{open:!0,onClose:a,classes:{paper:s.dialogContainer}},o().createElement(Be.Z,{classes:{root:s.dialogTitle}},m().text("Unmerge")),o().createElement(Fe.Z,{classes:{root:s.dialogContent}},o().createElement(P.Z,{variant:"body2",className:s.uri},o().createElement("span",{className:s.title},m().text("Entity URI:")),(0,g.nIW)(n.uri).toUpperCase()),o().createElement("div",{className:s.trees},o().createElement(Ie,{onSelect:()=>u(g.MBD.Unmerge),selected:c===g.MBD.Unmerge,title:m().text("Unmerge"),crosswalkTree:l,coloredCrosswalks:d(!0)}),n.merges&&n.uri!==l.uri&&o().createElement(Ie,{onSelect:()=>u(g.MBD.TreeUnmerge),selected:c===g.MBD.TreeUnmerge,title:m().text("Tree unmerge"),crosswalkTree:l,coloredCrosswalks:d(!1)}))),o().createElement(He.Z,null,o().createElement(Pe.Z,{onClick:a},m().text("Cancel")),o().createElement(Pe.Z,{disabled:!t,onClick:()=>{i(c),a()},color:"primary"},m().text("Unmerge"))))},We=(0,B.Z)((e=>({dialogContainer:{maxWidth:"unset"},dialogTitle:{padding:"13px 16px 0 16px",fontWeight:500,fontSize:"20px",lineHeight:"23px",letterSpacing:"0.25px"},dialogContent:{display:"flex",flexDirection:"column",padding:"13px 16px 0 16px"},uri:{fontSize:"13px",lineHeight:"15px",color:e.palette.text.primary,marginBottom:"15px"},title:{fontSize:"13px",lineHeight:"15px",color:e.palette.text.secondary,paddingRight:"2px"}}))),Ve=e=>{let{canUnsubscribe:t,contributor:n,crosswalkTree:l,onClose:a,onUnsubscribeContributor:i}=e;const s=We(),c=(0,r.useMemo)((()=>(0,g.keo)(n,!0).map((e=>{let{uri:t}=e;return t}))),[n]);return o().createElement(Ue.Z,{open:!0,onClose:a,classes:{paper:s.dialogContainer}},o().createElement(Be.Z,{classes:{root:s.dialogTitle}},m().text("Unsubscribe")),o().createElement(Fe.Z,{classes:{root:s.dialogContent}},o().createElement(P.Z,{variant:"body2",className:s.uri},o().createElement("span",{className:s.title},m().text("Entity URI:")),(0,g.nIW)(n.uri).toUpperCase()),o().createElement(Ie,{selected:!0,title:m().text("Unsubscribe"),crosswalkTree:l,coloredCrosswalks:c})),o().createElement(He.Z,null,o().createElement(Pe.Z,{onClick:a},m().text("Cancel")),o().createElement(Pe.Z,{disabled:!t,onClick:()=>{i(),a()},color:"primary"},m().text("Unsubscribe"))))},Xe=(0,B.Z)((e=>({root:{display:"flex",flexDirection:"column",alignItems:"center",height:"100%"},modeSwitcher:{backgroundColor:e.palette.background.paper,marginTop:"8px"},infoIcon:{fontSize:"18px",marginRight:"8px"},hint:{color:e.palette.text.secondary,display:"flex",flexDirection:"row",alignItems:"center",alignSelf:"flex-start",margin:"5px 12px 10px 12px"},hintText:{fontSize:"12px",lineHeight:"16px"},crosswalksList:{height:"100%",width:"calc(100% - 24px)",margin:"8px 12px",background:e.palette.divider,opacity:.2},pane:{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",flexDirection:"column",overflow:"hidden"},resizablePanesWrapper:{flexGrow:1,width:"100%"}})));function Ge(){return Ge=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ge.apply(this,arguments)}const Ye=(0,r.memo)((e=>{let{activeMode:t,contributors:n,crosswalkTree:l,entity:a,onChangeMode:i,onUnmergeContributor:s=A.ZT,onUnsubscribeContributor:c=A.ZT}=e,u=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["activeMode","contributors","crosswalkTree","entity","onChangeMode","onUnmergeContributor","onUnsubscribeContributor"]);const d=Xe(),[p,f]=(0,r.useState)("50%"),h=(0,r.useCallback)((e=>{let{percentageSize:t}=e;return f(t)}),[]),[b,y]=(0,r.useState)(),[v,x]=(0,r.useState)(),E=(0,r.useMemo)((()=>(0,g.Qbq)(l)>1),[l]),k=(0,r.useMemo)((()=>[{id:V.Crosswalk,title:m().text("Crosswalk")},{id:V.Source,title:m().text("Source")},{id:V.Contributor,title:m().text("Contributor")}]),[]),[w,C]=(0,r.useState)(),S=t===V.Contributor;return o().createElement("div",{className:d.root},b&&o().createElement(Ae,{canUnmerge:E,onClose:()=>y(null),onUnmergeContributor:e=>{s({entityUri:a.uri,contributorUri:b,operationType:e})},crosswalkTree:l,contributor:n.find((e=>{let{uri:t}=e;return t===b}))}),v&&o().createElement(Ve,{canUnsubscribe:E,onClose:()=>x(null),onUnsubscribeContributor:()=>c({dataTenant:v.dataTenant,crosswalk:v.crosswalk}),crosswalkTree:l,contributor:n.find((e=>{let{uri:t}=e;return t===v.contributorUri}))}),o().createElement(W.Z,{modes:k,modeId:t,className:d.modeSwitcher,onChange:i}),o().createElement(T.Z,{className:d.resizablePanesWrapper,orientation:"horizontal",size:p,minSize:170,maxSize:-170,allowResize:!0,onChange:h},o().createElement("div",{className:d.pane},l&&!(0,$.isEmpty)(w)&&o().createElement(ue,{entityLabel:(0,g.idV)(null==a?void 0:a.label),crosswalkTree:l,visibleCrosswalks:w,accentContributors:S})),o().createElement("div",{className:d.pane},o().createElement("div",{className:d.hint},o().createElement(I.Z,{className:d.infoIcon}),o().createElement("span",{className:d.hintText},m().text("You can drag a crosswalk to add values to attributes swimlanes"))),a&&o().createElement(Le,Ge({onUnmergeContributor:y,onUnsubscribeContributor:x,accentContributors:S,contributors:n,entity:a,onChangeVisibleCrosswalks:C},u)))))}));var _e=n(29627);function qe(){return qe=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},qe.apply(this,arguments)}const Ke=e=>{let{styles:t={}}=e,n=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["styles"]);return o().createElement("svg",qe({width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n),o().createElement("mask",{id:"svg4041339336a",masktype:"alpha",maskUnits:"userSpaceOnUse",x:"2",y:"3",width:"19",height:"17"},o().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2.5 5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5S4.83 6.5 4 6.5 2.5 5.83 2.5 5zM21 20H8v-2h13v2zM8 10h13V8H8v2zm0-4V4h13v2H8zm0 10h13v-2H8v2zm-2.5.5v-3h-3v3h3z",fill:"#fff"})),o().createElement("g",{mask:"url(#svg4041339336a)"},o().createElement("path",{fillOpacity:".54",fill:"#000",d:"M0 0h24v24H0z"})))},Qe=e=>{console.error(e),d.Z.addError({title:m().text("Error"),message:(0,g.xU7)(e,m().text("Something went wrong"))})};var Je=n(73972),et=n(58651),tt=n(13896);function nt(){return nt=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},nt.apply(this,arguments)}const rt=e=>{let{styles:t={}}=e,n=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["styles"]);return o().createElement("svg",nt({width:"90",height:"90",viewBox:"0 0 90 90",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n),o().createElement("circle",{cx:"45",cy:"45",r:"45",fill:"#0072CE",fillOpacity:".1"}),o().createElement("mask",{id:"svg985456408a",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"90",height:"90"},o().createElement("circle",{cx:"45",cy:"45",r:"45",fill:"#fff"})),o().createElement("g",{mask:"url(#svg985456408a)"},o().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M-5.625 3.164h90V90h-90V3.164z",fill:"url(#paint0_linear)"}),o().createElement("path",{opacity:".05",fillRule:"evenodd",clipRule:"evenodd",d:"M66.01 19.992l20.615 20.615v52.337H32.83L18.281 79.131V19.99H66.01z",fill:"url(#paint1_linear)"}),o().createElement("path",{opacity:".06",fillRule:"evenodd",clipRule:"evenodd",d:"M16.523 20.39H87.54A2.46 2.46 0 0190 22.853v55.195a2.46 2.46 0 01-2.46 2.46H16.522a2.46 2.46 0 01-2.46-2.46V22.852a2.46 2.46 0 012.46-2.461z",fill:"#000"}),o().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M17.578 19.688h70.664c.971 0 1.758.787 1.758 1.757v55.196c0 .97-.787 1.757-1.758 1.757H17.578c-.97 0-1.758-.787-1.758-1.757V21.445c0-.97.787-1.758 1.758-1.758z",fill:"#fff"}),o().createElement("path",{opacity:".8",fillRule:"evenodd",clipRule:"evenodd",d:"M37.046 25.536c0-.583.472-1.055 1.055-1.055h14.633a1.055 1.055 0 110 2.11H38.101a1.055 1.055 0 01-1.055-1.055z",fill:"#B6C7DB"}),o().createElement("path",{opacity:".2",fillRule:"evenodd",clipRule:"evenodd",d:"M36.914 29.754c0-.582.472-1.054 1.055-1.054H60.54a1.055 1.055 0 110 2.11H37.969a1.055 1.055 0 01-1.055-1.056z",fill:"#979797"}),o().createElement("path",{opacity:".8",fillRule:"evenodd",clipRule:"evenodd",d:"M37.046 57.305c0-.583.472-1.055 1.055-1.055h14.633a1.055 1.055 0 110 2.11H38.101a1.055 1.055 0 01-1.055-1.055z",fill:"#B6C7DB"}),o().createElement("path",{opacity:".2",fillRule:"evenodd",clipRule:"evenodd",d:"M36.914 61.523c0-.582.472-1.054 1.055-1.054H60.54a1.055 1.055 0 110 2.11H37.969a1.055 1.055 0 01-1.055-1.056z",fill:"#979797"}),o().createElement("path",{opacity:".8",fillRule:"evenodd",clipRule:"evenodd",d:"M37.046 67.852c0-.583.472-1.055 1.055-1.055h28.696a1.055 1.055 0 110 2.11H38.1a1.055 1.055 0 01-1.055-1.055z",fill:"#B6C7DB"}),o().createElement("path",{opacity:".2",fillRule:"evenodd",clipRule:"evenodd",d:"M36.914 72.07c0-.582.472-1.054 1.055-1.054h26.087a1.055 1.055 0 110 2.109H37.97a1.055 1.055 0 01-1.055-1.055z",fill:"#979797"}),o().createElement("path",{opacity:".8",fillRule:"evenodd",clipRule:"evenodd",d:"M48.648 36.21c0-.582.472-1.054 1.054-1.054h28.696a1.055 1.055 0 110 2.11H49.702a1.055 1.055 0 01-1.054-1.055z",fill:"#B6C7DB"}),o().createElement("path",{opacity:".2",fillRule:"evenodd",clipRule:"evenodd",d:"M48.516 40.43c0-.583.472-1.055 1.054-1.055h22.572a1.055 1.055 0 110 2.11H49.57a1.055 1.055 0 01-1.054-1.055z",fill:"#979797"}),o().createElement("circle",{cx:"23.555",cy:"27.773",r:"3.164",fill:"#B6C7DB"}),o().createElement("circle",{cx:"23.555",cy:"27.773",r:"3.164",fill:"#B6C7DB"}),o().createElement("circle",{cx:"42.188",cy:"37.266",r:"2.109",fill:"#B6C7DB"}),o().createElement("circle",{cx:"42.188",cy:"47.813",r:"2.109",fill:"#B6C7DB"}),o().createElement("circle",{cx:"23.555",cy:"59.414",r:"3.164",fill:"#B6C7DB"}),o().createElement("circle",{cx:"23.555",cy:"69.961",r:"3.164",fill:"#B6C7DB"}),o().createElement("path",{opacity:".8",fillRule:"evenodd",clipRule:"evenodd",d:"M48.648 46.758c0-.583.472-1.055 1.054-1.055h28.696a1.055 1.055 0 110 2.11H49.702a1.055 1.055 0 01-1.054-1.055z",fill:"#B6C7DB"}),o().createElement("path",{opacity:".2",fillRule:"evenodd",clipRule:"evenodd",d:"M48.516 50.977c0-.583.472-1.055 1.054-1.055h26.088a1.055 1.055 0 110 2.11H49.57a1.055 1.055 0 01-1.054-1.055z",fill:"#979797"}),o().createElement("path",{opacity:".2",fillRule:"evenodd",clipRule:"evenodd",d:"M32.524 37.969v-2.813h-.703v14.191h3.93v-.703h-3.227v-9.972h3.227v-.703h-3.227z",fill:"#2B98F0"}),o().createElement("path",{opacity:".54",fillRule:"evenodd",clipRule:"evenodd",d:"M33.423 27.07l-1.242 1.243-1.243-1.243h2.485z",fill:"#000"}),o().createElement("path",{opacity:".6",fillRule:"evenodd",clipRule:"evenodd",d:"M17.578 7.734h65.39a2.11 2.11 0 012.11 2.11v6.328a2.11 2.11 0 01-2.11 2.11h-65.39a2.11 2.11 0 01-2.11-2.11V9.844a2.11 2.11 0 012.11-2.11z",fill:"#fff"}),o().createElement("path",{opacity:".2",fillRule:"evenodd",clipRule:"evenodd",d:"M20.39 13.008a2.11 2.11 0 012.11-2.11h24.61a2.11 2.11 0 110 4.22H22.5a2.11 2.11 0 01-2.11-2.11zM52.031 13.008a2.11 2.11 0 012.11-2.11h3.515a2.11 2.11 0 110 4.22h-3.515a2.11 2.11 0 01-2.11-2.11z",fill:"#979797"})),o().createElement("defs",null,o().createElement("linearGradient",{id:"paint0_linear",x1:"-5.625",y1:"3.164",x2:"-5.625",y2:"90",gradientUnits:"userSpaceOnUse"},o().createElement("stop",{stopColor:"#FAFAFA",stopOpacity:".01"}),o().createElement("stop",{offset:"1",stopColor:"#F4F4F4"})),o().createElement("linearGradient",{id:"paint1_linear",x1:"93.557",y1:"63.672",x2:"54.451",y2:"27.31",gradientUnits:"userSpaceOnUse"},o().createElement("stop",{stopOpacity:".01"}),o().createElement("stop",{offset:"1"}))))},ot=(0,B.Z)((e=>({root:{height:"100%",overflow:"hidden",background:e.palette.background.default,display:"flex",flexDirection:"column",alignItems:"center",paddingTop:"115px"},info:{color:e.palette.text.secondary,fontSize:"16px",lineHeight:"24px",marginTop:"16px"}}))),lt=()=>{const e=ot();return o().createElement("div",{className:e.root},o().createElement(rt,null),o().createElement("span",{className:e.info},m().text("Please persist your profile to be able to edit crosswalks")))},at=(0,B.Z)({sourcesView:{position:"absolute",top:0,left:0,right:0,bottom:0,overflowX:"hidden",overflowY:"auto",fontFamily:"Roboto, Helvetica, Arial, sans-serif",display:"flex"},"@global div[role=tooltip]":{fontFamily:"Roboto, Helvetica, Arial, sans-serif"},"@global div[role=presentation]":{fontFamily:"Roboto, Helvetica, Arial, sans-serif"},resizablePanesWrapper:{flexGrow:1,height:"100%"},pane:{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",flexDirection:"column",overflow:"hidden"},tabs:{marginLeft:"1px"}});var it;!function(e){e[e.Legend=0]="Legend",e[e.History=1]="History"}(it||(it={}));const st=(0,l.connect)((e=>({entity:f.ZP.selectors.getEntity(e),metadata:f.ZP.selectors.getMetadata(e),historyEvent:f.ZP.selectors.getHistoryEvent(e)})))((e=>{var t,n;let{config:a,entity:i,metadata:s,getSavedState:c,saveState:u,dispatch:d,historyEvent:p}=e;const H=at(),[F,B]=(0,r.useState)(V.Crosswalk),[D,I]=(0,r.useState)(0),W=e=>I((t=>t===e?null:e)),X=null!==D,G=D===it.History,{isHistoryEnabled:Y,isProfilePersisted:_}=(0,h.C)({isHistoryTabActive:G,entity:i}),q=_?i:null,K=null==q?void 0:q.uri,Q=(0,g.nt9)(s,null==i?void 0:i.type),{historySlice:J}=(0,b.a)({entity:q,historyEvent:p}),[ee,te]=(0,r.useState)();(0,y.D)((()=>{te(void 0)}),[J]),(0,y.D)((()=>{te(void 0)}),[K]);const[ne,re]=(0,r.useState)(-480),oe=(0,r.useCallback)((e=>{let{percentageSize:t}=e;return re(t)}),[]),{isLoaded:le,savedState:ae}=(0,v.a)(c),[ie,se]=(0,r.useState)();(0,r.useEffect)((()=>{le&&se(ae.visibleColumns)}),[le]),(0,r.useEffect)((()=>{const e=!(0,$.equals)(ie,ae.visibleColumns);le&&e&&u({visibleColumns:ie})}),[ie]);const{crosswalkTree:ce,reload:ue}=(e=>{const[t,n]=(0,r.useState)(null),[o,l]=(0,r.useState)(!1),a=(0,_e._)(),i=e=>{console.warn("Failed to load crosswalk tree",e),n(null)},s=(0,r.useCallback)((()=>{e?(l(!0),a((0,g.wo0)({entityUri:e})).then((e=>{n(e)})).catch(i).finally((()=>{l(!1)}))):n(null)}),[e]);return(0,r.useEffect)((()=>{s()}),[s]),{isLoading:o,crosswalkTree:t,reload:s}})((null==J?void 0:J.aEntity.uri)||K),de=(0,r.useMemo)((()=>(0,g.b7X)(ce)),[ce]),pe=(0,r.useCallback)((()=>{K&&d(f.N5.entity.actions.loadEntity({viewId:a.id,uri:K}))}),[K,a,d]),me=(0,r.useCallback)((0,$.pipe)(pe,ue),[pe,ue]),{modifiedEntity:fe,crosswalksMap:ge,newlyCreatedAttributes:he,onDeleteAttribute:be,onPinAttribute:ye,onIgnoreAttribute:ve,onEditAttribute:xe,onAddAttribute:Ee}=(0,x.Q)({entity:(null==J?void 0:J.aEntity)||q,onModify:me,onError:Qe}),{addCrosswalk:ke,deleteCrosswalk:we,editCrosswalk:Ce,unmergeContributor:Se,unsubscribeContributor:Oe}=(e=>{let{onLoad:t=A.ZT,onSuccess:n=A.ZT,onError:o=A.ZT}=e;const{addCrosswalk:a,editCrosswalk:i,deleteCrosswalk:s}=(0,Je.P)({onLoad:t,onSuccess:n,onError:o}),c=(0,l.useSelector)(f.ZP.selectors.getDtssPath),u=(0,l.useSelector)(f.ZP.selectors.getTenant),d=(0,r.useCallback)((e=>{t(),e.then((()=>{n()})).catch(o)}),[t,o,n]);return{addCrosswalk:a,editCrosswalk:i,deleteCrosswalk:s,unmergeContributor:(0,r.useCallback)((e=>(0,$.pipe)(g.L8n,d)(e)),[d]),unsubscribeContributor:(0,r.useCallback)((e=>{let{crosswalk:t,dataTenant:n}=e;return(0,$.pipe)(g.R9X,(0,$.andThen)((e=>{if(!e.successful)throw new Error(m().text("Failed to unsubscribe contributor"));return e})),d)({dtssPath:c,value:t.value,type:t.type,sourceTable:t.sourceTable,dataTenant:n.id,customerTenant:u})}),[d,c,u])}})({onSuccess:me,onError:(0,r.useCallback)((e=>{Qe(e),e.errorCode===g.Xt7.CROSSWALK_NOT_FOUND&&me()}),[me])}),{historyFilter:Te,onApplyFilter:Ze,onClearFilter:Me,isLoading:Ne,historicUris:Re,historyWithTotal:ze,canLoadMore:Le,onLoadMore:Pe}=(0,E.k)({entity:q,enabled:Y}),Ue=(e=>{let{activeMode:t,contributors:n}=e;const o=(0,r.useCallback)((e=>{var r;switch(t){case V.Source:return(0,g.kW2)(e.type);case V.Contributor:return(0,g.GtP)((null===(r=(0,g.A1W)(n,e))||void 0===r?void 0:r.uri)||"");case V.Crosswalk:return(0,g.CJp)((0,g.uKF)(e))}}),[t,n]),[l,a]=(0,r.useState)([]),i=(0,r.useRef)([]),s=(0,r.useCallback)((0,g.DsO)((()=>{a([...i.current])}),50),[]),c=(0,r.useCallback)((e=>{i.current=e,s(e)}),[s]),u=(0,r.useCallback)(((e,r)=>{if(e)if(r)if(t===V.Contributor){const t=(0,g.A1W)(n,e);c([e,...(null==t?void 0:t.crosswalks)||[]])}else c([e]);else c([])}),[t,c,n]),[d,p]=(0,r.useState)([]),m=(0,r.useCallback)(((e,t)=>(0,$.concat)(e.filter((e=>!(0,$.any)((0,g.aFF)(e),t))),t.filter((t=>!(0,$.any)((0,g.aFF)(t),e))))),[]),f=(0,r.useCallback)((e=>{if(e)if(t===V.Contributor){const t=(0,g.A1W)(n,e);p((n=>m([e,...(null==t?void 0:t.crosswalks)||[]],n)))}else p((t=>m([e],t)))}),[t,m,n]);return(0,r.useEffect)((()=>{p([])}),[t]),{getCrosswalkColor:o,highlightedCrosswalks:(0,r.useMemo)((()=>[...l,...d]),[l,d]),focusedCrosswalks:d,toggleCrosswalkFocus:f,setCrosswalkHighlighted:u}})({activeMode:F,contributors:de}),He=[{buttonProps:{id:it.Legend,icon:Ke,tooltipTitle:m().text("Legend")},title:o().createElement(P.Z,{variant:"h6"},m().text("Legend")),content:o().createElement(Ye,{activeMode:F,onChangeMode:B,entity:(null==J?void 0:J.aEntity)||q,crosswalkTree:ce,contributors:de,selectedAttributeTypes:ee,readOnly:!!J,onAddCrosswalk:ke,onUnmergeContributor:Se,onUnsubscribeContributor:Oe,onEditCrosswalk:Ce,onDeleteCrosswalk:we})},{buttonProps:{id:it.History,icon:U.Z,tooltipTitle:m().text("History")},title:o().createElement(k.Z,{total:((null==Re?void 0:Re.length)||0)+1,entityType:Q,filter:Te,onApplyFilter:Ze,onClearFilter:Me}),content:_?o().createElement(w.Z,{isLoading:Ne,historyWithTotal:ze,contributorsUris:Re,entityUri:K,historyEvent:p,onLoadMore:Pe,canLoadMore:Le}):o().createElement(C.Z,null)}];return o().createElement("div",{className:H.sourcesView},o().createElement(S.hR,Ue,o().createElement(tt.DndProvider,{backend:et.default},o().createElement(O.Z,null),o().createElement(T.Z,{className:H.resizablePanesWrapper,orientation:"vertical",size:X?ne:"100%",minSize:480,maxSize:-480,allowResize:X,onChange:oe},o().createElement("div",{className:H.pane},o().createElement(Z.Z,{entity:(null==J?void 0:J.aEntity)||i},J?o().createElement(M.Z,null):o().createElement(N.a,null)),_?o().createElement(R.R,{attributeUris:he},o().createElement(z.Z,{visibleColumns:ie,onChangeVisibleColumns:se,entity:fe,crosswalksMap:ge,selectedAttributeTypes:ee,onSelectAttributeTypes:te,readOnly:!!J,onDelete:be,onPin:ye,onIgnore:ve,onEdit:xe,onAdd:Ee})):o().createElement(lt,null)),o().createElement(j,{className:H.pane,title:null===(t=He[D])||void 0===t?void 0:t.title,onClose:()=>W(D)},null===(n=He[D])||void 0===n?void 0:n.content)))),o().createElement(L.G,{className:H.tabs,buttonsProps:(0,$.pipe)((0,$.reject)((0,$.propEq)("hidden",!0)),(0,$.pluck)("buttonProps"))(He),onButtonClick:W,activeIndexId:D}))})),ct=(0,i.createGenerateClassName)({productionPrefix:"sourcesPerspective",disableGlobal:!0}),ut=e=>{let{config:t,store:n,onResize:p,saveState:m,getSavedState:f}=e;const h=(0,r.useCallback)((0,g.aYu)(f),[f]);return o().createElement(l.Provider,{store:n},o().createElement(u.m.Provider,{value:t.id},o().createElement(i.StylesProvider,{generateClassName:ct},o().createElement(c.MuiPickersUtilsProvider,{utils:a.Z},o().createElement(s.Z,{handleHeight:!0,onResize:(e,t)=>null==p?void 0:p(Math.floor(e),Math.floor(t))}),t&&o().createElement(st,{config:t,saveState:m,getSavedState:h}),o().createElement(d.Z,null)))))}}}]);
|
package/174.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[174],{67586:(e,t,n)=>{n.d(t,{Z:()=>b});var r=n(24328),o=n.n(r),l=n(13980),a=n.n(l),s=n(95038),u=n.n(s),i=n(35674),c=n(8813),p=n(52730),f=n(86689);const d=e=>{let{value:t=null,dataTypeDefinition:n,rich:r=!0}=e;const l=(0,p.useSelector)(i.ZP.selectors.getAttributePresentations),a=u().localeData().longDateFormat("L"),s=u().localeData().longDateFormat("LTS"),d=(0,p.useSelector)(i.ZP.selectors.getDateMask)||a,b=(0,p.useSelector)(i.ZP.selectors.getDateTimeMask)||a+" "+s,g=(0,c.mB6)({attributePresentations:l,dataTypeDefinition:n,dateMask:d,dateTimeMask:b},t);return r&&(0,c.VSb)(n,t)?o().createElement(f.Z,{target:"_blank",href:(0,c.W4V)(g),underline:"none"},g):g};d.propTypes={value:a().any,dataTypeDefinition:a().object,rich:a().bool};const b=d},6216:(e,t,n)=>{n.d(t,{X:()=>i});var r=n(24328),o=n.n(r),l=n(87918),a=n.n(l),s=n(7522);function u(){return u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u.apply(this,arguments)}const i=e=>o().createElement(s.Z,u({message:a().text("No results found")},e))},16482:(e,t,n)=>{n.d(t,{Z:()=>w});var r=n(18726),o=n(71153),l=n.n(o),a=n(86619),s=n(13980),u=n.n(s),i=n(24328),c=n.n(i),p=n(17440),f=n(79573);const d=(0,n(79692).Z)({inputRoot:{flexWrap:"wrap"},autosizeInput:{width:"auto",marginLeft:"5px",overflow:"hidden","& input":{background:"0px center",border:0,fontSize:"inherit",outline:0,padding:0,color:"inherit"}}});var b=n(49898),g=n(80030),m=n(87918),y=n.n(m);function O(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){h(e,t,n[t])}))}return e}function h(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function v(){return v=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},v.apply(this,arguments)}function E(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}const P=e=>{let{CustomInputComponent:t}=e,n=E(e,["CustomInputComponent"]);return t?c().createElement(t,v({},n,{customInput:r.Z})):c().createElement(r.Z,n)};P.propTypes={CustomInputComponent:u().elementType};const j=y().text("Press Enter to add. You may enter multiple values"),S=(0,p.pipe)(p.trim,p.isEmpty),T=e=>{let{values:t=[],InputProps:n={},inputProps:r={},classes:o={},onChange:s=f.ZT,getValueLabel:u=p.identity}=e,m=E(e,["values","InputProps","inputProps","classes","onChange","getValueLabel"]);const y=d(),h=n.classes||{},{root:T}=h,w=E(h,["root"]),[k,C]=(0,i.useState)(""),x=e=>s((0,p.remove)(e,1,t)),_=t.length>0,I=()=>{var e;S(k)||(e=k,s((0,p.uniq)([...t,e])),C(""))},[L,Z]=(0,i.useState)(!1),N=!_&&L?j:"";return c().createElement(g.ZP,{title:N},c().createElement(a.Z,v({},m,{classes:{root:o.root},value:k,onChange:(0,p.pipe)(f.NA,C),InputProps:O({},n,{startAdornment:t.map(((e,t)=>c().createElement(b.Z,{key:e,label:u(e),onDelete:()=>x(t)}))),inputComponent:P,classes:O({root:l()(y.inputRoot,T),input:l()(y.autosizeInput,w.input)},w)}),inputProps:O({},r,{CustomInputComponent:n.inputComponent}),onKeyPress:(0,p.when)((0,p.propEq)("key","Enter"),I),onKeyDown:(0,p.when)((0,p.propEq)("keyCode",8),(()=>{""===k&&_&&x(-1)})),onFocus:()=>Z(!0),onBlur:(0,p.pipe)(I,(()=>Z(!1)))})))};T.propTypes={values:u().arrayOf(u().string),InputProps:u().shape({classes:u().shape({root:u().string}),inputComponent:u().elementType}),inputProps:u().object,onChange:u().func,classes:u().object,getValueLabel:u().func};const w=T},92304:(e,t,n)=>{n.d(t,{Z:()=>h});var r=n(13980),o=n.n(r),l=n(24328),a=n.n(l),s=n(71153),u=n.n(s),i=n(17440),c=n(86619);const p=(0,n(79692).Z)({multiSelect:{padding:"3px 48px 3px 8px !important",minHeight:"34px !important"},chips:{display:"flex",flexWrap:"wrap"}});var f=n(53862),d=n(79573),b=n(49898);function g(){return g=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},g.apply(this,arguments)}function m(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){y(e,t,n[t])}))}return e}function y(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const O=e=>{let{multiple:t,value:n,children:r,getValueLabel:o=d.ZT,getValuePlaceholder:l=i.identity,onChange:s=d.ZT,fullWidth:f,TextFieldProps:y,MenuProps:O,classes:h}=e,v=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["multiple","value","children","getValueLabel","getValuePlaceholder","onChange","fullWidth","TextFieldProps","MenuProps","classes"]);const E=p();return a().createElement(c.Z,g({select:!0,fullWidth:f},y,{value:(0,i.defaultTo)(t?[]:"",n),onChange:(0,i.pipe)(d.NA,s),SelectProps:m({},v,{MenuProps:m({getContentAnchorEl:null,anchorOrigin:{vertical:"bottom",horizontal:"left"}},O),classes:m({},h,{root:u()({[E.multiSelect]:t},(0,i.prop)("root",h))}),multiple:t,renderValue:e=>t?a().createElement("div",{className:E.chips},e.map(((t,n)=>a().createElement(b.Z,{key:t,label:o(t)||l(t),onMouseDown:e=>e.stopPropagation(),onDelete:()=>s((0,i.remove)(n,1,e))})))):o(e)||l(e)})}),r)};O.propTypes={multiple:o().bool,fullWidth:o().bool,value:o().oneOfType([f.W6,o().arrayOf(f.W6)]),TextFieldProps:o().object,MenuProps:o().object,children:o().node,classes:o().object,onChange:o().func,getValueLabel:o().func,getValuePlaceholder:o().func};const h=O},49898:(e,t,n)=>{n.d(t,{Z:()=>g});var r=n(24328),o=n.n(r),l=n(13980),a=n.n(l),s=n(7089),u=n(79692);const i=(0,u.Z)({root:{height:"28px",backgroundColor:"rgba(43, 152, 240, 0.12)",maxWidth:"calc(100% - 4px)",margin:"2px"},deleteIcon:{height:18,width:18,color:"rgba(0,0,0,0.38)",marginRight:"8px"},label:{overflow:"hidden"}}),c=(0,u.Z)((e=>({container:{display:"flex",alignItems:"center",width:"100%"},label:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},count:{color:e.palette.text.secondary,fontSize:"13px",letterSpacing:0,lineHeight:"15px",marginLeft:8}})));var p=n(79573),f=n(83088);function d(){return d=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},d.apply(this,arguments)}const b=e=>{let{classes:t={},label:n,count:r}=e,l=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["classes","label","count"]);const a=i(),u=c();return o().createElement(s.Z,d({classes:(0,p.ze)(t,a),label:o().createElement("div",{className:u.container},o().createElement(f.C,{value:n},o().createElement("div",{className:u.label},n)),r&&o().createElement("div",{className:u.count},r))},l))};b.propTypes={classes:a().object,label:a().string,count:a().string};const g=b},65314:(e,t,n)=>{n.d(t,{Z:()=>Ie});var r=n(17440),o=n(21324),l=n(13980),a=n.n(l),s=n(24328),u=n.n(s),i=n(79573);function c(){return c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c.apply(this,arguments)}const p=e=>{let{value:t,onChange:n}=e,l=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["value","onChange"]);return u().createElement(o.Z,c({},l,{checked:t,onChange:n&&(0,r.pipe)(i.IR,n)}))};p.propTypes={onChange:a().func,value:a().bool};const f=p;var d=n(5806),b=n(87918),g=n.n(b),m=n(79692);const y=(0,m.Z)((e=>({checkbox_primary:{color:e.palette.divider},label:{color:e.palette.text.secondary}}))),O=e=>{let{value:t,onChange:n,className:o}=e;const l=y();return u().createElement("div",{className:o},u().createElement(d.Z,{classes:{label:l.label},control:u().createElement(f,{classes:{root:l.checkbox_primary},color:"primary",value:!(0,r.isNil)(t)&&!!t,onChange:n}),label:g().text("Yes")}),u().createElement(d.Z,{classes:{label:l.label},control:u().createElement(f,{classes:{root:l.checkbox_primary},color:"primary",value:!(0,r.isNil)(t)&&!t,onChange:n&&(0,r.pipe)(r.not,n)}),label:g().text("No")}))};O.propTypes={value:a().bool,onChange:a().func,className:a().string};const h=O;var v=n(39600),E=n(71153),P=n.n(E),j=n(98281),S=n(12231),T=n(92304),w=n(53862);function k(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const C=(0,r.has)("values"),x=(0,r.curry)(((e,t)=>C(t)?[{label:t.label,depth:e,isGroup:!0},...(0,r.chain)(x(e+1),t.values)]:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){k(e,t,n[t])}))}return e}({},t,{depth:e}))),_=(0,r.chain)(x(0)),I=(0,r.curry)(((e,t)=>e.find((e=>{let{isGroup:n,value:r}=e;return!n&&r===t})))),L=(0,m.Z)({checkIcon:{transform:"scale(.7)",marginLeft:"-25px",position:"absolute"},emptyLabel:{padding:"4px 16px"}});var Z=n(62343),N=n(8813);function D(){return D=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},D.apply(this,arguments)}function R(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Y(e,t,n[t])}))}return e}function Y(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const V=e=>{let{value:t,entries:n,classes:o}=e,l=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["value","entries","classes"]);const a=_(n),s=(0,r.isNil)(t)?[]:(0,N.VGB)(t),i=L(),c=(0,Z.$B)();return u().createElement(T.Z,D({MenuProps:{disableAutoFocusItem:!0},classes:R({},o,{root:P()(c.root,(0,r.prop)("root",o)),icon:P()(c.icon,(0,r.prop)("icon",o))})},l,{value:t,getValueLabel:(0,r.pipe)(I(a),(0,r.prop)("label"))}),a.length>0?a.map(((e,t)=>{let{value:n,label:r,depth:o,isGroup:l}=e;return u().createElement(S.Z,{key:t,disabled:l,value:n,style:{paddingLeft:25*(o+1)+"px"}},s.includes(n)&&u().createElement(j.Z,{className:i.checkIcon}),r||n.toString())})):u().createElement(S.Z,{className:i.emptyLabel,disabled:!0},g().text("No results found")))};V.propTypes={value:a().oneOfType([w.W6,a().arrayOf(w.W6)]),entries:a().arrayOf(a().oneOfType([w.vG,w.Z1])).isRequired,classes:a().object};const A=(0,r.curry)(((e,t)=>{const[n,...r]=t.split(e);return[n,r.join(e)]})),W=(0,r.useWith)(r.path,[A(".")]),F=(0,r.ascend)((0,r.prop)("label"));function q(){return q=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},q.apply(this,arguments)}function M(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=e=>{let{multiple:t,value:n,lookupCode:o,lookups:l,onChange:a,getLookups:i}=e,c=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["multiple","value","lookupCode","lookups","onChange","getLookups"]);const p=e=>({lookupCode:e,value:(0,r.path)([o,e,"displayName"],l)});(0,s.useEffect)((()=>{(0,r.isEmpty)(l)&&i&&i()}),[l,i]);const f=((e,t)=>{const n=e=>{const{parent:r}=W(e,t);return r?n(r).concat(e):[e]},o=e=>{let[n,r]=e;const o=W(n,t),[,a]=A(".",n),s=(0,N.sG0)(a,o.displayName);return o===r?{label:s,value:a}:{label:s,values:l(r)}},l=e=>Object.entries(e).map(o).sort(F),a=Object.entries(t[e]||[]).reduce(((t,o)=>{let[l,a]=o;return(0,r.assocPath)(n(`${e}.${l}`),a,t)}),{});return l(a)})(o,l),d=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){M(e,t,n[t])}))}return e}({},c,{multiple:t,entries:f});return n=(0,r.defaultTo)(t?[]:{},n),t?u().createElement(V,q({},d,{value:(0,r.pluck)("lookupCode",n),getValuePlaceholder:e=>n.find((0,r.propEq)("lookupCode",e)).value,onChange:(0,r.pipe)((0,r.map)(p),a)})):u().createElement(V,q({},d,{value:(0,r.prop)("lookupCode",n),getValuePlaceholder:(0,r.always)((0,r.prop)("value",n)),onChange:(0,r.pipe)(p,a)}))};U.propTypes={multiple:a().bool,value:a().oneOfType([N.pYu,a().arrayOf(N.pYu)]),lookupCode:a().string.isRequired,lookups:a().objectOf(a().objectOf(N.SwE)).isRequired,onChange:a().func,getLookups:a().func};const B=U;var z=n(19855),G=n(43371),K=n(91785),H=n(7766),$=n(12350);const X=e=>{let{lookupCode:t,value:n}=e;return(0,N.sG0)(t,n)},J=e=>Object.entries(e).map((e=>{let[t,{displayName:n}]=e;return{lookupCode:t,value:n}})).sort(((e,t)=>{const n=X(e).toLowerCase(),r=X(t).toLowerCase();return N.P6Y.strings.sort("asc",n,r)})),Q=(0,m.Z)((e=>({checkIcon:{transform:"scale(.7)",marginLeft:"-30px",position:"absolute"},option:{paddingLeft:"35px"},dropdownIndicator:{padding:"8px 12px",cursor:"pointer",color:e.palette.text.secondary},clearIndicator:{display:"none"},placeholder:{position:"static"}})));var ee=n(85628);const te=e=>{const t=Q(),{isSelected:n,children:r}=e;return u().createElement(ee.Z,e,n&&u().createElement(j.Z,{className:t.checkIcon}),r)};te.propTypes={children:a().node,isSelected:a().bool.isRequired};const ne=te;var re=n(78501),oe=n(51556);const le=e=>e&&e.lookupCode&&!e.value,ae=(0,r.curry)(((e,t)=>(0,r.hasPath)([t,"displayName"],e)));var se=n(92145),ue=n(29627);const ie={};function ce(){return ce=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ce.apply(this,arguments)}function pe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){fe(e,t,n[t])}))}return e}function fe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const de={IndicatorSeparator:i.Vd,LoadingIndicator:i.Vd,Option:ne,DropdownIndicator:re.Z,Menu:oe.Z,MultiValue:se.Z},be=e=>{let{multiple:t,value:n,lookupCode:o,TextFieldProps:l,parents:a,onChange:i,getLookups:c,lookups:p={},resolveLookups:f,fullWidth:d,disabled:b,placeholder:m,autopopulationId:y}=e,O=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["multiple","value","lookupCode","TextFieldProps","parents","onChange","getLookups","lookups","resolveLookups","fullWidth","disabled","placeholder","autopopulationId"]);const h=(0,s.useRef)(null),v=(0,s.useRef)(null),E=Q();(e=>{let{lookups:t,resolvedValues:n,resolveLookups:o,onLookupsResolve:l}=e;const[a,u]=(0,s.useState)([]);(0,s.useEffect)((()=>{const[e,s]=(0,r.pipe)(N.VGB,(0,r.filter)(le),(0,r.map)((0,r.prop)("lookupCode")),(0,r.partition)(ae(n)))(t);if(e.length>0){const t=e.map((e=>({lookupCode:e,value:n[e].displayName})));l(t)}const i=s.filter((e=>!a.includes(e)));i.length>0&&(u((0,r.pipe)((0,r.concat)(i),r.uniq)),o(i))}),[t,n])})({lookups:n,resolvedValues:p[o],resolveLookups:e=>f(o,e),onLookupsResolve:e=>i(t?e:e[0])}),((e,t,n)=>{var r;const o=(0,s.useRef)(!1);!o.current&&n&&document.activeElement===(null===(r=t.current)||void 0===r?void 0:r.getElementsByTagName("input")[0])&&(o.current=!0),(0,s.useEffect)((()=>{const t=()=>{o.current&&(o.current=!1)};var r,l;if(!n&&o.current&&(null===(r=e.current)||void 0===r||r.focus(),o.current=!1),n&&o.current)return null===(l=document)||void 0===l||l.addEventListener("click",t),()=>{var e;null===(e=document)||void 0===e||e.removeEventListener("click",t)}}),[n])})(v,h,b);const[P,j]=(0,s.useState)(""),S=(0,s.useCallback)((e=>c(o,a,e).then(J)),[o,a]),T=(0,s.useCallback)((0,N.DsO)(((e,t)=>{S(e).then((e=>t(e))).catch((()=>t([])))}),400),[S]),{defaultOptions:w,initialDefaultOptions:k,isLoading:C}=(e=>{const[t,n]=(0,s.useState)([]),[r,o]=(0,s.useState)(null),[l,a]=(0,s.useState)(!1),u=(0,ue._)();return(0,s.useEffect)((()=>{n([]),a(!0),u(e("")).then((e=>{n(e),o((t=>t||e)),a(!1)})).catch((()=>{a(!1)}))}),[e]),{defaultOptions:t,initialDefaultOptions:r,isLoading:l}})(S),x=t?(0,r.isEmpty)(n):!(null!=n&&n.lookupCode||null!=n&&n.value),{markAsTouched:_}=(e=>{let{id:t,initialDefaultOptions:n,isEmptyValue:r,multiple:o,onChange:l}=e;return(0,s.useEffect)((()=>{t&&n&&1===n.length&&r&&!(e=>ie[e])(t)&&l(o?n:n[0])}),[n]),{markAsTouched:(0,s.useCallback)((()=>{t&&(e=>{ie[e]=!0})(t)}),[t])}})({id:y,initialDefaultOptions:k,isEmptyValue:x,multiple:t,onChange:i});return u().createElement($.Z,ce({},O,{isMulti:t,classes:E,menuPortalTarget:document.body,menuPlacement:"auto",TextFieldProps:pe({},l,{ref:h,disabled:(null==l?void 0:l.disabled)||b}),inputRef:h,innerRef:v,styles:{menuPortal:e=>pe({},e,{zIndex:1300}),container:e=>pe({},e,d?{width:"100%"}:{})},loadingMessage:()=>g().text("Loading..."),noOptionsMessage:()=>g().text("No results found"),components:de,isClearable:!0,isSearchable:!0,inputValue:P,onInputChange:j,isLoading:!P&&C,defaultOptions:w,hideSelectedOptions:!1,placeholder:m||"",isDisabled:b,loadOptions:T,getOptionValue:(0,r.either)((0,r.prop)("value"),(0,r.prop)("lookupCode")),getOptionLabel:X,onChange:e=>{_(),i(e)},value:(0,r.defaultTo)(t?[]:null,n)}))};be.propTypes={multiple:a().bool,value:a().oneOfType([N.pYu,a().arrayOf(N.pYu)]),TextFieldProps:a().shape({variant:a().string,margin:a().string,hiddenLabel:a().bool}),lookupCode:a().string.isRequired,parents:a().array,getLookups:a().func,onChange:a().func,lookups:a().object,resolveLookups:a().func,fullWidth:a().bool,placeholder:a().string,disabled:a().bool,autopopulationId:a().string};const ge=be;var me=n(51594),ye=n(1128);function Oe(){return Oe=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Oe.apply(this,arguments)}function he(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){ve(e,t,n[t])}))}return e}function ve(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{classes:t}=e,n=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["classes"]);const o=(0,Z.$B)();return u().createElement(ye.Z,Oe({MenuProps:{disableAutoFocusItem:!0},classes:he({},t,{root:P()(o.root,(0,r.prop)("root",t)),icon:P()(o.icon,(0,r.prop)("icon",t))})},n))};Ee.propTypes={classes:a().object};const Pe=Ee;function je(){return je=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},je.apply(this,arguments)}var Se=n(35674),Te=n(52730);function we(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){ke(e,t,n[t])}))}return e}function ke(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ce(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){xe(e,t,n[t])}))}return e}function xe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const _e=e=>{let{fieldName:t,value:n,onChange:o,dataTypeDefinition:l,TextFieldProps:a={}}=e,i=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["fieldName","value","onChange","dataTypeDefinition","TextFieldProps"]);const c=(0,Z.a6)(),p=((e,t)=>{const n=(0,Te.useSelector)(Se.ZP.selectors.getTenant),o=(0,Te.useSelector)(Se.ZP.selectors.getLookups),l=(0,Te.useSelector)(Se.ZP.selectors.getAttributePresentations),a=(0,Te.useSelector)(Se.ZP.selectors.getGlobalSearchRequestOptions),u=(0,Te.useDispatch)(),i=(0,s.useCallback)((t=>(0,N.Ajk)({fieldName:e,searchValue:t,options:we({},a)}).then((t=>Object.keys(t[e])))),[e,a]),{type:c,values:p,lookupCode:f,uri:d,dependentLookupCode:b,options:g}=t;switch(c){case N.oS0.TYPE_ENUM:return{entries:p.map((e=>({value:e})))};case N.oS0.TYPE_LOOKUP:return{lookups:o,lookupCode:f,getLookups:()=>(0,N.tV7)().then((e=>{u(Se.N5.lookups.actions.lookupsLoaded(e))}))};case N.oS0.TYPE_DEPENDENT_LOOKUP:return{lookups:o,lookupCode:b,getLookups:(e,t,n)=>(0,N.PJj)({type:e,parents:t,displayNamePrefix:n}).then((t=>{let{codeValues:n}=t;return(0,r.propOr)({},e,n)})),resolveLookups:(e,t)=>{const n=t.map((t=>({type:e,codeValue:t})));return(0,N.hK$)(n).then((t=>{if(Array.isArray(t)){const n=t.reduce(((t,n)=>we({},t,n[e])),{});u(Se.N5.lookups.actions.lookupsForTypeResolved({type:e,values:n}))}}))}};case N.oS0.TYPE_TYPEAHEAD:return{getSuggestions:i};case N.oS0.TYPE_NUMBER:case N.oS0.TYPE_FLOAT:case N.oS0.TYPE_DOUBLE:case N.oS0.TYPE_LONG:case N.oS0.TYPE_INT:return{format:l[d]};case N.oS0.TYPE_FILE:return{tenant:n};case N.oS0.TYPE_SELECT:return{entries:g};default:return{}}})(t,l);return a=(0,r.mergeDeepLeft)(a,Ce({},Z.pf,{className:c.marginDense,InputProps:{disableUnderline:(e=>(0,r.is)(Object,e)&&(0,r.has)("value",e)?(0,N.O27)(e.value):(0,N.O27)(e))(n)}})),class{static build(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{fullWidth:n,TextFieldProps:r,color:o}=t,l=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(t,["fullWidth","TextFieldProps","color"]);switch(e){case N.oS0.TYPE_STRING:case N.oS0.TYPE_CIK_ID:case N.oS0.TYPE_ENTITY_ID:case N.oS0.TYPE_URL:case N.oS0.TYPE_BLOG_URL:case N.oS0.TYPE_IMAGE_URL:return u().createElement(G.Z,je({fullWidth:n},r,l));case N.oS0.TYPE_EMAIL:return u().createElement(G.Z,je({fullWidth:n},r,l,{type:"email"}));case N.oS0.TYPE_TEXT:case N.oS0.TYPE_BLOB:return u().createElement(G.Z,je({fullWidth:n,rowsMax:7},r,l,{multiline:!0}));case N.oS0.TYPE_PASSWORD:return u().createElement(G.Z,je({fullWidth:n},r,l,{type:"password"}));case N.oS0.TYPE_LONG:case N.oS0.TYPE_INT:case N.oS0.TYPE_COUNT:return u().createElement(z.Z,je({fullWidth:n},r,l,{integer:!0}));case N.oS0.TYPE_FLOAT:case N.oS0.TYPE_DOUBLE:case N.oS0.TYPE_NUMBER:case N.oS0.TYPE_DOLLAR:return u().createElement(z.Z,je({fullWidth:n},r,l));case N.oS0.TYPE_BOOLEAN:case N.oS0.TYPE_BOOLEAN_RADIO:case N.oS0.TYPE_RDM_LOOKUPS_NOT_RESOLVED:return u().createElement(h,je({color:o},l,{className:null==r?void 0:r.booleanRadioEditorClassName}));case N.oS0.TYPE_DATE:case N.oS0.TYPE_ACTIVENESS_DATE:case N.oS0.TYPE_LOCAL_DATE:return u().createElement(v.Z,je({},r,l));case N.oS0.TYPE_TIMESTAMP:return u().createElement(K.Z,je({},r,l));case N.oS0.TYPE_ENUM:case N.oS0.TYPE_SELECT:return u().createElement(Pe,je({fullWidth:n,TextFieldProps:r},l));case N.oS0.TYPE_LOOKUP:return u().createElement(B,je({fullWidth:n,TextFieldProps:r},l));case N.oS0.TYPE_TYPEAHEAD:return u().createElement(H.Z,je({fullWidth:n},r,l));case N.oS0.TYPE_DEPENDENT_LOOKUP:return u().createElement(ge,je({fullWidth:n,TextFieldProps:r},l));case N.oS0.TYPE_FILE:return u().createElement(me.Z,l);default:return u().createElement(G.Z,je({fullWidth:n},r,l))}}}.build(l.type,Ce({onChange:o,value:n,TextFieldProps:a},p,i))};_e.propTypes={fieldName:a().string,value:a().any,onChange:a().func,dataTypeDefinition:a().object};const Ie=_e},1128:(e,t,n)=>{n.d(t,{Z:()=>g});var r=n(12231),o=n(92304),l=n(13980),a=n.n(l),s=n(24328),u=n.n(s),i=n(53862),c=n(17440);function p(){return p=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},p.apply(this,arguments)}function f(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}const d=e=>t=>e.find((0,c.propEq)("value",t)),b=e=>{let{entries:t,classes:n={}}=e,l=f(e,["entries","classes"]);const{menuItem:a}=n,s=f(n,["menuItem"]);return u().createElement(o.Z,p({},l,{classes:s,getValueLabel:(0,c.pipe)(d(t),(0,c.prop)("label"))}),t.map(((e,t)=>{let{value:n,label:o}=e;return u().createElement(r.Z,{key:t,value:n,className:a},o||n.toString())})))};b.propTypes={classes:a().object,entries:a().arrayOf(i.vG).isRequired};const g=b},51594:(e,t,n)=>{n.d(t,{Z:()=>w});var r=n(24328),o=n.n(r),l=n(71153),a=n.n(l),s=n(8813),u=n(13980),i=n.n(u),c=n(87918),p=n.n(c),f=n(4614),d=n(86689),b=n(90436),g=n(77277),m=n(49166),y=n(97333),O=n(83088),h=n(79692);const v=(0,h.Z)({fileUploaderInput:{display:"none"},uploaded:{display:"flex",alignItems:"center"},label:{textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"},cancelIcon:{height:"18px",width:"18px",color:"rgba(0,0,0,0.38)",marginLeft:"3px",cursor:"pointer"}}),E=e=>{console.error(e),y.Z.addError({title:p().text("File upload error"),message:e})},P=e=>{let{supportedFileTypes:t=[],onUpload:n,onBeforeUpload:l}=e;const a=v(),s=(0,r.useRef)(),u=t.join(",");return o().createElement(r.Fragment,null,o().createElement(g.Z,{variant:"contained",onClick:()=>{s.current.value=null,s.current.click()}},p().text("Select File")),o().createElement("input",{type:"file",className:a.fileUploaderInput,onChange:e=>{const t=e.target.files||e.dataTransfer.files||[];t.length>0&&(l(),n(t[0])),e.stopPropagation(),e.preventDefault()},ref:s,name:"uploadfile",accept:u}))};P.propTypes={onUpload:i().func,onBeforeUpload:i().func,supportedFileTypes:i().arrayOf(i().string)};const j=e=>{let{link:t,filename:n,onUpload:l,onError:a=E,onCancel:u,supportedFileTypes:i,isValidLink:c=!0}=e;const[p,g]=(0,r.useState)(1),[y,h]=(0,r.useState)(""),j=v();(0,r.useEffect)((()=>{h(n)}),[n]),(0,r.useEffect)((()=>{g(t?3:1)}),[t]);const S=(0,r.useCallback)((e=>{g(1),a(e)}),[a]),T=(0,r.useCallback)((e=>l(e).then((()=>{g(3),h(e.name)})).catch(S)),[l,S]),w=(0,r.useCallback)((()=>{g(2)}),[]),k=(0,r.useCallback)((()=>{g(1),u()}),[u]);switch(p){case 1:return o().createElement(P,{supportedFileTypes:i,onUpload:T,onBeforeUpload:w});case 3:{const e=(0,s.idV)(y);return o().createElement("div",{className:j.uploaded},o().createElement(O.C,{value:e},c?o().createElement(d.Z,{href:t,className:j.label},e):o().createElement(b.Z,{variant:"inherit",className:j.label},e)),o().createElement(m.Z,{onClick:k,onMouseDown:k,onTouchEnd:k,className:j.cancelIcon}))}case 2:return o().createElement(f.Z,{size:20});default:return null}};j.propTypes={link:i().string,filename:i().string,onUpload:i().func,onError:i().func,onCancel:i().func,supportedFileTypes:i().arrayOf(i().string),isValidLink:i().bool};const S=j,T=(0,h.Z)({editor:{alignSelf:"center"}}),w=e=>{let{value:t,onChange:n,onError:l,className:u}=e;const{downloadLink:i,filename:c,expirationDate:p}=t||{},f=p>=Date.now(),d=(0,r.useCallback)((e=>(0,s.AJo)(e).then((t=>{let{path:r,downloadLink:o,expirationDate:l}=t;n({filename:e.name,downloadLink:o,link:r,expirationDate:new Date(l).getTime()})}))),[n]),b=(0,r.useCallback)((()=>n(null)),[n]),g=T();return o().createElement("div",{className:a()(g.editor,u)},o().createElement(S,{isValidLink:f,link:i,filename:c,supportedFileTypes:[".txt",".csv"],onUpload:d,onError:l,onCancel:b}))}},19855:(e,t,n)=>{n.d(t,{Z:()=>y});var r=n(9462),o=n(13980),l=n.n(o),a=n(24328),s=n.n(a),u=n(43371),i=n(53862),c=n(8813);function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){f(e,t,n[t])}))}return e}function f(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function d(){return d=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},d.apply(this,arguments)}function b(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}const g=e=>{let{inputRef:t,onChange:n,integer:o,customInput:l,format:a}=e,u=b(e,["inputRef","onChange","integer","customInput","format"]);return s().createElement(r.Z,d({},u,a,{getInputRef:t,isNumericString:!0,onValueChange:e=>{n({target:{value:e.value}})},decimalScale:o?0:void 0,customInput:l}))};g.propTypes={inputRef:l().func.isRequired,onChange:l().func.isRequired,integer:l().bool,customInput:l().elementType,format:i.B3};const m=e=>{let{integer:t,format:n,inputProps:r,InputProps:o}=e,l=b(e,["integer","format","inputProps","InputProps"]);return s().createElement(u.Z,d({},l,{inputProps:p({integer:t,format:n},r),InputProps:p({},o,{inputComponent:g}),getValueLabel:(0,c.ufS)(n)}))};m.propTypes={multiple:l().bool,integer:l().bool,format:i.B3,inputProps:l().object,InputProps:l().object,value:l().oneOfType([l().string,l().arrayOf(l().string),l().number,l().arrayOf(l().number)]),onChange:l().func};const y=m},43371:(e,t,n)=>{n.d(t,{Z:()=>m});var r=n(13980),o=n.n(r),l=n(24328),a=n.n(l),s=n(16482),u=n(17440),i=n(79573),c=n(86619);function p(){return p=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},p.apply(this,arguments)}const f=e=>{let{value:t,onChange:n=i.ZT,multiline:r}=e,o=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["value","onChange","multiline"]);const[s,f]=(0,l.useState)("");(0,l.useEffect)((()=>{f((0,u.isNil)(t)?"":t)}),[t]);const d=()=>{s!==t&&n(s)};return a().createElement(c.Z,p({},o,{multiline:r,value:s,onKeyPress:(0,u.when)((0,u.propEq)("key","Enter"),(()=>{r||d()})),onBlur:d,onChange:(0,u.pipe)(i.NA,f)}))};f.propTypes={value:o().oneOfType([o().string,o().number]),onChange:o().func,multiline:o().bool,InputProps:o().object,className:o().string};const d=f;function b(){return b=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},b.apply(this,arguments)}const g=e=>{let{multiple:t,value:n,getValueLabel:r,multiline:o}=e,l=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["multiple","value","getValueLabel","multiline"]);return t?a().createElement(s.Z,b({},l,{values:n,getValueLabel:r})):a().createElement(d,b({},l,{value:n,multiline:o}))};g.propTypes={multiple:o().bool,multiline:o().bool,value:o().oneOfType([o().string,o().arrayOf(o().string),o().number,o().arrayOf(o().number)]),getValueLabel:o().func};const m=g},7766:(e,t,n)=>{n.d(t,{Z:()=>C});var r=n(20359),o=n.n(r),l=n(18726),a=n(71153),s=n.n(a),u=n(86619),i=n(12231),c=n(27556),p=n(7421),f=n(13980),d=n.n(f),b=n(24328),g=n.n(b),m=n(6216),y=n(17440),O=n(8813),h=n(79573);const v=(0,n(79692).Z)({"typeahead__suggestions-placeholder":{padding:"8px 16px",textAlign:"center"},"typeahead__suggestions-container--open":{maxHeight:"230px",overflowY:"auto"},"typeahead__suggestions-list":{margin:0,padding:0,listStyleType:"none"},"typeahead__suggestions-menuItem":{color:"rgba(0,0,0,0.87)",fontSize:"14px"},input__root:{color:"rgba(0,0,0,0.87)",fontSize:"14px"},autosizeInput:{width:"auto",paddingTop:"10px",paddingBottom:"11px",marginLeft:"5px",overflow:"hidden","& input":{background:"0px center",border:0,fontSize:"inherit",outline:0,padding:0,color:"inherit"}},rawInput:{height:"19px"},"multiple-input__root":{flexWrap:"wrap",color:"rgba(0,0,0,0.87)",fontSize:"14px"},"multiple-input__input":{flex:"1 0 25px",flexWrap:"wrap"},"multiple-input__adornedStart":{paddingLeft:"8px"},input__underline:{"&:before":{display:"none"}},"typeahead__suggestions-container":{width:"100%"},"menuItem--item":{overflow:"hidden",textOverflow:"ellipsis",display:"block"}});var E=n(83088),P=n(49898);function j(){return j=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},j.apply(this,arguments)}function S(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){T(e,t,n[t])}))}return e}function T(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function w(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}const k=e=>{let{value:t,getSuggestions:n,onChange:r,multiple:a,fullWidth:f,InputProps:d={}}=e,T=w(e,["value","getSuggestions","onChange","multiple","fullWidth","InputProps"]);const[k,C]=(0,b.useState)([]),[x,_]=(0,b.useState)(!1),I=(0,b.useRef)(),L=v(),Z=(0,y.pipe)((0,y.prop)("value"),y.trim,n,(0,y.andThen)((0,y.pipe)((0,y.tap)(C),(0,y.both)(y.isEmpty,(()=>{var e;return(null===(e=I.current)||void 0===e?void 0:e.querySelector("input"))===document.activeElement})),_))),N=(0,b.useCallback)((0,O.DsO)(Z,300),[n]);t=(0,y.defaultTo)(a?[]:"",t);const[D,R]=(0,b.useState)(""),[Y,V]=(0,b.useState)(!1),A=e=>{let{newValue:n,method:o}=e;switch(o){case"type":a&&R(n);break;case"escape":a?R(n):r(n);break;case"click":case"enter":a?(R(""),n&&r((0,y.uniq)([...t,n]))):r(n)}};return g().createElement(o(),{suggestions:k,shouldRenderSuggestions:y.T,inputProps:S({value:a?D:t,onChange:(0,y.pipe)((0,y.nthArg)(1),A),onKeyDown:e=>{13===e.keyCode&&a&&!Y&&A({method:"enter",newValue:D})},fullWidth:f},T,{autoComplete:"nope"}),getSuggestionValue:y.identity,onSuggestionsFetchRequested:(0,y.ifElse)((0,y.propEq)("reason","input-changed"),N,Z),onSuggestionsClearRequested:(0,y.pipe)((0,y.always)([]),C,y.F,_),renderInputComponent:e=>{let{ref:n,onChange:o}=e,i=w(e,["ref","onChange"]);const c={underline:s()({[L.input__underline]:(0,O.O27)(t)}),input:s()(L.rawInput,(0,y.path)(["classes","input"],d))};return a?g().createElement(u.Z,j({},i,{ref:I,inputRef:n,InputProps:S({},d,{startAdornment:t.map(((e,n)=>g().createElement(P.Z,{key:e,label:e,onDelete:()=>r((0,y.remove)(n,1,t))}))),inputComponent:l.Z,classes:S({root:s()(L["multiple-input__input"],(0,y.path)(["classes","root"],d))},c,{input:s()(L.autosizeInput,c.input),adornedStart:L["multiple-input__adornedStart"]})}),value:D,onChange:o,classes:{root:L["multiple-input__root"]}})):g().createElement(u.Z,j({},i,{ref:I,inputRef:n,value:t,onChange:(0,y.pipe)((0,y.tap)(o),h.NA,r),InputProps:S({},d,{classes:S({root:s()(L.input__root,(0,y.path)(["classes","root"],d))},c)})}))},renderSuggestionsContainer:e=>{let{children:t,containerProps:{ref:n}}=e,r=w(e.containerProps,["ref"]);return g().createElement(p.Z,{anchorEl:I.current,open:Boolean(t)||x},g().createElement(c.Z,j({ref:n,square:!0},r,{style:{width:(0,y.prop)("clientWidth",I.current)}}),t||g().createElement(m.X,{className:L["typeahead__suggestions-placeholder"]})))},renderSuggestion:(e,t)=>{let{isHighlighted:n}=t;return g().createElement(i.Z,{className:L["typeahead__suggestions-menuItem"],selected:n,component:"div"},g().createElement(E.C,{value:e},g().createElement("div",{className:L["menuItem--item"]},e)))},theme:{container:f?L["typeahead__suggestions-container"]:"",suggestionsList:L["typeahead__suggestions-list"],suggestionsContainerOpen:L["typeahead__suggestions-container--open"]},onSuggestionHighlighted:(0,y.pipe)((0,y.prop)("suggestion"),Boolean,V)})};k.propTypes={multiple:d().bool,fullWidth:d().bool,placeholder:d().string,value:d().oneOfType([d().string,d().arrayOf(d().string)]),onChange:d().func.isRequired,getSuggestions:d().func.isRequired,InputProps:d().object};const C=k},92145:(e,t,n)=>{n.d(t,{Z:()=>p});var r=n(24328),o=n.n(r),l=n(13980),a=n.n(l),s=n(17440),u=n(49898),i=n(49166);const c=e=>{const{children:t,data:n,removeProps:r}=e;return o().createElement(u.Z,{tabIndex:-1,label:t,count:(0,s.prop)("formattedNumber",n),onDelete:r.onClick,deleteIcon:o().createElement(i.Z,e.removeProps)})};c.propTypes={children:a().node,data:a().shape({value:a().string,label:a().string,number:a().number}).isRequired,removeProps:a().shape({onClick:a().func.isRequired,onMouseDown:a().func.isRequired,onTouchEnd:a().func.isRequired}).isRequired};const p=c},53862:(e,t,n)=>{n.d(t,{B3:()=>a,W6:()=>s,vG:()=>u,Z1:()=>i,hy:()=>c,nI:()=>p,Dq:()=>f,uz:()=>g,eB:()=>m,Xw:()=>y});var r=n(13980),o=n.n(r),l=n(8813);const a=o().shape({prefix:o().string,suffix:o().string,thousandSeparator:o().string,decimalSeparator:o().string}),s=o().oneOfType([o().string,o().number,o().object]),u=o().shape({value:s.isRequired,label:o().string}),i=o().shape({label:o().string.isRequired,values:o().arrayOf(o().object).isRequired}),c=o().shape({id:o().string,label:o().string,dataTypeDefinition:o().object,resizable:o().bool,sortable:o().bool,filterable:o().bool,headCellRenderer:o().func,rowCellValueRenderer:o().func,nestedPath:o().arrayOf(o().string)}),p=o().shape({field:o().string,order:l.ZHR}),f=o().shape({value:o().oneOfType([l.NMQ,o().arrayOf(l.NMQ)]),filter:o().string}),d=o().arrayOf(o().shape({id:o().string,label:o().string,dataTypeDefinition:o().object})),b=o().arrayOf(o().shape({id:o().string,label:o().string,columns:d})),g=o().oneOfType([d,b]),m=o().shape({title:o().string,pathToTitle:o().arrayOf(o().string),fieldName:o().string,entityTypeUri:o().string,attrType:l.EMD,uri:o().string,groupName:o().string}),y=o().shape({id:o().oneOfType([o().number,o().string]),values:o().array,data:m,filter:o().string,operator:o().string})},90690:(e,t,n)=>{n.d(t,{D:()=>o});var r=n(24328);const o=e=>{const t=(0,r.useRef)();return(0,r.useEffect)((()=>{t.current=e}),[e]),t.current}}}]);
|
package/1962.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[1962],{70595:(e,t,n)=>{var r=n(14859);t.Z=void 0;var a=r(n(24328)),o=(0,r(n(50175)).default)(a.default.createElement("path",{d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"}),"ArrowDownward");t.Z=o},91131:(e,t,n)=>{var r=n(14859);t.Z=void 0;var a=r(n(24328)),o=(0,r(n(50175)).default)(a.default.createElement(a.default.Fragment,null,a.default.createElement("path",{fill:"none",d:"M24 24H0V0h24v24z",opacity:".87"}),a.default.createElement("path",{d:"M7.38 21.01c.49.49 1.28.49 1.77 0l8.31-8.31c.39-.39.39-1.02 0-1.41L9.15 2.98c-.49-.49-1.28-.49-1.77 0s-.49 1.28 0 1.77L14.62 12l-7.25 7.25c-.48.48-.48 1.28.01 1.76z"})),"ArrowForwardIosRounded");t.Z=o},90324:(e,t,n)=>{var r=n(14859);t.Z=void 0;var a=r(n(24328)),o=(0,r(n(50175)).default)(a.default.createElement("path",{d:"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z"}),"ArrowUpward");t.Z=o},43576:(e,t,n)=>{var r=n(14859);t.Z=void 0;var a=r(n(24328)),o=(0,r(n(50175)).default)(a.default.createElement("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 00-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"}),"Create");t.Z=o},16715:(e,t,n)=>{var r=n(14859);t.Z=void 0;var a=r(n(24328)),o=(0,r(n(50175)).default)(a.default.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"}),"Error");t.Z=o},80147:(e,t,n)=>{var r=n(14859);t.Z=void 0;var a=r(n(24328)),o=(0,r(n(50175)).default)(a.default.createElement("path",{d:"M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9zm-1 5v5l4.28 2.54.72-1.21-3.5-2.08V8H12z"}),"History");t.Z=o},76569:(e,t,n)=>{var r=n(14859);t.Z=void 0;var a=r(n(24328)),o=(0,r(n(50175)).default)(a.default.createElement("path",{d:"M19 3H4.99c-1.11 0-1.98.89-1.98 2L3 19c0 1.1.88 2 1.99 2H19c1.1 0 2-.9 2-2V5c0-1.11-.9-2-2-2zm0 12h-4c0 1.66-1.35 3-3 3s-3-1.34-3-3H4.99V5H19v10z"}),"Inbox");t.Z=o},82726:(e,t,n)=>{var r=n(14859);t.Z=void 0;var a=r(n(24328)),o=(0,r(n(50175)).default)(a.default.createElement("path",{d:"M11 7h2v2h-2zm0 4h2v6h-2zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"}),"InfoOutlined");t.Z=o},86680:(e,t,n)=>{var r=n(14859);t.Z=void 0;var a=r(n(24328)),o=(0,r(n(50175)).default)(a.default.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 15c-.55 0-1-.45-1-1v-4c0-.55.45-1 1-1s1 .45 1 1v4c0 .55-.45 1-1 1zm1-8h-2V7h2v2z"}),"InfoRounded");t.Z=o},16208:(e,t,n)=>{var r=n(14859);t.Z=void 0;var a=r(n(24328)),o=(0,r(n(50175)).default)(a.default.createElement("path",{d:"M15 3H6c-.83 0-1.54.5-1.84 1.22l-3.02 7.05c-.09.23-.14.47-.14.73v2c0 1.1.9 2 2 2h6.31l-.95 4.57-.03.32c0 .41.17.79.44 1.06L9.83 23l6.59-6.59c.36-.36.58-.86.58-1.41V5c0-1.1-.9-2-2-2zm4 0v12h4V3h-4z"}),"ThumbDown");t.Z=o},52691:(e,t,n)=>{var r=n(14859);t.Z=void 0;var a=r(n(24328)),o=(0,r(n(50175)).default)(a.default.createElement("path",{d:"M1 21h4V9H1v12zm22-11c0-1.1-.9-2-2-2h-6.31l.95-4.57.03-.32c0-.41-.17-.79-.44-1.06L14.17 1 7.59 7.59C7.22 7.95 7 8.45 7 9v10c0 1.1.9 2 2 2h9c.83 0 1.54-.5 1.84-1.22l3.02-7.05c.09-.23.14-.47.14-.73v-2z"}),"ThumbUp");t.Z=o},39781:(e,t,n)=>{var r=n(14859);t.Z=void 0;var a=r(n(24328)),o=(0,r(n(50175)).default)(a.default.createElement("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"}),"Warning");t.Z=o},61962:(e,t,n)=>{n.d(t,{_:()=>To,t:()=>Go});var r=n(24328),a=n.n(r),o=n(52730),l=n(8598),i=n(17440),s=n(36138),c=n(44443),u=n(22664),p=n(12212),d=n(97333),m=n(8813);const g=a().createContext({getCurrentPerspectiveId:()=>"",setEntityUri:()=>{},showPerspective:()=>{}});var f=n(87918),h=n.n(f),b=n(3096),y=n.n(b),v=n(35674),E=n(11326),x=n(36852),w=n(58142),S=n(10),C=n(27938),P=n(35722),O=n(589),Z=n(80231),N=n(89575),k=n(14834),T=n(62228),R=n(87378),I=n(79002),j=n(17822),L=n(71153),D=n.n(L),M=n(15177);const A=a().createContext(null);A.displayName="SingleAttributeContext";var U=n(80687),z=n(1730),H=n(42011),V=n(95544),F=n(90436),W=n(52194),_=n(10742),B=n(55310),G=n(37457),q=n(46804),$=n(79784),Q=n(77277),X=n(36444),Y=n(5806),K=n(21324),J=n(79692);const ee=(0,J.Z)((()=>({triggerButton:{minWidth:0,color:"rgba(0,0,0,0.54)",width:"36px"},popupContent:{paddingTop:"19px",paddingBottom:"23px",paddingLeft:"23px",paddingRight:"23px",maxWidth:"180px",width:"40%"},checkboxControlRoot:{marginTop:"6px",marginLeft:"-12px"},checkboxControlLabel:{fontSize:"0.85rem"},checkboxControlCheckbox:{marginRight:"5px"}}))),te=e=>{let{className:t}=e;const n=ee(),o=(0,r.useRef)(),[l,i]=(0,r.useState)(!1),{showInactive:s,toggleShowInactive:c}=(0,r.useContext)(A),u=()=>i((e=>!e));return a().createElement(a().Fragment,null,a().createElement(Q.Z,{ref:o,classes:{root:D()(n.triggerButton,t)},onClick:u},a().createElement(X.Z,null)),a().createElement($.ZP,{open:l,classes:{paper:n.popupContent},anchorEl:o.current,onClose:u,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"}},a().createElement(Y.Z,{classes:{root:n.checkboxControlRoot,label:n.checkboxControlLabel},control:a().createElement(K.Z,{className:n.checkboxControlCheckbox,checked:s,onChange:e=>c(e.target.checked)}),label:h().text("Show inactive values")})))},ne=(0,J.Z)((()=>({root:{padding:"0 4px 0 16px"},totalCaption:{lineHeight:"19px",fontSize:"14px",letterSpacing:"0.24px",color:"rgba(0,0,0,0.6)",flexShrink:0,justifyContent:"flex-start",paddingTop:"16px",paddingBottom:"13px"},ovIcon:{marginTop:"2px",marginLeft:"5px"}}))),re=e=>{let{caption:t,totalVisibleValues:n,showInactiveValuesMenu:o}=e;const l=ne(),{searchQuery:i,setSearchQuery:s,setPage:c,totalNonVisibleValues:u,nonVisibleValues:p,attributeType:d}=(0,r.useContext)(A);return a().createElement(W.Z,{title:h().text(t),className:l.root},a().createElement(_.Z,{widthToHide:500},a().createElement(B.Z,{height:24,margin:16}),a().createElement(F.Z,{className:l.totalCaption,variant:"caption"},h().number(n)," ",1===n?h().text("item"):h().text("items"))),a().createElement(G.Z,{nonOvTotal:u,className:l.ovIcon,nonOvValues:p,attributeType:d}),a().createElement(q.i,{query:i,onChange:e=>{s(e),c(0)}}),o&&a().createElement(te,null))};var ae=n(65549),oe=n(85256),le=n(63928),ie=n(55401),se=n(30410);const ce=(0,J.Z)((e=>({moreButton:{padding:"9px 16px 9px 12px",backgroundColor:"rgba(98, 2, 238, 0)",marginBottom:"4px"},buttonLabel:{fontSize:"14px",fontWeight:500,lineHeight:"16px"},icon:{fontSize:"18px",marginRight:"8px"},divider:{margin:"0 -16px 8px",backgroundColor:"rgba(0,0,0,0.12)"},ovFalse:e.inactive}))),ue=m.nIW,pe=(e,t)=>"object"==typeof e?Object.values(e).some((e=>e.some((e=>{let{value:n}=e;return pe(n,t)})))):m.P6Y.strings.search(String(e),t),de=async e=>{let{metadata:t,entity:n,attributeTypeUri:r,defaultMaxValues:a=1/0,offset:o=0,searchQuery:l=""}=e;const s=(0,i.pipe)(m.XtP,(0,i.filter)((e=>{let{value:t}=e;return pe(t,l)})))(t,n,r),c=(0,i.filter)(m.OXP,s);return{[(0,m.xy8)(r)]:{[ue(r)]:c.slice(o,o+a),paging:{[r]:{totalOvValues:c.length,totalValues:s.length}}}}};function me(){return me=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},me.apply(this,arguments)}function ge(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){fe(e,t,n[t])}))}return e}function fe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const he=[],be=e=>{let{values:t,attributeType:n,parentUri:l,showInactive:s}=e;const c=ce(),{uri:u,required:d,cardinality:g,name:f}=n,b=(0,o.useDispatch)(),y=(0,r.useContext)(p.m),E=(0,o.useSelector)(v.ZP.selectors.getEntity),x=(0,o.useSelector)((e=>v.ZP.selectors.getModifiedEntity(e,E.uri)||{})),w=(0,o.useSelector)((e=>v.ZP.selectors.getActiveErrorsForAttributesPager(e,l,n))),S=(0,o.useSelector)((e=>(0,m.tQX)(l,n,v.ZP.selectors.getProfileErrors(e)))),C=(0,o.useSelector)(v.ZP.selectors.getMode),P=(0,m.xy8)(n),O=(0,i.pipe)((0,i.pathOr)(he,[P,f]),(0,i.map)((0,i.prop)("uri")))(E),Z=(0,i.pathOr)(he,[P,f],x),N=Z.map((0,i.prop)("uri")),k=(0,m.ZiX)(E.uri),T=(0,r.useRef)((0,m.gjI)({parentUri:l,attributeType:n})),R=(0,m.O27)(Z),I=d&&R,j=I?[T.current]:Z.filter((0,i.pipe)((0,i.prop)("uri"),m.ZiX)),L=(0,r.useCallback)((e=>(0,i.pipe)(v.N5.actions.addAttributes,b)(e.map((e=>ge({},e,{viewId:y}))))),[y,b]),M=(0,r.useCallback)((e=>(0,i.pipe)(v.N5.actions.modifyAttribute,b)(ge({},e,{viewId:y}))),[y,b]),A=(0,r.useCallback)((e=>(0,i.pipe)(v.N5.actions.removeAttribute,b)(ge({},e,{viewId:y}))),[y,b]),U=(0,r.useCallback)((0,i.pipe)(v.N5.errors.actions.errorDeactivated,b),[b]),z=(0,r.useCallback)((()=>{const e={parentUri:l,attributeType:n};return L(I&&!(0,m.YkM)(n.type)?[e,e]:[e])}),[L,l,n,I]),H=(0,m.Vg3)({attributeType:n,mode:C}),V={attributeType:n,errors:w,crosswalks:x.crosswalks,mode:C,onAddAttributes:L,onChangeAttribute:M,onDeactivateError:U,showNonOv:s};return a().createElement("div",null,a().createElement(le.Z,{cardinality:g}),a().createElement(ie.Z,{message:S}),H&&a().createElement(Q.Z,{color:"primary",onClick:z,className:c.moreButton},a().createElement(ae.Z,{classes:{root:c.icon}}),a().createElement("div",{className:c.buttonLabel},h().text("Add"))),j.map(((e,t)=>a().createElement(se.Z,me({key:e.uri},V,{attributeValue:e,lazy:I&&!d,showEmptyEditors:k,ownError:(0,m.ADq)(e,t,u,w),onDeleteAttribute:A})))),j.length>0&&t.length>0&&a().createElement(oe.Z,{className:c.divider}),t.map((e=>{const t=Z.find((0,i.propEq)("uri",e.uri)),n=t||e,r=O.includes(n.uri)&&!N.includes(n.uri),o=!r&&t&&!((e,t)=>{const n=(0,i.is)(Object,e.value)||(0,i.is)(Object,t.value)?(0,i.over)((0,i.lensPath)(["value"]),(0,m.vKJ)({valueTransformer:(0,i.unless)(m.OXP,(0,i.omit)(["value"])),deleteEmptyComplex:!0})):i.identity;return(0,i.equals)(n(e),n(t))})(t,e),l=(0,i.cond)([[(0,i.always)(r),(0,i.always)("deleted")],[(0,i.always)(o),(0,i.always)("edited")]])();return a().createElement("div",{key:n.uri,className:D()({[c.ovFalse]:!(0,m.OXP)(n)})},a().createElement(se.Z,me({},V,{attributeValue:n,ownError:(0,m.ADq)(n,null,u,w),onDeleteAttribute:A,state:l})))})))};var ye=n(11013);const ve=(0,J.Z)((e=>({ovFalse:e.inactive}))),Ee=e=>{let{values:t,attributeType:n,showInactive:r}=e;const o=ve();return a().createElement(a().Fragment,null,t.map((e=>a().createElement("div",{key:e.uri,className:D()({[o.ovFalse]:!(0,m.OXP)(e)})},a().createElement(ye.Z,{attributeValue:e,attributeType:n,showNonOv:r})))))},xe=(0,J.Z)((()=>({root:{display:"flex",flexDirection:"column"},content:{position:"relative",padding:"4px 16px 9px",overflow:"auto",flexGrow:1},noData:{fontSize:"13px",color:"rgba(0,0,0,0.54)"},pagination:{flexGrow:0,flexShrink:0}}))),we=e=>{let{config:t,className:n}=e;const{caption:l,max:i,showInactiveValuesMenu:s}=t,c=xe(),{values:u,totalVisibleValues:p,page:d,setPage:m,isLoading:g,hasPaging:f,attributeType:b,showInactive:y}=(0,r.useContext)(A),E=(0,o.useSelector)(v.ZP.selectors.getEntityUri),x=(0,o.useSelector)(v.ZP.selectors.getIsViewMode),w=(0,o.useSelector)(v.ZP.selectors.getIsEditableMode),S=(0,o.useSelector)(v.ZP.selectors.getPivotingAttributes),C=0!==u.length;return a().createElement(U.J.Provider,{value:S},a().createElement(z.Z,{className:D()(c.root,n)},a().createElement(re,{totalVisibleValues:p,caption:l,showInactiveValuesMenu:s}),a().createElement(V.Z,{className:c.content},(()=>{if(g)return a().createElement(R.Z,null);if(b){if(x&&C){const e={values:u,attributeType:b,showInactive:y};return a().createElement(Ee,e)}if(w){const e={values:u,attributeType:b,parentUri:E,showInactive:y};return a().createElement(be,e)}}return a().createElement(F.Z,{className:c.noData},h().text("No data"))})()),f&&a().createElement(H.Z,{count:p,page:d,rowsPerPage:i,rowsPerPageOptions:[],onChangePage:m,classes:{root:c.pagination}})))};var Se=n(29627),Ce=n(55962);function Pe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Oe=(e,t,n)=>{const{attributeUri:a,max:l=15}=e,s=(0,o.useSelector)(v.ZP.selectors.getMetadata),[c,u]=(0,r.useState)([]),[p,d]=(0,r.useState)(null),[g,f]=(0,r.useState)(!1),h=(0,Se._)(),b=(0,r.useRef)(null),y=(0,o.useDispatch)(),E=(0,o.useSelector)(v.ZP.selectors.getApiPath),x=(0,o.useSelector)(v.ZP.selectors.getTenant),w=n?v.ZP.selectors.getEntityWithDiff:v.ZP.selectors.getEntityWithoutDiff,S=(0,o.useSelector)(w),C=(0,o.useSelector)(v.ZP.selectors.getIsViewMode),P=(0,o.useSelector)(v.ZP.selectors.getIsHistoryModeEnabled),O=(0,o.useSelector)(v.ZP.selectors.getHistoryDiff),Z=S.uri,N=ue(a),k=(0,m.xy8)(a);b.current=(0,m.JQy)(S,Z,N);const T=(0,r.useMemo)((()=>(0,m.zeJ)(s,a)),[s,a]),{globalFilter:R}=(0,o.useSelector)(v.ZP.selectors.getGlobalSearchRequestOptions),{showInactive:I}=t,j=(0,r.useCallback)((()=>{if(T&&(0,m.Uty)(T)&&!(0,m.ZiX)(Z)&&(0,m.YOQ)(a)){f(!0);const{page:e,showInactive:n}=t,r=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(t,["page","showInactive"]),o=(0,m.biM)(S)||P?de:m.KbL;h(o(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Pe(e,t,n[t])}))}return e}({metadata:s,entity:S,apiPath:E,tenant:x,parentUri:Z,defaultMaxValues:l,attributeTypeUri:a,offset:l*e,globalFilter:R,options:n?"":void 0},r))).then((e=>{const t=(0,i.path)([k],e),n=(0,i.pathOr)([],[N],t);P||y(v.N5.actions.processNextPageOfAttributeValues({parentUri:Z,attributeTypeUri:a,attributeTypeName:N,values:n})),u(n.map((e=>{var t;return(null===(t=b.current)||void 0===t?void 0:t.find((0,i.propEq)("uri",e.uri)))||e}))),d((0,i.path)(["paging",a],t))})).finally((()=>{f(!1)}))}else u([]),d(null)}),[E,Z,x,a,l,s,t,R,T,P,O]);(0,r.useEffect)((()=>{j()}),[j]),(0,Ce.D)((()=>{C&&j()}),[C]);const L=(0,i.partition)(m.OXP),[,D]=L(b.current||[]),M=I?[]:D,A=I?"totalValues":"totalOvValues",U=(0,i.ifElse)((0,i.has)(A),(0,i.prop)(A),(0,i.always)(c.length))(p),z=l<U,H=null!=p&&p.totalValues?p.totalValues-U:M.length;return{values:c,isLoading:g,hasPaging:z,totalVisibleValues:U,attributeType:T,totalNonVisibleValues:H,nonVisibleValues:M}};function Ze(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ne=n(80225),ke=n(63929),Te=n(1128),Re=n(39475),Ie=n(90324),je=n(70595);const Le=a().createContext(null);Le.displayName="RelationsViewStateContext";const De=(0,J.Z)((e=>({button:{color:e.palette.text.secondary,width:"36px",minWidth:"36px"},popupContent:{padding:"19px 23px"},checkboxControlLabel:{fontSize:"0.85rem"},checkboxControlCheckbox:{marginRight:"5px"},divider:{backgroundColor:"rgba(0,0,0,0.1)",margin:"19px -23px"},title:{marginBottom:"30px"},sortControls:{display:"flex",alignItems:"center"},sortSelectorRoot:{flex:1,padding:"13px 16px",fontSize:"0.85rem"},sortSelectorMenuItem:{fontSize:"0.85rem"},sortOrderButton:{flexShrink:0,margin:"0 8px 0 7px"}}))),Me=e=>{let{className:t}=e;const n=De(),o=(0,r.useRef)(),{showInactive:l,toggleShowInactive:i,sortOrder:s,toggleSortOrder:c,sortOption:u,changeSortOption:p,sortOptions:d}=(0,r.useContext)(Le),[g,f]=(0,r.useState)(!1),b=()=>f((e=>!e)),y=!(0,m.O27)(d),v="asc"===s;return a().createElement(a().Fragment,null,a().createElement(Q.Z,{ref:o,classes:{root:D()(n.button,t)},onClick:b},a().createElement(X.Z,null)),a().createElement($.ZP,{open:g,classes:{paper:n.popupContent},anchorEl:o.current,onClose:b,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"}},a().createElement(Y.Z,{classes:{label:n.checkboxControlLabel},control:a().createElement(K.Z,{className:n.checkboxControlCheckbox,checked:l||!1,onChange:i}),label:h().text("Show inactive Relationships")}),y&&a().createElement(a().Fragment,null,a().createElement(oe.Z,{className:n.divider}),a().createElement(F.Z,{className:n.title,variant:"h6"},h().text("Sort by")),a().createElement("div",{className:n.sortControls},a().createElement(Te.Z,{entries:d,TextFieldProps:{variant:"filled"},classes:{root:n.sortSelectorRoot,menuItem:n.sortSelectorMenuItem},fullWidth:!0,disableUnderline:!0,value:u,onChange:p,MenuProps:{getContentAnchorEl:null,anchorOrigin:{vertical:"bottom",horizontal:"left"}}}),a().createElement(Re.k,{tooltipTitle:v?h().text("Ascending"):h().text("Descending"),icon:v?Ie.Z:je.Z,onClick:c,className:n.sortOrderButton,size:"L"})))))};Me.displayName="FilterButton";const Ae=Me,Ue=(0,J.Z)({header:{padding:"0 6px 0 16px"},totalCaption:{lineHeight:"19px",fontSize:"14px",letterSpacing:"0.24px",color:"rgba(0,0,0,0.6)",flexShrink:0,marginRight:"5px",justifyContent:"flex-start",paddingTop:"16px",paddingBottom:"13px"}});var ze=n(61932),He=n(98538);const Ve=a().createContext(null);function Fe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){We(e,t,n[t])}))}return e}function We(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const _e=Math.pow(2,31)-1,Be=(0,J.Z)((()=>({tenant:{backgroundColor:"#0000EE",cursor:"pointer",position:"absolute",top:"8px",left:"22px",width:"10px",height:"10px",color:"white",fontSize:"10px",fontWeight:"bold",userSelect:"text",zIndex:1,display:"flex",alignItems:"center",justifyContent:"center"},button:{position:"relative"},badge:{fontSize:"10px",height:"14px",minWidth:"14px",width:"14px",fontWeight:"bold",backgroundColor:"#FF4081",color:"#FFF"},badgePosition:{right:"5px",top:"4px"}})));var Ge=n(22118),qe=n(26739);const $e=e=>{let{label:t}=e;const n=Be();return a().createElement(qe.Z,{classes:{anchorOriginTopRightRectangle:n.badgePosition,badge:n.badge},badgeContent:t},a().createElement(ze.Z,null))},Qe=()=>{const{tenants:e,selectedTenant:t,onConfirmImport:n,onCancelConfirmation:l,onImportClick:i}=(()=>{var e;const t=(0,o.useSelector)(v.ZP.selectors.getDataTenants),n=(0,o.useDispatch)(),{config:a,reloadRelations:l}=(0,r.useContext)(Ve),i=(0,o.useSelector)(v.ZP.selectors.getEntityUri),[s,c]=(0,r.useState)([]),[u,p]=(0,r.useState)(null),d=(0,o.useSelector)(v.ZP.selectors.getDtssPath),g=(0,o.useSelector)(v.ZP.selectors.getTenant),f=[Fe({},a.content,{offset:0,max:null!==(e=a.maxDtssImport)&&void 0!==e?e:_e})],b=(0,r.useCallback)((()=>{c([]),a.importFromDT&&!(0,m.ZiX)(i)&&Promise.all((t||[]).map((e=>(0,m.QXb)({entityUri:i,content:f,dtssPath:d,customerTenant:g,dataTenant:e.id}).then((t=>{let{hasNonImportedConnections:n}=t;return Fe({},e,{hasNonImportedConnections:n})}))))).then((e=>e.filter((e=>e.hasNonImportedConnections)))).then(c)}),[i,d,g,a,t]),y=(0,r.useCallback)((()=>{(0,m.MOC)({entityUri:i,content:f,dtssPath:d,customerTenant:g,dataTenant:u.id}).then((()=>{l(),b()})).catch((e=>n(v.ui.actions.errorSet((0,m.xU7)(e,h().text("Something went wrong")))))),p(null)}),[i,d,g,a,b,l,u,p]);(0,r.useEffect)((()=>{b()}),[b]);const E=(0,r.useCallback)((()=>p(null)),[]),x=(0,r.useCallback)((e=>p(e)),[]);return{tenants:s,selectedTenant:u,onConfirmImport:y,onCancelConfirmation:E,onImportClick:x}})(),s=Be(),c=1===e.length,u=c?0===e[0].label.indexOf("DT:")?e[0].label[3]:e[0].label[0]:e.length;return a().createElement(a().Fragment,null,!!e.length&&a().createElement(a().Fragment,null,c?a().createElement("div",{className:s.button},a().createElement(Re.k,{size:"L",icon:ze.Z,tooltipTitle:h().text("Import connections from ${label}",{label:e[0].label}),onClick:()=>i(e[0])}),a().createElement("div",{className:D()(s.tenant)},u)):a().createElement(He.Z,{menuId:"importDT-table-actions",buttonComponent:Re.k,buttonProps:{tooltipTitle:h().text("Import connections"),size:"L",icon:()=>a().createElement($e,{label:u})},menuItems:e.map((e=>({onClick:()=>{i(e)},text:e.label})))}),a().createElement(Ge.Z,{open:!!t,title:h().text("Confirmation"),content:h().text("Import connections from ${label}?",{label:null==t?void 0:t.label}),discardCaption:h().text("Cancel"),saveCaption:h().text("Import"),onDiscard:l,onSave:n})))},Xe=e=>{let{title:t,total:n}=e;const o=Ue(),{searchQuery:l,changeSearchQuery:i}=(0,r.useContext)(Le);return a().createElement(W.Z,{title:t||"",className:o.header},n>0&&a().createElement(_.Z,{widthToHide:400},a().createElement(B.Z,{height:24,margin:16}),a().createElement(F.Z,{className:o.totalCaption,variant:"caption"},n>1?h().text("${count} items",{count:n}):h().text("${count} item",{count:n}))),a().createElement(q.i,{query:l,onChange:i}),a().createElement(Qe,null),a().createElement(Ae,null))};var Ye=n(821),Ke=n(27604),Je=n(22983),et=n(42662),tt=n(18527),nt=n(4614),rt=n(80030);const at=(0,J.Z)((e=>({tooltip:e.tooltip,tooltipContent:{minWidth:"165px",padding:"4px 2px 2px"},label:{fontSize:"11px",lineHeight:"13px",fontWeight:500,margin:0,color:"white"},secondaryLabel:{color:"rgba(255, 255, 255, 0.7)",fontSize:"10px",marginTop:"4px",fontWeight:500,lineHeight:"11px"},progress:{marginTop:"4px",color:"#FFFFFF"}})));function ot(){return ot=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ot.apply(this,arguments)}const lt=e=>{let{label:t,entity:n,children:l}=e,s=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["label","entity","children"]);const c=at(),u=(0,Se._)(),p=(0,o.useSelector)(v.ZP.selectors.getTenant),d=(0,o.useSelector)(v.ZP.selectors.getDtssPath),[g,f]=(0,r.useState)(!1),[h,b]=(0,r.useState)(null);(0,r.useEffect)((()=>{b(null)}),[n]);const y=(0,r.useCallback)((()=>{if(null!=n&&n.entityUri&&(0,i.isNil)(h)){const e=(0,i.ifElse)(m.biM,(e=>(0,m.vTU)({entityUri:e.entityUri,dataTenant:e.dataTenant,customerTenant:p,dtssPath:d})),(e=>(0,m.XkT)(e.entityUri)));f(!0),u(e(n)).then((e=>{let{secondaryLabel:t}=e;b(t)})).finally((()=>{f(!1)}))}}),[d,n,p,u,h]),E=a().createElement("div",{className:c.tooltipContent},a().createElement("div",{className:c.label},t),g&&a().createElement(nt.Z,{size:16,classes:{colorPrimary:c.progress}}),h&&a().createElement("div",{className:c.secondaryLabel},h));return a().createElement(rt.ZP,ot({onOpen:y,title:E,disableFocusListener:!0,classes:{tooltip:c.tooltip}},s),l)},it=(e,t)=>{const{entity:n,relation:r}=e;return{entityType:(0,m.nt9)(t,null==n?void 0:n.entityType),entityLabel:(0,m.idV)(null==n?void 0:n.entityLabel),preparedUri:(0,m.wwR)({uri:null==n?void 0:n.entityUri,dataTenant:null==n?void 0:n.dataTenant}),relationLabel:(null==r?void 0:r.relationLabel)||(0,m.Lmx)(t,null==r?void 0:r.relationType)}},st=(0,J.Z)((()=>({container:{display:"flex"}})));function ct(){return ct=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ct.apply(this,arguments)}const ut=e=>{let{acceptRelation:t,ignoreRelation:n}=e,r=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["acceptRelation","ignoreRelation"]);const o=st();return a().createElement("div",{className:o.container},a().createElement(Q.Z,ct({onClick:t,variant:"text",color:"primary"},r,{style:{alignSelf:"center"}}),h().text("Accept")),a().createElement(Q.Z,ct({onClick:n,variant:"text",color:"primary"},r,{style:{alignSelf:"center"}}),h().text("Ignore")))},pt=(0,J.Z)((e=>({container:{display:"flex",flexDirection:"column",marginBottom:"2px"},row:{display:"flex",alignItems:"center",flexDirection:"row",minHeight:"24px",padding:"0 16px"},rowInactive:{background:e.inactiveBackground},entityAvatar:{height:"12px",width:"12px",fontSize:"11px",marginRight:"8px"},entityLabelContainer:{textDecoration:"none",cursor:"pointer",paddingRight:"8px"},entityLabel:{color:e.palette.primary.main,fontSize:"13px",letterSpacing:0,lineHeight:"15px"},relationLabel:{color:e.palette.text.secondary,fontSize:"13px",letterSpacing:0,lineHeight:"15px"},editButtonsContent:{marginLeft:"auto",flex:"0 0 40px"},editButtons:{padding:0},removed:{color:e.palette.text.secondary,textDecoration:"line-through"},editedLabel:{fontStyle:"italic",color:e.palette.text.secondary,margin:"0 5px"}}))),dt=(0,r.memo)((e=>{let{connection:t,metadata:n,showControls:o,onRemoveRelation:l,onEditRelation:i,onAcceptRelation:s,onIgnoreRelation:c,renderRelationArrowButton:u}=e;const p=pt(),{entity:d,relation:g}=t,f=(0,m.$qe)(t),b=(0,m.xr3)(t),y=(0,m.iJH)(t),{entityType:v,entityLabel:E,preparedUri:x,relationLabel:w}=it(t,n),S=(0,m.Fn9)(g)&&(0,m.Fn9)(d),{canRemove:C,canUpdate:P}=(e=>{let{metadata:t,mode:n,connection:r,onRemoveRelation:a,onEditRelation:o}=e;if((n===m.ARY.Editing||n===m.ARY.Suggesting)&&r){const{relation:{relationType:e}}=r,l=(0,m.$qe)(r),i=(0,m.V3K)(t,e);return{canRemove:a&&!l&&(0,m.Edd)(n,i),canUpdate:o&&!l&&(0,m.Z5t)(n,i)}}return{canRemove:!1,canUpdate:!1}})({mode:m.ARY.Editing,onRemoveRelation:l,onEditRelation:i,metadata:n,connection:t}),O=(0,r.useCallback)((()=>l(t.relation.relationUri)),[l,t]),Z=(0,r.useCallback)((()=>i(t)),[i,t]),N=(0,r.useCallback)((()=>{s(t)}),[s,t]),k=(0,r.useCallback)((()=>c(t)),[c,t]),T=(C||P)&&o&&!t.suggested?a().createElement(a().Fragment,null,P&&a().createElement(Re.k,{icon:Ke.Z,size:"XS",onClick:Z,tooltipTitle:h().text("Edit")}),C&&a().createElement(Re.k,{icon:Je.Z,size:"XS",onClick:O,tooltipTitle:h().text("Remove")})):void 0,R=t.suggested?a().createElement(ut,{acceptRelation:N,ignoreRelation:k,size:"small",disabled:y}):void 0,I=y?h().text("ignored"):h().text("edited");return a().createElement("div",{className:D()(p.container,{[p.rowInactive]:!S},{[p.removed]:f||y})},a().createElement("div",{className:p.row},u&&u(),a().createElement(et.Z,{className:p.entityAvatar,entityType:v}),a().createElement(tt.Z,{value:x,className:p.entityLabelContainer},a().createElement(lt,{label:E,entity:d},a().createElement("span",{className:p.entityLabel},E)),(b||y)&&a().createElement(F.Z,{variant:"caption",className:p.editedLabel},"(",I,")"),w&&a().createElement("span",{className:p.relationLabel},`, ${w}`)),a().createElement("div",{className:p.editButtonsContent},T),R))})),mt=(e,t)=>{const n=(e,t)=>(t?(0,m.VGB)(t):[]).map((t=>({type:t,direction:e===m.Nsj.IN?m.Nsj.IN:m.Nsj.OUT})));return n(m.Nsj.IN,e).concat(n(m.Nsj.OUT,t))[0]};function gt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ft=n(98989),ht=n(83543);const bt=(0,J.Z)({arrowIcon:{fontSize:"16px",marginRight:"6px"}}),yt=e=>{let{onClick:t,connection:n,config:r,showSecondLevel:o}=e;const l=bt(),{parentEntityUri:i}=n,{contentSecondLevel:s}=r,c={onClick:t,className:l.arrowIcon};return i||!s||(0,m.xvW)(n)?null:o?a().createElement(ht.Z,c):a().createElement(ft.Z,c)},vt=(0,J.Z)({row:{display:"flex",alignItems:"center",width:"100%"},secondLevelContent:{paddingLeft:"24px"}}),Et=e=>{let{config:t,connection:n,children:l}=e;const i=vt(),{showInactive:s}=(0,r.useContext)(Le),{connections:c,showSecondLevel:u,toggleShowSecondLevel:p,loadRelations:d,loading:g,total:f}=(e=>{let{config:t,connection:n,relationActivityFilter:a}=e;const l=(0,o.useDispatch)(),[i,s]=(0,r.useState)(!1),[c,u]=(0,r.useState)(!1),[p,d]=(0,r.useState)(0),{contentSecondLevel:g}=t,{entity:f}=n,h=(0,o.useSelector)((e=>v.ZP.selectors.getConnectionsWithDraftsByViewId(e,t.id,f.entityUri)))||[],{activityFilter:b}=(0,o.useSelector)(v.ZP.selectors.getGlobalSearchRequestOptions)||{},y=(0,r.useCallback)((()=>{const e=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){gt(e,t,n[t])}))}return e}({},g,{returnObjects:!0,returnDates:!0,activeness:{relation:a||m.Ng6.ALL,entity:b}});u(!0),(0,m.N6e)(f.entityUri,[e]).then((e=>{const{connections:n,total:r}=e[0];n&&l(v.N5.relations.actions.secondLevelRelationsLoaded({connections:n,parentEntityUri:f.entityUri,id:t.id})),d(r),u(!1)}))}),[t.id,g,l,f.entityUri,b,a]),E=(0,r.useCallback)((()=>{i||n.connections||y(),s((e=>!e))}),[y,n.connections,i]);return{connections:h,showSecondLevel:i,toggleShowSecondLevel:E,loadRelations:y,loading:c,total:p}})({config:t,connection:n,relationActivityFilter:s?m.Ng6.ALL:m.Ng6.ACTIVE_ONLY}),h=(0,r.useMemo)((()=>(0,m.Px$)(c)),[c]);return a().createElement(a().Fragment,null,l((()=>a().createElement(yt,{onClick:p,connection:n,config:t,showSecondLevel:u}))),u&&a().createElement(ke.X.Provider,{value:h},a().createElement("div",{className:i.secondLevelContent},a().createElement(Yt,{isLoading:g,config:t,loadRelations:d,connections:c,total:f,parentEntityUri:n.entity.entityUri}))))},xt=(0,J.Z)((e=>({moreButton:{padding:"9px 16px 9px 12px",backgroundColor:"rgba(98, 2, 238, 0)",marginBottom:"4px",marginLeft:"16px"},buttonLabel:{fontSize:"14px",fontWeight:500,lineHeight:"16px"},icon:{fontSize:"18px",marginRight:"8px"},divider:{margin:"0 0 8px",backgroundColor:"rgba(0,0,0,0.12)"},noData:{fontSize:"13px",color:e.palette.text.secondary,padding:"8px 16px"}}))),wt=e=>{let{className:t,connections:n=[],config:l,mode:s,noDataText:c,parentEntityUri:u}=e;const p=(0,o.useSelector)(v.ZP.selectors.getMetadata),d=(0,o.useSelector)((e=>v.ZP.selectors.getRelationToAddByViewId(e,l.id))),g=(0,o.useSelector)((e=>v.ZP.selectors.getRelationsToEditByViewId(e,l.id))),f=(0,o.useSelector)(v.ZP.selectors.getEntity),b=(0,o.useSelector)((e=>v.ZP.selectors.getCheckIfCanAddRelations(e,l.content))),y=(0,o.useDispatch)(),E=xt(),x=(0,r.useCallback)((()=>{const e=(0,m.vlo)({config:l,mode:s,metadata:p,parentEntityUri:u});(0,i.pipe)(v.N5.relations.actions.openRelationEditor(l.id),y)(e)}),[l,s,p,y,u]),w=(0,r.useCallback)((e=>{y(v.N5.relations.actions.closeRelationEditor(l.id,e)),y(v.N5.relations.actions.removeRelation(l.id,e));const t=n.find((t=>v.N5.relations.selectors.getRelationUriFromConnection(t)===e)),r=v.N5.relations.selectors.getEntityUriFromConnection(t);(0,m.ZiX)(r)&&y(v.N5.modifiedEntities.actions.entityDeleted(r))}),[l,n,y]),S=l.content,C=mt(S.inRelations,S.outRelations),P=(0,r.useCallback)((e=>{const t=(0,i.pipe)((0,i.omit)(["suggested"]),(0,i.evolve)({relation:{relationType:(0,i.always)(C.type),object:(0,i.evolve)({type:(0,i.always)(C.type),attributes:(0,i.always)(null)})}}))(e);y(v.N5.relations.actions.addRelation(l.id,t))}),[y,l,C]),O=(0,r.useCallback)((e=>{y(v.N5.relations.actions.ignoreRelation(l.id,{relationType:C.type,relationDirection:C.direction,entityUri:e.entity.entityUri,relationUri:e.relation.relationUri}))}),[y,l,C]),[Z,N]=(0,i.partition)(m.xvW,n),k=f&&b,T=0===Z.length&&0===N.length,R=e=>{var t,n;const r=g.find((t=>{var n,r;return(null==t||null===(n=t.relation)||void 0===n?void 0:n.relationUri)===(null==e||null===(r=e.relation)||void 0===r?void 0:r.relationUri)})),o=!l.allowOnlyCreateNew||(0,m.xvW)(e),c=`${null==e||null===(t=e.relation)||void 0===t?void 0:t.relationUri}-${null==e||null===(n=e.relation)||void 0===n?void 0:n.direction}`;return a().createElement(Et,{config:l,connection:e,key:c},(t=>r?a().createElement(Ye.Z,{connection:r,config:l,mode:s,metadata:p}):a().createElement(dt,{renderRelationArrowButton:t,connection:e,metadata:p,showControls:o,onRemoveRelation:w,onEditRelation:(0,i.pipe)(v.N5.relations.actions.openRelationEditor(l.id),y),onAcceptRelation:P,onIgnoreRelation:O})))},I=k&&(!d||d&&d.parentEntityUri===u),j=d&&d.parentEntityUri===u;return a().createElement("div",{className:t},I&&a().createElement(Q.Z,{color:"primary",onClick:x,className:E.moreButton},a().createElement(ae.Z,{classes:{root:E.icon}}),a().createElement("div",{className:E.buttonLabel},h().text("Add"))),j&&a().createElement(Ye.Z,{connection:d,config:l,mode:s,metadata:p}),Z.map(R),Z.length>0&&N.length>0&&a().createElement(oe.Z,{className:E.divider}),N.map(R),T&&a().createElement(F.Z,{className:E.noData},c))};var St=n(62901),Ct=n(72316),Pt=n(38309),Ot=n(89978);const Zt=(0,J.Z)((e=>({attributesList:{paddingLeft:"46px",paddingRight:"16px",marginBottom:"10px",color:e.palette.text.secondary,fontSize:"13px",letterSpacing:0}})));function Nt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){kt(e,t,n[t])}))}return e}function kt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Tt=e=>{let{connection:t,className:n}=e;const l=Zt(),{relation:s}=t,c=(0,o.useSelector)(v.ZP.selectors.getEntityUri),u=(0,o.useSelector)(v.ZP.selectors.getMetadata),p=(0,r.useMemo)((()=>(0,m.xF8)(u,null==s?void 0:s.relationType)),[null==s?void 0:s.relationType,u]),d=(0,r.useMemo)((()=>Nt({attributes:Nt({},v.N5.relations.selectors.getRelationAttributesFromConnection(t))},(0,m.p2l)((null==t?void 0:t.relation)||{}))),[t]),g=(0,r.useMemo)((()=>(0,m.fyF)(p,d)),[p,d]).filter((e=>{let{values:t}=e;return!(0,m.O27)(t)})).length>0,f=(0,r.useMemo)((()=>(0,m.R$r)(d.attributes)),[d]),{getCommentsCount:b}=(0,r.useContext)(w.h);(0,r.useEffect)((()=>{!(0,i.isEmpty)(f)&&b(f)}),[b,f]);const y=(0,r.useMemo)((()=>(0,m.wp9)(m.q7e.RELATION,{entityUri:c,connection:t})),[t,c]);return g?a().createElement(Pt.A.Provider,{value:y},a().createElement(Ot.Z,{className:D()(l.attributesList,n),entity:d,attrTypes:p})):a().createElement("div",{className:D()(l.attributesList,n)},h().text("No attributes"))};var Rt=n(86680),It=n(82726);const jt=e=>{let{show:t,onToggle:n,className:r}=e;return a().createElement(Re.k,{className:r,tooltipTitle:t?h().text("Hide attributes of the relationship"):h().text("Show attributes of the relationship"),tooltipPlacement:"bottom-end",size:"XXS",icon:t?Rt.Z:It.Z,onClick:n})},Lt=(0,J.Z)((e=>({container:{display:"flex",flexDirection:"column",paddingBottom:"2px"},row:{display:"flex",alignItems:"flex-start",flexDirection:"row",minHeight:"16px",padding:"3px 16px 0 "},rowInactive:{background:e.inactiveBackground},entityAvatar:{height:"12px",width:"12px",fontSize:"11px",marginRight:"8px"},entityLabelContainer:{textDecoration:"none",cursor:"pointer",paddingRight:"8px"},entityLabel:{color:e.palette.primary.main,fontSize:"13px",letterSpacing:0,lineHeight:"15px"},relationLabel:{color:e.palette.text.secondary,fontSize:"13px",letterSpacing:0,lineHeight:"15px"},showDetails:{marginLeft:"auto"},attributesList:{paddingLeft:"46px",marginBottom:"10px",color:e.palette.text.secondary,fontSize:"13px",letterSpacing:0},suggestedWrapper:{backgroundColor:e.suggested},commentsContainer:{marginLeft:"auto",alignItems:"center","& + $showDetails":{marginLeft:"4px"}},additionalButtonsWrapper:{marginLeft:"auto",display:"flex"},suggestedLabelWrapper:{marginTop:"6px"},labelWrapper:{display:"flex"}}))),Dt=(0,r.memo)((e=>{let{connection:t,renderRelationArrowButton:n,acceptRelation:l,ignoreRelation:s}=e;const c=Lt(),u=t.suggested,{entity:p,relation:d}=t,[g,f]=(0,r.useState)(!1),h=(0,o.useSelector)(v.ZP.selectors.getMetadata),{entityType:b,entityLabel:y,preparedUri:E,relationLabel:x}=it(t,h),w=(0,m.Fn9)(d)&&(0,m.Fn9)(p),S=(0,o.useSelector)(v.ZP.selectors.getEntityUri),C=p&&d&&(0,m.wp9)(m.q7e.RELATION,{entityUri:S,connection:t})||[];return a().createElement("div",{className:D()(c.container,{[c.rowInactive]:!w},{[c.suggestedWrapper]:u})},a().createElement("div",{className:D()(c.row,St.U)},n&&n(),a().createElement("div",{className:D()(c.labelWrapper,{[c.suggestedLabelWrapper]:u})},a().createElement(et.Z,{className:c.entityAvatar,entityType:b}),a().createElement(tt.Z,{value:E,className:c.entityLabelContainer},a().createElement(lt,{label:y,entity:p},a().createElement("span",{className:c.entityLabel},y)),x&&a().createElement("span",{className:c.relationLabel},`, ${x}`))),a().createElement("div",{className:c.additionalButtonsWrapper},!(0,i.isEmpty)(C)&&a().createElement(Ct.Z,{className:c.commentsContainer,uri:null==d?void 0:d.relationUri,relatedObjectUris:C,objectType:m.q7e.RELATION,allowOnlyOneComment:!0}),u&&a().createElement(ut,{size:"small",acceptRelation:l(t),ignoreRelation:s(t)}),!u&&a().createElement(jt,{show:g,onToggle:()=>{f((e=>!e))},className:c.showDetails}))),g&&a().createElement(Tt,{connection:t}))}));var Mt=n(52691),At=n(16208);const Ut=e=>e.filter((e=>5===e.value)).length,zt=e=>e.filter((e=>1===e.value)).length,Ht=e=>0===e.length?"0%":Ut(e)/e.length*100+"%",Vt=e=>0===e.length?"0%":zt(e)/e.length*100+"%",Ft=(0,J.Z)((e=>({wrapper:{display:"flex",flexDirection:"column",alignItems:"flex-end"},averageRating:{marginBottom:"7px",fontSize:"16px",letterSpacing:"0.15px",lineHeight:"19px",color:e.palette.text.primary},scale:{display:"flex",marginBottom:"6px",width:"128px",height:"4px"},likesScale:{height:"100%",backgroundColor:"#8CC152"},dislikesScale:{height:"100%",backgroundColor:"rgb(255, 112, 112)"},counts:{display:"flex"},likesCount:{marginRight:"32px"},count:{display:"flex",alignItems:"center",color:e.palette.text.secondary,fontSize:"13px",letterSpacing:0,lineHeight:"15px"},icon:{marginRight:"4px",width:"14px",height:"14px",color:"rgba(0,0,0,0.38)"}}))),Wt=e=>{let{ratings:t,className:n}=e;const r=Ft();return a().createElement("div",{className:D()(r.wrapper,n)},a().createElement(F.Z,{className:r.averageRating},(e=>(0,i.pipe)((0,i.pluck)("value"),i.mean,(0,i.defaultTo)(0))(e))(t).toFixed(1)),a().createElement("div",{className:r.scale},a().createElement("div",{className:r.likesScale,style:{width:Ht(t)}}),a().createElement("div",{className:r.dislikesScale,style:{width:Vt(t)}})),a().createElement("div",{className:r.counts},a().createElement("div",{className:D()(r.likesCount,r.count)},a().createElement(Mt.Z,{className:r.icon}),Ut(t)),a().createElement("div",{className:r.count},a().createElement(At.Z,{className:r.icon}),zt(t))))},_t=(0,J.Z)((e=>({wrapper:{display:"flex"},button:{fontSize:"14px",textTransform:"none",color:e.palette.text.secondary},likeButton:{marginLeft:"-12px",marginRight:"8px"},isActive:{color:e.palette.text.primary}}))),Bt=e=>{let{ratings:t,onAgree:n,onDisagree:r}=e;const l=_t(),i=(0,o.useSelector)(v.ZP.selectors.getUserName),s=t.find((e=>{let{user:t}=e;return t===i})),c=[{text:h().text("Has left the practice"),onClick:()=>r(h().text("Has left the practice"))},{text:h().text("Has moved away"),onClick:()=>r(h().text("Has moved away"))},{text:h().text("Has passed away"),onClick:()=>r(h().text("Has passed away"))},{text:h().text("Has retired"),onClick:()=>r(h().text("Has retired"))},{text:h().text("Other"),onClick:()=>r(h().text("Other"))}];return a().createElement("div",{className:l.wrapper},a().createElement(Q.Z,{onClick:n,variant:"text",size:"small",className:D()(l.button,l.likeButton,{[l.isActive]:5===(null==s?void 0:s.value)})},"Agree"),a().createElement(He.Z,{buttonProps:{endIcon:a().createElement(ht.Z,null),variant:"text",size:"small",className:D()(l.button,{[l.isActive]:1===(null==s?void 0:s.value)})},buttonContent:1===(null==s?void 0:s.value)?s.comment:"Disagree",menuItems:c,menuId:"disagree-dropdown-menu-button"}))},Gt=(0,J.Z)((e=>({wrapper:{padding:"6px 16px 3px"},entityTypeIcon:{marginRight:"16px"},entityLabel:{color:e.palette.primary.main,fontSize:"14px",letterSpacing:0,lineHeight:"16px"},entityLabelContainer:{textDecoration:"none"},relationLabel:{color:e.palette.text.secondary,fontSize:"13px",letterSpacing:0,lineHeight:"15px"},ratings:{marginLeft:"auto"},showDetailsButton:{marginLeft:"16px",marginTop:"18px"},relationAttributes:{paddingLeft:"60px"},suggestedWrapper:{padding:"6px 16px 3px",backgroundColor:e.suggested},commentsContainer:{marginTop:"21px","& + $ratings":{marginLeft:"16px"}},additionalButtonsWrapper:{marginLeft:"auto",display:"flex"}}))),qt=e=>{let{connection:t,loadRelations:n,renderRelationArrowButton:l,acceptRelation:s,ignoreRelation:c}=e;const u=Gt(),p=t.suggested,[d,g]=(0,r.useState)(!1),{entity:f,relation:h}=t,b=(0,o.useSelector)(v.ZP.selectors.getMetadata),{entityLabel:y,entityType:E,preparedUri:x,relationLabel:w}=it(t,b),S=(null==h?void 0:h.ratings)||[],C=(0,o.useSelector)(v.ZP.selectors.getEntityUri),P=f&&h&&(0,m.wp9)(m.q7e.RELATION,{entityUri:C,connection:t})||[];return a().createElement("div",{className:D()(u.wrapper,{[u.suggestedWrapper]:p})},a().createElement(V.Z,{display:"flex",minHeight:"62px",className:St.U},a().createElement(V.Z,{display:"flex",alignItems:"flex-start"},a().createElement(V.Z,{display:"flex",alignItems:"center"},l&&l(),a().createElement(et.Z,{entityType:E,className:u.entityTypeIcon})),a().createElement(V.Z,{display:"flex",flexDirection:"column"},a().createElement(tt.Z,{value:x,className:u.entityLabelContainer},a().createElement(lt,{label:y,entity:f},a().createElement("span",{className:u.entityLabel},y))),w&&a().createElement("span",{className:u.relationLabel},w),!p&&a().createElement(Bt,{ratings:S,onAgree:()=>{(0,m.Buf)(null==h?void 0:h.relationUri,{comment:"",value:5}).then(n)},onDisagree:e=>{(0,m.Buf)(null==h?void 0:h.relationUri,{comment:e,value:1}).then(n)}}))),a().createElement("div",{className:u.additionalButtonsWrapper},!(0,i.isEmpty)(P)&&a().createElement(Ct.Z,{className:u.commentsContainer,uri:null==h?void 0:h.relationUri,relatedObjectUris:P,objectType:m.q7e.RELATION,allowOnlyOneComment:!0}),p&&a().createElement(ut,{acceptRelation:s(t),ignoreRelation:c(t)}),!p&&a().createElement(a().Fragment,null,a().createElement(Wt,{ratings:S,className:u.ratings}),a().createElement(jt,{show:d,onToggle:()=>{g((e=>!e))},className:u.showDetailsButton})))),d&&a().createElement(Tt,{connection:t,className:u.relationAttributes}))},$t=e=>{let{className:t,connections:n=[],loadRelations:l,config:i,mainEnityUri:s}=e;const{isComplex:c,content:u}=i,{ignoreRelation:p,acceptRelation:d}=((e,t,n)=>{const r=mt(e.inRelations,e.outRelations),a=(0,o.useDispatch)();return{ignoreRelation:e=>()=>{const{entity:o}=e;(0,m.iiD)(n,{relatedEntityUri:o.entityUri,relationType:r.type,relationDirection:r.direction}).then(t).catch((e=>{a(v.ui.actions.errorSet((0,m.xU7)(e,h().text("Something went wrong"))))}))},acceptRelation:e=>()=>{const{entity:o,relation:l}=e,{startDate:i,endDate:s}=l,c=r.direction===m.Nsj.IN,u=c?o.entityUri:n,p=c?n:o.entityUri;(0,m.DsR)({startEntityUri:u,endEntityUri:p,relationType:r.type,attributes:null,startDate:i,endDate:s}).then(t).catch((e=>{a(v.ui.actions.errorSet((0,m.xU7)(e,h().text("Something went wrong"))))}))}}})(u,l,s),g=(0,r.useMemo)((()=>(0,m.w3p)(n)),[n]),{getCommentsCount:f}=(0,r.useContext)(w.h);return(0,r.useEffect)((()=>{f(g)}),[f,g]),a().createElement("div",{className:t},n.map((e=>{var t,n;const r=`${null==e||null===(t=e.relation)||void 0===t?void 0:t.relationUri}-${null==e||null===(n=e.relation)||void 0===n?void 0:n.direction}`;return a().createElement(Et,{config:i,connection:e,key:r},(t=>c?a().createElement(qt,{loadRelations:l,connection:e,acceptRelation:d,ignoreRelation:p,renderRelationArrowButton:t}):a().createElement(Dt,{acceptRelation:d,ignoreRelation:p,connection:e,renderRelationArrowButton:t})))})))};$t.displayName="RelationsList";const Qt=$t,Xt=(0,J.Z)((e=>({list:{paddingTop:"8px",paddingBottom:"10px",overflow:"auto",flexGrow:1},noData:{fontSize:"13px",color:e.palette.text.secondary,padding:"8px 16px"}}))),Yt=e=>{let{isLoading:t,config:n,loadRelations:r,connections:l,total:i,parentEntityUri:s}=e;const c=Xt(),{selectors:u}=v.ZP,p=(0,o.useSelector)(u.getEntity),d=(0,o.useSelector)(u.getMode),g=n["text-empty"]||h().text("No data found");return t?a().createElement(R.Z,null):(0,m.KIu)(d)?a().createElement(wt,{connections:l,className:c.list,key:null==p?void 0:p.uri,config:n,mode:d,noDataText:g,parentEntityUri:s}):i>0?a().createElement(Qt,{config:n,loadRelations:r,connections:l,className:c.list,key:null==p?void 0:p.uri,mainEnityUri:p.uri}):a().createElement(F.Z,{className:c.noData},g)},Kt=(0,J.Z)({container:{flexGrow:1,display:"flex",flexDirection:"column",minHeight:0},content:{position:"relative",display:"flex",flexGrow:1,flexDirection:"column",minHeight:0},pagination:{height:"52px",flexGrow:0,flexShrink:0}}),Jt=e=>{let{config:t,className:n}=e;const l=Kt(),{page:s,setPage:c,rowsPerPage:u,sortOrder:p,sortOption:d,showInactive:g,searchQuery:f,changeSearchQuery:h}=(0,r.useContext)(Le),{selectors:b}=v.ZP,y=(0,o.useSelector)((e=>b.getConnectionsWithDraftsByViewId(e,t.id))),E=(0,o.useSelector)(b.getEntity),x=(0,o.useSelector)((e=>b.getTotalByViewId(e,t.id))),w=(0,o.useSelector)(b.getMode),S=(0,r.useMemo)((()=>({order:p,field:d})),[p,d]);(0,r.useEffect)((()=>{h("")}),[null==E?void 0:E.uri]);const C=(0,r.useMemo)((()=>(e=>{const t=m.wSh.fromFalsy(e).map(m.zHo).map((e=>`containsWordStartingWith(entity.label,${e}) or containsWordStartingWith(relation.label,${e})`)).orSome("");return(new m.MEy).addClause(t).build()})(f)),[f]),{isLoading:P,reload:O}=(0,Ne.a)({sorting:S,filter:C,page:s,rowsPerPage:u,config:t,entity:E,relationActivityFilter:g?m.Ng6.ALL:m.Ng6.ACTIVE_ONLY,mode:w}),Z=(0,r.useMemo)((()=>(0,m.Px$)(y)),[y]),N=(0,r.useMemo)((()=>({reloadRelations:O,config:(0,i.pick)(["content","importFromDT","maxDtssImport"],t)})),[O,t]);return a().createElement(ke.X.Provider,{value:Z},a().createElement(z.Z,{className:n},a().createElement("div",{className:l.container},a().createElement(Ve.Provider,{value:N},a().createElement(Xe,{title:t.caption,total:x})),a().createElement("div",{className:l.content},a().createElement(Yt,{isLoading:P,config:t,loadRelations:O,connections:y,total:x}),x>u&&a().createElement(H.Z,{classes:{root:l.pagination},count:x,rowsPerPageOptions:[],rowsPerPage:u,page:s,onChangePage:c})))))};Jt.displayName="RelationsView";const en=a().createContext(null);en.displayName="SingleAttributeContext";var tn=n(17569),nn=n(75975),rn=n(79573);function an(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){on(e,t,n[t])}))}return e}function on(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const ln="CHANGE_SEARCH_QUERY",sn=an({},nn.ZP.actions,{changeSearchQuery:(0,rn.zD)(ln)}),cn=(e,t)=>t.type===ln?an({},e,{searchQuery:t.payload,page:0}):nn.ZP.reducer(e,t);var un=n(92332),pn=n(25843);const dn={textDecoration:"line-through",color:"rgba(0,0,0,.54)"},mn=(0,J.Z)((()=>({tableContainer:{height:"477px",display:"flex",fontFamily:"Roboto",color:"rgba(0,0,0,0.54)"},rowCell:{fontSize:"13px",overflow:"hidden"},"row-cell--sorted":{color:"rgba(0,0,0,0.87)"},"row-cell__buttons-container":{position:"absolute"},"row-cell__buttons-wrapper":{display:"flex",paddingLeft:"10px","& > button":{marginLeft:"-10px",transform:"scale(0.9)"}},headCell:{display:"flex",alignItems:"center",height:"100%",fontSize:"12px"},"row-cell--removed":{pointerEvents:"none","& > div":dn}}))),gn=(0,pn.Z)((e=>{const t=mn();return a().createElement("div",{className:t.headCell},a().createElement(un.default,e))}));var fn=n(46728);function hn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const bn=(0,i.pipe)((0,i.map)((e=>({id:(0,m.Tde)(e.uri),label:e.label,dataTypeDefinition:(0,m.PFL)(e)}))),(0,i.uniqBy)((0,i.prop)("id"))),yn=(0,i.pipe)(m.DK$,bn),vn=(0,i.pipe)((0,i.split)("."),(0,i.slice)(2,1/0)),En=e=>{if((0,m.vZp)(e)){const t=vn(e);return t.length>1?t.slice(0,-1):null}return null},xn=(0,i.map)((e=>function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){hn(e,t,n[t])}))}return e}({},e,{sortable:!0,resizable:!0,nestedPath:En(e.id),headCellRenderer:gn,rowCellValueRenderer:fn.Z})));var wn=n(9377);function Sn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Cn=n(47081),Pn=n(33903),On=n(54238);const Zn=(0,J.Z)((()=>({header:{padding:"0 4px 0 16px"}}))),Nn=e=>{let{title:t,searchQuery:n,onChangeSearchQuery:r,filtersEnabled:o,onToggleFilters:l,columnsData:i,selectedColumns:s,onChangeColumns:c}=e;const u=Zn();return a().createElement(W.Z,{title:t,className:u.header},a().createElement(q.i,{query:n,onChange:r}),a().createElement(Pn.Z,{enabled:o,onClick:l}),a().createElement(B.Z,{height:24,margin:4}),a().createElement(On.Z,{columnsData:i,selectedColumns:s,onChangeColumns:c}))};function kn(){return kn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},kn.apply(this,arguments)}const Tn=(0,n(30488).Z)(((e,t)=>{let{deletedUris:n}=e,{rowValue:{value:r}}=t;return{isRemoved:Boolean(n.find((e=>r.uri===e)))}}))((e=>{let{cell:t,CellValueRenderer:n,isRemoved:r,isSorted:o}=e,l=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["cell","CellValueRenderer","isRemoved","isSorted"]);const i=mn();return a().createElement("div",{className:D()({[i["row-cell--sorted"]]:o,[i["row-cell--removed"]]:r},i.rowCell)},t.values.map(((e,t)=>a().createElement(n,kn({key:t,value:e},l)))))}));var Rn=n(45108);const In=e=>{let{onEdit:t,onRemove:n}=e;return a().createElement(a().Fragment,null,t&&a().createElement(Re.k,{tooltipTitle:h().text("Edit"),icon:Ke.Z,size:"L",onClick:t}),n&&a().createElement(Re.k,{tooltipTitle:h().text("Remove"),icon:Je.Z,size:"L",onClick:n}))};function jn(){return jn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},jn.apply(this,arguments)}const Ln=e=>{let{columnsData:t,values:n,sorting:l,onSort:s,filters:c,onFilter:u,config:p,onEdit:d,onDeleteAttribute:g,deletedUris:f}=e;const h=(0,r.useMemo)((()=>((e,t)=>e.map((e=>(0,i.pipe)((0,i.reduce)(((t,n)=>{let{id:r}=n;return(0,i.assoc)(r,((e,t)=>((e,t)=>(0,i.pipe)((0,i.path)(["value"]),(0,m.tT_)(e))(t))(vn(e),t))(r,e),t)}),{}),(0,i.assoc)("value",e))(t))))(n,t)),[n,t]),b=(0,r.useMemo)((()=>xn(t)),[t]),y=mn(),E=(0,o.useSelector)(v.ZP.selectors.getMode),x=(0,m.KIu)(E),w=(0,o.useSelector)(v.ZP.selectors.getMetadata),S=(0,o.useSelector)(v.ZP.selectors.getEntityUri),C=(0,o.useSelector)((e=>v.ZP.selectors.getModifiedEntity(e,S)||{})),{attributeType:P}=(0,r.useContext)(en),O=(0,r.useCallback)((e=>a().createElement(Tn,jn({},e,{isSorted:!!l&&l.field===e.columnData.id}))),[l]),[Z,N]=(0,r.useState)(null),{canUpdate:k,canDelete:T}=(0,Cn.l)(),R=(0,r.useMemo)((()=>"number"!=typeof Z||!x||f.includes((0,i.pipe)((0,i.path)([Z]),(0,i.prop)("uri"))(n))),[Z,f,n,x]),I="number"==typeof Z&&(j=(0,i.path)([Z],n),T(p)&&(0,m.xv5)({attributeType:P,mode:E,attributeValue:j,metadata:w,isReltioCrosswalk:(0,m.KVV)(C.crosswalks,j)}));var j;const L="number"==typeof Z&&(e=>k(p)&&(0,m.yv0)({attributeType:P,mode:E,attributeValue:e,isReltioCrosswalk:(0,m.KVV)(C.crosswalks,e)}))((0,i.path)([Z],n)),D=(0,r.useCallback)((()=>{const e=(0,i.path)([Z],n);L&&d(e)}),[d,Z,n,L]),M=(0,r.useCallback)((()=>{const e=(0,i.path)([Z],n);if(!I)return;const t={parentUri:S,attributeType:P,uri:e.uri,value:e};g(t),N(null)}),[Z,n,g,I,P,S]),A=R||!I&&!L?void 0:a().createElement(In,{onEdit:L?D:void 0,onRemove:I?M:void 0}),U=(0,r.useMemo)((()=>({deletedUris:f})),[f]);return a().createElement("div",{className:y.tableContainer},a().createElement(Rn.Z,{columnsData:b,rowsData:h,sorting:l,onSort:s,filters:c,onFilter:u,hoverStateEnabled:!0,defaultColumnWidth:250,defaultColumnMinWidth:200,headRowHeight:56,renderRowCell:O,onRowHover:N,hoverRowIndex:Z,hoveredRowRightContent:A,context:U,classes:{hoveredRowRightContentWrapper:y["row-cell__buttons-wrapper"],hoveredRowRightContentContainer:y["row-cell__buttons-container"]}}))},Dn=(0,J.Z)((()=>({actionButtons:{display:"flex",justifyContent:"flex-end",margin:"0 8px 10px","& > button":{fontSize:"14px",lineHeight:"16px",marginLeft:"8px",padding:"10px 8px",backgroundColor:"rgba(98, 2, 238, 0)"}}})));function Mn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const An=e=>{let{onChangeAttribute:t,onCancel:n,onApply:l,onDeleteAttribute:s,hasChanges:c,attributeValue:u}=e;const d=Dn(),g=(0,o.useSelector)(v.ZP.selectors.getEntityUri),{attributeType:f}=(0,r.useContext)(en),b=(0,o.useSelector)((e=>v.ZP.selectors.getModifiedEntity(e,g)||{})),y=(0,o.useSelector)(v.ZP.selectors.getMode),E=(0,o.useDispatch)(),x=(0,r.useContext)(p.m),w=(0,r.useCallback)((e=>(0,i.pipe)(v.N5.actions.addAttributes,E)(e.map((e=>function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Mn(e,t,n[t])}))}return e}({},e,{viewId:x}))))),[x,E]),S=(0,m.ZiX)(g),C=(0,o.useSelector)((e=>v.ZP.selectors.getActiveErrorsForAttributesPager(e,g,f))),P=(0,r.useCallback)((0,i.pipe)(v.N5.errors.actions.errorDeactivated,E),[E]);return a().createElement(a().Fragment,null,a().createElement(se.Z,{attributeValue:u,showEmptyEditors:S,onDeleteAttribute:s,onDeactivateError:P,onChangeAttribute:t,onAddAttributes:w,mode:y,crosswalks:b.crosswalks,errors:C,attributeType:f,ownError:(0,m.ADq)(u,null,f.uri,C)}),a().createElement("div",{className:d.actionButtons},a().createElement(Q.Z,{onClick:()=>{n(u)}},h().text("Cancel")),a().createElement(Q.Z,{color:"primary",disabled:!c,onClick:()=>{l(u)}},h().text("Apply"))))},Un=(0,J.Z)((()=>({root:{display:"flex",flexDirection:"column"},content:{position:"relative",padding:"4px 16px 9px",flex:1,overflow:"auto"},noData:{fontSize:"13px",paddingLeft:"20px",color:"rgba(0,0,0,0.54)"},tableContainer:{height:"477px",display:"flex",fontFamily:"Roboto",color:"rgba(0,0,0,0.54)"},header:{padding:"0 4px 0 16px"},addButton:{padding:"9px 16px 9px 12px",backgroundColor:"rgba(98, 2, 238, 0)",marginBottom:"4px"},buttonLabel:{fontSize:"14px",fontWeight:500,lineHeight:"16px"},icon:{fontSize:"18px",marginRight:"8px"},editor:{padding:"4px 16px"}})));function zn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Hn(e,t,n[t])}))}return e}function Hn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Vn=[],Fn=e=>{let{config:t,className:n}=e;const{caption:l,max:s}=t,c=Un(),{values:u,page:d,setPage:g,isLoading:f,searchQuery:b,setSearchQuery:y,visibleColumns:E,onFilter:x,onSort:w,onToggleFilters:S,onChangeColumns:C,filters:P,sorting:O,totalVisibleValues:Z,hasPaging:N,attributeType:k,showTable:T}=(0,r.useContext)(en),I=(0,r.useMemo)((()=>yn(k)),[k]),{checkHasChanges:j,onChangeAttribute:L,onDeleteAttribute:M,onAdd:A,onCancel:U,onApply:V,onStartEditing:_,modifiedValues:B,editingValues:G,deletedUris:q}=(()=>{const[e,t]=(0,r.useState)(),[n,a]=(0,r.useState)([]),l=(0,o.useSelector)(v.ZP.selectors.getMode);(0,r.useEffect)((()=>{a([]),t(null)}),[l]);const s=(0,o.useDispatch)(),c=(0,r.useContext)(p.m),{attributeType:u,values:d}=(0,r.useContext)(en),g=(0,o.useSelector)(v.ZP.selectors.getEntityUri),f=(0,o.useSelector)(v.ZP.selectors.getMetadata),h=(0,r.useCallback)((e=>{(0,i.pipe)(v.N5.actions.modifyAttribute,s)(zn({},e,{viewId:c}))}),[c,s]),b=(0,r.useCallback)((e=>(0,i.pipe)(v.N5.actions.removeAttribute,s)(zn({},e,{viewId:c}))),[c,s]),y=(0,r.useCallback)((()=>{const e=(0,m.gjI)({parentUri:g,attributeType:u});t(e.uri),h(zn({},e,{value:(0,m.GPx)({attributeTypes:u.attributes,parentUri:e.uri,mode:l,metadata:f}),attributeType:u}))}),[g,u]),E=(0,r.useCallback)((e=>{a((t=>t.find((0,i.propEq)("uri",e.uri))?t:[...t,e]))}),[a]),x=(0,r.useCallback)((e=>{const r=n.find((0,i.propEq)("uri",e.uri));if(r){const t=zn({},e,{value:r,attributeType:u,uri:e.uri});a((e=>(0,i.without)([r],e))),h(t)}else{const n={value:e,attributeType:u,uri:e.uri};t(null),b(n)}}),[b,h,a,n]),w=(0,r.useCallback)((e=>{t(null),a((t=>{const n=t.find((0,i.propEq)("uri",e.uri));return n?(0,i.without)([n],t):t}))}),[a,t]),S=(0,o.useSelector)((e=>v.ZP.selectors.getModifiedEntity(e,g)||{})),C=(0,m.KIu)(l),P=(0,m.xy8)(u),O=(0,i.pathOr)(Vn,[P,null==u?void 0:u.name],S),Z=(0,r.useMemo)((()=>[...O.filter((0,i.pipe)((0,i.prop)("uri"),(0,i.both)(m.ZiX,(0,i.pipe)((0,i.equals)(e),i.not)))),...(0,i.map)((e=>O.find((0,i.propEq)("uri",e.uri))||e))(d)].map((e=>{var t;return null!==(t=n.find((0,i.propEq)("uri",e.uri)))&&void 0!==t?t:e}))),[O,n,e,d]),N=(0,r.useMemo)((()=>C?(0,i.pipe)((0,i.map)((0,i.prop)("uri")),(0,i.filter)((e=>!O.find((0,i.propEq)("uri",e)))))(d):[]),[O,d]),k=O.filter((t=>{let{uri:r}=t;return r===e||n.find((0,i.propEq)("uri",r))}));return{checkHasChanges:e=>n.find((0,i.propEq)("uri",e.uri))!==e,onChangeAttribute:h,onDeleteAttribute:b,onAdd:y,onCancel:x,onApply:w,onStartEditing:E,modifiedValues:Z,editingValues:k,deletedUris:N}})(),$=(0,o.useSelector)(v.ZP.selectors.getMode),X=(0,m.KIu)($),Y=X?B:u,{canCreate:K}=(0,Cn.l)(),J=K(t)&&k&&(0,m.Vg3)({attributeType:k,mode:$})&&!G.length,ee=(0,r.useMemo)((()=>E.map((e=>I.find((0,i.propEq)("id",e))))),[E,I]);return a().createElement(z.Z,{className:D()(c.root,n)},T?a().createElement(a().Fragment,null,a().createElement(Nn,{title:l,total:Z,columnsData:I,selectedColumns:E,onChangeColumns:C,searchQuery:b,onChangeSearchQuery:y,filtersEnabled:!!P,onToggleFilters:S}),a().createElement("div",{style:{position:"relative"}},X&&a().createElement("div",{className:c.editor},J&&a().createElement(Q.Z,{color:"primary",onClick:A,className:c.addButton},a().createElement(ae.Z,{classes:{root:c.icon}}),a().createElement("div",{className:c.buttonLabel},h().text("Add"))),G.map((e=>a().createElement(An,{key:e.uri,attributeValue:e,onChangeAttribute:L,onDeleteAttribute:M,onCancel:U,onApply:V,hasChanges:j(e)})))),a().createElement(Ln,{columnsData:ee,config:t,values:Y,filters:P,onFilter:x,sorting:O,onSort:w,onEdit:_,onDeleteAttribute:M,deletedUris:q}),N&&a().createElement(H.Z,{count:Z,rowsPerPageOptions:[],rowsPerPage:s,page:d,onChangePage:g}),f&&a().createElement(R.Z,null))):a().createElement(a().Fragment,null,a().createElement(W.Z,{title:l,className:c.header}),a().createElement(F.Z,{className:c.noData},h().text("No data"))))};var Wn=n(37163);let _n=0;const Bn=()=>_n++,Gn=e=>{const t={children:[],nodeId:Bn()};if(e.parentPaths)for(let n=0;n<e.parentPaths.length;n++){const r=e.parentPaths[n];let a=t;for(let t=r.length-1;t>=0;t--){const o=r[t],l=e.entities[o.entityUri],i=t===r.length-1,s={entity:l,children:[],nodeId:Bn(),expanded:!0,rootIndex:i?n+1:void 0};i&&(s.root=i),a.children.push(s),a=s}}return t.children};var qn=n(43434);const $n=(0,J.Z)((e=>({container:{fontSize:"13px",display:"flex",paddingTop:"6px",position:"relative"},title:{flexGrow:1,minHeight:"15px",color:e.palette.secondary.main,lineHeight:"15px"},link:{cursor:"pointer",color:e.palette.secondary.main,lineHeight:"15px"},selected:{fontWeight:"bold"},wrapper:{width:"100%"},avatar:{height:"16px",width:"16px",marginRight:"8px",marginLeft:"8px"},header:{padding:"0 4px 0 16px"},treeContainer:{flexGrow:1,display:"flex",flexDirection:"column",height:"100%",minHeight:"372px",maxHeight:"507px",overflow:"auto"},tree:{flexGrow:1,height:0},buttonsContainer:{flexShrink:0,marginLeft:"auto","& > * + *":{marginLeft:"-4px"}},button:{padding:"8px"}})));var Qn=n(1242);const Xn=a().createContext(null);var Yn=n(48685);const Kn=e=>{e.target.src=Qn},Jn=e=>{let{node:t}=e;const n=$n(),l=(0,o.useDispatch)(),i=t.entity.uri,s=(0,o.useSelector)(v.ZP.selectors.getAbsoluteImagePath),c=(0,o.useSelector)(v.ZP.selectors.getMetadata),u=(0,r.useContext)(Xn),p=(0,o.useSelector)(v.ZP.selectors.getUIPath),{uri:d}=(0,o.useSelector)(v.ZP.selectors.getEntity),g=(0,m.ChB)({uiPath:p,uri:i}),f=i===d,h=(0,r.useCallback)((()=>{l(v.ui.actions.openEntity({uri:i,viewId:u.id}))}),[l,u,i]),{entity:{label:b},nodeId:y}=t,E=(0,m.nt9)(c,t.entity.type)||{},x=(0,m.VD3)(c,E,"typeGraphIcon"),w=x&&(0,m.vPL)(s,x);return a().createElement("div",{className:n.wrapper,"data-node-id":y},a().createElement("div",{className:n.container},a().createElement(qn.Z,{className:D()(n.avatar),src:w||Qn,onError:Kn}),a().createElement("span",{className:D()(n.link,{[n.selected]:f})},a().createElement(Yn.Z,{to:g,onClick:h},b))))},er=((0,r.memo)(Jn),e=>{let{node:t}=e;return t.nodeId}),tr=(0,J.Z)((()=>({lineBlock:{height:"100%",position:"relative",display:"inline-block"},lineChildren:{height:"100%",position:"absolute",display:"inline-block"},rootIndex:{display:"flex",alignItems:"center",color:"rgba(0,0,0,0.54)",height:"100%"},verticalLine:{width:"1px",left:"50%",top:0,height:"50%",position:"absolute",backgroundColor:"rgba(0,122,193,0.3)"},horizontalLineRight:{height:"1px",top:"14px",left:"50%",width:"24%",position:"absolute",backgroundColor:"rgba(0,122,193,0.3)"},node:{minWidth:"100%",position:"relative",textAlign:"left",padding:"0 24px 0 18px",boxSizing:"border-box",whiteSpace:"normal","&:hover":{backgroundColor:"rgba(0,0,0,0.06)"}},nodeContent:{position:"absolute",top:0,bottom:0,paddingLeft:"18px",boxSizing:"border-box"},row:{display:"flex"},rowContents:{position:"relative",borderLeft:"none",paddingLeft:"4px",flex:"1 1 auto",width:0,display:"flex",verticalAlign:"middle",boxSizing:"border-box"},buttonWrapper:{display:"flex",paddingTop:"13px",width:"12px",cursor:"pointer"},collapsedButton:{transform:"rotate(-90deg)"},expandedButton:{transform:"rotate(0deg)"},button:{transition:"transform .15s ease",width:0,height:0,borderLeft:"4px solid transparent",borderRight:"4px solid transparent",borderTop:"4px solid rgba(0, 0, 0, 0.54)"},rowTitle:{flex:"1 1 auto",width:0,paddingRight:"11px"}})));function nr(){return nr=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},nr.apply(this,arguments)}function rr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ar(){return ar=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ar.apply(this,arguments)}const or={nodeContentRenderer:e=>{const t=(0,i.omit)(["connectDragPreview","connectDragSource","isDragging","canDrop","canDrag","draggedNode","isSearchMatch","isSearchFocus","buttons","didDrop","children","treeId","isOver","parentNode","rowDirection"],e),{scaffoldBlockPxWidth:n,toggleChildrenVisibility:r,node:o,title:l,path:s,treeIndex:c,style:u}=t,p=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(t,["scaffoldBlockPxWidth","toggleChildrenVisibility","node","title","path","treeIndex","style"]),d=l,m=r&&!o.root&&o.children&&o.children.length>0,g=tr();return a().createElement("div",ar({style:{height:"100%"}},p,{key:o.nodeId}),m&&o.expanded&&a().createElement("div",{style:{width:n-2},className:g.lineChildren}),a().createElement("div",{className:g.row,style:u},a().createElement("div",{className:g.rowContents},m&&a().createElement("div",{className:g.buttonWrapper,onClick:()=>{r({node:o,path:s,treeIndex:c})}},a().createElement("div",{"aria-label":o.expanded?"Collapse":"Expand",className:D()(g.button,o.expanded?g.expandedButton:g.collapsedButton)})),a().createElement("div",{className:g.rowTitle},"function"==typeof d?d({node:o,path:s,treeIndex:c}):d))))},treeNodeRenderer:e=>{const t=(0,i.omit)(["listIndex","swapFrom","swapLength","swapDepth","draggedNode","getPrevRow","connectDropTarget","isOver","canDrop","treeIndex","treeId","path","rowDirection"],e),{children:n,scaffoldBlockPxWidth:r,lowerSiblingCounts:o,node:l}=t,s=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(t,["children","scaffoldBlockPxWidth","lowerSiblingCounts","node"]),c=tr(),u=o.length,p=[];o.forEach(((e,t)=>{p.push(a().createElement("div",{key:`pre_${1+t}`,style:{width:r},className:c.lineBlock},l.root&&a().createElement("div",{className:c.rootIndex},l.rootIndex,"."),t===u-1&&0!==t&&a().createElement(a().Fragment,null,a().createElement("div",{className:c.verticalLine}),a().createElement("div",{className:c.horizontalLineRight}))))}));const d=l.root?r-4:0,m=r*u-d,g={left:m,width:`calc(100% - ${m}px`},f=`${m+250}px`,h=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){rr(e,t,n[t])}))}return e}({},s.style,{width:f});return a().createElement("div",nr({},s,{className:c.node,style:h}),p,a().createElement("div",{className:c.nodeContent,style:g},n))},scaffoldBlockPxWidth:16,rowHeight:28,slideRegionSize:50};function lr(){return lr=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},lr.apply(this,arguments)}const ir=e=>{let{styles:t={}}=e,n=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["styles"]);return a().createElement("svg",lr({width:"20",height:"20",viewBox:"0 0 20 20",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},n),a().createElement("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",fillOpacity:".54"},a().createElement("path",{d:"M14.5 5a1.5 1.5 0 110-3 1.5 1.5 0 010 3zm4 5a1.5 1.5 0 110-3 1.5 1.5 0 010 3zm-17 1a1.5 1.5 0 110-3 1.5 1.5 0 010 3zM4 4a2 2 0 110-4 2 2 0 010 4zm1 16a2 2 0 110-4 2 2 0 010 4zm4.5-6a4.5 4.5 0 110-9 4.5 4.5 0 010 9zm0-2a2.5 2.5 0 100-5 2.5 2.5 0 000 5zm6 5a1.5 1.5 0 110-3 1.5 1.5 0 010 3z",fill:"#000"})))},sr=e=>{let{title:t,onGraphOpen:n}=e;const r=$n();return a().createElement(W.Z,{title:t,className:r.header},a().createElement("div",{className:r.buttonsContainer},a().createElement(Re.k,{className:r.button,tooltipTitle:h().text("Show Graph"),icon:ir,onClick:n,size:"L"})))};var cr=n(80233);const ur=(0,J.Z)((()=>({root:{position:"relative"},bodyWrapper:{paddingTop:"21px"}})));let pr,dr;function mr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){gr(e,t,n[t])}))}return e}function gr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}!function(e){e.WORKFLOW="workflow",e.WORKFLOW_START_PROCESS_FROM_QUERY="workflow/startProcessFromQuery",e.API="api",e.GET_ENTITY_URI="getEntityUri",e.GET_ENTITY="getEntity",e.GET_API_PATH="getApiPath",e.WORKFLOW_GET_WORKFLOW_PATH="workflow/getWorkflowPath",e.GET_SEARCH_QUERY="getSearchQuery",e.GET_TENANT="getTenant",e.GET_USER="getUser",e.GET_PERSPECTIVE="getPerspective",e.SET_PERSPECTIVE="setPerspective",e.SET_ENTITY_URI="setEntityUri",e.ALERT="alert",e.CONFIRM="confirm",e.PROMPT="prompt",e.OPEN_WINDOW="openWindow",e.GET_CONFIGURATION="getConfiguration",e.GET_UI_CONFIGURATION="getUiConfiguration",e.OPEN_SEARCH="openSearch",e.WORKFLOW_CHECK_PERMISSION="workflow/checkPermission"}(pr||(pr={})),function(e){e.SET_HTML="setHtml",e.LOG="log",e.SET_VISIBILITY="setVisibility",e.MESSAGE="message",e.SET_ENABLED="setEnabled",e.SET_TOOLTIP="setToolTip",e.SET_LABEL="setLabel",e.SET_HEIGHT="setHeight",e.SET_WIDTH="setWidth",e.RETURN_PROCESSED_API_RESPONSE="returnProcessedApiResponse",e.RETURN_PROCESSED_API_REQUEST="returnProcessedApiRequest",e.REQUEST="request"}(dr||(dr={}));const fr=(e,t)=>{const{url:n}=e;return n?(!(null==t?void 0:t.some((e=>{const t=e.match(/^(?:([^:?#]+):)?(?:\/\/((?:(([^:@?]*)(?::([^:@?]*))?)?@)?((?:\[[0-9A-Fa-f:]+)|(?:[^:?#]*))(?::(\d*))?))?((((?:[^?#]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/),r=t[1],a=t[6],o=`${r}://${a}`,l=new RegExp("^"+e+"$"),i=e.replace(/\/*$/,"");return i===n||a&&a===i||a&&o===i||i&&0===i.indexOf("/")&&n&&0===n.indexOf(i)||i&&l.test(n)})))||0===((null==t?void 0:t.length)||0))&&{errorMessage:"Not enough permissions"}:{errorMessage:"URL is empty"}};var hr=n(36571);function br(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){yr(e,t,n[t])}))}return e}function yr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const vr=(e,t)=>{let{files:n,permissions:a}=e;const[l,i]=(0,r.useState)(),[s,c]=(0,r.useState)([]),[u,p]=(0,r.useState)(!0),[d,f]=(0,r.useState)(null),[h,b]=(0,r.useState)(null),[y,E]=(0,r.useState)(""),x=(0,o.useDispatch)(),w=(0,o.useSelector)(v.ZP.selectors.getMetadata),S=(0,o.useSelector)(v.ZP.selectors.getEntity)||{},C=`${(0,o.useSelector)(v.ZP.selectors.getUIPath)}worker_api.js`,P=(0,o.useSelector)(v.ZP.selectors.getTenant),O=(0,o.useSelector)(v.ZP.selectors.getApiPath),Z=(0,o.useSelector)(v.ZP.selectors.getWorkflowPath),N=(0,o.useSelector)(v.ZP.selectors.getUser),k=(0,o.useSelector)(v.ZP.selectors.getEntityUri),T=(0,o.useSelector)(v.ZP.selectors.getWorkflowEnvironmentUrl),R=(0,r.useContext)(g),I=(0,hr.Z)(),{type:j,data:L}=(0,o.useSelector)(v.ZP.selectors.getSearchProviderData)||{},D=e=>x(v.ui.actions.openSearch(e)),M=(e,n,r)=>{if(e){const o=[],l=e=>{const t=e.getAttribute("ui-actions"),r=e.getAttribute("ui-tooltip"),a=e.getAttribute("id")||e.getAttribute("name");t&&(t.split(",").forEach((t=>{const r=()=>{const e={action:"event",type:"uiAction",data:{type:t,id:a}};n.postMessage(e)};e.addEventListener(t,r),o.push((()=>{e.removeEventListener(t,r)}))})),e.removeAttribute("ui-actions")),r&&f(r),e.childNodes.forEach((e=>{1===e.nodeType&&l(e)}))},s=e=>{const t=document.createElement("div");t.innerHTML=e||r,l(t),c(o),i(t)};switch(e.action===dr.SET_HTML&&r!==e.params.html&&s(e.params.html),e.action){case dr.LOG:console.log(e.params);break;case dr.SET_VISIBILITY:"visible"===e.params?(p(!0),s()):p(!1);break;case dr.SET_TOOLTIP:f(e.params),s();break;case dr.SET_HEIGHT:b((t=>br({},t||{},{height:e.params})));break;case dr.SET_WIDTH:b((t=>br({},t||{},{width:e.params})));break;case dr.SET_ENABLED:b((t=>{const n=br({},t||{});return e.params?delete n["pointer-events"]:n["pointer-events"]="none",n}));break;case dr.MESSAGE:E(e.params);break;case dr.REQUEST:(e=>{let{name:t,paramObject:n,permissions:r,worker:a,metadata:o,config:l,apiPath:i,user:s,workflowPath:c,entity:u,tenant:p,entityUri:d,query:g,openSearch:f,environment:h,getCurrentPerspectiveId:b,showPerspective:y,workflowCheckPermission:v,setEntityUri:E}=e;const x=e=>{e.then((e=>{a.postMessage(mr({action:"response",result:{data:e}},n.params))})).catch((()=>{a.postMessage(mr({action:"response",result:{data:{},headers:"",status:0}},n.params))}))};switch(t){case pr.API:{const e=((e,t)=>{const n=fr(e,t);return n?new Promise((e=>e(n))):(0,m.SL_)({url:e.url,method:e.method,data:e.data,headers:e.headers})})(n.params,r);x(e);break}case pr.WORKFLOW:{const e=((e,t,n,r)=>{const{url:a}=e,o=fr(e,t);if(o)return new Promise((e=>e(o)));const l=a.includes("http:")||a.includes("https:");return n||l?(0,m.oUH)({url:a,method:e.method||"GET",data:e.data,tenant:r,headers:e.headers,workflowPath:n}):new Promise((e=>e({errorMessage:"Workflow path is not defined"})))})(n.params,r,c,p);x(e);break}case pr.WORKFLOW_START_PROCESS_FROM_QUERY:{const e=((e,t,n,r,a)=>{if(!e.processDefinitionId)return new Promise((e=>e({errorMessage:"processDefinitionId is empty"})));if(!e.searchString)return new Promise((e=>e({errorMessage:"searchString is empty"})));if(!n)return new Promise((e=>e({errorMessage:"Workflow path is not defined"})));const o=fr(mr({url:"/processInstances/_generateFromQuery"},e),t);return o?new Promise((e=>e(o))):(0,m.FuV)({workflowPath:n,processType:e.processDefinitionId,searchString:e.searchString,tenant:r,environment:a})})(n.params,r,c,p,h);x(e);break}case pr.GET_CONFIGURATION:a.postMessage(mr({action:"response",result:o},n.params));break;case pr.GET_UI_CONFIGURATION:{const e=mr({},l,{action:mr({},l.action)});e.action.permissions&&delete e.action.permissions,a.postMessage(mr({action:"response",result:e},n.params));break}case pr.SET_ENTITY_URI:E(d,(()=>a.postMessage(mr({action:"response",result:u},n.params))));break;case pr.SET_PERSPECTIVE:y(n.params.perspective),a.postMessage(mr({action:"response",result:b()},n.params));break;case pr.GET_PERSPECTIVE:b&&a.postMessage(mr({action:"response",result:b()},n.params));break;case pr.WORKFLOW_CHECK_PERMISSION:a.postMessage(mr({action:"response",result:v(n.params.permission)},n.params));break;case pr.GET_SEARCH_QUERY:a.postMessage(mr({action:"response",result:g},n.params));break;case pr.OPEN_SEARCH:f({viewId:l.id,searchState:n.params.searchState});break;case pr.GET_ENTITY_URI:a.postMessage(mr({action:"response",result:d},n.params));break;case pr.GET_ENTITY:a.postMessage(mr({action:"response",result:u},n.params));break;case pr.GET_API_PATH:a.postMessage(mr({action:"response",result:i},n.params));break;case pr.WORKFLOW_GET_WORKFLOW_PATH:a.postMessage(mr({action:"response",result:c},n.params));break;case pr.GET_TENANT:a.postMessage(mr({action:"response",result:p},n.params));break;case pr.GET_USER:a.postMessage(mr({action:"response",result:s},n.params));break;case pr.ALERT:window.alert(n.params.text);break;case pr.CONFIRM:window.confirm(n.params.text);break;case pr.PROMPT:window.prompt(n.params.text,n.params.defaultText||"");break;case pr.OPEN_WINDOW:window.open(n.params.url,"_blank")}})(br({name:e.params.name,paramObject:e,permissions:a,worker:n,metadata:w,config:t,user:N,apiPath:O,tenant:P,workflowPath:Z,entity:S,entityUri:k,environment:T,query:"search"===j?null==L?void 0:L.query:null,openSearch:D,workflowCheckPermission:I},R))}}};return(0,r.useEffect)((()=>{const e=((e,t,n)=>{const r=`\n importScripts("${e}");\n importScripts("${t.join('","')}");\n postMessage({action:'loaded'});`;let a;try{const e=window.webkitURL||window.URL;a=new Worker(e.createObjectURL(new Blob([r],{type:"application/javascript"})))}catch(e){a=new Worker("data:application/javascript,"+encodeURIComponent(r))}if(a){let e="";a.addEventListener("message",(t=>{if("loaded"!==t.data.action){const r=JSON.parse(t.data);n(r,a,e),"setHtml"===r.action&&(e=r.params.html)}}))}return a})(C,n,M);return()=>{e.terminate()}}),[]),(0,r.useEffect)((()=>()=>{s.forEach((e=>e()))}),[s]),{html:l,visible:u,tooltip:d,customStyles:h,message:y,onClosePopup:()=>E("")}};function Er(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){xr(e,t,n[t])}))}return e}function xr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var wr=n(14940);const Sr=(0,J.Z)({resizableHandleContainer:{position:"relative",width:"100%",height:"inherit"},resizableHandleVisibilityArea:{position:"absolute",top:0,left:0,width:"100%",height:"24px",zIndex:11,"&:hover $resizableHandle":{visibility:"visible"},".react-grid-item.static &:hover $resizableHandle":{visibility:"hidden"}},resizableHandle:{position:"absolute",width:"100%",display:"flex",justifyContent:"center",top:"-3px",zIndex:11,cursor:"move",visibility:"hidden"},dragIcon:{transform:"translateX(-50%) rotate(90deg)",color:"rgba(0, 0, 0, 0.3)"}}),Cr=e=>{const t=t=>{const n=Sr();return a().createElement("div",{className:n.resizableHandleContainer},a().createElement("div",{className:n.resizableHandleVisibilityArea},a().createElement("div",{className:D()("viewDraggableHandle",n.resizableHandle)},a().createElement(wr.Z,{className:n.dragIcon}))),a().createElement(e,t))};return t.displayName="WithResizableHandle",t},Pr=(0,J.Z)({stubView:{padding:"20px"},fullHeight:{height:"100%"},component:{boxSizing:"border-box",overflow:"auto",boxShadow:"none",borderRadius:"unset"}});var Or=n(29103),Zr=n(83911),Nr=n(62116),kr=n(40435);const Tr=(0,i.pipe)((0,i.path)(["point","lat"]),(0,i.both)((0,i.gt)(90),(0,i.lt)(-90))),Rr=(0,J.Z)((()=>({root:{height:"100%",display:"flex",flexDirection:"column"},fullHeight:{height:"100%"},fullscreenBtn:{position:"absolute",right:"5px",top:"5px",zIndex:100}})));var Ir=n(61347),jr=n(66078);const Lr=(0,J.Z)((e=>({caption:{color:e.palette.text.secondary,fontSize:"13px"}}))),Dr=Lr,Mr=e=>{let{totalImages:t}=e;const n=Dr(),r=t>1?h().text("photos"):h().text("photo");return a().createElement(F.Z,{variant:"caption",className:n.caption},`${t} ${r}`)};function Ar(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Ur(e,t,n[t])}))}return e}function Ur(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const zr=e=>{let{config:t,attributeType:n,paging:r,requestNextPageOfAttributeValues:l}=e;const s=(0,o.useDispatch)(),c=(0,o.useSelector)(v.ZP.selectors.getEntity),u=(0,o.useSelector)((e=>v.ZP.selectors.getModifiedEntity(e,c.uri)||{})),p=(0,i.pathOr)([],["attributes",n.name],u),d=t.id;return a().createElement(a().Fragment,null,a().createElement(jr.Z,{attributeValues:p,attributeType:n,onDeleteAttribute:e=>(0,i.pipe)(v.N5.actions.removeAttribute,s)(Ar({},e,{viewId:d})),parentUri:u.uri,onChangeAttribute:e=>(0,i.pipe)(v.N5.actions.modifyAttribute,s)(Ar({},e,{viewId:d})),imageSize:Fr,paging:r,requestNextPageOfAttributeValues:l}),a().createElement(Mr,{totalImages:p.length}))},Hr=(0,J.Z)((e=>({container:{padding:"8px 16px"},noData:{fontSize:"13px",color:e.palette.text.secondary}}))),Vr=Hr,Fr={imageMargin:4,imageWidth:162,imageHeight:162};var Wr=n(86689),_r=n(23044);const Br=(0,J.Z)((e=>({root:{display:"flex",flexDirection:"column"},matchesContainer:{position:"relative"},footer:{display:"flex",alignItems:"end",flexGrow:1,justifyContent:"flex-start",borderTop:"1px solid rgba(0,0,0, 0.12)",padding:"8px 16px",color:e.palette.primary.main,fontSize:"13px",letterSpacing:"0",lineHeight:"15px"},noData:{paddingLeft:"16px",paddingBottom:"16px",fontSize:"13px",color:"rgba(0,0,0,0.54)"}})));var Gr=n(20200),qr=n(25601),$r=n(84236),Qr=n(48376);function Xr(){return Xr=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Xr.apply(this,arguments)}const Yr=e=>{let{config:t,match:n,onStartRequest:l,onFinishRequest:i}=e;const s=(0,o.useDispatch)(),c=(0,o.useSelector)(v.ZP.selectors.getMetadata),u=(0,o.useSelector)(v.ZP.selectors.getEntity),{canMerge:d,canMark:g}=(0,m.hXd)(c,t,n.object,u,n.matchRules),f=(0,r.useMemo)((()=>[n.object]),[n.object]),h={entity:u,entities:f,mode:qr.N.iconButton,onStartRequest:l},b=(0,r.useContext)(p.m),y=(0,r.useCallback)((()=>{i(),s(v.N5.entity.actions.loadEntity({viewId:b,uri:u.uri}))}),[s,u.uri,i,b]);return a().createElement(a().Fragment,null,d&&a().createElement($r.H,Xr({},h,{onFinishRequest:y})),g&&a().createElement(Qr.i,Xr({},h,{onFinishRequest:i})))},Kr=e=>{let{config:t,entitiesMap:n,match:r,onFinishRequest:l,onStartRequest:i}=e;const s=(0,o.useSelector)(v.ZP.selectors.getMetadata),c=(0,o.useSelector)(v.ZP.selectors.getEntity);return a().createElement(Gr.M,{match:r,entity:c,entitiesMap:n,metadata:s,className:St.U},a().createElement(Ct.Z,{uri:(0,m.E_P)(c.uri,r.object.uri),relatedObjectUris:(0,m.wp9)(m.q7e.POTENTIAL_MATCH,{entityUri:c.uri,matchEntityUri:r.object.uri}),objectType:m.q7e.POTENTIAL_MATCH}),a().createElement(Yr,{match:r,config:t,onStartRequest:i,onFinishRequest:l}))},Jr={showTransitiveMatches:!0,showInactiveEntities:!1},ea={order:"asc",field:"score"};var ta;!function(e){e[e.Loading=0]="Loading",e[e.NoData=1]="NoData",e[e.Loaded=2]="Loaded"}(ta||(ta={}));const na=Cr((e=>{let{className:t}=e;const n=Pr();return a().createElement(z.Z,{className:D()(n.stubView,"viewDraggableHandle",t)},"NOT IMPLEMENTED")})),ra=Cr((e=>{let{className:t,config:n}=e;return a().createElement(M.Z,{className:t,caption:n.caption,excludeUris:n.excludeUris,includeUris:n.includeUris,attributesCount:n.attributesCount,pinnedAttributes:n.pinnedAttributes})})),aa=Cr((e=>{let{className:t,config:n}=e;const o=(e=>{const[t,n]=(0,r.useState)(""),[a,o]=(0,r.useState)(0),[l,i]=(0,r.useState)(!1),s=(0,r.useMemo)((()=>({page:a,searchQuery:t,showInactive:l})),[a,t,l]),c=Oe(e,s,!0),u=(0,r.useCallback)((()=>{o(0),i((e=>!e))}),[]);return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Ze(e,t,n[t])}))}return e}({setSearchQuery:n,searchQuery:t,setPage:o,page:a,toggleShowInactive:u,showInactive:l},c)})(n);return a().createElement(A.Provider,{value:o},a().createElement(we,{config:n,className:t}))})),oa=Cr((e=>{let{config:t,className:n}=e;const l=(e=>{var t;const{attributeUri:n}=e,a=(0,o.useSelector)(v.ZP.selectors.getMetadata),l=(0,r.useMemo)((()=>(0,m.zeJ)(a,n)),[a,n]),s=(0,r.useMemo)((()=>yn(l)),[l]),c=(0,r.useMemo)((()=>({searchQuery:"",filters:null,sorting:void 0,visibleColumns:s.filter((0,i.pipe)((0,i.prop)("dataTypeDefinition"),m.YkM,i.not)).map((e=>{let{id:t}=e;return t})).slice(0,5),page:0})),[s]),[u,p]=(0,r.useReducer)(cn,c),{searchQuery:d,filters:g,sorting:f,page:h}=u,b=(0,o.useSelector)(v.ZP.selectors.getIsEditableMode),y=(0,r.useMemo)((()=>{const e=((e,t)=>m.wSh.fromNull(t).map((t=>Object.entries(t).map((t=>{let[n,r]=t;const a=e.find((0,i.propEq)("id",n));return(0,wn.su)(a,r)})))).orSome([]))(s,g);return e.length?e:null}),[g,s]),E=(0,r.useMemo)((()=>(0,i.reject)(i.isNil,{filters:y,page:h,sorting:f,searchQuery:d})),[y,h,f,d]),{changeSearchQuery:x,changePage:w,toggleSort:S,changeFilter:C,toggleFilters:P,changeColumns:O}=(0,tn.o)({actions:sn,dispatch:p}),Z=Oe(e,E,!1);return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Sn(e,t,n[t])}))}return e}({},u,{setSearchQuery:x,setPage:w,onSort:S,onFilter:C,onToggleFilters:P,onChangeColumns:O,showTable:Boolean(((null==Z||null===(t=Z.values)||void 0===t?void 0:t.length)||y||d||b)&&l&&!l.hidden)},Z)})(t);return a().createElement(en.Provider,{value:l},t&&a().createElement(Fn,{config:t,className:n}))})),la=Cr((e=>{let{config:t,className:n}=e;const o=(e=>{var t;const n=(0,r.useMemo)((()=>Object.entries(e.sortOptions||{}).map((e=>{let[t,n]=e;return{value:t,label:n}}))),[e.sortOptions]),a=e.max||15,[o,l]=(0,r.useState)(0),[i,s]=(0,r.useState)(e.sortOrder||"asc"),[c,u]=(0,r.useState)(null===(t=n[0])||void 0===t?void 0:t.value),[p,d]=(0,r.useState)(""),[m,g]=(0,r.useState)(!1),f=(0,r.useCallback)((()=>{l(0),g((e=>!e))}),[]),h=(0,r.useCallback)((()=>{l(0),s((e=>"asc"===e?"desc":"asc"))}),[]),b=(0,r.useCallback)((e=>{l(0),u(e)}),[]);return{searchQuery:p,changeSearchQuery:(0,r.useCallback)((e=>{l(0),d(e)}),[]),sortOrder:i,toggleSortOrder:h,sortOption:c,changeSortOption:b,sortOptions:n,page:o,setPage:l,rowsPerPage:a,showInactive:m,toggleShowInactive:f}})(t);return a().createElement(Le.Provider,{value:o},a().createElement(Jt,{config:t,className:n}))})),ia=Cr((e=>{let{config:t,className:n}=e;const o=(0,r.useRef)(),[l,s]=(0,r.useState)(null),{height:c,width:u,tooltip:p}=t,{html:d,visible:m,tooltip:g,customStyles:f,onClosePopup:h,message:b}=vr(t.action,t),y=ur(),v=g||p;if((0,r.useEffect)((()=>{o.current&&d&&(o.current.innerHTML="",d.childNodes.forEach((e=>{o.current.appendChild(e)})),s(o.current))}),[d]),!m)return null;const E=(0,i.reject)(i.isNil,{width:u,height:c}),x=a().createElement("div",{ref:o,style:Er({},E,f),className:D()(y.root,n)});return a().createElement("div",{className:y.bodyWrapper},v?a().createElement(rt.ZP,{title:v},x):x,a().createElement(cr.Z,{placement:"bottom",anchorEl:l,open:!!b,onClose:h},b))})),sa=Cr((e=>{let{config:t,className:n}=e;const l=(0,o.useSelector)(v.ZP.selectors.getEntityUri),{treeData:i,setTreeData:s}=((e,t)=>{const n=(0,Se._)(),[a,o]=(0,r.useState)([]);return(0,r.useEffect)((()=>((0,m.ZiX)(e)||n((0,m.RFJ)({uri:e,graphUri:t})).then(Gn).then(o).catch((e=>{console.warn(e)})),()=>{o([])})),[e,t,n]),{treeData:a,setTreeData:o}})(l,t.graph.type),c=$n(),u=(0,o.useDispatch)(),{id:p,graph:d}=t,g=(0,r.useCallback)((()=>{u(v.ui.actions.openGraph({viewId:p,graphType:d.type}))}),[u,p,d]),f=(0,r.useCallback)((e=>({title:a().createElement(Jn,{node:e.node})})),[]);return a().createElement(z.Z,{className:n},a().createElement(sr,{onGraphOpen:g,title:t.caption}),a().createElement(Xn.Provider,{value:t},a().createElement("div",{className:c.treeContainer},a().createElement("div",{className:c.tree},a().createElement(Wn.ZP,{isVirtualized:!1,treeData:i,canDrag:!1,theme:or,generateNodeProps:f,onChange:s,getNodeKey:er})))))})),ca=Cr((e=>{let{config:t,className:n}=e;const l=Br(),s=(0,o.useSelector)(v.ZP.selectors.getEntity),c=null==s?void 0:s.uri,[u,d]=(0,r.useState)(!1),g=(0,r.useCallback)((()=>{d(!0)}),[]),f=(0,r.useCallback)((()=>{d(!1)}),[]),{matches:b,entitiesMap:y,loadMatches:E,total:x}=(0,_r.s)({enabled:!!c,entity:s,options:Jr,filter:"",page:0,sorting:ea,rowsPerPage:3,onStartLoading:g,onFinishLoading:f}),S=(0,r.useCallback)((()=>{E()}),[E]),C=(0,o.useDispatch)(),P=(0,r.useContext)(p.m),O=(0,r.useCallback)((()=>{C(v.ui.actions.openPerspective({perspectiveId:"potentialMatches",viewId:P}))}),[C,P]),Z=(0,r.useMemo)((()=>(0,m.NVY)(c,(0,i.map)(m.ev7,b))),[c,b]),{getCommentsCount:N}=(0,r.useContext)(w.h);(0,r.useEffect)((()=>{N(Z)}),[N,Z]);const k=x>3&&!(0,i.isEmpty)(b),T=u?ta.Loading:(0,i.isEmpty)(b)?ta.NoData:ta.Loaded;return a().createElement(ke.X.Provider,{value:y},a().createElement(z.Z,{className:D()(l.root,n)},a().createElement(W.Z,{title:t.caption}),a().createElement("div",{className:l.matchesContainer},T===ta.Loading&&a().createElement(R.Z,null),T===ta.NoData&&a().createElement(F.Z,{className:l.noData},h().text("No matches found")),T===ta.Loaded&&b.map((e=>a().createElement(Kr,{config:t,entitiesMap:y,match:e,onFinishRequest:S,onStartRequest:g,key:e.object.uri})))),k&&a().createElement(a().Fragment,null,a().createElement("div",{className:l.footer},a().createElement(Wr.Z,{component:"button",variant:"caption",onClick:O,underline:"none"},h().text("See all"))))))})),ua=(0,r.lazy)((()=>n.e(590).then(n.bind(n,10590)).then((e=>({default:Cr(e.HierarchyTreeView)}))))),pa=(0,r.lazy)((()=>n.e(3431).then(n.bind(n,83431)).then((e=>({default:Cr(e.RelationshipsTableView)}))))),da=Cr((e=>{let{config:t,isFullscreen:n,onToggleFullscreen:l,className:i}=e;const s=Rr(),c=(0,o.useSelector)(v.ZP.selectors.getMetadata),u=(0,o.useSelector)(v.ZP.selectors.getEntity),p=(0,o.useSelector)(v.ZP.selectors.getGoogleMapKey),{markers:d,loading:g}=((e,t,n)=>{const[a,o]=(0,r.useState)([]),[l,i]=(0,r.useState)(!0),s=(0,Se._)();return(0,r.useEffect)((()=>{i(!0),s((0,m.DBr)(t,[e],n)).then((e=>{o(e.filter(Tr))})).catch((()=>{o([])})).finally((()=>{i(!1)}))}),[e,t,n,s]),{markers:a,loading:l}})(u,c,p),f=(0,r.useMemo)((()=>a().createElement("div",{className:s.fullHeight},a().createElement(R.Z,null))),[s]),h=(0,r.useMemo)((()=>({lat:0,lng:0})),[]);return p&&a().createElement(z.Z,{className:D()(s.root,i)},g&&a().createElement(R.Z,null),a().createElement(kr.Z,{size:"S",icon:n?Zr.Z:Or.Z,onClick:()=>l(t.id),className:s.fullscreenBtn}),a().createElement(Nr.Z,{loadingElement:f,defaultZoom:1,defaultCenter:h,markers:d,mapContainerClassName:s.fullHeight,mapKey:p}))})),ma=Cr((e=>{let{config:t,className:n}=e;const{attributeUri:l}=t,s=Vr(),c=(0,o.useDispatch)(),u=(0,o.useSelector)(v.ZP.selectors.getMode),p=(0,o.useSelector)(v.ZP.selectors.getEntityWithDiff),d=(0,o.useSelector)(v.ZP.selectors.getMetadata),g=(0,m.zeJ)(d,l),f=(0,i.pathOr)([],["attributes",null==g?void 0:g.name],p),b=(0,i.path)(["attributes","paging",l],p),y=f.length,E=t["text-empty"]||h().text("No data found"),x=(0,r.useCallback)((e=>c(v.N5.actions.requestNextPageOfAttributeValues(e))),[c]);return a().createElement(z.Z,{className:n},a().createElement(W.Z,{title:t.caption}),a().createElement("div",{className:s.container},(()=>{if(g){if((0,m.KIu)(u)){const e={attributeType:g,config:t,paging:b,requestNextPageOfAttributeValues:x};return a().createElement(zr,e)}if(y>0){const e={attributeValues:f,attributeType:g,imageSize:Fr,paging:b,parentUri:p.uri,requestNextPageOfAttributeValues:x};return a().createElement(a().Fragment,null,a().createElement(Ir.Z,e),a().createElement(Mr,{totalImages:y}))}}return a().createElement(F.Z,{className:s.noData},E)})()))}));class ga{}ga.ViewTypes=m.ZIY,ga.getComponentBy=(e,t)=>{let{store:n,config:r,className:o,isFullscreen:l,onToggleFullscreen:i}=t;switch(r[e]){case ga.ViewTypes.HierarchyTree:return a().createElement(ua,{config:r,store:n,className:o});case ga.ViewTypes.HierarchyPaths:return a().createElement(sa,{config:r,className:o});case ga.ViewTypes.RelationsTable:return a().createElement(pa,{config:r,store:n,className:o});case ga.ViewTypes.Relations:return a().createElement(la,{config:r,className:o});case ga.ViewTypes.Attributes:return a().createElement(ra,{className:o,config:r});case ga.ViewTypes.SingleAttributeView:return a().createElement(aa,{config:r,className:o});case ga.ViewTypes.TableAttributeView:return a().createElement(oa,{config:r,className:o});case ga.ViewTypes.MapView:return a().createElement(da,{config:r,isFullscreen:l,onToggleFullscreen:i,className:o});case ga.ViewTypes.CustomView:return a().createElement(ia,{config:r,className:o});case ga.ViewTypes.ImageAttributeView:return a().createElement(ma,{config:r,className:o});case ga.ViewTypes.PotentialMatchesView:return a().createElement(ca,{config:r,className:o})}},ga.getComponent=e=>ga.getComponentBy("class",e)||ga.getComponentBy("react-class",e)||a().createElement(na,{className:e.className});const fa=ga,ha=()=>null,ba=(0,r.memo)((e=>{let{config:t,store:n,isFullscreen:o,isAutosize:l,onToggleFullscreen:i}=e;const s=Pr();return a().createElement(r.Suspense,{fallback:a().createElement(ha,null)},fa.getComponent({config:t,store:n,className:D()(s.component,{[s.fullHeight]:!l}),isFullscreen:o,onToggleFullscreen:i}))}));ba.displayName="ViewComponent";const ya=(0,J.Z)((e=>({item:e.basicView,fixedSizeContainer:{height:"100%"}})));function va(){return va=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},va.apply(this,arguments)}const Ea=["onConfigChanged","onRemove"],xa=e=>{let{layoutItemConfig:t,views:n,className:l,children:s,style:c,isFullscreen:u,onToggleFullscreen:p,AutosizeComponent:d}=e,m=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["layoutItemConfig","views","className","children","style","isFullscreen","onToggleFullscreen","AutosizeComponent"]);const g=n.find((e=>{let{id:n}=e;return t.i===n})),f=ya(),{store:h}=(0,r.useContext)(o.ReactReduxContext);if(!g)return null;const b=g.class===fa.ViewTypes.CustomView;return a().createElement("div",va({},(0,i.omit)(Ea,m),{style:c,className:D()(l,{[f.item]:!b})}),a().createElement("div",{className:D()({[f.fixedSizeContainer]:!d})},d,a().createElement(ba,{store:h,config:g,isFullscreen:u,onToggleFullscreen:p,isAutosize:Boolean(d)})),s)},wa=e=>{let{views:t,layout:n,layoutOptions:r,onLayoutChanged:o}=e;return a().createElement(j.Z,{LayoutItem:xa,views:t,layout:n,layoutOptions:r,onLayoutChanged:o,draggableHandle:".viewDraggableHandle"})};var Sa=n(33109),Ca=n(75647),Pa=n(76368),Oa=n(36777),Za=n(72379),Na=n(72753),ka=n(43576);function Ta(){return Ta=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ta.apply(this,arguments)}const Ra=e=>{let{styles:t={}}=e,n=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["styles"]);return a().createElement("svg",Ta({width:"19",height:"17",viewBox:"0 0 19 17",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},n),a().createElement("defs",null,a().createElement("path",{d:"M14 17v2H4v-2h10zm6-4v2H4v-2l12.884.001H17l.116-.002L20 13zm-8.457-2H4V9h5.82a8.465 8.465 0 001.723 2zM9.139 6.178l-.289.733.035.088L4 7V5l5.713-.002c-.22.375-.412.768-.574 1.18zM17 2.82a6.451 6.451 0 00-6 4.09 6.451 6.451 0 006 4.092 6.451 6.451 0 006-4.091 6.451 6.451 0 00-6-4.091zm0 6.815a2.728 2.728 0 010-5.455 2.728 2.728 0 010 5.455zm0-4.365c-.905 0-1.636.73-1.636 1.636 0 .906.73 1.637 1.636 1.637.905 0 1.636-.731 1.636-1.637 0-.905-.73-1.636-1.636-1.636z",id:"svg1467685497a"})),a().createElement("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},a().createElement("g",{transform:"translate(-4 -2.5)"},a().createElement("mask",{id:"svg1467685497b",fill:"#fff"},a().createElement("use",{xlinkHref:"#svg1467685497a"})),a().createElement("path",{fillOpacity:".54",fill:"#000",mask:"url(#svg1467685497b)",d:"M0 0h24v24H0z"}))))},Ia=(0,J.Z)({editingButtons:{display:"flex","& button + button":{width:"88px",marginLeft:"8px"}},searchResults:{width:"150px",height:"25px",backgroundColor:"#ccc"},comments:{display:"flex",justifyContent:"flex-end",marginTop:"10px"}}),ja=e=>a().createElement(Za.Z,e,a().createElement(Ra,null)),La=(e,t,n,r,a)=>e.filter((e=>{let{value:o,permission:l}=e;return!(n&&!(0,m.KIu)(o))&&!!(r&&a||!(0,m.fnZ)(o))&&(0,m.uGe)(l,t)})),Da=e=>{let{className:t}=e;const n=Ia(),l=(0,o.useDispatch)(),i=(0,o.useSelector)(v.ZP.selectors.getCanUserStartProcessFromQuery),s=(0,o.useSelector)(v.ZP.selectors.getEntityWithoutDiff),c=(0,o.useSelector)((e=>v.ZP.selectors.getModifiedEntity(e,s.uri))),u=(0,o.useSelector)(v.ZP.selectors.getMetadata),p=(0,o.useSelector)(v.ZP.selectors.isWorkflowEnabled),d=(0,o.useSelector)(v.ZP.selectors.getMode),g=(0,o.useSelector)(v.ZP.selectors.getIsEditableMode),f=(0,o.useSelector)(v.ZP.selectors.getIsViewMode),b=(0,o.useSelector)(v.ZP.selectors.getIsHistoryModeEnabled),y=(0,o.useSelector)(v.ZP.selectors.getProfileOperation)===m.OXy.Saving,E=null==s?void 0:s.type,x=(0,r.useMemo)((()=>[{label:h().text("Editing"),value:m.fO_.EDITING,description:h().text("Edit profile directly"),icon:ka.Z,permission:"UPDATE"},{label:h().text("Suggesting"),value:m.fO_.SUGGESTING,description:h().text("Suggest changes and initiate a workflow review"),icon:ja,permission:"INITIATE_CHANGE_REQUEST"},{label:h().text("Viewing"),value:m.fO_.VIEWING,description:h().text("Suggest changes and initiate a workflow review"),icon:Na.Z,permission:"READ"}]),[]),w=(0,r.useMemo)((()=>[{label:h().text("Delete"),value:"Delete",description:h().text("Permanently delete profile"),icon:Je.Z,onClick:()=>{window.confirm(h().text("Are you sure you want to delete this?"))&&l(v.N5.entity.actions.entityRemoveRequested({entityUri:s.uri}))},permission:"DELETE"}]),[l,s.uri]),S=(0,r.useMemo)((()=>(0,m.nt9)(u,E)||{}),[u,E]),C=!b&&!(0,m.biM)(s)&&!(e=>(0,m.uGe)(m.BDP.READ,e)&&!(0,m.uGe)(m.BDP.UPDATE,e)&&!(0,m.uGe)(m.BDP.DELETE,e)&&!(0,m.uGe)(m.BDP.INITIATE_CHANGE_REQUEST,e))(S),P=(0,m.ZiX)(null==s?void 0:s.uri),O=(0,r.useMemo)((()=>La(x,S,P,p,i)),[x,S,p,i,P]),Z=(0,r.useMemo)((()=>La(w,S,P,p,i)),[w,S,p,i,P]),N=(0,r.useCallback)((e=>{l(v.N5.mode.actions.modeUpdated(e))}),[l]),k=(0,r.useCallback)((()=>{l(v.N5.mode.actions.modeCancelEditing())}),[l]),T=(0,r.useCallback)((()=>{l(v.N5.actions.saveProfile())}),[l]);return a().createElement(Sa.Z,{className:D()(t,St.U),entity:g&&c?c:s},a().createElement(V.Z,{display:"flex",alignItems:"center"},a().createElement(V.Z,{mr:3},g&&a().createElement(V.Z,{className:n.editingButtons},a().createElement(Q.Z,{variant:"outlined",onClick:k,"data-reltio-id":"reltio-profile-cancel-editing",disabled:y},h().text("Cancel")),a().createElement(Q.Z,{variant:"contained",color:"primary","data-reltio-id":"reltio-profile-save-profile",onClick:T,disabled:y},(0,m.fnZ)(d)?h().text("Suggest"):h().text("Save"))),b&&f?a().createElement(Ca.Z,null):f&&a().createElement(Pa.a,null)),C&&a().createElement(Oa.T,{optionsGroup:O,buttonsGroup:Z,value:d,onChange:N,disabled:y})),a().createElement(V.Z,{className:n.comments},a().createElement(Ct.Z,{uri:s.uri,relatedObjectUris:(0,m.wp9)(m.q7e.ENTITY,{entityUri:s.uri}),objectType:m.q7e.ENTITY})))};var Ma=n(69409),Aa=n(85457),Ua=n(37778),za=n(32158),Ha=n(95085),Va=n(70675),Fa=n(11821),Wa=n(98273),_a=n(28101),Ba=n(80147),Ga=n(76569);const qa=(0,J.Z)({wrapper:{display:"flex",overflow:"hidden",marginLeft:"auto",flexShrink:0},badge:{fontSize:"12px",height:"18px",minWidth:"18px",backgroundColor:"#FF4081",color:"#FFF"},badgePosition:{right:"5px"}}),$a=()=>{const{total:e}=(0,r.useContext)(k.O),t=qa();return a().createElement(qe.Z,{badgeContent:e,classes:{anchorOriginTopRightRectangle:t.badgePosition,badge:t.badge}},a().createElement(Ga.Z,null))};var Qa=n(89925),Xa=n(4426);const Ya=(0,J.Z)({wrapper:{overflow:"auto",paddingRight:"12px"},showMoreLink:{display:"flex",margin:"16px"},showMoreIcon:{fontSize:"1rem"}}),Ka=()=>{const e=Ya(),{getComments:t,comments:n,pageToken:l}=(0,r.useContext)(w.h),i=(0,o.useSelector)(v.ZP.selectors.getEntityUri);return(0,r.useEffect)((()=>{t(i)}),[t,i]),a().createElement(V.Z,{className:e.wrapper},n.map((e=>{const{objectId:t,relatedObjectUris:n,objectType:r,commentId:o}=e;return a().createElement(Qa.J,{key:o,uri:t,relatedObjectUris:n,objectType:r,comment:e})})),l&&a().createElement(Wr.Z,{component:"button",variant:"caption",className:e.showMoreLink,onClick:()=>{t(i,l)},underline:"none"},a().createElement(Xa.Z,{className:e.showMoreIcon}),h().text("Show more")))};var Ja=n(37193);const eo=(0,J.Z)({wrapper:{overflow:"auto",position:"relative",height:"100%"}}),to=()=>{const e=eo(),{tasks:t,loading:n}=(0,r.useContext)(k.O);return a().createElement("div",{className:e.wrapper},n&&a().createElement(R.Z,null),t&&t.map((e=>a().createElement(Ja.s,{key:e.taskId,task:e}))))};function no(){return no=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},no.apply(this,arguments)}const ro=e=>{let{styles:t={}}=e,n=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["styles"]);return a().createElement("svg",no({width:"20",height:"20",viewBox:"0 0 20 20",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},n),a().createElement("defs",null,a().createElement("path",{d:"M4 17.17L5.17 16H20V4H4v13.17zM20 2c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H6l-4 4V4c0-1.1.9-2 2-2h16zm-3 9H7v2h10v-2zm0-4H7v2h10V7z",id:"svg2697213709a"})),a().createElement("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},a().createElement("g",null,a().createElement("g",{transform:"translate(-2 -2)"},a().createElement("mask",{id:"svg2697213709b",fill:"#fff"},a().createElement("use",{xlinkHref:"#svg2697213709a"})),a().createElement("path",{fillOpacity:".54",fill:"#000",mask:"url(#svg2697213709b)",d:"M0 0h24v24H0z"})))))},ao=()=>{const{commentsMap:e}=(0,r.useContext)(w.h),t=qa();return a().createElement(qe.Z,{badgeContent:(0,m.mdt)(e),classes:{anchorOriginTopRightRectangle:t.badgePosition,badge:t.badge}},a().createElement(ro,null))};var oo=n(15422);const lo=()=>a().createElement(oo.Z,{text:h().text("Ready to go with the flow?"),secondaryText:h().text("Suggest a change or submit a match review, and we’ll kick off a workflow task to get things going.")}),io=()=>a().createElement(oo.Z,{text:h().text("Care to join the conversation?"),secondaryText:h().text("Leave comments for team members anywhere in the Profile page, and we’ll record it here.")});function so(){return so=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},so.apply(this,arguments)}let co;!function(e){e[e.Workflow=0]="Workflow",e[e.Collaboration=1]="Collaboration",e[e.History=2]="History"}(co||(co={}));const uo=e=>{if(e)return 1===e?h().text("${total} item",{total:e}):h().text("${total} items",{total:e})},po=()=>{var e,t,n;const l=qa(),s=(0,o.useSelector)(v.ZP.selectors.isWorkflowSideViewEnabled),c=(0,o.useSelector)(v.ZP.selectors.isWorkflowEnabled),u=(0,o.useSelector)(v.ZP.selectors.isCollaborationSideViewEnabled),p=(0,o.useSelector)(v.ZP.selectors.isCollaborationEnabled),d=(0,o.useSelector)(v.ZP.selectors.getHistoryEvent),g=(0,o.useSelector)(v.ZP.selectors.getMetadata),f=(0,o.useSelector)(v.ZP.selectors.getEntity),b=(0,r.useContext)(k.O),y=(0,r.useContext)(w.h),[E,x]=(0,r.useState)(null),S=(0,r.useCallback)((e=>{x((t=>t===e?null:e))}),[]),C=(0,r.useCallback)((()=>{x(null)}),[]),P=null!==E,O=E===co.History,{isHistoryEnabled:Z,isProfilePersisted:N}=(0,Ma.C)({isHistoryTabActive:O,entity:f}),{historyFilter:T,onApplyFilter:R,onClearFilter:I,isLoading:j,historicUris:L,historyWithTotal:D,canLoadMore:M,onLoadMore:A}=(0,Aa.k)({entity:f,enabled:Z}),U=s&&c&&!(0,m.ZiX)(null==f?void 0:f.uri),z=u&&p,H=(0,m.mdt)(null==y?void 0:y.commentsMap),V=[{buttonProps:{id:co.Workflow,icon:$a,tooltipTitle:h().text("Workflow")},content:null!=b&&b.total?a().createElement(to,null):a().createElement(lo,null),headerProps:{mainTitle:h().text("Workflow"),secondTitle:uo(null==b?void 0:b.total),rightContent:a().createElement(Ua.G,null)},hidden:!U},{buttonProps:{id:co.Collaboration,icon:ao,tooltipTitle:h().text("Collaboration")},content:H?a().createElement(Ka,null):a().createElement(io,null),headerProps:{mainTitle:h().text("Collaboration"),secondTitle:uo(H)},hidden:!z},{buttonProps:{id:co.History,icon:Ba.Z,tooltipTitle:h().text("History")},content:N?a().createElement(za.Z,{isLoading:j,historyWithTotal:D,contributorsUris:L,entityUri:null==f?void 0:f.uri,historyEvent:d,onLoadMore:A,canLoadMore:M}):a().createElement(Ha.Z,null),headerProps:{content:a().createElement(Va.Z,{total:N?((null==L?void 0:L.length)||0)+1:void 0,entityType:(0,m.nt9)(g,null==f?void 0:f.type),filter:T,onApplyFilter:R,onClearFilter:I})}}],F=(0,i.reject)((0,i.propEq)("hidden",!0))(V);return(0,r.useEffect)((()=>{var e;null!==(e=V[E])&&void 0!==e&&e.hidden&&C()}),[E,V,C,F]),a().createElement("div",{className:l.wrapper},a().createElement(Fa.h,{open:P,width:480},!(null!==(e=V[E])&&void 0!==e&&e.hidden)&&a().createElement(a().Fragment,null,a().createElement(Wa.P,so({},null===(t=V[E])||void 0===t?void 0:t.headerProps,{onClose:C})),null===(n=V[E])||void 0===n?void 0:n.content)),a().createElement(_a.G,{buttonsProps:(0,i.pipe)((0,i.reject)((0,i.propEq)("hidden",!0)),(0,i.pluck)("buttonProps"))(V),onButtonClick:S,activeIndexId:E}))};var mo=n(39781),go=n(16715);const fo="48px",ho="1px solid rgba(0, 0, 0, .125)",bo=(0,J.Z)((e=>({accordion:{borderTop:ho,borderBottom:ho,boxShadow:"none","&:not(:first-child)":{borderTop:0},"&:before":{display:"none"},"&$accordionExpanded":{margin:"auto"}},accordionExpanded:{},accordionSummary:{display:"flex",alignItems:"center",height:fo,minHeight:fo,"&$accordionSummaryExpanded":{height:fo,minHeight:fo}},accordionSummaryHeading:{flex:1,fontSize:e.typography.pxToRem(13),fontWeight:e.typography.fontWeightRegular},accordionSummaryExpanded:{},accordionSummaryContent:{display:"flex",alignItems:"center"},accordionDetails:{maxHeight:"21vh",overflow:"auto",paddingTop:0,paddingBottom:0,"& ul":{paddingLeft:"23px",marginTop:"3px"},"& li":{paddingLeft:"9px",paddingBottom:"8px"}},parents:{color:e.palette.text.primary},errorsAccordion:{backgroundColor:"#FFF4F6",borderColor:"#FFB8B3"},errorsAccordionDetails:{color:"#DD2C00"},warningsAccordion:{backgroundColor:"#FFF9ED",borderColor:"#FFDD91"},warningsAccordionDetails:{color:"#CC7500"},icon:{marginRight:"8px"},errorIcon:{fill:"#FF1744"},warningIcon:{fill:"#F9A825"}}))),yo=bo;var vo=n(27616),Eo=n(8284),xo=n(70660),wo=n(38016);const So=(0,r.memo)((e=>{let{panels:t,expandedPanelId:n,onToggle:r,ErrorComponent:o}=e;const l=yo();return t.length>0?a().createElement("div",null,t.map((e=>{let{id:t,icon:i,title:s,items:c,accordionClassName:u,accordionDetailsClassName:p}=e;return a().createElement(vo.Z,{key:t,square:!0,expanded:n===t,onChange:r(t),className:u,classes:{root:l.accordion,expanded:l.accordionExpanded}},a().createElement(Eo.Z,{classes:{root:l.accordionSummary,expanded:l.accordionSummaryExpanded,content:l.accordionSummaryContent},expandIcon:a().createElement(wo.Z,null)},i,a().createElement(F.Z,{className:l.accordionSummaryHeading},s)),a().createElement(xo.Z,{className:D()(l.accordionDetails,p)},a().createElement("ul",null,c.map(((e,t)=>a().createElement(o,{key:t,error:e}))))))}))):null}));So.displayName="ErrorsPanel";const Co=(0,i.omit)(["deactivated","path"]),Po=(0,r.memo)((e=>{let{error:t}=e;const n=yo(),r=((e,t)=>{let{type:n,source:r,message:a,attributeTypeUri:o="",attributeType:l}=t;if(n===m.NIO.missed&&r===m.zHr.local){const t=l||(0,m.zeJ)(e,o);return t?h().text("${attribute} is required",{attribute:t.label}):a}return a})((0,o.useSelector)(v.ZP.selectors.getMetadata),t),l=(e=>{let{path:t,uri:n}=e;return null==t?void 0:t.slice(0,n?t.length-1:t.length).filter((e=>{let{type:t}=e;return[m.HAc.attributeValue,m.HAc.relationConnection].includes(t)})).map((e=>{let{label:t}=e;return t})).filter(i.identity).join(" / ")})(t);return a().createElement("li",null,a().createElement("span",null,r),l&&a().createElement(a().Fragment,null,a().createElement("br",null),a().createElement("span",{className:n.parents},l)))}));Po.displayName="Error";const Oo=()=>{const e=yo(),t=(e=>{const t=(0,r.useRef)(e);return function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return e.length===t.length&&(0,i.equals)(e.map(Co),t.map(Co))}(e,t.current)||(t.current=e),t.current})((0,o.useSelector)(v.ZP.selectors.getProfileErrors)),[n,l]=(0,r.useMemo)((()=>(0,i.partition)(m.IT0,t)),[t]),[s,c]=(0,r.useState)(null),u=(0,r.useMemo)((()=>[{id:"errors",title:h().text("${number} ${errors}",{number:n.length,errors:1===n.length?h().text("error"):h().text("errors")}),icon:a().createElement(mo.Z,{className:D()(e.icon,e.errorIcon)}),items:n,accordionClassName:e.errorsAccordion,accordionDetailsClassName:e.errorsAccordionDetails},{id:"warnings",title:h().text("${number} ${warnings}",{number:l.length,warnings:1===l.length?h().text("warning"):h().text("warnings")}),icon:a().createElement(go.Z,{className:D()(e.icon,e.warningIcon)}),items:l,accordionClassName:e.warningsAccordion,accordionDetailsClassName:e.warningsAccordionDetails}].filter((e=>{let{items:t}=e;return t.length>0}))),[n,l,e]);(0,r.useEffect)((()=>{c("errors")}),[n]);const p=(0,r.useCallback)((e=>(t,n)=>{c(n?e:null)}),[]);return u.length>0?a().createElement(So,{panels:u,expandedPanelId:s,onToggle:p,ErrorComponent:Po}):null},Zo=(0,J.Z)((e=>({perspectiveView:{position:"absolute",top:0,left:0,right:0,bottom:0,fontFamily:"Roboto, Helvetica, Arial, sans-serif",overflowX:"hidden",overflowY:"auto",display:"flex",flexDirection:"column",backgroundColor:e.palette.background.default},scrollWrapper:{flexGrow:1,overflowY:"auto"},emptyState:{backgroundColor:"#FAFAFA",height:"100%"},profileWrapper:e=>{let{maxWidth:t}=e;return{display:"flex",flexDirection:"column",overflow:"hidden",flexGrow:1,maxWidth:t?`${t}px`:"100%"}},profileContainer:{display:"flex",overflow:"hidden",flexGrow:1},"@global div[role=tooltip]":{fontFamily:"Roboto, Helvetica, Arial, sans-serif"},"@global div[role=presentation]":{fontFamily:"Roboto, Helvetica, Arial, sans-serif"}}))),No=(0,r.memo)((e=>{let{config:t,saveState:n,getSavedState:l}=e;const i=Zo({maxWidth:null==t?void 0:t.maxWidth}),s=(0,o.useDispatch)(),c=(0,r.useRef)(),u=(0,r.useCallback)((0,m.DsO)(n,5e3),[n]),{isLoaded:p,savedState:d}=(0,E.a)(l),[g,f]=(0,r.useState)([]),[b,j]=(0,r.useState)([]),L=(0,r.useMemo)((()=>y()(t)),[t]),D=(0,o.useSelector)(v.ZP.selectors.getEntity),M=(0,o.useSelector)(v.ZP.selectors.getIsHistoryModeEnabled),A=(0,r.useMemo)((()=>(0,m.dvH)(D)),[D]),U=(0,x.C)({objectIds:A}),z=(0,r.useContext)(w.h),H=(0,S.U)(),V=(0,C.v)(null==t?void 0:t.workflow),F=(0,o.useSelector)(v.ZP.selectors.getHistoryEvent);(0,P.a)({entity:D,historyEvent:F});const W=(0,O.u)();(0,r.useEffect)((()=>{if(p){const e=L!==d.configHash,{views:n,layout:r}=(0,m.Mfk)({views:e||!d.views?t.views:d.views,layout:e?t.layout:d.layout});j(n),f(r)}}),[p]),(0,r.useEffect)((()=>{s(v.N5.views.actions.profileViewsSet(b))}),[s,b]),(0,r.useEffect)((()=>{t.sidePanelViews&&s(v.N5.sidePanelViews.actions.sidePanelViewsLoaded(t.sidePanelViews))}),[t]),(0,r.useEffect)((()=>{c.current&&(c.current.scrollTop=0)}),[null==D?void 0:D.uri]),(()=>{const e=(0,o.useDispatch)(),t=(0,o.useSelector)(v.ZP.selectors.getValidateReadMode),n=(0,o.useSelector)(v.ZP.selectors.getEntity)||{},{uri:a,updatedTime:l}=n,i=(0,m.biM)(n),s=(0,o.useSelector)(v.ZP.selectors.getMode),c=(0,o.useSelector)(v.ZP.selectors.getProfileViews),u=c&&c.length>0,p=(0,r.useCallback)((0,m.DsO)((t=>{t&&e(v.N5.actions.validateProfile())}),500),[e]);(0,r.useEffect)((()=>{const e=t&&!i&&a&&!(0,m.ZiX)(a)&&s===m.ARY.Viewing&&u;p(e)}),[p,i,t,l,a,s,u])})();const _=(0,r.useCallback)((e=>{u({layout:e,views:b,configHash:L}),f(e)}),[u,L,b]);return a().createElement(Z.j.Provider,{value:!0},a().createElement(N.s.Provider,{value:H},a().createElement(w.h.Provider,{value:M?z:U},a().createElement(k.O.Provider,{value:V},a().createElement(T.m.Provider,{value:W},a().createElement("div",{className:i.perspectiveView},(!p||!(null!=D&&D.uri))&&a().createElement(R.Z,null),p&&null!=D&&D.uri?a().createElement("div",{className:i.profileContainer},a().createElement("div",{className:i.profileWrapper},a().createElement(Da,null),!M&&a().createElement(Oo,null),a().createElement("div",{ref:c,className:i.scrollWrapper},a().createElement(wa,{layout:g,onLayoutChanged:_,views:b}))),a().createElement(po,null)):a().createElement("div",{className:i.emptyState},a().createElement(I.ZP,{LogoRenderer:I.B9.NO_DATA,text:h().text("No data to display."),variant:I.tC.embedded}))))))))}));No.displayName="ProfilePerspectiveView";const ko=(0,s.createGenerateClassName)({productionPrefix:"profilePerspective",disableGlobal:!0}),To=e=>{let{config:t,store:n,onResize:f=i.identity,saveState:h,getSavedState:b,qxSandboxApi:y}=e;const v=(0,r.useCallback)((0,m.aYu)(b),[b]),E=(0,r.useMemo)((()=>(0,m.Vr9)(t)),[t]);return a().createElement(o.Provider,{store:n},a().createElement(p.m.Provider,{value:E.id},a().createElement(g.Provider,{value:y},a().createElement(s.StylesProvider,{generateClassName:ko},a().createElement(u.MuiPickersUtilsProvider,{utils:l.Z},a().createElement(c.Z,{handleHeight:!0,onResize:(e,t)=>f(Math.floor(e),Math.floor(t))}),E&&a().createElement(No,{config:E,saveState:h,getSavedState:v}),a().createElement(d.Z,{showErrorFromStore:!0}))))))};var Ro=n(66072),Io=n(79935),jo=n(91131);const Lo=(0,J.Z)((e=>({titleContainer:{overflow:"hidden",fontSize:"16px",fontWeight:"normal",whiteSpace:"nowrap",textOverflow:"ellipsis",alignItems:"center",display:"flex",minHeight:"48px",color:e.palette.text.secondary},link:{fontSize:"16px",fontWeight:"normal"},icon:{height:"18px",color:e.palette.text.secondary},totalCaption:{lineHeight:"inherit",fontSize:"14px",color:"rgba(0,0,0,0.6)",flexShrink:0,marginRight:"5px"},totalNumber:{fontSize:"16px",color:"rgba(0,0,0,0.87)",marginRight:"5px",fontWeight:500}}))),Do=e=>{let{total:t=0}=e;const n=Lo(),l=(0,o.useDispatch)(),i=(0,r.useContext)(p.m),s=(0,r.useCallback)((()=>{l(v.ui.actions.openPerspective({perspectiveId:"profile",viewId:i}))}),[l,i]);return a().createElement(W.Z,{title:""},a().createElement("div",{className:n.titleContainer},a().createElement(Wr.Z,{component:"button",variant:"caption",className:n.link,onClick:s,underline:"none"},h().text("Profile")),a().createElement(jo.Z,{className:n.icon}),h().text("Tags")),a().createElement(Io.Z,null),a().createElement(F.Z,{className:n.totalCaption,variant:"caption"},a().createElement("span",{className:n.totalNumber},h().number(t,"0,0")),h().text("total profiles")))};var Mo=n(20404),Ao=n(15223);const Uo=(0,J.Z)((e=>({toolbar:{display:"flex",flexShrink:0,background:"white",borderBottom:"1px solid rgba(0,0,0,0.1)",boxSizing:"border-box",paddingLeft:"16px"},avatar:{color:"rgba(0, 0, 0, 0.38)",marginRight:"12px"},label:{fontSize:"20px",letterSpacing:"0.25px",lineHeight:"1.2",fontWeight:500,color:e.palette.text.primary,wordBreak:"break-word"}}))),zo=e=>{let{label:t}=e;const n=Uo();return a().createElement(Ao.Z,{className:n.toolbar},a().createElement(Mo.Z,{className:n.avatar}),a().createElement(F.Z,{variant:"h6",className:n.label},t))};function Ho(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Vo(e,t,n[t])}))}return e}function Vo(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Fo=(0,J.Z)((e=>({perspectiveView:{position:"absolute",top:0,left:0,right:0,bottom:0,fontFamily:"Roboto, Helvetica, Arial, sans-serif",overflow:"hidden",display:"flex",flexDirection:"column",backgroundColor:e.palette.background.default},tagsContainer:{display:"flex"},fullHeight:{flexGrow:1,height:0},tagsView:{margin:"16px",width:"100%",paddingTop:"4px"},listContainer:{flex:1,display:"flex",overflow:"hidden",position:"relative",flexDirection:"column",minHeight:"4px"},entitiesList:{overflowY:"auto",flexGrow:1},pagination:{flexGrow:0}}))),Wo=[25,50,100],_o=(0,r.memo)((e=>{let{tag:t,entityUri:n}=e;const l=Fo(),[s,c]=(0,r.useState)(Wo[0]),[u,p]=(0,r.useState)(0),d=(0,o.useSelector)(v.ZP.selectors.getGlobalSearchRequestOptions);(0,r.useEffect)((()=>{p(0)}),[t,n,d]);const{isLoading:g,total:f,entities:b}=(e=>{let{tag:t,entityUri:n,page:a=0,rowsPerPage:l=50}=e;const s=(0,o.useDispatch)(),c=(0,Se._)(),u=(0,Se._)(),[p,d]=(0,r.useState)(!1),[g,f]=(0,r.useState)(0),[b,y]=(0,r.useState)([]),{requestEntities:E,requestTotal:x}=(e=>{let{entityUri:t,tag:n}=e;const a=(0,o.useSelector)(v.ZP.selectors.getGlobalSearchRequestOptions),l=(0,o.useSelector)(v.ZP.selectors.getTenant),s=(0,o.useSelector)(v.ZP.selectors.getDtssPath),c=(0,r.useMemo)((()=>(0,m.Do$)(t)),[t]),u=(0,r.useMemo)((()=>[{filter:"equals",fieldName:"tags",values:[n]}]),[n]),p=!!c,d=(0,r.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t=Ho({select:"uri,label,type,secondaryLabel,defaultProfilePicValue,startDate,endDate"},arguments.length>1&&void 0!==arguments[1]?arguments[1]:{});return p?(0,m.uqV)({filters:e,options:t,customerTenant:l,dataTenant:c,dtssPath:s}).then((0,i.map)((0,i.assoc)("dataTenant",c))):(0,m.ZOr)(e,t)}),[p,c,l,s]);return{requestEntities:(0,r.useCallback)(((e,t)=>d(u,Ho({offset:t,max:e},a))),[u,a,d]),requestTotal:(0,r.useCallback)((()=>{const e=a;return(p?(0,m.J$m)({filters:u,options:e,customerTenant:l,dataTenant:c,dtssPath:s}):(0,m.j_Q)(u,e)).then((e=>e.total))}),[u,a,p,c,l,s])}})({entityUri:n,tag:t}),w=(0,r.useCallback)((e=>{s(v.ui.actions.errorSet((0,m.xU7)(e,h().text("Something went wrong")))),f(0)}),[s]);return(0,r.useEffect)((()=>{c(x()).then(f).catch(w)}),[x,c,w]),(0,r.useEffect)((()=>{d(!0),u(E(l,a*l)).then(y).catch(w).finally((()=>d(!1)))}),[a,l,E,u,w]),{isLoading:p,total:g,entities:b}})({tag:t,entityUri:n,page:u,rowsPerPage:s}),y=(0,r.useRef)(null);(0,r.useEffect)((()=>{y.current&&(y.current.scrollTop=0)}),[b]);const E=f>Wo[0];return a().createElement("div",{className:l.perspectiveView},a().createElement(zo,{label:t}),a().createElement("div",{className:D()(l.tagsContainer,{[l.fullHeight]:E})},a().createElement(z.Z,{className:l.tagsView},a().createElement(Do,{total:f}),a().createElement("div",{className:l.listContainer},g&&a().createElement(R.Z,null),f>0&&a().createElement("div",{className:l.entitiesList,ref:y},a().createElement(Ro.Z,{entities:b})),E&&a().createElement("div",{className:l.pagination},a().createElement(H.Z,{count:f,rowsPerPageOptions:Wo,rowsPerPage:s,page:u,onChangePage:p,onChangeRowsPerPage:c}))))))}));_o.displayName="TagPerspectiveView";const Bo=(0,s.createGenerateClassName)({productionPrefix:"tagPerspective",disableGlobal:!0}),Go=e=>{let{config:t,tag:n,entityUri:r,store:l,onResize:u=i.identity}=e;return a().createElement(o.Provider,{store:l},a().createElement(p.m.Provider,{value:t.id},a().createElement(s.StylesProvider,{generateClassName:Bo},a().createElement(c.Z,{handleHeight:!0,onResize:(e,t)=>u(Math.floor(e),Math.floor(t))}),t&&a().createElement(_o,{tag:n,entityUri:r}),a().createElement(d.Z,{showErrorFromStore:!0}))))}},1242:(e,t,n)=>{e.exports=n.p+"5271a9e7b6651c852e93.png"}}]);
|