@skill-map/cli 0.50.0 → 0.51.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.
@@ -1,2349 +0,0 @@
1
- import{A as _s,a as Z0,b as X0,c as Q0,d as J0,e as lb,f as cb,g as ls,h as ds,i as us,j as db,k as ub,l as _o,m as pb,n as qf,o as hb,p as fb,q as Qn,r as Jn,t as mb,u as _b,v as gb,y as hs,z as fs}from"./chunk-4N5LGWJ4.js";import{A as Ib,C as Eb,D as Mb,E as jf,F as Uf,G as Db,a as ib,b as os,c as ho,d as ob,e as rs,f as rb,g as as,h as ss,i as _r,j as gr,k as ab,l as cn,m as fo,n as ps,o as yb,p as ms,q as Cb,r as xb,s as wb,t as Tb,u as Sb,v as kb,w as bo,z as ti}from"./chunk-FQQYWQV6.js";import{B as po,C as is,D as ke,E as eb,F as tb,G as mr,H as Ee,I as nb,J as Mn,K as Ve,L as ze,M as sb,N as mo,O as Ce,P as Hf,Q as cs,R as Yt,S as dn,T as go,U as bb,V as ei,W as Gf,Z as vb,_ as Ht,a as ct,c as lo,d as j0,e as zf,f as U0,g as co,h as $0,i as W0,j as Ke,k as Se,l as Bt,m as dt,p as Xn,q as Y0,r as uo,s as sn,t as ln,u as Vt,v as ut,w as Ot,x as de,y as zt}from"./chunk-DOWLJNMD.js";import{B as Vf,Ca as K0,D as V0,F as z0,H as H0,J as ts,O as hr,T as q0,V as ns,W as G0,a as yn,b as dr,ba as fr,k as ur,l as Lf,m as L0,n as B0,p as Di,t as En,u as vt,w as Bf,z as pr}from"./chunk-4SG4352Z.js";import{f as Ja,i as es}from"./chunk-AEA5GIA7.js";import{c as an,e as so,f as kt,g as Zn,h as xt,i as ot,j as Kt}from"./chunk-WMGW2UAL.js";import{$ as Et,$a as S,$b as Rf,Ab as me,Bb as Ya,Cb as Za,Db as te,Dc as G,Ea as sr,Eb as it,Ec as Te,Fa as Ei,Fb as A,Ga as Wa,Ha as l,Hb as d,Ib as Rt,J as Sn,Jb as Ae,K as y,Kb as wt,L as tt,Lb as In,Ma as ao,Mb as U,N as ue,Na as D0,Nb as $,O as oo,Ob as Pf,P as p,Pa as P0,Pb as vn,Qa as bn,Qb as $t,Ra as Ka,Rb as Lt,Sb as $e,T as M0,Tb as ce,U as kn,Ub as St,V as w,Vb as B,W as T,Wa as z,Wb as b,X as K,Xa as nt,Xb as C,Y as ja,Ya as je,Yb as Me,Z as gt,Za as lt,Zb as lr,_ as Ua,_a as Y,_b as F0,ac as Of,ba as ie,bc as Ff,ca as nn,cc as Wt,d as io,dc as Mt,ec as Ie,fc as ve,g as M,ga as Q,gc as on,hc as Fe,ia as ge,ib as O,ic as Yn,ja as ro,jb as R0,jc as N0,ka as q,kb as O0,kc as Nf,la as Qe,lb as P,lc as Xa,mb as R,mc as cr,n as E0,nb as Df,nc as A0,ob as Ue,oc as We,pa as $a,pb as he,qb as fe,qc as rn,rb as h,rc as E,sb as f,sc as bt,t as Ga,tb as _,tc as H,ub as F,uc as at,vb as J,vc as Qa,wb as ee,wc as Af,xb as ae,xc as Mi,yb as se,zb as le}from"./chunk-VJ57LHDR.js";import{a as ye,b as gn,c as no,e as v,g as u3}from"./chunk-WCABR6TI.js";var EC=v((Rge,IC)=>{"use strict";function _z(){this.__data__=[],this.size=0}IC.exports=_z});var Wi=v((Oge,MC)=>{"use strict";function gz(t,o){return t===o||t!==t&&o!==o}MC.exports=gz});var la=v((Fge,DC)=>{"use strict";var bz=Wi();function vz(t,o){for(var e=t.length;e--;)if(bz(t[e][0],o))return e;return-1}DC.exports=vz});var RC=v((Nge,PC)=>{"use strict";var yz=la(),Cz=Array.prototype,xz=Cz.splice;function wz(t){var o=this.__data__,e=yz(o,t);if(e<0)return!1;var n=o.length-1;return e==n?o.pop():xz.call(o,e,1),--this.size,!0}PC.exports=wz});var FC=v((Age,OC)=>{"use strict";var Tz=la();function Sz(t){var o=this.__data__,e=Tz(o,t);return e<0?void 0:o[e][1]}OC.exports=Sz});var AC=v((Lge,NC)=>{"use strict";var kz=la();function Iz(t){return kz(this.__data__,t)>-1}NC.exports=Iz});var BC=v((Bge,LC)=>{"use strict";var Ez=la();function Mz(t,o){var e=this.__data__,n=Ez(e,t);return n<0?(++this.size,e.push([t,o])):e[n][1]=o,this}LC.exports=Mz});var ca=v((Vge,VC)=>{"use strict";var Dz=EC(),Pz=RC(),Rz=FC(),Oz=AC(),Fz=BC();function qo(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])}}qo.prototype.clear=Dz;qo.prototype.delete=Pz;qo.prototype.get=Rz;qo.prototype.has=Oz;qo.prototype.set=Fz;VC.exports=qo});var HC=v((zge,zC)=>{"use strict";var Nz=ca();function Az(){this.__data__=new Nz,this.size=0}zC.exports=Az});var GC=v((Hge,qC)=>{"use strict";function Lz(t){var o=this.__data__,e=o.delete(t);return this.size=o.size,e}qC.exports=Lz});var UC=v((qge,jC)=>{"use strict";function Bz(t){return this.__data__.get(t)}jC.exports=Bz});var WC=v((Gge,$C)=>{"use strict";function Vz(t){return this.__data__.has(t)}$C.exports=Vz});var B_=v((jge,KC)=>{"use strict";var zz=typeof global=="object"&&global&&global.Object===Object&&global;KC.exports=zz});var hn=v((Uge,YC)=>{"use strict";var Hz=B_(),qz=typeof self=="object"&&self&&self.Object===Object&&self,Gz=Hz||qz||Function("return this")();YC.exports=Gz});var Ki=v(($ge,ZC)=>{"use strict";var jz=hn(),Uz=jz.Symbol;ZC.exports=Uz});var e1=v((Wge,JC)=>{"use strict";var XC=Ki(),QC=Object.prototype,$z=QC.hasOwnProperty,Wz=QC.toString,da=XC?XC.toStringTag:void 0;function Kz(t){var o=$z.call(t,da),e=t[da];try{t[da]=void 0;var n=!0}catch{}var i=Wz.call(t);return n&&(o?t[da]=e:delete t[da]),i}JC.exports=Kz});var n1=v((Kge,t1)=>{"use strict";var Yz=Object.prototype,Zz=Yz.toString;function Xz(t){return Zz.call(t)}t1.exports=Xz});var _i=v((Yge,r1)=>{"use strict";var i1=Ki(),Qz=e1(),Jz=n1(),eH="[object Null]",tH="[object Undefined]",o1=i1?i1.toStringTag:void 0;function nH(t){return t==null?t===void 0?tH:eH:o1&&o1 in Object(t)?Qz(t):Jz(t)}r1.exports=nH});var Qt=v((Zge,a1)=>{"use strict";function iH(t){var o=typeof t;return t!=null&&(o=="object"||o=="function")}a1.exports=iH});var Go=v((Xge,s1)=>{"use strict";var oH=_i(),rH=Qt(),aH="[object AsyncFunction]",sH="[object Function]",lH="[object GeneratorFunction]",cH="[object Proxy]";function dH(t){if(!rH(t))return!1;var o=oH(t);return o==sH||o==lH||o==aH||o==cH}s1.exports=dH});var c1=v((Qge,l1)=>{"use strict";var uH=hn(),pH=uH["__core-js_shared__"];l1.exports=pH});var p1=v((Jge,u1)=>{"use strict";var V_=c1(),d1=(function(){var t=/[^.]+$/.exec(V_&&V_.keys&&V_.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""})();function hH(t){return!!d1&&d1 in t}u1.exports=hH});var z_=v((e0e,h1)=>{"use strict";var fH=Function.prototype,mH=fH.toString;function _H(t){if(t!=null){try{return mH.call(t)}catch{}try{return t+""}catch{}}return""}h1.exports=_H});var m1=v((t0e,f1)=>{"use strict";var gH=Go(),bH=p1(),vH=Qt(),yH=z_(),CH=/[\\^$.*+?()[\]{}|]/g,xH=/^\[object .+?Constructor\]$/,wH=Function.prototype,TH=Object.prototype,SH=wH.toString,kH=TH.hasOwnProperty,IH=RegExp("^"+SH.call(kH).replace(CH,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function EH(t){if(!vH(t)||bH(t))return!1;var o=gH(t)?IH:xH;return o.test(yH(t))}f1.exports=EH});var g1=v((n0e,_1)=>{"use strict";function MH(t,o){return t?.[o]}_1.exports=MH});var gi=v((i0e,b1)=>{"use strict";var DH=m1(),PH=g1();function RH(t,o){var e=PH(t,o);return DH(e)?e:void 0}b1.exports=RH});var Ah=v((o0e,v1)=>{"use strict";var OH=gi(),FH=hn(),NH=OH(FH,"Map");v1.exports=NH});var ua=v((r0e,y1)=>{"use strict";var AH=gi(),LH=AH(Object,"create");y1.exports=LH});var w1=v((a0e,x1)=>{"use strict";var C1=ua();function BH(){this.__data__=C1?C1(null):{},this.size=0}x1.exports=BH});var S1=v((s0e,T1)=>{"use strict";function VH(t){var o=this.has(t)&&delete this.__data__[t];return this.size-=o?1:0,o}T1.exports=VH});var I1=v((l0e,k1)=>{"use strict";var zH=ua(),HH="__lodash_hash_undefined__",qH=Object.prototype,GH=qH.hasOwnProperty;function jH(t){var o=this.__data__;if(zH){var e=o[t];return e===HH?void 0:e}return GH.call(o,t)?o[t]:void 0}k1.exports=jH});var M1=v((c0e,E1)=>{"use strict";var UH=ua(),$H=Object.prototype,WH=$H.hasOwnProperty;function KH(t){var o=this.__data__;return UH?o[t]!==void 0:WH.call(o,t)}E1.exports=KH});var P1=v((d0e,D1)=>{"use strict";var YH=ua(),ZH="__lodash_hash_undefined__";function XH(t,o){var e=this.__data__;return this.size+=this.has(t)?0:1,e[t]=YH&&o===void 0?ZH:o,this}D1.exports=XH});var O1=v((u0e,R1)=>{"use strict";var QH=w1(),JH=S1(),eq=I1(),tq=M1(),nq=P1();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=QH;jo.prototype.delete=JH;jo.prototype.get=eq;jo.prototype.has=tq;jo.prototype.set=nq;R1.exports=jo});var A1=v((p0e,N1)=>{"use strict";var F1=O1(),iq=ca(),oq=Ah();function rq(){this.size=0,this.__data__={hash:new F1,map:new(oq||iq),string:new F1}}N1.exports=rq});var B1=v((h0e,L1)=>{"use strict";function aq(t){var o=typeof t;return o=="string"||o=="number"||o=="symbol"||o=="boolean"?t!=="__proto__":t===null}L1.exports=aq});var pa=v((f0e,V1)=>{"use strict";var sq=B1();function lq(t,o){var e=t.__data__;return sq(o)?e[typeof o=="string"?"string":"hash"]:e.map}V1.exports=lq});var H1=v((m0e,z1)=>{"use strict";var cq=pa();function dq(t){var o=cq(this,t).delete(t);return this.size-=o?1:0,o}z1.exports=dq});var G1=v((_0e,q1)=>{"use strict";var uq=pa();function pq(t){return uq(this,t).get(t)}q1.exports=pq});var U1=v((g0e,j1)=>{"use strict";var hq=pa();function fq(t){return hq(this,t).has(t)}j1.exports=fq});var W1=v((b0e,$1)=>{"use strict";var mq=pa();function _q(t,o){var e=mq(this,t),n=e.size;return e.set(t,o),this.size+=e.size==n?0:1,this}$1.exports=_q});var Lh=v((v0e,K1)=>{"use strict";var gq=A1(),bq=H1(),vq=G1(),yq=U1(),Cq=W1();function Uo(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])}}Uo.prototype.clear=gq;Uo.prototype.delete=bq;Uo.prototype.get=vq;Uo.prototype.has=yq;Uo.prototype.set=Cq;K1.exports=Uo});var Z1=v((y0e,Y1)=>{"use strict";var xq=ca(),wq=Ah(),Tq=Lh(),Sq=200;function kq(t,o){var e=this.__data__;if(e instanceof xq){var n=e.__data__;if(!wq||n.length<Sq-1)return n.push([t,o]),this.size=++e.size,this;e=this.__data__=new Tq(n)}return e.set(t,o),this.size=e.size,this}Y1.exports=kq});var ha=v((C0e,X1)=>{"use strict";var Iq=ca(),Eq=HC(),Mq=GC(),Dq=UC(),Pq=WC(),Rq=Z1();function $o(t){var o=this.__data__=new Iq(t);this.size=o.size}$o.prototype.clear=Eq;$o.prototype.delete=Mq;$o.prototype.get=Dq;$o.prototype.has=Pq;$o.prototype.set=Rq;X1.exports=$o});var Bh=v((x0e,Q1)=>{"use strict";function Oq(t,o){for(var e=-1,n=t==null?0:t.length;++e<n&&o(t[e],e,t)!==!1;);return t}Q1.exports=Oq});var H_=v((w0e,J1)=>{"use strict";var Fq=gi(),Nq=(function(){try{var t=Fq(Object,"defineProperty");return t({},"",{}),t}catch{}})();J1.exports=Nq});var fa=v((T0e,tx)=>{"use strict";var ex=H_();function Aq(t,o,e){o=="__proto__"&&ex?ex(t,o,{configurable:!0,enumerable:!0,value:e,writable:!0}):t[o]=e}tx.exports=Aq});var ma=v((S0e,nx)=>{"use strict";var Lq=fa(),Bq=Wi(),Vq=Object.prototype,zq=Vq.hasOwnProperty;function Hq(t,o,e){var n=t[o];(!(zq.call(t,o)&&Bq(n,e))||e===void 0&&!(o in t))&&Lq(t,o,e)}nx.exports=Hq});var Wo=v((k0e,ix)=>{"use strict";var qq=ma(),Gq=fa();function jq(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?Gq(e,s,c):qq(e,s,c)}return e}ix.exports=jq});var rx=v((I0e,ox)=>{"use strict";function Uq(t,o){for(var e=-1,n=Array(t);++e<t;)n[e]=o(e);return n}ox.exports=Uq});var Tn=v((E0e,ax)=>{"use strict";function $q(t){return t!=null&&typeof t=="object"}ax.exports=$q});var lx=v((M0e,sx)=>{"use strict";var Wq=_i(),Kq=Tn(),Yq="[object Arguments]";function Zq(t){return Kq(t)&&Wq(t)==Yq}sx.exports=Zq});var Ko=v((D0e,ux)=>{"use strict";var cx=lx(),Xq=Tn(),dx=Object.prototype,Qq=dx.hasOwnProperty,Jq=dx.propertyIsEnumerable,eG=cx((function(){return arguments})())?cx:function(t){return Xq(t)&&Qq.call(t,"callee")&&!Jq.call(t,"callee")};ux.exports=eG});var mt=v((P0e,px)=>{"use strict";var tG=Array.isArray;px.exports=tG});var fx=v((R0e,hx)=>{"use strict";function nG(){return!1}hx.exports=nG});var Yi=v((_a,Yo)=>{"use strict";var iG=hn(),oG=fx(),gx=typeof _a=="object"&&_a&&!_a.nodeType&&_a,mx=gx&&typeof Yo=="object"&&Yo&&!Yo.nodeType&&Yo,rG=mx&&mx.exports===gx,_x=rG?iG.Buffer:void 0,aG=_x?_x.isBuffer:void 0,sG=aG||oG;Yo.exports=sG});var ga=v((O0e,bx)=>{"use strict";var lG=9007199254740991,cG=/^(?:0|[1-9]\d*)$/;function dG(t,o){var e=typeof t;return o=o??lG,!!o&&(e=="number"||e!="symbol"&&cG.test(t))&&t>-1&&t%1==0&&t<o}bx.exports=dG});var Vh=v((F0e,vx)=>{"use strict";var uG=9007199254740991;function pG(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=uG}vx.exports=pG});var Cx=v((N0e,yx)=>{"use strict";var hG=_i(),fG=Vh(),mG=Tn(),_G="[object Arguments]",gG="[object Array]",bG="[object Boolean]",vG="[object Date]",yG="[object Error]",CG="[object Function]",xG="[object Map]",wG="[object Number]",TG="[object Object]",SG="[object RegExp]",kG="[object Set]",IG="[object String]",EG="[object WeakMap]",MG="[object ArrayBuffer]",DG="[object DataView]",PG="[object Float32Array]",RG="[object Float64Array]",OG="[object Int8Array]",FG="[object Int16Array]",NG="[object Int32Array]",AG="[object Uint8Array]",LG="[object Uint8ClampedArray]",BG="[object Uint16Array]",VG="[object Uint32Array]",Je={};Je[PG]=Je[RG]=Je[OG]=Je[FG]=Je[NG]=Je[AG]=Je[LG]=Je[BG]=Je[VG]=!0;Je[_G]=Je[gG]=Je[MG]=Je[bG]=Je[DG]=Je[vG]=Je[yG]=Je[CG]=Je[xG]=Je[wG]=Je[TG]=Je[SG]=Je[kG]=Je[IG]=Je[EG]=!1;function zG(t){return mG(t)&&fG(t.length)&&!!Je[hG(t)]}yx.exports=zG});var ba=v((A0e,xx)=>{"use strict";function HG(t){return function(o){return t(o)}}xx.exports=HG});var zh=v((va,Zo)=>{"use strict";var qG=B_(),wx=typeof va=="object"&&va&&!va.nodeType&&va,ya=wx&&typeof Zo=="object"&&Zo&&!Zo.nodeType&&Zo,GG=ya&&ya.exports===wx,q_=GG&&qG.process,jG=(function(){try{var t=ya&&ya.require&&ya.require("util").types;return t||q_&&q_.binding&&q_.binding("util")}catch{}})();Zo.exports=jG});var Xo=v((L0e,kx)=>{"use strict";var UG=Cx(),$G=ba(),Tx=zh(),Sx=Tx&&Tx.isTypedArray,WG=Sx?$G(Sx):UG;kx.exports=WG});var G_=v((B0e,Ix)=>{"use strict";var KG=rx(),YG=Ko(),ZG=mt(),XG=Yi(),QG=ga(),JG=Xo(),ej=Object.prototype,tj=ej.hasOwnProperty;function nj(t,o){var e=ZG(t),n=!e&&YG(t),i=!e&&!n&&XG(t),r=!e&&!n&&!i&&JG(t),a=e||n||i||r,s=a?KG(t.length,String):[],c=s.length;for(var u in t)(o||tj.call(t,u))&&!(a&&(u=="length"||i&&(u=="offset"||u=="parent")||r&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||QG(u,c)))&&s.push(u);return s}Ix.exports=nj});var Ca=v((V0e,Ex)=>{"use strict";var ij=Object.prototype;function oj(t){var o=t&&t.constructor,e=typeof o=="function"&&o.prototype||ij;return t===e}Ex.exports=oj});var j_=v((z0e,Mx)=>{"use strict";function rj(t,o){return function(e){return t(o(e))}}Mx.exports=rj});var Px=v((H0e,Dx)=>{"use strict";var aj=j_(),sj=aj(Object.keys,Object);Dx.exports=sj});var Hh=v((q0e,Rx)=>{"use strict";var lj=Ca(),cj=Px(),dj=Object.prototype,uj=dj.hasOwnProperty;function pj(t){if(!lj(t))return cj(t);var o=[];for(var e in Object(t))uj.call(t,e)&&e!="constructor"&&o.push(e);return o}Rx.exports=pj});var Nn=v((G0e,Ox)=>{"use strict";var hj=Go(),fj=Vh();function mj(t){return t!=null&&fj(t.length)&&!hj(t)}Ox.exports=mj});var jn=v((j0e,Fx)=>{"use strict";var _j=G_(),gj=Hh(),bj=Nn();function vj(t){return bj(t)?_j(t):gj(t)}Fx.exports=vj});var Ax=v((U0e,Nx)=>{"use strict";var yj=Wo(),Cj=jn();function xj(t,o){return t&&yj(o,Cj(o),t)}Nx.exports=xj});var Bx=v(($0e,Lx)=>{"use strict";function wj(t){var o=[];if(t!=null)for(var e in Object(t))o.push(e);return o}Lx.exports=wj});var zx=v((W0e,Vx)=>{"use strict";var Tj=Qt(),Sj=Ca(),kj=Bx(),Ij=Object.prototype,Ej=Ij.hasOwnProperty;function Mj(t){if(!Tj(t))return kj(t);var o=Sj(t),e=[];for(var n in t)n=="constructor"&&(o||!Ej.call(t,n))||e.push(n);return e}Vx.exports=Mj});var bi=v((K0e,Hx)=>{"use strict";var Dj=G_(),Pj=zx(),Rj=Nn();function Oj(t){return Rj(t)?Dj(t,!0):Pj(t)}Hx.exports=Oj});var Gx=v((Y0e,qx)=>{"use strict";var Fj=Wo(),Nj=bi();function Aj(t,o){return t&&Fj(o,Nj(o),t)}qx.exports=Aj});var U_=v((xa,Qo)=>{"use strict";var Lj=hn(),Wx=typeof xa=="object"&&xa&&!xa.nodeType&&xa,jx=Wx&&typeof Qo=="object"&&Qo&&!Qo.nodeType&&Qo,Bj=jx&&jx.exports===Wx,Ux=Bj?Lj.Buffer:void 0,$x=Ux?Ux.allocUnsafe:void 0;function Vj(t,o){if(o)return t.slice();var e=t.length,n=$x?$x(e):new t.constructor(e);return t.copy(n),n}Qo.exports=Vj});var $_=v((Z0e,Kx)=>{"use strict";function zj(t,o){var e=-1,n=t.length;for(o||(o=Array(n));++e<n;)o[e]=t[e];return o}Kx.exports=zj});var W_=v((X0e,Yx)=>{"use strict";function Hj(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}Yx.exports=Hj});var K_=v((Q0e,Zx)=>{"use strict";function qj(){return[]}Zx.exports=qj});var qh=v((J0e,Qx)=>{"use strict";var Gj=W_(),jj=K_(),Uj=Object.prototype,$j=Uj.propertyIsEnumerable,Xx=Object.getOwnPropertySymbols,Wj=Xx?function(t){return t==null?[]:(t=Object(t),Gj(Xx(t),function(o){return $j.call(t,o)}))}:jj;Qx.exports=Wj});var ew=v((ebe,Jx)=>{"use strict";var Kj=Wo(),Yj=qh();function Zj(t,o){return Kj(t,Yj(t),o)}Jx.exports=Zj});var Gh=v((tbe,tw)=>{"use strict";function Xj(t,o){for(var e=-1,n=o.length,i=t.length;++e<n;)t[i+e]=o[e];return t}tw.exports=Xj});var wa=v((nbe,nw)=>{"use strict";var Qj=j_(),Jj=Qj(Object.getPrototypeOf,Object);nw.exports=Jj});var Y_=v((ibe,iw)=>{"use strict";var eU=Gh(),tU=wa(),nU=qh(),iU=K_(),oU=Object.getOwnPropertySymbols,rU=oU?function(t){for(var o=[];t;)eU(o,nU(t)),t=tU(t);return o}:iU;iw.exports=rU});var rw=v((obe,ow)=>{"use strict";var aU=Wo(),sU=Y_();function lU(t,o){return aU(t,sU(t),o)}ow.exports=lU});var Z_=v((rbe,aw)=>{"use strict";var cU=Gh(),dU=mt();function uU(t,o,e){var n=o(t);return dU(t)?n:cU(n,e(t))}aw.exports=uU});var X_=v((abe,sw)=>{"use strict";var pU=Z_(),hU=qh(),fU=jn();function mU(t){return pU(t,fU,hU)}sw.exports=mU});var cw=v((sbe,lw)=>{"use strict";var _U=Z_(),gU=Y_(),bU=bi();function vU(t){return _U(t,bU,gU)}lw.exports=vU});var uw=v((lbe,dw)=>{"use strict";var yU=gi(),CU=hn(),xU=yU(CU,"DataView");dw.exports=xU});var hw=v((cbe,pw)=>{"use strict";var wU=gi(),TU=hn(),SU=wU(TU,"Promise");pw.exports=SU});var Q_=v((dbe,fw)=>{"use strict";var kU=gi(),IU=hn(),EU=kU(IU,"Set");fw.exports=EU});var _w=v((ube,mw)=>{"use strict";var MU=gi(),DU=hn(),PU=MU(DU,"WeakMap");mw.exports=PU});var Xi=v((pbe,ww)=>{"use strict";var J_=uw(),eg=Ah(),tg=hw(),ng=Q_(),ig=_w(),xw=_i(),Jo=z_(),gw="[object Map]",RU="[object Object]",bw="[object Promise]",vw="[object Set]",yw="[object WeakMap]",Cw="[object DataView]",OU=Jo(J_),FU=Jo(eg),NU=Jo(tg),AU=Jo(ng),LU=Jo(ig),Zi=xw;(J_&&Zi(new J_(new ArrayBuffer(1)))!=Cw||eg&&Zi(new eg)!=gw||tg&&Zi(tg.resolve())!=bw||ng&&Zi(new ng)!=vw||ig&&Zi(new ig)!=yw)&&(Zi=function(t){var o=xw(t),e=o==RU?t.constructor:void 0,n=e?Jo(e):"";if(n)switch(n){case OU:return Cw;case FU:return gw;case NU:return bw;case AU:return vw;case LU:return yw}return o});ww.exports=Zi});var Sw=v((hbe,Tw)=>{"use strict";var BU=Object.prototype,VU=BU.hasOwnProperty;function zU(t){var o=t.length,e=new t.constructor(o);return o&&typeof t[0]=="string"&&VU.call(t,"index")&&(e.index=t.index,e.input=t.input),e}Tw.exports=zU});var og=v((fbe,kw)=>{"use strict";var HU=hn(),qU=HU.Uint8Array;kw.exports=qU});var jh=v((mbe,Ew)=>{"use strict";var Iw=og();function GU(t){var o=new t.constructor(t.byteLength);return new Iw(o).set(new Iw(t)),o}Ew.exports=GU});var Dw=v((_be,Mw)=>{"use strict";var jU=jh();function UU(t,o){var e=o?jU(t.buffer):t.buffer;return new t.constructor(e,t.byteOffset,t.byteLength)}Mw.exports=UU});var Rw=v((gbe,Pw)=>{"use strict";var $U=/\w*$/;function WU(t){var o=new t.constructor(t.source,$U.exec(t));return o.lastIndex=t.lastIndex,o}Pw.exports=WU});var Lw=v((bbe,Aw)=>{"use strict";var Ow=Ki(),Fw=Ow?Ow.prototype:void 0,Nw=Fw?Fw.valueOf:void 0;function KU(t){return Nw?Object(Nw.call(t)):{}}Aw.exports=KU});var rg=v((vbe,Bw)=>{"use strict";var YU=jh();function ZU(t,o){var e=o?YU(t.buffer):t.buffer;return new t.constructor(e,t.byteOffset,t.length)}Bw.exports=ZU});var zw=v((ybe,Vw)=>{"use strict";var XU=jh(),QU=Dw(),JU=Rw(),e$=Lw(),t$=rg(),n$="[object Boolean]",i$="[object Date]",o$="[object Map]",r$="[object Number]",a$="[object RegExp]",s$="[object Set]",l$="[object String]",c$="[object Symbol]",d$="[object ArrayBuffer]",u$="[object DataView]",p$="[object Float32Array]",h$="[object Float64Array]",f$="[object Int8Array]",m$="[object Int16Array]",_$="[object Int32Array]",g$="[object Uint8Array]",b$="[object Uint8ClampedArray]",v$="[object Uint16Array]",y$="[object Uint32Array]";function C$(t,o,e){var n=t.constructor;switch(o){case d$:return XU(t);case n$:case i$:return new n(+t);case u$:return QU(t,e);case p$:case h$:case f$:case m$:case _$:case g$:case b$:case v$:case y$:return t$(t,e);case o$:return new n;case r$:case l$:return new n(t);case a$:return JU(t);case s$:return new n;case c$:return e$(t)}}Vw.exports=C$});var ag=v((Cbe,qw)=>{"use strict";var x$=Qt(),Hw=Object.create,w$=(function(){function t(){}return function(o){if(!x$(o))return{};if(Hw)return Hw(o);t.prototype=o;var e=new t;return t.prototype=void 0,e}})();qw.exports=w$});var sg=v((xbe,Gw)=>{"use strict";var T$=ag(),S$=wa(),k$=Ca();function I$(t){return typeof t.constructor=="function"&&!k$(t)?T$(S$(t)):{}}Gw.exports=I$});var Uw=v((wbe,jw)=>{"use strict";var E$=Xi(),M$=Tn(),D$="[object Map]";function P$(t){return M$(t)&&E$(t)==D$}jw.exports=P$});var Yw=v((Tbe,Kw)=>{"use strict";var R$=Uw(),O$=ba(),$w=zh(),Ww=$w&&$w.isMap,F$=Ww?O$(Ww):R$;Kw.exports=F$});var Xw=v((Sbe,Zw)=>{"use strict";var N$=Xi(),A$=Tn(),L$="[object Set]";function B$(t){return A$(t)&&N$(t)==L$}Zw.exports=B$});var tT=v((kbe,eT)=>{"use strict";var V$=Xw(),z$=ba(),Qw=zh(),Jw=Qw&&Qw.isSet,H$=Jw?z$(Jw):V$;eT.exports=H$});var lg=v((Ibe,rT)=>{"use strict";var q$=ha(),G$=Bh(),j$=ma(),U$=Ax(),$$=Gx(),W$=U_(),K$=$_(),Y$=ew(),Z$=rw(),X$=X_(),Q$=cw(),J$=Xi(),eW=Sw(),tW=zw(),nW=sg(),iW=mt(),oW=Yi(),rW=Yw(),aW=Qt(),sW=tT(),lW=jn(),cW=bi(),dW=1,uW=2,pW=4,nT="[object Arguments]",hW="[object Array]",fW="[object Boolean]",mW="[object Date]",_W="[object Error]",iT="[object Function]",gW="[object GeneratorFunction]",bW="[object Map]",vW="[object Number]",oT="[object Object]",yW="[object RegExp]",CW="[object Set]",xW="[object String]",wW="[object Symbol]",TW="[object WeakMap]",SW="[object ArrayBuffer]",kW="[object DataView]",IW="[object Float32Array]",EW="[object Float64Array]",MW="[object Int8Array]",DW="[object Int16Array]",PW="[object Int32Array]",RW="[object Uint8Array]",OW="[object Uint8ClampedArray]",FW="[object Uint16Array]",NW="[object Uint32Array]",Xe={};Xe[nT]=Xe[hW]=Xe[SW]=Xe[kW]=Xe[fW]=Xe[mW]=Xe[IW]=Xe[EW]=Xe[MW]=Xe[DW]=Xe[PW]=Xe[bW]=Xe[vW]=Xe[oT]=Xe[yW]=Xe[CW]=Xe[xW]=Xe[wW]=Xe[RW]=Xe[OW]=Xe[FW]=Xe[NW]=!0;Xe[_W]=Xe[iT]=Xe[TW]=!1;function Uh(t,o,e,n,i,r){var a,s=o&dW,c=o&uW,u=o&pW;if(e&&(a=i?e(t,n,i,r):e(t)),a!==void 0)return a;if(!aW(t))return t;var m=iW(t);if(m){if(a=eW(t),!s)return K$(t,a)}else{var g=J$(t),x=g==iT||g==gW;if(oW(t))return W$(t,s);if(g==oT||g==nT||x&&!i){if(a=c||x?{}:nW(t),!s)return c?Z$(t,$$(a,t)):Y$(t,U$(a,t))}else{if(!Xe[g])return i?t:{};a=tW(t,g,s)}}r||(r=new q$);var I=r.get(t);if(I)return I;r.set(t,a),sW(t)?t.forEach(function(j){a.add(Uh(j,o,e,j,t,r))}):rW(t)&&t.forEach(function(j,X){a.set(X,Uh(j,o,e,X,t,r))});var k=u?c?Q$:X$:c?cW:lW,N=m?void 0:k(t);return G$(N||t,function(j,X){N&&(X=j,j=t[X]),j$(a,X,Uh(j,o,e,X,t,r))}),a}rT.exports=Uh});var sT=v((Ebe,aT)=>{"use strict";var AW=lg(),LW=4;function BW(t){return AW(t,LW)}aT.exports=BW});var $h=v((Mbe,lT)=>{"use strict";function VW(t){return function(){return t}}lT.exports=VW});var dT=v((Dbe,cT)=>{"use strict";function zW(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}}cT.exports=zW});var Wh=v((Pbe,uT)=>{"use strict";var HW=dT(),qW=HW();uT.exports=qW});var Kh=v((Rbe,pT)=>{"use strict";var GW=Wh(),jW=jn();function UW(t,o){return t&&GW(t,o,jW)}pT.exports=UW});var fT=v((Obe,hT)=>{"use strict";var $W=Nn();function WW(t,o){return function(e,n){if(e==null)return e;if(!$W(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}}hT.exports=WW});var Ta=v((Fbe,mT)=>{"use strict";var KW=Kh(),YW=fT(),ZW=YW(KW);mT.exports=ZW});var vi=v((Nbe,_T)=>{"use strict";function XW(t){return t}_T.exports=XW});var cg=v((Abe,gT)=>{"use strict";var QW=vi();function JW(t){return typeof t=="function"?t:QW}gT.exports=JW});var dg=v((Lbe,bT)=>{"use strict";var eK=Bh(),tK=Ta(),nK=cg(),iK=mt();function oK(t,o){var e=iK(t)?eK:tK;return e(t,nK(o))}bT.exports=oK});var ug=v((Bbe,vT)=>{"use strict";vT.exports=dg()});var CT=v((Vbe,yT)=>{"use strict";var rK=Ta();function aK(t,o){var e=[];return rK(t,function(n,i,r){o(n,i,r)&&e.push(n)}),e}yT.exports=aK});var wT=v((zbe,xT)=>{"use strict";var sK="__lodash_hash_undefined__";function lK(t){return this.__data__.set(t,sK),this}xT.exports=lK});var ST=v((Hbe,TT)=>{"use strict";function cK(t){return this.__data__.has(t)}TT.exports=cK});var pg=v((qbe,kT)=>{"use strict";var dK=Lh(),uK=wT(),pK=ST();function Yh(t){var o=-1,e=t==null?0:t.length;for(this.__data__=new dK;++o<e;)this.add(t[o])}Yh.prototype.add=Yh.prototype.push=uK;Yh.prototype.has=pK;kT.exports=Yh});var ET=v((Gbe,IT)=>{"use strict";function hK(t,o){for(var e=-1,n=t==null?0:t.length;++e<n;)if(o(t[e],e,t))return!0;return!1}IT.exports=hK});var hg=v((jbe,MT)=>{"use strict";function fK(t,o){return t.has(o)}MT.exports=fK});var fg=v((Ube,DT)=>{"use strict";var mK=pg(),_K=ET(),gK=hg(),bK=1,vK=2;function yK(t,o,e,n,i,r){var a=e&bK,s=t.length,c=o.length;if(s!=c&&!(a&&c>s))return!1;var u=r.get(t),m=r.get(o);if(u&&m)return u==o&&m==t;var g=-1,x=!0,I=e&vK?new mK:void 0;for(r.set(t,o),r.set(o,t);++g<s;){var k=t[g],N=o[g];if(n)var j=a?n(N,k,g,o,t,r):n(k,N,g,t,o,r);if(j!==void 0){if(j)continue;x=!1;break}if(I){if(!_K(o,function(X,ne){if(!gK(I,ne)&&(k===X||i(k,X,e,n,r)))return I.push(ne)})){x=!1;break}}else if(!(k===N||i(k,N,e,n,r))){x=!1;break}}return r.delete(t),r.delete(o),x}DT.exports=yK});var RT=v(($be,PT)=>{"use strict";function CK(t){var o=-1,e=Array(t.size);return t.forEach(function(n,i){e[++o]=[i,n]}),e}PT.exports=CK});var Zh=v((Wbe,OT)=>{"use strict";function xK(t){var o=-1,e=Array(t.size);return t.forEach(function(n){e[++o]=n}),e}OT.exports=xK});var BT=v((Kbe,LT)=>{"use strict";var FT=Ki(),NT=og(),wK=Wi(),TK=fg(),SK=RT(),kK=Zh(),IK=1,EK=2,MK="[object Boolean]",DK="[object Date]",PK="[object Error]",RK="[object Map]",OK="[object Number]",FK="[object RegExp]",NK="[object Set]",AK="[object String]",LK="[object Symbol]",BK="[object ArrayBuffer]",VK="[object DataView]",AT=FT?FT.prototype:void 0,mg=AT?AT.valueOf:void 0;function zK(t,o,e,n,i,r,a){switch(e){case VK:if(t.byteLength!=o.byteLength||t.byteOffset!=o.byteOffset)return!1;t=t.buffer,o=o.buffer;case BK:return!(t.byteLength!=o.byteLength||!r(new NT(t),new NT(o)));case MK:case DK:case OK:return wK(+t,+o);case PK:return t.name==o.name&&t.message==o.message;case FK:case AK:return t==o+"";case RK:var s=SK;case NK:var c=n&IK;if(s||(s=kK),t.size!=o.size&&!c)return!1;var u=a.get(t);if(u)return u==o;n|=EK,a.set(t,o);var m=TK(s(t),s(o),n,i,r,a);return a.delete(t),m;case LK:if(mg)return mg.call(t)==mg.call(o)}return!1}LT.exports=zK});var HT=v((Ybe,zT)=>{"use strict";var VT=X_(),HK=1,qK=Object.prototype,GK=qK.hasOwnProperty;function jK(t,o,e,n,i,r){var a=e&HK,s=VT(t),c=s.length,u=VT(o),m=u.length;if(c!=m&&!a)return!1;for(var g=c;g--;){var x=s[g];if(!(a?x in o:GK.call(o,x)))return!1}var I=r.get(t),k=r.get(o);if(I&&k)return I==o&&k==t;var N=!0;r.set(t,o),r.set(o,t);for(var j=a;++g<c;){x=s[g];var X=t[x],ne=o[x];if(n)var pe=a?n(ne,X,x,o,t,r):n(X,ne,x,t,o,r);if(!(pe===void 0?X===ne||i(X,ne,e,n,r):pe)){N=!1;break}j||(j=x=="constructor")}if(N&&!j){var Oe=t.constructor,Pe=o.constructor;Oe!=Pe&&"constructor"in t&&"constructor"in o&&!(typeof Oe=="function"&&Oe instanceof Oe&&typeof Pe=="function"&&Pe instanceof Pe)&&(N=!1)}return r.delete(t),r.delete(o),N}zT.exports=jK});var YT=v((Zbe,KT)=>{"use strict";var _g=ha(),UK=fg(),$K=BT(),WK=HT(),qT=Xi(),GT=mt(),jT=Yi(),KK=Xo(),YK=1,UT="[object Arguments]",$T="[object Array]",Xh="[object Object]",ZK=Object.prototype,WT=ZK.hasOwnProperty;function XK(t,o,e,n,i,r){var a=GT(t),s=GT(o),c=a?$T:qT(t),u=s?$T:qT(o);c=c==UT?Xh:c,u=u==UT?Xh:u;var m=c==Xh,g=u==Xh,x=c==u;if(x&&jT(t)){if(!jT(o))return!1;a=!0,m=!1}if(x&&!m)return r||(r=new _g),a||KK(t)?UK(t,o,e,n,i,r):$K(t,o,c,e,n,i,r);if(!(e&YK)){var I=m&&WT.call(t,"__wrapped__"),k=g&&WT.call(o,"__wrapped__");if(I||k){var N=I?t.value():t,j=k?o.value():o;return r||(r=new _g),i(N,j,e,n,r)}}return x?(r||(r=new _g),WK(t,o,e,n,i,r)):!1}KT.exports=XK});var gg=v((Xbe,QT)=>{"use strict";var QK=YT(),ZT=Tn();function XT(t,o,e,n,i){return t===o?!0:t==null||o==null||!ZT(t)&&!ZT(o)?t!==t&&o!==o:QK(t,o,e,n,XT,i)}QT.exports=XT});var e2=v((Qbe,JT)=>{"use strict";var JK=ha(),eY=gg(),tY=1,nY=2;function iY(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],m=s[1];if(a&&s[2]){if(u===void 0&&!(c in t))return!1}else{var g=new JK;if(n)var x=n(u,m,c,t,o,g);if(!(x===void 0?eY(m,u,tY|nY,n,g):x))return!1}}return!0}JT.exports=iY});var bg=v((Jbe,t2)=>{"use strict";var oY=Qt();function rY(t){return t===t&&!oY(t)}t2.exports=rY});var i2=v((eve,n2)=>{"use strict";var aY=bg(),sY=jn();function lY(t){for(var o=sY(t),e=o.length;e--;){var n=o[e],i=t[n];o[e]=[n,i,aY(i)]}return o}n2.exports=lY});var vg=v((tve,o2)=>{"use strict";function cY(t,o){return function(e){return e==null?!1:e[t]===o&&(o!==void 0||t in Object(e))}}o2.exports=cY});var a2=v((nve,r2)=>{"use strict";var dY=e2(),uY=i2(),pY=vg();function hY(t){var o=uY(t);return o.length==1&&o[0][2]?pY(o[0][0],o[0][1]):function(e){return e===t||dY(e,t,o)}}r2.exports=hY});var Qi=v((ive,s2)=>{"use strict";var fY=_i(),mY=Tn(),_Y="[object Symbol]";function gY(t){return typeof t=="symbol"||mY(t)&&fY(t)==_Y}s2.exports=gY});var Qh=v((ove,l2)=>{"use strict";var bY=mt(),vY=Qi(),yY=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,CY=/^\w*$/;function xY(t,o){if(bY(t))return!1;var e=typeof t;return e=="number"||e=="symbol"||e=="boolean"||t==null||vY(t)?!0:CY.test(t)||!yY.test(t)||o!=null&&t in Object(o)}l2.exports=xY});var u2=v((rve,d2)=>{"use strict";var c2=Lh(),wY="Expected a function";function yg(t,o){if(typeof t!="function"||o!=null&&typeof o!="function")throw new TypeError(wY);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(yg.Cache||c2),e}yg.Cache=c2;d2.exports=yg});var h2=v((ave,p2)=>{"use strict";var TY=u2(),SY=500;function kY(t){var o=TY(t,function(n){return e.size===SY&&e.clear(),n}),e=o.cache;return o}p2.exports=kY});var m2=v((sve,f2)=>{"use strict";var IY=h2(),EY=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,MY=/\\(\\)?/g,DY=IY(function(t){var o=[];return t.charCodeAt(0)===46&&o.push(""),t.replace(EY,function(e,n,i,r){o.push(i?r.replace(MY,"$1"):n||e)}),o});f2.exports=DY});var Sa=v((lve,_2)=>{"use strict";function PY(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}_2.exports=PY});var x2=v((cve,C2)=>{"use strict";var g2=Ki(),RY=Sa(),OY=mt(),FY=Qi(),NY=1/0,b2=g2?g2.prototype:void 0,v2=b2?b2.toString:void 0;function y2(t){if(typeof t=="string")return t;if(OY(t))return RY(t,y2)+"";if(FY(t))return v2?v2.call(t):"";var o=t+"";return o=="0"&&1/t==-NY?"-0":o}C2.exports=y2});var Cg=v((dve,w2)=>{"use strict";var AY=x2();function LY(t){return t==null?"":AY(t)}w2.exports=LY});var ka=v((uve,T2)=>{"use strict";var BY=mt(),VY=Qh(),zY=m2(),HY=Cg();function qY(t,o){return BY(t)?t:VY(t,o)?[t]:zY(HY(t))}T2.exports=qY});var er=v((pve,S2)=>{"use strict";var GY=Qi(),jY=1/0;function UY(t){if(typeof t=="string"||GY(t))return t;var o=t+"";return o=="0"&&1/t==-jY?"-0":o}S2.exports=UY});var Ia=v((hve,k2)=>{"use strict";var $Y=ka(),WY=er();function KY(t,o){o=$Y(o,t);for(var e=0,n=o.length;t!=null&&e<n;)t=t[WY(o[e++])];return e&&e==n?t:void 0}k2.exports=KY});var E2=v((fve,I2)=>{"use strict";var YY=Ia();function ZY(t,o,e){var n=t==null?void 0:YY(t,o);return n===void 0?e:n}I2.exports=ZY});var D2=v((mve,M2)=>{"use strict";function XY(t,o){return t!=null&&o in Object(t)}M2.exports=XY});var xg=v((_ve,P2)=>{"use strict";var QY=ka(),JY=Ko(),eZ=mt(),tZ=ga(),nZ=Vh(),iZ=er();function oZ(t,o,e){o=QY(o,t);for(var n=-1,i=o.length,r=!1;++n<i;){var a=iZ(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&&nZ(i)&&tZ(a,i)&&(eZ(t)||JY(t)))}P2.exports=oZ});var wg=v((gve,R2)=>{"use strict";var rZ=D2(),aZ=xg();function sZ(t,o){return t!=null&&aZ(t,o,rZ)}R2.exports=sZ});var F2=v((bve,O2)=>{"use strict";var lZ=gg(),cZ=E2(),dZ=wg(),uZ=Qh(),pZ=bg(),hZ=vg(),fZ=er(),mZ=1,_Z=2;function gZ(t,o){return uZ(t)&&pZ(o)?hZ(fZ(t),o):function(e){var n=cZ(e,t);return n===void 0&&n===o?dZ(e,t):lZ(o,n,mZ|_Z)}}O2.exports=gZ});var Tg=v((vve,N2)=>{"use strict";function bZ(t){return function(o){return o?.[t]}}N2.exports=bZ});var L2=v((yve,A2)=>{"use strict";var vZ=Ia();function yZ(t){return function(o){return vZ(o,t)}}A2.exports=yZ});var V2=v((Cve,B2)=>{"use strict";var CZ=Tg(),xZ=L2(),wZ=Qh(),TZ=er();function SZ(t){return wZ(t)?CZ(TZ(t)):xZ(t)}B2.exports=SZ});var An=v((xve,z2)=>{"use strict";var kZ=a2(),IZ=F2(),EZ=vi(),MZ=mt(),DZ=V2();function PZ(t){return typeof t=="function"?t:t==null?EZ:typeof t=="object"?MZ(t)?IZ(t[0],t[1]):kZ(t):DZ(t)}z2.exports=PZ});var Sg=v((wve,H2)=>{"use strict";var RZ=W_(),OZ=CT(),FZ=An(),NZ=mt();function AZ(t,o){var e=NZ(t)?RZ:OZ;return e(t,FZ(o,3))}H2.exports=AZ});var G2=v((Tve,q2)=>{"use strict";var LZ=Object.prototype,BZ=LZ.hasOwnProperty;function VZ(t,o){return t!=null&&BZ.call(t,o)}q2.exports=VZ});var kg=v((Sve,j2)=>{"use strict";var zZ=G2(),HZ=xg();function qZ(t,o){return t!=null&&HZ(t,o,zZ)}j2.exports=qZ});var $2=v((kve,U2)=>{"use strict";var GZ=Hh(),jZ=Xi(),UZ=Ko(),$Z=mt(),WZ=Nn(),KZ=Yi(),YZ=Ca(),ZZ=Xo(),XZ="[object Map]",QZ="[object Set]",JZ=Object.prototype,eX=JZ.hasOwnProperty;function tX(t){if(t==null)return!0;if(WZ(t)&&($Z(t)||typeof t=="string"||typeof t.splice=="function"||KZ(t)||ZZ(t)||UZ(t)))return!t.length;var o=jZ(t);if(o==XZ||o==QZ)return!t.size;if(YZ(t))return!GZ(t).length;for(var e in t)if(eX.call(t,e))return!1;return!0}U2.exports=tX});var Ig=v((Ive,W2)=>{"use strict";function nX(t){return t===void 0}W2.exports=nX});var Eg=v((Eve,K2)=>{"use strict";var iX=Ta(),oX=Nn();function rX(t,o){var e=-1,n=oX(t)?Array(t.length):[];return iX(t,function(i,r,a){n[++e]=o(i,r,a)}),n}K2.exports=rX});var Mg=v((Mve,Y2)=>{"use strict";var aX=Sa(),sX=An(),lX=Eg(),cX=mt();function dX(t,o){var e=cX(t)?aX:lX;return e(t,sX(o,3))}Y2.exports=dX});var X2=v((Dve,Z2)=>{"use strict";function uX(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}Z2.exports=uX});var J2=v((Pve,Q2)=>{"use strict";function pX(t,o,e,n,i){return i(t,function(r,a,s){e=n?(n=!1,r):o(e,r,a,s)}),e}Q2.exports=pX});var Dg=v((Rve,eS)=>{"use strict";var hX=X2(),fX=Ta(),mX=An(),_X=J2(),gX=mt();function bX(t,o,e){var n=gX(t)?hX:_X,i=arguments.length<3;return n(t,mX(o,4),e,i,fX)}eS.exports=bX});var nS=v((Ove,tS)=>{"use strict";var vX=_i(),yX=mt(),CX=Tn(),xX="[object String]";function wX(t){return typeof t=="string"||!yX(t)&&CX(t)&&vX(t)==xX}tS.exports=wX});var oS=v((Fve,iS)=>{"use strict";var TX=Tg(),SX=TX("length");iS.exports=SX});var aS=v((Nve,rS)=>{"use strict";var kX="\\ud800-\\udfff",IX="\\u0300-\\u036f",EX="\\ufe20-\\ufe2f",MX="\\u20d0-\\u20ff",DX=IX+EX+MX,PX="\\ufe0e\\ufe0f",RX="\\u200d",OX=RegExp("["+RX+kX+DX+PX+"]");function FX(t){return OX.test(t)}rS.exports=FX});var mS=v((Ave,fS)=>{"use strict";var lS="\\ud800-\\udfff",NX="\\u0300-\\u036f",AX="\\ufe20-\\ufe2f",LX="\\u20d0-\\u20ff",BX=NX+AX+LX,VX="\\ufe0e\\ufe0f",zX="["+lS+"]",Pg="["+BX+"]",Rg="\\ud83c[\\udffb-\\udfff]",HX="(?:"+Pg+"|"+Rg+")",cS="[^"+lS+"]",dS="(?:\\ud83c[\\udde6-\\uddff]){2}",uS="[\\ud800-\\udbff][\\udc00-\\udfff]",qX="\\u200d",pS=HX+"?",hS="["+VX+"]?",GX="(?:"+qX+"(?:"+[cS,dS,uS].join("|")+")"+hS+pS+")*",jX=hS+pS+GX,UX="(?:"+[cS+Pg+"?",Pg,dS,uS,zX].join("|")+")",sS=RegExp(Rg+"(?="+Rg+")|"+UX+jX,"g");function $X(t){for(var o=sS.lastIndex=0;sS.test(t);)++o;return o}fS.exports=$X});var gS=v((Lve,_S)=>{"use strict";var WX=oS(),KX=aS(),YX=mS();function ZX(t){return KX(t)?YX(t):WX(t)}_S.exports=ZX});var vS=v((Bve,bS)=>{"use strict";var XX=Hh(),QX=Xi(),JX=Nn(),eQ=nS(),tQ=gS(),nQ="[object Map]",iQ="[object Set]";function oQ(t){if(t==null)return 0;if(JX(t))return eQ(t)?tQ(t):t.length;var o=QX(t);return o==nQ||o==iQ?t.size:XX(t).length}bS.exports=oQ});var CS=v((Vve,yS)=>{"use strict";var rQ=Bh(),aQ=ag(),sQ=Kh(),lQ=An(),cQ=wa(),dQ=mt(),uQ=Yi(),pQ=Go(),hQ=Qt(),fQ=Xo();function mQ(t,o,e){var n=dQ(t),i=n||uQ(t)||fQ(t);if(o=lQ(o,4),e==null){var r=t&&t.constructor;i?e=n?new r:[]:hQ(t)?e=pQ(r)?aQ(cQ(t)):{}:e={}}return(i?rQ:sQ)(t,function(a,s,c){return o(e,a,s,c)}),e}yS.exports=mQ});var SS=v((zve,TS)=>{"use strict";var xS=Ki(),_Q=Ko(),gQ=mt(),wS=xS?xS.isConcatSpreadable:void 0;function bQ(t){return gQ(t)||_Q(t)||!!(wS&&t&&t[wS])}TS.exports=bQ});var Jh=v((Hve,IS)=>{"use strict";var vQ=Gh(),yQ=SS();function kS(t,o,e,n,i){var r=-1,a=t.length;for(e||(e=yQ),i||(i=[]);++r<a;){var s=t[r];o>0&&e(s)?o>1?kS(s,o-1,e,n,i):vQ(i,s):n||(i[i.length]=s)}return i}IS.exports=kS});var MS=v((qve,ES)=>{"use strict";function CQ(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)}ES.exports=CQ});var Og=v((Gve,PS)=>{"use strict";var xQ=MS(),DS=Math.max;function wQ(t,o,e){return o=DS(o===void 0?t.length-1:o,0),function(){for(var n=arguments,i=-1,r=DS(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),xQ(t,this,s)}}PS.exports=wQ});var FS=v((jve,OS)=>{"use strict";var TQ=$h(),RS=H_(),SQ=vi(),kQ=RS?function(t,o){return RS(t,"toString",{configurable:!0,enumerable:!1,value:TQ(o),writable:!0})}:SQ;OS.exports=kQ});var AS=v((Uve,NS)=>{"use strict";var IQ=800,EQ=16,MQ=Date.now;function DQ(t){var o=0,e=0;return function(){var n=MQ(),i=EQ-(n-e);if(e=n,i>0){if(++o>=IQ)return arguments[0]}else o=0;return t.apply(void 0,arguments)}}NS.exports=DQ});var Fg=v(($ve,LS)=>{"use strict";var PQ=FS(),RQ=AS(),OQ=RQ(PQ);LS.exports=OQ});var Ea=v((Wve,BS)=>{"use strict";var FQ=vi(),NQ=Og(),AQ=Fg();function LQ(t,o){return AQ(NQ(t,o,FQ),t+"")}BS.exports=LQ});var Ng=v((Kve,VS)=>{"use strict";function BQ(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}VS.exports=BQ});var HS=v((Yve,zS)=>{"use strict";function VQ(t){return t!==t}zS.exports=VQ});var GS=v((Zve,qS)=>{"use strict";function zQ(t,o,e){for(var n=e-1,i=t.length;++n<i;)if(t[n]===o)return n;return-1}qS.exports=zQ});var US=v((Xve,jS)=>{"use strict";var HQ=Ng(),qQ=HS(),GQ=GS();function jQ(t,o,e){return o===o?GQ(t,o,e):HQ(t,qQ,e)}jS.exports=jQ});var WS=v((Qve,$S)=>{"use strict";var UQ=US();function $Q(t,o){var e=t==null?0:t.length;return!!e&&UQ(t,o,0)>-1}$S.exports=$Q});var YS=v((Jve,KS)=>{"use strict";function WQ(t,o,e){for(var n=-1,i=t==null?0:t.length;++n<i;)if(e(o,t[n]))return!0;return!1}KS.exports=WQ});var XS=v((eye,ZS)=>{"use strict";function KQ(){}ZS.exports=KQ});var JS=v((tye,QS)=>{"use strict";var Ag=Q_(),YQ=XS(),ZQ=Zh(),XQ=1/0,QQ=Ag&&1/ZQ(new Ag([,-0]))[1]==XQ?function(t){return new Ag(t)}:YQ;QS.exports=QQ});var tk=v((nye,ek)=>{"use strict";var JQ=pg(),eJ=WS(),tJ=YS(),nJ=hg(),iJ=JS(),oJ=Zh(),rJ=200;function aJ(t,o,e){var n=-1,i=eJ,r=t.length,a=!0,s=[],c=s;if(e)a=!1,i=tJ;else if(r>=rJ){var u=o?null:iJ(t);if(u)return oJ(u);a=!1,i=nJ,c=new JQ}else c=o?[]:s;e:for(;++n<r;){var m=t[n],g=o?o(m):m;if(m=e||m!==0?m:0,a&&g===g){for(var x=c.length;x--;)if(c[x]===g)continue e;o&&c.push(g),s.push(m)}else i(c,g,e)||(c!==s&&c.push(g),s.push(m))}return s}ek.exports=aJ});var Lg=v((iye,nk)=>{"use strict";var sJ=Nn(),lJ=Tn();function cJ(t){return lJ(t)&&sJ(t)}nk.exports=cJ});var ok=v((oye,ik)=>{"use strict";var dJ=Jh(),uJ=Ea(),pJ=tk(),hJ=Lg(),fJ=uJ(function(t){return pJ(dJ(t,1,hJ,!0))});ik.exports=fJ});var ak=v((rye,rk)=>{"use strict";var mJ=Sa();function _J(t,o){return mJ(o,function(e){return t[e]})}rk.exports=_J});var Bg=v((aye,sk)=>{"use strict";var gJ=ak(),bJ=jn();function vJ(t){return t==null?[]:gJ(t,bJ(t))}sk.exports=vJ});var Jt=v((sye,lk)=>{"use strict";var ef;if(typeof no=="function")try{ef={clone:sT(),constant:$h(),each:ug(),filter:Sg(),has:kg(),isArray:mt(),isEmpty:$2(),isFunction:Go(),isUndefined:Ig(),keys:jn(),map:Mg(),reduce:Dg(),size:vS(),transform:CS(),union:ok(),values:Bg()}}catch{}ef||(ef=window._);lk.exports=ef});var tf=v((cye,pk)=>{"use strict";var xe=Jt();pk.exports=Re;var yJ="\0",Ji="\0",ck="";function Re(t){this._isDirected=xe.has(t,"directed")?t.directed:!0,this._isMultigraph=xe.has(t,"multigraph")?t.multigraph:!1,this._isCompound=xe.has(t,"compound")?t.compound:!1,this._label=void 0,this._defaultNodeLabelFn=xe.constant(void 0),this._defaultEdgeLabelFn=xe.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[Ji]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}Re.prototype._nodeCount=0;Re.prototype._edgeCount=0;Re.prototype.isDirected=function(){return this._isDirected};Re.prototype.isMultigraph=function(){return this._isMultigraph};Re.prototype.isCompound=function(){return this._isCompound};Re.prototype.setGraph=function(t){return this._label=t,this};Re.prototype.graph=function(){return this._label};Re.prototype.setDefaultNodeLabel=function(t){return xe.isFunction(t)||(t=xe.constant(t)),this._defaultNodeLabelFn=t,this};Re.prototype.nodeCount=function(){return this._nodeCount};Re.prototype.nodes=function(){return xe.keys(this._nodes)};Re.prototype.sources=function(){var t=this;return xe.filter(this.nodes(),function(o){return xe.isEmpty(t._in[o])})};Re.prototype.sinks=function(){var t=this;return xe.filter(this.nodes(),function(o){return xe.isEmpty(t._out[o])})};Re.prototype.setNodes=function(t,o){var e=arguments,n=this;return xe.each(t,function(i){e.length>1?n.setNode(i,o):n.setNode(i)}),this};Re.prototype.setNode=function(t,o){return xe.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]=Ji,this._children[t]={},this._children[Ji][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)};Re.prototype.node=function(t){return this._nodes[t]};Re.prototype.hasNode=function(t){return xe.has(this._nodes,t)};Re.prototype.removeNode=function(t){var o=this;if(xe.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],xe.each(this.children(t),function(n){o.setParent(n)}),delete this._children[t]),xe.each(xe.keys(this._in[t]),e),delete this._in[t],delete this._preds[t],xe.each(xe.keys(this._out[t]),e),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this};Re.prototype.setParent=function(t,o){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(xe.isUndefined(o))o=Ji;else{o+="";for(var e=o;!xe.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};Re.prototype._removeFromParentsChildList=function(t){delete this._children[this._parent[t]][t]};Re.prototype.parent=function(t){if(this._isCompound){var o=this._parent[t];if(o!==Ji)return o}};Re.prototype.children=function(t){if(xe.isUndefined(t)&&(t=Ji),this._isCompound){var o=this._children[t];if(o)return xe.keys(o)}else{if(t===Ji)return this.nodes();if(this.hasNode(t))return[]}};Re.prototype.predecessors=function(t){var o=this._preds[t];if(o)return xe.keys(o)};Re.prototype.successors=function(t){var o=this._sucs[t];if(o)return xe.keys(o)};Re.prototype.neighbors=function(t){var o=this.predecessors(t);if(o)return xe.union(o,this.successors(t))};Re.prototype.isLeaf=function(t){var o;return this.isDirected()?o=this.successors(t):o=this.neighbors(t),o.length===0};Re.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;xe.each(this._nodes,function(r,a){t(a)&&o.setNode(a,r)}),xe.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&&xe.each(o.nodes(),function(r){o.setParent(r,i(r))}),o};Re.prototype.setDefaultEdgeLabel=function(t){return xe.isFunction(t)||(t=xe.constant(t)),this._defaultEdgeLabelFn=t,this};Re.prototype.edgeCount=function(){return this._edgeCount};Re.prototype.edges=function(){return xe.values(this._edgeObjs)};Re.prototype.setPath=function(t,o){var e=this,n=arguments;return xe.reduce(t,function(i,r){return n.length>1?e.setEdge(i,r,o):e.setEdge(i,r),r}),this};Re.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,xe.isUndefined(e)||(e=""+e);var a=Ma(this._isDirected,t,o,e);if(xe.has(this._edgeLabels,a))return i&&(this._edgeLabels[a]=n),this;if(!xe.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=CJ(this._isDirected,t,o,e);return t=s.v,o=s.w,Object.freeze(s),this._edgeObjs[a]=s,dk(this._preds[o],t),dk(this._sucs[t],o),this._in[o][a]=s,this._out[t][a]=s,this._edgeCount++,this};Re.prototype.edge=function(t,o,e){var n=arguments.length===1?Vg(this._isDirected,arguments[0]):Ma(this._isDirected,t,o,e);return this._edgeLabels[n]};Re.prototype.hasEdge=function(t,o,e){var n=arguments.length===1?Vg(this._isDirected,arguments[0]):Ma(this._isDirected,t,o,e);return xe.has(this._edgeLabels,n)};Re.prototype.removeEdge=function(t,o,e){var n=arguments.length===1?Vg(this._isDirected,arguments[0]):Ma(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],uk(this._preds[o],t),uk(this._sucs[t],o),delete this._in[o][n],delete this._out[t][n],this._edgeCount--),this};Re.prototype.inEdges=function(t,o){var e=this._in[t];if(e){var n=xe.values(e);return o?xe.filter(n,function(i){return i.v===o}):n}};Re.prototype.outEdges=function(t,o){var e=this._out[t];if(e){var n=xe.values(e);return o?xe.filter(n,function(i){return i.w===o}):n}};Re.prototype.nodeEdges=function(t,o){var e=this.inEdges(t,o);if(e)return e.concat(this.outEdges(t,o))};function dk(t,o){t[o]?t[o]++:t[o]=1}function uk(t,o){--t[o]||delete t[o]}function Ma(t,o,e,n){var i=""+o,r=""+e;if(!t&&i>r){var a=i;i=r,r=a}return i+ck+r+ck+(xe.isUndefined(n)?yJ:n)}function CJ(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 Vg(t,o){return Ma(t,o.v,o.w,o.name)}});var fk=v((dye,hk)=>{"use strict";hk.exports="2.1.8"});var _k=v((uye,mk)=>{"use strict";mk.exports={Graph:tf(),version:fk()}});var bk=v((pye,gk)=>{"use strict";var Ln=Jt(),xJ=tf();gk.exports={write:wJ,read:kJ};function wJ(t){var o={options:{directed:t.isDirected(),multigraph:t.isMultigraph(),compound:t.isCompound()},nodes:TJ(t),edges:SJ(t)};return Ln.isUndefined(t.graph())||(o.value=Ln.clone(t.graph())),o}function TJ(t){return Ln.map(t.nodes(),function(o){var e=t.node(o),n=t.parent(o),i={v:o};return Ln.isUndefined(e)||(i.value=e),Ln.isUndefined(n)||(i.parent=n),i})}function SJ(t){return Ln.map(t.edges(),function(o){var e=t.edge(o),n={v:o.v,w:o.w};return Ln.isUndefined(o.name)||(n.name=o.name),Ln.isUndefined(e)||(n.value=e),n})}function kJ(t){var o=new xJ(t.options).setGraph(t.value);return Ln.each(t.nodes,function(e){o.setNode(e.v,e.value),e.parent&&o.setParent(e.v,e.parent)}),Ln.each(t.edges,function(e){o.setEdge({v:e.v,w:e.w,name:e.name},e.value)}),o}});var yk=v((hye,vk)=>{"use strict";var nf=Jt();vk.exports=IJ;function IJ(t){var o={},e=[],n;function i(r){nf.has(o,r)||(o[r]=!0,n.push(r),nf.each(t.successors(r),i),nf.each(t.predecessors(r),i))}return nf.each(t.nodes(),function(r){n=[],i(r),n.length&&e.push(n)}),e}});var zg=v((fye,xk)=>{"use strict";var Ck=Jt();xk.exports=fn;function fn(){this._arr=[],this._keyIndices={}}fn.prototype.size=function(){return this._arr.length};fn.prototype.keys=function(){return this._arr.map(function(t){return t.key})};fn.prototype.has=function(t){return Ck.has(this._keyIndices,t)};fn.prototype.priority=function(t){var o=this._keyIndices[t];if(o!==void 0)return this._arr[o].priority};fn.prototype.min=function(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key};fn.prototype.add=function(t,o){var e=this._keyIndices;if(t=String(t),!Ck.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};fn.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};fn.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)};fn.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)))};fn.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};fn.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 Hg=v((mye,wk)=>{"use strict";var EJ=Jt(),MJ=zg();wk.exports=PJ;var DJ=EJ.constant(1);function PJ(t,o,e,n){return RJ(t,String(o),e||DJ,n||function(i){return t.outEdges(i)})}function RJ(t,o,e,n){var i={},r=new MJ,a,s,c=function(u){var m=u.v!==a?u.v:u.w,g=i[m],x=e(u),I=s.distance+x;if(x<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+u+" Weight: "+x);I<g.distance&&(g.distance=I,g.predecessor=a,r.decrease(m,I))};for(t.nodes().forEach(function(u){var m=u===o?0:Number.POSITIVE_INFINITY;i[u]={distance:m},r.add(u,m)});r.size()>0&&(a=r.removeMin(),s=i[a],s.distance!==Number.POSITIVE_INFINITY);)n(a).forEach(c);return i}});var Sk=v((_ye,Tk)=>{"use strict";var OJ=Hg(),FJ=Jt();Tk.exports=NJ;function NJ(t,o,e){return FJ.transform(t.nodes(),function(n,i){n[i]=OJ(t,i,o,e)},{})}});var qg=v((gye,Ik)=>{"use strict";var kk=Jt();Ik.exports=AJ;function AJ(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(m){kk.has(n,m)?n[m].onStack&&(s.lowlink=Math.min(s.lowlink,n[m].index)):(r(m),s.lowlink=Math.min(s.lowlink,n[m].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){kk.has(n,a)||r(a)}),i}});var Mk=v((bye,Ek)=>{"use strict";var LJ=Jt(),BJ=qg();Ek.exports=VJ;function VJ(t){return LJ.filter(BJ(t),function(o){return o.length>1||o.length===1&&t.hasEdge(o[0],o[0])})}});var Pk=v((vye,Dk)=>{"use strict";var zJ=Jt();Dk.exports=qJ;var HJ=zJ.constant(1);function qJ(t,o,e){return GJ(t,o||HJ,e||function(n){return t.outEdges(n)})}function GJ(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 m=c[r],g=a[u],x=c[u],I=m.distance+g.distance;I<x.distance&&(x.distance=I,x.predecessor=g.predecessor)})})}),n}});var Gg=v((yye,Ok)=>{"use strict";var Da=Jt();Ok.exports=Rk;Rk.CycleException=of;function Rk(t){var o={},e={},n=[];function i(r){if(Da.has(e,r))throw new of;Da.has(o,r)||(e[r]=!0,o[r]=!0,Da.each(t.predecessors(r),i),delete e[r],n.push(r))}if(Da.each(t.sinks(),i),Da.size(o)!==t.nodeCount())throw new of;return n}function of(){}of.prototype=new Error});var Ak=v((Cye,Nk)=>{"use strict";var Fk=Gg();Nk.exports=jJ;function jJ(t){try{Fk(t)}catch(o){if(o instanceof Fk.CycleException)return!1;throw o}return!0}});var jg=v((xye,Bk)=>{"use strict";var rf=Jt();Bk.exports=UJ;function UJ(t,o,e){rf.isArray(o)||(o=[o]);var n=(t.isDirected()?t.successors:t.neighbors).bind(t),i=[],r={};return rf.each(o,function(a){if(!t.hasNode(a))throw new Error("Graph does not have node: "+a);Lk(t,a,e==="post",r,n,i)}),i}function Lk(t,o,e,n,i,r){rf.has(n,o)||(n[o]=!0,e||r.push(o),rf.each(i(o),function(a){Lk(t,a,e,n,i,r)}),e&&r.push(o))}});var zk=v((wye,Vk)=>{"use strict";var $J=jg();Vk.exports=WJ;function WJ(t,o){return $J(t,o,"post")}});var qk=v((Tye,Hk)=>{"use strict";var KJ=jg();Hk.exports=YJ;function YJ(t,o){return KJ(t,o,"pre")}});var Uk=v((Sye,jk)=>{"use strict";var Gk=Jt(),ZJ=tf(),XJ=zg();jk.exports=QJ;function QJ(t,o){var e=new ZJ,n={},i=new XJ,r;function a(c){var u=c.v===r?c.w:c.v,m=i.priority(u);if(m!==void 0){var g=o(c);g<m&&(n[u]=r,i.decrease(u,g))}}if(t.nodeCount()===0)return e;Gk.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(),Gk.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 Wk=v((kye,$k)=>{"use strict";$k.exports={components:yk(),dijkstra:Hg(),dijkstraAll:Sk(),findCycles:Mk(),floydWarshall:Pk(),isAcyclic:Ak(),postorder:zk(),preorder:qk(),prim:Uk(),tarjan:qg(),topsort:Gg()}});var Zk=v((Iye,Yk)=>{"use strict";var Kk=_k();Yk.exports={Graph:Kk.Graph,json:bk(),alg:Wk(),version:Kk.version}});var mn=v((Eye,Xk)=>{"use strict";var af;if(typeof no=="function")try{af=Zk()}catch{}af||(af=window.graphlib);Xk.exports=af});var Jk=v((Dye,Qk)=>{"use strict";var JJ=lg(),eee=1,tee=4;function nee(t){return JJ(t,eee|tee)}Qk.exports=nee});var Pa=v((Pye,eI)=>{"use strict";var iee=Wi(),oee=Nn(),ree=ga(),aee=Qt();function see(t,o,e){if(!aee(e))return!1;var n=typeof o;return(n=="number"?oee(e)&&ree(o,e.length):n=="string"&&o in e)?iee(e[o],t):!1}eI.exports=see});var iI=v((Rye,nI)=>{"use strict";var lee=Ea(),cee=Wi(),dee=Pa(),uee=bi(),tI=Object.prototype,pee=tI.hasOwnProperty,hee=lee(function(t,o){t=Object(t);var e=-1,n=o.length,i=n>2?o[2]:void 0;for(i&&dee(o[0],o[1],i)&&(n=1);++e<n;)for(var r=o[e],a=uee(r),s=-1,c=a.length;++s<c;){var u=a[s],m=t[u];(m===void 0||cee(m,tI[u])&&!pee.call(t,u))&&(t[u]=r[u])}return t});nI.exports=hee});var rI=v((Oye,oI)=>{"use strict";var fee=An(),mee=Nn(),_ee=jn();function gee(t){return function(o,e,n){var i=Object(o);if(!mee(o)){var r=fee(e,3);o=_ee(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}}oI.exports=gee});var sI=v((Fye,aI)=>{"use strict";var bee=/\s/;function vee(t){for(var o=t.length;o--&&bee.test(t.charAt(o)););return o}aI.exports=vee});var cI=v((Nye,lI)=>{"use strict";var yee=sI(),Cee=/^\s+/;function xee(t){return t&&t.slice(0,yee(t)+1).replace(Cee,"")}lI.exports=xee});var hI=v((Aye,pI)=>{"use strict";var wee=cI(),dI=Qt(),Tee=Qi(),uI=NaN,See=/^[-+]0x[0-9a-f]+$/i,kee=/^0b[01]+$/i,Iee=/^0o[0-7]+$/i,Eee=parseInt;function Mee(t){if(typeof t=="number")return t;if(Tee(t))return uI;if(dI(t)){var o=typeof t.valueOf=="function"?t.valueOf():t;t=dI(o)?o+"":o}if(typeof t!="string")return t===0?t:+t;t=wee(t);var e=kee.test(t);return e||Iee.test(t)?Eee(t.slice(2),e?2:8):See.test(t)?uI:+t}pI.exports=Mee});var Ug=v((Lye,mI)=>{"use strict";var Dee=hI(),fI=1/0,Pee=17976931348623157e292;function Ree(t){if(!t)return t===0?t:0;if(t=Dee(t),t===fI||t===-fI){var o=t<0?-1:1;return o*Pee}return t===t?t:0}mI.exports=Ree});var gI=v((Bye,_I)=>{"use strict";var Oee=Ug();function Fee(t){var o=Oee(t),e=o%1;return o===o?e?o-e:o:0}_I.exports=Fee});var vI=v((Vye,bI)=>{"use strict";var Nee=Ng(),Aee=An(),Lee=gI(),Bee=Math.max;function Vee(t,o,e){var n=t==null?0:t.length;if(!n)return-1;var i=e==null?0:Lee(e);return i<0&&(i=Bee(n+i,0)),Nee(t,Aee(o,3),i)}bI.exports=Vee});var CI=v((zye,yI)=>{"use strict";var zee=rI(),Hee=vI(),qee=zee(Hee);yI.exports=qee});var $g=v((Hye,xI)=>{"use strict";var Gee=Jh();function jee(t){var o=t==null?0:t.length;return o?Gee(t,1):[]}xI.exports=jee});var TI=v((qye,wI)=>{"use strict";var Uee=Wh(),$ee=cg(),Wee=bi();function Kee(t,o){return t==null?t:Uee(t,$ee(o),Wee)}wI.exports=Kee});var kI=v((Gye,SI)=>{"use strict";function Yee(t){var o=t==null?0:t.length;return o?t[o-1]:void 0}SI.exports=Yee});var EI=v((jye,II)=>{"use strict";var Zee=fa(),Xee=Kh(),Qee=An();function Jee(t,o){var e={};return o=Qee(o,3),Xee(t,function(n,i,r){Zee(e,i,o(n,i,r))}),e}II.exports=Jee});var sf=v((Uye,MI)=>{"use strict";var ete=Qi();function tte(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&&!ete(a):e(a,s)))var s=a,c=r}return c}MI.exports=tte});var PI=v(($ye,DI)=>{"use strict";function nte(t,o){return t>o}DI.exports=nte});var OI=v((Wye,RI)=>{"use strict";var ite=sf(),ote=PI(),rte=vi();function ate(t){return t&&t.length?ite(t,rte,ote):void 0}RI.exports=ate});var Wg=v((Kye,FI)=>{"use strict";var ste=fa(),lte=Wi();function cte(t,o,e){(e!==void 0&&!lte(t[o],e)||e===void 0&&!(o in t))&&ste(t,o,e)}FI.exports=cte});var LI=v((Yye,AI)=>{"use strict";var dte=_i(),ute=wa(),pte=Tn(),hte="[object Object]",fte=Function.prototype,mte=Object.prototype,NI=fte.toString,_te=mte.hasOwnProperty,gte=NI.call(Object);function bte(t){if(!pte(t)||dte(t)!=hte)return!1;var o=ute(t);if(o===null)return!0;var e=_te.call(o,"constructor")&&o.constructor;return typeof e=="function"&&e instanceof e&&NI.call(e)==gte}AI.exports=bte});var Kg=v((Zye,BI)=>{"use strict";function vte(t,o){if(!(o==="constructor"&&typeof t[o]=="function")&&o!="__proto__")return t[o]}BI.exports=vte});var zI=v((Xye,VI)=>{"use strict";var yte=Wo(),Cte=bi();function xte(t){return yte(t,Cte(t))}VI.exports=xte});var $I=v((Qye,UI)=>{"use strict";var HI=Wg(),wte=U_(),Tte=rg(),Ste=$_(),kte=sg(),qI=Ko(),GI=mt(),Ite=Lg(),Ete=Yi(),Mte=Go(),Dte=Qt(),Pte=LI(),Rte=Xo(),jI=Kg(),Ote=zI();function Fte(t,o,e,n,i,r,a){var s=jI(t,e),c=jI(o,e),u=a.get(c);if(u){HI(t,e,u);return}var m=r?r(s,c,e+"",t,o,a):void 0,g=m===void 0;if(g){var x=GI(c),I=!x&&Ete(c),k=!x&&!I&&Rte(c);m=c,x||I||k?GI(s)?m=s:Ite(s)?m=Ste(s):I?(g=!1,m=wte(c,!0)):k?(g=!1,m=Tte(c,!0)):m=[]:Pte(c)||qI(c)?(m=s,qI(s)?m=Ote(s):(!Dte(s)||Mte(s))&&(m=kte(c))):g=!1}g&&(a.set(c,m),i(m,c,n,r,a),a.delete(c)),HI(t,e,m)}UI.exports=Fte});var YI=v((Jye,KI)=>{"use strict";var Nte=ha(),Ate=Wg(),Lte=Wh(),Bte=$I(),Vte=Qt(),zte=bi(),Hte=Kg();function WI(t,o,e,n,i){t!==o&&Lte(o,function(r,a){if(i||(i=new Nte),Vte(r))Bte(t,o,a,e,WI,n,i);else{var s=n?n(Hte(t,a),r,a+"",t,o,i):void 0;s===void 0&&(s=r),Ate(t,a,s)}},zte)}KI.exports=WI});var XI=v((eCe,ZI)=>{"use strict";var qte=Ea(),Gte=Pa();function jte(t){return qte(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&&Gte(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})}ZI.exports=jte});var JI=v((tCe,QI)=>{"use strict";var Ute=YI(),$te=XI(),Wte=$te(function(t,o,e){Ute(t,o,e)});QI.exports=Wte});var Yg=v((nCe,eE)=>{"use strict";function Kte(t,o){return t<o}eE.exports=Kte});var nE=v((iCe,tE)=>{"use strict";var Yte=sf(),Zte=Yg(),Xte=vi();function Qte(t){return t&&t.length?Yte(t,Xte,Zte):void 0}tE.exports=Qte});var oE=v((oCe,iE)=>{"use strict";var Jte=sf(),ene=An(),tne=Yg();function nne(t,o){return t&&t.length?Jte(t,ene(o,2),tne):void 0}iE.exports=nne});var aE=v((rCe,rE)=>{"use strict";var ine=hn(),one=function(){return ine.Date.now()};rE.exports=one});var cE=v((aCe,lE)=>{"use strict";var rne=ma(),ane=ka(),sne=ga(),sE=Qt(),lne=er();function cne(t,o,e,n){if(!sE(t))return t;o=ane(o,t);for(var i=-1,r=o.length,a=r-1,s=t;s!=null&&++i<r;){var c=lne(o[i]),u=e;if(c==="__proto__"||c==="constructor"||c==="prototype")return t;if(i!=a){var m=s[c];u=n?n(m,c,s):void 0,u===void 0&&(u=sE(m)?m:sne(o[i+1])?[]:{})}rne(s,c,u),s=s[c]}return t}lE.exports=cne});var uE=v((sCe,dE)=>{"use strict";var dne=Ia(),une=cE(),pne=ka();function hne(t,o,e){for(var n=-1,i=o.length,r={};++n<i;){var a=o[n],s=dne(t,a);e(s,a)&&une(r,pne(a,t),s)}return r}dE.exports=hne});var hE=v((lCe,pE)=>{"use strict";var fne=uE(),mne=wg();function _ne(t,o){return fne(t,o,function(e,n){return mne(t,n)})}pE.exports=_ne});var mE=v((cCe,fE)=>{"use strict";var gne=$g(),bne=Og(),vne=Fg();function yne(t){return vne(bne(t,void 0,gne),t+"")}fE.exports=yne});var gE=v((dCe,_E)=>{"use strict";var Cne=hE(),xne=mE(),wne=xne(function(t,o){return t==null?{}:Cne(t,o)});_E.exports=wne});var vE=v((uCe,bE)=>{"use strict";var Tne=Math.ceil,Sne=Math.max;function kne(t,o,e,n){for(var i=-1,r=Sne(Tne((o-t)/(e||1)),0),a=Array(r);r--;)a[n?r:++i]=t,t+=e;return a}bE.exports=kne});var CE=v((pCe,yE)=>{"use strict";var Ine=vE(),Ene=Pa(),Zg=Ug();function Mne(t){return function(o,e,n){return n&&typeof n!="number"&&Ene(o,e,n)&&(e=n=void 0),o=Zg(o),e===void 0?(e=o,o=0):e=Zg(e),n=n===void 0?o<e?1:-1:Zg(n),Ine(o,e,n,t)}}yE.exports=Mne});var wE=v((hCe,xE)=>{"use strict";var Dne=CE(),Pne=Dne();xE.exports=Pne});var SE=v((fCe,TE)=>{"use strict";function Rne(t,o){var e=t.length;for(t.sort(o);e--;)t[e]=t[e].value;return t}TE.exports=Rne});var EE=v((mCe,IE)=>{"use strict";var kE=Qi();function One(t,o){if(t!==o){var e=t!==void 0,n=t===null,i=t===t,r=kE(t),a=o!==void 0,s=o===null,c=o===o,u=kE(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}IE.exports=One});var DE=v((_Ce,ME)=>{"use strict";var Fne=EE();function Nne(t,o,e){for(var n=-1,i=t.criteria,r=o.criteria,a=i.length,s=e.length;++n<a;){var c=Fne(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}ME.exports=Nne});var RE=v((gCe,PE)=>{"use strict";var Xg=Sa(),Ane=Ia(),Lne=An(),Bne=Eg(),Vne=SE(),zne=ba(),Hne=DE(),qne=vi(),Gne=mt();function jne(t,o,e){o.length?o=Xg(o,function(r){return Gne(r)?function(a){return Ane(a,r.length===1?r[0]:r)}:r}):o=[qne];var n=-1;o=Xg(o,zne(Lne));var i=Bne(t,function(r,a,s){var c=Xg(o,function(u){return u(r)});return{criteria:c,index:++n,value:r}});return Vne(i,function(r,a){return Hne(r,a,e)})}PE.exports=jne});var NE=v((bCe,FE)=>{"use strict";var Une=Jh(),$ne=RE(),Wne=Ea(),OE=Pa(),Kne=Wne(function(t,o){if(t==null)return[];var e=o.length;return e>1&&OE(t,o[0],o[1])?o=[]:e>2&&OE(o[0],o[1],o[2])&&(o=[o[0]]),$ne(t,Une(o,1),[])});FE.exports=Kne});var LE=v((vCe,AE)=>{"use strict";var Yne=Cg(),Zne=0;function Xne(t){var o=++Zne;return Yne(t)+o}AE.exports=Xne});var VE=v((yCe,BE)=>{"use strict";function Qne(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}BE.exports=Qne});var HE=v((CCe,zE)=>{"use strict";var Jne=ma(),eie=VE();function tie(t,o){return eie(t||[],o||[],Jne)}zE.exports=tie});var et=v((xCe,qE)=>{"use strict";var lf;if(typeof no=="function")try{lf={cloneDeep:Jk(),constant:$h(),defaults:iI(),each:ug(),filter:Sg(),find:CI(),flatten:$g(),forEach:dg(),forIn:TI(),has:kg(),isUndefined:Ig(),last:kI(),map:Mg(),mapValues:EI(),max:OI(),merge:JI(),min:nE(),minBy:oE(),now:aE(),pick:gE(),range:wE(),reduce:Dg(),sortBy:NE(),uniqueId:LE(),values:Bg(),zipObject:HE()}}catch{}lf||(lf=window._);qE.exports=lf});var UE=v((TCe,jE)=>{"use strict";jE.exports=cf;function cf(){var t={};t._next=t._prev=t,this._sentinel=t}cf.prototype.dequeue=function(){var t=this._sentinel,o=t._prev;if(o!==t)return GE(o),o};cf.prototype.enqueue=function(t){var o=this._sentinel;t._prev&&t._next&&GE(t),t._next=o._next,o._next._prev=t,o._next=t,t._prev=o};cf.prototype.toString=function(){for(var t=[],o=this._sentinel,e=o._prev;e!==o;)t.push(JSON.stringify(e,nie)),e=e._prev;return"["+t.join(", ")+"]"};function GE(t){t._prev._next=t._next,t._next._prev=t._prev,delete t._next,delete t._prev}function nie(t,o){if(t!=="_next"&&t!=="_prev")return o}});var WE=v((SCe,$E)=>{"use strict";var Un=et(),iie=mn().Graph,oie=UE();$E.exports=aie;var rie=Un.constant(1);function aie(t,o){if(t.nodeCount()<=1)return[];var e=lie(t,o||rie),n=sie(e.graph,e.buckets,e.zeroIdx);return Un.flatten(Un.map(n,function(i){return t.outEdges(i.v,i.w)}),!0)}function sie(t,o,e){for(var n=[],i=o[o.length-1],r=o[0],a;t.nodeCount();){for(;a=r.dequeue();)Qg(t,o,e,a);for(;a=i.dequeue();)Qg(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(Qg(t,o,e,a,!0));break}}}return n}function Qg(t,o,e,n,i){var r=i?[]:void 0;return Un.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,Jg(o,e,c)}),Un.forEach(t.outEdges(n.v),function(a){var s=t.edge(a),c=a.w,u=t.node(c);u.in-=s,Jg(o,e,u)}),t.removeNode(n.v),r}function lie(t,o){var e=new iie,n=0,i=0;Un.forEach(t.nodes(),function(s){e.setNode(s,{v:s,in:0,out:0})}),Un.forEach(t.edges(),function(s){var c=e.edge(s.v,s.w)||0,u=o(s),m=c+u;e.setEdge(s.v,s.w,m),i=Math.max(i,e.node(s.v).out+=u),n=Math.max(n,e.node(s.w).in+=u)});var r=Un.range(i+n+3).map(function(){return new oie}),a=n+1;return Un.forEach(e.nodes(),function(s){Jg(r,a,e.node(s))}),{graph:e,buckets:r,zeroIdx:a}}function Jg(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 YE=v((kCe,KE)=>{"use strict";var eo=et(),cie=WE();KE.exports={run:die,undo:pie};function die(t){var o=t.graph().acyclicer==="greedy"?cie(t,e(t)):uie(t);eo.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,eo.uniqueId("rev"))});function e(n){return function(i){return n.edge(i).weight}}}function uie(t){var o=[],e={},n={};function i(r){eo.has(n,r)||(n[r]=!0,e[r]=!0,eo.forEach(t.outEdges(r),function(a){eo.has(e,a.w)?o.push(a):i(a.w)}),delete e[r])}return eo.forEach(t.nodes(),i),o}function pie(t){eo.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 At=v((ICe,JE)=>{"use strict";var Le=et(),ZE=mn().Graph;JE.exports={addDummyNode:XE,simplify:hie,asNonCompoundGraph:fie,successorWeights:mie,predecessorWeights:_ie,intersectRect:gie,buildLayerMatrix:bie,normalizeRanks:vie,removeEmptyRanks:yie,addBorderNode:Cie,maxRank:QE,partition:xie,time:wie,notime:Tie};function XE(t,o,e,n){var i;do i=Le.uniqueId(n);while(t.hasNode(i));return e.dummy=o,t.setNode(i,e),i}function hie(t){var o=new ZE().setGraph(t.graph());return Le.forEach(t.nodes(),function(e){o.setNode(e,t.node(e))}),Le.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 fie(t){var o=new ZE({multigraph:t.isMultigraph()}).setGraph(t.graph());return Le.forEach(t.nodes(),function(e){t.children(e).length||o.setNode(e,t.node(e))}),Le.forEach(t.edges(),function(e){o.setEdge(e,t.edge(e))}),o}function mie(t){var o=Le.map(t.nodes(),function(e){var n={};return Le.forEach(t.outEdges(e),function(i){n[i.w]=(n[i.w]||0)+t.edge(i).weight}),n});return Le.zipObject(t.nodes(),o)}function _ie(t){var o=Le.map(t.nodes(),function(e){var n={};return Le.forEach(t.inEdges(e),function(i){n[i.v]=(n[i.v]||0)+t.edge(i).weight}),n});return Le.zipObject(t.nodes(),o)}function gie(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 bie(t){var o=Le.map(Le.range(QE(t)+1),function(){return[]});return Le.forEach(t.nodes(),function(e){var n=t.node(e),i=n.rank;Le.isUndefined(i)||(o[i][n.order]=e)}),o}function vie(t){var o=Le.min(Le.map(t.nodes(),function(e){return t.node(e).rank}));Le.forEach(t.nodes(),function(e){var n=t.node(e);Le.has(n,"rank")&&(n.rank-=o)})}function yie(t){var o=Le.min(Le.map(t.nodes(),function(r){return t.node(r).rank})),e=[];Le.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;Le.forEach(e,function(r,a){Le.isUndefined(r)&&a%i!==0?--n:n&&Le.forEach(r,function(s){t.node(s).rank+=n})})}function Cie(t,o,e,n){var i={width:0,height:0};return arguments.length>=4&&(i.rank=e,i.order=n),XE(t,"border",i,o)}function QE(t){return Le.max(Le.map(t.nodes(),function(o){var e=t.node(o).rank;if(!Le.isUndefined(e))return e}))}function xie(t,o){var e={lhs:[],rhs:[]};return Le.forEach(t,function(n){o(n)?e.lhs.push(n):e.rhs.push(n)}),e}function wie(t,o){var e=Le.now();try{return o()}finally{console.log(t+" time: "+(Le.now()-e)+"ms")}}function Tie(t,o){return o()}});var nM=v((ECe,tM)=>{"use strict";var eM=et(),Sie=At();tM.exports={run:kie,undo:Eie};function kie(t){t.graph().dummyChains=[],eM.forEach(t.edges(),function(o){Iie(t,o)})}function Iie(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,m,g;for(g=0,++n;n<r;++g,++n)s.points=[],m={width:0,height:0,edgeLabel:s,edgeObj:o,rank:n},u=Sie.addDummyNode(t,"edge",m,"_d"),n===c&&(m.width=s.width,m.height=s.height,m.dummy="edge-label",m.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 Eie(t){eM.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 Ra=v((MCe,iM)=>{"use strict";var df=et();iM.exports={longestPath:Mie,slack:Die};function Mie(t){var o={};function e(n){var i=t.node(n);if(df.has(o,n))return i.rank;o[n]=!0;var r=df.min(df.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}df.forEach(t.sources(),e)}function Die(t,o){return t.node(o.w).rank-t.node(o.v).rank-t.edge(o).minlen}});var e0=v((DCe,oM)=>{"use strict";var uf=et(),Pie=mn().Graph,pf=Ra().slack;oM.exports=Rie;function Rie(t){var o=new Pie({directed:!1}),e=t.nodes()[0],n=t.nodeCount();o.setNode(e,{});for(var i,r;Oie(o,t)<n;)i=Fie(o,t),r=o.hasNode(i.v)?pf(t,i):-pf(t,i),Nie(o,t,r);return o}function Oie(t,o){function e(n){uf.forEach(o.nodeEdges(n),function(i){var r=i.v,a=n===r?i.w:r;!t.hasNode(a)&&!pf(o,i)&&(t.setNode(a,{}),t.setEdge(n,a,{}),e(a))})}return uf.forEach(t.nodes(),e),t.nodeCount()}function Fie(t,o){return uf.minBy(o.edges(),function(e){if(t.hasNode(e.v)!==t.hasNode(e.w))return pf(o,e)})}function Nie(t,o,e){uf.forEach(t.nodes(),function(n){o.node(n).rank+=e})}});var pM=v((PCe,uM)=>{"use strict";var $n=et(),Aie=e0(),Lie=Ra().slack,Bie=Ra().longestPath,Vie=mn().alg.preorder,zie=mn().alg.postorder,Hie=At().simplify;uM.exports=to;to.initLowLimValues=n0;to.initCutValues=t0;to.calcCutValue=aM;to.leaveEdge=lM;to.enterEdge=cM;to.exchangeEdges=dM;function to(t){t=Hie(t),Bie(t);var o=Aie(t);n0(o),t0(o,t);for(var e,n;e=lM(o);)n=cM(o,t,e),dM(o,t,e,n)}function t0(t,o){var e=zie(t,t.nodes());e=e.slice(0,e.length-1),$n.forEach(e,function(n){qie(t,o,n)})}function qie(t,o,e){var n=t.node(e),i=n.parent;t.edge(e,i).cutvalue=aM(t,o,e)}function aM(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,$n.forEach(o.nodeEdges(e),function(c){var u=c.v===e,m=u?c.w:c.v;if(m!==i){var g=u===r,x=o.edge(c).weight;if(s+=g?x:-x,jie(t,e,m)){var I=t.edge(e,m).cutvalue;s+=g?-I:I}}}),s}function n0(t,o){arguments.length<2&&(o=t.nodes()[0]),sM(t,{},1,o)}function sM(t,o,e,n,i){var r=e,a=t.node(n);return o[n]=!0,$n.forEach(t.neighbors(n),function(s){$n.has(o,s)||(e=sM(t,o,e,s,n))}),a.low=r,a.lim=e++,i?a.parent=i:delete a.parent,e}function lM(t){return $n.find(t.edges(),function(o){return t.edge(o).cutvalue<0})}function cM(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=$n.filter(o.edges(),function(m){return c===rM(t,t.node(m.v),s)&&c!==rM(t,t.node(m.w),s)});return $n.minBy(u,function(m){return Lie(o,m)})}function dM(t,o,e,n){var i=e.v,r=e.w;t.removeEdge(i,r),t.setEdge(n.v,n.w,{}),n0(t),t0(t,o),Gie(t,o)}function Gie(t,o){var e=$n.find(t.nodes(),function(i){return!o.node(i).parent}),n=Vie(t,e);n=n.slice(1),$n.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 jie(t,o,e){return t.hasEdge(o,e)}function rM(t,o,e){return e.low<=o.lim&&o.lim<=e.lim}});var _M=v((RCe,mM)=>{"use strict";var Uie=Ra(),fM=Uie.longestPath,$ie=e0(),Wie=pM();mM.exports=Kie;function Kie(t){switch(t.graph().ranker){case"network-simplex":hM(t);break;case"tight-tree":Zie(t);break;case"longest-path":Yie(t);break;default:hM(t)}}var Yie=fM;function Zie(t){fM(t),$ie(t)}function hM(t){Wie(t)}});var bM=v((OCe,gM)=>{"use strict";var i0=et();gM.exports=Xie;function Xie(t){var o=Jie(t);i0.forEach(t.graph().dummyChains,function(e){for(var n=t.node(e),i=n.edgeObj,r=Qie(t,o,i.v,i.w),a=r.path,s=r.lca,c=0,u=a[c],m=!0;e!==i.w;){if(n=t.node(e),m){for(;(u=a[c])!==s&&t.node(u).maxRank<n.rank;)c++;u===s&&(m=!1)}if(!m){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 Qie(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 Jie(t){var o={},e=0;function n(i){var r=e;i0.forEach(t.children(i),n),o[i]={low:r,lim:e++}}return i0.forEach(t.children(),n),o}});var CM=v((FCe,yM)=>{"use strict";var Wn=et(),o0=At();yM.exports={run:eoe,cleanup:ioe};function eoe(t){var o=o0.addDummyNode(t,"root",{},"_root"),e=toe(t),n=Wn.max(Wn.values(e))-1,i=2*n+1;t.graph().nestingRoot=o,Wn.forEach(t.edges(),function(a){t.edge(a).minlen*=i});var r=noe(t)+1;Wn.forEach(t.children(),function(a){vM(t,o,i,r,n,e,a)}),t.graph().nodeRankFactor=i}function vM(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=o0.addBorderNode(t,"_bt"),u=o0.addBorderNode(t,"_bb"),m=t.node(a);t.setParent(c,a),m.borderTop=c,t.setParent(u,a),m.borderBottom=u,Wn.forEach(s,function(g){vM(t,o,e,n,i,r,g);var x=t.node(g),I=x.borderTop?x.borderTop:g,k=x.borderBottom?x.borderBottom:g,N=x.borderTop?n:2*n,j=I!==k?1:i-r[a]+1;t.setEdge(c,I,{weight:N,minlen:j,nestingEdge:!0}),t.setEdge(k,u,{weight:N,minlen:j,nestingEdge:!0})}),t.parent(a)||t.setEdge(o,c,{weight:0,minlen:i+r[a]})}function toe(t){var o={};function e(n,i){var r=t.children(n);r&&r.length&&Wn.forEach(r,function(a){e(a,i+1)}),o[n]=i}return Wn.forEach(t.children(),function(n){e(n,1)}),o}function noe(t){return Wn.reduce(t.edges(),function(o,e){return o+t.edge(e).weight},0)}function ioe(t){var o=t.graph();t.removeNode(o.nestingRoot),delete o.nestingRoot,Wn.forEach(t.edges(),function(e){var n=t.edge(e);n.nestingEdge&&t.removeEdge(e)})}});var TM=v((NCe,wM)=>{"use strict";var r0=et(),ooe=At();wM.exports=roe;function roe(t){function o(e){var n=t.children(e),i=t.node(e);if(n.length&&r0.forEach(n,o),r0.has(i,"minRank")){i.borderLeft=[],i.borderRight=[];for(var r=i.minRank,a=i.maxRank+1;r<a;++r)xM(t,"borderLeft","_bl",e,i,r),xM(t,"borderRight","_br",e,i,r)}}r0.forEach(t.children(),o)}function xM(t,o,e,n,i,r){var a={width:0,height:0,rank:r,borderType:o},s=i[o][r-1],c=ooe.addDummyNode(t,"border",a,e);i[o][r]=c,t.setParent(c,n),s&&t.setEdge(s,c,{weight:1})}});var EM=v((ACe,IM)=>{"use strict";var Bn=et();IM.exports={adjust:aoe,undo:soe};function aoe(t){var o=t.graph().rankdir.toLowerCase();(o==="lr"||o==="rl")&&kM(t)}function soe(t){var o=t.graph().rankdir.toLowerCase();(o==="bt"||o==="rl")&&loe(t),(o==="lr"||o==="rl")&&(coe(t),kM(t))}function kM(t){Bn.forEach(t.nodes(),function(o){SM(t.node(o))}),Bn.forEach(t.edges(),function(o){SM(t.edge(o))})}function SM(t){var o=t.width;t.width=t.height,t.height=o}function loe(t){Bn.forEach(t.nodes(),function(o){a0(t.node(o))}),Bn.forEach(t.edges(),function(o){var e=t.edge(o);Bn.forEach(e.points,a0),Bn.has(e,"y")&&a0(e)})}function a0(t){t.y=-t.y}function coe(t){Bn.forEach(t.nodes(),function(o){s0(t.node(o))}),Bn.forEach(t.edges(),function(o){var e=t.edge(o);Bn.forEach(e.points,s0),Bn.has(e,"x")&&s0(e)})}function s0(t){var o=t.x;t.x=t.y,t.y=o}});var DM=v((LCe,MM)=>{"use strict";var Kn=et();MM.exports=doe;function doe(t){var o={},e=Kn.filter(t.nodes(),function(s){return!t.children(s).length}),n=Kn.max(Kn.map(e,function(s){return t.node(s).rank})),i=Kn.map(Kn.range(n+1),function(){return[]});function r(s){if(!Kn.has(o,s)){o[s]=!0;var c=t.node(s);i[c.rank].push(s),Kn.forEach(t.successors(s),r)}}var a=Kn.sortBy(e,function(s){return t.node(s).rank});return Kn.forEach(a,r),i}});var RM=v((BCe,PM)=>{"use strict";var yi=et();PM.exports=uoe;function uoe(t,o){for(var e=0,n=1;n<o.length;++n)e+=poe(t,o[n-1],o[n]);return e}function poe(t,o,e){for(var n=yi.zipObject(e,yi.map(e,function(u,m){return m})),i=yi.flatten(yi.map(o,function(u){return yi.sortBy(yi.map(t.outEdges(u),function(m){return{pos:n[m.w],weight:t.edge(m).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 m=u.pos+r;s[m]+=u.weight;for(var g=0;m>0;)m%2&&(g+=s[m+1]),m=m-1>>1,s[m]+=u.weight;c+=u.weight*g})),c}});var NM=v((VCe,FM)=>{"use strict";var OM=et();FM.exports=hoe;function hoe(t,o){return OM.map(o,function(e){var n=t.inEdges(e);if(n.length){var i=OM.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 LM=v((zCe,AM)=>{"use strict";var en=et();AM.exports=foe;function foe(t,o){var e={};en.forEach(t,function(i,r){var a=e[i.v]={indegree:0,in:[],out:[],vs:[i.v],i:r};en.isUndefined(i.barycenter)||(a.barycenter=i.barycenter,a.weight=i.weight)}),en.forEach(o.edges(),function(i){var r=e[i.v],a=e[i.w];!en.isUndefined(r)&&!en.isUndefined(a)&&(a.indegree++,r.out.push(e[i.w]))});var n=en.filter(e,function(i){return!i.indegree});return moe(n)}function moe(t){var o=[];function e(r){return function(a){a.merged||(en.isUndefined(a.barycenter)||en.isUndefined(r.barycenter)||a.barycenter>=r.barycenter)&&_oe(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),en.forEach(i.in.reverse(),e(i)),en.forEach(i.out,n(i))}return en.map(en.filter(o,function(r){return!r.merged}),function(r){return en.pick(r,["vs","i","barycenter","weight"])})}function _oe(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 zM=v((HCe,VM)=>{"use strict";var Oa=et(),goe=At();VM.exports=boe;function boe(t,o){var e=goe.partition(t,function(m){return Oa.has(m,"barycenter")}),n=e.lhs,i=Oa.sortBy(e.rhs,function(m){return-m.i}),r=[],a=0,s=0,c=0;n.sort(voe(!!o)),c=BM(r,i,c),Oa.forEach(n,function(m){c+=m.vs.length,r.push(m.vs),a+=m.barycenter*m.weight,s+=m.weight,c=BM(r,i,c)});var u={vs:Oa.flatten(r,!0)};return s&&(u.barycenter=a/s,u.weight=s),u}function BM(t,o,e){for(var n;o.length&&(n=Oa.last(o)).i<=e;)o.pop(),t.push(n.vs),e++;return e}function voe(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 GM=v((qCe,qM)=>{"use strict";var Ci=et(),yoe=NM(),Coe=LM(),xoe=zM();qM.exports=HM;function HM(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(k){return k!==a&&k!==s}));var u=yoe(t,i);Ci.forEach(u,function(k){if(t.children(k.v).length){var N=HM(t,k.v,e,n);c[k.v]=N,Ci.has(N,"barycenter")&&Toe(k,N)}});var m=Coe(u,e);woe(m,c);var g=xoe(m,n);if(a&&(g.vs=Ci.flatten([a,g.vs,s],!0),t.predecessors(a).length)){var x=t.node(t.predecessors(a)[0]),I=t.node(t.predecessors(s)[0]);Ci.has(g,"barycenter")||(g.barycenter=0,g.weight=0),g.barycenter=(g.barycenter*g.weight+x.order+I.order)/(g.weight+2),g.weight+=2}return g}function woe(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 Toe(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 UM=v((GCe,jM)=>{"use strict";var Fa=et(),Soe=mn().Graph;jM.exports=koe;function koe(t,o,e){var n=Ioe(t),i=new Soe({compound:!0}).setGraph({root:n}).setDefaultNodeLabel(function(r){return t.node(r)});return Fa.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),Fa.forEach(t[e](r),function(c){var u=c.v===r?c.w:c.v,m=i.edge(u,r),g=Fa.isUndefined(m)?0:m.weight;i.setEdge(u,r,{weight:t.edge(c).weight+g})}),Fa.has(a,"minRank")&&i.setNode(r,{borderLeft:a.borderLeft[o],borderRight:a.borderRight[o]}))}),i}function Ioe(t){for(var o;t.hasNode(o=Fa.uniqueId("_root")););return o}});var WM=v((jCe,$M)=>{"use strict";var Eoe=et();$M.exports=Moe;function Moe(t,o,e){var n={},i;Eoe.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 QM=v((UCe,XM)=>{"use strict";var xi=et(),Doe=DM(),Poe=RM(),Roe=GM(),Ooe=UM(),Foe=WM(),Noe=mn().Graph,KM=At();XM.exports=Aoe;function Aoe(t){var o=KM.maxRank(t),e=YM(t,xi.range(1,o+1),"inEdges"),n=YM(t,xi.range(o-1,-1,-1),"outEdges"),i=Doe(t);ZM(t,i);for(var r=Number.POSITIVE_INFINITY,a,s=0,c=0;c<4;++s,++c){Loe(s%2?e:n,s%4>=2),i=KM.buildLayerMatrix(t);var u=Poe(t,i);u<r&&(c=0,a=xi.cloneDeep(i),r=u)}ZM(t,a)}function YM(t,o,e){return xi.map(o,function(n){return Ooe(t,n,e)})}function Loe(t,o){var e=new Noe;xi.forEach(t,function(n){var i=n.graph().root,r=Roe(n,i,e,o);xi.forEach(r.vs,function(a,s){n.node(a).order=s}),Foe(n,e,r.vs)})}function ZM(t,o){xi.forEach(o,function(e){xi.forEach(e,function(n,i){t.node(n).order=i})})}});var lD=v(($Ce,sD)=>{"use strict";var we=et(),Boe=mn().Graph,Voe=At();sD.exports={positionX:qoe,findType1Conflicts:JM,findType2Conflicts:eD,addConflict:l0,hasConflict:tD,verticalAlignment:nD,horizontalCompaction:iD,alignCoordinates:rD,findSmallestWidthAlignment:oD,balance:aD};function JM(t,o){var e={};function n(i,r){var a=0,s=0,c=i.length,u=we.last(r);return we.forEach(r,function(m,g){var x=zoe(t,m),I=x?t.node(x).order:c;(x||m===u)&&(we.forEach(r.slice(s,g+1),function(k){we.forEach(t.predecessors(k),function(N){var j=t.node(N),X=j.order;(X<a||I<X)&&!(j.dummy&&t.node(k).dummy)&&l0(e,N,k)})}),s=g+1,a=I)}),r}return we.reduce(o,n),e}function eD(t,o){var e={};function n(r,a,s,c,u){var m;we.forEach(we.range(a,s),function(g){m=r[g],t.node(m).dummy&&we.forEach(t.predecessors(m),function(x){var I=t.node(x);I.dummy&&(I.order<c||I.order>u)&&l0(e,x,m)})})}function i(r,a){var s=-1,c,u=0;return we.forEach(a,function(m,g){if(t.node(m).dummy==="border"){var x=t.predecessors(m);x.length&&(c=t.node(x[0]).order,n(a,u,g,s,c),u=g,s=c)}n(a,u,a.length,c,r.length)}),a}return we.reduce(o,i),e}function zoe(t,o){if(t.node(o).dummy)return we.find(t.predecessors(o),function(e){return t.node(e).dummy})}function l0(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 tD(t,o,e){if(o>e){var n=o;o=e,e=n}return we.has(t[o],e)}function nD(t,o,e,n){var i={},r={},a={};return we.forEach(o,function(s){we.forEach(s,function(c,u){i[c]=c,r[c]=c,a[c]=u})}),we.forEach(o,function(s){var c=-1;we.forEach(s,function(u){var m=n(u);if(m.length){m=we.sortBy(m,function(N){return a[N]});for(var g=(m.length-1)/2,x=Math.floor(g),I=Math.ceil(g);x<=I;++x){var k=m[x];r[u]===u&&c<a[k]&&!tD(e,u,k)&&(r[k]=u,r[u]=i[u]=i[k],c=a[k])}}})}),{root:i,align:r}}function iD(t,o,e,n,i){var r={},a=Hoe(t,o,e,i),s=i?"borderLeft":"borderRight";function c(g,x){for(var I=a.nodes(),k=I.pop(),N={};k;)N[k]?g(k):(N[k]=!0,I.push(k),I=I.concat(x(k))),k=I.pop()}function u(g){r[g]=a.inEdges(g).reduce(function(x,I){return Math.max(x,r[I.v]+a.edge(I))},0)}function m(g){var x=a.outEdges(g).reduce(function(k,N){return Math.min(k,r[N.w]-a.edge(N))},Number.POSITIVE_INFINITY),I=t.node(g);x!==Number.POSITIVE_INFINITY&&I.borderType!==s&&(r[g]=Math.max(r[g],x))}return c(u,a.predecessors.bind(a)),c(m,a.successors.bind(a)),we.forEach(n,function(g){r[g]=r[e[g]]}),r}function Hoe(t,o,e,n){var i=new Boe,r=t.graph(),a=Goe(r.nodesep,r.edgesep,n);return we.forEach(o,function(s){var c;we.forEach(s,function(u){var m=e[u];if(i.setNode(m),c){var g=e[c],x=i.edge(g,m);i.setEdge(g,m,Math.max(a(t,u,c),x||0))}c=u})}),i}function oD(t,o){return we.minBy(we.values(o),function(e){var n=Number.NEGATIVE_INFINITY,i=Number.POSITIVE_INFINITY;return we.forIn(e,function(r,a){var s=joe(t,a)/2;n=Math.max(r+s,n),i=Math.min(r-s,i)}),n-i})}function rD(t,o){var e=we.values(o),n=we.min(e),i=we.max(e);we.forEach(["u","d"],function(r){we.forEach(["l","r"],function(a){var s=r+a,c=t[s],u;if(c!==o){var m=we.values(c);u=a==="l"?n-we.min(m):i-we.max(m),u&&(t[s]=we.mapValues(c,function(g){return g+u}))}})})}function aD(t,o){return we.mapValues(t.ul,function(e,n){if(o)return t[o.toLowerCase()][n];var i=we.sortBy(we.map(t,n));return(i[1]+i[2])/2})}function qoe(t){var o=Voe.buildLayerMatrix(t),e=we.merge(JM(t,o),eD(t,o)),n={},i;we.forEach(["u","d"],function(a){i=a==="u"?o:we.values(o).reverse(),we.forEach(["l","r"],function(s){s==="r"&&(i=we.map(i,function(g){return we.values(g).reverse()}));var c=(a==="u"?t.predecessors:t.successors).bind(t),u=nD(t,i,e,c),m=iD(t,i,u.root,u.align,s==="r");s==="r"&&(m=we.mapValues(m,function(g){return-g})),n[a+s]=m})});var r=oD(t,n);return rD(n,r),aD(n,t.graph().align)}function Goe(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,we.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,we.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 joe(t,o){return t.node(o).width}});var uD=v((WCe,dD)=>{"use strict";var Na=et(),cD=At(),Uoe=lD().positionX;dD.exports=$oe;function $oe(t){t=cD.asNonCompoundGraph(t),Woe(t),Na.forEach(Uoe(t),function(o,e){t.node(e).x=o})}function Woe(t){var o=cD.buildLayerMatrix(t),e=t.graph().ranksep,n=0;Na.forEach(o,function(i){var r=Na.max(Na.map(i,function(a){return t.node(a).height}));Na.forEach(i,function(a){t.node(a).y=n+r/2}),n+=r+e})}});var gD=v((KCe,_D)=>{"use strict";var De=et(),pD=YE(),hD=nM(),Koe=_M(),Yoe=At().normalizeRanks,Zoe=bM(),Xoe=At().removeEmptyRanks,fD=CM(),Qoe=TM(),mD=EM(),Joe=QM(),ere=uD(),wi=At(),tre=mn().Graph;_D.exports=nre;function nre(t,o){var e=o&&o.debugTiming?wi.time:wi.notime;e("layout",function(){var n=e(" buildLayoutGraph",function(){return hre(t)});e(" runLayout",function(){ire(n,e)}),e(" updateInputGraph",function(){ore(t,n)})})}function ire(t,o){o(" makeSpaceForEdgeLabels",function(){fre(t)}),o(" removeSelfEdges",function(){wre(t)}),o(" acyclic",function(){pD.run(t)}),o(" nestingGraph.run",function(){fD.run(t)}),o(" rank",function(){Koe(wi.asNonCompoundGraph(t))}),o(" injectEdgeLabelProxies",function(){mre(t)}),o(" removeEmptyRanks",function(){Xoe(t)}),o(" nestingGraph.cleanup",function(){fD.cleanup(t)}),o(" normalizeRanks",function(){Yoe(t)}),o(" assignRankMinMax",function(){_re(t)}),o(" removeEdgeLabelProxies",function(){gre(t)}),o(" normalize.run",function(){hD.run(t)}),o(" parentDummyChains",function(){Zoe(t)}),o(" addBorderSegments",function(){Qoe(t)}),o(" order",function(){Joe(t)}),o(" insertSelfEdges",function(){Tre(t)}),o(" adjustCoordinateSystem",function(){mD.adjust(t)}),o(" position",function(){ere(t)}),o(" positionSelfEdges",function(){Sre(t)}),o(" removeBorderNodes",function(){xre(t)}),o(" normalize.undo",function(){hD.undo(t)}),o(" fixupEdgeLabelCoords",function(){yre(t)}),o(" undoCoordinateSystem",function(){mD.undo(t)}),o(" translateGraph",function(){bre(t)}),o(" assignNodeIntersects",function(){vre(t)}),o(" reversePoints",function(){Cre(t)}),o(" acyclic.undo",function(){pD.undo(t)})}function ore(t,o){De.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))}),De.forEach(t.edges(),function(e){var n=t.edge(e),i=o.edge(e);n.points=i.points,De.has(i,"x")&&(n.x=i.x,n.y=i.y)}),t.graph().width=o.graph().width,t.graph().height=o.graph().height}var rre=["nodesep","edgesep","ranksep","marginx","marginy"],are={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},sre=["acyclicer","ranker","rankdir","align"],lre=["width","height"],cre={width:0,height:0},dre=["minlen","weight","width","height","labeloffset"],ure={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},pre=["labelpos"];function hre(t){var o=new tre({multigraph:!0,compound:!0}),e=d0(t.graph());return o.setGraph(De.merge({},are,c0(e,rre),De.pick(e,sre))),De.forEach(t.nodes(),function(n){var i=d0(t.node(n));o.setNode(n,De.defaults(c0(i,lre),cre)),o.setParent(n,t.parent(n))}),De.forEach(t.edges(),function(n){var i=d0(t.edge(n));o.setEdge(n,De.merge({},ure,c0(i,dre),De.pick(i,pre)))}),o}function fre(t){var o=t.graph();o.ranksep/=2,De.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 mre(t){De.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 _re(t){var o=0;De.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=De.max(o,n.maxRank))}),t.graph().maxRank=o}function gre(t){De.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 bre(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 m=u.x,g=u.y,x=u.width,I=u.height;o=Math.min(o,m-x/2),e=Math.max(e,m+x/2),n=Math.min(n,g-I/2),i=Math.max(i,g+I/2)}De.forEach(t.nodes(),function(u){c(t.node(u))}),De.forEach(t.edges(),function(u){var m=t.edge(u);De.has(m,"x")&&c(m)}),o-=a,n-=s,De.forEach(t.nodes(),function(u){var m=t.node(u);m.x-=o,m.y-=n}),De.forEach(t.edges(),function(u){var m=t.edge(u);De.forEach(m.points,function(g){g.x-=o,g.y-=n}),De.has(m,"x")&&(m.x-=o),De.has(m,"y")&&(m.y-=n)}),r.width=e-o+a,r.height=i-n+s}function vre(t){De.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 yre(t){De.forEach(t.edges(),function(o){var e=t.edge(o);if(De.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 Cre(t){De.forEach(t.edges(),function(o){var e=t.edge(o);e.reversed&&e.points.reverse()})}function xre(t){De.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(De.last(e.borderLeft)),a=t.node(De.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}}),De.forEach(t.nodes(),function(o){t.node(o).dummy==="border"&&t.removeNode(o)})}function wre(t){De.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 Tre(t){var o=wi.buildLayerMatrix(t);De.forEach(o,function(e){var n=0;De.forEach(e,function(i,r){var a=t.node(i);a.order=r+n,De.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 Sre(t){De.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 c0(t,o){return De.mapValues(De.pick(t,o),Number)}function d0(t){var o={};return De.forEach(t,function(e,n){o[n.toLowerCase()]=e}),o}});var vD=v((YCe,bD)=>{"use strict";var hf=et(),kre=At(),Ire=mn().Graph;bD.exports={debugOrdering:Ere};function Ere(t){var o=kre.buildLayerMatrix(t),e=new Ire({compound:!0,multigraph:!0}).setGraph({});return hf.forEach(t.nodes(),function(n){e.setNode(n,{label:n}),e.setParent(n,"layer"+t.node(n).rank)}),hf.forEach(t.edges(),function(n){e.setEdge(n.v,n.w,{},n.name)}),hf.forEach(o,function(n,i){var r="layer"+i;e.setNode(r,{rank:"same"}),hf.reduce(n,function(a,s){return e.setEdge(a,s,{style:"invis"}),s})}),e}});var CD=v((ZCe,yD)=>{"use strict";yD.exports="0.8.5"});var wD=v((XCe,xD)=>{"use strict";xD.exports={graphlib:mn(),layout:gD(),debug:vD(),util:{time:At().time,notime:At().notime},version:CD()}});var Pb={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 gs=new ue("MAP_ISOLATE_INTENT",{providedIn:"root",factory:()=>({isolate:()=>{}})});var Rb=`
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 p3=["data-p-icon","angle-double-left"],Ob=(()=>{class t extends Ce{static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275cmp=z({type:t,selectors:[["","data-p-icon","angle-double-left"]],features:[Y],attrs:p3,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&&(K(),ae(0,"path",0))},encapsulation:2})}return t})();var h3=["data-p-icon","angle-double-right"],Fb=(()=>{class t extends Ce{static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275cmp=z({type:t,selectors:[["","data-p-icon","angle-double-right"]],features:[Y],attrs:h3,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&&(K(),ae(0,"path",0))},encapsulation:2})}return t})();var f3=["data-p-icon","angle-down"],Nb=(()=>{class t extends Ce{static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275cmp=z({type:t,selectors:[["","data-p-icon","angle-down"]],features:[Y],attrs:f3,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&&(K(),ae(0,"path",0))},encapsulation:2})}return t})();var m3=["data-p-icon","angle-left"],Ab=(()=>{class t extends Ce{static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275cmp=z({type:t,selectors:[["","data-p-icon","angle-left"]],features:[Y],attrs:m3,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&&(K(),ae(0,"path",0))},encapsulation:2})}return t})();var _3=["data-p-icon","angle-right"],Lb=(()=>{class t extends Ce{static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275cmp=z({type:t,selectors:[["","data-p-icon","angle-right"]],features:[Y],attrs:_3,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&&(K(),ae(0,"path",0))},encapsulation:2})}return t})();var g3=["data-p-icon","angle-up"],Bb=(()=>{class t extends Ce{static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275cmp=z({type:t,selectors:[["","data-p-icon","angle-up"]],features:[Y],attrs:g3,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&&(K(),ae(0,"path",0))},encapsulation:2})}return t})();var b3=["data-p-icon","arrow-down"],$f=(()=>{class t extends Ce{pathId;onInit(){this.pathId="url(#"+ct()+")"}static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275cmp=z({type:t,selectors:[["","data-p-icon","arrow-down"]],features:[Y],attrs:b3,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&&(K(),J(0,"g"),ae(1,"path",0),ee(),J(2,"defs")(3,"clipPath",1),ae(4,"rect",2),ee()()),n&2&&(O("clip-path",i.pathId),l(3),it("id",i.pathId))},encapsulation:2})}return t})();var v3=["data-p-icon","arrow-up"],Wf=(()=>{class t extends Ce{pathId;onInit(){this.pathId="url(#"+ct()+")"}static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275cmp=z({type:t,selectors:[["","data-p-icon","arrow-up"]],features:[Y],attrs:v3,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&&(K(),J(0,"g"),ae(1,"path",0),ee(),J(2,"defs")(3,"clipPath",1),ae(4,"rect",2),ee()()),n&2&&(O("clip-path",i.pathId),l(3),it("id",i.pathId))},encapsulation:2})}return t})();var y3=["data-p-icon","calendar"],Vb=(()=>{class t extends Ce{static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275cmp=z({type:t,selectors:[["","data-p-icon","calendar"]],features:[Y],attrs:y3,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&&(K(),ae(0,"path",0))},encapsulation:2})}return t})();var C3=["data-p-icon","chevron-left"],zb=(()=>{class t extends Ce{static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275cmp=z({type:t,selectors:[["","data-p-icon","chevron-left"]],features:[Y],attrs:C3,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&&(K(),ae(0,"path",0))},encapsulation:2})}return t})();var x3=["data-p-icon","chevron-right"],Hb=(()=>{class t extends Ce{static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275cmp=z({type:t,selectors:[["","data-p-icon","chevron-right"]],features:[Y],attrs:x3,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&&(K(),ae(0,"path",0))},encapsulation:2})}return t})();var w3=["data-p-icon","chevron-up"],qb=(()=>{class t extends Ce{static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275cmp=z({type:t,selectors:[["","data-p-icon","chevron-up"]],features:[Y],attrs:w3,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&&(K(),ae(0,"path",0))},encapsulation:2})}return t})();var T3=["data-p-icon","filter"],Gb=(()=>{class t extends Ce{pathId;onInit(){this.pathId="url(#"+ct()+")"}static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275cmp=z({type:t,selectors:[["","data-p-icon","filter"]],features:[Y],attrs:T3,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&&(K(),J(0,"g"),ae(1,"path",0),ee(),J(2,"defs")(3,"clipPath",1),ae(4,"rect",2),ee()()),n&2&&(O("clip-path",i.pathId),l(3),it("id",i.pathId))},encapsulation:2})}return t})();var S3=["data-p-icon","filter-slash"],jb=(()=>{class t extends Ce{pathId;onInit(){this.pathId="url(#"+ct()+")"}static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275cmp=z({type:t,selectors:[["","data-p-icon","filter-slash"]],features:[Y],attrs:S3,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&&(K(),J(0,"g"),ae(1,"path",0),ee(),J(2,"defs")(3,"clipPath",1),ae(4,"rect",2),ee()()),n&2&&(O("clip-path",i.pathId),l(3),it("id",i.pathId))},encapsulation:2})}return t})();var k3=["data-p-icon","minus"],Ub=(()=>{class t extends Ce{static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275cmp=z({type:t,selectors:[["","data-p-icon","minus"]],features:[Y],attrs:k3,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&&(K(),ae(0,"path",0))},encapsulation:2})}return t})();var I3=["data-p-icon","plus"],$b=(()=>{class t extends Ce{pathId;onInit(){this.pathId="url(#"+ct()+")"}static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275cmp=z({type:t,selectors:[["","data-p-icon","plus"]],features:[Y],attrs:I3,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&&(K(),J(0,"g"),ae(1,"path",0),ee(),J(2,"defs")(3,"clipPath",1),ae(4,"rect",2),ee()()),n&2&&(O("clip-path",i.pathId),l(3),it("id",i.pathId))},encapsulation:2})}return t})();var E3=["data-p-icon","sort-alt"],Wb=(()=>{class t extends Ce{pathId;onInit(){this.pathId="url(#"+ct()+")"}static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275cmp=z({type:t,selectors:[["","data-p-icon","sort-alt"]],features:[Y],attrs:E3,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&&(K(),J(0,"g"),ae(1,"path",0)(2,"path",1)(3,"path",2)(4,"path",3),ee(),J(5,"defs")(6,"clipPath",4),ae(7,"rect",5),ee()()),n&2&&(O("clip-path",i.pathId),l(6),it("id",i.pathId))},encapsulation:2})}return t})();var M3=["data-p-icon","sort-amount-down"],Kb=(()=>{class t extends Ce{pathId;onInit(){this.pathId="url(#"+ct()+")"}static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275cmp=z({type:t,selectors:[["","data-p-icon","sort-amount-down"]],features:[Y],attrs:M3,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&&(K(),J(0,"g"),ae(1,"path",0),ee(),J(2,"defs")(3,"clipPath",1),ae(4,"rect",2),ee()()),n&2&&(O("clip-path",i.pathId),l(3),it("id",i.pathId))},encapsulation:2})}return t})();var D3=["data-p-icon","sort-amount-up-alt"],Yb=(()=>{class t extends Ce{pathId;onInit(){this.pathId="url(#"+ct()+")"}static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275cmp=z({type:t,selectors:[["","data-p-icon","sort-amount-up-alt"]],features:[Y],attrs:D3,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&&(K(),J(0,"g"),ae(1,"path",0),ee(),J(2,"defs")(3,"clipPath",1),ae(4,"rect",2),ee()()),n&2&&(O("clip-path",i.pathId),l(3),it("id",i.pathId))},encapsulation:2})}return t})();var P3=["data-p-icon","times-circle"],Zb=(()=>{class t extends Ce{pathId;onInit(){this.pathId="url(#"+ct()+")"}static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275cmp=z({type:t,selectors:[["","data-p-icon","times-circle"]],features:[Y],attrs:P3,decls:5,vars:2,consts:[["fill-rule","evenodd","clip-rule","evenodd","d","M7 14C5.61553 14 4.26215 13.5895 3.11101 12.8203C1.95987 12.0511 1.06266 10.9579 0.532846 9.67879C0.00303296 8.3997 -0.13559 6.99224 0.134506 5.63437C0.404603 4.2765 1.07129 3.02922 2.05026 2.05026C3.02922 1.07129 4.2765 0.404603 5.63437 0.134506C6.99224 -0.13559 8.3997 0.00303296 9.67879 0.532846C10.9579 1.06266 12.0511 1.95987 12.8203 3.11101C13.5895 4.26215 14 5.61553 14 7C14 8.85652 13.2625 10.637 11.9497 11.9497C10.637 13.2625 8.85652 14 7 14ZM7 1.16667C5.84628 1.16667 4.71846 1.50879 3.75918 2.14976C2.79989 2.79074 2.05222 3.70178 1.61071 4.76768C1.16919 5.83358 1.05367 7.00647 1.27876 8.13803C1.50384 9.26958 2.05941 10.309 2.87521 11.1248C3.69102 11.9406 4.73042 12.4962 5.86198 12.7212C6.99353 12.9463 8.16642 12.8308 9.23232 12.3893C10.2982 11.9478 11.2093 11.2001 11.8502 10.2408C12.4912 9.28154 12.8333 8.15373 12.8333 7C12.8333 5.45291 12.2188 3.96918 11.1248 2.87521C10.0308 1.78125 8.5471 1.16667 7 1.16667ZM4.66662 9.91668C4.58998 9.91704 4.51404 9.90209 4.44325 9.87271C4.37246 9.84333 4.30826 9.8001 4.2544 9.74557C4.14516 9.6362 4.0838 9.48793 4.0838 9.33335C4.0838 9.17876 4.14516 9.0305 4.2544 8.92113L6.17553 7L4.25443 5.07891C4.15139 4.96832 4.09529 4.82207 4.09796 4.67094C4.10063 4.51982 4.16185 4.37563 4.26872 4.26876C4.3756 4.16188 4.51979 4.10066 4.67091 4.09799C4.82204 4.09532 4.96829 4.15142 5.07887 4.25446L6.99997 6.17556L8.92106 4.25446C9.03164 4.15142 9.1779 4.09532 9.32903 4.09799C9.48015 4.10066 9.62434 4.16188 9.73121 4.26876C9.83809 4.37563 9.89931 4.51982 9.90198 4.67094C9.90464 4.82207 9.84855 4.96832 9.74551 5.07891L7.82441 7L9.74554 8.92113C9.85478 9.0305 9.91614 9.17876 9.91614 9.33335C9.91614 9.48793 9.85478 9.6362 9.74554 9.74557C9.69168 9.8001 9.62748 9.84333 9.55669 9.87271C9.4859 9.90209 9.40996 9.91704 9.33332 9.91668C9.25668 9.91704 9.18073 9.90209 9.10995 9.87271C9.03916 9.84333 8.97495 9.8001 8.9211 9.74557L6.99997 7.82444L5.07884 9.74557C5.02499 9.8001 4.96078 9.84333 4.88999 9.87271C4.81921 9.90209 4.74326 9.91704 4.66662 9.91668Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(n,i){n&1&&(K(),J(0,"g"),ae(1,"path",0),ee(),J(2,"defs")(3,"clipPath",1),ae(4,"rect",2),ee()()),n&2&&(O("clip-path",i.pathId),l(3),it("id",i.pathId))},encapsulation:2})}return t})();var R3=["data-p-icon","trash"],Xb=(()=>{class t extends Ce{pathId;onInit(){this.pathId="url(#"+ct()+")"}static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275cmp=z({type:t,selectors:[["","data-p-icon","trash"]],features:[Y],attrs:R3,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&&(K(),J(0,"g"),ae(1,"path",0),ee(),J(2,"defs")(3,"clipPath",1),ae(4,"rect",2),ee()()),n&2&&(O("clip-path",i.pathId),l(3),it("id",i.pathId))},encapsulation:2})}return t})();var Qb=`
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 O3=["icon"],F3=["input"],N3=(t,o,e)=>({checked:t,class:o,dataP:e});function A3(t,o){if(t&1&&F(0,"span",8),t&2){let e=d(3);B(e.cx("icon")),h("ngClass",e.checkboxIcon)("pBind",e.ptm("icon")),O("data-p",e.dataP)}}function L3(t,o){if(t&1&&(K(),F(0,"svg",9)),t&2){let e=d(3);B(e.cx("icon")),h("pBind",e.ptm("icon")),O("data-p",e.dataP)}}function B3(t,o){if(t&1&&(se(0),S(1,A3,1,5,"span",6)(2,L3,1,4,"svg",7),le()),t&2){let e=d(2);l(),h("ngIf",e.checkboxIcon),l(),h("ngIf",!e.checkboxIcon)}}function V3(t,o){if(t&1&&(K(),F(0,"svg",10)),t&2){let e=d(2);B(e.cx("icon")),h("pBind",e.ptm("icon")),O("data-p",e.dataP)}}function z3(t,o){if(t&1&&(se(0),S(1,B3,3,2,"ng-container",3)(2,V3,1,4,"svg",5),le()),t&2){let e=d();l(),h("ngIf",e.checked),l(),h("ngIf",e._indeterminate())}}function H3(t,o){}function q3(t,o){t&1&&S(0,H3,0,0,"ng-template")}var G3=`
748
- ${Qb}
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
- `,j3={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 dt{name="checkbox";style=G3;classes=j3;static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})();var ev=new ue("CHECKBOX_INSTANCE"),U3={provide:Xn,useExisting:Sn(()=>tv),multi:!0},tv=(()=>{class t extends ds{componentName="Checkbox";hostName="";value;binary;ariaLabelledBy;ariaLabel;tabindex;inputId;inputStyle;styleClass;inputClass;indeterminate=!1;formControl;checkboxIcon;readonly;autofocus;trueValue=!0;falseValue=!1;variant=H();size=H();onChange=new ie;onFocus=new ie;onBlur=new ie;inputViewChild;get checked(){return this._indeterminate()?!1:this.binary?this.modelValue()===this.trueValue:G0(this.value,this.modelValue())}_indeterminate=Q(void 0);checkboxIconTemplate;templates;_checkboxIconTemplate;focused=!1;_componentStyle=p(Jb);bindDirectiveInstance=p(de,{self:!0});$pcCheckbox=p(ev,{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(uo,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=>!ns(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=q(t)))(i||t)}})();static \u0275cmp=z({type:t,selectors:[["p-checkbox"],["p-checkBox"],["p-check-box"]],contentQueries:function(n,i,r){if(n&1&&wt(r,O3,4)(r,Ke,4),n&2){let a;U(a=$())&&(i.checkboxIconTemplate=a.first),U(a=$())&&(i.templates=a)}},viewQuery:function(n,i){if(n&1&&In(F3,5),n&2){let r;U(r=$())&&(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),B(i.cn(i.cx("root"),i.styleClass)))},inputs:{hostName:"hostName",value:"value",binary:[2,"binary","binary",G],ariaLabelledBy:"ariaLabelledBy",ariaLabel:"ariaLabel",tabindex:[2,"tabindex","tabindex",Te],inputId:"inputId",inputStyle:"inputStyle",styleClass:"styleClass",inputClass:"inputClass",indeterminate:[2,"indeterminate","indeterminate",G],formControl:"formControl",checkboxIcon:"checkboxIcon",readonly:[2,"readonly","readonly",G],autofocus:[2,"autofocus","autofocus",G],trueValue:"trueValue",falseValue:"falseValue",variant:[1,"variant"],size:[1,"size"]},outputs:{onChange:"onChange",onFocus:"onFocus",onBlur:"onBlur"},features:[ve([U3,Jb,{provide:ev,useExisting:t},{provide:ut,useExisting:t}]),lt([de]),Y],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&&(f(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)}),_(),f(2,"div",2),S(3,z3,3,2,"ng-container",3)(4,q3,1,0,null,4),_()),n&2&&(St(i.inputStyle),B(i.cn(i.cx("input"),i.inputClass)),h("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),B(i.cx("box")),h("pBind",i.ptm("box")),O("data-p",i.dataP),l(),h("ngIf",!i.checkboxIconTemplate&&!i._checkboxIconTemplate),l(),h("ngTemplateOutlet",i.checkboxIconTemplate||i._checkboxIconTemplate)("ngTemplateOutletContext",N0(22,N3,i.checked,i.cx("icon"),i.dataP)))},dependencies:[ot,an,kt,xt,Se,lb,Ub,zt,de],encapsulation:2,changeDetection:0})}return t})(),nv=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=nt({type:t});static \u0275inj=tt({imports:[tv,Se,Se]})}return t})();var iv=`
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 W3=["date"],K3=["header"],Y3=["footer"],Z3=["disabledDate"],X3=["decade"],Q3=["previousicon"],J3=["nexticon"],eR=["triggericon"],tR=["clearicon"],nR=["decrementicon"],iR=["incrementicon"],oR=["inputicon"],rR=["buttonbar"],aR=["inputfield"],sR=["contentWrapper"],lR=[[["p-header"]],[["p-footer"]]],cR=["p-header","p-footer"],dR=t=>({clickCallBack:t}),ov=t=>({visibility:t}),Kf=t=>({$implicit:t}),uR=t=>({date:t}),pR=(t,o)=>({month:t,index:o}),hR=t=>({year:t}),fR=(t,o)=>({todayCallback:t,clearCallback:o});function mR(t,o){if(t&1){let e=te();K(),f(0,"svg",13),A("click",function(){w(e);let i=d(3);return T(i.clear())}),_()}if(t&2){let e=d(3);B(e.cx("clearIcon")),h("pBind",e.ptm("inputIcon"))}}function _R(t,o){}function gR(t,o){t&1&&S(0,_R,0,0,"ng-template")}function bR(t,o){if(t&1){let e=te();f(0,"span",14),A("click",function(){w(e);let i=d(3);return T(i.clear())}),S(1,gR,1,0,null,6),_()}if(t&2){let e=d(3);B(e.cx("clearIcon")),h("pBind",e.ptm("inputIcon")),l(),h("ngTemplateOutlet",e.clearIconTemplate||e._clearIconTemplate)}}function vR(t,o){if(t&1&&(se(0),S(1,mR,1,3,"svg",11)(2,bR,2,4,"span",12),le()),t&2){let e=d(2);l(),h("ngIf",!e.clearIconTemplate&&!e._clearIconTemplate),l(),h("ngIf",e.clearIconTemplate||e._clearIconTemplate)}}function yR(t,o){if(t&1&&F(0,"span",17),t&2){let e=d(3);h("ngClass",e.icon)("pBind",e.ptm("dropdownIcon"))}}function CR(t,o){if(t&1&&(K(),F(0,"svg",19)),t&2){let e=d(4);h("pBind",e.ptm("dropdownIcon"))}}function xR(t,o){}function wR(t,o){t&1&&S(0,xR,0,0,"ng-template")}function TR(t,o){if(t&1&&(se(0),S(1,CR,1,1,"svg",18)(2,wR,1,0,null,6),le()),t&2){let e=d(3);l(),h("ngIf",!e.triggerIconTemplate&&!e._triggerIconTemplate),l(),h("ngTemplateOutlet",e.triggerIconTemplate||e._triggerIconTemplate)}}function SR(t,o){if(t&1){let e=te();f(0,"button",15),A("click",function(i){w(e),d();let r=Lt(1),a=d();return T(a.onButtonClick(i,r))}),S(1,yR,1,2,"span",16)(2,TR,3,2,"ng-container",7),_()}if(t&2){let e=d(2);B(e.cx("dropdown")),h("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(),h("ngIf",e.icon),l(),h("ngIf",!e.icon)}}function kR(t,o){if(t&1){let e=te();K(),f(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);B(e.cx("inputIcon")),h("pBind",e.ptm("inputIcon"))}}function IR(t,o){t&1&&me(0)}function ER(t,o){if(t&1&&(se(0),f(1,"span",20),S(2,kR,1,3,"svg",21)(3,IR,1,0,"ng-container",22),_(),le()),t&2){let e=d(2);l(),B(e.cx("inputIconContainer")),h("pBind",e.ptm("inputIconContainer")),O("data-p",e.inputIconDataP),l(),h("ngIf",!e.inputIconTemplate&&!e._inputIconTemplate),l(),h("ngTemplateOutlet",e.inputIconTemplate||e._inputIconTemplate)("ngTemplateOutletContext",Fe(7,dR,e.onButtonClick.bind(e)))}}function MR(t,o){if(t&1){let e=te();f(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))}),_(),S(2,vR,3,2,"ng-container",7)(3,SR,3,9,"button",10)(4,ER,4,9,"ng-container",7)}if(t&2){let e=d();B(e.cn(e.cx("pcInputText"),e.inputStyleClass)),h("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),h("ngIf",e.showClear&&!e.$disabled()&&(e.inputfieldViewChild==null||e.inputfieldViewChild.nativeElement==null?null:e.inputfieldViewChild.nativeElement.value)),l(),h("ngIf",e.showIcon&&e.iconDisplay==="button"),l(),h("ngIf",e.iconDisplay==="input"&&e.showIcon)}}function DR(t,o){t&1&&me(0)}function PR(t,o){t&1&&(K(),F(0,"svg",30))}function RR(t,o){}function OR(t,o){t&1&&S(0,RR,0,0,"ng-template")}function FR(t,o){if(t&1&&(f(0,"span"),S(1,OR,1,0,null,6),_()),t&2){let e=d(4);l(),h("ngTemplateOutlet",e.previousIconTemplate||e._previousIconTemplate)}}function NR(t,o){if(t&1&&S(0,PR,1,0,"svg",29)(1,FR,2,1,"span",7),t&2){let e=d(3);h("ngIf",!e.previousIconTemplate&&!e._previousIconTemplate),l(),h("ngIf",e.previousIconTemplate||e._previousIconTemplate)}}function AR(t,o){if(t&1){let e=te();f(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);B(n.cx("selectMonth")),h("pBind",n.ptm("selectMonth")),O("disabled",n.switchViewButtonDisabled()?"":void 0)("aria-label",n.getTranslation("chooseMonth"))("data-pc-group-section","navigator"),l(),Me(" ",n.getMonthName(e.month)," ")}}function LR(t,o){if(t&1){let e=te();f(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);B(n.cx("selectYear")),h("pBind",n.ptm("selectYear")),O("disabled",n.switchViewButtonDisabled()?"":void 0)("aria-label",n.getTranslation("chooseYear"))("data-pc-group-section","navigator"),l(),Me(" ",n.getYear(e)," ")}}function BR(t,o){if(t&1&&(se(0),b(1),le()),t&2){let e=d(4);l(),lr("",e.yearPickerValues()[0]," - ",e.yearPickerValues()[e.yearPickerValues().length-1])}}function VR(t,o){t&1&&me(0)}function zR(t,o){if(t&1&&(f(0,"span",20),S(1,BR,2,2,"ng-container",7)(2,VR,1,0,"ng-container",22),_()),t&2){let e=d(3);B(e.cx("decade")),h("pBind",e.ptm("decade")),l(),h("ngIf",!e.decadeTemplate&&!e._decadeTemplate),l(),h("ngTemplateOutlet",e.decadeTemplate||e._decadeTemplate)("ngTemplateOutletContext",Fe(6,Kf,e.yearPickerValues))}}function HR(t,o){t&1&&(K(),F(0,"svg",33))}function qR(t,o){}function GR(t,o){t&1&&S(0,qR,0,0,"ng-template")}function jR(t,o){if(t&1&&(se(0),S(1,GR,1,0,null,6),le()),t&2){let e=d(4);l(),h("ngTemplateOutlet",e.nextIconTemplate||e._nextIconTemplate)}}function UR(t,o){if(t&1&&S(0,HR,1,0,"svg",32)(1,jR,2,1,"ng-container",7),t&2){let e=d(3);h("ngIf",!e.nextIconTemplate&&!e._nextIconTemplate),l(),h("ngIf",e.nextIconTemplate||e._nextIconTemplate)}}function $R(t,o){if(t&1&&(f(0,"th",20)(1,"span",20),b(2),_()()),t&2){let e=d(4);B(e.cx("weekHeader")),h("pBind",e.ptm("weekHeader")),l(),h("pBind",e.ptm("weekHeaderLabel")),l(),C(e.getTranslation("weekHeader"))}}function WR(t,o){if(t&1&&(f(0,"th",37)(1,"span",20),b(2),_()()),t&2){let e=o.$implicit,n=d(4);B(n.cx("weekDayCell")),h("pBind",n.ptm("weekDayCell")),l(),B(n.cx("weekDay")),h("pBind",n.ptm("weekDay")),l(),C(e)}}function KR(t,o){if(t&1&&(f(0,"td",20)(1,"span",20),b(2),_()()),t&2){let e=d().index,n=d(2).$implicit,i=d(2);B(i.cx("weekNumber")),h("pBind",i.ptm("weekNumber")),l(),B(i.cx("weekLabelContainer")),h("pBind",i.ptm("weekLabelContainer")),l(),Me(" ",n.weekNumbers[e]," ")}}function YR(t,o){if(t&1&&(se(0),b(1),le()),t&2){let e=d(2).$implicit;l(),C(e.day)}}function ZR(t,o){t&1&&me(0)}function XR(t,o){if(t&1&&(se(0),S(1,ZR,1,0,"ng-container",22),le()),t&2){let e=d(2).$implicit,n=d(5);l(),h("ngTemplateOutlet",n.dateTemplate||n._dateTemplate)("ngTemplateOutletContext",Fe(2,Kf,e))}}function QR(t,o){t&1&&me(0)}function JR(t,o){if(t&1&&(se(0),S(1,QR,1,0,"ng-container",22),le()),t&2){let e=d(2).$implicit,n=d(5);l(),h("ngTemplateOutlet",n.disabledDateTemplate||n._disabledDateTemplate)("ngTemplateOutletContext",Fe(2,Kf,e))}}function eO(t,o){if(t&1&&(f(0,"div",40),b(1),_()),t&2){let e=d(2).$implicit;l(),Me(" ",e.day," ")}}function tO(t,o){if(t&1){let e=te();se(0),f(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))}),S(2,YR,2,1,"ng-container",7)(3,XR,2,4,"ng-container",7)(4,JR,2,4,"ng-container",7),_(),S(5,eO,2,1,"div",39),le()}if(t&2){let e=d().$implicit,n=d(5);l(),h("ngClass",n.dayClass(e))("pBind",n.ptm("day")),O("data-date",n.formatDateKey(n.formatDateMetaToDate(e))),l(),h("ngIf",!n.dateTemplate&&!n._dateTemplate&&(e.selectable||!n.disabledDateTemplate&&!n._disabledDateTemplate)),l(),h("ngIf",e.selectable||!n.disabledDateTemplate&&!n._disabledDateTemplate),l(),h("ngIf",!e.selectable),l(),h("ngIf",n.isSelected(e))}}function nO(t,o){if(t&1&&(f(0,"td",20),S(1,tO,6,7,"ng-container",7),_()),t&2){let e=o.$implicit,n=d(5);B(n.cx("dayCell",Fe(5,uR,e))),h("pBind",n.ptm("dayCell")),O("aria-label",e.day),l(),h("ngIf",e.otherMonth?n.showOtherMonths:!0)}}function iO(t,o){if(t&1&&(f(0,"tr",20),S(1,KR,3,7,"td",8)(2,nO,2,7,"td",24),_()),t&2){let e=o.$implicit,n=d(4);h("pBind",n.ptm("tableBodyRow")),l(),h("ngIf",n.showWeek),l(),h("ngForOf",e)}}function oO(t,o){if(t&1&&(f(0,"table",34)(1,"thead",20)(2,"tr",20),S(3,$R,3,5,"th",8)(4,WR,3,7,"th",35),_()(),f(5,"tbody",20),S(6,iO,3,3,"tr",36),_()()),t&2){let e=d().$implicit,n=d(2);B(n.cx("dayView")),h("pBind",n.ptm("table")),l(),h("pBind",n.ptm("tableHeader")),l(),h("pBind",n.ptm("tableHeaderRow")),l(),h("ngIf",n.showWeek),l(),h("ngForOf",n.weekDays),l(),h("pBind",n.ptm("tableBody")),l(),h("ngForOf",e.dates)}}function rO(t,o){if(t&1){let e=te();f(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))}),S(3,NR,2,2,"ng-template",null,2,We),_(),f(5,"div",20),S(6,AR,2,7,"button",26)(7,LR,2,7,"button",26)(8,zR,3,8,"span",8),_(),f(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))}),S(10,UR,2,2,"ng-template",null,2,We),_()(),S(12,oO,7,9,"table",28),_()}if(t&2){let e=o.index,n=d(2);B(n.cx("calendar")),h("pBind",n.ptm("calendar")),l(),B(n.cx("header")),h("pBind",n.ptm("header")),l(),h("styleClass",n.cx("pcPrevButton"))("ngStyle",Fe(23,ov,e===0?"visible":"hidden"))("ariaLabel",n.prevIconAriaLabel)("pt",n.ptm("pcPrevButton")),O("data-pc-group-section","navigator"),l(3),B(n.cx("title")),h("pBind",n.ptm("title")),l(),h("ngIf",n.currentView==="date"),l(),h("ngIf",n.currentView!=="year"),l(),h("ngIf",n.currentView==="year"),l(),h("styleClass",n.cx("pcNextButton"))("ngStyle",Fe(25,ov,e===n.months.length-1?"visible":"hidden"))("ariaLabel",n.nextIconAriaLabel)("pt",n.ptm("pcNextButton")),O("data-pc-group-section","navigator"),l(3),h("ngIf",n.currentView==="date")}}function aO(t,o){if(t&1&&(f(0,"div",40),b(1),_()),t&2){let e=d().$implicit;l(),Me(" ",e," ")}}function sO(t,o){if(t&1){let e=te();f(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),S(2,aO,2,1,"div",39),_()}if(t&2){let e=o.$implicit,n=o.index,i=d(3);B(i.cx("month",Yn(5,pR,e,n))),h("pBind",i.ptm("month")),l(),Me(" ",e," "),l(),h("ngIf",i.isMonthSelected(n))}}function lO(t,o){if(t&1&&(f(0,"div",20),S(1,sO,3,8,"span",41),_()),t&2){let e=d(2);B(e.cx("monthView")),h("pBind",e.ptm("monthView")),l(),h("ngForOf",e.monthPickerValues())}}function cO(t,o){if(t&1&&(f(0,"div",40),b(1),_()),t&2){let e=d().$implicit;l(),Me(" ",e," ")}}function dO(t,o){if(t&1){let e=te();f(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),S(2,cO,2,1,"div",39),_()}if(t&2){let e=o.$implicit,n=d(3);B(n.cx("year",Fe(5,hR,e))),h("pBind",n.ptm("year")),l(),Me(" ",e," "),l(),h("ngIf",n.isYearSelected(e))}}function uO(t,o){if(t&1&&(f(0,"div",20),S(1,dO,3,7,"span",41),_()),t&2){let e=d(2);B(e.cx("yearView")),h("pBind",e.ptm("yearView")),l(),h("ngForOf",e.yearPickerValues())}}function pO(t,o){if(t&1&&(se(0),f(1,"div",20),S(2,rO,13,27,"div",24),_(),S(3,lO,2,4,"div",8)(4,uO,2,4,"div",8),le()),t&2){let e=d();l(),B(e.cx("calendarContainer")),h("pBind",e.ptm("calendarContainer")),l(),h("ngForOf",e.months),l(),h("ngIf",e.currentView==="month"),l(),h("ngIf",e.currentView==="year")}}function hO(t,o){if(t&1&&(K(),F(0,"svg",46)),t&2){let e=d(3);h("pBind",e.ptm("pcIncrementButton").icon)}}function fO(t,o){}function mO(t,o){t&1&&S(0,fO,0,0,"ng-template")}function _O(t,o){if(t&1&&S(0,hO,1,1,"svg",45)(1,mO,1,0,null,6),t&2){let e=d(2);h("ngIf",!e.incrementIconTemplate&&!e._incrementIconTemplate),l(),h("ngTemplateOutlet",e.incrementIconTemplate||e._incrementIconTemplate)}}function gO(t,o){t&1&&(se(0),b(1,"0"),le())}function bO(t,o){if(t&1&&(K(),F(0,"svg",48)),t&2){let e=d(3);h("pBind",e.ptm("pcDecrementButton").icon)}}function vO(t,o){}function yO(t,o){t&1&&S(0,vO,0,0,"ng-template")}function CO(t,o){if(t&1&&S(0,bO,1,1,"svg",47)(1,yO,1,0,null,6),t&2){let e=d(2);h("ngIf",!e.decrementIconTemplate&&!e._decrementIconTemplate),l(),h("ngTemplateOutlet",e.decrementIconTemplate||e._decrementIconTemplate)}}function xO(t,o){if(t&1&&(K(),F(0,"svg",46)),t&2){let e=d(3);h("pBind",e.ptm("pcIncrementButton").icon)}}function wO(t,o){}function TO(t,o){t&1&&S(0,wO,0,0,"ng-template")}function SO(t,o){if(t&1&&S(0,xO,1,1,"svg",45)(1,TO,1,0,null,6),t&2){let e=d(2);h("ngIf",!e.incrementIconTemplate&&!e._incrementIconTemplate),l(),h("ngTemplateOutlet",e.incrementIconTemplate||e._incrementIconTemplate)}}function kO(t,o){t&1&&(se(0),b(1,"0"),le())}function IO(t,o){if(t&1&&(K(),F(0,"svg",48)),t&2){let e=d(3);h("pBind",e.ptm("pcDecrementButton").icon)}}function EO(t,o){}function MO(t,o){t&1&&S(0,EO,0,0,"ng-template")}function DO(t,o){if(t&1&&S(0,IO,1,1,"svg",47)(1,MO,1,0,null,6),t&2){let e=d(2);h("ngIf",!e.decrementIconTemplate&&!e._decrementIconTemplate),l(),h("ngTemplateOutlet",e.decrementIconTemplate||e._decrementIconTemplate)}}function PO(t,o){if(t&1&&(f(0,"div",20)(1,"span",20),b(2),_()()),t&2){let e=d(2);B(e.cx("separator")),h("pBind",e.ptm("separatorContainer")),l(),h("pBind",e.ptm("separator")),l(),C(e.timeSeparator)}}function RO(t,o){if(t&1&&(K(),F(0,"svg",46)),t&2){let e=d(4);h("pBind",e.ptm("pcIncrementButton").icon)}}function OO(t,o){}function FO(t,o){t&1&&S(0,OO,0,0,"ng-template")}function NO(t,o){if(t&1&&S(0,RO,1,1,"svg",45)(1,FO,1,0,null,6),t&2){let e=d(3);h("ngIf",!e.incrementIconTemplate&&!e._incrementIconTemplate),l(),h("ngTemplateOutlet",e.incrementIconTemplate||e._incrementIconTemplate)}}function AO(t,o){t&1&&(se(0),b(1,"0"),le())}function LO(t,o){if(t&1&&(K(),F(0,"svg",48)),t&2){let e=d(4);h("pBind",e.ptm("pcDecrementButton").icon)}}function BO(t,o){}function VO(t,o){t&1&&S(0,BO,0,0,"ng-template")}function zO(t,o){if(t&1&&S(0,LO,1,1,"svg",47)(1,VO,1,0,null,6),t&2){let e=d(3);h("ngIf",!e.decrementIconTemplate&&!e._decrementIconTemplate),l(),h("ngTemplateOutlet",e.decrementIconTemplate||e._decrementIconTemplate)}}function HO(t,o){if(t&1){let e=te();f(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())}),S(2,NO,2,2,"ng-template",null,2,We),_(),f(4,"span",20),S(5,AO,2,0,"ng-container",7),b(6),_(),f(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())}),S(8,zO,2,2,"ng-template",null,2,We),_()()}if(t&2){let e=d(2);B(e.cx("secondPicker")),h("pBind",e.ptm("secondPicker")),l(),h("styleClass",e.cx("pcIncrementButton"))("pt",e.ptm("pcIncrementButton")),O("aria-label",e.getTranslation("nextSecond"))("data-pc-group-section","timepickerbutton"),l(3),h("pBind",e.ptm("second")),l(),h("ngIf",e.currentSecond<10),l(),C(e.currentSecond),l(),h("styleClass",e.cx("pcDecrementButton"))("pt",e.ptm("pcDecrementButton")),O("aria-label",e.getTranslation("prevSecond"))("data-pc-group-section","timepickerbutton")}}function qO(t,o){if(t&1&&(f(0,"div",20)(1,"span",20),b(2),_()()),t&2){let e=d(2);B(e.cx("separator")),h("pBind",e.ptm("separatorContainer")),l(),h("pBind",e.ptm("separator")),l(),C(e.timeSeparator)}}function GO(t,o){if(t&1&&(K(),F(0,"svg",46)),t&2){let e=d(4);h("pBind",e.ptm("pcIncrementButton").icon)}}function jO(t,o){}function UO(t,o){t&1&&S(0,jO,0,0,"ng-template")}function $O(t,o){if(t&1&&S(0,GO,1,1,"svg",45)(1,UO,1,0,null,6),t&2){let e=d(3);h("ngIf",!e.incrementIconTemplate&&!e._incrementIconTemplate),l(),h("ngTemplateOutlet",e.incrementIconTemplate||e._incrementIconTemplate)}}function WO(t,o){if(t&1&&(K(),F(0,"svg",48)),t&2){let e=d(4);h("pBind",e.ptm("pcDecrementButton").icon)}}function KO(t,o){}function YO(t,o){t&1&&S(0,KO,0,0,"ng-template")}function ZO(t,o){if(t&1&&S(0,WO,1,1,"svg",47)(1,YO,1,0,null,6),t&2){let e=d(3);h("ngIf",!e.decrementIconTemplate&&!e._decrementIconTemplate),l(),h("ngTemplateOutlet",e.decrementIconTemplate||e._decrementIconTemplate)}}function XO(t,o){if(t&1){let e=te();f(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))}),S(2,$O,2,2,"ng-template",null,2,We),_(),f(4,"span",20),b(5),_(),f(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))}),S(7,ZO,2,2,"ng-template",null,2,We),_()()}if(t&2){let e=d(2);B(e.cx("ampmPicker")),h("pBind",e.ptm("ampmPicker")),l(),h("styleClass",e.cx("pcIncrementButton"))("pt",e.ptm("pcIncrementButton")),O("aria-label",e.getTranslation("am"))("data-pc-group-section","timepickerbutton"),l(3),h("pBind",e.ptm("ampm")),l(),C(e.pm?"PM":"AM"),l(),h("styleClass",e.cx("pcDecrementButton"))("pt",e.ptm("pcDecrementButton")),O("aria-label",e.getTranslation("pm"))("data-pc-group-section","timepickerbutton")}}function QO(t,o){if(t&1){let e=te();f(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())}),S(3,_O,2,2,"ng-template",null,2,We),_(),f(5,"span",20),S(6,gO,2,0,"ng-container",7),b(7),_(),f(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())}),S(9,CO,2,2,"ng-template",null,2,We),_()(),f(11,"div",44)(12,"span",20),b(13),_()(),f(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())}),S(16,SO,2,2,"ng-template",null,2,We),_(),f(18,"span",20),S(19,kO,2,0,"ng-container",7),b(20),_(),f(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())}),S(22,DO,2,2,"ng-template",null,2,We),_()(),S(24,PO,3,5,"div",8)(25,HO,10,14,"div",8)(26,qO,3,5,"div",8)(27,XO,9,13,"div",8),_()}if(t&2){let e=d();B(e.cx("timePicker")),h("pBind",e.ptm("timePicker")),l(),B(e.cx("hourPicker")),h("pBind",e.ptm("hourPicker")),l(),h("styleClass",e.cx("pcIncrementButton"))("pt",e.ptm("pcIncrementButton")),O("aria-label",e.getTranslation("nextHour"))("data-pc-group-section","timepickerbutton"),l(3),h("pBind",e.ptm("hour")),l(),h("ngIf",e.currentHour<10),l(),C(e.currentHour),l(),h("styleClass",e.cx("pcDecrementButton"))("pt",e.ptm("pcDecrementButton")),O("aria-label",e.getTranslation("prevHour"))("data-pc-group-section","timepickerbutton"),l(3),h("pBind",e.ptm("separatorContainer")),l(),h("pBind",e.ptm("separator")),l(),C(e.timeSeparator),l(),B(e.cx("minutePicker")),h("pBind",e.ptm("minutePicker")),l(),h("styleClass",e.cx("pcIncrementButton"))("pt",e.ptm("pcIncrementButton")),O("aria-label",e.getTranslation("nextMinute"))("data-pc-group-section","timepickerbutton"),l(3),h("pBind",e.ptm("minute")),l(),h("ngIf",e.currentMinute<10),l(),C(e.currentMinute),l(),h("styleClass",e.cx("pcDecrementButton"))("pt",e.ptm("pcDecrementButton")),O("aria-label",e.getTranslation("prevMinute"))("data-pc-group-section","timepickerbutton"),l(3),h("ngIf",e.showSeconds),l(),h("ngIf",e.showSeconds),l(),h("ngIf",e.hourFormat=="12"),l(),h("ngIf",e.hourFormat=="12")}}function JO(t,o){t&1&&me(0)}function eF(t,o){if(t&1&&S(0,JO,1,0,"ng-container",22),t&2){let e=d(2);h("ngTemplateOutlet",e.buttonBarTemplate||e._buttonBarTemplate)("ngTemplateOutletContext",Yn(2,fR,e.onTodayButtonClick.bind(e),e.onClearButtonClick.bind(e)))}}function tF(t,o){if(t&1){let e=te();f(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))}),_(),f(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);h("styleClass",e.cx("pcTodayButton"))("label",e.getTranslation("today"))("ngClass",e.todayButtonStyleClass)("pt",e.ptm("pcTodayButton")),O("data-pc-group-section","button"),l(),h("styleClass",e.cx("pcClearButton"))("label",e.getTranslation("clear"))("ngClass",e.clearButtonStyleClass)("pt",e.ptm("pcClearButton")),O("data-pc-group-section","button")}}function nF(t,o){if(t&1&&(f(0,"div",20),P(1,eF,1,5,"ng-container")(2,tF,2,10),_()),t&2){let e=d();B(e.cx("buttonbar")),h("pBind",e.ptm("buttonbar")),l(),R(e.buttonBarTemplate||e._buttonBarTemplate?1:2)}}function iF(t,o){t&1&&me(0)}var oF=`
1217
- ${iv}
1218
-
1219
- /* For PrimeNG */
1220
- .p-datepicker.ng-invalid.ng-dirty .p-inputtext {
1221
- border-color: dt('inputtext.invalid.border.color');
1222
- }
1223
- `,rF={root:()=>({position:"relative"})},aF={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"},rv=(()=>{class t extends dt{name="datepicker";style=oF;classes=aF;inlineStyles=rF;static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})();var sF={provide:Xn,useExisting:Sn(()=>sv),multi:!0},av=new ue("DATEPICKER_INSTANCE"),sv=(()=>{class t extends us{zone;overlayService;componentName="DatePicker";bindDirectiveInstance=p(de,{self:!0});$pcDatePicker=p(av,{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=H(void 0);motionOptions=H(void 0);computedMotionOptions=E(()=>ye(ye({},this.ptm("motion")),this.motionOptions()));onFocus=new ie;onBlur=new ie;onClose=new ie;onSelect=new ie;onClear=new ie;onInput=new ie;onTodayClick=new ie;onClearClick=new ie;onMonthChange=new ie;onYearChange=new ie;onClickOutside=new ie;onShow=new ie;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(rv);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=ct("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=L0(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(Bt.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,m=[],g=Math.ceil((a+r)/7);for(let x=0;x<g;x++){let I=[];if(x==0){for(let N=s-r+1;N<=s;N++){let j=this.getPreviousMonthAndYear(e,n);I.push({day:N,month:j.month,year:j.year,otherMonth:!0,today:this.isToday(u,N,j.month,j.year),selectable:this.isSelectable(N,j.month,j.year,!0)})}let k=7-I.length;for(let N=0;N<k;N++)I.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 k=0;k<7;k++){if(c>a){let N=this.getNextMonthAndYear(e,n);I.push({day:c-a,month:N.month,year:N.year,otherMonth:!0,today:this.isToday(u,c-a,N.month,N.year),selectable:this.isSelectable(c-a,N.month,N.year,!0)})}else I.push({day:c,month:e,year:n,today:this.isToday(u,c,e,n),selectable:this.isSelectable(c,e,n,!1)});c++}this.showWeek&&m.push(this.getWeekNumber(new Date(I[0].year,I[0].month,I[0].day))),i.push(I)}return{month:e,year:n,dates:i,weekNumbers:m}}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&&fr(e)?e.getDate()===n.day&&e.getMonth()===n.month&&e.getFullYear()===n.year:!1}isDateBetween(e,n,i){let r=!1;if(fr(e)&&fr(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=vt(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&&(Bf(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 k=pr(a),N=a.parentElement.nextElementSibling;if(N){let j=N.children[k].children[0];yn(j,"p-disabled")?(this.navigationState={backward:!1},this.navForward(e)):(N.children[k].children[0].tabIndex="0",N.children[k].children[0].focus())}else this.navigationState={backward:!1},this.navForward(e);e.preventDefault();break}case 38:{r.tabIndex="-1";let k=pr(a),N=a.parentElement.previousElementSibling;if(N){let j=N.children[k].children[0];yn(j,"p-disabled")?(this.navigationState={backward:!0},this.navBackward(e)):(j.tabIndex="0",j.focus())}else this.navigationState={backward:!0},this.navBackward(e);e.preventDefault();break}case 37:{r.tabIndex="-1";let k=a.previousElementSibling;if(k){let N=k.children[0];yn(N,"p-disabled")||yn(N.parentElement,"p-datepicker-weeknumber")?this.navigateToMonth(!0,i):(N.tabIndex="0",N.focus())}else this.navigateToMonth(!0,i);e.preventDefault();break}case 39:{r.tabIndex="-1";let k=a.nextElementSibling;if(k){let N=k.children[0];yn(N,"p-disabled")?this.navigateToMonth(!1,i):(N.tabIndex="0",N.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 k=new Date(s.getFullYear(),s.getMonth()-1,s.getDate()),N=this.formatDateKey(k);this.navigateToMonth(!0,i,`span[data-date='${N}']:not(.p-disabled):not(.p-ink)`),e.preventDefault();break}case 34:{r.tabIndex="-1";let k=new Date(s.getFullYear(),s.getMonth()+1,s.getDate()),N=this.formatDateKey(k);this.navigateToMonth(!1,i,`span[data-date='${N}']: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),m=vt(r.offsetParent,`span[data-date='${u}']:not(.p-disabled):not(.p-ink)`);m&&(m.tabIndex="0",m.focus()),e.preventDefault();break;case 35:r.tabIndex="-1";let g=new Date(s.getFullYear(),s.getMonth()+1,0),x=this.formatDateKey(g),I=vt(r.offsetParent,`span[data-date='${x}']:not(.p-disabled):not(.p-ink)`);g&&(I.tabIndex="0",I.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=pr(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=pr(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=vt(r,i);a.tabIndex="0",a.focus()}else{let a=En(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=vt(r,i);a.tabIndex="0",a.focus()}else{let a=vt(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?vt(this.contentViewChild.nativeElement,".p-datepicker-prev-button").focus():vt(this.contentViewChild.nativeElement,".p-datepicker-next-button").focus();else{if(this.navigationState.backward){let n;this.currentView==="month"?n=En(this.contentViewChild.nativeElement,".p-datepicker-month-view .p-datepicker-month:not(.p-disabled)"):this.currentView==="year"?n=En(this.contentViewChild.nativeElement,".p-datepicker-year-view .p-datepicker-year:not(.p-disabled)"):n=En(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=vt(this.contentViewChild.nativeElement,".p-datepicker-month-view .p-datepicker-month:not(.p-disabled)"):this.currentView==="year"?e=vt(this.contentViewChild.nativeElement,".p-datepicker-year-view .p-datepicker-year:not(.p-disabled)"):e=vt(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=En(e,".p-datepicker-month-view .p-datepicker-month:not(.p-disabled)"),r=vt(e,".p-datepicker-month-view .p-datepicker-month.p-highlight");i.forEach(a=>a.tabIndex=-1),n=r||i[0],i.length===0&&En(e,'.p-datepicker-month-view .p-datepicker-month.p-disabled[tabindex = "0"]').forEach(s=>s.tabIndex=-1)}else if(this.currentView==="year"){let i=En(e,".p-datepicker-year-view .p-datepicker-year:not(.p-disabled)"),r=vt(e,".p-datepicker-year-view .p-datepicker-year.p-highlight");i.forEach(a=>a.tabIndex=-1),n=r||i[0],i.length===0&&En(e,'.p-datepicker-year-view .p-datepicker-year.p-disabled[tabindex = "0"]').forEach(s=>s.tabIndex=-1)}else if(n=vt(e,"span.p-highlight"),!n){let i=vt(e,"td.p-datepicker-today span:not(.p-disabled):not(.p-ink)");i?n=i:n=vt(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=Bf(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),m=this.isRangeSelection(),g=this.isMultipleSelection();(m||g)&&(this.value||(this.value=[new Date,new Date]),m&&(c=this.value[1]||this.value[0]),g&&(c=this.value[this.value.length-1]));let I=c?c.toDateString():null,k=this.minDate&&I&&this.minDate.toDateString()===I,N=this.maxDate&&I&&this.maxDate.toDateString()===I;switch(k&&(s=this.minDate.getHours()>=12),!0){case(k&&s&&this.minDate.getHours()===12&&this.minDate.getHours()>u):a[0]=11;case(k&&this.minDate.getHours()===u&&this.minDate.getMinutes()>n):a[1]=this.minDate.getMinutes();case(k&&this.minDate.getHours()===u&&this.minDate.getMinutes()===n&&this.minDate.getSeconds()>i):a[2]=this.minDate.getSeconds();break;case(k&&!s&&this.minDate.getHours()-1===u&&this.minDate.getHours()>u):a[0]=11,this.pm=!0;case(k&&this.minDate.getHours()===u&&this.minDate.getMinutes()>n):a[1]=this.minDate.getMinutes();case(k&&this.minDate.getHours()===u&&this.minDate.getMinutes()===n&&this.minDate.getSeconds()>i):a[2]=this.minDate.getSeconds();break;case(k&&s&&this.minDate.getHours()>u&&u!==12):this.setCurrentHourPM(this.minDate.getHours()),a[0]=this.currentHour||0;case(k&&this.minDate.getHours()===u&&this.minDate.getMinutes()>n):a[1]=this.minDate.getMinutes();case(k&&this.minDate.getHours()===u&&this.minDate.getMinutes()===n&&this.minDate.getSeconds()>i):a[2]=this.minDate.getSeconds();break;case(k&&this.minDate.getHours()>u):a[0]=this.minDate.getHours();case(k&&this.minDate.getHours()===u&&this.minDate.getMinutes()>n):a[1]=this.minDate.getMinutes();case(k&&this.minDate.getHours()===u&&this.minDate.getMinutes()===n&&this.minDate.getSeconds()>i):a[2]=this.minDate.getSeconds();break;case(N&&this.maxDate.getHours()<u):a[0]=this.maxDate.getHours();case(N&&this.maxDate.getHours()===u&&this.maxDate.getMinutes()<n):a[1]=this.maxDate.getMinutes();case(N&&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 fr(e)&&q0(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`};Lf(this.overlay,n||{}),this.appendOverlay(),this.alignOverlay(),this.setZIndex(),this.updateFocus(),this.bindListeners(),this.onShow.emit(e.element)}onOverlayAfterLeave(e){this.autoZIndex&&Mn.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):Di(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"?ur(this.overlay,this.inputfieldViewChild?.nativeElement):B0(this.overlay,this.inputfieldViewChild?.nativeElement))}bindListeners(){this.bindDocumentClickListener(),this.bindDocumentResizeListener(),this.bindScrollListener()}setZIndex(){this.autoZIndex&&(this.touchUI?Mn.set("modal",this.overlay,this.baseZIndex||this.config.zIndex.modal):Mn.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)),dr(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),eb())}disableModality(){this.mask&&(dr(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(yn(r,"p-datepicker-mask-scrollblocker")){n=!0;break}}n||tb(),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(Bt.FIRST_DAY_OF_WEEK)}formatDate(e,n){if(!e)return"";let i,r=m=>{let g=i+1<n.length&&n.charAt(i+1)===m;return g&&i++,g},a=(m,g,x)=>{let I=""+g;if(r(m))for(;I.length<x;)I="0"+I;return I},s=(m,g,x,I)=>r(m)?I[g]:x[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(Bt.DAY_NAMES_SHORT),this.getTranslation(Bt.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(Bt.MONTH_NAMES_SHORT),this.getTranslation(Bt.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,m=-1,g=-1,x=-1,I=!1,k,N=pe=>{let Oe=i+1<n.length&&n.charAt(i+1)===pe;return Oe&&i++,Oe},j=pe=>{let Oe=N(pe),Pe=pe==="@"?14:pe==="!"?20:pe==="y"&&Oe?4:pe==="o"?3:2,Ge=pe==="y"?Pe:1,Gt=new RegExp("^\\d{"+Ge+","+Pe+"}"),_t=e.substring(s).match(Gt);if(!_t)throw"Missing number at position "+s;return s+=_t[0].length,parseInt(_t[0],10)},X=(pe,Oe,Pe)=>{let Ge=-1,Gt=N(pe)?Pe:Oe,_t=[];for(let Tt=0;Tt<Gt.length;Tt++)_t.push([Tt,Gt[Tt]]);_t.sort((Tt,rt)=>-(Tt[1].length-rt[1].length));for(let Tt=0;Tt<_t.length;Tt++){let rt=_t[Tt][1];if(e.substr(s,rt.length).toLowerCase()===rt.toLowerCase()){Ge=_t[Tt][0],s+=rt.length;break}}if(Ge!==-1)return Ge+1;throw"Unknown name at position "+s},ne=()=>{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(I)n.charAt(i)==="'"&&!N("'")?I=!1:ne();else switch(n.charAt(i)){case"d":g=j("d");break;case"D":X("D",this.getTranslation(Bt.DAY_NAMES_SHORT),this.getTranslation(Bt.DAY_NAMES));break;case"o":x=j("o");break;case"m":m=j("m");break;case"M":m=X("M",this.getTranslation(Bt.MONTH_NAMES_SHORT),this.getTranslation(Bt.MONTH_NAMES));break;case"y":u=j("y");break;case"@":k=new Date(j("@")),u=k.getFullYear(),m=k.getMonth()+1,g=k.getDate();break;case"!":k=new Date((j("!")-this.ticksTo1970)/1e4),u=k.getFullYear(),m=k.getMonth()+1,g=k.getDate();break;case"'":N("'")?ne():I=!0;break;default:ne()}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)),x>-1){m=1,g=x;do{if(r=this.getDaysCountInMonth(u,m-1),g<=r)break;m++,g-=r}while(!0)}if(this.view==="year"&&(m=m===-1?1:m,g=g===-1?1:g),k=this.daylightSavingAdjust(new Date(u,m-1,g)),k.getFullYear()!==u||k.getMonth()+1!==m||k.getDate()!==g)throw"Invalid date";return k}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",hr(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,hr(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 mr(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 yn(e.target,"p-datepicker-prev-button")||yn(e.target,"p-datepicker-prev-icon")||yn(e.target,"p-datepicker-next-button")||yn(e.target,"p-datepicker-next-icon")}onWindowResize(){this.overlayVisible&&!ts()&&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&&Mn.clear(this.overlay),this.destroyResponsiveStyleElement(),this.clearTimePickerTimer(),this.restoreOverlayAppend(),this.onOverlayHide()}static \u0275fac=function(n){return new(n||t)(bn(nn),bn(co))};static \u0275cmp=z({type:t,selectors:[["p-datePicker"],["p-datepicker"],["p-date-picker"]],contentQueries:function(n,i,r){if(n&1&&wt(r,W3,4)(r,K3,4)(r,Y3,4)(r,Z3,4)(r,X3,4)(r,Q3,4)(r,J3,4)(r,eR,4)(r,tR,4)(r,nR,4)(r,iR,4)(r,oR,4)(r,rR,4)(r,Ke,4),n&2){let a;U(a=$())&&(i.dateTemplate=a.first),U(a=$())&&(i.headerTemplate=a.first),U(a=$())&&(i.footerTemplate=a.first),U(a=$())&&(i.disabledDateTemplate=a.first),U(a=$())&&(i.decadeTemplate=a.first),U(a=$())&&(i.previousIconTemplate=a.first),U(a=$())&&(i.nextIconTemplate=a.first),U(a=$())&&(i.triggerIconTemplate=a.first),U(a=$())&&(i.clearIconTemplate=a.first),U(a=$())&&(i.decrementIconTemplate=a.first),U(a=$())&&(i.incrementIconTemplate=a.first),U(a=$())&&(i.inputIconTemplate=a.first),U(a=$())&&(i.buttonBarTemplate=a.first),U(a=$())&&(i.templates=a)}},viewQuery:function(n,i){if(n&1&&In(aR,5)(sR,5),n&2){let r;U(r=$())&&(i.inputfieldViewChild=r.first),U(r=$())&&(i.content=r.first)}},hostVars:4,hostBindings:function(n,i){n&2&&(St(i.sx("root")),B(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",G],showOtherMonths:[2,"showOtherMonths","showOtherMonths",G],selectOtherMonths:[2,"selectOtherMonths","selectOtherMonths",G],showIcon:[2,"showIcon","showIcon",G],icon:"icon",readonlyInput:[2,"readonlyInput","readonlyInput",G],shortYearCutoff:"shortYearCutoff",hourFormat:"hourFormat",timeOnly:[2,"timeOnly","timeOnly",G],stepHour:[2,"stepHour","stepHour",Te],stepMinute:[2,"stepMinute","stepMinute",Te],stepSecond:[2,"stepSecond","stepSecond",Te],showSeconds:[2,"showSeconds","showSeconds",G],showOnFocus:[2,"showOnFocus","showOnFocus",G],showWeek:[2,"showWeek","showWeek",G],startWeekFromFirstDayOfYear:"startWeekFromFirstDayOfYear",showClear:[2,"showClear","showClear",G],dataType:"dataType",selectionMode:"selectionMode",maxDateCount:[2,"maxDateCount","maxDateCount",Te],showButtonBar:[2,"showButtonBar","showButtonBar",G],todayButtonStyleClass:"todayButtonStyleClass",clearButtonStyleClass:"clearButtonStyleClass",autofocus:[2,"autofocus","autofocus",G],autoZIndex:[2,"autoZIndex","autoZIndex",G],baseZIndex:[2,"baseZIndex","baseZIndex",Te],panelStyleClass:"panelStyleClass",panelStyle:"panelStyle",keepInvalid:[2,"keepInvalid","keepInvalid",G],hideOnDateTimeSelect:[2,"hideOnDateTimeSelect","hideOnDateTimeSelect",G],touchUI:[2,"touchUI","touchUI",G],timeSeparator:"timeSeparator",focusTrap:[2,"focusTrap","focusTrap",G],showTransitionOptions:"showTransitionOptions",hideTransitionOptions:"hideTransitionOptions",tabindex:[2,"tabindex","tabindex",Te],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:[ve([sF,rv,{provide:av,useExisting:t},{provide:ut,useExisting:t}]),lt([de]),Y],ngContentSelectors:cR,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&&(Rt(lR),S(0,MR,5,28,"ng-template",3),f(1,"p-motion",4),A("onBeforeEnter",function(a){return i.onOverlayBeforeEnter(a)})("onAfterLeave",function(a){return i.onOverlayAfterLeave(a)}),f(2,"div",5,0),A("click",function(a){return i.onOverlayClick(a)}),Ae(4),S(5,DR,1,0,"ng-container",6)(6,pO,5,6,"ng-container",7)(7,QO,28,38,"div",8)(8,nF,3,4,"div",8),Ae(9,1),S(10,iF,1,0,"ng-container",6),_()()),n&2&&(h("ngIf",!i.inline),l(),h("visible",i.inline||i.overlayVisible)("appear",!i.inline)("options",i.computedMotionOptions()),l(),B(i.cn(i.cx("panel"),i.panelStyleClass)),h("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),h("ngTemplateOutlet",i.headerTemplate||i._headerTemplate),l(),h("ngIf",!i.timeOnly),l(),h("ngIf",(i.showTime||i.timeOnly)&&i.currentView==="date"),l(),h("ngIf",i.showButtonBar),l(2),h("ngTemplateOutlet",i.footerTemplate||i._footerTemplate))},dependencies:[ot,an,so,kt,xt,Zn,Yt,cs,zb,Hb,qb,cb,ls,Vb,mo,po,Se,zt,de,_o,db],encapsulation:2,changeDetection:0})}return t})(),lv=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=nt({type:t});static \u0275inj=tt({imports:[sv,Se,Se]})}return t})();var lF=["data-p-icon","filter-fill"],cv=(()=>{class t extends Ce{static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275cmp=z({type:t,selectors:[["","data-p-icon","filter-fill"]],features:[Y],attrs:lF,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&&(K(),ae(0,"path",0))},encapsulation:2})}return t})();var dv=`
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 cF=["clearicon"],dF=["incrementbuttonicon"],uF=["decrementbuttonicon"],pF=["input"];function hF(t,o){if(t&1){let e=te();K(),f(0,"svg",7),A("click",function(){w(e);let i=d(2);return T(i.clear())}),_()}if(t&2){let e=d(2);B(e.cx("clearIcon")),h("pBind",e.ptm("clearIcon"))}}function fF(t,o){}function mF(t,o){t&1&&S(0,fF,0,0,"ng-template")}function _F(t,o){if(t&1){let e=te();f(0,"span",8),A("click",function(){w(e);let i=d(2);return T(i.clear())}),S(1,mF,1,0,null,9),_()}if(t&2){let e=d(2);B(e.cx("clearIcon")),h("pBind",e.ptm("clearIcon")),l(),h("ngTemplateOutlet",e.clearIconTemplate||e._clearIconTemplate)}}function gF(t,o){if(t&1&&(se(0),S(1,hF,1,3,"svg",5)(2,_F,2,4,"span",6),le()),t&2){let e=d();l(),h("ngIf",!e.clearIconTemplate&&!e._clearIconTemplate),l(),h("ngIf",e.clearIconTemplate||e._clearIconTemplate)}}function bF(t,o){if(t&1&&F(0,"span",13),t&2){let e=d(2);h("pBind",e.ptm("incrementButtonIcon"))("ngClass",e.incrementButtonIcon)}}function vF(t,o){if(t&1&&(K(),F(0,"svg",15)),t&2){let e=d(3);h("pBind",e.ptm("incrementButtonIcon"))}}function yF(t,o){}function CF(t,o){t&1&&S(0,yF,0,0,"ng-template")}function xF(t,o){if(t&1&&(se(0),S(1,vF,1,1,"svg",14)(2,CF,1,0,null,9),le()),t&2){let e=d(2);l(),h("ngIf",!e.incrementButtonIconTemplate&&!e._incrementButtonIconTemplate),l(),h("ngTemplateOutlet",e.incrementButtonIconTemplate||e._incrementButtonIconTemplate)}}function wF(t,o){if(t&1&&F(0,"span",13),t&2){let e=d(2);h("pBind",e.ptm("decrementButtonIcon"))("ngClass",e.decrementButtonIcon)}}function TF(t,o){if(t&1&&(K(),F(0,"svg",17)),t&2){let e=d(3);h("pBind",e.ptm("decrementButtonIcon"))}}function SF(t,o){}function kF(t,o){t&1&&S(0,SF,0,0,"ng-template")}function IF(t,o){if(t&1&&(se(0),S(1,TF,1,1,"svg",16)(2,kF,1,0,null,9),le()),t&2){let e=d(2);l(),h("ngIf",!e.decrementButtonIconTemplate&&!e._decrementButtonIconTemplate),l(),h("ngTemplateOutlet",e.decrementButtonIconTemplate||e._decrementButtonIconTemplate)}}function EF(t,o){if(t&1){let e=te();f(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())}),S(2,bF,1,2,"span",12)(3,xF,3,2,"ng-container",2),_(),f(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())}),S(5,wF,1,2,"span",12)(6,IF,3,2,"ng-container",2),_()()}if(t&2){let e=d();B(e.cx("buttonGroup")),h("pBind",e.ptm("buttonGroup")),O("data-p",e.dataP),l(),B(e.cn(e.cx("incrementButton"),e.incrementButtonClass)),h("pBind",e.ptm("incrementButton")),O("disabled",e.$disabled()?"":void 0)("aria-hidden",!0)("data-p",e.dataP),l(),h("ngIf",e.incrementButtonIcon),l(),h("ngIf",!e.incrementButtonIcon),l(),B(e.cn(e.cx("decrementButton"),e.decrementButtonClass)),h("pBind",e.ptm("decrementButton")),O("disabled",e.$disabled()?"":void 0)("aria-hidden",!0)("data-p",e.dataP),l(),h("ngIf",e.decrementButtonIcon),l(),h("ngIf",!e.decrementButtonIcon)}}function MF(t,o){if(t&1&&F(0,"span",13),t&2){let e=d(2);h("pBind",e.ptm("incrementButtonIcon"))("ngClass",e.incrementButtonIcon)}}function DF(t,o){if(t&1&&(K(),F(0,"svg",15)),t&2){let e=d(3);h("pBind",e.ptm("incrementButtonIcon"))}}function PF(t,o){}function RF(t,o){t&1&&S(0,PF,0,0,"ng-template")}function OF(t,o){if(t&1&&(se(0),S(1,DF,1,1,"svg",14)(2,RF,1,0,null,9),le()),t&2){let e=d(2);l(),h("ngIf",!e.incrementButtonIconTemplate&&!e._incrementButtonIconTemplate),l(),h("ngTemplateOutlet",e.incrementButtonIconTemplate||e._incrementButtonIconTemplate)}}function FF(t,o){if(t&1){let e=te();f(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())}),S(1,MF,1,2,"span",12)(2,OF,3,2,"ng-container",2),_()}if(t&2){let e=d();B(e.cn(e.cx("incrementButton"),e.incrementButtonClass)),h("pBind",e.ptm("incrementButton")),O("disabled",e.$disabled()?"":void 0)("aria-hidden",!0)("data-p",e.dataP),l(),h("ngIf",e.incrementButtonIcon),l(),h("ngIf",!e.incrementButtonIcon)}}function NF(t,o){if(t&1&&F(0,"span",13),t&2){let e=d(2);h("pBind",e.ptm("decrementButtonIcon"))("ngClass",e.decrementButtonIcon)}}function AF(t,o){if(t&1&&(K(),F(0,"svg",17)),t&2){let e=d(3);h("pBind",e.ptm("decrementButtonIcon"))}}function LF(t,o){}function BF(t,o){t&1&&S(0,LF,0,0,"ng-template")}function VF(t,o){if(t&1&&(se(0),S(1,AF,1,1,"svg",16)(2,BF,1,0,null,9),le()),t&2){let e=d(2);l(),h("ngIf",!e.decrementButtonIconTemplate&&!e._decrementButtonIconTemplate),l(),h("ngTemplateOutlet",e.decrementButtonIconTemplate||e._decrementButtonIconTemplate)}}function zF(t,o){if(t&1){let e=te();f(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())}),S(1,NF,1,2,"span",12)(2,VF,3,2,"ng-container",2),_()}if(t&2){let e=d();B(e.cn(e.cx("decrementButton"),e.decrementButtonClass)),h("pBind",e.ptm("decrementButton")),O("disabled",e.$disabled()?"":void 0)("aria-hidden",!0)("data-p",e.dataP),l(),h("ngIf",e.decrementButtonIcon),l(),h("ngIf",!e.decrementButtonIcon)}}var HF=`
1428
- ${dv}
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
- `,qF={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"},uv=(()=>{class t extends dt{name="inputnumber";style=HF;classes=qF;static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})();var pv=new ue("INPUTNUMBER_INSTANCE"),GF={provide:Xn,useExisting:Sn(()=>vs),multi:!0},vs=(()=>{class t extends us{injector;componentName="InputNumber";$pcInputNumber=p(pv,{optional:!0,skipSelf:!0})??void 0;_componentStyle=p(uv);bindDirectiveInstance=p(de,{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 ie;onFocus=new ie;onBlur=new ie;onKeyDown=new ie;onClear=new ie;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(uo,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,gn(ye({},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 m=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,m?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)<m?"":"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 m=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,m?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)<m?"":"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,m=this.parseValue(s+i),g=m!=null?m.toString():"",x=s.substring(c,u),I=this.parseValue(x),k=I!=null?I.toString():"";if(c!==u&&k.length>0){this.insert(e,i,{isDecimalSign:r,isMinusSign:a});return}let N=this.maxlength();N&&g.length>N||(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:m,suffixCharIndex:g,currencyCharIndex:x}=this.getCharIndexes(c),I;if(i.isMinusSign)a===0&&(I=c,(m===-1||s!==0)&&(I=this.insertText(c,n,0,s)),this.updateValue(e,I,n,"insert"));else if(i.isDecimalSign)u>0&&a===u?this.updateValue(e,c,n,"insert"):u>a&&u<s?(I=this.insertText(c,n,a,s),this.updateValue(e,I,n,"insert")):u===-1&&this.maxFractionDigits&&(I=this.insertText(c,n,a,s),this.updateValue(e,I,n,"insert"));else{let k=this.numberFormat.resolvedOptions().maximumFractionDigits,N=a!==s?"range-insert":"insert";if(u>0&&a>u){if(a+n.length-(u+1)<=k){let j=x>=a?x-1:g>=a?g:c.length;I=c.slice(0,a)+n+c.slice(a+n.length,j)+c.slice(j),this.updateValue(e,I,n,N)}}else I=this.insertText(c,n,a,s),this.updateValue(e,I,n,N)}}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!==V0()&&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 m=this.initCursor()+n.length;this.input.nativeElement.setSelectionRange(m,m)}else{let u=this.input.nativeElement.selectionStart,m=this.input.nativeElement.selectionEnd,g=this.maxlength();if(g&&s.length>g&&(s=s.slice(0,g),u=Math.min(u,g),m=Math.min(m,g)),g&&g<s.length)return;this.input.nativeElement.value=s;let x=s.length;if(i==="range-insert"){let I=this.parseValue((a||"").slice(0,u)),N=(I!==null?I.toString():"").split("").join(`(${this.groupChar})?`),j=new RegExp(N,"g");j.test(s);let X=n.split("").join(`(${this.groupChar})?`),ne=new RegExp(X,"g");ne.test(s.slice(j.lastIndex)),m=j.lastIndex+ne.lastIndex,this.input.nativeElement.setSelectionRange(m,m)}else if(x===c)i==="insert"||i==="delete-back-single"?this.input.nativeElement.setSelectionRange(m+1,m+1):i==="delete-single"?this.input.nativeElement.setSelectionRange(m-1,m-1):(i==="delete-range"||i==="spin")&&this.input.nativeElement.setSelectionRange(m,m);else if(i==="delete-back-single"){let I=a.charAt(m-1),k=a.charAt(m),N=c-x,j=this._group.test(k);j&&N===1?m+=1:!j&&this.isNumeralChar(I)&&(m+=-1*N+1),this._group.lastIndex=0,this.input.nativeElement.setSelectionRange(m,m)}else if(a==="-"&&i==="insert"){this.input.nativeElement.setSelectionRange(0,0);let k=this.initCursor()+n.length+1;this.input.nativeElement.setSelectionRange(k,k)}else m=m+(x-c),this.input.nativeElement.setSelectionRange(m,m)}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)(bn(gt))};static \u0275cmp=z({type:t,selectors:[["p-inputNumber"],["p-inputnumber"],["p-input-number"]],contentQueries:function(n,i,r){if(n&1&&wt(r,cF,4)(r,dF,4)(r,uF,4)(r,Ke,4),n&2){let a;U(a=$())&&(i.clearIconTemplate=a.first),U(a=$())&&(i.incrementButtonIconTemplate=a.first),U(a=$())&&(i.decrementButtonIconTemplate=a.first),U(a=$())&&(i.templates=a)}},viewQuery:function(n,i){if(n&1&&In(pF,5),n&2){let r;U(r=$())&&(i.input=r.first)}},hostVars:3,hostBindings:function(n,i){n&2&&(O("data-p",i.dataP),B(i.cn(i.cx("root"),i.styleClass)))},inputs:{showButtons:[2,"showButtons","showButtons",G],format:[2,"format","format",G],buttonLayout:"buttonLayout",inputId:"inputId",styleClass:"styleClass",placeholder:"placeholder",tabindex:[2,"tabindex","tabindex",Te],title:"title",ariaLabelledBy:"ariaLabelledBy",ariaDescribedBy:"ariaDescribedBy",ariaLabel:"ariaLabel",ariaRequired:[2,"ariaRequired","ariaRequired",G],autocomplete:"autocomplete",incrementButtonClass:"incrementButtonClass",decrementButtonClass:"decrementButtonClass",incrementButtonIcon:"incrementButtonIcon",decrementButtonIcon:"decrementButtonIcon",readonly:[2,"readonly","readonly",G],allowEmpty:[2,"allowEmpty","allowEmpty",G],locale:"locale",localeMatcher:"localeMatcher",mode:"mode",currency:"currency",currencyDisplay:"currencyDisplay",useGrouping:[2,"useGrouping","useGrouping",G],minFractionDigits:[2,"minFractionDigits","minFractionDigits",e=>Te(e,void 0)],maxFractionDigits:[2,"maxFractionDigits","maxFractionDigits",e=>Te(e,void 0)],prefix:"prefix",suffix:"suffix",inputStyle:"inputStyle",inputStyleClass:"inputStyleClass",showClear:[2,"showClear","showClear",G],autofocus:[2,"autofocus","autofocus",G]},outputs:{onInput:"onInput",onFocus:"onFocus",onBlur:"onBlur",onKeyDown:"onKeyDown",onClear:"onClear"},features:[ve([GF,uv,{provide:pv,useExisting:t},{provide:ut,useExisting:t}]),lt([de]),Y],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&&(f(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)}),_(),S(2,gF,3,2,"ng-container",2)(3,EF,7,20,"span",3)(4,FF,3,8,"button",4)(5,zF,3,8,"button",4)),n&2&&(B(i.cn(i.cx("pcInputText"),i.inputStyleClass)),h("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),h("ngIf",i.buttonLayout!="vertical"&&i.showClear&&i.value),l(),h("ngIf",i.showButtons&&i.buttonLayout==="stacked"),l(),h("ngIf",i.showButtons&&i.buttonLayout!=="stacked"),l(),h("ngIf",i.showButtons&&i.buttonLayout!=="stacked"))},dependencies:[ot,an,kt,xt,Zn,po,mo,ls,Bb,Nb,Se,zt,de],encapsulation:2,changeDetection:0})}return t})(),hv=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=nt({type:t});static \u0275inj=tt({imports:[vs,Se,Se]})}return t})();var fv=`
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 jF=["dropdownicon"],UF=["firstpagelinkicon"],$F=["previouspagelinkicon"],WF=["lastpagelinkicon"],KF=["nextpagelinkicon"],ys=t=>({$implicit:t}),YF=t=>({pageLink:t});function ZF(t,o){t&1&&me(0)}function XF(t,o){if(t&1&&(f(0,"div",10),S(1,ZF,1,0,"ng-container",11),_()),t&2){let e=d();B(e.cx("contentStart")),h("pBind",e.ptm("contentStart")),l(),h("ngTemplateOutlet",e.templateLeft)("ngTemplateOutletContext",Fe(5,ys,e.paginatorState))}}function QF(t,o){if(t&1&&(f(0,"span",10),b(1),_()),t&2){let e=d();B(e.cx("current")),h("pBind",e.ptm("current")),l(),C(e.currentPageReport)}}function JF(t,o){if(t&1&&(K(),F(0,"svg",14)),t&2){let e=d(2);B(e.cx("firstIcon")),h("pBind",e.ptm("firstIcon"))}}function e4(t,o){}function t4(t,o){t&1&&S(0,e4,0,0,"ng-template")}function n4(t,o){if(t&1&&(f(0,"span"),S(1,t4,1,0,null,15),_()),t&2){let e=d(2);B(e.cx("firstIcon")),l(),h("ngTemplateOutlet",e.firstPageLinkIconTemplate||e._firstPageLinkIconTemplate)}}function i4(t,o){if(t&1){let e=te();f(0,"button",12),A("click",function(i){w(e);let r=d();return T(r.changePageToFirst(i))}),S(1,JF,1,3,"svg",13)(2,n4,2,3,"span",4),_()}if(t&2){let e=d();B(e.cx("first")),h("pBind",e.ptm("first")),O("aria-label",e.getAriaLabel("firstPageLabel")),l(),h("ngIf",!e.firstPageLinkIconTemplate&&!e._firstPageLinkIconTemplate),l(),h("ngIf",e.firstPageLinkIconTemplate||e._firstPageLinkIconTemplate)}}function o4(t,o){if(t&1&&(K(),F(0,"svg",16)),t&2){let e=d();B(e.cx("prevIcon")),h("pBind",e.ptm("prevIcon"))}}function r4(t,o){}function a4(t,o){t&1&&S(0,r4,0,0,"ng-template")}function s4(t,o){if(t&1&&(f(0,"span"),S(1,a4,1,0,null,15),_()),t&2){let e=d();B(e.cx("prevIcon")),l(),h("ngTemplateOutlet",e.previousPageLinkIconTemplate||e._previousPageLinkIconTemplate)}}function l4(t,o){if(t&1){let e=te();f(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);B(n.cx("page",Fe(6,YF,e))),h("pBind",n.ptm("page")),O("aria-label",n.getPageAriaLabel(e))("aria-current",e-1==n.getPage()?"page":void 0),l(),Me(" ",n.getLocalization(e)," ")}}function c4(t,o){if(t&1&&(f(0,"span",10),S(1,l4,2,8,"button",17),_()),t&2){let e=d();B(e.cx("pages")),h("pBind",e.ptm("pages")),l(),h("ngForOf",e.pageLinks)}}function d4(t,o){if(t&1&&b(0),t&2){let e=d(2);C(e.currentPageReport)}}function u4(t,o){t&1&&me(0)}function p4(t,o){if(t&1&&S(0,u4,1,0,"ng-container",11),t&2){let e=o.$implicit,n=d(3);h("ngTemplateOutlet",n.jumpToPageItemTemplate)("ngTemplateOutletContext",Fe(2,ys,e))}}function h4(t,o){t&1&&(se(0),S(1,p4,1,4,"ng-template",21),le())}function f4(t,o){t&1&&me(0)}function m4(t,o){if(t&1&&S(0,f4,1,0,"ng-container",15),t&2){let e=d(3);h("ngTemplateOutlet",e.dropdownIconTemplate||e._dropdownIconTemplate)}}function _4(t,o){t&1&&S(0,m4,1,1,"ng-template",22)}function g4(t,o){if(t&1){let e=te();f(0,"p-select",18),A("onChange",function(i){w(e);let r=d();return T(r.onPageDropdownChange(i))}),S(1,d4,1,1,"ng-template",19)(2,h4,2,0,"ng-container",20)(3,_4,1,0,null,20),_()}if(t&2){let e=d();h("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),h("ngIf",e.jumpToPageItemTemplate),l(),h("ngIf",e.dropdownIconTemplate||e._dropdownIconTemplate)}}function b4(t,o){if(t&1&&(K(),F(0,"svg",23)),t&2){let e=d();B(e.cx("nextIcon")),h("pBind",e.ptm("nextIcon"))}}function v4(t,o){}function y4(t,o){t&1&&S(0,v4,0,0,"ng-template")}function C4(t,o){if(t&1&&(f(0,"span"),S(1,y4,1,0,null,15),_()),t&2){let e=d();B(e.cx("nextIcon")),l(),h("ngTemplateOutlet",e.nextPageLinkIconTemplate||e._nextPageLinkIconTemplate)}}function x4(t,o){if(t&1&&(K(),F(0,"svg",25)),t&2){let e=d(2);B(e.cx("lastIcon")),h("pBind",e.ptm("lastIcon"))}}function w4(t,o){}function T4(t,o){t&1&&S(0,w4,0,0,"ng-template")}function S4(t,o){if(t&1&&(f(0,"span"),S(1,T4,1,0,null,15),_()),t&2){let e=d(2);B(e.cx("lastIcon")),l(),h("ngTemplateOutlet",e.lastPageLinkIconTemplate||e._lastPageLinkIconTemplate)}}function k4(t,o){if(t&1){let e=te();f(0,"button",2),A("click",function(i){w(e);let r=d();return T(r.changePageToLast(i))}),S(1,x4,1,3,"svg",24)(2,S4,2,3,"span",4),_()}if(t&2){let e=d();B(e.cx("last")),h("pBind",e.ptm("last"))("disabled",e.isLastPage()||e.empty()),O("aria-label",e.getAriaLabel("lastPageLabel")),l(),h("ngIf",!e.lastPageLinkIconTemplate&&!e._lastPageLinkIconTemplate),l(),h("ngIf",e.lastPageLinkIconTemplate||e._lastPageLinkIconTemplate)}}function I4(t,o){if(t&1){let e=te();f(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();B(e.cx("pcJumpToPageInput")),h("pt",e.ptm("pcJumpToPageInput"))("ngModel",e.currentPage())("disabled",e.empty())("unstyled",e.unstyled())}}function E4(t,o){t&1&&me(0)}function M4(t,o){if(t&1&&S(0,E4,1,0,"ng-container",11),t&2){let e=o.$implicit,n=d(3);h("ngTemplateOutlet",n.dropdownItemTemplate)("ngTemplateOutletContext",Fe(2,ys,e))}}function D4(t,o){t&1&&(se(0),S(1,M4,1,4,"ng-template",21),le())}function P4(t,o){t&1&&me(0)}function R4(t,o){if(t&1&&S(0,P4,1,0,"ng-container",15),t&2){let e=d(3);h("ngTemplateOutlet",e.dropdownIconTemplate||e._dropdownIconTemplate)}}function O4(t,o){t&1&&S(0,R4,1,1,"ng-template",22)}function F4(t,o){if(t&1){let e=te();f(0,"p-select",27),Ff("ngModelChange",function(i){w(e);let r=d();return Of(r.rows,i)||(r.rows=i),T(i)}),A("onChange",function(i){w(e);let r=d();return T(r.onRppChange(i))}),S(1,D4,2,0,"ng-container",20)(2,O4,1,0,null,20),_()}if(t&2){let e=d();h("options",e.rowsPerPageItems),Rf("ngModel",e.rows),h("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(),h("ngIf",e.dropdownItemTemplate),l(),h("ngIf",e.dropdownIconTemplate||e._dropdownIconTemplate)}}function N4(t,o){t&1&&me(0)}function A4(t,o){if(t&1&&(f(0,"div",10),S(1,N4,1,0,"ng-container",11),_()),t&2){let e=d();B(e.cx("contentEnd")),h("pBind",e.ptm("contentEnd")),l(),h("ngTemplateOutlet",e.templateRight)("ngTemplateOutletContext",Fe(5,ys,e.paginatorState))}}var L4={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"},mv=(()=>{class t extends dt{name="paginator";style=fv;classes=L4;static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})();var _v=new ue("PAGINATOR_INSTANCE"),Yf=(()=>{class t extends Ot{componentName="Paginator";bindDirectiveInstance=p(de,{self:!0});$pcPaginator=p(_v,{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=H(void 0);onPageChange=new ie;dropdownIconTemplate;firstPageLinkIconTemplate;previousPageLinkIconTemplate;lastPageLinkIconTemplate;nextPageLinkIconTemplate;templates;_dropdownIconTemplate;_firstPageLinkIconTemplate;_previousPageLinkIconTemplate;_lastPageLinkIconTemplate;_nextPageLinkIconTemplate;pageLinks;pageItems;rowsPerPageItems;paginatorState;_first=0;_page=0;_componentStyle=p(mv);$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&&wt(r,jF,4)(r,UF,4)(r,$F,4)(r,WF,4)(r,KF,4)(r,Ke,4),n&2){let a;U(a=$())&&(i.dropdownIconTemplate=a.first),U(a=$())&&(i.firstPageLinkIconTemplate=a.first),U(a=$())&&(i.previousPageLinkIconTemplate=a.first),U(a=$())&&(i.lastPageLinkIconTemplate=a.first),U(a=$())&&(i.nextPageLinkIconTemplate=a.first),U(a=$())&&(i.templates=a)}},hostVars:4,hostBindings:function(n,i){n&2&&(B(i.cn(i.cx("paginator"),i.styleClass)),$e("display",i.display))},inputs:{pageLinkSize:[2,"pageLinkSize","pageLinkSize",Te],styleClass:"styleClass",alwaysShow:[2,"alwaysShow","alwaysShow",G],dropdownAppendTo:"dropdownAppendTo",templateLeft:"templateLeft",templateRight:"templateRight",dropdownScrollHeight:"dropdownScrollHeight",currentPageReportTemplate:"currentPageReportTemplate",showCurrentPageReport:[2,"showCurrentPageReport","showCurrentPageReport",G],showFirstLastIcon:[2,"showFirstLastIcon","showFirstLastIcon",G],totalRecords:[2,"totalRecords","totalRecords",Te],rows:[2,"rows","rows",Te],rowsPerPageOptions:"rowsPerPageOptions",showJumpToPageDropdown:[2,"showJumpToPageDropdown","showJumpToPageDropdown",G],showJumpToPageInput:[2,"showJumpToPageInput","showJumpToPageInput",G],jumpToPageItemTemplate:"jumpToPageItemTemplate",showPageLinks:[2,"showPageLinks","showPageLinks",G],locale:"locale",dropdownItemTemplate:"dropdownItemTemplate",first:"first",appendTo:[1,"appendTo"]},outputs:{onPageChange:"onPageChange"},features:[ve([mv,{provide:_v,useExisting:t},{provide:ut,useExisting:t}]),lt([de]),Y],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&&(S(0,XF,2,7,"div",0)(1,QF,2,4,"span",0)(2,i4,3,6,"button",1),f(3,"button",2),A("click",function(a){return i.changePageToPrev(a)}),S(4,o4,1,3,"svg",3)(5,s4,2,3,"span",4),_(),S(6,c4,2,4,"span",0)(7,g4,4,11,"p-select",5),f(8,"button",2),A("click",function(a){return i.changePageToNext(a)}),S(9,b4,1,3,"svg",6)(10,C4,2,3,"span",4),_(),S(11,k4,3,7,"button",7)(12,I4,1,6,"p-inputnumber",8)(13,F4,3,11,"p-select",9)(14,A4,2,7,"div",0)),n&2&&(h("ngIf",i.templateLeft),l(),h("ngIf",i.showCurrentPageReport),l(),h("ngIf",i.showFirstLastIcon),l(),B(i.cx("prev")),h("pBind",i.ptm("prev"))("disabled",i.isFirstPage()||i.empty()),O("aria-label",i.getAriaLabel("prevPageLabel")),l(),h("ngIf",!i.previousPageLinkIconTemplate&&!i._previousPageLinkIconTemplate),l(),h("ngIf",i.previousPageLinkIconTemplate||i._previousPageLinkIconTemplate),l(),h("ngIf",i.showPageLinks),l(),h("ngIf",i.showJumpToPageDropdown),l(),B(i.cx("next")),h("pBind",i.ptm("next"))("disabled",i.isLastPage()||i.empty()),O("aria-label",i.getAriaLabel("nextPageLabel")),l(),h("ngIf",!i.nextPageLinkIconTemplate&&!i._nextPageLinkIconTemplate),l(),h("ngIf",i.nextPageLinkIconTemplate||i._nextPageLinkIconTemplate),l(),h("ngIf",i.showFirstLastIcon),l(),h("ngIf",i.showJumpToPageInput),l(),h("ngIf",i.rowsPerPageOptions),l(),h("ngIf",i.templateRight))},dependencies:[ot,so,kt,xt,hb,vs,Vt,sn,ln,cs,Ob,Fb,Ab,Lb,Se,Ke,de],encapsulation:2,changeDetection:0})}return t})(),gv=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=nt({type:t});static \u0275inj=tt({imports:[Yf,Se,Se]})}return t})();var bv=`
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 V4=["input"],z4=`
1694
- ${bv}
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
- `,H4={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"},vv=(()=>{class t extends dt{name="radiobutton";style=z4;classes=H4;static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})();var yv=new ue("RADIOBUTTON_INSTANCE"),q4={provide:Xn,useExisting:Sn(()=>Cv),multi:!0},G4=(()=>{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})(),Cv=(()=>{class t extends ds{componentName="RadioButton";$pcRadioButton=p(yv,{optional:!0,skipSelf:!0})??void 0;bindDirectiveInstance=p(de,{self:!0});onAfterViewChecked(){this.bindDirectiveInstance.setAttrs(this.ptms(["host","root"]))}value;tabindex;inputId;ariaLabelledBy;ariaLabel;styleClass;autofocus;binary;variant=H();size=H();onClick=new ie;onFocus=new ie;onBlur=new ie;inputViewChild;$variant=E(()=>this.variant()||this.config.inputStyle()||this.config.inputVariant());checked;focused;control;_componentStyle=p(vv);injector=p(gt);registry=p(G4);onInit(){this.control=this.injector.get(uo),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=q(t)))(i||t)}})();static \u0275cmp=z({type:t,selectors:[["p-radioButton"],["p-radiobutton"],["p-radio-button"]],viewQuery:function(n,i){if(n&1&&In(V4,5),n&2){let r;U(r=$())&&(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),B(i.cx("root")))},inputs:{value:"value",tabindex:[2,"tabindex","tabindex",Te],inputId:"inputId",ariaLabelledBy:"ariaLabelledBy",ariaLabel:"ariaLabel",styleClass:"styleClass",autofocus:[2,"autofocus","autofocus",G],binary:[2,"binary","binary",G],variant:[1,"variant"],size:[1,"size"]},outputs:{onClick:"onClick",onFocus:"onFocus",onBlur:"onBlur"},features:[ve([q4,vv,{provide:yv,useExisting:t},{provide:ut,useExisting:t}]),lt([de]),Y],decls:4,vars:20,consts:[["input",""],["type","radio",3,"focus","blur","change","checked","pAutoFocus","pBind"],[3,"pBind"]],template:function(n,i){n&1&&(f(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)}),_(),f(2,"div",2),F(3,"div",2),_()),n&2&&(B(i.cx("input")),h("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),B(i.cx("box")),h("pBind",i.ptm("box")),l(),B(i.cx("icon")),h("pBind",i.ptm("icon")))},dependencies:[ot,mo,Se,zt,de],encapsulation:2,changeDetection:0})}return t})(),xv=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=nt({type:t});static \u0275inj=tt({imports:[Cv,Se,Se]})}return t})();var j4=["header"],U4=["headergrouped"],$4=["body"],W4=["loadingbody"],K4=["caption"],Y4=["footer"],Z4=["footergrouped"],X4=["summary"],Q4=["colgroup"],J4=["expandedrow"],eN=["groupheader"],tN=["groupfooter"],nN=["frozenexpandedrow"],iN=["frozenheader"],oN=["frozenbody"],rN=["frozenfooter"],aN=["frozencolgroup"],sN=["emptymessage"],lN=["paginatorleft"],cN=["paginatorright"],dN=["paginatordropdownitem"],uN=["loadingicon"],pN=["reorderindicatorupicon"],hN=["reorderindicatordownicon"],fN=["sorticon"],mN=["checkboxicon"],_N=["headercheckboxicon"],gN=["paginatordropdownicon"],bN=["paginatorfirstpagelinkicon"],vN=["paginatorlastpagelinkicon"],yN=["paginatorpreviouspagelinkicon"],CN=["paginatornextpagelinkicon"],xN=["resizeHelper"],wN=["reorderIndicatorUp"],TN=["reorderIndicatorDown"],SN=["wrapper"],kN=["table"],IN=["thead"],EN=["tfoot"],MN=["scroller"],DN=t=>({height:t}),wv=(t,o)=>({$implicit:t,options:o}),PN=t=>({columns:t}),Zf=t=>({$implicit:t});function RN(t,o){if(t&1&&F(0,"i",17),t&2){let e=d(2);B(e.cn(e.cx("loadingIcon"),e.loadingIcon)),h("pBind",e.ptm("loadingIcon"))}}function ON(t,o){if(t&1&&(K(),F(0,"svg",19)),t&2){let e=d(3);B(e.cx("loadingIcon")),h("spin",!0)("pBind",e.ptm("loadingIcon"))}}function FN(t,o){}function NN(t,o){t&1&&S(0,FN,0,0,"ng-template")}function AN(t,o){if(t&1&&(f(0,"span",17),S(1,NN,1,0,null,20),_()),t&2){let e=d(3);B(e.cx("loadingIcon")),h("pBind",e.ptm("loadingIcon")),l(),h("ngTemplateOutlet",e.loadingIconTemplate||e._loadingIconTemplate)}}function LN(t,o){if(t&1&&(se(0),S(1,ON,1,4,"svg",18)(2,AN,2,4,"span",10),le()),t&2){let e=d(2);l(),h("ngIf",!e.loadingIconTemplate&&!e._loadingIconTemplate),l(),h("ngIf",e.loadingIconTemplate||e._loadingIconTemplate)}}function BN(t,o){if(t&1&&(f(0,"div",17),O0("p-overlay-mask-leave-active"),R0("p-overlay-mask-enter-active"),S(1,RN,1,3,"i",10)(2,LN,3,2,"ng-container",14),_()),t&2){let e=d();B(e.cx("mask")),h("pBind",e.ptm("mask")),l(),h("ngIf",e.loadingIcon),l(),h("ngIf",!e.loadingIcon)}}function VN(t,o){t&1&&me(0)}function zN(t,o){if(t&1&&(f(0,"div",17),S(1,VN,1,0,"ng-container",20),_()),t&2){let e=d();B(e.cx("header")),h("pBind",e.ptm("header")),l(),h("ngTemplateOutlet",e.captionTemplate||e._captionTemplate)}}function HN(t,o){t&1&&me(0)}function qN(t,o){if(t&1&&S(0,HN,1,0,"ng-container",20),t&2){let e=d(3);h("ngTemplateOutlet",e.paginatorDropdownIconTemplate||e._paginatorDropdownIconTemplate)}}function GN(t,o){t&1&&S(0,qN,1,1,"ng-template",22)}function jN(t,o){t&1&&me(0)}function UN(t,o){if(t&1&&S(0,jN,1,0,"ng-container",20),t&2){let e=d(3);h("ngTemplateOutlet",e.paginatorFirstPageLinkIconTemplate||e._paginatorFirstPageLinkIconTemplate)}}function $N(t,o){t&1&&S(0,UN,1,1,"ng-template",23)}function WN(t,o){t&1&&me(0)}function KN(t,o){if(t&1&&S(0,WN,1,0,"ng-container",20),t&2){let e=d(3);h("ngTemplateOutlet",e.paginatorPreviousPageLinkIconTemplate||e._paginatorPreviousPageLinkIconTemplate)}}function YN(t,o){t&1&&S(0,KN,1,1,"ng-template",24)}function ZN(t,o){t&1&&me(0)}function XN(t,o){if(t&1&&S(0,ZN,1,0,"ng-container",20),t&2){let e=d(3);h("ngTemplateOutlet",e.paginatorLastPageLinkIconTemplate||e._paginatorLastPageLinkIconTemplate)}}function QN(t,o){t&1&&S(0,XN,1,1,"ng-template",25)}function JN(t,o){t&1&&me(0)}function e5(t,o){if(t&1&&S(0,JN,1,0,"ng-container",20),t&2){let e=d(3);h("ngTemplateOutlet",e.paginatorNextPageLinkIconTemplate||e._paginatorNextPageLinkIconTemplate)}}function t5(t,o){t&1&&S(0,e5,1,1,"ng-template",26)}function n5(t,o){if(t&1){let e=te();f(0,"p-paginator",21),A("onPageChange",function(i){w(e);let r=d();return T(r.onPageChange(i))}),S(1,GN,1,0,null,14)(2,$N,1,0,null,14)(3,YN,1,0,null,14)(4,QN,1,0,null,14)(5,t5,1,0,null,14),_()}if(t&2){let e=d();h("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(),h("ngIf",e.paginatorDropdownIconTemplate||e._paginatorDropdownIconTemplate),l(),h("ngIf",e.paginatorFirstPageLinkIconTemplate||e._paginatorFirstPageLinkIconTemplate),l(),h("ngIf",e.paginatorPreviousPageLinkIconTemplate||e._paginatorPreviousPageLinkIconTemplate),l(),h("ngIf",e.paginatorLastPageLinkIconTemplate||e._paginatorLastPageLinkIconTemplate),l(),h("ngIf",e.paginatorNextPageLinkIconTemplate||e._paginatorNextPageLinkIconTemplate)}}function i5(t,o){t&1&&me(0)}function o5(t,o){if(t&1&&S(0,i5,1,0,"ng-container",28),t&2){let e=o.$implicit,n=o.options;d(2);let i=Lt(8);h("ngTemplateOutlet",i)("ngTemplateOutletContext",Yn(2,wv,e,n))}}function r5(t,o){if(t&1){let e=te();f(0,"p-scroller",27,2),A("onLazyLoad",function(i){w(e);let r=d();return T(r.onLazyItemLoad(i))}),S(2,o5,1,5,"ng-template",null,3,We),_()}if(t&2){let e=d();St(Fe(16,DN,e.scrollHeight!=="flex"?e.scrollHeight:void 0)),h("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 a5(t,o){t&1&&me(0)}function s5(t,o){if(t&1&&(se(0),S(1,a5,1,0,"ng-container",28),le()),t&2){let e=d(),n=Lt(8);l(),h("ngTemplateOutlet",n)("ngTemplateOutletContext",Yn(4,wv,e.processedData,Fe(2,PN,e.columns)))}}function l5(t,o){t&1&&me(0)}function c5(t,o){t&1&&me(0)}function d5(t,o){if(t&1&&F(0,"tbody",35),t&2){let e=d().options,n=d();B(n.cx("tbody")),h("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 u5(t,o){if(t&1&&F(0,"tbody",36),t&2){let e=d().options,n=d();St("height: calc("+e.spacerStyle.height+" - "+e.rows.length*e.itemSize+"px);"),B(n.cx("virtualScrollerSpacer")),h("pBind",n.ptm("virtualScrollerSpacer"))}}function p5(t,o){t&1&&me(0)}function h5(t,o){if(t&1&&(f(0,"tfoot",37,6),S(2,p5,1,0,"ng-container",28),_()),t&2){let e=d().options,n=d();h("ngClass",n.cx("footer"))("ngStyle",n.sx("tfoot"))("pBind",n.ptm("tfoot")),l(2),h("ngTemplateOutlet",n.footerGroupedTemplate||n.footerTemplate||n._footerTemplate||n._footerGroupedTemplate)("ngTemplateOutletContext",Fe(5,Zf,e.columns))}}function f5(t,o){if(t&1&&(f(0,"table",29,4),S(2,l5,1,0,"ng-container",28),f(3,"thead",30,5),S(5,c5,1,0,"ng-container",28),_(),S(6,d5,1,10,"tbody",31),F(7,"tbody",32),S(8,u5,1,5,"tbody",33)(9,h5,3,7,"tfoot",34),_()),t&2){let e=o.options,n=d();St(n.tableStyle),B(n.cn(n.cx("table"),n.tableStyleClass)),h("pBind",n.ptm("table")),O("id",n.id+"-table"),l(2),h("ngTemplateOutlet",n.colGroupTemplate||n._colGroupTemplate)("ngTemplateOutletContext",Fe(28,Zf,e.columns)),l(),B(n.cx("thead")),h("ngStyle",n.sx("thead"))("pBind",n.ptm("thead")),l(2),h("ngTemplateOutlet",n.headerGroupedTemplate||n.headerTemplate||n._headerTemplate)("ngTemplateOutletContext",Fe(30,Zf,e.columns)),l(),h("ngIf",n.frozenValue||n.frozenBodyTemplate||n._frozenBodyTemplate),l(),St(e.contentStyle),B(n.cx("tbody",e.contentStyleClass)),h("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(),h("ngIf",e.spacerStyle),l(),h("ngIf",n.footerGroupedTemplate||n.footerTemplate||n._footerTemplate||n._footerGroupedTemplate)}}function m5(t,o){t&1&&me(0)}function _5(t,o){if(t&1&&S(0,m5,1,0,"ng-container",20),t&2){let e=d(3);h("ngTemplateOutlet",e.paginatorDropdownIconTemplate||e._paginatorDropdownIconTemplate)}}function g5(t,o){t&1&&S(0,_5,1,1,"ng-template",22)}function b5(t,o){t&1&&me(0)}function v5(t,o){if(t&1&&S(0,b5,1,0,"ng-container",20),t&2){let e=d(3);h("ngTemplateOutlet",e.paginatorFirstPageLinkIconTemplate||e._paginatorFirstPageLinkIconTemplate)}}function y5(t,o){t&1&&S(0,v5,1,1,"ng-template",23)}function C5(t,o){t&1&&me(0)}function x5(t,o){if(t&1&&S(0,C5,1,0,"ng-container",20),t&2){let e=d(3);h("ngTemplateOutlet",e.paginatorPreviousPageLinkIconTemplate||e._paginatorPreviousPageLinkIconTemplate)}}function w5(t,o){t&1&&S(0,x5,1,1,"ng-template",24)}function T5(t,o){t&1&&me(0)}function S5(t,o){if(t&1&&S(0,T5,1,0,"ng-container",20),t&2){let e=d(3);h("ngTemplateOutlet",e.paginatorLastPageLinkIconTemplate||e._paginatorLastPageLinkIconTemplate)}}function k5(t,o){t&1&&S(0,S5,1,1,"ng-template",25)}function I5(t,o){t&1&&me(0)}function E5(t,o){if(t&1&&S(0,I5,1,0,"ng-container",20),t&2){let e=d(3);h("ngTemplateOutlet",e.paginatorNextPageLinkIconTemplate||e._paginatorNextPageLinkIconTemplate)}}function M5(t,o){t&1&&S(0,E5,1,1,"ng-template",26)}function D5(t,o){if(t&1){let e=te();f(0,"p-paginator",21),A("onPageChange",function(i){w(e);let r=d();return T(r.onPageChange(i))}),S(1,g5,1,0,null,14)(2,y5,1,0,null,14)(3,w5,1,0,null,14)(4,k5,1,0,null,14)(5,M5,1,0,null,14),_()}if(t&2){let e=d();h("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(),h("ngIf",e.paginatorDropdownIconTemplate||e._paginatorDropdownIconTemplate),l(),h("ngIf",e.paginatorFirstPageLinkIconTemplate||e._paginatorFirstPageLinkIconTemplate),l(),h("ngIf",e.paginatorPreviousPageLinkIconTemplate||e._paginatorPreviousPageLinkIconTemplate),l(),h("ngIf",e.paginatorLastPageLinkIconTemplate||e._paginatorLastPageLinkIconTemplate),l(),h("ngIf",e.paginatorNextPageLinkIconTemplate||e._paginatorNextPageLinkIconTemplate)}}function P5(t,o){t&1&&me(0)}function R5(t,o){if(t&1&&(f(0,"div",38),S(1,P5,1,0,"ng-container",20),_()),t&2){let e=d();h("ngClass",e.cx("footer"))("pBind",e.ptm("footer")),l(),h("ngTemplateOutlet",e.summaryTemplate||e._summaryTemplate)}}function O5(t,o){if(t&1&&F(0,"div",38,7),t&2){let e=d();$e("display","none"),h("ngClass",e.cx("columnResizeIndicator"))("pBind",e.ptm("columnResizeIndicator"))}}function F5(t,o){if(t&1&&(K(),F(0,"svg",40)),t&2){let e=d(2);h("pBind",e.ptm("rowReorderIndicatorUp").icon)}}function N5(t,o){}function A5(t,o){t&1&&S(0,N5,0,0,"ng-template")}function L5(t,o){if(t&1&&(f(0,"span",38,8),S(2,F5,1,1,"svg",39)(3,A5,1,0,null,20),_()),t&2){let e=d();$e("display","none"),h("ngClass",e.cx("rowReorderIndicatorUp"))("pBind",e.ptm("rowReorderIndicatorUp")),l(2),h("ngIf",!e.reorderIndicatorUpIconTemplate&&!e._reorderIndicatorUpIconTemplate),l(),h("ngTemplateOutlet",e.reorderIndicatorUpIconTemplate||e._reorderIndicatorUpIconTemplate)}}function B5(t,o){if(t&1&&(K(),F(0,"svg",42)),t&2){let e=d(2);h("pBind",e.ptm("rowReorderIndicatorDown").icon)}}function V5(t,o){}function z5(t,o){t&1&&S(0,V5,0,0,"ng-template")}function H5(t,o){if(t&1&&(f(0,"span",38,9),S(2,B5,1,1,"svg",41)(3,z5,1,0,null,20),_()),t&2){let e=d();$e("display","none"),h("ngClass",e.cx("rowReorderIndicatorDown"))("pBind",e.ptm("rowReorderIndicatorDown")),l(2),h("ngIf",!e.reorderIndicatorDownIconTemplate&&!e._reorderIndicatorDownIconTemplate),l(),h("ngTemplateOutlet",e.reorderIndicatorDownIconTemplate||e._reorderIndicatorDownIconTemplate)}}var q5=["pTableBody",""],Jf=(t,o,e,n,i)=>({$implicit:t,rowIndex:o,columns:e,editing:n,frozen:i}),G5=(t,o,e,n,i,r,a)=>({$implicit:t,rowIndex:o,columns:e,editing:n,frozen:i,rowgroup:r,rowspan:a}),Cs=(t,o,e,n,i,r)=>({$implicit:t,rowIndex:o,columns:e,expanded:n,editing:i,frozen:r}),Tv=(t,o,e,n)=>({$implicit:t,rowIndex:o,columns:e,frozen:n}),Sv=(t,o)=>({$implicit:t,frozen:o});function j5(t,o){t&1&&me(0)}function U5(t,o){if(t&1&&(se(0,3),S(1,j5,1,0,"ng-container",4),le()),t&2){let e=d(),n=e.$implicit,i=e.index,r=d(2);l(),h("ngTemplateOutlet",r.dataTable.groupHeaderTemplate||r.dataTable._groupHeaderTemplate)("ngTemplateOutletContext",Xa(2,Jf,n,r.getRowIndex(i),r.columns,r.dataTable.editMode==="row"&&r.dataTable.isRowEditing(n),r.frozen))}}function $5(t,o){t&1&&me(0)}function W5(t,o){if(t&1&&(se(0),S(1,$5,1,0,"ng-container",4),le()),t&2){let e=d(),n=e.$implicit,i=e.index,r=d(2);l(),h("ngTemplateOutlet",n?r.template:r.dataTable.loadingBodyTemplate||r.dataTable._loadingBodyTemplate)("ngTemplateOutletContext",Xa(2,Jf,n,r.getRowIndex(i),r.columns,r.dataTable.editMode==="row"&&r.dataTable.isRowEditing(n),r.frozen))}}function K5(t,o){t&1&&me(0)}function Y5(t,o){if(t&1&&(se(0),S(1,K5,1,0,"ng-container",4),le()),t&2){let e=d(),n=e.$implicit,i=e.index,r=d(2);l(),h("ngTemplateOutlet",n?r.template:r.dataTable.loadingBodyTemplate||r.dataTable._loadingBodyTemplate)("ngTemplateOutletContext",A0(2,G5,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 Z5(t,o){t&1&&me(0)}function X5(t,o){if(t&1&&(se(0,3),S(1,Z5,1,0,"ng-container",4),le()),t&2){let e=d(),n=e.$implicit,i=e.index,r=d(2);l(),h("ngTemplateOutlet",r.dataTable.groupFooterTemplate||r.dataTable._groupFooterTemplate)("ngTemplateOutletContext",Xa(2,Jf,n,r.getRowIndex(i),r.columns,r.dataTable.editMode==="row"&&r.dataTable.isRowEditing(n),r.frozen))}}function Q5(t,o){if(t&1&&S(0,U5,2,8,"ng-container",2)(1,W5,2,8,"ng-container",0)(2,Y5,2,10,"ng-container",0)(3,X5,2,8,"ng-container",2),t&2){let e=o.$implicit,n=o.index,i=d(2);h("ngIf",(i.dataTable.groupHeaderTemplate||i.dataTable._groupHeaderTemplate)&&!i.dataTable.virtualScroll&&i.dataTable.rowGroupMode==="subheader"&&i.shouldRenderRowGroupHeader(i.value,e,i.getRowIndex(n))),l(),h("ngIf",i.dataTable.rowGroupMode!=="rowspan"),l(),h("ngIf",i.dataTable.rowGroupMode==="rowspan"),l(),h("ngIf",(i.dataTable.groupFooterTemplate||i.dataTable._groupFooterTemplate)&&!i.dataTable.virtualScroll&&i.dataTable.rowGroupMode==="subheader"&&i.shouldRenderRowGroupFooter(i.value,e,i.getRowIndex(n)))}}function J5(t,o){if(t&1&&(se(0),S(1,Q5,4,4,"ng-template",1),le()),t&2){let e=d();l(),h("ngForOf",e.value)("ngForTrackBy",e.dataTable.rowTrackBy)}}function eA(t,o){t&1&&me(0)}function tA(t,o){if(t&1&&(se(0),S(1,eA,1,0,"ng-container",4),le()),t&2){let e=d(),n=e.$implicit,i=e.index,r=d(2);l(),h("ngTemplateOutlet",r.template)("ngTemplateOutletContext",cr(2,Cs,n,r.getRowIndex(i),r.columns,r.dataTable.isRowExpanded(n),r.dataTable.editMode==="row"&&r.dataTable.isRowEditing(n),r.frozen))}}function nA(t,o){t&1&&me(0)}function iA(t,o){if(t&1&&(se(0,3),S(1,nA,1,0,"ng-container",4),le()),t&2){let e=d(),n=e.$implicit,i=e.index,r=d(2);l(),h("ngTemplateOutlet",r.dataTable.groupHeaderTemplate||r.dataTable._groupHeaderTemplate)("ngTemplateOutletContext",cr(2,Cs,n,r.getRowIndex(i),r.columns,r.dataTable.isRowExpanded(n),r.dataTable.editMode==="row"&&r.dataTable.isRowEditing(n),r.frozen))}}function oA(t,o){t&1&&me(0)}function rA(t,o){t&1&&me(0)}function aA(t,o){if(t&1&&(se(0,3),S(1,rA,1,0,"ng-container",4),le()),t&2){let e=d(2),n=e.$implicit,i=e.index,r=d(2);l(),h("ngTemplateOutlet",r.dataTable.groupFooterTemplate||r.dataTable._groupFooterTemplate)("ngTemplateOutletContext",cr(2,Cs,n,r.getRowIndex(i),r.columns,r.dataTable.isRowExpanded(n),r.dataTable.editMode==="row"&&r.dataTable.isRowEditing(n),r.frozen))}}function sA(t,o){if(t&1&&(se(0),S(1,oA,1,0,"ng-container",4)(2,aA,2,9,"ng-container",2),le()),t&2){let e=d(),n=e.$implicit,i=e.index,r=d(2);l(),h("ngTemplateOutlet",r.dataTable.expandedRowTemplate||r.dataTable._expandedRowTemplate)("ngTemplateOutletContext",Nf(3,Tv,n,r.getRowIndex(i),r.columns,r.frozen)),l(),h("ngIf",(r.dataTable.groupFooterTemplate||r.dataTable._groupFooterTemplate)&&r.dataTable.rowGroupMode==="subheader"&&r.shouldRenderRowGroupFooter(r.value,n,r.getRowIndex(i)))}}function lA(t,o){if(t&1&&S(0,tA,2,9,"ng-container",0)(1,iA,2,9,"ng-container",2)(2,sA,3,8,"ng-container",0),t&2){let e=o.$implicit,n=o.index,i=d(2);h("ngIf",!(i.dataTable.groupHeaderTemplate&&i.dataTable._groupHeaderTemplate)),l(),h("ngIf",(i.dataTable.groupHeaderTemplate||i.dataTable._groupHeaderTemplate)&&i.dataTable.rowGroupMode==="subheader"&&i.shouldRenderRowGroupHeader(i.value,e,i.getRowIndex(n))),l(),h("ngIf",i.dataTable.isRowExpanded(e))}}function cA(t,o){if(t&1&&(se(0),S(1,lA,3,3,"ng-template",1),le()),t&2){let e=d();l(),h("ngForOf",e.value)("ngForTrackBy",e.dataTable.rowTrackBy)}}function dA(t,o){t&1&&me(0)}function uA(t,o){t&1&&me(0)}function pA(t,o){if(t&1&&(se(0),S(1,uA,1,0,"ng-container",4),le()),t&2){let e=d(),n=e.$implicit,i=e.index,r=d(2);l(),h("ngTemplateOutlet",r.dataTable.frozenExpandedRowTemplate||r.dataTable._frozenExpandedRowTemplate)("ngTemplateOutletContext",Nf(2,Tv,n,r.getRowIndex(i),r.columns,r.frozen))}}function hA(t,o){if(t&1&&S(0,dA,1,0,"ng-container",4)(1,pA,2,7,"ng-container",0),t&2){let e=o.$implicit,n=o.index,i=d(2);h("ngTemplateOutlet",i.template)("ngTemplateOutletContext",cr(3,Cs,e,i.getRowIndex(n),i.columns,i.dataTable.isRowExpanded(e),i.dataTable.editMode==="row"&&i.dataTable.isRowEditing(e),i.frozen)),l(),h("ngIf",i.dataTable.isRowExpanded(e))}}function fA(t,o){if(t&1&&(se(0),S(1,hA,2,10,"ng-template",1),le()),t&2){let e=d();l(),h("ngForOf",e.value)("ngForTrackBy",e.dataTable.rowTrackBy)}}function mA(t,o){t&1&&me(0)}function _A(t,o){if(t&1&&(se(0),S(1,mA,1,0,"ng-container",4),le()),t&2){let e=d();l(),h("ngTemplateOutlet",e.dataTable.loadingBodyTemplate||e.dataTable._loadingBodyTemplate)("ngTemplateOutletContext",Yn(2,Sv,e.columns,e.frozen))}}function gA(t,o){t&1&&me(0)}function bA(t,o){if(t&1&&(se(0),S(1,gA,1,0,"ng-container",4),le()),t&2){let e=d();l(),h("ngTemplateOutlet",e.dataTable.emptyMessageTemplate||e.dataTable._emptyMessageTemplate)("ngTemplateOutletContext",Yn(2,Sv,e.columns,e.frozen))}}var vA=`
1703
- ${Rb}
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
- `,yA={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})},CA={tableContainer:({instance:t})=>({"max-height":t.virtualScroll?"":t.scrollHeight,overflow:"auto"}),thead:{position:"sticky"},tfoot:{position:"sticky"},rowGroupHeader:({instance:t})=>({top:t.getFrozenRowGroupHeaderStickyPosition})},Xf=(()=>{class t extends dt{name="datatable";style=vA;classes=yA;inlineStyles=CA;static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})();var xA=new ue("TABLE_INSTANCE"),Qf=(()=>{class t{sortSource=new io;selectionSource=new io;contextMenuSource=new io;valueSource=new io;columnsSource=new io;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})(),em=(()=>{class t extends Ot{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 ie;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 ie;selectionChange=new ie;onRowSelect=new ie;onRowUnselect=new ie;onPage=new ie;onSort=new ie;onFilter=new ie;onLazyLoad=new ie;onRowExpand=new ie;onRowCollapse=new ie;onContextMenuSelect=new ie;onColResize=new ie;onColReorder=new ie;onRowReorder=new ie;onEditInit=new ie;onEditComplete=new ie;onEditCancel=new ie;onHeaderCheckboxToggle=new ie;sortFunction=new ie;firstChange=new ie;rowsChange=new ie;onStateSave=new ie;onStateRestore=new ie;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=nb();styleElement;responsiveStyleElement;overlayService=p(co);filterService=p(U0);tableService=p(Qf);zone=p(nn);_componentStyle=p(Xf);bindDirectiveInstance=p(de,{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(){Kt(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&&Kt(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"||z0(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)ke.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,m=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 x=this.findIndexInSelection(a);this._selection=this.selection.filter((I,k)=>k!=x),this.selectionChange.emit(this.selection),m&&delete this.selectionKeys[m]}this.onRowUnselect.emit({originalEvent:e.originalEvent,data:a,type:"row"})}else this.isSingleSelectionMode()?(this._selection=a,this.selectionChange.emit(a),m&&(this.selectionKeys={},this.selectionKeys[m]=1)):this.isMultipleSelectionMode()&&(g?this._selection=this.selection||[]:(this._selection=[],this.selectionKeys={}),this._selection=[...this.selection,a],this.selectionChange.emit(this.selection),m&&(this.selectionKeys[m]=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}),m&&(this.selectionKeys={},this.selectionKeys[m]=1));else if(this.selectionMode==="multiple")if(c){let g=this.findIndexInSelection(a);this._selection=this.selection.filter((x,I)=>I!=g),this.selectionChange.emit(this.selection),this.onRowUnselect.emit({originalEvent:e.originalEvent,data:a,type:"row",index:s}),m&&delete this.selectionKeys[m]}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}),m&&(this.selectionKeys[m]=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 m=this.dataKey?String(Ee.resolveFieldData(u,this.dataKey)):null;m&&(this.selectionKeys[m]=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,x)=>x!=u);let m=this.dataKey?String(Ee.resolveFieldData(c,this.dataKey)):null;m&&delete this.selectionKeys[m],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,m=this.filters[u];if(Array.isArray(m)){for(let g of m)if(i=this.executeLocalFilter(u,this.value[n],g),g.operator===zf.OR&&i||g.operator===zf.AND&&!i)break}else i=this.executeLocalFilter(u,this.value[n],m);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||j0.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(m=>m.exportable!==!1&&m.field);i+=a.map(m=>'"'+this.getExportHeader(m)+'"').join(this.csvSeparator);let s=n.map(m=>a.map(g=>{let x=Ee.resolveFieldData(m,g.field);return x!=null?this.exportFunction?x=this.exportFunction({data:x,field:g.field}):x=String(x).replace(/"/g,'""'):x="",'"'+x+'"'}).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(gn(ye(ye({},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&&ke.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()&&ke.removeClass(this.editingCell,"p-cell-editing"),hr(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(ke.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=ke.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=ke.getOffset(this.el?.nativeElement).left;!this.$unstyled()&&ke.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 m=this.resizeColumnElement.nextElementSibling.offsetWidth-i;a>15&&m>15&&this.resizeTableCells(a,m)}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",ke.removeClass(this.el?.nativeElement,"p-unselectable-text")}_totalTableWidth(){let e=[],n=ke.findSingle(this.el.nativeElement,'[data-pc-section="thead"]');return ke.find(n,"tr > th").forEach(r=>e.push(ke.getOuterWidth(r))),e}onColumnDragStart(e,n){this.reorderIconWidth=ke.getHiddenElementOuterWidth(this.reorderIndicatorUpViewChild?.nativeElement),this.reorderIconHeight=ke.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=ke.getOffset(this.el?.nativeElement),r=ke.getOffset(n);if(this.draggedColumn!=n){let a=ke.indexWithinGroup(this.draggedColumn,"preorderablecolumn"),s=ke.indexWithinGroup(n,"preorderablecolumn"),c=r.left-i.left,u=i.top-r.top,m=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>m?(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=ke.indexWithinGroup(this.draggedColumn,"preorderablecolumn"),r=ke.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=ke.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,m=`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
- ${m}
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=ke.getOffset(i).top,a=e.pageY,s=r+ke.getOuterHeight(i)/2,c=i.previousElementSibling;a<s?(ke.removeClass(i,"p-datatable-dragpoint-bottom"),this.droppedRowIndex=n,c&&!this.$unstyled()?ke.addClass(c,"p-datatable-dragpoint-bottom"):!this.$unstyled()&&ke.addClass(i,"p-datatable-dragpoint-top")):(c&&!this.$unstyled()?ke.removeClass(c,"p-datatable-dragpoint-bottom"):!this.$unstyled()&&ke.addClass(i,"p-datatable-dragpoint-top"),this.droppedRowIndex=n+1,!this.$unstyled()&&ke.addClass(i,"p-datatable-dragpoint-bottom"))}}onRowDragLeave(e,n){let i=n.previousElementSibling;i&&!this.$unstyled()&&ke.removeClass(i,"p-datatable-dragpoint-bottom"),!this.$unstyled()&&ke.removeClass(n,"p-datatable-dragpoint-bottom"),!this.$unstyled()&&ke.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(Kt(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=ke.find(r,'[data-pc-section="thead"] > tr > th')),i.forEach(a=>n.push(ke.getOuterWidth(a))),e.columnWidths=n.join(","),this.columnResizeMode==="expand"&&this.tableViewChild&&(e.tableWidth=ke.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",ke.setAttribute(this.styleElement,"nonce",this.config?.csp()?.nonce),this.renderer.appendChild(this.document.head,this.styleElement),ke.setAttribute(this.styleElement,"nonce",this.config?.csp()?.nonce)}getGroupRowsMeta(){return{field:this.groupRowsBy,order:this.groupRowsByOrder}}createResponsiveStyle(){if(Kt(this.platformId)&&!this.responsiveStyleElement){this.responsiveStyleElement=this.renderer.createElement("style"),this.responsiveStyleElement.type="text/css",ke.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),ke.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=q(t)))(i||t)}})();static \u0275cmp=z({type:t,selectors:[["p-table"]],contentQueries:function(n,i,r){if(n&1&&wt(r,j4,4)(r,U4,4)(r,$4,4)(r,W4,4)(r,K4,4)(r,Y4,4)(r,Z4,4)(r,X4,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,aN,4)(r,sN,4)(r,lN,4)(r,cN,4)(r,dN,4)(r,uN,4)(r,pN,4)(r,hN,4)(r,fN,4)(r,mN,4)(r,_N,4)(r,gN,4)(r,bN,4)(r,vN,4)(r,yN,4)(r,CN,4)(r,Ke,4),n&2){let a;U(a=$())&&(i._headerTemplate=a.first),U(a=$())&&(i._headerGroupedTemplate=a.first),U(a=$())&&(i._bodyTemplate=a.first),U(a=$())&&(i._loadingBodyTemplate=a.first),U(a=$())&&(i._captionTemplate=a.first),U(a=$())&&(i._footerTemplate=a.first),U(a=$())&&(i._footerGroupedTemplate=a.first),U(a=$())&&(i._summaryTemplate=a.first),U(a=$())&&(i._colGroupTemplate=a.first),U(a=$())&&(i._expandedRowTemplate=a.first),U(a=$())&&(i._groupHeaderTemplate=a.first),U(a=$())&&(i._groupFooterTemplate=a.first),U(a=$())&&(i._frozenExpandedRowTemplate=a.first),U(a=$())&&(i._frozenHeaderTemplate=a.first),U(a=$())&&(i._frozenBodyTemplate=a.first),U(a=$())&&(i._frozenFooterTemplate=a.first),U(a=$())&&(i._frozenColGroupTemplate=a.first),U(a=$())&&(i._emptyMessageTemplate=a.first),U(a=$())&&(i._paginatorLeftTemplate=a.first),U(a=$())&&(i._paginatorRightTemplate=a.first),U(a=$())&&(i._paginatorDropdownItemTemplate=a.first),U(a=$())&&(i._loadingIconTemplate=a.first),U(a=$())&&(i._reorderIndicatorUpIconTemplate=a.first),U(a=$())&&(i._reorderIndicatorDownIconTemplate=a.first),U(a=$())&&(i._sortIconTemplate=a.first),U(a=$())&&(i._checkboxIconTemplate=a.first),U(a=$())&&(i._headerCheckboxIconTemplate=a.first),U(a=$())&&(i._paginatorDropdownIconTemplate=a.first),U(a=$())&&(i._paginatorFirstPageLinkIconTemplate=a.first),U(a=$())&&(i._paginatorLastPageLinkIconTemplate=a.first),U(a=$())&&(i._paginatorPreviousPageLinkIconTemplate=a.first),U(a=$())&&(i._paginatorNextPageLinkIconTemplate=a.first),U(a=$())&&(i._templates=a)}},viewQuery:function(n,i){if(n&1&&In(xN,5)(wN,5)(TN,5)(SN,5)(kN,5)(IN,5)(EN,5)(MN,5),n&2){let r;U(r=$())&&(i.resizeHelperViewChild=r.first),U(r=$())&&(i.reorderIndicatorUpViewChild=r.first),U(r=$())&&(i.reorderIndicatorDownViewChild=r.first),U(r=$())&&(i.wrapperViewChild=r.first),U(r=$())&&(i.tableViewChild=r.first),U(r=$())&&(i.tableHeaderViewChild=r.first),U(r=$())&&(i.tableFooterViewChild=r.first),U(r=$())&&(i.scroller=r.first)}},hostVars:3,hostBindings:function(n,i){n&2&&(O("data-p",i.dataP),B(i.cn(i.cx("root"),i.styleClass)))},inputs:{frozenColumns:"frozenColumns",frozenValue:"frozenValue",styleClass:"styleClass",tableStyle:"tableStyle",tableStyleClass:"tableStyleClass",paginator:[2,"paginator","paginator",G],pageLinks:[2,"pageLinks","pageLinks",Te],rowsPerPageOptions:"rowsPerPageOptions",alwaysShowPaginator:[2,"alwaysShowPaginator","alwaysShowPaginator",G],paginatorPosition:"paginatorPosition",paginatorStyleClass:"paginatorStyleClass",paginatorDropdownAppendTo:"paginatorDropdownAppendTo",paginatorDropdownScrollHeight:"paginatorDropdownScrollHeight",currentPageReportTemplate:"currentPageReportTemplate",showCurrentPageReport:[2,"showCurrentPageReport","showCurrentPageReport",G],showJumpToPageDropdown:[2,"showJumpToPageDropdown","showJumpToPageDropdown",G],showJumpToPageInput:[2,"showJumpToPageInput","showJumpToPageInput",G],showFirstLastIcon:[2,"showFirstLastIcon","showFirstLastIcon",G],showPageLinks:[2,"showPageLinks","showPageLinks",G],defaultSortOrder:[2,"defaultSortOrder","defaultSortOrder",Te],sortMode:"sortMode",resetPageOnSort:[2,"resetPageOnSort","resetPageOnSort",G],selectionMode:"selectionMode",selectionPageOnly:[2,"selectionPageOnly","selectionPageOnly",G],contextMenuSelection:"contextMenuSelection",contextMenuSelectionMode:"contextMenuSelectionMode",dataKey:"dataKey",metaKeySelection:[2,"metaKeySelection","metaKeySelection",G],rowSelectable:"rowSelectable",rowTrackBy:"rowTrackBy",lazy:[2,"lazy","lazy",G],lazyLoadOnInit:[2,"lazyLoadOnInit","lazyLoadOnInit",G],compareSelectionBy:"compareSelectionBy",csvSeparator:"csvSeparator",exportFilename:"exportFilename",filters:"filters",globalFilterFields:"globalFilterFields",filterDelay:[2,"filterDelay","filterDelay",Te],filterLocale:"filterLocale",expandedRowKeys:"expandedRowKeys",editingRowKeys:"editingRowKeys",rowExpandMode:"rowExpandMode",scrollable:[2,"scrollable","scrollable",G],rowGroupMode:"rowGroupMode",scrollHeight:"scrollHeight",virtualScroll:[2,"virtualScroll","virtualScroll",G],virtualScrollItemSize:[2,"virtualScrollItemSize","virtualScrollItemSize",Te],virtualScrollOptions:"virtualScrollOptions",virtualScrollDelay:[2,"virtualScrollDelay","virtualScrollDelay",Te],frozenWidth:"frozenWidth",contextMenu:"contextMenu",resizableColumns:[2,"resizableColumns","resizableColumns",G],columnResizeMode:"columnResizeMode",reorderableColumns:[2,"reorderableColumns","reorderableColumns",G],loading:[2,"loading","loading",G],loadingIcon:"loadingIcon",showLoader:[2,"showLoader","showLoader",G],rowHover:[2,"rowHover","rowHover",G],customSort:[2,"customSort","customSort",G],showInitialSortBadge:[2,"showInitialSortBadge","showInitialSortBadge",G],exportFunction:"exportFunction",exportHeader:"exportHeader",stateKey:"stateKey",stateStorage:"stateStorage",editMode:"editMode",groupRowsBy:"groupRowsBy",size:"size",showGridlines:[2,"showGridlines","showGridlines",G],stripedRows:[2,"stripedRows","stripedRows",G],groupRowsByOrder:[2,"groupRowsByOrder","groupRowsByOrder",Te],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:[ve([Qf,Xf,{provide:xA,useExisting:t},{provide:ut,useExisting:t}]),lt([de]),Y],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&&(S(0,BN,3,5,"div",10)(1,zN,2,4,"div",10)(2,n5,6,26,"p-paginator",11),f(3,"div",12,0),S(5,r5,4,18,"p-scroller",13)(6,s5,2,7,"ng-container",14)(7,f5,10,32,"ng-template",null,1,We),_(),S(9,D5,6,26,"p-paginator",11)(10,R5,2,3,"div",15)(11,O5,2,4,"div",16)(12,L5,4,6,"span",16)(13,H5,4,6,"span",16)),n&2&&(h("ngIf",i.loading&&i.showLoader),l(),h("ngIf",i.captionTemplate||i._captionTemplate),l(),h("ngIf",i.paginator&&(i.paginatorPosition==="top"||i.paginatorPosition=="both")),l(),B(i.cx("tableContainer")),h("ngStyle",i.sx("tableContainer"))("pBind",i.ptm("tableContainer")),O("data-p",i.dataP),l(2),h("ngIf",i.virtualScroll),l(),h("ngIf",!i.virtualScroll),l(3),h("ngIf",i.paginator&&(i.paginatorPosition==="bottom"||i.paginatorPosition=="both")),l(),h("ngIf",i.summaryTemplate||i._summaryTemplate),l(),h("ngIf",i.resizableColumns),l(),h("ngIf",i.reorderableColumns),l(),h("ngIf",i.reorderableColumns))},dependencies:()=>[an,kt,xt,Zn,Yf,Ke,pb,$f,Wf,Hf,de,wA],encapsulation:2})}return t})(),wA=(()=>{class t extends Ot{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=ke.getOuterHeight(this.el.nativeElement.previousElementSibling)+"px"}updateFrozenRowGroupHeaderStickyPosition(){if(this.el.nativeElement.previousElementSibling){let e=ke.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)(bn(em),bn(Qf))};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",G],frozenRows:[2,"frozenRows","frozenRows",G],scrollerOptions:"scrollerOptions"},standalone:!1,features:[Y],attrs:q5,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&&S(0,J5,2,2,"ng-container",0)(1,cA,2,2,"ng-container",0)(2,fA,2,2,"ng-container",0)(3,_A,2,5,"ng-container",0)(4,bA,2,5,"ng-container",0),n&2&&(h("ngIf",!i.dataTable.expandedRowTemplate&&!i.dataTable._expandedRowTemplate),l(),h("ngIf",(i.dataTable.expandedRowTemplate||i.dataTable._expandedRowTemplate)&&!(i.frozen&&(i.dataTable.frozenExpandedRowTemplate||i.dataTable._frozenExpandedRowTemplate))),l(),h("ngIf",(i.dataTable.frozenExpandedRowTemplate||i.dataTable._frozenExpandedRowTemplate)&&i.frozen),l(),h("ngIf",i.dataTable.loading),l(),h("ngIf",i.dataTable.isEmpty()&&!i.dataTable.loading))},dependencies:[so,kt,xt],encapsulation:2})}return t})();var kv=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=nt({type:t});static \u0275inj=tt({providers:[Xf],imports:[ot,gv,is,fb,Vt,dn,mb,lv,hv,sb,nv,qf,$f,Wf,Hf,Wb,Yb,Kb,Gb,cv,jb,$b,Xb,xv,zt,_o,Se,qf]})}return t})();var Iv=`
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 SA={root:()=>["p-progressspinner"],spin:"p-progressspinner-spin",circle:"p-progressspinner-circle"},Ev=(()=>{class t extends dt{name="progressspinner";style=Iv;classes=SA;static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})();var Mv=new ue("PROGRESSSPINNER_INSTANCE"),tm=(()=>{class t extends Ot{componentName="ProgressSpinner";$pcProgressSpinner=p(Mv,{optional:!0,skipSelf:!0})??void 0;bindDirectiveInstance=p(de,{self:!0});styleClass;strokeWidth="2";fill="none";animationDuration="2s";ariaLabel;onAfterViewChecked(){this.bindDirectiveInstance.setAttrs(this.ptms(["host","root"]))}_componentStyle=p(Ev);static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(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),B(i.cn(i.cx("root"),i.styleClass)))},inputs:{styleClass:"styleClass",strokeWidth:"strokeWidth",fill:"fill",animationDuration:"animationDuration",ariaLabel:"ariaLabel"},features:[ve([Ev,{provide:Mv,useExisting:t},{provide:ut,useExisting:t}]),lt([de]),Y],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&&(K(),f(0,"svg",0),F(1,"circle",1),_()),n&2&&(B(i.cx("spin")),$e("animation-duration",i.animationDuration),h("pBind",i.ptm("spin")),l(),B(i.cx("circle")),h("pBind",i.ptm("circle")),O("fill",i.fill)("stroke-width",i.strokeWidth))},dependencies:[ot,Se,de],encapsulation:2,changeDetection:0})}return t})(),Dv=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=nt({type:t});static \u0275inj=tt({imports:[tm,Se,Se]})}return t})();var Pi={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`,isolateChainTooltip:"Isolate this chain on the map",isolateChainAriaLabel:t=>`Isolate the chain of ${t} 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 vo=(()=>{class t{loader=p(Ht);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 nm="sm.map.visible-paths";function Pv(){let t=null;try{t=localStorage.getItem(nm)}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 Rv(t){try{if(t.size===0){localStorage.removeItem(nm);return}localStorage.setItem(nm,JSON.stringify([...t]))}catch{}}var xs=(()=>{class t{_paths=Q(Pv());paths=this._paths.asReadonly();isActive=E(()=>this._paths().size>0);count=E(()=>this._paths().size);constructor(){ge(()=>Rv(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 im="sm.folders.collapsed";function Ov(){let t=null;try{t=localStorage.getItem(im)}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 Fv(t){try{if(t.size===0){localStorage.removeItem(im);return}localStorage.setItem(im,JSON.stringify([...t]))}catch{}}var ws={stable:"success",experimental:"info",deprecated:"warn"},Nv={invokes:"warn",references:"info",mentions:"secondary",supersedes:"success"};function om(t){return t>=.75?"high":t>=.45?"medium":"low"}function Av(t){let o=om(t);return o==="high"?"success":o==="medium"?"info":"warn"}var Hn={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 zv(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 Hv(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 qv(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 Gv(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 Ts(t,o,e,n=""){let i=OA(t),r=rs(t);return{type:"leaf",path:t.path,name:RA(t),prefix:n,depth:o,linksIn:t.linksInCount!==void 0?String(t.linksInCount):Pi.missing,linksOut:t.linksOutCount!==void 0?String(t.linksOutCount):Pi.missing,tokens:t.tokensTotal!==void 0?_r(t.tokensTotal):Pi.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?ss(t,Hn.sidecar):"",stability:i,stabilitySeverity:ws[i]}}function IA(t,o,e,n){let i=[],r=(c,u)=>{let m=[c.name],g=c;for(;g.subfolders.size===1&&g.leaves.length===0;){let[X]=g.subfolders.values();m.push(X.name),g=X}let x=m.join("/");if(g.subfolders.size===0&&g.leaves.length===1){i.push(Ts(g.leaves[0],u,n,`${x}/`));return}let I=!o.has(g.path),k=e.get(g.path)??{nodes:0};if(i.push({type:"folder",path:g.path,name:x,depth:u,expanded:I,nodeCount:k.nodes}),!I)return;let N=Array.from(g.subfolders.values()).sort(Bv);for(let X of N)r(X,u+1);let j=[...g.leaves].sort(Vv);for(let X of j)i.push(Ts(X,u+1,n))},a=Array.from(t.subfolders.values()).sort(Bv);for(let c of a)r(c,0);let s=[...t.leaves].sort(Vv);for(let c of s)i.push(Ts(c,0,n));return i}function EA(t,o,e){let n=t.map(i=>Ts(i,0,e,PA(i.path)));return o.column==="tree"||n.sort(DA(o.column,o.dir)),n}function jv(t){return t.sort.column==="tree"?IA(t.tree,t.collapsed,t.aggregates,t.maps):EA(t.leaves,t.sort,t.maps)}function MA(t){return t.errors*1e6+t.warns*1e3+(t.isStale?1:0)}function DA(t,o){let e=o==="asc"?1:-1;return(n,i)=>{let r=Lv(n,t),a=Lv(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 Lv(t,o){switch(o){case"linksIn":return t.linksInRaw;case"linksOut":return t.linksOutRaw;case"tokens":return t.tokensRaw;case"issues":return MA(t)}}function PA(t){let o=t.lastIndexOf("/");return o===-1?"":t.slice(0,o)}function RA(t){let o=t.frontmatter.name?.trim();return o||ps(t.path)||Pi.missing}function OA(t){return ho(t)??"stable"}function Bv(t,o){return t.name.localeCompare(o.name)}function Vv(t,o){return t.path.localeCompare(o.path)}function rm(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 am="sm.files.sort",FA=["tree","linksIn","linksOut","tokens","issues"],NA=["asc","desc"],Ri={column:"tree",dir:"asc"};function AA(t){return t==="tree"?"asc":"desc"}function Uv(t,o){return o==="tree"?Ri:t.column===o?{column:o,dir:t.dir==="asc"?"desc":"asc"}:{column:o,dir:AA(o)}}function LA(t){return typeof t=="string"&&FA.includes(t)}function BA(t){return typeof t=="string"&&NA.includes(t)}function VA(t){if(typeof t!="object"||t===null)return!1;let o=t;return LA(o.column)&&BA(o.dir)}function $v(){let t=null;try{t=localStorage.getItem(am)}catch{return Ri}if(!t)return Ri;let o;try{o=JSON.parse(t)}catch{return Ri}return VA(o)?{column:o.column,dir:o.dir}:Ri}function Wv(t){try{if(t.column===Ri.column&&t.dir===Ri.dir){localStorage.removeItem(am);return}localStorage.setItem(am,JSON.stringify({column:t.column,dir:t.dir}))}catch{}}var zA=()=>({width:"1.75rem",height:"1.75rem"});function HA(t,o){if(t&1&&F(0,"p-message",1),t&2){let e=d();h("text",e.error())}}function qA(t,o){if(t&1&&(f(0,"div",2),F(1,"p-progressSpinner",3),f(2,"span",4),b(3),_()()),t&2){let e=d();l(),St(on(3,zA)),l(2),C(e.texts.loading)}}function GA(t,o){if(t&1){let e=te();F(0,"i",7),f(1,"p",8),b(2),_(),f(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),C(e.texts.emptyFiltered),l(),h("label",e.texts.resetFilters)("text",!0)}}function jA(t,o){if(t&1&&(F(0,"i",10),f(1,"p",11),b(2),_(),f(3,"p",12),b(4),_()),t&2){let e=d(3);l(2),C(e.texts.emptyAll),l(2),C(e.texts.emptyAllHint)}}function UA(t,o){if(t&1&&(f(0,"div",5),P(1,GA,4,3)(2,jA,5,2),_()),t&2){let e=d(2);l(),R(e.filtersActive()?1:2)}}function $A(t,o){if(t&1){let e=te();f(0,"span",20)(1,"button",27),A("click",function(){w(e);let i=d(4);return T(i.expandAll())}),F(2,"i",28),_(),f(3,"button",29),A("click",function(){w(e);let i=d(4);return T(i.collapseAll())}),F(4,"i",30),_(),F(5,"span",31),f(6,"button",32),A("click",function(){w(e);let i=d(4);return T(i.setDepthLevel(0))}),b(7,"0"),_(),f(8,"button",33),A("click",function(){w(e);let i=d(4);return T(i.setDepthLevel(1))}),b(9,"1"),_(),f(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(),h("pTooltip",e.texts.expandAll),O("aria-label",e.texts.expandAll),l(2),h("pTooltip",e.texts.collapseAll),O("aria-label",e.texts.collapseAll),l(3),ce("is-active",e.activeDepthLevel()===0),h("pTooltip",e.texts.depthLevel0),O("aria-label",e.texts.depthLevel0)("aria-pressed",e.activeDepthLevel()===0),l(2),ce("is-active",e.activeDepthLevel()===1),h("pTooltip",e.texts.depthLevel1),O("aria-label",e.texts.depthLevel1)("aria-pressed",e.activeDepthLevel()===1),l(2),ce("is-active",e.activeDepthLevel()===2),h("pTooltip",e.texts.depthLevel2),O("aria-label",e.texts.depthLevel2)("aria-pressed",e.activeDepthLevel()===2)}}function WA(t,o){if(t&1){let e=te();f(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),F(5,"i",19),_(),P(6,$A,12,19,"span",20),_()(),f(7,"th",21)(8,"button",22),A("click",function(){w(e);let i=d(3);return T(i.onSortColumn("linksIn"))}),b(9),F(10,"i",19),_()(),f(11,"th",23)(12,"button",22),A("click",function(){w(e);let i=d(3);return T(i.onSortColumn("linksOut"))}),b(13),F(14,"i",19),_()(),f(15,"th",24)(16,"button",25),A("click",function(){w(e);let i=d(3);return T(i.onSortColumn("tokens"))}),b(17),F(18,"i",19),_()(),f(19,"th",26)(20,"button",18),A("click",function(){w(e);let i=d(3);return T(i.onSortColumn("issues"))}),b(21),F(22,"i",19),_()()()}if(t&2){let e=d(3);l(),O("aria-sort",e.ariaSortFor("tree")),l(2),ce("files__sort-btn--active",e.sortState().column==="tree"),O("aria-label",e.texts.sortTreeAriaLabel),l(),Me(" ",e.texts.columns.tree," "),l(),ce("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(),R(e.isFlat()?-1:6),l(),O("aria-sort",e.ariaSortFor("linksIn")),l(),ce("files__sort-btn--active",e.sortState().column==="linksIn"),h("pTooltip",e.texts.linksInHeaderTooltip),O("aria-label",e.texts.sortAriaLabel(e.texts.columns.linksIn)),l(),Me(" ",e.texts.columns.linksIn," "),l(),ce("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(),ce("files__sort-btn--active",e.sortState().column==="linksOut"),h("pTooltip",e.texts.linksOutHeaderTooltip),O("aria-label",e.texts.sortAriaLabel(e.texts.columns.linksOut)),l(),Me(" ",e.texts.columns.linksOut," "),l(),ce("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(),ce("files__sort-btn--active",e.sortState().column==="tokens"),O("aria-label",e.texts.sortAriaLabel(e.texts.columns.tokens)),l(),Me(" ",e.texts.columns.tokens," "),l(),ce("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(),ce("files__sort-btn--active",e.sortState().column==="issues"),O("aria-label",e.texts.sortAriaLabel(e.texts.columns.issues)),l(),Me(" ",e.texts.columns.issues," "),l(),ce("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 KA(t,o){if(t&1){let e=te();f(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))}),f(1,"td",38)(2,"span",39),F(3,"span",40),f(4,"button",41),A("click",function(i){w(e);let r=d().$implicit,a=d(3);return T(a.onToggleFolderVisibility(r,i))}),F(5,"i",42),_(),F(6,"i",43)(7,"i",44),f(8,"span",45),b(9),_(),f(10,"span",46),b(11),_()()(),F(12,"td")(13,"td")(14,"td")(15,"td"),_()}if(t&2){let e=d().$implicit,n=d(3);$e("--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),h("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(),ce("pi-check",n.folderStateMap().get(e.path)==="all")("pi-minus",n.folderStateMap().get(e.path)==="some"),l(),ce("pi-chevron-right",!e.expanded)("pi-chevron-down",e.expanded),l(),ce("pi-folder",!e.expanded)("pi-folder-open",e.expanded),l(2),C(e.name),l(),O("aria-label",e.nodeCount+" nodes"),l(),C(n.texts.folderCount(e.nodeCount))}}function YA(t,o){if(t&1&&(f(0,"span",62),b(1),_()),t&2){let e=d(3).$implicit;l(),C(e.prefix)}}function ZA(t,o){if(t&1&&(f(0,"span",50)(1,"span",61),b(2),_(),P(3,YA,2,1,"span",62),_()),t&2){let e=d(2).$implicit;h("pTooltip",e.path),l(2),C(e.name),l(),R(e.prefix?3:-1)}}function XA(t,o){if(t&1&&(f(0,"span",63),b(1),_()),t&2){let e=d(3).$implicit;l(),C(e.prefix)}}function QA(t,o){if(t&1&&(f(0,"span",51),P(1,XA,2,1,"span",63),b(2),_()),t&2){let e=d(2).$implicit;l(),R(e.prefix?1:-1),l(),C(e.name)}}function JA(t,o){if(t&1&&F(0,"i",57),t&2){let e=d(2).$implicit;h("pTooltip",e.staleTooltip),O("aria-label",e.staleTooltip)}}function e6(t,o){if(t&1&&(f(0,"span",58),F(1,"i",64),f(2,"span",65),b(3),_()()),t&2){let e=d(2).$implicit;l(3),C(e.errors)}}function t6(t,o){if(t&1&&(f(0,"span",59),F(1,"i",66),f(2,"span",65),b(3),_()()),t&2){let e=d(2).$implicit;l(3),C(e.warns)}}function n6(t,o){if(t&1&&(f(0,"span",60),b(1),_()),t&2){let e=d(5);l(),C(e.texts.missing)}}function i6(t,o){if(t&1){let e=te();f(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))}),f(1,"td",38)(2,"span",39),F(3,"span",40),f(4,"button",41),A("click",function(i){w(e);let r=d().$implicit,a=d(3);return T(a.onToggleLeafVisibility(r,i))}),F(5,"i",42),_(),F(6,"span",48)(7,"i",49),P(8,ZA,4,3,"span",50)(9,QA,3,2,"span",51),f(10,"button",52),A("click",function(i){w(e);let r=d().$implicit,a=d(3);return T(a.onSitemapClick(r,i))}),F(11,"i",53),_()()(),f(12,"td",54),b(13),_(),f(14,"td",54),b(15),_(),f(16,"td",54),b(17),_(),f(18,"td",55)(19,"span",56),P(20,JA,1,2,"i",57),P(21,e6,4,1,"span",58),P(22,t6,4,1,"span",59),P(23,n6,2,1,"span",60),_()()()}if(t&2){let e=d().$implicit,n=d(3);$e("--folder-depth",e.depth),O("aria-label",n.texts.leafAriaLabel(e.name))("data-testid","files-leaf-"+e.path),l(4),h("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(),ce("pi-check",n.leafVisible(e.path)),l(3),R(n.isFlat()?8:9),l(2),h("pTooltip",n.texts.isolateChainTooltip),O("aria-label",n.texts.isolateChainAriaLabel(e.name))("data-testid","files-leaf-graph-"+e.path),l(3),C(e.linksIn),l(2),C(e.linksOut),l(),O("title",(e.tokensRaw??0)>0?n.texts.tokensTooltip(e.tokensRaw):null),l(),C(e.tokens),l(3),R(e.isStale?20:-1),l(),R(e.errors>0?21:-1),l(),R(e.warns>0?22:-1),l(),R(!e.isStale&&e.errors===0&&e.warns===0?23:-1)}}function o6(t,o){if(t&1&&P(0,KA,16,25,"tr",35)(1,i6,24,22,"tr",36),t&2){let e=o.$implicit;R(e.type==="folder"?0:1)}}function r6(t,o){if(t&1&&(f(0,"div",6)(1,"p-table",13),S(2,WA,23,58,"ng-template",14)(3,o6,2,1,"ng-template",15),_()()),t&2){let e=d(2);l(),h("value",e.rows())("paginator",!1)("scrollable",!0)("scrollHeight","flex")}}function a6(t,o){if(t&1&&P(0,UA,3,1,"div",5)(1,r6,4,4,"div",6),t&2){let e=d();R(e.rows().length===0?0:1)}}var Kv=(()=>{class t{loader=p(Ht);filters=p(cn);issuePaths=p(vo);nodeOpenIntent=p(fo);mapVisibility=p(xs);mapIsolate=p(gs);texts=Pi;loading=this.loader.loading;error=this.loader.error;filtersActive=this.filters.isActive;collapsed=Q(Ov());sort=Q($v());sortState=this.sort.asReadonly();isFlat=E(()=>this.sort().column!=="tree");constructor(){ge(()=>{Fv(this.collapsed())}),ge(()=>{Wv(this.sort())})}filteredNodes=E(()=>{let e=this.issuePaths.bySeverity();return this.filters.apply(this.loader.nodes(),e)});tree=E(()=>zv(this.filteredNodes()));aggregates=E(()=>Hv(this.tree()));rows=E(()=>{let e=rm(this.loader.scan()?.issues,"error"),n=rm(this.loader.scan()?.issues,"warn");return jv({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,m]=i(c);a+=u,s+=m}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(Uv(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=qv(this.tree(),e.path);i&&this.mapVisibility.toggleFolder(Gv(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&&(f(0,"section",0),P(1,HA,1,1,"p-message",1),P(2,qA,4,4,"div",2)(3,a6,2,1),_()),n&2&&(l(),R(i.error()?1:-1),l(),R(i.loading()?2:i.error()?-1:3))},dependencies:[kv,em,Ke,Dv,tm,gb,_b,dn,Yt,ze,Ve],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(--sm-severity-warn);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 Oi=class{constructor(o,e,n,i,r){this.center=o,this.radiusX=e,this.radiusY=n,this.startAngle=i,this.endAngle=r}},W=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}},_e=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=W.sum(this,o);return t.fromPoint(e)}sub(o){let e=W.sub(this,o);return t.fromPoint(e)}subNumber(o){let e=W.sub(this,new t(o,o));return t.fromPoint(e)}div(o){let e=W.div(this,o);return t.fromPoint(e)}mult(o){let e=W.mult(this,o);return t.fromPoint(e)}matrixTransform(o){let e=W.matrixTransform(this,o);return t.fromPoint(e)}elementTransform(o){let e=W.elementTransform(this,o);return t.fromPoint(e)}},vr=class{static initialize(o=W.initialize(),e=W.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))}},Fi=class{constructor(o,e){this.point1=o,this.point2=e}},oe=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=W.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=W.sub(o,W.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 Yv(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 oe.initialize(t.x-i,t.y-r,e,n)}function lm(t,o){t=oe.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 Zv(t,o){t=oe.updateIsNotFinite(t),o.setAttribute("viewBox",`${t.x} ${t.y} ${t.width} ${t.height}`)}var pt=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=W.initialize(),this.gravityCenter=this.calculateGravityCenter(this)}calculateGravityCenter(o){return new _e(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}},Ft=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 s6(){return{position:W.initialize(),scaledPosition:W.initialize(),scale:1,rotate:0}}function l6(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:W.initialize(),scale:Number(e[0]),rotate:0}}return o}var ii=class{static toString(o){let e=W.sum(o.position,o.scaledPosition);return`matrix(${o.scale}, 0, 0, ${o.scale}, ${e.x}, ${e.y})`}static fromString(o){return l6(o)}static default(){return s6()}},qt=class t{static initialize(o=0,e=0){return W.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}},sm=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,m=o.y+o.radius2,g=o.x+o.width-o.radius3,x=o.y+o.height-o.radius3,I=o.x+o.radius4,k=o.y+o.height-o.radius4;return[new Oi({x:s,y:c},o.radius1,o.radius1,2*e,3*e),new Fi({x:s,y:i},{x:u,y:i}),new Oi({x:u,y:m},o.radius2,o.radius2,3*e,4*e),new Fi({x:r,y:m},{x:r,y:x}),new Oi({x:g,y:x},o.radius3,o.radius3,0,e),new Fi({x:g,y:a},{x:I,y:a}),new Oi({x:I,y:k},o.radius4,o.radius4,e,2*e),new Fi({x:n,y:k},{x:n,y:c})]}},yo=class{static getRoundedRectIntersections(o,e,n){let i=sm.parseRoundedRect(n);for(let r of i)if(r instanceof Oi){let a=this.intersectArcWithLine(r,o,e);if(a.length>0)return a}else if(r instanceof Fi){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),m=(s*(o.y-n.y)-c*(o.x-n.x))/(-s*a+r*c);return u>=0&&u<=1&&m>=0&&m<=1?{x:o.x+m*r,y:o.y+m*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(qt.angle(qt.initialize(1,0),qt.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=qt.initialize(i.x,i.y),s=qt.fromPoints(i,r),c=qt.initialize(o.x,o.y),u=qt.subtract(a,c),m=qt.initialize(s.x/(e*e),s.y/(n*n)),g=qt.initialize(u.x/(e*e),u.y/(n*n)),x=qt.dotProduct(s,m),I=qt.dotProduct(s,g),k=qt.dotProduct(u,g)-1,N=I*I-x*k;return N<0?[]:this.calculateIntersectionPoints(N,x,I,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(W.interpolatePoints(i,r,c)),u>=0&&u<=1&&a.push(W.interpolatePoints(i,r,u))}else{let s=-n/e;s>=0&&s<=1&&a.push(W.interpolatePoints(i,r,s))}return a}};var cm=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(gt)}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 cm;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 D(t){return function(o){V.registerPipeline(t,o,!1)}}var c6=(()=>{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})(),d6=(()=>{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})(),u6=new ue("F_LOCAL_STORAGE",{providedIn:"root",factory:()=>Kt(p($a))?p(c6):p(d6)}),p6=(()=>{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})(),h6=(()=>{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})(),f6=new ue("F_WINDOW",{providedIn:"root",factory:()=>Kt(p($a))?p(p6):p(h6)}),oi=(function(t){return t.MAC_OS="macos",t.IOS="ios",t.WINDOWS="windows",t.ANDROID="android",t.LINUX="linux",t})(oi||{}),dm;try{dm=typeof Intl<"u"&&Intl.v8BreakIterator}catch{dm=!1}var um=(()=>{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||dm)&&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?Kt(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)(oo($a))};static \u0275prov=y({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),ht=(()=>{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)(oo(Ua),oo(f6),oo(u6),oo(um))};static \u0275prov=y({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function pm(t,o){return t.reduce((e,n)=>[...e,...o(n)],[])}function hm(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")&&Qv(t,o),Xv("canvas",t,o,Jv),Xv("input, textarea, select",t,o,Qv),o}function Xv(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 m6=0;function Qv(t,o){o.type!=="file"&&(o.value=t.value),o.type==="radio"&&o.name&&(o.name=`mat-clone-${o.name}-${m6++}`)}function Jv(t,o){let e=o.getContext("2d");if(e)try{e.drawImage(t,0,0)}catch{}}function fm(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 ey(t){fm(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 ty(t,o,e){return _6(t,e).dataset[o]}function _6(t,o){return t.closest(o)}function mm(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 yr(t,o){let e=g6(t,o);return!!e&&!e.classList.contains(o+"-disabled")}function g6(t,o){return t.closest(o)}function qn(t){return t.match(/^[a-zA-Z_]/)||(t="_"+t),t.replace(/[^a-zA-Z0-9_\-:.]/g,"_")}function Co(t,o,e){let n=e[t.toUpperCase()]||b6(e,t.toLowerCase());if(n===void 0)throw new Error(`Unknown ${o}: ${t}. Accepted values: ${Object.keys(e).join(", ")}`);return n}function b6(t,o){return Object.keys(t).find(e=>t[e]===o)}var v6=["markerElement"],y6=["fConnectionGradientRenderer",""],C6=["f-connection-path",""],x6=["fConnectionSelection",""],w6=["f-connection-drag-handle-start",""],T6=["f-connection-drag-handle-end",""],S6=["defs"],k6=["*"],I6=["fGroupsContainer"],E6=["fNodesContainer"],M6=["fConnectionsContainer"],D6=[[["","fGroup",""],["","fGroups",""]],[["f-snap-connection"]],[["f-connection"],["","fConnections",""]],[["f-connection-for-create"]],[["","fNode",""],["","fNodes",""]]],P6=["[fGroup], [fGroups]","f-snap-connection","f-connection, [fConnections]","f-connection-for-create","[fNode], [fNodes]"],R6=[[["svg","fMarker",""]],[["f-connection-marker-circle"],["f-connection-marker-arrow"]],[["f-connection-gradient"]],[["f-connection-waypoints"]],[["","fConnectionContent",""]]],O6=["svg[fMarker]","f-connection-marker-circle, f-connection-marker-arrow","f-connection-gradient","f-connection-waypoints","[fConnectionContent]"];function F6(t,o){t&1&&(K(),F(0,"linearGradient",3)),t&2&&h("fConnectionGradientRendererFor",o)}function N6(t,o){t&1&&(K(),F(0,"circle",6))}function A6(t,o){t&1&&Ae(0,4)}var L6="[_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}",B6=[[["","fDefinitions",""]],[["f-background"]],[["f-line-alignment"]],[["f-canvas"]],[["f-selection-area"]],"*"],V6=["[fDefinitions]","f-background","f-line-alignment","f-canvas","f-selection-area","*"],ym=new ue("F_BACKGROUND_PATTERN"),Xd=class{fPattern;static fToken=Symbol("AddPatternToBackgroundRequest");constructor(o){this.fPattern=o}},ko=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 Ni(t){return{name:t}}var Cm=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()}},xr=class extends ko{kind;constructor(o){super(),this.kind=o}},xm=class extends ko{kind="Connection Marker"},wm=class extends ko{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}},Tm=class extends ko{kind="Node"},wo=class{notifyOnSubscribe;static fToken=Symbol("ListenConnectionsChangesRequest");constructor(o=!0){this.notifyOnSubscribe=o}};function z6(){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 H6(){return t=>{let o=null;return{callback:()=>{o!==null&&cancelAnimationFrame(o),o=requestAnimationFrame(()=>{o=null,t()})},cleanup:()=>{o!==null&&cancelAnimationFrame(o),o=null}}}}function Qd(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 un=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)}},Sm=class extends un{_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}},Rn=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 x=g(n);n=x.callback,x.cleanup&&i.push(x.cleanup),x.onSubscribe&&r.push(x.onSubscribe),x.setTeardown&&a.push(x.setTeardown)}let s=this._channels.map(g=>g.listen(()=>n())),c=null,u=!1,m=()=>{u||(u=!0,c?.(),c=null,s.forEach(g=>g()),i.forEach(g=>g()))};a.slice().reverse().forEach(g=>g(m)),r.slice().reverse().forEach(g=>g(n)),c=o.onDestroy(m)}};function Eh(){return t=>{let o=!0;return{callback:t,onSubscribe:e=>{queueMicrotask(()=>{o&&e()})},cleanup:()=>{o=!1}}}}function ny(){return t=>{let o=!1,e=null;return{setTeardown:n=>e=n,callback:()=>{if(!o){o=!0;try{t()}finally{e?.()}}}}}}var q6=(()=>{let t=class Es{_store=p(L);handle({notifyOnSubscribe:e}){return e?new Rn(this._store.connectionsChanges$).pipe(Eh(),Qd(1)):new Rn(this._store.connectionsChanges$).pipe(Qd(1))}static \u0275fac=function(n){return new(n||Es)};static \u0275prov=y({token:Es,factory:Es.\u0275fac})};return t=M([D(wo)],t),t})(),km=class{static fToken=Symbol("ListenNodesChangesRequest")},G6=(()=>{let t=class Ms{_store=p(L);handle(e){return new Rn(this._store.nodesChanges$)}static \u0275fac=function(n){return new(n||Ms)};static \u0275prov=y({token:Ms,factory:Ms.\u0275fac})};return t=M([D(km)],t),t})(),Jd=class{static fToken=Symbol("ListenTransformChangesRequest")},j6=(()=>{let t=class Ds{_store=p(L);handle(e){return new Rn(this._store.transformChanges$,this._store.connectionsChanges$,this._store.nodesChanges$)}static \u0275fac=function(n){return new(n||Ds)};static \u0275prov=y({token:Ds,factory:Ds.\u0275fac})};return t=M([D(Jd)],t),t})(),Ai=class{static fToken=Symbol("EmitConnectionsChangesRequest")},U6=(()=>{let t=class Ps{_store=p(L);handle(e){this._store.emitConnectionChanges()}static \u0275fac=function(n){return new(n||Ps)};static \u0275prov=y({token:Ps,factory:Ps.\u0275fac})};return t=M([D(Ai)],t),t})(),li=class{static fToken=Symbol("NotifyTransformChangedRequest")},L=(()=>{class t{transformChanges$=new un;viewportAnimationChanges$=new un;connectionsChanges$=new un;_connectionsRevision=0;connectionsRenderedChanges$=new un;_connectionsRenderedRevision=0;_connectionsRenderedNodesRevision=0;_viewportAnimationCount=0;nodesChanges$=new un;_nodesRevision=0;progressiveRenderChanges$=new un;_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 Tm;connections=new wm;connectionMarkers=new xm;outputs=new xr("Output");inputs=new xr("Input");outlets=new xr("Outlet");instances=new Cm;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})(),Ze={MAGNETIC_LINES:Ni("magnetic-lines"),MAGNETIC_RECTS:Ni("magnetic-rects"),ZOOM:Ni("zoom-controls"),BACKGROUND:Ni("background"),SELECTION_AREA:Ni("selection-area"),MINIMAP:Ni("minimap"),AUTO_PAN:Ni("auto-pan")},$6=(()=>{let t=class Rs{_store=p(L);handle(e){this._store.transformChanged()}static \u0275fac=function(n){return new(n||Rs)};static \u0275prov=y({token:Rs,factory:Rs.\u0275fac})};return t=M([D(li)],t),t})(),ci=class{key;instance;static fToken=Symbol("RegisterPluginInstanceRequest");constructor(o,e){this.key=o,this.instance=e}},W6=(()=>{let t=class Os{_store=p(L);handle({key:e,instance:n}){this._store.instances.add(e,n)}static \u0275fac=function(n){return new(n||Os)};static \u0275prov=y({token:Os,factory:Os.\u0275fac})};return t=M([D(ci)],t),t})(),di=class{key;static fToken=Symbol("RemovePluginInstanceRequest");constructor(o){this.key=o}},K6=(()=>{let t=class Fs{_store=p(L);handle({key:e}){this._store.instances.remove(e)}static \u0275fac=function(n){return new(n||Fs)};static \u0275prov=y({token:Fs,factory:Fs.\u0275fac})};return t=M([D(di)],t),t})(),Y6=[L,G6,q6,j6,U6,$6,W6,K6],Z6=0,X6=(()=>{let t=class Ns{_store=p(L);_browser=p(ht);get _backgroundElement(){return this._store.instances.get(Ze.BACKGROUND)?.hostElement}handle(e){let n=this._getPatterns(e.fPattern?.hostElement);if(!n?.length)return;let i=So("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-"+Z6++;let r=n[n.length-1].id,a=So("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||Ns)};static \u0275prov=y({token:Ns,factory:Ns.\u0275fac})};return t=M([D(Xd)],t),t})(),wr=class{fTransform;static fToken=Symbol("SetBackgroundTransformRequest");constructor(o){this.fTransform=o}},Q6=(()=>{let t=class As{_store=p(L);handle(e){this._store.instances.get(Ze.BACKGROUND)?.setTransform(e.fTransform)}static \u0275fac=function(n){return new(n||As)};static \u0275prov=y({token:As,factory:As.\u0275fac})};return t=M([D(wr)],t),t})(),J6=[X6,Q6],eu=class{instance;static fToken=Symbol("AddCanvasToStoreRequest");constructor(o){this.instance=o}},eL=(()=>{let t=class Ls{_store=p(L);handle({instance:e}){this._store.fCanvas=e}static \u0275fac=function(n){return new(n||Ls)};static \u0275prov=y({token:Ls,factory:Ls.\u0275fac})};return t=M([D(eu)],t),t})(),tu=class{id;animated;static fToken=Symbol("CenterGroupOrNodeRequest");constructor(o,e){this.id=o,this.animated=e}},tL=(()=>{let t=class Bs{_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 Io(n,Li.VIEWPORT_ONLY)))}_toCenter(e,n,i){this._transform.scaledPosition=W.initialize(),this._transform.position=W.initialize((n.width-e.width)/2-i.x*this._transform.scale,(n.height-e.height)/2-i.y*this._transform.scale)}_getNodeRect(e){return oe.fromElement(e.hostElement)}_getFlowRect(){return oe.fromElement(this._store.flowHost)}static \u0275fac=function(n){return new(n||Bs)};static \u0275prov=y({token:Bs,factory:Bs.\u0275fac})};return t=M([D(tu)],t),t})(),nu=class{toCenter;animated;static fToken=Symbol("FitToFlowRequest");constructor(o,e){this.toCenter=o,this.animated=e}},nL=(()=>{let t=class Vs{_store=p(L);get _transform(){return this._store.transform}_mediator=p(V);handle({toCenter:e,animated:n}){let i=this._mediator.execute(new Fo)||oe.initialize();i.width===0||i.height===0||(this.fitToParent(i,oe.fromElement(this._store.flowHost),this._store.nodes.getAll().map(r=>r._position),e),this._mediator.execute(new Io(n,Li.VIEWPORT_ONLY)))}fitToParent(e,n,i,r){this._transform.scaledPosition=W.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=W.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 W.initialize(n,i)}static \u0275fac=function(n){return new(n||Vs)};static \u0275prov=y({token:Vs,factory:Vs.\u0275fac})};return t=M([D(nu)],t),t})(),iu=class{transform;position;static fToken=Symbol("InputCanvasPositionRequest");constructor(o,e){this.transform=o,this.position=e}},iL=(()=>{let t=class zs{_store=p(L);handle({transform:e,position:n}){n&&(W.isEqual(this._calculateTransformPosition(e),n)||(e.position=n,e.scaledPosition=W.initialize(),this._store.fCanvas?.redraw()))}_calculateTransformPosition(e){return W.sum(e.position,e.scaledPosition)}static \u0275fac=function(n){return new(n||zs)};static \u0275prov=y({token:zs,factory:zs.\u0275fac})};return t=M([D(iu)],t),t})(),ou=class{transform;scale;static fToken=Symbol("InputCanvasScaleRequest");constructor(o,e){this.transform=o,this.scale=e}},oL=(()=>{let t=class Hs{_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||Hs)};static \u0275prov=y({token:Hs,factory:Hs.\u0275fac})};return t=M([D(ou)],t),t})(),Li=(function(t){return t.VIEWPORT_ONLY="VIEWPORT_ONLY",t.WITH_CONNECTION_CHANGES="WITH_CONNECTION_CHANGES",t})(Li||{}),Io=class{animated;context;static fToken=Symbol("RedrawCanvasWithAnimationRequest");constructor(o,e=Li.WITH_CONNECTION_CHANGES){this.animated=o,this.context=e}};function My(t,o){let e=n=>{n.propertyName==="transform"&&(t.removeEventListener("transitionend",e),o(n))};t.addEventListener("transitionend",e)}var rL=(()=>{let t=class qs{_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(),My(this._canvas.hostElement,()=>{this._store.endViewportAnimation(),e===Li.WITH_CONNECTION_CHANGES&&this._store.emitConnectionChanges()})}_redraw(e){this._canvas?.redraw(),e===Li.WITH_CONNECTION_CHANGES&&this._store.emitConnectionChanges()}static \u0275fac=function(n){return new(n||qs)};static \u0275prov=y({token:qs,factory:qs.\u0275fac})};return t=M([D(Io)],t),t})(),ru=class{static fToken=Symbol("RemoveCanvasFromStoreRequest")},aL=(()=>{let t=class Gs{_store=p(L);handle(e){this._store.fCanvas=void 0}static \u0275fac=function(n){return new(n||Gs)};static \u0275prov=y({token:Gs,factory:Gs.\u0275fac})};return t=M([D(ru)],t),t})(),au=class{static fToken=Symbol("ResetScaleRequest")},sL=(()=>{let t=class js{_store=p(L);get _transform(){return this._store.transform}handle(e){this._transform.scale=1,this._transform.scaledPosition=W.initialize()}static \u0275fac=function(n){return new(n||js)};static \u0275prov=y({token:js,factory:js.\u0275fac})};return t=M([D(au)],t),t})(),su=class{animated;static fToken=Symbol("ResetScaleAndCenterRequest");constructor(o){this.animated=o}},lL=(()=>{let t=class Us{_mediator=p(V);_store=p(L);get _transform(){return this._store.transform}handle({animated:e}){let n=this._mediator.execute(new Fo)||oe.initialize();n.width===0||n.height===0||(this._oneToOneCentering(n,oe.fromElement(this._store.flowHost),this._store.nodes.getAll().map(i=>i._position)),this._mediator.execute(new Io(e,Li.VIEWPORT_ONLY)))}_oneToOneCentering(e,n,i){this._transform.scaledPosition=W.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=W.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 W.initialize(n,i)}static \u0275fac=function(n){return new(n||Us)};static \u0275prov=y({token:Us,factory:Us.\u0275fac})};return t=M([D(su)],t),t})(),lu=class{scale;toPosition;static fToken=Symbol("UpdateScaleRequest");constructor(o,e){this.scale=o,this.toPosition=e}},cL=(()=>{let t=class $s{_store=p(L);get _transform(){return this._store.transform}handle({scale:e,toPosition:n}){if(e===this._transform.scale)return;let i=W.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=W.sub(W.initialize(r,a),this._transform.position)}static \u0275fac=function(n){return new(n||$s)};static \u0275prov=y({token:$s,factory:$s.\u0275fac})};return t=M([D(lu)],t),t})(),dL=[eL,tL,nL,iL,oL,rL,aL,sL,lL,cL],Im=class{connection;static fToken=Symbol("AddConnectionForCreateToStoreRequest");constructor(o){this.connection=o}},uL=(()=>{let t=class Ws{_store=p(L);handle({connection:e}){this._store.connections.addForCreate(e)}static \u0275fac=function(n){return new(n||Ws)};static \u0275prov=y({token:Ws,factory:Ws.\u0275fac})};return t=M([D(Im)],t),t})(),cu=class{instance;static fToken=Symbol("AddConnectionMarkerToStoreRequest");constructor(o){this.instance=o}},pL=(()=>{let t=class Ks{_store=p(L);handle({instance:e}){this._store.connectionMarkers.add(e),this._store.emitNodeChanges()}static \u0275fac=function(n){return new(n||Ks)};static \u0275prov=y({token:Ks,factory:Ks.\u0275fac})};return t=M([D(cu)],t),t})(),du=class{connection;static fToken=Symbol("AddConnectionToStoreRequest");constructor(o){this.connection=o}},hL=(()=>{let t=class Ys{_store=p(L);handle({connection:e}){this._store.connections.add(e),this._store.emitConnectionChanges()}static \u0275fac=function(n){return new(n||Ys)};static \u0275prov=y({token:Ys,factory:Ys.\u0275fac})};return t=M([D(du)],t),t})(),Em=class{connection;static fToken=Symbol("AddSnapConnectionToStoreRequest");constructor(o){this.connection=o}},fL=(()=>{let t=class Zs{_store=p(L);handle({connection:e}){this._store.connections.addForSnap(e)}static \u0275fac=function(n){return new(n||Zs)};static \u0275prov=y({token:Zs,factory:Zs.\u0275fac})};return t=M([D(Em)],t),t})(),Eo=class{connection;static fToken=Symbol("CreateConnectionMarkersRequest");constructor(o){this.connection=o}},iy=new ue("F_CONNECTION_CONTENT");var uu=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,m=this.points[c+1].y-this.points[c].y,g=Math.hypot(u,m),x=g?u/g:1,I=g?m/g:0;a[c]={x,y:I},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}},Mm=class t{_polyline;constructor(o=[]){this._polyline=new uu(o)}updatePoints(o){return this._polyline=new uu(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 ne=e.length-1;return{point:e[ne],tangent:i[ne-1]??{x:1,y:0},atEdge:!0}}let u=t._findRightIndex(n,s),m=Math.max(1,u),g=n[m-1],x=n[m],I=t._safeRatio(s-g,x-g),k=e[m-1],N=e[m],j={x:t._lerp(k.x,N.x,I),y:t._lerp(k.y,N.y,I)},X=i[m-1]??{x:1,y:0};return{point:j,tangent:X,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}},Dy=(function(t){return t.NONE="none",t.ALONG="along",t})(Dy||{}),Dm=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,x=n*o.totalLength,I=o.totalLength-x,k=this._applyEdgeGuard(c,u,r,x,I,g),N=this._calculateContentRotation(e.align(),r);return{position:k,rotationDeg:N}}_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=oe.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===Dy.ALONG&&(n=Math.atan2(e.y,e.x)*180/Math.PI,n=this._keepUpright(n)),n}},Pm=class{_placement;constructor(o=new Dm){this._placement=o}layout(o,e){let n=new Mm(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 oy=new ue("F_CONNECTION_WAYPOINTS");function Py(t,o,e){return(t.x-o.x)**2+(t.y-o.y)**2<=e**2}function mL(t,o){let e=t.fWaypoints(),n=e?.radius()||8;return e?.candidates().find(i=>Py(o,i,n))}function _L(t,o){let e=t.fWaypoints(),n=e?.radius()||8;return e?.waypoints().find(i=>Py(o,i,n))}function gL(t,o){for(let e of t){let n=_L(e,o);if(n&&e.fWaypoints()?.visibility())return{connection:e,waypoint:n};let i=mL(e,o);if(i&&e.fWaypoints()?.visibility())return{connection:e,candidate:i}}}var Mh=new ue("F_CONNECTION_COMPONENTS_PARENT");var Be=(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})(Be||{}),pu=new ue("F_CONNECTION_MARKER"),bL=0,hu=class{fId=Q(`f-marker-${bL++}`);hostElement=p(Qe).nativeElement};function Ry(t,o=Be.START){if(typeof t!="string")return o;let e=t.trim().toLowerCase();return e?vL(e)??o:o}function vL(t){switch(t){case"start":case"f-connection-marker-start":return Be.START;case"end":case"f-connection-marker-end":return Be.END;case"selected-start":case"f-connection-selected-marker-start":return Be.SELECTED_START;case"selected-end":case"f-connection-selected-marker-end":return Be.SELECTED_END;case"start-all-states":case"f-connection-marker-start-all-states":case"start-all":case"all-start":return Be.START_ALL_STATES;case"end-all-states":case"f-connection-marker-end-all-states":case"end-all":case"all-end":return Be.END_ALL_STATES;default:return null}}var Oy=(()=>{class t extends hu{_markerElement=at.required("markerElement");_type=H(Be.END_ALL_STATES,{alias:"type",transform:e=>Ry(e,Be.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=q(t)))(i||t)}})();static \u0275cmp=z({type:t,selectors:[["f-connection-marker-arrow"]],viewQuery:function(n,i){n&1&&vn(i._markerElement,v6,5),n&2&&$t()},hostAttrs:[1,"f-component",2,"display","none"],inputs:{_type:[1,"type","_type"]},features:[ve([{provide:pu,useExisting:t}]),Y],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&&(K(),J(0,"svg",1,0),ae(2,"path",2),ee())},encapsulation:2})}return t})();var Fy=(()=>{class t extends hu{_mediator=p(V);markerElement=this.hostElement;width=0;height=0;refX=0;refY=0;type=Be.START;orient="auto";markerUnits="strokeWidth";ngOnInit(){this.hostElement.style.display="none",this._mediator.execute(new cu(this))}ngOnDestroy(){this._mediator.execute(new Au(this))}static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(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=>Ry(e,Be.START)],orient:"orient",markerUnits:"markerUnits"},standalone:!1,features:[ve([{provide:pu,useExisting:t}]),Y]})}return t})(),ai=(function(t){return t.FIXED="fixed",t.FIXED_CENTER="fixed_center",t.FLOATING="floating",t})(ai||{}),Ye=(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})(Ye||{});function yL({sourceRect:t,targetRect:o}){return{point1:t.gravityCenter,point2:o.gravityCenter}}var Z=(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})(Z||{}),xo=(function(t){return t.SEGMENT="segment",t.STRAIGHT="straight",t.BEZIER="bezier",t.ADAPTIVE_CURVE="adaptive-curve",t})(xo||{});function CL({sourceRect:t,sourceConnectableSide:o,targetRect:e,targetConnectableSide:n}){return{point1:ry(t,o===Z.AUTO?Z.BOTTOM:o),point2:ry(e,n===Z.AUTO?Z.TOP:n)}}function ry(t,o){switch(o){case Z.TOP:return{x:t.x+t.width/2,y:t.y};case Z.BOTTOM:return{x:t.x+t.width/2,y:t.y+t.height};case Z.LEFT:return{x:t.x,y:t.y+t.height/2};case Z.RIGHT:return{x:t.x+t.width,y:t.y+t.height/2};default:throw new Error(`Unknown side: ${o}`)}}function Ny(t,o,e,n){if(!n||!n.rotationDeg)return yo.getRoundedRectIntersections(t,o,e)[0];let i=Xs(t,-n.rotationDeg,n.pivot),r=Xs(o,-n.rotationDeg,n.pivot),a=xL(e,-n.rotationDeg,n.pivot),s=yo.getRoundedRectIntersections(i,r,a)[0];return s?Xs(s,n.rotationDeg,n.pivot):void 0}function xL(t,o,e){let n=Xs(wL(t),o,e);return new pt(n.x-t.width/2,n.y-t.height/2,t.width,t.height,t.radius1,t.radius2,t.radius3,t.radius4)}function wL(t){return{x:t.x+t.width/2,y:t.y+t.height/2}}function Xs(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 TL({sourceRect:t,targetRect:o,sourceRotationContext:e,targetRotationContext:n}){return IL(SL(t,o,e),kL(t,o,n),t,o)}function SL(t,o,e){return Ny(t.gravityCenter,o.gravityCenter,t,e)}function kL(t,o,e){return Ny(o.gravityCenter,t.gravityCenter,o,e)}function IL(t,o,e,n){return{point1:t||e.gravityCenter,point2:o||n.gravityCenter}}var ks=.5,EL={[ai.FLOATING]:TL,[ai.FIXED_CENTER]:yL,[ai.FIXED]:CL},zo=(()=>{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===Ye.DEFAULT)return r;let a=Math.abs(n),s=Math.abs(i);if(a<ks&&s<ks)return r;let u=a>=s;switch(e){case Ye.CALCULATE:return u?n>=0?Z.RIGHT:Z.LEFT:i>=0?Z.BOTTOM:Z.TOP;case Ye.CALCULATE_HORIZONTAL:return a<ks?r:n>=0?Z.RIGHT:Z.LEFT;case Ye.CALCULATE_VERTICAL:return s<ks?r:i>=0?Z.BOTTOM:Z.TOP;case Ye.TOP:return Z.TOP;case Ye.BOTTOM:return Z.BOTTOM;case Ye.LEFT:return Z.LEFT;case Ye.RIGHT:return Z.RIGHT;default:return r}}_getBehaviorHandler(e){let n=EL[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})(),wn=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 Dh(t,o,e){return[t,...e??[],o]}function ML(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 DL(t,o=32){let e=new Array(o+1);e[0]=ye({},t[0]);for(let n=1;n<=o;n++)e[n]=Ay(t[0],t[1],t[2],t[3],n/o);return e}function Ay(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 Ly(t){return t.map(o=>Ay(o.p0,o.c1,o.c2,o.p3,.5))}function PL(t){if(t.length<2)throw new Error("Polylines must be at least two points");let o=RL(t);return o<=0?[ye({},t[0])]:[OL(t,o/2)]}function RL(t){let o=0;for(let e=0;e<t.length-1;e++)o+=By(t[e],t[e+1]);return o}function OL(t,o){let e=0;for(let i=0;i<t.length-1;i++){let r=t[i],a=t[i+1],s=By(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 By(t,o){return Math.hypot(o.x-t.x,o.y-t.y)}function FL(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 Vy(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 zy(t,o=16){if(!t.length)return[];let e=[];for(let n=0;n<t.length;n++){let i=t[n],r=DL([i.p0,i.c1,i.c2,i.p3],o);n>0&&r.shift(),e.push(...r)}return e}function NL(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,m=Math.abs(a.y-s.y)<=o&&Math.abs(s.y-c.y)<=o;!u&&!m&&i.push(s)}return i.push(n[n.length-1]),i}var Rm=class t{static _dir(o){switch(o){case Z.LEFT:return{x:-1,y:0};case Z.RIGHT:return{x:1,y:0};case Z.TOP:return{x:0,y:-1};case Z.BOTTOM:return{x:0,y:1};case Z.AUTO:return{x:0,y:0}}return{x:0,y:0}}static _isHorizontal(o){return o===Z.LEFT||o===Z.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===Z.AUTO?Math.max(r,a):this._isHorizontal(n)?r:a,u=Math.max(8,i),m=i+.5*s,g=i*1.05+c*.3;return Math.min(m,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,m=s/c;if(o===Z.AUTO)return{x:e.x+u*i,y:e.y+m*i};let g=r.x*u+r.y*m,x=.12,I=Math.max(0,-g)*.08,k=Math.min(.2,x+I),N=r.x*(1-k)+u*k,j=r.y*(1-k)+m*k,X=Math.hypot(N,j)||1;return{x:e.x+N/X*i,y:e.y+j/X*i}}handle({source:o,sourceSide:e,target:n,targetSide:i,offset:r,waypoints:a}){let s=Math.max(0,r??0),c=Dh(o,n,a),u=[];for(let g=0;g<c.length-1;g++){let x=c[g],I=c[g+1],k=t._handleLength(x,I,e,s),N=t._handleLength(I,x,i,s),j=t._softControl(e,x,I,k),X=t._softControl(i,I,x,N);u.push({p0:x,c1:j,c2:X,p3:I,chainIndex:g})}let m=zy(u,12);return{path:Vy(u),secondPoint:u[0]?.c1??o,penultimatePoint:u[u.length-1]?.c2??n,points:m,candidates:Ly(u)}}},Om=class{handle({source:o,sourceSide:e,target:n,targetSide:i,offset:r,waypoints:a}){let s=Dh(o,n,a),c=[];for(let m=0;m<s.length-1;m++){let g=s[m],x=s[m+1],I=ay(e,g,x,r??0),k=ay(i,x,g,r??0);c.push({p0:g,c1:I,c2:k,p3:x,chainIndex:m})}let u=zy(c,12);return{path:Vy(c),secondPoint:c[0]?.c1??o,penultimatePoint:c[c.length-1]?.c2??n,points:u,candidates:Ly(c)}}};function ay(t,o,e,n){let i={x:o.x,y:o.y};switch(t){case Z.LEFT:i.x-=Is(o.x-e.x,n);break;case Z.RIGHT:i.x+=Is(e.x-o.x,n);break;case Z.TOP:i.y-=Is(o.y-e.y,n);break;case Z.BOTTOM:i.y+=Is(e.y-o.y,n);break;case Z.AUTO:break}return i}function Is(t,o){return t>=o?t:o*Math.sqrt(o-t)}function AL(t){let{axis:o,source:e,target:n,sourceSide:i,targetSide:r,sourceGap:a,targetGap:s,sourceDir:c,targetDir:u,currentDir:m,offset:g,sourceGapOffset:x,targetGapOffset:I}=t,k=LL(a,s),N=BL(o,c,m,k);return i===r?VL(o,e,n,g,c,m,a,s,x,I):N=zL(o,c,u,a,s,k,N),N}function LL(t,o){return{sourceTarget:[{x:t.x,y:o.y}],targetSource:[{x:o.x,y:t.y}]}}function BL(t,o,e,n){return t==="x"?o.x===e?n.targetSource:n.sourceTarget:o.y===e?n.sourceTarget:n.targetSource}function VL(t,o,e,n,i,r,a,s,c,u){let m=Math.abs(o[t]-e[t]);if(m>n)return;let g=Math.min(n-1,n-m);g<=0||(i[t]===r?c[t]=(a[t]>o[t]?-1:1)*g:u[t]=(s[t]>e[t]?-1:1)*g)}function zL(t,o,e,n,i,r,a){let s=t==="x"?"y":"x",c=o[t]===e[s],u=n[s]>i[s],m=n[s]<i[s];return o[t]===1&&(!c&&u||c&&m)||o[t]!==1&&(!c&&m||c&&u)?t==="x"?r.sourceTarget:r.targetSource:a}var Cr=1e-6,sy=2e-4,HL=.75;function qL(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(GL(t[r-1],t[r],t[r+1],o));let i=t[e-1];return n.push(`L ${i.x+sy} ${i.y+sy}`),n.join(" ")}function GL(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)<=Cr&&Math.abs(i-e.x)<=Cr,s=Math.abs(t.y-r)<=Cr&&Math.abs(r-e.y)<=Cr;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),m=Math.min(c*.5,u*.5,n);if(m<HL)return`L ${i} ${r}`;if(Math.abs(t.y-r)<=Cr){let j=t.x<e.x?-1:1,X=t.y<e.y?1:-1,ne=i+m*j,pe=r+m*X;return`L ${ne} ${r} Q ${i} ${r} ${i} ${pe}`}let x=t.x<e.x?1:-1,I=t.y<e.y?-1:1,k=r+m*I,N=i+m*x;return`L ${i} ${k} Q ${i} ${r} ${N} ${r}`}var ly={[Z.LEFT]:W.initialize(-1,0),[Z.RIGHT]:W.initialize(1,0),[Z.TOP]:W.initialize(0,-1),[Z.BOTTOM]:W.initialize(0,1),[Z.AUTO]:W.initialize(0,0)},Fm=class{handle({source:o,sourceSide:e,target:n,targetSide:i,waypoints:r,offset:a,radius:s}){let c=Dh(o,n,r),u=[],m=[];for(let k=0;k<c.length-1;k++){let N=c[k],j=c[k+1],X=this._getPathPoints(N,e,j,i,a??0);u.push(X),m.push(...PL(X))}let g=NL(FL(u)),x=g.length>1?g[g.length-2]:o,I=g.length>1?g[1]:n;return{path:qL(g,s??0),penultimatePoint:x,secondPoint:I,points:g,candidates:m}}_getPathPoints(o,e,n,i,r){let a=ly[e],s=ly[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},m=this._getDirection(c,e,u),g=m.x!==0?"x":"y",x=m[g],I=[],k=W.initialize(),N=W.initialize(),j=ML(o,n);if(a[g]*s[g]===-1){let X=[{x:j.x,y:c.y},{x:j.x,y:u.y}],ne=[{x:c.x,y:j.y},{x:u.x,y:j.y}];a[g]===x?I=g==="x"?X:ne:I=g==="x"?ne:X}else I=AL({axis:g,source:o,target:n,sourceSide:e,targetSide:i,sourceGap:c,targetGap:u,sourceDir:a,targetDir:s,currentDir:x,offset:r,sourceGapOffset:k,targetGapOffset:N});return[o,{x:c.x+k.x,y:c.y+k.y},...I,{x:u.x+N.x,y:u.y+N.y},n]}_getDirection(o,e,n){return e===Z.LEFT||e===Z.RIGHT?o.x<n.x?W.initialize(1,0):W.initialize(-1,0):o.y<n.y?W.initialize(0,1):W.initialize(0,-1)}},cy=2e-4,Nm=class{handle(o){let e=Dh(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],m=s===n-2,g=m?u.x+cy:u.x,x=m?u.y+cy:u.y;r+=` L ${g} ${x}`,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}}},jL=new ue("F_CONNECTION_BUILDERS"),Hy=(()=>{class t{_builtinBuilders={[xo.STRAIGHT]:new Nm,[xo.BEZIER]:new Om,[xo.ADAPTIVE_CURVE]:new Rm,[xo.SEGMENT]:new Fm};_providedBuilders;_builders;constructor(){this._providedBuilders=p(jL,{optional:!0})||{},this._builders=ye(ye({},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 UL(t,o,e){return qn("connection_"+t+o+e)}function $L(t,o,e){return qn("connection_for_selection_"+t+o+e)}function qy(t){return qn("connection_gradient_"+t)}function WL(t){return`url(#${qy(t)})`}var KL=(()=>{class t{_connection=p(Mh);_hostElement=p(Qe).nativeElement;_injector=p(gt);_hostAttributes=new Map;_startColor;_endColor;gradientId=E(()=>qy(this._connection.fId()));ngOnInit(){this._listenColorChanges()}_listenColorChanges(){ge(()=>{this.gradient().fStartColor(),this.gradient().fEndColor(),rn(()=>{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 _e(.5-.5*n/r,.5-.5*i/r);this._setHostAttribute("x1",a.x.toString()),this._setHostAttribute("y1",a.y.toString());let s=new _e(.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})(),Am=(()=>{class t extends KL{gradient=H.required({alias:"fConnectionGradientRendererFor"});static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(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:[Y],attrs:y6,decls:3,vars:0,consts:[[0,"xmlns","svg","http://www.w3.org/2000/svg"],["offset","0%"],["offset","100%"]],template:function(n,i){n&1&&(Ya(0,0),K(),ae(1,"stop",1)(2,"stop",2),Za())},encapsulation:2,changeDetection:0})}return t})(),dy=new ue("F_CONNECTION_GRADIENT");var Lm=new ue("F_CONNECTION_PATH"),Bm=class{hostElement=p(Qe).nativeElement},YL=(()=>{class t extends Bm{_connection=p(Mh);useGradient=H(!1);linkToGradient=E(()=>this.useGradient()?WL(this._connection.fId()):null);get fPathId(){return this._connection.fId()}get attrConnectionId(){return UL(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(#${QL(this._connection.fId())})`),this.hostElement.setAttribute("marker-end",`url(#${JL(this._connection.fId())})`)}deselect(){this.hostElement.setAttribute("marker-start",`url(#${ZL(this._connection.fId())})`),this.hostElement.setAttribute("marker-end",`url(#${XL(this._connection.fId())})`)}static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(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),$e("stroke",i.linkToGradient()))},inputs:{useGradient:[1,"useGradient"]},standalone:!1,features:[ve([{provide:Lm,useExisting:t}]),Y],attrs:C6,decls:0,vars:0,template:function(n,i){},styles:["[_nghost-%COMP%]{fill:none;pointer-events:stroke}"],changeDetection:0})}return t})();function ZL(t){return qn(`f-connection-marker-start-${t}`)}function XL(t){return qn(`f-connection-marker-end-${t}`)}function QL(t){return qn(`f-connection-selected-marker-start-${t}`)}function JL(t){return qn(`f-connection-selected-marker-end-${t}`)}var Vm=new ue("F_CONNECTION_SELECTION"),zm=class{hostElement=p(Qe).nativeElement},e7=(()=>{class t extends zm{_connection=p(Mh);get connectionForSelectionId(){return $L(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=q(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:[ve([{provide:Vm,useExisting:t}]),Y],attrs:x6,decls:0,vars:0,template:function(n,i){},styles:["[_nghost-%COMP%]{fill:none;pointer-events:stroke}"],changeDetection:0})}return t})(),Hm=new ue("F_CONNECTION_DRAG_HANDLE_END"),qm=new ue("F_CONNECTION_DRAG_HANDLE_START"),fu=class{hostElement=p(Qe).nativeElement;point=W.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}}},t7=(()=>{class t extends fu{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=q(t)))(i||t)}})();static \u0275cmp=z({type:t,selectors:[["circle","f-connection-drag-handle-start",""]],hostVars:2,hostBindings:function(n,i){n&2&&B(i.class)},standalone:!1,features:[ve([{provide:qm,useExisting:t}]),Y],attrs:w6,decls:0,vars:0,template:function(n,i){},encapsulation:2,changeDetection:0})}return t})(),n7=(()=>{class t extends fu{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=q(t)))(i||t)}})();static \u0275cmp=z({type:t,selectors:[["circle","f-connection-drag-handle-end",""]],hostVars:2,hostBindings:function(n,i){n&2&&B(i.class)},standalone:!1,features:[ve([{provide:Hm,useExisting:t}]),Y],attrs:T6,decls:0,vars:0,template:function(n,i){},encapsulation:2,changeDetection:0})}return t})(),_m="f-selected";function Gy(t){return class extends t{fId=Q("");fSelectionDisabled=Q(!1);unmarkAsSelected(){this.unmarkChildrenAsSelected?.(),this.hostElement.classList.remove(_m)}markAsSelected(){this.markChildrenAsSelected?.(),this.isSelected()||this.hostElement.classList.add(_m)}isSelected(){return this.hostElement.classList.contains(_m)}markChildrenAsSelected(){}unmarkChildrenAsSelected(){}constructor(...o){super(...o)}}}function i7(t){return class extends t{show(){this.hostElement.style.display="unset"}hide(){this.hostElement.style.display="none"}constructor(...o){super(...o)}}}var o7=Gy(i7(class{hostElement;constructor(t){this.hostElement=t}})),r7=(()=>{class t extends o7{_fConnectionBuilder=p(Hy);path="";line=vr.initialize();fReassignableStart=Q(!1);fDraggingDisabled=Q(!1);fSelectionDisabled=Q(!1);fDefs=at.required("defs");fPath=at.required(Lm);fDragHandleStart=at(qm);fDragHandleEnd=at.required(Hm);fSelection=at.required(Vm);fContents=Af(iy,{descendants:!0});fMarkers=Af(pu,{descendants:!0});fGradient=Qa(dy);_fGradientRenderer=at(Am);fWaypoints=Qa(oy);fInputSide=Q(Ye.DEFAULT);_contentLayoutEngine=new Pm;_sourceSide=Z.AUTO;fOutputSide=Q(Ye.DEFAULT);_targetSide=Z.AUTO;_penultimatePoint=W.initialize();_secondPoint=W.initialize();constructor(){super(p(Qe).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=vr.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&&Pf(r,i.fContents,iy,5)(r,i.fMarkers,pu,5)(r,i.fGradient,dy,5)(r,i.fWaypoints,oy,5),n&2&&$t(4)},viewQuery:function(n,i){n&1&&vn(i.fDefs,S6,5)(i.fPath,Lm,5)(i.fDragHandleStart,qm,5)(i.fDragHandleEnd,Hm,5)(i.fSelection,Vm,5)(i._fGradientRenderer,Am,5),n&2&&$t(6)},standalone:!1,features:[Y]})}return t})(),a7=(()=>{let t=class Qs{_browser=p(ht);_markerCache=new WeakMap;handle({connection:e}){let n=this._findConnectionMarkers(e),i=e.fDefs();if(!i)return!1;let r=s7(n),a=this._markerCache.get(e);if(a?.signature===r&&a.defsElement===i.nativeElement)return!1;let s=Uy("defs",this._browser);return n.forEach(c=>{jy(c.type).forEach(u=>{let m=l7(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",m.append(g),s.append(m)})}),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||Qs)};static \u0275prov=y({token:Qs,factory:Qs.\u0275fac})};return t=M([D(Eo)],t),t})();function s7(t){return t.map(o=>[...jy(o.type),o.width,o.height,o.refX,o.refY,o.orient,o.markerUnits,o.markerElement.outerHTML].join("|")).join("||")}function l7(t,o,e,n){let i=Uy("marker",n);return i.setAttribute("id",qn(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 jy(t){switch(t){case Be.START:return[Be.START];case Be.END:return[Be.END];case Be.SELECTED_START:return[Be.SELECTED_START];case Be.SELECTED_END:return[Be.SELECTED_END];case Be.START_ALL_STATES:return[Be.START,Be.SELECTED_START];case Be.END_ALL_STATES:return[Be.END,Be.SELECTED_END];default:return[]}}function Uy(t,o){return o.document.createElementNS("http://www.w3.org/2000/svg",t)}var Ph=(()=>{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})(),c7=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 $y(t){return!!Wy(t)}function Wy(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 d7(t){let o=new t.blobCtor([c7],{type:"text/javascript"});return t.urlApi.createObjectURL(o)}function Ky(t,o){if(!t)return;let e=o??(typeof URL>"u"?null:URL);typeof e?.revokeObjectURL=="function"&&e.revokeObjectURL(t)}var Ui=(()=>{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,Ky(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})(),mu=class{connection;line;static fToken=Symbol("ApplyConnectionRenderRequest");constructor(o,e){this.connection=o,this.line=e}},u7=(()=>{let t=class Js{_mediator=p(V);_renderCache=new WeakMap;handle({connection:e,line:n}){!this._mediator.execute(new Eo(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||Js)};static \u0275prov=y({token:Js,factory:Js.\u0275fac})};return t=M([D(mu)],t),t})(),_u=class{source;target;static fToken=Symbol("MarkConnectionConnectorsAsConnectedRequest");constructor(o,e){this.source=o,this.target=e}},p7=(()=>{let t=class el{_state=p(Ph);handle({source:e,target:n}){e.setConnected(n),n.setConnected(e),this._state.trackConnectedConnectors(e,n)}static \u0275fac=function(n){return new(n||el)};static \u0275prov=y({token:el,factory:el.\u0275fac})};return t=M([D(_u)],t),t})(),ui=class{element;cache;static fToken=Symbol("GetNormalizedConnectorRectRequest");constructor(o,e=!0){this.element=o,this.cache=e}},h7={enabled:!1},On=new ue("F_CACHE_OPTIONS",{providedIn:"root",factory:()=>ye({},h7)});var gu=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}},Fn=(()=>{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})(),Gm=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}},Tr=class{static build(o,e){return`${o}:${e}`}},jm=class{id;element;reference;rect;constructor(o,e,n,i){this.id=o,this.element=e,this.reference=n,this.rect=i}},Mo=class{nodeId;reason;static fToken=Symbol("InvalidateFCacheNodeRequest");constructor(o,e="manual"){this.nodeId=o,this.reason=e}},f7=(()=>{let t=class tl{_store=p(Fn);_options=p(On);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||tl)};static \u0275prov=y({token:tl,factory:tl.\u0275fac})};return t=M([D(Mo)],t),t})(),bu=class{id;element;reference;static fToken=Symbol("RegisterFCacheNodeRequest");constructor(o,e,n){this.id=o,this.element=e,this.reference=n}},m7=(()=>{let t=class nl{_store=p(Fn);_options=p(On);handle({id:e,element:n,reference:i}){if(!this._options.enabled)return;let r=new jm(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||nl)};static \u0275prov=y({token:nl,factory:nl.\u0275fac})};return t=M([D(bu)],t),t})(),vu=class{id;static fToken=Symbol("UnregisterFCacheNodeRequest");constructor(o){this.id=o}},_7=(()=>{let t=class il{_store=p(Fn);_mediator=p(V);_options=p(On);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 Sr(a.id,a.kind))}this._store.connectorKeysByNodeId.delete(e)}static \u0275fac=function(n){return new(n||il)};static \u0275prov=y({token:il,factory:il.\u0275fac})};return t=M([D(vu)],t),t})(),g7=(()=>{let t=class ol{_store=p(Fn);_mediator=p(V);_options=p(On);handle({id:e,nodeId:n,kind:i,element:r}){if(!this._options.enabled)return;let a=Tr.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 Gm(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 Mo(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||ol)};static \u0275prov=y({token:ol,factory:ol.\u0275fac})};return t=M([D(gu)],t),t})(),Sr=class{connectorId;kind;static fToken=Symbol("UnregisterFCacheConnectorRequest");constructor(o,e){this.connectorId=o,this.kind=e}},b7=(()=>{let t=class rl{_store=p(Fn);_mediator=p(V);_options=p(On);handle({connectorId:e,kind:n}){if(!this._options.enabled)return;let i=Tr.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 Mo(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||rl)};static \u0275prov=y({token:rl,factory:rl.\u0275fac})};return t=M([D(Sr)],t),t})(),Do=class{element;static fToken=Symbol("GetCachedFCacheRectRequest");constructor(o){this.element=o}},v7=(()=>{let t=class al{_store=p(Fn);_options=p(On);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||al)};static \u0275prov=y({token:al,factory:al.\u0275fac})};return t=M([D(Do)],t),t})(),Bi=class{connectorId;kind;rect;static fToken=Symbol("SetFCacheConnectorRectRequest");constructor(o,e,n){this.connectorId=o,this.kind=e,this.rect=n}},y7=(()=>{let t=class sl{_store=p(Fn);_options=p(On);handle({connectorId:e,kind:n,rect:i}){if(!this._options.enabled)return;let r=Tr.build(e,n),a=this._store.connectorEntries.get(r);a&&(a.rect=pt.fromRoundedRect(i))}static \u0275fac=function(n){return new(n||sl)};static \u0275prov=y({token:sl,factory:sl.\u0275fac})};return t=M([D(Bi)],t),t})(),Vi=class{nodeId;rect;static fToken=Symbol("SetFCacheNodeRectRequest");constructor(o,e){this.nodeId=o,this.rect=e}},C7=(()=>{let t=class ll{_store=p(Fn);_options=p(On);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=oe.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,m=c?i.width/n.width:1,g=u?i.height/n.height:1;for(let x of r){let I=this._store.connectorEntries.get(x);if(!I?.rect)continue;let k=I.rect,N=k.gravityCenter,j=c?i.x+(N.x-n.x)*m:N.x+a,X=u?i.y+(N.y-n.y)*g:N.y+s;I.rect=new pt(j-k.width/2,X-k.height/2,k.width,k.height,k.radius1,k.radius2,k.radius3,k.radius4)}}static \u0275fac=function(n){return new(n||ll)};static \u0275prov=y({token:ll,factory:ll.\u0275fac})};return t=M([D(Vi)],t),t})(),kr=class{element;rect;static fToken=Symbol("UpdateFCacheRectByElementRequest");constructor(o,e){this.element=o,this.rect=e}},x7=(()=>{let t=class cl{_store=p(Fn);_options=p(On);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||cl)};static \u0275prov=y({token:cl,factory:cl.\u0275fac})};return t=M([D(kr)],t),t})(),w7=[Fn,m7,_7,f7,g7,b7,v7,C7,y7,x7];function Ho(t,o,e){return o?_e.fromPoint(t).elementTransform(o).sub(e.scaledPosition).sub(e.position).div(e.scale):_e.fromPoint(t)}function Yy(){return{min:{x:-1/0,y:-1/0},max:{x:1/0,y:1/0}}}function Po(t){return t?`${t}`:void 0}var T7=(()=>{let t=class dl{_store=p(L);_mediator=p(V);_browser=p(ht);get _transform(){return this._store.transform}handle({element:e,cache:n}){let i=this._mediator.execute(new Do(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),m=pt.fromCenter(c,u.width,u.height);return this._mediator.execute(new kr(e,m)),m}_getElementRoundedRect(e){return this._getRoundedRect(oe.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 pt(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(m=>Math.max(0,m)),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 Ho(e,this._store.flowHost,this._transform)}_unscaleSize(e){return Ft.initialize(e.width/this._transform.scale,e.height/this._transform.scale)}_getUnscaledRect(e,n,i){return new pt(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 Ft.offsetFromElement(e)||n}static \u0275fac=function(n){return new(n||dl)};static \u0275prov=y({token:dl,factory:dl.\u0275fac})};return t=M([D(ui)],t),t})(),yu=class{connector;cache;static fToken=Symbol("ResolveConnectionEndpointRectRequest");constructor(o,e){this.connector=o,this.cache=e}},S7=(()=>{let t=class ul{_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||ul)};static \u0275prov=y({token:ul,factory:ul.\u0275fac})};return t=M([D(yu)],t),t})(),Cu=class{connection;static fToken=Symbol("ResolveConnectionEndpointsRequest");constructor(o){this.connection=o}},k7=(()=>{let t=class pl{_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||pl)};static \u0275prov=y({token:pl,factory:pl.\u0275fac})};return t=M([D(Cu)],t),t})(),Ir=class{connection;cache;static fToken=Symbol("ResolveConnectionGeometryRequest");constructor(o,e){this.connection=o,this.cache=e}},I7=(()=>{let t=class hl{_mediator=p(V);handle({connection:e,cache:n}){let i=this._resolveConnectionEndpoints(e);return i?gn(ye({},i),{sourceRect:this._resolveEndpointRect(i.source,n),targetRect:this._resolveEndpointRect(i.target,n)}):null}_resolveConnectionEndpoints(e){return this._mediator.execute(new Cu(e))}_resolveEndpointRect(e,n){return this._mediator.execute(new yu(e,n))}static \u0275fac=function(n){return new(n||hl)};static \u0275prov=y({token:hl,factory:hl.\u0275fac})};return t=M([D(Ir)],t),t})(),st=class{element;static fToken=Symbol("GetNormalizedElementRectRequest");constructor(o){this.element=o}},E7=(()=>{let t=class fl{_store=p(L);_mediator=p(V);get _transform(){return this._store.transform}handle({element:e}){let n=this._mediator.execute(new Do(e));if(n)return n;let i=oe.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 kr(e,u)),u}_fromCenter(e,n,i){return oe.initialize(e.gravityCenter.x-n/2,e.gravityCenter.y-i/2,n,i)}_normalizePosition(e){return Ho(e,this._store.flowHost,this._transform)}_unscaleSize(e){return Ft.initialize(e.width/this._transform.scale,e.height/this._transform.scale)}_getUnscaledRect(e,n){return new pt(e.x,e.y,n.width,n.height)}_getOffsetSize(e,n){return Ft.offsetFromElement(e)||n}static \u0275fac=function(n){return new(n||fl)};static \u0275prov=y({token:fl,factory:fl.\u0275fac})};return t=M([D(st)],t),t})(),Gn=class{connector;static fToken=Symbol("ResolveConnectionEndpointRotationContextRequest");constructor(o){this.connector=o}},M7=(()=>{let t=class ml{_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 st(n.hostElement));return{rotationDeg:n._rotate,pivot:i.gravityCenter}}static \u0275fac=function(n){return new(n||ml)};static \u0275prov=y({token:ml,factory:ml.\u0275fac})};return t=M([D(Gn)],t),t})(),xu=class{connection;geometry;static fToken=Symbol("BuildConnectionLineRequest");constructor(o,e){this.connection=o,this.geometry=e}},D7=(()=>{let t=class _l{_mediator=p(V);_connectionBehaviour=p(zo);handle({connection:e,geometry:n}){return this._connectionBehaviour.handle(new wn(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 Gn(e))}static \u0275fac=function(n){return new(n||_l)};static \u0275prov=y({token:_l,factory:_l.\u0275fac})};return t=M([D(xu)],t),t})(),Er=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}},P7=(()=>{let t=class gl{_mediator=p(V);handle({connection:e,source:n,target:i,line:r}){this._mediator.execute(new _u(n,i)),this._mediator.execute(new mu(e,r))}static \u0275fac=function(n){return new(n||gl)};static \u0275prov=y({token:gl,factory:gl.\u0275fac})};return t=M([D(Er)],t),t})(),Mr=class{connection;geometry;static fToken=Symbol("RenderConnectionFromGeometryRequest");constructor(o,e){this.connection=o,this.geometry=e}},R7=(()=>{let t=class bl{_mediator=p(V);handle({connection:e,geometry:n}){let i=this._mediator.execute(new xu(e,n));this._mediator.execute(new Er(e,n.source,n.target,i))}static \u0275fac=function(n){return new(n||bl)};static \u0275prov=y({token:bl,factory:bl.\u0275fac})};return t=M([D(Mr)],t),t})(),wu=class{connection;cache;static fToken=Symbol("RenderConnectionRequest");constructor(o,e){this.connection=o,this.cache=e}},O7=(()=>{let t=class vl{_mediator=p(V);handle({connection:e,cache:n}){let i=this._mediator.execute(new Ir(e,n));i&&this._mediator.execute(new Mr(e,i))}static \u0275fac=function(n){return new(n||vl)};static \u0275prov=y({token:vl,factory:vl.\u0275fac})};return t=M([D(wu)],t),t})(),zi=class{session;static fToken=Symbol("IsConnectionRedrawCurrentRequest");constructor(o){this.session=o}},F7=(()=>{let t=class yl{_store=p(L);_state=p(Ph);handle({session:e}){return e.renderTicket===this._state.renderTicket&&e.nodesRevision===this._store.nodesRevision}static \u0275fac=function(n){return new(n||yl)};static \u0275prov=y({token:yl,factory:yl.\u0275fac})};return t=M([D(zi)],t),t})(),Dr=class{session;static fToken=Symbol("CompleteConnectionRedrawRequest");constructor(o){this.session=o}},N7=(()=>{let t=class Cl{_mediator=p(V);_store=p(L);handle({session:e}){this._mediator.execute(new zi(e))&&this._store.completeConnectionsRender(e.connectionsRevision,e.nodesRevision)}static \u0275fac=function(n){return new(n||Cl)};static \u0275prov=y({token:Cl,factory:Cl.\u0275fac})};return t=M([D(Dr)],t),t})(),Tu=class{batchItem;result;static fToken=Symbol("ApplyConnectionWorkerResultRequest");constructor(o,e){this.batchItem=o,this.result=e}},A7=(()=>{let t=class xl{_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 Er(e.connection,e.geometry.source,e.geometry.target,n.line))}catch{this._fallbackToMainThread(e)}}}_fallbackToMainThread(e){this._mediator.execute(new Mr(e.connection,e.geometry))}_isSupportedWorkerResult(e){return!!(e?.supported&&e.sourceSide&&e.targetSide&&e.line)}static \u0275fac=function(n){return new(n||xl)};static \u0275prov=y({token:xl,factory:xl.\u0275fac})};return t=M([D(Tu)],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}},L7=500,B7=6,V7=(()=>{let t=class wl{_mediator=p(V);_browser=p(ht);handle({connections:e,cache:n,startIndex:i,session:r,batchItems:a,workerResults:s}){if(!this._isCurrent(r))return;let c=this._now(),u=i,m=0;for(;u<e.length&&m<L7&&this._isWithinSliceBudget(c);){let g=e[u];if(a?this._mediator.execute(new Tu(a[u]??null,s?.[u])):this._mediator.execute(new wu(g,n)),u++,m++,!this._isCurrent(r))return}if(u>=e.length){this._mediator.execute(new Dr(r));return}this._requestAnimationFrame(()=>this._mediator.execute(new si(e,n,u,r,a,s)))}_isCurrent(e){return this._mediator.execute(new zi(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<B7:!0}static \u0275fac=function(n){return new(n||wl)};static \u0275prov=y({token:wl,factory:wl.\u0275fac})};return t=M([D(si)],t),t})(),Su=class{static fToken=Symbol("StartConnectionRedrawRequest")},z7=(()=>{let t=class Tl{_store=p(L);_state=p(Ph);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||Tl)};static \u0275prov=y({token:Tl,factory:Tl.\u0275fac})};return t=M([D(Su)],t),t})(),Pr=class{static fToken=Symbol("RedrawConnectionsRequest")},ku=class{connectionCount;static fToken=Symbol("ShouldUseConnectionWorkerRequest");constructor(o){this.connectionCount=o}},Rr=class{static fToken=Symbol("IsConnectionWorkerEnabledRequest")},H7=(()=>{let t=class Sl{_browser=p(ht);_state=p(Ui);handle(e){if(this._state.isDisabled||!this._isWorkerAvailable())return!1;let n=this._browser.document.defaultView;return $y(n)}_isWorkerAvailable(){return this._browser.isBrowser()}static \u0275fac=function(n){return new(n||Sl)};static \u0275prov=y({token:Sl,factory:Sl.\u0275fac})};return t=M([D(Rr)],t),t})(),q7=(()=>{let t=class kl{_mediator=p(V);handle({connectionCount:e}){return e>0&&this._mediator.execute(new Rr)}static \u0275fac=function(n){return new(n||kl)};static \u0275prov=y({token:kl,factory:kl.\u0275fac})};return t=M([D(ku)],t),t})(),Iu=class{connection;geometry;originalIndex;static fToken=Symbol("BuildConnectionWorkerPayloadItemRequest");constructor(o,e,n){this.connection=o,this.geometry=e,this.originalIndex=n}},G7=(()=>{let t=class Il{_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||Il)};static \u0275prov=y({token:Il,factory:Il.\u0275fac})};return t=M([D(Iu)],t),t})(),Eu=class{connections;cache;static fToken=Symbol("BuildConnectionWorkerBatchRequest");constructor(o,e){this.connections=o,this.cache=e}},j7=(()=>{let t=class El{_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 Ir(e,n));return r?{connection:e,geometry:r,payload:this._mediator.execute(new Iu(e,r,i))}:null}static \u0275fac=function(n){return new(n||El)};static \u0275prov=y({token:El,factory:El.\u0275fac})};return t=M([D(Eu)],t),t})(),Mu=class{error;static fToken=Symbol("DisableConnectionWorkerRequest");constructor(o){this.error=o}},Or=class{error;static fToken=Symbol("ResetConnectionWorkerRuntimeRequest");constructor(o){this.error=o}},U7=(()=>{let t=class Ml{_state=p(Ui);handle({error:e}){this._state.resetRuntime(e)}static \u0275fac=function(n){return new(n||Ml)};static \u0275prov=y({token:Ml,factory:Ml.\u0275fac})};return t=M([D(Or)],t),t})(),$7=(()=>{let t=class Dl{_state=p(Ui);_mediator=p(V);handle({error:e}){this._state.isDisabled=!0,this._mediator.execute(new Or(e))}static \u0275fac=function(n){return new(n||Dl)};static \u0275prov=y({token:Dl,factory:Dl.\u0275fac})};return t=M([D(Mu)],t),t})(),Du=class{message;static fToken=Symbol("HandleConnectionWorkerMessageRequest");constructor(o){this.message=o}},W7=(()=>{let t=class Pl{_state=p(Ui);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||Pl)};static \u0275prov=y({token:Pl,factory:Pl.\u0275fac})};return t=M([D(Du)],t),t})(),Pu=class{static fToken=Symbol("EnsureConnectionWorkerRequest")},K7=(()=>{let t=class Rl{_browser=p(ht);_state=p(Ui);_mediator=p(V);handle(e){if(this._state.worker)return this._state.worker;let n=this._browser.document.defaultView;if(!$y(n))return null;let i=Wy(n);if(!i)return null;let r=d7(i);try{let a=new i.workerCtor(r,{name:"f-flow-connection-worker"});return a.onmessage=s=>{this._mediator.execute(new Du(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 Ky(r,i.urlApi),this._disableWorker(a instanceof Error?a:new Error("Connection worker initialization failed.")),null}}_disableWorker(e){this._mediator.execute(new Mu(e))}_resetWorkerAfterRuntimeError(e){this._mediator.execute(new Or(e))}static \u0275fac=function(n){return new(n||Rl)};static \u0275prov=y({token:Rl,factory:Rl.\u0275fac})};return t=M([D(Pu)],t),t})(),Ru=class{payload;static fToken=Symbol("RunConnectionWorkerRequest");constructor(o){this.payload=o}},Y7=(()=>{let t=class Ol{_state=p(Ui);_mediator=p(V);handle({payload:e}){if(!e.length)return Promise.resolve([]);if(!this._mediator.execute(new Rr))return Promise.reject(new Error("Connection worker is disabled."));this._interruptPendingRequests();let n=this._mediator.execute(new Pu);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||Ol)};static \u0275prov=y({token:Ol,factory:Ol.\u0275fac})};return t=M([D(Ru)],t),t})(),Ou=class{batch;static fToken=Symbol("RunConnectionWorkerBatchRequest");constructor(o){this.batch=o}},Z7=(()=>{let t=class Fl{_mediator=p(V);handle({batch:e}){return e.payload.length?this._mediator.execute(new Ru(e.payload)):Promise.resolve([])}static \u0275fac=function(n){return new(n||Fl)};static \u0275prov=y({token:Fl,factory:Fl.\u0275fac})};return t=M([D(Ou)],t),t})(),Fu=class{connections;cache;session;static fToken=Symbol("StartConnectionWorkerRedrawRequest");constructor(o,e,n){this.connections=o,this.cache=e,this.session=n}},X7=(()=>{let t=class Nl{_mediator=p(V);handle({connections:e,cache:n,session:i}){let r=this._mediator.execute(new Eu(e,n));if(!r.payload.length){this._mediator.execute(new si(e,n,0,i,r.items));return}this._mediator.execute(new Ou(r)).then(a=>{this._mediator.execute(new zi(i))&&this._mediator.execute(new si(e,n,0,i,r.items,this._alignWorkerResults(a,e.length)))}).catch(()=>{this._mediator.execute(new zi(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||Nl)};static \u0275prov=y({token:Nl,factory:Nl.\u0275fac})};return t=M([D(Fu)],t),t})(),Q7=(()=>{let t=class Al{_mediator=p(V);_store=p(L);handle(e){let n=this._mediator.execute(new Su);this._createMarkersForCreate(),this._createMarkersForSnap();let i=[...this._store.connections.getAll()],r=new Map;if(!i.length){this._mediator.execute(new Dr(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 Eo(e))}_createMarkersForSnap(){let e=this._store.connections.getForSnap();e&&this._mediator.execute(new Eo(e))}_shouldUseConnectionWorker(e){return this._mediator.execute(new ku(e))}_redrawUsingWorker(e,n,i){this._mediator.execute(new Fu(e,n,i))}_redrawWithoutWorker(e,n,i){this._mediator.execute(new si(e,n,0,i))}static \u0275fac=function(n){return new(n||Al)};static \u0275prov=y({token:Al,factory:Al.\u0275fac})};return t=M([D(Pr)],t),t})(),Um=class{static fToken=Symbol("RemoveConnectionForCreateFromStoreRequest")},J7=(()=>{let t=class Ll{_store=p(L);handle(e){this._store.connections.removeInstanceForCreate()}static \u0275fac=function(n){return new(n||Ll)};static \u0275prov=y({token:Ll,factory:Ll.\u0275fac})};return t=M([D(Um)],t),t})(),Nu=class{connection;static fToken=Symbol("RemoveConnectionFromStoreRequest");constructor(o){this.connection=o}},e9=(()=>{let t=class Bl{_store=p(L);handle({connection:e}){this._store.connections.remove(e),this._store.emitConnectionChanges()}static \u0275fac=function(n){return new(n||Bl)};static \u0275prov=y({token:Bl,factory:Bl.\u0275fac})};return t=M([D(Nu)],t),t})(),Au=class{instance;static fToken=Symbol("RemoveConnectionMarkerFromStoreRequest");constructor(o){this.instance=o}},t9=(()=>{let t=class Vl{_store=p(L);handle({instance:e}){this._store.connectionMarkers.remove(e),this._store.emitNodeChanges()}static \u0275fac=function(n){return new(n||Vl)};static \u0275prov=y({token:Vl,factory:Vl.\u0275fac})};return t=M([D(Au)],t),t})(),$m=class{waypointIndex;connectionId;static fToken=Symbol("RemoveConnectionWaypointRequest");constructor(o,e){this.waypointIndex=o,this.connectionId=e}},Lu=class{static fToken=Symbol("EmitEndDragSequenceEventRequest")},n9=(()=>{let t=class zl{_store=p(L);_dragSession=p(be);handle(e){this._store.flowHost.classList.remove(yt.DRAG_AND_DROP.DRAGGING),this._dragSession.reset(),this._emitEvent()}_emitEvent(){this._store.fDraggable?.fDragEnded?.emit()}static \u0275fac=function(n){return new(n||zl)};static \u0275prov=y({token:zl,factory:zl.\u0275fac})};return t=M([D(Lu)],t),t})(),Bu=class{static fToken=Symbol("EmitStartDragSequenceEventRequest")},i9=(()=>{let t=class Hl{_mediator=p(V);_store=p(L);_dragContext=p(be);handle(e){this._dragContext.draggableItems.length>0&&(this._store.flowHost.classList.add(yt.DRAG_AND_DROP.DRAGGING),this._mediator.execute(new Fr),this._emitDragStarted())}_emitDragStarted(){let e=this._dragContext.draggableItems[0].getEvent();this._store.fDraggable?.fDragStarted?.emit(new ju(e.kind,e.data?ye({},e.data):void 0,e.fEventType))}static \u0275fac=function(n){return new(n||Hl)};static \u0275prov=y({token:Hl,factory:Hl.\u0275fac})};return t=M([D(Bu)],t),t})(),Fr=class{static fToken=Symbol("EmitSelectionChangeEventRequest")},Hi=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}},Vu=class extends Hi{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}}},Wm=class extends Hi{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}},Km=class extends Hi{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}}},Ym=class extends Hi{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})(),o9=800,Zm=class{_document=p(Ua);_ngZone=p(nn,{optional:!0});_mouseListeners=He.emptyListener();_touchListeners=He.emptyListener();_startListeners=He.emptyListener();isSyntheticEvent(o){return!!this._lastTouchEventTime&&this._lastTouchEventTime+o9>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=a9(o),i=new Vu(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=s9(o),n=new Km(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 Vu(o))};_onTouchMove=o=>{this._moveHandler(new Ym(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,r9(o.originalEvent)&&(this._lastTouchEventTime=Date.now())}}}_onPointerUpEvent=o=>{this.isDragStarted&&this.onPointerUp(new Wm(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 r9(t){return t.type[0]==="t"}function a9(t){return t.buttons===0||t.offsetX===0&&t.offsetY===0}function s9(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 Xm=class extends Hi{_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 ye({},this._position)}};function l9(t){return new Xm(t)}var be=(()=>{class t{selectedItems=[];isSelectedChanged=!1;onPointerDownScale=1;onPointerDownPosition=new _e(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 _e(0,0),this.autoPanFrameId=null,this.lastPointerEvent=null,this.lastPointerPosition=null,this.isAutoPanCanvasMoved=!1}markSelectionAsChanged(){this.isSelectedChanged=!0}rememberPointerEvent(e){this.lastPointerEvent=l9(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})(),Qm=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}},c9=(()=>{let t=class ql{_mediator=p(V);_store=p(L);_dragSession=p(be);handle(e){this._dragSession.isSelectedChanged&&(this._emitSelectionChange(this._getSelection()),this._dragSession.isSelectedChanged=!1,this._mediator.execute(new li))}_getSelection(){return this._mediator.execute(new ia)}_emitSelectionChange(e){this._store.fDraggable?.fSelectionChange.emit(new Qm(e.fNodeIds,e.fGroupIds,e.fConnectionIds))}static \u0275fac=function(n){return new(n||ql)};static \u0275prov=y({token:ql,factory:ql.\u0275fac})};return t=M([D(Fr)],t),t})(),Jm=class{nodeOrGroup;static fToken=Symbol("GetNormalizedParentNodeRectRequest");constructor(o){this.nodeOrGroup=o}},d9=(()=>{let t=class Gl{_store=p(L);_mediator=p(V);handle({nodeOrGroup:e}){let n=oe.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 oe.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 st(e.hostElement))}_getNodePadding(e,n){return this._mediator.execute(new Gi(e,n))}static \u0275fac=function(n){return new(n||Gl)};static \u0275prov=y({token:Gl,factory:Gl.\u0275fac})};return t=M([D(Jm)],t),t})(),e_=class{fParentNodes;fDraggedNodes;static fToken=Symbol("IsArrayHasParentNodeRequest");constructor(o,e){this.fParentNodes=o,this.fDraggedNodes=e}},u9=(()=>{let t=class jl{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||jl)};static \u0275prov=y({token:jl,factory:jl.\u0275fac})};return t=M([D(e_)],t),t})(),t_=class{fNodeId;fConnectionIds;constructor(o,e){this.fNodeId=o,this.fConnectionIds=e}},zu=class extends t_{nodeId;connectionIds;constructor(o,e){super(o,e),this.nodeId=o,this.connectionIds=e}},Hu=class{nodeOrGroup;static fToken=Symbol("DetectConnectionsUnderDragNodeRequest");constructor(o){this.nodeOrGroup=o}},p9=(()=>{let t=class Ul{_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 zu(e.fId(),s)),this._store.fDraggable?.fNodeConnectionsIntersection.emit(new zu(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 yo.getRoundedRectIntersectionsWithSVGPath(e.fPath().hostElement,n).length>0}static \u0275fac=function(n){return new(n||Ul)};static \u0275prov=y({token:Ul,factory:Ul.\u0275fac})};return t=M([D(Hu)],t),t})(),h9=[i9,n9,c9,d9,u9,p9],f9=new Set(["create-connection","reassign-connection","drag-node"]),m9=new Set(["selection-area"]),_9=new Set(["assign-to-container"]);function Zy(t){let o=null;for(let e of t){if(_9.has(e))continue;let n=f9.has(e)?"rebase":m9.has(e)?"direct":null;if(!n)return null;if(!o){o=n;continue}if(o!==n)return null}return o}function Xy(t,o,e,n,i){return W.initialize(uy(t.x,o.left,o.right,e,n,i),uy(t.y,o.top,o.bottom,e,n,i))}function uy(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=hy((o+a-t)/a,0,1);return py(c,s,r)}if(t>=e-a){let c=hy((t-(e-a))/a,0,1);return-py(c,s,r)}return 0}function g9(t,o,e){let n=e||1;return _e.fromPoint(t).add(_e.fromPoint(o).div(n))}function py(t,o,e){return e?o*t:o}function hy(t,o,e){return Math.max(o,Math.min(e,t))}var qu=class{static fToken=Symbol("RunAutoPanFrameRequest")},pi=class{static fToken=Symbol("StopAutoPanRequest")},b9=(()=>{let t=class $l{_store=p(L);_dragContext=p(be);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||$l)};static \u0275prov=y({token:$l,factory:$l.\u0275fac})};return t=M([D(pi)],t),t})(),Nr=class{static fToken=Symbol("SyncAutoPanRequest")},v9=(()=>{let t=class Wl{_mediator=p(V);_store=p(L);_dragContext=p(be);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 qu)}))}_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?W.initialize():Xy(e,n.getBoundingClientRect(),this._edgeThreshold(),this._speed(),this._acceleration())}_getAutoPanMode(){return Zy(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(Ze.AUTO_PAN)}static \u0275fac=function(n){return new(n||Wl)};static \u0275prov=y({token:Wl,factory:Wl.\u0275fac})};return t=M([D(Nr)],t),t})(),y9=(()=>{let t=class Kl{_mediator=p(V);_store=p(L);_dragContext=p(be);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 Nr)}_applyCanvasDelta(e,n){let i=this._store.transform;n==="rebase"&&(this._dragContext.onPointerDownPosition=g9(this._dragContext.onPointerDownPosition,e,this._dragContext.onPointerDownScale||i.scale||1)),i.position=_e.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(ye({},n),e)})}_getPointerPositionInCanvas(e){return _e.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 Zy(this._dragContext.draggableItems.map(e=>e.getEvent().kind))}_getAutoPanDelta(){let e=this._dragContext.lastPointerPosition,n=this._store.fFlow?.hostElement;return!e||!n?W.initialize():Xy(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(Ze.AUTO_PAN)}static \u0275fac=function(n){return new(n||Kl)};static \u0275prov=y({token:Kl,factory:Kl.\u0275fac})};return t=M([D(qu)],t),t})(),C9=[v9,y9,b9],Gu=class{event;static fToken=Symbol("DragCanvasFinalizeRequest");constructor(o){this.event=o}},ju=class{kind;data;fEventType;get fData(){return this.data}constructor(o,e,n){this.kind=o,this.data=e,this.fEventType=n??o}},Nt=class{data(){}_features=[];getEvent(){return new ju(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)}},Uu=class{_isConnected=!1;get isConnected(){return this._isConnected}toConnector=[];isSelfConnectable=!0;fConnectableSide=Z.AUTO;userFConnectableSide=Z.AUTO;isContains(o){return this.hostElement.contains(o)}setConnected(o){this._isConnected=!0,this.toConnector.push(o)}resetConnected(){this._isConnected=!1,this.toConnector=[]}},x9=new ue("F_NODE_INPUT"),w9=(()=>{class t extends Uu{kind="input";get canBeConnected(){return!this.disabled()&&(this.multiple()?!0:!this.isConnected)}static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275dir=je({type:t,standalone:!1,features:[Y]})}return t})(),Pn=(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})(Pn||{});function T9(t){return yr(t,".f-rotate-handle")}var Qy=(()=>{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})(),Rh=new ue("F_NODE"),S9=Gy(class{hostElement;constructor(t){this.hostElement=t}}),$u=class extends S9{_injector=p(gt);renderer=p(P0);browser=p(ht);stateChanges=new un;_position=W.initialize();_rotate=0;_size;connectors=[];positionChanges(){ge(()=>{let o=this.position();rn(()=>{W.isEqual(this._position,o)||(this._position=o,this.redraw(),this.refresh())})},{injector:this._injector})}sizeChanges(){ge(()=>{let o=this.size();rn(()=>{this._isSizeEqual(o)||(this._size=o,this.redraw(),this.refresh())})},{injector:this._injector})}rotateChanges(){ge(()=>{let o=this.rotate();rn(()=>{this._rotate!==o&&(this._rotate=o,this.redraw(),this.refresh())})},{injector:this._injector})}parentChanges(){ge(()=>{this.fParentId(),this.fIncludePadding(),this.fAutoSizeToFitChildren(),rn(()=>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()}},k9=0,I9=3,n_=(()=>{class t extends $u{_debounceTimer=null;_destroyRef=p(Et);_mediator=p(V);fId=H(`f-group-${k9++}`,{alias:"fGroupId"});fParentId=H(null,{alias:"fGroupParentId"});position=Mi(W.initialize(),{alias:"fGroupPosition"});size=H(void 0,{alias:"fGroupSize"});sizeChange=bt({alias:"fGroupSizeChange"});rotate=Mi(0,{alias:"fGroupRotate"});fConnectOnNode=H(!0,{transform:G});fMinimapClass=H([]);fDraggingDisabled=H(!1,{alias:"fGroupDraggingDisabled",transform:G});fSelectionDisabled=H(!1,{alias:"fGroupSelectionDisabled",transform:G});fIncludePadding=H(!0,{transform:G});fAutoExpandOnChildHit=H(!1,{transform:G});fAutoSizeToFitChildren=H(!1,{transform:G});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(),I9))}_calculateNodeConnectorsConnectableSides(){this._mediator.execute(new Oo(this))}ngAfterViewInit(){this.browser.isBrowser()&&this._listenStateSizeChanges()}_listenStateSizeChanges(){this._mediator.execute(new Qr(this,this._destroyRef))}refresh(){this.stateChanges.notify()}ngOnDestroy(){this._mediator.execute(new Jr(this))}static \u0275fac=function(n){return new(n||t)(bn(Qe))};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()),ce("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:[ve([{provide:Rh,useExisting:t}]),Y]})}return t})(),fy=0,E9=3,Oh=(()=>{class t extends $u{_debounceTimer=null;_destroyRef=p(Et);_mediator=p(V);fId=H(`f-node-${fy++}`,{alias:"fNodeId",transform:e=>Po(e)||`f-node-${fy++}`});fParentId=H(null,{alias:"fNodeParentId"});position=Mi(W.initialize(),{alias:"fNodePosition"});size=H(void 0,{alias:"fNodeSize"});sizeChange=bt({alias:"fNodeSizeChange"});rotate=Mi(0,{alias:"fNodeRotate"});fConnectOnNode=H(!0,{transform:G});fMinimapClass=H([]);fDraggingDisabled=H(!1,{alias:"fNodeDraggingDisabled",transform:G});fSelectionDisabled=H(!1,{alias:"fNodeSelectionDisabled",transform:G});fIncludePadding=H(!0,{transform:G});fAutoExpandOnChildHit=H(!1,{transform:G});fAutoSizeToFitChildren=H(!1,{transform:G});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(),E9))}_calculateNodeConnectorsConnectableSides(){this._mediator.execute(new Oo(this))}ngAfterViewInit(){this.browser.isBrowser()&&this._listenStateSizeChanges()}_listenStateSizeChanges(){this._mediator.execute(new Qr(this,this._destroyRef))}refresh(){this.stateChanges.notify()}ngOnDestroy(){this._mediator.execute(new Jr(this))}static \u0275fac=function(n){return new(n||t)(bn(Qe))};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()),ce("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:[ve([{provide:Rh,useExisting:t}]),Y]})}return t})();function M9(t){return!!t.closest("[fNode]")}var my=0,Jy=(()=>{class t extends w9{hostElement=p(Qe).nativeElement;_mediator=p(V);_node=p(Rh);fId=H(`f-node-input-${my++}`,{alias:"fInputId",transform:e=>Po(e)||`f-node-input-${my++}`});category=H(void 0,{alias:"fInputCategory",transform:Po});multiple=H(!0,{alias:"fInputMultiple",transform:G});disabled=H(!1,{alias:"fInputDisabled",transform:G});userFConnectableSide=Z.AUTO;get fNodeId(){return this._node.fId()}get fNodeHost(){return this._node.hostElement}ngOnInit(){this._mediator.execute(new Wr(this)),this._node.addConnector(this)}ngOnChanges(e){e.userFConnectableSide&&this._node.refresh()}setConnected(e){super.setConnected(e),this.hostElement.classList.toggle(yt.CONNECTOR.INPUT_CONNECTED,!0),this.hostElement.classList.toggle(yt.CONNECTOR.INPUT_NOT_CONNECTABLE,!this.canBeConnected)}resetConnected(){super.resetConnected(),this.hostElement.classList.toggle(yt.CONNECTOR.INPUT_CONNECTED,!1),this.hostElement.classList.toggle(yt.CONNECTOR.INPUT_NOT_CONNECTABLE,!this.canBeConnected)}ngOnDestroy(){this._node.removeConnector(this),this._mediator.execute(new ea(this))}static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(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()),ce("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=>Co(e,"fInputConnectableSide",Z)]},exportAs:["fNodeInput"],standalone:!1,features:[ve([{provide:x9,useExisting:t}]),Y,ro]})}return t})(),D9=(()=>{class t extends Uu{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=q(t)))(i||t)}})();static \u0275dir=je({type:t,standalone:!1,features:[Y]})}return t})();function eC(t){return!!t.closest("[fNodeOutlet]")}var P9=new ue("F_NODE_OUTPUT"),R9=(()=>{class t extends D9{kind="output";get canBeConnected(){return!this.disabled()&&(this.multiple()?!0:!this.isConnected)}static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275dir=je({type:t,standalone:!1,features:[Y]})}return t})();function tC(t){return!!t.closest("[fNodeOutput]")}var _y=0,nC=(()=>{class t extends R9{hostElement=p(Qe).nativeElement;_mediator=p(V);_node=p(Rh);fId=H(`f-node-output-${_y++}`,{alias:"fOutputId",transform:e=>Po(e)||`f-node-output-${_y++}`});multiple=H(!1,{alias:"fOutputMultiple",transform:G});disabled=H(!1,{alias:"fOutputDisabled",transform:G});userFConnectableSide=Z.AUTO;isSelfConnectable=!0;canBeConnectedInputs=[];get fNodeId(){return this._node.fId()}get fNodeHost(){return this._node.hostElement}ngOnInit(){this._mediator.execute(new Wr(this)),this._node.addConnector(this)}ngOnChanges(e){e.userFConnectableSide&&this._node.refresh()}setConnected(e){super.setConnected(e),this.hostElement.classList.toggle(yt.CONNECTOR.OUTPUT_CONNECTED,!0),this.hostElement.classList.toggle(yt.CONNECTOR.OUTPUT_NOT_CONNECTABLE,!this.canBeConnected)}resetConnected(){super.resetConnected(),this.hostElement.classList.toggle(yt.CONNECTOR.OUTPUT_CONNECTED,!1),this.hostElement.classList.toggle(yt.CONNECTOR.OUTPUT_NOT_CONNECTABLE,!this.canBeConnected)}ngOnDestroy(){this._node.removeConnector(this),this._mediator.execute(new ea(this))}static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(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()),ce("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=>Co(e,"fOutputConnectableSide",Z)],isSelfConnectable:"isSelfConnectable",canBeConnectedInputs:[0,"fCanBeConnectedInputs","canBeConnectedInputs"]},exportAs:["fNodeOutput"],standalone:!1,features:[ve([{provide:P9,useExisting:t}]),Y,ro]})}return t})();var Wu=class{event;static fToken=Symbol("CreateConnectionFinalizeRequest");constructor(o){this.event=o}},Ar=class{outlet;static fToken=Symbol("ResolveConnectableOutputForOutletRequest");constructor(o){this.outlet=o}},O9=(()=>{let t=class Yl{_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||Yl)};static \u0275prov=y({token:Yl,factory:Yl.\u0275fac})};return t=M([D(Ar)],t),t})(),i_=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}},Ku=(()=>{class t extends Nt{type="create-connection";kind="create-connection";data(){return{fOutputOrOutletId:this._sourceRef.connector.fId()}}_result=p(fi);_mediator=p(V);_connectionBehaviour=p(zo);_store=p(L);get _connection(){return this._store.connections.getForCreate()}get _snapConnection(){return this._store.connections.getForSnap()}_targets=[];_sourceRef;_pointerDown=new pt;initialize(e,n){this._sourceRef=this._mediator.execute(new Xt(e)),this._pointerDown=pt.fromRect(oe.initialize(n.x,n.y))}prepareDragSequence(){this._collectAndMarkTargets(),this._initSnapConnection(),this._initCreateConnection(),this._connection.show(),this.onPointerMove(W.initialize()),this._result.setData({toConnectorRect:this._pointerDown,canBeConnectedInputs:this._targets,fOutputId:this._sourceRef.connector.fId()})}_collectAndMarkTargets(){this._targets=this._mediator.execute(new Yr(this._sourceRef.connector,this._sourceRef.rect.gravityCenter)),this._mediator.execute(new Ao(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||Z.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 qi(e,this._targets))}_drawCreateConnection(e,n){let i=this._connectionBehaviour.handle(new wn(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 wn(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 Lo(this._targets.map(e=>e.connector)))}_resolveRotationContext(e){return this._mediator.execute(new Gn(e))}static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),F9=(()=>{let t=class Zl{_result=p(fi);_mediator=p(V);_store=p(L);_dragContext=p(be);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 Ku)}_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 eC(e.hostElement)?this._mediator.execute(new Ar(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 i_(this._getTargetOutput(this._getOutput()||this._getOutlet()).fId(),this._getInputUnderPointer(e)?.fId(),e.getPosition()))}_getInputUnderPointer(e){return this._mediator.execute(new Kr(e.getPosition(),this._result.getData().canBeConnectedInputs))}static \u0275fac=function(n){return new(n||Zl)};static \u0275prov=y({token:Zl,factory:Zl.\u0275fac})};return t=M([D(Wu)],t),t})(),Lr=class{eventPosition;source;static fToken=Symbol("CreateConnectionCreateDragHandlerRequest");constructor(o,e){this.eventPosition=o,this.source=e}},N9=(()=>{let t=class Xl{_store=p(L);_dragContext=p(be);_dragInjector=p(It);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(Ku);a.initialize(e,r),this._dragContext.draggableItems=[a]}_toFlowSpace(e){return _e.fromPoint(e).elementTransform(this._store.flowHost).div(this._transform.scale)}_toCanvasSpace(e){return _e.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||Xl)};static \u0275prov=y({token:Xl,factory:Xl.\u0275fac})};return t=M([D(Lr)],t),t})(),Yu=class{event;node;static fToken=Symbol("CreateConnectionFromOutletPreparationRequest");constructor(o,e){this.event=o,this.node=e}},A9=(()=>{let t=class Ql{_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 Ar(e))}_startDrag(e,n){this._mediator.execute(new Lr(e,n))}static \u0275fac=function(n){return new(n||Ql)};static \u0275prov=y({token:Ql,factory:Ql.\u0275fac})};return t=M([D(Yu)],t),t})(),Zu=class{event;node;static fToken=Symbol("CreateConnectionFromOutputPreparationRequest");constructor(o,e){this.event=o,this.node=e}},L9=(()=>{let t=class Jl{_mediator=p(V);_store=p(L);handle({event:e,node:n}){if(!tC(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 Lr(e,n))}static \u0275fac=function(n){return new(n||Jl)};static \u0275prov=y({token:Jl,factory:Jl.\u0275fac})};return t=M([D(Zu)],t),t})(),Xu=class{event;fTrigger;static fToken=Symbol("CreateConnectionPreparationRequest");constructor(o,e){this.event=o,this.fTrigger=e}},B9=(()=>{let t=class ec{_mediator=p(V);_store=p(L);_dragContext=p(be);handle({event:e,fTrigger:n}){if(!this._isValidConditions()||!this._isValidTrigger(e,n))return;let i=eC(e.targetElement),r=!i&&tC(e.targetElement);if(!i&&!r)return;let a=this._findOwnerNode(e.targetElement);a&&(i?this._mediator.execute(new Yu(e,a)):this._mediator.execute(new Zu(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 pn(e.originalEvent,n)}static \u0275fac=function(n){return new(n||ec)};static \u0275prov=y({token:ec,factory:ec.\u0275fac})};return t=M([D(Xu)],t),t})(),Qu=class{event;static fToken=Symbol("ReassignConnectionFinalizeRequest");constructor(o){this.event=o}},o_=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}},V9=(()=>{let t=class tc{_dragResult=p(fi);_mediator=p(V);_store=p(L);_dragContext=p(be);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 Kr(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 o_(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||tc)};static \u0275prov=y({token:tc,factory:tc.\u0275fac})};return t=M([D(Qu)],t),t})(),Ju=class{event;fTrigger;static fToken=Symbol("ReassignConnectionPreparationRequest");constructor(o,e){this.event=o,this.fTrigger=e}};function z9(t,o){return iC(t,o)||H9(t,o)}function iC(t,o){return t.fDragHandleEnd()?.point&&oC(o,t.fDragHandleEnd().point)&&!t.fDraggingDisabled()}function H9(t,o){return!!t.fDragHandleStart()?.point&&oC(o,t.fDragHandleStart().point)&&!t.fDraggingDisabled()&&t.fReassignableStart()}function oC(t,o){return(t.x-o.x)**2+(t.y-o.y)**2<=8**2}function rC(t,o){return t&&t.distance<o.fSnapThreshold?t:void 0}function ep(t){return pt.fromRect(oe.initialize(t.x,t.y))}var r_=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=ep(this._connection.line.point1)}candidates(){return this._candidates}collectAndMarkCandidates(){this._candidates=this._mediator.execute(new ih(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 Ao(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(rC(n,r))}_findClosest(o){return this._mediator.execute(new qi(o,this._candidates))}_draw(o,e){let n=this._behaviour.handle(new wn(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 wn(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 Lo(this._candidates.map(o=>o.connector)))}_resolveRotationContext(o){return this._mediator.execute(new Gn(o))}},a_=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=ep(this._connection.line.point2)}candidates(){return this._candidates}collectAndMarkCandidates(){this._candidates=this._mediator.execute(new Yr(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 Ao(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(rC(n,r))}onPointerUp(){this._draw(this._anchorRect,this._targetRef.connector.fConnectableSide),this._snap?.hide(),this._mediator.execute(new Lo(this._candidates.map(o=>o.connector)))}_findClosest(o){return this._mediator.execute(new qi(o,this._candidates))}_draw(o,e){let n=this._behaviour.handle(new wn(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 wn(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 Gn(o))}},s_=(()=>{class t extends Nt{type="reassign-connection";kind="reassign-connection";data(){return{fConnectionId:this._connection.fId()}}_result=p(fi);_mediator=p(V);_connectionBehaviour=p(zo);_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 Xt(this._store.outputs.require(this._connection.fOutputId()))),this._targetRef=this._mediator.execute(new Xt(this._store.inputs.require(this._connection.fInputId()))),this._reassignHandler=this._draggedEnd==="target"?this._createTargetHandler():this._createSourceHandler()}_createSourceHandler(){return new r_(this._mediator,this._connectionBehaviour,this._connection,this._sourceRef,this._targetRef)}_createTargetHandler(){return new a_(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:ep(this._connection.line.point1),targetAnchorRect:ep(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=q(t)))(i||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),q9=(()=>{let t=class nc{_mediator=p(V);_store=p(L);_dragContext=p(be);_dragInjector=p(It);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=Ho(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=>z9(n,e))}_capturePointerDown(e){this._dragContext.onPointerDownScale=this._transform.scale,this._dragContext.onPointerDownPosition=_e.fromPoint(e.event.getPosition()).elementTransform(this._store.flowHost).div(this._transform.scale)}_startDrag(e,n){let i=this._dragInjector.get(s_);i.initialize(e,iC(e,n)),this._dragContext.draggableItems=[i]}_isValidTrigger(e){return pn(e.event.originalEvent,e.fTrigger)}_bringToFront(e){this._mediator.execute(new ji(e,this._canvas.fConnectionsContainer().nativeElement))}static \u0275fac=function(n){return new(n||nc)};static \u0275prov=y({token:nc,factory:nc.\u0275fac})};return t=M([D(Ju)],t),t})(),tp=class{event;static fToken=Symbol("DragConnectionWaypointFinalizeRequest");constructor(o){this.event=o}},np=class{connectionId;waypoints;constructor(o,e){this.connectionId=o,this.waypoints=e}},ip=(()=>{class t extends Nt{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=ye({},this._pick.candidate),this._waypointsComponent.insert(this._pick.candidate)):this._pick?.waypoint&&(this._point=ye({},this._pick.waypoint),this._waypointsComponent.select(this._pick.waypoint)),this._redrawConnection()}onPointerMove(e){this._waypointsComponent.move(W.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 np(this._connection.fId(),this._connection.fWaypoints()?.waypoints()||[])}static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),G9=(()=>{let t=class ic{_dragContext=p(be);get _fDragHandler(){return this._dragContext.draggableItems[0]}handle(e){this._isDroppedConnectionReassignEvent()&&this._fDragHandler.onPointerUp()}_isDroppedConnectionReassignEvent(){return this._dragContext.draggableItems.some(e=>e instanceof ip)}static \u0275fac=function(n){return new(n||ic)};static \u0275prov=y({token:ic,factory:ic.\u0275fac})};return t=M([D(tp)],t),t})(),op=class{event;fTrigger;static fToken=Symbol("DragConnectionWaypointPreparationRequest");constructor(o,e){this.event=o,this.fTrigger=e}},j9=(()=>{let t=class oc{_mediator=p(V);_store=p(L);_dragContext=p(be);_dragInjector=p(It);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=Ho(e.event.getPosition(),this._flowHost,this._transform),i=this._pickControlPoint(n);if(!i||!this._isValidTrigger(e))return;let r=this._dragInjector.get(ip);r.setPick(i),this._dragContext.onPointerDownScale=this._transform.scale,this._dragContext.onPointerDownPosition=_e.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 gL(this._connections,e)}_isValidTrigger(e){return pn(e.event.originalEvent,e.fTrigger)}_updateConnectionLayer(e){this._mediator.execute(new ji(e,this._canvas.fConnectionsContainer().nativeElement))}static \u0275fac=function(n){return new(n||oc)};static \u0275prov=y({token:oc,factory:oc.\u0275fac})};return t=M([D(op)],t),t})(),U9=[F9,N9,A9,O9,L9,B9,V9,q9,j9,G9],rp=class{event;static fToken=Symbol("DropToGroupFinalizeRequest");constructor(o){this.event=o}},$9=1,Br=(()=>{class t extends Nt{type="move-node-to-parent";kind="assign-to-container";_store=p(L);_dragSession=p(be);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(yt.GROUPING.DROP_ACTIVE)}onPointerMove(e){this._debounceTimer&&clearTimeout(this._debounceTimer),this._debounceTimer=setTimeout(()=>this._updateActiveTarget(e),$9)}onPointerUp(){this._clearActiveTarget();for(let{node:e}of this._candidateGroups)e.hostElement.classList.remove(yt.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=_e.fromPoint(this._dragSession.onPointerDownPosition).add(e),i=_e.fromPoint(this._transform.position).add(this._transform.scaledPosition).div(this._transform.scale);return n.sub(i)}_findTargetUnderPointer(e){return this._candidateGroups.find(n=>oe.isIncludePoint(n.rect,e))}_setActiveTarget(e){this._activeTarget?.node!==e.node&&(this._clearActiveTarget(),this._activeTarget=e,e.node.setClass(yt.GROUPING.OVER_BOUNDARY))}_clearActiveTarget(){this._activeTarget?.node.removeClass(yt.GROUPING.OVER_BOUNDARY),this._activeTarget=null}static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),ap=class{nodesAndGroups;static fToken=Symbol("CreateDragNodeHierarchyRequest");constructor(o){this.nodesAndGroups=o}},l_=class{rootHandlers;participants;constructor(o,e){this.rootHandlers=o,this.participants=e}},c_=class{fNodeIds;constructor(o){this.fNodeIds=o}},N_="move-node",A_="drag-node";function W9(t){return t.getEvent().kind===A_||t.getEvent().fEventType===N_}var hi=(()=>{class t extends Nt{type=N_;kind=A_;data(){return new c_(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?oe.union([e,i]):i}return e??oe.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=q(t)))(i||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),sp=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),m=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=m<0,e.edges.bottom=m>0,e.overflow.x=Math.abs(u),e.overflow.y=Math.abs(m)}_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)}},d_=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 gy(){return{value:{x:0,y:0},overflow:{x:0,y:0},edges:{left:!1,right:!1,top:!1,bottom:!1}}}var u_=class{_snapper;_hardClamp;_hardResult=gy();_softClamps=[];_softResults=[];constructor(o,e,n){let i=o.get(L).fDraggable;this._snapper=new d_(i,e),this._hardClamp=new sp(n.hard,.5);for(let r of n.soft)this._softClamps.push(new sp(r.limits,.5)),this._softResults.push(gy())}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 by(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),oe.initialize(n,i,r,a)}var p_=class extends Nt{_injector;nodeOrGroup;children;sourceConnectionHandlers;targetConnectionHandlers;type=N_;kind=A_;_startPosition=W.initialize();_startRect=oe.initialize();_applyConstraints=o=>o;_lastSoftResults=[];_deltaConstraints;_constraints;_lastPosition=W.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 st(e.hostElement)),this._startPosition=ye({},e._position)}setConstraints(o){this._constraints=o,this._deltaConstraints=new u_(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 oe.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(yt.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(yt.DRAG_AND_DROP.DRAGGING),this._emitExpandedEvent()}_startPlus(o){return W.sum(this._startPosition,o)}_redraw(o){this._lastPosition=o,this.nodeOrGroup.updatePosition(o),this._mediator.execute(new Vi(this.nodeOrGroup.fId(),oe.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=by(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 Vi(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 Xt(o)).rect;return e.set(n,r),r}_buildDelta(o,e){return W.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=by(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=[]}},K9=(()=>{let t=class rc{_injector=p(gt);handle({nodesAndGroups:e}){let n=this._createHandlerByNodeId(e),i=this._linkParentsAndCollectRoots(e,n);return new l_(i,Array.from(n.values()))}_createHandlerByNodeId(e){let n=new Map;for(let i of e)n.set(i.fId(),new p_(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||rc)};static \u0275prov=y({token:rc,factory:rc.\u0275fac})};return t=M([D(ap)],t),t})(),lp=class{nodeOrGroup;static fToken=Symbol("BuildDragNodeConstraintsRequest");constructor(o){this.nodeOrGroup=o}},Vr=class{nodeOrGroup;childrenPaddings;static fToken=Symbol("ReadNodeBoundsWithPaddingsRequest");constructor(o,e){this.nodeOrGroup=o,this.childrenPaddings=e}},h_=class{nodeOrGroup;boundingRect;innerRect;paddings;constructor(o,e,n,i){this.nodeOrGroup=o,this.boundingRect=e,this.innerRect=n,this.paddings=i}},Y9=(()=>{let t=class ac{_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=oe.initialize(i.x+a[0],i.y+a[1],i.width-a[0]-a[2],i.height-a[1]-a[3]);return new h_(e,i,s,a)}_readBoundingRect(e){return this._mediator.execute(new st(e.hostElement))}_readOwnPaddings(e,n){return this._mediator.execute(new Gi(e,n))}static \u0275fac=function(n){return new(n||ac)};static \u0275prov=y({token:ac,factory:ac.\u0275fac})};return t=M([D(Vr)],t),t})(),Z9=(()=>{let t=class sc{_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 st(e.hostElement))}_readParentsChain(e){return this._mediator.execute(new No(e))??[]}_buildConstraints(e,n){let i=[],r=Yy(),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 Vr(e,n))}_calculateDifference(e,n){return{min:this._calculateMinimumDifference(e,n),max:this._calculateMaximumDifference(e,n)}}_calculateMinimumDifference(e,n){return W.initialize(e.x-n.x,e.y-n.y)}_calculateMaximumDifference(e,n){return W.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||sc)};static \u0275prov=y({token:sc,factory:sc.\u0275fac})};return t=M([D(lp)],t),t})(),cp=class{rootHandlers;participants;static fToken=Symbol("CreateDragNodeHandlerRequest");constructor(o,e){this.rootHandlers=o,this.participants=e}},dp=class{dragHandler;constraints;handlerPool;static fToken=Symbol("AttachSoftParentConnectionDragHandlersToNodeRequest");constructor(o,e,n){this.dragHandler=o,this.constraints=e,this.handlerPool=n}},zr=class{_mediator=p(V);_store=p(L);_behaviour=p(zo);_source;_target;_sourceRef;_targetRef;_sourceDelta=W.initialize();_targetDelta=W.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 Bi(this._source.fId(),this._source.kind,this._withDelta(this._sourceRef.rect,o)))}setTargetDelta(o){this._targetDelta=o,this._mediator.execute(new Bi(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=pt.fromRoundedRect(this._sourceRef.rect).addPoint(this._sourceDelta),e=pt.fromRoundedRect(this._targetRef.rect).addPoint(this._targetDelta);return this._behaviour.handle(new wn(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 Xt(o))}_withDelta(o,e){return pt.fromRoundedRect(o).addPoint(e)}_resolveRotationContext(o){return this._mediator.execute(new Gn(o))}},Hr=(()=>{class t extends zr{setSourceDelta(e){super.setSourceDelta(e),super.redraw()}static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),qr=(()=>{class t extends zr{_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=q(t)))(i||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),Gr=(()=>{class t extends zr{setTargetDelta(e){super.setTargetDelta(e),this.redraw()}static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),X9=(()=>{let t=class lc{_store=p(L);_mediator=p(V);_dragInjector=p(It);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(m=>m.fNodeId===e.fId()),r=this._store.inputs.getAll().filter(m=>m.fNodeId===e.fId());if(!i.length&&!r.length)return{source:[],target:[]};let a=new Set(i.map(m=>m.fId())),s=new Set(r.map(m=>m.fId())),c=new Map,u={source:[],target:[]};for(let m of this._store.connections.getAll()){let g=a.has(m.fOutputId()),x=s.has(m.fInputId());if(!g&&!x)continue;let I=this._getExistingConnectionHandler(n,m);if(I||(I=this._createConnectionHandler(m,g,x),n.push(I)),g){let k=this._store.outputs.require(m.fOutputId());u.source.push({handler:I,connector:k,baselineRect:this._readConnectorRect(k,c)})}if(x){let k=this._store.inputs.require(m.fInputId());u.target.push({handler:I,connector:k,baselineRect:this._readConnectorRect(k,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(qr):n?r=this._dragInjector.createInstance(Hr):r=this._dragInjector.createInstance(Gr),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 Xt(e)).rect;return n.set(i,a),a}static \u0275fac=function(n){return new(n||lc)};static \u0275prov=y({token:lc,factory:lc.\u0275fac})};return t=M([D(dp)],t),t})(),Q9=(()=>{let t=class cc{_dragInjector=p(It);_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 dp(e,n,i))}_calculateConstraints(e){return this._mediator.execute(new lp(e))}static \u0275fac=function(n){return new(n||cc)};static \u0275prov=y({token:cc,factory:cc.\u0275fac})};return t=M([D(cp)],t),t})(),up=class{dragHandler;sourceIds;handlerPool;static fToken=Symbol("AttachTargetConnectionDragHandlersToNodeRequest");constructor(o,e,n){this.dragHandler=o,this.sourceIds=e,this.handlerPool=n}},J9=(()=>{let t=class dc{_store=p(L);_dragInjector=p(It);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(qr):i=this._dragInjector.createInstance(Gr),i.initialize(n),i}static \u0275fac=function(n){return new(n||dc)};static \u0275prov=y({token:dc,factory:dc.\u0275fac})};return t=M([D(up)],t),t})(),pp=class{dragHandler;targetIds;handlerPool;static fToken=Symbol("AttachSourceConnectionDragHandlersToNodeRequest");constructor(o,e,n){this.dragHandler=o,this.targetIds=e,this.handlerPool=n}},eB=(()=>{let t=class uc{_store=p(L);_dragInjector=p(It);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(qr):i=this._dragInjector.createInstance(Hr),i.initialize(n),i}static \u0275fac=function(n){return new(n||uc)};static \u0275prov=y({token:uc,factory:uc.\u0275fac})};return t=M([D(pp)],t),t})(),hp=class{nodeOrGroup;static fToken=Symbol("AttachDragNodeHandlerFromSelectionRequest");constructor(o){this.nodeOrGroup=o}},tB=(()=>{let t=class pc{_mediator=p(V);_store=p(L);_dragSession=p(be);handle({nodeOrGroup:e}){let n=this._collectSelected(e),i=this._withDeepChildren(n),r=this._mediator.execute(new ap(i)),a=this._collectSourceConnectorIds(i),s=this._collectTargetConnectorIds(i);return this._attachConnectionHandlers(r.participants,a,s),this._mediator.execute(new cp(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 Vo(i.fId()));n.push(...r)}return n}_collectSourceConnectorIds(e){return pm(e,n=>this._store.outputs.getAll().filter(i=>i.fNodeId===n.fId()).map(i=>i.fId()))}_collectTargetConnectorIds(e){return pm(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 pp(a,i,r)),this._mediator.execute(new up(a,n,r))}static \u0275fac=function(n){return new(n||pc)};static \u0275prov=y({token:pc,factory:pc.\u0275fac})};return t=M([D(hp)],t),t})(),nB=[K9,Z9,Q9,J9,eB,X9,Y9,tB];function iB(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,m,g=1/0,x,I,k=1/0,N=(X,ne)=>{let pe=ne<0?-ne:ne;pe<=e&&pe<g&&(g=pe,u=X,m=ne)},j=(X,ne)=>{let pe=ne<0?-ne:ne;pe<=e&&pe<k&&(k=pe,x=X,I=ne)};for(let X=0;X<t.length;X++){let ne=t[X],pe=ne.x,Oe=ne.y,Pe=pe+ne.width,Ge=Oe+ne.height,Gt=ne.gravityCenter.x,_t=ne.gravityCenter.y;N(pe,n-pe),N(Pe,n-Pe),N(Gt,s-Gt),N(pe,r-pe),N(Pe,r-Pe),j(Oe,i-Oe),j(Ge,i-Ge),j(_t,c-_t),j(Oe,a-Oe),j(Ge,a-Ge)}return{x:{guide:u,delta:m},y:{guide:x,delta:I}}}var vy=["left","top","width","height"],fp=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 vy){let n=o[e];n!=null&&(this._element.style[e]=`${n}px`)}}clearRect(){for(let o of vy)this._element.style.removeProperty(o)}destroy(){this._element.remove()}},f_=class{_horizontal;_vertical;constructor(o,e){this._horizontal=new fp(o,e),this._vertical=new fp(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()}},mp=class{static fToken=Symbol("MagneticLinesPreparationRequest")},oB=(()=>{let t=class hc{_mediator=p(V);_store=p(L);_browser=p(ht);_injector=p(gt);_dragSession=p(be);_renderer;handle(e){let n=this._store.instances.get(Ze.MAGNETIC_LINES);if(!n)return;let i=this._dragSession.draggableItems.find(r=>r instanceof hi);i&&i.setMagneticLines(new m_(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 f_(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 st(r.hostElement)))}static \u0275fac=function(n){return new(n||hc)};static \u0275prov=y({token:hc,factory:hc.\u0275fac})};return t=M([D(mp)],t),t})(),m_=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(Ze.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 iB(this._rects,o,this._alignThreshold)}clearGuides(){this._renderer.hideAll(),this._timerId&&(clearTimeout(this._timerId),this._timerId=null)}},yy=["top","center","bottom"],Cy=["left","center","right"];function rB(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,m=aB(t,o,i,r,a,s,c,u,e,n),g=sB(t,o,i,r,a,s,c,u,e,n);return m&&(!g||m.absDelta<=g.absDelta)?{axis:"x",delta:m.delta,gap:m.gap,rects:m.rects,alignMode:m.alignMode,crossDelta:m.crossDelta}:g?{axis:"y",delta:g.delta,gap:g.gap,rects:g.rects,alignMode:g.alignMode,crossDelta:g.crossDelta}:{rects:[]}}function aB(t,o,e,n,i,r,a,s,c,u){let m=1/0,g,x=0,I,k=[],N=0,j=[],X=[],ne=[];for(let pe=0;pe<yy.length;pe++){let Oe=pe===0?n:pe===1?s:r;j.length=0,X.length=0,ne.length=0;let Pe=1/0,Ge=-1/0,Gt=0,_t=1/0,Tt=1/0;for(let qe=0;qe<t.length;qe++){let Ne=t[qe],or=pe===0?Ne.y:pe===1?Ne.gravityCenter.y:Ne.y+Ne.height,Mf=Oe-or,zn=To(Mf);if(zn>c)continue;j.push(qe),X.push(Ne.x),ne.push(Ne.x+Ne.width);let rr=Ne.y,ar=Ne.y+Ne.height;rr<Pe&&(Pe=rr),ar>Ge&&(Ge=ar),(zn<_t||zn===_t&&qe<Tt)&&(_t=zn,Gt=or,Tt=qe)}let rt=j.length;if(rt<2)continue;aC(j,X,ne);let ft=0;for(;ft<rt&&X[ft]<=a;)ft++;let ki=ft>0&&ft<rt,Pt,jt;ki?(Pt=ft-1,jt=ft):ft<=0?(Pt=0,jt=1):(Pt=rt-2,jt=rt-1);let Ut=X[jt]-ne[Pt];if(Ut<0)continue;let Ct;if(ki){Ct=ne[Pt]+Ut;let qe=Ct+o.width,Ne=X[jt]-qe;if(To(Ne-Ut)>u)continue}else ft<=0?Ct=X[0]-Ut-o.width:Ct=ne[rt-1]+Ut;let ir=e-Ct,Ii=To(ir);if(Ii>u||Ii>=m)continue;let _n=lB(j,X,ne,Pe,Ge);if(ki){let qe=Ct,Ne=Ct+o.width;_n.push({left:ne[Pt],top:Pe,width:qe-ne[Pt],height:Ge-Pe}),_n.push({left:Ne,top:Pe,width:X[jt]-Ne,height:Ge-Pe})}else if(ft<=0){let qe=Ct+o.width;_n.push({left:qe,top:Pe,width:X[0]-qe,height:Ge-Pe})}else _n.push({left:ne[rt-1],top:Pe,width:Ct-ne[rt-1],height:Ge-Pe});let Ef=Oe-Gt;m=Ii,g=ir,x=Ut,I=yy[pe],k=_n,N=Ef}if(!(g===void 0||I===void 0))return{delta:g,absDelta:m,gap:x,rects:k,alignMode:I,crossDelta:N}}function sB(t,o,e,n,i,r,a,s,c,u){let m=1/0,g,x=0,I,k=[],N=0,j=[],X=[],ne=[];for(let pe=0;pe<Cy.length;pe++){let Oe=pe===0?e:pe===1?a:i;j.length=0,X.length=0,ne.length=0;let Pe=1/0,Ge=-1/0,Gt=0,_t=1/0,Tt=1/0;for(let qe=0;qe<t.length;qe++){let Ne=t[qe],or=pe===0?Ne.x:pe===1?Ne.gravityCenter.x:Ne.x+Ne.width,Mf=Oe-or,zn=To(Mf);if(zn>c)continue;j.push(qe),X.push(Ne.y),ne.push(Ne.y+Ne.height);let rr=Ne.x,ar=Ne.x+Ne.width;rr<Pe&&(Pe=rr),ar>Ge&&(Ge=ar),(zn<_t||zn===_t&&qe<Tt)&&(_t=zn,Gt=or,Tt=qe)}let rt=j.length;if(rt<2)continue;aC(j,X,ne);let ft=0;for(;ft<rt&&X[ft]<=s;)ft++;let ki=ft>0&&ft<rt,Pt,jt;ki?(Pt=ft-1,jt=ft):ft<=0?(Pt=0,jt=1):(Pt=rt-2,jt=rt-1);let Ut=X[jt]-ne[Pt];if(Ut<0)continue;let Ct;if(ki){Ct=ne[Pt]+Ut;let qe=Ct+o.height,Ne=X[jt]-qe;if(To(Ne-Ut)>u)continue}else ft<=0?Ct=X[0]-Ut-o.height:Ct=ne[rt-1]+Ut;let ir=n-Ct,Ii=To(ir);if(Ii>u||Ii>=m)continue;let _n=cB(j,X,ne,Pe,Ge);if(ki){let qe=Ct,Ne=Ct+o.height;_n.push({left:Pe,top:ne[Pt],width:Ge-Pe,height:qe-ne[Pt]}),_n.push({left:Pe,top:Ne,width:Ge-Pe,height:X[jt]-Ne})}else if(ft<=0){let qe=Ct+o.height;_n.push({left:Pe,top:qe,width:Ge-Pe,height:X[0]-qe})}else _n.push({left:Pe,top:ne[rt-1],width:Ge-Pe,height:Ct-ne[rt-1]});let Ef=Oe-Gt;m=Ii,g=ir,x=Ut,I=Cy[pe],k=_n,N=Ef}if(!(g===void 0||I===void 0))return{delta:g,absDelta:m,gap:x,rects:k,alignMode:I,crossDelta:N}}function lB(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 cB(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 aC(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 To(t){return t<0?-t:t}var __=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()}},g_=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 __(this._browser,this._hostElement,this._className);return this._pool.push(e),e}},_p=class{static fToken=Symbol("MagneticRectsPreparationRequest")},dB=(()=>{let t=class fc{_mediator=p(V);_store=p(L);_browser=p(ht);_injector=p(gt);_dragSession=p(be);_renderer;handle(e){let n=this._store.instances.get(Ze.MAGNETIC_RECTS);if(!n)return;let i=this._dragSession.draggableItems.find(r=>r instanceof hi);i&&i.setMagneticRects(new b_(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 g_(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 st(r.hostElement)))}static \u0275fac=function(n){return new(n||fc)};static \u0275prov=y({token:fc,factory:fc.\u0275fac})};return t=M([D(_p)],t),t})(),b_=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(Ze.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 rB(this._rects,o,this._alignThreshold,this._spacingThreshold)}clearGuides(){this._renderer.hideAll(),this._timerId&&(clearTimeout(this._timerId),this._timerId=null)}},gp=class{event;static fToken=Symbol("DragNodeFinalizeRequest");constructor(o){this.event=o}},v_=class{nodes;fNodes;constructor(o){this.nodes=o,this.fNodes=o}},uB=(()=>{let t=class mc{_mediator=p(V);_store=p(L);_dragSession=p(be);_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(W9)}_buildDragDelta(e){return _e.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 v_(a)}_emitNodeIntersectIfNeeded(e){if(!this._isDraggedJustOneNode(e)||!this._store.fDraggable?.fEmitOnNodeIntersect)return;let n=e.roots[0].nodeOrGroup;queueMicrotask(()=>this._mediator.execute(new Hu(n)))}_isDraggedJustOneNode(e){return e.roots.length===1}static \u0275fac=function(n){return new(n||mc)};static \u0275prov=y({token:mc,factory:mc.\u0275fac})};return t=M([D(gp)],t),t})(),bp=class{event;trigger;static fToken=Symbol("DragNodePreparationRequest");constructor(o,e){this.event=o,this.trigger=e}},pB=(()=>{let t=class _c{_mediator=p(V);_store=p(L);_dragSession=p(be);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 mp),this._mediator.execute(new _p))}_canStartDrag(e,n){return this._dragSession.isEmpty()&&this._isDragHandle(e.targetElement)&&pn(e.originalEvent,n)}_isDragHandle(e){return yr(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=_e.fromPoint(e.getPosition()).elementTransform(this._store.flowHost).div(this._store.transform.scale)}_buildDragNodeHandler(e){return(e.fSelectionDisabled()||!e.isSelected())&&queueMicrotask(()=>{this._mediator.execute(new Bo(e))}),this._mediator.execute(new hp(e))}static \u0275fac=function(n){return new(n||_c)};static \u0275prov=y({token:_c,factory:_c.\u0275fac})};return t=M([D(bp)],t),t})(),hB=[...nB,oB,dB,uB,pB],y_=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}},fB=(()=>{let t=class gc{_dragSession=p(be);_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 Br)}_emitDropToGroupEvent(e,n){this._store.fDraggable?.fDropToGroup.emit(new y_(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||gc)};static \u0275prov=y({token:gc,factory:gc.\u0275fac})};return t=M([D(rp)],t),t})(),vp=class{event;static fToken=Symbol("DropToGroupPreparationRequest");constructor(o){this.event=o}},yp=class{candidates;static fToken=Symbol("SortDropCandidatesByLayerRequest");constructor(o){this.candidates=o}},mB=(()=>{let t=class bc{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||bc)};static \u0275prov=y({token:bc,factory:bc.\u0275fac})};return t=M([D(yp)],t),t})(),C_=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}},Cp=class{externalItem;static fToken=Symbol("DragExternalItemCreatePlaceholderRequest");constructor(o){this.externalItem=o}},_B=(()=>{let t=class vc{_browser=p(ht);_containerRef=p(Ka);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 mm(this._createViewRef(e),this._browser.document)}_fromHost(e){return hm(e)}_createViewRef(e){let n=this._containerRef.createEmbeddedView(e);return n.detectChanges(),n}static \u0275fac=function(n){return new(n||vc)};static \u0275prov=y({token:vc,factory:vc.\u0275fac})};return t=M([D(Cp)],t),t})(),xp=class{externalItem;static fToken=Symbol("DragExternalItemCreatePreviewRequest");constructor(o){this.externalItem=o}},gB=(()=>{let t=class yc{_browser=p(ht);_containerRef=p(Ka);handle({externalItem:e}){let{hostElement:n,preview:i}=e,r=i(),a=r?this._fromTemplate(r):this._fromHost(n);return this._setPreviewStyles(a),ey(a),a.classList.add("f-external-item-preview"),a}_fromTemplate(e){return mm(this._createViewRef(e),this._browser.document)}_fromHost(e){return hm(e)}_createViewRef(e){let n=this._containerRef.createEmbeddedView(e);return n.detectChanges(),n}_setPreviewStyles(e){fm(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||yc)};static \u0275prov=y({token:yc,factory:yc.\u0275fac})};return t=M([D(xp)],t),t})(),wp=class{event;static fToken=Symbol("DragExternalItemFinalizeRequest");constructor(o){this.event=o}},x_=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}},bB="external-item",vB="drag-external-item";function yB(t){return t.getEvent().kind===vB||t.getEvent().fEventType===bB}var CB=(()=>{let t=class Cc{_result=p(fi);_mediator=p(V);_store=p(L);_dragSession=p(be);_browser=p(ht);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=>yB(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 Br);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 x_(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 st(this._result.getData().preview))}static \u0275fac=function(n){return new(n||Cc)};static \u0275prov=y({token:Cc,factory:Cc.\u0275fac})};return t=M([D(wp)],t),t})(),w_=class{data;constructor(o){this.data=o}},Tp=class extends Nt{_externalItem;_pointerDownClientPosition;type="external-item";kind="drag-external-item";data(){return new w_(this._externalItem.data())}_result;_mediator;_browser;_store;_previewEl;_placeholderEl;_startRect=oe.initialize();_pointerDownRect=oe.initialize();_absoluteOffsetFromFlow=W.initialize();_grabOffsetFromPointer=W.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(ht),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 C_(o,this._startRect,Yy());this._applyConstraints=n=>e.limit(n)}_getStartRect(){return this._mediator.execute(new st(this._externalItem.hostElement))}prepareDragSequence(){this._pointerDownRect=this._readAbsoluteRect(this._host),this._absoluteOffsetFromFlow=_e.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 xp(this._externalItem));return this._externalItem.previewMatchSize()&&this._matchSize(o,this._pointerDownRect),o.style.transform=xy(this._pointerDownRect),o}_createPlaceholder(){return this._mediator.execute(new Cp(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=_e.fromPoint(this._startRect).add(i),a=this._toAbsolutePoint(r).add(this._absoluteOffsetFromFlow);this._previewEl.style.transform=xy(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 oe.initialize(e.left+i,e.top+n,e.width,e.height)}_toAbsolutePoint(o){let e=_e.fromPoint(this._transform.position).add(this._transform.scaledPosition);return _e.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 _e.fromPoint(r).sub(this._startRect)}_toFlowPoint(o){let e=this._getFlowHostAbsolutePosition(),n=_e.fromPoint(this._transform.position).add(this._transform.scaledPosition);return _e.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 W.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 _e.fromPoint(o).add(W.initialize(n,e))}};function xy({x:t,y:o}){return`translate3d(${Math.round(t)}px, ${Math.round(o)}px, 0)`}var Sp=class{event;fTrigger;static fToken=Symbol("DragExternalItemPreparationRequest");constructor(o,e){this.event=o,this.fTrigger=e}};function xB(t){return!!t.closest?.("[fExternalItem]")}function wB(t){return t.closest("[fExternalItem]")}var TB=(()=>{class t{_byHost=new Map;_items=Q([]);items=E(()=>this._items());getByElement(e){let n=wB(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 SB=(()=>{let t=class xc{_apiService=p(TB);_dragSession=p(be);_store=p(L);_injector=p(gt);get _flowHost(){return this._store.flowHost}get _transform(){return this._store.transform}handle({event:e,fTrigger:n}){if(!this._dragSession.isEmpty()||!pn(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=_e.fromPoint(e.getPosition()).elementTransform(this._flowHost).div(r),this._dragSession.draggableItems=[new Tp(this._injector,i,e.getPosition())]}_resolveExternalItem(e){return this._apiService.getByElement(e)}static \u0275fac=function(n){return new(n||xc)};static \u0275prov=y({token:xc,factory:xc.\u0275fac})};return t=M([D(Sp)],t),t})(),kp=class{event;static fToken=Symbol("PreventDefaultIsExternalItemRequest");constructor(o){this.event=o}},kB=(()=>{let t=class wc{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=xB(e)}catch{}return n}static \u0275fac=function(n){return new(n||wc)};static \u0275prov=y({token:wc,factory:wc.\u0275fac})};return t=M([D(kp)],t),t})(),IB=[_B,gB,CB,SB,kB],EB=(()=>{let t=class Tc{_mediator=p(V);_dragContext=p(be);_store=p(L);_dragInjector=p(It);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 nh(a));s.length&&(i=i.filter(c=>s.includes(c.node.fId())))}let r=this._dragInjector.get(Br);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 Tp)}_sortedTargetsForDrop(){let e=this._getDraggedNodes(),n=e.some(s=>s instanceof n_),i=this._withParents(e),a=this._eligibleTargets(i,n).map(s=>{let c=this._mediator.execute(new st(s.hostElement));return{node:s,rect:c}});return this._mediator.execute(new yp(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 No(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 n_):i}static \u0275fac=function(n){return new(n||Tc)};static \u0275prov=y({token:Tc,factory:Tc.\u0275fac})};return t=M([D(vp)],t),t})(),MB=[mB,EB,fB],Ip=class{event;static fToken=Symbol("PinchToZoomFinalizeRequest");constructor(o){this.event=o}},DB=.5,Ep=(()=>{class t extends Nt{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(Ze.ZOOM)}_startDistance=null;_startScale=null;_touches;initialize(e){this._touches=e}prepareDragSequence(){let e=wy(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=wy(n.touches),r=PB(n.touches);if(i==null||r==null){this._reset();return}if(Math.abs(i-this._startDistance)<DB)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 _e.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=q(t)))(i||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})();function PB(t){if(t.length!==2)return null;let o=t[0],e=t[1];return W.initialize((o.clientX+e.clientX)/2,(o.clientY+e.clientY)/2)}function wy(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 RB=(()=>{let t=class Sc{_dragSession=p(be);handle(e){if(this._hasPinchZoomHandler())for(let n of this._dragSession.draggableItems)n.onPointerUp?.()}_hasPinchZoomHandler(){return this._dragSession.draggableItems.some(e=>e instanceof Ep)}static \u0275fac=function(n){return new(n||Sc)};static \u0275prov=y({token:Sc,factory:Sc.\u0275fac})};return t=M([D(Ip)],t),t})(),Mp=class{event;static fToken=Symbol("PinchToZoomPreparationRequest");constructor(o){this.event=o}},OB=(()=>{let t=class kc{_dragInjector=p(It);_store=p(L);_dragSession=p(be);handle({event:e}){this._canStart(e)&&(this._dragSession.onPointerDownScale=1,this._dragSession.onPointerDownPosition=new _e,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(Ze.ZOOM)}_getHandler(e){let n=this._dragInjector.get(Ep);return n.initialize(e.touches),n}static \u0275fac=function(n){return new(n||kc)};static \u0275prov=y({token:kc,factory:kc.\u0275fac})};return t=M([D(Mp)],t),t})(),FB=[OB,RB],Dp=class{event;static fToken=Symbol("SelectionAreaFinalizeRequest");constructor(o){this.event=o}},NB=(()=>{let t=class Ic{_dragSession=p(be);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||Ic)};static \u0275prov=y({token:Ic,factory:Ic.\u0275fac})};return t=M([D(Dp)],t),t})(),T_=(()=>{class t extends Nt{type="selection-area";kind="selection-area";_store=p(L);_dragSession=p(be);_mediator=p(V);_canBeSelected=[];_selectedByMove=[];get _transform(){return this._store.transform}get _canvasPosition(){return _e.fromPoint(this._transform.position).add(this._transform.scaledPosition)}get _instance(){return this._store.instances.require(Ze.SELECTION_AREA)}prepareDragSequence(){this._canBeSelected=this._mediator.execute(new mh),this._show(),this._draw(oe.initialize(this._dragSession.onPointerDownPosition.x,this._dragSession.onPointerDownPosition.y))}onPointerMove(e){let n=_e.fromPoint(e).add(this._dragSession.onPointerDownPosition),i=this._getMinimumPoint(this._dragSession.onPointerDownPosition,n),r=Math.abs(e.x),a=Math.abs(e.y),s=oe.initialize(i.x,i.y,r,a);this._draw(s),this._selectedByMove=[],this._canBeSelected.forEach(c=>{c.element.unmarkAsSelected();let u=oe.addPoint(oe.mult(c.fRect,this._transform.scale),this._canvasPosition);oe.intersectionWithRect(u,s)&&(c.element.markAsSelected(),this._selectedByMove.push(c.element))}),this._mediator.execute(new li)}_getMinimumPoint(e,n){return W.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=q(t)))(i||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),Pp=class{event;static fToken=Symbol("SelectionAreaPreparationRequest");constructor(o){this.event=o}},AB=(()=>{let t=class Ec{_store=p(L);_dragSession=p(be);_dragInjector=p(It);get _instance(){return this._store.instances.get(Ze.SELECTION_AREA)}handle(e){this._isValid(e)&&(this._dragSession.onPointerDownScale=1,this._dragSession.onPointerDownPosition=_e.fromPoint(e.event.getPosition()).elementTransform(this._store.flowHost),this._dragSession.draggableItems=[this._dragInjector.createInstance(T_)])}_isValid(e){return!!this._instance&&this._dragSession.isEmpty()&&pn(e.event.originalEvent,this._instance.fTrigger)}static \u0275fac=function(n){return new(n||Ec)};static \u0275prov=y({token:Ec,factory:Ec.\u0275fac})};return t=M([D(Pp)],t),t})(),LB=[AB,NB],Rp=class{rect;childrenBounds;static fToken=Symbol("ApplyChildResizeConstraintsRequest");constructor(o,e){this.rect=o,this.childrenBounds=e}},BB=(()=>{let t=class Mc{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||Mc)};static \u0275prov=y({token:Mc,factory:Mc.\u0275fac})};return t=M([D(Rp)],t),t})(),Op=class{rect;limits;static fToken=Symbol("ApplyParentResizeConstraintsRequest");constructor(o,e){this.rect=o,this.limits=e}},VB=(()=>{let t=class Dc{_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=ye({},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=ye({},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 Vi(e.nodeOrGroup.fId(),n)),e.nodeOrGroup.redraw()}static \u0275fac=function(n){return new(n||Dc)};static \u0275prov=y({token:Dc,factory:Dc.\u0275fac})};return t=M([D(Op)],t),t})(),Fp=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}},Ty={[Pn.LEFT]:{x:-1,y:0},[Pn.LEFT_TOP]:{x:-1,y:-1},[Pn.TOP]:{x:0,y:-1},[Pn.RIGHT_TOP]:{x:1,y:-1},[Pn.RIGHT]:{x:1,y:0},[Pn.RIGHT_BOTTOM]:{x:1,y:1},[Pn.BOTTOM]:{x:0,y:1},[Pn.LEFT_BOTTOM]:{x:-1,y:1}},zB=(()=>{let t=class Pc{handle({originalRect:e,difference:n,handleType:i,minimumSize:r}){let a=this._changeSizeInRect(e,n,Ty[i],r);return this._changePosition(e,n,Ty[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),oe.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 oe.initialize(a,s,r.width,r.height)}static \u0275fac=function(n){return new(n||Pc)};static \u0275prov=y({token:Pc,factory:Pc.\u0275fac})};return t=M([D(Fp)],t),t})(),Np=class{nodeOrGroup;paddings;static fToken=Symbol("CalculateDirectChildrenUnionRectRequest");constructor(o,e){this.nodeOrGroup=o,this.paddings=e}},HB=(()=>{let t=class Rc{_mediator=p(V);_store=p(L);get _allNodesAndGroups(){return this._store.nodes.getAll()}handle({nodeOrGroup:e,paddings:n}){let i=oe.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 st(e.hostElement))}_concatRectWithParentPadding(e,n){return oe.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||Rc)};static \u0275prov=y({token:Rc,factory:Rc.\u0275fac})};return t=M([D(Np)],t),t})(),jr=class{nodeOrGroup;rect;static fToken=Symbol("CalculateResizeLimitsRequest");constructor(o,e){this.nodeOrGroup=o,this.rect=e}},qB=(()=>{let t=class Oc{_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:Ft.initialize(r[0]+r[2],r[1]+r[3])}}_calculateNodePaddings(e,n){return this._mediator.execute(new Gi(e,n))}_getNormalizedChildrenBounds(e,n){return this._mediator.execute(new Np(e,n))}_getParentsChain(e){return this._mediator.execute(new No(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 Vr(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||Oc)};static \u0275prov=y({token:Oc,factory:Oc.\u0275fac})};return t=M([D(jr)],t),t})(),Ap=class{event;static fToken=Symbol("ResizeNodeFinalizeRequest");constructor(o){this.event=o}},sC="node-resize",lC="resize-node";function GB(t){return t.getEvent().kind===lC||t.getEvent().fEventType===sC}var jB=(()=>{let t=class Fc{_dragSession=p(be);handle(e){this._isNodeResizeHandler()&&this._dragSession.draggableItems.forEach(n=>n.onPointerUp?.())}_isNodeResizeHandler(){return this._dragSession.draggableItems.some(e=>GB(e))}static \u0275fac=function(n){return new(n||Fc)};static \u0275prov=y({token:Fc,factory:Fc.\u0275fac})};return t=M([D(Ap)],t),t})(),S_=class{fNodeId;constructor(o){this.fNodeId=o}},k_=(()=>{class t extends Nt{type=sC;kind=lC;data(){return new S_(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 st(this._nodeOrGroup.hostElement))}_buildConstraints(e){return this._mediator.execute(new jr(this._nodeOrGroup,e))}_calcNextRect(e){return this._mediator.execute(new Fp(this._baselineRect,e,this._handleType,this._constraints.minimumSize))}_applyConstraints(e){this._mediator.execute(new Rp(e,this._constraints.childrenBounds)),this._mediator.execute(new Op(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 Vi(this._nodeOrGroup.fId(),e)),this._nodeOrGroup.redraw()}_fallbackRectFromModel(){return oe.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=q(t)))(i||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),Ur=class{_mediator=p(V);_store=p(L);_behaviour=p(zo);_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=pt.fromRoundedRect(this._sourceRef.rect),this._targetRect=pt.fromRoundedRect(this._targetRef.rect)}setSourceRect(o){this._sourceRect=pt.fromRoundedRect(o),this._mediator.execute(new Bi(this._source.fId(),this._source.kind,this._sourceRect))}setTargetRect(o){this._targetRect=pt.fromRoundedRect(o),this._mediator.execute(new Bi(this._target.fId(),this._target.kind,this._targetRect))}redraw(){let o=this._buildLine();this.connection.setLine(o),this.connection.redraw()}_buildLine(){let o=pt.fromRoundedRect(this._sourceRect),e=pt.fromRoundedRect(this._targetRect);return this._behaviour.handle(new wn(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 Gn(o))}},UB=(()=>{class t extends Ur{_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=q(t)))(i||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),$B=(()=>{class t extends Ur{setSourceRect(e){super.setSourceRect(e),super.redraw()}static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),WB=(()=>{class t extends Ur{setTargetRect(e){super.setTargetRect(e),super.redraw()}static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),Lp=class{event;fTrigger;static fToken=Symbol("ResizeNodePreparationRequest");constructor(o,e){this.event=o,this.fTrigger=e}},Bp=class{handler;nodeOrGroup;static fToken=Symbol("AttachResizeConnectionDragHandlersToNodeRequest");constructor(o,e){this.handler=o,this.nodeOrGroup=e}},KB=(()=>{let t=class Nc{_store=p(L);_mediator=p(V);_dragInjector=p(It);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 st(e.hostElement));return this._mediator.execute(new jr(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())),m={source:[],target:[]};for(let g of this._store.connections.getAll()){let x=c.has(g.fOutputId()),I=u.has(g.fInputId());if(!x&&!I)continue;let k=r.get(g.fId())??this._createConnectionHandler(g,n,i);if(r.set(g.fId(),k),x){let N=this._store.outputs.require(g.fOutputId());m.source.push({handler:k,connector:N})}if(I){let N=this._store.inputs.require(g.fInputId());m.target.push({handler:k,connector:N})}}return m}_createConnectionHandler(e,n,i){let r=n.has(e.fOutputId()),a=i.has(e.fInputId()),s=r&&a?this._dragInjector.createInstance(UB):r?this._dragInjector.createInstance($B):this._dragInjector.createInstance(WB);return s.initialize(e),s}static \u0275fac=function(n){return new(n||Nc)};static \u0275prov=y({token:Nc,factory:Nc.\u0275fac})};return t=M([D(Bp)],t),t})(),YB=(()=>{let t=class Ac{_mediator=p(V);_store=p(L);_dragSession=p(be);_dragInjector=p(It);get _transform(){return this._store.transform}handle({event:e,fTrigger:n}){if(!this._dragSession.isEmpty()||!this._isResizeHandle(e.targetElement)||!pn(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=_e.fromPoint(e.getPosition()).elementTransform(this._store.flowHost).div(r);let a=this._dragInjector.createInstance(k_);a.initialize(i,this._readResizeHandleType(e.targetElement)),this._mediator.execute(new Bp(a,i)),this._dragSession.draggableItems=[a]}_isResizeHandle(e){return yr(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 Bo(e))})}_readResizeHandleType(e){let n=ty(e,"fResizeHandleType",".f-resize-handle");return Pn[n]}static \u0275fac=function(n){return new(n||Ac)};static \u0275prov=y({token:Ac,factory:Ac.\u0275fac})};return t=M([D(Lp)],t),t})(),ZB=[BB,VB,zB,HB,qB,KB,jB,YB],Vp=class{event;static fToken=Symbol("RotateNodeFinalizeRequest");constructor(o){this.event=o}},cC="node-rotate",dC="rotate-node";function XB(t){return t.getEvent().kind===dC||t.getEvent().fEventType===cC}var QB=(()=>{let t=class Lc{_dragSession=p(be);handle(e){this._isValid()&&this._dragSession.draggableItems.forEach(n=>{n.onPointerUp?.()})}_isValid(){return this._dragSession.draggableItems.some(e=>XB(e))}static \u0275fac=function(n){return new(n||Lc)};static \u0275prov=y({token:Lc,factory:Lc.\u0275fac})};return t=M([D(Vp)],t),t})(),zp=class{event;fTrigger;static fToken=Symbol("RotateNodePreparationRequest");constructor(o,e){this.event=o,this.fTrigger=e}},I_=class{fNodeId;constructor(o){this.fNodeId=o}};function JB(t,o,e){let{x:n,y:i}=e8(t,o,e),r=n-t.x,a=i-t.y;return{x:r,y:a}}function e8(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,m=c+e.x,g=u+e.y;return{x:m,y:g}}var E_=(()=>{class t extends Nt{type=cC;kind=dC;data(){return new I_(this._nodeOrGroup.fId())}_store=p(L);_mediator=p(V);_dragSession=p(be);_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=W.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 st(this._nodeOrGroup.hostElement))}_calculatePointerDownInFlow(){return W.sub(this._dragSession.onPointerDownPosition,W.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 JB(e,n,this._nodeCenter)}static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),t8=(()=>{let t=class Bc{_mediator=p(V);_store=p(L);_dragContext=p(be);_dragInjector=p(It);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=_e.fromPoint(e.event.getPosition()).elementTransform(this._store.flowHost).div(i);let r=this._dragInjector.createInstance(E_);r.initialize(n,this._buildOutputConnectionHandlers(n),this._buildInputConnectionHandlers(n)),this._dragContext.draggableItems=[r]}_isPreparationAllowed({event:e,fTrigger:n}){return this._dragContext.isEmpty()&&T9(e.targetElement)&&pn(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 Bo(e))})}_buildInputConnectionHandlers(e){return this._mediator.execute(new $p(e)).map(n=>{let i=this._store.inputs.require(n.fInputId()),r=this._mediator.execute(new Xt(i)),a=this._dragInjector.get(Gr);return a.initialize(n),{connection:a,connector:r.rect.gravityCenter}})}_buildOutputConnectionHandlers(e){return this._mediator.execute(new th(e)).map(n=>{let i=this._store.outputs.require(n.fOutputId()),r=this._mediator.execute(new Xt(i)),a=this._dragInjector.get(Hr);return a.initialize(n),{connection:a,connector:r.rect.gravityCenter}})}static \u0275fac=function(n){return new(n||Bc)};static \u0275prov=y({token:Bc,factory:Bc.\u0275fac})};return t=M([D(zp)],t),t})(),n8=[QB,t8],$r=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}},i8=(()=>{let t=class Vc{_store=p(L);get _canvasScale(){return this._store.transform.scale||1}handle(e){return W.sub(e.canvasPosition,W.sub(this._getPositionInViewBox(e.eventPoint,e.minimap),this._getNormalizedFlowCenter(e.flowRect)))}_getNormalizedFlowCenter(e){return _e.fromPoint(e.gravityCenter).sub(e)}_getPositionInViewBox(e,n){let i=this.normalizeEventPoint(e,n);return W.sum(i,oe.mult(n.viewBox,this._canvasScale))}normalizeEventPoint(e,n){return this._getEventPointInMinimap(e,n).mult(n.scale).mult(this._canvasScale)}_getEventPointInMinimap(e,n){return _e.fromPoint(e).elementTransform(n.element)}static \u0275fac=function(n){return new(n||Vc)};static \u0275prov=y({token:Vc,factory:Vc.\u0275fac})};return t=M([D($r)],t),t})(),Hp=class{event;static fToken=Symbol("DragMinimapFinalizeRequest");constructor(o){this.event=o}},o8=(()=>{let t=class zc{_dragSession=p(be);handle(e){this._isValid()&&this._dragSession.draggableItems.forEach(n=>{n.onPointerUp?.()})}_isValid(){return this._dragSession.draggableItems.some(r8)}static \u0275fac=function(n){return new(n||zc)};static \u0275prov=y({token:zc,factory:zc.\u0275fac})};return t=M([D(Hp)],t),t})(),uC="minimap",pC="minimap";function r8(t){return t.getEvent().kind===pC||t.getEvent().fEventType===uC}var M_=(()=>{class t extends Nt{type=uC;kind=pC;_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(_e.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 $r(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=q(t)))(i||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),qp=class{event;static fToken=Symbol("DragMinimapPreparationRequest");constructor(o){this.event=o}},a8=(()=>{let t=class Hc{_store=p(L);_mediator=p(V);_dragSession=p(be);_dragInjector=p(It);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(Ze.MINIMAP).state,i=e.getPosition(),r=_e.fromPoint(this._store.transform.position),a=oe.fromElement(this._flowHost);this._canvas.setPosition(this._calculateCanvasPosition(a,i,n)),this._canvas.redraw(),this._canvas.emitCanvasChangeEvent(),this._dragSession.onPointerDownScale=1,this._dragSession.onPointerDownPosition=_e.fromPoint(i).elementTransform(this._flowHost);let s=this._dragInjector.createInstance(M_);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(Ze.MINIMAP))}_calculateCanvasPosition(e,n,i){return this._mediator.execute(new $r(e,_e.fromPoint(this._canvas.transform.position),n,i))}static \u0275fac=function(n){return new(n||Hc)};static \u0275prov=y({token:Hc,factory:Hc.\u0275fac})};return t=M([D(qp)],t),t})(),s8=[i8,o8,a8];function l8(t){return!!t&&typeof t.destroy=="function"}var It=(()=>{class t{_injector=p(gt);_dragInjector=null;_created=[];create(){this._dragInjector=gt.create({providers:[{provide:Gp,useClass:Gp},{provide:ip,useClass:ip},{provide:Ku,useClass:Ku},{provide:s_,useClass:s_},{provide:Br,useClass:Br},{provide:Hr,useClass:Hr},{provide:Gr,useClass:Gr},{provide:qr,useClass:qr},{provide:hi,useClass:hi},{provide:Ep,useClass:Ep},{provide:T_,useClass:T_},{provide:k_,useClass:k_},{provide:E_,useClass:E_},{provide:M_,useClass:M_}],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=M0(this._dragInjector,()=>new e);return this._created.push(n),n}destroy(){for(let e of this._created)l8(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=ye(ye({},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})(),Sy="f-canvas-dragging",ky="canvas-dragging",Gp=(()=>{class t extends Nt{type="canvas-move";kind="drag-canvas";_store=p(L);_onPointerDownPosition=W.initialize();constructor(){super(),this._store.fCanvas?.hostElement.classList.add(Sy,ky)}prepareDragSequence(){this._onPointerDownPosition=this._store.transform.position}onPointerMove(e){this._store.fCanvas?.setPosition(_e.fromPoint(this._onPointerDownPosition).add(e)),this._store.fCanvas?.redraw()}onPointerUp(){this._store.fCanvas?.emitCanvasChangeEvent(),this._store.fCanvas?.hostElement.classList.remove(Sy,ky)}static \u0275fac=function(n){return new(n||t)};static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),c8=(()=>{let t=class qc{_dragContext=p(be);handle(e){this._isValid()&&this._dragContext.draggableItems.forEach(n=>n.onPointerUp?.())}_isValid(){return this._dragContext.draggableItems.some(e=>e instanceof Gp)}static \u0275fac=function(n){return new(n||qc)};static \u0275prov=y({token:qc,factory:qc.\u0275fac})};return t=M([D(Gu)],t),t})(),jp=class{event;fTrigger;static fToken=Symbol("DragCanvasPreparationRequest");constructor(o,e){this.event=o,this.fTrigger=e}},d8=(()=>{let t=class Gc{_store=p(L);_dragContext=p(be);_dragInjector=p(It);handle({event:e,fTrigger:n}){!this._isValid(e)||!this._isValidTrigger(e,n)||(this._dragContext.onPointerDownScale=1,this._dragContext.onPointerDownPosition=_e.fromPoint(e.getPosition()).elementTransform(this._store.flowHost),this._dragContext.draggableItems=[this._dragInjector.get(Gp)])}_isValid(e){return this._dragContext.isEmpty()&&(this._isBackgroundElement(e.targetElement)||this._isDragOnHost(e.targetElement))}_isBackgroundElement(e){return this._store.instances.get(Ze.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 pn(e.originalEvent,n)}static \u0275fac=function(n){return new(n||Gc)};static \u0275prov=y({token:Gc,factory:Gc.\u0275fac})};return t=M([D(jp)],t),t})(),u8=[c8,d8],Up=class{event;trigger;static fToken=Symbol("SelectByPointerRequest");constructor(o,e){this.event=o,this.trigger=e}},p8=(()=>{let t=class jc{_mediator=p(V);_store=p(L);_dragSession=p(be);handle({event:e,trigger:n}){if(!this._isSelectionAllowed(e))return;let i=this._resolveSelectable(e.targetElement);this._deferRaiseLayerFor(i),pn(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 ji(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||jc)};static \u0275prov=y({token:jc,factory:jc.\u0275fac})};return t=M([D(Up)],t),t})(),h8=[p8];var D_=class extends Zm{hostElement=p(Qe).nativeElement};function f8(t){return yr(t,".f-drag-blocker")}var hC=(()=>{class t extends D_{_result=p(fi);_mediator=p(V);_platform=p(um);disabled=!1;fMultiSelectTrigger=e=>this._platform.getOS()===oi.MAC_OS?e.metaKey:e.ctrlKey;fReassignConnectionTrigger=Cn;fCreateConnectionTrigger=Cn;fConnectionWaypointsTrigger=H(Cn);fMoveControlPointTrigger=Cn;fNodeResizeTrigger=Cn;fNodeRotateTrigger=Cn;fNodeMoveTrigger=Cn;fCanvasMoveTrigger=Cn;fExternalItemTrigger=Cn;fSelectionChange=new ie;fNodeIntersectedWithConnections=new ie;fNodeConnectionsIntersection=bt();fEmitOnNodeIntersect=!1;fCreateNode=new ie;fMoveNodes=new ie;fReassignConnection=new ie;fCreateConnection=new ie;fConnectionWaypointsChanged=bt();fDropToGroup=new ie;vCellSize=H(1,{transform:e=>Te(e,1)});hCellSize=H(1,{transform:e=>Te(e,1)});fCellSizeWhileDragging=H(!1,{transform:e=>G(e)});fDragStarted=new ie;fDragEnded=new ie;_dragHandlerInjector=p(It);ngOnInit(){this._mediator.execute(new Yp(this))}ngAfterViewInit(){super.subscribe()}onPointerDown(e){if(f8(e.targetElement))return!1;this._dragHandlerInjector.create(),this._result.clear(),this._mediator.execute(new Xp),this._mediator.execute(new Pp(e)),this._mediator.execute(new qp(e)),this._mediator.execute(new Mp(e)),this._mediator.execute(new Up(e,this.fMultiSelectTrigger)),this._mediator.execute(new Ju(e,this.fReassignConnectionTrigger)),this._mediator.execute(new Xu(e,this.fCreateConnectionTrigger)),this._mediator.execute(new op(e,this.fConnectionWaypointsTrigger()));let n=e.isMouseLeftButton();return n||this.finalizeDragSequence(),n}prepareDragSequence(e){this._mediator.execute(new Lp(e,this.fNodeResizeTrigger)),this._mediator.execute(new zp(e,this.fNodeRotateTrigger)),this._mediator.execute(new bp(e,this.fNodeMoveTrigger)),this._mediator.execute(new Sp(e,this.fExternalItemTrigger)),this._mediator.execute(new vp(e)),this._mediator.execute(new jp(e,this.fCanvasMoveTrigger)),this._mediator.execute(new Qp)}onSelect(e){this._mediator.execute(new kp(e))}onPointerMove(e){this._mediator.execute(new Zp(e))}onPointerUp(e){this._mediator.execute(new Hp(e)),this._mediator.execute(new Dp(e)),this._mediator.execute(new Qu(e)),this._mediator.execute(new Wu(e)),this._mediator.execute(new Ap(e)),this._mediator.execute(new Vp(e)),this._mediator.execute(new gp(e)),this._mediator.execute(new wp(e)),this._mediator.execute(new rp(e)),this._mediator.execute(new Gu(e)),this._mediator.execute(new Ip(e)),this._mediator.execute(new tp(e)),this._mediator.execute(new Lu)}finalizeDragSequence(){this._mediator.execute(new pi),this._mediator.execute(new Fr),this._result.clear(),this._dragHandlerInjector.destroy()}ngOnDestroy(){this._mediator.execute(new pi),this._mediator.execute(new Jp),super.unsubscribe()}static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275dir=je({type:t,selectors:[["f-flow","fDraggable",""]],inputs:{disabled:[2,"fDraggableDisabled","disabled",G],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",G],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:[ve([fi,It]),Y]})}return t})(),m8=[...u8,...U9,...h9,...h8,...IB,...C9,...s8,...hB,...MB,...ZB,...n8,...LB,...FB],_8=(()=>{let t=class Uc{_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 np(e.fId(),e.fWaypoints()?.waypoints()||[])}static \u0275fac=function(n){return new(n||Uc)};static \u0275prov=y({token:Uc,factory:Uc.\u0275fac})};return t=M([D($m)],t),t})(),P_=class{static fToken=Symbol("RemoveSnapConnectionFromStoreRequest")},g8=(()=>{let t=class $c{_store=p(L);handle(e){this._store.connections.removeInstanceForSnap()}static \u0275fac=function(n){return new(n||$c)};static \u0275prov=y({token:$c,factory:$c.\u0275fac})};return t=M([D(P_)],t),t})(),b8=[Ph,Ui,uL,pL,hL,fL,a7,A7,u7,D7,j7,G7,N7,$7,K7,W7,F7,H7,p7,Q7,O7,R7,P7,S7,M7,k7,I7,U7,V7,Y7,Z7,q7,z7,X7,J7,e9,t9,g8,_8],Wr=class{instance;static fToken=Symbol("AddConnectorToStoreRequest");constructor(o){this.instance=o}},v8=(()=>{let t=class Wc{_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 gu(e.fId(),e.fNodeId,e.kind,e.hostElement))}static \u0275fac=function(n){return new(n||Wc)};static \u0275prov=y({token:Wc,factory:Wc.\u0275fac})};return t=M([D(Wr)],t),t})(),qi=class{position;connectorRefs;static fToken=Symbol("CalculateClosestConnectorRequest");constructor(o,e){this.position=o,this.connectorRefs=e}},y8=(()=>{let t=class Kc{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?gn(ye({},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,m=e.y-c;return Math.sqrt(u*u+m*m)}_clamp(e,n,i){return Math.max(n,Math.min(i,e))}static \u0275fac=function(n){return new(n||Kc)};static \u0275prov=y({token:Kc,factory:Kc.\u0275fac})};return t=M([D(qi)],t),t})(),Kr=class{pointerPosition;connectableConnectors;static fToken=Symbol("FindConnectableConnectorUsingPriorityAndPositionRequest");constructor(o,e){this.pointerPosition=o,this.connectableConnectors=e}},C8=(()=>{let t=class Yc{_mediator=p(V);_store=p(L);_browser=p(ht);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=>oe.isIncludePoint(n.rect,this._calculatePointerInFlow(e.pointerPosition))).map(n=>n.connector)}_calculatePointerInFlow(e){return Ho(e,this._flowHost,this._transform)}_isSnapConnectionEnabledAndHasClosestConnector(e){if(!this._snapConnection)return;let n=this._mediator.execute(new qi(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||Yc)};static \u0275prov=y({token:Yc,factory:Yc.\u0275fac})};return t=M([D(Kr)],t),t})(),Yr=class{source;pointer;static fToken=Symbol("CalculateTargetConnectorsToConnectRequest");constructor(o,e){this.source=o,this.pointer=e}},Xt=class{connector;static fToken=Symbol("GetConnectorRectReferenceRequest");constructor(o){this.connector=o}},x8=(()=>{let t=class Zc{_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||Zc)};static \u0275prov=y({token:Zc,factory:Zc.\u0275fac})};return t=M([D(Xt)],t),t})(),Zr=class{nodeOrGroup;static fToken=Symbol("AddNodeToStoreRequest");constructor(o){this.nodeOrGroup=o}},w8=(()=>{let t=class Xc{_store=p(L);_mediator=p(V);handle({nodeOrGroup:e}){this._store.nodes.add(e),this._mediator.execute(new bu(e.fId(),e.hostElement,e)),this._store.emitNodeChanges()}static \u0275fac=function(n){return new(n||Xc)};static \u0275prov=y({token:Xc,factory:Xc.\u0275fac})};return t=M([D(Zr)],t),t})(),$p=class{nodeOrGroup;static fToken=Symbol("CalculateInputConnectionsRequest");constructor(o){this.nodeOrGroup=o}},T8=(()=>{let t=class Qc{_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||Qc)};static \u0275prov=y({token:Qc,factory:Qc.\u0275fac})};return t=M([D($p)],t),t})(),Ro=class{connector;pointerPosition;static fToken=Symbol("CalculateConnectableSideByConnectedPositionsRequest");constructor(o,e){this.connector=o,this.pointerPosition=e}},Iy=2,Dt=(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})(Dt||{});function S8(t,o,e,n,i){let r=k8(i),a=e-t,s=n-o,c=I8(a,s);return E8(c,r)?c:M8(a,s,r,c)}function k8(t){if(!t||t.length===0)return Dt.ALL;let o=Dt.NONE;for(let e=0;e<t.length;e++)switch(t[e]){case Z.LEFT:o|=Dt.LEFT;break;case Z.RIGHT:o|=Dt.RIGHT;break;case Z.TOP:o|=Dt.TOP;break;case Z.BOTTOM:o|=Dt.BOTTOM;break}return o||Dt.ALL}function I8(t,o){let e=t<0?-t:t,n=o<0?-o:o;return e-n>Iy?t<0?Z.LEFT:Z.RIGHT:(n-e>Iy,o<0?Z.TOP:Z.BOTTOM)}function E8(t,o){switch(t){case Z.LEFT:return(o&Dt.LEFT)!==0;case Z.RIGHT:return(o&Dt.RIGHT)!==0;case Z.TOP:return(o&Dt.TOP)!==0;case Z.BOTTOM:return(o&Dt.BOTTOM)!==0;default:return!0}}function M8(t,o,e,n){let i=n,r=-1/0;if(e&Dt.RIGHT){let a=t;a>r&&(r=a,i=Z.RIGHT)}if(e&Dt.LEFT){let a=-t;a>r&&(r=a,i=Z.LEFT)}if(e&Dt.BOTTOM){let a=o;a>r&&(r=a,i=Z.BOTTOM)}if(e&Dt.TOP){let a=-o;a>r&&(r=a,i=Z.TOP)}return i}function Wp(t){return t===Z.CALCULATE||t===Z.CALCULATE_HORIZONTAL||t===Z.CALCULATE_VERTICAL}var D8={[Z.CALCULATE]:[Z.TOP,Z.BOTTOM,Z.LEFT,Z.RIGHT],[Z.CALCULATE_HORIZONTAL]:[Z.LEFT,Z.RIGHT],[Z.CALCULATE_VERTICAL]:[Z.TOP,Z.BOTTOM]},P8=(()=>{let t=class Jc{_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 S8(r.x,r.y,s,c,D8[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 m=this._getConnectorRect(u).gravityCenter;r+=m.x,a+=m.y,s++}return{sumX:r,sumY:a,count:s}}_getConnectorRect(e){return this._mediator.execute(new st(e))}static \u0275fac=function(n){return new(n||Jc)};static \u0275prov=y({token:Jc,factory:Jc.\u0275fac})};return t=M([D(Ro)],t),t})(),Kp=class{connector;static fToken=Symbol("CalculateConnectableSideByInternalPositionRequest");constructor(o){this.connector=o}},Yp=class{fComponent;static fToken=Symbol("AddDndToStoreRequest");constructor(o){this.fComponent=o}},R8=(()=>{let t=class ed{_store=p(L);handle(e){this._store.fDraggable=e.fComponent}static \u0275fac=function(n){return new(n||ed)};static \u0275prov=y({token:ed,factory:ed.\u0275fac})};return t=M([D(Yp)],t),t})(),Zp=class{event;static fToken=Symbol("OnPointerMoveRequest");constructor(o){this.event=o}},O8=(()=>{let t=class td{_mediator=p(V);_store=p(L);get _hostElement(){return this._store.fDraggable?.hostElement}_dragContext=p(be);handle({event:e}){this._dragContext.rememberPointerEvent(e),this._setDifferenceToDraggableItems(this._getDifferenceBetweenPointerAndPointerDown(e),e),this._mediator.execute(new Nr)}_setDifferenceToDraggableItems(e,n){this._dragContext.draggableItems.forEach(i=>{i.onPointerMove(ye({},e),n)})}_getDifferenceBetweenPointerAndPointerDown(e){return this._getPointerPositionInCanvas(e).div(this._dragContext.onPointerDownScale).sub(this._dragContext.onPointerDownPosition)}_getPointerPositionInCanvas(e){return _e.fromPoint(e.getPosition()).elementTransform(this._hostElement)}static \u0275fac=function(n){return new(n||td)};static \u0275prov=y({token:td,factory:td.\u0275fac})};return t=M([D(Zp)],t),t})(),Xp=class{static fToken=Symbol("InitializeDragSequenceRequest")},F8=(()=>{let t=class nd{_dragContext=p(be);handle(e){this._dragContext.reset()}static \u0275fac=function(n){return new(n||nd)};static \u0275prov=y({token:nd,factory:nd.\u0275fac})};return t=M([D(Xp)],t),t})(),mi=class{static fToken=Symbol("IsDragStartedRequest")},N8=(()=>{let t=class id{_store=p(L);handle(e){return!!this._store.fDraggable?.isDragStarted}static \u0275fac=function(n){return new(n||id)};static \u0275prov=y({token:id,factory:id.\u0275fac})};return t=M([D(mi)],t),t})(),Qp=class{static fToken=Symbol("PrepareDragSequenceRequest")},A8=(()=>{let t=class od{_mediator=p(V);_dragContext=p(be);handle(e){this._callPrepareDragSequence(),this._mediator.execute(new Bu)}_callPrepareDragSequence(){this._dragContext.draggableItems.forEach(e=>e.prepareDragSequence?.())}static \u0275fac=function(n){return new(n||od)};static \u0275prov=y({token:od,factory:od.\u0275fac})};return t=M([D(Qp)],t),t})(),Jp=class{static fToken=Symbol("RemoveDndFromStoreRequest")},L8=(()=>{let t=class rd{_store=p(L);handle(e){this._store.fDraggable=void 0}static \u0275fac=function(n){return new(n||rd)};static \u0275prov=y({token:rd,factory:rd.\u0275fac})};return t=M([D(Jp)],t),t})(),B8=[R8,O8,F8,A8,N8,L8],V8=new ue("CONNECTABLE_SIDE_EPSILON"),z8=(()=>{let t=class ad{_mediator=p(V);_lastSide=new WeakMap;_epsilon=Math.max(0,p(V8,{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=oe.fromElement(e),a=n.getBoundingClientRect(),s=r.gravityCenter.x,c=r.gravityCenter.y,u=s-a.left,m=a.right-s,g=c-a.top,x=a.bottom-c,I=0,k=u,N=[u,m,g,x];for(let ne=1;ne<4;ne++){let pe=N[ne];pe<k&&(k=pe,I=ne)}let j=I===0?Z.LEFT:I===1?Z.RIGHT:I===2?Z.TOP:Z.BOTTOM,X=this._lastSide.get(i);if(X!==void 0&&X!==j){let ne=X===Z.LEFT?0:X===Z.RIGHT?1:X===Z.TOP?2:3;(ne===0?u:ne===1?m:ne===2?g:x)-k<=this._epsilon&&(j=X)}return j}_isDragging(){return this._mediator.execute(new mi)}static \u0275fac=function(n){return new(n||ad)};static \u0275prov=y({token:ad,factory:ad.\u0275fac})};return t=M([D(Kp)],t),t})(),Oo=class{nodeOrGroup;static fToken=Symbol("CalculateConnectorsConnectableSidesRequest");constructor(o){this.nodeOrGroup=o}},H8=(()=>{let t=class sd{_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,m=c.length;u<m;u++){let g=c[u],x=g.userFConnectableSide;Wp(x)&&r.add(g)}}r.size>0&&r.forEach(a=>{a.fConnectableSide=this._calculateByConnectedPositions(a)})}_resolveSideForConnectorFast(e){let n=e.userFConnectableSide;return n===Z.AUTO?this._mediator.execute(new Kp(e)):Wp(n)?this._calculateByConnectedPositions(e):n}_calculateByConnectedPositions(e){return this._mediator.execute(new Ro(e))}static \u0275fac=function(n){return new(n||sd)};static \u0275prov=y({token:sd,factory:sd.\u0275fac})};return t=M([D(Oo)],t),t})(),Fo=class{static fToken=Symbol("CalculateNodesBoundingBoxRequest")},q8=(()=>{let t=class ld{_store=p(L);handle(e){return oe.union(this._nodesRects())}_nodesRects(){return this._store.nodes.getAll().map(e=>oe.fromElement(e.hostElement))}static \u0275fac=function(n){return new(n||ld)};static \u0275prov=y({token:ld,factory:ld.\u0275fac})};return t=M([D(Fo)],t),t})(),eh=class{fNodes;static fToken=Symbol("CalculateNodesBoundingBoxNormalizedPositionRequest");constructor(o){this.fNodes=o}},G8=(()=>{let t=class cd{_store=p(L);_mediator=p(V);handle(e){return oe.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 Do(e.hostElement));if(n)return this._getElementRect(e,n);let i=this._mediator.execute(new st(e.hostElement));return this._getElementRect(e,i)}_getElementRect(e,n){return oe.initialize(e._position.x,e._position.y,n.width,n.height)}static \u0275fac=function(n){return new(n||cd)};static \u0275prov=y({token:cd,factory:cd.\u0275fac})};return t=M([D(eh)],t),t})(),th=class{nodeOrGroup;static fToken=Symbol("CalculateOutputConnectionsRequest");constructor(o){this.nodeOrGroup=o}},j8=(()=>{let t=class dd{_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||dd)};static \u0275prov=y({token:dd,factory:dd.\u0275fac})};return t=M([D(th)],t),t})(),Xr=class{nodeOrGroup;static fToken=Symbol("FitToChildNodesAndGroupsRequest");constructor(o){this.nodeOrGroup=o}},Gi=class{fNode;rect;static fToken=Symbol("GetNodePaddingRequest");constructor(o,e){this.fNode=o,this.rect=e}},U8=(()=>{let t=class ud{_browser=p(ht);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||ud)};static \u0275prov=y({token:ud,factory:ud.\u0275fac})};return t=M([D(Gi)],t),t})(),$8=(()=>{let t=class pd{_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 Xr(i))}_calculateDirectChildren(e){return this._nodes.filter(n=>n.fParentId()===e.fId())}_unionRect(e){return oe.union(e.map(n=>this._boundingRect(n)))||oe.initialize()}_boundingRect(e){return this._mediator.execute(new st(e.hostElement))}_paddings(e,n){return this._mediator.execute(new Gi(e,n))}_calculateChildrenBounding(e,[n,i,r,a]){let s=this._unionRect(e);return s=oe.initialize(s.x-n,s.y-i,s.width+n+r,s.height+i+a),s}static \u0275fac=function(n){return new(n||pd)};static \u0275prov=y({token:pd,factory:pd.\u0275fac})};return t=M([D(Xr)],t),t})(),nh=class{id;static fToken=Symbol("GetChildNodeIdsRequest");constructor(o){this.id=o}},W8=(()=>{let t=class hd{_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||hd)};static \u0275prov=y({token:hd,factory:hd.\u0275fac})};return t=M([D(nh)],t),t})(),No=class{nodeOrGroup;static fToken=Symbol("GetParentNodesRequest");constructor(o){this.nodeOrGroup=o}},K8=(()=>{let t=class fd{_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||fd)};static \u0275prov=y({token:fd,factory:fd.\u0275fac})};return t=M([D(No)],t),t})(),Qr=class{nodeOrGroup;destroyRef;static fToken=Symbol("UpdateNodeWhenStateOrSizeChangedRequest");constructor(o,e){this.nodeOrGroup=o,this.destroyRef=e}},Y8=(()=>{let t=class md{_mediator=p(V);handle({nodeOrGroup:e,destroyRef:n}){let{hostElement:i,stateChanges:r}=e;new Rn(new Sm(i),r).listen(n,()=>{this._mediator.execute(new Ai),this._isDragging()||(this._mediator.execute(new Mo(e.fId(),"UpdateNodeWhenStateOrSizeChanged")),this._mediator.execute(new Oo(e)),this._mediator.execute(new Xr(e)))})}_isDragging(){return this._mediator.execute(new mi)}static \u0275fac=function(n){return new(n||md)};static \u0275prov=y({token:md,factory:md.\u0275fac})};return t=M([D(Qr)],t),t})(),Jr=class{instance;static fToken=Symbol("RemoveNodeFromStoreRequest");constructor(o){this.instance=o}},Z8=(()=>{let t=class _d{_store=p(L);_mediator=p(V);handle({instance:e}){this._store.nodes.remove(e),this._mediator.execute(new vu(e.fId())),this._store.emitNodeChanges()}static \u0275fac=function(n){return new(n||_d)};static \u0275prov=y({token:_d,factory:_d.\u0275fac})};return t=M([D(Jr)],t),t})(),X8=[w8,P8,z8,T8,H8,q8,G8,j8,$8,W8,U8,K8,Y8,Z8],Q8=(()=>{let t=class gd{_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 Xt(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)Wp(i.userFConnectableSide)&&(i.fConnectableSide=this._calculateByConnectedPositions(i,n))}_calculateByConnectedPositions(e,n){return this._mediator.execute(new Ro(e,n))}static \u0275fac=function(n){return new(n||gd)};static \u0275prov=y({token:gd,factory:gd.\u0275fac})};return t=M([D(Yr)],t),t})(),ih=class{target;pointer;static fToken=Symbol("CalculateSourceConnectorsToConnectRequest");constructor(o,e){this.target=o,this.pointer=e}},J8=(()=>{let t=class bd{_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 Xt(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)Wp(i.userFConnectableSide)&&(i.fConnectableSide=this._calculateByConnectedPositions(i,n))}_calculateByConnectedPositions(e,n){return this._mediator.execute(new Ro(e,n))}static \u0275fac=function(n){return new(n||bd)};static \u0275prov=y({token:bd,factory:bd.\u0275fac})};return t=M([D(ih)],t),t})(),Ao=class{connectors;static fToken=Symbol("MarkConnectableConnectorsRequest");constructor(o){this.connectors=o}},yt={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"}},eV=(()=>{let t=class vd{_store=p(L);handle({connectors:e}){this._store.flowHost.classList.add(yt.DRAG_AND_DROP.CONNECTIONS_DRAGGING),e.forEach(n=>this._markConnector(n))}_markConnector({hostElement:e}){e.classList.add(yt.CONNECTOR.CONNECTABLE)}static \u0275fac=function(n){return new(n||vd)};static \u0275prov=y({token:vd,factory:vd.\u0275fac})};return t=M([D(Ao)],t),t})(),ea=class{instance;static fToken=Symbol("RemoveConnectorFromStoreRequest");constructor(o){this.instance=o}},tV=(()=>{let t=class yd{_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 Sr(e.fId(),e.kind))}static \u0275fac=function(n){return new(n||yd)};static \u0275prov=y({token:yd,factory:yd.\u0275fac})};return t=M([D(ea)],t),t})(),Lo=class{connectors;static fToken=Symbol("UnmarkConnectableConnectorsRequest");constructor(o){this.connectors=o}},nV=(()=>{let t=class Cd{_store=p(L);handle({connectors:e}){this._store.flowHost.classList.remove(yt.DRAG_AND_DROP.CONNECTIONS_DRAGGING),e.forEach(n=>this._unmarkConnector(n))}_unmarkConnector({hostElement:e}){e.classList.remove(yt.CONNECTOR.CONNECTABLE)}static \u0275fac=function(n){return new(n||Cd)};static \u0275prov=y({token:Cd,factory:Cd.\u0275fac})};return t=M([D(Lo)],t),t})(),iV=[v8,tV,y8,C8,J8,Q8,x8,eV,nV],oh=class{instance;static fToken=Symbol("AddFlowToStoreRequest");constructor(o){this.instance=o}},$i=(function(t){return t.TOP_BOTTOM="TOP_BOTTOM",t.BOTTOM_TOP="BOTTOM_TOP",t.LEFT_RIGHT="LEFT_RIGHT",t.RIGHT_LEFT="RIGHT_LEFT",t})($i||{}),ri=(function(t){return t.MANUAL="manual",t.AUTO="auto",t})(ri||{});function oV(t){let o=[...t.nodes.map(Ey),...t.groups.map(Ey)],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),m=r.get(c.fInputId);return!u||!m||s.push({source:u,target:m}),s},[]);return{nodes:o,connections:a,nodeIds:e,groupIds:n}}function Ey(t){return{id:t.id,size:t.measuredSize?ye({},t.measuredSize):t.size?ye({},t.size):void 0}}var rV=1,Fh=(()=>{class t{_destroyRef=p(Et);_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)})},rV))}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=oV(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||W.isEqual(r._position,i.position)?!1:(r.position.set(ye({},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})(),fC=new ue("F_LAYOUT_OPTIONS");function mC(t,o){return t.reduce((e,n)=>{let i=o.get(n.id);return i&&e.push({id:n.id,position:i}),e},[])}var aV=new ue("F_LAYOUT"),rh=class{_controller=p(Fh);_config=p(fC,{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=Q(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 ye({},this._config)}resolveLayoutOptions(o){let e=ye({},o??{});return delete e.flowId,delete e.mode,this.mergeOptions(this._interactiveOptions(),e)}};function _C(t,o){return[Fh,t,{provide:aV,useExisting:t},{provide:fC,useValue:o??{}}]}var sV=(()=>{let t=class xd{_store=p(L);_layoutController=p(Fh,{optional:!0});handle({instance:e}){this._store.fFlow=e,this._layoutController?.registerFlow(e,this._store)}static \u0275fac=function(n){return new(n||xd)};static \u0275prov=y({token:xd,factory:xd.\u0275fac})};return t=M([D(oh)],t),t})(),ah=class{static fToken=Symbol("GetFlowRequest")},lV=(()=>{let t=class wd{_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||wd)};static \u0275prov=y({token:wd,factory:wd.\u0275fac})};return t=M([D(ah)],t),t})(),sh=class{static fToken=Symbol("CalculateConnectionsStateRequest")},cV=(()=>{let t=class Td{_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||Td)};static \u0275prov=y({token:Td,factory:Td.\u0275fac})};return t=M([D(sh)],t),t})(),ta=class{component;measuredSize;static fToken=Symbol("CalculateNodesStateRequest");constructor(o,e=!1){this.component=o,this.measuredSize=e}},dV=(()=>{let t=class Sd{_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 st(i.hostElement)):null;return{id:i.fId(),parentId:i.fParentId()??void 0,position:ye({},i._position),size:i._size?ye({},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||Sd)};static \u0275prov=y({token:Sd,factory:Sd.\u0275fac})};return t=M([D(ta)],t),t})(),lh=class{measuredSize;static fToken=Symbol("CalculateFlowStateRequest");constructor(o=!1){this.measuredSize=o}},uV=(()=>{let t=class kd{_mediator=p(V);_store=p(L);get _canvas(){return this._store.fCanvas}get _transform(){return this._canvas.transform}get _canvasPosition(){return W.sum(this._transform.position,this._transform.scaledPosition)}handle({measuredSize:e}){return{position:this._canvasPosition,scale:this._canvas.transform.scale,nodes:this._mediator.execute(new ta(Oh,e)),groups:this._mediator.execute(new ta(n_,e)),connections:this._mediator.execute(new sh)}}static \u0275fac=function(n){return new(n||kd)};static \u0275prov=y({token:kd,factory:kd.\u0275fac})};return t=M([D(lh)],t),t})(),pV=[uV,dV,cV],ch=class{instance;static fToken=Symbol("RemoveFlowFromStoreRequest");constructor(o){this.instance=o}},hV=(()=>{let t=class Id{_store=p(L);_layoutController=p(Fh,{optional:!0});handle({instance:e}){this._layoutController?.unregisterFlow(e.fId()),this._store.fFlow=void 0}static \u0275fac=function(n){return new(n||Id)};static \u0275prov=y({token:Id,factory:Id.\u0275fac})};return t=M([D(ch)],t),t})(),Nh=(()=>{class t{isNodesRendered=!1;isFullRendered=!1;static \u0275fac=function(n){return new(n||t)};static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),dh=class{static fToken=Symbol("NotifyNodesRenderedRequest")},L_=new ue("F_FLOW"),R_=class{},fV=(()=>{let t=class Ed{_state=p(Nh);_fFlow=p(L_);handle(e){this._state.isNodesRendered||(this._state.isNodesRendered=!0,this._fFlow.fNodesRendered.emit(this._fFlow.fId()))}static \u0275fac=function(n){return new(n||Ed)};static \u0275prov=y({token:Ed,factory:Ed.\u0275fac})};return t=M([D(dh)],t),t})(),uh=class{static fToken=Symbol("NotifyFullRenderedRequest")},mV=(()=>{let t=class Md{_state=p(Nh);_fFlow=p(L_);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||Md)};static \u0275prov=y({token:Md,factory:Md.\u0275fac})};return t=M([D(uh)],t),t})(),na=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}},_V=(()=>{let t=class Dd{_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||Dd)};static \u0275prov=y({token:Dd,factory:Dd.\u0275fac})};return t=M([D(na)],t),t})(),ph=class{static fToken=Symbol("ResetRenderLifecycleRequest")},gV=(()=>{let t=class Pd{_state=p(Nh);handle(e){this._state.isNodesRendered=!1,this._state.isFullRendered=!1}static \u0275fac=function(n){return new(n||Pd)};static \u0275prov=y({token:Pd,factory:Pd.\u0275fac})};return t=M([D(ph)],t),t})(),hh=class{destroyRef;static fToken=Symbol("QueueConnectionRedrawRequest");constructor(o){this.destroyRef=o}},gC=(()=>{class t{isWaitingForViewportAnimation=!1;pendingRedraw=!1;static \u0275fac=function(n){return new(n||t)};static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),bV=(()=>{let t=class Rd{_state=p(gC);_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 Pr)});e.destroyRef.onDestroy(n)}static \u0275fac=function(n){return new(n||Rd)};static \u0275prov=y({token:Rd,factory:Rd.\u0275fac})};return t=M([D(hh)],t),t})(),vV=[sV,lV,...pV,hV,Nh,fV,mV,_V,gV,gC,bV],fh=class{static fToken=Symbol("ClearSelectionRequest")},yV=(()=>{let t=class Od{_dragContext=p(be);handle(e){this._dragContext.selectedItems.forEach(n=>n.unmarkAsSelected()),this._dragContext.selectedItems=[],this._dragContext.isSelectedChanged=!0}static \u0275fac=function(n){return new(n||Od)};static \u0275prov=y({token:Od,factory:Od.\u0275fac})};return t=M([D(fh)],t),t})(),mh=class{static fToken=Symbol("CalculateSelectableItemsRequest")},CV=(()=>{let t=class Fd{_mediator=p(V);_store=p(L);_dragContext=p(be);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 st(e.hostElement))}))}_connectionRects(){return this._connections.filter(e=>!e.fSelectionDisabled()).map(e=>({element:e,fRect:this._mediator.execute(new st(e.boundingElement))}))}static \u0275fac=function(n){return new(n||Fd)};static \u0275prov=y({token:Fd,factory:Fd.\u0275fac})};return t=M([D(mh)],t),t})(),ia=class{static fToken=Symbol("GetCurrentSelectionRequest")},xV=(()=>{let t=class Nd{_dragContext=p(be);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||Nd)};static \u0275prov=y({token:Nd,factory:Nd.\u0275fac})};return t=M([D(ia)],t),t})(),_h=class{nodes;connections;isSelectedChanged;static fToken=Symbol("SelectRequest");constructor(o,e,n=!0){this.nodes=o,this.connections=e,this.isSelectedChanged=n}},wV=(()=>{let t=class Ad{_dragContext=p(be);_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||Ad)};static \u0275prov=y({token:Ad,factory:Ad.\u0275fac})};return t=M([D(_h)],t),t})(),gh=class{static fToken=Symbol("SelectAllRequest")},TV=(()=>{let t=class Ld{_dragSession=p(be);_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||Ld)};static \u0275prov=y({token:Ld,factory:Ld.\u0275fac})};return t=M([D(gh)],t),t})(),Bo=class{nodeOrGroup;static fToken=Symbol("SelectAndUpdateNodeLayerRequest");constructor(o){this.nodeOrGroup=o}},bh=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}},SV=(()=>{let t=class Bd{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||Bd)};static \u0275prov=y({token:Bd,factory:Bd.\u0275fac})};return t=M([D(bh)],t),t})(),ji=class{item;itemContainer;static fToken=Symbol("UpdateItemAndChildrenLayersRequest");constructor(o,e){this.item=o,this.itemContainer=e}},Vo=class{nodeOrGroupId;static fToken=Symbol("GetDeepChildrenNodesAndGroupsRequest");constructor(o){this.nodeOrGroupId=o}},kV=(()=>{let t=class Vd{_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||Vd)};static \u0275prov=y({token:Vd,factory:Vd.\u0275fac})};return t=M([D(Vo)],t),t})(),IV=(()=>{let t=class zd{_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 bh(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 Vo(e)).map(n=>n.hostElement)}static \u0275fac=function(n){return new(n||zd)};static \u0275prov=y({token:zd,factory:zd.\u0275fac})};return t=M([D(ji)],t),t})(),EV=(()=>{let t=class Hd{_dragSession=p(be);_mediator=p(V);handle({nodeOrGroup:e}){this._selectNodeIfNotSelected(e),this._mediator.execute(new ji(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||Hd)};static \u0275prov=y({token:Hd,factory:Hd.\u0275fac})};return t=M([D(Bo)],t),t})(),MV=[yV,CV,xV,wV,TV,EV],vh=class{static fToken=Symbol("ResetZoomRequest")},DV=(()=>{let t=class qd{_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||qd)};static \u0275prov=y({token:qd,factory:qd.\u0275fac})};return t=M([D(vh)],t),t})(),yh=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}},PV=new Set(["drag-node","drag-external-item","resize-node","rotate-node","create-connection","reassign-connection","drag-connection-waypoint","assign-to-container"]),RV=new Set(["drag-canvas","selection-area"]),OV=(()=>{let t=class Gd{_mediator=p(V);_store=p(L);_dragContext=p(be,{optional:!0});get _flowHost(){return this._store.flowHost}get _canvas(){return this._store.fCanvas}get _zoomComponent(){return this._store.instances.get(Ze.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 _e.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(PV.has(i)){e=!0;continue}if(!RV.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=_e.fromPoint(this._dragContext.onPointerDownPosition).add(_e.fromPoint(e).mult(r)),this._dragContext.onPointerDownScale=n}static \u0275fac=function(n){return new(n||Gd)};static \u0275prov=y({token:Gd,factory:Gd.\u0275fac})};return t=M([D(yh)],t),t})(),FV=[DV,OV],Ch=class{static fToken=Symbol("MinimapDrawNodesRequest")},NV=(()=>{let t=class jd{_browser=p(ht);_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=So("rect",this._browser);lm(this._nodeRect(e,n,i),r);let a=e instanceof Oh;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=oe.elementTransform(oe.fromElement(e.hostElement),n.hostElement);return oe.div(r,i.transform.scale)}_minimapClasses(e){let n=e.fMinimapClass();return Array.isArray(n)?n:[n]}static \u0275fac=function(n){return new(n||jd)};static \u0275prov=y({token:jd,factory:jd.\u0275fac})};return t=M([D(Ch)],t),t})(),xh=class{svg;minSize;static fToken=Symbol("MinimapCalculateViewportRequest");constructor(o,e){this.svg=o,this.minSize=e}},AV=(()=>{let t=class Ud{_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:oe.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=oe.elementTransform(r,e.hostElement),s=oe.div(a,n.transform.scale);return Yv(s,i)}_nodesBoundingBox(){return this._mediator.execute(new Fo)??oe.initialize(0,0,0,0)}_minimapRectInFlowSpace(e,n){return oe.elementTransform(oe.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 oe.initialize(a,s,r.width,r.height)}_viewportSize(e,n){return Ft.initialize(e.width*n||0,e.height*n||0)}static \u0275fac=function(n){return new(n||Ud)};static \u0275prov=y({token:Ud,factory:Ud.\u0275fac})};return t=M([D(xh)],t),t})(),wh=class{static fToken=Symbol("MinimapCalculateViewRectRequest")},LV=(()=>{let t=class $d{_store=p(L);handle(e){let n=this._store.fFlow,i=this._store.fCanvas;if(!n||!i)return oe.initialize();let r=oe.div(oe.fromElement(n.hostElement),i.transform.scale);return r.x=0,r.y=0,r}static \u0275fac=function(n){return new(n||$d)};static \u0275prov=y({token:$d,factory:$d.\u0275fac})};return t=M([D(wh)],t),t})(),Th=class{element;scale;viewBox;constructor(o,e=1,n=oe.initialize(0,0,0,0)){this.element=o,this.scale=e,this.viewBox=n}},BV=[NV,AV,LV],Sh=class{position;static fToken=Symbol("GetNormalizedPointRequest");constructor(o){this.position=o}},VV=(()=>{let t=class Wd{_store=p(L);handle({position:e}){return Ho(e,this._store.flowHost,this._store.transform)}static \u0275fac=function(n){return new(n||Wd)};static \u0275prov=y({token:Wd,factory:Wd.\u0275fac})};return t=M([D(Sh)],t),t})(),kh=class{static fToken=Symbol("SortNodeLayersRequest")},zV=(()=>{let t=class Kd{_store=p(L);_mediator=p(V);_browser=p(ht);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 Vo(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||Kd)};static \u0275prov=y({token:Kd,factory:Kd.\u0275fac})};return t=M([D(kh)],t),t})(),oa=class{itemsContainer;static fToken=Symbol("SortItemsByParentRequest");constructor(o){this.itemsContainer=o}},HV=(()=>{let t=class Yd{_store=p(L);_browser=p(ht);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 m of c){let g=m.hostElement;if(!e.contains(g))continue;let x=n.get(g);x===void 0||x>=s||u.push(g)}return u.sort((m,g)=>(n.get(m)??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 m=u.fId();if(c.has(m))continue;c.add(m),a.push(u);let g=n.get(m);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||Yd)};static \u0275prov=y({token:Yd,factory:Yd.\u0275fac})};return t=M([D(oa)],t),t})(),Ih=class{static fToken=Symbol("SortItemLayersRequest")},qV=(()=>{let t=class Zd{_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 oa(this._canvas.fGroupsContainer().nativeElement)),this._mediator.execute(new kh),this._mediator.execute(new oa(this._canvas.fNodesContainer().nativeElement)))}static \u0275fac=function(n){return new(n||Zd)};static \u0275prov=y({token:Zd,factory:Zd.\u0275fac})};return t=M([D(Ih)],t),t})();function So(t,o){return o.document.createElementNS("http://www.w3.org/2000/svg",t)}function pn(t,o){return o(t)}function Cn(t){return!0}function GV(){return/android|iPad|iPhone|iPod/i.test(navigator.userAgent||navigator.vendor||window.opera)}var jV=[...dL,...b8,...J6,...iV,...B8,...vV,...X8,...MV,...FV,...BV,...w7,kV,T7,E7,VV,qV,HV,zV,IV,SV],UV=0,bC=(()=>{class t{_destroyRef=p(Et);_elementReference=p(Qe);_fBrowser=p(ht);_stateChanges=new un;get hostElement(){return this._elementReference.nativeElement}id=H(`f-pattern-${UV++}`);vColor=H("rgba(0,0,0,0.1)");hColor=H("rgba(0,0,0,0.1)");vSize=H(20,{transform:Te});hSize=H(20,{transform:Te});_transform=ii.default();_position=W.initialize();_size=Ft.initialize(this.hSize(),this.vSize());_pattern;_vLine;_hLine;constructor(){this._createPattern()}_createPattern(){this._pattern=So("pattern",this._fBrowser),this._pattern.setAttribute("patternUnits","userSpaceOnUse"),this.hostElement.appendChild(this._pattern),this._vLine=So("line",this._fBrowser),this._pattern.appendChild(this._vLine),this._hLine=So("line",this._fBrowser),this._pattern.appendChild(this._hLine)}ngOnInit(){this._listenStateChanges()}_listenStateChanges(){new Rn(this._stateChanges).pipe(Eh()).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=Ft.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:[ve([{provide:ym,useExisting:t}]),ro],decls:0,vars:0,template:function(n,i){},encapsulation:2,changeDetection:0})}return t})();var $V=new ue("F_BACKGROUND"),WV=(()=>{class t{hostElement=p(Qe).nativeElement;static \u0275fac=function(n){return new(n||t)};static \u0275dir=je({type:t,standalone:!1})}return t})(),vC=(()=>{class t extends WV{_mediator=p(V);fBackgroundPattern=Qa(ym);ngOnInit(){this._mediator.execute(new ci(Ze.BACKGROUND,this))}ngAfterContentInit(){this._mediator.execute(new Xd(this.fBackgroundPattern()))}setTransform(e){this.fBackgroundPattern()?.setTransform(e)}ngOnDestroy(){this._mediator.execute(new di(Ze.BACKGROUND))}static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275cmp=z({type:t,selectors:[["f-background"]],contentQueries:function(n,i,r){n&1&&Pf(r,i.fBackgroundPattern,ym,5),n&2&&$t()},hostAttrs:[1,"f-component","f-background"],features:[ve([{provide:$V,useExisting:t}]),Y],ngContentSelectors:k6,decls:2,vars:0,template:function(n,i){n&1&&(Rt(),K(),J(0,"svg"),Ae(1),ee())},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 O_=class{position;scale;constructor(o,e){this.position=o,this.scale=e}},KV=new ue("F_CANVAS"),YV=(()=>{class t{transform=ii.default();_fCanvasChange=new un;destroyRef=p(Et);getPosition(){return this.transform.position}setPosition(e){this.transform.position=e}emitCanvasChangeEvent(){this._fCanvasChange.notify()}subscribeOnCanvasChange(){new Rn(this._fCanvasChange).pipe(Qd(this.debounce())).listen(this.destroyRef,()=>{this.fCanvasChange.emit(new O_(W.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})(),ra=(()=>{class t extends YV{_mediator=p(V);_componentsStore=p(L);_elementReference=p(Qe);_injector=p(gt);_flowId;fCanvasChange=bt();position=H(W.initialize(),{transform:W.castToPoint});scale=H(1,{transform:Te});debounceTime=H(0,{transform:Te});debounce=E(()=>this.debounceTime()<0?0:this.debounceTime());get hostElement(){return this._elementReference.nativeElement}fGroupsContainer=at.required("fGroupsContainer");fNodesContainer=at.required("fNodesContainer");fConnectionsContainer=at.required("fConnectionsContainer");get flowId(){return this._flowId||""}ngOnInit(){this._flowId=this._mediator.execute(new ah).fId(),this._mediator.execute(new eu(this)),this._positionChange(),this._scaleChange(),super.subscribeOnCanvasChange()}_positionChange(){ge(()=>{this._mediator.execute(new iu(this.transform,this.position()))},{injector:this._injector})}_scaleChange(){ge(()=>{this._mediator.execute(new ou(this.transform,this.scale()))},{injector:this._injector})}redraw(){this._mediator.execute(new wr(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 wr(this.transform)),this.hostElement.style.transition=`transform ${GV()?80:150}ms ease-in-out`,this.hostElement.style.transform=ii.toString(this.transform),My(this.hostElement,()=>this.redraw())}centerGroupOrNode(e,n=!0){this._afterRedraw(()=>{this._mediator.execute(new tu(e,n))})}fitToScreen(e=W.initialize(),n=!0){this._afterRedraw(()=>{this._mediator.execute(new nu(e,n))})}resetScaleAndCenter(e=!0){this._afterRedraw(()=>{this._mediator.execute(new su(e))})}getScale(){return this.transform.scale||1}setScale(e,n=W.initialize()){this._mediator.execute(new lu(e,n))}resetScale(){this._mediator.execute(new au)}ngOnDestroy(){this._mediator.execute(new ru)}_afterRedraw(e){this._mediator.execute(new na(this._componentsStore.connectionsRevision,this._componentsStore.nodesRevision,()=>ao(e,{injector:this._injector}),this.destroyRef))}static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275cmp=z({type:t,selectors:[["f-canvas"]],viewQuery:function(n,i){n&1&&vn(i.fGroupsContainer,I6,5)(i.fNodesContainer,E6,5)(i.fConnectionsContainer,M6,5),n&2&&$t(3)},hostAttrs:[1,"f-component","f-canvas"],inputs:{position:[1,"position"],scale:[1,"scale"],debounceTime:[1,"debounceTime"]},outputs:{fCanvasChange:"fCanvasChange"},features:[ve([{provide:KV,useExisting:t}]),Y],ngContentSelectors:P6,decls:12,vars:0,consts:[["fGroupsContainer",""],["fConnectionsContainer",""],["fNodesContainer",""],[1,"f-connections-container"]],template:function(n,i){n&1&&(Rt(D6),Ya(0),J(1,"div",null,0),Ae(3),ee(),J(4,"div",3,1),Ae(6,1),Ae(7,2),Ae(8,3),ee(),J(9,"div",null,2),Ae(11,4),ee(),Za())},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 ZV=0,yC=(()=>{class t extends r7{fId=H(`f-connection-${ZV++}`,{alias:"fConnectionId"});fOutputId=H("",{transform:e=>Po(e)||""});fInputId=H("",{transform:e=>Po(e)||""});fRadius=8;fOffset=12;fBehavior=ai.FIXED;fType=xo.STRAIGHT;fSelectionDisabled=H(!1,{transform:G});fReassignableStart=H(!1,{transform:G});fDraggingDisabled=H(!1,{alias:"fReassignDisabled",transform:G});fInputSide=H(Ye.DEFAULT,{transform:e=>Co(e,"fInputSide",Ye)});fOutputSide=H(Ye.DEFAULT,{transform:e=>Co(e,"fOutputSide",Ye)});get boundingElement(){return this.fPath().hostElement}_mediator=p(V);ngOnInit(){this._mediator.execute(new du(this))}ngOnChanges(){this._mediator.execute(new Ai)}ngOnDestroy(){this._mediator.execute(new Nu(this))}static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(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()),ce("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",Te],fOffset:[2,"fOffset","fOffset",Te],fBehavior:[2,"fBehavior","fBehavior",e=>Co(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:[ve([{provide:Mh,useExisting:t}]),Y,ro],ngContentSelectors:O6,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&&(Rt(R6),K(),f(0,"svg",1),F(1,"defs",null,0),Ae(3),f(4,"g",2),P(5,F6,1,1,":svg:linearGradient",3),F(6,"path",4),f(7,"g"),F(8,"path",5),P(9,N6,1,0,":svg:circle",6),F(10,"circle",7),_()()(),Ae(11,1),Ae(12,2),Ae(13,3),P(14,A6,1,0)),n&2){let r;l(5),R((r=i.fGradient())?5:-1,r),l(),O("d",i.path),l(2),h("useGradient",!!i.fGradient()),O("d",i.path),l(),R(i.fReassignableStart()?9:-1),l(5),R(i.fContents().length?14:-1)}},dependencies:[Am,t7,n7,YL,e7],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 XV=new ue("F_MAGNETIC_LINES"),QV=(()=>{class t{hostElement=p(Qe).nativeElement;static \u0275fac=function(n){return new(n||t)};static \u0275dir=je({type:t,standalone:!1})}return t})();var CC=(()=>{class t extends QV{threshold=H(10,{transform:Te,alias:"fAlignThreshold"});_mediator=p(V);ngOnInit(){this._mediator.execute(new ci(Ze.MAGNETIC_LINES,this))}ngOnDestroy(){this._mediator.execute(new di(Ze.MAGNETIC_LINES))}static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(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:[ve([{provide:XV,useExisting:t}]),Y],decls:0,vars:0,template:function(n,i){},styles:[L6]})}return t})();var gm=(()=>{class t{fMinSize=H(1e3);_mediator=p(V);hostElement=p(Qe).nativeElement;model=new Th(this.hostElement);redraw(){let{scale:e,viewBox:n}=this._mediator.execute(new xh(this.hostElement,this.fMinSize()));this.model=new Th(this.hostElement,e,n),Zv(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})(),bm=(()=>{class t{_mediator=p(V);_elementRef=p(Qe);hostElement=this._elementRef.nativeElement;redraw(){this.clear();let e=this._elementRef.nativeElement.ownerDocument.createDocumentFragment();this._mediator.execute(new Ch).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})(),vm=(()=>{class t{_mediator=p(V);hostElement=p(Qe).nativeElement;redraw(){lm(this._mediator.execute(new wh),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})(),JV=new ue("F_MINIMAP_BASE"),ez=(()=>{class t{hostElement=p(Qe).nativeElement;static \u0275fac=function(n){return new(n||t)};static \u0275dir=je({type:t,standalone:!1})}return t})(),xC=(()=>{class t extends ez{_destroyRef=p(Et);_mediator=p(V);_browser=p(ht);_store=p(L);_canvas=at.required(bm);_flow=at.required(gm);_minimapView=at.required(vm);fMinSize=H(1e3);fNodeRenderLimit=H(1500,{transform:Te});get state(){return this._flow().model}ngOnInit(){this._mediator.execute(new ci(Ze.MINIMAP,this))}ngAfterViewInit(){this._listenTransformChanges()}_listenTransformChanges(){this._mediator.execute(new Jd).pipe(Eh(),H6()).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(Ze.MINIMAP))}static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275cmp=z({type:t,selectors:[["f-minimap"]],viewQuery:function(n,i){n&1&&vn(i._canvas,bm,5)(i._flow,gm,5)(i._minimapView,vm,5),n&2&&$t(3)},hostAttrs:[1,"f-component","f-minimap"],inputs:{fMinSize:[1,"fMinSize"],fNodeRenderLimit:[1,"fNodeRenderLimit"]},exportAs:["fComponent"],features:[ve([{provide:JV,useExisting:t}]),Y],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&&(K(),f(0,"svg",0),F(1,"g",1)(2,"rect",2),_()),n&2&&h("fMinSize",i.fMinSize())},dependencies:[gm,bm,vm],styles:["[_nghost-%COMP%]{display:block;position:absolute}[_nghost-%COMP%] svg[_ngcontent-%COMP%]{overflow:hidden}"],changeDetection:0})}return t})();var tz=(()=>{class t{hostElement=p(Qe).nativeElement;initialize(){this.hostElement.style.display="none"}static \u0275fac=function(n){return new(n||t)};static \u0275dir=je({type:t,standalone:!1})}return t})(),wC=(()=>{class t extends tz{_mediator=p(V);fTrigger=e=>e.shiftKey;ngOnInit(){this._mediator.execute(new ci(Ze.SELECTION_AREA,this)),super.initialize()}ngOnDestroy(){this._mediator.execute(new di(Ze.SELECTION_AREA))}static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275cmp=z({type:t,selectors:[["f-selection-area"]],hostAttrs:[1,"f-selection-area","f-component"],inputs:{fTrigger:"fTrigger"},features:[Y],decls:0,vars:0,template:function(n,i){},styles:["[_nghost-%COMP%]{position:absolute}"]})}return t})();var nz=0,iz=120,aa=(()=>{class t extends R_{_destroyRef=p(Et);_mediator=p(V);_browser=p(ht);_componentsStore=p(L);_cache=p(On);_injector=p(gt);fId=H(`f-flow-${nz++}`,{alias:"fFlowId"});fCache=H(!1,{transform:G});hostElement=p(Qe).nativeElement;fNodesRendered=bt();fFullRendered=bt();fLoaded=bt();ngOnInit(){this._mediator.execute(new oh(this)),this._listenCacheChanges()}ngAfterContentInit(){this._browser.isBrowser()&&(this._listenNodesChanges(),this._listenConnectionsChanges())}_listenCacheChanges(){ge(()=>{this._cache.enabled=this.fCache()},{injector:this._injector})}_listenNodesChanges(){new Rn(this._componentsStore.nodesChanges$,this._componentsStore.progressiveRenderChanges$).pipe(Eh(),Qd(iz),z6()).listen(this._destroyRef,()=>{this._mediator.execute(new mi)||this._componentsStore.hasPendingProgressiveRender||(this._mediator.execute(new Ih),this._mediator.execute(new dh),this._mediator.execute(new na(this._componentsStore.connectionsRevision+1,this._componentsStore.nodesRevision,()=>this._mediator.execute(new uh),this._destroyRef)),this._mediator.execute(new Ai))})}_listenConnectionsChanges(){this._mediator.execute(new wo).listen(this._destroyRef,()=>{if(!this._mediator.execute(new mi)){if(this._componentsStore.isViewportAnimating){this._mediator.execute(new hh(this._destroyRef));return}this._mediator.execute(new Pr)}})}redraw(){this._mediator.execute(new Ai)}reset(){this._mediator.execute(new ph)}getNodesBoundingBox(){return this._mediator.execute(new eh)}getSelection(){return this._mediator.execute(new ia)}getPositionInFlow(e){return this._mediator.execute(new Sh(e))}getState(e){return this._mediator.execute(new lh(e?.measuredSize??!1))}selectAll(){this._mediator.execute(new wo).pipe(ny()).listen(this._destroyRef,()=>{this._mediator.execute(new gh)})}select(e,n,i=!0){this._mediator.execute(new wo).pipe(ny()).listen(this._destroyRef,()=>{this._mediator.execute(new _h(e,n,i))})}clearSelection(){this._mediator.execute(new fh)}ngOnDestroy(){this._mediator.execute(new ch(this))}static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(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:[ve([V,...Y6,Hy,zo,...jV,be,...m8,{provide:L_,useExisting:t}]),Y],ngContentSelectors:V6,decls:7,vars:0,template:function(n,i){n&1&&(Rt(B6),Ya(0),Ae(1),Ae(2,1),Ae(3,2),Ae(4,3),Ae(5,4),Ae(6,5),Za())},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 TC=(()=>{class t{fVirtualForOf=[];fVirtualForTrackBy;_vc=p(Ka);_tpl=p(D0);_zone=p(nn);_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:[ro]})}return t})();var xn=(function(t){return t[t.ZOOM_IN=1]="ZOOM_IN",t[t.ZOOM_OUT=-1]="ZOOM_OUT",t})(xn||{}),oz=new ue("F_ZOOM"),F_=class{},rz=.1,az=1,sz=.5,lz=60,cz=.5;function dz(t){return Math.abs(t.deltaY)>=Math.abs(t.deltaX)?t.deltaY:t.deltaX}function uz(t,o,e){return pz(t)?fz(o,e):hz(o,e)}function pz(t){return(t.ctrlKey||t.metaKey)&&t.deltaMode===WheelEvent.DOM_DELTA_PIXEL}function hz(t,o){let e=Math.abs(t)/100,n=SC(e,rz,az);return o*n}function fz(t,o){if(Math.abs(t)<sz)return 0;let e=Math.abs(t)/lz,n=SC(e,0,cz);return o*n}function SC(t,o,e){return Math.max(o,Math.min(e,t))}var sa=(()=>{class t extends F_{_mediator=p(V);_injector=p(gt);_store=p(L);_triggersListener=He.emptyListener();isEnabled=H(!1,{alias:"fZoom",transform:G});fWheelTrigger=Cn;fDblClickTrigger=Cn;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(Ze.ZOOM,this))}ngAfterViewInit(){this._listenZoomEnabledChanges()}_listenZoomEnabledChanges(){ge(()=>{this.isEnabled(),rn(()=>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(!pn(e,this.fWheelTrigger)||(e.preventDefault(),e.target?.closest("[fLockedContext]")))return;let i=dz(e);if(i===0)return;let r=this._normalizeWheelStep(e,i);r!==0&&this.setZoom(W.initialize(e.clientX,e.clientY),r,this._calculateDirection(i),!1)};_normalizeWheelStep(e,n){return uz(e,n,this.step)}_calculateDirection(e){return e>0?xn.ZOOM_OUT:xn.ZOOM_IN}_onDoubleClick=e=>{if(!pn(e,this.fDblClickTrigger))return;e.preventDefault();let n=e.target;M9(n)||n?.closest("[fLockedContext]")||this.setZoom(W.initialize(e.clientX,e.clientY),this.dblClickStep,xn.ZOOM_IN,!0)};_getToCenterPosition(e,n){return W.initialize(e?.x||n.gravityCenter.x,e?.y||n.gravityCenter.y)}zoomIn(e){this._onZoomToCenter(xn.ZOOM_IN,e)}zoomOut(e){this._onZoomToCenter(xn.ZOOM_OUT,e)}_onZoomToCenter(e,n){this.setZoom(this._getToCenterPosition(n,oe.fromElement(this._flowHost)),this.step,e,!1)}setZoom(e,n,i,r){this._mediator.execute(new yh(e,n,i,r))}getZoomValue(){return this._canvas.transform.scale||1}reset(){this._mediator.execute(new vh)}_disposeListeners(){this._triggersListener(),this._triggersListener=He.emptyListener()}ngOnDestroy(){this._disposeListeners(),this._mediator.execute(new di(Ze.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=q(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",Te],maximum:[2,"fZoomMaximum","maximum",Te],step:[2,"fZoomStep","step",Te],dblClickStep:[2,"fZoomDblClickStep","dblClickStep",Te]},features:[ve([{provide:oz,useExisting:t}]),Y]})}return t})();var kC=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=nt({type:t});static \u0275inj=tt({imports:[ot]})}return t})();var ff=u3(wD(),1);var Aa=(function(t){return t.NETWORK_SIMPLEX="network-simplex",t.TIGHT_TREE="tight-tree",t.LONGEST_PATH="longest-path",t})(Aa||{}),Mre={direction:$i.TOP_BOTTOM,nodeGap:48,layerGap:64,algorithm:Aa.NETWORK_SIMPLEX,defaultNodeSize:Ft.initialize(120,72)},u0=(()=>{class t extends rh{constructor(){super(Mre)}mergeOptions(e,n={}){return gn(ye(ye({},e),n),{defaultNodeSize:n.defaultNodeSize?Ft.initialize(n.defaultNodeSize.width,n.defaultNodeSize.height):Ft.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 ff.layout(a),a.nodes().forEach(c=>{let u=a.node(c),m=e.find(x=>x.id===c);if(!u||!m)return;let g=m.size??r.defaultNodeSize;s.set(c,W.initialize(u.x-g.width/2,u.y-g.height/2))}),{nodes:mC(e,s)}}_buildGraph(e,n,i){let r=new ff.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 Aa.TIGHT_TREE:return"tight-tree";case Aa.LONGEST_PATH:return"longest-path";case Aa.NETWORK_SIMPLEX:default:return"network-simplex"}}_mapDirection(e){switch(e){case $i.BOTTOM_TOP:return"BT";case $i.LEFT_RIGHT:return"LR";case $i.RIGHT_LEFT:return"RL";case $i.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:"Reset layout?",message:"Reset all node positions to the automatic layout. This cannot be undone.",accept:"Reset",reject:"Cancel"}};var tr={graph:{perf:{cache:!0,virtualization:!1},perfHud:!0},inspector:{actionMocks:!1}};var Dre="adaptive-curve",f0=["segment","straight","bezier","adaptive-curve"],TD="sm.graph.connection-type",SD="sm.graph.layout-algorithm",kD="sm.graph.layout-direction",mf=(()=>{class t{_connectionType=Q(p0(TD,Pre,Dre));_layoutAlgorithm=Q(p0(SD,Sb,xb));_layoutDirection=Q(p0(kD,kb,wb));_layoutSpacing=Q(Tb);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),h0(TD,e))}setLayoutAlgorithm(e){this._layoutAlgorithm()!==e&&(this._layoutAlgorithm.set(e),h0(SD,e))}setLayoutDirection(e){this._layoutDirection()!==e&&(this._layoutDirection.set(e),h0(kD,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 p0(t,o,e){let n=null;try{n=localStorage.getItem(t)}catch{return e}return n&&o(n)?n:e}function h0(t,o){try{localStorage.setItem(t,o)}catch{}}function Pre(t){return typeof t=="string"&&f0.includes(t)}function ID(t,o){let e=new Set([o]),n=[o];for(;n.length>0;){let i=n.shift(),r=t.get(i);if(r)for(let a of r)e.has(a)||(e.add(a),n.push(a))}return e}var Rre={TOP_BOTTOM:{output:Ye.BOTTOM,input:Ye.TOP},BOTTOM_TOP:{output:Ye.TOP,input:Ye.BOTTOM},LEFT_RIGHT:{output:Ye.RIGHT,input:Ye.LEFT},RIGHT_LEFT:{output:Ye.LEFT,input:Ye.RIGHT}};function ED(t,o){return ms(t)?Rre[o]:{input:Ye.CALCULATE,output:Ye.CALCULATE}}var MD=`
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 Ore=["content"],Fre=["*"],Nre=t=>({closeCallback:t});function Are(t,o){}function Lre(t,o){t&1&&S(0,Are,0,0,"ng-template")}function Bre(t,o){if(t&1){let e=te();f(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())}),f(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))}),Ae(2),S(3,Lre,1,0,null,3),_()()}if(t&2){let e=d();St(e.sx("root")),B(e.cn(e.cx("root"),e.styleClass)),h("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(),B(e.cx("content")),h("pBind",e.ptm("content")),l(2),h("ngTemplateOutlet",e.contentTemplate||e._contentTemplate)("ngTemplateOutletContext",Fe(17,Nre,e.onCloseClick.bind(e)))}}var Vre={root:()=>({position:"absolute"})},zre={root:"p-popover p-component",content:"p-popover-content"},DD=(()=>{class t extends dt{name="popover";style=MD;classes=zre;inlineStyles=Vre;static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),PD=new ue("POPOVER_INSTANCE"),m0=(()=>{class t extends Ot{componentName="Popover";$pcPopover=p(PD,{optional:!0,skipSelf:!0})??void 0;bindDirectiveInstance=p(de,{self:!0});onAfterViewChecked(){this.bindDirectiveInstance.setAttrs(this.ptm("host"))}ariaLabel;ariaLabelledBy;dismissable=!0;style;styleClass;appendTo=H("body");autoZIndex=!0;ariaCloseLabel;baseZIndex=0;focusOnShow=!0;showTransitionOptions=".12s cubic-bezier(0, 0, 0.2, 1)";hideTransitionOptions=".1s linear";motionOptions=H(void 0);computedMotionOptions=E(()=>ye(ye({},this.ptm("motion")),this.motionOptions()));onShow=new ie;onHide=new ie;$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(DD);zone=p(nn);overlayService=p(co);onAfterContentInit(){this.templates.forEach(e=>{e.getType()==="content"&&(this._contentTemplate=e.template)})}bindDocumentClickListener(){if(Kt(this.platformId)&&!this.documentClickListener){let e=H0()?"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"?Di(this.document.body,this.container):Di(this.$appendTo(),this.container))}restoreAppend(){this.container&&this.$appendTo()&&this.$appendTo()!=="self"&&Di(this.el.nativeElement,this.container)}setZIndex(){this.autoZIndex&&Mn.set("overlay",this.container,this.baseZIndex+this.config.zIndex.overlay)}align(){if(this.target&&this.container){ur(this.container,this.target,!1);let e=Vf(this.container),n=Vf(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(K0("popover.arrow.left").name,`${r}px`),e.top<n.top&&(this.container.setAttribute("data-p-popover-flipped","true"),!this.$unstyled()&&dr(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&&Mn.clear(this.container),this.onContainerDestroy(),this.onHide.emit({}),this.render=!1,this.container=null)}focus(){let e=vt(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&&!ts()&&this.hide()}bindDocumentResizeListener(){if(Kt(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(){Kt(this.platformId)&&(this.scrollHandler||(this.scrollHandler=new mr(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&&Mn.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=q(t)))(i||t)}})();static \u0275cmp=z({type:t,selectors:[["p-popover"]],contentQueries:function(n,i,r){if(n&1&&wt(r,Ore,4)(r,Ke,4),n&2){let a;U(a=$())&&(i.contentTemplate=a.first),U(a=$())&&(i.templates=a)}},hostBindings:function(n,i){n&1&&A("keydown.escape",function(a){return i.onEscapeKeydown(a)},Wa)},inputs:{ariaLabel:"ariaLabel",ariaLabelledBy:"ariaLabelledBy",dismissable:[2,"dismissable","dismissable",G],style:"style",styleClass:"styleClass",appendTo:[1,"appendTo"],autoZIndex:[2,"autoZIndex","autoZIndex",G],ariaCloseLabel:"ariaCloseLabel",baseZIndex:[2,"baseZIndex","baseZIndex",Te],focusOnShow:[2,"focusOnShow","focusOnShow",G],showTransitionOptions:"showTransitionOptions",hideTransitionOptions:"hideTransitionOptions",motionOptions:[1,"motionOptions"]},outputs:{onShow:"onShow",onHide:"onHide"},features:[ve([DD,{provide:PD,useExisting:t},{provide:ut,useExisting:t}]),lt([de]),Y],ngContentSelectors:Fre,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&&(Rt(),P(0,Bre,4,19,"div",0)),n&2&&R(i.render?0:-1)},dependencies:[ot,xt,Zn,Se,de,_o,ub],encapsulation:2,changeDetection:0})}return t})(),RD=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=nt({type:t});static \u0275inj=tt({imports:[m0,Se,Se]})}return t})();function qre(t,o){if(t&1){let e=te();f(0,"li",10)(1,"button",14),A("click",function(){let i=w(e).$implicit,r=d(),a=Lt(6);return r.setLayoutAlgorithm(i),T(a.hide())}),b(2),_()()}if(t&2){let e=o.$implicit,n=d();l(),ce("is-active",n.layoutAlgorithm()===e),O("aria-checked",n.layoutAlgorithm()===e)("data-testid","graph-layout-algorithm-option-"+e),l(),Me(" ",n.layoutAlgorithmLabel(e)," ")}}function Gre(t,o){if(t&1){let e=te();f(0,"button",15),A("click",function(){let i=w(e).$implicit,r=d(),a=Lt(11);return r.setLayoutDirection(i),T(a.hide())}),F(1,"i",16),_()}if(t&2){let e=o.$implicit,n=d();ce("is-active",n.layoutDirection()===e),h("pTooltip",n.layoutDirectionLabel(e)),O("aria-checked",n.layoutDirection()===e)("aria-label",n.layoutDirectionLabel(e))("data-testid","graph-layout-direction-option-"+e),l(),B(n.directionItemIcon(e))}}function jre(t,o){if(t&1){let e=te();f(0,"button",15),A("click",function(){let i=w(e).$implicit,r=d(),a=Lt(16);return r.setConnectionType(i),T(a.hide())}),K(),f(1,"svg",17),F(2,"path",7),_()()}if(t&2){let e=o.$implicit,n=d();ce("is-active",n.connectionType()===e),h("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 OD={TOP_BOTTOM:"pi pi-arrow-down",BOTTOM_TOP:"pi pi-arrow-up",LEFT_RIGHT:"pi pi-arrow-right",RIGHT_LEFT:"pi pi-arrow-left"},Ure={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"},FD=(()=>{class t{graphPreferences=p(mf);texts=Ti;layoutAlgorithms=yb;layoutDirections=Cb;connectionTypes=f0;layoutAlgorithm=this.graphPreferences.layoutAlgorithm;layoutDirection=this.graphPreferences.layoutDirection;connectionType=this.graphPreferences.connectionType;directionIcon=E(()=>OD[this.layoutDirection()]);directionAvailable=E(()=>ms(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 OD[e]}connectionTypeItemPath(e){return Ure[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=te();f(0,"p-button",3),A("onClick",function(s){w(r);let c=Lt(6);return T(c.toggle(s))}),_(),f(1,"p-button",4),A("onClick",function(s){w(r);let c=Lt(11);return T(c.toggle(s))}),_(),f(2,"p-button",5),A("onClick",function(s){w(r);let c=Lt(16);return T(c.toggle(s))}),K(),f(3,"svg",6),F(4,"path",7),_()(),ja(),f(5,"p-popover",8,0)(7,"ul",9),he(8,qre,3,5,"li",10,Ue),_()(),f(10,"p-popover",8,1)(12,"div",11),he(13,Gre,2,8,"button",12,Ue),_()(),f(15,"p-popover",8,2)(17,"div",13),he(18,jre,3,7,"button",12,Ue),_()()}n&2&&(h("ariaLabel",i.texts.toolbar.layoutAlgorithmLabel)("pTooltip",i.texts.toolbar.layoutAlgorithmTooltip)("text",!0)("rounded",!0),l(),h("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(),h("ariaLabel",i.texts.toolbar.connectionTypeLabel)("pTooltip",i.texts.toolbar.connectionTypeTooltip)("text",!0)("rounded",!0),l(2),O("d",i.connectionTypeItemPath(i.connectionType())),l(4),fe(i.layoutAlgorithms),l(5),fe(i.layoutDirections),l(5),fe(i.connectionTypes))},dependencies:[dn,Yt,RD,m0,ze,Ve],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 ND={a11y:{toolbarLabel:"Toggle node kinds"},favorites:{label:"Favorites"}};function $re(t,o){if(t&1&&ae(0,"i",4),t&2){let e=d();B(e.piClass()),$e("font-size",e.size(),"px")}}function Wre(t,o){if(t&1&&(K(),J(0,"svg",1),ae(1,"path"),ee()),t&2){let e=d();O("width",e.size())("height",e.size()),l(),O("d",e.svgPath())}}function Kre(t,o){if(t&1&&(J(0,"span",4),b(1),ee()),t&2){let e=d();$e("font-size",e.size(),"px")("line-height",e.size(),"px"),l(),C(e.emoji())}}function Yre(t,o){if(t&1&&(J(0,"span",5),b(1),ee()),t&2){let e=d();$e("font-size",e.size(),"px")("line-height",e.size(),"px"),l(),C(e.letter())}}var nr=(()=>{class t{kindRegistry=p(bo);kind=H.required();size=H(18);provider=H(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&&P(0,$re,1,4,"i",0)(1,Wre,2,3,":svg:svg",1)(2,Kre,2,5,"span",2)(3,Yre,2,5,"span",3),n&2){let r;R((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 AD=()=>({class:"kind-palette__content"}),LD=t=>({content:t}),Zre=(t,o)=>o.kind;function Xre(t,o){if(t&1&&(F(0,"sm-kind-icon",5),f(1,"span"),b(2),_()),t&2){let e=d().$implicit;h("kind",e.kind)("size",16),l(2),C(e.count)}}function Qre(t,o){if(t&1){let e=te();f(0,"p-togglebutton",4),A("ngModelChange",function(){let i=w(e).$implicit,r=d();return T(r.toggle(i.kind))}),S(1,Xre,3,3,"ng-template",null,0,We),_()}if(t&2){let e=o.$implicit,n=d();h("ngModel",n.isActive(e.kind))("pTooltip",e.label)("ariaLabel",e.label)("styleClass","kind-palette__btn kind-palette__btn--"+e.kind)("pt",Fe(7,LD,on(6,AD))),O("data-testid","kind-palette-"+e.kind)}}function Jre(t,o){if(t&1&&(F(0,"i",7),f(1,"span"),b(2),_()),t&2){let e=d(2);ce("pi-star-fill",e.favoritesActive())("pi-star",!e.favoritesActive()),l(2),C(e.favoritesCount())}}function eae(t,o){if(t&1){let e=te();f(0,"p-togglebutton",6),A("ngModelChange",function(){w(e);let i=d();return T(i.toggleFavoritesOnly())}),S(1,Jre,3,5,"ng-template",null,0,We),_()}if(t&2){let e=d();h("ngModel",e.favoritesActive())("pTooltip",e.texts.favorites.label)("ariaLabel",e.texts.favorites.label)("pt",Fe(5,LD,on(4,AD)))}}var BD=(()=>{class t{loader=p(Ht);filters=p(cn);kindRegistry=p(bo);texts=ND;entries=E(()=>{let e=new Map;for(let n of this.loader.nodes())e.set(n.kind,(e.get(n.kind)??0)+1);return this.kindRegistry.kinds().map(n=>({kind:n.name,label:n.label,count:e.get(n.name)??0})).filter(n=>n.count>0)});favoritesCount=E(()=>this.loader.nodes().filter(e=>e.isFavorite===!0).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&&(f(0,"div",1),he(1,Qre,3,9,"p-togglebutton",2,Zre),P(3,eae,3,7,"p-togglebutton",3),_()),n&2&&(O("aria-label",i.texts.a11y.toolbarLabel),l(),fe(i.entries()),l(2),R(i.showFavorites()?3:-1))},dependencies:[Vt,sn,ln,Jn,Qn,ze,Ve,nr],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:.65rem;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 Vn={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 tae=()=>({class:"link-kind-palette__content"}),nae=t=>({content:t}),iae=(t,o)=>o.kind;function oae(t,o){if(t&1&&b(0),t&2){let e=d(2).$implicit;Me(" ",e.text," ")}}function rae(t,o){if(t&1&&F(0,"i"),t&2){let e=d(2).$implicit;B(e.icon)}}function aae(t,o){if(t&1&&(f(0,"span",4),P(1,oae,1,1)(2,rae,1,2,"i",5),_()),t&2){let e=d().$implicit;l(),R(e.text?1:e.icon?2:-1)}}function sae(t,o){if(t&1){let e=te();f(0,"p-togglebutton",3),A("ngModelChange",function(){let i=w(e).$implicit,r=d(2);return T(r.toggle(i.kind))}),S(1,aae,3,1,"ng-template",null,0,We),_()}if(t&2){let e=o.$implicit,n=d(2);h("ngModel",n.isActive(e.kind))("pTooltip",e.tooltip)("ariaLabel",e.label)("styleClass","link-kind-palette__btn link-kind-palette__btn--"+e.kind)("pt",Fe(7,nae,on(6,tae))),O("data-testid","link-kind-palette-"+e.kind)}}function lae(t,o){if(t&1&&(f(0,"div",1),he(1,sae,3,9,"p-togglebutton",2,iae),_()),t&2){let e=d();O("aria-label",e.texts.a11y.toolbarLabel),l(),fe(e.entries())}}var VD=[{kind:"invokes",label:Vn.kinds.invokes,tooltip:Vn.tooltips.invokes,text:"/"},{kind:"references",label:Vn.kinds.references,tooltip:Vn.tooltips.references,icon:"pi pi-link"},{kind:"mentions",label:Vn.kinds.mentions,tooltip:Vn.tooltips.mentions,text:"@"},{kind:"supersedes",label:Vn.kinds.supersedes,tooltip:Vn.tooltips.supersedes,icon:"pi pi-angle-double-right"}];for(let t of VD)if(!ab.includes(t.kind))throw new Error(`link-kind-palette: unknown link kind "${t.kind}"`);var zD=(()=>{class t{loader=p(Ht);filters=p(cn);texts=Vn;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 VD.filter(r=>(e.get(r.kind)??0)>0||i.has(r.kind))});constructor(){ge(()=>{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&&P(0,lae,3,1,"div",1),n&2&&R(i.entries().length>0?0:-1)},dependencies:[Vt,sn,ln,Jn,Qn,ze,Ve],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:.65rem;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 HD={a11y:{toolbarLabel:"Toggle severity filters"},error:{label:"Errors",tooltip:"Only nodes with errors"},warn:{label:"Warnings",tooltip:"Only nodes with warnings"}};var GD=()=>({class:"severity-palette__content"}),jD=t=>({content:t});function cae(t,o){if(t&1&&(f(0,"span",5),F(1,"i",6),_(),f(2,"span",7),b(3),_()),t&2){let e=d(3);l(3),C(e.errorCount())}}function dae(t,o){if(t&1){let e=te();f(0,"p-togglebutton",4),A("ngModelChange",function(){w(e);let i=d(2);return T(i.toggle("error"))}),S(1,cae,4,1,"ng-template",null,0,We),_()}if(t&2){let e=d(2);h("ngModel",e.isActive("error"))("pTooltip",e.texts.error.tooltip)("ariaLabel",e.texts.error.label)("pt",Fe(5,jD,on(4,GD)))}}function uae(t,o){if(t&1&&(f(0,"span",5),F(1,"i",9),_(),f(2,"span",7),b(3),_()),t&2){let e=d(3);l(3),C(e.warnCount())}}function pae(t,o){if(t&1){let e=te();f(0,"p-togglebutton",8),A("ngModelChange",function(){w(e);let i=d(2);return T(i.toggle("warn"))}),S(1,uae,4,1,"ng-template",null,0,We),_()}if(t&2){let e=d(2);h("ngModel",e.isActive("warn"))("pTooltip",e.texts.warn.tooltip)("ariaLabel",e.texts.warn.label)("pt",Fe(5,jD,on(4,GD)))}}function hae(t,o){if(t&1&&(f(0,"div",1),P(1,dae,3,7,"p-togglebutton",2),P(2,pae,3,7,"p-togglebutton",3),_()),t&2){let e=d();O("aria-label",e.texts.a11y.toolbarLabel),l(),R(e.showError()?1:-1),l(),R(e.showWarn()?2:-1)}}var UD=(()=>{class t{loader=p(Ht);filters=p(cn);issuePaths=p(vo);texts=HD;visibleSet=E(()=>{let e=this.filters.apply(this.loader.nodes(),this.issuePaths.bySeverity()),n=new Set;for(let i of e)n.add(i.path);return n});rawErrorCount=E(()=>this.issuePaths.bySeverity().errors.size);rawWarnCount=E(()=>this.issuePaths.bySeverity().warns.size);errorCount=E(()=>qD(this.issuePaths.bySeverity().errors,this.visibleSet()));warnCount=E(()=>qD(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(){ge(()=>{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&&P(0,hae,3,3,"div",1),n&2&&R(i.hasAny()?0:-1)},dependencies:[Vt,sn,ln,Jn,Qn,ze,Ve],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:.65rem;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 qD(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 La(t,o){kn(La);let e=Q(null),n=0;return ge(()=>{let i=t().trim(),r=++n;e.set(null),i&&o.renderInline(i).then(a=>{r===n&&e.set(a)}).catch(()=>{r===n&&e.set(null)})}),e.asReadonly()}var fae=(t,o)=>o.step;function mae(t,o){t&1&&(f(0,"span",8),b(1),_()),t&2&&(l(),C(o))}function _ae(t,o){if(t&1&&(f(0,"span",12)(1,"span",28),b(2,"T"),_(),b(3),_()),t&2){let e=d(),n=Ie(0);h("pTooltip",e.texts.stats.tokens(n.tokensTotal)),l(3),C(e.tokensShort())}}function gae(t,o){if(t&1&&(f(0,"span",13)(1,"span",28),b(2,"B"),_(),b(3),_()),t&2){let e=d(),n=Ie(0);h("pTooltip",e.texts.stats.bytes(n.bytesTotal)),l(3),C(e.bytesShort())}}function bae(t,o){if(t&1&&(f(0,"span",29),b(1),_()),t&2){let e=o.$implicit;l(),C(e)}}function vae(t,o){if(t&1&&(f(0,"span",30),b(1),_()),t&2){let e=d(2),n=Ie(2);l(),C(e.texts.tagOverflow(n))}}function yae(t,o){if(t&1&&(f(0,"div",17),he(1,bae,2,1,"span",29,Ue),P(3,vae,2,1,"span",30),_()),t&2){d();let e=Ie(1),n=Ie(2);l(),fe(e),l(2),R(n>0?3:-1)}}function Cae(t,o){if(t&1&&(f(0,"span",34),b(1),_()),t&2){let e=o.$implicit;l(),C(e)}}function xae(t,o){if(t&1&&(f(0,"div",31)(1,"span",32),b(2),_(),f(3,"div",33),he(4,Cae,2,1,"span",34,Ue),_()()),t&2){let e=d(),n=d(2);l(),h("pTooltip",n.texts.llm.topics.tooltip),l(),C(n.texts.llm.topics.label),l(2),fe(e.topics)}}function wae(t,o){if(t&1&&(f(0,"span",34),b(1),_()),t&2){let e=o.$implicit;l(),C(e)}}function Tae(t,o){if(t&1&&(f(0,"div",31)(1,"span",32),b(2),_(),f(3,"div",33),he(4,wae,2,1,"span",34,Ue),_()()),t&2){let e=d(),n=d(2);l(),h("pTooltip",n.texts.llm.facts.tooltip),l(),C(n.texts.llm.facts.label),l(2),fe(e.keyFacts)}}function Sae(t,o){if(t&1&&(P(0,xae,6,2,"div",31),P(1,Tae,6,2,"div",31)),t&2){let e=o;R(e.topics!=null&&e.topics.length?0:-1),l(),R(e.keyFacts!=null&&e.keyFacts.length?1:-1)}}function kae(t,o){if(t&1&&(f(0,"div",31)(1,"span",32),b(2),_(),f(3,"span"),b(4),_()()),t&2){let e=d(),n=d(2);l(),h("pTooltip",n.texts.llm.when.tooltip),l(),C(n.texts.llm.when.label),l(2),C(e.whenToUse)}}function Iae(t,o){if(t&1&&(f(0,"div",31)(1,"span",32),b(2),_(),f(3,"span"),b(4),_()()),t&2){let e=d(),n=d(2);l(),h("pTooltip",n.texts.llm.style.tooltip),l(),C(n.texts.llm.style.label),l(2),C(e.interactionStyle)}}function Eae(t,o){if(t&1&&(f(0,"span",34),b(1),_()),t&2){let e=o.$implicit;l(),C(e)}}function Mae(t,o){if(t&1&&(f(0,"div",31)(1,"span",32),b(2),_(),f(3,"div",33),he(4,Eae,2,1,"span",34,Ue),_()()),t&2){let e=d(),n=d(2);l(),h("pTooltip",n.texts.llm.does.tooltip),l(),C(n.texts.llm.does.label),l(2),fe(e.capabilities)}}function Dae(t,o){if(t&1&&(P(0,kae,5,3,"div",31),P(1,Iae,5,3,"div",31),P(2,Mae,6,2,"div",31)),t&2){let e=o;R(e.whenToUse?0:-1),l(),R(e.interactionStyle?1:-1),l(),R(e.capabilities!=null&&e.capabilities.length?2:-1)}}function Pae(t,o){if(t&1&&b(0),t&2){let e=o.$implicit,n=o.$index,i=o.$count;F0("",e.step,". ",e.description,"",n===i-1?"":" \xB7 ")}}function Rae(t,o){if(t&1&&(f(0,"div",31)(1,"span",32),b(2),_(),f(3,"span"),he(4,Pae,1,3,null,null,fae),_()()),t&2){let e=d(),n=d(2);l(),h("pTooltip",n.texts.llm.steps.tooltip),l(),C(n.texts.llm.steps.label),l(2),fe(e.recipe)}}function Oae(t,o){if(t&1&&(f(0,"span",34),b(1),_()),t&2){let e=o.$implicit;l(),C(e)}}function Fae(t,o){if(t&1&&(f(0,"div",31)(1,"span",32),b(2),_(),f(3,"div",33),he(4,Oae,2,1,"span",34,Ue),_()()),t&2){let e=d(),n=d(2);l(),h("pTooltip",n.texts.llm.pre.tooltip),l(),C(n.texts.llm.pre.label),l(2),fe(e.preconditions)}}function Nae(t,o){if(t&1&&(f(0,"span",34),b(1),_()),t&2){let e=o.$implicit;l(),C(e)}}function Aae(t,o){if(t&1&&(f(0,"div",31)(1,"span",32),b(2),_(),f(3,"div",33),he(4,Nae,2,1,"span",34,Ue),_()()),t&2){let e=d(),n=d(2);l(),h("pTooltip",n.texts.llm.out.tooltip),l(),C(n.texts.llm.out.label),l(2),fe(e.outputs)}}function Lae(t,o){if(t&1&&(f(0,"span",34),b(1),_()),t&2){let e=o.$implicit;l(),C(e)}}function Bae(t,o){if(t&1&&(f(0,"div",31)(1,"span",32),b(2),_(),f(3,"div",33),he(4,Lae,2,1,"span",34,Ue),_()()),t&2){let e=d(),n=d(2);l(),h("pTooltip",n.texts.llm.fx.tooltip),l(),C(n.texts.llm.fx.label),l(2),fe(e.sideEffects)}}function Vae(t,o){if(t&1&&(P(0,Rae,6,2,"div",31),P(1,Fae,6,2,"div",31),P(2,Aae,6,2,"div",31),P(3,Bae,6,2,"div",31)),t&2){let e=o;R(e.recipe!=null&&e.recipe.length?0:-1),l(),R(e.preconditions!=null&&e.preconditions.length?1:-1),l(),R(e.outputs!=null&&e.outputs.length?2:-1),l(),R(e.sideEffects!=null&&e.sideEffects.length?3:-1)}}function zae(t,o){if(t&1&&(f(0,"div",31)(1,"span",32),b(2),_(),f(3,"code",35),b(4),_()()),t&2){let e=d(),n=d(2);l(),h("pTooltip",n.texts.llm.eg.tooltip),l(),C(n.texts.llm.eg.label),l(2),C(e.invocationExample)}}function Hae(t,o){if(t&1&&(f(0,"span",34),b(1),_()),t&2){let e=o.$implicit;l(),C(e)}}function qae(t,o){if(t&1&&(f(0,"div",31)(1,"span",32),b(2),_(),f(3,"div",33),he(4,Hae,2,1,"span",34,Ue),_()()),t&2){let e=d(),n=d(2);l(),h("pTooltip",n.texts.llm.fx.tooltip),l(),C(n.texts.llm.fx.label),l(2),fe(e.sideEffects)}}function Gae(t,o){if(t&1&&(P(0,zae,5,3,"div",31),P(1,qae,6,2,"div",31)),t&2){let e=o;R(e.invocationExample?0:-1),l(),R(e.sideEffects!=null&&e.sideEffects.length?1:-1)}}function jae(t,o){if(t&1&&(f(0,"div",22),P(1,Sae,2,2),P(2,Dae,3,3),P(3,Vae,4,4),P(4,Gae,2,2),_()),t&2){let e,n,i,r,a=d();l(),R((e=a.summaryMarkdown())?1:-1,e),l(),R((n=a.summaryAgent())?2:-1,n),l(),R((i=a.summarySkill())?3:-1,i),l(),R((r=a.summaryCommand())?4:-1,r)}}function Uae(t,o){if(t&1&&F(0,"div",23),t&2){let e=d();h("innerHTML",e.descriptionHtml(),sr)}}function $ae(t,o){if(t&1&&(f(0,"div",36)(1,"div",37)(2,"span",38),b(3),_(),f(4,"span",39),b(5),_()()()),t&2){let e=d(),n=d();l(3),C(n.texts.meta.model),l(2),C(e.model)}}function Wae(t,o){t&1&&P(0,$ae,6,2,"div",36),t&2&&R(o.model?0:-1)}var Kae={selected:!1,highlighted:!1,dimmed:!1},$D=(()=>{class t{node=H.required();stats=H({linksIn:0,linksOut:0});summary=H(null);selection=H(Kae);isFavorite=H(!1);favoriteToggle=bt();texts=Hn;expanded=Mi(!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(()=>this.agentVendorColor());kindRegistry=p(bo);markdown=p(_s);providerAccent=E(()=>null);bytesShort=E(()=>{let e=this.stats().bytesTotal;return e===void 0?null:_r(e)});tokensShort=E(()=>{let e=this.stats().tokensTotal;return e===void 0?null:_r(e)});version=E(()=>os(this.node()));stability=E(()=>ho(this.node()));tagChips=E(()=>as(this.node()));visibleTagChips=E(()=>this.tagChips().slice(0,3));moreTagsCount=E(()=>Math.max(0,this.tagChips().length-3));agentVendorColor=E(()=>{let e=this.node();if(e.kind!=="agent")return null;let i=e.frontmatter.color;return typeof i=="string"&&i.length>0?i:null});displayName=E(()=>{let e=this.node().frontmatter;return e.name?e.name:ps(this.node().path)});description=E(()=>this.node().frontmatter.description??"");descriptionHtml=La(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:17,hostBindings:function(n,i){n&2&&(O("data-kind",i.node().kind),$e("--node-color",i.nodeColor())("--accent",i.providerAccent()),ce("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&&(Wt(0)(1)(2),f(3,"div",0)(4,"div",1),F(5,"sm-kind-icon",2),_(),f(6,"div",3)(7,"div",4)(8,"span",5),b(9),_(),F(10,"sm-view-contributions-host",6),_()(),f(11,"div",7),P(12,mae,2,1,"span",8),f(13,"button",9),A("click",function(a){return i.toggleExpanded(a)}),F(14,"i",10),_()(),f(15,"div",11),P(16,_ae,4,2,"span",12),P(17,gae,4,2,"span",13),f(18,"button",14),A("click",function(a){return i.toggleFavorite(a)}),F(19,"i",15),_(),F(20,"sm-view-contributions-host",16),_()(),P(21,yae,4,1,"div",17),f(22,"div",18)(23,"div",19),F(24,"i",20),f(25,"span",21),b(26),_()(),P(27,jae,5,4,"div",22),P(28,Uae,1,1,"div",23),P(29,Wae,1,1),_(),f(30,"div",24),F(31,"sm-view-contributions-host",25),f(32,"div",26),F(33,"sm-view-contributions-host",27),_()()),n&2){let r,a,s=i.node();Mt(i.stats()),l();let c=Mt(i.visibleTagChips());l(),Mt(i.moreTagsCount()),l(3),h("kind",s.kind)("provider",s.provider)("size",18),l(3),h("pTooltip",i.displayName()),l(),C(i.displayName()),l(),h("node",i.node()),l(2),R((r=i.version())?12:-1,r),l(),O("aria-label",i.texts.ariaExpand),l(3),R(i.tokensShort()!==null?16:-1),l(),R(i.bytesShort()!==null?17:-1),l(),ce("sm-gnode__favorite--on",i.isFavorite()),h("pTooltip",i.isFavorite()?i.texts.favoriteRemoveTooltip:i.texts.favoriteAddTooltip),O("aria-label",i.isFavorite()?i.texts.ariaFavoriteRemove:i.texts.ariaFavoriteAdd),l(),ce("pi-star-fill",i.isFavorite())("pi-star",!i.isFavorite()),l(),h("node",i.node()),l(),R(c.length?21:-1),l(2),h("pTooltip",s.path),l(3),C(s.path),l(),R(i.hasLlmCluster()?27:-1),l(),R(i.description()?28:-1),l(),R((a=i.fmAgent())?29:-1,a),l(2),h("node",i.node()),l(2),h("node",i.node())}},dependencies:[nr,ze,Ve,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:8px;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:8px;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 WD={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 Yae=["sparkline"],Zae=()=>({class:"perf-hud__content"}),Xae=t=>({content:t});function Qae(t,o){if(t&1&&(f(0,"span",9),b(1),_()),t&2){let e=d(2);l(),C(e.texts.units.mb(e.heapMb()))}}function Jae(t,o){if(t&1&&(f(0,"div",3)(1,"span",4),b(2),_()(),f(3,"div",5)(4,"div",6)(5,"div",7),F(6,"canvas",8,1),f(8,"span",9),b(9),_()(),f(10,"div",10)(11,"div",11),P(12,Qae,2,1,"span",9),f(13,"span",9),b(14),_(),f(15,"span",9),b(16),_()()(),f(17,"div",10)(18,"div",11)(19,"span",9),b(20),_(),f(21,"span",9),b(22),_()()()()()),t&2){let e=d();l(2),C(e.texts.units.fps(e.fps())),l(),O("aria-hidden",!e.expanded()),l(6),C(e.texts.units.ms(e.frameTimeMs())),l(3),R(e.hasHeap()?12:-1),l(2),C(e.texts.units.domNodes(e.domNodes())),l(2),C(e.texts.units.longTasks(e.longTasks())),l(4),C(e.texts.units.nodes(e.visible(),e.total())),l(2),C(e.texts.units.links(e.edges()))}}var ese=30,g0=60,_f=14,KD=(()=>{class t{visible=H(0);total=H(0);edges=H(0);texts=WD;destroyRef=p(Et);zone=p(nn);fps=Q(0);frameTimeMs=Q(0);fpsSamples=Q([]);sparklineCanvas=at("sparkline");heapMb=Q(null);longTasks=Q(0);domNodes=Q(0);expanded=Q(tse());hasHeap=E(()=>this.heapMb()!==null);constructor(){let e=0,n=0,i=performance.now(),r=i,a=0,s=u=>{let m=u-i;if(i=u,e+=1,n+=m,u-r>=1e3){let g=(u-r)/1e3,x=Math.round(e/g);this.fps.set(x),this.frameTimeMs.set(Math.round(n/Math.max(e,1))),this.heapMb.set(ise()),this.domNodes.set(document.querySelectorAll("*").length),this.fpsSamples.update(I=>{let k=I.length>=ese?I.slice(1):I.slice();return k.push(x),k}),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(m=>m+u.getEntries().length)}),c.observe({type:"longtask",buffered:!0})}catch{}this.destroyRef.onDestroy(()=>{cancelAnimationFrame(a),c?.disconnect()}),ge(()=>{let u=this.sparklineCanvas(),m=this.fpsSamples();u&&ose(u.nativeElement,m)})}setExpanded(e){this.expanded.set(e),nse(e)}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=z({type:t,selectors:[["sm-perf-hud"]],viewQuery:function(n,i){n&1&&vn(i.sparklineCanvas,Yae,5),n&2&&$t()},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&&(f(0,"p-togglebutton",2),A("ngModelChange",function(a){return i.setExpanded(a)}),S(1,Jae,23,8,"ng-template",null,0,We),_()),n&2&&h("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",Fe(5,Xae,on(4,Zae)))},dependencies:[Vt,sn,ln,Jn,Qn],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})(),YD="sm.perf-hud.expanded";function tse(){try{return localStorage.getItem(YD)==="1"}catch{return!1}}function nse(t){try{localStorage.setItem(YD,t?"1":"0")}catch{}}function ise(){let t=performance.memory;return t?Math.round(t.usedJSHeapSize/1024/1024):null}function ose(t,o){let e=window.devicePixelRatio||1,n=g0*e,i=_f*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,g0,_f),o.length<2))return;let a=Math.max(60,...o),s=g0/(o.length-1);r.beginPath();for(let c=0;c<o.length;c+=1){let u=c*s,m=_f-o[c]/a*_f;c===0?r.moveTo(u,m):r.lineTo(u,m)}r.strokeStyle=getComputedStyle(t).color,r.lineWidth=1,r.stroke()}var rse="debug-perf",ZD=(()=>{class t{visible=Q(this.resolveInitial());resolveInitial(){let n=new URLSearchParams(window.location.search).get(rse);return n==="1"||n==="true"?!0:n==="0"||n==="false"?!1:tr.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."},sections:{annotations:"Annotations",connections:"Connections",findings:"Findings",audit:"Audit",plugins:"Plugin contributions",viewContributions:"View contributions",debug:"Debug",body:"Body"},body:{loading:"Loading body\u2026",empty:"This file has no body content (only frontmatter).",unavailable:"Body content unavailable. The source file may have moved or been deleted since the last scan.",renderError:"Failed to render markdown body.",refreshLabel:"Refresh body"},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:{headerSummary:(t,o)=>`last bumped ${t} by ${o}`,headerEmpty:"never bumped",fields:{lastBumpedAt:"Last bumped",lastBumpedBy:"by",createdAt:"Created",createdBy:"by"}},supersededByBanner:t=>`Superseded by ${t}`,debugToggleAriaLabel:"Toggle debug panel",debugToggleTooltip:"Show diagnostic fields (hash diffs, resolved provider/kind, sidecar status enum).",actionMocks:{label:"Actions",summary:"Generate summary",audit:"Run audit",validate:"Validate"}};var XD=(()=>{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 QD=`
2207
- .p-chip {
2208
- display: inline-flex;
2209
- align-items: center;
2210
- background: dt('chip.background');
2211
- color: dt('chip.color');
2212
- border-radius: dt('chip.border.radius');
2213
- padding-block: dt('chip.padding.y');
2214
- padding-inline: dt('chip.padding.x');
2215
- gap: dt('chip.gap');
2216
- }
2217
-
2218
- .p-chip-icon {
2219
- color: dt('chip.icon.color');
2220
- font-size: dt('chip.icon.size');
2221
- width: dt('chip.icon.size');
2222
- height: dt('chip.icon.size');
2223
- }
2224
-
2225
- .p-chip-image {
2226
- border-radius: 50%;
2227
- width: dt('chip.image.width');
2228
- height: dt('chip.image.height');
2229
- margin-inline-start: calc(-1 * dt('chip.padding.y'));
2230
- }
2231
-
2232
- .p-chip:has(.p-chip-remove-icon) {
2233
- padding-inline-end: dt('chip.padding.y');
2234
- }
2235
-
2236
- .p-chip:has(.p-chip-image) {
2237
- padding-block-start: calc(dt('chip.padding.y') / 2);
2238
- padding-block-end: calc(dt('chip.padding.y') / 2);
2239
- }
2240
-
2241
- .p-chip-remove-icon {
2242
- cursor: pointer;
2243
- font-size: dt('chip.remove.icon.size');
2244
- width: dt('chip.remove.icon.size');
2245
- height: dt('chip.remove.icon.size');
2246
- color: dt('chip.remove.icon.color');
2247
- border-radius: 50%;
2248
- transition:
2249
- outline-color dt('chip.transition.duration'),
2250
- box-shadow dt('chip.transition.duration');
2251
- outline-color: transparent;
2252
- }
2253
-
2254
- .p-chip-remove-icon:focus-visible {
2255
- box-shadow: dt('chip.remove.icon.focus.ring.shadow');
2256
- outline: dt('chip.remove.icon.focus.ring.width') dt('chip.remove.icon.focus.ring.style') dt('chip.remove.icon.focus.ring.color');
2257
- outline-offset: dt('chip.remove.icon.focus.ring.offset');
2258
- }
2259
- `;var ase=["removeicon"],sse=["*"];function lse(t,o){if(t&1){let e=te();f(0,"img",4),A("error",function(i){w(e);let r=d();return T(r.imageError(i))}),_()}if(t&2){let e=d();B(e.cx("image")),h("pBind",e.ptm("image"))("src",e.image,Ei)("alt",e.alt)}}function cse(t,o){if(t&1&&F(0,"span",6),t&2){let e=d(2);B(e.icon),h("pBind",e.ptm("icon"))("ngClass",e.cx("icon"))}}function dse(t,o){if(t&1&&S(0,cse,1,4,"span",5),t&2){let e=d();h("ngIf",e.icon)}}function use(t,o){if(t&1&&(f(0,"div",7),b(1),_()),t&2){let e=d();B(e.cx("label")),h("pBind",e.ptm("label")),l(),C(e.label)}}function pse(t,o){if(t&1){let e=te();f(0,"span",11),A("click",function(i){w(e);let r=d(3);return T(r.close(i))})("keydown",function(i){w(e);let r=d(3);return T(r.onKeydown(i))}),_()}if(t&2){let e=d(3);B(e.removeIcon),h("pBind",e.ptm("removeIcon"))("ngClass",e.cx("removeIcon")),O("tabindex",e.disabled?-1:0)("aria-label",e.removeAriaLabel)}}function hse(t,o){if(t&1){let e=te();K(),f(0,"svg",12),A("click",function(i){w(e);let r=d(3);return T(r.close(i))})("keydown",function(i){w(e);let r=d(3);return T(r.onKeydown(i))}),_()}if(t&2){let e=d(3);B(e.cx("removeIcon")),h("pBind",e.ptm("removeIcon")),O("tabindex",e.disabled?-1:0)("aria-label",e.removeAriaLabel)}}function fse(t,o){if(t&1&&(se(0),S(1,pse,1,6,"span",9)(2,hse,1,5,"svg",10),le()),t&2){let e=d(2);l(),h("ngIf",e.removeIcon),l(),h("ngIf",!e.removeIcon)}}function mse(t,o){}function _se(t,o){t&1&&S(0,mse,0,0,"ng-template")}function gse(t,o){if(t&1){let e=te();f(0,"span",13),A("click",function(i){w(e);let r=d(2);return T(r.close(i))})("keydown",function(i){w(e);let r=d(2);return T(r.onKeydown(i))}),S(1,_se,1,0,null,14),_()}if(t&2){let e=d(2);B(e.cx("removeIcon")),h("pBind",e.ptm("removeIcon")),O("tabindex",e.disabled?-1:0)("aria-label",e.removeAriaLabel),l(),h("ngTemplateOutlet",e.removeIconTemplate||e._removeIconTemplate)}}function bse(t,o){if(t&1&&(se(0),S(1,fse,3,2,"ng-container",3)(2,gse,2,6,"span",8),le()),t&2){let e=d();l(),h("ngIf",!e.removeIconTemplate&&!e._removeIconTemplate),l(),h("ngIf",e.removeIconTemplate||e._removeIconTemplate)}}var vse={root:({instance:t})=>({display:!t.visible&&"none"})},yse={root:({instance:t})=>["p-chip p-component",{"p-disabled":t.disabled}],image:"p-chip-image",icon:"p-chip-icon",label:"p-chip-label",removeIcon:"p-chip-remove-icon"},JD=(()=>{class t extends dt{name="chip";style=QD;classes=yse;inlineStyles=vse;static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})();var eP=new ue("CHIP_INSTANCE"),b0=(()=>{class t extends Ot{componentName="Chip";$pcChip=p(eP,{optional:!0,skipSelf:!0})??void 0;bindDirectiveInstance=p(de,{self:!0});onAfterViewChecked(){this.bindDirectiveInstance.setAttrs(this.ptms(["host","root"]))}label;icon;image;alt;styleClass;disabled=!1;removable=!1;removeIcon;onRemove=new ie;onImageError=new ie;visible=!0;get removeAriaLabel(){return this.config.getTranslation(Bt.ARIA).removeLabel}get chipProps(){return this._chipProps}set chipProps(e){this._chipProps=e,e&&typeof e=="object"&&Object.entries(e).forEach(([n,i])=>this[`_${n}`]!==i&&(this[`_${n}`]=i))}_chipProps;_componentStyle=p(JD);removeIconTemplate;templates;_removeIconTemplate;onAfterContentInit(){this.templates.forEach(e=>{e.getType()==="removeicon"?this._removeIconTemplate=e.template:this._removeIconTemplate=e.template})}onChanges(e){if(e.chipProps&&e.chipProps.currentValue){let{currentValue:n}=e.chipProps;n.label!==void 0&&(this.label=n.label),n.icon!==void 0&&(this.icon=n.icon),n.image!==void 0&&(this.image=n.image),n.alt!==void 0&&(this.alt=n.alt),n.styleClass!==void 0&&(this.styleClass=n.styleClass),n.removable!==void 0&&(this.removable=n.removable),n.removeIcon!==void 0&&(this.removeIcon=n.removeIcon)}}close(e){this.visible=!1,this.onRemove.emit(e)}onKeydown(e){(e.key==="Enter"||e.key==="Backspace")&&this.close(e)}imageError(e){this.onImageError.emit(e)}get dataP(){return this.cn({removable:this.removable})}static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275cmp=z({type:t,selectors:[["p-chip"]],contentQueries:function(n,i,r){if(n&1&&wt(r,ase,4)(r,Ke,4),n&2){let a;U(a=$())&&(i.removeIconTemplate=a.first),U(a=$())&&(i.templates=a)}},hostVars:6,hostBindings:function(n,i){n&2&&(O("aria-label",i.label)("data-p",i.dataP),St(i.sx("root")),B(i.cn(i.cx("root"),i.styleClass)))},inputs:{label:"label",icon:"icon",image:"image",alt:"alt",styleClass:"styleClass",disabled:[2,"disabled","disabled",G],removable:[2,"removable","removable",G],removeIcon:"removeIcon",chipProps:"chipProps"},outputs:{onRemove:"onRemove",onImageError:"onImageError"},features:[ve([JD,{provide:eP,useExisting:t},{provide:ut,useExisting:t}]),lt([de]),Y],ngContentSelectors:sse,decls:6,vars:4,consts:[["iconTemplate",""],[3,"pBind","class","src","alt","error",4,"ngIf","ngIfElse"],[3,"pBind","class",4,"ngIf"],[4,"ngIf"],[3,"error","pBind","src","alt"],[3,"pBind","class","ngClass",4,"ngIf"],[3,"pBind","ngClass"],[3,"pBind"],["role","button",3,"pBind","class","click","keydown",4,"ngIf"],["role","button",3,"pBind","class","ngClass","click","keydown",4,"ngIf"],["data-p-icon","times-circle","role","button",3,"pBind","class","click","keydown",4,"ngIf"],["role","button",3,"click","keydown","pBind","ngClass"],["data-p-icon","times-circle","role","button",3,"click","keydown","pBind"],["role","button",3,"click","keydown","pBind"],[4,"ngTemplateOutlet"]],template:function(n,i){if(n&1&&(Rt(),Ae(0),S(1,lse,1,5,"img",1)(2,dse,1,1,"ng-template",null,0,We)(4,use,2,4,"div",2)(5,bse,3,2,"ng-container",3)),n&2){let r=Lt(3);l(),h("ngIf",i.image)("ngIfElse",r),l(3),h("ngIf",i.label),l(),h("ngIf",i.removable)}},dependencies:[ot,an,kt,xt,Zb,Se,de],encapsulation:2,changeDetection:0})}return t})(),gf=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=nt({type:t});static \u0275inj=tt({imports:[b0,Se,Se]})}return t})();var tP=`
2260
- .p-tag {
2261
- display: inline-flex;
2262
- align-items: center;
2263
- justify-content: center;
2264
- background: dt('tag.primary.background');
2265
- color: dt('tag.primary.color');
2266
- font-size: dt('tag.font.size');
2267
- font-weight: dt('tag.font.weight');
2268
- padding: dt('tag.padding');
2269
- border-radius: dt('tag.border.radius');
2270
- gap: dt('tag.gap');
2271
- }
2272
-
2273
- .p-tag-icon {
2274
- font-size: dt('tag.icon.size');
2275
- width: dt('tag.icon.size');
2276
- height: dt('tag.icon.size');
2277
- }
2278
-
2279
- .p-tag-rounded {
2280
- border-radius: dt('tag.rounded.border.radius');
2281
- }
2282
-
2283
- .p-tag-success {
2284
- background: dt('tag.success.background');
2285
- color: dt('tag.success.color');
2286
- }
2287
-
2288
- .p-tag-info {
2289
- background: dt('tag.info.background');
2290
- color: dt('tag.info.color');
2291
- }
2292
-
2293
- .p-tag-warn {
2294
- background: dt('tag.warn.background');
2295
- color: dt('tag.warn.color');
2296
- }
2297
-
2298
- .p-tag-danger {
2299
- background: dt('tag.danger.background');
2300
- color: dt('tag.danger.color');
2301
- }
2302
-
2303
- .p-tag-secondary {
2304
- background: dt('tag.secondary.background');
2305
- color: dt('tag.secondary.color');
2306
- }
2307
-
2308
- .p-tag-contrast {
2309
- background: dt('tag.contrast.background');
2310
- color: dt('tag.contrast.color');
2311
- }
2312
- `;var xse=["icon"],wse=["*"];function Tse(t,o){if(t&1&&F(0,"span",4),t&2){let e=d(2);B(e.cx("icon")),h("ngClass",e.icon)("pBind",e.ptm("icon"))}}function Sse(t,o){if(t&1&&(se(0),S(1,Tse,1,4,"span",3),le()),t&2){let e=d();l(),h("ngIf",e.icon)}}function kse(t,o){}function Ise(t,o){t&1&&S(0,kse,0,0,"ng-template")}function Ese(t,o){if(t&1&&(f(0,"span",2),S(1,Ise,1,0,null,5),_()),t&2){let e=d();B(e.cx("icon")),h("pBind",e.ptm("icon")),l(),h("ngTemplateOutlet",e.iconTemplate||e._iconTemplate)}}var Mse={root:({instance:t})=>["p-tag p-component",{"p-tag-info":t.severity==="info","p-tag-success":t.severity==="success","p-tag-warn":t.severity==="warn","p-tag-danger":t.severity==="danger","p-tag-secondary":t.severity==="secondary","p-tag-contrast":t.severity==="contrast","p-tag-rounded":t.rounded}],icon:"p-tag-icon",label:"p-tag-label"},nP=(()=>{class t extends dt{name="tag";style=tP;classes=Mse;static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})();var iP=new ue("TAG_INSTANCE"),Ba=(()=>{class t extends Ot{componentName="Tag";$pcTag=p(iP,{optional:!0,skipSelf:!0})??void 0;bindDirectiveInstance=p(de,{self:!0});onAfterViewChecked(){this.bindDirectiveInstance.setAttrs(this.ptms(["host","root"]))}styleClass;severity;value;icon;rounded;iconTemplate;templates;_iconTemplate;_componentStyle=p(nP);onAfterContentInit(){this.templates?.forEach(e=>{e.getType()==="icon"&&(this._iconTemplate=e.template)})}get dataP(){return this.cn({rounded:this.rounded,[this.severity]:this.severity})}static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275cmp=z({type:t,selectors:[["p-tag"]],contentQueries:function(n,i,r){if(n&1&&wt(r,xse,4)(r,Ke,4),n&2){let a;U(a=$())&&(i.iconTemplate=a.first),U(a=$())&&(i.templates=a)}},hostVars:3,hostBindings:function(n,i){n&2&&(O("data-p",i.dataP),B(i.cn(i.cx("root"),i.styleClass)))},inputs:{styleClass:"styleClass",severity:"severity",value:"value",icon:"icon",rounded:[2,"rounded","rounded",G]},features:[ve([nP,{provide:iP,useExisting:t},{provide:ut,useExisting:t}]),lt([de]),Y],ngContentSelectors:wse,decls:5,vars:6,consts:[[4,"ngIf"],[3,"class","pBind",4,"ngIf"],[3,"pBind"],[3,"class","ngClass","pBind",4,"ngIf"],[3,"ngClass","pBind"],[4,"ngTemplateOutlet"]],template:function(n,i){n&1&&(Rt(),Ae(0),S(1,Sse,2,1,"ng-container",0)(2,Ese,2,4,"span",1),f(3,"span",2),b(4),_()),n&2&&(l(),h("ngIf",!i.iconTemplate&&!i._iconTemplate),l(),h("ngIf",i.iconTemplate||i._iconTemplate),l(),B(i.cx("label")),h("pBind",i.ptm("label")),l(),C(i.value))},dependencies:[ot,an,kt,xt,Se,de],encapsulation:2,changeDetection:0})}return t})(),bf=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=nt({type:t});static \u0275inj=tt({imports:[Ba,Se,Se]})}return t})();var rP={cardHeader:"Annotations",emptyOverlay:"No sidecar (.sm) file present for this node.",emptyAnnotations:"Sidecar present but no annotations are declared yet.",sections:{lifecycle:"Lifecycle",supersession:"Supersession",provenance:"Provenance",taxonomy:"Taxonomy",docs:"Docs"},fields:{version:"Version",stability:"Stability",supersedes:"Supersedes",supersededBy:"Superseded by",authors:"Authors",license:"License",source:"Source",sourceVersion:"Source version",tags:"Tags",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}}var Dse=(t,o)=>"u:"+o;function Pse(t,o){if(t&1&&(f(0,"p",1),b(1),_()),t&2){let e=d(2);l(),C(e.texts.emptyOverlay)}}function Rse(t,o){if(t&1&&(f(0,"p",2),b(1),_()),t&2){let e=d(2);l(),C(e.texts.emptyAnnotations)}}function Ose(t,o){if(t&1&&P(0,Pse,2,1,"p",1)(1,Rse,2,1,"p",2),t&2){let e,n=d();R((e=n.overlay())!=null&&e.present?1:0)}}function Fse(t,o){if(t&1&&(f(0,"code",4),b(1),_()),t&2){d();let e=Ie(0);l(),Me("v",e.version)}}function Nse(t,o){if(t&1&&F(0,"p-tag",5),t&2){d();let e=Ie(0),n=d(2);h("value",e.stability)("severity",n.stabilitySeverity(e.stability))("rounded",!0)}}function Ase(t,o){if(t&1&&(Wt(0),f(1,"dt"),b(2),_(),f(3,"dd",3),P(4,Fse,2,1,"code",4),P(5,Nse,1,3,"p-tag",5),_()),t&2){let e=d(2),n=Mt(e.lifecycle());l(2),C(e.texts.sections.lifecycle),l(2),R(n.version!==null?4:-1),l(),R(n.stability!==null?5:-1)}}function Lse(t,o){if(t&1){let e=te();f(0,"span",7),F(1,"i",8),f(2,"span"),b(3),_()(),f(4,"p-chip",9),A("click",function(){w(e),d();let i=Ie(0),r=d(2);return T(r.onOpenPath(i.supersededBy))}),_()}if(t&2){d();let e=Ie(0),n=d(2);l(3),C(n.texts.fields.supersededBy),l(),h("label",e.supersededBy)("styleClass",n.isBroken(e.supersededBy)?"chip--broken":"chip--link")("pTooltip",n.isBroken(e.supersededBy)?n.texts.brokenRefTooltip:"")}}function Bse(t,o){if(t&1){let e=te();f(0,"p-chip",9),A("click",function(){let i=w(e).$implicit,r=d(4);return T(r.onOpenPath(i))}),_()}if(t&2){let e=o.$implicit,n=d(4);h("label",e)("styleClass",n.isBroken(e)?"chip--broken":"chip--link")("pTooltip",n.isBroken(e)?n.texts.brokenRefTooltip:"")}}function Vse(t,o){if(t&1&&(f(0,"span",7),F(1,"i",10),f(2,"span"),b(3),_()(),he(4,Bse,1,3,"p-chip",11,Ue)),t&2){d();let e=Ie(0),n=d(2);l(3),C(n.texts.fields.supersedes),l(),fe(e.supersedes)}}function zse(t,o){if(t&1&&(Wt(0),f(1,"dt"),b(2),_(),f(3,"dd",6),P(4,Lse,5,4),P(5,Vse,6,1),_()),t&2){let e=d(2),n=Mt(e.supersession());l(2),C(e.texts.sections.supersession),l(2),R(n.supersededBy!==null?4:-1),l(),R(n.supersedes.length?5:-1)}}function Hse(t,o){if(t&1&&(f(0,"span",7),F(1,"i",13),f(2,"span"),b(3),_()()),t&2){let e=o.$implicit;l(3),C(e)}}function qse(t,o){if(t&1&&he(0,Hse,4,1,"span",7,Ue),t&2){d();let e=Ie(0);fe(e.authors)}}function Gse(t,o){if(t&1&&(f(0,"span",7),F(1,"i",14),f(2,"span"),b(3),_()()),t&2){d();let e=Ie(0);l(3),C(e.license)}}function jse(t,o){if(t&1&&(f(0,"span",7),F(1,"i",15),f(2,"a",16),b(3),_()()),t&2){d();let e=Ie(0);l(2),h("href",e.source,Ei),l(),C(e.source)}}function Use(t,o){if(t&1&&(f(0,"span",7),F(1,"i",17),f(2,"code"),b(3),_()()),t&2){d();let e=Ie(0);l(3),C(e.sourceVersion)}}function $se(t,o){if(t&1&&(Wt(0),f(1,"dt"),b(2),_(),f(3,"dd",12),P(4,qse,2,0),P(5,Gse,4,1,"span",7),P(6,jse,4,2,"span",7),P(7,Use,4,1,"span",7),_()),t&2){let e=d(2),n=Mt(e.provenance());l(2),C(e.texts.sections.provenance),l(2),R(n.authors.length?4:-1),l(),R(n.license!==null?5:-1),l(),R(n.source!==null?6:-1),l(),R(n.sourceVersion!==null?7:-1)}}function Wse(t,o){if(t&1){let e=te();f(0,"p-chip",21),A("click",function(){let i=w(e).$implicit,r=d(3);return T(r.tagClick.emit(i))})("keydown.enter",function(){let i=w(e).$implicit,r=d(3);return T(r.tagClick.emit(i))})("keydown.space",function(i){let r=w(e).$implicit;return d(3).tagClick.emit(r),T(i.preventDefault())}),_()}if(t&2){let e=o.$implicit,n=d(3);h("label",e)("styleClass","ann-panel__chip ann-panel__chip--user"+(n.isActiveTag(e)?" ann-panel__chip--active":""))}}function Kse(t,o){if(t&1&&(f(0,"dt"),b(1),_(),f(2,"dd",18)(3,"div",19),he(4,Wse,1,2,"p-chip",20,Dse),_()()),t&2){let e=d(2),n=e.taxonomy();l(),C(e.texts.fields.tags),l(3),fe(n.userTags)}}function Yse(t,o){if(t&1&&(f(0,"span",7),F(1,"i",23),f(2,"a",16),b(3),_()()),t&2){d();let e=Ie(0);l(2),h("href",e.docsUrl,Ei),l(),C(e.docsUrl)}}function Zse(t,o){if(t&1&&(Wt(0),f(1,"dt"),b(2),_(),f(3,"dd",22),P(4,Yse,4,2,"span",7),_()),t&2){let e=d(2),n=Mt(e.docs());l(2),C(e.texts.sections.docs),l(2),R(n.docsUrl!==null?4:-1)}}function Xse(t,o){if(t&1&&(f(0,"dl",0),P(1,Ase,6,4),P(2,zse,6,4),P(3,$se,8,6),P(4,Kse,6,1),P(5,Zse,5,3),_()),t&2){let e=d();l(),R(e.hasLifecycle()?1:-1),l(),R(e.hasSupersession()?2:-1),l(),R(e.hasProvenance()?3:-1),l(),R(e.hasTaxonomy()?4:-1),l(),R(e.hasDocs()?5:-1)}}var aP=(()=>{class t{overlay=H(void 0);knownPaths=H(null);openPath=bt();tagClick=bt();activeTag=H(null);isActiveTag(e){return this.activeTag()===e}texts=rP;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.hasLifecycle()||this.hasSupersession()||this.hasProvenance()||this.hasTaxonomy()||this.hasDocs());lifecycle=E(()=>{let e=this.annotations()??{};return{version:Qse(e.version),stability:Jse(e.stability)}});hasLifecycle=E(()=>vf(this.lifecycle()));supersession=E(()=>{let e=this.annotations()??{};return{supersedes:y0(e.supersedes),supersededBy:v0(e.supersededBy)}});hasSupersession=E(()=>vf(this.supersession()));provenance=E(()=>{let e=this.annotations()??{};return{authors:y0(e.authors),license:v0(e.license),source:Va(e.source),sourceVersion:v0(e.sourceVersion)}});hasProvenance=E(()=>vf(this.provenance()));taxonomy=E(()=>{let e=this.annotations()??{};return{userTags:y0(e.tags)}});hasTaxonomy=E(()=>this.taxonomy().userTags.length>0);docs=E(()=>{let e=this.annotations()??{};return{docsUrl:Va(e.docsUrl)}});hasDocs=E(()=>vf(this.docs()));stabilitySeverity(e){return ws[e]}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"],activeTag:[1,"activeTag"]},outputs:{openPath:"openPath",tagClick:"tagClick"},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-lifecycle",1,"ann-panel__inline"],["data-testid","annotations-version"],["data-testid","annotations-stability",3,"value","severity","rounded"],["data-testid","annotations-section-supersession",1,"ann-panel__inline"],[1,"ann-panel__meta"],["aria-hidden","true",1,"pi","pi-arrow-down"],[3,"click","label","styleClass","pTooltip"],["aria-hidden","true",1,"pi","pi-arrow-up"],[3,"label","styleClass","pTooltip"],["data-testid","annotations-section-provenance",1,"ann-panel__inline"],["aria-hidden","true",1,"pi","pi-user"],["aria-hidden","true",1,"pi","pi-shield"],["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-taxonomy",1,"ann-panel__chips"],["data-testid","annotations-tags",1,"ann-panel__chips-row"],["data-tag-source","user","role","button","tabindex","0",3,"label","styleClass"],["data-tag-source","user","role","button","tabindex","0",3,"click","keydown.enter","keydown.space","label","styleClass"],["data-testid","annotations-section-docs",1,"ann-panel__inline"],["aria-hidden","true",1,"pi","pi-external-link"]],template:function(n,i){n&1&&P(0,Ose,2,1)(1,Xse,6,5,"dl",0),n&2&&R(i.hasAnyContent()?1:0)},dependencies:[gf,b0,bf,Ba,ze,Ve],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}.ann-panel__inline[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:center;gap:.45rem .65rem;row-gap:.35rem}.ann-panel__meta[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.3rem;font-size:.83rem;color:var(--p-text-color)}.ann-panel__meta[_ngcontent-%COMP%] .pi[_ngcontent-%COMP%]{color:var(--p-text-muted-color);font-size:.85rem}.ann-panel__meta[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:var(--p-primary-color);word-break:break-all}.ann-panel__meta[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{background:var(--sm-bg-hover);padding:.05rem .35rem;border-radius:var(--sm-radius-sm);font-size:.78rem}.ann-panel__chips[_ngcontent-%COMP%]{display:flex;align-items:center;flex-wrap:wrap}.ann-panel__chips-row[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:.3rem}[_nghost-%COMP%] .chip--broken{background:var(--sm-bg-hover);color:var(--sm-text-muted);text-decoration:line-through;cursor:not-allowed}[_nghost-%COMP%] .chip--link{cursor:pointer;background:var(--p-primary-50);color:var(--p-primary-color);transition:background .15s ease}[_nghost-%COMP%] .chip--link:hover{background:var(--p-primary-100)}[_nghost-%COMP%] .ann-panel__chip--user{background:var(--p-chip-background);color:var(--p-chip-color);cursor:pointer;transition:filter .1s ease,box-shadow .1s ease}[_nghost-%COMP%] .ann-panel__chip--user:hover{filter:brightness(1.05)}[_nghost-%COMP%] .ann-panel__chip--user:focus-visible{outline:2px solid var(--p-primary-color);outline-offset:1px}[_nghost-%COMP%] .ann-panel__chip--active{background:var(--p-primary-color);color:var(--p-primary-color-text);border-color:var(--p-primary-color);box-shadow:0 0 0 2px var(--p-primary-color-200)}"],changeDetection:0})}return t})();function Qse(t){return typeof t=="number"&&Number.isFinite(t)?t:null}function v0(t){return typeof t=="string"&&t.length>0?t:null}function Jse(t){return t==="stable"||t==="experimental"||t==="deprecated"?t:null}function y0(t){return Array.isArray(t)?t.filter(o=>typeof o=="string"&&o.length>0):[]}function vf(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 sP=`
2313
- .p-card {
2314
- background: dt('card.background');
2315
- color: dt('card.color');
2316
- box-shadow: dt('card.shadow');
2317
- border-radius: dt('card.border.radius');
2318
- display: flex;
2319
- flex-direction: column;
2320
- }
2321
-
2322
- .p-card-caption {
2323
- display: flex;
2324
- flex-direction: column;
2325
- gap: dt('card.caption.gap');
2326
- }
2327
-
2328
- .p-card-body {
2329
- padding: dt('card.body.padding');
2330
- display: flex;
2331
- flex-direction: column;
2332
- gap: dt('card.body.gap');
2333
- }
2334
-
2335
- .p-card-title {
2336
- font-size: dt('card.title.font.size');
2337
- font-weight: dt('card.title.font.weight');
2338
- }
2339
-
2340
- .p-card-subtitle {
2341
- color: dt('card.subtitle.color');
2342
- }
2343
- `;var ele=["header"],tle=["title"],nle=["subtitle"],ile=["content"],ole=["footer"],rle=["*",[["p-header"]],[["p-footer"]]],ale=["*","p-header","p-footer"];function sle(t,o){t&1&&me(0)}function lle(t,o){if(t&1&&(f(0,"div",1),Ae(1,1),S(2,sle,1,0,"ng-container",2),_()),t&2){let e=d();B(e.cx("header")),h("pBind",e.ptm("header")),l(2),h("ngTemplateOutlet",e.headerTemplate||e._headerTemplate)}}function cle(t,o){if(t&1&&(se(0),b(1),le()),t&2){let e=d(2);l(),C(e.header)}}function dle(t,o){t&1&&me(0)}function ule(t,o){if(t&1&&(f(0,"div",1),S(1,cle,2,1,"ng-container",3)(2,dle,1,0,"ng-container",2),_()),t&2){let e=d();B(e.cx("title")),h("pBind",e.ptm("title")),l(),h("ngIf",e.header&&!e._titleTemplate&&!e.titleTemplate),l(),h("ngTemplateOutlet",e.titleTemplate||e._titleTemplate)}}function ple(t,o){if(t&1&&(se(0),b(1),le()),t&2){let e=d(2);l(),C(e.subheader)}}function hle(t,o){t&1&&me(0)}function fle(t,o){if(t&1&&(f(0,"div",1),S(1,ple,2,1,"ng-container",3)(2,hle,1,0,"ng-container",2),_()),t&2){let e=d();B(e.cx("subtitle")),h("pBind",e.ptm("subtitle")),l(),h("ngIf",e.subheader&&!e._subtitleTemplate&&!e.subtitleTemplate),l(),h("ngTemplateOutlet",e.subtitleTemplate||e._subtitleTemplate)}}function mle(t,o){t&1&&me(0)}function _le(t,o){t&1&&me(0)}function gle(t,o){if(t&1&&(f(0,"div",1),Ae(1,2),S(2,_le,1,0,"ng-container",2),_()),t&2){let e=d();B(e.cx("footer")),h("pBind",e.ptm("footer")),l(2),h("ngTemplateOutlet",e.footerTemplate||e._footerTemplate)}}var ble=`
2344
- ${sP}
2345
-
2346
- .p-card {
2347
- display: block;
2348
- }
2349
- `,vle={root:"p-card p-component",header:"p-card-header",body:"p-card-body",caption:"p-card-caption",title:"p-card-title",subtitle:"p-card-subtitle",content:"p-card-content",footer:"p-card-footer"},lP=(()=>{class t extends dt{name="card";style=ble;classes=vle;static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})();var cP=new ue("CARD_INSTANCE"),C0=(()=>{class t extends Ot{componentName="Card";$pcCard=p(cP,{optional:!0,skipSelf:!0})??void 0;bindDirectiveInstance=p(de,{self:!0});_componentStyle=p(lP);onAfterViewChecked(){this.bindDirectiveInstance.setAttrs(this.ptms(["host","root"]))}header;subheader;set style(e){ns(this._style(),e)||(this._style.set(e),this.el?.nativeElement&&e&&Object.keys(e).forEach(n=>{this.el.nativeElement.style[n]=e[n]}))}get style(){return this._style()}styleClass;headerFacet;footerFacet;headerTemplate;titleTemplate;subtitleTemplate;contentTemplate;footerTemplate;_headerTemplate;_titleTemplate;_subtitleTemplate;_contentTemplate;_footerTemplate;_style=Q(null);getBlockableElement(){return this.el.nativeElement}templates;onAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"header":this._headerTemplate=e.template;break;case"title":this._titleTemplate=e.template;break;case"subtitle":this._subtitleTemplate=e.template;break;case"content":this._contentTemplate=e.template;break;case"footer":this._footerTemplate=e.template;break;default:this._contentTemplate=e.template;break}})}static \u0275fac=(()=>{let e;return function(i){return(e||(e=q(t)))(i||t)}})();static \u0275cmp=z({type:t,selectors:[["p-card"]],contentQueries:function(n,i,r){if(n&1&&wt(r,$0,5)(r,W0,5)(r,ele,4)(r,tle,4)(r,nle,4)(r,ile,4)(r,ole,4)(r,Ke,4),n&2){let a;U(a=$())&&(i.headerFacet=a.first),U(a=$())&&(i.footerFacet=a.first),U(a=$())&&(i.headerTemplate=a.first),U(a=$())&&(i.titleTemplate=a.first),U(a=$())&&(i.subtitleTemplate=a.first),U(a=$())&&(i.contentTemplate=a.first),U(a=$())&&(i.footerTemplate=a.first),U(a=$())&&(i.templates=a)}},hostVars:4,hostBindings:function(n,i){n&2&&(St(i._style()),B(i.cn(i.cx("root"),i.styleClass)))},inputs:{header:"header",subheader:"subheader",style:"style",styleClass:"styleClass"},features:[ve([lP,{provide:cP,useExisting:t},{provide:ut,useExisting:t}]),lt([de]),Y],ngContentSelectors:ale,decls:8,vars:11,consts:[[3,"pBind","class",4,"ngIf"],[3,"pBind"],[4,"ngTemplateOutlet"],[4,"ngIf"]],template:function(n,i){n&1&&(Rt(rle),S(0,lle,3,4,"div",0),f(1,"div",1),S(2,ule,3,5,"div",0)(3,fle,3,5,"div",0),f(4,"div",1),Ae(5),S(6,mle,1,0,"ng-container",2),_(),S(7,gle,3,4,"div",0),_()),n&2&&(h("ngIf",i.headerFacet||i.headerTemplate||i._headerTemplate),l(),B(i.cx("body")),h("pBind",i.ptm("body")),l(),h("ngIf",i.header||i.titleTemplate||i._titleTemplate),l(),h("ngIf",i.subheader||i.subtitleTemplate||i._subtitleTemplate),l(),B(i.cx("content")),h("pBind",i.ptm("content")),l(2),h("ngTemplateOutlet",i.contentTemplate||i._contentTemplate),l(),h("ngIf",i.footerFacet||i.footerTemplate||i._footerTemplate))},dependencies:[ot,kt,xt,Se,zt,de],encapsulation:2,changeDetection:0})}return t})(),dP=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=nt({type:t});static \u0275inj=tt({imports:[C0,Se,zt,Se,zt]})}return t})();var uP={cardHeader:"Linked nodes",refreshLabel:"Refresh links",outgoingHeader:"Outgoing",incomingHeader:"Incoming",findingsHeader:"Findings",emptyFindings:"No findings on this node.",loading:"Loading links\u2026",error:"Failed to load links.",emptyOutgoing:"No outgoing links from this node.",emptyIncoming:"No incoming links to this node.",confidence:{high:"high",medium:"medium",low:"low"},sourcesPrefix:"detected by ",sourcesSeparator:", ",issueOnTargetTooltip:"Target has an issue: ",issueOnSourceTooltip:"Source has an issue: ",occurrencesHeader:"Occurs at:",occurrencesItem:"line {{line}} \xB7 `{{trigger}}` ({{extractor}})",occurrencesItemUnknownLine:"`{{trigger}}` ({{extractor}})",externalRefsHeader:"External references",emptyExternalRefs:"No external URLs in this node's body.",externalRefsItemLine:"line {{line}}",externalRefsItemUnknownLine:"unknown line"};var Cle=(t,o)=>o.url+"|"+(o.line??-1),xle=(t,o)=>o.analyzerId+"|"+((o.data==null?null:o.data.target)??"")+"|"+o.message,hP=(t,o)=>o.source+"|"+o.target+"|"+o.kind+"|"+((o.trigger==null?null:o.trigger.normalizedTrigger)??""),fP=(t,o)=>o.extractor+"|"+o.originalTrigger+"|"+((o.location==null?null:o.location.line)??-1);function wle(t,o){if(t&1){let e=te();f(0,"div",4)(1,"h3",5),b(2),_(),f(3,"p-button",6),A("onClick",function(){w(e);let i=d(2);return T(i.refresh())}),_()()}if(t&2){let e=d(2);l(2),C(e.texts.cardHeader),l(),h("rounded",!0)("text",!0)("ariaLabel",e.texts.refreshLabel)("pTooltip",e.texts.refreshLabel)("disabled",e.state()==="loading")}}function Tle(t,o){if(t&1&&(f(0,"p",2),b(1),_()),t&2){let e=d(2);l(),C(e.texts.loading)}}function Sle(t,o){if(t&1&&(f(0,"p",3),b(1),_()),t&2){let e=d(2);l(),C(e.texts.error)}}function kle(t,o){if(t&1&&b(0),t&2){let e=d().$implicit,n=d(4);Me(" ",n.texts.externalRefsItemLine.replace("{{line}}",e.line.toString())," ")}}function Ile(t,o){if(t&1&&b(0),t&2){let e=d(5);Me(" ",e.texts.externalRefsItemUnknownLine," ")}}function Ele(t,o){if(t&1&&(f(0,"li",16)(1,"span",17),P(2,kle,1,1)(3,Ile,1,1),_(),f(4,"a",18),b(5),_()()),t&2){let e=o.$implicit;O("data-testid","linked-nodes-external-ref-"+e.url),l(2),R(e.line?2:3),l(2),h("href",e.url,Ei),l(),C(e.url)}}function Mle(t,o){if(t&1&&(f(0,"section",7)(1,"h4",9),b(2),_(),f(3,"ul",11),he(4,Ele,6,4,"li",16,Cle),_()()),t&2){let e=d(3);l(2),C(e.texts.externalRefsHeader),l(2),fe(e.externalRefs())}}function Dle(t,o){if(t&1&&(f(0,"p",10),b(1),_()),t&2){let e=d(3);l(),C(e.texts.emptyFindings)}}function Ple(t,o){if(t&1&&(f(0,"li",19),F(1,"p-tag",20),f(2,"span",21),b(3),_()()),t&2){let e=o.$implicit,n=d(4);O("data-testid","linked-nodes-finding-"+e.analyzerId),l(),h("value",e.analyzerId)("severity",n.issueSeverity(e.severity))("rounded",!0),l(2),C(e.message)}}function Rle(t,o){if(t&1&&(f(0,"ul",11),he(1,Ple,4,5,"li",19,xle),_()),t&2){let e=d(3);l(),fe(e.findings())}}function Ole(t,o){if(t&1&&(f(0,"p",13),b(1),_()),t&2){let e=d(3);l(),C(e.texts.emptyOutgoing)}}function Fle(t,o){if(t&1&&F(0,"p-tag",25),t&2){let e=o,n=d().$implicit,i=d(4);h("value",e.analyzerId)("severity",i.issueSeverity(e.severity))("rounded",!0)("pTooltip",e.message),O("data-testid","linked-nodes-outgoing-issue-"+n.target)}}function Nle(t,o){if(t&1&&(f(0,"span",26),b(1),_()),t&2){let e=d().$implicit,n=d(4);l(),lr(" ",n.texts.sourcesPrefix,"",e.sources.join(n.texts.sourcesSeparator)," ")}}function Ale(t,o){if(t&1&&(f(0,"li",29),b(1),_()),t&2){let e=o.$implicit,n=d(6);l(),C(n.occurrenceLabel(e))}}function Lle(t,o){if(t&1&&(f(0,"ul",27)(1,"li",28),b(2),_(),he(3,Ale,2,1,"li",29,fP),_()),t&2){let e=d().$implicit,n=d(4);O("data-testid","linked-nodes-occurrences-"+e.target),l(2),C(n.texts.occurrencesHeader),l(),fe(e.occurrences)}}function Ble(t,o){if(t&1){let e=te();f(0,"li",22),F(1,"p-tag",23),f(2,"p-button",24),A("onClick",function(){let i=w(e).$implicit,r=d(4);return T(r.onOpen(i.target))}),_(),F(3,"p-tag",25),P(4,Fle,1,5,"p-tag",25),P(5,Nle,2,2,"span",26),P(6,Lle,5,2,"ul",27),_()}if(t&2){let e,n=o.$implicit,i=d(4);O("data-testid","linked-nodes-outgoing-row-"+n.target),l(),h("value",n.kind)("severity",i.kindSeverity(n.kind)),l(),h("link",!0)("label",n.target),O("data-testid","linked-nodes-outgoing-link-"+n.target),l(),h("value",i.confidenceValue(n.confidence))("severity",i.confidenceSeverity(n.confidence))("rounded",!0)("pTooltip",i.confidenceLabel(n.confidence)),l(),R((e=i.issueForOutgoing(n))?4:-1,e),l(),R(n.sources.length?5:-1),l(),R(n.occurrences&&n.occurrences.length>0?6:-1)}}function Vle(t,o){if(t&1&&(f(0,"ul",11),he(1,Ble,7,13,"li",22,hP),_()),t&2){let e=d(3);l(),fe(e.outgoing())}}function zle(t,o){if(t&1&&(f(0,"p",15),b(1),_()),t&2){let e=d(3);l(),C(e.texts.emptyIncoming)}}function Hle(t,o){if(t&1&&F(0,"p-tag",25),t&2){let e=o,n=d().$implicit,i=d(4);h("value",e.analyzerId)("severity",i.issueSeverity(e.severity))("rounded",!0)("pTooltip",e.message),O("data-testid","linked-nodes-incoming-issue-"+n.source)}}function qle(t,o){if(t&1&&(f(0,"span",26),b(1),_()),t&2){let e=d().$implicit,n=d(4);l(),lr(" ",n.texts.sourcesPrefix,"",e.sources.join(n.texts.sourcesSeparator)," ")}}function Gle(t,o){if(t&1&&(f(0,"li",29),b(1),_()),t&2){let e=o.$implicit,n=d(6);l(),C(n.occurrenceLabel(e))}}function jle(t,o){if(t&1&&(f(0,"ul",27)(1,"li",28),b(2),_(),he(3,Gle,2,1,"li",29,fP),_()),t&2){let e=d().$implicit,n=d(4);O("data-testid","linked-nodes-occurrences-"+e.target),l(2),C(n.texts.occurrencesHeader),l(),fe(e.occurrences)}}function Ule(t,o){if(t&1){let e=te();f(0,"li",22),F(1,"p-tag",23),f(2,"p-button",24),A("onClick",function(){let i=w(e).$implicit,r=d(4);return T(r.onOpen(i.source))}),_(),F(3,"p-tag",25),P(4,Hle,1,5,"p-tag",25),P(5,qle,2,2,"span",26),P(6,jle,5,2,"ul",27),_()}if(t&2){let e,n=o.$implicit,i=d(4);O("data-testid","linked-nodes-incoming-row-"+n.source),l(),h("value",n.kind)("severity",i.kindSeverity(n.kind)),l(),h("link",!0)("label",n.source),O("data-testid","linked-nodes-incoming-link-"+n.source),l(),h("value",i.confidenceValue(n.confidence))("severity",i.confidenceSeverity(n.confidence))("rounded",!0)("pTooltip",i.confidenceLabel(n.confidence)),l(),R((e=i.issueForIncoming(n))?4:-1,e),l(),R(n.sources.length?5:-1),l(),R(n.occurrences&&n.occurrences.length>0?6:-1)}}function $le(t,o){if(t&1&&(f(0,"ul",11),he(1,Ule,7,13,"li",22,hP),_()),t&2){let e=d(3);l(),fe(e.incoming())}}function Wle(t,o){if(t&1&&(P(0,Mle,6,1,"section",7),f(1,"section",8)(2,"h4",9),b(3),_(),P(4,Dle,2,1,"p",10)(5,Rle,3,0,"ul",11),_(),f(6,"section",12)(7,"h4",9),b(8),_(),P(9,Ole,2,1,"p",13)(10,Vle,3,0,"ul",11),_(),f(11,"section",14)(12,"h4",9),b(13),_(),P(14,zle,2,1,"p",15)(15,$le,3,0,"ul",11),_()),t&2){let e=d(2);R(e.externalRefs().length>0?0:-1),l(3),C(e.texts.findingsHeader),l(),R(e.findings().length===0?4:5),l(4),C(e.texts.outgoingHeader),l(),R(e.outgoing().length===0?9:10),l(4),C(e.texts.incomingHeader),l(),R(e.incoming().length===0?14:15)}}function Kle(t,o){if(t&1&&(f(0,"p-card",0),S(1,wle,4,6,"ng-template",1),P(2,Tle,2,1,"p",2)(3,Sle,2,1,"p",3)(4,Wle,16,7),_()),t&2){let e,n=d();l(2),R((e=n.state())==="loading"?2:e==="error"?3:e==="ready"?4:-1)}}var mP=(()=>{class t{dataSource=p(ei);wsEvents=p(vb);destroyRef=p(Et);texts=uP;path=H(null);openPath=bt();state=Q("idle");outgoingRaw=Q([]);incomingRaw=Q([]);outgoing=E(()=>this.outgoingRaw().filter(e=>!pP(e)));incoming=E(()=>this.incomingRaw().filter(e=>!pP(e)));issues=Q([]);externalRefsRaw=Q([]);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));findings=E(()=>{let e=this.path();return e?this.issues().filter(n=>n.nodeIds.includes(e)):[]});constructor(){this.wsEvents.scanCompleted$.pipe(go(this.destroyRef)).subscribe(()=>{let e=this.path();e&&this.fetch(e)}),ge(()=>{let e=this.path();if(!e){this.fetchToken++,this.state.set("idle"),this.outgoingRaw.set([]),this.incomingRaw.set([]);return}this.fetch(e)})}refresh(){let e=this.path();e&&this.fetch(e)}onOpen(e){this.openPath.emit(e)}kindSeverity(e){return Nv[e]??"secondary"}confidenceSeverity(e){return Av(e)}confidenceLabel(e){return this.texts.confidence[om(e)]}confidenceValue(e){return e.toFixed(2)}issueSeverity(e){return e==="error"?"danger":e==="warn"?"warn":"info"}issueForOutgoing(e){let n=this.path();if(!n)return null;let i=[e.target,e.resolvedTarget].filter(c=>typeof c=="string"),r=this.issues().find(c=>{if(!c.nodeIds.includes(n))return!1;let u=c.data?.target;return typeof u!="string"?!1:i.includes(u)});if(r)return r;let a=e.resolvedTarget??e.target;return this.issues().find(c=>{if(!c.nodeIds.includes(a))return!1;let u=c.data?.target;return typeof u!="string"||u===a})??null}occurrenceLabel(e){let n=e.location?.line;return typeof n!="number"?this.texts.occurrencesItemUnknownLine.replace("{{trigger}}",e.originalTrigger).replace("{{extractor}}",e.extractor):this.texts.occurrencesItem.replace("{{line}}",String(n)).replace("{{trigger}}",e.originalTrigger).replace("{{extractor}}",e.extractor)}issueForIncoming(e){let n=this.path();if(!n)return null;let i=[e.target,e.resolvedTarget,n].filter(a=>typeof a=="string");return this.issues().find(a=>{if(!a.nodeIds.includes(e.source))return!1;let s=a.data?.target;return typeof s!="string"?!1:i.includes(s)})??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=Yle(e,s,c),m;try{let g=await this.dataSource.listIssues({nodes:u});if(n!==this.fetchToken)return;m=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(m),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:[["styleClass","linked-nodes-panel","data-testid","linked-nodes-panel"],["pTemplate","header"],["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"],[1,"linked-nodes-panel__header"],[1,"linked-nodes-panel__title"],["icon","pi pi-refresh","severity","secondary","data-testid","linked-nodes-refresh",3,"onClick","rounded","text","ariaLabel","pTooltip","disabled"],["data-testid","linked-nodes-external-refs",1,"linked-nodes-panel__section"],["data-testid","linked-nodes-findings",1,"linked-nodes-panel__section"],[1,"linked-nodes-panel__section-title"],["data-testid","linked-nodes-findings-empty",1,"linked-nodes-panel__status"],[1,"linked-nodes-panel__rows"],["data-testid","linked-nodes-outgoing",1,"linked-nodes-panel__section"],["data-testid","linked-nodes-outgoing-empty",1,"linked-nodes-panel__status"],["data-testid","linked-nodes-incoming",1,"linked-nodes-panel__section"],["data-testid","linked-nodes-incoming-empty",1,"linked-nodes-panel__status"],[1,"linked-nodes-panel__row","linked-nodes-panel__row--external-ref"],[1,"linked-nodes-panel__external-ref-line"],["target","_blank","rel","noopener noreferrer",1,"linked-nodes-panel__external-ref-url",3,"href"],[1,"linked-nodes-panel__row","linked-nodes-panel__row--finding"],[3,"value","severity","rounded"],[1,"linked-nodes-panel__finding-message"],[1,"linked-nodes-panel__row"],[3,"value","severity"],["severity","primary","styleClass","linked-nodes-panel__path",3,"onClick","link","label"],[3,"value","severity","rounded","pTooltip"],[1,"linked-nodes-panel__sources"],[1,"linked-nodes-panel__occurrences"],[1,"linked-nodes-panel__occurrences-header"],[1,"linked-nodes-panel__occurrences-item"]],template:function(n,i){n&1&&P(0,Kle,5,1,"p-card",0),n&2&&R(i.path()?0:-1)},dependencies:[dP,C0,Ke,bf,Ba,gf,dn,Yt,ze,Ve],styles:["[_nghost-%COMP%]{display:block}.linked-nodes-panel__header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:.5rem;padding:.75rem 1rem 0}.linked-nodes-panel__title[_ngcontent-%COMP%]{margin:0;font-size:.95rem;font-weight:600}.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%]{margin:0 0 .5rem;font-size:.8rem;font-weight:600;text-transform:uppercase;letter-spacing:.04em;color:var(--p-text-muted-color)}.linked-nodes-panel__rows[_ngcontent-%COMP%]{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:.5rem}.linked-nodes-panel__row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;flex-wrap:wrap;padding:.4rem .5rem;border-radius:var(--sm-radius-md);background:var(--p-content-background);border:1px solid var(--p-content-border-color)}.linked-nodes-panel__path[_ngcontent-%COMP%]{font-family:var(--sm-font-mono);font-size:.85rem;padding:0;text-underline-offset:2px}.linked-nodes-panel__sources[_ngcontent-%COMP%]{font-size:.75rem;color:var(--p-text-muted-color);margin-left:auto}.linked-nodes-panel__occurrences[_ngcontent-%COMP%]{flex-basis:100%;list-style:none;margin:.25rem 0 0;padding:.25rem 0 0;border-top:1px dashed var(--p-content-border-color);display:flex;flex-direction:column;gap:.15rem}.linked-nodes-panel__occurrences-header[_ngcontent-%COMP%]{font-size:.7rem;font-weight:600;text-transform:uppercase;letter-spacing:.04em;color:var(--p-text-muted-color)}.linked-nodes-panel__occurrences-item[_ngcontent-%COMP%]{font-family:var(--sm-font-mono);font-size:.78rem;color:var(--p-text-muted-color)}.linked-nodes-panel__row--finding[_ngcontent-%COMP%]{align-items:flex-start}.linked-nodes-panel__finding-message[_ngcontent-%COMP%]{font-size:.8rem;line-height:1.4;color:var(--p-text-color)}.linked-nodes-panel__row--external-ref[_ngcontent-%COMP%]{font-family:var(--sm-font-mono);font-size:.85rem}.linked-nodes-panel__external-ref-line[_ngcontent-%COMP%]{font-size:.75rem;color:var(--p-text-muted-color);min-width:4.5rem}.linked-nodes-panel__external-ref-url[_ngcontent-%COMP%]{flex:1;word-break:break-all;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 Yle(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 pP(t){return!!(t.source===t.target||t.resolvedTarget&&t.source===t.resolvedTarget)}var _P={sections:{behavior:"Behavior",capabilities:"Capabilities",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",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"}};var Zle=(t,o)=>o.name,Xle=(t,o)=>o.event;function Qle(t,o){if(t&1&&(f(0,"dt"),b(1),_(),f(2,"dd")(3,"code"),b(4),_()()),t&2){let e=d(3);l(),C(e.texts.fields.model),l(3),C(o)}}function Jle(t,o){if(t&1&&(f(0,"dt"),b(1),_(),f(2,"dd"),b(3),_()),t&2){let e=d(3);l(),C(e.texts.fields.effort),l(2),C(o)}}function ece(t,o){if(t&1&&(f(0,"dt"),b(1),_(),f(2,"dd")(3,"code"),b(4),_()()),t&2){let e=d(3);l(),C(e.texts.fields.permissionMode),l(3),C(o)}}function tce(t,o){if(t&1&&(f(0,"dt"),b(1),_(),f(2,"dd"),b(3),_()),t&2){let e=d(3);l(),C(e.texts.fields.maxTurns),l(2),C(e.maxTurns())}}function nce(t,o){if(t&1&&(f(0,"dt"),b(1),_(),f(2,"dd")(3,"code"),b(4),_()()),t&2){let e=d(3);l(),C(e.texts.fields.memory),l(3),C(o)}}function ice(t,o){if(t&1&&(f(0,"dt"),b(1),_(),f(2,"dd")(3,"code"),b(4,"true"),_()()),t&2){let e=d(3);l(),C(e.texts.fields.background)}}function oce(t,o){if(t&1&&(f(0,"dt"),b(1),_(),f(2,"dd")(3,"code"),b(4),_()()),t&2){let e=d(3);l(),C(e.texts.fields.isolation),l(3),C(o)}}function rce(t,o){if(t&1&&(f(0,"section",1)(1,"h3",4),b(2),_(),f(3,"dl",5),P(4,Qle,5,2),P(5,Jle,4,2),P(6,ece,5,2),P(7,tce,4,2),P(8,nce,5,2),P(9,ice,5,1),P(10,oce,5,2),_()()),t&2){let e,n,i,r,a,s=d(2);l(2),C(s.texts.sections.behavior),l(2),R((e=s.model())?4:-1,e),l(),R((n=s.effort())?5:-1,n),l(),R((i=s.permissionMode())?6:-1,i),l(),R(s.maxTurns()!==null?7:-1),l(),R((r=s.memory())?8:-1,r),l(),R(s.background()?9:-1),l(),R((a=s.isolation())?10:-1,a)}}function ace(t,o){t&1&&(f(0,"span",8),b(1,"\xB7"),_())}function sce(t,o){if(t&1&&(f(0,"code"),b(1),_(),P(2,ace,2,0,"span",8)),t&2){let e=o.$implicit,n=o.$index,i=o.$count;l(),C(e),l(),R(n!==i-1?2:-1)}}function lce(t,o){if(t&1&&(f(0,"dt"),b(1),_(),f(2,"dd",7),he(3,sce,3,2,null,null,Ue),_()),t&2){let e=d(4);l(),C(e.texts.fields.tools),l(2),fe(e.tools())}}function cce(t,o){t&1&&(f(0,"span",8),b(1,"\xB7"),_())}function dce(t,o){if(t&1&&(f(0,"span",9),F(1,"i",10),f(2,"code"),b(3),_()(),P(4,cce,2,0,"span",8)),t&2){let e=o.$implicit,n=o.$index,i=o.$count;l(3),C(e),l(),R(n!==i-1?4:-1)}}function uce(t,o){if(t&1&&(f(0,"dt"),b(1),_(),f(2,"dd",7),he(3,dce,5,2,null,null,Ue),_()),t&2){let e=d(4);l(),C(e.texts.fields.disallowedTools),l(2),fe(e.disallowedTools())}}function pce(t,o){t&1&&(f(0,"span",8),b(1,"\xB7"),_())}function hce(t,o){if(t&1){let e=te();f(0,"a",11),A("click",function(){let i=w(e).$implicit,r=d(5);return T(r.onSkillChipClick(i))})("keydown.enter",function(){let i=w(e).$implicit,r=d(5);return T(r.onSkillChipClick(i))}),F(1,"i",12),b(2),_(),P(3,pce,2,0,"span",8)}if(t&2){let e=o.$implicit,n=o.$index,i=o.$count,r=d(5);ce("vfm__link--known",r.isSkillKnown(e)),l(2),Me(" ",e," "),l(),R(n!==i-1?3:-1)}}function fce(t,o){if(t&1&&(f(0,"dt"),b(1),_(),f(2,"dd",7),he(3,hce,4,4,null,null,Ue),_()),t&2){let e=d(4);l(),C(e.texts.fields.skills),l(2),fe(e.skills())}}function mce(t,o){t&1&&(f(0,"span",8),b(1,"\xB7"),_())}function _ce(t,o){if(t&1&&(f(0,"code",13),b(1),_(),P(2,mce,2,0,"span",8)),t&2){let e=o.$implicit,n=o.$index,i=o.$count;h("pTooltip",e.command??""),l(),C(e.name),l(),R(n!==i-1?2:-1)}}function gce(t,o){if(t&1&&(f(0,"dt"),b(1),_(),f(2,"dd",7),he(3,_ce,3,3,null,null,Zle),_()),t&2){let e=d(4);l(),C(e.texts.fields.mcpServers),l(2),fe(e.mcpServers())}}function bce(t,o){if(t&1&&(f(0,"span",15),b(1,"\u2192"),_(),f(2,"code"),b(3),_()),t&2){let e=d().$implicit;l(3),C(e.keys[0])}}function vce(t,o){t&1&&(f(0,"span",8),b(1,"\xB7"),_())}function yce(t,o){if(t&1&&(f(0,"span",14)(1,"code"),b(2),_(),P(3,bce,4,1),_(),P(4,vce,2,0,"span",8)),t&2){let e=o.$implicit,n=o.$index,i=o.$count;l(2),C(e.event),l(),R(e.keys.length?3:-1),l(),R(n!==i-1?4:-1)}}function Cce(t,o){if(t&1&&(f(0,"dt"),b(1),_(),f(2,"dd",7),he(3,yce,5,3,null,null,Xle),_()),t&2){let e=d(4);l(),C(e.texts.fields.hooks),l(2),fe(e.hooks())}}function xce(t,o){if(t&1&&(f(0,"dl",5),P(1,lce,5,1),P(2,uce,5,1),P(3,fce,5,1),P(4,gce,5,1),P(5,Cce,5,1),_()),t&2){let e=d(3);l(),R(e.tools().length?1:-1),l(),R(e.disallowedTools().length?2:-1),l(),R(e.skills().length?3:-1),l(),R(e.mcpServers().length?4:-1),l(),R(e.hooks().length?5:-1)}}function wce(t,o){if(t&1&&(f(0,"dt"),b(1),_(),f(2,"dd"),b(3),_()),t&2){d();let e=Ie(0),n=d(3);l(),C(n.texts.skillBaseFields.whenToUse),l(2),C(e.when_to_use)}}function Tce(t,o){if(t&1&&(f(0,"dt"),b(1),_(),f(2,"dd")(3,"code"),b(4),_()()),t&2){d();let e=Ie(0),n=d(3);l(),C(n.texts.skillBaseFields.argumentHint),l(3),C(e.argumentHint)}}function Sce(t,o){t&1&&(f(0,"span",8),b(1,"\xB7"),_())}function kce(t,o){if(t&1&&(f(0,"code"),b(1),_(),P(2,Sce,2,0,"span",8)),t&2){let e=o.$implicit,n=o.$index,i=o.$count;l(),C(e),l(),R(n!==i-1?2:-1)}}function Ice(t,o){if(t&1&&(f(0,"dt"),b(1),_(),f(2,"dd",7),he(3,kce,3,2,null,null,Ue),_()),t&2){d();let e=Ie(0),n=d(3);l(),C(n.texts.skillBaseFields.arguments),l(2),fe(e.arguments)}}function Ece(t,o){t&1&&(f(0,"span",8),b(1,"\xB7"),_())}function Mce(t,o){if(t&1&&(f(0,"code"),b(1),_(),P(2,Ece,2,0,"span",8)),t&2){let e=o.$implicit,n=o.$index,i=o.$count;l(),C(e),l(),R(n!==i-1?2:-1)}}function Dce(t,o){if(t&1&&(f(0,"dt"),b(1),_(),f(2,"dd",7),he(3,Mce,3,2,null,null,Ue),_()),t&2){d();let e=Ie(0),n=d(3);l(),C(n.texts.skillBaseFields.allowedTools),l(2),fe(e.allowedTools)}}function Pce(t,o){t&1&&(f(0,"span",8),b(1,"\xB7"),_())}function Rce(t,o){if(t&1&&(f(0,"span",9),F(1,"i",10),f(2,"code"),b(3),_()(),P(4,Pce,2,0,"span",8)),t&2){let e=o.$implicit,n=o.$index,i=o.$count;l(3),C(e),l(),R(n!==i-1?4:-1)}}function Oce(t,o){if(t&1&&(f(0,"dt"),b(1),_(),f(2,"dd",7),he(3,Rce,5,2,null,null,Ue),_()),t&2){d();let e=Ie(0),n=d(3);l(),C(n.texts.skillBaseFields.disallowedTools),l(2),fe(e.disallowedTools)}}function Fce(t,o){if(t&1&&(f(0,"dt"),b(1),_(),f(2,"dd")(3,"code"),b(4),_()()),t&2){d();let e=Ie(0),n=d(3);l(),C(n.texts.skillBaseFields.model),l(3),C(e.model)}}function Nce(t,o){if(t&1&&(f(0,"dt"),b(1),_(),f(2,"dd"),b(3),_()),t&2){d();let e=Ie(0),n=d(3);l(),C(n.texts.skillBaseFields.effort),l(2),C(e.effort)}}function Ace(t,o){if(t&1&&(f(0,"dt"),b(1),_(),f(2,"dd")(3,"code"),b(4),_()()),t&2){d();let e=Ie(0),n=d(3);l(),C(n.texts.skillBaseFields.context),l(3),C(e.context)}}function Lce(t,o){if(t&1&&(f(0,"dt"),b(1),_(),f(2,"dd")(3,"code"),b(4),_()()),t&2){d();let e=Ie(0),n=d(3);l(),C(n.texts.skillBaseFields.agent),l(3),C(e.agent)}}function Bce(t,o){if(t&1&&(f(0,"dt"),b(1),_(),f(2,"dd")(3,"code"),b(4),_()()),t&2){d();let e=Ie(0),n=d(3);l(),C(n.texts.skillBaseFields.shell),l(3),C(e.shell)}}function Vce(t,o){t&1&&(f(0,"span",8),b(1,"\xB7"),_())}function zce(t,o){if(t&1&&(f(0,"code"),b(1),_(),P(2,Vce,2,0,"span",8)),t&2){let e=o.$implicit,n=o.$index,i=o.$count;l(),C(e),l(),R(n!==i-1?2:-1)}}function Hce(t,o){if(t&1&&(f(0,"dt"),b(1),_(),f(2,"dd",7),he(3,zce,3,2,null,null,Ue),_()),t&2){d();let e=Ie(0),n=d(3);l(),C(n.texts.skillBaseFields.paths),l(2),fe(e.paths)}}function qce(t,o){if(t&1&&(f(0,"dt"),b(1),_(),f(2,"dd")(3,"code"),b(4,"disabled"),_()()),t&2){let e=d(4);l(),C(e.texts.skillBaseFields.disableModelInvocation)}}function Gce(t,o){if(t&1&&(f(0,"dt"),b(1),_(),f(2,"dd")(3,"code"),b(4),_()()),t&2){d();let e=Ie(0),n=d(3);l(),C(n.texts.skillBaseFields.userInvocable),l(3),C(e.userInvocable)}}function jce(t,o){if(t&1&&(Wt(0),f(1,"dl",6),P(2,wce,4,2),P(3,Tce,5,2),P(4,Ice,5,1),P(5,Dce,5,1),P(6,Oce,5,1),P(7,Fce,5,2),P(8,Nce,4,2),P(9,Ace,5,2),P(10,Lce,5,2),P(11,Bce,5,2),P(12,Hce,5,1),P(13,qce,5,1),P(14,Gce,5,2),_()),t&2){let e=Mt(d(3).skillBase());l(2),R(e.when_to_use!==null?2:-1),l(),R(e.argumentHint!==null?3:-1),l(),R(e.arguments.length?4:-1),l(),R(e.allowedTools.length?5:-1),l(),R(e.disallowedTools.length?6:-1),l(),R(e.model!==null?7:-1),l(),R(e.effort!==null?8:-1),l(),R(e.context!==null?9:-1),l(),R(e.agent!==null?10:-1),l(),R(e.shell!==null?11:-1),l(),R(e.paths.length?12:-1),l(),R(e.disableModelInvocation?13:-1),l(),R(e.userInvocable!==null?14:-1)}}function Uce(t,o){if(t&1&&(f(0,"section",2)(1,"h3",4),b(2),_(),P(3,xce,6,5,"dl",5)(4,jce,15,14,"dl",6),_()),t&2){let e=d(2);l(2),C(e.texts.sections.capabilities),l(),R(e.isAgent()?3:e.isSkillOrCommand()?4:-1)}}function $ce(t,o){if(t&1&&(f(0,"section",3)(1,"h3",4),b(2),_(),f(3,"blockquote",16),b(4),_()()),t&2){let e=d(2);l(2),C(e.texts.sections.initialPrompt),l(2),C(e.initialPrompt())}}function Wce(t,o){if(t&1&&(f(0,"div",0),P(1,rce,11,8,"section",1),P(2,Uce,5,2,"section",2),P(3,$ce,5,2,"section",3),_()),t&2){let e=d();l(),R(e.hasBehavior()?1:-1),l(),R(e.hasCapabilities()?2:-1),l(),R(e.hasInitialPrompt()?3:-1)}}var gP=(()=>{class t{frontmatter=H.required();kind=H.required();provider=H(void 0);knownPaths=H(null);onSkillClick=H(null);texts=_P;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(()=>Cf(this.fm().tools));model=E(()=>tn(this.fm().model));skills=E(()=>Cf(this.fm().skills));disallowedTools=E(()=>Cf(this.fm().disallowedTools));initialPrompt=E(()=>tn(this.fm().initialPrompt));permissionMode=E(()=>tn(this.fm().permissionMode));maxTurns=E(()=>Kce(this.fm().maxTurns));memory=E(()=>tn(this.fm().memory));background=E(()=>this.fm().background===!0);effort=E(()=>tn(this.fm().effort));isolation=E(()=>tn(this.fm().isolation));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:tn(e.when_to_use),argumentHint:tn(e["argument-hint"]),arguments:yf(e.arguments),disableModelInvocation:e["disable-model-invocation"]===!0,userInvocable:typeof e["user-invocable"]=="boolean"?e["user-invocable"]:null,allowedTools:yf(e["allowed-tools"]),disallowedTools:yf(e["disallowed-tools"]),model:tn(e.model),effort:tn(e.effort),context:tn(e.context),agent:tn(e.agent),paths:yf(e.paths),shell:tn(e.shell)}});hasBehavior=E(()=>this.isAgent()?this.model()!==null||this.permissionMode()!==null||this.maxTurns()!==null||this.memory()!==null||this.background()||this.effort()!==null||this.isolation()!==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);hasAnyContent=E(()=>this.hasVendorSurface()&&(this.hasBehavior()||this.hasCapabilities()||this.hasInitialPrompt()));onSkillChipClick(e){let n=this.onSkillClick();n&&n(e)}isSkillKnown(e){let n=this.knownPaths();return n?n.has(e):!1}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"],knownPaths:[1,"knownPaths"],onSkillClick:[1,"onSkillClick"]},decls:1,vars:1,consts:[["data-testid","vendor-frontmatter",1,"vfm"],["data-testid","vendor-frontmatter-behavior",1,"sm-block"],["data-testid","vendor-frontmatter-capabilities",1,"sm-block"],["data-testid","vendor-frontmatter-initial-prompt",1,"sm-block"],[1,"sm-block__title"],[1,"sm-block__kv"],["data-testid","vendor-frontmatter-skill-base",1,"sm-block__kv"],[1,"vfm__inline"],["aria-hidden","true",1,"vfm__sep"],[1,"vfm__danger"],["aria-hidden","true",1,"pi","pi-ban"],["role","button","tabindex","0",1,"vfm__link",3,"click","keydown.enter"],["aria-hidden","true",1,"pi","pi-arrow-up-right"],[3,"pTooltip"],[1,"vfm__hook"],["aria-hidden","true",1,"vfm__sep-arrow"],["data-testid","vendor-frontmatter-initial-prompt-quote",1,"vfm__quote"]],template:function(n,i){n&1&&P(0,Wce,4,3,"div",0),n&2&&R(i.hasAnyContent()?0:-1)},dependencies:[ze,Ve],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__link[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.25rem;color:var(--p-text-muted-color);cursor:default;text-decoration:none;font-size:.83rem}.vfm__link[_ngcontent-%COMP%] .pi[_ngcontent-%COMP%]{font-size:.7rem}.vfm__link--known[_ngcontent-%COMP%]{color:var(--p-primary-color);cursor:pointer}.vfm__link--known[_ngcontent-%COMP%]:hover{text-decoration:underline}.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__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-style:italic;font-size:.9rem;line-height:1.55;border-radius:0 var(--sm-radius-sm) var(--sm-radius-sm) 0;white-space:pre-wrap}"],changeDetection:0})}return t})();function tn(t){return typeof t=="string"&&t.length>0?t:null}function Kce(t){return typeof t=="number"&&Number.isFinite(t)?t:null}function Cf(t){return Array.isArray(t)?t.filter(o=>typeof o=="string"&&o.length>0):[]}function yf(t){return typeof t=="string"?t.length>0?[t]:[]:Array.isArray(t)?Cf(t):[]}var bP={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 CP=(t,o)=>o.key,Yce=(t,o)=>o.pluginId;function Zce(t,o){if(t&1&&(f(0,"p",0),b(1),_()),t&2){let e=d();l(),C(e.texts.empty)}}function Xce(t,o){if(t&1&&(f(0,"span",5),b(1),_()),t&2){let e=d().$implicit,n=d(3);l(),C(n.texts.rootContribBadge(e.pluginId))}}function Qce(t,o){if(t&1&&(f(0,"div",3)(1,"code",4),b(2),_(),P(3,Xce,2,1,"span",5),f(4,"pre",6),b(5),_()()),t&2){let e=o.$implicit;l(2),C(e.key),l(),R(e.pluginId!==null?3:-1),l(2),C(e.value)}}function Jce(t,o){if(t&1&&(f(0,"div",1),he(1,Qce,6,3,"div",3,CP),_()),t&2){let e=d(2);l(),fe(e.rootContributions())}}function ede(t,o){if(t&1&&(f(0,"span",10),b(1),_()),t&2){let e=d(4);l(),C(e.texts.unregisteredBadge)}}function tde(t,o){if(t&1&&(f(0,"dt",12),b(1),_(),f(2,"dd")(3,"pre"),b(4),_()()),t&2){let e=o.$implicit;h("pTooltip",e.description??""),l(),C(e.key),l(3),C(e.value)}}function nde(t,o){if(t&1&&(f(0,"section",7)(1,"h5",8)(2,"span",9),b(3),_(),P(4,ede,2,1,"span",10),_(),f(5,"dl",11),he(6,tde,5,3,null,null,CP),_()()),t&2){let e=o.$implicit;O("data-testid","plugin-contributions-ns-"+e.pluginId),l(3),C(e.pluginId),l(),R(e.registered?-1:4),l(2),fe(e.rows)}}function ide(t,o){if(t&1&&(f(0,"div",2),he(1,nde,8,3,"section",7,Yce),_()),t&2){let e=d(2);l(),fe(e.namespaces())}}function ode(t,o){if(t&1&&(P(0,Jce,3,0,"div",1),P(1,ide,3,0,"div",2)),t&2){let e=d();R(e.rootContributions().length?0:-1),l(),R(e.namespaces().length?1:-1)}}var vP=new Set(["identity","annotations","settings","audit"]),xP=(()=>{class t{dataSource=p(ei);sidecarRoot=H(void 0);texts=bP;catalog=Q(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(vP.has(a)||this.isRegisteredRootKey(a))continue;let u=typeof s=="object"&&s!==null&&!Array.isArray(s)?s:{value:s},m=i.has(a),g=i.get(a)??[],x=Object.entries(u).map(([I,k])=>({key:I,value:yP(k),description:m?rde(g,I):null}));r.push({pluginId:a,registered:m,rows:x})}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(vP.has(a))continue;let c=i.get(a);c&&r.push({key:a,pluginId:c.pluginId,value:yP(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&&P(0,Zce,2,1,"p",0)(1,ode,2,2),n&2&&R(i.isEmpty()?0:1)},dependencies:[ze,Ve],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 yP(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 rde(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 wP=(()=>{class t{node=H(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&&F(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&&(h("node",i.node()),l(),h("node",i.node()),l(),h("node",i.node()),l(),h("node",i.node()),l(),h("node",i.node()),l(),h("node",i.node()))},dependencies:[ti],encapsulation:2,changeDetection:0})}return t})();var TP={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",sidecarPresent:"sidecar.present"},diffMarker:"!=",absentMarker:"(absent)",notSetMarker:"(not set)"};function ade(t,o){t&1&&(J(0,"code"),b(1),ee()),t&2&&(l(),C(o))}function sde(t,o){if(t&1&&(J(0,"span",2),b(1),ee()),t&2){let e=d();l(),C(e.texts.absentMarker)}}function lde(t,o){if(t&1&&(J(0,"code"),b(1),ee()),t&2){let e=d();ce("dbg__diff",e.bodyHashDrift()),l(),C(o)}}function cde(t,o){if(t&1&&(J(0,"span",2),b(1),ee()),t&2){let e=d();l(),C(e.texts.absentMarker)}}function dde(t,o){if(t&1&&(J(0,"code"),b(1),ee()),t&2){let e=d();ce("dbg__diff",e.bodyHashDrift()),l(),C(o)}}function ude(t,o){if(t&1&&(J(0,"span",2),b(1),ee()),t&2){let e=d();l(),C(e.texts.absentMarker)}}function pde(t,o){if(t&1&&(J(0,"code"),b(1),ee()),t&2){let e=d();ce("dbg__diff",e.frontmatterHashDrift()),l(),C(o)}}function hde(t,o){if(t&1&&(J(0,"span",2),b(1),ee()),t&2){let e=d();l(),C(e.texts.absentMarker)}}function fde(t,o){if(t&1&&(J(0,"code"),b(1),ee()),t&2){let e=d();ce("dbg__diff",e.frontmatterHashDrift()),l(),C(o)}}function mde(t,o){if(t&1&&(J(0,"span",2),b(1),ee()),t&2){let e=d();l(),C(e.texts.absentMarker)}}function _de(t,o){t&1&&(J(0,"code"),b(1),ee()),t&2&&(l(),C(o))}function gde(t,o){if(t&1&&(J(0,"span",2),b(1),ee()),t&2){let e=d();l(),C(e.texts.notSetMarker)}}function bde(t,o){t&1&&(J(0,"code"),b(1),ee()),t&2&&(l(),C(o))}function vde(t,o){if(t&1&&(J(0,"span",2),b(1),ee()),t&2){let e=d();l(),C(e.texts.notSetMarker)}}function yde(t,o){t&1&&(J(0,"code"),b(1),ee()),t&2&&(l(),C(o))}function Cde(t,o){if(t&1&&(J(0,"span",2),b(1),ee()),t&2){let e=d();l(),C(e.texts.absentMarker)}}var SP=(()=>{class t{node=H.required();sidecarRoot=H(null);overlay=H(void 0);texts=TP;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)});sidecarPresent=E(()=>this.overlay()?.present===!0);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:46,vars:18,consts:[["data-testid","inspector-debug-panel",1,"dbg__kv"],["data-testid","dbg-for-path"],[1,"dbg__absent"],["data-testid","dbg-body-hash-stored"],[3,"dbg__diff"],["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"],["data-testid","dbg-sidecar-present"]],template:function(n,i){if(n&1&&(J(0,"dl",0)(1,"dt"),b(2),ee(),J(3,"dd",1),P(4,ade,2,1,"code")(5,sde,2,1,"span",2),ee(),J(6,"dt"),b(7),ee(),J(8,"dd",3),P(9,lde,2,3,"code",4)(10,cde,2,1,"span",2),ee(),J(11,"dt"),b(12),ee(),J(13,"dd",5),P(14,dde,2,3,"code",4)(15,ude,2,1,"span",2),ee(),J(16,"dt"),b(17),ee(),J(18,"dd",6),P(19,pde,2,3,"code",4)(20,hde,2,1,"span",2),ee(),J(21,"dt"),b(22),ee(),J(23,"dd",7),P(24,fde,2,3,"code",4)(25,mde,2,1,"span",2),ee(),J(26,"dt"),b(27),ee(),J(28,"dd",8),P(29,_de,2,1,"code")(30,gde,2,1,"span",2),ee(),J(31,"dt"),b(32),ee(),J(33,"dd",9),P(34,bde,2,1,"code")(35,vde,2,1,"span",2),ee(),J(36,"dt"),b(37),ee(),J(38,"dd",10),P(39,yde,2,1,"code")(40,Cde,2,1,"span",2),ee(),J(41,"dt"),b(42),ee(),J(43,"dd",11)(44,"code"),b(45),ee()()()),n&2){let r,a,s,c,u,m,g,x;l(2),C(i.texts.fields.forPath),l(2),R((r=i.identityBlock().path)?4:5,r),l(3),C(i.texts.fields.bodyHashStored),l(2),R((a=i.identityBlock().bodyHash)?9:10,a),l(3),C(i.texts.fields.bodyHashLive),l(2),R((s=i.bodyHashLive())?14:15,s),l(3),C(i.texts.fields.frontmatterHashStored),l(2),R((c=i.identityBlock().frontmatterHash)?19:20,c),l(3),C(i.texts.fields.frontmatterHashLive),l(2),R((u=i.frontmatterHashLive())?24:25,u),l(3),C(i.texts.fields.resolvedProvider),l(2),R((m=i.identityBlock().resolvedProvider)?29:30,m),l(3),C(i.texts.fields.resolvedKind),l(2),R((g=i.identityBlock().resolvedKind)?34:35,g),l(3),C(i.texts.fields.sidecarStatus),l(2),R((x=i.sidecarStatusLiteral())?39:40,x),l(3),C(i.texts.fields.sidecarPresent),l(3),C(i.sidecarPresent())}},styles:["[_nghost-%COMP%]{display:block}.dbg__kv[_ngcontent-%COMP%]{display:grid;grid-template-columns:max-content 1fr;column-gap:.6rem;row-gap:.2rem;margin:0;font-size:.8rem}.dbg__kv[_ngcontent-%COMP%] dt[_ngcontent-%COMP%]{color:var(--sm-text-muted);font-family:var(--sm-font-mono);font-weight:500}.dbg__kv[_ngcontent-%COMP%] dd[_ngcontent-%COMP%]{margin:0}.dbg__kv[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{font-family:var(--sm-font-mono);font-size:.78rem;background:var(--sm-bg-hover);padding:.05rem .3rem;border-radius:var(--sm-radius-sm);word-break:break-all}.dbg__diff[_ngcontent-%COMP%]{background:var(--sm-severity-error-bg);color:var(--sm-severity-error)}.dbg__absent[_ngcontent-%COMP%]{font-family:var(--sm-font-mono);font-size:.78rem;color:var(--sm-text-muted);font-style:italic}"],changeDetection:0})}return t})();function xde(t,o){if(t&1&&(J(0,"span",3),b(1),J(2,"code"),b(3),ee()()),t&2){d(2);let e=Ie(0),n=d();l(),Me(" ",n.texts.fields.lastBumpedBy," "),l(2),C(e.lastBumpedBy)}}function wde(t,o){if(t&1&&(J(0,"dt"),b(1),ee(),J(2,"dd")(3,"span",2),b(4),ee(),P(5,xde,4,2,"span",3),ee()),t&2){d();let e=Ie(0),n=d();l(),C(n.texts.fields.lastBumpedAt),l(2),it("title",e.lastBumpedAt),l(),C(n.lastBumpedRel()),l(),R(e.lastBumpedBy!==null?5:-1)}}function Tde(t,o){if(t&1&&(J(0,"span",3),b(1),J(2,"code"),b(3),ee()()),t&2){d(2);let e=Ie(0),n=d();l(),Me(" ",n.texts.fields.createdBy," "),l(2),C(e.createdBy)}}function Sde(t,o){if(t&1&&(J(0,"dt"),b(1),ee(),J(2,"dd")(3,"span",2),b(4),ee(),P(5,Tde,4,2,"span",3),ee()),t&2){d();let e=Ie(0),n=d();l(),C(n.texts.fields.createdAt),l(2),it("title",e.createdAt),l(),C(n.createdRel()),l(),R(e.createdBy!==null?5:-1)}}function kde(t,o){if(t&1&&(Wt(0),J(1,"dl",0),P(2,wde,6,4),P(3,Sde,6,4),ee()),t&2){let e=Mt(d().audit());l(2),R(e.lastBumpedAt!==null?2:-1),l(),R(e.createdAt!==null?3:-1)}}function Ide(t,o){if(t&1&&(J(0,"p",1),b(1),ee()),t&2){let e=d();l(),C(e.texts.headerEmpty)}}var kP=(()=>{class t{sidecarRoot=H(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:xf(r.lastBumpedAt),lastBumpedBy:xf(r.lastBumpedBy),createdAt:xf(r.createdAt),createdBy:xf(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:gr(e)});createdRel=E(()=>{let e=this.audit().createdAt;return e===null?null:gr(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,"audit__kv"],["data-testid","inspector-audit-panel-empty",1,"audit__empty"],[3,"title"],[1,"audit__by"]],template:function(n,i){n&1&&P(0,kde,4,3,"dl",0)(1,Ide,2,1,"p",1),n&2&&R(i.hasContent()?0:1)},styles:["[_nghost-%COMP%]{display:block}.audit__kv[_ngcontent-%COMP%]{display:grid;grid-template-columns:max-content 1fr;column-gap:.6rem;row-gap:.2rem;margin:0;font-size:.85rem}.audit__kv[_ngcontent-%COMP%] dt[_ngcontent-%COMP%]{color:var(--sm-text-muted);font-weight:500}.audit__kv[_ngcontent-%COMP%] dd[_ngcontent-%COMP%]{margin:0}.audit__by[_ngcontent-%COMP%]{color:var(--sm-text-muted)}.audit__by[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{font-family:var(--sm-font-mono);font-size:.78rem}.audit__empty[_ngcontent-%COMP%]{margin:0;font-style:italic;color:var(--sm-text-muted);font-size:.85rem}"],changeDetection:0})}return t})();function xf(t){return typeof t=="string"&&t.length>0?t:null}function Ede(t,o){if(t&1&&(f(0,"span",7),F(1,"i",19),b(2),_()),t&2){let e=d();h("pTooltip",e.texts.header.invalidFrontmatterTooltip),l(2),Me(" ",e.texts.header.invalidFrontmatter," ")}}function Mde(t,o){t&1&&(f(0,"span",8),b(1),_()),t&2&&(l(),C(o))}function Dde(t,o){if(t&1&&(f(0,"span",9)(1,"span",20),b(2,"\u25CF"),_(),b(3),_()),t&2){let e=o,n=d();h("pTooltip",e==="experimental"?n.cardTexts.stability.experimental:e==="deprecated"?n.cardTexts.stability.deprecated:""),O("data-stability",e),l(3),Me(" ",e," ")}}function Pde(t,o){if(t&1&&(f(0,"span",14),F(1,"i",21),_()),t&2){let e=d();h("pTooltip",e.headerStaleTooltip())}}function Rde(t,o){if(t&1&&(f(0,"div",17)(1,"span",22),b(2),_(),f(3,"button",23),F(4,"i",24),f(5,"span"),b(6),_()(),f(7,"button",25),F(8,"i",26),f(9,"span"),b(10),_()(),f(11,"button",27),F(12,"i",28),f(13,"span"),b(14),_()()()),t&2){let e=d();l(2),C(e.texts.actionMocks.label),l(4),C(e.texts.actionMocks.summary),l(4),C(e.texts.actionMocks.audit),l(4),C(e.texts.actionMocks.validate)}}function Ode(t,o){if(t&1&&(f(0,"span",29),b(1),_()),t&2){let e=o.$implicit;l(),C(e)}}function Fde(t,o){if(t&1&&(f(0,"div",18),he(1,Ode,2,1,"span",29,Ue),_()),t&2){let e=d();l(),fe(e.headerTools())}}var Nde=new Set(["red","orange","yellow","green","cyan","blue","purple","pink"]),IP=(()=>{class t{node=H.required();showActionMocks=H(!1);frontmatterInvalid=H(!1);favoriteToggle=bt();texts=Si;cardTexts=Hn;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(()=>os(this.node()));headerStability=E(()=>ho(this.node()));headerTitleColor=E(()=>{let e=this.node(),i=e.frontmatter.color;return typeof i=="string"&&Nde.has(i)?i:`var(--sm-kind-${e.kind})`});headerTools=E(()=>ob(this.node()));headerIsStale=E(()=>rs(this.node()));headerStaleTooltip=E(()=>ss(this.node(),Hn.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"]},outputs:{favoriteToggle:"favoriteToggle"},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-tools",1,"inspector__tools"],["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"],["type","button","data-testid","inspector-plugin-btn-summary",1,"inspector__plugin-btn"],["aria-hidden","true",1,"pi","pi-sparkles"],["type","button","data-testid","inspector-plugin-btn-audit",1,"inspector__plugin-btn"],["aria-hidden","true",1,"pi","pi-search"],["type","button","data-testid","inspector-plugin-btn-validate",1,"inspector__plugin-btn"],["aria-hidden","true",1,"pi","pi-check-circle"],[1,"inspector__tool-tag"]],template:function(n,i){if(n&1&&(f(0,"header",0)(1,"span",1),b(2),_(),f(3,"div",2),F(4,"sm-kind-icon",3),_(),f(5,"div",4)(6,"div",5)(7,"h2",6),b(8),_(),P(9,Ede,3,2,"span",7),P(10,Mde,2,1,"span",8),P(11,Dde,4,3,"span",9),_(),f(12,"code",10),b(13),_()(),f(14,"div",11)(15,"button",12),A("click",function(a){return i.onFavoriteClick(a)}),F(16,"i",13),_(),P(17,Pde,2,1,"span",14),F(18,"sm-view-contributions-host",15)(19,"sm-view-contributions-host",16),_(),P(20,Rde,15,4,"div",17),P(21,Fde,3,0,"div",18),_()),n&2){let r,a,s=i.node();l(2),C(s.kind),l(2),h("kind",s.kind)("provider",s.provider)("size",18),l(4),C(i.headerName()),l(),R(i.frontmatterInvalid()?9:-1),l(),R((r=i.headerVersion())?10:-1,r),l(),R((a=i.headerStability())?11:-1,a),l(2),C(s.path),l(2),ce("inspector__favorite--on",s.isFavorite===!0),h("pTooltip",s.isFavorite===!0?i.cardTexts.favoriteRemoveTooltip:i.cardTexts.favoriteAddTooltip),O("aria-label",s.isFavorite===!0?i.cardTexts.ariaFavoriteRemove:i.cardTexts.ariaFavoriteAdd),l(),ce("pi-star-fill",s.isFavorite===!0)("pi-star",s.isFavorite!==!0),l(),R(i.headerIsStale()?17:-1),l(),h("node",s),l(),h("node",s),l(),R(i.showActionMocks()?20:-1),l(),R(i.headerTools().length>0?21:-1)}},dependencies:[ze,Ve,nr,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 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(--sm-severity-warn);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__plugin-btn[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.35rem;padding:.3rem .65rem;border:1px solid var(--sm-border);border-radius:var(--sm-radius-md);background:var(--sm-bg-content);color:var(--p-text-color);font-size:.78rem;font-weight:500;cursor:pointer;transition:background .12s ease,border-color .12s ease,color .12s ease;font-family:inherit}.inspector__plugin-btn[_ngcontent-%COMP%]:hover{background:var(--sm-bg-hover);border-color:var(--p-text-muted-color);color:var(--p-text-color)}.inspector__plugin-btn[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:.82rem}.inspector__tools[_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__tool-tag[_ngcontent-%COMP%]{display:inline-flex;align-items:center;padding:.1rem .5rem;border-radius:var(--sm-radius-sm);background:var(--sm-bg-hover);color:var(--p-text-color);font-family:var(--sm-font-mono);font-size:.7rem;font-weight:500;line-height:1.35;flex:none}"],changeDetection:0})}return t})();function x0(t){kn(x0);let{path:o,dataSource:e,markdown:n}=t,i=Q("idle"),r=Q(null),a=0,s=async(u,m)=>{try{let g=await e.getNode(u,{includeBody:!0});if(m!==a)return;if(g===null){i.set("unavailable");return}let x=g.item.body;if(x===null){i.set("unavailable");return}if(x===void 0||x.trim().length===0){i.set("empty");return}let I=await n.render(x);if(m!==a)return;r.set(I),i.set("ready")}catch{if(m!==a)return;i.set("error")}};ge(()=>{let u=o(),m=++a;if(r.set(null),!u){i.set("idle");return}i.set("loading"),s(u,m)});let c=()=>{let u=o();if(!u||i()==="loading")return;let m=++a;r.set(null),i.set("loading"),s(u,m)};return{bodyState:i.asReadonly(),bodyHtml:r.asReadonly(),refresh:c}}function w0(t){kn(w0);let{node:o,sidecarService:e,confirmation:n}=t,i=Si,r=E(()=>{let k=o();if(!k)return!1;let N=k.sidecar;return!N||N.present===!1||N.status==="fresh"?!1:ib(N)}),a=Q(!1),s=Q(null),c=E(()=>{let N=o()?.sidecar;return!N||N.present===!1?i.bump.tooltipDisabledNoSidecar:r()?i.bump.tooltipEnabled:i.bump.tooltipDisabledFresh}),u=k=>{if(k instanceof Gf)switch(k.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} ${k.message||i.bump.errorGeneric}`}let N=k instanceof Error?k.message:String(k);return`${i.bump.errorPrefix} ${N||i.bump.errorGeneric}`},m=async k=>{if(!a()){a.set(!0),s.set(null);try{await e.bump(k,{confirm:!0})}catch(N){s.set(u(N))}finally{a.set(!1)}}},g=k=>{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:()=>{m(k)}})},x=async()=>{let k=o();if(k&&r()&&!a()){a.set(!0),s.set(null);try{await e.bump(k.path)}catch(N){if(N instanceof Gf&&N.code==="confirm-required"&&Ade(N.details)){g(k.path);return}s.set(u(N))}finally{a.set(!1)}}},I=()=>{s.set(null)};return{canBump:r,bumpInFlight:a.asReadonly(),bumpError:s.asReadonly(),bumpTooltip:c,onBumpClick:x,dismissBumpError:I}}function Ade(t){return typeof t!="object"||t===null?!1:t.key==="allowEditSmFiles"}function T0(t){kn(T0);let{path:o,pathSet:e,dataSource:n}=t,i=Q(new Set),r=Q(new Set),a=Q(new Set);return ge(()=>{o(),i.set(new Set),r.set(new Set),a.set(new Set)}),{linkStatus:m=>e().has(m)||i().has(m)?"live":r().has(m)?"dead-confirmed":"dead-heuristic",isVerifying:m=>a().has(m),verifyDeadLink:async m=>{if(!(i().has(m)||r().has(m))&&!a().has(m)){a.update(g=>new Set(g).add(m));try{await n.getNode(m)===null?r.update(x=>new Set(x).add(m)):i.update(x=>new Set(x).add(m))}catch{}finally{a.update(g=>{let x=new Set(g);return x.delete(m),x})}}}}}function S0(t){kn(S0);let o=Q(!1),e=Q(!1),n=Q(!1);return ge(()=>{t.path(),o.set(!1),e.set(!1),n.set(!1)}),{auditExpanded:o.asReadonly(),pluginsExpanded:e.asReadonly(),debugVisible:n.asReadonly(),toggleAudit:()=>o.update(i=>!i),togglePlugins:()=>e.update(i=>!i),toggleDebug:()=>n.update(i=>!i)}}var Lde=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"]),Bde=new Set(["identity","annotations","settings","audit"]),Vde=new Set(["agent","skill","command"]);function EP(t){let{node:o,texts:e}=t,n=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}),i=E(()=>{let c=o()?.kind;return c!==void 0&&Vde.has(c)}),r=E(()=>{let c=n();if(!c)return!1;for(let u of Object.keys(c))if(!Bde.has(u))return!0;return!1}),a=E(()=>{let c=o()?.contributions??[];for(let u of c)if(Lde.has(u.slot))return!0;return!1}),s=E(()=>{let c=n();if(!c)return e.audit.headerEmpty;let u=c.audit;if(typeof u!="object"||u===null)return e.audit.headerEmpty;let m=u,g=typeof m.lastBumpedAt=="string"?m.lastBumpedAt:null,x=typeof m.lastBumpedBy=="string"?m.lastBumpedBy:null;return g===null?e.audit.headerEmpty:e.audit.headerSummary(gr(g),x??"?")});return{sidecarRoot:n,hasVendorFrontmatter:i,hasPluginContributions:r,hasViewContributions:a,auditSummary:s}}function Hde(t,o){if(t&1&&(f(0,"section",0)(1,"div",2),F(2,"span",3),f(3,"p",4),b(4),_(),f(5,"p",5),b(6),_()()()),t&2){let e=d();l(4),C(e.texts.emptyNoSelection.title),l(2),C(e.texts.emptyNoSelection.desc)}}function qde(t,o){if(t&1&&(f(0,"section",0)(1,"div",6),F(2,"span",7),f(3,"p",4),b(4),_(),f(5,"p",5)(6,"code"),b(7),_(),f(8,"span"),b(9),_()()()()),t&2){let e=d();l(4),C(e.texts.emptyNotFound.title),l(3),C(e.path()),l(2),C(e.texts.emptyNotFound.descSuffix)}}function Gde(t,o){if(t&1&&F(0,"p",9),t&2){let e=d(2);h("innerHTML",e.descriptionHtml(),sr)}}function jde(t,o){if(t&1&&(f(0,"div",10),F(1,"i",38),f(2,"span"),b(3),_()()),t&2){let e=d(2);l(3),C(e.texts.supersededByBanner(o))}}function Ude(t,o){if(t&1){let e=te();f(0,"div",11),F(1,"i",39),f(2,"span"),b(3),_(),f(4,"button",40),A("click",function(){w(e);let i=d(2);return T(i.dismissBumpError())}),F(5,"i",41),_()()}if(t&2){let e=d(2);l(3),C(o),l(),O("aria-label",e.texts.bumpErrorDismissAriaLabel)}}function $de(t,o){if(t&1&&(f(0,"div",15),F(1,"sm-vendor-frontmatter",42),_()),t&2){d();let e=Ie(0),n=Ie(1),i=d();l(),h("frontmatter",n)("kind",e.kind)("provider",e.provider)("knownPaths",i.pathSet())("onSkillClick",i.onSkillChip)}}function Wde(t,o){if(t&1){let e=te();f(0,"section",16)(1,"h3",18),b(2),_(),f(3,"sm-annotations-panel",43),A("openPath",function(i){w(e);let r=d(2);return T(r.openPath(i))})("tagClick",function(i){w(e);let r=d(2);return T(r.tagSelect.emit(i))}),_()()}if(t&2){d();let e=Ie(0),n=d();l(2),C(n.texts.sections.annotations),l(),h("overlay",e.sidecar)("knownPaths",n.pathSet())("activeTag",n.activeTag())}}function Kde(t,o){if(t&1&&(f(0,"p",51)(1,"strong"),b(2),_(),b(3),_()),t&2){let e=d(4);l(2),C(e.texts.findingHintLabel),l(),Me(" ",o," ")}}function Yde(t,o){if(t&1&&(f(0,"li",46)(1,"div",47)(2,"span",48),b(3),_(),f(4,"code",49),b(5),_()(),f(6,"p",50),b(7),_(),P(8,Kde,4,2,"p",51),_()),t&2){let e,n=o.$implicit;O("data-severity",n.severity),l(2),O("data-severity",n.severity),l(),C(n.severity),l(2),C(n.analyzerId),l(2),C(n.message),l(),R((e=n.fix==null?null:n.fix.summary)?8:-1,e)}}function Zde(t,o){if(t&1&&(f(0,"section",20)(1,"h3",18),b(2),f(3,"span",44),b(4),_()(),f(5,"ul",45),he(6,Yde,9,6,"li",46,Df),_()()),t&2){let e=d(2);l(2),Me(" ",e.texts.sections.findings," "),l(2),Me("(",e.issues().length,")"),l(2),fe(e.issues())}}function Xde(t,o){if(t&1&&F(0,"sm-inspector-audit-panel",25),t&2){let e=d(2);h("sidecarRoot",e.sidecarRoot())}}function Qde(t,o){if(t&1&&F(0,"sm-plugin-contributions",25),t&2){let e=d(3);h("sidecarRoot",e.sidecarRoot())}}function Jde(t,o){if(t&1){let e=te();f(0,"section",26)(1,"button",52),A("click",function(){w(e);let i=d(2);return T(i.togglePlugins())}),f(2,"span",18),b(3),_(),F(4,"i",24),_(),P(5,Qde,1,1,"sm-plugin-contributions",25),_()}if(t&2){let e=d(2);l(),O("aria-expanded",e.pluginsExpanded()),l(2),C(e.texts.sections.plugins),l(),ce("pi-chevron-right",!e.pluginsExpanded())("pi-chevron-down",e.pluginsExpanded()),l(),R(e.pluginsExpanded()?5:-1)}}function eue(t,o){if(t&1&&(f(0,"section",27)(1,"h3",18),b(2),_(),F(3,"sm-inspector-slots-panel",53),_()),t&2){let e=d(2);l(2),C(e.texts.sections.viewContributions),l(),h("node",e.node())}}function tue(t,o){if(t&1&&(f(0,"div",30),F(1,"sm-inspector-debug-panel",54),_()),t&2){d();let e=Ie(0),n=d();l(),h("node",e)("sidecarRoot",n.sidecarRoot())("overlay",e.sidecar)}}function nue(t,o){if(t&1&&(f(0,"p",32),b(1),_()),t&2){let e=d(2);l(),C(e.texts.body.loading)}}function iue(t,o){if(t&1&&(f(0,"p",33),b(1),_()),t&2){let e=d(2);l(),C(e.texts.body.empty)}}function oue(t,o){if(t&1&&(f(0,"p",34),b(1),_()),t&2){let e=d(2);l(),C(e.texts.body.unavailable)}}function rue(t,o){if(t&1&&(f(0,"p",35),b(1),_()),t&2){let e=d(2);l(),C(e.texts.body.renderError)}}function aue(t,o){if(t&1&&F(0,"div",36),t&2){let e=d(2);h("innerHTML",e.bodyHtml(),sr)}}function sue(t,o){if(t&1){let e=te();Wt(0)(1),f(2,"section",0)(3,"sm-inspector-header",8),A("favoriteToggle",function(i){w(e);let r=d();return T(r.onHeaderFavoriteToggle(i))}),_(),P(4,Gde,1,1,"p",9),P(5,jde,4,1,"div",10),P(6,Ude,6,2,"div",11),f(7,"div",12)(8,"p-button",13),A("onClick",function(){w(e);let i=d();return T(i.onBumpClick())}),_(),f(9,"p-button",14),A("onClick",function(){w(e);let i=d();return T(i.refreshBody())}),_()(),P(10,$de,2,5,"div",15),P(11,Wde,4,4,"section",16),f(12,"section",17)(13,"h3",18),b(14),_(),f(15,"sm-linked-nodes-panel",19),A("openPath",function(i){w(e);let r=d();return T(r.openPath(i))}),_()(),P(16,Zde,8,2,"section",20),f(17,"section",21)(18,"button",22),A("click",function(){w(e);let i=d();return T(i.toggleAudit())}),f(19,"span",18),b(20),_(),f(21,"span",23),b(22),_(),F(23,"i",24),_(),P(24,Xde,1,1,"sm-inspector-audit-panel",25),_(),P(25,Jde,6,7,"section",26),P(26,eue,4,2,"section",27),f(27,"section",28)(28,"button",29),A("click",function(){w(e);let i=d();return T(i.toggleDebug())}),f(29,"span",18),b(30),_(),F(31,"i",24),_(),P(32,tue,2,3,"div",30),_(),f(33,"section",31)(34,"h3",18),b(35),_(),P(36,nue,2,1,"p",32)(37,iue,2,1,"p",33)(38,oue,2,1,"p",34)(39,rue,2,1,"p",35)(40,aue,1,1,"div",36),_(),F(41,"p-confirmdialog",37),_()}if(t&2){let e,n,i,r=d(),a=Mt(r.node());l();let s=Mt(a.frontmatter);l(),$e("--accent","var(--sm-kind-"+a.kind+", var(--sm-kind-markdown))"),l(),h("node",a)("showActionMocks",r.showActionMocks)("frontmatterInvalid",r.frontmatterInvalid()),l(),R(s.description?4:-1),l(),R((e=r.headerSupersededBy())?5:-1,e),l(),R((n=r.bumpError())?6:-1,n),l(2),h("label",r.texts.bump.label)("disabled",!r.canBump()||r.bumpInFlight())("loading",r.bumpInFlight())("pTooltip",r.bumpTooltip()),l(),h("text",!0)("ariaLabel",r.texts.body.refreshLabel)("pTooltip",r.texts.body.refreshLabel)("disabled",r.bodyState()==="loading"||!r.path())("loading",r.bodyState()==="loading"),l(),R(r.hasVendorFrontmatter()?10:-1),l(),R(a.sidecar!=null&&a.sidecar.present?11:-1),l(3),C(r.texts.sections.connections),l(),h("path",a.path),l(),R(r.issues().length>0?16:-1),l(2),O("aria-expanded",r.auditExpanded()),l(2),C(r.texts.sections.audit),l(2),C(r.auditSummary()),l(),ce("pi-chevron-right",!r.auditExpanded())("pi-chevron-down",r.auditExpanded()),l(),R(r.auditExpanded()?24:-1),l(),R(r.hasPluginContributions()?25:-1),l(),R(r.hasViewContributions()?26:-1),l(2),h("pTooltip",r.texts.debugToggleTooltip),O("aria-expanded",r.debugVisible())("aria-label",r.texts.debugToggleAriaLabel),l(2),C(r.texts.sections.debug),l(),ce("pi-chevron-right",!r.debugVisible())("pi-chevron-down",r.debugVisible()),l(),R(r.debugVisible()?32:-1),l(3),C(r.texts.sections.body),l(),R((i=r.bodyState())==="loading"?36:i==="empty"?37:i==="unavailable"?38:i==="error"?39:i==="ready"?40:-1),l(5),h("ariaLabel",r.texts.bump.consentDialogAriaLabel)}}var MP=(()=>{class t{loader=p(Ht);nodeOpenIntent=p(fo);dataSource=p(ei);markdown=p(_s);sidecarService=p(XD);confirmation=p(lo);texts=Si;cardTexts=Hn;showActionMocks=tr.inspector.actionMocks;path=H(void 0);activeTag=H(null);tagSelect=bt();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});headerSupersededBy=E(()=>rb(this.node()));bodyHandle=x0({path:this.path,dataSource:this.dataSource,markdown:this.markdown});bodyState=this.bodyHandle.bodyState;bodyHtml=this.bodyHandle.bodyHtml;descriptionHtml=La(()=>this.node()?.frontmatter.description??"",this.markdown);deadLink=T0({path:this.path,pathSet:this.pathSet,dataSource:this.dataSource});sectionCollapse=S0({path:this.path});auditExpanded=this.sectionCollapse.auditExpanded;pluginsExpanded=this.sectionCollapse.pluginsExpanded;debugVisible=this.sectionCollapse.debugVisible;derivations=EP({node:this.node,texts:this.texts});sidecarRoot=this.derivations.sidecarRoot;hasVendorFrontmatter=this.derivations.hasVendorFrontmatter;hasPluginContributions=this.derivations.hasPluginContributions;hasViewContributions=this.derivations.hasViewContributions;auditSummary=this.derivations.auditSummary;issues=Q([]);issuesLoaderEffect=ge(e=>{let n=this.path();if(this.issues.set([]),!n)return;let i=!1;e(()=>{i=!0}),this.dataSource.listIssues({node:n}).then(r=>{i||this.issues.set(r.items)}).catch(()=>{i||this.issues.set([])})});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)}refreshBody(){this.bodyHandle.refresh()}onHeaderFavoriteToggle(e){let n=this.node();!n||n.path!==e||this.loader.toggleFavorite(e,!n.isFavorite)}toggleAudit(){this.sectionCollapse.toggleAudit()}togglePlugins(){this.sectionCollapse.togglePlugins()}toggleDebug(){this.sectionCollapse.toggleDebug()}bumpHandle=w0({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:[ve([lo])],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","node","showActionMocks","frontmatterInvalid"],["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"],["icon","pi pi-refresh","severity","secondary","size","small","data-testid","inspector-body-refresh",3,"onClick","text","ariaLabel","pTooltip","disabled","loading"],["data-testid","inspector-card-vendor-frontmatter",1,"inspector__vendor"],["data-testid","inspector-card-annotations",1,"sm-block"],["data-testid","inspector-card-linked-nodes",1,"sm-block"],[1,"sm-block__title"],[3,"openPath","path"],["data-testid","inspector-findings",1,"sm-block"],["data-testid","inspector-card-audit",1,"sm-block","sm-block--collapsible"],["type","button","data-testid","inspector-audit-toggle",1,"sm-block__row","sm-block__row--toggle",3,"click"],["data-testid","inspector-audit-summary",1,"sm-block__summary"],["aria-hidden","true",1,"pi","sm-block__chevron"],[3,"sidecarRoot"],["data-testid","inspector-card-plugins",1,"sm-block","sm-block--collapsible"],["data-testid","inspector-card-view-contributions",1,"sm-block"],["data-testid","inspector-card-debug",1,"sm-block","sm-block--collapsible"],["type","button","data-testid","inspector-debug-toggle",1,"sm-block__row","sm-block__row--toggle",3,"click","pTooltip"],["data-testid","inspector-debug-section",1,"inspector__debug"],["data-testid","inspector-card-body",1,"sm-block","inspector__body-section"],["data-testid","inspector-body-loading",1,"inspector__body-status"],["data-testid","inspector-body-empty",1,"inspector__body-status"],["data-testid","inspector-body-unavailable",1,"inspector__body-status","inspector__body-status--warn"],["data-testid","inspector-body-error",1,"inspector__body-status","inspector__body-status--warn"],["data-testid","inspector-body-rendered",1,"inspector__body-rendered",3,"innerHTML"],["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"],[3,"frontmatter","kind","provider","knownPaths","onSkillClick"],[3,"openPath","tagClick","overlay","knownPaths","activeTag"],[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"],["type","button","data-testid","inspector-plugins-toggle",1,"sm-block__row","sm-block__row--toggle",3,"click"],[3,"node"],[3,"node","sidecarRoot","overlay"]],template:function(n,i){n&1&&P(0,Hde,7,2,"section",0)(1,qde,10,3,"section",0)(2,sue,42,46,"section",1),n&2&&R(i.path()?i.node()?2:1:0)},dependencies:[dn,Yt,ze,Ve,fs,hs,mP,aP,gP,xP,wP,SP,kP,IP],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}[_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+:not(.inspector__debug){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)}.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}.inspector__body-rendered[_ngcontent-%COMP%]{font-size:.9rem;line-height:1.6;max-height:480px;overflow:auto;padding:.25rem 0 0}.inspector__body-rendered[_ngcontent-%COMP%] [_ngcontent-%COMP%]:first-child{margin-top:0}.inspector__body-rendered[_ngcontent-%COMP%] [_ngcontent-%COMP%]:last-child{margin-bottom:0}.inspector__body-rendered[_ngcontent-%COMP%] pre[_ngcontent-%COMP%]{background:var(--p-content-background);border:1px solid var(--p-content-border-color);border-radius:var(--sm-radius-md);padding:.75rem;margin:.75rem 0;white-space:pre-wrap;word-wrap:break-word;font-family:var(--sm-font-mono);font-size:.85rem;line-height:1.5;overflow-x:auto}.inspector__body-rendered[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{background:var(--sm-bg-hover);padding:.1rem .3rem;border-radius:var(--sm-radius-sm);font-family:var(--sm-font-mono);font-size:.85em}.inspector__body-rendered[_ngcontent-%COMP%] pre[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{background:transparent;padding:0;border-radius:0}.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__debug[_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 DP=(()=>{class t{smMiddleMousePan=H.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 PP(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 RP(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 m=a.get(c);if(!m){a.set(c,{x:u.x,y:u.y}),r=!0;continue}m.manual!==!0&&s&&(m.x===u.x&&m.y===u.y||(a.set(c,{x:u.x,y:u.y}),r=!0))}return{next:a,dirty:r}}function OP(t){let{selectedPath:o,setSelectedNodeId:e,readSelectedNodeId:n,graphNodes:i,onDeepLinkSelect:r,router:a,route:s}=t,c=bb(s.queryParamMap.pipe(E0(u=>u.get("path"))),{initialValue:s.snapshot.queryParamMap.get("path")});ge(()=>{let u=c(),m=i();if(m.length===0||!u)return;let g=rn(()=>n());if(g!==null&&m.find(k=>k.id===g)?.view.path===u)return;let x=m.find(I=>I.view.path===u);x&&(e(x.id),r?.(x.id))}),ge(()=>{let u=o(),m=rn(()=>c());(u??null)!==(m??null)&&a.navigate([],{relativeTo:s,queryParams:{path:u??null},queryParamsHandling:"merge",replaceUrl:!0})})}function FP(t,o){return as(t).includes(o)}function NP(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 AP(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 LP(t){return t.querySelector(".p-overlay-mask, .p-dialog, .p-overlay")!==null}var BP="sm.graph.viewport",VP="sm.graph.node-positions",zP="sm.graph.node-expanded",HP="sm.graph.panel-width";function qP(){let t=null;try{t=localStorage.getItem(BP)}catch{return null}if(!t)return null;let o;try{o=JSON.parse(t)}catch{return null}return AP(o)?o:null}function GP(t){try{localStorage.setItem(BP,JSON.stringify(t))}catch{}}function jP(){let t=new Map,o=null;try{o=localStorage.getItem(VP)}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(!NP(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(VP,JSON.stringify(o))}catch{}}function UP(){let t=null;try{t=localStorage.getItem(zP)}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 wf(t){try{localStorage.setItem(zP,JSON.stringify([...t]))}catch{}}function $P(){let t=null;try{t=localStorage.getItem(HP)}catch{return null}if(!t)return null;let o=Number(t);return!Number.isFinite(o)||o<=0?null:o}function WP(t){try{localStorage.setItem(HP,String(Math.round(t)))}catch{}}var KP=400,Tf=400,YP=80;function ZP(t){let o=Q(t.initialWidth),e=Q(typeof window>"u"?1920:window.innerWidth);typeof window<"u"&&Ga(window,"resize").pipe(go(t.destroyRef)).subscribe(()=>e.set(window.innerWidth));let n=E(()=>{let g=Math.max(Tf,e()-YP),x=o();return x>g||x<Tf?Math.min(KP,g):x}),i=null,r=null,a=null,s=()=>{a=null,r!==null&&(o.set(r),r=null)},c=g=>{if(!i)return;let x=g.clientX-i.mouseX,I=i.widthAtStart-x,k=Math.max(Tf,e()-YP);r=Math.min(k,Math.max(Tf,I)),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 Sf(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 Oe of o)Oe.x<r&&(r=Oe.x),Oe.y<a&&(a=Oe.y),Oe.x+260>s&&(s=Oe.x+260),Oe.y+120>c&&(c=Oe.y+120);let u=Math.max(1,e.width-n),m=Math.max(1,s-r),g=Math.max(1,c-a),x=Math.max(1,u-160),I=Math.max(1,e.height-160),k=Math.min(x/m,I/g),N=Math.min(2,Math.max(i,k)),j=(r+s)/2,X=(a+c)/2,ne=u/2-j*N,pe=e.height/2-X*N;return{position:{x:ne,y:pe},scale:N}}function XP(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 Ha(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=lue(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 lue(t){return 1-Math.pow(1-t,3)}var QP=320;function JP(t){let o=Q(null),e=null,n=0,i=(c,u)=>{let m=++n;Ha({readPosition:()=>t.viewportPosition(),readScale:()=>t.viewportScale(),writePosition:g=>t.viewportPosition.set(g),writeScale:g=>t.viewportScale.set(g),isStaleToken:()=>m!==n},c,u)},r=c=>{let u=t.canvasWrap();if(!u||c.length===0)return;let m=t.fullLayout(),g=[];for(let I of c){let k=m.positions.get(I);k&&g.push(k)}if(g.length===0)return;let x=Sf({points:g,wrap:u,panelW:t.selectedNodeId()!==null?t.clampedPanelWidth():0,zoomMin:t.zoomMin});x&&i(x,QP)},a=()=>{let c=e;c&&(e=null,i({position:c.position,scale:c.scale},QP))};return{activeTagSelection:o,onTagSelect:c=>{let u=t.flow();if(!u)return;if(o()===c){u.clearSelection(),o.set(null),a();return}let m=t.nodes().filter(g=>FP(g,c)).map(g=>g.path);if(m.length===0){u.clearSelection(),o.set(null),a();return}e===null&&(e={position:ye({},t.viewportPosition()),scale:t.viewportScale()}),u.select(m,[]),o.set(c),r(m)}}}var kf=.05,k0=2;function e3(t){let o=Q(t.savedViewport?{x:t.savedViewport.x,y:t.savedViewport.y}:{x:0,y:0}),e=Q(t.savedViewport?.scale??1),n=E(()=>e()<k0-1e-6),i=E(()=>e()>kf+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()&&GP({x:a.position.x,y:a.position.y,scale:a.scale})}}}function t3(t){let o=E(()=>{let c=new Map;for(let u of t.graph().edges)c.has(u.from)||c.set(u.from,new Set),c.has(u.to)||c.set(u.to,new Set),c.get(u.from).add(u.to),c.get(u.to).add(u.from);return c}),e=c=>t.selectedNodeId()===c,n=c=>{let u=t.selectedNodeId();return u===null||u===c?!1:o().get(u)?.has(c)??!1},i=c=>{if(t.activeTagSelection()!==null)return!1;let u=t.selectedNodeId();return u===null||u===c?!1:!(o().get(u)?.has(c)??!1)},r=c=>{let u=t.selectedNodeId();return u!==null&&(c.from===u||c.to===u)},a=c=>{if(t.activeTagSelection()!==null)return!1;let u=t.selectedNodeId();return u===null?!1:c.from!==u&&c.to!==u},s=E(()=>{let c=t.selectedNodeId(),u=t.activeTagSelection()!==null,m=c!==null?o().get(c)??null:null,g=new Map;for(let x of t.graph().nodes){let I=x.id,k=c===I,N=!k&&c!==null&&(m?.has(I)??!1),j=!u&&c!==null&&!k&&!(m?.has(I)??!1);g.set(I,{selected:k,highlighted:N,dimmed:j})}return g});return{isSelected:e,isHighlighted:n,isDimmed:i,isEdgeHighlighted:r,isEdgeDimmed:a,selectionView:s}}function n3(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,m)=>{i||(i=new Map(t.nodePositions())),i.set(u,{x:m.x,y:m.y,manual:!0}),n=!0},s=u=>{e={x:u.clientX,y:u.clientY},document.addEventListener("mouseup",r,{once:!0})},c=u=>{let m=e;if(e=null,!m)return!0;let g=u.clientX-m.x,x=u.clientY-m.y;return Math.hypot(g,x)<=4};return t.destroyRef.onDestroy(()=>{document.removeEventListener("mouseup",r)}),{onNodePositionChange:a,onNodePointerDown:s,isClickWithoutDrag:c}}function i3(t){let o=Q(UP());return ge(()=>{let r=new Set(t.nodes().map(s=>s.path));if(r.size===0)return;let a=PP(o(),r);a.dirty&&(o.set(a.next),wf(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),wf(c)},resetAll:()=>{o.set(new Set),wf(new Set)},expandedNodeIds:o}}function o3(t){let o=Q(!1),e=!1,n=null;return ge(()=>{let i=t.visibleNodes();e||i.length!==0&&queueMicrotask(()=>{e=!0,o.set(!0),t.savedViewport||t.fit()})}),ge(()=>{let i=t.pathsFingerprint();if(!e){n=i;return}n!==i&&(n=i,(t.animatedFit??t.fit)())}),{hasCompletedInitialLayout:()=>o()}}var cue=["canvasWrap"],s3=(t,o)=>o.id;function due(t,o){if(t&1&&(f(0,"div",2),F(1,"span",8),f(2,"p",9),b(3),_()()),t&2){let e=d();l(3),C(e.texts.loading)}}function uue(t,o){if(t&1&&(f(0,"div",3),F(1,"span",10),f(2,"p",9),b(3),_(),f(4,"p",11),b(5),_()()),t&2){let e=d();l(3),C(e.texts.errorTitle),l(2),C(e.error())}}function pue(t,o){if(t&1){let e=te();f(0,"div",4),F(1,"i",12),f(2,"p",13),b(3),_(),f(4,"p-button",14),A("onClick",function(){w(e);let i=d();return T(i.resetFilters())}),_()()}if(t&2){let e=d();l(3),C(e.texts.emptyTitle),l(),h("label",e.texts.resetFilters)("text",!0)}}function hue(t,o){if(t&1){let e=te();f(0,"div",5),F(1,"i",15),f(2,"p",9),b(3),_(),f(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),C(e.texts.curationEmptyTitle),l(),h("label",e.texts.showAllOnMap)("text",!0)}}function fue(t,o){if(t&1&&(f(0,"f-connection",36),K(),f(1,"svg",37),F(2,"circle",38),_(),ja(),F(3,"f-connection-marker-arrow",39),_()),t&2){let e=o.$implicit,n=d(2);B("f-conn--"+e.kind),$e("opacity",n.edgeOpacity(e)),ce("f-conn--highlighted",n.isEdgeHighlighted(e))("f-conn--dimmed",n.isEdgeDimmed(e)),h("fOutputId",e.from+"-out")("fInputId",e.to+"-in")("fOutputSide",n.outputSide())("fInputSide",n.inputSide())("fType",n.connectionType())("fBehavior",n.connectionBehavior)("fReassignDisabled",!0),l(),h("type",n.markerStart)("width",9)("height",9)("refX",4.5)("refY",4.5),l(2),h("type",n.markerEnd)}}function mue(t,o){if(t&1){let e=te();se(0,23),f(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))}),f(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))}),_(),f(3,"div",43),F(4,"sm-view-contributions-host",44),_()(),le()}if(t&2){let e=o.$implicit,n=d(3);l(),h("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(),h("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),h("node",e.view)}}function _ue(t,o){if(t&1&&S(0,mue,5,14,"ng-container",40),t&2){let e=d(2);h("fVirtualForOf",e.graph().nodes)}}function gue(t,o){if(t&1){let e=te();f(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))}),f(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))}),_(),f(2,"div",43),F(3,"sm-view-contributions-host",44),_()()}if(t&2){let e=o.$implicit,n=d(3);h("fNodeId",e.id)("fNodePosition",e.position)("fInputId",e.id+"-in")("fOutputId",e.id+"-out"),O("data-testid","graph-node-"+e.id),l(),h("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),h("node",e.view)}}function bue(t,o){if(t&1&&(se(0,23),he(1,gue,4,12,"div",45,s3),le()),t&2){let e=d(2);l(),fe(e.graph().nodes)}}function vue(t,o){if(t&1&&F(0,"sm-perf-hud",29),t&2){let e=d(2);h("visible",e.visibleCount())("total",e.totalCount())("edges",e.edgeCount())}}function yue(t,o){if(t&1){let e=te();F(0,"span",34),f(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(),h("label",e.texts.toolbar.showAllLabel)("ariaLabel",e.texts.toolbar.showAllAria)("pTooltip",e.texts.toolbar.showAllTooltip)("text",!0)}}function Cue(t,o){if(t&1){let e=te();f(0,"div",17,0),A("click",function(i){w(e);let r=d();return T(r.onCanvasClick(i))}),f(2,"f-flow",18),A("fLoaded",function(){w(e);let i=d();return T(i.onLoaded())}),F(3,"f-selection-area"),f(4,"f-background"),F(5,"f-rect-pattern"),_(),F(6,"f-line-alignment",19),f(7,"f-canvas",20),A("fCanvasChange",function(i){w(e);let r=d();return T(r.onCanvasChange(i))}),se(8,21),he(9,fue,4,21,"f-connection",22,s3),le(),P(11,_ue,1,1,"ng-container",23)(12,bue,3,0,"ng-container",23),_(),F(13,"f-minimap"),_(),f(14,"div",24),F(15,"sm-kind-palette")(16,"sm-severity-palette")(17,"sm-link-kind-palette"),_(),f(18,"aside",25)(19,"div",26),A("mousedown",function(i){w(e);let r=d();return T(r.onPanelResizeStart(i))}),_(),f(20,"div",27)(21,"sm-inspector-view",28),A("tagSelect",function(i){w(e);let r=d();return T(r.onTagSelect(i))}),_()()(),P(22,vue,1,3,"sm-perf-hud",29),f(23,"div",30)(24,"p-button",31),A("onClick",function(){w(e);let i=d();return T(i.zoomIn())}),_(),f(25,"p-button",32),A("onClick",function(){w(e);let i=d();return T(i.zoomOut())}),_(),f(26,"p-button",33),A("onClick",function(){w(e);let i=d();return T(i.fitToScreen())}),_(),F(27,"span",34)(28,"sm-graph-layout-toolbar")(29,"span",34),f(30,"p-button",35),A("onClick",function(){w(e);let i=d();return T(i.resetLayout())}),_(),P(31,yue,2,4),_()()}if(t&2){let e=d();h("smMiddleMousePan",e.canvas()),l(2),h("fCache",e.perf.cache),l(4),h("fAlignThreshold",20),l(),h("position",e.viewportPosition())("scale",e.viewportScale())("fZoomStep",.06)("fZoomDblClickStep",.35)("fZoomMinimum",e.zoomMin)("fZoomMaximum",e.zoomMax)("debounceTime",150),l(2),fe(e.graph().edges),l(2),R(e.perf.virtualization?11:12),l(7),$e("width",e.clampedPanelWidth(),"px"),ce("is-open",e.selectedNodeId()!==null),O("aria-label",e.texts.a11y.panel),l(),O("aria-label",e.texts.panel.resizeLabel),l(2),h("path",e.selectedPath())("activeTag",e.activeTagSelection()),l(),R(e.perfHud()?22:-1),l(),O("aria-label",e.texts.a11y.toolbar),l(),h("ariaLabel",e.texts.toolbar.zoomIn)("pTooltip",e.texts.toolbar.zoomIn)("text",!0)("rounded",!0)("disabled",!e.canZoomIn()),l(),h("ariaLabel",e.texts.toolbar.zoomOut)("pTooltip",e.texts.toolbar.zoomOut)("text",!0)("rounded",!0)("disabled",!e.canZoomOut()),l(),h("ariaLabel",e.texts.toolbar.fitToScreen)("pTooltip",e.texts.toolbar.fitToScreen)("text",!0)("rounded",!0),l(4),h("ariaLabel",e.texts.toolbar.resetLayoutLabel)("pTooltip",e.texts.toolbar.resetLayoutTooltip)("text",!0)("rounded",!0),l(),R(e.mapVisibility.isActive()?31:-1)}}var r3=.2,a3=420,xue=.15,wue=.25,Tue=.75,Sue=.6,kue={selected:!1,highlighted:!1,dimmed:!1},If=(()=>{class t{loader=p(Ht);filters=p(cn);issuePaths=p(vo);mapVisibility=p(xs);graphPreferences=p(mf);router=p(es);route=p(Ja);confirmationService=p(lo);destroyRef=p(Et);dagreLayout=p(u0);injector=p(gt);usageTracker=p(Ib);flow=at(aa);canvas=at(ra);zoom=at(sa);canvasWrap=at("canvasWrap");connectionType=this.graphPreferences.connectionType;connectionBehavior=ai.FIXED;markerStart=Be.START_ALL_STATES;markerEnd=Be.END_ALL_STATES;perf=tr.graph.perf;perfHud=p(ZD).visible;savedViewport=qP();viewportStore=e3({savedViewport:this.savedViewport,hasCompletedInitialLayout:()=>this.layoutFit.hasCompletedInitialLayout()});viewportPosition=this.viewportStore.viewportPosition;viewportScale=this.viewportStore.viewportScale;canZoomIn=this.viewportStore.canZoomIn;canZoomOut=this.viewportStore.canZoomOut;zoomMin=kf;zoomMax=k0;texts=Ti;nodePositions=Q(jP());nodeDrag=n3({destroyRef:this.destroyRef,nodePositions:this.nodePositions});expansion=i3({nodes:this.loader.nodes});panelResize=ZP({destroyRef:this.destroyRef,initialWidth:$P()??400,onCommit:e=>WP(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(()=>Mb(this.loader.nodes(),this.loader.scan()));layoutPositions=Q(new Map);layoutComputedAtSignal=Q(0);fullLayout=E(()=>gn(ye({},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 Db(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(()=>ED(this.graphPreferences.layoutAlgorithm(),this.graphPreferences.layoutDirection()));inputSide=E(()=>this.connectionSides().input);outputSide=E(()=>this.connectionSides().output);selectedNodeId=Q(null);selectedPath=E(()=>{let e=this.selectedNodeId();return e?this.graph().nodes.find(i=>i.id===e)?.view.path:void 0});selectionGuard=ge(()=>{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=o3({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}});OP({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}),ge(()=>{let r=this.loader.nodes();if(r.length===0)return;let a=this.fullLayout();if(a.positions.size===0)return;let s=RP({nodes:r,current:this.nodePositions(),layout:a});s.dirty&&(this.nodePositions.set(s.next),za(s.next))}),ge(()=>{this.layoutComputedAt(),this.autoFitPending&&(this.autoFitPending=!1,this.runAnimatedFit())}),ge(()=>{this.layoutComputedAt();let r=this.layoutFit.hasCompletedInitialLayout(),a=this.pendingCenterNodeId();a===null||!r||this.fullLayout().positions.size!==0&&(this.pendingCenterNodeId.set(null),ao(()=>this.centerOnNode(a),{injector:this.injector}))}),ge(()=>{this.mapVisibility.paths(),rn(()=>this.layoutFit.hasCompletedInitialLayout())&&(this.mapFitDebounce!==null&&clearTimeout(this.mapFitDebounce),this.mapFitDebounce=setTimeout(()=>{ao(()=>this.runAnimatedFit(),{injector:this.injector})},180))}),this.destroyRef.onDestroy(()=>{this.mapFitDebounce!==null&&clearTimeout(this.mapFitDebounce)}),ge(()=>{let r=this.loader.nodes();r.length!==0&&this.mapVisibility.prune(new Set(r.map(a=>a.path)))});let n="",i="";ge(()=>{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=Eb(r,a.edges),u=`${s.algorithm}|${s.direction}|${s.spacing}`,m=`${c}|${u}`;if(m===n)return;let g=i!==""&&i!==u;n=m,i=u,(s.algorithm==="force"?Promise.resolve(Uf(r,a.edges)):Promise.resolve().then(()=>jf(this.dagreLayout,r,a.edges,s))).then(I=>{this.layoutPositions.set(I),this.layoutComputedAtSignal.set(performance.now()),g&&(this.nodePositions.set(new Map),this.fitToScreenClamped())}).catch(I=>{console.error("[graph-view] layout failed:",I)})})}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),ao(()=>{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?xn.ZOOM_OUT:xn.ZOOM_IN;n?.setZoom(this.getViewportCenter(),a,s,!1)},{injector:this.injector}))}autoFitAnimToken=0;autoFitPending=!1;mapFitDebounce=null;pendingCenterNodeId=Q(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 m=r.get(u)??i.get(u);m&&a.push({x:m.x,y:m.y})}if(a.length===0)return;let s=Sf({points:a,wrap:n,panelW:this.selectedNodeId()!==null?this.clampedPanelWidth():0,zoomMin:this.zoomMin});if(!s)return;let c=++this.autoFitAnimToken;Ha({readPosition:()=>this.viewportPosition(),readScale:()=>this.viewportScale(),writePosition:u=>this.viewportPosition.set(u),writeScale:u=>this.viewportScale.set(u),isStaleToken:()=>c!==this.autoFitAnimToken},s,a3)}centerOnNode(e){let n=this.canvasWrap()?.nativeElement;if(!n)return;let i=this.nodePositions().get(e)??this.fullLayout().positions.get(e);if(!i)return;let r=XP({point:i,wrap:{width:n.clientWidth,height:n.clientHeight},panelW:this.selectedNodeId()!==null?this.clampedPanelWidth():0,scale:this.viewportScale()}),a=++this.autoFitAnimToken;Ha({readPosition:()=>this.viewportPosition(),readScale:()=>this.viewportScale(),writePosition:s=>this.viewportPosition.set(s),writeScale:s=>this.viewportScale.set(s),isStaleToken:()=>a!==this.autoFitAnimToken},r,a3)}isolateChain(e){let n=ID(this.fullAdjacency(),e);this.mapVisibility.setOnly(n),this.selectedNodeId.set(e)}onNodePositionChange(e,n){this.nodeDrag.onNodePositionChange(e,n)}zoomIn(){this.zoom()?.setZoom(this.getViewportCenter(),r3,xn.ZOOM_IN,!0)}zoomOut(){this.zoom()?.setZoom(this.getViewportCenter(),r3,xn.ZOOM_OUT,!0)}fitToScreen(){this.fitToScreenClamped()}resetLayout(){let e=this.mapVisiblePaths();if(e.size<this.loader.nodes().length){this.applyResetLayout(e,!1);return}let n=Ti.resetLayoutConfirm;this.confirmationService.confirm({header:n.header,message:n.message,icon:"pi pi-exclamation-triangle",acceptButtonProps:{label:n.accept,severity:"danger"},rejectButtonProps:{label:n.reject,severity:"secondary",outlined:!0},accept:()=>this.applyResetLayout(e,!0)})}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"?Uf(n,i):jf(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=JP({flow:this.flow,nodes:this.loader.nodes,fullLayout:E(()=>this.fullLayout()),canvasWrap:()=>{let e=this.canvasWrap()?.nativeElement;return e?{width:e.clientWidth,height:e.clientHeight}:null},selectedNodeId:this.selectedNodeId,clampedPanelWidth:this.clampedPanelWidth,zoomMin:kf,viewportPosition:this.viewportPosition,viewportScale:this.viewportScale});activeTagSelection=this.tagSelection.activeTagSelection;selectionState=t3({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"&&LP(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)??kue}isExpanded(e){return this.expansion.isExpanded(e)}setExpanded(e,n){this.expansion.setExpanded(e,n)}onFavoriteToggle(e){this.loader.toggleFavorite(e.path,e.value)}isEdgeHighlighted(e){return this.selectionState.isEdgeHighlighted(e)}isEdgeDimmed(e){return this.selectionState.isEdgeDimmed(e)}edgeOpacity(e){if(this.isEdgeDimmed(e))return xue;let n=typeof e.confidence=="number"?e.confidence:Sue;return wue+Tue*n}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=z({type:t,selectors:[["sm-graph-view"]],viewQuery:function(n,i){n&1&&vn(i.flow,aa,5)(i.canvas,ra,5)(i.zoom,sa,5)(i.canvasWrap,cue,5),n&2&&$t(4)},hostBindings:function(n,i){n&1&&A("keydown.escape",function(){return i.onEscape()},Wa)},features:[ve([lo,_C(u0,{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&&(f(0,"section",1),P(1,due,4,1,"div",2)(2,uue,6,2,"div",3)(3,pue,5,3,"div",4)(4,hue,5,3,"div",5)(5,Cue,32,40,"div",6),F(6,"p-confirmdialog",7),_()),n&2&&(l(),R(i.loading()&&!i.hasData()?1:i.error()&&!i.hasData()?2:i.showEmptyState()?3:i.showCurationEmptyState()?4:5),l(5),h("ariaLabel",i.texts.resetLayoutConfirm.header))},dependencies:[kC,aa,ra,vC,bC,sa,wC,Oy,Fy,yC,Jy,nC,CC,xC,Oh,Qy,TC,hC,FD,BD,zD,UD,$D,KD,MP,dn,Yt,fs,hs,ze,Ve,ti,DP],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:0 4px 24px #0000002e;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 qa=440,I0=280,Iue=480;function l3(t){let o=Q(t.initialWidth),e=Q(typeof window>"u"?1920:window.innerWidth);typeof window<"u"&&Ga(window,"resize").pipe(go(t.destroyRef)).subscribe(()=>e.set(window.innerWidth));let n=()=>Math.max(I0,e()-Iue),i=E(()=>{let x=n(),I=o();return I>x||I<I0?Math.min(qa,x):I}),r=null,a=null,s=null,c=()=>{s=null,a!==null&&(o.set(a),a=null)},u=x=>{if(!r)return;let I=x.clientX-r.mouseX,k=r.widthAtStart+I,N=n();a=Math.min(N,Math.max(I0,k)),s===null&&typeof window<"u"&&(s=window.requestAnimationFrame(c))},m=()=>{r&&(r=null,document.removeEventListener("mousemove",u),document.removeEventListener("mouseup",m),s!==null&&typeof window<"u"&&(window.cancelAnimationFrame(s),s=null),a!==null&&(o.set(a),a=null),t.onCommit(o()))};return{clampedRailWidth:i,onRailResizeStart:x=>{x.button===0&&(x.preventDefault(),x.stopPropagation(),r={mouseX:x.clientX,widthAtStart:i()},document.addEventListener("mousemove",u),document.addEventListener("mouseup",m))}}}var c3=(()=>{class t{router=p(es);route=p(Ja);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 Eue(t,o){if(t&1){let e=te();f(0,"p-iconfield",3),F(1,"p-inputicon",7),f(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),h("placeholder",e.texts.rail.searchPlaceholder)("ngModel",e.searchText()),O("aria-label",e.texts.rail.searchAriaLabel)}}function Mue(t,o){if(t&1){let e=te();f(0,"div",9),F(1,"sm-files-view"),_(),f(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 d3="sm.workspace.rail-width",vIe=(()=>{class t{store=p(cn);destroyRef=p(Et);texts=Pb;railCollapsed=Q(!1);railAnimating=Q(!1);railAnimTimer=null;searchText=this.store.searchText;graphView=at(If);isolate(e){this.graphView()?.isolateChain(e)}resize=l3({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.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 qa;let e=Number(localStorage.getItem(d3));return Number.isFinite(e)&&e>0?e:qa}writeStoredWidth(e){if(!(typeof localStorage>"u"))try{localStorage.setItem(d3,String(e))}catch{}}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=z({type:t,selectors:[["sm-workspace-view"]],viewQuery:function(n,i){n&1&&vn(i.graphView,If,5),n&2&&$t()},features:[ve([{provide:fo,useClass:c3},{provide:gs,useExisting:Sn(()=>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&&(f(0,"div",0)(1,"aside",1)(2,"div",2),P(3,Eue,3,3,"p-iconfield",3),f(4,"button",4),A("click",function(){return i.toggleRail()}),F(5,"i",5),_()(),P(6,Mue,3,1),_(),f(7,"div",6),F(8,"sm-graph-view"),_()()),n&2&&(l(),$e("width",i.railCollapsed()?null:i.clampedRailWidth(),"px"),ce("is-collapsed",i.railCollapsed())("is-animating",i.railAnimating()),O("aria-label",i.texts.rail.label),l(2),R(i.railCollapsed()?-1:3),l(),h("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(),ce("pi-times",!i.railCollapsed())("pi-angle-right",i.railCollapsed()),l(),R(i.railCollapsed()?-1:6))},dependencies:[Kv,If,Vt,Y0,sn,ln,X0,Z0,J0,Q0,is,po,ze,Ve],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:6px;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{vIe as WorkspaceView};