@reltio/remotes 1.4.1049 → 1.4.1052
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/1242.js +1 -1
- package/1607.js +1 -0
- package/1707.js +1 -1
- package/1962.js +1 -0
- package/2400.js +1 -1
- package/2899.js +2 -0
- package/{861.js.LICENSE.txt → 2899.js.LICENSE.txt} +0 -0
- package/3269.js +1 -1
- package/3431.js +1 -1
- package/3845.js +1 -0
- package/4064.js +1 -1
- package/4589.js +1 -1
- package/5092.js +1 -1
- package/5108.js +1 -1
- package/5267.js +1 -0
- package/546.js +1 -1
- package/5674.js +1 -0
- package/5783.js +1 -1
- package/590.js +1 -1
- package/6071.js +1 -1
- package/{1041.css → 6252.css} +0 -0
- package/6252.js +1 -0
- package/658.js +1 -1
- package/6615.js +1 -1
- package/7830.js +1 -1
- package/8534.js +1 -1
- package/864.js +1 -0
- package/8694.js +1 -1
- package/8862.js +1 -0
- package/8911.js +1 -1
- package/9002.js +1 -0
- package/9147.js +1 -1
- package/9550.js +1 -1
- package/9945.js +1 -1
- package/main.js +1 -1
- package/package.json +1 -1
- package/remoteEntry.js +1 -1
- package/1041.js +0 -1
- package/4717.js +0 -1
- package/4887.js +0 -1
- package/6244.js +0 -1
- package/6833.js +0 -1
- package/7827.js +0 -1
- package/861.js +0 -2
- package/8684.js +0 -1
- package/9810.js +0 -1
package/8684.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[8684],{18435:(e,t,r)=>{"use strict";r.d(t,{ViP:()=>Fs,PY2:()=>wt,Ng6:()=>rr,YJ7:()=>gt,NlI:()=>dt,Xt7:()=>Zt,wfT:()=>qr,EMD:()=>Dr,HAc:()=>er,PEf:()=>Dt,oA3:()=>jr,$XE:()=>Er,eWf:()=>Ct,q7e:()=>tr,KVe:()=>Hr,WVQ:()=>ai,oZZ:()=>nn,bNA:()=>an,Rjq:()=>on,G39:()=>kt,dZX:()=>mr,bQt:()=>ln,oS0:()=>Ot,lL_:()=>ht,Nsj:()=>Nt,psV:()=>vt,xPW:()=>It,pyR:()=>$r,p8l:()=>kr,Wkf:()=>zt,zHr:()=>Xt,NIO:()=>Jt,$26:()=>jb,Esk:()=>Sr,s9T:()=>pr,MEy:()=>tu,j5E:()=>pt,vAw:()=>Cr,NMQ:()=>Ur,mNm:()=>xr,rwv:()=>tn,s_5:()=>Vr,RgZ:()=>Fr,unl:()=>rn,Qy0:()=>sn,pYu:()=>Rr,wIJ:()=>nO,GFH:()=>ir,S91:()=>Ft,p3$:()=>dn,wSh:()=>Z,BDP:()=>Ni,pGS:()=>Mr,ARY:()=>vr,XGc:()=>Br,fO_:()=>Bt,wwy:()=>lr,_XL:()=>_t,j2V:()=>Kr,dMV:()=>Wr,NBX:()=>eg,OXy:()=>gr,BXd:()=>yr,CJB:()=>Xr,lXI:()=>Or,nqG:()=>cn,C68:()=>Lt,yxQ:()=>un,Yj_:()=>ur,D25:()=>or,ZIY:()=>hr,Tl4:()=>cO,lwr:()=>jt,NkU:()=>Qr,Rtp:()=>Yr,YGx:()=>fr,uTS:()=>Gr,IYE:()=>Lr,PiC:()=>en,tJI:()=>nr,fDt:()=>ar,cNQ:()=>Jr,SwE:()=>wr,ZHR:()=>Zr,lD1:()=>xt,lVm:()=>Tr,vnX:()=>ib,$x5:()=>ab,_R1:()=>rb,wUm:()=>nb,z7V:()=>pn,dC6:()=>dr,MBD:()=>sr,GmF:()=>ta,cKm:()=>br,iP_:()=>Ut,NVC:()=>cr,tPT:()=>Ss,tZe:()=>Np,kRE:()=>Ay,psB:()=>Py,X0$:()=>Rs,Wm5:()=>Zs,vyX:()=>qu,wLZ:()=>ws,W4V:()=>se,EtK:()=>ps,Wtd:()=>Ps,asT:()=>yg,kGs:()=>ge,ewt:()=>Gf,O_f:()=>Kl,sOy:()=>et,Tde:()=>xn,LMI:()=>wu,skb:()=>ZO,sPt:()=>Ou,sH1:()=>vu,RPM:()=>jT,h27:()=>Mu,Uqd:()=>Bu,xG:()=>dv,Z2f:()=>gh,fgW:()=>jO,I69:()=>iv,ZxB:()=>ov,mdt:()=>ST,Qbq:()=>oh,rny:()=>xi,UEY:()=>ga,Q0T:()=>va,Lyr:()=>wa,sBn:()=>Oa,itK:()=>Ea,H9$:()=>ba,KPc:()=>ha,zos:()=>ma,ELQ:()=>Ia,dZs:()=>oa,Cz4:()=>aa,z_L:()=>Ra,fGe:()=>ia,iuF:()=>fa,Wib:()=>Ta,Hn0:()=>Sa,obS:()=>Ua,E$L:()=>sa,XUh:()=>ya,Qp_:()=>pa,_jk:()=>la,sKE:()=>ua,WmG:()=>da,QKx:()=>Aa,Oik:()=>Na,s0A:()=>ca,o9m:()=>_a,MCd:()=>Pa,RsS:()=>$u,tGK:()=>_l,Vg3:()=>Bi,mkC:()=>Ci,xv5:()=>Hi,a14:()=>Di,yv0:()=>qi,Zm0:()=>ji,Nxd:()=>Ui,$mM:()=>Yi,ifj:()=>si,NWi:()=>Vh,xr3:()=>$h,wNf:()=>jl,iJH:()=>Gh,d89:()=>Si,Edd:()=>wi,Z5t:()=>Ii,uGe:()=>Pi,UoR:()=>Ai,xvW:()=>Mh,$qe:()=>xh,yPM:()=>na,$cp:()=>ks,vKJ:()=>Ds,AID:()=>Of,B1H:()=>zv,b7X:()=>nh,$uE:()=>_e,keo:()=>ah,C_p:()=>EE,G27:()=>fm,JA0:()=>fy,b3T:()=>ve,oC6:()=>be,_Zs:()=>Oe,epC:()=>Ae,YYG:()=>Ne,f_2:()=>Ey,w3l:()=>Dv,QHB:()=>ym,Jso:()=>Vv,RXH:()=>em,Vr9:()=>gm,lMm:()=>Xm,fmQ:()=>ns,yRD:()=>_v,NcL:()=>gE,QK6:()=>de,ymd:()=>sp,JV_:()=>My,XiW:()=>jf,Yrx:()=>ny,GPx:()=>As,gjI:()=>Ns,vlo:()=>oT,E_P:()=>_T,aAL:()=>Kc,NBq:()=>is,wp9:()=>RT,DsR:()=>Gc,MPc:()=>Af,gWE:()=>Pf,DT_:()=>Rf,ipn:()=>wf,ORg:()=>vi,_wz:()=>Sf,RYR:()=>Mf,PP2:()=>oy,wS7:()=>wh,cBQ:()=>Rc,pBq:()=>af,DsO:()=>ee,X78:()=>Vy,xZs:()=>Ly,YFy:()=>ay,Gmt:()=>Iy,K$w:()=>wy,DSj:()=>Qc,k9j:()=>wc,ww$:()=>Is,WVU:()=>Sy,hxF:()=>tl,nwO:()=>gg,Mzk:()=>gc,aFF:()=>dh,HRH:()=>iu,EZK:()=>kp,Kxm:()=>Cp,Z9i:()=>XT,CrF:()=>vy,DNd:()=>ja,vUy:()=>hg,lJh:()=>su,zHo:()=>lu,sEJ:()=>rg,UO$:()=>pf,zeJ:()=>Yn,dLR:()=>Ts,JQy:()=>Os,XtP:()=>ys,Ug0:()=>yi,A1W:()=>ih,sw:()=>Lp,nv3:()=>Jh,JgD:()=>Qh,nve:()=>ng,SkP:()=>vs,SAs:()=>sf,PWK:()=>Co,IM5:()=>fs,Mfk:()=>rh,mB6:()=>Ah,p6d:()=>w,o0x:()=>U,ufS:()=>fh,k7L:()=>Th,mrB:()=>I,ncP:()=>Ke,Zmi:()=>We,hm5:()=>Be,ECL:()=>Wt,vPL:()=>Mp,qmL:()=>vT,hXd:()=>$i,OCS:()=>Vi,p2l:()=>Ms,qF1:()=>lp,_X$:()=>up,yj2:()=>Zb,bzh:()=>UT,k66:()=>Vo,kiP:()=>no,pSg:()=>ce,kz_:()=>cy,H_U:()=>Wo,t9e:()=>$a,j2$:()=>Ap,PFL:()=>Rn,aJ3:()=>Nb,To9:()=>Mn,wpo:()=>ad,ADq:()=>qT,UUb:()=>YT,tQX:()=>BT,xy8:()=>Un,EUG:()=>Bn,AFK:()=>at,X3M:()=>Wn,WN0:()=>Go,kDl:()=>Es,uDV:()=>OT,IhQ:()=>hs,R$r:()=>gT,w80:()=>Oo,Pfu:()=>xa,Gtj:()=>Tl,fyF:()=>fl,u5q:()=>Qe,O$n:()=>nd,ptG:()=>id,f4_:()=>wE,uap:()=>SE,d7q:()=>ry,liG:()=>sy,$oF:()=>ty,avf:()=>Jf,DiQ:()=>Qf,cfX:()=>Kf,vD3:()=>zf,Qrb:()=>Hf,EJQ:()=>Xf,HWy:()=>qf,y6v:()=>Bf,JUW:()=>my,GtP:()=>ME,_kX:()=>La,u1e:()=>ka,sJj:()=>uh,CJp:()=>FE,uKF:()=>lh,wo0:()=>Ny,s5:()=>Lo,cwx:()=>Do,Y6b:()=>qd,TTx:()=>jy,UtR:()=>Hd,HaQ:()=>Dy,E6I:()=>Oy,vTU:()=>Yd,Nsy:()=>Hp,KMQ:()=>ph,Do$:()=>Xp,CSV:()=>Gs,TMe:()=>Kd,l1V:()=>cu,VQ1:()=>fu,z7d:()=>sT,Xaq:()=>qo,Sj8:()=>vg,PJj:()=>Ol,k3T:()=>Ti,PjQ:()=>_i,s7l:()=>Tc,GGR:()=>rT,j5q:()=>eT,DnY:()=>dc,RY5:()=>fT,Px$:()=>$f,KPC:()=>Qv,NIY:()=>Oc,HvW:()=>mc,Fof:()=>Va,BTI:()=>Zp,uie:()=>Gp,ChB:()=>Fp,q27:()=>sd,fAQ:()=>By,XkT:()=>pc,lrH:()=>qy,nt9:()=>li,XH8:()=>rd,XH2:()=>fi,jFi:()=>td,qhs:()=>bo,wwR:()=>zp,Uk3:()=>ot,ev7:()=>Zv,RB9:()=>yy,iFp:()=>LT,e$p:()=>FT,PcX:()=>xT,SpP:()=>kT,R6_:()=>Pb,CY1:()=>Db,Ajk:()=>sc,Yiz:()=>oc,FK9:()=>ec,UOo:()=>Eh,aTW:()=>Cy,uug:()=>Cl,P$2:()=>Fb,XS2:()=>Nl,Hyb:()=>Yl,d3Y:()=>Ju,Klp:()=>zu,WxZ:()=>xb,Gzu:()=>uu,ZOr:()=>cc,uqV:()=>Vd,Pm4:()=>re,nVD:()=>ET,dED:()=>Zd,P2h:()=>zd,jrr:()=>Za,mmY:()=>to,T6O:()=>Yo,h6J:()=>vp,hM2:()=>Yv,XR6:()=>X,jmz:()=>bT,IHt:()=>hT,NZI:()=>JT,wdF:()=>Wy,kgP:()=>Yy,ZYI:()=>np,QXK:()=>cl,efz:()=>pl,Q5d:()=>ul,Ysv:()=>dl,ocC:()=>uT,io3:()=>pi,Sbt:()=>go,roS:()=>vo,Ww1:()=>_o,QaS:()=>_c,ERZ:()=>Cv,CL1:()=>Bv,idV:()=>Dp,nIW:()=>rt,fjE:()=>Rb,sG0:()=>mh,tV7:()=>vl,g8o:()=>lO,Qy:()=>sO,t2P:()=>_b,wId:()=>co,LS0:()=>po,bFH:()=>Sd,Rgl:()=>Id,fW1:()=>_E,Ywp:()=>tb,pg:()=>pd,WSA:()=>Ud,fed:()=>Gv,tT_:()=>bs,KbL:()=>fc,JBA:()=>ut,aNC:()=>Kh,RFJ:()=>rp,Zeh:()=>cf,OT5:()=>eb,mC3:()=>il,NVY:()=>AT,k6v:()=>cp,FEC:()=>pp,Ob5:()=>ld,KUV:()=>ud,dvH:()=>NT,V3i:()=>Am,VD3:()=>di,mm2:()=>yu,rou:()=>Zy,izH:()=>Fa,DK$:()=>Ma,KMp:()=>Hc,c31:()=>En,mbo:()=>KT,gT8:()=>bn,CZ8:()=>ts,uGi:()=>ss,Poc:()=>fn,_9k:()=>cs,ZTM:()=>as,bwT:()=>ls,tzW:()=>vn,tF$:()=>hn,o96:()=>rs,M4S:()=>us,_vs:()=>$c,xF8:()=>Vf,HQx:()=>yh,ATu:()=>HT,j1S:()=>bi,V3K:()=>mi,Lmx:()=>hi,ZaZ:()=>Tn,n_1:()=>Wd,N6e:()=>Yc,SxO:()=>eo,w3p:()=>PT,xU7:()=>pe,Y_p:()=>Po,$k6:()=>Ao,Gdl:()=>bh,U6P:()=>hh,OwB:()=>Ab,hTh:()=>mT,xqc:()=>ko,JvE:()=>Fo,i29:()=>Du,dzT:()=>ki,uPS:()=>Pc,cZV:()=>Ac,n3B:()=>$O,e6O:()=>DO,s7j:()=>rO,j$Q:()=>hy,kW2:()=>xE,tH7:()=>jo,Yxg:()=>Hs,MaZ:()=>tT,nqN:()=>Zf,o_J:()=>Ho,hgZ:()=>xp,yW4:()=>gp,uT0:()=>bp,C82:()=>Op,u9Z:()=>zy,J$m:()=>Gd,j_Q:()=>rc,OaI:()=>nc,wB1:()=>Xv,SP6:()=>cd,ZYr:()=>Kv,IMU:()=>tp,FoU:()=>Ty,DVz:()=>Nh,mxe:()=>xO,FHr:()=>lf,D1g:()=>ef,VO3:()=>ub,de5:()=>lb,Uw1:()=>Te,J6q:()=>QT,XCe:()=>Ja,Ir:()=>oo,XQO:()=>so,QXb:()=>vd,P8_:()=>Fy,iiD:()=>qc,MOC:()=>gd,WF:()=>Od,xE1:()=>gi,idW:()=>pg,YL3:()=>vc,Fn9:()=>T,j2U:()=>xs,MpE:()=>gn,kQw:()=>wn,mfm:()=>Bl,vZp:()=>st,E8K:()=>og,VSb:()=>Zo,vr_:()=>Sn,Vmh:()=>mg,FgW:()=>Nm,oDv:()=>Qo,kuw:()=>Xo,Tt2:()=>Ko,T6Y:()=>ei,_26:()=>Vl,YkM:()=>Fn,J6y:()=>Rl,njU:()=>Ll,TBP:()=>Jo,IT0:()=>zT,x_:()=>ch,biM:()=>Qp,TMl:()=>Jp,Vkd:()=>xl,WiY:()=>Ub,_zi:()=>Ml,J6D:()=>du,Lt4:()=>Kn,QEi:()=>Vn,whI:()=>Ht,KIu:()=>Qt,JhM:()=>oe,C_0:()=>ni,qIF:()=>VO,O27:()=>E,aBi:()=>od,xOX:()=>zs,EdS:()=>ze,WgC:()=>Xe,eEv:()=>An,A4t:()=>kl,YOQ:()=>lt,Wos:()=>zn,jWr:()=>Ca,Or$:()=>kn,lhE:()=>ci,CwH:()=>$n,pzC:()=>Qs,ymH:()=>Dl,QZu:()=>Dn,rYH:()=>Ib,FVt:()=>Xn,Kn2:()=>ue,jgw:()=>ql,OXP:()=>zo,lS4:()=>Gn,g5f:()=>Cb,fp6:()=>Il,Uty:()=>Ji,YkG:()=>Ln,xdS:()=>On,$NE:()=>Ze,bC9:()=>Je,KVV:()=>sh,q9e:()=>No,iIf:()=>Oh,ian:()=>rl,m6e:()=>ii,OFd:()=>Js,kqr:()=>In,fnZ:()=>qt,VFZ:()=>nl,ZiX:()=>qe,j5n:()=>Qn,zkt:()=>_,Pcm:()=>Jv,QDV:()=>Ks,M5u:()=>wb,laD:()=>MO,mtq:()=>Nn,CtB:()=>vh,CBv:()=>ae,I0t:()=>ri,u1G:()=>aT,gk1:()=>kO,Bgb:()=>LO,uzs:()=>Kt,v0l:()=>mu,Zqp:()=>Qd,j0k:()=>Uo,tCm:()=>it,gmx:()=>Al,mOr:()=>ru,TwZ:()=>uO,GyU:()=>Xh,zGm:()=>fd,bMg:()=>Ld,EyD:()=>kh,FQA:()=>Fh,fZN:()=>xd,xsF:()=>Dh,Lxg:()=>Lh,O3l:()=>Uc,Wni:()=>Ic,wRx:()=>Yh,OxG:()=>Ad,uJQ:()=>Nd,qWg:()=>_h,i96:()=>dd,zhn:()=>Wh,G8q:()=>yn,A9Y:()=>te,Y5F:()=>Nv,gxP:()=>le,c$P:()=>Pl,M7o:()=>Yu,BBN:()=>za,ZBU:()=>J,UkJ:()=>yo,xkv:()=>ky,z$M:()=>dg,KAm:()=>dy,lCl:()=>vf,rkF:()=>mE,IU6:()=>Ip,RGr:()=>h,aYu:()=>m,ije:()=>bl,Buf:()=>Bc,YLu:()=>hl,ct9:()=>So,XkY:()=>kd,T5R:()=>Td,uQS:()=>Md,wcJ:()=>Ro,d$I:()=>Us,rSp:()=>Kp,Sx:()=>bc,Ki6:()=>el,VGk:()=>Vc,sFD:()=>tm,eWN:()=>fg,dWE:()=>tO,Lkd:()=>Df,aDL:()=>df,yaA:()=>$d,lOh:()=>rf,DBr:()=>Ob,hK$:()=>gl,TZ_:()=>wp,CMB:()=>GO,FU8:()=>hc,J$p:()=>Ef,b5s:()=>Tf,h2W:()=>nt,SL_:()=>Qy,oUH:()=>Ep,ck9:()=>Ed,Xs0:()=>ml,u7I:()=>tf,rxg:()=>Jl,bji:()=>Xl,oCZ:()=>dE,MjG:()=>sb,FuV:()=>Tp,$ju:()=>hp,t6d:()=>mp,m5F:()=>fe,sx:()=>Tg,rSc:()=>Ph,U10:()=>ic,L8n:()=>Ry,R9X:()=>Bd,rj2:()=>$y,_C4:()=>Pp,tCj:()=>xy,uAg:()=>iy,wx9:()=>Wf,KF3:()=>Rp,ax9:()=>Sp,HH7:()=>Wc,_6y:()=>Sc,AJo:()=>Nc,Ixr:()=>by,P6Y:()=>_g,Bd_:()=>lE,xkB:()=>sE,W41:()=>Xy,WkI:()=>Jy,sSE:()=>oE,GMd:()=>Iu,Bxm:()=>cE,FVh:()=>tE,U_T:()=>Cd,FTe:()=>ie,VGB:()=>ne,Wfe:()=>ou,Ls5:()=>au,$bd:()=>Zl});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,formatDate:()=>w,formatDateTime:()=>U,formatTime:()=>I,getEndOfDay:()=>S,getMomentFormatFromDateMask:()=>q,getMomentFormatFromDateTimeMask:()=>Q,getMomentFormatFromTimeMask:()=>K,getStartOfDay:()=>R,isToday:()=>_,isValidMomentDate:()=>b,isValidMomentDateOrNull:()=>O,momentToDate:()=>v,parseTimestamp:()=>J,toLocalDate:()=>N,toUtcDate:()=>A});var a={};r.r(a),r.d(a,{applyCrosswalks:()=>ge,collectCrosswalksFromAttributes:()=>_e,compareActivenessAttributes:()=>ve,compareAttributes:()=>be,compareImages:()=>Oe,compareRoles:()=>Ae,compareTags:()=>Ne});var o={};r.r(o),r.d(o,{addAttribute:()=>Se,editAttribute:()=>we,editEndDate:()=>Le,editRoles:()=>Ce,editStartDate:()=>De,editTags:()=>je,removeAttribute:()=>Ue});var s={};r.r(s),r.d(s,{createHistoryManager:()=>xe});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"),N=e=>{const t=new Date(e);return new Date(t.getTime()+60*t.getTimezoneOffset()*1e3)},A=e=>{const t=new Date(e);return new Date(t.getTime()-60*t.getTimezoneOffset()*1e3)},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"),j=(0,l.equals)("99"),D=(0,l.equals)("9999"),L=(0,l.test)(/^[az][az][az]$/),k=(0,l.test)(/^[az][az][az][az]$/),F=(0,l.test)(/^9+$/),x=(0,l.test)(/^[9az]+$/),M=(0,l.cond)([[C,(0,l.always)("M")],[j,(0,l.always)("MM")],[L,(0,l.always)("MMM")],[k,(0,l.always)("MMMM")],[x,(0,l.always)("Mo")],[l.T,(0,l.always)("MM")]]),$=(0,l.cond)([[C,(0,l.always)("D")],[j,(0,l.always)("DD")],[x,(0,l.always)("Do")],[l.T,(0,l.always)("DD")]]),V=(0,l.cond)([[C,(0,l.always)("y")],[j,(0,l.always)("YY")],[D,(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),j),(0,l.always)("hh")],[C,(0,l.always)("H")],[j,(0,l.always)("HH")],[l.T,(0,l.always)(t?"hh":"HH")]])(e),W=(0,l.cond)([[C,(0,l.always)("m")],[j,(0,l.always)("mm")],[l.T,(0,l.always)("mm")]]),Y=(0,l.cond)([[C,(0,l.always)("s")],[j,(0,l.always)("ss")],[l.T,(0,l.always)("ss")]]),B=/([9az]+)([^9az]+)*/g,q=e=>{const t=[...e.toLowerCase().matchAll(B)];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)("",[M(e),r,$(n),i,V(a),o])}return e},H=/(9+)([^9]+)*/g,K=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?Y(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},Q=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)} ${K(r)}`},J=e=>{const t=Number(e);return Number.isNaN(t)?e:t},X=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)?Z.None():Z.Some(t(e))}),Z={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?Z.Some(e):Z.None()},fromNull:function(e){return null==e?Z.None():Z.Some(e)},fromUndefined:function(e){return void 0===e?Z.None():Z.Some(e)},fromEmpty:function(e){return E(e)?Z.None():Z.Some(e)}},ee=(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)}},te=(e,t)=>(r,n)=>{const i=t?(0,l.prop)(t):l.identity;return e.indexOf(i(r))-e.indexOf(i(n))},re=(0,l.when)((0,l.is)(Array),(0,l.prop)(0)),ne=e=>Array.isArray(e)?e:[e],ie=e=>[e],ae=e=>!!e&&["www.","http://","https://","ftp://","ftps://","smb://","data:"].some((t=>String(e).toLowerCase().startsWith(t))),oe=e=>/^\S+@\S+\.\S+$/.test(String(e).toLowerCase()),se=e=>(e=(e||"").toLowerCase(),oe(e)?`mailto:${e}`:!e.includes("://")&&(e.startsWith("www.")||e.split(".").length>2)?`http://${e}`:e),le=(0,l.when)((0,l.is)(String),(e=>""===e?void 0:"true"===e.toLowerCase())),ue=e=>null!=e&&["object","function"].includes(typeof e),ce=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)),ue(e[i])?r(e[i],n.concat(i)):t.push(n.concat(i)))};return r(e),t},pe=(e,t,r)=>{const n=[r,"errorDetailMessage","errorMessage","error"];return(0,l.cond)([...n.map((e=>[(0,l.prop)(e),(0,l.prop)(e)])),[(0,l.always)(t),(0,l.always)(t)],[l.T,(0,l.always)(e)]])(e)},de=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)},ye=/[\n\r%#()<>?[\\\]^`{}|]/g,fe=e=>`data:image/svg+xml;utf8,${e.replace(/["']\);{0,}$/,"").replace(/'/g,'"').replace(/>\s{1,}</g,"><").replace(/\s{2,}/g," ").replace(ye,encodeURIComponent)}`,Te=e=>`data:image/gif;base64,${e}`;function Ee(e){return e&&void 0!==e.uri}function me(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 he(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 be(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(be(d.value,y.value,r)):"Reference"===g(d)?he(d,y)?o.push.apply(o,be(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(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&&(ue(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.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(ue(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 Oe(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)||Ee(r)&&Ee(n)&&r.uri===n.uri||i.push({type:"UPDATE_PROFILE_PIC_BY_URL",newValue:{value:t.defaultProfilePicValue}}),i}function ve(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 ge(e,t){var r="configuration/sources/Reltio";function n(e,t){return e.crosswalk={type:t.type,value:t.value},e}function i(e){return e.removeIt=!0}var a=e.map((function(e){if(e.crosswalk)return[e];var i=t.filter((function(t){return 1===(t.attributes||t.attributeURIs||[]).filter((function(t){return t===e.uri})).length})),a=i.filter((function(e){return e.type===r})),o=i.filter((function(e){return e.type!==r})),s=[];switch(e.type){case"INSERT_ATTRIBUTE":s.push(e);break;case"_UPDATE_NON_OV_ATTRIBUTE":s=s.concat(i.map((function(t){return n(e,t)})));break;case"DELETE_ATTRIBUTE":(o.length||0==a.length)&&s.push({type:"IGNORE_ATTRIBUTE",uri:e.uri,newValue:{value:!0}}),s=s.concat(a.map((function(t){return n({type:"DELETE_ATTRIBUTE",uri:e.uri},t)})));break;case"UPDATE_ATTRIBUTE":a.length?s=s.concat(a.map((function(t){return n({type:"UPDATE_ATTRIBUTE",uri:e.uri,newValue:e.newValue},t)}))):s.push({type:"INSERT_ATTRIBUTE",uri:e.uri.substr(0,e.uri.lastIndexOf("/")),newValue:[e.newValue],insteadOfUpdate:!0}),o.length&&s.push({type:"IGNORE_ATTRIBUTE",uri:e.uri,newValue:{value:!0}})}return s})),o=[].concat.apply([],a),s=function(e,t){return e.reduce((function(e,r){return(e[r[t]]=e[r[t]]||[]).push(r),e}),{})}(o,"typeUri");for(var l in s)if("undefined"!==l){var u=s[l],c=o.filter((function(e){return"_UPDATE_NON_OV_ATTRIBUTE"!==e.type})).filter((function(e){return e.uri.substr(0,e.uri.lastIndexOf("/"))===l||"INSERT_ATTRIBUTE"===e.type&&e.uri===l})),p=u.filter((function(e){return e.crosswalk&&e.crosswalk.type===r}))[0];!c.filter((function(e){return"UPDATE_ATTRIBUTE"===e.type}))[0]&&p&&(o.push({type:"UPDATE_ATTRIBUTE",uri:p.uri,newValue:{value:p.value},crosswalk:p.crosswalk}),c.forEach(i)),u.forEach(i)}return(o=o.filter((function(e){return!e.removeIt}))).forEach((function(e){delete e.insteadOfUpdate})),o}function _e(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 Ne(e,t){return me("UPDATE_TAGS").call(this,e,t)}function Ae(e,t){return me("UPDATE_ROLES").call(this,e,t)}function Pe(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 Re(e,t){for(var r=e.substr(e.indexOf("/attributes/")+12).split("/"),n=[],i=0;i<r.length;i+=2)n.push(Pe(r[i],r[i+1],e,t));return n}function Se(e,t,r,n,i,a,o){void 0===a&&(a=0);var s=Re(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 Se(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 we(e,t,r,n,i,a){void 0===a&&(a=0);var o=Re(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()?(Ie(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(Ie.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=Se(e,t,r,n,i,a),s}var c=we(e,o,o.valueUri,{},i,a);we(c,t,r,n,i,a+1)}function Ie(e,t){ue(e)?(t.value=e.value,t.lookupCode=e.lookupCode):(t.value=e,t.lookupCode&&(t.lookupCode=e))}function Ue(e,t,r,n){void 0===n&&(n=0);var i=Re(r)[n];if(i.hasChildren){var a=(e[i.name]||[]).filter((function(e){return e.uri===i.valueUri}))[0];a&&Ue(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 Ce(e,t){e.roles=t||[]}function je(e,t){e.tags=t||[]}function De(e,t){e.startDate=t||""}function Le(e,t){e.endDate=t||""}function ke(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){Fe(e,t,r[t])}))}return e}function Fe(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var xe=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(ue(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:ue(t)?n[r]=i(e[r],t):-1===e.indexOf(t)&&n.push(t)}))):(ue(e)&&Object.keys(e).forEach((function(t){n[t]=e[t]})),Object.keys(t).forEach((function(r){ue(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=ke({},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:ke({},n,{roles:s,tags:u}),roles:i,tags:l}}}},Me=r(15729);const $e="1Tempo4rary",Ve="1Tepmo4Rel",Ge=(0,l.cond)([[l.isNil,(0,l.always)("")],[(0,l.test)(/[^/]$/),(0,l.concat)(l.__,"/")]]),We=e=>`${e}/uri$$${Date.now()+Math.round(1e3*Math.random())}`,Ye=e=>()=>We(e),Be=(e,t)=>{const r=Ge(e),n=r+(r.includes("/attributes/")?"":"attributes/")+t;return We(n)},qe=e=>e&&e.includes("uri$$"),He=Ye("entities"),Ke=Ye("relations"),Qe=(0,l.pipe)((0,l.split)("/attributes/"),(0,l.prop)("0")),Je=(0,l.startsWith)("relations/"),Xe=(0,l.startsWith)("entities/"),ze=(0,l.pipe)((0,l.defaultTo)(""),(0,l.startsWith)("configuration/entityTypes/")),Ze=(0,l.pipe)((0,l.defaultTo)(""),(0,l.startsWith)("configuration/relationTypes/")),et=(0,l.curry)(((e,t)=>e===t||(e||"").startsWith(`${t||""}/`))),tt=(0,l.pipe)((0,l.split)("/"),l.head),rt=(0,l.pipe)((0,l.split)("/"),l.last),nt=(e,t)=>{const[r,...n]=e.split("."),i=n.join(`/${r}/`);return`${t||""}/${r+(i&&`/${i}`)}`},it=(0,l.curry)(((e,t)=>`${e}/attributes/${t}`)),at=(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("/")},ot=e=>{var t;return null===(t=e.match(/.+?(?=\/attributes|\/analyticsAttributes)/gm))||void 0===t?void 0:t[0]},st=(0,l.either)((0,l.startsWith)("attributes."),(0,l.startsWith)("analyticsAttributes.")),lt=e=>5===e.split("/").length,ut=e=>{const t=e.startsWith("configuration/")?3:2,r=e.split("/"),n=r.length<=5?t:-2;return r.slice(0,n).join("/")},ct=e=>e.replace(/uri\$\$/g,$e),pt={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"},dt={LIST_EQUALS:"listEquals",NOT_LIST_EQUALS:"not listEquals",LIST_EQUALS_CASE_SENSITIVE:"listEqualsCaseSensitive",NOT_LIST_EQUALS_CASE_SENSITIVE:"not listEqualsCaseSensitive"},yt={[pt.EQUALS]:"equals",[pt.NOT_EQUALS]:"not",[pt.STARTS_WITH]:"starts with",[pt.MISSING_VALUE]:"missing value",[pt.IN_RANGE]:"in range",[pt.HAS_ALL]:"has all",[pt.FULL_TEXT]:"full text",[pt.EXISTS]:"exists",[pt.COUNT_EQUALS]:"count equals",[pt.COUNT_NOT_EQUALS]:"count not equal",[pt.COUNT_LT]:"count less",[pt.COUNT_LTE]:"count less or equal",[pt.COUNT_GT]:"count greater",[pt.COUNT_GTE]:"count greater or equal",[pt.COUNT_RANGE]:"count in range",[pt.LT]:"less than",[pt.LTE]:"less than or equal",[pt.GT]:"greater than",[pt.GTE]:"greater than or equal",[pt.IN_FILE]:"in file",[pt.NOT_IN_FILE]:"not in file",[pt.CONTAINS]:"contains",[pt.ON]:"on",[pt.BEFORE]:"before",[pt.AFTER]:"after",[pt.WITHIN]:"within"},ft="in",Tt="notIn",Et="not range",mt=e=>({[ft]:pt.EQUALS,[Tt]:pt.NOT_EQUALS}[e]||e),ht={LAST_DAY:"lastDay",LAST_3DAYS:"last3Days",LAST_WEEK:"lastWeek",LAST_MONTH:"lastMonth",LAST_YEAR:"lastYear",PICK_DATE:"pickDate"},bt={[ht.LAST_DAY]:"Last 24 hours",[ht.LAST_3DAYS]:"Last 3 days",[ht.LAST_WEEK]:"Last week",[ht.LAST_MONTH]:"Last month",[ht.LAST_YEAR]:"Last year",[ht.PICK_DATE]:"Pick date"},Ot={TYPE_STRING:"String",TYPE_TEXT:"Text",TYPE_PASSWORD:"Password",TYPE_LONG:"Long",TYPE_INT:"Int",TYPE_DOLLAR:"Dollar",TYPE_FLOAT:"Float",TYPE_DOUBLE:"Double",TYPE_NUMBER:"Number",TYPE_BOOLEAN:"Boolean",TYPE_BOOLEAN_RADIO:"Boolean_Radio",TYPE_DATE:"Date",TYPE_TIMESTAMP:"Timestamp",TYPE_ACTIVENESS_DATE:"ActivenessDate",TYPE_LOCAL_DATE:"LocalDate",TYPE_BLOB:"Blob",TYPE_ENUM:"Enum",TYPE_CIK_ID:"cik id",TYPE_LOOKUP:"Lookup",TYPE_TYPEAHEAD:"Typeahead",TYPE_URL:"URL",TYPE_BLOG_URL:"Blog URL",TYPE_IMAGE_URL:"Image URL",TYPE_EMAIL:"Email",TYPE_DEPENDENT_LOOKUP:"DependentLookup",TYPE_ENTITY_ID:"EntityId",TYPE_RDM_LOOKUPS_NOT_RESOLVED:"RdmLookupsNotResolved",TYPE_COUNT:"Count",TYPE_FILE:"File",TYPE_SELECT:"Select",TYPE_NESTED:"Nested",TYPE_REFERENCE:"Reference",TYPE_IMAGE:"Image",TYPE_SSN:"SSN"},vt={NEW:"new",REMOVED:"removed",EDITED:"edited",IGNORED:"ignored"},gt={ACTIVE_ONLY:"active",INACTIVE_ONLY:"not_active",ALL:"all"},_t="<No label>",Nt={IN:"in",OUT:"out"};var At=r(87918),Pt=r.n(At);function Rt(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){St(e,t,r[t])}))}return e}function St(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const wt={startDate:{type:Ot.TYPE_ACTIVENESS_DATE,get label(){return Pt().text("Start date")},uri:"startDate",name:"activeness.startDate",defaultValue:null,singleValue:!0,faceted:!0},endDate:{type:Ot.TYPE_ACTIVENESS_DATE,get label(){return Pt().text("End date")},uri:"endDate",name:"activeness.endDate",defaultValue:null,singleValue:!0,faceted:!0}},It=Rt({id:{type:Ot.TYPE_ENTITY_ID,get label(){return Pt().text("Entity ID")},uri:"id",name:"id",singleValue:!0}},wt,{roles:{type:Ot.TYPE_STRING,get label(){return Pt().text("Roles")},uri:"roles",name:"roles",faceted:!0},tags:{type:Ot.TYPE_STRING,get label(){return Pt().text("Tags")},uri:"tags",name:"tags",faceted:!0}}),Ut={workflow:{type:Ot.TYPE_STRING,get label(){return Pt().text("Workflow")},uri:"workflow",name:"businessProcessData.businessProcessName",faceted:!0},assignee:{type:Ot.TYPE_STRING,get label(){return Pt().text("Assignee")},uri:"assignee",name:"businessProcessData.tasks.taskAssignee",faceted:!0},step:{type:Ot.TYPE_STRING,get label(){return Pt().text("Step")},uri:"step",name:"businessProcessData.tasks.taskName",faceted:!0},dueDate:{type:Ot.TYPE_TIMESTAMP,get label(){return Pt().text("Due Date")},uri:"dueDate",name:"businessProcessData.tasks.taskDueDate"}},Ct={commenter:{type:Ot.TYPE_STRING,get label(){return Pt().text("Commenter")},uri:"commenter",name:"attributes.Commenters",faceted:!0}},jt={notResolved:{type:Ot.TYPE_RDM_LOOKUPS_NOT_RESOLVED,get label(){return Pt().text("Records with RDM Transcode Error")},uri:"notResolved",name:"rdmLookups.resolved"}},Dt={createdBy:{type:Ot.TYPE_STRING,get label(){return Pt().text("Created by")},uri:"createdBy",name:"createdBy",singleValue:!0,faceted:!0},updatedBy:{type:Ot.TYPE_STRING,get label(){return Pt().text("Updated by")},uri:"updatedBy",name:"updatedBy",singleValue:!0,faceted:!0},createdTime:{type:Ot.TYPE_TIMESTAMP,get label(){return Pt().text("Created time")},uri:"createdTime",name:"createdTime",singleValue:!0,faceted:!0},updatedTime:{type:Ot.TYPE_TIMESTAMP,get label(){return Pt().text("Updated time")},uri:"updatedTime",name:"updatedTime",singleValue:!0,faceted:!0}},Lt={matches:{type:Ot.TYPE_COUNT,get label(){return Pt().text("Potential Matches")},uri:"matches",name:"matches",singleValue:!0,hideForDataTenant:!0,faceted:!0},matchScore:{type:Ot.TYPE_COUNT,get label(){return Pt().text("Match scores")},uri:"matchScore",name:"potentialMatches.matchScore",singleValue:!0,hideForDataTenant:!0,faceted:!0}},kt={sourceSystems:{type:Ot.TYPE_STRING,get label(){return Pt().text("Source System Name")},uri:"sourceSystems",name:"sourceSystems",singleValue:!0,faceted:!0},value:{type:Ot.TYPE_STRING,get label(){return Pt().text("ID Value")},uri:"value",name:"crosswalks.value"},count:{type:Ot.TYPE_INT,get label(){return Pt().text("Crosswalk Count")},uri:"count",name:"crosswalks_count"},reltioLoadDate:{type:Ot.TYPE_TIMESTAMP,get label(){return Pt().text("Reltio Load Date")},uri:"reltioLoadDate",name:"crosswalks.reltioLoadDate"},createDate:{type:Ot.TYPE_TIMESTAMP,get label(){return Pt().text("Create Date")},uri:"createDate",name:"crosswalks.createDate"},updateDate:{type:Ot.TYPE_TIMESTAMP,get label(){return Pt().text("Update Date")},uri:"updateDate",name:"crosswalks.updateDate"},deleteDate:{type:Ot.TYPE_TIMESTAMP,get label(){return Pt().text("Delete Date")},uri:"deleteDate",name:"crosswalks.deleteDate"},publishDate:{type:Ot.TYPE_TIMESTAMP,get label(){return Pt().text("Publish Date")},uri:"publishDate",name:"crosswalks.sourcePublishDate"},sourceTable:{type:Ot.TYPE_STRING,get label(){return Pt().text("Source Table")},uri:"sourceTable",name:"crosswalks.sourceTable"}},Ft={matchRules:{type:Ot.TYPE_STRING,get label(){return Pt().text("Match Rules")},uri:"matchRules",name:"matchRules",faceted:!0,hideForDataTenant:!0},MLRecommendedMatch:{type:Ot.TYPE_STRING,get label(){return Pt().text("Match IQ")},uri:"MLRecommendedMatch",name:"MLRecommendedMatch",faceted:!0,hideForDataTenant:!0}},xt=Rt({},It,Ut,Ct,jt,Dt,Lt,kt,Ft,{type:{type:Ot.TYPE_STRING,get label(){return Pt().text("Type")},uri:"type",name:"type",singleValue:!0,faceted:!0}});var Mt=r(13980),$t=r.n(Mt);const Vt=(0,l.compose)((0,l.join)("&"),(0,l.map)((0,l.join)("=")),(0,l.map)((0,l.map)(encodeURIComponent)),l.toPairs),Gt=(0,l.compose)((0,l.unless)(l.isEmpty,(e=>`?${e}`)),Vt),Wt=(0,l.pipe)((0,l.reject)(E),Gt),Yt=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),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("?")?"&":"?")+Vt(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;return{updateDCRUriFromResponse:u,enhanceUriWithDCR:d,getDCRObjectUris:y,getDCRUri:f}},Bt={EDITING:"Editing",SUGGESTING:"Suggesting",VIEWING:"Viewing"},qt=(0,l.equals)(Bt.SUGGESTING),Ht=(0,l.equals)(Bt.EDITING),Kt=(0,l.equals)(Bt.VIEWING),Qt=(0,l.either)(Ht,qt);let Jt,Xt,zt,Zt,er,tr,rr,nr,ir,ar,or,sr,lr,ur,cr,pr,dr,yr,fr,Tr,Er,mr,hr,br,Or,vr,gr;function _r(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){Nr(e,t,r[t])}))}return e}function Nr(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.missed="missed",e.missedRefEntity="missedRefEntity",e.invalid="invalid"}(Jt||(Jt={})),function(e){e.local="local",e.validationService="validationService"}(Xt||(Xt={})),function(e){e.ERROR="ERROR",e.WARNING="WARNING"}(zt||(zt={})),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"}(Zt||(Zt={})),function(e){e.attributeValue="attributeValue",e.tempEntity="tempEntity",e.relationConnection="relationConnection"}(er||(er={})),function(e){e.ENTITY_ATTRIBUTE="entityAttribute",e.ENTITY="entity",e.RELATION="relation",e.POTENTIAL_MATCH="potentialMatch"}(tr||(tr={})),function(e){e.ACTIVE_ONLY="active",e.INACTIVE_ONLY="not_active",e.ALL="all"}(rr||(rr={})),function(e){e.or="or",e.orNot="or not",e.and="and",e.andNot="and not"}(nr||(nr={})),function(e){e.geoPolygon="geoPolygon",e.geoLocation="geoLocation",e.onMapMove="onMapMove"}(ir||(ir={})),function(e){e.TABLE="table",e.List="list",e.MAP="map"}(ar||(ar={})),function(e){e.PROFILE="profile",e.MAP="map"}(or||(or={})),function(e){e.Unmerge="unmerge",e.TreeUnmerge="treeUnmerge"}(sr||(sr={})),function(e){e.editing="editing",e.addingParent="addingParent",e.addingChild="addingChild"}(lr||(lr={})),function(e){e.potentialMatchReview="potentialMatchReview",e.dataChangeRequestReview="dataChangeRequestReview",e.recommendForDelete="recommendForDelete"}(ur||(ur={})),function(e){e[e.low=1]="low",e[e.medium=50]="medium",e[e.high=100]="high",e[e.urgent=1e3]="urgent"}(cr||(cr={})),function(e){e.EXISTS="exists",e.MISSING="missing"}(pr||(pr={})),function(e){e.UNIQUE="unique",e.NOT_UNIQUE="notUnique"}(dr||(dr={})),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"}(yr||(yr={})),function(e){e.IN="in",e.OUT="out"}(fr||(fr={})),function(e){e.ACTIVE="ACTIVE",e.INACTIVE="INACTIVE"}(Tr||(Tr={})),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"}(Er||(Er={})),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"}(mr||(mr={})),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.SingleAttributeView="com.reltio.plugins.entity.attributes.SingleAttributeView",e.TableAttributeView="com.reltio.plugins.entity.attributes.AttributeTableView",e.CustomView="com.reltio.plugins.ui.CustomActionView",e.MapView="com.reltio.plugins.react.EntityMapView",e.ImageAttributeView="com.reltio.plugins.entity.attributes.ImageAttributeView",e.PotentialMatchesView="com.reltio.plugins.entity.PotentialMatchesView"}(hr||(hr={})),function(e){e.preserveURIs="preserveURIs",e.updateAttributeUpdateDates="updateAttributeUpdateDates",e.validateDataPermissions="validateDataPermissions"}(br||(br={})),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.Search="SearchView"}(Or||(Or={})),function(e){e.Viewing="Viewing",e.Editing="Editing",e.Suggesting="Suggesting"}(vr||(vr={})),function(e){e.Saving="Saving"}(gr||(gr={}));const Ar=$t().oneOf(["mobile","tablet","desktop"]),Pr=$t().shape({deviceTypes:$t().oneOfType([Ar,$t().arrayOf(Ar)]),roles:$t().arrayOf($t().string)}),Rr=$t().shape({value:$t().string,lookupCode:$t().string}),Sr=$t().shape({link:$t().string,filename:$t().string}),wr=$t().shape({displayName:$t().string,parent:$t().string}),Ir=$t().oneOfType([$t().string,$t().number,$t().bool,Rr]),Ur=$t().oneOfType([Ir,$t().arrayOf(Ir)]),Cr=$t().shape({fieldName:$t().string,values:$t().arrayOf(Ur),filter:$t().string,type:$t().string}),jr=$t().shape({minValue:$t().number,maxValue:$t().number}),Dr=$t().shape({label:$t().string,name:$t().string,description:$t().string,type:$t().string,hidden:$t().bool,faceted:$t().bool,searchable:$t().bool,uri:$t().string,access:$t().arrayOf($t().string),cardinality:jr}),Lr=$t().shape({label:$t().string,uri:$t().string,typeColor:$t().string,direction:$t().string,startObject:$t().object,endObject:$t().object}),kr=$t().shape({typeColor:$t().string,typeIcon:$t().string,typeImage:$t().string,label:$t().string,uri:$t().string,attributes:$t().arrayOf(Dr)}),Fr=$t().shape({uri:$t().string,label:$t().string,memberTypes:$t().array,extendsTypeUri:$t().string,attributes:$t().arrayOf(Dr)}),xr=$t().shape({uri:$t().string,label:$t().string,extendsTypeUri:$t().string,relationshipTypeURIs:$t().arrayOf($t().string)}),Mr=$t().shape({uri:$t().string,description:$t().string,label:$t().string,schemaVersion:$t().string,entityTypes:$t().arrayOf(kr),roles:$t().arrayOf($t().object),groupTypes:$t().arrayOf($t().object),relationTypes:$t().arrayOf(Lr),graphTypes:$t().arrayOf(xr),interactionTypes:$t().arrayOf(Fr),sources:$t().arrayOf($t().object)}),$r=$t().shape({uri:$t().string,type:$t().string}),Vr=$t().shape({uri:$t().string,attributes:$t().object,type:$t().string,timestamp:$t().number,members:$t().object}),Gr=$t().shape({uri:$t().string,type:$t().string}),Wr=$t().shape({value:$t().object,ov:$t().bool,type:$t().string,uri:$t().string}),Yr=$t().shape({refEntity:$t().oneOfType([$t().array,$t().object]),refRelation:$t().oneOfType([$t().array,$t().object]),value:$t().object,ov:$t().bool,type:$t().string,uri:$t().string}),Br=$t().oneOf((0,l.values)(Bt)),qr=$t().shape({type:$t().oneOf(Object.values(Jt)).isRequired,attributeTypeUri:$t().string.isRequired,parentUri:$t().string.isRequired,uri:$t().string,message:$t().string}),Hr={attributeType:Dr,showEmptyEditors:$t().bool,lazy:$t().bool,mode:Br,metadata:Mr,ownError:qr,errors:$t().arrayOf(qr),crosswalks:$t().array,onAddAttributes:$t().func,onAddOneMore:$t().func,onDeleteAttribute:$t().func,onChangeAttribute:$t().func,additionalControlsRenderer:$t().func,hideDeleteButton:$t().bool,showNonOv:$t().bool,state:$t().oneOf(["deleted","edited"])},Kr=_r({attributeValue:Wr},Hr),Qr=_r({attributeValue:Yr},Hr),Jr=$t().shape({value:$t().oneOfType([$t().string,$t().bool,$t().number]),ov:$t().bool,type:$t().string,uri:$t().string,lookupCode:$t().string,lookupRawValue:$t().string}),Xr=$t().shape({totalOvValues:$t().number,totalValues:$t().number}),zr=$t().shape({inRelations:$t().arrayOf($t().oneOfType([$t().object,$t().string])),outRelations:$t().arrayOf($t().oneOfType([$t().object,$t().string])),groups:$t().arrayOf($t().string),entityTypes:$t().arrayOf($t().string),nextEntry:$t().object}),Zr=$t().oneOf(["asc","desc"]),en=$t().shape({id:$t().string,content:zr,allowOnlyCreateNew:$t().bool,sortColumn:$t().string,sortOrder:Zr,"text-empty":$t().string,max:$t().number,icon:$t().string,caption:$t().string,canCreate:Pr,canRead:Pr,canUpdate:Pr,canDelete:Pr,editingEnabled:$t().bool}),tn=$t().shape({id:$t().string,graph:$t().shape({type:$t().string,layout:$t().number,deep:$t().number,limit:$t().number,uri:$t().string,options:$t().shape({reverseRelations:$t().bool})}),sortBy:$t().oneOf(["relationTypeLabel","entityLabel"]),sortOrder:Zr,max:$t().number,icon:$t().string,caption:$t().string,canCreate:Pr,canRead:Pr,canUpdate:Pr,canDelete:Pr}),rn=$t().shape({id:$t().string,caption:$t().string,pageSize:$t().number,icon:$t().string,canCreate:Pr,canRead:Pr,canUpdate:Pr,canDelete:Pr,attributes:$t().object}),nn=$t().shape({entityUri:$t().string,entityType:$t().string,entityLabel:$t().string,object:$r}),an=$t().shape({relationUri:$t().string,relationType:$t().string,relationLabel:$t().string,direction:$t().string,object:Gr}),on=$t().shape({entity:nn,relation:an}),sn=$t().shape({value:$t().string,isRawFilter:$t().bool}),ln=$t().shape({id:$t().string,label:$t().string,name:$t().string,availableEntityTypes:$t().array}),un=$t().shape({id:$t().string,allowMergeAll:$t().bool,matchActions:$t().object,availableTabs:$t().arrayOf($t().oneOf(["findMatches","potentialMatches","notAMatch"]))}),cn=$t().shape({matchRules:$t().arrayOf($t().string),object:$r,shortestTransitiveMatchPath:$t().arrayOf($t().shape({matchRules:$t().arrayOf($t().string),match:$t().string})),direct:$t().bool,matchScore:$t().number}),pn=$t().arrayOf(cn),dn=$t().arrayOf($t().shape({uri:$t().string,label:$t().string})),yn=[{label:Pt().text("And"),value:"and"},{label:Pt().text("Or"),value:"or"},{label:Pt().text("And not"),value:"and not"},{label:Pt().text("Or not"),value:"or not"}],fn=(0,l.prop)("referencedEntityTypeURI"),Tn=(0,l.prop)("relationshipTypeURI"),En=(0,l.prop)("referencedAttributeURIs"),mn=(0,l.curry)(((e,t)=>(0,l.pipe)(En,(0,l.filter)((0,l.startsWith)(e)))(t))),hn=mn("configuration/relationTypes"),bn=mn("configuration/entityTypes"),On=(0,l.pipe)((0,l.prop)("uri"),(0,l.startsWith)("configuration/relationTypes")),vn=(0,l.filter)(On),gn=(e,t)=>!t||t.some((t=>t===e.uri));function _n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Nn=(0,l.allPass)([(0,l.propSatisfies)((0,l.either)(l.isNil,ze),"uri"),(0,l.prop)("faceted"),(0,l.either)((0,l.propEq)("type",Ot.TYPE_STRING),(0,l.propEq)("type",Ot.TYPE_BLOB))]),An=(0,l.has)("values"),Pn=(0,l.cond)([[(0,l.has)("dependentLookupCode"),(0,l.always)(Ot.TYPE_DEPENDENT_LOOKUP)],[(0,l.has)("lookupCode"),(0,l.always)(Ot.TYPE_LOOKUP)],[An,(0,l.always)(Ot.TYPE_ENUM)],[Nn,(0,l.always)(Ot.TYPE_TYPEAHEAD)],[(0,l.propEq)("type",Ot.TYPE_BOOLEAN),(0,l.always)(Ot.TYPE_BOOLEAN_RADIO)],[l.T,(0,l.prop)("type")]]),Rn=(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){_n(e,t,r[t])}))}return e}({},e,{type:Pn(e)})),(0,l.pick)(["type","values","lookupCode","uri","dependentLookupCode","singleValue"])),Sn=e=>!!e&&(!!e.autoGenerated&&e.type!==Ot.TYPE_NESTED||!!e.parentAutoGenerated),wn=(0,l.pipe)((0,l.when)((0,l.pipe)(l.type,(0,l.test)(/Object/)),(0,l.prop)("uri")),(0,l.test)(/\/analyticsAttributes\//)),In=(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),Un=e=>wn(e)?"analyticsAttributes":"attributes",Cn=(0,l.propEq)("hidden",!0),jn=(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))),Dn=jn(Ot.TYPE_NESTED),Ln=jn(Ot.TYPE_REFERENCE),kn=jn(Ot.TYPE_IMAGE),Fn=(0,l.either)(Dn,Ln),xn=(e,t)=>{const r=wn(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(".")},Mn=(0,l.either)((0,l.prop)("lookupCode"),(0,l.prop)("dependentLookupCode")),$n=(0,l.pipe)(Mn,Boolean),Vn=(0,l.pipe)((0,l.prop)("dependentLookupCode"),Boolean),Gn=(0,l.both)($n,(0,l.pipe)(Mn,("rdm",(0,l.pipe)(tt,(0,l.equals)("rdm")))));const Wn=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const n=Un({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]||Bn(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:[]},Yn=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const n=Wn(e,t,r);return n.length?(0,l.last)(n):null},Bn=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",Ot.TYPE_NESTED),(0,l.propEq)("type",Ot.TYPE_IMAGE)]),(0,l.prop)("attributes")],[(0,l.propEq)("type",Ot.TYPE_REFERENCE),(0,l.pipe)(En,(0,l.map)((t=>Yn(e,t))),(0,l.reject)(l.isNil))],[l.T,(0,l.always)(null)]])(t)},qn=[Ot.TYPE_ACTIVENESS_DATE,Ot.TYPE_DATE,Ot.TYPE_TIMESTAMP,Ot.TYPE_LOCAL_DATE],Hn=[Ot.TYPE_ACTIVENESS_DATE,Ot.TYPE_TIMESTAMP,Ot.TYPE_LOCAL_DATE],Kn=e=>qn.includes(e),Qn=e=>Hn.includes(e),Jn=[Ot.TYPE_INT,Ot.TYPE_LONG,Ot.TYPE_NUMBER,Ot.TYPE_FLOAT,Ot.TYPE_DOUBLE,Ot.TYPE_COUNT],Xn=e=>Jn.includes(e),zn=e=>[Ot.TYPE_FLOAT,Ot.TYPE_DOUBLE].includes(e),Zn=[Ot.TYPE_BOOLEAN,Ot.TYPE_BOOLEAN_RADIO,Ot.TYPE_RDM_LOOKUPS_NOT_RESOLVED],ei=e=>Zn.includes(e),ti=[Ot.TYPE_URL,Ot.TYPE_BLOG_URL,Ot.TYPE_IMAGE_URL],ri=e=>ti.includes(e),ni=jn(Ot.TYPE_EMAIL),ii=e=>Ot.TYPE_SSN===e;var ai,oi=r(36631);!function(e){e.CREATE="canCreate",e.READ="canRead",e.UPDATE="canUpdate",e.DELETE="canDelete"}(ai||(ai={}));const si=(0,l.curry)(((e,t,r)=>{var n;const i=null===(n=r[e])||void 0===n?void 0:n.roles;return!i||i.some((e=>t.includes(e)))})),li=(0,l.curry)(((e,t)=>{let{entityTypes:r}=e;return(0,l.find)((0,l.propEq)("uri",t),r)})),ui=(0,l.curry)(((e,t)=>(0,l.pipe)(li(e),(0,l.prop)("extendsTypeURI"))(t))),ci=(0,l.curry)(((e,t,r)=>{const n=r=>!!r&&(r===t||n(ui(e,r)));return n(r)})),pi=(0,l.curry)(((e,t)=>{const r=[];let n=t;for(;n;)r.push(n),n=ui(e,n);return r})),di=(e,t,r)=>(0,l.prop)(r,t)?t[r]:(0,l.prop)("extendsTypeURI",t)?di(e,li(e,t.extendsTypeURI),r):void 0,yi=(e,t)=>{const r=t.map(pi(e));return(r.length?r.reduce(l.intersection):[])[0]},fi=(e,t)=>di(e,(0,l.is)(Object,t)?t:li(e,t),"typeImage"),Ti=(e,t)=>e.entityTypes.reduce(((r,n)=>n.uri!==t&&ci(e,t,n.uri)?r.concat(n.uri):r),[]);function Ei(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const mi=(0,l.curry)(((e,t)=>{let{relationTypes:r}=e;return(0,l.find)((0,l.propEq)("uri",t),r)})),hi=(0,l.pipe)(mi,(0,l.propOr)("","label")),bi=(0,l.curry)(((e,t)=>{const r=mi(e,t);return[(0,l.path)(["startObject","objectTypeURI"],r),(0,l.path)(["endObject","objectTypeURI"],r)]})),Oi=(0,l.curry)(((e,t,r)=>{const[n,i]=bi(e,r);return ci(e,n,t)||ci(e,i,t)})),vi=(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){Ei(e,t,r[t])}))}return e}({},e,{[r]:n})}),{})),gi=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?Nt.OUT:Nt.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(Nt.IN),i=r(Nt.OUT);return{isNotDuplicatedInRelation:n,isNotDuplicatedOutRelation:i}},_i=(0,l.pathOr)("",["directionalContext",0,"labelPattern"]),Ni={CREATE:"CREATE",READ:"READ",UPDATE:"UPDATE",DELETE:"DELETE",INITIATE_CHANGE_REQUEST:"INITIATE_CHANGE_REQUEST",MERGE:"MERGE",UNMERGE:"UNMERGE"},Ai=(0,l.curry)(((e,t)=>e.every((e=>Pi(e,t))))),Pi=(0,l.curry)(((e,t)=>{const r=Sn(t);return!t||(!t.access||t.access.includes(e))&&(e===Ni.READ||!r)})),Ri=(0,l.curry)(((e,t,r)=>Pi(Ni.READ,r)&&(qt(t)?Pi(Ni.INITIATE_CHANGE_REQUEST,r):Pi(e,r)))),Si=Ri(Ni.CREATE),wi=Ri(Ni.DELETE),Ii=Ri(Ni.UPDATE),Ui=Ai([Ni.CREATE,Ni.MERGE,Ni.READ,Ni.UPDATE]),Ci=Ai([Ni.UPDATE,Ni.READ,Ni.CREATE]),ji=Ai([Ni.UPDATE,Ni.READ]),Di=Ai([Ni.DELETE,Ni.UPDATE,Ni.READ]),Li=(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["*"])),ki=(e,t,r)=>(0,l.pipe)((0,l.map)(Li(e,t)),(0,l.filter)(l.identity))(r),Fi=(e,t,r)=>{const n=ki(e,r,t);return(0===n.length||n.some((e=>{let{allowMerge:t}=e;return!1!==t})))&&Pi(Ni.MERGE,r)},xi=(0,l.curry)(((e,t,r,n)=>{const i=mi(e,n),[a,o]=bi(e,n);return i&&Pi(Ni.CREATE,i)&&ci(e,a,t.type)&&ci(e,o,r.type)})),Mi=(e,t,r,n,i)=>{const a=li(e,n.type),o=ki(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(xi(e,n,i))||a.some(xi(e,i,n))}))},$i=function(e,t,r,n){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[];const a=li(e,r.type),o=(0,l.propOr)({},"matchActions",t);return{canMerge:Fi(o,i,a),canAddRelation:Mi(e,o,i,r,n),canMark:Pi(Ni.UPDATE,a)&&Pi(Ni.READ,a)}},Vi=(e,t,r,n)=>(0,l.pipe)((0,l.map)((n=>$i(e,t,n.object,r,n.matchRules))),(0,l.reduce)((0,l.mergeWith)(l.and),{}))(n),Gi=wn,Wi=(0,l.complement)(Gi),Yi=Pi(Ni.READ),Bi=e=>{let{attributeType:t,mode:r}=e;return Wi(t)&&Si(r,t)&&!Cn(t)},qi=e=>{let{attributeType:t,attributeValue:r,mode:n,isReltioCrosswalk:i=!0}=e;const a=qe(r.uri),o=Ii(n),s=Si(n);return(0,l.cond)([[Gi,l.F],[(0,l.always)(a),l.T],[(0,l.always)(i),o],[l.T,(0,l.allPass)([o,s])]])(t)},Hi=e=>{let{attributeType:t,attributeValue:r,mode:n,isReltioCrosswalk:i=!0,metadata:a}=e;const o=qe(r.uri),s=Ii(n),u=wi(n),c=Qi(Ni.UPDATE,n,a,r),p=Qi(Ni.DELETE,n,a,r);return(0,l.cond)([[Gi,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)},Ki=(0,l.curry)(((e,t,r,n)=>{const i=Bn(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=>!Pi(e,n)||!Ki(e,t,r[n.name],n)))))})),Qi=(0,l.curry)(((e,t,r,n,i)=>qt(t)?Ki(Ni.INITIATE_CHANGE_REQUEST,r,n,i):Ki(e,r,n,i))),Ji=(0,l.both)((0,l.complement)(Cn),Yi),Xi="SuperUser",zi="allTenants",Zi=[zi,"allCustomers"],ea=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===Xi})).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===Xi){const e=r?Zi.concat(r.map((e=>`allTenants.${e}`))):Zi,n=r&&t[0]===zi?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}))},ta={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"},ra={[ta.CAN_EXPORT]:{serviceId:"export",resourcePath:["data","entities"],privileges:["EXECUTE"]},[ta.CAN_EXPORT_ACTIVITIES]:{serviceId:"export",resourcePath:["data","activities"],privileges:["EXECUTE"]},[ta.CAN_IMPORT_ENTITIES_FROM_DT]:{serviceId:"dtss",resourcePath:["data","entities"],privileges:["READ","UPDATE"]},[ta.CAN_READ_ENTITIES_FROM_DT]:{serviceId:"dtss",resourcePath:["data","entities"],privileges:["READ"]},[ta.CAN_START_PROCESS_INSTANCE_SEARCH_QUERY]:{serviceId:"workflow",resourcePath:["data","process"],privileges:["CREATE"]},[ta.CAN_VIEW_PROCESS_INSTANCE_SEARCH_QUERY]:{serviceId:"workflow",resourcePath:["data","process"],privileges:["READ"]},[ta.CAN_CREATE_CONFIG_JAR]:{serviceId:"workflow",resourcePath:["config","jar"],privileges:["CREATE","DELETE"]},[ta.CAN_CREATE_ENVIRONMENT_CONFIG_JAR]:{serviceId:"workflow",resourcePath:["environment","config","jar"],privileges:["CREATE","DELETE"]},[ta.CAN_VIEW_CONFIG_JAR]:{serviceId:"workflow",resourcePath:["config","jar"],privileges:["READ"]},[ta.CAN_VIEW_ENVIRONMENT_CONFIG_JAR]:{serviceId:"workflow",resourcePath:["environment","config","jar"],privileges:["READ"]},[ta.CAN_MANAGE_WORKFLOW_DEFINITION]:{serviceId:"workflow",resourcePath:["config","definition"],privileges:["CREATE","DELETE"]},[ta.CAN_VIEW_WORKFLOW_DEFINITION]:{serviceId:"workflow",resourcePath:["config","definition"],privileges:["READ"]},[ta.CAN_MANAGE_WORKFLOW_ENVIRONMENT_DEFINITION]:{serviceId:"workflow",resourcePath:["environment","config","definition"],privileges:["CREATE","DELETE"]},[ta.CAN_UPDATE_WORKFLOW_DATA_TASK]:{serviceId:"workflow",resourcePath:["data","tasks"],privileges:["UPDATE"]},[ta.CAN_READ_WORKFLOW_DATA_TASK]:{serviceId:"workflow",resourcePath:["data","tasks"],privileges:["READ"]},[ta.CAN_CONFIG_ENVIRONMENT_REGISTER]:{serviceId:"workflow",resourcePath:["environment","config","register"],privileges:["CREATE","DELETE"]},[ta.CAN_UPDATE_PROCESS_INSTANCE]:{serviceId:"workflow",resourcePath:["data","process"],privileges:["UPDATE","DELETE"]},[ta.CAN_EXECUTE_WORKFLOW_JOBS]:{serviceId:"workflow",resourcePath:["jobs"],privileges:["EXECUTE"]},[ta.CAN_EXECUTE_WORKFLOW_JOBS_TERMINATE_PROCESS_INSTANCE]:{serviceId:"workflow",resourcePath:["jobs","terminateProcessInstances"],privileges:["EXECUTE"]},[ta.CAN_EXECUTE_WORKFLOW_JOBS_UPDATE_TASKS]:{serviceId:"workflow",resourcePath:["jobs","updateTasks"],privileges:["EXECUTE"]},[ta.CAN_EXECUTE_WORKFLOW_JOBS_VALIDATE_TASKS]:{serviceId:"workflow",resourcePath:["jobs","validateTasks"],privileges:["EXECUTE"]},[ta.CAN_EXECUTE_WORKFLOW_JOBS_SYNC_BUSINESS_PROCESS_DATA]:{serviceId:"workflow",resourcePath:["jobs","syncBusinessProcessData"],privileges:["EXECUTE"]},[ta.CAN_VIEW_WORKFLOW_JOBS]:{serviceId:"workflow",resourcePath:["jobs"],privileges:["READ"]},[ta.CAN_MAKE_BULK_UPDATE]:{serviceId:"MDM",resourcePath:["tasks","bulk"],privileges:["EXECUTE"]},[ta.CAN_OPEN_DATA_LOADER_EXECUTE]:{serviceId:"dataloader",resourcePath:["tasks","jobs"],privileges:["EXECUTE"]},[ta.CAN_OPEN_DATA_LOADER_READ]:{serviceId:"dataloader",resourcePath:["tasks","jobs"],privileges:["READ"]},[ta.CAN_BULK_DELETE_PROFILES]:{serviceId:"MDM",resourcePath:["tasks","bulk"],privileges:["DELETE"]},[ta.IS_FREEMIUM_ADMIN]:{serviceId:"pms",resourcePath:["config","freetier","user"],privileges:["CREATE","DELETE","UPDATE"]},[ta.CAN_READ_MDM_DATA_ENTITIES]:{serviceId:"MDM",resourcePath:["data","entities"],privileges:["READ"]},[ta.CAN_READ_DVF]:{serviceId:"DVF",resourcePath:["functionsManagement"],privileges:["READ"]}},na=(0,l.curry)(((e,t,r)=>ea({allowedPermissionsNames:e,permissionsNames:ta,permissionsConfig:ra}).some((e=>e(t,{params:{tenant:r}}))))),ia=na([ta.CAN_EXPORT]),aa=na([ta.CAN_EXPORT_ACTIVITIES]),oa=na([ta.CAN_IMPORT_ENTITIES_FROM_DT]),sa=na([ta.CAN_READ_ENTITIES_FROM_DT]),la=na([ta.CAN_START_PROCESS_INSTANCE_SEARCH_QUERY]),ua=na([ta.CAN_UPDATE_PROCESS_INSTANCE]),ca=na([ta.CAN_VIEW_WORKFLOW_DEFINITION]),pa=na([ta.CAN_CONFIG_ENVIRONMENT_REGISTER]),da=na([ta.CAN_UPDATE_WORKFLOW_DATA_TASK]),ya=na([ta.CAN_READ_WORKFLOW_DATA_TASK]),fa=na([ta.CAN_MANAGE_WORKFLOW_DEFINITION]),Ta=na([ta.CAN_MANAGE_WORKFLOW_ENVIRONMENT_DEFINITION]),Ea=na([ta.CAN_EXECUTE_WORKFLOW_JOBS_SYNC_BUSINESS_PROCESS_DATA]),ma=na([ta.CAN_EXECUTE_WORKFLOW_JOBS_VALIDATE_TASKS]),ha=na([ta.CAN_EXECUTE_WORKFLOW_JOBS_UPDATE_TASKS]),ba=na([ta.CAN_EXECUTE_WORKFLOW_JOBS_TERMINATE_PROCESS_INSTANCE]),Oa=na([ta.CAN_EXECUTE_WORKFLOW_JOBS]),va=na([ta.CAN_CREATE_ENVIRONMENT_CONFIG_JAR]),ga=na([ta.CAN_CREATE_CONFIG_JAR]),_a=na([ta.CAN_VIEW_ENVIRONMENT_CONFIG_JAR]),Na=na([ta.CAN_VIEW_CONFIG_JAR]),Aa=na([ta.CAN_VIEW_PROCESS_INSTANCE_SEARCH_QUERY]),Pa=na([ta.CAN_VIEW_WORKFLOW_JOBS]),Ra=na([ta.CAN_MAKE_BULK_UPDATE]),Sa=na([ta.CAN_OPEN_DATA_LOADER_EXECUTE,ta.CAN_OPEN_DATA_LOADER_READ]),wa=na([ta.CAN_BULK_DELETE_PROFILES]),Ia=na([ta.CAN_READ_MDM_DATA_ENTITIES]),Ua=na([ta.CAN_READ_DVF]),Ca=na([ta.IS_FREEMIUM_ADMIN]),ja=(0,l.reject)(Cn),Da=(e,t)=>(0,l.pipe)((0,l.defaultTo)([]),ja,(0,l.filter)(e))(t),La=(0,l.curry)(((e,t)=>Da((t=>Bi({attributeType:t,mode:e})),t))),ka=(0,l.curry)(((e,t)=>Da((t=>Bi({attributeType:t,mode:e})||Ji(t)),t))),Fa=(0,l.pipe)((0,l.defaultTo)([]),(0,l.filter)(Ji)),xa=(0,l.pipe)((0,l.propOr)([],"attributes"),(0,l.chain)((0,l.when)((0,l.has)("attributes"),(e=>[e,...xa(e)])))),Ma=(0,l.pipe)((0,l.propOr)([],"attributes"),(0,l.filter)(Ji),(0,l.chain)((0,l.when)((0,l.has)("attributes"),(e=>[e,...Ma(e)])))),$a=(0,l.pipe)((0,l.propOr)([],"analyticsAttributes"),(0,l.chain)((0,l.when)((0,l.has)("analyticsAttributes"),(e=>[e,...$a(e)])))),Va=(0,l.pipe)(li,(0,l.converge)(l.concat,[Ma,$a]));function Ga(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){Wa(e,t,r[t])}))}return e}function Wa(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Ya=(0,l.curry)(((e,t)=>(0,l.evolve)({attributes:(0,l.map)((0,l.pipe)(e,Ya(e)))},t))),Ba=e=>{var t;return Ga({},e,{matchGroups:(e.matchGroups||[]).concat((null===(t=e.hidden)||void 0===t?void 0:t.matchGroups)||[])})},qa=(0,l.both)((0,l.has)("values"),(0,l.has)("lookupCode")),Ha=(0,l.when)(qa,(0,l.dissoc)("values")),Ka=(0,l.when)((0,l.has)("lookupCode"),(e=>{let{lookupCode:t}=e;return Ga({},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})})),Qa=e=>{let{hidden:t,dependentLookupAttributes:r}=e;return!t&&r},Ja=(0,oi.Z)((e=>{const{entityTypes:t=[],relationTypes:r=[]}=e;return(0,l.chain)(xa,t).concat((0,l.chain)(xa,r)).some(Qa)})),Xa=e=>{let t=!1;const r=Ya((e=>e.cardinality&&(t=!0,e.cardinality.minValue)?Ga({},e,{required:!0}):e))(e);return t&&(r.forceValidate=!0),r},za=e=>{const t=Ja(e),r=(0,l.map)((e=>Ya((0,l.pipe)(Ha,(0,l.when)((0,l.always)(e),Ka))))(t)),n=(0,l.map)(Ba),i=(0,l.map)(Xa);return(0,l.evolve)({entityTypes:(0,l.pipe)(r,n,i),relationTypes:(0,l.pipe)(r,i)},e)},Za=(0,l.curry)(((e,t)=>{let{graphTypes:r=[]}=e;return(0,l.find)((0,l.propEq)("uri",t),r)})),eo=(0,l.prop)("relationshipTypeURIs"),to=(0,l.curry)(((e,t)=>e.graphTypes.filter(ro(e,t)))),ro=(e,t)=>r=>{let{relationshipTypeURIs:n}=r;return n.some(Oi(e,t))},no=(e,t)=>(0,l.pipe)(Za,(0,l.defaultTo)({}),eo,(0,l.defaultTo)([]),(0,l.chain)(bi(e)),(0,l.reject)(l.isNil),l.uniq,(0,l.map)(li(e)))(e,t),io=(0,l.allPass)([(0,l.propEq)("matchMethod","match_iq"),(0,l.anyPass)([(0,l.propEq)("scope","ALL"),(0,l.propEq)("scope","INTERNAL")])]),ao=e=>(0,l.pipe)((0,l.defaultTo)({}),(0,l.prop)("matchGroups"),(0,l.defaultTo)([]),(0,l.any)(e)),oo=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return ao((0,l.complement)(io))(e)},so=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return ao(io)(e)},lo=(0,l.pipe)(li,(0,l.propOr)([],"matchGroups")),uo=(e,t,r)=>(0,l.pipe)(lo,(0,l.find)((0,l.propEq)("uri",r)))(e,t),co=(0,l.curry)(((e,t,r)=>(0,l.pipe)(uo,(0,l.propOr)(r,"label"))(e,t,r))),po=(0,l.curry)(((e,t,r)=>{const n=(0,l.pipe)(lo,(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]})),yo=e=>(0,l.partition)(io,e),fo=(0,l.includes)(l.__,["and","or","not"]),To=(0,l.includes)(l.__,(0,l.values)({EXACT:"exact",EXACT_OR_NULL:"exactOrNull",EXACT_OR_ALL_NULL:"exactOrAllNull",NOT_EXACT_SAME:"notExactSame",FUZZY:"fuzzy"})),Eo=(0,l.includes)(l.__,["equals","notEquals","in"]),mo=(0,l.pipe)(l.toPairs,(0,l.chain)((e=>{let[t,r]=e;return fo(t)?mo(r):To(t)?r.filter(ze):Eo(t)?r.map((0,l.prop)("uri")).filter(ze):[]})),l.uniq),ho=(0,l.pipe)((0,l.pluck)("rule"),(0,l.chain)(mo),l.uniq),bo=(0,l.pipe)(lo,ho),Oo=(0,l.pipe)(po,ho),vo=(e,t)=>{let{interactionTypes:r}=e;return(0,l.find)((0,l.propEq)("uri",t),r)},go=(0,l.pipe)(vo,Ma),_o=(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||ci(e,n,t)})(e,t))})(e,t)),No=e=>!!e.required,Ao=(e,t,r)=>{const n=(0,l.cond)([[ze,li(e)],[Ze,mi(e)]])(t);return Po(e,n,r)},Po=(e,t,r)=>!t||t.hidden&&!(e=>e.uri&&ze(e.uri)&&3===e.uri.split("/").length)(t)?[]:t.attributes?t.attributes.filter((e=>!e.hidden&&!Sn(e))).flatMap((t=>{const n=t.required?[t]:[];if(r){let i;if(t.type===Ot.TYPE_REFERENCE){const n=Tn(t),a=En(t);i=Ao(e,n,r).filter((e=>a.some(et(e.uri))))}else t.attributes&&(i=Po(e,t,r));i&&n.push(...i)}return n})):t.type===Ot.TYPE_REFERENCE?Ao(e,Tn(t),r):[],Ro=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),No]),e.attributes||[])},So=(e,t)=>{const r=bn(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},wo=(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)?Pt().text(n):n};return r(null,t)})),Io=["label","description","abbreviation","caption","toolTip"],Uo=e=>wo(Io,e),Co=(0,l.curry)(((e,t)=>{const{sources:r}=e,n=rt(t);return r.find((e=>{let{uri:t}=e;return rt(t)===n}))})),jo=(0,l.curry)(((e,t)=>{const r=rt(t);return(0,l.pipe)(Co(l.__,t),(0,l.unless)(l.isNil,(0,l.propOr)(r,"label")))(e)})),Do=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"})},Lo=(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}))},ko=(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)})),Fo=(e,t)=>(e.roles||[]).filter((r=>{var n;return((null===(n=li(e,t))||void 0===n?void 0:n.entityTypeRoleURIs)||[]).includes(r.uri)}));function xo(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}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 $o=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 Z.fromNull(i&&i.length?i:Bn(e,t)).map((t=>t.map((t=>{const i=$o(e,t,r,n);return i.length?xo({},t,{children:i}):t})))).orSome([]).filter((0,l.either)((0,l.complement)(Fn),(0,l.prop)("children"))).filter(Ji).filter(r).filter((0,l.either)((0,l.prop)("label"),(0,l.prop)("name")))},Vo=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.identity;return $o(e,t,r,["attributes","analyticsAttributes"])},Go=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.identity;return $o(e,t,r,["attributes"])},Wo=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.identity;return $o(e,t,r,["analyticsAttributes"])},Yo=(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)})),Bo=(0,l.curry)(((e,t)=>(t||[]).find((t=>{let{uri:r}=t;return rt(r)===e})))),qo=e=>{let{survivorshipStrategies:t}=e;const[r]=t||[];return(0,l.pipe)((0,l.either)((0,l.find)((0,l.propEq)("default",!0)),Bo("LUD")),(0,l.defaultTo)(r))(t||[])},Ho=(e,t)=>{let{survivorshipStrategies:r}=e;return Bo(t,r)},Ko=(0,l.allPass)([(0,l.complement)(l.isNil),Pi(Ni.READ)]),Qo=(0,l.allPass)([(0,l.complement)(l.isNil),(0,l.complement)((0,l.prop)("abstract")),(0,l.complement)((0,l.propEq)("uiConfigHiddenType",!0)),Pi(Ni.READ)]),Jo=(0,l.allPass)([(0,l.complement)(l.isNil),(0,l.complement)((0,l.prop)("abstract")),(0,l.complement)((0,l.propEq)("uiConfigHiddenType",!0)),Pi(Ni.CREATE)]),Xo=(0,l.curryN)(2,(0,l.pipe)(li,Qo)),zo=e=>{let{ov:t}=e;return!1!==t},Zo=(e,t)=>((e,t)=>ri(e.type)&&ae(t))(e,t)||((e,t)=>ni(e.type)&&oe(t))(e,t),es=(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))),ts=es("refEntity"),rs=es("refRelation"),ns=e=>(0,l.isEmpty)(e)?[]:[{objectURI:e.uri,type:e.type}],is=e=>{let{uri:t}=e;return[{type:"configuration/sources/Reltio",objectURI:`relations/${(0,l.pipe)((0,l.split)("/"),l.last)(t)}`}]},as=(0,l.prop)("objectURI"),os=(0,l.prop)("objectURI"),ss=(0,l.prop)("type"),ls=(0,l.pipe)(ts,(0,l.defaultTo)({}),as),us=(0,l.pipe)(rs,(0,l.defaultTo)({}),os),cs=(0,l.pipe)(ts,(0,l.defaultTo)({}),ss),ps=(e,t)=>{const r=(t&&t.crosswalks||[]).map((e=>({attributes:e.attributeURIs||[],type:e.type})));return(e||[]).concat(r)},ds=(0,l.evolve)({refEntity:re,refRelation:re}),ys=(e,t,r,n)=>{const i=Wn(e,r),a=li(e,t.type)||mi(e,t.type);if(0===i.length)return null;const o=Un(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(!gn(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=>Tn(e)===r.uri||fn(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},fs=(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?fs(a.value,o):a},Ts=(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 fs(e[r],i)})),Es=(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")]]),ms=(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.map)(Es),(0,l.when)((()=>i.length>0),(0,l.map)(ms(e,i))))(r)})),hs=ms(null),bs=ms(zo),Os=(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=Ts(e,t))||void 0===i||null===(a=i.value)||void 0===a?void 0:a[r]},vs=(e,t)=>(0,l.pipe)(l.values,l.flatten,(0,l.find)((0,l.pipe)(ls,(0,l.equals)(t))))((null==e?void 0:e.attributes)||{});function gs(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){_s(e,t,r[t])}))}return e}function _s(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Ns=e=>{let{parentUri:t,attributeType:r}=e;return gs({uri:Be(t,r.name),ov:!0,type:r.uri},(e=>{const t=(0,l.propOr)("","defaultValue",e);return(0,l.cond)([[Fn,(0,l.always)({value:{}})],[$n,()=>t?{value:"",lookupCode:t}:{value:""}],[l.T,(0,l.always)({value:t})]])(e)})(r))},As=e=>{let{attributeTypes:t,parentUri:r,metadata:n,mode:i}=e;const a=(0,l.pipe)(La(i),(0,l.filter)((0,l.anyPass)([(0,l.has)("defaultValue"),Vn,(0,l.propEq)("required",!0)])))(t),o={};for(const e of a){const{name:t}=e,a=Ns({parentUri:r,attributeType:e});let s=Bn(n,e);s&&(e.type===Ot.TYPE_REFERENCE&&(s=vn(s)),a.value=As({parentUri:a.uri,attributeTypes:s,metadata:n,mode:i})),(0,l.isEmpty)(a.value)&&!Vn(e)||(o[t]=[a])}return o},Ps=e=>{let{entity:t,metadata:r}=e;return Ao(r,t.type,!0).filter(Vn).reduce(((e,t)=>{const n=t.name,i=ut(t.uri);return(i===e.type?[{parentUri:e.uri,attributes:e.attributes}]:ys(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:Ss({entity:e,attributeType:t,parentUri:i,index:0})}),e)}),t)},Rs=(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===Ot.TYPE_NESTED?gs({},e,{value:Rs({attributeTypes:o,parentUri:n,metadata:r,mode:a},t)}):e}))}));return gs({},s(t),As({attributeTypes:o,parentUri:i,metadata:r,mode:a}))})),Ss=e=>{let{entity:t,attributeType:r,parentUri:n,index:i,crosswalks:a,value:o,nestingLevel:s}=e;const l=Ns({parentUri:n,attributeType:r}),u=Es(l);return(0,Me.ZP)(t,(e=>{Se(e.attributes||e.value,r,l.uri,void 0!==o?o:u,a,s,i)}))},ws=e=>{let{entity:t,attributeType:r,newAttribute:n,index:i,crosswalks:a,nestingLevel:o}=e;return(0,Me.ZP)(t,(e=>{Se(e.attributes||e.value,r,n.uri,Es(n),a,o,i)}))},Is=e=>{let{entity:t,attributeType:r,uri:n,value:i,crosswalks:a,nestingLevel:o}=e;return(0,Me.ZP)(t,(e=>{we(e.attributes||e.value,r,n,i,a,o)}))},Us=e=>{let{entity:t,attributeType:r,uri:n,nestingLevel:i}=e;return(0,Me.ZP)(t,(e=>{Ue(e.attributes||e.value,r,n,i)}))},Cs=(0,l.either)((0,l.propSatisfies)((0,l.anyPass)([e=>""===e,l.isNil]),"value"),(0,l.both)((0,l.propSatisfies)(l.isEmpty,"value"),(0,l.propSatisfies)((0,l.either)(l.isNil,l.isEmpty),"refEntity"))),js=(0,l.reject)(Cs),Ds=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=>Ds({deleteEmptyComplex:t,valueTransformer:r})(e)))}))),js)),(0,l.when)((0,l.always)(t),(0,l.reject)(l.isEmpty)))},Ls=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return Ds({valueTransformer:(0,l.pipe)((0,l.omit)(["type","uri"]),ds),deleteEmptyComplex:e})},ks=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return(0,l.pipe)(Ls(e),(0,l.reject)(l.isEmpty))},Fs=Object.values(wt),xs=(0,l.includes)(l.__,Fs),Ms=e=>Fs.reduce(((t,r)=>{let{uri:n}=r;return void 0!==e[n]?(0,l.assoc)(n,e[n],t):t}),{});function $s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Vs(e,t,r[t])}))}return e}function Vs(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Gs=(e,t)=>`${e}_${t}`,Ws=[xt.matches.name,xt.matchRules.name],Ys=(0,l.values)(Ut).map((e=>e.name)),Bs=e=>(0,l.when)((0,l.always)(!e),(0,l.reject)((0,l.pipe)((0,l.prop)("name"),(0,l.includes)(l.__,Ys)))),qs=(0,l.curry)(((e,t)=>{const r=t.filter((0,l.pipe)((0,l.prop)("name"),(0,l.includes)(l.__,Ws)));return(e||[]).flatMap((e=>r.map((0,l.evolve)({label:(0,l.concat)(`${e.label} `),name:t=>Gs(`dtPotentialMatches.${t}`,e.id)})))).concat(t)})),Hs=function(e,t){let r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return(0,l.pipe)(l.values,Bs(r),qs(t),(0,l.find)((0,l.either)((0,l.propEq)("name",e),t?l.F:t=>e.startsWith(Gs(`dtPotentialMatches.${t.name}`,"")))))(xt)},Ks=(0,l.propEq)("uri",xt.type.uri),Qs=e=>(0,l.values)(Ft).some((0,l.propEq)("uri",e.uri)),Js=(0,l.propEq)("uri",kt.sourceSystems.uri),Xs=Object.values(It),zs=(0,l.includes)(l.__,Xs),Zs=e=>{let{entity:t,attributeType:r,value:n}=e;return $s({},t,{[r.uri]:void 0===n?r.defaultValue:n})},el=e=>{let{entity:t,attributeType:r}=e;return(0,l.dissoc)(r.uri,t)},tl=e=>{let{entity:t,attributeType:r,value:n}=e;return $s({},t,{[r.uri]:n})},rl=(0,l.propEq)("uri",It.roles.uri),nl=(0,l.propEq)("uri",It.tags.uri),il=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)},al="UrlThumbnail",ol="CdnUrlThumbnail",sl=(0,l.curry)(((e,t,r)=>{const n=(0,l.prop)(e,t);if(Array.isArray(n)){const e=r?n.find(zo):(0,l.head)(n);return e&&e.value}return null})),ll=(e,t)=>(0,l.pipe)((0,l.propOr)({},"value"),(r=>e.map((e=>sl(e,r,t)))),(0,l.filter)(l.identity),l.head,(0,l.defaultTo)("")),ul=ll(["CdnUrl","Url"],!0),cl=ll(["CdnUrlPreview","UrlPreview"],!0),pl=ll([ol,al],!0),dl=ll([ol,al]),yl=(e,t,r)=>{const{attributes:n={}}=t,{analyticsAttributes:i={}}=t;return e.reduce(((e,a)=>{const o=(0,l.cond)([[In,(0,l.always)(t)],[(0,l.both)(wn,(0,l.always)(i)),(0,l.always)(i)],[l.T,(0,l.always)(n)]])(a),s=In(a)?"uri":"name",u=(0,l.pipe)((0,l.prop)(a[s]),(0,l.when)((0,l.both)((0,l.always)(xs(a)),(e=>null===e)),(0,l.always)([""])),(0,l.defaultTo)([]),ne)(o);return(0,l.when)((0,l.always)(r(u,a)),(0,l.append)({attrType:a,values:u}),e)}),[])},fl=(e,t,r)=>{const n=Fa(e),i=(0,l.any)(r?l.T:zo);return yl(n,t,i)},Tl=(e,t,r,n,i,a)=>{const o=qe(null==r?void 0:r.uri)?La(t,e):ka(t,e);return yl(o,r,((e,o)=>{const s=Bi({attributeType:o,mode:t});return n&&s||o.required&&s||(0,l.any)(i?l.T:zo,e)||In(o)&&(0,l.has)(o.uri,r)||(null==a?void 0:a.includes(o.uri))}))};let El;const ml=e=>{El=e};function hl(e,t){return El(e,t)}const bl=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)})),Ol=e=>{let{type:t,parents:r=[],displayNamePrefix:n,max:i=50}=e;return hl("/lookups/list",{method:"POST",body:JSON.stringify({type:t,parents:r,displayNamePrefix:n,max:i}),headers:{"Content-Type":"application/json"}})},vl=(0,l.once)((()=>hl("/lookups",{method:"GET",headers:{"Content-Type":"application/json"}}))),gl=e=>hl("/lookups/resolveList",{method:"POST",body:JSON.stringify(e),headers:{"Content-Type":"application/json"}}),_l=(e,t)=>hl("/lookups/cascadeUpdate",{method:"POST",body:JSON.stringify({state:e,updatedValue:t}),headers:{"Content-Type":"application/json"}}),Nl=e=>Z.fromNull(yt[e]).map(Pt().text).orSome(""),Al=(0,l.curry)(((e,t)=>`${e}_${t}`)),Pl=(0,l.split)("_"),Rl=(0,l.includes)("_"),Sl=(0,l.curry)(((e,t)=>e&&(e===t||e.endsWith(`_${t}`)))),wl=(0,l.curry)(((e,t)=>e.some(Sl(t)))),Il=wl([pt.IN_RANGE,pt.COUNT_RANGE,pt.WITHIN]),Ul=wl([pt.EXISTS,pt.MISSING_VALUE]),Cl=(0,l.cond)([[Ul,(0,l.always)(0)],[Il,(0,l.always)(2)],[l.T,(0,l.always)(1)]]),jl=(0,l.complement)(Ul),Dl=wl([pt.HAS_ALL,pt.EQUALS,pt.NOT_EQUALS]),Ll=wl([pt.COUNT_EQUALS,pt.COUNT_NOT_EQUALS,pt.COUNT_LT,pt.COUNT_LTE,pt.COUNT_GT,pt.COUNT_GTE,pt.COUNT_RANGE]),kl=wl([pt.IN_FILE,pt.NOT_IN_FILE]),Fl=e=>{switch(e){case pt.COUNT_EQUALS:return pt.EQUALS;case pt.COUNT_NOT_EQUALS:return pt.NOT_EQUALS;case pt.COUNT_LT:return pt.LT;case pt.COUNT_LTE:return pt.LTE;case pt.COUNT_GT:return pt.GT;case pt.COUNT_GTE:return pt.GTE;case pt.COUNT_RANGE:return pt.IN_RANGE}},xl=wl([pt.ON,pt.BEFORE,pt.AFTER,pt.WITHIN,pt.NOT_EQUALS]),Ml=wl([pt.WITHIN]),$l=[[pt.COUNT_EQUALS,pt.COUNT_NOT_EQUALS,pt.COUNT_LT,pt.COUNT_LTE,pt.COUNT_GT,pt.COUNT_GTE],[pt.NOT_IN_FILE,pt.IN_FILE],[pt.EQUALS,pt.NOT_EQUALS,pt.HAS_ALL],[pt.LT,pt.LTE,pt.GT,pt.GTE],[pt.MISSING_VALUE,pt.EXISTS],[pt.COUNT_RANGE],[pt.IN_RANGE],[pt.STARTS_WITH,pt.CONTAINS],[pt.FULL_TEXT],[pt.ON,pt.BEFORE,pt.AFTER,pt.NOT_EQUALS],[pt.WITHIN]],Vl=(e,t)=>$l.some((r=>r.includes(e)&&r.includes(t))),Gl=(0,l.pipe)(l.omit,l.values),Wl={OPTIONS_FOR_STRING:Gl(["IN_RANGE","LT","LTE","GT","GTE","ON","BEFORE","AFTER","WITHIN"],pt),OPTIONS_FOR_DATE:[pt.ON,pt.BEFORE,pt.AFTER,pt.WITHIN,pt.NOT_EQUALS,pt.MISSING_VALUE,pt.EXISTS,pt.COUNT_EQUALS,pt.COUNT_NOT_EQUALS,pt.COUNT_LT,pt.COUNT_LTE,pt.COUNT_GT,pt.COUNT_GTE,pt.COUNT_RANGE,pt.IN_FILE,pt.NOT_IN_FILE],OPTIONS_FOR_BOOLEAN:Gl(["STARTS_WITH","IN","NOT_IN","HAS_ALL","IN_RANGE","FULL_TEXT","LT","LTE","GT","GTE","CONTAINS","ON","BEFORE","AFTER","WITHIN"],pt),OPTIONS_FOR_BLOB:Gl(["EQUALS","NOT_EQUALS","STARTS_WITH","IN","NOT_IN","HAS_ALL","IN_RANGE","LT","LTE","GT","GTE","ON","BEFORE","AFTER","WITHIN"],pt),OPTIONS_FOR_NUMBER:Gl(["STARTS_WITH","FULL_TEXT","CONTAINS","ON","BEFORE","AFTER","WITHIN"],pt),OPTIONS_FOR_LOOKUP:Gl(["STARTS_WITH","FULL_TEXT","IN_RANGE","LT","LTE","GT","GTE","ON","BEFORE","AFTER","WITHIN","CONTAINS"],pt),OPTIONS_FOR_ENUM:Gl(["STARTS_WITH","FULL_TEXT","IN_RANGE","LT","LTE","GT","GTE","ON","BEFORE","AFTER","WITHIN"],pt),OPTIONS_FOR_ID:[pt.EQUALS,pt.NOT_EQUALS,pt.IN_FILE,pt.NOT_IN_FILE],OPTIONS_FOR_COUNT:[pt.EQUALS,pt.NOT_EQUALS,pt.LT,pt.LTE,pt.GT,pt.GTE,pt.IN_RANGE],OPTIONS_FOR_COMPLEX:[pt.COUNT_EQUALS,pt.COUNT_NOT_EQUALS,pt.COUNT_LT,pt.COUNT_LTE,pt.COUNT_GT,pt.COUNT_GTE,pt.COUNT_RANGE,pt.EXISTS,pt.MISSING_VALUE],OPTIONS_FOR_UNKNOWN_TYPE:[pt.EQUALS,pt.NOT_EQUALS,pt.EXISTS,pt.MISSING_VALUE]},Yl=e=>{const{type:t,singleValue:r=!1}=e,n=(e=>{switch(e){case Ot.TYPE_TYPEAHEAD:case Ot.TYPE_STRING:case Ot.TYPE_PASSWORD:case Ot.TYPE_TEXT:case Ot.TYPE_CIK_ID:case Ot.TYPE_URL:case Ot.TYPE_BLOG_URL:case Ot.TYPE_IMAGE_URL:case Ot.TYPE_EMAIL:return Wl.OPTIONS_FOR_STRING;case Ot.TYPE_LOOKUP:case Ot.TYPE_DEPENDENT_LOOKUP:return Wl.OPTIONS_FOR_LOOKUP;case Ot.TYPE_ENUM:return Wl.OPTIONS_FOR_ENUM;case Ot.TYPE_DATE:case Ot.TYPE_ACTIVENESS_DATE:case Ot.TYPE_TIMESTAMP:case Ot.TYPE_LOCAL_DATE:return Wl.OPTIONS_FOR_DATE;case Ot.TYPE_BOOLEAN:case Ot.TYPE_BOOLEAN_RADIO:return Wl.OPTIONS_FOR_BOOLEAN;case Ot.TYPE_BLOB:return Wl.OPTIONS_FOR_BLOB;case Ot.TYPE_LONG:case Ot.TYPE_INT:case Ot.TYPE_FLOAT:case Ot.TYPE_DOUBLE:case Ot.TYPE_NUMBER:return Wl.OPTIONS_FOR_NUMBER;case Ot.TYPE_ENTITY_ID:return Wl.OPTIONS_FOR_ID;case Ot.TYPE_RDM_LOOKUPS_NOT_RESOLVED:return[pt.EQUALS];case Ot.TYPE_COUNT:return Wl.OPTIONS_FOR_COUNT;case Ot.TYPE_NESTED:case Ot.TYPE_REFERENCE:case Ot.TYPE_IMAGE:return Wl.OPTIONS_FOR_COMPLEX;default:return Wl.OPTIONS_FOR_UNKNOWN_TYPE}})(t);return r?(0,l.reject)(Ll,n):n},Bl=e=>[nr.and,nr.andNot].includes(e),ql=e=>[nr.or,nr.orNot].includes(e),Hl=e=>e.slice(0,-1).some((0,l.pipe)((0,l.prop)("operator"),ql)),Kl=(Ql=[nr.and],e=>e.slice(0,-1).every((e=>Ql.includes(e.operator))));var Ql;const Jl=e=>e.map(((e,t,r)=>{const n=0===t;return(0,l.assoc)("operator",n?null:r[t-1].operator,e)}),[]),Xl=e=>e.map(((e,t,r)=>{const n=t===r.length-1;return(0,l.assoc)("operator",n?null:r[t+1].operator,e)}),[]),zl=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},Zl=function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const r=[nr.or,nr.orNot],n=t?[nr.and,nr.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)&&zl(e.slice(1,-1));return!i&&!a||o?e:`(${e})`},eu="and",tu=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)(eu,n,e),o=(e=>[nr.andNot,nr.orNot].includes(e))(a)?Zl(r):r;return i?o:`${t} ${a} ${o}`}),"")}},ru=(0,l.curry)(((e,t)=>{const r=(0,l.unless)(l.isNil,e);return Array.isArray(t)?t.map(r):r(t)})),nu=e=>Array.isArray(e)?e.map(nu).toString():"object"==typeof e&&"lookupCode"in e?e.lookupCode:e.toString().trim(),iu=(0,l.replace)(/./g,(e=>{switch(e){case"\\":e="\\\\";break;case"'":e="\\'";break;case'"':e='\\"'}return e})),au=e=>`'${e}'`,ou=e=>`"${e}"`,su=(0,l.pipe)(nu,iu),lu=(0,l.pipe)(su,au),uu=(0,l.curry)(((e,t)=>(0,l.cond)([[(0,l.allPass)([(0,l.always)(Il(e)),Array.isArray]),()=>`${t[0]} - ${t[1]}`],[Array.isArray,()=>t.join(", ")],[l.T,l.identity]])(t))),cu=(e,t)=>Ll(t)?{type:Ot.TYPE_INT}:kl(t)?{type:Ot.TYPE_FILE}:xl(t)&&!Ml(t)&&Qn(e.type)?{type:Ot.TYPE_LOCAL_DATE}:e,pu=Object.values(ht),du=e=>pu.includes(e),yu=e=>Pt().text(bt[e]),fu=e=>{const t=f()();switch(e){case ht.LAST_DAY:return[f()(t).subtract(1,"day").valueOf(),t.valueOf()];case ht.LAST_3DAYS:return[f()(t).subtract(3,"day").valueOf(),t.valueOf()];case ht.LAST_WEEK:return[f()(t).subtract(1,"week").valueOf(),t.valueOf()];case ht.LAST_MONTH:return[f()(t).subtract(1,"month").valueOf(),t.valueOf()];case ht.LAST_YEAR:return[f()(t).subtract(1,"year").valueOf(),t.valueOf()]}return e};function Tu(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){Eu(e,t,r[t])}))}return e}function Eu(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const mu=(0,l.curry)(((e,t)=>t.length>1?`(${t.join(e)})`:t.toString())),hu=(0,l.curry)(((e,t,r)=>{const n=r.map(Il(e)||t.endsWith(".count")?su:lu).join(",");return n?`${e}(${t},${n})`:`${e}(${t})`})),bu=e=>t=>{switch(e){case 0:return[[]];case 1:return t.map((e=>[e]));default:return t}},Ou=e=>{let{filter:t,fieldName:r,values:n}=e;const i=Cl(t);return(0,l.pipe)(bu(i),(0,l.map)(hu(t,r)),mu(" or "))(n)},vu=e=>{let{filter:t,fieldName:r,values:n}=e;return`${t}(${r},${(0,l.flatten)(n).map(lu).join(",")})`},gu=e=>`*${e}*`,_u=e=>`URL:${e}`,Nu=e=>e.length>1||Array.isArray(e[0])&&e[0].length>1,Au=(e,t)=>{const r="id"===t?"listEqualsCaseSensitive":"listEquals";return e===pt.IN_FILE?r:`not ${r}`},Pu=(e,t)=>[R(e,t),S(e,t)],Ru=(0,l.pipe)((e=>{const{values:t,filter:r}=e,n=!Su(e);if(!(0,l.isEmpty)(t)){const[i]=t;switch(r){case pt.ON:return Tu({},e,n?{filter:pt.EQUALS}:{filter:pt.IN_RANGE,values:[Pu(i,n)]});case pt.BEFORE:return Tu({},e,{filter:pt.LTE,values:[[S(i,n)]]});case pt.AFTER:return Tu({},e,{filter:pt.GTE,values:[[R(i,n)]]});case pt.WITHIN:return Tu({},e,{filter:pt.IN_RANGE,values:[fu(i)]})}}return e}),Ou),Su=(0,l.propSatisfies)(Qn,"type"),wu=[[(0,l.prop)("rawFilter"),(0,l.prop)("rawFilter")],[(0,l.propEq)("filter",pt.HAS_ALL),e=>{let{fieldName:t,values:r}=e;return(0,l.pipe)((0,l.map)((e=>e.reduce(((e,r)=>e.addClause(Ou({filter:pt.EQUALS,fieldName:t,values:[r]}))),new tu).build())),mu(" or "))(r)}],[(0,l.propEq)("filter",pt.CONTAINS),e=>{let{filter:t,fieldName:r,values:n}=e;return Ou({fieldName:r,filter:t,values:n.map((0,l.pipe)(nu,gu))})}],[(0,l.propEq)("filter",pt.EQUALS),e=>{const{fieldName:t,values:r}=e;return"type"===t?Ou(Tu({},e,{values:(0,l.flatten)(r)})):Nu(r)?vu(Tu({},e,{filter:"listEquals"})):Ou(e)}],[(0,l.propEq)("filter",pt.NOT_EQUALS),e=>{const{values:t}=e;return"type"===e.fieldName?(e=>{let{filter:t,fieldName:r,values:n}=e;const i=Cl(t);return(0,l.pipe)(bu(i),(0,l.map)(hu(t,r)),mu(" and "))(n)})(Tu({},e,{values:(0,l.flatten)(e.values)})):Su(e)?(e=>{const{values:t}=e,r=!Su(e),[n]=t;return(new tu).addClause(Ou(Tu({},e,{filter:pt.LT,values:[R(n,r)]}))).addClause(Ou(Tu({},e,{filter:pt.GT,values:[S(n,r)]}))).orBuild()})(e):Nu(t)?vu(Tu({},e,{filter:"not listEquals"})):Ou(e)}],[(0,l.propSatisfies)(kl,"filter"),e=>{let{filter:t,fieldName:r,values:n}=e;return Ou({fieldName:r,filter:Au(t,r),values:n.map((0,l.prop)("link")).map(_u)})}],[(0,l.propSatisfies)(Ll,"filter"),e=>{let{filter:t,fieldName:r,values:n}=e;return Ou({fieldName:`${r}.count`,values:n,filter:Fl(t)})}],[(0,l.propSatisfies)(xl,"filter"),Ru],[(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 hu(t,n,[])}],[(0,l.propEq)("fieldName","geoLocation"),e=>{let{fieldName:t,values:[[r,n,i]],filter:a}=e;return hu(a,`${t},'${r},${n}',0,${i}`,[])}],[l.T,Ou]],Iu=function(){let{filter:e,fieldName:t,values:r,rawFilter:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n||e&&t&&(!jl(e)||Cu(r))},Uu=e=>Array.isArray(e)?Cu(e):null!=e&&nu(e).length>0,Cu=e=>e&&e.length>0&&e.every(Uu);function ju(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Du=e=>{let{fieldName:t=""}=e;const r=t.split("."),n=r.indexOf("attributes");return n>=0?r.slice(0,n+2).join("."):t},Lu=(0,l.pipe)((0,l.propOr)("","fieldName"),(0,l.split)("."),(0,l.slice)(0,-1),(0,l.join)(".")),ku=(e,t,r)=>"children"===e?xu(r,[...t][0],!0):r,Fu=(e,t,r)=>"values"===e?[...r,...t]:r,xu=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)(ku,t),e);if(!r&&Dl(t.filter)&&t.filter===i.filter)return(0,l.adjust)(n,(0,l.mergeDeepWithKey)(Fu,t),e)}return(0,l.append)(t,e)},Mu=(0,l.reduce)(((e,t)=>{const r=(e=>{const t=Du(e),r=e=>e.fieldName===t?e:r({fieldName:Lu(e),children:[e]});return r(e)})(t);return xu(e,r)}),[]),$u=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")),Vu=e=>{let[t]=e;return t.children?Vu(t.children):t.operator},Gu=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=Vu(t)===nr.andNot,a=n(t,!1),o=i?`not ${Zl(a)}`:a,s=n(r,!1);return`inSameAttributeValue(${o} ${Vu(r)||eu} ${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&&$u(i)&&!t?r(i):n(i,a)}],...e])(o))),new tu).buildWithOperators(i.map((0,l.prop)("operator")))}return n},Wu=(0,l.pipe)((0,l.propOr)("","filter"),Rl),Yu=(0,l.map)((0,l.when)(Wu,(e=>{const[t,r]=Pl(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){ju(e,t,r[t])}))}return e}({},e,{fieldName:`${e.fieldName}.${t}`,filter:r})}))),Bu=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)(Iu),Yu,Mu,Gu([...e,...wu],t))},qu=(0,l.curry)(((e,t)=>(e&&(t=t?`(${t}) and (${e})`:e),t))),Hu=[pt.ON,pt.BEFORE,pt.AFTER,pt.WITHIN,pt.NOT_EQUALS,pt.MISSING_VALUE,pt.EXISTS],Ku=[pt.EQUALS,pt.NOT_EQUALS,pt.STARTS_WITH,pt.MISSING_VALUE,pt.HAS_ALL,pt.FULL_TEXT,pt.EXISTS],Qu=[pt.EQUALS,pt.NOT_EQUALS,pt.LT,pt.LTE,pt.GT,pt.GTE,pt.IN_RANGE],Ju=(e,t)=>{const r=Rn(e);return(e=>{switch(e){case wt.startDate.name:case wt.endDate.name:case Ut.dueDate.name:case Dt.createdTime.name:case Dt.updatedTime.name:case kt.reltioLoadDate.name:case kt.createDate.name:case kt.updateDate.name:case kt.deleteDate.name:case kt.publishDate.name:return Hu;case Lt.matches.name:case kt.count.name:return Qu;case Ut.workflow.name:case Ut.assignee.name:case Ut.step.name:case Ct.commenter.name:case Dt.createdBy.name:case Dt.updatedBy.name:case kt.sourceSystems.name:case kt.value.name:return Ku;default:return null}})(t)||Yl(r)},Xu=[pt.EQUALS,pt.NOT_EQUALS,pt.CONTAINS,pt.STARTS_WITH,pt.MISSING_VALUE,pt.HAS_ALL,pt.IN_RANGE,pt.WITHIN,pt.EXISTS,pt.ON],zu=(0,l.pipe)(Ju,(0,l.filter)((0,l.includes)(l.__,Xu))),Zu=(0,l.unless)((0,l.startsWith)("?"),(0,l.concat)("?")),ec=e=>{let{query:t,body:r}=e;return t=Zu(t),hl(`/entities/_facets${t}`,{method:"POST",body:JSON.stringify(r),headers:{"Content-Type":"application/json"}})},tc=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)(Bu(),qu(t.globalFilter))(n),activeness:t.activityFilter||"active"};return t.searchOptions&&(i.options=t.searchOptions),`/entities/_total${Wt(i)}`},rc=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=tc(e,t,r);return hl(n)},nc=e=>hl(`/entities/_total?${e}`),ic=(e,t)=>{const r=(0,l.pipe)((0,l.filter)(Qo),(0,l.map)((0,l.prop)("uri")))(e),n={filter:pt.EQUALS,fieldName:"type",values:r},i={filter:"containsWordStartingWith",fieldName:"attributes",values:[t]},a=Bu()([n,i]);return hl("/entities/_typeAheadSearch"+Wt({filter:a,select:"uri,label,type,roles,secondaryLabel,defaultProfilePicValue",scoreEnabled:!0,max:4}),{method:"GET"})},ac=(0,l.pipe)((0,l.reject)(l.isNil),Gt),oc=e=>{let{fieldName:t,searchParams:r=[],options:n={}}=e;const{globalFilter:i,activityFilter:a,searchOptions:o,max:s}=n,u=(0,l.pipe)(Bu(),qu(i))(r),c=ac({filter:u||null,activeness:a||"active",options:o||null}),p=[{fieldName:t,pageSize:s||20,pageNo:1,orderType:n.orderType||"reversedCount"}];return ec({query:c,body:p})},sc=e=>{let{fieldName:t,searchValue:r="",options:n}=e;const i=r.length?[{filter:"containsWordStartingWith",fieldName:t,values:[r]}]:[];return oc({fieldName:t,searchParams:i,options:n})},lc="uri,label,type,roles,secondaryLabel,defaultProfilePicValue",uc=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)(Bu(),qu(t.globalFilter))(n),max:t.max||5,offset:t.offset,activeness:t.activityFilter||"active",select:t.select||lc,scoreEnabled:null==t.scoreEnabled||t.scoreEnabled,sort:t.sort||null,order:t.order||null};return t.searchOptions&&(i.options=t.searchOptions),`/entities${Wt(i)}`},cc=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=uc(e,t,r);return hl(n)},pc=e=>mc(e,{select:"secondaryLabel"}),dc=(e,t)=>{const{select:r=lc,searchOptions:n,defaultMaxValues:i}=t||{},a={select:r,uris:e,options:n};return i&&(a.defaultMaxValues=i),hl("/entities/_byUris",{method:"POST",body:a,headers:{"Content-Type":"application/json"}})},yc=(0,l.filter)((0,l.pipe)((0,l.prop)("uri"),qe)),fc=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=yc(n).length,T={[r]:{max:a,offset:(0,l.isNil)(i)?y-f:i}},E=xn(r),m={method:"POST",data:{attributesPaging:T,defaultMaxValues:a,options:d,select:"crosswalks,"+E}},h=[...c,{filter:"containsWordStartingWith",fieldName:E,values:[u]}],b=(0,l.pipe)(Bu(),qu(d.globalFilter))(h);return b&&(m.data.filter=b),p&&(m.data.sort=p.field,m.data.order=p.order),hl(`${s}/api/${o}/${t}/_object`,m)},Tc=e=>`entities?filter=equals(uri,'${e}')&offset=0`,Ec={options:"sendHidden,addRefAttrUriToCrosswalk"},mc=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ec;return hl(`/${e}${Wt(t)}`)},hc=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.identity;const r={method:"POST",data:[e]},n=t("/entities");return hl(n,r)},bc=e=>hl(`/${e}?options=sendHidden,addRefAttrUriToCrosswalk`,{method:"DELETE"}),Oc=e=>{let{facet:t,startTime:r,endTime:n,types:i}=e;return hl(`/entities/_events/_total${Gt({facet:t,startTime:r,endTime:n,types:i})}`,{method:"GET",headers:{"Content-Type":"application/json"}})},vc=(e,t)=>hl(`/${e}/_setDefaultProfilePicByAttributeValueURI`,{method:"PUT",data:t}),gc=e=>{let{uri:t,diff:r,uriPreprocessor:n=l.identity}=e;return hl(n(`/${t}/_update?options=sendHidden,updateAttributeUpdateDates,addRefAttrUriToCrosswalk`),{method:"POST",data:r})},_c=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 hl(`/${t}/_interactions${(0,l.pipe)((0,l.reject)(E),Gt)(s)}`,{method:"GET",headers:{"Content-Type":"application/json"}})},Nc=e=>{const t=new FormData;return t.append("file",e),hl("/valueList",{method:"POST",headers:{"Content-Type":null},body:t}).catch((e=>{const t=pe(e,Pt().text("Can't upload file"));return Promise.reject(t)}))},Ac=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 hl(`/personal/findSavedSearches${Gt({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"}})},Pc=e=>hl(`/personal/savedSearches/${e}`,{method:"GET",headers:{"Content-Type":"application/json"}}),Rc=e=>hl("/personal/savedSearches",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),Sc=e=>{const{uri:t}=e,r=(0,l.pick)(["description","isFavorite","isPublic","name","query","uiState"]);return hl(`/personal/${t}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(r(e))})},wc=e=>{let{uri:t}=e;return hl(`/personal/${t}`,{method:"DELETE",headers:{"Content-Type":"application/json"}})},Ic=(e,t)=>(0,l.pipe)((0,l.evolve)({isPublic:(0,l.always)(t)}),Sc)(e),Uc=(e,t)=>(0,l.pipe)((0,l.evolve)({isFavorite:(0,l.always)(t)}),Sc)(e);function Cc(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const jc=["max","offset","filter"],Dc=(0,l.curry)(((e,t)=>t.nextEntry?(0,l.evolve)({nextEntry:Dc(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){Cc(e,t,r[t])}))}return e}({},t,(0,l.pick)(jc,e)))),Lc=(0,l.omit)(["activeness"]),kc=(e,t)=>{const r=(e=>{if(1===e.length&&((0,l.pathEq)([0,"activeness","entity"],rr.ALL,e)||(0,l.pathEq)([0,"activeness","relation"],rr.ALL,e)))return!1})(t);return t=(0,l.map)((0,l.pipe)((0,l.when)((0,l.prop)("nextEntry"),(e=>(0,l.pipe)(Dc(e),(0,l.omit)(jc))(e))),Lc,(0,l.omit)(["labels"])))(t),{url:`/${e}/_connections${Wt({limitCreditsConsumption:!0,activeness_enabled:r})}`,options:{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}}},Fc=(0,l.map)((e=>{let t=e;for(;t&&t.nextEntry;)t=t.nextEntry;return t})),xc=(0,l.reject)(l.isNil),Mc=(0,l.unless)((0,l.startsWith)("/"),(0,l.concat)("/")),$c=e=>hl(Mc(e),{method:"GET",headers:{"Content-Type":"application/json"}}),Vc=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.identity;const r=(0,l.pipe)(t,Mc);return hl(r(e),{method:"DELETE",headers:{"Content-Type":"application/json"}})},Gc=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?ks()(i):null,startDate:a,endDate:o},c=(0,l.pipe)(xc,ne,JSON.stringify);return hl(s("/relations"),{method:"POST",headers:{"Content-Type":"application/json"},body:c(u)})},Wc=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"),Mc,n),o=be(i(t),i(r)).concat(ve(t,r));return hl(a(r),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(o)})},Yc=(e,t)=>{const{url:r,options:n}=kc(e,t);return hl(r,n).then(Fc)},Bc=(e,t)=>hl(`/${e}/rate`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}),qc=(e,t)=>{let{relatedEntityUri:r,relationType:n,relationDirection:i}=t;const a={uri:r};return i===Nt.IN?a.inRelations=[n]:a.outRelations=[n],hl(`/${e}/_ignoreSuggestedRelationship`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)})},Hc=e=>{let{servicesPath:t="",environment:r,tenant:n,application:i}=e;return hl(`${t}/recentSearches/?environment=${r}&tenant=${n}`,{method:"GET",application:i,headers:{"Content-Type":"application/json"}})},Kc=e=>hl("/recentSearches",{method:"POST",application:"explorer",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),Qc=e=>{let{environment:t,tenant:r,createdDate:n}=e;return hl(`/recentSearches?environment=${t}&tenant=${r}&createdDate=${n}`,{method:"DELETE",application:"explorer",headers:{"Content-Type":"application/json"}})};function Jc(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){Xc(e,t,r[t])}))}return e}function Xc(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const zc={select:"label,secondaryLabel,name,type,startDate,endDate"},Zc=(0,l.reject)(l.isNil),ep=(0,l.pipe)(Zc,Gt),tp=e=>{let{uri:t,graphTypes:r,activenessDate:n,isReversed:i}=e;const a=Jc({},zc,r?{graphTypeURIs:r}:{},n?{activeness_date:n}:{},i?{options:"reverseRelations"}:{},{limitCreditsConsumption:!0});return hl(`/${t}/_tree${ep(a)}`,{method:"GET",headers:{"Content-Type":"application/json"}})},rp=e=>{let{uri:t,graphUri:r}=e;const n=Jc({},zc,r?{graphTypeURIs:r}:{},{select:"label,secondaryLabel,name,type"});return hl(`/${t}/_parents${ep(n)}`,{method:"GET",headers:{"Content-Type":"application/json"}})},np=e=>{let{uri:t,graphTypes:r,activenessDate:n,filterLastLevel:i=!1,deep:a=1,limitCreditsConsumption:o,max:s}=e;const l=Jc({},zc,r?{graphTypeURIs:r}:{},n?{activeness_date:n}:{},o?{limitCreditsConsumption:o}:{},s?{max:s}:{},{filterLastLevel:i,deep:a});return hl(`/${t}/_hops${ep(l)}`,{method:"GET",headers:{"Content-Type":"application/json"}})};function ip(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 ap=()=>{function e(){return(65536*(1+Math.random())|0).toString(16).substring(1)}return e()+"-"+e()+"-"+e()+e()},op="/activities",sp=e=>{let{label:t,description:r}=e;return hl(op,{method:"POST",body:{label:t,description:r},headers:{"Content-Type":"application/json",ActivityID:ap()}})},lp=e=>{const t=Wt(e);return hl(op+t,{method:"GET"})},up=e=>hl(`/activities/_total${Wt(e)}`,{method:"GET"}),cp=e=>{const{entityUri:t}=e,r=ip(e,["entityUri"]);return hl(`/${t}/_activities${Wt(r)}`,{method:"GET"})},pp=e=>{const{entityUri:t}=e,r=ip(e,["entityUri"]);return hl(`/${t}/_activities/_total${Wt(r)}`,{method:"GET"})};function dp(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){yp(e,t,r[t])}))}return e}function yp(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const fp=e=>{let{workflowPath:t,tenant:r,url:n}=e;return`${t}/workflow/${r?`${r}${n}`:n}`},Tp=e=>{let{workflowPath:t,processType:r,searchString:n,tenant:i,environment:a}=e;const o={processType:r,searchString:n};return hl(fp({url:"/processInstances/_generateFromQuery?background=true",workflowPath:t,tenant:i}),{method:"POST",headers:{"Content-Type":"application/json",EnvironmentURL:a},body:JSON.stringify(o)})},Ep=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=fp({url:r,workflowPath:t,tenant:n})),hl(s,{method:i||"GET",body:JSON.stringify(a),headers:dp({"Content-Type":"application/json"},null!=o?o:{})})},mp=e=>{let{workflowPath:t,processType:r,objectURIs:n,tenant:i,environment:a}=e;const o=fp({url:"/processInstances",workflowPath:t,tenant:i}),s=(0,l.curry)(((e,t,r)=>{const n={processType:t,objectURIs:r};return hl(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)},hp=e=>{let{workflowPath:t,processType:r,objectURIs:n,tenant:i,environment:a,comment:o}=e;const s=fp({url:"/processInstances",workflowPath:t,tenant:i}),l={processType:r,objectURIs:n},u=o?dp({},l,{comment:o}):l;return hl(s,{method:"POST",headers:{"Content-Type":"application/json",EnvironmentURL:a},body:JSON.stringify(u)})},bp=e=>{let{workflowPath:t,environment:r,tenant:n,entityUri:i,filter:a={},includeClosed:o}=e;const s=o;o&&(a.objectURI=i);const u=fp({url:`/tasks${s?Wt(a):""}`,workflowPath:t,tenant:n}),c=s?{}:{body:JSON.stringify(dp({objectURIs:[i]},(0,l.reject)(E,a)))};return hl(u,dp({method:s?"GET":"POST",headers:{"Content-Type":"application/json",EnvironmentURL:r}},c))},Op=e=>{let{workflowPath:t,environment:r,tenant:n,assignee:i}=e;const a={assignee:i};return hl(fp({url:"/tasks",workflowPath:t,tenant:n}),{method:"POST",headers:{"Content-Type":"application/json",EnvironmentURL:r},body:JSON.stringify(a)})},vp=e=>{let{workflowPath:t,environment:r,tenant:n,filters:i}=e;return hl(fp({url:"/groupTasks",workflowPath:t,tenant:n}),{method:"POST",headers:{EnvironmentURL:r},body:JSON.stringify(i)})},gp=e=>{let{workflowPath:t,environment:r,tenant:n,taskId:i}=e;return hl(fp({url:`/tasks/${i}`,workflowPath:t,tenant:n}),{method:"GET",headers:{"Content-Type":"application/json",EnvironmentURL:r}})},_p=e=>{let{workflowPath:t,environment:r,tenant:n,taskId:i,body:a}=e;return hl(fp({url:`/tasks/${i}`,workflowPath:t,tenant:n}),{method:"PUT",headers:{"Content-Type":"application/json",EnvironmentURL:r},body:JSON.stringify(a)})},Np=e=>{let{workflowPath:t,environment:r,tenant:n,taskId:i,comment:a}=e;return _p({workflowPath:t,environment:r,tenant:n,taskId:i,body:{processInstanceComment:a}})},Ap=e=>{let{workflowPath:t,environment:r,tenant:n,taskId:i}=e;const a={tasks:[i]};return hl(fp({url:"/assignee",workflowPath:t,tenant:n}),{method:"POST",headers:{"Content-Type":"application/json",EnvironmentURL:r},body:JSON.stringify(a)})},Pp=e=>{let{workflowPath:t,environment:r,tenant:n,taskId:i,assignee:a}=e;return _p({workflowPath:t,environment:r,tenant:n,taskId:i,body:{assignee:a}})},Rp=e=>{let{workflowPath:t,environment:r,tenant:n,taskId:i,dueDate:a}=e;return _p({workflowPath:t,environment:r,tenant:n,taskId:i,body:{dueDate:a}})},Sp=e=>{let{workflowPath:t,environment:r,tenant:n,taskId:i,priority:a}=e;return _p({workflowPath:t,environment:r,tenant:n,taskId:i,body:{priority:a}})},wp=e=>{let{workflowPath:t,environment:r,tenant:n,taskId:i,action:a}=e;return hl(fp({url:`/tasks/${i}/_action`,workflowPath:t,tenant:n}),{method:"POST",headers:{"Content-Type":"application/json",EnvironmentURL:r},body:JSON.stringify({action:a})})},Ip=e=>{let{workflowPath:t,tenant:r,environment:n}=e;return hl(fp({url:"/processDefinitions",workflowPath:t,tenant:r}),{method:"GET",headers:{"Content-Type":"application/json",EnvironmentURL:n}})},Up=(e,t)=>t.map((t=>{let r;const n=t.split("."),i=n.shift(),a=(e[i]||[]).filter(zo);return a&&a[0]&&(r=n.length>0&&a[0].value?Up(a[0].value,[n.join(".")])[0].value:"string"==typeof a[0].label?a[0].label:Object.prototype.hasOwnProperty.call(a[0],"label")?"":a[0].value||""),{key:t,value:r}}),""),Cp=(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=Up(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},jp=/[,\s]*$/,Dp=e=>{const t=Pt().text(_t);if(!e)return t;const r=e.replace(jp,"");return""===r.toString().trim()?t:r},Lp=(e,t)=>{let{entityTypes:r}=e;const n=r.find((e=>{let{uri:r}=e;return r.endsWith(t)}));return n&&n.dataLabelPattern},kp=(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=Lp(e,r.referencedEntityTypeURI);if(n)return Cp({attributes:t||{}},n)}else if(("Nested"===r.type||"Image"===r.type)&&r.dataLabelPattern)return Cp({attributes:t||{}},r.dataLabelPattern);return""},Fp=e=>{let{uiPath:t,uri:r}=e;const n=new URL(t),[,i]=n.pathname.split("/");return"nui"===i?`${t}profile?entityUri=${encodeURIComponent(r)}`:`${t}#p~com.reltio.plugins.entity.default.DefaultPerspective_e~${r}`},xp=e=>{let{uiPath:t,tag:r,entityUri:n}=e;const i=new URL(t),[,a]=i.pathname.split("/");return"nui"===a?`${t}tags?entityUri=${encodeURIComponent(n)}&tag=${encodeURIComponent(r)}`:`${t}#p~com.reltio.plugins.tags.TagPerspective_e~${encodeURIComponent(n)}_tag~${encodeURIComponent(r)}`},Mp=(e,t)=>t?t.startsWith("http:")||t.startsWith("https:")?t:e+"/"+t.replace(/^\/+/,""):"",$p=(0,l.when)((0,l.is)(Object),(0,l.ifElse)((0,l.pipe)((0,l.prop)("value"),(0,l.is)(Object)),pl,(0,l.prop)("value"))),Vp=(0,l.pipe)((0,l.prop)("defaultProfilePicValue"),$p),Gp=(e,t,r)=>{const n=Vp(r)||(e=>(0,l.pipe)((0,l.prop)("defaultProfilePic"),(0,l.when)(l.identity,(0,l.pipe)(Ts(e),$p)))(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")])})(li(e,t.type));return(0,l.pipe)((0,l.map)((0,l.pipe)((r=>ys(e,t,r)),(0,l.defaultTo)([]),l.head)),(0,l.reject)(l.isNil),l.head,(0,l.when)(l.identity,$p))(r)})(e,r)||fi(e,r.type);return Mp(t,n)};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){Yp(e,t,r[t])}))}return e}function Yp(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Bp="DTSS/",qp=(0,l.replace)(new RegExp("^entities/"),""),Hp=e=>Bp+e.dataTenant+"/"+e.uri,Kp=(0,l.replace)(new RegExp("^DTSS/.+?/"),""),Qp=e=>!(!e||!e.dataTenant),Jp=(0,l.startsWith)(Bp),Xp=(0,l.pipe)((0,l.ifElse)(Jp,(0,l.pipe)((0,l.split)("/"),(0,l.nth)(1)),(0,l.always)(null))),zp=(0,l.ifElse)(Qp,Hp,(0,l.prop)("uri")),Zp=e=>e&&e.uri?e.dataTenant?Hp(e):qp(e.uri):"",ed=(0,l.curry)(((e,t,r)=>(li(t,r.type)||{})[e]||"")),td=ed("label"),rd=ed("typeGraphIcon"),nd=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=li(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(zo)||"");const o=null!=a.label?(a.relationshipLabel?a.relationshipLabel+", ":"")+a.label:a.value;return{text:kp(e,o,i),uri:a.uri}})).filter(l.identity):[]},id=(0,l.pipe)(nd,(0,l.map)((0,l.prop)("text")),(0,l.join)(", ")),ad=(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=ad(e.slice(1),r.value);n&&(Array.isArray(n)?t=t.concat(n):t.push(n))}return t}),[]):ad(e.slice(1),r)}})),od=e=>!!e&&!!e.ctSubscribedUris&&e.ctSubscribedUris.length>0,sd=e=>(0,l.propOr)([],"matchRules",e),ld=function(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return t&&r?Wp({},r.aEntity,{attributes:n.attributes||{},roles:n.roles||[],tags:n.tags||[]}):e},ud=(e,t,r)=>t&&r?r.aEntity:e,cd=e=>{let{entityUri:t,max:r,deep:n,sort:i,order:a,activeness:o,filter:s,sources:u,rules:c}=e;const p={max:r,deep:n,filter:s,sort:i,order:a,activeness:o,sources:u,rules:c};return hl(`/${t}/_transitiveMatches${(0,l.pipe)((0,l.reject)(E),Gt)(p)}`,{method:"GET",headers:{"Content-Type":"application/json"}})},pd=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 hl(`/${t}/_notMatch${(0,l.pipe)((0,l.reject)(E),Gt)(s)}`,{method:"GET",headers:{"Content-Type":"application/json"}})},dd=(e,t)=>{const r=(0,l.map)((0,l.prop)("uri"))(t);return hl("/entities/_same",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r.concat(e))})},yd=(e,t,r)=>Promise.all(t.map((async t=>{await hl(`/${t.uri}/_notMatch?uri=${e}`,{method:"NOT"===r?"POST":"DELETE",headers:{"Content-Type":"application/json"}})}))),fd=async(e,t)=>await yd(e,t,"NOT"),Td=async(e,t)=>await yd(e,t,"MATCH"),Ed=async(e,t)=>await Promise.all(t.map((async t=>{await hl(`/${t.uri}/_setAMatch?uri=${e}`,{method:"POST",headers:{"Content-Type":"application/json"}})})));function md(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){hd(e,t,r[t])}))}return e}function hd(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function bd(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 Od=e=>{let{dtssPath:t,customerTenant:r,entity:{dataTenant:n,uri:i}}=e;return hl(`${t}entities/_import?dataEntityUri=${i}`,{method:"POST",headers:{DataTenant:n,CustomerTenant:r,"Content-Type":"application/json"}})},vd=e=>{let{dtssPath:t,customerTenant:r,dataTenant:n,entityUri:i,content:a}=e;return $d({url:`entities/_connections/_hasNonImported?customerEntityUri=${i}`,dataTenant:n,customerTenant:r,dtssPath:t,options:{method:"POST",headers:{"Content-Type":"application/json"},data:JSON.stringify(a)}})},gd=e=>{let{dtssPath:t,customerTenant:r,dataTenant:n,entityUri:i,content:a}=e;return $d({url:`entities/_connections/_import?customerEntityUri=${i}`,dataTenant:n,customerTenant:r,dtssPath:t,options:{method:"POST",headers:{"Content-Type":"application/json"},data:JSON.stringify(a)}})},_d=e=>{let{dtssPath:t,customerTenant:r,dataTenant:n,dataEntityUri:i,customerEntityUri:a}=e;return hl(`${t}entities/_merge?dataEntityUri=${i}&customerEntityUri=${a}`,{method:"POST",headers:{DataTenant:n,CustomerTenant:r,"Content-Type":"application/json"}})},Nd=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 _d({dtssPath:t,customerTenant:r,dataTenant:a,customerEntityUri:n,dataEntityUri:o})})))},Ad=e=>{let{dtssPath:t,customerTenant:r,entity:n,entities:i}=e;const{uri:a}=n,[o,s]=(0,l.partition)(Qp,i);return Promise.all([s.length?dd(a,s):Promise.resolve(),...o.map((e=>{let{uri:n,dataTenant:i}=e;return _d({dtssPath:t,customerTenant:r,dataTenant:i,customerEntityUri:a,dataEntityUri:n})}))])},Pd=(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=bd(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)}),[])),Rd=(0,l.pipe)((0,l.find)((0,l.propEq)("index",0)),(0,l.propOr)({},"object"),Pd),Sd=e=>{let{dtssPath:t,customerTenant:r,entity:{dataTenant:n,uri:i}}=e;return hl(`${t}entities/_matchesForDtEntities?skipAllImportedEntities=true`,{method:"POST",headers:{DataTenant:n,CustomerTenant:r,"Content-Type":"application/json"},body:JSON.stringify([i])}).then(Rd)},wd=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)},Id=wd((e=>{let{dtssPath:t,dataTenant:r,customerTenant:n,entity:i}=e;const{uri:a,type:o}=i;return hl(`${t}entities/_matches?skipAllImportedEntities=true`,{method:"POST",headers:{DataTenant:r,CustomerTenant:n,"Content-Type":"application/json"},body:JSON.stringify([{uri:a,type:o}])}).then(Rd)})),Ud=wd((e=>{let{dtssPath:t,dataTenant:r,customerTenant:n,entity:i}=e;const{uri:a}=i;return hl(`${t}entities/_notMatch?returnObjects=true&customerEntityUri=${a}`,{method:"GET",headers:{DataTenant:r,CustomerTenant:n,"Content-Type":"application/json"}})})),Cd=(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)}},jd=e=>t=>{let{dtssPath:r,customerTenant:n,dataTenant:i,dataEntityUri:a,customerEntityUri:o}=t;return hl(`${r}entities/_notMatch?dataEntityUri=${a}&customerEntityUri=${o}`,{method:"NOT"===e?"POST":"DELETE",headers:{DataTenant:i,CustomerTenant:n,"Content-Type":"application/json"}})},Dd=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 jd(e)({dtssPath:r,customerTenant:n,dataTenant:o,customerEntityUri:i,dataEntityUri:s})})))},Ld=Dd("NOT"),kd=Dd("MATCH"),Fd=e=>t=>{let{dtssPath:r,customerTenant:n,entity:i,entities:a}=t;const{uri:o}=i,[s,u]=(0,l.partition)(Qp,a);return Promise.all([yd(o,u,e),...s.map((t=>{let{uri:i,dataTenant:a}=t;return jd(e)({dtssPath:r,customerTenant:n,dataTenant:a,customerEntityUri:o,dataEntityUri:i})}))])},xd=Fd("NOT"),Md=Fd("MATCH");function $d(e){let{requestProvider:t=hl,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}`,md({},bd(s,["headers"]),{headers:md({},l,{SearchMetadata:"AUTO",DataTenant:i,customerTenant:a})}))}const Vd=e=>{let{filters:t,options:r,value:n="",dataTenant:i,customerTenant:a,dtssPath:o}=e;return $d({url:uc(t,r,n),dataTenant:i,customerTenant:a,dtssPath:o})},Gd=e=>{let{filters:t,options:r,value:n="",dataTenant:i,customerTenant:a,dtssPath:o}=e;return $d({url:tc(t,r,n),dataTenant:i,customerTenant:a,dtssPath:o})},Wd=e=>{let{entityUri:t,configs:r,dataTenant:n,customerTenant:i,dtssPath:a}=e;const{options:o}=kc(t,r);return $d({url:`entities/_connections/_getConnections?dataEntityUri=${t}`,options:o,dataTenant:n,customerTenant:i,dtssPath:a}).then((0,l.pipe)(Fc,(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)))}))))},Yd=e=>{let{entityUri:t,dataTenant:r,customerTenant:n,dtssPath:i}=e;return $d({url:`${Tc(t)}&select=secondaryLabel`,dataTenant:r,customerTenant:n,dtssPath:i})},Bd=e=>{let{dtssPath:t,dataTenant:r,customerTenant:n,value:i,type:a,sourceTable:o}=e;return hl(`${t}entities/_unmerge`,{method:"POST",headers:{DataTenant:r,CustomerTenant:n,"Content-Type":"application/json"},body:JSON.stringify([{value:i,type:a,sourceTable:o}])})},qd=e=>{let{dtssPath:t,tenant:r}=e;return hl(`${t}tenants/customerTenants?id=${r}&useCache=true`,{method:"GET"})},Hd=e=>{let{dtssPath:t,customerTenant:r}=e;return hl(`${t}subscriptions?useCache=true`,{method:"GET",headers:{CustomerTenant:r}})},Kd=e=>{let{dtssPath:t,tenants:r}=e;return hl(`${t}tenants/dataTenants?id=${r}&useCache=true`,{method:"GET"})},Qd=()=>hl("/configuration?options=showAccess&showHiddenMatchRules=true",{method:"GET"});function Jd(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){Xd(e,t,r[t])}))}return e}function Xd(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const zd=e=>{let{apiPath:t,tenant:r,searchBody:n,options:i}=e;const{select:a}=i,o=Jd({},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 hl(`${t}/api/${r}/graph/search${Wt({select:a})}`,{method:"POST",body:o,headers:{"Content-Type":"application/json"}})},Zd=e=>{let{apiPath:t,tenant:r,searchBody:n,options:i={}}=e;return hl(`${t}/api/${r}/graph/search/count`,{method:"POST",body:Jd({},n,i),headers:{"Content-Type":"application/json"}})},ey=(e,t)=>`${e}/${t}/comments`,ty=e=>{let{collaborationPath:t,tenant:r,uris:n}=e;return hl(`${ey(t,r)}/count`,{method:"POST",body:n,headers:{"Content-Type":"application/json"}})},ry=e=>{let{collaborationPath:t,tenant:r,commentId:n}=e;return hl(`${ey(t,r)}/${n}`,{method:"GET",headers:{"Content-Type":"application/json"}})},ny=e=>{let{collaborationPath:t,tenant:r,data:n}=e;return hl(ey(t,r),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify([n])})},iy=e=>{let{collaborationPath:t,tenant:r,data:n}=e;return hl(`${ey(t,r)}/${n.commentId}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)})},ay=e=>{let{collaborationPath:t,tenant:r,commentId:n}=e;return hl(`${ey(t,r)}/${n}`,{method:"DELETE",headers:{"Content-Type":"application/json"}})},oy=e=>{let{collaborationPath:t,tenant:r,commentId:n,data:i}=e;return hl(`${ey(t,r)}/${n}/replies`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify([i])})},sy=e=>{let{collaborationPath:t,tenant:r,maxResults:n=10,relatedObjectUri:i,sort:a="modifiedTime",order:o="desc",pageToken:s=null}=e;const l=Wt({maxResults:n,relatedObjectUri:i,sort:a,order:o,pageToken:s});return hl(`${ey(t,r)}${l}`,{method:"GET",headers:{"Content-Type":"application/json"}})};function ly(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){uy(e,t,r[t])}))}return e}function uy(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const cy=e=>{let{tenant:t,servicesPath:r}=e;return hl(`${r}/oauth/proxy${Wt({url:"/oauth/users/tenant/{0}",params:t})}`,{method:"GET",headers:{"Content-Type":"application/json"}})},py="graphExport",dy=async(e,t,r,n,i)=>{let a;try{const{data:n={}}=await Ey({servicesPath:e,tenant:t,environment:r,namespace:py,options:{method:"GET",headers:{"Content-Type":"application/json"}}});a=n}catch(e){a={}}const o={body:JSON.stringify(ly({},a,{[n]:i})),headers:{"Content-Type":"application/json"}};let s;try{s=await Ey({servicesPath:e,tenant:t,environment:r,namespace:py,options:ly({method:"PUT"},o)})}catch(e){s=null}return s||(s=await Ey({servicesPath:e,tenant:t,environment:r,namespace:py,options:ly({method:"POST"},o)})),s},yy=e=>{let{servicesPath:t,key:r}=e;return hl(`${t}/settings${Wt({key:r})}`,{method:"GET",headers:{"Content-Type":"application/json"}})},fy=e=>{let{servicesPath:t}=e;return hl(`${t}/version/collect`,{method:"POST",headers:{"Content-Type":"application/json"}})},Ty=e=>{let{tenant:t,userName:r,servicesPath:n}=e;return hl(`${n}/plugins${Wt({tenant:t,user:r})}`,{method:"GET"})},Ey=e=>{let{tenant:t,environment:r,servicesPath:n,options:i,namespace:a,projection:o}=e;return hl(`${n}/configService${Wt({tenant:t,environment:r,namespace:a,projection:o})}`,i)},my=e=>{let{tenant:t,environment:r,servicesPath:n}=e;return Ey({tenant:t,environment:r,servicesPath:n,projection:"apps",options:{method:"GET"}})},hy=e=>{let{servicesPath:t,stateHash:r}=e;return hl(`${t}/searchLink?key=${r}`,{method:"GET"})},by=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),hl(`${t}/${r}/${n}`,{body:a,method:"POST",application:"common",headers:{"Content-Type":null}})},Oy=e=>hl(`/${e}?showObjectsInfo=true`,{method:"GET"}),vy=e=>{let{exportPath:t,tenant:r,options:n}=e;return hl(`${t}/${r}/activities${Wt(n)}`,{method:"POST"})};function gy(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){_y(e,t,r[t])}))}return e}function _y(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=e=>{const{entityUri:t}=e;return hl(`/${t}/_crosswalkTree`,{method:"GET",headers:{"Content-Type":"application/json"}})},Ay=e=>{let{entityUri:t,crosswalk:r}=e;return hl(`/${t}/crosswalks`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify([r])})},Py=e=>{let{entityTypeUri:t,contributorCrosswalkType:r,contributorCrosswalkValue:n,contributorCrosswalkSourceTable:i,crosswalkType:a,crosswalkValue:o,crosswalkSourceTable:s,crosswalkDeleteDate:l}=e;return hl("/entities?options=partialOverride",{method:"POST",headers:{"Content-Type":"application/json"},noReltioSourceSystem:!0,body:JSON.stringify([{attributes:{},crosswalks:[gy({type:r,value:n,dataProvider:!1,contributorProvider:!0},i&&{sourceTable:i}),gy({type:a,value:o,dataProvider:!0},s&&{sourceTable:s},l&&{deleteDate:l})],type:t}])})},Ry=e=>{const{contributorUri:t,entityUri:r,operationType:n}=e;return hl(`/${r}/_${n}${Wt({contributorURI:t})}`,{method:"POST"})},Sy=e=>{let{entityUri:t,crosswalkId:r,attributeName:n,value:i}=e;return hl(`/${t}/crosswalks/${r}/${n}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({value:i})})},wy=e=>{let{entityUri:t,crosswalkId:r,attributeName:n}=e;return hl(`/${t}/crosswalks/${r}/${n}`,{method:"DELETE",headers:{"Content-Type":"application/json"}})},Iy=e=>{let{entityUri:t,crosswalkId:r}=e;return hl(`/${t}/crosswalks/${r}`,{method:"DELETE",headers:{"Content-Type":"application/json"}})};function Uy(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Cy=e=>{let{entityTypeUri:t}=e;return hl(`/dataQuality/fillRates${Gt({entityType:rt(t)})}`,{method:"GET"})},jy=e=>{let{entityTypeUri:t,attributeFieldName:r}=e;return hl(`/dataQuality/statistic${Gt(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){Uy(e,t,r[t])}))}return e}({entityType:rt(t)},r&&{attribute:r}))}`,{method:"GET"})},Dy=e=>{let{dvfPath:t,tenant:r,entityTypeUri:n,env:i}=e;return hl(`${t}/api/${r}/dataValidationFunctions/entityTypes/${rt(n)}`,{method:"GET",headers:{env:i}})},Ly=e=>{let{attributeUri:t,sourceUri:r,crosswalkValue:n,crosswalkSourceTable:i}=e;return hl(`/${t}${Wt({crosswalkValue:n,crosswalkSourceTable:i})}`,{method:"DELETE",headers:r?{"Source-System":r}:{}})},ky=e=>{let{attributeUri:t,value:r}=e;return hl(`/${t}/pin`,{method:"PUT",body:JSON.stringify({value:r})})},Fy=e=>{let{attributeUri:t,value:r}=e;return hl(`/${t}/ignore`,{method:"PUT",body:JSON.stringify({value:r})})},xy=e=>{let{attributeUri:t,sourceUri:r,crosswalkValue:n,crosswalkSourceTable:i,value:a}=e;return hl(`/${t}${Wt({crosswalkValue:n,crosswalkSourceTable:i})}`,{method:"PUT",headers:r?{"Source-System":r}:{},body:JSON.stringify({value:a})})},My=e=>{let{attributeUri:t,crosswalkValue:r,crosswalkSourceTable:n,sourceUri:i,value:a}=e;const o=Wt({crosswalkValue:r,crosswalkSourceTable:n}),s=t.split("/").slice(0,-1).join("/"),[l]=ks()([[{value:a}]]);return hl(`/${s}${o}`,{method:"POST",headers:i?{"Source-System":i}:{},body:JSON.stringify(l)})},$y=e=>{let{entityUri:t,attributeName:r,value:n}=e;return hl(`/${t}/activeness`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({[r]:n})})},Vy=e=>{let{entityUri:t,attributeName:r}=e;return hl(`/${t}/activeness/${r}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({})})};function Gy(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Wy=e=>{let{entityUri:t}=e;return hl(`/${t}/_historicURIs`,{method:"GET"})},Yy=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 hl(`/${t}/_changesWithTotal${Wt(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){Gy(e,t,r[t])}))}return e}({},n,{historicURIs:null==r?void 0:r.join(",")}))}`,{method:"GET"})},By=(e,t)=>hl(`/${e}/_previousChange${Wt({timestamp:t})}`,{method:"GET"}),qy=(e,t)=>hl(`/${e}${Wt({time:t})}`,{method:"GET"});function Hy(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){Ky(e,t,r[t])}))}return e}function Ky(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Qy=e=>{let{url:t,method:r,data:n,headers:i}=e;return hl(t,Hy({method:r||"GET"},n?{body:JSON.stringify(n)}:{},{headers:Hy({"Content-Type":"application/json"},null!=i?i:{})}))},Jy=e=>{let{validationServicePath:t,uri:r,diff:n,tenant:i,options:a=[],severity:o=[]}=e;const s=Wt({options:a.join(","),severity:o.join(",")});return hl(`${t}/validate/${i}/entity/${Zp({uri:r})}${s}`,{method:"POST",headers:{"Content-Type":"application/json"},body:n})},Xy=e=>{let{validationServicePath:t,entity:r,tenant:n,options:i=[],severity:a=[]}=e;return hl(`${t}/validate/${n}/entity${Wt({options:i.join(","),severity:a.join(",")})}`,{method:"POST",headers:{"Content-Type":"application/json"},body:r})},zy=e=>{let{tenant:t,apiPath:r}=e;return hl(`${r}/tenants/${t}/name`,{method:"GET"})},Zy=e=>{let{tenant:t,apiPath:r}=e;return hl(`${r}/tenants/${t}/_rdmTenants`,{method:"GET"})},ef=e=>{const{name:t,tenant:r,environment:n,user:i,servicesPath:a}=e;return hl(`${a}/preferences${Wt({name:t,tenant:r,environment:n,user:i})}`,{method:"GET"})},tf=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 hl(`${a}/preferences`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)})},rf=e=>{const{name:t,tenant:r,environment:n,user:i,servicesPath:a}=e,o={name:t,tenant:r,environment:n,user:i};return hl(`${a}/preferences`,{method:"DELETE",body:JSON.stringify(o)})};var nf=r(47485);const af=e=>{let{entityTypeUri:t,initValue:r,attributeTypes:n,metadata:i,mode:a}=e;const o=He(),s={attributes:As({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=ys(r,e,n.uri)[0];return i&&i.value?Is({entity:e,attributeType:n,uri:i.uri,value:t}):Ss({entity:e,attributeType:n,parentUri:e.uri,value:t,index:0})}return e}(s,r,i,n):s},of=(e,t)=>(0,l.pipe)(l.values,l.flatten,(0,l.filter)((0,l.has)("refEntity")),(0,l.map)(ls),(0,l.filter)(qe),(0,l.map)((t=>e[t])),(0,l.reject)(l.isNil))(t.attributes||{}),sf=(0,l.curry)(((e,t)=>{const r=of(e=e||{},t=t||{});return r.concat((0,l.chain)(sf(e),r))})),lf=(0,l.curry)(((e,t)=>(0,l.pipe)(ce,(0,l.filter)(e))(t))),uf=lf((e=>"objectURI"===e[e.length-1]&&e.includes("refEntity"))),cf=e=>(0,l.filter)((0,l.pipe)((t=>(0,l.path)(t,e)),qe)),pf=e=>(0,l.pipe)(uf,cf(e),(0,l.map)((t=>(0,l.path)(t,e))))(e),df=(0,l.curry)(((e,t,r)=>{const n=(0,l.pipe)(uf,(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})),yf=(0,l.when)((0,l.pipe)((0,l.prop)("uri"),qe),(0,l.omit)(["uri","timestamp"])),ff=(0,l.pipe)(yf,(0,l.evolve)({attributes:ks(!0)})),Tf=async(e,t,r,n)=>{const i=e[t];if(!i)return null;const a=pf(i);if(a.length>0)for(const t of a)e=df(t,r[t].uri,e);const o=(s=await hc(ff(e[t]),null==n?void 0:n.enhanceUriWithDCR),(0,l.pathOr)(s,[0,"object"],s));var s;return null==n||n.updateDCRUriFromResponse(o),o},Ef=async(e,t,r)=>{const n=hf(e,t),i={};for(const t of n)i[t]=await Tf(e,t,i,r);return i},mf=(0,l.curry)(((e,t)=>{const r=nf.Node(t);return pf(e[t]).forEach((t=>{const n=mf(e,t);r.addEdge(n)})),r})),hf=(e,t)=>(0,l.pipe)((0,l.map)(mf(e)),(0,l.map)(nf.getDependencyOrder),l.flatten,(0,l.map)((e=>e.getInfo())))(t),bf=(0,l.map)((0,l.evolve)({newValue:(0,l.when)(Array.isArray,(0,l.map)(yf))})),Of=(e,t)=>{const r=Ne(e.tags||[],t.tags||[]),n=Ae(e.roles||[],t.roles||[]),i=Oe(e,t),a=ve(e,t);return[...ge(be((0,l.clone)(e.attributes),(0,l.clone)(t.attributes),!1),_e((0,l.clone)(t.attributes),(0,l.clone)(t.crosswalks))),...r,...n,...i,...a]},vf=(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 df(r,n,e)}),e))))}),t)}),bf),gf=(0,l.curry)(((e,t)=>(0,l.when)(qe,(0,l.propOr)(l.__,t,e),t)));function _f(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){Nf(e,t,r[t])}))}return e}function Nf(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Af=e=>{let{parentUri:t,relation:r,entityUri:n}=e;return{type:yr.CREATE_RELATION,parameters:{parentUri:t,relation:r,entityUri:n}}},Pf=e=>{let{relationUri:t}=e;return{type:yr.DELETE_RELATION,parameters:{relationUri:t}}},Rf=e=>{let{parentUri:t,entityUri:r,relationType:n,relationDirection:i}=e;return{type:yr.IGNORE_RELATION,parameters:{parentUri:t,entityUri:r,relationType:n,relationDirection:i}}},Sf=e=>{let{oldRelation:t,newRelation:r}=e;return{type:yr.UPDATE_RELATION,parameters:{oldRelation:t,newRelation:r}}},wf=e=>{let{entityUri:t,newEntityUri:r,relation:n,isReversed:i}=e;return{type:yr.REPOINT_RELATION,parameters:{entityUri:t,newEntityUri:r,relation:n,isReversed:i}}},If=e=>e.reduce(((e,t)=>e.then((e=>t(e)))),Promise.resolve()),Uf=e=>{let{type:t,parameters:r,dcrProcessor:n}=e;const{enhanceUriWithDCR:i,updateDCRUriFromResponse:a}=n,o=e=>(a(e),e);switch(t){case yr.CREATE_RELATION:return()=>{const{parentUri:e,relation:t,entityUri:n}=r,{type:a,attributes:s,startDate:l,endDate:u}=t;return Gc({startEntityUri:e,endEntityUri:n,relationType:a,attributes:s,startDate:l,endDate:u,uriPreprocessor:i}).then(o)};case yr.DELETE_RELATION:return()=>{const{relationUri:e}=r;return Vc(e,i).then(o)};case yr.IGNORE_RELATION:return()=>{const{entityUri:e,parentUri:t,relationType:n,relationDirection:i}=r;return qc(t,{relatedEntityUri:e,relationType:n,relationDirection:i}).then(o)};case yr.UPDATE_RELATION:return()=>{const{oldRelation:e,newRelation:t}=r;return Wc({oldRelation:e,newRelation:t,uriPreprocessor:i}).then(o)};case yr.REPOINT_RELATION:return()=>{const{entityUri:e,newEntityUri:t,relation:i,isReversed:a}=r,{uri:o}=i,s=[Pf({relationUri:o}),Af({parentUri:a?e:t,relation:i,entityUri:a?t:e})];return(0,l.pipe)((0,l.map)(Cf(n)),(0,l.map)(Uf),If)(s)}}},Cf=e=>t=>_f({dcrProcessor:e},t),jf=function(){let{alwaysCreateDCR:e=!1,dcrUri:t=null}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{alwaysCreateDCR:!1,dcrUri:null};const r=Yt({alwaysCreateDCR:e,dcrUri:t});return{commandExecutor:(0,l.pipe)(l.flatten,(0,l.map)(Cf(r)),(0,l.map)(Uf),If,(0,l.otherwise)((e=>({errorMessage:e})))),dcrProcessor:r}},Df=e=>t=>(0,l.map)((t=>_f({},t,{parameters:(0,l.evolve)({parentUri:gf(e),entityUri:gf(e),newEntityUri:gf(e)},t.parameters)})),t);function Lf(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){kf(e,t,r[t])}))}return e}function kf(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Ff=e=>Lf({},(0,l.path)(Hf(),e),{startDate:(0,l.path)(Xf(),e),endDate:(0,l.path)(zf(),e)}),xf=(e,t)=>(0,l.pipe)((0,l.path)(Jf()),gf(t))(e),Mf=(e,t,r,n)=>{let{removedUris:i=[],addedConnections:a=[],editedConnections:o=[],ignoredRelationData:s=[]}=t;return[...a.map((e=>{const t=xf(e,r),i=(0,l.path)(Kf(),e)===fr.IN,a=e.parentEntityUri||n;return Af({parentUri:i?t:a,relation:Ff(e),entityUri:i?a:t})})),...o.map((t=>{const i=xf(t,r),a=(0,l.path)(Kf(),t)===fr.IN,o=i!==(0,l.pipe)((0,l.path)(Hf()),a?Zf:eT)(t),s=nT(e,(0,l.path)(Bf(),t)),u=t.parentEntityUri||n,c=gf(r,i);return o?wf({entityUri:a?u:c,newEntityUri:a?c:u,relation:(0,l.path)(Hf(),t),isReversed:!1}):Sf({oldRelation:(0,l.path)(Hf(),s),newRelation:Ff(t)})})),...i.map((e=>Pf({relationUri:e}))),...s.map((e=>Rf({parentUri:n,entityUri:e.entityUri,relationType:e.relationType,relationDirection:e.relationDirection})))]},$f=e=>(e||[]).reduce(((e,t)=>{let{entity:r}=t;return Lf({},e,{[r.entityUri]:{uri:r.entityUri,label:r.entityLabel,type:r.entityType}})}),{}),Vf=(e,t)=>(0,l.pipe)(mi,(0,l.defaultTo)({}),(0,l.propOr)([],"attributes"),(0,l.concat)(Fs),ja)(e,t),Gf=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)}},Wf=(e,t,r)=>{const n=Cp(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)},Yf="relation",Bf=(0,l.always)([Yf,"relationUri"]),qf=(0,l.always)([Yf,"relationType"]),Hf=(0,l.always)([Yf,"object"]),Kf=(0,l.always)([Yf,"direction"]),Qf=(0,l.always)([Yf,"object","attributes"]),Jf=(0,l.always)(["entity","entityUri"]),Xf=(0,l.always)([Yf,"startDate"]),zf=(0,l.always)([Yf,"endDate"]),Zf=(0,l.path)(["startObject","objectURI"]),eT=(0,l.path)(["endObject","objectURI"]),tT=(0,l.path)(["startObject","objectTypeURI"]),rT=(0,l.path)(["endObject","objectTypeURI"]),nT=(e,t)=>{for(const r of e){if((0,l.pipe)((0,l.path)(Bf()),(0,l.equals)(t))(r))return r;if(r.connections){const e=nT(r.connections,t);if(e)return e}}},iT=(0,l.pipe)(nT,(0,l.path)(Hf())),aT=(0,l.allPass)([(0,l.pipe)((0,l.path)(Jf()),(0,l.complement)(E)),(0,l.pipe)((0,l.path)(qf()),(0,l.complement)(E))]),oT=e=>{let{config:t,mode:r,metadata:n,parentEntityUri:i}=e;const a={relation:{relationUri:Ke()},entity:{},isNew:!0},{relationType:o,direction:s}=a.relation,{inRelations:u,outRelations:c}=uT({content:i?t.contentSecondLevel:t.content,direction:s,relationType:o,mode:r,metadata:n}),p=sT(u,c);return(0,l.pipe)((0,l.evolve)({relation:p?Gf(p):l.identity}),(0,l.defaultTo)({}),(0,l.when)((0,l.always)(i),(0,l.assoc)("parentEntityUri",i)))(a)},sT=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:Nt.IN}:{type:t[0],direction:Nt.OUT}:null},lT=e=>e.uri||e,uT=e=>{let{content:t,direction:r,relationType:n,mode:i,metadata:a}=e;const o={},s=e=>t=>{const a=t&&Si(i,t),s=t&&n===t.uri&&r===e;if(a||s){let{label:r}=t;const n=e===Nt.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"],li(a,e.startObject.objectTypeURI)),(0,l.assocPath)(["endObject","objectType"],li(a,e.endObject.objectTypeURI)))(e),c=(0,l.pipe)(lT,mi(a));return(0,l.evolve)({inRelations:(0,l.pipe)((0,l.map)(c),(0,l.filter)(s(Nt.IN)),(0,l.map)(u)),outRelations:(0,l.pipe)((0,l.map)(c),(0,l.filter)(s(Nt.OUT)),(0,l.map)(u))},t)||{}};function cT(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}const dT=e=>{let{hierarchy:t,uri:r,parents:n=[],children:i=[]}=e;return cT({},t,{[r]:{parents:n,children:i}})},yT=e=>{let{hierarchy:t,uri:r,parents:n=[],children:i=[]}=e;return cT({},t,{[r]:{parents:t[r].parents.concat(n),children:t[r].children.concat(i)}})},fT=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=of(t,i),o=dT({hierarchy:n,uri:e,children:a.map((0,l.prop)("uri")),parents:r});return a.reduce(((r,n)=>fT(n.uri,t,[e],r)),o)},TT=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)(Bf(),n),a=t?yT({hierarchy:e,uri:t,children:[i]}):e,o=(0,l.path)(Jf(),n),s=qe(o)?[o]:[],u=dT({hierarchy:a,uri:i,children:s,parents:t?[t]:[]});return s.reduce(((e,t)=>fT(t,r,[i],e)),u)}),n)},ET=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return TT(r,e,t,fT(e,t))},mT=function(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];if(e===t)return ET(t,r,n);if(Je(e)){const t=nT(n,e);return t&&TT([t],null,r)}return r[e]?fT(e,r):void 0},hT=(e,t)=>{var r;const n=(null===(r=e[t])||void 0===r?void 0:r.children)||[];return n.concat(n.flatMap((t=>hT(e,t))))},bT=(e,t)=>{var r;const n=(null===(r=e[t])||void 0===r?void 0:r.parents)||[];return n.concat(n.flatMap((t=>bT(e,t))))},OT=(e,t)=>{let{entityUri:r,entitiesMap:n={},connections:i=[],metadata:a}=e;const o=[],s=Qe(t),u=ET(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(Je(c)){if(s=nT(i,c),!s)return null;o.push({type:er.relationConnection,value:s,valueType:mi(a,(0,l.path)(qf(),s))});continue}if(Je(u)){const e=n[c];if(!e)return null;o.push({type:er.tempEntity,value:e,valueType:li(a,e.type)});continue}const p=n[u],d=vs(p,c),y=n[c];if(!d||!y)return null;o.push({type:er.attributeValue,value:d,valueType:Yn(a,at(d.uri,p.type))}),o.push({type:er.tempEntity,value:y,valueType:li(a,y.type)})}return o})({entitiesMap:n,connections:i,metadata:a},bT(u,s).reverse(),s);if(!c)return null;o.push(...c);const p=Je(s),d=p?iT(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?mi(a,d.type):li(a,d.type),m=d.attributes;for(let e=0;e<y.length;e++){const t=0===e?E.attributes:Bn(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:er.tempEntity,value:T,valueType:li(a,T.type)}),o.push({type:er.attributeValue,value:s,valueType:E}),m=s.value;const l=ls(s);T=l&&qe(l)?n[l]:null}}return o},vT=e=>e.every((e=>{let{type:t}=e;return[er.attributeValue,er.tempEntity].includes(t)}))?e.filter((e=>{let{type:t}=e;return t===er.attributeValue})).reduce(((e,t)=>{const r=t.value.uri;return e?`${e}/${r.split("/").slice(-2).join("/")}`:r}),""):null,gT=(0,l.pipe)(l.values,l.flatten,(0,l.reduce)(((e,t)=>{const r=[t.uri,...(0,l.is)(Object,t.value)?gT(t.value):[]];return e.concat(r)}),[])),_T=(e,t)=>t>e?`${t}-${e}`:`${e}-${t}`,NT=e=>{const t=[...gT((null==e?void 0:e.attributes)||[]),...gT((null==e?void 0:e.analyticsAttributes)||[])];return e?[e.uri,...t]:[]},AT=(e,t)=>[e,...t.map((t=>_T(e,t)))],PT=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.map((e=>{let{relation:t}=e;return t.relationUri}))},RT=(e,t)=>{switch(e){case tr.ENTITY:return(e=>{let{entityUri:t}=e;return[t]})(t);case tr.ENTITY_ATTRIBUTE:return(e=>{let{uri:t}=e;return[ot(t)]})(t);case tr.POTENTIAL_MATCH:return(e=>{let{entityUri:t,matchEntityUri:r}=e;return[t,r]})(t);case tr.RELATION:return(e=>{let{entityUri:t,connection:{relation:{relationType:r},entity:{entityUri:n}}}=e;return[t,n,r]})(t)}},ST=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),wT=(0,l.curry)(((e,t)=>{const r=vo(e,t),n=(0,l.pipe)((0,l.prop)("memberTypes"),(0,l.chain)((0,l.prop)("name")))(r);return r.extendsTypeURI?n.concat(wT(e,r.extendsTypeURI)):n})),IT=(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))),UT=(e,t)=>(0,l.pipe)((0,l.prop)("type"),wT(e),IT(t))(t);function CT(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const jT=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}},DT=e=>!e.deactivated,LT=e=>{let{attributeTypeUri:t,uri:r,parentUri:n}=e;return`${t}-${r}-${n}`},kT=e=>LT(e)+e.message,FT=(0,l.unless)(l.isNil,(0,l.prop)("message")),xT=(0,l.unless)(l.isNil,(0,l.prop)("type")),MT=(0,l.curry)(((e,t)=>et(t.parentUri,e))),$T=(0,l.curry)(((e,t)=>t.parentUri===e)),VT=(0,l.curry)(((e,t)=>(0,l.cond)([[(0,l.pipe)((0,l.prop)("uri"),et(t.attributeTypeUri)),l.T],[(0,l.both)((0,l.propEq)("type",Ot.TYPE_REFERENCE),(0,l.pipe)(En,(0,l.any)(et(t.attributeTypeUri)))),l.T],[l.T,l.F]])(e))),GT=(0,l.curry)(((e,t)=>t.attributeTypeUri===e)),WT=(0,l.curry)(((e,t,r)=>e===r.parentUri&&t!==r.attributeTypeUri)),YT=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return(0,l.filter)((0,l.allPass)([zT,DT,MT(e),VT(t),(0,l.complement)(WT(e,t.uri))]))(r)},BT=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];const n=(0,l.find)((0,l.allPass)([zT,DT,$T(e),GT(t.uri),(0,l.complement)((0,l.prop)("uri")),(0,l.complement)((0,l.propEq)("type",Jt.missed))]))(r);return n&&n.message||""},qT=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===Jt.missed))},HT=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return(0,l.find)((0,l.allPass)([DT,(0,l.propEq)("type",Jt.missedRefEntity),(0,l.propEq)("parentUri",(0,l.path)(Bf(),e))]))(t)},KT=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return(0,l.find)((0,l.allPass)([DT,(0,l.propEq)("type",Jt.missedRefEntity),(0,l.propEq)("parentUri",e.uri)]))(t)},QT=function(e){let{uri:t}=e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return(0,l.any)((0,l.allPass)([DT,MT(t)]))(r)},JT=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return(0,l.find)((0,l.allPass)([DT,(0,l.propEq)("type",Jt.missedRefEntity),(0,l.propEq)("parentUri",(0,l.path)(["relation","uri"],e))]))(t)},XT=(e,t)=>{const{entitiesMap:r,metadata:n}=e,i=t?OT(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 er.attributeValue:{const e=a;if(Dn(a))return Cp(o,e.dataLabelPattern);if(Ln(a)){const t=o,i=ls(t),a=fn(e),s=li(n,a);return qe(i)?Cp(r[i],s.dataLabelPattern):t.label}return""}case er.tempEntity:return Cp(o,a.dataLabelPattern);case er.relationConnection:{const{entity:e,relation:t}=o,i=null==e?void 0:e.entityUri,a=li(n,null==e?void 0:e.entityType);return`${Dp(i&&qe(i)?Cp(r[i],null==a?void 0:a.dataLabelPattern):null==e?void 0:e.entityLabel)}, ${(null==t?void 0:t.relationLabel)||hi(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){CT(e,t,r[t])}))}return e}({},e,{label:Dp(t)})}))},zT=e=>!e.severity||e.severity===zt.ERROR,ZT=(0,l.curry)(((e,t)=>{let r=t.value;switch(e.type){case Ot.TYPE_NESTED:return Object.keys(r).some((t=>{const n=e.attributes.find((0,l.propEq)("name",t));return r[t].some(ZT(n))}));case Ot.TYPE_REFERENCE:return!!ts(t);case Ot.TYPE_BOOLEAN:return!0===r||!1===r||"true"===r||"false"===r;default:return"string"==typeof r&&(r=r.trim()),null!=r&&""!==r}})),eE=(e,t)=>e.every((0,l.complement)(ZT(t))),tE=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.identity;const n=Ao(e,t.type||t.relationType,!0).filter(r);return n.reduce(((r,n)=>{const i=ys(e,t,n.uri,!0);return i&&i.filter((e=>!(e.parent&&(e.parent.ignored||!zo(e.parent))))).forEach((e=>{eE(e.attrValues,n)&&r.push(jT({type:Jt.missed,uri:"",attributeType:n,attributeTypeUri:n.uri,parentUri:e.parent.uri,message:Pt().text("Attribute is required"),source:Xt.local}))})),r}),[])},rE=(0,l.curry)(((e,t,r)=>ys(e,t,r,!1))),nE=(e,t)=>{const r=(0,l.pipe)((0,l.prop)("type"),li(e),(0,l.prop)("attributes"),(0,l.reject)(Cn),(0,l.filter)(Ln),(0,l.map)((0,l.prop)("uri")),(0,l.chain)(rE(e,t)));return(0,l.pipe)(r,(0,l.reject)(ls),(0,l.map)((e=>{let{uri:r}=e;return jT({type:Jt.missedRefEntity,uri:"",attributeTypeUri:at(r,t.type),parentUri:r,message:Pt().text("Entity is required"),source:Xt.local})})))(t)},iE=(e,t,r)=>Object.values(r.attributes||{}).flat().filter((0,l.has)("refEntity")).filter((0,l.pipe)(ls,qe)).flatMap((n=>{const i=ls(n),a=t[i],o=Yn(e,at(n.uri,r.type));return aE(e,t,o,a)})),aE=(e,t,r,n)=>{const i=En(r),a=i.map((t=>Yn(e,t))).filter((0,l.both)(l.identity,(0,l.propEq)("type",Ot.TYPE_REFERENCE))).flatMap(hn).concat(i);return oE(e,t,n,(e=>a.some(et(e.uri))))},oE=function(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:l.identity;const i=tE(e,r,n),a=nE(e,r),o=iE(e,t,r);return[...i,...a,...o]},sE=(e,t)=>{const r=(0,l.path)(Hf(),t)||{};return tE(e,r)},lE=(e,t,r)=>{t=t||{};const n=(0,l.pipe)((0,l.path)(Jf()),(0,l.ifElse)(qe,(e=>t[e]),(0,l.always)(null)))(r),i=sE(e,r),a=(e=>(0,l.path)(Jf(),e)?[]:[jT({type:Jt.missedRefEntity,uri:"",attributeTypeUri:(0,l.path)(qf(),e),parentUri:(0,l.path)(Bf(),e),message:Pt().text("Entity is required"),source:Xt.local})])(r),o=((e,t,r)=>r?oE(e,t,r):[])(e,t,n);return[...i,...a,...o]},uE=e=>(0,l.path)(["entity","uri"],e)?[]:[jT({type:Jt.missedRefEntity,uri:"",attributeTypeUri:(0,l.path)(["relation","type"],e),parentUri:(0,l.path)(["relation","uri"],e),message:Pt().text("Entity is required"),source:Xt.local})],cE=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{relation:r}=t,n=tE(e,r),i=uE(t);return[...n,...i]};function pE(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const dE=(e,t)=>{var r,n;const i=li(e,t);return i.forceValidate||!(null==i||null===(r=i.lifecycleActions)||void 0===r||null===(n=r.validate)||void 0===n||!n.length)||Ja(e)},yE=e=>(0,l.evolve)({uri:e,refEntity:{objectURI:e},refRelation:{objectURI:e}}),fE=e=>{const t=r=>(0,l.ifElse)(Array.isArray,(0,l.map)(t),(0,l.pipe)(yE(e),(0,l.evolve)({value:(0,l.when)((0,l.is)(Object),(0,l.map)(t))})))(r);return t},TE=(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)(us,qe,l.not)]),(e=>{const t=(0,l.pipe)(us,rt)(e);return fE((e=>e.replace(t,t+Ve)))(e)})),(0,l.when)((0,l.pipe)(ls,qe),(t=>{const r=ls(t),n=e[r],i=n&&mE(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){pE(e,t,r[t])}))}return e}({},e,i.attributes)})(t):t})))),EE=(e,t,r)=>ge(be((0,l.clone)(e.attributes),(0,l.clone)(t.attributes),!0),_e((0,l.clone)(t.attributes),(0,l.clone)(t.crosswalks))).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)(TE(r,e.type)),(0,l.map)(fE(ct))))})(e))),mE=(e,t)=>(0,l.evolve)({attributes:Ds({valueTransformer:(0,l.pipe)(ds,TE(t),yE(ct)),deleteEmptyComplex:!0}),uri:ct})(e);function hE(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){bE(e,t,r[t])}))}return e}function bE(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const OE=(0,l.unless)(l.isNil,(e=>e.replace(new RegExp($e,"g"),"uri$$$$").replace(new RegExp(Ve,"g"),""))),vE=e=>(0,l.pipe)((0,l.evolve)({objectUri:OE,objectParentUri:OE}),(e=>{return hE({type:(t=e.errorType,"MISSED"===(t=(t||"").toUpperCase())?Jt.missed:Jt.invalid),attributeTypeUri:e.objectTypeUri,parentUri:e.objectParentUri||e.objectUri&&ut(e.objectUri),uri:e.objectUri,source:Xt.validationService},(0,l.pick)(["message","severity"],e));var t}))(e),gE=(e,t)=>(0,l.map)((0,l.pipe)(vE,(e=>{var r,n,i,a;const{metadata:o}=t,{uri:s,parentUri:u}=e,c=XT(t,s),p=null!=c&&c.length?c.slice(0,-1):XT(t,u),d=((e,t,r)=>{let{uri:n,attributeTypeUri:i}=r,a=i&&Yn(e,i);if(!a&&n&&t&&t.length){const e=(0,l.last)(t);e.type===er.attributeValue&&(a=e.valueType)}return a})(o,c,e);return hE({},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&<(i)){const n=(0,l.last)(a),i=n.valueType;if(Ln(i)&&bn(i).includes(o)){const i=ls(n.value),o=i&&qe(i)?t[i]:null;return o?hE({},e,{parentUri:o.uri,path:a.concat({type:er.tempEntity,value:o,valueType:li(r,o.type),label:""})}):e}}return e}})(t)))(e),_E=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};function NE(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var AE;!function(e){e.Random0="random0",e.Random1="random1",e.SpectreYellowCyan="spectreYellowCyan",e.SpectreBlueBrown="spectreBlueBrown",e.Charts="charts",e.Crosswalks="crosswalks"}(AE||(AE={}));const PE={},RE={random0:{granularity:3,colors:["#ffee91","#ffdc0e","#fec92f","#eab710","#f69785","#f57f27","#fccde5","#f8b6b8","#ff9acc","#ee4272","#b71137","#c4c0e1","#bd81be","#5f3577","#9fd6bf","#8accca","#12959f"]},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"]}},SE=(0,l.curry)(((e,t)=>{const r=(e=>{if(!PE[e]){const t=RE[e]||RE.random0;PE[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){NE(e,t,r[t])}))}return e}({counter:0,granularityCounter:0,idToColor:{}},t)}return PE[e]})(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]})),wE=e=>SE(AE.Charts,e);var IE=r(51404),UE=r.n(IE);const CE=Array.from({length:100},((e,t)=>t/100)),jE=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)},DE={},LE=new(UE())({hash:jE,saturation:CE.slice(15,71),lightness:CE.slice(50,90)}),kE=(0,l.curry)(((e,t,r)=>{t in DE||(DE[t]={});const n=DE[t];r in n||(n[r]=((e,t)=>{const r=String(jE(t));return e.hsl(r)})(e,r));const[i,a,o]=n[r];return`hsl(${i}, ${100*a}%, ${100*o}%)`})),FE=kE(LE,"crosswalks"),xE=kE(LE,"sources"),ME=kE(LE,"contributors");function $E(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=(0,l.has)("items"),WE=e=>0===e,YE=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)},BE=e=>e.reduce(((e,t)=>e+t.width),0),qE=e=>e.reduce(((e,t)=>Math.max(e,t.height)),0),HE=e=>e.reduce(((e,t)=>Math.max(e,t.width)),0),KE=e=>e.reduce(((e,t)=>e+t.height),0),QE=e=>(0,l.is)(String,e)&&e.includes("%"),JE=e=>Boolean(e.spacer),XE=(e,t)=>Math.max(Math.floor(parseFloat(t)/100*e),1),zE=e=>((null==e?void 0:e.items)||[]).reduce(((e,t)=>e.concat(GE(t)?zE(t):t)),[]),ZE=e=>({id:e.layout}),em=function(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:ZE;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.floor(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=QE(r.width)?XE(i,r.width):u}return YE(o,(0,l.prop)("minWidth",n),(0,l.prop)("maxWidth",n))},a=e=>{let{minHeight:t,maxHeight:r,height:n=1}=e;return YE(n,t,r)},o=(e,t)=>GE(t.items[0])?p(e,t.items[0]):null,s=(t,r)=>{const o=r.items.reduce(((o,s,u)=>{const c=i(t,r,s,GE(s)?n(s.layout):e(s.view)),d=WE(u)?t.x:(0,l.last)(o).x+(0,l.propOr)(c,"width",(0,l.last)(o));if(GE(s))return o.concat(p($E({},t,{x:d,width:c}),s));{const r=e(s.view);return o.push($E({y:t.y,x:d,height:a(r),width:c},r)),o}}),[]);return{x:t.x,y:t.y,width:BE(o),height:qE(o),items:o}},u=(t,r)=>{const i=r.items.reduce(((r,i,o)=>{const s=GE(i)?n(i.layout):e(i.view),u=t.width,c=a(s),d=WE(o)?t.y:(0,l.last)(r).y+((0,l.last)(r).height||c);if(GE(i))return r.concat(p($E({},t,{y:d,width:u}),i));{const n=e(i.view);return r.push($E({},n,{y:d,x:t.x,height:c,width:u,minWidth:(0,l.is)(Number,n.minWidth)?YE(n.minWidth,n.minWidth,u):void 0,maxWidth:(0,l.is)(Number,n.maxWidth)?YE(n.maxWidth,n.maxWidth,u):void 0})),r}}),[]);return{x:t.x,y:t.y,width:HE(i),height:KE(i),items:i}},c=(t,r)=>{const n=(t,r,n,i)=>{const o=e(n),s=t.width,u=a(o),c=WE(i)?t.y:(0,l.last)(r).y+((0,l.last)(r).height||u);return $E({},o,{x:t.x,y:c,width:s,height:u})},i=(e,t)=>{const r=t.reduce(((t,r,i)=>{if("string"==typeof r)t.push(n(e,t,r,i));else if("object"==typeof r){const a=Math.round(e.width/2),o=$E({},e,{width:a}),s=$E({},e,{x:e.x+a,width:a}),u=(0,l.has)("left",r)&&n(o,t,r.left,i),c=(0,l.has)("right",r)&&n(s,t,r.right,i),p=(0,l.propOr)(0,"height"),d=Math.max(p(u),p(c));t.push($E({},e,{height:d,items:(0,l.filter)(l.identity,[u,c])}))}return t}),[]);return $E({},e,{height:KE(r),items:r})},o=i(t,(0,l.propOr)([],"top",r)),s=Math.round(.66*t.width),u=(0,l.isEmpty)(o)?t.y:t.y+o.height,c=i($E({},t,{y:u,width:s}),(0,l.propOr)([],"center",r)),p=i({x:t.x+s,y:u,width:t.width-s},(0,l.propOr)([],"right",r)),d=o.height+Math.max(c.height,p.height),y=(0,l.pipe)((0,l.prop)("items"),l.length,(0,l.equals)(0));return $E({},t,{height:d,items:(0,l.reject)(y,[o,c,p])})},p=(e,t)=>{const r=$E({},t,{items:(0,l.reject)(JE,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 zE(f)},tm=(e,t)=>(e||[]).filter((e=>t.some((t=>t.id===e.id))));function rm(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){nm(e,t,r[t])}))}return e}function nm(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const im={BarChart:Er.BAR,BarChartGrouped:Er.BAR,BarChartHorizontal:Er.BAR,LineChart:Er.LINE,Map:Er.MAP,Pie:Er.PIE},am=(e,t)=>st(e)?nt(e,t):e,om=e=>{if(!e)return;const t=Array.isArray(e)?e[0]:e,{chartId:r,geoIdName:n,showLegend:i}=t,a=im[r];return rm({},a?{chartType:a}:{},{showLegend:i,isHorizontal:"BarChartHorizontal"===r||void 0,geoIdName:n})},sm=e=>{if(!e)return;const t=Array.isArray(e)?e[0]:e,{findShared:r}=t;return rm({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"]))},lm=(e,t,r)=>{const n=(e=>e&&ne(e).map((e=>{const{type:t,value:r}=e;return rm({},e,{value:[ft,Tt,pt.HAS_ALL].includes(t)&&"string"==typeof r?r.split(","):r})})).map((e=>{let{type:t,attribute:r,value:n}=e;return{filter:mt(t),fieldName:r,values:n?ne(n):void 0}})))(e);return t&&st(t)||!r?n:(n||[]).concat((i=r,{filter:pt.EQUALS,fieldName:"type",values:[i]}));var i},um=["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"],cm={"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:am(n,r),filters:lm(a,n,r),chartType:Er.BAR,component:mr.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:am(n,r),filters:lm(a,n,r),chartType:Er.BUBBLE,component:mr.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:mr.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=ne(a).find((e=>"type"===(null==e?void 0:e.attribute))),p=n||(null==c?void 0:c.value);return rm({id:t,count:o,canRead:u,orderType:s,attributeUri:am(r,p),filters:lm(a,r,p),component:mr.DashboardFacet,title:i,showOthers:!0},om(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:am(n,r),filters:lm(a,n,r),chartType:Er.MAP,component:mr.DashboardFacet,title:i,geoUrl:um[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 rm({id:t,count:o,canRead:l,attributeUri:am(n,r),filters:lm(a,n,r),component:mr.DashboardFacet,title:i,geoUrl:s,chartType:Er.MAP,projection:"geoMercator"},om(u))},"com.reltio.plugins.dashboard.ProfileStatsView":e=>{let{id:t,canRead:r,caption:n}=e;return{id:t,canRead:r,component:mr.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:sm(i),component:mr.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:lm(n,null,a),component:mr.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:pt.GTE,fieldName:"matches",values:["1"]}],component:mr.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:mr.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:Er.CLOUD,component:mr.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:Er.TREE,component:mr.DashboardFacet,attributeUri:"roles"}},"com.reltio.plugins.inbox.NotificationInboxView":e=>{let{id:t,canRead:r,caption:n}=e;return{id:t,canRead:r,component:mr.NotificationInboxFacet,title:n||Pt().text("Notifications")}},"com.reltio.plugins.activities.ActivitiesView":e=>{let{id:t,canRead:r,caption:n}=e;return{id:t,canRead:r,component:mr.ActivitiesViewFacet,title:n||Pt().text("Activity log")}}},pm=e=>({id:e,height:10}),dm=(0,l.pipe)((0,l.map)((e=>{const t=cm[null==e?void 0:e.class];return t?t(e):null})),(0,l.reject)(l.isNil)),ym=e=>{if("0.1"===e.version){const t=dm(e.views),r=em(pm,e.layout,{columns:4});return{id:e.id,margin:0,layout:tm(r,t),views:t}}return e},fm=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"),ne)],[(0,l.prop)("items"),(0,l.pipe)((0,l.prop)("items"),(0,l.map)((e=>fm(e))),l.flatten)],[l.T,(0,l.always)([])]])(e);function Tm(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){Em(e,t,r[t])}))}return e}function Em(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const mm=Tm({},hr,{OldMapView:"com.reltio.plugins.entity.EntityMapView",OldTreeView:"com.reltio.plugins.entity.TreeView"}),hm=e=>e,bm={[mm.Attributes]:hm,[mm.HierarchyTree]:hm,[mm.HierarchyPaths]:hm,[mm.RelationsTable]:hm,[mm.Relations]:e=>Tm({},(0,l.omit)(["recordClass"],e),{isComplex:"com.reltio.plugins.entity.relations.ComplexRelationRecord"===e.recordClass}),[mm.SingleAttributeView]:hm,[mm.CustomView]:hm,[mm.TableAttributeView]:hm,[mm.MapView]:hm,[mm.OldTreeView]:e=>Tm({},e,{class:hr.HierarchyTree}),[mm.OldMapView]:e=>Tm({},e,{class:hr.MapView}),[mm.ImageAttributeView]:hm,[mm.PotentialMatchesView]:hm},Om=(0,l.pipe)((0,l.map)((e=>{const t=bm[null==e?void 0:e.class];return t?t(e):null})),(0,l.reject)(l.isNil)),vm=(0,l.curry)(((e,t)=>{switch((0,l.pipe)((0,l.defaultTo)([]),(0,l.find)((0,l.propEq)("id",t)),(0,l.prop)("class"))(e)){case hr.MapView:return{id:t,height:5,minHeight:5};case hr.Relations:return{id:t,autosizing:!0,minWidth:2};default:return{id:t,autosizing:!0}}})),gm=e=>{if("0.1"===e.version){const t=Om(e.views),r=em(vm(t),e.layout,{columns:4});return{id:e.id,layout:tm(r,t),views:t,workflow:e.workflow,maxWidth:e.maxWidth}}return e},_m=(e,t)=>e.class===t||e["react-class"]===t,Nm=e=>{const{includeUris:t,excludeUris:r}=(e=>e.reduce(((e,t)=>{if(_m(t,hr.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 _m(t,hr.SingleAttributeView)&&e.includeUris.push(t.attributeUri),e}),{includeUris:[],excludeUris:null}))(e);return e=>{let{uri:n}=e;return r&&!r.includes(n)||t.includes(n)}},Am=(e,t)=>e.filter((e=>t.some((t=>_m(e,t))))).map((e=>{let{id:t}=e;return t})),Pm=(e,t)=>{let{extensions:r}=e;return(r||[]).find((e=>e.id===t))};function Rm(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){Sm(e,t,r[t])}))}return e}function Sm(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const wm=(e,t)=>fm(t).map((t=>(0,l.pipe)((0,l.map)((e=>Pm(e,t))),(0,l.reject)(l.isNil),l.head)(e))),Im=e=>{let{extensions:t=[]}=e;return t.filter((e=>"com.reltio.plugins.ui.perspective"===e.point&&e["entity-type"]))},Um=(e,t)=>{if("scroll"===t.layout.layout){const r=wm(e,t.layout),n=ym(Rm({},t,{views:r,version:"0.1"}));return{class:Or.Dashboard,id:t.id,views:n.views,layout:n.layout}}return{class:Or.Dashboard,views:t.views,layout:t.layout,id:t.id}},Cm=(e,t)=>{const r=wm(e,t.layout)[0];return{class:Or.DQDashboard,id:t.id,viewsByDataLevel:r.viewsByDataLevel,layoutsByDataLevel:r.layoutsByDataLevel}},jm=(e,t)=>{const r=wm(e,t.layout)[0];return{class:Or.RelationshipSearch,id:t.id,options:r.options,consoleExportApp:r.consoleExportApp}},Dm=(e,t)=>{const r=wm(e,t.layout)[0];return{class:Or.Interactions,id:t.id,sortOrder:r.sortOrder,sortColumn:r.sortColumn,max:r.max,attributes:r.attributes,caption:r.caption}},Lm=(e,t)=>{const r=wm(e,t.layout)[0];return{class:Or.Relationships,id:t.id,canCreate:r.canCreate,canUpdate:r.canUpdate,canRead:r.canRead,canDelete:r.canDelete,profileBand:r.profileBand}},km=(e,t)=>{const r=wm(e,t.layout)[0];return{class:Or.Sources,id:t.id,canCreate:r.canCreate,canUpdate:r.canUpdate,canRead:r.canRead,canDelete:r.canDelete,profileBand:r.profileBand}},Fm=(e,t)=>{const r=wm(e,t.layout)[0];return{class:Or.PotentialMatches,id:t.id,availableTabs:r.availableTabs,allowMergeAll:r.allowMergeAll,matchActions:r.matchActions}},xm=(e,t)=>{const r=wm(e,t.layout)[0],n=r.potentialMatchesReview||{processType:(e=>{const[t]=((e,t)=>e.flatMap((e=>{let{extensions:t=[]}=e;return t.filter((e=>{let{point:t}=e;return"com.reltio.plugins.search.toolbar.component"===t}))})))(e).filter((e=>"com.reltio.plugins.ui.CustomActionButtonView"===e.class&&e.processType));return null==t?void 0:t.processType})(e)};return{class:Or.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"]}},Mm=(e,t)=>({class:Or.Graph,id:t.id}),$m=(e,t)=>({class:Or.ProfileActivityLog,id:t.id}),Vm=e=>t=>!!(0,l.intersection)(e,t).length,Gm=(0,l.cond)([[Vm(["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"]),()=>Um],[Vm(["com.reltio.plugins.react.ReactDQDashboardView"]),()=>Cm],[Vm(["com.reltio.plugins.graph.GraphView"]),()=>Mm],[Vm(["com.reltio.plugins.react.ReactRelationshipSearchView"]),()=>jm],[Vm(["com.reltio.plugins.react.ReactInteractionsView","com.reltio.plugins.interactions.InteractionsView"]),()=>Dm],[Vm(["com.reltio.plugins.react.ReactRelationshipsView","com.reltio.plugins.relationships.RelationshipsView"]),()=>Lm],[Vm(["com.reltio.plugins.sources.SourcesView","com.reltio.plugins.react.ReactSourcesView"]),()=>km],[Vm(["com.reltio.plugins.sameas.SameAsView","com.reltio.plugins.react.ReactPotentialMatchesView"]),()=>Fm],[Vm(["com.reltio.plugins.react.ReactSearchView","com.reltio.plugins.search.dev.SearchView"]),()=>xm],[Vm(["com.reltio.plugins.activities.ProfileActivitiesView","com.reltio.plugins.react.ReactProfileActivityLog"]),()=>$m],[l.T,()=>(0,l.always)(void 0)]]),Wm=(e,t)=>{if("com.reltio.plugins.entity.ProfileAction"===e.class)return((e,t)=>{const r=(0,l.pipe)((0,l.chain)(Im),(0,l.map)((t=>((e,t)=>{const r=wm(e,t.layout),n=gm(Rm({},t,{views:r,version:"0.1"}));return{entityType:t["entity-type"],views:n.views,layout:n.layout}})(e,t))),(0,l.indexBy)((0,l.prop)("entityType")),(0,l.map)((0,l.pick)(["layout","views"])))(e);return{class:Or.Profile,id:t.id,entityTypes:r}})(t,e);const r=(e=>{if(e.perspective)return e.perspective})(e);if((0,l.isNil)(r))return;const n=(0,l.pipe)((0,l.map)((e=>Pm(e,r))),(0,l.reject)(l.isNil),l.head)(t);if((0,l.isNil)(n))return;const i=fm(n.layout),a=(0,l.pipe)((0,l.chain)((e=>{let{extensions:t}=e;return(t||[]).filter((e=>i.includes(e.id)))})),(0,l.pluck)("class"),(0,l.reject)(l.isNil))(t);return Gm(a)(t,n)},Ym=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))},Bm=e=>(0,l.pipe)((0,l.chain)(Ym),(0,l.sortBy)((0,l.propOr)(1/0,"position")))(e).map((t=>{const r=((e,t)=>(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.map)((e=>({label:e.label,icon:e.icon,screen:Wm(e,t)}))))(t))(t,e);return{label:t.label,icon:t.icon,menu:r.length?{type:"side",items:r}:void 0,screen:Wm(t,e)}}));function qm(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Hm=e=>{let{extensions:t}=e;return(t||[]).filter((0,l.propEq)("id","com.reltio.plugins.pivoting.PivotingSettings"))},Km=e=>({id:e,height:10}),Qm=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)(Hm),(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=dm(((e,t)=>fm(t).map((t=>(0,l.pipe)((0,l.map)((e=>Pm(e,t))),(0,l.pluck)("views"),l.flatten,l.head,(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){qm(e,t,r[t])}))}return e}({},e,{id:t})))(e))))(e,t.layout)),n=em(Km,t.layout,{columns:4});return{views:r,layout:tm(n,r)}}return t})(e,r);return{"attribute-types":n,views:i.views,layout:i.layout}}))},Jm=e=>{const t=(e=>(0,l.pipe)((0,l.map)((e=>Pm(e,"com.reltio.plugins.entity.EntityRequestSettings"))),(0,l.reject)(l.isNil),l.head,(0,l.prop)("defaultMaxValues"))(e))(e),r=(e=>(0,l.pipe)((0,l.map)((e=>Pm(e,"com.reltio.plugins.imageattribute.fieldsorder"))),(0,l.reject)(l.isNil),l.head,(0,l.omit)(["point","id"]))(e))(e),n=(e=>(0,l.pipe)((0,l.map)((e=>Pm(e,"com.reltio.plugins.ui.LookupAutocomplete"))),(0,l.reject)(l.isNil),l.head,(0,l.defaultTo)({}),(0,l.pick)(["includeAttributes","excludeAttributes"]))(e))(e),i=(e=>(0,l.pipe)((0,l.map)((e=>Pm(e,"com.reltio.plugins.entity.ValidationServiceLevels"))),(0,l.reject)(l.isNil),l.head,(0,l.prop)("levels"))(e))(e),a=(e=>(0,l.pipe)((0,l.map)((e=>Pm(e,"com.reltio.plugins.entity.Validation"))),(0,l.reject)(l.isNil),l.head,(0,l.prop)("validateReadMode"))(e))(e),o=(e=>(0,l.pipe)((0,l.map)((e=>Pm(e,"com.reltio.plugins.ui.LocalizationServer"))),(0,l.reject)(l.isNil),l.head,(0,l.prop)("configuration"))(e))(e),s=(e=>(0,l.pipe)((0,l.map)((e=>Pm(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);return{i18n:o,entity:{requestSettings:{defaultMaxValues:t}},image:{attributeFieldsOrder:r},lookups:{autocomplete:n},validate:{levels:i,validateReadMode:a},attributePresentations:s}},Xm=e=>({layout:Bm(e),pivoting:Qm(e),properties:Jm(e)});var zm=r(58697),Zm=r.n(zm);function eh(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){th(e,t,r[t])}))}return e}function th(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const rh=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}_${Zm()()}`;return n[e.id].push(t),i=!0,eh({},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]++,eh({},e,{id:n[e.id][o[e.id]]})))):r;return i?{views:a,layout:s}:{views:t,layout:r}},nh=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(nh(e))}))}))),t},ih=(e,t)=>(0,l.find)((e=>(0,l.find)((0,l.eqBy)(lh,t),(0,l.propOr)([],"crosswalks",e))),e),ah=(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(ah(e))}))})),r},oh=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=oh(e);r>t&&(t=r)}))})),t+1):t},sh=(e,t)=>{if(qe(t.uri))return!0;const r=(e||[]).find((e=>e.attributes&&e.attributes.includes(t.uri)));return!r||"configuration/sources/Reltio"===r.type},lh=e=>{let{sourceTable:t,type:r,value:n}=e;return`${t||""}/${r}/${n}`},uh=e=>{const t="attributes"in e&&e.attributes,r="attributeURIs"in e&&e.attributeURIs;return t||r||[]},ch=e=>{let{deleteDate:t}=e;return!!t&&f().utc(t).valueOf()<Date.now()},ph=(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)},dh=(0,l.eqBy)(lh),yh=(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)(rs,(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)))),fh=(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=Pt().number(t));return t})),Th=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3;return(0,l.is)(Number,e)?e>t?Pt().number(e,"0,0.0a").toUpperCase():Pt().number(e,"0,0"):""},Eh=(0,l.ifElse)((0,l.has)("filename"),(0,l.prop)("filename"),(0,l.pipe)((0,l.prop)("link"),(0,l.split)("/"),l.last)),mh=(e,t)=>t&&e!==t?`${t} (${e})`:e,hh=(e,t,r)=>(0,l.path)([t,r,"displayName"],e),bh=(e,t,r)=>{const n=hh(e,t,r);return mh(r,n)},Oh=(0,l.curry)(((e,t,r)=>(0,l.hasPath)([t,r],e))),vh=(0,l.complement)(Oh),gh=e=>(0,l.pipe)((0,l.propOr)({},e),Object.entries,(0,l.map)((e=>{let[t,{displayName:r}]=e;return{lookupCode:t,value:r}}))),_h=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)},Nh=(0,l.curry)(((e,t)=>t.map((t=>{let{type:r,codeValues:n}=t;return{type:r,codeValues:n.filter(vh(e,r))}})).filter((e=>{let{codeValues:t}=e;return t.length>0})))),Ah=(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?Q(a):"L LTS";switch(n.type){case Ot.TYPE_NUMBER:case Ot.TYPE_FLOAT:case Ot.TYPE_DOUBLE:case Ot.TYPE_LONG:case Ot.TYPE_INT:case Ot.TYPE_COUNT:return t&&fh(o,t);case Ot.TYPE_BOOLEAN:case Ot.TYPE_BOOLEAN_RADIO:case Ot.TYPE_RDM_LOOKUPS_NOT_RESOLVED:return(0,l.isNil)(t)?t:le(t)?Pt().text("yes"):Pt().text("no");case Ot.TYPE_DATE:return(0,l.is)(Number,t)&&(t=N(Number(t)).getTime()),t&&(du(t)?yu(t):Pt().date(t,s));case Ot.TYPE_ACTIVENESS_DATE:case Ot.TYPE_LOCAL_DATE:return t&&(du(t)?yu(t):Pt().date(t,s));case Ot.TYPE_TIMESTAMP:return t&&(du(t)?yu(t):Pt().date(isNaN(t)?t:Number(t),u));case Ot.TYPE_FILE:return(0,l.propOr)(null,"filename",t);case Ot.TYPE_SELECT:{const e=n.options.find((0,l.propEq)("value",t));return(0,l.propOr)(null,"label",e)}default:return(0,l.is)(Object,t)?mh((0,l.propOr)(null,"lookupCode",t),(0,l.propOr)(null,"value",t)):t}})),Ph={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)"},Rh=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()}},Sh=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})))),wh=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}=t,i=e.onResponse.reduce(((e,t)=>r=>{r instanceof Response?t({response:r,abort:n,next:e}):e(r)}),t.next);i(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)((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),Rh,Sh);return{request:(e,n)=>{const i=s(fetch),a=r?(e,t)=>i(e,t).then((e=>new Promise(((t,n)=>{r({response:e,next:e=>{t(e)},abort:n})})))):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}},Ih="__metadata",Uh=(e=>{const t=[Ih,"draft"];return(0,l.lens)((0,l.pathOr)(null,t),(0,l.assocPath)(t))})(),Ch=(0,l.set)(Uh),jh=(0,l.view)(Uh),Dh=Ch(vt.NEW),Lh=Ch(vt.REMOVED),kh=Ch(vt.EDITED),Fh=Ch(vt.IGNORED),xh=(0,l.pipe)(jh,(0,l.equals)(vt.REMOVED)),Mh=(0,l.pipe)(jh,(0,l.equals)(vt.NEW)),$h=(0,l.pipe)(jh,(0,l.equals)(vt.EDITED)),Vh=(0,l.pipe)(jh,(0,l.complement)(l.isNil)),Gh=(0,l.pipe)(jh,(0,l.equals)(vt.IGNORED)),Wh=(0,l.omit)([Ih]),Yh=(e,t)=>e===Ih?void 0:t;function Bh(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const qh=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=qh(e,n,r);if(i.length>0)return[t].concat(...i)}return[]},Hh=(e,t)=>qh((0,l.propEq)("nodeId",t),e),Kh=(e,t)=>qh((0,l.pathEq)(["entity","uri"],t),e),Qh=(e,t)=>{const r=Hh(e,t);return r.length>1?r[r.length-2]:null},Jh=(e,t)=>{const r=Hh(e,t);return r.length>0?r[r.length-1]:null},Xh=(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=>Xh(t,{parent:e,childrenProcessing:n,nodeProcessing:i}))))),e},zh=()=>{},Zh=(e,t)=>{let{parent:r,nodeProcessing:n=zh}=t;n(e,r),e.children&&e.children.forEach((t=>Zh(t,{parent:e,nodeProcessing:n})))},eb=e=>{let{node:t,connection:r,isReversed:n}=e;switch(t.editingMode){case lr.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 lr.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 lr.editing:{var d,y;const e={oldRelation:t.relation,newRelation:r.relation,isReversed:n},i=null===(d=t.entity)||void 0===d?void 0:d.uri,a=null===(y=r.entity)||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){Bh(e,t,r[t])}))}return e}({},e,i===a?{}:{entityUri:i,newEntityUri:a})}}},tb=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&&Zh(r,{nodeProcessing:r=>{const n=(0,l.path)(["editingConnections",(0,l.path)(["relation","uri"],r)],e),i=Boolean(e.isReversed);if(r.editingMode===lr.addingChild||r.editingMode===lr.addingParent){const{entityUri:e,relation:a,parentEntityUri:o}=eb({node:r,connection:n,isReversed:i}),s=Af({parentUri:o,relation:a,entityUri:e});t.push(s)}if(r.editingMode===lr.editing){const{oldRelation:e,newRelation:a,entityUri:o,newEntityUri:s}=eb({node:r,isReversed:i,connection:n}),l=s?wf({entityUri:o,newEntityUri:s,relation:a,isReversed:i}):Sf({oldRelation:e,newRelation:a});t.push(l)}}})})),t},rb={relationTypeLabel:"relationTypeLabel",entityLabel:"entityLabel"},nb={asc:"asc",desc:"desc"},ib=rb.entityLabel,ab=nb.asc,ob=(0,l.always)(0),sb=e=>{let{sortField:t=ib,sortOrder:r=ab,typesLabelsMap:n}=e;return e=>e.slice().sort((e=>{let{sortField:t,sortOrder:r,typesLabelsMap:n}=e;switch(t){case rb.relationTypeLabel:return((e,t)=>(r,n)=>{const i=(0,l.path)(["relation","type"]),a=e[i(r)],o=e[i(n)];return _g.strings.sort(t,a,o)})(n,r);case rb.entityLabel:return(e=>(t,r)=>{const n=(0,l.path)(["entity","label"]),i=n(t),a=n(r);return _g.strings.sort(e,i,a)})(r);default:return ob}})({sortField:t,sortOrder:r,typesLabelsMap:n}))},lb=(0,l.pipe)((0,l.defaultTo)(""),l.toLower,(0,l.ifElse)((0,l.includes)(l.__,Object.values(nb)),l.identity,(0,l.always)(ab))),ub=(0,l.pipe)((0,l.defaultTo)(""),(0,l.ifElse)((0,l.includes)(l.__,Object.values(rb)),l.identity,(0,l.always)(ib)));var cb=r(91104);let pb;const db=(e,t)=>(pb||(pb=cb.createClient({key:t})),new Promise((t=>{pb.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)}))}))),yb=e=>{let t=e.label||e.value||"";return Array.isArray(t)?t=t.join(", "):(0,l.is)(Object,t)&&(t=""),t},fb=(e,t,r)=>Object.values(e).filter(Array.isArray).flat(1/0).filter(zo).flatMap((e=>{let n;return e.type==t&&(n=r?[e]:[yb(e)]),(0,l.is)(Object,e.value)&&(n=(n||[]).concat(fb(e.value,t,r))),n})),Tb=e=>e&&e.length>0,Eb=(e,t)=>[].concat(e&&e.attributes?fb(e.attributes,t):[]).filter(l.identity),mb=(e,t,r,n,i)=>{if(e&&e.type){const t=(li(r,e.type).geoLocationAttributes||[]).map((t=>{return r=Eb(e,t.latitude),n=Eb(e,t.longitude),Tb(r)&&Tb(n)&&{lat:Number(r[0]),lng:Number(n[0])};var r,n})).filter(l.identity);if(t.length>0)return Promise.resolve(t[0])}const a=t.GeoLocation;if(a){const e=a.map((e=>{const t=e.value.Latitude,r=e.value.Longitude;if(Tb(t)&&t[0].value&&Tb(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?db(n.label,i).catch((()=>null)):Promise.resolve(null)},hb=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=li(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=>t.attributes[e])).filter(l.identity).flatMap((e=>e.map((e=>({id:e.uri,label:e.label,entity:t,pointSource:e.value,refAttribute:e}))))));var r})));return Promise.all(i.map((t=>{let{id:n,label:i,entity:a,pointSource:o,refAttribute:s}=t;return mb(a,o,e,s,r).then((e=>!e&&a.label&&""!==a.label?db(a.label,r).catch((()=>null)):e)).then((e=>{let t=Array.isArray(e)?e:[e];return e&&t.map((e=>({id:e.id||n,label:i,entity:a,point:e})))})).catch((()=>null))}))).then((e=>e.flat(1/0).filter(l.identity)))},bb=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=li(e,t.type);return((null==r?void 0:r.geoLocationAttributes)||[]).flatMap((r=>{if(Yn(e,r.latitude,t.type)&&Yn(e,r.longitude,t.type)){const e=Eb(t,r.latitude),n=Eb(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))},Ob=(e,t,r)=>Promise.all([bb(e,t),hb(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.lon===e.point.lon))))]}));function vb(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){gb(e,t,r[t])}))}return e}function gb(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const _b=(e,t)=>t.values.map(co(e,t.entityTypeUri)),Nb=(e,t,r)=>Hs(t.fieldName,r)||Yn(e,nt(t.fieldName,(0,l.propOr)("","entityTypeUri",t)),(0,l.propOr)("","entityTypeUri",t)),Ab=(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?mh(e,t):e}),r)},Pb=(0,l.path)(["attrType","label"]),Rb=(0,l.reduce)(((e,t)=>{const r=(0,l.path)(["attrType","lookupCode"],t);if(r){const n=t.values.reduce(((e,t)=>vb({},e,{[t]:!0})),{});e[r]=e[r]?vb({},e[r],n):n}return e}),{}),Sb=(0,l.pipe)((0,l.prop)("values"),E),wb=(0,l.pipe)((0,l.defaultTo)({}),(0,l.propEq)("fieldName",xt.type.name)),Ib=e=>e.type===jb.NUMERIC_RANGE_FACET,Ub=e=>e.type===jb.DATE_RANGE_FACET,Cb=(0,l.either)(Ib,Ub),jb={NUMERIC_RANGE_FACET:"numericRangeFacet",DATE_RANGE_FACET:"dateRangeFacet",WITH_DROPDOWN_CHECKBOXES_FACET:"facetWithDropdownCheckboxes",COMPLEX_FACET:"complexFacet",ENTITY_TYPE_FACET:"entityTypeFacet"},Db=e=>{switch(null==e?void 0:e.name){case xt.type.name:return jb.ENTITY_TYPE_FACET;case xt.createdBy.name:case xt.updatedBy.name:case xt.sourceSystems.name:case xt.tags.name:case xt.roles.name:case xt.matchRules.name:case xt.MLRecommendedMatch.name:return jb.WITH_DROPDOWN_CHECKBOXES_FACET;case xt.createdTime.name:case xt.updatedTime.name:case xt.startDate.name:case xt.endDate.name:return jb.DATE_RANGE_FACET;case xt.matches.name:case xt.matchScore.name:return jb.NUMERIC_RANGE_FACET;default:return(e=>{switch(e){case"Image":case"Nested":case"Reference":return jb.COMPLEX_FACET;case"Int":case"Float":case"Double":case"Long":case"Number":case"Count":return jb.NUMERIC_RANGE_FACET;case"Date":case"Timestamp":case"ActivenessDate":return jb.DATE_RANGE_FACET;default:return jb.WITH_DROPDOWN_CHECKBOXES_FACET}})(null==e?void 0:e.type)}},Lb=(0,l.pipe)(Nb,Db),kb=(0,l.pipe)((0,l.path)(["attrType","type"]),ei),Fb=(0,l.cond)([[Ib,(0,l.always)(pt.IN_RANGE)],[Ub,(0,l.always)(pt.WITHIN)],[(0,l.allPass)([kb,e=>e.values.length>=2]),(0,l.always)(pt.EXISTS)],[l.T,(0,l.always)(pt.EQUALS)]]),xb=(0,l.cond)([[Ub,(0,l.prop)("values")],[Ib,(0,l.prop)("values")],[kb,e=>1===e.values.length?e.values.map(le):[]],[(0,l.pipe)((0,l.path)(["values",0]),Array.isArray),(0,l.prop)("values")],[l.T,e=>[e.values]]]);function Mb(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const $b=(0,l.pipe)((0,l.path)(["attrType","type"]),Kn),Vb=(0,l.pipe)((0,l.path)(["attrType","type"]),Xn),Gb=(0,l.pipe)((0,l.prop)("attrType"),Qs),Wb=(0,l.pipe)((0,l.prop)("attrType"),Ks),Yb=e=>t=>t.values.map((t=>li(e,t).label)).join(" , "),Bb=(0,l.when)((0,l.propSatisfies)((0,l.gt)(l.__,1),"length"),(0,l.join)(" – ")),qb=e=>{const t=(0,l.pipe)((0,l.map)((0,l.pipe)(l.uniq,(0,l.map)(Pt().number),Bb)),(0,l.join)(","))(e.values);return`${Pb(e)}: ${t}`},Hb=e=>{const t=(0,l.pipe)((0,l.map)((0,l.pipe)(l.uniq,(0,l.map)(w),Bb)),(0,l.join)(","))(e.values);return`${Pb(e)}: ${t}`},Kb=e=>t=>`${Pb(t)}: ${_b(e,t).join(", ")}`,Qb=e=>t=>{const r=Ab(e,t);return`${Pb(t)}: ${r.join(", ")}`},Jb=(0,l.curry)(((e,t,r)=>(0,l.map)((0,l.cond)([[Wb,Yb(e)],[Vb,qb],[$b,Hb],[Gb,Kb(e)],[l.T,Qb(t)]]),r))),Xb=(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){Mb(e,t,r[t])}))}return e}({},t,{attrType:Nb(e,t,n)}))),Jb(e,r))(t),zb=new RegExp(`^${Pt().text("Search")}`),Zb=(e,t,r,n)=>{let{uiState:i}=t;const{facets:a,keyword:o,advanced:s,readableQuery:u}=i;return(0,l.isEmpty)(s)?[...Xb(e,a,r,n),...o?[o.value]:[]]:[(0,l.replace)(zb,"",u)]},eO=(0,l.pipe)((0,l.omit)(["PICK_DATE"]),l.values)(ht),tO=e=>(e=>eO.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]=fu(t);return e.replace(r,i).replace(n,a)}),e))(e),rO=(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}`})),nO={geoPolygon:"geoPolygon",geoLocation:"geoLocation",onMapMove:"onMapMove"},iO=e=>[nO.geoPolygon,nO.onMapMove].includes(e),aO=e=>{let[t,r]=e;return`(${+t.toFixed(6)}, ${+r.toFixed(6)})`},oO=e=>{let[t,r,n]=e;return`(${+t.toFixed(6)}, ${+r.toFixed(6)}) ${+n.toFixed(1)}`},sO=(e,t)=>iO(e)?t.map(aO):[oO(t)],lO=e=>iO(e)?Pt().text("Geo Polygon"):Pt().text("Geo Location"),uO=e=>{switch(e){case nO.geoLocation:return"geoLocation";case nO.geoPolygon:case nO.onMapMove:return"geoPolygon"}},cO={operator:"operator",attributeLabel:"attributeLabel",specialAttributeLabel:"specialAttributeLabel",attributeFilter:"attributeFilter",attributeValue:"attributeValue",entityTypeLabel:"entityTypeLabel",space:"space",bracket:"bracket",punctuationMark:"punctuationMark"},pO=e=>Pt().text(e),dO=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return{[pt.EQUALS]:"=",[pt.NOT_EQUALS]:"≠",[pt.STARTS_WITH]:"*",[pt.MISSING_VALUE]:Pt().text("missing value"),[pt.HAS_ALL]:Pt().text("has all"),[pt.IN_RANGE]:Pt().text("in range"),[pt.FULL_TEXT]:Pt().text("full text"),[pt.EXISTS]:Pt().text("exists"),[pt.COUNT_EQUALS]:`${Pt().text("count")} =`,[pt.COUNT_NOT_EQUALS]:`${Pt().text("count")} ≠`,[pt.COUNT_LT]:`${Pt().text("count")} <`,[pt.COUNT_LTE]:`${Pt().text("count")} <=`,[pt.COUNT_GT]:`${Pt().text("count")} >`,[pt.COUNT_RANGE]:Pt().text("count range"),[pt.LT]:"<",[pt.LTE]:"<=",[pt.GT]:">",[pt.GTE]:">=",[pt.IN_FILE]:Pt().text("in file"),[pt.NOT_IN_FILE]:Pt().text("not in file"),[pt.CONTAINS]:"~",[dt.LIST_EQUALS]:"=",[dt.NOT_LIST_EQUALS]:"≠",[dt.LIST_EQUALS_CASE_SENSITIVE]:"=",[dt.NOT_LIST_EQUALS_CASE_SENSITIVE]:"≠"}[e]||Pt().text(e.toLowerCase())},yO=e=>({type:cO.operator,text:e}),fO=e=>({type:cO.operator,text:pO(e)}),TO=e=>({type:cO.attributeLabel,text:e}),EO=e=>({type:cO.specialAttributeLabel,text:e}),mO=e=>({type:cO.attributeFilter,text:dO(e)}),hO=e=>({type:cO.attributeValue,text:e}),bO=e=>({type:cO.entityTypeLabel,text:e}),OO=()=>({type:cO.space,text:" "}),vO=()=>({type:cO.bracket,text:"("}),gO=()=>({type:cO.bracket,text:")"}),_O=(0,l.curry)(((e,t,r,n)=>((e,t)=>e===t.length-1)(r,n)?t:[t,e])),NO=(0,l.curry)(((e,t)=>t.map(_O(e)))),AO=(0,l.curry)(((e,t,r)=>[e,...r,t])),PO=AO(vO(),gO()),RO=AO(OO(),OO()),SO=(0,l.curry)(((e,t)=>[e,...t])),wO=e=>SO(bO(e)),IO=e=>SO(bO(`${e}: `)),UO=function(){let{localizable:e=!0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t=>{let r=!1;const n=Hl(t),i=[];for(let a=0;a<t.length;a++){const{operand:o,operator:s}=t[a];if(a!==t.length-1){const t=Bl(s),a=ql(s);!r&&t&&n&&(i.push(vO()),r=!0),i.push(o),r&&a&&(i.push(gO()),r=!1);const l=e?fO(s):yO(s);i.push(...RO([l]))}else i.push(o),r&&(i.push(gO()),r=!1)}return i}},CO=(0,l.pipe)((0,l.map)((0,l.when)((0,l.has)("text"),(0,l.prop)("text"))),(0,l.join)("")),jO=(0,l.pipe)(UO({localizable:!1}),CO),DO=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},LO=e=>{let{data:t,values:r,filter:n}=e;return t&&Iu({filter:n,fieldName:(0,l.prop)("fieldName",t),values:r})},kO=(0,l.anyPass)([(0,l.pipe)((0,l.prop)("attributes"),(0,l.any)(LO)),(0,l.pipe)((0,l.path)(["entityTypes","length"]),(0,l.lt)(0))]),FO=(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)&&$n(e.data.attrType)})(e)&&[pt.HAS_ALL,pt.EQUALS,pt.NOT_EQUALS].includes(e.filter))),(0,l.map)((e=>({type:Mn((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})))),_h),xO=(e,t)=>(0,l.pipe)(FO,Nh(t))(e),MO=(0,l.pathEq)(["data","fieldName"],xt.type.name),$O=(0,l.path)(["data","entityTypeUri"]),VO=(0,l.pipe)((0,l.props)(["entityTypes","attributes"]),(0,l.all)(l.isEmpty)),GO=(0,l.curry)(((e,t)=>t.map((t=>(0,l.evolve)({entityTypes:(0,l.filter)(Xo(e)),attributes:(0,l.filter)((0,l.pipe)($O,(0,l.anyPass)([l.isNil,Xo(e),r=>{const n=(t.entityTypes||[]).filter(Xo(e));return(n.length>1?yi(e,n):null)===r&&!!li(e,r)}])))})(t))))),WO=e=>(0,l.pipe)((0,l.prop)("filter"),Cl,(0,l.equals)(e)),YO=(0,l.curry)(((e,t,r,n,i,a)=>{const o=Hs(n.fieldName)||n.attrType,s=cu(o,i),u=Ah({attributePresentations:t,dataTypeDefinition:s}),{type:c}=s;return(0,l.pipe)((0,l.cond)([[()=>$n(s),()=>(0,l.is)(Object,a)&&a.lookupCode?mh(a.lookupCode,a.value):bh(r,Mn(o),a)],[()=>Qs(s),()=>co(e,n.entityTypeUri,a)],[()=>Js(s),()=>jo(e,a)],[()=>rl(s),()=>ko(e,a)],[()=>"referenced_entity_id"===n.fieldName,()=>a.entityLabel],[l.T,()=>u(a)]]),(0,l.unless)((()=>Xn(c)||ei(c)),ou),hO)()})),BO=(e,t,r,n)=>{const i=YO(e,t,r,n.data,n.filter);return(0,l.cond)([[WO(0),(0,l.always)([])],[(0,l.both)(WO(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[OO(),i(r),{type:cO.punctuationMark,text:" — "},i(n)]}],[l.T,e=>{let{values:t}=e;return[OO(),...(0,l.pipe)(l.flatten,(0,l.map)(i),NO({type:cO.punctuationMark,text:", "}))(t)]}]])(n)},qO=(e,t)=>{const r=!!Hs(e.data.fieldName);return(0,l.pipe)(DO,r?EO:TO)(e,t)},HO=(e,t,r,n,i)=>[qO(n,i),OO(),mO(n.filter),...BO(e,t,r,n)],KO=(0,l.addIndex)(l.map),QO=(0,l.propEq)("length",1),JO=(0,l.propSatisfies)((0,l.lt)(1),"length"),XO=(0,l.complement)(l.isEmpty),zO=function(e,t,r,n){let i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];return(0,l.pipe)(Jl,(0,l.filter)(LO),Xl,(0,l.map)((n=>({operand:HO(e,t,r,n,i),operator:n.operator}))),(0,l.unless)(l.isEmpty,UO()))(n)},ZO=(0,l.pipe)(zO,l.flatten),ev=(e,t,r,n,i)=>{let{attributes:a,entityTypes:o=[]}=n;const s=t=>{const r=o.map((t=>td(e,{type:t}))).join(", ");return r?t(r):l.identity},u=zO(e,t,r,a);return(0,l.ifElse)(l.isEmpty,s(wO),(0,l.pipe)(s(IO),(0,l.unless)((()=>QO(u)||i),PO)))(u)},tv=(e,t,r,n)=>(0,l.pipe)(Jl,(0,l.filter)(kO),Xl,KO(((n,i,a)=>({operand:ev(e,t,r,n,QO(a)),operator:n.operator}))),UO(),l.flatten)(n),rv=(0,l.pipe)((0,l.reject)(l.isEmpty),(0,l.map)((e=>({operand:e,operator:"and"}))),UO(),l.flatten),nv=e=>{let{searchType:t,values:[r]}=e;return sO(t,r).join(", ")},iv=(e,t,r,n,i,a)=>{const o=(e=>e?[EO(e.isRawFilter?Pt().text("Raw filter"):Pt().text("Search")),...RO([mO(pt.EQUALS)]),hO(`"${e.value}"`)]:[])(i),s=(e=>e?[EO(lO(e.searchType)),OO(),hO(nv(e))]:[])(a),u=(0,l.pipe)(tv,(0,l.when)((e=>JO(e)&&(XO(o)||XO(s))),PO))(e,t,r,n);return rv([o,s,u])},av=(0,l.pipe)((0,l.map)((0,l.prop)("text")),(0,l.join)("")),ov=(0,l.pipe)(iv,av),sv=(0,l.has)("attributes"),lv=Array.isArray,uv=(0,l.allPass)([(0,l.propEq)("length",1),(0,l.pathSatisfies)((0,l.startsWith)("not"),[0,"filter"])]),cv=(e,t,r,n,i)=>{const{attributes:a,operator:o}=n,s=pv(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)(uv(a))),PO),(0,l.concat)(RO([yO(o)]))))(s)},pv=function(e,t,r,n){let i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];return sv(n)?cv(e,t,r,n,i):lv(n)?n.reduce(((n,a)=>n.concat(pv(e,t,r,a,i))),[]):(0,l.when)((0,l.always)((0,l.has)("operator",n)),(0,l.concat)(RO([yO(n.operator)])))(HO(e,t,r,n,i))},dv=(e,t,r,n,i)=>(0,l.pipe)(pv,l.flatten)(e,t,r,n,i);function yv(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){fv(e,t,r[t])}))}return e}function fv(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=(0,l.complement)(MO),Ev=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t=(0,l.pipe)((0,l.filter)(MO),(0,l.map)((0,l.prop)("values")),l.flatten,l.uniq)(e),r=(0,l.pipe)((0,l.map)($O),(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}},mv=e=>{const t=e.attributes||[],{areOnlySpecialAttributes:r,areAttributesFromOneEntityType:n}=Ev(t);return(r||n)&&Kl(t)},hv=(0,l.ifElse)((0,l.all)((0,l.has)("entityTypes")),l.identity,(0,l.pipe)((e=>{const t=[],r=e.filter((0,l.complement)(mv)),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(MO).some((0,l.propEq)("filter",pt.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}=Ev(r);if(mv(e))t.push(yv({},e,{entityTypes:(0,l.uniq)((0,l.concat)(n,i)),attributes:r.filter(Tv)}));else{const n=r.map((a=e.operator,(e,t,r)=>{const n=(0,l.pipe)((0,l.ifElse)(MO,(0,l.pipe)((0,l.prop)("values"),l.flatten),(0,l.pipe)($O,(e=>[e]),(0,l.reject)(l.isNil))))(e),i=t===r.length-1;return{attributes:[e].filter(Tv),entityTypes:n,operator:i?a:e.operator,id:Zm()()}}));t.push(...n)}var a;return t})(t))),[]))),bv={[pt.EQUALS]:pt.ON,[pt.IN_RANGE]:pt.WITHIN,[pt.GTE]:pt.AFTER,[pt.GT]:pt.AFTER,[pt.LTE]:pt.BEFORE,[pt.LT]:pt.BEFORE},Ov=(0,l.curry)((e=>bv[e]||e)),vv=(0,l.curry)(((e,t)=>{switch(e){case pt.LT:return[f()(t[0]).subtract(1,"day").valueOf()];case pt.GT:return[f()(t[0]).add(1,"day").valueOf()];default:return t}})),gv=(0,l.pipe)((0,l.path)(["data","attrType","type"]),Kn),_v=(0,l.curry)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.map((e=>yv({},e,{attributes:(e.attributes||[]).map((e=>{const{filter:t}=e;return gv(e)?(0,l.evolve)({filter:Ov,values:vv(t)},e):e}))})))})),Nv=(0,l.curryN)(3,((e,t,r,n,i)=>(0,l.pipe)((0,l.defaultTo)([]),hv,GO(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")))})),_v,(0,l.reject)(VO))(r)));function Av(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){Pv(e,t,r[t])}))}return e}function Pv(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Rv=(e,t)=>({data:{uri:st(e.fieldName)?nt(e.fieldName,e.entityTypeUri):void 0,fieldName:e.fieldName,entityTypeUri:e.entityTypeUri},operator:"and",filter:t||Fb(e),id:Zm()(),values:xb(e)}),Sv=(0,l.curry)(((e,t,r,n)=>{const{uri:i,fieldName:a,entityTypeUri:o}=n,s=Hs(a,t,r)||Yn(e,i);if(!s)return null;if(In(s))return Av({},n,{attrType:s,title:s.label});{const t=s.label||s.name,r=td(e,{type:o}),i=(Wn(e,nt(a,o),o)||[]).map((0,l.pick)(["label","name"])).slice(0,-1);return Av({},n,{attrType:s,title:t,pathToTitle:Array.isArray(i)?[r,...(0,l.chain)((0,l.prop)("label"),i),t]:[r,t]})}})),wv=(0,l.curry)(((e,t,r,n)=>Nv(Sv,e,n,t,r)));function Iv(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){Uv(e,t,r[t])}))}return e}function Uv(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Cv=e=>{const{keyword:t,isRawFilter:r=!1}=e;return t?{value:t,isRawFilter:r}:null},jv=e=>"rdmLookups.not.resolved"===e?xt.notResolved.name:e,Dv=(0,l.curry)(((e,t,r)=>{let{fieldName:n,uri:i,filter:a,values:o=[]}=r;const s=a===Et?pt.IN_RANGE:mt(a),u=jv(n),c=Hs(u)||Yn(e,i),p=(0,l.cond)([[()=>kl(s),(0,l.map)((0,l.when)((0,l.both)((0,l.has)("link"),(0,l.complement)((0,l.has)("filename"))),(e=>Iv({},e,{filename:Eh(e)}))))],[()=>ei(null==c?void 0:c.type),(0,l.map)(le)],[e=>Dl(s)&&!Array.isArray(e[0])&&!Kn(null==c?void 0:c.type),ie],[l.T,l.identity]])(o);return{id:Zm()(),data:{uri:i,fieldName:u,entityTypeUri:t},operator:a===Et?"and not":"and",filter:s,values:p}})),Lv=(0,l.curry)(((e,t)=>{const{searchParams:r=[],fastSearchParams:n=[],entityTypes:i=[]}=t,a=[...r,...n].map(Dv(e,yi(e,i)));return[{id:Zm()(),operator:"or",attributes:a,entityTypes:i}]})),kv=e=>(0,l.pipe)((0,l.prop)(e),(0,l.is)(Number)),Fv=(0,l.cond)([[(0,l.has)("values"),(0,l.prop)("values")],[(0,l.allPass)([kv("from"),kv("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,()=>[]]]),xv=(e,t)=>{const r=(0,l.pick)(["fieldName","entityType","attrType","filter"])(e),n=e.potentialMatchesDataTenant;return Iv({},r,{values:Fv(e),entityType:(0,l.propOr)(t,"entityType",r),fieldName:n?Gs(e.fieldName,n):e.fieldName})},Mv=(e,t)=>{if((0,l.has)("children")(e)){const r=xv(e,t);return e.children.reduce(((e,n)=>(e.push(Mv(n,(0,l.propOr)(t,"entityType",r))),e)),[])}return xv(e,t)},$v=(0,l.cond)([[(0,l.has)("searchParameters"),e=>{const t=[];return(0,l.has)("values",e)&&t.push(xv(e)),(0,l.propOr)([],"searchParameters",e).forEach((r=>t.push(Iv({fieldName:e.fieldName},xv(r,e.entityType))))),t}],[(0,l.has)("children"),(0,l.pipe)(Mv,l.flatten)],[l.T,xv]]),Vv=(0,l.pipe)((0,l.map)($v),l.flatten),Gv=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},Wv=(e,t,r,n)=>{const{facets:i=[],advanced:a={},model:o}=n,[s]=Lv(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:Vv(n).map((e=>{let{fieldName:t,entityType:r,values:n,filter:i}=e;return{fieldName:t,entityTypeUri:r,values:n,filter:i}})).map((t=>Iv({},t,{type:Lb(e,t)}))).map((e=>Iv({},e,{values:Cb(e)?Gv(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 Rv(r,t)})),operator:"or",id:Zm()(),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=>({[jv(t)]:e[t]}))),l.mergeAll)(e)}(o),p=[Iv({},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 wv(e,t,r,p)},Yv=(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)(Sb),(0,l.partition)(wb))(t),i=n.map((t=>Av({},t,{type:Lb(e,t)}))).map((e=>Rv(e))),a=r.values||[];return[{attributes:i,operator:"or",id:Zm()(),entityTypes:a}]})(e,a);return wv(e,t,r,o)})(e,t,r,n):Wv(e,t,r,n)}catch(e){return console.error("Failed to convert search state to groups",e),[]}},Bv=e=>"2.0"===e.version?e.keyword:Cv(e),qv=e=>(0,l.pathEq)(["object","uri"],e),Hv=(e,t)=>(0,l.pipe)((0,l.find)(qv(e)),(0,l.prop)("object"))(t),Kv=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"),qv(r.uri),(0,l.pipe)((0,l.propOr)(!1,"direct"),l.not)])),(0,l.propOr)([],"shortestTransitiveMatchPath"))(t),a=r=>{const i=Hv(r.match,t)||n[r.match];return{label:Dp((0,l.prop)("label",i)),matchRules:(0,l.propOr)([],"matchRules",r).map((function(t){return uo(e,i.type,t)||{label:t,uri:t}}))}};return(0,l.pipe)((0,l.defaultTo)([]),(0,l.when)((0,l.complement)(l.isEmpty),(0,l.map)(a)))(i)},Qv=e=>e.reduce(((e,t)=>{let{object:r}=t;return e[r.uri]=(0,l.pick)(["uri","type","label"],r),e}),{}),Jv=(0,l.allPass)([(0,l.has)("shortestTransitiveMatchPath"),(0,l.pipe)((0,l.propOr)(!1,"direct"),l.not)]),Xv=(e,t,r)=>(0,l.pipe)((0,l.propOr)([],"shortestTransitiveMatchPath"),(0,l.map)((t=>{let{match:n,matchRules:i=[]}=t;const a=(0,l.propOr)({},n,r);return{label:Dp((0,l.prop)("label",a)),matchRules:i.map((function(t){return uo(e,a.type,t)||{label:t,uri:t}}))}})))(t),zv=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)},Zv=(0,l.path)(["object","uri"]),eg=e=>{let t=[];return{addChild:e=>{t=(0,l.append)(e,t)},getValue:()=>e,getChildren:()=>t,removeChild:e=>{t=(0,l.without)([e],t)}}},tg=e=>e.getValue(),rg=(e,t)=>{let r=null;if(t(e.getValue()))return e;const n=e.getChildren();for(let e=0;e<n.length&&(r=rg(n[e],t),!r);e++);return r},ng=(e,t)=>{const r=[],n=(0,l.pipe)(tg,t),i=(0,l.pipe)(l.map,l.flatten),a=e.getChildren();a.some(n)&&r.push(e);const o=i((0,l.partialRight)(ng,[t]),a);return r.push.apply(r,o),r};function ig(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 og=(e,t)=>!!e[t],sg=e=>{let{uri:t,lookupCode:r,value:n}=e;return{uri:t,value:r||n}},lg=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||[]])},ug=e=>{let{structure:t,attrType:r,parents:n=[],children:i=[],values:a=[]}=e;const o=t[r.uri];return ig({},t,{[r.uri]:ig({},o,{attrType:(null==o?void 0:o.attrType)||r,parents:lg(null==o?void 0:o.parents,n),children:lg(null==o?void 0:o.children,i),values:lg(null==o?void 0:o.values,a,(0,l.prop)("uri"))})})},cg=e=>e.children?e.children.flatMap(cg):e,pg=e=>{let{structure:t={},metadata:r,typeUris:n,alreadyAddedTypeUris:i=[]}=e;return n.filter((e=>!i.includes(e))).reduce(((e,t)=>{const n=li(r,t)||mi(r,t),i=(0,l.either)((0,l.both)((0,l.prop)("dependentLookupAttributes"),(0,l.prop)("dependentLookupCode")),(0,l.prop)("children"));return Go(r,n,i).flatMap(cg).reduce(((e,t)=>{const n=t.dependentLookupAttributes.map((e=>Yn(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=ug({structure:t,attrType:r,children:i});return n.reduce(((e,t)=>ug({structure:e,attrType:t,parents:[r.uri]})),a)})({structure:e,parentAttrType:t,childrenAttrTypes:n})}),e)}),t)},dg=e=>{let{structure:t,metadata:r,entityOrRelation:n}=e;return Object.keys(t).reduce(((e,t)=>{if(((e,t)=>!qe(e.uri)&&ze(e.type)&&ze(t)&&!t.startsWith(e.type))(n,t))return e;const i=ys(r,n,t)||[],a=(0,l.pipe)((0,l.filter)(zo),(0,l.map)(sg))(i);return ug({structure:e,attrType:e[t].attrType,values:a})}),t)},yg=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 og(e,r)}));return r||n?t.filter(zo).reduce(((e,t)=>yg({structure:e,attributeValue:t})),e):e}),t);{const e=r;return og(t,e.type)?ug({structure:t,attrType:t[e.type].attrType,values:[sg(e)]}):t}},fg=e=>{let{structure:t,uri:r}=e;return(0,l.map)((e=>e.values.some((e=>{let{uri:t}=e;return t.startsWith(r)}))?ig({},e,{values:e.values.filter((e=>{let{uri:t}=e;return!t.startsWith(r)}))}):e))(t)},Tg=e=>{let{structure:t,attrTypeUri:r,entityOrRelation:n,metadata:i}=e;const a=ys(i,n,r)||[];return a.length?ug({structure:t,attrType:t[r].attrType,values:a.filter(zo).map(sg)}):t},Eg=(e,t,r)=>{const n=Qe(e),i=Qe(t);return n===i?((e,t)=>{const r=ut(t),n=ut(e);return et(n,r)})(e,t):!(!r||!lt(t))&&hT(r,i).includes(n)},mg=(e,t)=>{if(e){if(e.includeAttributes)return e.includeAttributes.includes(t);if(e.excludeAttributes)return!e.excludeAttributes.includes(t)}return!1},hg=e=>{let{parentValues:t,valueUri:r,entityUri:n,modifiedEntities:i,connections:a}=e;const o=n?ET(n,i,a):null;return t.filter((e=>{let{uri:t}=e;return Eg(r,t,o)}))},bg=(e,t,r)=>{const n=r[e].map((e=>t[e]));return(0,l.uniq)(n.concat(n.flatMap((r=>bg(e,t,r)))))},Og=(e,t,r,n)=>{let{uri:i,value:a}=r;return{type:e,uri:i,lookupValue:a,autopopulate:i!==t&&mg(n,e)}},vg=e=>{let{structure:t,typeUri:r,valueUri:n,modifiedEntities:i,connections:a,entityUri:o,config:s}=e;const l=t[r],u=Qe(n),c=mT(u,o,i,a),p=bg("children",t,l),d=bg("parents",t,l),y=p.flatMap((e=>bg("parents",t,e))).filter((e=>![...d,l,...p].includes(e))),f=p.flatMap((e=>e.values.filter((e=>{let{uri:t}=e;return Eg(t,n,c)})).map((t=>Og(e.attrType.uri,n,t,s)))));if(!f.length)return[];const T=d.flatMap((e=>e.values.filter((e=>{let{uri:t}=e;return Eg(n,t,c)||Qe(t)!==u&&Eg(t,n,c)})).map((t=>Og(e.attrType.uri,n,t,s))))),E=y.flatMap((e=>{const r=bg("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)&&Eg(n,t,c)}))})).map((t=>Og(e.attrType.uri,n,t,s)))}));return[...l.values.filter((e=>{let{uri:t}=e;return Eg(t,n,c)})).map((e=>Og(r,n,e,s))),...T,...E,...f]},gg={AttributesDiff:a,AttributesEditor:o,HistoryManager:s},_g={Colors:r(29504),DependencyManager:r(47485),strings:n,dates:i}},29504:(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}},47485:(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:()=>{}}]);
|