@reltio/remotes 1.4.1428 → 1.4.1429
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/1375.js +1 -1
- package/1375.js.map +1 -1
- package/2114.js +1 -1
- package/2114.js.map +1 -1
- package/2473.js +2 -0
- package/2473.js.map +1 -0
- package/2890.js +1 -1
- package/2890.js.map +1 -1
- package/3118.js +1 -1
- package/3118.js.map +1 -1
- package/3273.js +1 -1
- package/3273.js.map +1 -1
- package/3294.js +1 -1
- package/3294.js.map +1 -1
- package/3469.js +1 -1
- package/3469.js.map +1 -1
- package/3540.js +1 -1
- package/3540.js.map +1 -1
- package/3554.js +1 -1
- package/3554.js.map +1 -1
- package/3575.js +1 -1
- package/3575.js.map +1 -1
- package/4015.js +1 -1
- package/4015.js.map +1 -1
- package/4183.js +1 -1
- package/4183.js.map +1 -1
- package/4407.js +1 -1
- package/4407.js.map +1 -1
- package/447.js +1 -1
- package/447.js.map +1 -1
- package/461.js +1 -1
- package/461.js.map +1 -1
- package/4843.js +1 -1
- package/4889.js +1 -1
- package/4889.js.map +1 -1
- package/5400.js +1 -1
- package/5400.js.map +1 -1
- package/5605.js +2 -0
- package/5605.js.map +1 -0
- package/5706.js +1 -1
- package/5706.js.map +1 -1
- package/5709.js +1 -1
- package/5709.js.map +1 -1
- package/5756.js +1 -1
- package/5756.js.map +1 -1
- package/6103.js +1 -1
- package/6103.js.map +1 -1
- package/6233.js +1 -1
- package/6233.js.map +1 -1
- package/6312.js +1 -1
- package/6312.js.map +1 -1
- package/6617.js +1 -1
- package/6617.js.map +1 -1
- package/6669.js +1 -1
- package/6669.js.map +1 -1
- package/8051.js +1 -1
- package/8051.js.map +1 -1
- package/84.js +1 -1
- package/84.js.map +1 -1
- package/8443.js +1 -1
- package/8443.js.map +1 -1
- package/8448.js +1 -1
- package/8448.js.map +1 -1
- package/9043.js +1 -1
- package/9043.js.map +1 -1
- package/9113.js +1 -1
- package/9113.js.map +1 -1
- package/9258.js +1 -1
- package/9258.js.map +1 -1
- package/9364.js +1 -1
- package/9364.js.map +1 -1
- package/package.json +1 -1
- package/remoteEntry.js +1 -1
- package/remoteEntry.js.map +1 -1
- package/1478.js +0 -2
- package/1478.js.map +0 -1
- package/3937.js +0 -2
- package/3937.js.map +0 -1
package/2473.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[2473],{2294:(e,t,r)=>{"use strict";r.d(t,{ViP:()=>el,IL3:()=>Qf,PY2:()=>vn,Ng6:()=>Se,YJ7:()=>fn,NlI:()=>rn,XYV:()=>pn,Xt7:()=>ge,wfT:()=>ii,EMD:()=>qn,HAc:()=>Ae,PEf:()=>Pn,oA3:()=>Yn,$XE:()=>Be,eWf:()=>An,q7e:()=>Ne,KVe:()=>ai,WVQ:()=>wr,oZZ:()=>fi,bNA:()=>Ti,Rjq:()=>Ei,G39:()=>Sn,W0P:()=>Ze,X1H:()=>Je,hdG:()=>rt,ws7:()=>nt,VI$:()=>tt,yn8:()=>$e,N0y:()=>xe,dZX:()=>Ye,bQt:()=>hi,oS0:()=>at,KfU:()=>_e,bZE:()=>un,Nsj:()=>En,psV:()=>yn,xPW:()=>gn,pyR:()=>zn,p8l:()=>Qn,Wkf:()=>ve,zHr:()=>Oe,NIO:()=>be,$26:()=>Lg,Esk:()=>$n,s9T:()=>Fe,MEy:()=>xu,j5E:()=>tn,vAw:()=>Bn,NMQ:()=>Wn,eVu:()=>ic,YGb:()=>ze,mNm:()=>Jn,Y1q:()=>Jm,s_5:()=>Zn,RgZ:()=>Kn,unl:()=>yi,Qy0:()=>mi,pYu:()=>xn,wIJ:()=>a_,GFH:()=>Ie,Ury:()=>wn,S91:()=>In,p3$:()=>gi,wSh:()=>ee,BDP:()=>Di,pGS:()=>Xn,ARY:()=>ot,XGc:()=>ni,fO_:()=>Gr,wwy:()=>je,h_8:()=>Cn,_XL:()=>Tn,j2V:()=>oi,dMV:()=>ti,NBX:()=>iN,OXy:()=>st,BXd:()=>Ve,KM9:()=>Re,CJB:()=>ui,lXI:()=>Qe,nqG:()=>Oi,C68:()=>Rn,yxQ:()=>bi,Yj_:()=>Le,D25:()=>Ce,ZIY:()=>qe,Tl4:()=>d_,lwr:()=>Nn,NkU:()=>si,Rtp:()=>ri,YGx:()=>Ge,uTS:()=>ei,MCv:()=>Pe,IYE:()=>Hn,PiC:()=>di,MVv:()=>et,h_m:()=>Ke,DUe:()=>cn,tJI:()=>we,fDt:()=>Ue,cNQ:()=>li,SwE:()=>Vn,ZHR:()=>pi,PYu:()=>Xe,lD1:()=>Un,lVm:()=>We,vnX:()=>ag,$x5:()=>og,_R1:()=>ng,wUm:()=>ig,z7V:()=>vi,dC6:()=>Me,MBD:()=>De,GmF:()=>pa,cKm:()=>He,iP_:()=>_n,NVC:()=>ke,tPT:()=>Rl,tZe:()=>pT,kRE:()=>FE,psB:()=>ME,X0$:()=>Pl,zE1:()=>Fl,Wm5:()=>El,vyX:()=>$c,wLZ:()=>Sl,W4V:()=>le,EtK:()=>Ls,Wtd:()=>Nl,asT:()=>EN,kGs:()=>_h,ewt:()=>dd,O_f:()=>Uu,sOy:()=>Ct,Tde:()=>lr,LMI:()=>_c,skb:()=>tA,sPt:()=>fc,sH1:()=>Tc,lPZ:()=>Cy,bG8:()=>Uy,_LJ:()=>Dy,RPM:()=>Md,h27:()=>Dc,Uqd:()=>xc,xG:()=>fA,Z2f:()=>hv,fgW:()=>L_,I69:()=>oA,ZxB:()=>lA,dwd:()=>Iy,F$g:()=>wy,mdt:()=>xh,Qbq:()=>uh,rny:()=>Qi,UEY:()=>Ca,Q0T:()=>Ua,Lyr:()=>xa,sBn:()=>Ia,itK:()=>Pa,H9$:()=>wa,KPc:()=>Sa,zos:()=>Ra,ELQ:()=>$a,dZs:()=>Ea,Cz4:()=>Ta,z_L:()=>Fa,fGe:()=>fa,iuF:()=>Aa,Wib:()=>Na,Hn0:()=>Ma,obS:()=>Va,E$L:()=>ma,XUh:()=>_a,Qp_:()=>va,_jk:()=>ha,sKE:()=>ba,WmG:()=>ga,QKx:()=>La,Oik:()=>ja,s0A:()=>Oa,o9m:()=>Da,MCd:()=>ka,RsS:()=>jc,tGK:()=>ou,lIv:()=>Ml,Vg3:()=>ta,mkC:()=>Gi,xv5:()=>na,a14:()=>Bi,yv0:()=>ra,Zm0:()=>Wi,Nxd:()=>Vi,$mM:()=>ea,ifj:()=>Ur,NWi:()=>xv,xr3:()=>Mv,wNf:()=>Eu,iJH:()=>$v,d89:()=>Mi,Edd:()=>xi,Z5t:()=>$i,uGe:()=>Li,UoR:()=>ji,xvW:()=>Fv,$qe:()=>kv,yPM:()=>ya,$cp:()=>kl,vKJ:()=>jl,VtG:()=>nf,AID:()=>Lm,B1H:()=>rN,b7X:()=>oh,$uE:()=>Ph,keo:()=>lh,C_p:()=>vy,G27:()=>Bb,JA0:()=>PE,b3T:()=>gh,oC6:()=>Oh,_Zs:()=>vh,epC:()=>Sh,YYG:()=>Rh,f_2:()=>SE,w3l:()=>MA,QHB:()=>Wb,Jso:()=>YA,RXH:()=>Sb,Vr9:()=>Zb,lMm:()=>JO,BlA:()=>PN,fmQ:()=>Rs,yRD:()=>NA,NcL:()=>Ry,QK6:()=>fe,ymd:()=>Hf,JV_:()=>ZE,XiW:()=>Yp,Yrx:()=>yE,GPx:()=>Al,gjI:()=>_l,vlo:()=>Id,E_P:()=>Dh,aAL:()=>jf,NBq:()=>Ss,wp9:()=>Mh,DsR:()=>Sf,MPc:()=>Up,gWE:()=>Cp,DT_:()=>Dp,ipn:()=>Lp,ORg:()=>wi,_wz:()=>jp,RYR:()=>sd,PP2:()=>hE,wS7:()=>Rv,cBQ:()=>df,pBq:()=>bm,DsO:()=>te,X78:()=>tm,xZs:()=>KE,YFy:()=>TE,Gmt:()=>GE,K$w:()=>VE,DSj:()=>Lf,Mfr:()=>EE,k9j:()=>ff,EjS:()=>X,ww$:()=>wl,WVU:()=>$E,hxF:()=>hl,n6p:()=>Vr,E7G:()=>Sp,nwO:()=>wN,Mzk:()=>sf,aFF:()=>Th,HRH:()=>Gu,EZK:()=>zc,Kxm:()=>Qc,Z9i:()=>ry,CrF:()=>DE,DNd:()=>Wa,vUy:()=>vN,lJh:()=>qu,zHo:()=>Hu,sEJ:()=>oN,UO$:()=>Nm,zeJ:()=>fr,dLR:()=>xs,JQy:()=>Xs,XtP:()=>Fs,Ug0:()=>zr,A1W:()=>sh,sw:()=>Xc,nv3:()=>Qv,JgD:()=>Hv,nve:()=>sN,SkP:()=>zs,SAs:()=>vm,i5L:()=>Zs,PWK:()=>Go,IM5:()=>Ms,Aup:()=>zb,Mfk:()=>tv,HQx:()=>rs,oN$:()=>ts,mB6:()=>vv,p6d:()=>w,o0x:()=>U,ufS:()=>lv,k7L:()=>uv,mrB:()=>I,OuZ:()=>Zc,ncP:()=>Pt,W$R:()=>ep,JOV:()=>Ot,Zmi:()=>vt,hm5:()=>_t,ECL:()=>jr,vPL:()=>tp,qmL:()=>Km,hPi:()=>mm,hXd:()=>Ji,OCS:()=>Xi,p2l:()=>rl,qF1:()=>Kf,_X$:()=>Jf,yj2:()=>t_,bzh:()=>Gh,k66:()=>zo,kiP:()=>fo,pSg:()=>pe,kz_:()=>gE,H_U:()=>es,t9e:()=>Ja,j2$:()=>dT,PFL:()=>Xt,aJ3:()=>Pg,To9:()=>ur,wpo:()=>vp,ADq:()=>Xd,UUb:()=>Kd,tQX:()=>Jd,xy8:()=>tr,EUG:()=>Tr,AFK:()=>Mt,X3M:()=>yr,WN0:()=>Zo,kDl:()=>$s,uDV:()=>Qm,IhQ:()=>qs,pfb:()=>Qs,R$r:()=>Ch,w80:()=>Io,Pfu:()=>Qa,Gtj:()=>Xl,fyF:()=>Jl,kkq:()=>Xo,u5q:()=>Rt,O$n:()=>bp,ptG:()=>Op,f4_:()=>Xh,uap:()=>Jh,d7q:()=>dE,liG:()=>bE,$oF:()=>pE,avf:()=>Od,DiQ:()=>bd,cfX:()=>hd,vD3:()=>gd,Qrb:()=>md,EJQ:()=>vd,HWy:()=>Ed,gjS:()=>cd,y6v:()=>Td,JUW:()=>wE,GtP:()=>cb,_kX:()=>Ya,u1e:()=>qa,sJj:()=>dh,CJp:()=>lb,uKF:()=>ph,wo0:()=>kE,s5:()=>Yo,cwx:()=>Bo,Y6b:()=>tE,TTx:()=>qE,UtR:()=>rE,HaQ:()=>HE,E6I:()=>CE,Won:()=>iE,vTU:()=>ZT,Nsy:()=>up,KMQ:()=>fh,Do$:()=>yp,CSV:()=>al,TMe:()=>nE,l1V:()=>Ku,RHh:()=>nc,VQ1:()=>tc,cGG:()=>ec,z7d:()=>Ud,Xaq:()=>as,Sj8:()=>AN,PJj:()=>nu,k3T:()=>en,PjQ:()=>Ui,s7l:()=>Xy,jLA:()=>pb,GGR:()=>Pd,j5q:()=>Ad,DnY:()=>Qy,RY5:()=>Gm,Px$:()=>ld,KPC:()=>ZA,NIY:()=>af,HvW:()=>Zy,Fof:()=>Xa,BXy:()=>ef,fX:()=>db,BTI:()=>Tp,uie:()=>ip,q27:()=>_p,vrC:()=>dO,fAQ:()=>am,XkT:()=>Hy,lrH:()=>om,nt9:()=>Hr,XH8:()=>hp,XH2:()=>Zr,jFi:()=>mp,qhs:()=>wo,wwR:()=>fp,Uk3:()=>xt,$Rg:()=>qt,ev7:()=>nN,RB9:()=>NE,iFp:()=>$d,e$p:()=>Gd,PcX:()=>Wd,SpP:()=>Vd,R6_:()=>Sg,CY1:()=>kg,Ajk:()=>Gy,Yiz:()=>Vy,FK9:()=>Ly,UOo:()=>cv,aTW:()=>BE,uug:()=>Tu,P$2:()=>xg,XS2:()=>su,Hyb:()=>Ru,d3Y:()=>Bc,Klp:()=>qc,WxZ:()=>$g,Gzu:()=>Qu,ZOr:()=>qy,uqV:()=>JT,Pm4:()=>ne,hWO:()=>Lt,nHA:()=>eb,nVD:()=>Bm,_tF:()=>sc,dED:()=>uE,P2h:()=>lE,jrr:()=>uo,mmY:()=>po,T6O:()=>ns,h6J:()=>lT,hM2:()=>QA,XR6:()=>z,jmz:()=>Hm,IHt:()=>qm,NZI:()=>ty,wdF:()=>nm,YNv:()=>ah,IFm:()=>ih,o_F:()=>zm,kgP:()=>im,ZYI:()=>Wf,QXK:()=>ql,efz:()=>Hl,Q5d:()=>Yl,Ysv:()=>Ql,UWq:()=>jd,ocC:()=>Dd,io3:()=>Jr,Sbt:()=>Co,roS:()=>Uo,Ww1:()=>Do,QaS:()=>lf,ERZ:()=>kA,CL1:()=>KA,idV:()=>Jc,nIW:()=>jt,fjE:()=>wg,sG0:()=>yv,tV7:()=>iu,g8o:()=>c_,Qy:()=>u_,t2P:()=>Ng,KbW:()=>bo,wId:()=>vo,LS0:()=>go,bFH:()=>FT,Rgl:()=>xT,fW1:()=>Wh,GFW:()=>QE,Ywp:()=>Zv,pg:()=>bT,WSA:()=>$T,fed:()=>qA,tT_:()=>Hs,BgZ:()=>Ks,xIV:()=>Js,KbL:()=>Jy,JBA:()=>Wt,aNC:()=>qv,RFJ:()=>Gf,Zeh:()=>Am,OT5:()=>zv,mC3:()=>$l,kR6:()=>NN,gFw:()=>zh,NVY:()=>kh,k6v:()=>Xf,FEC:()=>zf,L5S:()=>jh,Ob5:()=>Ap,KUV:()=>Np,dvH:()=>Lh,V3i:()=>rO,VD3:()=>Xr,mm2:()=>Zu,rou:()=>ym,izH:()=>Ha,DK$:()=>Ka,KMp:()=>Df,c31:()=>ct,mbo:()=>Zd,gT8:()=>yt,CZ8:()=>Ns,uGi:()=>Us,Poc:()=>lt,_9k:()=>js,ZTM:()=>ws,bwT:()=>Cs,tzW:()=>Tt,tF$:()=>dt,o96:()=>Ps,M4S:()=>Ds,_vs:()=>Pf,xF8:()=>pd,PUO:()=>Eh,ATu:()=>zd,j1S:()=>Ri,V3K:()=>Ni,Lmx:()=>Pi,oSN:()=>Ci,ZaZ:()=>ut,n_1:()=>zT,N6e:()=>If,SxO:()=>co,w3p:()=>Fh,xU7:()=>ye,Y_p:()=>ko,$k6:()=>Lo,Gdl:()=>Tv,U6P:()=>fv,OwB:()=>Rg,hTh:()=>Ym,xqc:()=>qo,JvE:()=>Ho,i29:()=>Sc,dzT:()=>qi,uPS:()=>pf,cZV:()=>cf,n3B:()=>G_,e6O:()=>k_,s7j:()=>i_,j$Q:()=>IE,kW2:()=>ub,tH7:()=>Wo,Yxg:()=>cl,MaZ:()=>Nd,nqN:()=>_d,jWj:()=>kd,o_J:()=>os,yW4:()=>uT,uT0:()=>oT,C82:()=>sT,bsH:()=>Zh,u9Z:()=>dm,J$m:()=>XT,j_Q:()=>Fy,OaI:()=>My,wB1:()=>tN,SP6:()=>hT,ZYr:()=>zA,IMU:()=>Vf,FoU:()=>RE,DVz:()=>Ov,mxe:()=>$_,FHr:()=>gm,D1g:()=>fm,VO3:()=>cg,de5:()=>ug,Uw1:()=>me,J6q:()=>ey,XCe:()=>oo,fbl:()=>eg,Ir:()=>mo,XQO:()=>ho,QXb:()=>IT,zXF:()=>Xm,P8_:()=>XE,iiD:()=>Cf,MOC:()=>UT,WF:()=>wT,xE1:()=>Ii,idW:()=>fN,QWZ:()=>av,YL3:()=>of,Fn9:()=>T,j2U:()=>tl,MpE:()=>Et,kQw:()=>Zt,mfm:()=>Su,vZp:()=>$t,E8K:()=>cN,VSb:()=>_s,vr_:()=>zt,Vmh:()=>ON,FgW:()=>tO,oDv:()=>ls,fGG:()=>ov,kuw:()=>cs,eHk:()=>Ld,Tt2:()=>ss,pQZ:()=>ps,oZ7:()=>sv,T6Y:()=>Ar,_26:()=>Au,YkM:()=>sr,J6y:()=>cu,njU:()=>hu,TBP:()=>us,IT0:()=>ny,x_:()=>yh,FP6:()=>Yt,biM:()=>pp,TMl:()=>dp,Vkd:()=>vu,WiY:()=>Dg,_zi:()=>gu,RZp:()=>Sy,J6D:()=>zu,Lt4:()=>hr,QEi:()=>pr,whI:()=>Br,KIu:()=>qr,JhM:()=>se,C_0:()=>Rr,lzc:()=>Rp,qIF:()=>W_,O27:()=>E,aBi:()=>gp,xOX:()=>Tl,EdS:()=>It,WgC:()=>wt,eEv:()=>Kt,A4t:()=>bu,YOQ:()=>Gt,Wos:()=>gr,jWr:()=>Ga,Or$:()=>or,lhE:()=>Kr,CwH:()=>cr,pzC:()=>dl,ymH:()=>mu,QZu:()=>ir,rYH:()=>Cg,FVt:()=>vr,Kn2:()=>ce,jgw:()=>wu,Qgr:()=>Xu,OXP:()=>gs,lS4:()=>dr,g5f:()=>jg,fp6:()=>yu,Uty:()=>oa,YkG:()=>ar,xdS:()=>ft,kMF:()=>kp,$NE:()=>Ut,bC9:()=>St,Ian:()=>Si,KVV:()=>ch,q9e:()=>jo,iIf:()=>Ev,ian:()=>bl,m6e:()=>Sr,OFd:()=>yl,kqr:()=>er,fnZ:()=>Wr,VFZ:()=>Ol,ZiX:()=>At,j5n:()=>br,zkt:()=>_,Pcm:()=>eN,QDV:()=>pl,M5u:()=>Ug,laD:()=>V_,mtq:()=>Qt,CtB:()=>mv,CBv:()=>oe,I0t:()=>Pr,u1G:()=>wd,gk1:()=>M_,Bgb:()=>F_,uzs:()=>Yr,v0l:()=>pc,Zqp:()=>aE,j0k:()=>Vo,tCm:()=>Ft,gmx:()=>lu,mOr:()=>$u,TwZ:()=>p_,GyU:()=>Kv,zGm:()=>gT,bMg:()=>BT,EyD:()=>jv,FQA:()=>Lv,fZN:()=>HT,xsF:()=>Cv,Lxg:()=>Dv,O3l:()=>Ef,Wni:()=>Tf,wRx:()=>Gv,OxG:()=>jT,uJQ:()=>DT,qWg:()=>bv,i96:()=>OT,NPd:()=>Yu,zhn:()=>Vv,G8q:()=>_i,Jct:()=>rd,A9Y:()=>re,Y5F:()=>SA,gxP:()=>ue,c$P:()=>uu,M7o:()=>Mc,BBN:()=>lo,ZBU:()=>J,UkJ:()=>_o,xkv:()=>JE,z$M:()=>TN,KAm:()=>AE,lCl:()=>km,rkF:()=>gy,IU6:()=>mT,RGr:()=>h,aYu:()=>m,ije:()=>tu,Buf:()=>Uf,YLu:()=>eu,ct9:()=>Mo,XkY:()=>YT,T5R:()=>_T,uQS:()=>QT,wcJ:()=>Fo,d$I:()=>Il,rSp:()=>cp,Sx:()=>rf,Ilm:()=>xl,Ki6:()=>ml,VGk:()=>Rf,sFD:()=>wb,eWN:()=>mN,dWE:()=>n_,Lkd:()=>qp,aDL:()=>Pm,yaA:()=>KT,lOh:()=>Em,DBr:()=>gg,hK$:()=>au,TZ_:()=>ET,CMB:()=>B_,FU8:()=>tf,J$p:()=>Im,b5s:()=>wm,h2W:()=>kt,SL_:()=>um,oUH:()=>nT,ck9:()=>AT,RAb:()=>oc,nL:()=>dv,k$p:()=>Ub,Xs0:()=>Zl,u7I:()=>Tm,rxg:()=>Du,bji:()=>ju,oCZ:()=>my,MjG:()=>lg,FuV:()=>rT,$ju:()=>aT,t6d:()=>iT,m5F:()=>Ee,sx:()=>hN,rSc:()=>gv,U10:()=>xy,L8n:()=>xE,R9X:()=>eE,rj2:()=>em,_C4:()=>yT,tCj:()=>zE,uAg:()=>fE,wx9:()=>yd,KF3:()=>fT,ax9:()=>TT,HH7:()=>wf,ufV:()=>mE,_6y:()=>yf,XTh:()=>rg,AJo:()=>uf,Ixr:()=>UE,P6Y:()=>IN,Bd_:()=>yy,xkB:()=>dy,W41:()=>pm,WkI:()=>cm,sSE:()=>py,GMd:()=>Ac,jtL:()=>Nc,Bxm:()=>Ty,FVh:()=>oy,U_T:()=>VT,FTe:()=>ae,VGB:()=>ie,tM8:()=>Lu,Wfe:()=>Bu,Ls5:()=>Wu,$bd:()=>Fu});var n={};r.r(n),r.d(n,{normalize:()=>u,removeLineBreaks:()=>d,search:()=>c,sort:()=>p});var i={};r.r(i),r.d(i,{clearDateTime:()=>g,durationToTimestamp:()=>X,formatDate:()=>w,formatDateTime:()=>U,formatTime:()=>I,getEndOfDay:()=>S,getMomentFormatFromDateMask:()=>q,getMomentFormatFromDateTimeMask:()=>K,getMomentFormatFromTimeMask:()=>Q,getStartOfDay:()=>R,isToday:()=>_,isValidMomentDate:()=>b,isValidMomentDateOrNull:()=>O,momentToDate:()=>v,parseTimestamp:()=>J,toLocalDate:()=>A,toUtcDate:()=>N});var a={};r.r(a),r.d(a,{addAttribute:()=>fs,editAttribute:()=>Ts,editEndDate:()=>vs,editRoles:()=>hs,editStartDate:()=>Os,editTags:()=>bs,removeAttribute:()=>ms});var o={};r.r(o),r.d(o,{applyCrosswalks:()=>_h,collectCrosswalksFromAttributes:()=>Ph,compareActivenessAttributes:()=>gh,compareAttributes:()=>Oh,compareImages:()=>vh,compareRoles:()=>Sh,compareTags:()=>Rh});var s={};r.r(s),r.d(s,{createHistoryManager:()=>Uh});var l=r(17440);const u=e=>"string"==typeof e&&"function"==typeof e.normalize?e.normalize("NFD").replace(/[\u0300-\u036f]/g,""):e,c=(e,t)=>(t=(u(t)||"").toLowerCase(),(e=(u(e)||"").toLowerCase()).includes(t)),p=(0,l.curry)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";const n="asc"===e.toLowerCase();return t=t.toLowerCase(),r=r.toLowerCase(),t<r?n?-1:1:t>r?n?1:-1:0})),d=(0,l.replace)(/(\r\n|\n|\r)/gm,"");var y=r(95038),f=r.n(y);const T=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{startDate:t,endDate:r}=e,n=Date.now();return!(r&&r<n||t&&t>n)},E=(0,l.anyPass)([l.isEmpty,l.isNil]),m=e=>()=>new Promise(e),h=e=>Promise.all(e.map((e=>e.then((e=>({status:"fulfilled",value:e}))).catch((e=>({status:"rejected",reason:e})))))),b=e=>e&&e.isValid(),O=(0,l.either)(b,l.isNil),v=e=>e&&e.toDate(),g=e=>(e&&e.setHours(0,0,0,0),e),_=e=>f()(e).isSame(Date.now(),"day"),A=e=>{const t=new Date(e),r=new Date;return r.setFullYear(t.getUTCFullYear()),r.setDate(t.getUTCDate()),r.setMonth(t.getUTCMonth()),r.setHours(t.getUTCHours()),r.setMinutes(t.getUTCMinutes()),r.setSeconds(t.getUTCSeconds()),r.setMilliseconds(t.getUTCMilliseconds()),r},N=e=>{const t=new Date(e),r=Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds());return new Date(r)},P=e=>(t,r)=>(r?f().utc(t):f()(t))[e]("day").valueOf(),R=P("startOf"),S=P("endOf"),w=e=>f()(e).format(f().localeData().longDateFormat("L")),I=e=>f()(e).format(f().localeData().longDateFormat("LTS")),U=e=>`${w(e)} ${I(e)}`,C=(0,l.equals)("9"),D=(0,l.equals)("99"),j=(0,l.equals)("9999"),L=(0,l.test)(/^[az][az][az]$/),k=(0,l.test)(/^[az][az][az][az]$/),F=(0,l.test)(/^9+$/),M=(0,l.test)(/^[9az]+$/),x=(0,l.cond)([[C,(0,l.always)("M")],[D,(0,l.always)("MM")],[L,(0,l.always)("MMM")],[k,(0,l.always)("MMMM")],[M,(0,l.always)("Mo")],[l.T,(0,l.always)("MM")]]),$=(0,l.cond)([[C,(0,l.always)("D")],[D,(0,l.always)("DD")],[M,(0,l.always)("Do")],[l.T,(0,l.always)("DD")]]),V=(0,l.cond)([[C,(0,l.always)("y")],[D,(0,l.always)("YY")],[j,(0,l.always)("YYYY")],[F,(0,l.always)("YYYYYY")],[l.T,(0,l.always)("YYYY")]]),G=(e,t)=>(0,l.cond)([[(0,l.both)((0,l.always)(t),C),(0,l.always)("h")],[(0,l.both)((0,l.always)(t),D),(0,l.always)("hh")],[C,(0,l.always)("H")],[D,(0,l.always)("HH")],[l.T,(0,l.always)(t?"hh":"HH")]])(e),W=(0,l.cond)([[C,(0,l.always)("m")],[D,(0,l.always)("mm")],[l.T,(0,l.always)("mm")]]),B=(0,l.cond)([[C,(0,l.always)("s")],[D,(0,l.always)("ss")],[l.T,(0,l.always)("ss")]]),Y=/([9az]+)([^9az]+)*/g,q=e=>{const t=[...e.toLowerCase().matchAll(Y)];if(E(e)||t.length>0){const[,e="",r=""]=(0,l.propOr)([],0,t),[,n="",i=""]=(0,l.propOr)([],1,t),[,a="",o=""]=(0,l.propOr)([],2,t);return(0,l.join)("",[x(e),r,$(n),i,V(a),o])}return e},H=/(9+)([^9]+)*/g,Q=e=>{const t=[...e.toLowerCase().matchAll(H)];if(E(e)||t.length>0){const[,e="",r=""]=(0,l.propOr)([],0,t),[,n="",i=""]=(0,l.propOr)([],1,t),[,a="",o=""]=(0,l.propOr)([],2,t),s=(0,l.pipe)(l.last,(0,l.propOr)("",2),(0,l.test)(/^[^9]+$/))(t),u=(0,l.reject)(l.isEmpty,[G(e,s),r,W(n),i,a?B(a):"",o]),c=s?" A":"",p=(0,l.pipe)(l.init,(0,l.append)(c));return(0,l.pipe)((0,l.when)((0,l.always)(s),p),(0,l.join)(""))(u)}return e},K=e=>{const[t="",r=""]=(0,l.pipe)((0,l.indexOf)(" "),l.inc,(0,l.splitAt)(l.__,e),(0,l.map)(l.trim))(e);return`${q(t)} ${Q(r)}`},J=e=>{const t=Number(e);return Number.isNaN(t)?e:t},X=e=>{const[t,r]=e;return f()().subtract(t,r).valueOf()},z=e=>e&&0!=e.length?e.split("").map((e=>e.charCodeAt())).reduce(((e,t)=>0|(e=(e<<5)-e+t)),0)+"":"0",Z=e=>({isNone:()=>(0,l.isNil)(e),extract:()=>e,orSome:t=>(0,l.isNil)(e)?t:e,map:t=>(0,l.isNil)(e)?ee.None():ee.Some(t(e))}),ee={Some:Z,None:()=>Z(null),chain:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return e=>t.reduce(((e,t)=>e.map(t)),e)},fromFalsy:function(e){return e?ee.Some(e):ee.None()},fromNull:function(e){return null==e?ee.None():ee.Some(e)},fromUndefined:function(e){return void 0===e?ee.None():ee.Some(e)},fromEmpty:function(e){return E(e)?ee.None():ee.Some(e)}},te=(e,t)=>{let r=null;return function(){for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];const o=()=>{e.apply(this,i),r=null};r&&clearTimeout(r),r=setTimeout(o,t)}},re=(e,t)=>(r,n)=>{const i=t?(0,l.prop)(t):l.identity;return e.indexOf(i(r))-e.indexOf(i(n))},ne=(0,l.when)((0,l.is)(Array),(0,l.prop)(0)),ie=e=>Array.isArray(e)?e:[e],ae=e=>[e],oe=e=>!!e&&["www.","http://","https://","ftp://","ftps://","smb://","data:"].some((t=>String(e).toLowerCase().startsWith(t))),se=e=>/^\S+@\S+\.\S+$/.test(String(e).toLowerCase()),le=e=>se(e=e||"")?`mailto:${e}`:!e.includes("://")&&(e.toLowerCase().startsWith("www.")||e.split(".").length>2)?`http://${e}`:e,ue=(0,l.when)((0,l.is)(String),(e=>""===e?void 0:"true"===e.toLowerCase())),ce=e=>null!=e&&["object","function"].includes(typeof e),pe=function(e){const t=[],r=(e,n)=>{n=n||[];for(let i in e)Object.prototype.hasOwnProperty.call(e,i)&&(Array.isArray(e)&&(i=parseInt(i,10)),ce(e[i])?r(e[i],n.concat(i)):t.push(n.concat(i)))};return r(e),t},de=(0,l.when)((0,l.is)(Object),JSON.stringify),ye=(e,t,r)=>{const n=[r,"errorDetailMessage","errorMessage","error"];return(0,l.cond)([...n.map((e=>[(0,l.prop)(e),(0,l.pipe)((0,l.prop)(e),de)])),[(0,l.always)(t),(0,l.always)(t)],[l.T,de]])(e)},fe=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const r=(0,l.sum)(e);if(0===r)return[];const n=e=>+e.toFixed(t),i=e.map(((e,t)=>{const i=e/r*100,a=n(i);return{index:t,percent:a,diff:a-i}})),a=i.reduce(((e,t)=>{let{percent:r}=t;return e+r}),0);let o=n(100-a);if(0===o)return(0,l.pluck)("percent",i);const s=Math.sign(o),u=i.sort(((e,t)=>(e.diff-t.diff)*s||e.index-t.index)),c=(0===t?1:1/Math.pow(10,t))*s;for(let e=0;0!==o&&e<u.length;e++)u[e].percent=n(u[e].percent+c),o=n(o-c);return(0,l.pipe)((0,l.sortBy)((0,l.prop)("index")),(0,l.pluck)("percent"))(u)},Te=/[\n\r%#()<>?[\\\]^`{}|]/g,Ee=e=>`data:image/svg+xml;utf8,${e.replace(/["']\);{0,}$/,"").replace(/'/g,'"').replace(/>\s{1,}</g,"><").replace(/\s{2,}/g," ").replace(Te,encodeURIComponent)}`,me=e=>`data:image/gif;base64,${e}`;var he=r(76665);let be,Oe,ve,ge,_e,Ae,Ne,Pe,Re,Se,we,Ie,Ue,Ce,De,je,Le,ke,Fe,Me,xe,$e,Ve,Ge,We,Be,Ye,qe,He,Qe,Ke,Je,Xe,ze,Ze,et,tt,rt,nt;var it;!function(e){e.missed="missed",e.missedRefEntity="missedRefEntity",e.invalid="invalid"}(be||(be={})),function(e){e.local="local",e.validationService="validationService"}(Oe||(Oe={})),function(e){e.ERROR="ERROR",e.WARNING="WARNING"}(ve||(ve={})),function(e){e[e.OBJECT_NOT_FOUND=101]="OBJECT_NOT_FOUND",e[e.CROSSWALK_NOT_FOUND=102]="CROSSWALK_NOT_FOUND",e[e.TENANT_NOT_CONFIGURED=127]="TENANT_NOT_CONFIGURED",e[e.ACCESS_DENIED=403]="ACCESS_DENIED",e[e.DVF_NOT_CONFIGURED=902]="DVF_NOT_CONFIGURED",e[e.DCR_ALREADY_EXISTS=10015]="DCR_ALREADY_EXISTS",e[e.WORKFLOW_IS_NOT_REGISTERED_ERROR=10061]="WORKFLOW_IS_NOT_REGISTERED_ERROR"}(ge||(ge={})),function(e){e.WITHIN="within",e.AGO="ago",e.BETWEEN="between"}(_e||(_e={})),function(e){e.attributeValue="attributeValue",e.tempEntity="tempEntity",e.relationConnection="relationConnection"}(Ae||(Ae={})),function(e){e.ENTITY_ATTRIBUTE="entityAttribute",e.ENTITY="entity",e.RELATION="relation",e.POTENTIAL_MATCH="potentialMatch",e.RELATION_ATTRIBUTE="relationAttribute"}(Ne||(Ne={})),function(e){e.directed="directed",e.undirected="undirected",e.bidirectional="bidirectional"}(Pe||(Pe={})),function(e){e.asc="asc",e.desc="desc"}(Re||(Re={})),function(e){e.ACTIVE_ONLY="active",e.INACTIVE_ONLY="not_active",e.ALL="all"}(Se||(Se={})),function(e){e.or="or",e.orNot="or not",e.and="and",e.andNot="and not"}(we||(we={})),function(e){e.geoPolygon="geoPolygon",e.geoLocation="geoLocation",e.onMapMove="onMapMove"}(Ie||(Ie={})),function(e){e.TABLE="table",e.List="list",e.MAP="map"}(Ue||(Ue={})),function(e){e.PROFILE="profile",e.MAP="map"}(Ce||(Ce={})),function(e){e.Unmerge="unmerge",e.TreeUnmerge="treeUnmerge"}(De||(De={})),function(e){e.editing="editing",e.addingParent="addingParent",e.addingChild="addingChild"}(je||(je={})),function(e){e.potentialMatchReview="potentialMatchReview",e.dataChangeRequestReview="dataChangeRequestReview",e.recommendForDelete="recommendForDelete"}(Le||(Le={})),function(e){e[e.low=1]="low",e[e.medium=50]="medium",e[e.high=100]="high",e[e.urgent=1e3]="urgent"}(ke||(ke={})),function(e){e.EXISTS="exists",e.MISSING="missing"}(Fe||(Fe={})),function(e){e.UNIQUE="unique",e.NOT_UNIQUE="notUnique"}(Me||(Me={})),function(e){e.FILL_RATE="fillRate",e.LENGTH_STATISTIC="lengthStatistics",e.VALUE_DISTRIBUTION="valueDistribution",e.CROSSWALK_ANALYSIS="crosswalkAnalysis",e.DATA_VALIDATION="dataValidationFunctions",e.FREQUENCY="frequency",e.UNIQUENESS="uniqueness",e.PATTERN="pattern",e.CONSOLIDATION_RATE="consolidationRate"}(xe||(xe={})),function(e){e.ENTITY_TYPE="entityLevel",e.ATTRIBUTE_TYPE="attributeLevel"}($e||($e={})),function(e){e.DELETE_RELATION="DELETE_RELATION",e.CREATE_RELATION="CREATE_RELATION",e.UPDATE_RELATION="UPDATE_RELATION",e.REPOINT_RELATION="REPOINT_RELATION",e.IGNORE_RELATION="IGNORE_RELATION"}(Ve||(Ve={})),function(e){e.IN="in",e.OUT="out"}(Ge||(Ge={})),function(e){e.ACTIVE="ACTIVE",e.INACTIVE="INACTIVE"}(We||(We={})),function(e){e.BAR="bar",e.DONUT="donut",e.PIE="pie",e.TREE="tree",e.TABLE="table",e.BUBBLE="bubble",e.LINE="line",e.MAP="map",e.CLOUD="cloud"}(Be||(Be={})),function(e){e.ActivitiesViewFacet="ActivitiesViewFacet",e.CustomActionViewFacet="CustomActionViewFacet",e.DashboardFacet="DashboardFacet",e.EntitiesByTypeViewFacet="EntitiesByTypeViewFacet",e.FilteredSavedSearchesFacet="FilteredSavedSearchesFacet",e.FilteredEntitiesViewFacet="FilteredEntitiesViewFacet",e.NotificationInboxFacet="NotificationInboxFacet",e.ProfileStatsFacet="ProfileStatsFacet"}(Ye||(Ye={})),function(e){e.Attributes="com.reltio.plugins.entity.attributes.AttributesView",e.HierarchyTree="com.reltio.plugins.react.ReactHierarchyTreeView",e.HierarchyPaths="com.reltio.plugins.entity.HierarchyPathsView",e.RelationsTable="com.reltio.plugins.react.ReactRelationshipTableView",e.Relations="com.reltio.plugins.entity.relations.RelationsView",e.SingleAttribute="com.reltio.plugins.entity.attributes.SingleAttributeView",e.AttributeTable="com.reltio.plugins.entity.attributes.AttributeTableView",e.Custom="com.reltio.plugins.ui.CustomActionView",e.Map="com.reltio.plugins.react.EntityMapView",e.ImageAttribute="com.reltio.plugins.entity.attributes.ImageAttributeView",e.PotentialMatches="com.reltio.plugins.entity.PotentialMatchesView"}(qe||(qe={})),function(e){e.preserveURIs="preserveURIs",e.updateAttributeUpdateDates="updateAttributeUpdateDates",e.validateDataPermissions="validateDataPermissions"}(He||(He={})),function(e){e.DQDashboard="DQDashboardView",e.Dashboard="DashboardView",e.RelationshipSearch="RelationshipSearch",e.ProfileActivityLog="ProfileActivityLogView",e.Interactions="InteractionsView",e.Graph="GraphView",e.Relationships="RelationshipsView",e.PotentialMatches="PotentialMatchesView",e.Sources="SourcesView",e.Profile="ProfileView",e.NestedProfile="NestedProfileView",e.Search="SearchView",e.Tags="Tags",e.Pivoting="Pivoting",e.DCRReview="DCRReview"}(Qe||(Qe={})),function(e){e.CustomAction="CustomAction",e.ConsoleAppAction="ConsoleAppAction"}(Ke||(Ke={})),function(e){e.NEW="new",e.CLASSIC="classic"}(Je||(Je={})),function(e){e.ASC_BY_NAME="ascByName"}(Xe||(Xe={})),function(e){e.SIMPLE_NETWORK="Simple network",e.VERTICAL_TB="Vertical hierarchy",e.HORIZONTAL_LR="Horizontal hierarchy",e.DIRECTED_NETWORK="Directed Network",e.TREE="Tree"}(ze||(ze={})),function(e){e.SET_HTML="setHtml",e.SHOW_POPUP="showPopup",e.HIDE_POPUP="hidePopup",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",e.EVENT="event"}(Ze||(Ze={})),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",e.RELOAD_PAGE="reloadPage"}(et||(et={})),function(e){e.INSERT_ATTRIBUTE="INSERT_ATTRIBUTE",e.UPDATE_ATTRIBUTE="UPDATE_ATTRIBUTE",e.DELETE_ATTRIBUTE="DELETE_ATTRIBUTE",e.PIN_ATTRIBUTE="PIN_ATTRIBUTE",e.IGNORE_ATTRIBUTE="IGNORE_ATTRIBUTE",e.CREATE_ENTITY="CREATE_ENTITY",e.CREATE_RELATIONSHIP="CREATE_RELATIONSHIP",e.UPDATE_TAGS="UPDATE_TAGS",e.UPDATE_ROLES="UPDATE_ROLES",e.UPDATE_START_DATE="UPDATE_START_DATE",e.UPDATE_END_DATE="UPDATE_END_DATE",e.UPDATE_PROFILE_PIC_BY_URL="UPDATE_PROFILE_PIC_BY_URL",e.UPDATE_PROFILE_PIC_BY_URI="UPDATE_PROFILE_PIC_BY_URI",e.DELETE_RELATIONSHIP="DELETE_RELATIONSHIP"}(tt||(tt={})),function(e){e.AWAITING_REVIEW="AWAITING_REVIEW",e.APPLIED="APPLIED",e.REJECTED="REJECTED"}(rt||(rt={})),function(e){e.ADDED="added",e.EDITED="edited",e.DELETED="deleted",e.PINNED="pinned",e.IGNORED="ignored",e.PIN_DELETED="pin_deleted",e.IGNORE_DELETED="ignore_deleted"}(nt||(nt={})),function(e){e.TYPE_STRING="String",e.TYPE_TEXT="Text",e.TYPE_PASSWORD="Password",e.TYPE_LONG="Long",e.TYPE_INT="Int",e.TYPE_DOLLAR="Dollar",e.TYPE_FLOAT="Float",e.TYPE_DOUBLE="Double",e.TYPE_NUMBER="Number",e.TYPE_BOOLEAN="Boolean",e.TYPE_BOOLEAN_RADIO="Boolean_Radio",e.TYPE_DATE="Date",e.TYPE_TIMESTAMP="Timestamp",e.TYPE_ACTIVENESS_DATE="ActivenessDate",e.TYPE_LOCAL_DATE="LocalDate",e.TYPE_BLOB="Blob",e.TYPE_ENUM="Enum",e.TYPE_CIK_ID="cik id",e.TYPE_LOOKUP="Lookup",e.TYPE_TYPEAHEAD="Typeahead",e.TYPE_URL="URL",e.TYPE_BLOG_URL="Blog URL",e.TYPE_IMAGE_URL="Image URL",e.TYPE_EMAIL="Email",e.TYPE_DEPENDENT_LOOKUP="DependentLookup",e.TYPE_ENTITY_ID="EntityId",e.TYPE_RDM_LOOKUPS_NOT_RESOLVED="RdmLookupsNotResolved",e.TYPE_COUNT="Count",e.TYPE_FILE="File",e.TYPE_SELECT="Select",e.TYPE_NESTED="Nested",e.TYPE_REFERENCE="Reference",e.TYPE_IMAGE="Image",e.TYPE_SSN="SSN"}(it||(it={}));const at=it;let ot,st;!function(e){e.Viewing="Viewing",e.Editing="Editing",e.Suggesting="Suggesting"}(ot||(ot={})),function(e){e.Saving="Saving",e.Cloning="Cloning"}(st||(st={}));const lt=(0,l.prop)("referencedEntityTypeURI"),ut=(0,l.prop)("relationshipTypeURI"),ct=(0,l.prop)("referencedAttributeURIs"),pt=(0,l.curry)(((e,t)=>(0,l.pipe)(ct,(0,l.filter)((0,l.startsWith)(e)))(t))),dt=pt("configuration/relationTypes"),yt=pt("configuration/entityTypes"),ft=(0,l.pipe)((0,l.prop)("uri"),(0,l.startsWith)("configuration/relationTypes")),Tt=(0,l.filter)(ft),Et=(e,t)=>!t||t.some((t=>t===e.uri)),mt="1Tempo4rary",ht="1Tepmo4Rel",bt=(0,l.cond)([[l.isNil,(0,l.always)("")],[(0,l.test)(/[^/]$/),(0,l.concat)(l.__,"/")]]),Ot=()=>`1Tempo4DCR${Date.now()+Math.round(1e3*Math.random())}`,vt=e=>`${e}/uri$$${Date.now()+Math.round(1e3*Math.random())}`,gt=e=>()=>vt(e),_t=(e,t)=>{const r=bt(e),n=r+(r.includes("/attributes/")?"":"attributes/")+t;return vt(n)},At=e=>e&&e.includes("uri$$"),Nt=gt("entities"),Pt=gt("relations"),Rt=(0,l.pipe)((0,l.split)("/attributes/"),(0,l.prop)("0")),St=(0,l.startsWith)("relations/"),wt=(0,l.startsWith)("entities/"),It=(0,l.pipe)((0,l.defaultTo)(""),(0,l.startsWith)("configuration/entityTypes/")),Ut=(0,l.pipe)((0,l.defaultTo)(""),(0,l.startsWith)("configuration/relationTypes/")),Ct=(0,l.curry)(((e,t)=>e===t||(e||"").startsWith(`${t||""}/`))),Dt=(0,l.pipe)((0,l.split)("/"),l.head),jt=(0,l.pipe)((0,l.split)("/"),l.last),Lt=e=>e.split(".").slice(0,2).join("."),kt=(e,t)=>{const[r,...n]=e.split("."),i=n.join(`/${r}/`);return`${t||""}/${r+(i&&`/${i}`)}`},Ft=(0,l.curry)(((e,t)=>`${e}/attributes/${t}`)),Mt=(e,t)=>{const r=e.split("/"),n=t.split("/");return 2===r.length?t:[n,r.slice(2,3),r.slice(3).map(((e,t)=>t%2?r[2]:e))].flat().slice(0,-1).join("/")},xt=e=>{var t;return null===(t=e.match(/.+?(?=\/attributes|\/analyticsAttributes)/gm))||void 0===t?void 0:t[0]},$t=(0,l.either)((0,l.startsWith)("attributes."),(0,l.startsWith)("analyticsAttributes.")),Vt=e=>2===e.split("/").length,Gt=e=>5===e.split("/").length,Wt=e=>{const t=e.startsWith("configuration/")?3:2,r=e.split("/"),n=r.length<=5?t:-2;return r.slice(0,n).join("/")},Bt=e=>e.replace(/uri\$\$/g,mt),Yt=e=>e.includes("changeRequests/")&&e.includes("/changes/"),qt=e=>e.split("/changes/")[1];function Ht(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Qt=(0,l.allPass)([(0,l.propSatisfies)((0,l.either)(l.isNil,It),"uri"),(0,l.prop)("faceted"),(0,l.propEq)("type",at.TYPE_STRING)]),Kt=(0,l.has)("values"),Jt=(0,l.cond)([[(0,l.has)("dependentLookupCode"),(0,l.always)(at.TYPE_DEPENDENT_LOOKUP)],[(0,l.has)("lookupCode"),(0,l.always)(at.TYPE_LOOKUP)],[Kt,(0,l.always)(at.TYPE_ENUM)],[Qt,(0,l.always)(at.TYPE_TYPEAHEAD)],[(0,l.propEq)("type",at.TYPE_BOOLEAN),(0,l.always)(at.TYPE_BOOLEAN_RADIO)],[l.T,(0,l.prop)("type")]]),Xt=(0,l.pipe)((e=>function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Ht(e,t,r[t])}))}return e}({},e,{type:Jt(e)})),(0,l.pick)(["type","values","lookupCode","uri","dependentLookupCode","singleValue"])),zt=e=>!!e&&(!!e.autoGenerated&&e.type!==at.TYPE_NESTED||!!e.parentAutoGenerated),Zt=(0,l.pipe)((0,l.when)((0,l.pipe)(l.type,(0,l.test)(/Object/)),(0,l.prop)("uri")),(0,l.test)(/\/analyticsAttributes\//)),er=(0,l.pipe)((0,l.when)((0,l.pipe)(l.type,(0,l.test)(/Object/)),(0,l.prop)("uri")),(0,l.startsWith)("configuration/"),l.not),tr=e=>Zt(e)?"analyticsAttributes":"attributes",rr=(0,l.propEq)("hidden",!0),nr=(0,l.curry)(((e,t)=>(0,l.pipe)((0,l.when)((0,l.pipe)(l.type,(0,l.test)(/Object/)),(0,l.prop)("type")),(0,l.equals)(e))(t))),ir=nr(at.TYPE_NESTED),ar=nr(at.TYPE_REFERENCE),or=nr(at.TYPE_IMAGE),sr=(0,l.either)(ir,ar),lr=(e,t)=>{const r=Zt(e)?"analyticsAttributes":"attributes",n=e.split(`/${r}/`);return[r,...Array.isArray(t)?[...(0,l.chain)((0,l.prop)("name"),t),(0,l.last)(n)]:[...n.slice(1)]].join(".")},ur=(0,l.either)((0,l.prop)("lookupCode"),(0,l.prop)("dependentLookupCode")),cr=(0,l.pipe)(ur,Boolean),pr=(0,l.pipe)((0,l.prop)("dependentLookupCode"),Boolean),dr=(0,l.both)(cr,(0,l.pipe)(ur,("rdm",(0,l.pipe)(Dt,(0,l.equals)("rdm")))));const yr=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const n=tr({uri:t}),i=e=>e.split(`/${n}/`).length,a=(e.entityTypes||[]).concat(e.relationTypes||[]),o=r?a.find((0,l.propEq)("uri",r)):null,s=o?i(o.uri):0,u=(r,i)=>{const o=t.split(`/${n}/`).slice(0,i+1).join(`/${n}/`),s=(0,l.last)(o.split(`/${n}/`)),c=(r?r[n]||Tr(e,r)||[]:a).find((e=>{let{uri:t,name:r}=e;return t===o||r===s})),p=c?[c]:[];return c&&o!==t&&p.push(...u(c,i+1)),p},c=u(o,s),p=c.length===i(t)-s;return p?c:[]},fr=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const n=yr(e,t,r);return n.length?(0,l.last)(n):null},Tr=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{entityTypes:[]},t=arguments.length>1?arguments[1]:void 0;return(0,l.cond)([[(0,l.has)("analyticsAttributes"),(0,l.prop)("analyticsAttributes")],[(0,l.anyPass)([(0,l.propEq)("type",at.TYPE_NESTED),(0,l.propEq)("type",at.TYPE_IMAGE)]),(0,l.prop)("attributes")],[(0,l.propEq)("type",at.TYPE_REFERENCE),(0,l.pipe)(ct,(0,l.map)((t=>fr(e,t))),(0,l.reject)(l.isNil))],[l.T,(0,l.always)(null)]])(t)},Er=[at.TYPE_ACTIVENESS_DATE,at.TYPE_DATE,at.TYPE_TIMESTAMP,at.TYPE_LOCAL_DATE],mr=[at.TYPE_ACTIVENESS_DATE,at.TYPE_TIMESTAMP,at.TYPE_LOCAL_DATE],hr=e=>Er.includes(e),br=e=>mr.includes(e),Or=[at.TYPE_INT,at.TYPE_LONG,at.TYPE_NUMBER,at.TYPE_FLOAT,at.TYPE_DOUBLE,at.TYPE_COUNT],vr=e=>Or.includes(e),gr=e=>[at.TYPE_FLOAT,at.TYPE_DOUBLE].includes(e),_r=[at.TYPE_BOOLEAN,at.TYPE_BOOLEAN_RADIO,at.TYPE_RDM_LOOKUPS_NOT_RESOLVED],Ar=e=>_r.includes(e),Nr=[at.TYPE_URL,at.TYPE_BLOG_URL,at.TYPE_IMAGE_URL],Pr=e=>Nr.includes(e),Rr=nr(at.TYPE_EMAIL),Sr=e=>at.TYPE_SSN===e;var wr,Ir=r(36631);!function(e){e.CREATE="canCreate",e.READ="canRead",e.UPDATE="canUpdate",e.DELETE="canDelete"}(wr||(wr={}));const Ur=(0,l.curry)(((e,t,r)=>{var n;const i=e===wr.READ?["ROLE_UI_ALL","ROLE_UI_ALL_READONLY"]:["ROLE_UI_ALL"],a=null===(n=r[e])||void 0===n?void 0:n.roles;return!a||a.concat(i).some((e=>t.includes(e)))})),Cr=(0,l.compose)((0,l.join)("&"),(0,l.map)((0,l.join)("=")),(0,l.map)((0,l.map)(encodeURIComponent)),l.toPairs),Dr=(0,l.compose)((0,l.unless)(l.isEmpty,(e=>`?${e}`)),Cr),jr=(0,l.pipe)((0,l.reject)(E),Dr);function Lr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){kr(e,t,r[t])}))}return e}function kr(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Fr=function(){let{alwaysCreateDCR:e=!1,dcrUri:t=null}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{alwaysCreateDCR:!1,dcrUri:null};const r={dcrObjectUris:[],dcrUri:t},n=e=>e&&e.includes("changeRequest"),i=(0,l.propSatisfies)(n,"uri"),a=(0,l.pipe)((0,l.prop)("changes"),l.keys),o=(0,l.when)(i,(0,l.applySpec)({dcrObjectUris:a,dcrUri:(0,l.prop)("uri")})),s=e=>{let{dcrObjectUris:t,dcrUri:n}=e;r.dcrObjectUris=r.dcrObjectUris.concat(t),r.dcrUri=r.dcrUri||n},u=(0,l.pipe)(o,s,(()=>E())),c=(0,l.pipe)((0,l.prop)("dcrUri"),(0,l.unless)(l.isNil,(0,l.pipe)((0,l.split)("/"),(0,l.prop)(1)))),p=(e,t)=>(e+=e.includes("?")?"&":"?")+Cr(t),d=t=>{const n=c(r);return n?p(t,{changeRequestId:n}):e?p(t,{alwaysCreateDCR:!0}):t},y=()=>r.dcrObjectUris,f=()=>r.dcrUri;let T,E=l.identity;const m=()=>!e||f()||T?T||Promise.resolve():(T=new Promise((e=>{E=e})),Promise.resolve());return{updateDCRUriFromResponse:u,enhanceUriWithDCR:d,getDCRObjectUris:y,getDCRUri:f,getDcrUriAwait:m}},Mr=e=>t=>{if(!(e=>!ce(e.value))(t)){var r;const n=`${e}/${null!==(r=t.refEntity)&&void 0!==r&&r.objectURI?jt(t.refEntity.objectURI):Ot()}`;return Lr({},t,{uri:n,value:(0,l.fromPairs)((0,l.map)(xr(n),(0,l.toPairs)(t.value)))})}return Lr({},t,{uri:`${e}/${Ot()}`})},xr=e=>t=>{let[r,n]=t;return[r,(0,l.map)(Mr(`${e}/${r}`),n)]},$r=e=>{const{uri:t}=e;return(0,l.evolve)({attributes:(0,l.pipe)(l.toPairs,(0,l.map)(xr(`${t}/attributes`)),l.fromPairs)},e)},Vr=e=>(0,l.evolve)({changes:(0,l.map)((0,l.map)((0,l.when)((0,l.propEq)("type",tt.CREATE_ENTITY),(0,l.evolve)({newValue:$r}))))},e),Gr={EDITING:"Editing",SUGGESTING:"Suggesting",VIEWING:"Viewing"},Wr=(0,l.equals)(Gr.SUGGESTING),Br=(0,l.equals)(Gr.EDITING),Yr=(0,l.equals)(Gr.VIEWING),qr=(0,l.either)(Br,Wr),Hr=(0,l.curry)(((e,t)=>{let{entityTypes:r}=e;return(0,l.find)((0,l.propEq)("uri",t),r)})),Qr=(0,l.curry)(((e,t)=>(0,l.pipe)(Hr(e),(0,l.prop)("extendsTypeURI"))(t))),Kr=(0,l.curry)(((e,t,r)=>{const n=r=>!!r&&(r===t||n(Qr(e,r)));return n(r)})),Jr=(0,l.curry)(((e,t)=>{const r=[];let n=t;for(;n;)r.push(n),n=Qr(e,n);return r})),Xr=(e,t,r)=>(0,l.prop)(r,t)?t[r]:(0,l.prop)("extendsTypeURI",t)?Xr(e,Hr(e,t.extendsTypeURI),r):void 0,zr=(e,t)=>{const r=t.map(Jr(e));return(r.length?r.reduce(l.intersection):[])[0]},Zr=(e,t)=>Xr(e,(0,l.is)(Object,t)?t:Hr(e,t),"typeImage"),en=(e,t)=>e.entityTypes.reduce(((r,n)=>n.uri!==t&&Kr(e,t,n.uri)?r.concat(n.uri):r),[]),tn={EQUALS:"equals",NOT_EQUALS:"not equals",EXISTS:"exists",FULL_TEXT:"fullText",HAS_ALL:"hasAll",MISSING_VALUE:"missing",IN_RANGE:"range",LT:"lt",LTE:"lte",GT:"gt",GTE:"gte",STARTS_WITH:"startsWith",COUNT_EQUALS:"count.equals",COUNT_NOT_EQUALS:"count.not.equals",COUNT_LT:"count.less",COUNT_LTE:"count.less.or.equals",COUNT_GT:"count.greater",COUNT_GTE:"count.greater.or.equals",COUNT_RANGE:"count.range",IN_FILE:"in.file",NOT_IN_FILE:"not.in.file",CONTAINS:"contains",ON:"on",BEFORE:"before",AFTER:"after",WITHIN:"within"},rn={LIST_EQUALS:"listEquals",NOT_LIST_EQUALS:"not listEquals",LIST_EQUALS_CASE_SENSITIVE:"listEqualsCaseSensitive",NOT_LIST_EQUALS_CASE_SENSITIVE:"not listEqualsCaseSensitive"},nn={[tn.EQUALS]:"equals",[tn.NOT_EQUALS]:"not",[tn.STARTS_WITH]:"starts with",[tn.MISSING_VALUE]:"missing value",[tn.IN_RANGE]:"in range",[tn.HAS_ALL]:"has all",[tn.FULL_TEXT]:"full text",[tn.EXISTS]:"exists",[tn.COUNT_EQUALS]:"count equals",[tn.COUNT_NOT_EQUALS]:"count not equal",[tn.COUNT_LT]:"count less",[tn.COUNT_LTE]:"count less or equal",[tn.COUNT_GT]:"count greater",[tn.COUNT_GTE]:"count greater or equal",[tn.COUNT_RANGE]:"count in range",[tn.LT]:"less than",[tn.LTE]:"less than or equal",[tn.GT]:"greater than",[tn.GTE]:"greater than or equal",[tn.IN_FILE]:"in file",[tn.NOT_IN_FILE]:"not in file",[tn.CONTAINS]:"contains",[tn.ON]:"on",[tn.BEFORE]:"before",[tn.AFTER]:"after",[tn.WITHIN]:"within"},an="in",on="notIn",sn="not range",ln=e=>({[an]:tn.EQUALS,[on]:tn.NOT_EQUALS}[e]||e);var un,cn;!function(e){e.LAST_DAY="lastDay",e.LAST_WEEK="lastWeek",e.LAST_MONTH="lastMonth",e.LAST_6MONTHS="last6Months",e.LAST_YEAR="lastYear",e.PICK_DATE="pickDate"}(un||(un={})),function(e){e.LAST_3DAYS="last3Days"}(cn||(cn={}));const pn=["LAST_DAY","LAST_3DAYS","LAST_WEEK","LAST_MONTH","LAST_6MONTHS","LAST_YEAR","PICK_DATE"].reduce(((e,t)=>(e[t]=un[t]||cn[t],e)),{}),dn={[un.LAST_DAY]:"Last 24 hours",[cn.LAST_3DAYS]:"Last 3 days",[un.LAST_WEEK]:"Last 7 days",[un.LAST_MONTH]:"Last month",[un.LAST_6MONTHS]:"Last 6 months",[un.LAST_YEAR]:"Last year",[un.PICK_DATE]:"Pick date"},yn={NEW:"new",REMOVED:"removed",EDITED:"edited",IGNORED:"ignored"},fn={ACTIVE_ONLY:"active",INACTIVE_ONLY:"not_active",ALL:"all"},Tn="<No label>",En={IN:"in",OUT:"out"};var mn=r(87918),hn=r.n(mn);function bn(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){On(e,t,r[t])}))}return e}function On(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const vn={startDate:{type:at.TYPE_ACTIVENESS_DATE,get label(){return hn().text("Start date")},uri:"startDate",name:"activeness.startDate",defaultValue:null,singleValue:!0,faceted:!0},endDate:{type:at.TYPE_ACTIVENESS_DATE,get label(){return hn().text("End date")},uri:"endDate",name:"activeness.endDate",defaultValue:null,singleValue:!0,faceted:!0}},gn=bn({id:{type:at.TYPE_ENTITY_ID,get label(){return hn().text("Entity ID")},uri:"id",name:"id",singleValue:!0}},vn,{roles:{type:at.TYPE_STRING,get label(){return hn().text("Roles")},uri:"roles",name:"roles",faceted:!0},tags:{type:at.TYPE_STRING,get label(){return hn().text("Tags")},uri:"tags",name:"tags",faceted:!0}}),_n={workflow:{type:at.TYPE_STRING,get label(){return hn().text("Workflow")},uri:"workflow",name:"businessProcessData.businessProcessName",faceted:!0},assignee:{type:at.TYPE_STRING,get label(){return hn().text("Assignee")},uri:"assignee",name:"businessProcessData.tasks.taskAssignee",faceted:!0},step:{type:at.TYPE_STRING,get label(){return hn().text("Step")},uri:"step",name:"businessProcessData.tasks.taskName",faceted:!0},dueDate:{type:at.TYPE_TIMESTAMP,get label(){return hn().text("Due Date")},uri:"dueDate",name:"businessProcessData.tasks.taskDueDate"}},An={commenter:{type:at.TYPE_STRING,get label(){return hn().text("Commenter")},uri:"commenter",name:"attributes.Commenters",faceted:!0}},Nn={notResolved:{type:at.TYPE_RDM_LOOKUPS_NOT_RESOLVED,get label(){return hn().text("Records with RDM Transcode Error")},uri:"notResolved",name:"rdmLookups.resolved"}},Pn={createdBy:{type:at.TYPE_STRING,get label(){return hn().text("Created by")},uri:"createdBy",name:"createdBy",singleValue:!0,faceted:!0},updatedBy:{type:at.TYPE_STRING,get label(){return hn().text("Updated by")},uri:"updatedBy",name:"updatedBy",singleValue:!0,faceted:!0},createdTime:{type:at.TYPE_TIMESTAMP,get label(){return hn().text("Created time")},uri:"createdTime",name:"createdTime",singleValue:!0,faceted:!0},updatedTime:{type:at.TYPE_TIMESTAMP,get label(){return hn().text("Updated time")},uri:"updatedTime",name:"updatedTime",singleValue:!0,faceted:!0}},Rn={matches:{type:at.TYPE_COUNT,get label(){return hn().text("Potential Matches")},uri:"matches",name:"matches",singleValue:!0,hideForDataTenant:!0,faceted:!0},matchScore:{type:at.TYPE_COUNT,get label(){return hn().text("Match scores")},uri:"matchScore",name:"potentialMatches.matchScore",singleValue:!0,hideForDataTenant:!0,faceted:!0}},Sn={sourceSystems:{type:at.TYPE_STRING,get label(){return hn().text("Source System Name")},uri:"sourceSystems",name:"sourceSystems",singleValue:!0,faceted:!0},value:{type:at.TYPE_STRING,get label(){return hn().text("ID Value")},uri:"value",name:"crosswalks.value"},count:{type:at.TYPE_INT,get label(){return hn().text("Crosswalk Count")},uri:"count",name:"crosswalks_count"},reltioLoadDate:{type:at.TYPE_TIMESTAMP,get label(){return hn().text("Reltio Load Date")},uri:"reltioLoadDate",name:"crosswalks.reltioLoadDate"},createDate:{type:at.TYPE_TIMESTAMP,get label(){return hn().text("Create Date")},uri:"createDate",name:"crosswalks.createDate"},updateDate:{type:at.TYPE_TIMESTAMP,get label(){return hn().text("Update Date")},uri:"updateDate",name:"crosswalks.updateDate"},deleteDate:{type:at.TYPE_TIMESTAMP,get label(){return hn().text("Delete Date")},uri:"deleteDate",name:"crosswalks.deleteDate"},publishDate:{type:at.TYPE_TIMESTAMP,get label(){return hn().text("Publish Date")},uri:"publishDate",name:"crosswalks.sourcePublishDate"},sourceTable:{type:at.TYPE_STRING,get label(){return hn().text("Source Table")},uri:"sourceTable",name:"crosswalks.sourceTable"}};let wn;!function(e){e.matchRules="matchRules",e.MLRecommendedMatch="MLRecommendedMatch"}(wn||(wn={}));const In={[wn.matchRules]:{type:at.TYPE_STRING,get label(){return hn().text("Match Rules")},uri:wn.matchRules,name:wn.matchRules,faceted:!0,hideForDataTenant:!0},[wn.MLRecommendedMatch]:{type:at.TYPE_STRING,get label(){return hn().text("Match IQ")},uri:wn.MLRecommendedMatch,name:wn.MLRecommendedMatch,faceted:!0,hideForDataTenant:!0}},Un=bn({},gn,_n,An,Nn,Pn,Rn,Sn,In,{type:{type:at.TYPE_STRING,get label(){return hn().text("Type")},uri:"type",name:"type",singleValue:!0,faceted:!0}}),Cn="NOT_MATCH";var Dn=r(13980),jn=r.n(Dn);function Ln(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){kn(e,t,r[t])}))}return e}function kn(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Fn=jn().oneOf(["mobile","tablet","desktop"]),Mn=jn().shape({deviceTypes:jn().oneOfType([Fn,jn().arrayOf(Fn)]),roles:jn().arrayOf(jn().string)}),xn=jn().shape({value:jn().string,lookupCode:jn().string}),$n=jn().shape({link:jn().string,filename:jn().string}),Vn=jn().shape({displayName:jn().string,parent:jn().string}),Gn=jn().oneOfType([jn().string,jn().number,jn().bool,xn]),Wn=jn().oneOfType([Gn,jn().arrayOf(Gn)]),Bn=jn().shape({fieldName:jn().string,values:jn().arrayOf(Wn),filter:jn().string,type:jn().string}),Yn=jn().shape({minValue:jn().number,maxValue:jn().number}),qn=jn().shape({label:jn().string,name:jn().string,description:jn().string,type:jn().string,hidden:jn().bool,faceted:jn().bool,searchable:jn().bool,uri:jn().string,access:jn().arrayOf(jn().string),cardinality:Yn}),Hn=jn().shape({label:jn().string,uri:jn().string,typeColor:jn().string,direction:jn().string,startObject:jn().object,endObject:jn().object}),Qn=jn().shape({typeColor:jn().string,typeIcon:jn().string,typeImage:jn().string,label:jn().string,uri:jn().string,attributes:jn().arrayOf(qn)}),Kn=jn().shape({uri:jn().string,label:jn().string,memberTypes:jn().array,extendsTypeUri:jn().string,attributes:jn().arrayOf(qn)}),Jn=jn().shape({uri:jn().string,label:jn().string,extendsTypeUri:jn().string,relationshipTypeURIs:jn().arrayOf(jn().string)}),Xn=jn().shape({uri:jn().string,description:jn().string,label:jn().string,schemaVersion:jn().string,entityTypes:jn().arrayOf(Qn),roles:jn().arrayOf(jn().object),groupTypes:jn().arrayOf(jn().object),relationTypes:jn().arrayOf(Hn),graphTypes:jn().arrayOf(Jn),interactionTypes:jn().arrayOf(Kn),sources:jn().arrayOf(jn().object)}),zn=jn().shape({uri:jn().string,type:jn().string}),Zn=jn().shape({uri:jn().string,attributes:jn().object,type:jn().string,timestamp:jn().number,members:jn().object}),ei=jn().shape({uri:jn().string,type:jn().string}),ti=jn().shape({value:jn().object,ov:jn().bool,type:jn().string,uri:jn().string}),ri=jn().shape({refEntity:jn().oneOfType([jn().array,jn().object]),refRelation:jn().oneOfType([jn().array,jn().object]),value:jn().object,ov:jn().bool,type:jn().string,uri:jn().string}),ni=jn().oneOf((0,l.values)(Gr)),ii=jn().shape({type:jn().oneOf(Object.values(be)).isRequired,attributeTypeUri:jn().string.isRequired,parentUri:jn().string.isRequired,uri:jn().string,message:jn().string}),ai={attributeType:qn,showEmptyEditors:jn().bool,lazy:jn().bool,mode:ni,metadata:Xn,ownError:ii,errors:jn().arrayOf(ii),crosswalks:jn().array,onAddAttributes:jn().func,onAddOneMore:jn().func,onDeleteAttribute:jn().func,onChangeAttribute:jn().func,additionalControlsRenderer:jn().func,hideDeleteButton:jn().bool,showNonOv:jn().bool,state:jn().oneOf(["deleted","edited"]),expanded:jn().bool},oi=Ln({attributeValue:ti},ai),si=Ln({attributeValue:ri},ai),li=jn().shape({value:jn().oneOfType([jn().string,jn().bool,jn().number]),ov:jn().bool,type:jn().string,uri:jn().string,lookupCode:jn().string,lookupRawValue:jn().string}),ui=jn().shape({totalOvValues:jn().number,totalValues:jn().number}),ci=jn().shape({inRelations:jn().arrayOf(jn().oneOfType([jn().object,jn().string])),outRelations:jn().arrayOf(jn().oneOfType([jn().object,jn().string])),groups:jn().arrayOf(jn().string),entityTypes:jn().arrayOf(jn().string),nextEntry:jn().object}),pi=jn().oneOf(["asc","desc"]),di=jn().shape({id:jn().string,content:ci,allowOnlyCreateNew:jn().bool,sortColumn:jn().string,sortOrder:pi,"text-empty":jn().string,max:jn().number,icon:jn().string,caption:jn().string,canCreate:Mn,canRead:Mn,canUpdate:Mn,canDelete:Mn,editingEnabled:jn().bool}),yi=jn().shape({id:jn().string,caption:jn().string,pageSize:jn().number,icon:jn().string,canCreate:Mn,canRead:Mn,canUpdate:Mn,canDelete:Mn,attributes:jn().object}),fi=jn().shape({entityUri:jn().string,entityType:jn().string,entityLabel:jn().string,object:zn}),Ti=jn().shape({relationUri:jn().string,relationType:jn().string,relationLabel:jn().string,direction:jn().string,object:ei}),Ei=jn().shape({entity:fi,relation:Ti}),mi=jn().shape({value:jn().string,isRawFilter:jn().bool}),hi=jn().shape({id:jn().string,label:jn().string,name:jn().string,availableEntityTypes:jn().array}),bi=jn().shape({id:jn().string,allowMergeAll:jn().bool,matchActions:jn().object,availableTabs:jn().arrayOf(jn().oneOf(["findMatches","potentialMatches","notAMatch"]))}),Oi=jn().shape({matchRules:jn().arrayOf(jn().string),object:zn,shortestTransitiveMatchPath:jn().arrayOf(jn().shape({matchRules:jn().arrayOf(jn().string),match:jn().string})),direct:jn().bool,matchScore:jn().number}),vi=jn().arrayOf(Oi),gi=jn().arrayOf(jn().shape({uri:jn().string,label:jn().string})),_i=[{label:hn().text("And"),value:"and"},{label:hn().text("Or"),value:"or"},{label:hn().text("And not"),value:"and not"},{label:hn().text("Or not"),value:"or not"}];function Ai(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Ni=(0,l.curry)(((e,t)=>{let{relationTypes:r}=e;return(0,l.find)((0,l.propEq)("uri",t),r)})),Pi=(0,l.pipe)(Ni,(0,l.propOr)("","label")),Ri=(0,l.curry)(((e,t)=>{const r=Ni(e,t);return[(0,l.path)(["startObject","objectTypeURI"],r),(0,l.path)(["endObject","objectTypeURI"],r)]})),Si=(0,l.curry)(((e,t,r)=>{const[n,i]=Ri(e,r);return Kr(e,n,t)||Kr(e,i,t)})),wi=(0,l.pipe)((0,l.propOr)([],"relationTypes"),(0,l.reduce)(((e,t)=>{let{uri:r,label:n}=t;return function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Ai(e,t,r[t])}))}return e}({},e,{[r]:n})}),{})),Ii=function(){let{reversedContextLabels:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t={},r=r=>n=>{let{label:i}=n;const a=r===(e?En.OUT:En.IN)?"startObject":"endObject",{directionalContext:o}=n[a];return"directed"===n.direction&&1===(0,l.propOr)(0,"length",o)&&(i+=` (${o[0].labelPattern})`),!(i in t)&&(t[i]=!0,!0)},n=r(En.IN),i=r(En.OUT);return{isNotDuplicatedInRelation:n,isNotDuplicatedOutRelation:i}},Ui=(0,l.pathOr)("",["directionalContext",0,"labelPattern"]),Ci=(e,t,r)=>(0,l.prop)(r,t)?t[r]:(0,l.prop)("extendsTypeURI",t)?Ci(e,Ni(e,t.extendsTypeURI),r):void 0,Di={CREATE:"CREATE",READ:"READ",UPDATE:"UPDATE",DELETE:"DELETE",INITIATE_CHANGE_REQUEST:"INITIATE_CHANGE_REQUEST",MERGE:"MERGE",UNMERGE:"UNMERGE"},ji=(0,l.curry)(((e,t)=>e.every((e=>Li(e,t))))),Li=(0,l.curry)(((e,t)=>{const r=zt(t);return ki(e,t)&&(e===Di.READ||!r)})),ki=(e,t)=>!t||!t.access||t.access.includes(e),Fi=(0,l.curry)(((e,t,r)=>Li(Di.READ,r)&&(Wr(t)?Li(Di.INITIATE_CHANGE_REQUEST,r):Li(e,r)))),Mi=Fi(Di.CREATE),xi=Fi(Di.DELETE),$i=Fi(Di.UPDATE),Vi=ji([Di.CREATE,Di.MERGE,Di.READ,Di.UPDATE]),Gi=ji([Di.UPDATE,Di.READ,Di.CREATE]),Wi=ji([Di.UPDATE,Di.READ]),Bi=ji([Di.DELETE,Di.UPDATE,Di.READ]),Yi=(0,l.curry)(((e,t,r)=>e[r]||e[((e,t)=>(0,l.pipe)((0,l.propOr)([],"matchGroups"),(0,l.find)((0,l.propEq)("uri",t)),(0,l.defaultTo)({}),(0,l.prop)("type"))(e))(t,r)]||e["*"])),qi=(e,t,r)=>(0,l.pipe)((0,l.map)(Yi(e,t)),(0,l.filter)(l.identity))(r),Hi=(e,t,r)=>{const n=qi(e,r,t);return(0===n.length||n.some((e=>{let{allowMerge:t}=e;return!1!==t})))&&Li(Di.MERGE,r)},Qi=(0,l.curry)(((e,t,r,n)=>{const i=Ni(e,n),[a,o]=Ri(e,n);return i&&Li(Di.CREATE,i)&&Kr(e,a,t.type)&&Kr(e,o,r.type)})),Ki=(e,t,r,n,i)=>{const a=Hr(e,n.type),o=qi(t,a,r).map((e=>{let{createRelation:t}=e;return t})).filter(l.identity);return o.some((t=>{let{inRelations:r,outRelations:a}=t;return r.some(Qi(e,n,i))||a.some(Qi(e,i,n))}))},Ji=function(e,t,r,n){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[];const a=Hr(e,r.type),o=(0,l.propOr)({},"matchActions",t);return{canMerge:Hi(o,i,a),canAddRelation:Ki(e,o,i,r,n),canMark:Li(Di.UPDATE,a)&&Li(Di.READ,a)}},Xi=(e,t,r,n)=>(0,l.pipe)((0,l.map)((n=>Ji(e,t,n.object,r,n.matchRules))),(0,l.reduce)((0,l.mergeWith)(l.and),{}))(n),zi=Zt,Zi=(0,l.complement)(zi),ea=Li(Di.READ),ta=e=>{let{attributeType:t,mode:r}=e;return Zi(t)&&Mi(r,t)&&!rr(t)},ra=e=>{let{attributeType:t,attributeValue:r,mode:n,isReltioCrosswalk:i=!0}=e;const a=At(r.uri),o=$i(n),s=Mi(n);return(0,l.cond)([[zi,l.F],[(0,l.always)(a),l.T],[(0,l.always)(i),o],[l.T,(0,l.allPass)([o,s])]])(t)},na=e=>{let{attributeType:t,attributeValue:r,mode:n,isReltioCrosswalk:i=!0,metadata:a}=e;const o=At(r.uri),s=$i(n),u=xi(n),c=aa(Di.UPDATE,n,a,r),p=aa(Di.DELETE,n,a,r);return(0,l.cond)([[zi,l.F],[(0,l.always)(o),l.T],[(0,l.always)(i),(0,l.allPass)([u,p])],[l.T,(0,l.allPass)([s,u,c,p])]])(t)},ia=(0,l.curry)(((e,t,r,n)=>{const i=Tr(t,n);return!i||!(0,l.pipe)((0,l.unless)(Array.isArray,l.of),(0,l.map)((0,l.prop)("value")))(r).some((r=>i.filter((e=>r&&!!r[e.name])).some((n=>!ki(e,n)||!ia(e,t,r[n.name],n)))))})),aa=(0,l.curry)(((e,t,r,n,i)=>Wr(t)?ia(Di.INITIATE_CHANGE_REQUEST,r,n,i):ia(e,r,n,i))),oa=(0,l.both)((0,l.complement)(rr),ea),sa="SuperUser",la="allTenants",ua=[la,"allCustomers"],ca=e=>{let{allowedPermissionsNames:t,permissionsNames:r,permissionsConfig:n,superUserEnvironments:i}=e;return t.map((e=>{switch(e){case r.NON_SECURED:return l.T;case r.SECURED:return e=>void 0!==e.userPermissions;default:return(t=n[e])?(e,r)=>{let{params:n}=r;return((e,t,r,n)=>{const i=(0,l.path)(["userPermissions","permissions"],e)||{};return Object.keys(i).filter((e=>{const t=e.split(":"),[n]=t;return n===r.serviceId||n===sa})).filter((e=>{const t=e.split(":"),[i,a=""]=t;let o=a.split(".");return o=(0,l.endsWith)(["*"],o)?o.slice(0,-1):o,(0,l.startsWith)(o,r.resourcePath)||((e,t,r)=>{if(e===sa){const e=r?ua.concat(r.map((e=>`allTenants.${e}`))):ua,n=r&&t[0]===la?t.slice(0,2):t.slice(0,1);return e.map((e=>e.split("."))).some((e=>(0,l.startsWith)(n,e)))}})(i,o,n)})).some((e=>{const n=i[e];return r.privileges.every((e=>{const r=n[e],i=Array.isArray(r);return t?Array.isArray(r)&&r.some((e=>t=>t===e||"SuperUser:*"===t||t.startsWith("SuperUser:allTenants"))(t)):i}))}))})(e,n.tenant,t,i)}:l.F}var t}))},pa={NON_SECURED:"NON_SECURED",SECURED:"SECURED",CAN_EXPORT:"CAN_EXPORT",CAN_EXPORT_ACTIVITIES:"CAN_EXPORT_ACTIVITIES",CAN_IMPORT_ENTITIES_FROM_DT:"CAN_IMPORT_ENTITIES_FROM_DT",CAN_READ_ENTITIES_FROM_DT:"CAN_READ_ENTITIES_FROM_DT",CAN_START_PROCESS_INSTANCE_SEARCH_QUERY:"CAN_START_PROCESS_INSTANCE_SEARCH_QUERY",CAN_VIEW_PROCESS_INSTANCE_SEARCH_QUERY:"CAN_VIEW_PROCESS_INSTANCE_SEARCH_QUERY",CAN_CREATE_ENVIRONMENT_CONFIG_JAR:"CAN_CREATE_ENVIRONMENT_CONFIG_JAR",CAN_CREATE_CONFIG_JAR:"CAN_CREATE_CONFIG_JAR",CAN_VIEW_ENVIRONMENT_CONFIG_JAR:"CAN_VIEW_ENVIRONMENT_CONFIG_JAR",CAN_VIEW_CONFIG_JAR:"CAN_VIEW_CONFIG_JAR",CAN_MANAGE_WORKFLOW_DEFINITION:"CAN_MANAGE_WORKFLOW_DEFINITION",CAN_VIEW_WORKFLOW_DEFINITION:"CAN_VIEW_WORKFLOW_DEFINITION",CAN_MANAGE_WORKFLOW_ENVIRONMENT_DEFINITION:"CAN_MANAGE_WORKFLOW_ENVIRONMENT_DEFINITION",CAN_UPDATE_WORKFLOW_DATA_TASK:"CAN_UPDATE_WORKFLOW_DATA_TASK",CAN_READ_WORKFLOW_DATA_TASK:"CAN_READ_WORKFLOW_DATA_TASK",CAN_CONFIG_ENVIRONMENT_REGISTER:"CAN_CONFIG_ENVIRONMENT_REGISTER",CAN_UPDATE_PROCESS_INSTANCE:"CAN_UPDATE_PROCESS_INSTANCE",CAN_EXECUTE_WORKFLOW_JOBS:"CAN_EXECUTE_WORKFLOW_JOBS",CAN_EXECUTE_WORKFLOW_JOBS_TERMINATE_PROCESS_INSTANCE:"CAN_EXECUTE_WORKFLOW_JOBS_TERMINATE_PROCESS_INSTANCE",CAN_EXECUTE_WORKFLOW_JOBS_UPDATE_TASKS:"CAN_EXECUTE_WORKFLOW_JOBS_UPDATE_TASKS",CAN_EXECUTE_WORKFLOW_JOBS_VALIDATE_TASKS:"CAN_EXECUTE_WORKFLOW_JOBS_VALIDATE_TASKS",CAN_EXECUTE_WORKFLOW_JOBS_SYNC_BUSINESS_PROCESS_DATA:"CAN_EXECUTE_WORKFLOW_JOBS_SYNC_BUSINESS_PROCESS_DATA",CAN_VIEW_WORKFLOW_JOBS:"CAN_VIEW_WORKFLOW_JOBS",CAN_MAKE_BULK_UPDATE:"CAN_MAKE_BULK_UPDATE",CAN_OPEN_DATA_LOADER_EXECUTE:"CAN_OPEN_DATA_LOADER_EXECUTE",CAN_OPEN_DATA_LOADER_READ:"CAN_OPEN_DATA_LOADER_READ",CAN_BULK_DELETE_PROFILES:"CAN_BULK_DELETE_PROFILES",CAN_READ_MDM_DATA_ENTITIES:"CAN_READ_MDM_DATA_ENTITIES",IS_FREEMIUM_ADMIN:"IS_FREEMIUM_ADMIN",CAN_READ_DVF:"CAN_READ_DVF"},da={[pa.CAN_EXPORT]:{serviceId:"export",resourcePath:["data","entities"],privileges:["EXECUTE"]},[pa.CAN_EXPORT_ACTIVITIES]:{serviceId:"export",resourcePath:["data","activities"],privileges:["EXECUTE"]},[pa.CAN_IMPORT_ENTITIES_FROM_DT]:{serviceId:"dtss",resourcePath:["data","entities"],privileges:["READ","UPDATE"]},[pa.CAN_READ_ENTITIES_FROM_DT]:{serviceId:"dtss",resourcePath:["data","entities"],privileges:["READ"]},[pa.CAN_START_PROCESS_INSTANCE_SEARCH_QUERY]:{serviceId:"workflow",resourcePath:["data","process"],privileges:["CREATE"]},[pa.CAN_VIEW_PROCESS_INSTANCE_SEARCH_QUERY]:{serviceId:"workflow",resourcePath:["data","process"],privileges:["READ"]},[pa.CAN_CREATE_CONFIG_JAR]:{serviceId:"workflow",resourcePath:["config","jar"],privileges:["CREATE","DELETE"]},[pa.CAN_CREATE_ENVIRONMENT_CONFIG_JAR]:{serviceId:"workflow",resourcePath:["environment","config","jar"],privileges:["CREATE","DELETE"]},[pa.CAN_VIEW_CONFIG_JAR]:{serviceId:"workflow",resourcePath:["config","jar"],privileges:["READ"]},[pa.CAN_VIEW_ENVIRONMENT_CONFIG_JAR]:{serviceId:"workflow",resourcePath:["environment","config","jar"],privileges:["READ"]},[pa.CAN_MANAGE_WORKFLOW_DEFINITION]:{serviceId:"workflow",resourcePath:["config","definition"],privileges:["CREATE","DELETE"]},[pa.CAN_VIEW_WORKFLOW_DEFINITION]:{serviceId:"workflow",resourcePath:["config","definition"],privileges:["READ"]},[pa.CAN_MANAGE_WORKFLOW_ENVIRONMENT_DEFINITION]:{serviceId:"workflow",resourcePath:["environment","config","definition"],privileges:["CREATE","DELETE"]},[pa.CAN_UPDATE_WORKFLOW_DATA_TASK]:{serviceId:"workflow",resourcePath:["data","tasks"],privileges:["UPDATE"]},[pa.CAN_READ_WORKFLOW_DATA_TASK]:{serviceId:"workflow",resourcePath:["data","tasks"],privileges:["READ"]},[pa.CAN_CONFIG_ENVIRONMENT_REGISTER]:{serviceId:"workflow",resourcePath:["environment","config","register"],privileges:["CREATE","DELETE"]},[pa.CAN_UPDATE_PROCESS_INSTANCE]:{serviceId:"workflow",resourcePath:["data","process"],privileges:["UPDATE","DELETE"]},[pa.CAN_EXECUTE_WORKFLOW_JOBS]:{serviceId:"workflow",resourcePath:["jobs"],privileges:["EXECUTE"]},[pa.CAN_EXECUTE_WORKFLOW_JOBS_TERMINATE_PROCESS_INSTANCE]:{serviceId:"workflow",resourcePath:["jobs","terminateProcessInstances"],privileges:["EXECUTE"]},[pa.CAN_EXECUTE_WORKFLOW_JOBS_UPDATE_TASKS]:{serviceId:"workflow",resourcePath:["jobs","updateTasks"],privileges:["EXECUTE"]},[pa.CAN_EXECUTE_WORKFLOW_JOBS_VALIDATE_TASKS]:{serviceId:"workflow",resourcePath:["jobs","validateTasks"],privileges:["EXECUTE"]},[pa.CAN_EXECUTE_WORKFLOW_JOBS_SYNC_BUSINESS_PROCESS_DATA]:{serviceId:"workflow",resourcePath:["jobs","syncBusinessProcessData"],privileges:["EXECUTE"]},[pa.CAN_VIEW_WORKFLOW_JOBS]:{serviceId:"workflow",resourcePath:["jobs"],privileges:["READ"]},[pa.CAN_MAKE_BULK_UPDATE]:{serviceId:"MDM",resourcePath:["tasks","bulk"],privileges:["EXECUTE"]},[pa.CAN_OPEN_DATA_LOADER_EXECUTE]:{serviceId:"dataloader",resourcePath:["tasks","jobs"],privileges:["EXECUTE"]},[pa.CAN_OPEN_DATA_LOADER_READ]:{serviceId:"dataloader",resourcePath:["tasks","jobs"],privileges:["READ"]},[pa.CAN_BULK_DELETE_PROFILES]:{serviceId:"MDM",resourcePath:["tasks","bulk"],privileges:["DELETE"]},[pa.IS_FREEMIUM_ADMIN]:{serviceId:"pms",resourcePath:["config","freetier","user"],privileges:["CREATE","DELETE","UPDATE"]},[pa.CAN_READ_MDM_DATA_ENTITIES]:{serviceId:"MDM",resourcePath:["data","entities"],privileges:["READ"]},[pa.CAN_READ_DVF]:{serviceId:"DVF",resourcePath:["functionsManagement"],privileges:["READ"]}},ya=(0,l.curry)(((e,t,r)=>ca({allowedPermissionsNames:e,permissionsNames:pa,permissionsConfig:da}).some((e=>e(t,{params:{tenant:r}}))))),fa=ya([pa.CAN_EXPORT]),Ta=ya([pa.CAN_EXPORT_ACTIVITIES]),Ea=ya([pa.CAN_IMPORT_ENTITIES_FROM_DT]),ma=ya([pa.CAN_READ_ENTITIES_FROM_DT]),ha=ya([pa.CAN_START_PROCESS_INSTANCE_SEARCH_QUERY]),ba=ya([pa.CAN_UPDATE_PROCESS_INSTANCE]),Oa=ya([pa.CAN_VIEW_WORKFLOW_DEFINITION]),va=ya([pa.CAN_CONFIG_ENVIRONMENT_REGISTER]),ga=ya([pa.CAN_UPDATE_WORKFLOW_DATA_TASK]),_a=ya([pa.CAN_READ_WORKFLOW_DATA_TASK]),Aa=ya([pa.CAN_MANAGE_WORKFLOW_DEFINITION]),Na=ya([pa.CAN_MANAGE_WORKFLOW_ENVIRONMENT_DEFINITION]),Pa=ya([pa.CAN_EXECUTE_WORKFLOW_JOBS_SYNC_BUSINESS_PROCESS_DATA]),Ra=ya([pa.CAN_EXECUTE_WORKFLOW_JOBS_VALIDATE_TASKS]),Sa=ya([pa.CAN_EXECUTE_WORKFLOW_JOBS_UPDATE_TASKS]),wa=ya([pa.CAN_EXECUTE_WORKFLOW_JOBS_TERMINATE_PROCESS_INSTANCE]),Ia=ya([pa.CAN_EXECUTE_WORKFLOW_JOBS]),Ua=ya([pa.CAN_CREATE_ENVIRONMENT_CONFIG_JAR]),Ca=ya([pa.CAN_CREATE_CONFIG_JAR]),Da=ya([pa.CAN_VIEW_ENVIRONMENT_CONFIG_JAR]),ja=ya([pa.CAN_VIEW_CONFIG_JAR]),La=ya([pa.CAN_VIEW_PROCESS_INSTANCE_SEARCH_QUERY]),ka=ya([pa.CAN_VIEW_WORKFLOW_JOBS]),Fa=ya([pa.CAN_MAKE_BULK_UPDATE]),Ma=ya([pa.CAN_OPEN_DATA_LOADER_EXECUTE,pa.CAN_OPEN_DATA_LOADER_READ]),xa=ya([pa.CAN_BULK_DELETE_PROFILES]),$a=ya([pa.CAN_READ_MDM_DATA_ENTITIES]),Va=ya([pa.CAN_READ_DVF]),Ga=ya([pa.IS_FREEMIUM_ADMIN]),Wa=(0,l.reject)(rr),Ba=(e,t)=>(0,l.pipe)((0,l.defaultTo)([]),Wa,(0,l.filter)(e))(t),Ya=(0,l.curry)(((e,t)=>Ba((t=>ta({attributeType:t,mode:e})),t))),qa=(0,l.curry)(((e,t)=>Ba((t=>ta({attributeType:t,mode:e})||oa(t)),t))),Ha=(0,l.pipe)((0,l.defaultTo)([]),(0,l.filter)(oa)),Qa=(0,l.pipe)((0,l.propOr)([],"attributes"),(0,l.chain)((0,l.when)((0,l.has)("attributes"),(e=>[e,...Qa(e)])))),Ka=(0,l.pipe)((0,l.propOr)([],"attributes"),(0,l.filter)(oa),(0,l.chain)((0,l.when)((0,l.has)("attributes"),(e=>[e,...Ka(e)])))),Ja=(0,l.pipe)((0,l.propOr)([],"analyticsAttributes"),(0,l.chain)((0,l.when)((0,l.has)("analyticsAttributes"),(e=>[e,...Ja(e)])))),Xa=(0,l.pipe)(Hr,(0,l.converge)(l.concat,[Ka,Ja]));function za(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Za(e,t,r[t])}))}return e}function Za(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const eo=(0,l.curry)(((e,t)=>(0,l.evolve)({attributes:(0,l.map)((0,l.pipe)(e,eo(e)))},t))),to=e=>{var t;return za({},e,{matchGroups:(0,l.uniq)((e.matchGroups||[]).concat((null===(t=e.hidden)||void 0===t?void 0:t.matchGroups)||[]))})},ro=(0,l.both)((0,l.has)("values"),(0,l.has)("lookupCode")),no=(0,l.when)(ro,(0,l.dissoc)("values")),io=(0,l.when)((0,l.has)("lookupCode"),(e=>{let{lookupCode:t}=e;return za({},function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,["lookupCode"]),{dependentLookupCode:t})})),ao=e=>{let{hidden:t,dependentLookupAttributes:r}=e;return!t&&r},oo=(0,Ir.Z)((e=>{const{entityTypes:t=[],relationTypes:r=[]}=e;return(0,l.chain)(Qa,t).concat((0,l.chain)(Qa,r)).some(ao)})),so=e=>{let t=!1;const r=eo((e=>e.cardinality&&(t=!0,e.cardinality.minValue)?za({},e,{required:!0}):e))(e);return t&&(r.forceValidate=!0),r},lo=e=>{const t=oo(e),r=(0,l.map)((e=>eo((0,l.pipe)(no,(0,l.when)((0,l.always)(e),io))))(t)),n=(0,l.map)(to),i=(0,l.map)(so);return(0,l.evolve)({entityTypes:(0,l.pipe)(r,n,i),relationTypes:(0,l.pipe)(r,i)},e)},uo=(0,l.curry)(((e,t)=>{let{graphTypes:r=[]}=e;return(0,l.find)((0,l.propEq)("uri",t),r)})),co=(0,l.prop)("relationshipTypeURIs"),po=(0,l.curry)(((e,t)=>{var r;return(null===(r=e.graphTypes)||void 0===r?void 0:r.filter(yo(e,t)))||[]})),yo=(e,t)=>r=>{let{relationshipTypeURIs:n}=r;return null==n?void 0:n.some(Si(e,t))},fo=(e,t)=>(0,l.pipe)(uo,(0,l.defaultTo)({}),co,(0,l.defaultTo)([]),(0,l.chain)(Ri(e)),(0,l.reject)(l.isNil),l.uniq,(0,l.map)(Hr(e)))(e,t),To=(0,l.allPass)([(0,l.propEq)("matchMethod","match_iq"),(0,l.anyPass)([(0,l.propEq)("scope","ALL"),(0,l.propEq)("scope","INTERNAL")])]),Eo=e=>(0,l.pipe)((0,l.defaultTo)({}),(0,l.prop)("matchGroups"),(0,l.defaultTo)([]),(0,l.any)(e)),mo=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Eo((0,l.complement)(To))(e)},ho=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Eo(To)(e)},bo=(0,l.pipe)(Hr,(0,l.propOr)([],"matchGroups")),Oo=(e,t,r)=>(0,l.pipe)(bo,(0,l.find)((0,l.propEq)("uri",r)))(e,t),vo=(0,l.curry)(((e,t,r)=>(0,l.pipe)(Oo,(0,l.propOr)(r,"label"))(e,t,r))),go=(0,l.curry)(((e,t,r)=>{const n=(0,l.pipe)(bo,(0,l.filter)((0,l.pipe)((0,l.prop)("uri"),(0,l.includes)(l.__,r))))(e,t),i=(0,l.pipe)((0,l.map)((0,l.prop)("uri")),(0,l.without)(l.__,r),(0,l.map)((e=>({uri:e,label:e}))))(n);return[...n,...i]})),_o=e=>(0,l.partition)(To,e),Ao=(0,l.includes)(l.__,["and","or","not"]),No=(0,l.includes)(l.__,(0,l.values)({EXACT:"exact",EXACT_OR_NULL:"exactOrNull",EXACT_OR_ALL_NULL:"exactOrAllNull",NOT_EXACT_SAME:"notExactSame",FUZZY:"fuzzy"})),Po=(0,l.includes)(l.__,["equals","notEquals","in"]),Ro=(0,l.pipe)(l.toPairs,(0,l.chain)((e=>{let[t,r]=e;return Ao(t)?Ro(r):No(t)?r.filter(It):Po(t)?r.map((0,l.prop)("uri")).filter(It):[]})),l.uniq),So=(0,l.pipe)((0,l.pluck)("rule"),(0,l.chain)(Ro),l.uniq),wo=(0,l.pipe)(bo,So),Io=(0,l.pipe)(go,So),Uo=(e,t)=>{let{interactionTypes:r=[]}=e;return(0,l.find)((0,l.propEq)("uri",t),r)},Co=(0,l.pipe)(Uo,Ka),Do=(e,t)=>(e.interactionTypes||[]).filter(((e,t)=>r=>{let{memberTypes:n}=r;return n.some(((e,t)=>r=>{let{objectTypeURI:n}=r;return n===t||Kr(e,n,t)})(e,t))})(e,t)),jo=e=>!!e.required,Lo=(e,t,r)=>{const n=(0,l.cond)([[It,Hr(e)],[Ut,Ni(e)]])(t);return ko(e,n,r)},ko=(e,t,r)=>!t||t.hidden&&!(e=>e.uri&&It(e.uri)&&3===e.uri.split("/").length)(t)?[]:t.attributes?t.attributes.filter((e=>!e.hidden&&!zt(e))).flatMap((t=>{const n=t.required?[t]:[];if(r){let i;if(t.type===at.TYPE_REFERENCE){const n=ut(t),a=ct(t);i=Lo(e,n,r).filter((e=>a.some(Ct(e.uri))))}else t.attributes&&(i=ko(e,t,r));i&&n.push(...i)}return n})):t.type===at.TYPE_REFERENCE?Lo(e,ut(t),r):[],Fo=e=>{const t=(0,l.pipe)((0,l.pick)(["dataLabelPattern","dataTooltipPattern","secondaryLabelPattern"]),l.values,(0,l.filter)(l.identity))(e);return(0,l.filter)((0,l.anyPass)([e=>{const r=`{${e.name}.`,n=`{${e.name}}`;return(0,l.any)((0,l.anyPass)([(0,l.includes)(n),(0,l.includes)(r)]),t)},t=>(e.businessCardAttributeURIs||[]).includes(t.uri),jo]),e.attributes||[])},Mo=(e,t)=>{const r=yt(e);return(0,l.pipe)((0,l.filter)((e=>r.includes(e.uri))),(0,l.sort)((n=r,(e,t)=>n.indexOf(e.uri)-n.indexOf(t.uri))))(t.attributes||[]);var n},xo=(0,l.curry)(((e,t)=>{const r=(t,n)=>{if(Array.isArray(n))return n.map((e=>r(t,e)));if(n&&"object"==typeof n){const e={};for(let t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=r(t,n[t]));return e}return"string"==typeof n&&e.includes(t)?hn().text(n):n};return r(null,t)})),$o=["label","description","abbreviation","caption","toolTip"],Vo=e=>xo($o,e),Go=(0,l.curry)(((e,t)=>{const{sources:r}=e,n=jt(t);return r.find((e=>{let{uri:t}=e;return jt(t)===n}))})),Wo=(0,l.curry)(((e,t)=>{const r=jt(t);return(0,l.pipe)(Go(l.__,t),(0,l.unless)(l.isNil,(0,l.propOr)(r,"label")))(e)})),Bo=e=>{let{sources:t}=e;return(null==t?void 0:t.find((0,l.propEq)("uri","configuration/sources/Reltio")))?t:null==t?void 0:t.concat({uri:"configuration/sources/Reltio",label:"Reltio",icon:"images/source/reltio.png",abbreviation:"Reltio"})},Yo=(e,t)=>{let{sources:r=[]}=e;return r.find((e=>{let{uri:r,label:n}=e;return r===t||n===t||r.substring(r.lastIndexOf("/")+1)===t}))},qo=(0,l.curry)(((e,t)=>{let{roles:r}=e;return(0,l.pipe)((0,l.find)((0,l.propEq)("uri",t)),(0,l.prop)("label"))(r)})),Ho=(e,t)=>(e.roles||[]).filter((r=>{var n;return((null===(n=Hr(e,t))||void 0===n?void 0:n.entityTypeRoleURIs)||[]).includes(r.uri)}));function Qo(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Ko(e,t,r[t])}))}return e}function Ko(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Jo=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.identity,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:["attributes"];const i=n.reduce(((e,r)=>e.concat(t[r]||[])),[]);return Xo(i,e,t,r,n)},Xo=function(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:l.identity,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:["attributes"];return ee.fromNull(e&&e.length?e:Tr(t,r)).map((e=>e.map((e=>{const r=Jo(t,e,n,i);return r.length?Qo({},e,{children:r}):e})))).orSome([]).filter((0,l.either)((0,l.complement)(sr),(0,l.prop)("children"))).filter(oa).filter(n).filter((0,l.either)((0,l.prop)("label"),(0,l.prop)("name")))},zo=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.identity;return Jo(e,t,r,["attributes","analyticsAttributes"])},Zo=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.identity;return Jo(e,t,r,["attributes"])},es=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.identity;return Jo(e,t,r,["analyticsAttributes"])},ts=e=>e.children?e.children.flatMap(ts):e,rs=e=>e.children?[e,...e.children.flatMap(rs)]:e,ns=(0,l.curry)(((e,t)=>{let{groupTypes:r}=e;return(0,l.pipe)((0,l.find)((0,l.propEq)("uri",t)),(0,l.prop)("label"))(r)})),is=(0,l.curry)(((e,t)=>(t||[]).find((t=>{let{uri:r}=t;return jt(r)===e})))),as=e=>{let{survivorshipStrategies:t}=e;const[r]=t||[];return(0,l.pipe)((0,l.either)((0,l.find)((0,l.propEq)("default",!0)),is("LUD")),(0,l.defaultTo)(r))(t||[])},os=(e,t)=>{let{survivorshipStrategies:r}=e;return is(t,r)},ss=(0,l.allPass)([(0,l.complement)(l.isNil),Li(Di.READ)]),ls=(0,l.allPass)([(0,l.complement)(l.isNil),(0,l.complement)((0,l.prop)("abstract")),(0,l.complement)((0,l.propEq)("uiConfigHiddenType",!0)),Li(Di.READ)]),us=(0,l.allPass)([(0,l.complement)(l.isNil),(0,l.complement)((0,l.prop)("abstract")),(0,l.complement)((0,l.propEq)("uiConfigHiddenType",!0)),(0,l.anyPass)([Li(Di.CREATE),Li(Di.INITIATE_CHANGE_REQUEST)])]),cs=(0,l.curryN)(2,(0,l.pipe)(Hr,ls)),ps=(0,l.curryN)(2,(0,l.pipe)(Ni,ss));function ds(e,t,r,n){var i={name:e,valueUri:r.substr(0,r.indexOf(t)+t.length)};return n&&n.uri&&(i.uri=n.uri.substr(0,n.uri.indexOf(e)+e.length)),i.hasChildren=i.valueUri!==r,i}function ys(e,t){for(var r=e.substr(e.indexOf("/attributes/")+12).split("/"),n=[],i=0;i<r.length;i+=2)n.push(ds(r[i],r[i+1],e,t));return n}function fs(e,t,r,n,i,a,o){void 0===a&&(a=0);var s=ys(r,t)[a];if(s.hasChildren){e[s.name]||(e[s.name]=[{uri:s.valueUri,value:{},type:s.uri}]);var l=e[s.name].filter((function(e){return e.uri===s.valueUri}))[0];return fs(l.value,t,r,n,i,a+1,o)}var u=e[t.name];if(u||(u=e[t.name]=[]),null!=n){var c={value:n.refEntity?n.value:n,uri:r,type:t.uri};return n.lookupCode&&(c.value=n.value,c.lookupCode=n.lookupCode),n.refEntity&&(c.refEntity=n.refEntity,c.label=n.label),n.refRelation&&(c.refRelation=n.refRelation),i&&(c.crosswalks=i),u.splice(o||0,0,c),n}}function Ts(e,t,r,n,i,a){void 0===a&&(a=0);var o=ys(r,t)[a];if(!o.hasChildren){var s,l=e[t.name],u=l&&l.filter((function(e){return e.uri===r}))[0];return u?("[object Object]"!==u.value.toString()?(Es(n,u),i&&(u.crosswalks=i),t.cardinality&&1===t.cardinality.minValue&&1===t.cardinality.maxValue&&l.filter((function(e){return!1===e.ov})).forEach(Es.bind(null,n))):n.refEntity?(u.refRelation=n.refRelation,u.refEntity=n.refEntity,u.value=n.value,u.label=n.label):null!==n.value&&void 0!==n.value&&null!==u.value&&"object"==typeof u.value&&(u.value=n.value,u.label=n.label),s=u.value):s=fs(e,t,r,n,i,a),s}var c=Ts(e,o,o.valueUri,{},i,a);Ts(c,t,r,n,i,a+1)}function Es(e,t){ce(e)?(t.value=e.value,t.lookupCode=e.lookupCode):(t.value=e,t.lookupCode&&(t.lookupCode=e))}function ms(e,t,r,n){void 0===n&&(n=0);var i=ys(r)[n];if(i.hasChildren){var a=(e[i.name]||[]).filter((function(e){return e.uri===i.valueUri}))[0];a&&ms(a.value,t,r,n+1)}else{var o=e[t.name];o&&(o.forEach((function(e,t){e.uri===r&&o.splice(t,1)})),0===o.length&&delete e[t.name])}}function hs(e,t){e.roles=t||[]}function bs(e,t){e.tags=t||[]}function Os(e,t){e.startDate=t||""}function vs(e,t){e.endDate=t||""}const gs=e=>{let{ov:t}=e;return!1!==t},_s=(e,t)=>((e,t)=>Pr(e.type)&&oe(t))(e,t)||((e,t)=>Rr(e.type)&&se(t))(e,t),As=(0,l.curry)(((e,t)=>(0,l.cond)([[l.isNil,(0,l.always)(null)],[(0,l.pipe)((0,l.prop)(e),Array.isArray),(0,l.path)([e,0])],[l.T,(0,l.prop)(e)]])(t))),Ns=As("refEntity"),Ps=As("refRelation"),Rs=e=>(0,l.isEmpty)(e)?[]:[{objectURI:e.uri,type:e.type}],Ss=e=>{let{uri:t}=e;return[{type:"configuration/sources/Reltio",objectURI:`relations/${(0,l.pipe)((0,l.split)("/"),l.last)(t)}`}]},ws=(0,l.prop)("objectURI"),Is=(0,l.prop)("objectURI"),Us=(0,l.prop)("type"),Cs=(0,l.pipe)(Ns,(0,l.defaultTo)({}),ws),Ds=(0,l.pipe)(Ps,(0,l.defaultTo)({}),Is),js=(0,l.pipe)(Ns,(0,l.defaultTo)({}),Us),Ls=(e,t)=>{const r=(t&&t.crosswalks||[]).map((e=>({attributes:e.attributeURIs||[],type:e.type})));return(e||[]).concat(r)},ks=(0,l.evolve)({refEntity:ne,refRelation:ne}),Fs=(e,t,r,n)=>{const i=yr(e,r),a=Hr(e,t.type)||Ni(e,t.type);if(0===i.length)return null;const o=tr(r);let s=[t],l=1;i[0].uri!==t.type&&(l=0);let u=null;const c=n?[]:null;let p=null;for(let e=l;e<i.length;++e){const t=e===i.length-1,r=i[e];let l=[];if(!Et(r,p)){u=n?[]:null;break}Array.isArray(s)&&(s.forEach((s=>{const u=s.value||s[o]||{};let d=[];r.startObject&&r.endObject||r.typeColor?(d=a.attributes.filter((e=>ut(e)===r.uri||lt(e)===r.uri)),p=d.reduce(((e,t)=>{const r=t.referencedAttributeURIs&&t.referencedAttributeURIs.filter((function(t){return-1===e.indexOf(t)}));return r?e.concat(r):e}),[])):(d.push(r),p=null),d.forEach((a=>{const o=u[a.name];o&&(l=l.concat(o)),n&&t&&c.push({attrValues:o||[],parent:s,attrType:r,parentType:i[e-1],typePath:i})}))})),s=l),t&&(u=s)}return c||u},Ms=(e,t)=>{const[r,n,...i]=t.split("/"),a=(e[r]||[]).find((e=>{let{uri:t}=e;return t.endsWith("/"+n)})),o=i.join("/");return o&&a?Ms(a.value,o):a},xs=(0,l.curry)(((e,t)=>{if(!t.startsWith(e.uri))return;const[r,...n]=t.slice(e.uri.length+1).split("/"),i=n.join("/");return Ms(e[r],i)})),$s=(0,l.cond)([[(0,l.has)("lookupCode"),(0,l.pick)(["value","lookupCode"])],[(0,l.has)("refEntity"),(0,l.pick)(["refEntity","label","value"])],[l.T,(0,l.prop)("value")]]),Vs=(0,l.cond)([[(0,l.has)("lookupCode"),(0,l.pick)(["value","lookupCode","ov"])],[(0,l.has)("refEntity"),(0,l.pick)(["refEntity","label","value","ov"])],[l.T,(0,l.pick)(["value","ov"])]]),Gs=(0,l.cond)([[(0,l.has)("lookupCode"),(0,l.pick)(["value","lookupCode","uri"])],[(0,l.has)("refEntity"),(0,l.pick)(["refEntity","label","value","uri"])],[l.T,(0,l.pick)(["value","uri"])]]),Ws=(0,l.curry)(((e,t,r)=>{const[n,...i]=t;return(0,l.pipe)((0,l.defaultTo)({}),(0,l.propOr)([],n),(t=>e?t.filter(e):t),(0,l.when)((()=>i.length>0),(0,l.pipe)((0,l.map)((0,l.prop)("value")),(0,l.map)(Ws(e,i)))))(r)})),Bs=(0,l.curry)(((e,t)=>(0,l.ifElse)((0,l.is)(Array),(0,l.map)(Bs(e)),e)(t))),Ys=(0,l.curry)(((e,t,r,n)=>(0,l.pipe)(Ws(e,r),Bs(t))(n))),qs=Ys(null,$s),Hs=Ys(gs,$s),Qs=Ys(null,Vs),Ks=Ys(gs,Vs),Js=Ys(gs,Gs),Xs=(e,t,r)=>{var n,i,a;return e.uri===t?null==e||null===(n=e.attributes)||void 0===n?void 0:n[r]:null===(i=xs(e,t))||void 0===i||null===(a=i.value)||void 0===a?void 0:a[r]},zs=(e,t)=>(0,l.pipe)(l.values,l.flatten,(0,l.find)((0,l.pipe)(Cs,(0,l.equals)(t))))((null==e?void 0:e.attributes)||{}),Zs=(e,t)=>{const r=Wt(t),n=(0,l.pipe)((0,l.split)("/"),(0,l.dropLast)(1),l.last)(t);return Xs(e,r,n)},el=Object.values(vn),tl=(0,l.includes)(l.__,el),rl=e=>el.reduce(((t,r)=>{let{uri:n}=r;return void 0!==e[n]?(0,l.assoc)(n,e[n],t):t}),{});function nl(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){il(e,t,r[t])}))}return e}function il(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const al=(e,t)=>`${e}_${t}`,ol=[Un.matches.name,Un.matchRules.name],sl=(0,l.values)(_n).map((e=>e.name)),ll=e=>(0,l.when)((0,l.always)(!e),(0,l.reject)((0,l.pipe)((0,l.prop)("name"),(0,l.includes)(l.__,sl)))),ul=(0,l.curry)(((e,t)=>{const r=t.filter((0,l.pipe)((0,l.prop)("name"),(0,l.includes)(l.__,ol)));return(e||[]).flatMap((e=>r.map((0,l.evolve)({label:(0,l.concat)(`${e.label} `),name:t=>al(`dtPotentialMatches.${t}`,e.id)})))).concat(t)})),cl=function(e,t){let r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return(0,l.pipe)(l.values,ll(r),ul(t),(0,l.find)((0,l.either)((0,l.propEq)("name",e),t?l.F:t=>e.startsWith(al(`dtPotentialMatches.${t.name}`,"")))))(Un)},pl=(0,l.propEq)("uri",Un.type.uri),dl=e=>(0,l.values)(In).some((0,l.propEq)("uri",null==e?void 0:e.uri)),yl=(0,l.propEq)("uri",Sn.sourceSystems.uri),fl=Object.values(gn),Tl=(0,l.includes)(l.__,fl),El=e=>{let{entity:t,attributeType:r,value:n}=e;return nl({},t,{[r.uri]:void 0===n?r.defaultValue:n})},ml=e=>{let{entity:t,attributeType:r}=e;return(0,l.dissoc)(r.uri,t)},hl=e=>{let{entity:t,attributeType:r,value:n}=e;return nl({},t,{[r.uri]:n})},bl=(0,l.propEq)("uri",gn.roles.uri),Ol=(0,l.propEq)("uri",gn.tags.uri);function vl(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){gl(e,t,r[t])}))}return e}function gl(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const _l=e=>{let{parentUri:t,attributeType:r}=e;return vl({uri:_t(t,r.name),ov:!0,type:r.uri},(e=>{const t=(0,l.propOr)("","defaultValue",e);return(0,l.cond)([[sr,(0,l.always)({value:{}})],[cr,()=>t?{value:"",lookupCode:t}:{value:""}],[(0,l.both)((0,l.propEq)("defaultValue","now"),(0,l.pipe)((0,l.prop)("type"),hr)),(0,l.always)({value:Date.now()})],[l.T,(0,l.always)({value:t})]])(e)})(r))},Al=e=>{let{attributeTypes:t,parentUri:r,metadata:n,mode:i}=e;const a=(0,l.pipe)(Ya(i),(0,l.filter)((0,l.anyPass)([(0,l.has)("defaultValue"),pr,(0,l.propEq)("required",!0)])))(t),o={};for(const e of a){const{name:t}=e,a=_l({parentUri:r,attributeType:e});let s=Tr(n,e);s&&(e.type===at.TYPE_REFERENCE&&(s=Tt(s)),a.value=Al({parentUri:a.uri,attributeTypes:s,metadata:n,mode:i})),(!(0,l.isEmpty)(a.value)||Boolean(a.lookupCode)||pr(e))&&(o[t]=[a])}return o},Nl=e=>{let{entity:t,metadata:r}=e;return Lo(r,t.type,!0).filter(pr).reduce(((e,t)=>{const n=t.name,i=Wt(t.uri);return(i===e.type?[{parentUri:e.uri,attributes:e.attributes}]:Fs(r,e,i).map((e=>{let{value:t,uri:r}=e;return{parentUri:r,attributes:t}}))).reduce(((e,r)=>{let{parentUri:i,attributes:a}=r;return a[n]&&0!==a[n].length?e:Rl({entity:e,attributeType:t,parentUri:i,index:0})}),e)}),t)},Pl=(0,l.curry)(((e,t)=>{let{metadata:r,attributeTypes:n,parentUri:i,mode:a}=e;const o=n.filter((e=>{let{name:r}=e;return!t[r]})),s=(0,l.mapObjIndexed)(((e,t)=>{const{type:i,attributes:o}=n.find((e=>t===e.name));return e.map((e=>{const{value:t,uri:n}=e;return i===at.TYPE_NESTED?vl({},e,{value:Pl({attributeTypes:o,parentUri:n,metadata:r,mode:a},t)}):e}))}));return vl({},s(t),Al({attributeTypes:o,parentUri:i,metadata:r,mode:a}))})),Rl=e=>{let{entity:t,attributeType:r,parentUri:n,index:i,crosswalks:a,value:o,nestingLevel:s}=e;const l=_l({parentUri:n,attributeType:r}),u=$s(l);return(0,he.ZP)(t,(e=>{fs(e.attributes||e.value,r,l.uri,void 0!==o?o:u,a,s,i)}))},Sl=e=>{let{entity:t,attributeType:r,newAttribute:n,index:i,crosswalks:a,nestingLevel:o}=e;return(0,he.ZP)(t,(e=>{fs(e.attributes||e.value,r,n.uri,$s(n),a,o,i)}))},wl=e=>{let{entity:t,attributeType:r,uri:n,value:i,crosswalks:a,nestingLevel:o}=e;return(0,he.ZP)(t,(e=>{Ts(e.attributes||e.value,r,n,i,a,o)}))},Il=e=>{let{entity:t,attributeType:r,uri:n,nestingLevel:i}=e;return(0,he.ZP)(t,(e=>{ms(e.attributes||e.value,r,n,i)}))},Ul=e=>""===e,Cl=(0,l.cond)([[(0,l.propSatisfies)((0,l.complement)((0,l.anyPass)([Ul,l.isNil])),"lookupCode"),l.F],[(0,l.propSatisfies)((0,l.anyPass)([Ul,l.isNil]),"value"),l.T],[(0,l.both)((0,l.propSatisfies)(l.isEmpty,"value"),(0,l.propSatisfies)((0,l.either)(l.isNil,l.isEmpty),"refEntity")),l.T],[l.T,l.F]]),Dl=(0,l.reject)(Cl),jl=e=>{let{deleteEmptyComplex:t,valueTransformer:r=l.identity}=e;return(0,l.pipe)((0,l.map)((0,l.pipe)((0,l.map)((0,l.pipe)(r,(0,l.evolve)({value:(0,l.when)((0,l.is)(Object),(e=>jl({deleteEmptyComplex:t,valueTransformer:r})(e)))}))),Dl)),(0,l.when)((0,l.always)(t),(0,l.reject)(l.isEmpty)))},Ll=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return jl({valueTransformer:(0,l.pipe)((0,l.omit)(["type","uri"]),ks),deleteEmptyComplex:e})},kl=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return(0,l.pipe)(Ll(e),(0,l.reject)(l.isEmpty))},Fl=(0,l.curry)(((e,t)=>t.reduce(((e,t)=>{const{attributeType:r,parentUri:n,index:i}=t;return tl(r)?El({entity:e,attributeType:r}):Rl({entity:e,attributeType:r,parentUri:n,index:i})}),e))),Ml=(0,l.curry)(((e,t)=>{const{attributeType:r,uri:n,value:i}=t;return tl(r)?hl({entity:e,attributeType:r,value:i}):wl({entity:e,attributeType:r,uri:n,value:i})})),xl=(0,l.curry)(((e,t)=>{const{attributeType:r,uri:n}=t;return tl(r)?ml({entity:e,attributeType:r}):Il({entity:e,attributeType:r,uri:n})})),$l=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return(0,l.pipe)((0,l.filter)((0,l.pipe)((0,l.pathOr)([],["roles"]),(0,l.either)((0,l.propEq)("length",0),(0,l.any)((e=>t.includes(e)))))),(0,l.map)((0,l.pathOr)([],["attributes"])),l.flatten)(e)},Vl="UrlThumbnail",Gl="CdnUrlThumbnail",Wl=(0,l.curry)(((e,t,r)=>{const n=(0,l.prop)(e,t);if(Array.isArray(n)){const e=r?n.find(gs):(0,l.head)(n);return e&&e.value}return null})),Bl=(e,t)=>(0,l.pipe)((0,l.propOr)({},"value"),(r=>e.map((e=>Wl(e,r,t)))),(0,l.filter)(l.identity),l.head,(0,l.defaultTo)("")),Yl=Bl(["CdnUrl","Url"],!0),ql=Bl(["CdnUrlPreview","UrlPreview"],!0),Hl=Bl([Gl,Vl],!0),Ql=Bl([Gl,Vl]),Kl=(e,t,r)=>{const{attributes:n={}}=t,{analyticsAttributes:i={}}=t;return e.reduce(((e,a)=>{const o=(0,l.cond)([[er,(0,l.always)(t)],[(0,l.both)(Zt,(0,l.always)(i)),(0,l.always)(i)],[l.T,(0,l.always)(n)]])(a),s=er(a)?"uri":"name",u=(0,l.pipe)((0,l.prop)(a[s]),(0,l.when)((0,l.both)((0,l.always)(tl(a)),(e=>null===e)),(0,l.always)([""])),(0,l.defaultTo)([]),ie)(o);return(0,l.when)((0,l.always)(r(u,a)),(0,l.append)({attrType:a,values:u}),e)}),[])},Jl=(e,t,r)=>{const n=Ha(e),i=(0,l.any)(r?l.T:gs);return Kl(n,t,i)},Xl=(e,t,r,n,i,a)=>{const o=At(null==r?void 0:r.uri)?Ya(t,e):qa(t,e);return Kl(o,r,((e,o)=>{const s=ta({attributeType:o,mode:t});return n&&s||o.required&&s||(0,l.any)(i?l.T:gs,e)||er(o)&&(0,l.has)(o.uri,r)||(null==a?void 0:a.includes(o.uri))}))};let zl;const Zl=e=>{zl=e};function eu(e,t){return zl(e,t)}const tu=e=>(t,r)=>new Promise(((n,i)=>{e(t,r,(e=>{n(e)}),((e,t)=>{i((0,l.when)((0,l.is)(String),(0,l.always)({errorMessage:e,errorCode:t}))(e))}),null)})),ru=50,nu=e=>{let{type:t,parents:r=[],displayNamePrefix:n,max:i=ru,offset:a=0}=e;return eu("/lookups/list",{method:"POST",body:JSON.stringify({type:t,parents:r,displayNamePrefix:n,max:i,offset:a}),headers:{"Content-Type":"application/json"}})},iu=(0,l.once)((()=>eu("/lookups",{method:"GET",headers:{"Content-Type":"application/json"}}))),au=e=>eu("/lookups/resolveList",{method:"POST",body:JSON.stringify(e),headers:{"Content-Type":"application/json"}}),ou=(e,t)=>eu("/lookups/cascadeUpdate",{method:"POST",body:JSON.stringify({state:e,updatedValue:t}),headers:{"Content-Type":"application/json"}}),su=e=>ee.fromNull(nn[e]).map(hn().text).orSome(""),lu=(0,l.curry)(((e,t)=>`${e}_${t}`)),uu=(0,l.split)("_"),cu=(0,l.includes)("_"),pu=(0,l.curry)(((e,t)=>e&&(e===t||e.endsWith(`_${t}`)))),du=(0,l.curry)(((e,t)=>e.some(pu(t)))),yu=du([tn.IN_RANGE,tn.COUNT_RANGE,tn.WITHIN]),fu=du([tn.EXISTS,tn.MISSING_VALUE]),Tu=(0,l.cond)([[fu,(0,l.always)(0)],[yu,(0,l.always)(2)],[l.T,(0,l.always)(1)]]),Eu=(0,l.complement)(fu),mu=du([tn.HAS_ALL,tn.EQUALS,tn.NOT_EQUALS]),hu=du([tn.COUNT_EQUALS,tn.COUNT_NOT_EQUALS,tn.COUNT_LT,tn.COUNT_LTE,tn.COUNT_GT,tn.COUNT_GTE,tn.COUNT_RANGE]),bu=du([tn.IN_FILE,tn.NOT_IN_FILE]),Ou=e=>{switch(e){case tn.COUNT_EQUALS:return tn.EQUALS;case tn.COUNT_NOT_EQUALS:return tn.NOT_EQUALS;case tn.COUNT_LT:return tn.LT;case tn.COUNT_LTE:return tn.LTE;case tn.COUNT_GT:return tn.GT;case tn.COUNT_GTE:return tn.GTE;case tn.COUNT_RANGE:return tn.IN_RANGE}},vu=du([tn.ON,tn.BEFORE,tn.AFTER,tn.WITHIN,tn.NOT_EQUALS]),gu=du([tn.WITHIN]),_u=[[tn.COUNT_EQUALS,tn.COUNT_NOT_EQUALS,tn.COUNT_LT,tn.COUNT_LTE,tn.COUNT_GT,tn.COUNT_GTE],[tn.NOT_IN_FILE,tn.IN_FILE],[tn.EQUALS,tn.NOT_EQUALS,tn.HAS_ALL],[tn.LT,tn.LTE,tn.GT,tn.GTE],[tn.MISSING_VALUE,tn.EXISTS],[tn.COUNT_RANGE],[tn.IN_RANGE],[tn.STARTS_WITH,tn.CONTAINS],[tn.FULL_TEXT],[tn.ON,tn.BEFORE,tn.AFTER,tn.NOT_EQUALS],[tn.WITHIN]],Au=(e,t)=>_u.some((r=>r.includes(e)&&r.includes(t))),Nu=(0,l.pipe)(l.omit,l.values),Pu={OPTIONS_FOR_STRING:Nu(["IN_RANGE","LT","LTE","GT","GTE","ON","BEFORE","AFTER","WITHIN"],tn),OPTIONS_FOR_DATE:[tn.ON,tn.BEFORE,tn.AFTER,tn.WITHIN,tn.NOT_EQUALS,tn.MISSING_VALUE,tn.EXISTS,tn.COUNT_EQUALS,tn.COUNT_NOT_EQUALS,tn.COUNT_LT,tn.COUNT_LTE,tn.COUNT_GT,tn.COUNT_GTE,tn.COUNT_RANGE,tn.IN_FILE,tn.NOT_IN_FILE],OPTIONS_FOR_BOOLEAN:Nu(["STARTS_WITH","IN","NOT_IN","HAS_ALL","IN_RANGE","FULL_TEXT","LT","LTE","GT","GTE","CONTAINS","ON","BEFORE","AFTER","WITHIN"],tn),OPTIONS_FOR_BLOB:Nu(["EQUALS","NOT_EQUALS","STARTS_WITH","IN","NOT_IN","HAS_ALL","IN_RANGE","LT","LTE","GT","GTE","ON","BEFORE","AFTER","WITHIN"],tn),OPTIONS_FOR_NUMBER:Nu(["STARTS_WITH","FULL_TEXT","CONTAINS","ON","BEFORE","AFTER","WITHIN"],tn),OPTIONS_FOR_LOOKUP:Nu(["STARTS_WITH","FULL_TEXT","IN_RANGE","LT","LTE","GT","GTE","ON","BEFORE","AFTER","WITHIN","CONTAINS"],tn),OPTIONS_FOR_ENUM:Nu(["STARTS_WITH","FULL_TEXT","IN_RANGE","LT","LTE","GT","GTE","ON","BEFORE","AFTER","WITHIN"],tn),OPTIONS_FOR_ID:[tn.EQUALS,tn.NOT_EQUALS,tn.IN_FILE,tn.NOT_IN_FILE],OPTIONS_FOR_COUNT:[tn.EQUALS,tn.NOT_EQUALS,tn.LT,tn.LTE,tn.GT,tn.GTE,tn.IN_RANGE],OPTIONS_FOR_COMPLEX:[tn.COUNT_EQUALS,tn.COUNT_NOT_EQUALS,tn.COUNT_LT,tn.COUNT_LTE,tn.COUNT_GT,tn.COUNT_GTE,tn.COUNT_RANGE,tn.EXISTS,tn.MISSING_VALUE],OPTIONS_FOR_UNKNOWN_TYPE:[tn.EQUALS,tn.NOT_EQUALS,tn.EXISTS,tn.MISSING_VALUE]},Ru=e=>{const{type:t,singleValue:r=!1}=e,n=(e=>{switch(e){case at.TYPE_TYPEAHEAD:case at.TYPE_STRING:case at.TYPE_PASSWORD:case at.TYPE_TEXT:case at.TYPE_CIK_ID:case at.TYPE_URL:case at.TYPE_BLOG_URL:case at.TYPE_IMAGE_URL:case at.TYPE_EMAIL:return Pu.OPTIONS_FOR_STRING;case at.TYPE_LOOKUP:case at.TYPE_DEPENDENT_LOOKUP:return Pu.OPTIONS_FOR_LOOKUP;case at.TYPE_ENUM:return Pu.OPTIONS_FOR_ENUM;case at.TYPE_DATE:case at.TYPE_ACTIVENESS_DATE:case at.TYPE_TIMESTAMP:case at.TYPE_LOCAL_DATE:return Pu.OPTIONS_FOR_DATE;case at.TYPE_BOOLEAN:case at.TYPE_BOOLEAN_RADIO:return Pu.OPTIONS_FOR_BOOLEAN;case at.TYPE_BLOB:return Pu.OPTIONS_FOR_BLOB;case at.TYPE_LONG:case at.TYPE_INT:case at.TYPE_FLOAT:case at.TYPE_DOUBLE:case at.TYPE_NUMBER:return Pu.OPTIONS_FOR_NUMBER;case at.TYPE_ENTITY_ID:return Pu.OPTIONS_FOR_ID;case at.TYPE_RDM_LOOKUPS_NOT_RESOLVED:return[tn.EQUALS];case at.TYPE_COUNT:return Pu.OPTIONS_FOR_COUNT;case at.TYPE_NESTED:case at.TYPE_REFERENCE:case at.TYPE_IMAGE:return Pu.OPTIONS_FOR_COMPLEX;default:return Pu.OPTIONS_FOR_UNKNOWN_TYPE}})(t);return r?(0,l.reject)(hu,n):n},Su=e=>[we.and,we.andNot].includes(e),wu=e=>[we.or,we.orNot].includes(e),Iu=e=>e.slice(0,-1).some((0,l.pipe)((0,l.prop)("operator"),wu)),Uu=(Cu=[we.and],e=>e.slice(0,-1).every((e=>Cu.includes(e.operator))));var Cu;const Du=e=>e.map(((e,t,r)=>{const n=0===t;return(0,l.assoc)("operator",n?null:r[t-1].operator,e)}),[]),ju=e=>e.map(((e,t,r)=>{const n=t===r.length-1;return(0,l.assoc)("operator",n?null:r[t+1].operator,e)}),[]),Lu=e=>`(${e})`,ku=e=>{const t=[],r={"{":"}","[":"]","(":")"},n=(0,l.invertObj)(r);for(let i=0;i<e.length;i++){const a=e[i];if(r[a])t.push(a);else if(n[a]&&r[t.pop()]!==a)return!1}return 0===t.length},Fu=function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const r=[we.or,we.orNot],n=t?[we.and,we.andNot,...r]:r,i=n.map((e=>` ${e} `)).some((t=>e.includes(t))),a=e.startsWith("not"),o="("===(0,l.head)(e)&&")"===(0,l.last)(e)&&ku(e.slice(1,-1));return!i&&!a||o?e:Lu(e)},Mu="and",xu=class{constructor(){this.clauses=[]}addClause(e){return e&&(this.clauses=this.clauses.concat(e)),this}build(){return this.clauses.join(" and ")}orBuild(){return`(${this.clauses.join(" or ")})`}buildWithOperators(e){return this.clauses.reduce(((t,r,n)=>{const i=0===t.length,a=(0,l.propOr)(Mu,n,e),o=(e=>[we.andNot,we.orNot].includes(e))(a)?Fu(r):r;return i?o:`${t} ${a} ${o}`}),"")}},$u=(0,l.curry)(((e,t)=>{const r=(0,l.unless)(l.isNil,e);return Array.isArray(t)?t.map(r):r(t)})),Vu=e=>Array.isArray(e)?e.map(Vu).toString():"object"==typeof e&&"lookupCode"in e?e.lookupCode:e.toString().trim(),Gu=(0,l.replace)(/./g,(e=>{switch(e){case"\\":e="\\\\";break;case"'":e="\\'";break;case'"':e='\\"'}return e})),Wu=e=>`'${e}'`,Bu=e=>`"${e}"`,Yu=e=>(0,l.pipe)((0,l.map)(e),(0,l.join)(" or ")),qu=(0,l.pipe)(Vu,Gu),Hu=(0,l.pipe)(qu,Wu),Qu=(0,l.curry)(((e,t)=>(0,l.cond)([[(0,l.allPass)([(0,l.always)(yu(e)),Array.isArray]),()=>`${t[0]} - ${t[1]}`],[Array.isArray,()=>t.join(", ")],[l.T,l.identity]])(t))),Ku=(e,t)=>hu(t)?{type:at.TYPE_INT}:bu(t)?{type:at.TYPE_FILE}:vu(t)&&!gu(t)&&br(e.type)?{type:at.TYPE_LOCAL_DATE}:e,Ju=Object.values(pn),Xu=e=>!Object.values(pn).includes(e),zu=e=>Ju.includes(e),Zu=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:dn;return hn().text(t[e])},ec=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Object.values(un),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:dn;return e.map((e=>({value:e,get label(){return Zu(e,t)}})))},tc=e=>{const t=f()().startOf("minute");switch(e){case un.LAST_DAY:return[f()(t).subtract(1,"day").valueOf(),t.valueOf()];case un.LAST_WEEK:return[f()(t).subtract(1,"week").valueOf(),t.valueOf()];case un.LAST_MONTH:return[f()(t).subtract(1,"month").valueOf(),t.valueOf()];case un.LAST_6MONTHS:return[f()(t).subtract(6,"months").valueOf(),t.valueOf()];case un.LAST_YEAR:return[f()(t).subtract(1,"year").valueOf(),t.valueOf()];case cn.LAST_3DAYS:return[f()(t).subtract(3,"day").valueOf(),t.valueOf()];default:return e}},rc=e=>{let[t,r]=e;return[f()(t).valueOf(),f()(r).endOf("date").valueOf()]},nc=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:tc;return(0,l.is)(String,e)?t(e):rc(e)};let ic;!function(e){e.CurrentUser="currentUser"}(ic||(ic={}));const ac={},oc=(e,t)=>{ac[e]=t},sc=e=>ac[e];function lc(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){uc(e,t,r[t])}))}return e}function uc(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const cc=e=>e.split("{CurrentUser}").join(sc(ic.CurrentUser)||""),pc=(0,l.curry)(((e,t)=>t.length>1?`(${t.join(e)})`:t.toString())),dc=(0,l.curry)(((e,t,r)=>{const n=r.map(yu(e)||t.endsWith(".count")?qu:Hu).join(",");return n?`${e}(${t},${n})`:`${e}(${t})`})),yc=e=>t=>{switch(e){case 0:return[[]];case 1:return t.map((e=>[e]));default:return t}},fc=e=>{let{filter:t,fieldName:r,values:n}=e;const i=Tu(t);return(0,l.pipe)(yc(i),(0,l.map)(dc(t,r)),pc(" or "))(n)},Tc=e=>{let{filter:t,fieldName:r,values:n}=e;return`${t}(${r},${(0,l.flatten)(n).map(Hu).join(",")})`},Ec=e=>`*${e}*`,mc=e=>`URL:${e}`,hc=e=>e.length>1||Array.isArray(e[0])&&e[0].length>1,bc=(e,t)=>{const r="id"===t?"listEqualsCaseSensitive":"listEquals";return e===tn.IN_FILE?r:`not ${r}`},Oc=(e,t)=>[R(e,t),S(e,t)],vc=(0,l.pipe)((e=>{const{values:t,filter:r}=e,n=!gc(e);if(!(0,l.isEmpty)(t)){const[i]=t;switch(r){case tn.ON:return lc({},e,n?{filter:tn.EQUALS}:{filter:tn.IN_RANGE,values:[Oc(i,n)]});case tn.BEFORE:return lc({},e,{filter:tn.LTE,values:[[S(i,n)]]});case tn.AFTER:return lc({},e,{filter:tn.GTE,values:[[R(i,n)]]});case tn.WITHIN:return lc({},e,{filter:tn.IN_RANGE,values:[tc(i)]})}}return e}),fc),gc=(0,l.propSatisfies)(br,"type"),_c=[[(0,l.prop)("rawFilter"),(0,l.pipe)((0,l.prop)("rawFilter"),cc)],[(0,l.propEq)("filter",tn.HAS_ALL),(0,l.pipe)((e=>{let{fieldName:t,values:r}=e;return(0,l.pipe)((0,l.map)((e=>e.reduce(((e,r)=>e.addClause(fc({filter:tn.EQUALS,fieldName:t,values:[r]}))),new xu).build())),pc(" or "))(r)}),cc)],[(0,l.propEq)("filter",tn.CONTAINS),(0,l.pipe)((e=>{let{filter:t,fieldName:r,values:n}=e;return fc({fieldName:r,filter:t,values:n.map((0,l.pipe)(Vu,Ec))})}),cc)],[(0,l.propEq)("filter",tn.EQUALS),(0,l.pipe)((e=>{const{fieldName:t,values:r}=e;return"type"===t?fc(lc({},e,{values:(0,l.flatten)(r)})):hc(r)?Tc(lc({},e,{filter:"listEquals"})):fc(e)}),cc)],[(0,l.propEq)("filter",tn.NOT_EQUALS),(0,l.pipe)((e=>{const{values:t}=e;return"type"===e.fieldName?(e=>{let{filter:t,fieldName:r,values:n}=e;const i=Tu(t);return(0,l.pipe)(yc(i),(0,l.map)(dc(t,r)),pc(" and "))(n)})(lc({},e,{values:(0,l.flatten)(e.values)})):gc(e)?(e=>{const{values:t}=e,r=!gc(e),[n]=t;return(new xu).addClause(fc(lc({},e,{filter:tn.LT,values:[R(n,r)]}))).addClause(fc(lc({},e,{filter:tn.GT,values:[S(n,r)]}))).orBuild()})(e):hc(t)?Tc(lc({},e,{filter:"not listEquals"})):fc(e)}),cc)],[(0,l.propSatisfies)(bu,"filter"),e=>{let{filter:t,fieldName:r,values:n}=e;return fc({fieldName:r,filter:bc(t,r),values:n.map((0,l.prop)("link")).map(mc)})}],[(0,l.propSatisfies)(hu,"filter"),e=>{let{filter:t,fieldName:r,values:n}=e;return fc({fieldName:`${r}.count`,values:n,filter:Ou(t)})}],[(0,l.propSatisfies)(vu,"filter"),vc],[(0,l.propEq)("fieldName","geoPolygon"),e=>{let{fieldName:t,values:[r]}=e;const n=(0,l.pipe)((0,l.map)((e=>{let[t,r]=e;return`${t},${r}`})),(0,l.join)(";"))(r);return dc(t,n,[])}],[(0,l.propEq)("fieldName","geoLocation"),e=>{let{fieldName:t,values:[[r,n,i]],filter:a}=e;return dc(a,`${t},'${r},${n}',0,${i}`,[])}],[l.T,(0,l.pipe)(fc,cc)]],Ac=function(){let{filter:e,fieldName:t,values:r,rawFilter:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n||e&&t&&(!Eu(e)||Pc(e,r))},Nc=(e,t)=>Array.isArray(t)?Pc(e,t):e===tn.WITHIN?zu(t)||Number.isInteger(t):!(0,l.isNil)(t)&&Vu(t).length>0,Pc=(e,t)=>t&&t.length>0&&t.every((t=>Nc(e,t)));function Rc(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Sc=e=>{let{fieldName:t=""}=e;const r=t.split("."),n=r.indexOf("attributes");return n>=0?r.slice(0,n+2).join("."):t},wc=(0,l.pipe)((0,l.propOr)("","fieldName"),(0,l.split)("."),(0,l.slice)(0,-1),(0,l.join)(".")),Ic=(e,t,r)=>"children"===e?Cc(r,[...t][0],!0):r,Uc=(e,t,r)=>"values"===e?[...r,...t]:r,Cc=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const n=e.findIndex((0,l.propEq)("fieldName",t.fieldName));if(n>=0){const i=e[n];if("children"in i&&"children"in t)return(0,l.adjust)(n,(0,l.mergeDeepWithKey)(Ic,t),e);if(!r&&mu(t.filter)&&t.filter===i.filter)return(0,l.adjust)(n,(0,l.mergeDeepWithKey)(Uc,t),e)}return(0,l.append)(t,e)},Dc=(0,l.reduce)(((e,t)=>{const r=(e=>{const t=Sc(e),r=e=>e.fieldName===t?e:r({fieldName:wc(e),children:[e]});return r(e)})(t);return Cc(e,r)}),[]),jc=e=>e&&e.length>1&&!e.some((e=>{let{fieldName:t}=e;return null==t?void 0:t.startsWith("parent.")}))&&!e.every((0,l.has)("rawFilter")),Lc=e=>{let[t]=e;return t.children?Lc(t.children):t.operator},kc=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];function r(e){const[t,r]=(0,l.splitAt)(1,e),i=Lc(t)===we.andNot,a=n(t,!1),o=i?`not ${Fu(a)}`:a,s=n(r,!1);return`inSameAttributeValue(${o} ${Lc(r)||Mu} ${s})`}function n(i){let a=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return i.reduce(((i,o)=>i.addClause((0,l.cond)([[(0,l.has)("children"),e=>{let{children:i}=e;return a&&jc(i)&&!t?r(i):n(i,a)}],...e])(o))),new xu).buildWithOperators(i.map((0,l.prop)("operator")))}return n},Fc=(0,l.pipe)((0,l.propOr)("","filter"),cu),Mc=(0,l.map)((0,l.when)(Fc,(e=>{const[t,r]=uu(e.filter);return function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Rc(e,t,r[t])}))}return e}({},e,{fieldName:`${e.fieldName}.${t}`,filter:r})}))),xc=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return(0,l.pipe)((0,l.filter)(Ac),Mc,Dc,kc([...e,..._c],t))},$c=(0,l.curry)(((e,t)=>(e&&(t=t?`(${t}) and (${e})`:e),t))),Vc=[tn.ON,tn.BEFORE,tn.AFTER,tn.WITHIN,tn.NOT_EQUALS,tn.MISSING_VALUE,tn.EXISTS],Gc=[tn.EQUALS,tn.NOT_EQUALS,tn.STARTS_WITH,tn.MISSING_VALUE,tn.HAS_ALL,tn.FULL_TEXT,tn.EXISTS],Wc=[tn.EQUALS,tn.NOT_EQUALS,tn.LT,tn.LTE,tn.GT,tn.GTE,tn.IN_RANGE],Bc=(e,t)=>{const r=Xt(e);return(e=>{switch(e){case vn.startDate.name:case vn.endDate.name:case _n.dueDate.name:case Pn.createdTime.name:case Pn.updatedTime.name:case Sn.reltioLoadDate.name:case Sn.createDate.name:case Sn.updateDate.name:case Sn.deleteDate.name:case Sn.publishDate.name:return Vc;case Rn.matches.name:case Sn.count.name:return Wc;case _n.workflow.name:case _n.assignee.name:case _n.step.name:case An.commenter.name:case Pn.createdBy.name:case Pn.updatedBy.name:case Sn.sourceSystems.name:case Sn.value.name:return Gc;default:return null}})(t)||Ru(r)},Yc=[tn.EQUALS,tn.NOT_EQUALS,tn.CONTAINS,tn.STARTS_WITH,tn.MISSING_VALUE,tn.HAS_ALL,tn.IN_RANGE,tn.WITHIN,tn.EXISTS,tn.ON],qc=(0,l.pipe)(Bc,(0,l.filter)((0,l.includes)(l.__,Yc))),Hc=(e,t)=>t.map((t=>{let r;const n=t.split("."),i=n.shift(),a=(e[i]||[]).filter(gs);return a&&a[0]&&(r=n.length>0&&a[0].value?Hc(a[0].value,[n.join(".")])[0].value:"label"in a[0]&&"string"==typeof a[0].label?a[0].label:Object.prototype.hasOwnProperty.call(a[0],"label")?"":a[0].value||""),{key:t,value:r}}),""),Qc=(e,t)=>{const r=new RegExp("{[^}]*}","g");let n,i=[];for(;null!=(n=r.exec(t));)i.push(n[0]);i=i.map((function(e){return e.substring(1,e.length-1)}));const a=Hc(e.attributes||e.value,i);let o;return a.every((function(e){return void 0===e.value}))?o="":(o=t,o=o.replace(/\[[^\]]*]/g,(e=>{const t=e.match(/\{[^}]*}/g);return t?t.some((function(e){return e=e.substring(1,e.length-1).trim(),a.some((function(t){return t.key===e&&void 0===t.value}))}))?"":e.substring(1,e.length-1):e})),a.forEach((e=>{o=o.replace("{"+e.key+"}",e.value||"")}))),o},Kc=/[,\s]*$/,Jc=e=>{const t=hn().text(Tn);if(!e)return t;const r=e.replace(Kc,"");return""===r.toString().trim()?t:r},Xc=(e,t)=>{let{entityTypes:r}=e;const n=r.find((e=>{let{uri:r}=e;return r.endsWith(t)}));return n&&n.dataLabelPattern},zc=(e,t,r)=>{if("string"==typeof t)return t;if("Reference"!==r.type&&"Nested"!==r.type&&"Image"!==r.type)return"";if("Reference"===r.type){const n=Xc(e,r.referencedEntityTypeURI);if(n)return Qc({attributes:t||{}},n)}else if(("Nested"===r.type||"Image"===r.type)&&r.dataLabelPattern)return Qc({attributes:t||{}},r.dataLabelPattern);return""},Zc=e=>{let{uiPath:t,uri:r}=e;return`${t}#p~com.reltio.plugins.entity.default.DefaultPerspective_e~${r}`},ep=e=>{let{uiPath:t,tag:r,entityUri:n}=e;return`${t}#p~com.reltio.plugins.tags.TagPerspective_e~${encodeURIComponent(n)}_tag~${encodeURIComponent(r)}`},tp=(0,l.curry)(((e,t)=>t?t.startsWith("http:")||t.startsWith("https:")?t:e+"/"+t.replace(/^\/+/,""):"")),rp=(0,l.when)((0,l.is)(Object),(0,l.ifElse)((0,l.pipe)((0,l.prop)("value"),(0,l.is)(Object)),Hl,(0,l.prop)("value"))),np=(0,l.pipe)((0,l.prop)("defaultProfilePicValue"),rp),ip=(e,t,r)=>{const n=np(r)||(e=>(0,l.pipe)((0,l.prop)("defaultProfilePic"),(0,l.when)(l.identity,(0,l.pipe)(xs(e),rp)))(e))(r)||((e,t)=>{const r=(e=>{const t=t=>`${e.uri}/attributes/${t}`,r=(e=e||{}).imageAttributeURIs||[];return(0,l.uniq)([t("ImageGallery"),...r,t("Image"),t("ImageLinks")])})(Hr(e,t.type));return(0,l.pipe)((0,l.map)((0,l.pipe)((r=>Fs(e,t,r)),(0,l.defaultTo)([]),l.head)),(0,l.reject)(l.isNil),l.head,(0,l.when)(l.identity,rp))(r)})(e,r)||Zr(e,r.type);return tp(t,n)};function ap(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){op(e,t,r[t])}))}return e}function op(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const sp="DTSS/",lp=(0,l.replace)(new RegExp("^entities/"),""),up=e=>sp+e.dataTenant+"/"+e.uri,cp=(0,l.replace)(new RegExp("^DTSS/.+?/"),""),pp=e=>!(!e||!e.dataTenant),dp=(0,l.startsWith)(sp),yp=(0,l.pipe)((0,l.ifElse)(dp,(0,l.pipe)((0,l.split)("/"),(0,l.nth)(1)),(0,l.always)(null))),fp=(0,l.ifElse)(pp,up,(0,l.prop)("uri")),Tp=e=>e&&e.uri?e.dataTenant?up(e):lp(e.uri):"",Ep=(0,l.curry)(((e,t,r)=>(Hr(t,r.type)||{})[e]||"")),mp=Ep("label"),hp=Ep("typeGraphIcon"),bp=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=Hr(e,t.type)||{},n=(r.attributes||[]).reduce(((e,t)=>(e[t.uri]=t,e[t.name]=t,e)),{});return t.attributes&&r.businessCardAttributeURIs?r.businessCardAttributeURIs.map((r=>{const i=n[r];if(!i)return null;let a=t.attributes[i.name];if(!a)return null;Array.isArray(a)&&(a=a.find(gs)||"");const o=null!=a.label?(a.relationshipLabel?a.relationshipLabel+", ":"")+a.label:a.value;return{text:zc(e,o,i),uri:a.uri}})).filter(l.identity):[]},Op=(0,l.pipe)(bp,(0,l.map)((0,l.prop)("text")),(0,l.join)(", ")),vp=(0,l.curry)(((e,t)=>{if(!t)return[];if(1===e.length){return t[e[0]]||[]}{const r=t[e[0]];return Array.isArray(r)?r.reduce(((t,r)=>{if((0,l.is)(Object,r.value)){const n=vp(e.slice(1),r.value);n&&(Array.isArray(n)?t=t.concat(n):t.push(n))}return t}),[]):vp(e.slice(1),r)}})),gp=e=>!!e&&!!e.ctSubscribedUris&&e.ctSubscribedUris.length>0,_p=e=>(0,l.propOr)([],"matchRules",e),Ap=function(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return t&&r?ap({},r.aEntity,{attributes:n.attributes||{},roles:n.roles||[],tags:n.tags||[]}):e},Np=(e,t,r)=>t&&r?r.aEntity:e,Pp=(0,l.evolve)({attributes:kl(!0)}),Rp=(0,l.pipe)(Pp,(0,l.props)(["attributes","startDate","endDate","roles","tags"]),(0,l.all)(E)),Sp=e=>(0,l.assoc)("dataTenant",e);function wp(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Ip(e,t,r[t])}))}return e}function Ip(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Up=e=>{let{parentUri:t,relation:r,entityUri:n}=e;return{type:Ve.CREATE_RELATION,parameters:{parentUri:t,relation:r,entityUri:n}}},Cp=e=>{let{relationUri:t}=e;return{type:Ve.DELETE_RELATION,parameters:{relationUri:t}}},Dp=e=>{let{parentUri:t,entityUri:r,relationType:n,relationDirection:i}=e;return{type:Ve.IGNORE_RELATION,parameters:{parentUri:t,entityUri:r,relationType:n,relationDirection:i}}},jp=e=>{let{oldRelation:t,newRelation:r}=e;return{type:Ve.UPDATE_RELATION,parameters:{oldRelation:t,newRelation:r}}},Lp=e=>{let{entityUri:t,newEntityUri:r,relation:n,isReversed:i}=e;return{type:Ve.REPOINT_RELATION,parameters:{entityUri:t,newEntityUri:r,relation:n,isReversed:i}}},kp=(0,l.curry)(((e,t)=>(0,l.cond)([[(0,l.pathEq)(["parameters","relation","uri"],e),l.T],[(0,l.pathEq)(["parameters","relationUri"],e),l.T],[(0,l.pathEq)(["parameters","oldRelation","uri"],e),l.T],[(0,l.pathEq)(["parameters","newRelation","uri"],e),l.T],[l.T,l.F]])(t))),Fp=e=>e.type===Ve.DELETE_RELATION,Mp=e=>e.type===Ve.CREATE_RELATION,xp=e=>e.type===Ve.REPOINT_RELATION,$p=e=>e.type===Ve.UPDATE_RELATION,Vp=e=>e.reduce(((e,t)=>e.then((e=>t(e)))),Promise.resolve()),Gp=e=>{let{type:t,parameters:r,dcrProcessor:n}=e;const{enhanceUriWithDCR:i,updateDCRUriFromResponse:a}=n,o=e=>(a(e),e);switch(t){case Ve.CREATE_RELATION:return()=>{const{parentUri:e,relation:t,entityUri:n}=r,{type:a,attributes:s,startDate:l,endDate:u}=t;return Sf({startEntityUri:e,endEntityUri:n,relationType:a,attributes:s,startDate:l,endDate:u,uriPreprocessor:i}).then(o)};case Ve.DELETE_RELATION:return()=>{const{relationUri:e}=r;return Rf(e,i).then(o)};case Ve.IGNORE_RELATION:return()=>{const{entityUri:e,parentUri:t,relationType:n,relationDirection:i}=r;return Cf(t,{relatedEntityUri:e,relationType:n,relationDirection:i}).then(o)};case Ve.UPDATE_RELATION:return()=>{const{oldRelation:e,newRelation:t}=r;return wf({oldRelation:e,newRelation:t,uriPreprocessor:i}).then(o)};case Ve.REPOINT_RELATION:return()=>{const{entityUri:e,newEntityUri:t,relation:i,isReversed:a}=r,{uri:o}=i,s=[Cp({relationUri:o}),Up({parentUri:a?e:t,relation:i,entityUri:a?t:e})];return(0,l.pipe)((0,l.map)(Bp(n)),(0,l.map)(Gp),Vp)(s)}}},Wp=e=>t=>()=>e().then(t),Bp=e=>t=>wp({dcrProcessor:e},t),Yp=function(){let{alwaysCreateDCR:e=!1,dcrUri:t=null}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{alwaysCreateDCR:!1,dcrUri:null};const r=Fr({alwaysCreateDCR:e,dcrUri:t});return{commandExecutor:(0,l.pipe)(l.flatten,(0,l.map)(Bp(r)),(0,l.map)(Gp),(0,l.map)(Wp(r.getDcrUriAwait)),Vp,(0,l.otherwise)((e=>({errorMessage:e})))),dcrProcessor:r}},qp=e=>t=>(0,l.map)((t=>wp({},t,{parameters:(0,l.evolve)({parentUri:Fm(e),entityUri:Fm(e),newEntityUri:Fm(e)},t.parameters)})),t),Hp=e=>{let{condition:t,updater:r}=e;return e=>t(e)?r(e):e},Qp=(e,t)=>{const r=e.filter(Mp).find(kp(t));let n=null,i=null,a=null;const o=e.filter(((o,s)=>$p(o)&&kp(t,o)?(s>e.indexOf(r)&&(n=o.parameters.newRelation),!1):!xp(o)||!kp(t,o)||(s>e.indexOf(r)&&(n=o.parameters.relation,i=o.parameters.isReversed?o.parameters.entityUri:o.parameters.newEntityUri,a=o.parameters.isReversed?o.parameters.newEntityUri:o.parameters.entityUri),!1)));return n?o.map(Hp({condition:e=>r===e,updater:e=>(0,l.evolve)({parameters:(0,l.evolve)({relation:(0,l.always)(n),parentUri:e=>i||e,entityUri:e=>a||e})})(e)})):o},Kp=(e,t)=>{const r=e.filter(xp).filter(kp(t));let n=null;const i=e.filter(((i,a)=>r.includes(i)?(0,l.last)(r)===i:!$p(i)||!kp(t,i)||(a>e.indexOf((0,l.last)(r))&&(n=i.parameters.newRelation),!1)));return n?i.map(Hp({condition:e=>(0,l.last)(r)===e,updater:e=>(0,l.evolve)({parameters:(0,l.evolve)({relation:(0,l.always)(n)})})(e)})):i},Jp=(e,t)=>{const r=e.filter(Fp).filter(kp(t));return e.filter((e=>r.includes(e)?(0,l.last)(r)===e:!kp(t,e)))},Xp=(e,t)=>{const r=e.filter($p).filter(kp(t));let n=null;const i=e.filter((e=>!r.includes(e)||!$p(e)||(n=n||e.parameters.oldRelation,(0,l.last)(r)===e)));return n?i.map(Hp({condition:e=>(0,l.last)(r)===e,updater:e=>(0,l.evolve)({parameters:(0,l.evolve)({oldRelation:(0,l.always)(n)})})(e)})):i},zp=e=>{const t=e.filter(Fp).map((e=>{let{parameters:{relationUri:t}}=e;return t}));return(0,l.uniq)(t).reduce(Jp,e)},Zp=e=>{const t=e.filter(Mp).map((e=>{let{parameters:{relation:{uri:t}}}=e;return t}));return(0,l.uniq)(t).reduce(Qp,e)},ed=e=>{const t=e.filter(xp).map((e=>{let{parameters:{relation:{uri:t}}}=e;return t}));return(0,l.uniq)(t).reduce(Kp,e)},td=e=>{const t=e.filter($p).map((e=>{let{parameters:{newRelation:{uri:t}}}=e;return t}));return(0,l.pipe)((0,l.filter)((e=>(0,l.count)((0,l.equals)(e),t)>1)),l.uniq,(0,l.reduce)(Xp,e))(t)},rd=e=>(0,l.pipe)(zp,Zp,ed,td)(e);function nd(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){id(e,t,r[t])}))}return e}function id(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const ad=e=>nd({},(0,l.path)(md(),e),{startDate:(0,l.path)(vd(),e),endDate:(0,l.path)(gd(),e)}),od=(e,t)=>(0,l.pipe)((0,l.path)(Od()),Fm(t))(e),sd=(e,t,r,n)=>{let{removedUris:i=[],addedConnections:a=[],editedConnections:o=[],ignoredRelationData:s=[]}=t;return[...a.map((e=>{const t=od(e,r),i=(0,l.path)(hd(),e)===Ge.IN,a=e.parentEntityUri||n;return Up({parentUri:i?t:a,relation:ad(e),entityUri:i?a:t})})),...o.map((t=>{const i=od(t,r),a=(0,l.path)(hd(),t)===Ge.IN,o=i!==(0,l.pipe)((0,l.path)(md()),a?_d:Ad)(t),s=Rd(e,(0,l.path)(Td(),t)),u=t.parentEntityUri||n,c=Fm(r,i);return o?Lp({entityUri:a?u:c,newEntityUri:a?c:u,relation:(0,l.path)(md(),t),isReversed:!1}):jp({oldRelation:(0,l.path)(md(),s),newRelation:ad(t)})})),...i.map((e=>Cp({relationUri:e}))),...s.map((e=>Dp({parentUri:n,entityUri:e.entityUri,relationType:e.relationType,relationDirection:e.relationDirection})))]},ld=e=>(e||[]).reduce(((e,t)=>{let{entity:r}=t;const n=r.dataTenant;return nd({},e,{[r.entityUri]:{uri:r.entityUri,label:r.entityLabel,type:r.entityType,dataTenant:n}})}),{}),ud=(0,l.has)("dataTenant"),cd=(0,l.ifElse)(ud,(e=>{let{relationUri:t,dataTenant:r}=e;return`DTSS/${r}/${t}`}),(0,l.prop)("relationUri")),pd=(e,t)=>(0,l.pipe)(Ni,(0,l.defaultTo)({}),(0,l.propOr)([],"attributes"),(0,l.concat)(el),Wa)(e,t),dd=e=>{let{type:{uri:t,label:r},direction:n}=e;return e=>{const i=e.relationUri;return(0,l.pipe)((0,l.assoc)("relationType",t),(0,l.assoc)("relationLabel",r),(0,l.assoc)("object",{type:t,attributes:{},uri:i}),(0,l.assoc)("direction",n))(e)}},yd=(e,t,r)=>{const n=Qc(t,e.dataLabelPattern),i=(0,l.lensProp)("entity");return(0,l.over)(i,(0,l.evolve)({entityLabel:(0,l.always)(n),object:{label:(0,l.always)(n)}}),r)},fd="relation",Td=(0,l.always)([fd,"relationUri"]),Ed=(0,l.always)([fd,"relationType"]),md=(0,l.always)([fd,"object"]),hd=(0,l.always)([fd,"direction"]),bd=(0,l.always)([fd,"object","attributes"]),Od=(0,l.always)(["entity","entityUri"]),vd=(0,l.always)([fd,"startDate"]),gd=(0,l.always)([fd,"endDate"]),_d=(0,l.path)(["startObject","objectURI"]),Ad=(0,l.path)(["endObject","objectURI"]),Nd=(0,l.path)(["startObject","objectTypeURI"]),Pd=(0,l.path)(["endObject","objectTypeURI"]),Rd=(e,t)=>{for(const r of e){if((0,l.pipe)((0,l.path)(Td()),(0,l.equals)(t))(r))return r;if(r.connections){const e=Rd(r.connections,t);if(e)return e}}},Sd=(0,l.pipe)(Rd,(0,l.path)(md())),wd=(0,l.allPass)([(0,l.pipe)((0,l.path)(Od()),(0,l.complement)(E)),(0,l.pipe)((0,l.path)(Ed()),(0,l.complement)(E))]),Id=e=>{let{config:t,mode:r,metadata:n,parentEntityUri:i}=e;const a={relation:{relationUri:Pt()},entity:{},isNew:!0},{relationType:o,direction:s}=a.relation,{inRelations:u,outRelations:c}=Dd({content:i?t.contentSecondLevel:t.content,direction:s,relationType:o,mode:r,metadata:n}),p=Ud(u,c);return(0,l.pipe)((0,l.evolve)({relation:p?dd(p):l.identity}),(0,l.defaultTo)({}),(0,l.when)((0,l.always)(i),(0,l.assoc)("parentEntityUri",i)))(a)},Ud=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===1?e.length?{type:e[0],direction:En.IN}:{type:t[0],direction:En.OUT}:null},Cd=e=>e.uri||e,Dd=e=>{let{content:t,direction:r,relationType:n,mode:i,metadata:a}=e;const o={},s=e=>t=>{const a=t&&Mi(i,t),s=t&&n===t.uri&&r===e;if(a||s){let{label:r}=t;const n=e===En.IN?"startObject":"endObject",{directionalContext:i}=t[n];return"directed"===t.direction&&1===(0,l.propOr)(0,"length",i)&&(r+=` (${i[0].labelPattern})`),!(r in o)&&(o[r]=!0,!0)}return!1},u=e=>(0,l.pipe)((0,l.assocPath)(["startObject","objectType"],Hr(a,e.startObject.objectTypeURI)),(0,l.assocPath)(["endObject","objectType"],Hr(a,e.endObject.objectTypeURI)))(e),c=(0,l.pipe)(Cd,Ni(a));return(0,l.evolve)({inRelations:(0,l.pipe)((0,l.map)(c),(0,l.filter)(s(En.IN)),(0,l.map)(u)),outRelations:(0,l.pipe)((0,l.map)(c),(0,l.filter)(s(En.OUT)),(0,l.map)(u))},t)||{}},jd=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.identity;const{isNotDuplicatedInRelation:n,isNotDuplicatedOutRelation:i}=Ii({reversedContextLabels:!0}),a=(0,l.curry)(((e,t,r,n)=>{const[i,a]=Ri(e,n.uri);return n&&(!t||Kr(e,i,t))&&(!r||Kr(e,a,r))})),o=t=>(0,l.pipe)((0,l.assocPath)(["startObject","objectType"],Hr(e,t.startObject.objectTypeURI)),(0,l.assocPath)(["endObject","objectType"],Hr(e,t.endObject.objectTypeURI)))(t),s=(e.relationTypes||[]).filter((0,l.both)(ss,r));return{inRelations:(0,l.pipe)((0,l.filter)(a(e,null,t)),(0,l.filter)(n),(0,l.map)(o))(s),outRelations:(0,l.pipe)((0,l.filter)(a(e,t,null)),(0,l.filter)(i),(0,l.map)(o))(s)}},Ld=(0,l.curry)(((e,t,r,n,i)=>{const a=Kr(n,l.__,t.type),o=e?Pd:Nd,s=Kr(n,l.__,r.type),u=e?Nd:Pd;return(0,l.both)((0,l.pipe)(o,a),(0,l.pipe)(u,s))(i)})),kd=(e,t,r)=>{const n=e?Pd:Nd,i=(0,l.pipe)((0,l.map)(n),l.uniq)(r);return(0,l.pipe)((0,l.filter)((e=>{let{uri:r}=e;return i.some(Kr(t,l.__,r))})),(0,l.reject)((0,l.prop)("abstract")),(0,l.map)((0,l.prop)("uri")))(t.entityTypes||[])};function Fd(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Md=e=>{let{type:t,attributeType:r,attributeTypeUri:n,parentUri:i,uri:a,message:o,source:s}=e;return{type:t,uri:a,attributeTypeUri:n,attributeType:r,parentUri:i,message:o,source:s}},xd=e=>!e.deactivated,$d=e=>{let{attributeTypeUri:t,uri:r,parentUri:n}=e;return`${t}-${r}-${n}`},Vd=e=>$d(e)+e.message,Gd=(0,l.unless)(l.isNil,(0,l.prop)("message")),Wd=(0,l.unless)(l.isNil,(0,l.prop)("type")),Bd=(0,l.curry)(((e,t)=>Ct(t.parentUri,e))),Yd=(0,l.curry)(((e,t)=>t.parentUri===e)),qd=(0,l.curry)(((e,t)=>(0,l.cond)([[(0,l.pipe)((0,l.prop)("uri"),Ct(t.attributeTypeUri)),l.T],[(0,l.both)((0,l.propEq)("type",at.TYPE_REFERENCE),(0,l.pipe)(ct,(0,l.any)(Ct(t.attributeTypeUri)))),l.T],[l.T,l.F]])(e))),Hd=(0,l.curry)(((e,t)=>t.attributeTypeUri===e)),Qd=(0,l.curry)(((e,t,r)=>e===r.parentUri&&t!==r.attributeTypeUri)),Kd=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return(0,l.filter)((0,l.allPass)([ny,xd,Bd(e),qd(t),(0,l.complement)(Qd(e,t.uri))]))(r)},Jd=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];const n=(0,l.find)((0,l.allPass)([ny,xd,Yd(e),Hd(t.uri),(0,l.complement)((0,l.prop)("uri")),(0,l.complement)((0,l.propEq)("type",be.missed))]))(r);return n&&n.message||""},Xd=function(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];const{uri:i}=e,a=(0,l.find)((0,l.propEq)("uri",i))(n);return a||0!==t?a:n.find((e=>e.attributeTypeUri===r&&e.type===be.missed))},zd=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return(0,l.find)((0,l.allPass)([xd,(0,l.propEq)("type",be.missedRefEntity),(0,l.propEq)("parentUri",(0,l.path)(Td(),e))]))(t)},Zd=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return(0,l.find)((0,l.allPass)([xd,(0,l.propEq)("type",be.missedRefEntity),(0,l.propEq)("parentUri",e.uri)]))(t)},ey=function(e){let{uri:t}=e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return(0,l.any)((0,l.allPass)([xd,Bd(t)]))(r)},ty=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return(0,l.find)((0,l.allPass)([xd,(0,l.propEq)("type",be.missedRefEntity),(0,l.propEq)("parentUri",(0,l.path)(["relation","uri"],e))]))(t)},ry=(e,t)=>{const{entitiesMap:r,metadata:n}=e,i=t?Qm(e,t):null;return i&&i.map((e=>{const t=((e,t)=>{let{entitiesMap:r,metadata:n}=e;const{type:i,valueType:a,value:o}=t;switch(i){case Ae.attributeValue:{const e=a;if(ir(a))return Qc(o,e.dataLabelPattern);if(ar(a)){const t=o,i=Cs(t),a=lt(e),s=Hr(n,a);return At(i)?Qc(r[i],s.dataLabelPattern):t.label}return""}case Ae.tempEntity:return Qc(o,a.dataLabelPattern);case Ae.relationConnection:{const{entity:e,relation:t}=o,i=null==e?void 0:e.entityUri,a=Hr(n,null==e?void 0:e.entityType);return`${Jc(i&&At(i)?Qc(r[i],null==a?void 0:a.dataLabelPattern):null==e?void 0:e.entityLabel)}, ${(null==t?void 0:t.relationLabel)||Pi(n,null==t?void 0:t.relationType)}`}}})({entitiesMap:r,metadata:n},e);return function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Fd(e,t,r[t])}))}return e}({},e,{label:Jc(t)})}))},ny=e=>!e.severity||e.severity===ve.ERROR,iy=(0,l.curry)(((e,t)=>{let r=t.value;switch(e.type){case at.TYPE_NESTED:return Object.keys(r).some((t=>{const n=e.attributes.find((0,l.propEq)("name",t));return r[t].some(iy(n))}));case at.TYPE_REFERENCE:return!!Ns(t);case at.TYPE_BOOLEAN:return!0===r||!1===r||"true"===r||"false"===r;default:return"string"==typeof r&&(r=r.trim()),null!=r&&""!==r}})),ay=(e,t)=>e.every((0,l.complement)(iy(t))),oy=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.identity;const n=Lo(e,t.type||t.relationType,!0).filter(r);return n.reduce(((r,n)=>{const i=Fs(e,t,n.uri,!0);return i&&i.filter((e=>!(e.parent&&(e.parent.ignored||!gs(e.parent))))).forEach((e=>{ay(e.attrValues,n)&&r.push(Md({type:be.missed,uri:"",attributeType:n,attributeTypeUri:n.uri,parentUri:e.parent.uri,message:hn().text("Attribute is required"),source:Oe.local}))})),r}),[])},sy=(0,l.curry)(((e,t,r)=>Fs(e,t,r,!1))),ly=(e,t)=>{const r=(0,l.pipe)((0,l.prop)("type"),Hr(e),(0,l.prop)("attributes"),(0,l.defaultTo)([]),(0,l.reject)(rr),(0,l.filter)(ar),(0,l.map)((0,l.prop)("uri")),(0,l.chain)(sy(e,t)));return(0,l.pipe)(r,(0,l.reject)(Cs),(0,l.map)((e=>{let{uri:r}=e;return Md({type:be.missedRefEntity,uri:"",attributeTypeUri:Mt(r,t.type),parentUri:r,message:hn().text("Entity is required"),source:Oe.local})})))(t)},uy=(e,t,r)=>Object.values(r.attributes||{}).flat().filter((0,l.has)("refEntity")).filter((0,l.pipe)(Cs,At)).flatMap((n=>{const i=Cs(n),a=t[i],o=fr(e,Mt(n.uri,r.type));return cy(e,t,o,a)})),cy=(e,t,r,n)=>{const i=ct(r),a=i.map((t=>fr(e,t))).filter((0,l.both)(l.identity,(0,l.propEq)("type",at.TYPE_REFERENCE))).flatMap(dt).concat(i);return py(e,t,n,(e=>a.some(Ct(e.uri))))},py=function(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:l.identity;const i=oy(e,r,n),a=ly(e,r),o=uy(e,t,r);return[...i,...a,...o]},dy=(e,t)=>{const r=(0,l.path)(md(),t)||{};return oy(e,r)},yy=(e,t,r)=>{t=t||{};const n=(0,l.pipe)((0,l.path)(Od()),(0,l.ifElse)(At,(e=>t[e]),(0,l.always)(null)))(r),i=dy(e,r),a=(e=>(0,l.path)(Od(),e)?[]:[Md({type:be.missedRefEntity,uri:"",attributeTypeUri:(0,l.path)(Ed(),e),parentUri:(0,l.path)(Td(),e),message:hn().text("Entity is required"),source:Oe.local})])(r),o=((e,t,r)=>r?py(e,t,r):[])(e,t,n);return[...i,...a,...o]},fy=e=>(0,l.path)(["entity","uri"],e)?[]:[Md({type:be.missedRefEntity,uri:"",attributeTypeUri:(0,l.path)(["relation","type"],e),parentUri:(0,l.path)(["relation","uri"],e),message:hn().text("Entity is required"),source:Oe.local})],Ty=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{relation:r}=t,n=oy(e,r),i=fy(t);return[...n,...i]};function Ey(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const my=(e,t)=>{var r,n;const i=Hr(e,t);return i.forceValidate||!(null==i||null===(r=i.lifecycleActions)||void 0===r||null===(n=r.validate)||void 0===n||!n.length)||oo(e)},hy=e=>(0,l.evolve)({uri:e,refEntity:{objectURI:e},refRelation:{objectURI:e}}),by=e=>{const t=r=>(0,l.ifElse)(Array.isArray,(0,l.map)(t),(0,l.pipe)(hy(e),(0,l.evolve)({value:(0,l.when)((0,l.is)(Object),(0,l.map)(t))})))(r);return t},Oy=(e,t)=>(0,l.when)((0,l.prop)("refEntity"),(0,l.pipe)((0,l.when)((0,l.allPass)([(0,l.prop)("refRelation"),(0,l.always)("INSERT_ATTRIBUTE"===t),(0,l.pipe)(Ds,At,l.not)]),(e=>{const t=(0,l.pipe)(Ds,jt)(e);return by((e=>e.replace(t,t+ht)))(e)})),(0,l.when)((0,l.pipe)(Cs,At),(t=>{const r=Cs(t),n=e[r],i=n&&gy(n,e);return null!=i&&i.attributes?(0,l.evolve)({value:e=>function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Ey(e,t,r[t])}))}return e}({},e,i.attributes)})(t):t})))),vy=(e,t,r)=>_h(Oh((0,l.clone)(e.attributes),(0,l.clone)(t.attributes),!0),Ph((0,l.clone)(t.attributes),(0,l.clone)(t.crosswalks)),e).map((e=>(0,l.evolve)({newValue:(0,l.when)(Array.isArray,(0,l.pipe)((0,l.filter)((e=>!e.refRelation||e.refEntity)),(0,l.map)(Oy(r,e.type)),(0,l.map)(by(Bt))))})(e))).concat(jm(e,t)),gy=(e,t)=>(0,l.evolve)({attributes:jl({valueTransformer:(0,l.pipe)(ks,Oy(t),hy(Bt)),deleteEmptyComplex:!0}),uri:Bt})(e);function _y(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Ay(e,t,r[t])}))}return e}function Ay(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Ny=(0,l.unless)(l.isNil,(e=>e.replace(new RegExp(mt,"g"),"uri$$$$").replace(new RegExp(ht,"g"),""))),Py=e=>(0,l.pipe)((0,l.evolve)({objectUri:Ny,objectParentUri:Ny}),(e=>{return _y({type:(t=e.errorType,"MISSED"===(t=(t||"").toUpperCase())?be.missed:be.invalid),attributeTypeUri:e.objectTypeUri,parentUri:e.objectParentUri||e.objectUri&&Wt(e.objectUri),uri:e.objectUri,source:Oe.validationService},(0,l.pick)(["message","severity"],e));var t}))(e),Ry=(e,t)=>(0,l.map)((0,l.pipe)(Py,(e=>{var r,n,i,a;const{metadata:o}=t,{uri:s,parentUri:u}=e,c=ry(t,s),p=null!=c&&c.length?c.slice(0,-1):ry(t,u),d=((e,t,r)=>{let{uri:n,attributeTypeUri:i}=r,a=i&&fr(e,i);if(!a&&n&&t&&t.length){const e=(0,l.last)(t);e.type===Ae.attributeValue&&(a=e.valueType)}return a})(o,c,e);return _y({},e,{attributeType:d,attributeTypeUri:null==d?void 0:d.uri,uri:c&&(null===(r=(0,l.last)(c))||void 0===r||null===(n=r.value)||void 0===n?void 0:n.uri)||s,parentUri:p&&(null===(i=(0,l.last)(p))||void 0===i||null===(a=i.value)||void 0===a?void 0:a.uri)||u,path:s?c:p})}),(e=>{let{entitiesMap:t,metadata:r}=e;return e=>{const{uri:n,parentUri:i,path:a,attributeTypeUri:o}=e;if(!n&&null!=a&&a.length&&i&&Gt(i)){const n=(0,l.last)(a),i=n.valueType;if(ar(i)&&yt(i).includes(o)){const i=Cs(n.value),o=i&&At(i)?t[i]:null;return o?_y({},e,{parentUri:o.uri,path:a.concat({type:Ae.tempEntity,value:o,valueType:Hr(r,o.type),label:""})}):e}}return e}})(t)))(e),Sy=e=>{if(e.type===_e.AGO||e.type===_e.WITHIN){const[t,r]=e.period;return"Number"===(0,l.type)(t)&&"String"===(0,l.type)(r)&&t>0}if(e.type===_e.BETWEEN){const[t,r]=e.period;return t instanceof Date&&r instanceof Date}},wy=e=>`equals(user, '${Gu(e)}')`,Iy=e=>`equals(items.delta.sources, '${e.abbreviation}')`,Uy=e=>`equals(items.objectType, '${e.uri}')`,Cy=e=>{const{period:t,type:r}=e;if(!Sy(e))return"";switch(r){case _e.WITHIN:return`gte(timestamp, ${X(t)})`;case _e.AGO:return`lte(timestamp, ${X(t)})`;case _e.BETWEEN:{const[e,r]=t;return`range(timestamp, ${e.valueOf()}, ${f()(r).endOf("date").valueOf()})`}default:return""}},Dy=e=>[`equals(items.objectUri, '${e}')`,`equals(items.startObjectUri, '${e}')`,`equals(items.endObjectUri, '${e}')`].join(" or "),jy=(0,l.unless)((0,l.startsWith)("?"),(0,l.concat)("?")),Ly=e=>{let{query:t,body:r}=e;return t=jy(t),eu(`/entities/_facets${t}`,{method:"POST",body:JSON.stringify(r),headers:{"Content-Type":"application/json"}})},ky=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";const n=[...e];r&&n.push({filter:"containsWordStartingWith",fieldName:"attributes",values:[r]});const i={filter:(0,l.pipe)(xc(),$c(t.globalFilter))(n),activeness:t.activityFilter||fn.ACTIVE_ONLY};return t.searchOptions&&(i.options=t.searchOptions),`/entities/_total${jr(i)}`},Fy=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0;const n=ky(e,t,r);return eu(n)},My=e=>eu(`/entities/_total?${e}`),xy=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const n=(0,l.pipe)((0,l.filter)(ls),(0,l.map)((0,l.prop)("uri")))(e),i={filter:tn.EQUALS,fieldName:"type",values:n},a=r.isRawFilter?{rawFilter:t}:{filter:"containsWordStartingWith",fieldName:"attributes",values:[t]},o=(0,l.pipe)(xc(),$c(r.globalFilter))([i,a]),s=jr({filter:o,select:"uri,label,type,roles,secondaryLabel,defaultProfilePicValue",scoreEnabled:!0,activeness:r.activityFilter||fn.ACTIVE_ONLY,max:r.max||4});return eu("/entities/_typeAheadSearch"+s,{method:"GET"})},$y=(0,l.pipe)((0,l.reject)(l.isNil),Dr),Vy=e=>{let{fieldName:t,searchParams:r=[],options:n={}}=e;const{globalFilter:i,activityFilter:a,searchOptions:o,max:s,pageNo:u}=n,c=(0,l.pipe)(xc(),$c(i))(r),p=$y({filter:c||null,activeness:a||"active",options:o||null}),d=[{fieldName:t,pageSize:s||20,pageNo:u||1,orderType:n.orderType||"reversedCount"}];return Ly({query:p,body:d})},Gy=e=>{let{fieldName:t,searchValue:r="",options:n}=e;const i=r.length?[{filter:"containsWordStartingWith",fieldName:t,values:[r]}]:[];return Vy({fieldName:t,searchParams:i,options:n})};function Wy(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const By="uri,label,type,roles,secondaryLabel,defaultProfilePicValue",Yy=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";const n=[...e,{filter:"containsWordStartingWith",fieldName:"attributes",values:[r]}],i={filter:(0,l.pipe)(xc(),$c(t.globalFilter))(n),max:t.max||5,offset:t.offset,activeness:t.activityFilter||"active",select:t.select||By,scoreEnabled:null==t.scoreEnabled||t.scoreEnabled,sort:t.sort||null,order:t.order||null};return t.searchOptions&&(i.options=t.searchOptions),`/entities${jr(i)}`},qy=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0;const n=Yy(e,t,r);return eu(n)},Hy=e=>Zy(e,{select:"secondaryLabel"}),Qy=(e,t)=>{const{select:r=By,searchOptions:n,defaultMaxValues:i}=t||{},a={select:r,uris:e,options:n};return i&&(a.defaultMaxValues=i),eu("/entities/_byUris",{method:"POST",body:a,headers:{"Content-Type":"application/json"}})},Ky=(0,l.filter)((0,l.pipe)((0,l.prop)("uri"),At)),Jy=e=>{const{parentUri:t,attributeTypeUri:r,values:n=[],offset:i,defaultMaxValues:a,tenant:o,apiPath:s,searchQuery:u,filters:c=[],sorting:p,options:d="ovOnly"}=e,y=n.length,f=Ky(n).length,T={[r]:{max:a,offset:(0,l.isNil)(i)?y-f:i}},E=lr(r),m={attributesPaging:T,defaultMaxValues:a,options:d,select:"crosswalks,"+E},h=[...c,{filter:"containsWordStartingWith",fieldName:E,values:[u]}],b=(0,l.pipe)(xc(),$c(d.globalFilter))(h);return b&&(m.filter=b),p&&(m.sort=p.field,m.order=p.order),eu(`${s}/api/${o}/${t}/_object`,{method:"POST",body:JSON.stringify(m)})},Xy=e=>`entities?filter=equals(uri,'${e}')&offset=0`,zy={options:"sendHidden,addRefAttrUriToCrosswalk"},Zy=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:zy;return eu(`/${e}${jr(t)}`)},ef=(e,t)=>Zy(e,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Wy(e,t,r[t])}))}return e}({},zy,{explicitSurvivorshipGroup:t})),tf=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.identity;const r={method:"POST",body:JSON.stringify([e])},n=t("/entities");return eu(n,r)},rf=e=>eu(`/${e}?options=sendHidden,addRefAttrUriToCrosswalk`,{method:"DELETE"}),nf=(e,t,r)=>{const n={method:"POST",body:JSON.stringify(t)};return eu(`/${e}/_clone${jr({executeLCA:!1,valuesToCopy:r})}`,n)},af=e=>{let{facet:t,startTime:r,endTime:n,types:i}=e;return eu(`/entities/_events/_total${Dr({facet:t,startTime:r,endTime:n,types:i})}`,{method:"GET",headers:{"Content-Type":"application/json"}})},of=(e,t)=>eu(`/${e}/_setDefaultProfilePicByAttributeValueURI`,{method:"PUT",body:t}),sf=e=>{let{uri:t,diff:r,uriPreprocessor:n=l.identity}=e;return eu(n(`/${t}/_update?options=sendHidden,updateAttributeUpdateDates,addRefAttrUriToCrosswalk`),{method:"POST",body:JSON.stringify(r)})},lf=e=>{let{entityUri:t,offset:r,max:n,filter:i,sort:a,order:o}=e;const s={offset:r,max:n,filter:i,sort:a,order:o};return eu(`/${t}/_interactions${(0,l.pipe)((0,l.reject)(E),Dr)(s)}`,{method:"GET",headers:{"Content-Type":"application/json"}})},uf=e=>{const t=new FormData;return t.append("file",e),eu("/valueList",{method:"POST",headers:{"Content-Type":null},body:t}).catch((e=>{const t=ye(e,hn().text("Can't upload file"));return Promise.reject(t)}))},cf=e=>{let{containsWordStartingWith:t,sortBy:r,sortOrder:n,favoriteOnly:i,offset:a,max:o,countResults:s=!1,findPublic:l=!0,includes:u,startsWith:c}=e;return eu(`/personal/findSavedSearches${Dr({countResults:s,findPublic:l})}`,{method:"POST",body:JSON.stringify({containsWordStartingWith:t,sortBy:r,sortOrder:n,favoriteOnly:i,offset:a,max:o,includes:u,startsWith:c}),headers:{"Content-Type":"application/json"}})},pf=e=>eu(`/personal/savedSearches/${e}`,{method:"GET",headers:{"Content-Type":"application/json"}}),df=e=>eu("/personal/savedSearches",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),yf=e=>{const{uri:t}=e,r=(0,l.pick)(["description","isFavorite","isPublic","name","query","uiState"]);return eu(`/personal/${t}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(r(e))})},ff=e=>{let{uri:t}=e;return eu(`/personal/${t}`,{method:"DELETE",headers:{"Content-Type":"application/json"}})},Tf=(e,t)=>(0,l.pipe)((0,l.evolve)({isPublic:(0,l.always)(t)}),yf)(e),Ef=(e,t)=>(0,l.pipe)((0,l.evolve)({isFavorite:(0,l.always)(t)}),yf)(e);function mf(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const hf=["max","offset","filter"],bf=(0,l.curry)(((e,t)=>t.nextEntry?(0,l.evolve)({nextEntry:bf(e)},t):function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){mf(e,t,r[t])}))}return e}({},t,(0,l.pick)(hf,e)))),Of=e=>{if(1===e.length&&((0,l.pathEq)([0,"activeness","entity"],Se.ALL,e)||(0,l.pathEq)([0,"activeness","relation"],Se.ALL,e)))return!1},vf=(0,l.omit)(["activeness"]),gf=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const n=Of(t),{searchByOv:i}=r;t=(0,l.map)((0,l.pipe)((0,l.when)((0,l.prop)("nextEntry"),(e=>(0,l.pipe)(bf(e),(0,l.omit)(hf))(e))),vf,(0,l.omit)(["labels"])))(t);const a={limitCreditsConsumption:!0,activeness_enabled:n,options:i?"searchByOv":void 0},o=`/${e}/_connections${jr(a)}`,s={method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)};return{url:o,options:s}},_f=(0,l.map)((e=>{let t=e;for(;t&&t.nextEntry;)t=t.nextEntry;return t})),Af=(0,l.reject)(l.isNil),Nf=(0,l.unless)((0,l.startsWith)("/"),(0,l.concat)("/")),Pf=e=>eu(Nf(e),{method:"GET",headers:{"Content-Type":"application/json"}}),Rf=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.identity;const r=(0,l.pipe)(t,Nf);return eu(r(e),{method:"DELETE",headers:{"Content-Type":"application/json"}})},Sf=e=>{let{startEntityUri:t,endEntityUri:r,relationType:n,attributes:i,startDate:a,endDate:o,uriPreprocessor:s=l.identity}=e;const u={type:n,startObject:{objectURI:t},endObject:{objectURI:r},attributes:i?kl()(i):null,startDate:a,endDate:o},c=(0,l.pipe)(Af,ie,JSON.stringify);return eu(s("/relations"),{method:"POST",headers:{"Content-Type":"application/json"},body:c(u)})},wf=e=>{let{oldRelation:t,newRelation:r,uriPreprocessor:n=l.identity}=e;const i=(0,l.prop)("attributes"),a=(0,l.pipe)((0,l.prop)("uri"),(0,l.concat)(l.__,"/_update?options=sendHidden,updateAttributeUpdateDates,addRefAttrUriToCrosswalk"),Nf,n),o=Oh(i(t),i(r)).concat(gh(t,r));return eu(a(r),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(o)})},If=(e,t,r)=>{const{url:n,options:i}=gf(e,t,r);return eu(n,i).then(_f)},Uf=(e,t)=>eu(`/${e}/rate`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}),Cf=(e,t)=>{let{relatedEntityUri:r,relationType:n,relationDirection:i}=t;const a={uri:r};return i===En.IN?a.inRelations=[n]:a.outRelations=[n],eu(`/${e}/_ignoreSuggestedRelationship`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)})},Df=e=>{let{servicesPath:t="",environment:r,tenant:n,application:i}=e;return eu(`${t}/recentSearches${jr({environment:r,tenant:n})}`,{method:"GET",application:i,headers:{"Content-Type":"application/json"}})},jf=e=>eu("/recentSearches",{method:"POST",application:"explorer",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),Lf=e=>{let{environment:t,tenant:r,createdDate:n}=e;return eu(`/recentSearches${jr({environment:t,tenant:r,createdDate:n})}`,{method:"DELETE",application:"explorer",headers:{"Content-Type":"application/json"}})};function kf(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Ff(e,t,r[t])}))}return e}function Ff(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Mf={select:"label,secondaryLabel,name,type,startDate,endDate"},xf=(0,l.reject)(l.isNil),$f=(0,l.pipe)(xf,Dr),Vf=e=>{let{uri:t,graphTypes:r,activenessDate:n,isReversed:i}=e;const a=kf({},Mf,r?{graphTypeURIs:r}:{},n?{activeness_date:n}:{},i?{options:"reverseRelations"}:{},{limitCreditsConsumption:!0});return eu(`/${t}/_tree${$f(a)}`,{method:"GET",headers:{"Content-Type":"application/json"}})},Gf=e=>{let{uri:t,graphUri:r}=e;const n=kf({},Mf,r?{graphTypeURIs:r}:{},{select:"label,secondaryLabel,name,type"});return eu(`/${t}/_parents${$f(n)}`,{method:"GET",headers:{"Content-Type":"application/json"}})},Wf=e=>{let{uri:t,graphTypes:r,activenessDate:n,filterLastLevel:i=!1,deep:a=1,limitCreditsConsumption:o,max:s}=e;const l=kf({},Mf,r?{graphTypeURIs:r}:{},n?{activeness_date:n}:{},o?{limitCreditsConsumption:o}:{},s?{max:s}:{},{filterLastLevel:i,deep:a});return eu(`/${t}/_hops${$f(l)}`,{method:"GET",headers:{"Content-Type":"application/json"}})};function Bf(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}const Yf=()=>{function e(){return(65536*(1+Math.random())|0).toString(16).substring(1)}return e()+"-"+e()+"-"+e()+e()},qf="/activities",Hf=e=>{let{label:t,description:r}=e;return eu(qf,{method:"POST",body:{label:t,description:r},headers:{"Content-Type":"application/json",ActivityID:Yf()}})};var Qf;!function(e){e.userSearch="USER_SEARCH",e.profileView="USER_PROFILE_VIEW"}(Qf||(Qf={}));const Kf=e=>{const t=jr(e);return eu(qf+t,{method:"GET"})},Jf=e=>eu(`/activities/_total${jr(e)}`,{method:"GET"}),Xf=e=>{const{entityUri:t}=e,r=Bf(e,["entityUri"]);return eu(`/${t}/_activities${jr(r)}`,{method:"GET"})},zf=e=>{const{entityUri:t}=e,r=Bf(e,["entityUri"]);return eu(`/${t}/_activities/_total${jr(r)}`,{method:"GET"})};function Zf(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){eT(e,t,r[t])}))}return e}function eT(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const tT=e=>{let{workflowPath:t,tenant:r,url:n}=e;return`${t}/workflow/${r?`${r}${n}`:n}`},rT=e=>{let{workflowPath:t,processType:r,searchString:n,tenant:i,environment:a}=e;const o={processType:r,searchString:n};return eu(tT({url:"/processInstances/_generateFromQuery?background=true",workflowPath:t,tenant:i}),{method:"POST",headers:{"Content-Type":"application/json",EnvironmentURL:a},body:JSON.stringify(o)})},nT=e=>{let{workflowPath:t,url:r,tenant:n,method:i,data:a,headers:o}=e,s=r;return r.includes("http:")||r.includes("https:")||(s=tT({url:r,workflowPath:t,tenant:n})),eu(s,{method:i||"GET",body:JSON.stringify(a),headers:Zf({"Content-Type":"application/json"},null!=o?o:{})})},iT=e=>{let{workflowPath:t,processType:r,objectURIs:n,tenant:i,environment:a}=e;const o=tT({url:"/processInstances",workflowPath:t,tenant:i}),s=(0,l.curry)(((e,t,r)=>{const n={processType:t,objectURIs:r};return eu(e,{method:"POST",headers:{"Content-Type":"application/json",EnvironmentURL:a},body:JSON.stringify(n)})}));return(0,l.pipe)((e=>e.map((t=>[e[0],t])).slice(1)),(0,l.map)(s(o,r)),(e=>Promise.all(e)),(0,l.andThen)(l.last))(n)},aT=e=>{let{workflowPath:t,processType:r,objectURIs:n,tenant:i,environment:a,comment:o}=e;const s=tT({url:"/processInstances",workflowPath:t,tenant:i}),l={processType:r,objectURIs:n},u=o?Zf({},l,{comment:o}):l;return eu(s,{method:"POST",headers:{"Content-Type":"application/json",EnvironmentURL:a},body:JSON.stringify(u)})},oT=e=>{let{workflowPath:t,environment:r,tenant:n,entityUri:i,filter:a={},includeClosed:o}=e;const s=o;o&&(a.objectURI=i);const u=tT({url:`/tasks${s?jr(a):""}`,workflowPath:t,tenant:n}),c=s?{}:{body:JSON.stringify(Zf({objectURIs:[i]},(0,l.reject)(E,a)))};return eu(u,Zf({method:s?"GET":"POST",headers:{"Content-Type":"application/json",EnvironmentURL:r}},c))},sT=e=>{let{workflowPath:t,environment:r,tenant:n,assignee:i,max:a,offset:o}=e;return eu(tT({url:"/tasks",workflowPath:t,tenant:n}),{method:"POST",headers:{"Content-Type":"application/json",EnvironmentURL:r},body:(0,l.pipe)((0,l.reject)(l.isNil),JSON.stringify)({assignee:i,max:a,offset:o})})},lT=e=>{let{workflowPath:t,environment:r,tenant:n,filters:i,max:a,offset:o}=e;return eu(tT({url:"/groupTasks",workflowPath:t,tenant:n}),{method:"POST",headers:{EnvironmentURL:r},body:(0,l.pipe)((0,l.reject)(l.isNil),JSON.stringify)(Zf({max:a,offset:o},i))})},uT=e=>{let{workflowPath:t,environment:r,tenant:n,taskId:i}=e;return eu(tT({url:`/tasks/${i}`,workflowPath:t,tenant:n}),{method:"GET",headers:{"Content-Type":"application/json",EnvironmentURL:r}})},cT=e=>{let{workflowPath:t,environment:r,tenant:n,taskId:i,body:a}=e;return eu(tT({url:`/tasks/${i}`,workflowPath:t,tenant:n}),{method:"PUT",headers:{"Content-Type":"application/json",EnvironmentURL:r},body:JSON.stringify(a)})},pT=e=>{let{workflowPath:t,environment:r,tenant:n,taskId:i,comment:a}=e;return cT({workflowPath:t,environment:r,tenant:n,taskId:i,body:{processInstanceComment:a}})},dT=e=>{let{workflowPath:t,environment:r,tenant:n,taskId:i}=e;const a={tasks:[i]};return eu(tT({url:"/assignee",workflowPath:t,tenant:n}),{method:"POST",headers:{"Content-Type":"application/json",EnvironmentURL:r},body:JSON.stringify(a)})},yT=e=>{let{workflowPath:t,environment:r,tenant:n,taskId:i,assignee:a}=e;return cT({workflowPath:t,environment:r,tenant:n,taskId:i,body:{assignee:a}})},fT=e=>{let{workflowPath:t,environment:r,tenant:n,taskId:i,dueDate:a}=e;return cT({workflowPath:t,environment:r,tenant:n,taskId:i,body:{dueDate:a}})},TT=e=>{let{workflowPath:t,environment:r,tenant:n,taskId:i,priority:a}=e;return cT({workflowPath:t,environment:r,tenant:n,taskId:i,body:{priority:a}})},ET=e=>{let{workflowPath:t,environment:r,tenant:n,taskId:i,action:a}=e;return eu(tT({url:`/tasks/${i}/_action`,workflowPath:t,tenant:n}),{method:"POST",headers:{"Content-Type":"application/json",EnvironmentURL:r},body:JSON.stringify({action:a})})},mT=e=>{let{workflowPath:t,tenant:r,environment:n}=e;return eu(tT({url:"/processDefinitions",workflowPath:t,tenant:r}),{method:"GET",headers:{"Content-Type":"application/json",EnvironmentURL:n}})},hT=e=>{let{entityUri:t,max:r,deep:n,sort:i,order:a,activeness:o,filter:s,markMatchedValues:u,sources:c,rules:p}=e;const d={max:r,deep:n,filter:s,markMatchedValues:u,sort:i,order:a,activeness:o,sources:c,rules:p};return eu(`/${t}/_transitiveMatches${(0,l.pipe)((0,l.reject)(E),Dr)(d)}`,{method:"GET",headers:{"Content-Type":"application/json"}})},bT=e=>{let{entityUri:t,max:r,sort:n,order:i,activeness:a,filter:o}=e;const s={max:r,filter:o,sort:n,order:i,activeness:a};return eu(`/${t}/_notMatch${(0,l.pipe)((0,l.reject)(E),Dr)(s)}`,{method:"GET",headers:{"Content-Type":"application/json"}})},OT=(e,t)=>{const r=(0,l.map)((0,l.prop)("uri"))(t);return eu("/entities/_same",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r.concat(e))})},vT=(e,t,r)=>Promise.all(t.map((async t=>await eu(`/${t.uri}/_notMatch?uri=${e}`,{method:"NOT"===r?"POST":"DELETE",headers:{"Content-Type":"application/json"}})))),gT=async(e,t)=>await vT(e,t,"NOT"),_T=async(e,t)=>await vT(e,t,"MATCH"),AT=async(e,t)=>await Promise.all(t.map((async t=>await eu(`/${t.uri}/_setAMatch?uri=${e}`,{method:"POST",headers:{"Content-Type":"application/json"}}))));function NT(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){PT(e,t,r[t])}))}return e}function PT(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function RT(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}const ST=3e4,wT=e=>{let{dtssPath:t,customerTenant:r,entity:{dataTenant:n,uri:i}}=e;return eu(`${t}entities/_import?dataEntityUri=${i}`,{method:"POST",headers:{DataTenant:n,CustomerTenant:r,"Content-Type":"application/json"}})},IT=e=>{let{dtssPath:t,customerTenant:r,dataTenant:n,entityUri:i,content:a}=e;return KT({url:`entities/_connections/_hasNonImported?customerEntityUri=${i}`,dataTenant:n,customerTenant:r,dtssPath:t,options:{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)}})},UT=e=>{let{dtssPath:t,customerTenant:r,dataTenant:n,entityUri:i,content:a}=e;return KT({url:`entities/_connections/_import?customerEntityUri=${i}`,dataTenant:n,customerTenant:r,dtssPath:t,options:{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)}})},CT=e=>{let{dtssPath:t,customerTenant:r,dataTenant:n,dataEntityUri:i,customerEntityUri:a}=e;return eu(`${t}entities/_merge?dataEntityUri=${i}&customerEntityUri=${a}`,{method:"POST",headers:{DataTenant:n,CustomerTenant:r,"Content-Type":"application/json"}})},DT=e=>{let{dtssPath:t,customerTenant:r,entity:n,entities:i}=e;const{dataTenant:a,uri:o}=n;return Promise.all(i.map((e=>{let{uri:n}=e;return CT({dtssPath:t,customerTenant:r,dataTenant:a,customerEntityUri:n,dataEntityUri:o})})))},jT=e=>{let{dtssPath:t,customerTenant:r,entity:n,entities:i}=e;const{uri:a}=n,[o,s]=(0,l.partition)(pp,i);return Promise.all([s.length?OT(a,s):Promise.resolve(),...o.map((e=>{let{uri:n,dataTenant:i}=e;return CT({dtssPath:t,customerTenant:r,dataTenant:i,customerEntityUri:a,dataEntityUri:n})}))])},LT=(0,l.pipe)(l.toPairs,(0,l.chain)((e=>{let[t,r]=e;return r.map((0,l.assoc)("matchRule",t))})),(0,l.reduce)(((e,t)=>{let{matchRule:r}=t,n=RT(t,["matchRule"]);const i=e.findIndex((e=>{let{object:{uri:t}}=e;return n.uri===t}));return-1===i?e.concat({object:n,matchRules:[r]}):(0,l.adjust)(i,(0,l.evolve)({matchRules:(0,l.append)(r)}),e)}),[])),kT=(0,l.pipe)((0,l.find)((0,l.propEq)("index",0)),(0,l.propOr)({},"object"),LT),FT=e=>{let{dtssPath:t,customerTenant:r,entity:n}=e;const{uri:i,dataTenant:a}=n;return eu(`${t}entities/_matchesForDtEntities?skipAllImportedEntities=true`,{method:"POST",headers:{DataTenant:a,CustomerTenant:r,"Content-Type":"application/json"},body:JSON.stringify([i])}).then(kT)},MT=e=>t=>{let{dtssPath:r,dataTenants:n=[],customerTenant:i,entity:a}=t;return Promise.all(n.map((t=>{let{id:n}=t;return e({dtssPath:r,dataTenant:n,customerTenant:i,entity:a}).then((0,l.map)((0,l.assocPath)(["object","dataTenant"],n))).catch((e=>(console.log(e),[])))}))).then(l.flatten)},xT=MT((e=>{let{dtssPath:t,dataTenant:r,customerTenant:n,entity:i}=e;const{uri:a,type:o}=i;return eu(`${t}entities/_matches?skipAllImportedEntities=true`,{method:"POST",headers:{DataTenant:r,CustomerTenant:n,"Content-Type":"application/json"},body:JSON.stringify([{uri:a,type:o}])}).then(kT)})),$T=MT((e=>{let{dtssPath:t,dataTenant:r,customerTenant:n,entity:i}=e;const{uri:a}=i;return eu(`${t}entities/_notMatch?returnObjects=true&customerEntityUri=${a}`,{method:"GET",headers:{DataTenant:r,CustomerTenant:n,"Content-Type":"application/json"}})})),VT=(e,t)=>{let{dtssPath:r,dataTenants:n=[],entity:i,customerTenant:a,dtssRequest:o}=e;return function(){if(r&&n&&n.length){const e=o({dtssPath:r,dataTenants:n,entity:i,customerTenant:a});return Promise.all([t(...arguments),e]).then(l.flatten)}return t(...arguments)}},GT=e=>t=>{let{dtssPath:r,customerTenant:n,dataTenant:i,dataEntityUri:a,customerEntityUri:o}=t;return eu(`${r}entities/_notMatch?dataEntityUri=${a}&customerEntityUri=${o}`,{method:"NOT"===e?"POST":"DELETE",headers:{DataTenant:i,CustomerTenant:n,"Content-Type":"application/json"}})},WT=e=>t=>{let{dtssPath:r,customerTenant:n,entity:i,entities:a}=t;const{dataTenant:o,uri:s}=i;return Promise.all(a.map((t=>{let{uri:i}=t;return GT(e)({dtssPath:r,customerTenant:n,dataTenant:o,customerEntityUri:i,dataEntityUri:s})})))},BT=WT("NOT"),YT=WT("MATCH"),qT=e=>t=>{let{dtssPath:r,customerTenant:n,entity:i,entities:a}=t;const{uri:o}=i,[s,u]=(0,l.partition)(pp,a);return Promise.all([vT(o,u,e),...s.map((t=>{let{uri:i,dataTenant:a}=t;return GT(e)({dtssPath:r,customerTenant:n,dataTenant:a,customerEntityUri:o,dataEntityUri:i})}))])},HT=qT("NOT"),QT=qT("MATCH");function KT(e){let{requestProvider:t=eu,url:r,options:n,dataTenant:i,customerTenant:a,dtssPath:o}=e;r=o.endsWith("/")&&r.startsWith("/")?r.slice(1):r;const s=n||{},{headers:l}=s;return t(`${o}${r}`,NT({},RT(s,["headers"]),{headers:NT({},l,{SearchMetadata:"AUTO",DataTenant:i,customerTenant:a})}))}const JT=e=>{let{filters:t,options:r,value:n="",dataTenant:i,customerTenant:a,dtssPath:o}=e;return KT({url:Yy(t,r,n),dataTenant:i,customerTenant:a,dtssPath:o})},XT=e=>{let{filters:t,options:r,value:n="",dataTenant:i,customerTenant:a,dtssPath:o}=e;return KT({url:ky(t,r,n),dataTenant:i,customerTenant:a,dtssPath:o})},zT=e=>{let{entityUri:t,configs:r,dataTenant:n,customerTenant:i,dtssPath:a,options:o}=e;const{searchByOv:s}=o,{options:u}=gf(t,r);return KT({url:`entities/_connections/_getConnections${jr({dataEntityUri:t,options:s?"searchByOv":void 0})}`,options:u,dataTenant:n,customerTenant:i,dtssPath:a}).then((0,l.pipe)(_f,(0,l.map)((0,l.evolve)({connections:(0,l.map)((0,l.pipe)((0,l.assocPath)(["entity","dataTenant"],n),(0,l.assocPath)(["relation","dataTenant"],n)))}))))},ZT=e=>{let{entityUri:t,dataTenant:r,customerTenant:n,dtssPath:i}=e;return KT({url:`${Xy(t)}&select=secondaryLabel`,dataTenant:r,customerTenant:n,dtssPath:i})},eE=e=>{let{dtssPath:t,dataTenant:r,customerTenant:n,value:i,type:a,sourceTable:o}=e;return eu(`${t}entities/_unmerge`,{method:"POST",headers:{DataTenant:r,CustomerTenant:n,"Content-Type":"application/json"},body:JSON.stringify([{value:i,type:a,sourceTable:o}])})},tE=e=>{let{dtssPath:t,tenant:r}=e;return eu(`${t}tenants/customerTenants?id=${r}&useCache=true`,{method:"GET",timeout:ST})},rE=e=>{let{dtssPath:t,customerTenant:r}=e;return eu(`${t}subscriptions?useCache=true`,{method:"GET",headers:{CustomerTenant:r},timeout:ST})},nE=e=>{let{dtssPath:t,tenants:r}=e;return eu(`${t}tenants/dataTenants?id=${r}&useCache=true`,{method:"GET",timeout:ST})},iE=e=>{let{entityUri:t,dataTenant:r,customerTenant:n,dtssPath:i}=e;return KT({url:Xy(t),dataTenant:r,customerTenant:n,dtssPath:i})},aE=()=>eu("/configuration?options=showAccess&showHiddenMatchRules=true",{method:"GET"});function oE(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){sE(e,t,r[t])}))}return e}function sE(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const lE=e=>{let{apiPath:t,tenant:r,searchBody:n,options:i}=e;const{select:a}=i,o=oE({},n,{ordered:"true",orderBy:"LastName,FirstName",from:0,max:100},function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(i,["select"]));return eu(`${t}/api/${r}/graph/search${jr({select:a})}`,{method:"POST",body:o,headers:{"Content-Type":"application/json"}})},uE=e=>{let{apiPath:t,tenant:r,searchBody:n,options:i={}}=e;return eu(`${t}/api/${r}/graph/search/count`,{method:"POST",body:oE({},n,i),headers:{"Content-Type":"application/json"}})},cE=(e,t)=>`${e}/${t}/comments`,pE=e=>{let{collaborationPath:t,tenant:r,uris:n}=e;return eu(`${cE(t,r)}/count`,{method:"POST",body:n,headers:{"Content-Type":"application/json"}})},dE=e=>{let{collaborationPath:t,tenant:r,commentId:n}=e;return eu(`${cE(t,r)}/${n}`,{method:"GET",headers:{"Content-Type":"application/json"}})},yE=e=>{let{collaborationPath:t,tenant:r,data:n}=e;return eu(cE(t,r),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify([n])})},fE=e=>{let{collaborationPath:t,tenant:r,data:n}=e;return eu(`${cE(t,r)}/${n.commentId}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)})},TE=e=>{let{collaborationPath:t,tenant:r,commentId:n}=e;return eu(`${cE(t,r)}/${n}`,{method:"DELETE",headers:{"Content-Type":"application/json"}})},EE=e=>{let{collaborationPath:t,tenant:r,commentId:n,replyId:i}=e;return eu(`${cE(t,r)}/${n}/replies/${i}`,{method:"DELETE",headers:{"Content-Type":"application/json"}})},mE=e=>{let{collaborationPath:t,tenant:r,commentId:n,replyId:i,data:a}=e;return eu(`${cE(t,r)}/${n}/replies/${i}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)})},hE=e=>{let{collaborationPath:t,tenant:r,commentId:n,data:i}=e;return eu(`${cE(t,r)}/${n}/replies`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify([i])})},bE=e=>{let{collaborationPath:t,tenant:r,maxResults:n=10,relatedObjectUri:i,sort:a="modifiedTime",order:o="desc",pageToken:s=null}=e;const l=jr({maxResults:n,relatedObjectUri:i,sort:a,order:o,pageToken:s});return eu(`${cE(t,r)}${l}`,{method:"GET",headers:{"Content-Type":"application/json"}})};function OE(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){vE(e,t,r[t])}))}return e}function vE(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const gE=e=>{let{tenant:t,servicesPath:r}=e;return eu(`${r}/users/${t}`,{method:"GET",headers:{"Content-Type":"application/json"}})},_E="graphExport",AE=async(e,t,r,n,i)=>{let a;try{const{data:n={}}=await SE({servicesPath:e,tenant:t,environment:r,namespace:_E,options:{method:"GET",headers:{"Content-Type":"application/json"}}});a=n}catch(e){a={}}const o={body:JSON.stringify(OE({},a,{[n]:i})),headers:{"Content-Type":"application/json"}};let s;try{s=await SE({servicesPath:e,tenant:t,environment:r,namespace:_E,options:OE({method:"PUT"},o)})}catch(e){s=null}return s||(s=await SE({servicesPath:e,tenant:t,environment:r,namespace:_E,options:OE({method:"POST"},o)})),s},NE=e=>{let{servicesPath:t,key:r}=e;return eu(`${t}/settings${jr({key:r})}`,{method:"GET",headers:{"Content-Type":"application/json"}})},PE=e=>{let{servicesPath:t}=e;return eu(`${t}/version/collect`,{method:"POST",headers:{"Content-Type":"application/json"}})},RE=e=>{let{tenant:t,userName:r,servicesPath:n}=e;return eu(`${n}/plugins${jr({tenant:t,user:r})}`,{method:"GET"})},SE=e=>{let{tenant:t,environment:r,servicesPath:n,options:i,namespace:a,projection:o}=e;return eu(`${n}/configService${jr({tenant:t,environment:r,namespace:a,projection:o})}`,i)},wE=e=>{let{tenant:t,environment:r,servicesPath:n}=e;return SE({tenant:t,environment:r,servicesPath:n,options:{method:"GET"}})},IE=e=>{let{servicesPath:t,stateHash:r}=e;return eu(`${t}/searchLink?key=${r}`,{method:"GET"})},UE=e=>{let{imageServicePath:t,environment:r,tenant:n,image:i}=e;const a=new FormData;return"string"==typeof i?(a.append("sourceUrl",i),a.append("upload","false")):a.append("file",i),eu(`${t}/${r}/${n}`,{body:a,method:"POST",application:"common",headers:{"Content-Type":null}})},CE=e=>eu(`/${e}?showObjectsInfo=true`,{method:"GET"}),DE=e=>{let{exportPath:t,tenant:r,options:n}=e;return eu(`${t}/${r}/activities${jr(n)}`,{method:"POST"})};function jE(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){LE(e,t,r[t])}))}return e}function LE(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const kE=e=>{const{entityUri:t}=e;return eu(`/${t}/_crosswalkTree`,{method:"GET",headers:{"Content-Type":"application/json"}})},FE=e=>{let{entityUri:t,crosswalk:r}=e;return eu(`/${t}/crosswalks`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify([r])})},ME=e=>{let{entityTypeUri:t,contributorCrosswalkType:r,contributorCrosswalkValue:n,contributorCrosswalkSourceTable:i,crosswalkType:a,crosswalkValue:o,crosswalkSourceTable:s,crosswalkDeleteDate:l}=e;return eu("/entities?options=partialOverride",{method:"POST",headers:{"Content-Type":"application/json"},noReltioSourceSystem:!0,body:JSON.stringify([{attributes:{},crosswalks:[jE({type:r,value:n,dataProvider:!1,contributorProvider:!0},i&&{sourceTable:i}),jE({type:a,value:o,dataProvider:!0},s&&{sourceTable:s},l&&{deleteDate:l})],type:t}])})},xE=e=>{const{contributorUri:t,entityUri:r,operationType:n}=e;return eu(`/${r}/_${n}${jr({contributorURI:t})}`,{method:"POST"})},$E=e=>{let{entityUri:t,crosswalkId:r,attributeName:n,value:i}=e;return eu(`/${t}/crosswalks/${r}/${n}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({value:i})})},VE=e=>{let{entityUri:t,crosswalkId:r,attributeName:n}=e;return eu(`/${t}/crosswalks/${r}/${n}`,{method:"DELETE",headers:{"Content-Type":"application/json"}})},GE=e=>{let{entityUri:t,crosswalkId:r}=e;return eu(`/${t}/crosswalks/${r}`,{method:"DELETE",headers:{"Content-Type":"application/json"}})};function WE(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const BE=e=>{let{entityTypeUri:t}=e;return eu(`/dataQuality/fillRates${Dr({entityType:jt(t)})}`,{method:"GET"})},YE=e=>{let{attributes:t=[],metrics:r=[]}=e;const n=r.length,i=t.length*n;return i>10?10:i},qE=e=>{let{entityTypeUri:t,attributes:r,dataLevel:n,metrics:i}=e;const a=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){WE(e,t,r[t])}))}return e}({},n===$e.ATTRIBUTE_TYPE?{attributes:r}:{},i?{metrics:i}:{}),o=n===$e.ATTRIBUTE_TYPE?Dr({numberOfThreads:YE({attributes:r,metrics:i})||1}):"";return eu(`/entityType/${jt(t)}/dataQuality/${n}${o}`,{method:"POST",body:JSON.stringify(a)})},HE=e=>{let{dvfPath:t,tenant:r,entityTypeUri:n,env:i}=e;return eu(`${t}/api/${r}/dataValidationFunctions/entityTypes/${jt(n)}`,{method:"GET",headers:{env:i}})},QE=e=>{let{mlDqPath:t,tenant:r,entityTypeUri:n,attribute:i,viewMultiplier:a=1,dataLevel:o=$e.ATTRIBUTE_TYPE,metrics:s=[],startDate:l,endDate:u}=e;const c={attribute:i,metrics:s,viewMultiplier:a,startDate:l,endDate:u};return eu(`${t}/${r}/entityType/${jt(n)}/ml/dataQuality/v1/${o}/timeSeries/`,{method:"POST",body:JSON.stringify(c)})},KE=e=>{let{attributeUri:t,sourceUri:r,crosswalkValue:n,crosswalkSourceTable:i}=e;return eu(`/${t}${jr({crosswalkValue:n,crosswalkSourceTable:i})}`,{method:"DELETE",headers:r?{"Source-System":r}:{}})},JE=e=>{let{attributeUri:t,value:r}=e;return eu(`/${t}/pin`,{method:"PUT",body:JSON.stringify({value:r})})},XE=e=>{let{attributeUri:t,value:r}=e;return eu(`/${t}/ignore`,{method:"PUT",body:JSON.stringify({value:r})})},zE=e=>{let{attributeUri:t,sourceUri:r,crosswalkValue:n,crosswalkSourceTable:i,value:a}=e;return eu(`/${t}${jr({crosswalkValue:n,crosswalkSourceTable:i})}`,{method:"PUT",headers:r?{"Source-System":r}:{},body:JSON.stringify({value:a})})},ZE=e=>{let{attributeUri:t,crosswalkValue:r,crosswalkSourceTable:n,sourceUri:i,value:a}=e;const o=jr({crosswalkValue:r,crosswalkSourceTable:n}),s=t.split("/").slice(0,-1).join("/"),[l]=kl()([[{value:a}]]);return eu(`/${s}${o}`,{method:"POST",headers:i?{"Source-System":i}:{},body:JSON.stringify(l)})},em=e=>{let{entityUri:t,attributeName:r,value:n}=e;return eu(`/${t}/activeness`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({[r]:n})})},tm=e=>{let{entityUri:t,attributeName:r}=e;return eu(`/${t}/activeness/${r}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({})})};function rm(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const nm=e=>{let{entityUri:t}=e;return eu(`/${t}/_historicURIs`,{method:"GET"})},im=e=>{let{entityUri:t,historicUris:r}=e,n=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,["entityUri","historicUris"]);return eu(`/${t}/_changesWithTotal${jr(function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){rm(e,t,r[t])}))}return e}({},n,{historicURIs:null==r?void 0:r.join(",")}))}`,{method:"GET"})},am=(e,t)=>eu(`/${e}/_previousChange${jr({timestamp:t})}`,{method:"GET"}),om=(e,t)=>eu(`/${e}${jr({time:t})}`,{method:"GET"});function sm(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){lm(e,t,r[t])}))}return e}function lm(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const um=e=>{let{url:t,method:r,data:n,headers:i,noRequestProcessor:a}=e;return eu(t,{method:r||"GET",body:n,headers:sm({"Content-Type":"application/json"},null!=i?i:{}),noRequestProcessor:a})},cm=e=>{let{validationServicePath:t,uri:r,diff:n,tenant:i,options:a=[],severity:o=[]}=e;const s=jr({options:a.join(","),severity:o.join(",")});return eu(`${t}/validate/${i}/entity/${Tp({uri:r})}${s}`,{method:"POST",headers:{"Content-Type":"application/json"},body:n})},pm=e=>{let{validationServicePath:t,entity:r,tenant:n,options:i=[],severity:a=[]}=e;return eu(`${t}/validate/${n}/entity${jr({options:i.join(","),severity:a.join(",")})}`,{method:"POST",headers:{"Content-Type":"application/json"},body:r})},dm=e=>{let{tenant:t,apiPath:r}=e;return eu(`${r}/tenants/${t}/name`,{method:"GET"})},ym=e=>{let{tenant:t,apiPath:r}=e;return eu(`${r}/tenants/${t}/_rdmTenants`,{method:"GET"})},fm=e=>{const{name:t,tenant:r,environment:n,user:i,servicesPath:a}=e;return eu(`${a}/preferences${jr({name:t,tenant:r,environment:n,user:i})}`,{method:"GET"})},Tm=e=>{const{name:t,tenant:r,environment:n,user:i,servicesPath:a,value:o}=e,s={name:t,tenant:r,environment:n,user:i,values:[JSON.stringify(o)]};return eu(`${a}/preferences`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)})},Em=e=>{const{name:t,tenant:r,environment:n,user:i,servicesPath:a}=e,o={name:t,tenant:r,environment:n,user:i};return eu(`${a}/preferences`,{method:"DELETE",body:JSON.stringify(o)})},mm=e=>{const{servicesPath:t}=e;return eu(`${t}/getTokenForWorker`,{method:"GET"})};var hm=r(29524);const bm=e=>{let{entityTypeUri:t,initValue:r,attributeTypes:n,metadata:i,mode:a}=e;const o=Nt(),s={attributes:Al({attributeTypes:n,parentUri:o,metadata:i,mode:a}),uri:o,type:t,timestamp:Date.now()};return r?function(e,t,r){const n=(arguments.length>3&&void 0!==arguments[3]?arguments[3]:[]).find((e=>!e.lookupCode&&!e.dependentLookupCode&&"String"===e.type));if(n){const i=Fs(r,e,n.uri)[0];return i&&i.value?wl({entity:e,attributeType:n,uri:i.uri,value:t}):Rl({entity:e,attributeType:n,parentUri:e.uri,value:t,index:0})}return e}(s,r,i,n):s},Om=(e,t)=>(0,l.pipe)(l.values,l.flatten,(0,l.filter)((0,l.has)("refEntity")),(0,l.map)(Cs),(0,l.filter)(At),(0,l.map)((t=>e[t])),(0,l.reject)(l.isNil))((null==t?void 0:t.attributes)||{}),vm=(0,l.curry)(((e,t)=>{const r=Om(e=e||{},t=t||{});return r.concat((0,l.chain)(vm(e),r))})),gm=(0,l.curry)(((e,t)=>(0,l.pipe)(pe,(0,l.filter)(e))(t))),_m=gm((e=>"objectURI"===e[e.length-1]&&e.includes("refEntity"))),Am=e=>(0,l.filter)((0,l.pipe)((t=>(0,l.path)(t,e)),At)),Nm=e=>(0,l.pipe)(_m,Am(e),(0,l.map)((t=>(0,l.path)(t,e))))(e),Pm=(0,l.curry)(((e,t,r)=>{const n=(0,l.pipe)(_m,(0,l.find)((t=>(0,l.pathSatisfies)((t=>t===e),t,r))))(r);return n?(0,l.set)((0,l.lensPath)(n),t,r):r})),Rm=(0,l.when)((0,l.pipe)((0,l.prop)("uri"),At),(0,l.omit)(["uri","timestamp"])),Sm=(0,l.pipe)(Rm,Pp),wm=async(e,t,r)=>{if(!e)return null;const n=Nm(e);if(n.length>0)for(const r of n)e=Pm(r,t[r],e);const i=await tf(Sm(e),null==r?void 0:r.enhanceUriWithDCR),a=(e=>(0,l.path)([0,"errors"],e))(i);if(a)throw a;if((0,l.has)("changes",i))return null==r||r.updateDCRUriFromResponse(i),((e,t)=>(0,l.pipe)((0,l.prop)("changes"),l.keys,(0,l.find)((e=>!(0,l.values)(t).includes(e))))(e))(i,t);const o=(e=>(0,l.pathOr)(e,[0,"object"],e))(i);return o.uri},Im=async(e,t,r)=>{const n=Cm(e,t),i={};for(const t of n)i[t]=await wm(e[t],i,r);return i},Um=(0,l.curry)(((e,t)=>{const r=hm.Node(t);return Nm(e[t]).forEach((t=>{const n=Um(e,t);r.addEdge(n)})),r})),Cm=(e,t)=>(0,l.pipe)((0,l.map)(Um(e)),(0,l.map)(hm.getDependencyOrder),l.flatten,(0,l.map)((e=>e.getInfo())))(t),Dm=(0,l.map)((0,l.evolve)({newValue:(0,l.when)(Array.isArray,(0,l.map)(Rm))})),jm=(e,t)=>[...Rh(e.tags||[],t.tags||[]),...Sh(e.roles||[],t.roles||[]),...vh(e,t),...gh(e,t)],Lm=(e,t)=>[..._h(Oh((0,l.clone)(e.attributes),(0,l.clone)(t.attributes),!1),Ph((0,l.clone)(t.attributes),(0,l.clone)(t.crosswalks)),e),...jm(e,t)],km=(0,l.pipe)(((e,t)=>{const r=(0,l.toPairs)(e);return(0,l.map)((0,l.evolve)({newValue:(0,l.when)(Array.isArray,(0,l.map)((e=>r.reduce(((e,t)=>{let[r,n]=t;return Pm(r,n,e)}),e))))}),t)}),Dm),Fm=(0,l.curry)(((e,t)=>(0,l.when)(At,(0,l.propOr)(l.__,t,e),t)));function Mm(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){xm(e,t,r[t])}))}return e}function xm(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const $m=e=>{let{hierarchy:t,uri:r,parents:n=[],children:i=[]}=e;return Mm({},t,{[r]:{parents:n,children:i}})},Vm=e=>{let{hierarchy:t,uri:r,parents:n=[],children:i=[]}=e;return Mm({},t,{[r]:{parents:t[r].parents.concat(n),children:t[r].children.concat(i)}})},Gm=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const i=t[e],a=Om(t,i),o=$m({hierarchy:n,uri:e,children:a.map((0,l.prop)("uri")),parents:r});return a.reduce(((r,n)=>Gm(n.uri,t,[e],r)),o)},Wm=function(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return e.reduce(((e,n)=>{const i=(0,l.path)(Td(),n),a=t?Vm({hierarchy:e,uri:t,children:[i]}):e,o=(0,l.path)(Od(),n),s=At(o)?[o]:[],u=$m({hierarchy:a,uri:i,children:s,parents:t?[t]:[]});return s.reduce(((e,t)=>Gm(t,r,[i],e)),u)}),n)},Bm=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return Wm(r,e,t,Gm(e,t))},Ym=function(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];if(e===t)return Bm(t,r,n);if(St(e)){const t=Rd(n,e);return t&&Wm([t],null,r)}return r[e]?Gm(e,r):void 0},qm=(e,t)=>{var r;const n=(null===(r=e[t])||void 0===r?void 0:r.children)||[];return n.concat(n.flatMap((t=>qm(e,t))))},Hm=(e,t)=>{var r;const n=(null===(r=e[t])||void 0===r?void 0:r.parents)||[];return n.concat(n.flatMap((t=>Hm(e,t))))},Qm=(e,t)=>{let{entityUri:r,entitiesMap:n={},connections:i=[],metadata:a}=e;const o=[],s=Rt(t),u=Bm(r,n,i),c=((e,t,r)=>{let{entitiesMap:n={},connections:i=[],metadata:a}=e;const o=[];let s;for(let e=0;e<t.length;e++){const u=t[e],c=t[e+1]||r;if(St(c)){if(s=Rd(i,c),!s)return null;o.push({type:Ae.relationConnection,value:s,valueType:Ni(a,(0,l.path)(Ed(),s))});continue}if(St(u)){const e=n[c];if(!e)return null;o.push({type:Ae.tempEntity,value:e,valueType:Hr(a,e.type)});continue}const p=n[u],d=zs(p,c),y=n[c];if(!d||!y)return null;o.push({type:Ae.attributeValue,value:d,valueType:fr(a,Mt(d.uri,p.type))}),o.push({type:Ae.tempEntity,value:y,valueType:Hr(a,y.type)})}return o})({entitiesMap:n,connections:i,metadata:a},Hm(u,s).reverse(),s);if(!c)return null;o.push(...c);const p=St(s),d=p?Sd(i,s):n[s],[y,f]=t!==s?(e=>{const t=e.split("/attributes/").slice(1).join("/attributes/");if(!t)return[];const[r,n]=t.split("/").reduce(((e,t,r)=>(e[r%2==0?0:1].push(t),e)),[[],[]]);return r.length!==n.length?[]:[r,n]})(t):[[],[]];if(!d||!y||!f)return null;let T,E=p?Ni(a,d.type):Hr(a,d.type),m=d.attributes;for(let e=0;e<y.length;e++){const t=0===e?E.attributes:Tr(a,E);if(E=null==t?void 0:t.find((0,l.propEq)("name",y[e])),!E)return null;{var h,b,O,v;const t=t=>{let{uri:r}=t;return r.endsWith(`/${f[e]}`)},r=null===(h=m[E.name])||void 0===h?void 0:h.find(t),i=null===(b=T)||void 0===b||null===(O=b.attributes)||void 0===O||null===(v=O[E.name])||void 0===v?void 0:v.find(t),s=i||r;if(!s)return null;i&&o.push({type:Ae.tempEntity,value:T,valueType:Hr(a,T.type)}),o.push({type:Ae.attributeValue,value:s,valueType:E}),m=s.value;const l=Cs(s);T=l&&At(l)?n[l]:null}}return o},Km=e=>e.every((e=>{let{type:t}=e;return[Ae.attributeValue,Ae.tempEntity].includes(t)}))?e.filter((e=>{let{type:t}=e;return t===Ae.attributeValue})).reduce(((e,t)=>{const r=t.value.uri;return e?`${e}/${r.split("/").slice(-2).join("/")}`:r}),""):null;let Jm;!function(e){e.insertAttribute="insertAttribute",e.updateAttribute="updateAttribute",e.deleteAttribute="deleteAttribute"}(Jm||(Jm={}));const Xm={[Jm.insertAttribute]:{color:"#599E0E"},[Jm.updateAttribute]:{backgroundColor:"rgba(255, 187, 0, 0.12)",color:"#CC7500"},[Jm.deleteAttribute]:{backgroundColor:"rgba(255, 50, 0, 0.2)",color:"#CF0E26"}},zm=e=>{switch(e){case"UPDATE_ATTRIBUTE":return Jm.updateAttribute;case"UNDO_IGNORE_ATTRIBUTE":case"INSERT_ATTRIBUTE":return Jm.insertAttribute;case"IGNORE_ATTRIBUTE":case"DELETE_ATTRIBUTE":return Jm.deleteAttribute;default:return""}},Zm="/",eh=(0,l.pipe)((0,l.split)(Zm),(0,l.propSatisfies)((0,l.lte)(2),"length")),th=(0,l.pipe)((0,l.split)(Zm),(0,l.slice)(0,-2),(0,l.join)(Zm)),rh=(0,l.curry)(((e,t)=>(0,l.cond)([[(0,l.has)(e),(0,l.prop)(e)],[()=>eh(e),rh(th(e))]])(t))),nh=e=>(0,l.pipe)(l.keys,(0,l.any)((0,l.startsWith)(e+Zm))),ih=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=rh(e,t);return(0,l.isNil)(r)?nh(e)(t)?"UPDATE_ATTRIBUTE":"":r},ah=function(e,t){var r;let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return null==n||null===(r=n[e])||void 0===r?void 0:r[t]},oh=e=>{let t=[];var r;return e&&(t.push({uri:e.uri,crosswalks:e.crosswalks,merges:e.merges}),null===(r=e.merges)||void 0===r||r.forEach((e=>{e.losers.forEach((e=>{t=t.concat(oh(e))}))}))),t},sh=(e,t)=>(0,l.find)((e=>(0,l.find)((0,l.eqBy)(ph,t),(0,l.propOr)([],"crosswalks",e))),e),lh=(e,t)=>{let r=e.crosswalks||[];var n;return t||null===(n=e.merges)||void 0===n||n.forEach((e=>{var t;null===(t=e.losers)||void 0===t||t.forEach((e=>{r=r.concat(lh(e))}))})),r},uh=e=>{let t=0;var r;return e?(null===(r=e.merges)||void 0===r||r.forEach((e=>{var r;null===(r=e.losers)||void 0===r||r.forEach((e=>{const r=uh(e);r>t&&(t=r)}))})),t+1):t},ch=(e,t)=>{if(At(t.uri))return!0;const r=(e||[]).find((e=>e.attributes&&e.attributes.includes(t.uri)));return!r||"configuration/sources/Reltio"===r.type},ph=e=>{let{sourceTable:t,type:r,value:n}=e;return`${t||""}/${r}/${n}`},dh=e=>{const t="attributes"in e&&e.attributes,r="attributeURIs"in e&&e.attributeURIs;return t||r||[]},yh=e=>{let{deleteDate:t}=e;return!!t&&f().utc(t).valueOf()<Date.now()},fh=(e,t)=>{const r=t.reduce(((e,t)=>(e["configuration/sources/"+t.name]=t,e)),{}),n=t.reduce(((e,t)=>(e[t.id]=t,e)),{});return(0,l.pipe)((0,l.map)((e=>{var t,i;if(r[e.type])return r[e.type];const a=null===(t=e.crosswalkExternalInfo)||void 0===t||null===(i=t.dtssInfo)||void 0===i?void 0:i.tenantId;return a&&n[a]?n[a]:void 0})),(0,l.reject)(l.isNil),l.uniq,(0,l.ifElse)((e=>{let{length:t}=e;return 1===t}),l.head,(()=>{})))(e)},Th=(0,l.eqBy)(ph),Eh=(0,l.pipe)((0,l.propOr)({},"attributes"),l.values,l.flatten,(0,l.filter)((0,l.has)("refRelation")),(0,l.chain)((e=>(0,l.pipe)(Ps,(0,l.propOr)([],"crosswalks"),(0,l.map)((0,l.when)((0,l.pipe)((0,l.prop)("attributeURIs"),E),(0,l.assoc)("attributeURIs",[e.uri]))))(e))));function mh(e){return e&&void 0!==e.uri}function hh(e){return function(t,r){var n,i,a=[];return i=r,!(n=t)&&!i||!(!n||!i)&&n.length===i.length&&n.every((function(e,t){return e===i[t]}))||a.push({type:e,newValue:r}),a}}function bh(e,t){function r(r){if(e[r]&&t[r])if(Array.isArray(e[r])&&Array.isArray(t[r])){if(e[r].length!==t[r].length)return!1;if(e[r][0]&&t[r][0]&&e[r][0].objectURI!==t[r][0].objectURI)return!1}else if(e[r].objectURI!==t[r].objectURI)return!1;return!0}return r("refEntity")&&r("refRelation")}function Oh(e,t,r){var n,i,a,o=[];for(var s in e)if(e.hasOwnProperty(s)){if("paging"===s)continue;var u=e[s];if(void 0===t[s])for(var c in u)u.hasOwnProperty(c)&&o.push.apply(o,m(u[c]));else for(var p in u)if(u.hasOwnProperty(p)){var d=u[p],y=_(d,t[s]);void 0===y?o.push.apply(o,m(d)):d.value===y.value||d.lookupCode&&d.lookupCode===y.lookupCode?d.ignored!==y.ignored&&o.push.apply(o,b(y)):null==y.value||""===y.value?o.push.apply(o,m(d)):"Nested"===g(d)?d.ignored!==y.ignored&&(0,l.equals)(d.value,y.value)?o.push.apply(o,b(y)):o=o.concat(Oh(d.value,y.value,r)):"Reference"===g(d)?bh(d,y)?o.push.apply(o,Oh(d.value,y.value,r)):(o.push.apply(o,m(d)),o.push(O([y]))):""!==y.value&&(!1===y.ov?o.push.apply(o,(void 0,void 0,i=(n=y).uri.lastIndexOf("/"),a=n.uri.substr(0,i),[{type:"_UPDATE_NON_OV_ATTRIBUTE",uri:n.uri,typeUri:a,value:n.lookupCode||n.value}])):o.push.apply(o,h(y)))}}for(var f in t)if(t.hasOwnProperty(f)){if("paging"===f)continue;var T=(t[f]||[]).filter((function(t){return void 0===_(t,e[f])}));(T=E((0,l.clone)(T))).length&&o.push(O(T))}return o;function E(e){return e?e.map((function(e){var t;if(e){var r=e.value;return null!=r&&(ce(r)?Object.keys(r).forEach((function(e){var n=E(r[e]);n.length>0?r[e]=n:delete r[e],t||(t=0!==n.length)})):t=null!=r&&""!==r),t||e.lookupCode||e.refEntity?e:null}})).filter((function(e){return null!=e})):[]}function m(e){return[{type:"DELETE_ATTRIBUTE",uri:e.uri}]}function h(e){return[{type:"UPDATE_ATTRIBUTE",uri:e.uri,newValue:{value:e.lookupCode||e.value}}]}function b(e){return e&&(e.ignored?function(e){return[{type:"IGNORE_ATTRIBUTE",uri:e.uri,newValue:{value:!0}}]}(e):function(e){return[{type:"IGNORE_ATTRIBUTE",uri:e.uri,newValue:{value:!1}}]}(e))}function O(e){var t=e[0].uri,n=t.lastIndexOf("/"),i={type:"INSERT_ATTRIBUTE",uri:t=t.substr(0,n),newValue:e.map((function(e){var t,n={value:JSON.parse(JSON.stringify(e.lookupCode||e.value))};return r&&(n.uri=e.uri),v(n.value),e.refEntity&&(t=e.refEntity,Array.isArray(t)&&(t=t[0]),n.refEntity=t),e.refRelation&&(t=e.refRelation,Array.isArray(t)&&(t=t[0]),r||delete t.objectURI,n.refRelation=t),n}))};return i}function v(e){if(null!==e&&"[object Object]"===e.toString())for(var t in e)e.hasOwnProperty(t)&&"paging"!==t&&e[t].forEach((function(e){delete e.crosswalks,delete e.type,r||delete e.uri,v(e.value)}))}function g(e){var t=e.value;if(ce(t))return e.hasOwnProperty("refEntity")?"Reference":"Nested"}function _(e,t){if(void 0!==t)return t.filter((function(t){return t.uri===e.uri}))[0]}}function vh(e,t){var r,n,i=[];return e.defaultProfilePic!==t.defaultProfilePic?i.push({type:"UPDATE_PROFILE_PIC_BY_URI",newValue:{value:t.defaultProfilePic}}):(r=e.defaultProfilePicValue)===(n=t.defaultProfilePicValue)||mh(r)&&mh(n)&&r.uri===n.uri||i.push({type:"UPDATE_PROFILE_PIC_BY_URL",newValue:{value:t.defaultProfilePicValue}}),i}function gh(e,t){var r=[],n=a(e.startDate,t.startDate);void 0!==n&&r.push({type:"UPDATE_START_DATE",newValue:{value:n}});var i=a(e.endDate,t.endDate);return void 0!==i&&r.push({type:"UPDATE_END_DATE",newValue:{value:i}}),r;function a(e,t){var r;return e!=t&&(r=(0,l.isNil)(t)?"":t+""),r}}function _h(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;var n="configuration/sources/Reltio",i="configuration/sources/ReltioCleanser";function a(e,t){return e.crosswalk={type:t.type,value:t.value},e}function o(e,t){return e.reduce((function(e,r){return(e[r[t]]=e[r[t]]||[]).push(r),e}),{})}function s(e){return e.removeIt=!0}var l=e.map((function(e){if(e.crosswalk)return[e];var o=Ah(t,e.uri),s=o.filter((function(e){return e.type===n})),l=o.filter((function(e){return e.type!==n})),u=[];switch(e.type){case"INSERT_ATTRIBUTE":u.push(e);break;case"_UPDATE_NON_OV_ATTRIBUTE":u=u.concat(o.map((function(t){return a(e,t)})));break;case"DELETE_ATTRIBUTE":(l.length||0==s.length)&&u.push({type:"IGNORE_ATTRIBUTE",uri:e.uri,newValue:{value:!0}}),u=u.concat(s.map((function(t){return a({type:"DELETE_ATTRIBUTE",uri:e.uri},t)})));break;case"UPDATE_ATTRIBUTE":{const o=l.some((e=>{let{type:t}=e;return t===i}))&&r?Nh(r,t,e.uri):null;if(o||s.length){if(s.length)u=u.concat(s.map((function(t){return a({type:"UPDATE_ATTRIBUTE",uri:e.uri,newValue:e.newValue},t)})));else if(o){var c=Ah(t,o.uri).filter((e=>{let{type:t}=e;return t===n}));u=u.concat(c.map((t=>a({type:"UPDATE_ATTRIBUTE",uri:o.uri,newValue:e.newValue},t))))}}else u.push({type:"INSERT_ATTRIBUTE",uri:e.uri.substr(0,e.uri.lastIndexOf("/")),newValue:[e.newValue],insteadOfUpdate:!0});l.length&&u.push({type:"IGNORE_ATTRIBUTE",uri:e.uri,newValue:{value:!0}});break}}return u})),u=[].concat.apply([],l),c=o(u,"typeUri");for(var p in c)if("undefined"!==p){var d=c[p],y=u.filter((function(e){return"_UPDATE_NON_OV_ATTRIBUTE"!==e.type})).filter((function(e){return e.uri.substr(0,e.uri.lastIndexOf("/"))===p||"INSERT_ATTRIBUTE"===e.type&&e.uri===p})),f=d.filter((function(e){return e.crosswalk&&e.crosswalk.type===n}))[0],T=y.filter((function(e){return"UPDATE_ATTRIBUTE"===e.type}))[0];!T&&f&&(u.push({type:"UPDATE_ATTRIBUTE",uri:f.uri,newValue:{value:f.value},crosswalk:f.crosswalk}),y.forEach(s)),d.forEach(s)}return(u=u.filter((function(e){return!e.removeIt}))).forEach((function(e){delete e.insteadOfUpdate})),u}const Ah=(e,t)=>e.filter((function(e){return 1===(e.attributes||e.attributeURIs||[]).filter((function(e){return e===t})).length})),Nh=(e,t,r)=>(0,l.pipe)(Zs,(0,l.defaultTo)([]),(0,l.reject)((0,l.propEq)("uri",r)),(0,l.ifElse)((0,l.allPass)([e=>1===e.length,e=>{let[r]=e;return ch(t,r)},e=>{let[t]=e;return!gs(t)}]),(0,l.prop)(0),(0,l.always)(null)))(e,r);function Ph(e,t){for(var r in t=t||[],e)if(e.hasOwnProperty(r))for(var n=e[r],i=0;i<n.length;i++){var a=n[i];if(a.refRelation){var o=a.refRelation[0]||a.refRelation;if(o.crosswalks)for(var s=o.crosswalks.filter((function(e){return e.attributes||e.attributeURIs})),l=0;l<s.length;l++){for(var u=!0,c=0;c<t.length;c++)if(t[c].type===s[l].type&&t[c].value===s[l].value){t[c].attributes=t[c].attributes||t[c].attributeURIs,t[c].attributes=t[c].attributes.concat(s[l].attributes||s[l].attributeURIs),t[c].attributes=Object.keys(t[c].attributes.reduce((function(e,t){return e[t]=!0,e}),{})),delete t[c].attributeURIs,u=!1;break}u&&t.push(s[l])}}}return t}function Rh(e,t){return hh("UPDATE_TAGS").call(this,e,t)}function Sh(e,t){return hh("UPDATE_ROLES").call(this,e,t)}function wh(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Ih(e,t,r[t])}))}return e}function Ih(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Uh=function(e){var t=function(e,r,n,i){if(e&&r)if(n||(n=null),i=!!i,Array.isArray(e))for(var a=0;a<e.length;a++)r.call(n,a,e[a],e),i&&t(e[a],r,n,i);else if(ce(e))for(var o in e)r.call(n,o,e[o],e),i&&t(e[o],r,n,i)},r=function(e,t,r){return function(n){var i=-1!==n.uri.lastIndexOf("/")?n.uri.substring(0,n.uri.lastIndexOf("/")):"";e[i]||(e[i]=[]),e[i].push(n.type),t[n.uri]=n.type,"IGNORE_ATTRIBUTE"===n.type&&r.push(n.uri)}},n=function(e,t,r){var n=[],i=Object.keys(e).filter((function(t){return-1!==e[t].indexOf("IGNORE_ATTRIBUTE")&&-1!==e[t].indexOf("INSERT_ATTRIBUTE")}));return Object.keys(t).filter((function(e){var t=-1!==e.lastIndexOf("/")?e.substring(0,e.lastIndexOf("/")):null;return-1!==i.indexOf(t)})).forEach((function(e){-1!==r.indexOf(e)&&n.push(e),t[e]="UPDATE_ATTRIBUTE"})),{appearance:t,ignored:n}},i=function(e,t){var r=Array.isArray(t),n=r?[]:{};return r?(e=e||[]).some((function(e){return e.uri}))?n=function(e,t){var r=e.map((function(e){return e.uri})),n=e.map((function(e){var r,n,a=(n=t.filter((function(t){return t.uri===e.uri}))[0]||{},(r=e)&&n&&r.ignored!==n.ignored&&(delete r.ignored,delete n.ignored,r.ov=!0,n.ov=!0),{a:r,b:n});return i(a.a,a.b)})),a=t.filter((function(e){return-1===r.indexOf(e.uri)}));return n.concat(a)}(e,t):(n=n.concat(e),t.forEach((function(t,r){void 0===n[r]?n[r]=t:ce(t)?n[r]=i(e[r],t):-1===e.indexOf(t)&&n.push(t)}))):(ce(e)&&Object.keys(e).forEach((function(t){n[t]=e[t]})),Object.keys(t).forEach((function(r){ce(t[r])&&e[r]?n[r]=i(e[r],t[r]):n[r]=t[r]}))),n},a=function(){let a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};var s=JSON.parse(JSON.stringify(a)),l=JSON.parse(JSON.stringify(o)),u=i(a,o),c={},p={},d=[],y=r(p,c,d);e.compareAttributes(u,l).map((function(e){return"IGNORE_ATTRIBUTE"===e.type&&!1===e.newValue.value&&(e.type="UNDO_IGNORE_ATTRIBUTE"),e})).forEach((function(e){y(e)})),e.compareAttributes(u,s).map((function(e){return"DELETE_ATTRIBUTE"===e.type&&(e.type="INSERT_ATTRIBUTE"),"IGNORE_ATTRIBUTE"===e.type&&(e.type=e.newValue.value?"UNDO_IGNORE_ATTRIBUTE":"IGNORE_ATTRIBUTE"),e})).forEach((function(e){y(e)}));var f=n(p,c,d);return t(u,(function(e,t){t&&-1!==this.indexOf(t.uri)&&(t.ignored=!0,delete t.ov,t.hidden=!0)}),f.ignored,!0),{attributes:u,appearance:f.appearance}};const o=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const r=(0,l.difference)(t,e),n=(0,l.difference)(e,t),i=n.concat(t),a=(e,t)=>(0,l.pipe)((0,l.map)((t=>[t,e])),l.fromPairs)(t),o=wh({},a("INSERT_ATTRIBUTE",r),a("DELETE_ATTRIBUTE",n));return[i,o]};return{computeHistoryDiff:a,computeEntityHistoryDiff:(e,t)=>{const{attributes:r,appearance:n}=e?a(e.attributes,t.attributes):{attributes:t.attributes,appearance:{}},[i,s]=o(e?e.roles:[],t.roles),[l,u]=o(e?e.tags:[],t.tags);return{attributes:r,appearance:wh({},n,{roles:s,tags:u}),roles:i,tags:l}}}};const Ch=(0,l.pipe)(l.values,l.flatten,(0,l.reduce)(((e,t)=>{const r=[t.uri,...(0,l.is)(Object,t.value)?Ch(t.value):[]];return e.concat(r)}),[])),Dh=(e,t)=>t>e?`${t}-${e}`:`${e}-${t}`,jh=e=>e?[fp(e)]:[],Lh=e=>{const t=[...Ch((null==e?void 0:e.attributes)||[]),...Ch((null==e?void 0:e.analyticsAttributes)||[])];return e?[...jh(e),...t]:[]},kh=(e,t)=>[e,...t.map((t=>Dh(e,t)))],Fh=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.map((e=>{let{relation:t}=e;return cd(t)}))},Mh=(e,t)=>{switch(e){case Ne.ENTITY:return(e=>{let{entityUri:t}=e;return[t]})(t);case Ne.ENTITY_ATTRIBUTE:case Ne.RELATION_ATTRIBUTE:return(e=>{let{uri:t}=e;return[xt(t)]})(t);case Ne.POTENTIAL_MATCH:return(e=>{let{entityUri:t,matchEntityUri:r}=e;return[t,r]})(t);case Ne.RELATION:return(e=>{let{entityUri:t,connection:{relation:{relationType:r},entity:{entityUri:n,dataTenant:i}}}=e;return[t,fp({uri:n,dataTenant:i}),r]})(t)}},xh=e=>(0,l.pipe)(l.values,(0,l.map)((0,l.map)((0,l.pipe)((0,l.prop)("replies"),l.inc))),(0,l.map)(l.sum),l.sum)(e),$h=(0,l.curry)(((e,t)=>{const r=Uo(e,t),n=(0,l.pipe)((0,l.prop)("memberTypes"),(0,l.chain)((0,l.prop)("name")))(r);return r.extendsTypeURI?n.concat($h(e,r.extendsTypeURI)):n})),Vh=(0,l.curry)(((e,t)=>(0,l.reduce)(((t,r)=>(0,l.assoc)(r,((e,t)=>(0,l.path)(["members",t],e))(e,r),t)),{},t))),Gh=(e,t)=>(0,l.pipe)((0,l.prop)("type"),$h(e),Vh(t))(t),Wh=e=>{const t=r=>r.reduce(((r,n)=>Math.max(r,(t=>106+16*(t.level||0)+6.5*t.item[e].length)(n),t(n.items?n.items.flat(1/0):[]))),0);return t};var Bh,Yh=r(33164);function qh(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}!function(e){e.PotentialMatches="potentialMatches",e.Random0="random0",e.Random1="random1",e.SpectreYellowCyan="spectreYellowCyan",e.SpectreBlueBrown="spectreBlueBrown",e.Charts="charts",e.Crosswalks="crosswalks"}(Bh||(Bh={}));const Hh={},Qh={random0:{granularity:3,colors:["#ffee91","#ffdc0e","#fec92f","#eab710","#f69785","#f57f27","#fccde5","#f8b6b8","#ff9acc","#ee4272","#b71137","#c4c0e1","#bd81be","#5f3577","#9fd6bf","#8accca","#12959f"]},potentialMatches:{colors:["#fec92f","#ee4272","#6d9a35","#555962","#2d9ecf"]},random1:{colors:["#fccde5","#ff9acc","#81b2d3","#f8b6b8","#bd81be","#82c55c","#c4e3f1","#7f939e","#ffee91","#fec92f","#ee4272","#2d9ecf","#c4c0e1","#7accca","#cdc393","#f69785","#f0ecc7","#9fd6bf","#6d9a35","#afbc26","#12959f","#aacf99","#056b97","#eab710","#b4d36a","#70bede","#f57f27","#7a843b","#cfd0d2","#555962","#b71137","#ffdc0e","#bea68c","#5f3566"]},spectreYellowCyan:{granularity:3,colors:["#ffee91","#ffdc0e","#fec92f","#eab710","#f69785","#f57f27","#fccde5","#f8b6b8","#ff9acc","#ee4272","#b71137","#c4c0e1","#bd81be","#5f3577","#9fd6bf","#7accca","#12959f"]},spectreBlueBrown:{granularity:3,colors:["#c4e3f1","#70bede","#81b2d3","#2d9ecf","#056b97","#aacf99","#b4de6a","#82c55c","#6d9a35","#afbc26","#7a843b","#cfd0d2","#7f939e","#555962","#f0ecc7","#cfc393","#bea68c"]},charts:{colors:["#0072ce","#c4ce00","#ce5c00","#4bafff","#f97061","#9e7ed3","#c34980","#c4ce00","#669977","#ffe16f","#4896df","#40cfbb","#9bc66a","#ce5c00","#4bafff","#f085f2","#bea68c"]},crosswalks:{colors:["#86f2f9","#cae815","#f8a4a4","#fd63c0","#b6c5ec","#8fe98e","#ff9c72","#84cbf3","#a8f384","#d9ffa8","#ace1ff"]}},Kh=e=>{if(!Hh[e]){const t=Qh[e]||Qh.random0;Hh[e]=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){qh(e,t,r[t])}))}return e}({counter:0,granularityCounter:0,idToColor:{}},t)}return Hh[e]},Jh=(0,l.curry)(((e,t)=>{const r=Kh(e);return r.idToColor[t]||(r.idToColor[t]=(e=>{const t=e.counter,r=e.granularity||1;return e.counter+=r,e.counter>=e.colors.length&&(++e.granularityCounter>=r&&(e.granularityCounter=0),e.counter=e.granularityCounter),e.colors[t]})(r)),r.idToColor[t]})),Xh=e=>Jh(Bh.Charts,e),zh=()=>Kh(Bh.PotentialMatches).colors,Zh=e=>Jh(Bh.Random1,e),eb=e=>(0,Yh.getColor)(e)?"#FFFFFF":"#212121";var tb=r(73116);const rb=Array.from({length:100},((e,t)=>t/100)),nb=e=>{const t=Number(e.replace(/\D/g,""))||0;let r=3735928559^t,n=1103547991^t;for(let t,i=0;i<e.length;i++)t=e.charCodeAt(i),r=Math.imul(r^t,2654435761),n=Math.imul(n^t,1597334677);return r=Math.imul(r^r>>>16,2246822507)^Math.imul(n^n>>>13,3266489909),n=Math.imul(n^n>>>16,2246822507)^Math.imul(r^r>>>13,3266489909),4294967296*(2097151&n)+(r>>>0)},ib={},ab=new tb.Z({hash:nb,saturation:rb.slice(15,71),lightness:rb.slice(50,90)}),ob=new tb.Z({hash:nb,saturation:rb.slice(46,89),lightness:rb.slice(44,58)}),sb=(0,l.curry)(((e,t,r)=>{t in ib||(ib[t]={});const n=ib[t];r in n||(n[r]=((e,t)=>{const r=String(nb(t));return e.hsl(r)})(e,r));const[i,a,o]=n[r];return`hsl(${i}, ${100*a}%, ${100*o}%)`})),lb=sb(ab,"crosswalks"),ub=sb(ab,"sources"),cb=sb(ab,"contributors"),pb=sb(ab,"dataValidationFunctions"),db=sb(ob,"entities");function yb(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){fb(e,t,r[t])}))}return e}function fb(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Tb=(0,l.has)("items"),Eb=e=>0===e,mb=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Number.MAX_SAFE_INTEGER;return Math.min(Math.max(e,t),r)},hb=e=>e.reduce(((e,t)=>e+t.width),0),bb=e=>e.reduce(((e,t)=>Math.max(e,t.height)),0),Ob=e=>e.reduce(((e,t)=>Math.max(e,t.width)),0),vb=e=>e.reduce(((e,t)=>e+t.height),0),gb=e=>(0,l.is)(String,e)&&e.includes("%"),_b=(0,l.has)("spacer"),Ab=(e,t)=>Math.max(Math.round(parseFloat(t)/100*e),1),Nb=e=>((null==e?void 0:e.items)||[]).reduce(((e,t)=>e.concat(Tb(t)?Nb(t):t)),[]),Pb=(e,t)=>{const r=[...t];for(;(0,l.sum)(r)>e;){const e=Math.max(...r);if(1===e)break;const t=r.indexOf(e);r[t]--}return r},Rb=e=>({id:e.layout}),Sb=function(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Rb;const i=(e,t,r,n)=>{let{width:i}=e;const a=t.items.some((e=>e.flex));let o;if(a){const[e,n]=(0,l.partition)((0,l.propIs)(Number,"flex"),t.items),a=(0,l.pipe)((0,l.map)((0,l.pipe)((0,l.prop)("flex"),parseInt)),l.sum)(e),s=Math.round(i-i*(a/(a+n.length))),u=Math.max(s/Math.max((0,l.length)(n),1),1),c=(e,t,r)=>Math.max(Math.round(t/r*e),1);o=r.flex?c(i,r.flex,a+n.length):u}else{const[e,n]=(0,l.partition)((0,l.both)((0,l.propIs)(String,"width"),(0,l.pipe)((0,l.propOr)("","width"),(0,l.includes)("%"))),t.items),a=(0,l.pipe)((0,l.map)((0,l.pipe)((0,l.prop)("width"),parseInt)),l.sum)(e),s=Math.round(i-i*(a/100)),u=Math.max(s/Math.max((0,l.length)(n),1),1);o=gb(r.width)?Ab(i,r.width):u}return mb(o,(0,l.prop)("minWidth",n),(0,l.prop)("maxWidth",n))},a=e=>{let{minHeight:t,maxHeight:r,height:n=1}=e;return mb(n,t,r)},o=(e,t)=>Tb(t.items[0])?p(e,t.items[0]):null,s=(t,r)=>{const o=r.items.map((a=>i(t,r,a,Tb(a)?n(a.layout):e(a.view)))),s=Pb(t.width,o),u=r.items.reduce(((r,n,i)=>{const o=s[i],u=Eb(i)?t.x:(0,l.last)(r).x+(0,l.propOr)(o,"width",(0,l.last)(r));if(Tb(n))return r.concat(p(yb({},t,{x:u,width:o}),n));{const i=e(n.view);return r.push(yb({y:t.y,x:u,height:a(i),width:o},i)),r}}),[]);return{x:t.x,y:t.y,width:hb(u),height:bb(u),items:u}},u=(t,r)=>{const i=r.items.reduce(((r,i,o)=>{const s=Tb(i)?n(i.layout):e(i.view),u=t.width,c=a(s),d=Eb(o)?t.y:(0,l.last)(r).y+((0,l.last)(r).height||c);if(Tb(i))return r.concat(p(yb({},t,{y:d,width:u}),i));{const n=e(i.view);return r.push(yb({},n,{y:d,x:t.x,height:c,width:u,minWidth:(0,l.is)(Number,n.minWidth)?mb(n.minWidth,n.minWidth,u):void 0,maxWidth:(0,l.is)(Number,n.maxWidth)?mb(n.maxWidth,n.maxWidth,u):void 0})),r}}),[]);return{x:t.x,y:t.y,width:Ob(i),height:vb(i),items:i}},c=(t,r)=>{const n=(e,t,r,n)=>Eb(r)?e.y:(0,l.last)(t).y+((0,l.last)(t).height||n),i=(t,r,i,o)=>{const s=e(i),l=t.width,u=a(s),c=n(t,r,o,u);return yb({},s,{x:t.x,y:c,width:l,height:u})},o=(e,t)=>{const r=t.reduce(((t,r,a)=>{if("string"==typeof r)t.push(i(e,t,r,a));else if("object"==typeof r){const o=Math.max(Math.round(e.width/2),1),s=Pb(e.width,[o,o]),u=yb({},e,{width:s[0]}),c=yb({},e,{x:e.x+s[0],width:s[1]}),p=(0,l.has)("left",r)&&i(u,t,r.left,a),d=(0,l.has)("right",r)&&i(c,t,r.right,a),y=(0,l.propOr)(0,"height"),f=Math.max(y(p),y(d));t.push(yb({},e,{y:n(e,t,a,f),height:f,items:(0,l.filter)(l.identity,[p,d])}))}return t}),[]);return yb({},e,{height:vb(r),items:r})},s=o(t,(0,l.propOr)([],"top",r)),u=Math.round(.66*t.width),c=(0,l.isEmpty)(s)?t.y:t.y+s.height,p=o(yb({},t,{y:c,width:u}),(0,l.propOr)([],"center",r)),d=o({x:t.x+u,y:c,width:t.width-u},(0,l.propOr)([],"right",r)),y=s.height+Math.max(p.height,d.height),f=(0,l.pipe)((0,l.prop)("items"),l.length,(0,l.equals)(0));return yb({},t,{height:y,items:(0,l.reject)(f,[s,p,d])})},p=(e,t)=>{const r=yb({},t,{items:(0,l.reject)(_b,t.items)});switch(r.layout){case"scroll":return o(e,r);case"hbox":return s(e,r);case"vbox":return u(e,r);default:return null}},d=(0,l.propEq)("layout","profile",t),y={x:0,y:0,width:r.columns},f=d?c(y,t):p(y,t);return Nb(f)},wb=(e,t)=>(e||[]).filter((e=>t.some((t=>t.id===e.id)))),Ib=[Ye.FilteredEntitiesViewFacet,Ye.ActivitiesViewFacet,Ye.ProfileStatsFacet,Ye.FilteredSavedSearchesFacet],Ub=(e,t)=>e.map((e=>{let{height:r=0,minHeight:n=0}=e,i=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,["height","minHeight"]);const a=t.find((e=>e.id===i.id)),o=Ib.includes(a.component)?8:4;return yb({},i,{height:Math.max(r,o),minHeight:Math.max(n,o)})}));function Cb(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Db(e,t,r[t])}))}return e}function Db(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const jb={BarChart:Be.BAR,BarChartGrouped:Be.BAR,BarChartHorizontal:Be.BAR,LineChart:Be.LINE,Map:Be.MAP,Pie:Be.PIE},Lb=(e,t)=>$t(e)?kt(e,t):e,kb=e=>{if(!e)return;const t=Array.isArray(e)?e[0]:e,{chartId:r,geoIdName:n,showLegend:i}=t,a=jb[r];return Cb({},a?{chartType:a}:{},{showLegend:i,isHorizontal:"BarChartHorizontal"===r||void 0,geoIdName:n})},Fb=e=>{if(!e)return;const t=Array.isArray(e)?e[0]:e,{findShared:r}=t;return Cb({findPublic:r},function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(t,["findShared"]))},Mb=(e,t,r)=>{const n=(e=>e&&ie(e).map((e=>{const{type:t,value:r}=e;return Cb({},e,{value:[an,on,tn.HAS_ALL].includes(t)&&"string"==typeof r?r.split(","):r})})).map((e=>{let{type:t,attribute:r,value:n}=e;return{filter:ln(t),fieldName:r,values:n?ie(n):void 0}})))(e);return t&&$t(t)||!r?n:(n||[]).concat((i=r,{filter:tn.EQUALS,fieldName:"type",values:[i]}));var i},xb=["https://reltio-ui-files.s3.amazonaws.com/map_resources/new_dashboard/world.countries.json","https://reltio-ui-files.s3.amazonaws.com/map_resources/new_dashboard/usa_prefix_latlng.topo.json","https://reltio-ui-files.s3.amazonaws.com/map_resources/new_dashboard/us-10m.json","https://reltio-ui-files.s3.amazonaws.com/map_resources/new_dashboard/zips-us-topo.json"],$b={"com.reltio.plugins.dashboard.BarChartView":e=>{let{id:t,entity:r,attribute:n,caption:i,filter:a,count:o,orderType:s,canRead:l}=e;return{id:t,count:o,canRead:l,orderType:s,attributeUri:Lb(n,r),filters:Mb(a,n,r),chartType:Be.BAR,component:Ye.DashboardFacet,title:i}},"com.reltio.plugins.dashboard.BubbleChartView":e=>{let{id:t,entity:r,attribute:n,caption:i,filter:a,count:o,orderType:s,canRead:l}=e;return{id:t,count:o,canRead:l,orderType:s,attributeUri:Lb(n,r),filters:Mb(a,n,r),chartType:Be.BUBBLE,component:Ye.DashboardFacet,title:i}},"com.reltio.plugins.ui.CustomActionView":e=>{let{id:t,caption:r,canRead:n,url:i}=e;return{id:t,url:i,canRead:n,title:r,component:Ye.CustomActionViewFacet}},"com.reltio.plugins.dashboard.FacetChartView":e=>{let{id:t,firstDimension:r,useEntityType:n,caption:i,filter:a,count:o,orderType:s,options:l,canRead:u}=e;const c=ie(a).find((e=>"type"===(null==e?void 0:e.attribute))),p=n||(null==c?void 0:c.value);return Cb({id:t,count:o,canRead:u,orderType:s,attributeUri:Lb(r,p),filters:Mb(a,r,p),component:Ye.DashboardFacet,title:i,showOthers:!0},kb(l))},"com.reltio.plugins.dashboard.MapView":e=>{let{id:t,entity:r,attribute:n,caption:i,filter:a,count:o,orderType:s,mapType:l,canRead:u}=e;return{id:t,count:o,canRead:u,orderType:s,attributeUri:Lb(n,r),filters:Mb(a,n,r),chartType:Be.MAP,component:Ye.DashboardFacet,title:i,geoUrl:xb[l||0],projection:"geoMercator"}},"com.reltio.plugins.dashboard.SimpleMapView":e=>{let{id:t,entity:r,attribute:n,caption:i,filter:a,count:o,map:s,canRead:l,options:u}=e;return Cb({id:t,count:o,canRead:l,attributeUri:Lb(n,r),filters:Mb(a,n,r),component:Ye.DashboardFacet,title:i,geoUrl:s,chartType:Be.MAP,projection:"geoMercator"},kb(u))},"com.reltio.plugins.dashboard.ProfileStatsView":e=>{let{id:t,canRead:r,caption:n}=e;return{id:t,canRead:r,component:Ye.ProfileStatsFacet,title:n}},"com.reltio.plugins.dashboard.FilteredSavedSearchesView":e=>{let{id:t,caption:r,max:n,options:i,canRead:a}=e;return{id:t,canRead:a,options:Fb(i),component:Ye.FilteredSavedSearchesFacet,title:r,max:n}},"com.reltio.plugins.dashboard.FilteredEntitiesView":e=>{let{id:t,caption:r,filter:n,max:i,entity:a,canRead:o}=e;return{id:t,canRead:o,filters:Mb(n,null,a),component:Ye.FilteredEntitiesViewFacet,title:r,max:i}},"com.reltio.plugins.dashboard.MatchedEntitiesView":e=>{let{id:t,caption:r,max:n,canRead:i}=e;return{id:t,canRead:i,filters:[{filter:tn.GTE,fieldName:"matches",values:["1"]}],component:Ye.FilteredEntitiesViewFacet,title:r,max:n}},"com.reltio.plugins.dashboard.EntitiesByTypeView":e=>{let{id:t,caption:r,orderType:n="reversedCount",inheritChildren:i,hideEmpty:a,canRead:o}=e;return{id:t,canRead:o,component:Ye.EntitiesByTypeViewFacet,orderType:n,inheritChildren:i,hideEmpty:a,title:r}},"com.reltio.plugins.dashboard.EntitiesByTagView":e=>{let{id:t,caption:r,orderType:n,canRead:i}=e;return{id:t,canRead:i,orderType:n,title:r,chartType:Be.CLOUD,component:Ye.DashboardFacet,attributeUri:"tags"}},"com.reltio.plugins.dashboard.EntitiesByRoleView":e=>{let{id:t,caption:r,orderType:n,canRead:i}=e;return{id:t,canRead:i,orderType:n,title:r,chartType:Be.TREE,component:Ye.DashboardFacet,attributeUri:"roles"}},"com.reltio.plugins.inbox.NotificationInboxView":e=>{let{id:t,canRead:r,caption:n}=e;return{id:t,canRead:r,component:Ye.NotificationInboxFacet,title:n||hn().text("Notifications")}},"com.reltio.plugins.activities.ActivitiesView":e=>{let{id:t,canRead:r,caption:n}=e;return{id:t,canRead:r,component:Ye.ActivitiesViewFacet,title:n||hn().text("Activity log")}}},Vb=e=>({id:e,height:10}),Gb=(0,l.pipe)((0,l.map)((e=>{const t=$b[null==e?void 0:e.class];return t?t(e):null})),(0,l.reject)(l.isNil)),Wb=e=>{if("0.1"===e.version){const t=Gb(e.views),r=Sb(Vb,e.layout,{columns:4});return{id:e.id,margin:0,layout:wb(r,t),views:t}}return e},Bb=e=>(0,l.cond)([[(0,l.propEq)("layout","profile"),(0,l.pipe)((0,l.pick)(["center","right","top"]),l.values,l.flatten,(0,l.map)((0,l.when)((0,l.is)(Object),l.values)),l.flatten)],[(0,l.has)("view"),(0,l.pipe)((0,l.prop)("view"),ie)],[(0,l.prop)("items"),(0,l.pipe)((0,l.prop)("items"),(0,l.map)((e=>Bb(e))),l.flatten)],[l.T,(0,l.always)([])]])(e);function Yb(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){qb(e,t,r[t])}))}return e}function qb(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Hb=Yb({},qe,{OldMap:"com.reltio.plugins.entity.EntityMapView",OldTree:"com.reltio.plugins.entity.TreeView"}),Qb=e=>e,Kb={[Hb.Attributes]:Qb,[Hb.HierarchyTree]:Qb,[Hb.HierarchyPaths]:Qb,[Hb.RelationsTable]:Qb,[Hb.Relations]:e=>Yb({},(0,l.omit)(["recordClass"],e),{isComplex:"com.reltio.plugins.entity.relations.ComplexRelationRecord"===e.recordClass}),[Hb.SingleAttribute]:Qb,[Hb.Custom]:Qb,[Hb.AttributeTable]:Qb,[Hb.Map]:Qb,[Hb.OldTree]:e=>Yb({},e,{class:qe.HierarchyTree}),[Hb.OldMap]:e=>Yb({},e,{class:qe.Map}),[Hb.ImageAttribute]:Qb,[Hb.PotentialMatches]:Qb},Jb=(0,l.pipe)((0,l.map)((e=>{const t=Kb[null==e?void 0:e.class];return t?t(e):null})),(0,l.reject)(l.isNil)),Xb=(0,l.curry)(((e,t)=>(0,l.pipe)((0,l.defaultTo)([]),(0,l.find)((0,l.propEq)("id",t)),(0,l.prop)("class"))(e)===qe.Map?{id:t,height:5,minHeight:5}:{id:t,autosizing:!0})),zb=(e,t)=>(t||[]).map((t=>Yb({},t,Xb(e,t.id)))),Zb=e=>{const t=(0,l.pick)(["id","workflow","maxWidth","sidePanelViews","profileBand","views"],e);if("2.0"===e.version)return Yb({},t,{layout:zb(t.views,e.newLayout)});if("0.1"===e.version){const r=Jb(e.views),n=Sb(Xb(r),e.layout,{columns:3});return Yb({},t,{layout:wb(n,r),views:r})}return e},eO=(e,t)=>e.class===t||e["react-class"]===t,tO=e=>{const{includeUris:t,excludeUris:r}=(e=>e.reduce(((e,t)=>{if(eO(t,qe.Attributes))if(t.includeUris)e.includeUris.push(...t.includeUris);else{const r=t.excludeUris||[];e.excludeUris=e.excludeUris?(0,l.intersection)(e.excludeUris,r):r}return eO(t,qe.SingleAttribute)&&e.includeUris.push(t.attributeUri),e}),{includeUris:[],excludeUris:null}))(e);return e=>{let{uri:n}=e;return r&&!r.some(Ct(n))||t.some(Ct(n))}},rO=(e,t)=>e.filter((e=>t.some((t=>eO(e,t))))).map((e=>{let{id:t}=e;return t})),nO=(e,t)=>{let{extensions:r}=e;return(r||[]).find((e=>e.id===t))},iO=(e,t)=>e.flatMap((e=>{let{extensions:r=[]}=e;return r.filter((e=>{let{point:r}=e;return r===t}))})),aO=e=>(0,l.pipe)((0,l.map)((e=>nO(e,"com.reltio.plugins.entity.ProfileBand"))),(0,l.reject)(l.isNil),l.head)(e);function oO(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){sO(e,t,r[t])}))}return e}function sO(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const lO=(0,l.curry)(((e,t)=>Bb(t).map((t=>(0,l.pipe)((0,l.map)((e=>nO(e,t))),(0,l.reject)(l.isNil),l.head)(e))).filter(l.identity))),uO=(0,l.either)((0,l.propEq)("label","D&B Connector"),(0,l.propEq)("label","D&B Connector")),cO=(0,l.propEq)("class",qe.Custom),pO=e=>{let{extensions:t=[]}=e;return t.filter((e=>"com.reltio.plugins.ui.perspective"===e.point&&e["entity-type"]))},dO=(e,t)=>{const r=(0,l.propOr)("0.1","version",t),n=t["entity-type"];let i;if("2.0"===r&&t.newLayout){const{newLayout:r}=t,a=zb(t.views,r);return i=(0,l.when)((0,l.pipe)(l.head,(0,l.is)(String)),(0,l.pipe)((0,l.map)((t=>(0,l.pipe)((0,l.map)((e=>nO(e,t))),(0,l.reject)(l.isNil),l.head)(e))),(0,l.reject)(l.isNil),(e=>[{id:"common",views:e}])))(t.sidePanelViews),(0,l.pipe)((0,l.pick)(["views","profileBand","workflow"]),(0,l.mergeRight)({entityType:n,layout:a,sidePanelViews:i}),(0,l.reject)(l.isNil))(t)}const a=lO(e,t.layout);i=((e,t)=>{if(t.side){var r;const n=(0,l.pipe)((0,l.chain)((e=>nO(e,t.side))),(0,l.reject)(l.isNil),l.head,(0,l.prop)("layout"))(e),[i,a]=(0,l.partition)(uO,null!==(r=null==n?void 0:n.items)&&void 0!==r?r:[]),o=(0,l.pipe)(lO(e),(0,l.filter)(cO))(oO({},n,{items:i})),s=[{id:"common",views:lO(e,oO({},n,{items:a}))}];return o.length>0&&s.push({id:"D&B",views:o}),s}})(e,t);const o=(e=>(0,l.pipe)((0,l.chain)((e=>((e,t)=>{let{extensions:r}=e;return(r||[]).filter((e=>"com.reltio.plugins.entity.side.WorkflowsView"===e.class))})(e))),l.head,(0,l.unless)(l.isNil,(0,l.pick)(["showClosedTasks","assignee","processTypes"])))(e))(e),s=Zb(oO({},t,{views:a,version:"0.1"})),u=(0,l.pipe)(aO,(0,l.defaultTo)({}),(0,l.pick)(["cloneAction","showEntityId"]))(e);return(0,l.reject)(l.isNil,{entityType:n,views:s.views,layout:s.layout,sidePanelViews:i,profileBand:u,workflow:o})},yO=(e,t)=>{if("scroll"===t.layout.layout){const r=lO(e,t.layout),n=Wb(oO({},t,{views:r,version:"0.1"}));return{class:Qe.Dashboard,id:t.id,views:n.views,layout:n.layout}}return{class:Qe.Dashboard,views:t.views,layout:t.layout,id:t.id}},fO=(e,t)=>{const r=lO(e,t.layout)[0];return{class:Qe.DQDashboard,id:t.id,viewsByDataLevel:r.viewsByDataLevel,layoutsByDataLevel:r.layoutsByDataLevel}},TO=(e,t)=>{const r=lO(e,t.layout)[0];return{class:Qe.RelationshipSearch,id:t.id,options:r.options,consoleExportApp:r.consoleExportApp}},EO=(e,t)=>{const r=lO(e,t.layout)[0];return{class:Qe.Interactions,id:t.id,sortOrder:r.sortOrder,sortColumn:r.sortColumn,max:r.max,attributes:r.attributes,caption:r.caption}},mO=(e,t)=>{const r=lO(e,t.layout)[0];return{class:Qe.Relationships,id:t.id,canCreate:r.canCreate,canUpdate:r.canUpdate,canRead:r.canRead,canDelete:r.canDelete,profileBand:r.profileBand}},hO=(e,t)=>{const r=lO(e,t.layout)[0];return{class:Qe.Sources,id:t.id,canCreate:r.canCreate,canUpdate:r.canUpdate,canRead:r.canRead,canDelete:r.canDelete,profileBand:r.profileBand}},bO=(e,t)=>{const r=lO(e,t.layout)[0];return{class:Qe.PotentialMatches,id:t.id,availableTabs:r.availableTabs,allowMergeAll:r.allowMergeAll,matchActions:r.matchActions}},OO=(e,t)=>{const r=lO(e,t.layout)[0],n=r.potentialMatchesReview||{processType:(e=>{const[t]=iO(e,"com.reltio.plugins.search.toolbar.component").filter((e=>"com.reltio.plugins.ui.CustomActionButtonView"===e.class&&e.processType));return null==t?void 0:t.processType})(e)};return{class:Qe.Search,id:t.id,consoleExportApp:r.consoleExportApp,mapSearchEnabled:r.mapSearchEnabled,canRead:r.canRead,"bulk-update":r["bulk-update"],potentialMatchesReview:n,options:r.options,"entity-types":r["entity-types"],tabs:r.tabs}},vO=(e,t)=>({class:Qe.Graph,id:t.id}),gO=(e,t)=>{const r=lO(e,t.layout)[0];return{class:Qe.ProfileActivityLog,id:t.id,exportTypes:r.exportTypes,caption:r.caption}},_O=e=>t=>!!(0,l.intersection)(e,t).length,AO=(0,l.cond)([[_O(["com.reltio.plugins.dashboard.BarChartView","com.reltio.plugins.dashboard.BubbleChartView","com.reltio.plugins.ui.CustomActionView","com.reltio.plugins.dashboard.FacetChartView","com.reltio.plugins.dashboard.MapView","com.reltio.plugins.dashboard.SimpleMapView","com.reltio.plugins.dashboard.ProfileStatsView","com.reltio.plugins.dashboard.FilteredSavedSearchesView","com.reltio.plugins.dashboard.FilteredEntitiesView","com.reltio.plugins.dashboard.EntitiesByTypeView","com.reltio.plugins.dashboard.EntitiesByTagView","com.reltio.plugins.dashboard.EntitiesByRoleView","com.reltio.plugins.inbox.NotificationInboxView","com.reltio.plugins.activities.ActivitiesView","com.reltio.plugins.react.ReactDashboardView"]),()=>yO],[_O(["com.reltio.plugins.react.ReactDQDashboardView"]),()=>fO],[_O(["com.reltio.plugins.graph.GraphView"]),()=>vO],[_O(["com.reltio.plugins.react.ReactRelationshipSearchView"]),()=>TO],[_O(["com.reltio.plugins.react.ReactInteractionsView","com.reltio.plugins.interactions.InteractionsView"]),()=>EO],[_O(["com.reltio.plugins.react.ReactRelationshipsView","com.reltio.plugins.relationships.RelationshipsView"]),()=>mO],[_O(["com.reltio.plugins.sources.SourcesView","com.reltio.plugins.react.ReactSourcesView"]),()=>hO],[_O(["com.reltio.plugins.sameas.SameAsView","com.reltio.plugins.react.ReactPotentialMatchesView"]),()=>bO],[_O(["com.reltio.plugins.react.ReactSearchView","com.reltio.plugins.search.dev.SearchView"]),()=>OO],[_O(["com.reltio.plugins.activities.ProfileActivitiesView","com.reltio.plugins.react.ReactProfileActivityLog"]),()=>gO],[l.T,()=>(0,l.always)(void 0)]]),NO=(e,t)=>{const{class:r}=e;if("com.reltio.plugins.entity.ProfileAction"===r)return((e,t)=>{const r=(0,l.pipe)((0,l.chain)(pO),(0,l.map)((t=>dO(e,t))),(0,l.indexBy)((0,l.prop)("entityType")),(0,l.map)((0,l.pick)(["layout","views","sidePanelViews","profileBand","workflow"])))(e);return{class:Qe.Profile,id:t.id,entityTypes:r}})(t,e);if("com.reltio.plugins.ui.actions.CustomAction"===r)return{id:e.id,type:Ke.CustomAction,config:(0,l.omit)(["class","id","point","parent","type"],e)};if("com.reltio.plugins.ui.actions.ConsoleAppAction"===r)return{id:e.id,type:Ke.ConsoleAppAction,config:(0,l.omit)(["class","id","point","parent","type"],e)};const n=(e=>{if(e.perspective)return e.perspective})(e);if((0,l.isNil)(n))return;if("com.reltio.plugins.dashboard.DashboardPerspective"===n||"com.reltio.plugins.newDashboard.NewDashboardPerspective"===n){const e=(0,l.find)((0,l.propEq)("id","com.reltio.plugins.newDashboard"))(t);if(e)return(0,l.pipe)((e=>nO(e,"com.reltio.plugins.newDashboard.NewDashboardView")),(0,l.pick)(["id","views","layout"]),(0,l.assoc)("class",Qe.Dashboard))(e)}const i=(0,l.pipe)((0,l.map)((e=>nO(e,n))),(0,l.reject)(l.isNil),l.head)(t);if((0,l.isNil)(i))return;if(i.entityPerspectiveId)return((e,t,r)=>{const n=dO(e,r),i=(0,l.pipe)((0,l.propOr)([],"entity-types"),(0,l.map)((e=>[e,n])),l.fromPairs)(t);return{class:Qe.NestedProfile,id:t.id,entityTypes:i}})(t,e,i);const a=Bb(i.layout),o=(0,l.pipe)((0,l.chain)((e=>{let{extensions:t}=e;return(t||[]).filter((e=>a.includes(e.id)))})),(0,l.pluck)("class"),(0,l.reject)(l.isNil))(t);return AO(o)(t,i)};function PO(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){RO(e,t,r[t])}))}return e}function RO(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const SO=e=>{let{extensions:t}=e;return(t||[]).filter((e=>"com.reltio.plugins.ui.action"===e.point&&"com.reltio.plugins.ui.first_level_action"===e.type&&!e.parent))},wO="https://reltio-ui-files.s3.amazonaws.com/new-ui/";var IO;!function(e){e[e.DashboardGroup=0]="DashboardGroup",e[e.ProfileGroup=1]="ProfileGroup",e[e.SearchGroup=2]="SearchGroup"}(IO||(IO={}));const UO={[Qe.DQDashboard]:`${wO}DqDashboard.svg`,[Qe.Dashboard]:`${wO}Dashboard.svg`,[Qe.Graph]:`${wO}Graph.svg`,[Qe.RelationshipSearch]:`${wO}GraphSearch.svg`,[Qe.Interactions]:`${wO}Interactions.svg`,[Qe.PotentialMatches]:`${wO}PotentialMatches.svg`,[Qe.Profile]:`${wO}Profile.svg`,[Qe.NestedProfile]:`${wO}Profile.svg`,[Qe.ProfileActivityLog]:`${wO}ActivityLog.svg`,[Qe.Relationships]:`${wO}Relationships.svg`,[Qe.Sources]:`${wO}Crosswalk.svg`,[Qe.Search]:`${wO}Search.svg`,[IO.DashboardGroup]:`${wO}DashboardGroup.svg`,[IO.ProfileGroup]:`${wO}ProfileGroup.svg`,[IO.SearchGroup]:`${wO}SearchGroup.svg`,DEFAULT:`${wO}Default.svg`},CO=e=>UO[null==e?void 0:e.class]||UO.DEFAULT,DO=(0,l.pipe)((0,l.pluck)("screen"),(0,l.filter)((0,l.anyPass)([(0,l.propEq)("class",Qe.NestedProfile)])),(0,l.groupBy)((0,l.prop)("class")),(0,l.map)((e=>e.map(((e,t)=>PO({},e,{nestedRoute:`${t+1}`})))))),jO=(e,t)=>{var r;return(null===(r=e[t.class])||void 0===r?void 0:r.find((0,l.propEq)("id",t.id)))||t},LO=e=>"com.reltio.plugins.entity.ProfileFirstAction"===e.class?UO[IO.ProfileGroup]:null,kO=e=>(0,l.cond)([[(0,l.any)((e=>{let{icon:t}=e;return t===UO[Qe.Dashboard]||t===UO[Qe.DQDashboard]})),(0,l.always)(UO[IO.DashboardGroup])],[(0,l.any)((e=>{let{icon:t}=e;return t===UO[Qe.Search]||t===UO[Qe.RelationshipSearch]})),(0,l.always)(UO[IO.SearchGroup])],[l.T,()=>null]])(e),FO=e=>(0,l.pipe)((0,l.chain)(SO),(0,l.sortBy)((0,l.propOr)(1/0,"position")))(e).map((t=>{const r=((e,t)=>{const r=(0,l.pipe)((0,l.chain)((t=>((e,t)=>{let{extensions:r}=e;return(r||[]).filter((e=>"com.reltio.plugins.ui.action"===e.point&&e.parent===t))})(t,e.id))),(0,l.sortBy)((0,l.propOr)(1/0,"position")),(0,l.map)((e=>PO({},e,{entityTypes:e["entity-types"],screen:NO(e,t)}))),(0,l.filter)((e=>e.screen)))(t),n=DO(r);return(0,l.map)((e=>{let{label:t,screen:r,canRead:i,entityTypes:a}=e;return{label:t,icon:CO(r),screen:jO(n,r),canRead:i,entityTypes:a}}))(r)})(t,e),n=NO(t,e);return{label:t.label,icon:LO(t)||kO(r)||CO(n),menu:r.length?{type:"side",items:r}:void 0,screen:n,canRead:t.canRead}}));function MO(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const xO=e=>{let{extensions:t}=e;return(t||[]).filter((0,l.propEq)("id","com.reltio.plugins.pivoting.PivotingSettings"))},$O=e=>({id:e,height:10}),VO=e=>{const t=(e=>(0,l.chain)((e=>{let{extensions:t}=e;return(t||[]).filter((e=>"com.reltio.plugins.ui.perspective"===e.point&&e["attribute-types"]))}))(e))(e),r=(e=>(0,l.pipe)((0,l.chain)(xO),(0,l.pluck)("pivotingAttributes"),l.flatten)(e))(e);return((e,t)=>{const r=(e=>(e||[]).find((0,l.propEq)("attribute-types","*")))(t);return(0,l.pipe)((0,l.reduce)(((e,n)=>{const i=((e,t)=>e.find((e=>Array.isArray(e["attribute-types"])&&e["attribute-types"].includes(t.uri))))(t,n)||r;return null!=i&&i.id&&(e[i.id]||(e[i.id]={extension:i,attributeTypes:[]}),e[i.id].attributeTypes.push(n)),e}),{}),l.values)(e)})(r,t).map((t=>{let{extension:r,attributeTypes:n}=t;const i=((e,t)=>{if("scroll"===t.layout.layout){const r=Gb(((e,t)=>{const r=Bb(t);return(0,l.pipe)((0,l.chain)((e=>{let{extensions:t}=e;return(t||[]).filter((e=>r.includes(e.id)))})),(0,l.filter)((e=>{let{views:t}=e;return t})),(0,l.map)((e=>{let{views:t,id:r}=e;return function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){MO(e,t,r[t])}))}return e}({id:r},t[0])})),(0,l.uniqBy)((0,l.prop)("id")))(e)})(e,t.layout)),n=Sb($O,t.layout,{columns:4});return{views:r,layout:wb(n,r)}}return t})(e,r);return{"attribute-types":n,views:i.views,layout:i.layout}}))};function GO(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const WO=(0,l.curry)(((e,t)=>(0,l.pipe)((e=>((e,t)=>(e||[]).find((e=>"com.reltio.plugins.ui.Activator"===e.activator)))(e)),(0,l.prop)(e))(t))),BO=e=>"com.reltio.plugins.dashboard.DashboardPerspective"===e,YO=e=>(0,l.pipe)((e=>iO(e,"com.reltio.plugins.ui.custom_script")),(0,l.reject)(E),(0,l.map)((e=>{let{action:t}=e;return function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){GO(e,t,r[t])}))}return e}({},t,function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,["action"]))})))(e),qO=(0,l.unless)((e=>!!e&&(e.startsWith("http:")||e.startsWith("https:"))),(0,l.always)(null)),HO=(0,l.pipe)(WO("top-logo"),qO),QO=(0,l.prop)("showLookupCode"),KO=e=>{var t;const r=(e=>(0,l.pipe)((0,l.map)((e=>nO(e,"com.reltio.plugins.entity.EntityRequestSettings"))),(0,l.reject)(l.isNil),l.head,(0,l.prop)("defaultMaxValues"))(e))(e),n=(e=>(0,l.pipe)((0,l.map)((e=>nO(e,"com.reltio.plugins.imageattribute.fieldsorder"))),(0,l.reject)(l.isNil),l.head,(0,l.omit)(["point","id"]))(e))(e),i=(e=>(0,l.pipe)((0,l.map)((e=>nO(e,"com.reltio.plugins.ui.LookupAutocomplete"))),(0,l.reject)(l.isNil),l.head,(0,l.defaultTo)({}),(0,l.pick)(["includeAttributes","excludeAttributes"]))(e))(e),a=(e=>(0,l.pipe)((0,l.map)((e=>nO(e,"com.reltio.plugins.entity.ValidationServiceLevels"))),(0,l.reject)(l.isNil),l.head,(0,l.prop)("levels"))(e))(e),o=(e=>(0,l.pipe)((0,l.map)((e=>nO(e,"com.reltio.plugins.entity.Validation"))),(0,l.reject)(l.isNil),l.head,(0,l.prop)("validateReadMode"))(e))(e),s=(e=>(0,l.pipe)((0,l.map)((e=>nO(e,"com.reltio.plugins.ui.LocalizationServer"))),(0,l.reject)(l.isNil),l.head,(0,l.prop)("configuration"))(e))(e),u=(e=>(0,l.pipe)((0,l.map)((e=>nO(e,"com.reltio.plugins.ui.AttributePresentation"))),(0,l.reject)(l.isNil),l.head,(0,l.prop)("configuration"),(0,l.defaultTo)({}),(0,l.filter)((0,l.propEq)("format","none")),(0,l.map)((0,l.always)({thousandSeparator:""})))(e))(e),c=(e=>(0,l.pipe)((0,l.map)((e=>nO(e,"com.reltio.plugins.workflow.configuration"))),(0,l.reject)(l.isNil),l.head,(0,l.defaultTo)({}),(e=>{let{workflowPath:t,enabled:r}=e;return{enabled:r,path:t}}))(e))(e),p=(e=>(0,l.pipe)(WO("default-perspective"),(0,l.ifElse)(BO,(0,l.always)("dashboard"),(0,l.always)("search")))(e))(e),d=(e=>(0,l.pipe)((0,l.map)((e=>nO(e,"com.reltio.plugins.ui.AttributesSorting"))),(0,l.reject)(l.isNil),l.head,(0,l.prop)("strategy"))(e))(e),y=YO(e),f=(e=>WO("checkUser",e))(e),T=(e=>WO("checkIdle",e))(e),E=(e=>(0,l.pipe)((0,l.map)((e=>nO(e,"com.reltio.plugins.ui.configuration.FeatureManagement"))),(0,l.reject)(l.isNil),l.head,(0,l.prop)("preferNewUI"),l.not)(e))(e),m=(e=>(0,l.pipe)((0,l.map)((e=>nO(e,"com.reltio.plugins.ui.LookupCodeVisibility"))),(0,l.reject)(l.isNil),l.head,(0,l.defaultTo)({}))(e))(e),h=void 0===(b=QO(m))||b;var b;const O=null===(t=aO(e))||void 0===t?void 0:t.showEntityId,v=(e=>WO("preview",e))(e),g=HO(e),_=(e=>WO("topBackgroundColor",e))(e),A=(e=>(0,l.pipe)((0,l.map)((e=>nO(e,"com.reltio.framework.util.DateMask"))),(0,l.reject)(l.isNil),l.head,(0,l.prop)("configuration"),(0,l.defaultTo)({}),(e=>{let{dateMask:t,dateTimeMask:r}=e;return{dateMask:t,dateTimeMask:r}}),(0,l.reject)(l.isNil))(e))(e);return{i18n:s,entity:{requestSettings:{defaultMaxValues:r}},image:{attributeFieldsOrder:n},lookups:{autocomplete:i,showCode:h},validate:{levels:a,validateReadMode:o},masks:0===Object.keys(A).length?void 0:A,attributePresentations:u,attributesSorting:d,workflow:c,defaultRoute:p,customScripts:y,checkUser:f,checkIdle:T,showSwitchToClassic:E,showEntityId:O,preview:v,logo:g,headerColor:_}},JO=e=>({layout:FO(e),pivoting:VO(e),properties:KO(e)});var XO=r(58697),zO=r.n(XO);function ZO(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){ev(e,t,r[t])}))}return e}function ev(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const tv=e=>{let{views:t,layout:r}=e;const n={};let i=!1;const a=t.map((e=>{if(n[e.id]){const t=`${e.id}_${zO()()}`;return n[e.id].push(t),i=!0,ZO({},e,{id:t})}return n[e.id]=[e.id],e})),o={},s=r&&i?r.map((e=>null==o[e.id]?(o[e.id]=0,e):(o[e.id]++,ZO({},e,{id:n[e.id][o[e.id]]})))):r;return i?{views:a,layout:s}:{views:t,layout:r}};function rv(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){nv(e,t,r[t])}))}return e}function nv(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}let iv={};const av=(e,t,r)=>{const n=`\n importScripts("${e}");\n importScripts("${r.action.files.join('","')}");\n postMessage({action:'loaded'});`;let i;const a=z(`${r.id}: ${r.action.files.join('","')}`);if(E(iv[a])){try{const e=window.webkitURL||window.URL;i=new Worker(e.createObjectURL(new Blob([n],{type:"application/javascript"})))}catch(e){i=new Worker("data:application/javascript,"+encodeURIComponent(n))}iv=rv({},iv,{[a]:rv({},iv[a]||{},{worker:i})})}else i=iv[a].worker,iv[a].innerText&&t({task:{action:Ze.SET_HTML,params:{html:iv[a].innerText}},worker:i,config:r}),i.removeEventListener("message",iv[a].onWorkerMessage);return i&&(iv[a].onWorkerMessage=e=>{if("loaded"!==e.data.action){const n=JSON.parse(e.data);t({task:n,worker:i,config:r}),"setHtml"!==n.action||n.params.id||(iv[a].innerText=n.params.html)}},i.addEventListener("message",iv[a].onWorkerMessage)),i},ov=(0,l.curry)(((e,t)=>!e||!e.availableEntityTypes||!t||e.availableEntityTypes.includes(t))),sv=(0,l.flip)(ov),lv=(0,l.curry)(((e,t)=>{if(null==t)return"";if("string"!=typeof t&&(t=String(t)),e&&t){const{thousandSeparator:r="",decimalSeparator:n=".",prefix:i="",suffix:a=""}=e,[o,s]=t.split(".");t=i+o.replace(/\B(?=(\d{3})+(?!\d))/g,r)+(s?n+s:"")+a}else!e&&t&&(t=hn().number(t));return t})),uv=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3;return(0,l.is)(Number,e)?e>t?hn().number(e,"0,0.0a").toUpperCase():hn().number(e,"0,0"):""},cv=(0,l.ifElse)((0,l.has)("filename"),(0,l.prop)("filename"),(0,l.pipe)((0,l.prop)("link"),(0,l.split)("/"),l.last));let pv=!0;const dv=e=>pv=e,yv=(e,t)=>e!==t&&t?pv&&e?`${t} (${e})`:t:e,fv=(e,t,r)=>(0,l.path)([t,r,"displayName"],e),Tv=(e,t,r)=>{const n=fv(e,t,r);return yv(r,n)},Ev=(0,l.curry)(((e,t,r)=>(0,l.hasPath)([t,r],e))),mv=(0,l.complement)(Ev),hv=e=>(0,l.pipe)((0,l.propOr)({},e),Object.entries,(0,l.map)((e=>{let[t,{displayName:r}]=e;return{lookupCode:t,value:r}}))),bv=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return(0,l.pipe)((0,l.reduce)(((e,t)=>t.reduce(((e,t)=>{let{type:r,codeValues:n}=t;return e[r]={type:r,codeValues:(0,l.uniq)([...(0,l.pathOr)([],[r,"codeValues"],e),...n])},e}),e)),{}),l.values)(t)},Ov=(0,l.curry)(((e,t)=>t.map((t=>{let{type:r,codeValues:n}=t;return{type:r,codeValues:n.filter(mv(e,r))}})).filter((e=>{let{codeValues:t}=e;return t.length>0})))),vv=(0,l.curry)(((e,t)=>{let{attributePresentations:r={},dataTypeDefinition:n={},dateMask:i,dateTimeMask:a}=e;const o=r[n.uri],s=i?q(i):"L",u=a?K(a):"L LTS";switch(n.type){case at.TYPE_NUMBER:case at.TYPE_FLOAT:case at.TYPE_DOUBLE:case at.TYPE_LONG:case at.TYPE_INT:case at.TYPE_COUNT:return t&&lv(o,t);case at.TYPE_BOOLEAN:case at.TYPE_BOOLEAN_RADIO:case at.TYPE_RDM_LOOKUPS_NOT_RESOLVED:return t=t,(0,l.isNil)(t)?t:ue(t)?hn().text("Yes"):hn().text("No");case at.TYPE_DATE:return(0,l.is)(Number,t)&&(t=A(Number(t)).getTime()),(t=t)&&(zu(t)?Zu(t):hn().date(t,s));case at.TYPE_ACTIVENESS_DATE:case at.TYPE_LOCAL_DATE:return(t=t)&&(zu(t)?Zu(t):hn().date(t,s));case at.TYPE_TIMESTAMP:return(t=t)&&(zu(t)?Zu(t):hn().date(isNaN(t)?t:Number(t),u));case at.TYPE_FILE:return(0,l.propOr)(null,"filename",t);case at.TYPE_SELECT:{const e=n.options.find((0,l.propEq)("value",t));return(0,l.propOr)(null,"label",e)}case at.TYPE_DOLLAR:return t=t,new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",minimumFractionDigits:0}).format(t);default:return(0,l.is)(Object,t)?yv((0,l.propOr)(null,"lookupCode",t),(0,l.propOr)(null,"value",t)):t}})),gv={palette:{primary:{main:"#0072CE",light:"#0072CE",dark:"#0072CE"},secondary:{main:"#0072CE"},error:{main:"#FF1744"},background:{paper:"#FFF",default:"#FAFAFA"},action:{hover:"rgba(0,0,0,0.04)",hoverOpacity:.04},text:{primary:"rgba(0,0,0,0.87)",secondary:"rgba(0,0,0,0.54)",disabled:"rgba(0,0,0,0.26)"},divider:"rgba(0,0,0,0.38)"},overrides:{MuiFilledInput:{root:{backgroundColor:"rgba(0, 0, 0, 0.03)","&:hover":{backgroundColor:"rgba(0, 0, 0, 0.03)"},"&.focused":{backgroundColor:"rgba(0, 0, 0, 0.03)"}}},MuiInputBase:{input:{"&::placeholder":{color:"currentColor !important"},"&::-ms-clear":{display:"none"}}}},tooltip:{borderRadius:"4px",backgroundColor:"rgba(0,0,0,0.54)"},inactiveBackground:"repeating-linear-gradient(45deg, #f5f5f5, #f5f5f5 14px, #e9e9e9 15px, #e9e9e9 16px)",inactiveSelectedBackground:"repeating-linear-gradient(45deg, #DBE9F4, #DBE9F4 14px, #CCDAE5 15px, #CCDAE5 16px)",inactiveSelectedHoverBackground:"repeating-linear-gradient(45deg, #D4E2ED, #D4E2ED 14px, #C6D4DF 15px, #C6D4DF 16px)",inactiveHoverBackground:"repeating-linear-gradient(45deg, #f2f2f2, #f2f2f2 14px, #e2e2e2 15px, #e2e2e2 16px)",transitions:{duration:{shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195}},inactive:{opacity:.7},basicView:{boxShadow:"0 2px 2px 0 rgba(0,0,0,0.14), 0 3px 1px -2px rgba(0,0,0,0.12), 0 1px 5px 0 rgba(0,0,0,0.2)",borderRadius:"3px",backgroundColor:"#FFFFFF"},suggested:"rgb(237, 246, 251)"};function _v(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Av=e=>(t,r)=>{const{timeout:n}=r,i=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(r,["timeout"]);if(AbortController&&n){const r=new AbortController,a=setTimeout((()=>r.abort()),n);return e(t,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){_v(e,t,r[t])}))}return e}({},i,{signal:r.signal})).finally((()=>{clearTimeout(a)}))}return e(t,i)},Nv=e=>{const t=e=>{switch(e){case 429:case 502:case 503:case 504:return 4;default:return 0}},r=e=>{const t=Math.random()+1;return new Promise((r=>{const n=Math.min(Math.round(1e3*Math.exp(e)*t),2e4);setTimeout(r,n)}))};return(n,i)=>{const a=function(){let o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return e(n,i).then((e=>{const n=t(e.status);return n>0&&o<n?r(o).then((()=>a(o+1))):e}))};return a()}},Pv=e=>(t,r)=>e(t,r).then((e=>e.ok?e:e.text().then((t=>{let r;try{r=JSON.parse(t)}catch(n){r={errorMessage:t,errorCode:e.status}}throw r})))),Rv=e=>{const{onRequest:t,onResponse:r,addRequestInterceptor:n,addResponseInterceptor:i,removeRequestInterceptor:a,removeResponseInterceptor:o}=(()=>{const e={onRequest:[],onResponse:[]};return{onRequest:t=>{const{url:r,options:n,abort:i}=t,a=e.onRequest.reduce(((e,t)=>(r,n)=>t({url:r,options:n,abort:i,next:e})),t.next);a(r,n)},onResponse:t=>{const{response:r,abort:n,url:i,options:a}=t,o=e.onResponse.reduce(((e,t)=>r=>{r instanceof Response?t({response:r,abort:n,next:e,url:i,options:a}):e(r)}),t.next);o(r)},addRequestInterceptor:t=>{e.onRequest.push(t)},addResponseInterceptor:t=>{e.onResponse.push(t)},removeRequestInterceptor:t=>{const r=e.onRequest.indexOf(t);e.onRequest.splice(r,1)},removeResponseInterceptor:t=>{const r=e.onResponse.indexOf(t);e.onResponse.splice(r,1)}}})(),s=(0,l.pipe)(Av,(e=>{let t=null;return r=>(n,i)=>{const a=()=>r(n,i),o=()=>{var e;return null===(e=t)||void 0===e?void 0:e.then(a)};return o()||a().then((r=>401===r.status?(t||(t=e().then((()=>{t=null}))),o()):r))}})(e),Nv,Pv);return{request:(e,n)=>{const i=s(fetch),a=r?(e,t)=>i(e,t).then((n=>new Promise(((i,a)=>{r({response:n,next:e=>{i(e)},abort:a,url:e,options:t})})))):i;return t?new Promise(((r,i)=>{t({url:e,options:n,next:(e,t)=>{r(a(e,t))},abort:i})})):a(e,n)},addRequestInterceptor:n,addResponseInterceptor:i,removeRequestInterceptor:a,removeResponseInterceptor:o}},Sv="__metadata",wv=(e=>{const t=[Sv,"draft"];return(0,l.lens)((0,l.pathOr)(null,t),(0,l.assocPath)(t))})(),Iv=(0,l.set)(wv),Uv=(0,l.view)(wv),Cv=Iv(yn.NEW),Dv=Iv(yn.REMOVED),jv=Iv(yn.EDITED),Lv=Iv(yn.IGNORED),kv=(0,l.pipe)(Uv,(0,l.equals)(yn.REMOVED)),Fv=(0,l.pipe)(Uv,(0,l.equals)(yn.NEW)),Mv=(0,l.pipe)(Uv,(0,l.equals)(yn.EDITED)),xv=(0,l.pipe)(Uv,(0,l.complement)(l.isNil)),$v=(0,l.pipe)(Uv,(0,l.equals)(yn.IGNORED)),Vv=(0,l.omit)([Sv]),Gv=(e,t)=>e===Sv?void 0:t;function Wv(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Bv=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(e(t))return r.concat(t);if(t&&t.children)for(const n of t.children){const i=Bv(e,n,r);if(i.length>0)return[t].concat(...i)}return[]},Yv=(e,t)=>Bv((0,l.propEq)("nodeId",t),e),qv=(e,t)=>Bv((0,l.pathEq)(["entity","uri"],t),e),Hv=(e,t)=>{const r=Yv(e,t);return r.length>1?r[r.length-2]:null},Qv=(e,t)=>{const r=Yv(e,t);return r.length>0?r[r.length-1]:null},Kv=(e,t)=>{let{parent:r,childrenProcessing:n=(e=>e),nodeProcessing:i=(e=>e)}=t;return(e=i(e,r)).children&&(e.children=n(e.children.map((t=>Kv(t,{parent:e,childrenProcessing:n,nodeProcessing:i}))))),e},Jv=()=>{},Xv=(e,t)=>{let{parent:r,nodeProcessing:n=Jv}=t;n(e,r),e.children&&e.children.forEach((t=>Xv(t,{parent:e,nodeProcessing:n})))},zv=e=>{let{node:t,connection:r,isReversed:n}=e;switch(t.editingMode){case je.addingParent:var i,a,o,s;return{entityUri:n?null===(i=r.entity)||void 0===i?void 0:i.uri:null===(a=t.relatedEntity)||void 0===a?void 0:a.uri,relation:r.relation,parentEntityUri:n?null===(o=t.relatedEntity)||void 0===o?void 0:o.uri:null===(s=r.entity)||void 0===s?void 0:s.uri};case je.addingChild:var l,u,c,p;return{entityUri:n?null===(l=t.relatedEntity)||void 0===l?void 0:l.uri:null===(u=r.entity)||void 0===u?void 0:u.uri,relation:r.relation,parentEntityUri:n?null===(c=r.entity)||void 0===c?void 0:c.uri:null===(p=t.relatedEntity)||void 0===p?void 0:p.uri};case je.editing:{var d,y,f,T;const e={oldRelation:t.relation,newRelation:r.relation,isReversed:n},i=null===(d=r.entity)||void 0===d?void 0:d.uri,a=null===(y=t.relatedEntity)||void 0===y?void 0:y.uri;return function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Wv(e,t,r[t])}))}return e}({},e,(null===(f=t.entity)||void 0===f?void 0:f.uri)===(null===(T=r.entity)||void 0===T?void 0:T.uri)?{}:{entityUri:i,newEntityUri:a})}}},Zv=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=[];return Object.values(e).forEach((e=>{const r=e.root;r&&Xv(r,{nodeProcessing:r=>{const n=(0,l.path)(["editingConnections",(0,l.path)(["relation","uri"],r)],e),i=Boolean(e.isReversed);if(r.editingMode===je.addingChild||r.editingMode===je.addingParent){const{entityUri:e,relation:a,parentEntityUri:o}=zv({node:r,connection:n,isReversed:i}),s=Up({parentUri:o,relation:a,entityUri:e});t.push(s)}if(r.editingMode===je.editing){const{oldRelation:e,newRelation:a,entityUri:o,newEntityUri:s}=zv({node:r,isReversed:i,connection:n}),l=s?Lp({entityUri:o,newEntityUri:s,relation:a,isReversed:i}):jp({oldRelation:e,newRelation:a});t.push(l)}}})})),t},eg=(e,t)=>{if((0,l.path)(["entity","uri"],e)===t)return!0;if(e&&e.children)for(const r of e.children){const e=eg(r,t);if(e)return e}return!1},tg=(0,l.curry)(((e,t)=>{const r=(0,l.map)(tg(e));return(0,l.evolve)({entity:t=>t.uri===e.uri?e:t,children:r},t)})),rg=(e,t)=>{const r=(0,l.pipe)(Object.entries,(0,l.filter)((t=>{let[,r]=t;return r.root&&((e,t)=>eg(t,e.uri))(e,r.root)}))),n=(0,l.map)((t=>{let[r,n]=t;return{id:r,root:tg(e,n.root)}}));return(0,l.pipe)(r,n)(t)},ng={relationTypeLabel:"relationTypeLabel",entityLabel:"entityLabel"},ig={asc:"asc",desc:"desc"},ag=ng.entityLabel,og=ig.asc,sg=(0,l.always)(0),lg=e=>{let{sortField:t=ag,sortOrder:r=og,typesLabelsMap:n}=e;return e=>e.slice().sort((e=>{let{sortField:t,sortOrder:r,typesLabelsMap:n}=e;switch(t){case ng.relationTypeLabel:return((e,t)=>(r,n)=>{const i=(0,l.path)(["relation","type"]),a=e[i(r)],o=e[i(n)];return IN.strings.sort(t,a,o)})(n,r);case ng.entityLabel:return(e=>(t,r)=>{const n=(0,l.path)(["entity","label"]),i=n(t),a=n(r);return IN.strings.sort(e,i,a)})(r);default:return sg}})({sortField:t,sortOrder:r,typesLabelsMap:n}))},ug=(0,l.pipe)((0,l.defaultTo)(""),l.toLower,(0,l.ifElse)((0,l.includes)(l.__,Object.values(ig)),l.identity,(0,l.always)(og))),cg=(0,l.pipe)((0,l.defaultTo)(""),(0,l.ifElse)((0,l.includes)(l.__,Object.values(ng)),l.identity,(0,l.always)(ag)));var pg=r(91104);let dg;const yg=(e,t)=>(dg||(dg=pg.createClient({key:t})),new Promise((t=>{dg.geocode({address:e},((e,r)=>{e&&(console.warn(e),t(null));const{results:n}=r.json,i=(0,l.pathOr)(null,[0,"geometry","location"],n);t(i||null)}))}))),fg=e=>{let t=e.label||e.value||"";return Array.isArray(t)?t=t.join(", "):(0,l.is)(Object,t)&&(t=""),t},Tg=(e,t)=>Object.values(e).filter(Array.isArray).flat(1/0).filter(gs).flatMap((e=>{let r;return e.type==t&&(r=[fg(e)]),(0,l.is)(Object,e.value)&&(r=(r||[]).concat(Tg(e.value,t))),r})),Eg=e=>e&&e.length>0,mg=(e,t)=>[].concat(e&&e.attributes?Tg(e.attributes,t):[]).filter(l.identity);function hg(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const bg=(e,t,r,n,i,a)=>{if(e&&e.type){const t=Hr(r,e.type);n&&(e=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){hg(e,t,r[t])}))}return e}({},e,{attributes:{[i]:[n]}}));const a=(t.geoLocationAttributes||[]).map((t=>{return r=mg(e,t.latitude),n=mg(e,t.longitude),Eg(r)&&Eg(n)&&(0,l.zipWith)(((e,t)=>({lat:Number(e),lng:Number(t)})),r,n);var r,n})).filter(l.identity);if(a.length>0)return Promise.resolve(a[0])}const o=t.GeoLocation;if(o){const e=o.map((e=>{const t=e.value.Latitude,r=e.value.Longitude;if(Eg(t)&&t[0].value&&Eg(r)&&r[0].value)return{id:e.uri,lat:Number(t[0].value),lng:Number(r[0].value)}})).filter(l.identity);if(e.length>0)return Promise.resolve(e)}return n&&n.label?yg(n.label,a).catch((()=>null)):Promise.resolve(null)},Og=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2?arguments[2]:void 0;const n={},i=(0,l.flatten)(t.map((t=>{return"configuration/entityTypes/Location"===t.type?{id:t.uri,label:t.label,entity:t,pointSource:t.attributes}:(n[t.type]=n[t.type]||((null===(r=Hr(e,t.type))||void 0===r?void 0:r.attributes)||[]).filter((e=>"configuration/entityTypes/Location"===e.referencedEntityTypeURI)).map((e=>{let{name:t}=e;return t})),n[t.type].map((e=>[e,t.attributes[e]])).filter((e=>{let[,t]=e;return t})).flatMap((e=>{let[r,n]=e;return n.map((e=>({id:e.uri,label:e.label,entity:t,pointSource:e.value,refAttribute:e,name:r})))})));var r})));return Promise.all(i.map((t=>{let{id:n,label:i,entity:a,pointSource:o,refAttribute:s,name:u}=t;return bg(a,o,e,s,u,r).then((e=>!e&&a.label&&""!==a.label?yg(a.label,r).catch((()=>null)):e)).then((e=>ie(e).filter(l.identity).map((e=>({id:e.id||n,label:i,entity:a,point:e}))))).catch((()=>null))}))).then((e=>e.flat(1/0).filter(l.identity)))},vg=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return Promise.resolve((0,l.pipe)((0,l.chain)((t=>{const r=Hr(e,t.type);return((null==r?void 0:r.geoLocationAttributes)||[]).flatMap((r=>{if(fr(e,r.latitude,t.type)&&fr(e,r.longitude,t.type)){const e=mg(t,r.latitude),n=mg(t,r.longitude),i=(e,r)=>({id:`${t.uri}_nested_${e}_${r}`,entity:t,label:t.label,point:{lat:Number(e),lng:Number(r)}});return(0,l.zipWith)(i,e,n)}}))})),(0,l.filter)(l.identity),(0,l.uniqBy)((0,l.prop)("id")))(t))},gg=(e,t,r)=>Promise.all([vg(e,t),Og(e,t,r)]).then((e=>{const[t,r]=e;return[...t,...r.filter((e=>0===t.length||!t.some((t=>t.entity===e.entity&&t.point.lat===e.point.lat&&t.point.lng===e.point.lng))))]}));function _g(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Ag(e,t,r[t])}))}return e}function Ag(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Ng=(e,t)=>t.values.map(vo(e,t.entityTypeUri)),Pg=(e,t,r)=>cl(t.fieldName,r)||fr(e,kt(t.fieldName,(0,l.propOr)("","entityTypeUri",t)),(0,l.propOr)("","entityTypeUri",t)),Rg=(e,t)=>{const r=(0,l.propOr)([],"values",t),n=(0,l.path)([t.attrType.lookupCode],e);return(0,l.map)((e=>{const t=(0,l.prop)(e,n);return t?yv(e,t):e}),r)},Sg=(0,l.path)(["attrType","label"]),wg=(0,l.reduce)(((e,t)=>{const r=(0,l.path)(["attrType","lookupCode"],t);if(r){const n=t.values.reduce(((e,t)=>_g({},e,{[t]:!0})),{});e[r]=e[r]?_g({},e[r],n):n}return e}),{}),Ig=(0,l.pipe)((0,l.prop)("values"),E),Ug=(0,l.pipe)((0,l.defaultTo)({}),(0,l.propEq)("fieldName",Un.type.name)),Cg=e=>e.type===Lg.NUMERIC_RANGE_FACET,Dg=e=>e.type===Lg.DATE_RANGE_FACET,jg=(0,l.either)(Cg,Dg),Lg={NUMERIC_RANGE_FACET:"numericRangeFacet",DATE_RANGE_FACET:"dateRangeFacet",WITH_DROPDOWN_CHECKBOXES_FACET:"facetWithDropdownCheckboxes",COMPLEX_FACET:"complexFacet",ENTITY_TYPE_FACET:"entityTypeFacet"},kg=e=>{switch(null==e?void 0:e.name){case Un.type.name:return Lg.ENTITY_TYPE_FACET;case Un.createdBy.name:case Un.updatedBy.name:case Un.sourceSystems.name:case Un.tags.name:case Un.roles.name:case Un.matchRules.name:case Un.MLRecommendedMatch.name:return Lg.WITH_DROPDOWN_CHECKBOXES_FACET;case Un.createdTime.name:case Un.updatedTime.name:case Un.startDate.name:case Un.endDate.name:return Lg.DATE_RANGE_FACET;case Un.matches.name:case Un.matchScore.name:return Lg.NUMERIC_RANGE_FACET;default:return(e=>{switch(e){case"Image":case"Nested":case"Reference":return Lg.COMPLEX_FACET;case"Int":case"Float":case"Double":case"Long":case"Number":case"Count":return Lg.NUMERIC_RANGE_FACET;case"Date":case"Timestamp":case"ActivenessDate":return Lg.DATE_RANGE_FACET;default:return Lg.WITH_DROPDOWN_CHECKBOXES_FACET}})(null==e?void 0:e.type)}},Fg=(0,l.pipe)(Pg,kg),Mg=(0,l.pipe)((0,l.path)(["attrType","type"]),Ar),xg=(0,l.cond)([[Cg,(0,l.always)(tn.IN_RANGE)],[Dg,(0,l.always)(tn.WITHIN)],[(0,l.allPass)([Mg,e=>e.values.length>=2]),(0,l.always)(tn.EXISTS)],[l.T,(0,l.always)(tn.EQUALS)]]),$g=(0,l.cond)([[Dg,(0,l.prop)("values")],[Cg,(0,l.prop)("values")],[Mg,e=>1===e.values.length?e.values.map(ue):[]],[(0,l.pipe)((0,l.path)(["values",0]),Array.isArray),(0,l.prop)("values")],[l.T,e=>[e.values]]]);function Vg(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Gg=(0,l.pipe)((0,l.path)(["attrType","type"]),hr),Wg=(0,l.pipe)((0,l.path)(["attrType","type"]),vr),Bg=(0,l.pipe)((0,l.prop)("attrType"),dl),Yg=(0,l.pipe)((0,l.prop)("attrType"),pl),qg=e=>t=>t.values.map((t=>Hr(e,t).label)).join(" , "),Hg=(0,l.when)((0,l.propSatisfies)((0,l.gt)(l.__,1),"length"),(0,l.join)(" – ")),Qg=e=>{const t=(0,l.pipe)((0,l.map)((0,l.pipe)(l.uniq,(0,l.map)(hn().number),Hg)),(0,l.join)(","))(e.values);return`${Sg(e)}: ${t}`},Kg=e=>{const t=(0,l.pipe)((0,l.map)((0,l.pipe)(l.uniq,(0,l.map)(w),Hg)),(0,l.join)(","))(e.values);return`${Sg(e)}: ${t}`},Jg=e=>t=>`${Sg(t)}: ${Ng(e,t).join(", ")}`,Xg=e=>t=>{const r=Rg(e,t);return`${Sg(t)}: ${r.join(", ")}`},zg=(0,l.curry)(((e,t,r)=>(0,l.map)((0,l.cond)([[Yg,qg(e)],[Wg,Qg],[Gg,Kg],[Bg,Jg(e)],[l.T,Xg(t)]]),r))),Zg=(e,t,r,n)=>(0,l.pipe)(l.values,(0,l.reject)((0,l.pipe)((0,l.prop)("values"),E)),(0,l.map)((t=>function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Vg(e,t,r[t])}))}return e}({},t,{attrType:Pg(e,t,n)}))),zg(e,r))(t),e_=new RegExp(`^${hn().text("Search")}`),t_=(e,t,r,n)=>{let{uiState:i}=t;const{facets:a,keyword:o,advanced:s,readableQuery:u}=i;return(0,l.isEmpty)(s)?[...Zg(e,a,r,n),...o?[o.value]:[]]:[(0,l.replace)(e_,"",u)]},r_=(0,l.pipe)((0,l.omit)(["PICK_DATE"]),l.values)(pn),n_=e=>(e=>r_.reduce(((e,t)=>{const r=new RegExp(`'{0,1}${encodeURIComponent("${")}${t}${encodeURIComponent("}")}'{0,1}`,"g"),n=new RegExp(`'{0,1}${encodeURIComponent("${")}now${encodeURIComponent("}")}'{0,1}`,"g"),[i,a]=tc(t);return e.replace(r,i).replace(n,a)}),e))(e),i_=(0,l.curry)(((e,t)=>{const r=new URL(e),[,n]=r.pathname.split("/");return"nui"===n?`${e}search?state=${t}`:`${e}#p~com.reltio.plugins.search.SearchPerspective_s~${t}`})),a_={geoPolygon:"geoPolygon",geoLocation:"geoLocation",onMapMove:"onMapMove"},o_=e=>[a_.geoPolygon,a_.onMapMove].includes(e),s_=e=>{let[t,r]=e;return`(${+t.toFixed(6)}, ${+r.toFixed(6)})`},l_=e=>{let[t,r,n]=e;return`(${+t.toFixed(6)}, ${+r.toFixed(6)}) ${+n.toFixed(1)}`},u_=(e,t)=>o_(e)?t.map(s_):[l_(t)],c_=e=>o_(e)?hn().text("Geo Polygon"):hn().text("Geo Location"),p_=e=>{switch(e){case a_.geoLocation:return"geoLocation";case a_.geoPolygon:case a_.onMapMove:return"geoPolygon"}},d_={operator:"operator",attributeLabel:"attributeLabel",specialAttributeLabel:"specialAttributeLabel",attributeFilter:"attributeFilter",attributeValue:"attributeValue",entityTypeLabel:"entityTypeLabel",space:"space",bracket:"bracket",punctuationMark:"punctuationMark"},y_=e=>hn().text(e),f_=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return{[tn.EQUALS]:"=",[tn.NOT_EQUALS]:"≠",[tn.STARTS_WITH]:"*",[tn.MISSING_VALUE]:hn().text("missing value"),[tn.HAS_ALL]:hn().text("has all"),[tn.IN_RANGE]:hn().text("in range"),[tn.FULL_TEXT]:hn().text("full text"),[tn.EXISTS]:hn().text("exists"),[tn.COUNT_EQUALS]:`${hn().text("count")} =`,[tn.COUNT_NOT_EQUALS]:`${hn().text("count")} ≠`,[tn.COUNT_LT]:`${hn().text("count")} <`,[tn.COUNT_LTE]:`${hn().text("count")} <=`,[tn.COUNT_GT]:`${hn().text("count")} >`,[tn.COUNT_RANGE]:hn().text("count range"),[tn.LT]:"<",[tn.LTE]:"<=",[tn.GT]:">",[tn.GTE]:">=",[tn.IN_FILE]:hn().text("in file"),[tn.NOT_IN_FILE]:hn().text("not in file"),[tn.CONTAINS]:"~",[rn.LIST_EQUALS]:"=",[rn.NOT_LIST_EQUALS]:"≠",[rn.LIST_EQUALS_CASE_SENSITIVE]:"=",[rn.NOT_LIST_EQUALS_CASE_SENSITIVE]:"≠"}[e]||hn().text(e.toLowerCase())},T_=e=>({type:d_.operator,text:e}),E_=e=>({type:d_.operator,text:y_(e)}),m_=e=>({type:d_.attributeLabel,text:e}),h_=e=>({type:d_.specialAttributeLabel,text:e}),b_=e=>({type:d_.attributeFilter,text:f_(e)}),O_=e=>({type:d_.attributeValue,text:e}),v_=e=>({type:d_.entityTypeLabel,text:e}),g_=()=>({type:d_.space,text:" "}),__=()=>({type:d_.bracket,text:"("}),A_=()=>({type:d_.bracket,text:")"}),N_=(0,l.curry)(((e,t,r,n)=>((e,t)=>e===t.length-1)(r,n)?t:[t,e])),P_=(0,l.curry)(((e,t)=>t.map(N_(e)))),R_=(0,l.curry)(((e,t,r)=>[e,...r,t])),S_=R_(__(),A_()),w_=R_(g_(),g_()),I_=(0,l.curry)(((e,t)=>[e,...t])),U_=e=>I_(v_(e)),C_=e=>I_(v_(`${e}: `)),D_=function(){let{localizable:e=!0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t=>{let r=!1;const n=Iu(t),i=[];for(let a=0;a<t.length;a++){const{operand:o,operator:s}=t[a];if(a!==t.length-1){const t=Su(s),a=wu(s);!r&&t&&n&&(i.push(__()),r=!0),i.push(o),r&&a&&(i.push(A_()),r=!1);const l=e?E_(s):T_(s);i.push(...w_([l]))}else i.push(o),r&&(i.push(A_()),r=!1)}return i}},j_=(0,l.pipe)((0,l.map)((0,l.when)((0,l.has)("text"),(0,l.prop)("text"))),(0,l.join)("")),L_=(0,l.pipe)(D_({localizable:!1}),j_),k_=function(e){let{data:{title:t,pathToTitle:r}}=e,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return r&&n?r.slice(1).join(" / "):t},F_=e=>{let{data:t,values:r,filter:n}=e;return t&&Ac({filter:n,fieldName:(0,l.prop)("fieldName",t),values:r})},M_=(0,l.anyPass)([(0,l.pipe)((0,l.prop)("attributes"),(0,l.any)(F_)),(0,l.pipe)((0,l.path)(["entityTypes","length"]),(0,l.lt)(0))]),x_=(0,l.pipe)((0,l.chain)((0,l.pipe)((0,l.propOr)([],"attributes"),(0,l.filter)((e=>(e=>{var t;return(null===(t=e.data)||void 0===t?void 0:t.attrType)&&cr(e.data.attrType)})(e)&&[tn.HAS_ALL,tn.EQUALS,tn.NOT_EQUALS].includes(e.filter))),(0,l.map)((e=>({type:ur((0,l.path)(["data","attrType"],e)),codeValues:(0,l.flatten)((0,l.propOr)([],"values",e))}))),(0,l.filter)((e=>{let{codeValues:t}=e;return t.length>0})))),bv),$_=(e,t)=>(0,l.pipe)(x_,Ov(t))(e),V_=(0,l.pathEq)(["data","fieldName"],Un.type.name),G_=(0,l.path)(["data","entityTypeUri"]),W_=(0,l.pipe)((0,l.props)(["entityTypes","attributes"]),(0,l.all)(l.isEmpty)),B_=(0,l.curry)(((e,t)=>t.map((t=>(0,l.evolve)({entityTypes:(0,l.filter)(cs(e)),attributes:(0,l.filter)((0,l.pipe)(G_,(0,l.anyPass)([l.isNil,cs(e),r=>{const n=(t.entityTypes||[]).filter(cs(e));return(n.length>1?zr(e,n):null)===r&&!!Hr(e,r)}])))})(t))))),Y_=e=>(0,l.pipe)((0,l.prop)("filter"),Tu,(0,l.equals)(e)),q_=(0,l.curry)(((e,t,r,n,i,a)=>{const o=cl(n.fieldName)||n.attrType,s=Ku(o,i),u=vv({attributePresentations:t,dataTypeDefinition:s}),{type:c}=s;return(0,l.pipe)((0,l.cond)([[()=>cr(s),()=>(0,l.is)(Object,a)&&a.lookupCode?yv(a.lookupCode,a.value):Tv(r,ur(o),a)],[()=>dl(s),()=>vo(e,n.entityTypeUri,a)],[()=>yl(s),()=>Wo(e,a)],[()=>bl(s),()=>qo(e,a)],[()=>"referenced_entity_id"===n.fieldName,()=>a.entityLabel],[l.T,()=>u(a)]]),(0,l.unless)((()=>vr(c)||Ar(c)),Bu),O_)()})),H_=(e,t,r,n)=>{const i=q_(e,t,r,n.data,n.filter);return(0,l.cond)([[Y_(0),(0,l.always)([])],[(0,l.both)(Y_(2),(2,(0,l.pipe)((0,l.prop)("values"),l.flatten,l.length,(0,l.equals)(2)))),e=>{let{values:t}=e;const[r,n]=(0,l.flatten)(t);return[g_(),i(r),{type:d_.punctuationMark,text:" — "},i(n)]}],[l.T,e=>{let{values:t}=e;return[g_(),...(0,l.pipe)(l.flatten,(0,l.map)(i),P_({type:d_.punctuationMark,text:", "}))(t)]}]])(n)},Q_=(e,t)=>{const r=!!cl(e.data.fieldName);return(0,l.pipe)(k_,r?h_:m_)(e,t)},K_=(e,t,r,n,i)=>[Q_(n,i),g_(),b_(n.filter),...H_(e,t,r,n)],J_=(0,l.addIndex)(l.map),X_=(0,l.propEq)("length",1),z_=(0,l.propSatisfies)((0,l.lt)(1),"length"),Z_=(0,l.complement)(l.isEmpty),eA=function(e,t,r,n){let i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];return(0,l.pipe)(Du,(0,l.filter)(F_),ju,(0,l.map)((n=>({operand:K_(e,t,r,n,i),operator:n.operator}))),(0,l.unless)(l.isEmpty,D_()))(n)},tA=(0,l.pipe)(eA,l.flatten),rA=(e,t,r,n,i)=>{let{attributes:a,entityTypes:o=[]}=n;const s=t=>{const r=o.map((t=>mp(e,{type:t}))).join(", ");return r?t(r):l.identity},u=eA(e,t,r,a);return(0,l.ifElse)(l.isEmpty,s(U_),(0,l.pipe)(s(C_),(0,l.unless)((()=>X_(u)||i),S_)))(u)},nA=(e,t,r,n)=>(0,l.pipe)(Du,(0,l.filter)(M_),ju,J_(((n,i,a)=>({operand:rA(e,t,r,n,X_(a)),operator:n.operator}))),D_(),l.flatten)(n),iA=(0,l.pipe)((0,l.reject)(l.isEmpty),(0,l.map)((e=>({operand:e,operator:"and"}))),D_(),l.flatten),aA=e=>{let{searchType:t,values:[r]}=e;return u_(t,r).join(", ")},oA=(e,t,r,n,i,a)=>{const o=(e=>e?[h_(e.isRawFilter?hn().text("Raw filter"):hn().text("Search")),...w_([b_(tn.EQUALS)]),O_(`"${e.value}"`)]:[])(i),s=(e=>e?[h_(c_(e.searchType)),g_(),O_(aA(e))]:[])(a),u=(0,l.pipe)(nA,(0,l.when)((e=>z_(e)&&(Z_(o)||Z_(s))),S_))(e,t,r,n);return iA([o,s,u])},sA=(0,l.pipe)((0,l.map)((0,l.prop)("text")),(0,l.join)("")),lA=(0,l.pipe)(oA,sA),uA=(0,l.has)("attributes"),cA=Array.isArray,pA=(0,l.allPass)([(0,l.propEq)("length",1),(0,l.pathSatisfies)((0,l.startsWith)("not"),[0,"filter"])]),dA=(e,t,r,n,i)=>{const{attributes:a,operator:o}=n,s=yA(e,t,r,a,i);return(0,l.when)((0,l.always)((0,l.complement)(l.isNil)(o)),(0,l.pipe)((0,l.when)((0,l.always)((0,l.not)(pA(a))),S_),(0,l.concat)(w_([T_(o)]))))(s)},yA=function(e,t,r,n){let i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];return uA(n)?dA(e,t,r,n,i):cA(n)?n.reduce(((n,a)=>n.concat(yA(e,t,r,a,i))),[]):(0,l.when)((0,l.always)((0,l.has)("operator",n)),(0,l.concat)(w_([T_(n.operator)])))(K_(e,t,r,n,i))},fA=(e,t,r,n,i)=>(0,l.pipe)(yA,l.flatten)(e,t,r,n,i);function TA(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){EA(e,t,r[t])}))}return e}function EA(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const mA=(0,l.complement)(V_),hA=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t=(0,l.pipe)((0,l.filter)(V_),(0,l.map)((0,l.prop)("values")),l.flatten,l.uniq)(e),r=(0,l.pipe)((0,l.map)(G_),(0,l.reject)(l.isNil),l.uniq)(e),n=0===r.length,i=1===r.length&&(0===t.length||(0,l.equals)(r,t));return{entityTypesFromSpecialAttributes:t,entityTypesFromAttributes:r,areOnlySpecialAttributes:n,areAttributesFromOneEntityType:i}},bA=e=>{const t=e.attributes||[],{areOnlySpecialAttributes:r,areAttributesFromOneEntityType:n}=hA(t);return(r||n)&&Uu(t)},OA=(0,l.ifElse)((0,l.all)((0,l.has)("entityTypes")),l.identity,(0,l.pipe)((e=>{const t=[],r=e.filter((0,l.complement)(bA)),n=e.filter((e=>{let{attributes:t=[]}=e;return t.length>0}));if(0===r.length||1===r.length&&1===n.length||t.push("Can't convert more than one complex transition advanced search group"),e.some((e=>(e.attributes||[]).filter(V_).some((0,l.propEq)("filter",tn.NOT_EQUALS))))&&t.push("Can't convert advanced search group with 'Type' attribute and 'not equals' filter."),t.length)throw t;return e}),(0,l.reduce)(((e,t)=>e.concat((e=>{const t=[],r=e.attributes||[],{entityTypesFromSpecialAttributes:n,entityTypesFromAttributes:i}=hA(r);if(bA(e))t.push(TA({},e,{entityTypes:(0,l.uniq)((0,l.concat)(n,i)),attributes:r.filter(mA)}));else{const n=r.map((a=e.operator,(e,t,r)=>{const n=(0,l.pipe)((0,l.ifElse)(V_,(0,l.pipe)((0,l.prop)("values"),l.flatten),(0,l.pipe)(G_,(e=>[e]),(0,l.reject)(l.isNil))))(e),i=t===r.length-1;return{attributes:[e].filter(mA),entityTypes:n,operator:i?a:e.operator,id:zO()()}}));t.push(...n)}var a;return t})(t))),[]))),vA={[tn.EQUALS]:tn.ON,[tn.IN_RANGE]:tn.WITHIN,[tn.GTE]:tn.AFTER,[tn.GT]:tn.AFTER,[tn.LTE]:tn.BEFORE,[tn.LT]:tn.BEFORE},gA=(0,l.curry)((e=>vA[e]||e)),_A=(0,l.curry)(((e,t)=>{switch(e){case tn.LT:return[f()(t[0]).subtract(1,"day").valueOf()];case tn.GT:return[f()(t[0]).add(1,"day").valueOf()];default:return t}})),AA=(0,l.pipe)((0,l.path)(["data","attrType","type"]),hr),NA=(0,l.curry)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.map((e=>TA({},e,{attributes:(e.attributes||[]).map((e=>{const{filter:t}=e;return AA(e)?(0,l.evolve)({filter:gA,values:_A(t)},e):e}))})))})),PA=(0,l.evolve)({values:(0,l.when)((0,l.pipe)((0,l.prop)(0),Xu),(0,l.map)(tc))}),RA=(0,l.map)((0,l.cond)([[AA,PA],[l.T,l.identity]])),SA=(0,l.curryN)(3,((e,t,r,n,i)=>(0,l.pipe)((0,l.defaultTo)([]),OA,B_(t),(0,l.map)((0,l.evolve)({attributes:(0,l.pipe)((0,l.map)((0,l.evolve)({data:e(t,n,i)})),(0,l.reject)((0,l.propSatisfies)(l.isNil,"data")),RA)})),NA,(0,l.reject)(W_))(r)));function wA(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){IA(e,t,r[t])}))}return e}function IA(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const UA=(e,t)=>({data:{uri:$t(e.fieldName)?kt(e.fieldName,e.entityTypeUri):void 0,fieldName:e.fieldName,entityTypeUri:e.entityTypeUri},operator:"and",filter:t||xg(e),id:zO()(),values:$g(e)}),CA=(0,l.curry)(((e,t,r,n)=>{const{uri:i,fieldName:a,entityTypeUri:o}=n,s=cl(a,t,r)||fr(e,i);if(!s)return null;if(er(s))return wA({},n,{attrType:s,title:s.label});{const t=s.label||s.name,r=mp(e,{type:o}),i=(yr(e,kt(a,o),o)||[]).map((0,l.pick)(["label","name"])).slice(0,-1);return wA({},n,{attrType:s,title:t,pathToTitle:Array.isArray(i)?[r,...(0,l.chain)((0,l.prop)("label"),i),t]:[r,t]})}})),DA=(0,l.curry)(((e,t,r,n)=>SA(CA,e,n,t,r)));function jA(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){LA(e,t,r[t])}))}return e}function LA(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const kA=e=>{const{keyword:t,isRawFilter:r=!1}=e;return t?{value:t,isRawFilter:r}:null},FA=e=>"rdmLookups.not.resolved"===e?Un.notResolved.name:e,MA=(0,l.curry)(((e,t,r)=>{let{fieldName:n,uri:i,filter:a,values:o=[]}=r;const s=a===sn?tn.IN_RANGE:ln(a),u=FA(n),c=cl(u)||fr(e,i),p=(0,l.cond)([[()=>bu(s),(0,l.map)((0,l.when)((0,l.both)((0,l.has)("link"),(0,l.complement)((0,l.has)("filename"))),(e=>jA({},e,{filename:cv(e)}))))],[()=>Ar(null==c?void 0:c.type),(0,l.map)(ue)],[e=>mu(s)&&!Array.isArray(e[0])&&!hr(null==c?void 0:c.type),ae],[l.T,l.identity]])(o);return{id:zO()(),data:{uri:i,fieldName:u,entityTypeUri:t},operator:a===sn?"and not":"and",filter:s,values:p}})),xA=(0,l.curry)(((e,t)=>{const{searchParams:r=[],fastSearchParams:n=[],entityTypes:i=[]}=t,a=[...r,...n].map(MA(e,zr(e,i)));return[{id:zO()(),operator:"or",attributes:a,entityTypes:i}]})),$A=e=>(0,l.pipe)((0,l.prop)(e),(0,l.is)(Number)),VA=(0,l.cond)([[(0,l.has)("values"),(0,l.prop)("values")],[(0,l.allPass)([$A("from"),$A("to")]),(0,l.pipe)((0,l.pick)(["from","to"]),l.values)],[(0,l.pipe)((0,l.prop)("rangeSelection"),E,l.not),(0,l.pipe)((0,l.prop)("rangeSelection"),(0,l.pick)(["start","end"]),l.values)],[l.T,()=>[]]]),GA=(e,t)=>{const r=(0,l.pick)(["fieldName","entityType","attrType","filter"])(e),n=e.potentialMatchesDataTenant;return jA({},r,{values:VA(e),entityType:(0,l.propOr)(t,"entityType",r),fieldName:n?al(e.fieldName,n):e.fieldName})},WA=(e,t)=>{if((0,l.has)("children")(e)){const r=GA(e,t);return e.children.reduce(((e,n)=>(e.push(WA(n,(0,l.propOr)(t,"entityType",r))),e)),[])}return GA(e,t)},BA=(0,l.cond)([[(0,l.has)("searchParameters"),e=>{const t=[];return(0,l.has)("values",e)&&t.push(GA(e)),(0,l.propOr)([],"searchParameters",e).forEach((r=>t.push(jA({fieldName:e.fieldName},GA(r,e.entityType))))),t}],[(0,l.has)("children"),(0,l.pipe)(WA,l.flatten)],[l.T,GA]]),YA=(0,l.pipe)((0,l.map)(BA),l.flatten),qA=e=>{if(e.every((e=>Array.isArray(e))))return e;if(2===e.length)return[e.map((e=>Number(e)))];if(1===e.length){const t=Number(e[0]);return[[t,t]]}return e},HA=(e,t,r,n)=>{const{facets:i=[],advanced:a={},model:o}=n,[s]=xA(e,a),[u]=((e,t)=>{if(!t)return[];const[r,n]=(0,l.pipe)((0,l.reject)((e=>"tenants"===e.fieldName)),(0,l.partition)((e=>"type"===e.fieldName)))(t),i=(0,l.chain)((0,l.propOr)([],"values"),r);return[{attributes:YA(n).map((e=>{let{fieldName:t,entityType:r,values:n,filter:i}=e;return{fieldName:t,entityTypeUri:r,values:n,filter:i}})).map((t=>jA({},t,{type:Fg(e,t)}))).map((e=>jA({},e,{values:jg(e)?qA(e.values):e.values}))).map((e=>{let{filter:t}=e,r=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,["filter"]);return UA(r,t)})),operator:"or",id:zO()(),entityTypes:i}]})(e,i),c=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,l.pipe)(l.keys,(0,l.map)((t=>({[FA(t)]:e[t]}))),l.mergeAll)(e)}(o),p=[jA({},u,{entityTypes:null!=c&&c.type?(0,l.uniq)([...u.entityTypes,...s.entityTypes]):[],attributes:[...u.attributes,...s.attributes].filter((e=>{let{data:{fieldName:t}}=e;return c[t]}))})];return DA(e,t,r,p)},QA=(e,t,r,n)=>{try{return"2.0"==n.version?((e,t,r,n)=>{const{advanced:i=[],facets:a={}}=n,o=i.some((e=>{let{attributes:t,entityTypes:r=[]}=e;return t.length||r.length}))?i:((e,t)=>{const[[r={}],n]=(0,l.pipe)(l.values,(0,l.reject)(Ig),(0,l.partition)(Ug))(t),i=n.map((t=>wA({},t,{type:Fg(e,t)}))).map((e=>UA(e))),a=r.values||[];return[{attributes:i,operator:"or",id:zO()(),entityTypes:a}]})(e,a);return DA(e,t,r,o)})(e,t,r,n):HA(e,t,r,n)}catch(e){return console.error("Failed to convert search state to groups",e),[]}},KA=e=>"2.0"===e.version?e.keyword:kA(e),JA=e=>(0,l.pathEq)(["object","uri"],e),XA=(e,t)=>(0,l.pipe)((0,l.find)(JA(e)),(0,l.prop)("object"))(t),zA=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2?arguments[2]:void 0,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const i=(0,l.pipe)((0,l.find)((0,l.allPass)([(0,l.has)("shortestTransitiveMatchPath"),JA(r.uri),(0,l.pipe)((0,l.propOr)(!1,"direct"),l.not)])),(0,l.propOr)([],"shortestTransitiveMatchPath"))(t),a=r=>{const i=XA(r.match,t)||n[r.match];return i?{label:Jc((0,l.prop)("label",i)),matchRules:(0,l.propOr)([],"matchRules",r).map((function(t){return Oo(e,i.type,t)||{label:t,uri:t}}))}:null};return(0,l.pipe)((0,l.defaultTo)([]),(0,l.when)((0,l.complement)(l.isEmpty),(0,l.map)(a)),(0,l.reject)(l.isNil))(i)},ZA=e=>e.reduce(((e,t)=>{let{object:r}=t;return e[r.uri]=(0,l.pick)(["uri","type","label"],r),e}),{}),eN=(0,l.allPass)([(0,l.has)("shortestTransitiveMatchPath"),(0,l.pipe)((0,l.propOr)(!1,"direct"),l.not)]),tN=(e,t,r)=>(0,l.pipe)((0,l.propOr)([],"shortestTransitiveMatchPath"),(0,l.map)((t=>{let{match:n,matchRules:i=[],negativeRules:a=[]}=t;const o=(0,l.propOr)({},n,r);return{label:Jc((0,l.prop)("label",o)),matchRules:i.concat(a).map((function(t){return Oo(e,o.type,t)||{label:t,uri:t}}))}})))(t),rN=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t=(0,l.pipe)((0,l.map)((0,l.prop)("shortestTransitiveMatchPath")),l.flatten,(0,l.filter)(l.identity),(0,l.map)((0,l.prop)("match")),l.uniq);return t(e)},nN=(0,l.path)(["object","uri"]),iN=e=>{let t=[];return{addChild:e=>{t=(0,l.append)(e,t)},getValue:()=>e,getChildren:()=>t,removeChild:e=>{t=(0,l.without)([e],t)}}},aN=e=>e.getValue(),oN=(e,t)=>{let r=null;if(t(e.getValue()))return e;const n=e.getChildren();for(let e=0;e<n.length&&(r=oN(n[e],t),!r);e++);return r},sN=(e,t)=>{const r=[],n=(0,l.pipe)(aN,t),i=(0,l.pipe)(l.map,l.flatten),a=e.getChildren();a.some(n)&&r.push(e);const o=i((0,l.partialRight)(sN,[t]),a);return r.push.apply(r,o),r};function lN(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){uN(e,t,r[t])}))}return e}function uN(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const cN=(e,t)=>!!e[t],pN=e=>{let{uri:t,lookupCode:r,value:n}=e;return{uri:t,value:r||n}},dN=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.identity;return 0===t.length&&e?e:(0,l.uniqBy)(r,[...t,...e||[]])},yN=e=>{let{structure:t,attrType:r,parents:n=[],children:i=[],values:a=[]}=e;const o=t[r.uri];return lN({},t,{[r.uri]:lN({},o,{attrType:(null==o?void 0:o.attrType)||r,parents:dN(null==o?void 0:o.parents,n),children:dN(null==o?void 0:o.children,i),values:dN(null==o?void 0:o.values,a,(0,l.prop)("uri"))})})},fN=e=>{let{structure:t={},metadata:r,typeUris:n,alreadyAddedTypeUris:i=[]}=e;return n.filter((e=>!i.includes(e))).reduce(((e,t)=>{const n=Hr(r,t)||Ni(r,t),i=(0,l.either)((0,l.both)((0,l.prop)("dependentLookupAttributes"),(0,l.prop)("dependentLookupCode")),(0,l.prop)("children"));return Zo(r,n,i).flatMap(ts).reduce(((e,t)=>{const n=t.dependentLookupAttributes.map((e=>fr(r,e))).filter(l.identity).filter((0,l.prop)("dependentLookupCode"));return(e=>{let{structure:t,parentAttrType:r,childrenAttrTypes:n}=e;const i=n.map((0,l.prop)("uri")),a=yN({structure:t,attrType:r,children:i});return n.reduce(((e,t)=>yN({structure:e,attrType:t,parents:[r.uri]})),a)})({structure:e,parentAttrType:t,childrenAttrTypes:n})}),e)}),t)},TN=e=>{let{structure:t,metadata:r,entityOrRelation:n}=e;return Object.keys(t).reduce(((e,t)=>{if(((e,t)=>!At(e.uri)&&It(e.type)&&It(t)&&!t.startsWith(e.type))(n,t))return e;const i=Fs(r,n,t)||[],a=(0,l.pipe)((0,l.filter)(gs),(0,l.map)(pN))(i);return yN({structure:e,attrType:e[t].attrType,values:a})}),t)},EN=e=>{let{structure:t,attributeValue:r}=e;if((0,l.is)(Object,r.value))return Object.values(r.value).reduce(((e,t)=>{const r=t.some((e=>{let{value:t}=e;return(0,l.is)(Object,t)})),n=t.some((t=>{let{type:r}=t;return cN(e,r)}));return r||n?t.filter(gs).reduce(((e,t)=>EN({structure:e,attributeValue:t})),e):e}),t);{const e=r;return cN(t,e.type)?yN({structure:t,attrType:t[e.type].attrType,values:[pN(e)]}):t}},mN=e=>{let{structure:t,uri:r}=e;return(0,l.map)((e=>e.values.some((e=>{let{uri:t}=e;return t.startsWith(r)}))?lN({},e,{values:e.values.filter((e=>{let{uri:t}=e;return!t.startsWith(r)}))}):e))(t)},hN=e=>{let{structure:t,attrTypeUri:r,entityOrRelation:n,metadata:i}=e;const a=Fs(i,n,r)||[];return a.length?yN({structure:t,attrType:t[r].attrType,values:a.filter(gs).map(pN)}):t},bN=(e,t,r)=>{const n=Rt(e),i=Rt(t);return n===i?((e,t)=>{const r=Wt(t),n=Wt(e);return Ct(n,r)||((e,t)=>Vt(e)&&!Vt(t)&&Ct(t,e))(n,r)})(e,t):!(!r||!Gt(t))&&qm(r,i).includes(n)},ON=(e,t)=>{if(e){if(e.includeAttributes)return e.includeAttributes.includes(t);if(e.excludeAttributes)return!e.excludeAttributes.includes(t)}return!1},vN=e=>{let{parentValues:t,valueUri:r,entityUri:n,modifiedEntities:i,connections:a}=e;const o=n?Bm(n,i,a):null;return t.filter((e=>{let{uri:t}=e;return bN(r,t,o)}))},gN=(e,t,r)=>{const n=r[e].map((e=>t[e]));return(0,l.uniq)(n.concat(n.flatMap((r=>gN(e,t,r)))))},_N=(e,t,r,n)=>{let{uri:i,value:a}=r;return{type:e,uri:i,lookupValue:a,autopopulate:i!==t&&ON(n,e)}},AN=e=>{let{structure:t,typeUri:r,valueUri:n,modifiedEntities:i,connections:a,entityUri:o,config:s}=e;const l=t[r],u=Rt(n),c=Ym(u,o,i,a),p=gN("children",t,l),d=gN("parents",t,l),y=p.flatMap((e=>gN("parents",t,e))).filter((e=>![...d,l,...p].includes(e))),f=p.flatMap((e=>e.values.filter((e=>{let{uri:t}=e;return bN(t,n,c)})).map((t=>_N(e.attrType.uri,n,t,s)))));if(!f.length)return[];const T=d.flatMap((e=>e.values.filter((e=>{let{uri:t}=e;return bN(n,t,c)||Rt(t)!==u&&bN(t,n,c)})).map((t=>_N(e.attrType.uri,n,t,s))))),E=y.flatMap((e=>{const r=gN("children",t,e).map((e=>{let{attrType:t}=e;return t.uri}));return e.values.filter((e=>{let{uri:t}=e;return f.some((e=>{let{uri:n,type:i}=e;return r.includes(i)&&bN(n,t,c)}))})).map((t=>_N(e.attrType.uri,n,t,s)))}));return[...l.values.filter((e=>{let{uri:t}=e;return bN(t,n,c)})).map((e=>_N(r,n,e,s))),...T,...E,...f]},NN=async e=>{let{attributeType:t,attributePresentations:r,value:n}=e;const i=vv({attributePresentations:r,dataTypeDefinition:t}),a=(0,l.pipe)((e=>{const t={};for(const r of e){const[e,n]=Object.entries(r)[0];t[e]=Array.isArray(n)?n.map((e=>({value:e,ov:!0}))):[{value:n,ov:!0}]}return{value:t}}),(e=>Qc(e,t.dataLabelPattern))),o=e=>Object.values(e[0])[0],s=(0,l.pipe)(o,i),u=(0,l.cond)([[ir,()=>a(n)],[cr,()=>(e=>{const r=o(e),n=ur(t);return au([{codeValue:r,type:n}]).then((e=>{if(Array.isArray(e))return Tv(e[0],n,r)}))})(n)],[l.T,()=>s(n)]]);return await u(t)},PN=e=>{let{value:t,attributeType:r,entityType:n=""}=e,i=[{fieldName:"type",filter:tn.EQUALS,values:[n]}];return Array.isArray(t)?i=i.concat(RN(r,t)):i.push(SN([t],r)),i},RN=(e,t)=>{const r=tr(e),n=t=>(e[r]||[]).find((e=>e.uri===t||e.uri.endsWith(`/${t}`)));return t.reduce(((e,t)=>{for(const r in t){const i=n(r),a=ir(i)?RN(i,t[r]):[SN(t[r],i)];return e.push(...a),e}}),[])},SN=(e,t)=>e&&e.length&&!(0,l.isNil)(e[0])&&""!==e[0]?{fieldName:lr(t.uri),filter:t.type===at.TYPE_BLOB?tn.FULL_TEXT:tn.EQUALS,values:e}:{fieldName:lr(t.uri),filter:tn.MISSING_VALUE},wN={AttributesDiff:o,AttributesEditor:a,HistoryManager:s},IN={Colors:r(33164),DependencyManager:r(29524),strings:n,dates:i}},33164:(e,t,r)=>{"use strict";r.r(t),r.d(t,{getColor:()=>i});var n=[[255,235,238,0],[255,205,210,0],[239,154,154,0],[229,115,115,0],[239,83,80,1],[244,67,54,1],[229,57,53,1],[211,47,47,1],[198,40,40,1],[183,28,28,1],[255,138,128,0],[255,82,82,1],[255,23,68,1],[213,0,0,1],[252,228,236,0],[248,187,208,0],[244,143,177,0],[240,98,146,1],[236,64,122,1],[233,30,99,1],[216,27,96,1],[194,24,91,1],[173,20,87,1],[136,14,79,1],[255,128,171,0],[255,64,129,1],[245,0,87,1],[197,17,98,1],[243,229,245,0],[225,190,231,0],[206,147,216,0],[186,104,200,1],[171,71,188,1],[156,39,176,1],[142,36,170,1],[123,31,162,1],[106,27,154,1],[74,20,140,1],[234,128,252,0],[224,64,251,1],[213,0,249,1],[170,0,255,1],[237,231,246,0],[209,196,233,0],[179,157,219,0],[149,117,205,1],[126,87,194,1],[103,58,183,1],[94,53,177,1],[81,45,168,1],[69,39,160,1],[49,27,146,1],[179,136,255,0],[124,77,255,1],[101,31,255,1],[98,0,234,1],[232,234,246,0],[197,202,233,0],[159,168,218,0],[121,134,203,1],[92,107,192,1],[63,81,181,1],[57,73,171,1],[48,63,159,1],[40,53,147,1],[26,35,126,1],[140,158,255,0],[83,109,254,1],[61,90,254,1],[48,79,254,1],[227,242,253,0],[187,222,251,0],[144,202,249,0],[100,181,246,0],[66,165,245,0],[33,150,243,1],[30,136,229,1],[25,118,210,1],[21,101,192,1],[13,71,161,1],[130,177,255,0],[68,138,255,1],[41,121,255,1],[41,98,255,1],[225,245,254,0],[179,229,252,0],[129,212,250,0],[79,195,247,0],[41,182,246,0],[3,169,244,0],[3,155,229,1],[2,136,209,1],[2,119,189,1],[1,87,155,1],[128,216,255,0],[64,196,255,0],[0,176,255,0],[0,145,234,1],[224,247,250,0],[178,235,242,0],[128,222,234,0],[77,208,225,0],[38,198,218,0],[0,188,212,0],[0,172,193,0],[0,151,167,1],[0,131,143,1],[0,96,100,1],[132,255,255,0],[24,255,255,0],[0,229,255,0],[0,184,212,0],[224,242,241,0],[178,223,219,0],[128,203,196,0],[77,182,172,0],[38,166,154,0],[0,150,136,1],[0,137,123,1],[0,121,107,1],[0,105,92,1],[0,77,64,1],[167,255,235,0],[100,255,218,0],[29,233,182,0],[0,191,165,0],[232,245,233,0],[200,230,201,0],[165,214,167,0],[129,199,132,0],[102,187,106,0],[76,175,80,0],[67,160,71,1],[56,142,60,1],[46,125,50,1],[27,94,32,1],[185,246,202,0],[105,240,174,0],[0,230,118,0],[0,200,83,0],[241,248,233,0],[220,237,200,0],[197,225,165,0],[174,213,129,0],[156,204,101,0],[139,195,74,0],[124,179,66,0],[104,159,56,1],[85,139,47,1],[51,105,30,1],[204,255,144,0],[178,255,89,0],[118,255,3,0],[100,221,23,0],[249,251,231,0],[240,244,195,0],[230,238,156,0],[220,231,117,0],[212,225,87,0],[205,220,57,0],[192,202,51,0],[175,180,43,0],[158,157,36,0],[130,119,23,1],[244,255,129,0],[238,255,65,0],[198,255,0,0],[174,234,0,0],[255,253,231,0],[255,249,196,0],[255,245,157,0],[255,241,118,0],[255,238,88,0],[255,235,59,0],[253,216,53,0],[251,192,45,0],[249,168,37,0],[245,127,23,0],[255,255,141,0],[255,255,0,0],[255,234,0,0],[255,214,0,0],[255,248,225,0],[255,236,179,0],[255,224,130,0],[255,213,79,0],[255,202,40,0],[255,193,7,0],[255,179,0,0],[255,160,0,0],[255,143,0,0],[255,111,0,0],[255,229,127,0],[255,215,64,0],[255,196,0,0],[255,171,0,0],[255,243,224,0],[255,224,178,0],[255,204,128,0],[255,183,77,0],[255,167,38,0],[255,152,0,0],[251,140,0,0],[245,124,0,0],[239,108,0,1],[230,81,0,1],[255,209,128,0],[255,171,64,0],[255,145,0,0],[255,109,0,0],[251,233,231,0],[255,204,188,0],[255,171,145,0],[255,138,101,0],[255,112,67,0],[255,87,34,1],[244,81,30,1],[230,74,25,1],[216,67,21,1],[191,54,12,1],[255,158,128,0],[255,110,64,0],[255,61,0,1],[221,44,0,1],[239,235,233,0],[215,204,200,0],[188,170,164,0],[161,136,127,1],[141,110,99,1],[121,85,72,1],[109,76,65,1],[93,64,55,1],[78,52,46,1],[62,39,35,1],[250,250,250,0],[245,245,245,0],[238,238,238,0],[224,224,224,0],[189,189,189,0],[158,158,158,0],[117,117,117,1],[97,97,97,1],[66,66,66,1],[33,33,33,1],[236,239,241,0],[207,216,220,0],[176,190,197,0],[144,164,174,0],[120,144,156,1],[96,125,139,1],[84,110,122,1],[69,90,100,1],[55,71,79,1],[38,50,56,1],[0,0,0,1],[255,255,255,0]];function i(e){var t,r=null,i=[parseInt(e.substring(1,3),16),parseInt(e.substring(3,5),16),parseInt(e.substring(5,7),16)];return n.forEach((function(e){var n=Math.abs(i[0]-e[0])+Math.abs(i[1]-e[1])+Math.abs(i[2]-e[2]);(null===r||n<r)&&(r=n,t=e)})),t?t[3]:0}},29524:(e,t,r)=>{"use strict";function n(e){var t=[];return{getInfo:function(){return e},getEdges:function(){return t},removeEdge:function(e){var r=t.indexOf(e);t.splice(r,1)},addEdge:function(e){t.push(e)}}}function i(e,t){t(e),e.getEdges().forEach((function(e){i(e,t)}))}function a(e){var t=[];return e.getEdges().forEach((function(e){t.push.apply(t,a(e))})),t.push(e),t}function o(e,t){var r=null;if(e.getInfo()===t)return e;for(var n=e.getEdges(),i=0;i<n.length&&!(r=o(n[i],t));i++);return r}function s(e,t){var r=null;if(e.getEdges().some((function(e){return e.getInfo()===t})))return e;for(var n=e.getEdges(),i=0;i<n.length&&!(r=s(n[i],t));i++);return r}r.r(t),r.d(t,{Node:()=>n,resolve:()=>i,findNode:()=>o,findParentNode:()=>s,getDependencyOrder:()=>a})},33196:()=>{},38087:()=>{},74854:()=>{},66602:()=>{}}]);
|
|
2
|
+
//# sourceMappingURL=2473.js.map
|