@skill-map/cli 0.51.0 → 0.52.0

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.
@@ -0,0 +1,2206 @@
1
+ import{A as yo,a as G0,b as j0,c as U0,d as $0,e as eb,f as tb,g as rs,h as ss,i as ls,j as nb,k as ib,l as vo,m as ob,n as Af,o as rb,p as ab,q as Zn,r as Qn,t as sb,u as lb,v as cb,y as us,z as ps}from"./chunk-5MCXQKRN.js";import{A as vb,C as yb,D as Cb,E as Bf,F as Vf,G as xb,a as X0,b as ns,c as mo,d as is,e as Z0,f as _o,g as os,h as gr,i as Ff,j as Q0,k as rn,l as go,m as ds,n as ub,o as hs,p as pb,q as hb,r as fb,s as mb,t as _b,u as gb,v as fs,y as bb,z as ti}from"./chunk-E2XO4JVD.js";import{A as fo,B as ts,C as Se,D as W0,E as K0,F as _r,G as Ee,H as Y0,I as In,J as Be,K as Ve,L as J0,M as bo,N as Te,O as Nf,P as as,Q as Ut,R as an,S as Jn,T as db,U as ei,V as Lf,Y as cs,Z as Ft,a as pt,c as uo,d as V0,e as Of,f as z0,g as po,i as bt,j as Le,k as tn,l as St,o as Xn,p as q0,q as ho,r as nn,s as on,t as Ot,u as kt,v as Bn,w as Ie,x as kn}from"./chunk-6B5EAHIM.js";import{B as Rf,Ca as H0,D as O0,F as F0,H as N0,J as es,O as fr,T as A0,V as L0,W as B0,a as bn,b as ur,ba as mr,k as pr,l as Df,m as P0,n as R0,p as Pi,t as Sn,u as ut,w as Pf,z as hr}from"./chunk-4SG4352Z.js";import{f as Qa,i as Ja}from"./chunk-AEA5GIA7.js";import{c as Kn,e as co,f as gn,g as Yn,h as Mt,i as gt,j as jt}from"./chunk-WMGW2UAL.js";import{$ as xt,$a as I,$b as Sf,Ab as le,Bb as Ka,Cb as Ya,Db as W,Dc as j,Ea as Ei,Eb as ot,Ec as xe,Fa as cr,Fb as A,Ga as $a,Ha as l,Hb as d,Ib as mn,J as wn,Jb as $e,K as y,Kb as Qt,L as mt,Lb as Tn,Ma as lo,Mb as Q,N as ge,Na as T0,Nb as J,O as ao,Ob as Tf,P as p,Pa as S0,Pb as _n,Qa as fn,Qb as Ht,Ra as Wa,Rb as yt,Sb as Ne,T as w0,Tb as se,U as hn,Ub as qt,V as w,Vb as H,W as T,Wa as z,Wb as b,X as $,Xa as _t,Xb as x,Y as Ga,Ya as je,Yb as ke,Z as dt,Za as wt,Zb as E0,_ as ja,_a as Z,_b as M0,ac as kf,ba as ne,bc as If,ca as Zt,cc as Gt,d as ro,dc as Tt,ec as Ce,fc as we,g as P,ga as X,gc as Jt,hc as Oe,ia as de,ib as O,ic as Wn,ja as so,jb as k0,jc as Mi,ka as G,kb as I0,kc as Ef,la as Ze,lb as M,lc as Xa,mb as D,mc as dr,n as x0,nb as wf,nc as D0,ob as Ue,oc as We,pa as Ua,pb as ue,qb as pe,qc as en,rb as m,rc as E,sb as h,sc as et,t as qa,tb as _,tc as B,ub as N,uc as nt,vb as re,vc as Za,wb as fe,wc as Mf,xb as ie,xc as Di,yb as me,zb as _e}from"./chunk-VJ57LHDR.js";import{a as be,b as zt,c as oo,e as v,g as XP}from"./chunk-WCABR6TI.js";var vC=v((A_e,bC)=>{"use strict";function ez(){this.__data__=[],this.size=0}bC.exports=ez});var Yi=v((L_e,yC)=>{"use strict";function tz(t,o){return t===o||t!==t&&o!==o}yC.exports=tz});var ca=v((B_e,CC)=>{"use strict";var nz=Yi();function iz(t,o){for(var e=t.length;e--;)if(nz(t[e][0],o))return e;return-1}CC.exports=iz});var wC=v((V_e,xC)=>{"use strict";var oz=ca(),rz=Array.prototype,az=rz.splice;function sz(t){var o=this.__data__,e=oz(o,t);if(e<0)return!1;var n=o.length-1;return e==n?o.pop():az.call(o,e,1),--this.size,!0}xC.exports=sz});var SC=v((z_e,TC)=>{"use strict";var lz=ca();function cz(t){var o=this.__data__,e=lz(o,t);return e<0?void 0:o[e][1]}TC.exports=cz});var IC=v((H_e,kC)=>{"use strict";var dz=ca();function uz(t){return dz(this.__data__,t)>-1}kC.exports=uz});var MC=v((q_e,EC)=>{"use strict";var pz=ca();function hz(t,o){var e=this.__data__,n=pz(e,t);return n<0?(++this.size,e.push([t,o])):e[n][1]=o,this}EC.exports=hz});var da=v((G_e,DC)=>{"use strict";var fz=vC(),mz=wC(),_z=SC(),gz=IC(),bz=MC();function jo(t){var o=-1,e=t==null?0:t.length;for(this.clear();++o<e;){var n=t[o];this.set(n[0],n[1])}}jo.prototype.clear=fz;jo.prototype.delete=mz;jo.prototype.get=_z;jo.prototype.has=gz;jo.prototype.set=bz;DC.exports=jo});var RC=v((j_e,PC)=>{"use strict";var vz=da();function yz(){this.__data__=new vz,this.size=0}PC.exports=yz});var FC=v((U_e,OC)=>{"use strict";function Cz(t){var o=this.__data__,e=o.delete(t);return this.size=o.size,e}OC.exports=Cz});var AC=v(($_e,NC)=>{"use strict";function xz(t){return this.__data__.get(t)}NC.exports=xz});var BC=v((W_e,LC)=>{"use strict";function wz(t){return this.__data__.has(t)}LC.exports=wz});var R_=v((K_e,VC)=>{"use strict";var Tz=typeof global=="object"&&global&&global.Object===Object&&global;VC.exports=Tz});var cn=v((Y_e,zC)=>{"use strict";var Sz=R_(),kz=typeof self=="object"&&self&&self.Object===Object&&self,Iz=Sz||kz||Function("return this")();zC.exports=Iz});var Xi=v((X_e,HC)=>{"use strict";var Ez=cn(),Mz=Ez.Symbol;HC.exports=Mz});var UC=v((Z_e,jC)=>{"use strict";var qC=Xi(),GC=Object.prototype,Dz=GC.hasOwnProperty,Pz=GC.toString,ua=qC?qC.toStringTag:void 0;function Rz(t){var o=Dz.call(t,ua),e=t[ua];try{t[ua]=void 0;var n=!0}catch{}var i=Pz.call(t);return n&&(o?t[ua]=e:delete t[ua]),i}jC.exports=Rz});var WC=v((Q_e,$C)=>{"use strict";var Oz=Object.prototype,Fz=Oz.toString;function Nz(t){return Fz.call(t)}$C.exports=Nz});var _i=v((J_e,XC)=>{"use strict";var KC=Xi(),Az=UC(),Lz=WC(),Bz="[object Null]",Vz="[object Undefined]",YC=KC?KC.toStringTag:void 0;function zz(t){return t==null?t===void 0?Vz:Bz:YC&&YC in Object(t)?Az(t):Lz(t)}XC.exports=zz});var Wt=v((ege,ZC)=>{"use strict";function Hz(t){var o=typeof t;return t!=null&&(o=="object"||o=="function")}ZC.exports=Hz});var Uo=v((tge,QC)=>{"use strict";var qz=_i(),Gz=Wt(),jz="[object AsyncFunction]",Uz="[object Function]",$z="[object GeneratorFunction]",Wz="[object Proxy]";function Kz(t){if(!Gz(t))return!1;var o=qz(t);return o==Uz||o==$z||o==jz||o==Wz}QC.exports=Kz});var e1=v((nge,JC)=>{"use strict";var Yz=cn(),Xz=Yz["__core-js_shared__"];JC.exports=Xz});var i1=v((ige,n1)=>{"use strict";var O_=e1(),t1=(function(){var t=/[^.]+$/.exec(O_&&O_.keys&&O_.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""})();function Zz(t){return!!t1&&t1 in t}n1.exports=Zz});var F_=v((oge,o1)=>{"use strict";var Qz=Function.prototype,Jz=Qz.toString;function eH(t){if(t!=null){try{return Jz.call(t)}catch{}try{return t+""}catch{}}return""}o1.exports=eH});var a1=v((rge,r1)=>{"use strict";var tH=Uo(),nH=i1(),iH=Wt(),oH=F_(),rH=/[\\^$.*+?()[\]{}|]/g,aH=/^\[object .+?Constructor\]$/,sH=Function.prototype,lH=Object.prototype,cH=sH.toString,dH=lH.hasOwnProperty,uH=RegExp("^"+cH.call(dH).replace(rH,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function pH(t){if(!iH(t)||nH(t))return!1;var o=tH(t)?uH:aH;return o.test(oH(t))}r1.exports=pH});var l1=v((age,s1)=>{"use strict";function hH(t,o){return t?.[o]}s1.exports=hH});var gi=v((sge,c1)=>{"use strict";var fH=a1(),mH=l1();function _H(t,o){var e=mH(t,o);return fH(e)?e:void 0}c1.exports=_H});var Ph=v((lge,d1)=>{"use strict";var gH=gi(),bH=cn(),vH=gH(bH,"Map");d1.exports=vH});var pa=v((cge,u1)=>{"use strict";var yH=gi(),CH=yH(Object,"create");u1.exports=CH});var f1=v((dge,h1)=>{"use strict";var p1=pa();function xH(){this.__data__=p1?p1(null):{},this.size=0}h1.exports=xH});var _1=v((uge,m1)=>{"use strict";function wH(t){var o=this.has(t)&&delete this.__data__[t];return this.size-=o?1:0,o}m1.exports=wH});var b1=v((pge,g1)=>{"use strict";var TH=pa(),SH="__lodash_hash_undefined__",kH=Object.prototype,IH=kH.hasOwnProperty;function EH(t){var o=this.__data__;if(TH){var e=o[t];return e===SH?void 0:e}return IH.call(o,t)?o[t]:void 0}g1.exports=EH});var y1=v((hge,v1)=>{"use strict";var MH=pa(),DH=Object.prototype,PH=DH.hasOwnProperty;function RH(t){var o=this.__data__;return MH?o[t]!==void 0:PH.call(o,t)}v1.exports=RH});var x1=v((fge,C1)=>{"use strict";var OH=pa(),FH="__lodash_hash_undefined__";function NH(t,o){var e=this.__data__;return this.size+=this.has(t)?0:1,e[t]=OH&&o===void 0?FH:o,this}C1.exports=NH});var T1=v((mge,w1)=>{"use strict";var AH=f1(),LH=_1(),BH=b1(),VH=y1(),zH=x1();function $o(t){var o=-1,e=t==null?0:t.length;for(this.clear();++o<e;){var n=t[o];this.set(n[0],n[1])}}$o.prototype.clear=AH;$o.prototype.delete=LH;$o.prototype.get=BH;$o.prototype.has=VH;$o.prototype.set=zH;w1.exports=$o});var I1=v((_ge,k1)=>{"use strict";var S1=T1(),HH=da(),qH=Ph();function GH(){this.size=0,this.__data__={hash:new S1,map:new(qH||HH),string:new S1}}k1.exports=GH});var M1=v((gge,E1)=>{"use strict";function jH(t){var o=typeof t;return o=="string"||o=="number"||o=="symbol"||o=="boolean"?t!=="__proto__":t===null}E1.exports=jH});var ha=v((bge,D1)=>{"use strict";var UH=M1();function $H(t,o){var e=t.__data__;return UH(o)?e[typeof o=="string"?"string":"hash"]:e.map}D1.exports=$H});var R1=v((vge,P1)=>{"use strict";var WH=ha();function KH(t){var o=WH(this,t).delete(t);return this.size-=o?1:0,o}P1.exports=KH});var F1=v((yge,O1)=>{"use strict";var YH=ha();function XH(t){return YH(this,t).get(t)}O1.exports=XH});var A1=v((Cge,N1)=>{"use strict";var ZH=ha();function QH(t){return ZH(this,t).has(t)}N1.exports=QH});var B1=v((xge,L1)=>{"use strict";var JH=ha();function eq(t,o){var e=JH(this,t),n=e.size;return e.set(t,o),this.size+=e.size==n?0:1,this}L1.exports=eq});var Rh=v((wge,V1)=>{"use strict";var tq=I1(),nq=R1(),iq=F1(),oq=A1(),rq=B1();function Wo(t){var o=-1,e=t==null?0:t.length;for(this.clear();++o<e;){var n=t[o];this.set(n[0],n[1])}}Wo.prototype.clear=tq;Wo.prototype.delete=nq;Wo.prototype.get=iq;Wo.prototype.has=oq;Wo.prototype.set=rq;V1.exports=Wo});var H1=v((Tge,z1)=>{"use strict";var aq=da(),sq=Ph(),lq=Rh(),cq=200;function dq(t,o){var e=this.__data__;if(e instanceof aq){var n=e.__data__;if(!sq||n.length<cq-1)return n.push([t,o]),this.size=++e.size,this;e=this.__data__=new lq(n)}return e.set(t,o),this.size=e.size,this}z1.exports=dq});var fa=v((Sge,q1)=>{"use strict";var uq=da(),pq=RC(),hq=FC(),fq=AC(),mq=BC(),_q=H1();function Ko(t){var o=this.__data__=new uq(t);this.size=o.size}Ko.prototype.clear=pq;Ko.prototype.delete=hq;Ko.prototype.get=fq;Ko.prototype.has=mq;Ko.prototype.set=_q;q1.exports=Ko});var Oh=v((kge,G1)=>{"use strict";function gq(t,o){for(var e=-1,n=t==null?0:t.length;++e<n&&o(t[e],e,t)!==!1;);return t}G1.exports=gq});var N_=v((Ige,j1)=>{"use strict";var bq=gi(),vq=(function(){try{var t=bq(Object,"defineProperty");return t({},"",{}),t}catch{}})();j1.exports=vq});var ma=v((Ege,$1)=>{"use strict";var U1=N_();function yq(t,o,e){o=="__proto__"&&U1?U1(t,o,{configurable:!0,enumerable:!0,value:e,writable:!0}):t[o]=e}$1.exports=yq});var _a=v((Mge,W1)=>{"use strict";var Cq=ma(),xq=Yi(),wq=Object.prototype,Tq=wq.hasOwnProperty;function Sq(t,o,e){var n=t[o];(!(Tq.call(t,o)&&xq(n,e))||e===void 0&&!(o in t))&&Cq(t,o,e)}W1.exports=Sq});var Yo=v((Dge,K1)=>{"use strict";var kq=_a(),Iq=ma();function Eq(t,o,e,n){var i=!e;e||(e={});for(var r=-1,a=o.length;++r<a;){var s=o[r],c=n?n(e[s],t[s],s,e,t):void 0;c===void 0&&(c=t[s]),i?Iq(e,s,c):kq(e,s,c)}return e}K1.exports=Eq});var X1=v((Pge,Y1)=>{"use strict";function Mq(t,o){for(var e=-1,n=Array(t);++e<t;)n[e]=o(e);return n}Y1.exports=Mq});var xn=v((Rge,Z1)=>{"use strict";function Dq(t){return t!=null&&typeof t=="object"}Z1.exports=Dq});var J1=v((Oge,Q1)=>{"use strict";var Pq=_i(),Rq=xn(),Oq="[object Arguments]";function Fq(t){return Rq(t)&&Pq(t)==Oq}Q1.exports=Fq});var Xo=v((Fge,nx)=>{"use strict";var ex=J1(),Nq=xn(),tx=Object.prototype,Aq=tx.hasOwnProperty,Lq=tx.propertyIsEnumerable,Bq=ex((function(){return arguments})())?ex:function(t){return Nq(t)&&Aq.call(t,"callee")&&!Lq.call(t,"callee")};nx.exports=Bq});var lt=v((Nge,ix)=>{"use strict";var Vq=Array.isArray;ix.exports=Vq});var rx=v((Age,ox)=>{"use strict";function zq(){return!1}ox.exports=zq});var Zi=v((ga,Zo)=>{"use strict";var Hq=cn(),qq=rx(),lx=typeof ga=="object"&&ga&&!ga.nodeType&&ga,ax=lx&&typeof Zo=="object"&&Zo&&!Zo.nodeType&&Zo,Gq=ax&&ax.exports===lx,sx=Gq?Hq.Buffer:void 0,jq=sx?sx.isBuffer:void 0,Uq=jq||qq;Zo.exports=Uq});var ba=v((Lge,cx)=>{"use strict";var $q=9007199254740991,Wq=/^(?:0|[1-9]\d*)$/;function Kq(t,o){var e=typeof t;return o=o??$q,!!o&&(e=="number"||e!="symbol"&&Wq.test(t))&&t>-1&&t%1==0&&t<o}cx.exports=Kq});var Fh=v((Bge,dx)=>{"use strict";var Yq=9007199254740991;function Xq(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=Yq}dx.exports=Xq});var px=v((Vge,ux)=>{"use strict";var Zq=_i(),Qq=Fh(),Jq=xn(),eG="[object Arguments]",tG="[object Array]",nG="[object Boolean]",iG="[object Date]",oG="[object Error]",rG="[object Function]",aG="[object Map]",sG="[object Number]",lG="[object Object]",cG="[object RegExp]",dG="[object Set]",uG="[object String]",pG="[object WeakMap]",hG="[object ArrayBuffer]",fG="[object DataView]",mG="[object Float32Array]",_G="[object Float64Array]",gG="[object Int8Array]",bG="[object Int16Array]",vG="[object Int32Array]",yG="[object Uint8Array]",CG="[object Uint8ClampedArray]",xG="[object Uint16Array]",wG="[object Uint32Array]",Qe={};Qe[mG]=Qe[_G]=Qe[gG]=Qe[bG]=Qe[vG]=Qe[yG]=Qe[CG]=Qe[xG]=Qe[wG]=!0;Qe[eG]=Qe[tG]=Qe[hG]=Qe[nG]=Qe[fG]=Qe[iG]=Qe[oG]=Qe[rG]=Qe[aG]=Qe[sG]=Qe[lG]=Qe[cG]=Qe[dG]=Qe[uG]=Qe[pG]=!1;function TG(t){return Jq(t)&&Qq(t.length)&&!!Qe[Zq(t)]}ux.exports=TG});var va=v((zge,hx)=>{"use strict";function SG(t){return function(o){return t(o)}}hx.exports=SG});var Nh=v((ya,Qo)=>{"use strict";var kG=R_(),fx=typeof ya=="object"&&ya&&!ya.nodeType&&ya,Ca=fx&&typeof Qo=="object"&&Qo&&!Qo.nodeType&&Qo,IG=Ca&&Ca.exports===fx,A_=IG&&kG.process,EG=(function(){try{var t=Ca&&Ca.require&&Ca.require("util").types;return t||A_&&A_.binding&&A_.binding("util")}catch{}})();Qo.exports=EG});var Jo=v((Hge,gx)=>{"use strict";var MG=px(),DG=va(),mx=Nh(),_x=mx&&mx.isTypedArray,PG=_x?DG(_x):MG;gx.exports=PG});var L_=v((qge,bx)=>{"use strict";var RG=X1(),OG=Xo(),FG=lt(),NG=Zi(),AG=ba(),LG=Jo(),BG=Object.prototype,VG=BG.hasOwnProperty;function zG(t,o){var e=FG(t),n=!e&&OG(t),i=!e&&!n&&NG(t),r=!e&&!n&&!i&&LG(t),a=e||n||i||r,s=a?RG(t.length,String):[],c=s.length;for(var u in t)(o||VG.call(t,u))&&!(a&&(u=="length"||i&&(u=="offset"||u=="parent")||r&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||AG(u,c)))&&s.push(u);return s}bx.exports=zG});var xa=v((Gge,vx)=>{"use strict";var HG=Object.prototype;function qG(t){var o=t&&t.constructor,e=typeof o=="function"&&o.prototype||HG;return t===e}vx.exports=qG});var B_=v((jge,yx)=>{"use strict";function GG(t,o){return function(e){return t(o(e))}}yx.exports=GG});var xx=v((Uge,Cx)=>{"use strict";var jG=B_(),UG=jG(Object.keys,Object);Cx.exports=UG});var Ah=v(($ge,wx)=>{"use strict";var $G=xa(),WG=xx(),KG=Object.prototype,YG=KG.hasOwnProperty;function XG(t){if(!$G(t))return WG(t);var o=[];for(var e in Object(t))YG.call(t,e)&&e!="constructor"&&o.push(e);return o}wx.exports=XG});var Rn=v((Wge,Tx)=>{"use strict";var ZG=Uo(),QG=Fh();function JG(t){return t!=null&&QG(t.length)&&!ZG(t)}Tx.exports=JG});var qn=v((Kge,Sx)=>{"use strict";var ej=L_(),tj=Ah(),nj=Rn();function ij(t){return nj(t)?ej(t):tj(t)}Sx.exports=ij});var Ix=v((Yge,kx)=>{"use strict";var oj=Yo(),rj=qn();function aj(t,o){return t&&oj(o,rj(o),t)}kx.exports=aj});var Mx=v((Xge,Ex)=>{"use strict";function sj(t){var o=[];if(t!=null)for(var e in Object(t))o.push(e);return o}Ex.exports=sj});var Px=v((Zge,Dx)=>{"use strict";var lj=Wt(),cj=xa(),dj=Mx(),uj=Object.prototype,pj=uj.hasOwnProperty;function hj(t){if(!lj(t))return dj(t);var o=cj(t),e=[];for(var n in t)n=="constructor"&&(o||!pj.call(t,n))||e.push(n);return e}Dx.exports=hj});var bi=v((Qge,Rx)=>{"use strict";var fj=L_(),mj=Px(),_j=Rn();function gj(t){return _j(t)?fj(t,!0):mj(t)}Rx.exports=gj});var Fx=v((Jge,Ox)=>{"use strict";var bj=Yo(),vj=bi();function yj(t,o){return t&&bj(o,vj(o),t)}Ox.exports=yj});var V_=v((wa,er)=>{"use strict";var Cj=cn(),Bx=typeof wa=="object"&&wa&&!wa.nodeType&&wa,Nx=Bx&&typeof er=="object"&&er&&!er.nodeType&&er,xj=Nx&&Nx.exports===Bx,Ax=xj?Cj.Buffer:void 0,Lx=Ax?Ax.allocUnsafe:void 0;function wj(t,o){if(o)return t.slice();var e=t.length,n=Lx?Lx(e):new t.constructor(e);return t.copy(n),n}er.exports=wj});var z_=v((e0e,Vx)=>{"use strict";function Tj(t,o){var e=-1,n=t.length;for(o||(o=Array(n));++e<n;)o[e]=t[e];return o}Vx.exports=Tj});var H_=v((t0e,zx)=>{"use strict";function Sj(t,o){for(var e=-1,n=t==null?0:t.length,i=0,r=[];++e<n;){var a=t[e];o(a,e,t)&&(r[i++]=a)}return r}zx.exports=Sj});var q_=v((n0e,Hx)=>{"use strict";function kj(){return[]}Hx.exports=kj});var Lh=v((i0e,Gx)=>{"use strict";var Ij=H_(),Ej=q_(),Mj=Object.prototype,Dj=Mj.propertyIsEnumerable,qx=Object.getOwnPropertySymbols,Pj=qx?function(t){return t==null?[]:(t=Object(t),Ij(qx(t),function(o){return Dj.call(t,o)}))}:Ej;Gx.exports=Pj});var Ux=v((o0e,jx)=>{"use strict";var Rj=Yo(),Oj=Lh();function Fj(t,o){return Rj(t,Oj(t),o)}jx.exports=Fj});var Bh=v((r0e,$x)=>{"use strict";function Nj(t,o){for(var e=-1,n=o.length,i=t.length;++e<n;)t[i+e]=o[e];return t}$x.exports=Nj});var Ta=v((a0e,Wx)=>{"use strict";var Aj=B_(),Lj=Aj(Object.getPrototypeOf,Object);Wx.exports=Lj});var G_=v((s0e,Kx)=>{"use strict";var Bj=Bh(),Vj=Ta(),zj=Lh(),Hj=q_(),qj=Object.getOwnPropertySymbols,Gj=qj?function(t){for(var o=[];t;)Bj(o,zj(t)),t=Vj(t);return o}:Hj;Kx.exports=Gj});var Xx=v((l0e,Yx)=>{"use strict";var jj=Yo(),Uj=G_();function $j(t,o){return jj(t,Uj(t),o)}Yx.exports=$j});var j_=v((c0e,Zx)=>{"use strict";var Wj=Bh(),Kj=lt();function Yj(t,o,e){var n=o(t);return Kj(t)?n:Wj(n,e(t))}Zx.exports=Yj});var U_=v((d0e,Qx)=>{"use strict";var Xj=j_(),Zj=Lh(),Qj=qn();function Jj(t){return Xj(t,Qj,Zj)}Qx.exports=Jj});var ew=v((u0e,Jx)=>{"use strict";var eU=j_(),tU=G_(),nU=bi();function iU(t){return eU(t,nU,tU)}Jx.exports=iU});var nw=v((p0e,tw)=>{"use strict";var oU=gi(),rU=cn(),aU=oU(rU,"DataView");tw.exports=aU});var ow=v((h0e,iw)=>{"use strict";var sU=gi(),lU=cn(),cU=sU(lU,"Promise");iw.exports=cU});var $_=v((f0e,rw)=>{"use strict";var dU=gi(),uU=cn(),pU=dU(uU,"Set");rw.exports=pU});var sw=v((m0e,aw)=>{"use strict";var hU=gi(),fU=cn(),mU=hU(fU,"WeakMap");aw.exports=mU});var Ji=v((_0e,fw)=>{"use strict";var W_=nw(),K_=Ph(),Y_=ow(),X_=$_(),Z_=sw(),hw=_i(),tr=F_(),lw="[object Map]",_U="[object Object]",cw="[object Promise]",dw="[object Set]",uw="[object WeakMap]",pw="[object DataView]",gU=tr(W_),bU=tr(K_),vU=tr(Y_),yU=tr(X_),CU=tr(Z_),Qi=hw;(W_&&Qi(new W_(new ArrayBuffer(1)))!=pw||K_&&Qi(new K_)!=lw||Y_&&Qi(Y_.resolve())!=cw||X_&&Qi(new X_)!=dw||Z_&&Qi(new Z_)!=uw)&&(Qi=function(t){var o=hw(t),e=o==_U?t.constructor:void 0,n=e?tr(e):"";if(n)switch(n){case gU:return pw;case bU:return lw;case vU:return cw;case yU:return dw;case CU:return uw}return o});fw.exports=Qi});var _w=v((g0e,mw)=>{"use strict";var xU=Object.prototype,wU=xU.hasOwnProperty;function TU(t){var o=t.length,e=new t.constructor(o);return o&&typeof t[0]=="string"&&wU.call(t,"index")&&(e.index=t.index,e.input=t.input),e}mw.exports=TU});var Q_=v((b0e,gw)=>{"use strict";var SU=cn(),kU=SU.Uint8Array;gw.exports=kU});var Vh=v((v0e,vw)=>{"use strict";var bw=Q_();function IU(t){var o=new t.constructor(t.byteLength);return new bw(o).set(new bw(t)),o}vw.exports=IU});var Cw=v((y0e,yw)=>{"use strict";var EU=Vh();function MU(t,o){var e=o?EU(t.buffer):t.buffer;return new t.constructor(e,t.byteOffset,t.byteLength)}yw.exports=MU});var ww=v((C0e,xw)=>{"use strict";var DU=/\w*$/;function PU(t){var o=new t.constructor(t.source,DU.exec(t));return o.lastIndex=t.lastIndex,o}xw.exports=PU});var Ew=v((x0e,Iw)=>{"use strict";var Tw=Xi(),Sw=Tw?Tw.prototype:void 0,kw=Sw?Sw.valueOf:void 0;function RU(t){return kw?Object(kw.call(t)):{}}Iw.exports=RU});var J_=v((w0e,Mw)=>{"use strict";var OU=Vh();function FU(t,o){var e=o?OU(t.buffer):t.buffer;return new t.constructor(e,t.byteOffset,t.length)}Mw.exports=FU});var Pw=v((T0e,Dw)=>{"use strict";var NU=Vh(),AU=Cw(),LU=ww(),BU=Ew(),VU=J_(),zU="[object Boolean]",HU="[object Date]",qU="[object Map]",GU="[object Number]",jU="[object RegExp]",UU="[object Set]",$U="[object String]",WU="[object Symbol]",KU="[object ArrayBuffer]",YU="[object DataView]",XU="[object Float32Array]",ZU="[object Float64Array]",QU="[object Int8Array]",JU="[object Int16Array]",e$="[object Int32Array]",t$="[object Uint8Array]",n$="[object Uint8ClampedArray]",i$="[object Uint16Array]",o$="[object Uint32Array]";function r$(t,o,e){var n=t.constructor;switch(o){case KU:return NU(t);case zU:case HU:return new n(+t);case YU:return AU(t,e);case XU:case ZU:case QU:case JU:case e$:case t$:case n$:case i$:case o$:return VU(t,e);case qU:return new n;case GU:case $U:return new n(t);case jU:return LU(t);case UU:return new n;case WU:return BU(t)}}Dw.exports=r$});var eg=v((S0e,Ow)=>{"use strict";var a$=Wt(),Rw=Object.create,s$=(function(){function t(){}return function(o){if(!a$(o))return{};if(Rw)return Rw(o);t.prototype=o;var e=new t;return t.prototype=void 0,e}})();Ow.exports=s$});var tg=v((k0e,Fw)=>{"use strict";var l$=eg(),c$=Ta(),d$=xa();function u$(t){return typeof t.constructor=="function"&&!d$(t)?l$(c$(t)):{}}Fw.exports=u$});var Aw=v((I0e,Nw)=>{"use strict";var p$=Ji(),h$=xn(),f$="[object Map]";function m$(t){return h$(t)&&p$(t)==f$}Nw.exports=m$});var zw=v((E0e,Vw)=>{"use strict";var _$=Aw(),g$=va(),Lw=Nh(),Bw=Lw&&Lw.isMap,b$=Bw?g$(Bw):_$;Vw.exports=b$});var qw=v((M0e,Hw)=>{"use strict";var v$=Ji(),y$=xn(),C$="[object Set]";function x$(t){return y$(t)&&v$(t)==C$}Hw.exports=x$});var $w=v((D0e,Uw)=>{"use strict";var w$=qw(),T$=va(),Gw=Nh(),jw=Gw&&Gw.isSet,S$=jw?T$(jw):w$;Uw.exports=S$});var ng=v((P0e,Xw)=>{"use strict";var k$=fa(),I$=Oh(),E$=_a(),M$=Ix(),D$=Fx(),P$=V_(),R$=z_(),O$=Ux(),F$=Xx(),N$=U_(),A$=ew(),L$=Ji(),B$=_w(),V$=Pw(),z$=tg(),H$=lt(),q$=Zi(),G$=zw(),j$=Wt(),U$=$w(),$$=qn(),W$=bi(),K$=1,Y$=2,X$=4,Ww="[object Arguments]",Z$="[object Array]",Q$="[object Boolean]",J$="[object Date]",eW="[object Error]",Kw="[object Function]",tW="[object GeneratorFunction]",nW="[object Map]",iW="[object Number]",Yw="[object Object]",oW="[object RegExp]",rW="[object Set]",aW="[object String]",sW="[object Symbol]",lW="[object WeakMap]",cW="[object ArrayBuffer]",dW="[object DataView]",uW="[object Float32Array]",pW="[object Float64Array]",hW="[object Int8Array]",fW="[object Int16Array]",mW="[object Int32Array]",_W="[object Uint8Array]",gW="[object Uint8ClampedArray]",bW="[object Uint16Array]",vW="[object Uint32Array]",Xe={};Xe[Ww]=Xe[Z$]=Xe[cW]=Xe[dW]=Xe[Q$]=Xe[J$]=Xe[uW]=Xe[pW]=Xe[hW]=Xe[fW]=Xe[mW]=Xe[nW]=Xe[iW]=Xe[Yw]=Xe[oW]=Xe[rW]=Xe[aW]=Xe[sW]=Xe[_W]=Xe[gW]=Xe[bW]=Xe[vW]=!0;Xe[eW]=Xe[Kw]=Xe[lW]=!1;function zh(t,o,e,n,i,r){var a,s=o&K$,c=o&Y$,u=o&X$;if(e&&(a=i?e(t,n,i,r):e(t)),a!==void 0)return a;if(!j$(t))return t;var f=H$(t);if(f){if(a=B$(t),!s)return R$(t,a)}else{var g=L$(t),C=g==Kw||g==tW;if(q$(t))return P$(t,s);if(g==Yw||g==Ww||C&&!i){if(a=c||C?{}:z$(t),!s)return c?F$(t,D$(a,t)):O$(t,M$(a,t))}else{if(!Xe[g])return i?t:{};a=V$(t,g,s)}}r||(r=new k$);var k=r.get(t);if(k)return k;r.set(t,a),U$(t)?t.forEach(function(q){a.add(zh(q,o,e,q,t,r))}):G$(t)&&t.forEach(function(q,Y){a.set(Y,zh(q,o,e,Y,t,r))});var S=u?c?A$:N$:c?W$:$$,F=f?void 0:S(t);return I$(F||t,function(q,Y){F&&(Y=q,q=t[Y]),E$(a,Y,zh(q,o,e,Y,t,r))}),a}Xw.exports=zh});var Qw=v((R0e,Zw)=>{"use strict";var yW=ng(),CW=4;function xW(t){return yW(t,CW)}Zw.exports=xW});var Hh=v((O0e,Jw)=>{"use strict";function wW(t){return function(){return t}}Jw.exports=wW});var tT=v((F0e,eT)=>{"use strict";function TW(t){return function(o,e,n){for(var i=-1,r=Object(o),a=n(o),s=a.length;s--;){var c=a[t?s:++i];if(e(r[c],c,r)===!1)break}return o}}eT.exports=TW});var qh=v((N0e,nT)=>{"use strict";var SW=tT(),kW=SW();nT.exports=kW});var Gh=v((A0e,iT)=>{"use strict";var IW=qh(),EW=qn();function MW(t,o){return t&&IW(t,o,EW)}iT.exports=MW});var rT=v((L0e,oT)=>{"use strict";var DW=Rn();function PW(t,o){return function(e,n){if(e==null)return e;if(!DW(e))return t(e,n);for(var i=e.length,r=o?i:-1,a=Object(e);(o?r--:++r<i)&&n(a[r],r,a)!==!1;);return e}}oT.exports=PW});var Sa=v((B0e,aT)=>{"use strict";var RW=Gh(),OW=rT(),FW=OW(RW);aT.exports=FW});var vi=v((V0e,sT)=>{"use strict";function NW(t){return t}sT.exports=NW});var ig=v((z0e,lT)=>{"use strict";var AW=vi();function LW(t){return typeof t=="function"?t:AW}lT.exports=LW});var og=v((H0e,cT)=>{"use strict";var BW=Oh(),VW=Sa(),zW=ig(),HW=lt();function qW(t,o){var e=HW(t)?BW:VW;return e(t,zW(o))}cT.exports=qW});var rg=v((q0e,dT)=>{"use strict";dT.exports=og()});var pT=v((G0e,uT)=>{"use strict";var GW=Sa();function jW(t,o){var e=[];return GW(t,function(n,i,r){o(n,i,r)&&e.push(n)}),e}uT.exports=jW});var fT=v((j0e,hT)=>{"use strict";var UW="__lodash_hash_undefined__";function $W(t){return this.__data__.set(t,UW),this}hT.exports=$W});var _T=v((U0e,mT)=>{"use strict";function WW(t){return this.__data__.has(t)}mT.exports=WW});var ag=v(($0e,gT)=>{"use strict";var KW=Rh(),YW=fT(),XW=_T();function jh(t){var o=-1,e=t==null?0:t.length;for(this.__data__=new KW;++o<e;)this.add(t[o])}jh.prototype.add=jh.prototype.push=YW;jh.prototype.has=XW;gT.exports=jh});var vT=v((W0e,bT)=>{"use strict";function ZW(t,o){for(var e=-1,n=t==null?0:t.length;++e<n;)if(o(t[e],e,t))return!0;return!1}bT.exports=ZW});var sg=v((K0e,yT)=>{"use strict";function QW(t,o){return t.has(o)}yT.exports=QW});var lg=v((Y0e,CT)=>{"use strict";var JW=ag(),eK=vT(),tK=sg(),nK=1,iK=2;function oK(t,o,e,n,i,r){var a=e&nK,s=t.length,c=o.length;if(s!=c&&!(a&&c>s))return!1;var u=r.get(t),f=r.get(o);if(u&&f)return u==o&&f==t;var g=-1,C=!0,k=e&iK?new JW:void 0;for(r.set(t,o),r.set(o,t);++g<s;){var S=t[g],F=o[g];if(n)var q=a?n(F,S,g,o,t,r):n(S,F,g,t,o,r);if(q!==void 0){if(q)continue;C=!1;break}if(k){if(!eK(o,function(Y,ee){if(!tK(k,ee)&&(S===Y||i(S,Y,e,n,r)))return k.push(ee)})){C=!1;break}}else if(!(S===F||i(S,F,e,n,r))){C=!1;break}}return r.delete(t),r.delete(o),C}CT.exports=oK});var wT=v((X0e,xT)=>{"use strict";function rK(t){var o=-1,e=Array(t.size);return t.forEach(function(n,i){e[++o]=[i,n]}),e}xT.exports=rK});var Uh=v((Z0e,TT)=>{"use strict";function aK(t){var o=-1,e=Array(t.size);return t.forEach(function(n){e[++o]=n}),e}TT.exports=aK});var MT=v((Q0e,ET)=>{"use strict";var ST=Xi(),kT=Q_(),sK=Yi(),lK=lg(),cK=wT(),dK=Uh(),uK=1,pK=2,hK="[object Boolean]",fK="[object Date]",mK="[object Error]",_K="[object Map]",gK="[object Number]",bK="[object RegExp]",vK="[object Set]",yK="[object String]",CK="[object Symbol]",xK="[object ArrayBuffer]",wK="[object DataView]",IT=ST?ST.prototype:void 0,cg=IT?IT.valueOf:void 0;function TK(t,o,e,n,i,r,a){switch(e){case wK:if(t.byteLength!=o.byteLength||t.byteOffset!=o.byteOffset)return!1;t=t.buffer,o=o.buffer;case xK:return!(t.byteLength!=o.byteLength||!r(new kT(t),new kT(o)));case hK:case fK:case gK:return sK(+t,+o);case mK:return t.name==o.name&&t.message==o.message;case bK:case yK:return t==o+"";case _K:var s=cK;case vK:var c=n&uK;if(s||(s=dK),t.size!=o.size&&!c)return!1;var u=a.get(t);if(u)return u==o;n|=pK,a.set(t,o);var f=lK(s(t),s(o),n,i,r,a);return a.delete(t),f;case CK:if(cg)return cg.call(t)==cg.call(o)}return!1}ET.exports=TK});var RT=v((J0e,PT)=>{"use strict";var DT=U_(),SK=1,kK=Object.prototype,IK=kK.hasOwnProperty;function EK(t,o,e,n,i,r){var a=e&SK,s=DT(t),c=s.length,u=DT(o),f=u.length;if(c!=f&&!a)return!1;for(var g=c;g--;){var C=s[g];if(!(a?C in o:IK.call(o,C)))return!1}var k=r.get(t),S=r.get(o);if(k&&S)return k==o&&S==t;var F=!0;r.set(t,o),r.set(o,t);for(var q=a;++g<c;){C=s[g];var Y=t[C],ee=o[C];if(n)var ae=a?n(ee,Y,C,o,t,r):n(Y,ee,C,t,o,r);if(!(ae===void 0?Y===ee||i(Y,ee,e,n,r):ae)){F=!1;break}q||(q=C=="constructor")}if(F&&!q){var Re=t.constructor,De=o.constructor;Re!=De&&"constructor"in t&&"constructor"in o&&!(typeof Re=="function"&&Re instanceof Re&&typeof De=="function"&&De instanceof De)&&(F=!1)}return r.delete(t),r.delete(o),F}PT.exports=EK});var zT=v((ebe,VT)=>{"use strict";var dg=fa(),MK=lg(),DK=MT(),PK=RT(),OT=Ji(),FT=lt(),NT=Zi(),RK=Jo(),OK=1,AT="[object Arguments]",LT="[object Array]",$h="[object Object]",FK=Object.prototype,BT=FK.hasOwnProperty;function NK(t,o,e,n,i,r){var a=FT(t),s=FT(o),c=a?LT:OT(t),u=s?LT:OT(o);c=c==AT?$h:c,u=u==AT?$h:u;var f=c==$h,g=u==$h,C=c==u;if(C&&NT(t)){if(!NT(o))return!1;a=!0,f=!1}if(C&&!f)return r||(r=new dg),a||RK(t)?MK(t,o,e,n,i,r):DK(t,o,c,e,n,i,r);if(!(e&OK)){var k=f&&BT.call(t,"__wrapped__"),S=g&&BT.call(o,"__wrapped__");if(k||S){var F=k?t.value():t,q=S?o.value():o;return r||(r=new dg),i(F,q,e,n,r)}}return C?(r||(r=new dg),PK(t,o,e,n,i,r)):!1}VT.exports=NK});var ug=v((tbe,GT)=>{"use strict";var AK=zT(),HT=xn();function qT(t,o,e,n,i){return t===o?!0:t==null||o==null||!HT(t)&&!HT(o)?t!==t&&o!==o:AK(t,o,e,n,qT,i)}GT.exports=qT});var UT=v((nbe,jT)=>{"use strict";var LK=fa(),BK=ug(),VK=1,zK=2;function HK(t,o,e,n){var i=e.length,r=i,a=!n;if(t==null)return!r;for(t=Object(t);i--;){var s=e[i];if(a&&s[2]?s[1]!==t[s[0]]:!(s[0]in t))return!1}for(;++i<r;){s=e[i];var c=s[0],u=t[c],f=s[1];if(a&&s[2]){if(u===void 0&&!(c in t))return!1}else{var g=new LK;if(n)var C=n(u,f,c,t,o,g);if(!(C===void 0?BK(f,u,VK|zK,n,g):C))return!1}}return!0}jT.exports=HK});var pg=v((ibe,$T)=>{"use strict";var qK=Wt();function GK(t){return t===t&&!qK(t)}$T.exports=GK});var KT=v((obe,WT)=>{"use strict";var jK=pg(),UK=qn();function $K(t){for(var o=UK(t),e=o.length;e--;){var n=o[e],i=t[n];o[e]=[n,i,jK(i)]}return o}WT.exports=$K});var hg=v((rbe,YT)=>{"use strict";function WK(t,o){return function(e){return e==null?!1:e[t]===o&&(o!==void 0||t in Object(e))}}YT.exports=WK});var ZT=v((abe,XT)=>{"use strict";var KK=UT(),YK=KT(),XK=hg();function ZK(t){var o=YK(t);return o.length==1&&o[0][2]?XK(o[0][0],o[0][1]):function(e){return e===t||KK(e,t,o)}}XT.exports=ZK});var eo=v((sbe,QT)=>{"use strict";var QK=_i(),JK=xn(),eY="[object Symbol]";function tY(t){return typeof t=="symbol"||JK(t)&&QK(t)==eY}QT.exports=tY});var Wh=v((lbe,JT)=>{"use strict";var nY=lt(),iY=eo(),oY=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,rY=/^\w*$/;function aY(t,o){if(nY(t))return!1;var e=typeof t;return e=="number"||e=="symbol"||e=="boolean"||t==null||iY(t)?!0:rY.test(t)||!oY.test(t)||o!=null&&t in Object(o)}JT.exports=aY});var n2=v((cbe,t2)=>{"use strict";var e2=Rh(),sY="Expected a function";function fg(t,o){if(typeof t!="function"||o!=null&&typeof o!="function")throw new TypeError(sY);var e=function(){var n=arguments,i=o?o.apply(this,n):n[0],r=e.cache;if(r.has(i))return r.get(i);var a=t.apply(this,n);return e.cache=r.set(i,a)||r,a};return e.cache=new(fg.Cache||e2),e}fg.Cache=e2;t2.exports=fg});var o2=v((dbe,i2)=>{"use strict";var lY=n2(),cY=500;function dY(t){var o=lY(t,function(n){return e.size===cY&&e.clear(),n}),e=o.cache;return o}i2.exports=dY});var a2=v((ube,r2)=>{"use strict";var uY=o2(),pY=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,hY=/\\(\\)?/g,fY=uY(function(t){var o=[];return t.charCodeAt(0)===46&&o.push(""),t.replace(pY,function(e,n,i,r){o.push(i?r.replace(hY,"$1"):n||e)}),o});r2.exports=fY});var ka=v((pbe,s2)=>{"use strict";function mY(t,o){for(var e=-1,n=t==null?0:t.length,i=Array(n);++e<n;)i[e]=o(t[e],e,t);return i}s2.exports=mY});var h2=v((hbe,p2)=>{"use strict";var l2=Xi(),_Y=ka(),gY=lt(),bY=eo(),vY=1/0,c2=l2?l2.prototype:void 0,d2=c2?c2.toString:void 0;function u2(t){if(typeof t=="string")return t;if(gY(t))return _Y(t,u2)+"";if(bY(t))return d2?d2.call(t):"";var o=t+"";return o=="0"&&1/t==-vY?"-0":o}p2.exports=u2});var mg=v((fbe,f2)=>{"use strict";var yY=h2();function CY(t){return t==null?"":yY(t)}f2.exports=CY});var Ia=v((mbe,m2)=>{"use strict";var xY=lt(),wY=Wh(),TY=a2(),SY=mg();function kY(t,o){return xY(t)?t:wY(t,o)?[t]:TY(SY(t))}m2.exports=kY});var nr=v((_be,_2)=>{"use strict";var IY=eo(),EY=1/0;function MY(t){if(typeof t=="string"||IY(t))return t;var o=t+"";return o=="0"&&1/t==-EY?"-0":o}_2.exports=MY});var Ea=v((gbe,g2)=>{"use strict";var DY=Ia(),PY=nr();function RY(t,o){o=DY(o,t);for(var e=0,n=o.length;t!=null&&e<n;)t=t[PY(o[e++])];return e&&e==n?t:void 0}g2.exports=RY});var v2=v((bbe,b2)=>{"use strict";var OY=Ea();function FY(t,o,e){var n=t==null?void 0:OY(t,o);return n===void 0?e:n}b2.exports=FY});var C2=v((vbe,y2)=>{"use strict";function NY(t,o){return t!=null&&o in Object(t)}y2.exports=NY});var _g=v((ybe,x2)=>{"use strict";var AY=Ia(),LY=Xo(),BY=lt(),VY=ba(),zY=Fh(),HY=nr();function qY(t,o,e){o=AY(o,t);for(var n=-1,i=o.length,r=!1;++n<i;){var a=HY(o[n]);if(!(r=t!=null&&e(t,a)))break;t=t[a]}return r||++n!=i?r:(i=t==null?0:t.length,!!i&&zY(i)&&VY(a,i)&&(BY(t)||LY(t)))}x2.exports=qY});var gg=v((Cbe,w2)=>{"use strict";var GY=C2(),jY=_g();function UY(t,o){return t!=null&&jY(t,o,GY)}w2.exports=UY});var S2=v((xbe,T2)=>{"use strict";var $Y=ug(),WY=v2(),KY=gg(),YY=Wh(),XY=pg(),ZY=hg(),QY=nr(),JY=1,eX=2;function tX(t,o){return YY(t)&&XY(o)?ZY(QY(t),o):function(e){var n=WY(e,t);return n===void 0&&n===o?KY(e,t):$Y(o,n,JY|eX)}}T2.exports=tX});var bg=v((wbe,k2)=>{"use strict";function nX(t){return function(o){return o?.[t]}}k2.exports=nX});var E2=v((Tbe,I2)=>{"use strict";var iX=Ea();function oX(t){return function(o){return iX(o,t)}}I2.exports=oX});var D2=v((Sbe,M2)=>{"use strict";var rX=bg(),aX=E2(),sX=Wh(),lX=nr();function cX(t){return sX(t)?rX(lX(t)):aX(t)}M2.exports=cX});var On=v((kbe,P2)=>{"use strict";var dX=ZT(),uX=S2(),pX=vi(),hX=lt(),fX=D2();function mX(t){return typeof t=="function"?t:t==null?pX:typeof t=="object"?hX(t)?uX(t[0],t[1]):dX(t):fX(t)}P2.exports=mX});var vg=v((Ibe,R2)=>{"use strict";var _X=H_(),gX=pT(),bX=On(),vX=lt();function yX(t,o){var e=vX(t)?_X:gX;return e(t,bX(o,3))}R2.exports=yX});var F2=v((Ebe,O2)=>{"use strict";var CX=Object.prototype,xX=CX.hasOwnProperty;function wX(t,o){return t!=null&&xX.call(t,o)}O2.exports=wX});var yg=v((Mbe,N2)=>{"use strict";var TX=F2(),SX=_g();function kX(t,o){return t!=null&&SX(t,o,TX)}N2.exports=kX});var L2=v((Dbe,A2)=>{"use strict";var IX=Ah(),EX=Ji(),MX=Xo(),DX=lt(),PX=Rn(),RX=Zi(),OX=xa(),FX=Jo(),NX="[object Map]",AX="[object Set]",LX=Object.prototype,BX=LX.hasOwnProperty;function VX(t){if(t==null)return!0;if(PX(t)&&(DX(t)||typeof t=="string"||typeof t.splice=="function"||RX(t)||FX(t)||MX(t)))return!t.length;var o=EX(t);if(o==NX||o==AX)return!t.size;if(OX(t))return!IX(t).length;for(var e in t)if(BX.call(t,e))return!1;return!0}A2.exports=VX});var Cg=v((Pbe,B2)=>{"use strict";function zX(t){return t===void 0}B2.exports=zX});var xg=v((Rbe,V2)=>{"use strict";var HX=Sa(),qX=Rn();function GX(t,o){var e=-1,n=qX(t)?Array(t.length):[];return HX(t,function(i,r,a){n[++e]=o(i,r,a)}),n}V2.exports=GX});var wg=v((Obe,z2)=>{"use strict";var jX=ka(),UX=On(),$X=xg(),WX=lt();function KX(t,o){var e=WX(t)?jX:$X;return e(t,UX(o,3))}z2.exports=KX});var q2=v((Fbe,H2)=>{"use strict";function YX(t,o,e,n){var i=-1,r=t==null?0:t.length;for(n&&r&&(e=t[++i]);++i<r;)e=o(e,t[i],i,t);return e}H2.exports=YX});var j2=v((Nbe,G2)=>{"use strict";function XX(t,o,e,n,i){return i(t,function(r,a,s){e=n?(n=!1,r):o(e,r,a,s)}),e}G2.exports=XX});var Tg=v((Abe,U2)=>{"use strict";var ZX=q2(),QX=Sa(),JX=On(),eZ=j2(),tZ=lt();function nZ(t,o,e){var n=tZ(t)?ZX:eZ,i=arguments.length<3;return n(t,JX(o,4),e,i,QX)}U2.exports=nZ});var W2=v((Lbe,$2)=>{"use strict";var iZ=_i(),oZ=lt(),rZ=xn(),aZ="[object String]";function sZ(t){return typeof t=="string"||!oZ(t)&&rZ(t)&&iZ(t)==aZ}$2.exports=sZ});var Y2=v((Bbe,K2)=>{"use strict";var lZ=bg(),cZ=lZ("length");K2.exports=cZ});var Z2=v((Vbe,X2)=>{"use strict";var dZ="\\ud800-\\udfff",uZ="\\u0300-\\u036f",pZ="\\ufe20-\\ufe2f",hZ="\\u20d0-\\u20ff",fZ=uZ+pZ+hZ,mZ="\\ufe0e\\ufe0f",_Z="\\u200d",gZ=RegExp("["+_Z+dZ+fZ+mZ+"]");function bZ(t){return gZ.test(t)}X2.exports=bZ});var aS=v((zbe,rS)=>{"use strict";var J2="\\ud800-\\udfff",vZ="\\u0300-\\u036f",yZ="\\ufe20-\\ufe2f",CZ="\\u20d0-\\u20ff",xZ=vZ+yZ+CZ,wZ="\\ufe0e\\ufe0f",TZ="["+J2+"]",Sg="["+xZ+"]",kg="\\ud83c[\\udffb-\\udfff]",SZ="(?:"+Sg+"|"+kg+")",eS="[^"+J2+"]",tS="(?:\\ud83c[\\udde6-\\uddff]){2}",nS="[\\ud800-\\udbff][\\udc00-\\udfff]",kZ="\\u200d",iS=SZ+"?",oS="["+wZ+"]?",IZ="(?:"+kZ+"(?:"+[eS,tS,nS].join("|")+")"+oS+iS+")*",EZ=oS+iS+IZ,MZ="(?:"+[eS+Sg+"?",Sg,tS,nS,TZ].join("|")+")",Q2=RegExp(kg+"(?="+kg+")|"+MZ+EZ,"g");function DZ(t){for(var o=Q2.lastIndex=0;Q2.test(t);)++o;return o}rS.exports=DZ});var lS=v((Hbe,sS)=>{"use strict";var PZ=Y2(),RZ=Z2(),OZ=aS();function FZ(t){return RZ(t)?OZ(t):PZ(t)}sS.exports=FZ});var dS=v((qbe,cS)=>{"use strict";var NZ=Ah(),AZ=Ji(),LZ=Rn(),BZ=W2(),VZ=lS(),zZ="[object Map]",HZ="[object Set]";function qZ(t){if(t==null)return 0;if(LZ(t))return BZ(t)?VZ(t):t.length;var o=AZ(t);return o==zZ||o==HZ?t.size:NZ(t).length}cS.exports=qZ});var pS=v((Gbe,uS)=>{"use strict";var GZ=Oh(),jZ=eg(),UZ=Gh(),$Z=On(),WZ=Ta(),KZ=lt(),YZ=Zi(),XZ=Uo(),ZZ=Wt(),QZ=Jo();function JZ(t,o,e){var n=KZ(t),i=n||YZ(t)||QZ(t);if(o=$Z(o,4),e==null){var r=t&&t.constructor;i?e=n?new r:[]:ZZ(t)?e=XZ(r)?jZ(WZ(t)):{}:e={}}return(i?GZ:UZ)(t,function(a,s,c){return o(e,a,s,c)}),e}uS.exports=JZ});var _S=v((jbe,mS)=>{"use strict";var hS=Xi(),eQ=Xo(),tQ=lt(),fS=hS?hS.isConcatSpreadable:void 0;function nQ(t){return tQ(t)||eQ(t)||!!(fS&&t&&t[fS])}mS.exports=nQ});var Kh=v((Ube,bS)=>{"use strict";var iQ=Bh(),oQ=_S();function gS(t,o,e,n,i){var r=-1,a=t.length;for(e||(e=oQ),i||(i=[]);++r<a;){var s=t[r];o>0&&e(s)?o>1?gS(s,o-1,e,n,i):iQ(i,s):n||(i[i.length]=s)}return i}bS.exports=gS});var yS=v(($be,vS)=>{"use strict";function rQ(t,o,e){switch(e.length){case 0:return t.call(o);case 1:return t.call(o,e[0]);case 2:return t.call(o,e[0],e[1]);case 3:return t.call(o,e[0],e[1],e[2])}return t.apply(o,e)}vS.exports=rQ});var Ig=v((Wbe,xS)=>{"use strict";var aQ=yS(),CS=Math.max;function sQ(t,o,e){return o=CS(o===void 0?t.length-1:o,0),function(){for(var n=arguments,i=-1,r=CS(n.length-o,0),a=Array(r);++i<r;)a[i]=n[o+i];i=-1;for(var s=Array(o+1);++i<o;)s[i]=n[i];return s[o]=e(a),aQ(t,this,s)}}xS.exports=sQ});var SS=v((Kbe,TS)=>{"use strict";var lQ=Hh(),wS=N_(),cQ=vi(),dQ=wS?function(t,o){return wS(t,"toString",{configurable:!0,enumerable:!1,value:lQ(o),writable:!0})}:cQ;TS.exports=dQ});var IS=v((Ybe,kS)=>{"use strict";var uQ=800,pQ=16,hQ=Date.now;function fQ(t){var o=0,e=0;return function(){var n=hQ(),i=pQ-(n-e);if(e=n,i>0){if(++o>=uQ)return arguments[0]}else o=0;return t.apply(void 0,arguments)}}kS.exports=fQ});var Eg=v((Xbe,ES)=>{"use strict";var mQ=SS(),_Q=IS(),gQ=_Q(mQ);ES.exports=gQ});var Ma=v((Zbe,MS)=>{"use strict";var bQ=vi(),vQ=Ig(),yQ=Eg();function CQ(t,o){return yQ(vQ(t,o,bQ),t+"")}MS.exports=CQ});var Mg=v((Qbe,DS)=>{"use strict";function xQ(t,o,e,n){for(var i=t.length,r=e+(n?1:-1);n?r--:++r<i;)if(o(t[r],r,t))return r;return-1}DS.exports=xQ});var RS=v((Jbe,PS)=>{"use strict";function wQ(t){return t!==t}PS.exports=wQ});var FS=v((eve,OS)=>{"use strict";function TQ(t,o,e){for(var n=e-1,i=t.length;++n<i;)if(t[n]===o)return n;return-1}OS.exports=TQ});var AS=v((tve,NS)=>{"use strict";var SQ=Mg(),kQ=RS(),IQ=FS();function EQ(t,o,e){return o===o?IQ(t,o,e):SQ(t,kQ,e)}NS.exports=EQ});var BS=v((nve,LS)=>{"use strict";var MQ=AS();function DQ(t,o){var e=t==null?0:t.length;return!!e&&MQ(t,o,0)>-1}LS.exports=DQ});var zS=v((ive,VS)=>{"use strict";function PQ(t,o,e){for(var n=-1,i=t==null?0:t.length;++n<i;)if(e(o,t[n]))return!0;return!1}VS.exports=PQ});var qS=v((ove,HS)=>{"use strict";function RQ(){}HS.exports=RQ});var jS=v((rve,GS)=>{"use strict";var Dg=$_(),OQ=qS(),FQ=Uh(),NQ=1/0,AQ=Dg&&1/FQ(new Dg([,-0]))[1]==NQ?function(t){return new Dg(t)}:OQ;GS.exports=AQ});var $S=v((ave,US)=>{"use strict";var LQ=ag(),BQ=BS(),VQ=zS(),zQ=sg(),HQ=jS(),qQ=Uh(),GQ=200;function jQ(t,o,e){var n=-1,i=BQ,r=t.length,a=!0,s=[],c=s;if(e)a=!1,i=VQ;else if(r>=GQ){var u=o?null:HQ(t);if(u)return qQ(u);a=!1,i=zQ,c=new LQ}else c=o?[]:s;e:for(;++n<r;){var f=t[n],g=o?o(f):f;if(f=e||f!==0?f:0,a&&g===g){for(var C=c.length;C--;)if(c[C]===g)continue e;o&&c.push(g),s.push(f)}else i(c,g,e)||(c!==s&&c.push(g),s.push(f))}return s}US.exports=jQ});var Pg=v((sve,WS)=>{"use strict";var UQ=Rn(),$Q=xn();function WQ(t){return $Q(t)&&UQ(t)}WS.exports=WQ});var YS=v((lve,KS)=>{"use strict";var KQ=Kh(),YQ=Ma(),XQ=$S(),ZQ=Pg(),QQ=YQ(function(t){return XQ(KQ(t,1,ZQ,!0))});KS.exports=QQ});var ZS=v((cve,XS)=>{"use strict";var JQ=ka();function eJ(t,o){return JQ(o,function(e){return t[e]})}XS.exports=eJ});var Rg=v((dve,QS)=>{"use strict";var tJ=ZS(),nJ=qn();function iJ(t){return t==null?[]:tJ(t,nJ(t))}QS.exports=iJ});var Kt=v((uve,JS)=>{"use strict";var Yh;if(typeof oo=="function")try{Yh={clone:Qw(),constant:Hh(),each:rg(),filter:vg(),has:yg(),isArray:lt(),isEmpty:L2(),isFunction:Uo(),isUndefined:Cg(),keys:qn(),map:wg(),reduce:Tg(),size:dS(),transform:pS(),union:YS(),values:Rg()}}catch{}Yh||(Yh=window._);JS.exports=Yh});var Xh=v((hve,ik)=>{"use strict";var ve=Kt();ik.exports=Pe;var oJ="\0",to="\0",ek="";function Pe(t){this._isDirected=ve.has(t,"directed")?t.directed:!0,this._isMultigraph=ve.has(t,"multigraph")?t.multigraph:!1,this._isCompound=ve.has(t,"compound")?t.compound:!1,this._label=void 0,this._defaultNodeLabelFn=ve.constant(void 0),this._defaultEdgeLabelFn=ve.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[to]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}Pe.prototype._nodeCount=0;Pe.prototype._edgeCount=0;Pe.prototype.isDirected=function(){return this._isDirected};Pe.prototype.isMultigraph=function(){return this._isMultigraph};Pe.prototype.isCompound=function(){return this._isCompound};Pe.prototype.setGraph=function(t){return this._label=t,this};Pe.prototype.graph=function(){return this._label};Pe.prototype.setDefaultNodeLabel=function(t){return ve.isFunction(t)||(t=ve.constant(t)),this._defaultNodeLabelFn=t,this};Pe.prototype.nodeCount=function(){return this._nodeCount};Pe.prototype.nodes=function(){return ve.keys(this._nodes)};Pe.prototype.sources=function(){var t=this;return ve.filter(this.nodes(),function(o){return ve.isEmpty(t._in[o])})};Pe.prototype.sinks=function(){var t=this;return ve.filter(this.nodes(),function(o){return ve.isEmpty(t._out[o])})};Pe.prototype.setNodes=function(t,o){var e=arguments,n=this;return ve.each(t,function(i){e.length>1?n.setNode(i,o):n.setNode(i)}),this};Pe.prototype.setNode=function(t,o){return ve.has(this._nodes,t)?(arguments.length>1&&(this._nodes[t]=o),this):(this._nodes[t]=arguments.length>1?o:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]=to,this._children[t]={},this._children[to][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)};Pe.prototype.node=function(t){return this._nodes[t]};Pe.prototype.hasNode=function(t){return ve.has(this._nodes,t)};Pe.prototype.removeNode=function(t){var o=this;if(ve.has(this._nodes,t)){var e=function(n){o.removeEdge(o._edgeObjs[n])};delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],ve.each(this.children(t),function(n){o.setParent(n)}),delete this._children[t]),ve.each(ve.keys(this._in[t]),e),delete this._in[t],delete this._preds[t],ve.each(ve.keys(this._out[t]),e),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this};Pe.prototype.setParent=function(t,o){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(ve.isUndefined(o))o=to;else{o+="";for(var e=o;!ve.isUndefined(e);e=this.parent(e))if(e===t)throw new Error("Setting "+o+" as parent of "+t+" would create a cycle");this.setNode(o)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=o,this._children[o][t]=!0,this};Pe.prototype._removeFromParentsChildList=function(t){delete this._children[this._parent[t]][t]};Pe.prototype.parent=function(t){if(this._isCompound){var o=this._parent[t];if(o!==to)return o}};Pe.prototype.children=function(t){if(ve.isUndefined(t)&&(t=to),this._isCompound){var o=this._children[t];if(o)return ve.keys(o)}else{if(t===to)return this.nodes();if(this.hasNode(t))return[]}};Pe.prototype.predecessors=function(t){var o=this._preds[t];if(o)return ve.keys(o)};Pe.prototype.successors=function(t){var o=this._sucs[t];if(o)return ve.keys(o)};Pe.prototype.neighbors=function(t){var o=this.predecessors(t);if(o)return ve.union(o,this.successors(t))};Pe.prototype.isLeaf=function(t){var o;return this.isDirected()?o=this.successors(t):o=this.neighbors(t),o.length===0};Pe.prototype.filterNodes=function(t){var o=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});o.setGraph(this.graph());var e=this;ve.each(this._nodes,function(r,a){t(a)&&o.setNode(a,r)}),ve.each(this._edgeObjs,function(r){o.hasNode(r.v)&&o.hasNode(r.w)&&o.setEdge(r,e.edge(r))});var n={};function i(r){var a=e.parent(r);return a===void 0||o.hasNode(a)?(n[r]=a,a):a in n?n[a]:i(a)}return this._isCompound&&ve.each(o.nodes(),function(r){o.setParent(r,i(r))}),o};Pe.prototype.setDefaultEdgeLabel=function(t){return ve.isFunction(t)||(t=ve.constant(t)),this._defaultEdgeLabelFn=t,this};Pe.prototype.edgeCount=function(){return this._edgeCount};Pe.prototype.edges=function(){return ve.values(this._edgeObjs)};Pe.prototype.setPath=function(t,o){var e=this,n=arguments;return ve.reduce(t,function(i,r){return n.length>1?e.setEdge(i,r,o):e.setEdge(i,r),r}),this};Pe.prototype.setEdge=function(){var t,o,e,n,i=!1,r=arguments[0];typeof r=="object"&&r!==null&&"v"in r?(t=r.v,o=r.w,e=r.name,arguments.length===2&&(n=arguments[1],i=!0)):(t=r,o=arguments[1],e=arguments[3],arguments.length>2&&(n=arguments[2],i=!0)),t=""+t,o=""+o,ve.isUndefined(e)||(e=""+e);var a=Da(this._isDirected,t,o,e);if(ve.has(this._edgeLabels,a))return i&&(this._edgeLabels[a]=n),this;if(!ve.isUndefined(e)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(o),this._edgeLabels[a]=i?n:this._defaultEdgeLabelFn(t,o,e);var s=rJ(this._isDirected,t,o,e);return t=s.v,o=s.w,Object.freeze(s),this._edgeObjs[a]=s,tk(this._preds[o],t),tk(this._sucs[t],o),this._in[o][a]=s,this._out[t][a]=s,this._edgeCount++,this};Pe.prototype.edge=function(t,o,e){var n=arguments.length===1?Og(this._isDirected,arguments[0]):Da(this._isDirected,t,o,e);return this._edgeLabels[n]};Pe.prototype.hasEdge=function(t,o,e){var n=arguments.length===1?Og(this._isDirected,arguments[0]):Da(this._isDirected,t,o,e);return ve.has(this._edgeLabels,n)};Pe.prototype.removeEdge=function(t,o,e){var n=arguments.length===1?Og(this._isDirected,arguments[0]):Da(this._isDirected,t,o,e),i=this._edgeObjs[n];return i&&(t=i.v,o=i.w,delete this._edgeLabels[n],delete this._edgeObjs[n],nk(this._preds[o],t),nk(this._sucs[t],o),delete this._in[o][n],delete this._out[t][n],this._edgeCount--),this};Pe.prototype.inEdges=function(t,o){var e=this._in[t];if(e){var n=ve.values(e);return o?ve.filter(n,function(i){return i.v===o}):n}};Pe.prototype.outEdges=function(t,o){var e=this._out[t];if(e){var n=ve.values(e);return o?ve.filter(n,function(i){return i.w===o}):n}};Pe.prototype.nodeEdges=function(t,o){var e=this.inEdges(t,o);if(e)return e.concat(this.outEdges(t,o))};function tk(t,o){t[o]?t[o]++:t[o]=1}function nk(t,o){--t[o]||delete t[o]}function Da(t,o,e,n){var i=""+o,r=""+e;if(!t&&i>r){var a=i;i=r,r=a}return i+ek+r+ek+(ve.isUndefined(n)?oJ:n)}function rJ(t,o,e,n){var i=""+o,r=""+e;if(!t&&i>r){var a=i;i=r,r=a}var s={v:i,w:r};return n&&(s.name=n),s}function Og(t,o){return Da(t,o.v,o.w,o.name)}});var rk=v((fve,ok)=>{"use strict";ok.exports="2.1.8"});var sk=v((mve,ak)=>{"use strict";ak.exports={Graph:Xh(),version:rk()}});var ck=v((_ve,lk)=>{"use strict";var Fn=Kt(),aJ=Xh();lk.exports={write:sJ,read:dJ};function sJ(t){var o={options:{directed:t.isDirected(),multigraph:t.isMultigraph(),compound:t.isCompound()},nodes:lJ(t),edges:cJ(t)};return Fn.isUndefined(t.graph())||(o.value=Fn.clone(t.graph())),o}function lJ(t){return Fn.map(t.nodes(),function(o){var e=t.node(o),n=t.parent(o),i={v:o};return Fn.isUndefined(e)||(i.value=e),Fn.isUndefined(n)||(i.parent=n),i})}function cJ(t){return Fn.map(t.edges(),function(o){var e=t.edge(o),n={v:o.v,w:o.w};return Fn.isUndefined(o.name)||(n.name=o.name),Fn.isUndefined(e)||(n.value=e),n})}function dJ(t){var o=new aJ(t.options).setGraph(t.value);return Fn.each(t.nodes,function(e){o.setNode(e.v,e.value),e.parent&&o.setParent(e.v,e.parent)}),Fn.each(t.edges,function(e){o.setEdge({v:e.v,w:e.w,name:e.name},e.value)}),o}});var uk=v((gve,dk)=>{"use strict";var Zh=Kt();dk.exports=uJ;function uJ(t){var o={},e=[],n;function i(r){Zh.has(o,r)||(o[r]=!0,n.push(r),Zh.each(t.successors(r),i),Zh.each(t.predecessors(r),i))}return Zh.each(t.nodes(),function(r){n=[],i(r),n.length&&e.push(n)}),e}});var Fg=v((bve,hk)=>{"use strict";var pk=Kt();hk.exports=dn;function dn(){this._arr=[],this._keyIndices={}}dn.prototype.size=function(){return this._arr.length};dn.prototype.keys=function(){return this._arr.map(function(t){return t.key})};dn.prototype.has=function(t){return pk.has(this._keyIndices,t)};dn.prototype.priority=function(t){var o=this._keyIndices[t];if(o!==void 0)return this._arr[o].priority};dn.prototype.min=function(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key};dn.prototype.add=function(t,o){var e=this._keyIndices;if(t=String(t),!pk.has(e,t)){var n=this._arr,i=n.length;return e[t]=i,n.push({key:t,priority:o}),this._decrease(i),!0}return!1};dn.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var t=this._arr.pop();return delete this._keyIndices[t.key],this._heapify(0),t.key};dn.prototype.decrease=function(t,o){var e=this._keyIndices[t];if(o>this._arr[e].priority)throw new Error("New priority is greater than current priority. Key: "+t+" Old: "+this._arr[e].priority+" New: "+o);this._arr[e].priority=o,this._decrease(e)};dn.prototype._heapify=function(t){var o=this._arr,e=2*t,n=e+1,i=t;e<o.length&&(i=o[e].priority<o[i].priority?e:i,n<o.length&&(i=o[n].priority<o[i].priority?n:i),i!==t&&(this._swap(t,i),this._heapify(i)))};dn.prototype._decrease=function(t){for(var o=this._arr,e=o[t].priority,n;t!==0&&(n=t>>1,!(o[n].priority<e));)this._swap(t,n),t=n};dn.prototype._swap=function(t,o){var e=this._arr,n=this._keyIndices,i=e[t],r=e[o];e[t]=r,e[o]=i,n[r.key]=t,n[i.key]=o}});var Ng=v((vve,fk)=>{"use strict";var pJ=Kt(),hJ=Fg();fk.exports=mJ;var fJ=pJ.constant(1);function mJ(t,o,e,n){return _J(t,String(o),e||fJ,n||function(i){return t.outEdges(i)})}function _J(t,o,e,n){var i={},r=new hJ,a,s,c=function(u){var f=u.v!==a?u.v:u.w,g=i[f],C=e(u),k=s.distance+C;if(C<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+u+" Weight: "+C);k<g.distance&&(g.distance=k,g.predecessor=a,r.decrease(f,k))};for(t.nodes().forEach(function(u){var f=u===o?0:Number.POSITIVE_INFINITY;i[u]={distance:f},r.add(u,f)});r.size()>0&&(a=r.removeMin(),s=i[a],s.distance!==Number.POSITIVE_INFINITY);)n(a).forEach(c);return i}});var _k=v((yve,mk)=>{"use strict";var gJ=Ng(),bJ=Kt();mk.exports=vJ;function vJ(t,o,e){return bJ.transform(t.nodes(),function(n,i){n[i]=gJ(t,i,o,e)},{})}});var Ag=v((Cve,bk)=>{"use strict";var gk=Kt();bk.exports=yJ;function yJ(t){var o=0,e=[],n={},i=[];function r(a){var s=n[a]={onStack:!0,lowlink:o,index:o++};if(e.push(a),t.successors(a).forEach(function(f){gk.has(n,f)?n[f].onStack&&(s.lowlink=Math.min(s.lowlink,n[f].index)):(r(f),s.lowlink=Math.min(s.lowlink,n[f].lowlink))}),s.lowlink===s.index){var c=[],u;do u=e.pop(),n[u].onStack=!1,c.push(u);while(a!==u);i.push(c)}}return t.nodes().forEach(function(a){gk.has(n,a)||r(a)}),i}});var yk=v((xve,vk)=>{"use strict";var CJ=Kt(),xJ=Ag();vk.exports=wJ;function wJ(t){return CJ.filter(xJ(t),function(o){return o.length>1||o.length===1&&t.hasEdge(o[0],o[0])})}});var xk=v((wve,Ck)=>{"use strict";var TJ=Kt();Ck.exports=kJ;var SJ=TJ.constant(1);function kJ(t,o,e){return IJ(t,o||SJ,e||function(n){return t.outEdges(n)})}function IJ(t,o,e){var n={},i=t.nodes();return i.forEach(function(r){n[r]={},n[r][r]={distance:0},i.forEach(function(a){r!==a&&(n[r][a]={distance:Number.POSITIVE_INFINITY})}),e(r).forEach(function(a){var s=a.v===r?a.w:a.v,c=o(a);n[r][s]={distance:c,predecessor:r}})}),i.forEach(function(r){var a=n[r];i.forEach(function(s){var c=n[s];i.forEach(function(u){var f=c[r],g=a[u],C=c[u],k=f.distance+g.distance;k<C.distance&&(C.distance=k,C.predecessor=g.predecessor)})})}),n}});var Lg=v((Tve,Tk)=>{"use strict";var Pa=Kt();Tk.exports=wk;wk.CycleException=Qh;function wk(t){var o={},e={},n=[];function i(r){if(Pa.has(e,r))throw new Qh;Pa.has(o,r)||(e[r]=!0,o[r]=!0,Pa.each(t.predecessors(r),i),delete e[r],n.push(r))}if(Pa.each(t.sinks(),i),Pa.size(o)!==t.nodeCount())throw new Qh;return n}function Qh(){}Qh.prototype=new Error});var Ik=v((Sve,kk)=>{"use strict";var Sk=Lg();kk.exports=EJ;function EJ(t){try{Sk(t)}catch(o){if(o instanceof Sk.CycleException)return!1;throw o}return!0}});var Bg=v((kve,Mk)=>{"use strict";var Jh=Kt();Mk.exports=MJ;function MJ(t,o,e){Jh.isArray(o)||(o=[o]);var n=(t.isDirected()?t.successors:t.neighbors).bind(t),i=[],r={};return Jh.each(o,function(a){if(!t.hasNode(a))throw new Error("Graph does not have node: "+a);Ek(t,a,e==="post",r,n,i)}),i}function Ek(t,o,e,n,i,r){Jh.has(n,o)||(n[o]=!0,e||r.push(o),Jh.each(i(o),function(a){Ek(t,a,e,n,i,r)}),e&&r.push(o))}});var Pk=v((Ive,Dk)=>{"use strict";var DJ=Bg();Dk.exports=PJ;function PJ(t,o){return DJ(t,o,"post")}});var Ok=v((Eve,Rk)=>{"use strict";var RJ=Bg();Rk.exports=OJ;function OJ(t,o){return RJ(t,o,"pre")}});var Ak=v((Mve,Nk)=>{"use strict";var Fk=Kt(),FJ=Xh(),NJ=Fg();Nk.exports=AJ;function AJ(t,o){var e=new FJ,n={},i=new NJ,r;function a(c){var u=c.v===r?c.w:c.v,f=i.priority(u);if(f!==void 0){var g=o(c);g<f&&(n[u]=r,i.decrease(u,g))}}if(t.nodeCount()===0)return e;Fk.each(t.nodes(),function(c){i.add(c,Number.POSITIVE_INFINITY),e.setNode(c)}),i.decrease(t.nodes()[0],0);for(var s=!1;i.size()>0;){if(r=i.removeMin(),Fk.has(n,r))e.setEdge(r,n[r]);else{if(s)throw new Error("Input graph is not connected: "+t);s=!0}t.nodeEdges(r).forEach(a)}return e}});var Bk=v((Dve,Lk)=>{"use strict";Lk.exports={components:uk(),dijkstra:Ng(),dijkstraAll:_k(),findCycles:yk(),floydWarshall:xk(),isAcyclic:Ik(),postorder:Pk(),preorder:Ok(),prim:Ak(),tarjan:Ag(),topsort:Lg()}});var Hk=v((Pve,zk)=>{"use strict";var Vk=sk();zk.exports={Graph:Vk.Graph,json:ck(),alg:Bk(),version:Vk.version}});var un=v((Rve,qk)=>{"use strict";var ef;if(typeof oo=="function")try{ef=Hk()}catch{}ef||(ef=window.graphlib);qk.exports=ef});var jk=v((Fve,Gk)=>{"use strict";var LJ=ng(),BJ=1,VJ=4;function zJ(t){return LJ(t,BJ|VJ)}Gk.exports=zJ});var Ra=v((Nve,Uk)=>{"use strict";var HJ=Yi(),qJ=Rn(),GJ=ba(),jJ=Wt();function UJ(t,o,e){if(!jJ(e))return!1;var n=typeof o;return(n=="number"?qJ(e)&&GJ(o,e.length):n=="string"&&o in e)?HJ(e[o],t):!1}Uk.exports=UJ});var Kk=v((Ave,Wk)=>{"use strict";var $J=Ma(),WJ=Yi(),KJ=Ra(),YJ=bi(),$k=Object.prototype,XJ=$k.hasOwnProperty,ZJ=$J(function(t,o){t=Object(t);var e=-1,n=o.length,i=n>2?o[2]:void 0;for(i&&KJ(o[0],o[1],i)&&(n=1);++e<n;)for(var r=o[e],a=YJ(r),s=-1,c=a.length;++s<c;){var u=a[s],f=t[u];(f===void 0||WJ(f,$k[u])&&!XJ.call(t,u))&&(t[u]=r[u])}return t});Wk.exports=ZJ});var Xk=v((Lve,Yk)=>{"use strict";var QJ=On(),JJ=Rn(),eee=qn();function tee(t){return function(o,e,n){var i=Object(o);if(!JJ(o)){var r=QJ(e,3);o=eee(o),e=function(s){return r(i[s],s,i)}}var a=t(o,e,n);return a>-1?i[r?o[a]:a]:void 0}}Yk.exports=tee});var Qk=v((Bve,Zk)=>{"use strict";var nee=/\s/;function iee(t){for(var o=t.length;o--&&nee.test(t.charAt(o)););return o}Zk.exports=iee});var eI=v((Vve,Jk)=>{"use strict";var oee=Qk(),ree=/^\s+/;function aee(t){return t&&t.slice(0,oee(t)+1).replace(ree,"")}Jk.exports=aee});var oI=v((zve,iI)=>{"use strict";var see=eI(),tI=Wt(),lee=eo(),nI=NaN,cee=/^[-+]0x[0-9a-f]+$/i,dee=/^0b[01]+$/i,uee=/^0o[0-7]+$/i,pee=parseInt;function hee(t){if(typeof t=="number")return t;if(lee(t))return nI;if(tI(t)){var o=typeof t.valueOf=="function"?t.valueOf():t;t=tI(o)?o+"":o}if(typeof t!="string")return t===0?t:+t;t=see(t);var e=dee.test(t);return e||uee.test(t)?pee(t.slice(2),e?2:8):cee.test(t)?nI:+t}iI.exports=hee});var Vg=v((Hve,aI)=>{"use strict";var fee=oI(),rI=1/0,mee=17976931348623157e292;function _ee(t){if(!t)return t===0?t:0;if(t=fee(t),t===rI||t===-rI){var o=t<0?-1:1;return o*mee}return t===t?t:0}aI.exports=_ee});var lI=v((qve,sI)=>{"use strict";var gee=Vg();function bee(t){var o=gee(t),e=o%1;return o===o?e?o-e:o:0}sI.exports=bee});var dI=v((Gve,cI)=>{"use strict";var vee=Mg(),yee=On(),Cee=lI(),xee=Math.max;function wee(t,o,e){var n=t==null?0:t.length;if(!n)return-1;var i=e==null?0:Cee(e);return i<0&&(i=xee(n+i,0)),vee(t,yee(o,3),i)}cI.exports=wee});var pI=v((jve,uI)=>{"use strict";var Tee=Xk(),See=dI(),kee=Tee(See);uI.exports=kee});var zg=v((Uve,hI)=>{"use strict";var Iee=Kh();function Eee(t){var o=t==null?0:t.length;return o?Iee(t,1):[]}hI.exports=Eee});var mI=v(($ve,fI)=>{"use strict";var Mee=qh(),Dee=ig(),Pee=bi();function Ree(t,o){return t==null?t:Mee(t,Dee(o),Pee)}fI.exports=Ree});var gI=v((Wve,_I)=>{"use strict";function Oee(t){var o=t==null?0:t.length;return o?t[o-1]:void 0}_I.exports=Oee});var vI=v((Kve,bI)=>{"use strict";var Fee=ma(),Nee=Gh(),Aee=On();function Lee(t,o){var e={};return o=Aee(o,3),Nee(t,function(n,i,r){Fee(e,i,o(n,i,r))}),e}bI.exports=Lee});var tf=v((Yve,yI)=>{"use strict";var Bee=eo();function Vee(t,o,e){for(var n=-1,i=t.length;++n<i;){var r=t[n],a=o(r);if(a!=null&&(s===void 0?a===a&&!Bee(a):e(a,s)))var s=a,c=r}return c}yI.exports=Vee});var xI=v((Xve,CI)=>{"use strict";function zee(t,o){return t>o}CI.exports=zee});var TI=v((Zve,wI)=>{"use strict";var Hee=tf(),qee=xI(),Gee=vi();function jee(t){return t&&t.length?Hee(t,Gee,qee):void 0}wI.exports=jee});var Hg=v((Qve,SI)=>{"use strict";var Uee=ma(),$ee=Yi();function Wee(t,o,e){(e!==void 0&&!$ee(t[o],e)||e===void 0&&!(o in t))&&Uee(t,o,e)}SI.exports=Wee});var EI=v((Jve,II)=>{"use strict";var Kee=_i(),Yee=Ta(),Xee=xn(),Zee="[object Object]",Qee=Function.prototype,Jee=Object.prototype,kI=Qee.toString,ete=Jee.hasOwnProperty,tte=kI.call(Object);function nte(t){if(!Xee(t)||Kee(t)!=Zee)return!1;var o=Yee(t);if(o===null)return!0;var e=ete.call(o,"constructor")&&o.constructor;return typeof e=="function"&&e instanceof e&&kI.call(e)==tte}II.exports=nte});var qg=v((eye,MI)=>{"use strict";function ite(t,o){if(!(o==="constructor"&&typeof t[o]=="function")&&o!="__proto__")return t[o]}MI.exports=ite});var PI=v((tye,DI)=>{"use strict";var ote=Yo(),rte=bi();function ate(t){return ote(t,rte(t))}DI.exports=ate});var LI=v((nye,AI)=>{"use strict";var RI=Hg(),ste=V_(),lte=J_(),cte=z_(),dte=tg(),OI=Xo(),FI=lt(),ute=Pg(),pte=Zi(),hte=Uo(),fte=Wt(),mte=EI(),_te=Jo(),NI=qg(),gte=PI();function bte(t,o,e,n,i,r,a){var s=NI(t,e),c=NI(o,e),u=a.get(c);if(u){RI(t,e,u);return}var f=r?r(s,c,e+"",t,o,a):void 0,g=f===void 0;if(g){var C=FI(c),k=!C&&pte(c),S=!C&&!k&&_te(c);f=c,C||k||S?FI(s)?f=s:ute(s)?f=cte(s):k?(g=!1,f=ste(c,!0)):S?(g=!1,f=lte(c,!0)):f=[]:mte(c)||OI(c)?(f=s,OI(s)?f=gte(s):(!fte(s)||hte(s))&&(f=dte(c))):g=!1}g&&(a.set(c,f),i(f,c,n,r,a),a.delete(c)),RI(t,e,f)}AI.exports=bte});var zI=v((iye,VI)=>{"use strict";var vte=fa(),yte=Hg(),Cte=qh(),xte=LI(),wte=Wt(),Tte=bi(),Ste=qg();function BI(t,o,e,n,i){t!==o&&Cte(o,function(r,a){if(i||(i=new vte),wte(r))xte(t,o,a,e,BI,n,i);else{var s=n?n(Ste(t,a),r,a+"",t,o,i):void 0;s===void 0&&(s=r),yte(t,a,s)}},Tte)}VI.exports=BI});var qI=v((oye,HI)=>{"use strict";var kte=Ma(),Ite=Ra();function Ete(t){return kte(function(o,e){var n=-1,i=e.length,r=i>1?e[i-1]:void 0,a=i>2?e[2]:void 0;for(r=t.length>3&&typeof r=="function"?(i--,r):void 0,a&&Ite(e[0],e[1],a)&&(r=i<3?void 0:r,i=1),o=Object(o);++n<i;){var s=e[n];s&&t(o,s,n,r)}return o})}HI.exports=Ete});var jI=v((rye,GI)=>{"use strict";var Mte=zI(),Dte=qI(),Pte=Dte(function(t,o,e){Mte(t,o,e)});GI.exports=Pte});var Gg=v((aye,UI)=>{"use strict";function Rte(t,o){return t<o}UI.exports=Rte});var WI=v((sye,$I)=>{"use strict";var Ote=tf(),Fte=Gg(),Nte=vi();function Ate(t){return t&&t.length?Ote(t,Nte,Fte):void 0}$I.exports=Ate});var YI=v((lye,KI)=>{"use strict";var Lte=tf(),Bte=On(),Vte=Gg();function zte(t,o){return t&&t.length?Lte(t,Bte(o,2),Vte):void 0}KI.exports=zte});var ZI=v((cye,XI)=>{"use strict";var Hte=cn(),qte=function(){return Hte.Date.now()};XI.exports=qte});var eE=v((dye,JI)=>{"use strict";var Gte=_a(),jte=Ia(),Ute=ba(),QI=Wt(),$te=nr();function Wte(t,o,e,n){if(!QI(t))return t;o=jte(o,t);for(var i=-1,r=o.length,a=r-1,s=t;s!=null&&++i<r;){var c=$te(o[i]),u=e;if(c==="__proto__"||c==="constructor"||c==="prototype")return t;if(i!=a){var f=s[c];u=n?n(f,c,s):void 0,u===void 0&&(u=QI(f)?f:Ute(o[i+1])?[]:{})}Gte(s,c,u),s=s[c]}return t}JI.exports=Wte});var nE=v((uye,tE)=>{"use strict";var Kte=Ea(),Yte=eE(),Xte=Ia();function Zte(t,o,e){for(var n=-1,i=o.length,r={};++n<i;){var a=o[n],s=Kte(t,a);e(s,a)&&Yte(r,Xte(a,t),s)}return r}tE.exports=Zte});var oE=v((pye,iE)=>{"use strict";var Qte=nE(),Jte=gg();function ene(t,o){return Qte(t,o,function(e,n){return Jte(t,n)})}iE.exports=ene});var aE=v((hye,rE)=>{"use strict";var tne=zg(),nne=Ig(),ine=Eg();function one(t){return ine(nne(t,void 0,tne),t+"")}rE.exports=one});var lE=v((fye,sE)=>{"use strict";var rne=oE(),ane=aE(),sne=ane(function(t,o){return t==null?{}:rne(t,o)});sE.exports=sne});var dE=v((mye,cE)=>{"use strict";var lne=Math.ceil,cne=Math.max;function dne(t,o,e,n){for(var i=-1,r=cne(lne((o-t)/(e||1)),0),a=Array(r);r--;)a[n?r:++i]=t,t+=e;return a}cE.exports=dne});var pE=v((_ye,uE)=>{"use strict";var une=dE(),pne=Ra(),jg=Vg();function hne(t){return function(o,e,n){return n&&typeof n!="number"&&pne(o,e,n)&&(e=n=void 0),o=jg(o),e===void 0?(e=o,o=0):e=jg(e),n=n===void 0?o<e?1:-1:jg(n),une(o,e,n,t)}}uE.exports=hne});var fE=v((gye,hE)=>{"use strict";var fne=pE(),mne=fne();hE.exports=mne});var _E=v((bye,mE)=>{"use strict";function _ne(t,o){var e=t.length;for(t.sort(o);e--;)t[e]=t[e].value;return t}mE.exports=_ne});var vE=v((vye,bE)=>{"use strict";var gE=eo();function gne(t,o){if(t!==o){var e=t!==void 0,n=t===null,i=t===t,r=gE(t),a=o!==void 0,s=o===null,c=o===o,u=gE(o);if(!s&&!u&&!r&&t>o||r&&a&&c&&!s&&!u||n&&a&&c||!e&&c||!i)return 1;if(!n&&!r&&!u&&t<o||u&&e&&i&&!n&&!r||s&&e&&i||!a&&i||!c)return-1}return 0}bE.exports=gne});var CE=v((yye,yE)=>{"use strict";var bne=vE();function vne(t,o,e){for(var n=-1,i=t.criteria,r=o.criteria,a=i.length,s=e.length;++n<a;){var c=bne(i[n],r[n]);if(c){if(n>=s)return c;var u=e[n];return c*(u=="desc"?-1:1)}}return t.index-o.index}yE.exports=vne});var wE=v((Cye,xE)=>{"use strict";var Ug=ka(),yne=Ea(),Cne=On(),xne=xg(),wne=_E(),Tne=va(),Sne=CE(),kne=vi(),Ine=lt();function Ene(t,o,e){o.length?o=Ug(o,function(r){return Ine(r)?function(a){return yne(a,r.length===1?r[0]:r)}:r}):o=[kne];var n=-1;o=Ug(o,Tne(Cne));var i=xne(t,function(r,a,s){var c=Ug(o,function(u){return u(r)});return{criteria:c,index:++n,value:r}});return wne(i,function(r,a){return Sne(r,a,e)})}xE.exports=Ene});var kE=v((xye,SE)=>{"use strict";var Mne=Kh(),Dne=wE(),Pne=Ma(),TE=Ra(),Rne=Pne(function(t,o){if(t==null)return[];var e=o.length;return e>1&&TE(t,o[0],o[1])?o=[]:e>2&&TE(o[0],o[1],o[2])&&(o=[o[0]]),Dne(t,Mne(o,1),[])});SE.exports=Rne});var EE=v((wye,IE)=>{"use strict";var One=mg(),Fne=0;function Nne(t){var o=++Fne;return One(t)+o}IE.exports=Nne});var DE=v((Tye,ME)=>{"use strict";function Ane(t,o,e){for(var n=-1,i=t.length,r=o.length,a={};++n<i;){var s=n<r?o[n]:void 0;e(a,t[n],s)}return a}ME.exports=Ane});var RE=v((Sye,PE)=>{"use strict";var Lne=_a(),Bne=DE();function Vne(t,o){return Bne(t||[],o||[],Lne)}PE.exports=Vne});var Je=v((kye,OE)=>{"use strict";var nf;if(typeof oo=="function")try{nf={cloneDeep:jk(),constant:Hh(),defaults:Kk(),each:rg(),filter:vg(),find:pI(),flatten:zg(),forEach:og(),forIn:mI(),has:yg(),isUndefined:Cg(),last:gI(),map:wg(),mapValues:vI(),max:TI(),merge:jI(),min:WI(),minBy:YI(),now:ZI(),pick:lE(),range:fE(),reduce:Tg(),sortBy:kE(),uniqueId:EE(),values:Rg(),zipObject:RE()}}catch{}nf||(nf=window._);OE.exports=nf});var AE=v((Eye,NE)=>{"use strict";NE.exports=of;function of(){var t={};t._next=t._prev=t,this._sentinel=t}of.prototype.dequeue=function(){var t=this._sentinel,o=t._prev;if(o!==t)return FE(o),o};of.prototype.enqueue=function(t){var o=this._sentinel;t._prev&&t._next&&FE(t),t._next=o._next,o._next._prev=t,o._next=t,t._prev=o};of.prototype.toString=function(){for(var t=[],o=this._sentinel,e=o._prev;e!==o;)t.push(JSON.stringify(e,zne)),e=e._prev;return"["+t.join(", ")+"]"};function FE(t){t._prev._next=t._next,t._next._prev=t._prev,delete t._next,delete t._prev}function zne(t,o){if(t!=="_next"&&t!=="_prev")return o}});var BE=v((Mye,LE)=>{"use strict";var Gn=Je(),Hne=un().Graph,qne=AE();LE.exports=jne;var Gne=Gn.constant(1);function jne(t,o){if(t.nodeCount()<=1)return[];var e=$ne(t,o||Gne),n=Une(e.graph,e.buckets,e.zeroIdx);return Gn.flatten(Gn.map(n,function(i){return t.outEdges(i.v,i.w)}),!0)}function Une(t,o,e){for(var n=[],i=o[o.length-1],r=o[0],a;t.nodeCount();){for(;a=r.dequeue();)$g(t,o,e,a);for(;a=i.dequeue();)$g(t,o,e,a);if(t.nodeCount()){for(var s=o.length-2;s>0;--s)if(a=o[s].dequeue(),a){n=n.concat($g(t,o,e,a,!0));break}}}return n}function $g(t,o,e,n,i){var r=i?[]:void 0;return Gn.forEach(t.inEdges(n.v),function(a){var s=t.edge(a),c=t.node(a.v);i&&r.push({v:a.v,w:a.w}),c.out-=s,Wg(o,e,c)}),Gn.forEach(t.outEdges(n.v),function(a){var s=t.edge(a),c=a.w,u=t.node(c);u.in-=s,Wg(o,e,u)}),t.removeNode(n.v),r}function $ne(t,o){var e=new Hne,n=0,i=0;Gn.forEach(t.nodes(),function(s){e.setNode(s,{v:s,in:0,out:0})}),Gn.forEach(t.edges(),function(s){var c=e.edge(s.v,s.w)||0,u=o(s),f=c+u;e.setEdge(s.v,s.w,f),i=Math.max(i,e.node(s.v).out+=u),n=Math.max(n,e.node(s.w).in+=u)});var r=Gn.range(i+n+3).map(function(){return new qne}),a=n+1;return Gn.forEach(e.nodes(),function(s){Wg(r,a,e.node(s))}),{graph:e,buckets:r,zeroIdx:a}}function Wg(t,o,e){e.out?e.in?t[e.out-e.in+o].enqueue(e):t[t.length-1].enqueue(e):t[0].enqueue(e)}});var zE=v((Dye,VE)=>{"use strict";var no=Je(),Wne=BE();VE.exports={run:Kne,undo:Xne};function Kne(t){var o=t.graph().acyclicer==="greedy"?Wne(t,e(t)):Yne(t);no.forEach(o,function(n){var i=t.edge(n);t.removeEdge(n),i.forwardName=n.name,i.reversed=!0,t.setEdge(n.w,n.v,i,no.uniqueId("rev"))});function e(n){return function(i){return n.edge(i).weight}}}function Yne(t){var o=[],e={},n={};function i(r){no.has(n,r)||(n[r]=!0,e[r]=!0,no.forEach(t.outEdges(r),function(a){no.has(e,a.w)?o.push(a):i(a.w)}),delete e[r])}return no.forEach(t.nodes(),i),o}function Xne(t){no.forEach(t.edges(),function(o){var e=t.edge(o);if(e.reversed){t.removeEdge(o);var n=e.forwardName;delete e.reversed,delete e.forwardName,t.setEdge(o.w,o.v,e,n)}})}});var Rt=v((Pye,jE)=>{"use strict";var Ae=Je(),HE=un().Graph;jE.exports={addDummyNode:qE,simplify:Zne,asNonCompoundGraph:Qne,successorWeights:Jne,predecessorWeights:eie,intersectRect:tie,buildLayerMatrix:nie,normalizeRanks:iie,removeEmptyRanks:oie,addBorderNode:rie,maxRank:GE,partition:aie,time:sie,notime:lie};function qE(t,o,e,n){var i;do i=Ae.uniqueId(n);while(t.hasNode(i));return e.dummy=o,t.setNode(i,e),i}function Zne(t){var o=new HE().setGraph(t.graph());return Ae.forEach(t.nodes(),function(e){o.setNode(e,t.node(e))}),Ae.forEach(t.edges(),function(e){var n=o.edge(e.v,e.w)||{weight:0,minlen:1},i=t.edge(e);o.setEdge(e.v,e.w,{weight:n.weight+i.weight,minlen:Math.max(n.minlen,i.minlen)})}),o}function Qne(t){var o=new HE({multigraph:t.isMultigraph()}).setGraph(t.graph());return Ae.forEach(t.nodes(),function(e){t.children(e).length||o.setNode(e,t.node(e))}),Ae.forEach(t.edges(),function(e){o.setEdge(e,t.edge(e))}),o}function Jne(t){var o=Ae.map(t.nodes(),function(e){var n={};return Ae.forEach(t.outEdges(e),function(i){n[i.w]=(n[i.w]||0)+t.edge(i).weight}),n});return Ae.zipObject(t.nodes(),o)}function eie(t){var o=Ae.map(t.nodes(),function(e){var n={};return Ae.forEach(t.inEdges(e),function(i){n[i.v]=(n[i.v]||0)+t.edge(i).weight}),n});return Ae.zipObject(t.nodes(),o)}function tie(t,o){var e=t.x,n=t.y,i=o.x-e,r=o.y-n,a=t.width/2,s=t.height/2;if(!i&&!r)throw new Error("Not possible to find intersection inside of the rectangle");var c,u;return Math.abs(r)*a>Math.abs(i)*s?(r<0&&(s=-s),c=s*i/r,u=s):(i<0&&(a=-a),c=a,u=a*r/i),{x:e+c,y:n+u}}function nie(t){var o=Ae.map(Ae.range(GE(t)+1),function(){return[]});return Ae.forEach(t.nodes(),function(e){var n=t.node(e),i=n.rank;Ae.isUndefined(i)||(o[i][n.order]=e)}),o}function iie(t){var o=Ae.min(Ae.map(t.nodes(),function(e){return t.node(e).rank}));Ae.forEach(t.nodes(),function(e){var n=t.node(e);Ae.has(n,"rank")&&(n.rank-=o)})}function oie(t){var o=Ae.min(Ae.map(t.nodes(),function(r){return t.node(r).rank})),e=[];Ae.forEach(t.nodes(),function(r){var a=t.node(r).rank-o;e[a]||(e[a]=[]),e[a].push(r)});var n=0,i=t.graph().nodeRankFactor;Ae.forEach(e,function(r,a){Ae.isUndefined(r)&&a%i!==0?--n:n&&Ae.forEach(r,function(s){t.node(s).rank+=n})})}function rie(t,o,e,n){var i={width:0,height:0};return arguments.length>=4&&(i.rank=e,i.order=n),qE(t,"border",i,o)}function GE(t){return Ae.max(Ae.map(t.nodes(),function(o){var e=t.node(o).rank;if(!Ae.isUndefined(e))return e}))}function aie(t,o){var e={lhs:[],rhs:[]};return Ae.forEach(t,function(n){o(n)?e.lhs.push(n):e.rhs.push(n)}),e}function sie(t,o){var e=Ae.now();try{return o()}finally{console.log(t+" time: "+(Ae.now()-e)+"ms")}}function lie(t,o){return o()}});var WE=v((Rye,$E)=>{"use strict";var UE=Je(),cie=Rt();$E.exports={run:die,undo:pie};function die(t){t.graph().dummyChains=[],UE.forEach(t.edges(),function(o){uie(t,o)})}function uie(t,o){var e=o.v,n=t.node(e).rank,i=o.w,r=t.node(i).rank,a=o.name,s=t.edge(o),c=s.labelRank;if(r!==n+1){t.removeEdge(o);var u,f,g;for(g=0,++n;n<r;++g,++n)s.points=[],f={width:0,height:0,edgeLabel:s,edgeObj:o,rank:n},u=cie.addDummyNode(t,"edge",f,"_d"),n===c&&(f.width=s.width,f.height=s.height,f.dummy="edge-label",f.labelpos=s.labelpos),t.setEdge(e,u,{weight:s.weight},a),g===0&&t.graph().dummyChains.push(u),e=u;t.setEdge(e,i,{weight:s.weight},a)}}function pie(t){UE.forEach(t.graph().dummyChains,function(o){var e=t.node(o),n=e.edgeLabel,i;for(t.setEdge(e.edgeObj,n);e.dummy;)i=t.successors(o)[0],t.removeNode(o),n.points.push({x:e.x,y:e.y}),e.dummy==="edge-label"&&(n.x=e.x,n.y=e.y,n.width=e.width,n.height=e.height),o=i,e=t.node(o)})}});var Oa=v((Oye,KE)=>{"use strict";var rf=Je();KE.exports={longestPath:hie,slack:fie};function hie(t){var o={};function e(n){var i=t.node(n);if(rf.has(o,n))return i.rank;o[n]=!0;var r=rf.min(rf.map(t.outEdges(n),function(a){return e(a.w)-t.edge(a).minlen}));return(r===Number.POSITIVE_INFINITY||r===void 0||r===null)&&(r=0),i.rank=r}rf.forEach(t.sources(),e)}function fie(t,o){return t.node(o.w).rank-t.node(o.v).rank-t.edge(o).minlen}});var Kg=v((Fye,YE)=>{"use strict";var af=Je(),mie=un().Graph,sf=Oa().slack;YE.exports=_ie;function _ie(t){var o=new mie({directed:!1}),e=t.nodes()[0],n=t.nodeCount();o.setNode(e,{});for(var i,r;gie(o,t)<n;)i=bie(o,t),r=o.hasNode(i.v)?sf(t,i):-sf(t,i),vie(o,t,r);return o}function gie(t,o){function e(n){af.forEach(o.nodeEdges(n),function(i){var r=i.v,a=n===r?i.w:r;!t.hasNode(a)&&!sf(o,i)&&(t.setNode(a,{}),t.setEdge(n,a,{}),e(a))})}return af.forEach(t.nodes(),e),t.nodeCount()}function bie(t,o){return af.minBy(o.edges(),function(e){if(t.hasNode(e.v)!==t.hasNode(e.w))return sf(o,e)})}function vie(t,o,e){af.forEach(t.nodes(),function(n){o.node(n).rank+=e})}});var iM=v((Nye,nM)=>{"use strict";var jn=Je(),yie=Kg(),Cie=Oa().slack,xie=Oa().longestPath,wie=un().alg.preorder,Tie=un().alg.postorder,Sie=Rt().simplify;nM.exports=io;io.initLowLimValues=Xg;io.initCutValues=Yg;io.calcCutValue=ZE;io.leaveEdge=JE;io.enterEdge=eM;io.exchangeEdges=tM;function io(t){t=Sie(t),xie(t);var o=yie(t);Xg(o),Yg(o,t);for(var e,n;e=JE(o);)n=eM(o,t,e),tM(o,t,e,n)}function Yg(t,o){var e=Tie(t,t.nodes());e=e.slice(0,e.length-1),jn.forEach(e,function(n){kie(t,o,n)})}function kie(t,o,e){var n=t.node(e),i=n.parent;t.edge(e,i).cutvalue=ZE(t,o,e)}function ZE(t,o,e){var n=t.node(e),i=n.parent,r=!0,a=o.edge(e,i),s=0;return a||(r=!1,a=o.edge(i,e)),s=a.weight,jn.forEach(o.nodeEdges(e),function(c){var u=c.v===e,f=u?c.w:c.v;if(f!==i){var g=u===r,C=o.edge(c).weight;if(s+=g?C:-C,Eie(t,e,f)){var k=t.edge(e,f).cutvalue;s+=g?-k:k}}}),s}function Xg(t,o){arguments.length<2&&(o=t.nodes()[0]),QE(t,{},1,o)}function QE(t,o,e,n,i){var r=e,a=t.node(n);return o[n]=!0,jn.forEach(t.neighbors(n),function(s){jn.has(o,s)||(e=QE(t,o,e,s,n))}),a.low=r,a.lim=e++,i?a.parent=i:delete a.parent,e}function JE(t){return jn.find(t.edges(),function(o){return t.edge(o).cutvalue<0})}function eM(t,o,e){var n=e.v,i=e.w;o.hasEdge(n,i)||(n=e.w,i=e.v);var r=t.node(n),a=t.node(i),s=r,c=!1;r.lim>a.lim&&(s=a,c=!0);var u=jn.filter(o.edges(),function(f){return c===XE(t,t.node(f.v),s)&&c!==XE(t,t.node(f.w),s)});return jn.minBy(u,function(f){return Cie(o,f)})}function tM(t,o,e,n){var i=e.v,r=e.w;t.removeEdge(i,r),t.setEdge(n.v,n.w,{}),Xg(t),Yg(t,o),Iie(t,o)}function Iie(t,o){var e=jn.find(t.nodes(),function(i){return!o.node(i).parent}),n=wie(t,e);n=n.slice(1),jn.forEach(n,function(i){var r=t.node(i).parent,a=o.edge(i,r),s=!1;a||(a=o.edge(r,i),s=!0),o.node(i).rank=o.node(r).rank+(s?a.minlen:-a.minlen)})}function Eie(t,o,e){return t.hasEdge(o,e)}function XE(t,o,e){return e.low<=o.lim&&o.lim<=e.lim}});var sM=v((Aye,aM)=>{"use strict";var Mie=Oa(),rM=Mie.longestPath,Die=Kg(),Pie=iM();aM.exports=Rie;function Rie(t){switch(t.graph().ranker){case"network-simplex":oM(t);break;case"tight-tree":Fie(t);break;case"longest-path":Oie(t);break;default:oM(t)}}var Oie=rM;function Fie(t){rM(t),Die(t)}function oM(t){Pie(t)}});var cM=v((Lye,lM)=>{"use strict";var Zg=Je();lM.exports=Nie;function Nie(t){var o=Lie(t);Zg.forEach(t.graph().dummyChains,function(e){for(var n=t.node(e),i=n.edgeObj,r=Aie(t,o,i.v,i.w),a=r.path,s=r.lca,c=0,u=a[c],f=!0;e!==i.w;){if(n=t.node(e),f){for(;(u=a[c])!==s&&t.node(u).maxRank<n.rank;)c++;u===s&&(f=!1)}if(!f){for(;c<a.length-1&&t.node(u=a[c+1]).minRank<=n.rank;)c++;u=a[c]}t.setParent(e,u),e=t.successors(e)[0]}})}function Aie(t,o,e,n){var i=[],r=[],a=Math.min(o[e].low,o[n].low),s=Math.max(o[e].lim,o[n].lim),c,u;c=e;do c=t.parent(c),i.push(c);while(c&&(o[c].low>a||s>o[c].lim));for(u=c,c=n;(c=t.parent(c))!==u;)r.push(c);return{path:i.concat(r.reverse()),lca:u}}function Lie(t){var o={},e=0;function n(i){var r=e;Zg.forEach(t.children(i),n),o[i]={low:r,lim:e++}}return Zg.forEach(t.children(),n),o}});var pM=v((Bye,uM)=>{"use strict";var Un=Je(),Qg=Rt();uM.exports={run:Bie,cleanup:Hie};function Bie(t){var o=Qg.addDummyNode(t,"root",{},"_root"),e=Vie(t),n=Un.max(Un.values(e))-1,i=2*n+1;t.graph().nestingRoot=o,Un.forEach(t.edges(),function(a){t.edge(a).minlen*=i});var r=zie(t)+1;Un.forEach(t.children(),function(a){dM(t,o,i,r,n,e,a)}),t.graph().nodeRankFactor=i}function dM(t,o,e,n,i,r,a){var s=t.children(a);if(!s.length){a!==o&&t.setEdge(o,a,{weight:0,minlen:e});return}var c=Qg.addBorderNode(t,"_bt"),u=Qg.addBorderNode(t,"_bb"),f=t.node(a);t.setParent(c,a),f.borderTop=c,t.setParent(u,a),f.borderBottom=u,Un.forEach(s,function(g){dM(t,o,e,n,i,r,g);var C=t.node(g),k=C.borderTop?C.borderTop:g,S=C.borderBottom?C.borderBottom:g,F=C.borderTop?n:2*n,q=k!==S?1:i-r[a]+1;t.setEdge(c,k,{weight:F,minlen:q,nestingEdge:!0}),t.setEdge(S,u,{weight:F,minlen:q,nestingEdge:!0})}),t.parent(a)||t.setEdge(o,c,{weight:0,minlen:i+r[a]})}function Vie(t){var o={};function e(n,i){var r=t.children(n);r&&r.length&&Un.forEach(r,function(a){e(a,i+1)}),o[n]=i}return Un.forEach(t.children(),function(n){e(n,1)}),o}function zie(t){return Un.reduce(t.edges(),function(o,e){return o+t.edge(e).weight},0)}function Hie(t){var o=t.graph();t.removeNode(o.nestingRoot),delete o.nestingRoot,Un.forEach(t.edges(),function(e){var n=t.edge(e);n.nestingEdge&&t.removeEdge(e)})}});var mM=v((Vye,fM)=>{"use strict";var Jg=Je(),qie=Rt();fM.exports=Gie;function Gie(t){function o(e){var n=t.children(e),i=t.node(e);if(n.length&&Jg.forEach(n,o),Jg.has(i,"minRank")){i.borderLeft=[],i.borderRight=[];for(var r=i.minRank,a=i.maxRank+1;r<a;++r)hM(t,"borderLeft","_bl",e,i,r),hM(t,"borderRight","_br",e,i,r)}}Jg.forEach(t.children(),o)}function hM(t,o,e,n,i,r){var a={width:0,height:0,rank:r,borderType:o},s=i[o][r-1],c=qie.addDummyNode(t,"border",a,e);i[o][r]=c,t.setParent(c,n),s&&t.setEdge(s,c,{weight:1})}});var vM=v((zye,bM)=>{"use strict";var Nn=Je();bM.exports={adjust:jie,undo:Uie};function jie(t){var o=t.graph().rankdir.toLowerCase();(o==="lr"||o==="rl")&&gM(t)}function Uie(t){var o=t.graph().rankdir.toLowerCase();(o==="bt"||o==="rl")&&$ie(t),(o==="lr"||o==="rl")&&(Wie(t),gM(t))}function gM(t){Nn.forEach(t.nodes(),function(o){_M(t.node(o))}),Nn.forEach(t.edges(),function(o){_M(t.edge(o))})}function _M(t){var o=t.width;t.width=t.height,t.height=o}function $ie(t){Nn.forEach(t.nodes(),function(o){e0(t.node(o))}),Nn.forEach(t.edges(),function(o){var e=t.edge(o);Nn.forEach(e.points,e0),Nn.has(e,"y")&&e0(e)})}function e0(t){t.y=-t.y}function Wie(t){Nn.forEach(t.nodes(),function(o){t0(t.node(o))}),Nn.forEach(t.edges(),function(o){var e=t.edge(o);Nn.forEach(e.points,t0),Nn.has(e,"x")&&t0(e)})}function t0(t){var o=t.x;t.x=t.y,t.y=o}});var CM=v((Hye,yM)=>{"use strict";var $n=Je();yM.exports=Kie;function Kie(t){var o={},e=$n.filter(t.nodes(),function(s){return!t.children(s).length}),n=$n.max($n.map(e,function(s){return t.node(s).rank})),i=$n.map($n.range(n+1),function(){return[]});function r(s){if(!$n.has(o,s)){o[s]=!0;var c=t.node(s);i[c.rank].push(s),$n.forEach(t.successors(s),r)}}var a=$n.sortBy(e,function(s){return t.node(s).rank});return $n.forEach(a,r),i}});var wM=v((qye,xM)=>{"use strict";var yi=Je();xM.exports=Yie;function Yie(t,o){for(var e=0,n=1;n<o.length;++n)e+=Xie(t,o[n-1],o[n]);return e}function Xie(t,o,e){for(var n=yi.zipObject(e,yi.map(e,function(u,f){return f})),i=yi.flatten(yi.map(o,function(u){return yi.sortBy(yi.map(t.outEdges(u),function(f){return{pos:n[f.w],weight:t.edge(f).weight}}),"pos")}),!0),r=1;r<e.length;)r<<=1;var a=2*r-1;r-=1;var s=yi.map(new Array(a),function(){return 0}),c=0;return yi.forEach(i.forEach(function(u){var f=u.pos+r;s[f]+=u.weight;for(var g=0;f>0;)f%2&&(g+=s[f+1]),f=f-1>>1,s[f]+=u.weight;c+=u.weight*g})),c}});var kM=v((Gye,SM)=>{"use strict";var TM=Je();SM.exports=Zie;function Zie(t,o){return TM.map(o,function(e){var n=t.inEdges(e);if(n.length){var i=TM.reduce(n,function(r,a){var s=t.edge(a),c=t.node(a.v);return{sum:r.sum+s.weight*c.order,weight:r.weight+s.weight}},{sum:0,weight:0});return{v:e,barycenter:i.sum/i.weight,weight:i.weight}}else return{v:e}})}});var EM=v((jye,IM)=>{"use strict";var Yt=Je();IM.exports=Qie;function Qie(t,o){var e={};Yt.forEach(t,function(i,r){var a=e[i.v]={indegree:0,in:[],out:[],vs:[i.v],i:r};Yt.isUndefined(i.barycenter)||(a.barycenter=i.barycenter,a.weight=i.weight)}),Yt.forEach(o.edges(),function(i){var r=e[i.v],a=e[i.w];!Yt.isUndefined(r)&&!Yt.isUndefined(a)&&(a.indegree++,r.out.push(e[i.w]))});var n=Yt.filter(e,function(i){return!i.indegree});return Jie(n)}function Jie(t){var o=[];function e(r){return function(a){a.merged||(Yt.isUndefined(a.barycenter)||Yt.isUndefined(r.barycenter)||a.barycenter>=r.barycenter)&&eoe(r,a)}}function n(r){return function(a){a.in.push(r),--a.indegree===0&&t.push(a)}}for(;t.length;){var i=t.pop();o.push(i),Yt.forEach(i.in.reverse(),e(i)),Yt.forEach(i.out,n(i))}return Yt.map(Yt.filter(o,function(r){return!r.merged}),function(r){return Yt.pick(r,["vs","i","barycenter","weight"])})}function eoe(t,o){var e=0,n=0;t.weight&&(e+=t.barycenter*t.weight,n+=t.weight),o.weight&&(e+=o.barycenter*o.weight,n+=o.weight),t.vs=o.vs.concat(t.vs),t.barycenter=e/n,t.weight=n,t.i=Math.min(o.i,t.i),o.merged=!0}});var PM=v((Uye,DM)=>{"use strict";var Fa=Je(),toe=Rt();DM.exports=noe;function noe(t,o){var e=toe.partition(t,function(f){return Fa.has(f,"barycenter")}),n=e.lhs,i=Fa.sortBy(e.rhs,function(f){return-f.i}),r=[],a=0,s=0,c=0;n.sort(ioe(!!o)),c=MM(r,i,c),Fa.forEach(n,function(f){c+=f.vs.length,r.push(f.vs),a+=f.barycenter*f.weight,s+=f.weight,c=MM(r,i,c)});var u={vs:Fa.flatten(r,!0)};return s&&(u.barycenter=a/s,u.weight=s),u}function MM(t,o,e){for(var n;o.length&&(n=Fa.last(o)).i<=e;)o.pop(),t.push(n.vs),e++;return e}function ioe(t){return function(o,e){return o.barycenter<e.barycenter?-1:o.barycenter>e.barycenter?1:t?e.i-o.i:o.i-e.i}}});var FM=v(($ye,OM)=>{"use strict";var Ci=Je(),ooe=kM(),roe=EM(),aoe=PM();OM.exports=RM;function RM(t,o,e,n){var i=t.children(o),r=t.node(o),a=r?r.borderLeft:void 0,s=r?r.borderRight:void 0,c={};a&&(i=Ci.filter(i,function(S){return S!==a&&S!==s}));var u=ooe(t,i);Ci.forEach(u,function(S){if(t.children(S.v).length){var F=RM(t,S.v,e,n);c[S.v]=F,Ci.has(F,"barycenter")&&loe(S,F)}});var f=roe(u,e);soe(f,c);var g=aoe(f,n);if(a&&(g.vs=Ci.flatten([a,g.vs,s],!0),t.predecessors(a).length)){var C=t.node(t.predecessors(a)[0]),k=t.node(t.predecessors(s)[0]);Ci.has(g,"barycenter")||(g.barycenter=0,g.weight=0),g.barycenter=(g.barycenter*g.weight+C.order+k.order)/(g.weight+2),g.weight+=2}return g}function soe(t,o){Ci.forEach(t,function(e){e.vs=Ci.flatten(e.vs.map(function(n){return o[n]?o[n].vs:n}),!0)})}function loe(t,o){Ci.isUndefined(t.barycenter)?(t.barycenter=o.barycenter,t.weight=o.weight):(t.barycenter=(t.barycenter*t.weight+o.barycenter*o.weight)/(t.weight+o.weight),t.weight+=o.weight)}});var AM=v((Wye,NM)=>{"use strict";var Na=Je(),coe=un().Graph;NM.exports=doe;function doe(t,o,e){var n=uoe(t),i=new coe({compound:!0}).setGraph({root:n}).setDefaultNodeLabel(function(r){return t.node(r)});return Na.forEach(t.nodes(),function(r){var a=t.node(r),s=t.parent(r);(a.rank===o||a.minRank<=o&&o<=a.maxRank)&&(i.setNode(r),i.setParent(r,s||n),Na.forEach(t[e](r),function(c){var u=c.v===r?c.w:c.v,f=i.edge(u,r),g=Na.isUndefined(f)?0:f.weight;i.setEdge(u,r,{weight:t.edge(c).weight+g})}),Na.has(a,"minRank")&&i.setNode(r,{borderLeft:a.borderLeft[o],borderRight:a.borderRight[o]}))}),i}function uoe(t){for(var o;t.hasNode(o=Na.uniqueId("_root")););return o}});var BM=v((Kye,LM)=>{"use strict";var poe=Je();LM.exports=hoe;function hoe(t,o,e){var n={},i;poe.forEach(e,function(r){for(var a=t.parent(r),s,c;a;){if(s=t.parent(a),s?(c=n[s],n[s]=a):(c=i,i=a),c&&c!==a){o.setEdge(c,a);return}a=s}})}});var GM=v((Yye,qM)=>{"use strict";var xi=Je(),foe=CM(),moe=wM(),_oe=FM(),goe=AM(),boe=BM(),voe=un().Graph,VM=Rt();qM.exports=yoe;function yoe(t){var o=VM.maxRank(t),e=zM(t,xi.range(1,o+1),"inEdges"),n=zM(t,xi.range(o-1,-1,-1),"outEdges"),i=foe(t);HM(t,i);for(var r=Number.POSITIVE_INFINITY,a,s=0,c=0;c<4;++s,++c){Coe(s%2?e:n,s%4>=2),i=VM.buildLayerMatrix(t);var u=moe(t,i);u<r&&(c=0,a=xi.cloneDeep(i),r=u)}HM(t,a)}function zM(t,o,e){return xi.map(o,function(n){return goe(t,n,e)})}function Coe(t,o){var e=new voe;xi.forEach(t,function(n){var i=n.graph().root,r=_oe(n,i,e,o);xi.forEach(r.vs,function(a,s){n.node(a).order=s}),boe(n,e,r.vs)})}function HM(t,o){xi.forEach(o,function(e){xi.forEach(e,function(n,i){t.node(n).order=i})})}});var JM=v((Xye,QM)=>{"use strict";var ye=Je(),xoe=un().Graph,woe=Rt();QM.exports={positionX:koe,findType1Conflicts:jM,findType2Conflicts:UM,addConflict:n0,hasConflict:$M,verticalAlignment:WM,horizontalCompaction:KM,alignCoordinates:XM,findSmallestWidthAlignment:YM,balance:ZM};function jM(t,o){var e={};function n(i,r){var a=0,s=0,c=i.length,u=ye.last(r);return ye.forEach(r,function(f,g){var C=Toe(t,f),k=C?t.node(C).order:c;(C||f===u)&&(ye.forEach(r.slice(s,g+1),function(S){ye.forEach(t.predecessors(S),function(F){var q=t.node(F),Y=q.order;(Y<a||k<Y)&&!(q.dummy&&t.node(S).dummy)&&n0(e,F,S)})}),s=g+1,a=k)}),r}return ye.reduce(o,n),e}function UM(t,o){var e={};function n(r,a,s,c,u){var f;ye.forEach(ye.range(a,s),function(g){f=r[g],t.node(f).dummy&&ye.forEach(t.predecessors(f),function(C){var k=t.node(C);k.dummy&&(k.order<c||k.order>u)&&n0(e,C,f)})})}function i(r,a){var s=-1,c,u=0;return ye.forEach(a,function(f,g){if(t.node(f).dummy==="border"){var C=t.predecessors(f);C.length&&(c=t.node(C[0]).order,n(a,u,g,s,c),u=g,s=c)}n(a,u,a.length,c,r.length)}),a}return ye.reduce(o,i),e}function Toe(t,o){if(t.node(o).dummy)return ye.find(t.predecessors(o),function(e){return t.node(e).dummy})}function n0(t,o,e){if(o>e){var n=o;o=e,e=n}var i=t[o];i||(t[o]=i={}),i[e]=!0}function $M(t,o,e){if(o>e){var n=o;o=e,e=n}return ye.has(t[o],e)}function WM(t,o,e,n){var i={},r={},a={};return ye.forEach(o,function(s){ye.forEach(s,function(c,u){i[c]=c,r[c]=c,a[c]=u})}),ye.forEach(o,function(s){var c=-1;ye.forEach(s,function(u){var f=n(u);if(f.length){f=ye.sortBy(f,function(F){return a[F]});for(var g=(f.length-1)/2,C=Math.floor(g),k=Math.ceil(g);C<=k;++C){var S=f[C];r[u]===u&&c<a[S]&&!$M(e,u,S)&&(r[S]=u,r[u]=i[u]=i[S],c=a[S])}}})}),{root:i,align:r}}function KM(t,o,e,n,i){var r={},a=Soe(t,o,e,i),s=i?"borderLeft":"borderRight";function c(g,C){for(var k=a.nodes(),S=k.pop(),F={};S;)F[S]?g(S):(F[S]=!0,k.push(S),k=k.concat(C(S))),S=k.pop()}function u(g){r[g]=a.inEdges(g).reduce(function(C,k){return Math.max(C,r[k.v]+a.edge(k))},0)}function f(g){var C=a.outEdges(g).reduce(function(S,F){return Math.min(S,r[F.w]-a.edge(F))},Number.POSITIVE_INFINITY),k=t.node(g);C!==Number.POSITIVE_INFINITY&&k.borderType!==s&&(r[g]=Math.max(r[g],C))}return c(u,a.predecessors.bind(a)),c(f,a.successors.bind(a)),ye.forEach(n,function(g){r[g]=r[e[g]]}),r}function Soe(t,o,e,n){var i=new xoe,r=t.graph(),a=Ioe(r.nodesep,r.edgesep,n);return ye.forEach(o,function(s){var c;ye.forEach(s,function(u){var f=e[u];if(i.setNode(f),c){var g=e[c],C=i.edge(g,f);i.setEdge(g,f,Math.max(a(t,u,c),C||0))}c=u})}),i}function YM(t,o){return ye.minBy(ye.values(o),function(e){var n=Number.NEGATIVE_INFINITY,i=Number.POSITIVE_INFINITY;return ye.forIn(e,function(r,a){var s=Eoe(t,a)/2;n=Math.max(r+s,n),i=Math.min(r-s,i)}),n-i})}function XM(t,o){var e=ye.values(o),n=ye.min(e),i=ye.max(e);ye.forEach(["u","d"],function(r){ye.forEach(["l","r"],function(a){var s=r+a,c=t[s],u;if(c!==o){var f=ye.values(c);u=a==="l"?n-ye.min(f):i-ye.max(f),u&&(t[s]=ye.mapValues(c,function(g){return g+u}))}})})}function ZM(t,o){return ye.mapValues(t.ul,function(e,n){if(o)return t[o.toLowerCase()][n];var i=ye.sortBy(ye.map(t,n));return(i[1]+i[2])/2})}function koe(t){var o=woe.buildLayerMatrix(t),e=ye.merge(jM(t,o),UM(t,o)),n={},i;ye.forEach(["u","d"],function(a){i=a==="u"?o:ye.values(o).reverse(),ye.forEach(["l","r"],function(s){s==="r"&&(i=ye.map(i,function(g){return ye.values(g).reverse()}));var c=(a==="u"?t.predecessors:t.successors).bind(t),u=WM(t,i,e,c),f=KM(t,i,u.root,u.align,s==="r");s==="r"&&(f=ye.mapValues(f,function(g){return-g})),n[a+s]=f})});var r=YM(t,n);return XM(n,r),ZM(n,t.graph().align)}function Ioe(t,o,e){return function(n,i,r){var a=n.node(i),s=n.node(r),c=0,u;if(c+=a.width/2,ye.has(a,"labelpos"))switch(a.labelpos.toLowerCase()){case"l":u=-a.width/2;break;case"r":u=a.width/2;break}if(u&&(c+=e?u:-u),u=0,c+=(a.dummy?o:t)/2,c+=(s.dummy?o:t)/2,c+=s.width/2,ye.has(s,"labelpos"))switch(s.labelpos.toLowerCase()){case"l":u=s.width/2;break;case"r":u=-s.width/2;break}return u&&(c+=e?u:-u),u=0,c}}function Eoe(t,o){return t.node(o).width}});var nD=v((Zye,tD)=>{"use strict";var Aa=Je(),eD=Rt(),Moe=JM().positionX;tD.exports=Doe;function Doe(t){t=eD.asNonCompoundGraph(t),Poe(t),Aa.forEach(Moe(t),function(o,e){t.node(e).x=o})}function Poe(t){var o=eD.buildLayerMatrix(t),e=t.graph().ranksep,n=0;Aa.forEach(o,function(i){var r=Aa.max(Aa.map(i,function(a){return t.node(a).height}));Aa.forEach(i,function(a){t.node(a).y=n+r/2}),n+=r+e})}});var lD=v((Qye,sD)=>{"use strict";var Me=Je(),iD=zE(),oD=WE(),Roe=sM(),Ooe=Rt().normalizeRanks,Foe=cM(),Noe=Rt().removeEmptyRanks,rD=pM(),Aoe=mM(),aD=vM(),Loe=GM(),Boe=nD(),wi=Rt(),Voe=un().Graph;sD.exports=zoe;function zoe(t,o){var e=o&&o.debugTiming?wi.time:wi.notime;e("layout",function(){var n=e(" buildLayoutGraph",function(){return Zoe(t)});e(" runLayout",function(){Hoe(n,e)}),e(" updateInputGraph",function(){qoe(t,n)})})}function Hoe(t,o){o(" makeSpaceForEdgeLabels",function(){Qoe(t)}),o(" removeSelfEdges",function(){sre(t)}),o(" acyclic",function(){iD.run(t)}),o(" nestingGraph.run",function(){rD.run(t)}),o(" rank",function(){Roe(wi.asNonCompoundGraph(t))}),o(" injectEdgeLabelProxies",function(){Joe(t)}),o(" removeEmptyRanks",function(){Noe(t)}),o(" nestingGraph.cleanup",function(){rD.cleanup(t)}),o(" normalizeRanks",function(){Ooe(t)}),o(" assignRankMinMax",function(){ere(t)}),o(" removeEdgeLabelProxies",function(){tre(t)}),o(" normalize.run",function(){oD.run(t)}),o(" parentDummyChains",function(){Foe(t)}),o(" addBorderSegments",function(){Aoe(t)}),o(" order",function(){Loe(t)}),o(" insertSelfEdges",function(){lre(t)}),o(" adjustCoordinateSystem",function(){aD.adjust(t)}),o(" position",function(){Boe(t)}),o(" positionSelfEdges",function(){cre(t)}),o(" removeBorderNodes",function(){are(t)}),o(" normalize.undo",function(){oD.undo(t)}),o(" fixupEdgeLabelCoords",function(){ore(t)}),o(" undoCoordinateSystem",function(){aD.undo(t)}),o(" translateGraph",function(){nre(t)}),o(" assignNodeIntersects",function(){ire(t)}),o(" reversePoints",function(){rre(t)}),o(" acyclic.undo",function(){iD.undo(t)})}function qoe(t,o){Me.forEach(t.nodes(),function(e){var n=t.node(e),i=o.node(e);n&&(n.x=i.x,n.y=i.y,o.children(e).length&&(n.width=i.width,n.height=i.height))}),Me.forEach(t.edges(),function(e){var n=t.edge(e),i=o.edge(e);n.points=i.points,Me.has(i,"x")&&(n.x=i.x,n.y=i.y)}),t.graph().width=o.graph().width,t.graph().height=o.graph().height}var Goe=["nodesep","edgesep","ranksep","marginx","marginy"],joe={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},Uoe=["acyclicer","ranker","rankdir","align"],$oe=["width","height"],Woe={width:0,height:0},Koe=["minlen","weight","width","height","labeloffset"],Yoe={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},Xoe=["labelpos"];function Zoe(t){var o=new Voe({multigraph:!0,compound:!0}),e=o0(t.graph());return o.setGraph(Me.merge({},joe,i0(e,Goe),Me.pick(e,Uoe))),Me.forEach(t.nodes(),function(n){var i=o0(t.node(n));o.setNode(n,Me.defaults(i0(i,$oe),Woe)),o.setParent(n,t.parent(n))}),Me.forEach(t.edges(),function(n){var i=o0(t.edge(n));o.setEdge(n,Me.merge({},Yoe,i0(i,Koe),Me.pick(i,Xoe)))}),o}function Qoe(t){var o=t.graph();o.ranksep/=2,Me.forEach(t.edges(),function(e){var n=t.edge(e);n.minlen*=2,n.labelpos.toLowerCase()!=="c"&&(o.rankdir==="TB"||o.rankdir==="BT"?n.width+=n.labeloffset:n.height+=n.labeloffset)})}function Joe(t){Me.forEach(t.edges(),function(o){var e=t.edge(o);if(e.width&&e.height){var n=t.node(o.v),i=t.node(o.w),r={rank:(i.rank-n.rank)/2+n.rank,e:o};wi.addDummyNode(t,"edge-proxy",r,"_ep")}})}function ere(t){var o=0;Me.forEach(t.nodes(),function(e){var n=t.node(e);n.borderTop&&(n.minRank=t.node(n.borderTop).rank,n.maxRank=t.node(n.borderBottom).rank,o=Me.max(o,n.maxRank))}),t.graph().maxRank=o}function tre(t){Me.forEach(t.nodes(),function(o){var e=t.node(o);e.dummy==="edge-proxy"&&(t.edge(e.e).labelRank=e.rank,t.removeNode(o))})}function nre(t){var o=Number.POSITIVE_INFINITY,e=0,n=Number.POSITIVE_INFINITY,i=0,r=t.graph(),a=r.marginx||0,s=r.marginy||0;function c(u){var f=u.x,g=u.y,C=u.width,k=u.height;o=Math.min(o,f-C/2),e=Math.max(e,f+C/2),n=Math.min(n,g-k/2),i=Math.max(i,g+k/2)}Me.forEach(t.nodes(),function(u){c(t.node(u))}),Me.forEach(t.edges(),function(u){var f=t.edge(u);Me.has(f,"x")&&c(f)}),o-=a,n-=s,Me.forEach(t.nodes(),function(u){var f=t.node(u);f.x-=o,f.y-=n}),Me.forEach(t.edges(),function(u){var f=t.edge(u);Me.forEach(f.points,function(g){g.x-=o,g.y-=n}),Me.has(f,"x")&&(f.x-=o),Me.has(f,"y")&&(f.y-=n)}),r.width=e-o+a,r.height=i-n+s}function ire(t){Me.forEach(t.edges(),function(o){var e=t.edge(o),n=t.node(o.v),i=t.node(o.w),r,a;e.points?(r=e.points[0],a=e.points[e.points.length-1]):(e.points=[],r=i,a=n),e.points.unshift(wi.intersectRect(n,r)),e.points.push(wi.intersectRect(i,a))})}function ore(t){Me.forEach(t.edges(),function(o){var e=t.edge(o);if(Me.has(e,"x"))switch((e.labelpos==="l"||e.labelpos==="r")&&(e.width-=e.labeloffset),e.labelpos){case"l":e.x-=e.width/2+e.labeloffset;break;case"r":e.x+=e.width/2+e.labeloffset;break}})}function rre(t){Me.forEach(t.edges(),function(o){var e=t.edge(o);e.reversed&&e.points.reverse()})}function are(t){Me.forEach(t.nodes(),function(o){if(t.children(o).length){var e=t.node(o),n=t.node(e.borderTop),i=t.node(e.borderBottom),r=t.node(Me.last(e.borderLeft)),a=t.node(Me.last(e.borderRight));e.width=Math.abs(a.x-r.x),e.height=Math.abs(i.y-n.y),e.x=r.x+e.width/2,e.y=n.y+e.height/2}}),Me.forEach(t.nodes(),function(o){t.node(o).dummy==="border"&&t.removeNode(o)})}function sre(t){Me.forEach(t.edges(),function(o){if(o.v===o.w){var e=t.node(o.v);e.selfEdges||(e.selfEdges=[]),e.selfEdges.push({e:o,label:t.edge(o)}),t.removeEdge(o)}})}function lre(t){var o=wi.buildLayerMatrix(t);Me.forEach(o,function(e){var n=0;Me.forEach(e,function(i,r){var a=t.node(i);a.order=r+n,Me.forEach(a.selfEdges,function(s){wi.addDummyNode(t,"selfedge",{width:s.label.width,height:s.label.height,rank:a.rank,order:r+ ++n,e:s.e,label:s.label},"_se")}),delete a.selfEdges})})}function cre(t){Me.forEach(t.nodes(),function(o){var e=t.node(o);if(e.dummy==="selfedge"){var n=t.node(e.e.v),i=n.x+n.width/2,r=n.y,a=e.x-i,s=n.height/2;t.setEdge(e.e,e.label),t.removeNode(o),e.label.points=[{x:i+2*a/3,y:r-s},{x:i+5*a/6,y:r-s},{x:i+a,y:r},{x:i+5*a/6,y:r+s},{x:i+2*a/3,y:r+s}],e.label.x=e.x,e.label.y=e.y}})}function i0(t,o){return Me.mapValues(Me.pick(t,o),Number)}function o0(t){var o={};return Me.forEach(t,function(e,n){o[n.toLowerCase()]=e}),o}});var dD=v((Jye,cD)=>{"use strict";var lf=Je(),dre=Rt(),ure=un().Graph;cD.exports={debugOrdering:pre};function pre(t){var o=dre.buildLayerMatrix(t),e=new ure({compound:!0,multigraph:!0}).setGraph({});return lf.forEach(t.nodes(),function(n){e.setNode(n,{label:n}),e.setParent(n,"layer"+t.node(n).rank)}),lf.forEach(t.edges(),function(n){e.setEdge(n.v,n.w,{},n.name)}),lf.forEach(o,function(n,i){var r="layer"+i;e.setNode(r,{rank:"same"}),lf.reduce(n,function(a,s){return e.setEdge(a,s,{style:"invis"}),s})}),e}});var pD=v((eCe,uD)=>{"use strict";uD.exports="0.8.5"});var fD=v((tCe,hD)=>{"use strict";hD.exports={graphlib:un(),layout:lD(),debug:dD(),util:{time:Rt().time,notime:Rt().notime},version:pD()}});var wb={rail:{label:"Files",collapse:"Collapse files panel",expand:"Expand files panel",resize:"Resize files panel",searchPlaceholder:"Search\u2026",searchAriaLabel:"Search nodes by name or tag"}};var ms=new ge("MAP_ISOLATE_INTENT",{providedIn:"root",factory:()=>({isolate:()=>{}})});var Tb=`
2
+ .p-datatable {
3
+ position: relative;
4
+ display: block;
5
+ }
6
+
7
+ .p-datatable-table {
8
+ border-spacing: 0;
9
+ border-collapse: separate;
10
+ width: 100%;
11
+ }
12
+
13
+ .p-datatable-scrollable > .p-datatable-table-container {
14
+ position: relative;
15
+ }
16
+
17
+ .p-datatable-scrollable-table > .p-datatable-thead {
18
+ inset-block-start: 0;
19
+ z-index: 1;
20
+ }
21
+
22
+ .p-datatable-scrollable-table > .p-datatable-frozen-tbody {
23
+ position: sticky;
24
+ z-index: 1;
25
+ }
26
+
27
+ .p-datatable-scrollable-table > .p-datatable-tfoot {
28
+ inset-block-end: 0;
29
+ z-index: 1;
30
+ }
31
+
32
+ .p-datatable-scrollable .p-datatable-frozen-column {
33
+ position: sticky;
34
+ }
35
+
36
+ .p-datatable-scrollable th.p-datatable-frozen-column {
37
+ z-index: 1;
38
+ }
39
+
40
+ .p-datatable-scrollable td.p-datatable-frozen-column {
41
+ background: inherit;
42
+ }
43
+
44
+ .p-datatable-scrollable > .p-datatable-table-container > .p-datatable-table > .p-datatable-thead,
45
+ .p-datatable-scrollable > .p-datatable-table-container > .p-virtualscroller > .p-datatable-table > .p-datatable-thead {
46
+ background: dt('datatable.header.cell.background');
47
+ }
48
+
49
+ .p-datatable-scrollable > .p-datatable-table-container > .p-datatable-table > .p-datatable-tfoot,
50
+ .p-datatable-scrollable > .p-datatable-table-container > .p-virtualscroller > .p-datatable-table > .p-datatable-tfoot {
51
+ background: dt('datatable.footer.cell.background');
52
+ }
53
+
54
+ .p-datatable-flex-scrollable {
55
+ display: flex;
56
+ flex-direction: column;
57
+ height: 100%;
58
+ }
59
+
60
+ .p-datatable-flex-scrollable > .p-datatable-table-container {
61
+ display: flex;
62
+ flex-direction: column;
63
+ flex: 1;
64
+ height: 100%;
65
+ }
66
+
67
+ .p-datatable-scrollable-table > .p-datatable-tbody > .p-datatable-row-group-header {
68
+ position: sticky;
69
+ z-index: 1;
70
+ }
71
+
72
+ .p-datatable-resizable-table > .p-datatable-thead > tr > th,
73
+ .p-datatable-resizable-table > .p-datatable-tfoot > tr > td,
74
+ .p-datatable-resizable-table > .p-datatable-tbody > tr > td {
75
+ overflow: hidden;
76
+ white-space: nowrap;
77
+ }
78
+
79
+ .p-datatable-resizable-table > .p-datatable-thead > tr > th.p-datatable-resizable-column:not(.p-datatable-frozen-column) {
80
+ background-clip: padding-box;
81
+ position: relative;
82
+ }
83
+
84
+ .p-datatable-resizable-table-fit > .p-datatable-thead > tr > th.p-datatable-resizable-column:last-child .p-datatable-column-resizer {
85
+ display: none;
86
+ }
87
+
88
+ .p-datatable-column-resizer {
89
+ display: block;
90
+ position: absolute;
91
+ inset-block-start: 0;
92
+ inset-inline-end: 0;
93
+ margin: 0;
94
+ width: dt('datatable.column.resizer.width');
95
+ height: 100%;
96
+ padding: 0;
97
+ cursor: col-resize;
98
+ border: 1px solid transparent;
99
+ }
100
+
101
+ .p-datatable-column-header-content {
102
+ display: flex;
103
+ align-items: center;
104
+ gap: dt('datatable.header.cell.gap');
105
+ }
106
+
107
+ .p-datatable-column-resize-indicator {
108
+ width: dt('datatable.resize.indicator.width');
109
+ position: absolute;
110
+ z-index: 10;
111
+ display: none;
112
+ background: dt('datatable.resize.indicator.color');
113
+ }
114
+
115
+ .p-datatable-row-reorder-indicator-up,
116
+ .p-datatable-row-reorder-indicator-down {
117
+ position: absolute;
118
+ display: none;
119
+ }
120
+
121
+ .p-datatable-reorderable-column,
122
+ .p-datatable-reorderable-row-handle {
123
+ cursor: move;
124
+ }
125
+
126
+ .p-datatable-mask {
127
+ position: absolute;
128
+ display: flex;
129
+ align-items: center;
130
+ justify-content: center;
131
+ z-index: 2;
132
+ }
133
+
134
+ .p-datatable-inline-filter {
135
+ display: flex;
136
+ align-items: center;
137
+ width: 100%;
138
+ gap: dt('datatable.filter.inline.gap');
139
+ }
140
+
141
+ .p-datatable-inline-filter .p-datatable-filter-element-container {
142
+ flex: 1 1 auto;
143
+ width: 1%;
144
+ }
145
+
146
+ .p-datatable-filter-overlay {
147
+ background: dt('datatable.filter.overlay.select.background');
148
+ color: dt('datatable.filter.overlay.select.color');
149
+ border: 1px solid dt('datatable.filter.overlay.select.border.color');
150
+ border-radius: dt('datatable.filter.overlay.select.border.radius');
151
+ box-shadow: dt('datatable.filter.overlay.select.shadow');
152
+ min-width: 12.5rem;
153
+ }
154
+
155
+ .p-datatable-filter-constraint-list {
156
+ margin: 0;
157
+ list-style: none;
158
+ display: flex;
159
+ flex-direction: column;
160
+ padding: dt('datatable.filter.constraint.list.padding');
161
+ gap: dt('datatable.filter.constraint.list.gap');
162
+ }
163
+
164
+ .p-datatable-filter-constraint {
165
+ padding: dt('datatable.filter.constraint.padding');
166
+ color: dt('datatable.filter.constraint.color');
167
+ border-radius: dt('datatable.filter.constraint.border.radius');
168
+ cursor: pointer;
169
+ transition:
170
+ background dt('datatable.transition.duration'),
171
+ color dt('datatable.transition.duration'),
172
+ border-color dt('datatable.transition.duration'),
173
+ box-shadow dt('datatable.transition.duration');
174
+ }
175
+
176
+ .p-datatable-filter-constraint-selected {
177
+ background: dt('datatable.filter.constraint.selected.background');
178
+ color: dt('datatable.filter.constraint.selected.color');
179
+ }
180
+
181
+ .p-datatable-filter-constraint:not(.p-datatable-filter-constraint-selected):not(.p-disabled):hover {
182
+ background: dt('datatable.filter.constraint.focus.background');
183
+ color: dt('datatable.filter.constraint.focus.color');
184
+ }
185
+
186
+ .p-datatable-filter-constraint:focus-visible {
187
+ outline: 0 none;
188
+ background: dt('datatable.filter.constraint.focus.background');
189
+ color: dt('datatable.filter.constraint.focus.color');
190
+ }
191
+
192
+ .p-datatable-filter-constraint-selected:focus-visible {
193
+ outline: 0 none;
194
+ background: dt('datatable.filter.constraint.selected.focus.background');
195
+ color: dt('datatable.filter.constraint.selected.focus.color');
196
+ }
197
+
198
+ .p-datatable-filter-constraint-separator {
199
+ border-block-start: 1px solid dt('datatable.filter.constraint.separator.border.color');
200
+ }
201
+
202
+ .p-datatable-popover-filter {
203
+ display: inline-flex;
204
+ margin-inline-start: auto;
205
+ }
206
+
207
+ .p-datatable-filter-overlay-popover {
208
+ background: dt('datatable.filter.overlay.popover.background');
209
+ color: dt('datatable.filter.overlay.popover.color');
210
+ border: 1px solid dt('datatable.filter.overlay.popover.border.color');
211
+ border-radius: dt('datatable.filter.overlay.popover.border.radius');
212
+ box-shadow: dt('datatable.filter.overlay.popover.shadow');
213
+ min-width: 12.5rem;
214
+ padding: dt('datatable.filter.overlay.popover.padding');
215
+ display: flex;
216
+ flex-direction: column;
217
+ gap: dt('datatable.filter.overlay.popover.gap');
218
+ }
219
+
220
+ .p-datatable-filter-operator-dropdown {
221
+ width: 100%;
222
+ }
223
+
224
+ .p-datatable-filter-rule-list,
225
+ .p-datatable-filter-rule {
226
+ display: flex;
227
+ flex-direction: column;
228
+ gap: dt('datatable.filter.overlay.popover.gap');
229
+ }
230
+
231
+ .p-datatable-filter-rule {
232
+ border-block-end: 1px solid dt('datatable.filter.rule.border.color');
233
+ padding-bottom: dt('datatable.filter.overlay.popover.gap');
234
+ }
235
+
236
+ .p-datatable-filter-rule:last-child {
237
+ border-block-end: 0 none;
238
+ padding-bottom: 0;
239
+ }
240
+
241
+ .p-datatable-filter-add-rule-button {
242
+ width: 100%;
243
+ }
244
+
245
+ .p-datatable-filter-remove-rule-button {
246
+ width: 100%;
247
+ }
248
+
249
+ .p-datatable-filter-buttonbar {
250
+ padding: 0;
251
+ display: flex;
252
+ align-items: center;
253
+ justify-content: space-between;
254
+ }
255
+
256
+ .p-datatable-virtualscroller-spacer {
257
+ display: flex;
258
+ }
259
+
260
+ .p-datatable .p-virtualscroller .p-virtualscroller-loading {
261
+ transform: none !important;
262
+ min-height: 0;
263
+ position: sticky;
264
+ inset-block-start: 0;
265
+ inset-inline-start: 0;
266
+ }
267
+
268
+ .p-datatable-paginator-top {
269
+ border-color: dt('datatable.paginator.top.border.color');
270
+ border-style: solid;
271
+ border-width: dt('datatable.paginator.top.border.width');
272
+ }
273
+
274
+ .p-datatable-paginator-bottom {
275
+ border-color: dt('datatable.paginator.bottom.border.color');
276
+ border-style: solid;
277
+ border-width: dt('datatable.paginator.bottom.border.width');
278
+ }
279
+
280
+ .p-datatable-header {
281
+ background: dt('datatable.header.background');
282
+ color: dt('datatable.header.color');
283
+ border-color: dt('datatable.header.border.color');
284
+ border-style: solid;
285
+ border-width: dt('datatable.header.border.width');
286
+ padding: dt('datatable.header.padding');
287
+ }
288
+
289
+ .p-datatable-footer {
290
+ background: dt('datatable.footer.background');
291
+ color: dt('datatable.footer.color');
292
+ border-color: dt('datatable.footer.border.color');
293
+ border-style: solid;
294
+ border-width: dt('datatable.footer.border.width');
295
+ padding: dt('datatable.footer.padding');
296
+ }
297
+
298
+ .p-datatable-header-cell {
299
+ padding: dt('datatable.header.cell.padding');
300
+ background: dt('datatable.header.cell.background');
301
+ border-color: dt('datatable.header.cell.border.color');
302
+ border-style: solid;
303
+ border-width: 0 0 1px 0;
304
+ color: dt('datatable.header.cell.color');
305
+ font-weight: normal;
306
+ text-align: start;
307
+ transition:
308
+ background dt('datatable.transition.duration'),
309
+ color dt('datatable.transition.duration'),
310
+ border-color dt('datatable.transition.duration'),
311
+ outline-color dt('datatable.transition.duration'),
312
+ box-shadow dt('datatable.transition.duration');
313
+ }
314
+
315
+ .p-datatable-column-title {
316
+ font-weight: dt('datatable.column.title.font.weight');
317
+ }
318
+
319
+ .p-datatable-tbody > tr {
320
+ outline-color: transparent;
321
+ background: dt('datatable.row.background');
322
+ color: dt('datatable.row.color');
323
+ transition:
324
+ background dt('datatable.transition.duration'),
325
+ color dt('datatable.transition.duration'),
326
+ border-color dt('datatable.transition.duration'),
327
+ outline-color dt('datatable.transition.duration'),
328
+ box-shadow dt('datatable.transition.duration');
329
+ }
330
+
331
+ .p-datatable-tbody > tr > td {
332
+ text-align: start;
333
+ border-color: dt('datatable.body.cell.border.color');
334
+ border-style: solid;
335
+ border-width: 0 0 1px 0;
336
+ padding: dt('datatable.body.cell.padding');
337
+ }
338
+
339
+ .p-datatable-hoverable .p-datatable-tbody > tr:not(.p-datatable-row-selected):hover {
340
+ background: dt('datatable.row.hover.background');
341
+ color: dt('datatable.row.hover.color');
342
+ }
343
+
344
+ .p-datatable-tbody > tr.p-datatable-row-selected {
345
+ background: dt('datatable.row.selected.background');
346
+ color: dt('datatable.row.selected.color');
347
+ }
348
+
349
+ .p-datatable-tbody > tr:has(+ .p-datatable-row-selected) > td {
350
+ border-block-end-color: dt('datatable.body.cell.selected.border.color');
351
+ }
352
+
353
+ .p-datatable-tbody > tr.p-datatable-row-selected > td {
354
+ border-block-end-color: dt('datatable.body.cell.selected.border.color');
355
+ }
356
+
357
+ .p-datatable-tbody > tr:focus-visible,
358
+ .p-datatable-tbody > tr.p-datatable-contextmenu-row-selected {
359
+ box-shadow: dt('datatable.row.focus.ring.shadow');
360
+ outline: dt('datatable.row.focus.ring.width') dt('datatable.row.focus.ring.style') dt('datatable.row.focus.ring.color');
361
+ outline-offset: dt('datatable.row.focus.ring.offset');
362
+ }
363
+
364
+ .p-datatable-tfoot > tr > td {
365
+ text-align: start;
366
+ padding: dt('datatable.footer.cell.padding');
367
+ border-color: dt('datatable.footer.cell.border.color');
368
+ border-style: solid;
369
+ border-width: 0 0 1px 0;
370
+ color: dt('datatable.footer.cell.color');
371
+ background: dt('datatable.footer.cell.background');
372
+ }
373
+
374
+ .p-datatable-column-footer {
375
+ font-weight: dt('datatable.column.footer.font.weight');
376
+ }
377
+
378
+ .p-datatable-sortable-column {
379
+ cursor: pointer;
380
+ user-select: none;
381
+ outline-color: transparent;
382
+ }
383
+
384
+ .p-datatable-column-title,
385
+ .p-datatable-sort-icon,
386
+ .p-datatable-sort-badge {
387
+ vertical-align: middle;
388
+ }
389
+
390
+ .p-datatable-sort-icon {
391
+ color: dt('datatable.sort.icon.color');
392
+ font-size: dt('datatable.sort.icon.size');
393
+ width: dt('datatable.sort.icon.size');
394
+ height: dt('datatable.sort.icon.size');
395
+ transition: color dt('datatable.transition.duration');
396
+ }
397
+
398
+ .p-datatable-sortable-column:not(.p-datatable-column-sorted):hover {
399
+ background: dt('datatable.header.cell.hover.background');
400
+ color: dt('datatable.header.cell.hover.color');
401
+ }
402
+
403
+ .p-datatable-sortable-column:not(.p-datatable-column-sorted):hover .p-datatable-sort-icon {
404
+ color: dt('datatable.sort.icon.hover.color');
405
+ }
406
+
407
+ .p-datatable-column-sorted {
408
+ background: dt('datatable.header.cell.selected.background');
409
+ color: dt('datatable.header.cell.selected.color');
410
+ }
411
+
412
+ .p-datatable-column-sorted .p-datatable-sort-icon {
413
+ color: dt('datatable.header.cell.selected.color');
414
+ }
415
+
416
+ .p-datatable-sortable-column:focus-visible {
417
+ box-shadow: dt('datatable.header.cell.focus.ring.shadow');
418
+ outline: dt('datatable.header.cell.focus.ring.width') dt('datatable.header.cell.focus.ring.style') dt('datatable.header.cell.focus.ring.color');
419
+ outline-offset: dt('datatable.header.cell.focus.ring.offset');
420
+ }
421
+
422
+ .p-datatable-hoverable .p-datatable-selectable-row {
423
+ cursor: pointer;
424
+ }
425
+
426
+ .p-datatable-tbody > tr.p-datatable-dragpoint-top > td {
427
+ box-shadow: inset 0 2px 0 0 dt('datatable.drop.point.color');
428
+ }
429
+
430
+ .p-datatable-tbody > tr.p-datatable-dragpoint-bottom > td {
431
+ box-shadow: inset 0 -2px 0 0 dt('datatable.drop.point.color');
432
+ }
433
+
434
+ .p-datatable-loading-icon {
435
+ font-size: dt('datatable.loading.icon.size');
436
+ width: dt('datatable.loading.icon.size');
437
+ height: dt('datatable.loading.icon.size');
438
+ }
439
+
440
+ .p-datatable-gridlines .p-datatable-header {
441
+ border-width: 1px 1px 0 1px;
442
+ }
443
+
444
+ .p-datatable-gridlines .p-datatable-footer {
445
+ border-width: 0 1px 1px 1px;
446
+ }
447
+
448
+ .p-datatable-gridlines .p-datatable-paginator-top {
449
+ border-width: 1px 1px 0 1px;
450
+ }
451
+
452
+ .p-datatable-gridlines .p-datatable-paginator-bottom {
453
+ border-width: 0 1px 1px 1px;
454
+ }
455
+
456
+ .p-datatable-gridlines .p-datatable-thead > tr > th {
457
+ border-width: 1px 0 1px 1px;
458
+ }
459
+
460
+ .p-datatable-gridlines .p-datatable-thead > tr > th:last-child {
461
+ border-width: 1px;
462
+ }
463
+
464
+ .p-datatable-gridlines .p-datatable-tbody > tr > td {
465
+ border-width: 1px 0 0 1px;
466
+ }
467
+
468
+ .p-datatable-gridlines .p-datatable-tbody > tr > td:last-child {
469
+ border-width: 1px 1px 0 1px;
470
+ }
471
+
472
+ .p-datatable-gridlines .p-datatable-tbody > tr:last-child > td {
473
+ border-width: 1px 0 1px 1px;
474
+ }
475
+
476
+ .p-datatable-gridlines .p-datatable-tbody > tr:last-child > td:last-child {
477
+ border-width: 1px;
478
+ }
479
+
480
+ .p-datatable-gridlines .p-datatable-tfoot > tr > td {
481
+ border-width: 1px 0 1px 1px;
482
+ }
483
+
484
+ .p-datatable-gridlines .p-datatable-tfoot > tr > td:last-child {
485
+ border-width: 1px 1px 1px 1px;
486
+ }
487
+
488
+ .p-datatable.p-datatable-gridlines .p-datatable-thead + .p-datatable-tfoot > tr > td {
489
+ border-width: 0 0 1px 1px;
490
+ }
491
+
492
+ .p-datatable.p-datatable-gridlines .p-datatable-thead + .p-datatable-tfoot > tr > td:last-child {
493
+ border-width: 0 1px 1px 1px;
494
+ }
495
+
496
+ .p-datatable.p-datatable-gridlines:has(.p-datatable-thead):has(.p-datatable-tbody) .p-datatable-tbody > tr > td {
497
+ border-width: 0 0 1px 1px;
498
+ }
499
+
500
+ .p-datatable.p-datatable-gridlines:has(.p-datatable-thead):has(.p-datatable-tbody) .p-datatable-tbody > tr > td:last-child {
501
+ border-width: 0 1px 1px 1px;
502
+ }
503
+
504
+ .p-datatable.p-datatable-gridlines:has(.p-datatable-tbody):has(.p-datatable-tfoot) .p-datatable-tbody > tr:last-child > td {
505
+ border-width: 0 0 0 1px;
506
+ }
507
+
508
+ .p-datatable.p-datatable-gridlines:has(.p-datatable-tbody):has(.p-datatable-tfoot) .p-datatable-tbody > tr:last-child > td:last-child {
509
+ border-width: 0 1px 0 1px;
510
+ }
511
+
512
+ .p-datatable.p-datatable-striped .p-datatable-tbody > tr.p-row-odd {
513
+ background: dt('datatable.row.striped.background');
514
+ }
515
+
516
+ .p-datatable.p-datatable-striped .p-datatable-tbody > tr.p-row-odd.p-datatable-row-selected {
517
+ background: dt('datatable.row.selected.background');
518
+ color: dt('datatable.row.selected.color');
519
+ }
520
+
521
+ .p-datatable-striped.p-datatable-hoverable .p-datatable-tbody > tr:not(.p-datatable-row-selected):hover {
522
+ background: dt('datatable.row.hover.background');
523
+ color: dt('datatable.row.hover.color');
524
+ }
525
+
526
+ .p-datatable.p-datatable-sm .p-datatable-header {
527
+ padding: dt('datatable.header.sm.padding');
528
+ }
529
+
530
+ .p-datatable.p-datatable-sm .p-datatable-thead > tr > th {
531
+ padding: dt('datatable.header.cell.sm.padding');
532
+ }
533
+
534
+ .p-datatable.p-datatable-sm .p-datatable-tbody > tr > td {
535
+ padding: dt('datatable.body.cell.sm.padding');
536
+ }
537
+
538
+ .p-datatable.p-datatable-sm .p-datatable-tfoot > tr > td {
539
+ padding: dt('datatable.footer.cell.sm.padding');
540
+ }
541
+
542
+ .p-datatable.p-datatable-sm .p-datatable-footer {
543
+ padding: dt('datatable.footer.sm.padding');
544
+ }
545
+
546
+ .p-datatable.p-datatable-lg .p-datatable-header {
547
+ padding: dt('datatable.header.lg.padding');
548
+ }
549
+
550
+ .p-datatable.p-datatable-lg .p-datatable-thead > tr > th {
551
+ padding: dt('datatable.header.cell.lg.padding');
552
+ }
553
+
554
+ .p-datatable.p-datatable-lg .p-datatable-tbody > tr > td {
555
+ padding: dt('datatable.body.cell.lg.padding');
556
+ }
557
+
558
+ .p-datatable.p-datatable-lg .p-datatable-tfoot > tr > td {
559
+ padding: dt('datatable.footer.cell.lg.padding');
560
+ }
561
+
562
+ .p-datatable.p-datatable-lg .p-datatable-footer {
563
+ padding: dt('datatable.footer.lg.padding');
564
+ }
565
+
566
+ .p-datatable-row-toggle-button {
567
+ display: inline-flex;
568
+ align-items: center;
569
+ justify-content: center;
570
+ overflow: hidden;
571
+ position: relative;
572
+ width: dt('datatable.row.toggle.button.size');
573
+ height: dt('datatable.row.toggle.button.size');
574
+ color: dt('datatable.row.toggle.button.color');
575
+ border: 0 none;
576
+ background: transparent;
577
+ cursor: pointer;
578
+ border-radius: dt('datatable.row.toggle.button.border.radius');
579
+ transition:
580
+ background dt('datatable.transition.duration'),
581
+ color dt('datatable.transition.duration'),
582
+ border-color dt('datatable.transition.duration'),
583
+ outline-color dt('datatable.transition.duration'),
584
+ box-shadow dt('datatable.transition.duration');
585
+ outline-color: transparent;
586
+ user-select: none;
587
+ }
588
+
589
+ .p-datatable-row-toggle-button:enabled:hover {
590
+ color: dt('datatable.row.toggle.button.hover.color');
591
+ background: dt('datatable.row.toggle.button.hover.background');
592
+ }
593
+
594
+ .p-datatable-tbody > tr.p-datatable-row-selected .p-datatable-row-toggle-button:hover {
595
+ background: dt('datatable.row.toggle.button.selected.hover.background');
596
+ color: dt('datatable.row.toggle.button.selected.hover.color');
597
+ }
598
+
599
+ .p-datatable-row-toggle-button:focus-visible {
600
+ box-shadow: dt('datatable.row.toggle.button.focus.ring.shadow');
601
+ outline: dt('datatable.row.toggle.button.focus.ring.width') dt('datatable.row.toggle.button.focus.ring.style') dt('datatable.row.toggle.button.focus.ring.color');
602
+ outline-offset: dt('datatable.row.toggle.button.focus.ring.offset');
603
+ }
604
+
605
+ .p-datatable-row-toggle-icon:dir(rtl) {
606
+ transform: rotate(180deg);
607
+ }
608
+ `;var ZP=["data-p-icon","angle-double-left"],Sb=(()=>{class t extends Te{static \u0275fac=(()=>{let e;return function(i){return(e||(e=G(t)))(i||t)}})();static \u0275cmp=z({type:t,selectors:[["","data-p-icon","angle-double-left"]],features:[Z],attrs:ZP,decls:1,vars:0,consts:[["fill-rule","evenodd","clip-rule","evenodd","d","M5.71602 11.164C5.80782 11.2021 5.9063 11.2215 6.00569 11.221C6.20216 11.2301 6.39427 11.1612 6.54025 11.0294C6.68191 10.8875 6.76148 10.6953 6.76148 10.4948C6.76148 10.2943 6.68191 10.1021 6.54025 9.96024L3.51441 6.9344L6.54025 3.90855C6.624 3.76126 6.65587 3.59011 6.63076 3.42254C6.60564 3.25498 6.525 3.10069 6.40175 2.98442C6.2785 2.86815 6.11978 2.79662 5.95104 2.7813C5.78229 2.76598 5.61329 2.80776 5.47112 2.89994L1.97123 6.39983C1.82957 6.54167 1.75 6.73393 1.75 6.9344C1.75 7.13486 1.82957 7.32712 1.97123 7.46896L5.47112 10.9991C5.54096 11.0698 5.62422 11.1259 5.71602 11.164ZM11.0488 10.9689C11.1775 11.1156 11.3585 11.2061 11.5531 11.221C11.7477 11.2061 11.9288 11.1156 12.0574 10.9689C12.1815 10.8302 12.25 10.6506 12.25 10.4645C12.25 10.2785 12.1815 10.0989 12.0574 9.96024L9.03158 6.93439L12.0574 3.90855C12.1248 3.76739 12.1468 3.60881 12.1204 3.45463C12.0939 3.30045 12.0203 3.15826 11.9097 3.04765C11.7991 2.93703 11.6569 2.86343 11.5027 2.83698C11.3486 2.81053 11.19 2.83252 11.0488 2.89994L7.51865 6.36957C7.37699 6.51141 7.29742 6.70367 7.29742 6.90414C7.29742 7.1046 7.37699 7.29686 7.51865 7.4387L11.0488 10.9689Z","fill","currentColor"]],template:function(n,i){n&1&&($(),ie(0,"path",0))},encapsulation:2})}return t})();var QP=["data-p-icon","angle-double-right"],kb=(()=>{class t extends Te{static \u0275fac=(()=>{let e;return function(i){return(e||(e=G(t)))(i||t)}})();static \u0275cmp=z({type:t,selectors:[["","data-p-icon","angle-double-right"]],features:[Z],attrs:QP,decls:1,vars:0,consts:[["fill-rule","evenodd","clip-rule","evenodd","d","M7.68757 11.1451C7.7791 11.1831 7.8773 11.2024 7.9764 11.2019C8.07769 11.1985 8.17721 11.1745 8.26886 11.1312C8.36052 11.088 8.44238 11.0265 8.50943 10.9505L12.0294 7.49085C12.1707 7.34942 12.25 7.15771 12.25 6.95782C12.25 6.75794 12.1707 6.56622 12.0294 6.42479L8.50943 2.90479C8.37014 2.82159 8.20774 2.78551 8.04633 2.80192C7.88491 2.81833 7.73309 2.88635 7.6134 2.99588C7.4937 3.10541 7.41252 3.25061 7.38189 3.40994C7.35126 3.56927 7.37282 3.73423 7.44337 3.88033L10.4605 6.89748L7.44337 9.91463C7.30212 10.0561 7.22278 10.2478 7.22278 10.4477C7.22278 10.6475 7.30212 10.8393 7.44337 10.9807C7.51301 11.0512 7.59603 11.1071 7.68757 11.1451ZM1.94207 10.9505C2.07037 11.0968 2.25089 11.1871 2.44493 11.2019C2.63898 11.1871 2.81949 11.0968 2.94779 10.9505L6.46779 7.49085C6.60905 7.34942 6.68839 7.15771 6.68839 6.95782C6.68839 6.75793 6.60905 6.56622 6.46779 6.42479L2.94779 2.90479C2.80704 2.83757 2.6489 2.81563 2.49517 2.84201C2.34143 2.86839 2.19965 2.94178 2.08936 3.05207C1.97906 3.16237 1.90567 3.30415 1.8793 3.45788C1.85292 3.61162 1.87485 3.76975 1.94207 3.9105L4.95922 6.92765L1.94207 9.9448C1.81838 10.0831 1.75 10.2621 1.75 10.4477C1.75 10.6332 1.81838 10.8122 1.94207 10.9505Z","fill","currentColor"]],template:function(n,i){n&1&&($(),ie(0,"path",0))},encapsulation:2})}return t})();var JP=["data-p-icon","angle-down"],Ib=(()=>{class t extends Te{static \u0275fac=(()=>{let e;return function(i){return(e||(e=G(t)))(i||t)}})();static \u0275cmp=z({type:t,selectors:[["","data-p-icon","angle-down"]],features:[Z],attrs:JP,decls:1,vars:0,consts:[["d","M3.58659 4.5007C3.68513 4.50023 3.78277 4.51945 3.87379 4.55723C3.9648 4.59501 4.04735 4.65058 4.11659 4.7207L7.11659 7.7207L10.1166 4.7207C10.2619 4.65055 10.4259 4.62911 10.5843 4.65956C10.7427 4.69002 10.8871 4.77074 10.996 4.88976C11.1049 5.00877 11.1726 5.15973 11.1889 5.32022C11.2052 5.48072 11.1693 5.6422 11.0866 5.7807L7.58659 9.2807C7.44597 9.42115 7.25534 9.50004 7.05659 9.50004C6.85784 9.50004 6.66722 9.42115 6.52659 9.2807L3.02659 5.7807C2.88614 5.64007 2.80725 5.44945 2.80725 5.2507C2.80725 5.05195 2.88614 4.86132 3.02659 4.7207C3.09932 4.64685 3.18675 4.58911 3.28322 4.55121C3.37969 4.51331 3.48305 4.4961 3.58659 4.5007Z","fill","currentColor"]],template:function(n,i){n&1&&($(),ie(0,"path",0))},encapsulation:2})}return t})();var e3=["data-p-icon","angle-left"],Eb=(()=>{class t extends Te{static \u0275fac=(()=>{let e;return function(i){return(e||(e=G(t)))(i||t)}})();static \u0275cmp=z({type:t,selectors:[["","data-p-icon","angle-left"]],features:[Z],attrs:e3,decls:1,vars:0,consts:[["d","M8.75 11.185C8.65146 11.1854 8.55381 11.1662 8.4628 11.1284C8.37179 11.0906 8.28924 11.0351 8.22 10.965L4.72 7.46496C4.57955 7.32433 4.50066 7.13371 4.50066 6.93496C4.50066 6.73621 4.57955 6.54558 4.72 6.40496L8.22 2.93496C8.36095 2.84357 8.52851 2.80215 8.69582 2.81733C8.86312 2.83252 9.02048 2.90344 9.14268 3.01872C9.26487 3.134 9.34483 3.28696 9.36973 3.4531C9.39463 3.61924 9.36303 3.78892 9.28 3.93496L6.28 6.93496L9.28 9.93496C9.42045 10.0756 9.49934 10.2662 9.49934 10.465C9.49934 10.6637 9.42045 10.8543 9.28 10.995C9.13526 11.1257 8.9448 11.1939 8.75 11.185Z","fill","currentColor"]],template:function(n,i){n&1&&($(),ie(0,"path",0))},encapsulation:2})}return t})();var t3=["data-p-icon","angle-right"],Mb=(()=>{class t extends Te{static \u0275fac=(()=>{let e;return function(i){return(e||(e=G(t)))(i||t)}})();static \u0275cmp=z({type:t,selectors:[["","data-p-icon","angle-right"]],features:[Z],attrs:t3,decls:1,vars:0,consts:[["d","M5.25 11.1728C5.14929 11.1694 5.05033 11.1455 4.9592 11.1025C4.86806 11.0595 4.78666 10.9984 4.72 10.9228C4.57955 10.7822 4.50066 10.5916 4.50066 10.3928C4.50066 10.1941 4.57955 10.0035 4.72 9.86283L7.72 6.86283L4.72 3.86283C4.66067 3.71882 4.64765 3.55991 4.68275 3.40816C4.71785 3.25642 4.79932 3.11936 4.91585 3.01602C5.03238 2.91268 5.17819 2.84819 5.33305 2.83149C5.4879 2.81479 5.64411 2.84671 5.78 2.92283L9.28 6.42283C9.42045 6.56346 9.49934 6.75408 9.49934 6.95283C9.49934 7.15158 9.42045 7.34221 9.28 7.48283L5.78 10.9228C5.71333 10.9984 5.63193 11.0595 5.5408 11.1025C5.44966 11.1455 5.35071 11.1694 5.25 11.1728Z","fill","currentColor"]],template:function(n,i){n&1&&($(),ie(0,"path",0))},encapsulation:2})}return t})();var n3=["data-p-icon","angle-up"],Db=(()=>{class t extends Te{static \u0275fac=(()=>{let e;return function(i){return(e||(e=G(t)))(i||t)}})();static \u0275cmp=z({type:t,selectors:[["","data-p-icon","angle-up"]],features:[Z],attrs:n3,decls:1,vars:0,consts:[["d","M10.4134 9.49931C10.3148 9.49977 10.2172 9.48055 10.1262 9.44278C10.0352 9.405 9.95263 9.34942 9.88338 9.27931L6.88338 6.27931L3.88338 9.27931C3.73811 9.34946 3.57409 9.3709 3.41567 9.34044C3.25724 9.30999 3.11286 9.22926 3.00395 9.11025C2.89504 8.99124 2.82741 8.84028 2.8111 8.67978C2.79478 8.51928 2.83065 8.35781 2.91338 8.21931L6.41338 4.71931C6.55401 4.57886 6.74463 4.49997 6.94338 4.49997C7.14213 4.49997 7.33276 4.57886 7.47338 4.71931L10.9734 8.21931C11.1138 8.35994 11.1927 8.55056 11.1927 8.74931C11.1927 8.94806 11.1138 9.13868 10.9734 9.27931C10.9007 9.35315 10.8132 9.41089 10.7168 9.44879C10.6203 9.48669 10.5169 9.5039 10.4134 9.49931Z","fill","currentColor"]],template:function(n,i){n&1&&($(),ie(0,"path",0))},encapsulation:2})}return t})();var i3=["data-p-icon","arrow-down"],zf=(()=>{class t extends Te{pathId;onInit(){this.pathId="url(#"+pt()+")"}static \u0275fac=(()=>{let e;return function(i){return(e||(e=G(t)))(i||t)}})();static \u0275cmp=z({type:t,selectors:[["","data-p-icon","arrow-down"]],features:[Z],attrs:i3,decls:5,vars:2,consts:[["fill-rule","evenodd","clip-rule","evenodd","d","M6.99994 14C6.91097 14.0004 6.82281 13.983 6.74064 13.9489C6.65843 13.9148 6.58387 13.8646 6.52133 13.8013L1.10198 8.38193C0.982318 8.25351 0.917175 8.08367 0.920272 7.90817C0.923368 7.73267 0.994462 7.56523 1.11858 7.44111C1.24269 7.317 1.41014 7.2459 1.58563 7.2428C1.76113 7.23971 1.93098 7.30485 2.0594 7.42451L6.32263 11.6877V0.677419C6.32263 0.497756 6.394 0.325452 6.52104 0.198411C6.64808 0.0713706 6.82039 0 7.00005 0C7.17971 0 7.35202 0.0713706 7.47906 0.198411C7.6061 0.325452 7.67747 0.497756 7.67747 0.677419V11.6877L11.9407 7.42451C12.0691 7.30485 12.2389 7.23971 12.4144 7.2428C12.5899 7.2459 12.7574 7.317 12.8815 7.44111C13.0056 7.56523 13.0767 7.73267 13.0798 7.90817C13.0829 8.08367 13.0178 8.25351 12.8981 8.38193L7.47875 13.8013C7.41621 13.8646 7.34164 13.9148 7.25944 13.9489C7.17727 13.983 7.08912 14.0004 7.00015 14C7.00012 14 7.00009 14 7.00005 14C7.00001 14 6.99998 14 6.99994 14Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(n,i){n&1&&($(),re(0,"g"),ie(1,"path",0),fe(),re(2,"defs")(3,"clipPath",1),ie(4,"rect",2),fe()()),n&2&&(O("clip-path",i.pathId),l(3),ot("id",i.pathId))},encapsulation:2})}return t})();var o3=["data-p-icon","arrow-up"],Hf=(()=>{class t extends Te{pathId;onInit(){this.pathId="url(#"+pt()+")"}static \u0275fac=(()=>{let e;return function(i){return(e||(e=G(t)))(i||t)}})();static \u0275cmp=z({type:t,selectors:[["","data-p-icon","arrow-up"]],features:[Z],attrs:o3,decls:5,vars:2,consts:[["fill-rule","evenodd","clip-rule","evenodd","d","M6.51551 13.799C6.64205 13.9255 6.813 13.9977 6.99193 14C7.17087 13.9977 7.34182 13.9255 7.46835 13.799C7.59489 13.6725 7.66701 13.5015 7.66935 13.3226V2.31233L11.9326 6.57554C11.9951 6.63887 12.0697 6.68907 12.1519 6.72319C12.2341 6.75731 12.3223 6.77467 12.4113 6.77425C12.5003 6.77467 12.5885 6.75731 12.6707 6.72319C12.7529 6.68907 12.8274 6.63887 12.89 6.57554C13.0168 6.44853 13.0881 6.27635 13.0881 6.09683C13.0881 5.91732 13.0168 5.74514 12.89 5.61812L7.48846 0.216594C7.48274 0.210436 7.4769 0.204374 7.47094 0.198411C7.3439 0.0713707 7.1716 0 6.99193 0C6.81227 0 6.63997 0.0713707 6.51293 0.198411C6.50704 0.204296 6.50128 0.210278 6.49563 0.216354L1.09386 5.61812C0.974201 5.74654 0.909057 5.91639 0.912154 6.09189C0.91525 6.26738 0.986345 6.43483 1.11046 6.55894C1.23457 6.68306 1.40202 6.75415 1.57752 6.75725C1.75302 6.76035 1.92286 6.6952 2.05128 6.57554L6.31451 2.31231V13.3226C6.31685 13.5015 6.38898 13.6725 6.51551 13.799Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(n,i){n&1&&($(),re(0,"g"),ie(1,"path",0),fe(),re(2,"defs")(3,"clipPath",1),ie(4,"rect",2),fe()()),n&2&&(O("clip-path",i.pathId),l(3),ot("id",i.pathId))},encapsulation:2})}return t})();var r3=["data-p-icon","calendar"],Pb=(()=>{class t extends Te{static \u0275fac=(()=>{let e;return function(i){return(e||(e=G(t)))(i||t)}})();static \u0275cmp=z({type:t,selectors:[["","data-p-icon","calendar"]],features:[Z],attrs:r3,decls:1,vars:0,consts:[["d","M10.7838 1.51351H9.83783V0.567568C9.83783 0.417039 9.77804 0.272676 9.6716 0.166237C9.56516 0.0597971 9.42079 0 9.27027 0C9.11974 0 8.97538 0.0597971 8.86894 0.166237C8.7625 0.272676 8.7027 0.417039 8.7027 0.567568V1.51351H5.29729V0.567568C5.29729 0.417039 5.2375 0.272676 5.13106 0.166237C5.02462 0.0597971 4.88025 0 4.72973 0C4.5792 0 4.43484 0.0597971 4.3284 0.166237C4.22196 0.272676 4.16216 0.417039 4.16216 0.567568V1.51351H3.21621C2.66428 1.51351 2.13494 1.73277 1.74467 2.12305C1.35439 2.51333 1.13513 3.04266 1.13513 3.59459V11.9189C1.13513 12.4709 1.35439 13.0002 1.74467 13.3905C2.13494 13.7807 2.66428 14 3.21621 14H10.7838C11.3357 14 11.865 13.7807 12.2553 13.3905C12.6456 13.0002 12.8649 12.4709 12.8649 11.9189V3.59459C12.8649 3.04266 12.6456 2.51333 12.2553 2.12305C11.865 1.73277 11.3357 1.51351 10.7838 1.51351ZM3.21621 2.64865H4.16216V3.59459C4.16216 3.74512 4.22196 3.88949 4.3284 3.99593C4.43484 4.10237 4.5792 4.16216 4.72973 4.16216C4.88025 4.16216 5.02462 4.10237 5.13106 3.99593C5.2375 3.88949 5.29729 3.74512 5.29729 3.59459V2.64865H8.7027V3.59459C8.7027 3.74512 8.7625 3.88949 8.86894 3.99593C8.97538 4.10237 9.11974 4.16216 9.27027 4.16216C9.42079 4.16216 9.56516 4.10237 9.6716 3.99593C9.77804 3.88949 9.83783 3.74512 9.83783 3.59459V2.64865H10.7838C11.0347 2.64865 11.2753 2.74831 11.4527 2.92571C11.6301 3.10311 11.7297 3.34371 11.7297 3.59459V5.67568H2.27027V3.59459C2.27027 3.34371 2.36993 3.10311 2.54733 2.92571C2.72473 2.74831 2.96533 2.64865 3.21621 2.64865ZM10.7838 12.8649H3.21621C2.96533 12.8649 2.72473 12.7652 2.54733 12.5878C2.36993 12.4104 2.27027 12.1698 2.27027 11.9189V6.81081H11.7297V11.9189C11.7297 12.1698 11.6301 12.4104 11.4527 12.5878C11.2753 12.7652 11.0347 12.8649 10.7838 12.8649Z","fill","currentColor"]],template:function(n,i){n&1&&($(),ie(0,"path",0))},encapsulation:2})}return t})();var a3=["data-p-icon","chevron-left"],Rb=(()=>{class t extends Te{static \u0275fac=(()=>{let e;return function(i){return(e||(e=G(t)))(i||t)}})();static \u0275cmp=z({type:t,selectors:[["","data-p-icon","chevron-left"]],features:[Z],attrs:a3,decls:1,vars:0,consts:[["d","M9.61296 13C9.50997 13.0005 9.40792 12.9804 9.3128 12.9409C9.21767 12.9014 9.13139 12.8433 9.05902 12.7701L3.83313 7.54416C3.68634 7.39718 3.60388 7.19795 3.60388 6.99022C3.60388 6.78249 3.68634 6.58325 3.83313 6.43628L9.05902 1.21039C9.20762 1.07192 9.40416 0.996539 9.60724 1.00012C9.81032 1.00371 10.0041 1.08597 10.1477 1.22959C10.2913 1.37322 10.3736 1.56698 10.3772 1.77005C10.3808 1.97313 10.3054 2.16968 10.1669 2.31827L5.49496 6.99022L10.1669 11.6622C10.3137 11.8091 10.3962 12.0084 10.3962 12.2161C10.3962 12.4238 10.3137 12.6231 10.1669 12.7701C10.0945 12.8433 10.0083 12.9014 9.91313 12.9409C9.81801 12.9804 9.71596 13.0005 9.61296 13Z","fill","currentColor"]],template:function(n,i){n&1&&($(),ie(0,"path",0))},encapsulation:2})}return t})();var s3=["data-p-icon","chevron-right"],Ob=(()=>{class t extends Te{static \u0275fac=(()=>{let e;return function(i){return(e||(e=G(t)))(i||t)}})();static \u0275cmp=z({type:t,selectors:[["","data-p-icon","chevron-right"]],features:[Z],attrs:s3,decls:1,vars:0,consts:[["d","M4.38708 13C4.28408 13.0005 4.18203 12.9804 4.08691 12.9409C3.99178 12.9014 3.9055 12.8433 3.83313 12.7701C3.68634 12.6231 3.60388 12.4238 3.60388 12.2161C3.60388 12.0084 3.68634 11.8091 3.83313 11.6622L8.50507 6.99022L3.83313 2.31827C3.69467 2.16968 3.61928 1.97313 3.62287 1.77005C3.62645 1.56698 3.70872 1.37322 3.85234 1.22959C3.99596 1.08597 4.18972 1.00371 4.3928 1.00012C4.59588 0.996539 4.79242 1.07192 4.94102 1.21039L10.1669 6.43628C10.3137 6.58325 10.3962 6.78249 10.3962 6.99022C10.3962 7.19795 10.3137 7.39718 10.1669 7.54416L4.94102 12.7701C4.86865 12.8433 4.78237 12.9014 4.68724 12.9409C4.59212 12.9804 4.49007 13.0005 4.38708 13Z","fill","currentColor"]],template:function(n,i){n&1&&($(),ie(0,"path",0))},encapsulation:2})}return t})();var l3=["data-p-icon","chevron-up"],Fb=(()=>{class t extends Te{static \u0275fac=(()=>{let e;return function(i){return(e||(e=G(t)))(i||t)}})();static \u0275cmp=z({type:t,selectors:[["","data-p-icon","chevron-up"]],features:[Z],attrs:l3,decls:1,vars:0,consts:[["d","M12.2097 10.4113C12.1057 10.4118 12.0027 10.3915 11.9067 10.3516C11.8107 10.3118 11.7237 10.2532 11.6506 10.1792L6.93602 5.46461L2.22139 10.1476C2.07272 10.244 1.89599 10.2877 1.71953 10.2717C1.54307 10.2556 1.3771 10.1808 1.24822 10.0593C1.11933 9.93766 1.035 9.77633 1.00874 9.6011C0.982477 9.42587 1.0158 9.2469 1.10338 9.09287L6.37701 3.81923C6.52533 3.6711 6.72639 3.58789 6.93602 3.58789C7.14565 3.58789 7.3467 3.6711 7.49502 3.81923L12.7687 9.09287C12.9168 9.24119 13 9.44225 13 9.65187C13 9.8615 12.9168 10.0626 12.7687 10.2109C12.616 10.3487 12.4151 10.4207 12.2097 10.4113Z","fill","currentColor"]],template:function(n,i){n&1&&($(),ie(0,"path",0))},encapsulation:2})}return t})();var c3=["data-p-icon","filter"],Nb=(()=>{class t extends Te{pathId;onInit(){this.pathId="url(#"+pt()+")"}static \u0275fac=(()=>{let e;return function(i){return(e||(e=G(t)))(i||t)}})();static \u0275cmp=z({type:t,selectors:[["","data-p-icon","filter"]],features:[Z],attrs:c3,decls:5,vars:2,consts:[["d","M8.64708 14H5.35296C5.18981 13.9979 5.03395 13.9321 4.91858 13.8167C4.8032 13.7014 4.73745 13.5455 4.73531 13.3824V7L0.329431 0.98C0.259794 0.889466 0.217389 0.780968 0.20718 0.667208C0.19697 0.553448 0.219379 0.439133 0.271783 0.337647C0.324282 0.236453 0.403423 0.151519 0.500663 0.0920138C0.597903 0.0325088 0.709548 0.000692754 0.823548 0H13.1765C13.2905 0.000692754 13.4021 0.0325088 13.4994 0.0920138C13.5966 0.151519 13.6758 0.236453 13.7283 0.337647C13.7807 0.439133 13.8031 0.553448 13.7929 0.667208C13.7826 0.780968 13.7402 0.889466 13.6706 0.98L9.26472 7V13.3824C9.26259 13.5455 9.19683 13.7014 9.08146 13.8167C8.96609 13.9321 8.81022 13.9979 8.64708 14ZM5.97061 12.7647H8.02943V6.79412C8.02878 6.66289 8.07229 6.53527 8.15296 6.43177L11.9412 1.23529H2.05884L5.86355 6.43177C5.94422 6.53527 5.98773 6.66289 5.98708 6.79412L5.97061 12.7647Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(n,i){n&1&&($(),re(0,"g"),ie(1,"path",0),fe(),re(2,"defs")(3,"clipPath",1),ie(4,"rect",2),fe()()),n&2&&(O("clip-path",i.pathId),l(3),ot("id",i.pathId))},encapsulation:2})}return t})();var d3=["data-p-icon","filter-slash"],Ab=(()=>{class t extends Te{pathId;onInit(){this.pathId="url(#"+pt()+")"}static \u0275fac=(()=>{let e;return function(i){return(e||(e=G(t)))(i||t)}})();static \u0275cmp=z({type:t,selectors:[["","data-p-icon","filter-slash"]],features:[Z],attrs:d3,decls:5,vars:2,consts:[["fill-rule","evenodd","clip-rule","evenodd","d","M13.4994 0.0920138C13.5967 0.151519 13.6758 0.236453 13.7283 0.337647C13.7807 0.439133 13.8031 0.553448 13.7929 0.667208C13.7827 0.780968 13.7403 0.889466 13.6707 0.98L11.406 4.06823C11.3099 4.19928 11.1656 4.28679 11.005 4.3115C10.8444 4.33621 10.6805 4.2961 10.5495 4.2C10.4184 4.1039 10.3309 3.95967 10.3062 3.79905C10.2815 3.63843 10.3216 3.47458 10.4177 3.34353L11.9412 1.23529H7.41184C7.24803 1.23529 7.09093 1.17022 6.97509 1.05439C6.85926 0.938558 6.79419 0.781457 6.79419 0.617647C6.79419 0.453837 6.85926 0.296736 6.97509 0.180905C7.09093 0.0650733 7.24803 0 7.41184 0H13.1765C13.2905 0.000692754 13.4022 0.0325088 13.4994 0.0920138ZM4.20008 0.181168H4.24126L13.2013 9.03411C13.3169 9.14992 13.3819 9.3069 13.3819 9.47058C13.3819 9.63426 13.3169 9.79124 13.2013 9.90705C13.1445 9.96517 13.0766 10.0112 13.0016 10.0423C12.9266 10.0735 12.846 10.0891 12.7648 10.0882C12.6836 10.0886 12.6032 10.0728 12.5283 10.0417C12.4533 10.0106 12.3853 9.96479 12.3283 9.90705L9.3142 6.92587L9.26479 6.99999V13.3823C9.26265 13.5455 9.19689 13.7014 9.08152 13.8167C8.96615 13.9321 8.81029 13.9979 8.64714 14H5.35302C5.18987 13.9979 5.03401 13.9321 4.91864 13.8167C4.80327 13.7014 4.73751 13.5455 4.73537 13.3823V6.99999L0.329492 1.02117C0.259855 0.930634 0.21745 0.822137 0.207241 0.708376C0.197031 0.594616 0.21944 0.480301 0.271844 0.378815C0.324343 0.277621 0.403484 0.192687 0.500724 0.133182C0.597964 0.073677 0.709609 0.041861 0.823609 0.0411682H3.86243C3.92448 0.0461551 3.9855 0.060022 4.04361 0.0823446C4.10037 0.10735 4.15311 0.140655 4.20008 0.181168ZM8.02949 6.79411C8.02884 6.66289 8.07235 6.53526 8.15302 6.43176L8.42478 6.05293L3.55773 1.23529H2.0589L5.84714 6.43176C5.92781 6.53526 5.97132 6.66289 5.97067 6.79411V12.7647H8.02949V6.79411Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(n,i){n&1&&($(),re(0,"g"),ie(1,"path",0),fe(),re(2,"defs")(3,"clipPath",1),ie(4,"rect",2),fe()()),n&2&&(O("clip-path",i.pathId),l(3),ot("id",i.pathId))},encapsulation:2})}return t})();var u3=["data-p-icon","minus"],Lb=(()=>{class t extends Te{static \u0275fac=(()=>{let e;return function(i){return(e||(e=G(t)))(i||t)}})();static \u0275cmp=z({type:t,selectors:[["","data-p-icon","minus"]],features:[Z],attrs:u3,decls:1,vars:0,consts:[["d","M13.2222 7.77778H0.777778C0.571498 7.77778 0.373667 7.69584 0.227806 7.54998C0.0819442 7.40412 0 7.20629 0 7.00001C0 6.79373 0.0819442 6.5959 0.227806 6.45003C0.373667 6.30417 0.571498 6.22223 0.777778 6.22223H13.2222C13.4285 6.22223 13.6263 6.30417 13.7722 6.45003C13.9181 6.5959 14 6.79373 14 7.00001C14 7.20629 13.9181 7.40412 13.7722 7.54998C13.6263 7.69584 13.4285 7.77778 13.2222 7.77778Z","fill","currentColor"]],template:function(n,i){n&1&&($(),ie(0,"path",0))},encapsulation:2})}return t})();var p3=["data-p-icon","plus"],Bb=(()=>{class t extends Te{pathId;onInit(){this.pathId="url(#"+pt()+")"}static \u0275fac=(()=>{let e;return function(i){return(e||(e=G(t)))(i||t)}})();static \u0275cmp=z({type:t,selectors:[["","data-p-icon","plus"]],features:[Z],attrs:p3,decls:5,vars:2,consts:[["d","M7.67742 6.32258V0.677419C7.67742 0.497757 7.60605 0.325452 7.47901 0.198411C7.35197 0.0713707 7.17966 0 7 0C6.82034 0 6.64803 0.0713707 6.52099 0.198411C6.39395 0.325452 6.32258 0.497757 6.32258 0.677419V6.32258H0.677419C0.497757 6.32258 0.325452 6.39395 0.198411 6.52099C0.0713707 6.64803 0 6.82034 0 7C0 7.17966 0.0713707 7.35197 0.198411 7.47901C0.325452 7.60605 0.497757 7.67742 0.677419 7.67742H6.32258V13.3226C6.32492 13.5015 6.39704 13.6725 6.52358 13.799C6.65012 13.9255 6.82106 13.9977 7 14C7.17966 14 7.35197 13.9286 7.47901 13.8016C7.60605 13.6745 7.67742 13.5022 7.67742 13.3226V7.67742H13.3226C13.5022 7.67742 13.6745 7.60605 13.8016 7.47901C13.9286 7.35197 14 7.17966 14 7C13.9977 6.82106 13.9255 6.65012 13.799 6.52358C13.6725 6.39704 13.5015 6.32492 13.3226 6.32258H7.67742Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(n,i){n&1&&($(),re(0,"g"),ie(1,"path",0),fe(),re(2,"defs")(3,"clipPath",1),ie(4,"rect",2),fe()()),n&2&&(O("clip-path",i.pathId),l(3),ot("id",i.pathId))},encapsulation:2})}return t})();var h3=["data-p-icon","sort-alt"],Vb=(()=>{class t extends Te{pathId;onInit(){this.pathId="url(#"+pt()+")"}static \u0275fac=(()=>{let e;return function(i){return(e||(e=G(t)))(i||t)}})();static \u0275cmp=z({type:t,selectors:[["","data-p-icon","sort-alt"]],features:[Z],attrs:h3,decls:8,vars:2,consts:[["d","M5.64515 3.61291C5.47353 3.61291 5.30192 3.54968 5.16644 3.4142L3.38708 1.63484L1.60773 3.4142C1.34579 3.67613 0.912244 3.67613 0.650309 3.4142C0.388374 3.15226 0.388374 2.71871 0.650309 2.45678L2.90837 0.198712C3.17031 -0.0632236 3.60386 -0.0632236 3.86579 0.198712L6.12386 2.45678C6.38579 2.71871 6.38579 3.15226 6.12386 3.4142C5.98837 3.54968 5.81676 3.61291 5.64515 3.61291Z","fill","currentColor"],["d","M3.38714 14C3.01681 14 2.70972 13.6929 2.70972 13.3226V0.677419C2.70972 0.307097 3.01681 0 3.38714 0C3.75746 0 4.06456 0.307097 4.06456 0.677419V13.3226C4.06456 13.6929 3.75746 14 3.38714 14Z","fill","currentColor"],["d","M10.6129 14C10.4413 14 10.2697 13.9368 10.1342 13.8013L7.87611 11.5432C7.61418 11.2813 7.61418 10.8477 7.87611 10.5858C8.13805 10.3239 8.5716 10.3239 8.83353 10.5858L10.6129 12.3652L12.3922 10.5858C12.6542 10.3239 13.0877 10.3239 13.3497 10.5858C13.6116 10.8477 13.6116 11.2813 13.3497 11.5432L11.0916 13.8013C10.9561 13.9368 10.7845 14 10.6129 14Z","fill","currentColor"],["d","M10.6129 14C10.2426 14 9.93552 13.6929 9.93552 13.3226V0.677419C9.93552 0.307097 10.2426 0 10.6129 0C10.9833 0 11.2904 0.307097 11.2904 0.677419V13.3226C11.2904 13.6929 10.9832 14 10.6129 14Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(n,i){n&1&&($(),re(0,"g"),ie(1,"path",0)(2,"path",1)(3,"path",2)(4,"path",3),fe(),re(5,"defs")(6,"clipPath",4),ie(7,"rect",5),fe()()),n&2&&(O("clip-path",i.pathId),l(6),ot("id",i.pathId))},encapsulation:2})}return t})();var f3=["data-p-icon","sort-amount-down"],zb=(()=>{class t extends Te{pathId;onInit(){this.pathId="url(#"+pt()+")"}static \u0275fac=(()=>{let e;return function(i){return(e||(e=G(t)))(i||t)}})();static \u0275cmp=z({type:t,selectors:[["","data-p-icon","sort-amount-down"]],features:[Z],attrs:f3,decls:5,vars:2,consts:[["d","M4.93953 10.5858L3.83759 11.6877V0.677419C3.83759 0.307097 3.53049 0 3.16017 0C2.78985 0 2.48275 0.307097 2.48275 0.677419V11.6877L1.38082 10.5858C1.11888 10.3239 0.685331 10.3239 0.423396 10.5858C0.16146 10.8477 0.16146 11.2813 0.423396 11.5432L2.68146 13.8013C2.74469 13.8645 2.81694 13.9097 2.89823 13.9458C2.97952 13.9819 3.06985 14 3.16017 14C3.25049 14 3.33178 13.9819 3.42211 13.9458C3.5034 13.9097 3.57565 13.8645 3.63888 13.8013L5.89694 11.5432C6.15888 11.2813 6.15888 10.8477 5.89694 10.5858C5.63501 10.3239 5.20146 10.3239 4.93953 10.5858ZM13.0957 0H7.22468C6.85436 0 6.54726 0.307097 6.54726 0.677419C6.54726 1.04774 6.85436 1.35484 7.22468 1.35484H13.0957C13.466 1.35484 13.7731 1.04774 13.7731 0.677419C13.7731 0.307097 13.466 0 13.0957 0ZM7.22468 5.41935H9.48275C9.85307 5.41935 10.1602 5.72645 10.1602 6.09677C10.1602 6.4671 9.85307 6.77419 9.48275 6.77419H7.22468C6.85436 6.77419 6.54726 6.4671 6.54726 6.09677C6.54726 5.72645 6.85436 5.41935 7.22468 5.41935ZM7.6763 8.12903H7.22468C6.85436 8.12903 6.54726 8.43613 6.54726 8.80645C6.54726 9.17677 6.85436 9.48387 7.22468 9.48387H7.6763C8.04662 9.48387 8.35372 9.17677 8.35372 8.80645C8.35372 8.43613 8.04662 8.12903 7.6763 8.12903ZM7.22468 2.70968H11.2892C11.6595 2.70968 11.9666 3.01677 11.9666 3.3871C11.9666 3.75742 11.6595 4.06452 11.2892 4.06452H7.22468C6.85436 4.06452 6.54726 3.75742 6.54726 3.3871C6.54726 3.01677 6.85436 2.70968 7.22468 2.70968Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(n,i){n&1&&($(),re(0,"g"),ie(1,"path",0),fe(),re(2,"defs")(3,"clipPath",1),ie(4,"rect",2),fe()()),n&2&&(O("clip-path",i.pathId),l(3),ot("id",i.pathId))},encapsulation:2})}return t})();var m3=["data-p-icon","sort-amount-up-alt"],Hb=(()=>{class t extends Te{pathId;onInit(){this.pathId="url(#"+pt()+")"}static \u0275fac=(()=>{let e;return function(i){return(e||(e=G(t)))(i||t)}})();static \u0275cmp=z({type:t,selectors:[["","data-p-icon","sort-amount-up-alt"]],features:[Z],attrs:m3,decls:5,vars:2,consts:[["d","M3.63435 0.19871C3.57113 0.135484 3.49887 0.0903226 3.41758 0.0541935C3.255 -0.0180645 3.06532 -0.0180645 2.90274 0.0541935C2.82145 0.0903226 2.74919 0.135484 2.68597 0.19871L0.427901 2.45677C0.165965 2.71871 0.165965 3.15226 0.427901 3.41419C0.689836 3.67613 1.12338 3.67613 1.38532 3.41419L2.48726 2.31226V13.3226C2.48726 13.6929 2.79435 14 3.16467 14C3.535 14 3.84209 13.6929 3.84209 13.3226V2.31226L4.94403 3.41419C5.07951 3.54968 5.25113 3.6129 5.42274 3.6129C5.59435 3.6129 5.76597 3.54968 5.90145 3.41419C6.16338 3.15226 6.16338 2.71871 5.90145 2.45677L3.64338 0.19871H3.63435ZM13.7685 13.3226C13.7685 12.9523 13.4615 12.6452 13.0911 12.6452H7.22016C6.84984 12.6452 6.54274 12.9523 6.54274 13.3226C6.54274 13.6929 6.84984 14 7.22016 14H13.0911C13.4615 14 13.7685 13.6929 13.7685 13.3226ZM7.22016 8.58064C6.84984 8.58064 6.54274 8.27355 6.54274 7.90323C6.54274 7.5329 6.84984 7.22581 7.22016 7.22581H9.47823C9.84855 7.22581 10.1556 7.5329 10.1556 7.90323C10.1556 8.27355 9.84855 8.58064 9.47823 8.58064H7.22016ZM7.22016 5.87097H7.67177C8.0421 5.87097 8.34919 5.56387 8.34919 5.19355C8.34919 4.82323 8.0421 4.51613 7.67177 4.51613H7.22016C6.84984 4.51613 6.54274 4.82323 6.54274 5.19355C6.54274 5.56387 6.84984 5.87097 7.22016 5.87097ZM11.2847 11.2903H7.22016C6.84984 11.2903 6.54274 10.9832 6.54274 10.6129C6.54274 10.2426 6.84984 9.93548 7.22016 9.93548H11.2847C11.655 9.93548 11.9621 10.2426 11.9621 10.6129C11.9621 10.9832 11.655 11.2903 11.2847 11.2903Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(n,i){n&1&&($(),re(0,"g"),ie(1,"path",0),fe(),re(2,"defs")(3,"clipPath",1),ie(4,"rect",2),fe()()),n&2&&(O("clip-path",i.pathId),l(3),ot("id",i.pathId))},encapsulation:2})}return t})();var _3=["data-p-icon","trash"],qb=(()=>{class t extends Te{pathId;onInit(){this.pathId="url(#"+pt()+")"}static \u0275fac=(()=>{let e;return function(i){return(e||(e=G(t)))(i||t)}})();static \u0275cmp=z({type:t,selectors:[["","data-p-icon","trash"]],features:[Z],attrs:_3,decls:5,vars:2,consts:[["fill-rule","evenodd","clip-rule","evenodd","d","M3.44802 13.9955H10.552C10.8056 14.0129 11.06 13.9797 11.3006 13.898C11.5412 13.8163 11.7632 13.6877 11.9537 13.5196C12.1442 13.3515 12.2995 13.1473 12.4104 12.9188C12.5213 12.6903 12.5858 12.442 12.6 12.1884V4.36041H13.4C13.5591 4.36041 13.7117 4.29722 13.8243 4.18476C13.9368 4.07229 14 3.91976 14 3.76071C14 3.60166 13.9368 3.44912 13.8243 3.33666C13.7117 3.22419 13.5591 3.16101 13.4 3.16101H12.0537C12.0203 3.1557 11.9863 3.15299 11.952 3.15299C11.9178 3.15299 11.8838 3.1557 11.8503 3.16101H11.2285C11.2421 3.10893 11.2487 3.05513 11.248 3.00106V1.80966C11.2171 1.30262 10.9871 0.828306 10.608 0.48989C10.229 0.151475 9.73159 -0.0236625 9.22402 0.00257442H4.77602C4.27251 -0.0171866 3.78126 0.160868 3.40746 0.498617C3.03365 0.836366 2.807 1.30697 2.77602 1.80966V3.00106C2.77602 3.0556 2.78346 3.10936 2.79776 3.16101H0.6C0.521207 3.16101 0.443185 3.17652 0.37039 3.20666C0.297595 3.2368 0.231451 3.28097 0.175736 3.33666C0.120021 3.39235 0.0758251 3.45846 0.0456722 3.53121C0.0155194 3.60397 0 3.68196 0 3.76071C0 3.83946 0.0155194 3.91744 0.0456722 3.9902C0.0758251 4.06296 0.120021 4.12907 0.175736 4.18476C0.231451 4.24045 0.297595 4.28462 0.37039 4.31476C0.443185 4.3449 0.521207 4.36041 0.6 4.36041H1.40002V12.1884C1.41426 12.442 1.47871 12.6903 1.58965 12.9188C1.7006 13.1473 1.85582 13.3515 2.04633 13.5196C2.23683 13.6877 2.45882 13.8163 2.69944 13.898C2.94005 13.9797 3.1945 14.0129 3.44802 13.9955ZM2.60002 4.36041H11.304V12.1884C11.304 12.5163 10.952 12.7961 10.504 12.7961H3.40002C2.97602 12.7961 2.60002 12.5163 2.60002 12.1884V4.36041ZM3.95429 3.16101C3.96859 3.10936 3.97602 3.0556 3.97602 3.00106V1.80966C3.97602 1.48183 4.33602 1.20197 4.77602 1.20197H9.24802C9.66403 1.20197 10.048 1.48183 10.048 1.80966V3.00106C10.0473 3.05515 10.054 3.10896 10.0678 3.16101H3.95429ZM5.57571 10.997C5.41731 10.995 5.26597 10.9311 5.15395 10.8191C5.04193 10.7071 4.97808 10.5558 4.97601 10.3973V6.77517C4.97601 6.61612 5.0392 6.46359 5.15166 6.35112C5.26413 6.23866 5.41666 6.17548 5.57571 6.17548C5.73476 6.17548 5.8873 6.23866 5.99976 6.35112C6.11223 6.46359 6.17541 6.61612 6.17541 6.77517V10.3894C6.17647 10.4688 6.16174 10.5476 6.13208 10.6213C6.10241 10.695 6.05841 10.762 6.00261 10.8186C5.94682 10.8751 5.88035 10.92 5.80707 10.9506C5.73378 10.9813 5.65514 10.9971 5.57571 10.997ZM7.99968 10.8214C8.11215 10.9339 8.26468 10.997 8.42373 10.997C8.58351 10.9949 8.73604 10.93 8.84828 10.8163C8.96052 10.7025 9.02345 10.5491 9.02343 10.3894V6.77517C9.02343 6.61612 8.96025 6.46359 8.84778 6.35112C8.73532 6.23866 8.58278 6.17548 8.42373 6.17548C8.26468 6.17548 8.11215 6.23866 7.99968 6.35112C7.88722 6.46359 7.82404 6.61612 7.82404 6.77517V10.3973C7.82404 10.5564 7.88722 10.7089 7.99968 10.8214Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(n,i){n&1&&($(),re(0,"g"),ie(1,"path",0),fe(),re(2,"defs")(3,"clipPath",1),ie(4,"rect",2),fe()()),n&2&&(O("clip-path",i.pathId),l(3),ot("id",i.pathId))},encapsulation:2})}return t})();var Gb=`
609
+ .p-checkbox {
610
+ position: relative;
611
+ display: inline-flex;
612
+ user-select: none;
613
+ vertical-align: bottom;
614
+ width: dt('checkbox.width');
615
+ height: dt('checkbox.height');
616
+ }
617
+
618
+ .p-checkbox-input {
619
+ cursor: pointer;
620
+ appearance: none;
621
+ position: absolute;
622
+ inset-block-start: 0;
623
+ inset-inline-start: 0;
624
+ width: 100%;
625
+ height: 100%;
626
+ padding: 0;
627
+ margin: 0;
628
+ opacity: 0;
629
+ z-index: 1;
630
+ outline: 0 none;
631
+ border: 1px solid transparent;
632
+ border-radius: dt('checkbox.border.radius');
633
+ }
634
+
635
+ .p-checkbox-box {
636
+ display: flex;
637
+ justify-content: center;
638
+ align-items: center;
639
+ border-radius: dt('checkbox.border.radius');
640
+ border: 1px solid dt('checkbox.border.color');
641
+ background: dt('checkbox.background');
642
+ width: dt('checkbox.width');
643
+ height: dt('checkbox.height');
644
+ transition:
645
+ background dt('checkbox.transition.duration'),
646
+ color dt('checkbox.transition.duration'),
647
+ border-color dt('checkbox.transition.duration'),
648
+ box-shadow dt('checkbox.transition.duration'),
649
+ outline-color dt('checkbox.transition.duration');
650
+ outline-color: transparent;
651
+ box-shadow: dt('checkbox.shadow');
652
+ }
653
+
654
+ .p-checkbox-icon {
655
+ transition-duration: dt('checkbox.transition.duration');
656
+ color: dt('checkbox.icon.color');
657
+ font-size: dt('checkbox.icon.size');
658
+ width: dt('checkbox.icon.size');
659
+ height: dt('checkbox.icon.size');
660
+ }
661
+
662
+ .p-checkbox:not(.p-disabled):has(.p-checkbox-input:hover) .p-checkbox-box {
663
+ border-color: dt('checkbox.hover.border.color');
664
+ }
665
+
666
+ .p-checkbox-checked .p-checkbox-box {
667
+ border-color: dt('checkbox.checked.border.color');
668
+ background: dt('checkbox.checked.background');
669
+ }
670
+
671
+ .p-checkbox-checked .p-checkbox-icon {
672
+ color: dt('checkbox.icon.checked.color');
673
+ }
674
+
675
+ .p-checkbox-checked:not(.p-disabled):has(.p-checkbox-input:hover) .p-checkbox-box {
676
+ background: dt('checkbox.checked.hover.background');
677
+ border-color: dt('checkbox.checked.hover.border.color');
678
+ }
679
+
680
+ .p-checkbox-checked:not(.p-disabled):has(.p-checkbox-input:hover) .p-checkbox-icon {
681
+ color: dt('checkbox.icon.checked.hover.color');
682
+ }
683
+
684
+ .p-checkbox:not(.p-disabled):has(.p-checkbox-input:focus-visible) .p-checkbox-box {
685
+ border-color: dt('checkbox.focus.border.color');
686
+ box-shadow: dt('checkbox.focus.ring.shadow');
687
+ outline: dt('checkbox.focus.ring.width') dt('checkbox.focus.ring.style') dt('checkbox.focus.ring.color');
688
+ outline-offset: dt('checkbox.focus.ring.offset');
689
+ }
690
+
691
+ .p-checkbox-checked:not(.p-disabled):has(.p-checkbox-input:focus-visible) .p-checkbox-box {
692
+ border-color: dt('checkbox.checked.focus.border.color');
693
+ }
694
+
695
+ .p-checkbox.p-invalid > .p-checkbox-box {
696
+ border-color: dt('checkbox.invalid.border.color');
697
+ }
698
+
699
+ .p-checkbox.p-variant-filled .p-checkbox-box {
700
+ background: dt('checkbox.filled.background');
701
+ }
702
+
703
+ .p-checkbox-checked.p-variant-filled .p-checkbox-box {
704
+ background: dt('checkbox.checked.background');
705
+ }
706
+
707
+ .p-checkbox-checked.p-variant-filled:not(.p-disabled):has(.p-checkbox-input:hover) .p-checkbox-box {
708
+ background: dt('checkbox.checked.hover.background');
709
+ }
710
+
711
+ .p-checkbox.p-disabled {
712
+ opacity: 1;
713
+ }
714
+
715
+ .p-checkbox.p-disabled .p-checkbox-box {
716
+ background: dt('checkbox.disabled.background');
717
+ border-color: dt('checkbox.checked.disabled.border.color');
718
+ }
719
+
720
+ .p-checkbox.p-disabled .p-checkbox-box .p-checkbox-icon {
721
+ color: dt('checkbox.icon.disabled.color');
722
+ }
723
+
724
+ .p-checkbox-sm,
725
+ .p-checkbox-sm .p-checkbox-box {
726
+ width: dt('checkbox.sm.width');
727
+ height: dt('checkbox.sm.height');
728
+ }
729
+
730
+ .p-checkbox-sm .p-checkbox-icon {
731
+ font-size: dt('checkbox.icon.sm.size');
732
+ width: dt('checkbox.icon.sm.size');
733
+ height: dt('checkbox.icon.sm.size');
734
+ }
735
+
736
+ .p-checkbox-lg,
737
+ .p-checkbox-lg .p-checkbox-box {
738
+ width: dt('checkbox.lg.width');
739
+ height: dt('checkbox.lg.height');
740
+ }
741
+
742
+ .p-checkbox-lg .p-checkbox-icon {
743
+ font-size: dt('checkbox.icon.lg.size');
744
+ width: dt('checkbox.icon.lg.size');
745
+ height: dt('checkbox.icon.lg.size');
746
+ }
747
+ `;var g3=["icon"],b3=["input"],v3=(t,o,e)=>({checked:t,class:o,dataP:e});function y3(t,o){if(t&1&&N(0,"span",8),t&2){let e=d(3);H(e.cx("icon")),m("ngClass",e.checkboxIcon)("pBind",e.ptm("icon")),O("data-p",e.dataP)}}function C3(t,o){if(t&1&&($(),N(0,"svg",9)),t&2){let e=d(3);H(e.cx("icon")),m("pBind",e.ptm("icon")),O("data-p",e.dataP)}}function x3(t,o){if(t&1&&(me(0),I(1,y3,1,5,"span",6)(2,C3,1,4,"svg",7),_e()),t&2){let e=d(2);l(),m("ngIf",e.checkboxIcon),l(),m("ngIf",!e.checkboxIcon)}}function w3(t,o){if(t&1&&($(),N(0,"svg",10)),t&2){let e=d(2);H(e.cx("icon")),m("pBind",e.ptm("icon")),O("data-p",e.dataP)}}function T3(t,o){if(t&1&&(me(0),I(1,x3,3,2,"ng-container",3)(2,w3,1,4,"svg",5),_e()),t&2){let e=d();l(),m("ngIf",e.checked),l(),m("ngIf",e._indeterminate())}}function S3(t,o){}function k3(t,o){t&1&&I(0,S3,0,0,"ng-template")}var I3=`
748
+ ${Gb}
749
+
750
+ /* For PrimeNG */
751
+ p-checkBox.ng-invalid.ng-dirty .p-checkbox-box,
752
+ p-check-box.ng-invalid.ng-dirty .p-checkbox-box,
753
+ p-checkbox.ng-invalid.ng-dirty .p-checkbox-box {
754
+ border-color: dt('checkbox.invalid.border.color');
755
+ }
756
+ `,E3={root:({instance:t})=>["p-checkbox p-component",{"p-checkbox-checked p-highlight":t.checked,"p-disabled":t.$disabled(),"p-invalid":t.invalid(),"p-variant-filled":t.$variant()==="filled","p-checkbox-sm p-inputfield-sm":t.size()==="small","p-checkbox-lg p-inputfield-lg":t.size()==="large"}],box:"p-checkbox-box",input:"p-checkbox-input",icon:"p-checkbox-icon"},jb=(()=>{class t extends St{name="checkbox";style=I3;classes=E3;static \u0275fac=(()=>{let e;return function(i){return(e||(e=G(t)))(i||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})();var Ub=new ge("CHECKBOX_INSTANCE"),M3={provide:Xn,useExisting:wn(()=>$b),multi:!0},$b=(()=>{class t extends ss{componentName="Checkbox";hostName="";value;binary;ariaLabelledBy;ariaLabel;tabindex;inputId;inputStyle;styleClass;inputClass;indeterminate=!1;formControl;checkboxIcon;readonly;autofocus;trueValue=!0;falseValue=!1;variant=B();size=B();onChange=new ne;onFocus=new ne;onBlur=new ne;inputViewChild;get checked(){return this._indeterminate()?!1:this.binary?this.modelValue()===this.trueValue:B0(this.value,this.modelValue())}_indeterminate=X(void 0);checkboxIconTemplate;templates;_checkboxIconTemplate;focused=!1;_componentStyle=p(jb);bindDirectiveInstance=p(Ie,{self:!0});$pcCheckbox=p(Ub,{optional:!0,skipSelf:!0})??void 0;$variant=E(()=>this.variant()||this.config.inputStyle()||this.config.inputVariant());onAfterContentInit(){this.templates?.forEach(e=>{switch(e.getType()){case"icon":this._checkboxIconTemplate=e.template;break;case"checkboxicon":this._checkboxIconTemplate=e.template;break}})}onChanges(e){e.indeterminate&&this._indeterminate.set(e.indeterminate.currentValue)}onAfterViewChecked(){this.bindDirectiveInstance.setAttrs(this.ptms(["host","root"]))}updateModel(e){let n,i=this.injector.get(ho,null,{optional:!0,self:!0}),r=i&&!this.formControl?i.value:this.modelValue();this.binary?(n=this._indeterminate()?this.trueValue:this.checked?this.falseValue:this.trueValue,this.writeModelValue(n),this.onModelChange(n)):(this.checked||this._indeterminate()?n=r.filter(a=>!L0(a,this.value)):n=r?[...r,this.value]:[this.value],this.onModelChange(n),this.writeModelValue(n),this.formControl&&this.formControl.setValue(n)),this._indeterminate()&&this._indeterminate.set(!1),this.onChange.emit({checked:n,originalEvent:e})}handleChange(e){this.readonly||this.updateModel(e)}onInputFocus(e){this.focused=!0,this.onFocus.emit(e)}onInputBlur(e){this.focused=!1,this.onBlur.emit(e),this.onModelTouched()}focus(){this.inputViewChild?.nativeElement.focus()}writeControlValue(e,n){n(e),this.cd.markForCheck()}get dataP(){return this.cn({invalid:this.invalid(),checked:this.checked,disabled:this.$disabled(),filled:this.$variant()==="filled",[this.size()]:this.size()})}static \u0275fac=(()=>{let e;return function(i){return(e||(e=G(t)))(i||t)}})();static \u0275cmp=z({type:t,selectors:[["p-checkbox"],["p-checkBox"],["p-check-box"]],contentQueries:function(n,i,r){if(n&1&&Qt(r,g3,4)(r,bt,4),n&2){let a;Q(a=J())&&(i.checkboxIconTemplate=a.first),Q(a=J())&&(i.templates=a)}},viewQuery:function(n,i){if(n&1&&Tn(b3,5),n&2){let r;Q(r=J())&&(i.inputViewChild=r.first)}},hostVars:6,hostBindings:function(n,i){n&2&&(O("data-p-highlight",i.checked)("data-p-checked",i.checked)("data-p-disabled",i.$disabled())("data-p",i.dataP),H(i.cn(i.cx("root"),i.styleClass)))},inputs:{hostName:"hostName",value:"value",binary:[2,"binary","binary",j],ariaLabelledBy:"ariaLabelledBy",ariaLabel:"ariaLabel",tabindex:[2,"tabindex","tabindex",xe],inputId:"inputId",inputStyle:"inputStyle",styleClass:"styleClass",inputClass:"inputClass",indeterminate:[2,"indeterminate","indeterminate",j],formControl:"formControl",checkboxIcon:"checkboxIcon",readonly:[2,"readonly","readonly",j],autofocus:[2,"autofocus","autofocus",j],trueValue:"trueValue",falseValue:"falseValue",variant:[1,"variant"],size:[1,"size"]},outputs:{onChange:"onChange",onFocus:"onFocus",onBlur:"onBlur"},features:[we([M3,jb,{provide:Ub,useExisting:t},{provide:kt,useExisting:t}]),wt([Ie]),Z],decls:5,vars:26,consts:[["input",""],["type","checkbox",3,"focus","blur","change","checked","pBind"],[3,"pBind"],[4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["data-p-icon","minus",3,"class","pBind",4,"ngIf"],[3,"class","ngClass","pBind",4,"ngIf"],["data-p-icon","check",3,"class","pBind",4,"ngIf"],[3,"ngClass","pBind"],["data-p-icon","check",3,"pBind"],["data-p-icon","minus",3,"pBind"]],template:function(n,i){n&1&&(h(0,"input",1,0),A("focus",function(a){return i.onInputFocus(a)})("blur",function(a){return i.onInputBlur(a)})("change",function(a){return i.handleChange(a)}),_(),h(2,"div",2),I(3,T3,3,2,"ng-container",3)(4,k3,1,0,null,4),_()),n&2&&(qt(i.inputStyle),H(i.cn(i.cx("input"),i.inputClass)),m("checked",i.checked)("pBind",i.ptm("input")),O("id",i.inputId)("value",i.value)("name",i.name())("tabindex",i.tabindex)("required",i.required()?"":void 0)("readonly",i.readonly?"":void 0)("disabled",i.$disabled()?"":void 0)("aria-labelledby",i.ariaLabelledBy)("aria-label",i.ariaLabel),l(2),H(i.cx("box")),m("pBind",i.ptm("box")),O("data-p",i.dataP),l(),m("ngIf",!i.checkboxIconTemplate&&!i._checkboxIconTemplate),l(),m("ngTemplateOutlet",i.checkboxIconTemplate||i._checkboxIconTemplate)("ngTemplateOutletContext",Mi(22,v3,i.checked,i.cx("icon"),i.dataP)))},dependencies:[gt,Kn,gn,Mt,Le,eb,Lb,kn,Ie],encapsulation:2,changeDetection:0})}return t})(),Wb=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=_t({type:t});static \u0275inj=mt({imports:[$b,Le,Le]})}return t})();var Kb=`
757
+ .p-datepicker {
758
+ display: inline-flex;
759
+ max-width: 100%;
760
+ }
761
+
762
+ .p-datepicker:has(.p-datepicker-dropdown) .p-datepicker-input {
763
+ border-start-end-radius: 0;
764
+ border-end-end-radius: 0;
765
+ }
766
+
767
+ .p-datepicker-input {
768
+ flex: 1 1 auto;
769
+ width: 1%;
770
+ }
771
+
772
+ .p-datepicker-dropdown {
773
+ cursor: pointer;
774
+ display: inline-flex;
775
+ user-select: none;
776
+ align-items: center;
777
+ justify-content: center;
778
+ overflow: hidden;
779
+ position: relative;
780
+ width: dt('datepicker.dropdown.width');
781
+ border-start-end-radius: dt('datepicker.dropdown.border.radius');
782
+ border-end-end-radius: dt('datepicker.dropdown.border.radius');
783
+ background: dt('datepicker.dropdown.background');
784
+ border: 1px solid dt('datepicker.dropdown.border.color');
785
+ border-inline-start: 0 none;
786
+ color: dt('datepicker.dropdown.color');
787
+ transition:
788
+ background dt('datepicker.transition.duration'),
789
+ color dt('datepicker.transition.duration'),
790
+ border-color dt('datepicker.transition.duration'),
791
+ outline-color dt('datepicker.transition.duration');
792
+ outline-color: transparent;
793
+ }
794
+
795
+ .p-datepicker-dropdown:not(:disabled):hover {
796
+ background: dt('datepicker.dropdown.hover.background');
797
+ border-color: dt('datepicker.dropdown.hover.border.color');
798
+ color: dt('datepicker.dropdown.hover.color');
799
+ }
800
+
801
+ .p-datepicker-dropdown:not(:disabled):active {
802
+ background: dt('datepicker.dropdown.active.background');
803
+ border-color: dt('datepicker.dropdown.active.border.color');
804
+ color: dt('datepicker.dropdown.active.color');
805
+ }
806
+
807
+ .p-datepicker-dropdown:focus-visible {
808
+ box-shadow: dt('datepicker.dropdown.focus.ring.shadow');
809
+ outline: dt('datepicker.dropdown.focus.ring.width') dt('datepicker.dropdown.focus.ring.style') dt('datepicker.dropdown.focus.ring.color');
810
+ outline-offset: dt('datepicker.dropdown.focus.ring.offset');
811
+ }
812
+
813
+ .p-datepicker:has(.p-datepicker-input-icon-container) {
814
+ position: relative;
815
+ }
816
+
817
+ .p-datepicker:has(.p-datepicker-input-icon-container) .p-datepicker-input {
818
+ padding-inline-end: calc((dt('form.field.padding.x') * 2) + dt('icon.size'));
819
+ }
820
+
821
+ .p-datepicker-input-icon-container {
822
+ cursor: pointer;
823
+ position: absolute;
824
+ top: 50%;
825
+ inset-inline-end: dt('form.field.padding.x');
826
+ margin-block-start: calc(-1 * (dt('icon.size') / 2));
827
+ color: dt('datepicker.input.icon.color');
828
+ line-height: 1;
829
+ z-index: 1;
830
+ }
831
+
832
+ .p-datepicker:has(.p-datepicker-input:disabled) .p-datepicker-input-icon-container {
833
+ cursor: default;
834
+ }
835
+
836
+ .p-datepicker-fluid {
837
+ display: flex;
838
+ }
839
+
840
+ .p-datepicker .p-datepicker-panel {
841
+ min-width: 100%;
842
+ }
843
+
844
+ .p-datepicker-panel {
845
+ width: auto;
846
+ padding: dt('datepicker.panel.padding');
847
+ background: dt('datepicker.panel.background');
848
+ color: dt('datepicker.panel.color');
849
+ border: 1px solid dt('datepicker.panel.border.color');
850
+ border-radius: dt('datepicker.panel.border.radius');
851
+ box-shadow: dt('datepicker.panel.shadow');
852
+ }
853
+
854
+ .p-datepicker-panel-inline {
855
+ display: inline-block;
856
+ overflow-x: auto;
857
+ box-shadow: none;
858
+ }
859
+
860
+ .p-datepicker-header {
861
+ display: flex;
862
+ align-items: center;
863
+ justify-content: space-between;
864
+ padding: dt('datepicker.header.padding');
865
+ background: dt('datepicker.header.background');
866
+ color: dt('datepicker.header.color');
867
+ border-block-end: 1px solid dt('datepicker.header.border.color');
868
+ }
869
+
870
+ .p-datepicker-next-button:dir(rtl) {
871
+ order: -1;
872
+ }
873
+
874
+ .p-datepicker-prev-button:dir(rtl) {
875
+ order: 1;
876
+ }
877
+
878
+ .p-datepicker-title {
879
+ display: flex;
880
+ align-items: center;
881
+ justify-content: space-between;
882
+ gap: dt('datepicker.title.gap');
883
+ font-weight: dt('datepicker.title.font.weight');
884
+ }
885
+
886
+ .p-datepicker-select-year,
887
+ .p-datepicker-select-month {
888
+ border: none;
889
+ background: transparent;
890
+ margin: 0;
891
+ cursor: pointer;
892
+ font-weight: inherit;
893
+ transition:
894
+ background dt('datepicker.transition.duration'),
895
+ color dt('datepicker.transition.duration'),
896
+ border-color dt('datepicker.transition.duration'),
897
+ outline-color dt('datepicker.transition.duration'),
898
+ box-shadow dt('datepicker.transition.duration');
899
+ }
900
+
901
+ .p-datepicker-select-month {
902
+ padding: dt('datepicker.select.month.padding');
903
+ color: dt('datepicker.select.month.color');
904
+ border-radius: dt('datepicker.select.month.border.radius');
905
+ }
906
+
907
+ .p-datepicker-select-year {
908
+ padding: dt('datepicker.select.year.padding');
909
+ color: dt('datepicker.select.year.color');
910
+ border-radius: dt('datepicker.select.year.border.radius');
911
+ }
912
+
913
+ .p-datepicker-select-month:enabled:hover {
914
+ background: dt('datepicker.select.month.hover.background');
915
+ color: dt('datepicker.select.month.hover.color');
916
+ }
917
+
918
+ .p-datepicker-select-year:enabled:hover {
919
+ background: dt('datepicker.select.year.hover.background');
920
+ color: dt('datepicker.select.year.hover.color');
921
+ }
922
+
923
+ .p-datepicker-select-month:focus-visible,
924
+ .p-datepicker-select-year:focus-visible {
925
+ box-shadow: dt('datepicker.date.focus.ring.shadow');
926
+ outline: dt('datepicker.date.focus.ring.width') dt('datepicker.date.focus.ring.style') dt('datepicker.date.focus.ring.color');
927
+ outline-offset: dt('datepicker.date.focus.ring.offset');
928
+ }
929
+
930
+ .p-datepicker-calendar-container {
931
+ display: flex;
932
+ }
933
+
934
+ .p-datepicker-calendar-container .p-datepicker-calendar {
935
+ flex: 1 1 auto;
936
+ border-inline-start: 1px solid dt('datepicker.group.border.color');
937
+ padding-inline-end: dt('datepicker.group.gap');
938
+ padding-inline-start: dt('datepicker.group.gap');
939
+ }
940
+
941
+ .p-datepicker-calendar-container .p-datepicker-calendar:first-child {
942
+ padding-inline-start: 0;
943
+ border-inline-start: 0 none;
944
+ }
945
+
946
+ .p-datepicker-calendar-container .p-datepicker-calendar:last-child {
947
+ padding-inline-end: 0;
948
+ }
949
+
950
+ .p-datepicker-day-view {
951
+ width: 100%;
952
+ border-collapse: collapse;
953
+ font-size: 1rem;
954
+ margin: dt('datepicker.day.view.margin');
955
+ }
956
+
957
+ .p-datepicker-weekday-cell {
958
+ padding: dt('datepicker.week.day.padding');
959
+ }
960
+
961
+ .p-datepicker-weekday {
962
+ font-weight: dt('datepicker.week.day.font.weight');
963
+ color: dt('datepicker.week.day.color');
964
+ }
965
+
966
+ .p-datepicker-day-cell {
967
+ padding: dt('datepicker.date.padding');
968
+ }
969
+
970
+ .p-datepicker-day {
971
+ display: flex;
972
+ justify-content: center;
973
+ align-items: center;
974
+ cursor: pointer;
975
+ margin: 0 auto;
976
+ overflow: hidden;
977
+ position: relative;
978
+ width: dt('datepicker.date.width');
979
+ height: dt('datepicker.date.height');
980
+ border-radius: dt('datepicker.date.border.radius');
981
+ transition:
982
+ background dt('datepicker.transition.duration'),
983
+ color dt('datepicker.transition.duration'),
984
+ border-color dt('datepicker.transition.duration'),
985
+ box-shadow dt('datepicker.transition.duration'),
986
+ outline-color dt('datepicker.transition.duration');
987
+ border: 1px solid transparent;
988
+ outline-color: transparent;
989
+ color: dt('datepicker.date.color');
990
+ }
991
+
992
+ .p-datepicker-day:not(.p-datepicker-day-selected):not(.p-disabled):hover {
993
+ background: dt('datepicker.date.hover.background');
994
+ color: dt('datepicker.date.hover.color');
995
+ }
996
+
997
+ .p-datepicker-day:focus-visible {
998
+ box-shadow: dt('datepicker.date.focus.ring.shadow');
999
+ outline: dt('datepicker.date.focus.ring.width') dt('datepicker.date.focus.ring.style') dt('datepicker.date.focus.ring.color');
1000
+ outline-offset: dt('datepicker.date.focus.ring.offset');
1001
+ }
1002
+
1003
+ .p-datepicker-day-selected {
1004
+ background: dt('datepicker.date.selected.background');
1005
+ color: dt('datepicker.date.selected.color');
1006
+ }
1007
+
1008
+ .p-datepicker-day-selected-range {
1009
+ background: dt('datepicker.date.range.selected.background');
1010
+ color: dt('datepicker.date.range.selected.color');
1011
+ }
1012
+
1013
+ .p-datepicker-today > .p-datepicker-day {
1014
+ background: dt('datepicker.today.background');
1015
+ color: dt('datepicker.today.color');
1016
+ }
1017
+
1018
+ .p-datepicker-today > .p-datepicker-day-selected {
1019
+ background: dt('datepicker.date.selected.background');
1020
+ color: dt('datepicker.date.selected.color');
1021
+ }
1022
+
1023
+ .p-datepicker-today > .p-datepicker-day-selected-range {
1024
+ background: dt('datepicker.date.range.selected.background');
1025
+ color: dt('datepicker.date.range.selected.color');
1026
+ }
1027
+
1028
+ .p-datepicker-weeknumber {
1029
+ text-align: center;
1030
+ }
1031
+
1032
+ .p-datepicker-month-view {
1033
+ margin: dt('datepicker.month.view.margin');
1034
+ }
1035
+
1036
+ .p-datepicker-month {
1037
+ width: 33.3%;
1038
+ display: inline-flex;
1039
+ align-items: center;
1040
+ justify-content: center;
1041
+ cursor: pointer;
1042
+ overflow: hidden;
1043
+ position: relative;
1044
+ padding: dt('datepicker.month.padding');
1045
+ transition:
1046
+ background dt('datepicker.transition.duration'),
1047
+ color dt('datepicker.transition.duration'),
1048
+ border-color dt('datepicker.transition.duration'),
1049
+ box-shadow dt('datepicker.transition.duration'),
1050
+ outline-color dt('datepicker.transition.duration');
1051
+ border-radius: dt('datepicker.month.border.radius');
1052
+ outline-color: transparent;
1053
+ color: dt('datepicker.date.color');
1054
+ }
1055
+
1056
+ .p-datepicker-month:not(.p-disabled):not(.p-datepicker-month-selected):hover {
1057
+ color: dt('datepicker.date.hover.color');
1058
+ background: dt('datepicker.date.hover.background');
1059
+ }
1060
+
1061
+ .p-datepicker-month-selected {
1062
+ color: dt('datepicker.date.selected.color');
1063
+ background: dt('datepicker.date.selected.background');
1064
+ }
1065
+
1066
+ .p-datepicker-month:not(.p-disabled):focus-visible {
1067
+ box-shadow: dt('datepicker.date.focus.ring.shadow');
1068
+ outline: dt('datepicker.date.focus.ring.width') dt('datepicker.date.focus.ring.style') dt('datepicker.date.focus.ring.color');
1069
+ outline-offset: dt('datepicker.date.focus.ring.offset');
1070
+ }
1071
+
1072
+ .p-datepicker-year-view {
1073
+ margin: dt('datepicker.year.view.margin');
1074
+ }
1075
+
1076
+ .p-datepicker-year {
1077
+ width: 50%;
1078
+ display: inline-flex;
1079
+ align-items: center;
1080
+ justify-content: center;
1081
+ cursor: pointer;
1082
+ overflow: hidden;
1083
+ position: relative;
1084
+ padding: dt('datepicker.year.padding');
1085
+ transition:
1086
+ background dt('datepicker.transition.duration'),
1087
+ color dt('datepicker.transition.duration'),
1088
+ border-color dt('datepicker.transition.duration'),
1089
+ box-shadow dt('datepicker.transition.duration'),
1090
+ outline-color dt('datepicker.transition.duration');
1091
+ border-radius: dt('datepicker.year.border.radius');
1092
+ outline-color: transparent;
1093
+ color: dt('datepicker.date.color');
1094
+ }
1095
+
1096
+ .p-datepicker-year:not(.p-disabled):not(.p-datepicker-year-selected):hover {
1097
+ color: dt('datepicker.date.hover.color');
1098
+ background: dt('datepicker.date.hover.background');
1099
+ }
1100
+
1101
+ .p-datepicker-year-selected {
1102
+ color: dt('datepicker.date.selected.color');
1103
+ background: dt('datepicker.date.selected.background');
1104
+ }
1105
+
1106
+ .p-datepicker-year:not(.p-disabled):focus-visible {
1107
+ box-shadow: dt('datepicker.date.focus.ring.shadow');
1108
+ outline: dt('datepicker.date.focus.ring.width') dt('datepicker.date.focus.ring.style') dt('datepicker.date.focus.ring.color');
1109
+ outline-offset: dt('datepicker.date.focus.ring.offset');
1110
+ }
1111
+
1112
+ .p-datepicker-buttonbar {
1113
+ display: flex;
1114
+ justify-content: space-between;
1115
+ align-items: center;
1116
+ padding: dt('datepicker.buttonbar.padding');
1117
+ border-block-start: 1px solid dt('datepicker.buttonbar.border.color');
1118
+ }
1119
+
1120
+ .p-datepicker-buttonbar .p-button {
1121
+ width: auto;
1122
+ }
1123
+
1124
+ .p-datepicker-time-picker {
1125
+ display: flex;
1126
+ justify-content: center;
1127
+ align-items: center;
1128
+ border-block-start: 1px solid dt('datepicker.time.picker.border.color');
1129
+ padding: 0;
1130
+ gap: dt('datepicker.time.picker.gap');
1131
+ }
1132
+
1133
+ .p-datepicker-calendar-container + .p-datepicker-time-picker {
1134
+ padding: dt('datepicker.time.picker.padding');
1135
+ }
1136
+
1137
+ .p-datepicker-time-picker > div {
1138
+ display: flex;
1139
+ align-items: center;
1140
+ flex-direction: column;
1141
+ gap: dt('datepicker.time.picker.button.gap');
1142
+ }
1143
+
1144
+ .p-datepicker-time-picker span {
1145
+ font-size: 1rem;
1146
+ }
1147
+
1148
+ .p-datepicker-timeonly .p-datepicker-time-picker {
1149
+ border-block-start: 0 none;
1150
+ }
1151
+
1152
+ .p-datepicker-time-picker:dir(rtl) {
1153
+ flex-direction: row-reverse;
1154
+ }
1155
+
1156
+ .p-datepicker:has(.p-inputtext-sm) .p-datepicker-dropdown {
1157
+ width: dt('datepicker.dropdown.sm.width');
1158
+ }
1159
+
1160
+ .p-datepicker:has(.p-inputtext-sm) .p-datepicker-dropdown .p-icon,
1161
+ .p-datepicker:has(.p-inputtext-sm) .p-datepicker-input-icon {
1162
+ font-size: dt('form.field.sm.font.size');
1163
+ width: dt('form.field.sm.font.size');
1164
+ height: dt('form.field.sm.font.size');
1165
+ }
1166
+
1167
+ .p-datepicker:has(.p-inputtext-lg) .p-datepicker-dropdown {
1168
+ width: dt('datepicker.dropdown.lg.width');
1169
+ }
1170
+
1171
+ .p-datepicker:has(.p-inputtext-lg) .p-datepicker-dropdown .p-icon,
1172
+ .p-datepicker:has(.p-inputtext-lg) .p-datepicker-input-icon {
1173
+ font-size: dt('form.field.lg.font.size');
1174
+ width: dt('form.field.lg.font.size');
1175
+ height: dt('form.field.lg.font.size');
1176
+ }
1177
+
1178
+ .p-datepicker-clear-icon {
1179
+ position: absolute;
1180
+ top: 50%;
1181
+ margin-top: -0.5rem;
1182
+ cursor: pointer;
1183
+ color: dt('form.field.icon.color');
1184
+ inset-inline-end: dt('form.field.padding.x');
1185
+ }
1186
+
1187
+ .p-datepicker:has(.p-datepicker-dropdown) .p-datepicker-clear-icon {
1188
+ inset-inline-end: calc(dt('datepicker.dropdown.width') + dt('form.field.padding.x'));
1189
+ }
1190
+
1191
+ .p-datepicker:has(.p-datepicker-input-icon-container) .p-datepicker-clear-icon {
1192
+ inset-inline-end: calc((dt('form.field.padding.x') * 2) + dt('icon.size'));
1193
+ }
1194
+
1195
+ .p-datepicker:has(.p-datepicker-clear-icon) .p-datepicker-input {
1196
+ padding-inline-end: calc((dt('form.field.padding.x') * 2) + dt('icon.size'));
1197
+ }
1198
+
1199
+ .p-datepicker:has(.p-datepicker-input-icon-container):has(.p-datepicker-clear-icon) .p-datepicker-input {
1200
+ padding-inline-end: calc((dt('form.field.padding.x') * 3) + calc(dt('icon.size') * 2));
1201
+ }
1202
+
1203
+ .p-inputgroup .p-datepicker-dropdown {
1204
+ border-radius: 0;
1205
+ }
1206
+
1207
+ .p-inputgroup > .p-datepicker:last-child:has(.p-datepicker-dropdown) > .p-datepicker-input {
1208
+ border-start-end-radius: 0;
1209
+ border-end-end-radius: 0;
1210
+ }
1211
+
1212
+ .p-inputgroup > .p-datepicker:last-child .p-datepicker-dropdown {
1213
+ border-start-end-radius: dt('datepicker.dropdown.border.radius');
1214
+ border-end-end-radius: dt('datepicker.dropdown.border.radius');
1215
+ }
1216
+ `;var P3=["date"],R3=["header"],O3=["footer"],F3=["disabledDate"],N3=["decade"],A3=["previousicon"],L3=["nexticon"],B3=["triggericon"],V3=["clearicon"],z3=["decrementicon"],H3=["incrementicon"],q3=["inputicon"],G3=["buttonbar"],j3=["inputfield"],U3=["contentWrapper"],$3=[[["p-header"]],[["p-footer"]]],W3=["p-header","p-footer"],K3=t=>({clickCallBack:t}),Yb=t=>({visibility:t}),Gf=t=>({$implicit:t}),Y3=t=>({date:t}),X3=(t,o)=>({month:t,index:o}),Z3=t=>({year:t}),Q3=(t,o)=>({todayCallback:t,clearCallback:o});function J3(t,o){if(t&1){let e=W();$(),h(0,"svg",13),A("click",function(){w(e);let i=d(3);return T(i.clear())}),_()}if(t&2){let e=d(3);H(e.cx("clearIcon")),m("pBind",e.ptm("inputIcon"))}}function eR(t,o){}function tR(t,o){t&1&&I(0,eR,0,0,"ng-template")}function nR(t,o){if(t&1){let e=W();h(0,"span",14),A("click",function(){w(e);let i=d(3);return T(i.clear())}),I(1,tR,1,0,null,6),_()}if(t&2){let e=d(3);H(e.cx("clearIcon")),m("pBind",e.ptm("inputIcon")),l(),m("ngTemplateOutlet",e.clearIconTemplate||e._clearIconTemplate)}}function iR(t,o){if(t&1&&(me(0),I(1,J3,1,3,"svg",11)(2,nR,2,4,"span",12),_e()),t&2){let e=d(2);l(),m("ngIf",!e.clearIconTemplate&&!e._clearIconTemplate),l(),m("ngIf",e.clearIconTemplate||e._clearIconTemplate)}}function oR(t,o){if(t&1&&N(0,"span",17),t&2){let e=d(3);m("ngClass",e.icon)("pBind",e.ptm("dropdownIcon"))}}function rR(t,o){if(t&1&&($(),N(0,"svg",19)),t&2){let e=d(4);m("pBind",e.ptm("dropdownIcon"))}}function aR(t,o){}function sR(t,o){t&1&&I(0,aR,0,0,"ng-template")}function lR(t,o){if(t&1&&(me(0),I(1,rR,1,1,"svg",18)(2,sR,1,0,null,6),_e()),t&2){let e=d(3);l(),m("ngIf",!e.triggerIconTemplate&&!e._triggerIconTemplate),l(),m("ngTemplateOutlet",e.triggerIconTemplate||e._triggerIconTemplate)}}function cR(t,o){if(t&1){let e=W();h(0,"button",15),A("click",function(i){w(e),d();let r=yt(1),a=d();return T(a.onButtonClick(i,r))}),I(1,oR,1,2,"span",16)(2,lR,3,2,"ng-container",7),_()}if(t&2){let e=d(2);H(e.cx("dropdown")),m("disabled",e.$disabled())("pBind",e.ptm("dropdown")),O("aria-label",e.iconButtonAriaLabel)("aria-expanded",e.overlayVisible??!1)("aria-controls",e.overlayVisible?e.panelId:null),l(),m("ngIf",e.icon),l(),m("ngIf",!e.icon)}}function dR(t,o){if(t&1){let e=W();$(),h(0,"svg",23),A("click",function(i){w(e);let r=d(3);return T(r.onButtonClick(i))}),_()}if(t&2){let e=d(3);H(e.cx("inputIcon")),m("pBind",e.ptm("inputIcon"))}}function uR(t,o){t&1&&le(0)}function pR(t,o){if(t&1&&(me(0),h(1,"span",20),I(2,dR,1,3,"svg",21)(3,uR,1,0,"ng-container",22),_(),_e()),t&2){let e=d(2);l(),H(e.cx("inputIconContainer")),m("pBind",e.ptm("inputIconContainer")),O("data-p",e.inputIconDataP),l(),m("ngIf",!e.inputIconTemplate&&!e._inputIconTemplate),l(),m("ngTemplateOutlet",e.inputIconTemplate||e._inputIconTemplate)("ngTemplateOutletContext",Oe(7,K3,e.onButtonClick.bind(e)))}}function hR(t,o){if(t&1){let e=W();h(0,"input",9,1),A("focus",function(i){w(e);let r=d();return T(r.onInputFocus(i))})("keydown",function(i){w(e);let r=d();return T(r.onInputKeydown(i))})("click",function(){w(e);let i=d();return T(i.onInputClick())})("blur",function(i){w(e);let r=d();return T(r.onInputBlur(i))})("input",function(i){w(e);let r=d();return T(r.onUserInput(i))}),_(),I(2,iR,3,2,"ng-container",7)(3,cR,3,9,"button",10)(4,pR,4,9,"ng-container",7)}if(t&2){let e=d();H(e.cn(e.cx("pcInputText"),e.inputStyleClass)),m("pSize",e.size())("value",e.inputFieldValue)("ngStyle",e.inputStyle)("pAutoFocus",e.autofocus)("variant",e.$variant())("fluid",e.hasFluid)("invalid",e.invalid())("pt",e.ptm("pcInputText"))("unstyled",e.unstyled()),O("size",e.inputSize())("id",e.inputId)("name",e.name())("aria-required",e.required())("aria-expanded",e.overlayVisible??!1)("aria-controls",e.overlayVisible?e.panelId:null)("aria-labelledby",e.ariaLabelledBy)("aria-label",e.ariaLabel)("required",e.required()?"":void 0)("readonly",e.readonlyInput?"":void 0)("disabled",e.$disabled()?"":void 0)("placeholder",e.placeholder)("tabindex",e.tabindex)("inputmode",e.touchUI?"off":null),l(2),m("ngIf",e.showClear&&!e.$disabled()&&(e.inputfieldViewChild==null||e.inputfieldViewChild.nativeElement==null?null:e.inputfieldViewChild.nativeElement.value)),l(),m("ngIf",e.showIcon&&e.iconDisplay==="button"),l(),m("ngIf",e.iconDisplay==="input"&&e.showIcon)}}function fR(t,o){t&1&&le(0)}function mR(t,o){t&1&&($(),N(0,"svg",30))}function _R(t,o){}function gR(t,o){t&1&&I(0,_R,0,0,"ng-template")}function bR(t,o){if(t&1&&(h(0,"span"),I(1,gR,1,0,null,6),_()),t&2){let e=d(4);l(),m("ngTemplateOutlet",e.previousIconTemplate||e._previousIconTemplate)}}function vR(t,o){if(t&1&&I(0,mR,1,0,"svg",29)(1,bR,2,1,"span",7),t&2){let e=d(3);m("ngIf",!e.previousIconTemplate&&!e._previousIconTemplate),l(),m("ngIf",e.previousIconTemplate||e._previousIconTemplate)}}function yR(t,o){if(t&1){let e=W();h(0,"button",31),A("click",function(i){w(e);let r=d(3);return T(r.switchToMonthView(i))})("keydown",function(i){w(e);let r=d(3);return T(r.onContainerButtonKeydown(i))}),b(1),_()}if(t&2){let e=d().$implicit,n=d(2);H(n.cx("selectMonth")),m("pBind",n.ptm("selectMonth")),O("disabled",n.switchViewButtonDisabled()?"":void 0)("aria-label",n.getTranslation("chooseMonth"))("data-pc-group-section","navigator"),l(),ke(" ",n.getMonthName(e.month)," ")}}function CR(t,o){if(t&1){let e=W();h(0,"button",31),A("click",function(i){w(e);let r=d(3);return T(r.switchToYearView(i))})("keydown",function(i){w(e);let r=d(3);return T(r.onContainerButtonKeydown(i))}),b(1),_()}if(t&2){let e=d().$implicit,n=d(2);H(n.cx("selectYear")),m("pBind",n.ptm("selectYear")),O("disabled",n.switchViewButtonDisabled()?"":void 0)("aria-label",n.getTranslation("chooseYear"))("data-pc-group-section","navigator"),l(),ke(" ",n.getYear(e)," ")}}function xR(t,o){if(t&1&&(me(0),b(1),_e()),t&2){let e=d(4);l(),E0("",e.yearPickerValues()[0]," - ",e.yearPickerValues()[e.yearPickerValues().length-1])}}function wR(t,o){t&1&&le(0)}function TR(t,o){if(t&1&&(h(0,"span",20),I(1,xR,2,2,"ng-container",7)(2,wR,1,0,"ng-container",22),_()),t&2){let e=d(3);H(e.cx("decade")),m("pBind",e.ptm("decade")),l(),m("ngIf",!e.decadeTemplate&&!e._decadeTemplate),l(),m("ngTemplateOutlet",e.decadeTemplate||e._decadeTemplate)("ngTemplateOutletContext",Oe(6,Gf,e.yearPickerValues))}}function SR(t,o){t&1&&($(),N(0,"svg",33))}function kR(t,o){}function IR(t,o){t&1&&I(0,kR,0,0,"ng-template")}function ER(t,o){if(t&1&&(me(0),I(1,IR,1,0,null,6),_e()),t&2){let e=d(4);l(),m("ngTemplateOutlet",e.nextIconTemplate||e._nextIconTemplate)}}function MR(t,o){if(t&1&&I(0,SR,1,0,"svg",32)(1,ER,2,1,"ng-container",7),t&2){let e=d(3);m("ngIf",!e.nextIconTemplate&&!e._nextIconTemplate),l(),m("ngIf",e.nextIconTemplate||e._nextIconTemplate)}}function DR(t,o){if(t&1&&(h(0,"th",20)(1,"span",20),b(2),_()()),t&2){let e=d(4);H(e.cx("weekHeader")),m("pBind",e.ptm("weekHeader")),l(),m("pBind",e.ptm("weekHeaderLabel")),l(),x(e.getTranslation("weekHeader"))}}function PR(t,o){if(t&1&&(h(0,"th",37)(1,"span",20),b(2),_()()),t&2){let e=o.$implicit,n=d(4);H(n.cx("weekDayCell")),m("pBind",n.ptm("weekDayCell")),l(),H(n.cx("weekDay")),m("pBind",n.ptm("weekDay")),l(),x(e)}}function RR(t,o){if(t&1&&(h(0,"td",20)(1,"span",20),b(2),_()()),t&2){let e=d().index,n=d(2).$implicit,i=d(2);H(i.cx("weekNumber")),m("pBind",i.ptm("weekNumber")),l(),H(i.cx("weekLabelContainer")),m("pBind",i.ptm("weekLabelContainer")),l(),ke(" ",n.weekNumbers[e]," ")}}function OR(t,o){if(t&1&&(me(0),b(1),_e()),t&2){let e=d(2).$implicit;l(),x(e.day)}}function FR(t,o){t&1&&le(0)}function NR(t,o){if(t&1&&(me(0),I(1,FR,1,0,"ng-container",22),_e()),t&2){let e=d(2).$implicit,n=d(5);l(),m("ngTemplateOutlet",n.dateTemplate||n._dateTemplate)("ngTemplateOutletContext",Oe(2,Gf,e))}}function AR(t,o){t&1&&le(0)}function LR(t,o){if(t&1&&(me(0),I(1,AR,1,0,"ng-container",22),_e()),t&2){let e=d(2).$implicit,n=d(5);l(),m("ngTemplateOutlet",n.disabledDateTemplate||n._disabledDateTemplate)("ngTemplateOutletContext",Oe(2,Gf,e))}}function BR(t,o){if(t&1&&(h(0,"div",40),b(1),_()),t&2){let e=d(2).$implicit;l(),ke(" ",e.day," ")}}function VR(t,o){if(t&1){let e=W();me(0),h(1,"span",38),A("click",function(i){w(e);let r=d().$implicit,a=d(5);return T(a.onDateSelect(i,r))})("keydown",function(i){w(e);let r=d().$implicit,a=d(3).index,s=d(2);return T(s.onDateCellKeydown(i,r,a))}),I(2,OR,2,1,"ng-container",7)(3,NR,2,4,"ng-container",7)(4,LR,2,4,"ng-container",7),_(),I(5,BR,2,1,"div",39),_e()}if(t&2){let e=d().$implicit,n=d(5);l(),m("ngClass",n.dayClass(e))("pBind",n.ptm("day")),O("data-date",n.formatDateKey(n.formatDateMetaToDate(e))),l(),m("ngIf",!n.dateTemplate&&!n._dateTemplate&&(e.selectable||!n.disabledDateTemplate&&!n._disabledDateTemplate)),l(),m("ngIf",e.selectable||!n.disabledDateTemplate&&!n._disabledDateTemplate),l(),m("ngIf",!e.selectable),l(),m("ngIf",n.isSelected(e))}}function zR(t,o){if(t&1&&(h(0,"td",20),I(1,VR,6,7,"ng-container",7),_()),t&2){let e=o.$implicit,n=d(5);H(n.cx("dayCell",Oe(5,Y3,e))),m("pBind",n.ptm("dayCell")),O("aria-label",e.day),l(),m("ngIf",e.otherMonth?n.showOtherMonths:!0)}}function HR(t,o){if(t&1&&(h(0,"tr",20),I(1,RR,3,7,"td",8)(2,zR,2,7,"td",24),_()),t&2){let e=o.$implicit,n=d(4);m("pBind",n.ptm("tableBodyRow")),l(),m("ngIf",n.showWeek),l(),m("ngForOf",e)}}function qR(t,o){if(t&1&&(h(0,"table",34)(1,"thead",20)(2,"tr",20),I(3,DR,3,5,"th",8)(4,PR,3,7,"th",35),_()(),h(5,"tbody",20),I(6,HR,3,3,"tr",36),_()()),t&2){let e=d().$implicit,n=d(2);H(n.cx("dayView")),m("pBind",n.ptm("table")),l(),m("pBind",n.ptm("tableHeader")),l(),m("pBind",n.ptm("tableHeaderRow")),l(),m("ngIf",n.showWeek),l(),m("ngForOf",n.weekDays),l(),m("pBind",n.ptm("tableBody")),l(),m("ngForOf",e.dates)}}function GR(t,o){if(t&1){let e=W();h(0,"div",20)(1,"div",20)(2,"p-button",25),A("keydown",function(i){w(e);let r=d(2);return T(r.onContainerButtonKeydown(i))})("onClick",function(i){w(e);let r=d(2);return T(r.onPrevButtonClick(i))}),I(3,vR,2,2,"ng-template",null,2,We),_(),h(5,"div",20),I(6,yR,2,7,"button",26)(7,CR,2,7,"button",26)(8,TR,3,8,"span",8),_(),h(9,"p-button",27),A("keydown",function(i){w(e);let r=d(2);return T(r.onContainerButtonKeydown(i))})("onClick",function(i){w(e);let r=d(2);return T(r.onNextButtonClick(i))}),I(10,MR,2,2,"ng-template",null,2,We),_()(),I(12,qR,7,9,"table",28),_()}if(t&2){let e=o.index,n=d(2);H(n.cx("calendar")),m("pBind",n.ptm("calendar")),l(),H(n.cx("header")),m("pBind",n.ptm("header")),l(),m("styleClass",n.cx("pcPrevButton"))("ngStyle",Oe(23,Yb,e===0?"visible":"hidden"))("ariaLabel",n.prevIconAriaLabel)("pt",n.ptm("pcPrevButton")),O("data-pc-group-section","navigator"),l(3),H(n.cx("title")),m("pBind",n.ptm("title")),l(),m("ngIf",n.currentView==="date"),l(),m("ngIf",n.currentView!=="year"),l(),m("ngIf",n.currentView==="year"),l(),m("styleClass",n.cx("pcNextButton"))("ngStyle",Oe(25,Yb,e===n.months.length-1?"visible":"hidden"))("ariaLabel",n.nextIconAriaLabel)("pt",n.ptm("pcNextButton")),O("data-pc-group-section","navigator"),l(3),m("ngIf",n.currentView==="date")}}function jR(t,o){if(t&1&&(h(0,"div",40),b(1),_()),t&2){let e=d().$implicit;l(),ke(" ",e," ")}}function UR(t,o){if(t&1){let e=W();h(0,"span",42),A("click",function(i){let r=w(e).index,a=d(3);return T(a.onMonthSelect(i,r))})("keydown",function(i){let r=w(e).index,a=d(3);return T(a.onMonthCellKeydown(i,r))}),b(1),I(2,jR,2,1,"div",39),_()}if(t&2){let e=o.$implicit,n=o.index,i=d(3);H(i.cx("month",Wn(5,X3,e,n))),m("pBind",i.ptm("month")),l(),ke(" ",e," "),l(),m("ngIf",i.isMonthSelected(n))}}function $R(t,o){if(t&1&&(h(0,"div",20),I(1,UR,3,8,"span",41),_()),t&2){let e=d(2);H(e.cx("monthView")),m("pBind",e.ptm("monthView")),l(),m("ngForOf",e.monthPickerValues())}}function WR(t,o){if(t&1&&(h(0,"div",40),b(1),_()),t&2){let e=d().$implicit;l(),ke(" ",e," ")}}function KR(t,o){if(t&1){let e=W();h(0,"span",42),A("click",function(i){let r=w(e).$implicit,a=d(3);return T(a.onYearSelect(i,r))})("keydown",function(i){let r=w(e).$implicit,a=d(3);return T(a.onYearCellKeydown(i,r))}),b(1),I(2,WR,2,1,"div",39),_()}if(t&2){let e=o.$implicit,n=d(3);H(n.cx("year",Oe(5,Z3,e))),m("pBind",n.ptm("year")),l(),ke(" ",e," "),l(),m("ngIf",n.isYearSelected(e))}}function YR(t,o){if(t&1&&(h(0,"div",20),I(1,KR,3,7,"span",41),_()),t&2){let e=d(2);H(e.cx("yearView")),m("pBind",e.ptm("yearView")),l(),m("ngForOf",e.yearPickerValues())}}function XR(t,o){if(t&1&&(me(0),h(1,"div",20),I(2,GR,13,27,"div",24),_(),I(3,$R,2,4,"div",8)(4,YR,2,4,"div",8),_e()),t&2){let e=d();l(),H(e.cx("calendarContainer")),m("pBind",e.ptm("calendarContainer")),l(),m("ngForOf",e.months),l(),m("ngIf",e.currentView==="month"),l(),m("ngIf",e.currentView==="year")}}function ZR(t,o){if(t&1&&($(),N(0,"svg",46)),t&2){let e=d(3);m("pBind",e.ptm("pcIncrementButton").icon)}}function QR(t,o){}function JR(t,o){t&1&&I(0,QR,0,0,"ng-template")}function eO(t,o){if(t&1&&I(0,ZR,1,1,"svg",45)(1,JR,1,0,null,6),t&2){let e=d(2);m("ngIf",!e.incrementIconTemplate&&!e._incrementIconTemplate),l(),m("ngTemplateOutlet",e.incrementIconTemplate||e._incrementIconTemplate)}}function tO(t,o){t&1&&(me(0),b(1,"0"),_e())}function nO(t,o){if(t&1&&($(),N(0,"svg",48)),t&2){let e=d(3);m("pBind",e.ptm("pcDecrementButton").icon)}}function iO(t,o){}function oO(t,o){t&1&&I(0,iO,0,0,"ng-template")}function rO(t,o){if(t&1&&I(0,nO,1,1,"svg",47)(1,oO,1,0,null,6),t&2){let e=d(2);m("ngIf",!e.decrementIconTemplate&&!e._decrementIconTemplate),l(),m("ngTemplateOutlet",e.decrementIconTemplate||e._decrementIconTemplate)}}function aO(t,o){if(t&1&&($(),N(0,"svg",46)),t&2){let e=d(3);m("pBind",e.ptm("pcIncrementButton").icon)}}function sO(t,o){}function lO(t,o){t&1&&I(0,sO,0,0,"ng-template")}function cO(t,o){if(t&1&&I(0,aO,1,1,"svg",45)(1,lO,1,0,null,6),t&2){let e=d(2);m("ngIf",!e.incrementIconTemplate&&!e._incrementIconTemplate),l(),m("ngTemplateOutlet",e.incrementIconTemplate||e._incrementIconTemplate)}}function dO(t,o){t&1&&(me(0),b(1,"0"),_e())}function uO(t,o){if(t&1&&($(),N(0,"svg",48)),t&2){let e=d(3);m("pBind",e.ptm("pcDecrementButton").icon)}}function pO(t,o){}function hO(t,o){t&1&&I(0,pO,0,0,"ng-template")}function fO(t,o){if(t&1&&I(0,uO,1,1,"svg",47)(1,hO,1,0,null,6),t&2){let e=d(2);m("ngIf",!e.decrementIconTemplate&&!e._decrementIconTemplate),l(),m("ngTemplateOutlet",e.decrementIconTemplate||e._decrementIconTemplate)}}function mO(t,o){if(t&1&&(h(0,"div",20)(1,"span",20),b(2),_()()),t&2){let e=d(2);H(e.cx("separator")),m("pBind",e.ptm("separatorContainer")),l(),m("pBind",e.ptm("separator")),l(),x(e.timeSeparator)}}function _O(t,o){if(t&1&&($(),N(0,"svg",46)),t&2){let e=d(4);m("pBind",e.ptm("pcIncrementButton").icon)}}function gO(t,o){}function bO(t,o){t&1&&I(0,gO,0,0,"ng-template")}function vO(t,o){if(t&1&&I(0,_O,1,1,"svg",45)(1,bO,1,0,null,6),t&2){let e=d(3);m("ngIf",!e.incrementIconTemplate&&!e._incrementIconTemplate),l(),m("ngTemplateOutlet",e.incrementIconTemplate||e._incrementIconTemplate)}}function yO(t,o){t&1&&(me(0),b(1,"0"),_e())}function CO(t,o){if(t&1&&($(),N(0,"svg",48)),t&2){let e=d(4);m("pBind",e.ptm("pcDecrementButton").icon)}}function xO(t,o){}function wO(t,o){t&1&&I(0,xO,0,0,"ng-template")}function TO(t,o){if(t&1&&I(0,CO,1,1,"svg",47)(1,wO,1,0,null,6),t&2){let e=d(3);m("ngIf",!e.decrementIconTemplate&&!e._decrementIconTemplate),l(),m("ngTemplateOutlet",e.decrementIconTemplate||e._decrementIconTemplate)}}function SO(t,o){if(t&1){let e=W();h(0,"div",20)(1,"p-button",43),A("keydown",function(i){w(e);let r=d(2);return T(r.onContainerButtonKeydown(i))})("keydown.enter",function(i){w(e);let r=d(2);return T(r.incrementSecond(i))})("keydown.space",function(i){w(e);let r=d(2);return T(r.incrementSecond(i))})("mousedown",function(i){w(e);let r=d(2);return T(r.onTimePickerElementMouseDown(i,2,1))})("mouseup",function(i){w(e);let r=d(2);return T(r.onTimePickerElementMouseUp(i))})("keyup.enter",function(i){w(e);let r=d(2);return T(r.onTimePickerElementMouseUp(i))})("keyup.space",function(i){w(e);let r=d(2);return T(r.onTimePickerElementMouseUp(i))})("mouseleave",function(){w(e);let i=d(2);return T(i.onTimePickerElementMouseLeave())}),I(2,vO,2,2,"ng-template",null,2,We),_(),h(4,"span",20),I(5,yO,2,0,"ng-container",7),b(6),_(),h(7,"p-button",43),A("keydown",function(i){w(e);let r=d(2);return T(r.onContainerButtonKeydown(i))})("keydown.enter",function(i){w(e);let r=d(2);return T(r.decrementSecond(i))})("keydown.space",function(i){w(e);let r=d(2);return T(r.decrementSecond(i))})("mousedown",function(i){w(e);let r=d(2);return T(r.onTimePickerElementMouseDown(i,2,-1))})("mouseup",function(i){w(e);let r=d(2);return T(r.onTimePickerElementMouseUp(i))})("keyup.enter",function(i){w(e);let r=d(2);return T(r.onTimePickerElementMouseUp(i))})("keyup.space",function(i){w(e);let r=d(2);return T(r.onTimePickerElementMouseUp(i))})("mouseleave",function(){w(e);let i=d(2);return T(i.onTimePickerElementMouseLeave())}),I(8,TO,2,2,"ng-template",null,2,We),_()()}if(t&2){let e=d(2);H(e.cx("secondPicker")),m("pBind",e.ptm("secondPicker")),l(),m("styleClass",e.cx("pcIncrementButton"))("pt",e.ptm("pcIncrementButton")),O("aria-label",e.getTranslation("nextSecond"))("data-pc-group-section","timepickerbutton"),l(3),m("pBind",e.ptm("second")),l(),m("ngIf",e.currentSecond<10),l(),x(e.currentSecond),l(),m("styleClass",e.cx("pcDecrementButton"))("pt",e.ptm("pcDecrementButton")),O("aria-label",e.getTranslation("prevSecond"))("data-pc-group-section","timepickerbutton")}}function kO(t,o){if(t&1&&(h(0,"div",20)(1,"span",20),b(2),_()()),t&2){let e=d(2);H(e.cx("separator")),m("pBind",e.ptm("separatorContainer")),l(),m("pBind",e.ptm("separator")),l(),x(e.timeSeparator)}}function IO(t,o){if(t&1&&($(),N(0,"svg",46)),t&2){let e=d(4);m("pBind",e.ptm("pcIncrementButton").icon)}}function EO(t,o){}function MO(t,o){t&1&&I(0,EO,0,0,"ng-template")}function DO(t,o){if(t&1&&I(0,IO,1,1,"svg",45)(1,MO,1,0,null,6),t&2){let e=d(3);m("ngIf",!e.incrementIconTemplate&&!e._incrementIconTemplate),l(),m("ngTemplateOutlet",e.incrementIconTemplate||e._incrementIconTemplate)}}function PO(t,o){if(t&1&&($(),N(0,"svg",48)),t&2){let e=d(4);m("pBind",e.ptm("pcDecrementButton").icon)}}function RO(t,o){}function OO(t,o){t&1&&I(0,RO,0,0,"ng-template")}function FO(t,o){if(t&1&&I(0,PO,1,1,"svg",47)(1,OO,1,0,null,6),t&2){let e=d(3);m("ngIf",!e.decrementIconTemplate&&!e._decrementIconTemplate),l(),m("ngTemplateOutlet",e.decrementIconTemplate||e._decrementIconTemplate)}}function NO(t,o){if(t&1){let e=W();h(0,"div",20)(1,"p-button",49),A("keydown",function(i){w(e);let r=d(2);return T(r.onContainerButtonKeydown(i))})("onClick",function(i){w(e);let r=d(2);return T(r.toggleAMPM(i))})("keydown.enter",function(i){w(e);let r=d(2);return T(r.toggleAMPM(i))}),I(2,DO,2,2,"ng-template",null,2,We),_(),h(4,"span",20),b(5),_(),h(6,"p-button",50),A("keydown",function(i){w(e);let r=d(2);return T(r.onContainerButtonKeydown(i))})("click",function(i){w(e);let r=d(2);return T(r.toggleAMPM(i))})("keydown.enter",function(i){w(e);let r=d(2);return T(r.toggleAMPM(i))}),I(7,FO,2,2,"ng-template",null,2,We),_()()}if(t&2){let e=d(2);H(e.cx("ampmPicker")),m("pBind",e.ptm("ampmPicker")),l(),m("styleClass",e.cx("pcIncrementButton"))("pt",e.ptm("pcIncrementButton")),O("aria-label",e.getTranslation("am"))("data-pc-group-section","timepickerbutton"),l(3),m("pBind",e.ptm("ampm")),l(),x(e.pm?"PM":"AM"),l(),m("styleClass",e.cx("pcDecrementButton"))("pt",e.ptm("pcDecrementButton")),O("aria-label",e.getTranslation("pm"))("data-pc-group-section","timepickerbutton")}}function AO(t,o){if(t&1){let e=W();h(0,"div",20)(1,"div",20)(2,"p-button",43),A("keydown",function(i){w(e);let r=d();return T(r.onContainerButtonKeydown(i))})("keydown.enter",function(i){w(e);let r=d();return T(r.incrementHour(i))})("keydown.space",function(i){w(e);let r=d();return T(r.incrementHour(i))})("mousedown",function(i){w(e);let r=d();return T(r.onTimePickerElementMouseDown(i,0,1))})("mouseup",function(i){w(e);let r=d();return T(r.onTimePickerElementMouseUp(i))})("keyup.enter",function(i){w(e);let r=d();return T(r.onTimePickerElementMouseUp(i))})("keyup.space",function(i){w(e);let r=d();return T(r.onTimePickerElementMouseUp(i))})("mouseleave",function(){w(e);let i=d();return T(i.onTimePickerElementMouseLeave())}),I(3,eO,2,2,"ng-template",null,2,We),_(),h(5,"span",20),I(6,tO,2,0,"ng-container",7),b(7),_(),h(8,"p-button",43),A("keydown",function(i){w(e);let r=d();return T(r.onContainerButtonKeydown(i))})("keydown.enter",function(i){w(e);let r=d();return T(r.decrementHour(i))})("keydown.space",function(i){w(e);let r=d();return T(r.decrementHour(i))})("mousedown",function(i){w(e);let r=d();return T(r.onTimePickerElementMouseDown(i,0,-1))})("mouseup",function(i){w(e);let r=d();return T(r.onTimePickerElementMouseUp(i))})("keyup.enter",function(i){w(e);let r=d();return T(r.onTimePickerElementMouseUp(i))})("keyup.space",function(i){w(e);let r=d();return T(r.onTimePickerElementMouseUp(i))})("mouseleave",function(){w(e);let i=d();return T(i.onTimePickerElementMouseLeave())}),I(9,rO,2,2,"ng-template",null,2,We),_()(),h(11,"div",44)(12,"span",20),b(13),_()(),h(14,"div",20)(15,"p-button",43),A("keydown",function(i){w(e);let r=d();return T(r.onContainerButtonKeydown(i))})("keydown.enter",function(i){w(e);let r=d();return T(r.incrementMinute(i))})("keydown.space",function(i){w(e);let r=d();return T(r.incrementMinute(i))})("mousedown",function(i){w(e);let r=d();return T(r.onTimePickerElementMouseDown(i,1,1))})("mouseup",function(i){w(e);let r=d();return T(r.onTimePickerElementMouseUp(i))})("keyup.enter",function(i){w(e);let r=d();return T(r.onTimePickerElementMouseUp(i))})("keyup.space",function(i){w(e);let r=d();return T(r.onTimePickerElementMouseUp(i))})("mouseleave",function(){w(e);let i=d();return T(i.onTimePickerElementMouseLeave())}),I(16,cO,2,2,"ng-template",null,2,We),_(),h(18,"span",20),I(19,dO,2,0,"ng-container",7),b(20),_(),h(21,"p-button",43),A("keydown",function(i){w(e);let r=d();return T(r.onContainerButtonKeydown(i))})("keydown.enter",function(i){w(e);let r=d();return T(r.decrementMinute(i))})("keydown.space",function(i){w(e);let r=d();return T(r.decrementMinute(i))})("mousedown",function(i){w(e);let r=d();return T(r.onTimePickerElementMouseDown(i,1,-1))})("mouseup",function(i){w(e);let r=d();return T(r.onTimePickerElementMouseUp(i))})("keyup.enter",function(i){w(e);let r=d();return T(r.onTimePickerElementMouseUp(i))})("keyup.space",function(i){w(e);let r=d();return T(r.onTimePickerElementMouseUp(i))})("mouseleave",function(){w(e);let i=d();return T(i.onTimePickerElementMouseLeave())}),I(22,fO,2,2,"ng-template",null,2,We),_()(),I(24,mO,3,5,"div",8)(25,SO,10,14,"div",8)(26,kO,3,5,"div",8)(27,NO,9,13,"div",8),_()}if(t&2){let e=d();H(e.cx("timePicker")),m("pBind",e.ptm("timePicker")),l(),H(e.cx("hourPicker")),m("pBind",e.ptm("hourPicker")),l(),m("styleClass",e.cx("pcIncrementButton"))("pt",e.ptm("pcIncrementButton")),O("aria-label",e.getTranslation("nextHour"))("data-pc-group-section","timepickerbutton"),l(3),m("pBind",e.ptm("hour")),l(),m("ngIf",e.currentHour<10),l(),x(e.currentHour),l(),m("styleClass",e.cx("pcDecrementButton"))("pt",e.ptm("pcDecrementButton")),O("aria-label",e.getTranslation("prevHour"))("data-pc-group-section","timepickerbutton"),l(3),m("pBind",e.ptm("separatorContainer")),l(),m("pBind",e.ptm("separator")),l(),x(e.timeSeparator),l(),H(e.cx("minutePicker")),m("pBind",e.ptm("minutePicker")),l(),m("styleClass",e.cx("pcIncrementButton"))("pt",e.ptm("pcIncrementButton")),O("aria-label",e.getTranslation("nextMinute"))("data-pc-group-section","timepickerbutton"),l(3),m("pBind",e.ptm("minute")),l(),m("ngIf",e.currentMinute<10),l(),x(e.currentMinute),l(),m("styleClass",e.cx("pcDecrementButton"))("pt",e.ptm("pcDecrementButton")),O("aria-label",e.getTranslation("prevMinute"))("data-pc-group-section","timepickerbutton"),l(3),m("ngIf",e.showSeconds),l(),m("ngIf",e.showSeconds),l(),m("ngIf",e.hourFormat=="12"),l(),m("ngIf",e.hourFormat=="12")}}function LO(t,o){t&1&&le(0)}function BO(t,o){if(t&1&&I(0,LO,1,0,"ng-container",22),t&2){let e=d(2);m("ngTemplateOutlet",e.buttonBarTemplate||e._buttonBarTemplate)("ngTemplateOutletContext",Wn(2,Q3,e.onTodayButtonClick.bind(e),e.onClearButtonClick.bind(e)))}}function VO(t,o){if(t&1){let e=W();h(0,"p-button",51),A("keydown",function(i){w(e);let r=d(2);return T(r.onContainerButtonKeydown(i))})("onClick",function(i){w(e);let r=d(2);return T(r.onTodayButtonClick(i))}),_(),h(1,"p-button",51),A("keydown",function(i){w(e);let r=d(2);return T(r.onContainerButtonKeydown(i))})("onClick",function(i){w(e);let r=d(2);return T(r.onClearButtonClick(i))}),_()}if(t&2){let e=d(2);m("styleClass",e.cx("pcTodayButton"))("label",e.getTranslation("today"))("ngClass",e.todayButtonStyleClass)("pt",e.ptm("pcTodayButton")),O("data-pc-group-section","button"),l(),m("styleClass",e.cx("pcClearButton"))("label",e.getTranslation("clear"))("ngClass",e.clearButtonStyleClass)("pt",e.ptm("pcClearButton")),O("data-pc-group-section","button")}}function zO(t,o){if(t&1&&(h(0,"div",20),M(1,BO,1,5,"ng-container")(2,VO,2,10),_()),t&2){let e=d();H(e.cx("buttonbar")),m("pBind",e.ptm("buttonbar")),l(),D(e.buttonBarTemplate||e._buttonBarTemplate?1:2)}}function HO(t,o){t&1&&le(0)}var qO=`
1217
+ ${Kb}
1218
+
1219
+ /* For PrimeNG */
1220
+ .p-datepicker.ng-invalid.ng-dirty .p-inputtext {
1221
+ border-color: dt('inputtext.invalid.border.color');
1222
+ }
1223
+ `,GO={root:()=>({position:"relative"})},jO={root:({instance:t})=>["p-datepicker p-component p-inputwrapper",{"p-invalid":t.invalid(),"p-datepicker-fluid":t.hasFluid,"p-inputwrapper-filled":t.$filled(),"p-variant-filled":t.$variant()==="filled","p-inputwrapper-focus":t.focus||t.overlayVisible,"p-focus":t.focus||t.overlayVisible}],pcInputText:"p-datepicker-input",dropdown:"p-datepicker-dropdown",inputIconContainer:"p-datepicker-input-icon-container",inputIcon:"p-datepicker-input-icon",panel:({instance:t})=>["p-datepicker-panel p-component",{"p-datepicker-panel p-component":!0,"p-datepicker-panel-inline":t.inline,"p-disabled":t.$disabled(),"p-datepicker-timeonly":t.timeOnly}],calendarContainer:"p-datepicker-calendar-container",calendar:"p-datepicker-calendar",header:"p-datepicker-header",pcPrevButton:"p-datepicker-prev-button",title:"p-datepicker-title",selectMonth:"p-datepicker-select-month",selectYear:"p-datepicker-select-year",decade:"p-datepicker-decade",pcNextButton:"p-datepicker-next-button",dayView:"p-datepicker-day-view",weekHeader:"p-datepicker-weekheader p-disabled",weekNumber:"p-datepicker-weeknumber",weekLabelContainer:"p-datepicker-weeklabel-container p-disabled",weekDayCell:"p-datepicker-weekday-cell",weekDay:"p-datepicker-weekday",dayCell:({date:t})=>["p-datepicker-day-cell",{"p-datepicker-other-month":t.otherMonth,"p-datepicker-today":t.today}],day:({instance:t,date:o})=>{let e="";if(t.isRangeSelection()&&t.isSelected(o)&&o.selectable){let n=t.value[0],i=t.value[1],r=n&&o.year===n.getFullYear()&&o.month===n.getMonth()&&o.day===n.getDate(),a=i&&o.year===i.getFullYear()&&o.month===i.getMonth()&&o.day===i.getDate();e=r||a?"p-datepicker-day-selected":"p-datepicker-day-selected-range"}return{"p-datepicker-day":!0,"p-datepicker-day-selected":!t.isRangeSelection()&&t.isSelected(o)&&o.selectable,"p-disabled":t.$disabled()||!o.selectable,[e]:!0}},monthView:"p-datepicker-month-view",month:({instance:t,index:o})=>["p-datepicker-month",{"p-datepicker-month-selected":t.isMonthSelected(o),"p-disabled":t.isMonthDisabled(o)}],yearView:"p-datepicker-year-view",year:({instance:t,year:o})=>["p-datepicker-year",{"p-datepicker-year-selected":t.isYearSelected(o),"p-disabled":t.isYearDisabled(o)}],timePicker:"p-datepicker-time-picker",hourPicker:"p-datepicker-hour-picker",pcIncrementButton:"p-datepicker-increment-button",pcDecrementButton:"p-datepicker-decrement-button",separator:"p-datepicker-separator",minutePicker:"p-datepicker-minute-picker",secondPicker:"p-datepicker-second-picker",ampmPicker:"p-datepicker-ampm-picker",buttonbar:"p-datepicker-buttonbar",pcTodayButton:"p-datepicker-today-button",pcClearButton:"p-datepicker-clear-button",clearIcon:"p-datepicker-clear-icon"},Xb=(()=>{class t extends St{name="datepicker";style=qO;classes=jO;inlineStyles=GO;static \u0275fac=(()=>{let e;return function(i){return(e||(e=G(t)))(i||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})();var UO={provide:Xn,useExisting:wn(()=>Qb),multi:!0},Zb=new ge("DATEPICKER_INSTANCE"),Qb=(()=>{class t extends ls{zone;overlayService;componentName="DatePicker";bindDirectiveInstance=p(Ie,{self:!0});$pcDatePicker=p(Zb,{optional:!0,skipSelf:!0})??void 0;iconDisplay="button";styleClass;inputStyle;inputId;inputStyleClass;placeholder;ariaLabelledBy;ariaLabel;iconAriaLabel;get dateFormat(){return this._dateFormat}set dateFormat(e){this._dateFormat=e,this.initialized&&this.updateInputfield()}multipleSeparator=",";rangeSeparator="-";inline=!1;showOtherMonths=!0;selectOtherMonths;showIcon;icon;readonlyInput;shortYearCutoff="+10";get hourFormat(){return this._hourFormat}set hourFormat(e){this._hourFormat=e,this.initialized&&this.updateInputfield()}timeOnly;stepHour=1;stepMinute=1;stepSecond=1;showSeconds=!1;showOnFocus=!0;showWeek=!1;startWeekFromFirstDayOfYear=!1;showClear=!1;dataType="date";selectionMode="single";maxDateCount;showButtonBar;todayButtonStyleClass;clearButtonStyleClass;autofocus;autoZIndex=!0;baseZIndex=0;panelStyleClass;panelStyle;keepInvalid=!1;hideOnDateTimeSelect=!0;touchUI;timeSeparator=":";focusTrap=!0;showTransitionOptions=".12s cubic-bezier(0, 0, 0.2, 1)";hideTransitionOptions=".1s linear";tabindex;get minDate(){return this._minDate}set minDate(e){this._minDate=e,this.currentMonth!=null&&this.currentMonth!=null&&this.currentYear&&this.createMonths(this.currentMonth,this.currentYear)}get maxDate(){return this._maxDate}set maxDate(e){this._maxDate=e,this.currentMonth!=null&&this.currentMonth!=null&&this.currentYear&&this.createMonths(this.currentMonth,this.currentYear)}get disabledDates(){return this._disabledDates}set disabledDates(e){this._disabledDates=e,this.currentMonth!=null&&this.currentMonth!=null&&this.currentYear&&this.createMonths(this.currentMonth,this.currentYear)}get disabledDays(){return this._disabledDays}set disabledDays(e){this._disabledDays=e,this.currentMonth!=null&&this.currentMonth!=null&&this.currentYear&&this.createMonths(this.currentMonth,this.currentYear)}get showTime(){return this._showTime}set showTime(e){this._showTime=e,this.currentHour===void 0&&this.initTime(this.value||new Date),this.updateInputfield()}get responsiveOptions(){return this._responsiveOptions}set responsiveOptions(e){this._responsiveOptions=e,this.destroyResponsiveStyleElement(),this.createResponsiveStyle()}get numberOfMonths(){return this._numberOfMonths}set numberOfMonths(e){this._numberOfMonths=e,this.destroyResponsiveStyleElement(),this.createResponsiveStyle()}get firstDayOfWeek(){return this._firstDayOfWeek}set firstDayOfWeek(e){this._firstDayOfWeek=e,this.createWeekDays()}get view(){return this._view}set view(e){this._view=e,this.currentView=this._view}get defaultDate(){return this._defaultDate}set defaultDate(e){if(this._defaultDate=e,this.initialized){let n=e||new Date;this.currentMonth=n.getMonth(),this.currentYear=n.getFullYear(),this.initTime(n),this.createMonths(this.currentMonth,this.currentYear)}}appendTo=B(void 0);motionOptions=B(void 0);computedMotionOptions=E(()=>be(be({},this.ptm("motion")),this.motionOptions()));onFocus=new ne;onBlur=new ne;onClose=new ne;onSelect=new ne;onClear=new ne;onInput=new ne;onTodayClick=new ne;onClearClick=new ne;onMonthChange=new ne;onYearChange=new ne;onClickOutside=new ne;onShow=new ne;inputfieldViewChild;set content(e){this.contentViewChild=e,this.contentViewChild&&this.overlay&&(this.isMonthNavigate?(Promise.resolve(null).then(()=>this.updateFocus()),this.isMonthNavigate=!1):!this.focus&&!this.inline&&this.initFocusableCell())}_componentStyle=p(Xb);contentViewChild;value;dates;months;weekDays;currentMonth;currentYear;currentHour;currentMinute;currentSecond;p;pm;mask;maskClickListener;overlay;responsiveStyleElement;overlayVisible;overlayMinWidth;$appendTo=E(()=>this.appendTo()||this.config.overlayAppendTo());calendarElement;timePickerTimer;documentClickListener;animationEndListener;ticksTo1970;yearOptions;focus;isKeydown;_minDate;_maxDate;_dateFormat;_hourFormat="24";_showTime;_yearRange;preventDocumentListener;dayClass(e){return this._componentStyle.classes.day({instance:this,date:e})}dateTemplate;headerTemplate;footerTemplate;disabledDateTemplate;decadeTemplate;previousIconTemplate;nextIconTemplate;triggerIconTemplate;clearIconTemplate;decrementIconTemplate;incrementIconTemplate;inputIconTemplate;buttonBarTemplate;_dateTemplate;_headerTemplate;_footerTemplate;_disabledDateTemplate;_decadeTemplate;_previousIconTemplate;_nextIconTemplate;_triggerIconTemplate;_clearIconTemplate;_decrementIconTemplate;_incrementIconTemplate;_inputIconTemplate;_buttonBarTemplate;_disabledDates;_disabledDays;selectElement;todayElement;focusElement;scrollHandler;documentResizeListener;navigationState=null;isMonthNavigate;initialized;translationSubscription;_locale;_responsiveOptions;currentView;attributeSelector;panelId;_numberOfMonths=1;_firstDayOfWeek;_view="date";preventFocus;_defaultDate;_focusKey=null;window;get locale(){return this._locale}get iconButtonAriaLabel(){return this.iconAriaLabel?this.iconAriaLabel:this.getTranslation("chooseDate")}get prevIconAriaLabel(){return this.currentView==="year"?this.getTranslation("prevDecade"):this.currentView==="month"?this.getTranslation("prevYear"):this.getTranslation("prevMonth")}get nextIconAriaLabel(){return this.currentView==="year"?this.getTranslation("nextDecade"):this.currentView==="month"?this.getTranslation("nextYear"):this.getTranslation("nextMonth")}constructor(e,n){super(),this.zone=e,this.overlayService=n,this.window=this.document.defaultView}onInit(){this.attributeSelector=pt("pn_id_"),this.panelId=this.attributeSelector+"_panel";let e=this.defaultDate||new Date;this.createResponsiveStyle(),this.currentMonth=e.getMonth(),this.currentYear=e.getFullYear(),this.yearOptions=[],this.currentView=this.view,this.view==="date"&&(this.createWeekDays(),this.initTime(e),this.createMonths(this.currentMonth,this.currentYear),this.ticksTo1970=(1969*365+Math.floor(1970/4)-Math.floor(1970/100)+Math.floor(1970/400))*24*60*60*1e7),this.translationSubscription=this.config.translationObserver.subscribe(()=>{this.createWeekDays(),this.cd.markForCheck()}),this.initialized=!0}onAfterViewInit(){this.inline?this.contentViewChild&&this.contentViewChild.nativeElement.setAttribute(this.attributeSelector,""):!this.$disabled()&&this.overlay&&(this.initFocusableCell(),this.numberOfMonths===1&&this.contentViewChild&&this.contentViewChild.nativeElement&&(this.contentViewChild.nativeElement.style.width=P0(this.el?.nativeElement)+"px"))}onAfterViewChecked(){this.bindDirectiveInstance.setAttrs(this.ptms(["host","root"]))}templates;onAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"date":this._dateTemplate=e.template;break;case"decade":this._decadeTemplate=e.template;break;case"disabledDate":this._disabledDateTemplate=e.template;break;case"header":this._headerTemplate=e.template;break;case"inputicon":this._inputIconTemplate=e.template;break;case"buttonbar":this._buttonBarTemplate=e.template;break;case"previousicon":this._previousIconTemplate=e.template;break;case"nexticon":this._nextIconTemplate=e.template;break;case"triggericon":this._triggerIconTemplate=e.template;break;case"clearicon":this._clearIconTemplate=e.template;break;case"decrementicon":this._decrementIconTemplate=e.template;break;case"incrementicon":this._incrementIconTemplate=e.template;break;case"footer":this._footerTemplate=e.template;break;default:this._dateTemplate=e.template;break}})}getTranslation(e){return this.config.getTranslation(e)}populateYearOptions(e,n){this.yearOptions=[];for(let i=e;i<=n;i++)this.yearOptions.push(i)}createWeekDays(){this.weekDays=[];let e=this.getFirstDateOfWeek(),n=this.getTranslation(tn.DAY_NAMES_MIN);for(let i=0;i<7;i++)this.weekDays.push(n[e]),e=e==6?0:++e}monthPickerValues(){let e=[];for(let n=0;n<=11;n++)e.push(this.config.getTranslation("monthNamesShort")[n]);return e}yearPickerValues(){let e=[],n=this.currentYear-this.currentYear%10;for(let i=0;i<10;i++)e.push(n+i);return e}createMonths(e,n){this.months=this.months=[];for(let i=0;i<this.numberOfMonths;i++){let r=e+i,a=n;r>11&&(r=r%12,a=n+Math.floor((e+i)/12)),this.months.push(this.createMonth(r,a))}}getWeekNumber(e){let n=new Date(e.getTime());if(this.startWeekFromFirstDayOfYear){let r=+this.getFirstDateOfWeek();n.setDate(n.getDate()+6+r-n.getDay())}else n.setDate(n.getDate()+4-(n.getDay()||7));let i=n.getTime();return n.setMonth(0),n.setDate(1),Math.floor(Math.round((i-n.getTime())/864e5)/7)+1}createMonth(e,n){let i=[],r=this.getFirstDayOfMonthIndex(e,n),a=this.getDaysCountInMonth(e,n),s=this.getDaysCountInPrevMonth(e,n),c=1,u=new Date,f=[],g=Math.ceil((a+r)/7);for(let C=0;C<g;C++){let k=[];if(C==0){for(let F=s-r+1;F<=s;F++){let q=this.getPreviousMonthAndYear(e,n);k.push({day:F,month:q.month,year:q.year,otherMonth:!0,today:this.isToday(u,F,q.month,q.year),selectable:this.isSelectable(F,q.month,q.year,!0)})}let S=7-k.length;for(let F=0;F<S;F++)k.push({day:c,month:e,year:n,today:this.isToday(u,c,e,n),selectable:this.isSelectable(c,e,n,!1)}),c++}else for(let S=0;S<7;S++){if(c>a){let F=this.getNextMonthAndYear(e,n);k.push({day:c-a,month:F.month,year:F.year,otherMonth:!0,today:this.isToday(u,c-a,F.month,F.year),selectable:this.isSelectable(c-a,F.month,F.year,!0)})}else k.push({day:c,month:e,year:n,today:this.isToday(u,c,e,n),selectable:this.isSelectable(c,e,n,!1)});c++}this.showWeek&&f.push(this.getWeekNumber(new Date(k[0].year,k[0].month,k[0].day))),i.push(k)}return{month:e,year:n,dates:i,weekNumbers:f}}initTime(e){this.pm=e.getHours()>11,this.showTime?(this.currentMinute=e.getMinutes(),this.currentSecond=this.showSeconds?e.getSeconds():0,this.setCurrentHourPM(e.getHours())):this.timeOnly&&(this.currentMinute=0,this.currentHour=0,this.currentSecond=0)}navBackward(e){if(this.$disabled()){e.preventDefault();return}this.isMonthNavigate=!0,this.currentView==="month"?(this.decrementYear(),setTimeout(()=>{this.updateFocus()},1)):this.currentView==="year"?(this.decrementDecade(),setTimeout(()=>{this.updateFocus()},1)):(this.currentMonth===0?(this.currentMonth=11,this.decrementYear()):this.currentMonth--,this.onMonthChange.emit({month:this.currentMonth+1,year:this.currentYear}),this.createMonths(this.currentMonth,this.currentYear))}navForward(e){if(this.$disabled()){e.preventDefault();return}this.isMonthNavigate=!0,this.currentView==="month"?(this.incrementYear(),setTimeout(()=>{this.updateFocus()},1)):this.currentView==="year"?(this.incrementDecade(),setTimeout(()=>{this.updateFocus()},1)):(this.currentMonth===11?(this.currentMonth=0,this.incrementYear()):this.currentMonth++,this.onMonthChange.emit({month:this.currentMonth+1,year:this.currentYear}),this.createMonths(this.currentMonth,this.currentYear))}decrementYear(){this.currentYear--;let e=this.yearOptions;if(this.currentYear<e[0]){let n=e[e.length-1]-e[0];this.populateYearOptions(e[0]-n,e[e.length-1]-n)}}decrementDecade(){this.currentYear=this.currentYear-10}incrementDecade(){this.currentYear=this.currentYear+10}incrementYear(){this.currentYear++;let e=this.yearOptions;if(this.currentYear>e[e.length-1]){let n=e[e.length-1]-e[0];this.populateYearOptions(e[0]+n,e[e.length-1]+n)}}switchToMonthView(e){this.setCurrentView("month"),e.preventDefault()}switchToYearView(e){this.setCurrentView("year"),e.preventDefault()}onDateSelect(e,n){if(this.$disabled()||!n.selectable){e.preventDefault();return}this.isMultipleSelection()&&this.isSelected(n)?(this.value=this.value.filter((i,r)=>!this.isDateEquals(i,n)),this.value.length===0&&(this.value=null),this.updateModel(this.value)):this.shouldSelectDate(n)&&this.selectDate(n),this.hideOnDateTimeSelect&&(this.isSingleSelection()||this.isRangeSelection()&&this.value[1])&&setTimeout(()=>{e.preventDefault(),this.hideOverlay(),this.mask&&this.disableModality(),this.cd.markForCheck()},150),this.updateInputfield(),e.preventDefault()}shouldSelectDate(e){return this.isMultipleSelection()&&this.maxDateCount!=null?this.maxDateCount>(this.value?this.value.length:0):!0}onMonthSelect(e,n){this.view==="month"?this.onDateSelect(e,{year:this.currentYear,month:n,day:1,selectable:!0}):(this.currentMonth=n,this.createMonths(this.currentMonth,this.currentYear),this.setCurrentView("date"),this.onMonthChange.emit({month:this.currentMonth+1,year:this.currentYear}))}onYearSelect(e,n){this.view==="year"?this.onDateSelect(e,{year:n,month:0,day:1,selectable:!0}):(this.currentYear=n,this.setCurrentView("month"),this.onYearChange.emit({month:this.currentMonth+1,year:this.currentYear}))}updateInputfield(){let e="";if(this.value){if(this.isSingleSelection())e=this.formatDateTime(this.value);else if(this.isMultipleSelection())for(let n=0;n<this.value.length;n++){let i=this.formatDateTime(this.value[n]);e+=i,n!==this.value.length-1&&(e+=this.multipleSeparator+" ")}else if(this.isRangeSelection()&&this.value&&this.value.length){let n=this.value[0],i=this.value[1];e=this.formatDateTime(n),i&&(e+=" "+this.rangeSeparator+" "+this.formatDateTime(i))}}this.writeModelValue(e),this.inputFieldValue=e,this.inputfieldViewChild&&this.inputfieldViewChild.nativeElement&&(this.inputfieldViewChild.nativeElement.value=this.inputFieldValue)}inputFieldValue=null;formatDateTime(e){let n=this.keepInvalid?e:null,i=this.isValidDateForTimeConstraints(e);return this.isValidDate(e)?this.timeOnly?n=this.formatTime(e):(n=this.formatDate(e,this.getDateFormat()),this.showTime&&(n+=" "+this.formatTime(e))):this.dataType==="string"&&(n=e),n=i?n:"",n}formatDateMetaToDate(e){return new Date(e.year,e.month,e.day)}formatDateKey(e){return`${e.getFullYear()}-${e.getMonth()}-${e.getDate()}`}setCurrentHourPM(e){this.hourFormat=="12"?(this.pm=e>11,e>=12?this.currentHour=e==12?12:e-12:this.currentHour=e==0?12:e):this.currentHour=e}setCurrentView(e){this.currentView=e,this.cd.detectChanges(),this.alignOverlay()}selectDate(e){let n=this.formatDateMetaToDate(e);if(this.showTime&&(this.hourFormat=="12"?this.currentHour===12?n.setHours(this.pm?12:0):n.setHours(this.pm?this.currentHour+12:this.currentHour):n.setHours(this.currentHour),n.setMinutes(this.currentMinute),n.setSeconds(this.currentSecond)),this.minDate&&this.minDate>n&&(n=this.minDate,this.setCurrentHourPM(n.getHours()),this.currentMinute=n.getMinutes(),this.currentSecond=n.getSeconds()),this.maxDate&&this.maxDate<n&&(n=this.maxDate,this.setCurrentHourPM(n.getHours()),this.currentMinute=n.getMinutes(),this.currentSecond=n.getSeconds()),this.isSingleSelection())this.updateModel(n);else if(this.isMultipleSelection())this.updateModel(this.value?[...this.value,n]:[n]);else if(this.isRangeSelection())if(this.value&&this.value.length){let i=this.value[0],r=this.value[1];!r&&n.getTime()>=i.getTime()?r=n:(i=n,r=null),this.updateModel([i,r])}else this.updateModel([n,null]);this.onSelect.emit(n)}updateModel(e){if(this.value=e,this.dataType=="date")this.writeModelValue(this.value),this.onModelChange(this.value);else if(this.dataType=="string")if(this.isSingleSelection())this.onModelChange(this.formatDateTime(this.value));else{let n=null;Array.isArray(this.value)&&(n=this.value.map(i=>this.formatDateTime(i))),this.writeModelValue(n),this.onModelChange(n)}}getFirstDayOfMonthIndex(e,n){let i=new Date;i.setDate(1),i.setMonth(e),i.setFullYear(n);let r=i.getDay()+this.getSundayIndex();return r>=7?r-7:r}getDaysCountInMonth(e,n){return 32-this.daylightSavingAdjust(new Date(n,e,32)).getDate()}getDaysCountInPrevMonth(e,n){let i=this.getPreviousMonthAndYear(e,n);return this.getDaysCountInMonth(i.month,i.year)}getPreviousMonthAndYear(e,n){let i,r;return e===0?(i=11,r=n-1):(i=e-1,r=n),{month:i,year:r}}getNextMonthAndYear(e,n){let i,r;return e===11?(i=0,r=n+1):(i=e+1,r=n),{month:i,year:r}}getSundayIndex(){let e=this.getFirstDateOfWeek();return e>0?7-e:0}isSelected(e){if(this.value){if(this.isSingleSelection())return this.isDateEquals(this.value,e);if(this.isMultipleSelection()){let n=!1;for(let i of this.value)if(n=this.isDateEquals(i,e),n)break;return n}else if(this.isRangeSelection())return this.value[1]?this.isDateEquals(this.value[0],e)||this.isDateEquals(this.value[1],e)||this.isDateBetween(this.value[0],this.value[1],e):this.isDateEquals(this.value[0],e)}else return!1}isComparable(){return this.value!=null&&typeof this.value!="string"}isMonthSelected(e){if(!this.isComparable())return!1;if(this.isMultipleSelection())return this.value.some(n=>n.getMonth()===e&&n.getFullYear()===this.currentYear);if(this.isRangeSelection())if(this.value[1]){let n=new Date(this.currentYear,e,1),i=new Date(this.value[0].getFullYear(),this.value[0].getMonth(),1),r=new Date(this.value[1].getFullYear(),this.value[1].getMonth(),1);return n>=i&&n<=r}else return this.value[0]?.getFullYear()===this.currentYear&&this.value[0]?.getMonth()===e;else return this.value.getMonth()===e&&this.value.getFullYear()===this.currentYear}isMonthDisabled(e,n){let i=n??this.currentYear;for(let r=1;r<this.getDaysCountInMonth(e,i)+1;r++)if(this.isSelectable(r,e,i,!1))return!1;return!0}isYearDisabled(e){return Array(12).fill(0).every((n,i)=>this.isMonthDisabled(i,e))}isYearSelected(e){if(this.isComparable()){let n=this.isRangeSelection()?this.value[0]:this.value;return this.isMultipleSelection()?!1:n.getFullYear()===e}return!1}isDateEquals(e,n){return e&&mr(e)?e.getDate()===n.day&&e.getMonth()===n.month&&e.getFullYear()===n.year:!1}isDateBetween(e,n,i){let r=!1;if(mr(e)&&mr(n)){let a=this.formatDateMetaToDate(i);return e.getTime()<=a.getTime()&&n.getTime()>=a.getTime()}return r}isSingleSelection(){return this.selectionMode==="single"}isRangeSelection(){return this.selectionMode==="range"}isMultipleSelection(){return this.selectionMode==="multiple"}isToday(e,n,i,r){return e.getDate()===n&&e.getMonth()===i&&e.getFullYear()===r}isSelectable(e,n,i,r){let a=!0,s=!0,c=!0,u=!0;return r&&!this.selectOtherMonths?!1:(this.minDate&&(this.minDate.getFullYear()>i||this.minDate.getFullYear()===i&&this.currentView!="year"&&(this.minDate.getMonth()>n||this.minDate.getMonth()===n&&this.minDate.getDate()>e))&&(a=!1),this.maxDate&&(this.maxDate.getFullYear()<i||this.maxDate.getFullYear()===i&&(this.maxDate.getMonth()<n||this.maxDate.getMonth()===n&&this.maxDate.getDate()<e))&&(s=!1),this.disabledDates&&(c=!this.isDateDisabled(e,n,i)),this.disabledDays&&(u=!this.isDayDisabled(e,n,i)),a&&s&&c&&u)}isDateDisabled(e,n,i){if(this.disabledDates){for(let r of this.disabledDates)if(r.getFullYear()===i&&r.getMonth()===n&&r.getDate()===e)return!0}return!1}isDayDisabled(e,n,i){if(this.disabledDays){let a=new Date(i,n,e).getDay();return this.disabledDays.indexOf(a)!==-1}return!1}onInputFocus(e){this.focus=!0,this.showOnFocus&&this.showOverlay(),this.onFocus.emit(e)}onInputClick(){this.showOnFocus&&!this.overlayVisible&&this.showOverlay()}onInputBlur(e){this.focus=!1,this.onBlur.emit(e),this.keepInvalid||this.updateInputfield(),this.onModelTouched()}onButtonClick(e,n=this.inputfieldViewChild?.nativeElement){this.$disabled()||(this.overlayVisible?this.hideOverlay():(n.focus(),this.showOverlay()))}clear(){this.value=null,this.inputFieldValue=null,this.writeModelValue(this.value),this.onModelChange(this.value),this.updateInputfield(),this.onClear.emit()}onOverlayClick(e){this.overlayService.add({originalEvent:e,target:this.el.nativeElement})}getMonthName(e){return this.config.getTranslation("monthNames")[e]}getYear(e){return this.currentView==="month"?this.currentYear:e.year}switchViewButtonDisabled(){return this.numberOfMonths>1||this.$disabled()}onPrevButtonClick(e){this.navigationState={backward:!0,button:!0},this.navBackward(e)}onNextButtonClick(e){this.navigationState={backward:!1,button:!0},this.navForward(e)}onContainerButtonKeydown(e){switch(e.which){case 9:if(this.inline||this.trapFocus(e),this.inline){let n=ut(this.el?.nativeElement,".p-datepicker-header"),i=e.target;if(this.timeOnly)return;i==n?.children[n?.children?.length-1]&&this.initFocusableCell()}break;case 27:this.inputfieldViewChild?.nativeElement.focus(),this.overlayVisible=!1,e.preventDefault();break;default:break}}onInputKeydown(e){this.isKeydown=!0,e.keyCode===40&&this.contentViewChild?this.trapFocus(e):e.keyCode===27?this.overlayVisible&&(this.inputfieldViewChild?.nativeElement.focus(),this.overlayVisible=!1,e.preventDefault()):e.keyCode===13?this.overlayVisible&&(this.overlayVisible=!1,e.preventDefault()):e.keyCode===9&&this.contentViewChild&&(Pf(this.contentViewChild.nativeElement).forEach(n=>n.tabIndex="-1"),this.overlayVisible&&(this.overlayVisible=!1))}onDateCellKeydown(e,n,i){let r=e.currentTarget,a=r.parentElement,s=this.formatDateMetaToDate(n);switch(e.which){case 40:{r.tabIndex="-1";let S=hr(a),F=a.parentElement.nextElementSibling;if(F){let q=F.children[S].children[0];bn(q,"p-disabled")?(this.navigationState={backward:!1},this.navForward(e)):(F.children[S].children[0].tabIndex="0",F.children[S].children[0].focus())}else this.navigationState={backward:!1},this.navForward(e);e.preventDefault();break}case 38:{r.tabIndex="-1";let S=hr(a),F=a.parentElement.previousElementSibling;if(F){let q=F.children[S].children[0];bn(q,"p-disabled")?(this.navigationState={backward:!0},this.navBackward(e)):(q.tabIndex="0",q.focus())}else this.navigationState={backward:!0},this.navBackward(e);e.preventDefault();break}case 37:{r.tabIndex="-1";let S=a.previousElementSibling;if(S){let F=S.children[0];bn(F,"p-disabled")||bn(F.parentElement,"p-datepicker-weeknumber")?this.navigateToMonth(!0,i):(F.tabIndex="0",F.focus())}else this.navigateToMonth(!0,i);e.preventDefault();break}case 39:{r.tabIndex="-1";let S=a.nextElementSibling;if(S){let F=S.children[0];bn(F,"p-disabled")?this.navigateToMonth(!1,i):(F.tabIndex="0",F.focus())}else this.navigateToMonth(!1,i);e.preventDefault();break}case 13:case 32:{this.onDateSelect(e,n),e.preventDefault();break}case 27:{this.inputfieldViewChild?.nativeElement.focus(),this.overlayVisible=!1,e.preventDefault();break}case 9:{this.inline||this.trapFocus(e);break}case 33:{r.tabIndex="-1";let S=new Date(s.getFullYear(),s.getMonth()-1,s.getDate()),F=this.formatDateKey(S);this.navigateToMonth(!0,i,`span[data-date='${F}']:not(.p-disabled):not(.p-ink)`),e.preventDefault();break}case 34:{r.tabIndex="-1";let S=new Date(s.getFullYear(),s.getMonth()+1,s.getDate()),F=this.formatDateKey(S);this.navigateToMonth(!1,i,`span[data-date='${F}']:not(.p-disabled):not(.p-ink)`),e.preventDefault();break}case 36:r.tabIndex="-1";let c=new Date(s.getFullYear(),s.getMonth(),1),u=this.formatDateKey(c),f=ut(r.offsetParent,`span[data-date='${u}']:not(.p-disabled):not(.p-ink)`);f&&(f.tabIndex="0",f.focus()),e.preventDefault();break;case 35:r.tabIndex="-1";let g=new Date(s.getFullYear(),s.getMonth()+1,0),C=this.formatDateKey(g),k=ut(r.offsetParent,`span[data-date='${C}']:not(.p-disabled):not(.p-ink)`);g&&(k.tabIndex="0",k.focus()),e.preventDefault();break;default:break}}onMonthCellKeydown(e,n){let i=e.currentTarget;switch(e.which){case 38:case 40:{i.tabIndex="-1";var r=i.parentElement.children,a=hr(i);let s=r[e.which===40?a+3:a-3];s&&(s.tabIndex="0",s.focus()),e.preventDefault();break}case 37:{i.tabIndex="-1";let s=i.previousElementSibling;s?(s.tabIndex="0",s.focus()):(this.navigationState={backward:!0},this.navBackward(e)),e.preventDefault();break}case 39:{i.tabIndex="-1";let s=i.nextElementSibling;s?(s.tabIndex="0",s.focus()):(this.navigationState={backward:!1},this.navForward(e)),e.preventDefault();break}case 13:case 32:{this.onMonthSelect(e,n),e.preventDefault();break}case 27:{this.inputfieldViewChild?.nativeElement.focus(),this.overlayVisible=!1,e.preventDefault();break}case 9:{this.inline||this.trapFocus(e);break}default:break}}onYearCellKeydown(e,n){let i=e.currentTarget;switch(e.which){case 38:case 40:{i.tabIndex="-1";var r=i.parentElement.children,a=hr(i);let s=r[e.which===40?a+2:a-2];s&&(s.tabIndex="0",s.focus()),e.preventDefault();break}case 37:{i.tabIndex="-1";let s=i.previousElementSibling;s?(s.tabIndex="0",s.focus()):(this.navigationState={backward:!0},this.navBackward(e)),e.preventDefault();break}case 39:{i.tabIndex="-1";let s=i.nextElementSibling;s?(s.tabIndex="0",s.focus()):(this.navigationState={backward:!1},this.navForward(e)),e.preventDefault();break}case 13:case 32:{this.onYearSelect(e,n),e.preventDefault();break}case 27:{this.inputfieldViewChild?.nativeElement.focus(),this.overlayVisible=!1,e.preventDefault();break}case 9:{this.trapFocus(e);break}default:break}}navigateToMonth(e,n,i){if(e)if(this.numberOfMonths===1||n===0)this.navigationState={backward:!0},this._focusKey=i,this.navBackward(event);else{let r=this.contentViewChild.nativeElement.children[n-1];if(i){let a=ut(r,i);a.tabIndex="0",a.focus()}else{let a=Sn(r,".p-datepicker-calendar td span:not(.p-disabled):not(.p-ink)"),s=a[a.length-1];s.tabIndex="0",s.focus()}}else if(this.numberOfMonths===1||n===this.numberOfMonths-1)this.navigationState={backward:!1},this._focusKey=i,this.navForward(event);else{let r=this.contentViewChild.nativeElement.children[n+1];if(i){let a=ut(r,i);a.tabIndex="0",a.focus()}else{let a=ut(r,".p-datepicker-calendar td span:not(.p-disabled):not(.p-ink)");a.tabIndex="0",a.focus()}}}updateFocus(){let e;if(this.navigationState){if(this.navigationState.button)this.initFocusableCell(),this.navigationState.backward?ut(this.contentViewChild.nativeElement,".p-datepicker-prev-button").focus():ut(this.contentViewChild.nativeElement,".p-datepicker-next-button").focus();else{if(this.navigationState.backward){let n;this.currentView==="month"?n=Sn(this.contentViewChild.nativeElement,".p-datepicker-month-view .p-datepicker-month:not(.p-disabled)"):this.currentView==="year"?n=Sn(this.contentViewChild.nativeElement,".p-datepicker-year-view .p-datepicker-year:not(.p-disabled)"):n=Sn(this.contentViewChild.nativeElement,this._focusKey||".p-datepicker-calendar td span:not(.p-disabled):not(.p-ink)"),n&&n.length>0&&(e=n[n.length-1])}else this.currentView==="month"?e=ut(this.contentViewChild.nativeElement,".p-datepicker-month-view .p-datepicker-month:not(.p-disabled)"):this.currentView==="year"?e=ut(this.contentViewChild.nativeElement,".p-datepicker-year-view .p-datepicker-year:not(.p-disabled)"):e=ut(this.contentViewChild.nativeElement,this._focusKey||".p-datepicker-calendar td span:not(.p-disabled):not(.p-ink)");e&&(e.tabIndex="0",e.focus())}this.navigationState=null,this._focusKey=null}else this.initFocusableCell()}initFocusableCell(){let e=this.contentViewChild?.nativeElement,n;if(this.currentView==="month"){let i=Sn(e,".p-datepicker-month-view .p-datepicker-month:not(.p-disabled)"),r=ut(e,".p-datepicker-month-view .p-datepicker-month.p-highlight");i.forEach(a=>a.tabIndex=-1),n=r||i[0],i.length===0&&Sn(e,'.p-datepicker-month-view .p-datepicker-month.p-disabled[tabindex = "0"]').forEach(s=>s.tabIndex=-1)}else if(this.currentView==="year"){let i=Sn(e,".p-datepicker-year-view .p-datepicker-year:not(.p-disabled)"),r=ut(e,".p-datepicker-year-view .p-datepicker-year.p-highlight");i.forEach(a=>a.tabIndex=-1),n=r||i[0],i.length===0&&Sn(e,'.p-datepicker-year-view .p-datepicker-year.p-disabled[tabindex = "0"]').forEach(s=>s.tabIndex=-1)}else if(n=ut(e,"span.p-highlight"),!n){let i=ut(e,"td.p-datepicker-today span:not(.p-disabled):not(.p-ink)");i?n=i:n=ut(e,".p-datepicker-calendar td span:not(.p-disabled):not(.p-ink)")}n&&(n.tabIndex="0",!this.preventFocus&&(!this.navigationState||!this.navigationState.button)&&setTimeout(()=>{this.$disabled()||n.focus()},1),this.preventFocus=!1)}trapFocus(e){let n=Pf(this.contentViewChild.nativeElement);if(n&&n.length>0)if(!n[0].ownerDocument.activeElement)n[0].focus();else{let i=n.indexOf(n[0].ownerDocument.activeElement);if(e.shiftKey)if(i==-1||i===0)if(this.focusTrap)n[n.length-1].focus();else{if(i===-1)return this.hideOverlay();if(i===0)return}else n[i-1].focus();else if(i==-1)if(this.timeOnly)n[0].focus();else{let r=0;for(let a=0;a<n.length;a++)n[a].tagName==="SPAN"&&(r=a);n[r].focus()}else if(i===n.length-1){if(!this.focusTrap&&i!=-1)return this.hideOverlay();n[0].focus()}else n[i+1].focus()}e.preventDefault()}onMonthDropdownChange(e){this.currentMonth=parseInt(e),this.onMonthChange.emit({month:this.currentMonth+1,year:this.currentYear}),this.createMonths(this.currentMonth,this.currentYear)}onYearDropdownChange(e){this.currentYear=parseInt(e),this.onYearChange.emit({month:this.currentMonth+1,year:this.currentYear}),this.createMonths(this.currentMonth,this.currentYear)}convertTo24Hour(e,n){return this.hourFormat=="12"?e===12?n?12:0:n?e+12:e:e}constrainTime(e,n,i,r){let a=[e,n,i],s=!1,c=this.value,u=this.convertTo24Hour(e,r),f=this.isRangeSelection(),g=this.isMultipleSelection();(f||g)&&(this.value||(this.value=[new Date,new Date]),f&&(c=this.value[1]||this.value[0]),g&&(c=this.value[this.value.length-1]));let k=c?c.toDateString():null,S=this.minDate&&k&&this.minDate.toDateString()===k,F=this.maxDate&&k&&this.maxDate.toDateString()===k;switch(S&&(s=this.minDate.getHours()>=12),!0){case(S&&s&&this.minDate.getHours()===12&&this.minDate.getHours()>u):a[0]=11;case(S&&this.minDate.getHours()===u&&this.minDate.getMinutes()>n):a[1]=this.minDate.getMinutes();case(S&&this.minDate.getHours()===u&&this.minDate.getMinutes()===n&&this.minDate.getSeconds()>i):a[2]=this.minDate.getSeconds();break;case(S&&!s&&this.minDate.getHours()-1===u&&this.minDate.getHours()>u):a[0]=11,this.pm=!0;case(S&&this.minDate.getHours()===u&&this.minDate.getMinutes()>n):a[1]=this.minDate.getMinutes();case(S&&this.minDate.getHours()===u&&this.minDate.getMinutes()===n&&this.minDate.getSeconds()>i):a[2]=this.minDate.getSeconds();break;case(S&&s&&this.minDate.getHours()>u&&u!==12):this.setCurrentHourPM(this.minDate.getHours()),a[0]=this.currentHour||0;case(S&&this.minDate.getHours()===u&&this.minDate.getMinutes()>n):a[1]=this.minDate.getMinutes();case(S&&this.minDate.getHours()===u&&this.minDate.getMinutes()===n&&this.minDate.getSeconds()>i):a[2]=this.minDate.getSeconds();break;case(S&&this.minDate.getHours()>u):a[0]=this.minDate.getHours();case(S&&this.minDate.getHours()===u&&this.minDate.getMinutes()>n):a[1]=this.minDate.getMinutes();case(S&&this.minDate.getHours()===u&&this.minDate.getMinutes()===n&&this.minDate.getSeconds()>i):a[2]=this.minDate.getSeconds();break;case(F&&this.maxDate.getHours()<u):a[0]=this.maxDate.getHours();case(F&&this.maxDate.getHours()===u&&this.maxDate.getMinutes()<n):a[1]=this.maxDate.getMinutes();case(F&&this.maxDate.getHours()===u&&this.maxDate.getMinutes()===n&&this.maxDate.getSeconds()<i):a[2]=this.maxDate.getSeconds();break}return a}incrementHour(e){let n=this.currentHour??0,i=(this.currentHour??0)+this.stepHour,r=this.pm;this.hourFormat=="24"?i=i>=24?i-24:i:this.hourFormat=="12"&&(n<12&&i>11&&(r=!this.pm),i=i>=13?i-12:i),this.toggleAMPMIfNotMinDate(r),[this.currentHour,this.currentMinute,this.currentSecond]=this.constrainTime(i,this.currentMinute,this.currentSecond,r),e.preventDefault()}toggleAMPMIfNotMinDate(e){let n=this.value,i=n?n.toDateString():null;this.minDate&&i&&this.minDate.toDateString()===i&&this.minDate.getHours()>=12?this.pm=!0:this.pm=e}onTimePickerElementMouseDown(e,n,i){this.$disabled()||(this.repeat(e,null,n,i),e.preventDefault())}onTimePickerElementMouseUp(e){this.$disabled()||(this.clearTimePickerTimer(),this.updateTime())}onTimePickerElementMouseLeave(){!this.$disabled()&&this.timePickerTimer&&(this.clearTimePickerTimer(),this.updateTime())}repeat(e,n,i,r){let a=n||500;switch(this.clearTimePickerTimer(),this.timePickerTimer=setTimeout(()=>{this.repeat(e,100,i,r),this.cd.markForCheck()},a),i){case 0:r===1?this.incrementHour(e):this.decrementHour(e);break;case 1:r===1?this.incrementMinute(e):this.decrementMinute(e);break;case 2:r===1?this.incrementSecond(e):this.decrementSecond(e);break}this.updateInputfield()}clearTimePickerTimer(){this.timePickerTimer&&(clearTimeout(this.timePickerTimer),this.timePickerTimer=null)}decrementHour(e){let n=(this.currentHour??0)-this.stepHour,i=this.pm;this.hourFormat=="24"?n=n<0?24+n:n:this.hourFormat=="12"&&(this.currentHour===12&&(i=!this.pm),n=n<=0?12+n:n),this.toggleAMPMIfNotMinDate(i),[this.currentHour,this.currentMinute,this.currentSecond]=this.constrainTime(n,this.currentMinute,this.currentSecond,i),e.preventDefault()}incrementMinute(e){let n=(this.currentMinute??0)+this.stepMinute;n=n>59?n-60:n,[this.currentHour,this.currentMinute,this.currentSecond]=this.constrainTime(this.currentHour||0,n,this.currentSecond,this.pm),e.preventDefault()}decrementMinute(e){let n=(this.currentMinute??0)-this.stepMinute;n=n<0?60+n:n,[this.currentHour,this.currentMinute,this.currentSecond]=this.constrainTime(this.currentHour||0,n,this.currentSecond||0,this.pm),e.preventDefault()}incrementSecond(e){let n=this.currentSecond+this.stepSecond;n=n>59?n-60:n,[this.currentHour,this.currentMinute,this.currentSecond]=this.constrainTime(this.currentHour||0,this.currentMinute||0,n,this.pm),e.preventDefault()}decrementSecond(e){let n=this.currentSecond-this.stepSecond;n=n<0?60+n:n,[this.currentHour,this.currentMinute,this.currentSecond]=this.constrainTime(this.currentHour||0,this.currentMinute||0,n,this.pm),e.preventDefault()}updateTime(){let e=this.value;this.isRangeSelection()&&(e=this.value[1]||this.value[0]),this.isMultipleSelection()&&(e=this.value[this.value.length-1]),e=e?new Date(e.getTime()):new Date,this.hourFormat=="12"?this.currentHour===12?e.setHours(this.pm?12:0):e.setHours(this.pm?this.currentHour+12:this.currentHour):e.setHours(this.currentHour),e.setMinutes(this.currentMinute),e.setSeconds(this.currentSecond),this.isRangeSelection()&&(this.value[1]?e=[this.value[0],e]:e=[e,null]),this.isMultipleSelection()&&(e=[...this.value.slice(0,-1),e]),this.updateModel(e),this.onSelect.emit(e),this.updateInputfield()}toggleAMPM(e){let n=!this.pm;this.pm=n,[this.currentHour,this.currentMinute,this.currentSecond]=this.constrainTime(this.currentHour||0,this.currentMinute||0,this.currentSecond||0,n),this.updateTime(),e.preventDefault()}onUserInput(e){if(!this.isKeydown)return;this.isKeydown=!1;let n=e.target.value;try{let i=this.parseValueFromString(n);this.isValidSelection(i)?(this.updateModel(i),this.updateUI()):this.keepInvalid&&this.updateModel(i)}catch{let r=this.keepInvalid?n:null;this.updateModel(r)}this.onInput.emit(e)}isValidSelection(e){if(this.isSingleSelection())return this.isSelectable(e.getDate(),e.getMonth(),e.getFullYear(),!1);let n=e.every(i=>this.isSelectable(i.getDate(),i.getMonth(),i.getFullYear(),!1));return n&&this.isRangeSelection()&&(n=e.length===1||e.length>1&&e[1]>=e[0]),n}parseValueFromString(e){if(!e||e.trim().length===0)return null;let n;if(this.isSingleSelection())n=this.parseDateTime(e);else if(this.isMultipleSelection()){let i=e.split(this.multipleSeparator);n=[];for(let r of i)n.push(this.parseDateTime(r.trim()))}else if(this.isRangeSelection()){let i=e.split(" "+this.rangeSeparator+" ");n=[];for(let r=0;r<i.length;r++)n[r]=this.parseDateTime(i[r].trim())}return n}parseDateTime(e){let n,i=e.split(" ");if(this.timeOnly)n=new Date,this.populateTime(n,i[0],i[1]);else{let r=this.getDateFormat();if(this.showTime){let a=this.hourFormat=="12"?i.pop():null,s=i.pop();n=this.parseDate(i.join(" "),r),this.populateTime(n,s,a)}else n=this.parseDate(e,r)}return n}populateTime(e,n,i){if(this.hourFormat=="12"&&!i)throw"Invalid Time";this.pm=i==="PM"||i==="pm";let r=this.parseTime(n);e.setHours(r.hour),e.setMinutes(r.minute),e.setSeconds(r.second)}isValidDate(e){return mr(e)&&A0(e)}updateUI(){let e=this.value;Array.isArray(e)&&(e=e.length===2?e[1]:e[0]);let n=this.defaultDate&&this.isValidDate(this.defaultDate)&&!this.value?this.defaultDate:e&&this.isValidDate(e)?e:new Date;this.currentMonth=n.getMonth(),this.currentYear=n.getFullYear(),this.createMonths(this.currentMonth,this.currentYear),(this.showTime||this.timeOnly)&&(this.setCurrentHourPM(n.getHours()),this.currentMinute=n.getMinutes(),this.currentSecond=this.showSeconds?n.getSeconds():0)}showOverlay(){this.overlayVisible||(this.updateUI(),this.touchUI||(this.preventFocus=!0),this.overlayMinWidth=this.el.nativeElement.offsetWidth,this.overlayVisible=!0)}hideOverlay(){this.inputfieldViewChild?.nativeElement.focus(),this.overlayVisible=!1,this.clearTimePickerTimer(),this.touchUI&&this.disableModality(),this.cd.markForCheck()}toggle(){this.inline||(this.overlayVisible?this.hideOverlay():(this.showOverlay(),this.inputfieldViewChild?.nativeElement.focus()))}onOverlayBeforeEnter(e){this.overlay=e.element,this.$attrSelector&&this.overlay.setAttribute(this.$attrSelector,"");let n=this.inline?void 0:{position:"absolute",top:"0",minWidth:`${this.overlayMinWidth}px`};Df(this.overlay,n||{}),this.appendOverlay(),this.alignOverlay(),this.setZIndex(),this.updateFocus(),this.bindListeners(),this.onShow.emit(e.element)}onOverlayAfterLeave(e){this.autoZIndex&&In.clear(e.element),this.restoreOverlayAppend(),this.onOverlayHide(),this.onClose.emit(e.element)}appendOverlay(){this.$appendTo()&&this.$appendTo()!=="self"&&(this.$appendTo()==="body"?this.document.body.appendChild(this.overlay):Pi(this.$appendTo(),this.overlay))}restoreOverlayAppend(){this.overlay&&this.$appendTo()!=="self"&&this.el.nativeElement.appendChild(this.overlay)}alignOverlay(){this.touchUI?this.enableModality(this.overlay):this.overlay&&(this.$appendTo()&&this.$appendTo()!=="self"?pr(this.overlay,this.inputfieldViewChild?.nativeElement):R0(this.overlay,this.inputfieldViewChild?.nativeElement))}bindListeners(){this.bindDocumentClickListener(),this.bindDocumentResizeListener(),this.bindScrollListener()}setZIndex(){this.autoZIndex&&(this.touchUI?In.set("modal",this.overlay,this.baseZIndex||this.config.zIndex.modal):In.set("overlay",this.overlay,this.baseZIndex||this.config.zIndex.overlay))}enableModality(e){!this.mask&&this.touchUI&&(this.mask=this.renderer.createElement("div"),this.renderer.setStyle(this.mask,"zIndex",String(parseInt(e.style.zIndex)-1)),ur(this.mask,"p-overlay-mask p-datepicker-mask p-datepicker-mask-scrollblocker p-overlay-mask p-overlay-mask-enter-active"),this.maskClickListener=this.renderer.listen(this.mask,"click",i=>{this.disableModality(),this.overlayVisible=!1}),this.renderer.appendChild(this.document.body,this.mask),W0())}disableModality(){this.mask&&(ur(this.mask,"p-overlay-mask-leave"),this.animationEndListener||(this.animationEndListener=this.renderer.listen(this.mask,"animationend",this.destroyMask.bind(this))))}destroyMask(){if(!this.mask)return;this.renderer.removeChild(this.document.body,this.mask);let e=this.document.body.children,n;for(let i=0;i<e.length;i++){let r=e[i];if(bn(r,"p-datepicker-mask-scrollblocker")){n=!0;break}}n||K0(),this.unbindAnimationEndListener(),this.unbindMaskClickListener(),this.mask=null}unbindMaskClickListener(){this.maskClickListener&&(this.maskClickListener(),this.maskClickListener=null)}unbindAnimationEndListener(){this.animationEndListener&&this.mask&&(this.animationEndListener(),this.animationEndListener=null)}getDateFormat(){return this.dateFormat||this.getTranslation("dateFormat")}getFirstDateOfWeek(){return this._firstDayOfWeek||this.getTranslation(tn.FIRST_DAY_OF_WEEK)}formatDate(e,n){if(!e)return"";let i,r=f=>{let g=i+1<n.length&&n.charAt(i+1)===f;return g&&i++,g},a=(f,g,C)=>{let k=""+g;if(r(f))for(;k.length<C;)k="0"+k;return k},s=(f,g,C,k)=>r(f)?k[g]:C[g],c="",u=!1;if(e)for(i=0;i<n.length;i++)if(u)n.charAt(i)==="'"&&!r("'")?u=!1:c+=n.charAt(i);else switch(n.charAt(i)){case"d":c+=a("d",e.getDate(),2);break;case"D":c+=s("D",e.getDay(),this.getTranslation(tn.DAY_NAMES_SHORT),this.getTranslation(tn.DAY_NAMES));break;case"o":c+=a("o",Math.round((new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime()-new Date(e.getFullYear(),0,0).getTime())/864e5),3);break;case"m":c+=a("m",e.getMonth()+1,2);break;case"M":c+=s("M",e.getMonth(),this.getTranslation(tn.MONTH_NAMES_SHORT),this.getTranslation(tn.MONTH_NAMES));break;case"y":c+=r("y")?e.getFullYear():(e.getFullYear()%100<10?"0":"")+e.getFullYear()%100;break;case"@":c+=e.getTime();break;case"!":c+=e.getTime()*1e4+this.ticksTo1970;break;case"'":r("'")?c+="'":u=!0;break;default:c+=n.charAt(i)}return c}formatTime(e){if(!e)return"";let n="",i=e.getHours(),r=e.getMinutes(),a=e.getSeconds();return this.hourFormat=="12"&&i>11&&i!=12&&(i-=12),this.hourFormat=="12"?n+=i===0?12:i<10?"0"+i:i:n+=i<10?"0"+i:i,n+=":",n+=r<10?"0"+r:r,this.showSeconds&&(n+=":",n+=a<10?"0"+a:a),this.hourFormat=="12"&&(n+=e.getHours()>11?" PM":" AM"),n}parseTime(e){let n=e.split(":"),i=this.showSeconds?3:2;if(n.length!==i)throw"Invalid time";let r=parseInt(n[0]),a=parseInt(n[1]),s=this.showSeconds?parseInt(n[2]):null;if(isNaN(r)||isNaN(a)||r>23||a>59||this.hourFormat=="12"&&r>12||this.showSeconds&&(isNaN(s)||s>59))throw"Invalid time";return this.hourFormat=="12"&&(r!==12&&this.pm?r+=12:!this.pm&&r===12&&(r-=12)),{hour:r,minute:a,second:s}}parseDate(e,n){if(n==null||e==null)throw"Invalid arguments";if(e=typeof e=="object"?e.toString():e+"",e==="")return null;let i,r,a,s=0,c=typeof this.shortYearCutoff!="string"?this.shortYearCutoff:new Date().getFullYear()%100+parseInt(this.shortYearCutoff,10),u=-1,f=-1,g=-1,C=-1,k=!1,S,F=ae=>{let Re=i+1<n.length&&n.charAt(i+1)===ae;return Re&&i++,Re},q=ae=>{let Re=F(ae),De=ae==="@"?14:ae==="!"?20:ae==="y"&&Re?4:ae==="o"?3:2,Ge=ae==="y"?De:1,Lt=new RegExp("^\\d{"+Ge+","+De+"}"),ct=e.substring(s).match(Lt);if(!ct)throw"Missing number at position "+s;return s+=ct[0].length,parseInt(ct[0],10)},Y=(ae,Re,De)=>{let Ge=-1,Lt=F(ae)?De:Re,ct=[];for(let vt=0;vt<Lt.length;vt++)ct.push([vt,Lt[vt]]);ct.sort((vt,tt)=>-(vt[1].length-tt[1].length));for(let vt=0;vt<ct.length;vt++){let tt=ct[vt][1];if(e.substr(s,tt.length).toLowerCase()===tt.toLowerCase()){Ge=ct[vt][0],s+=tt.length;break}}if(Ge!==-1)return Ge+1;throw"Unknown name at position "+s},ee=()=>{if(e.charAt(s)!==n.charAt(i))throw"Unexpected literal at position "+s;s++};for(this.view==="month"&&(g=1),i=0;i<n.length;i++)if(k)n.charAt(i)==="'"&&!F("'")?k=!1:ee();else switch(n.charAt(i)){case"d":g=q("d");break;case"D":Y("D",this.getTranslation(tn.DAY_NAMES_SHORT),this.getTranslation(tn.DAY_NAMES));break;case"o":C=q("o");break;case"m":f=q("m");break;case"M":f=Y("M",this.getTranslation(tn.MONTH_NAMES_SHORT),this.getTranslation(tn.MONTH_NAMES));break;case"y":u=q("y");break;case"@":S=new Date(q("@")),u=S.getFullYear(),f=S.getMonth()+1,g=S.getDate();break;case"!":S=new Date((q("!")-this.ticksTo1970)/1e4),u=S.getFullYear(),f=S.getMonth()+1,g=S.getDate();break;case"'":F("'")?ee():k=!0;break;default:ee()}if(s<e.length&&(a=e.substr(s),!/^\s+/.test(a)))throw"Extra/unparsed characters found in date: "+a;if(u===-1?u=new Date().getFullYear():u<100&&(u+=new Date().getFullYear()-new Date().getFullYear()%100+(u<=c?0:-100)),C>-1){f=1,g=C;do{if(r=this.getDaysCountInMonth(u,f-1),g<=r)break;f++,g-=r}while(!0)}if(this.view==="year"&&(f=f===-1?1:f,g=g===-1?1:g),S=this.daylightSavingAdjust(new Date(u,f-1,g)),S.getFullYear()!==u||S.getMonth()+1!==f||S.getDate()!==g)throw"Invalid date";return S}daylightSavingAdjust(e){return e?(e.setHours(e.getHours()>12?e.getHours()+2:0),e):null}isValidDateForTimeConstraints(e){return this.keepInvalid?!0:(!this.minDate||e>=this.minDate)&&(!this.maxDate||e<=this.maxDate)}onTodayButtonClick(e){let n=new Date,i={day:n.getDate(),month:n.getMonth(),year:n.getFullYear(),otherMonth:n.getMonth()!==this.currentMonth||n.getFullYear()!==this.currentYear,today:!0,selectable:!0};this.createMonths(n.getMonth(),n.getFullYear()),this.onDateSelect(e,i),this.onTodayClick.emit(n)}onClearButtonClick(e){this.updateModel(null),this.updateInputfield(),this.hideOverlay(),this.onClearClick.emit(e)}createResponsiveStyle(){if(this.numberOfMonths>1&&this.responsiveOptions){this.responsiveStyleElement||(this.responsiveStyleElement=this.renderer.createElement("style"),this.responsiveStyleElement.type="text/css",fr(this.responsiveStyleElement,"nonce",this.config?.csp()?.nonce),this.renderer.appendChild(this.document.body,this.responsiveStyleElement));let e="";if(this.responsiveOptions){let n=[...this.responsiveOptions].filter(i=>!!(i.breakpoint&&i.numMonths)).sort((i,r)=>-1*i.breakpoint.localeCompare(r.breakpoint,void 0,{numeric:!0}));for(let i=0;i<n.length;i++){let{breakpoint:r,numMonths:a}=n[i],s=`
1224
+ .p-datepicker[${this.attributeSelector}] .p-datepicker-group:nth-child(${a}) .p-datepicker-next {
1225
+ display: inline-flex !important;
1226
+ }
1227
+ `;for(let c=a;c<this.numberOfMonths;c++)s+=`
1228
+ .p-datepicker[${this.attributeSelector}] .p-datepicker-group:nth-child(${c+1}) {
1229
+ display: none !important;
1230
+ }
1231
+ `;e+=`
1232
+ @media screen and (max-width: ${r}) {
1233
+ ${s}
1234
+ }
1235
+ `}}this.responsiveStyleElement.innerHTML=e,fr(this.responsiveStyleElement,"nonce",this.config?.csp()?.nonce)}}destroyResponsiveStyleElement(){this.responsiveStyleElement&&(this.responsiveStyleElement.remove(),this.responsiveStyleElement=null)}bindDocumentClickListener(){this.documentClickListener||this.zone.runOutsideAngular(()=>{let e=this.el?this.el.nativeElement.ownerDocument:this.document;this.documentClickListener=this.renderer.listen(e,"mousedown",n=>{this.isOutsideClicked(n)&&this.overlayVisible&&this.zone.run(()=>{this.hideOverlay(),this.onClickOutside.emit(n),this.cd.markForCheck()})})})}unbindDocumentClickListener(){this.documentClickListener&&(this.documentClickListener(),this.documentClickListener=null)}bindDocumentResizeListener(){!this.documentResizeListener&&!this.touchUI&&(this.documentResizeListener=this.renderer.listen(this.window,"resize",this.onWindowResize.bind(this)))}unbindDocumentResizeListener(){this.documentResizeListener&&(this.documentResizeListener(),this.documentResizeListener=null)}bindScrollListener(){this.scrollHandler||(this.scrollHandler=new _r(this.el?.nativeElement,()=>{this.overlayVisible&&this.hideOverlay()})),this.scrollHandler.bindScrollListener()}unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()}isOutsideClicked(e){return!(this.el.nativeElement.isSameNode(e.target)||this.isNavIconClicked(e)||this.el.nativeElement.contains(e.target)||this.overlay&&this.overlay.contains(e.target))}isNavIconClicked(e){return bn(e.target,"p-datepicker-prev-button")||bn(e.target,"p-datepicker-prev-icon")||bn(e.target,"p-datepicker-next-button")||bn(e.target,"p-datepicker-next-icon")}onWindowResize(){this.overlayVisible&&!es()&&this.hideOverlay()}onOverlayHide(){this.currentView=this.view,this.mask&&this.destroyMask(),this.unbindDocumentClickListener(),this.unbindDocumentResizeListener(),this.unbindScrollListener(),this.overlay=null}writeControlValue(e){if(this.value=e,this.value&&typeof this.value=="string")try{this.value=this.parseValueFromString(this.value)}catch{this.keepInvalid&&(this.value=e)}this.updateInputfield(),this.updateUI(),this.cd.markForCheck()}onDestroy(){this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.translationSubscription&&this.translationSubscription.unsubscribe(),this.overlay&&this.autoZIndex&&In.clear(this.overlay),this.destroyResponsiveStyleElement(),this.clearTimePickerTimer(),this.restoreOverlayAppend(),this.onOverlayHide()}static \u0275fac=function(n){return new(n||t)(fn(Zt),fn(po))};static \u0275cmp=z({type:t,selectors:[["p-datePicker"],["p-datepicker"],["p-date-picker"]],contentQueries:function(n,i,r){if(n&1&&Qt(r,P3,4)(r,R3,4)(r,O3,4)(r,F3,4)(r,N3,4)(r,A3,4)(r,L3,4)(r,B3,4)(r,V3,4)(r,z3,4)(r,H3,4)(r,q3,4)(r,G3,4)(r,bt,4),n&2){let a;Q(a=J())&&(i.dateTemplate=a.first),Q(a=J())&&(i.headerTemplate=a.first),Q(a=J())&&(i.footerTemplate=a.first),Q(a=J())&&(i.disabledDateTemplate=a.first),Q(a=J())&&(i.decadeTemplate=a.first),Q(a=J())&&(i.previousIconTemplate=a.first),Q(a=J())&&(i.nextIconTemplate=a.first),Q(a=J())&&(i.triggerIconTemplate=a.first),Q(a=J())&&(i.clearIconTemplate=a.first),Q(a=J())&&(i.decrementIconTemplate=a.first),Q(a=J())&&(i.incrementIconTemplate=a.first),Q(a=J())&&(i.inputIconTemplate=a.first),Q(a=J())&&(i.buttonBarTemplate=a.first),Q(a=J())&&(i.templates=a)}},viewQuery:function(n,i){if(n&1&&Tn(j3,5)(U3,5),n&2){let r;Q(r=J())&&(i.inputfieldViewChild=r.first),Q(r=J())&&(i.content=r.first)}},hostVars:4,hostBindings:function(n,i){n&2&&(qt(i.sx("root")),H(i.cn(i.cx("root"),i.styleClass)))},inputs:{iconDisplay:"iconDisplay",styleClass:"styleClass",inputStyle:"inputStyle",inputId:"inputId",inputStyleClass:"inputStyleClass",placeholder:"placeholder",ariaLabelledBy:"ariaLabelledBy",ariaLabel:"ariaLabel",iconAriaLabel:"iconAriaLabel",dateFormat:"dateFormat",multipleSeparator:"multipleSeparator",rangeSeparator:"rangeSeparator",inline:[2,"inline","inline",j],showOtherMonths:[2,"showOtherMonths","showOtherMonths",j],selectOtherMonths:[2,"selectOtherMonths","selectOtherMonths",j],showIcon:[2,"showIcon","showIcon",j],icon:"icon",readonlyInput:[2,"readonlyInput","readonlyInput",j],shortYearCutoff:"shortYearCutoff",hourFormat:"hourFormat",timeOnly:[2,"timeOnly","timeOnly",j],stepHour:[2,"stepHour","stepHour",xe],stepMinute:[2,"stepMinute","stepMinute",xe],stepSecond:[2,"stepSecond","stepSecond",xe],showSeconds:[2,"showSeconds","showSeconds",j],showOnFocus:[2,"showOnFocus","showOnFocus",j],showWeek:[2,"showWeek","showWeek",j],startWeekFromFirstDayOfYear:"startWeekFromFirstDayOfYear",showClear:[2,"showClear","showClear",j],dataType:"dataType",selectionMode:"selectionMode",maxDateCount:[2,"maxDateCount","maxDateCount",xe],showButtonBar:[2,"showButtonBar","showButtonBar",j],todayButtonStyleClass:"todayButtonStyleClass",clearButtonStyleClass:"clearButtonStyleClass",autofocus:[2,"autofocus","autofocus",j],autoZIndex:[2,"autoZIndex","autoZIndex",j],baseZIndex:[2,"baseZIndex","baseZIndex",xe],panelStyleClass:"panelStyleClass",panelStyle:"panelStyle",keepInvalid:[2,"keepInvalid","keepInvalid",j],hideOnDateTimeSelect:[2,"hideOnDateTimeSelect","hideOnDateTimeSelect",j],touchUI:[2,"touchUI","touchUI",j],timeSeparator:"timeSeparator",focusTrap:[2,"focusTrap","focusTrap",j],showTransitionOptions:"showTransitionOptions",hideTransitionOptions:"hideTransitionOptions",tabindex:[2,"tabindex","tabindex",xe],minDate:"minDate",maxDate:"maxDate",disabledDates:"disabledDates",disabledDays:"disabledDays",showTime:"showTime",responsiveOptions:"responsiveOptions",numberOfMonths:"numberOfMonths",firstDayOfWeek:"firstDayOfWeek",view:"view",defaultDate:"defaultDate",appendTo:[1,"appendTo"],motionOptions:[1,"motionOptions"]},outputs:{onFocus:"onFocus",onBlur:"onBlur",onClose:"onClose",onSelect:"onSelect",onClear:"onClear",onInput:"onInput",onTodayClick:"onTodayClick",onClearClick:"onClearClick",onMonthChange:"onMonthChange",onYearChange:"onYearChange",onClickOutside:"onClickOutside",onShow:"onShow"},features:[we([UO,Xb,{provide:Zb,useExisting:t},{provide:kt,useExisting:t}]),wt([Ie]),Z],ngContentSelectors:W3,decls:11,vars:17,consts:[["contentWrapper",""],["inputfield",""],["icon",""],[3,"ngIf"],["name","p-anchored-overlay",3,"onBeforeEnter","onAfterLeave","visible","appear","options"],[3,"click","ngStyle","pBind"],[4,"ngTemplateOutlet"],[4,"ngIf"],[3,"class","pBind",4,"ngIf"],["pInputText","","data-p-maskable","","type","text","role","combobox","aria-autocomplete","none","aria-haspopup","dialog","autocomplete","off",3,"focus","keydown","click","blur","input","pSize","value","ngStyle","pAutoFocus","variant","fluid","invalid","pt","unstyled"],["type","button","aria-haspopup","dialog","tabindex","0",3,"class","disabled","pBind","click",4,"ngIf"],["data-p-icon","times",3,"class","pBind","click",4,"ngIf"],[3,"class","pBind","click",4,"ngIf"],["data-p-icon","times",3,"click","pBind"],[3,"click","pBind"],["type","button","aria-haspopup","dialog","tabindex","0",3,"click","disabled","pBind"],[3,"ngClass","pBind",4,"ngIf"],[3,"ngClass","pBind"],["data-p-icon","calendar",3,"pBind",4,"ngIf"],["data-p-icon","calendar",3,"pBind"],[3,"pBind"],["data-p-icon","calendar",3,"class","pBind","click",4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["data-p-icon","calendar",3,"click","pBind"],[3,"class","pBind",4,"ngFor","ngForOf"],["rounded","","variant","text","severity","secondary","type","button",3,"keydown","onClick","styleClass","ngStyle","ariaLabel","pt"],["type","button","pRipple","",3,"class","pBind","click","keydown",4,"ngIf"],["rounded","","variant","text","severity","secondary",3,"keydown","onClick","styleClass","ngStyle","ariaLabel","pt"],["role","grid",3,"class","pBind",4,"ngIf"],["data-p-icon","chevron-left",4,"ngIf"],["data-p-icon","chevron-left"],["type","button","pRipple","",3,"click","keydown","pBind"],["data-p-icon","chevron-right",4,"ngIf"],["data-p-icon","chevron-right"],["role","grid",3,"pBind"],["scope","col",3,"class","pBind",4,"ngFor","ngForOf"],[3,"pBind",4,"ngFor","ngForOf"],["scope","col",3,"pBind"],["draggable","false","pRipple","",3,"click","keydown","ngClass","pBind"],["class","p-hidden-accessible","aria-live","polite",4,"ngIf"],["aria-live","polite",1,"p-hidden-accessible"],["pRipple","",3,"class","pBind","click","keydown",4,"ngFor","ngForOf"],["pRipple","",3,"click","keydown","pBind"],["rounded","","variant","text","severity","secondary",3,"keydown","keydown.enter","keydown.space","mousedown","mouseup","keyup.enter","keyup.space","mouseleave","styleClass","pt"],[1,"p-datepicker-separator",3,"pBind"],["data-p-icon","chevron-up",3,"pBind",4,"ngIf"],["data-p-icon","chevron-up",3,"pBind"],["data-p-icon","chevron-down",3,"pBind",4,"ngIf"],["data-p-icon","chevron-down",3,"pBind"],["text","","rounded","","severity","secondary",3,"keydown","onClick","keydown.enter","styleClass","pt"],["text","","rounded","","severity","secondary",3,"keydown","click","keydown.enter","styleClass","pt"],["size","small","severity","secondary","variant","text","size","small",3,"keydown","onClick","styleClass","label","ngClass","pt"]],template:function(n,i){n&1&&(mn($3),I(0,hR,5,28,"ng-template",3),h(1,"p-motion",4),A("onBeforeEnter",function(a){return i.onOverlayBeforeEnter(a)})("onAfterLeave",function(a){return i.onOverlayAfterLeave(a)}),h(2,"div",5,0),A("click",function(a){return i.onOverlayClick(a)}),$e(4),I(5,fR,1,0,"ng-container",6)(6,XR,5,6,"ng-container",7)(7,AO,28,38,"div",8)(8,zO,3,4,"div",8),$e(9,1),I(10,HO,1,0,"ng-container",6),_()()),n&2&&(m("ngIf",!i.inline),l(),m("visible",i.inline||i.overlayVisible)("appear",!i.inline)("options",i.computedMotionOptions()),l(),H(i.cn(i.cx("panel"),i.panelStyleClass)),m("ngStyle",i.panelStyle)("pBind",i.ptm("panel")),O("id",i.panelId)("aria-label",i.getTranslation("chooseDate"))("role",i.inline?null:"dialog")("aria-modal",i.inline?null:"true"),l(3),m("ngTemplateOutlet",i.headerTemplate||i._headerTemplate),l(),m("ngIf",!i.timeOnly),l(),m("ngIf",(i.showTime||i.timeOnly)&&i.currentView==="date"),l(),m("ngIf",i.showButtonBar),l(2),m("ngTemplateOutlet",i.footerTemplate||i._footerTemplate))},dependencies:[gt,Kn,co,gn,Mt,Yn,Ut,as,Rb,Ob,Fb,tb,rs,Pb,bo,fo,Le,kn,Ie,vo,nb],encapsulation:2,changeDetection:0})}return t})(),Jb=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=_t({type:t});static \u0275inj=mt({imports:[Qb,Le,Le]})}return t})();var $O=["data-p-icon","filter-fill"],ev=(()=>{class t extends Te{static \u0275fac=(()=>{let e;return function(i){return(e||(e=G(t)))(i||t)}})();static \u0275cmp=z({type:t,selectors:[["","data-p-icon","filter-fill"]],features:[Z],attrs:$O,decls:1,vars:0,consts:[["d","M13.7274 0.33847C13.6228 0.130941 13.4095 0 13.1764 0H0.82351C0.590451 0 0.377157 0.130941 0.272568 0.33847C0.167157 0.545999 0.187746 0.795529 0.325275 0.98247L4.73527 6.99588V13.3824C4.73527 13.7233 5.01198 14 5.35292 14H8.64704C8.98798 14 9.26469 13.7233 9.26469 13.3824V6.99588L13.6747 0.98247C13.8122 0.795529 13.8328 0.545999 13.7274 0.33847Z","fill","currentColor"]],template:function(n,i){n&1&&($(),ie(0,"path",0))},encapsulation:2})}return t})();var tv=`
1236
+ .p-inputnumber {
1237
+ display: inline-flex;
1238
+ position: relative;
1239
+ }
1240
+
1241
+ .p-inputnumber-button {
1242
+ display: flex;
1243
+ align-items: center;
1244
+ justify-content: center;
1245
+ flex: 0 0 auto;
1246
+ cursor: pointer;
1247
+ background: dt('inputnumber.button.background');
1248
+ color: dt('inputnumber.button.color');
1249
+ width: dt('inputnumber.button.width');
1250
+ transition:
1251
+ background dt('inputnumber.transition.duration'),
1252
+ color dt('inputnumber.transition.duration'),
1253
+ border-color dt('inputnumber.transition.duration'),
1254
+ outline-color dt('inputnumber.transition.duration');
1255
+ }
1256
+
1257
+ .p-inputnumber-button:disabled {
1258
+ cursor: auto;
1259
+ }
1260
+
1261
+ .p-inputnumber-button:not(:disabled):hover {
1262
+ background: dt('inputnumber.button.hover.background');
1263
+ color: dt('inputnumber.button.hover.color');
1264
+ }
1265
+
1266
+ .p-inputnumber-button:not(:disabled):active {
1267
+ background: dt('inputnumber.button.active.background');
1268
+ color: dt('inputnumber.button.active.color');
1269
+ }
1270
+
1271
+ .p-inputnumber-stacked .p-inputnumber-button {
1272
+ position: relative;
1273
+ flex: 1 1 auto;
1274
+ border: 0 none;
1275
+ }
1276
+
1277
+ .p-inputnumber-stacked .p-inputnumber-button-group {
1278
+ display: flex;
1279
+ flex-direction: column;
1280
+ position: absolute;
1281
+ inset-block-start: 1px;
1282
+ inset-inline-end: 1px;
1283
+ height: calc(100% - 2px);
1284
+ z-index: 1;
1285
+ }
1286
+
1287
+ .p-inputnumber-stacked .p-inputnumber-increment-button {
1288
+ padding: 0;
1289
+ border-start-end-radius: calc(dt('inputnumber.button.border.radius') - 1px);
1290
+ }
1291
+
1292
+ .p-inputnumber-stacked .p-inputnumber-decrement-button {
1293
+ padding: 0;
1294
+ border-end-end-radius: calc(dt('inputnumber.button.border.radius') - 1px);
1295
+ }
1296
+
1297
+ .p-inputnumber-stacked .p-inputnumber-input {
1298
+ padding-inline-end: calc(dt('inputnumber.button.width') + dt('form.field.padding.x'));
1299
+ }
1300
+
1301
+ .p-inputnumber-horizontal .p-inputnumber-button {
1302
+ border: 1px solid dt('inputnumber.button.border.color');
1303
+ }
1304
+
1305
+ .p-inputnumber-horizontal .p-inputnumber-button:hover {
1306
+ border-color: dt('inputnumber.button.hover.border.color');
1307
+ }
1308
+
1309
+ .p-inputnumber-horizontal .p-inputnumber-button:active {
1310
+ border-color: dt('inputnumber.button.active.border.color');
1311
+ }
1312
+
1313
+ .p-inputnumber-horizontal .p-inputnumber-increment-button {
1314
+ order: 3;
1315
+ border-start-end-radius: dt('inputnumber.button.border.radius');
1316
+ border-end-end-radius: dt('inputnumber.button.border.radius');
1317
+ border-inline-start: 0 none;
1318
+ }
1319
+
1320
+ .p-inputnumber-horizontal .p-inputnumber-input {
1321
+ order: 2;
1322
+ border-radius: 0;
1323
+ }
1324
+
1325
+ .p-inputnumber-horizontal .p-inputnumber-decrement-button {
1326
+ order: 1;
1327
+ border-start-start-radius: dt('inputnumber.button.border.radius');
1328
+ border-end-start-radius: dt('inputnumber.button.border.radius');
1329
+ border-inline-end: 0 none;
1330
+ }
1331
+
1332
+ .p-floatlabel:has(.p-inputnumber-horizontal) label {
1333
+ margin-inline-start: dt('inputnumber.button.width');
1334
+ }
1335
+
1336
+ .p-inputnumber-vertical {
1337
+ flex-direction: column;
1338
+ }
1339
+
1340
+ .p-inputnumber-vertical .p-inputnumber-button {
1341
+ border: 1px solid dt('inputnumber.button.border.color');
1342
+ padding: dt('inputnumber.button.vertical.padding');
1343
+ }
1344
+
1345
+ .p-inputnumber-vertical .p-inputnumber-button:hover {
1346
+ border-color: dt('inputnumber.button.hover.border.color');
1347
+ }
1348
+
1349
+ .p-inputnumber-vertical .p-inputnumber-button:active {
1350
+ border-color: dt('inputnumber.button.active.border.color');
1351
+ }
1352
+
1353
+ .p-inputnumber-vertical .p-inputnumber-increment-button {
1354
+ order: 1;
1355
+ border-start-start-radius: dt('inputnumber.button.border.radius');
1356
+ border-start-end-radius: dt('inputnumber.button.border.radius');
1357
+ width: 100%;
1358
+ border-block-end: 0 none;
1359
+ }
1360
+
1361
+ .p-inputnumber-vertical .p-inputnumber-input {
1362
+ order: 2;
1363
+ border-radius: 0;
1364
+ text-align: center;
1365
+ }
1366
+
1367
+ .p-inputnumber-vertical .p-inputnumber-decrement-button {
1368
+ order: 3;
1369
+ border-end-start-radius: dt('inputnumber.button.border.radius');
1370
+ border-end-end-radius: dt('inputnumber.button.border.radius');
1371
+ width: 100%;
1372
+ border-block-start: 0 none;
1373
+ }
1374
+
1375
+ .p-inputnumber-input {
1376
+ flex: 1 1 auto;
1377
+ }
1378
+
1379
+ .p-inputnumber-fluid {
1380
+ width: 100%;
1381
+ }
1382
+
1383
+ .p-inputnumber-fluid .p-inputnumber-input {
1384
+ width: 1%;
1385
+ }
1386
+
1387
+ .p-inputnumber-fluid.p-inputnumber-vertical .p-inputnumber-input {
1388
+ width: 100%;
1389
+ }
1390
+
1391
+ .p-inputnumber:has(.p-inputtext-sm) .p-inputnumber-button .p-icon {
1392
+ font-size: dt('form.field.sm.font.size');
1393
+ width: dt('form.field.sm.font.size');
1394
+ height: dt('form.field.sm.font.size');
1395
+ }
1396
+
1397
+ .p-inputnumber:has(.p-inputtext-lg) .p-inputnumber-button .p-icon {
1398
+ font-size: dt('form.field.lg.font.size');
1399
+ width: dt('form.field.lg.font.size');
1400
+ height: dt('form.field.lg.font.size');
1401
+ }
1402
+
1403
+ .p-inputnumber-clear-icon {
1404
+ position: absolute;
1405
+ top: 50%;
1406
+ margin-top: -0.5rem;
1407
+ cursor: pointer;
1408
+ inset-inline-end: dt('form.field.padding.x');
1409
+ color: dt('form.field.icon.color');
1410
+ }
1411
+
1412
+ .p-inputnumber:has(.p-inputnumber-clear-icon) .p-inputnumber-input {
1413
+ padding-inline-end: calc((dt('form.field.padding.x') * 2) + dt('icon.size'));
1414
+ }
1415
+
1416
+ .p-inputnumber-stacked .p-inputnumber-clear-icon {
1417
+ inset-inline-end: calc(dt('inputnumber.button.width') + dt('form.field.padding.x'));
1418
+ }
1419
+
1420
+ .p-inputnumber-stacked:has(.p-inputnumber-clear-icon) .p-inputnumber-input {
1421
+ padding-inline-end: calc(dt('inputnumber.button.width') + (dt('form.field.padding.x') * 2) + dt('icon.size'));
1422
+ }
1423
+
1424
+ .p-inputnumber-horizontal .p-inputnumber-clear-icon {
1425
+ inset-inline-end: calc(dt('inputnumber.button.width') + dt('form.field.padding.x'));
1426
+ }
1427
+ `;var WO=["clearicon"],KO=["incrementbuttonicon"],YO=["decrementbuttonicon"],XO=["input"];function ZO(t,o){if(t&1){let e=W();$(),h(0,"svg",7),A("click",function(){w(e);let i=d(2);return T(i.clear())}),_()}if(t&2){let e=d(2);H(e.cx("clearIcon")),m("pBind",e.ptm("clearIcon"))}}function QO(t,o){}function JO(t,o){t&1&&I(0,QO,0,0,"ng-template")}function eF(t,o){if(t&1){let e=W();h(0,"span",8),A("click",function(){w(e);let i=d(2);return T(i.clear())}),I(1,JO,1,0,null,9),_()}if(t&2){let e=d(2);H(e.cx("clearIcon")),m("pBind",e.ptm("clearIcon")),l(),m("ngTemplateOutlet",e.clearIconTemplate||e._clearIconTemplate)}}function tF(t,o){if(t&1&&(me(0),I(1,ZO,1,3,"svg",5)(2,eF,2,4,"span",6),_e()),t&2){let e=d();l(),m("ngIf",!e.clearIconTemplate&&!e._clearIconTemplate),l(),m("ngIf",e.clearIconTemplate||e._clearIconTemplate)}}function nF(t,o){if(t&1&&N(0,"span",13),t&2){let e=d(2);m("pBind",e.ptm("incrementButtonIcon"))("ngClass",e.incrementButtonIcon)}}function iF(t,o){if(t&1&&($(),N(0,"svg",15)),t&2){let e=d(3);m("pBind",e.ptm("incrementButtonIcon"))}}function oF(t,o){}function rF(t,o){t&1&&I(0,oF,0,0,"ng-template")}function aF(t,o){if(t&1&&(me(0),I(1,iF,1,1,"svg",14)(2,rF,1,0,null,9),_e()),t&2){let e=d(2);l(),m("ngIf",!e.incrementButtonIconTemplate&&!e._incrementButtonIconTemplate),l(),m("ngTemplateOutlet",e.incrementButtonIconTemplate||e._incrementButtonIconTemplate)}}function sF(t,o){if(t&1&&N(0,"span",13),t&2){let e=d(2);m("pBind",e.ptm("decrementButtonIcon"))("ngClass",e.decrementButtonIcon)}}function lF(t,o){if(t&1&&($(),N(0,"svg",17)),t&2){let e=d(3);m("pBind",e.ptm("decrementButtonIcon"))}}function cF(t,o){}function dF(t,o){t&1&&I(0,cF,0,0,"ng-template")}function uF(t,o){if(t&1&&(me(0),I(1,lF,1,1,"svg",16)(2,dF,1,0,null,9),_e()),t&2){let e=d(2);l(),m("ngIf",!e.decrementButtonIconTemplate&&!e._decrementButtonIconTemplate),l(),m("ngTemplateOutlet",e.decrementButtonIconTemplate||e._decrementButtonIconTemplate)}}function pF(t,o){if(t&1){let e=W();h(0,"span",10)(1,"button",11),A("mousedown",function(i){w(e);let r=d();return T(r.onUpButtonMouseDown(i))})("mouseup",function(){w(e);let i=d();return T(i.onUpButtonMouseUp())})("mouseleave",function(){w(e);let i=d();return T(i.onUpButtonMouseLeave())})("keydown",function(i){w(e);let r=d();return T(r.onUpButtonKeyDown(i))})("keyup",function(){w(e);let i=d();return T(i.onUpButtonKeyUp())}),I(2,nF,1,2,"span",12)(3,aF,3,2,"ng-container",2),_(),h(4,"button",11),A("mousedown",function(i){w(e);let r=d();return T(r.onDownButtonMouseDown(i))})("mouseup",function(){w(e);let i=d();return T(i.onDownButtonMouseUp())})("mouseleave",function(){w(e);let i=d();return T(i.onDownButtonMouseLeave())})("keydown",function(i){w(e);let r=d();return T(r.onDownButtonKeyDown(i))})("keyup",function(){w(e);let i=d();return T(i.onDownButtonKeyUp())}),I(5,sF,1,2,"span",12)(6,uF,3,2,"ng-container",2),_()()}if(t&2){let e=d();H(e.cx("buttonGroup")),m("pBind",e.ptm("buttonGroup")),O("data-p",e.dataP),l(),H(e.cn(e.cx("incrementButton"),e.incrementButtonClass)),m("pBind",e.ptm("incrementButton")),O("disabled",e.$disabled()?"":void 0)("aria-hidden",!0)("data-p",e.dataP),l(),m("ngIf",e.incrementButtonIcon),l(),m("ngIf",!e.incrementButtonIcon),l(),H(e.cn(e.cx("decrementButton"),e.decrementButtonClass)),m("pBind",e.ptm("decrementButton")),O("disabled",e.$disabled()?"":void 0)("aria-hidden",!0)("data-p",e.dataP),l(),m("ngIf",e.decrementButtonIcon),l(),m("ngIf",!e.decrementButtonIcon)}}function hF(t,o){if(t&1&&N(0,"span",13),t&2){let e=d(2);m("pBind",e.ptm("incrementButtonIcon"))("ngClass",e.incrementButtonIcon)}}function fF(t,o){if(t&1&&($(),N(0,"svg",15)),t&2){let e=d(3);m("pBind",e.ptm("incrementButtonIcon"))}}function mF(t,o){}function _F(t,o){t&1&&I(0,mF,0,0,"ng-template")}function gF(t,o){if(t&1&&(me(0),I(1,fF,1,1,"svg",14)(2,_F,1,0,null,9),_e()),t&2){let e=d(2);l(),m("ngIf",!e.incrementButtonIconTemplate&&!e._incrementButtonIconTemplate),l(),m("ngTemplateOutlet",e.incrementButtonIconTemplate||e._incrementButtonIconTemplate)}}function bF(t,o){if(t&1){let e=W();h(0,"button",11),A("mousedown",function(i){w(e);let r=d();return T(r.onUpButtonMouseDown(i))})("mouseup",function(){w(e);let i=d();return T(i.onUpButtonMouseUp())})("mouseleave",function(){w(e);let i=d();return T(i.onUpButtonMouseLeave())})("keydown",function(i){w(e);let r=d();return T(r.onUpButtonKeyDown(i))})("keyup",function(){w(e);let i=d();return T(i.onUpButtonKeyUp())}),I(1,hF,1,2,"span",12)(2,gF,3,2,"ng-container",2),_()}if(t&2){let e=d();H(e.cn(e.cx("incrementButton"),e.incrementButtonClass)),m("pBind",e.ptm("incrementButton")),O("disabled",e.$disabled()?"":void 0)("aria-hidden",!0)("data-p",e.dataP),l(),m("ngIf",e.incrementButtonIcon),l(),m("ngIf",!e.incrementButtonIcon)}}function vF(t,o){if(t&1&&N(0,"span",13),t&2){let e=d(2);m("pBind",e.ptm("decrementButtonIcon"))("ngClass",e.decrementButtonIcon)}}function yF(t,o){if(t&1&&($(),N(0,"svg",17)),t&2){let e=d(3);m("pBind",e.ptm("decrementButtonIcon"))}}function CF(t,o){}function xF(t,o){t&1&&I(0,CF,0,0,"ng-template")}function wF(t,o){if(t&1&&(me(0),I(1,yF,1,1,"svg",16)(2,xF,1,0,null,9),_e()),t&2){let e=d(2);l(),m("ngIf",!e.decrementButtonIconTemplate&&!e._decrementButtonIconTemplate),l(),m("ngTemplateOutlet",e.decrementButtonIconTemplate||e._decrementButtonIconTemplate)}}function TF(t,o){if(t&1){let e=W();h(0,"button",11),A("mousedown",function(i){w(e);let r=d();return T(r.onDownButtonMouseDown(i))})("mouseup",function(){w(e);let i=d();return T(i.onDownButtonMouseUp())})("mouseleave",function(){w(e);let i=d();return T(i.onDownButtonMouseLeave())})("keydown",function(i){w(e);let r=d();return T(r.onDownButtonKeyDown(i))})("keyup",function(){w(e);let i=d();return T(i.onDownButtonKeyUp())}),I(1,vF,1,2,"span",12)(2,wF,3,2,"ng-container",2),_()}if(t&2){let e=d();H(e.cn(e.cx("decrementButton"),e.decrementButtonClass)),m("pBind",e.ptm("decrementButton")),O("disabled",e.$disabled()?"":void 0)("aria-hidden",!0)("data-p",e.dataP),l(),m("ngIf",e.decrementButtonIcon),l(),m("ngIf",!e.decrementButtonIcon)}}var SF=`
1428
+ ${tv}
1429
+
1430
+ /* For PrimeNG */
1431
+ p-inputNumber.ng-invalid.ng-dirty > .p-inputtext,
1432
+ p-input-number.ng-invalid.ng-dirty > .p-inputtext,
1433
+ p-inputnumber.ng-invalid.ng-dirty > .p-inputtext {
1434
+ border-color: dt('inputtext.invalid.border.color');
1435
+ }
1436
+
1437
+ p-inputNumber.ng-invalid.ng-dirty > .p-inputtext:enabled:focus,
1438
+ p-input-number.ng-invalid.ng-dirty > .p-inputtext:enabled:focus,
1439
+ p-inputnumber.ng-invalid.ng-dirty > .p-inputtext:enabled:focus {
1440
+ border-color: dt('inputtext.focus.border.color');
1441
+ }
1442
+
1443
+ p-inputNumber.ng-invalid.ng-dirty > .p-inputtext::placeholder,
1444
+ p-input-number.ng-invalid.ng-dirty > .p-inputtext::placeholder,
1445
+ p-inputnumber.ng-invalid.ng-dirty > .p-inputtext::placeholder {
1446
+ color: dt('inputtext.invalid.placeholder.color');
1447
+ }
1448
+ `,kF={root:({instance:t})=>["p-inputnumber p-component p-inputwrapper",{"p-inputwrapper-filled":t.$filled()||t.allowEmpty===!1,"p-inputwrapper-focus":t.focused,"p-inputnumber-stacked":t.showButtons&&t.buttonLayout==="stacked","p-inputnumber-horizontal":t.showButtons&&t.buttonLayout==="horizontal","p-inputnumber-vertical":t.showButtons&&t.buttonLayout==="vertical","p-inputnumber-fluid":t.hasFluid,"p-invalid":t.invalid()}],pcInputText:"p-inputnumber-input",buttonGroup:"p-inputnumber-button-group",incrementButton:({instance:t})=>["p-inputnumber-button p-inputnumber-increment-button",{"p-disabled":t.showButtons&&t.max()!=null&&t.maxlength()}],decrementButton:({instance:t})=>["p-inputnumber-button p-inputnumber-decrement-button",{"p-disabled":t.showButtons&&t.min()!=null&&t.minlength()}],clearIcon:"p-inputnumber-clear-icon"},nv=(()=>{class t extends St{name="inputnumber";style=SF;classes=kF;static \u0275fac=(()=>{let e;return function(i){return(e||(e=G(t)))(i||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})();var iv=new ge("INPUTNUMBER_INSTANCE"),IF={provide:Xn,useExisting:wn(()=>_s),multi:!0},_s=(()=>{class t extends ls{injector;componentName="InputNumber";$pcInputNumber=p(iv,{optional:!0,skipSelf:!0})??void 0;_componentStyle=p(nv);bindDirectiveInstance=p(Ie,{self:!0});onAfterViewChecked(){this.bindDirectiveInstance.setAttrs(this.ptms(["host","root"]))}showButtons=!1;format=!0;buttonLayout="stacked";inputId;styleClass;placeholder;tabindex;title;ariaLabelledBy;ariaDescribedBy;ariaLabel;ariaRequired;autocomplete;incrementButtonClass;decrementButtonClass;incrementButtonIcon;decrementButtonIcon;readonly;allowEmpty=!0;locale;localeMatcher;mode="decimal";currency;currencyDisplay;useGrouping=!0;minFractionDigits;maxFractionDigits;prefix;suffix;inputStyle;inputStyleClass;showClear=!1;autofocus;onInput=new ne;onFocus=new ne;onBlur=new ne;onKeyDown=new ne;onClear=new ne;clearIconTemplate;incrementButtonIconTemplate;decrementButtonIconTemplate;templates;input;_clearIconTemplate;_incrementButtonIconTemplate;_decrementButtonIconTemplate;value;focused;initialized;groupChar="";prefixChar="";suffixChar="";isSpecialChar;timer;lastValue;_numeral;numberFormat;_decimal;_decimalChar="";_group;_minusSign;_currency;_prefix;_suffix;_index;ngControl=null;constructor(e){super(),this.injector=e}onChanges(e){["locale","localeMatcher","mode","currency","currencyDisplay","useGrouping","minFractionDigits","maxFractionDigits","prefix","suffix"].some(i=>!!e[i])&&this.updateConstructParser()}onInit(){this.ngControl=this.injector.get(ho,null,{optional:!0}),this.constructParser(),this.initialized=!0}onAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"clearicon":this._clearIconTemplate=e.template;break;case"incrementbuttonicon":this._incrementButtonIconTemplate=e.template;break;case"decrementbuttonicon":this._decrementButtonIconTemplate=e.template;break}})}getOptions(){let e=(a,s,c)=>{if(!(a==null||isNaN(a)||!isFinite(a)))return Math.max(s,Math.min(c,Math.floor(a)))},n=e(this.minFractionDigits,0,20),i=e(this.maxFractionDigits,0,100),r=n!=null&&i!=null&&n>i?i:n;return{localeMatcher:this.localeMatcher,style:this.mode,currency:this.currency,currencyDisplay:this.currencyDisplay,useGrouping:this.useGrouping,minimumFractionDigits:r,maximumFractionDigits:i}}constructParser(){let e=this.getOptions(),n=Object.fromEntries(Object.entries(e).filter(([a,s])=>s!==void 0));this.numberFormat=new Intl.NumberFormat(this.locale,n);let i=[...new Intl.NumberFormat(this.locale,{useGrouping:!1}).format(9876543210)].reverse(),r=new Map(i.map((a,s)=>[a,s]));this._numeral=new RegExp(`[${i.join("")}]`,"g"),this._group=this.getGroupingExpression(),this._minusSign=this.getMinusSignExpression(),this._currency=this.getCurrencyExpression(),this._decimal=this.getDecimalExpression(),this._decimalChar=this.getDecimalChar(),this._suffix=this.getSuffixExpression(),this._prefix=this.getPrefixExpression(),this._index=a=>r.get(a)}updateConstructParser(){this.initialized&&this.constructParser()}escapeRegExp(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}getDecimalExpression(){let e=this.getDecimalChar();return new RegExp(`[${e}]`,"g")}getDecimalChar(){return new Intl.NumberFormat(this.locale,zt(be({},this.getOptions()),{useGrouping:!1})).format(1.1).replace(this._currency,"").trim().replace(this._numeral,"")}getGroupingExpression(){let e=new Intl.NumberFormat(this.locale,{useGrouping:!0});return this.groupChar=e.format(1e6).trim().replace(this._numeral,"").charAt(0),new RegExp(`[${this.groupChar}]`,"g")}getMinusSignExpression(){let e=new Intl.NumberFormat(this.locale,{useGrouping:!1});return new RegExp(`[${e.format(-1).trim().replace(this._numeral,"")}]`,"g")}getCurrencyExpression(){if(this.currency){let e=new Intl.NumberFormat(this.locale,{style:"currency",currency:this.currency,currencyDisplay:this.currencyDisplay,minimumFractionDigits:0,maximumFractionDigits:0});return new RegExp(`[${e.format(1).replace(/\s/g,"").replace(this._numeral,"").replace(this._group,"")}]`,"g")}return new RegExp("[]","g")}getPrefixExpression(){if(this.prefix)this.prefixChar=this.prefix;else{let e=new Intl.NumberFormat(this.locale,{style:this.mode,currency:this.currency,currencyDisplay:this.currencyDisplay});this.prefixChar=e.format(1).split("1")[0]}return new RegExp(`${this.escapeRegExp(this.prefixChar||"")}`,"g")}getSuffixExpression(){if(this.suffix)this.suffixChar=this.suffix;else{let e=new Intl.NumberFormat(this.locale,{style:this.mode,currency:this.currency,currencyDisplay:this.currencyDisplay,minimumFractionDigits:0,maximumFractionDigits:0});this.suffixChar=e.format(1).split("1")[1]}return new RegExp(`${this.escapeRegExp(this.suffixChar||"")}`,"g")}formatValue(e){if(e!=null){if(e==="-")return e;if(this.format){let i=new Intl.NumberFormat(this.locale,this.getOptions()).format(e);return this.prefix&&e!=this.prefix&&(i=this.prefix+i),this.suffix&&e!=this.suffix&&(i=i+this.suffix),i}return e.toString()}return""}parseValue(e){let n=this._suffix?new RegExp(this._suffix,""):/(?:)/,i=this._prefix?new RegExp(this._prefix,""):/(?:)/,r=this._currency?new RegExp(this._currency,""):/(?:)/,a=e.replace(n,"").replace(i,"").trim().replace(/\s/g,"").replace(r,"").replace(this._group,"").replace(this._minusSign,"-").replace(this._decimal,".").replace(this._numeral,this._index);if(a){if(a==="-")return a;let s=+a;return isNaN(s)?null:s}return null}repeat(e,n,i){if(this.readonly)return;let r=n||500;this.clearTimer(),this.timer=setTimeout(()=>{this.repeat(e,40,i)},r),this.spin(e,i)}spin(e,n){let i=(this.step()??1)*n,r=this.parseValue(this.input?.nativeElement.value)||0,a=this.validateValue(r+i),s=this.maxlength();s&&s<this.formatValue(a).length||(this.updateInput(a,null,"spin",null),this.updateModel(e,a),this.handleOnInput(e,r,a))}clear(){this.value=null,this.onModelChange(this.value),this.onClear.emit()}onUpButtonMouseDown(e){if(e.button===2){this.clearTimer();return}this.$disabled()||(this.input?.nativeElement.focus(),this.repeat(e,null,1),e.preventDefault())}onUpButtonMouseUp(){this.$disabled()||this.clearTimer()}onUpButtonMouseLeave(){this.$disabled()||this.clearTimer()}onUpButtonKeyDown(e){(e.keyCode===32||e.keyCode===13)&&this.repeat(e,null,1)}onUpButtonKeyUp(){this.$disabled()||this.clearTimer()}onDownButtonMouseDown(e){if(e.button===2){this.clearTimer();return}this.$disabled()||(this.input?.nativeElement.focus(),this.repeat(e,null,-1),e.preventDefault())}onDownButtonMouseUp(){this.$disabled()||this.clearTimer()}onDownButtonMouseLeave(){this.$disabled()||this.clearTimer()}onDownButtonKeyUp(){this.$disabled()||this.clearTimer()}onDownButtonKeyDown(e){(e.keyCode===32||e.keyCode===13)&&this.repeat(e,null,-1)}onUserInput(e){this.readonly||(this.isSpecialChar&&(e.target.value=this.lastValue),this.isSpecialChar=!1)}onInputKeyDown(e){if(this.readonly)return;if(this.lastValue=e.target.value,e.shiftKey||e.altKey){this.isSpecialChar=!0;return}let n=e.target.selectionStart,i=e.target.selectionEnd,r=e.target.value,a=null;switch(e.altKey&&e.preventDefault(),e.key){case"ArrowUp":this.spin(e,1),e.preventDefault();break;case"ArrowDown":this.spin(e,-1),e.preventDefault();break;case"ArrowLeft":for(let s=n;s<=r.length;s++){let c=s===0?0:s-1;if(this.isNumeralChar(r.charAt(c))){this.input.nativeElement.setSelectionRange(s,s);break}}break;case"ArrowRight":for(let s=i;s>=0;s--)if(this.isNumeralChar(r.charAt(s))){this.input.nativeElement.setSelectionRange(s,s);break}break;case"Tab":case"Enter":a=this.validateValue(this.parseValue(this.input.nativeElement.value)),this.input.nativeElement.value=this.formatValue(a),this.input.nativeElement.setAttribute("aria-valuenow",a),this.updateModel(e,a);break;case"Backspace":{if(e.preventDefault(),n===i){if(n==1&&this.prefix||n==r.length&&this.suffix)break;let s=r.charAt(n-1),{decimalCharIndex:c,decimalCharIndexWithoutPrefix:u}=this.getDecimalCharIndexes(r);if(this.isNumeralChar(s)){let f=this.getDecimalLength(r);if(this._group.test(s))this._group.lastIndex=0,a=r.slice(0,n-2)+r.slice(n-1);else if(this._decimal.test(s))this._decimal.lastIndex=0,f?this.input?.nativeElement.setSelectionRange(n-1,n-1):a=r.slice(0,n-1)+r.slice(n);else if(c>0&&n>c){let g=this.isDecimalMode()&&(this.minFractionDigits||0)<f?"":"0";a=r.slice(0,n-1)+g+r.slice(n)}else u===1?(a=r.slice(0,n-1)+"0"+r.slice(n),a=this.parseValue(a)>0?a:""):a=r.slice(0,n-1)+r.slice(n)}else this.mode==="currency"&&this._currency&&s.search(this._currency)!=-1&&(a=r.slice(1));this.updateValue(e,a,null,"delete-single")}else a=this.deleteRange(r,n,i),this.updateValue(e,a,null,"delete-range");break}case"Delete":if(e.preventDefault(),n===i){if(n==0&&this.prefix||n==r.length-1&&this.suffix)break;let s=r.charAt(n),{decimalCharIndex:c,decimalCharIndexWithoutPrefix:u}=this.getDecimalCharIndexes(r);if(this.isNumeralChar(s)){let f=this.getDecimalLength(r);if(this._group.test(s))this._group.lastIndex=0,a=r.slice(0,n)+r.slice(n+2);else if(this._decimal.test(s))this._decimal.lastIndex=0,f?this.input?.nativeElement.setSelectionRange(n+1,n+1):a=r.slice(0,n)+r.slice(n+1);else if(c>0&&n>c){let g=this.isDecimalMode()&&(this.minFractionDigits||0)<f?"":"0";a=r.slice(0,n)+g+r.slice(n+1)}else u===1?(a=r.slice(0,n)+"0"+r.slice(n+1),a=this.parseValue(a)>0?a:""):a=r.slice(0,n)+r.slice(n+1)}this.updateValue(e,a,null,"delete-back-single")}else a=this.deleteRange(r,n,i),this.updateValue(e,a,null,"delete-range");break;case"Home":this.min()&&(this.updateModel(e,this.min()),e.preventDefault());break;case"End":this.max()&&(this.updateModel(e,this.max()),e.preventDefault());break;default:break}this.onKeyDown.emit(e)}onInputKeyPress(e){if(this.readonly)return;let n=e.which||e.keyCode,i=String.fromCharCode(n),r=this.isDecimalSign(i),a=this.isMinusSign(i);n!=13&&e.preventDefault(),!r&&e.code==="NumpadDecimal"&&(r=!0,i=this._decimalChar,n=i.charCodeAt(0));let{value:s,selectionStart:c,selectionEnd:u}=this.input.nativeElement,f=this.parseValue(s+i),g=f!=null?f.toString():"",C=s.substring(c,u),k=this.parseValue(C),S=k!=null?k.toString():"";if(c!==u&&S.length>0){this.insert(e,i,{isDecimalSign:r,isMinusSign:a});return}let F=this.maxlength();F&&g.length>F||(48<=n&&n<=57||a||r)&&this.insert(e,i,{isDecimalSign:r,isMinusSign:a})}onPaste(e){if(!this.$disabled()&&!this.readonly){e.preventDefault();let n=(e.clipboardData||this.document.defaultView.clipboardData).getData("Text");if(this.inputId==="integeronly"&&/[^\d-]/.test(n))return;if(n){this.maxlength()&&(n=n.toString().substring(0,this.maxlength()));let i=this.parseValue(n);i!=null&&this.insert(e,i.toString())}}}allowMinusSign(){let e=this.min();return e==null||e<0}isMinusSign(e){return this._minusSign.test(e)||e==="-"?(this._minusSign.lastIndex=0,!0):!1}isDecimalSign(e){return this._decimal.test(e)?(this._decimal.lastIndex=0,!0):!1}isDecimalMode(){return this.mode==="decimal"}getDecimalCharIndexes(e){let n=e.search(this._decimal);this._decimal.lastIndex=0;let r=e.replace(this._prefix,"").trim().replace(/\s/g,"").replace(this._currency,"").search(this._decimal);return this._decimal.lastIndex=0,{decimalCharIndex:n,decimalCharIndexWithoutPrefix:r}}getCharIndexes(e){let n=e.search(this._decimal);this._decimal.lastIndex=0;let i=e.search(this._minusSign);this._minusSign.lastIndex=0;let r=e.search(this._suffix);this._suffix.lastIndex=0;let a=e.search(this._currency);return this._currency.lastIndex=0,{decimalCharIndex:n,minusCharIndex:i,suffixCharIndex:r,currencyCharIndex:a}}insert(e,n,i={isDecimalSign:!1,isMinusSign:!1}){let r=n.search(this._minusSign);if(this._minusSign.lastIndex=0,!this.allowMinusSign()&&r!==-1)return;let a=this.input?.nativeElement.selectionStart,s=this.input?.nativeElement.selectionEnd,c=this.input?.nativeElement.value.trim(),{decimalCharIndex:u,minusCharIndex:f,suffixCharIndex:g,currencyCharIndex:C}=this.getCharIndexes(c),k;if(i.isMinusSign)a===0&&(k=c,(f===-1||s!==0)&&(k=this.insertText(c,n,0,s)),this.updateValue(e,k,n,"insert"));else if(i.isDecimalSign)u>0&&a===u?this.updateValue(e,c,n,"insert"):u>a&&u<s?(k=this.insertText(c,n,a,s),this.updateValue(e,k,n,"insert")):u===-1&&this.maxFractionDigits&&(k=this.insertText(c,n,a,s),this.updateValue(e,k,n,"insert"));else{let S=this.numberFormat.resolvedOptions().maximumFractionDigits,F=a!==s?"range-insert":"insert";if(u>0&&a>u){if(a+n.length-(u+1)<=S){let q=C>=a?C-1:g>=a?g:c.length;k=c.slice(0,a)+n+c.slice(a+n.length,q)+c.slice(q),this.updateValue(e,k,n,F)}}else k=this.insertText(c,n,a,s),this.updateValue(e,k,n,F)}}insertText(e,n,i,r){if((n==="."?n:n.split(".")).length===2){let s=e.slice(i,r).search(this._decimal);return this._decimal.lastIndex=0,s>0?e.slice(0,i)+this.formatValue(n)+e.slice(r):e||this.formatValue(n)}else return r-i===e.length?this.formatValue(n):i===0?n+e.slice(r):r===e.length?e.slice(0,i)+n:e.slice(0,i)+n+e.slice(r)}deleteRange(e,n,i){let r;return i-n===e.length?r="":n===0?r=e.slice(i):i===e.length?r=e.slice(0,n):r=e.slice(0,n)+e.slice(i),r}initCursor(){let e=this.input?.nativeElement.selectionStart,n=this.input?.nativeElement.selectionEnd,i=this.input?.nativeElement.value,r=i.length,a=null,s=(this.prefixChar||"").length;i=i.replace(this._prefix,""),(e===n||e!==0||n<s)&&(e-=s);let c=i.charAt(e);if(this.isNumeralChar(c))return e+s;let u=e-1;for(;u>=0;)if(c=i.charAt(u),this.isNumeralChar(c)){a=u+s;break}else u--;if(a!==null)this.input?.nativeElement.setSelectionRange(a+1,a+1);else{for(u=e;u<r;)if(c=i.charAt(u),this.isNumeralChar(c)){a=u+s;break}else u++;a!==null&&this.input?.nativeElement.setSelectionRange(a,a)}return a||0}onInputClick(){let e=this.input?.nativeElement.value;!this.readonly&&e!==O0()&&this.initCursor()}isNumeralChar(e){return e.length===1&&(this._numeral.test(e)||this._decimal.test(e)||this._group.test(e)||this._minusSign.test(e))?(this.resetRegex(),!0):!1}resetRegex(){this._numeral.lastIndex=0,this._decimal.lastIndex=0,this._group.lastIndex=0,this._minusSign.lastIndex=0}updateValue(e,n,i,r){let a=this.input?.nativeElement.value,s=null;n!=null&&(s=this.parseValue(n),s=!s&&!this.allowEmpty?0:s,this.updateInput(s,i,r,n),this.handleOnInput(e,a,s))}handleOnInput(e,n,i){this.isValueChanged(n,i)&&(this.input.nativeElement.value=this.formatValue(i),this.input?.nativeElement.setAttribute("aria-valuenow",i),this.updateModel(e,i),this.onInput.emit({originalEvent:e,value:i,formattedValue:n}))}isValueChanged(e,n){if(n===null&&e!==null)return!0;if(n!=null){let i=typeof e=="string"?this.parseValue(e):e;return n!==i}return!1}validateValue(e){if(e==="-"||e==null)return null;let n=this.min(),i=this.max();return n!=null&&e<n?this.min():i!=null&&e>i?i:e}updateInput(e,n,i,r){n=n||"";let a=this.input?.nativeElement.value,s=this.formatValue(e),c=a.length;if(s!==r&&(s=this.concatValues(s,r)),c===0){this.input.nativeElement.value=s,this.input.nativeElement.setSelectionRange(0,0);let f=this.initCursor()+n.length;this.input.nativeElement.setSelectionRange(f,f)}else{let u=this.input.nativeElement.selectionStart,f=this.input.nativeElement.selectionEnd,g=this.maxlength();if(g&&s.length>g&&(s=s.slice(0,g),u=Math.min(u,g),f=Math.min(f,g)),g&&g<s.length)return;this.input.nativeElement.value=s;let C=s.length;if(i==="range-insert"){let k=this.parseValue((a||"").slice(0,u)),F=(k!==null?k.toString():"").split("").join(`(${this.groupChar})?`),q=new RegExp(F,"g");q.test(s);let Y=n.split("").join(`(${this.groupChar})?`),ee=new RegExp(Y,"g");ee.test(s.slice(q.lastIndex)),f=q.lastIndex+ee.lastIndex,this.input.nativeElement.setSelectionRange(f,f)}else if(C===c)i==="insert"||i==="delete-back-single"?this.input.nativeElement.setSelectionRange(f+1,f+1):i==="delete-single"?this.input.nativeElement.setSelectionRange(f-1,f-1):(i==="delete-range"||i==="spin")&&this.input.nativeElement.setSelectionRange(f,f);else if(i==="delete-back-single"){let k=a.charAt(f-1),S=a.charAt(f),F=c-C,q=this._group.test(S);q&&F===1?f+=1:!q&&this.isNumeralChar(k)&&(f+=-1*F+1),this._group.lastIndex=0,this.input.nativeElement.setSelectionRange(f,f)}else if(a==="-"&&i==="insert"){this.input.nativeElement.setSelectionRange(0,0);let S=this.initCursor()+n.length+1;this.input.nativeElement.setSelectionRange(S,S)}else f=f+(C-c),this.input.nativeElement.setSelectionRange(f,f)}this.input.nativeElement.setAttribute("aria-valuenow",e)}concatValues(e,n){if(e&&n){let i=n.search(this._decimal);return this._decimal.lastIndex=0,this.suffixChar?i!==-1?e.replace(this.suffixChar,"").split(this._decimal)[0]+n.replace(this.suffixChar,"").slice(i)+this.suffixChar:e:i!==-1?e.split(this._decimal)[0]+n.slice(i):e}return e}getDecimalLength(e){if(e){let n=e.split(this._decimal);if(n.length===2)return n[1].replace(this._suffix,"").trim().replace(/\s/g,"").replace(this._currency,"").length}return 0}onInputFocus(e){this.focused=!0,this.onFocus.emit(e)}onInputBlur(e){this.focused=!1;let n=this.validateValue(this.parseValue(this.input.nativeElement.value)),i=n?.toString();this.input.nativeElement.value=this.formatValue(i),this.input.nativeElement.setAttribute("aria-valuenow",i),this.updateModel(e,n),this.onModelTouched(),this.onBlur.emit(e)}formattedValue(){let e=!this.value&&!this.allowEmpty?0:this.value;return this.formatValue(e)}updateModel(e,n){let i=this.ngControl?.control?.updateOn==="blur";this.value!==n?(this.value=n,i&&this.focused||this.onModelChange(n)):i&&this.onModelChange(n)}writeControlValue(e,n){this.value=e&&Number(e),n(e),this.cd.markForCheck()}clearTimer(){this.timer&&clearInterval(this.timer)}get dataP(){return this.cn({invalid:this.invalid(),disabled:this.$disabled(),focus:this.focused,fluid:this.hasFluid,filled:this.$variant()==="filled",empty:!this.$filled(),[this.size()]:this.size(),[this.buttonLayout]:this.showButtons&&this.buttonLayout})}static \u0275fac=function(n){return new(n||t)(fn(dt))};static \u0275cmp=z({type:t,selectors:[["p-inputNumber"],["p-inputnumber"],["p-input-number"]],contentQueries:function(n,i,r){if(n&1&&Qt(r,WO,4)(r,KO,4)(r,YO,4)(r,bt,4),n&2){let a;Q(a=J())&&(i.clearIconTemplate=a.first),Q(a=J())&&(i.incrementButtonIconTemplate=a.first),Q(a=J())&&(i.decrementButtonIconTemplate=a.first),Q(a=J())&&(i.templates=a)}},viewQuery:function(n,i){if(n&1&&Tn(XO,5),n&2){let r;Q(r=J())&&(i.input=r.first)}},hostVars:3,hostBindings:function(n,i){n&2&&(O("data-p",i.dataP),H(i.cn(i.cx("root"),i.styleClass)))},inputs:{showButtons:[2,"showButtons","showButtons",j],format:[2,"format","format",j],buttonLayout:"buttonLayout",inputId:"inputId",styleClass:"styleClass",placeholder:"placeholder",tabindex:[2,"tabindex","tabindex",xe],title:"title",ariaLabelledBy:"ariaLabelledBy",ariaDescribedBy:"ariaDescribedBy",ariaLabel:"ariaLabel",ariaRequired:[2,"ariaRequired","ariaRequired",j],autocomplete:"autocomplete",incrementButtonClass:"incrementButtonClass",decrementButtonClass:"decrementButtonClass",incrementButtonIcon:"incrementButtonIcon",decrementButtonIcon:"decrementButtonIcon",readonly:[2,"readonly","readonly",j],allowEmpty:[2,"allowEmpty","allowEmpty",j],locale:"locale",localeMatcher:"localeMatcher",mode:"mode",currency:"currency",currencyDisplay:"currencyDisplay",useGrouping:[2,"useGrouping","useGrouping",j],minFractionDigits:[2,"minFractionDigits","minFractionDigits",e=>xe(e,void 0)],maxFractionDigits:[2,"maxFractionDigits","maxFractionDigits",e=>xe(e,void 0)],prefix:"prefix",suffix:"suffix",inputStyle:"inputStyle",inputStyleClass:"inputStyleClass",showClear:[2,"showClear","showClear",j],autofocus:[2,"autofocus","autofocus",j]},outputs:{onInput:"onInput",onFocus:"onFocus",onBlur:"onBlur",onKeyDown:"onKeyDown",onClear:"onClear"},features:[we([IF,nv,{provide:iv,useExisting:t},{provide:kt,useExisting:t}]),wt([Ie]),Z],decls:6,vars:38,consts:[["input",""],["pInputText","","role","spinbutton","inputmode","decimal",3,"input","keydown","keypress","paste","click","focus","blur","value","ngStyle","variant","invalid","pSize","pt","unstyled","pAutoFocus","fluid"],[4,"ngIf"],[3,"pBind","class",4,"ngIf"],["type","button","tabindex","-1",3,"pBind","class","mousedown","mouseup","mouseleave","keydown","keyup",4,"ngIf"],["data-p-icon","times",3,"pBind","class","click",4,"ngIf"],[3,"pBind","class","click",4,"ngIf"],["data-p-icon","times",3,"click","pBind"],[3,"click","pBind"],[4,"ngTemplateOutlet"],[3,"pBind"],["type","button","tabindex","-1",3,"mousedown","mouseup","mouseleave","keydown","keyup","pBind"],[3,"pBind","ngClass",4,"ngIf"],[3,"pBind","ngClass"],["data-p-icon","angle-up",3,"pBind",4,"ngIf"],["data-p-icon","angle-up",3,"pBind"],["data-p-icon","angle-down",3,"pBind",4,"ngIf"],["data-p-icon","angle-down",3,"pBind"]],template:function(n,i){n&1&&(h(0,"input",1,0),A("input",function(a){return i.onUserInput(a)})("keydown",function(a){return i.onInputKeyDown(a)})("keypress",function(a){return i.onInputKeyPress(a)})("paste",function(a){return i.onPaste(a)})("click",function(){return i.onInputClick()})("focus",function(a){return i.onInputFocus(a)})("blur",function(a){return i.onInputBlur(a)}),_(),I(2,tF,3,2,"ng-container",2)(3,pF,7,20,"span",3)(4,bF,3,8,"button",4)(5,TF,3,8,"button",4)),n&2&&(H(i.cn(i.cx("pcInputText"),i.inputStyleClass)),m("value",i.formattedValue())("ngStyle",i.inputStyle)("variant",i.$variant())("invalid",i.invalid())("pSize",i.size())("pt",i.ptm("pcInputText"))("unstyled",i.unstyled())("pAutoFocus",i.autofocus)("fluid",i.hasFluid),O("id",i.inputId)("aria-valuemin",i.min())("aria-valuemax",i.max())("aria-valuenow",i.value)("placeholder",i.placeholder)("aria-label",i.ariaLabel)("aria-labelledby",i.ariaLabelledBy)("aria-describedby",i.ariaDescribedBy)("title",i.title)("size",i.inputSize())("name",i.name())("autocomplete",i.autocomplete)("maxlength",i.maxlength())("minlength",i.minlength())("tabindex",i.tabindex)("aria-required",i.ariaRequired)("min",i.min())("max",i.max())("step",i.step()??1)("required",i.required()?"":void 0)("readonly",i.readonly?"":void 0)("disabled",i.$disabled()?"":void 0)("data-p",i.dataP),l(2),m("ngIf",i.buttonLayout!="vertical"&&i.showClear&&i.value),l(),m("ngIf",i.showButtons&&i.buttonLayout==="stacked"),l(),m("ngIf",i.showButtons&&i.buttonLayout!=="stacked"),l(),m("ngIf",i.showButtons&&i.buttonLayout!=="stacked"))},dependencies:[gt,Kn,gn,Mt,Yn,fo,bo,rs,Db,Ib,Le,kn,Ie],encapsulation:2,changeDetection:0})}return t})(),ov=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=_t({type:t});static \u0275inj=mt({imports:[_s,Le,Le]})}return t})();var rv=`
1449
+ .p-paginator {
1450
+ display: flex;
1451
+ align-items: center;
1452
+ justify-content: center;
1453
+ flex-wrap: wrap;
1454
+ background: dt('paginator.background');
1455
+ color: dt('paginator.color');
1456
+ padding: dt('paginator.padding');
1457
+ border-radius: dt('paginator.border.radius');
1458
+ gap: dt('paginator.gap');
1459
+ }
1460
+
1461
+ .p-paginator-content {
1462
+ display: flex;
1463
+ align-items: center;
1464
+ justify-content: center;
1465
+ flex-wrap: wrap;
1466
+ gap: dt('paginator.gap');
1467
+ }
1468
+
1469
+ .p-paginator-content-start {
1470
+ margin-inline-end: auto;
1471
+ }
1472
+
1473
+ .p-paginator-content-end {
1474
+ margin-inline-start: auto;
1475
+ }
1476
+
1477
+ .p-paginator-page,
1478
+ .p-paginator-next,
1479
+ .p-paginator-last,
1480
+ .p-paginator-first,
1481
+ .p-paginator-prev {
1482
+ cursor: pointer;
1483
+ display: inline-flex;
1484
+ align-items: center;
1485
+ justify-content: center;
1486
+ line-height: 1;
1487
+ user-select: none;
1488
+ overflow: hidden;
1489
+ position: relative;
1490
+ background: dt('paginator.nav.button.background');
1491
+ border: 0 none;
1492
+ color: dt('paginator.nav.button.color');
1493
+ min-width: dt('paginator.nav.button.width');
1494
+ height: dt('paginator.nav.button.height');
1495
+ transition:
1496
+ background dt('paginator.transition.duration'),
1497
+ color dt('paginator.transition.duration'),
1498
+ outline-color dt('paginator.transition.duration'),
1499
+ box-shadow dt('paginator.transition.duration');
1500
+ border-radius: dt('paginator.nav.button.border.radius');
1501
+ padding: 0;
1502
+ margin: 0;
1503
+ }
1504
+
1505
+ .p-paginator-page:focus-visible,
1506
+ .p-paginator-next:focus-visible,
1507
+ .p-paginator-last:focus-visible,
1508
+ .p-paginator-first:focus-visible,
1509
+ .p-paginator-prev:focus-visible {
1510
+ box-shadow: dt('paginator.nav.button.focus.ring.shadow');
1511
+ outline: dt('paginator.nav.button.focus.ring.width') dt('paginator.nav.button.focus.ring.style') dt('paginator.nav.button.focus.ring.color');
1512
+ outline-offset: dt('paginator.nav.button.focus.ring.offset');
1513
+ }
1514
+
1515
+ .p-paginator-page:not(.p-disabled):not(.p-paginator-page-selected):hover,
1516
+ .p-paginator-first:not(.p-disabled):hover,
1517
+ .p-paginator-prev:not(.p-disabled):hover,
1518
+ .p-paginator-next:not(.p-disabled):hover,
1519
+ .p-paginator-last:not(.p-disabled):hover {
1520
+ background: dt('paginator.nav.button.hover.background');
1521
+ color: dt('paginator.nav.button.hover.color');
1522
+ }
1523
+
1524
+ .p-paginator-page.p-paginator-page-selected {
1525
+ background: dt('paginator.nav.button.selected.background');
1526
+ color: dt('paginator.nav.button.selected.color');
1527
+ }
1528
+
1529
+ .p-paginator-current {
1530
+ color: dt('paginator.current.page.report.color');
1531
+ }
1532
+
1533
+ .p-paginator-pages {
1534
+ display: flex;
1535
+ align-items: center;
1536
+ gap: dt('paginator.gap');
1537
+ }
1538
+
1539
+ .p-paginator-jtp-input .p-inputtext {
1540
+ max-width: dt('paginator.jump.to.page.input.max.width');
1541
+ }
1542
+
1543
+ .p-paginator-first:dir(rtl),
1544
+ .p-paginator-prev:dir(rtl),
1545
+ .p-paginator-next:dir(rtl),
1546
+ .p-paginator-last:dir(rtl) {
1547
+ transform: rotate(180deg);
1548
+ }
1549
+ `;var EF=["dropdownicon"],MF=["firstpagelinkicon"],DF=["previouspagelinkicon"],PF=["lastpagelinkicon"],RF=["nextpagelinkicon"],gs=t=>({$implicit:t}),OF=t=>({pageLink:t});function FF(t,o){t&1&&le(0)}function NF(t,o){if(t&1&&(h(0,"div",10),I(1,FF,1,0,"ng-container",11),_()),t&2){let e=d();H(e.cx("contentStart")),m("pBind",e.ptm("contentStart")),l(),m("ngTemplateOutlet",e.templateLeft)("ngTemplateOutletContext",Oe(5,gs,e.paginatorState))}}function AF(t,o){if(t&1&&(h(0,"span",10),b(1),_()),t&2){let e=d();H(e.cx("current")),m("pBind",e.ptm("current")),l(),x(e.currentPageReport)}}function LF(t,o){if(t&1&&($(),N(0,"svg",14)),t&2){let e=d(2);H(e.cx("firstIcon")),m("pBind",e.ptm("firstIcon"))}}function BF(t,o){}function VF(t,o){t&1&&I(0,BF,0,0,"ng-template")}function zF(t,o){if(t&1&&(h(0,"span"),I(1,VF,1,0,null,15),_()),t&2){let e=d(2);H(e.cx("firstIcon")),l(),m("ngTemplateOutlet",e.firstPageLinkIconTemplate||e._firstPageLinkIconTemplate)}}function HF(t,o){if(t&1){let e=W();h(0,"button",12),A("click",function(i){w(e);let r=d();return T(r.changePageToFirst(i))}),I(1,LF,1,3,"svg",13)(2,zF,2,3,"span",4),_()}if(t&2){let e=d();H(e.cx("first")),m("pBind",e.ptm("first")),O("aria-label",e.getAriaLabel("firstPageLabel")),l(),m("ngIf",!e.firstPageLinkIconTemplate&&!e._firstPageLinkIconTemplate),l(),m("ngIf",e.firstPageLinkIconTemplate||e._firstPageLinkIconTemplate)}}function qF(t,o){if(t&1&&($(),N(0,"svg",16)),t&2){let e=d();H(e.cx("prevIcon")),m("pBind",e.ptm("prevIcon"))}}function GF(t,o){}function jF(t,o){t&1&&I(0,GF,0,0,"ng-template")}function UF(t,o){if(t&1&&(h(0,"span"),I(1,jF,1,0,null,15),_()),t&2){let e=d();H(e.cx("prevIcon")),l(),m("ngTemplateOutlet",e.previousPageLinkIconTemplate||e._previousPageLinkIconTemplate)}}function $F(t,o){if(t&1){let e=W();h(0,"button",12),A("click",function(i){let r=w(e).$implicit,a=d(2);return T(a.onPageLinkClick(i,r-1))}),b(1),_()}if(t&2){let e=o.$implicit,n=d(2);H(n.cx("page",Oe(6,OF,e))),m("pBind",n.ptm("page")),O("aria-label",n.getPageAriaLabel(e))("aria-current",e-1==n.getPage()?"page":void 0),l(),ke(" ",n.getLocalization(e)," ")}}function WF(t,o){if(t&1&&(h(0,"span",10),I(1,$F,2,8,"button",17),_()),t&2){let e=d();H(e.cx("pages")),m("pBind",e.ptm("pages")),l(),m("ngForOf",e.pageLinks)}}function KF(t,o){if(t&1&&b(0),t&2){let e=d(2);x(e.currentPageReport)}}function YF(t,o){t&1&&le(0)}function XF(t,o){if(t&1&&I(0,YF,1,0,"ng-container",11),t&2){let e=o.$implicit,n=d(3);m("ngTemplateOutlet",n.jumpToPageItemTemplate)("ngTemplateOutletContext",Oe(2,gs,e))}}function ZF(t,o){t&1&&(me(0),I(1,XF,1,4,"ng-template",21),_e())}function QF(t,o){t&1&&le(0)}function JF(t,o){if(t&1&&I(0,QF,1,0,"ng-container",15),t&2){let e=d(3);m("ngTemplateOutlet",e.dropdownIconTemplate||e._dropdownIconTemplate)}}function e4(t,o){t&1&&I(0,JF,1,1,"ng-template",22)}function t4(t,o){if(t&1){let e=W();h(0,"p-select",18),A("onChange",function(i){w(e);let r=d();return T(r.onPageDropdownChange(i))}),I(1,KF,1,1,"ng-template",19)(2,ZF,2,0,"ng-container",20)(3,e4,1,0,null,20),_()}if(t&2){let e=d();m("options",e.pageItems)("ngModel",e.getPage())("disabled",e.empty())("styleClass",e.cx("pcJumpToPageDropdown"))("appendTo",e.dropdownAppendTo||e.$appendTo())("scrollHeight",e.dropdownScrollHeight)("pt",e.ptm("pcJumpToPageDropdown"))("unstyled",e.unstyled()),O("aria-label",e.getAriaLabel("jumpToPageDropdownLabel")),l(2),m("ngIf",e.jumpToPageItemTemplate),l(),m("ngIf",e.dropdownIconTemplate||e._dropdownIconTemplate)}}function n4(t,o){if(t&1&&($(),N(0,"svg",23)),t&2){let e=d();H(e.cx("nextIcon")),m("pBind",e.ptm("nextIcon"))}}function i4(t,o){}function o4(t,o){t&1&&I(0,i4,0,0,"ng-template")}function r4(t,o){if(t&1&&(h(0,"span"),I(1,o4,1,0,null,15),_()),t&2){let e=d();H(e.cx("nextIcon")),l(),m("ngTemplateOutlet",e.nextPageLinkIconTemplate||e._nextPageLinkIconTemplate)}}function a4(t,o){if(t&1&&($(),N(0,"svg",25)),t&2){let e=d(2);H(e.cx("lastIcon")),m("pBind",e.ptm("lastIcon"))}}function s4(t,o){}function l4(t,o){t&1&&I(0,s4,0,0,"ng-template")}function c4(t,o){if(t&1&&(h(0,"span"),I(1,l4,1,0,null,15),_()),t&2){let e=d(2);H(e.cx("lastIcon")),l(),m("ngTemplateOutlet",e.lastPageLinkIconTemplate||e._lastPageLinkIconTemplate)}}function d4(t,o){if(t&1){let e=W();h(0,"button",2),A("click",function(i){w(e);let r=d();return T(r.changePageToLast(i))}),I(1,a4,1,3,"svg",24)(2,c4,2,3,"span",4),_()}if(t&2){let e=d();H(e.cx("last")),m("pBind",e.ptm("last"))("disabled",e.isLastPage()||e.empty()),O("aria-label",e.getAriaLabel("lastPageLabel")),l(),m("ngIf",!e.lastPageLinkIconTemplate&&!e._lastPageLinkIconTemplate),l(),m("ngIf",e.lastPageLinkIconTemplate||e._lastPageLinkIconTemplate)}}function u4(t,o){if(t&1){let e=W();h(0,"p-inputnumber",26),A("ngModelChange",function(i){w(e);let r=d();return T(r.changePage(i-1))}),_()}if(t&2){let e=d();H(e.cx("pcJumpToPageInput")),m("pt",e.ptm("pcJumpToPageInput"))("ngModel",e.currentPage())("disabled",e.empty())("unstyled",e.unstyled())}}function p4(t,o){t&1&&le(0)}function h4(t,o){if(t&1&&I(0,p4,1,0,"ng-container",11),t&2){let e=o.$implicit,n=d(3);m("ngTemplateOutlet",n.dropdownItemTemplate)("ngTemplateOutletContext",Oe(2,gs,e))}}function f4(t,o){t&1&&(me(0),I(1,h4,1,4,"ng-template",21),_e())}function m4(t,o){t&1&&le(0)}function _4(t,o){if(t&1&&I(0,m4,1,0,"ng-container",15),t&2){let e=d(3);m("ngTemplateOutlet",e.dropdownIconTemplate||e._dropdownIconTemplate)}}function g4(t,o){t&1&&I(0,_4,1,1,"ng-template",22)}function b4(t,o){if(t&1){let e=W();h(0,"p-select",27),If("ngModelChange",function(i){w(e);let r=d();return kf(r.rows,i)||(r.rows=i),T(i)}),A("onChange",function(i){w(e);let r=d();return T(r.onRppChange(i))}),I(1,f4,2,0,"ng-container",20)(2,g4,1,0,null,20),_()}if(t&2){let e=d();m("options",e.rowsPerPageItems),Sf("ngModel",e.rows),m("styleClass",e.cx("pcRowPerPageDropdown"))("disabled",e.empty())("appendTo",e.dropdownAppendTo||e.$appendTo())("scrollHeight",e.dropdownScrollHeight)("ariaLabel",e.getAriaLabel("rowsPerPageLabel"))("pt",e.ptm("pcRowPerPageDropdown"))("unstyled",e.unstyled()),l(),m("ngIf",e.dropdownItemTemplate),l(),m("ngIf",e.dropdownIconTemplate||e._dropdownIconTemplate)}}function v4(t,o){t&1&&le(0)}function y4(t,o){if(t&1&&(h(0,"div",10),I(1,v4,1,0,"ng-container",11),_()),t&2){let e=d();H(e.cx("contentEnd")),m("pBind",e.ptm("contentEnd")),l(),m("ngTemplateOutlet",e.templateRight)("ngTemplateOutletContext",Oe(5,gs,e.paginatorState))}}var C4={paginator:({instance:t})=>["p-paginator p-component"],content:"p-paginator-content",contentStart:"p-paginator-content-start",contentEnd:"p-paginator-content-end",first:({instance:t})=>["p-paginator-first",{"p-disabled":t.isFirstPage()||t.empty()}],firstIcon:"p-paginator-first-icon",prev:({instance:t})=>["p-paginator-prev",{"p-disabled":t.isFirstPage()||t.empty()}],prevIcon:"p-paginator-prev-icon",next:({instance:t})=>["p-paginator-next",{"p-disabled":t.isLastPage()||t.empty()}],nextIcon:"p-paginator-next-icon",last:({instance:t})=>["p-paginator-last",{"p-disabled":t.isLastPage()||t.empty()}],lastIcon:"p-paginator-last-icon",pages:"p-paginator-pages",page:({instance:t,pageLink:o})=>["p-paginator-page",{"p-paginator-page-selected":o-1==t.getPage()}],current:"p-paginator-current",pcRowPerPageDropdown:"p-paginator-rpp-dropdown",pcJumpToPageDropdown:"p-paginator-jtp-dropdown",pcJumpToPageInput:"p-paginator-jtp-input"},av=(()=>{class t extends St{name="paginator";style=rv;classes=C4;static \u0275fac=(()=>{let e;return function(i){return(e||(e=G(t)))(i||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})();var sv=new ge("PAGINATOR_INSTANCE"),jf=(()=>{class t extends Bn{componentName="Paginator";bindDirectiveInstance=p(Ie,{self:!0});$pcPaginator=p(sv,{optional:!0,skipSelf:!0})??void 0;onAfterViewChecked(){this.bindDirectiveInstance.setAttrs(this.ptms(["host","root"]))}pageLinkSize=5;styleClass;alwaysShow=!0;dropdownAppendTo;templateLeft;templateRight;dropdownScrollHeight="200px";currentPageReportTemplate="{currentPage} of {totalPages}";showCurrentPageReport;showFirstLastIcon=!0;totalRecords=0;rows=0;rowsPerPageOptions;showJumpToPageDropdown;showJumpToPageInput;jumpToPageItemTemplate;showPageLinks=!0;locale;dropdownItemTemplate;get first(){return this._first}set first(e){this._first=e}appendTo=B(void 0);onPageChange=new ne;dropdownIconTemplate;firstPageLinkIconTemplate;previousPageLinkIconTemplate;lastPageLinkIconTemplate;nextPageLinkIconTemplate;templates;_dropdownIconTemplate;_firstPageLinkIconTemplate;_previousPageLinkIconTemplate;_lastPageLinkIconTemplate;_nextPageLinkIconTemplate;pageLinks;pageItems;rowsPerPageItems;paginatorState;_first=0;_page=0;_componentStyle=p(av);$appendTo=E(()=>this.appendTo()||this.config.overlayAppendTo());get display(){return this.alwaysShow||this.pageLinks&&this.pageLinks.length>1?null:"none"}constructor(){super()}onInit(){this.updatePaginatorState()}onAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"dropdownicon":this._dropdownIconTemplate=e.template;break;case"firstpagelinkicon":this._firstPageLinkIconTemplate=e.template;break;case"previouspagelinkicon":this._previousPageLinkIconTemplate=e.template;break;case"lastpagelinkicon":this._lastPageLinkIconTemplate=e.template;break;case"nextpagelinkicon":this._nextPageLinkIconTemplate=e.template;break}})}getAriaLabel(e){return this.config.translation.aria?this.config.translation.aria[e]:void 0}getPageAriaLabel(e){return this.config.translation.aria?this.config.translation.aria.pageLabel?.replace(/{page}/g,`${e}`):void 0}getLocalization(e){let n=[...new Intl.NumberFormat(this.locale,{useGrouping:!1}).format(9876543210)].reverse(),i=new Map(n.map((r,a)=>[a,r]));return e>9?String(e).split("").map(a=>i.get(Number(a))).join(""):i.get(e)}onChanges(e){e.totalRecords&&(this.updatePageLinks(),this.updatePaginatorState(),this.updateFirst(),this.updateRowsPerPageOptions()),e.first&&(this._first=e.first.currentValue,this.updatePageLinks(),this.updatePaginatorState()),e.rows&&(this.updatePageLinks(),this.updatePaginatorState()),e.rowsPerPageOptions&&this.updateRowsPerPageOptions(),e.pageLinkSize&&this.updatePageLinks()}updateRowsPerPageOptions(){if(this.rowsPerPageOptions){this.rowsPerPageItems=[];let e=null;for(let n of this.rowsPerPageOptions)typeof n=="object"&&n.showAll?e={label:n.showAll,value:this.totalRecords}:this.rowsPerPageItems.push({label:String(this.getLocalization(n)),value:n});e&&this.rowsPerPageItems.push(e)}}isFirstPage(){return this.getPage()===0}isLastPage(){return this.getPage()===this.getPageCount()-1}getPageCount(){return Math.ceil(this.totalRecords/this.rows)}calculatePageLinkBoundaries(){let e=this.getPageCount(),n=Math.min(this.pageLinkSize,e),i=Math.max(0,Math.ceil(this.getPage()-n/2)),r=Math.min(e-1,i+n-1);var a=this.pageLinkSize-(r-i+1);return i=Math.max(0,i-a),[i,r]}updatePageLinks(){this.pageLinks=[];let e=this.calculatePageLinkBoundaries(),n=e[0],i=e[1];for(let r=n;r<=i;r++)this.pageLinks.push(r+1);if(this.showJumpToPageDropdown){this.pageItems=[];for(let r=0;r<this.getPageCount();r++)this.pageItems.push({label:String(r+1),value:r})}}changePage(e){var n=this.getPageCount();if(e>=0&&e<n){this._first=this.rows*e;var i={page:e,first:this.first,rows:this.rows,pageCount:n};this.updatePageLinks(),this.onPageChange.emit(i),this.updatePaginatorState()}}updateFirst(){let e=this.getPage();e>0&&this.totalRecords&&this.first>=this.totalRecords&&Promise.resolve(null).then(()=>this.changePage(e-1))}getPage(){return Math.floor(this.first/this.rows)}changePageToFirst(e){this.isFirstPage()||this.changePage(0),e.preventDefault()}changePageToPrev(e){this.changePage(this.getPage()-1),e.preventDefault()}changePageToNext(e){this.changePage(this.getPage()+1),e.preventDefault()}changePageToLast(e){this.isLastPage()||this.changePage(this.getPageCount()-1),e.preventDefault()}onPageLinkClick(e,n){this.changePage(n),e.preventDefault()}onRppChange(e){this.changePage(this.getPage())}onPageDropdownChange(e){this.changePage(e.value)}updatePaginatorState(){this.paginatorState={page:this.getPage(),pageCount:this.getPageCount(),rows:this.rows,first:this.first,totalRecords:this.totalRecords}}empty(){return this.getPageCount()===0}currentPage(){return this.getPageCount()>0?this.getPage()+1:0}get currentPageReport(){return this.currentPageReportTemplate.replace("{currentPage}",String(this.currentPage())).replace("{totalPages}",String(this.getPageCount())).replace("{first}",String(this.totalRecords>0?this._first+1:0)).replace("{last}",String(Math.min(this._first+this.rows,this.totalRecords))).replace("{rows}",String(this.rows)).replace("{totalRecords}",String(this.totalRecords))}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=z({type:t,selectors:[["p-paginator"]],contentQueries:function(n,i,r){if(n&1&&Qt(r,EF,4)(r,MF,4)(r,DF,4)(r,PF,4)(r,RF,4)(r,bt,4),n&2){let a;Q(a=J())&&(i.dropdownIconTemplate=a.first),Q(a=J())&&(i.firstPageLinkIconTemplate=a.first),Q(a=J())&&(i.previousPageLinkIconTemplate=a.first),Q(a=J())&&(i.lastPageLinkIconTemplate=a.first),Q(a=J())&&(i.nextPageLinkIconTemplate=a.first),Q(a=J())&&(i.templates=a)}},hostVars:4,hostBindings:function(n,i){n&2&&(H(i.cn(i.cx("paginator"),i.styleClass)),Ne("display",i.display))},inputs:{pageLinkSize:[2,"pageLinkSize","pageLinkSize",xe],styleClass:"styleClass",alwaysShow:[2,"alwaysShow","alwaysShow",j],dropdownAppendTo:"dropdownAppendTo",templateLeft:"templateLeft",templateRight:"templateRight",dropdownScrollHeight:"dropdownScrollHeight",currentPageReportTemplate:"currentPageReportTemplate",showCurrentPageReport:[2,"showCurrentPageReport","showCurrentPageReport",j],showFirstLastIcon:[2,"showFirstLastIcon","showFirstLastIcon",j],totalRecords:[2,"totalRecords","totalRecords",xe],rows:[2,"rows","rows",xe],rowsPerPageOptions:"rowsPerPageOptions",showJumpToPageDropdown:[2,"showJumpToPageDropdown","showJumpToPageDropdown",j],showJumpToPageInput:[2,"showJumpToPageInput","showJumpToPageInput",j],jumpToPageItemTemplate:"jumpToPageItemTemplate",showPageLinks:[2,"showPageLinks","showPageLinks",j],locale:"locale",dropdownItemTemplate:"dropdownItemTemplate",first:"first",appendTo:[1,"appendTo"]},outputs:{onPageChange:"onPageChange"},features:[we([av,{provide:sv,useExisting:t},{provide:kt,useExisting:t}]),wt([Ie]),Z],decls:15,vars:23,consts:[[3,"pBind","class",4,"ngIf"],["type","button","pRipple","",3,"pBind","class","click",4,"ngIf"],["type","button","pRipple","",3,"click","pBind","disabled"],["data-p-icon","angle-left",3,"pBind","class",4,"ngIf"],[3,"class",4,"ngIf"],[3,"options","ngModel","disabled","styleClass","appendTo","scrollHeight","pt","unstyled","onChange",4,"ngIf"],["data-p-icon","angle-right",3,"pBind","class",4,"ngIf"],["type","button","pRipple","",3,"pBind","disabled","class","click",4,"ngIf"],[3,"pt","ngModel","class","disabled","unstyled","ngModelChange",4,"ngIf"],[3,"options","ngModel","styleClass","disabled","appendTo","scrollHeight","ariaLabel","pt","unstyled","ngModelChange","onChange",4,"ngIf"],[3,"pBind"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["type","button","pRipple","",3,"click","pBind"],["data-p-icon","angle-double-left",3,"pBind","class",4,"ngIf"],["data-p-icon","angle-double-left",3,"pBind"],[4,"ngTemplateOutlet"],["data-p-icon","angle-left",3,"pBind"],["type","button","pRipple","",3,"pBind","class","click",4,"ngFor","ngForOf"],[3,"onChange","options","ngModel","disabled","styleClass","appendTo","scrollHeight","pt","unstyled"],["pTemplate","selectedItem"],[4,"ngIf"],["pTemplate","item"],["pTemplate","dropdownicon"],["data-p-icon","angle-right",3,"pBind"],["data-p-icon","angle-double-right",3,"pBind","class",4,"ngIf"],["data-p-icon","angle-double-right",3,"pBind"],[3,"ngModelChange","pt","ngModel","disabled","unstyled"],[3,"ngModelChange","onChange","options","ngModel","styleClass","disabled","appendTo","scrollHeight","ariaLabel","pt","unstyled"]],template:function(n,i){n&1&&(I(0,NF,2,7,"div",0)(1,AF,2,4,"span",0)(2,HF,3,6,"button",1),h(3,"button",2),A("click",function(a){return i.changePageToPrev(a)}),I(4,qF,1,3,"svg",3)(5,UF,2,3,"span",4),_(),I(6,WF,2,4,"span",0)(7,t4,4,11,"p-select",5),h(8,"button",2),A("click",function(a){return i.changePageToNext(a)}),I(9,n4,1,3,"svg",6)(10,r4,2,3,"span",4),_(),I(11,d4,3,7,"button",7)(12,u4,1,6,"p-inputnumber",8)(13,b4,3,11,"p-select",9)(14,y4,2,7,"div",0)),n&2&&(m("ngIf",i.templateLeft),l(),m("ngIf",i.showCurrentPageReport),l(),m("ngIf",i.showFirstLastIcon),l(),H(i.cx("prev")),m("pBind",i.ptm("prev"))("disabled",i.isFirstPage()||i.empty()),O("aria-label",i.getAriaLabel("prevPageLabel")),l(),m("ngIf",!i.previousPageLinkIconTemplate&&!i._previousPageLinkIconTemplate),l(),m("ngIf",i.previousPageLinkIconTemplate||i._previousPageLinkIconTemplate),l(),m("ngIf",i.showPageLinks),l(),m("ngIf",i.showJumpToPageDropdown),l(),H(i.cx("next")),m("pBind",i.ptm("next"))("disabled",i.isLastPage()||i.empty()),O("aria-label",i.getAriaLabel("nextPageLabel")),l(),m("ngIf",!i.nextPageLinkIconTemplate&&!i._nextPageLinkIconTemplate),l(),m("ngIf",i.nextPageLinkIconTemplate||i._nextPageLinkIconTemplate),l(),m("ngIf",i.showFirstLastIcon),l(),m("ngIf",i.showJumpToPageInput),l(),m("ngIf",i.rowsPerPageOptions),l(),m("ngIf",i.templateRight))},dependencies:[gt,co,gn,Mt,rb,_s,Ot,nn,on,as,Sb,kb,Eb,Mb,Le,bt,Ie],encapsulation:2,changeDetection:0})}return t})(),lv=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=_t({type:t});static \u0275inj=mt({imports:[jf,Le,Le]})}return t})();var cv=`
1550
+ .p-radiobutton {
1551
+ position: relative;
1552
+ display: inline-flex;
1553
+ user-select: none;
1554
+ vertical-align: bottom;
1555
+ width: dt('radiobutton.width');
1556
+ height: dt('radiobutton.height');
1557
+ }
1558
+
1559
+ .p-radiobutton-input {
1560
+ cursor: pointer;
1561
+ appearance: none;
1562
+ position: absolute;
1563
+ top: 0;
1564
+ inset-inline-start: 0;
1565
+ width: 100%;
1566
+ height: 100%;
1567
+ padding: 0;
1568
+ margin: 0;
1569
+ opacity: 0;
1570
+ z-index: 1;
1571
+ outline: 0 none;
1572
+ border: 1px solid transparent;
1573
+ border-radius: 50%;
1574
+ }
1575
+
1576
+ .p-radiobutton-box {
1577
+ display: flex;
1578
+ justify-content: center;
1579
+ align-items: center;
1580
+ border-radius: 50%;
1581
+ border: 1px solid dt('radiobutton.border.color');
1582
+ background: dt('radiobutton.background');
1583
+ width: dt('radiobutton.width');
1584
+ height: dt('radiobutton.height');
1585
+ transition:
1586
+ background dt('radiobutton.transition.duration'),
1587
+ color dt('radiobutton.transition.duration'),
1588
+ border-color dt('radiobutton.transition.duration'),
1589
+ box-shadow dt('radiobutton.transition.duration'),
1590
+ outline-color dt('radiobutton.transition.duration');
1591
+ outline-color: transparent;
1592
+ box-shadow: dt('radiobutton.shadow');
1593
+ }
1594
+
1595
+ .p-radiobutton-icon {
1596
+ transition-duration: dt('radiobutton.transition.duration');
1597
+ background: transparent;
1598
+ font-size: dt('radiobutton.icon.size');
1599
+ width: dt('radiobutton.icon.size');
1600
+ height: dt('radiobutton.icon.size');
1601
+ border-radius: 50%;
1602
+ backface-visibility: hidden;
1603
+ transform: translateZ(0) scale(0.1);
1604
+ }
1605
+
1606
+ .p-radiobutton:not(.p-disabled):has(.p-radiobutton-input:hover) .p-radiobutton-box {
1607
+ border-color: dt('radiobutton.hover.border.color');
1608
+ }
1609
+
1610
+ .p-radiobutton-checked .p-radiobutton-box {
1611
+ border-color: dt('radiobutton.checked.border.color');
1612
+ background: dt('radiobutton.checked.background');
1613
+ }
1614
+
1615
+ .p-radiobutton-checked .p-radiobutton-box .p-radiobutton-icon {
1616
+ background: dt('radiobutton.icon.checked.color');
1617
+ transform: translateZ(0) scale(1, 1);
1618
+ visibility: visible;
1619
+ }
1620
+
1621
+ .p-radiobutton-checked:not(.p-disabled):has(.p-radiobutton-input:hover) .p-radiobutton-box {
1622
+ border-color: dt('radiobutton.checked.hover.border.color');
1623
+ background: dt('radiobutton.checked.hover.background');
1624
+ }
1625
+
1626
+ .p-radiobutton:not(.p-disabled):has(.p-radiobutton-input:hover).p-radiobutton-checked .p-radiobutton-box .p-radiobutton-icon {
1627
+ background: dt('radiobutton.icon.checked.hover.color');
1628
+ }
1629
+
1630
+ .p-radiobutton:not(.p-disabled):has(.p-radiobutton-input:focus-visible) .p-radiobutton-box {
1631
+ border-color: dt('radiobutton.focus.border.color');
1632
+ box-shadow: dt('radiobutton.focus.ring.shadow');
1633
+ outline: dt('radiobutton.focus.ring.width') dt('radiobutton.focus.ring.style') dt('radiobutton.focus.ring.color');
1634
+ outline-offset: dt('radiobutton.focus.ring.offset');
1635
+ }
1636
+
1637
+ .p-radiobutton-checked:not(.p-disabled):has(.p-radiobutton-input:focus-visible) .p-radiobutton-box {
1638
+ border-color: dt('radiobutton.checked.focus.border.color');
1639
+ }
1640
+
1641
+ .p-radiobutton.p-invalid > .p-radiobutton-box {
1642
+ border-color: dt('radiobutton.invalid.border.color');
1643
+ }
1644
+
1645
+ .p-radiobutton.p-variant-filled .p-radiobutton-box {
1646
+ background: dt('radiobutton.filled.background');
1647
+ }
1648
+
1649
+ .p-radiobutton.p-variant-filled.p-radiobutton-checked .p-radiobutton-box {
1650
+ background: dt('radiobutton.checked.background');
1651
+ }
1652
+
1653
+ .p-radiobutton.p-variant-filled:not(.p-disabled):has(.p-radiobutton-input:hover).p-radiobutton-checked .p-radiobutton-box {
1654
+ background: dt('radiobutton.checked.hover.background');
1655
+ }
1656
+
1657
+ .p-radiobutton.p-disabled {
1658
+ opacity: 1;
1659
+ }
1660
+
1661
+ .p-radiobutton.p-disabled .p-radiobutton-box {
1662
+ background: dt('radiobutton.disabled.background');
1663
+ border-color: dt('radiobutton.checked.disabled.border.color');
1664
+ }
1665
+
1666
+ .p-radiobutton-checked.p-disabled .p-radiobutton-box .p-radiobutton-icon {
1667
+ background: dt('radiobutton.icon.disabled.color');
1668
+ }
1669
+
1670
+ .p-radiobutton-sm,
1671
+ .p-radiobutton-sm .p-radiobutton-box {
1672
+ width: dt('radiobutton.sm.width');
1673
+ height: dt('radiobutton.sm.height');
1674
+ }
1675
+
1676
+ .p-radiobutton-sm .p-radiobutton-icon {
1677
+ font-size: dt('radiobutton.icon.sm.size');
1678
+ width: dt('radiobutton.icon.sm.size');
1679
+ height: dt('radiobutton.icon.sm.size');
1680
+ }
1681
+
1682
+ .p-radiobutton-lg,
1683
+ .p-radiobutton-lg .p-radiobutton-box {
1684
+ width: dt('radiobutton.lg.width');
1685
+ height: dt('radiobutton.lg.height');
1686
+ }
1687
+
1688
+ .p-radiobutton-lg .p-radiobutton-icon {
1689
+ font-size: dt('radiobutton.icon.lg.size');
1690
+ width: dt('radiobutton.icon.lg.size');
1691
+ height: dt('radiobutton.icon.lg.size');
1692
+ }
1693
+ `;var w4=["input"],T4=`
1694
+ ${cv}
1695
+
1696
+ /* For PrimeNG */
1697
+ p-radioButton.ng-invalid.ng-dirty .p-radiobutton-box,
1698
+ p-radio-button.ng-invalid.ng-dirty .p-radiobutton-box,
1699
+ p-radiobutton.ng-invalid.ng-dirty .p-radiobutton-box {
1700
+ border-color: dt('radiobutton.invalid.border.color');
1701
+ }
1702
+ `,S4={root:({instance:t})=>["p-radiobutton p-component",{"p-radiobutton-checked":t.checked,"p-disabled":t.$disabled(),"p-invalid":t.invalid(),"p-variant-filled":t.$variant()==="filled","p-radiobutton-sm p-inputfield-sm":t.size()==="small","p-radiobutton-lg p-inputfield-lg":t.size()==="large"}],box:"p-radiobutton-box",input:"p-radiobutton-input",icon:"p-radiobutton-icon"},dv=(()=>{class t extends St{name="radiobutton";style=T4;classes=S4;static \u0275fac=(()=>{let e;return function(i){return(e||(e=G(t)))(i||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})();var uv=new ge("RADIOBUTTON_INSTANCE"),k4={provide:Xn,useExisting:wn(()=>pv),multi:!0},I4=(()=>{class t{accessors=[];add(e,n){this.accessors.push([e,n])}remove(e){this.accessors=this.accessors.filter(n=>n[1]!==e)}select(e){this.accessors.forEach(n=>{this.isSameGroup(n,e)&&n[1]!==e&&n[1].writeValue(e.value)})}isSameGroup(e,n){return e[0].control?e[0].control.root===n.control.control.root&&e[1].name()===n.name():!1}static \u0275fac=function(n){return new(n||t)};static \u0275prov=y({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),pv=(()=>{class t extends ss{componentName="RadioButton";$pcRadioButton=p(uv,{optional:!0,skipSelf:!0})??void 0;bindDirectiveInstance=p(Ie,{self:!0});onAfterViewChecked(){this.bindDirectiveInstance.setAttrs(this.ptms(["host","root"]))}value;tabindex;inputId;ariaLabelledBy;ariaLabel;styleClass;autofocus;binary;variant=B();size=B();onClick=new ne;onFocus=new ne;onBlur=new ne;inputViewChild;$variant=E(()=>this.variant()||this.config.inputStyle()||this.config.inputVariant());checked;focused;control;_componentStyle=p(dv);injector=p(dt);registry=p(I4);onInit(){this.control=this.injector.get(ho),this.registry.add(this.control,this)}onChange(e){this.$disabled()||this.select(e)}select(e){this.$disabled()||(this.checked=!0,this.writeModelValue(this.checked),this.onModelChange(this.value),this.registry.select(this),this.onClick.emit({originalEvent:e,value:this.value}))}onInputFocus(e){this.focused=!0,this.onFocus.emit(e)}onInputBlur(e){this.focused=!1,this.onModelTouched(),this.onBlur.emit(e)}focus(){this.inputViewChild.nativeElement.focus()}writeControlValue(e,n){this.checked=this.binary?!!e:e==this.value,n(this.checked),this.cd.markForCheck()}onDestroy(){this.registry.remove(this)}get dataP(){return this.cn({invalid:this.invalid(),checked:this.checked,disabled:this.$disabled(),filled:this.$variant()==="filled",[this.size()]:this.size()})}static \u0275fac=(()=>{let e;return function(i){return(e||(e=G(t)))(i||t)}})();static \u0275cmp=z({type:t,selectors:[["p-radioButton"],["p-radiobutton"],["p-radio-button"]],viewQuery:function(n,i){if(n&1&&Tn(w4,5),n&2){let r;Q(r=J())&&(i.inputViewChild=r.first)}},hostVars:5,hostBindings:function(n,i){n&2&&(O("data-p-disabled",i.$disabled())("data-p-checked",i.checked)("data-p",i.dataP),H(i.cx("root")))},inputs:{value:"value",tabindex:[2,"tabindex","tabindex",xe],inputId:"inputId",ariaLabelledBy:"ariaLabelledBy",ariaLabel:"ariaLabel",styleClass:"styleClass",autofocus:[2,"autofocus","autofocus",j],binary:[2,"binary","binary",j],variant:[1,"variant"],size:[1,"size"]},outputs:{onClick:"onClick",onFocus:"onFocus",onBlur:"onBlur"},features:[we([k4,dv,{provide:uv,useExisting:t},{provide:kt,useExisting:t}]),wt([Ie]),Z],decls:4,vars:20,consts:[["input",""],["type","radio",3,"focus","blur","change","checked","pAutoFocus","pBind"],[3,"pBind"]],template:function(n,i){n&1&&(h(0,"input",1,0),A("focus",function(a){return i.onInputFocus(a)})("blur",function(a){return i.onInputBlur(a)})("change",function(a){return i.onChange(a)}),_(),h(2,"div",2),N(3,"div",2),_()),n&2&&(H(i.cx("input")),m("checked",i.checked)("pAutoFocus",i.autofocus)("pBind",i.ptm("input")),O("id",i.inputId)("name",i.name())("required",i.required()?"":void 0)("disabled",i.$disabled()?"":void 0)("value",i.modelValue())("aria-labelledby",i.ariaLabelledBy)("aria-label",i.ariaLabel)("aria-checked",i.checked)("tabindex",i.tabindex),l(2),H(i.cx("box")),m("pBind",i.ptm("box")),l(),H(i.cx("icon")),m("pBind",i.ptm("icon")))},dependencies:[gt,bo,Le,kn,Ie],encapsulation:2,changeDetection:0})}return t})(),hv=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=_t({type:t});static \u0275inj=mt({imports:[pv,Le,Le]})}return t})();var E4=["header"],M4=["headergrouped"],D4=["body"],P4=["loadingbody"],R4=["caption"],O4=["footer"],F4=["footergrouped"],N4=["summary"],A4=["colgroup"],L4=["expandedrow"],B4=["groupheader"],V4=["groupfooter"],z4=["frozenexpandedrow"],H4=["frozenheader"],q4=["frozenbody"],G4=["frozenfooter"],j4=["frozencolgroup"],U4=["emptymessage"],$4=["paginatorleft"],W4=["paginatorright"],K4=["paginatordropdownitem"],Y4=["loadingicon"],X4=["reorderindicatorupicon"],Z4=["reorderindicatordownicon"],Q4=["sorticon"],J4=["checkboxicon"],eN=["headercheckboxicon"],tN=["paginatordropdownicon"],nN=["paginatorfirstpagelinkicon"],iN=["paginatorlastpagelinkicon"],oN=["paginatorpreviouspagelinkicon"],rN=["paginatornextpagelinkicon"],aN=["resizeHelper"],sN=["reorderIndicatorUp"],lN=["reorderIndicatorDown"],cN=["wrapper"],dN=["table"],uN=["thead"],pN=["tfoot"],hN=["scroller"],fN=t=>({height:t}),fv=(t,o)=>({$implicit:t,options:o}),mN=t=>({columns:t}),Uf=t=>({$implicit:t});function _N(t,o){if(t&1&&N(0,"i",17),t&2){let e=d(2);H(e.cn(e.cx("loadingIcon"),e.loadingIcon)),m("pBind",e.ptm("loadingIcon"))}}function gN(t,o){if(t&1&&($(),N(0,"svg",19)),t&2){let e=d(3);H(e.cx("loadingIcon")),m("spin",!0)("pBind",e.ptm("loadingIcon"))}}function bN(t,o){}function vN(t,o){t&1&&I(0,bN,0,0,"ng-template")}function yN(t,o){if(t&1&&(h(0,"span",17),I(1,vN,1,0,null,20),_()),t&2){let e=d(3);H(e.cx("loadingIcon")),m("pBind",e.ptm("loadingIcon")),l(),m("ngTemplateOutlet",e.loadingIconTemplate||e._loadingIconTemplate)}}function CN(t,o){if(t&1&&(me(0),I(1,gN,1,4,"svg",18)(2,yN,2,4,"span",10),_e()),t&2){let e=d(2);l(),m("ngIf",!e.loadingIconTemplate&&!e._loadingIconTemplate),l(),m("ngIf",e.loadingIconTemplate||e._loadingIconTemplate)}}function xN(t,o){if(t&1&&(h(0,"div",17),I0("p-overlay-mask-leave-active"),k0("p-overlay-mask-enter-active"),I(1,_N,1,3,"i",10)(2,CN,3,2,"ng-container",14),_()),t&2){let e=d();H(e.cx("mask")),m("pBind",e.ptm("mask")),l(),m("ngIf",e.loadingIcon),l(),m("ngIf",!e.loadingIcon)}}function wN(t,o){t&1&&le(0)}function TN(t,o){if(t&1&&(h(0,"div",17),I(1,wN,1,0,"ng-container",20),_()),t&2){let e=d();H(e.cx("header")),m("pBind",e.ptm("header")),l(),m("ngTemplateOutlet",e.captionTemplate||e._captionTemplate)}}function SN(t,o){t&1&&le(0)}function kN(t,o){if(t&1&&I(0,SN,1,0,"ng-container",20),t&2){let e=d(3);m("ngTemplateOutlet",e.paginatorDropdownIconTemplate||e._paginatorDropdownIconTemplate)}}function IN(t,o){t&1&&I(0,kN,1,1,"ng-template",22)}function EN(t,o){t&1&&le(0)}function MN(t,o){if(t&1&&I(0,EN,1,0,"ng-container",20),t&2){let e=d(3);m("ngTemplateOutlet",e.paginatorFirstPageLinkIconTemplate||e._paginatorFirstPageLinkIconTemplate)}}function DN(t,o){t&1&&I(0,MN,1,1,"ng-template",23)}function PN(t,o){t&1&&le(0)}function RN(t,o){if(t&1&&I(0,PN,1,0,"ng-container",20),t&2){let e=d(3);m("ngTemplateOutlet",e.paginatorPreviousPageLinkIconTemplate||e._paginatorPreviousPageLinkIconTemplate)}}function ON(t,o){t&1&&I(0,RN,1,1,"ng-template",24)}function FN(t,o){t&1&&le(0)}function NN(t,o){if(t&1&&I(0,FN,1,0,"ng-container",20),t&2){let e=d(3);m("ngTemplateOutlet",e.paginatorLastPageLinkIconTemplate||e._paginatorLastPageLinkIconTemplate)}}function AN(t,o){t&1&&I(0,NN,1,1,"ng-template",25)}function LN(t,o){t&1&&le(0)}function BN(t,o){if(t&1&&I(0,LN,1,0,"ng-container",20),t&2){let e=d(3);m("ngTemplateOutlet",e.paginatorNextPageLinkIconTemplate||e._paginatorNextPageLinkIconTemplate)}}function VN(t,o){t&1&&I(0,BN,1,1,"ng-template",26)}function zN(t,o){if(t&1){let e=W();h(0,"p-paginator",21),A("onPageChange",function(i){w(e);let r=d();return T(r.onPageChange(i))}),I(1,IN,1,0,null,14)(2,DN,1,0,null,14)(3,ON,1,0,null,14)(4,AN,1,0,null,14)(5,VN,1,0,null,14),_()}if(t&2){let e=d();m("rows",e.rows)("first",e.first)("totalRecords",e.totalRecords)("pageLinkSize",e.pageLinks)("alwaysShow",e.alwaysShowPaginator)("rowsPerPageOptions",e.rowsPerPageOptions)("templateLeft",e.paginatorLeftTemplate||e._paginatorLeftTemplate)("templateRight",e.paginatorRightTemplate||e._paginatorRightTemplate)("appendTo",e.paginatorDropdownAppendTo)("dropdownScrollHeight",e.paginatorDropdownScrollHeight)("currentPageReportTemplate",e.currentPageReportTemplate)("showFirstLastIcon",e.showFirstLastIcon)("dropdownItemTemplate",e.paginatorDropdownItemTemplate||e._paginatorDropdownItemTemplate)("showCurrentPageReport",e.showCurrentPageReport)("showJumpToPageDropdown",e.showJumpToPageDropdown)("showJumpToPageInput",e.showJumpToPageInput)("showPageLinks",e.showPageLinks)("styleClass",e.cx("pcPaginator")+" "+e.paginatorStyleClass&&e.paginatorStyleClass)("locale",e.paginatorLocale)("pt",e.ptm("pcPaginator"))("unstyled",e.unstyled()),l(),m("ngIf",e.paginatorDropdownIconTemplate||e._paginatorDropdownIconTemplate),l(),m("ngIf",e.paginatorFirstPageLinkIconTemplate||e._paginatorFirstPageLinkIconTemplate),l(),m("ngIf",e.paginatorPreviousPageLinkIconTemplate||e._paginatorPreviousPageLinkIconTemplate),l(),m("ngIf",e.paginatorLastPageLinkIconTemplate||e._paginatorLastPageLinkIconTemplate),l(),m("ngIf",e.paginatorNextPageLinkIconTemplate||e._paginatorNextPageLinkIconTemplate)}}function HN(t,o){t&1&&le(0)}function qN(t,o){if(t&1&&I(0,HN,1,0,"ng-container",28),t&2){let e=o.$implicit,n=o.options;d(2);let i=yt(8);m("ngTemplateOutlet",i)("ngTemplateOutletContext",Wn(2,fv,e,n))}}function GN(t,o){if(t&1){let e=W();h(0,"p-scroller",27,2),A("onLazyLoad",function(i){w(e);let r=d();return T(r.onLazyItemLoad(i))}),I(2,qN,1,5,"ng-template",null,3,We),_()}if(t&2){let e=d();qt(Oe(16,fN,e.scrollHeight!=="flex"?e.scrollHeight:void 0)),m("items",e.processedData)("columns",e.columns)("scrollHeight",e.scrollHeight!=="flex"?void 0:"100%")("itemSize",e.virtualScrollItemSize)("step",e.rows)("delay",e.lazy?e.virtualScrollDelay:0)("inline",!0)("autoSize",!0)("lazy",e.lazy)("loaderDisabled",!0)("showSpacer",!1)("showLoader",e.loadingBodyTemplate||e._loadingBodyTemplate)("options",e.virtualScrollOptions)("pt",e.ptm("virtualScroller"))}}function jN(t,o){t&1&&le(0)}function UN(t,o){if(t&1&&(me(0),I(1,jN,1,0,"ng-container",28),_e()),t&2){let e=d(),n=yt(8);l(),m("ngTemplateOutlet",n)("ngTemplateOutletContext",Wn(4,fv,e.processedData,Oe(2,mN,e.columns)))}}function $N(t,o){t&1&&le(0)}function WN(t,o){t&1&&le(0)}function KN(t,o){if(t&1&&N(0,"tbody",35),t&2){let e=d().options,n=d();H(n.cx("tbody")),m("pBind",n.ptm("tbody"))("value",n.frozenValue)("frozenRows",!0)("pTableBody",e.columns)("pTableBodyTemplate",n.frozenBodyTemplate||n._frozenBodyTemplate)("unstyled",n.unstyled())("frozen",!0),O("data-p-virtualscroll",n.virtualScroll)}}function YN(t,o){if(t&1&&N(0,"tbody",36),t&2){let e=d().options,n=d();qt("height: calc("+e.spacerStyle.height+" - "+e.rows.length*e.itemSize+"px);"),H(n.cx("virtualScrollerSpacer")),m("pBind",n.ptm("virtualScrollerSpacer"))}}function XN(t,o){t&1&&le(0)}function ZN(t,o){if(t&1&&(h(0,"tfoot",37,6),I(2,XN,1,0,"ng-container",28),_()),t&2){let e=d().options,n=d();m("ngClass",n.cx("footer"))("ngStyle",n.sx("tfoot"))("pBind",n.ptm("tfoot")),l(2),m("ngTemplateOutlet",n.footerGroupedTemplate||n.footerTemplate||n._footerTemplate||n._footerGroupedTemplate)("ngTemplateOutletContext",Oe(5,Uf,e.columns))}}function QN(t,o){if(t&1&&(h(0,"table",29,4),I(2,$N,1,0,"ng-container",28),h(3,"thead",30,5),I(5,WN,1,0,"ng-container",28),_(),I(6,KN,1,10,"tbody",31),N(7,"tbody",32),I(8,YN,1,5,"tbody",33)(9,ZN,3,7,"tfoot",34),_()),t&2){let e=o.options,n=d();qt(n.tableStyle),H(n.cn(n.cx("table"),n.tableStyleClass)),m("pBind",n.ptm("table")),O("id",n.id+"-table"),l(2),m("ngTemplateOutlet",n.colGroupTemplate||n._colGroupTemplate)("ngTemplateOutletContext",Oe(28,Uf,e.columns)),l(),H(n.cx("thead")),m("ngStyle",n.sx("thead"))("pBind",n.ptm("thead")),l(2),m("ngTemplateOutlet",n.headerGroupedTemplate||n.headerTemplate||n._headerTemplate)("ngTemplateOutletContext",Oe(30,Uf,e.columns)),l(),m("ngIf",n.frozenValue||n.frozenBodyTemplate||n._frozenBodyTemplate),l(),qt(e.contentStyle),H(n.cx("tbody",e.contentStyleClass)),m("pBind",n.ptm("tbody"))("value",n.dataToRender(e.rows))("pTableBody",e.columns)("pTableBodyTemplate",n.bodyTemplate||n._bodyTemplate)("scrollerOptions",e)("unstyled",n.unstyled()),O("data-p-virtualscroll",n.virtualScroll),l(),m("ngIf",e.spacerStyle),l(),m("ngIf",n.footerGroupedTemplate||n.footerTemplate||n._footerTemplate||n._footerGroupedTemplate)}}function JN(t,o){t&1&&le(0)}function eA(t,o){if(t&1&&I(0,JN,1,0,"ng-container",20),t&2){let e=d(3);m("ngTemplateOutlet",e.paginatorDropdownIconTemplate||e._paginatorDropdownIconTemplate)}}function tA(t,o){t&1&&I(0,eA,1,1,"ng-template",22)}function nA(t,o){t&1&&le(0)}function iA(t,o){if(t&1&&I(0,nA,1,0,"ng-container",20),t&2){let e=d(3);m("ngTemplateOutlet",e.paginatorFirstPageLinkIconTemplate||e._paginatorFirstPageLinkIconTemplate)}}function oA(t,o){t&1&&I(0,iA,1,1,"ng-template",23)}function rA(t,o){t&1&&le(0)}function aA(t,o){if(t&1&&I(0,rA,1,0,"ng-container",20),t&2){let e=d(3);m("ngTemplateOutlet",e.paginatorPreviousPageLinkIconTemplate||e._paginatorPreviousPageLinkIconTemplate)}}function sA(t,o){t&1&&I(0,aA,1,1,"ng-template",24)}function lA(t,o){t&1&&le(0)}function cA(t,o){if(t&1&&I(0,lA,1,0,"ng-container",20),t&2){let e=d(3);m("ngTemplateOutlet",e.paginatorLastPageLinkIconTemplate||e._paginatorLastPageLinkIconTemplate)}}function dA(t,o){t&1&&I(0,cA,1,1,"ng-template",25)}function uA(t,o){t&1&&le(0)}function pA(t,o){if(t&1&&I(0,uA,1,0,"ng-container",20),t&2){let e=d(3);m("ngTemplateOutlet",e.paginatorNextPageLinkIconTemplate||e._paginatorNextPageLinkIconTemplate)}}function hA(t,o){t&1&&I(0,pA,1,1,"ng-template",26)}function fA(t,o){if(t&1){let e=W();h(0,"p-paginator",21),A("onPageChange",function(i){w(e);let r=d();return T(r.onPageChange(i))}),I(1,tA,1,0,null,14)(2,oA,1,0,null,14)(3,sA,1,0,null,14)(4,dA,1,0,null,14)(5,hA,1,0,null,14),_()}if(t&2){let e=d();m("rows",e.rows)("first",e.first)("totalRecords",e.totalRecords)("pageLinkSize",e.pageLinks)("alwaysShow",e.alwaysShowPaginator)("rowsPerPageOptions",e.rowsPerPageOptions)("templateLeft",e.paginatorLeftTemplate||e._paginatorLeftTemplate)("templateRight",e.paginatorRightTemplate||e._paginatorRightTemplate)("appendTo",e.paginatorDropdownAppendTo)("dropdownScrollHeight",e.paginatorDropdownScrollHeight)("currentPageReportTemplate",e.currentPageReportTemplate)("showFirstLastIcon",e.showFirstLastIcon)("dropdownItemTemplate",e.paginatorDropdownItemTemplate||e._paginatorDropdownItemTemplate)("showCurrentPageReport",e.showCurrentPageReport)("showJumpToPageDropdown",e.showJumpToPageDropdown)("showJumpToPageInput",e.showJumpToPageInput)("showPageLinks",e.showPageLinks)("styleClass",e.cx("pcPaginator")+" "+e.paginatorStyleClass&&e.paginatorStyleClass)("locale",e.paginatorLocale)("pt",e.ptm("pcPaginator"))("unstyled",e.unstyled()),l(),m("ngIf",e.paginatorDropdownIconTemplate||e._paginatorDropdownIconTemplate),l(),m("ngIf",e.paginatorFirstPageLinkIconTemplate||e._paginatorFirstPageLinkIconTemplate),l(),m("ngIf",e.paginatorPreviousPageLinkIconTemplate||e._paginatorPreviousPageLinkIconTemplate),l(),m("ngIf",e.paginatorLastPageLinkIconTemplate||e._paginatorLastPageLinkIconTemplate),l(),m("ngIf",e.paginatorNextPageLinkIconTemplate||e._paginatorNextPageLinkIconTemplate)}}function mA(t,o){t&1&&le(0)}function _A(t,o){if(t&1&&(h(0,"div",38),I(1,mA,1,0,"ng-container",20),_()),t&2){let e=d();m("ngClass",e.cx("footer"))("pBind",e.ptm("footer")),l(),m("ngTemplateOutlet",e.summaryTemplate||e._summaryTemplate)}}function gA(t,o){if(t&1&&N(0,"div",38,7),t&2){let e=d();Ne("display","none"),m("ngClass",e.cx("columnResizeIndicator"))("pBind",e.ptm("columnResizeIndicator"))}}function bA(t,o){if(t&1&&($(),N(0,"svg",40)),t&2){let e=d(2);m("pBind",e.ptm("rowReorderIndicatorUp").icon)}}function vA(t,o){}function yA(t,o){t&1&&I(0,vA,0,0,"ng-template")}function CA(t,o){if(t&1&&(h(0,"span",38,8),I(2,bA,1,1,"svg",39)(3,yA,1,0,null,20),_()),t&2){let e=d();Ne("display","none"),m("ngClass",e.cx("rowReorderIndicatorUp"))("pBind",e.ptm("rowReorderIndicatorUp")),l(2),m("ngIf",!e.reorderIndicatorUpIconTemplate&&!e._reorderIndicatorUpIconTemplate),l(),m("ngTemplateOutlet",e.reorderIndicatorUpIconTemplate||e._reorderIndicatorUpIconTemplate)}}function xA(t,o){if(t&1&&($(),N(0,"svg",42)),t&2){let e=d(2);m("pBind",e.ptm("rowReorderIndicatorDown").icon)}}function wA(t,o){}function TA(t,o){t&1&&I(0,wA,0,0,"ng-template")}function SA(t,o){if(t&1&&(h(0,"span",38,9),I(2,xA,1,1,"svg",41)(3,TA,1,0,null,20),_()),t&2){let e=d();Ne("display","none"),m("ngClass",e.cx("rowReorderIndicatorDown"))("pBind",e.ptm("rowReorderIndicatorDown")),l(2),m("ngIf",!e.reorderIndicatorDownIconTemplate&&!e._reorderIndicatorDownIconTemplate),l(),m("ngTemplateOutlet",e.reorderIndicatorDownIconTemplate||e._reorderIndicatorDownIconTemplate)}}var kA=["pTableBody",""],Kf=(t,o,e,n,i)=>({$implicit:t,rowIndex:o,columns:e,editing:n,frozen:i}),IA=(t,o,e,n,i,r,a)=>({$implicit:t,rowIndex:o,columns:e,editing:n,frozen:i,rowgroup:r,rowspan:a}),bs=(t,o,e,n,i,r)=>({$implicit:t,rowIndex:o,columns:e,expanded:n,editing:i,frozen:r}),mv=(t,o,e,n)=>({$implicit:t,rowIndex:o,columns:e,frozen:n}),_v=(t,o)=>({$implicit:t,frozen:o});function EA(t,o){t&1&&le(0)}function MA(t,o){if(t&1&&(me(0,3),I(1,EA,1,0,"ng-container",4),_e()),t&2){let e=d(),n=e.$implicit,i=e.index,r=d(2);l(),m("ngTemplateOutlet",r.dataTable.groupHeaderTemplate||r.dataTable._groupHeaderTemplate)("ngTemplateOutletContext",Xa(2,Kf,n,r.getRowIndex(i),r.columns,r.dataTable.editMode==="row"&&r.dataTable.isRowEditing(n),r.frozen))}}function DA(t,o){t&1&&le(0)}function PA(t,o){if(t&1&&(me(0),I(1,DA,1,0,"ng-container",4),_e()),t&2){let e=d(),n=e.$implicit,i=e.index,r=d(2);l(),m("ngTemplateOutlet",n?r.template:r.dataTable.loadingBodyTemplate||r.dataTable._loadingBodyTemplate)("ngTemplateOutletContext",Xa(2,Kf,n,r.getRowIndex(i),r.columns,r.dataTable.editMode==="row"&&r.dataTable.isRowEditing(n),r.frozen))}}function RA(t,o){t&1&&le(0)}function OA(t,o){if(t&1&&(me(0),I(1,RA,1,0,"ng-container",4),_e()),t&2){let e=d(),n=e.$implicit,i=e.index,r=d(2);l(),m("ngTemplateOutlet",n?r.template:r.dataTable.loadingBodyTemplate||r.dataTable._loadingBodyTemplate)("ngTemplateOutletContext",D0(2,IA,n,r.getRowIndex(i),r.columns,r.dataTable.editMode==="row"&&r.dataTable.isRowEditing(n),r.frozen,r.shouldRenderRowspan(r.value,n,i),r.calculateRowGroupSize(r.value,n,i)))}}function FA(t,o){t&1&&le(0)}function NA(t,o){if(t&1&&(me(0,3),I(1,FA,1,0,"ng-container",4),_e()),t&2){let e=d(),n=e.$implicit,i=e.index,r=d(2);l(),m("ngTemplateOutlet",r.dataTable.groupFooterTemplate||r.dataTable._groupFooterTemplate)("ngTemplateOutletContext",Xa(2,Kf,n,r.getRowIndex(i),r.columns,r.dataTable.editMode==="row"&&r.dataTable.isRowEditing(n),r.frozen))}}function AA(t,o){if(t&1&&I(0,MA,2,8,"ng-container",2)(1,PA,2,8,"ng-container",0)(2,OA,2,10,"ng-container",0)(3,NA,2,8,"ng-container",2),t&2){let e=o.$implicit,n=o.index,i=d(2);m("ngIf",(i.dataTable.groupHeaderTemplate||i.dataTable._groupHeaderTemplate)&&!i.dataTable.virtualScroll&&i.dataTable.rowGroupMode==="subheader"&&i.shouldRenderRowGroupHeader(i.value,e,i.getRowIndex(n))),l(),m("ngIf",i.dataTable.rowGroupMode!=="rowspan"),l(),m("ngIf",i.dataTable.rowGroupMode==="rowspan"),l(),m("ngIf",(i.dataTable.groupFooterTemplate||i.dataTable._groupFooterTemplate)&&!i.dataTable.virtualScroll&&i.dataTable.rowGroupMode==="subheader"&&i.shouldRenderRowGroupFooter(i.value,e,i.getRowIndex(n)))}}function LA(t,o){if(t&1&&(me(0),I(1,AA,4,4,"ng-template",1),_e()),t&2){let e=d();l(),m("ngForOf",e.value)("ngForTrackBy",e.dataTable.rowTrackBy)}}function BA(t,o){t&1&&le(0)}function VA(t,o){if(t&1&&(me(0),I(1,BA,1,0,"ng-container",4),_e()),t&2){let e=d(),n=e.$implicit,i=e.index,r=d(2);l(),m("ngTemplateOutlet",r.template)("ngTemplateOutletContext",dr(2,bs,n,r.getRowIndex(i),r.columns,r.dataTable.isRowExpanded(n),r.dataTable.editMode==="row"&&r.dataTable.isRowEditing(n),r.frozen))}}function zA(t,o){t&1&&le(0)}function HA(t,o){if(t&1&&(me(0,3),I(1,zA,1,0,"ng-container",4),_e()),t&2){let e=d(),n=e.$implicit,i=e.index,r=d(2);l(),m("ngTemplateOutlet",r.dataTable.groupHeaderTemplate||r.dataTable._groupHeaderTemplate)("ngTemplateOutletContext",dr(2,bs,n,r.getRowIndex(i),r.columns,r.dataTable.isRowExpanded(n),r.dataTable.editMode==="row"&&r.dataTable.isRowEditing(n),r.frozen))}}function qA(t,o){t&1&&le(0)}function GA(t,o){t&1&&le(0)}function jA(t,o){if(t&1&&(me(0,3),I(1,GA,1,0,"ng-container",4),_e()),t&2){let e=d(2),n=e.$implicit,i=e.index,r=d(2);l(),m("ngTemplateOutlet",r.dataTable.groupFooterTemplate||r.dataTable._groupFooterTemplate)("ngTemplateOutletContext",dr(2,bs,n,r.getRowIndex(i),r.columns,r.dataTable.isRowExpanded(n),r.dataTable.editMode==="row"&&r.dataTable.isRowEditing(n),r.frozen))}}function UA(t,o){if(t&1&&(me(0),I(1,qA,1,0,"ng-container",4)(2,jA,2,9,"ng-container",2),_e()),t&2){let e=d(),n=e.$implicit,i=e.index,r=d(2);l(),m("ngTemplateOutlet",r.dataTable.expandedRowTemplate||r.dataTable._expandedRowTemplate)("ngTemplateOutletContext",Ef(3,mv,n,r.getRowIndex(i),r.columns,r.frozen)),l(),m("ngIf",(r.dataTable.groupFooterTemplate||r.dataTable._groupFooterTemplate)&&r.dataTable.rowGroupMode==="subheader"&&r.shouldRenderRowGroupFooter(r.value,n,r.getRowIndex(i)))}}function $A(t,o){if(t&1&&I(0,VA,2,9,"ng-container",0)(1,HA,2,9,"ng-container",2)(2,UA,3,8,"ng-container",0),t&2){let e=o.$implicit,n=o.index,i=d(2);m("ngIf",!(i.dataTable.groupHeaderTemplate&&i.dataTable._groupHeaderTemplate)),l(),m("ngIf",(i.dataTable.groupHeaderTemplate||i.dataTable._groupHeaderTemplate)&&i.dataTable.rowGroupMode==="subheader"&&i.shouldRenderRowGroupHeader(i.value,e,i.getRowIndex(n))),l(),m("ngIf",i.dataTable.isRowExpanded(e))}}function WA(t,o){if(t&1&&(me(0),I(1,$A,3,3,"ng-template",1),_e()),t&2){let e=d();l(),m("ngForOf",e.value)("ngForTrackBy",e.dataTable.rowTrackBy)}}function KA(t,o){t&1&&le(0)}function YA(t,o){t&1&&le(0)}function XA(t,o){if(t&1&&(me(0),I(1,YA,1,0,"ng-container",4),_e()),t&2){let e=d(),n=e.$implicit,i=e.index,r=d(2);l(),m("ngTemplateOutlet",r.dataTable.frozenExpandedRowTemplate||r.dataTable._frozenExpandedRowTemplate)("ngTemplateOutletContext",Ef(2,mv,n,r.getRowIndex(i),r.columns,r.frozen))}}function ZA(t,o){if(t&1&&I(0,KA,1,0,"ng-container",4)(1,XA,2,7,"ng-container",0),t&2){let e=o.$implicit,n=o.index,i=d(2);m("ngTemplateOutlet",i.template)("ngTemplateOutletContext",dr(3,bs,e,i.getRowIndex(n),i.columns,i.dataTable.isRowExpanded(e),i.dataTable.editMode==="row"&&i.dataTable.isRowEditing(e),i.frozen)),l(),m("ngIf",i.dataTable.isRowExpanded(e))}}function QA(t,o){if(t&1&&(me(0),I(1,ZA,2,10,"ng-template",1),_e()),t&2){let e=d();l(),m("ngForOf",e.value)("ngForTrackBy",e.dataTable.rowTrackBy)}}function JA(t,o){t&1&&le(0)}function e5(t,o){if(t&1&&(me(0),I(1,JA,1,0,"ng-container",4),_e()),t&2){let e=d();l(),m("ngTemplateOutlet",e.dataTable.loadingBodyTemplate||e.dataTable._loadingBodyTemplate)("ngTemplateOutletContext",Wn(2,_v,e.columns,e.frozen))}}function t5(t,o){t&1&&le(0)}function n5(t,o){if(t&1&&(me(0),I(1,t5,1,0,"ng-container",4),_e()),t&2){let e=d();l(),m("ngTemplateOutlet",e.dataTable.emptyMessageTemplate||e.dataTable._emptyMessageTemplate)("ngTemplateOutletContext",Wn(2,_v,e.columns,e.frozen))}}var i5=`
1703
+ ${Tb}
1704
+
1705
+ /* For PrimeNG */
1706
+ .p-datatable-scrollable-table > .p-datatable-thead {
1707
+ top: 0;
1708
+ z-index: 2;
1709
+ }
1710
+
1711
+ .p-datatable-scrollable-table > .p-datatable-frozen-tbody {
1712
+ position: sticky;
1713
+ z-index: 2;
1714
+ }
1715
+
1716
+ .p-datatable-scrollable-table > .p-datatable-frozen-tbody + .p-datatable-frozen-tbody {
1717
+ z-index: 1;
1718
+ }
1719
+
1720
+ .p-datatable-mask.p-overlay-mask {
1721
+ position: absolute;
1722
+ display: flex;
1723
+ align-items: center;
1724
+ justify-content: center;
1725
+ z-index: 3;
1726
+ }
1727
+
1728
+ .p-datatable-filter-overlay {
1729
+ position: absolute;
1730
+ background: dt('datatable.filter.overlay.select.background');
1731
+ color: dt('datatable.filter.overlay.select.color');
1732
+ border: 1px solid dt('datatable.filter.overlay.select.border.color');
1733
+ border-radius: dt('datatable.filter.overlay.select.border.radius');
1734
+ box-shadow: dt('datatable.filter.overlay.select.shadow');
1735
+ min-width: 12.5rem;
1736
+ }
1737
+
1738
+ .p-datatable-filter-rule {
1739
+ border-bottom: 1px solid dt('datatable.filter.rule.border.color');
1740
+ }
1741
+
1742
+ .p-datatable-filter-rule:last-child {
1743
+ border-bottom: 0 none;
1744
+ }
1745
+
1746
+ .p-datatable-filter-add-rule-button,
1747
+ .p-datatable-filter-remove-rule-button {
1748
+ width: 100%;
1749
+ }
1750
+
1751
+ .p-datatable-filter-remove-button {
1752
+ width: 100%;
1753
+ }
1754
+
1755
+ .p-datatable-thead > tr > th {
1756
+ padding: dt('datatable.header.cell.padding');
1757
+ background: dt('datatable.header.cell.background');
1758
+ border-color: dt('datatable.header.cell.border.color');
1759
+ border-style: solid;
1760
+ border-width: 0 0 1px 0;
1761
+ color: dt('datatable.header.cell.color');
1762
+ font-weight: dt('datatable.column.title.font.weight');
1763
+ text-align: start;
1764
+ transition:
1765
+ background dt('datatable.transition.duration'),
1766
+ color dt('datatable.transition.duration'),
1767
+ border-color dt('datatable.transition.duration'),
1768
+ outline-color dt('datatable.transition.duration'),
1769
+ box-shadow dt('datatable.transition.duration');
1770
+ }
1771
+
1772
+ .p-datatable-thead > tr > th p-columnfilter {
1773
+ font-weight: normal;
1774
+ }
1775
+
1776
+ .p-datatable-thead > tr > th,
1777
+ .p-datatable-sort-icon,
1778
+ .p-datatable-sort-badge {
1779
+ vertical-align: middle;
1780
+ }
1781
+
1782
+ .p-datatable-thead > tr > th.p-datatable-column-sorted {
1783
+ background: dt('datatable.header.cell.selected.background');
1784
+ color: dt('datatable.header.cell.selected.color');
1785
+ }
1786
+
1787
+ .p-datatable-thead > tr > th.p-datatable-column-sorted .p-datatable-sort-icon {
1788
+ color: dt('datatable.header.cell.selected.color');
1789
+ }
1790
+
1791
+ .p-datatable.p-datatable-striped .p-datatable-tbody > tr:nth-child(odd) {
1792
+ background: dt('datatable.row.striped.background');
1793
+ }
1794
+
1795
+ .p-datatable.p-datatable-striped .p-datatable-tbody > tr:nth-child(odd).p-datatable-row-selected {
1796
+ background: dt('datatable.row.selected.background');
1797
+ color: dt('datatable.row.selected.color');
1798
+ }
1799
+
1800
+ p-sortIcon, p-sort-icon, p-sorticon {
1801
+ display: inline-flex;
1802
+ align-items: center;
1803
+ gap: dt('datatable.header.cell.gap');
1804
+ }
1805
+
1806
+ .p-datatable .p-editable-column.p-cell-editing {
1807
+ padding: 0;
1808
+ }
1809
+
1810
+ .p-datatable .p-editable-column.p-cell-editing p-celleditor {
1811
+ display: block;
1812
+ width: 100%;
1813
+ }
1814
+ `,o5={root:({instance:t})=>["p-datatable p-component",{"p-datatable-hoverable":t.rowHover||t.selectionMode,"p-datatable-resizable":t.resizableColumns,"p-datatable-resizable-fit":t.resizableColumns&&t.columnResizeMode==="fit","p-datatable-scrollable":t.scrollable,"p-datatable-flex-scrollable":t.scrollable&&t.scrollHeight==="flex","p-datatable-striped":t.stripedRows,"p-datatable-gridlines":t.showGridlines,"p-datatable-sm":t.size==="small","p-datatable-lg":t.size==="large"}],mask:"p-datatable-mask p-overlay-mask",loadingIcon:"p-datatable-loading-icon",header:"p-datatable-header",pcPaginator:({instance:t})=>"p-datatable-paginator-"+t.paginatorPosition,tableContainer:"p-datatable-table-container",table:({instance:t})=>["p-datatable-table",{"p-datatable-scrollable-table":t.scrollable,"p-datatable-resizable-table":t.resizableColumns,"p-datatable-resizable-table-fit":t.resizableColumns&&t.columnResizeMode==="fit"}],thead:"p-datatable-thead",columnResizer:"p-datatable-column-resizer",columnHeaderContent:"p-datatable-column-header-content",columnTitle:"p-datatable-column-title",columnFooter:"p-datatable-column-footer",sortIcon:"p-datatable-sort-icon",pcSortBadge:"p-datatable-sort-badge",filter:({instance:t})=>({"p-datatable-filter":!0,"p-datatable-inline-filter":t.display==="row","p-datatable-popover-filter":t.display==="menu"}),filterElementContainer:"p-datatable-filter-element-container",pcColumnFilterButton:"p-datatable-column-filter-button",pcColumnFilterClearButton:"p-datatable-column-filter-clear-button",filterOverlay:({instance:t})=>({"p-datatable-filter-overlay p-component":!0,"p-datatable-filter-overlay-popover":t.display==="menu"}),filterConstraintList:"p-datatable-filter-constraint-list",filterConstraint:({selected:t})=>({"p-datatable-filter-constraint":!0,"p-datatable-filter-constraint-selected":t}),filterConstraintSeparator:"p-datatable-filter-constraint-separator",filterOperator:"p-datatable-filter-operator",pcFilterOperatorDropdown:"p-datatable-filter-operator-dropdown",filterRuleList:"p-datatable-filter-rule-list",filterRule:"p-datatable-filter-rule",pcFilterConstraintDropdown:"p-datatable-filter-constraint-dropdown",pcFilterRemoveRuleButton:"p-datatable-filter-remove-rule-button",pcFilterAddRuleButton:"p-datatable-filter-add-rule-button",filterButtonbar:"p-datatable-filter-buttonbar",pcFilterClearButton:"p-datatable-filter-clear-button",pcFilterApplyButton:"p-datatable-filter-apply-button",tbody:({instance:t})=>({"p-datatable-tbody":!0,"p-datatable-frozen-tbody":t.frozenValue||t.frozenBodyTemplate,"p-virtualscroller-content":t.virtualScroll}),rowGroupHeader:"p-datatable-row-group-header",rowToggleButton:"p-datatable-row-toggle-button",rowToggleIcon:"p-datatable-row-toggle-icon",rowExpansion:"p-datatable-row-expansion",rowGroupFooter:"p-datatable-row-group-footer",emptyMessage:"p-datatable-empty-message",bodyCell:({instance:t})=>({"p-datatable-frozen-column":t.columnProp("frozen")}),reorderableRowHandle:"p-datatable-reorderable-row-handle",pcRowEditorInit:"p-datatable-row-editor-init",pcRowEditorSave:"p-datatable-row-editor-save",pcRowEditorCancel:"p-datatable-row-editor-cancel",tfoot:"p-datatable-tfoot",footerCell:({instance:t})=>({"p-datatable-frozen-column":t.columnProp("frozen")}),virtualScrollerSpacer:"p-datatable-virtualscroller-spacer",footer:"p-datatable-tfoot",columnResizeIndicator:"p-datatable-column-resize-indicator",rowReorderIndicatorUp:"p-datatable-row-reorder-indicator-up",rowReorderIndicatorDown:"p-datatable-row-reorder-indicator-down",sortableColumn:({instance:t})=>({"p-datatable-sortable-column":t.isEnabled()," p-datatable-column-sorted":t.sorted}),sortableColumnIcon:"p-datatable-sort-icon",sortableColumnBadge:"p-sortable-column-badge",selectableRow:({instance:t})=>({"p-datatable-selectable-row":t.isEnabled(),"p-datatable-row-selected":t.selected}),resizableColumn:"p-datatable-resizable-column",reorderableColumn:"p-datatable-reorderable-column",rowEditorCancel:"p-datatable-row-editor-cancel",frozenColumn:({instance:t})=>({"p-datatable-frozen-column":t.frozen,"p-datatable-frozen-column-left":t.alignFrozenLeft==="left"}),contextMenuRowSelected:({instance:t})=>({"p-datatable-contextmenu-row-selected":t.selected})},r5={tableContainer:({instance:t})=>({"max-height":t.virtualScroll?"":t.scrollHeight,overflow:"auto"}),thead:{position:"sticky"},tfoot:{position:"sticky"},rowGroupHeader:({instance:t})=>({top:t.getFrozenRowGroupHeaderStickyPosition})},$f=(()=>{class t extends St{name="datatable";style=i5;classes=o5;inlineStyles=r5;static \u0275fac=(()=>{let e;return function(i){return(e||(e=G(t)))(i||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})();var a5=new ge("TABLE_INSTANCE"),Wf=(()=>{class t{sortSource=new ro;selectionSource=new ro;contextMenuSource=new ro;valueSource=new ro;columnsSource=new ro;sortSource$=this.sortSource.asObservable();selectionSource$=this.selectionSource.asObservable();contextMenuSource$=this.contextMenuSource.asObservable();valueSource$=this.valueSource.asObservable();columnsSource$=this.columnsSource.asObservable();onSort(e){this.sortSource.next(e)}onSelectionChange(){this.selectionSource.next(null)}onContextMenu(e){this.contextMenuSource.next(e)}onValueChange(e){this.valueSource.next(e)}onColumnsChange(e){this.columnsSource.next(e)}static \u0275fac=function(n){return new(n||t)};static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),Yf=(()=>{class t extends Bn{componentName="DataTable";frozenColumns;frozenValue;styleClass;tableStyle;tableStyleClass;paginator;pageLinks=5;rowsPerPageOptions;alwaysShowPaginator=!0;paginatorPosition="bottom";paginatorStyleClass;paginatorDropdownAppendTo;paginatorDropdownScrollHeight="200px";currentPageReportTemplate="{currentPage} of {totalPages}";showCurrentPageReport;showJumpToPageDropdown;showJumpToPageInput;showFirstLastIcon=!0;showPageLinks=!0;defaultSortOrder=1;sortMode="single";resetPageOnSort=!0;selectionMode;selectionPageOnly;contextMenuSelection;contextMenuSelectionChange=new ne;contextMenuSelectionMode="separate";dataKey;metaKeySelection=!1;rowSelectable;rowTrackBy=(e,n)=>n;lazy=!1;lazyLoadOnInit=!0;compareSelectionBy="deepEquals";csvSeparator=",";exportFilename="download";filters={};globalFilterFields;filterDelay=300;filterLocale;expandedRowKeys={};editingRowKeys={};rowExpandMode="multiple";scrollable;rowGroupMode;scrollHeight;virtualScroll;virtualScrollItemSize;virtualScrollOptions;virtualScrollDelay=250;frozenWidth;contextMenu;resizableColumns;columnResizeMode="fit";reorderableColumns;loading;loadingIcon;showLoader=!0;rowHover;customSort;showInitialSortBadge=!0;exportFunction;exportHeader;stateKey;stateStorage="session";editMode="cell";groupRowsBy;size;showGridlines;stripedRows;groupRowsByOrder=1;responsiveLayout="scroll";breakpoint="960px";paginatorLocale;get value(){return this._value}set value(e){this._value=e}get columns(){return this._columns}set columns(e){this._columns=e}get first(){return this._first}set first(e){this._first=e}get rows(){return this._rows}set rows(e){this._rows=e}totalRecords=0;get sortField(){return this._sortField}set sortField(e){this._sortField=e}get sortOrder(){return this._sortOrder}set sortOrder(e){this._sortOrder=e}get multiSortMeta(){return this._multiSortMeta}set multiSortMeta(e){this._multiSortMeta=e}get selection(){return this._selection}set selection(e){this._selection=e}get selectAll(){return this._selection}set selectAll(e){this._selection=e}selectAllChange=new ne;selectionChange=new ne;onRowSelect=new ne;onRowUnselect=new ne;onPage=new ne;onSort=new ne;onFilter=new ne;onLazyLoad=new ne;onRowExpand=new ne;onRowCollapse=new ne;onContextMenuSelect=new ne;onColResize=new ne;onColReorder=new ne;onRowReorder=new ne;onEditInit=new ne;onEditComplete=new ne;onEditCancel=new ne;onHeaderCheckboxToggle=new ne;sortFunction=new ne;firstChange=new ne;rowsChange=new ne;onStateSave=new ne;onStateRestore=new ne;resizeHelperViewChild;reorderIndicatorUpViewChild;reorderIndicatorDownViewChild;wrapperViewChild;tableViewChild;tableHeaderViewChild;tableFooterViewChild;scroller;_templates;_value=[];_columns;_totalRecords=0;_first=0;_rows;filteredValue;_headerTemplate;headerTemplate;_headerGroupedTemplate;headerGroupedTemplate;_bodyTemplate;bodyTemplate;_loadingBodyTemplate;loadingBodyTemplate;_captionTemplate;captionTemplate;_footerTemplate;footerTemplate;_footerGroupedTemplate;footerGroupedTemplate;_summaryTemplate;summaryTemplate;_colGroupTemplate;colGroupTemplate;_expandedRowTemplate;expandedRowTemplate;_groupHeaderTemplate;groupHeaderTemplate;_groupFooterTemplate;groupFooterTemplate;_frozenExpandedRowTemplate;frozenExpandedRowTemplate;_frozenHeaderTemplate;frozenHeaderTemplate;_frozenBodyTemplate;frozenBodyTemplate;_frozenFooterTemplate;frozenFooterTemplate;_frozenColGroupTemplate;frozenColGroupTemplate;_emptyMessageTemplate;emptyMessageTemplate;_paginatorLeftTemplate;paginatorLeftTemplate;_paginatorRightTemplate;paginatorRightTemplate;_paginatorDropdownItemTemplate;paginatorDropdownItemTemplate;_loadingIconTemplate;loadingIconTemplate;_reorderIndicatorUpIconTemplate;reorderIndicatorUpIconTemplate;_reorderIndicatorDownIconTemplate;reorderIndicatorDownIconTemplate;_sortIconTemplate;sortIconTemplate;_checkboxIconTemplate;checkboxIconTemplate;_headerCheckboxIconTemplate;headerCheckboxIconTemplate;_paginatorDropdownIconTemplate;paginatorDropdownIconTemplate;_paginatorFirstPageLinkIconTemplate;paginatorFirstPageLinkIconTemplate;_paginatorLastPageLinkIconTemplate;paginatorLastPageLinkIconTemplate;_paginatorPreviousPageLinkIconTemplate;paginatorPreviousPageLinkIconTemplate;_paginatorNextPageLinkIconTemplate;paginatorNextPageLinkIconTemplate;selectionKeys={};lastResizerHelperX;reorderIconWidth;reorderIconHeight;draggedColumn;draggedRowIndex;droppedRowIndex;rowDragging;dropPosition;editingCell;editingCellData;editingCellField;editingCellRowIndex;selfClick;documentEditListener;_multiSortMeta;_sortField;_sortOrder=1;preventSelectionSetterPropagation;_selection;_selectAll=null;anchorRowIndex;rangeRowIndex;filterTimeout;initialized;rowTouched;restoringSort;restoringFilter;stateRestored;columnOrderStateRestored;columnWidthsState;tableWidthState;overlaySubscription;resizeColumnElement;columnResizing=!1;rowGroupHeaderStyleObject={};id=Y0();styleElement;responsiveStyleElement;overlayService=p(po);filterService=p(z0);tableService=p(Wf);zone=p(Zt);_componentStyle=p($f);bindDirectiveInstance=p(Ie,{self:!0});onAfterViewChecked(){this.bindDirectiveInstance.setAttrs(this.ptms(["host","root"]))}onInit(){this.lazy&&this.lazyLoadOnInit&&(this.virtualScroll||this.onLazyLoad.emit(this.createLazyLoadMetadata()),this.restoringFilter&&(this.restoringFilter=!1)),this.responsiveLayout==="stack"&&this.createResponsiveStyle(),this.initialized=!0}onAfterContentInit(){this._templates.forEach(e=>{switch(e.getType()){case"caption":this.captionTemplate=e.template;break;case"header":this.headerTemplate=e.template;break;case"headergrouped":this.headerGroupedTemplate=e.template;break;case"body":this.bodyTemplate=e.template;break;case"loadingbody":this.loadingBodyTemplate=e.template;break;case"footer":this.footerTemplate=e.template;break;case"footergrouped":this.footerGroupedTemplate=e.template;break;case"summary":this.summaryTemplate=e.template;break;case"colgroup":this.colGroupTemplate=e.template;break;case"expandedrow":this.expandedRowTemplate=e.template;break;case"groupheader":this.groupHeaderTemplate=e.template;break;case"groupfooter":this.groupFooterTemplate=e.template;break;case"frozenheader":this.frozenHeaderTemplate=e.template;break;case"frozenbody":this.frozenBodyTemplate=e.template;break;case"frozenfooter":this.frozenFooterTemplate=e.template;break;case"frozencolgroup":this.frozenColGroupTemplate=e.template;break;case"frozenexpandedrow":this.frozenExpandedRowTemplate=e.template;break;case"emptymessage":this.emptyMessageTemplate=e.template;break;case"paginatorleft":this.paginatorLeftTemplate=e.template;break;case"paginatorright":this.paginatorRightTemplate=e.template;break;case"paginatordropdownicon":this.paginatorDropdownIconTemplate=e.template;break;case"paginatordropdownitem":this.paginatorDropdownItemTemplate=e.template;break;case"paginatorfirstpagelinkicon":this.paginatorFirstPageLinkIconTemplate=e.template;break;case"paginatorlastpagelinkicon":this.paginatorLastPageLinkIconTemplate=e.template;break;case"paginatorpreviouspagelinkicon":this.paginatorPreviousPageLinkIconTemplate=e.template;break;case"paginatornextpagelinkicon":this.paginatorNextPageLinkIconTemplate=e.template;break;case"loadingicon":this.loadingIconTemplate=e.template;break;case"reorderindicatorupicon":this.reorderIndicatorUpIconTemplate=e.template;break;case"reorderindicatordownicon":this.reorderIndicatorDownIconTemplate=e.template;break;case"sorticon":this.sortIconTemplate=e.template;break;case"checkboxicon":this.checkboxIconTemplate=e.template;break;case"headercheckboxicon":this.headerCheckboxIconTemplate=e.template;break}})}onAfterViewInit(){jt(this.platformId)&&this.isStateful()&&this.resizableColumns&&this.restoreColumnWidths()}onChanges(e){e.totalRecords&&e.totalRecords.firstChange&&(this._totalRecords=e.totalRecords.currentValue),e.value&&(this.isStateful()&&!this.stateRestored&&jt(this.platformId)&&this.restoreState(),this._value=e.value.currentValue,this.lazy||(this.totalRecords=this._totalRecords===0&&this._value?this._value.length:this._totalRecords??0,this.sortMode=="single"&&(this.sortField||this.groupRowsBy)?this.sortSingle():this.sortMode=="multiple"&&(this.multiSortMeta||this.groupRowsBy)?this.sortMultiple():this.hasFilter()&&this._filter()),this.tableService.onValueChange(e.value.currentValue)),e.columns&&(this.isStateful()||(this._columns=e.columns.currentValue,this.tableService.onColumnsChange(e.columns.currentValue)),this._columns&&this.isStateful()&&this.reorderableColumns&&!this.columnOrderStateRestored&&(this.restoreColumnOrder(),this.tableService.onColumnsChange(this._columns))),e.sortField&&(this._sortField=e.sortField.currentValue,(!this.lazy||this.initialized)&&this.sortMode==="single"&&this.sortSingle()),e.groupRowsBy&&(!this.lazy||this.initialized)&&this.sortMode==="single"&&this.sortSingle(),e.sortOrder&&(this._sortOrder=e.sortOrder.currentValue,(!this.lazy||this.initialized)&&this.sortMode==="single"&&this.sortSingle()),e.groupRowsByOrder&&(!this.lazy||this.initialized)&&this.sortMode==="single"&&this.sortSingle(),e.multiSortMeta&&(this._multiSortMeta=e.multiSortMeta.currentValue,this.sortMode==="multiple"&&(this.initialized||!this.lazy&&!this.virtualScroll)&&this.sortMultiple()),e.selection&&(this._selection=e.selection.currentValue,this.preventSelectionSetterPropagation||(this.updateSelectionKeys(),this.tableService.onSelectionChange()),this.preventSelectionSetterPropagation=!1),e.selectAll&&(this._selectAll=e.selectAll.currentValue,this.preventSelectionSetterPropagation||(this.updateSelectionKeys(),this.tableService.onSelectionChange(),this.isStateful()&&this.saveState()),this.preventSelectionSetterPropagation=!1)}get processedData(){return this.filteredValue||this.value||[]}_initialColWidths;dataToRender(e){let n=e||this.processedData;if(n&&this.paginator){let i=this.lazy?0:this.first;return n.slice(i,i+this.rows)}return n}updateSelectionKeys(){if(this.dataKey&&this._selection)if(this.selectionKeys={},Array.isArray(this._selection))for(let e of this._selection)this.selectionKeys[String(Ee.resolveFieldData(e,this.dataKey))]=1;else this.selectionKeys[String(Ee.resolveFieldData(this._selection,this.dataKey))]=1}onPageChange(e){this.first=e.first,this.rows=e.rows,this.onPage.emit({first:this.first,rows:this.rows}),this.lazy&&this.onLazyLoad.emit(this.createLazyLoadMetadata()),this.firstChange.emit(this.first),this.rowsChange.emit(this.rows),this.tableService.onValueChange(this.value),this.isStateful()&&this.saveState(),this.anchorRowIndex=null,this.scrollable&&this.resetScrollTop()}sort(e){let n=e.originalEvent;if(this.sortMode==="single"&&(this._sortOrder=this.sortField===e.field?this.sortOrder*-1:this.defaultSortOrder,this._sortField=e.field,this.resetPageOnSort&&(this._first=0,this.firstChange.emit(this._first),this.scrollable&&this.resetScrollTop()),this.sortSingle()),this.sortMode==="multiple"){let i=n.metaKey||n.ctrlKey,r=this.getSortMeta(e.field);r?i?r.order=r.order*-1:(this._multiSortMeta=[{field:e.field,order:r.order*-1}],this.resetPageOnSort&&(this._first=0,this.firstChange.emit(this._first),this.scrollable&&this.resetScrollTop())):((!i||!this.multiSortMeta)&&(this._multiSortMeta=[],this.resetPageOnSort&&(this._first=0,this.firstChange.emit(this._first))),this._multiSortMeta.push({field:e.field,order:this.defaultSortOrder})),this.sortMultiple()}this.isStateful()&&this.saveState(),this.anchorRowIndex=null}sortSingle(){let e=this.sortField||this.groupRowsBy,n=this.sortField?this.sortOrder:this.groupRowsByOrder;if(this.groupRowsBy&&this.sortField&&this.groupRowsBy!==this.sortField){this._multiSortMeta=[this.getGroupRowsMeta(),{field:this.sortField,order:this.sortOrder}],this.sortMultiple();return}if(e&&n){this.restoringSort&&(this.restoringSort=!1),this.lazy?this.onLazyLoad.emit(this.createLazyLoadMetadata()):this.value&&(this.customSort?this.sortFunction.emit({data:this.value,mode:this.sortMode,field:e,order:n}):(this.value.sort((r,a)=>{let s=Ee.resolveFieldData(r,e),c=Ee.resolveFieldData(a,e),u=null;return s==null&&c!=null?u=-1:s!=null&&c==null?u=1:s==null&&c==null?u=0:typeof s=="string"&&typeof c=="string"?u=s.localeCompare(c):u=s<c?-1:s>c?1:0,n*(u||0)}),this._value=[...this.value]),this.hasFilter()&&this._filter());let i={field:e,order:n};this.onSort.emit(i),this.tableService.onSort(i)}}sortMultiple(){this.groupRowsBy&&(this._multiSortMeta?this.multiSortMeta[0].field!==this.groupRowsBy&&(this._multiSortMeta=[this.getGroupRowsMeta(),...this._multiSortMeta]):this._multiSortMeta=[this.getGroupRowsMeta()]),this.multiSortMeta&&(this.lazy?this.onLazyLoad.emit(this.createLazyLoadMetadata()):this.value&&(this.customSort?this.sortFunction.emit({data:this.value,mode:this.sortMode,multiSortMeta:this.multiSortMeta}):(this.value.sort((e,n)=>this.multisortField(e,n,this.multiSortMeta,0)),this._value=[...this.value]),this.hasFilter()&&this._filter()),this.onSort.emit({multisortmeta:this.multiSortMeta}),this.tableService.onSort(this.multiSortMeta))}multisortField(e,n,i,r){let a=Ee.resolveFieldData(e,i[r].field),s=Ee.resolveFieldData(n,i[r].field);return Ee.compare(a,s,this.filterLocale)===0?i.length-1>r?this.multisortField(e,n,i,r+1):0:this.compareValuesOnSort(a,s,i[r].order)}compareValuesOnSort(e,n,i){return Ee.sort(e,n,i,this.filterLocale,this.sortOrder)}getSortMeta(e){if(this.multiSortMeta&&this.multiSortMeta.length){for(let n=0;n<this.multiSortMeta.length;n++)if(this.multiSortMeta[n].field===e)return this.multiSortMeta[n]}return null}isSorted(e){if(this.sortMode==="single")return this.sortField&&this.sortField===e;if(this.sortMode==="multiple"){let n=!1;if(this.multiSortMeta){for(let i=0;i<this.multiSortMeta.length;i++)if(this.multiSortMeta[i].field==e){n=!0;break}}return n}}handleRowClick(e){let n=e.originalEvent.target,i=n.nodeName,r=n.parentElement&&n.parentElement.nodeName;if(!(i=="INPUT"||i=="BUTTON"||i=="A"||r=="INPUT"||r=="BUTTON"||r=="A"||F0(e.originalEvent.target))){if(this.selectionMode){let a=e.rowData,s=e.rowIndex;if(this.preventSelectionSetterPropagation=!0,this.isMultipleSelectionMode()&&e.originalEvent.shiftKey&&this.anchorRowIndex!=null)Se.clearSelection(),this.rangeRowIndex!=null&&this.clearSelectionRange(e.originalEvent),this.rangeRowIndex=s,this.selectRange(e.originalEvent,s);else{let c=this.isSelected(a);if(!c&&!this.isRowSelectable(a,s))return;let u=this.rowTouched?!1:this.metaKeySelection,f=this.dataKey?String(Ee.resolveFieldData(a,this.dataKey)):null;if(this.anchorRowIndex=s,this.rangeRowIndex=s,u){let g=e.originalEvent.metaKey||e.originalEvent.ctrlKey;if(c&&g){if(this.isSingleSelectionMode())this._selection=null,this.selectionKeys={},this.selectionChange.emit(null);else{let C=this.findIndexInSelection(a);this._selection=this.selection.filter((k,S)=>S!=C),this.selectionChange.emit(this.selection),f&&delete this.selectionKeys[f]}this.onRowUnselect.emit({originalEvent:e.originalEvent,data:a,type:"row"})}else this.isSingleSelectionMode()?(this._selection=a,this.selectionChange.emit(a),f&&(this.selectionKeys={},this.selectionKeys[f]=1)):this.isMultipleSelectionMode()&&(g?this._selection=this.selection||[]:(this._selection=[],this.selectionKeys={}),this._selection=[...this.selection,a],this.selectionChange.emit(this.selection),f&&(this.selectionKeys[f]=1)),this.onRowSelect.emit({originalEvent:e.originalEvent,data:a,type:"row",index:s})}else if(this.selectionMode==="single")c?(this._selection=null,this.selectionKeys={},this.selectionChange.emit(this.selection),this.onRowUnselect.emit({originalEvent:e.originalEvent,data:a,type:"row",index:s})):(this._selection=a,this.selectionChange.emit(this.selection),this.onRowSelect.emit({originalEvent:e.originalEvent,data:a,type:"row",index:s}),f&&(this.selectionKeys={},this.selectionKeys[f]=1));else if(this.selectionMode==="multiple")if(c){let g=this.findIndexInSelection(a);this._selection=this.selection.filter((C,k)=>k!=g),this.selectionChange.emit(this.selection),this.onRowUnselect.emit({originalEvent:e.originalEvent,data:a,type:"row",index:s}),f&&delete this.selectionKeys[f]}else this._selection=this.selection?[...this.selection,a]:[a],this.selectionChange.emit(this.selection),this.onRowSelect.emit({originalEvent:e.originalEvent,data:a,type:"row",index:s}),f&&(this.selectionKeys[f]=1)}this.tableService.onSelectionChange(),this.isStateful()&&this.saveState()}this.rowTouched=!1}}handleRowTouchEnd(e){this.rowTouched=!0}handleRowRightClick(e){if(this.contextMenu){let n=e.rowData,i=e.rowIndex,r=()=>{this.contextMenu.show(e.originalEvent),this.contextMenu.hideCallback=()=>{this.contextMenuSelection=null,this.contextMenuSelectionChange.emit(null),this.tableService.onContextMenu(null)}};if(this.contextMenuSelectionMode==="separate")this.contextMenuSelection=n,this.contextMenuSelectionChange.emit(n),this.tableService.onContextMenu(n),r(),this.onContextMenuSelect.emit({originalEvent:e.originalEvent,data:n,index:e.rowIndex});else if(this.contextMenuSelectionMode==="joint"){this.preventSelectionSetterPropagation=!0;let a=this.isSelected(n),s=this.dataKey?String(Ee.resolveFieldData(n,this.dataKey)):null;if(!a){if(!this.isRowSelectable(n,i))return;this.isSingleSelectionMode()?(this.selection=n,this.selectionChange.emit(n),s&&(this.selectionKeys={},this.selectionKeys[s]=1)):this.isMultipleSelectionMode()&&(this._selection=this.selection?[...this.selection,n]:[n],this.selectionChange.emit(this.selection),s&&(this.selectionKeys[s]=1))}this.contextMenuSelection=n,this.contextMenuSelectionChange.emit(n),this.tableService.onContextMenu(n),this.tableService.onSelectionChange(),r(),this.onContextMenuSelect.emit({originalEvent:e,data:n,index:e.rowIndex})}}}selectRange(e,n,i){let r,a;this.anchorRowIndex>n?(r=n,a=this.anchorRowIndex):this.anchorRowIndex<n?(r=this.anchorRowIndex,a=n):(r=n,a=n),this.lazy&&this.paginator&&(r-=this.first,a-=this.first);let s=[];for(let c=r;c<=a;c++){let u=this.filteredValue?this.filteredValue[c]:this.value[c];if(!this.isSelected(u)&&!i){if(!this.isRowSelectable(u,n))continue;s.push(u),this._selection=[...this.selection,u];let f=this.dataKey?String(Ee.resolveFieldData(u,this.dataKey)):null;f&&(this.selectionKeys[f]=1)}}this.selectionChange.emit(this.selection),this.onRowSelect.emit({originalEvent:e,data:s,type:"row"})}clearSelectionRange(e){let n,i,r=this.rangeRowIndex,a=this.anchorRowIndex;r>a?(n=this.anchorRowIndex,i=this.rangeRowIndex):r<a?(n=this.rangeRowIndex,i=this.anchorRowIndex):(n=this.rangeRowIndex,i=this.rangeRowIndex);for(let s=n;s<=i;s++){let c=this.value[s],u=this.findIndexInSelection(c);this._selection=this.selection.filter((g,C)=>C!=u);let f=this.dataKey?String(Ee.resolveFieldData(c,this.dataKey)):null;f&&delete this.selectionKeys[f],this.onRowUnselect.emit({originalEvent:e,data:c,type:"row"})}}isSelected(e){return e&&this.selection?this.dataKey?this.selectionKeys[Ee.resolveFieldData(e,this.dataKey)]!==void 0:Array.isArray(this.selection)?this.findIndexInSelection(e)>-1:this.equals(e,this.selection):!1}findIndexInSelection(e){let n=-1;if(this.selection&&this.selection.length){for(let i=0;i<this.selection.length;i++)if(this.equals(e,this.selection[i])){n=i;break}}return n}isRowSelectable(e,n){return!(this.rowSelectable&&!this.rowSelectable({data:e,index:n}))}toggleRowWithRadio(e,n){if(this.preventSelectionSetterPropagation=!0,this.selection!=n){if(!this.isRowSelectable(n,e.rowIndex))return;this._selection=n,this.selectionChange.emit(this.selection),this.onRowSelect.emit({originalEvent:e.originalEvent,index:e.rowIndex,data:n,type:"radiobutton"}),this.dataKey&&(this.selectionKeys={},this.selectionKeys[String(Ee.resolveFieldData(n,this.dataKey))]=1)}else this._selection=null,this.selectionChange.emit(this.selection),this.onRowUnselect.emit({originalEvent:e.originalEvent,index:e.rowIndex,data:n,type:"radiobutton"});this.tableService.onSelectionChange(),this.isStateful()&&this.saveState()}toggleRowWithCheckbox(e,n){this.selection=this.selection||[];let i=this.isSelected(n),r=this.dataKey?String(Ee.resolveFieldData(n,this.dataKey)):null;if(this.preventSelectionSetterPropagation=!0,i){let a=this.findIndexInSelection(n);this._selection=this.selection.filter((s,c)=>c!=a),this.selectionChange.emit(this.selection),this.onRowUnselect.emit({originalEvent:e.originalEvent,index:e.rowIndex,data:n,type:"checkbox"}),r&&delete this.selectionKeys[r]}else{if(!this.isRowSelectable(n,e.rowIndex))return;this._selection=this.selection?[...this.selection,n]:[n],this.selectionChange.emit(this.selection),this.onRowSelect.emit({originalEvent:e.originalEvent,index:e.rowIndex,data:n,type:"checkbox"}),r&&(this.selectionKeys[r]=1)}this.tableService.onSelectionChange(),this.isStateful()&&this.saveState()}toggleRowsWithCheckbox({originalEvent:e},n){if(this._selectAll!==null)this.selectAllChange.emit({originalEvent:e,checked:n});else{let i=this.selectionPageOnly?this.dataToRender(this.processedData):this.processedData,r=this.selectionPageOnly&&this._selection?this._selection.filter(a=>!i.some(s=>this.equals(a,s))):[];n&&(r=this.frozenValue?[...r,...this.frozenValue,...i]:[...r,...i],r=this.rowSelectable?r.filter((a,s)=>this.rowSelectable({data:a,index:s})):r),this._selection=r,this.preventSelectionSetterPropagation=!0,this.updateSelectionKeys(),this.selectionChange.emit(this._selection),this.tableService.onSelectionChange(),this.onHeaderCheckboxToggle.emit({originalEvent:e,checked:n}),this.isStateful()&&this.saveState()}}equals(e,n){return this.compareSelectionBy==="equals"?e===n:Ee.equals(e,n,this.dataKey)}filter(e,n,i){this.filterTimeout&&clearTimeout(this.filterTimeout),this.isFilterBlank(e)?this.filters[n]&&delete this.filters[n]:this.filters[n]={value:e,matchMode:i},this.filterTimeout=setTimeout(()=>{this._filter(),this.filterTimeout=null},this.filterDelay),this.anchorRowIndex=null}filterGlobal(e,n){this.filter(e,"global",n)}isFilterBlank(e){return e!=null?!!(typeof e=="string"&&e.trim().length==0||Array.isArray(e)&&e.length==0):!0}_filter(){if(this.restoringFilter||(this.first=0,this.firstChange.emit(this.first)),this.lazy)this.onLazyLoad.emit(this.createLazyLoadMetadata());else{if(!this.value)return;if(!this.hasFilter())this.filteredValue=null,this.paginator&&(this.totalRecords=this._totalRecords===0&&this.value?this.value.length:this._totalRecords);else{let e;if(this.filters.global){if(!this.columns&&!this.globalFilterFields)throw new Error("Global filtering requires dynamic columns or globalFilterFields to be defined.");e=this.globalFilterFields||this.columns}this.filteredValue=[];for(let n=0;n<this.value.length;n++){let i=!0,r=!1,a=!1;for(let c in this.filters)if(this.filters.hasOwnProperty(c)&&c!=="global"){a=!0;let u=c,f=this.filters[u];if(Array.isArray(f)){for(let g of f)if(i=this.executeLocalFilter(u,this.value[n],g),g.operator===Of.OR&&i||g.operator===Of.AND&&!i)break}else i=this.executeLocalFilter(u,this.value[n],f);if(!i)break}if(this.filters.global&&!r&&e)for(let c=0;c<e.length;c++){let u=e[c].field||e[c];if(r=this.filterService.filters[this.filters.global.matchMode](Ee.resolveFieldData(this.value[n],u),this.filters.global.value,this.filterLocale),r)break}let s;this.filters.global?s=a?a&&i&&r:r:s=a&&i,s&&this.filteredValue.push(this.value[n])}this.filteredValue.length===this.value.length&&(this.filteredValue=null),this.paginator&&(this.totalRecords=this.filteredValue?this.filteredValue.length:this._totalRecords===0&&this.value?this.value.length:this._totalRecords??0)}}this.onFilter.emit({filters:this.filters,filteredValue:this.filteredValue||this.value}),this.tableService.onValueChange(this.value),this.isStateful()&&!this.restoringFilter&&this.saveState(),this.restoringFilter&&(this.restoringFilter=!1),this.cd.markForCheck(),this.scrollable&&this.resetScrollTop()}executeLocalFilter(e,n,i){let r=i.value,a=i.matchMode||V0.STARTS_WITH,s=Ee.resolveFieldData(n,e),c=this.filterService.filters[a];return c(s,r,this.filterLocale)}hasFilter(){let e=!0;for(let n in this.filters)if(this.filters.hasOwnProperty(n)){e=!1;break}return!e}createLazyLoadMetadata(){return{first:this.first,rows:this.rows,sortField:this.sortField,sortOrder:this.sortOrder,filters:this.filters,globalFilter:this.filters&&this.filters.global?this.filters.global.value:null,multiSortMeta:this.multiSortMeta,forceUpdate:()=>this.cd.detectChanges()}}clear(){this._sortField=null,this._sortOrder=this.defaultSortOrder,this._multiSortMeta=null,this.tableService.onSort(null),this.clearFilterValues(),this.filteredValue=null,this.first=0,this.firstChange.emit(this.first),this.lazy?this.onLazyLoad.emit(this.createLazyLoadMetadata()):this.totalRecords=this._totalRecords===0&&this._value?this._value.length:this._totalRecords??0}clearFilterValues(){for(let[,e]of Object.entries(this.filters))if(Array.isArray(e))for(let n of e)n.value=null;else e&&(e.value=null)}reset(){this.clear()}getExportHeader(e){return e[this.exportHeader]||e.header||e.field}exportCSV(e){let n,i="",r=this.columns;e&&e.selectionOnly?n=this.selection||[]:e&&e.allValues?n=this.value||[]:(n=this.filteredValue||this.value,this.frozenValue&&(n=n?[...this.frozenValue,...n]:this.frozenValue));let a=r.filter(f=>f.exportable!==!1&&f.field);i+=a.map(f=>'"'+this.getExportHeader(f)+'"').join(this.csvSeparator);let s=n.map(f=>a.map(g=>{let C=Ee.resolveFieldData(f,g.field);return C!=null?this.exportFunction?C=this.exportFunction({data:C,field:g.field}):C=String(C).replace(/"/g,'""'):C="",'"'+C+'"'}).join(this.csvSeparator)).join(`
1815
+ `);s.length&&(i+=`
1816
+ `+s);let c=new Blob([new Uint8Array([239,187,191]),i],{type:"text/csv;charset=utf-8;"}),u=this.renderer.createElement("a");u.style.display="none",this.renderer.appendChild(this.document.body,u),u.download!==void 0?(u.setAttribute("href",URL.createObjectURL(c)),u.setAttribute("download",this.exportFilename+".csv"),u.click()):(i="data:text/csv;charset=utf-8,"+i,this.document.defaultView?.open(encodeURI(i))),this.renderer.removeChild(this.document.body,u)}onLazyItemLoad(e){this.onLazyLoad.emit(zt(be(be({},this.createLazyLoadMetadata()),e),{rows:e.last-e.first}))}resetScrollTop(){this.virtualScroll?this.scrollToVirtualIndex(0):this.scrollTo({top:0})}scrollToVirtualIndex(e){this.scroller&&this.scroller.scrollToIndex(e)}scrollTo(e){this.virtualScroll?this.scroller?.scrollTo(e):this.wrapperViewChild&&this.wrapperViewChild.nativeElement&&(this.wrapperViewChild.nativeElement.scrollTo?this.wrapperViewChild.nativeElement.scrollTo(e):(this.wrapperViewChild.nativeElement.scrollLeft=e.left,this.wrapperViewChild.nativeElement.scrollTop=e.top))}updateEditingCell(e,n,i,r){this.editingCell=e,this.editingCellData=n,this.editingCellField=i,this.editingCellRowIndex=r,this.bindDocumentEditListener()}isEditingCellValid(){return this.editingCell&&Se.find(this.editingCell,".ng-invalid.ng-dirty").length===0}bindDocumentEditListener(){this.documentEditListener||(this.documentEditListener=this.renderer.listen(this.document,"click",e=>{this.editingCell&&!this.selfClick&&this.isEditingCellValid()&&(!this.$unstyled()&&Se.removeClass(this.editingCell,"p-cell-editing"),fr(this.editingCell,"data-p-cell-editing","false"),this.editingCell=null,this.onEditComplete.emit({field:this.editingCellField,data:this.editingCellData,originalEvent:e,index:this.editingCellRowIndex}),this.editingCellField=null,this.editingCellData=null,this.editingCellRowIndex=null,this.unbindDocumentEditListener(),this.cd.markForCheck(),this.overlaySubscription&&this.overlaySubscription.unsubscribe()),this.selfClick=!1}))}unbindDocumentEditListener(){this.documentEditListener&&(this.documentEditListener(),this.documentEditListener=null)}initRowEdit(e){let n=String(Ee.resolveFieldData(e,this.dataKey));this.editingRowKeys[n]=!0}saveRowEdit(e,n){if(Se.find(n,".ng-invalid.ng-dirty").length===0){let i=String(Ee.resolveFieldData(e,this.dataKey));delete this.editingRowKeys[i]}}cancelRowEdit(e){let n=String(Ee.resolveFieldData(e,this.dataKey));delete this.editingRowKeys[n]}toggleRow(e,n){if(!this.dataKey&&!this.groupRowsBy)throw new Error("dataKey or groupRowsBy must be defined to use row expansion");let i=this.groupRowsBy?String(Ee.resolveFieldData(e,this.groupRowsBy)):String(Ee.resolveFieldData(e,this.dataKey));this.expandedRowKeys[i]!=null?(delete this.expandedRowKeys[i],this.onRowCollapse.emit({originalEvent:n,data:e})):(this.rowExpandMode==="single"&&(this.expandedRowKeys={}),this.expandedRowKeys[i]=!0,this.onRowExpand.emit({originalEvent:n,data:e})),n&&n.preventDefault(),this.isStateful()&&this.saveState()}isRowExpanded(e){return this.groupRowsBy?this.expandedRowKeys[String(Ee.resolveFieldData(e,this.groupRowsBy))]===!0:this.expandedRowKeys[String(Ee.resolveFieldData(e,this.dataKey))]===!0}isRowEditing(e){return this.editingRowKeys[String(Ee.resolveFieldData(e,this.dataKey))]===!0}isSingleSelectionMode(){return this.selectionMode==="single"}isMultipleSelectionMode(){return this.selectionMode==="multiple"}onColumnResizeBegin(e){let n=Se.getOffset(this.el?.nativeElement).left;this.resizeColumnElement=e.target.closest("th"),this.columnResizing=!0,e.type=="touchstart"?this.lastResizerHelperX=e.changedTouches[0].clientX-n+this.el?.nativeElement.scrollLeft:this.lastResizerHelperX=e.pageX-n+this.el?.nativeElement.scrollLeft,this.onColumnResize(e),e.preventDefault()}onColumnResize(e){let n=Se.getOffset(this.el?.nativeElement).left;!this.$unstyled()&&Se.addClass(this.el?.nativeElement,"p-unselectable-text"),this.resizeHelperViewChild.nativeElement.style.height=this.el?.nativeElement.offsetHeight+"px",this.resizeHelperViewChild.nativeElement.style.top="0px",e.type=="touchmove"?this.resizeHelperViewChild.nativeElement.style.left=e.changedTouches[0].clientX-n+this.el?.nativeElement.scrollLeft+"px":this.resizeHelperViewChild.nativeElement.style.left=e.pageX-n+this.el?.nativeElement.scrollLeft+"px",this.resizeHelperViewChild.nativeElement.style.display="block"}onColumnResizeEnd(){let e=getComputedStyle(this.el?.nativeElement??document.documentElement).direction==="rtl",n=this.resizeHelperViewChild?.nativeElement.offsetLeft-this.lastResizerHelperX,i=e?-n:n,a=this.resizeColumnElement.offsetWidth+i,s=this.resizeColumnElement.style.minWidth.replace(/[^\d.]/g,""),c=s?parseFloat(s):15;if(a>=c){if(this.columnResizeMode==="fit"){let f=this.resizeColumnElement.nextElementSibling.offsetWidth-i;a>15&&f>15&&this.resizeTableCells(a,f)}else if(this.columnResizeMode==="expand"){this._initialColWidths=this._totalTableWidth();let u=this.tableViewChild?.nativeElement.offsetWidth+i;this.setResizeTableWidth(u+"px"),this.resizeTableCells(a,null)}this.onColResize.emit({element:this.resizeColumnElement,delta:i}),this.isStateful()&&this.saveState()}this.resizeHelperViewChild.nativeElement.style.display="none",Se.removeClass(this.el?.nativeElement,"p-unselectable-text")}_totalTableWidth(){let e=[],n=Se.findSingle(this.el.nativeElement,'[data-pc-section="thead"]');return Se.find(n,"tr > th").forEach(r=>e.push(Se.getOuterWidth(r))),e}onColumnDragStart(e,n){this.reorderIconWidth=Se.getHiddenElementOuterWidth(this.reorderIndicatorUpViewChild?.nativeElement),this.reorderIconHeight=Se.getHiddenElementOuterHeight(this.reorderIndicatorDownViewChild?.nativeElement),this.draggedColumn=n,e.dataTransfer.setData("text","b")}onColumnDragEnter(e,n){if(this.reorderableColumns&&this.draggedColumn&&n){e.preventDefault();let i=Se.getOffset(this.el?.nativeElement),r=Se.getOffset(n);if(this.draggedColumn!=n){let a=Se.indexWithinGroup(this.draggedColumn,"preorderablecolumn"),s=Se.indexWithinGroup(n,"preorderablecolumn"),c=r.left-i.left,u=i.top-r.top,f=r.left+n.offsetWidth/2;this.reorderIndicatorUpViewChild.nativeElement.style.top=r.top-i.top-(this.reorderIconHeight-1)+"px",this.reorderIndicatorDownViewChild.nativeElement.style.top=r.top-i.top+n.offsetHeight+"px",e.pageX>f?(this.reorderIndicatorUpViewChild.nativeElement.style.left=c+n.offsetWidth-Math.ceil(this.reorderIconWidth/2)+"px",this.reorderIndicatorDownViewChild.nativeElement.style.left=c+n.offsetWidth-Math.ceil(this.reorderIconWidth/2)+"px",this.dropPosition=1):(this.reorderIndicatorUpViewChild.nativeElement.style.left=c-Math.ceil(this.reorderIconWidth/2)+"px",this.reorderIndicatorDownViewChild.nativeElement.style.left=c-Math.ceil(this.reorderIconWidth/2)+"px",this.dropPosition=-1),this.reorderIndicatorUpViewChild.nativeElement.style.display="block",this.reorderIndicatorDownViewChild.nativeElement.style.display="block"}else e.dataTransfer.dropEffect="none"}}onColumnDragLeave(e){this.reorderableColumns&&this.draggedColumn&&e.preventDefault()}onColumnDrop(e,n){if(e.preventDefault(),this.draggedColumn){let i=Se.indexWithinGroup(this.draggedColumn,"preorderablecolumn"),r=Se.indexWithinGroup(n,"preorderablecolumn"),a=i!=r;if(a&&(r-i==1&&this.dropPosition===-1||i-r==1&&this.dropPosition===1)&&(a=!1),a&&r<i&&this.dropPosition===1&&(r=r+1),a&&r>i&&this.dropPosition===-1&&(r=r-1),a&&(Ee.reorderArray(this.columns,i,r),this.onColReorder.emit({dragIndex:i,dropIndex:r,columns:this.columns}),this.isStateful()&&this.zone.runOutsideAngular(()=>{setTimeout(()=>{this.saveState()})})),this.resizableColumns&&this.resizeColumnElement){let s=this.columnResizeMode==="expand"?this._initialColWidths:this._totalTableWidth();Ee.reorderArray(s,i+1,r+1),this.updateStyleElement(s,i,0,0)}this.reorderIndicatorUpViewChild.nativeElement.style.display="none",this.reorderIndicatorDownViewChild.nativeElement.style.display="none",this.draggedColumn.draggable=!1,this.draggedColumn=null,this.dropPosition=null}}resizeTableCells(e,n){let i=Se.index(this.resizeColumnElement),r=this.columnResizeMode==="expand"?this._initialColWidths:this._totalTableWidth();this.updateStyleElement(r,i,e,n)}updateStyleElement(e,n,i,r){this.destroyStyleElement(),this.createStyleElement();let a="";e.forEach((s,c)=>{let u=c===n?i:r&&c===n+1?r:s,f=`width: ${u}px !important; max-width: ${u}px !important;`;a+=`
1817
+ #${this.id}-table > .p-datatable-thead > tr > th:nth-child(${c+1}),
1818
+ #${this.id}-table > .p-datatable-tbody > tr > td:nth-child(${c+1}),
1819
+ #${this.id}-table > .p-datatable-tfoot > tr > td:nth-child(${c+1}) {
1820
+ ${f}
1821
+ }
1822
+ `}),this.renderer.setProperty(this.styleElement,"innerHTML",a)}onRowDragStart(e,n){this.rowDragging=!0,this.draggedRowIndex=n,e.dataTransfer.setData("text","b")}onRowDragOver(e,n,i){if(this.rowDragging&&this.draggedRowIndex!==n){let r=Se.getOffset(i).top,a=e.pageY,s=r+Se.getOuterHeight(i)/2,c=i.previousElementSibling;a<s?(Se.removeClass(i,"p-datatable-dragpoint-bottom"),this.droppedRowIndex=n,c&&!this.$unstyled()?Se.addClass(c,"p-datatable-dragpoint-bottom"):!this.$unstyled()&&Se.addClass(i,"p-datatable-dragpoint-top")):(c&&!this.$unstyled()?Se.removeClass(c,"p-datatable-dragpoint-bottom"):!this.$unstyled()&&Se.addClass(i,"p-datatable-dragpoint-top"),this.droppedRowIndex=n+1,!this.$unstyled()&&Se.addClass(i,"p-datatable-dragpoint-bottom"))}}onRowDragLeave(e,n){let i=n.previousElementSibling;i&&!this.$unstyled()&&Se.removeClass(i,"p-datatable-dragpoint-bottom"),!this.$unstyled()&&Se.removeClass(n,"p-datatable-dragpoint-bottom"),!this.$unstyled()&&Se.removeClass(n,"p-datatable-dragpoint-top")}onRowDragEnd(e){this.rowDragging=!1,this.draggedRowIndex=null,this.droppedRowIndex=null}onRowDrop(e,n){if(this.droppedRowIndex!=null){let i=this.draggedRowIndex>this.droppedRowIndex?this.droppedRowIndex:this.droppedRowIndex===0?0:this.droppedRowIndex-1;Ee.reorderArray(this.value,this.draggedRowIndex,i),this.virtualScroll&&(this._value=[...this._value]),this.onRowReorder.emit({dragIndex:this.draggedRowIndex,dropIndex:i})}this.onRowDragLeave(e,n),this.onRowDragEnd(e)}isEmpty(){let e=this.filteredValue||this.value;return e==null||e.length==0}getBlockableElement(){return this.el.nativeElement.children[0]}getStorage(){if(jt(this.platformId))switch(this.stateStorage){case"local":return window.localStorage;case"session":return window.sessionStorage;default:throw new Error(this.stateStorage+' is not a valid value for the state storage, supported values are "local" and "session".')}else throw new Error("Browser storage is not available in the server side.")}isStateful(){return this.stateKey!=null}saveState(){let e=this.getStorage(),n={};this.paginator&&(n.first=this.first,n.rows=this.rows),this.sortField&&(n.sortField=this.sortField,n.sortOrder=this.sortOrder),this.multiSortMeta&&(n.multiSortMeta=this.multiSortMeta),this.hasFilter()&&(n.filters=this.filters),this.resizableColumns&&this.saveColumnWidths(n),this.reorderableColumns&&this.saveColumnOrder(n),this.selection&&(n.selection=this.selection),Object.keys(this.expandedRowKeys).length&&(n.expandedRowKeys=this.expandedRowKeys),e.setItem(this.stateKey,JSON.stringify(n)),this.onStateSave.emit(n)}clearState(){let e=this.getStorage();this.stateKey&&e.removeItem(this.stateKey)}restoreState(){let n=this.getStorage().getItem(this.stateKey),i=/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z/,r=function(a,s){return typeof s=="string"&&i.test(s)?new Date(s):s};if(n){let a=JSON.parse(n,r);this.paginator&&(this.first!==void 0&&(this.first=a.first,this.firstChange.emit(this.first)),this.rows!==void 0&&(this.rows=a.rows,this.rowsChange.emit(this.rows))),a.sortField&&(this.restoringSort=!0,this._sortField=a.sortField,this._sortOrder=a.sortOrder),a.multiSortMeta&&(this.restoringSort=!0,this._multiSortMeta=a.multiSortMeta),a.filters&&(this.restoringFilter=!0,this.filters=a.filters),this.resizableColumns&&(this.columnWidthsState=a.columnWidths,this.tableWidthState=a.tableWidth),a.expandedRowKeys&&(this.expandedRowKeys=a.expandedRowKeys),a.selection&&Promise.resolve(null).then(()=>this.selectionChange.emit(a.selection)),this.stateRestored=!0,this.onStateRestore.emit(a)}}saveColumnWidths(e){let n=[],i=[],r=this.el?.nativeElement;r&&(i=Se.find(r,'[data-pc-section="thead"] > tr > th')),i.forEach(a=>n.push(Se.getOuterWidth(a))),e.columnWidths=n.join(","),this.columnResizeMode==="expand"&&this.tableViewChild&&(e.tableWidth=Se.getOuterWidth(this.tableViewChild.nativeElement))}setResizeTableWidth(e){this.tableViewChild.nativeElement.style.width=e,this.tableViewChild.nativeElement.style.minWidth=e}restoreColumnWidths(){if(this.columnWidthsState){let e=this.columnWidthsState.split(",");if(this.columnResizeMode==="expand"&&this.tableWidthState&&this.setResizeTableWidth(this.tableWidthState+"px"),Ee.isNotEmpty(e)){this.createStyleElement();let n="";e.forEach((i,r)=>{let a=`width: ${i}px !important; max-width: ${i}px !important`;n+=`
1823
+ #${this.id}-table > .p-datatable-thead > tr > th:nth-child(${r+1}),
1824
+ #${this.id}-table > .p-datatable-tbody > tr > td:nth-child(${r+1}),
1825
+ #${this.id}-table > .p-datatable-tfoot > tr > td:nth-child(${r+1}) {
1826
+ ${a}
1827
+ }
1828
+ `}),this.styleElement.innerHTML=n}}}saveColumnOrder(e){if(this.columns){let n=[];this.columns.map(i=>{n.push(i.field||i.key)}),e.columnOrder=n}}restoreColumnOrder(){let n=this.getStorage().getItem(this.stateKey);if(n){let r=JSON.parse(n).columnOrder;if(r){let a=[];r.map(s=>{let c=this.findColumnByKey(s);c&&a.push(c)}),this.columnOrderStateRestored=!0,this.columns=a}}}findColumnByKey(e){if(this.columns){for(let n of this.columns)if(n.key===e||n.field===e)return n}else return null}createStyleElement(){this.styleElement=this.renderer.createElement("style"),this.styleElement.type="text/css",Se.setAttribute(this.styleElement,"nonce",this.config?.csp()?.nonce),this.renderer.appendChild(this.document.head,this.styleElement),Se.setAttribute(this.styleElement,"nonce",this.config?.csp()?.nonce)}getGroupRowsMeta(){return{field:this.groupRowsBy,order:this.groupRowsByOrder}}createResponsiveStyle(){if(jt(this.platformId)&&!this.responsiveStyleElement){this.responsiveStyleElement=this.renderer.createElement("style"),this.responsiveStyleElement.type="text/css",Se.setAttribute(this.responsiveStyleElement,"nonce",this.config?.csp()?.nonce),this.renderer.appendChild(this.document.head,this.responsiveStyleElement);let e=`
1829
+ @media screen and (max-width: ${this.breakpoint}) {
1830
+ #${this.id}-table > .p-datatable-thead > tr > th,
1831
+ #${this.id}-table > .p-datatable-tfoot > tr > td {
1832
+ display: none !important;
1833
+ }
1834
+
1835
+ #${this.id}-table > .p-datatable-tbody > tr > td {
1836
+ display: flex;
1837
+ width: 100% !important;
1838
+ align-items: center;
1839
+ justify-content: space-between;
1840
+ }
1841
+
1842
+ #${this.id}-table > .p-datatable-tbody > tr > td:not(:last-child) {
1843
+ border: 0 none;
1844
+ }
1845
+
1846
+ #${this.id}.p-datatable-gridlines > .p-datatable-table-container > .p-datatable-table > .p-datatable-tbody > tr > td:last-child {
1847
+ border-top: 0;
1848
+ border-right: 0;
1849
+ border-left: 0;
1850
+ }
1851
+
1852
+ #${this.id}-table > .p-datatable-tbody > tr > td > .p-datatable-column-title {
1853
+ display: block;
1854
+ }
1855
+ }
1856
+ `;this.renderer.setProperty(this.responsiveStyleElement,"innerHTML",e),Se.setAttribute(this.responsiveStyleElement,"nonce",this.config?.csp()?.nonce)}}destroyResponsiveStyle(){this.responsiveStyleElement&&(this.renderer.removeChild(this.document.head,this.responsiveStyleElement),this.responsiveStyleElement=null)}destroyStyleElement(){this.styleElement&&(this.renderer.removeChild(this.document.head,this.styleElement),this.styleElement=null)}ngAfterViewChecked(){this.bindDirectiveInstance.setAttrs(this.ptms(["host","root"]))}onDestroy(){this.unbindDocumentEditListener(),this.editingCell=null,this.initialized=null,this.destroyStyleElement(),this.destroyResponsiveStyle()}get dataP(){return this.cn({scrollable:this.scrollable,"flex-scrollable":this.scrollable&&this.scrollHeight==="flex",[this.size]:this.size,loading:this.loading,empty:this.isEmpty()})}static \u0275fac=(()=>{let e;return function(i){return(e||(e=G(t)))(i||t)}})();static \u0275cmp=z({type:t,selectors:[["p-table"]],contentQueries:function(n,i,r){if(n&1&&Qt(r,E4,4)(r,M4,4)(r,D4,4)(r,P4,4)(r,R4,4)(r,O4,4)(r,F4,4)(r,N4,4)(r,A4,4)(r,L4,4)(r,B4,4)(r,V4,4)(r,z4,4)(r,H4,4)(r,q4,4)(r,G4,4)(r,j4,4)(r,U4,4)(r,$4,4)(r,W4,4)(r,K4,4)(r,Y4,4)(r,X4,4)(r,Z4,4)(r,Q4,4)(r,J4,4)(r,eN,4)(r,tN,4)(r,nN,4)(r,iN,4)(r,oN,4)(r,rN,4)(r,bt,4),n&2){let a;Q(a=J())&&(i._headerTemplate=a.first),Q(a=J())&&(i._headerGroupedTemplate=a.first),Q(a=J())&&(i._bodyTemplate=a.first),Q(a=J())&&(i._loadingBodyTemplate=a.first),Q(a=J())&&(i._captionTemplate=a.first),Q(a=J())&&(i._footerTemplate=a.first),Q(a=J())&&(i._footerGroupedTemplate=a.first),Q(a=J())&&(i._summaryTemplate=a.first),Q(a=J())&&(i._colGroupTemplate=a.first),Q(a=J())&&(i._expandedRowTemplate=a.first),Q(a=J())&&(i._groupHeaderTemplate=a.first),Q(a=J())&&(i._groupFooterTemplate=a.first),Q(a=J())&&(i._frozenExpandedRowTemplate=a.first),Q(a=J())&&(i._frozenHeaderTemplate=a.first),Q(a=J())&&(i._frozenBodyTemplate=a.first),Q(a=J())&&(i._frozenFooterTemplate=a.first),Q(a=J())&&(i._frozenColGroupTemplate=a.first),Q(a=J())&&(i._emptyMessageTemplate=a.first),Q(a=J())&&(i._paginatorLeftTemplate=a.first),Q(a=J())&&(i._paginatorRightTemplate=a.first),Q(a=J())&&(i._paginatorDropdownItemTemplate=a.first),Q(a=J())&&(i._loadingIconTemplate=a.first),Q(a=J())&&(i._reorderIndicatorUpIconTemplate=a.first),Q(a=J())&&(i._reorderIndicatorDownIconTemplate=a.first),Q(a=J())&&(i._sortIconTemplate=a.first),Q(a=J())&&(i._checkboxIconTemplate=a.first),Q(a=J())&&(i._headerCheckboxIconTemplate=a.first),Q(a=J())&&(i._paginatorDropdownIconTemplate=a.first),Q(a=J())&&(i._paginatorFirstPageLinkIconTemplate=a.first),Q(a=J())&&(i._paginatorLastPageLinkIconTemplate=a.first),Q(a=J())&&(i._paginatorPreviousPageLinkIconTemplate=a.first),Q(a=J())&&(i._paginatorNextPageLinkIconTemplate=a.first),Q(a=J())&&(i._templates=a)}},viewQuery:function(n,i){if(n&1&&Tn(aN,5)(sN,5)(lN,5)(cN,5)(dN,5)(uN,5)(pN,5)(hN,5),n&2){let r;Q(r=J())&&(i.resizeHelperViewChild=r.first),Q(r=J())&&(i.reorderIndicatorUpViewChild=r.first),Q(r=J())&&(i.reorderIndicatorDownViewChild=r.first),Q(r=J())&&(i.wrapperViewChild=r.first),Q(r=J())&&(i.tableViewChild=r.first),Q(r=J())&&(i.tableHeaderViewChild=r.first),Q(r=J())&&(i.tableFooterViewChild=r.first),Q(r=J())&&(i.scroller=r.first)}},hostVars:3,hostBindings:function(n,i){n&2&&(O("data-p",i.dataP),H(i.cn(i.cx("root"),i.styleClass)))},inputs:{frozenColumns:"frozenColumns",frozenValue:"frozenValue",styleClass:"styleClass",tableStyle:"tableStyle",tableStyleClass:"tableStyleClass",paginator:[2,"paginator","paginator",j],pageLinks:[2,"pageLinks","pageLinks",xe],rowsPerPageOptions:"rowsPerPageOptions",alwaysShowPaginator:[2,"alwaysShowPaginator","alwaysShowPaginator",j],paginatorPosition:"paginatorPosition",paginatorStyleClass:"paginatorStyleClass",paginatorDropdownAppendTo:"paginatorDropdownAppendTo",paginatorDropdownScrollHeight:"paginatorDropdownScrollHeight",currentPageReportTemplate:"currentPageReportTemplate",showCurrentPageReport:[2,"showCurrentPageReport","showCurrentPageReport",j],showJumpToPageDropdown:[2,"showJumpToPageDropdown","showJumpToPageDropdown",j],showJumpToPageInput:[2,"showJumpToPageInput","showJumpToPageInput",j],showFirstLastIcon:[2,"showFirstLastIcon","showFirstLastIcon",j],showPageLinks:[2,"showPageLinks","showPageLinks",j],defaultSortOrder:[2,"defaultSortOrder","defaultSortOrder",xe],sortMode:"sortMode",resetPageOnSort:[2,"resetPageOnSort","resetPageOnSort",j],selectionMode:"selectionMode",selectionPageOnly:[2,"selectionPageOnly","selectionPageOnly",j],contextMenuSelection:"contextMenuSelection",contextMenuSelectionMode:"contextMenuSelectionMode",dataKey:"dataKey",metaKeySelection:[2,"metaKeySelection","metaKeySelection",j],rowSelectable:"rowSelectable",rowTrackBy:"rowTrackBy",lazy:[2,"lazy","lazy",j],lazyLoadOnInit:[2,"lazyLoadOnInit","lazyLoadOnInit",j],compareSelectionBy:"compareSelectionBy",csvSeparator:"csvSeparator",exportFilename:"exportFilename",filters:"filters",globalFilterFields:"globalFilterFields",filterDelay:[2,"filterDelay","filterDelay",xe],filterLocale:"filterLocale",expandedRowKeys:"expandedRowKeys",editingRowKeys:"editingRowKeys",rowExpandMode:"rowExpandMode",scrollable:[2,"scrollable","scrollable",j],rowGroupMode:"rowGroupMode",scrollHeight:"scrollHeight",virtualScroll:[2,"virtualScroll","virtualScroll",j],virtualScrollItemSize:[2,"virtualScrollItemSize","virtualScrollItemSize",xe],virtualScrollOptions:"virtualScrollOptions",virtualScrollDelay:[2,"virtualScrollDelay","virtualScrollDelay",xe],frozenWidth:"frozenWidth",contextMenu:"contextMenu",resizableColumns:[2,"resizableColumns","resizableColumns",j],columnResizeMode:"columnResizeMode",reorderableColumns:[2,"reorderableColumns","reorderableColumns",j],loading:[2,"loading","loading",j],loadingIcon:"loadingIcon",showLoader:[2,"showLoader","showLoader",j],rowHover:[2,"rowHover","rowHover",j],customSort:[2,"customSort","customSort",j],showInitialSortBadge:[2,"showInitialSortBadge","showInitialSortBadge",j],exportFunction:"exportFunction",exportHeader:"exportHeader",stateKey:"stateKey",stateStorage:"stateStorage",editMode:"editMode",groupRowsBy:"groupRowsBy",size:"size",showGridlines:[2,"showGridlines","showGridlines",j],stripedRows:[2,"stripedRows","stripedRows",j],groupRowsByOrder:[2,"groupRowsByOrder","groupRowsByOrder",xe],responsiveLayout:"responsiveLayout",breakpoint:"breakpoint",paginatorLocale:"paginatorLocale",value:"value",columns:"columns",first:"first",rows:"rows",totalRecords:"totalRecords",sortField:"sortField",sortOrder:"sortOrder",multiSortMeta:"multiSortMeta",selection:"selection",selectAll:"selectAll"},outputs:{contextMenuSelectionChange:"contextMenuSelectionChange",selectAllChange:"selectAllChange",selectionChange:"selectionChange",onRowSelect:"onRowSelect",onRowUnselect:"onRowUnselect",onPage:"onPage",onSort:"onSort",onFilter:"onFilter",onLazyLoad:"onLazyLoad",onRowExpand:"onRowExpand",onRowCollapse:"onRowCollapse",onContextMenuSelect:"onContextMenuSelect",onColResize:"onColResize",onColReorder:"onColReorder",onRowReorder:"onRowReorder",onEditInit:"onEditInit",onEditComplete:"onEditComplete",onEditCancel:"onEditCancel",onHeaderCheckboxToggle:"onHeaderCheckboxToggle",sortFunction:"sortFunction",firstChange:"firstChange",rowsChange:"rowsChange",onStateSave:"onStateSave",onStateRestore:"onStateRestore"},standalone:!1,features:[we([Wf,$f,{provide:a5,useExisting:t},{provide:kt,useExisting:t}]),wt([Ie]),Z],decls:14,vars:15,consts:[["wrapper",""],["buildInTable",""],["scroller",""],["content",""],["table",""],["thead",""],["tfoot",""],["resizeHelper",""],["reorderIndicatorUp",""],["reorderIndicatorDown",""],[3,"class","pBind",4,"ngIf"],[3,"rows","first","totalRecords","pageLinkSize","alwaysShow","rowsPerPageOptions","templateLeft","templateRight","appendTo","dropdownScrollHeight","currentPageReportTemplate","showFirstLastIcon","dropdownItemTemplate","showCurrentPageReport","showJumpToPageDropdown","showJumpToPageInput","showPageLinks","styleClass","locale","pt","unstyled","onPageChange",4,"ngIf"],[3,"ngStyle","pBind"],[3,"items","columns","style","scrollHeight","itemSize","step","delay","inline","autoSize","lazy","loaderDisabled","showSpacer","showLoader","options","pt","onLazyLoad",4,"ngIf"],[4,"ngIf"],[3,"ngClass","pBind",4,"ngIf"],[3,"ngClass","pBind","display",4,"ngIf"],[3,"pBind"],["data-p-icon","spinner",3,"spin","class","pBind",4,"ngIf"],["data-p-icon","spinner",3,"spin","pBind"],[4,"ngTemplateOutlet"],[3,"onPageChange","rows","first","totalRecords","pageLinkSize","alwaysShow","rowsPerPageOptions","templateLeft","templateRight","appendTo","dropdownScrollHeight","currentPageReportTemplate","showFirstLastIcon","dropdownItemTemplate","showCurrentPageReport","showJumpToPageDropdown","showJumpToPageInput","showPageLinks","styleClass","locale","pt","unstyled"],["pTemplate","dropdownicon"],["pTemplate","firstpagelinkicon"],["pTemplate","previouspagelinkicon"],["pTemplate","lastpagelinkicon"],["pTemplate","nextpagelinkicon"],[3,"onLazyLoad","items","columns","scrollHeight","itemSize","step","delay","inline","autoSize","lazy","loaderDisabled","showSpacer","showLoader","options","pt"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["role","table",3,"pBind"],["role","rowgroup",3,"ngStyle","pBind"],["role","rowgroup",3,"class","pBind","value","frozenRows","pTableBody","pTableBodyTemplate","unstyled","frozen",4,"ngIf"],["role","rowgroup",3,"pBind","value","pTableBody","pTableBodyTemplate","scrollerOptions","unstyled"],["role","rowgroup",3,"style","class","pBind",4,"ngIf"],["role","rowgroup",3,"ngClass","ngStyle","pBind",4,"ngIf"],["role","rowgroup",3,"pBind","value","frozenRows","pTableBody","pTableBodyTemplate","unstyled","frozen"],["role","rowgroup",3,"pBind"],["role","rowgroup",3,"ngClass","ngStyle","pBind"],[3,"ngClass","pBind"],["data-p-icon","arrow-down",3,"pBind",4,"ngIf"],["data-p-icon","arrow-down",3,"pBind"],["data-p-icon","arrow-up",3,"pBind",4,"ngIf"],["data-p-icon","arrow-up",3,"pBind"]],template:function(n,i){n&1&&(I(0,xN,3,5,"div",10)(1,TN,2,4,"div",10)(2,zN,6,26,"p-paginator",11),h(3,"div",12,0),I(5,GN,4,18,"p-scroller",13)(6,UN,2,7,"ng-container",14)(7,QN,10,32,"ng-template",null,1,We),_(),I(9,fA,6,26,"p-paginator",11)(10,_A,2,3,"div",15)(11,gA,2,4,"div",16)(12,CA,4,6,"span",16)(13,SA,4,6,"span",16)),n&2&&(m("ngIf",i.loading&&i.showLoader),l(),m("ngIf",i.captionTemplate||i._captionTemplate),l(),m("ngIf",i.paginator&&(i.paginatorPosition==="top"||i.paginatorPosition=="both")),l(),H(i.cx("tableContainer")),m("ngStyle",i.sx("tableContainer"))("pBind",i.ptm("tableContainer")),O("data-p",i.dataP),l(2),m("ngIf",i.virtualScroll),l(),m("ngIf",!i.virtualScroll),l(3),m("ngIf",i.paginator&&(i.paginatorPosition==="bottom"||i.paginatorPosition=="both")),l(),m("ngIf",i.summaryTemplate||i._summaryTemplate),l(),m("ngIf",i.resizableColumns),l(),m("ngIf",i.reorderableColumns),l(),m("ngIf",i.reorderableColumns))},dependencies:()=>[Kn,gn,Mt,Yn,jf,bt,ob,zf,Hf,Nf,Ie,s5],encapsulation:2})}return t})(),s5=(()=>{class t extends Bn{dataTable;tableService;hostName="Table";columns;template;get value(){return this._value}set value(e){this._value=e,this.frozenRows&&this.updateFrozenRowStickyPosition(),this.dataTable.scrollable&&this.dataTable.rowGroupMode==="subheader"&&this.updateFrozenRowGroupHeaderStickyPosition()}frozen;frozenRows;scrollerOptions;subscription;_value;onAfterViewInit(){this.frozenRows&&this.updateFrozenRowStickyPosition(),this.dataTable.scrollable&&this.dataTable.rowGroupMode==="subheader"&&this.updateFrozenRowGroupHeaderStickyPosition()}constructor(e,n){super(),this.dataTable=e,this.tableService=n,this.subscription=this.dataTable.tableService.valueSource$.subscribe(()=>{this.dataTable.virtualScroll&&this.cd.detectChanges()})}shouldRenderRowGroupHeader(e,n,i){let r=Ee.resolveFieldData(n,this.dataTable?.groupRowsBy||""),a=e[i-(this.dataTable?._first||0)-1];if(a){let s=Ee.resolveFieldData(a,this.dataTable?.groupRowsBy||"");return r!==s}else return!0}shouldRenderRowGroupFooter(e,n,i){let r=Ee.resolveFieldData(n,this.dataTable?.groupRowsBy||""),a=e[i-(this.dataTable?._first||0)+1];if(a){let s=Ee.resolveFieldData(a,this.dataTable?.groupRowsBy||"");return r!==s}else return!0}shouldRenderRowspan(e,n,i){let r=Ee.resolveFieldData(n,this.dataTable?.groupRowsBy),a=e[i-1];if(a){let s=Ee.resolveFieldData(a,this.dataTable?.groupRowsBy||"");return r!==s}else return!0}calculateRowGroupSize(e,n,i){let r=Ee.resolveFieldData(n,this.dataTable?.groupRowsBy),a=r,s=0;for(;r===a;){s++;let c=e[++i];if(c)a=Ee.resolveFieldData(c,this.dataTable?.groupRowsBy||"");else break}return s===1?null:s}onDestroy(){this.subscription&&this.subscription.unsubscribe()}updateFrozenRowStickyPosition(){this.el.nativeElement.style.top=Se.getOuterHeight(this.el.nativeElement.previousElementSibling)+"px"}updateFrozenRowGroupHeaderStickyPosition(){if(this.el.nativeElement.previousElementSibling){let e=Se.getOuterHeight(this.el.nativeElement.previousElementSibling);this.dataTable.rowGroupHeaderStyleObject.top=e+"px"}}getScrollerOption(e,n){return this.dataTable.virtualScroll?(n=n||this.scrollerOptions,n?n[e]:null):null}getRowIndex(e){let n=this.dataTable.paginator?this.dataTable.first+e:e,i=this.getScrollerOption("getItemOptions");return i?i(n).index:n}get dataP(){return this.cn({hoverable:this.dataTable.rowHover||this.dataTable.selectionMode,frozen:this.frozen})}static \u0275fac=function(n){return new(n||t)(fn(Yf),fn(Wf))};static \u0275cmp=z({type:t,selectors:[["","pTableBody",""]],hostVars:1,hostBindings:function(n,i){n&2&&O("data-p",i.dataP)},inputs:{columns:[0,"pTableBody","columns"],template:[0,"pTableBodyTemplate","template"],value:"value",frozen:[2,"frozen","frozen",j],frozenRows:[2,"frozenRows","frozenRows",j],scrollerOptions:"scrollerOptions"},standalone:!1,features:[Z],attrs:kA,decls:5,vars:5,consts:[[4,"ngIf"],["ngFor","",3,"ngForOf","ngForTrackBy"],["role","row",4,"ngIf"],["role","row"],[4,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(n,i){n&1&&I(0,LA,2,2,"ng-container",0)(1,WA,2,2,"ng-container",0)(2,QA,2,2,"ng-container",0)(3,e5,2,5,"ng-container",0)(4,n5,2,5,"ng-container",0),n&2&&(m("ngIf",!i.dataTable.expandedRowTemplate&&!i.dataTable._expandedRowTemplate),l(),m("ngIf",(i.dataTable.expandedRowTemplate||i.dataTable._expandedRowTemplate)&&!(i.frozen&&(i.dataTable.frozenExpandedRowTemplate||i.dataTable._frozenExpandedRowTemplate))),l(),m("ngIf",(i.dataTable.frozenExpandedRowTemplate||i.dataTable._frozenExpandedRowTemplate)&&i.frozen),l(),m("ngIf",i.dataTable.loading),l(),m("ngIf",i.dataTable.isEmpty()&&!i.dataTable.loading))},dependencies:[co,gn,Mt],encapsulation:2})}return t})();var gv=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=_t({type:t});static \u0275inj=mt({providers:[$f],imports:[gt,lv,ts,ab,Ot,an,sb,Jb,ov,J0,Wb,Af,zf,Hf,Nf,Vb,Hb,zb,Nb,ev,Ab,Bb,qb,hv,kn,vo,Le,Af]})}return t})();var bv=`
1857
+ .p-progressspinner {
1858
+ position: relative;
1859
+ margin: 0 auto;
1860
+ width: 100px;
1861
+ height: 100px;
1862
+ display: inline-block;
1863
+ }
1864
+
1865
+ .p-progressspinner::before {
1866
+ content: '';
1867
+ display: block;
1868
+ padding-top: 100%;
1869
+ }
1870
+
1871
+ .p-progressspinner-spin {
1872
+ height: 100%;
1873
+ transform-origin: center center;
1874
+ width: 100%;
1875
+ position: absolute;
1876
+ top: 0;
1877
+ bottom: 0;
1878
+ left: 0;
1879
+ right: 0;
1880
+ margin: auto;
1881
+ animation: p-progressspinner-rotate 2s linear infinite;
1882
+ }
1883
+
1884
+ .p-progressspinner-circle {
1885
+ stroke-dasharray: 89, 200;
1886
+ stroke-dashoffset: 0;
1887
+ stroke: dt('progressspinner.colorOne');
1888
+ animation:
1889
+ p-progressspinner-dash 1.5s ease-in-out infinite,
1890
+ p-progressspinner-color 6s ease-in-out infinite;
1891
+ stroke-linecap: round;
1892
+ }
1893
+
1894
+ @keyframes p-progressspinner-rotate {
1895
+ 100% {
1896
+ transform: rotate(360deg);
1897
+ }
1898
+ }
1899
+ @keyframes p-progressspinner-dash {
1900
+ 0% {
1901
+ stroke-dasharray: 1, 200;
1902
+ stroke-dashoffset: 0;
1903
+ }
1904
+ 50% {
1905
+ stroke-dasharray: 89, 200;
1906
+ stroke-dashoffset: -35px;
1907
+ }
1908
+ 100% {
1909
+ stroke-dasharray: 89, 200;
1910
+ stroke-dashoffset: -124px;
1911
+ }
1912
+ }
1913
+ @keyframes p-progressspinner-color {
1914
+ 100%,
1915
+ 0% {
1916
+ stroke: dt('progressspinner.color.one');
1917
+ }
1918
+ 40% {
1919
+ stroke: dt('progressspinner.color.two');
1920
+ }
1921
+ 66% {
1922
+ stroke: dt('progressspinner.color.three');
1923
+ }
1924
+ 80%,
1925
+ 90% {
1926
+ stroke: dt('progressspinner.color.four');
1927
+ }
1928
+ }
1929
+ `;var c5={root:()=>["p-progressspinner"],spin:"p-progressspinner-spin",circle:"p-progressspinner-circle"},vv=(()=>{class t extends St{name="progressspinner";style=bv;classes=c5;static \u0275fac=(()=>{let e;return function(i){return(e||(e=G(t)))(i||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})();var yv=new ge("PROGRESSSPINNER_INSTANCE"),Xf=(()=>{class t extends Bn{componentName="ProgressSpinner";$pcProgressSpinner=p(yv,{optional:!0,skipSelf:!0})??void 0;bindDirectiveInstance=p(Ie,{self:!0});styleClass;strokeWidth="2";fill="none";animationDuration="2s";ariaLabel;onAfterViewChecked(){this.bindDirectiveInstance.setAttrs(this.ptms(["host","root"]))}_componentStyle=p(vv);static \u0275fac=(()=>{let e;return function(i){return(e||(e=G(t)))(i||t)}})();static \u0275cmp=z({type:t,selectors:[["p-progressSpinner"],["p-progress-spinner"],["p-progressspinner"]],hostVars:5,hostBindings:function(n,i){n&2&&(O("aria-label",i.ariaLabel)("role","progressbar")("aria-busy",!0),H(i.cn(i.cx("root"),i.styleClass)))},inputs:{styleClass:"styleClass",strokeWidth:"strokeWidth",fill:"fill",animationDuration:"animationDuration",ariaLabel:"ariaLabel"},features:[we([vv,{provide:yv,useExisting:t},{provide:kt,useExisting:t}]),wt([Ie]),Z],decls:2,vars:10,consts:[["viewBox","25 25 50 50",3,"pBind"],["cx","50","cy","50","r","20","stroke-miterlimit","10",3,"pBind"]],template:function(n,i){n&1&&($(),h(0,"svg",0),N(1,"circle",1),_()),n&2&&(H(i.cx("spin")),Ne("animation-duration",i.animationDuration),m("pBind",i.ptm("spin")),l(),H(i.cx("circle")),m("pBind",i.ptm("circle")),O("fill",i.fill)("stroke-width",i.strokeWidth))},dependencies:[gt,Le,Ie],encapsulation:2,changeDetection:0})}return t})(),Cv=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=_t({type:t});static \u0275inj=mt({imports:[Xf,Le,Le]})}return t})();var Oi={loading:"Loading collection\u2026",emptyFiltered:"No nodes match the current filters.",emptyAll:"No nodes loaded.",emptyAllHint:"Run a scan from the topbar to populate the collection.",resetFilters:"Reset filters",expandAll:"Expand all",collapseAll:"Collapse all",depthLevel0:"Map: show only the root level",depthLevel1:"Map: show up to one folder deep",depthLevel2:"Map: show up to two folders deep",folderAriaLabel:(t,o)=>`${o?"Collapse":"Expand"} folder ${t}`,leafAriaLabel:t=>`Inspect ${t}`,mapVisibilityTooltip:"Toggle visibility on the map",mapVisibilityAriaLabel:t=>`Toggle ${t} visibility on the map`,isolateTooltip:"Isolate this node and its direct links on the map",isolateAriaLabel:t=>`Isolate ${t} and its direct links on the map`,columns:{tree:"Folder / Node",kind:"Kind",linksIn:"in",linksOut:"out",tokens:"Tokens",issues:"Issues"},linksInHeaderTooltip:"Incoming references: how many other nodes link to this one.",linksOutHeaderTooltip:"Outgoing references: how many nodes this one links to.",sortAriaLabel:t=>`Sort by ${t}`,sortTreeAriaLabel:"Show folder tree",tokensTooltip:t=>`${t.toLocaleString()} tokens`,folderCount:t=>`${t}`,missing:"\xB7"};var Co=(()=>{class t{loader=p(Ft);bySeverity=E(()=>{let e=this.loader.scan(),n=new Set,i=new Set;if(!e)return{errors:n,warns:i};for(let r of e.issues){let a=r.severity==="error"?n:r.severity==="warn"?i:null;if(a)for(let s of r.nodeIds)a.add(s)}return{errors:n,warns:i}});static \u0275fac=function(n){return new(n||t)};static \u0275prov=y({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var Zf="sm.map.visible-paths";function xv(){let t=null;try{t=localStorage.getItem(Zf)}catch{return new Set}if(!t)return new Set;let o;try{o=JSON.parse(t)}catch{return new Set}if(!Array.isArray(o))return new Set;let e=new Set;for(let n of o)typeof n=="string"&&n.length>0&&e.add(n);return e}function wv(t){try{if(t.size===0){localStorage.removeItem(Zf);return}localStorage.setItem(Zf,JSON.stringify([...t]))}catch{}}var ni=(()=>{class t{_paths=X(xv());paths=this._paths.asReadonly();isActive=E(()=>this._paths().size>0);count=E(()=>this._paths().size);inScope(e){let n=this._paths();return n.size===0||n.has(e)}constructor(){de(()=>wv(this._paths()))}toggleLeaf(e){let n=new Set(this._paths());n.has(e)?n.delete(e):n.add(e),this._paths.set(n)}toggleFolder(e){let n=[...e];if(n.length===0)return;let i=new Set(this._paths()),r=this.folderState(n)!=="all";for(let a of n)r?i.add(a):i.delete(a);this._paths.set(i)}folderState(e){let n=this._paths(),i=0,r=0;for(let a of e)i++,n.has(a)&&r++;return i===0||r===0?"none":r===i?"all":"some"}setOnly(e){this._paths.set(new Set(e))}clear(){this._paths().size!==0&&this._paths.set(new Set)}prune(e){let n=this._paths();if(n.size===0)return;let i=!1,r=new Set;for(let a of n)e.has(a)?r.add(a):i=!0;i&&this._paths.set(r)}static \u0275fac=function(n){return new(n||t)};static \u0275prov=y({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var Qf="sm.folders.collapsed";function Tv(){let t=null;try{t=localStorage.getItem(Qf)}catch{return new Set}if(!t)return new Set;let o;try{o=JSON.parse(t)}catch{return new Set}if(!Array.isArray(o))return new Set;let e=new Set;for(let n of o)typeof n=="string"&&n.length>0&&e.add(n);return e}function Sv(t){try{if(t.size===0){localStorage.removeItem(Qf);return}localStorage.setItem(Qf,JSON.stringify([...t]))}catch{}}var kv={stable:"success",experimental:"info",deprecated:"warn"};function Iv(t){return t>=.75?"high":t>=.45?"medium":"low"}var Vn={llm:{when:{label:"when",tooltip:"When to use (LLM-inferred)"},style:{label:"style",tooltip:"Interaction style (LLM-inferred)"},does:{label:"does",tooltip:"Capabilities (LLM-inferred)"},steps:{label:"steps",tooltip:"Recipe / ordered steps (LLM-inferred)"},pre:{label:"pre",tooltip:"Preconditions (LLM-inferred)"},out:{label:"out",tooltip:"Outputs / produced artifacts (LLM-inferred)"},fx:{label:"fx",tooltip:"Side effects (LLM-inferred)"},eg:{label:"eg",tooltip:"Invocation example (LLM-inferred)"},topics:{label:"topics",tooltip:"Topics covered (LLM-inferred)"},facts:{label:"facts",tooltip:"Key facts (LLM-inferred discrete claims)"}},meta:{model:"model",allowed:"allowed",tags:"tags"},stats:{errors:t=>`${t} error${t===1?"":"s"}`,warns:t=>`${t} warning${t===1?"":"s"}`,bytes:t=>`${t.toLocaleString("en-US")} bytes`,tokens:t=>`${t.toLocaleString("en-US")} tokens`},stability:{experimental:"experimental",deprecated:"deprecated"},sidecar:{staleBody:"Stale: body content changed since the last bump.",staleFrontmatter:"Stale: frontmatter changed since the last bump.",staleBoth:"Stale: body and frontmatter changed since the last bump."},tagOverflow:t=>`+${t} more`,ariaExpand:"Expand",ariaFavoriteAdd:"Add to favorites",ariaFavoriteRemove:"Remove from favorites",favoriteAddTooltip:"Mark as favorite",favoriteRemoveTooltip:"Unfavorite"};function Pv(t){let o={path:"",name:"",subfolders:new Map,leaves:[]};for(let e of t){let n=e.path.split("/");if(n.pop()===void 0)continue;let r=o,a=[];for(let s of n){if(!s)continue;a.push(s);let c=r.subfolders.get(s);c||(c={path:a.join("/"),name:s,subfolders:new Map,leaves:[]},r.subfolders.set(s,c)),r=c}r.leaves.push(e)}return o}function Rv(t){let o=new Map,e=n=>{let i=n.leaves.length;for(let a of n.subfolders.values())i+=e(a).nodes;let r={nodes:i};return o.set(n.path,r),r};return e(t),o}function Ov(t,o){if(o===""||o===t.path)return t;let e=t;for(let n of o.split("/"))if(n&&(e=e.subfolders.get(n),!e))return null;return e??null}function Fv(t){let o=[],e=n=>{for(let i of n.leaves)o.push(i.path);for(let i of n.subfolders.values())e(i)};return e(t),o}function vs(t,o,e,n=""){let i=g5(t),r=is(t);return{type:"leaf",path:t.path,name:_5(t),prefix:n,depth:o,linksIn:t.linksInCount!==void 0?String(t.linksInCount):Oi.missing,linksOut:t.linksOutCount!==void 0?String(t.linksOutCount):Oi.missing,tokens:t.tokensTotal!==void 0?gr(t.tokensTotal):Oi.missing,linksInRaw:t.linksInCount,linksOutRaw:t.linksOutCount,tokensRaw:t.tokensTotal,errors:e.errorCounts.get(t.path)??0,warns:e.warnCounts.get(t.path)??0,isStale:r,staleTooltip:r?os(t,Vn.sidecar):"",stability:i,stabilitySeverity:kv[i]}}function u5(t,o,e,n){let i=[],r=(c,u)=>{let f=[c.name],g=c;for(;g.subfolders.size===1&&g.leaves.length===0;){let[Y]=g.subfolders.values();f.push(Y.name),g=Y}let C=f.join("/");if(g.subfolders.size===0&&g.leaves.length===1){i.push(vs(g.leaves[0],u,n,`${C}/`));return}let k=!o.has(g.path),S=e.get(g.path)??{nodes:0};if(i.push({type:"folder",path:g.path,name:C,depth:u,expanded:k,nodeCount:S.nodes}),!k)return;let F=Array.from(g.subfolders.values()).sort(Mv);for(let Y of F)r(Y,u+1);let q=[...g.leaves].sort(Dv);for(let Y of q)i.push(vs(Y,u+1,n))},a=Array.from(t.subfolders.values()).sort(Mv);for(let c of a)r(c,0);let s=[...t.leaves].sort(Dv);for(let c of s)i.push(vs(c,0,n));return i}function p5(t,o,e){let n=t.map(i=>vs(i,0,e,m5(i.path)));return o.column==="tree"||n.sort(f5(o.column,o.dir)),n}function Nv(t){return t.sort.column==="tree"?u5(t.tree,t.collapsed,t.aggregates,t.maps):p5(t.leaves,t.sort,t.maps)}function h5(t){return t.errors*1e6+t.warns*1e3+(t.isStale?1:0)}function f5(t,o){let e=o==="asc"?1:-1;return(n,i)=>{let r=Ev(n,t),a=Ev(i,t);return r===void 0&&a===void 0?n.path.localeCompare(i.path):r===void 0?1:a===void 0?-1:r!==a?(r-a)*e:n.path.localeCompare(i.path)}}function Ev(t,o){switch(o){case"linksIn":return t.linksInRaw;case"linksOut":return t.linksOutRaw;case"tokens":return t.tokensRaw;case"issues":return h5(t)}}function m5(t){let o=t.lastIndexOf("/");return o===-1?"":t.slice(0,o)}function _5(t){let o=t.frontmatter.name?.trim();return o||ds(t.path)||Oi.missing}function g5(t){return mo(t)??"stable"}function Mv(t,o){return t.name.localeCompare(o.name)}function Dv(t,o){return t.path.localeCompare(o.path)}function Jf(t,o){let e=new Map;if(!t)return e;for(let n of t)if(n.severity===o)for(let i of n.nodeIds)e.set(i,(e.get(i)??0)+1);return e}var em="sm.files.sort",b5=["tree","linksIn","linksOut","tokens","issues"],v5=["asc","desc"],Fi={column:"tree",dir:"asc"};function y5(t){return t==="tree"?"asc":"desc"}function Av(t,o){return o==="tree"?Fi:t.column===o?{column:o,dir:t.dir==="asc"?"desc":"asc"}:{column:o,dir:y5(o)}}function C5(t){return typeof t=="string"&&b5.includes(t)}function x5(t){return typeof t=="string"&&v5.includes(t)}function w5(t){if(typeof t!="object"||t===null)return!1;let o=t;return C5(o.column)&&x5(o.dir)}function Lv(){let t=null;try{t=localStorage.getItem(em)}catch{return Fi}if(!t)return Fi;let o;try{o=JSON.parse(t)}catch{return Fi}return w5(o)?{column:o.column,dir:o.dir}:Fi}function Bv(t){try{if(t.column===Fi.column&&t.dir===Fi.dir){localStorage.removeItem(em);return}localStorage.setItem(em,JSON.stringify({column:t.column,dir:t.dir}))}catch{}}var T5=()=>({width:"1.75rem",height:"1.75rem"});function S5(t,o){if(t&1&&N(0,"p-message",1),t&2){let e=d();m("text",e.error())}}function k5(t,o){if(t&1&&(h(0,"div",2),N(1,"p-progressSpinner",3),h(2,"span",4),b(3),_()()),t&2){let e=d();l(),qt(Jt(3,T5)),l(2),x(e.texts.loading)}}function I5(t,o){if(t&1){let e=W();N(0,"i",7),h(1,"p",8),b(2),_(),h(3,"p-button",9),A("onClick",function(){w(e);let i=d(3);return T(i.resetFilters())}),_()}if(t&2){let e=d(3);l(2),x(e.texts.emptyFiltered),l(),m("label",e.texts.resetFilters)("text",!0)}}function E5(t,o){if(t&1&&(N(0,"i",10),h(1,"p",11),b(2),_(),h(3,"p",12),b(4),_()),t&2){let e=d(3);l(2),x(e.texts.emptyAll),l(2),x(e.texts.emptyAllHint)}}function M5(t,o){if(t&1&&(h(0,"div",5),M(1,I5,4,3)(2,E5,5,2),_()),t&2){let e=d(2);l(),D(e.filtersActive()?1:2)}}function D5(t,o){if(t&1){let e=W();h(0,"span",20)(1,"button",27),A("click",function(){w(e);let i=d(4);return T(i.expandAll())}),N(2,"i",28),_(),h(3,"button",29),A("click",function(){w(e);let i=d(4);return T(i.collapseAll())}),N(4,"i",30),_(),N(5,"span",31),h(6,"button",32),A("click",function(){w(e);let i=d(4);return T(i.setDepthLevel(0))}),b(7,"0"),_(),h(8,"button",33),A("click",function(){w(e);let i=d(4);return T(i.setDepthLevel(1))}),b(9,"1"),_(),h(10,"button",34),A("click",function(){w(e);let i=d(4);return T(i.setDepthLevel(2))}),b(11,"2"),_()()}if(t&2){let e=d(4);l(),m("pTooltip",e.texts.expandAll),O("aria-label",e.texts.expandAll),l(2),m("pTooltip",e.texts.collapseAll),O("aria-label",e.texts.collapseAll),l(3),se("is-active",e.activeDepthLevel()===0),m("pTooltip",e.texts.depthLevel0),O("aria-label",e.texts.depthLevel0)("aria-pressed",e.activeDepthLevel()===0),l(2),se("is-active",e.activeDepthLevel()===1),m("pTooltip",e.texts.depthLevel1),O("aria-label",e.texts.depthLevel1)("aria-pressed",e.activeDepthLevel()===1),l(2),se("is-active",e.activeDepthLevel()===2),m("pTooltip",e.texts.depthLevel2),O("aria-label",e.texts.depthLevel2)("aria-pressed",e.activeDepthLevel()===2)}}function P5(t,o){if(t&1){let e=W();h(0,"tr")(1,"th",16)(2,"div",17)(3,"button",18),A("click",function(){w(e);let i=d(3);return T(i.onSortColumn("tree"))}),b(4),N(5,"i",19),_(),M(6,D5,12,19,"span",20),_()(),h(7,"th",21)(8,"button",22),A("click",function(){w(e);let i=d(3);return T(i.onSortColumn("linksIn"))}),b(9),N(10,"i",19),_()(),h(11,"th",23)(12,"button",22),A("click",function(){w(e);let i=d(3);return T(i.onSortColumn("linksOut"))}),b(13),N(14,"i",19),_()(),h(15,"th",24)(16,"button",25),A("click",function(){w(e);let i=d(3);return T(i.onSortColumn("tokens"))}),b(17),N(18,"i",19),_()(),h(19,"th",26)(20,"button",18),A("click",function(){w(e);let i=d(3);return T(i.onSortColumn("issues"))}),b(21),N(22,"i",19),_()()()}if(t&2){let e=d(3);l(),O("aria-sort",e.ariaSortFor("tree")),l(2),se("files__sort-btn--active",e.sortState().column==="tree"),O("aria-label",e.texts.sortTreeAriaLabel),l(),ke(" ",e.texts.columns.tree," "),l(),se("pi-sort-amount-up",e.sortState().column==="tree"&&e.sortState().dir==="asc")("pi-sort-amount-down",e.sortState().column==="tree"&&e.sortState().dir==="desc")("pi-sort-alt",e.sortState().column!=="tree"),l(),D(e.isFlat()?-1:6),l(),O("aria-sort",e.ariaSortFor("linksIn")),l(),se("files__sort-btn--active",e.sortState().column==="linksIn"),m("pTooltip",e.texts.linksInHeaderTooltip),O("aria-label",e.texts.sortAriaLabel(e.texts.columns.linksIn)),l(),ke(" ",e.texts.columns.linksIn," "),l(),se("pi-sort-amount-up",e.sortState().column==="linksIn"&&e.sortState().dir==="asc")("pi-sort-amount-down",e.sortState().column==="linksIn"&&e.sortState().dir==="desc")("pi-sort-alt",e.sortState().column!=="linksIn"),l(),O("aria-sort",e.ariaSortFor("linksOut")),l(),se("files__sort-btn--active",e.sortState().column==="linksOut"),m("pTooltip",e.texts.linksOutHeaderTooltip),O("aria-label",e.texts.sortAriaLabel(e.texts.columns.linksOut)),l(),ke(" ",e.texts.columns.linksOut," "),l(),se("pi-sort-amount-up",e.sortState().column==="linksOut"&&e.sortState().dir==="asc")("pi-sort-amount-down",e.sortState().column==="linksOut"&&e.sortState().dir==="desc")("pi-sort-alt",e.sortState().column!=="linksOut"),l(),O("aria-sort",e.ariaSortFor("tokens")),l(),se("files__sort-btn--active",e.sortState().column==="tokens"),O("aria-label",e.texts.sortAriaLabel(e.texts.columns.tokens)),l(),ke(" ",e.texts.columns.tokens," "),l(),se("pi-sort-amount-up",e.sortState().column==="tokens"&&e.sortState().dir==="asc")("pi-sort-amount-down",e.sortState().column==="tokens"&&e.sortState().dir==="desc")("pi-sort-alt",e.sortState().column!=="tokens"),l(),O("aria-sort",e.ariaSortFor("issues")),l(),se("files__sort-btn--active",e.sortState().column==="issues"),O("aria-label",e.texts.sortAriaLabel(e.texts.columns.issues)),l(),ke(" ",e.texts.columns.issues," "),l(),se("pi-sort-amount-up",e.sortState().column==="issues"&&e.sortState().dir==="asc")("pi-sort-amount-down",e.sortState().column==="issues"&&e.sortState().dir==="desc")("pi-sort-alt",e.sortState().column!=="issues")}}function R5(t,o){if(t&1){let e=W();h(0,"tr",37),A("click",function(){w(e);let i=d().$implicit,r=d(3);return T(r.toggleFolder(i))})("keydown.enter",function(){w(e);let i=d().$implicit,r=d(3);return T(r.toggleFolder(i))})("keydown.space",function(i){w(e);let r=d().$implicit,a=d(3);return i.preventDefault(),T(a.toggleFolder(r))}),h(1,"td",38)(2,"span",39),N(3,"span",40),h(4,"button",41),A("click",function(i){w(e);let r=d().$implicit,a=d(3);return T(a.onToggleFolderVisibility(r,i))}),N(5,"i",42),_(),N(6,"i",43)(7,"i",44),h(8,"span",45),b(9),_(),h(10,"span",46),b(11),_()()(),N(12,"td")(13,"td")(14,"td")(15,"td"),_()}if(t&2){let e=d().$implicit,n=d(3);Ne("--folder-depth",e.depth),O("aria-expanded",e.expanded)("aria-level",e.depth+1)("aria-label",n.texts.folderAriaLabel(e.name,e.expanded))("data-testid","files-folder-"+e.path),l(4),m("pTooltip",n.texts.mapVisibilityTooltip),O("data-state",n.folderStateMap().get(e.path)??"none")("aria-label",n.texts.mapVisibilityAriaLabel(e.name))("data-testid","files-vis-folder-"+e.path),l(),se("pi-check",n.folderStateMap().get(e.path)==="all")("pi-minus",n.folderStateMap().get(e.path)==="some"),l(),se("pi-chevron-right",!e.expanded)("pi-chevron-down",e.expanded),l(),se("pi-folder",!e.expanded)("pi-folder-open",e.expanded),l(2),x(e.name),l(),O("aria-label",e.nodeCount+" nodes"),l(),x(n.texts.folderCount(e.nodeCount))}}function O5(t,o){if(t&1&&(h(0,"span",62),b(1),_()),t&2){let e=d(3).$implicit;l(),x(e.prefix)}}function F5(t,o){if(t&1&&(h(0,"span",50)(1,"span",61),b(2),_(),M(3,O5,2,1,"span",62),_()),t&2){let e=d(2).$implicit;m("pTooltip",e.path),l(2),x(e.name),l(),D(e.prefix?3:-1)}}function N5(t,o){if(t&1&&(h(0,"span",63),b(1),_()),t&2){let e=d(3).$implicit;l(),x(e.prefix)}}function A5(t,o){if(t&1&&(h(0,"span",51),M(1,N5,2,1,"span",63),b(2),_()),t&2){let e=d(2).$implicit;l(),D(e.prefix?1:-1),l(),x(e.name)}}function L5(t,o){if(t&1&&N(0,"i",57),t&2){let e=d(2).$implicit;m("pTooltip",e.staleTooltip),O("aria-label",e.staleTooltip)}}function B5(t,o){if(t&1&&(h(0,"span",58),N(1,"i",64),h(2,"span",65),b(3),_()()),t&2){let e=d(2).$implicit;l(3),x(e.errors)}}function V5(t,o){if(t&1&&(h(0,"span",59),N(1,"i",66),h(2,"span",65),b(3),_()()),t&2){let e=d(2).$implicit;l(3),x(e.warns)}}function z5(t,o){if(t&1&&(h(0,"span",60),b(1),_()),t&2){let e=d(5);l(),x(e.texts.missing)}}function H5(t,o){if(t&1){let e=W();h(0,"tr",47),A("click",function(){w(e);let i=d().$implicit,r=d(3);return T(r.onLeafActivate(i))})("keydown.enter",function(){w(e);let i=d().$implicit,r=d(3);return T(r.onLeafActivate(i))})("keydown.space",function(i){w(e);let r=d().$implicit,a=d(3);return i.preventDefault(),T(a.onLeafActivate(r))}),h(1,"td",38)(2,"span",39),N(3,"span",40),h(4,"button",41),A("click",function(i){w(e);let r=d().$implicit,a=d(3);return T(a.onToggleLeafVisibility(r,i))}),N(5,"i",42),_(),N(6,"span",48)(7,"i",49),M(8,F5,4,3,"span",50)(9,A5,3,2,"span",51),h(10,"button",52),A("click",function(i){w(e);let r=d().$implicit,a=d(3);return T(a.onSitemapClick(r,i))}),N(11,"i",53),_()()(),h(12,"td",54),b(13),_(),h(14,"td",54),b(15),_(),h(16,"td",54),b(17),_(),h(18,"td",55)(19,"span",56),M(20,L5,1,2,"i",57),M(21,B5,4,1,"span",58),M(22,V5,4,1,"span",59),M(23,z5,2,1,"span",60),_()()()}if(t&2){let e=d().$implicit,n=d(3);Ne("--folder-depth",e.depth),O("aria-label",n.texts.leafAriaLabel(e.name))("data-testid","files-leaf-"+e.path),l(4),m("pTooltip",n.texts.mapVisibilityTooltip),O("data-state",n.leafVisible(e.path)?"all":"none")("aria-label",n.texts.mapVisibilityAriaLabel(e.name))("data-testid","files-vis-leaf-"+e.path),l(),se("pi-check",n.leafVisible(e.path)),l(3),D(n.isFlat()?8:9),l(2),m("pTooltip",n.texts.isolateTooltip),O("aria-label",n.texts.isolateAriaLabel(e.name))("data-testid","files-leaf-graph-"+e.path),l(3),x(e.linksIn),l(2),x(e.linksOut),l(),O("title",(e.tokensRaw??0)>0?n.texts.tokensTooltip(e.tokensRaw):null),l(),x(e.tokens),l(3),D(e.isStale?20:-1),l(),D(e.errors>0?21:-1),l(),D(e.warns>0?22:-1),l(),D(!e.isStale&&e.errors===0&&e.warns===0?23:-1)}}function q5(t,o){if(t&1&&M(0,R5,16,25,"tr",35)(1,H5,24,22,"tr",36),t&2){let e=o.$implicit;D(e.type==="folder"?0:1)}}function G5(t,o){if(t&1&&(h(0,"div",6)(1,"p-table",13),I(2,P5,23,58,"ng-template",14)(3,q5,2,1,"ng-template",15),_()()),t&2){let e=d(2);l(),m("value",e.rows())("paginator",!1)("scrollable",!0)("scrollHeight","flex")}}function j5(t,o){if(t&1&&M(0,M5,3,1,"div",5)(1,G5,4,4,"div",6),t&2){let e=d();D(e.rows().length===0?0:1)}}var Vv=(()=>{class t{loader=p(Ft);filters=p(rn);issuePaths=p(Co);nodeOpenIntent=p(go);mapVisibility=p(ni);mapIsolate=p(ms);texts=Oi;loading=this.loader.loading;error=this.loader.error;filtersActive=this.filters.isActive;collapsed=X(Tv());sort=X(Lv());sortState=this.sort.asReadonly();isFlat=E(()=>this.sort().column!=="tree");constructor(){de(()=>{Sv(this.collapsed())}),de(()=>{Bv(this.sort())})}filteredNodes=E(()=>{let e=this.issuePaths.bySeverity();return this.filters.apply(this.loader.nodes(),e)});tree=E(()=>Pv(this.filteredNodes()));aggregates=E(()=>Rv(this.tree()));rows=E(()=>{let e=Jf(this.loader.scan()?.issues,"error"),n=Jf(this.loader.scan()?.issues,"warn");return Nv({tree:this.tree(),leaves:this.filteredNodes(),collapsed:this.collapsed(),aggregates:this.aggregates(),maps:{errorCounts:e,warnCounts:n},sort:this.sort()})});folderStateMap=E(()=>{let e=this.mapVisibility.paths(),n=new Map,i=r=>{let a=0,s=0;for(let c of r.leaves)a++,e.has(c.path)&&s++;for(let c of r.subfolders.values()){let[u,f]=i(c);a+=u,s+=f}return n.set(r.path,a===0||s===0?"none":s===a?"all":"some"),[a,s]};return i(this.tree()),n});leafVisible(e){return this.mapVisibility.paths().has(e)}nodeDepth(e){let n=0;for(let i of e)i==="/"&&n++;return n}depthSet(e){let n=new Set;for(let i of this.filteredNodes())this.nodeDepth(i.path)<=e&&n.add(i.path);return n}pathsAre(e){let n=this.mapVisibility.paths();if(n.size!==e.size)return!1;for(let i of e)if(!n.has(i))return!1;return!0}activeDepthLevel=E(()=>{if(this.mapVisibility.paths().size===0)return null;for(let e of[0,1,2])if(this.pathsAre(this.depthSet(e)))return e;return null});setDepthLevel(e){let n=this.depthSet(e);this.pathsAre(n)?this.mapVisibility.clear():this.mapVisibility.setOnly(n)}ngOnInit(){this.loader.nodes().length===0&&!this.loader.loading()&&this.loader.load()}toggleFolder(e){let n=new Set(this.collapsed());n.has(e.path)?n.delete(e.path):n.add(e.path),this.collapsed.set(n)}expandAll(){this.collapsed.set(new Set)}collapseAll(){let e=new Set,n=i=>{i.path&&e.add(i.path);for(let r of i.subfolders.values())n(r)};n(this.tree()),this.collapsed.set(e)}onSortColumn(e){this.sort.set(Av(this.sort(),e))}ariaSortFor(e){let n=this.sort();return n.column!==e?"none":n.dir==="asc"?"ascending":"descending"}onLeafActivate(e){this.openInMap(e)}openInMap(e){this.nodeOpenIntent.open(e.path)}onToggleLeafVisibility(e,n){n.stopPropagation(),this.mapVisibility.toggleLeaf(e.path)}onToggleFolderVisibility(e,n){n.stopPropagation();let i=Ov(this.tree(),e.path);i&&this.mapVisibility.toggleFolder(Fv(i))}onSitemapClick(e,n){n.stopPropagation(),this.mapIsolate.isolate(e.path)}resetFilters(){this.filters.reset()}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=z({type:t,selectors:[["sm-files-view"]],decls:4,vars:2,consts:[["data-testid","files-view",1,"files","files--rail"],["severity","error",3,"text"],["data-testid","files-loading",1,"files__loading"],["strokeWidth","4"],[1,"files__loading-label"],[1,"empty-state"],[1,"files__split"],["aria-hidden","true",1,"pi","pi-filter-slash","empty-state__icon"],["data-testid","files-empty-filtered",1,"empty-state__title"],["size","small","data-testid","files-reset-filters",3,"onClick","label","text"],["aria-hidden","true",1,"pi","pi-inbox","empty-state__icon"],["data-testid","files-empty-all",1,"empty-state__title"],[1,"empty-state__desc"],["dataKey","path","styleClass","p-datatable-sm files__table","data-testid","files-table",3,"value","paginator","scrollable","scrollHeight"],["pTemplate","header"],["pTemplate","body"],["data-testid","files-col-tree",1,"files__col-tree"],[1,"files__tree-head"],["type","button",1,"files__sort-btn",3,"click"],["aria-hidden","true",1,"pi","files__sort-icon"],[1,"files__tree-actions"],["data-testid","files-col-linksIn",1,"files__col-num",2,"width","70px"],["type","button","tooltipPosition","top",1,"files__sort-btn","files__sort-btn--num",3,"click","pTooltip"],["data-testid","files-col-linksOut",1,"files__col-num",2,"width","70px"],["data-testid","files-col-tokens",1,"files__col-num",2,"width","110px"],["type","button",1,"files__sort-btn","files__sort-btn--num",3,"click"],["data-testid","files-col-issues",2,"width","130px"],["type","button","tooltipPosition","top","data-testid","files-expand-all",1,"files__tree-action",3,"click","pTooltip"],["aria-hidden","true",1,"pi","pi-angle-double-down"],["type","button","tooltipPosition","top","data-testid","files-collapse-all",1,"files__tree-action",3,"click","pTooltip"],["aria-hidden","true",1,"pi","pi-angle-double-up"],["aria-hidden","true",1,"files__tree-sep"],["type","button","tooltipPosition","top","data-testid","files-depth-0",1,"files__tree-num",3,"click","pTooltip"],["type","button","tooltipPosition","top","data-testid","files-depth-1",1,"files__tree-num",3,"click","pTooltip"],["type","button","tooltipPosition","top","data-testid","files-depth-2",1,"files__tree-num",3,"click","pTooltip"],["tabindex","0",1,"files__row","files__row--folder",3,"--folder-depth"],["tabindex","0",1,"files__row","files__row--leaf",3,"--folder-depth"],["tabindex","0",1,"files__row","files__row--folder",3,"click","keydown.enter","keydown.space"],[1,"files__cell-tree"],[1,"files__tree-inner"],["aria-hidden","true",1,"files__indent"],["type","button","tooltipPosition","top",1,"files__vis-check",3,"click","pTooltip"],["aria-hidden","true",1,"pi"],["aria-hidden","true",1,"pi","files__chevron"],["aria-hidden","true",1,"pi","files__folder-icon"],[1,"files__name","files__name--folder"],[1,"files__count"],["tabindex","0",1,"files__row","files__row--leaf",3,"click","keydown.enter","keydown.space"],["aria-hidden","true",1,"files__chevron-placeholder"],["aria-hidden","true",1,"pi","pi-file","files__leaf-icon"],["tooltipPosition","top","tooltipStyleClass","files__path-tooltip",1,"files__name-wrap",3,"pTooltip"],[1,"files__name","files__name--leaf"],["type","button","tooltipPosition","top",1,"files__open-graph",3,"click","pTooltip"],["aria-hidden","true",1,"pi","pi-sitemap"],[1,"files__cell-num"],[1,"files__cell-issues"],[1,"files__issues-row"],["tooltipPosition","top",1,"pi","pi-clock","files__stale-icon",3,"pTooltip"],[1,"files__issue","files__issue--error"],[1,"files__issue","files__issue--warn"],["aria-hidden","true",1,"files__cell-issues-empty"],[1,"files__leaf-name"],[1,"files__path-suffix"],[1,"files__name-prefix"],["aria-hidden","true",1,"pi","pi-times-circle"],[1,"files__issue-count"],["aria-hidden","true",1,"pi","pi-exclamation-triangle"]],template:function(n,i){n&1&&(h(0,"section",0),M(1,S5,1,1,"p-message",1),M(2,k5,4,4,"div",2)(3,j5,2,1),_()),n&2&&(l(),D(i.error()?1:-1),l(),D(i.loading()?2:i.error()?-1:3))},dependencies:[gv,Yf,bt,Cv,Xf,cb,lb,an,Ut,Ve,Be],styles:["[_nghost-%COMP%]{--files-fs-xs: .75rem;--files-fs-mono: .8rem;--files-fs-sm: .875rem;--files-indent: 1rem;display:block;width:100%;box-sizing:border-box}.files[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.files__loading[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;gap:.5rem;padding:1.5rem 1rem;color:var(--p-text-muted-color)}.files__loading-label[_ngcontent-%COMP%]{font-size:var(--files-fs-xs)}.files__table[_ngcontent-%COMP%]{width:100%}[_nghost-%COMP%] .files__table .p-datatable-tbody td{font-size:var(--files-fs-sm);vertical-align:middle}[_nghost-%COMP%] .files--rail .files__table{--p-datatable-header-cell-background: var(--sm-bg-content);--p-datatable-row-background: var(--sm-bg-content)}.files__sort-btn[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.35rem;width:100%;padding:.15rem .25rem;margin:-.15rem -.25rem;border:0;background:transparent;font:inherit;color:inherit;cursor:pointer;border-radius:var(--sm-radius-sm);transition:background .12s ease-out,color .12s ease-out}.files__sort-btn--num[_ngcontent-%COMP%]{justify-content:flex-end}.files__sort-btn[_ngcontent-%COMP%]:hover{background:var(--sm-bg-hover)}.files__sort-btn[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--p-primary-color);outline-offset:-2px}.files__sort-btn--active[_ngcontent-%COMP%]{color:var(--p-primary-color);font-weight:600}.files__sort-icon[_ngcontent-%COMP%]{font-size:var(--files-fs-xs);color:var(--p-text-muted-color);opacity:.5;flex-shrink:0}.files__sort-btn--active[_ngcontent-%COMP%] .files__sort-icon[_ngcontent-%COMP%]{color:var(--p-primary-color);opacity:1}.files__tree-head[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}.files__tree-head[_ngcontent-%COMP%] .files__sort-btn[_ngcontent-%COMP%]{flex:1 1 auto;width:auto}.files__tree-actions[_ngcontent-%COMP%]{display:inline-flex;flex:0 0 auto;gap:.1rem}.files__tree-action[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:1.4rem;height:1.4rem;padding:0;border:0;background:transparent;border-radius:var(--sm-radius-sm);color:var(--p-text-muted-color);cursor:pointer;transition:background .12s ease-out,color .12s ease-out}.files__tree-action[_ngcontent-%COMP%]:hover{background:var(--sm-bg-hover);color:var(--p-text-color)}.files__tree-action[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--p-primary-color);outline-offset:-2px}.files__tree-action[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:var(--files-fs-xs)}.files__tree-sep[_ngcontent-%COMP%]{flex:0 0 auto;width:1px;height:14px;margin:0 .15rem;background:var(--sm-border)}.files__tree-num[_ngcontent-%COMP%]{display:inline-flex;flex:0 0 auto;align-items:center;justify-content:center;width:1.3rem;height:1.3rem;padding:0;border:1px solid var(--p-content-border-color);border-radius:var(--sm-radius-sm);background:transparent;color:var(--p-text-muted-color);font-size:var(--files-fs-xs);font-weight:600;line-height:1;cursor:pointer;transition:background .12s ease-out,color .12s ease-out,border-color .12s ease-out}.files__tree-num[_ngcontent-%COMP%]:hover{border-color:var(--p-primary-color);color:var(--p-text-color)}.files__tree-num.is-active[_ngcontent-%COMP%]{background:var(--p-primary-color);border-color:var(--p-primary-color);color:var(--p-primary-contrast-color)}.files__tree-num[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--p-primary-color);outline-offset:-2px}.files__row[_ngcontent-%COMP%]{cursor:pointer}.files__row[_ngcontent-%COMP%]:hover{background:var(--sm-bg-hover)}.files__split[_ngcontent-%COMP%]{display:flex;gap:1rem;align-items:flex-start}.files--rail[_ngcontent-%COMP%]{flex:1;min-height:0;gap:.5rem}.files--rail[_ngcontent-%COMP%] .files__split[_ngcontent-%COMP%]{flex:1;min-height:0;align-items:stretch}.files__vis-check[_ngcontent-%COMP%]{display:inline-flex;flex:0 0 auto;align-items:center;justify-content:center;width:16px;height:16px;margin-right:.35rem;padding:0;border:1px solid var(--p-content-border-color);border-radius:4px;background:transparent;color:var(--p-primary-contrast-color);cursor:pointer}.files__vis-check[data-state=all][_ngcontent-%COMP%], .files__vis-check[data-state=some][_ngcontent-%COMP%]{background:var(--p-primary-color);border-color:var(--p-primary-color)}.files__vis-check[_ngcontent-%COMP%]:hover{border-color:var(--p-primary-color)}.files__vis-check[_ngcontent-%COMP%] .pi[_ngcontent-%COMP%]{font-size:.7rem}.files__split[_ngcontent-%COMP%] > p-table[_ngcontent-%COMP%]{flex:1 1 auto;min-width:0}.files__col-tree[_ngcontent-%COMP%], .files__cell-tree[_ngcontent-%COMP%]{min-width:280px;max-width:480px}.files__tree-inner[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.5rem;min-width:0;width:100%}.files__indent[_ngcontent-%COMP%]{display:inline-block;flex-shrink:0;width:calc(var(--folder-depth, 0) * var(--files-indent))}.files__chevron[_ngcontent-%COMP%]{flex-shrink:0;font-size:var(--files-fs-xs);color:var(--p-text-muted-color);width:.85rem;text-align:center}.files__chevron-placeholder[_ngcontent-%COMP%]{display:inline-block;flex-shrink:0;width:.85rem}.files__folder-icon[_ngcontent-%COMP%]{flex-shrink:0;font-size:var(--files-fs-sm);color:var(--p-primary-color);width:1rem;text-align:center}.files__leaf-icon[_ngcontent-%COMP%]{flex-shrink:0;font-size:var(--files-fs-sm);color:var(--p-text-muted-color);width:1rem;text-align:center;opacity:.7}.files__name[_ngcontent-%COMP%]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.files__name--folder[_ngcontent-%COMP%]{font-weight:600;color:var(--p-text-color)}.files__name--leaf[_ngcontent-%COMP%]{font-weight:500;color:var(--p-text-color)}.files__name-prefix[_ngcontent-%COMP%]{color:var(--p-text-muted-color);font-weight:400}.files__name-wrap[_ngcontent-%COMP%]{display:inline-flex;align-items:baseline;gap:.4rem;min-width:0;flex:0 1 auto;overflow:hidden}.files__leaf-name[_ngcontent-%COMP%]{flex:0 0 auto;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:500;color:var(--p-text-color)}.files__path-suffix[_ngcontent-%COMP%]{flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--p-text-muted-color);font-size:var(--files-fs-xs)}.files__open-graph[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:1.5rem;height:1.5rem;margin-left:.25rem;padding:0;border:0;background:transparent;border-radius:var(--sm-radius-sm);color:var(--p-text-muted-color);cursor:pointer;opacity:0;transition:opacity .12s ease-out,background .12s ease-out,color .12s ease-out}.files__open-graph[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:var(--files-fs-sm);line-height:1}.files__row--leaf[_ngcontent-%COMP%]:hover .files__open-graph[_ngcontent-%COMP%], .files__row--leaf[_ngcontent-%COMP%]:focus-within .files__open-graph[_ngcontent-%COMP%]{opacity:.85}.files__open-graph[_ngcontent-%COMP%]:hover, .files__open-graph[_ngcontent-%COMP%]:focus-visible{opacity:1;background:var(--sm-bg-hover);color:var(--p-primary-color)}.files__count[_ngcontent-%COMP%]{flex-shrink:0;font-size:var(--files-fs-xs);font-family:var(--sm-font-mono);color:var(--p-text-muted-color);padding:.05rem .4rem;border-radius:999px;background:var(--sm-bg-hover);min-width:1.5rem;text-align:center}[_nghost-%COMP%] .files__table .p-datatable-tbody .files__row--folder>td{background:color-mix(in srgb,var(--sm-bg-hover) 30%,transparent)}.files__col-num[_ngcontent-%COMP%]{text-align:right}.files__cell-num[_ngcontent-%COMP%]{text-align:right;font-family:var(--sm-font-mono);font-size:var(--files-fs-mono);color:var(--p-text-muted-color)}.files__stale-icon[_ngcontent-%COMP%]{font-size:var(--files-fs-sm);color:var(--p-text-color);line-height:1;opacity:.65}.files__issues-row[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.6rem}.files__issue[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.3rem;font-weight:600;font-size:var(--files-fs-sm);line-height:1;opacity:.65}.files__issue[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:var(--files-fs-sm);line-height:1}.files__issue-count[_ngcontent-%COMP%]{font-variant-numeric:tabular-nums}.files__issue--error[_ngcontent-%COMP%]{color:var(--sm-severity-error)}.files__issue--warn[_ngcontent-%COMP%]{color:var(--sm-severity-warn)}.files__cell-issues-empty[_ngcontent-%COMP%]{color:var(--p-text-muted-color);font-family:var(--sm-font-mono);font-size:var(--files-fs-mono)}"],changeDetection:0})}return t})();var Ni=class{constructor(o,e,n,i,r){this.center=o,this.radiusX=e,this.radiusY=n,this.startAngle=i,this.endAngle=r}},U=class t{static castToPoint(o){return o||t.initialize()}static initialize(o=0,e=0){return{x:o,y:e}}static copy(o){return t.initialize(o.x,o.y)}static isEqual(o,e){return o.x===e.x&&o.y===e.y}static sum(o,e){return{x:o.x+e.x,y:o.y+e.y}}static sub(o,e){return{x:o.x-e.x,y:o.y-e.y}}static div(o,e){return{x:o.x/e,y:o.y/e}}static mult(o,e){return{x:o.x*e,y:o.y*e}}static interpolatePoints(o,e,n){let i=1-n;return t.initialize(o.x*i+e.x*n,o.y*i+e.y*n)}static roundTo(o,e){let n=Math.trunc(o.x/e),i=Math.trunc(o.y/e);return{x:n*e,y:i*e}}static hypotenuse(o,e){let n=e.x-o.x,i=e.y-o.y;return Math.abs(Math.sqrt(n*n+i*i))}static distance(o,e){let n=o.x-e.x,i=o.y-e.y;return Math.sqrt(n*n+i*i)}static getMinimum(o,e){return t.initialize(Math.min(o.x,e.x),Math.min(o.y,e.y))}static getMaximum(o,e){return t.initialize(Math.max(o.x,e.x),Math.max(o.y,e.y))}static matrixTransform(o,e){let n=t.initialize(o.x,o.y),i=e.getScreenCTM();if(i){let r=e.createSVGPoint();r.x=o.x,r.y=o.y,n=r.matrixTransform(i.inverse())}return n}static elementTransform(o,e){let n=t.initialize(o.x,o.y),i=e.getBoundingClientRect();return n=t.sub(n,t.initialize(i.left,i.top)),n}},ce=class t{constructor(o=0,e=0){this.x=o,this.y=e}static fromPoint(o){return new t(o.x,o.y)}add(o){let e=U.sum(this,o);return t.fromPoint(e)}sub(o){let e=U.sub(this,o);return t.fromPoint(e)}subNumber(o){let e=U.sub(this,new t(o,o));return t.fromPoint(e)}div(o){let e=U.div(this,o);return t.fromPoint(e)}mult(o){let e=U.mult(this,o);return t.fromPoint(e)}matrixTransform(o){let e=U.matrixTransform(this,o);return t.fromPoint(e)}elementTransform(o){let e=U.elementTransform(this,o);return t.fromPoint(e)}},yr=class{static initialize(o=U.initialize(),e=U.initialize()){return{point1:o,point2:e}}static copy(o){return{point1:o.point1,point2:o.point2}}static hypotenuse(o){return Math.sqrt(Math.pow(o.point1.x-o.point2.x,2)+Math.pow(o.point1.y-o.point2.y,2))}},Ai=class{constructor(o,e){this.point1=o,this.point2=e}},te=class t{static initialize(o=0,e=0,n=0,i=0){n<0&&(o=o+n,n=-n),i<0&&(e=e+i,i=-i);let r=U.initialize(o+n/2,e+i/2);return{x:o,y:e,width:n,height:i,gravityCenter:r}}static copy(o){return t.initialize(o.x,o.y,o.width,o.height)}static fromElement(o){let{x:e,y:n,width:i,height:r}=o.getBoundingClientRect();return t.initialize(e,n,i,r)}static isIncludePoint(o,e){return e.x>=t.left(o)&&e.x<=t.right(o)&&e.y>=t.top(o)&&e.y<=t.bottom(o)}static intersectionWithRect(o,e){return!(o.x+o.width<e.x||e.x+e.width<o.x||o.y+o.height<e.y||e.y+e.height<o.y)}static left(o){return o.x}static top(o){return o.y}static right(o){return o.x+o.width}static bottom(o){return o.y+o.height}static addPoint(o,e){let n=t.copy(o);return n.x+=e.x,n.y+=e.y,this.initialize(n.x,n.y,n.width,n.height)}static mult(o,e){let n=t.copy(o);return n.x*=e,n.y*=e,n.width*=e,n.height*=e,this.initialize(n.x,n.y,n.width,n.height)}static div(o,e){let n=t.copy(o);return n.x/=e,n.y/=e,n.width/=e,n.height/=e,this.initialize(n.x,n.y,n.width,n.height)}static addPointToSize(o,e){let n=t.copy(o);return n.width+=e.x,n.height+=e.y,this.initialize(n.x,n.y,n.width,n.height)}static union(o){return!o||o.length===0?null:o.reduce((e,n)=>{let i=Math.min(e.x,n.x),r=Math.min(e.y,n.y),a=Math.max(e.x+e.width,n.x+n.width),s=Math.max(e.y+e.height,n.y+n.height);return t.initialize(i,r,a-i,s-r)},o[0])}static elementTransform(o,e){let n=e.getBoundingClientRect(),i=U.sub(o,U.initialize(n.left,n.top));return t.initialize(i.x,i.y,o.width,o.height)}static updateIsNotFinite(o){return!Number.isFinite(o.width)||!Number.isFinite(o.height)||!Number.isFinite(o.x)||!Number.isFinite(o.y)?t.initialize(0,0,0,0):o}};function zv(t,o){let e=Math.max(t.width,o),n=Math.max(t.height,o),i=(e-t.width)/2,r=(n-t.height)/2;return te.initialize(t.x-i,t.y-r,e,n)}function nm(t,o){t=te.updateIsNotFinite(t),o.setAttribute("x",t.x.toString()),o.setAttribute("y",t.y.toString()),o.setAttribute("width",t.width.toString()),o.setAttribute("height",t.height.toString())}function Hv(t,o){t=te.updateIsNotFinite(t),o.setAttribute("viewBox",`${t.x} ${t.y} ${t.width} ${t.height}`)}var rt=class t{constructor(o=0,e=0,n=0,i=0,r=0,a=0,s=0,c=0){this.x=o,this.y=e,this.width=n,this.height=i,this.radius1=r,this.radius2=a,this.radius3=s,this.radius4=c,this.gravityCenter=U.initialize(),this.gravityCenter=this.calculateGravityCenter(this)}calculateGravityCenter(o){return new ce(o.x+o.width/2,o.y+o.height/2)}static fromRect(o){return new t(o.x,o.y,o.width,o.height)}static fromRoundedRect(o){return new t(o.x,o.y,o.width,o.height,o.radius1,o.radius2,o.radius3,o.radius4)}static fromCenter(o,e,n){return new t(o.gravityCenter.x-e/2,o.gravityCenter.y-n/2,e,n,o.radius1,o.radius2,o.radius3,o.radius4)}static fromPoint(o){return new t(o.x,o.y)}addPoint(o){let e=t.fromRoundedRect(this);return e.x+=o.x,e.y+=o.y,e.gravityCenter=this.calculateGravityCenter(e),e}},Dt=class t{static initialize(o=0,e=0){return{width:o,height:e}}static isEqual(o,e){return o.width===e.width&&o.height===e.height}static offsetFromElement(o){if(o instanceof SVGGraphicsElement){let e=o.getBBox();return t.initialize(e.width,e.height)}else if(o instanceof HTMLElement)return t.initialize(o.offsetWidth,o.offsetHeight)}};function U5(){return{position:U.initialize(),scaledPosition:U.initialize(),scale:1,rotate:0}}function $5(t){let o;if(t){t=t.replace("matrix(",""),t=t.replace(")","");let e=t.split(" ");o={position:{x:Number(e[4]),y:Number(e[5])},scaledPosition:U.initialize(),scale:Number(e[0]),rotate:0}}return o}var ii=class{static toString(o){let e=U.sum(o.position,o.scaledPosition);return`matrix(${o.scale}, 0, 0, ${o.scale}, ${e.x}, ${e.y})`}static fromString(o){return $5(o)}static default(){return U5()}},At=class t{static initialize(o=0,e=0){return U.initialize(o,e)}static fromPoints(o,e){return t.initialize(e.x-o.x,e.y-o.y)}static vectorLength(o){return Math.sqrt(t.magnitudeSquared(o))}static magnitudeSquared(o){return o.x*o.x+o.y*o.y}static dotProduct(o,e){return o.x*e.x+o.y*e.y}static crossProduct(o,e){return o.x*e.y-o.y*e.x}static subtract(o,e){return t.initialize(o.x-e.x,o.y-e.y)}static add(o,e){return t.initialize(o.x+e.x,o.y+e.y)}static scale(o,e){return t.initialize(o.x*e,o.y*e)}static angle(o,e){let n=Math.acos(Math.max(-1,Math.min(t.dotProduct(o,e)/(t.vectorLength(o)*t.vectorLength(e)),1)));return t.crossProduct(o,e)<0?-n:n}},tm=class{static parseRoundedRect(o){let e=Math.PI*.5,n=o.x,i=o.y,r=o.x+o.width,a=o.y+o.height,s=o.x+o.radius1,c=o.y+o.radius1,u=o.x+o.width-o.radius2,f=o.y+o.radius2,g=o.x+o.width-o.radius3,C=o.y+o.height-o.radius3,k=o.x+o.radius4,S=o.y+o.height-o.radius4;return[new Ni({x:s,y:c},o.radius1,o.radius1,2*e,3*e),new Ai({x:s,y:i},{x:u,y:i}),new Ni({x:u,y:f},o.radius2,o.radius2,3*e,4*e),new Ai({x:r,y:f},{x:r,y:C}),new Ni({x:g,y:C},o.radius3,o.radius3,0,e),new Ai({x:g,y:a},{x:k,y:a}),new Ni({x:k,y:S},o.radius4,o.radius4,e,2*e),new Ai({x:n,y:S},{x:n,y:c})]}},xo=class{static getRoundedRectIntersections(o,e,n){let i=tm.parseRoundedRect(n);for(let r of i)if(r instanceof Ni){let a=this.intersectArcWithLine(r,o,e);if(a.length>0)return a}else if(r instanceof Ai){let a=this.intersectLineSegments(o,e,r.point1,r.point2);if(a)return[a]}return[]}static getRoundedRectIntersectionsWithSVGPath(o,e){let n=o.getTotalLength(),i=[];for(let r=0;r<=n;r+=1){let a=o.getPointAtLength(r);i.push({x:a.x,y:a.y})}for(let r=1;r<i.length;r++){let a=this.getRoundedRectIntersections(i[r-1],i[r],e);if(a.length>0)return a}return[]}static intersectArcWithLine(o,e,n){return this.filterPointsWithinArc(this.findEllipseLineIntersections(o.center,o.radiusX,o.radiusY,e,n),o)}static intersectLineSegments(o,e,n,i){let r=e.x-o.x,a=e.y-o.y,s=i.x-n.x,c=i.y-n.y,u=(-a*(o.x-n.x)+r*(o.y-n.y))/(-s*a+r*c),f=(s*(o.y-n.y)-c*(o.x-n.x))/(-s*a+r*c);return u>=0&&u<=1&&f>=0&&f<=1?{x:o.x+f*r,y:o.y+f*a}:null}static filterPointsWithinArc(o,e){let{center:n,startAngle:i,endAngle:r}=e;if(o.length===0)return o;r<i&&([i,r]=[r,i]),(i<0||r<0)&&(i+=2*Math.PI,r+=2*Math.PI);let a=[];for(let s of o){let c=this.normalizeAngle(At.angle(At.initialize(1,0),At.initialize(s.x-n.x,s.y-n.y)));c<i&&(c+=2*Math.PI),i<=c&&c<=r&&a.push(s)}return a}static normalizeAngle(o){let e=o%(2*Math.PI);return e<0?e+2*Math.PI:e}static findEllipseLineIntersections(o,e,n,i,r){let a=At.initialize(i.x,i.y),s=At.fromPoints(i,r),c=At.initialize(o.x,o.y),u=At.subtract(a,c),f=At.initialize(s.x/(e*e),s.y/(n*n)),g=At.initialize(u.x/(e*e),u.y/(n*n)),C=At.dotProduct(s,f),k=At.dotProduct(s,g),S=At.dotProduct(u,g)-1,F=k*k-C*S;return F<0?[]:this.calculateIntersectionPoints(F,C,k,i,r)}static calculateIntersectionPoints(o,e,n,i,r){let a=[];if(o>0){let s=Math.sqrt(o),c=(-n-s)/e,u=(-n+s)/e;c>=0&&c<=1&&a.push(U.interpolatePoints(i,r,c)),u>=0&&u<=1&&a.push(U.interpolatePoints(i,r,u))}else{let s=-n/e;s>=0&&s<=1&&a.push(U.interpolatePoints(i,r,s))}return a}};var im=class{handle(o,e){let n=!0;if(this.validator&&(n=e.get(this.validator).handle(o)),!!n)return e.get(this.execution).handle(o)}execute(o,e){return e.get(this.execution).handle(o)}setValidator(o){this.validator=o}setExecution(o){this.execution=o}},V=class t{constructor(){this._injector=p(dt)}static registerPipeline(o,e,n){if(!o||!o.fToken)throw new Error("Type must have a fToken static property.");let i=this.pipelines.get(o.fToken)||new im;n?i.setValidator(e):i.setExecution(e),this.pipelines.set(o.fToken,i)}send(o){let e=t.pipelines.get(o.constructor.fToken);if(e)return e.handle(o,this._injector);throw new Error("Handler not registered for request type.")}execute(o){return t.pipelines.get(o.constructor.fToken).execute(o,this._injector)}};V.pipelines=new Map;V.\u0275fac=function(o){return new(o||V)};V.\u0275prov=y({token:V,factory:V.\u0275fac});function R(t){return function(o){V.registerPipeline(t,o,!1)}}var W5=(()=>{class t{setItem(e,n){localStorage.setItem(e,n)}getItem(e){return localStorage.getItem(e)}removeItem(e){localStorage.removeItem(e)}clear(){localStorage.clear()}static \u0275fac=function(n){return new(n||t)};static \u0275prov=y({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),K5=(()=>{class t{storage={};setItem(e,n){this.storage[e]=n}getItem(e){return this.storage[e]||null}removeItem(e){delete this.storage[e]}clear(){this.storage={}}static \u0275fac=function(n){return new(n||t)};static \u0275prov=y({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Y5=new ge("F_LOCAL_STORAGE",{providedIn:"root",factory:()=>jt(p(Ua))?p(W5):p(K5)}),X5=(()=>{class t{getComputedStyle(e){return window.getComputedStyle(e)}get innerWidth(){return window.innerWidth}get innerHeight(){return window.innerHeight}get pageXOffset(){return window.pageXOffset}get pageYOffset(){return window.pageYOffset}isMediaQuery(e){return window.matchMedia(e).matches}requestAnimationFrame(e){return window.requestAnimationFrame(e)}get location(){return window.location}open(e,n,i){window.open(e,n,i)}static \u0275fac=function(n){return new(n||t)};static \u0275prov=y({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Z5=(()=>{class t{getComputedStyle(e){return new Proxy({getPropertyValue:n=>"0"},{get:(n,i)=>i==="getPropertyValue"?n.getPropertyValue:"0"})}get innerWidth(){return 0}get innerHeight(){return 0}get pageXOffset(){return 0}get pageYOffset(){return 0}isMediaQuery(e){return!1}requestAnimationFrame(e){return setTimeout(e,0)}get location(){return{href:"",pathname:"",search:"",hash:"",origin:""}}open(e,n,i){}static \u0275fac=function(n){return new(n||t)};static \u0275prov=y({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Q5=new ge("F_WINDOW",{providedIn:"root",factory:()=>jt(p(Ua))?p(X5):p(Z5)}),oi=(function(t){return t.MAC_OS="macos",t.IOS="ios",t.WINDOWS="windows",t.ANDROID="android",t.LINUX="linux",t})(oi||{}),om;try{om=typeof Intl<"u"&&Intl.v8BreakIterator}catch{om=!1}var rm=(()=>{class t{_platformId;isBrowser=!1;EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent);TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent);BLINK=this.isBrowser&&!!(window.chrome||om)&&typeof CSS<"u"&&!this.EDGE&&!this.TRIDENT;WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT;IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window);FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent);ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT;SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT;constructor(e){this._platformId=e,this.isBrowser=this._platformId?jt(this._platformId):typeof document=="object"&&!!document}getOS(){let e=navigator.userAgent.toLowerCase(),n=/(macintosh|macintel|macppc|mac68k|macos)/i,i=/(win32|win64|windows|wince)/i,r;return n.test(e)?r=oi.MAC_OS:this.IOS?r=oi.IOS:i.test(e)?r=oi.WINDOWS:this.ANDROID?r=oi.ANDROID:!r&&/linux/.test(e)&&(r=oi.LINUX),r}static \u0275fac=function(n){return new(n||t)(ao(Ua))};static \u0275prov=y({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),at=(()=>{class t{injectedDocument;windowService;localStorageService;platformService;constructor(e,n,i,r){this.injectedDocument=e,this.windowService=n,this.localStorageService=i,this.platformService=r}isBrowser(){return this.platformService.isBrowser}get window(){return this.windowService}get localStorage(){return this.localStorageService}get document(){return this.injectedDocument}toPixels(e,n,i,r){if(e.endsWith("px"))return parseFloat(e);if(e.endsWith("%")){let a=parseFloat(e)/100;return Math.max(n,i)*a}else{if(e.endsWith("em"))return parseFloat(e)*parseFloat(r);if(e.endsWith("rem"))return parseFloat(e)*parseFloat(getComputedStyle(this.document.documentElement).fontSize);if(e.endsWith("vh")){let a=this.window.innerHeight/100;return parseFloat(e)*a}else if(e.endsWith("vw")){let a=this.window.innerWidth/100;return parseFloat(e)*a}}return parseFloat(e)||0}static \u0275fac=function(n){return new(n||t)(ao(ja),ao(Q5),ao(Y5),ao(rm))};static \u0275prov=y({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function am(t,o){return t.reduce((e,n)=>[...e,...o(n)],[])}function sm(t){let o=t.cloneNode(!0),e=o.querySelectorAll("[id]"),n=t.nodeName.toLowerCase();o.removeAttribute("id");for(let i=0;i<e.length;i++)e[i].removeAttribute("id");return n==="canvas"?jv(t,o):(n==="input"||n==="select"||n==="textarea")&&Gv(t,o),qv("canvas",t,o,jv),qv("input, textarea, select",t,o,Gv),o}function qv(t,o,e,n){let i=o.querySelectorAll(t);if(i.length){let r=e.querySelectorAll(t);for(let a=0;a<i.length;a++)n(i[a],r[a])}}var J5=0;function Gv(t,o){o.type!=="file"&&(o.value=t.value),o.type==="radio"&&o.name&&(o.name=`mat-clone-${o.name}-${J5++}`)}function jv(t,o){let e=o.getContext("2d");if(e)try{e.drawImage(t,0,0)}catch{}}function lm(t,o,e){for(let n in o)if(o.hasOwnProperty(n)){let i=o[n];i?t.setProperty(n,i,e?.has(n)?"important":""):t.removeProperty(n)}return t}function Uv(t){lm(t.style,{"touch-action":"none","-webkit-user-drag":"none","-webkit-tap-highlight-color":"transparent","user-select":"none","-ms-user-select":"none","-webkit-user-select":"none","-moz-user-select":"none"})}function $v(t,o,e){return eL(t,e).dataset[o]}function eL(t,o){return t.closest(o)}function cm(t,o){let e=t.rootNodes;if(e.length===1&&e[0].nodeType===o.ELEMENT_NODE)return e[0];let n=o.createElement("div");return e.forEach(i=>n.appendChild(i)),n}function Cr(t,o){let e=tL(t,o);return!!e&&!e.classList.contains(o+"-disabled")}function tL(t,o){return t.closest(o)}function zn(t){return t.match(/^[a-zA-Z_]/)||(t="_"+t),t.replace(/[^a-zA-Z0-9_\-:.]/g,"_")}function wo(t,o,e){let n=e[t.toUpperCase()]||nL(e,t.toLowerCase());if(n===void 0)throw new Error(`Unknown ${o}: ${t}. Accepted values: ${Object.keys(e).join(", ")}`);return n}function nL(t,o){return Object.keys(t).find(e=>t[e]===o)}var iL=["markerElement"],oL=["fConnectionGradientRenderer",""],rL=["f-connection-path",""],aL=["fConnectionSelection",""],sL=["f-connection-drag-handle-start",""],lL=["f-connection-drag-handle-end",""],cL=["defs"],dL=["*"],uL=["fGroupsContainer"],pL=["fNodesContainer"],hL=["fConnectionsContainer"],fL=[[["","fGroup",""],["","fGroups",""]],[["f-snap-connection"]],[["f-connection"],["","fConnections",""]],[["f-connection-for-create"]],[["","fNode",""],["","fNodes",""]]],mL=["[fGroup], [fGroups]","f-snap-connection","f-connection, [fConnections]","f-connection-for-create","[fNode], [fNodes]"],_L=[[["svg","fMarker",""]],[["f-connection-marker-circle"],["f-connection-marker-arrow"]],[["f-connection-gradient"]],[["f-connection-waypoints"]],[["","fConnectionContent",""]]],gL=["svg[fMarker]","f-connection-marker-circle, f-connection-marker-arrow","f-connection-gradient","f-connection-waypoints","[fConnectionContent]"];function bL(t,o){t&1&&($(),N(0,"linearGradient",3)),t&2&&m("fConnectionGradientRendererFor",o)}function vL(t,o){t&1&&($(),N(0,"circle",6))}function yL(t,o){t&1&&$e(0,4)}var CL="[_nghost-%COMP%]{display:block;position:absolute;left:0;top:0;width:100%;height:100%;overflow:hidden;pointer-events:none;-webkit-user-select:none;user-select:none}",xL=[[["","fDefinitions",""]],[["f-background"]],[["f-line-alignment"]],[["f-canvas"]],[["f-selection-area"]],"*"],wL=["[fDefinitions]","f-background","f-line-alignment","f-canvas","f-selection-area","*"],fm=new ge("F_BACKGROUND_PATTERN"),$d=class{fPattern;static fToken=Symbol("AddPatternToBackgroundRequest");constructor(o){this.fPattern=o}},Eo=class{_items=[];_byId=new Map;get(o){return this._byId.get(o)}require(o){let e=this._byId.get(o);if(!e)throw new Error(`${this.kind} not found: ${o}`);return e}has(o){return this._byId.has(o)}getAll(){return this._items}size(){return this._items.length}add(o){let e=o.fId();if(this._byId.has(e))throw new Error(`${this.kind} already exists: ${e}`);this._items.push(o),this._byId.set(e,o)}addMany(o){for(let e of o)this.add(e)}remove(o){let e=o.fId(),n=this._byId.get(e);if(!n)return!1;this._byId.delete(e);let i=this._items.indexOf(n);return i>=0&&this._items.splice(i,1),!0}removeById(o){let e=this._byId.get(o);if(!e)return;this._byId.delete(o);let n=this._items.indexOf(e);return n>=0&&this._items.splice(n,1),e}clear(){this._items.length=0,this._byId.clear()}};function Li(t){return{name:t}}var mm=class{_instances=new Map;get(o){return this._instances.get(o.name)}require(o){let e=this.get(o);if(!e)throw new Error(`Instance not found: ${o.name}`);return e}has(o){return this._instances.has(o.name)}add(o,e){if(this._instances.has(o.name))throw new Error(`${o.name} already exists`);this._instances.set(o.name,e)}remove(o){if(!this._instances.has(o.name))throw new Error(`${o.name} does not exist`);return this._instances.delete(o.name),!0}clear(){this._instances.clear()}},wr=class extends Eo{kind;constructor(o){super(),this.kind=o}},_m=class extends Eo{kind="Connection Marker"},gm=class extends Eo{kind="Connection";_instancesForCreate;_instancesForSnap;getForSnap(){return this._instancesForSnap}getForCreate(){return this._instancesForCreate}addForCreate(o){this._instancesForCreate=o}addForSnap(o){this._instancesForSnap=o}removeInstanceForCreate(){this._instancesForCreate=void 0}removeInstanceForSnap(){this._instancesForSnap=void 0}},bm=class extends Eo{kind="Node"},So=class{notifyOnSubscribe;static fToken=Symbol("ListenConnectionsChangesRequest");constructor(o=!0){this.notifyOnSubscribe=o}};function TL(){return t=>{let o=null,e=null,n=()=>{o!==null&&cancelAnimationFrame(o),e!==null&&cancelAnimationFrame(e),o=e=null};return{callback:()=>{n(),o=requestAnimationFrame(()=>{o=null,e=requestAnimationFrame(()=>{e=null,t()})})},cleanup:n}}}function SL(){return t=>{let o=null;return{callback:()=>{o!==null&&cancelAnimationFrame(o),o=requestAnimationFrame(()=>{o=null,t()})},cleanup:()=>{o!==null&&cancelAnimationFrame(o),o=null}}}}function Wd(t){return o=>{let e=null;return{callback:()=>{e!==null&&clearTimeout(e),e=setTimeout(()=>{e=null,o()},t)},cleanup:()=>{e!==null&&clearTimeout(e),e=null}}}}var sn=class{_listeners=new Set;notify(){this._listeners.forEach(o=>o())}listen(o){return this._listeners.add(o),()=>this.stop(o)}stop(o){this._listeners.delete(o)}},vm=class extends sn{_htmlElement;_observer=new ResizeObserver(()=>this.notify());_isObserving=!1;constructor(o){super(),this._htmlElement=o}listen(o){return this._isObserving||(this._observer.observe(this._htmlElement),this._isObserving=!0),super.listen(o)}stop(o){super.stop(o),this._listeners.size===0&&this._disconnect()}_disconnect(){this._observer.unobserve(this._htmlElement),this._observer.disconnect(),this._isObserving=!1}},Mn=class t{_channels=[];_operators=[];constructor(...o){this._channels=[...o]}pipe(...o){let e=new t(...this._channels);return e._operators=[...this._operators,...o],e}listen(o,e){let n=e,i=[],r=[],a=[];for(let g of[...this._operators].reverse()){let C=g(n);n=C.callback,C.cleanup&&i.push(C.cleanup),C.onSubscribe&&r.push(C.onSubscribe),C.setTeardown&&a.push(C.setTeardown)}let s=this._channels.map(g=>g.listen(()=>n())),c=null,u=!1,f=()=>{u||(u=!0,c?.(),c=null,s.forEach(g=>g()),i.forEach(g=>g()))};a.slice().reverse().forEach(g=>g(f)),r.slice().reverse().forEach(g=>g(n)),c=o.onDestroy(f)}};function wh(){return t=>{let o=!0;return{callback:t,onSubscribe:e=>{queueMicrotask(()=>{o&&e()})},cleanup:()=>{o=!1}}}}function Wv(){return t=>{let o=!1,e=null;return{setTeardown:n=>e=n,callback:()=>{if(!o){o=!0;try{t()}finally{e?.()}}}}}}var kL=(()=>{let t=class ws{_store=p(L);handle({notifyOnSubscribe:e}){return e?new Mn(this._store.connectionsChanges$).pipe(wh(),Wd(1)):new Mn(this._store.connectionsChanges$).pipe(Wd(1))}static \u0275fac=function(n){return new(n||ws)};static \u0275prov=y({token:ws,factory:ws.\u0275fac})};return t=P([R(So)],t),t})(),ym=class{static fToken=Symbol("ListenNodesChangesRequest")},IL=(()=>{let t=class Ts{_store=p(L);handle(e){return new Mn(this._store.nodesChanges$)}static \u0275fac=function(n){return new(n||Ts)};static \u0275prov=y({token:Ts,factory:Ts.\u0275fac})};return t=P([R(ym)],t),t})(),Kd=class{static fToken=Symbol("ListenTransformChangesRequest")},EL=(()=>{let t=class Ss{_store=p(L);handle(e){return new Mn(this._store.transformChanges$,this._store.connectionsChanges$,this._store.nodesChanges$)}static \u0275fac=function(n){return new(n||Ss)};static \u0275prov=y({token:Ss,factory:Ss.\u0275fac})};return t=P([R(Kd)],t),t})(),Bi=class{static fToken=Symbol("EmitConnectionsChangesRequest")},ML=(()=>{let t=class ks{_store=p(L);handle(e){this._store.emitConnectionChanges()}static \u0275fac=function(n){return new(n||ks)};static \u0275prov=y({token:ks,factory:ks.\u0275fac})};return t=P([R(Bi)],t),t})(),li=class{static fToken=Symbol("NotifyTransformChangedRequest")},L=(()=>{class t{transformChanges$=new sn;viewportAnimationChanges$=new sn;connectionsChanges$=new sn;_connectionsRevision=0;connectionsRenderedChanges$=new sn;_connectionsRenderedRevision=0;_connectionsRenderedNodesRevision=0;_viewportAnimationCount=0;nodesChanges$=new sn;_nodesRevision=0;progressiveRenderChanges$=new sn;_pendingProgressiveRenderCount=0;get connectionsRevision(){return this._connectionsRevision}get connectionsRenderedRevision(){return this._connectionsRenderedRevision}get connectionsRenderedNodesRevision(){return this._connectionsRenderedNodesRevision}get nodesRevision(){return this._nodesRevision}get hasPendingProgressiveRender(){return this._pendingProgressiveRenderCount>0}get isViewportAnimating(){return this._viewportAnimationCount>0}get flowHost(){return this.fFlow?.hostElement}fFlow;fCanvas;get transform(){return this.fCanvas?.transform}nodes=new bm;connections=new gm;connectionMarkers=new _m;outputs=new wr("Output");inputs=new wr("Input");outlets=new wr("Outlet");instances=new mm;fDraggable;emitNodeChanges(){this._nodesRevision++,this.nodesChanges$.notify()}emitConnectionChanges(){this._connectionsRevision++,this.connectionsChanges$.notify()}completeConnectionsRender(e,n){e<this._connectionsRenderedRevision||e===this._connectionsRenderedRevision&&n<=this._connectionsRenderedNodesRevision||(this._connectionsRenderedRevision=Math.min(e,this._connectionsRevision),this._connectionsRenderedNodesRevision=n,this.connectionsRenderedChanges$.notify())}beginProgressiveRender(){this._pendingProgressiveRenderCount++,this.progressiveRenderChanges$.notify()}endProgressiveRender(){this._pendingProgressiveRenderCount&&(this._pendingProgressiveRenderCount--,this.progressiveRenderChanges$.notify())}transformChanged(){this.transformChanges$.notify()}beginViewportAnimation(){this._viewportAnimationCount++,this.viewportAnimationChanges$.notify()}endViewportAnimation(){this._viewportAnimationCount&&(this._viewportAnimationCount--,this.viewportAnimationChanges$.notify())}static \u0275fac=function(n){return new(n||t)};static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),Ye={MAGNETIC_LINES:Li("magnetic-lines"),MAGNETIC_RECTS:Li("magnetic-rects"),ZOOM:Li("zoom-controls"),BACKGROUND:Li("background"),SELECTION_AREA:Li("selection-area"),MINIMAP:Li("minimap"),AUTO_PAN:Li("auto-pan")},DL=(()=>{let t=class Is{_store=p(L);handle(e){this._store.transformChanged()}static \u0275fac=function(n){return new(n||Is)};static \u0275prov=y({token:Is,factory:Is.\u0275fac})};return t=P([R(li)],t),t})(),ci=class{key;instance;static fToken=Symbol("RegisterPluginInstanceRequest");constructor(o,e){this.key=o,this.instance=e}},PL=(()=>{let t=class Es{_store=p(L);handle({key:e,instance:n}){this._store.instances.add(e,n)}static \u0275fac=function(n){return new(n||Es)};static \u0275prov=y({token:Es,factory:Es.\u0275fac})};return t=P([R(ci)],t),t})(),di=class{key;static fToken=Symbol("RemovePluginInstanceRequest");constructor(o){this.key=o}},RL=(()=>{let t=class Ms{_store=p(L);handle({key:e}){this._store.instances.remove(e)}static \u0275fac=function(n){return new(n||Ms)};static \u0275prov=y({token:Ms,factory:Ms.\u0275fac})};return t=P([R(di)],t),t})(),OL=[L,IL,kL,EL,ML,DL,PL,RL],FL=0,NL=(()=>{let t=class Ds{_store=p(L);_browser=p(at);get _backgroundElement(){return this._store.instances.get(Ye.BACKGROUND)?.hostElement}handle(e){let n=this._getPatterns(e.fPattern?.hostElement);if(!n?.length)return;let i=Io("defs",this._browser);if(e.fPattern?.hostElement.remove(),n.forEach(r=>{i.append(r)}),n.length){this._backgroundElement?.firstChild?.appendChild(i),n[n.length-1].id="f-background-pattern-"+FL++;let r=n[n.length-1].id,a=Io("rect",this._browser);a.setAttribute("fill","url(#"+r+")"),a.setAttribute("width","100%"),a.setAttribute("height","100%"),this._backgroundElement?.firstChild?.appendChild(a);let s=this._store.fCanvas?.transform||ii.default();e.fPattern?.setTransform(s)}}_getPatterns(e){return Array.from(e?.getElementsByTagName("pattern")||[])}static \u0275fac=function(n){return new(n||Ds)};static \u0275prov=y({token:Ds,factory:Ds.\u0275fac})};return t=P([R($d)],t),t})(),Tr=class{fTransform;static fToken=Symbol("SetBackgroundTransformRequest");constructor(o){this.fTransform=o}},AL=(()=>{let t=class Ps{_store=p(L);handle(e){this._store.instances.get(Ye.BACKGROUND)?.setTransform(e.fTransform)}static \u0275fac=function(n){return new(n||Ps)};static \u0275prov=y({token:Ps,factory:Ps.\u0275fac})};return t=P([R(Tr)],t),t})(),LL=[NL,AL],Yd=class{instance;static fToken=Symbol("AddCanvasToStoreRequest");constructor(o){this.instance=o}},BL=(()=>{let t=class Rs{_store=p(L);handle({instance:e}){this._store.fCanvas=e}static \u0275fac=function(n){return new(n||Rs)};static \u0275prov=y({token:Rs,factory:Rs.\u0275fac})};return t=P([R(Yd)],t),t})(),Xd=class{id;animated;static fToken=Symbol("CenterGroupOrNodeRequest");constructor(o,e){this.id=o,this.animated=e}},VL=(()=>{let t=class Os{_store=p(L);_mediator=p(V);get _transform(){return this._store.transform}handle({id:e,animated:n}){let i=this._store.nodes.get(e);i&&(this._toCenter(this._getNodeRect(i),this._getFlowRect(),i._position),this._mediator.execute(new Mo(n,Vi.VIEWPORT_ONLY)))}_toCenter(e,n,i){this._transform.scaledPosition=U.initialize(),this._transform.position=U.initialize((n.width-e.width)/2-i.x*this._transform.scale,(n.height-e.height)/2-i.y*this._transform.scale)}_getNodeRect(e){return te.fromElement(e.hostElement)}_getFlowRect(){return te.fromElement(this._store.flowHost)}static \u0275fac=function(n){return new(n||Os)};static \u0275prov=y({token:Os,factory:Os.\u0275fac})};return t=P([R(Xd)],t),t})(),Zd=class{toCenter;animated;static fToken=Symbol("FitToFlowRequest");constructor(o,e){this.toCenter=o,this.animated=e}},zL=(()=>{let t=class Fs{_store=p(L);get _transform(){return this._store.transform}_mediator=p(V);handle({toCenter:e,animated:n}){let i=this._mediator.execute(new Ao)||te.initialize();i.width===0||i.height===0||(this.fitToParent(i,te.fromElement(this._store.flowHost),this._store.nodes.getAll().map(r=>r._position),e),this._mediator.execute(new Mo(n,Vi.VIEWPORT_ONLY)))}fitToParent(e,n,i,r){this._transform.scaledPosition=U.initialize(),this._transform.position=this._getZeroPositionWithoutScale(i);let a=e.width/this._transform.scale+r.x,s=e.height/this._transform.scale+r.y;(a>n.width||s>n.height||a<n.width&&s<n.height)&&(this._transform.scale=Math.min(n.width/a,n.height/s));let c=(n.width-a*this._transform.scale)/2-this._transform.position.x*this._transform.scale,u=(n.height-s*this._transform.scale)/2-this._transform.position.y*this._transform.scale;this._transform.position=U.initialize(c+r.x/2*this._transform.scale,u+r.y/2*this._transform.scale)}_getZeroPositionWithoutScale(e){let n=e.length?Math.min(...e.map(r=>r.x)):0,i=e.length?Math.min(...e.map(r=>r.y)):0;return U.initialize(n,i)}static \u0275fac=function(n){return new(n||Fs)};static \u0275prov=y({token:Fs,factory:Fs.\u0275fac})};return t=P([R(Zd)],t),t})(),Qd=class{transform;position;static fToken=Symbol("InputCanvasPositionRequest");constructor(o,e){this.transform=o,this.position=e}},HL=(()=>{let t=class Ns{_store=p(L);handle({transform:e,position:n}){n&&(U.isEqual(this._calculateTransformPosition(e),n)||(e.position=n,e.scaledPosition=U.initialize(),this._store.fCanvas?.redraw()))}_calculateTransformPosition(e){return U.sum(e.position,e.scaledPosition)}static \u0275fac=function(n){return new(n||Ns)};static \u0275prov=y({token:Ns,factory:Ns.\u0275fac})};return t=P([R(Qd)],t),t})(),Jd=class{transform;scale;static fToken=Symbol("InputCanvasScaleRequest");constructor(o,e){this.transform=o,this.scale=e}},qL=(()=>{let t=class As{_store=p(L);handle(e){!e.scale&&e.scale!==0||(e.transform.scale=e.scale,this._store.fCanvas?.redraw())}static \u0275fac=function(n){return new(n||As)};static \u0275prov=y({token:As,factory:As.\u0275fac})};return t=P([R(Jd)],t),t})(),Vi=(function(t){return t.VIEWPORT_ONLY="VIEWPORT_ONLY",t.WITH_CONNECTION_CHANGES="WITH_CONNECTION_CHANGES",t})(Vi||{}),Mo=class{animated;context;static fToken=Symbol("RedrawCanvasWithAnimationRequest");constructor(o,e=Vi.WITH_CONNECTION_CHANGES){this.animated=o,this.context=e}};function yy(t,o){let e=n=>{n.propertyName==="transform"&&(t.removeEventListener("transitionend",e),o(n))};t.addEventListener("transitionend",e)}var GL=(()=>{let t=class Ls{_store=p(L);get _canvas(){return this._store.fCanvas}handle(e){e.animated?this._redrawWithAnimation(e.context):this._redraw(e.context),this._canvas?.emitCanvasChangeEvent()}_redrawWithAnimation(e){this._store.beginViewportAnimation(),this._canvas?.redrawWithAnimation(),yy(this._canvas.hostElement,()=>{this._store.endViewportAnimation(),e===Vi.WITH_CONNECTION_CHANGES&&this._store.emitConnectionChanges()})}_redraw(e){this._canvas?.redraw(),e===Vi.WITH_CONNECTION_CHANGES&&this._store.emitConnectionChanges()}static \u0275fac=function(n){return new(n||Ls)};static \u0275prov=y({token:Ls,factory:Ls.\u0275fac})};return t=P([R(Mo)],t),t})(),eu=class{static fToken=Symbol("RemoveCanvasFromStoreRequest")},jL=(()=>{let t=class Bs{_store=p(L);handle(e){this._store.fCanvas=void 0}static \u0275fac=function(n){return new(n||Bs)};static \u0275prov=y({token:Bs,factory:Bs.\u0275fac})};return t=P([R(eu)],t),t})(),tu=class{static fToken=Symbol("ResetScaleRequest")},UL=(()=>{let t=class Vs{_store=p(L);get _transform(){return this._store.transform}handle(e){this._transform.scale=1,this._transform.scaledPosition=U.initialize()}static \u0275fac=function(n){return new(n||Vs)};static \u0275prov=y({token:Vs,factory:Vs.\u0275fac})};return t=P([R(tu)],t),t})(),nu=class{animated;static fToken=Symbol("ResetScaleAndCenterRequest");constructor(o){this.animated=o}},$L=(()=>{let t=class zs{_mediator=p(V);_store=p(L);get _transform(){return this._store.transform}handle({animated:e}){let n=this._mediator.execute(new Ao)||te.initialize();n.width===0||n.height===0||(this._oneToOneCentering(n,te.fromElement(this._store.flowHost),this._store.nodes.getAll().map(i=>i._position)),this._mediator.execute(new Mo(e,Vi.VIEWPORT_ONLY)))}_oneToOneCentering(e,n,i){this._transform.scaledPosition=U.initialize(),this._transform.position=this._getZeroPositionWithoutScale(i);let r=(n.width-e.width/this._transform.scale)/2-this._transform.position.x,a=(n.height-e.height/this._transform.scale)/2-this._transform.position.y;this._transform.scale=1,this._transform.position=U.initialize(r,a)}_getZeroPositionWithoutScale(e){let n=e.length?Math.min(...e.map(r=>r.x)):0,i=e.length?Math.min(...e.map(r=>r.y)):0;return U.initialize(n,i)}static \u0275fac=function(n){return new(n||zs)};static \u0275prov=y({token:zs,factory:zs.\u0275fac})};return t=P([R(nu)],t),t})(),iu=class{scale;toPosition;static fToken=Symbol("UpdateScaleRequest");constructor(o,e){this.scale=o,this.toPosition=e}},WL=(()=>{let t=class Hs{_store=p(L);get _transform(){return this._store.transform}handle({scale:e,toPosition:n}){if(e===this._transform.scale)return;let i=U.sum(this._transform.scaledPosition,this._transform.position),r=n.x-(n.x-i.x)*e/this._transform.scale,a=n.y-(n.y-i.y)*e/this._transform.scale;this._transform.scale=e,this._transform.scaledPosition=U.sub(U.initialize(r,a),this._transform.position)}static \u0275fac=function(n){return new(n||Hs)};static \u0275prov=y({token:Hs,factory:Hs.\u0275fac})};return t=P([R(iu)],t),t})(),KL=[BL,VL,zL,HL,qL,GL,jL,UL,$L,WL],Cm=class{connection;static fToken=Symbol("AddConnectionForCreateToStoreRequest");constructor(o){this.connection=o}},YL=(()=>{let t=class qs{_store=p(L);handle({connection:e}){this._store.connections.addForCreate(e)}static \u0275fac=function(n){return new(n||qs)};static \u0275prov=y({token:qs,factory:qs.\u0275fac})};return t=P([R(Cm)],t),t})(),ou=class{instance;static fToken=Symbol("AddConnectionMarkerToStoreRequest");constructor(o){this.instance=o}},XL=(()=>{let t=class Gs{_store=p(L);handle({instance:e}){this._store.connectionMarkers.add(e),this._store.emitNodeChanges()}static \u0275fac=function(n){return new(n||Gs)};static \u0275prov=y({token:Gs,factory:Gs.\u0275fac})};return t=P([R(ou)],t),t})(),ru=class{connection;static fToken=Symbol("AddConnectionToStoreRequest");constructor(o){this.connection=o}},ZL=(()=>{let t=class js{_store=p(L);handle({connection:e}){this._store.connections.add(e),this._store.emitConnectionChanges()}static \u0275fac=function(n){return new(n||js)};static \u0275prov=y({token:js,factory:js.\u0275fac})};return t=P([R(ru)],t),t})(),xm=class{connection;static fToken=Symbol("AddSnapConnectionToStoreRequest");constructor(o){this.connection=o}},QL=(()=>{let t=class Us{_store=p(L);handle({connection:e}){this._store.connections.addForSnap(e)}static \u0275fac=function(n){return new(n||Us)};static \u0275prov=y({token:Us,factory:Us.\u0275fac})};return t=P([R(xm)],t),t})(),Do=class{connection;static fToken=Symbol("CreateConnectionMarkersRequest");constructor(o){this.connection=o}},Kv=new ge("F_CONNECTION_CONTENT");var au=class t{points;cumulativeLengths;segmentTangents;totalLength;constructor(o){let e=t._removeConsecutiveDuplicates(o);if(e.length<2){this.points=[{x:0,y:0},{x:1,y:0}],this.cumulativeLengths=[0,1],this.segmentTangents=[{x:1,y:0}],this.totalLength=1;return}this.points=e;let n=this.points.length,i=n-1,r=new Array(n).fill(0),a=new Array(i),s=0;for(let c=0;c<i;c++){let u=this.points[c+1].x-this.points[c].x,f=this.points[c+1].y-this.points[c].y,g=Math.hypot(u,f),C=g?u/g:1,k=g?f/g:0;a[c]={x:C,y:k},s+=g,r[c+1]=s}this.cumulativeLengths=r,this.segmentTangents=a,this.totalLength=s||1}static from(o){return new t(o.map(e=>({x:e.x,y:e.y})))}static _removeConsecutiveDuplicates(o){let e=[];for(let n of o){let i=e[e.length-1];(!i||i.x!==n.x||i.y!==n.y)&&e.push({x:n.x,y:n.y})}return e}},wm=class t{_polyline;constructor(o=[]){this._polyline=new au(o)}updatePoints(o){return this._polyline=new au(o),this._polyline.totalLength}calculateTotalLength(o){return this.updatePoints(o)}get totalLength(){return this._polyline.totalLength}getPointAtProgress(o){let{points:e,cumulativeLengths:n,segmentTangents:i,totalLength:r}=this._polyline,s=t._clamp(o,0,1)*r,c=.5;if(s<=c)return{point:e[0],tangent:i[0]??{x:1,y:0},atEdge:!0};if(r-s<=c){let ee=e.length-1;return{point:e[ee],tangent:i[ee-1]??{x:1,y:0},atEdge:!0}}let u=t._findRightIndex(n,s),f=Math.max(1,u),g=n[f-1],C=n[f],k=t._safeRatio(s-g,C-g),S=e[f-1],F=e[f],q={x:t._lerp(S.x,F.x,k),y:t._lerp(S.y,F.y,k)},Y=i[f-1]??{x:1,y:0};return{point:q,tangent:Y,atEdge:!1}}getPointAtLength(o){return this.getPointAtProgress(o)}getPointAtDistance(o){let e=this._polyline.totalLength?o/this._polyline.totalLength:0;return this.getPointAtProgress(e)}static _findRightIndex(o,e){let n=0,i=o.length-1;for(;n<i;){let r=n+i>>1;o[r]<e?n=r+1:i=r}return n}static _lerp(o,e,n){return o+(e-o)*n}static _clamp(o,e,n){return o<e?e:o>n?n:o}static _safeRatio(o,e){let n=Math.abs(e)<1e-6?1e-6:e;return o/n}},Cy=(function(t){return t.NONE="none",t.ALONG="along",t})(Cy||{}),Tm=class{compute(o,e){let n=this._clamp01(e.position()),{point:i,tangent:r}=o.getPointAtLength(n),a={x:-r.y,y:r.x},s=e.offset()??0,c=i.x+a.x*s,u=i.y+a.y*s,g=this._sizeAlongDirection(e.hostElement,r)*.5,C=n*o.totalLength,k=o.totalLength-C,S=this._applyEdgeGuard(c,u,r,C,k,g),F=this._calculateContentRotation(e.align(),r);return{position:S,rotationDeg:F}}_clamp01(o){return o<=0?0:o>=1?1:o}_applyEdgeGuard(o,e,n,i,r,a){if(i<=a){let s=a-i;return{x:o+n.x*s,y:e+n.y*s}}if(r<=a){let s=a-r;return{x:o-n.x*s,y:e-n.y*s}}return{x:o,y:e}}_sizeAlongDirection(o,e){let n=te.fromElement(o);return Math.abs(e.x)*n.width+Math.abs(e.y)*n.height}_normalize180(o){let e=(o+180)%360;return e<0&&(e+=360),e-180}_keepUpright(o){let e=this._normalize180(o);return e>90?e-=180:e<-90&&(e+=180),e}_calculateContentRotation(o,e){let n=0;return o===Cy.ALONG&&(n=Math.atan2(e.y,e.x)*180/Math.PI,n=this._keepUpright(n)),n}},Sm=class{_placement;constructor(o=new Tm){this._placement=o}layout(o,e){let n=new wm(o),i=n.totalLength;for(let r of e){let{position:a,rotationDeg:s}=this._placement.compute(n,r);r.hostElement.style.transform=this._createTransformString(a,s)}return i}_createTransformString(o,e){return`translate3d(${o.x}px, ${o.y}px, 0) translate(-50%, -50%) rotate(${e}deg)`}};var Yv=new ge("F_CONNECTION_WAYPOINTS");function xy(t,o,e){return(t.x-o.x)**2+(t.y-o.y)**2<=e**2}function JL(t,o){let e=t.fWaypoints(),n=e?.radius()||8;return e?.candidates().find(i=>xy(o,i,n))}function e6(t,o){let e=t.fWaypoints(),n=e?.radius()||8;return e?.waypoints().find(i=>xy(o,i,n))}function t6(t,o){for(let e of t){let n=e6(e,o);if(n&&e.fWaypoints()?.visibility())return{connection:e,waypoint:n};let i=JL(e,o);if(i&&e.fWaypoints()?.visibility())return{connection:e,candidate:i}}}var Th=new ge("F_CONNECTION_COMPONENTS_PARENT");var ze=(function(t){return t.START="f-connection-marker-start",t.END="f-connection-marker-end",t.SELECTED_START="f-connection-selected-marker-start",t.SELECTED_END="f-connection-selected-marker-end",t.START_ALL_STATES="f-connection-marker-start-all-states",t.END_ALL_STATES="f-connection-marker-end-all-states",t})(ze||{}),su=new ge("F_CONNECTION_MARKER"),n6=0,lu=class{fId=X(`f-marker-${n6++}`);hostElement=p(Ze).nativeElement};function wy(t,o=ze.START){if(typeof t!="string")return o;let e=t.trim().toLowerCase();return e?i6(e)??o:o}function i6(t){switch(t){case"start":case"f-connection-marker-start":return ze.START;case"end":case"f-connection-marker-end":return ze.END;case"selected-start":case"f-connection-selected-marker-start":return ze.SELECTED_START;case"selected-end":case"f-connection-selected-marker-end":return ze.SELECTED_END;case"start-all-states":case"f-connection-marker-start-all-states":case"start-all":case"all-start":return ze.START_ALL_STATES;case"end-all-states":case"f-connection-marker-end-all-states":case"end-all":case"all-end":return ze.END_ALL_STATES;default:return null}}var Ty=(()=>{class t extends lu{_markerElement=nt.required("markerElement");_type=B(ze.END_ALL_STATES,{alias:"type",transform:e=>wy(e,ze.END_ALL_STATES)});get markerElement(){return this._markerElement().nativeElement}width=6;height=7;refX=5.5;refY=3.5;get type(){return this._type()}orient="auto";markerUnits="strokeWidth";static \u0275fac=(()=>{let e;return function(i){return(e||(e=G(t)))(i||t)}})();static \u0275cmp=z({type:t,selectors:[["f-connection-marker-arrow"]],viewQuery:function(n,i){n&1&&_n(i._markerElement,iL,5),n&2&&Ht()},hostAttrs:[1,"f-component",2,"display","none"],inputs:{_type:[1,"type","_type"]},features:[we([{provide:su,useExisting:t}]),Z],decls:3,vars:0,consts:[["markerElement",""],["viewBox","0 0 6 6",1,"f-marker"],["d","M0,0 L6,3 0,6Z"]],template:function(n,i){n&1&&($(),re(0,"svg",1,0),ie(2,"path",2),fe())},encapsulation:2})}return t})();var Sy=(()=>{class t extends lu{_mediator=p(V);markerElement=this.hostElement;width=0;height=0;refX=0;refY=0;type=ze.START;orient="auto";markerUnits="strokeWidth";ngOnInit(){this.hostElement.style.display="none",this._mediator.execute(new ou(this))}ngOnDestroy(){this._mediator.execute(new Pu(this))}static \u0275fac=(()=>{let e;return function(i){return(e||(e=G(t)))(i||t)}})();static \u0275dir=je({type:t,selectors:[["svg","fMarker",""]],hostAttrs:[1,"f-component","f-marker"],inputs:{width:"width",height:"height",refX:"refX",refY:"refY",type:[2,"type","type",e=>wy(e,ze.START)],orient:"orient",markerUnits:"markerUnits"},standalone:!1,features:[we([{provide:su,useExisting:t}]),Z]})}return t})(),ai=(function(t){return t.FIXED="fixed",t.FIXED_CENTER="fixed_center",t.FLOATING="floating",t})(ai||{}),Ke=(function(t){return t.DEFAULT="default",t.TOP="top",t.BOTTOM="bottom",t.LEFT="left",t.RIGHT="right",t.CALCULATE="calculate",t.CALCULATE_HORIZONTAL="calculate_horizontal",t.CALCULATE_VERTICAL="calculate_vertical",t})(Ke||{});function o6({sourceRect:t,targetRect:o}){return{point1:t.gravityCenter,point2:o.gravityCenter}}var K=(function(t){return t.LEFT="left",t.TOP="top",t.RIGHT="right",t.BOTTOM="bottom",t.CALCULATE="calculate",t.CALCULATE_HORIZONTAL="calculate_horizontal",t.CALCULATE_VERTICAL="calculate_vertical",t.AUTO="auto",t})(K||{}),To=(function(t){return t.SEGMENT="segment",t.STRAIGHT="straight",t.BEZIER="bezier",t.ADAPTIVE_CURVE="adaptive-curve",t})(To||{});function r6({sourceRect:t,sourceConnectableSide:o,targetRect:e,targetConnectableSide:n}){return{point1:Xv(t,o===K.AUTO?K.BOTTOM:o),point2:Xv(e,n===K.AUTO?K.TOP:n)}}function Xv(t,o){switch(o){case K.TOP:return{x:t.x+t.width/2,y:t.y};case K.BOTTOM:return{x:t.x+t.width/2,y:t.y+t.height};case K.LEFT:return{x:t.x,y:t.y+t.height/2};case K.RIGHT:return{x:t.x+t.width,y:t.y+t.height/2};default:throw new Error(`Unknown side: ${o}`)}}function ky(t,o,e,n){if(!n||!n.rotationDeg)return xo.getRoundedRectIntersections(t,o,e)[0];let i=$s(t,-n.rotationDeg,n.pivot),r=$s(o,-n.rotationDeg,n.pivot),a=a6(e,-n.rotationDeg,n.pivot),s=xo.getRoundedRectIntersections(i,r,a)[0];return s?$s(s,n.rotationDeg,n.pivot):void 0}function a6(t,o,e){let n=$s(s6(t),o,e);return new rt(n.x-t.width/2,n.y-t.height/2,t.width,t.height,t.radius1,t.radius2,t.radius3,t.radius4)}function s6(t){return{x:t.x+t.width/2,y:t.y+t.height/2}}function $s(t,o,e){let n=t.x-e.x,i=t.y-e.y,r=o*Math.PI/180,a=Math.cos(r),s=Math.sin(r);return{x:n*a-i*s+e.x,y:n*s+i*a+e.y}}function l6({sourceRect:t,targetRect:o,sourceRotationContext:e,targetRotationContext:n}){return u6(c6(t,o,e),d6(t,o,n),t,o)}function c6(t,o,e){return ky(t.gravityCenter,o.gravityCenter,t,e)}function d6(t,o,e){return ky(o.gravityCenter,t.gravityCenter,o,e)}function u6(t,o,e,n){return{point1:t||e.gravityCenter,point2:o||n.gravityCenter}}var Cs=.5,p6={[ai.FLOATING]:l6,[ai.FIXED_CENTER]:o6,[ai.FIXED]:r6},qo=(()=>{class t{handle(e){let n=this._calculateDirectionalVectors(e.sourceRect.gravityCenter.x,e.sourceRect.gravityCenter.y,e.targetRect.gravityCenter.x,e.targetRect.gravityCenter.y),i=this._determineSourceSide(e,n),r=this._determineTargetSide(e,n);return e.connection._applyResolvedSidesToConnection(i,r),this._getBehaviorHandler(e.connection.fBehavior)({sourceRect:e.sourceRect,targetRect:e.targetRect,sourceConnectableSide:i,targetConnectableSide:r,sourceRotationContext:e.sourceRotationContext,targetRotationContext:e.targetRotationContext})}_calculateDirectionalVectors(e,n,i,r){let a=i-e,s=r-n;return{sourceToTargetX:a,sourceToTargetY:s,targetToSourceX:-a,targetToSourceY:-s}}_determineSourceSide(e,n){return this._resolveConnectableSide(e.connection.fOutputSide(),n.sourceToTargetX,n.sourceToTargetY,e.sourceConnectableSide)}_determineTargetSide(e,n){return this._resolveConnectableSide(e.connection.fInputSide(),n.targetToSourceX,n.targetToSourceY,e.targetConnectableSide)}_resolveConnectableSide(e,n,i,r){if(e===Ke.DEFAULT)return r;let a=Math.abs(n),s=Math.abs(i);if(a<Cs&&s<Cs)return r;let u=a>=s;switch(e){case Ke.CALCULATE:return u?n>=0?K.RIGHT:K.LEFT:i>=0?K.BOTTOM:K.TOP;case Ke.CALCULATE_HORIZONTAL:return a<Cs?r:n>=0?K.RIGHT:K.LEFT;case Ke.CALCULATE_VERTICAL:return s<Cs?r:i>=0?K.BOTTOM:K.TOP;case Ke.TOP:return K.TOP;case Ke.BOTTOM:return K.BOTTOM;case Ke.LEFT:return K.LEFT;case Ke.RIGHT:return K.RIGHT;default:return r}}_getBehaviorHandler(e){let n=p6[e];if(!n)throw new Error(`[Behavior] No handler for behavior: ${e}`);return n}static \u0275fac=function(n){return new(n||t)};static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),Cn=class{sourceRect;targetRect;connection;sourceConnectableSide;targetConnectableSide;sourceRotationContext;targetRotationContext;constructor(o,e,n,i,r,a,s){this.sourceRect=o,this.targetRect=e,this.connection=n,this.sourceConnectableSide=i,this.targetConnectableSide=r,this.sourceRotationContext=a,this.targetRotationContext=s}};function Sh(t,o,e){return[t,...e??[],o]}function h6(t,o){let e=Math.abs(o.x-t.x)/2,n=o.x<t.x?o.x+e:o.x-e,i=Math.abs(o.y-t.y)/2,r=o.y<t.y?o.y+i:o.y-i;return{x:n,y:r}}function f6(t,o=32){let e=new Array(o+1);e[0]=be({},t[0]);for(let n=1;n<=o;n++)e[n]=Iy(t[0],t[1],t[2],t[3],n/o);return e}function Iy(t,o,e,n,i){let r=1-i,a=i*i,s=r*r,c=s*r,u=a*i;return{x:c*t.x+3*s*i*o.x+3*r*a*e.x+u*n.x,y:c*t.y+3*s*i*o.y+3*r*a*e.y+u*n.y}}function Ey(t){return t.map(o=>Iy(o.p0,o.c1,o.c2,o.p3,.5))}function m6(t){if(t.length<2)throw new Error("Polylines must be at least two points");let o=_6(t);return o<=0?[be({},t[0])]:[g6(t,o/2)]}function _6(t){let o=0;for(let e=0;e<t.length-1;e++)o+=My(t[e],t[e+1]);return o}function g6(t,o){let e=0;for(let i=0;i<t.length-1;i++){let r=t[i],a=t[i+1],s=My(r,a);if(!(s<=0)){if(e+s>=o){let c=(o-e)/s;return{x:r.x+(a.x-r.x)*c,y:r.y+(a.y-r.y)*c}}e+=s}}let n=t[t.length-1];return{x:n.x,y:n.y}}function My(t,o){return Math.hypot(o.x-t.x,o.y-t.y)}function b6(t){let o=[];for(let e of t)for(let n of e){let i=o[o.length-1];(!i||i.x!==n.x||i.y!==n.y)&&o.push(n)}return o}function Dy(t){if(!t.length)return"";let o=`M ${t[0].p0.x} ${t[0].p0.y}`;for(let e=0;e<t.length;e++){let n=t[e],i=e===t.length-1,r=i?n.p3.x+2e-4:n.p3.x,a=i?n.p3.y+2e-4:n.p3.y;o+=` C ${n.c1.x} ${n.c1.y}, ${n.c2.x} ${n.c2.y}, ${r} ${a}`}return o}function Py(t,o=16){if(!t.length)return[];let e=[];for(let n=0;n<t.length;n++){let i=t[n],r=f6([i.p0,i.c1,i.c2,i.p3],o);n>0&&r.shift(),e.push(...r)}return e}function v6(t,o=1e-6){let e=t.length;if(e<=2)return t;let n=[];n.push(t[0]);for(let r=1;r<e;r++){let a=t[r],s=n[n.length-1];(Math.abs(a.x-s.x)>o||Math.abs(a.y-s.y)>o)&&n.push(a)}if(n.length<=2)return n;let i=[];i.push(n[0]);for(let r=1;r<n.length-1;r++){let a=i[i.length-1],s=n[r],c=n[r+1],u=Math.abs(a.x-s.x)<=o&&Math.abs(s.x-c.x)<=o,f=Math.abs(a.y-s.y)<=o&&Math.abs(s.y-c.y)<=o;!u&&!f&&i.push(s)}return i.push(n[n.length-1]),i}var km=class t{static _dir(o){switch(o){case K.LEFT:return{x:-1,y:0};case K.RIGHT:return{x:1,y:0};case K.TOP:return{x:0,y:-1};case K.BOTTOM:return{x:0,y:1};case K.AUTO:return{x:0,y:0}}return{x:0,y:0}}static _isHorizontal(o){return o===K.LEFT||o===K.RIGHT}static _handleLength(o,e,n,i){let r=Math.abs(e.x-o.x),a=Math.abs(e.y-o.y),s=Math.hypot(r,a),c=n===K.AUTO?Math.max(r,a):this._isHorizontal(n)?r:a,u=Math.max(8,i),f=i+.5*s,g=i*1.05+c*.3;return Math.min(f,Math.max(u,g))}static _softControl(o,e,n,i){let r=this._dir(o),a=n.x-e.x,s=n.y-e.y,c=Math.hypot(a,s)||1,u=a/c,f=s/c;if(o===K.AUTO)return{x:e.x+u*i,y:e.y+f*i};let g=r.x*u+r.y*f,C=.12,k=Math.max(0,-g)*.08,S=Math.min(.2,C+k),F=r.x*(1-S)+u*S,q=r.y*(1-S)+f*S,Y=Math.hypot(F,q)||1;return{x:e.x+F/Y*i,y:e.y+q/Y*i}}handle({source:o,sourceSide:e,target:n,targetSide:i,offset:r,waypoints:a}){let s=Math.max(0,r??0),c=Sh(o,n,a),u=[];for(let g=0;g<c.length-1;g++){let C=c[g],k=c[g+1],S=t._handleLength(C,k,e,s),F=t._handleLength(k,C,i,s),q=t._softControl(e,C,k,S),Y=t._softControl(i,k,C,F);u.push({p0:C,c1:q,c2:Y,p3:k,chainIndex:g})}let f=Py(u,12);return{path:Dy(u),secondPoint:u[0]?.c1??o,penultimatePoint:u[u.length-1]?.c2??n,points:f,candidates:Ey(u)}}},Im=class{handle({source:o,sourceSide:e,target:n,targetSide:i,offset:r,waypoints:a}){let s=Sh(o,n,a),c=[];for(let f=0;f<s.length-1;f++){let g=s[f],C=s[f+1],k=Zv(e,g,C,r??0),S=Zv(i,C,g,r??0);c.push({p0:g,c1:k,c2:S,p3:C,chainIndex:f})}let u=Py(c,12);return{path:Dy(c),secondPoint:c[0]?.c1??o,penultimatePoint:c[c.length-1]?.c2??n,points:u,candidates:Ey(c)}}};function Zv(t,o,e,n){let i={x:o.x,y:o.y};switch(t){case K.LEFT:i.x-=xs(o.x-e.x,n);break;case K.RIGHT:i.x+=xs(e.x-o.x,n);break;case K.TOP:i.y-=xs(o.y-e.y,n);break;case K.BOTTOM:i.y+=xs(e.y-o.y,n);break;case K.AUTO:break}return i}function xs(t,o){return t>=o?t:o*Math.sqrt(o-t)}function y6(t){let{axis:o,source:e,target:n,sourceSide:i,targetSide:r,sourceGap:a,targetGap:s,sourceDir:c,targetDir:u,currentDir:f,offset:g,sourceGapOffset:C,targetGapOffset:k}=t,S=C6(a,s),F=x6(o,c,f,S);return i===r?w6(o,e,n,g,c,f,a,s,C,k):F=T6(o,c,u,a,s,S,F),F}function C6(t,o){return{sourceTarget:[{x:t.x,y:o.y}],targetSource:[{x:o.x,y:t.y}]}}function x6(t,o,e,n){return t==="x"?o.x===e?n.targetSource:n.sourceTarget:o.y===e?n.sourceTarget:n.targetSource}function w6(t,o,e,n,i,r,a,s,c,u){let f=Math.abs(o[t]-e[t]);if(f>n)return;let g=Math.min(n-1,n-f);g<=0||(i[t]===r?c[t]=(a[t]>o[t]?-1:1)*g:u[t]=(s[t]>e[t]?-1:1)*g)}function T6(t,o,e,n,i,r,a){let s=t==="x"?"y":"x",c=o[t]===e[s],u=n[s]>i[s],f=n[s]<i[s];return o[t]===1&&(!c&&u||c&&f)||o[t]!==1&&(!c&&f||c&&u)?t==="x"?r.sourceTarget:r.targetSource:a}var xr=1e-6,Qv=2e-4,S6=.75;function k6(t,o){let e=t.length,n=[];n.push(`M ${t[0].x} ${t[0].y}`);for(let r=1;r<e-1;r++)n.push(I6(t[r-1],t[r],t[r+1],o));let i=t[e-1];return n.push(`L ${i.x+Qv} ${i.y+Qv}`),n.join(" ")}function I6(t,o,e,n){let i=o.x,r=o.y;if(n<=0)return`L ${i} ${r}`;let a=Math.abs(t.x-i)<=xr&&Math.abs(i-e.x)<=xr,s=Math.abs(t.y-r)<=xr&&Math.abs(r-e.y)<=xr;if(a||s)return`L ${i} ${r}`;let c=Math.hypot(i-t.x,r-t.y),u=Math.hypot(e.x-i,e.y-r),f=Math.min(c*.5,u*.5,n);if(f<S6)return`L ${i} ${r}`;if(Math.abs(t.y-r)<=xr){let q=t.x<e.x?-1:1,Y=t.y<e.y?1:-1,ee=i+f*q,ae=r+f*Y;return`L ${ee} ${r} Q ${i} ${r} ${i} ${ae}`}let C=t.x<e.x?1:-1,k=t.y<e.y?-1:1,S=r+f*k,F=i+f*C;return`L ${i} ${S} Q ${i} ${r} ${F} ${r}`}var Jv={[K.LEFT]:U.initialize(-1,0),[K.RIGHT]:U.initialize(1,0),[K.TOP]:U.initialize(0,-1),[K.BOTTOM]:U.initialize(0,1),[K.AUTO]:U.initialize(0,0)},Em=class{handle({source:o,sourceSide:e,target:n,targetSide:i,waypoints:r,offset:a,radius:s}){let c=Sh(o,n,r),u=[],f=[];for(let S=0;S<c.length-1;S++){let F=c[S],q=c[S+1],Y=this._getPathPoints(F,e,q,i,a??0);u.push(Y),f.push(...m6(Y))}let g=v6(b6(u)),C=g.length>1?g[g.length-2]:o,k=g.length>1?g[1]:n;return{path:k6(g,s??0),penultimatePoint:C,secondPoint:k,points:g,candidates:f}}_getPathPoints(o,e,n,i,r){let a=Jv[e],s=Jv[i],c={x:o.x+a.x*r,y:o.y+a.y*r},u={x:n.x+s.x*r,y:n.y+s.y*r},f=this._getDirection(c,e,u),g=f.x!==0?"x":"y",C=f[g],k=[],S=U.initialize(),F=U.initialize(),q=h6(o,n);if(a[g]*s[g]===-1){let Y=[{x:q.x,y:c.y},{x:q.x,y:u.y}],ee=[{x:c.x,y:q.y},{x:u.x,y:q.y}];a[g]===C?k=g==="x"?Y:ee:k=g==="x"?ee:Y}else k=y6({axis:g,source:o,target:n,sourceSide:e,targetSide:i,sourceGap:c,targetGap:u,sourceDir:a,targetDir:s,currentDir:C,offset:r,sourceGapOffset:S,targetGapOffset:F});return[o,{x:c.x+S.x,y:c.y+S.y},...k,{x:u.x+F.x,y:u.y+F.y},n]}_getDirection(o,e,n){return e===K.LEFT||e===K.RIGHT?o.x<n.x?U.initialize(1,0):U.initialize(-1,0):o.y<n.y?U.initialize(0,1):U.initialize(0,-1)}},ey=2e-4,Mm=class{handle(o){let e=Sh(o.source,o.target,o.waypoints),n=e.length,i=e[0],r=`M ${i.x} ${i.y}`,a=new Array(n-1);for(let s=0;s<n-1;s++){let c=e[s],u=e[s+1],f=s===n-2,g=f?u.x+ey:u.x,C=f?u.y+ey:u.y;r+=` L ${g} ${C}`,a[s]={x:(c.x+u.x)*.5,y:(c.y+u.y)*.5}}return{path:r,candidates:a,points:e,secondPoint:e[1]??o.target,penultimatePoint:e[n-2]??o.source}}},E6=new ge("F_CONNECTION_BUILDERS"),Ry=(()=>{class t{_builtinBuilders={[To.STRAIGHT]:new Mm,[To.BEZIER]:new Im,[To.ADAPTIVE_CURVE]:new km,[To.SEGMENT]:new Em};_providedBuilders;_builders;constructor(){this._providedBuilders=p(E6,{optional:!0})||{},this._builders=be(be({},this._builtinBuilders),this._providedBuilders)}handle({type:e,payload:n}){let i=this._builders[e];if(!i)throw this._createBuilderNotFoundError(e);return i.handle(n)}_createBuilderNotFoundError(e){let n=Object.keys(this._builtinBuilders).sort(),i=Object.keys(this._providedBuilders).sort(),r=Object.keys(this._builders).sort(),a=n.filter(c=>c in this._providedBuilders).sort(),s=[`Connection Builder Error: builder type "${e}" not found.`,`Registered types: ${r.length?r.join(", "):"(none)"}`,`Built-in types: ${n.length?n.join(", "):"(none)"}`,`Provided (F_CONNECTION_BUILDERS) types: ${i.length?i.join(", "):"(none)"}`,a.length?`Overridden built-ins: ${a.join(", ")}`:null,"Tip: ensure you pass a valid Connection Type or provide a builder via F_CONNECTION_BUILDERS."].filter(Boolean);return new Error(s.join(`
1930
+ `))}static \u0275fac=function(n){return new(n||t)};static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})();function M6(t,o,e){return zn("connection_"+t+o+e)}function D6(t,o,e){return zn("connection_for_selection_"+t+o+e)}function Oy(t){return zn("connection_gradient_"+t)}function P6(t){return`url(#${Oy(t)})`}var R6=(()=>{class t{_connection=p(Th);_hostElement=p(Ze).nativeElement;_injector=p(dt);_hostAttributes=new Map;_startColor;_endColor;gradientId=E(()=>Oy(this._connection.fId()));ngOnInit(){this._listenColorChanges()}_listenColorChanges(){de(()=>{this.gradient().fStartColor(),this.gradient().fEndColor(),en(()=>{this._updateGradient()})},{injector:this._injector})}get stop1Element(){return this._hostElement.children.item(0)}get stop2Element(){return this._hostElement.children.item(1)}redraw(e){let n=e.point2.x-e.point1.x,i=e.point2.y-e.point1.y,r=Math.sqrt(n*n+i*i)||.01,a=new ce(.5-.5*n/r,.5-.5*i/r);this._setHostAttribute("x1",a.x.toString()),this._setHostAttribute("y1",a.y.toString());let s=new ce(.5+.5*n/r,.5+.5*i/r);this._setHostAttribute("x2",s.x.toString()),this._setHostAttribute("y2",s.y.toString()),this._updateGradient()}_updateGradient(){let e=this.gradient();this._setFromColor(e.fStartColor()),this._setToColor(e.fEndColor())}_setFromColor(e){let n=e||"transparent";this._startColor!==n&&(this._startColor=n,this.stop1Element.setAttribute("stop-color",n),this.stop1Element.style.setProperty("stop-color",n))}_setToColor(e){let n=e||"transparent";this._endColor!==n&&(this._endColor=n,this.stop2Element.setAttribute("stop-color",n),this.stop2Element.style.setProperty("stop-color",n))}_setHostAttribute(e,n){this._hostAttributes.get(e)!==n&&(this._hostAttributes.set(e,n),this._hostElement.setAttribute(e,n))}static \u0275fac=function(n){return new(n||t)};static \u0275dir=je({type:t,standalone:!1})}return t})(),Dm=(()=>{class t extends R6{gradient=B.required({alias:"fConnectionGradientRendererFor"});static \u0275fac=(()=>{let e;return function(i){return(e||(e=G(t)))(i||t)}})();static \u0275cmp=z({type:t,selectors:[["linearGradient","fConnectionGradientRenderer",""]],hostVars:1,hostBindings:function(n,i){n&2&&O("id",i.gradientId())},inputs:{gradient:[1,"fConnectionGradientRendererFor","gradient"]},features:[Z],attrs:oL,decls:3,vars:0,consts:[[0,"xmlns","svg","http://www.w3.org/2000/svg"],["offset","0%"],["offset","100%"]],template:function(n,i){n&1&&(Ka(0,0),$(),ie(1,"stop",1)(2,"stop",2),Ya())},encapsulation:2,changeDetection:0})}return t})(),ty=new ge("F_CONNECTION_GRADIENT");var Pm=new ge("F_CONNECTION_PATH"),Rm=class{hostElement=p(Ze).nativeElement},O6=(()=>{class t extends Rm{_connection=p(Th);useGradient=B(!1);linkToGradient=E(()=>this.useGradient()?P6(this._connection.fId()):null);get fPathId(){return this._connection.fId()}get attrConnectionId(){return M6(this._connection.fId(),this._connection.fOutputId(),this._connection.fInputId())}initialize(){this.deselect()}setPath(e){this.hostElement.setAttribute("d",`${e}`)}select(){this.hostElement.setAttribute("marker-start",`url(#${A6(this._connection.fId())})`),this.hostElement.setAttribute("marker-end",`url(#${L6(this._connection.fId())})`)}deselect(){this.hostElement.setAttribute("marker-start",`url(#${F6(this._connection.fId())})`),this.hostElement.setAttribute("marker-end",`url(#${N6(this._connection.fId())})`)}static \u0275fac=(()=>{let e;return function(i){return(e||(e=G(t)))(i||t)}})();static \u0275cmp=z({type:t,selectors:[["path","f-connection-path",""]],hostAttrs:[1,"f-component","f-connection-path"],hostVars:4,hostBindings:function(n,i){n&2&&(O("id",i.attrConnectionId)("data-f-path-id",i.fPathId),Ne("stroke",i.linkToGradient()))},inputs:{useGradient:[1,"useGradient"]},standalone:!1,features:[we([{provide:Pm,useExisting:t}]),Z],attrs:rL,decls:0,vars:0,template:function(n,i){},styles:["[_nghost-%COMP%]{fill:none;pointer-events:stroke}"],changeDetection:0})}return t})();function F6(t){return zn(`f-connection-marker-start-${t}`)}function N6(t){return zn(`f-connection-marker-end-${t}`)}function A6(t){return zn(`f-connection-selected-marker-start-${t}`)}function L6(t){return zn(`f-connection-selected-marker-end-${t}`)}var Om=new ge("F_CONNECTION_SELECTION"),Fm=class{hostElement=p(Ze).nativeElement},B6=(()=>{class t extends Fm{_connection=p(Th);get connectionForSelectionId(){return D6(this._connection.fId(),this._connection.fOutputId(),this._connection.fInputId())}setPath(e){this.hostElement.setAttribute("d",`${e}`)}static \u0275fac=(()=>{let e;return function(i){return(e||(e=G(t)))(i||t)}})();static \u0275cmp=z({type:t,selectors:[["path","fConnectionSelection",""]],hostAttrs:[1,"f-component","f-connection-selection"],hostVars:1,hostBindings:function(n,i){n&2&&O("id",i.connectionForSelectionId)},standalone:!1,features:[we([{provide:Om,useExisting:t}]),Z],attrs:aL,decls:0,vars:0,template:function(n,i){},styles:["[_nghost-%COMP%]{fill:none;pointer-events:stroke}"],changeDetection:0})}return t})(),Nm=new ge("F_CONNECTION_DRAG_HANDLE_END"),Am=new ge("F_CONNECTION_DRAG_HANDLE_START"),cu=class{hostElement=p(Ze).nativeElement;point=U.initialize();class="f-connection-drag-handle";calculateCircleCenter(o,e,n){let i={x:e.x-o.x,y:e.y-o.y},r=Math.sqrt(i.x*i.x+i.y*i.y)||1,a={x:i.x/r,y:i.y/r},s={x:a.x*n,y:a.y*n};return{x:e.x-s.x,y:e.y-s.y}}},V6=(()=>{class t extends cu{redraw(e,n){this.point=this.calculateCircleCenter(e,n,8),this.hostElement.setAttribute("cx",this.point.x.toString()),this.hostElement.setAttribute("cy",this.point.y.toString())}static \u0275fac=(()=>{let e;return function(i){return(e||(e=G(t)))(i||t)}})();static \u0275cmp=z({type:t,selectors:[["circle","f-connection-drag-handle-start",""]],hostVars:2,hostBindings:function(n,i){n&2&&H(i.class)},standalone:!1,features:[we([{provide:Am,useExisting:t}]),Z],attrs:sL,decls:0,vars:0,template:function(n,i){},encapsulation:2,changeDetection:0})}return t})(),z6=(()=>{class t extends cu{redraw(e,n){this.point=this.calculateCircleCenter(e,n,8),this.hostElement.setAttribute("cx",this.point.x.toString()),this.hostElement.setAttribute("cy",this.point.y.toString())}static \u0275fac=(()=>{let e;return function(i){return(e||(e=G(t)))(i||t)}})();static \u0275cmp=z({type:t,selectors:[["circle","f-connection-drag-handle-end",""]],hostVars:2,hostBindings:function(n,i){n&2&&H(i.class)},standalone:!1,features:[we([{provide:Nm,useExisting:t}]),Z],attrs:lL,decls:0,vars:0,template:function(n,i){},encapsulation:2,changeDetection:0})}return t})(),dm="f-selected";function Fy(t){return class extends t{fId=X("");fSelectionDisabled=X(!1);unmarkAsSelected(){this.unmarkChildrenAsSelected?.(),this.hostElement.classList.remove(dm)}markAsSelected(){this.markChildrenAsSelected?.(),this.isSelected()||this.hostElement.classList.add(dm)}isSelected(){return this.hostElement.classList.contains(dm)}markChildrenAsSelected(){}unmarkChildrenAsSelected(){}constructor(...o){super(...o)}}}function H6(t){return class extends t{show(){this.hostElement.style.display="unset"}hide(){this.hostElement.style.display="none"}constructor(...o){super(...o)}}}var q6=Fy(H6(class{hostElement;constructor(t){this.hostElement=t}})),G6=(()=>{class t extends q6{_fConnectionBuilder=p(Ry);path="";line=yr.initialize();fReassignableStart=X(!1);fDraggingDisabled=X(!1);fSelectionDisabled=X(!1);fDefs=nt.required("defs");fPath=nt.required(Pm);fDragHandleStart=nt(Am);fDragHandleEnd=nt.required(Nm);fSelection=nt.required(Om);fContents=Mf(Kv,{descendants:!0});fMarkers=Mf(su,{descendants:!0});fGradient=Za(ty);_fGradientRenderer=nt(Dm);fWaypoints=Za(Yv);fInputSide=X(Ke.DEFAULT);_contentLayoutEngine=new Sm;_sourceSide=K.AUTO;fOutputSide=X(Ke.DEFAULT);_targetSide=K.AUTO;_penultimatePoint=U.initialize();_secondPoint=U.initialize();constructor(){super(p(Ze).nativeElement)}initialize(){this.redraw(),this.isSelected()?this.markChildrenAsSelected():this.unmarkChildrenAsSelected()}isContains(e){return(this.hostElement.firstChild?.lastChild).contains(e)||Array.from(this.fContents()?.values()??[]).some(n=>n.hostElement?.contains(e))||this.fWaypoints()?.hostElement?.contains(e)}setLine({point1:e,point2:n}){this.line=yr.initialize(e,n);let{path:i,points:r,penultimatePoint:a,secondPoint:s,candidates:c}=this._getPathResult(e,n);this.path=i,this._penultimatePoint=a||e,this._secondPoint=s||n,this.fWaypoints()?.candidates.set(c||[]),this._contentLayoutEngine.layout(r||[],this._contents())}_contents(){return Array.from(this.fContents()?.values()??[])}_getPathResult(e,n){return this._fConnectionBuilder.handle({type:this.fType,payload:{source:e,sourceSide:this._sourceSide,target:n,targetSide:this._targetSide,radius:this.fRadius,offset:this.fOffset,waypoints:this.fWaypoints()?.waypoints()||[]}})}markChildrenAsSelected(){this.fPath().select()}unmarkChildrenAsSelected(){this.fPath().deselect()}redraw(){this.fPath().setPath(this.path),this.fSelection().setPath(this.path),this.fDragHandleEnd().redraw(this._penultimatePoint,this.line.point2),this.fDragHandleStart()?.redraw(this._secondPoint,this.line.point1),this._fGradientRenderer()?.redraw(this.line)}getResolvedSides(){return{sourceSide:this._sourceSide,targetSide:this._targetSide}}_applyResolvedSidesToConnection(e,n){this._sourceSide=e,this._targetSide=n}static \u0275fac=function(n){return new(n||t)};static \u0275dir=je({type:t,contentQueries:function(n,i,r){n&1&&Tf(r,i.fContents,Kv,5)(r,i.fMarkers,su,5)(r,i.fGradient,ty,5)(r,i.fWaypoints,Yv,5),n&2&&Ht(4)},viewQuery:function(n,i){n&1&&_n(i.fDefs,cL,5)(i.fPath,Pm,5)(i.fDragHandleStart,Am,5)(i.fDragHandleEnd,Nm,5)(i.fSelection,Om,5)(i._fGradientRenderer,Dm,5),n&2&&Ht(6)},standalone:!1,features:[Z]})}return t})(),j6=(()=>{let t=class Ws{_browser=p(at);_markerCache=new WeakMap;handle({connection:e}){let n=this._findConnectionMarkers(e),i=e.fDefs();if(!i)return!1;let r=U6(n),a=this._markerCache.get(e);if(a?.signature===r&&a.defsElement===i.nativeElement)return!1;let s=Ay("defs",this._browser);return n.forEach(c=>{Ny(c.type).forEach(u=>{let f=$6(u,c,e.fId(),this._browser),g=c.markerElement.cloneNode(!0);g.setAttribute("height",`${c.height}`),g.setAttribute("width",`${c.width}`),g.removeAttribute("markerUnits"),g.style.display="unset",f.append(g),s.append(f)})}),i.nativeElement.innerHTML=s.innerHTML,this._markerCache.set(e,{signature:r,defsElement:i.nativeElement}),this._makeSafariCompatible(e),!0}_findConnectionMarkers(e){return Array.from(e.fMarkers()??[])}_makeSafariCompatible(e){e.fPath().hostElement.replaceWith(e.fPath().hostElement)}static \u0275fac=function(n){return new(n||Ws)};static \u0275prov=y({token:Ws,factory:Ws.\u0275fac})};return t=P([R(Do)],t),t})();function U6(t){return t.map(o=>[...Ny(o.type),o.width,o.height,o.refX,o.refY,o.orient,o.markerUnits,o.markerElement.outerHTML].join("|")).join("||")}function $6(t,o,e,n){let i=Ay("marker",n);return i.setAttribute("id",zn(t+"-"+e)),i.setAttribute("markerHeight",`${o.height}`),i.setAttribute("markerWidth",`${o.width}`),i.setAttribute("orient",`${o.orient}`),i.setAttribute("refX",`${o.refX}`),i.setAttribute("refY",`${o.refY}`),i.setAttribute("markerUnits",`${o.markerUnits}`),i}function Ny(t){switch(t){case ze.START:return[ze.START];case ze.END:return[ze.END];case ze.SELECTED_START:return[ze.SELECTED_START];case ze.SELECTED_END:return[ze.SELECTED_END];case ze.START_ALL_STATES:return[ze.START,ze.SELECTED_START];case ze.END_ALL_STATES:return[ze.END,ze.SELECTED_END];default:return[]}}function Ay(t,o){return o.document.createElementNS("http://www.w3.org/2000/svg",t)}var kh=(()=>{class t{renderTicket=0;_connectedInPreviousRender=new Set;beginRender(){return++this.renderTicket}resetConnectedConnectors(){for(let e of this._connectedInPreviousRender)e.resetConnected();this._connectedInPreviousRender.clear()}trackConnectedConnectors(e,n){this._connectedInPreviousRender.add(e),this._connectedInPreviousRender.add(n)}static \u0275fac=function(n){return new(n||t)};static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),W6=String.raw`
1931
+ const EPSILON = 0.5;
1932
+
1933
+ addEventListener('message', (event) => {
1934
+ const data = event?.data;
1935
+ const requestId = data?.requestId;
1936
+ const items = Array.isArray(data?.items) ? data.items : [];
1937
+
1938
+ try {
1939
+ const results = items.map((item) => calculateItem(item));
1940
+ postMessage({ requestId, results });
1941
+ } catch (error) {
1942
+ const message = error instanceof Error ? error.message : 'Connection worker failed.';
1943
+ postMessage({ requestId, error: message });
1944
+ }
1945
+ });
1946
+
1947
+ function calculateItem(item) {
1948
+ const sourceCenterX = item.sourceRect.x + item.sourceRect.width / 2;
1949
+ const sourceCenterY = item.sourceRect.y + item.sourceRect.height / 2;
1950
+ const targetCenterX = item.targetRect.x + item.targetRect.width / 2;
1951
+ const targetCenterY = item.targetRect.y + item.targetRect.height / 2;
1952
+
1953
+ const sourceSide = resolveConnectableSide(
1954
+ item.outputSide,
1955
+ targetCenterX - sourceCenterX,
1956
+ targetCenterY - sourceCenterY,
1957
+ item.sourceConnectableSide,
1958
+ );
1959
+
1960
+ const targetSide = resolveConnectableSide(
1961
+ item.inputSide,
1962
+ sourceCenterX - targetCenterX,
1963
+ sourceCenterY - targetCenterY,
1964
+ item.targetConnectableSide,
1965
+ );
1966
+
1967
+ if (item.behavior === 'fixed_center') {
1968
+ return {
1969
+ originalIndex: item.originalIndex,
1970
+ supported: true,
1971
+ sourceSide,
1972
+ targetSide,
1973
+ line: {
1974
+ point1: { x: sourceCenterX, y: sourceCenterY },
1975
+ point2: { x: targetCenterX, y: targetCenterY },
1976
+ },
1977
+ };
1978
+ }
1979
+
1980
+ if (item.sourceRotation || item.targetRotation) {
1981
+ return { originalIndex: item.originalIndex, supported: false };
1982
+ }
1983
+
1984
+ if (item.behavior !== 'fixed') {
1985
+ if (item.behavior !== 'floating') {
1986
+ return { originalIndex: item.originalIndex, supported: false };
1987
+ }
1988
+
1989
+ if (hasRoundedCorners(item.sourceRect) || hasRoundedCorners(item.targetRect)) {
1990
+ return { originalIndex: item.originalIndex, supported: false };
1991
+ }
1992
+
1993
+ return {
1994
+ originalIndex: item.originalIndex,
1995
+ supported: true,
1996
+ sourceSide,
1997
+ targetSide,
1998
+ line: buildFloatingLine(item.sourceRect, item.targetRect),
1999
+ };
2000
+ }
2001
+
2002
+ const line = buildFixedLine(item.sourceRect, item.targetRect, sourceSide, targetSide);
2003
+ if (!line) {
2004
+ return { originalIndex: item.originalIndex, supported: false };
2005
+ }
2006
+
2007
+ return {
2008
+ originalIndex: item.originalIndex,
2009
+ supported: true,
2010
+ sourceSide,
2011
+ targetSide,
2012
+ line,
2013
+ };
2014
+ }
2015
+
2016
+ function resolveConnectableSide(requestedSide, deltaX, deltaY, fallbackSide) {
2017
+ if (requestedSide === 'default') {
2018
+ return fallbackSide;
2019
+ }
2020
+
2021
+ const absX = Math.abs(deltaX);
2022
+ const absY = Math.abs(deltaY);
2023
+ const nearZero = absX < EPSILON && absY < EPSILON;
2024
+
2025
+ if (nearZero) {
2026
+ return fallbackSide;
2027
+ }
2028
+
2029
+ const horizontalDominant = absX >= absY;
2030
+
2031
+ switch (requestedSide) {
2032
+ case 'calculate':
2033
+ return horizontalDominant ? (deltaX >= 0 ? 'right' : 'left') : deltaY >= 0 ? 'bottom' : 'top';
2034
+
2035
+ case 'calculate_horizontal':
2036
+ if (absX < EPSILON) {
2037
+ return fallbackSide;
2038
+ }
2039
+
2040
+ return deltaX >= 0 ? 'right' : 'left';
2041
+
2042
+ case 'calculate_vertical':
2043
+ if (absY < EPSILON) {
2044
+ return fallbackSide;
2045
+ }
2046
+
2047
+ return deltaY >= 0 ? 'bottom' : 'top';
2048
+
2049
+ case 'top':
2050
+ case 'bottom':
2051
+ case 'left':
2052
+ case 'right':
2053
+ return requestedSide;
2054
+
2055
+ default:
2056
+ return fallbackSide;
2057
+ }
2058
+ }
2059
+
2060
+ function buildFixedLine(sourceRect, targetRect, sourceSide, targetSide) {
2061
+ const sourceAnchor = sourceSide === 'auto' ? 'bottom' : sourceSide;
2062
+ const targetAnchor = targetSide === 'auto' ? 'top' : targetSide;
2063
+
2064
+ const point1 = getSidePoint(sourceRect, sourceAnchor);
2065
+ const point2 = getSidePoint(targetRect, targetAnchor);
2066
+
2067
+ if (!point1 || !point2) {
2068
+ return null;
2069
+ }
2070
+
2071
+ return { point1, point2 };
2072
+ }
2073
+
2074
+ function buildFloatingLine(sourceRect, targetRect) {
2075
+ const sourceCenter = getRectCenter(sourceRect);
2076
+ const targetCenter = getRectCenter(targetRect);
2077
+
2078
+ return {
2079
+ point1: getRectBorderIntersection(sourceRect, sourceCenter, targetCenter),
2080
+ point2: getRectBorderIntersection(targetRect, targetCenter, sourceCenter),
2081
+ };
2082
+ }
2083
+
2084
+ function hasRoundedCorners(rect) {
2085
+ return !!(rect.radius1 || rect.radius2 || rect.radius3 || rect.radius4);
2086
+ }
2087
+
2088
+ function getRectCenter(rect) {
2089
+ return {
2090
+ x: rect.x + rect.width / 2,
2091
+ y: rect.y + rect.height / 2,
2092
+ };
2093
+ }
2094
+
2095
+ function getRectBorderIntersection(rect, from, to) {
2096
+ const halfWidth = rect.width / 2;
2097
+ const halfHeight = rect.height / 2;
2098
+ const center = getRectCenter(rect);
2099
+
2100
+ const dx = to.x - from.x;
2101
+ const dy = to.y - from.y;
2102
+
2103
+ if (Math.abs(dx) < EPSILON && Math.abs(dy) < EPSILON) {
2104
+ return center;
2105
+ }
2106
+
2107
+ const scaleX = Math.abs(dx) < EPSILON ? Number.POSITIVE_INFINITY : halfWidth / Math.abs(dx);
2108
+ const scaleY = Math.abs(dy) < EPSILON ? Number.POSITIVE_INFINITY : halfHeight / Math.abs(dy);
2109
+ const scale = Math.min(scaleX, scaleY);
2110
+
2111
+ return {
2112
+ x: center.x + dx * scale,
2113
+ y: center.y + dy * scale,
2114
+ };
2115
+ }
2116
+
2117
+ function getSidePoint(rect, side) {
2118
+ const centerX = rect.x + rect.width / 2;
2119
+ const centerY = rect.y + rect.height / 2;
2120
+
2121
+ switch (side) {
2122
+ case 'top':
2123
+ return { x: centerX, y: rect.y };
2124
+
2125
+ case 'right':
2126
+ return { x: rect.x + rect.width, y: centerY };
2127
+
2128
+ case 'bottom':
2129
+ return { x: centerX, y: rect.y + rect.height };
2130
+
2131
+ case 'left':
2132
+ return { x: rect.x, y: centerY };
2133
+
2134
+ default:
2135
+ return null;
2136
+ }
2137
+ }
2138
+ `.trim();function Ly(t){return!!By(t)}function By(t){let o=t,e=o?.Blob,n=o?.Worker,i=o?.URL;return!e||!n||typeof i?.createObjectURL!="function"||typeof i.revokeObjectURL!="function"?null:{blobCtor:e,workerCtor:n,urlApi:i}}function K6(t){let o=new t.blobCtor([W6],{type:"text/javascript"});return t.urlApi.createObjectURL(o)}function Vy(t,o){if(!t)return;let e=o??(typeof URL>"u"?null:URL);typeof e?.revokeObjectURL=="function"&&e.revokeObjectURL(t)}var Wi=(()=>{class t{worker=null;workerUrl=null;nextRequestId=0;isDisabled=!1;pending=new Map;resetRuntime(e){this.pending.forEach(n=>n.reject(e)),this.pending.clear(),this.worker?.terminate(),this.worker=null,Vy(this.workerUrl),this.workerUrl=null}dispose(){this.resetRuntime(new Error("Connection worker was destroyed."))}static \u0275fac=function(n){return new(n||t)};static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),du=class{connection;line;static fToken=Symbol("ApplyConnectionRenderRequest");constructor(o,e){this.connection=o,this.line=e}},Y6=(()=>{let t=class Ks{_mediator=p(V);_renderCache=new WeakMap;handle({connection:e,line:n}){!this._mediator.execute(new Do(e))&&!this._shouldRender(e,n)||(e.setLine(n),e.initialize())}_shouldRender(e,n){let i=e.fPath().hostElement,r=this._createConnectionRenderSignature(e,n),a=this._renderCache.get(e);return a?.signature===r&&a.pathElement===i?!1:(this._renderCache.set(e,{signature:r,pathElement:i}),!0)}_createConnectionRenderSignature(e,n){let{sourceSide:i,targetSide:r}=e.getResolvedSides();return[e.fBehavior,e.fType,e.fRadius,e.fOffset,e.fReassignableStart(),this._serializeContents([...e.fContents()||[]]),i,r,this._serializePoint(n.point1),this._serializePoint(n.point2),this._serializeWaypoints(e.fWaypoints()?.waypoints()||[])].join("|")}_serializePoint(e){return`${e.x}:${e.y}`}_serializeWaypoints(e){return e.map(this._serializePoint).join(";")}_serializeContents(e){return e.map(n=>[n.position(),n.offset(),n.align()].join(":")).join(";")}static \u0275fac=function(n){return new(n||Ks)};static \u0275prov=y({token:Ks,factory:Ks.\u0275fac})};return t=P([R(du)],t),t})(),uu=class{source;target;static fToken=Symbol("MarkConnectionConnectorsAsConnectedRequest");constructor(o,e){this.source=o,this.target=e}},X6=(()=>{let t=class Ys{_state=p(kh);handle({source:e,target:n}){e.setConnected(n),n.setConnected(e),this._state.trackConnectedConnectors(e,n)}static \u0275fac=function(n){return new(n||Ys)};static \u0275prov=y({token:Ys,factory:Ys.\u0275fac})};return t=P([R(uu)],t),t})(),ui=class{element;cache;static fToken=Symbol("GetNormalizedConnectorRectRequest");constructor(o,e=!0){this.element=o,this.cache=e}},Z6={enabled:!1},Dn=new ge("F_CACHE_OPTIONS",{providedIn:"root",factory:()=>be({},Z6)});var pu=class{id;nodeId;kind;element;static fToken=Symbol("RegisterFCacheConnectorRequest");constructor(o,e,n,i){this.id=o,this.nodeId=e,this.kind=n,this.element=i}},Pn=(()=>{class t{nodeEntries=new Map;nodeIdByElement=new WeakMap;connectorEntries=new Map;connectorKeysByNodeId=new Map;connectorKeyByElement=new WeakMap;static \u0275fac=function(n){return new(n||t)};static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),Lm=class{key;id;kind;nodeId;element;rect;constructor(o,e,n,i,r,a){this.key=o,this.id=e,this.kind=n,this.nodeId=i,this.element=r,this.rect=a}},Sr=class{static build(o,e){return`${o}:${e}`}},Bm=class{id;element;reference;rect;constructor(o,e,n,i){this.id=o,this.element=e,this.reference=n,this.rect=i}},Po=class{nodeId;reason;static fToken=Symbol("InvalidateFCacheNodeRequest");constructor(o,e="manual"){this.nodeId=o,this.reason=e}},Q6=(()=>{let t=class Xs{_store=p(Pn);_options=p(Dn);handle({nodeId:e,reason:n}){if(!this._options.enabled)return;let i=this._store.nodeEntries.get(e);if(!i)return;i.rect=void 0;let r=this._store.connectorKeysByNodeId.get(e);if(r?.size)for(let a of r){let s=this._store.connectorEntries.get(a);s&&(s.rect=void 0)}}static \u0275fac=function(n){return new(n||Xs)};static \u0275prov=y({token:Xs,factory:Xs.\u0275fac})};return t=P([R(Po)],t),t})(),hu=class{id;element;reference;static fToken=Symbol("RegisterFCacheNodeRequest");constructor(o,e,n){this.id=o,this.element=e,this.reference=n}},J6=(()=>{let t=class Zs{_store=p(Pn);_options=p(Dn);handle({id:e,element:n,reference:i}){if(!this._options.enabled)return;let r=new Bm(e,n,i);this._store.nodeEntries.set(e,r),this._store.nodeIdByElement.set(n,e),this._store.connectorKeysByNodeId.set(e,this._store.connectorKeysByNodeId.get(e)??new Set)}static \u0275fac=function(n){return new(n||Zs)};static \u0275prov=y({token:Zs,factory:Zs.\u0275fac})};return t=P([R(hu)],t),t})(),fu=class{id;static fToken=Symbol("UnregisterFCacheNodeRequest");constructor(o){this.id=o}},e7=(()=>{let t=class Qs{_store=p(Pn);_mediator=p(V);_options=p(Dn);handle({id:e}){if(!this._options.enabled)return;let n=this._store.nodeEntries.get(e);if(!n)return;this._store.nodeEntries.delete(e),this._store.nodeIdByElement.delete(n.element);let i=Array.from(this._store.connectorKeysByNodeId.get(e)??[]);for(let r of i){let a=this._store.connectorEntries.get(r);a&&this._mediator.execute(new kr(a.id,a.kind))}this._store.connectorKeysByNodeId.delete(e)}static \u0275fac=function(n){return new(n||Qs)};static \u0275prov=y({token:Qs,factory:Qs.\u0275fac})};return t=P([R(fu)],t),t})(),t7=(()=>{let t=class Js{_store=p(Pn);_mediator=p(V);_options=p(Dn);handle({id:e,nodeId:n,kind:i,element:r}){if(!this._options.enabled)return;let a=Sr.build(e,i),s=this._store.connectorEntries.get(a);s&&(this._detachConnectorFromNode(s.key,s.nodeId),this._store.connectorKeyByElement.delete(s.element));let c=new Lm(a,e,i,n,r);this._store.connectorEntries.set(a,c),this._store.connectorKeyByElement.set(r,a);let u=this._store.connectorKeysByNodeId.get(n)??new Set;u.add(a),this._store.connectorKeysByNodeId.set(n,u),this._mediator.execute(new Po(n,"connector-registered"))}_detachConnectorFromNode(e,n){let i=this._store.connectorKeysByNodeId.get(n);i&&(i.delete(e),i.size||this._store.connectorKeysByNodeId.delete(n))}static \u0275fac=function(n){return new(n||Js)};static \u0275prov=y({token:Js,factory:Js.\u0275fac})};return t=P([R(pu)],t),t})(),kr=class{connectorId;kind;static fToken=Symbol("UnregisterFCacheConnectorRequest");constructor(o,e){this.connectorId=o,this.kind=e}},n7=(()=>{let t=class el{_store=p(Pn);_mediator=p(V);_options=p(Dn);handle({connectorId:e,kind:n}){if(!this._options.enabled)return;let i=Sr.build(e,n),r=this._store.connectorEntries.get(i);r&&(this._store.connectorEntries.delete(i),this._store.connectorKeyByElement.delete(r.element),this._detachConnectorFromNode(i,r.nodeId),this._store.nodeEntries.has(r.nodeId)&&this._mediator.execute(new Po(r.nodeId,"connector-unregistered")))}_detachConnectorFromNode(e,n){let i=this._store.connectorKeysByNodeId.get(n);i&&(i.delete(e),i.size||this._store.connectorKeysByNodeId.delete(n))}static \u0275fac=function(n){return new(n||el)};static \u0275prov=y({token:el,factory:el.\u0275fac})};return t=P([R(kr)],t),t})(),Ro=class{element;static fToken=Symbol("GetCachedFCacheRectRequest");constructor(o){this.element=o}},i7=(()=>{let t=class tl{_store=p(Pn);_options=p(Dn);handle({element:e}){if(!this._options.enabled)return;let n=this._store.nodeIdByElement.get(e);if(n){let r=this._store.nodeEntries.get(n)?.rect;if(r)return r}let i=this._store.connectorKeyByElement.get(e);if(i)return this._store.connectorEntries.get(i)?.rect??void 0}static \u0275fac=function(n){return new(n||tl)};static \u0275prov=y({token:tl,factory:tl.\u0275fac})};return t=P([R(Ro)],t),t})(),zi=class{connectorId;kind;rect;static fToken=Symbol("SetFCacheConnectorRectRequest");constructor(o,e,n){this.connectorId=o,this.kind=e,this.rect=n}},o7=(()=>{let t=class nl{_store=p(Pn);_options=p(Dn);handle({connectorId:e,kind:n,rect:i}){if(!this._options.enabled)return;let r=Sr.build(e,n),a=this._store.connectorEntries.get(r);a&&(a.rect=rt.fromRoundedRect(i))}static \u0275fac=function(n){return new(n||nl)};static \u0275prov=y({token:nl,factory:nl.\u0275fac})};return t=P([R(zi)],t),t})(),Hi=class{nodeId;rect;static fToken=Symbol("SetFCacheNodeRectRequest");constructor(o,e){this.nodeId=o,this.rect=e}},r7=(()=>{let t=class il{_store=p(Pn);_options=p(Dn);handle({nodeId:e,rect:n}){if(!this._options.enabled)return;let i=this._store.nodeEntries.get(e);if(!i)return;let r=i.rect;i.rect=te.initialize(n.x,n.y,n.width,n.height),r&&this._updateConnectorRectsByNodeRect(e,r,i.rect)}_updateConnectorRectsByNodeRect(e,n,i){let r=this._store.connectorKeysByNodeId.get(e);if(!r?.size)return;let a=i.x-n.x,s=i.y-n.y,c=n.width!==0,u=n.height!==0,f=c?i.width/n.width:1,g=u?i.height/n.height:1;for(let C of r){let k=this._store.connectorEntries.get(C);if(!k?.rect)continue;let S=k.rect,F=S.gravityCenter,q=c?i.x+(F.x-n.x)*f:F.x+a,Y=u?i.y+(F.y-n.y)*g:F.y+s;k.rect=new rt(q-S.width/2,Y-S.height/2,S.width,S.height,S.radius1,S.radius2,S.radius3,S.radius4)}}static \u0275fac=function(n){return new(n||il)};static \u0275prov=y({token:il,factory:il.\u0275fac})};return t=P([R(Hi)],t),t})(),Ir=class{element;rect;static fToken=Symbol("UpdateFCacheRectByElementRequest");constructor(o,e){this.element=o,this.rect=e}},a7=(()=>{let t=class ol{_store=p(Pn);_options=p(Dn);handle({element:e,rect:n}){if(!this._options.enabled)return;let i=this._store.nodeIdByElement.get(e);if(i){let s=this._store.nodeEntries.get(i);s&&(s.rect=n);return}let r=this._store.connectorKeyByElement.get(e);if(!r)return;let a=this._store.connectorEntries.get(r);a&&(a.rect=n)}static \u0275fac=function(n){return new(n||ol)};static \u0275prov=y({token:ol,factory:ol.\u0275fac})};return t=P([R(Ir)],t),t})(),s7=[Pn,J6,e7,Q6,t7,n7,i7,r7,o7,a7];function Go(t,o,e){return o?ce.fromPoint(t).elementTransform(o).sub(e.scaledPosition).sub(e.position).div(e.scale):ce.fromPoint(t)}function zy(){return{min:{x:-1/0,y:-1/0},max:{x:1/0,y:1/0}}}function Oo(t){return t?`${t}`:void 0}var l7=(()=>{let t=class rl{_store=p(L);_mediator=p(V);_browser=p(at);get _transform(){return this._store.transform}handle({element:e,cache:n}){let i=this._mediator.execute(new Ro(e));if(i&&n)return i;let r=this._getElementRoundedRect(e),a=this._normalizePosition(r),s=this._unscaleSize(r),c=this._getUnscaledRect(a,s,r),u=this._getOffsetSize(e,s),f=rt.fromCenter(c,u.width,u.height);return this._mediator.execute(new Ir(e,f)),f}_getElementRoundedRect(e){return this._getRoundedRect(te.fromElement(e),e,this._getComputedStyle(e))}_getRoundedRect(e,n,i){let[r,a,s,c]=this._normalizeCircularBorderRadii(e.width,e.height,[this._getSystemRadius(i.borderTopLeftRadius,n,i.fontSize),this._getSystemRadius(i.borderTopRightRadius,n,i.fontSize),this._getSystemRadius(i.borderBottomRightRadius,n,i.fontSize),this._getSystemRadius(i.borderBottomLeftRadius,n,i.fontSize)]);return new rt(e.x,e.y,e.width,e.height,r,a,s,c)}_getComputedStyle(e){return this._browser.window.getComputedStyle(e)}_toPixels(e,n,i){return this._browser.toPixels(e,n.clientWidth,n.clientHeight,i)||0}_getSystemRadius(e,n,i){return this._toPixels(e,n,i)*this._transform.scale}_normalizeCircularBorderRadii(e,n,i){let[r,a,s,c]=i.map(f=>Math.max(0,f)),u=Math.min(1,this._getRadiusScaleFactor(e,r+a),this._getRadiusScaleFactor(n,a+s),this._getRadiusScaleFactor(e,s+c),this._getRadiusScaleFactor(n,c+r));return[r*u,a*u,s*u,c*u]}_getRadiusScaleFactor(e,n){return n<=0?1:e<=0?0:e/n}_normalizePosition(e){return Go(e,this._store.flowHost,this._transform)}_unscaleSize(e){return Dt.initialize(e.width/this._transform.scale,e.height/this._transform.scale)}_getUnscaledRect(e,n,i){return new rt(e.x,e.y,n.width,n.height,this._unscaleRadius(i.radius1),this._unscaleRadius(i.radius2),this._unscaleRadius(i.radius3),this._unscaleRadius(i.radius4))}_unscaleRadius(e){return e/this._transform.scale}_getOffsetSize(e,n){return Dt.offsetFromElement(e)||n}static \u0275fac=function(n){return new(n||rl)};static \u0275prov=y({token:rl,factory:rl.\u0275fac})};return t=P([R(ui)],t),t})(),mu=class{connector;cache;static fToken=Symbol("ResolveConnectionEndpointRectRequest");constructor(o,e){this.connector=o,this.cache=e}},c7=(()=>{let t=class al{_mediator=p(V);handle({connector:e,cache:n}){let i=this._buildCacheKey(e),r=n.get(i)??this._calculateRect(e);return n.set(i,r),r}_buildCacheKey(e){return`${e.kind}::${e.fId()}`}_calculateRect(e){return this._mediator.execute(new ui(e.hostElement))}static \u0275fac=function(n){return new(n||al)};static \u0275prov=y({token:al,factory:al.\u0275fac})};return t=P([R(mu)],t),t})(),_u=class{connection;static fToken=Symbol("ResolveConnectionEndpointsRequest");constructor(o){this.connection=o}},d7=(()=>{let t=class sl{_store=p(L);handle({connection:e}){let n=this._store.outputs.get(e.fOutputId()),i=this._store.inputs.get(e.fInputId());return!n||!i?null:{source:n,target:i}}static \u0275fac=function(n){return new(n||sl)};static \u0275prov=y({token:sl,factory:sl.\u0275fac})};return t=P([R(_u)],t),t})(),Er=class{connection;cache;static fToken=Symbol("ResolveConnectionGeometryRequest");constructor(o,e){this.connection=o,this.cache=e}},u7=(()=>{let t=class ll{_mediator=p(V);handle({connection:e,cache:n}){let i=this._resolveConnectionEndpoints(e);return i?zt(be({},i),{sourceRect:this._resolveEndpointRect(i.source,n),targetRect:this._resolveEndpointRect(i.target,n)}):null}_resolveConnectionEndpoints(e){return this._mediator.execute(new _u(e))}_resolveEndpointRect(e,n){return this._mediator.execute(new mu(e,n))}static \u0275fac=function(n){return new(n||ll)};static \u0275prov=y({token:ll,factory:ll.\u0275fac})};return t=P([R(Er)],t),t})(),it=class{element;static fToken=Symbol("GetNormalizedElementRectRequest");constructor(o){this.element=o}},p7=(()=>{let t=class cl{_store=p(L);_mediator=p(V);get _transform(){return this._store.transform}handle({element:e}){let n=this._mediator.execute(new Ro(e));if(n)return n;let i=te.fromElement(e),r=this._normalizePosition(i),a=this._unscaleSize(i),s=this._getUnscaledRect(r,a),c=this._getOffsetSize(e,a),u=this._fromCenter(s,c.width,c.height);return this._mediator.execute(new Ir(e,u)),u}_fromCenter(e,n,i){return te.initialize(e.gravityCenter.x-n/2,e.gravityCenter.y-i/2,n,i)}_normalizePosition(e){return Go(e,this._store.flowHost,this._transform)}_unscaleSize(e){return Dt.initialize(e.width/this._transform.scale,e.height/this._transform.scale)}_getUnscaledRect(e,n){return new rt(e.x,e.y,n.width,n.height)}_getOffsetSize(e,n){return Dt.offsetFromElement(e)||n}static \u0275fac=function(n){return new(n||cl)};static \u0275prov=y({token:cl,factory:cl.\u0275fac})};return t=P([R(it)],t),t})(),Hn=class{connector;static fToken=Symbol("ResolveConnectionEndpointRotationContextRequest");constructor(o){this.connector=o}},h7=(()=>{let t=class dl{_store=p(L);_mediator=p(V);handle({connector:e}){if(!e)return;let n=this._store.nodes.get(e.fNodeId);if(!n||!n._rotate)return;let i=this._mediator.execute(new it(n.hostElement));return{rotationDeg:n._rotate,pivot:i.gravityCenter}}static \u0275fac=function(n){return new(n||dl)};static \u0275prov=y({token:dl,factory:dl.\u0275fac})};return t=P([R(Hn)],t),t})(),gu=class{connection;geometry;static fToken=Symbol("BuildConnectionLineRequest");constructor(o,e){this.connection=o,this.geometry=e}},f7=(()=>{let t=class ul{_mediator=p(V);_connectionBehaviour=p(qo);handle({connection:e,geometry:n}){return this._connectionBehaviour.handle(new Cn(n.sourceRect,n.targetRect,e,n.source.fConnectableSide,n.target.fConnectableSide,this._resolveRotationContext(n.source),this._resolveRotationContext(n.target)))}_resolveRotationContext(e){return this._mediator.execute(new Hn(e))}static \u0275fac=function(n){return new(n||ul)};static \u0275prov=y({token:ul,factory:ul.\u0275fac})};return t=P([R(gu)],t),t})(),Mr=class{connection;source;target;line;static fToken=Symbol("RenderConnectionWithLineRequest");constructor(o,e,n,i){this.connection=o,this.source=e,this.target=n,this.line=i}},m7=(()=>{let t=class pl{_mediator=p(V);handle({connection:e,source:n,target:i,line:r}){this._mediator.execute(new uu(n,i)),this._mediator.execute(new du(e,r))}static \u0275fac=function(n){return new(n||pl)};static \u0275prov=y({token:pl,factory:pl.\u0275fac})};return t=P([R(Mr)],t),t})(),Dr=class{connection;geometry;static fToken=Symbol("RenderConnectionFromGeometryRequest");constructor(o,e){this.connection=o,this.geometry=e}},_7=(()=>{let t=class hl{_mediator=p(V);handle({connection:e,geometry:n}){let i=this._mediator.execute(new gu(e,n));this._mediator.execute(new Mr(e,n.source,n.target,i))}static \u0275fac=function(n){return new(n||hl)};static \u0275prov=y({token:hl,factory:hl.\u0275fac})};return t=P([R(Dr)],t),t})(),bu=class{connection;cache;static fToken=Symbol("RenderConnectionRequest");constructor(o,e){this.connection=o,this.cache=e}},g7=(()=>{let t=class fl{_mediator=p(V);handle({connection:e,cache:n}){let i=this._mediator.execute(new Er(e,n));i&&this._mediator.execute(new Dr(e,i))}static \u0275fac=function(n){return new(n||fl)};static \u0275prov=y({token:fl,factory:fl.\u0275fac})};return t=P([R(bu)],t),t})(),qi=class{session;static fToken=Symbol("IsConnectionRedrawCurrentRequest");constructor(o){this.session=o}},b7=(()=>{let t=class ml{_store=p(L);_state=p(kh);handle({session:e}){return e.renderTicket===this._state.renderTicket&&e.nodesRevision===this._store.nodesRevision}static \u0275fac=function(n){return new(n||ml)};static \u0275prov=y({token:ml,factory:ml.\u0275fac})};return t=P([R(qi)],t),t})(),Pr=class{session;static fToken=Symbol("CompleteConnectionRedrawRequest");constructor(o){this.session=o}},v7=(()=>{let t=class _l{_mediator=p(V);_store=p(L);handle({session:e}){this._mediator.execute(new qi(e))&&this._store.completeConnectionsRender(e.connectionsRevision,e.nodesRevision)}static \u0275fac=function(n){return new(n||_l)};static \u0275prov=y({token:_l,factory:_l.\u0275fac})};return t=P([R(Pr)],t),t})(),vu=class{batchItem;result;static fToken=Symbol("ApplyConnectionWorkerResultRequest");constructor(o,e){this.batchItem=o,this.result=e}},y7=(()=>{let t=class gl{_mediator=p(V);handle({batchItem:e,result:n}){if(e){if(!this._isSupportedWorkerResult(n)){this._fallbackToMainThread(e);return}try{e.connection._applyResolvedSidesToConnection(n.sourceSide,n.targetSide),this._mediator.execute(new Mr(e.connection,e.geometry.source,e.geometry.target,n.line))}catch{this._fallbackToMainThread(e)}}}_fallbackToMainThread(e){this._mediator.execute(new Dr(e.connection,e.geometry))}_isSupportedWorkerResult(e){return!!(e?.supported&&e.sourceSide&&e.targetSide&&e.line)}static \u0275fac=function(n){return new(n||gl)};static \u0275prov=y({token:gl,factory:gl.\u0275fac})};return t=P([R(vu)],t),t})(),si=class{connections;cache;startIndex;session;batchItems;workerResults;static fToken=Symbol("RunConnectionRedrawSliceRequest");constructor(o,e,n,i,r,a){this.connections=o,this.cache=e,this.startIndex=n,this.session=i,this.batchItems=r,this.workerResults=a}},C7=500,x7=6,w7=(()=>{let t=class bl{_mediator=p(V);_browser=p(at);handle({connections:e,cache:n,startIndex:i,session:r,batchItems:a,workerResults:s}){if(!this._isCurrent(r))return;let c=this._now(),u=i,f=0;for(;u<e.length&&f<C7&&this._isWithinSliceBudget(c);){let g=e[u];if(a?this._mediator.execute(new vu(a[u]??null,s?.[u])):this._mediator.execute(new bu(g,n)),u++,f++,!this._isCurrent(r))return}if(u>=e.length){this._mediator.execute(new Pr(r));return}this._requestAnimationFrame(()=>this._mediator.execute(new si(e,n,u,r,a,s)))}_isCurrent(e){return this._mediator.execute(new qi(e))}_requestAnimationFrame(e){let n=this._browser.document.defaultView;if(!n){e();return}n.requestAnimationFrame(e)}_now(){let e=this._browser.document.defaultView?.performance;return e?e.now():Date.now()}_isWithinSliceBudget(e){return this._browser.isBrowser()?this._now()-e<x7:!0}static \u0275fac=function(n){return new(n||bl)};static \u0275prov=y({token:bl,factory:bl.\u0275fac})};return t=P([R(si)],t),t})(),yu=class{static fToken=Symbol("StartConnectionRedrawRequest")},T7=(()=>{let t=class vl{_store=p(L);_state=p(kh);handle(e){return this._state.resetConnectedConnectors(),{renderTicket:this._state.beginRender(),connectionsRevision:this._store.connectionsRevision,nodesRevision:this._store.nodesRevision}}static \u0275fac=function(n){return new(n||vl)};static \u0275prov=y({token:vl,factory:vl.\u0275fac})};return t=P([R(yu)],t),t})(),Rr=class{static fToken=Symbol("RedrawConnectionsRequest")},Cu=class{connectionCount;static fToken=Symbol("ShouldUseConnectionWorkerRequest");constructor(o){this.connectionCount=o}},Or=class{static fToken=Symbol("IsConnectionWorkerEnabledRequest")},S7=(()=>{let t=class yl{_browser=p(at);_state=p(Wi);handle(e){if(this._state.isDisabled||!this._isWorkerAvailable())return!1;let n=this._browser.document.defaultView;return Ly(n)}_isWorkerAvailable(){return this._browser.isBrowser()}static \u0275fac=function(n){return new(n||yl)};static \u0275prov=y({token:yl,factory:yl.\u0275fac})};return t=P([R(Or)],t),t})(),k7=(()=>{let t=class Cl{_mediator=p(V);handle({connectionCount:e}){return e>0&&this._mediator.execute(new Or)}static \u0275fac=function(n){return new(n||Cl)};static \u0275prov=y({token:Cl,factory:Cl.\u0275fac})};return t=P([R(Cu)],t),t})(),xu=class{connection;geometry;originalIndex;static fToken=Symbol("BuildConnectionWorkerPayloadItemRequest");constructor(o,e,n){this.connection=o,this.geometry=e,this.originalIndex=n}},I7=(()=>{let t=class xl{_store=p(L);handle({connection:e,geometry:n,originalIndex:i}){let{source:r,target:a,sourceRect:s,targetRect:c}=n;return{originalIndex:i,behavior:e.fBehavior,outputSide:e.fOutputSide(),inputSide:e.fInputSide(),sourceConnectableSide:r.fConnectableSide,targetConnectableSide:a.fConnectableSide,sourceRotation:this._store.nodes.get(r.fNodeId)?._rotate||0,targetRotation:this._store.nodes.get(a.fNodeId)?._rotate||0,sourceRect:{x:s.x,y:s.y,width:s.width,height:s.height,radius1:s.radius1,radius2:s.radius2,radius3:s.radius3,radius4:s.radius4},targetRect:{x:c.x,y:c.y,width:c.width,height:c.height,radius1:c.radius1,radius2:c.radius2,radius3:c.radius3,radius4:c.radius4}}}static \u0275fac=function(n){return new(n||xl)};static \u0275prov=y({token:xl,factory:xl.\u0275fac})};return t=P([R(xu)],t),t})(),wu=class{connections;cache;static fToken=Symbol("BuildConnectionWorkerBatchRequest");constructor(o,e){this.connections=o,this.cache=e}},E7=(()=>{let t=class wl{_mediator=p(V);handle({connections:e,cache:n}){let i=new Array(e.length),r=[];for(let a=0;a<e.length;a++){let s=this._buildBatchItem(e[a],n,a);i[a]=s,s&&r.push(s.payload)}return{items:i,payload:r}}_buildBatchItem(e,n,i){let r=this._mediator.execute(new Er(e,n));return r?{connection:e,geometry:r,payload:this._mediator.execute(new xu(e,r,i))}:null}static \u0275fac=function(n){return new(n||wl)};static \u0275prov=y({token:wl,factory:wl.\u0275fac})};return t=P([R(wu)],t),t})(),Tu=class{error;static fToken=Symbol("DisableConnectionWorkerRequest");constructor(o){this.error=o}},Fr=class{error;static fToken=Symbol("ResetConnectionWorkerRuntimeRequest");constructor(o){this.error=o}},M7=(()=>{let t=class Tl{_state=p(Wi);handle({error:e}){this._state.resetRuntime(e)}static \u0275fac=function(n){return new(n||Tl)};static \u0275prov=y({token:Tl,factory:Tl.\u0275fac})};return t=P([R(Fr)],t),t})(),D7=(()=>{let t=class Sl{_state=p(Wi);_mediator=p(V);handle({error:e}){this._state.isDisabled=!0,this._mediator.execute(new Fr(e))}static \u0275fac=function(n){return new(n||Sl)};static \u0275prov=y({token:Sl,factory:Sl.\u0275fac})};return t=P([R(Tu)],t),t})(),Su=class{message;static fToken=Symbol("HandleConnectionWorkerMessageRequest");constructor(o){this.message=o}},P7=(()=>{let t=class kl{_state=p(Wi);handle({message:e}){if(!e||typeof e.requestId!="number")return;let n=this._state.pending.get(e.requestId);if(n){if(this._state.pending.delete(e.requestId),e.error){n.reject(new Error(e.error));return}n.resolve(e.results??[])}}static \u0275fac=function(n){return new(n||kl)};static \u0275prov=y({token:kl,factory:kl.\u0275fac})};return t=P([R(Su)],t),t})(),ku=class{static fToken=Symbol("EnsureConnectionWorkerRequest")},R7=(()=>{let t=class Il{_browser=p(at);_state=p(Wi);_mediator=p(V);handle(e){if(this._state.worker)return this._state.worker;let n=this._browser.document.defaultView;if(!Ly(n))return null;let i=By(n);if(!i)return null;let r=K6(i);try{let a=new i.workerCtor(r,{name:"f-flow-connection-worker"});return a.onmessage=s=>{this._mediator.execute(new Su(s.data))},a.onerror=()=>{this._resetWorkerAfterRuntimeError(new Error("Connection worker runtime error."))},a.onmessageerror=()=>{this._resetWorkerAfterRuntimeError(new Error("Connection worker message deserialization error."))},this._state.workerUrl=r,this._state.worker=a,a}catch(a){return Vy(r,i.urlApi),this._disableWorker(a instanceof Error?a:new Error("Connection worker initialization failed.")),null}}_disableWorker(e){this._mediator.execute(new Tu(e))}_resetWorkerAfterRuntimeError(e){this._mediator.execute(new Fr(e))}static \u0275fac=function(n){return new(n||Il)};static \u0275prov=y({token:Il,factory:Il.\u0275fac})};return t=P([R(ku)],t),t})(),Iu=class{payload;static fToken=Symbol("RunConnectionWorkerRequest");constructor(o){this.payload=o}},O7=(()=>{let t=class El{_state=p(Wi);_mediator=p(V);handle({payload:e}){if(!e.length)return Promise.resolve([]);if(!this._mediator.execute(new Or))return Promise.reject(new Error("Connection worker is disabled."));this._interruptPendingRequests();let n=this._mediator.execute(new ku);if(!n)return Promise.reject(new Error("Unable to initialize connection worker."));let i=++this._state.nextRequestId;return new Promise((r,a)=>{this._state.pending.set(i,{resolve:r,reject:a});try{n.postMessage({requestId:i,items:e})}catch(s){this._state.pending.delete(i),a(s instanceof Error?s:new Error("Unknown error while posting message to connection worker."))}})}_interruptPendingRequests(){if(!this._state.pending.size)return;let e=new Error("Connection worker request was superseded by a newer redraw.");this._state.pending.forEach(n=>n.reject(e)),this._state.pending.clear()}static \u0275fac=function(n){return new(n||El)};static \u0275prov=y({token:El,factory:El.\u0275fac})};return t=P([R(Iu)],t),t})(),Eu=class{batch;static fToken=Symbol("RunConnectionWorkerBatchRequest");constructor(o){this.batch=o}},F7=(()=>{let t=class Ml{_mediator=p(V);handle({batch:e}){return e.payload.length?this._mediator.execute(new Iu(e.payload)):Promise.resolve([])}static \u0275fac=function(n){return new(n||Ml)};static \u0275prov=y({token:Ml,factory:Ml.\u0275fac})};return t=P([R(Eu)],t),t})(),Mu=class{connections;cache;session;static fToken=Symbol("StartConnectionWorkerRedrawRequest");constructor(o,e,n){this.connections=o,this.cache=e,this.session=n}},N7=(()=>{let t=class Dl{_mediator=p(V);handle({connections:e,cache:n,session:i}){let r=this._mediator.execute(new wu(e,n));if(!r.payload.length){this._mediator.execute(new si(e,n,0,i,r.items));return}this._mediator.execute(new Eu(r)).then(a=>{this._mediator.execute(new qi(i))&&this._mediator.execute(new si(e,n,0,i,r.items,this._alignWorkerResults(a,e.length)))}).catch(()=>{this._mediator.execute(new qi(i))&&this._mediator.execute(new si(e,n,0,i,r.items))})}_alignWorkerResults(e,n){let i=new Array(n);for(let r of e){let a=r.originalIndex;a<0||a>=n||(i[a]=r)}return i}static \u0275fac=function(n){return new(n||Dl)};static \u0275prov=y({token:Dl,factory:Dl.\u0275fac})};return t=P([R(Mu)],t),t})(),A7=(()=>{let t=class Pl{_mediator=p(V);_store=p(L);handle(e){let n=this._mediator.execute(new yu);this._createMarkersForCreate(),this._createMarkersForSnap();let i=[...this._store.connections.getAll()],r=new Map;if(!i.length){this._mediator.execute(new Pr(n));return}this._shouldUseConnectionWorker(i.length)?this._redrawUsingWorker(i,r,n):this._redrawWithoutWorker(i,r,n)}_createMarkersForCreate(){let e=this._store.connections.getForCreate();e&&this._mediator.execute(new Do(e))}_createMarkersForSnap(){let e=this._store.connections.getForSnap();e&&this._mediator.execute(new Do(e))}_shouldUseConnectionWorker(e){return this._mediator.execute(new Cu(e))}_redrawUsingWorker(e,n,i){this._mediator.execute(new Mu(e,n,i))}_redrawWithoutWorker(e,n,i){this._mediator.execute(new si(e,n,0,i))}static \u0275fac=function(n){return new(n||Pl)};static \u0275prov=y({token:Pl,factory:Pl.\u0275fac})};return t=P([R(Rr)],t),t})(),Vm=class{static fToken=Symbol("RemoveConnectionForCreateFromStoreRequest")},L7=(()=>{let t=class Rl{_store=p(L);handle(e){this._store.connections.removeInstanceForCreate()}static \u0275fac=function(n){return new(n||Rl)};static \u0275prov=y({token:Rl,factory:Rl.\u0275fac})};return t=P([R(Vm)],t),t})(),Du=class{connection;static fToken=Symbol("RemoveConnectionFromStoreRequest");constructor(o){this.connection=o}},B7=(()=>{let t=class Ol{_store=p(L);handle({connection:e}){this._store.connections.remove(e),this._store.emitConnectionChanges()}static \u0275fac=function(n){return new(n||Ol)};static \u0275prov=y({token:Ol,factory:Ol.\u0275fac})};return t=P([R(Du)],t),t})(),Pu=class{instance;static fToken=Symbol("RemoveConnectionMarkerFromStoreRequest");constructor(o){this.instance=o}},V7=(()=>{let t=class Fl{_store=p(L);handle({instance:e}){this._store.connectionMarkers.remove(e),this._store.emitNodeChanges()}static \u0275fac=function(n){return new(n||Fl)};static \u0275prov=y({token:Fl,factory:Fl.\u0275fac})};return t=P([R(Pu)],t),t})(),zm=class{waypointIndex;connectionId;static fToken=Symbol("RemoveConnectionWaypointRequest");constructor(o,e){this.waypointIndex=o,this.connectionId=e}},Ru=class{static fToken=Symbol("EmitEndDragSequenceEventRequest")},z7=(()=>{let t=class Nl{_store=p(L);_dragSession=p(he);handle(e){this._store.flowHost.classList.remove(ht.DRAG_AND_DROP.DRAGGING),this._dragSession.reset(),this._emitEvent()}_emitEvent(){this._store.fDraggable?.fDragEnded?.emit()}static \u0275fac=function(n){return new(n||Nl)};static \u0275prov=y({token:Nl,factory:Nl.\u0275fac})};return t=P([R(Ru)],t),t})(),Ou=class{static fToken=Symbol("EmitStartDragSequenceEventRequest")},H7=(()=>{let t=class Al{_mediator=p(V);_store=p(L);_dragContext=p(he);handle(e){this._dragContext.draggableItems.length>0&&(this._store.flowHost.classList.add(ht.DRAG_AND_DROP.DRAGGING),this._mediator.execute(new Nr),this._emitDragStarted())}_emitDragStarted(){let e=this._dragContext.draggableItems[0].getEvent();this._store.fDraggable?.fDragStarted?.emit(new Vu(e.kind,e.data?be({},e.data):void 0,e.fEventType))}static \u0275fac=function(n){return new(n||Al)};static \u0275prov=y({token:Al,factory:Al.\u0275fac})};return t=P([R(Ou)],t),t})(),Nr=class{static fToken=Symbol("EmitSelectionChangeEventRequest")},Gi=class{_event;_target;get originalEvent(){return this._event}get targetElement(){return this._target||this.originalEvent.target}get touchEvent(){return this._event}get touches(){return this.touchEvent.touches}constructor(o,e){this._event=o,this._target=e}setTarget(o){this._target=o}preventDefault(){this.originalEvent.preventDefault()}get isEventInLockedContext(){return this.targetElement.closest("[fLockedContext]")!==null}},Fu=class extends Gi{constructor(o,e){super(o,e)}isMouseLeftButton(){return this.originalEvent.button===0}isMouseRightButton(){return this.originalEvent.buttons===2}getPosition(){return{x:this.originalEvent.clientX,y:this.originalEvent.clientY}}},Hm=class extends Gi{constructor(o,e){super(o,e)}isMouseLeftButton(){let o=this.originalEvent;return o.pointerType==="mouse"&&o.button===0||o.pointerType==="touch"}isMouseRightButton(){let o=this.originalEvent;return o.pointerType==="mouse"&&o.button===2||o.pointerType==="touch"}getPosition(){let o=this.originalEvent;return{x:o.clientX,y:o.clientY}}getPointerType(){return this.originalEvent.pointerType}getPointerId(){return this.originalEvent.pointerId}},qm=class extends Gi{constructor(o){super(o)}isMouseLeftButton(){return!0}isMouseRightButton(){return!1}getPosition(){let o=this.originalEvent.touches;return{x:o[0].clientX,y:o[0].clientY}}},Gm=class extends Gi{constructor(o,e){super(o,e)}isMouseLeftButton(){return!0}isMouseRightButton(){return!1}getPosition(){let o=this.originalEvent.targetTouches[0];return{x:o.clientX,y:o.clientY}}},He=(()=>{class t{static _isSupported;static _isPassiveEventListenerSupported(){if(t._isSupported==null&&typeof window<"u")try{window.addEventListener("test",t.emptyListener,{passive:!0}),t._isSupported=!0}catch{t._isSupported=!1}return t._isSupported}static _passiveEventListener(e){return t._isPassiveEventListenerSupported()?e:!!e.capture}static activeListener(){return t._passiveEventListener({passive:!1})}static passiveListener(){return t._passiveEventListener({passive:!0})}static activeCaptureListener(){return t._passiveEventListener({passive:!1,capture:!0})}static emptyListener(){return()=>{}}}return t})(),q7=800,jm=class{_document=p(ja);_ngZone=p(Zt,{optional:!0});_mouseListeners=He.emptyListener();_touchListeners=He.emptyListener();_startListeners=He.emptyListener();isSyntheticEvent(o){return!!this._lastTouchEventTime&&this._lastTouchEventTime+q7>Date.now()}_lastTouchEventTime=0;isDragStarted=!1;_dragStartThreshold=3;_dragStartDelay=0;_dragStartTime=0;_dragStartPosition={x:0,y:0};_moveHandler=this._checkDragSequenceToStart;_pointerDownElement=null;_onMouseDown=o=>{let e=this.isSyntheticEvent(o),n=j7(o),i=new Fu(o);if(e||n||this.disabled||this.isDragStarted)return;this._pointerDownElement=i.targetElement,this.onPointerDown(i)&&(this._dragStartTime=Date.now(),this._dragStartPosition=i.getPosition(),this._ngZone?.runOutsideAngular(()=>{this._listen("selectstart",this._onSelectStart,He.activeListener()),this._listen("mousemove",this._onMouseMove),this._listen("pointerup",this._onPointerUpEvent),this._listen("pointercancel",this._onPointerUpEvent,He.activeCaptureListener()),this._listen("contextmenu",this._preventDuringDrag,He.activeCaptureListener())}),this._mouseListeners=()=>{this._unlisten("selectstart",this._onSelectStart,He.activeListener()),this._unlisten("mousemove",this._onMouseMove),this._unlisten("pointerup",this._onPointerUpEvent),this._unlisten("pointercancel",this._onPointerUpEvent,He.activeCaptureListener()),this._unlisten("contextmenu",this._preventDuringDrag,He.activeCaptureListener())})};_onTouchDown=o=>{let e=U7(o),n=new qm(o);if(e||this.disabled||this.isDragStarted)return;this._pointerDownElement=n.targetElement,this.onPointerDown(n)&&(this._dragStartTime=Date.now(),this._dragStartPosition=n.getPosition(),this._ngZone?.runOutsideAngular(()=>{this._listen("selectstart",this._onSelectStart,He.activeListener()),this._listen("touchmove",this._onTouchMove),this._listen("pointerup",this._onPointerUpEvent),this._listen("pointercancel",this._onPointerUpEvent,He.activeCaptureListener()),this._listen("contextmenu",this._preventDuringDrag,He.activeCaptureListener())}),this._touchListeners=()=>{this._unlisten("selectstart",this._onSelectStart,He.activeListener()),this._unlisten("touchmove",this._onTouchMove),this._unlisten("pointerup",this._onPointerUpEvent),this._unlisten("pointercancel",this._onPointerUpEvent,He.activeCaptureListener()),this._unlisten("contextmenu",this._preventDuringDrag,He.activeCaptureListener())})};_onSelectStart=o=>{this.onSelect(o)};_onMouseMove=o=>{this._moveHandler(new Fu(o))};_onTouchMove=o=>{this._moveHandler(new Gm(o))};_checkDragSequenceToStart(o){let e=o.getPosition();if(!this.isDragStarted&&this._pointerDownElement){o.setTarget(this._pointerDownElement);let n=Math.abs(e.x-this._dragStartPosition.x),i=Math.abs(e.y-this._dragStartPosition.y);if(n+i>=this._dragStartThreshold){if(!(Date.now()>=this._dragStartTime+this._dragStartDelay)){this._endDragSequence();return}o.preventDefault(),this.prepareDragSequence(o),this.isDragStarted=!0,this._moveHandler=this.onPointerMove,G7(o.originalEvent)&&(this._lastTouchEventTime=Date.now())}}}_onPointerUpEvent=o=>{this.isDragStarted&&this.onPointerUp(new Hm(o)),this._endDragSequence()};_endDragSequence(){this.isDragStarted=!1,this._pointerDownElement=null,this._moveHandler=this._checkDragSequenceToStart,this._mouseListeners(),this._mouseListeners=He.emptyListener(),this._touchListeners(),this._touchListeners=He.emptyListener(),this.finalizeDragSequence()}subscribe(){this.unsubscribe(),this._ngZone?.runOutsideAngular(()=>{this._listen("mousedown",this._onMouseDown,He.activeListener()),this._listen("touchstart",this._onTouchDown,He.passiveListener())}),this._startListeners=()=>{this._unlisten("mousedown",this._onMouseDown,He.activeListener()),this._unlisten("touchstart",this._onTouchDown,He.passiveListener())}}unsubscribe(){this._startListeners(),this._startListeners=He.emptyListener(),this._touchListeners(),this._touchListeners=He.emptyListener(),this._mouseListeners(),this._mouseListeners=He.emptyListener()}_listen(o,e,n){this._document.addEventListener(o,e,n)}_unlisten(o,e,n){this._document.removeEventListener(o,e,n)}_preventDuringDrag=o=>{this.isDragStarted&&o.preventDefault()}};function G7(t){return t.type[0]==="t"}function j7(t){return t.buttons===0||t.offsetX===0&&t.offsetY===0}function U7(t){let o=t.touches&&t.touches[0]||t.changedTouches&&t.changedTouches[0];return!!o&&o.identifier===-1&&(o.radiusX==null||o.radiusX===1)&&(o.radiusY==null||o.radiusY===1)}var Um=class extends Gi{_position;_isMouseLeftButton;_isMouseRightButton;constructor(o){super(o.originalEvent,o.targetElement),this._position=o.getPosition(),this._isMouseLeftButton=o.isMouseLeftButton(),this._isMouseRightButton=o.isMouseRightButton()}isMouseLeftButton(){return this._isMouseLeftButton}isMouseRightButton(){return this._isMouseRightButton}getPosition(){return be({},this._position)}};function $7(t){return new Um(t)}var he=(()=>{class t{selectedItems=[];isSelectedChanged=!1;onPointerDownScale=1;onPointerDownPosition=new ce(0,0);draggableItems=[];autoPanFrameId=null;lastPointerEvent=null;lastPointerPosition=null;isAutoPanCanvasMoved=!1;reset(){for(let e of this.draggableItems)try{e.destroy?.()}catch{console.error(`Error while destroying drag handler of type ${e.type}`)}this.draggableItems=[],this.onPointerDownScale=1,this.onPointerDownPosition=new ce(0,0),this.autoPanFrameId=null,this.lastPointerEvent=null,this.lastPointerPosition=null,this.isAutoPanCanvasMoved=!1}markSelectionAsChanged(){this.isSelectedChanged=!0}rememberPointerEvent(e){this.lastPointerEvent=$7(e),this.lastPointerPosition=this.lastPointerEvent.getPosition()}isEmpty(){return!this.draggableItems.length}static \u0275fac=function(n){return new(n||t)};static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),$m=class{nodeIds;groupIds;connectionIds;get fNodeIds(){return this.nodeIds}get fGroupIds(){return this.groupIds}get fConnectionIds(){return this.connectionIds}constructor(o,e,n){this.nodeIds=o,this.groupIds=e,this.connectionIds=n}},W7=(()=>{let t=class Ll{_mediator=p(V);_store=p(L);_dragSession=p(he);handle(e){this._dragSession.isSelectedChanged&&(this._emitSelectionChange(this._getSelection()),this._dragSession.isSelectedChanged=!1,this._mediator.execute(new li))}_getSelection(){return this._mediator.execute(new oa)}_emitSelectionChange(e){this._store.fDraggable?.fSelectionChange.emit(new $m(e.fNodeIds,e.fGroupIds,e.fConnectionIds))}static \u0275fac=function(n){return new(n||Ll)};static \u0275prov=y({token:Ll,factory:Ll.\u0275fac})};return t=P([R(Nr)],t),t})(),Wm=class{nodeOrGroup;static fToken=Symbol("GetNormalizedParentNodeRectRequest");constructor(o){this.nodeOrGroup=o}},K7=(()=>{let t=class Bl{_store=p(L);_mediator=p(V);handle({nodeOrGroup:e}){let n=te.initialize(-1/0,-1/0,1/0,1/0),i=this._getNode(e.fParentId());return i&&(n=this._getParentRect(i)),n}_getNode(e){return this._store.nodes.get(e)}_getParentRect(e){let n=this._getNodeRect(e),i=this._getNodePadding(e,n);return te.initialize(n.x+i[0],n.y+i[1],n.width-i[0]-i[2],n.height-i[1]-i[3])}_getNodeRect(e){return this._mediator.execute(new it(e.hostElement))}_getNodePadding(e,n){return this._mediator.execute(new Ui(e,n))}static \u0275fac=function(n){return new(n||Bl)};static \u0275prov=y({token:Bl,factory:Bl.\u0275fac})};return t=P([R(Wm)],t),t})(),Km=class{fParentNodes;fDraggedNodes;static fToken=Symbol("IsArrayHasParentNodeRequest");constructor(o,e){this.fParentNodes=o,this.fDraggedNodes=e}},Y7=(()=>{let t=class Vl{handle(e){return this._isParentNodeInArray(this._getParentNodeIds(e.fParentNodes),e.fDraggedNodes)}_getParentNodeIds(e){return e.map(n=>n.fId())}_isParentNodeInArray(e,n){return n.some(i=>e.includes(i.fId()))}static \u0275fac=function(n){return new(n||Vl)};static \u0275prov=y({token:Vl,factory:Vl.\u0275fac})};return t=P([R(Km)],t),t})(),Ym=class{fNodeId;fConnectionIds;constructor(o,e){this.fNodeId=o,this.fConnectionIds=e}},Nu=class extends Ym{nodeId;connectionIds;constructor(o,e){super(o,e),this.nodeId=o,this.connectionIds=e}},Au=class{nodeOrGroup;static fToken=Symbol("DetectConnectionsUnderDragNodeRequest");constructor(o){this.nodeOrGroup=o}},X7=(()=>{let t=class zl{_mediator=p(V);_store=p(L);handle({nodeOrGroup:e}){let n=this._collectConnectableConnectorIds(e,"source"),i=this._collectConnectableConnectorIds(e,"target");if(!n.size||!i.size)return;let r=this._collectAttachedConnectionIds(n,i),a=this._collectConnectionsUnderNode(e),s=[];for(let c of a){let u=c.fId();r.has(u)||s.push(u)}s.length&&(this._store.fDraggable?.fNodeIntersectedWithConnections.emit(new Nu(e.fId(),s)),this._store.fDraggable?.fNodeConnectionsIntersection.emit(new Nu(e.fId(),s)))}_collectConnectableConnectorIds(e,n){let i=n==="source"?this._store.outputs.getAll():this._store.inputs.getAll(),r=new Set;for(let a of i)a.canBeConnected&&e.isContains(a.hostElement)&&r.add(a.fId());return r}_collectAttachedConnectionIds(e,n){let i=new Set;for(let r of this._store.connections.getAll())(e.has(r.fOutputId())||n.has(r.fInputId()))&&i.add(r.fId());return i}_collectConnectionsUnderNode(e){let n=this._mediator.execute(new ui(e.hostElement,!1)),i=[];for(let r of this._store.connections.getAll())this._hasIntersection(r,n)&&i.push(r);return i}_hasIntersection(e,n){return xo.getRoundedRectIntersectionsWithSVGPath(e.fPath().hostElement,n).length>0}static \u0275fac=function(n){return new(n||zl)};static \u0275prov=y({token:zl,factory:zl.\u0275fac})};return t=P([R(Au)],t),t})(),Z7=[H7,z7,W7,K7,Y7,X7],Q7=new Set(["create-connection","reassign-connection","drag-node"]),J7=new Set(["selection-area"]),eB=new Set(["assign-to-container"]);function Hy(t){let o=null;for(let e of t){if(eB.has(e))continue;let n=Q7.has(e)?"rebase":J7.has(e)?"direct":null;if(!n)return null;if(!o){o=n;continue}if(o!==n)return null}return o}function qy(t,o,e,n,i){return U.initialize(ny(t.x,o.left,o.right,e,n,i),ny(t.y,o.top,o.bottom,e,n,i))}function ny(t,o,e,n,i,r){let a=Math.max(0,n),s=Math.max(0,i);if(!a||!s)return 0;if(t<=o+a){let c=oy((o+a-t)/a,0,1);return iy(c,s,r)}if(t>=e-a){let c=oy((t-(e-a))/a,0,1);return-iy(c,s,r)}return 0}function tB(t,o,e){let n=e||1;return ce.fromPoint(t).add(ce.fromPoint(o).div(n))}function iy(t,o,e){return e?o*t:o}function oy(t,o,e){return Math.max(o,Math.min(e,t))}var Lu=class{static fToken=Symbol("RunAutoPanFrameRequest")},pi=class{static fToken=Symbol("StopAutoPanRequest")},nB=(()=>{let t=class Hl{_store=p(L);_dragContext=p(he);handle(e){this._dragContext.autoPanFrameId!==null&&(cancelAnimationFrame(this._dragContext.autoPanFrameId),this._dragContext.autoPanFrameId=null),this._dragContext.isAutoPanCanvasMoved&&(this._store.fCanvas?.emitCanvasChangeEvent(),this._dragContext.isAutoPanCanvasMoved=!1)}static \u0275fac=function(n){return new(n||Hl)};static \u0275prov=y({token:Hl,factory:Hl.\u0275fac})};return t=P([R(pi)],t),t})(),Ar=class{static fToken=Symbol("SyncAutoPanRequest")},iB=(()=>{let t=class ql{_mediator=p(V);_store=p(L);_dragContext=p(he);handle(e){if(!this._canAutoPan()||!this._hasAutoPanDelta()){this._mediator.execute(new pi);return}this._dragContext.autoPanFrameId===null&&(this._dragContext.autoPanFrameId=requestAnimationFrame(()=>{this._dragContext.autoPanFrameId=null,this._mediator.execute(new Lu)}))}_canAutoPan(){return!!this._store.fFlow&&!!this._store.fCanvas&&!!this._store.fDraggable?.isDragStarted&&!!this._autoPan()&&!!this._getAutoPanMode()&&this._edgeThreshold()>0&&this._speed()>0}_hasAutoPanDelta(){let e=this._getAutoPanDelta();return!!e.x||!!e.y}_getAutoPanDelta(){let e=this._dragContext.lastPointerPosition,n=this._store.fFlow?.hostElement;return!e||!n?U.initialize():qy(e,n.getBoundingClientRect(),this._edgeThreshold(),this._speed(),this._acceleration())}_getAutoPanMode(){return Hy(this._dragContext.draggableItems.map(e=>e.getEvent().kind))}_edgeThreshold(){return Math.max(0,this._autoPan()?.fEdgeThreshold()??0)}_speed(){return Math.max(0,this._autoPan()?.fSpeed()??0)}_acceleration(){return!!this._autoPan()?.fAcceleration()}_autoPan(){return this._store.instances.get(Ye.AUTO_PAN)}static \u0275fac=function(n){return new(n||ql)};static \u0275prov=y({token:ql,factory:ql.\u0275fac})};return t=P([R(Ar)],t),t})(),oB=(()=>{let t=class Gl{_mediator=p(V);_store=p(L);_dragContext=p(he);handle(e){let n=this._getAutoPanMode();if(!this._canAutoPan(n)){this._mediator.execute(new pi);return}let i=this._getAutoPanDelta();if(!i.x&&!i.y){this._mediator.execute(new pi);return}this._applyCanvasDelta(i,n),this._replayLastPointerMove(),this._mediator.execute(new Ar)}_applyCanvasDelta(e,n){let i=this._store.transform;n==="rebase"&&(this._dragContext.onPointerDownPosition=tB(this._dragContext.onPointerDownPosition,e,this._dragContext.onPointerDownScale||i.scale||1)),i.position=ce.fromPoint(i.position).add(e),this._store.fCanvas?.redraw(),this._dragContext.isAutoPanCanvasMoved=!0}_replayLastPointerMove(){let e=this._dragContext.lastPointerEvent;if(!e)return;let n=this._getPointerPositionInCanvas(e).div(this._dragContext.onPointerDownScale).sub(this._dragContext.onPointerDownPosition);this._dragContext.draggableItems.forEach(i=>{i.onPointerMove(be({},n),e)})}_getPointerPositionInCanvas(e){return ce.fromPoint(e.getPosition()).elementTransform(this._store.flowHost)}_canAutoPan(e){return!!this._store.fFlow&&!!this._store.fCanvas&&!!this._store.fDraggable?.isDragStarted&&!!this._autoPan()&&!!e&&this._edgeThreshold()>0&&this._speed()>0}_getAutoPanMode(){return Hy(this._dragContext.draggableItems.map(e=>e.getEvent().kind))}_getAutoPanDelta(){let e=this._dragContext.lastPointerPosition,n=this._store.fFlow?.hostElement;return!e||!n?U.initialize():qy(e,n.getBoundingClientRect(),this._edgeThreshold(),this._speed(),this._acceleration())}_edgeThreshold(){return Math.max(0,this._autoPan()?.fEdgeThreshold()??0)}_speed(){return Math.max(0,this._autoPan()?.fSpeed()??0)}_acceleration(){return!!this._autoPan()?.fAcceleration()}_autoPan(){return this._store.instances.get(Ye.AUTO_PAN)}static \u0275fac=function(n){return new(n||Gl)};static \u0275prov=y({token:Gl,factory:Gl.\u0275fac})};return t=P([R(Lu)],t),t})(),rB=[iB,oB,nB],Bu=class{event;static fToken=Symbol("DragCanvasFinalizeRequest");constructor(o){this.event=o}},Vu=class{kind;data;fEventType;get fData(){return this.data}constructor(o,e,n){this.kind=o,this.data=e,this.fEventType=n??o}},Pt=class{data(){}_features=[];getEvent(){return new Vu(this.kind,this.data(),this.type)}attachFeature(o){this._features.push(o)}featuresPrepare(o){for(let e of this._features)e.onPrepare?.(o)}featuresMove(o,e){for(let n of this._features)n.onMove?.(o,e)}featuresFinalize(o,e){for(let n of this._features)n.onFinalize?.(o,e)}featuresEnd(o){for(let e of this._features)e.onEnd?.(o)}},zu=class{_isConnected=!1;get isConnected(){return this._isConnected}toConnector=[];isSelfConnectable=!0;fConnectableSide=K.AUTO;userFConnectableSide=K.AUTO;isContains(o){return this.hostElement.contains(o)}setConnected(o){this._isConnected=!0,this.toConnector.push(o)}resetConnected(){this._isConnected=!1,this.toConnector=[]}},aB=new ge("F_NODE_INPUT"),sB=(()=>{class t extends zu{kind="input";get canBeConnected(){return!this.disabled()&&(this.multiple()?!0:!this.isConnected)}static \u0275fac=(()=>{let e;return function(i){return(e||(e=G(t)))(i||t)}})();static \u0275dir=je({type:t,standalone:!1,features:[Z]})}return t})(),En=(function(t){return t.LEFT="left",t.LEFT_TOP="left-top",t.TOP="top",t.RIGHT_TOP="right-top",t.RIGHT="right",t.RIGHT_BOTTOM="right-bottom",t.BOTTOM="bottom",t.LEFT_BOTTOM="left-bottom",t})(En||{});function lB(t){return Cr(t,".f-rotate-handle")}var Gy=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275dir=je({type:t,selectors:[["","fDragHandle",""]],hostAttrs:[1,"f-drag-handle","f-component"],standalone:!1})}return t})(),Ih=new ge("F_NODE"),cB=Fy(class{hostElement;constructor(t){this.hostElement=t}}),Hu=class extends cB{_injector=p(dt);renderer=p(S0);browser=p(at);stateChanges=new sn;_position=U.initialize();_rotate=0;_size;connectors=[];positionChanges(){de(()=>{let o=this.position();en(()=>{U.isEqual(this._position,o)||(this._position=o,this.redraw(),this.refresh())})},{injector:this._injector})}sizeChanges(){de(()=>{let o=this.size();en(()=>{this._isSizeEqual(o)||(this._size=o,this.redraw(),this.refresh())})},{injector:this._injector})}rotateChanges(){de(()=>{let o=this.rotate();en(()=>{this._rotate!==o&&(this._rotate=o,this.redraw(),this.refresh())})},{injector:this._injector})}parentChanges(){de(()=>{this.fParentId(),this.fIncludePadding(),this.fAutoSizeToFitChildren(),en(()=>this.refresh())},{injector:this._injector})}_isSizeEqual(o){return this._size?.width===o?.width&&this._size?.height===o?.height}isContains(o){return this.hostElement.contains(o)}redraw(){this._size&&(this.setStyle("width",""+this._size.width+"px"),this.setStyle("height",""+this._size.height+"px")),this.setStyle("transform",`translate(${this._position.x}px,${this._position.y}px) rotate(${this._rotate}deg)`)}resetSize(){this.removeStyle("width"),this.removeStyle("height")}updatePosition(o){this._position=o}updateRotate(o){this._rotate=o}updateSize(o){this._size=o}setClass(o){this.hostElement.classList.add(o)}removeClass(o){this.hostElement.classList.remove(o)}addConnector(o){this.connectors.push(o),this.refresh()}removeConnector(o){let e=this.connectors.indexOf(o);e!==-1&&this.connectors.splice(e,1),this.refresh()}},dB=0,uB=3,Xm=(()=>{class t extends Hu{_debounceTimer=null;_destroyRef=p(xt);_mediator=p(V);fId=B(`f-group-${dB++}`,{alias:"fGroupId"});fParentId=B(null,{alias:"fGroupParentId"});position=Di(U.initialize(),{alias:"fGroupPosition"});size=B(void 0,{alias:"fGroupSize"});sizeChange=et({alias:"fGroupSizeChange"});rotate=Di(0,{alias:"fGroupRotate"});fConnectOnNode=B(!0,{transform:j});fMinimapClass=B([]);fDraggingDisabled=B(!1,{alias:"fGroupDraggingDisabled",transform:j});fSelectionDisabled=B(!1,{alias:"fGroupSelectionDisabled",transform:j});fIncludePadding=B(!0,{transform:j});fAutoExpandOnChildHit=B(!1,{transform:j});fAutoSizeToFitChildren=B(!1,{transform:j});constructor(e){super(e.nativeElement),super.positionChanges(),super.sizeChanges(),super.rotateChanges(),super.parentChanges()}ngOnInit(){super.redraw(),this._mediator.execute(new Zr(this))}setStyle(e,n){this.renderer.setStyle(this.hostElement,e,n)}removeStyle(e){this.renderer.removeStyle(this.hostElement,e)}redraw(){super.redraw(),this._mediator.execute(new li),this._updateConnectorsSides()}_updateConnectorsSides(){this.connectors.length&&(this._debounceTimer&&clearTimeout(this._debounceTimer),this._debounceTimer=setTimeout(()=>this._calculateNodeConnectorsConnectableSides(),uB))}_calculateNodeConnectorsConnectableSides(){this._mediator.execute(new No(this))}ngAfterViewInit(){this.browser.isBrowser()&&this._listenStateSizeChanges()}_listenStateSizeChanges(){this._mediator.execute(new Jr(this,this._destroyRef))}refresh(){this.stateChanges.notify()}ngOnDestroy(){this._mediator.execute(new ea(this))}static \u0275fac=function(n){return new(n||t)(fn(Ze))};static \u0275dir=je({type:t,selectors:[["","fGroup",""]],hostAttrs:[1,"f-group","f-component"],hostVars:5,hostBindings:function(n,i){n&2&&(O("data-f-group-id",i.fId()),se("f-group-dragging-disabled",i.fDraggingDisabled())("f-group-selection-disabled",i.fSelectionDisabled()))},inputs:{fId:[1,"fGroupId","fId"],fParentId:[1,"fGroupParentId","fParentId"],position:[1,"fGroupPosition","position"],size:[1,"fGroupSize","size"],rotate:[1,"fGroupRotate","rotate"],fConnectOnNode:[1,"fConnectOnNode"],fMinimapClass:[1,"fMinimapClass"],fDraggingDisabled:[1,"fGroupDraggingDisabled","fDraggingDisabled"],fSelectionDisabled:[1,"fGroupSelectionDisabled","fSelectionDisabled"],fIncludePadding:[1,"fIncludePadding"],fAutoExpandOnChildHit:[1,"fAutoExpandOnChildHit"],fAutoSizeToFitChildren:[1,"fAutoSizeToFitChildren"]},outputs:{position:"fGroupPositionChange",sizeChange:"fGroupSizeChange",rotate:"fGroupRotateChange"},exportAs:["fComponent"],standalone:!1,features:[we([{provide:Ih,useExisting:t}]),Z]})}return t})(),ry=0,pB=3,Eh=(()=>{class t extends Hu{_debounceTimer=null;_destroyRef=p(xt);_mediator=p(V);fId=B(`f-node-${ry++}`,{alias:"fNodeId",transform:e=>Oo(e)||`f-node-${ry++}`});fParentId=B(null,{alias:"fNodeParentId"});position=Di(U.initialize(),{alias:"fNodePosition"});size=B(void 0,{alias:"fNodeSize"});sizeChange=et({alias:"fNodeSizeChange"});rotate=Di(0,{alias:"fNodeRotate"});fConnectOnNode=B(!0,{transform:j});fMinimapClass=B([]);fDraggingDisabled=B(!1,{alias:"fNodeDraggingDisabled",transform:j});fSelectionDisabled=B(!1,{alias:"fNodeSelectionDisabled",transform:j});fIncludePadding=B(!0,{transform:j});fAutoExpandOnChildHit=B(!1,{transform:j});fAutoSizeToFitChildren=B(!1,{transform:j});constructor(e){super(e.nativeElement),super.positionChanges(),super.sizeChanges(),super.rotateChanges(),super.parentChanges()}ngOnInit(){super.redraw(),this._mediator.execute(new Zr(this))}setStyle(e,n){this.renderer.setStyle(this.hostElement,e,n)}removeStyle(e){this.renderer.removeStyle(this.hostElement,e)}redraw(){super.redraw(),this._mediator.execute(new li),this._updateConnectorsSides()}_updateConnectorsSides(){this.connectors.length&&(this._debounceTimer&&clearTimeout(this._debounceTimer),this._debounceTimer=setTimeout(()=>this._calculateNodeConnectorsConnectableSides(),pB))}_calculateNodeConnectorsConnectableSides(){this._mediator.execute(new No(this))}ngAfterViewInit(){this.browser.isBrowser()&&this._listenStateSizeChanges()}_listenStateSizeChanges(){this._mediator.execute(new Jr(this,this._destroyRef))}refresh(){this.stateChanges.notify()}ngOnDestroy(){this._mediator.execute(new ea(this))}static \u0275fac=function(n){return new(n||t)(fn(Ze))};static \u0275dir=je({type:t,selectors:[["","fNode",""]],hostAttrs:[1,"f-node","f-component"],hostVars:5,hostBindings:function(n,i){n&2&&(O("data-f-node-id",i.fId()),se("f-node-dragging-disabled",i.fDraggingDisabled())("f-node-selection-disabled",i.fSelectionDisabled()))},inputs:{fId:[1,"fNodeId","fId"],fParentId:[1,"fNodeParentId","fParentId"],position:[1,"fNodePosition","position"],size:[1,"fNodeSize","size"],rotate:[1,"fNodeRotate","rotate"],fConnectOnNode:[1,"fConnectOnNode"],fMinimapClass:[1,"fMinimapClass"],fDraggingDisabled:[1,"fNodeDraggingDisabled","fDraggingDisabled"],fSelectionDisabled:[1,"fNodeSelectionDisabled","fSelectionDisabled"],fIncludePadding:[1,"fIncludePadding"],fAutoExpandOnChildHit:[1,"fAutoExpandOnChildHit"],fAutoSizeToFitChildren:[1,"fAutoSizeToFitChildren"]},outputs:{position:"fNodePositionChange",sizeChange:"fNodeSizeChange",rotate:"fNodeRotateChange"},exportAs:["fComponent"],standalone:!1,features:[we([{provide:Ih,useExisting:t}]),Z]})}return t})();function hB(t){return!!t.closest("[fNode]")}var ay=0,jy=(()=>{class t extends sB{hostElement=p(Ze).nativeElement;_mediator=p(V);_node=p(Ih);fId=B(`f-node-input-${ay++}`,{alias:"fInputId",transform:e=>Oo(e)||`f-node-input-${ay++}`});category=B(void 0,{alias:"fInputCategory",transform:Oo});multiple=B(!0,{alias:"fInputMultiple",transform:j});disabled=B(!1,{alias:"fInputDisabled",transform:j});userFConnectableSide=K.AUTO;get fNodeId(){return this._node.fId()}get fNodeHost(){return this._node.hostElement}ngOnInit(){this._mediator.execute(new Kr(this)),this._node.addConnector(this)}ngOnChanges(e){e.userFConnectableSide&&this._node.refresh()}setConnected(e){super.setConnected(e),this.hostElement.classList.toggle(ht.CONNECTOR.INPUT_CONNECTED,!0),this.hostElement.classList.toggle(ht.CONNECTOR.INPUT_NOT_CONNECTABLE,!this.canBeConnected)}resetConnected(){super.resetConnected(),this.hostElement.classList.toggle(ht.CONNECTOR.INPUT_CONNECTED,!1),this.hostElement.classList.toggle(ht.CONNECTOR.INPUT_NOT_CONNECTABLE,!this.canBeConnected)}ngOnDestroy(){this._node.removeConnector(this),this._mediator.execute(new ta(this))}static \u0275fac=(()=>{let e;return function(i){return(e||(e=G(t)))(i||t)}})();static \u0275dir=je({type:t,selectors:[["","fNodeInput",""]],hostAttrs:[1,"f-component","f-node-input"],hostVars:5,hostBindings:function(n,i){n&2&&(O("data-f-input-id",i.fId()),se("f-node-input-multiple",i.multiple)("f-node-input-disabled",i.disabled()))},inputs:{fId:[1,"fInputId","fId"],category:[1,"fInputCategory","category"],multiple:[1,"fInputMultiple","multiple"],disabled:[1,"fInputDisabled","disabled"],userFConnectableSide:[2,"fInputConnectableSide","userFConnectableSide",e=>wo(e,"fInputConnectableSide",K)]},exportAs:["fNodeInput"],standalone:!1,features:[we([{provide:aB,useExisting:t}]),Z,so]})}return t})(),fB=(()=>{class t extends zu{get hasConnectionLimits(){return!!this.canBeConnectedInputs&&this.canBeConnectedInputs.length>0}canConnectTo(e){return[e.fId(),e.category()].some(i=>i&&this.canBeConnectedInputs?.includes(i))}static \u0275fac=(()=>{let e;return function(i){return(e||(e=G(t)))(i||t)}})();static \u0275dir=je({type:t,standalone:!1,features:[Z]})}return t})();function Uy(t){return!!t.closest("[fNodeOutlet]")}var mB=new ge("F_NODE_OUTPUT"),_B=(()=>{class t extends fB{kind="output";get canBeConnected(){return!this.disabled()&&(this.multiple()?!0:!this.isConnected)}static \u0275fac=(()=>{let e;return function(i){return(e||(e=G(t)))(i||t)}})();static \u0275dir=je({type:t,standalone:!1,features:[Z]})}return t})();function $y(t){return!!t.closest("[fNodeOutput]")}var sy=0,Wy=(()=>{class t extends _B{hostElement=p(Ze).nativeElement;_mediator=p(V);_node=p(Ih);fId=B(`f-node-output-${sy++}`,{alias:"fOutputId",transform:e=>Oo(e)||`f-node-output-${sy++}`});multiple=B(!1,{alias:"fOutputMultiple",transform:j});disabled=B(!1,{alias:"fOutputDisabled",transform:j});userFConnectableSide=K.AUTO;isSelfConnectable=!0;canBeConnectedInputs=[];get fNodeId(){return this._node.fId()}get fNodeHost(){return this._node.hostElement}ngOnInit(){this._mediator.execute(new Kr(this)),this._node.addConnector(this)}ngOnChanges(e){e.userFConnectableSide&&this._node.refresh()}setConnected(e){super.setConnected(e),this.hostElement.classList.toggle(ht.CONNECTOR.OUTPUT_CONNECTED,!0),this.hostElement.classList.toggle(ht.CONNECTOR.OUTPUT_NOT_CONNECTABLE,!this.canBeConnected)}resetConnected(){super.resetConnected(),this.hostElement.classList.toggle(ht.CONNECTOR.OUTPUT_CONNECTED,!1),this.hostElement.classList.toggle(ht.CONNECTOR.OUTPUT_NOT_CONNECTABLE,!this.canBeConnected)}ngOnDestroy(){this._node.removeConnector(this),this._mediator.execute(new ta(this))}static \u0275fac=(()=>{let e;return function(i){return(e||(e=G(t)))(i||t)}})();static \u0275dir=je({type:t,selectors:[["","fNodeOutput",""]],hostAttrs:[1,"f-component","f-node-output"],hostVars:7,hostBindings:function(n,i){n&2&&(O("data-f-output-id",i.fId()),se("f-node-output-multiple",i.multiple)("f-node-output-disabled",i.disabled())("f-node-output-self-connectable",i.isSelfConnectable))},inputs:{fId:[1,"fOutputId","fId"],multiple:[1,"fOutputMultiple","multiple"],disabled:[1,"fOutputDisabled","disabled"],userFConnectableSide:[2,"fOutputConnectableSide","userFConnectableSide",e=>wo(e,"fOutputConnectableSide",K)],isSelfConnectable:"isSelfConnectable",canBeConnectedInputs:[0,"fCanBeConnectedInputs","canBeConnectedInputs"]},exportAs:["fNodeOutput"],standalone:!1,features:[we([{provide:mB,useExisting:t}]),Z,so]})}return t})();var qu=class{event;static fToken=Symbol("CreateConnectionFinalizeRequest");constructor(o){this.event=o}},Lr=class{outlet;static fToken=Symbol("ResolveConnectableOutputForOutletRequest");constructor(o){this.outlet=o}},gB=(()=>{let t=class jl{_store=p(L);handle({outlet:e}){let n=this._findOwnerNode(e);if(!n)throw new Error("The fOutlet must belong to an fNode");let i=this._findFirstConnectableOutputInNode(n);if(!i)throw new Error("Outlet requires at least one connectable output in the same node.");return i}_findOwnerNode(e){let n=e.hostElement;return this._store.nodes.getAll().find(i=>i.isContains(n))}_findFirstConnectableOutputInNode(e){return this._store.outputs.getAll().find(n=>e.isContains(n.hostElement)&&n.canBeConnected)}static \u0275fac=function(n){return new(n||jl)};static \u0275prov=y({token:jl,factory:jl.\u0275fac})};return t=P([R(Lr)],t),t})(),Zm=class{sourceId;targetId;dropPosition;fOutputId;fInputId;fDropPosition;constructor(o,e,n){this.sourceId=o,this.targetId=e,this.dropPosition=n,this.fOutputId=o,this.fInputId=e,this.fDropPosition=n}},Gu=(()=>{class t extends Pt{type="create-connection";kind="create-connection";data(){return{fOutputOrOutletId:this._sourceRef.connector.fId()}}_result=p(fi);_mediator=p(V);_connectionBehaviour=p(qo);_store=p(L);get _connection(){return this._store.connections.getForCreate()}get _snapConnection(){return this._store.connections.getForSnap()}_targets=[];_sourceRef;_pointerDown=new rt;initialize(e,n){this._sourceRef=this._mediator.execute(new $t(e)),this._pointerDown=rt.fromRect(te.initialize(n.x,n.y))}prepareDragSequence(){this._collectAndMarkTargets(),this._initSnapConnection(),this._initCreateConnection(),this._connection.show(),this.onPointerMove(U.initialize()),this._result.setData({toConnectorRect:this._pointerDown,canBeConnectedInputs:this._targets,fOutputId:this._sourceRef.connector.fId()})}_collectAndMarkTargets(){this._targets=this._mediator.execute(new Xr(this._sourceRef.connector,this._sourceRef.rect.gravityCenter)),this._mediator.execute(new Bo(this._targets.map(e=>e.connector)))}_initSnapConnection(){this._snapConnection&&(this._snapConnection.fOutputId.set(this._sourceRef.connector.fId()),this._snapConnection.initialize())}_initCreateConnection(){this._connection.fOutputId.set(this._sourceRef.connector.fId()),this._connection.initialize()}onPointerMove(e){let n=this._pointerDown.addPoint(e),i=this._findClosestTarget(n),r=i?.connector.fConnectableSide||K.TOP;this._drawCreateConnection(n,r);let a=this._snapConnection;if(!a)return;let s=i&&i.distance<a.fSnapThreshold?i:void 0;this._drawSnapConnection(s)}_findClosestTarget(e){return this._mediator.execute(new ji(e,this._targets))}_drawCreateConnection(e,n){let i=this._connectionBehaviour.handle(new Cn(this._sourceRef.rect,e,this._connection,this._sourceRef.connector.fConnectableSide,n,this._resolveRotationContext(this._sourceRef.connector)));this._connection.setLine(i),this._connection.redraw()}_drawSnapConnection(e){let n=this._snapConnection;if(!n)return;if(!e){n.hide();return}let i=this._connectionBehaviour.handle(new Cn(this._sourceRef.rect,e.rect,n,this._sourceRef.connector.fConnectableSide,e.connector.fConnectableSide,this._resolveRotationContext(this._sourceRef.connector),this._resolveRotationContext(e.connector)));n.show(),n.setLine(i),n.redraw()}onPointerUp(){this._connection.redraw(),this._connection.hide(),this._snapConnection?.hide(),this._mediator.execute(new Vo(this._targets.map(e=>e.connector)))}_resolveRotationContext(e){return this._mediator.execute(new Hn(e))}static \u0275fac=(()=>{let e;return function(i){return(e||(e=G(t)))(i||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),bB=(()=>{let t=class Ul{_result=p(fi);_mediator=p(V);_store=p(L);_dragContext=p(he);get _dragHandler(){return this._dragContext.draggableItems[0]}handle(e){this._isValid()&&(this._emitEvent(e.event),this._dragHandler.onPointerUp())}_isValid(){return this._dragContext.draggableItems.some(e=>e instanceof Gu)}_getTargetOutput(e){if(!e)throw new Error(`Output with fOutputId ${this._result.getData().fOutputId} not found. Make sure there is no f-connection to a non-existent fOutput.`);return Uy(e.hostElement)?this._mediator.execute(new Lr(e)):e}_getOutput(){return this._store.outputs.get(this._result.getData().fOutputId)}_getOutlet(){return this._store.outlets.get(this._result.getData().fOutputId)}_emitEvent(e){this._store.fDraggable?.fCreateConnection.emit(new Zm(this._getTargetOutput(this._getOutput()||this._getOutlet()).fId(),this._getInputUnderPointer(e)?.fId(),e.getPosition()))}_getInputUnderPointer(e){return this._mediator.execute(new Yr(e.getPosition(),this._result.getData().canBeConnectedInputs))}static \u0275fac=function(n){return new(n||Ul)};static \u0275prov=y({token:Ul,factory:Ul.\u0275fac})};return t=P([R(qu)],t),t})(),Br=class{eventPosition;source;static fToken=Symbol("CreateConnectionCreateDragHandlerRequest");constructor(o,e){this.eventPosition=o,this.source=e}},vB=(()=>{let t=class $l{_store=p(L);_dragContext=p(he);_dragInjector=p(Ct);get _transform(){return this._store.transform}handle({source:e,eventPosition:n}){this._dragContext.onPointerDownScale=this._transform.scale;let i=this._toFlowSpace(n);this._dragContext.onPointerDownPosition=i;let r=this._toCanvasSpace(i),a=this._dragInjector.get(Gu);a.initialize(e,r),this._dragContext.draggableItems=[a]}_toFlowSpace(e){return ce.fromPoint(e).elementTransform(this._store.flowHost).div(this._transform.scale)}_toCanvasSpace(e){return ce.fromPoint(e).mult(this._transform.scale).sub(this._transform.position).sub(this._transform.scaledPosition).div(this._transform.scale)}static \u0275fac=function(n){return new(n||$l)};static \u0275prov=y({token:$l,factory:$l.\u0275fac})};return t=P([R(Br)],t),t})(),ju=class{event;node;static fToken=Symbol("CreateConnectionFromOutletPreparationRequest");constructor(o,e){this.event=o,this.node=e}},yB=(()=>{let t=class Wl{_mediator=p(V);_store=p(L);handle({event:e,node:n}){let i=this._findOutlet(n);if(!i||(i.setOutputs(this._getOutputs(n)),!i.canBeConnected))return;let r=i.isConnectionFromOutlet?i:this._resolveOutput(i);!r||!r.canBeConnected||this._startDrag(e.getPosition(),r)}_findOutlet(e){return this._store.outlets.getAll().find(n=>e.isContains(n.hostElement))}_getOutputs(e){return this._store.outputs.getAll().filter(n=>e.isContains(n.hostElement))}_resolveOutput(e){return this._mediator.execute(new Lr(e))}_startDrag(e,n){this._mediator.execute(new Br(e,n))}static \u0275fac=function(n){return new(n||Wl)};static \u0275prov=y({token:Wl,factory:Wl.\u0275fac})};return t=P([R(ju)],t),t})(),Uu=class{event;node;static fToken=Symbol("CreateConnectionFromOutputPreparationRequest");constructor(o,e){this.event=o,this.node=e}},CB=(()=>{let t=class Kl{_mediator=p(V);_store=p(L);handle({event:e,node:n}){if(!$y(e.targetElement)||this._hasOutlet(n))return;let i=this._findOutput(e.targetElement);!i||!i.canBeConnected||this._startDrag(e.getPosition(),i)}_hasOutlet(e){return this._store.outlets.getAll().some(n=>e.isContains(n.hostElement))}_findOutput(e){return this._store.outputs.getAll().find(n=>n.hostElement.contains(e))}_startDrag(e,n){this._mediator.execute(new Br(e,n))}static \u0275fac=function(n){return new(n||Kl)};static \u0275prov=y({token:Kl,factory:Kl.\u0275fac})};return t=P([R(Uu)],t),t})(),$u=class{event;fTrigger;static fToken=Symbol("CreateConnectionPreparationRequest");constructor(o,e){this.event=o,this.fTrigger=e}},xB=(()=>{let t=class Yl{_mediator=p(V);_store=p(L);_dragContext=p(he);handle({event:e,fTrigger:n}){if(!this._isValidConditions()||!this._isValidTrigger(e,n))return;let i=Uy(e.targetElement),r=!i&&$y(e.targetElement);if(!i&&!r)return;let a=this._findOwnerNode(e.targetElement);a&&(i?this._mediator.execute(new ju(e,a)):this._mediator.execute(new Uu(e,a)))}_findOwnerNode(e){return this._store.nodes.getAll().find(n=>n.isContains(e))}_isValidConditions(){return this._dragContext.isEmpty()&&!!this._store.connections.getForCreate()}_isValidTrigger(e,n){return ln(e.originalEvent,n)}static \u0275fac=function(n){return new(n||Yl)};static \u0275prov=y({token:Yl,factory:Yl.\u0275fac})};return t=P([R($u)],t),t})(),Wu=class{event;static fToken=Symbol("ReassignConnectionFinalizeRequest");constructor(o){this.event=o}},Qm=class{connectionId;endpoint;previousSourceId;nextSourceId;previousTargetId;nextTargetId;dropPosition;isSourceReassign;isTargetReassign;oldSourceId;newSourceId;oldTargetId;newTargetId;dropPoint;constructor(o,e,n,i,r,a,s){this.connectionId=o,this.endpoint=e,this.previousSourceId=n,this.nextSourceId=i,this.previousTargetId=r,this.nextTargetId=a,this.dropPosition=s,this.isSourceReassign=e==="source",this.isTargetReassign=e==="target",this.oldSourceId=n,this.newSourceId=i,this.oldTargetId=r,this.newTargetId=a,this.dropPoint=s}},wB=(()=>{let t=class Xl{_dragResult=p(fi);_mediator=p(V);_store=p(L);_dragContext=p(he);get _dragDirective(){return this._store.fDraggable}handle({event:e}){let n=this._findReassignHandler();n&&(this._emitIfChanged(e),n.onPointerUp())}_findReassignHandler(){return this._dragContext.draggableItems.find(n=>n.getEvent().fEventType==="reassign-connection")}_emitIfChanged(e){let n=this._dragResult.getData(),i=this._findConnectableConnector(e,n.candidates);i&&!this._isReassignedToDifferentConnector(n,i)||this._dragDirective.fReassignConnection.emit(this._buildEvent(n,e,i))}_findConnectableConnector(e,n){return this._mediator.execute(new Yr(e.getPosition(),n))}_isReassignedToDifferentConnector(e,n){let i=e.connection;return e.draggedEnd==="target"?i.fInputId()!==n.fId():i.fOutputId()!==n.fId()}_buildEvent(e,n,i){let r=e.connection;return new Qm(r.fId(),e.draggedEnd,r.fOutputId(),e.draggedEnd==="source"?i?.fId():void 0,r.fInputId(),e.draggedEnd==="target"?i?.fId():void 0,n.getPosition())}static \u0275fac=function(n){return new(n||Xl)};static \u0275prov=y({token:Xl,factory:Xl.\u0275fac})};return t=P([R(Wu)],t),t})(),Ku=class{event;fTrigger;static fToken=Symbol("ReassignConnectionPreparationRequest");constructor(o,e){this.event=o,this.fTrigger=e}};function TB(t,o){return Ky(t,o)||SB(t,o)}function Ky(t,o){return t.fDragHandleEnd()?.point&&Yy(o,t.fDragHandleEnd().point)&&!t.fDraggingDisabled()}function SB(t,o){return!!t.fDragHandleStart()?.point&&Yy(o,t.fDragHandleStart().point)&&!t.fDraggingDisabled()&&t.fReassignableStart()}function Yy(t,o){return(t.x-o.x)**2+(t.y-o.y)**2<=8**2}function Xy(t,o){return t&&t.distance<o.fSnapThreshold?t:void 0}function Yu(t){return rt.fromRect(te.initialize(t.x,t.y))}var Jm=class{_mediator;_behaviour;_connection;_sourceRef;_targetRef;_candidates=[];_snap;_anchorRect;get _source(){return this._sourceRef.connector}get _target(){return this._targetRef.connector}constructor(o,e,n,i,r){this._mediator=o,this._behaviour=e,this._connection=n,this._sourceRef=i,this._targetRef=r,this._anchorRect=Yu(this._connection.line.point1)}candidates(){return this._candidates}collectAndMarkCandidates(){this._candidates=this._mediator.execute(new Qp(this._target,this._targetRef.rect.gravityCenter)),this._candidates.some(o=>o.connector.fId()===this._source.fId())||this._candidates.push(this._sourceRef),this._mediator.execute(new Bo(this._candidates.map(o=>o.connector)))}setSnapConnection(o){this._snap=o,o&&(o.fInputId.set(this._connection.fInputId()),o.initialize())}onPointerMove(o){let e=this._anchorRect.addPoint(o),n=this._findClosest(e.gravityCenter),i=n?.connector.fConnectableSide??this._source.fConnectableSide;this._draw(e,i);let r=this._snap;r&&this._drawSnap(Xy(n,r))}_findClosest(o){return this._mediator.execute(new ji(o,this._candidates))}_draw(o,e){let n=this._behaviour.handle(new Cn(o,this._targetRef.rect,this._connection,e,this._targetRef.connector.fConnectableSide,void 0,this._resolveRotationContext(this._targetRef.connector)));this._connection.setLine(n),this._connection.redraw()}_drawSnap(o){let e=this._snap;if(!e)return;if(!o){e.hide();return}let n=this._behaviour.handle(new Cn(o.rect,this._targetRef.rect,e,o.connector.fConnectableSide,this._target.fConnectableSide,this._resolveRotationContext(o.connector),this._resolveRotationContext(this._targetRef.connector)));e.show(),e.setLine(n),e.redraw()}onPointerUp(){this._draw(this._anchorRect,this._sourceRef.connector.fConnectableSide),this._snap?.hide(),this._mediator.execute(new Vo(this._candidates.map(o=>o.connector)))}_resolveRotationContext(o){return this._mediator.execute(new Hn(o))}},e_=class{_mediator;_behaviour;_connection;_sourceRef;_targetRef;_candidates=[];_snap;_anchorRect;get _source(){return this._sourceRef.connector}get _target(){return this._targetRef.connector}constructor(o,e,n,i,r){this._mediator=o,this._behaviour=e,this._connection=n,this._sourceRef=i,this._targetRef=r,this._anchorRect=Yu(this._connection.line.point2)}candidates(){return this._candidates}collectAndMarkCandidates(){this._candidates=this._mediator.execute(new Xr(this._source,this._sourceRef.rect.gravityCenter));let o=this._connection.fInputId();o&&!this._candidates.some(e=>e.connector.fId()===o)&&this._candidates.push(this._targetRef),this._mediator.execute(new Bo(this._candidates.map(e=>e.connector)))}setSnapConnection(o){this._snap=o,o&&(o.fOutputId.set(this._connection.fOutputId()),o.initialize())}onPointerMove(o){let e=this._anchorRect.addPoint(o),n=this._findClosest(e.gravityCenter),i=n?.connector.fConnectableSide??this._target.fConnectableSide;this._draw(e,i);let r=this._snap;r&&this._drawSnap(Xy(n,r))}onPointerUp(){this._draw(this._anchorRect,this._targetRef.connector.fConnectableSide),this._snap?.hide(),this._mediator.execute(new Vo(this._candidates.map(o=>o.connector)))}_findClosest(o){return this._mediator.execute(new ji(o,this._candidates))}_draw(o,e){let n=this._behaviour.handle(new Cn(this._sourceRef.rect,o,this._connection,this._source.fConnectableSide,e,this._resolveRotationContext(this._sourceRef.connector),void 0));this._connection.setLine(n),this._connection.redraw()}_drawSnap(o){let e=this._snap;if(!e)return;if(!o){e.hide();return}let n=this._behaviour.handle(new Cn(this._sourceRef.rect,o.rect,e,this._source.fConnectableSide,o.connector.fConnectableSide,this._resolveRotationContext(this._sourceRef.connector),this._resolveRotationContext(o.connector)));e.show(),e.setLine(n),e.redraw()}_resolveRotationContext(o){return this._mediator.execute(new Hn(o))}},t_=(()=>{class t extends Pt{type="reassign-connection";kind="reassign-connection";data(){return{fConnectionId:this._connection.fId()}}_result=p(fi);_mediator=p(V);_connectionBehaviour=p(qo);_store=p(L);get _snapConnection(){return this._store.connections.getForSnap()}_connection;_draggedEnd;_sourceRef;_targetRef;_reassignHandler;initialize(e,n){this._connection=e,this._draggedEnd=n?"target":"source",this._sourceRef=this._mediator.execute(new $t(this._store.outputs.require(this._connection.fOutputId()))),this._targetRef=this._mediator.execute(new $t(this._store.inputs.require(this._connection.fInputId()))),this._reassignHandler=this._draggedEnd==="target"?this._createTargetHandler():this._createSourceHandler()}_createSourceHandler(){return new Jm(this._mediator,this._connectionBehaviour,this._connection,this._sourceRef,this._targetRef)}_createTargetHandler(){return new e_(this._mediator,this._connectionBehaviour,this._connection,this._sourceRef,this._targetRef)}prepareDragSequence(){this._reassignHandler.collectAndMarkCandidates(),this._reassignHandler.setSnapConnection(this._snapConnection),this._result.setData({draggedEnd:this._draggedEnd,sourceAnchorRect:Yu(this._connection.line.point1),targetAnchorRect:Yu(this._connection.line.point2),candidates:this._reassignHandler.candidates(),connection:this._connection})}onPointerMove(e){this._reassignHandler.onPointerMove(e)}onPointerUp(){this._reassignHandler.onPointerUp()}static \u0275fac=(()=>{let e;return function(i){return(e||(e=G(t)))(i||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),kB=(()=>{let t=class Zl{_mediator=p(V);_store=p(L);_dragContext=p(he);_dragInjector=p(Ct);get _canvas(){return this._store.fCanvas}get _transform(){return this._store.transform}get _connections(){return this._store.connections.getAll()}handle(e){if(!this._dragContext.isEmpty()||!this._isValidTrigger(e))return;let n=Go(e.event.getPosition(),this._store.flowHost,this._transform),i=this._findConnectionAt(n);i&&(this._capturePointerDown(e),this._startDrag(i,n),queueMicrotask(()=>this._bringToFront(i)))}_findConnectionAt(e){return this._connections.find(n=>TB(n,e))}_capturePointerDown(e){this._dragContext.onPointerDownScale=this._transform.scale,this._dragContext.onPointerDownPosition=ce.fromPoint(e.event.getPosition()).elementTransform(this._store.flowHost).div(this._transform.scale)}_startDrag(e,n){let i=this._dragInjector.get(t_);i.initialize(e,Ky(e,n)),this._dragContext.draggableItems=[i]}_isValidTrigger(e){return ln(e.event.originalEvent,e.fTrigger)}_bringToFront(e){this._mediator.execute(new $i(e,this._canvas.fConnectionsContainer().nativeElement))}static \u0275fac=function(n){return new(n||Zl)};static \u0275prov=y({token:Zl,factory:Zl.\u0275fac})};return t=P([R(Ku)],t),t})(),Xu=class{event;static fToken=Symbol("DragConnectionWaypointFinalizeRequest");constructor(o){this.event=o}},Zu=class{connectionId;waypoints;constructor(o,e){this.connectionId=o,this.waypoints=e}},Qu=(()=>{class t extends Pt{type="move-connection-waypoint";kind="drag-connection-waypoint";_store=p(L);_point;_pick;get _waypointsComponent(){return this._pick?.connection.fWaypoints()}get _connection(){return this._pick?.connection}setPick(e){this._pick=e}prepareDragSequence(){this._pick?.candidate?(this._point=be({},this._pick.candidate),this._waypointsComponent.insert(this._pick.candidate)):this._pick?.waypoint&&(this._point=be({},this._pick.waypoint),this._waypointsComponent.select(this._pick.waypoint)),this._redrawConnection()}onPointerMove(e){this._waypointsComponent.move(U.sum(this._point,e)),this._redrawConnection()}onPointerUp(){this._waypointsComponent.update(),this._store.fDraggable?.fConnectionWaypointsChanged.emit(this._eventFromPick())}_redrawConnection(){this._connection.setLine(this._connection.line),this._connection.redraw()}_eventFromPick(){return new Zu(this._connection.fId(),this._connection.fWaypoints()?.waypoints()||[])}static \u0275fac=(()=>{let e;return function(i){return(e||(e=G(t)))(i||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),IB=(()=>{let t=class Ql{_dragContext=p(he);get _fDragHandler(){return this._dragContext.draggableItems[0]}handle(e){this._isDroppedConnectionReassignEvent()&&this._fDragHandler.onPointerUp()}_isDroppedConnectionReassignEvent(){return this._dragContext.draggableItems.some(e=>e instanceof Qu)}static \u0275fac=function(n){return new(n||Ql)};static \u0275prov=y({token:Ql,factory:Ql.\u0275fac})};return t=P([R(Xu)],t),t})(),Ju=class{event;fTrigger;static fToken=Symbol("DragConnectionWaypointPreparationRequest");constructor(o,e){this.event=o,this.fTrigger=e}},EB=(()=>{let t=class Jl{_mediator=p(V);_store=p(L);_dragContext=p(he);_dragInjector=p(Ct);get _canvas(){return this._store.fCanvas}get _transform(){return this._canvas.transform}get _flowHost(){return this._store.flowHost}get _connections(){return this._store.connections.getAll()}handle(e){let n=Go(e.event.getPosition(),this._flowHost,this._transform),i=this._pickControlPoint(n);if(!i||!this._isValidTrigger(e))return;let r=this._dragInjector.get(Qu);r.setPick(i),this._dragContext.onPointerDownScale=this._transform.scale,this._dragContext.onPointerDownPosition=ce.fromPoint(e.event.getPosition()).elementTransform(this._flowHost).div(this._transform.scale),this._dragContext.draggableItems=[r],queueMicrotask(()=>this._updateConnectionLayer(i.connection))}_pickControlPoint(e){if(this._dragContext.isEmpty())return t6(this._connections,e)}_isValidTrigger(e){return ln(e.event.originalEvent,e.fTrigger)}_updateConnectionLayer(e){this._mediator.execute(new $i(e,this._canvas.fConnectionsContainer().nativeElement))}static \u0275fac=function(n){return new(n||Jl)};static \u0275prov=y({token:Jl,factory:Jl.\u0275fac})};return t=P([R(Ju)],t),t})(),MB=[bB,vB,yB,gB,CB,xB,wB,kB,EB,IB],ep=class{event;static fToken=Symbol("DropToGroupFinalizeRequest");constructor(o){this.event=o}},DB=1,Vr=(()=>{class t extends Pt{type="move-node-to-parent";kind="assign-to-container";_store=p(L);_dragSession=p(he);get _transform(){return this._store.transform}_candidateGroups=[];_debounceTimer=null;_activeTarget=null;get activeTarget(){return this._activeTarget}initialize(e){this._candidateGroups=e}prepareDragSequence(){for(let{node:e}of this._candidateGroups)e.hostElement.classList.add(ht.GROUPING.DROP_ACTIVE)}onPointerMove(e){this._debounceTimer&&clearTimeout(this._debounceTimer),this._debounceTimer=setTimeout(()=>this._updateActiveTarget(e),DB)}onPointerUp(){this._clearActiveTarget();for(let{node:e}of this._candidateGroups)e.hostElement.classList.remove(ht.GROUPING.DROP_ACTIVE);this._debounceTimer&&(clearTimeout(this._debounceTimer),this._debounceTimer=null)}_updateActiveTarget(e){let n=this._getPointerInFlow(e),i=this._findTargetUnderPointer(n);i?this._setActiveTarget(i):this._clearActiveTarget()}_getPointerInFlow(e){let n=ce.fromPoint(this._dragSession.onPointerDownPosition).add(e),i=ce.fromPoint(this._transform.position).add(this._transform.scaledPosition).div(this._transform.scale);return n.sub(i)}_findTargetUnderPointer(e){return this._candidateGroups.find(n=>te.isIncludePoint(n.rect,e))}_setActiveTarget(e){this._activeTarget?.node!==e.node&&(this._clearActiveTarget(),this._activeTarget=e,e.node.setClass(ht.GROUPING.OVER_BOUNDARY))}_clearActiveTarget(){this._activeTarget?.node.removeClass(ht.GROUPING.OVER_BOUNDARY),this._activeTarget=null}static \u0275fac=(()=>{let e;return function(i){return(e||(e=G(t)))(i||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),tp=class{nodesAndGroups;static fToken=Symbol("CreateDragNodeHierarchyRequest");constructor(o){this.nodesAndGroups=o}},n_=class{rootHandlers;participants;constructor(o,e){this.rootHandlers=o,this.participants=e}},i_=class{fNodeIds;constructor(o){this.fNodeIds=o}},M_="move-node",D_="drag-node";function PB(t){return t.getEvent().kind===D_||t.getEvent().fEventType===M_}var hi=(()=>{class t extends Pt{type=M_;kind=D_;data(){return new i_(this.items.map(e=>e.nodeOrGroup.fId()))}_magneticLines=null;_magneticRects=null;items;roots;initialize(e,n){this.items=e,this.roots=n}setMagneticLines(e){this._magneticLines=e}setMagneticRects(e){this._magneticRects=e}calculateMagneticLinesGuides(e){return this.calculateMagneticSnaps(e).lines}calculateMagneticSnaps(e){this._previewRoots(e);let n=this._rootsUnionRect();return{lines:this._magneticLines?._computeGuides(n),rects:this._magneticRects?._computeRects(n)}}prepareDragSequence(){for(let e of this.roots)e.prepareDragSequence()}onPointerMove(e){this._previewRoots(e);let n=this._rootsUnionRect();this._magneticLines?.scheduleRender(n),this._magneticRects?.scheduleRender(n)}onPointerUp(){for(let e of this.roots)e.onPointerUp();this._magneticLines?.clearGuides(),this._magneticRects?.clearGuides(),requestAnimationFrame(()=>this._refreshDraggedNodes())}_previewRoots(e){for(let n of this.roots)n.onPointerMove(e)}_rootsUnionRect(){let e=null;for(let n of this.roots){let i=n.getLastRect();e=e?te.union([e,i]):i}return e??te.initialize()}_refreshDraggedNodes(){for(let{nodeOrGroup:e}of this.roots)e.refresh()}destroy(){for(let e of this.roots??[])e.destroy?.()}static \u0275fac=(()=>{let e;return function(i){return(e||(e=G(t)))(i||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),np=class{_limits;_quantizeStep;constructor(o,e=.5){this._limits=o,this._quantizeStep=e}applyInto(o,e){let{min:n,max:i}=this._limits,r=this._clamp(o.x,n.x,i.x),a=this._clamp(o.y,n.y,i.y),s=o.x-r,c=o.y-a,u=this._quantizeSigned(s,this._quantizeStep),f=this._quantizeSigned(c,this._quantizeStep);e.value.x=r,e.value.y=a,e.edges.left=u<0,e.edges.right=u>0,e.edges.top=f<0,e.edges.bottom=f>0,e.overflow.x=Math.abs(u),e.overflow.y=Math.abs(f)}_quantizeSigned(o,e){if(e<=0||o===0)return 0;let n=o/e;return(o>0?Math.ceil(n):Math.floor(n))*e}_clamp(o,e,n){return Math.min(Math.max(o,e),n)}},o_=class{_pointerDown;_vCellSize;_hCellSize;_snapWhileDragging;constructor(o,e){this._pointerDown=e,this._vCellSize=o.vCellSize(),this._hCellSize=o.hCellSize(),this._snapWhileDragging=o.fCellSizeWhileDragging()}snap(o,e){let n=e||this._snapWhileDragging;return this._strategies[+n](o)}_strategies={0:this._noSnap.bind(this),1:this._snapWithCellSize.bind(this)};_snapWithCellSize(o){return{x:this._snapToGrid(this._pointerDown.x+o.x,this._hCellSize)-this._pointerDown.x,y:this._snapToGrid(this._pointerDown.y+o.y,this._vCellSize)-this._pointerDown.y}}_noSnap(o){return o}_snapToGrid(o,e){return Math.round(o/e)*e}};function ly(){return{value:{x:0,y:0},overflow:{x:0,y:0},edges:{left:!1,right:!1,top:!1,bottom:!1}}}var r_=class{_snapper;_hardClamp;_hardResult=ly();_softClamps=[];_softResults=[];constructor(o,e,n){let i=o.get(L).fDraggable;this._snapper=new o_(i,e),this._hardClamp=new np(n.hard,.5);for(let r of n.soft)this._softClamps.push(new np(r.limits,.5)),this._softResults.push(ly())}apply(o,e=!1){let n=this._snapper.snap(o,e);this._hardClamp.applyInto(n,this._hardResult);let i={x:this._hardResult.value.x,y:this._hardResult.value.y};for(let r=0;r<this._softClamps.length;r++)this._softClamps[r].applyInto(i,this._softResults[r]);return{hardDelta:i,soft:this._softResults}}finalize(o){return this.apply(o,!0)}};function cy(t,o,e){let{x:n,y:i,width:r,height:a}=t;return e.right&&o.x>0&&(r+=o.x),e.left&&o.x>0&&(n-=o.x,r+=o.x),e.bottom&&o.y>0&&(a+=o.y),e.top&&o.y>0&&(i-=o.y,a+=o.y),te.initialize(n,i,r,a)}var a_=class extends Pt{_injector;nodeOrGroup;children;sourceConnectionHandlers;targetConnectionHandlers;type=M_;kind=D_;_startPosition=U.initialize();_startRect=te.initialize();_applyConstraints=o=>o;_lastSoftResults=[];_deltaConstraints;_constraints;_lastPosition=U.initialize();_softParentConnectionHandlers=[];_mediator;constructor(o,e,n=[],i=[],r=[]){super(),this._injector=o,this.nodeOrGroup=e,this.children=n,this.sourceConnectionHandlers=i,this.targetConnectionHandlers=r,this._mediator=o.get(V),this._startRect=this._mediator.execute(new it(e.hostElement)),this._startPosition=be({},e._position)}setConstraints(o){this._constraints=o,this._deltaConstraints=new r_(this._injector,this._startPosition,o),this._applyConstraints=e=>{let n=this._deltaConstraints.apply(e);return this._applySoftExpansions(n.soft),n.hardDelta}}setSoftParentConnectionHandlers(o){this._softParentConnectionHandlers=o}finalizeConstraints(){this._applyConstraints=o=>{let e=this._deltaConstraints.finalize(o);return this._applySoftExpansions(e.soft),e.hardDelta}}getLastRect(){return te.initialize(this._lastPosition.x,this._lastPosition.y,this._startRect.width,this._startRect.height)}prepareDragSequence(){for(let o of this.children)o.prepareDragSequence();this.nodeOrGroup.hostElement.classList.add(ht.DRAG_AND_DROP.DRAGGING)}onPointerMove(o){let e=this._applyConstraints(o);for(let n of this.children)n.onPointerMove(e);this._redraw(this._startPlus(e));for(let n of this.sourceConnectionHandlers)n.setSourceDelta(e);for(let n of this.targetConnectionHandlers)n.setTargetDelta(e)}onPointerUp(){for(let o of this.children)o.onPointerUp();this.nodeOrGroup.position.set(this.nodeOrGroup._position),this.nodeOrGroup.hostElement.classList.remove(ht.DRAG_AND_DROP.DRAGGING),this._emitExpandedEvent()}_startPlus(o){return U.sum(this._startPosition,o)}_redraw(o){this._lastPosition=o,this.nodeOrGroup.updatePosition(o),this._mediator.execute(new Hi(this.nodeOrGroup.fId(),te.initialize(o.x,o.y,this._startRect.width,this._startRect.height))),this.nodeOrGroup.redraw()}_applySoftExpansions(o){this._lastSoftResults=o;for(let e=0;e<o.length;e++){let n=o[e],i=this._constraints.soft[e],r=cy(i.boundingRect,n.overflow,n.edges);this._commitParentRect(i.nodeOrGroup,r)&&this._updateParentConnectionHandlers(e)}}_commitParentRect(o,e){let n=o._position.x!==e.x||o._position.y!==e.y||o._size?.width!==e.width||o._size?.height!==e.height;return o.updateSize({width:e.width,height:e.height}),o.updatePosition({x:e.x,y:e.y}),this._mediator.execute(new Hi(o.fId(),e)),o.redraw(),n}_updateParentConnectionHandlers(o){let e=this._softParentConnectionHandlers[o];if(!e)return;let n=new Map;for(let i of e.source){let r=this._readConnectorRect(i.connector,n);i.handler.setSourceDelta(this._buildDelta(i.baselineRect,r))}for(let i of e.target){let r=this._readConnectorRect(i.connector,n);i.handler.setTargetDelta(this._buildDelta(i.baselineRect,r))}}_readConnectorRect(o,e){let n=`${o.kind}::${o.fId()}`,i=e.get(n);if(i)return i;let r=this._mediator.execute(new $t(o)).rect;return e.set(n,r),r}_buildDelta(o,e){return U.initialize(e.x-o.x,e.y-o.y)}_emitExpandedEvent(){for(let o=0;o<this._lastSoftResults.length;o++){let e=this._lastSoftResults[o];if(!e.overflow.x&&!e.overflow.y)continue;let n=this._constraints.soft[o],i=cy(n.boundingRect,e.overflow,e.edges);n.nodeOrGroup.sizeChange.emit(i)}}destroy(){for(let o of this.children)o.destroy?.();this.children=[],this.sourceConnectionHandlers=[],this.targetConnectionHandlers=[],this._lastSoftResults=[],this._applyConstraints=o=>o,this._softParentConnectionHandlers=[]}},RB=(()=>{let t=class ec{_injector=p(dt);handle({nodesAndGroups:e}){let n=this._createHandlerByNodeId(e),i=this._linkParentsAndCollectRoots(e,n);return new n_(i,Array.from(n.values()))}_createHandlerByNodeId(e){let n=new Map;for(let i of e)n.set(i.fId(),new a_(this._injector,i));return n}_linkParentsAndCollectRoots(e,n){let i=[];for(let r of e){let a=n.get(r.fId());if(!a)continue;let s=r.fParentId(),c=s?n.get(s):void 0;c?c.children.push(a):i.push(a)}return i}static \u0275fac=function(n){return new(n||ec)};static \u0275prov=y({token:ec,factory:ec.\u0275fac})};return t=P([R(tp)],t),t})(),ip=class{nodeOrGroup;static fToken=Symbol("BuildDragNodeConstraintsRequest");constructor(o){this.nodeOrGroup=o}},zr=class{nodeOrGroup;childrenPaddings;static fToken=Symbol("ReadNodeBoundsWithPaddingsRequest");constructor(o,e){this.nodeOrGroup=o,this.childrenPaddings=e}},s_=class{nodeOrGroup;boundingRect;innerRect;paddings;constructor(o,e,n,i){this.nodeOrGroup=o,this.boundingRect=e,this.innerRect=n,this.paddings=i}},OB=(()=>{let t=class tc{_mediator=p(V);handle({nodeOrGroup:e,childrenPaddings:n}){let i=this._readBoundingRect(e),r=this._readOwnPaddings(e,i),a=[r[0]+n[0],r[1]+n[1],r[2]+n[2],r[3]+n[3]],s=te.initialize(i.x+a[0],i.y+a[1],i.width-a[0]-a[2],i.height-a[1]-a[3]);return new s_(e,i,s,a)}_readBoundingRect(e){return this._mediator.execute(new it(e.hostElement))}_readOwnPaddings(e,n){return this._mediator.execute(new Ui(e,n))}static \u0275fac=function(n){return new(n||tc)};static \u0275prov=y({token:tc,factory:tc.\u0275fac})};return t=P([R(zr)],t),t})(),FB=(()=>{let t=class nc{_mediator=p(V);handle({nodeOrGroup:e}){let n=this._readCurrentRect(e),i=this._readParentsChain(e);return this._buildConstraints(i,n)}_readCurrentRect(e){return this._mediator.execute(new it(e.hostElement))}_readParentsChain(e){return this._mediator.execute(new Lo(e))??[]}_buildConstraints(e,n){let i=[],r=zy(),a=[0,0,0,0];for(let s of e){let c=this._readParentBounds(s,a);a=c.paddings;let u=this._calculateDifference(c.innerRect,n);if(this._isAutoExpand(s))i.push(this._makeSoftLimit(s,c.boundingRect,u));else{r=u;break}}return{soft:i,hard:r}}_readParentBounds(e,n){return this._mediator.execute(new zr(e,n))}_calculateDifference(e,n){return{min:this._calculateMinimumDifference(e,n),max:this._calculateMaximumDifference(e,n)}}_calculateMinimumDifference(e,n){return U.initialize(e.x-n.x,e.y-n.y)}_calculateMaximumDifference(e,n){return U.initialize(e.x+e.width-(n.x+n.width),e.y+e.height-(n.y+n.height))}_isAutoExpand(e){return e.fAutoExpandOnChildHit()}_makeSoftLimit(e,n,i){return{nodeOrGroup:e,boundingRect:n,initialSize:e._size,limits:i}}static \u0275fac=function(n){return new(n||nc)};static \u0275prov=y({token:nc,factory:nc.\u0275fac})};return t=P([R(ip)],t),t})(),op=class{rootHandlers;participants;static fToken=Symbol("CreateDragNodeHandlerRequest");constructor(o,e){this.rootHandlers=o,this.participants=e}},rp=class{dragHandler;constraints;handlerPool;static fToken=Symbol("AttachSoftParentConnectionDragHandlersToNodeRequest");constructor(o,e,n){this.dragHandler=o,this.constraints=e,this.handlerPool=n}},Hr=class{_mediator=p(V);_store=p(L);_behaviour=p(qo);_source;_target;_sourceRef;_targetRef;_sourceDelta=U.initialize();_targetDelta=U.initialize();connection;initialize(o){this.connection=o,this._source=this._store.outputs.require(this.connection.fOutputId()),this._target=this._store.inputs.require(this.connection.fInputId()),this._sourceRef=this._readRectRef(this._source),this._targetRef=this._readRectRef(this._target)}setSourceDelta(o){this._sourceDelta=o,this._mediator.execute(new zi(this._source.fId(),this._source.kind,this._withDelta(this._sourceRef.rect,o)))}setTargetDelta(o){this._targetDelta=o,this._mediator.execute(new zi(this._target.fId(),this._target.kind,this._withDelta(this._targetRef.rect,o)))}redraw(){let o=this._buildLine();this.connection.setLine(o),this.connection.redraw()}_buildLine(){let o=rt.fromRoundedRect(this._sourceRef.rect).addPoint(this._sourceDelta),e=rt.fromRoundedRect(this._targetRef.rect).addPoint(this._targetDelta);return this._behaviour.handle(new Cn(o,e,this.connection,this._sourceRef.connector.fConnectableSide,this._targetRef.connector.fConnectableSide,this._resolveRotationContext(this._sourceRef.connector),this._resolveRotationContext(this._targetRef.connector)))}_readRectRef(o){return this._mediator.execute(new $t(o))}_withDelta(o,e){return rt.fromRoundedRect(o).addPoint(e)}_resolveRotationContext(o){return this._mediator.execute(new Hn(o))}},qr=(()=>{class t extends Hr{setSourceDelta(e){super.setSourceDelta(e),super.redraw()}static \u0275fac=(()=>{let e;return function(i){return(e||(e=G(t)))(i||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),Gr=(()=>{class t extends Hr{_sourceUpdated=!1;_targetUpdated=!1;setSourceDelta(e){super.setSourceDelta(e),this._sourceUpdated=!0,this._redrawIfReady()}setTargetDelta(e){super.setTargetDelta(e),this._targetUpdated=!0,this._redrawIfReady()}_redrawIfReady(){!this._sourceUpdated||!this._targetUpdated||(this._sourceUpdated=!1,this._targetUpdated=!1,this.redraw())}static \u0275fac=(()=>{let e;return function(i){return(e||(e=G(t)))(i||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),jr=(()=>{class t extends Hr{setTargetDelta(e){super.setTargetDelta(e),this.redraw()}static \u0275fac=(()=>{let e;return function(i){return(e||(e=G(t)))(i||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),NB=(()=>{let t=class ic{_store=p(L);_mediator=p(V);_dragInjector=p(Ct);handle({dragHandler:e,constraints:n,handlerPool:i}){let r=n.soft.map(a=>this._buildParentConnectionHandlers(a.nodeOrGroup,i));e.setSoftParentConnectionHandlers(r)}_buildParentConnectionHandlers(e,n){let i=this._store.outputs.getAll().filter(f=>f.fNodeId===e.fId()),r=this._store.inputs.getAll().filter(f=>f.fNodeId===e.fId());if(!i.length&&!r.length)return{source:[],target:[]};let a=new Set(i.map(f=>f.fId())),s=new Set(r.map(f=>f.fId())),c=new Map,u={source:[],target:[]};for(let f of this._store.connections.getAll()){let g=a.has(f.fOutputId()),C=s.has(f.fInputId());if(!g&&!C)continue;let k=this._getExistingConnectionHandler(n,f);if(k||(k=this._createConnectionHandler(f,g,C),n.push(k)),g){let S=this._store.outputs.require(f.fOutputId());u.source.push({handler:k,connector:S,baselineRect:this._readConnectorRect(S,c)})}if(C){let S=this._store.inputs.require(f.fInputId());u.target.push({handler:k,connector:S,baselineRect:this._readConnectorRect(S,c)})}}return u}_getExistingConnectionHandler(e,n){return e.find(i=>i.connection.fId()===n.fId())}_createConnectionHandler(e,n,i){let r;return n&&i?r=this._dragInjector.createInstance(Gr):n?r=this._dragInjector.createInstance(qr):r=this._dragInjector.createInstance(jr),r.initialize(e),r}_readConnectorRect(e,n){let i=`${e.kind}::${e.fId()}`,r=n.get(i);if(r)return r;let a=this._mediator.execute(new $t(e)).rect;return n.set(i,a),a}static \u0275fac=function(n){return new(n||ic)};static \u0275prov=y({token:ic,factory:ic.\u0275fac})};return t=P([R(rp)],t),t})(),AB=(()=>{let t=class oc{_dragInjector=p(Ct);_mediator=p(V);handle({rootHandlers:e,participants:n}){let i=this._collectConnectionHandlers(n);this._applyConstraintsToRoots(e,i);let r=this._dragInjector.createInstance(hi);return r.initialize(n,e),r}_applyConstraintsToRoots(e,n){for(let i of e){let r=this._calculateConstraints(i.nodeOrGroup);i.setConstraints(r),this._attachSoftParentConnectionHandlers(i,r,n)}}_collectConnectionHandlers(e){let n=new Map;for(let i of e){for(let r of i.sourceConnectionHandlers)n.set(r.connection.fId(),r);for(let r of i.targetConnectionHandlers)n.set(r.connection.fId(),r)}return Array.from(n.values())}_attachSoftParentConnectionHandlers(e,n,i){this._mediator.execute(new rp(e,n,i))}_calculateConstraints(e){return this._mediator.execute(new ip(e))}static \u0275fac=function(n){return new(n||oc)};static \u0275prov=y({token:oc,factory:oc.\u0275fac})};return t=P([R(op)],t),t})(),ap=class{dragHandler;sourceIds;handlerPool;static fToken=Symbol("AttachTargetConnectionDragHandlersToNodeRequest");constructor(o,e,n){this.dragHandler=o,this.sourceIds=e,this.handlerPool=n}},LB=(()=>{let t=class rc{_store=p(L);_dragInjector=p(Ct);get _connections(){return this._store.connections.getAll()}handle(e){this._getInputConnections(e.dragHandler.nodeOrGroup).forEach(n=>{this._createAndSetConnectionToNodeHandler(n,e)})}_getInputConnections(e){let n=new Set(this._getNodeInputIds(e));return this._connections.filter(i=>n.has(i.fInputId()))}_getNodeInputIds(e){return this._store.inputs.getAll().filter(n=>e.isContains(n.hostElement)).map(n=>n.fId())}_createAndSetConnectionToNodeHandler(e,n){let i=this._getExistingConnectionHandler(n.handlerPool,e);i||(i=this._createConnectionHandler(n.sourceIds,e),n.handlerPool.push(i)),n.dragHandler.targetConnectionHandlers.push(i)}_getExistingConnectionHandler(e,n){return e.find(i=>i.connection.fId()===n.fId())}_createConnectionHandler(e,n){let i;return e.includes(n.fOutputId())?i=this._dragInjector.createInstance(Gr):i=this._dragInjector.createInstance(jr),i.initialize(n),i}static \u0275fac=function(n){return new(n||rc)};static \u0275prov=y({token:rc,factory:rc.\u0275fac})};return t=P([R(ap)],t),t})(),sp=class{dragHandler;targetIds;handlerPool;static fToken=Symbol("AttachSourceConnectionDragHandlersToNodeRequest");constructor(o,e,n){this.dragHandler=o,this.targetIds=e,this.handlerPool=n}},BB=(()=>{let t=class ac{_store=p(L);_dragInjector=p(Ct);get _connections(){return this._store.connections.getAll()}handle(e){this._getOutputConnections(e.dragHandler.nodeOrGroup).forEach(n=>{this._createAndSetConnectionToNodeHandler(n,e)})}_getOutputConnections(e){let n=new Set(this._getNodeOutputIds(e));return this._connections.filter(i=>n.has(i.fOutputId()))}_getNodeOutputIds(e){return this._store.outputs.getAll().filter(n=>e.isContains(n.hostElement)).map(n=>n.fId())}_createAndSetConnectionToNodeHandler(e,n){let i=this._getExistingConnectionHandler(n.handlerPool,e);i||(i=this._createConnectionHandler(n.targetIds,e),n.handlerPool.push(i)),n.dragHandler.sourceConnectionHandlers.push(i)}_getExistingConnectionHandler(e,n){return e.find(i=>i.connection.fId()===n.fId())}_createConnectionHandler(e,n){let i;return e.includes(n.fInputId())?i=this._dragInjector.createInstance(Gr):i=this._dragInjector.createInstance(qr),i.initialize(n),i}static \u0275fac=function(n){return new(n||ac)};static \u0275prov=y({token:ac,factory:ac.\u0275fac})};return t=P([R(sp)],t),t})(),lp=class{nodeOrGroup;static fToken=Symbol("AttachDragNodeHandlerFromSelectionRequest");constructor(o){this.nodeOrGroup=o}},VB=(()=>{let t=class sc{_mediator=p(V);_store=p(L);_dragSession=p(he);handle({nodeOrGroup:e}){let n=this._collectSelected(e),i=this._withDeepChildren(n),r=this._mediator.execute(new tp(i)),a=this._collectSourceConnectorIds(i),s=this._collectTargetConnectorIds(i);return this._attachConnectionHandlers(r.participants,a,s),this._mediator.execute(new op(r.rootHandlers,r.participants))}_collectSelected(e){let n=[];for(let i of this._dragSession.selectedItems){let r=this._findNodeByHost(i.hostElement);r&&n.push(r)}return e&&!n.includes(e)&&n.push(e),n}_findNodeByHost(e){return this._store.nodes.getAll().find(n=>n.isContains(e))}_withDeepChildren(e){let n=[];for(let i of e){n.push(i);let r=this._mediator.execute(new Ho(i.fId()));n.push(...r)}return n}_collectSourceConnectorIds(e){return am(e,n=>this._store.outputs.getAll().filter(i=>i.fNodeId===n.fId()).map(i=>i.fId()))}_collectTargetConnectorIds(e){return am(e,n=>this._store.inputs.getAll().filter(i=>i.fNodeId===n.fId()).map(i=>i.fId()))}_attachConnectionHandlers(e,n,i){let r=[];for(let a of e)this._mediator.execute(new sp(a,i,r)),this._mediator.execute(new ap(a,n,r))}static \u0275fac=function(n){return new(n||sc)};static \u0275prov=y({token:sc,factory:sc.\u0275fac})};return t=P([R(lp)],t),t})(),zB=[RB,FB,AB,LB,BB,NB,OB,VB];function HB(t,o,e=10){let n=o.x,i=o.y,r=n+o.width,a=i+o.height,s=o.gravityCenter.x,c=o.gravityCenter.y,u,f,g=1/0,C,k,S=1/0,F=(Y,ee)=>{let ae=ee<0?-ee:ee;ae<=e&&ae<g&&(g=ae,u=Y,f=ee)},q=(Y,ee)=>{let ae=ee<0?-ee:ee;ae<=e&&ae<S&&(S=ae,C=Y,k=ee)};for(let Y=0;Y<t.length;Y++){let ee=t[Y],ae=ee.x,Re=ee.y,De=ae+ee.width,Ge=Re+ee.height,Lt=ee.gravityCenter.x,ct=ee.gravityCenter.y;F(ae,n-ae),F(De,n-De),F(Lt,s-Lt),F(ae,r-ae),F(De,r-De),q(Re,i-Re),q(Ge,i-Ge),q(ct,c-ct),q(Re,a-Re),q(Ge,a-Ge)}return{x:{guide:u,delta:f},y:{guide:C,delta:k}}}var dy=["left","top","width","height"],cp=class{_element;constructor(o,e,n="f-line"){this._element=o.document.createElement("div"),this._element.classList.add(n),this._element.style.position="absolute",this._element.style.display="none",e.appendChild(this._element)}show(){this._element.style.display="block"}hide(){this._element.style.display="none"}render(o){for(let e of dy){let n=o[e];n!=null&&(this._element.style[e]=`${n}px`)}}clearRect(){for(let o of dy)this._element.style.removeProperty(o)}destroy(){this._element.remove()}},l_=class{_horizontal;_vertical;constructor(o,e){this._horizontal=new cp(o,e),this._vertical=new cp(o,e),this._horizontal.hide(),this._vertical.hide()}drawVerticalLine(o,e,n){this._vertical.show(),this._vertical.render({left:o*n.scale+n.position.x+n.scaledPosition.x,top:0,width:1,height:e.height})}drawHorizontalLine(o,e,n){this._horizontal.show(),this._horizontal.render({left:0,top:o*n.scale+n.position.y+n.scaledPosition.y,width:e.width,height:1})}hideVertical(){this._vertical.hide()}hideHorizontal(){this._horizontal.hide()}hideAll(){this._vertical.hide(),this._horizontal.hide()}destroy(){this._vertical.destroy(),this._horizontal.destroy()}},dp=class{static fToken=Symbol("MagneticLinesPreparationRequest")},qB=(()=>{let t=class lc{_mediator=p(V);_store=p(L);_browser=p(at);_injector=p(dt);_dragSession=p(he);_renderer;handle(e){let n=this._store.instances.get(Ye.MAGNETIC_LINES);if(!n)return;let i=this._dragSession.draggableItems.find(r=>r instanceof hi);i&&i.setMagneticLines(new c_(this._injector,this._renderer??this._createRenderer(n),this._flowHostSize(),this._notDraggedRects(this._draggedNodes(i.items))))}_draggedNodes(e){return e.map(n=>n.nodeOrGroup)}_flowHostSize(){return this._store.flowHost.getBoundingClientRect()}_createRenderer({hostElement:e}){return this._renderer=new l_(this._browser,e),this._renderer}_notDraggedRects(e){let n=new Set(e);return this._store.nodes.getAll().filter(r=>!n.has(r)).map(r=>this._mediator.execute(new it(r.hostElement)))}static \u0275fac=function(n){return new(n||lc)};static \u0275prov=y({token:lc,factory:lc.\u0275fac})};return t=P([R(dp)],t),t})(),c_=class{_renderer;_size;_rects;_timerId=null;_canvasTransform;_alignThreshold=10;constructor(o,e,n,i){this._renderer=e,this._size=n,this._rects=i;let r=o.get(L);this._alignThreshold=r.instances.require(Ye.MAGNETIC_LINES).threshold(),this._canvasTransform=r.transform}scheduleRender(o){this._timerId&&clearTimeout(this._timerId),this._timerId=setTimeout(()=>this._renderGuides(this._computeGuides(o)),15)}_renderGuides(o){this._renderVertical(o),this._renderHorizontal(o)}_renderVertical(o){o.x.guide!==void 0?this._renderer.drawVerticalLine(o.x.guide,this._size,this._canvasTransform):this._renderer.hideVertical()}_renderHorizontal(o){o.y.guide!==void 0?this._renderer.drawHorizontalLine(o.y.guide,this._size,this._canvasTransform):this._renderer.hideHorizontal()}_computeGuides(o){return HB(this._rects,o,this._alignThreshold)}clearGuides(){this._renderer.hideAll(),this._timerId&&(clearTimeout(this._timerId),this._timerId=null)}},uy=["top","center","bottom"],py=["left","center","right"];function GB(t,o,e=10,n=10){let i=o.x,r=o.y,a=i+o.width,s=r+o.height,c=o.gravityCenter.x,u=o.gravityCenter.y,f=jB(t,o,i,r,a,s,c,u,e,n),g=UB(t,o,i,r,a,s,c,u,e,n);return f&&(!g||f.absDelta<=g.absDelta)?{axis:"x",delta:f.delta,gap:f.gap,rects:f.rects,alignMode:f.alignMode,crossDelta:f.crossDelta}:g?{axis:"y",delta:g.delta,gap:g.gap,rects:g.rects,alignMode:g.alignMode,crossDelta:g.crossDelta}:{rects:[]}}function jB(t,o,e,n,i,r,a,s,c,u){let f=1/0,g,C=0,k,S=[],F=0,q=[],Y=[],ee=[];for(let ae=0;ae<uy.length;ae++){let Re=ae===0?n:ae===1?s:r;q.length=0,Y.length=0,ee.length=0;let De=1/0,Ge=-1/0,Lt=0,ct=1/0,vt=1/0;for(let qe=0;qe<t.length;qe++){let Fe=t[qe],ar=ae===0?Fe.y:ae===1?Fe.gravityCenter.y:Fe.y+Fe.height,xf=Re-ar,Ln=ko(xf);if(Ln>c)continue;q.push(qe),Y.push(Fe.x),ee.push(Fe.x+Fe.width);let sr=Fe.y,lr=Fe.y+Fe.height;sr<De&&(De=sr),lr>Ge&&(Ge=lr),(Ln<ct||Ln===ct&&qe<vt)&&(ct=Ln,Lt=ar,vt=qe)}let tt=q.length;if(tt<2)continue;Zy(q,Y,ee);let st=0;for(;st<tt&&Y[st]<=a;)st++;let ki=st>0&&st<tt,Et,Bt;ki?(Et=st-1,Bt=st):st<=0?(Et=0,Bt=1):(Et=tt-2,Bt=tt-1);let Vt=Y[Bt]-ee[Et];if(Vt<0)continue;let ft;if(ki){ft=ee[Et]+Vt;let qe=ft+o.width,Fe=Y[Bt]-qe;if(ko(Fe-Vt)>u)continue}else st<=0?ft=Y[0]-Vt-o.width:ft=ee[tt-1]+Vt;let rr=e-ft,Ii=ko(rr);if(Ii>u||Ii>=f)continue;let pn=$B(q,Y,ee,De,Ge);if(ki){let qe=ft,Fe=ft+o.width;pn.push({left:ee[Et],top:De,width:qe-ee[Et],height:Ge-De}),pn.push({left:Fe,top:De,width:Y[Bt]-Fe,height:Ge-De})}else if(st<=0){let qe=ft+o.width;pn.push({left:qe,top:De,width:Y[0]-qe,height:Ge-De})}else pn.push({left:ee[tt-1],top:De,width:ft-ee[tt-1],height:Ge-De});let Cf=Re-Lt;f=Ii,g=rr,C=Vt,k=uy[ae],S=pn,F=Cf}if(!(g===void 0||k===void 0))return{delta:g,absDelta:f,gap:C,rects:S,alignMode:k,crossDelta:F}}function UB(t,o,e,n,i,r,a,s,c,u){let f=1/0,g,C=0,k,S=[],F=0,q=[],Y=[],ee=[];for(let ae=0;ae<py.length;ae++){let Re=ae===0?e:ae===1?a:i;q.length=0,Y.length=0,ee.length=0;let De=1/0,Ge=-1/0,Lt=0,ct=1/0,vt=1/0;for(let qe=0;qe<t.length;qe++){let Fe=t[qe],ar=ae===0?Fe.x:ae===1?Fe.gravityCenter.x:Fe.x+Fe.width,xf=Re-ar,Ln=ko(xf);if(Ln>c)continue;q.push(qe),Y.push(Fe.y),ee.push(Fe.y+Fe.height);let sr=Fe.x,lr=Fe.x+Fe.width;sr<De&&(De=sr),lr>Ge&&(Ge=lr),(Ln<ct||Ln===ct&&qe<vt)&&(ct=Ln,Lt=ar,vt=qe)}let tt=q.length;if(tt<2)continue;Zy(q,Y,ee);let st=0;for(;st<tt&&Y[st]<=s;)st++;let ki=st>0&&st<tt,Et,Bt;ki?(Et=st-1,Bt=st):st<=0?(Et=0,Bt=1):(Et=tt-2,Bt=tt-1);let Vt=Y[Bt]-ee[Et];if(Vt<0)continue;let ft;if(ki){ft=ee[Et]+Vt;let qe=ft+o.height,Fe=Y[Bt]-qe;if(ko(Fe-Vt)>u)continue}else st<=0?ft=Y[0]-Vt-o.height:ft=ee[tt-1]+Vt;let rr=n-ft,Ii=ko(rr);if(Ii>u||Ii>=f)continue;let pn=WB(q,Y,ee,De,Ge);if(ki){let qe=ft,Fe=ft+o.height;pn.push({left:De,top:ee[Et],width:Ge-De,height:qe-ee[Et]}),pn.push({left:De,top:Fe,width:Ge-De,height:Y[Bt]-Fe})}else if(st<=0){let qe=ft+o.height;pn.push({left:De,top:qe,width:Ge-De,height:Y[0]-qe})}else pn.push({left:De,top:ee[tt-1],width:Ge-De,height:ft-ee[tt-1]});let Cf=Re-Lt;f=Ii,g=rr,C=Vt,k=py[ae],S=pn,F=Cf}if(!(g===void 0||k===void 0))return{delta:g,absDelta:f,gap:C,rects:S,alignMode:k,crossDelta:F}}function $B(t,o,e,n,i){let r=[],a=i-n;for(let s=0;s<t.length-1;s++){let c=o[s+1]-e[s];c<0||r.push({left:e[s],top:n,width:c,height:a})}return r}function WB(t,o,e,n,i){let r=[],a=i-n;for(let s=0;s<t.length-1;s++){let c=o[s+1]-e[s];c<0||r.push({left:n,top:e[s],width:a,height:c})}return r}function Zy(t,o,e){for(let n=1;n<o.length;n++){let i=o[n],r=e[n],a=t[n],s=n-1;for(;s>=0;){let c=o[s],u=t[s];if(c<i||c===i&&u<a)break;o[s+1]=c,e[s+1]=e[s],t[s+1]=u,s--}o[s+1]=i,e[s+1]=r,t[s+1]=a}}function ko(t){return t<0?-t:t}var d_=class{_element;_isVisible=!1;_left=Number.NaN;_top=Number.NaN;_width=Number.NaN;_height=Number.NaN;constructor(o,e,n="f-rect"){this._element=o.document.createElement("div"),this._element.classList.add(n);let i=this._element.style;i.position="absolute",i.display="none",i.boxSizing="border-box",i.pointerEvents="none",e.appendChild(this._element)}show(){this._isVisible||(this._isVisible=!0,this._element.style.display="block")}hide(){this._isVisible&&(this._isVisible=!1,this._element.style.display="none")}render(o,e,n,i){let r=this._element.style;o!==this._left&&(this._left=o,r.left=o+"px"),e!==this._top&&(this._top=e,r.top=e+"px"),n!==this._width&&(this._width=n,r.width=n+"px"),i!==this._height&&(this._height=i,r.height=i+"px")}clearRect(){this._left=Number.NaN,this._top=Number.NaN,this._width=Number.NaN,this._height=Number.NaN;let o=this._element.style;o.removeProperty("left"),o.removeProperty("top"),o.removeProperty("width"),o.removeProperty("height")}destroy(){this._element.remove()}},u_=class{_browser;_hostElement;_className;_pool=[];_activeCount=0;constructor(o,e,n="f-rect"){this._browser=o,this._hostElement=e,this._className=n}draw(o,e){let n=e.scale,i=e.position.x+e.scaledPosition.x,r=e.position.y+e.scaledPosition.y;for(let a=0;a<o.length;a++){let s=this._getOrCreate(a),c=o[a];s.show(),s.render(c.left*n+i,c.top*n+r,c.width*n,c.height*n)}for(let a=o.length;a<this._activeCount;a++)this._pool[a].hide();this._activeCount=o.length}hideAll(){for(let o=0;o<this._activeCount;o++)this._pool[o].hide();this._activeCount=0}destroy(){for(let o of this._pool)o.destroy();this._pool.length=0,this._activeCount=0}_getOrCreate(o){if(o<this._pool.length)return this._pool[o];let e=new d_(this._browser,this._hostElement,this._className);return this._pool.push(e),e}},up=class{static fToken=Symbol("MagneticRectsPreparationRequest")},KB=(()=>{let t=class cc{_mediator=p(V);_store=p(L);_browser=p(at);_injector=p(dt);_dragSession=p(he);_renderer;handle(e){let n=this._store.instances.get(Ye.MAGNETIC_RECTS);if(!n)return;let i=this._dragSession.draggableItems.find(r=>r instanceof hi);i&&i.setMagneticRects(new p_(this._injector,this._getRenderer(n),this._notDraggedRects(this._draggedNodes(i.items))))}_draggedNodes(e){return e.map(n=>n.nodeOrGroup)}_getRenderer(e){return this._renderer||(this._renderer=new u_(this._browser,e.hostElement)),this._renderer?.destroy(),this._renderer}_notDraggedRects(e){let n=new Set(e);return this._store.nodes.getAll().filter(r=>!n.has(r)).map(r=>this._mediator.execute(new it(r.hostElement)))}static \u0275fac=function(n){return new(n||cc)};static \u0275prov=y({token:cc,factory:cc.\u0275fac})};return t=P([R(up)],t),t})(),p_=class{_renderer;_rects;_timerId=null;_canvasTransform;_alignThreshold=10;_spacingThreshold=10;constructor(o,e,n){this._renderer=e,this._rects=n;let i=o.get(L),r=i.instances.require(Ye.MAGNETIC_RECTS);this._alignThreshold=r.alignThreshold(),this._spacingThreshold=r.spacingThreshold(),this._canvasTransform=i.transform}scheduleRender(o){this._timerId&&clearTimeout(this._timerId),this._timerId=setTimeout(()=>this._renderRects(this._computeRects(o)),15)}_renderRects(o){if(o.axis!==void 0&&o.delta!==void 0&&o.rects.length>0){this._renderer.draw(o.rects,this._canvasTransform);return}this._renderer.hideAll()}_computeRects(o){return GB(this._rects,o,this._alignThreshold,this._spacingThreshold)}clearGuides(){this._renderer.hideAll(),this._timerId&&(clearTimeout(this._timerId),this._timerId=null)}},pp=class{event;static fToken=Symbol("DragNodeFinalizeRequest");constructor(o){this.event=o}},h_=class{nodes;fNodes;constructor(o){this.nodes=o,this.fNodes=o}},YB=(()=>{let t=class dc{_mediator=p(V);_store=p(L);_dragSession=p(he);_dragHandler;handle({event:e}){if(this._dragHandler=this._getDragHandler(),!this._dragHandler)return;let n=this._buildDragDelta(e.getPosition()),i=this._dragHandler.calculateMagneticSnaps(n),r=this._applySnapToDelta(n,i.lines,i.rects);this._finalizeMove(this._dragHandler,r),this._emitNodeIntersectIfNeeded(this._dragHandler)}_getDragHandler(){return this._dragSession.draggableItems.find(PB)}_buildDragDelta(e){return ce.fromPoint(e).elementTransform(this._store.flowHost).div(this._dragSession.onPointerDownScale).sub(this._dragSession.onPointerDownPosition)}_applySnapToDelta(e,n,i){let r=e.x,a=e.y;return n&&(r=this._hasLineSnapValue(n.x)?e.x-(n.x.delta||0):r,a=this._hasLineSnapValue(n.y)?e.y-(n.y.delta||0):a),this._hasRectSnapValue(i)&&(i.axis==="x"?(r=e.x-i.delta,a=e.y-(i.crossDelta??0)):(a=e.y-i.delta,r=e.x-(i.crossDelta??0))),{x:r,y:a}}_hasLineSnapValue(e){return e.guide!==void 0&&e.guide!==null}_hasRectSnapValue(e){return!!e&&e.axis!==void 0&&e.delta!==void 0}_finalizeMove(e,n){for(let i of e.roots)i.finalizeConstraints();e.onPointerMove(n),e.onPointerUp?.(),this._store.fDraggable?.fMoveNodes.emit(this._buildMoveNodesEvent(e))}_buildMoveNodesEvent(e){let n=e.getEvent(),a=((n.data??n.fData)?.fNodeIds??[]).map(s=>({id:s,position:this._store.nodes.get(s)?._position}));return new h_(a)}_emitNodeIntersectIfNeeded(e){if(!this._isDraggedJustOneNode(e)||!this._store.fDraggable?.fEmitOnNodeIntersect)return;let n=e.roots[0].nodeOrGroup;queueMicrotask(()=>this._mediator.execute(new Au(n)))}_isDraggedJustOneNode(e){return e.roots.length===1}static \u0275fac=function(n){return new(n||dc)};static \u0275prov=y({token:dc,factory:dc.\u0275fac})};return t=P([R(pp)],t),t})(),hp=class{event;trigger;static fToken=Symbol("DragNodePreparationRequest");constructor(o,e){this.event=o,this.trigger=e}},XB=(()=>{let t=class uc{_mediator=p(V);_store=p(L);_dragSession=p(he);handle({event:e,trigger:n}){if(!this._canStartDrag(e,n))return;let i=this._findDraggableNode(e.targetElement);i&&(this._storePointerDownContext(e),this._dragSession.draggableItems=[this._buildDragNodeHandler(i)],this._mediator.execute(new dp),this._mediator.execute(new up))}_canStartDrag(e,n){return this._dragSession.isEmpty()&&this._isDragHandle(e.targetElement)&&ln(e.originalEvent,n)}_isDragHandle(e){return Cr(e,".f-drag-handle")}_findDraggableNode(e){let n=this._store.nodes.getAll();for(let i of n)if(!i.fDraggingDisabled()&&i.isContains(e))return i}_storePointerDownContext(e){this._dragSession.onPointerDownScale=this._store.transform.scale,this._dragSession.onPointerDownPosition=ce.fromPoint(e.getPosition()).elementTransform(this._store.flowHost).div(this._store.transform.scale)}_buildDragNodeHandler(e){return(e.fSelectionDisabled()||!e.isSelected())&&queueMicrotask(()=>{this._mediator.execute(new zo(e))}),this._mediator.execute(new lp(e))}static \u0275fac=function(n){return new(n||uc)};static \u0275prov=y({token:uc,factory:uc.\u0275fac})};return t=P([R(hp)],t),t})(),ZB=[...zB,qB,KB,YB,XB],f_=class{targetGroupId;nodeIds;dropPosition;fTargetNode;fNodes;fDropPosition;constructor(o,e,n){this.targetGroupId=o,this.nodeIds=e,this.dropPosition=n,this.fTargetNode=o,this.fNodes=e,this.fDropPosition=n}},QB=(()=>{let t=class pc{_dragSession=p(he);_store=p(L);handle({event:e}){let n=this._findDropHandler();if(!n)return;let i=n.activeTarget?.node;i&&this._emitDropToGroupEvent(i.fId(),e),n.onPointerUp?.()}_findDropHandler(){return this._dragSession.draggableItems.find(e=>e instanceof Vr)}_emitDropToGroupEvent(e,n){this._store.fDraggable?.fDropToGroup.emit(new f_(e,this._getTopLevelDraggedIds(),n.getPosition()))}_getTopLevelDraggedIds(){let n=this._getMoveSummaryHandler().items.map(a=>a.nodeOrGroup),i=new Set(n.map(a=>a.fId())),r=[];for(let a of n){let s=a.fParentId();(!s||!i.has(s))&&r.push(a.fId())}return r}_getMoveSummaryHandler(){let e=this._dragSession.draggableItems.find(n=>n instanceof hi);if(!e)throw new Error("DropToGroup requires DragNodeHandler.");return e}static \u0275fac=function(n){return new(n||pc)};static \u0275prov=y({token:pc,factory:pc.\u0275fac})};return t=P([R(ep)],t),t})(),fp=class{event;static fToken=Symbol("DropToGroupPreparationRequest");constructor(o){this.event=o}},mp=class{candidates;static fToken=Symbol("SortDropCandidatesByLayerRequest");constructor(o){this.candidates=o}},JB=(()=>{let t=class hc{handle({candidates:e}){let n=e.map((i,r)=>({candidate:i,index:r}));return n.sort((i,r)=>{let a=this._compareDomOrder(i.candidate.node.hostElement,r.candidate.node.hostElement);return a!==0?-a:i.index-r.index}),n.map(i=>i.candidate)}_compareDomOrder(e,n){if(e===n)return 0;let i=e.compareDocumentPosition(n);if((i&Node.DOCUMENT_POSITION_FOLLOWING)!==0)return-1;if((i&Node.DOCUMENT_POSITION_PRECEDING)!==0)return 1;if(i&Node.DOCUMENT_POSITION_DISCONNECTED){let r=e.getBoundingClientRect?.()??{top:0,left:0},a=n.getBoundingClientRect?.()??{top:0,left:0};return r.top!==a.top?r.top<a.top?-1:1:r.left!==a.left?r.left<a.left?-1:1:0}return 0}static \u0275fac=function(n){return new(n||hc)};static \u0275prov=y({token:hc,factory:hc.\u0275fac})};return t=P([R(mp)],t),t})(),m_=class{_onPointerDown;_limit;_vCellSize;_hCellSize;_adjustCellSize;constructor(o,e,n){this._onPointerDown=e,this._limit=n;let i=o.get(L);this._vCellSize=i.fDraggable.vCellSize(),this._hCellSize=i.fDraggable.hCellSize(),this._adjustCellSize=i.fDraggable.fCellSizeWhileDragging()}limit(o){let{min:e,max:n}=this._limit,{x:i,y:r}=this._cellSizeStrategies[+this._adjustCellSize](o);return{x:this._clamp(i,e.x,n.x),y:this._clamp(r,e.y,n.y)}}_cellSizeStrategies={0:this._skipCellSize.bind(this),1:this._applyCellSize.bind(this)};_applyCellSize(o){return{x:this._snapToGrid(this._onPointerDown.x+o.x,this._hCellSize)-this._onPointerDown.x,y:this._snapToGrid(this._onPointerDown.y+o.y,this._vCellSize)-this._onPointerDown.y}}_skipCellSize(o){return o}_clamp(o,e,n){return Math.min(Math.max(o,e),n)}_snapToGrid(o,e){return Math.round(o/e)*e}},_p=class{externalItem;static fToken=Symbol("DragExternalItemCreatePlaceholderRequest");constructor(o){this.externalItem=o}},e9=(()=>{let t=class fc{_browser=p(at);_containerRef=p(Wa);handle({externalItem:e}){let{hostElement:n,placeholder:i}=e,r=i(),a=r?this._fromTemplate(r):this._fromHost(n);return a.classList.add("f-external-item-placeholder"),a.style.pointerEvents="none",a}_fromTemplate(e){return cm(this._createViewRef(e),this._browser.document)}_fromHost(e){return sm(e)}_createViewRef(e){let n=this._containerRef.createEmbeddedView(e);return n.detectChanges(),n}static \u0275fac=function(n){return new(n||fc)};static \u0275prov=y({token:fc,factory:fc.\u0275fac})};return t=P([R(_p)],t),t})(),gp=class{externalItem;static fToken=Symbol("DragExternalItemCreatePreviewRequest");constructor(o){this.externalItem=o}},t9=(()=>{let t=class mc{_browser=p(at);_containerRef=p(Wa);handle({externalItem:e}){let{hostElement:n,preview:i}=e,r=i(),a=r?this._fromTemplate(r):this._fromHost(n);return this._setPreviewStyles(a),Uv(a),a.classList.add("f-external-item-preview"),a}_fromTemplate(e){return cm(this._createViewRef(e),this._browser.document)}_fromHost(e){return sm(e)}_createViewRef(e){let n=this._containerRef.createEmbeddedView(e);return n.detectChanges(),n}_setPreviewStyles(e){lm(e.style,{"pointer-events":"none",margin:"showPopover"in e?"0 auto 0 0":"0",position:"fixed",top:"0",left:"0","z-index":"1000"},new Set(["position"]))}static \u0275fac=function(n){return new(n||mc)};static \u0275prov=y({token:mc,factory:mc.\u0275fac})};return t=P([R(gp)],t),t})(),bp=class{event;static fToken=Symbol("DragExternalItemFinalizeRequest");constructor(o){this.event=o}},__=class{externalItemRect;data;targetContainerId;dropPosition;rect;fTargetNode;fDropPosition;constructor(o,e,n,i){this.externalItemRect=o,this.data=e,this.targetContainerId=n,this.dropPosition=i,this.rect=o,this.fTargetNode=n,this.fDropPosition=i}},n9="external-item",i9="drag-external-item";function o9(t){return t.getEvent().kind===i9||t.getEvent().fEventType===n9}var r9=(()=>{let t=class _c{_result=p(fi);_mediator=p(V);_store=p(L);_dragSession=p(he);_browser=p(at);get _createNodeEmitter(){return this._store.fDraggable?.fCreateNode}handle(e){let n=this._findExternalItemHandler();if(!n)return;let i=this._getDestinationNodeOrGroupId();this._emitEvent(this._getElementsFromPoint(e.event.getPosition()),i,e.event.getPosition()),n.onPointerUp(),this._dragSession.draggableItems=[]}_findExternalItemHandler(){return this._dragSession.draggableItems.find(e=>o9(e))}_getDestinationNodeOrGroupId(){let e=this._getDropToGroupHandler(),n=e.activeTarget?.node.fId();return e.onPointerUp?.(),n}_getDropToGroupHandler(){let e=this._dragSession.draggableItems.find(n=>n instanceof Vr);if(!e)throw new Error("NodeDragToParentDragHandler not found");return e}_getElementsFromPoint(e){return this._browser.document.elementsFromPoint(e.x,e.y).filter(n=>!n.closest(".f-external-item")&&!n.closest(".f-external-item-preview"))}_emitEvent(e,n,i){this._isPointerInCanvasRect(e)&&this._createNodeEmitter?.emit(new __(this._getPreviewRect(),this._result.getData().externalItem.data(),n,n?i:void 0))}_isPointerInCanvasRect(e){return e.length?this._store.flowHost.contains(e[0]):!1}_getPreviewRect(){return this._mediator.execute(new it(this._result.getData().preview))}static \u0275fac=function(n){return new(n||_c)};static \u0275prov=y({token:_c,factory:_c.\u0275fac})};return t=P([R(bp)],t),t})(),g_=class{data;constructor(o){this.data=o}},vp=class extends Pt{_externalItem;_pointerDownClientPosition;type="external-item";kind="drag-external-item";data(){return new g_(this._externalItem.data())}_result;_mediator;_browser;_store;_previewEl;_placeholderEl;_startRect=te.initialize();_pointerDownRect=te.initialize();_absoluteOffsetFromFlow=U.initialize();_grabOffsetFromPointer=U.initialize();_originalParent;_originalNextSibling;_originalDisplay;_applyConstraints=o=>o;constructor(o,e,n){super(),this._externalItem=e,this._pointerDownClientPosition=n,this._store=o.get(L),this._result=o.get(fi),this._mediator=o.get(V),this._browser=o.get(at),this._originalDisplay=this._host.style.display,this._initConstraints(o)}get _host(){return this._externalItem.hostElement}get _overlayRoot(){return this._browser.document.fullscreenElement??this._browser.document.body}get _transform(){return this._store.transform}_initConstraints(o){this._startRect=this._getStartRect();let e=new m_(o,this._startRect,zy());this._applyConstraints=n=>e.limit(n)}_getStartRect(){return this._mediator.execute(new it(this._externalItem.hostElement))}prepareDragSequence(){this._pointerDownRect=this._readAbsoluteRect(this._host),this._absoluteOffsetFromFlow=ce.fromPoint(this._pointerDownRect).sub(this._toAbsolutePoint(this._startRect)),this._grabOffsetFromPointer=this._clientToAbsolute(this._pointerDownClientPosition).sub(this._pointerDownRect),this._rememberOriginalPlacement(),this._previewEl=this._createPreview(),this._placeholderEl=this._createPlaceholder(),this._placePreviewIntoOverlay(),this._swapOriginalWithPlaceholderAndMoveOriginalIntoOverlay(),this._result.setData({preview:this._previewEl,externalItem:this._externalItem})}_rememberOriginalPlacement(){let o=this._host.parentNode;if(!o){this._originalParent=void 0,this._originalNextSibling=null;return}this._originalParent=o,this._originalNextSibling=this._host.nextSibling}_createPreview(){let o=this._mediator.execute(new gp(this._externalItem));return this._externalItem.previewMatchSize()&&this._matchSize(o,this._pointerDownRect),o.style.transform=hy(this._pointerDownRect),o}_createPlaceholder(){return this._mediator.execute(new _p(this._externalItem))}_placePreviewIntoOverlay(){this._overlayRoot.appendChild(this._previewEl)}_swapOriginalWithPlaceholderAndMoveOriginalIntoOverlay(){let o=this._originalParent,e=this._placeholderEl;if(!o||!e)return;let n=o.replaceChild(e,this._host);this._overlayRoot.appendChild(n),this._host.style.display="none"}onPointerMove(o,e){if(!this._previewEl)return;let n=this._resolveDeltaFromPointer(o,e),i=this._applyConstraints(n),r=ce.fromPoint(this._startRect).add(i),a=this._toAbsolutePoint(r).add(this._absoluteOffsetFromFlow);this._previewEl.style.transform=hy(a)}onPointerUp(){this._previewEl&&this._previewEl.parentNode&&this._previewEl.parentNode.removeChild(this._previewEl),this._restoreOriginalInParent(),this._host.style.display=this._originalDisplay||"block",this._previewEl=void 0,this._placeholderEl=void 0,this._originalParent=void 0,this._originalNextSibling=null}_restoreOriginalInParent(){let o=this._originalParent,e=this._placeholderEl;if(!(!o||!e)){if(e.parentNode===o){o.replaceChild(this._host,e);return}this._originalNextSibling&&this._originalNextSibling.parentNode===o?o.insertBefore(this._host,this._originalNextSibling):o.appendChild(this._host)}}_matchSize(o,e){o.style.width=`${e.width}px`,o.style.height=`${e.height}px`}_readAbsoluteRect(o){let e=o.getBoundingClientRect(),n=this._browser.window.pageYOffset||this._browser.document.documentElement.scrollTop,i=this._browser.window.pageXOffset||this._browser.document.documentElement.scrollLeft;return te.initialize(e.left+i,e.top+n,e.width,e.height)}_toAbsolutePoint(o){let e=ce.fromPoint(this._transform.position).add(this._transform.scaledPosition);return ce.fromPoint(o).mult(this._transform.scale).add(e).add(this._getFlowHostAbsolutePosition())}_resolveDeltaFromPointer(o,e){let n=e?.getPosition();if(!n)return o;let i=this._clientToAbsolute(n).sub(this._grabOffsetFromPointer),r=this._toFlowPoint(i);return ce.fromPoint(r).sub(this._startRect)}_toFlowPoint(o){let e=this._getFlowHostAbsolutePosition(),n=ce.fromPoint(this._transform.position).add(this._transform.scaledPosition);return ce.fromPoint(o).sub(e).sub(n).div(this._transform.scale)}_getFlowHostAbsolutePosition(){let o=this._store.flowHost.getBoundingClientRect(),e=this._browser.window.pageYOffset||this._browser.document.documentElement.scrollTop,n=this._browser.window.pageXOffset||this._browser.document.documentElement.scrollLeft;return U.initialize(o.left+n,o.top+e)}_clientToAbsolute(o){let e=this._browser.window.pageYOffset||this._browser.document.documentElement.scrollTop,n=this._browser.window.pageXOffset||this._browser.document.documentElement.scrollLeft;return ce.fromPoint(o).add(U.initialize(n,e))}};function hy({x:t,y:o}){return`translate3d(${Math.round(t)}px, ${Math.round(o)}px, 0)`}var yp=class{event;fTrigger;static fToken=Symbol("DragExternalItemPreparationRequest");constructor(o,e){this.event=o,this.fTrigger=e}};function a9(t){return!!t.closest?.("[fExternalItem]")}function s9(t){return t.closest("[fExternalItem]")}var l9=(()=>{class t{_byHost=new Map;_items=X([]);items=E(()=>this._items());getByElement(e){let n=s9(e);return n?this._byHost.get(n):void 0}getByHost(e){return this._byHost.get(e)}register(e){let n=e.hostElement,i=this._byHost.get(n);i!==e&&(i&&i!==e&&this._byHost.delete(n),this._byHost.set(n,e),this._sync())}remove(e){let n=e.hostElement;this._byHost.get(n)===e&&(this._byHost.delete(n),this._sync())}_sync(){this._items.set([...this._byHost.values()])}static \u0275fac=function(n){return new(n||t)};static \u0275prov=y({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var c9=(()=>{let t=class gc{_apiService=p(l9);_dragSession=p(he);_store=p(L);_injector=p(dt);get _flowHost(){return this._store.flowHost}get _transform(){return this._store.transform}handle({event:e,fTrigger:n}){if(!this._dragSession.isEmpty()||!ln(e.originalEvent,n))return;let i=this._resolveExternalItem(e.targetElement);if(!i||i.disabled())return;let r=this._transform.scale??1;this._dragSession.onPointerDownScale=r,this._dragSession.onPointerDownPosition=ce.fromPoint(e.getPosition()).elementTransform(this._flowHost).div(r),this._dragSession.draggableItems=[new vp(this._injector,i,e.getPosition())]}_resolveExternalItem(e){return this._apiService.getByElement(e)}static \u0275fac=function(n){return new(n||gc)};static \u0275prov=y({token:gc,factory:gc.\u0275fac})};return t=P([R(yp)],t),t})(),Cp=class{event;static fToken=Symbol("PreventDefaultIsExternalItemRequest");constructor(o){this.event=o}},d9=(()=>{let t=class bc{handle(e){this._isTargetItemExternal(e.event)&&e.event.preventDefault()}_isTargetItemExternal(e){let n=this._isExternalItem(e.target),i=this._isExternalItem(e.target.parentNode);return n||i}_isExternalItem(e){let n=!1;try{n=a9(e)}catch{}return n}static \u0275fac=function(n){return new(n||bc)};static \u0275prov=y({token:bc,factory:bc.\u0275fac})};return t=P([R(Cp)],t),t})(),u9=[e9,t9,r9,c9,d9],p9=(()=>{let t=class vc{_mediator=p(V);_dragContext=p(he);_store=p(L);_dragInjector=p(Ct);get _allNodes(){return this._store.nodes.getAll()}handle({event:e}){if(!this._canPrepare())return;let n=this._allNodes.find(a=>a.isContains(e.targetElement));if(!n&&!this._hasExternalDrag())throw new Error("Drag target node not found");let i=this._sortedTargetsForDrop();if(n){let a=n.fParentId(),s=this._mediator.execute(new Zp(a));s.length&&(i=i.filter(c=>s.includes(c.node.fId())))}let r=this._dragInjector.get(Vr);r.initialize(i),this._dragContext.draggableItems.push(r)}_canPrepare(){return this._hasMoveDrag()||this._hasExternalDrag()}_hasMoveDrag(){return this._dragContext.draggableItems.some(e=>e instanceof hi)}_hasExternalDrag(){return this._dragContext.draggableItems.some(e=>e instanceof vp)}_sortedTargetsForDrop(){let e=this._getDraggedNodes(),n=e.some(s=>s instanceof Xm),i=this._withParents(e),a=this._eligibleTargets(i,n).map(s=>{let c=this._mediator.execute(new it(s.hostElement));return{node:s,rect:c}});return this._mediator.execute(new mp(a))}_getDraggedNodes(){let e=this._dragContext.draggableItems.find(n=>n instanceof hi);return e?e.items.map(n=>n.nodeOrGroup):[]}_withParents(e){return e.reduce((n,i)=>{n.push(i);let r=this._mediator.execute(new Lo(i));return n.push(...r),n},[])}_eligibleTargets(e,n){let i=this._allNodes.filter(r=>!e.includes(r));return n?i.filter(r=>r instanceof Xm):i}static \u0275fac=function(n){return new(n||vc)};static \u0275prov=y({token:vc,factory:vc.\u0275fac})};return t=P([R(fp)],t),t})(),h9=[JB,p9,QB],xp=class{event;static fToken=Symbol("PinchToZoomFinalizeRequest");constructor(o){this.event=o}},f9=.5,wp=(()=>{class t extends Pt{type="pinch-to-zoom";kind="pinch-to-zoom";_store=p(L);get _flowHost(){return this._store.flowHost}get _canvas(){return this._store.fCanvas}get _zoomComponent(){return this._store.instances.require(Ye.ZOOM)}_startDistance=null;_startScale=null;_touches;initialize(e){this._touches=e}prepareDragSequence(){let e=fy(this._touches);e!=null&&(this._startDistance=e,this._startScale=this._canvas.transform.scale)}onPointerMove(e,n){if(n.touches.length!==2||this._startDistance==null||this._startScale==null)return;let i=fy(n.touches),r=m9(n.touches);if(i==null||r==null){this._reset();return}if(Math.abs(i-this._startDistance)<f9)return;n.preventDefault();let a=i/this._startDistance,s=this._clamp(this._startScale*a);this._canvas.setScale(s,this._castPositionToFlow(r)),this._canvas.redraw()}_clamp(e){return Math.max(this._zoomComponent.minimum,Math.min(e,this._zoomComponent.maximum))}_castPositionToFlow(e){return ce.fromPoint(e).elementTransform(this._flowHost)}_reset(){this._startScale=null,this._startDistance=null}onPointerUp(){this._reset(),this._canvas.emitCanvasChangeEvent()}static \u0275fac=(()=>{let e;return function(i){return(e||(e=G(t)))(i||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})();function m9(t){if(t.length!==2)return null;let o=t[0],e=t[1];return U.initialize((o.clientX+e.clientX)/2,(o.clientY+e.clientY)/2)}function fy(t){if(t.length!==2)return null;let o=t[0],e=t[1];return Math.hypot(e.clientX-o.clientX,e.clientY-o.clientY)}var _9=(()=>{let t=class yc{_dragSession=p(he);handle(e){if(this._hasPinchZoomHandler())for(let n of this._dragSession.draggableItems)n.onPointerUp?.()}_hasPinchZoomHandler(){return this._dragSession.draggableItems.some(e=>e instanceof wp)}static \u0275fac=function(n){return new(n||yc)};static \u0275prov=y({token:yc,factory:yc.\u0275fac})};return t=P([R(xp)],t),t})(),Tp=class{event;static fToken=Symbol("PinchToZoomPreparationRequest");constructor(o){this.event=o}},g9=(()=>{let t=class Cc{_dragInjector=p(Ct);_store=p(L);_dragSession=p(he);handle({event:e}){this._canStart(e)&&(this._dragSession.onPointerDownScale=1,this._dragSession.onPointerDownPosition=new ce,this._dragSession.draggableItems=[this._getHandler(e)])}_canStart(e){return this._dragSession.isEmpty()&&e.touches?.length===2&&!e.isEventInLockedContext&&this._hasZoomComponent()}_hasZoomComponent(){return this._store.instances.has(Ye.ZOOM)}_getHandler(e){let n=this._dragInjector.get(wp);return n.initialize(e.touches),n}static \u0275fac=function(n){return new(n||Cc)};static \u0275prov=y({token:Cc,factory:Cc.\u0275fac})};return t=P([R(Tp)],t),t})(),b9=[g9,_9],Sp=class{event;static fToken=Symbol("SelectionAreaFinalizeRequest");constructor(o){this.event=o}},v9=(()=>{let t=class xc{_dragSession=p(he);handle(e){this._isValid()&&this._dragSession.draggableItems.forEach(n=>{n.onPointerUp?.()})}_isValid(){return this._dragSession.draggableItems.some(e=>e.getEvent().kind==="selection-area")}static \u0275fac=function(n){return new(n||xc)};static \u0275prov=y({token:xc,factory:xc.\u0275fac})};return t=P([R(Sp)],t),t})(),b_=(()=>{class t extends Pt{type="selection-area";kind="selection-area";_store=p(L);_dragSession=p(he);_mediator=p(V);_canBeSelected=[];_selectedByMove=[];get _transform(){return this._store.transform}get _canvasPosition(){return ce.fromPoint(this._transform.position).add(this._transform.scaledPosition)}get _instance(){return this._store.instances.require(Ye.SELECTION_AREA)}prepareDragSequence(){this._canBeSelected=this._mediator.execute(new dh),this._show(),this._draw(te.initialize(this._dragSession.onPointerDownPosition.x,this._dragSession.onPointerDownPosition.y))}onPointerMove(e){let n=ce.fromPoint(e).add(this._dragSession.onPointerDownPosition),i=this._getMinimumPoint(this._dragSession.onPointerDownPosition,n),r=Math.abs(e.x),a=Math.abs(e.y),s=te.initialize(i.x,i.y,r,a);this._draw(s),this._selectedByMove=[],this._canBeSelected.forEach(c=>{c.element.unmarkAsSelected();let u=te.addPoint(te.mult(c.fRect,this._transform.scale),this._canvasPosition);te.intersectionWithRect(u,s)&&(c.element.markAsSelected(),this._selectedByMove.push(c.element))}),this._mediator.execute(new li)}_getMinimumPoint(e,n){return U.initialize(Math.min(e.x,n.x),Math.min(e.y,n.y))}onPointerUp(){this._hide(),this._dragSession.selectedItems.push(...this._selectedByMove),this._selectedByMove.length>0&&(this._dragSession.isSelectedChanged=!0)}_draw(e){let n=this._instance.hostElement.style;n.left=e.x+"px",n.top=e.y+"px",n.width=e.width+"px",n.height=e.height+"px"}_show(){this._instance.hostElement.style.display="block"}_hide(){this._instance.hostElement.style.display="none"}static \u0275fac=(()=>{let e;return function(i){return(e||(e=G(t)))(i||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),kp=class{event;static fToken=Symbol("SelectionAreaPreparationRequest");constructor(o){this.event=o}},y9=(()=>{let t=class wc{_store=p(L);_dragSession=p(he);_dragInjector=p(Ct);get _instance(){return this._store.instances.get(Ye.SELECTION_AREA)}handle(e){this._isValid(e)&&(this._dragSession.onPointerDownScale=1,this._dragSession.onPointerDownPosition=ce.fromPoint(e.event.getPosition()).elementTransform(this._store.flowHost),this._dragSession.draggableItems=[this._dragInjector.createInstance(b_)])}_isValid(e){return!!this._instance&&this._dragSession.isEmpty()&&ln(e.event.originalEvent,this._instance.fTrigger)}static \u0275fac=function(n){return new(n||wc)};static \u0275prov=y({token:wc,factory:wc.\u0275fac})};return t=P([R(kp)],t),t})(),C9=[y9,v9],Ip=class{rect;childrenBounds;static fToken=Symbol("ApplyChildResizeConstraintsRequest");constructor(o,e){this.rect=o,this.childrenBounds=e}},x9=(()=>{let t=class Tc{handle({rect:e,childrenBounds:n}){n&&this._apply(e,n)}_apply(e,n){this._restrictLeft(e,n),this._restrictTop(e,n),this._restrictRight(e,n),this._restrictBottom(e,n),e.width=Math.max(0,e.width),e.height=Math.max(0,e.height)}_restrictLeft(e,n){let i=e.x-n.x;i>0&&(e.x-=i,e.width+=i)}_restrictTop(e,n){let i=e.y-n.y;i>0&&(e.y-=i,e.height+=i)}_restrictRight(e,n){let i=n.x+n.width;e.x+e.width<=i&&(e.width=i-e.x)}_restrictBottom(e,n){let i=n.y+n.height;e.y+e.height<=i&&(e.height=i-e.y)}static \u0275fac=function(n){return new(n||Tc)};static \u0275prov=y({token:Tc,factory:Tc.\u0275fac})};return t=P([R(Ip)],t),t})(),Ep=class{rect;limits;static fToken=Symbol("ApplyParentResizeConstraintsRequest");constructor(o,e){this.rect=o,this.limits=e}},w9=(()=>{let t=class Sc{_mediator=p(V);handle({rect:e,limits:n}){this._applyResizeConstraints(e,n)}_applyResizeConstraints(e,n){if(!n)return;let i=this._clampedCopyForCalculation(e,n);this._applySoftParentExpansions(i,n.softLimits),n.hardLimit&&this._clampRectToInner(e,n.hardLimit.innerRect)}_clampedCopyForCalculation(e,n){let i=be({},e);return n.hardLimit&&this._clampRectToInner(i,n.hardLimit.innerRect),i}_clampRectToInner(e,n){if(e.x<n.x){let a=n.x-e.x;e.x+=a,e.width-=a}if(e.y<n.y){let a=n.y-e.y;e.y+=a,e.height-=a}let i=n.x+n.width;e.x+e.width>i&&(e.width=i-e.x);let r=n.y+n.height;e.y+e.height>r&&(e.height=r-e.y),e.width=Math.max(0,e.width),e.height=Math.max(0,e.height)}_applySoftParentExpansions(e,n){if(n?.length)for(let i of n)this._expandParentFromOriginalIfOverflow(e,i)}_expandParentFromOriginalIfOverflow(e,n){let i=n.innerRect,r=n.boundingRect,a=this._computeOverflow(i,e);if(!this._hasOverflow(a)){this._applyParentRect(n,r);return}let s=this._buildExpandedParentRect(r,a);this._applyParentRect(n,s)}_hasOverflow(e){return!!(e.left||e.top||e.right||e.bottom)}_computeOverflow(e,n){let i=Math.max(0,e.x-n.x),r=Math.max(0,e.y-n.y),a=Math.max(0,n.x+n.width-(e.x+e.width)),s=Math.max(0,n.y+n.height-(e.y+e.height));return{left:i,top:r,right:a,bottom:s}}_buildExpandedParentRect(e,n){let i=be({},e);return n.left&&(i.x=e.x-n.left,i.width=e.width+n.left),n.top&&(i.y=e.y-n.top,i.height=e.height+n.top),n.right&&(i.width=(i.width??e.width)+n.right),n.bottom&&(i.height=(i.height??e.height)+n.bottom),i}_applyParentRect(e,n){e.nodeOrGroup.updatePosition(n),e.nodeOrGroup.updateSize(n),this._mediator.execute(new Hi(e.nodeOrGroup.fId(),n)),e.nodeOrGroup.redraw()}static \u0275fac=function(n){return new(n||Sc)};static \u0275prov=y({token:Sc,factory:Sc.\u0275fac})};return t=P([R(Ep)],t),t})(),Mp=class{originalRect;difference;handleType;minimumSize;static fToken=Symbol("CalculateChangedRectFromDifferenceRequest");constructor(o,e,n,i){this.originalRect=o,this.difference=e,this.handleType=n,this.minimumSize=i}},my={[En.LEFT]:{x:-1,y:0},[En.LEFT_TOP]:{x:-1,y:-1},[En.TOP]:{x:0,y:-1},[En.RIGHT_TOP]:{x:1,y:-1},[En.RIGHT]:{x:1,y:0},[En.RIGHT_BOTTOM]:{x:1,y:1},[En.BOTTOM]:{x:0,y:1},[En.LEFT_BOTTOM]:{x:-1,y:1}},T9=(()=>{let t=class kc{handle({originalRect:e,difference:n,handleType:i,minimumSize:r}){let a=this._changeSizeInRect(e,n,my[i],r);return this._changePosition(e,n,my[i],a)}_changeSizeInRect(e,n,i,r){let a=e.width+i.x*n.x,s=e.height+i.y*n.y,c=0,u=0;return a<0&&(c=a,a=Math.abs(a)),a<r.width&&(i.x===-1&&(c+=a-r.width),a=r.width),s<0&&(u=s,s=Math.abs(s)),s<r.height&&(i.y===-1&&(u+=s-r.height),s=r.height),te.initialize(c,u,a,s)}_changePosition(e,n,i,r){let a=e.x+(i.x===-1?n.x:0)+r.x,s=e.y+(i.y===-1?n.y:0)+r.y;return te.initialize(a,s,r.width,r.height)}static \u0275fac=function(n){return new(n||kc)};static \u0275prov=y({token:kc,factory:kc.\u0275fac})};return t=P([R(Mp)],t),t})(),Dp=class{nodeOrGroup;paddings;static fToken=Symbol("CalculateDirectChildrenUnionRectRequest");constructor(o,e){this.nodeOrGroup=o,this.paddings=e}},S9=(()=>{let t=class Ic{_mediator=p(V);_store=p(L);get _allNodesAndGroups(){return this._store.nodes.getAll()}handle({nodeOrGroup:e,paddings:n}){let i=te.union(this._calculateDirectChildren(e.fId()).map(r=>this._normalizeRect(r)));return i?this._concatRectWithParentPadding(i,n):null}_calculateDirectChildren(e){return this._allNodesAndGroups.filter(n=>n.fParentId()===e)}_normalizeRect(e){return this._mediator.execute(new it(e.hostElement))}_concatRectWithParentPadding(e,n){return te.initialize(e.x-n[0],e.y-n[1],e.width+n[0]+n[2],e.height+n[1]+n[3])}static \u0275fac=function(n){return new(n||Ic)};static \u0275prov=y({token:Ic,factory:Ic.\u0275fac})};return t=P([R(Dp)],t),t})(),Ur=class{nodeOrGroup;rect;static fToken=Symbol("CalculateResizeLimitsRequest");constructor(o,e){this.nodeOrGroup=o,this.rect=e}},k9=(()=>{let t=class Ec{_mediator=p(V);handle({nodeOrGroup:e,rect:n}){let i=this._getParentsChain(e),r=this._calculateNodePaddings(e,n);return{limits:this._buildSoftHardLimits(i),childrenBounds:this._getNormalizedChildrenBounds(e,r),minimumSize:Dt.initialize(r[0]+r[2],r[1]+r[3])}}_calculateNodePaddings(e,n){return this._mediator.execute(new Ui(e,n))}_getNormalizedChildrenBounds(e,n){return this._mediator.execute(new Dp(e,n))}_getParentsChain(e){return this._mediator.execute(new Lo(e))??[]}_buildSoftHardLimits(e){let n=[],i,r=[0,0,0,0];for(let a of e){let s=this._getParentInfo(a,r);if(r=s.paddings,this._isAutoExpand(a))n.push(this._makeLimit(a,s));else{i=this._makeLimit(a,s);break}}return{softLimits:n,hardLimit:i}}_getParentInfo(e,n){return this._mediator.execute(new zr(e,n))}_isAutoExpand(e){return e.fAutoExpandOnChildHit()}_makeLimit(e,{boundingRect:n,innerRect:i}){return{nodeOrGroup:e,boundingRect:n,innerRect:i}}static \u0275fac=function(n){return new(n||Ec)};static \u0275prov=y({token:Ec,factory:Ec.\u0275fac})};return t=P([R(Ur)],t),t})(),Pp=class{event;static fToken=Symbol("ResizeNodeFinalizeRequest");constructor(o){this.event=o}},Qy="node-resize",Jy="resize-node";function I9(t){return t.getEvent().kind===Jy||t.getEvent().fEventType===Qy}var E9=(()=>{let t=class Mc{_dragSession=p(he);handle(e){this._isNodeResizeHandler()&&this._dragSession.draggableItems.forEach(n=>n.onPointerUp?.())}_isNodeResizeHandler(){return this._dragSession.draggableItems.some(e=>I9(e))}static \u0275fac=function(n){return new(n||Mc)};static \u0275prov=y({token:Mc,factory:Mc.\u0275fac})};return t=P([R(Pp)],t),t})(),v_=class{fNodeId;constructor(o){this.fNodeId=o}},y_=(()=>{class t extends Pt{type=Qy;kind=Jy;data(){return new v_(this._nodeOrGroup.fId())}_mediator=p(V);_baselineRect;_constraints;_lastRect=null;_nodeOrGroup;_handleType;_nodeConnections={source:[],target:[]};_softParentConnections=[];initialize(e,n){this._nodeOrGroup=e,this._handleType=n}setNodeConnectionHandlers(e){this._nodeConnections=e}setSoftParentConnectionHandlers(e){this._softParentConnections=e}prepareDragSequence(){this._baselineRect=this._readBaselineRect(),this._constraints=this._buildConstraints(this._baselineRect),this._lastRect=this._baselineRect}onPointerMove(e){let n=this._calcNextRect(e);this._applyConstraints(n),this._commitRect(n),this._applyConnectionHandlers(this._nodeConnections);for(let i of this._softParentConnections)this._applyConnectionHandlers(i);this._lastRect=n}onPointerUp(){let e=this._lastRect??this._fallbackRectFromModel();this._nodeOrGroup.sizeChange.emit(e),requestAnimationFrame(()=>this._nodeOrGroup.refresh())}_readBaselineRect(){return this._mediator.execute(new it(this._nodeOrGroup.hostElement))}_buildConstraints(e){return this._mediator.execute(new Ur(this._nodeOrGroup,e))}_calcNextRect(e){return this._mediator.execute(new Mp(this._baselineRect,e,this._handleType,this._constraints.minimumSize))}_applyConstraints(e){this._mediator.execute(new Ip(e,this._constraints.childrenBounds)),this._mediator.execute(new Ep(e,this._constraints.limits))}_commitRect(e){this._nodeOrGroup.updatePosition({x:e.x,y:e.y}),this._nodeOrGroup.updateSize({width:e.width,height:e.height}),this._mediator.execute(new Hi(this._nodeOrGroup.fId(),e)),this._nodeOrGroup.redraw()}_fallbackRectFromModel(){return te.initialize(this._nodeOrGroup._position.x,this._nodeOrGroup._position.y,this._nodeOrGroup._size?.width,this._nodeOrGroup._size?.height)}_applyConnectionHandlers(e){if(!e.source.length&&!e.target.length)return;let n=new Map;for(let i of e.source){let r=this._readConnectorRect(i.connector,n);i.handler.setSourceRect(r)}for(let i of e.target){let r=this._readConnectorRect(i.connector,n);i.handler.setTargetRect(r)}}_readConnectorRect(e,n){let i=`${e.kind}::${e.fId()}`,r=n.get(i);if(r)return r;let a=this._mediator.execute(new ui(e.hostElement,!1));return n.set(i,a),a}static \u0275fac=(()=>{let e;return function(i){return(e||(e=G(t)))(i||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),$r=class{_mediator=p(V);_store=p(L);_behaviour=p(qo);_source;_target;_sourceRef;_targetRef;_sourceRect;_targetRect;connection;initialize(o){this.connection=o,this._source=this._store.outputs.require(this.connection.fOutputId()),this._target=this._store.inputs.require(this.connection.fInputId()),this._sourceRef=this._readRectRef(this._source),this._targetRef=this._readRectRef(this._target),this._sourceRect=rt.fromRoundedRect(this._sourceRef.rect),this._targetRect=rt.fromRoundedRect(this._targetRef.rect)}setSourceRect(o){this._sourceRect=rt.fromRoundedRect(o),this._mediator.execute(new zi(this._source.fId(),this._source.kind,this._sourceRect))}setTargetRect(o){this._targetRect=rt.fromRoundedRect(o),this._mediator.execute(new zi(this._target.fId(),this._target.kind,this._targetRect))}redraw(){let o=this._buildLine();this.connection.setLine(o),this.connection.redraw()}_buildLine(){let o=rt.fromRoundedRect(this._sourceRect),e=rt.fromRoundedRect(this._targetRect);return this._behaviour.handle(new Cn(o,e,this.connection,this._sourceRef.connector.fConnectableSide,this._targetRef.connector.fConnectableSide,this._resolveRotationContext(this._sourceRef.connector),this._resolveRotationContext(this._targetRef.connector)))}_readRectRef(o){return{connector:o,rect:this._mediator.execute(new ui(o.hostElement,!1))}}_resolveRotationContext(o){return this._mediator.execute(new Hn(o))}},M9=(()=>{class t extends $r{_sourceUpdated=!1;_targetUpdated=!1;setSourceRect(e){super.setSourceRect(e),this._sourceUpdated=!0,this._redrawIfReady()}setTargetRect(e){super.setTargetRect(e),this._targetUpdated=!0,this._redrawIfReady()}_redrawIfReady(){!this._sourceUpdated||!this._targetUpdated||(this._sourceUpdated=!1,this._targetUpdated=!1,super.redraw())}static \u0275fac=(()=>{let e;return function(i){return(e||(e=G(t)))(i||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),D9=(()=>{class t extends $r{setSourceRect(e){super.setSourceRect(e),super.redraw()}static \u0275fac=(()=>{let e;return function(i){return(e||(e=G(t)))(i||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),P9=(()=>{class t extends $r{setTargetRect(e){super.setTargetRect(e),super.redraw()}static \u0275fac=(()=>{let e;return function(i){return(e||(e=G(t)))(i||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),Rp=class{event;fTrigger;static fToken=Symbol("ResizeNodePreparationRequest");constructor(o,e){this.event=o,this.fTrigger=e}},Op=class{handler;nodeOrGroup;static fToken=Symbol("AttachResizeConnectionDragHandlersToNodeRequest");constructor(o,e){this.handler=o,this.nodeOrGroup=e}},R9=(()=>{let t=class Dc{_store=p(L);_mediator=p(V);_dragInjector=p(Ct);handle({handler:e,nodeOrGroup:n}){let i=this._readSoftParents(n),r=[n,...i],a=this._collectSourceConnectorIds(r),s=this._collectTargetConnectorIds(r),c=new Map;e.setNodeConnectionHandlers(this._buildConnectionHandlersForNode(n,a,s,c)),e.setSoftParentConnectionHandlers(i.map(u=>this._buildConnectionHandlersForNode(u,a,s,c)))}_readSoftParents(e){let n=this._mediator.execute(new it(e.hostElement));return this._mediator.execute(new Ur(e,n)).limits.softLimits.map(r=>r.nodeOrGroup)}_collectSourceConnectorIds(e){let n=new Set(e.map(i=>i.fId()));return new Set(this._store.outputs.getAll().filter(i=>n.has(i.fNodeId)).map(i=>i.fId()))}_collectTargetConnectorIds(e){let n=new Set(e.map(i=>i.fId()));return new Set(this._store.inputs.getAll().filter(i=>n.has(i.fNodeId)).map(i=>i.fId()))}_buildConnectionHandlersForNode(e,n,i,r){let a=this._store.outputs.getAll().filter(g=>g.fNodeId===e.fId()),s=this._store.inputs.getAll().filter(g=>g.fNodeId===e.fId());if(!a.length&&!s.length)return{source:[],target:[]};let c=new Set(a.map(g=>g.fId())),u=new Set(s.map(g=>g.fId())),f={source:[],target:[]};for(let g of this._store.connections.getAll()){let C=c.has(g.fOutputId()),k=u.has(g.fInputId());if(!C&&!k)continue;let S=r.get(g.fId())??this._createConnectionHandler(g,n,i);if(r.set(g.fId(),S),C){let F=this._store.outputs.require(g.fOutputId());f.source.push({handler:S,connector:F})}if(k){let F=this._store.inputs.require(g.fInputId());f.target.push({handler:S,connector:F})}}return f}_createConnectionHandler(e,n,i){let r=n.has(e.fOutputId()),a=i.has(e.fInputId()),s=r&&a?this._dragInjector.createInstance(M9):r?this._dragInjector.createInstance(D9):this._dragInjector.createInstance(P9);return s.initialize(e),s}static \u0275fac=function(n){return new(n||Dc)};static \u0275prov=y({token:Dc,factory:Dc.\u0275fac})};return t=P([R(Op)],t),t})(),O9=(()=>{let t=class Pc{_mediator=p(V);_store=p(L);_dragSession=p(he);_dragInjector=p(Ct);get _transform(){return this._store.transform}handle({event:e,fTrigger:n}){if(!this._dragSession.isEmpty()||!this._isResizeHandle(e.targetElement)||!ln(e.originalEvent,n))return;let i=this._findResizableNode(e.targetElement);if(!i)return;this._selectBeforeResize(i);let r=this._transform.scale??1;this._dragSession.onPointerDownScale=r,this._dragSession.onPointerDownPosition=ce.fromPoint(e.getPosition()).elementTransform(this._store.flowHost).div(r);let a=this._dragInjector.createInstance(y_);a.initialize(i,this._readResizeHandleType(e.targetElement)),this._mediator.execute(new Op(a,i)),this._dragSession.draggableItems=[a]}_isResizeHandle(e){return Cr(e,".f-resize-handle")}_findResizableNode(e){let n=this._store.nodes.getAll().find(i=>i.isContains(e));if(n)return n.fDraggingDisabled()?void 0:n}_selectBeforeResize(e){queueMicrotask(()=>{this._mediator.execute(new zo(e))})}_readResizeHandleType(e){let n=$v(e,"fResizeHandleType",".f-resize-handle");return En[n]}static \u0275fac=function(n){return new(n||Pc)};static \u0275prov=y({token:Pc,factory:Pc.\u0275fac})};return t=P([R(Rp)],t),t})(),F9=[x9,w9,T9,S9,k9,R9,E9,O9],Fp=class{event;static fToken=Symbol("RotateNodeFinalizeRequest");constructor(o){this.event=o}},eC="node-rotate",tC="rotate-node";function N9(t){return t.getEvent().kind===tC||t.getEvent().fEventType===eC}var A9=(()=>{let t=class Rc{_dragSession=p(he);handle(e){this._isValid()&&this._dragSession.draggableItems.forEach(n=>{n.onPointerUp?.()})}_isValid(){return this._dragSession.draggableItems.some(e=>N9(e))}static \u0275fac=function(n){return new(n||Rc)};static \u0275prov=y({token:Rc,factory:Rc.\u0275fac})};return t=P([R(Fp)],t),t})(),Np=class{event;fTrigger;static fToken=Symbol("RotateNodePreparationRequest");constructor(o,e){this.event=o,this.fTrigger=e}},C_=class{fNodeId;constructor(o){this.fNodeId=o}};function L9(t,o,e){let{x:n,y:i}=B9(t,o,e),r=n-t.x,a=i-t.y;return{x:r,y:a}}function B9(t,o,e){let n=t.x-e.x,i=t.y-e.y,r=o*Math.PI/180,a=Math.cos(r),s=Math.sin(r),c=n*a-i*s,u=n*s+i*a,f=c+e.x,g=u+e.y;return{x:f,y:g}}var x_=(()=>{class t extends Pt{type=eC;kind=tC;data(){return new C_(this._nodeOrGroup.fId())}_store=p(L);_mediator=p(V);_dragSession=p(he);_nodeOrGroup;_sourceConnections;_targetConnections;_startRotation=0;_nodeRect;_nodeCenter;_pointerDownInFlow;_rotationOffsetDeg=0;get _transform(){return this._store.transform}initialize(e,n,i){this._nodeOrGroup=e,this._sourceConnections=n,this._targetConnections=i,this._startRotation=this._nodeOrGroup._rotate}prepareDragSequence(){this._nodeRect=this._readNodeRect(),this._nodeCenter=this._nodeRect.gravityCenter,this._pointerDownInFlow=this._calculatePointerDownInFlow();let e=this._angleDeg(this._pointerDownInFlow);this._rotationOffsetDeg=e-this._startRotation}onPointerMove(e){let n=U.sum(this._pointerDownInFlow,e),r=this._angleDeg(n)-this._rotationOffsetDeg;this._applyRotation(r);let a=r-this._startRotation;for(let s of this._sourceConnections)s.connection.setSourceDelta(this._deltaAfterRotation(s.connector,a));for(let s of this._targetConnections)s.connection.setTargetDelta(this._deltaAfterRotation(s.connector,a))}onPointerUp(){this._nodeOrGroup.rotate.set(this._nodeOrGroup._rotate),this._nodeOrGroup.refresh()}_readNodeRect(){return this._mediator.execute(new it(this._nodeOrGroup.hostElement))}_calculatePointerDownInFlow(){return U.sub(this._dragSession.onPointerDownPosition,U.sum(this._transform.position,this._transform.scaledPosition))}_angleDeg(e){return Math.atan2(e.y-this._nodeCenter.y,e.x-this._nodeCenter.x)*(180/Math.PI)}_applyRotation(e){this._nodeOrGroup.updateRotate(e),this._nodeOrGroup.redraw()}_deltaAfterRotation(e,n){return L9(e,n,this._nodeCenter)}static \u0275fac=(()=>{let e;return function(i){return(e||(e=G(t)))(i||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),V9=(()=>{let t=class Oc{_mediator=p(V);_store=p(L);_dragContext=p(he);_dragInjector=p(Ct);get _transform(){return this._store.transform}handle(e){if(!this._isPreparationAllowed(e))return;let n=this._findRotatableNode(e.event.targetElement);if(!n)return;this._selectBeforeRotate(n);let i=this._transform.scale;this._dragContext.onPointerDownScale=i,this._dragContext.onPointerDownPosition=ce.fromPoint(e.event.getPosition()).elementTransform(this._store.flowHost).div(i);let r=this._dragInjector.createInstance(x_);r.initialize(n,this._buildOutputConnectionHandlers(n),this._buildInputConnectionHandlers(n)),this._dragContext.draggableItems=[r]}_isPreparationAllowed({event:e,fTrigger:n}){return this._dragContext.isEmpty()&&lB(e.targetElement)&&ln(e.originalEvent,n)}_findRotatableNode(e){for(let n of this._store.nodes.getAll())if(!n.fDraggingDisabled()&&n.isContains(e))return n}_selectBeforeRotate(e){queueMicrotask(()=>{this._mediator.execute(new zo(e))})}_buildInputConnectionHandlers(e){return this._mediator.execute(new Hp(e)).map(n=>{let i=this._store.inputs.require(n.fInputId()),r=this._mediator.execute(new $t(i)),a=this._dragInjector.get(jr);return a.initialize(n),{connection:a,connector:r.rect.gravityCenter}})}_buildOutputConnectionHandlers(e){return this._mediator.execute(new Xp(e)).map(n=>{let i=this._store.outputs.require(n.fOutputId()),r=this._mediator.execute(new $t(i)),a=this._dragInjector.get(qr);return a.initialize(n),{connection:a,connector:r.rect.gravityCenter}})}static \u0275fac=function(n){return new(n||Oc)};static \u0275prov=y({token:Oc,factory:Oc.\u0275fac})};return t=P([R(Np)],t),t})(),z9=[A9,V9],Wr=class{flowRect;canvasPosition;eventPoint;minimap;static fToken=Symbol("CalculateFlowPointFromMinimapPointRequest");constructor(o,e,n,i){this.flowRect=o,this.canvasPosition=e,this.eventPoint=n,this.minimap=i}},H9=(()=>{let t=class Fc{_store=p(L);get _canvasScale(){return this._store.transform.scale||1}handle(e){return U.sub(e.canvasPosition,U.sub(this._getPositionInViewBox(e.eventPoint,e.minimap),this._getNormalizedFlowCenter(e.flowRect)))}_getNormalizedFlowCenter(e){return ce.fromPoint(e.gravityCenter).sub(e)}_getPositionInViewBox(e,n){let i=this.normalizeEventPoint(e,n);return U.sum(i,te.mult(n.viewBox,this._canvasScale))}normalizeEventPoint(e,n){return this._getEventPointInMinimap(e,n).mult(n.scale).mult(this._canvasScale)}_getEventPointInMinimap(e,n){return ce.fromPoint(e).elementTransform(n.element)}static \u0275fac=function(n){return new(n||Fc)};static \u0275prov=y({token:Fc,factory:Fc.\u0275fac})};return t=P([R(Wr)],t),t})(),Ap=class{event;static fToken=Symbol("DragMinimapFinalizeRequest");constructor(o){this.event=o}},q9=(()=>{let t=class Nc{_dragSession=p(he);handle(e){this._isValid()&&this._dragSession.draggableItems.forEach(n=>{n.onPointerUp?.()})}_isValid(){return this._dragSession.draggableItems.some(G9)}static \u0275fac=function(n){return new(n||Nc)};static \u0275prov=y({token:Nc,factory:Nc.\u0275fac})};return t=P([R(Ap)],t),t})(),nC="minimap",iC="minimap";function G9(t){return t.getEvent().kind===iC||t.getEvent().fEventType===nC}var w_=(()=>{class t extends Pt{type=nC;kind=iC;_store=p(L);_mediator=p(V);_lastDelta=null;_flowRect;_startCanvasPosition;_eventPoint;_minimap;initialize(e,n,i,r){this._flowRect=e,this._startCanvasPosition=n,this._eventPoint=i,this._minimap=r}prepareDragSequence(){this._store.fCanvas?.hostElement.classList.add("f-scaled-animate")}onPointerMove(e){this._lastDelta&&this._isSamePoint(e,this._lastDelta)||(this._lastDelta=e,this._store.fCanvas?.setPosition(this._getNewPosition(ce.fromPoint(this._eventPoint).add(e))),this._store.fCanvas?.redraw())}_isSamePoint(e,n){return e.x===n.x&&e.y===n.y}_getNewPosition(e){return this._mediator.execute(new Wr(this._flowRect,this._startCanvasPosition,e,this._minimap))}onPointerUp(){this._store.fCanvas?.hostElement.classList.remove("f-scaled-animate"),this._store.fCanvas?.emitCanvasChangeEvent()}static \u0275fac=(()=>{let e;return function(i){return(e||(e=G(t)))(i||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),Lp=class{event;static fToken=Symbol("DragMinimapPreparationRequest");constructor(o){this.event=o}},j9=(()=>{let t=class Ac{_store=p(L);_mediator=p(V);_dragSession=p(he);_dragInjector=p(Ct);get _canvas(){return this._store.fCanvas}get _flowHost(){return this._store.flowHost}handle({event:e}){if(!this._isValid(e))return;let n=this._store.instances.require(Ye.MINIMAP).state,i=e.getPosition(),r=ce.fromPoint(this._store.transform.position),a=te.fromElement(this._flowHost);this._canvas.setPosition(this._calculateCanvasPosition(a,i,n)),this._canvas.redraw(),this._canvas.emitCanvasChangeEvent(),this._dragSession.onPointerDownScale=1,this._dragSession.onPointerDownPosition=ce.fromPoint(i).elementTransform(this._flowHost);let s=this._dragInjector.createInstance(w_);s.initialize(a,r,i,n),this._dragSession.draggableItems=[s]}_isValid(e){return!(!this._dragSession.isEmpty()||!this._flowHost.contains(e.targetElement)||!e.targetElement.closest(".f-minimap")||!this._store.instances.get(Ye.MINIMAP))}_calculateCanvasPosition(e,n,i){return this._mediator.execute(new Wr(e,ce.fromPoint(this._canvas.transform.position),n,i))}static \u0275fac=function(n){return new(n||Ac)};static \u0275prov=y({token:Ac,factory:Ac.\u0275fac})};return t=P([R(Lp)],t),t})(),U9=[H9,q9,j9];function $9(t){return!!t&&typeof t.destroy=="function"}var Ct=(()=>{class t{_injector=p(dt);_dragInjector=null;_created=[];create(){this._dragInjector=dt.create({providers:[{provide:Bp,useClass:Bp},{provide:Qu,useClass:Qu},{provide:Gu,useClass:Gu},{provide:t_,useClass:t_},{provide:Vr,useClass:Vr},{provide:qr,useClass:qr},{provide:jr,useClass:jr},{provide:Gr,useClass:Gr},{provide:hi,useClass:hi},{provide:wp,useClass:wp},{provide:b_,useClass:b_},{provide:y_,useClass:y_},{provide:x_,useClass:x_},{provide:w_,useClass:w_}],parent:this._injector}),this._created=[]}get(e){if(!this._dragInjector)throw new Error("DragHandlerInjector has not been created. Call create() before using get().");return this._dragInjector.get(e)}createInstance(e){if(!this._dragInjector)throw new Error("DragHandlerInjector is not created");let n=w0(this._dragInjector,()=>new e);return this._created.push(n),n}destroy(){for(let e of this._created)$9(e)&&e.destroy();this._created=[],this._dragInjector?.destroy?.(),this._dragInjector=null}static \u0275fac=function(n){return new(n||t)};static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),fi=(()=>{class t{_data;setData(e){this._data=be(be({},this._data),e)}getData(){return this._data}clear(){this._data=void 0}static \u0275fac=function(n){return new(n||t)};static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),_y="f-canvas-dragging",gy="canvas-dragging",Bp=(()=>{class t extends Pt{type="canvas-move";kind="drag-canvas";_store=p(L);_onPointerDownPosition=U.initialize();constructor(){super(),this._store.fCanvas?.hostElement.classList.add(_y,gy)}prepareDragSequence(){this._onPointerDownPosition=this._store.transform.position}onPointerMove(e){this._store.fCanvas?.setPosition(ce.fromPoint(this._onPointerDownPosition).add(e)),this._store.fCanvas?.redraw()}onPointerUp(){this._store.fCanvas?.emitCanvasChangeEvent(),this._store.fCanvas?.hostElement.classList.remove(_y,gy)}static \u0275fac=function(n){return new(n||t)};static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),W9=(()=>{let t=class Lc{_dragContext=p(he);handle(e){this._isValid()&&this._dragContext.draggableItems.forEach(n=>n.onPointerUp?.())}_isValid(){return this._dragContext.draggableItems.some(e=>e instanceof Bp)}static \u0275fac=function(n){return new(n||Lc)};static \u0275prov=y({token:Lc,factory:Lc.\u0275fac})};return t=P([R(Bu)],t),t})(),Vp=class{event;fTrigger;static fToken=Symbol("DragCanvasPreparationRequest");constructor(o,e){this.event=o,this.fTrigger=e}},K9=(()=>{let t=class Bc{_store=p(L);_dragContext=p(he);_dragInjector=p(Ct);handle({event:e,fTrigger:n}){!this._isValid(e)||!this._isValidTrigger(e,n)||(this._dragContext.onPointerDownScale=1,this._dragContext.onPointerDownPosition=ce.fromPoint(e.getPosition()).elementTransform(this._store.flowHost),this._dragContext.draggableItems=[this._dragInjector.get(Bp)])}_isValid(e){return this._dragContext.isEmpty()&&(this._isBackgroundElement(e.targetElement)||this._isDragOnHost(e.targetElement))}_isBackgroundElement(e){return this._store.instances.get(Ye.BACKGROUND)?.hostElement.contains(e)}_isDragOnHost(e){return this._store.flowHost.contains(e)&&!this._getNode(e)}_getNode(e){let n=this._store.nodes.getAll().find(i=>i.isContains(e));return n&&n.fDraggingDisabled()&&(n=void 0),n}_isValidTrigger(e,n){return ln(e.originalEvent,n)}static \u0275fac=function(n){return new(n||Bc)};static \u0275prov=y({token:Bc,factory:Bc.\u0275fac})};return t=P([R(Vp)],t),t})(),Y9=[W9,K9],zp=class{event;trigger;static fToken=Symbol("SelectByPointerRequest");constructor(o,e){this.event=o,this.trigger=e}},X9=(()=>{let t=class Vc{_mediator=p(V);_store=p(L);_dragSession=p(he);handle({event:e,trigger:n}){if(!this._isSelectionAllowed(e))return;let i=this._resolveSelectable(e.targetElement);this._deferRaiseLayerFor(i),ln(e.originalEvent,n)?this._applyToggleSelect(i):this._applySingleSelect(i)}_isSelectionAllowed(e){return this._store.flowHost.contains(e.targetElement)&&this._dragSession.isEmpty()}_resolveSelectable(e){return this._findNodeOrGroupAt(e)??this._findConnectionAt(e)}_findNodeOrGroupAt(e){return this._store.nodes.getAll().find(n=>n.isContains(e))}_findConnectionAt(e){return this._store.connections.getAll().find(n=>n.isContains(e))}_deferRaiseLayerFor(e){e&&queueMicrotask(()=>{this._mediator.execute(new $i(e,e.hostElement.parentElement))})}_applySingleSelect(e){if(!e||e.fSelectionDisabled()){this._clearSelection();return}e.isSelected()||(this._clearSelection(),this._select(e))}_applyToggleSelect(e){!e||e.fSelectionDisabled()||(e.isSelected()?this._deselect(e):this._select(e))}_clearSelection(){if(this._dragSession.selectedItems.length){for(let e of this._dragSession.selectedItems)e.unmarkAsSelected();this._dragSession.markSelectionAsChanged(),this._dragSession.selectedItems=[]}}_select(e){this._dragSession.selectedItems.push(e),e.markAsSelected(),this._dragSession.markSelectionAsChanged()}_deselect(e){let n=this._dragSession.selectedItems.indexOf(e);n>=0&&this._dragSession.selectedItems.splice(n,1),e.unmarkAsSelected(),this._dragSession.markSelectionAsChanged()}static \u0275fac=function(n){return new(n||Vc)};static \u0275prov=y({token:Vc,factory:Vc.\u0275fac})};return t=P([R(zp)],t),t})(),Z9=[X9];var T_=class extends jm{hostElement=p(Ze).nativeElement};function Q9(t){return Cr(t,".f-drag-blocker")}var oC=(()=>{class t extends T_{_result=p(fi);_mediator=p(V);_platform=p(rm);disabled=!1;fMultiSelectTrigger=e=>this._platform.getOS()===oi.MAC_OS?e.metaKey:e.ctrlKey;fReassignConnectionTrigger=vn;fCreateConnectionTrigger=vn;fConnectionWaypointsTrigger=B(vn);fMoveControlPointTrigger=vn;fNodeResizeTrigger=vn;fNodeRotateTrigger=vn;fNodeMoveTrigger=vn;fCanvasMoveTrigger=vn;fExternalItemTrigger=vn;fSelectionChange=new ne;fNodeIntersectedWithConnections=new ne;fNodeConnectionsIntersection=et();fEmitOnNodeIntersect=!1;fCreateNode=new ne;fMoveNodes=new ne;fReassignConnection=new ne;fCreateConnection=new ne;fConnectionWaypointsChanged=et();fDropToGroup=new ne;vCellSize=B(1,{transform:e=>xe(e,1)});hCellSize=B(1,{transform:e=>xe(e,1)});fCellSizeWhileDragging=B(!1,{transform:e=>j(e)});fDragStarted=new ne;fDragEnded=new ne;_dragHandlerInjector=p(Ct);ngOnInit(){this._mediator.execute(new jp(this))}ngAfterViewInit(){super.subscribe()}onPointerDown(e){if(Q9(e.targetElement))return!1;this._dragHandlerInjector.create(),this._result.clear(),this._mediator.execute(new $p),this._mediator.execute(new kp(e)),this._mediator.execute(new Lp(e)),this._mediator.execute(new Tp(e)),this._mediator.execute(new zp(e,this.fMultiSelectTrigger)),this._mediator.execute(new Ku(e,this.fReassignConnectionTrigger)),this._mediator.execute(new $u(e,this.fCreateConnectionTrigger)),this._mediator.execute(new Ju(e,this.fConnectionWaypointsTrigger()));let n=e.isMouseLeftButton();return n||this.finalizeDragSequence(),n}prepareDragSequence(e){this._mediator.execute(new Rp(e,this.fNodeResizeTrigger)),this._mediator.execute(new Np(e,this.fNodeRotateTrigger)),this._mediator.execute(new hp(e,this.fNodeMoveTrigger)),this._mediator.execute(new yp(e,this.fExternalItemTrigger)),this._mediator.execute(new fp(e)),this._mediator.execute(new Vp(e,this.fCanvasMoveTrigger)),this._mediator.execute(new Wp)}onSelect(e){this._mediator.execute(new Cp(e))}onPointerMove(e){this._mediator.execute(new Up(e))}onPointerUp(e){this._mediator.execute(new Ap(e)),this._mediator.execute(new Sp(e)),this._mediator.execute(new Wu(e)),this._mediator.execute(new qu(e)),this._mediator.execute(new Pp(e)),this._mediator.execute(new Fp(e)),this._mediator.execute(new pp(e)),this._mediator.execute(new bp(e)),this._mediator.execute(new ep(e)),this._mediator.execute(new Bu(e)),this._mediator.execute(new xp(e)),this._mediator.execute(new Xu(e)),this._mediator.execute(new Ru)}finalizeDragSequence(){this._mediator.execute(new pi),this._mediator.execute(new Nr),this._result.clear(),this._dragHandlerInjector.destroy()}ngOnDestroy(){this._mediator.execute(new pi),this._mediator.execute(new Kp),super.unsubscribe()}static \u0275fac=(()=>{let e;return function(i){return(e||(e=G(t)))(i||t)}})();static \u0275dir=je({type:t,selectors:[["f-flow","fDraggable",""]],inputs:{disabled:[2,"fDraggableDisabled","disabled",j],fMultiSelectTrigger:"fMultiSelectTrigger",fReassignConnectionTrigger:"fReassignConnectionTrigger",fCreateConnectionTrigger:"fCreateConnectionTrigger",fConnectionWaypointsTrigger:[1,"fConnectionWaypointsTrigger"],fMoveControlPointTrigger:"fMoveControlPointTrigger",fNodeResizeTrigger:"fNodeResizeTrigger",fNodeRotateTrigger:"fNodeRotateTrigger",fNodeMoveTrigger:"fNodeMoveTrigger",fCanvasMoveTrigger:"fCanvasMoveTrigger",fExternalItemTrigger:"fExternalItemTrigger",fEmitOnNodeIntersect:[2,"fEmitOnNodeIntersect","fEmitOnNodeIntersect",j],vCellSize:[1,"vCellSize"],hCellSize:[1,"hCellSize"],fCellSizeWhileDragging:[1,"fCellSizeWhileDragging"]},outputs:{fSelectionChange:"fSelectionChange",fNodeIntersectedWithConnections:"fNodeIntersectedWithConnections",fNodeConnectionsIntersection:"fNodeConnectionsIntersection",fCreateNode:"fCreateNode",fMoveNodes:"fMoveNodes",fReassignConnection:"fReassignConnection",fCreateConnection:"fCreateConnection",fConnectionWaypointsChanged:"fConnectionWaypointsChanged",fDropToGroup:"fDropToGroup",fDragStarted:"fDragStarted",fDragEnded:"fDragEnded"},exportAs:["fDraggable"],standalone:!1,features:[we([fi,Ct]),Z]})}return t})(),J9=[...Y9,...MB,...Z7,...Z9,...u9,...rB,...U9,...ZB,...h9,...F9,...z9,...C9,...b9],eV=(()=>{let t=class zc{_store=p(L);handle({waypointIndex:e,connectionId:n}){let i=this._store.connections.require(n),r=i.fWaypoints()?.waypoints().slice();if(!r)throw new Error("Connection waypoints not found");r.splice(e,1),i.fWaypoints()?.waypoints.set(r),this._store.fDraggable?.fConnectionWaypointsChanged.emit(this._changeEvent(i))}_changeEvent(e){return new Zu(e.fId(),e.fWaypoints()?.waypoints()||[])}static \u0275fac=function(n){return new(n||zc)};static \u0275prov=y({token:zc,factory:zc.\u0275fac})};return t=P([R(zm)],t),t})(),S_=class{static fToken=Symbol("RemoveSnapConnectionFromStoreRequest")},tV=(()=>{let t=class Hc{_store=p(L);handle(e){this._store.connections.removeInstanceForSnap()}static \u0275fac=function(n){return new(n||Hc)};static \u0275prov=y({token:Hc,factory:Hc.\u0275fac})};return t=P([R(S_)],t),t})(),nV=[kh,Wi,YL,XL,ZL,QL,j6,y7,Y6,f7,E7,I7,v7,D7,R7,P7,b7,S7,X6,A7,g7,_7,m7,c7,h7,d7,u7,M7,w7,O7,F7,k7,T7,N7,L7,B7,V7,tV,eV],Kr=class{instance;static fToken=Symbol("AddConnectorToStoreRequest");constructor(o){this.instance=o}},iV=(()=>{let t=class qc{_store=p(L);_mediator=p(V);handle({instance:e}){switch(e.kind){case"input":this._addInput(e);break;case"output":this._addOutput(e);break;case"outlet":this._addOutlet(e);break;default:throw new Error(`Unknown connector kind: ${e.kind}`)}}_addInput(e){this._store.inputs.add(e),this._store.emitNodeChanges(),this._geometryRegister(e)}_addOutput(e){this._store.outputs.add(e),this._store.emitNodeChanges(),this._geometryRegister(e)}_addOutlet(e){this._store.outlets.add(e),this._store.emitNodeChanges(),this._geometryRegister(e)}_geometryRegister(e){this._mediator.execute(new pu(e.fId(),e.fNodeId,e.kind,e.hostElement))}static \u0275fac=function(n){return new(n||qc)};static \u0275prov=y({token:qc,factory:qc.\u0275fac})};return t=P([R(Kr)],t),t})(),ji=class{position;connectorRefs;static fToken=Symbol("CalculateClosestConnectorRequest");constructor(o,e){this.position=o,this.connectorRefs=e}},oV=(()=>{let t=class Gc{handle({position:e,connectorRefs:n}){let i,r=1/0;for(let a of n){let s=this._distanceToRect(e,a.rect);s<r&&(r=s,i=a)}return i?zt(be({},i),{distance:r}):void 0}_distanceToRect(e,{x:n,y:i,width:r,height:a}){let s=this._clamp(e.x,n,n+r),c=this._clamp(e.y,i,i+a),u=e.x-s,f=e.y-c;return Math.sqrt(u*u+f*f)}_clamp(e,n,i){return Math.max(n,Math.min(i,e))}static \u0275fac=function(n){return new(n||Gc)};static \u0275prov=y({token:Gc,factory:Gc.\u0275fac})};return t=P([R(ji)],t),t})(),Yr=class{pointerPosition;connectableConnectors;static fToken=Symbol("FindConnectableConnectorUsingPriorityAndPositionRequest");constructor(o,e){this.pointerPosition=o,this.connectableConnectors=e}},rV=(()=>{let t=class jc{_mediator=p(V);_store=p(L);_browser=p(at);get _transform(){return this._store.transform}get _flowHost(){return this._store.flowHost}get _fNodes(){return this._store.nodes.getAll()}get _snapConnection(){return this._store.connections.getForSnap()}handle(e){let n=this._findConnectorAtPosition(e);return n.length>0?n[0]:void 0}_findConnectorAtPosition(e){let n=[];n.push(...this._filterConnectorsThatLocatedAtPosition(e));let i=this._isSnapConnectionEnabledAndHasClosestConnector(e);i&&n.unshift(i.connector);let r=this._getFirstConnectableConnectorOfNodeAtPosition(e);return r&&n.push(r),n}_filterConnectorsThatLocatedAtPosition(e){return e.connectableConnectors.filter(n=>te.isIncludePoint(n.rect,this._calculatePointerInFlow(e.pointerPosition))).map(n=>n.connector)}_calculatePointerInFlow(e){return Go(e,this._flowHost,this._transform)}_isSnapConnectionEnabledAndHasClosestConnector(e){if(!this._snapConnection)return;let n=this._mediator.execute(new ji(this._calculatePointerInFlow(e.pointerPosition),e.connectableConnectors));return this._isValidClosestInput(n)?n:void 0}_isValidClosestInput(e){return!!e&&e.distance<this._snapConnection.fSnapThreshold}_getFirstConnectableConnectorOfNodeAtPosition(e){return this._getElementsFromPoint(e.pointerPosition).map(n=>this._findConnectableNode(n)).filter(n=>!!n).map(n=>this._findFirstConnectableConnectorOfNode(e.connectableConnectors,n)).find(n=>!!n)}_getElementsFromPoint(e){return this._browser.document.elementsFromPoint(e.x,e.y)}_findConnectableNode(e){return this._fNodes.find(n=>n.isContains(e)&&n.fConnectOnNode())}_findFirstConnectableConnectorOfNode(e,n){return e.find(i=>i.connector.fNodeId===n.fId())?.connector}static \u0275fac=function(n){return new(n||jc)};static \u0275prov=y({token:jc,factory:jc.\u0275fac})};return t=P([R(Yr)],t),t})(),Xr=class{source;pointer;static fToken=Symbol("CalculateTargetConnectorsToConnectRequest");constructor(o,e){this.source=o,this.pointer=e}},$t=class{connector;static fToken=Symbol("GetConnectorRectReferenceRequest");constructor(o){this.connector=o}},aV=(()=>{let t=class Uc{_mediator=p(V);handle({connector:e}){return{connector:e,rect:this._getRect(e)}}_getRect(e){return this._mediator.execute(new ui(e.hostElement))}static \u0275fac=function(n){return new(n||Uc)};static \u0275prov=y({token:Uc,factory:Uc.\u0275fac})};return t=P([R($t)],t),t})(),Zr=class{nodeOrGroup;static fToken=Symbol("AddNodeToStoreRequest");constructor(o){this.nodeOrGroup=o}},sV=(()=>{let t=class $c{_store=p(L);_mediator=p(V);handle({nodeOrGroup:e}){this._store.nodes.add(e),this._mediator.execute(new hu(e.fId(),e.hostElement,e)),this._store.emitNodeChanges()}static \u0275fac=function(n){return new(n||$c)};static \u0275prov=y({token:$c,factory:$c.\u0275fac})};return t=P([R(Zr)],t),t})(),Hp=class{nodeOrGroup;static fToken=Symbol("CalculateInputConnectionsRequest");constructor(o){this.nodeOrGroup=o}},lV=(()=>{let t=class Wc{_store=p(L);handle({nodeOrGroup:e}){let n=this._collectInputIds(e);return this._collectConnections(n)}_collectInputIds(e){let n=new Set,i=this._store.inputs.getAll();for(let r of i)e.isContains(r.hostElement)&&n.add(r.fId());return n}_collectConnections(e){let n=[],i=this._store.connections.getAll();for(let r of i)e.has(r.fInputId())&&n.push(r);return n}static \u0275fac=function(n){return new(n||Wc)};static \u0275prov=y({token:Wc,factory:Wc.\u0275fac})};return t=P([R(Hp)],t),t})(),Fo=class{connector;pointerPosition;static fToken=Symbol("CalculateConnectableSideByConnectedPositionsRequest");constructor(o,e){this.connector=o,this.pointerPosition=e}},by=2,It=(function(t){return t[t.NONE=0]="NONE",t[t.LEFT=1]="LEFT",t[t.RIGHT=2]="RIGHT",t[t.TOP=4]="TOP",t[t.BOTTOM=8]="BOTTOM",t[t.ALL=15]="ALL",t})(It||{});function cV(t,o,e,n,i){let r=dV(i),a=e-t,s=n-o,c=uV(a,s);return pV(c,r)?c:hV(a,s,r,c)}function dV(t){if(!t||t.length===0)return It.ALL;let o=It.NONE;for(let e=0;e<t.length;e++)switch(t[e]){case K.LEFT:o|=It.LEFT;break;case K.RIGHT:o|=It.RIGHT;break;case K.TOP:o|=It.TOP;break;case K.BOTTOM:o|=It.BOTTOM;break}return o||It.ALL}function uV(t,o){let e=t<0?-t:t,n=o<0?-o:o;return e-n>by?t<0?K.LEFT:K.RIGHT:(n-e>by,o<0?K.TOP:K.BOTTOM)}function pV(t,o){switch(t){case K.LEFT:return(o&It.LEFT)!==0;case K.RIGHT:return(o&It.RIGHT)!==0;case K.TOP:return(o&It.TOP)!==0;case K.BOTTOM:return(o&It.BOTTOM)!==0;default:return!0}}function hV(t,o,e,n){let i=n,r=-1/0;if(e&It.RIGHT){let a=t;a>r&&(r=a,i=K.RIGHT)}if(e&It.LEFT){let a=-t;a>r&&(r=a,i=K.LEFT)}if(e&It.BOTTOM){let a=o;a>r&&(r=a,i=K.BOTTOM)}if(e&It.TOP){let a=-o;a>r&&(r=a,i=K.TOP)}return i}function qp(t){return t===K.CALCULATE||t===K.CALCULATE_HORIZONTAL||t===K.CALCULATE_VERTICAL}var fV={[K.CALCULATE]:[K.TOP,K.BOTTOM,K.LEFT,K.RIGHT],[K.CALCULATE_HORIZONTAL]:[K.LEFT,K.RIGHT],[K.CALCULATE_VERTICAL]:[K.TOP,K.BOTTOM]},mV=(()=>{let t=class Kc{_mediator=p(V);handle({connector:e,pointerPosition:n}){let i=e.userFConnectableSide,r=this._getConnectorRect(e.hostElement).gravityCenter,a=this._accumulateConnectedCenters(e.hostElement,e.toConnector,n),s=a.sumX/a.count,c=a.sumY/a.count;return cV(r.x,r.y,s,c,fV[i])}_accumulateConnectedCenters(e,n,i){let r=i?.x||0,a=i?.y||0,s=i?1:0;if(n&&n.length)for(let c=0;c<n.length;c++){let u=n[c].hostElement;if(u===e)continue;let f=this._getConnectorRect(u).gravityCenter;r+=f.x,a+=f.y,s++}return{sumX:r,sumY:a,count:s}}_getConnectorRect(e){return this._mediator.execute(new it(e))}static \u0275fac=function(n){return new(n||Kc)};static \u0275prov=y({token:Kc,factory:Kc.\u0275fac})};return t=P([R(Fo)],t),t})(),Gp=class{connector;static fToken=Symbol("CalculateConnectableSideByInternalPositionRequest");constructor(o){this.connector=o}},jp=class{fComponent;static fToken=Symbol("AddDndToStoreRequest");constructor(o){this.fComponent=o}},_V=(()=>{let t=class Yc{_store=p(L);handle(e){this._store.fDraggable=e.fComponent}static \u0275fac=function(n){return new(n||Yc)};static \u0275prov=y({token:Yc,factory:Yc.\u0275fac})};return t=P([R(jp)],t),t})(),Up=class{event;static fToken=Symbol("OnPointerMoveRequest");constructor(o){this.event=o}},gV=(()=>{let t=class Xc{_mediator=p(V);_store=p(L);get _hostElement(){return this._store.fDraggable?.hostElement}_dragContext=p(he);handle({event:e}){this._dragContext.rememberPointerEvent(e),this._setDifferenceToDraggableItems(this._getDifferenceBetweenPointerAndPointerDown(e),e),this._mediator.execute(new Ar)}_setDifferenceToDraggableItems(e,n){this._dragContext.draggableItems.forEach(i=>{i.onPointerMove(be({},e),n)})}_getDifferenceBetweenPointerAndPointerDown(e){return this._getPointerPositionInCanvas(e).div(this._dragContext.onPointerDownScale).sub(this._dragContext.onPointerDownPosition)}_getPointerPositionInCanvas(e){return ce.fromPoint(e.getPosition()).elementTransform(this._hostElement)}static \u0275fac=function(n){return new(n||Xc)};static \u0275prov=y({token:Xc,factory:Xc.\u0275fac})};return t=P([R(Up)],t),t})(),$p=class{static fToken=Symbol("InitializeDragSequenceRequest")},bV=(()=>{let t=class Zc{_dragContext=p(he);handle(e){this._dragContext.reset()}static \u0275fac=function(n){return new(n||Zc)};static \u0275prov=y({token:Zc,factory:Zc.\u0275fac})};return t=P([R($p)],t),t})(),mi=class{static fToken=Symbol("IsDragStartedRequest")},vV=(()=>{let t=class Qc{_store=p(L);handle(e){return!!this._store.fDraggable?.isDragStarted}static \u0275fac=function(n){return new(n||Qc)};static \u0275prov=y({token:Qc,factory:Qc.\u0275fac})};return t=P([R(mi)],t),t})(),Wp=class{static fToken=Symbol("PrepareDragSequenceRequest")},yV=(()=>{let t=class Jc{_mediator=p(V);_dragContext=p(he);handle(e){this._callPrepareDragSequence(),this._mediator.execute(new Ou)}_callPrepareDragSequence(){this._dragContext.draggableItems.forEach(e=>e.prepareDragSequence?.())}static \u0275fac=function(n){return new(n||Jc)};static \u0275prov=y({token:Jc,factory:Jc.\u0275fac})};return t=P([R(Wp)],t),t})(),Kp=class{static fToken=Symbol("RemoveDndFromStoreRequest")},CV=(()=>{let t=class ed{_store=p(L);handle(e){this._store.fDraggable=void 0}static \u0275fac=function(n){return new(n||ed)};static \u0275prov=y({token:ed,factory:ed.\u0275fac})};return t=P([R(Kp)],t),t})(),xV=[_V,gV,bV,yV,vV,CV],wV=new ge("CONNECTABLE_SIDE_EPSILON"),TV=(()=>{let t=class td{_mediator=p(V);_lastSide=new WeakMap;_epsilon=Math.max(0,p(wV,{optional:!0})??2);handle({connector:e}){if(this._isDragging()){let i=this._lastSide.get(e);if(i!==void 0)return i;let r=this._getSideByDelta(e.hostElement,e.fNodeHost,e);return this._lastSide.set(e,r),r}let n=this._getSideByDelta(e.hostElement,e.fNodeHost,e);return this._lastSide.set(e,n),n}_getSideByDelta(e,n,i){let r=te.fromElement(e),a=n.getBoundingClientRect(),s=r.gravityCenter.x,c=r.gravityCenter.y,u=s-a.left,f=a.right-s,g=c-a.top,C=a.bottom-c,k=0,S=u,F=[u,f,g,C];for(let ee=1;ee<4;ee++){let ae=F[ee];ae<S&&(S=ae,k=ee)}let q=k===0?K.LEFT:k===1?K.RIGHT:k===2?K.TOP:K.BOTTOM,Y=this._lastSide.get(i);if(Y!==void 0&&Y!==q){let ee=Y===K.LEFT?0:Y===K.RIGHT?1:Y===K.TOP?2:3;(ee===0?u:ee===1?f:ee===2?g:C)-S<=this._epsilon&&(q=Y)}return q}_isDragging(){return this._mediator.execute(new mi)}static \u0275fac=function(n){return new(n||td)};static \u0275prov=y({token:td,factory:td.\u0275fac})};return t=P([R(Gp)],t),t})(),No=class{nodeOrGroup;static fToken=Symbol("CalculateConnectorsConnectableSidesRequest");constructor(o){this.nodeOrGroup=o}},SV=(()=>{let t=class nd{_mediator=p(V);handle({nodeOrGroup:e}){let n=e.connectors,i=n.length;for(let a=0;a<i;a++){let s=n[a];s.fConnectableSide=this._resolveSideForConnectorFast(s)}let r=new Set;for(let a=0;a<i;a++){let c=n[a].toConnector;if(c&&c.length)for(let u=0,f=c.length;u<f;u++){let g=c[u],C=g.userFConnectableSide;qp(C)&&r.add(g)}}r.size>0&&r.forEach(a=>{a.fConnectableSide=this._calculateByConnectedPositions(a)})}_resolveSideForConnectorFast(e){let n=e.userFConnectableSide;return n===K.AUTO?this._mediator.execute(new Gp(e)):qp(n)?this._calculateByConnectedPositions(e):n}_calculateByConnectedPositions(e){return this._mediator.execute(new Fo(e))}static \u0275fac=function(n){return new(n||nd)};static \u0275prov=y({token:nd,factory:nd.\u0275fac})};return t=P([R(No)],t),t})(),Ao=class{static fToken=Symbol("CalculateNodesBoundingBoxRequest")},kV=(()=>{let t=class id{_store=p(L);handle(e){return te.union(this._nodesRects())}_nodesRects(){return this._store.nodes.getAll().map(e=>te.fromElement(e.hostElement))}static \u0275fac=function(n){return new(n||id)};static \u0275prov=y({token:id,factory:id.\u0275fac})};return t=P([R(Ao)],t),t})(),Yp=class{fNodes;static fToken=Symbol("CalculateNodesBoundingBoxNormalizedPositionRequest");constructor(o){this.fNodes=o}},IV=(()=>{let t=class od{_store=p(L);_mediator=p(V);handle(e){return te.union(this._getNodesRects(e.fNodes||this._store.nodes.getAll()))}_getNodesRects(e){return e.map(n=>this._getNodeRect(n))}_getNodeRect(e){let n=this._mediator.execute(new Ro(e.hostElement));if(n)return this._getElementRect(e,n);let i=this._mediator.execute(new it(e.hostElement));return this._getElementRect(e,i)}_getElementRect(e,n){return te.initialize(e._position.x,e._position.y,n.width,n.height)}static \u0275fac=function(n){return new(n||od)};static \u0275prov=y({token:od,factory:od.\u0275fac})};return t=P([R(Yp)],t),t})(),Xp=class{nodeOrGroup;static fToken=Symbol("CalculateOutputConnectionsRequest");constructor(o){this.nodeOrGroup=o}},EV=(()=>{let t=class rd{_store=p(L);handle({nodeOrGroup:e}){let n=this._collectOutputIds(e);return this._collectConnections(n)}_collectOutputIds(e){let n=new Set,i=this._store.outputs.getAll();for(let r of i)e.isContains(r.hostElement)&&n.add(r.fId());return n}_collectConnections(e){let n=[],i=this._store.connections.getAll();for(let r of i)e.has(r.fOutputId())&&n.push(r);return n}static \u0275fac=function(n){return new(n||rd)};static \u0275prov=y({token:rd,factory:rd.\u0275fac})};return t=P([R(Xp)],t),t})(),Qr=class{nodeOrGroup;static fToken=Symbol("FitToChildNodesAndGroupsRequest");constructor(o){this.nodeOrGroup=o}},Ui=class{fNode;rect;static fToken=Symbol("GetNodePaddingRequest");constructor(o,e){this.fNode=o,this.rect=e}},MV=(()=>{let t=class ad{_browser=p(at);handle(e){return e.fNode.fIncludePadding()?this._getPaddingData(e.fNode,e.rect):[0,0,0,0]}_getPaddingData(e,n){let i=this._browser.window.getComputedStyle(e.hostElement);return[this._browser.toPixels(i.paddingLeft,n.width,n.height,i.fontSize),this._browser.toPixels(i.paddingTop,n.width,n.height,i.fontSize),this._browser.toPixels(i.paddingRight,n.width,n.height,i.fontSize),this._browser.toPixels(i.paddingBottom,n.width,n.height,i.fontSize)]}static \u0275fac=function(n){return new(n||ad)};static \u0275prov=y({token:ad,factory:ad.\u0275fac})};return t=P([R(Ui)],t),t})(),DV=(()=>{let t=class sd{_mediator=p(V);_store=p(L);get _nodes(){return this._store.nodes.getAll()}handle({nodeOrGroup:e}){if(e.fAutoSizeToFitChildren()){let r=this._calculateDirectChildren(e);if(r.length){let a=this._boundingRect(e),s=this._calculateChildrenBounding(r,this._paddings(e,a));e.updatePosition(s),e.updateSize(s),e.redraw()}}let n=e.fParentId();if(!n)return;let i=this._nodes.find(r=>r.fId()===n);i&&this._mediator.execute(new Qr(i))}_calculateDirectChildren(e){return this._nodes.filter(n=>n.fParentId()===e.fId())}_unionRect(e){return te.union(e.map(n=>this._boundingRect(n)))||te.initialize()}_boundingRect(e){return this._mediator.execute(new it(e.hostElement))}_paddings(e,n){return this._mediator.execute(new Ui(e,n))}_calculateChildrenBounding(e,[n,i,r,a]){let s=this._unionRect(e);return s=te.initialize(s.x-n,s.y-i,s.width+n+r,s.height+i+a),s}static \u0275fac=function(n){return new(n||sd)};static \u0275prov=y({token:sd,factory:sd.\u0275fac})};return t=P([R(Qr)],t),t})(),Zp=class{id;static fToken=Symbol("GetChildNodeIdsRequest");constructor(o){this.id=o}},PV=(()=>{let t=class ld{_store=p(L);get _allNodesAndGroups(){return this._store.nodes.getAll()}handle(e){if(!e.id)return[];let n=new Set,i=[];return this._collectDescendants(e.id,i,n),i}_collectDescendants(e,n,i){if(i.has(e))throw new Error(`Circular reference detected in the node hierarchy. Node id: ${e}`);i.add(e);let r=this._allNodesAndGroups.filter(a=>a.fParentId()===e).map(a=>a.fId());n.push(...r);for(let a of r)this._collectDescendants(a,n,i)}static \u0275fac=function(n){return new(n||ld)};static \u0275prov=y({token:ld,factory:ld.\u0275fac})};return t=P([R(Zp)],t),t})(),Lo=class{nodeOrGroup;static fToken=Symbol("GetParentNodesRequest");constructor(o){this.nodeOrGroup=o}},RV=(()=>{let t=class cd{_store=p(L);handle({nodeOrGroup:e}){return this._getParentNodes(e,new Set,[])}_getParentNodes(e,n,i){if(n.has(e.fId()))throw new Error("Circular reference detected in the node hierarchy. Node id: "+e.fId());n.add(e.fId());let r=this._store.nodes.get(e.fParentId());return r?(i.push(r),this._getParentNodes(r,n,i)):i}static \u0275fac=function(n){return new(n||cd)};static \u0275prov=y({token:cd,factory:cd.\u0275fac})};return t=P([R(Lo)],t),t})(),Jr=class{nodeOrGroup;destroyRef;static fToken=Symbol("UpdateNodeWhenStateOrSizeChangedRequest");constructor(o,e){this.nodeOrGroup=o,this.destroyRef=e}},OV=(()=>{let t=class dd{_mediator=p(V);handle({nodeOrGroup:e,destroyRef:n}){let{hostElement:i,stateChanges:r}=e;new Mn(new vm(i),r).listen(n,()=>{this._mediator.execute(new Bi),this._isDragging()||(this._mediator.execute(new Po(e.fId(),"UpdateNodeWhenStateOrSizeChanged")),this._mediator.execute(new No(e)),this._mediator.execute(new Qr(e)))})}_isDragging(){return this._mediator.execute(new mi)}static \u0275fac=function(n){return new(n||dd)};static \u0275prov=y({token:dd,factory:dd.\u0275fac})};return t=P([R(Jr)],t),t})(),ea=class{instance;static fToken=Symbol("RemoveNodeFromStoreRequest");constructor(o){this.instance=o}},FV=(()=>{let t=class ud{_store=p(L);_mediator=p(V);handle({instance:e}){this._store.nodes.remove(e),this._mediator.execute(new fu(e.fId())),this._store.emitNodeChanges()}static \u0275fac=function(n){return new(n||ud)};static \u0275prov=y({token:ud,factory:ud.\u0275fac})};return t=P([R(ea)],t),t})(),NV=[sV,mV,TV,lV,SV,kV,IV,EV,DV,PV,MV,RV,OV,FV],AV=(()=>{let t=class pd{_mediator=p(V);_store=p(L);get _targets(){return this._store.inputs.getAll()}handle({source:e,pointer:n}){let i=this._getConnectableTargets(e),r=[];for(let a of i)r.push(this._mediator.execute(new $t(a)));return this._scheduleApplyCalculatedSides(r,n),r}_getConnectableTargets(e){if(e.hasConnectionLimits)return this._targets.filter(i=>e.canConnectTo(i));let n=this._targets.filter(i=>i.canBeConnected);return e.isSelfConnectable||(n=n.filter(i=>i.fNodeId!==e.fNodeId)),n}_scheduleApplyCalculatedSides(e,n){queueMicrotask(()=>this._applyCalculatedConnectableSides(e,n))}_applyCalculatedConnectableSides(e,n){for(let{connector:i}of e)qp(i.userFConnectableSide)&&(i.fConnectableSide=this._calculateByConnectedPositions(i,n))}_calculateByConnectedPositions(e,n){return this._mediator.execute(new Fo(e,n))}static \u0275fac=function(n){return new(n||pd)};static \u0275prov=y({token:pd,factory:pd.\u0275fac})};return t=P([R(Xr)],t),t})(),Qp=class{target;pointer;static fToken=Symbol("CalculateSourceConnectorsToConnectRequest");constructor(o,e){this.target=o,this.pointer=e}},LV=(()=>{let t=class hd{_mediator=p(V);_store=p(L);get _sources(){return this._store.outputs.getAll()}handle({target:e,pointer:n}){let i=this._getConnectableSources(e),r=[];for(let a of i)r.push(this._mediator.execute(new $t(a)));return this._scheduleApplyCalculatedSides(r,n),r}_getConnectableSources(e){return this._sources.filter(n=>{let i=n.canBeConnected;return i&&n.hasConnectionLimits&&(i=n.canConnectTo(e)),i})}_scheduleApplyCalculatedSides(e,n){queueMicrotask(()=>this._applyCalculatedConnectableSides(e,n))}_applyCalculatedConnectableSides(e,n){for(let{connector:i}of e)qp(i.userFConnectableSide)&&(i.fConnectableSide=this._calculateByConnectedPositions(i,n))}_calculateByConnectedPositions(e,n){return this._mediator.execute(new Fo(e,n))}static \u0275fac=function(n){return new(n||hd)};static \u0275prov=y({token:hd,factory:hd.\u0275fac})};return t=P([R(Qp)],t),t})(),Bo=class{connectors;static fToken=Symbol("MarkConnectableConnectorsRequest");constructor(o){this.connectors=o}},ht={DRAG_AND_DROP:{DRAGGING:"f-dragging",CONNECTIONS_DRAGGING:"f-connections-dragging"},GROUPING:{OVER_BOUNDARY:"f-grouping-over-boundary",DROP_ACTIVE:"f-grouping-drop-active"},CONNECTOR:{OUTPUT_CONNECTED:"f-node-output-connected",OUTPUT_NOT_CONNECTABLE:"f-node-output-not-connectable",INPUT_CONNECTED:"f-node-input-connected",INPUT_NOT_CONNECTABLE:"f-node-input-not-connectable",CONNECTABLE:"f-connector-connectable"}},BV=(()=>{let t=class fd{_store=p(L);handle({connectors:e}){this._store.flowHost.classList.add(ht.DRAG_AND_DROP.CONNECTIONS_DRAGGING),e.forEach(n=>this._markConnector(n))}_markConnector({hostElement:e}){e.classList.add(ht.CONNECTOR.CONNECTABLE)}static \u0275fac=function(n){return new(n||fd)};static \u0275prov=y({token:fd,factory:fd.\u0275fac})};return t=P([R(Bo)],t),t})(),ta=class{instance;static fToken=Symbol("RemoveConnectorFromStoreRequest");constructor(o){this.instance=o}},VV=(()=>{let t=class md{_store=p(L);_mediator=p(V);handle({instance:e}){switch(e.kind){case"input":this._removeInput(e);break;case"output":this._removeOutput(e);break;case"outlet":this._removeOutlet(e);break;default:throw new Error(`Unknown connector kind: ${e.kind}`)}}_removeInput(e){this._store.inputs.removeById(e.fId()),this._store.emitNodeChanges(),this._geometryUnregister(e)}_removeOutput(e){this._store.outputs.removeById(e.fId()),this._store.emitNodeChanges(),this._geometryUnregister(e)}_removeOutlet(e){this._store.outlets.removeById(e.fId()),this._store.emitNodeChanges(),this._geometryUnregister(e)}_geometryUnregister(e){this._mediator.execute(new kr(e.fId(),e.kind))}static \u0275fac=function(n){return new(n||md)};static \u0275prov=y({token:md,factory:md.\u0275fac})};return t=P([R(ta)],t),t})(),Vo=class{connectors;static fToken=Symbol("UnmarkConnectableConnectorsRequest");constructor(o){this.connectors=o}},zV=(()=>{let t=class _d{_store=p(L);handle({connectors:e}){this._store.flowHost.classList.remove(ht.DRAG_AND_DROP.CONNECTIONS_DRAGGING),e.forEach(n=>this._unmarkConnector(n))}_unmarkConnector({hostElement:e}){e.classList.remove(ht.CONNECTOR.CONNECTABLE)}static \u0275fac=function(n){return new(n||_d)};static \u0275prov=y({token:_d,factory:_d.\u0275fac})};return t=P([R(Vo)],t),t})(),HV=[iV,VV,oV,rV,LV,AV,aV,BV,zV],Jp=class{instance;static fToken=Symbol("AddFlowToStoreRequest");constructor(o){this.instance=o}},Ki=(function(t){return t.TOP_BOTTOM="TOP_BOTTOM",t.BOTTOM_TOP="BOTTOM_TOP",t.LEFT_RIGHT="LEFT_RIGHT",t.RIGHT_LEFT="RIGHT_LEFT",t})(Ki||{}),ri=(function(t){return t.MANUAL="manual",t.AUTO="auto",t})(ri||{});function qV(t){let o=[...t.nodes.map(vy),...t.groups.map(vy)],e=new Set(t.nodes.map(s=>s.id)),n=new Set(t.groups.map(s=>s.id)),i=new Map,r=new Map;for(let s of[...t.nodes,...t.groups]){for(let c of s.fOutputs)i.set(c.id,s.id);for(let c of s.fInputs)r.set(c.id,s.id)}let a=t.connections.reduce((s,c)=>{let u=i.get(c.fOutputId),f=r.get(c.fInputId);return!u||!f||s.push({source:u,target:f}),s},[]);return{nodes:o,connections:a,nodeIds:e,groupIds:n}}function vy(t){return{id:t.id,size:t.measuredSize?be({},t.measuredSize):t.size?be({},t.size):void 0}}var GV=1,Mh=(()=>{class t{_destroyRef=p(xt);_flows=new Map;_engine;constructor(){this._destroyRef.onDestroy(()=>{Array.from(this._flows.keys()).forEach(e=>this.unregisterFlow(e)),this._engine=void 0})}attachEngine(e){this._engine=e}registerFlow(e,n){let i=e.fId();this.unregisterFlow(i);let r={flow:e,store:n,nodeSignature:this._buildNodeSignature(n),connectionSignature:this._buildConnectionSignature(n),timeoutId:null,raf1:null,raf2:null,unsubs:[],runId:0,isApplying:!1};r.unsubs.push(n.nodesChanges$.listen(()=>this._handleNodesChanges(i)),n.connectionsChanges$.listen(()=>this._handleConnectionsChanges(i))),this._flows.set(i,r),this._engine?.getMode()===ri.AUTO&&this._scheduleRelayout(i)}unregisterFlow(e){let n=this._flows.get(e);n&&(n.unsubs.forEach(i=>i()),this._clearScheduledWork(n),this._flows.delete(e))}handleModeChanged(e){if(e===ri.AUTO)for(let n of this._flows.keys())this._scheduleRelayout(n)}async relayout(e){if(this._engine){if(e){let n=this._flows.get(e);n&&await this._relayoutRegisteredFlow(e,n);return}for(let[n,i]of this._flows.entries())await this._relayoutRegisteredFlow(n,i)}}_handleNodesChanges(e){let n=this._flows.get(e);if(!n||n.isApplying)return;let i=this._buildNodeSignature(n.store);i!==n.nodeSignature&&(n.nodeSignature=i,this._scheduleRelayout(e))}_handleConnectionsChanges(e){let n=this._flows.get(e);if(!n||n.isApplying)return;let i=this._buildConnectionSignature(n.store);i!==n.connectionSignature&&(n.connectionSignature=i,this._scheduleRelayout(e))}_scheduleRelayout(e){let n=this._flows.get(e);!n||!this._engine||this._engine.getMode()!==ri.AUTO||(n.timeoutId!==null&&clearTimeout(n.timeoutId),this._cancelAnimationFrames(n),n.timeoutId=setTimeout(()=>{n.timeoutId=null,this._runAfterNextPaint(n,()=>{this._relayoutFlowIfReady(e)})},GV))}async _relayoutFlowIfReady(e){let n=this._flows.get(e);if(!(!n||!this._engine||this._engine.getMode()!==ri.AUTO)){if(n.store.hasPendingProgressiveRender){this._scheduleRelayout(e);return}await this._relayoutRegisteredFlow(e,n)}}async _relayoutRegisteredFlow(e,n){if(!this._engine)return;let i=qV(n.flow.getState({measuredSize:!0})),r=++n.runId,a=await this._engine.calculate(i.nodes,i.connections,{flowId:e,mode:this._engine.getMode()}),s=this._flows.get(e);if(!(!s||s.runId!==r||!this._applyPositions(s.store,a.nodes).length)){s.isApplying=!0;try{s.flow.redraw(),this._emitWriteback(e,a.nodes,i.nodeIds,i.groupIds)}finally{queueMicrotask(()=>{let u=this._flows.get(e);u&&(u.isApplying=!1)})}}}_emitWriteback(e,n,i,r){let a=this._engine?.getWriteback();a&&a({flowId:e,nodes:n.filter(s=>i.has(s.id)),groups:n.filter(s=>r.has(s.id))})}_applyPositions(e,n){return n.filter(i=>{let r=e.nodes.get(i.id);return!r||U.isEqual(r._position,i.position)?!1:(r.position.set(be({},i.position)),!0)})}_buildNodeSignature(e){return e.nodes.getAll().map(n=>n.fId()).sort().join("|")}_buildConnectionSignature(e){return e.connections.getAll().map(n=>`${n.fId()}:${n.fOutputId()}:${n.fInputId()}`).sort().join("|")}_runAfterNextPaint(e,n){if(this._cancelAnimationFrames(e),typeof requestAnimationFrame!="function"){n();return}e.raf1=requestAnimationFrame(()=>{e.raf1=null,e.raf2=requestAnimationFrame(()=>{e.raf2=null,n()})})}_clearScheduledWork(e){e.timeoutId!==null&&(clearTimeout(e.timeoutId),e.timeoutId=null),this._cancelAnimationFrames(e)}_cancelAnimationFrames(e){e.raf1!==null&&typeof cancelAnimationFrame=="function"&&(cancelAnimationFrame(e.raf1),e.raf1=null),e.raf2!==null&&typeof cancelAnimationFrame=="function"&&(cancelAnimationFrame(e.raf2),e.raf2=null)}static \u0275fac=function(n){return new(n||t)};static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),rC=new ge("F_LAYOUT_OPTIONS");function aC(t,o){return t.reduce((e,n)=>{let i=o.get(n.id);return i&&e.push({id:n.id,position:i}),e},[])}var jV=new ge("F_LAYOUT"),eh=class{_controller=p(Mh);_config=p(rC,{optional:!0})??{};_interactiveOptions;_mode;_writeback;_defaultOptions;interactiveOptions;constructor(o){this._mode=this._config.mode??ri.MANUAL,this._writeback=this._config.writeback??null,this._defaultOptions=this.mergeOptions(o,this._config.options),this._interactiveOptions=X(this.mergeOptions(this._defaultOptions,{})),this.interactiveOptions=E(()=>this.mergeOptions(this._interactiveOptions(),{})),this._controller.attachEngine(this)}setMode(o){this._mode=o,this._controller.handleModeChanged(o)}getMode(){return this._mode}setWriteback(o){this._writeback=o}getWriteback(){return this._writeback}setInteractiveOptions(o){this._interactiveOptions.set(this.mergeOptions(this._interactiveOptions(),o))}relayout(o){return this._controller.relayout(o)}getProviderConfig(){return be({},this._config)}resolveLayoutOptions(o){let e=be({},o??{});return delete e.flowId,delete e.mode,this.mergeOptions(this._interactiveOptions(),e)}};function sC(t,o){return[Mh,t,{provide:jV,useExisting:t},{provide:rC,useValue:o??{}}]}var UV=(()=>{let t=class gd{_store=p(L);_layoutController=p(Mh,{optional:!0});handle({instance:e}){this._store.fFlow=e,this._layoutController?.registerFlow(e,this._store)}static \u0275fac=function(n){return new(n||gd)};static \u0275prov=y({token:gd,factory:gd.\u0275fac})};return t=P([R(Jp)],t),t})(),th=class{static fToken=Symbol("GetFlowRequest")},$V=(()=>{let t=class bd{_store=p(L);handle(e){let n=this._store.fFlow;if(!n)throw new Error("Flow not found in store");return n}static \u0275fac=function(n){return new(n||bd)};static \u0275prov=y({token:bd,factory:bd.\u0275fac})};return t=P([R(th)],t),t})(),nh=class{static fToken=Symbol("CalculateConnectionsStateRequest")},WV=(()=>{let t=class vd{_store=p(L);handle(e){return this._store.connections.getAll().map(this._mapToConnectionState)}_mapToConnectionState(e){return{id:e.fId(),fOutputId:e.fOutputId(),fInputId:e.fInputId(),fType:e.fType,fBehavior:e.fBehavior,isSelected:e.isSelected(),waypoints:e.fWaypoints()?.waypoints()||[],fInputSide:e.fInputSide(),fOutputSide:e.fOutputSide()}}static \u0275fac=function(n){return new(n||vd)};static \u0275prov=y({token:vd,factory:vd.\u0275fac})};return t=P([R(nh)],t),t})(),na=class{component;measuredSize;static fToken=Symbol("CalculateNodesStateRequest");constructor(o,e=!1){this.component=o,this.measuredSize=e}},KV=(()=>{let t=class yd{_store=p(L);_mediator=p(V);handle({component:e,measuredSize:n}){return this._store.nodes.getAll().filter(i=>i instanceof e).map(i=>{let r=n?this._mediator.execute(new it(i.hostElement)):null;return{id:i.fId(),parentId:i.fParentId()??void 0,position:be({},i._position),size:i._size?be({},i._size):void 0,measuredSize:r?{width:r.width,height:r.height}:void 0,rotate:i._rotate,fOutputs:this._getOutputs(i.hostElement),fInputs:this._getInputs(i.hostElement),isSelected:i.isSelected()}})}_getOutputs(e){return this._store.outputs.getAll().filter(n=>e.contains(n.hostElement)).map(n=>({id:n.fId(),fConnectableSide:n.fConnectableSide}))}_getInputs(e){return this._store.inputs.getAll().filter(n=>e.contains(n.hostElement)).map(n=>({id:n.fId(),fConnectableSide:n.fConnectableSide}))}static \u0275fac=function(n){return new(n||yd)};static \u0275prov=y({token:yd,factory:yd.\u0275fac})};return t=P([R(na)],t),t})(),ih=class{measuredSize;static fToken=Symbol("CalculateFlowStateRequest");constructor(o=!1){this.measuredSize=o}},YV=(()=>{let t=class Cd{_mediator=p(V);_store=p(L);get _canvas(){return this._store.fCanvas}get _transform(){return this._canvas.transform}get _canvasPosition(){return U.sum(this._transform.position,this._transform.scaledPosition)}handle({measuredSize:e}){return{position:this._canvasPosition,scale:this._canvas.transform.scale,nodes:this._mediator.execute(new na(Eh,e)),groups:this._mediator.execute(new na(Xm,e)),connections:this._mediator.execute(new nh)}}static \u0275fac=function(n){return new(n||Cd)};static \u0275prov=y({token:Cd,factory:Cd.\u0275fac})};return t=P([R(ih)],t),t})(),XV=[YV,KV,WV],oh=class{instance;static fToken=Symbol("RemoveFlowFromStoreRequest");constructor(o){this.instance=o}},ZV=(()=>{let t=class xd{_store=p(L);_layoutController=p(Mh,{optional:!0});handle({instance:e}){this._layoutController?.unregisterFlow(e.fId()),this._store.fFlow=void 0}static \u0275fac=function(n){return new(n||xd)};static \u0275prov=y({token:xd,factory:xd.\u0275fac})};return t=P([R(oh)],t),t})(),Dh=(()=>{class t{isNodesRendered=!1;isFullRendered=!1;static \u0275fac=function(n){return new(n||t)};static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),rh=class{static fToken=Symbol("NotifyNodesRenderedRequest")},P_=new ge("F_FLOW"),k_=class{},QV=(()=>{let t=class wd{_state=p(Dh);_fFlow=p(P_);handle(e){this._state.isNodesRendered||(this._state.isNodesRendered=!0,this._fFlow.fNodesRendered.emit(this._fFlow.fId()))}static \u0275fac=function(n){return new(n||wd)};static \u0275prov=y({token:wd,factory:wd.\u0275fac})};return t=P([R(rh)],t),t})(),ah=class{static fToken=Symbol("NotifyFullRenderedRequest")},JV=(()=>{let t=class Td{_state=p(Dh);_fFlow=p(P_);handle(e){this._state.isFullRendered||(this._state.isFullRendered=!0,this._fFlow.fFullRendered.emit(this._fFlow.fId()),this._fFlow.fLoaded.emit(this._fFlow.fId()))}static \u0275fac=function(n){return new(n||Td)};static \u0275prov=y({token:Td,factory:Td.\u0275fac})};return t=P([R(ah)],t),t})(),ia=class{targetConnectionsRevision;targetNodesRevision;callback;destroyRef;static fToken=Symbol("WaitForConnectionsRenderedRequest");constructor(o,e,n,i){this.targetConnectionsRevision=o,this.targetNodesRevision=e,this.callback=n,this.destroyRef=i}},e8=(()=>{let t=class Sd{_store=p(L);handle({targetConnectionsRevision:e,targetNodesRevision:n,callback:i,destroyRef:r}){if(this._store.connectionsRenderedRevision>=e&&this._store.connectionsRenderedNodesRevision>=n){i();return}let a=this._store.connectionsRenderedChanges$.listen(()=>{this._store.connectionsRenderedRevision<e||this._store.connectionsRenderedNodesRevision<n||(a(),i())});r.onDestroy(a)}static \u0275fac=function(n){return new(n||Sd)};static \u0275prov=y({token:Sd,factory:Sd.\u0275fac})};return t=P([R(ia)],t),t})(),sh=class{static fToken=Symbol("ResetRenderLifecycleRequest")},t8=(()=>{let t=class kd{_state=p(Dh);handle(e){this._state.isNodesRendered=!1,this._state.isFullRendered=!1}static \u0275fac=function(n){return new(n||kd)};static \u0275prov=y({token:kd,factory:kd.\u0275fac})};return t=P([R(sh)],t),t})(),lh=class{destroyRef;static fToken=Symbol("QueueConnectionRedrawRequest");constructor(o){this.destroyRef=o}},lC=(()=>{class t{isWaitingForViewportAnimation=!1;pendingRedraw=!1;static \u0275fac=function(n){return new(n||t)};static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),n8=(()=>{let t=class Id{_state=p(lC);_store=p(L);_mediator=p(V);handle(e){if(this._state.pendingRedraw=!0,this._state.isWaitingForViewportAnimation)return;this._state.isWaitingForViewportAnimation=!0;let n=this._store.viewportAnimationChanges$.listen(()=>{if(this._store.isViewportAnimating)return;let i=this._state.pendingRedraw;n(),this._state.isWaitingForViewportAnimation=!1,this._state.pendingRedraw=!1,i&&this._mediator.execute(new Rr)});e.destroyRef.onDestroy(n)}static \u0275fac=function(n){return new(n||Id)};static \u0275prov=y({token:Id,factory:Id.\u0275fac})};return t=P([R(lh)],t),t})(),i8=[UV,$V,...XV,ZV,Dh,QV,JV,e8,t8,lC,n8],ch=class{static fToken=Symbol("ClearSelectionRequest")},o8=(()=>{let t=class Ed{_dragContext=p(he);handle(e){this._dragContext.selectedItems.forEach(n=>n.unmarkAsSelected()),this._dragContext.selectedItems=[],this._dragContext.isSelectedChanged=!0}static \u0275fac=function(n){return new(n||Ed)};static \u0275prov=y({token:Ed,factory:Ed.\u0275fac})};return t=P([R(ch)],t),t})(),dh=class{static fToken=Symbol("CalculateSelectableItemsRequest")},r8=(()=>{let t=class Md{_mediator=p(V);_store=p(L);_dragContext=p(he);get _nodes(){return this._store.nodes.getAll()}get _connections(){return this._store.connections.getAll()}handle(){return[...this._nodeRects(),...this._connectionRects()].filter(e=>!this._dragContext.selectedItems.includes(e.element))}_nodeRects(){return this._nodes.filter(e=>!e.fSelectionDisabled()).map(e=>({element:e,fRect:this._mediator.execute(new it(e.hostElement))}))}_connectionRects(){return this._connections.filter(e=>!e.fSelectionDisabled()).map(e=>({element:e,fRect:this._mediator.execute(new it(e.boundingElement))}))}static \u0275fac=function(n){return new(n||Md)};static \u0275prov=y({token:Md,factory:Md.\u0275fac})};return t=P([R(dh)],t),t})(),oa=class{static fToken=Symbol("GetCurrentSelectionRequest")},a8=(()=>{let t=class Dd{_dragContext=p(he);handle(){return{fNodeIds:this._getSelectedNodes(),fGroupIds:this._getSelectedGroups(),fConnectionIds:this._getSelectedConnections()}}_getSelectedNodes(){return this._dragContext.selectedItems.filter(e=>e.hostElement.classList.contains("f-node")).map(e=>e.hostElement.dataset.fNodeId)}_getSelectedGroups(){return this._dragContext.selectedItems.filter(e=>e.hostElement.classList.contains("f-group")).map(e=>e.hostElement.dataset.fGroupId)}_getSelectedConnections(){return this._dragContext.selectedItems.filter(e=>!e.hostElement.classList.contains("f-node")&&!e.hostElement.classList.contains("f-group")).map(e=>e.hostElement.id)}static \u0275fac=function(n){return new(n||Dd)};static \u0275prov=y({token:Dd,factory:Dd.\u0275fac})};return t=P([R(oa)],t),t})(),uh=class{nodes;connections;isSelectedChanged;static fToken=Symbol("SelectRequest");constructor(o,e,n=!0){this.nodes=o,this.connections=e,this.isSelectedChanged=n}},s8=(()=>{let t=class Pd{_dragContext=p(he);_store=p(L);handle(e){this._dragContext.selectedItems.forEach(n=>{n.unmarkAsSelected()}),this._dragContext.selectedItems=[],e.nodes.forEach(n=>{let i=this._store.nodes.get(n);i&&(i.markAsSelected(),this._dragContext.selectedItems.push(i))}),e.connections.forEach(n=>{let i=this._store.connections.get(n);i&&(i.markAsSelected(),this._dragContext.selectedItems.push(i))}),this._dragContext.isSelectedChanged=e.isSelectedChanged}static \u0275fac=function(n){return new(n||Pd)};static \u0275prov=y({token:Pd,factory:Pd.\u0275fac})};return t=P([R(uh)],t),t})(),ph=class{static fToken=Symbol("SelectAllRequest")},l8=(()=>{let t=class Rd{_dragSession=p(he);_store=p(L);handle(e){this._dragSession.selectedItems.forEach(n=>{n.unmarkAsSelected()}),this._dragSession.selectedItems=[],this._store.nodes.getAll().forEach(n=>{n.markAsSelected(),this._dragSession.selectedItems.push(n)}),this._store.connections.getAll().forEach(n=>{n.markAsSelected(),this._dragSession.selectedItems.push(n)}),this._dragSession.isSelectedChanged=!0}static \u0275fac=function(n){return new(n||Rd)};static \u0275prov=y({token:Rd,factory:Rd.\u0275fac})};return t=P([R(ph)],t),t})(),zo=class{nodeOrGroup;static fToken=Symbol("SelectAndUpdateNodeLayerRequest");constructor(o){this.nodeOrGroup=o}},hh=class{fItemsContainer;allElements;elementsThatShouldBeInFront;targetIndex;static fToken=Symbol("MoveFrontElementsBeforeTargetElementRequest");constructor(o,e,n,i){this.fItemsContainer=o,this.allElements=e,this.elementsThatShouldBeInFront=n,this.targetIndex=i}},c8=(()=>{let t=class Od{handle(e){let n=[];for(let i=e.targetIndex+1;i<e.allElements.length;i++){let r=e.allElements[i];e.elementsThatShouldBeInFront.includes(r)||n.push(r)}n.forEach(i=>{e.fItemsContainer.removeChild(i),e.fItemsContainer.insertBefore(i,e.allElements[e.targetIndex])})}static \u0275fac=function(n){return new(n||Od)};static \u0275prov=y({token:Od,factory:Od.\u0275fac})};return t=P([R(hh)],t),t})(),$i=class{item;itemContainer;static fToken=Symbol("UpdateItemAndChildrenLayersRequest");constructor(o,e){this.item=o,this.itemContainer=e}},Ho=class{nodeOrGroupId;static fToken=Symbol("GetDeepChildrenNodesAndGroupsRequest");constructor(o){this.nodeOrGroupId=o}},d8=(()=>{let t=class Fd{_store=p(L);handle({nodeOrGroupId:e}){return this._getChildrenNodes(e)}_getChildrenNodes(e,n=new Set){if(n.has(e))throw new Error("Circular reference detected in the node hierarchy. Node id: "+e);n.add(e);let i=this._store.nodes.getAll().filter(r=>r.fParentId()===e);return i.reduce((r,a)=>r.concat(this._getChildrenNodes(a.fId(),n)),i)}static \u0275fac=function(n){return new(n||Fd)};static \u0275prov=y({token:Fd,factory:Fd.\u0275fac})};return t=P([R(Ho)],t),t})(),u8=(()=>{let t=class Nd{_store=p(L);_mediator=p(V);get _canvas(){return this._store.fCanvas}get _groupsContainer(){return this._canvas.fGroupsContainer().nativeElement}get _nodesContainer(){return this._canvas.fNodesContainer().nativeElement}get _connectionsContainer(){return this._canvas.fConnectionsContainer().nativeElement}handle(e){switch(e.itemContainer){case this._groupsContainer:this._handleGroup(e);break;case this._nodesContainer:this._handleNode(e);break;case this._connectionsContainer:this._handleConnection(e);break;default:throw new Error("Unknown container")}}_handleGroup(e){let n=this._getChildrenNodesAndGroups(e.item.fId()),i=this._getChildrenGroups(n);this._updateLayers(this._groupsContainer,e.item.hostElement,i);let r=this._getChildrenNodes(n);r.length&&this._updateLayers(this._nodesContainer,r[0],r)}_handleNode(e){let n=this._getChildrenNodesAndGroups(e.item.fId()),i=this._getChildrenNodes(n);this._updateLayers(e.itemContainer,e.item.hostElement,i)}_handleConnection(e){this._updateLayers(e.itemContainer,e.item.hostElement,[])}_updateLayers(e,n,i){let r=Array.from(e.children),a=r.findIndex(s=>s===n);this._isAnythingNeedToBeMoved(r,a,i)&&this._mediator.execute(new hh(e,r,i,a))}_isAnythingNeedToBeMoved(e,n,i){for(let r=n+1;r<e.length;r++)if(!i.includes(e[r]))return!0;return!1}_getChildrenGroups(e){let n=Array.from(this._groupsContainer.children);return e.filter(i=>this._groupsContainer.contains(i)).sort((i,r)=>n.indexOf(i)-n.indexOf(r))}_getChildrenNodes(e){let n=Array.from(this._nodesContainer.children);return e.filter(i=>this._nodesContainer.contains(i)).sort((i,r)=>n.indexOf(i)-n.indexOf(r))}_getChildrenNodesAndGroups(e){return this._mediator.execute(new Ho(e)).map(n=>n.hostElement)}static \u0275fac=function(n){return new(n||Nd)};static \u0275prov=y({token:Nd,factory:Nd.\u0275fac})};return t=P([R($i)],t),t})(),p8=(()=>{let t=class Ad{_dragSession=p(he);_mediator=p(V);handle({nodeOrGroup:e}){this._selectNodeIfNotSelected(e),this._mediator.execute(new $i(e,e.hostElement.parentElement))}_selectNodeIfNotSelected(e){e.fSelectionDisabled()||this._dragSession.selectedItems.includes(e)||(this._dragSession.selectedItems.push(e),e.markAsSelected(),this._dragSession.isSelectedChanged=!0)}static \u0275fac=function(n){return new(n||Ad)};static \u0275prov=y({token:Ad,factory:Ad.\u0275fac})};return t=P([R(zo)],t),t})(),h8=[o8,r8,a8,s8,l8,p8],fh=class{static fToken=Symbol("ResetZoomRequest")},f8=(()=>{let t=class Ld{_store=p(L);get _canvas(){return this._store.fCanvas}handle(e){this._canvas.resetScale(),this._canvas.redraw(),this._canvas.emitCanvasChangeEvent()}static \u0275fac=function(n){return new(n||Ld)};static \u0275prov=y({token:Ld,factory:Ld.\u0275fac})};return t=P([R(fh)],t),t})(),mh=class{position;step;direction;animate;static fToken=Symbol("SetZoomRequest");constructor(o,e,n,i=!1){this.position=o,this.step=e,this.direction=n,this.animate=i}},m8=new Set(["drag-node","drag-external-item","resize-node","rotate-node","create-connection","reassign-connection","drag-connection-waypoint","assign-to-container"]),_8=new Set(["drag-canvas","selection-area"]),g8=(()=>{let t=class Bd{_mediator=p(V);_store=p(L);_dragContext=p(he,{optional:!0});get _flowHost(){return this._store.flowHost}get _canvas(){return this._store.fCanvas}get _zoomComponent(){return this._store.instances.get(Ye.ZOOM)}get _isDragStarted(){return this._mediator.execute(new mi)}handle(e){if(!this._zoomComponent)return;let n=this._canvas.transform.scale,i=this._clamp(n+e.step*e.direction);if(i===n)return;let r=this._castPositionToFlow(e.position);if(this._isDragStarted){let a=this._getDragZoomMode();if(a==="blocked")return;a==="rebase"&&this._rebaseDragContext(r,i)}this._canvas.setScale(i,r),e.animate?this._canvas.redrawWithAnimation():this._canvas.redraw(),this._canvas.emitCanvasChangeEvent()}_clamp(e){return Math.max(this._zoomComponent?.minimum||1,Math.min(e,this._zoomComponent?.maximum||1))}_castPositionToFlow(e){return ce.fromPoint(e).elementTransform(this._flowHost)}_getDragZoomMode(){if(this._dragContext?.isEmpty())return"blocked";let e=!1;for(let n of this._dragContext?.draggableItems??[]){let i=n.getEvent().kind;if(m8.has(i)){e=!0;continue}if(!_8.has(i))return"blocked"}return e?"rebase":"direct"}_rebaseDragContext(e,n){if(!this._dragContext)return;let i=this._dragContext.onPointerDownScale;if(!i||i===n){this._dragContext.onPointerDownScale=n;return}let r=1/n-1/i;this._dragContext.onPointerDownPosition=ce.fromPoint(this._dragContext.onPointerDownPosition).add(ce.fromPoint(e).mult(r)),this._dragContext.onPointerDownScale=n}static \u0275fac=function(n){return new(n||Bd)};static \u0275prov=y({token:Bd,factory:Bd.\u0275fac})};return t=P([R(mh)],t),t})(),b8=[f8,g8],_h=class{static fToken=Symbol("MinimapDrawNodesRequest")},v8=(()=>{let t=class Vd{_browser=p(at);_store=p(L);handle(e){let n=this._store.fFlow,i=this._store.fCanvas;return!n||!i?[]:this._store.nodes.getAll().map(a=>this._renderNode(a,n,i))}_renderNode(e,n,i){let r=Io("rect",this._browser);nm(this._nodeRect(e,n,i),r);let a=e instanceof Eh;return r.classList.add("f-component",a?"f-minimap-node":"f-minimap-group"),r.classList.add(...this._minimapClasses(e)),e.isSelected()&&r.classList.add("f-selected"),r}_nodeRect(e,n,i){let r=te.elementTransform(te.fromElement(e.hostElement),n.hostElement);return te.div(r,i.transform.scale)}_minimapClasses(e){let n=e.fMinimapClass();return Array.isArray(n)?n:[n]}static \u0275fac=function(n){return new(n||Vd)};static \u0275prov=y({token:Vd,factory:Vd.\u0275fac})};return t=P([R(_h)],t),t})(),gh=class{svg;minSize;static fToken=Symbol("MinimapCalculateViewportRequest");constructor(o,e){this.svg=o,this.minSize=e}},y8=(()=>{let t=class zd{_mediator=p(V);_store=p(L);handle({svg:e,minSize:n}){let i=this._store.fFlow,r=this._store.fCanvas;if(!i||!r)return{scale:1,viewBox:te.initialize(0,0,0,0)};let a=this._contentRectInMinimapSpace(i,r,n),s=this._minimapRectInFlowSpace(e,i),c=this._viewportScale(a,s),u=this._viewportViewBox(a,s,c);return{scale:c,viewBox:u}}_contentRectInMinimapSpace(e,n,i){let r=this._nodesBoundingBox(),a=te.elementTransform(r,e.hostElement),s=te.div(a,n.transform.scale);return zv(s,i)}_nodesBoundingBox(){return this._mediator.execute(new Ao)??te.initialize(0,0,0,0)}_minimapRectInFlowSpace(e,n){return te.elementTransform(te.fromElement(e),n.hostElement)}_viewportScale(e,n){let i=n.width||1,r=n.height||1;return Math.max(e.width/i,e.height/r)}_viewportViewBox(e,n,i){let r=this._viewportSize(n,i),a=e.x-(r.width-e.width)/2,s=e.y-(r.height-e.height)/2;return te.initialize(a,s,r.width,r.height)}_viewportSize(e,n){return Dt.initialize(e.width*n||0,e.height*n||0)}static \u0275fac=function(n){return new(n||zd)};static \u0275prov=y({token:zd,factory:zd.\u0275fac})};return t=P([R(gh)],t),t})(),bh=class{static fToken=Symbol("MinimapCalculateViewRectRequest")},C8=(()=>{let t=class Hd{_store=p(L);handle(e){let n=this._store.fFlow,i=this._store.fCanvas;if(!n||!i)return te.initialize();let r=te.div(te.fromElement(n.hostElement),i.transform.scale);return r.x=0,r.y=0,r}static \u0275fac=function(n){return new(n||Hd)};static \u0275prov=y({token:Hd,factory:Hd.\u0275fac})};return t=P([R(bh)],t),t})(),vh=class{element;scale;viewBox;constructor(o,e=1,n=te.initialize(0,0,0,0)){this.element=o,this.scale=e,this.viewBox=n}},x8=[v8,y8,C8],yh=class{position;static fToken=Symbol("GetNormalizedPointRequest");constructor(o){this.position=o}},w8=(()=>{let t=class qd{_store=p(L);handle({position:e}){return Go(e,this._store.flowHost,this._store.transform)}static \u0275fac=function(n){return new(n||qd)};static \u0275prov=y({token:qd,factory:qd.\u0275fac})};return t=P([R(yh)],t),t})(),Ch=class{static fToken=Symbol("SortNodeLayersRequest")},T8=(()=>{let t=class Gd{_store=p(L);_mediator=p(V);_browser=p(at);get _canvas(){return this._store.fCanvas}get _groupsContainer(){return this._canvas.fGroupsContainer().nativeElement}get _nodesContainer(){return this._canvas.fNodesContainer().nativeElement}get _fNodeElements(){return Array.from(this._nodesContainer.children)}handle(e){this._getGroups().forEach(n=>{this._moveChildrenNodes(this._getSortedChildrenNodes(n))})}_getGroups(){return this._store.nodes.getAll().filter(e=>this._groupsContainer.contains(e.hostElement))}_getSortedChildrenNodes(e){let n=this._fNodeElements;return this._getChildrenNodes(e.fId()).sort((i,r)=>n.indexOf(i)-n.indexOf(r))}_getChildrenNodes(e){return this._mediator.execute(new Ho(e)).filter(n=>this._nodesContainer.contains(n.hostElement)).map(n=>n.hostElement)}_moveChildrenNodes(e){let n=this._browser.document.createDocumentFragment();e.forEach(i=>{n.appendChild(i)}),this._nodesContainer.appendChild(n)}static \u0275fac=function(n){return new(n||Gd)};static \u0275prov=y({token:Gd,factory:Gd.\u0275fac})};return t=P([R(Ch)],t),t})(),ra=class{itemsContainer;static fToken=Symbol("SortItemsByParentRequest");constructor(o){this.itemsContainer=o}},S8=(()=>{let t=class jd{_store=p(L);_browser=p(at);handle({itemsContainer:e}){let n=Array.from(e.children);if(n.length<2)return;let i=this._buildPositions(n),r=this._store.nodes.getAll().filter(c=>e.contains(c.hostElement));if(r.length<2||!r.some(c=>!!c.fParentId()))return;let a=this._buildChildrenByParentId(r),s=new Map;for(let c of r){let u=this._getSortedChildrenBeforeParent(e,i,c,a,s);u.length&&this._moveBeforeNextSibling(e,u,c.hostElement.nextElementSibling)}}_buildPositions(e){let n=new Map;for(let i=0;i<e.length;i++)n.set(e[i],i);return n}_getSortedChildrenBeforeParent(e,n,i,r,a){let s=n.get(i.hostElement);if(s===void 0)return[];let c=this._getDeepChildren(i.fId(),r,a);if(!c.length)return[];let u=[];for(let f of c){let g=f.hostElement;if(!e.contains(g))continue;let C=n.get(g);C===void 0||C>=s||u.push(g)}return u.sort((f,g)=>(n.get(f)??0)-(n.get(g)??0)),u}_buildChildrenByParentId(e){let n=new Map;for(let i of e){let r=i.fParentId();if(!r)continue;let a=n.get(r)??[];a.push(i),n.set(r,a)}return n}_getDeepChildren(e,n,i){let r=i.get(e);if(r)return r;let a=[],s=[...n.get(e)??[]],c=new Set([e]);for(;s.length;){let u=s.pop();if(!u)continue;let f=u.fId();if(c.has(f))continue;c.add(f),a.push(u);let g=n.get(f);g?.length&&s.push(...g)}return i.set(e,a),a}_moveBeforeNextSibling(e,n,i){let r=this._browser.document.createDocumentFragment();for(let a of n)r.appendChild(a);e.insertBefore(r,i)}static \u0275fac=function(n){return new(n||jd)};static \u0275prov=y({token:jd,factory:jd.\u0275fac})};return t=P([R(ra)],t),t})(),xh=class{static fToken=Symbol("SortItemLayersRequest")},k8=(()=>{let t=class Ud{_store=p(L);_mediator=p(V);get _canvas(){return this._store.fCanvas}handle(e){if(!this._canvas)return;let n=this._store.nodes.getAll();n.length<2||!n.some(i=>!!i.fParentId())||(this._mediator.execute(new ra(this._canvas.fGroupsContainer().nativeElement)),this._mediator.execute(new Ch),this._mediator.execute(new ra(this._canvas.fNodesContainer().nativeElement)))}static \u0275fac=function(n){return new(n||Ud)};static \u0275prov=y({token:Ud,factory:Ud.\u0275fac})};return t=P([R(xh)],t),t})();function Io(t,o){return o.document.createElementNS("http://www.w3.org/2000/svg",t)}function ln(t,o){return o(t)}function vn(t){return!0}function I8(){return/android|iPad|iPhone|iPod/i.test(navigator.userAgent||navigator.vendor||window.opera)}var E8=[...KL,...nV,...LL,...HV,...xV,...i8,...NV,...h8,...b8,...x8,...s7,d8,l7,p7,w8,k8,S8,T8,u8,c8],M8=0,cC=(()=>{class t{_destroyRef=p(xt);_elementReference=p(Ze);_fBrowser=p(at);_stateChanges=new sn;get hostElement(){return this._elementReference.nativeElement}id=B(`f-pattern-${M8++}`);vColor=B("rgba(0,0,0,0.1)");hColor=B("rgba(0,0,0,0.1)");vSize=B(20,{transform:xe});hSize=B(20,{transform:xe});_transform=ii.default();_position=U.initialize();_size=Dt.initialize(this.hSize(),this.vSize());_pattern;_vLine;_hLine;constructor(){this._createPattern()}_createPattern(){this._pattern=Io("pattern",this._fBrowser),this._pattern.setAttribute("patternUnits","userSpaceOnUse"),this.hostElement.appendChild(this._pattern),this._vLine=Io("line",this._fBrowser),this._pattern.appendChild(this._vLine),this._hLine=Io("line",this._fBrowser),this._pattern.appendChild(this._hLine)}ngOnInit(){this._listenStateChanges()}_listenStateChanges(){new Mn(this._stateChanges).pipe(wh()).listen(this._destroyRef,()=>this._redraw())}ngOnChanges(e){(e.vSize||e.hSize||e.vColor||e.hColor)&&this._refresh()}_redraw(){this._calculatePattern(),this._redrawPattern(),this._redrawLine(this._vLine,this.vColor(),this._size.width,0,this._size.width,this._size.height),this._redrawLine(this._hLine,this.hColor(),0,this._size.height,this._size.width,this._size.height)}_calculatePattern(){this._position.x=this._transform.position.x+this._transform.scaledPosition.x,this._position.y=this._transform.position.y+this._transform.scaledPosition.y,this._size=Dt.initialize(this.hSize()*this._transform.scale,this.vSize()*this._transform.scale)}_redrawPattern(){this._pattern.setAttribute("x",`${this._position.x}`),this._pattern.setAttribute("y",`${this._position.y}`),this._pattern.setAttribute("width",`${this._size.width}`),this._pattern.setAttribute("height",`${this._size.height}`)}_redrawLine(e,n,i,r,a,s){e.setAttribute("stroke",`${n}`),e.setAttribute("x1",`${i}`),e.setAttribute("x2",`${a}`),e.setAttribute("y1",`${r}`),e.setAttribute("y2",`${s}`)}setTransform(e){this._transform=e,this._refresh()}_refresh(){this._stateChanges.notify()}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=z({type:t,selectors:[["f-rect-pattern"]],hostVars:1,hostBindings:function(n,i){n&2&&O("id",i.id)},inputs:{id:[1,"id"],vColor:[1,"vColor"],hColor:[1,"hColor"],vSize:[1,"vSize"],hSize:[1,"hSize"]},features:[we([{provide:fm,useExisting:t}]),so],decls:0,vars:0,template:function(n,i){},encapsulation:2,changeDetection:0})}return t})();var D8=new ge("F_BACKGROUND"),P8=(()=>{class t{hostElement=p(Ze).nativeElement;static \u0275fac=function(n){return new(n||t)};static \u0275dir=je({type:t,standalone:!1})}return t})(),dC=(()=>{class t extends P8{_mediator=p(V);fBackgroundPattern=Za(fm);ngOnInit(){this._mediator.execute(new ci(Ye.BACKGROUND,this))}ngAfterContentInit(){this._mediator.execute(new $d(this.fBackgroundPattern()))}setTransform(e){this.fBackgroundPattern()?.setTransform(e)}ngOnDestroy(){this._mediator.execute(new di(Ye.BACKGROUND))}static \u0275fac=(()=>{let e;return function(i){return(e||(e=G(t)))(i||t)}})();static \u0275cmp=z({type:t,selectors:[["f-background"]],contentQueries:function(n,i,r){n&1&&Tf(r,i.fBackgroundPattern,fm,5),n&2&&Ht()},hostAttrs:[1,"f-component","f-background"],features:[we([{provide:D8,useExisting:t}]),Z],ngContentSelectors:dL,decls:2,vars:0,template:function(n,i){n&1&&(mn(),$(),re(0,"svg"),$e(1),fe())},styles:["[_nghost-%COMP%]{position:absolute;width:100%;height:100%;left:0;top:0;transform-origin:0 0;pointer-events:none}[_nghost-%COMP%] svg[_ngcontent-%COMP%]{width:100%;height:100%}"],changeDetection:0})}return t})();var I_=class{position;scale;constructor(o,e){this.position=o,this.scale=e}},R8=new ge("F_CANVAS"),O8=(()=>{class t{transform=ii.default();_fCanvasChange=new sn;destroyRef=p(xt);getPosition(){return this.transform.position}setPosition(e){this.transform.position=e}emitCanvasChangeEvent(){this._fCanvasChange.notify()}subscribeOnCanvasChange(){new Mn(this._fCanvasChange).pipe(Wd(this.debounce())).listen(this.destroyRef,()=>{this.fCanvasChange.emit(new I_(U.sum(this.transform.position,this.transform.scaledPosition),this.transform.scale))})}static \u0275fac=function(n){return new(n||t)};static \u0275dir=je({type:t,standalone:!1})}return t})(),aa=(()=>{class t extends O8{_mediator=p(V);_componentsStore=p(L);_elementReference=p(Ze);_injector=p(dt);_flowId;fCanvasChange=et();position=B(U.initialize(),{transform:U.castToPoint});scale=B(1,{transform:xe});debounceTime=B(0,{transform:xe});debounce=E(()=>this.debounceTime()<0?0:this.debounceTime());get hostElement(){return this._elementReference.nativeElement}fGroupsContainer=nt.required("fGroupsContainer");fNodesContainer=nt.required("fNodesContainer");fConnectionsContainer=nt.required("fConnectionsContainer");get flowId(){return this._flowId||""}ngOnInit(){this._flowId=this._mediator.execute(new th).fId(),this._mediator.execute(new Yd(this)),this._positionChange(),this._scaleChange(),super.subscribeOnCanvasChange()}_positionChange(){de(()=>{this._mediator.execute(new Qd(this.transform,this.position()))},{injector:this._injector})}_scaleChange(){de(()=>{this._mediator.execute(new Jd(this.transform,this.scale()))},{injector:this._injector})}redraw(){this._mediator.execute(new Tr(this.transform)),this.hostElement.style.removeProperty("transition"),this.hostElement.style.transform=ii.toString(this.transform),this._mediator.execute(new li)}redrawWithAnimation(){this._mediator.execute(new Tr(this.transform)),this.hostElement.style.transition=`transform ${I8()?80:150}ms ease-in-out`,this.hostElement.style.transform=ii.toString(this.transform),yy(this.hostElement,()=>this.redraw())}centerGroupOrNode(e,n=!0){this._afterRedraw(()=>{this._mediator.execute(new Xd(e,n))})}fitToScreen(e=U.initialize(),n=!0){this._afterRedraw(()=>{this._mediator.execute(new Zd(e,n))})}resetScaleAndCenter(e=!0){this._afterRedraw(()=>{this._mediator.execute(new nu(e))})}getScale(){return this.transform.scale||1}setScale(e,n=U.initialize()){this._mediator.execute(new iu(e,n))}resetScale(){this._mediator.execute(new tu)}ngOnDestroy(){this._mediator.execute(new eu)}_afterRedraw(e){this._mediator.execute(new ia(this._componentsStore.connectionsRevision,this._componentsStore.nodesRevision,()=>lo(e,{injector:this._injector}),this.destroyRef))}static \u0275fac=(()=>{let e;return function(i){return(e||(e=G(t)))(i||t)}})();static \u0275cmp=z({type:t,selectors:[["f-canvas"]],viewQuery:function(n,i){n&1&&_n(i.fGroupsContainer,uL,5)(i.fNodesContainer,pL,5)(i.fConnectionsContainer,hL,5),n&2&&Ht(3)},hostAttrs:[1,"f-component","f-canvas"],inputs:{position:[1,"position"],scale:[1,"scale"],debounceTime:[1,"debounceTime"]},outputs:{fCanvasChange:"fCanvasChange"},features:[we([{provide:R8,useExisting:t}]),Z],ngContentSelectors:mL,decls:12,vars:0,consts:[["fGroupsContainer",""],["fConnectionsContainer",""],["fNodesContainer",""],[1,"f-connections-container"]],template:function(n,i){n&1&&(mn(fL),Ka(0),re(1,"div",null,0),$e(3),fe(),re(4,"div",3,1),$e(6,1),$e(7,2),$e(8,3),fe(),re(9,"div",null,2),$e(11,4),fe(),Ya())},styles:["[_nghost-%COMP%]{position:absolute;overflow:visible;width:100%;height:100%;left:0;top:0;transform-origin:0 0;pointer-events:none}.f-canvas-dragging[_nghost-%COMP%], .canvas-dragging[_nghost-%COMP%]{transform:translateZ(0)}.f-connections-container[_ngcontent-%COMP%]{position:absolute;z-index:2}"],changeDetection:0})}return t})();var F8=0,uC=(()=>{class t extends G6{fId=B(`f-connection-${F8++}`,{alias:"fConnectionId"});fOutputId=B("",{transform:e=>Oo(e)||""});fInputId=B("",{transform:e=>Oo(e)||""});fRadius=8;fOffset=12;fBehavior=ai.FIXED;fType=To.STRAIGHT;fSelectionDisabled=B(!1,{transform:j});fReassignableStart=B(!1,{transform:j});fDraggingDisabled=B(!1,{alias:"fReassignDisabled",transform:j});fInputSide=B(Ke.DEFAULT,{transform:e=>wo(e,"fInputSide",Ke)});fOutputSide=B(Ke.DEFAULT,{transform:e=>wo(e,"fOutputSide",Ke)});get boundingElement(){return this.fPath().hostElement}_mediator=p(V);ngOnInit(){this._mediator.execute(new ru(this))}ngOnChanges(){this._mediator.execute(new Bi)}ngOnDestroy(){this._mediator.execute(new Du(this))}static \u0275fac=(()=>{let e;return function(i){return(e||(e=G(t)))(i||t)}})();static \u0275cmp=z({type:t,selectors:[["f-connection"]],hostAttrs:[1,"f-component","f-connection"],hostVars:5,hostBindings:function(n,i){n&2&&(O("id",i.fId()),se("f-connection-selection-disabled",i.fSelectionDisabled())("f-connection-reassign-disabled",i.fDraggingDisabled()))},inputs:{fId:[1,"fConnectionId","fId"],fOutputId:[1,"fOutputId"],fInputId:[1,"fInputId"],fRadius:[2,"fRadius","fRadius",xe],fOffset:[2,"fOffset","fOffset",xe],fBehavior:[2,"fBehavior","fBehavior",e=>wo(e,"fBehavior",ai)],fType:"fType",fSelectionDisabled:[1,"fSelectionDisabled"],fReassignableStart:[1,"fReassignableStart"],fDraggingDisabled:[1,"fReassignDisabled","fDraggingDisabled"],fInputSide:[1,"fInputSide"],fOutputSide:[1,"fOutputSide"]},exportAs:["fComponent"],standalone:!1,features:[we([{provide:Th,useExisting:t}]),Z,so],ngContentSelectors:gL,decls:15,vars:6,consts:[["defs",""],["xmlns","http://www.w3.org/2000/svg"],[1,"f-connection-group"],["fConnectionGradientRenderer","",3,"fConnectionGradientRendererFor"],["fConnectionSelection",""],["f-connection-path","",3,"useGradient"],["f-connection-drag-handle-start","","r","8"],["f-connection-drag-handle-end","","r","8"]],template:function(n,i){if(n&1&&(mn(_L),$(),h(0,"svg",1),N(1,"defs",null,0),$e(3),h(4,"g",2),M(5,bL,1,1,":svg:linearGradient",3),N(6,"path",4),h(7,"g"),N(8,"path",5),M(9,vL,1,0,":svg:circle",6),N(10,"circle",7),_()()(),$e(11,1),$e(12,2),$e(13,3),M(14,yL,1,0)),n&2){let r;l(5),D((r=i.fGradient())?5:-1,r),l(),O("d",i.path),l(2),m("useGradient",!!i.fGradient()),O("d",i.path),l(),D(i.fReassignableStart()?9:-1),l(5),D(i.fContents().length?14:-1)}},dependencies:[Dm,V6,z6,O6,B6],styles:["[_nghost-%COMP%]{pointer-events:none}[_nghost-%COMP%] svg[_ngcontent-%COMP%]{display:block;vertical-align:middle;overflow:visible!important;position:absolute}[_nghost-%COMP%] svg[_ngcontent-%COMP%] .f-connection-group[_ngcontent-%COMP%]{pointer-events:all}[_nghost-%COMP%] .f-connection-content[_ngcontent-%COMP%]{pointer-events:all}"],changeDetection:0})}return t})();var N8=new ge("F_MAGNETIC_LINES"),A8=(()=>{class t{hostElement=p(Ze).nativeElement;static \u0275fac=function(n){return new(n||t)};static \u0275dir=je({type:t,standalone:!1})}return t})();var pC=(()=>{class t extends A8{threshold=B(10,{transform:xe,alias:"fAlignThreshold"});_mediator=p(V);ngOnInit(){this._mediator.execute(new ci(Ye.MAGNETIC_LINES,this))}ngOnDestroy(){this._mediator.execute(new di(Ye.MAGNETIC_LINES))}static \u0275fac=(()=>{let e;return function(i){return(e||(e=G(t)))(i||t)}})();static \u0275cmp=z({type:t,selectors:[["f-line-alignment"]],hostAttrs:[1,"f-line-alignment","f-component"],inputs:{threshold:[1,"fAlignThreshold","threshold"]},exportAs:["fComponent"],standalone:!1,features:[we([{provide:N8,useExisting:t}]),Z],decls:0,vars:0,template:function(n,i){},styles:[CL]})}return t})();var um=(()=>{class t{fMinSize=B(1e3);_mediator=p(V);hostElement=p(Ze).nativeElement;model=new vh(this.hostElement);redraw(){let{scale:e,viewBox:n}=this._mediator.execute(new gh(this.hostElement,this.fMinSize()));this.model=new vh(this.hostElement,e,n),Hv(n,this.hostElement)}static \u0275fac=function(n){return new(n||t)};static \u0275dir=je({type:t,selectors:[["svg","fMinimapFlow",""]],inputs:{fMinSize:[1,"fMinSize"]}})}return t})(),pm=(()=>{class t{_mediator=p(V);_elementRef=p(Ze);hostElement=this._elementRef.nativeElement;redraw(){this.clear();let e=this._elementRef.nativeElement.ownerDocument.createDocumentFragment();this._mediator.execute(new _h).forEach(n=>{e.appendChild(n)}),this.hostElement.appendChild(e)}clear(){this.hostElement.replaceChildren()}static \u0275fac=function(n){return new(n||t)};static \u0275dir=je({type:t,selectors:[["g","fMinimapCanvas",""]]})}return t})(),hm=(()=>{class t{_mediator=p(V);hostElement=p(Ze).nativeElement;redraw(){nm(this._mediator.execute(new bh),this.hostElement)}static \u0275fac=function(n){return new(n||t)};static \u0275dir=je({type:t,selectors:[["rect","fMinimapView",""]],hostAttrs:[1,"f-component","f-minimap-view"]})}return t})(),L8=new ge("F_MINIMAP_BASE"),B8=(()=>{class t{hostElement=p(Ze).nativeElement;static \u0275fac=function(n){return new(n||t)};static \u0275dir=je({type:t,standalone:!1})}return t})(),hC=(()=>{class t extends B8{_destroyRef=p(xt);_mediator=p(V);_browser=p(at);_store=p(L);_canvas=nt.required(pm);_flow=nt.required(um);_minimapView=nt.required(hm);fMinSize=B(1e3);fNodeRenderLimit=B(1500,{transform:xe});get state(){return this._flow().model}ngOnInit(){this._mediator.execute(new ci(Ye.MINIMAP,this))}ngAfterViewInit(){this._listenTransformChanges()}_listenTransformChanges(){this._mediator.execute(new Kd).pipe(wh(),SL()).listen(this._destroyRef,()=>{this._redraw()})}_redraw(){if(this._browser.isBrowser()){if(this._isOverNodeRenderLimit()){this._canvas().clear();return}this._flow().redraw(),this._minimapView().redraw(),this._canvas().redraw()}}_isOverNodeRenderLimit(){let e=this.fNodeRenderLimit();return e>0&&this._store.nodes.size()>e}ngOnDestroy(){this._mediator.execute(new di(Ye.MINIMAP))}static \u0275fac=(()=>{let e;return function(i){return(e||(e=G(t)))(i||t)}})();static \u0275cmp=z({type:t,selectors:[["f-minimap"]],viewQuery:function(n,i){n&1&&_n(i._canvas,pm,5)(i._flow,um,5)(i._minimapView,hm,5),n&2&&Ht(3)},hostAttrs:[1,"f-component","f-minimap"],inputs:{fMinSize:[1,"fMinSize"],fNodeRenderLimit:[1,"fNodeRenderLimit"]},exportAs:["fComponent"],features:[we([{provide:L8,useExisting:t}]),Z],decls:3,vars:1,consts:[["fMinimapFlow","","width","100%","height","100%","fLockedContext","",3,"fMinSize"],["fMinimapCanvas",""],["fMinimapView","","x","0","y","0","width","100%","height","100%","stroke","none"]],template:function(n,i){n&1&&($(),h(0,"svg",0),N(1,"g",1)(2,"rect",2),_()),n&2&&m("fMinSize",i.fMinSize())},dependencies:[um,pm,hm],styles:["[_nghost-%COMP%]{display:block;position:absolute}[_nghost-%COMP%] svg[_ngcontent-%COMP%]{overflow:hidden}"],changeDetection:0})}return t})();var V8=(()=>{class t{hostElement=p(Ze).nativeElement;initialize(){this.hostElement.style.display="none"}static \u0275fac=function(n){return new(n||t)};static \u0275dir=je({type:t,standalone:!1})}return t})(),fC=(()=>{class t extends V8{_mediator=p(V);fTrigger=e=>e.shiftKey;ngOnInit(){this._mediator.execute(new ci(Ye.SELECTION_AREA,this)),super.initialize()}ngOnDestroy(){this._mediator.execute(new di(Ye.SELECTION_AREA))}static \u0275fac=(()=>{let e;return function(i){return(e||(e=G(t)))(i||t)}})();static \u0275cmp=z({type:t,selectors:[["f-selection-area"]],hostAttrs:[1,"f-selection-area","f-component"],inputs:{fTrigger:"fTrigger"},features:[Z],decls:0,vars:0,template:function(n,i){},styles:["[_nghost-%COMP%]{position:absolute}"]})}return t})();var z8=0,H8=120,sa=(()=>{class t extends k_{_destroyRef=p(xt);_mediator=p(V);_browser=p(at);_componentsStore=p(L);_cache=p(Dn);_injector=p(dt);fId=B(`f-flow-${z8++}`,{alias:"fFlowId"});fCache=B(!1,{transform:j});hostElement=p(Ze).nativeElement;fNodesRendered=et();fFullRendered=et();fLoaded=et();ngOnInit(){this._mediator.execute(new Jp(this)),this._listenCacheChanges()}ngAfterContentInit(){this._browser.isBrowser()&&(this._listenNodesChanges(),this._listenConnectionsChanges())}_listenCacheChanges(){de(()=>{this._cache.enabled=this.fCache()},{injector:this._injector})}_listenNodesChanges(){new Mn(this._componentsStore.nodesChanges$,this._componentsStore.progressiveRenderChanges$).pipe(wh(),Wd(H8),TL()).listen(this._destroyRef,()=>{this._mediator.execute(new mi)||this._componentsStore.hasPendingProgressiveRender||(this._mediator.execute(new xh),this._mediator.execute(new rh),this._mediator.execute(new ia(this._componentsStore.connectionsRevision+1,this._componentsStore.nodesRevision,()=>this._mediator.execute(new ah),this._destroyRef)),this._mediator.execute(new Bi))})}_listenConnectionsChanges(){this._mediator.execute(new So).listen(this._destroyRef,()=>{if(!this._mediator.execute(new mi)){if(this._componentsStore.isViewportAnimating){this._mediator.execute(new lh(this._destroyRef));return}this._mediator.execute(new Rr)}})}redraw(){this._mediator.execute(new Bi)}reset(){this._mediator.execute(new sh)}getNodesBoundingBox(){return this._mediator.execute(new Yp)}getSelection(){return this._mediator.execute(new oa)}getPositionInFlow(e){return this._mediator.execute(new yh(e))}getState(e){return this._mediator.execute(new ih(e?.measuredSize??!1))}selectAll(){this._mediator.execute(new So).pipe(Wv()).listen(this._destroyRef,()=>{this._mediator.execute(new ph)})}select(e,n,i=!0){this._mediator.execute(new So).pipe(Wv()).listen(this._destroyRef,()=>{this._mediator.execute(new uh(e,n,i))})}clearSelection(){this._mediator.execute(new ch)}ngOnDestroy(){this._mediator.execute(new oh(this))}static \u0275fac=(()=>{let e;return function(i){return(e||(e=G(t)))(i||t)}})();static \u0275cmp=z({type:t,selectors:[["f-flow"]],hostAttrs:[1,"f-component","f-flow"],hostVars:1,hostBindings:function(n,i){n&2&&O("id",i.fId())},inputs:{fId:[1,"fFlowId","fId"],fCache:[1,"fCache"]},outputs:{fNodesRendered:"fNodesRendered",fFullRendered:"fFullRendered",fLoaded:"fLoaded"},features:[we([V,...OL,Ry,qo,...E8,he,...J9,{provide:P_,useExisting:t}]),Z],ngContentSelectors:wL,decls:7,vars:0,template:function(n,i){n&1&&(mn(xL),Ka(0),$e(1),$e(2,1),$e(3,2),$e(4,3),$e(5,4),$e(6,5),Ya())},styles:["[_nghost-%COMP%]{display:block;position:relative;width:100%;height:100%;overflow:hidden;pointer-events:all;-webkit-user-select:none;user-select:none;touch-action:none} .f-connection-content{position:absolute;left:0;top:0;inline-size:max-content;pointer-events:all;transform-origin:50% 50%} .f-node, .f-group{position:absolute!important;transform-origin:center;-webkit-user-select:none;user-select:none;pointer-events:all;left:0!important;top:0!important;box-sizing:border-box} .f-group{z-index:1} .f-connection-content{z-index:3} .f-node{z-index:4}.hidden[_ngcontent-%COMP%]{opacity:0}"],changeDetection:0})}return t})();var mC=(()=>{class t{fVirtualForOf=[];fVirtualForTrackBy;_vc=p(Wa);_tpl=p(T0);_zone=p(Zt);_componentsStore=p(L,{optional:!0});_views=[];_rafId=null;_isProgressiveRenderActive=!1;ngOnChanges(e){e.fVirtualForOf&&(this._reset(),this._renderProgressively())}ngOnDestroy(){this._reset()}_reset(){this._rafId!==null&&(cancelAnimationFrame(this._rafId),this._rafId=null),this._finishProgressiveRender(),this._vc.clear(),this._views.length=0}_renderProgressively(){let n=0;this._startProgressiveRender(),this._zone.runOutsideAngular(()=>{let i=()=>{let r=performance.now();for(;n<this.fVirtualForOf.length&&performance.now()-r<10;){let a=this.fVirtualForOf[n],s=this._vc.createEmbeddedView(this._tpl,{$implicit:a,index:n});this._views.push(s),n++}if(n<this.fVirtualForOf.length){this._rafId=requestAnimationFrame(i);return}this._rafId=null,this._finishProgressiveRender()};this._rafId=requestAnimationFrame(i)})}_startProgressiveRender(){this._isProgressiveRenderActive||(this._isProgressiveRenderActive=!0,this._componentsStore?.beginProgressiveRender())}_finishProgressiveRender(){this._isProgressiveRenderActive&&(this._isProgressiveRenderActive=!1,this._componentsStore?.endProgressiveRender())}static \u0275fac=function(n){return new(n||t)};static \u0275dir=je({type:t,selectors:[["","fVirtualFor","","fVirtualForOf",""]],inputs:{fVirtualForOf:"fVirtualForOf",fVirtualForTrackBy:"fVirtualForTrackBy"},features:[so]})}return t})();var yn=(function(t){return t[t.ZOOM_IN=1]="ZOOM_IN",t[t.ZOOM_OUT=-1]="ZOOM_OUT",t})(yn||{}),q8=new ge("F_ZOOM"),E_=class{},G8=.1,j8=1,U8=.5,$8=60,W8=.5;function K8(t){return Math.abs(t.deltaY)>=Math.abs(t.deltaX)?t.deltaY:t.deltaX}function Y8(t,o,e){return X8(t)?Q8(o,e):Z8(o,e)}function X8(t){return(t.ctrlKey||t.metaKey)&&t.deltaMode===WheelEvent.DOM_DELTA_PIXEL}function Z8(t,o){let e=Math.abs(t)/100,n=_C(e,G8,j8);return o*n}function Q8(t,o){if(Math.abs(t)<U8)return 0;let e=Math.abs(t)/$8,n=_C(e,0,W8);return o*n}function _C(t,o,e){return Math.max(o,Math.min(e,t))}var la=(()=>{class t extends E_{_mediator=p(V);_injector=p(dt);_store=p(L);_triggersListener=He.emptyListener();isEnabled=B(!1,{alias:"fZoom",transform:j});fWheelTrigger=vn;fDblClickTrigger=vn;minimum=.1;maximum=4;step=.1;dblClickStep=.5;get _flowHost(){return this._store.flowHost}get _canvas(){return this._store.fCanvas}ngOnInit(){this._mediator.execute(new ci(Ye.ZOOM,this))}ngAfterViewInit(){this._listenZoomEnabledChanges()}_listenZoomEnabledChanges(){de(()=>{this.isEnabled(),en(()=>this._listenTriggers())},{injector:this._injector})}_listenTriggers(){this._flowHost&&(this._disposeListeners(),this.isEnabled()&&(this._listen("wheel",this._onWheel,He.activeListener()),this._listen("dblclick",this._onDoubleClick),this._triggersListener=()=>{this._unlisten("wheel",this._onWheel,He.activeListener()),this._unlisten("dblclick",this._onDoubleClick)}))}_onWheel=e=>{if(!ln(e,this.fWheelTrigger)||(e.preventDefault(),e.target?.closest("[fLockedContext]")))return;let i=K8(e);if(i===0)return;let r=this._normalizeWheelStep(e,i);r!==0&&this.setZoom(U.initialize(e.clientX,e.clientY),r,this._calculateDirection(i),!1)};_normalizeWheelStep(e,n){return Y8(e,n,this.step)}_calculateDirection(e){return e>0?yn.ZOOM_OUT:yn.ZOOM_IN}_onDoubleClick=e=>{if(!ln(e,this.fDblClickTrigger))return;e.preventDefault();let n=e.target;hB(n)||n?.closest("[fLockedContext]")||this.setZoom(U.initialize(e.clientX,e.clientY),this.dblClickStep,yn.ZOOM_IN,!0)};_getToCenterPosition(e,n){return U.initialize(e?.x||n.gravityCenter.x,e?.y||n.gravityCenter.y)}zoomIn(e){this._onZoomToCenter(yn.ZOOM_IN,e)}zoomOut(e){this._onZoomToCenter(yn.ZOOM_OUT,e)}_onZoomToCenter(e,n){this.setZoom(this._getToCenterPosition(n,te.fromElement(this._flowHost)),this.step,e,!1)}setZoom(e,n,i,r){this._mediator.execute(new mh(e,n,i,r))}getZoomValue(){return this._canvas.transform.scale||1}reset(){this._mediator.execute(new fh)}_disposeListeners(){this._triggersListener(),this._triggersListener=He.emptyListener()}ngOnDestroy(){this._disposeListeners(),this._mediator.execute(new di(Ye.ZOOM))}_listen(e,n,i){this._flowHost.addEventListener(e,n,i)}_unlisten(e,n,i){this._flowHost.removeEventListener(e,n,i)}static \u0275fac=(()=>{let e;return function(i){return(e||(e=G(t)))(i||t)}})();static \u0275dir=je({type:t,selectors:[["f-canvas","fZoom",""]],hostAttrs:[1,"f-zoom","f-component"],inputs:{isEnabled:[1,"fZoom","isEnabled"],fWheelTrigger:"fWheelTrigger",fDblClickTrigger:"fDblClickTrigger",minimum:[2,"fZoomMinimum","minimum",xe],maximum:[2,"fZoomMaximum","maximum",xe],step:[2,"fZoomStep","step",xe],dblClickStep:[2,"fZoomDblClickStep","dblClickStep",xe]},features:[we([{provide:q8,useExisting:t}]),Z]})}return t})();var gC=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=_t({type:t});static \u0275inj=mt({imports:[gt]})}return t})();var cf=XP(fD(),1);var La=(function(t){return t.NETWORK_SIMPLEX="network-simplex",t.TIGHT_TREE="tight-tree",t.LONGEST_PATH="longest-path",t})(La||{}),hre={direction:Ki.TOP_BOTTOM,nodeGap:48,layerGap:64,algorithm:La.NETWORK_SIMPLEX,defaultNodeSize:Dt.initialize(120,72)},r0=(()=>{class t extends eh{constructor(){super(hre)}mergeOptions(e,n={}){return zt(be(be({},e),n),{defaultNodeSize:n.defaultNodeSize?Dt.initialize(n.defaultNodeSize.width,n.defaultNodeSize.height):Dt.initialize(e.defaultNodeSize.width,e.defaultNodeSize.height)})}async calculate(e,n,i){let r=this.resolveLayoutOptions(i),a=this._buildGraph(e,n,r),s=new Map;return cf.layout(a),a.nodes().forEach(c=>{let u=a.node(c),f=e.find(C=>C.id===c);if(!u||!f)return;let g=f.size??r.defaultNodeSize;s.set(c,U.initialize(u.x-g.width/2,u.y-g.height/2))}),{nodes:aC(e,s)}}_buildGraph(e,n,i){let r=new cf.graphlib.Graph;return r.setDefaultEdgeLabel(()=>({})),r.setGraph({rankdir:this._mapDirection(i.direction),nodesep:i.nodeGap,ranksep:i.layerGap,ranker:this._mapAlgorithm(i.algorithm)}),e.forEach(a=>{let s=a.size??i.defaultNodeSize;r.setNode(a.id,{width:s.width,height:s.height})}),n.forEach(a=>{!r.hasNode(a.source)||!r.hasNode(a.target)||r.setEdge(a.source,a.target,{})}),r}_mapAlgorithm(e){switch(e){case La.TIGHT_TREE:return"tight-tree";case La.LONGEST_PATH:return"longest-path";case La.NETWORK_SIMPLEX:default:return"network-simplex"}}_mapDirection(e){switch(e){case Ki.BOTTOM_TOP:return"BT";case Ki.LEFT_RIGHT:return"LR";case Ki.RIGHT_LEFT:return"RL";case Ki.TOP_BOTTOM:default:return"TB"}}static \u0275fac=function(n){return new(n||t)};static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})();var Ti={loading:"Loading collection",errorTitle:"Failed to load",emptyTitle:"No nodes match the current filters.",resetFilters:"Reset filters",curationEmptyTitle:"Nothing from your map selection is visible right now.",showAllOnMap:"Show all on map",a11y:{toolbar:"Map controls",panel:"Selected node details"},toolbar:{zoomIn:"Zoom in",zoomOut:"Zoom out",fitToScreen:"Fit to screen",resetLayoutLabel:"Re-arrange layout",resetLayoutTooltip:"Re-arrange the visible nodes (re-run auto layout)",showAllLabel:"Show all",showAllTooltip:"Clear the map selection and show every node again",showAllAria:"Show all nodes on the map",layoutAlgorithmLabel:"Layout algorithm",layoutAlgorithmTooltip:"Layout algorithm (balanced, stretched or organic)",layoutDirectionLabel:"Layout direction",layoutDirectionTooltip:"Layout direction (TB, BT, LR, RL)",layoutDirectionUnavailableTooltip:"Direction does not apply to the Organic layout. Switch to Balanced or Stretched to set it.",layoutSpacingLabel:"Layout spacing",layoutSpacingTooltip:"Layout spacing (compact, normal, spacious)",layoutSpacingUnavailableTooltip:"Spacing does not apply to the Organic layout. Switch to Balanced or Stretched to set it.",connectionTypeLabel:"Edge style",connectionTypeTooltip:"Edge style (orthogonal, straight, bezier or adaptive curve)"},layout:{algorithm:{options:{"network-simplex":{label:"Balanced"},"longest-path":{label:"Stretched"},force:{label:"Organic"}}},direction:{options:{TOP_BOTTOM:{label:"Top to bottom"},BOTTOM_TOP:{label:"Bottom to top"},LEFT_RIGHT:{label:"Left to right"},RIGHT_LEFT:{label:"Right to left"}}},spacing:{options:{compact:{label:"Compact"},normal:{label:"Normal"},spacious:{label:"Spacious"}}},connection:{options:{segment:{label:"Orthogonal"},straight:{label:"Straight"},bezier:{label:"Bezier"},"adaptive-curve":{label:"Adaptive curve"}}}},panel:{resizeLabel:"Resize panel"},resetLayoutConfirm:{header:"Re-arrange layout?",message:"This replaces every saved node position with a fresh automatic layout.",messageVisible:"This re-arranges the visible nodes and replaces their saved positions.",accept:"Re-arrange",reject:"Cancel"}};var ir={graph:{perf:{cache:!0,virtualization:!1},perfHud:!0},inspector:{actionMocks:!1}};var fre="adaptive-curve",l0=["segment","straight","bezier","adaptive-curve"],mD="sm.graph.connection-type",_D="sm.graph.layout-algorithm",gD="sm.graph.layout-direction",df=(()=>{class t{_connectionType=X(a0(mD,mre,fre));_layoutAlgorithm=X(a0(_D,_b,hb));_layoutDirection=X(a0(gD,gb,fb));_layoutSpacing=X(mb);connectionType=this._connectionType.asReadonly();layoutAlgorithm=this._layoutAlgorithm.asReadonly();layoutDirection=this._layoutDirection.asReadonly();layoutSpacing=this._layoutSpacing.asReadonly();setConnectionType(e){this._connectionType()!==e&&(this._connectionType.set(e),s0(mD,e))}setLayoutAlgorithm(e){this._layoutAlgorithm()!==e&&(this._layoutAlgorithm.set(e),s0(_D,e))}setLayoutDirection(e){this._layoutDirection()!==e&&(this._layoutDirection.set(e),s0(gD,e))}static toFoblexEnum(e){return e}static \u0275fac=function(n){return new(n||t)};static \u0275prov=y({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function a0(t,o,e){let n=null;try{n=localStorage.getItem(t)}catch{return e}return n&&o(n)?n:e}function s0(t,o){try{localStorage.setItem(t,o)}catch{}}function mre(t){return typeof t=="string"&&l0.includes(t)}function bD(t,o){let e=new Set([o]);for(let n of t.get(o)??[])e.add(n);return e}var _re={TOP_BOTTOM:{output:Ke.BOTTOM,input:Ke.TOP},BOTTOM_TOP:{output:Ke.TOP,input:Ke.BOTTOM},LEFT_RIGHT:{output:Ke.RIGHT,input:Ke.LEFT},RIGHT_LEFT:{output:Ke.LEFT,input:Ke.RIGHT}};function vD(t,o){return hs(t)?_re[o]:{input:Ke.CALCULATE,output:Ke.CALCULATE}}var yD=`
2139
+ .p-popover {
2140
+ margin-block-start: dt('popover.gutter');
2141
+ background: dt('popover.background');
2142
+ color: dt('popover.color');
2143
+ border: 1px solid dt('popover.border.color');
2144
+ border-radius: dt('popover.border.radius');
2145
+ box-shadow: dt('popover.shadow');
2146
+ will-change: transform;
2147
+ }
2148
+
2149
+ .p-popover-content {
2150
+ padding: dt('popover.content.padding');
2151
+ }
2152
+
2153
+ .p-popover-flipped {
2154
+ margin-block-start: calc(dt('popover.gutter') * -1);
2155
+ margin-block-end: dt('popover.gutter');
2156
+ }
2157
+
2158
+ .p-popover:after,
2159
+ .p-popover:before {
2160
+ bottom: 100%;
2161
+ left: calc(dt('popover.arrow.offset') + dt('popover.arrow.left'));
2162
+ content: ' ';
2163
+ height: 0;
2164
+ width: 0;
2165
+ position: absolute;
2166
+ pointer-events: none;
2167
+ }
2168
+
2169
+ .p-popover:after {
2170
+ border-width: calc(dt('popover.gutter') - 2px);
2171
+ margin-left: calc(-1 * (dt('popover.gutter') - 2px));
2172
+ border-style: solid;
2173
+ border-color: transparent;
2174
+ border-bottom-color: dt('popover.background');
2175
+ }
2176
+
2177
+ .p-popover:before {
2178
+ border-width: dt('popover.gutter');
2179
+ margin-left: calc(-1 * dt('popover.gutter'));
2180
+ border-style: solid;
2181
+ border-color: transparent;
2182
+ border-bottom-color: dt('popover.border.color');
2183
+ }
2184
+
2185
+ .p-popover-flipped:after,
2186
+ .p-popover-flipped:before {
2187
+ bottom: auto;
2188
+ top: 100%;
2189
+ }
2190
+
2191
+ .p-popover.p-popover-flipped:after {
2192
+ border-bottom-color: transparent;
2193
+ border-top-color: dt('popover.background');
2194
+ }
2195
+
2196
+ .p-popover.p-popover-flipped:before {
2197
+ border-bottom-color: transparent;
2198
+ border-top-color: dt('popover.border.color');
2199
+ }
2200
+ `;var gre=["content"],bre=["*"],vre=t=>({closeCallback:t});function yre(t,o){}function Cre(t,o){t&1&&I(0,yre,0,0,"ng-template")}function xre(t,o){if(t&1){let e=W();h(0,"div",1),A("click",function(i){w(e);let r=d();return T(r.onOverlayClick(i))})("pMotionOnEnter",function(i){w(e);let r=d();return T(r.onAnimationStart(i))})("pMotionOnAfterLeave",function(){w(e);let i=d();return T(i.onAnimationEnd())}),h(1,"div",2),A("click",function(i){w(e);let r=d();return T(r.onContentClick(i))})("mousedown",function(i){w(e);let r=d();return T(r.onContentClick(i))}),$e(2),I(3,Cre,1,0,null,3),_()()}if(t&2){let e=d();qt(e.sx("root")),H(e.cn(e.cx("root"),e.styleClass)),m("pBind",e.ptm("root"))("ngStyle",e.style)("pMotion",e.overlayVisible)("pMotionAppear",!0)("pMotionOptions",e.computedMotionOptions()),O("aria-modal",e.overlayVisible)("aria-label",e.ariaLabel)("aria-labelledBy",e.ariaLabelledBy),l(),H(e.cx("content")),m("pBind",e.ptm("content")),l(2),m("ngTemplateOutlet",e.contentTemplate||e._contentTemplate)("ngTemplateOutletContext",Oe(17,vre,e.onCloseClick.bind(e)))}}var wre={root:()=>({position:"absolute"})},Tre={root:"p-popover p-component",content:"p-popover-content"},CD=(()=>{class t extends St{name="popover";style=yD;classes=Tre;inlineStyles=wre;static \u0275fac=(()=>{let e;return function(i){return(e||(e=G(t)))(i||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),xD=new ge("POPOVER_INSTANCE"),c0=(()=>{class t extends Bn{componentName="Popover";$pcPopover=p(xD,{optional:!0,skipSelf:!0})??void 0;bindDirectiveInstance=p(Ie,{self:!0});onAfterViewChecked(){this.bindDirectiveInstance.setAttrs(this.ptm("host"))}ariaLabel;ariaLabelledBy;dismissable=!0;style;styleClass;appendTo=B("body");autoZIndex=!0;ariaCloseLabel;baseZIndex=0;focusOnShow=!0;showTransitionOptions=".12s cubic-bezier(0, 0, 0.2, 1)";hideTransitionOptions=".1s linear";motionOptions=B(void 0);computedMotionOptions=E(()=>be(be({},this.ptm("motion")),this.motionOptions()));onShow=new ne;onHide=new ne;$appendTo=E(()=>this.appendTo()||this.config.overlayAppendTo());container;overlayVisible=!1;render=!1;selfClick=!1;documentClickListener;target;willHide;scrollHandler;documentResizeListener;contentTemplate;templates;_contentTemplate;destroyCallback;overlayEventListener;overlaySubscription;_componentStyle=p(CD);zone=p(Zt);overlayService=p(po);onAfterContentInit(){this.templates.forEach(e=>{e.getType()==="content"&&(this._contentTemplate=e.template)})}bindDocumentClickListener(){if(jt(this.platformId)&&!this.documentClickListener){let e=N0()?"touchstart":"click",n=this.el?this.el.nativeElement.ownerDocument:this.document;this.documentClickListener=this.renderer.listen(n,e,i=>{this.dismissable&&(!this.container?.contains(i.target)&&this.target!==i.target&&!this.target.contains(i.target)&&!this.selfClick&&this.hide(),this.selfClick=!1,this.cd.markForCheck())})}}unbindDocumentClickListener(){this.documentClickListener&&(this.documentClickListener(),this.documentClickListener=null,this.selfClick=!1)}toggle(e,n){this.overlayVisible?(this.hasTargetChanged(e,n)&&(this.destroyCallback=()=>{this.show(null,n||e.currentTarget||e.target)}),this.hide()):this.show(e,n)}show(e,n){n&&e&&e.stopPropagation(),this.container&&!this.overlayVisible&&(this.container=null),this.target=n||e.currentTarget||e.target,this.overlayVisible=!0,this.render=!0,this.cd.markForCheck()}onOverlayClick(e){this.overlayService.add({originalEvent:e,target:this.el.nativeElement}),this.selfClick=!0}onContentClick(e){let n=e.target;this.selfClick=e.offsetX<n.clientWidth&&e.offsetY<n.clientHeight}hasTargetChanged(e,n){return this.target!=null&&this.target!==(n||e.currentTarget||e.target)}appendOverlay(){this.$appendTo()&&this.$appendTo()!=="self"&&(this.$appendTo()==="body"?Pi(this.document.body,this.container):Pi(this.$appendTo(),this.container))}restoreAppend(){this.container&&this.$appendTo()&&this.$appendTo()!=="self"&&Pi(this.el.nativeElement,this.container)}setZIndex(){this.autoZIndex&&In.set("overlay",this.container,this.baseZIndex+this.config.zIndex.overlay)}align(){if(this.target&&this.container){pr(this.container,this.target,!1);let e=Rf(this.container),n=Rf(this.target),i=this.document.defaultView?.getComputedStyle(this.container).getPropertyValue("border-radius"),r=0;e.left<n.left&&(r=n.left-e.left-parseFloat(i)*2),this.container.style.setProperty(H0("popover.arrow.left").name,`${r}px`),e.top<n.top&&(this.container.setAttribute("data-p-popover-flipped","true"),!this.$unstyled()&&ur(this.container,"p-popover-flipped"))}}onAnimationStart(e){this.container=e.element,this.container?.setAttribute(this.$attrSelector,""),this.appendOverlay(),this.align(),this.setZIndex(),this.bindDocumentClickListener(),this.bindDocumentResizeListener(),this.bindScrollListener(),this.focusOnShow&&this.focus(),this.overlayEventListener=n=>{this.container&&this.container.contains(n.target)&&(this.selfClick=!0)},this.overlaySubscription=this.overlayService.clickObservable.subscribe(this.overlayEventListener),this.onShow.emit(null)}onAnimationEnd(){this.overlayVisible||(this.destroyCallback&&(this.destroyCallback(),this.destroyCallback=null),this.overlaySubscription&&this.overlaySubscription.unsubscribe(),this.autoZIndex&&In.clear(this.container),this.onContainerDestroy(),this.onHide.emit({}),this.render=!1,this.container=null)}focus(){let e=ut(this.container,"[autofocus]");e&&this.zone.runOutsideAngular(()=>{setTimeout(()=>e.focus(),5)})}hide(){this.overlayVisible=!1,this.cd.markForCheck()}onCloseClick(e){this.hide(),e.preventDefault()}onEscapeKeydown(e){this.hide()}onWindowResize(){this.overlayVisible&&!es()&&this.hide()}bindDocumentResizeListener(){if(jt(this.platformId)&&!this.documentResizeListener){let e=this.document.defaultView;this.documentResizeListener=this.renderer.listen(e,"resize",this.onWindowResize.bind(this))}}unbindDocumentResizeListener(){this.documentResizeListener&&(this.documentResizeListener(),this.documentResizeListener=null)}bindScrollListener(){jt(this.platformId)&&(this.scrollHandler||(this.scrollHandler=new _r(this.target,()=>{this.overlayVisible&&this.hide()})),this.scrollHandler.bindScrollListener())}unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()}onContainerDestroy(){this.cd.destroyed||(this.target=null),this.unbindDocumentClickListener(),this.unbindDocumentResizeListener(),this.unbindScrollListener()}onDestroy(){this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.container&&this.autoZIndex&&In.clear(this.container),this.cd.destroyed||(this.target=null),this.destroyCallback=null,this.container&&(this.restoreAppend(),this.onContainerDestroy()),this.overlaySubscription&&this.overlaySubscription.unsubscribe()}static \u0275fac=(()=>{let e;return function(i){return(e||(e=G(t)))(i||t)}})();static \u0275cmp=z({type:t,selectors:[["p-popover"]],contentQueries:function(n,i,r){if(n&1&&Qt(r,gre,4)(r,bt,4),n&2){let a;Q(a=J())&&(i.contentTemplate=a.first),Q(a=J())&&(i.templates=a)}},hostBindings:function(n,i){n&1&&A("keydown.escape",function(a){return i.onEscapeKeydown(a)},$a)},inputs:{ariaLabel:"ariaLabel",ariaLabelledBy:"ariaLabelledBy",dismissable:[2,"dismissable","dismissable",j],style:"style",styleClass:"styleClass",appendTo:[1,"appendTo"],autoZIndex:[2,"autoZIndex","autoZIndex",j],ariaCloseLabel:"ariaCloseLabel",baseZIndex:[2,"baseZIndex","baseZIndex",xe],focusOnShow:[2,"focusOnShow","focusOnShow",j],showTransitionOptions:"showTransitionOptions",hideTransitionOptions:"hideTransitionOptions",motionOptions:[1,"motionOptions"]},outputs:{onShow:"onShow",onHide:"onHide"},features:[we([CD,{provide:xD,useExisting:t},{provide:kt,useExisting:t}]),wt([Ie]),Z],ngContentSelectors:bre,decls:1,vars:1,consts:[["role","dialog","pMotionName","p-anchored-overlay",3,"pBind","class","style","ngStyle","pMotion","pMotionAppear","pMotionOptions"],["role","dialog","pMotionName","p-anchored-overlay",3,"click","pMotionOnEnter","pMotionOnAfterLeave","pBind","ngStyle","pMotion","pMotionAppear","pMotionOptions"],[3,"click","mousedown","pBind"],[4,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(n,i){n&1&&(mn(),M(0,xre,4,19,"div",0)),n&2&&D(i.render?0:-1)},dependencies:[gt,Mt,Yn,Le,Ie,vo,ib],encapsulation:2,changeDetection:0})}return t})(),wD=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=_t({type:t});static \u0275inj=mt({imports:[c0,Le,Le]})}return t})();function kre(t,o){if(t&1){let e=W();h(0,"li",10)(1,"button",14),A("click",function(){let i=w(e).$implicit,r=d(),a=yt(6);return r.setLayoutAlgorithm(i),T(a.hide())}),b(2),_()()}if(t&2){let e=o.$implicit,n=d();l(),se("is-active",n.layoutAlgorithm()===e),O("aria-checked",n.layoutAlgorithm()===e)("data-testid","graph-layout-algorithm-option-"+e),l(),ke(" ",n.layoutAlgorithmLabel(e)," ")}}function Ire(t,o){if(t&1){let e=W();h(0,"button",15),A("click",function(){let i=w(e).$implicit,r=d(),a=yt(11);return r.setLayoutDirection(i),T(a.hide())}),N(1,"i",16),_()}if(t&2){let e=o.$implicit,n=d();se("is-active",n.layoutDirection()===e),m("pTooltip",n.layoutDirectionLabel(e)),O("aria-checked",n.layoutDirection()===e)("aria-label",n.layoutDirectionLabel(e))("data-testid","graph-layout-direction-option-"+e),l(),H(n.directionItemIcon(e))}}function Ere(t,o){if(t&1){let e=W();h(0,"button",15),A("click",function(){let i=w(e).$implicit,r=d(),a=yt(16);return r.setConnectionType(i),T(a.hide())}),$(),h(1,"svg",17),N(2,"path",7),_()()}if(t&2){let e=o.$implicit,n=d();se("is-active",n.connectionType()===e),m("pTooltip",n.connectionTypeLabel(e)),O("aria-checked",n.connectionType()===e)("aria-label",n.connectionTypeLabel(e))("data-testid","graph-connection-type-option-"+e),l(2),O("d",n.connectionTypeItemPath(e))}}var TD={TOP_BOTTOM:"pi pi-arrow-down",BOTTOM_TOP:"pi pi-arrow-up",LEFT_RIGHT:"pi pi-arrow-right",RIGHT_LEFT:"pi pi-arrow-left"},Mre={segment:"M 2 14 L 8 14 L 8 2 L 14 2",straight:"M 2 14 L 14 2",bezier:"M 2 14 C 6 14, 10 2, 14 2","adaptive-curve":"M 2 14 C 8 14, 8 2, 14 2"},SD=(()=>{class t{graphPreferences=p(df);texts=Ti;layoutAlgorithms=ub;layoutDirections=pb;connectionTypes=l0;layoutAlgorithm=this.graphPreferences.layoutAlgorithm;layoutDirection=this.graphPreferences.layoutDirection;connectionType=this.graphPreferences.connectionType;directionIcon=E(()=>TD[this.layoutDirection()]);directionAvailable=E(()=>hs(this.layoutAlgorithm()));layoutAlgorithmLabel(e){return Ti.layout.algorithm.options[e].label}layoutDirectionLabel(e){return Ti.layout.direction.options[e].label}connectionTypeLabel(e){return Ti.layout.connection.options[e].label}setLayoutAlgorithm(e){this.graphPreferences.setLayoutAlgorithm(e)}setLayoutDirection(e){this.graphPreferences.setLayoutDirection(e)}setConnectionType(e){this.graphPreferences.setConnectionType(e)}directionItemIcon(e){return TD[e]}connectionTypeItemPath(e){return Mre[e]}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=z({type:t,selectors:[["sm-graph-layout-toolbar"]],decls:20,vars:15,consts:[["algorithmPopover",""],["directionPopover",""],["connectionTypePopover",""],["icon","pi pi-sitemap","severity","secondary","size","small","data-testid","graph-layout-algorithm-toggle",3,"onClick","ariaLabel","pTooltip","text","rounded"],["severity","secondary","size","small","data-testid","graph-layout-direction-toggle",3,"onClick","icon","ariaLabel","pTooltip","text","rounded","disabled"],["severity","secondary","size","small","data-testid","graph-connection-type-toggle",3,"onClick","ariaLabel","pTooltip","text","rounded"],["viewBox","0 0 16 16","aria-hidden","true",1,"graph__connection-svg","graph__connection-svg--toggle"],["fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],["appendTo","body","styleClass","graph__layout-popover"],["role","menu","data-testid","graph-layout-algorithm-menu",1,"graph__layout-menu"],["role","none"],["role","menu","data-testid","graph-layout-direction-menu",1,"graph__layout-icon-row"],["type","button","role","menuitemradio",1,"graph__layout-icon-item",3,"is-active","pTooltip"],["role","menu","data-testid","graph-connection-type-menu",1,"graph__layout-icon-row"],["type","button","role","menuitemradio",1,"graph__layout-menu-item",3,"click"],["type","button","role","menuitemradio",1,"graph__layout-icon-item",3,"click","pTooltip"],["aria-hidden","true"],["viewBox","0 0 16 16","aria-hidden","true",1,"graph__connection-svg"]],template:function(n,i){if(n&1){let r=W();h(0,"p-button",3),A("onClick",function(s){w(r);let c=yt(6);return T(c.toggle(s))}),_(),h(1,"p-button",4),A("onClick",function(s){w(r);let c=yt(11);return T(c.toggle(s))}),_(),h(2,"p-button",5),A("onClick",function(s){w(r);let c=yt(16);return T(c.toggle(s))}),$(),h(3,"svg",6),N(4,"path",7),_()(),Ga(),h(5,"p-popover",8,0)(7,"ul",9),ue(8,kre,3,5,"li",10,Ue),_()(),h(10,"p-popover",8,1)(12,"div",11),ue(13,Ire,2,8,"button",12,Ue),_()(),h(15,"p-popover",8,2)(17,"div",13),ue(18,Ere,3,7,"button",12,Ue),_()()}n&2&&(m("ariaLabel",i.texts.toolbar.layoutAlgorithmLabel)("pTooltip",i.texts.toolbar.layoutAlgorithmTooltip)("text",!0)("rounded",!0),l(),m("icon",i.directionIcon())("ariaLabel",i.texts.toolbar.layoutDirectionLabel)("pTooltip",i.directionAvailable()?i.texts.toolbar.layoutDirectionTooltip:i.texts.toolbar.layoutDirectionUnavailableTooltip)("text",!0)("rounded",!0)("disabled",!i.directionAvailable()),l(),m("ariaLabel",i.texts.toolbar.connectionTypeLabel)("pTooltip",i.texts.toolbar.connectionTypeTooltip)("text",!0)("rounded",!0),l(2),O("d",i.connectionTypeItemPath(i.connectionType())),l(4),pe(i.layoutAlgorithms),l(5),pe(i.layoutDirections),l(5),pe(i.connectionTypes))},dependencies:[an,Ut,wD,c0,Ve,Be],styles:['[_nghost-%COMP%] .graph__layout-popover .p-popover-content{padding:4px}.graph__layout-menu[_ngcontent-%COMP%]{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;min-width:160px}.graph__layout-menu-item[_ngcontent-%COMP%]{appearance:none;border:0;background:transparent;color:var(--sm-text);font:inherit;text-align:left;padding:6px 10px;border-radius:var(--sm-radius-sm);cursor:pointer;display:flex;align-items:center;gap:8px;transition:background .12s ease,color .12s ease}.graph__layout-menu-item[_ngcontent-%COMP%]:hover, .graph__layout-menu-item[_ngcontent-%COMP%]:focus-visible{background:color-mix(in srgb,var(--p-primary-color) 12%,transparent);outline:none}.graph__layout-menu-item.is-active[_ngcontent-%COMP%]{background:color-mix(in srgb,var(--p-primary-color) 18%,transparent);color:var(--p-primary-color);font-weight:600}.graph__layout-menu-item[_ngcontent-%COMP%]:before{content:"";display:inline-block;width:6px;height:6px;border-radius:50%;background:transparent;flex-shrink:0}.graph__layout-menu-item.is-active[_ngcontent-%COMP%]:before{background:var(--p-primary-color)}.graph__layout-icon-row[_ngcontent-%COMP%]{display:inline-flex;flex-direction:row;gap:2px;padding:2px}.graph__layout-icon-item[_ngcontent-%COMP%]{appearance:none;border:0;background:transparent;color:var(--sm-text);cursor:pointer;width:32px;height:32px;display:inline-flex;align-items:center;justify-content:center;border-radius:var(--sm-radius-sm);transition:background .12s ease,color .12s ease}.graph__layout-icon-item[_ngcontent-%COMP%] > i[_ngcontent-%COMP%]{font-size:1rem}.graph__connection-svg[_ngcontent-%COMP%]{width:20px;height:20px;overflow:visible}.graph__connection-svg--toggle[_ngcontent-%COMP%]{width:16px;height:16px}.graph__layout-icon-item[_ngcontent-%COMP%]:hover, .graph__layout-icon-item[_ngcontent-%COMP%]:focus-visible{background:color-mix(in srgb,var(--p-primary-color) 12%,transparent);outline:none}.graph__layout-icon-item.is-active[_ngcontent-%COMP%]{background:color-mix(in srgb,var(--p-primary-color) 18%,transparent);color:var(--p-primary-color)}'],changeDetection:0})}return t})();var kD={a11y:{toolbarLabel:"Toggle node kinds"},favorites:{label:"Favorites"}};function Dre(t,o){if(t&1&&ie(0,"i",4),t&2){let e=d();H(e.piClass()),Ne("font-size",e.size(),"px")}}function Pre(t,o){if(t&1&&($(),re(0,"svg",1),ie(1,"path"),fe()),t&2){let e=d();O("width",e.size())("height",e.size()),l(),O("d",e.svgPath())}}function Rre(t,o){if(t&1&&(re(0,"span",4),b(1),fe()),t&2){let e=d();Ne("font-size",e.size(),"px")("line-height",e.size(),"px"),l(),x(e.emoji())}}function Ore(t,o){if(t&1&&(re(0,"span",5),b(1),fe()),t&2){let e=d();Ne("font-size",e.size(),"px")("line-height",e.size(),"px"),l(),x(e.letter())}}var or=(()=>{class t{kindRegistry=p(fs);kind=B.required();size=B(18);provider=B(null);resolvedUi=E(()=>this.kindRegistry.lookup(this.kind()));variant=E(()=>{let e=this.resolvedUi();return e?.icon?.kind==="pi"?"pi":e?.icon?.kind==="svg"?"svg":e?.emoji?"emoji":"letter"});piClass=E(()=>{let e=this.resolvedUi()?.icon;return e?.kind==="pi"?`pi ${e.id}`:""});svgPath=E(()=>{let e=this.resolvedUi()?.icon;return e?.kind==="svg"?e.path:""});emoji=E(()=>this.resolvedUi()?.emoji??"");letter=E(()=>this.kindRegistry.labelOf(this.kind()).charAt(0).toUpperCase());static \u0275fac=function(n){return new(n||t)};static \u0275cmp=z({type:t,selectors:[["sm-kind-icon"]],inputs:{kind:[1,"kind"],size:[1,"size"],provider:[1,"provider"]},decls:4,vars:1,consts:[["aria-hidden","true",3,"class","font-size"],["viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2.2","stroke-linecap","round","stroke-linejoin","round","aria-hidden","true"],["aria-hidden","true",3,"font-size","line-height"],["aria-hidden","true",1,"kind-icon__letter",3,"font-size","line-height"],["aria-hidden","true"],["aria-hidden","true",1,"kind-icon__letter"]],template:function(n,i){if(n&1&&M(0,Dre,1,4,"i",0)(1,Pre,2,3,":svg:svg",1)(2,Rre,2,5,"span",2)(3,Ore,2,5,"span",3),n&2){let r;D((r=i.variant())==="pi"?0:r==="svg"?1:r==="emoji"?2:r==="letter"?3:-1)}},styles:["[_nghost-%COMP%]{display:inline-flex;align-items:center;justify-content:center;line-height:1}"],changeDetection:0})}return t})();var ID=()=>({class:"kind-palette__content"}),ED=t=>({content:t}),Fre=(t,o)=>o.kind;function Nre(t,o){if(t&1&&(N(0,"sm-kind-icon",5),h(1,"span"),b(2),_()),t&2){let e=d().$implicit;m("kind",e.kind)("size",16),l(2),x(e.count)}}function Are(t,o){if(t&1){let e=W();h(0,"p-togglebutton",4),A("ngModelChange",function(){let i=w(e).$implicit,r=d();return T(r.toggle(i.kind))}),I(1,Nre,3,3,"ng-template",null,0,We),_()}if(t&2){let e=o.$implicit,n=d();m("ngModel",n.isActive(e.kind))("pTooltip",e.label)("ariaLabel",e.label)("styleClass","kind-palette__btn kind-palette__btn--"+e.kind)("pt",Oe(7,ED,Jt(6,ID))),O("data-testid","kind-palette-"+e.kind)}}function Lre(t,o){if(t&1&&(N(0,"i",7),h(1,"span"),b(2),_()),t&2){let e=d(2);se("pi-star-fill",e.favoritesActive())("pi-star",!e.favoritesActive()),l(2),x(e.favoritesCount())}}function Bre(t,o){if(t&1){let e=W();h(0,"p-togglebutton",6),A("ngModelChange",function(){w(e);let i=d();return T(i.toggleFavoritesOnly())}),I(1,Lre,3,5,"ng-template",null,0,We),_()}if(t&2){let e=d();m("ngModel",e.favoritesActive())("pTooltip",e.texts.favorites.label)("ariaLabel",e.texts.favorites.label)("pt",Oe(5,ED,Jt(4,ID)))}}var MD=(()=>{class t{loader=p(Ft);filters=p(rn);kindRegistry=p(fs);mapVisibility=p(ni);texts=kD;entries=E(()=>{let e=new Map,n=new Map;for(let i of this.loader.nodes())e.set(i.kind,(e.get(i.kind)??0)+1),this.mapVisibility.inScope(i.path)&&n.set(i.kind,(n.get(i.kind)??0)+1);return this.kindRegistry.kinds().map(i=>({kind:i.name,label:i.label,count:n.get(i.name)??0})).filter(i=>(e.get(i.kind)??0)>0)});favoritesCount=E(()=>this.loader.nodes().filter(e=>e.isFavorite===!0&&this.mapVisibility.inScope(e.path)).length);showFavorites=E(()=>this.loader.hasAnyFavorites()||this.filters.favoritesOnly());favoritesActive=E(()=>this.filters.favoritesOnly());isActive(e){return this.filters.isKindActive(e)}toggle(e){let n=this.entries().map(i=>i.kind);this.filters.toggleKind(e,n)}toggleFavoritesOnly(){this.filters.setFavoritesOnly(!this.filters.favoritesOnly())}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=z({type:t,selectors:[["sm-kind-palette"]],decls:4,vars:2,consts:[["content",""],["role","toolbar","data-testid","kind-palette",1,"kind-palette"],[3,"ngModel","pTooltip","ariaLabel","styleClass","pt"],["styleClass","kind-palette__btn kind-palette__btn--favorites","data-testid","kind-palette-favorites",3,"ngModel","pTooltip","ariaLabel","pt"],[3,"ngModelChange","ngModel","pTooltip","ariaLabel","styleClass","pt"],[3,"kind","size"],["styleClass","kind-palette__btn kind-palette__btn--favorites","data-testid","kind-palette-favorites",3,"ngModelChange","ngModel","pTooltip","ariaLabel","pt"],["aria-hidden","true",1,"pi"]],template:function(n,i){n&1&&(h(0,"div",1),ue(1,Are,3,9,"p-togglebutton",2,Fre),M(3,Bre,3,7,"p-togglebutton",3),_()),n&2&&(O("aria-label",i.texts.a11y.toolbarLabel),l(),pe(i.entries()),l(2),D(i.showFavorites()?3:-1))},dependencies:[Ot,nn,on,Qn,Zn,Ve,Be,or],styles:["[_nghost-%COMP%]{display:block;pointer-events:auto}.kind-palette[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2px;padding:4px;background:color-mix(in srgb,var(--sm-bg-content) 80%,transparent);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);border:1px solid var(--sm-border);border-radius:var(--sm-radius-xl);box-shadow:var(--sm-shadow-floating)}.kind-palette__btn[_ngcontent-%COMP%]{--p-togglebutton-padding: 0;--p-togglebutton-content-padding: 0 .55rem;--p-togglebutton-border-radius: var(--sm-radius-pill);--p-togglebutton-content-border-radius: var(--sm-radius-pill);--p-togglebutton-gap: .4rem;--p-togglebutton-background: transparent;--p-togglebutton-checked-background: transparent;--p-togglebutton-hover-background: transparent;--p-togglebutton-border-color: transparent;--p-togglebutton-checked-border-color: transparent;--p-togglebutton-content-checked-background: var(--sm-bg-hover);--p-togglebutton-color: var(--p-text-muted-color);--p-togglebutton-hover-color: var(--p-text-color);--p-togglebutton-checked-color: var(--p-text-color);--p-togglebutton-icon-color: var(--p-text-muted-color);--p-togglebutton-icon-hover-color: var(--p-text-color);--p-togglebutton-icon-checked-color: var(--p-text-color);width:56px;height:30px;font-size:.72rem;font-weight:600;font-variant-numeric:tabular-nums}[_nghost-%COMP%] .kind-palette__content{width:100%;height:100%;justify-content:flex-start;display:flex;align-items:center;gap:.4rem}[_nghost-%COMP%] .kind-palette__content>span{flex:1;text-align:right}[_nghost-%COMP%] .kind-palette__btn sm-kind-icon{display:inline-flex;align-items:center;color:var(--p-text-muted-color)}[_nghost-%COMP%] .kind-palette__btn[aria-pressed=true] sm-kind-icon{color:var(--p-text-color)}[_nghost-%COMP%] .kind-palette__btn--skill[aria-pressed=true] sm-kind-icon{color:var(--sm-kind-skill)}[_nghost-%COMP%] .kind-palette__btn--agent[aria-pressed=true] sm-kind-icon{color:var(--sm-kind-agent)}[_nghost-%COMP%] .kind-palette__btn--command[aria-pressed=true] sm-kind-icon{color:var(--sm-kind-command)}[_nghost-%COMP%] .kind-palette__btn--markdown[aria-pressed=true] sm-kind-icon{color:var(--sm-kind-markdown)}[_nghost-%COMP%] .kind-palette__btn--favorites .pi{font-size:.95rem;line-height:1;color:var(--p-text-muted-color)}[_nghost-%COMP%] .kind-palette__btn--favorites:hover .pi{color:var(--p-text-color)}[_nghost-%COMP%] .kind-palette__btn--favorites[aria-pressed=true] .pi{color:var(--p-primary-color)}"],changeDetection:0})}return t})();var An={a11y:{toolbarLabel:"Link kind filters"},kinds:{invokes:"Invokes",references:"References",mentions:"Mentions",supersedes:"Supersedes"},tooltips:{invokes:`Invokes:
2201
+ "/skill-command"`,references:`References:
2202
+ "[link](./link.md)"`,mentions:`Mention:
2203
+ "@agent.md"`,supersedes:`Supersedes:
2204
+ .sm annotation`}};var Vre=()=>({class:"link-kind-palette__content"}),zre=t=>({content:t}),Hre=(t,o)=>o.kind;function qre(t,o){if(t&1&&b(0),t&2){let e=d(2).$implicit;ke(" ",e.text," ")}}function Gre(t,o){if(t&1&&N(0,"i"),t&2){let e=d(2).$implicit;H(e.icon)}}function jre(t,o){if(t&1&&(h(0,"span",4),M(1,qre,1,1)(2,Gre,1,2,"i",5),_()),t&2){let e=d().$implicit;l(),D(e.text?1:e.icon?2:-1)}}function Ure(t,o){if(t&1){let e=W();h(0,"p-togglebutton",3),A("ngModelChange",function(){let i=w(e).$implicit,r=d(2);return T(r.toggle(i.kind))}),I(1,jre,3,1,"ng-template",null,0,We),_()}if(t&2){let e=o.$implicit,n=d(2);m("ngModel",n.isActive(e.kind))("pTooltip",e.tooltip)("ariaLabel",e.label)("styleClass","link-kind-palette__btn link-kind-palette__btn--"+e.kind)("pt",Oe(7,zre,Jt(6,Vre))),O("data-testid","link-kind-palette-"+e.kind)}}function $re(t,o){if(t&1&&(h(0,"div",1),ue(1,Ure,3,9,"p-togglebutton",2,Hre),_()),t&2){let e=d();O("aria-label",e.texts.a11y.toolbarLabel),l(),pe(e.entries())}}var DD=[{kind:"invokes",label:An.kinds.invokes,tooltip:An.tooltips.invokes,text:"/"},{kind:"references",label:An.kinds.references,tooltip:An.tooltips.references,icon:"pi pi-link"},{kind:"mentions",label:An.kinds.mentions,tooltip:An.tooltips.mentions,text:"@"},{kind:"supersedes",label:An.kinds.supersedes,tooltip:An.tooltips.supersedes,icon:"pi pi-angle-double-right"}];for(let t of DD)if(!Q0.includes(t.kind))throw new Error(`link-kind-palette: unknown link kind "${t.kind}"`);var PD=(()=>{class t{loader=p(Ft);filters=p(rn);texts=An;counts=E(()=>{let e=this.loader.scan(),n=new Map;if(!e)return n;for(let i of e.links)n.set(i.kind,(n.get(i.kind)??0)+1);return n});entries=E(()=>{let e=this.counts(),n=this.filters.selectedLinkKinds(),i=new Set(n);return DD.filter(r=>(e.get(r.kind)??0)>0||i.has(r.kind))});constructor(){de(()=>{let e=this.counts(),n=this.filters.selectedLinkKinds(),i=n.filter(r=>(e.get(r)??0)>0);i.length!==n.length&&this.filters.setLinkKinds(i)})}isActive(e){return this.filters.isLinkKindActive(e)}toggle(e){this.filters.toggleLinkKind(e)}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=z({type:t,selectors:[["sm-link-kind-palette"]],decls:1,vars:1,consts:[["content",""],["role","toolbar","data-testid","link-kind-palette",1,"link-kind-palette"],["tooltipStyleClass","link-kind-palette__tooltip",3,"ngModel","pTooltip","ariaLabel","styleClass","pt"],["tooltipStyleClass","link-kind-palette__tooltip",3,"ngModelChange","ngModel","pTooltip","ariaLabel","styleClass","pt"],["aria-hidden","true",1,"link-kind-palette__glyph"],[3,"class"]],template:function(n,i){n&1&&M(0,$re,3,1,"div",1),n&2&&D(i.entries().length>0?0:-1)},dependencies:[Ot,nn,on,Qn,Zn,Ve,Be],styles:["[_nghost-%COMP%]{display:block;width:100%;pointer-events:auto}.link-kind-palette[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(2,1fr);gap:2px;padding:4px;background:color-mix(in srgb,var(--sm-bg-content) 80%,transparent);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);border:1px solid var(--sm-border);border-radius:var(--sm-radius-xl);box-shadow:var(--sm-shadow-floating)}.link-kind-palette__btn[_ngcontent-%COMP%]{--p-togglebutton-padding: 0;--p-togglebutton-content-padding: 0;--p-togglebutton-border-radius: var(--sm-radius-pill);--p-togglebutton-content-border-radius: var(--sm-radius-pill);--p-togglebutton-background: transparent;--p-togglebutton-checked-background: transparent;--p-togglebutton-hover-background: transparent;--p-togglebutton-border-color: transparent;--p-togglebutton-checked-border-color: transparent;--p-togglebutton-content-checked-background: var(--sm-bg-hover);--p-togglebutton-color: var(--p-text-muted-color);--p-togglebutton-hover-color: var(--p-text-color);--p-togglebutton-checked-color: var(--p-text-color);width:100%;height:30px}[_nghost-%COMP%] .link-kind-palette__content{width:100%;height:100%;display:flex;align-items:center;justify-content:center}[_nghost-%COMP%] .link-kind-palette__glyph{font-size:.95rem;line-height:1;font-weight:600;display:inline-flex;align-items:center;justify-content:center}[_nghost-%COMP%] .link-kind-palette__btn--invokes .link-kind-palette__glyph{color:var(--sm-edge-invokes)}[_nghost-%COMP%] .link-kind-palette__btn--invokes[aria-pressed=true] .link-kind-palette__glyph{color:var(--sm-edge-invokes-active)}[_nghost-%COMP%] .link-kind-palette__btn--references .link-kind-palette__glyph{color:var(--sm-edge-references)}[_nghost-%COMP%] .link-kind-palette__btn--references[aria-pressed=true] .link-kind-palette__glyph{color:var(--sm-edge-references-active)}[_nghost-%COMP%] .link-kind-palette__btn--mentions .link-kind-palette__glyph{color:var(--sm-edge-mentions)}[_nghost-%COMP%] .link-kind-palette__btn--mentions[aria-pressed=true] .link-kind-palette__glyph{color:var(--sm-edge-mentions-active)}[_nghost-%COMP%] .link-kind-palette__btn--supersedes .link-kind-palette__glyph{color:var(--sm-edge-supersedes)}[_nghost-%COMP%] .link-kind-palette__btn--supersedes[aria-pressed=true] .link-kind-palette__glyph{color:var(--sm-edge-supersedes-active)}[_nghost-%COMP%] .link-kind-palette__tooltip .p-tooltip-text{white-space:pre-line;text-align:center;line-height:1.35}"],changeDetection:0})}return t})();var RD={a11y:{toolbarLabel:"Toggle severity filters"},error:{label:"Errors",tooltip:"Only nodes with errors"},warn:{label:"Warnings",tooltip:"Only nodes with warnings"}};var FD=()=>({class:"severity-palette__content"}),ND=t=>({content:t});function Wre(t,o){if(t&1&&(h(0,"span",5),N(1,"i",6),_(),h(2,"span",7),b(3),_()),t&2){let e=d(3);l(3),x(e.errorCount())}}function Kre(t,o){if(t&1){let e=W();h(0,"p-togglebutton",4),A("ngModelChange",function(){w(e);let i=d(2);return T(i.toggle("error"))}),I(1,Wre,4,1,"ng-template",null,0,We),_()}if(t&2){let e=d(2);m("ngModel",e.isActive("error"))("pTooltip",e.texts.error.tooltip)("ariaLabel",e.texts.error.label)("pt",Oe(5,ND,Jt(4,FD)))}}function Yre(t,o){if(t&1&&(h(0,"span",5),N(1,"i",9),_(),h(2,"span",7),b(3),_()),t&2){let e=d(3);l(3),x(e.warnCount())}}function Xre(t,o){if(t&1){let e=W();h(0,"p-togglebutton",8),A("ngModelChange",function(){w(e);let i=d(2);return T(i.toggle("warn"))}),I(1,Yre,4,1,"ng-template",null,0,We),_()}if(t&2){let e=d(2);m("ngModel",e.isActive("warn"))("pTooltip",e.texts.warn.tooltip)("ariaLabel",e.texts.warn.label)("pt",Oe(5,ND,Jt(4,FD)))}}function Zre(t,o){if(t&1&&(h(0,"div",1),M(1,Kre,3,7,"p-togglebutton",2),M(2,Xre,3,7,"p-togglebutton",3),_()),t&2){let e=d();O("aria-label",e.texts.a11y.toolbarLabel),l(),D(e.showError()?1:-1),l(),D(e.showWarn()?2:-1)}}var AD=(()=>{class t{loader=p(Ft);filters=p(rn);issuePaths=p(Co);mapVisibility=p(ni);texts=RD;visibleSet=E(()=>{let e=this.filters.apply(this.loader.nodes(),this.issuePaths.bySeverity()),n=new Set;for(let i of e)this.mapVisibility.inScope(i.path)&&n.add(i.path);return n});rawErrorCount=E(()=>this.issuePaths.bySeverity().errors.size);rawWarnCount=E(()=>this.issuePaths.bySeverity().warns.size);errorCount=E(()=>OD(this.issuePaths.bySeverity().errors,this.visibleSet()));warnCount=E(()=>OD(this.issuePaths.bySeverity().warns,this.visibleSet()));showError=E(()=>this.rawErrorCount()>0||this.filters.severityErrorActive());showWarn=E(()=>this.rawWarnCount()>0||this.filters.severityWarnActive());hasAny=E(()=>this.showError()||this.showWarn());constructor(){de(()=>{this.rawErrorCount()===0&&this.filters.severityErrorActive()&&this.filters.toggleSeverity("error"),this.rawWarnCount()===0&&this.filters.severityWarnActive()&&this.filters.toggleSeverity("warn")})}isActive(e){return this.filters.isSeverityActive(e)}toggle(e){this.filters.toggleSeverity(e)}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=z({type:t,selectors:[["sm-severity-palette"]],decls:1,vars:1,consts:[["content",""],["role","toolbar","data-testid","severity-palette",1,"severity-palette"],["styleClass","severity-palette__btn severity-palette__btn--error","data-testid","severity-palette-error",3,"ngModel","pTooltip","ariaLabel","pt"],["styleClass","severity-palette__btn severity-palette__btn--warn","data-testid","severity-palette-warn",3,"ngModel","pTooltip","ariaLabel","pt"],["styleClass","severity-palette__btn severity-palette__btn--error","data-testid","severity-palette-error",3,"ngModelChange","ngModel","pTooltip","ariaLabel","pt"],["aria-hidden","true",1,"severity-palette__glyph"],[1,"pi","pi-times-circle"],[1,"severity-palette__count"],["styleClass","severity-palette__btn severity-palette__btn--warn","data-testid","severity-palette-warn",3,"ngModelChange","ngModel","pTooltip","ariaLabel","pt"],[1,"pi","pi-exclamation-triangle"]],template:function(n,i){n&1&&M(0,Zre,3,3,"div",1),n&2&&D(i.hasAny()?0:-1)},dependencies:[Ot,nn,on,Qn,Zn,Ve,Be],styles:["[_nghost-%COMP%]{display:block;width:100%;pointer-events:auto}.severity-palette[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2px;padding:4px;background:color-mix(in srgb,var(--sm-bg-content) 80%,transparent);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);border:1px solid var(--sm-border);border-radius:var(--sm-radius-xl);box-shadow:var(--sm-shadow-floating)}.severity-palette__btn[_ngcontent-%COMP%]{--p-togglebutton-padding: 0;--p-togglebutton-content-padding: 0 .55rem;--p-togglebutton-border-radius: var(--sm-radius-pill);--p-togglebutton-content-border-radius: var(--sm-radius-pill);--p-togglebutton-gap: .4rem;--p-togglebutton-background: transparent;--p-togglebutton-checked-background: transparent;--p-togglebutton-hover-background: transparent;--p-togglebutton-border-color: transparent;--p-togglebutton-checked-border-color: transparent;--p-togglebutton-color: var(--p-text-muted-color);--p-togglebutton-hover-color: var(--p-text-color);--p-togglebutton-checked-color: var(--p-text-color);--p-togglebutton-icon-color: var(--p-text-muted-color);--p-togglebutton-icon-hover-color: var(--p-text-color);--p-togglebutton-icon-checked-color: var(--p-text-color);width:56px;height:30px;font-size:.72rem;font-weight:600;font-variant-numeric:tabular-nums}.severity-palette__btn--error[_ngcontent-%COMP%]{--p-togglebutton-content-checked-background: color-mix(in srgb, var(--sm-severity-error-bg) 55%, var(--sm-bg-content))}.severity-palette__btn--warn[_ngcontent-%COMP%]{--p-togglebutton-content-checked-background: color-mix(in srgb, var(--sm-severity-warn-bg) 55%, var(--sm-bg-content))}[_nghost-%COMP%] .severity-palette__content{width:100%;height:100%;justify-content:flex-start;display:flex;align-items:center;gap:.4rem}[_nghost-%COMP%] .severity-palette__count{flex:1;text-align:right}[_nghost-%COMP%] .severity-palette__glyph{display:inline-flex;align-items:center;justify-content:center;font-size:.95rem;line-height:1}[_nghost-%COMP%] .severity-palette__btn--error .severity-palette__glyph, [_nghost-%COMP%] .severity-palette__btn--error .severity-palette__count{color:color-mix(in srgb,var(--sm-severity-error) 55%,var(--p-text-muted-color))}[_nghost-%COMP%] .severity-palette__btn--warn .severity-palette__glyph, [_nghost-%COMP%] .severity-palette__btn--warn .severity-palette__count{color:color-mix(in srgb,var(--sm-severity-warn) 55%,var(--p-text-muted-color))}[_nghost-%COMP%] .severity-palette__btn--error:hover .severity-palette__glyph, [_nghost-%COMP%] .severity-palette__btn--error:hover .severity-palette__count{color:color-mix(in srgb,var(--sm-severity-error) 80%,var(--p-text-color))}[_nghost-%COMP%] .severity-palette__btn--warn:hover .severity-palette__glyph, [_nghost-%COMP%] .severity-palette__btn--warn:hover .severity-palette__count{color:color-mix(in srgb,var(--sm-severity-warn) 80%,var(--p-text-color))}[_nghost-%COMP%] .severity-palette__btn--error[aria-pressed=true] .severity-palette__glyph, [_nghost-%COMP%] .severity-palette__btn--error[aria-pressed=true] .severity-palette__count{color:var(--sm-severity-error)}[_nghost-%COMP%] .severity-palette__btn--warn[aria-pressed=true] .severity-palette__glyph, [_nghost-%COMP%] .severity-palette__btn--warn[aria-pressed=true] .severity-palette__count{color:var(--sm-severity-warn)}"],changeDetection:0})}return t})();function OD(t,o){let[e,n]=t.size<=o.size?[t,o]:[o,t],i=0;for(let r of e)n.has(r)&&i++;return i}function LD(t,o){let e=X(null),n=0;return de(()=>{let i=t().trim(),r=++n;e.set(null),i&&o(i).then(a=>{r===n&&e.set(a)}).catch(()=>{r===n&&e.set(null)})}),e.asReadonly()}function Ba(t,o){return hn(Ba),LD(t,e=>o.renderInline(e))}function u0(t,o){return hn(u0),LD(t,e=>o.render(e))}var Qre=/^#(?:[0-9a-f]{3}|[0-9a-f]{4}|[0-9a-f]{6}|[0-9a-f]{8})$/i,Jre=/^[a-z]+$/i;function uf(t){if(typeof t!="string")return null;let o=t.trim();return o.length===0?null:Qre.test(o)||Jre.test(o)?o:null}var eae=(t,o)=>o.step;function tae(t,o){t&1&&(h(0,"span",8),b(1),_()),t&2&&(l(),x(o))}function nae(t,o){if(t&1&&(h(0,"span",12)(1,"span",28),b(2,"T"),_(),b(3),_()),t&2){let e=d(),n=Ce(0);m("pTooltip",e.texts.stats.tokens(n.tokensTotal)),l(3),x(e.tokensShort())}}function iae(t,o){if(t&1&&(h(0,"span",13)(1,"span",28),b(2,"B"),_(),b(3),_()),t&2){let e=d(),n=Ce(0);m("pTooltip",e.texts.stats.bytes(n.bytesTotal)),l(3),x(e.bytesShort())}}function oae(t,o){if(t&1&&(h(0,"span",29),b(1),_()),t&2){let e=o.$implicit;l(),x(e)}}function rae(t,o){if(t&1&&(h(0,"span",30),b(1),_()),t&2){let e=d(2),n=Ce(2);l(),x(e.texts.tagOverflow(n))}}function aae(t,o){if(t&1&&(h(0,"div",17),ue(1,oae,2,1,"span",29,Ue),M(3,rae,2,1,"span",30),_()),t&2){d();let e=Ce(1),n=Ce(2);l(),pe(e),l(2),D(n>0?3:-1)}}function sae(t,o){if(t&1&&(h(0,"span",34),b(1),_()),t&2){let e=o.$implicit;l(),x(e)}}function lae(t,o){if(t&1&&(h(0,"div",31)(1,"span",32),b(2),_(),h(3,"div",33),ue(4,sae,2,1,"span",34,Ue),_()()),t&2){let e=d(),n=d(2);l(),m("pTooltip",n.texts.llm.topics.tooltip),l(),x(n.texts.llm.topics.label),l(2),pe(e.topics)}}function cae(t,o){if(t&1&&(h(0,"span",34),b(1),_()),t&2){let e=o.$implicit;l(),x(e)}}function dae(t,o){if(t&1&&(h(0,"div",31)(1,"span",32),b(2),_(),h(3,"div",33),ue(4,cae,2,1,"span",34,Ue),_()()),t&2){let e=d(),n=d(2);l(),m("pTooltip",n.texts.llm.facts.tooltip),l(),x(n.texts.llm.facts.label),l(2),pe(e.keyFacts)}}function uae(t,o){if(t&1&&(M(0,lae,6,2,"div",31),M(1,dae,6,2,"div",31)),t&2){let e=o;D(e.topics!=null&&e.topics.length?0:-1),l(),D(e.keyFacts!=null&&e.keyFacts.length?1:-1)}}function pae(t,o){if(t&1&&(h(0,"div",31)(1,"span",32),b(2),_(),h(3,"span"),b(4),_()()),t&2){let e=d(),n=d(2);l(),m("pTooltip",n.texts.llm.when.tooltip),l(),x(n.texts.llm.when.label),l(2),x(e.whenToUse)}}function hae(t,o){if(t&1&&(h(0,"div",31)(1,"span",32),b(2),_(),h(3,"span"),b(4),_()()),t&2){let e=d(),n=d(2);l(),m("pTooltip",n.texts.llm.style.tooltip),l(),x(n.texts.llm.style.label),l(2),x(e.interactionStyle)}}function fae(t,o){if(t&1&&(h(0,"span",34),b(1),_()),t&2){let e=o.$implicit;l(),x(e)}}function mae(t,o){if(t&1&&(h(0,"div",31)(1,"span",32),b(2),_(),h(3,"div",33),ue(4,fae,2,1,"span",34,Ue),_()()),t&2){let e=d(),n=d(2);l(),m("pTooltip",n.texts.llm.does.tooltip),l(),x(n.texts.llm.does.label),l(2),pe(e.capabilities)}}function _ae(t,o){if(t&1&&(M(0,pae,5,3,"div",31),M(1,hae,5,3,"div",31),M(2,mae,6,2,"div",31)),t&2){let e=o;D(e.whenToUse?0:-1),l(),D(e.interactionStyle?1:-1),l(),D(e.capabilities!=null&&e.capabilities.length?2:-1)}}function gae(t,o){if(t&1&&b(0),t&2){let e=o.$implicit,n=o.$index,i=o.$count;M0("",e.step,". ",e.description,"",n===i-1?"":" \xB7 ")}}function bae(t,o){if(t&1&&(h(0,"div",31)(1,"span",32),b(2),_(),h(3,"span"),ue(4,gae,1,3,null,null,eae),_()()),t&2){let e=d(),n=d(2);l(),m("pTooltip",n.texts.llm.steps.tooltip),l(),x(n.texts.llm.steps.label),l(2),pe(e.recipe)}}function vae(t,o){if(t&1&&(h(0,"span",34),b(1),_()),t&2){let e=o.$implicit;l(),x(e)}}function yae(t,o){if(t&1&&(h(0,"div",31)(1,"span",32),b(2),_(),h(3,"div",33),ue(4,vae,2,1,"span",34,Ue),_()()),t&2){let e=d(),n=d(2);l(),m("pTooltip",n.texts.llm.pre.tooltip),l(),x(n.texts.llm.pre.label),l(2),pe(e.preconditions)}}function Cae(t,o){if(t&1&&(h(0,"span",34),b(1),_()),t&2){let e=o.$implicit;l(),x(e)}}function xae(t,o){if(t&1&&(h(0,"div",31)(1,"span",32),b(2),_(),h(3,"div",33),ue(4,Cae,2,1,"span",34,Ue),_()()),t&2){let e=d(),n=d(2);l(),m("pTooltip",n.texts.llm.out.tooltip),l(),x(n.texts.llm.out.label),l(2),pe(e.outputs)}}function wae(t,o){if(t&1&&(h(0,"span",34),b(1),_()),t&2){let e=o.$implicit;l(),x(e)}}function Tae(t,o){if(t&1&&(h(0,"div",31)(1,"span",32),b(2),_(),h(3,"div",33),ue(4,wae,2,1,"span",34,Ue),_()()),t&2){let e=d(),n=d(2);l(),m("pTooltip",n.texts.llm.fx.tooltip),l(),x(n.texts.llm.fx.label),l(2),pe(e.sideEffects)}}function Sae(t,o){if(t&1&&(M(0,bae,6,2,"div",31),M(1,yae,6,2,"div",31),M(2,xae,6,2,"div",31),M(3,Tae,6,2,"div",31)),t&2){let e=o;D(e.recipe!=null&&e.recipe.length?0:-1),l(),D(e.preconditions!=null&&e.preconditions.length?1:-1),l(),D(e.outputs!=null&&e.outputs.length?2:-1),l(),D(e.sideEffects!=null&&e.sideEffects.length?3:-1)}}function kae(t,o){if(t&1&&(h(0,"div",31)(1,"span",32),b(2),_(),h(3,"code",35),b(4),_()()),t&2){let e=d(),n=d(2);l(),m("pTooltip",n.texts.llm.eg.tooltip),l(),x(n.texts.llm.eg.label),l(2),x(e.invocationExample)}}function Iae(t,o){if(t&1&&(h(0,"span",34),b(1),_()),t&2){let e=o.$implicit;l(),x(e)}}function Eae(t,o){if(t&1&&(h(0,"div",31)(1,"span",32),b(2),_(),h(3,"div",33),ue(4,Iae,2,1,"span",34,Ue),_()()),t&2){let e=d(),n=d(2);l(),m("pTooltip",n.texts.llm.fx.tooltip),l(),x(n.texts.llm.fx.label),l(2),pe(e.sideEffects)}}function Mae(t,o){if(t&1&&(M(0,kae,5,3,"div",31),M(1,Eae,6,2,"div",31)),t&2){let e=o;D(e.invocationExample?0:-1),l(),D(e.sideEffects!=null&&e.sideEffects.length?1:-1)}}function Dae(t,o){if(t&1&&(h(0,"div",22),M(1,uae,2,2),M(2,_ae,3,3),M(3,Sae,4,4),M(4,Mae,2,2),_()),t&2){let e,n,i,r,a=d();l(),D((e=a.summaryMarkdown())?1:-1,e),l(),D((n=a.summaryAgent())?2:-1,n),l(),D((i=a.summarySkill())?3:-1,i),l(),D((r=a.summaryCommand())?4:-1,r)}}function Pae(t,o){if(t&1&&N(0,"div",23),t&2){let e=d();m("innerHTML",e.descriptionHtml(),Ei)}}function Rae(t,o){if(t&1&&(h(0,"div",36)(1,"div",37)(2,"span",38),b(3),_(),h(4,"span",39),b(5),_()()()),t&2){let e=d(),n=d();l(3),x(n.texts.meta.model),l(2),x(e.model)}}function Oae(t,o){t&1&&M(0,Rae,6,2,"div",36),t&2&&D(o.model?0:-1)}var Fae={selected:!1,highlighted:!1,dimmed:!1},BD=(()=>{class t{node=B.required();stats=B({linksIn:0,linksOut:0});summary=B(null);selection=B(Fae);isFavorite=B(!1);favoriteToggle=et();texts=Vn;expanded=Di(!1);fmAgent=E(()=>{let e=this.node();return e.kind==="agent"?e.frontmatter:null});summaryAgent=E(()=>{let e=this.summary();return e?.kind==="agent"?e:null});summarySkill=E(()=>{let e=this.summary();return e?.kind==="skill"?e:null});summaryCommand=E(()=>{let e=this.summary();return e?.kind==="command"?e:null});summaryMarkdown=E(()=>{let e=this.summary();return e?.kind==="markdown"?e:null});hasLlmCluster=E(()=>{let e=this.summary();return e!==null&&this.hasLlmContent(e)});hasLlmContent(e){switch(e.kind){case"markdown":return(e.topics?.length??0)>0||(e.keyFacts?.length??0)>0;case"agent":return!!e.whenToUse||!!e.interactionStyle||(e.capabilities?.length??0)>0;case"skill":return(e.recipe?.length??0)>0||(e.preconditions?.length??0)>0||(e.outputs?.length??0)>0||(e.sideEffects?.length??0)>0;case"command":return!!e.invocationExample||(e.sideEffects?.length??0)>0;default:return!1}}nodeColor=E(()=>{let e=this.node();if(e.kind!=="agent")return null;let n=e.frontmatter;return uf(n.color)});markdown=p(yo);bytesShort=E(()=>{let e=this.stats().bytesTotal;return e===void 0?null:gr(e)});tokensShort=E(()=>{let e=this.stats().tokensTotal;return e===void 0?null:gr(e)});version=E(()=>ns(this.node()));stability=E(()=>mo(this.node()));tagChips=E(()=>_o(this.node()));visibleTagChips=E(()=>this.tagChips().slice(0,3));moreTagsCount=E(()=>Math.max(0,this.tagChips().length-3));displayName=E(()=>{let e=this.node().frontmatter;return e.name?e.name:ds(this.node().path)});description=E(()=>this.node().frontmatter.description??"");descriptionHtml=Ba(this.description,this.markdown);toggleExpanded(e){e.stopPropagation(),this.expanded.update(n=>!n)}toggleFavorite(e){e.stopPropagation();let n=!this.isFavorite();this.favoriteToggle.emit({path:this.node().path,value:n})}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=z({type:t,selectors:[["sm-node-card"]],hostAttrs:[1,"sm-gnode"],hostVars:15,hostBindings:function(n,i){n&2&&(O("data-kind",i.node().kind),Ne("--node-color",i.nodeColor()),se("sm-gnode--with-color",!!i.nodeColor())("sm-gnode--deprecated",i.stability()==="deprecated")("sm-gnode--expanded",i.expanded())("sm-gnode--selected",i.selection().selected)("sm-gnode--highlighted",i.selection().highlighted)("sm-gnode--dimmed",i.selection().dimmed))},inputs:{node:[1,"node"],stats:[1,"stats"],summary:[1,"summary"],selection:[1,"selection"],isFavorite:[1,"isFavorite"],expanded:[1,"expanded"]},outputs:{favoriteToggle:"favoriteToggle",expanded:"expandedChange"},decls:34,vars:30,consts:[[1,"sm-gnode__main"],["aria-hidden","true",1,"sm-gnode__icon-box"],[3,"kind","provider","size"],[1,"sm-gnode__content"],[1,"sm-gnode__name-row"],[1,"sm-gnode__name",3,"pTooltip"],["slot","card.title.right",3,"node"],[1,"sm-gnode__actions"],["data-testid","node-card-version",1,"sm-gnode__name-version"],["type","button",1,"sm-gnode__chevron",3,"click"],["aria-hidden","true",1,"pi","pi-chevron-down"],[1,"sm-gnode__sub"],[1,"sm-gnode__sub-stat","sm-gnode__sub-stat--tokens",3,"pTooltip"],[1,"sm-gnode__sub-stat","sm-gnode__sub-stat--bytes",3,"pTooltip"],["type","button","data-testid","node-card-favorite",1,"sm-gnode__favorite",3,"click","pTooltip"],["aria-hidden","true",1,"pi"],["slot","card.subtitle.left",3,"node"],["data-testid","node-card-tags",1,"sm-gnode__tagrow"],[1,"sm-gnode__panel"],["data-testid","node-card-path",1,"sm-gnode__path",3,"pTooltip"],["aria-hidden","true",1,"fa-regular","fa-folder-open","sm-gnode__path-icon"],[1,"sm-gnode__path-value"],[1,"sm-gnode__llm"],[1,"sm-gnode__desc",3,"innerHTML"],[1,"sm-gnode__footer"],["slot","card.footer.left",3,"node"],[1,"sm-gnode__footer-right-cluster"],["slot","card.footer.right",3,"node"],[1,"sm-gnode__sub-key"],[1,"sm-gnode__tag-chip"],["data-testid","node-card-tags-more",1,"sm-gnode__tag-more"],[1,"sm-gnode__llm-line"],[1,"sm-gnode__llm-label",3,"pTooltip"],[1,"sm-gnode__chips"],[1,"sm-gnode__chip","sm-gnode__chip--llm"],[1,"sm-gnode__llm-code"],[1,"sm-gnode__meta"],[1,"sm-gnode__meta-row"],[1,"sm-gnode__meta-label"],[1,"sm-gnode__meta-value","sm-gnode__meta-value--mono"]],template:function(n,i){if(n&1&&(Gt(0)(1)(2),h(3,"div",0)(4,"div",1),N(5,"sm-kind-icon",2),_(),h(6,"div",3)(7,"div",4)(8,"span",5),b(9),_(),N(10,"sm-view-contributions-host",6),_()(),h(11,"div",7),M(12,tae,2,1,"span",8),h(13,"button",9),A("click",function(a){return i.toggleExpanded(a)}),N(14,"i",10),_()(),h(15,"div",11),M(16,nae,4,2,"span",12),M(17,iae,4,2,"span",13),h(18,"button",14),A("click",function(a){return i.toggleFavorite(a)}),N(19,"i",15),_(),N(20,"sm-view-contributions-host",16),_()(),M(21,aae,4,1,"div",17),h(22,"div",18)(23,"div",19),N(24,"i",20),h(25,"span",21),b(26),_()(),M(27,Dae,5,4,"div",22),M(28,Pae,1,1,"div",23),M(29,Oae,1,1),_(),h(30,"div",24),N(31,"sm-view-contributions-host",25),h(32,"div",26),N(33,"sm-view-contributions-host",27),_()()),n&2){let r,a,s=i.node();Tt(i.stats()),l();let c=Tt(i.visibleTagChips());l(),Tt(i.moreTagsCount()),l(3),m("kind",s.kind)("provider",s.provider)("size",18),l(3),m("pTooltip",i.displayName()),l(),x(i.displayName()),l(),m("node",i.node()),l(2),D((r=i.version())?12:-1,r),l(),O("aria-label",i.texts.ariaExpand),l(3),D(i.tokensShort()!==null?16:-1),l(),D(i.bytesShort()!==null?17:-1),l(),se("sm-gnode__favorite--on",i.isFavorite()),m("pTooltip",i.isFavorite()?i.texts.favoriteRemoveTooltip:i.texts.favoriteAddTooltip),O("aria-label",i.isFavorite()?i.texts.ariaFavoriteRemove:i.texts.ariaFavoriteAdd),l(),se("pi-star-fill",i.isFavorite())("pi-star",!i.isFavorite()),l(),m("node",i.node()),l(),D(c.length?21:-1),l(2),m("pTooltip",s.path),l(3),x(s.path),l(),D(i.hasLlmCluster()?27:-1),l(),D(i.description()?28:-1),l(),D((a=i.fmAgent())?29:-1,a),l(2),m("node",i.node()),l(2),m("node",i.node())}},dependencies:[or,Ve,Be,ti],styles:['[_nghost-%COMP%]{--accent: var(--sm-kind-markdown);position:relative;display:inline-block;width:260px;background:var(--sm-bg-content);border:1px solid var(--sm-border);border-radius:var(--sm-radius-lg);box-shadow:var(--sm-shadow-card);overflow:hidden;transition:box-shadow .12s ease,border-color .12s ease,transform .12s ease;-webkit-user-select:none;user-select:none;text-align:start}[_nghost-%COMP%]:hover{box-shadow:var(--sm-shadow-card-hover)}[_nghost-%COMP%]:before{content:"";position:absolute;top:0;left:0;right:0;height:3px;background:var(--accent)}[data-kind="skill"][_nghost-%COMP%]{--accent: var(--sm-kind-skill)}[data-kind="agent"][_nghost-%COMP%]{--accent: var(--sm-kind-agent)}[data-kind="command"][_nghost-%COMP%]{--accent: var(--sm-kind-command)}[data-kind="markdown"][_nghost-%COMP%]{--accent: var(--sm-kind-markdown)}.sm-gnode--deprecated[_nghost-%COMP%]{opacity:.55}.sm-gnode--selected[_nghost-%COMP%]{border-color:var(--p-primary-color);box-shadow:0 0 0 2px var(--p-primary-color),0 4px 16px color-mix(in srgb,var(--p-primary-color) 25%,transparent)}.sm-gnode--highlighted[_nghost-%COMP%]{border-color:var(--p-primary-color);box-shadow:var(--sm-shadow-card-hover)}.sm-gnode--dimmed[_nghost-%COMP%]{opacity:.25}.sm-gnode__main[_ngcontent-%COMP%]{display:grid;grid-template-columns:auto minmax(0,1fr) auto;column-gap:.6rem;row-gap:.3rem;align-items:start;padding:.6rem .65rem}.sm-gnode__icon-box[_ngcontent-%COMP%]{--kind-bg: var(--sm-kind-markdown-bg);--kind-fg: var(--sm-kind-markdown-fg);width:38px;height:38px;border-radius:var(--sm-radius-lg);display:flex;align-items:center;justify-content:center;background:var(--kind-bg);color:var(--kind-fg);flex:none;font-size:1.05rem;grid-row:1 / span 2;align-self:center}[data-kind="skill"][_nghost-%COMP%] .sm-gnode__icon-box[_ngcontent-%COMP%]{--kind-bg: var(--sm-kind-skill-bg);--kind-fg: var(--sm-kind-skill-fg)}[data-kind="agent"][_nghost-%COMP%] .sm-gnode__icon-box[_ngcontent-%COMP%]{--kind-bg: var(--sm-kind-agent-bg);--kind-fg: var(--sm-kind-agent-fg)}[data-kind="command"][_nghost-%COMP%] .sm-gnode__icon-box[_ngcontent-%COMP%]{--kind-bg: var(--sm-kind-command-bg);--kind-fg: var(--sm-kind-command-fg)}[data-kind="markdown"][_nghost-%COMP%] .sm-gnode__icon-box[_ngcontent-%COMP%]{--kind-bg: var(--sm-kind-markdown-bg);--kind-fg: var(--sm-kind-markdown-fg)}.sm-gnode__content[_ngcontent-%COMP%]{min-width:0;width:100%;justify-self:stretch;display:flex;flex-direction:column;gap:.15rem}.sm-gnode__name-row[_ngcontent-%COMP%]{display:flex;align-items:baseline;gap:.35rem;min-width:0}.sm-gnode__name-row[_ngcontent-%COMP%] > sm-view-contributions-host[_ngcontent-%COMP%]{margin-left:auto;align-self:center}.sm-gnode__name[_ngcontent-%COMP%]{font-size:.9rem;font-weight:600;line-height:1.2;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--p-text-color);flex:0 1 auto;min-width:0}.sm-gnode__name-version[_ngcontent-%COMP%]{font-family:var(--sm-font-mono);font-size:.65rem;color:var(--sm-text-muted);background:color-mix(in srgb,var(--accent) 10%,transparent);padding:.05rem .35rem;border-radius:var(--sm-radius-sm);line-height:1.2;flex:none;align-self:center}.sm-gnode--with-color[_nghost-%COMP%] .sm-gnode__name[_ngcontent-%COMP%]{background:color-mix(in srgb,var(--node-color) 7%,transparent);padding:.05rem .4rem;border-radius:var(--sm-radius-sm)}.sm-gnode__actions[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:.2rem}.sm-gnode__confidence[_ngcontent-%COMP%]{display:flex;align-items:flex-start;font-size:.65rem;font-weight:600;font-variant-numeric:tabular-nums;line-height:1;flex:none;cursor:help;padding-top:.35rem}.sm-gnode__llm-marker--high[_ngcontent-%COMP%]{color:var(--sm-severity-success)}.sm-gnode__llm-marker--med[_ngcontent-%COMP%]{color:var(--sm-severity-warn)}.sm-gnode__llm-marker--low[_ngcontent-%COMP%]{color:var(--sm-severity-error)}.sm-gnode__chevron[_ngcontent-%COMP%]{width:22px;height:22px;display:inline-flex;align-items:center;justify-content:center;border:none;background:transparent;cursor:pointer;color:var(--sm-text-muted);border-radius:var(--sm-radius-md);transition:transform .16s ease,background .12s ease,color .12s ease}.sm-gnode__chevron[_ngcontent-%COMP%] .pi[_ngcontent-%COMP%]{font-size:.7rem;line-height:1}.sm-gnode__chevron[_ngcontent-%COMP%]:hover{background:var(--sm-bg-hover);color:var(--p-text-color)}.sm-gnode--expanded[_nghost-%COMP%] .sm-gnode__chevron[_ngcontent-%COMP%]{transform:rotate(180deg)}.sm-gnode__favorite[_ngcontent-%COMP%]{position:absolute;top:-3px;right:0;width:22px;height:22px;display:inline-flex;align-items:center;justify-content:center;border:none;background:transparent;cursor:pointer;color:var(--sm-text-muted);border-radius:var(--sm-radius-md);flex:none;transition:background .12s ease,color .12s ease}.sm-gnode__favorite[_ngcontent-%COMP%] .pi[_ngcontent-%COMP%]{font-size:.8rem;line-height:1}.sm-gnode__favorite[_ngcontent-%COMP%]:hover{background:var(--sm-bg-hover);color:var(--p-text-color)}.sm-gnode__favorite--on[_ngcontent-%COMP%], .sm-gnode__favorite--on[_ngcontent-%COMP%]:hover{color:var(--p-primary-color)}.sm-gnode__sub[_ngcontent-%COMP%]{position:relative;grid-column:2 / -1;grid-row:2;display:flex;flex-wrap:wrap;align-items:center;gap:6px;font-family:var(--sm-font-mono);font-size:.6rem;color:var(--sm-text-muted);line-height:1.2;margin-top:.1rem;min-width:0;width:100%;padding-right:28px}.sm-gnode__sub-stat[_ngcontent-%COMP%]{padding:.08rem .35rem;border-radius:var(--sm-radius-sm);background:var(--sm-bg-hover);font-family:var(--sm-font-mono);font-size:.6rem;color:var(--sm-text-muted);font-weight:400;flex:none}.sm-gnode__sub-stat[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.15rem}.sm-gnode__sub-stat[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:.65rem}.sm-gnode__sub-key[_ngcontent-%COMP%]{font-weight:700}.sm-gnode__sub-stat--tokens[_ngcontent-%COMP%]{background:var(--sm-stat-tokens-bg)}.sm-gnode__sub-stat--bytes[_ngcontent-%COMP%]{background:var(--sm-stat-bytes-bg)}.sm-gnode__panel[_ngcontent-%COMP%]{display:none;border-top:1px solid var(--sm-border)}.sm-gnode--expanded[_nghost-%COMP%] .sm-gnode__panel[_ngcontent-%COMP%]{display:block}.sm-gnode__llm[_ngcontent-%COMP%]{padding:.5rem .7rem;display:flex;flex-direction:column;gap:.25rem;font-size:.75rem;line-height:1.4}.sm-gnode__llm-line[_ngcontent-%COMP%]{display:flex;gap:.4rem;align-items:baseline;color:var(--p-text-color);font-style:italic;min-width:0}.sm-gnode__llm-label[_ngcontent-%COMP%]{flex:none;font-style:normal;color:var(--sm-text-muted);font-size:.6rem;letter-spacing:.04em;text-transform:uppercase;font-weight:600;min-width:2.2rem;padding-top:.2rem;cursor:help}.sm-gnode__chips[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:.25rem;flex:1;min-width:0}.sm-gnode__chip[_ngcontent-%COMP%]{font-size:.65rem;padding:.1rem .4rem;border-radius:var(--sm-radius-sm);border:1px solid var(--sm-border);background:var(--sm-bg-hover);color:var(--p-text-color);line-height:1.3}.sm-gnode__chip--mono[_ngcontent-%COMP%]{font-family:var(--sm-font-mono)}.sm-gnode__chip--allowed[_ngcontent-%COMP%]{border-style:dashed;background:transparent;color:var(--sm-text-muted)}.sm-gnode__chip--llm[_ngcontent-%COMP%]{font-style:italic}.sm-gnode__chip-required[_ngcontent-%COMP%]{color:var(--sm-severity-error);margin-left:2px}.sm-gnode__llm-code[_ngcontent-%COMP%]{font-family:var(--sm-font-mono);background:var(--sm-bg-hover);padding:.1rem .4rem;border-radius:var(--sm-radius-sm);font-size:.7rem;font-style:normal;color:var(--p-text-color)}.sm-gnode__path[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.35rem;padding:.4rem .7rem;font-family:var(--sm-font-mono);font-size:.68rem;color:var(--sm-text-muted);background:var(--sm-bg-hover);border-top:1px solid var(--sm-border);min-width:0}.sm-gnode__path-icon[_ngcontent-%COMP%]{flex:none;font-size:.7rem;color:var(--sm-text-muted)}.sm-gnode__path-value[_ngcontent-%COMP%]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;direction:rtl;unicode-bidi:plaintext;text-align:left}.sm-gnode__desc[_ngcontent-%COMP%]{padding:.55rem .7rem;font-size:.78rem;line-height:1.45;color:var(--p-text-color);max-height:140px;overflow-y:auto;overscroll-behavior:contain;border-top:1px solid var(--sm-border);scrollbar-width:thin;scrollbar-color:var(--sm-border) transparent}.sm-gnode__desc[_ngcontent-%COMP%]::-webkit-scrollbar{width:6px}.sm-gnode__desc[_ngcontent-%COMP%]::-webkit-scrollbar-track{background:transparent}.sm-gnode__desc[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:var(--sm-border);border-radius:var(--sm-radius-sm)}[_nghost-%COMP%] .sm-gnode__desc code{background:var(--sm-bg-hover);padding:.02rem .25rem;border-radius:var(--sm-radius-sm);font-family:var(--sm-font-mono);font-size:.85em}[_nghost-%COMP%] .sm-gnode__desc a{color:var(--p-primary-color);text-decoration:underline}.sm-gnode__meta[_ngcontent-%COMP%]{padding:.5rem .7rem;border-top:1px solid var(--sm-border);display:flex;flex-direction:column;gap:.35rem}.sm-gnode__meta-row[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:.5rem;font-size:.7rem;min-width:0}.sm-gnode__meta-label[_ngcontent-%COMP%]{color:var(--sm-text-muted);text-transform:uppercase;letter-spacing:.04em;font-weight:600;font-size:.6rem;flex:none;min-width:60px;padding-top:.15rem}.sm-gnode__meta-value[_ngcontent-%COMP%]{color:var(--p-text-color);font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sm-gnode__meta-value--mono[_ngcontent-%COMP%]{font-family:var(--sm-font-mono);background:var(--sm-bg-hover);padding:.08rem .4rem;border-radius:var(--sm-radius-sm);font-size:.68rem}.sm-gnode__footer[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.7rem;min-height:1.4rem;padding:.4rem .7rem;border-top:1px solid var(--sm-border);background:var(--sm-bg-hover);font-size:.7rem;color:var(--sm-text-muted)}.sm-gnode__footer-right-cluster[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.7rem;margin-left:auto}.sm-gnode__stat[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.3rem;line-height:1}.sm-gnode__stat[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:.6rem;line-height:1;display:block}.sm-gnode__stat[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{transform:translateY(1px)}.sm-gnode__stat-num[_ngcontent-%COMP%]{font-weight:600;color:var(--p-text-color);line-height:1;display:block}.sm-gnode__stat--error[_ngcontent-%COMP%]{background:var(--sm-severity-error-bg);color:var(--sm-severity-error);padding:.1rem .4rem;border-radius:var(--sm-radius-sm)}.sm-gnode__stat--error[_ngcontent-%COMP%] .sm-gnode__stat-num[_ngcontent-%COMP%]{color:var(--sm-severity-error)}.sm-gnode__stat--warn[_ngcontent-%COMP%]{background:var(--sm-severity-warn-bg);color:var(--sm-severity-warn);padding:.1rem .4rem;border-radius:var(--sm-radius-sm)}.sm-gnode__stat--warn[_ngcontent-%COMP%] .sm-gnode__stat-num[_ngcontent-%COMP%], .sm-gnode__stat--stale[_ngcontent-%COMP%]{color:var(--sm-severity-warn)}.sm-gnode__tagrow[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:center;gap:.25rem;padding:0 .65rem .35rem}.sm-gnode__tag-chip[_ngcontent-%COMP%]{font-size:.6rem;font-family:var(--sm-font-mono);padding:.05rem .35rem;border-radius:var(--sm-radius-sm);background:var(--sm-bg-hover);color:var(--sm-text-muted);border:1px solid var(--sm-border);line-height:1.4}.sm-gnode__tag-more[_ngcontent-%COMP%]{font-size:.6rem;color:var(--sm-text-muted);font-style:italic}'],changeDetection:0})}return t})();var VD={a11y:{expand:"Expand performance HUD",collapse:"Collapse performance HUD"},units:{fps:t=>`${t} fps`,ms:t=>`${t}ms`,mb:t=>`${t} MB`,longTasks:t=>`${t} long`,domNodes:t=>`${t} dom`,nodes:(t,o)=>`${t}/${o} nodes`,links:t=>`${t} links`}};var Nae=["sparkline"],Aae=()=>({class:"perf-hud__content"}),Lae=t=>({content:t});function Bae(t,o){if(t&1&&(h(0,"span",9),b(1),_()),t&2){let e=d(2);l(),x(e.texts.units.mb(e.heapMb()))}}function Vae(t,o){if(t&1&&(h(0,"div",3)(1,"span",4),b(2),_()(),h(3,"div",5)(4,"div",6)(5,"div",7),N(6,"canvas",8,1),h(8,"span",9),b(9),_()(),h(10,"div",10)(11,"div",11),M(12,Bae,2,1,"span",9),h(13,"span",9),b(14),_(),h(15,"span",9),b(16),_()()(),h(17,"div",10)(18,"div",11)(19,"span",9),b(20),_(),h(21,"span",9),b(22),_()()()()()),t&2){let e=d();l(2),x(e.texts.units.fps(e.fps())),l(),O("aria-hidden",!e.expanded()),l(6),x(e.texts.units.ms(e.frameTimeMs())),l(3),D(e.hasHeap()?12:-1),l(2),x(e.texts.units.domNodes(e.domNodes())),l(2),x(e.texts.units.longTasks(e.longTasks())),l(4),x(e.texts.units.nodes(e.visible(),e.total())),l(2),x(e.texts.units.links(e.edges()))}}var zae=30,p0=60,pf=14,zD=(()=>{class t{visible=B(0);total=B(0);edges=B(0);texts=VD;destroyRef=p(xt);zone=p(Zt);fps=X(0);frameTimeMs=X(0);fpsSamples=X([]);sparklineCanvas=nt("sparkline");heapMb=X(null);longTasks=X(0);domNodes=X(0);expanded=X(Hae());hasHeap=E(()=>this.heapMb()!==null);constructor(){let e=0,n=0,i=performance.now(),r=i,a=0,s=u=>{let f=u-i;if(i=u,e+=1,n+=f,u-r>=1e3){let g=(u-r)/1e3,C=Math.round(e/g);this.fps.set(C),this.frameTimeMs.set(Math.round(n/Math.max(e,1))),this.heapMb.set(Gae()),this.domNodes.set(document.querySelectorAll("*").length),this.fpsSamples.update(k=>{let S=k.length>=zae?k.slice(1):k.slice();return S.push(C),S}),e=0,n=0,r=u}a=requestAnimationFrame(s)};this.zone.runOutsideAngular(()=>{a=requestAnimationFrame(s)});let c=null;if(typeof PerformanceObserver<"u")try{c=new PerformanceObserver(u=>{this.longTasks.update(f=>f+u.getEntries().length)}),c.observe({type:"longtask",buffered:!0})}catch{}this.destroyRef.onDestroy(()=>{cancelAnimationFrame(a),c?.disconnect()}),de(()=>{let u=this.sparklineCanvas(),f=this.fpsSamples();u&&jae(u.nativeElement,f)})}setExpanded(e){this.expanded.set(e),qae(e)}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=z({type:t,selectors:[["sm-perf-hud"]],viewQuery:function(n,i){n&1&&_n(i.sparklineCanvas,Nae,5),n&2&&Ht()},inputs:{visible:[1,"visible"],total:[1,"total"],edges:[1,"edges"]},decls:3,vars:7,consts:[["content",""],["sparkline",""],["data-testid","perf-hud",3,"ngModelChange","ngModel","ariaLabel","styleClass","pt"],[1,"perf-hud__header"],[1,"perf-hud__cell","perf-hud__cell--fps"],[1,"perf-hud__expandable"],[1,"perf-hud__expandable-inner"],[1,"perf-hud__row","perf-hud__row--sparkline"],["aria-hidden","true",1,"perf-hud__sparkline"],[1,"perf-hud__cell"],[1,"perf-hud__section"],[1,"perf-hud__row"]],template:function(n,i){n&1&&(h(0,"p-togglebutton",2),A("ngModelChange",function(a){return i.setExpanded(a)}),I(1,Vae,23,8,"ng-template",null,0,We),_()),n&2&&m("ngModel",i.expanded())("ariaLabel",i.expanded()?i.texts.a11y.collapse:i.texts.a11y.expand)("styleClass",i.expanded()?"perf-hud perf-hud--expanded":"perf-hud")("pt",Oe(5,Lae,Jt(4,Aae)))},dependencies:[Ot,nn,on,Qn,Zn],styles:["[_nghost-%COMP%]{position:absolute;bottom:16px;left:16px;z-index:2;pointer-events:none}.perf-hud[_ngcontent-%COMP%]{pointer-events:auto;--p-togglebutton-padding: 0;--p-togglebutton-content-padding: .25rem .7rem;--p-togglebutton-border-radius: var(--sm-radius-pill);--p-togglebutton-content-border-radius: var(--sm-radius-pill);--p-togglebutton-gap: .4rem;--p-togglebutton-background: var(--sm-bg-content);--p-togglebutton-checked-background: var(--sm-bg-content);--p-togglebutton-hover-background: var(--sm-bg-content);--p-togglebutton-border-color: var(--sm-border);--p-togglebutton-checked-border-color: var(--sm-border);--p-togglebutton-content-checked-background: transparent;--p-togglebutton-color: var(--p-text-muted-color);--p-togglebutton-hover-color: var(--p-text-color);--p-togglebutton-checked-color: var(--p-text-muted-color);box-shadow:var(--sm-shadow-floating);font-family:var(--sm-font-mono);font-size:.7rem;font-weight:500;line-height:14px;opacity:.75;transition:opacity .15s ease,color .15s ease}.perf-hud[_ngcontent-%COMP%]:hover{opacity:1}.perf-hud--expanded[_ngcontent-%COMP%]{--p-togglebutton-border-radius: var(--sm-radius-md);--p-togglebutton-content-border-radius: var(--sm-radius-md);--p-togglebutton-content-padding: .45rem .7rem;line-height:1.35;opacity:.95}[_nghost-%COMP%] .perf-hud__content{display:flex;flex-direction:column;align-items:stretch;gap:0}.perf-hud__cell[_ngcontent-%COMP%]{white-space:nowrap;font-variant-numeric:tabular-nums}.perf-hud--expanded[_ngcontent-%COMP%] .perf-hud__cell--fps[_ngcontent-%COMP%]{font-weight:600;color:var(--p-text-color)}.perf-hud__sparkline[_ngcontent-%COMP%]{width:60px;height:14px;opacity:.6}.perf-hud__header[_ngcontent-%COMP%]{display:flex;align-items:center}.perf-hud__expandable[_ngcontent-%COMP%]{display:grid;grid-template-rows:0fr;grid-template-columns:0fr;overflow:hidden;transition:grid-template-rows .22s ease,grid-template-columns .22s ease}.perf-hud--expanded[_ngcontent-%COMP%] .perf-hud__expandable[_ngcontent-%COMP%]{grid-template-rows:1fr;grid-template-columns:1fr}.perf-hud__expandable-inner[_ngcontent-%COMP%]{min-height:0;min-width:0;overflow:hidden;display:flex;flex-direction:column;gap:.3rem;padding-top:0;transition:padding-top .22s ease}.perf-hud--expanded[_ngcontent-%COMP%] .perf-hud__expandable-inner[_ngcontent-%COMP%]{padding-top:.3rem}.perf-hud__section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.15rem;padding-top:.3rem;border-top:1px solid var(--sm-border)}.perf-hud__section[_ngcontent-%COMP%]:first-child{padding-top:0;border-top:0}.perf-hud__row[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;gap:.6rem;white-space:nowrap}.perf-hud__row--sparkline[_ngcontent-%COMP%]{justify-content:space-between;gap:.6rem}"],changeDetection:0})}return t})(),HD="sm.perf-hud.expanded";function Hae(){try{return localStorage.getItem(HD)==="1"}catch{return!1}}function qae(t){try{localStorage.setItem(HD,t?"1":"0")}catch{}}function Gae(){let t=performance.memory;return t?Math.round(t.usedJSHeapSize/1024/1024):null}function jae(t,o){let e=window.devicePixelRatio||1,n=p0*e,i=pf*e;(t.width!==n||t.height!==i)&&(t.width=n,t.height=i);let r=t.getContext("2d");if(!r||(r.setTransform(e,0,0,e,0,0),r.clearRect(0,0,p0,pf),o.length<2))return;let a=Math.max(60,...o),s=p0/(o.length-1);r.beginPath();for(let c=0;c<o.length;c+=1){let u=c*s,f=pf-o[c]/a*pf;c===0?r.moveTo(u,f):r.lineTo(u,f)}r.strokeStyle=getComputedStyle(t).color,r.lineWidth=1,r.stroke()}var Uae="debug-fps",qD=(()=>{class t{visible=X(this.resolveInitial());resolveInitial(){let n=new URLSearchParams(window.location.search).get(Uae);return n!==null&&n!=="0"&&n!=="false"?!0:n==="0"||n==="false"?!1:ir.graph.perfHud}static \u0275fac=function(n){return new(n||t)};static \u0275prov=y({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var Si={emptyNoSelection:{title:"No node selected",desc:"Select a node to inspect it."},emptyNotFound:{title:"Node not found",descSuffix:" This node is no longer in the scan."},header:{invalidFrontmatter:"invalid frontmatter",invalidFrontmatterTooltip:"The YAML frontmatter could not be parsed, so name, description and other metadata are unavailable. Check the Findings section for the parser error.",tagFilterAriaLabel:t=>`Select every node tagged ${t} on the map`},sections:{annotations:"Annotations",connections:"Connections",findings:"Findings",metadata:"Metadata",plugins:"Plugin contributions",viewContributions:"View contributions",body:"Body"},body:{loading:"Loading body\u2026"},bump:{label:"Bump version",tooltipEnabled:"Increment the sidecar version and refresh hashes.",tooltipDisabledFresh:"No drift detected (bump is only available when the body or frontmatter has changed since the last bump).",tooltipDisabledNoSidecar:"No sidecar yet. Run `sm sidecar annotate <path>` from your terminal to create one.",errorPrefix:"Bump failed:",errorFresh:"This node is fresh; nothing to bump.",errorNotFound:"Node not found on the server.",errorGeneric:"Could not bump the sidecar.",consentHeader:"Allow skill-map to create files in this project?",consentMessage:`Skill-map will create companion files (*.sm) next to your markdown files to track version, history and tags. Your markdown stays clean, metadata never gets mixed into the content you wrote.
2205
+
2206
+ The choice is per-project and per-machine, it does not travel with the repo, and we won't ask again.`,consentAccept:"Yes, allow",consentReject:"Not now",consentDialogAriaLabel:"Sidecar consent"},findingHintLabel:"Hint:",bumpErrorDismissAriaLabel:"Dismiss",audit:{headerEmpty:"never bumped",fields:{lastBumpedAt:"Last bumped",lastBumpedBy:"by",createdAt:"Created",createdBy:"by"}},supersededByBanner:t=>`Superseded by ${t}`,actionMocks:{label:"Actions",summary:"Generate summary",audit:"Run audit",validate:"Validate"}};var GD=(()=>{class t{dataSource=p(ei);async bump(e,n={}){return this.dataSource.bumpSidecar(e,n)}static \u0275fac=function(n){return new(n||t)};static \u0275prov=y({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var jD={cardHeader:"Annotations",emptyOverlay:"No sidecar (.sm) file present for this node.",emptyAnnotations:"Sidecar present but no annotations are declared yet.",sections:{supersession:"Supersession",provenance:"Authors",repository:"Repository",docs:"Docs"},fields:{supersedes:"Supersedes",supersededBy:"Superseded by",authors:"Authors",license:"License",source:"Source",sourceVersion:"Source version",docsUrl:"Docs URL"},brokenRefTooltip:"This path does not resolve to a node in the current scan scope."};function Va(t){if(typeof t!="string"||t.length===0)return null;try{let o=new URL(t);return o.protocol==="http:"||o.protocol==="https:"?t:null}catch{return null}}function $ae(t,o){if(t&1&&(h(0,"p",1),b(1),_()),t&2){let e=d(2);l(),x(e.texts.emptyOverlay)}}function Wae(t,o){if(t&1&&(h(0,"p",2),b(1),_()),t&2){let e=d(2);l(),x(e.texts.emptyAnnotations)}}function Kae(t,o){if(t&1&&M(0,$ae,2,1,"p",1)(1,Wae,2,1,"p",2),t&2){let e,n=d();D((e=n.overlay())!=null&&e.present?1:0)}}function Yae(t,o){if(t&1&&(h(0,"span",4),N(1,"i",5),h(2,"span"),b(3),_()()),t&2){let e=o.$implicit;l(3),x(e)}}function Xae(t,o){if(t&1&&ue(0,Yae,4,1,"span",4,Ue),t&2){d();let e=Ce(0);pe(e.authors)}}function Zae(t,o){if(t&1&&(h(0,"span",4),N(1,"i",6),h(2,"span"),b(3),_()()),t&2){d();let e=Ce(0);l(3),x(e.license)}}function Qae(t,o){if(t&1&&(Gt(0),h(1,"dt"),b(2),_(),h(3,"dd",3),M(4,Xae,2,0),M(5,Zae,4,1,"span",4),_()),t&2){let e=d(2),n=Tt(e.provenance());l(2),x(e.texts.sections.provenance),l(2),D(n.authors.length?4:-1),l(),D(n.license!==null?5:-1)}}function Jae(t,o){if(t&1){let e=W();h(0,"a",11),A("click",function(){w(e),d(2);let i=Ce(0),r=d(2);return T(r.onOpenPath(i.supersededBy))})("keydown.enter",function(){w(e),d(2);let i=Ce(0),r=d(2);return T(r.onOpenPath(i.supersededBy))})("keydown.space",function(i){w(e),d(2);let r=Ce(0);return d(2).onOpenPath(r.supersededBy),T(i.preventDefault())}),b(1),_()}if(t&2){d(2);let e=Ce(0);l(),ke(" ",e.supersededBy," ")}}function ese(t,o){if(t&1&&(h(0,"span",10),b(1),_()),t&2){d(2);let e=Ce(0),n=d(2);m("pTooltip",n.texts.brokenRefTooltip),l(),x(e.supersededBy)}}function tse(t,o){if(t&1&&(h(0,"span",4),N(1,"i",8),h(2,"span"),b(3),_()(),M(4,Jae,2,1,"a",9)(5,ese,2,2,"span",10)),t&2){d();let e=Ce(0),n=d(2);l(3),x(n.texts.fields.supersededBy),l(),D(n.isBroken(e.supersededBy)?5:4)}}function nse(t,o){if(t&1){let e=W();h(0,"a",11),A("click",function(){w(e);let i=d().$implicit,r=d(4);return T(r.onOpenPath(i))})("keydown.enter",function(){w(e);let i=d().$implicit,r=d(4);return T(r.onOpenPath(i))})("keydown.space",function(i){w(e);let r=d().$implicit;return d(4).onOpenPath(r),T(i.preventDefault())}),b(1),_()}if(t&2){let e=d().$implicit;l(),ke(" ",e," ")}}function ise(t,o){if(t&1&&(h(0,"span",10),b(1),_()),t&2){let e=d().$implicit,n=d(4);m("pTooltip",n.texts.brokenRefTooltip),l(),x(e)}}function ose(t,o){if(t&1&&M(0,nse,2,1,"a",9)(1,ise,2,2,"span",10),t&2){let e=o.$implicit,n=d(4);D(n.isBroken(e)?1:0)}}function rse(t,o){if(t&1&&(h(0,"span",4),N(1,"i",12),h(2,"span"),b(3),_()(),ue(4,ose,2,1,null,null,Ue)),t&2){d();let e=Ce(0),n=d(2);l(3),x(n.texts.fields.supersedes),l(),pe(e.supersedes)}}function ase(t,o){if(t&1&&(Gt(0),h(1,"dt"),b(2),_(),h(3,"dd",7),M(4,tse,6,2),M(5,rse,6,1),_()),t&2){let e=d(2),n=Tt(e.supersession());l(2),x(e.texts.sections.supersession),l(2),D(n.supersededBy!==null?4:-1),l(),D(n.supersedes.length?5:-1)}}function sse(t,o){if(t&1&&(h(0,"span",4),N(1,"i",14),h(2,"a",15),b(3),_()()),t&2){d();let e=Ce(0);l(2),m("href",e.source,cr),l(),x(e.source)}}function lse(t,o){if(t&1&&(h(0,"span",4),N(1,"i",16),h(2,"code"),b(3),_()()),t&2){d();let e=Ce(0);l(3),x(e.sourceVersion)}}function cse(t,o){if(t&1&&(Gt(0),h(1,"dt"),b(2),_(),h(3,"dd",13),M(4,sse,4,2,"span",4),M(5,lse,4,1,"span",4),_()),t&2){let e=d(2),n=Tt(e.repository());l(2),x(e.texts.sections.repository),l(2),D(n.source!==null?4:-1),l(),D(n.sourceVersion!==null?5:-1)}}function dse(t,o){if(t&1&&(h(0,"span",4),N(1,"i",18),h(2,"a",15),b(3),_()()),t&2){d();let e=Ce(0);l(2),m("href",e.docsUrl,cr),l(),x(e.docsUrl)}}function use(t,o){if(t&1&&(Gt(0),h(1,"dt"),b(2),_(),h(3,"dd",17),M(4,dse,4,2,"span",4),_()),t&2){let e=d(2),n=Tt(e.docs());l(2),x(e.texts.sections.docs),l(2),D(n.docsUrl!==null?4:-1)}}function pse(t,o){if(t&1&&(h(0,"dl",0),M(1,Qae,6,4),M(2,ase,6,4),M(3,cse,6,4),M(4,use,5,3),_()),t&2){let e=d();l(),D(e.hasProvenance()?1:-1),l(),D(e.hasSupersession()?2:-1),l(),D(e.hasRepository()?3:-1),l(),D(e.hasDocs()?4:-1)}}var $D=(()=>{class t{overlay=B(void 0);knownPaths=B(null);openPath=et();texts=jD;annotations=E(()=>{let e=this.overlay();return!e||!e.present?null:e.annotations??null});hasAnnotations=E(()=>{let e=this.annotations();return e!==null&&Object.keys(e).length>0});hasAnyContent=E(()=>this.hasSupersession()||this.hasProvenance()||this.hasRepository()||this.hasDocs());supersession=E(()=>{let e=this.annotations()??{};return{supersedes:UD(e.supersedes),supersededBy:h0(e.supersededBy)}});hasSupersession=E(()=>hf(this.supersession()));provenance=E(()=>{let e=this.annotations()??{};return{authors:UD(e.authors),license:h0(e.license)}});hasProvenance=E(()=>hf(this.provenance()));repository=E(()=>{let e=this.annotations()??{};return{source:Va(e.source),sourceVersion:h0(e.sourceVersion)}});hasRepository=E(()=>hf(this.repository()));docs=E(()=>{let e=this.annotations()??{};return{docsUrl:Va(e.docsUrl)}});hasDocs=E(()=>hf(this.docs()));isBroken(e){let n=this.knownPaths();return n?!n.has(e):!1}onOpenPath(e){this.isBroken(e)||this.openPath.emit(e)}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=z({type:t,selectors:[["sm-annotations-panel"]],inputs:{overlay:[1,"overlay"],knownPaths:[1,"knownPaths"]},outputs:{openPath:"openPath"},decls:2,vars:1,consts:[[1,"ann-panel__rows","sm-block__kv"],["data-testid","annotations-panel-empty-overlay",1,"ann-panel__empty"],["data-testid","annotations-panel-empty-annotations",1,"ann-panel__empty"],["data-testid","annotations-section-provenance",1,"sm-block__inline"],[1,"sm-block__meta"],["aria-hidden","true",1,"pi","pi-user"],["aria-hidden","true",1,"pi","pi-shield"],["data-testid","annotations-section-supersession",1,"sm-block__inline"],["aria-hidden","true",1,"pi","pi-arrow-down"],["role","button","tabindex","0",1,"sm-node-link","sm-node-link--known"],[1,"sm-node-link",3,"pTooltip"],["role","button","tabindex","0",1,"sm-node-link","sm-node-link--known",3,"click","keydown.enter","keydown.space"],["aria-hidden","true",1,"pi","pi-arrow-up"],["data-testid","annotations-section-repository",1,"sm-block__inline"],["aria-hidden","true",1,"pi","pi-link"],["target","_blank","rel","noopener noreferrer",3,"href"],["aria-hidden","true",1,"pi","pi-tag"],["data-testid","annotations-section-docs",1,"sm-block__inline"],["aria-hidden","true",1,"pi","pi-external-link"]],template:function(n,i){n&1&&M(0,Kae,2,1)(1,pse,5,4,"dl",0),n&2&&D(i.hasAnyContent()?1:0)},dependencies:[Ve,Be],styles:["[_nghost-%COMP%]{display:block}.ann-panel__empty[_ngcontent-%COMP%]{color:var(--sm-text-muted);font-style:italic;font-size:.85rem;margin:0}.ann-panel__rows[_ngcontent-%COMP%] dd[_ngcontent-%COMP%]{display:flex;align-items:center}"],changeDetection:0})}return t})();function h0(t){return typeof t=="string"&&t.length>0?t:null}function UD(t){return Array.isArray(t)?t.filter(o=>typeof o=="string"&&o.length>0):[]}function hf(t){for(let o of Object.values(t))if(o!=null){if(Array.isArray(o)){if(o.length>0)return!0;continue}if(typeof o=="string"){if(o.length>0)return!0;continue}return!0}return!1}var WD={outgoingHeader:"Outgoing",incomingHeader:"Incoming",loading:"Loading links\u2026",error:"Failed to load links.",confidence:{high:"high",medium:"medium",low:"low"},confidenceTooltip:t=>`confidence: ${t}`,issueOnTargetTooltip:"Target has an issue: ",issueOnSourceTooltip:"Source has an issue: ",externalRefsHeader:"External"};var YD=(t,o)=>o.source+"|"+o.target+"|"+o.kind+"|"+((o.trigger==null?null:o.trigger.normalizedTrigger)??""),hse=(t,o)=>o.url+"|"+(o.line??-1);function fse(t,o){if(t&1&&(h(0,"p",1),b(1),_()),t&2){let e=d(2);l(),x(e.texts.loading)}}function mse(t,o){if(t&1&&(h(0,"p",2),b(1),_()),t&2){let e=d(2);l(),x(e.texts.error)}}function _se(t,o){if(t&1&&(h(0,"span",12),b(1),_()),t&2){let e=d().$implicit;O("data-testid","linked-nodes-outgoing-link-"+e.target),l(),x(e.target)}}function gse(t,o){if(t&1){let e=W();h(0,"button",17),A("click",function(){w(e);let i=d().$implicit,r=d(4);return T(r.onOpen(i.resolvedTarget??i.target))}),b(1),_()}if(t&2){let e=d().$implicit;O("data-testid","linked-nodes-outgoing-link-"+e.target),l(),x(e.target)}}function bse(t,o){if(t&1&&(h(0,"span",16),b(1),_()),t&2){let e=o,n=d().$implicit;m("pTooltip",e.message),O("data-severity",e.severity)("data-testid","linked-nodes-outgoing-issue-"+n.target),l(),x(e.analyzerId)}}function vse(t,o){if(t&1&&(h(0,"li",11),M(1,_se,2,2,"span",12)(2,gse,2,2,"button",13),h(3,"span",14),b(4),_(),h(5,"span",15),b(6),_(),M(7,bse,2,4,"span",16),_()),t&2){let e,n=o.$implicit,i=d(4);O("data-testid","linked-nodes-outgoing-row-"+n.target),l(),D(i.outgoingBroken(n)?1:2),l(2),Ne("color",i.confidenceColor(n.confidence))("border-color",i.confidenceColor(n.confidence)),m("pTooltip",i.confidenceTooltip(n.confidence)),l(),x(i.confidenceValue(n.confidence)),l(),O("data-kind",n.kind),l(),x(n.kind),l(),D((e=i.issueForOutgoing(n))?7:-1,e)}}function yse(t,o){if(t&1&&(h(0,"section",3)(1,"h4",6),N(2,"sm-icon",7),h(3,"span",8),b(4),_(),h(5,"span",9),b(6),_()(),h(7,"ul",10),ue(8,vse,8,11,"li",11,YD),_()()),t&2){let e=d(3);l(4),x(e.outgoing().length),l(2),x(e.texts.outgoingHeader),l(2),pe(e.outgoing())}}function Cse(t,o){if(t&1){let e=W();h(0,"li",11)(1,"button",17),A("click",function(){let i=w(e).$implicit,r=d(4);return T(r.onOpen(i.source))}),b(2),_(),h(3,"span",14),b(4),_(),h(5,"span",15),b(6),_()()}if(t&2){let e=o.$implicit,n=d(4);O("data-testid","linked-nodes-incoming-row-"+e.source),l(),O("data-testid","linked-nodes-incoming-link-"+e.source),l(),x(e.source),l(),Ne("color",n.confidenceColor(e.confidence))("border-color",n.confidenceColor(e.confidence)),m("pTooltip",n.confidenceTooltip(e.confidence)),l(),x(n.confidenceValue(e.confidence)),l(),O("data-kind",e.kind),l(),x(e.kind)}}function xse(t,o){if(t&1&&(h(0,"section",4)(1,"h4",6),N(2,"sm-icon",18),h(3,"span",19),b(4),_(),h(5,"span",9),b(6),_()(),h(7,"ul",10),ue(8,Cse,7,11,"li",11,YD),_()()),t&2){let e=d(3);l(4),x(e.incoming().length),l(2),x(e.texts.incomingHeader),l(2),pe(e.incoming())}}function wse(t,o){if(t&1&&(h(0,"li",23)(1,"a",24),b(2),_()()),t&2){let e=o.$implicit;O("data-testid","linked-nodes-external-ref-"+e.url),l(),m("href",e.url,cr)("pTooltip",e.url),l(),x(e.url)}}function Tse(t,o){if(t&1&&(h(0,"section",5)(1,"h4",6),N(2,"sm-icon",20),h(3,"span",21),b(4),_(),h(5,"span",9),b(6),_()(),h(7,"ul",22),ue(8,wse,3,4,"li",23,hse),_()()),t&2){let e=d(3);l(4),x(e.externalRefs().length),l(2),x(e.texts.externalRefsHeader),l(2),pe(e.externalRefs())}}function Sse(t,o){if(t&1&&(M(0,yse,10,2,"section",3),M(1,xse,10,2,"section",4),M(2,Tse,10,2,"section",5)),t&2){let e=d(2);D(e.outgoing().length>0?0:-1),l(),D(e.incoming().length>0?1:-1),l(),D(e.externalRefs().length>0?2:-1)}}function kse(t,o){if(t&1&&(h(0,"div",0),M(1,fse,2,1,"p",1)(2,mse,2,1,"p",2)(3,Sse,3,3),_()),t&2){let e,n=d();l(),D((e=n.state())==="loading"?1:e==="error"?2:e==="ready"?3:-1)}}var XD=(()=>{class t{dataSource=p(ei);wsEvents=p(cs);destroyRef=p(xt);texts=WD;path=B(null);openPath=et();state=X("idle");outgoingRaw=X([]);incomingRaw=X([]);outgoing=E(()=>this.outgoingRaw().filter(e=>!KD(e)));incoming=E(()=>this.incomingRaw().filter(e=>!KD(e)));issues=X([]);externalRefsRaw=X([]);externalRefs=E(()=>this.externalRefsRaw().filter(e=>Va(e.url)!==null));fetchToken=0;hasResults=E(()=>this.state()==="ready"&&(this.outgoing().length>0||this.incoming().length>0));constructor(){this.wsEvents.scanCompleted$.pipe(Jn(this.destroyRef)).subscribe(()=>{let e=this.path();e&&this.fetch(e)}),de(()=>{let e=this.path();if(!e){this.fetchToken++,this.state.set("idle"),this.outgoingRaw.set([]),this.incomingRaw.set([]);return}this.fetch(e)})}onOpen(e){this.openPath.emit(e)}confidenceTooltip(e){return this.texts.confidenceTooltip(this.texts.confidence[Iv(e)])}confidenceValue(e){return e.toFixed(2)}confidenceColor(e){let n=Math.max(0,Math.min(1,e));return`hsl(${Math.round(n*120)}, 60%, 50%)`}outgoingBroken(e){return this.issueForOutgoing(e)?.severity==="error"}issueForOutgoing(e){let n=this.path();if(!n)return null;let i=[e.target,e.resolvedTarget].filter(r=>typeof r=="string");return this.issues().find(r=>{if(!r.nodeIds.includes(n))return!1;let a=r.data?.target;return typeof a!="string"?!1:i.includes(a)})??null}async fetch(e){let n=++this.fetchToken;this.state.set("loading");try{let[i,r,a]=await Promise.allSettled([this.dataSource.listLinks({from:e}),this.dataSource.listLinks({to:e}),this.dataSource.getNode(e)]);if(n!==this.fetchToken)return;if(i.status!=="fulfilled"||r.status!=="fulfilled"){this.outgoingRaw.set([]),this.incomingRaw.set([]),this.issues.set([]),this.externalRefsRaw.set([]),this.state.set("error");return}let s=i.value.items,c=r.value.items,u=Ise(e,s,c),f;try{let g=await this.dataSource.listIssues({nodes:u});if(n!==this.fetchToken)return;f=g.items}catch{if(n!==this.fetchToken)return;this.outgoingRaw.set([]),this.incomingRaw.set([]),this.issues.set([]),this.externalRefsRaw.set([]),this.state.set("error");return}this.outgoingRaw.set(s),this.incomingRaw.set(c),this.issues.set(f),this.externalRefsRaw.set(a.status==="fulfilled"?a.value?.item?.externalRefs??[]:[]),this.state.set("ready")}catch{if(n!==this.fetchToken)return;this.outgoingRaw.set([]),this.incomingRaw.set([]),this.issues.set([]),this.externalRefsRaw.set([]),this.state.set("error")}}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=z({type:t,selectors:[["sm-linked-nodes-panel"]],inputs:{path:[1,"path"]},outputs:{openPath:"openPath"},decls:1,vars:1,consts:[["data-testid","linked-nodes-panel",1,"linked-nodes-panel"],["data-testid","linked-nodes-loading",1,"linked-nodes-panel__status"],["data-testid","linked-nodes-error",1,"linked-nodes-panel__status","linked-nodes-panel__status--warn"],["data-testid","linked-nodes-outgoing",1,"linked-nodes-panel__section"],["data-testid","linked-nodes-incoming",1,"linked-nodes-panel__section"],["data-testid","linked-nodes-external-refs",1,"linked-nodes-panel__section"],[1,"linked-nodes-panel__section-title"],["icon","pi-upload",1,"linked-nodes-panel__section-icon"],["data-testid","linked-nodes-outgoing-count",1,"linked-nodes-panel__section-count"],[1,"linked-nodes-panel__section-label"],[1,"linked-nodes-panel__table"],[1,"linked-nodes-panel__row"],[1,"linked-nodes-panel__path","linked-nodes-panel__path--broken"],["type","button",1,"linked-nodes-panel__path"],[1,"linked-nodes-panel__chip",3,"pTooltip"],[1,"linked-nodes-panel__chip","linked-nodes-panel__chip--kind"],[1,"linked-nodes-panel__chip","linked-nodes-panel__chip--issue",3,"pTooltip"],["type","button",1,"linked-nodes-panel__path",3,"click"],["icon","pi-download",1,"linked-nodes-panel__section-icon"],["data-testid","linked-nodes-incoming-count",1,"linked-nodes-panel__section-count"],["icon","pi-link",1,"linked-nodes-panel__section-icon"],["data-testid","linked-nodes-external-count",1,"linked-nodes-panel__section-count"],[1,"linked-nodes-panel__table","linked-nodes-panel__table--external"],[1,"linked-nodes-panel__row","linked-nodes-panel__row--external-ref"],["tooltipPosition","top","target","_blank","rel","noopener noreferrer",1,"linked-nodes-panel__external-ref-url",3,"href","pTooltip"]],template:function(n,i){n&1&&M(0,kse,4,1,"div",0),n&2&&D(i.path()?0:-1)},dependencies:[Ve,Be,bb],styles:["[_nghost-%COMP%]{display:block}.linked-nodes-panel__status[_ngcontent-%COMP%]{margin:0;font-size:.85rem;color:var(--p-text-muted-color);font-style:italic}.linked-nodes-panel__status--warn[_ngcontent-%COMP%]{color:var(--sm-severity-warn);font-style:normal}.linked-nodes-panel__section[_ngcontent-%COMP%] + .linked-nodes-panel__section[_ngcontent-%COMP%]{margin-top:1rem}.linked-nodes-panel__section-title[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.4rem;margin:0 0 .4rem;font-size:.8rem}.linked-nodes-panel__section-icon[_ngcontent-%COMP%]{display:inline-flex;align-items:center;font-size:.85rem;color:var(--p-text-color)}.linked-nodes-panel__section-count[_ngcontent-%COMP%]{font-weight:700;font-size:.9rem;line-height:1;color:var(--p-text-color)}.linked-nodes-panel__section-label[_ngcontent-%COMP%]{font-weight:600;text-transform:uppercase;letter-spacing:.04em;color:var(--p-text-muted-color)}.linked-nodes-panel__table[_ngcontent-%COMP%]{list-style:none;margin:0;padding:0;display:flex;flex-direction:column}.linked-nodes-panel__row[_ngcontent-%COMP%]{display:flex;flex-flow:row wrap;align-items:center;gap:.4rem;padding:.4rem .25rem;min-width:0}.linked-nodes-panel__row[_ngcontent-%COMP%] + .linked-nodes-panel__row[_ngcontent-%COMP%]{border-top:1px solid var(--p-content-border-color)}.linked-nodes-panel__path[_ngcontent-%COMP%]{margin:0;padding:0;border:none;background:none;font:inherit;font-size:.8rem;font-weight:400;text-align:left;line-height:1.35;min-width:0;overflow-wrap:anywhere;color:var(--p-primary-color);cursor:pointer}button.linked-nodes-panel__path[_ngcontent-%COMP%]:hover, button.linked-nodes-panel__path[_ngcontent-%COMP%]:focus-visible{text-decoration:underline}.linked-nodes-panel__path--broken[_ngcontent-%COMP%]{color:var(--p-text-color);cursor:default}.linked-nodes-panel__chip[_ngcontent-%COMP%]{display:inline-flex;align-items:center;padding:.02rem .4rem;border:1px solid var(--p-content-border-color);border-radius:999px;font-size:.72rem;line-height:1.5;color:var(--p-text-muted-color);white-space:nowrap}.linked-nodes-panel__chip--kind[_ngcontent-%COMP%]{border-color:var(--sm-edge-neutral);color:var(--sm-edge-neutral)}.linked-nodes-panel__chip--kind[data-kind=invokes][_ngcontent-%COMP%]{border-color:var(--sm-edge-invokes);color:var(--sm-edge-invokes)}.linked-nodes-panel__chip--kind[data-kind=references][_ngcontent-%COMP%]{border-color:var(--sm-edge-references);color:var(--sm-edge-references)}.linked-nodes-panel__chip--kind[data-kind=mentions][_ngcontent-%COMP%]{border-color:var(--sm-edge-mentions);color:var(--sm-edge-mentions)}.linked-nodes-panel__chip--kind[data-kind=supersedes][_ngcontent-%COMP%]{border-color:var(--sm-edge-supersedes-active);color:var(--sm-edge-supersedes-active)}.linked-nodes-panel__chip--issue[data-severity=error][_ngcontent-%COMP%]{border-color:var(--sm-severity-error);color:var(--sm-severity-error)}.linked-nodes-panel__chip--issue[data-severity=warn][_ngcontent-%COMP%]{border-color:var(--sm-severity-warn);color:var(--sm-severity-warn)}.linked-nodes-panel__chip--issue[data-severity=info][_ngcontent-%COMP%]{border-color:var(--sm-severity-info);color:var(--sm-severity-info)}.linked-nodes-panel__row--external-ref[_ngcontent-%COMP%]{font-size:.85rem}.linked-nodes-panel__external-ref-url[_ngcontent-%COMP%]{display:block;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--p-primary-color);text-decoration:none}.linked-nodes-panel__external-ref-url[_ngcontent-%COMP%]:hover{text-decoration:underline}"],changeDetection:0})}return t})();function Ise(t,o,e){let n=new Set([t]);for(let i of o)i.resolvedTarget&&n.add(i.resolvedTarget),i.target&&n.add(i.target);for(let i of e)i.source&&n.add(i.source);return[...n]}function KD(t){return!!(t.source===t.target||t.resolvedTarget&&t.source===t.resolvedTarget)}var ZD={sections:{definition:"Definition",initialPrompt:"Initial prompt"},fields:{tools:"Tools",model:"Model",skills:"Skills",disallowedTools:"Disallowed",permissionMode:"Permission",maxTurns:"Max turns",memory:"Memory",background:"Background",effort:"Effort",isolation:"Isolation",color:"Color",mcpServers:"MCP servers",hooks:"Hooks"},skillBaseFields:{whenToUse:"When to use",argumentHint:"Argument hint",arguments:"Arguments",allowedTools:"Allowed tools",disallowedTools:"Disallowed tools",model:"Model",effort:"Effort",context:"Context",agent:"Agent",shell:"Shell",paths:"Paths",disableModelInvocation:"Model invocation",userInvocable:"User invocable"},unknownFieldTooltip:"Unknown field, not part of the documented frontmatter for this provider.",skillUnresolvedTooltip:"Skill not found in this scan."};var QD=(t,o)=>o.key,Ese=(t,o)=>o.name,Mse=(t,o)=>o.event;function Dse(t,o){if(t&1&&(h(0,"dt"),b(1),_(),h(2,"dd")(3,"code"),b(4),_()()),t&2){let e=d(5);l(),x(e.texts.fields.model),l(3),x(o)}}function Pse(t,o){if(t&1&&(h(0,"dt"),b(1),_(),h(2,"dd")(3,"code"),b(4),_()()),t&2){let e=d(5);l(),x(e.texts.fields.effort),l(3),x(o)}}function Rse(t,o){t&1&&(h(0,"span",7),b(1,"\xB7"),_())}function Ose(t,o){if(t&1&&(h(0,"code"),b(1),_(),M(2,Rse,2,0,"span",7)),t&2){let e=o.$implicit,n=o.$index,i=o.$count;l(),x(e),l(),D(n!==i-1?2:-1)}}function Fse(t,o){if(t&1&&(h(0,"dt"),b(1),_(),h(2,"dd",6),ue(3,Ose,3,2,null,null,Ue),_()),t&2){let e=d(5);l(),x(e.texts.fields.tools),l(2),pe(e.tools())}}function Nse(t,o){t&1&&(h(0,"span",7),b(1,"\xB7"),_())}function Ase(t,o){if(t&1&&(h(0,"span",8),N(1,"i",9),h(2,"code"),b(3),_()(),M(4,Nse,2,0,"span",7)),t&2){let e=o.$implicit,n=o.$index,i=o.$count;l(3),x(e),l(),D(n!==i-1?4:-1)}}function Lse(t,o){if(t&1&&(h(0,"dt"),b(1),_(),h(2,"dd",6),ue(3,Ase,5,2,null,null,Ue),_()),t&2){let e=d(5);l(),x(e.texts.fields.disallowedTools),l(2),pe(e.disallowedTools())}}function Bse(t,o){if(t&1&&(h(0,"dt"),b(1),_(),h(2,"dd")(3,"code"),b(4),_()()),t&2){let e=d(5);l(),x(e.texts.fields.permissionMode),l(3),x(o)}}function Vse(t,o){if(t&1&&(h(0,"dt"),b(1),_(),h(2,"dd",10),N(3,"span",11),h(4,"code"),b(5),_()()),t&2){let e=o,n=d(5);l(),x(n.texts.fields.color),l(2),Ne("background",e),l(2),x(e)}}function zse(t,o){if(t&1){let e=W();h(0,"a",14),A("click",function(){let i=w(e),r=d(7);return T(r.openSkill(i))})("keydown.enter",function(){let i=w(e),r=d(7);return T(r.openSkill(i))})("keydown.space",function(i){let r=w(e);return d(7).openSkill(r),T(i.preventDefault())}),N(1,"i",15),b(2),_()}if(t&2){let e=d().$implicit;l(2),ke(" ",e," ")}}function Hse(t,o){if(t&1&&(h(0,"span",13),b(1),_()),t&2){let e=d().$implicit,n=d(6);m("pTooltip",n.texts.skillUnresolvedTooltip),l(),x(e)}}function qse(t,o){t&1&&(h(0,"span",7),b(1,"\xB7"),_())}function Gse(t,o){if(t&1&&(M(0,zse,3,1,"a",12)(1,Hse,2,2,"span",13),M(2,qse,2,0,"span",7)),t&2){let e,n=o.$implicit,i=o.$index,r=o.$count,a=d(6);D((e=a.skillPath(n))?0:1,e),l(2),D(i!==r-1?2:-1)}}function jse(t,o){if(t&1&&(h(0,"dt"),b(1),_(),h(2,"dd",6),ue(3,Gse,3,2,null,null,Ue),_()),t&2){let e=d(5);l(),x(e.texts.fields.skills),l(2),pe(e.skills())}}function Use(t,o){if(t&1&&(h(0,"dt"),b(1),_(),h(2,"dd")(3,"code"),b(4),_()()),t&2){let e=d(5);l(),x(e.texts.fields.maxTurns),l(3),x(e.maxTurns())}}function $se(t,o){if(t&1&&(h(0,"dt"),b(1),_(),h(2,"dd")(3,"code"),b(4),_()()),t&2){let e=d(5);l(),x(e.texts.fields.memory),l(3),x(o)}}function Wse(t,o){if(t&1&&(h(0,"dt"),b(1),_(),h(2,"dd")(3,"code"),b(4),_()()),t&2){let e=d(5);l(),x(e.texts.fields.background),l(3),x(e.background())}}function Kse(t,o){if(t&1&&(h(0,"dt"),b(1),_(),h(2,"dd")(3,"code"),b(4),_()()),t&2){let e=d(5);l(),x(e.texts.fields.isolation),l(3),x(o)}}function Yse(t,o){t&1&&(h(0,"span",7),b(1,"\xB7"),_())}function Xse(t,o){if(t&1&&(h(0,"code",16),b(1),_(),M(2,Yse,2,0,"span",7)),t&2){let e=o.$implicit,n=o.$index,i=o.$count;m("pTooltip",e.command??""),l(),x(e.name),l(),D(n!==i-1?2:-1)}}function Zse(t,o){if(t&1&&(h(0,"dt"),b(1),_(),h(2,"dd",6),ue(3,Xse,3,3,null,null,Ese),_()),t&2){let e=d(5);l(),x(e.texts.fields.mcpServers),l(2),pe(e.mcpServers())}}function Qse(t,o){if(t&1&&(h(0,"span",18),b(1,"\u2192"),_(),h(2,"code"),b(3),_()),t&2){let e=d().$implicit;l(3),x(e.keys[0])}}function Jse(t,o){t&1&&(h(0,"span",7),b(1,"\xB7"),_())}function ele(t,o){if(t&1&&(h(0,"span",17)(1,"code"),b(2),_(),M(3,Qse,4,1),_(),M(4,Jse,2,0,"span",7)),t&2){let e=o.$implicit,n=o.$index,i=o.$count;l(2),x(e.event),l(),D(e.keys.length?3:-1),l(),D(n!==i-1?4:-1)}}function tle(t,o){if(t&1&&(h(0,"dt"),b(1),_(),h(2,"dd",6),ue(3,ele,5,3,null,null,Mse),_()),t&2){let e=d(5);l(),x(e.texts.fields.hooks),l(2),pe(e.hooks())}}function nle(t,o){if(t&1&&(h(0,"dt"),b(1),_(),h(2,"dd",19),N(3,"i",20),h(4,"code"),b(5),_()()),t&2){let e=o.$implicit,n=d(5);l(),x(e.key),l(2),m("pTooltip",n.texts.unknownFieldTooltip),O("aria-label",n.texts.unknownFieldTooltip),l(2),x(e.value)}}function ile(t,o){if(t&1&&(h(0,"dl",5),M(1,Dse,5,2),M(2,Pse,5,2),M(3,Fse,5,1),M(4,Lse,5,1),M(5,Bse,5,2),M(6,Vse,6,4),M(7,jse,5,1),M(8,Use,5,2),M(9,$se,5,2),M(10,Wse,5,2),M(11,Kse,5,2),M(12,Zse,5,1),M(13,tle,5,1),ue(14,nle,6,4,null,null,QD),_()),t&2){let e,n,i,r,a,s,c=d(4);l(),D((e=c.model())?1:-1,e),l(),D((n=c.effort())?2:-1,n),l(),D(c.tools().length?3:-1),l(),D(c.disallowedTools().length?4:-1),l(),D((i=c.permissionMode())?5:-1,i),l(),D((r=c.color())?6:-1,r),l(),D(c.skills().length?7:-1),l(),D(c.maxTurns()!==null?8:-1),l(),D((a=c.memory())?9:-1,a),l(),D(c.background()!==null?10:-1),l(),D((s=c.isolation())?11:-1,s),l(),D(c.mcpServers().length?12:-1),l(),D(c.hooks().length?13:-1),l(),pe(c.extraFields())}}function ole(t,o){if(t&1&&M(0,ile,16,13,"dl",5),t&2){let e=d(3);D(e.hasBehavior()||e.hasCapabilities()||e.extraFields().length?0:-1)}}function rle(t,o){if(t&1&&(h(0,"dt"),b(1),_(),h(2,"dd")(3,"code"),b(4),_()()),t&2){d();let e=Ce(0),n=d(4);l(),x(n.texts.skillBaseFields.model),l(3),x(e.model)}}function ale(t,o){if(t&1&&(h(0,"dt"),b(1),_(),h(2,"dd")(3,"code"),b(4),_()()),t&2){d();let e=Ce(0),n=d(4);l(),x(n.texts.skillBaseFields.effort),l(3),x(e.effort)}}function sle(t,o){if(t&1&&(h(0,"dt"),b(1),_(),h(2,"dd"),b(3),_()),t&2){d();let e=Ce(0),n=d(4);l(),x(n.texts.skillBaseFields.whenToUse),l(2),x(e.when_to_use)}}function lle(t,o){if(t&1&&(h(0,"dt"),b(1),_(),h(2,"dd")(3,"code"),b(4),_()()),t&2){d();let e=Ce(0),n=d(4);l(),x(n.texts.skillBaseFields.argumentHint),l(3),x(e.argumentHint)}}function cle(t,o){t&1&&(h(0,"span",7),b(1,"\xB7"),_())}function dle(t,o){if(t&1&&(h(0,"code"),b(1),_(),M(2,cle,2,0,"span",7)),t&2){let e=o.$implicit,n=o.$index,i=o.$count;l(),x(e),l(),D(n!==i-1?2:-1)}}function ule(t,o){if(t&1&&(h(0,"dt"),b(1),_(),h(2,"dd",6),ue(3,dle,3,2,null,null,Ue),_()),t&2){d();let e=Ce(0),n=d(4);l(),x(n.texts.skillBaseFields.arguments),l(2),pe(e.arguments)}}function ple(t,o){t&1&&(h(0,"span",7),b(1,"\xB7"),_())}function hle(t,o){if(t&1&&(h(0,"code"),b(1),_(),M(2,ple,2,0,"span",7)),t&2){let e=o.$implicit,n=o.$index,i=o.$count;l(),x(e),l(),D(n!==i-1?2:-1)}}function fle(t,o){if(t&1&&(h(0,"dt"),b(1),_(),h(2,"dd",6),ue(3,hle,3,2,null,null,Ue),_()),t&2){d();let e=Ce(0),n=d(4);l(),x(n.texts.skillBaseFields.allowedTools),l(2),pe(e.allowedTools)}}function mle(t,o){t&1&&(h(0,"span",7),b(1,"\xB7"),_())}function _le(t,o){if(t&1&&(h(0,"span",8),N(1,"i",9),h(2,"code"),b(3),_()(),M(4,mle,2,0,"span",7)),t&2){let e=o.$implicit,n=o.$index,i=o.$count;l(3),x(e),l(),D(n!==i-1?4:-1)}}function gle(t,o){if(t&1&&(h(0,"dt"),b(1),_(),h(2,"dd",6),ue(3,_le,5,2,null,null,Ue),_()),t&2){d();let e=Ce(0),n=d(4);l(),x(n.texts.skillBaseFields.disallowedTools),l(2),pe(e.disallowedTools)}}function ble(t,o){if(t&1&&(h(0,"dt"),b(1),_(),h(2,"dd")(3,"code"),b(4),_()()),t&2){d();let e=Ce(0),n=d(4);l(),x(n.texts.skillBaseFields.context),l(3),x(e.context)}}function vle(t,o){if(t&1&&(h(0,"dt"),b(1),_(),h(2,"dd")(3,"code"),b(4),_()()),t&2){d();let e=Ce(0),n=d(4);l(),x(n.texts.skillBaseFields.agent),l(3),x(e.agent)}}function yle(t,o){if(t&1&&(h(0,"dt"),b(1),_(),h(2,"dd")(3,"code"),b(4),_()()),t&2){d();let e=Ce(0),n=d(4);l(),x(n.texts.skillBaseFields.shell),l(3),x(e.shell)}}function Cle(t,o){t&1&&(h(0,"span",7),b(1,"\xB7"),_())}function xle(t,o){if(t&1&&(h(0,"code"),b(1),_(),M(2,Cle,2,0,"span",7)),t&2){let e=o.$implicit,n=o.$index,i=o.$count;l(),x(e),l(),D(n!==i-1?2:-1)}}function wle(t,o){if(t&1&&(h(0,"dt"),b(1),_(),h(2,"dd",6),ue(3,xle,3,2,null,null,Ue),_()),t&2){d();let e=Ce(0),n=d(4);l(),x(n.texts.skillBaseFields.paths),l(2),pe(e.paths)}}function Tle(t,o){if(t&1&&(h(0,"dt"),b(1),_(),h(2,"dd")(3,"code"),b(4,"disabled"),_()()),t&2){let e=d(5);l(),x(e.texts.skillBaseFields.disableModelInvocation)}}function Sle(t,o){if(t&1&&(h(0,"dt"),b(1),_(),h(2,"dd")(3,"code"),b(4),_()()),t&2){d();let e=Ce(0),n=d(4);l(),x(n.texts.skillBaseFields.userInvocable),l(3),x(e.userInvocable)}}function kle(t,o){if(t&1&&(h(0,"dt"),b(1),_(),h(2,"dd",19),N(3,"i",20),h(4,"code"),b(5),_()()),t&2){let e=o.$implicit,n=d(5);l(),x(e.key),l(2),m("pTooltip",n.texts.unknownFieldTooltip),O("aria-label",n.texts.unknownFieldTooltip),l(2),x(e.value)}}function Ile(t,o){if(t&1&&(Gt(0),h(1,"dl",21),M(2,rle,5,2),M(3,ale,5,2),M(4,sle,4,2),M(5,lle,5,2),M(6,ule,5,1),M(7,fle,5,1),M(8,gle,5,1),M(9,ble,5,2),M(10,vle,5,2),M(11,yle,5,2),M(12,wle,5,1),M(13,Tle,5,1),M(14,Sle,5,2),ue(15,kle,6,4,null,null,QD),_()),t&2){let e=d(4),n=Tt(e.skillBase());l(2),D(n.model!==null?2:-1),l(),D(n.effort!==null?3:-1),l(),D(n.when_to_use!==null?4:-1),l(),D(n.argumentHint!==null?5:-1),l(),D(n.arguments.length?6:-1),l(),D(n.allowedTools.length?7:-1),l(),D(n.disallowedTools.length?8:-1),l(),D(n.context!==null?9:-1),l(),D(n.agent!==null?10:-1),l(),D(n.shell!==null?11:-1),l(),D(n.paths.length?12:-1),l(),D(n.disableModelInvocation?13:-1),l(),D(n.userInvocable!==null?14:-1),l(),pe(e.extraFields())}}function Ele(t,o){if(t&1&&M(0,Ile,17,14,"dl",21),t&2){let e=d(3);D(e.hasCapabilities()||e.extraFields().length?0:-1)}}function Mle(t,o){if(t&1&&(h(0,"p",22),b(1),_(),N(2,"blockquote",23)),t&2){let e=d(3);l(),x(e.texts.sections.initialPrompt),l(),m("innerHTML",e.initialPromptHtml(),Ei)}}function Dle(t,o){if(t&1&&(M(0,ole,1,1)(1,Ele,1,1),M(2,Mle,3,2)),t&2){let e=d(2);D(e.isAgent()?0:e.isSkillOrCommand()?1:-1),l(2),D(e.hasInitialPrompt()?2:-1)}}function Ple(t,o){if(t&1){let e=W();h(0,"div",0)(1,"section",1)(2,"button",2),A("click",function(){w(e);let i=d();return T(i.toggle.emit())}),h(3,"span",3),b(4),_(),N(5,"i",4),_(),M(6,Dle,3,2),_()()}if(t&2){let e=d();l(2),O("aria-expanded",e.expanded()),l(2),x(e.texts.sections.definition),l(),se("pi-chevron-right",!e.expanded())("pi-chevron-down",e.expanded()),l(),D(e.expanded()?6:-1)}}var Rle=new Set(["name","description","metadata","model","effort","permissionMode","maxTurns","memory","background","isolation","color","tools","disallowedTools","skills","mcpServers","hooks","initialPrompt"]),Ole=new Set(["name","description","metadata","when_to_use","argument-hint","arguments","disable-model-invocation","user-invocable","allowed-tools","disallowed-tools","model","effort","context","agent","hooks","paths","shell"]),JD=(()=>{class t{frontmatter=B.required();kind=B.required();provider=B(void 0);skillPathByName=B(null);onSkillClick=B(null);expanded=B(!0);toggle=et();texts=ZD;markdown=p(yo);hasVendorSurface=E(()=>{let e=this.kind();return e==="agent"||e==="skill"||e==="command"});isAgent=E(()=>this.kind()==="agent");isSkillOrCommand=E(()=>{let e=this.kind();return e==="skill"||e==="command"});tools=E(()=>mf(this.fm().tools));model=E(()=>Xt(this.fm().model));skills=E(()=>mf(this.fm().skills));disallowedTools=E(()=>mf(this.fm().disallowedTools));initialPrompt=E(()=>Xt(this.fm().initialPrompt));permissionMode=E(()=>Xt(this.fm().permissionMode));maxTurns=E(()=>Fle(this.fm().maxTurns));memory=E(()=>Xt(this.fm().memory));background=E(()=>typeof this.fm().background=="boolean"?this.fm().background:null);effort=E(()=>Xt(this.fm().effort));isolation=E(()=>Xt(this.fm().isolation));color=E(()=>uf(this.fm().color));mcpServers=E(()=>{let e=this.fm().mcpServers;return Array.isArray(e)?e.filter(n=>typeof n=="object"&&n!==null).map((n,i)=>{let r=n.args,a=Array.isArray(r)?r.length:0;return{name:typeof n.name=="string"&&n.name.length>0?n.name:`mcpServer[${i}]`,command:typeof n.command=="string"?n.command:null,argsCount:a}}):[]});hooks=E(()=>{let e=this.fm().hooks;if(typeof e!="object"||e===null)return[];let n=[];for(let[i,r]of Object.entries(e)){let a=typeof r=="object"&&r!==null?Object.keys(r):[];n.push({event:i,keys:a})}return n});skillBase=E(()=>{let e=this.fm();return{when_to_use:Xt(e.when_to_use),argumentHint:Xt(e["argument-hint"]),arguments:ff(e.arguments),disableModelInvocation:e["disable-model-invocation"]===!0,userInvocable:typeof e["user-invocable"]=="boolean"?e["user-invocable"]:null,allowedTools:ff(e["allowed-tools"]),disallowedTools:ff(e["disallowed-tools"]),model:Xt(e.model),effort:Xt(e.effort),context:Xt(e.context),agent:Xt(e.agent),paths:ff(e.paths),shell:Xt(e.shell)}});hasBehavior=E(()=>this.isAgent()?this.model()!==null||this.permissionMode()!==null||this.maxTurns()!==null||this.memory()!==null||this.background()!==null||this.effort()!==null||this.isolation()!==null||this.color()!==null:!1);hasCapabilities=E(()=>{if(this.isAgent())return this.tools().length>0||this.disallowedTools().length>0||this.skills().length>0||this.mcpServers().length>0||this.hooks().length>0;if(this.isSkillOrCommand()){let e=this.skillBase();return e.when_to_use!==null||e.argumentHint!==null||e.arguments.length>0||e.allowedTools.length>0||e.disallowedTools.length>0||e.model!==null||e.effort!==null||e.context!==null||e.agent!==null||e.shell!==null||e.paths.length>0||e.disableModelInvocation||e.userInvocable!==null}return!1});hasInitialPrompt=E(()=>this.isAgent()&&this.initialPrompt()!==null);initialPromptHtml=u0(()=>this.initialPrompt()??"",this.markdown);extraFields=E(()=>{let e=this.isAgent()?Rle:this.isSkillOrCommand()?Ole:null;if(!e)return[];let n=this.fm(),i=[];for(let r of Object.keys(n)){if(e.has(r))continue;let a=n[r];if(a==null)continue;let s=typeof a=="string"?a:typeof a=="number"||typeof a=="boolean"?String(a):JSON.stringify(a);i.push({key:r,value:s})}return i});hasAnyContent=E(()=>this.hasVendorSurface()&&(this.hasBehavior()||this.hasCapabilities()||this.hasInitialPrompt()||this.extraFields().length>0));skillPath(e){return this.skillPathByName()?.get(e)??null}openSkill(e){let n=this.onSkillClick();n&&n(e)}fm(){return this.frontmatter()}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=z({type:t,selectors:[["sm-vendor-frontmatter"]],inputs:{frontmatter:[1,"frontmatter"],kind:[1,"kind"],provider:[1,"provider"],skillPathByName:[1,"skillPathByName"],onSkillClick:[1,"onSkillClick"],expanded:[1,"expanded"]},outputs:{toggle:"toggle"},decls:1,vars:1,consts:[["data-testid","vendor-frontmatter",1,"vfm"],["data-testid","vendor-frontmatter-definition",1,"sm-block","sm-block--collapsible"],["type","button","data-testid","vendor-frontmatter-toggle",1,"sm-block__row","sm-block__row--toggle",3,"click"],[1,"sm-block__title"],["aria-hidden","true",1,"pi","sm-block__chevron"],[1,"sm-block__kv"],[1,"vfm__inline"],["aria-hidden","true",1,"vfm__sep"],[1,"vfm__danger"],["aria-hidden","true",1,"pi","pi-ban"],[1,"vfm__color"],["aria-hidden","true",1,"vfm__swatch"],["role","button","tabindex","0",1,"sm-node-link","sm-node-link--known"],[1,"sm-node-link",3,"pTooltip"],["role","button","tabindex","0",1,"sm-node-link","sm-node-link--known",3,"click","keydown.enter","keydown.space"],["aria-hidden","true",1,"pi","pi-arrow-up-right"],[3,"pTooltip"],[1,"vfm__hook"],["aria-hidden","true",1,"vfm__sep-arrow"],[1,"vfm__unknown-dd"],["role","img",1,"pi","pi-exclamation-circle","vfm__unknown",3,"pTooltip"],["data-testid","vendor-frontmatter-skill-base",1,"sm-block__kv"],[1,"sm-block__sub"],["data-testid","vendor-frontmatter-initial-prompt-quote",1,"vfm__quote",3,"innerHTML"]],template:function(n,i){n&1&&M(0,Ple,7,7,"div",0),n&2&&D(i.hasAnyContent()?0:-1)},dependencies:[Ve,Be],styles:["[_nghost-%COMP%]{display:block}.vfm[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.85rem}.vfm__inline[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:center;gap:.3rem;font-size:.83rem}.vfm__inline[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{background:var(--sm-bg-hover);padding:.05rem .4rem;border-radius:var(--sm-radius-sm);font-size:.78rem;color:var(--p-text-color);font-family:var(--sm-font-mono)}.vfm__sep[_ngcontent-%COMP%]{color:var(--sm-border);font-size:.75rem}.vfm__sep-arrow[_ngcontent-%COMP%]{color:var(--p-text-muted-color);font-size:.78rem;margin:0 .1rem}.vfm__danger[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.25rem;color:var(--sm-severity-error)}.vfm__danger[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{background:var(--sm-severity-error-bg);color:var(--sm-severity-error)}.vfm__danger[_ngcontent-%COMP%] .pi[_ngcontent-%COMP%]{font-size:.7rem}.vfm__hook[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.25rem}.vfm__hook[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{background:var(--sm-bg-hover);padding:.05rem .4rem;border-radius:var(--sm-radius-sm);font-size:.78rem;font-family:var(--sm-font-mono)}.vfm__unknown-dd[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.3rem}.vfm__unknown[_ngcontent-%COMP%]{font-size:.72rem;color:var(--p-text-muted-color);cursor:help;line-height:1}.vfm__color[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.35rem}.vfm__swatch[_ngcontent-%COMP%]{width:.7rem;height:.7rem;border-radius:50%;flex:none;border:1px solid var(--sm-border)}.vfm__quote[_ngcontent-%COMP%]{margin:0;padding:.7rem .95rem;border-left:2px solid var(--sm-border);background:var(--sm-bg-hover);color:var(--p-text-color);font-size:.9rem;line-height:1.55;border-radius:0 var(--sm-radius-sm) var(--sm-radius-sm) 0}[_nghost-%COMP%] .vfm__quote>:first-child{margin-top:0}[_nghost-%COMP%] .vfm__quote>:last-child{margin-bottom:0}[_nghost-%COMP%] .vfm__quote code{background:var(--sm-bg-content);padding:.05rem .4rem;border-radius:var(--sm-radius-sm);font-size:.82rem;font-family:var(--sm-font-mono)}[_nghost-%COMP%] .vfm__quote a{color:var(--p-primary-color);text-decoration:underline}"],changeDetection:0})}return t})();function Xt(t){return typeof t=="string"&&t.length>0?t:null}function Fle(t){return typeof t=="number"&&Number.isFinite(t)?t:null}function mf(t){return Array.isArray(t)?t.filter(o=>typeof o=="string"&&o.length>0):[]}function ff(t){return typeof t=="string"?t.length>0?[t]:[]:Array.isArray(t)?mf(t):[]}var eP={header:"Plugin contributions",count:t=>`${t} namespace${t===1?"":"s"}`,unregisteredBadge:"unregistered",rootContribBadge:t=>`from plugin: ${t}`,empty:"No plugin contributions on this sidecar."};var iP=(t,o)=>o.key,Nle=(t,o)=>o.pluginId;function Ale(t,o){if(t&1&&(h(0,"p",0),b(1),_()),t&2){let e=d();l(),x(e.texts.empty)}}function Lle(t,o){if(t&1&&(h(0,"span",5),b(1),_()),t&2){let e=d().$implicit,n=d(3);l(),x(n.texts.rootContribBadge(e.pluginId))}}function Ble(t,o){if(t&1&&(h(0,"div",3)(1,"code",4),b(2),_(),M(3,Lle,2,1,"span",5),h(4,"pre",6),b(5),_()()),t&2){let e=o.$implicit;l(2),x(e.key),l(),D(e.pluginId!==null?3:-1),l(2),x(e.value)}}function Vle(t,o){if(t&1&&(h(0,"div",1),ue(1,Ble,6,3,"div",3,iP),_()),t&2){let e=d(2);l(),pe(e.rootContributions())}}function zle(t,o){if(t&1&&(h(0,"span",10),b(1),_()),t&2){let e=d(4);l(),x(e.texts.unregisteredBadge)}}function Hle(t,o){if(t&1&&(h(0,"dt",12),b(1),_(),h(2,"dd")(3,"pre"),b(4),_()()),t&2){let e=o.$implicit;m("pTooltip",e.description??""),l(),x(e.key),l(3),x(e.value)}}function qle(t,o){if(t&1&&(h(0,"section",7)(1,"h5",8)(2,"span",9),b(3),_(),M(4,zle,2,1,"span",10),_(),h(5,"dl",11),ue(6,Hle,5,3,null,null,iP),_()()),t&2){let e=o.$implicit;O("data-testid","plugin-contributions-ns-"+e.pluginId),l(3),x(e.pluginId),l(),D(e.registered?-1:4),l(2),pe(e.rows)}}function Gle(t,o){if(t&1&&(h(0,"div",2),ue(1,qle,8,3,"section",7,Nle),_()),t&2){let e=d(2);l(),pe(e.namespaces())}}function jle(t,o){if(t&1&&(M(0,Vle,3,0,"div",1),M(1,Gle,3,0,"div",2)),t&2){let e=d();D(e.rootContributions().length?0:-1),l(),D(e.namespaces().length?1:-1)}}var tP=new Set(["identity","annotations","settings","audit"]),oP=(()=>{class t{dataSource=p(ei);sidecarRoot=B(void 0);texts=eP;catalog=X(null);constructor(){this.fetchCatalog()}namespaces=E(()=>{let e=this.sidecarRoot();if(!e)return[];let n=this.catalog(),i=new Map;if(n)for(let a of n){if(a.location!=="namespaced")continue;let s=i.get(a.pluginId);s?s.push(a):i.set(a.pluginId,[a])}let r=[];for(let[a,s]of Object.entries(e)){if(tP.has(a)||this.isRegisteredRootKey(a))continue;let u=typeof s=="object"&&s!==null&&!Array.isArray(s)?s:{value:s},f=i.has(a),g=i.get(a)??[],C=Object.entries(u).map(([k,S])=>({key:k,value:nP(S),description:f?Ule(g,k):null}));r.push({pluginId:a,registered:f,rows:C})}return r});rootContributions=E(()=>{let e=this.sidecarRoot();if(!e)return[];let n=this.catalog();if(!n)return[];let i=new Map;for(let a of n)a.location==="root"&&i.set(a.key,a);let r=[];for(let[a,s]of Object.entries(e)){if(tP.has(a))continue;let c=i.get(a);c&&r.push({key:a,pluginId:c.pluginId,value:nP(s)})}return r});count=E(()=>this.namespaces().length+this.rootContributions().length);isEmpty=E(()=>this.count()===0);isRegisteredRootKey(e){let n=this.catalog();return n?n.some(i=>i.location==="root"&&i.key===e):!1}async fetchCatalog(){try{let e=await this.dataSource.getRegisteredAnnotations();this.catalog.set(e)}catch{this.catalog.set([])}}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=z({type:t,selectors:[["sm-plugin-contributions"]],inputs:{sidecarRoot:[1,"sidecarRoot"]},decls:2,vars:1,consts:[["data-testid","plugin-contributions-empty",1,"pcp__empty"],["data-testid","plugin-contributions-roots",1,"pcp__roots"],[1,"pcp__namespaces"],[1,"pcp__root-row"],[1,"pcp__root-key"],[1,"pcp__root-badge"],[1,"pcp__root-value"],[1,"pcp__ns"],[1,"pcp__ns-header"],[1,"pcp__ns-name"],["data-testid","plugin-contributions-unregistered-badge",1,"pcp__ns-badge"],[1,"pcp__kv"],[3,"pTooltip"]],template:function(n,i){n&1&&M(0,Ale,2,1,"p",0)(1,jle,2,2),n&2&&D(i.isEmpty()?0:1)},dependencies:[Ve,Be],styles:["[_nghost-%COMP%]{display:block}.pcp__empty[_ngcontent-%COMP%]{margin:0;font-size:.85rem;color:var(--sm-text-muted);font-style:italic}.pcp__roots[_ngcontent-%COMP%], .pcp__namespaces[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.6rem}.pcp__root-row[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:center;gap:.4rem;font-size:.85rem}.pcp__root-key[_ngcontent-%COMP%]{font-family:var(--sm-font-mono);background:var(--sm-bg-hover);padding:.1rem .4rem;border-radius:var(--sm-radius-sm);font-weight:600}.pcp__root-badge[_ngcontent-%COMP%]{font-size:.7rem;color:var(--sm-text-muted);font-style:italic;background:var(--sm-bg-hover);padding:.05rem .35rem;border-radius:var(--sm-radius-sm)}.pcp__root-value[_ngcontent-%COMP%]{flex:1 1 100%;margin:.2rem 0 0;padding:.45rem .6rem;background:var(--sm-bg-hover);border-radius:var(--sm-radius-sm);font-family:var(--sm-font-mono);font-size:.8rem;white-space:pre-wrap;word-break:break-word}.pcp__ns[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.35rem}.pcp__ns[_ngcontent-%COMP%] + .pcp__ns[_ngcontent-%COMP%]{border-top:1px solid var(--sm-border);padding-top:.5rem}.pcp__ns-header[_ngcontent-%COMP%]{margin:0;display:inline-flex;align-items:center;gap:.5rem;font-size:.85rem;font-weight:600}.pcp__ns-name[_ngcontent-%COMP%]{font-family:var(--sm-font-mono)}.pcp__ns-badge[_ngcontent-%COMP%]{font-size:.65rem;font-weight:500;text-transform:uppercase;letter-spacing:.04em;color:var(--sm-text-muted);background:var(--sm-bg-hover);padding:.05rem .4rem;border-radius:var(--sm-radius-sm)}.pcp__kv[_ngcontent-%COMP%]{display:grid;grid-template-columns:max-content 1fr;column-gap:.6rem;row-gap:.2rem;margin:0;font-size:.85rem}.pcp__kv[_ngcontent-%COMP%] dt[_ngcontent-%COMP%]{color:var(--sm-text-muted);font-weight:500;font-family:var(--sm-font-mono);cursor:help}.pcp__kv[_ngcontent-%COMP%] dd[_ngcontent-%COMP%]{margin:0;word-break:break-word}.pcp__kv[_ngcontent-%COMP%] dd[_ngcontent-%COMP%] pre[_ngcontent-%COMP%]{margin:0;font-family:var(--sm-font-mono);font-size:.8rem;white-space:pre-wrap;word-break:break-word}"],changeDetection:0})}return t})();function nP(t){if(t===null)return"null";if(typeof t=="string")return t;if(typeof t=="number"||typeof t=="boolean")return String(t);try{return JSON.stringify(t,null,2)}catch{return String(t)}}function Ule(t,o){for(let e of t)if(e.key===o){let n=e.schema.description;return typeof n=="string"&&n.length>0?n:null}return null}var rP=(()=>{class t{node=B(null);static \u0275fac=function(n){return new(n||t)};static \u0275cmp=z({type:t,selectors:[["sm-inspector-slots-panel"]],inputs:{node:[1,"node"]},decls:6,vars:6,consts:[["slot","inspector.body.panel.breakdown",3,"node"],["slot","inspector.body.panel.records",3,"node"],["slot","inspector.body.panel.tree",3,"node"],["slot","inspector.body.panel.key-values",3,"node"],["slot","inspector.body.panel.link-list",3,"node"],["slot","inspector.body.panel.markdown",3,"node"]],template:function(n,i){n&1&&N(0,"sm-view-contributions-host",0)(1,"sm-view-contributions-host",1)(2,"sm-view-contributions-host",2)(3,"sm-view-contributions-host",3)(4,"sm-view-contributions-host",4)(5,"sm-view-contributions-host",5),n&2&&(m("node",i.node()),l(),m("node",i.node()),l(),m("node",i.node()),l(),m("node",i.node()),l(),m("node",i.node()),l(),m("node",i.node()))},dependencies:[ti],encapsulation:2,changeDetection:0})}return t})();var aP={header:"Debug",toggleAriaLabel:"Toggle debug panel",fields:{forPath:"for.path",bodyHashStored:"for.bodyHash (stored)",bodyHashLive:"node.bodyHash (live)",frontmatterHashStored:"for.frontmatterHash (stored)",frontmatterHashLive:"node.frontmatterHash (live)",resolvedProvider:"for.resolvedAs.provider",resolvedKind:"for.resolvedAs.kind",sidecarStatus:"sidecar.status"},diffMarker:"!=",absentMarker:"(absent)",notSetMarker:"(not set)",copiedLabel:"Copied",copyA11y:t=>`Copy ${t} to clipboard`};var $le=(t,o,e)=>({key:"body-stored",label:t,value:o,drift:e}),Wle=(t,o,e)=>({key:"body-live",label:t,value:o,drift:e}),Kle=(t,o,e)=>({key:"fm-stored",label:t,value:o,drift:e}),Yle=(t,o,e)=>({key:"fm-live",label:t,value:o,drift:e});function Xle(t,o){t&1&&(h(0,"code"),b(1),_()),t&2&&(l(),x(o))}function Zle(t,o){if(t&1&&(h(0,"span",3),b(1),_()),t&2){let e=d();l(),x(e.texts.absentMarker)}}function Qle(t,o){t&1&&le(0)}function Jle(t,o){if(t&1&&I(0,Qle,1,0,"ng-container",11),t&2){let e=d(),n=yt(42);m("ngTemplateOutlet",n)("ngTemplateOutletContext",Mi(2,$le,e.texts.fields.bodyHashStored,o,e.bodyHashDrift()))}}function ece(t,o){if(t&1&&(h(0,"span",3),b(1),_()),t&2){let e=d();l(),x(e.texts.absentMarker)}}function tce(t,o){t&1&&le(0)}function nce(t,o){if(t&1&&I(0,tce,1,0,"ng-container",11),t&2){let e=d(),n=yt(42);m("ngTemplateOutlet",n)("ngTemplateOutletContext",Mi(2,Wle,e.texts.fields.bodyHashLive,o,e.bodyHashDrift()))}}function ice(t,o){if(t&1&&(h(0,"span",3),b(1),_()),t&2){let e=d();l(),x(e.texts.absentMarker)}}function oce(t,o){t&1&&le(0)}function rce(t,o){if(t&1&&I(0,oce,1,0,"ng-container",11),t&2){let e=d(),n=yt(42);m("ngTemplateOutlet",n)("ngTemplateOutletContext",Mi(2,Kle,e.texts.fields.frontmatterHashStored,o,e.frontmatterHashDrift()))}}function ace(t,o){if(t&1&&(h(0,"span",3),b(1),_()),t&2){let e=d();l(),x(e.texts.absentMarker)}}function sce(t,o){t&1&&le(0)}function lce(t,o){if(t&1&&I(0,sce,1,0,"ng-container",11),t&2){let e=d(),n=yt(42);m("ngTemplateOutlet",n)("ngTemplateOutletContext",Mi(2,Yle,e.texts.fields.frontmatterHashLive,o,e.frontmatterHashDrift()))}}function cce(t,o){if(t&1&&(h(0,"span",3),b(1),_()),t&2){let e=d();l(),x(e.texts.absentMarker)}}function dce(t,o){t&1&&(h(0,"code"),b(1),_()),t&2&&(l(),x(o))}function uce(t,o){if(t&1&&(h(0,"span",3),b(1),_()),t&2){let e=d();l(),x(e.texts.notSetMarker)}}function pce(t,o){t&1&&(h(0,"code"),b(1),_()),t&2&&(l(),x(o))}function hce(t,o){if(t&1&&(h(0,"span",3),b(1),_()),t&2){let e=d();l(),x(e.texts.notSetMarker)}}function fce(t,o){t&1&&(h(0,"code"),b(1),_()),t&2&&(l(),x(o))}function mce(t,o){if(t&1&&(h(0,"span",3),b(1),_()),t&2){let e=d();l(),x(e.texts.absentMarker)}}function _ce(t,o){if(t&1&&(h(0,"span",13),b(1),_()),t&2){let e=d(2);l(),x(e.texts.copiedLabel)}}function gce(t,o){if(t&1){let e=W();h(0,"button",12),A("click",function(){let i=w(e),r=i.key,a=i.value,s=d();return T(s.copyHash(r,a))}),h(1,"code"),b(2),_(),M(3,_ce,2,1,"span",13),_()}if(t&2){let e=o.key,n=o.label,i=o.value,r=o.drift,a=d();O("title",i)("aria-label",a.texts.copyA11y(n)),l(),se("dbg__diff",r),l(),x(a.truncateHash(i)),l(),D(a.copiedKey()===e?3:-1)}}var sP=(()=>{class t{node=B.required();sidecarRoot=B(null);overlay=B(void 0);texts=aP;copiedKey=X(null);identityBlock=E(()=>{let e=this.sidecarRoot(),n={path:null,bodyHash:null,frontmatterHash:null,resolvedProvider:null,resolvedKind:null};if(!e)return n;let i=e.identity;if(typeof i!="object"||i===null)return n;let r=i,a=typeof r.resolvedAs=="object"&&r.resolvedAs!==null?r.resolvedAs:null;return{path:typeof r.path=="string"?r.path:null,bodyHash:typeof r.bodyHash=="string"?r.bodyHash:null,frontmatterHash:typeof r.frontmatterHash=="string"?r.frontmatterHash:null,resolvedProvider:a&&typeof a.provider=="string"?a.provider:null,resolvedKind:a&&typeof a.kind=="string"?a.kind:null}});bodyHashLive=E(()=>this.node().bodyHash??null);frontmatterHashLive=E(()=>this.node().frontmatterHash??null);bodyHashDrift=E(()=>{let e=this.identityBlock().bodyHash,n=this.bodyHashLive();return e!==null&&n!==null&&e!==n});frontmatterHashDrift=E(()=>{let e=this.identityBlock().frontmatterHash,n=this.frontmatterHashLive();return e!==null&&n!==null&&e!==n});sidecarStatusLiteral=E(()=>{let e=this.overlay();if(!e)return null;let n=e.status??null;return n===null?null:String(n)});async copyHash(e,n){try{await navigator.clipboard.writeText(n),this.copiedKey.set(e),setTimeout(()=>{this.copiedKey()===e&&this.copiedKey.set(null)},2e3)}catch{}}truncateHash(e){return e.length>20?`${e.slice(0,20)}...`:e}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=z({type:t,selectors:[["sm-inspector-debug-panel"]],inputs:{node:[1,"node"],sidecarRoot:[1,"sidecarRoot"],overlay:[1,"overlay"]},decls:43,vars:16,consts:[["hashCell",""],["data-testid","inspector-debug-panel",1,"sm-block__kv","dbg__kv"],["data-testid","dbg-for-path"],[1,"dbg__absent"],["data-testid","dbg-body-hash-stored"],["data-testid","dbg-body-hash-live"],["data-testid","dbg-fm-hash-stored"],["data-testid","dbg-fm-hash-live"],["data-testid","dbg-resolved-provider"],["data-testid","dbg-resolved-kind"],["data-testid","dbg-sidecar-status"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["type","button",1,"dbg__copy",3,"click"],["role","status",1,"dbg__copied"]],template:function(n,i){if(n&1&&(h(0,"dl",1)(1,"dt"),b(2),_(),h(3,"dd",2),M(4,Xle,2,1,"code")(5,Zle,2,1,"span",3),_(),h(6,"dt"),b(7),_(),h(8,"dd",4),M(9,Jle,1,6,"ng-container")(10,ece,2,1,"span",3),_(),h(11,"dt"),b(12),_(),h(13,"dd",5),M(14,nce,1,6,"ng-container")(15,ice,2,1,"span",3),_(),h(16,"dt"),b(17),_(),h(18,"dd",6),M(19,rce,1,6,"ng-container")(20,ace,2,1,"span",3),_(),h(21,"dt"),b(22),_(),h(23,"dd",7),M(24,lce,1,6,"ng-container")(25,cce,2,1,"span",3),_(),h(26,"dt"),b(27),_(),h(28,"dd",8),M(29,dce,2,1,"code")(30,uce,2,1,"span",3),_(),h(31,"dt"),b(32),_(),h(33,"dd",9),M(34,pce,2,1,"code")(35,hce,2,1,"span",3),_(),h(36,"dt"),b(37),_(),h(38,"dd",10),M(39,fce,2,1,"code")(40,mce,2,1,"span",3),_()(),I(41,gce,4,6,"ng-template",null,0,We)),n&2){let r,a,s,c,u,f,g,C;l(2),x(i.texts.fields.forPath),l(2),D((r=i.identityBlock().path)?4:5,r),l(3),x(i.texts.fields.bodyHashStored),l(2),D((a=i.identityBlock().bodyHash)?9:10,a),l(3),x(i.texts.fields.bodyHashLive),l(2),D((s=i.bodyHashLive())?14:15,s),l(3),x(i.texts.fields.frontmatterHashStored),l(2),D((c=i.identityBlock().frontmatterHash)?19:20,c),l(3),x(i.texts.fields.frontmatterHashLive),l(2),D((u=i.frontmatterHashLive())?24:25,u),l(3),x(i.texts.fields.resolvedProvider),l(2),D((f=i.identityBlock().resolvedProvider)?29:30,f),l(3),x(i.texts.fields.resolvedKind),l(2),D((g=i.identityBlock().resolvedKind)?34:35,g),l(3),x(i.texts.fields.sidecarStatus),l(2),D((C=i.sidecarStatusLiteral())?39:40,C)}},dependencies:[Mt],styles:["[_nghost-%COMP%]{display:block}.dbg__kv[_ngcontent-%COMP%] .dbg__diff[_ngcontent-%COMP%]{background:var(--sm-severity-error-bg);color:var(--sm-severity-error)}.dbg__kv[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{word-break:break-all}.dbg__absent[_ngcontent-%COMP%]{font-family:var(--sm-font-mono);font-size:.78rem;color:var(--sm-text-muted);font-style:italic}.dbg__copy[_ngcontent-%COMP%]{display:inline-flex;align-items:baseline;gap:.4rem;padding:0;border:none;background:none;font:inherit;color:inherit;text-align:left;cursor:pointer}.dbg__copy[_ngcontent-%COMP%]:hover code[_ngcontent-%COMP%]{text-decoration:underline dotted;text-underline-offset:2px}.dbg__copy[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--p-primary-color);outline-offset:1px;border-radius:var(--sm-radius-sm)}.dbg__copied[_ngcontent-%COMP%]{font-family:var(--sm-font-mono);font-size:.72rem;font-style:italic;color:var(--sm-severity-success)}"],changeDetection:0})}return t})();function bce(t,o){if(t&1&&(re(0,"span",3),ie(1,"i",6),re(2,"span"),b(3),re(4,"code"),b(5),fe()()()),t&2){d(2);let e=Ce(0),n=d();l(3),ke("",n.texts.fields.lastBumpedBy," "),l(2),x(e.lastBumpedBy)}}function vce(t,o){if(t&1&&(re(0,"dt"),b(1),fe(),re(2,"dd",2)(3,"span",3),ie(4,"i",4),re(5,"span",5),b(6),fe()(),M(7,bce,6,2,"span",3),fe()),t&2){d();let e=Ce(0),n=d();l(),x(n.texts.fields.lastBumpedAt),l(4),ot("title",e.lastBumpedAt),l(),x(n.lastBumpedRel()),l(),D(e.lastBumpedBy!==null?7:-1)}}function yce(t,o){if(t&1&&(re(0,"span",3),ie(1,"i",6),re(2,"span"),b(3),re(4,"code"),b(5),fe()()()),t&2){d(2);let e=Ce(0),n=d();l(3),ke("",n.texts.fields.createdBy," "),l(2),x(e.createdBy)}}function Cce(t,o){if(t&1&&(re(0,"dt"),b(1),fe(),re(2,"dd",7)(3,"span",3),ie(4,"i",8),re(5,"span",5),b(6),fe()(),M(7,yce,6,2,"span",3),fe()),t&2){d();let e=Ce(0),n=d();l(),x(n.texts.fields.createdAt),l(4),ot("title",e.createdAt),l(),x(n.createdRel()),l(),D(e.createdBy!==null?7:-1)}}function xce(t,o){if(t&1&&(Gt(0),re(1,"dl",0),M(2,vce,8,4),M(3,Cce,8,4),fe()),t&2){let e=Tt(d().audit());l(2),D(e.lastBumpedAt!==null?2:-1),l(),D(e.createdAt!==null?3:-1)}}function wce(t,o){if(t&1&&(re(0,"p",1),b(1),fe()),t&2){let e=d();l(),x(e.texts.headerEmpty)}}var lP=(()=>{class t{sidecarRoot=B(null);texts=Si.audit;audit=E(()=>{let e=this.sidecarRoot(),n={lastBumpedAt:null,lastBumpedBy:null,createdAt:null,createdBy:null};if(!e)return n;let i=e.audit;if(typeof i!="object"||i===null)return n;let r=i;return{lastBumpedAt:_f(r.lastBumpedAt),lastBumpedBy:_f(r.lastBumpedBy),createdAt:_f(r.createdAt),createdBy:_f(r.createdBy)}});hasContent=E(()=>{let e=this.audit();return e.lastBumpedAt!==null||e.lastBumpedBy!==null||e.createdAt!==null||e.createdBy!==null});lastBumpedRel=E(()=>{let e=this.audit().lastBumpedAt;return e===null?null:Ff(e)});createdRel=E(()=>{let e=this.audit().createdAt;return e===null?null:Ff(e)});static \u0275fac=function(n){return new(n||t)};static \u0275cmp=z({type:t,selectors:[["sm-inspector-audit-panel"]],inputs:{sidecarRoot:[1,"sidecarRoot"]},decls:2,vars:1,consts:[["data-testid","inspector-audit-panel",1,"sm-block__kv"],["data-testid","inspector-audit-panel-empty",1,"audit__empty"],["data-testid","inspector-audit-last-bumped",1,"sm-block__inline"],[1,"sm-block__meta"],["aria-hidden","true",1,"pi","pi-history"],[3,"title"],["aria-hidden","true",1,"pi","pi-user"],["data-testid","inspector-audit-created",1,"sm-block__inline"],["aria-hidden","true",1,"pi","pi-calendar-plus"]],template:function(n,i){n&1&&M(0,xce,4,3,"dl",0)(1,wce,2,1,"p",1),n&2&&D(i.hasContent()?0:1)},styles:["[_nghost-%COMP%]{display:block}.audit__empty[_ngcontent-%COMP%]{margin:0;font-style:italic;color:var(--sm-text-muted);font-size:.85rem}"],changeDetection:0})}return t})();function _f(t){return typeof t=="string"&&t.length>0?t:null}function Tce(t,o){if(t&1&&(h(0,"span",7),N(1,"i",19),b(2),_()),t&2){let e=d();m("pTooltip",e.texts.header.invalidFrontmatterTooltip),l(2),ke(" ",e.texts.header.invalidFrontmatter," ")}}function Sce(t,o){t&1&&(h(0,"span",8),b(1),_()),t&2&&(l(),x(o))}function kce(t,o){if(t&1&&(h(0,"span",9)(1,"span",20),b(2,"\u25CF"),_(),b(3),_()),t&2){let e=o,n=d();m("pTooltip",e==="experimental"?n.cardTexts.stability.experimental:e==="deprecated"?n.cardTexts.stability.deprecated:""),O("data-stability",e),l(3),ke(" ",e," ")}}function Ice(t,o){if(t&1&&(h(0,"span",14),N(1,"i",21),_()),t&2){let e=d();m("pTooltip",e.headerStaleTooltip())}}function Ece(t,o){if(t&1&&(h(0,"div",17)(1,"span",22),b(2),_(),N(3,"p-button",23)(4,"p-button",24)(5,"p-button",25),_()),t&2){let e=d();l(2),x(e.texts.actionMocks.label),l(),m("label",e.texts.actionMocks.summary)("outlined",!0),l(),m("label",e.texts.actionMocks.audit)("outlined",!0),l(),m("label",e.texts.actionMocks.validate)("outlined",!0)}}function Mce(t,o){if(t&1){let e=W();h(0,"button",27),A("click",function(){let i=w(e).$implicit,r=d(2);return T(r.tagClick.emit(i))}),N(1,"i",28),b(2),_()}if(t&2){let e=o.$implicit,n=d(2);se("inspector__tag--active",n.isActiveTag(e)),O("aria-pressed",n.isActiveTag(e))("aria-label",n.texts.header.tagFilterAriaLabel(e)),l(2),ke(" ",e," ")}}function Dce(t,o){if(t&1&&(h(0,"div",18),ue(1,Mce,3,5,"button",26,Ue),_()),t&2){let e=d();l(),pe(e.headerTags())}}var Pce=new Set(["red","orange","yellow","green","cyan","blue","purple","pink"]),cP=(()=>{class t{node=B.required();showActionMocks=B(!1);frontmatterInvalid=B(!1);activeTag=B(null);favoriteToggle=et();tagClick=et();texts=Si;cardTexts=Vn;headerName=E(()=>{let e=this.node(),n=e.frontmatter.name;return typeof n=="string"&&n.trim().length>0?n:e.path.split("/").pop()??e.path});headerVersion=E(()=>ns(this.node()));headerStability=E(()=>mo(this.node()));headerTitleColor=E(()=>{let e=this.node(),i=e.frontmatter.color;return typeof i=="string"&&Pce.has(i)?i:`var(--sm-kind-${e.kind})`});headerTags=E(()=>_o(this.node()));isActiveTag(e){return this.activeTag()===e}headerIsStale=E(()=>is(this.node()));headerStaleTooltip=E(()=>os(this.node(),Vn.sidecar));onFavoriteClick(e){e.stopPropagation(),this.favoriteToggle.emit(this.node().path)}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=z({type:t,selectors:[["sm-inspector-header"]],inputs:{node:[1,"node"],showActionMocks:[1,"showActionMocks"],frontmatterInvalid:[1,"frontmatterInvalid"],activeTag:[1,"activeTag"]},outputs:{favoriteToggle:"favoriteToggle",tagClick:"tagClick"},decls:22,vars:22,consts:[["data-testid","inspector-title",1,"inspector__header"],["data-testid","inspector-kind-chip",1,"inspector__kind-eyebrow"],["aria-hidden","true",1,"inspector__icon-box"],[3,"kind","provider","size"],[1,"inspector__content"],[1,"inspector__name-row"],["data-testid","inspector-title-text",1,"inspector__name"],["data-testid","inspector-fm-invalid",1,"inspector__fm-invalid",3,"pTooltip"],["data-testid","inspector-version",1,"inspector__name-version"],["data-testid","inspector-stability-tag",1,"inspector__stability",3,"pTooltip"],["data-testid","inspector-path",1,"inspector__path-code"],[1,"inspector__actions-cluster"],["type","button","data-testid","inspector-favorite",1,"inspector__favorite",3,"click","pTooltip"],["aria-hidden","true",1,"pi"],["data-testid","inspector-stale-badge",1,"inspector__stale-icon",3,"pTooltip"],["slot","inspector.header.badge.counter",3,"node"],["slot","inspector.header.badge.tag",3,"node"],["data-testid","inspector-plugin-actions",1,"inspector__plugin-actions"],["data-testid","inspector-header-tags",1,"inspector__tags"],["aria-hidden","true",1,"pi","pi-exclamation-triangle"],["aria-hidden","true",1,"inspector__stability-dot"],["aria-hidden","true",1,"pi","pi-clock"],[1,"inspector__plugin-actions-label"],["icon","pi pi-sparkles","severity","secondary","size","small","data-testid","inspector-plugin-btn-summary",3,"label","outlined"],["icon","pi pi-search","severity","secondary","size","small","data-testid","inspector-plugin-btn-audit",3,"label","outlined"],["icon","pi pi-check-circle","severity","secondary","size","small","data-testid","inspector-plugin-btn-validate",3,"label","outlined"],["type","button","data-testid","inspector-header-tag",1,"inspector__tag",3,"inspector__tag--active"],["type","button","data-testid","inspector-header-tag",1,"inspector__tag",3,"click"],["aria-hidden","true",1,"pi","pi-tag"]],template:function(n,i){if(n&1&&(h(0,"header",0)(1,"span",1),b(2),_(),h(3,"div",2),N(4,"sm-kind-icon",3),_(),h(5,"div",4)(6,"div",5)(7,"h2",6),b(8),_(),M(9,Tce,3,2,"span",7),M(10,Sce,2,1,"span",8),M(11,kce,4,3,"span",9),_(),h(12,"code",10),b(13),_()(),h(14,"div",11)(15,"button",12),A("click",function(a){return i.onFavoriteClick(a)}),N(16,"i",13),_(),M(17,Ice,2,1,"span",14),N(18,"sm-view-contributions-host",15)(19,"sm-view-contributions-host",16),_(),M(20,Ece,6,7,"div",17),M(21,Dce,3,0,"div",18),_()),n&2){let r,a,s=i.node();l(2),x(s.kind),l(2),m("kind",s.kind)("provider",s.provider)("size",18),l(4),x(i.headerName()),l(),D(i.frontmatterInvalid()?9:-1),l(),D((r=i.headerVersion())?10:-1,r),l(),D((a=i.headerStability())?11:-1,a),l(2),x(s.path),l(2),se("inspector__favorite--on",s.isFavorite===!0),m("pTooltip",s.isFavorite===!0?i.cardTexts.favoriteRemoveTooltip:i.cardTexts.favoriteAddTooltip),O("aria-label",s.isFavorite===!0?i.cardTexts.ariaFavoriteRemove:i.cardTexts.ariaFavoriteAdd),l(),se("pi-star-fill",s.isFavorite===!0)("pi-star",s.isFavorite!==!0),l(),D(i.headerIsStale()?17:-1),l(),m("node",s),l(),m("node",s),l(),D(i.showActionMocks()?20:-1),l(),D(i.headerTags().length>0?21:-1)}},dependencies:[an,Ut,Ve,Be,or,ti],styles:["[_nghost-%COMP%]{display:block}.inspector__header[_ngcontent-%COMP%]{position:relative;display:grid;grid-template-columns:auto minmax(0,1fr) auto;column-gap:.75rem;row-gap:.3rem;align-items:start;padding:0 .85rem .85rem;background:color-mix(in srgb,var(--accent) 10%,transparent);color:var(--p-text-color);border-left:3px solid var(--accent);border-bottom:1px solid var(--sm-border)}.inspector__kind-eyebrow[_ngcontent-%COMP%]{grid-column:1 / -1;grid-row:1;font-size:.78rem;font-weight:600;color:var(--accent);text-transform:lowercase;line-height:1.2}.inspector__icon-box[_ngcontent-%COMP%]{width:40px;height:40px;border-radius:var(--sm-radius-md);display:flex;align-items:center;justify-content:center;background:var(--accent);color:var(--sm-accent-fg);flex:none;font-size:1.05rem;grid-column:1;grid-row:2;align-self:start}.inspector__content[_ngcontent-%COMP%]{min-width:0;width:100%;display:flex;flex-direction:column;gap:.18rem}.inspector__name-row[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:baseline;gap:.5rem;min-width:0}.inspector__name[_ngcontent-%COMP%]{margin:0;font-size:1.05rem;font-weight:600;line-height:1.25;letter-spacing:-.01em;word-break:break-word;color:var(--p-text-color)}.inspector__fm-invalid[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.25rem;padding:.05rem .4rem;border-radius:var(--sm-radius-sm);font-size:.7rem;font-weight:500;text-transform:lowercase;white-space:nowrap;cursor:help;color:var(--sm-severity-warn);background:color-mix(in srgb,var(--sm-severity-warn) 12%,transparent);border:1px solid color-mix(in srgb,var(--sm-severity-warn) 35%,transparent)}.inspector__fm-invalid[_ngcontent-%COMP%] .pi[_ngcontent-%COMP%]{font-size:.68rem}.inspector__stability[_ngcontent-%COMP%]{font-size:.78rem;font-weight:500;text-transform:lowercase;cursor:help;white-space:nowrap}.inspector__stability-dot[_ngcontent-%COMP%]{margin-right:.25rem;font-size:.55rem;vertical-align:middle}.inspector__stability[data-stability=stable][_ngcontent-%COMP%]{color:var(--sm-severity-success)}.inspector__stability[data-stability=experimental][_ngcontent-%COMP%]{color:var(--sm-severity-info)}.inspector__stability[data-stability=deprecated][_ngcontent-%COMP%]{color:var(--sm-severity-warn)}.inspector__path-code[_ngcontent-%COMP%]{font-family:var(--sm-font-mono);font-size:.7rem;color:var(--p-text-muted-color);background:var(--sm-bg-hover);padding:.1rem .4rem;border-radius:var(--sm-radius-sm);word-break:break-all;align-self:flex-start;max-width:100%;margin-top:.15rem}.inspector__actions-cluster[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.3rem;align-self:start}.inspector__favorite[_ngcontent-%COMP%]{width:24px;height:24px;display:inline-flex;align-items:center;justify-content:center;background:transparent;border:0;padding:0;cursor:pointer;color:var(--p-text-muted-color);border-radius:var(--sm-radius-md);flex:none;transition:background .12s ease,color .12s ease}.inspector__favorite[_ngcontent-%COMP%] .pi[_ngcontent-%COMP%]{font-size:.85rem;line-height:1}.inspector__favorite[_ngcontent-%COMP%]:hover{background:var(--sm-bg-hover);color:var(--p-text-color)}.inspector__favorite[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--p-primary-color);outline-offset:1px}.inspector__favorite--on[_ngcontent-%COMP%]{color:var(--p-primary-color)}.inspector__stale-icon[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;color:var(--p-text-muted-color);cursor:help}.inspector__stale-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:.78rem;width:1em;height:1em;line-height:1}.inspector__name-version[_ngcontent-%COMP%]{font-family:var(--sm-font-mono);font-size:.7rem;color:var(--p-text-color);background:var(--sm-bg-hover);padding:.08rem .4rem;border-radius:var(--sm-radius-sm);line-height:1.2;flex:none}.inspector__plugin-actions[_ngcontent-%COMP%]{grid-column:1 / -1;display:flex;flex-wrap:wrap;align-items:center;gap:.4rem;margin-top:.55rem;padding-top:.5rem;border-top:1px solid var(--sm-border)}.inspector__plugin-actions-label[_ngcontent-%COMP%]{font-size:.6rem;text-transform:uppercase;letter-spacing:.05em;font-weight:600;color:var(--p-text-muted-color);margin-right:.15rem}.inspector__tags[_ngcontent-%COMP%]{grid-column:1 / -1;display:flex;flex-wrap:wrap;align-items:center;gap:.3rem;margin-top:.55rem;padding-top:.5rem;border-top:1px solid var(--sm-border)}.inspector__tag[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.25rem;padding:.1rem .5rem;border:1px solid transparent;border-radius:var(--sm-radius-sm);background:var(--sm-bg-hover);color:var(--p-text-color);font-size:.72rem;font-weight:500;line-height:1.35;cursor:pointer;transition:background .12s ease-out,color .12s ease-out,border-color .12s ease-out}.inspector__tag[_ngcontent-%COMP%] .pi[_ngcontent-%COMP%]{font-size:.62rem;opacity:.7}.inspector__tag[_ngcontent-%COMP%]:not(.inspector__tag--active):hover{border-color:var(--sm-border);color:var(--p-primary-color)}.inspector__tag[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--p-primary-color);outline-offset:1px}.inspector__tag--active[_ngcontent-%COMP%]{background:var(--p-primary-color);color:var(--p-primary-contrast-color);border-color:var(--p-primary-color)}.inspector__tag--active[_ngcontent-%COMP%]:hover{filter:brightness(1.08)}.inspector__tag--active[_ngcontent-%COMP%] .pi[_ngcontent-%COMP%]{opacity:1}"],changeDetection:0})}return t})();var Rce=[[["","smSectionTitleExtra",""]],"*"],Oce=["[smSectionTitleExtra]","*"],dP=(()=>{class t{title=B.required();expanded=B.required();toggleTestid=B();toggleAriaLabel=B();toggleTooltip=B();toggle=et();static \u0275fac=function(n){return new(n||t)};static \u0275cmp=z({type:t,selectors:[["sm-collapsible-section"]],hostAttrs:[1,"sm-block","sm-block--collapsible"],inputs:{title:[1,"title"],expanded:[1,"expanded"],toggleTestid:[1,"toggleTestid"],toggleAriaLabel:[1,"toggleAriaLabel"],toggleTooltip:[1,"toggleTooltip"]},outputs:{toggle:"toggle"},ngContentSelectors:Oce,decls:6,vars:9,consts:[["type","button",1,"sm-block__row","sm-block__row--toggle",3,"click","pTooltip"],[1,"sm-block__title"],["aria-hidden","true",1,"pi","sm-block__chevron"]],template:function(n,i){n&1&&(mn(Rce),h(0,"button",0),A("click",function(){return i.toggle.emit()}),h(1,"span",1),b(2),$e(3),_(),N(4,"i",2),_(),$e(5,1)),n&2&&(m("pTooltip",i.toggleTooltip()??""),O("aria-expanded",i.expanded())("aria-label",i.toggleAriaLabel()??null)("data-testid",i.toggleTestid()??null),l(2),ke(" ",i.title()," "),l(2),se("pi-chevron-right",!i.expanded())("pi-chevron-down",i.expanded()))},dependencies:[Ve,Be],encapsulation:2,changeDetection:0})}return t})();function f0(t){hn(f0);let{path:o,dataSource:e,markdown:n}=t,i=X("idle"),r=X(null),a=0,s=async(c,u)=>{try{let f=await e.getNode(c,{includeBody:!0});if(u!==a)return;if(f===null){i.set("unavailable");return}let g=f.item.body;if(g===null){i.set("unavailable");return}if(g===void 0||g.trim().length===0){i.set("empty");return}let C=await n.render(g);if(u!==a)return;r.set(C),i.set("ready")}catch{if(u!==a)return;i.set("error")}};return de(()=>{let c=o(),u=++a;if(r.set(null),!c){i.set("idle");return}i.set("loading"),s(c,u)}),t.scanCompleted$?.pipe(Jn()).subscribe(()=>{let c=o();c&&s(c,++a)}),{bodyState:i.asReadonly(),bodyHtml:r.asReadonly()}}function m0(t){hn(m0);let{node:o,sidecarService:e,confirmation:n}=t,i=Si,r=E(()=>{let S=o();if(!S)return!1;let F=S.sidecar;return!F||F.present===!1||F.status==="fresh"?!1:X0(F)}),a=X(!1),s=X(null),c=E(()=>{let F=o()?.sidecar;return!F||F.present===!1?i.bump.tooltipDisabledNoSidecar:r()?i.bump.tooltipEnabled:i.bump.tooltipDisabledFresh}),u=S=>{if(S instanceof Lf)switch(S.code){case"sidecar-fresh":return`${i.bump.errorPrefix} ${i.bump.errorFresh}`;case"not-found":return`${i.bump.errorPrefix} ${i.bump.errorNotFound}`;default:return`${i.bump.errorPrefix} ${S.message||i.bump.errorGeneric}`}let F=S instanceof Error?S.message:String(S);return`${i.bump.errorPrefix} ${F||i.bump.errorGeneric}`},f=async S=>{if(!a()){a.set(!0),s.set(null);try{await e.bump(S,{confirm:!0})}catch(F){s.set(u(F))}finally{a.set(!1)}}},g=S=>{n.confirm({header:i.bump.consentHeader,message:i.bump.consentMessage,acceptLabel:i.bump.consentAccept,rejectLabel:i.bump.consentReject,acceptButtonProps:{severity:"primary"},rejectButtonProps:{severity:"secondary"},accept:()=>{f(S)}})},C=async()=>{let S=o();if(S&&r()&&!a()){a.set(!0),s.set(null);try{await e.bump(S.path)}catch(F){if(F instanceof Lf&&F.code==="confirm-required"&&Fce(F.details)){g(S.path);return}s.set(u(F))}finally{a.set(!1)}}},k=()=>{s.set(null)};return{canBump:r,bumpInFlight:a.asReadonly(),bumpError:s.asReadonly(),bumpTooltip:c,onBumpClick:C,dismissBumpError:k}}function Fce(t){return typeof t!="object"||t===null?!1:t.key==="allowEditSmFiles"}function _0(t){hn(_0);let{path:o,pathSet:e,dataSource:n}=t,i=X(new Set),r=X(new Set),a=X(new Set);return de(()=>{o(),i.set(new Set),r.set(new Set),a.set(new Set)}),{linkStatus:f=>e().has(f)||i().has(f)?"live":r().has(f)?"dead-confirmed":"dead-heuristic",isVerifying:f=>a().has(f),verifyDeadLink:async f=>{if(!(i().has(f)||r().has(f))&&!a().has(f)){a.update(g=>new Set(g).add(f));try{await n.getNode(f)===null?r.update(C=>new Set(C).add(f)):i.update(C=>new Set(C).add(f))}catch{}finally{a.update(g=>{let C=new Set(g);return C.delete(f),C})}}}}}var pP="skill-map.ui.inspector.sections",Nce={body:!0,findings:!0};function uP(t){return Nce[t]??!1}function g0(){hn(g0);let t=X(Ace());return de(()=>{Lce(t())}),{expanded:o=>t()[o]??uP(o),toggle:o=>t.update(e=>zt(be({},e),{[o]:!(e[o]??uP(o))}))}}function Ace(){try{let t=localStorage.getItem(pP);if(!t)return{};let o=JSON.parse(t);if(o===null||typeof o!="object"||Array.isArray(o))return{};let e={};for(let[n,i]of Object.entries(o))typeof i=="boolean"&&(e[n]=i);return e}catch{return{}}}function Lce(t){try{localStorage.setItem(pP,JSON.stringify(t))}catch{}}var Bce=new Set(["inspector.body.panel.breakdown","inspector.body.panel.records","inspector.body.panel.tree","inspector.body.panel.key-values","inspector.body.panel.link-list","inspector.body.panel.markdown"]),Vce=new Set(["identity","annotations","settings","audit"]),zce=new Set(["agent","skill","command"]);function hP(t){let{node:o}=t,e=E(()=>{let c=o()?.sidecar;if(!c||!c.present)return null;if(c.root)return c.root;let u={};return c.annotations&&(u.annotations=c.annotations),u}),n=E(()=>{let c=o()?.kind;return c!==void 0&&zce.has(c)}),i=E(()=>{let c=o();return c?(c.linksOutCount??0)+(c.linksInCount??0)+(c.externalRefsCount??0)>0:!1}),r=E(()=>{let c=e();if(!c)return!1;for(let u of Object.keys(c))if(!Vce.has(u))return!0;return!1}),a=E(()=>{let c=o()?.contributions??[];for(let u of c)if(Bce.has(u.slot))return!0;return!1}),s=E(()=>e()!==null);return{sidecarRoot:e,hasVendorFrontmatter:n,hasConnections:i,hasPluginContributions:r,hasViewContributions:a,hasMetadata:s}}function qce(t,o){if(t&1&&(h(0,"section",0)(1,"div",2),N(2,"span",3),h(3,"p",4),b(4),_(),h(5,"p",5),b(6),_()()()),t&2){let e=d();l(4),x(e.texts.emptyNoSelection.title),l(2),x(e.texts.emptyNoSelection.desc)}}function Gce(t,o){if(t&1&&(h(0,"section",0)(1,"div",6),N(2,"span",7),h(3,"p",4),b(4),_(),h(5,"p",5)(6,"code"),b(7),_(),h(8,"span"),b(9),_()()()()),t&2){let e=d();l(4),x(e.texts.emptyNotFound.title),l(3),x(e.path()),l(2),x(e.texts.emptyNotFound.descSuffix)}}function jce(t,o){if(t&1&&N(0,"p",9),t&2){let e=d(2);m("innerHTML",e.descriptionHtml(),Ei)}}function Uce(t,o){if(t&1&&(h(0,"div",10),N(1,"i",23),h(2,"span"),b(3),_()()),t&2){let e=d(2);l(3),x(e.texts.supersededByBanner(o))}}function $ce(t,o){if(t&1){let e=W();h(0,"div",11),N(1,"i",24),h(2,"span"),b(3),_(),h(4,"button",25),A("click",function(){w(e);let i=d(2);return T(i.dismissBumpError())}),N(5,"i",26),_()()}if(t&2){let e=d(2);l(3),x(o),l(),O("aria-label",e.texts.bumpErrorDismissAriaLabel)}}function Wce(t,o){if(t&1&&(h(0,"p",35)(1,"strong"),b(2),_(),b(3),_()),t&2){let e=d(5);l(2),x(e.texts.findingHintLabel),l(),ke(" ",o," ")}}function Kce(t,o){if(t&1&&(h(0,"li",30)(1,"div",31)(2,"span",32),b(3),_(),h(4,"code",33),b(5),_()(),h(6,"p",34),b(7),_(),M(8,Wce,4,2,"p",35),_()),t&2){let e,n=o.$implicit;O("data-severity",n.severity),l(2),O("data-severity",n.severity),l(),x(n.severity),l(2),x(n.analyzerId),l(2),x(n.message),l(),D((e=n.fix==null?null:n.fix.summary)?8:-1,e)}}function Yce(t,o){if(t&1&&(h(0,"ul",29),ue(1,Kce,9,6,"li",30,wf),_()),t&2){let e=d(3);l(),pe(e.sortedIssues())}}function Xce(t,o){if(t&1){let e=W();h(0,"sm-collapsible-section",27),A("toggle",function(){w(e);let i=d(2);return T(i.toggleSection("findings"))}),h(1,"span",28),b(2),_(),M(3,Yce,3,0,"ul",29),_()}if(t&2){let e=d(2);m("title",e.texts.sections.findings)("expanded",e.expanded("findings")),l(2),ke("(",e.issues().length,")"),l(),D(e.expanded("findings")?3:-1)}}function Zce(t,o){if(t&1){let e=W();h(0,"sm-linked-nodes-panel",38),A("openPath",function(i){w(e);let r=d(3);return T(r.openPath(i))}),_()}if(t&2){d(2);let e=Ce(0);m("path",e.path)}}function Qce(t,o){if(t&1){let e=W();h(0,"sm-collapsible-section",36),A("toggle",function(){w(e);let i=d(2);return T(i.toggleSection("connections"))}),M(1,Zce,1,1,"sm-linked-nodes-panel",37),_()}if(t&2){let e=d(2);m("title",e.texts.sections.connections)("expanded",e.expanded("connections")),l(),D(e.expanded("connections")?1:-1)}}function Jce(t,o){if(t&1){let e=W();h(0,"div",16)(1,"sm-vendor-frontmatter",39),A("toggle",function(){w(e);let i=d(2);return T(i.toggleSection("definition"))}),_()()}if(t&2){d();let e=Ce(0),n=Ce(1),i=d();l(),m("frontmatter",n)("kind",e.kind)("provider",e.provider)("skillPathByName",i.skillPathByName())("onSkillClick",i.onSkillChip)("expanded",i.expanded("definition"))}}function ede(t,o){t&1&&(h(0,"code",41),b(1),_()),t&2&&(l(),ke("(",o,")"))}function tde(t,o){if(t&1){let e=W();h(0,"sm-annotations-panel",43),A("openPath",function(i){w(e);let r=d(3);return T(r.openPath(i))}),_()}if(t&2){d(2);let e=Ce(0),n=d();m("overlay",e.sidecar)("knownPaths",n.pathSet())}}function nde(t,o){if(t&1){let e=W();h(0,"sm-collapsible-section",40),A("toggle",function(){w(e);let i=d(2);return T(i.toggleSection("annotations"))}),M(1,ede,2,1,"code",41),M(2,tde,1,2,"sm-annotations-panel",42),_()}if(t&2){let e,n=d(2);m("title",n.texts.sections.annotations)("expanded",n.expanded("annotations")),l(),D((e=n.sidecarFileName())?1:-1,e),l(),D(n.expanded("annotations")?2:-1)}}function ide(t,o){if(t&1&&(h(0,"p",45),b(1),_()),t&2){let e=d(4);l(),x(e.texts.body.loading)}}function ode(t,o){if(t&1&&N(0,"div",46),t&2){let e=d(4);m("innerHTML",e.bodyHtml(),Ei)}}function rde(t,o){if(t&1&&M(0,ide,2,1,"p",45)(1,ode,1,1,"div",46),t&2){let e,n=d(3);D((e=n.bodyState())==="loading"?0:e==="ready"?1:-1)}}function ade(t,o){if(t&1){let e=W();h(0,"sm-collapsible-section",44),A("toggle",function(){w(e);let i=d(2);return T(i.toggleSection("body"))}),M(1,rde,2,1),_()}if(t&2){let e=d(2);m("title",e.texts.sections.body)("expanded",e.expanded("body")),l(),D(e.expanded("body")?1:-1)}}function sde(t,o){if(t&1&&N(0,"sm-plugin-contributions",48),t&2){let e=d(3);m("sidecarRoot",e.sidecarRoot())}}function lde(t,o){if(t&1){let e=W();h(0,"sm-collapsible-section",47),A("toggle",function(){w(e);let i=d(2);return T(i.toggleSection("plugins"))}),M(1,sde,1,1,"sm-plugin-contributions",48),_()}if(t&2){let e=d(2);m("title",e.texts.sections.plugins)("expanded",e.expanded("plugins")),l(),D(e.expanded("plugins")?1:-1)}}function cde(t,o){if(t&1&&N(0,"sm-inspector-slots-panel",50),t&2){let e=d(3);m("node",e.node())}}function dde(t,o){if(t&1){let e=W();h(0,"sm-collapsible-section",49),A("toggle",function(){w(e);let i=d(2);return T(i.toggleSection("viewContributions"))}),M(1,cde,1,1,"sm-inspector-slots-panel",50),_()}if(t&2){let e=d(2);m("title",e.texts.sections.viewContributions)("expanded",e.expanded("viewContributions")),l(),D(e.expanded("viewContributions")?1:-1)}}function ude(t,o){if(t&1&&(h(0,"div",52),N(1,"sm-inspector-audit-panel",48)(2,"sm-inspector-debug-panel",53),_()),t&2){d(2);let e=Ce(0),n=d();l(),m("sidecarRoot",n.sidecarRoot()),l(),m("node",e)("sidecarRoot",n.sidecarRoot())("overlay",e.sidecar)}}function pde(t,o){if(t&1){let e=W();h(0,"sm-collapsible-section",51),A("toggle",function(){w(e);let i=d(2);return T(i.toggleSection("metadata"))}),M(1,ude,3,4,"div",52),_()}if(t&2){let e=d(2);m("title",e.texts.sections.metadata)("expanded",e.expanded("metadata")),l(),D(e.expanded("metadata")?1:-1)}}function hde(t,o){if(t&1){let e=W();Gt(0)(1),h(2,"section",0)(3,"sm-inspector-header",8),A("favoriteToggle",function(i){w(e);let r=d();return T(r.onHeaderFavoriteToggle(i))})("tagClick",function(i){w(e);let r=d();return T(r.tagSelect.emit(i))}),_(),M(4,jce,1,1,"p",9),M(5,Uce,4,1,"div",10),M(6,$ce,6,2,"div",11),h(7,"div",12)(8,"p-button",13),A("onClick",function(){w(e);let i=d();return T(i.onBumpClick())}),_()(),M(9,Xce,4,4,"sm-collapsible-section",14),M(10,Qce,2,3,"sm-collapsible-section",15),M(11,Jce,2,6,"div",16),M(12,nde,3,4,"sm-collapsible-section",17),M(13,ade,2,3,"sm-collapsible-section",18),M(14,lde,2,3,"sm-collapsible-section",19),M(15,dde,2,3,"sm-collapsible-section",20),M(16,pde,2,3,"sm-collapsible-section",21),N(17,"p-confirmdialog",22),_()}if(t&2){let e,n,i=d(),r=Tt(i.node());l();let a=Tt(r.frontmatter);l(),Ne("--accent","var(--sm-kind-"+r.kind+", var(--sm-kind-markdown))"),l(),m("node",r)("showActionMocks",i.showActionMocks)("frontmatterInvalid",i.frontmatterInvalid())("activeTag",i.activeTag()),l(),D(a.description?4:-1),l(),D((e=i.headerSupersededBy())?5:-1,e),l(),D((n=i.bumpError())?6:-1,n),l(2),m("label",i.texts.bump.label)("disabled",!i.canBump()||i.bumpInFlight())("loading",i.bumpInFlight())("pTooltip",i.bumpTooltip()),l(),D(i.issues().length>0?9:-1),l(),D(i.hasConnections()?10:-1),l(),D(i.hasVendorFrontmatter()?11:-1),l(),D(r.sidecar!=null&&r.sidecar.present?12:-1),l(),D(i.showBody()?13:-1),l(),D(i.hasPluginContributions()?14:-1),l(),D(i.hasViewContributions()?15:-1),l(),D(i.hasMetadata()?16:-1),l(),m("ariaLabel",i.texts.bump.consentDialogAriaLabel)}}var fP=(()=>{class t{loader=p(Ft);nodeOpenIntent=p(go);dataSource=p(ei);markdown=p(yo);wsEvents=p(cs);sidecarService=p(GD);confirmation=p(uo);texts=Si;cardTexts=Vn;showActionMocks=ir.inspector.actionMocks;path=B(void 0);activeTag=B(null);tagSelect=et();node=E(()=>{let e=this.path();return e?this.loader.nodes().find(n=>n.path===e)??null:null});pathSet=E(()=>{let e=new Set;for(let n of this.loader.nodes())e.add(n.path);return e});skillPathByName=E(()=>{let e=new Map;for(let n of this.loader.nodes()){if(n.kind!=="skill")continue;let i=n.frontmatter?.name;typeof i=="string"&&i.length>0&&e.set(i,n.path)}return e});headerSupersededBy=E(()=>Z0(this.node()));sidecarFileName=E(()=>{let e=this.node()?.path;return e?(e.split("/").pop()??e).replace(/\.md$/,".sm"):null});bodyHandle=f0({path:this.path,dataSource:this.dataSource,markdown:this.markdown,scanCompleted$:this.wsEvents.scanCompleted$});bodyState=this.bodyHandle.bodyState;bodyHtml=this.bodyHandle.bodyHtml;showBody=E(()=>{let e=this.bodyState();return e==="loading"||e==="ready"});descriptionHtml=Ba(()=>this.node()?.frontmatter.description??"",this.markdown);deadLink=_0({path:this.path,pathSet:this.pathSet,dataSource:this.dataSource});sectionCollapse=g0();expanded(e){return this.sectionCollapse.expanded(e)}toggleSection(e){this.sectionCollapse.toggle(e)}derivations=hP({node:this.node});sidecarRoot=this.derivations.sidecarRoot;hasVendorFrontmatter=this.derivations.hasVendorFrontmatter;hasConnections=this.derivations.hasConnections;hasPluginContributions=this.derivations.hasPluginContributions;hasViewContributions=this.derivations.hasViewContributions;hasMetadata=this.derivations.hasMetadata;issues=X([]);issuesLoaderEffect=de(e=>{let n=this.node();if(this.issues.set([]),!n)return;let i=n.path,r=!1;e(()=>{r=!0}),this.dataSource.listIssues({node:i}).then(a=>{r||this.issues.set(a.items)}).catch(()=>{r||this.issues.set([])})});sortedIssues=E(()=>{let e={error:0,warn:1,info:2};return[...this.issues()].sort((n,i)=>e[n.severity]-e[i.severity])});frontmatterInvalid=E(()=>this.issues().some(e=>e.analyzerId==="frontmatter-parse-error"));ngOnInit(){this.loader.nodes().length===0&&!this.loader.loading()&&this.loader.load()}openPath(e){this.nodeOpenIntent.open(e)}onSkillChip=e=>{this.openPath(e)};pathExists(e){return this.pathSet().has(e)}linkStatus(e){return this.deadLink.linkStatus(e)}isVerifying(e){return this.deadLink.isVerifying(e)}verifyDeadLink(e){return this.deadLink.verifyDeadLink(e)}onHeaderFavoriteToggle(e){let n=this.node();!n||n.path!==e||this.loader.toggleFavorite(e,!n.isFavorite)}bumpHandle=m0({node:this.node,sidecarService:this.sidecarService,confirmation:this.confirmation});canBump=this.bumpHandle.canBump;bumpInFlight=this.bumpHandle.bumpInFlight;bumpError=this.bumpHandle.bumpError;bumpTooltip=this.bumpHandle.bumpTooltip;onBumpClick(){return this.bumpHandle.onBumpClick()}dismissBumpError(){this.bumpHandle.dismissBumpError()}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=z({type:t,selectors:[["sm-inspector-view"]],inputs:{path:[1,"path"],activeTag:[1,"activeTag"]},outputs:{tagSelect:"tagSelect"},features:[we([uo])],decls:3,vars:1,consts:[["data-testid","inspector-view",1,"inspector"],["data-testid","inspector-view",1,"inspector",3,"--accent"],["data-testid","inspector-empty-no-selection",1,"empty-state"],[1,"empty-state__icon","pi","pi-eye"],[1,"empty-state__title"],[1,"empty-state__desc"],["data-testid","inspector-empty-not-found",1,"empty-state"],[1,"empty-state__icon","empty-state__icon--warn","pi","pi-question-circle"],[3,"favoriteToggle","tagClick","node","showActionMocks","frontmatterInvalid","activeTag"],["data-testid","inspector-description",1,"inspector__desc",3,"innerHTML"],["data-testid","inspector-superseded-banner",1,"inspector__banner","inspector__banner--warn"],["data-testid","inspector-bump-error",1,"inspector__banner","inspector__banner--error"],[1,"inspector__toolbar"],["icon","pi pi-arrow-up-right","severity","secondary","size","small","data-testid","inspector-bump",3,"onClick","label","disabled","loading","pTooltip"],["toggleTestid","inspector-findings-toggle","data-testid","inspector-findings",3,"title","expanded"],["toggleTestid","inspector-connections-toggle","data-testid","inspector-card-linked-nodes",3,"title","expanded"],["data-testid","inspector-card-vendor-frontmatter",1,"inspector__vendor"],["toggleTestid","inspector-annotations-toggle","data-testid","inspector-card-annotations",3,"title","expanded"],["toggleTestid","inspector-body-toggle","data-testid","inspector-card-body",1,"inspector__body-section",3,"title","expanded"],["toggleTestid","inspector-plugins-toggle","data-testid","inspector-card-plugins",3,"title","expanded"],["toggleTestid","inspector-view-contributions-toggle","data-testid","inspector-card-view-contributions",3,"title","expanded"],["toggleTestid","inspector-metadata-toggle","data-testid","inspector-card-metadata",3,"title","expanded"],["data-testid","inspector-bump-consent","styleClass","sm-consent-dialog",3,"ariaLabel"],["aria-hidden","true",1,"pi","pi-arrow-up-right"],["aria-hidden","true",1,"pi","pi-exclamation-triangle"],["type","button",1,"inspector__banner-dismiss",3,"click"],["aria-hidden","true",1,"pi","pi-times"],["toggleTestid","inspector-findings-toggle","data-testid","inspector-findings",3,"toggle","title","expanded"],["smSectionTitleExtra","",1,"sm-block__count"],[1,"inspector__findings-list"],["data-testid","inspector-finding",1,"inspector__finding"],[1,"inspector__finding-head"],[1,"inspector__finding-severity"],[1,"inspector__finding-analyzer"],[1,"inspector__finding-message"],["data-testid","inspector-finding-hint",1,"inspector__finding-hint"],["toggleTestid","inspector-connections-toggle","data-testid","inspector-card-linked-nodes",3,"toggle","title","expanded"],[3,"path"],[3,"openPath","path"],[3,"toggle","frontmatter","kind","provider","skillPathByName","onSkillClick","expanded"],["toggleTestid","inspector-annotations-toggle","data-testid","inspector-card-annotations",3,"toggle","title","expanded"],["smSectionTitleExtra","","data-testid","inspector-sidecar-file",1,"inspector__sidecar-file"],[3,"overlay","knownPaths"],[3,"openPath","overlay","knownPaths"],["toggleTestid","inspector-body-toggle","data-testid","inspector-card-body",1,"inspector__body-section",3,"toggle","title","expanded"],["data-testid","inspector-body-loading",1,"inspector__body-status"],["data-testid","inspector-body-rendered",1,"inspector__body-rendered",3,"innerHTML"],["toggleTestid","inspector-plugins-toggle","data-testid","inspector-card-plugins",3,"toggle","title","expanded"],[3,"sidecarRoot"],["toggleTestid","inspector-view-contributions-toggle","data-testid","inspector-card-view-contributions",3,"toggle","title","expanded"],[3,"node"],["toggleTestid","inspector-metadata-toggle","data-testid","inspector-card-metadata",3,"toggle","title","expanded"],["data-testid","inspector-metadata-section",1,"inspector__metadata"],[3,"node","sidecarRoot","overlay"]],template:function(n,i){n&1&&M(0,qce,7,2,"section",0)(1,Gce,10,3,"section",0)(2,hde,18,24,"section",1),n&2&&D(i.path()?i.node()?2:1:0)},dependencies:[an,Ut,Ve,Be,ps,us,XD,$D,JD,oP,rP,sP,lP,cP,dP],styles:["[_nghost-%COMP%]{display:block}.inspector[_ngcontent-%COMP%]{--accent: var(--sm-kind-markdown);display:flex;flex-direction:column;gap:.75rem;padding:1rem 1.1rem 1.25rem;background:var(--sm-bg-content);color:var(--p-text-color)}.inspector--empty[_ngcontent-%COMP%]{padding:2rem;color:var(--p-text-muted-color)}.inspector__desc[_ngcontent-%COMP%]{margin:0;color:var(--p-text-color);font-size:.88rem;line-height:1.5;max-width:none}.inspector__sidecar-file[_ngcontent-%COMP%]{font-family:var(--sm-font-mono);font-size:.7rem;font-weight:400;color:var(--p-text-muted-color)}[_nghost-%COMP%] .inspector__desc code{background:var(--sm-bg-hover);padding:.05rem .3rem;border-radius:var(--sm-radius-sm);font-family:var(--sm-font-mono);font-size:.85em}[_nghost-%COMP%] .inspector__desc a{color:var(--p-primary-color);text-decoration:underline}.inspector__toolbar[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.4rem;flex-wrap:wrap}[_nghost-%COMP%] .sm-block{display:flex;flex-direction:column;gap:.45rem;padding-left:.7rem;border-left:2px solid color-mix(in srgb,var(--accent) 70%,transparent);transition:border-color .14s ease}[_nghost-%COMP%] .sm-block--collapsible:hover{border-left-color:var(--accent)}[_nghost-%COMP%] .sm-block__title{margin:0;font-size:.82rem;font-weight:600;letter-spacing:0;color:var(--p-text-color);display:flex;align-items:baseline;gap:.4rem}[_nghost-%COMP%] .sm-block__count{font-size:.75rem;font-weight:500;color:var(--p-text-muted-color)}[_nghost-%COMP%] .sm-block__sub{margin:0;font-size:.72rem;font-weight:500;color:var(--p-text-muted-color);text-transform:uppercase;letter-spacing:.05em}[_nghost-%COMP%] .sm-block__row{display:flex;align-items:center;gap:.5rem;width:100%;padding:0;margin:0;background:transparent;border:none;text-align:left;font:inherit;color:var(--p-text-color)}[_nghost-%COMP%] .sm-block__row--toggle{cursor:pointer}[_nghost-%COMP%] .sm-block--collapsible>.sm-block__row--toggle+*{margin-top:.5rem;padding-top:.7rem;border-top:1px solid var(--sm-border)}[_nghost-%COMP%] .sm-block__row--toggle:hover .sm-block__title{color:var(--accent)}[_nghost-%COMP%] .sm-block__summary{font-size:.78rem;color:var(--p-text-muted-color);font-weight:400;flex:1 1 auto;margin-left:.3rem}[_nghost-%COMP%] .sm-block__chevron{color:var(--p-text-muted-color);font-size:.75rem;margin-left:auto}[_nghost-%COMP%] .sm-block__kv{display:grid;grid-template-columns:max-content 1fr;column-gap:1rem;row-gap:.35rem;margin:0;font-size:.85rem;align-items:baseline}[_nghost-%COMP%] .sm-block__kv dt{color:var(--p-text-muted-color);font-weight:500;font-size:.8rem}[_nghost-%COMP%] .sm-block__kv dd{margin:0;word-break:break-word;color:var(--p-text-color)}[_nghost-%COMP%] .sm-block__kv code{background:var(--sm-bg-hover);padding:.05rem .4rem;border-radius:var(--sm-radius-sm);font-size:.78rem;font-family:var(--sm-font-mono)}[_nghost-%COMP%] .sm-block__inline{display:flex;flex-wrap:wrap;align-items:center;gap:.45rem .65rem;row-gap:.35rem}[_nghost-%COMP%] .sm-block__meta{display:inline-flex;align-items:center;gap:.3rem;font-size:.83rem;color:var(--p-text-color)}[_nghost-%COMP%] .sm-block__meta .pi{color:var(--p-text-muted-color);font-size:.85rem}[_nghost-%COMP%] .sm-block__meta a{color:var(--p-primary-color);word-break:break-all}[_nghost-%COMP%] .sm-block__meta code{background:var(--sm-bg-hover);padding:.05rem .35rem;border-radius:var(--sm-radius-sm);font-size:.78rem}.inspector__vendor[_ngcontent-%COMP%]{display:contents}.inspector__body-section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.6rem}.inspector__body-status[_ngcontent-%COMP%]{margin:0;font-size:.85rem;color:var(--p-text-muted-color);font-style:italic}.inspector__body-status--warn[_ngcontent-%COMP%]{color:var(--sm-severity-warn);font-style:normal}[_nghost-%COMP%] .inspector__body-rendered{font-size:.9rem;line-height:1.6;max-height:480px;overflow:auto;padding:.25rem 0 0;--code-border: color-mix(in srgb, var(--sm-border) 70%, var(--p-text-muted-color))}[_nghost-%COMP%] .inspector__body-rendered :first-child{margin-top:0}[_nghost-%COMP%] .inspector__body-rendered :last-child{margin-bottom:0}[_nghost-%COMP%] .inspector__body-rendered h1, [_nghost-%COMP%] .inspector__body-rendered h2, [_nghost-%COMP%] .inspector__body-rendered h3, [_nghost-%COMP%] .inspector__body-rendered h4, [_nghost-%COMP%] .inspector__body-rendered h5, [_nghost-%COMP%] .inspector__body-rendered h6{margin:1.2rem 0 .6rem;font-weight:600;line-height:1.3}[_nghost-%COMP%] .inspector__body-rendered h1{font-size:1.35rem}[_nghost-%COMP%] .inspector__body-rendered h2{font-size:1.18rem}[_nghost-%COMP%] .inspector__body-rendered h3{font-size:1.05rem}[_nghost-%COMP%] .inspector__body-rendered h4{font-size:.95rem}[_nghost-%COMP%] .inspector__body-rendered h5, [_nghost-%COMP%] .inspector__body-rendered h6{font-size:.9rem;color:var(--p-text-muted-color)}[_nghost-%COMP%] .inspector__body-rendered h1, [_nghost-%COMP%] .inspector__body-rendered h2{padding-bottom:.3rem;border-bottom:1px solid var(--sm-border)}[_nghost-%COMP%] .inspector__body-rendered p{margin:.6rem 0}[_nghost-%COMP%] .inspector__body-rendered a{color:var(--p-primary-color);text-decoration:underline;text-underline-offset:2px}[_nghost-%COMP%] .inspector__body-rendered ul, [_nghost-%COMP%] .inspector__body-rendered ol{margin:.6rem 0;padding-left:1.4rem}[_nghost-%COMP%] .inspector__body-rendered li{margin:.2rem 0}[_nghost-%COMP%] .inspector__body-rendered li>ul, [_nghost-%COMP%] .inspector__body-rendered li>ol{margin:.2rem 0}[_nghost-%COMP%] .inspector__body-rendered blockquote{margin:.75rem 0;padding:.7rem .95rem;border-left:2px solid var(--sm-border);background:var(--sm-bg-hover);color:var(--p-text-color);font-size:.9rem;line-height:1.55;border-radius:0 var(--sm-radius-sm) var(--sm-radius-sm) 0}[_nghost-%COMP%] .inspector__body-rendered blockquote :first-child{margin-top:0}[_nghost-%COMP%] .inspector__body-rendered blockquote :last-child{margin-bottom:0}[_nghost-%COMP%] .inspector__body-rendered hr{margin:1.2rem 0;border:0;border-top:1px solid var(--sm-border)}[_nghost-%COMP%] .inspector__body-rendered img{max-width:100%;height:auto;border-radius:var(--sm-radius-sm)}[_nghost-%COMP%] .inspector__body-rendered table{border-collapse:collapse;width:100%;margin:.75rem 0;font-size:.85rem}[_nghost-%COMP%] .inspector__body-rendered th, [_nghost-%COMP%] .inspector__body-rendered td{border:1px solid var(--sm-border);padding:.35rem .55rem;text-align:left}[_nghost-%COMP%] .inspector__body-rendered th{background:var(--sm-bg-hover);font-weight:600}[_nghost-%COMP%] .inspector__body-rendered tbody tr:nth-child(2n){background:var(--sm-bg-hover)}[_nghost-%COMP%] .inspector__body-rendered pre{background:var(--sm-bg-hover);border:1px solid var(--code-border);border-radius:var(--sm-radius-md);padding:.75rem .85rem;margin:.75rem 0;white-space:pre;font-family:var(--sm-font-mono);font-size:.82rem;line-height:1.5;overflow-x:auto}[_nghost-%COMP%] .inspector__body-rendered code{background:var(--sm-bg-hover);border:1px solid var(--code-border);padding:.05rem .34rem;border-radius:var(--sm-radius-sm);font-family:var(--sm-font-mono);font-size:.85em}[_nghost-%COMP%] .inspector__body-rendered pre code{background:transparent;border:0;padding:0;border-radius:0;font-size:inherit}.inspector__banner[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.55rem;padding:.55rem .75rem;border-radius:var(--sm-radius-md);font-size:.85rem;border:1px solid transparent}.inspector__banner--warn[_ngcontent-%COMP%]{background:var(--sm-severity-warn-bg);color:var(--sm-severity-warn);border-color:color-mix(in srgb,var(--sm-severity-warn) 30%,transparent)}.inspector__banner--error[_ngcontent-%COMP%]{background:var(--sm-severity-error-bg);color:var(--sm-severity-error);border-color:color-mix(in srgb,var(--sm-severity-error) 30%,transparent)}.inspector__banner-dismiss[_ngcontent-%COMP%]{margin-left:auto;background:transparent;border:none;cursor:pointer;color:inherit;display:inline-flex;align-items:center;justify-content:center}.inspector__metadata[_ngcontent-%COMP%]{display:flex;flex-direction:column}.inspector__metadata[_ngcontent-%COMP%] > sm-inspector-debug-panel[_ngcontent-%COMP%]{margin-top:.5rem;padding-top:.7rem;border-top:1px solid var(--sm-border)}.inspector__findings-list[_ngcontent-%COMP%]{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:.45rem}.inspector__finding[_ngcontent-%COMP%]{padding:.55rem .7rem;border-left:3px solid var(--p-content-border-color);background:var(--p-content-background);border-radius:var(--sm-radius-sm)}.inspector__finding[data-severity=error][_ngcontent-%COMP%]{border-left-color:var(--sm-severity-error);background:var(--sm-severity-error-bg)}.inspector__finding[data-severity=warn][_ngcontent-%COMP%]{border-left-color:var(--sm-severity-warn);background:var(--sm-severity-warn-bg)}.inspector__finding[data-severity=info][_ngcontent-%COMP%]{border-left-color:var(--sm-severity-info);background:var(--sm-severity-info-bg)}.inspector__finding-head[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;margin-bottom:.2rem}.inspector__finding-severity[_ngcontent-%COMP%]{text-transform:uppercase;font-size:.65rem;font-weight:700;letter-spacing:.05em;padding:.05rem .4rem;border-radius:var(--sm-radius-sm);color:var(--p-content-background);background:var(--p-text-color)}.inspector__finding-severity[data-severity=error][_ngcontent-%COMP%]{background:var(--sm-severity-error)}.inspector__finding-severity[data-severity=warn][_ngcontent-%COMP%]{background:var(--sm-severity-warn)}.inspector__finding-severity[data-severity=info][_ngcontent-%COMP%]{background:var(--sm-severity-info)}.inspector__finding-analyzer[_ngcontent-%COMP%]{font-size:.78rem;color:var(--p-text-muted-color)}.inspector__finding-message[_ngcontent-%COMP%]{margin:0;font-size:.88rem;color:var(--p-text-color)}.inspector__finding-hint[_ngcontent-%COMP%]{margin:.35rem 0 0;font-size:.82rem;color:var(--p-text-color);background:var(--p-content-background);padding:.35rem .5rem;border-radius:var(--sm-radius-sm)}[_nghost-%COMP%] .ann-panel__chip--user{padding:.1rem .55rem}"],changeDetection:0})}return t})();var mP=(()=>{class t{smMiddleMousePan=B.required();origin=null;rafId=null;pendingPosition=null;onMouseDown(e){if(e.button!==1)return;let n=this.smMiddleMousePan();if(!n)return;e.preventDefault();let i=n.getPosition()??{x:0,y:0};this.origin={mouseX:e.clientX,mouseY:e.clientY,canvasX:i.x,canvasY:i.y},document.addEventListener("mousemove",this.onMove),document.addEventListener("mouseup",this.onEnd)}ngOnDestroy(){this.onEnd()}onMove=e=>{this.origin&&(this.pendingPosition={x:this.origin.canvasX+(e.clientX-this.origin.mouseX),y:this.origin.canvasY+(e.clientY-this.origin.mouseY)},this.rafId===null&&(this.rafId=requestAnimationFrame(()=>{this.rafId=null;let n=this.smMiddleMousePan();!n||!this.pendingPosition||(n.setPosition(this.pendingPosition),n.redraw())})))};onEnd=()=>{this.rafId!==null&&(cancelAnimationFrame(this.rafId),this.rafId=null),this.pendingPosition=null,this.origin=null,document.removeEventListener("mousemove",this.onMove),document.removeEventListener("mouseup",this.onEnd),this.smMiddleMousePan()?.emitCanvasChangeEvent()};static \u0275fac=function(n){return new(n||t)};static \u0275dir=je({type:t,selectors:[["","smMiddleMousePan",""]],hostBindings:function(n,i){n&1&&A("mousedown",function(a){return i.onMouseDown(a)})},inputs:{smMiddleMousePan:[1,"smMiddleMousePan"]}})}return t})();function _P(t,o){if(t.size===0)return{next:t,dirty:!1};let e=!1,n=new Set;for(let i of t)o.has(i)?n.add(i):e=!0;return{next:e?n:t,dirty:e}}function gP(t){let{nodes:o,current:e,layout:n}=t,i=new Set(o.map(c=>c.path)),r=!1,a=new Map(e);for(let c of a.keys())i.has(c)||(a.delete(c),r=!0);let s=!1;for(let c of i)if(!a.has(c)){s=!0;break}for(let c of i){let u=n.positions.get(c);if(!u)continue;let f=a.get(c);if(!f){a.set(c,{x:u.x,y:u.y}),r=!0;continue}f.manual!==!0&&s&&(f.x===u.x&&f.y===u.y||(a.set(c,{x:u.x,y:u.y}),r=!0))}return{next:a,dirty:r}}function bP(t){let{selectedPath:o,setSelectedNodeId:e,readSelectedNodeId:n,graphNodes:i,onDeepLinkSelect:r,router:a,route:s}=t,c=db(s.queryParamMap.pipe(x0(u=>u.get("path"))),{initialValue:s.snapshot.queryParamMap.get("path")});de(()=>{let u=c(),f=i();if(f.length===0||!u)return;let g=en(()=>n());if(g!==null&&f.find(S=>S.id===g)?.view.path===u)return;let C=f.find(k=>k.view.path===u);C&&(e(C.id),r?.(C.id))}),de(()=>{let u=o(),f=en(()=>c());(u??null)!==(f??null)&&a.navigate([],{relativeTo:s,queryParams:{path:u??null},queryParamsHandling:"merge",replaceUrl:!0})})}function vP(t,o){return _o(t).includes(o)}function yP(t){if(typeof t!="object"||t===null)return!1;let o=t;return typeof o.x=="number"&&typeof o.y=="number"&&Number.isFinite(o.x)&&Number.isFinite(o.y)}function CP(t){if(typeof t!="object"||t===null)return!1;let o=t;return typeof o.x=="number"&&typeof o.y=="number"&&typeof o.scale=="number"&&Number.isFinite(o.x)&&Number.isFinite(o.y)&&Number.isFinite(o.scale)&&o.scale>0}function xP(t){return t.querySelector(".p-overlay-mask, .p-dialog, .p-overlay")!==null}var wP="sm.graph.viewport",TP="sm.graph.node-positions",SP="sm.graph.node-expanded",kP="sm.graph.panel-width";function IP(){let t=null;try{t=localStorage.getItem(wP)}catch{return null}if(!t)return null;let o;try{o=JSON.parse(t)}catch{return null}return CP(o)?o:null}function EP(t){try{localStorage.setItem(wP,JSON.stringify(t))}catch{}}function MP(){let t=new Map,o=null;try{o=localStorage.getItem(TP)}catch{return t}if(!o)return t;let e;try{e=JSON.parse(o)}catch{return t}if(typeof e!="object"||e===null)return t;for(let[n,i]of Object.entries(e)){if(!yP(i))continue;let r=i,s=r.manual===!0?{x:r.x,y:r.y,manual:!0}:{x:r.x,y:r.y};t.set(n,s)}return t}function za(t){try{let o={};for(let[e,n]of t)o[e]=n.manual?{x:n.x,y:n.y,manual:!0}:{x:n.x,y:n.y};localStorage.setItem(TP,JSON.stringify(o))}catch{}}function DP(){let t=null;try{t=localStorage.getItem(SP)}catch{return new Set}if(!t)return new Set;let o;try{o=JSON.parse(t)}catch{return new Set}if(!Array.isArray(o))return new Set;let e=new Set;for(let n of o)typeof n=="string"&&n.length>0&&e.add(n);return e}function gf(t){try{localStorage.setItem(SP,JSON.stringify([...t]))}catch{}}function PP(){let t=null;try{t=localStorage.getItem(kP)}catch{return null}if(!t)return null;let o=Number(t);return!Number.isFinite(o)||o<=0?null:o}function RP(t){try{localStorage.setItem(kP,String(Math.round(t)))}catch{}}var vf=500,bf=400,OP=80;function FP(t){let o=X(t.initialWidth),e=X(typeof window>"u"?1920:window.innerWidth);typeof window<"u"&&qa(window,"resize").pipe(Jn(t.destroyRef)).subscribe(()=>e.set(window.innerWidth));let n=E(()=>{let g=Math.max(bf,e()-OP),C=o();return C>g||C<bf?Math.min(vf,g):C}),i=null,r=null,a=null,s=()=>{a=null,r!==null&&(o.set(r),r=null)},c=g=>{if(!i)return;let C=g.clientX-i.mouseX,k=i.widthAtStart-C,S=Math.max(bf,e()-OP);r=Math.min(S,Math.max(bf,k)),a===null&&typeof window<"u"&&(a=window.requestAnimationFrame(s))},u=()=>{i&&(i=null,document.removeEventListener("mousemove",c),document.removeEventListener("mouseup",u),a!==null&&typeof window<"u"&&(window.cancelAnimationFrame(a),a=null),r!==null&&(o.set(r),r=null),t.onCommit(o()))};return{clampedPanelWidth:n,onPanelResizeStart:g=>{g.button===0&&(g.preventDefault(),g.stopPropagation(),i={mouseX:g.clientX,widthAtStart:n()},document.addEventListener("mousemove",c),document.addEventListener("mouseup",u))}}}function NP(t){let o=X(null),e=null,n=()=>{if(e===null)return;let r=e;e=null,t.mapVisibility.setOnly(r)};return{activeTagSelection:o,onTagSelect:r=>{if(o()===r){o.set(null),n();return}let a=t.nodes().filter(s=>vP(s,r)).map(s=>s.path);if(a.length===0){o.set(null),n();return}e===null&&(e=new Set(t.mapVisibility.paths())),t.mapVisibility.setOnly(a),o.set(r)}}}var b0=.05,v0=2;function AP(t){let o=X(t.savedViewport?{x:t.savedViewport.x,y:t.savedViewport.y}:{x:0,y:0}),e=X(t.savedViewport?.scale??1),n=E(()=>e()<v0-1e-6),i=E(()=>e()>b0+1e-6);return{viewportPosition:o,viewportScale:e,canZoomIn:n,canZoomOut:i,onCanvasChange:a=>{let s=o();(s.x!==a.position.x||s.y!==a.position.y)&&o.set({x:a.position.x,y:a.position.y}),e()!==a.scale&&e.set(a.scale),t.hasCompletedInitialLayout()&&EP({x:a.position.x,y:a.position.y,scale:a.scale})}}}var fde=.15,mde=.25,_de=.75,gde=.6;function LP(t){let o=E(()=>{let u=new Map;for(let f of t.graph().edges)u.has(f.from)||u.set(f.from,new Set),u.has(f.to)||u.set(f.to,new Set),u.get(f.from).add(f.to),u.get(f.to).add(f.from);return u}),e=u=>t.selectedNodeId()===u,n=u=>{let f=t.selectedNodeId();return f===null||f===u?!1:o().get(f)?.has(u)??!1},i=u=>{if(t.activeTagSelection()!==null)return!1;let f=t.selectedNodeId();return f===null||f===u?!1:!(o().get(f)?.has(u)??!1)},r=u=>{let f=t.selectedNodeId();return f!==null&&(u.from===f||u.to===f)},a=u=>{if(t.activeTagSelection()!==null)return!1;let f=t.selectedNodeId();return f===null?!1:u.from!==f&&u.to!==f},s=E(()=>{let u=t.selectedNodeId(),f=t.activeTagSelection()!==null,g=u!==null?o().get(u)??null:null,C=new Map;for(let k of t.graph().nodes){let S=k.id,F=u===S,q=!F&&u!==null&&(g?.has(S)??!1),Y=!f&&u!==null&&!F&&!(g?.has(S)??!1);C.set(S,{selected:F,highlighted:q,dimmed:Y})}return C}),c=E(()=>{let u=t.selectedNodeId(),f=t.activeTagSelection()!==null,g=new Map;for(let C of t.graph().edges){let k=u!==null&&(C.from===u||C.to===u),S=!f&&u!==null&&!k,F=typeof C.confidence=="number"?C.confidence:gde,q=S?fde:mde+_de*F;g.set(C.id,{highlighted:k,dimmed:S,opacity:q})}return g});return{isSelected:e,isHighlighted:n,isDimmed:i,isEdgeHighlighted:r,isEdgeDimmed:a,selectionView:s,edgeSelectionView:c}}function BP(t){let o=t.onCommit??za,e=null,n=!1,i=null,r=()=>{queueMicrotask(()=>{if(!n){i=null;return}n=!1,i&&(t.nodePositions.set(i),i=null),o(t.nodePositions())})},a=(u,f)=>{i||(i=new Map(t.nodePositions())),i.set(u,{x:f.x,y:f.y,manual:!0}),n=!0},s=u=>{e={x:u.clientX,y:u.clientY},document.addEventListener("mouseup",r,{once:!0})},c=u=>{let f=e;if(e=null,!f)return!0;let g=u.clientX-f.x,C=u.clientY-f.y;return Math.hypot(g,C)<=4};return t.destroyRef.onDestroy(()=>{document.removeEventListener("mouseup",r)}),{onNodePositionChange:a,onNodePointerDown:s,isClickWithoutDrag:c}}function VP(t){let o=X(DP());return de(()=>{let r=new Set(t.nodes().map(s=>s.path));if(r.size===0)return;let a=_P(o(),r);a.dirty&&(o.set(a.next),gf(a.next))}),{isExpanded:r=>o().has(r),setExpanded:(r,a)=>{let s=o();if(s.has(r)===a)return;let c=new Set(s);a?c.add(r):c.delete(r),o.set(c),gf(c)},resetAll:()=>{o.set(new Set),gf(new Set)},expandedNodeIds:o}}function zP(t){let o=X(!1),e=!1,n=null;return de(()=>{let i=t.visibleNodes();e||i.length!==0&&queueMicrotask(()=>{e=!0,o.set(!0),t.savedViewport||t.fit()})}),de(()=>{let i=t.pathsFingerprint();if(!e){n=i;return}n!==i&&(n=i,(t.animatedFit??t.fit)())}),{hasCompletedInitialLayout:()=>o()}}function HP(t){let{points:o,wrap:e,panelW:n,zoomMin:i}=t;if(o.length===0)return null;let r=1/0,a=1/0,s=-1/0,c=-1/0;for(let Re of o)Re.x<r&&(r=Re.x),Re.y<a&&(a=Re.y),Re.x+260>s&&(s=Re.x+260),Re.y+120>c&&(c=Re.y+120);let u=Math.max(1,e.width-n),f=Math.max(1,s-r),g=Math.max(1,c-a),C=Math.max(1,u-160),k=Math.max(1,e.height-160),S=Math.min(C/f,k/g),F=Math.min(2,Math.max(i,S)),q=(r+s)/2,Y=(a+c)/2,ee=u/2-q*F,ae=e.height/2-Y*F;return{position:{x:ee,y:ae},scale:F}}function qP(t){let{point:o,wrap:e,panelW:n,scale:i}=t,r=o.x+260/2,a=o.y+120/2,c=Math.max(1,e.width-n)/2-r*i,u=e.height/2-a*i;return{position:{x:c,y:u},scale:i}}function y0(t,o,e){if(typeof requestAnimationFrame>"u"||e<=0){t.writePosition(o.position),t.writeScale(o.scale);return}let n=t.readPosition(),i=t.readScale(),r=performance.now(),a=s=>{if(t.isStaleToken())return;let c=Math.min(1,(s-r)/e),u=bde(c);t.writePosition({x:n.x+(o.position.x-n.x)*u,y:n.y+(o.position.y-n.y)*u}),t.writeScale(i+(o.scale-i)*u),c<1&&requestAnimationFrame(a)};requestAnimationFrame(a)}function bde(t){return 1-Math.pow(1-t,3)}var vde=["canvasWrap"],UP=(t,o)=>o.id;function yde(t,o){if(t&1&&(h(0,"div",2),N(1,"span",8),h(2,"p",9),b(3),_()()),t&2){let e=d();l(3),x(e.texts.loading)}}function Cde(t,o){if(t&1&&(h(0,"div",3),N(1,"span",10),h(2,"p",9),b(3),_(),h(4,"p",11),b(5),_()()),t&2){let e=d();l(3),x(e.texts.errorTitle),l(2),x(e.error())}}function xde(t,o){if(t&1){let e=W();h(0,"div",4),N(1,"i",12),h(2,"p",13),b(3),_(),h(4,"p-button",14),A("onClick",function(){w(e);let i=d();return T(i.resetFilters())}),_()()}if(t&2){let e=d();l(3),x(e.texts.emptyTitle),l(),m("label",e.texts.resetFilters)("text",!0)}}function wde(t,o){if(t&1){let e=W();h(0,"div",5),N(1,"i",15),h(2,"p",9),b(3),_(),h(4,"p-button",16),A("onClick",function(){w(e);let i=d();return T(i.mapVisibility.clear())}),_()()}if(t&2){let e=d();l(3),x(e.texts.curationEmptyTitle),l(),m("label",e.texts.showAllOnMap)("text",!0)}}function Tde(t,o){if(t&1&&(h(0,"f-connection",36),$(),h(1,"svg",37),N(2,"circle",38),_(),Ga(),N(3,"f-connection-marker-arrow",39),_()),t&2){let e=o.$implicit,n=d(2),i=n.edgeSelectionFor(e.id);H("f-conn--"+e.kind),Ne("opacity",i.opacity),se("f-conn--highlighted",i.highlighted)("f-conn--dimmed",i.dimmed),m("fOutputId",e.from+"-out")("fInputId",e.to+"-in")("fOutputSide",n.outputSide())("fInputSide",n.inputSide())("fType",n.connectionType())("fBehavior",n.connectionBehavior)("fReassignDisabled",!0),l(),m("type",n.markerStart)("width",9)("height",9)("refX",4.5)("refY",4.5),l(2),m("type",n.markerEnd)}}function Sde(t,o){if(t&1){let e=W();me(0,23),h(1,"div",41),A("fNodePositionChange",function(i){let r=w(e).$implicit,a=d(3);return T(a.onNodePositionChange(r.id,i))})("pointerdown",function(i){w(e);let r=d(3);return T(r.onNodePointerDown(i))})("click",function(i){let r=w(e).$implicit,a=d(3);return T(a.selectNode(r,i))})("dblclick",function(){let i=w(e).$implicit,r=d(3);return T(r.openNode(i))}),h(2,"sm-node-card",42),A("expandedChange",function(i){let r=w(e).$implicit,a=d(3);return T(a.setExpanded(r.id,i))})("favoriteToggle",function(i){w(e);let r=d(3);return T(r.onFavoriteToggle(i))}),_(),h(3,"div",43),N(4,"sm-view-contributions-host",44),_()(),_e()}if(t&2){let e=o.$implicit,n=d(3);l(),m("fNodeId",e.id)("fNodePosition",e.position)("fInputId",e.id+"-in")("fInputConnectableSide",n.inputSide())("fOutputId",e.id+"-out")("fOutputConnectableSide",n.outputSide()),O("data-testid","graph-node-"+e.id),l(),m("node",e.view)("stats",e.stats)("summary",e.summary)("selection",n.selectionFor(e.id))("expanded",n.isExpanded(e.id))("isFavorite",e.view.isFavorite===!0),l(2),m("node",e.view)}}function kde(t,o){if(t&1&&I(0,Sde,5,14,"ng-container",40),t&2){let e=d(2);m("fVirtualForOf",e.graph().nodes)}}function Ide(t,o){if(t&1){let e=W();h(0,"div",46),A("fNodePositionChange",function(i){let r=w(e).$implicit,a=d(3);return T(a.onNodePositionChange(r.id,i))})("pointerdown",function(i){w(e);let r=d(3);return T(r.onNodePointerDown(i))})("click",function(i){let r=w(e).$implicit,a=d(3);return T(a.selectNode(r,i))})("dblclick",function(){let i=w(e).$implicit,r=d(3);return T(r.openNode(i))}),h(1,"sm-node-card",42),A("expandedChange",function(i){let r=w(e).$implicit,a=d(3);return T(a.setExpanded(r.id,i))})("favoriteToggle",function(i){w(e);let r=d(3);return T(r.onFavoriteToggle(i))}),_(),h(2,"div",43),N(3,"sm-view-contributions-host",44),_()()}if(t&2){let e=o.$implicit,n=d(3);m("fNodeId",e.id)("fNodePosition",e.position)("fInputId",e.id+"-in")("fOutputId",e.id+"-out"),O("data-testid","graph-node-"+e.id),l(),m("node",e.view)("stats",e.stats)("summary",e.summary)("selection",n.selectionFor(e.id))("expanded",n.isExpanded(e.id))("isFavorite",e.view.isFavorite===!0),l(2),m("node",e.view)}}function Ede(t,o){if(t&1&&(me(0,23),ue(1,Ide,4,12,"div",45,UP),_e()),t&2){let e=d(2);l(),pe(e.graph().nodes)}}function Mde(t,o){if(t&1&&N(0,"sm-perf-hud",29),t&2){let e=d(2);m("visible",e.visibleCount())("total",e.totalCount())("edges",e.edgeCount())}}function Dde(t,o){if(t&1){let e=W();N(0,"span",34),h(1,"p-button",47),A("onClick",function(){w(e);let i=d(2);return T(i.mapVisibility.clear())}),_()}if(t&2){let e=d(2);l(),m("label",e.texts.toolbar.showAllLabel)("ariaLabel",e.texts.toolbar.showAllAria)("pTooltip",e.texts.toolbar.showAllTooltip)("text",!0)}}function Pde(t,o){if(t&1){let e=W();h(0,"div",17,0),A("click",function(i){w(e);let r=d();return T(r.onCanvasClick(i))}),h(2,"f-flow",18),A("fLoaded",function(){w(e);let i=d();return T(i.onLoaded())}),N(3,"f-selection-area"),h(4,"f-background"),N(5,"f-rect-pattern"),_(),N(6,"f-line-alignment",19),h(7,"f-canvas",20),A("fCanvasChange",function(i){w(e);let r=d();return T(r.onCanvasChange(i))}),me(8,21),ue(9,Tde,4,21,"f-connection",22,UP),_e(),M(11,kde,1,1,"ng-container",23)(12,Ede,3,0,"ng-container",23),_(),N(13,"f-minimap"),_(),h(14,"div",24),N(15,"sm-kind-palette")(16,"sm-severity-palette")(17,"sm-link-kind-palette"),_(),h(18,"aside",25)(19,"div",26),A("mousedown",function(i){w(e);let r=d();return T(r.onPanelResizeStart(i))}),_(),h(20,"div",27)(21,"sm-inspector-view",28),A("tagSelect",function(i){w(e);let r=d();return T(r.onTagSelect(i))}),_()()(),M(22,Mde,1,3,"sm-perf-hud",29),h(23,"div",30)(24,"p-button",31),A("onClick",function(){w(e);let i=d();return T(i.zoomIn())}),_(),h(25,"p-button",32),A("onClick",function(){w(e);let i=d();return T(i.zoomOut())}),_(),h(26,"p-button",33),A("onClick",function(){w(e);let i=d();return T(i.fitToScreen())}),_(),N(27,"span",34)(28,"sm-graph-layout-toolbar")(29,"span",34),h(30,"p-button",35),A("onClick",function(){w(e);let i=d();return T(i.resetLayout())}),_(),M(31,Dde,2,4),_()()}if(t&2){let e=d();m("smMiddleMousePan",e.canvas()),l(2),m("fCache",e.perf.cache),l(4),m("fAlignThreshold",20),l(),m("position",e.viewportPosition())("scale",e.viewportScale())("fZoomStep",.06)("fZoomDblClickStep",.35)("fZoomMinimum",e.zoomMin)("fZoomMaximum",e.zoomMax)("debounceTime",150),l(2),pe(e.graph().edges),l(2),D(e.perf.virtualization?11:12),l(7),Ne("width",e.clampedPanelWidth(),"px"),se("is-open",e.selectedNodeId()!==null),O("aria-label",e.texts.a11y.panel),l(),O("aria-label",e.texts.panel.resizeLabel),l(2),m("path",e.selectedPath())("activeTag",e.activeTagSelection()),l(),D(e.perfHud()?22:-1),l(),O("aria-label",e.texts.a11y.toolbar),l(),m("ariaLabel",e.texts.toolbar.zoomIn)("pTooltip",e.texts.toolbar.zoomIn)("text",!0)("rounded",!0)("disabled",!e.canZoomIn()),l(),m("ariaLabel",e.texts.toolbar.zoomOut)("pTooltip",e.texts.toolbar.zoomOut)("text",!0)("rounded",!0)("disabled",!e.canZoomOut()),l(),m("ariaLabel",e.texts.toolbar.fitToScreen)("pTooltip",e.texts.toolbar.fitToScreen)("text",!0)("rounded",!0),l(4),m("ariaLabel",e.texts.toolbar.resetLayoutLabel)("pTooltip",e.texts.toolbar.resetLayoutTooltip)("text",!0)("rounded",!0),l(),D(e.mapVisibility.isActive()?31:-1)}}var GP=.2,jP=420,Rde={selected:!1,highlighted:!1,dimmed:!1},Ode={highlighted:!1,dimmed:!1,opacity:1},yf=(()=>{class t{loader=p(Ft);filters=p(rn);issuePaths=p(Co);mapVisibility=p(ni);graphPreferences=p(df);router=p(Ja);route=p(Qa);confirmationService=p(uo);destroyRef=p(xt);dagreLayout=p(r0);injector=p(dt);usageTracker=p(vb);flow=nt(sa);canvas=nt(aa);zoom=nt(la);canvasWrap=nt("canvasWrap");connectionType=this.graphPreferences.connectionType;connectionBehavior=ai.FIXED;markerStart=ze.START_ALL_STATES;markerEnd=ze.END_ALL_STATES;perf=ir.graph.perf;perfHud=p(qD).visible;savedViewport=IP();viewportStore=AP({savedViewport:this.savedViewport,hasCompletedInitialLayout:()=>this.layoutFit.hasCompletedInitialLayout()});viewportPosition=this.viewportStore.viewportPosition;viewportScale=this.viewportStore.viewportScale;canZoomIn=this.viewportStore.canZoomIn;canZoomOut=this.viewportStore.canZoomOut;zoomMin=b0;zoomMax=v0;texts=Ti;nodePositions=X(MP());nodeDrag=BP({destroyRef:this.destroyRef,nodePositions:this.nodePositions});expansion=VP({nodes:this.loader.nodes});panelResize=FP({destroyRef:this.destroyRef,initialWidth:PP()??vf,onCommit:e=>RP(e)});clampedPanelWidth=this.panelResize.clampedPanelWidth;loading=this.loader.loading;error=this.loader.error;visibleNodes=E(()=>this.filters.apply(this.loader.nodes(),this.issuePaths.bySeverity()));topology=E(()=>Cb(this.loader.nodes(),this.loader.scan()));layoutPositions=X(new Map);layoutComputedAtSignal=X(0);fullLayout=E(()=>zt(be({},this.topology()),{positions:this.layoutPositions(),computedAt:this.layoutComputedAtSignal()}));mapVisiblePaths=E(()=>{let e=this.visibleNodes().map(i=>i.path),n=this.mapVisibility.paths();return n.size===0?new Set(e):new Set(e.filter(i=>n.has(i)))});graph=E(()=>{let e=this.mapVisiblePaths(),n=this.filters.selectedLinkKinds(),i=n.length>0?new Set(n):null;return xb(this.fullLayout(),e,this.nodePositions(),i)});fullAdjacency=E(()=>{let e=new Map,n=(i,r)=>{let a=e.get(i);a||(a=new Set,e.set(i,a)),a.add(r)};for(let i of this.fullLayout().edges)n(i.from,i.to),n(i.to,i.from);return e});hasData=E(()=>this.graph().nodes.length>0);showEmptyState=E(()=>!this.hasData()&&!this.mapVisibility.isActive()&&!this.filters.kindToggleExplicitEmpty()&&this.filters.searchText().trim().length===0);showCurationEmptyState=E(()=>!this.hasData()&&this.mapVisibility.isActive());visibleCount=E(()=>this.graph().nodes.length);totalCount=E(()=>this.loader.nodes().length);edgeCount=E(()=>this.graph().edges.length);layoutComputedAt=E(()=>this.layoutComputedAtSignal());connectionSides=E(()=>vD(this.graphPreferences.layoutAlgorithm(),this.graphPreferences.layoutDirection()));inputSide=E(()=>this.connectionSides().input);outputSide=E(()=>this.connectionSides().output);selectedNodeId=X(null);selectedPath=E(()=>{let e=this.selectedNodeId();return e?this.graph().nodes.find(i=>i.id===e)?.view.path:void 0});selectionGuard=de(()=>{let e=this.selectedNodeId();if(e===null)return;this.graph().nodes.some(i=>i.id===e)||this.selectedNodeId.set(null)});pathsFingerprint=E(()=>this.loader.nodes().map(e=>e.path).sort().join("|"));layoutFit=zP({visibleNodes:this.visibleNodes,pathsFingerprint:this.pathsFingerprint,savedViewport:this.savedViewport,fit:()=>this.fitToScreenClamped(),animatedFit:()=>this.animatedFitToScreen()});constructor(){let e=E(()=>this.loader.nodes().map(r=>({id:r.path,view:{path:r.path}})),{equal:(r,a)=>{if(r.length!==a.length)return!1;for(let s=0;s<r.length;s++)if(r[s]?.id!==a[s]?.id)return!1;return!0}});bP({selectedPath:this.selectedPath,setSelectedNodeId:r=>this.selectedNodeId.set(r),readSelectedNodeId:()=>this.selectedNodeId(),graphNodes:e,onDeepLinkSelect:r=>{this.pendingCenterNodeId.set(r)},router:this.router,route:this.route}),de(()=>{let r=this.loader.nodes();if(r.length===0)return;let a=this.fullLayout();if(a.positions.size===0)return;let s=gP({nodes:r,current:this.nodePositions(),layout:a});s.dirty&&(this.nodePositions.set(s.next),za(s.next))}),de(()=>{this.layoutComputedAt(),this.autoFitPending&&(this.autoFitPending=!1,this.runAnimatedFit())}),de(()=>{this.layoutComputedAt();let r=this.layoutFit.hasCompletedInitialLayout(),a=this.pendingCenterNodeId();a===null||!r||this.fullLayout().positions.size!==0&&(this.pendingCenterNodeId.set(null),lo(()=>this.centerOnNode(a),{injector:this.injector}))}),de(()=>{this.mapVisibility.paths(),en(()=>this.layoutFit.hasCompletedInitialLayout())&&(this.mapFitDebounce!==null&&clearTimeout(this.mapFitDebounce),this.mapFitDebounce=setTimeout(()=>{lo(()=>this.runAnimatedFit(),{injector:this.injector})},180))}),this.destroyRef.onDestroy(()=>{this.mapFitDebounce!==null&&clearTimeout(this.mapFitDebounce)}),de(()=>{let r=this.loader.nodes();r.length!==0&&this.mapVisibility.prune(new Set(r.map(a=>a.path)))});let n="",i="";de(()=>{let r=this.loader.nodes(),a=this.topology(),s={algorithm:this.graphPreferences.layoutAlgorithm(),direction:this.graphPreferences.layoutDirection(),spacing:this.graphPreferences.layoutSpacing()};if(r.length===0)return;let c=yb(r,a.edges),u=`${s.algorithm}|${s.direction}|${s.spacing}`,f=`${c}|${u}`;if(f===n)return;let g=i!==""&&i!==u;n=f,i=u,(s.algorithm==="force"?Promise.resolve(Vf(r,a.edges)):Promise.resolve().then(()=>Bf(this.dagreLayout,r,a.edges,s))).then(k=>{this.layoutPositions.set(k),this.layoutComputedAtSignal.set(performance.now()),g&&(this.nodePositions.set(new Map),this.fitToScreenClamped())}).catch(k=>{console.error("[graph-view] layout failed:",k)})})}ngOnInit(){this.loader.nodes().length===0&&!this.loader.loading()&&this.loader.load()}onLoaded(){}onCanvasChange=this.viewportStore.onCanvasChange;fitToScreenClamped(){let e=this.canvas(),n=this.zoom();e&&(e.fitToScreen({x:40,y:40},!1),lo(()=>{let i=e.transform.scale;if(i<=this.zoomMax&&i>=this.zoomMin)return;let r=Math.max(this.zoomMin,Math.min(i,this.zoomMax)),a=Math.abs(i-r),s=i>r?yn.ZOOM_OUT:yn.ZOOM_IN;n?.setZoom(this.getViewportCenter(),a,s,!1)},{injector:this.injector}))}autoFitAnimToken=0;autoFitPending=!1;mapFitDebounce=null;pendingCenterNodeId=X(null);animatedFitToScreen(){this.autoFitPending=!0}runAnimatedFit(){let e=this.canvasWrap()?.nativeElement;if(!e)return;let n={width:e.clientWidth,height:e.clientHeight},i=this.fullLayout().positions;if(i.size===0)return;let r=this.nodePositions(),a=[];for(let u of this.mapVisiblePaths()){let f=r.get(u)??i.get(u);f&&a.push({x:f.x,y:f.y})}if(a.length===0)return;let s=HP({points:a,wrap:n,panelW:this.selectedNodeId()!==null?this.clampedPanelWidth():0,zoomMin:this.zoomMin});if(!s)return;let c=++this.autoFitAnimToken;y0({readPosition:()=>this.viewportPosition(),readScale:()=>this.viewportScale(),writePosition:u=>this.viewportPosition.set(u),writeScale:u=>this.viewportScale.set(u),isStaleToken:()=>c!==this.autoFitAnimToken},s,jP)}centerOnNode(e){if(!this.mapVisiblePaths().has(e))return;let n=this.canvasWrap()?.nativeElement;if(!n)return;let i=this.nodePositions().get(e)??this.fullLayout().positions.get(e);if(!i)return;let r=qP({point:i,wrap:{width:n.clientWidth,height:n.clientHeight},panelW:this.selectedNodeId()!==null?this.clampedPanelWidth():0,scale:this.viewportScale()}),a=++this.autoFitAnimToken;y0({readPosition:()=>this.viewportPosition(),readScale:()=>this.viewportScale(),writePosition:s=>this.viewportPosition.set(s),writeScale:s=>this.viewportScale.set(s),isStaleToken:()=>a!==this.autoFitAnimToken},r,jP)}isolateNeighborhood(e){this.mapVisibility.setOnly(bD(this.fullAdjacency(),e)),this.selectedNodeId.set(e)}onNodePositionChange(e,n){this.nodeDrag.onNodePositionChange(e,n)}zoomIn(){this.zoom()?.setZoom(this.getViewportCenter(),GP,yn.ZOOM_IN,!0)}zoomOut(){this.zoom()?.setZoom(this.getViewportCenter(),GP,yn.ZOOM_OUT,!0)}fitToScreen(){this.fitToScreenClamped()}resetLayout(){let e=this.mapVisiblePaths(),n=e.size>=this.loader.nodes().length;if(![...this.nodePositions().values()].some(a=>a.manual===!0)){this.applyResetLayout(e,n);return}let r=Ti.resetLayoutConfirm;this.confirmationService.confirm({header:r.header,message:n?r.message:r.messageVisible,icon:"pi pi-info-circle",acceptButtonProps:{label:r.accept},rejectButtonProps:{label:r.reject,severity:"secondary",outlined:!0},accept:()=>this.applyResetLayout(e,n)})}applyResetLayout(e,n){if(this.expansion.resetAll(),n){this.nodePositions.set(new Map),this.fitToScreenClamped();return}this.relayoutVisibleSubset(e).then(()=>this.fitToScreenClamped()).catch(()=>{})}async relayoutVisibleSubset(e){let n=this.loader.nodes().filter(c=>e.has(c.path));if(n.length===0)return;let i=this.topology().edges.filter(c=>e.has(c.from)&&e.has(c.to)),r={algorithm:this.graphPreferences.layoutAlgorithm(),direction:this.graphPreferences.layoutDirection(),spacing:this.graphPreferences.layoutSpacing()},a=await Promise.resolve(r.algorithm==="force"?Vf(n,i):Bf(this.dagreLayout,n,i,r)),s=new Map(this.nodePositions());for(let[c,u]of a)s.set(c,{x:u.x,y:u.y,manual:!0});this.nodePositions.set(s),za(s)}getViewportCenter(){let e=this.canvasWrap()?.nativeElement;if(!e)return{x:0,y:0};let n=e.getBoundingClientRect();return{x:n.width/2,y:n.height/2}}onNodePointerDown(e){this.nodeDrag.onNodePointerDown(e)}selectNode(e,n){this.nodeDrag.isClickWithoutDrag(n)&&(this.selectedNodeId.set(e.id),this.usageTracker.trackFeature("inspector"))}tagSelection=NP({nodes:this.loader.nodes,mapVisibility:this.mapVisibility});activeTagSelection=this.tagSelection.activeTagSelection;selectionState=LP({graph:this.graph,selectedNodeId:this.selectedNodeId,activeTagSelection:this.activeTagSelection});onTagSelect(e){this.tagSelection.onTagSelect(e)}closePanel(){this.selectedNodeId.set(null)}onEscape(){this.selectedNodeId()!==null&&(typeof document<"u"&&xP(document)||this.closePanel())}resetFilters(){this.filters.reset()}onPanelResizeStart(e){this.panelResize.onPanelResizeStart(e)}openNode(e){this.selectedNodeId.set(e.id)}onCanvasClick(e){let n=e.target;n?.closest(".sm-gnode")||n?.closest(".graph__toolbar")||n?.closest(".perf-hud")||n?.closest(".kind-palette")||n?.closest(".graph__panel")||this.selectedNodeId.set(null)}isSelected(e){return this.selectionState.isSelected(e)}isHighlighted(e){return this.selectionState.isHighlighted(e)}isDimmed(e){return this.selectionState.isDimmed(e)}selectionFor(e){return this.selectionState.selectionView().get(e)??Rde}isExpanded(e){return this.expansion.isExpanded(e)}setExpanded(e,n){this.expansion.setExpanded(e,n)}onFavoriteToggle(e){this.loader.toggleFavorite(e.path,e.value)}edgeSelectionFor(e){return this.selectionState.edgeSelectionView().get(e)??Ode}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=z({type:t,selectors:[["sm-graph-view"]],viewQuery:function(n,i){n&1&&_n(i.flow,sa,5)(i.canvas,aa,5)(i.zoom,la,5)(i.canvasWrap,vde,5),n&2&&Ht(4)},hostBindings:function(n,i){n&1&&A("keydown.escape",function(){return i.onEscape()},$a)},features:[we([uo,sC(r0,{mode:ri.MANUAL})])],decls:7,vars:2,consts:[["canvasWrap",""],["data-testid","graph-view",1,"graph"],["data-testid","graph-loading",1,"empty-state"],["data-testid","graph-error",1,"empty-state"],["data-testid","graph-empty",1,"empty-state"],["data-testid","graph-curation-empty",1,"empty-state"],["data-testid","graph-canvas-wrap",1,"graph__canvas-wrap",3,"smMiddleMousePan"],["styleClass","graph__confirm","maskStyleClass","graph__confirm-mask","data-testid","graph-reset-layout-confirm",3,"ariaLabel"],[1,"empty-state__icon","fa-solid","fa-spinner","fa-spin"],[1,"empty-state__title"],[1,"empty-state__icon","empty-state__icon--error","fa-solid","fa-circle-exclamation"],[1,"empty-state__desc"],["aria-hidden","true",1,"pi","pi-filter-slash","empty-state__icon"],["data-testid","graph-empty-filtered",1,"empty-state__title"],["size","small","data-testid","graph-reset-filters",3,"onClick","label","text"],["aria-hidden","true",1,"pi","pi-eye-slash","empty-state__icon"],["size","small","data-testid","graph-show-all-on-map",3,"onClick","label","text"],["data-testid","graph-canvas-wrap",1,"graph__canvas-wrap",3,"click","smMiddleMousePan"],["fDraggable","",3,"fLoaded","fCache"],[3,"fAlignThreshold"],["fZoom","",3,"fCanvasChange","position","scale","fZoomStep","fZoomDblClickStep","fZoomMinimum","fZoomMaximum","debounceTime"],["ngProjectAs","[fConnections]",5,["","fConnections",""]],[3,"fOutputId","fInputId","fOutputSide","fInputSide","fType","fBehavior","fReassignDisabled","class","f-conn--highlighted","f-conn--dimmed","opacity"],["ngProjectAs","[fNodes]",5,["","fNodes",""]],[1,"graph__filter-stack"],["role","complementary","data-testid","graph-panel",1,"graph__panel"],["role","separator","aria-orientation","vertical","data-testid","graph-panel-resize",1,"graph__panel-resize",3,"mousedown"],[1,"graph__panel-scroll"],[3,"tagSelect","path","activeTag"],[3,"visible","total","edges"],["role","toolbar","data-testid","graph-toolbar",1,"graph__toolbar"],["icon","pi pi-search-plus","severity","secondary","size","small","data-testid","graph-zoom-in",3,"onClick","ariaLabel","pTooltip","text","rounded","disabled"],["icon","pi pi-search-minus","severity","secondary","size","small","data-testid","graph-zoom-out",3,"onClick","ariaLabel","pTooltip","text","rounded","disabled"],["icon","pi pi-stop","severity","secondary","size","small","data-testid","graph-fit-to-screen",3,"onClick","ariaLabel","pTooltip","text","rounded"],["aria-hidden","true",1,"graph__toolbar-sep"],["icon","pi pi-history","severity","secondary","size","small","data-testid","graph-reset-layout",3,"onClick","ariaLabel","pTooltip","text","rounded"],[3,"fOutputId","fInputId","fOutputSide","fInputSide","fType","fBehavior","fReassignDisabled"],["fMarker","","viewBox","0 0 9 9","markerUnits","userSpaceOnUse",1,"sm-edge-dot",3,"type","width","height","refX","refY"],["cx","4.5","cy","4.5","r","3.5"],[3,"type"],["ngProjectAs","[fNodes]",5,["","fNodes",""],4,"fVirtualFor","fVirtualForOf"],["fNode","","fDragHandle","","fNodeInput","","fNodeOutput","",1,"sm-gnode-host",3,"fNodePositionChange","pointerdown","click","dblclick","fNodeId","fNodePosition","fInputId","fInputConnectableSide","fOutputId","fOutputConnectableSide"],[3,"expandedChange","favoriteToggle","node","stats","summary","selection","expanded","isFavorite"],[1,"sm-gnode__marker-anchor"],["slot","graph.node.alert",3,"node"],["fNode","","fDragHandle","","fNodeInput","","fNodeOutput","","fInputConnectableSide","top","fOutputConnectableSide","bottom",1,"sm-gnode-host",3,"fNodeId","fNodePosition","fInputId","fOutputId"],["fNode","","fDragHandle","","fNodeInput","","fNodeOutput","","fInputConnectableSide","top","fOutputConnectableSide","bottom",1,"sm-gnode-host",3,"fNodePositionChange","pointerdown","click","dblclick","fNodeId","fNodePosition","fInputId","fOutputId"],["icon","pi pi-eye","severity","secondary","size","small","data-testid","graph-show-all-toolbar",3,"onClick","label","ariaLabel","pTooltip","text"]],template:function(n,i){n&1&&(h(0,"section",1),M(1,yde,4,1,"div",2)(2,Cde,6,2,"div",3)(3,xde,5,3,"div",4)(4,wde,5,3,"div",5)(5,Pde,32,40,"div",6),N(6,"p-confirmdialog",7),_()),n&2&&(l(),D(i.loading()&&!i.hasData()?1:i.error()&&!i.hasData()?2:i.showEmptyState()?3:i.showCurationEmptyState()?4:5),l(5),m("ariaLabel",i.texts.resetLayoutConfirm.header))},dependencies:[gC,sa,aa,dC,cC,la,fC,Ty,Sy,uC,jy,Wy,pC,hC,Eh,Gy,mC,oC,SD,MD,PD,AD,BD,zD,fP,an,Ut,ps,us,Ve,Be,ti,mP],styles:['[_nghost-%COMP%]{display:block;height:100%}.graph[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%}.graph__canvas-wrap[_ngcontent-%COMP%]{position:relative;flex:1;min-height:0;background:var(--sm-bg-content);overflow:hidden;--ff-connection-drag-handle-stroke: transparent;--ff-connection-drag-handle-fill: transparent;--ff-canvas-background-color: transparent}.graph__filter-stack[_ngcontent-%COMP%]{position:absolute;top:16px;left:16px;z-index:2;display:flex;flex-direction:column;gap:8px;pointer-events:none}.graph__filter-stack[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{pointer-events:auto}.graph__canvas-wrap[_ngcontent-%COMP%] f-flow[_ngcontent-%COMP%]{width:100%;height:100%}.graph__canvas-wrap[_ngcontent-%COMP%] .f-connection-drag-handle{fill:transparent;stroke:transparent}.graph__panel[_ngcontent-%COMP%]{position:absolute;top:0;right:0;bottom:0;background:var(--sm-bg-content);border-left:1px solid var(--sm-border);box-shadow:var(--sm-shadow-panel);transform:translate(100%);transition:transform .22s ease;z-index:20;pointer-events:none;display:flex;overflow:hidden}.graph__panel.is-open[_ngcontent-%COMP%]{transform:translate(0);pointer-events:auto}.graph__panel-scroll[_ngcontent-%COMP%]{flex:1;min-height:0;min-width:0;overflow-y:auto}.graph__panel-resize[_ngcontent-%COMP%]{position:absolute;top:0;left:-3px;bottom:0;width:6px;cursor:ew-resize;z-index:2}.graph__panel-resize[_ngcontent-%COMP%]:after{content:"";position:absolute;top:0;bottom:0;left:3px;width:4px;background:transparent;transition:background .12s ease}.graph__panel-resize[_ngcontent-%COMP%]:hover:after, .graph__panel-resize[_ngcontent-%COMP%]:active:after{background:var(--p-primary-color)}.graph__toolbar[_ngcontent-%COMP%]{position:absolute;bottom:16px;left:50%;transform:translate(-50%);display:flex;align-items:center;gap:2px;padding:4px;background:var(--sm-bg-content);border:1px solid var(--sm-border);border-radius:var(--sm-radius-pill);box-shadow:var(--sm-shadow-floating);z-index:2;pointer-events:auto;transition:box-shadow .22s ease}.graph__toolbar-sep[_ngcontent-%COMP%]{width:1px;height:18px;margin:0 2px;background:var(--sm-border);flex-shrink:0}.sm-gnode-host[_ngcontent-%COMP%]{position:relative;display:inline-block;cursor:pointer;--ff-node-width: auto;--ff-node-min-height: 0;--ff-node-padding: 0;--ff-node-background-color: transparent;--ff-node-border-color: transparent;--ff-node-border-color-selected: transparent;--ff-node-border-radius: 0;--ff-node-shadow: none;--ff-node-shadow-selected: none}.sm-gnode-host.f-selected[_ngcontent-%COMP%]{filter:drop-shadow(0 0 6px var(--p-primary-color-300))}.sm-gnode-host.f-selected[_ngcontent-%COMP%] > .sm-gnode[_ngcontent-%COMP%]{box-shadow:0 0 0 3px var(--p-primary-color),var(--sm-shadow-card)}.f-conn--invokes[_ngcontent-%COMP%]{--ff-connection-color: var(--sm-edge-invokes);--ff-connection-width: 1.5px;--ff-marker-color: var(--sm-edge-invokes)}.f-conn--references[_ngcontent-%COMP%]{--ff-connection-color: var(--sm-edge-references);--ff-connection-width: 1.25px;--ff-marker-color: var(--sm-edge-references)}.f-conn--mentions[_ngcontent-%COMP%]{--ff-connection-color: var(--sm-edge-mentions);--ff-connection-width: 1px;--ff-marker-color: var(--sm-edge-mentions)}.f-conn--supersedes[_ngcontent-%COMP%]{--ff-connection-color: var(--sm-edge-supersedes);--ff-connection-width: 1.25px;--ff-marker-color: var(--sm-edge-supersedes)}.graph__canvas-wrap[_ngcontent-%COMP%] .f-conn--supersedes .f-connection-path{stroke-dasharray:none}.f-conn--highlighted[_ngcontent-%COMP%]{--ff-connection-width: 2px}.f-conn--dimmed[_ngcontent-%COMP%]{opacity:.15}.f-connection.f-selected[_ngcontent-%COMP%]{--ff-connection-width: 2.5px}.f-conn--invokes.f-selected[_ngcontent-%COMP%]{--ff-connection-color: var(--sm-edge-invokes-active);--ff-connection-selected-color: var(--sm-edge-invokes-active);--ff-marker-color: var(--sm-edge-invokes-active)}.f-conn--references.f-selected[_ngcontent-%COMP%]{--ff-connection-color: var(--sm-edge-references-active);--ff-connection-selected-color: var(--sm-edge-references-active);--ff-marker-color: var(--sm-edge-references-active)}.f-conn--mentions.f-selected[_ngcontent-%COMP%]{--ff-connection-color: var(--sm-edge-mentions-active);--ff-connection-selected-color: var(--sm-edge-mentions-active);--ff-marker-color: var(--sm-edge-mentions-active)}.f-conn--supersedes.f-selected[_ngcontent-%COMP%]{--ff-connection-color: var(--sm-edge-supersedes-active);--ff-connection-selected-color: var(--sm-edge-supersedes-active);--ff-marker-color: var(--sm-edge-supersedes-active)}.sm-gnode__marker-anchor[_ngcontent-%COMP%]{position:absolute;top:-10px;right:-10px;z-index:4;display:inline-flex;align-items:center;gap:.25rem;pointer-events:none;transition:opacity .15s ease}sm-node-card.sm-gnode--dimmed[_ngcontent-%COMP%] + .sm-gnode__marker-anchor[_ngcontent-%COMP%]{opacity:.25}sm-node-card.sm-gnode--deprecated[_ngcontent-%COMP%] + .sm-gnode__marker-anchor[_ngcontent-%COMP%]{opacity:.55}'],changeDetection:0})}return t})();var Ha=440,C0=280,Fde=480;function $P(t){let o=X(t.initialWidth),e=X(typeof window>"u"?1920:window.innerWidth);typeof window<"u"&&qa(window,"resize").pipe(Jn(t.destroyRef)).subscribe(()=>e.set(window.innerWidth));let n=()=>Math.max(C0,e()-Fde),i=E(()=>{let C=n(),k=o();return k>C||k<C0?Math.min(Ha,C):k}),r=null,a=null,s=null,c=()=>{s=null,a!==null&&(o.set(a),a=null)},u=C=>{if(!r)return;let k=C.clientX-r.mouseX,S=r.widthAtStart+k,F=n();a=Math.min(F,Math.max(C0,S)),s===null&&typeof window<"u"&&(s=window.requestAnimationFrame(c))},f=()=>{r&&(r=null,document.removeEventListener("mousemove",u),document.removeEventListener("mouseup",f),s!==null&&typeof window<"u"&&(window.cancelAnimationFrame(s),s=null),a!==null&&(o.set(a),a=null),t.onCommit(o()))};return{clampedRailWidth:i,onRailResizeStart:C=>{C.button===0&&(C.preventDefault(),C.stopPropagation(),r={mouseX:C.clientX,widthAtStart:i()},document.addEventListener("mousemove",u),document.addEventListener("mouseup",f))}}}var WP=(()=>{class t{router=p(Ja);route=p(Qa);open(e){this.router.navigate([],{relativeTo:this.route,queryParams:{path:e},queryParamsHandling:"merge"})}static \u0275fac=function(n){return new(n||t)};static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})();function Nde(t,o){if(t&1){let e=W();h(0,"p-iconfield",3),N(1,"p-inputicon",7),h(2,"input",8),A("ngModelChange",function(i){w(e);let r=d();return T(r.onSearchChange(i))}),_()()}if(t&2){let e=d();l(2),m("placeholder",e.texts.rail.searchPlaceholder)("ngModel",e.searchText()),O("aria-label",e.texts.rail.searchAriaLabel)}}function Ade(t,o){if(t&1){let e=W();h(0,"div",9),N(1,"sm-files-view"),_(),h(2,"div",10),A("mousedown",function(i){w(e);let r=d();return T(r.onRailResizeStart(i))}),_()}if(t&2){let e=d();l(2),O("aria-label",e.texts.rail.resize)}}var KP="sm.workspace.rail-width",YP="sm.workspace.rail-collapsed",PSe=(()=>{class t{store=p(rn);destroyRef=p(xt);texts=wb;railCollapsed=X(this.readStoredCollapsed());railAnimating=X(!1);railAnimTimer=null;searchText=this.store.searchText;graphView=nt(yf);isolate(e){this.graphView()?.isolateNeighborhood(e)}resize=$P({destroyRef:this.destroyRef,initialWidth:this.readStoredWidth(),onCommit:e=>this.writeStoredWidth(e)});clampedRailWidth=this.resize.clampedRailWidth;onRailResizeStart=this.resize.onRailResizeStart;toggleRail(){this.railCollapsed.update(e=>!e),this.writeStoredCollapsed(this.railCollapsed()),this.railAnimating.set(!0),this.railAnimTimer!==null&&clearTimeout(this.railAnimTimer),this.railAnimTimer=setTimeout(()=>this.railAnimating.set(!1),220)}onSearchChange(e){this.store.setSearchText(e)}readStoredWidth(){if(typeof localStorage>"u")return Ha;let e=Number(localStorage.getItem(KP));return Number.isFinite(e)&&e>0?e:Ha}writeStoredWidth(e){if(!(typeof localStorage>"u"))try{localStorage.setItem(KP,String(e))}catch{}}readStoredCollapsed(){if(typeof localStorage>"u")return!0;let e=localStorage.getItem(YP);return e===null?!0:e==="1"}writeStoredCollapsed(e){if(!(typeof localStorage>"u"))try{localStorage.setItem(YP,e?"1":"0")}catch{}}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=z({type:t,selectors:[["sm-workspace-view"]],viewQuery:function(n,i){n&1&&_n(i.graphView,yf,5),n&2&&Ht()},features:[we([{provide:go,useClass:WP},{provide:ms,useExisting:wn(()=>t)}])],decls:9,vars:15,consts:[["data-testid","workspace-view",1,"workspace"],["data-testid","workspace-rail",1,"workspace__rail"],[1,"workspace__rail-bar"],["iconPosition","left",1,"workspace__search"],["type","button","tooltipPosition","bottom","data-testid","workspace-rail-toggle",1,"workspace__rail-btn",3,"click","pTooltip"],["aria-hidden","true",1,"pi"],[1,"workspace__map"],["styleClass","pi pi-search"],["pInputText","","pSize","small","type","text","data-testid","workspace-search",3,"ngModelChange","placeholder","ngModel"],[1,"workspace__rail-body"],["role","separator","aria-orientation","vertical","data-testid","workspace-rail-resize",1,"workspace__rail-resize",3,"mousedown"]],template:function(n,i){n&1&&(h(0,"div",0)(1,"aside",1)(2,"div",2),M(3,Nde,3,3,"p-iconfield",3),h(4,"button",4),A("click",function(){return i.toggleRail()}),N(5,"i",5),_()(),M(6,Ade,3,1),_(),h(7,"div",6),N(8,"sm-graph-view"),_()()),n&2&&(l(),Ne("width",i.railCollapsed()?null:i.clampedRailWidth(),"px"),se("is-collapsed",i.railCollapsed())("is-animating",i.railAnimating()),O("aria-label",i.texts.rail.label),l(2),D(i.railCollapsed()?-1:3),l(),m("pTooltip",i.railCollapsed()?i.texts.rail.expand:i.texts.rail.collapse),O("aria-label",i.railCollapsed()?i.texts.rail.expand:i.texts.rail.collapse),l(),se("pi-times",!i.railCollapsed())("pi-angle-right",i.railCollapsed()),l(),D(i.railCollapsed()?-1:6))},dependencies:[Vv,yf,Ot,q0,nn,on,j0,G0,$0,U0,ts,fo,Ve,Be],styles:['.workspace[_ngcontent-%COMP%]{display:flex;height:100%;min-height:0}.workspace__rail[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;flex:0 0 auto;width:440px;min-width:0;min-height:0;background:var(--sm-bg-content);border-right:1px solid var(--sm-border)}.workspace__rail.is-collapsed[_ngcontent-%COMP%]{width:44px}.workspace__rail.is-animating[_ngcontent-%COMP%]{transition:width .18s ease}.workspace__rail-bar[_ngcontent-%COMP%]{display:flex;flex:0 0 auto;align-items:center;gap:.4rem;padding:.35rem .4rem;border-bottom:1px solid var(--sm-border)}.workspace__rail.is-collapsed[_ngcontent-%COMP%] .workspace__rail-bar[_ngcontent-%COMP%]{justify-content:center}.workspace__search[_ngcontent-%COMP%]{flex:1;min-width:0;display:block}.workspace__search[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{width:100%}.workspace__rail-btn[_ngcontent-%COMP%]{display:inline-flex;flex:0 0 auto;align-items:center;justify-content:center;width:30px;height:30px;border:none;border-radius:var(--sm-radius-lg);background:transparent;color:var(--p-text-muted-color);cursor:pointer}.workspace__rail-btn[_ngcontent-%COMP%]:hover{background:var(--p-content-hover-background);color:var(--p-text-color)}.workspace__rail-body[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex:1;min-height:0;overflow:hidden}.workspace__rail-body[_ngcontent-%COMP%] sm-files-view[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex:1;min-height:0;width:100%;max-width:none;margin:0;padding:.5rem}.workspace__rail-resize[_ngcontent-%COMP%]{position:absolute;top:0;right:-3px;bottom:0;width:6px;cursor:ew-resize;z-index:5}.workspace__rail-resize[_ngcontent-%COMP%]:after{content:"";position:absolute;top:0;bottom:0;right:3px;width:4px;background:transparent;transition:background .12s ease}.workspace__rail-resize[_ngcontent-%COMP%]:hover:after, .workspace__rail-resize[_ngcontent-%COMP%]:active:after{background:var(--p-primary-color)}.workspace__map[_ngcontent-%COMP%]{position:relative;flex:1;min-width:0;min-height:0}.workspace__map[_ngcontent-%COMP%] sm-graph-view[_ngcontent-%COMP%]{display:block;height:100%}'],changeDetection:0})}return t})();export{PSe as WorkspaceView};