@skill-map/cli 0.61.5 → 0.62.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.
Files changed (37) hide show
  1. package/dist/cli.js +1346 -479
  2. package/dist/index.js +368 -96
  3. package/dist/kernel/index.d.ts +232 -25
  4. package/dist/kernel/index.js +368 -96
  5. package/dist/migrations/001_initial.sql +18 -8
  6. package/dist/ui/{chunk-4N3NRZEH.js → chunk-276RLZR4.js} +1 -1
  7. package/dist/ui/{chunk-MGWGV4VD.js → chunk-34ZZDYNQ.js} +1 -1
  8. package/dist/ui/chunk-56CBK7LB.js +1 -0
  9. package/dist/ui/{chunk-OVVTCPBJ.js → chunk-7ANZW2OI.js} +1 -1
  10. package/dist/ui/chunk-BJ6X6WBO.js +4 -0
  11. package/dist/ui/{chunk-5SSKJ7AM.js → chunk-BOVJVOLH.js} +1 -1
  12. package/dist/ui/chunk-C42H2UHU.js +3 -0
  13. package/dist/ui/{chunk-GKQA75EF.js → chunk-CJURGJTN.js} +1 -1
  14. package/dist/ui/chunk-CM4YB7L4.js +2 -0
  15. package/dist/ui/{chunk-Q4PXVDJA.js → chunk-CZSLV6YD.js} +1 -1
  16. package/dist/ui/{chunk-7X3DZNG4.js → chunk-DLYJHLJX.js} +2 -2
  17. package/dist/ui/chunk-ECKRC6XD.js +1843 -0
  18. package/dist/ui/{chunk-JTCIY3SL.js → chunk-FC22ZJQZ.js} +1 -1
  19. package/dist/ui/{chunk-FRUHVCND.js → chunk-FYATUDAH.js} +1 -1
  20. package/dist/ui/chunk-IYC5ZW4L.js +2 -0
  21. package/dist/ui/{chunk-MBBJJEUX.js → chunk-JZ2YF7EL.js} +1 -1
  22. package/dist/ui/{chunk-HQ6M2HXK.js → chunk-LPDD2DHE.js} +1 -1
  23. package/dist/ui/{chunk-I52OQIZQ.js → chunk-NC3HOVDG.js} +1 -1
  24. package/dist/ui/{chunk-N6MUHKWR.js → chunk-UTRZTB6V.js} +1 -1
  25. package/dist/ui/chunk-VHEFRMK3.js +1 -0
  26. package/dist/ui/chunk-Y2Z26SRI.js +1 -0
  27. package/dist/ui/index.html +1 -1
  28. package/dist/ui/main-RW5YGD6H.js +4 -0
  29. package/migrations/001_initial.sql +18 -8
  30. package/package.json +2 -2
  31. package/dist/ui/chunk-6NYH7LND.js +0 -3
  32. package/dist/ui/chunk-7VUEZZFJ.js +0 -1
  33. package/dist/ui/chunk-AKKFFP7Y.js +0 -1
  34. package/dist/ui/chunk-L34EUS75.js +0 -2
  35. package/dist/ui/chunk-UTGLW5ON.js +0 -1843
  36. package/dist/ui/chunk-ZYPXVXYF.js +0 -4
  37. package/dist/ui/main-OTDMPZHD.js +0 -4
@@ -0,0 +1,1843 @@
1
+ import{a as Un,b as $n,d as hv,e as fv,f as mv,g as vv,h as bv,i as po}from"./chunk-FYATUDAH.js";import{A as Dv,B as Pv,C as Rv,D as Wn,I as Ov,K as Fv,L as Nv,M as Ff,N as Nf,O as Av,a as os,b as lo,c as Y0,d as jn,e as X0,f as mr,g as Pf,h as Z0,i as Q0,j as J0,k as nn,l as co,m as yv,n as ls,o as Cv,p as xv,q as wv,r as Tv,s as Sv,t as kv,u as cs,w as Iv,x as Mv,y as ds,z as Ev}from"./chunk-CM4YB7L4.js";import{f as Ya,i as Xa}from"./chunk-CZSLV6YD.js";import{a as Gn,b as K0,c as ao,e as so,h as is,i as pt}from"./chunk-IYC5ZW4L.js";import"./chunk-DLYJHLJX.js";import{c as Sf,d as Za,f as lr,g as Qa}from"./chunk-Y2Z26SRI.js";import{a as _v,b as gv}from"./chunk-UTRZTB6V.js";import{a as ev,b as Gt,c as on}from"./chunk-FC22ZJQZ.js";import{a as H0,b as q0,c as G0,d as j0,f as tv,h as nv,i as iv,j as ov,k as ss,l as rv,m as av,n as sv,o as uo,p as lv,q as cv,s as dv,t as Of,u as uv,v as pv}from"./chunk-276RLZR4.js";import{B as ts,C as ns,D as ye,E as U0,F as $0,G as fr,H as Ce,I as W0,J as yn,K as Ve,L as Le,M as rs,N as De,O as Rf,P as as,a as ut,c as Ef,d as A0,e as Df,f as L0,g as oo,j as Pt,k as ot,l as Jt,m as en,p as es,q as V0,r as z0,s as Rt,t as Ot,u as yt,v as tn,w as On,x as Ae,y as ro}from"./chunk-LPDD2DHE.js";import{f as Ka,g as D0,h as no,i as xi,j as io,k as hn,l as Dt,p as qt}from"./chunk-34ZZDYNQ.js";import{B as Mf,Ca as B0,F as O0,H as F0,J as Ja,O as pr,T as N0,a as fn,b as cr,ba as hr,k as dr,l as kf,m as P0,n as R0,p as wi,t as bn,u as dt,w as If,z as ur}from"./chunk-4SG4352Z.js";import{$ as bt,$a as je,$b as v,Ab as Z,Ac as Wa,Bb as ie,Bc as Tf,Cb as oe,Cc as Ci,Db as Te,Eb as Se,Fb as le,Ga as yi,Gb as ja,Ha as nr,Hb as Ua,Ia as qa,Ib as $,Ic as Y,J as Zi,Ja as l,Jb as Qe,Jc as Me,K as y,Kb as N,L as It,Mb as d,N as ve,Nb as un,O as Qi,Oa as eo,Ob as Ue,P as p,Pa as y0,Pb as Hn,Qb as to,Ra as C0,Rb as ee,Sa as Rn,Sb as te,T as b0,Tb as xf,U as Pn,Ua as Ga,Ub as pn,V as w,Vb as Vt,W as T,Wb as gt,X,Xb as Oe,Y as Va,Yb as ce,Z as mt,Za as z,Zb as zt,_ as za,_a as Mt,_b as G,ab as Zt,ac as C,ba as re,bb as Q,bc as be,ca as Xt,cb as P,cc as I0,d as Xi,db as x0,dc as M0,ec as ir,fc as or,g as E,ga as K,gc as rr,hc as Qt,ic as wt,ja as se,jb as w0,jc as Ie,ka as Ji,kc as Ee,la as U,lc as Et,ma as Xe,mb as T0,mc as Pe,n as v0,nb as O,nc as qn,ob as S0,oc as ar,pb as k0,pc as wf,qa as Ha,qb as I,qc as $a,rb as M,rc as sr,sb as Cf,sc as E0,t as Ba,tb as Ze,tc as $e,ub as ue,vb as pe,vc as Ht,wb as _,wc as S,xb as h,xc as qe,yb as m,yc as B,zb as F,zc as nt}from"./chunk-BJ6X6WBO.js";import{a as me,b as Bt,c as Yi,e as b,g as t3}from"./chunk-WCABR6TI.js";var vC=b((Xfe,gC)=>{"use strict";function d8(){this.__data__=[],this.size=0}gC.exports=d8});var Vi=b((Zfe,bC)=>{"use strict";function u8(t,i){return t===i||t!==t&&i!==i}bC.exports=u8});var aa=b((Qfe,yC)=>{"use strict";var p8=Vi();function h8(t,i){for(var e=t.length;e--;)if(p8(t[e][0],i))return e;return-1}yC.exports=h8});var xC=b((Jfe,CC)=>{"use strict";var f8=aa(),m8=Array.prototype,_8=m8.splice;function g8(t){var i=this.__data__,e=f8(i,t);if(e<0)return!1;var n=i.length-1;return e==n?i.pop():_8.call(i,e,1),--this.size,!0}CC.exports=g8});var TC=b((eme,wC)=>{"use strict";var v8=aa();function b8(t){var i=this.__data__,e=v8(i,t);return e<0?void 0:i[e][1]}wC.exports=b8});var kC=b((tme,SC)=>{"use strict";var y8=aa();function C8(t){return y8(this.__data__,t)>-1}SC.exports=C8});var MC=b((nme,IC)=>{"use strict";var x8=aa();function w8(t,i){var e=this.__data__,n=x8(e,t);return n<0?(++this.size,e.push([t,i])):e[n][1]=i,this}IC.exports=w8});var sa=b((ime,EC)=>{"use strict";var T8=vC(),S8=xC(),k8=TC(),I8=kC(),M8=MC();function Ao(t){var i=-1,e=t==null?0:t.length;for(this.clear();++i<e;){var n=t[i];this.set(n[0],n[1])}}Ao.prototype.clear=T8;Ao.prototype.delete=S8;Ao.prototype.get=k8;Ao.prototype.has=I8;Ao.prototype.set=M8;EC.exports=Ao});var PC=b((ome,DC)=>{"use strict";var E8=sa();function D8(){this.__data__=new E8,this.size=0}DC.exports=D8});var OC=b((rme,RC)=>{"use strict";function P8(t){var i=this.__data__,e=i.delete(t);return this.size=i.size,e}RC.exports=P8});var NC=b((ame,FC)=>{"use strict";function R8(t){return this.__data__.get(t)}FC.exports=R8});var LC=b((sme,AC)=>{"use strict";function O8(t){return this.__data__.has(t)}AC.exports=O8});var I_=b((lme,BC)=>{"use strict";var F8=typeof global=="object"&&global&&global.Object===Object&&global;BC.exports=F8});var sn=b((cme,VC)=>{"use strict";var N8=I_(),A8=typeof self=="object"&&self&&self.Object===Object&&self,L8=N8||A8||Function("return this")();VC.exports=L8});var zi=b((dme,zC)=>{"use strict";var B8=sn(),V8=B8.Symbol;zC.exports=V8});var jC=b((ume,GC)=>{"use strict";var HC=zi(),qC=Object.prototype,z8=qC.hasOwnProperty,H8=qC.toString,la=HC?HC.toStringTag:void 0;function q8(t){var i=z8.call(t,la),e=t[la];try{t[la]=void 0;var n=!0}catch{}var o=H8.call(t);return n&&(i?t[la]=e:delete t[la]),o}GC.exports=q8});var $C=b((pme,UC)=>{"use strict";var G8=Object.prototype,j8=G8.toString;function U8(t){return j8.call(t)}UC.exports=U8});var ci=b((hme,YC)=>{"use strict";var WC=zi(),$8=jC(),W8=$C(),K8="[object Null]",Y8="[object Undefined]",KC=WC?WC.toStringTag:void 0;function X8(t){return t==null?t===void 0?Y8:K8:KC&&KC in Object(t)?$8(t):W8(t)}YC.exports=X8});var $t=b((fme,XC)=>{"use strict";function Z8(t){var i=typeof t;return t!=null&&(i=="object"||i=="function")}XC.exports=Z8});var Lo=b((mme,ZC)=>{"use strict";var Q8=ci(),J8=$t(),ez="[object AsyncFunction]",tz="[object Function]",nz="[object GeneratorFunction]",iz="[object Proxy]";function oz(t){if(!J8(t))return!1;var i=Q8(t);return i==tz||i==nz||i==ez||i==iz}ZC.exports=oz});var JC=b((_me,QC)=>{"use strict";var rz=sn(),az=rz["__core-js_shared__"];QC.exports=az});var n1=b((gme,t1)=>{"use strict";var M_=JC(),e1=(function(){var t=/[^.]+$/.exec(M_&&M_.keys&&M_.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""})();function sz(t){return!!e1&&e1 in t}t1.exports=sz});var E_=b((vme,i1)=>{"use strict";var lz=Function.prototype,cz=lz.toString;function dz(t){if(t!=null){try{return cz.call(t)}catch{}try{return t+""}catch{}}return""}i1.exports=dz});var r1=b((bme,o1)=>{"use strict";var uz=Lo(),pz=n1(),hz=$t(),fz=E_(),mz=/[\\^$.*+?()[\]{}|]/g,_z=/^\[object .+?Constructor\]$/,gz=Function.prototype,vz=Object.prototype,bz=gz.toString,yz=vz.hasOwnProperty,Cz=RegExp("^"+bz.call(yz).replace(mz,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function xz(t){if(!hz(t)||pz(t))return!1;var i=uz(t)?Cz:_z;return i.test(fz(t))}o1.exports=xz});var s1=b((yme,a1)=>{"use strict";function wz(t,i){return t?.[i]}a1.exports=wz});var di=b((Cme,l1)=>{"use strict";var Tz=r1(),Sz=s1();function kz(t,i){var e=Sz(t,i);return Tz(e)?e:void 0}l1.exports=kz});var Ih=b((xme,c1)=>{"use strict";var Iz=di(),Mz=sn(),Ez=Iz(Mz,"Map");c1.exports=Ez});var ca=b((wme,d1)=>{"use strict";var Dz=di(),Pz=Dz(Object,"create");d1.exports=Pz});var h1=b((Tme,p1)=>{"use strict";var u1=ca();function Rz(){this.__data__=u1?u1(null):{},this.size=0}p1.exports=Rz});var m1=b((Sme,f1)=>{"use strict";function Oz(t){var i=this.has(t)&&delete this.__data__[t];return this.size-=i?1:0,i}f1.exports=Oz});var g1=b((kme,_1)=>{"use strict";var Fz=ca(),Nz="__lodash_hash_undefined__",Az=Object.prototype,Lz=Az.hasOwnProperty;function Bz(t){var i=this.__data__;if(Fz){var e=i[t];return e===Nz?void 0:e}return Lz.call(i,t)?i[t]:void 0}_1.exports=Bz});var b1=b((Ime,v1)=>{"use strict";var Vz=ca(),zz=Object.prototype,Hz=zz.hasOwnProperty;function qz(t){var i=this.__data__;return Vz?i[t]!==void 0:Hz.call(i,t)}v1.exports=qz});var C1=b((Mme,y1)=>{"use strict";var Gz=ca(),jz="__lodash_hash_undefined__";function Uz(t,i){var e=this.__data__;return this.size+=this.has(t)?0:1,e[t]=Gz&&i===void 0?jz:i,this}y1.exports=Uz});var w1=b((Eme,x1)=>{"use strict";var $z=h1(),Wz=m1(),Kz=g1(),Yz=b1(),Xz=C1();function Bo(t){var i=-1,e=t==null?0:t.length;for(this.clear();++i<e;){var n=t[i];this.set(n[0],n[1])}}Bo.prototype.clear=$z;Bo.prototype.delete=Wz;Bo.prototype.get=Kz;Bo.prototype.has=Yz;Bo.prototype.set=Xz;x1.exports=Bo});var k1=b((Dme,S1)=>{"use strict";var T1=w1(),Zz=sa(),Qz=Ih();function Jz(){this.size=0,this.__data__={hash:new T1,map:new(Qz||Zz),string:new T1}}S1.exports=Jz});var M1=b((Pme,I1)=>{"use strict";function eH(t){var i=typeof t;return i=="string"||i=="number"||i=="symbol"||i=="boolean"?t!=="__proto__":t===null}I1.exports=eH});var da=b((Rme,E1)=>{"use strict";var tH=M1();function nH(t,i){var e=t.__data__;return tH(i)?e[typeof i=="string"?"string":"hash"]:e.map}E1.exports=nH});var P1=b((Ome,D1)=>{"use strict";var iH=da();function oH(t){var i=iH(this,t).delete(t);return this.size-=i?1:0,i}D1.exports=oH});var O1=b((Fme,R1)=>{"use strict";var rH=da();function aH(t){return rH(this,t).get(t)}R1.exports=aH});var N1=b((Nme,F1)=>{"use strict";var sH=da();function lH(t){return sH(this,t).has(t)}F1.exports=lH});var L1=b((Ame,A1)=>{"use strict";var cH=da();function dH(t,i){var e=cH(this,t),n=e.size;return e.set(t,i),this.size+=e.size==n?0:1,this}A1.exports=dH});var Mh=b((Lme,B1)=>{"use strict";var uH=k1(),pH=P1(),hH=O1(),fH=N1(),mH=L1();function Vo(t){var i=-1,e=t==null?0:t.length;for(this.clear();++i<e;){var n=t[i];this.set(n[0],n[1])}}Vo.prototype.clear=uH;Vo.prototype.delete=pH;Vo.prototype.get=hH;Vo.prototype.has=fH;Vo.prototype.set=mH;B1.exports=Vo});var z1=b((Bme,V1)=>{"use strict";var _H=sa(),gH=Ih(),vH=Mh(),bH=200;function yH(t,i){var e=this.__data__;if(e instanceof _H){var n=e.__data__;if(!gH||n.length<bH-1)return n.push([t,i]),this.size=++e.size,this;e=this.__data__=new vH(n)}return e.set(t,i),this.size=e.size,this}V1.exports=yH});var ua=b((Vme,H1)=>{"use strict";var CH=sa(),xH=PC(),wH=OC(),TH=NC(),SH=LC(),kH=z1();function zo(t){var i=this.__data__=new CH(t);this.size=i.size}zo.prototype.clear=xH;zo.prototype.delete=wH;zo.prototype.get=TH;zo.prototype.has=SH;zo.prototype.set=kH;H1.exports=zo});var Eh=b((zme,q1)=>{"use strict";function IH(t,i){for(var e=-1,n=t==null?0:t.length;++e<n&&i(t[e],e,t)!==!1;);return t}q1.exports=IH});var D_=b((Hme,G1)=>{"use strict";var MH=di(),EH=(function(){try{var t=MH(Object,"defineProperty");return t({},"",{}),t}catch{}})();G1.exports=EH});var pa=b((qme,U1)=>{"use strict";var j1=D_();function DH(t,i,e){i=="__proto__"&&j1?j1(t,i,{configurable:!0,enumerable:!0,value:e,writable:!0}):t[i]=e}U1.exports=DH});var ha=b((Gme,$1)=>{"use strict";var PH=pa(),RH=Vi(),OH=Object.prototype,FH=OH.hasOwnProperty;function NH(t,i,e){var n=t[i];(!(FH.call(t,i)&&RH(n,e))||e===void 0&&!(i in t))&&PH(t,i,e)}$1.exports=NH});var Ho=b((jme,W1)=>{"use strict";var AH=ha(),LH=pa();function BH(t,i,e,n){var o=!e;e||(e={});for(var r=-1,a=i.length;++r<a;){var s=i[r],c=n?n(e[s],t[s],s,e,t):void 0;c===void 0&&(c=t[s]),o?LH(e,s,c):AH(e,s,c)}return e}W1.exports=BH});var Y1=b((Ume,K1)=>{"use strict";function VH(t,i){for(var e=-1,n=Array(t);++e<t;)n[e]=i(e);return n}K1.exports=VH});var vn=b(($me,X1)=>{"use strict";function zH(t){return t!=null&&typeof t=="object"}X1.exports=zH});var Q1=b((Wme,Z1)=>{"use strict";var HH=ci(),qH=vn(),GH="[object Arguments]";function jH(t){return qH(t)&&HH(t)==GH}Z1.exports=jH});var qo=b((Kme,tx)=>{"use strict";var J1=Q1(),UH=vn(),ex=Object.prototype,$H=ex.hasOwnProperty,WH=ex.propertyIsEnumerable,KH=J1((function(){return arguments})())?J1:function(t){return UH(t)&&$H.call(t,"callee")&&!WH.call(t,"callee")};tx.exports=KH});var lt=b((Yme,nx)=>{"use strict";var YH=Array.isArray;nx.exports=YH});var ox=b((Xme,ix)=>{"use strict";function XH(){return!1}ix.exports=XH});var Hi=b((fa,Go)=>{"use strict";var ZH=sn(),QH=ox(),sx=typeof fa=="object"&&fa&&!fa.nodeType&&fa,rx=sx&&typeof Go=="object"&&Go&&!Go.nodeType&&Go,JH=rx&&rx.exports===sx,ax=JH?ZH.Buffer:void 0,eq=ax?ax.isBuffer:void 0,tq=eq||QH;Go.exports=tq});var ma=b((Zme,lx)=>{"use strict";var nq=9007199254740991,iq=/^(?:0|[1-9]\d*)$/;function oq(t,i){var e=typeof t;return i=i??nq,!!i&&(e=="number"||e!="symbol"&&iq.test(t))&&t>-1&&t%1==0&&t<i}lx.exports=oq});var Dh=b((Qme,cx)=>{"use strict";var rq=9007199254740991;function aq(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=rq}cx.exports=aq});var ux=b((Jme,dx)=>{"use strict";var sq=ci(),lq=Dh(),cq=vn(),dq="[object Arguments]",uq="[object Array]",pq="[object Boolean]",hq="[object Date]",fq="[object Error]",mq="[object Function]",_q="[object Map]",gq="[object Number]",vq="[object Object]",bq="[object RegExp]",yq="[object Set]",Cq="[object String]",xq="[object WeakMap]",wq="[object ArrayBuffer]",Tq="[object DataView]",Sq="[object Float32Array]",kq="[object Float64Array]",Iq="[object Int8Array]",Mq="[object Int16Array]",Eq="[object Int32Array]",Dq="[object Uint8Array]",Pq="[object Uint8ClampedArray]",Rq="[object Uint16Array]",Oq="[object Uint32Array]",Je={};Je[Sq]=Je[kq]=Je[Iq]=Je[Mq]=Je[Eq]=Je[Dq]=Je[Pq]=Je[Rq]=Je[Oq]=!0;Je[dq]=Je[uq]=Je[wq]=Je[pq]=Je[Tq]=Je[hq]=Je[fq]=Je[mq]=Je[_q]=Je[gq]=Je[vq]=Je[bq]=Je[yq]=Je[Cq]=Je[xq]=!1;function Fq(t){return cq(t)&&lq(t.length)&&!!Je[sq(t)]}dx.exports=Fq});var _a=b((e_e,px)=>{"use strict";function Nq(t){return function(i){return t(i)}}px.exports=Nq});var Ph=b((ga,jo)=>{"use strict";var Aq=I_(),hx=typeof ga=="object"&&ga&&!ga.nodeType&&ga,va=hx&&typeof jo=="object"&&jo&&!jo.nodeType&&jo,Lq=va&&va.exports===hx,P_=Lq&&Aq.process,Bq=(function(){try{var t=va&&va.require&&va.require("util").types;return t||P_&&P_.binding&&P_.binding("util")}catch{}})();jo.exports=Bq});var Uo=b((t_e,_x)=>{"use strict";var Vq=ux(),zq=_a(),fx=Ph(),mx=fx&&fx.isTypedArray,Hq=mx?zq(mx):Vq;_x.exports=Hq});var R_=b((n_e,gx)=>{"use strict";var qq=Y1(),Gq=qo(),jq=lt(),Uq=Hi(),$q=ma(),Wq=Uo(),Kq=Object.prototype,Yq=Kq.hasOwnProperty;function Xq(t,i){var e=jq(t),n=!e&&Gq(t),o=!e&&!n&&Uq(t),r=!e&&!n&&!o&&Wq(t),a=e||n||o||r,s=a?qq(t.length,String):[],c=s.length;for(var u in t)(i||Yq.call(t,u))&&!(a&&(u=="length"||o&&(u=="offset"||u=="parent")||r&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||$q(u,c)))&&s.push(u);return s}gx.exports=Xq});var ba=b((i_e,vx)=>{"use strict";var Zq=Object.prototype;function Qq(t){var i=t&&t.constructor,e=typeof i=="function"&&i.prototype||Zq;return t===e}vx.exports=Qq});var O_=b((o_e,bx)=>{"use strict";function Jq(t,i){return function(e){return t(i(e))}}bx.exports=Jq});var Cx=b((r_e,yx)=>{"use strict";var eG=O_(),tG=eG(Object.keys,Object);yx.exports=tG});var Rh=b((a_e,xx)=>{"use strict";var nG=ba(),iG=Cx(),oG=Object.prototype,rG=oG.hasOwnProperty;function aG(t){if(!nG(t))return iG(t);var i=[];for(var e in Object(t))rG.call(t,e)&&e!="constructor"&&i.push(e);return i}xx.exports=aG});var Sn=b((s_e,wx)=>{"use strict";var sG=Lo(),lG=Dh();function cG(t){return t!=null&&lG(t.length)&&!sG(t)}wx.exports=cG});var An=b((l_e,Tx)=>{"use strict";var dG=R_(),uG=Rh(),pG=Sn();function hG(t){return pG(t)?dG(t):uG(t)}Tx.exports=hG});var kx=b((c_e,Sx)=>{"use strict";var fG=Ho(),mG=An();function _G(t,i){return t&&fG(i,mG(i),t)}Sx.exports=_G});var Mx=b((d_e,Ix)=>{"use strict";function gG(t){var i=[];if(t!=null)for(var e in Object(t))i.push(e);return i}Ix.exports=gG});var Dx=b((u_e,Ex)=>{"use strict";var vG=$t(),bG=ba(),yG=Mx(),CG=Object.prototype,xG=CG.hasOwnProperty;function wG(t){if(!vG(t))return yG(t);var i=bG(t),e=[];for(var n in t)n=="constructor"&&(i||!xG.call(t,n))||e.push(n);return e}Ex.exports=wG});var ui=b((p_e,Px)=>{"use strict";var TG=R_(),SG=Dx(),kG=Sn();function IG(t){return kG(t)?TG(t,!0):SG(t)}Px.exports=IG});var Ox=b((h_e,Rx)=>{"use strict";var MG=Ho(),EG=ui();function DG(t,i){return t&&MG(i,EG(i),t)}Rx.exports=DG});var F_=b((ya,$o)=>{"use strict";var PG=sn(),Lx=typeof ya=="object"&&ya&&!ya.nodeType&&ya,Fx=Lx&&typeof $o=="object"&&$o&&!$o.nodeType&&$o,RG=Fx&&Fx.exports===Lx,Nx=RG?PG.Buffer:void 0,Ax=Nx?Nx.allocUnsafe:void 0;function OG(t,i){if(i)return t.slice();var e=t.length,n=Ax?Ax(e):new t.constructor(e);return t.copy(n),n}$o.exports=OG});var N_=b((f_e,Bx)=>{"use strict";function FG(t,i){var e=-1,n=t.length;for(i||(i=Array(n));++e<n;)i[e]=t[e];return i}Bx.exports=FG});var A_=b((m_e,Vx)=>{"use strict";function NG(t,i){for(var e=-1,n=t==null?0:t.length,o=0,r=[];++e<n;){var a=t[e];i(a,e,t)&&(r[o++]=a)}return r}Vx.exports=NG});var L_=b((__e,zx)=>{"use strict";function AG(){return[]}zx.exports=AG});var Oh=b((g_e,qx)=>{"use strict";var LG=A_(),BG=L_(),VG=Object.prototype,zG=VG.propertyIsEnumerable,Hx=Object.getOwnPropertySymbols,HG=Hx?function(t){return t==null?[]:(t=Object(t),LG(Hx(t),function(i){return zG.call(t,i)}))}:BG;qx.exports=HG});var jx=b((v_e,Gx)=>{"use strict";var qG=Ho(),GG=Oh();function jG(t,i){return qG(t,GG(t),i)}Gx.exports=jG});var Fh=b((b_e,Ux)=>{"use strict";function UG(t,i){for(var e=-1,n=i.length,o=t.length;++e<n;)t[o+e]=i[e];return t}Ux.exports=UG});var Ca=b((y_e,$x)=>{"use strict";var $G=O_(),WG=$G(Object.getPrototypeOf,Object);$x.exports=WG});var B_=b((C_e,Wx)=>{"use strict";var KG=Fh(),YG=Ca(),XG=Oh(),ZG=L_(),QG=Object.getOwnPropertySymbols,JG=QG?function(t){for(var i=[];t;)KG(i,XG(t)),t=YG(t);return i}:ZG;Wx.exports=JG});var Yx=b((x_e,Kx)=>{"use strict";var ej=Ho(),tj=B_();function nj(t,i){return ej(t,tj(t),i)}Kx.exports=nj});var V_=b((w_e,Xx)=>{"use strict";var ij=Fh(),oj=lt();function rj(t,i,e){var n=i(t);return oj(t)?n:ij(n,e(t))}Xx.exports=rj});var z_=b((T_e,Zx)=>{"use strict";var aj=V_(),sj=Oh(),lj=An();function cj(t){return aj(t,lj,sj)}Zx.exports=cj});var Jx=b((S_e,Qx)=>{"use strict";var dj=V_(),uj=B_(),pj=ui();function hj(t){return dj(t,pj,uj)}Qx.exports=hj});var tw=b((k_e,ew)=>{"use strict";var fj=di(),mj=sn(),_j=fj(mj,"DataView");ew.exports=_j});var iw=b((I_e,nw)=>{"use strict";var gj=di(),vj=sn(),bj=gj(vj,"Promise");nw.exports=bj});var H_=b((M_e,ow)=>{"use strict";var yj=di(),Cj=sn(),xj=yj(Cj,"Set");ow.exports=xj});var aw=b((E_e,rw)=>{"use strict";var wj=di(),Tj=sn(),Sj=wj(Tj,"WeakMap");rw.exports=Sj});var Gi=b((D_e,hw)=>{"use strict";var q_=tw(),G_=Ih(),j_=iw(),U_=H_(),$_=aw(),pw=ci(),Wo=E_(),sw="[object Map]",kj="[object Object]",lw="[object Promise]",cw="[object Set]",dw="[object WeakMap]",uw="[object DataView]",Ij=Wo(q_),Mj=Wo(G_),Ej=Wo(j_),Dj=Wo(U_),Pj=Wo($_),qi=pw;(q_&&qi(new q_(new ArrayBuffer(1)))!=uw||G_&&qi(new G_)!=sw||j_&&qi(j_.resolve())!=lw||U_&&qi(new U_)!=cw||$_&&qi(new $_)!=dw)&&(qi=function(t){var i=pw(t),e=i==kj?t.constructor:void 0,n=e?Wo(e):"";if(n)switch(n){case Ij:return uw;case Mj:return sw;case Ej:return lw;case Dj:return cw;case Pj:return dw}return i});hw.exports=qi});var mw=b((P_e,fw)=>{"use strict";var Rj=Object.prototype,Oj=Rj.hasOwnProperty;function Fj(t){var i=t.length,e=new t.constructor(i);return i&&typeof t[0]=="string"&&Oj.call(t,"index")&&(e.index=t.index,e.input=t.input),e}fw.exports=Fj});var W_=b((R_e,_w)=>{"use strict";var Nj=sn(),Aj=Nj.Uint8Array;_w.exports=Aj});var Nh=b((O_e,vw)=>{"use strict";var gw=W_();function Lj(t){var i=new t.constructor(t.byteLength);return new gw(i).set(new gw(t)),i}vw.exports=Lj});var yw=b((F_e,bw)=>{"use strict";var Bj=Nh();function Vj(t,i){var e=i?Bj(t.buffer):t.buffer;return new t.constructor(e,t.byteOffset,t.byteLength)}bw.exports=Vj});var xw=b((N_e,Cw)=>{"use strict";var zj=/\w*$/;function Hj(t){var i=new t.constructor(t.source,zj.exec(t));return i.lastIndex=t.lastIndex,i}Cw.exports=Hj});var Iw=b((A_e,kw)=>{"use strict";var ww=zi(),Tw=ww?ww.prototype:void 0,Sw=Tw?Tw.valueOf:void 0;function qj(t){return Sw?Object(Sw.call(t)):{}}kw.exports=qj});var K_=b((L_e,Mw)=>{"use strict";var Gj=Nh();function jj(t,i){var e=i?Gj(t.buffer):t.buffer;return new t.constructor(e,t.byteOffset,t.length)}Mw.exports=jj});var Dw=b((B_e,Ew)=>{"use strict";var Uj=Nh(),$j=yw(),Wj=xw(),Kj=Iw(),Yj=K_(),Xj="[object Boolean]",Zj="[object Date]",Qj="[object Map]",Jj="[object Number]",eU="[object RegExp]",tU="[object Set]",nU="[object String]",iU="[object Symbol]",oU="[object ArrayBuffer]",rU="[object DataView]",aU="[object Float32Array]",sU="[object Float64Array]",lU="[object Int8Array]",cU="[object Int16Array]",dU="[object Int32Array]",uU="[object Uint8Array]",pU="[object Uint8ClampedArray]",hU="[object Uint16Array]",fU="[object Uint32Array]";function mU(t,i,e){var n=t.constructor;switch(i){case oU:return Uj(t);case Xj:case Zj:return new n(+t);case rU:return $j(t,e);case aU:case sU:case lU:case cU:case dU:case uU:case pU:case hU:case fU:return Yj(t,e);case Qj:return new n;case Jj:case nU:return new n(t);case eU:return Wj(t);case tU:return new n;case iU:return Kj(t)}}Ew.exports=mU});var Y_=b((V_e,Rw)=>{"use strict";var _U=$t(),Pw=Object.create,gU=(function(){function t(){}return function(i){if(!_U(i))return{};if(Pw)return Pw(i);t.prototype=i;var e=new t;return t.prototype=void 0,e}})();Rw.exports=gU});var X_=b((z_e,Ow)=>{"use strict";var vU=Y_(),bU=Ca(),yU=ba();function CU(t){return typeof t.constructor=="function"&&!yU(t)?vU(bU(t)):{}}Ow.exports=CU});var Nw=b((H_e,Fw)=>{"use strict";var xU=Gi(),wU=vn(),TU="[object Map]";function SU(t){return wU(t)&&xU(t)==TU}Fw.exports=SU});var Vw=b((q_e,Bw)=>{"use strict";var kU=Nw(),IU=_a(),Aw=Ph(),Lw=Aw&&Aw.isMap,MU=Lw?IU(Lw):kU;Bw.exports=MU});var Hw=b((G_e,zw)=>{"use strict";var EU=Gi(),DU=vn(),PU="[object Set]";function RU(t){return DU(t)&&EU(t)==PU}zw.exports=RU});var Uw=b((j_e,jw)=>{"use strict";var OU=Hw(),FU=_a(),qw=Ph(),Gw=qw&&qw.isSet,NU=Gw?FU(Gw):OU;jw.exports=NU});var Z_=b((U_e,Yw)=>{"use strict";var AU=ua(),LU=Eh(),BU=ha(),VU=kx(),zU=Ox(),HU=F_(),qU=N_(),GU=jx(),jU=Yx(),UU=z_(),$U=Jx(),WU=Gi(),KU=mw(),YU=Dw(),XU=X_(),ZU=lt(),QU=Hi(),JU=Vw(),e$=$t(),t$=Uw(),n$=An(),i$=ui(),o$=1,r$=2,a$=4,$w="[object Arguments]",s$="[object Array]",l$="[object Boolean]",c$="[object Date]",d$="[object Error]",Ww="[object Function]",u$="[object GeneratorFunction]",p$="[object Map]",h$="[object Number]",Kw="[object Object]",f$="[object RegExp]",m$="[object Set]",_$="[object String]",g$="[object Symbol]",v$="[object WeakMap]",b$="[object ArrayBuffer]",y$="[object DataView]",C$="[object Float32Array]",x$="[object Float64Array]",w$="[object Int8Array]",T$="[object Int16Array]",S$="[object Int32Array]",k$="[object Uint8Array]",I$="[object Uint8ClampedArray]",M$="[object Uint16Array]",E$="[object Uint32Array]",Ye={};Ye[$w]=Ye[s$]=Ye[b$]=Ye[y$]=Ye[l$]=Ye[c$]=Ye[C$]=Ye[x$]=Ye[w$]=Ye[T$]=Ye[S$]=Ye[p$]=Ye[h$]=Ye[Kw]=Ye[f$]=Ye[m$]=Ye[_$]=Ye[g$]=Ye[k$]=Ye[I$]=Ye[M$]=Ye[E$]=!0;Ye[d$]=Ye[Ww]=Ye[v$]=!1;function Ah(t,i,e,n,o,r){var a,s=i&o$,c=i&r$,u=i&a$;if(e&&(a=o?e(t,n,o,r):e(t)),a!==void 0)return a;if(!e$(t))return t;var f=ZU(t);if(f){if(a=KU(t),!s)return qU(t,a)}else{var g=WU(t),x=g==Ww||g==u$;if(QU(t))return HU(t,s);if(g==Kw||g==$w||x&&!o){if(a=c||x?{}:XU(t),!s)return c?jU(t,zU(a,t)):GU(t,VU(a,t))}else{if(!Ye[g])return o?t:{};a=YU(t,g,s)}}r||(r=new AU);var R=r.get(t);if(R)return R;r.set(t,a),t$(t)?t.forEach(function(q){a.add(Ah(q,i,e,q,t,r))}):JU(t)&&t.forEach(function(q,W){a.set(W,Ah(q,i,e,W,t,r))});var k=u?c?$U:UU:c?i$:n$,A=f?void 0:k(t);return LU(A||t,function(q,W){A&&(W=q,q=t[W]),BU(a,W,Ah(q,i,e,W,t,r))}),a}Yw.exports=Ah});var Zw=b(($_e,Xw)=>{"use strict";var D$=Z_(),P$=4;function R$(t){return D$(t,P$)}Xw.exports=R$});var Lh=b((W_e,Qw)=>{"use strict";function O$(t){return function(){return t}}Qw.exports=O$});var eT=b((K_e,Jw)=>{"use strict";function F$(t){return function(i,e,n){for(var o=-1,r=Object(i),a=n(i),s=a.length;s--;){var c=a[t?s:++o];if(e(r[c],c,r)===!1)break}return i}}Jw.exports=F$});var Bh=b((Y_e,tT)=>{"use strict";var N$=eT(),A$=N$();tT.exports=A$});var Vh=b((X_e,nT)=>{"use strict";var L$=Bh(),B$=An();function V$(t,i){return t&&L$(t,i,B$)}nT.exports=V$});var oT=b((Z_e,iT)=>{"use strict";var z$=Sn();function H$(t,i){return function(e,n){if(e==null)return e;if(!z$(e))return t(e,n);for(var o=e.length,r=i?o:-1,a=Object(e);(i?r--:++r<o)&&n(a[r],r,a)!==!1;);return e}}iT.exports=H$});var xa=b((Q_e,rT)=>{"use strict";var q$=Vh(),G$=oT(),j$=G$(q$);rT.exports=j$});var pi=b((J_e,aT)=>{"use strict";function U$(t){return t}aT.exports=U$});var Q_=b((ege,sT)=>{"use strict";var $$=pi();function W$(t){return typeof t=="function"?t:$$}sT.exports=W$});var J_=b((tge,lT)=>{"use strict";var K$=Eh(),Y$=xa(),X$=Q_(),Z$=lt();function Q$(t,i){var e=Z$(t)?K$:Y$;return e(t,X$(i))}lT.exports=Q$});var eg=b((nge,cT)=>{"use strict";cT.exports=J_()});var uT=b((ige,dT)=>{"use strict";var J$=xa();function eW(t,i){var e=[];return J$(t,function(n,o,r){i(n,o,r)&&e.push(n)}),e}dT.exports=eW});var hT=b((oge,pT)=>{"use strict";var tW="__lodash_hash_undefined__";function nW(t){return this.__data__.set(t,tW),this}pT.exports=nW});var mT=b((rge,fT)=>{"use strict";function iW(t){return this.__data__.has(t)}fT.exports=iW});var tg=b((age,_T)=>{"use strict";var oW=Mh(),rW=hT(),aW=mT();function zh(t){var i=-1,e=t==null?0:t.length;for(this.__data__=new oW;++i<e;)this.add(t[i])}zh.prototype.add=zh.prototype.push=rW;zh.prototype.has=aW;_T.exports=zh});var vT=b((sge,gT)=>{"use strict";function sW(t,i){for(var e=-1,n=t==null?0:t.length;++e<n;)if(i(t[e],e,t))return!0;return!1}gT.exports=sW});var ng=b((lge,bT)=>{"use strict";function lW(t,i){return t.has(i)}bT.exports=lW});var ig=b((cge,yT)=>{"use strict";var cW=tg(),dW=vT(),uW=ng(),pW=1,hW=2;function fW(t,i,e,n,o,r){var a=e&pW,s=t.length,c=i.length;if(s!=c&&!(a&&c>s))return!1;var u=r.get(t),f=r.get(i);if(u&&f)return u==i&&f==t;var g=-1,x=!0,R=e&hW?new cW:void 0;for(r.set(t,i),r.set(i,t);++g<s;){var k=t[g],A=i[g];if(n)var q=a?n(A,k,g,i,t,r):n(k,A,g,t,i,r);if(q!==void 0){if(q)continue;x=!1;break}if(R){if(!dW(i,function(W,J){if(!uW(R,J)&&(k===W||o(k,W,e,n,r)))return R.push(J)})){x=!1;break}}else if(!(k===A||o(k,A,e,n,r))){x=!1;break}}return r.delete(t),r.delete(i),x}yT.exports=fW});var xT=b((dge,CT)=>{"use strict";function mW(t){var i=-1,e=Array(t.size);return t.forEach(function(n,o){e[++i]=[o,n]}),e}CT.exports=mW});var Hh=b((uge,wT)=>{"use strict";function _W(t){var i=-1,e=Array(t.size);return t.forEach(function(n){e[++i]=n}),e}wT.exports=_W});var MT=b((pge,IT)=>{"use strict";var TT=zi(),ST=W_(),gW=Vi(),vW=ig(),bW=xT(),yW=Hh(),CW=1,xW=2,wW="[object Boolean]",TW="[object Date]",SW="[object Error]",kW="[object Map]",IW="[object Number]",MW="[object RegExp]",EW="[object Set]",DW="[object String]",PW="[object Symbol]",RW="[object ArrayBuffer]",OW="[object DataView]",kT=TT?TT.prototype:void 0,og=kT?kT.valueOf:void 0;function FW(t,i,e,n,o,r,a){switch(e){case OW:if(t.byteLength!=i.byteLength||t.byteOffset!=i.byteOffset)return!1;t=t.buffer,i=i.buffer;case RW:return!(t.byteLength!=i.byteLength||!r(new ST(t),new ST(i)));case wW:case TW:case IW:return gW(+t,+i);case SW:return t.name==i.name&&t.message==i.message;case MW:case DW:return t==i+"";case kW:var s=bW;case EW:var c=n&CW;if(s||(s=yW),t.size!=i.size&&!c)return!1;var u=a.get(t);if(u)return u==i;n|=xW,a.set(t,i);var f=vW(s(t),s(i),n,o,r,a);return a.delete(t),f;case PW:if(og)return og.call(t)==og.call(i)}return!1}IT.exports=FW});var PT=b((hge,DT)=>{"use strict";var ET=z_(),NW=1,AW=Object.prototype,LW=AW.hasOwnProperty;function BW(t,i,e,n,o,r){var a=e&NW,s=ET(t),c=s.length,u=ET(i),f=u.length;if(c!=f&&!a)return!1;for(var g=c;g--;){var x=s[g];if(!(a?x in i:LW.call(i,x)))return!1}var R=r.get(t),k=r.get(i);if(R&&k)return R==i&&k==t;var A=!0;r.set(t,i),r.set(i,t);for(var q=a;++g<c;){x=s[g];var W=t[x],J=i[x];if(n)var de=a?n(J,W,x,i,t,r):n(W,J,x,t,i,r);if(!(de===void 0?W===J||o(W,J,e,n,r):de)){A=!1;break}q||(q=x=="constructor")}if(A&&!q){var Re=t.constructor,we=i.constructor;Re!=we&&"constructor"in t&&"constructor"in i&&!(typeof Re=="function"&&Re instanceof Re&&typeof we=="function"&&we instanceof we)&&(A=!1)}return r.delete(t),r.delete(i),A}DT.exports=BW});var VT=b((fge,BT)=>{"use strict";var rg=ua(),VW=ig(),zW=MT(),HW=PT(),RT=Gi(),OT=lt(),FT=Hi(),qW=Uo(),GW=1,NT="[object Arguments]",AT="[object Array]",qh="[object Object]",jW=Object.prototype,LT=jW.hasOwnProperty;function UW(t,i,e,n,o,r){var a=OT(t),s=OT(i),c=a?AT:RT(t),u=s?AT:RT(i);c=c==NT?qh:c,u=u==NT?qh:u;var f=c==qh,g=u==qh,x=c==u;if(x&&FT(t)){if(!FT(i))return!1;a=!0,f=!1}if(x&&!f)return r||(r=new rg),a||qW(t)?VW(t,i,e,n,o,r):zW(t,i,c,e,n,o,r);if(!(e&GW)){var R=f&&LT.call(t,"__wrapped__"),k=g&&LT.call(i,"__wrapped__");if(R||k){var A=R?t.value():t,q=k?i.value():i;return r||(r=new rg),o(A,q,e,n,r)}}return x?(r||(r=new rg),HW(t,i,e,n,o,r)):!1}BT.exports=UW});var ag=b((mge,qT)=>{"use strict";var $W=VT(),zT=vn();function HT(t,i,e,n,o){return t===i?!0:t==null||i==null||!zT(t)&&!zT(i)?t!==t&&i!==i:$W(t,i,e,n,HT,o)}qT.exports=HT});var jT=b((_ge,GT)=>{"use strict";var WW=ua(),KW=ag(),YW=1,XW=2;function ZW(t,i,e,n){var o=e.length,r=o,a=!n;if(t==null)return!r;for(t=Object(t);o--;){var s=e[o];if(a&&s[2]?s[1]!==t[s[0]]:!(s[0]in t))return!1}for(;++o<r;){s=e[o];var c=s[0],u=t[c],f=s[1];if(a&&s[2]){if(u===void 0&&!(c in t))return!1}else{var g=new WW;if(n)var x=n(u,f,c,t,i,g);if(!(x===void 0?KW(f,u,YW|XW,n,g):x))return!1}}return!0}GT.exports=ZW});var sg=b((gge,UT)=>{"use strict";var QW=$t();function JW(t){return t===t&&!QW(t)}UT.exports=JW});var WT=b((vge,$T)=>{"use strict";var eK=sg(),tK=An();function nK(t){for(var i=tK(t),e=i.length;e--;){var n=i[e],o=t[n];i[e]=[n,o,eK(o)]}return i}$T.exports=nK});var lg=b((bge,KT)=>{"use strict";function iK(t,i){return function(e){return e==null?!1:e[t]===i&&(i!==void 0||t in Object(e))}}KT.exports=iK});var XT=b((yge,YT)=>{"use strict";var oK=jT(),rK=WT(),aK=lg();function sK(t){var i=rK(t);return i.length==1&&i[0][2]?aK(i[0][0],i[0][1]):function(e){return e===t||oK(e,t,i)}}YT.exports=sK});var ji=b((Cge,ZT)=>{"use strict";var lK=ci(),cK=vn(),dK="[object Symbol]";function uK(t){return typeof t=="symbol"||cK(t)&&lK(t)==dK}ZT.exports=uK});var Gh=b((xge,QT)=>{"use strict";var pK=lt(),hK=ji(),fK=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,mK=/^\w*$/;function _K(t,i){if(pK(t))return!1;var e=typeof t;return e=="number"||e=="symbol"||e=="boolean"||t==null||hK(t)?!0:mK.test(t)||!fK.test(t)||i!=null&&t in Object(i)}QT.exports=_K});var tS=b((wge,eS)=>{"use strict";var JT=Mh(),gK="Expected a function";function cg(t,i){if(typeof t!="function"||i!=null&&typeof i!="function")throw new TypeError(gK);var e=function(){var n=arguments,o=i?i.apply(this,n):n[0],r=e.cache;if(r.has(o))return r.get(o);var a=t.apply(this,n);return e.cache=r.set(o,a)||r,a};return e.cache=new(cg.Cache||JT),e}cg.Cache=JT;eS.exports=cg});var iS=b((Tge,nS)=>{"use strict";var vK=tS(),bK=500;function yK(t){var i=vK(t,function(n){return e.size===bK&&e.clear(),n}),e=i.cache;return i}nS.exports=yK});var rS=b((Sge,oS)=>{"use strict";var CK=iS(),xK=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,wK=/\\(\\)?/g,TK=CK(function(t){var i=[];return t.charCodeAt(0)===46&&i.push(""),t.replace(xK,function(e,n,o,r){i.push(o?r.replace(wK,"$1"):n||e)}),i});oS.exports=TK});var wa=b((kge,aS)=>{"use strict";function SK(t,i){for(var e=-1,n=t==null?0:t.length,o=Array(n);++e<n;)o[e]=i(t[e],e,t);return o}aS.exports=SK});var pS=b((Ige,uS)=>{"use strict";var sS=zi(),kK=wa(),IK=lt(),MK=ji(),EK=1/0,lS=sS?sS.prototype:void 0,cS=lS?lS.toString:void 0;function dS(t){if(typeof t=="string")return t;if(IK(t))return kK(t,dS)+"";if(MK(t))return cS?cS.call(t):"";var i=t+"";return i=="0"&&1/t==-EK?"-0":i}uS.exports=dS});var dg=b((Mge,hS)=>{"use strict";var DK=pS();function PK(t){return t==null?"":DK(t)}hS.exports=PK});var Ta=b((Ege,fS)=>{"use strict";var RK=lt(),OK=Gh(),FK=rS(),NK=dg();function AK(t,i){return RK(t)?t:OK(t,i)?[t]:FK(NK(t))}fS.exports=AK});var Ko=b((Dge,mS)=>{"use strict";var LK=ji(),BK=1/0;function VK(t){if(typeof t=="string"||LK(t))return t;var i=t+"";return i=="0"&&1/t==-BK?"-0":i}mS.exports=VK});var Sa=b((Pge,_S)=>{"use strict";var zK=Ta(),HK=Ko();function qK(t,i){i=zK(i,t);for(var e=0,n=i.length;t!=null&&e<n;)t=t[HK(i[e++])];return e&&e==n?t:void 0}_S.exports=qK});var vS=b((Rge,gS)=>{"use strict";var GK=Sa();function jK(t,i,e){var n=t==null?void 0:GK(t,i);return n===void 0?e:n}gS.exports=jK});var yS=b((Oge,bS)=>{"use strict";function UK(t,i){return t!=null&&i in Object(t)}bS.exports=UK});var ug=b((Fge,CS)=>{"use strict";var $K=Ta(),WK=qo(),KK=lt(),YK=ma(),XK=Dh(),ZK=Ko();function QK(t,i,e){i=$K(i,t);for(var n=-1,o=i.length,r=!1;++n<o;){var a=ZK(i[n]);if(!(r=t!=null&&e(t,a)))break;t=t[a]}return r||++n!=o?r:(o=t==null?0:t.length,!!o&&XK(o)&&YK(a,o)&&(KK(t)||WK(t)))}CS.exports=QK});var pg=b((Nge,xS)=>{"use strict";var JK=yS(),eY=ug();function tY(t,i){return t!=null&&eY(t,i,JK)}xS.exports=tY});var TS=b((Age,wS)=>{"use strict";var nY=ag(),iY=vS(),oY=pg(),rY=Gh(),aY=sg(),sY=lg(),lY=Ko(),cY=1,dY=2;function uY(t,i){return rY(t)&&aY(i)?sY(lY(t),i):function(e){var n=iY(e,t);return n===void 0&&n===i?oY(e,t):nY(i,n,cY|dY)}}wS.exports=uY});var hg=b((Lge,SS)=>{"use strict";function pY(t){return function(i){return i?.[t]}}SS.exports=pY});var IS=b((Bge,kS)=>{"use strict";var hY=Sa();function fY(t){return function(i){return hY(i,t)}}kS.exports=fY});var ES=b((Vge,MS)=>{"use strict";var mY=hg(),_Y=IS(),gY=Gh(),vY=Ko();function bY(t){return gY(t)?mY(vY(t)):_Y(t)}MS.exports=bY});var kn=b((zge,DS)=>{"use strict";var yY=XT(),CY=TS(),xY=pi(),wY=lt(),TY=ES();function SY(t){return typeof t=="function"?t:t==null?xY:typeof t=="object"?wY(t)?CY(t[0],t[1]):yY(t):TY(t)}DS.exports=SY});var fg=b((Hge,PS)=>{"use strict";var kY=A_(),IY=uT(),MY=kn(),EY=lt();function DY(t,i){var e=EY(t)?kY:IY;return e(t,MY(i,3))}PS.exports=DY});var OS=b((qge,RS)=>{"use strict";var PY=Object.prototype,RY=PY.hasOwnProperty;function OY(t,i){return t!=null&&RY.call(t,i)}RS.exports=OY});var mg=b((Gge,FS)=>{"use strict";var FY=OS(),NY=ug();function AY(t,i){return t!=null&&NY(t,i,FY)}FS.exports=AY});var AS=b((jge,NS)=>{"use strict";var LY=Rh(),BY=Gi(),VY=qo(),zY=lt(),HY=Sn(),qY=Hi(),GY=ba(),jY=Uo(),UY="[object Map]",$Y="[object Set]",WY=Object.prototype,KY=WY.hasOwnProperty;function YY(t){if(t==null)return!0;if(HY(t)&&(zY(t)||typeof t=="string"||typeof t.splice=="function"||qY(t)||jY(t)||VY(t)))return!t.length;var i=BY(t);if(i==UY||i==$Y)return!t.size;if(GY(t))return!LY(t).length;for(var e in t)if(KY.call(t,e))return!1;return!0}NS.exports=YY});var _g=b((Uge,LS)=>{"use strict";function XY(t){return t===void 0}LS.exports=XY});var gg=b(($ge,BS)=>{"use strict";var ZY=xa(),QY=Sn();function JY(t,i){var e=-1,n=QY(t)?Array(t.length):[];return ZY(t,function(o,r,a){n[++e]=i(o,r,a)}),n}BS.exports=JY});var vg=b((Wge,VS)=>{"use strict";var eX=wa(),tX=kn(),nX=gg(),iX=lt();function oX(t,i){var e=iX(t)?eX:nX;return e(t,tX(i,3))}VS.exports=oX});var HS=b((Kge,zS)=>{"use strict";function rX(t,i,e,n){var o=-1,r=t==null?0:t.length;for(n&&r&&(e=t[++o]);++o<r;)e=i(e,t[o],o,t);return e}zS.exports=rX});var GS=b((Yge,qS)=>{"use strict";function aX(t,i,e,n,o){return o(t,function(r,a,s){e=n?(n=!1,r):i(e,r,a,s)}),e}qS.exports=aX});var bg=b((Xge,jS)=>{"use strict";var sX=HS(),lX=xa(),cX=kn(),dX=GS(),uX=lt();function pX(t,i,e){var n=uX(t)?sX:dX,o=arguments.length<3;return n(t,cX(i,4),e,o,lX)}jS.exports=pX});var $S=b((Zge,US)=>{"use strict";var hX=ci(),fX=lt(),mX=vn(),_X="[object String]";function gX(t){return typeof t=="string"||!fX(t)&&mX(t)&&hX(t)==_X}US.exports=gX});var KS=b((Qge,WS)=>{"use strict";var vX=hg(),bX=vX("length");WS.exports=bX});var XS=b((Jge,YS)=>{"use strict";var yX="\\ud800-\\udfff",CX="\\u0300-\\u036f",xX="\\ufe20-\\ufe2f",wX="\\u20d0-\\u20ff",TX=CX+xX+wX,SX="\\ufe0e\\ufe0f",kX="\\u200d",IX=RegExp("["+kX+yX+TX+SX+"]");function MX(t){return IX.test(t)}YS.exports=MX});var r2=b((e0e,o2)=>{"use strict";var QS="\\ud800-\\udfff",EX="\\u0300-\\u036f",DX="\\ufe20-\\ufe2f",PX="\\u20d0-\\u20ff",RX=EX+DX+PX,OX="\\ufe0e\\ufe0f",FX="["+QS+"]",yg="["+RX+"]",Cg="\\ud83c[\\udffb-\\udfff]",NX="(?:"+yg+"|"+Cg+")",JS="[^"+QS+"]",e2="(?:\\ud83c[\\udde6-\\uddff]){2}",t2="[\\ud800-\\udbff][\\udc00-\\udfff]",AX="\\u200d",n2=NX+"?",i2="["+OX+"]?",LX="(?:"+AX+"(?:"+[JS,e2,t2].join("|")+")"+i2+n2+")*",BX=i2+n2+LX,VX="(?:"+[JS+yg+"?",yg,e2,t2,FX].join("|")+")",ZS=RegExp(Cg+"(?="+Cg+")|"+VX+BX,"g");function zX(t){for(var i=ZS.lastIndex=0;ZS.test(t);)++i;return i}o2.exports=zX});var s2=b((t0e,a2)=>{"use strict";var HX=KS(),qX=XS(),GX=r2();function jX(t){return qX(t)?GX(t):HX(t)}a2.exports=jX});var c2=b((n0e,l2)=>{"use strict";var UX=Rh(),$X=Gi(),WX=Sn(),KX=$S(),YX=s2(),XX="[object Map]",ZX="[object Set]";function QX(t){if(t==null)return 0;if(WX(t))return KX(t)?YX(t):t.length;var i=$X(t);return i==XX||i==ZX?t.size:UX(t).length}l2.exports=QX});var u2=b((i0e,d2)=>{"use strict";var JX=Eh(),eZ=Y_(),tZ=Vh(),nZ=kn(),iZ=Ca(),oZ=lt(),rZ=Hi(),aZ=Lo(),sZ=$t(),lZ=Uo();function cZ(t,i,e){var n=oZ(t),o=n||rZ(t)||lZ(t);if(i=nZ(i,4),e==null){var r=t&&t.constructor;o?e=n?new r:[]:sZ(t)?e=aZ(r)?eZ(iZ(t)):{}:e={}}return(o?JX:tZ)(t,function(a,s,c){return i(e,a,s,c)}),e}d2.exports=cZ});var m2=b((o0e,f2)=>{"use strict";var p2=zi(),dZ=qo(),uZ=lt(),h2=p2?p2.isConcatSpreadable:void 0;function pZ(t){return uZ(t)||dZ(t)||!!(h2&&t&&t[h2])}f2.exports=pZ});var jh=b((r0e,g2)=>{"use strict";var hZ=Fh(),fZ=m2();function _2(t,i,e,n,o){var r=-1,a=t.length;for(e||(e=fZ),o||(o=[]);++r<a;){var s=t[r];i>0&&e(s)?i>1?_2(s,i-1,e,n,o):hZ(o,s):n||(o[o.length]=s)}return o}g2.exports=_2});var b2=b((a0e,v2)=>{"use strict";function mZ(t,i,e){switch(e.length){case 0:return t.call(i);case 1:return t.call(i,e[0]);case 2:return t.call(i,e[0],e[1]);case 3:return t.call(i,e[0],e[1],e[2])}return t.apply(i,e)}v2.exports=mZ});var xg=b((s0e,C2)=>{"use strict";var _Z=b2(),y2=Math.max;function gZ(t,i,e){return i=y2(i===void 0?t.length-1:i,0),function(){for(var n=arguments,o=-1,r=y2(n.length-i,0),a=Array(r);++o<r;)a[o]=n[i+o];o=-1;for(var s=Array(i+1);++o<i;)s[o]=n[o];return s[i]=e(a),_Z(t,this,s)}}C2.exports=gZ});var T2=b((l0e,w2)=>{"use strict";var vZ=Lh(),x2=D_(),bZ=pi(),yZ=x2?function(t,i){return x2(t,"toString",{configurable:!0,enumerable:!1,value:vZ(i),writable:!0})}:bZ;w2.exports=yZ});var k2=b((c0e,S2)=>{"use strict";var CZ=800,xZ=16,wZ=Date.now;function TZ(t){var i=0,e=0;return function(){var n=wZ(),o=xZ-(n-e);if(e=n,o>0){if(++i>=CZ)return arguments[0]}else i=0;return t.apply(void 0,arguments)}}S2.exports=TZ});var wg=b((d0e,I2)=>{"use strict";var SZ=T2(),kZ=k2(),IZ=kZ(SZ);I2.exports=IZ});var ka=b((u0e,M2)=>{"use strict";var MZ=pi(),EZ=xg(),DZ=wg();function PZ(t,i){return DZ(EZ(t,i,MZ),t+"")}M2.exports=PZ});var Tg=b((p0e,E2)=>{"use strict";function RZ(t,i,e,n){for(var o=t.length,r=e+(n?1:-1);n?r--:++r<o;)if(i(t[r],r,t))return r;return-1}E2.exports=RZ});var P2=b((h0e,D2)=>{"use strict";function OZ(t){return t!==t}D2.exports=OZ});var O2=b((f0e,R2)=>{"use strict";function FZ(t,i,e){for(var n=e-1,o=t.length;++n<o;)if(t[n]===i)return n;return-1}R2.exports=FZ});var N2=b((m0e,F2)=>{"use strict";var NZ=Tg(),AZ=P2(),LZ=O2();function BZ(t,i,e){return i===i?LZ(t,i,e):NZ(t,AZ,e)}F2.exports=BZ});var L2=b((_0e,A2)=>{"use strict";var VZ=N2();function zZ(t,i){var e=t==null?0:t.length;return!!e&&VZ(t,i,0)>-1}A2.exports=zZ});var V2=b((g0e,B2)=>{"use strict";function HZ(t,i,e){for(var n=-1,o=t==null?0:t.length;++n<o;)if(e(i,t[n]))return!0;return!1}B2.exports=HZ});var H2=b((v0e,z2)=>{"use strict";function qZ(){}z2.exports=qZ});var G2=b((b0e,q2)=>{"use strict";var Sg=H_(),GZ=H2(),jZ=Hh(),UZ=1/0,$Z=Sg&&1/jZ(new Sg([,-0]))[1]==UZ?function(t){return new Sg(t)}:GZ;q2.exports=$Z});var U2=b((y0e,j2)=>{"use strict";var WZ=tg(),KZ=L2(),YZ=V2(),XZ=ng(),ZZ=G2(),QZ=Hh(),JZ=200;function eQ(t,i,e){var n=-1,o=KZ,r=t.length,a=!0,s=[],c=s;if(e)a=!1,o=YZ;else if(r>=JZ){var u=i?null:ZZ(t);if(u)return QZ(u);a=!1,o=XZ,c=new WZ}else c=i?[]:s;e:for(;++n<r;){var f=t[n],g=i?i(f):f;if(f=e||f!==0?f:0,a&&g===g){for(var x=c.length;x--;)if(c[x]===g)continue e;i&&c.push(g),s.push(f)}else o(c,g,e)||(c!==s&&c.push(g),s.push(f))}return s}j2.exports=eQ});var kg=b((C0e,$2)=>{"use strict";var tQ=Sn(),nQ=vn();function iQ(t){return nQ(t)&&tQ(t)}$2.exports=iQ});var K2=b((x0e,W2)=>{"use strict";var oQ=jh(),rQ=ka(),aQ=U2(),sQ=kg(),lQ=rQ(function(t){return aQ(oQ(t,1,sQ,!0))});W2.exports=lQ});var X2=b((w0e,Y2)=>{"use strict";var cQ=wa();function dQ(t,i){return cQ(i,function(e){return t[e]})}Y2.exports=dQ});var Ig=b((T0e,Z2)=>{"use strict";var uQ=X2(),pQ=An();function hQ(t){return t==null?[]:uQ(t,pQ(t))}Z2.exports=hQ});var Wt=b((S0e,Q2)=>{"use strict";var Uh;if(typeof Yi=="function")try{Uh={clone:Zw(),constant:Lh(),each:eg(),filter:fg(),has:mg(),isArray:lt(),isEmpty:AS(),isFunction:Lo(),isUndefined:_g(),keys:An(),map:vg(),reduce:bg(),size:c2(),transform:u2(),union:K2(),values:Ig()}}catch{}Uh||(Uh=window._);Q2.exports=Uh});var $h=b((I0e,nk)=>{"use strict";var _e=Wt();nk.exports=ke;var fQ="\0",Ui="\0",J2="";function ke(t){this._isDirected=_e.has(t,"directed")?t.directed:!0,this._isMultigraph=_e.has(t,"multigraph")?t.multigraph:!1,this._isCompound=_e.has(t,"compound")?t.compound:!1,this._label=void 0,this._defaultNodeLabelFn=_e.constant(void 0),this._defaultEdgeLabelFn=_e.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[Ui]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}ke.prototype._nodeCount=0;ke.prototype._edgeCount=0;ke.prototype.isDirected=function(){return this._isDirected};ke.prototype.isMultigraph=function(){return this._isMultigraph};ke.prototype.isCompound=function(){return this._isCompound};ke.prototype.setGraph=function(t){return this._label=t,this};ke.prototype.graph=function(){return this._label};ke.prototype.setDefaultNodeLabel=function(t){return _e.isFunction(t)||(t=_e.constant(t)),this._defaultNodeLabelFn=t,this};ke.prototype.nodeCount=function(){return this._nodeCount};ke.prototype.nodes=function(){return _e.keys(this._nodes)};ke.prototype.sources=function(){var t=this;return _e.filter(this.nodes(),function(i){return _e.isEmpty(t._in[i])})};ke.prototype.sinks=function(){var t=this;return _e.filter(this.nodes(),function(i){return _e.isEmpty(t._out[i])})};ke.prototype.setNodes=function(t,i){var e=arguments,n=this;return _e.each(t,function(o){e.length>1?n.setNode(o,i):n.setNode(o)}),this};ke.prototype.setNode=function(t,i){return _e.has(this._nodes,t)?(arguments.length>1&&(this._nodes[t]=i),this):(this._nodes[t]=arguments.length>1?i:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]=Ui,this._children[t]={},this._children[Ui][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)};ke.prototype.node=function(t){return this._nodes[t]};ke.prototype.hasNode=function(t){return _e.has(this._nodes,t)};ke.prototype.removeNode=function(t){var i=this;if(_e.has(this._nodes,t)){var e=function(n){i.removeEdge(i._edgeObjs[n])};delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],_e.each(this.children(t),function(n){i.setParent(n)}),delete this._children[t]),_e.each(_e.keys(this._in[t]),e),delete this._in[t],delete this._preds[t],_e.each(_e.keys(this._out[t]),e),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this};ke.prototype.setParent=function(t,i){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(_e.isUndefined(i))i=Ui;else{i+="";for(var e=i;!_e.isUndefined(e);e=this.parent(e))if(e===t)throw new Error("Setting "+i+" as parent of "+t+" would create a cycle");this.setNode(i)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=i,this._children[i][t]=!0,this};ke.prototype._removeFromParentsChildList=function(t){delete this._children[this._parent[t]][t]};ke.prototype.parent=function(t){if(this._isCompound){var i=this._parent[t];if(i!==Ui)return i}};ke.prototype.children=function(t){if(_e.isUndefined(t)&&(t=Ui),this._isCompound){var i=this._children[t];if(i)return _e.keys(i)}else{if(t===Ui)return this.nodes();if(this.hasNode(t))return[]}};ke.prototype.predecessors=function(t){var i=this._preds[t];if(i)return _e.keys(i)};ke.prototype.successors=function(t){var i=this._sucs[t];if(i)return _e.keys(i)};ke.prototype.neighbors=function(t){var i=this.predecessors(t);if(i)return _e.union(i,this.successors(t))};ke.prototype.isLeaf=function(t){var i;return this.isDirected()?i=this.successors(t):i=this.neighbors(t),i.length===0};ke.prototype.filterNodes=function(t){var i=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});i.setGraph(this.graph());var e=this;_e.each(this._nodes,function(r,a){t(a)&&i.setNode(a,r)}),_e.each(this._edgeObjs,function(r){i.hasNode(r.v)&&i.hasNode(r.w)&&i.setEdge(r,e.edge(r))});var n={};function o(r){var a=e.parent(r);return a===void 0||i.hasNode(a)?(n[r]=a,a):a in n?n[a]:o(a)}return this._isCompound&&_e.each(i.nodes(),function(r){i.setParent(r,o(r))}),i};ke.prototype.setDefaultEdgeLabel=function(t){return _e.isFunction(t)||(t=_e.constant(t)),this._defaultEdgeLabelFn=t,this};ke.prototype.edgeCount=function(){return this._edgeCount};ke.prototype.edges=function(){return _e.values(this._edgeObjs)};ke.prototype.setPath=function(t,i){var e=this,n=arguments;return _e.reduce(t,function(o,r){return n.length>1?e.setEdge(o,r,i):e.setEdge(o,r),r}),this};ke.prototype.setEdge=function(){var t,i,e,n,o=!1,r=arguments[0];typeof r=="object"&&r!==null&&"v"in r?(t=r.v,i=r.w,e=r.name,arguments.length===2&&(n=arguments[1],o=!0)):(t=r,i=arguments[1],e=arguments[3],arguments.length>2&&(n=arguments[2],o=!0)),t=""+t,i=""+i,_e.isUndefined(e)||(e=""+e);var a=Ia(this._isDirected,t,i,e);if(_e.has(this._edgeLabels,a))return o&&(this._edgeLabels[a]=n),this;if(!_e.isUndefined(e)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(i),this._edgeLabels[a]=o?n:this._defaultEdgeLabelFn(t,i,e);var s=mQ(this._isDirected,t,i,e);return t=s.v,i=s.w,Object.freeze(s),this._edgeObjs[a]=s,ek(this._preds[i],t),ek(this._sucs[t],i),this._in[i][a]=s,this._out[t][a]=s,this._edgeCount++,this};ke.prototype.edge=function(t,i,e){var n=arguments.length===1?Mg(this._isDirected,arguments[0]):Ia(this._isDirected,t,i,e);return this._edgeLabels[n]};ke.prototype.hasEdge=function(t,i,e){var n=arguments.length===1?Mg(this._isDirected,arguments[0]):Ia(this._isDirected,t,i,e);return _e.has(this._edgeLabels,n)};ke.prototype.removeEdge=function(t,i,e){var n=arguments.length===1?Mg(this._isDirected,arguments[0]):Ia(this._isDirected,t,i,e),o=this._edgeObjs[n];return o&&(t=o.v,i=o.w,delete this._edgeLabels[n],delete this._edgeObjs[n],tk(this._preds[i],t),tk(this._sucs[t],i),delete this._in[i][n],delete this._out[t][n],this._edgeCount--),this};ke.prototype.inEdges=function(t,i){var e=this._in[t];if(e){var n=_e.values(e);return i?_e.filter(n,function(o){return o.v===i}):n}};ke.prototype.outEdges=function(t,i){var e=this._out[t];if(e){var n=_e.values(e);return i?_e.filter(n,function(o){return o.w===i}):n}};ke.prototype.nodeEdges=function(t,i){var e=this.inEdges(t,i);if(e)return e.concat(this.outEdges(t,i))};function ek(t,i){t[i]?t[i]++:t[i]=1}function tk(t,i){--t[i]||delete t[i]}function Ia(t,i,e,n){var o=""+i,r=""+e;if(!t&&o>r){var a=o;o=r,r=a}return o+J2+r+J2+(_e.isUndefined(n)?fQ:n)}function mQ(t,i,e,n){var o=""+i,r=""+e;if(!t&&o>r){var a=o;o=r,r=a}var s={v:o,w:r};return n&&(s.name=n),s}function Mg(t,i){return Ia(t,i.v,i.w,i.name)}});var ok=b((M0e,ik)=>{"use strict";ik.exports="2.1.8"});var ak=b((E0e,rk)=>{"use strict";rk.exports={Graph:$h(),version:ok()}});var lk=b((D0e,sk)=>{"use strict";var In=Wt(),_Q=$h();sk.exports={write:gQ,read:yQ};function gQ(t){var i={options:{directed:t.isDirected(),multigraph:t.isMultigraph(),compound:t.isCompound()},nodes:vQ(t),edges:bQ(t)};return In.isUndefined(t.graph())||(i.value=In.clone(t.graph())),i}function vQ(t){return In.map(t.nodes(),function(i){var e=t.node(i),n=t.parent(i),o={v:i};return In.isUndefined(e)||(o.value=e),In.isUndefined(n)||(o.parent=n),o})}function bQ(t){return In.map(t.edges(),function(i){var e=t.edge(i),n={v:i.v,w:i.w};return In.isUndefined(i.name)||(n.name=i.name),In.isUndefined(e)||(n.value=e),n})}function yQ(t){var i=new _Q(t.options).setGraph(t.value);return In.each(t.nodes,function(e){i.setNode(e.v,e.value),e.parent&&i.setParent(e.v,e.parent)}),In.each(t.edges,function(e){i.setEdge({v:e.v,w:e.w,name:e.name},e.value)}),i}});var dk=b((P0e,ck)=>{"use strict";var Wh=Wt();ck.exports=CQ;function CQ(t){var i={},e=[],n;function o(r){Wh.has(i,r)||(i[r]=!0,n.push(r),Wh.each(t.successors(r),o),Wh.each(t.predecessors(r),o))}return Wh.each(t.nodes(),function(r){n=[],o(r),n.length&&e.push(n)}),e}});var Eg=b((R0e,pk)=>{"use strict";var uk=Wt();pk.exports=ln;function ln(){this._arr=[],this._keyIndices={}}ln.prototype.size=function(){return this._arr.length};ln.prototype.keys=function(){return this._arr.map(function(t){return t.key})};ln.prototype.has=function(t){return uk.has(this._keyIndices,t)};ln.prototype.priority=function(t){var i=this._keyIndices[t];if(i!==void 0)return this._arr[i].priority};ln.prototype.min=function(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key};ln.prototype.add=function(t,i){var e=this._keyIndices;if(t=String(t),!uk.has(e,t)){var n=this._arr,o=n.length;return e[t]=o,n.push({key:t,priority:i}),this._decrease(o),!0}return!1};ln.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};ln.prototype.decrease=function(t,i){var e=this._keyIndices[t];if(i>this._arr[e].priority)throw new Error("New priority is greater than current priority. Key: "+t+" Old: "+this._arr[e].priority+" New: "+i);this._arr[e].priority=i,this._decrease(e)};ln.prototype._heapify=function(t){var i=this._arr,e=2*t,n=e+1,o=t;e<i.length&&(o=i[e].priority<i[o].priority?e:o,n<i.length&&(o=i[n].priority<i[o].priority?n:o),o!==t&&(this._swap(t,o),this._heapify(o)))};ln.prototype._decrease=function(t){for(var i=this._arr,e=i[t].priority,n;t!==0&&(n=t>>1,!(i[n].priority<e));)this._swap(t,n),t=n};ln.prototype._swap=function(t,i){var e=this._arr,n=this._keyIndices,o=e[t],r=e[i];e[t]=r,e[i]=o,n[r.key]=t,n[o.key]=i}});var Dg=b((O0e,hk)=>{"use strict";var xQ=Wt(),wQ=Eg();hk.exports=SQ;var TQ=xQ.constant(1);function SQ(t,i,e,n){return kQ(t,String(i),e||TQ,n||function(o){return t.outEdges(o)})}function kQ(t,i,e,n){var o={},r=new wQ,a,s,c=function(u){var f=u.v!==a?u.v:u.w,g=o[f],x=e(u),R=s.distance+x;if(x<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+u+" Weight: "+x);R<g.distance&&(g.distance=R,g.predecessor=a,r.decrease(f,R))};for(t.nodes().forEach(function(u){var f=u===i?0:Number.POSITIVE_INFINITY;o[u]={distance:f},r.add(u,f)});r.size()>0&&(a=r.removeMin(),s=o[a],s.distance!==Number.POSITIVE_INFINITY);)n(a).forEach(c);return o}});var mk=b((F0e,fk)=>{"use strict";var IQ=Dg(),MQ=Wt();fk.exports=EQ;function EQ(t,i,e){return MQ.transform(t.nodes(),function(n,o){n[o]=IQ(t,o,i,e)},{})}});var Pg=b((N0e,gk)=>{"use strict";var _k=Wt();gk.exports=DQ;function DQ(t){var i=0,e=[],n={},o=[];function r(a){var s=n[a]={onStack:!0,lowlink:i,index:i++};if(e.push(a),t.successors(a).forEach(function(f){_k.has(n,f)?n[f].onStack&&(s.lowlink=Math.min(s.lowlink,n[f].index)):(r(f),s.lowlink=Math.min(s.lowlink,n[f].lowlink))}),s.lowlink===s.index){var c=[],u;do u=e.pop(),n[u].onStack=!1,c.push(u);while(a!==u);o.push(c)}}return t.nodes().forEach(function(a){_k.has(n,a)||r(a)}),o}});var bk=b((A0e,vk)=>{"use strict";var PQ=Wt(),RQ=Pg();vk.exports=OQ;function OQ(t){return PQ.filter(RQ(t),function(i){return i.length>1||i.length===1&&t.hasEdge(i[0],i[0])})}});var Ck=b((L0e,yk)=>{"use strict";var FQ=Wt();yk.exports=AQ;var NQ=FQ.constant(1);function AQ(t,i,e){return LQ(t,i||NQ,e||function(n){return t.outEdges(n)})}function LQ(t,i,e){var n={},o=t.nodes();return o.forEach(function(r){n[r]={},n[r][r]={distance:0},o.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=i(a);n[r][s]={distance:c,predecessor:r}})}),o.forEach(function(r){var a=n[r];o.forEach(function(s){var c=n[s];o.forEach(function(u){var f=c[r],g=a[u],x=c[u],R=f.distance+g.distance;R<x.distance&&(x.distance=R,x.predecessor=g.predecessor)})})}),n}});var Rg=b((B0e,wk)=>{"use strict";var Ma=Wt();wk.exports=xk;xk.CycleException=Kh;function xk(t){var i={},e={},n=[];function o(r){if(Ma.has(e,r))throw new Kh;Ma.has(i,r)||(e[r]=!0,i[r]=!0,Ma.each(t.predecessors(r),o),delete e[r],n.push(r))}if(Ma.each(t.sinks(),o),Ma.size(i)!==t.nodeCount())throw new Kh;return n}function Kh(){}Kh.prototype=new Error});var kk=b((V0e,Sk)=>{"use strict";var Tk=Rg();Sk.exports=BQ;function BQ(t){try{Tk(t)}catch(i){if(i instanceof Tk.CycleException)return!1;throw i}return!0}});var Og=b((z0e,Mk)=>{"use strict";var Yh=Wt();Mk.exports=VQ;function VQ(t,i,e){Yh.isArray(i)||(i=[i]);var n=(t.isDirected()?t.successors:t.neighbors).bind(t),o=[],r={};return Yh.each(i,function(a){if(!t.hasNode(a))throw new Error("Graph does not have node: "+a);Ik(t,a,e==="post",r,n,o)}),o}function Ik(t,i,e,n,o,r){Yh.has(n,i)||(n[i]=!0,e||r.push(i),Yh.each(o(i),function(a){Ik(t,a,e,n,o,r)}),e&&r.push(i))}});var Dk=b((H0e,Ek)=>{"use strict";var zQ=Og();Ek.exports=HQ;function HQ(t,i){return zQ(t,i,"post")}});var Rk=b((q0e,Pk)=>{"use strict";var qQ=Og();Pk.exports=GQ;function GQ(t,i){return qQ(t,i,"pre")}});var Nk=b((G0e,Fk)=>{"use strict";var Ok=Wt(),jQ=$h(),UQ=Eg();Fk.exports=$Q;function $Q(t,i){var e=new jQ,n={},o=new UQ,r;function a(c){var u=c.v===r?c.w:c.v,f=o.priority(u);if(f!==void 0){var g=i(c);g<f&&(n[u]=r,o.decrease(u,g))}}if(t.nodeCount()===0)return e;Ok.each(t.nodes(),function(c){o.add(c,Number.POSITIVE_INFINITY),e.setNode(c)}),o.decrease(t.nodes()[0],0);for(var s=!1;o.size()>0;){if(r=o.removeMin(),Ok.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 Lk=b((j0e,Ak)=>{"use strict";Ak.exports={components:dk(),dijkstra:Dg(),dijkstraAll:mk(),findCycles:bk(),floydWarshall:Ck(),isAcyclic:kk(),postorder:Dk(),preorder:Rk(),prim:Nk(),tarjan:Pg(),topsort:Rg()}});var zk=b((U0e,Vk)=>{"use strict";var Bk=ak();Vk.exports={Graph:Bk.Graph,json:lk(),alg:Lk(),version:Bk.version}});var cn=b(($0e,Hk)=>{"use strict";var Xh;if(typeof Yi=="function")try{Xh=zk()}catch{}Xh||(Xh=window.graphlib);Hk.exports=Xh});var Gk=b((K0e,qk)=>{"use strict";var WQ=Z_(),KQ=1,YQ=4;function XQ(t){return WQ(t,KQ|YQ)}qk.exports=XQ});var Ea=b((Y0e,jk)=>{"use strict";var ZQ=Vi(),QQ=Sn(),JQ=ma(),eJ=$t();function tJ(t,i,e){if(!eJ(e))return!1;var n=typeof i;return(n=="number"?QQ(e)&&JQ(i,e.length):n=="string"&&i in e)?ZQ(e[i],t):!1}jk.exports=tJ});var Wk=b((X0e,$k)=>{"use strict";var nJ=ka(),iJ=Vi(),oJ=Ea(),rJ=ui(),Uk=Object.prototype,aJ=Uk.hasOwnProperty,sJ=nJ(function(t,i){t=Object(t);var e=-1,n=i.length,o=n>2?i[2]:void 0;for(o&&oJ(i[0],i[1],o)&&(n=1);++e<n;)for(var r=i[e],a=rJ(r),s=-1,c=a.length;++s<c;){var u=a[s],f=t[u];(f===void 0||iJ(f,Uk[u])&&!aJ.call(t,u))&&(t[u]=r[u])}return t});$k.exports=sJ});var Yk=b((Z0e,Kk)=>{"use strict";var lJ=kn(),cJ=Sn(),dJ=An();function uJ(t){return function(i,e,n){var o=Object(i);if(!cJ(i)){var r=lJ(e,3);i=dJ(i),e=function(s){return r(o[s],s,o)}}var a=t(i,e,n);return a>-1?o[r?i[a]:a]:void 0}}Kk.exports=uJ});var Zk=b((Q0e,Xk)=>{"use strict";var pJ=/\s/;function hJ(t){for(var i=t.length;i--&&pJ.test(t.charAt(i)););return i}Xk.exports=hJ});var Jk=b((J0e,Qk)=>{"use strict";var fJ=Zk(),mJ=/^\s+/;function _J(t){return t&&t.slice(0,fJ(t)+1).replace(mJ,"")}Qk.exports=_J});var iI=b((eve,nI)=>{"use strict";var gJ=Jk(),eI=$t(),vJ=ji(),tI=NaN,bJ=/^[-+]0x[0-9a-f]+$/i,yJ=/^0b[01]+$/i,CJ=/^0o[0-7]+$/i,xJ=parseInt;function wJ(t){if(typeof t=="number")return t;if(vJ(t))return tI;if(eI(t)){var i=typeof t.valueOf=="function"?t.valueOf():t;t=eI(i)?i+"":i}if(typeof t!="string")return t===0?t:+t;t=gJ(t);var e=yJ.test(t);return e||CJ.test(t)?xJ(t.slice(2),e?2:8):bJ.test(t)?tI:+t}nI.exports=wJ});var Fg=b((tve,rI)=>{"use strict";var TJ=iI(),oI=1/0,SJ=17976931348623157e292;function kJ(t){if(!t)return t===0?t:0;if(t=TJ(t),t===oI||t===-oI){var i=t<0?-1:1;return i*SJ}return t===t?t:0}rI.exports=kJ});var sI=b((nve,aI)=>{"use strict";var IJ=Fg();function MJ(t){var i=IJ(t),e=i%1;return i===i?e?i-e:i:0}aI.exports=MJ});var cI=b((ive,lI)=>{"use strict";var EJ=Tg(),DJ=kn(),PJ=sI(),RJ=Math.max;function OJ(t,i,e){var n=t==null?0:t.length;if(!n)return-1;var o=e==null?0:PJ(e);return o<0&&(o=RJ(n+o,0)),EJ(t,DJ(i,3),o)}lI.exports=OJ});var uI=b((ove,dI)=>{"use strict";var FJ=Yk(),NJ=cI(),AJ=FJ(NJ);dI.exports=AJ});var Ng=b((rve,pI)=>{"use strict";var LJ=jh();function BJ(t){var i=t==null?0:t.length;return i?LJ(t,1):[]}pI.exports=BJ});var fI=b((ave,hI)=>{"use strict";var VJ=Bh(),zJ=Q_(),HJ=ui();function qJ(t,i){return t==null?t:VJ(t,zJ(i),HJ)}hI.exports=qJ});var _I=b((sve,mI)=>{"use strict";function GJ(t){var i=t==null?0:t.length;return i?t[i-1]:void 0}mI.exports=GJ});var vI=b((lve,gI)=>{"use strict";var jJ=pa(),UJ=Vh(),$J=kn();function WJ(t,i){var e={};return i=$J(i,3),UJ(t,function(n,o,r){jJ(e,o,i(n,o,r))}),e}gI.exports=WJ});var Zh=b((cve,bI)=>{"use strict";var KJ=ji();function YJ(t,i,e){for(var n=-1,o=t.length;++n<o;){var r=t[n],a=i(r);if(a!=null&&(s===void 0?a===a&&!KJ(a):e(a,s)))var s=a,c=r}return c}bI.exports=YJ});var CI=b((dve,yI)=>{"use strict";function XJ(t,i){return t>i}yI.exports=XJ});var wI=b((uve,xI)=>{"use strict";var ZJ=Zh(),QJ=CI(),JJ=pi();function eee(t){return t&&t.length?ZJ(t,JJ,QJ):void 0}xI.exports=eee});var Ag=b((pve,TI)=>{"use strict";var tee=pa(),nee=Vi();function iee(t,i,e){(e!==void 0&&!nee(t[i],e)||e===void 0&&!(i in t))&&tee(t,i,e)}TI.exports=iee});var II=b((hve,kI)=>{"use strict";var oee=ci(),ree=Ca(),aee=vn(),see="[object Object]",lee=Function.prototype,cee=Object.prototype,SI=lee.toString,dee=cee.hasOwnProperty,uee=SI.call(Object);function pee(t){if(!aee(t)||oee(t)!=see)return!1;var i=ree(t);if(i===null)return!0;var e=dee.call(i,"constructor")&&i.constructor;return typeof e=="function"&&e instanceof e&&SI.call(e)==uee}kI.exports=pee});var Lg=b((fve,MI)=>{"use strict";function hee(t,i){if(!(i==="constructor"&&typeof t[i]=="function")&&i!="__proto__")return t[i]}MI.exports=hee});var DI=b((mve,EI)=>{"use strict";var fee=Ho(),mee=ui();function _ee(t){return fee(t,mee(t))}EI.exports=_ee});var AI=b((_ve,NI)=>{"use strict";var PI=Ag(),gee=F_(),vee=K_(),bee=N_(),yee=X_(),RI=qo(),OI=lt(),Cee=kg(),xee=Hi(),wee=Lo(),Tee=$t(),See=II(),kee=Uo(),FI=Lg(),Iee=DI();function Mee(t,i,e,n,o,r,a){var s=FI(t,e),c=FI(i,e),u=a.get(c);if(u){PI(t,e,u);return}var f=r?r(s,c,e+"",t,i,a):void 0,g=f===void 0;if(g){var x=OI(c),R=!x&&xee(c),k=!x&&!R&&kee(c);f=c,x||R||k?OI(s)?f=s:Cee(s)?f=bee(s):R?(g=!1,f=gee(c,!0)):k?(g=!1,f=vee(c,!0)):f=[]:See(c)||RI(c)?(f=s,RI(s)?f=Iee(s):(!Tee(s)||wee(s))&&(f=yee(c))):g=!1}g&&(a.set(c,f),o(f,c,n,r,a),a.delete(c)),PI(t,e,f)}NI.exports=Mee});var VI=b((gve,BI)=>{"use strict";var Eee=ua(),Dee=Ag(),Pee=Bh(),Ree=AI(),Oee=$t(),Fee=ui(),Nee=Lg();function LI(t,i,e,n,o){t!==i&&Pee(i,function(r,a){if(o||(o=new Eee),Oee(r))Ree(t,i,a,e,LI,n,o);else{var s=n?n(Nee(t,a),r,a+"",t,i,o):void 0;s===void 0&&(s=r),Dee(t,a,s)}},Fee)}BI.exports=LI});var HI=b((vve,zI)=>{"use strict";var Aee=ka(),Lee=Ea();function Bee(t){return Aee(function(i,e){var n=-1,o=e.length,r=o>1?e[o-1]:void 0,a=o>2?e[2]:void 0;for(r=t.length>3&&typeof r=="function"?(o--,r):void 0,a&&Lee(e[0],e[1],a)&&(r=o<3?void 0:r,o=1),i=Object(i);++n<o;){var s=e[n];s&&t(i,s,n,r)}return i})}zI.exports=Bee});var GI=b((bve,qI)=>{"use strict";var Vee=VI(),zee=HI(),Hee=zee(function(t,i,e){Vee(t,i,e)});qI.exports=Hee});var Bg=b((yve,jI)=>{"use strict";function qee(t,i){return t<i}jI.exports=qee});var $I=b((Cve,UI)=>{"use strict";var Gee=Zh(),jee=Bg(),Uee=pi();function $ee(t){return t&&t.length?Gee(t,Uee,jee):void 0}UI.exports=$ee});var KI=b((xve,WI)=>{"use strict";var Wee=Zh(),Kee=kn(),Yee=Bg();function Xee(t,i){return t&&t.length?Wee(t,Kee(i,2),Yee):void 0}WI.exports=Xee});var XI=b((wve,YI)=>{"use strict";var Zee=sn(),Qee=function(){return Zee.Date.now()};YI.exports=Qee});var JI=b((Tve,QI)=>{"use strict";var Jee=ha(),ete=Ta(),tte=ma(),ZI=$t(),nte=Ko();function ite(t,i,e,n){if(!ZI(t))return t;i=ete(i,t);for(var o=-1,r=i.length,a=r-1,s=t;s!=null&&++o<r;){var c=nte(i[o]),u=e;if(c==="__proto__"||c==="constructor"||c==="prototype")return t;if(o!=a){var f=s[c];u=n?n(f,c,s):void 0,u===void 0&&(u=ZI(f)?f:tte(i[o+1])?[]:{})}Jee(s,c,u),s=s[c]}return t}QI.exports=ite});var tM=b((Sve,eM)=>{"use strict";var ote=Sa(),rte=JI(),ate=Ta();function ste(t,i,e){for(var n=-1,o=i.length,r={};++n<o;){var a=i[n],s=ote(t,a);e(s,a)&&rte(r,ate(a,t),s)}return r}eM.exports=ste});var iM=b((kve,nM)=>{"use strict";var lte=tM(),cte=pg();function dte(t,i){return lte(t,i,function(e,n){return cte(t,n)})}nM.exports=dte});var rM=b((Ive,oM)=>{"use strict";var ute=Ng(),pte=xg(),hte=wg();function fte(t){return hte(pte(t,void 0,ute),t+"")}oM.exports=fte});var sM=b((Mve,aM)=>{"use strict";var mte=iM(),_te=rM(),gte=_te(function(t,i){return t==null?{}:mte(t,i)});aM.exports=gte});var cM=b((Eve,lM)=>{"use strict";var vte=Math.ceil,bte=Math.max;function yte(t,i,e,n){for(var o=-1,r=bte(vte((i-t)/(e||1)),0),a=Array(r);r--;)a[n?r:++o]=t,t+=e;return a}lM.exports=yte});var uM=b((Dve,dM)=>{"use strict";var Cte=cM(),xte=Ea(),Vg=Fg();function wte(t){return function(i,e,n){return n&&typeof n!="number"&&xte(i,e,n)&&(e=n=void 0),i=Vg(i),e===void 0?(e=i,i=0):e=Vg(e),n=n===void 0?i<e?1:-1:Vg(n),Cte(i,e,n,t)}}dM.exports=wte});var hM=b((Pve,pM)=>{"use strict";var Tte=uM(),Ste=Tte();pM.exports=Ste});var mM=b((Rve,fM)=>{"use strict";function kte(t,i){var e=t.length;for(t.sort(i);e--;)t[e]=t[e].value;return t}fM.exports=kte});var vM=b((Ove,gM)=>{"use strict";var _M=ji();function Ite(t,i){if(t!==i){var e=t!==void 0,n=t===null,o=t===t,r=_M(t),a=i!==void 0,s=i===null,c=i===i,u=_M(i);if(!s&&!u&&!r&&t>i||r&&a&&c&&!s&&!u||n&&a&&c||!e&&c||!o)return 1;if(!n&&!r&&!u&&t<i||u&&e&&o&&!n&&!r||s&&e&&o||!a&&o||!c)return-1}return 0}gM.exports=Ite});var yM=b((Fve,bM)=>{"use strict";var Mte=vM();function Ete(t,i,e){for(var n=-1,o=t.criteria,r=i.criteria,a=o.length,s=e.length;++n<a;){var c=Mte(o[n],r[n]);if(c){if(n>=s)return c;var u=e[n];return c*(u=="desc"?-1:1)}}return t.index-i.index}bM.exports=Ete});var xM=b((Nve,CM)=>{"use strict";var zg=wa(),Dte=Sa(),Pte=kn(),Rte=gg(),Ote=mM(),Fte=_a(),Nte=yM(),Ate=pi(),Lte=lt();function Bte(t,i,e){i.length?i=zg(i,function(r){return Lte(r)?function(a){return Dte(a,r.length===1?r[0]:r)}:r}):i=[Ate];var n=-1;i=zg(i,Fte(Pte));var o=Rte(t,function(r,a,s){var c=zg(i,function(u){return u(r)});return{criteria:c,index:++n,value:r}});return Ote(o,function(r,a){return Nte(r,a,e)})}CM.exports=Bte});var SM=b((Ave,TM)=>{"use strict";var Vte=jh(),zte=xM(),Hte=ka(),wM=Ea(),qte=Hte(function(t,i){if(t==null)return[];var e=i.length;return e>1&&wM(t,i[0],i[1])?i=[]:e>2&&wM(i[0],i[1],i[2])&&(i=[i[0]]),zte(t,Vte(i,1),[])});TM.exports=qte});var IM=b((Lve,kM)=>{"use strict";var Gte=dg(),jte=0;function Ute(t){var i=++jte;return Gte(t)+i}kM.exports=Ute});var EM=b((Bve,MM)=>{"use strict";function $te(t,i,e){for(var n=-1,o=t.length,r=i.length,a={};++n<o;){var s=n<r?i[n]:void 0;e(a,t[n],s)}return a}MM.exports=$te});var PM=b((Vve,DM)=>{"use strict";var Wte=ha(),Kte=EM();function Yte(t,i){return Kte(t||[],i||[],Wte)}DM.exports=Yte});var et=b((zve,RM)=>{"use strict";var Qh;if(typeof Yi=="function")try{Qh={cloneDeep:Gk(),constant:Lh(),defaults:Wk(),each:eg(),filter:fg(),find:uI(),flatten:Ng(),forEach:J_(),forIn:fI(),has:mg(),isUndefined:_g(),last:_I(),map:vg(),mapValues:vI(),max:wI(),merge:GI(),min:$I(),minBy:KI(),now:XI(),pick:sM(),range:hM(),reduce:bg(),sortBy:SM(),uniqueId:IM(),values:Ig(),zipObject:PM()}}catch{}Qh||(Qh=window._);RM.exports=Qh});var NM=b((qve,FM)=>{"use strict";FM.exports=Jh;function Jh(){var t={};t._next=t._prev=t,this._sentinel=t}Jh.prototype.dequeue=function(){var t=this._sentinel,i=t._prev;if(i!==t)return OM(i),i};Jh.prototype.enqueue=function(t){var i=this._sentinel;t._prev&&t._next&&OM(t),t._next=i._next,i._next._prev=t,i._next=t,t._prev=i};Jh.prototype.toString=function(){for(var t=[],i=this._sentinel,e=i._prev;e!==i;)t.push(JSON.stringify(e,Xte)),e=e._prev;return"["+t.join(", ")+"]"};function OM(t){t._prev._next=t._next,t._next._prev=t._prev,delete t._next,delete t._prev}function Xte(t,i){if(t!=="_next"&&t!=="_prev")return i}});var LM=b((Gve,AM)=>{"use strict";var Ln=et(),Zte=cn().Graph,Qte=NM();AM.exports=ene;var Jte=Ln.constant(1);function ene(t,i){if(t.nodeCount()<=1)return[];var e=nne(t,i||Jte),n=tne(e.graph,e.buckets,e.zeroIdx);return Ln.flatten(Ln.map(n,function(o){return t.outEdges(o.v,o.w)}),!0)}function tne(t,i,e){for(var n=[],o=i[i.length-1],r=i[0],a;t.nodeCount();){for(;a=r.dequeue();)Hg(t,i,e,a);for(;a=o.dequeue();)Hg(t,i,e,a);if(t.nodeCount()){for(var s=i.length-2;s>0;--s)if(a=i[s].dequeue(),a){n=n.concat(Hg(t,i,e,a,!0));break}}}return n}function Hg(t,i,e,n,o){var r=o?[]:void 0;return Ln.forEach(t.inEdges(n.v),function(a){var s=t.edge(a),c=t.node(a.v);o&&r.push({v:a.v,w:a.w}),c.out-=s,qg(i,e,c)}),Ln.forEach(t.outEdges(n.v),function(a){var s=t.edge(a),c=a.w,u=t.node(c);u.in-=s,qg(i,e,u)}),t.removeNode(n.v),r}function nne(t,i){var e=new Zte,n=0,o=0;Ln.forEach(t.nodes(),function(s){e.setNode(s,{v:s,in:0,out:0})}),Ln.forEach(t.edges(),function(s){var c=e.edge(s.v,s.w)||0,u=i(s),f=c+u;e.setEdge(s.v,s.w,f),o=Math.max(o,e.node(s.v).out+=u),n=Math.max(n,e.node(s.w).in+=u)});var r=Ln.range(o+n+3).map(function(){return new Qte}),a=n+1;return Ln.forEach(e.nodes(),function(s){qg(r,a,e.node(s))}),{graph:e,buckets:r,zeroIdx:a}}function qg(t,i,e){e.out?e.in?t[e.out-e.in+i].enqueue(e):t[t.length-1].enqueue(e):t[0].enqueue(e)}});var VM=b((jve,BM)=>{"use strict";var $i=et(),ine=LM();BM.exports={run:one,undo:ane};function one(t){var i=t.graph().acyclicer==="greedy"?ine(t,e(t)):rne(t);$i.forEach(i,function(n){var o=t.edge(n);t.removeEdge(n),o.forwardName=n.name,o.reversed=!0,t.setEdge(n.w,n.v,o,$i.uniqueId("rev"))});function e(n){return function(o){return n.edge(o).weight}}}function rne(t){var i=[],e={},n={};function o(r){$i.has(n,r)||(n[r]=!0,e[r]=!0,$i.forEach(t.outEdges(r),function(a){$i.has(e,a.w)?i.push(a):o(a.w)}),delete e[r])}return $i.forEach(t.nodes(),o),i}function ane(t){$i.forEach(t.edges(),function(i){var e=t.edge(i);if(e.reversed){t.removeEdge(i);var n=e.forwardName;delete e.reversed,delete e.forwardName,t.setEdge(i.w,i.v,e,n)}})}});var kt=b((Uve,GM)=>{"use strict";var Ne=et(),zM=cn().Graph;GM.exports={addDummyNode:HM,simplify:sne,asNonCompoundGraph:lne,successorWeights:cne,predecessorWeights:dne,intersectRect:une,buildLayerMatrix:pne,normalizeRanks:hne,removeEmptyRanks:fne,addBorderNode:mne,maxRank:qM,partition:_ne,time:gne,notime:vne};function HM(t,i,e,n){var o;do o=Ne.uniqueId(n);while(t.hasNode(o));return e.dummy=i,t.setNode(o,e),o}function sne(t){var i=new zM().setGraph(t.graph());return Ne.forEach(t.nodes(),function(e){i.setNode(e,t.node(e))}),Ne.forEach(t.edges(),function(e){var n=i.edge(e.v,e.w)||{weight:0,minlen:1},o=t.edge(e);i.setEdge(e.v,e.w,{weight:n.weight+o.weight,minlen:Math.max(n.minlen,o.minlen)})}),i}function lne(t){var i=new zM({multigraph:t.isMultigraph()}).setGraph(t.graph());return Ne.forEach(t.nodes(),function(e){t.children(e).length||i.setNode(e,t.node(e))}),Ne.forEach(t.edges(),function(e){i.setEdge(e,t.edge(e))}),i}function cne(t){var i=Ne.map(t.nodes(),function(e){var n={};return Ne.forEach(t.outEdges(e),function(o){n[o.w]=(n[o.w]||0)+t.edge(o).weight}),n});return Ne.zipObject(t.nodes(),i)}function dne(t){var i=Ne.map(t.nodes(),function(e){var n={};return Ne.forEach(t.inEdges(e),function(o){n[o.v]=(n[o.v]||0)+t.edge(o).weight}),n});return Ne.zipObject(t.nodes(),i)}function une(t,i){var e=t.x,n=t.y,o=i.x-e,r=i.y-n,a=t.width/2,s=t.height/2;if(!o&&!r)throw new Error("Not possible to find intersection inside of the rectangle");var c,u;return Math.abs(r)*a>Math.abs(o)*s?(r<0&&(s=-s),c=s*o/r,u=s):(o<0&&(a=-a),c=a,u=a*r/o),{x:e+c,y:n+u}}function pne(t){var i=Ne.map(Ne.range(qM(t)+1),function(){return[]});return Ne.forEach(t.nodes(),function(e){var n=t.node(e),o=n.rank;Ne.isUndefined(o)||(i[o][n.order]=e)}),i}function hne(t){var i=Ne.min(Ne.map(t.nodes(),function(e){return t.node(e).rank}));Ne.forEach(t.nodes(),function(e){var n=t.node(e);Ne.has(n,"rank")&&(n.rank-=i)})}function fne(t){var i=Ne.min(Ne.map(t.nodes(),function(r){return t.node(r).rank})),e=[];Ne.forEach(t.nodes(),function(r){var a=t.node(r).rank-i;e[a]||(e[a]=[]),e[a].push(r)});var n=0,o=t.graph().nodeRankFactor;Ne.forEach(e,function(r,a){Ne.isUndefined(r)&&a%o!==0?--n:n&&Ne.forEach(r,function(s){t.node(s).rank+=n})})}function mne(t,i,e,n){var o={width:0,height:0};return arguments.length>=4&&(o.rank=e,o.order=n),HM(t,"border",o,i)}function qM(t){return Ne.max(Ne.map(t.nodes(),function(i){var e=t.node(i).rank;if(!Ne.isUndefined(e))return e}))}function _ne(t,i){var e={lhs:[],rhs:[]};return Ne.forEach(t,function(n){i(n)?e.lhs.push(n):e.rhs.push(n)}),e}function gne(t,i){var e=Ne.now();try{return i()}finally{console.log(t+" time: "+(Ne.now()-e)+"ms")}}function vne(t,i){return i()}});var $M=b(($ve,UM)=>{"use strict";var jM=et(),bne=kt();UM.exports={run:yne,undo:xne};function yne(t){t.graph().dummyChains=[],jM.forEach(t.edges(),function(i){Cne(t,i)})}function Cne(t,i){var e=i.v,n=t.node(e).rank,o=i.w,r=t.node(o).rank,a=i.name,s=t.edge(i),c=s.labelRank;if(r!==n+1){t.removeEdge(i);var u,f,g;for(g=0,++n;n<r;++g,++n)s.points=[],f={width:0,height:0,edgeLabel:s,edgeObj:i,rank:n},u=bne.addDummyNode(t,"edge",f,"_d"),n===c&&(f.width=s.width,f.height=s.height,f.dummy="edge-label",f.labelpos=s.labelpos),t.setEdge(e,u,{weight:s.weight},a),g===0&&t.graph().dummyChains.push(u),e=u;t.setEdge(e,o,{weight:s.weight},a)}}function xne(t){jM.forEach(t.graph().dummyChains,function(i){var e=t.node(i),n=e.edgeLabel,o;for(t.setEdge(e.edgeObj,n);e.dummy;)o=t.successors(i)[0],t.removeNode(i),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),i=o,e=t.node(i)})}});var Da=b((Wve,WM)=>{"use strict";var ef=et();WM.exports={longestPath:wne,slack:Tne};function wne(t){var i={};function e(n){var o=t.node(n);if(ef.has(i,n))return o.rank;i[n]=!0;var r=ef.min(ef.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),o.rank=r}ef.forEach(t.sources(),e)}function Tne(t,i){return t.node(i.w).rank-t.node(i.v).rank-t.edge(i).minlen}});var Gg=b((Kve,KM)=>{"use strict";var tf=et(),Sne=cn().Graph,nf=Da().slack;KM.exports=kne;function kne(t){var i=new Sne({directed:!1}),e=t.nodes()[0],n=t.nodeCount();i.setNode(e,{});for(var o,r;Ine(i,t)<n;)o=Mne(i,t),r=i.hasNode(o.v)?nf(t,o):-nf(t,o),Ene(i,t,r);return i}function Ine(t,i){function e(n){tf.forEach(i.nodeEdges(n),function(o){var r=o.v,a=n===r?o.w:r;!t.hasNode(a)&&!nf(i,o)&&(t.setNode(a,{}),t.setEdge(n,a,{}),e(a))})}return tf.forEach(t.nodes(),e),t.nodeCount()}function Mne(t,i){return tf.minBy(i.edges(),function(e){if(t.hasNode(e.v)!==t.hasNode(e.w))return nf(i,e)})}function Ene(t,i,e){tf.forEach(t.nodes(),function(n){i.node(n).rank+=e})}});var nE=b((Yve,tE)=>{"use strict";var Bn=et(),Dne=Gg(),Pne=Da().slack,Rne=Da().longestPath,One=cn().alg.preorder,Fne=cn().alg.postorder,Nne=kt().simplify;tE.exports=Wi;Wi.initLowLimValues=Ug;Wi.initCutValues=jg;Wi.calcCutValue=XM;Wi.leaveEdge=QM;Wi.enterEdge=JM;Wi.exchangeEdges=eE;function Wi(t){t=Nne(t),Rne(t);var i=Dne(t);Ug(i),jg(i,t);for(var e,n;e=QM(i);)n=JM(i,t,e),eE(i,t,e,n)}function jg(t,i){var e=Fne(t,t.nodes());e=e.slice(0,e.length-1),Bn.forEach(e,function(n){Ane(t,i,n)})}function Ane(t,i,e){var n=t.node(e),o=n.parent;t.edge(e,o).cutvalue=XM(t,i,e)}function XM(t,i,e){var n=t.node(e),o=n.parent,r=!0,a=i.edge(e,o),s=0;return a||(r=!1,a=i.edge(o,e)),s=a.weight,Bn.forEach(i.nodeEdges(e),function(c){var u=c.v===e,f=u?c.w:c.v;if(f!==o){var g=u===r,x=i.edge(c).weight;if(s+=g?x:-x,Bne(t,e,f)){var R=t.edge(e,f).cutvalue;s+=g?-R:R}}}),s}function Ug(t,i){arguments.length<2&&(i=t.nodes()[0]),ZM(t,{},1,i)}function ZM(t,i,e,n,o){var r=e,a=t.node(n);return i[n]=!0,Bn.forEach(t.neighbors(n),function(s){Bn.has(i,s)||(e=ZM(t,i,e,s,n))}),a.low=r,a.lim=e++,o?a.parent=o:delete a.parent,e}function QM(t){return Bn.find(t.edges(),function(i){return t.edge(i).cutvalue<0})}function JM(t,i,e){var n=e.v,o=e.w;i.hasEdge(n,o)||(n=e.w,o=e.v);var r=t.node(n),a=t.node(o),s=r,c=!1;r.lim>a.lim&&(s=a,c=!0);var u=Bn.filter(i.edges(),function(f){return c===YM(t,t.node(f.v),s)&&c!==YM(t,t.node(f.w),s)});return Bn.minBy(u,function(f){return Pne(i,f)})}function eE(t,i,e,n){var o=e.v,r=e.w;t.removeEdge(o,r),t.setEdge(n.v,n.w,{}),Ug(t),jg(t,i),Lne(t,i)}function Lne(t,i){var e=Bn.find(t.nodes(),function(o){return!i.node(o).parent}),n=One(t,e);n=n.slice(1),Bn.forEach(n,function(o){var r=t.node(o).parent,a=i.edge(o,r),s=!1;a||(a=i.edge(r,o),s=!0),i.node(o).rank=i.node(r).rank+(s?a.minlen:-a.minlen)})}function Bne(t,i,e){return t.hasEdge(i,e)}function YM(t,i,e){return e.low<=i.lim&&i.lim<=e.lim}});var aE=b((Xve,rE)=>{"use strict";var Vne=Da(),oE=Vne.longestPath,zne=Gg(),Hne=nE();rE.exports=qne;function qne(t){switch(t.graph().ranker){case"network-simplex":iE(t);break;case"tight-tree":jne(t);break;case"longest-path":Gne(t);break;default:iE(t)}}var Gne=oE;function jne(t){oE(t),zne(t)}function iE(t){Hne(t)}});var lE=b((Zve,sE)=>{"use strict";var $g=et();sE.exports=Une;function Une(t){var i=Wne(t);$g.forEach(t.graph().dummyChains,function(e){for(var n=t.node(e),o=n.edgeObj,r=$ne(t,i,o.v,o.w),a=r.path,s=r.lca,c=0,u=a[c],f=!0;e!==o.w;){if(n=t.node(e),f){for(;(u=a[c])!==s&&t.node(u).maxRank<n.rank;)c++;u===s&&(f=!1)}if(!f){for(;c<a.length-1&&t.node(u=a[c+1]).minRank<=n.rank;)c++;u=a[c]}t.setParent(e,u),e=t.successors(e)[0]}})}function $ne(t,i,e,n){var o=[],r=[],a=Math.min(i[e].low,i[n].low),s=Math.max(i[e].lim,i[n].lim),c,u;c=e;do c=t.parent(c),o.push(c);while(c&&(i[c].low>a||s>i[c].lim));for(u=c,c=n;(c=t.parent(c))!==u;)r.push(c);return{path:o.concat(r.reverse()),lca:u}}function Wne(t){var i={},e=0;function n(o){var r=e;$g.forEach(t.children(o),n),i[o]={low:r,lim:e++}}return $g.forEach(t.children(),n),i}});var uE=b((Qve,dE)=>{"use strict";var Vn=et(),Wg=kt();dE.exports={run:Kne,cleanup:Zne};function Kne(t){var i=Wg.addDummyNode(t,"root",{},"_root"),e=Yne(t),n=Vn.max(Vn.values(e))-1,o=2*n+1;t.graph().nestingRoot=i,Vn.forEach(t.edges(),function(a){t.edge(a).minlen*=o});var r=Xne(t)+1;Vn.forEach(t.children(),function(a){cE(t,i,o,r,n,e,a)}),t.graph().nodeRankFactor=o}function cE(t,i,e,n,o,r,a){var s=t.children(a);if(!s.length){a!==i&&t.setEdge(i,a,{weight:0,minlen:e});return}var c=Wg.addBorderNode(t,"_bt"),u=Wg.addBorderNode(t,"_bb"),f=t.node(a);t.setParent(c,a),f.borderTop=c,t.setParent(u,a),f.borderBottom=u,Vn.forEach(s,function(g){cE(t,i,e,n,o,r,g);var x=t.node(g),R=x.borderTop?x.borderTop:g,k=x.borderBottom?x.borderBottom:g,A=x.borderTop?n:2*n,q=R!==k?1:o-r[a]+1;t.setEdge(c,R,{weight:A,minlen:q,nestingEdge:!0}),t.setEdge(k,u,{weight:A,minlen:q,nestingEdge:!0})}),t.parent(a)||t.setEdge(i,c,{weight:0,minlen:o+r[a]})}function Yne(t){var i={};function e(n,o){var r=t.children(n);r&&r.length&&Vn.forEach(r,function(a){e(a,o+1)}),i[n]=o}return Vn.forEach(t.children(),function(n){e(n,1)}),i}function Xne(t){return Vn.reduce(t.edges(),function(i,e){return i+t.edge(e).weight},0)}function Zne(t){var i=t.graph();t.removeNode(i.nestingRoot),delete i.nestingRoot,Vn.forEach(t.edges(),function(e){var n=t.edge(e);n.nestingEdge&&t.removeEdge(e)})}});var fE=b((Jve,hE)=>{"use strict";var Kg=et(),Qne=kt();hE.exports=Jne;function Jne(t){function i(e){var n=t.children(e),o=t.node(e);if(n.length&&Kg.forEach(n,i),Kg.has(o,"minRank")){o.borderLeft=[],o.borderRight=[];for(var r=o.minRank,a=o.maxRank+1;r<a;++r)pE(t,"borderLeft","_bl",e,o,r),pE(t,"borderRight","_br",e,o,r)}}Kg.forEach(t.children(),i)}function pE(t,i,e,n,o,r){var a={width:0,height:0,rank:r,borderType:i},s=o[i][r-1],c=Qne.addDummyNode(t,"border",a,e);o[i][r]=c,t.setParent(c,n),s&&t.setEdge(s,c,{weight:1})}});var vE=b((ebe,gE)=>{"use strict";var Mn=et();gE.exports={adjust:eie,undo:tie};function eie(t){var i=t.graph().rankdir.toLowerCase();(i==="lr"||i==="rl")&&_E(t)}function tie(t){var i=t.graph().rankdir.toLowerCase();(i==="bt"||i==="rl")&&nie(t),(i==="lr"||i==="rl")&&(iie(t),_E(t))}function _E(t){Mn.forEach(t.nodes(),function(i){mE(t.node(i))}),Mn.forEach(t.edges(),function(i){mE(t.edge(i))})}function mE(t){var i=t.width;t.width=t.height,t.height=i}function nie(t){Mn.forEach(t.nodes(),function(i){Yg(t.node(i))}),Mn.forEach(t.edges(),function(i){var e=t.edge(i);Mn.forEach(e.points,Yg),Mn.has(e,"y")&&Yg(e)})}function Yg(t){t.y=-t.y}function iie(t){Mn.forEach(t.nodes(),function(i){Xg(t.node(i))}),Mn.forEach(t.edges(),function(i){var e=t.edge(i);Mn.forEach(e.points,Xg),Mn.has(e,"x")&&Xg(e)})}function Xg(t){var i=t.x;t.x=t.y,t.y=i}});var yE=b((tbe,bE)=>{"use strict";var zn=et();bE.exports=oie;function oie(t){var i={},e=zn.filter(t.nodes(),function(s){return!t.children(s).length}),n=zn.max(zn.map(e,function(s){return t.node(s).rank})),o=zn.map(zn.range(n+1),function(){return[]});function r(s){if(!zn.has(i,s)){i[s]=!0;var c=t.node(s);o[c.rank].push(s),zn.forEach(t.successors(s),r)}}var a=zn.sortBy(e,function(s){return t.node(s).rank});return zn.forEach(a,r),o}});var xE=b((nbe,CE)=>{"use strict";var hi=et();CE.exports=rie;function rie(t,i){for(var e=0,n=1;n<i.length;++n)e+=aie(t,i[n-1],i[n]);return e}function aie(t,i,e){for(var n=hi.zipObject(e,hi.map(e,function(u,f){return f})),o=hi.flatten(hi.map(i,function(u){return hi.sortBy(hi.map(t.outEdges(u),function(f){return{pos:n[f.w],weight:t.edge(f).weight}}),"pos")}),!0),r=1;r<e.length;)r<<=1;var a=2*r-1;r-=1;var s=hi.map(new Array(a),function(){return 0}),c=0;return hi.forEach(o.forEach(function(u){var f=u.pos+r;s[f]+=u.weight;for(var g=0;f>0;)f%2&&(g+=s[f+1]),f=f-1>>1,s[f]+=u.weight;c+=u.weight*g})),c}});var SE=b((ibe,TE)=>{"use strict";var wE=et();TE.exports=sie;function sie(t,i){return wE.map(i,function(e){var n=t.inEdges(e);if(n.length){var o=wE.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:o.sum/o.weight,weight:o.weight}}else return{v:e}})}});var IE=b((obe,kE)=>{"use strict";var Kt=et();kE.exports=lie;function lie(t,i){var e={};Kt.forEach(t,function(o,r){var a=e[o.v]={indegree:0,in:[],out:[],vs:[o.v],i:r};Kt.isUndefined(o.barycenter)||(a.barycenter=o.barycenter,a.weight=o.weight)}),Kt.forEach(i.edges(),function(o){var r=e[o.v],a=e[o.w];!Kt.isUndefined(r)&&!Kt.isUndefined(a)&&(a.indegree++,r.out.push(e[o.w]))});var n=Kt.filter(e,function(o){return!o.indegree});return cie(n)}function cie(t){var i=[];function e(r){return function(a){a.merged||(Kt.isUndefined(a.barycenter)||Kt.isUndefined(r.barycenter)||a.barycenter>=r.barycenter)&&die(r,a)}}function n(r){return function(a){a.in.push(r),--a.indegree===0&&t.push(a)}}for(;t.length;){var o=t.pop();i.push(o),Kt.forEach(o.in.reverse(),e(o)),Kt.forEach(o.out,n(o))}return Kt.map(Kt.filter(i,function(r){return!r.merged}),function(r){return Kt.pick(r,["vs","i","barycenter","weight"])})}function die(t,i){var e=0,n=0;t.weight&&(e+=t.barycenter*t.weight,n+=t.weight),i.weight&&(e+=i.barycenter*i.weight,n+=i.weight),t.vs=i.vs.concat(t.vs),t.barycenter=e/n,t.weight=n,t.i=Math.min(i.i,t.i),i.merged=!0}});var DE=b((rbe,EE)=>{"use strict";var Pa=et(),uie=kt();EE.exports=pie;function pie(t,i){var e=uie.partition(t,function(f){return Pa.has(f,"barycenter")}),n=e.lhs,o=Pa.sortBy(e.rhs,function(f){return-f.i}),r=[],a=0,s=0,c=0;n.sort(hie(!!i)),c=ME(r,o,c),Pa.forEach(n,function(f){c+=f.vs.length,r.push(f.vs),a+=f.barycenter*f.weight,s+=f.weight,c=ME(r,o,c)});var u={vs:Pa.flatten(r,!0)};return s&&(u.barycenter=a/s,u.weight=s),u}function ME(t,i,e){for(var n;i.length&&(n=Pa.last(i)).i<=e;)i.pop(),t.push(n.vs),e++;return e}function hie(t){return function(i,e){return i.barycenter<e.barycenter?-1:i.barycenter>e.barycenter?1:t?e.i-i.i:i.i-e.i}}});var OE=b((abe,RE)=>{"use strict";var fi=et(),fie=SE(),mie=IE(),_ie=DE();RE.exports=PE;function PE(t,i,e,n){var o=t.children(i),r=t.node(i),a=r?r.borderLeft:void 0,s=r?r.borderRight:void 0,c={};a&&(o=fi.filter(o,function(k){return k!==a&&k!==s}));var u=fie(t,o);fi.forEach(u,function(k){if(t.children(k.v).length){var A=PE(t,k.v,e,n);c[k.v]=A,fi.has(A,"barycenter")&&vie(k,A)}});var f=mie(u,e);gie(f,c);var g=_ie(f,n);if(a&&(g.vs=fi.flatten([a,g.vs,s],!0),t.predecessors(a).length)){var x=t.node(t.predecessors(a)[0]),R=t.node(t.predecessors(s)[0]);fi.has(g,"barycenter")||(g.barycenter=0,g.weight=0),g.barycenter=(g.barycenter*g.weight+x.order+R.order)/(g.weight+2),g.weight+=2}return g}function gie(t,i){fi.forEach(t,function(e){e.vs=fi.flatten(e.vs.map(function(n){return i[n]?i[n].vs:n}),!0)})}function vie(t,i){fi.isUndefined(t.barycenter)?(t.barycenter=i.barycenter,t.weight=i.weight):(t.barycenter=(t.barycenter*t.weight+i.barycenter*i.weight)/(t.weight+i.weight),t.weight+=i.weight)}});var NE=b((sbe,FE)=>{"use strict";var Ra=et(),bie=cn().Graph;FE.exports=yie;function yie(t,i,e){var n=Cie(t),o=new bie({compound:!0}).setGraph({root:n}).setDefaultNodeLabel(function(r){return t.node(r)});return Ra.forEach(t.nodes(),function(r){var a=t.node(r),s=t.parent(r);(a.rank===i||a.minRank<=i&&i<=a.maxRank)&&(o.setNode(r),o.setParent(r,s||n),Ra.forEach(t[e](r),function(c){var u=c.v===r?c.w:c.v,f=o.edge(u,r),g=Ra.isUndefined(f)?0:f.weight;o.setEdge(u,r,{weight:t.edge(c).weight+g})}),Ra.has(a,"minRank")&&o.setNode(r,{borderLeft:a.borderLeft[i],borderRight:a.borderRight[i]}))}),o}function Cie(t){for(var i;t.hasNode(i=Ra.uniqueId("_root")););return i}});var LE=b((lbe,AE)=>{"use strict";var xie=et();AE.exports=wie;function wie(t,i,e){var n={},o;xie.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=o,o=a),c&&c!==a){i.setEdge(c,a);return}a=s}})}});var qE=b((cbe,HE)=>{"use strict";var mi=et(),Tie=yE(),Sie=xE(),kie=OE(),Iie=NE(),Mie=LE(),Eie=cn().Graph,BE=kt();HE.exports=Die;function Die(t){var i=BE.maxRank(t),e=VE(t,mi.range(1,i+1),"inEdges"),n=VE(t,mi.range(i-1,-1,-1),"outEdges"),o=Tie(t);zE(t,o);for(var r=Number.POSITIVE_INFINITY,a,s=0,c=0;c<4;++s,++c){Pie(s%2?e:n,s%4>=2),o=BE.buildLayerMatrix(t);var u=Sie(t,o);u<r&&(c=0,a=mi.cloneDeep(o),r=u)}zE(t,a)}function VE(t,i,e){return mi.map(i,function(n){return Iie(t,n,e)})}function Pie(t,i){var e=new Eie;mi.forEach(t,function(n){var o=n.graph().root,r=kie(n,o,e,i);mi.forEach(r.vs,function(a,s){n.node(a).order=s}),Mie(n,e,r.vs)})}function zE(t,i){mi.forEach(i,function(e){mi.forEach(e,function(n,o){t.node(n).order=o})})}});var QE=b((dbe,ZE)=>{"use strict";var ge=et(),Rie=cn().Graph,Oie=kt();ZE.exports={positionX:Aie,findType1Conflicts:GE,findType2Conflicts:jE,addConflict:Zg,hasConflict:UE,verticalAlignment:$E,horizontalCompaction:WE,alignCoordinates:YE,findSmallestWidthAlignment:KE,balance:XE};function GE(t,i){var e={};function n(o,r){var a=0,s=0,c=o.length,u=ge.last(r);return ge.forEach(r,function(f,g){var x=Fie(t,f),R=x?t.node(x).order:c;(x||f===u)&&(ge.forEach(r.slice(s,g+1),function(k){ge.forEach(t.predecessors(k),function(A){var q=t.node(A),W=q.order;(W<a||R<W)&&!(q.dummy&&t.node(k).dummy)&&Zg(e,A,k)})}),s=g+1,a=R)}),r}return ge.reduce(i,n),e}function jE(t,i){var e={};function n(r,a,s,c,u){var f;ge.forEach(ge.range(a,s),function(g){f=r[g],t.node(f).dummy&&ge.forEach(t.predecessors(f),function(x){var R=t.node(x);R.dummy&&(R.order<c||R.order>u)&&Zg(e,x,f)})})}function o(r,a){var s=-1,c,u=0;return ge.forEach(a,function(f,g){if(t.node(f).dummy==="border"){var x=t.predecessors(f);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 ge.reduce(i,o),e}function Fie(t,i){if(t.node(i).dummy)return ge.find(t.predecessors(i),function(e){return t.node(e).dummy})}function Zg(t,i,e){if(i>e){var n=i;i=e,e=n}var o=t[i];o||(t[i]=o={}),o[e]=!0}function UE(t,i,e){if(i>e){var n=i;i=e,e=n}return ge.has(t[i],e)}function $E(t,i,e,n){var o={},r={},a={};return ge.forEach(i,function(s){ge.forEach(s,function(c,u){o[c]=c,r[c]=c,a[c]=u})}),ge.forEach(i,function(s){var c=-1;ge.forEach(s,function(u){var f=n(u);if(f.length){f=ge.sortBy(f,function(A){return a[A]});for(var g=(f.length-1)/2,x=Math.floor(g),R=Math.ceil(g);x<=R;++x){var k=f[x];r[u]===u&&c<a[k]&&!UE(e,u,k)&&(r[k]=u,r[u]=o[u]=o[k],c=a[k])}}})}),{root:o,align:r}}function WE(t,i,e,n,o){var r={},a=Nie(t,i,e,o),s=o?"borderLeft":"borderRight";function c(g,x){for(var R=a.nodes(),k=R.pop(),A={};k;)A[k]?g(k):(A[k]=!0,R.push(k),R=R.concat(x(k))),k=R.pop()}function u(g){r[g]=a.inEdges(g).reduce(function(x,R){return Math.max(x,r[R.v]+a.edge(R))},0)}function f(g){var x=a.outEdges(g).reduce(function(k,A){return Math.min(k,r[A.w]-a.edge(A))},Number.POSITIVE_INFINITY),R=t.node(g);x!==Number.POSITIVE_INFINITY&&R.borderType!==s&&(r[g]=Math.max(r[g],x))}return c(u,a.predecessors.bind(a)),c(f,a.successors.bind(a)),ge.forEach(n,function(g){r[g]=r[e[g]]}),r}function Nie(t,i,e,n){var o=new Rie,r=t.graph(),a=Lie(r.nodesep,r.edgesep,n);return ge.forEach(i,function(s){var c;ge.forEach(s,function(u){var f=e[u];if(o.setNode(f),c){var g=e[c],x=o.edge(g,f);o.setEdge(g,f,Math.max(a(t,u,c),x||0))}c=u})}),o}function KE(t,i){return ge.minBy(ge.values(i),function(e){var n=Number.NEGATIVE_INFINITY,o=Number.POSITIVE_INFINITY;return ge.forIn(e,function(r,a){var s=Bie(t,a)/2;n=Math.max(r+s,n),o=Math.min(r-s,o)}),n-o})}function YE(t,i){var e=ge.values(i),n=ge.min(e),o=ge.max(e);ge.forEach(["u","d"],function(r){ge.forEach(["l","r"],function(a){var s=r+a,c=t[s],u;if(c!==i){var f=ge.values(c);u=a==="l"?n-ge.min(f):o-ge.max(f),u&&(t[s]=ge.mapValues(c,function(g){return g+u}))}})})}function XE(t,i){return ge.mapValues(t.ul,function(e,n){if(i)return t[i.toLowerCase()][n];var o=ge.sortBy(ge.map(t,n));return(o[1]+o[2])/2})}function Aie(t){var i=Oie.buildLayerMatrix(t),e=ge.merge(GE(t,i),jE(t,i)),n={},o;ge.forEach(["u","d"],function(a){o=a==="u"?i:ge.values(i).reverse(),ge.forEach(["l","r"],function(s){s==="r"&&(o=ge.map(o,function(g){return ge.values(g).reverse()}));var c=(a==="u"?t.predecessors:t.successors).bind(t),u=$E(t,o,e,c),f=WE(t,o,u.root,u.align,s==="r");s==="r"&&(f=ge.mapValues(f,function(g){return-g})),n[a+s]=f})});var r=KE(t,n);return YE(n,r),XE(n,t.graph().align)}function Lie(t,i,e){return function(n,o,r){var a=n.node(o),s=n.node(r),c=0,u;if(c+=a.width/2,ge.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?i:t)/2,c+=(s.dummy?i:t)/2,c+=s.width/2,ge.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 Bie(t,i){return t.node(i).width}});var tD=b((ube,eD)=>{"use strict";var Oa=et(),JE=kt(),Vie=QE().positionX;eD.exports=zie;function zie(t){t=JE.asNonCompoundGraph(t),Hie(t),Oa.forEach(Vie(t),function(i,e){t.node(e).x=i})}function Hie(t){var i=JE.buildLayerMatrix(t),e=t.graph().ranksep,n=0;Oa.forEach(i,function(o){var r=Oa.max(Oa.map(o,function(a){return t.node(a).height}));Oa.forEach(o,function(a){t.node(a).y=n+r/2}),n+=r+e})}});var sD=b((pbe,aD)=>{"use strict";var xe=et(),nD=VM(),iD=$M(),qie=aE(),Gie=kt().normalizeRanks,jie=lE(),Uie=kt().removeEmptyRanks,oD=uE(),$ie=fE(),rD=vE(),Wie=qE(),Kie=tD(),_i=kt(),Yie=cn().Graph;aD.exports=Xie;function Xie(t,i){var e=i&&i.debugTiming?_i.time:_i.notime;e("layout",function(){var n=e(" buildLayoutGraph",function(){return soe(t)});e(" runLayout",function(){Zie(n,e)}),e(" updateInputGraph",function(){Qie(t,n)})})}function Zie(t,i){i(" makeSpaceForEdgeLabels",function(){loe(t)}),i(" removeSelfEdges",function(){goe(t)}),i(" acyclic",function(){nD.run(t)}),i(" nestingGraph.run",function(){oD.run(t)}),i(" rank",function(){qie(_i.asNonCompoundGraph(t))}),i(" injectEdgeLabelProxies",function(){coe(t)}),i(" removeEmptyRanks",function(){Uie(t)}),i(" nestingGraph.cleanup",function(){oD.cleanup(t)}),i(" normalizeRanks",function(){Gie(t)}),i(" assignRankMinMax",function(){doe(t)}),i(" removeEdgeLabelProxies",function(){uoe(t)}),i(" normalize.run",function(){iD.run(t)}),i(" parentDummyChains",function(){jie(t)}),i(" addBorderSegments",function(){$ie(t)}),i(" order",function(){Wie(t)}),i(" insertSelfEdges",function(){voe(t)}),i(" adjustCoordinateSystem",function(){rD.adjust(t)}),i(" position",function(){Kie(t)}),i(" positionSelfEdges",function(){boe(t)}),i(" removeBorderNodes",function(){_oe(t)}),i(" normalize.undo",function(){iD.undo(t)}),i(" fixupEdgeLabelCoords",function(){foe(t)}),i(" undoCoordinateSystem",function(){rD.undo(t)}),i(" translateGraph",function(){poe(t)}),i(" assignNodeIntersects",function(){hoe(t)}),i(" reversePoints",function(){moe(t)}),i(" acyclic.undo",function(){nD.undo(t)})}function Qie(t,i){xe.forEach(t.nodes(),function(e){var n=t.node(e),o=i.node(e);n&&(n.x=o.x,n.y=o.y,i.children(e).length&&(n.width=o.width,n.height=o.height))}),xe.forEach(t.edges(),function(e){var n=t.edge(e),o=i.edge(e);n.points=o.points,xe.has(o,"x")&&(n.x=o.x,n.y=o.y)}),t.graph().width=i.graph().width,t.graph().height=i.graph().height}var Jie=["nodesep","edgesep","ranksep","marginx","marginy"],eoe={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},toe=["acyclicer","ranker","rankdir","align"],noe=["width","height"],ioe={width:0,height:0},ooe=["minlen","weight","width","height","labeloffset"],roe={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},aoe=["labelpos"];function soe(t){var i=new Yie({multigraph:!0,compound:!0}),e=Jg(t.graph());return i.setGraph(xe.merge({},eoe,Qg(e,Jie),xe.pick(e,toe))),xe.forEach(t.nodes(),function(n){var o=Jg(t.node(n));i.setNode(n,xe.defaults(Qg(o,noe),ioe)),i.setParent(n,t.parent(n))}),xe.forEach(t.edges(),function(n){var o=Jg(t.edge(n));i.setEdge(n,xe.merge({},roe,Qg(o,ooe),xe.pick(o,aoe)))}),i}function loe(t){var i=t.graph();i.ranksep/=2,xe.forEach(t.edges(),function(e){var n=t.edge(e);n.minlen*=2,n.labelpos.toLowerCase()!=="c"&&(i.rankdir==="TB"||i.rankdir==="BT"?n.width+=n.labeloffset:n.height+=n.labeloffset)})}function coe(t){xe.forEach(t.edges(),function(i){var e=t.edge(i);if(e.width&&e.height){var n=t.node(i.v),o=t.node(i.w),r={rank:(o.rank-n.rank)/2+n.rank,e:i};_i.addDummyNode(t,"edge-proxy",r,"_ep")}})}function doe(t){var i=0;xe.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,i=xe.max(i,n.maxRank))}),t.graph().maxRank=i}function uoe(t){xe.forEach(t.nodes(),function(i){var e=t.node(i);e.dummy==="edge-proxy"&&(t.edge(e.e).labelRank=e.rank,t.removeNode(i))})}function poe(t){var i=Number.POSITIVE_INFINITY,e=0,n=Number.POSITIVE_INFINITY,o=0,r=t.graph(),a=r.marginx||0,s=r.marginy||0;function c(u){var f=u.x,g=u.y,x=u.width,R=u.height;i=Math.min(i,f-x/2),e=Math.max(e,f+x/2),n=Math.min(n,g-R/2),o=Math.max(o,g+R/2)}xe.forEach(t.nodes(),function(u){c(t.node(u))}),xe.forEach(t.edges(),function(u){var f=t.edge(u);xe.has(f,"x")&&c(f)}),i-=a,n-=s,xe.forEach(t.nodes(),function(u){var f=t.node(u);f.x-=i,f.y-=n}),xe.forEach(t.edges(),function(u){var f=t.edge(u);xe.forEach(f.points,function(g){g.x-=i,g.y-=n}),xe.has(f,"x")&&(f.x-=i),xe.has(f,"y")&&(f.y-=n)}),r.width=e-i+a,r.height=o-n+s}function hoe(t){xe.forEach(t.edges(),function(i){var e=t.edge(i),n=t.node(i.v),o=t.node(i.w),r,a;e.points?(r=e.points[0],a=e.points[e.points.length-1]):(e.points=[],r=o,a=n),e.points.unshift(_i.intersectRect(n,r)),e.points.push(_i.intersectRect(o,a))})}function foe(t){xe.forEach(t.edges(),function(i){var e=t.edge(i);if(xe.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 moe(t){xe.forEach(t.edges(),function(i){var e=t.edge(i);e.reversed&&e.points.reverse()})}function _oe(t){xe.forEach(t.nodes(),function(i){if(t.children(i).length){var e=t.node(i),n=t.node(e.borderTop),o=t.node(e.borderBottom),r=t.node(xe.last(e.borderLeft)),a=t.node(xe.last(e.borderRight));e.width=Math.abs(a.x-r.x),e.height=Math.abs(o.y-n.y),e.x=r.x+e.width/2,e.y=n.y+e.height/2}}),xe.forEach(t.nodes(),function(i){t.node(i).dummy==="border"&&t.removeNode(i)})}function goe(t){xe.forEach(t.edges(),function(i){if(i.v===i.w){var e=t.node(i.v);e.selfEdges||(e.selfEdges=[]),e.selfEdges.push({e:i,label:t.edge(i)}),t.removeEdge(i)}})}function voe(t){var i=_i.buildLayerMatrix(t);xe.forEach(i,function(e){var n=0;xe.forEach(e,function(o,r){var a=t.node(o);a.order=r+n,xe.forEach(a.selfEdges,function(s){_i.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 boe(t){xe.forEach(t.nodes(),function(i){var e=t.node(i);if(e.dummy==="selfedge"){var n=t.node(e.e.v),o=n.x+n.width/2,r=n.y,a=e.x-o,s=n.height/2;t.setEdge(e.e,e.label),t.removeNode(i),e.label.points=[{x:o+2*a/3,y:r-s},{x:o+5*a/6,y:r-s},{x:o+a,y:r},{x:o+5*a/6,y:r+s},{x:o+2*a/3,y:r+s}],e.label.x=e.x,e.label.y=e.y}})}function Qg(t,i){return xe.mapValues(xe.pick(t,i),Number)}function Jg(t){var i={};return xe.forEach(t,function(e,n){i[n.toLowerCase()]=e}),i}});var cD=b((hbe,lD)=>{"use strict";var of=et(),yoe=kt(),Coe=cn().Graph;lD.exports={debugOrdering:xoe};function xoe(t){var i=yoe.buildLayerMatrix(t),e=new Coe({compound:!0,multigraph:!0}).setGraph({});return of.forEach(t.nodes(),function(n){e.setNode(n,{label:n}),e.setParent(n,"layer"+t.node(n).rank)}),of.forEach(t.edges(),function(n){e.setEdge(n.v,n.w,{},n.name)}),of.forEach(i,function(n,o){var r="layer"+o;e.setNode(r,{rank:"same"}),of.reduce(n,function(a,s){return e.setEdge(a,s,{style:"invis"}),s})}),e}});var uD=b((fbe,dD)=>{"use strict";dD.exports="0.8.5"});var hD=b((mbe,pD)=>{"use strict";pD.exports={graphlib:cn(),layout:sD(),debug:cD(),util:{time:kt().time,notime:kt().notime},version:uD()}});var Lv={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",searchMapOn:"Search also filters the map. Click so it filters only the files list.",searchMapOff:"Search filters only the files list. Click so it also filters the map.",reset:"Reset filters",resetTooltip:"Show all on the map and clear the search, kind, severity and favorite filters"}};var us=new ve("MAP_ISOLATE_INTENT",{providedIn:"root",factory:()=>({isolate:()=>{}})});var Bv=`
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 n3=["data-p-icon","angle-double-left"],Vv=(()=>{class t extends De{static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275cmp=z({type:t,selectors:[["","data-p-icon","angle-double-left"]],features:[Q],attrs:n3,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,o){n&1&&(X(),oe(0,"path",0))},encapsulation:2})}return t})();var i3=["data-p-icon","angle-double-right"],zv=(()=>{class t extends De{static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275cmp=z({type:t,selectors:[["","data-p-icon","angle-double-right"]],features:[Q],attrs:i3,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,o){n&1&&(X(),oe(0,"path",0))},encapsulation:2})}return t})();var o3=["data-p-icon","angle-left"],Hv=(()=>{class t extends De{static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275cmp=z({type:t,selectors:[["","data-p-icon","angle-left"]],features:[Q],attrs:o3,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,o){n&1&&(X(),oe(0,"path",0))},encapsulation:2})}return t})();var r3=["data-p-icon","angle-right"],qv=(()=>{class t extends De{static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275cmp=z({type:t,selectors:[["","data-p-icon","angle-right"]],features:[Q],attrs:r3,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,o){n&1&&(X(),oe(0,"path",0))},encapsulation:2})}return t})();var a3=["data-p-icon","arrow-down"],Af=(()=>{class t extends De{pathId;onInit(){this.pathId="url(#"+ut()+")"}static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275cmp=z({type:t,selectors:[["","data-p-icon","arrow-down"]],features:[Q],attrs:a3,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,o){n&1&&(X(),Z(0,"g"),oe(1,"path",0),ie(),Z(2,"defs")(3,"clipPath",1),oe(4,"rect",2),ie()()),n&2&&(O("clip-path",o.pathId),l(3),Qe("id",o.pathId))},encapsulation:2})}return t})();var s3=["data-p-icon","arrow-up"],Lf=(()=>{class t extends De{pathId;onInit(){this.pathId="url(#"+ut()+")"}static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275cmp=z({type:t,selectors:[["","data-p-icon","arrow-up"]],features:[Q],attrs:s3,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,o){n&1&&(X(),Z(0,"g"),oe(1,"path",0),ie(),Z(2,"defs")(3,"clipPath",1),oe(4,"rect",2),ie()()),n&2&&(O("clip-path",o.pathId),l(3),Qe("id",o.pathId))},encapsulation:2})}return t})();var l3=["data-p-icon","calendar"],Gv=(()=>{class t extends De{static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275cmp=z({type:t,selectors:[["","data-p-icon","calendar"]],features:[Q],attrs:l3,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,o){n&1&&(X(),oe(0,"path",0))},encapsulation:2})}return t})();var c3=["data-p-icon","chevron-left"],jv=(()=>{class t extends De{static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275cmp=z({type:t,selectors:[["","data-p-icon","chevron-left"]],features:[Q],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,o){n&1&&(X(),oe(0,"path",0))},encapsulation:2})}return t})();var d3=["data-p-icon","chevron-right"],Uv=(()=>{class t extends De{static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275cmp=z({type:t,selectors:[["","data-p-icon","chevron-right"]],features:[Q],attrs:d3,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,o){n&1&&(X(),oe(0,"path",0))},encapsulation:2})}return t})();var u3=["data-p-icon","chevron-up"],$v=(()=>{class t extends De{static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275cmp=z({type:t,selectors:[["","data-p-icon","chevron-up"]],features:[Q],attrs:u3,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,o){n&1&&(X(),oe(0,"path",0))},encapsulation:2})}return t})();var p3=["data-p-icon","filter"],Wv=(()=>{class t extends De{pathId;onInit(){this.pathId="url(#"+ut()+")"}static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275cmp=z({type:t,selectors:[["","data-p-icon","filter"]],features:[Q],attrs:p3,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,o){n&1&&(X(),Z(0,"g"),oe(1,"path",0),ie(),Z(2,"defs")(3,"clipPath",1),oe(4,"rect",2),ie()()),n&2&&(O("clip-path",o.pathId),l(3),Qe("id",o.pathId))},encapsulation:2})}return t})();var h3=["data-p-icon","filter-slash"],Kv=(()=>{class t extends De{pathId;onInit(){this.pathId="url(#"+ut()+")"}static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275cmp=z({type:t,selectors:[["","data-p-icon","filter-slash"]],features:[Q],attrs:h3,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,o){n&1&&(X(),Z(0,"g"),oe(1,"path",0),ie(),Z(2,"defs")(3,"clipPath",1),oe(4,"rect",2),ie()()),n&2&&(O("clip-path",o.pathId),l(3),Qe("id",o.pathId))},encapsulation:2})}return t})();var f3=["data-p-icon","plus"],Yv=(()=>{class t extends De{pathId;onInit(){this.pathId="url(#"+ut()+")"}static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275cmp=z({type:t,selectors:[["","data-p-icon","plus"]],features:[Q],attrs:f3,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,o){n&1&&(X(),Z(0,"g"),oe(1,"path",0),ie(),Z(2,"defs")(3,"clipPath",1),oe(4,"rect",2),ie()()),n&2&&(O("clip-path",o.pathId),l(3),Qe("id",o.pathId))},encapsulation:2})}return t})();var m3=["data-p-icon","sort-alt"],Xv=(()=>{class t extends De{pathId;onInit(){this.pathId="url(#"+ut()+")"}static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275cmp=z({type:t,selectors:[["","data-p-icon","sort-alt"]],features:[Q],attrs:m3,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,o){n&1&&(X(),Z(0,"g"),oe(1,"path",0)(2,"path",1)(3,"path",2)(4,"path",3),ie(),Z(5,"defs")(6,"clipPath",4),oe(7,"rect",5),ie()()),n&2&&(O("clip-path",o.pathId),l(6),Qe("id",o.pathId))},encapsulation:2})}return t})();var _3=["data-p-icon","sort-amount-down"],Zv=(()=>{class t extends De{pathId;onInit(){this.pathId="url(#"+ut()+")"}static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275cmp=z({type:t,selectors:[["","data-p-icon","sort-amount-down"]],features:[Q],attrs:_3,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,o){n&1&&(X(),Z(0,"g"),oe(1,"path",0),ie(),Z(2,"defs")(3,"clipPath",1),oe(4,"rect",2),ie()()),n&2&&(O("clip-path",o.pathId),l(3),Qe("id",o.pathId))},encapsulation:2})}return t})();var g3=["data-p-icon","sort-amount-up-alt"],Qv=(()=>{class t extends De{pathId;onInit(){this.pathId="url(#"+ut()+")"}static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275cmp=z({type:t,selectors:[["","data-p-icon","sort-amount-up-alt"]],features:[Q],attrs:g3,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,o){n&1&&(X(),Z(0,"g"),oe(1,"path",0),ie(),Z(2,"defs")(3,"clipPath",1),oe(4,"rect",2),ie()()),n&2&&(O("clip-path",o.pathId),l(3),Qe("id",o.pathId))},encapsulation:2})}return t})();var v3=["data-p-icon","trash"],Jv=(()=>{class t extends De{pathId;onInit(){this.pathId="url(#"+ut()+")"}static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275cmp=z({type:t,selectors:[["","data-p-icon","trash"]],features:[Q],attrs:v3,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,o){n&1&&(X(),Z(0,"g"),oe(1,"path",0),ie(),Z(2,"defs")(3,"clipPath",1),oe(4,"rect",2),ie()()),n&2&&(O("clip-path",o.pathId),l(3),Qe("id",o.pathId))},encapsulation:2})}return t})();var eb=`
609
+ .p-datepicker {
610
+ display: inline-flex;
611
+ max-width: 100%;
612
+ }
613
+
614
+ .p-datepicker:has(.p-datepicker-dropdown) .p-datepicker-input {
615
+ border-start-end-radius: 0;
616
+ border-end-end-radius: 0;
617
+ }
618
+
619
+ .p-datepicker-input {
620
+ flex: 1 1 auto;
621
+ width: 1%;
622
+ }
623
+
624
+ .p-datepicker-dropdown {
625
+ cursor: pointer;
626
+ display: inline-flex;
627
+ user-select: none;
628
+ align-items: center;
629
+ justify-content: center;
630
+ overflow: hidden;
631
+ position: relative;
632
+ width: dt('datepicker.dropdown.width');
633
+ border-start-end-radius: dt('datepicker.dropdown.border.radius');
634
+ border-end-end-radius: dt('datepicker.dropdown.border.radius');
635
+ background: dt('datepicker.dropdown.background');
636
+ border: 1px solid dt('datepicker.dropdown.border.color');
637
+ border-inline-start: 0 none;
638
+ color: dt('datepicker.dropdown.color');
639
+ transition:
640
+ background dt('datepicker.transition.duration'),
641
+ color dt('datepicker.transition.duration'),
642
+ border-color dt('datepicker.transition.duration'),
643
+ outline-color dt('datepicker.transition.duration');
644
+ outline-color: transparent;
645
+ }
646
+
647
+ .p-datepicker-dropdown:not(:disabled):hover {
648
+ background: dt('datepicker.dropdown.hover.background');
649
+ border-color: dt('datepicker.dropdown.hover.border.color');
650
+ color: dt('datepicker.dropdown.hover.color');
651
+ }
652
+
653
+ .p-datepicker-dropdown:not(:disabled):active {
654
+ background: dt('datepicker.dropdown.active.background');
655
+ border-color: dt('datepicker.dropdown.active.border.color');
656
+ color: dt('datepicker.dropdown.active.color');
657
+ }
658
+
659
+ .p-datepicker-dropdown:focus-visible {
660
+ box-shadow: dt('datepicker.dropdown.focus.ring.shadow');
661
+ outline: dt('datepicker.dropdown.focus.ring.width') dt('datepicker.dropdown.focus.ring.style') dt('datepicker.dropdown.focus.ring.color');
662
+ outline-offset: dt('datepicker.dropdown.focus.ring.offset');
663
+ }
664
+
665
+ .p-datepicker:has(.p-datepicker-input-icon-container) {
666
+ position: relative;
667
+ }
668
+
669
+ .p-datepicker:has(.p-datepicker-input-icon-container) .p-datepicker-input {
670
+ padding-inline-end: calc((dt('form.field.padding.x') * 2) + dt('icon.size'));
671
+ }
672
+
673
+ .p-datepicker-input-icon-container {
674
+ cursor: pointer;
675
+ position: absolute;
676
+ top: 50%;
677
+ inset-inline-end: dt('form.field.padding.x');
678
+ margin-block-start: calc(-1 * (dt('icon.size') / 2));
679
+ color: dt('datepicker.input.icon.color');
680
+ line-height: 1;
681
+ z-index: 1;
682
+ }
683
+
684
+ .p-datepicker:has(.p-datepicker-input:disabled) .p-datepicker-input-icon-container {
685
+ cursor: default;
686
+ }
687
+
688
+ .p-datepicker-fluid {
689
+ display: flex;
690
+ }
691
+
692
+ .p-datepicker .p-datepicker-panel {
693
+ min-width: 100%;
694
+ }
695
+
696
+ .p-datepicker-panel {
697
+ width: auto;
698
+ padding: dt('datepicker.panel.padding');
699
+ background: dt('datepicker.panel.background');
700
+ color: dt('datepicker.panel.color');
701
+ border: 1px solid dt('datepicker.panel.border.color');
702
+ border-radius: dt('datepicker.panel.border.radius');
703
+ box-shadow: dt('datepicker.panel.shadow');
704
+ }
705
+
706
+ .p-datepicker-panel-inline {
707
+ display: inline-block;
708
+ overflow-x: auto;
709
+ box-shadow: none;
710
+ }
711
+
712
+ .p-datepicker-header {
713
+ display: flex;
714
+ align-items: center;
715
+ justify-content: space-between;
716
+ padding: dt('datepicker.header.padding');
717
+ background: dt('datepicker.header.background');
718
+ color: dt('datepicker.header.color');
719
+ border-block-end: 1px solid dt('datepicker.header.border.color');
720
+ }
721
+
722
+ .p-datepicker-next-button:dir(rtl) {
723
+ order: -1;
724
+ }
725
+
726
+ .p-datepicker-prev-button:dir(rtl) {
727
+ order: 1;
728
+ }
729
+
730
+ .p-datepicker-title {
731
+ display: flex;
732
+ align-items: center;
733
+ justify-content: space-between;
734
+ gap: dt('datepicker.title.gap');
735
+ font-weight: dt('datepicker.title.font.weight');
736
+ }
737
+
738
+ .p-datepicker-select-year,
739
+ .p-datepicker-select-month {
740
+ border: none;
741
+ background: transparent;
742
+ margin: 0;
743
+ cursor: pointer;
744
+ font-weight: inherit;
745
+ transition:
746
+ background dt('datepicker.transition.duration'),
747
+ color dt('datepicker.transition.duration'),
748
+ border-color dt('datepicker.transition.duration'),
749
+ outline-color dt('datepicker.transition.duration'),
750
+ box-shadow dt('datepicker.transition.duration');
751
+ }
752
+
753
+ .p-datepicker-select-month {
754
+ padding: dt('datepicker.select.month.padding');
755
+ color: dt('datepicker.select.month.color');
756
+ border-radius: dt('datepicker.select.month.border.radius');
757
+ }
758
+
759
+ .p-datepicker-select-year {
760
+ padding: dt('datepicker.select.year.padding');
761
+ color: dt('datepicker.select.year.color');
762
+ border-radius: dt('datepicker.select.year.border.radius');
763
+ }
764
+
765
+ .p-datepicker-select-month:enabled:hover {
766
+ background: dt('datepicker.select.month.hover.background');
767
+ color: dt('datepicker.select.month.hover.color');
768
+ }
769
+
770
+ .p-datepicker-select-year:enabled:hover {
771
+ background: dt('datepicker.select.year.hover.background');
772
+ color: dt('datepicker.select.year.hover.color');
773
+ }
774
+
775
+ .p-datepicker-select-month:focus-visible,
776
+ .p-datepicker-select-year:focus-visible {
777
+ box-shadow: dt('datepicker.date.focus.ring.shadow');
778
+ outline: dt('datepicker.date.focus.ring.width') dt('datepicker.date.focus.ring.style') dt('datepicker.date.focus.ring.color');
779
+ outline-offset: dt('datepicker.date.focus.ring.offset');
780
+ }
781
+
782
+ .p-datepicker-calendar-container {
783
+ display: flex;
784
+ }
785
+
786
+ .p-datepicker-calendar-container .p-datepicker-calendar {
787
+ flex: 1 1 auto;
788
+ border-inline-start: 1px solid dt('datepicker.group.border.color');
789
+ padding-inline-end: dt('datepicker.group.gap');
790
+ padding-inline-start: dt('datepicker.group.gap');
791
+ }
792
+
793
+ .p-datepicker-calendar-container .p-datepicker-calendar:first-child {
794
+ padding-inline-start: 0;
795
+ border-inline-start: 0 none;
796
+ }
797
+
798
+ .p-datepicker-calendar-container .p-datepicker-calendar:last-child {
799
+ padding-inline-end: 0;
800
+ }
801
+
802
+ .p-datepicker-day-view {
803
+ width: 100%;
804
+ border-collapse: collapse;
805
+ font-size: 1rem;
806
+ margin: dt('datepicker.day.view.margin');
807
+ }
808
+
809
+ .p-datepicker-weekday-cell {
810
+ padding: dt('datepicker.week.day.padding');
811
+ }
812
+
813
+ .p-datepicker-weekday {
814
+ font-weight: dt('datepicker.week.day.font.weight');
815
+ color: dt('datepicker.week.day.color');
816
+ }
817
+
818
+ .p-datepicker-day-cell {
819
+ padding: dt('datepicker.date.padding');
820
+ }
821
+
822
+ .p-datepicker-day {
823
+ display: flex;
824
+ justify-content: center;
825
+ align-items: center;
826
+ cursor: pointer;
827
+ margin: 0 auto;
828
+ overflow: hidden;
829
+ position: relative;
830
+ width: dt('datepicker.date.width');
831
+ height: dt('datepicker.date.height');
832
+ border-radius: dt('datepicker.date.border.radius');
833
+ transition:
834
+ background dt('datepicker.transition.duration'),
835
+ color dt('datepicker.transition.duration'),
836
+ border-color dt('datepicker.transition.duration'),
837
+ box-shadow dt('datepicker.transition.duration'),
838
+ outline-color dt('datepicker.transition.duration');
839
+ border: 1px solid transparent;
840
+ outline-color: transparent;
841
+ color: dt('datepicker.date.color');
842
+ }
843
+
844
+ .p-datepicker-day:not(.p-datepicker-day-selected):not(.p-disabled):hover {
845
+ background: dt('datepicker.date.hover.background');
846
+ color: dt('datepicker.date.hover.color');
847
+ }
848
+
849
+ .p-datepicker-day:focus-visible {
850
+ box-shadow: dt('datepicker.date.focus.ring.shadow');
851
+ outline: dt('datepicker.date.focus.ring.width') dt('datepicker.date.focus.ring.style') dt('datepicker.date.focus.ring.color');
852
+ outline-offset: dt('datepicker.date.focus.ring.offset');
853
+ }
854
+
855
+ .p-datepicker-day-selected {
856
+ background: dt('datepicker.date.selected.background');
857
+ color: dt('datepicker.date.selected.color');
858
+ }
859
+
860
+ .p-datepicker-day-selected-range {
861
+ background: dt('datepicker.date.range.selected.background');
862
+ color: dt('datepicker.date.range.selected.color');
863
+ }
864
+
865
+ .p-datepicker-today > .p-datepicker-day {
866
+ background: dt('datepicker.today.background');
867
+ color: dt('datepicker.today.color');
868
+ }
869
+
870
+ .p-datepicker-today > .p-datepicker-day-selected {
871
+ background: dt('datepicker.date.selected.background');
872
+ color: dt('datepicker.date.selected.color');
873
+ }
874
+
875
+ .p-datepicker-today > .p-datepicker-day-selected-range {
876
+ background: dt('datepicker.date.range.selected.background');
877
+ color: dt('datepicker.date.range.selected.color');
878
+ }
879
+
880
+ .p-datepicker-weeknumber {
881
+ text-align: center;
882
+ }
883
+
884
+ .p-datepicker-month-view {
885
+ margin: dt('datepicker.month.view.margin');
886
+ }
887
+
888
+ .p-datepicker-month {
889
+ width: 33.3%;
890
+ display: inline-flex;
891
+ align-items: center;
892
+ justify-content: center;
893
+ cursor: pointer;
894
+ overflow: hidden;
895
+ position: relative;
896
+ padding: dt('datepicker.month.padding');
897
+ transition:
898
+ background dt('datepicker.transition.duration'),
899
+ color dt('datepicker.transition.duration'),
900
+ border-color dt('datepicker.transition.duration'),
901
+ box-shadow dt('datepicker.transition.duration'),
902
+ outline-color dt('datepicker.transition.duration');
903
+ border-radius: dt('datepicker.month.border.radius');
904
+ outline-color: transparent;
905
+ color: dt('datepicker.date.color');
906
+ }
907
+
908
+ .p-datepicker-month:not(.p-disabled):not(.p-datepicker-month-selected):hover {
909
+ color: dt('datepicker.date.hover.color');
910
+ background: dt('datepicker.date.hover.background');
911
+ }
912
+
913
+ .p-datepicker-month-selected {
914
+ color: dt('datepicker.date.selected.color');
915
+ background: dt('datepicker.date.selected.background');
916
+ }
917
+
918
+ .p-datepicker-month:not(.p-disabled):focus-visible {
919
+ box-shadow: dt('datepicker.date.focus.ring.shadow');
920
+ outline: dt('datepicker.date.focus.ring.width') dt('datepicker.date.focus.ring.style') dt('datepicker.date.focus.ring.color');
921
+ outline-offset: dt('datepicker.date.focus.ring.offset');
922
+ }
923
+
924
+ .p-datepicker-year-view {
925
+ margin: dt('datepicker.year.view.margin');
926
+ }
927
+
928
+ .p-datepicker-year {
929
+ width: 50%;
930
+ display: inline-flex;
931
+ align-items: center;
932
+ justify-content: center;
933
+ cursor: pointer;
934
+ overflow: hidden;
935
+ position: relative;
936
+ padding: dt('datepicker.year.padding');
937
+ transition:
938
+ background dt('datepicker.transition.duration'),
939
+ color dt('datepicker.transition.duration'),
940
+ border-color dt('datepicker.transition.duration'),
941
+ box-shadow dt('datepicker.transition.duration'),
942
+ outline-color dt('datepicker.transition.duration');
943
+ border-radius: dt('datepicker.year.border.radius');
944
+ outline-color: transparent;
945
+ color: dt('datepicker.date.color');
946
+ }
947
+
948
+ .p-datepicker-year:not(.p-disabled):not(.p-datepicker-year-selected):hover {
949
+ color: dt('datepicker.date.hover.color');
950
+ background: dt('datepicker.date.hover.background');
951
+ }
952
+
953
+ .p-datepicker-year-selected {
954
+ color: dt('datepicker.date.selected.color');
955
+ background: dt('datepicker.date.selected.background');
956
+ }
957
+
958
+ .p-datepicker-year:not(.p-disabled):focus-visible {
959
+ box-shadow: dt('datepicker.date.focus.ring.shadow');
960
+ outline: dt('datepicker.date.focus.ring.width') dt('datepicker.date.focus.ring.style') dt('datepicker.date.focus.ring.color');
961
+ outline-offset: dt('datepicker.date.focus.ring.offset');
962
+ }
963
+
964
+ .p-datepicker-buttonbar {
965
+ display: flex;
966
+ justify-content: space-between;
967
+ align-items: center;
968
+ padding: dt('datepicker.buttonbar.padding');
969
+ border-block-start: 1px solid dt('datepicker.buttonbar.border.color');
970
+ }
971
+
972
+ .p-datepicker-buttonbar .p-button {
973
+ width: auto;
974
+ }
975
+
976
+ .p-datepicker-time-picker {
977
+ display: flex;
978
+ justify-content: center;
979
+ align-items: center;
980
+ border-block-start: 1px solid dt('datepicker.time.picker.border.color');
981
+ padding: 0;
982
+ gap: dt('datepicker.time.picker.gap');
983
+ }
984
+
985
+ .p-datepicker-calendar-container + .p-datepicker-time-picker {
986
+ padding: dt('datepicker.time.picker.padding');
987
+ }
988
+
989
+ .p-datepicker-time-picker > div {
990
+ display: flex;
991
+ align-items: center;
992
+ flex-direction: column;
993
+ gap: dt('datepicker.time.picker.button.gap');
994
+ }
995
+
996
+ .p-datepicker-time-picker span {
997
+ font-size: 1rem;
998
+ }
999
+
1000
+ .p-datepicker-timeonly .p-datepicker-time-picker {
1001
+ border-block-start: 0 none;
1002
+ }
1003
+
1004
+ .p-datepicker-time-picker:dir(rtl) {
1005
+ flex-direction: row-reverse;
1006
+ }
1007
+
1008
+ .p-datepicker:has(.p-inputtext-sm) .p-datepicker-dropdown {
1009
+ width: dt('datepicker.dropdown.sm.width');
1010
+ }
1011
+
1012
+ .p-datepicker:has(.p-inputtext-sm) .p-datepicker-dropdown .p-icon,
1013
+ .p-datepicker:has(.p-inputtext-sm) .p-datepicker-input-icon {
1014
+ font-size: dt('form.field.sm.font.size');
1015
+ width: dt('form.field.sm.font.size');
1016
+ height: dt('form.field.sm.font.size');
1017
+ }
1018
+
1019
+ .p-datepicker:has(.p-inputtext-lg) .p-datepicker-dropdown {
1020
+ width: dt('datepicker.dropdown.lg.width');
1021
+ }
1022
+
1023
+ .p-datepicker:has(.p-inputtext-lg) .p-datepicker-dropdown .p-icon,
1024
+ .p-datepicker:has(.p-inputtext-lg) .p-datepicker-input-icon {
1025
+ font-size: dt('form.field.lg.font.size');
1026
+ width: dt('form.field.lg.font.size');
1027
+ height: dt('form.field.lg.font.size');
1028
+ }
1029
+
1030
+ .p-datepicker-clear-icon {
1031
+ position: absolute;
1032
+ top: 50%;
1033
+ margin-top: -0.5rem;
1034
+ cursor: pointer;
1035
+ color: dt('form.field.icon.color');
1036
+ inset-inline-end: dt('form.field.padding.x');
1037
+ }
1038
+
1039
+ .p-datepicker:has(.p-datepicker-dropdown) .p-datepicker-clear-icon {
1040
+ inset-inline-end: calc(dt('datepicker.dropdown.width') + dt('form.field.padding.x'));
1041
+ }
1042
+
1043
+ .p-datepicker:has(.p-datepicker-input-icon-container) .p-datepicker-clear-icon {
1044
+ inset-inline-end: calc((dt('form.field.padding.x') * 2) + dt('icon.size'));
1045
+ }
1046
+
1047
+ .p-datepicker:has(.p-datepicker-clear-icon) .p-datepicker-input {
1048
+ padding-inline-end: calc((dt('form.field.padding.x') * 2) + dt('icon.size'));
1049
+ }
1050
+
1051
+ .p-datepicker:has(.p-datepicker-input-icon-container):has(.p-datepicker-clear-icon) .p-datepicker-input {
1052
+ padding-inline-end: calc((dt('form.field.padding.x') * 3) + calc(dt('icon.size') * 2));
1053
+ }
1054
+
1055
+ .p-inputgroup .p-datepicker-dropdown {
1056
+ border-radius: 0;
1057
+ }
1058
+
1059
+ .p-inputgroup > .p-datepicker:last-child:has(.p-datepicker-dropdown) > .p-datepicker-input {
1060
+ border-start-end-radius: 0;
1061
+ border-end-end-radius: 0;
1062
+ }
1063
+
1064
+ .p-inputgroup > .p-datepicker:last-child .p-datepicker-dropdown {
1065
+ border-start-end-radius: dt('datepicker.dropdown.border.radius');
1066
+ border-end-end-radius: dt('datepicker.dropdown.border.radius');
1067
+ }
1068
+ `;var y3=["date"],C3=["header"],x3=["footer"],w3=["disabledDate"],T3=["decade"],S3=["previousicon"],k3=["nexticon"],I3=["triggericon"],M3=["clearicon"],E3=["decrementicon"],D3=["incrementicon"],P3=["inputicon"],R3=["buttonbar"],O3=["inputfield"],F3=["contentWrapper"],N3=[[["p-header"]],[["p-footer"]]],A3=["p-header","p-footer"],L3=t=>({clickCallBack:t}),tb=t=>({visibility:t}),zf=t=>({$implicit:t}),B3=t=>({date:t}),V3=(t,i)=>({month:t,index:i}),z3=t=>({year:t}),H3=(t,i)=>({todayCallback:t,clearCallback:i});function q3(t,i){if(t&1){let e=$();X(),h(0,"svg",13),N("click",function(){w(e);let o=d(3);return T(o.clear())}),m()}if(t&2){let e=d(3);G(e.cx("clearIcon")),_("pBind",e.ptm("inputIcon"))}}function G3(t,i){}function j3(t,i){t&1&&P(0,G3,0,0,"ng-template")}function U3(t,i){if(t&1){let e=$();h(0,"span",14),N("click",function(){w(e);let o=d(3);return T(o.clear())}),P(1,j3,1,0,null,6),m()}if(t&2){let e=d(3);G(e.cx("clearIcon")),_("pBind",e.ptm("inputIcon")),l(),_("ngTemplateOutlet",e.clearIconTemplate||e._clearIconTemplate)}}function $3(t,i){if(t&1&&(Te(0),P(1,q3,1,3,"svg",11)(2,U3,2,4,"span",12),Se()),t&2){let e=d(2);l(),_("ngIf",!e.clearIconTemplate&&!e._clearIconTemplate),l(),_("ngIf",e.clearIconTemplate||e._clearIconTemplate)}}function W3(t,i){if(t&1&&F(0,"span",17),t&2){let e=d(3);_("ngClass",e.icon)("pBind",e.ptm("dropdownIcon"))}}function K3(t,i){if(t&1&&(X(),F(0,"svg",19)),t&2){let e=d(4);_("pBind",e.ptm("dropdownIcon"))}}function Y3(t,i){}function X3(t,i){t&1&&P(0,Y3,0,0,"ng-template")}function Z3(t,i){if(t&1&&(Te(0),P(1,K3,1,1,"svg",18)(2,X3,1,0,null,6),Se()),t&2){let e=d(3);l(),_("ngIf",!e.triggerIconTemplate&&!e._triggerIconTemplate),l(),_("ngTemplateOutlet",e.triggerIconTemplate||e._triggerIconTemplate)}}function Q3(t,i){if(t&1){let e=$();h(0,"button",15),N("click",function(o){w(e),d();let r=gt(1),a=d();return T(a.onButtonClick(o,r))}),P(1,W3,1,2,"span",16)(2,Z3,3,2,"ng-container",7),m()}if(t&2){let e=d(2);G(e.cx("dropdown")),_("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(),_("ngIf",e.icon),l(),_("ngIf",!e.icon)}}function J3(t,i){if(t&1){let e=$();X(),h(0,"svg",23),N("click",function(o){w(e);let r=d(3);return T(r.onButtonClick(o))}),m()}if(t&2){let e=d(3);G(e.cx("inputIcon")),_("pBind",e.ptm("inputIcon"))}}function eR(t,i){t&1&&le(0)}function tR(t,i){if(t&1&&(Te(0),h(1,"span",20),P(2,J3,1,3,"svg",21)(3,eR,1,0,"ng-container",22),m(),Se()),t&2){let e=d(2);l(),G(e.cx("inputIconContainer")),_("pBind",e.ptm("inputIconContainer")),O("data-p",e.inputIconDataP),l(),_("ngIf",!e.inputIconTemplate&&!e._inputIconTemplate),l(),_("ngTemplateOutlet",e.inputIconTemplate||e._inputIconTemplate)("ngTemplateOutletContext",Pe(7,L3,e.onButtonClick.bind(e)))}}function nR(t,i){if(t&1){let e=$();h(0,"input",9,1),N("focus",function(o){w(e);let r=d();return T(r.onInputFocus(o))})("keydown",function(o){w(e);let r=d();return T(r.onInputKeydown(o))})("click",function(){w(e);let o=d();return T(o.onInputClick())})("blur",function(o){w(e);let r=d();return T(r.onInputBlur(o))})("input",function(o){w(e);let r=d();return T(r.onUserInput(o))}),m(),P(2,$3,3,2,"ng-container",7)(3,Q3,3,9,"button",10)(4,tR,4,9,"ng-container",7)}if(t&2){let e=d();G(e.cn(e.cx("pcInputText"),e.inputStyleClass)),_("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),_("ngIf",e.showClear&&!e.$disabled()&&(e.inputfieldViewChild==null||e.inputfieldViewChild.nativeElement==null?null:e.inputfieldViewChild.nativeElement.value)),l(),_("ngIf",e.showIcon&&e.iconDisplay==="button"),l(),_("ngIf",e.iconDisplay==="input"&&e.showIcon)}}function iR(t,i){t&1&&le(0)}function oR(t,i){t&1&&(X(),F(0,"svg",30))}function rR(t,i){}function aR(t,i){t&1&&P(0,rR,0,0,"ng-template")}function sR(t,i){if(t&1&&(h(0,"span"),P(1,aR,1,0,null,6),m()),t&2){let e=d(4);l(),_("ngTemplateOutlet",e.previousIconTemplate||e._previousIconTemplate)}}function lR(t,i){if(t&1&&P(0,oR,1,0,"svg",29)(1,sR,2,1,"span",7),t&2){let e=d(3);_("ngIf",!e.previousIconTemplate&&!e._previousIconTemplate),l(),_("ngIf",e.previousIconTemplate||e._previousIconTemplate)}}function cR(t,i){if(t&1){let e=$();h(0,"button",31),N("click",function(o){w(e);let r=d(3);return T(r.switchToMonthView(o))})("keydown",function(o){w(e);let r=d(3);return T(r.onContainerButtonKeydown(o))}),v(1),m()}if(t&2){let e=d().$implicit,n=d(2);G(n.cx("selectMonth")),_("pBind",n.ptm("selectMonth")),O("disabled",n.switchViewButtonDisabled()?"":void 0)("aria-label",n.getTranslation("chooseMonth"))("data-pc-group-section","navigator"),l(),be(" ",n.getMonthName(e.month)," ")}}function dR(t,i){if(t&1){let e=$();h(0,"button",31),N("click",function(o){w(e);let r=d(3);return T(r.switchToYearView(o))})("keydown",function(o){w(e);let r=d(3);return T(r.onContainerButtonKeydown(o))}),v(1),m()}if(t&2){let e=d().$implicit,n=d(2);G(n.cx("selectYear")),_("pBind",n.ptm("selectYear")),O("disabled",n.switchViewButtonDisabled()?"":void 0)("aria-label",n.getTranslation("chooseYear"))("data-pc-group-section","navigator"),l(),be(" ",n.getYear(e)," ")}}function uR(t,i){if(t&1&&(Te(0),v(1),Se()),t&2){let e=d(4);l(),I0("",e.yearPickerValues()[0]," - ",e.yearPickerValues()[e.yearPickerValues().length-1])}}function pR(t,i){t&1&&le(0)}function hR(t,i){if(t&1&&(h(0,"span",20),P(1,uR,2,2,"ng-container",7)(2,pR,1,0,"ng-container",22),m()),t&2){let e=d(3);G(e.cx("decade")),_("pBind",e.ptm("decade")),l(),_("ngIf",!e.decadeTemplate&&!e._decadeTemplate),l(),_("ngTemplateOutlet",e.decadeTemplate||e._decadeTemplate)("ngTemplateOutletContext",Pe(6,zf,e.yearPickerValues))}}function fR(t,i){t&1&&(X(),F(0,"svg",33))}function mR(t,i){}function _R(t,i){t&1&&P(0,mR,0,0,"ng-template")}function gR(t,i){if(t&1&&(Te(0),P(1,_R,1,0,null,6),Se()),t&2){let e=d(4);l(),_("ngTemplateOutlet",e.nextIconTemplate||e._nextIconTemplate)}}function vR(t,i){if(t&1&&P(0,fR,1,0,"svg",32)(1,gR,2,1,"ng-container",7),t&2){let e=d(3);_("ngIf",!e.nextIconTemplate&&!e._nextIconTemplate),l(),_("ngIf",e.nextIconTemplate||e._nextIconTemplate)}}function bR(t,i){if(t&1&&(h(0,"th",20)(1,"span",20),v(2),m()()),t&2){let e=d(4);G(e.cx("weekHeader")),_("pBind",e.ptm("weekHeader")),l(),_("pBind",e.ptm("weekHeaderLabel")),l(),C(e.getTranslation("weekHeader"))}}function yR(t,i){if(t&1&&(h(0,"th",37)(1,"span",20),v(2),m()()),t&2){let e=i.$implicit,n=d(4);G(n.cx("weekDayCell")),_("pBind",n.ptm("weekDayCell")),l(),G(n.cx("weekDay")),_("pBind",n.ptm("weekDay")),l(),C(e)}}function CR(t,i){if(t&1&&(h(0,"td",20)(1,"span",20),v(2),m()()),t&2){let e=d().index,n=d(2).$implicit,o=d(2);G(o.cx("weekNumber")),_("pBind",o.ptm("weekNumber")),l(),G(o.cx("weekLabelContainer")),_("pBind",o.ptm("weekLabelContainer")),l(),be(" ",n.weekNumbers[e]," ")}}function xR(t,i){if(t&1&&(Te(0),v(1),Se()),t&2){let e=d(2).$implicit;l(),C(e.day)}}function wR(t,i){t&1&&le(0)}function TR(t,i){if(t&1&&(Te(0),P(1,wR,1,0,"ng-container",22),Se()),t&2){let e=d(2).$implicit,n=d(5);l(),_("ngTemplateOutlet",n.dateTemplate||n._dateTemplate)("ngTemplateOutletContext",Pe(2,zf,e))}}function SR(t,i){t&1&&le(0)}function kR(t,i){if(t&1&&(Te(0),P(1,SR,1,0,"ng-container",22),Se()),t&2){let e=d(2).$implicit,n=d(5);l(),_("ngTemplateOutlet",n.disabledDateTemplate||n._disabledDateTemplate)("ngTemplateOutletContext",Pe(2,zf,e))}}function IR(t,i){if(t&1&&(h(0,"div",40),v(1),m()),t&2){let e=d(2).$implicit;l(),be(" ",e.day," ")}}function MR(t,i){if(t&1){let e=$();Te(0),h(1,"span",38),N("click",function(o){w(e);let r=d().$implicit,a=d(5);return T(a.onDateSelect(o,r))})("keydown",function(o){w(e);let r=d().$implicit,a=d(3).index,s=d(2);return T(s.onDateCellKeydown(o,r,a))}),P(2,xR,2,1,"ng-container",7)(3,TR,2,4,"ng-container",7)(4,kR,2,4,"ng-container",7),m(),P(5,IR,2,1,"div",39),Se()}if(t&2){let e=d().$implicit,n=d(5);l(),_("ngClass",n.dayClass(e))("pBind",n.ptm("day")),O("data-date",n.formatDateKey(n.formatDateMetaToDate(e))),l(),_("ngIf",!n.dateTemplate&&!n._dateTemplate&&(e.selectable||!n.disabledDateTemplate&&!n._disabledDateTemplate)),l(),_("ngIf",e.selectable||!n.disabledDateTemplate&&!n._disabledDateTemplate),l(),_("ngIf",!e.selectable),l(),_("ngIf",n.isSelected(e))}}function ER(t,i){if(t&1&&(h(0,"td",20),P(1,MR,6,7,"ng-container",7),m()),t&2){let e=i.$implicit,n=d(5);G(n.cx("dayCell",Pe(5,B3,e))),_("pBind",n.ptm("dayCell")),O("aria-label",e.day),l(),_("ngIf",e.otherMonth?n.showOtherMonths:!0)}}function DR(t,i){if(t&1&&(h(0,"tr",20),P(1,CR,3,7,"td",8)(2,ER,2,7,"td",24),m()),t&2){let e=i.$implicit,n=d(4);_("pBind",n.ptm("tableBodyRow")),l(),_("ngIf",n.showWeek),l(),_("ngForOf",e)}}function PR(t,i){if(t&1&&(h(0,"table",34)(1,"thead",20)(2,"tr",20),P(3,bR,3,5,"th",8)(4,yR,3,7,"th",35),m()(),h(5,"tbody",20),P(6,DR,3,3,"tr",36),m()()),t&2){let e=d().$implicit,n=d(2);G(n.cx("dayView")),_("pBind",n.ptm("table")),l(),_("pBind",n.ptm("tableHeader")),l(),_("pBind",n.ptm("tableHeaderRow")),l(),_("ngIf",n.showWeek),l(),_("ngForOf",n.weekDays),l(),_("pBind",n.ptm("tableBody")),l(),_("ngForOf",e.dates)}}function RR(t,i){if(t&1){let e=$();h(0,"div",20)(1,"div",20)(2,"p-button",25),N("keydown",function(o){w(e);let r=d(2);return T(r.onContainerButtonKeydown(o))})("onClick",function(o){w(e);let r=d(2);return T(r.onPrevButtonClick(o))}),P(3,lR,2,2,"ng-template",null,2,$e),m(),h(5,"div",20),P(6,cR,2,7,"button",26)(7,dR,2,7,"button",26)(8,hR,3,8,"span",8),m(),h(9,"p-button",27),N("keydown",function(o){w(e);let r=d(2);return T(r.onContainerButtonKeydown(o))})("onClick",function(o){w(e);let r=d(2);return T(r.onNextButtonClick(o))}),P(10,vR,2,2,"ng-template",null,2,$e),m()(),P(12,PR,7,9,"table",28),m()}if(t&2){let e=i.index,n=d(2);G(n.cx("calendar")),_("pBind",n.ptm("calendar")),l(),G(n.cx("header")),_("pBind",n.ptm("header")),l(),_("styleClass",n.cx("pcPrevButton"))("ngStyle",Pe(23,tb,e===0?"visible":"hidden"))("ariaLabel",n.prevIconAriaLabel)("pt",n.ptm("pcPrevButton")),O("data-pc-group-section","navigator"),l(3),G(n.cx("title")),_("pBind",n.ptm("title")),l(),_("ngIf",n.currentView==="date"),l(),_("ngIf",n.currentView!=="year"),l(),_("ngIf",n.currentView==="year"),l(),_("styleClass",n.cx("pcNextButton"))("ngStyle",Pe(25,tb,e===n.months.length-1?"visible":"hidden"))("ariaLabel",n.nextIconAriaLabel)("pt",n.ptm("pcNextButton")),O("data-pc-group-section","navigator"),l(3),_("ngIf",n.currentView==="date")}}function OR(t,i){if(t&1&&(h(0,"div",40),v(1),m()),t&2){let e=d().$implicit;l(),be(" ",e," ")}}function FR(t,i){if(t&1){let e=$();h(0,"span",42),N("click",function(o){let r=w(e).index,a=d(3);return T(a.onMonthSelect(o,r))})("keydown",function(o){let r=w(e).index,a=d(3);return T(a.onMonthCellKeydown(o,r))}),v(1),P(2,OR,2,1,"div",39),m()}if(t&2){let e=i.$implicit,n=i.index,o=d(3);G(o.cx("month",qn(5,V3,e,n))),_("pBind",o.ptm("month")),l(),be(" ",e," "),l(),_("ngIf",o.isMonthSelected(n))}}function NR(t,i){if(t&1&&(h(0,"div",20),P(1,FR,3,8,"span",41),m()),t&2){let e=d(2);G(e.cx("monthView")),_("pBind",e.ptm("monthView")),l(),_("ngForOf",e.monthPickerValues())}}function AR(t,i){if(t&1&&(h(0,"div",40),v(1),m()),t&2){let e=d().$implicit;l(),be(" ",e," ")}}function LR(t,i){if(t&1){let e=$();h(0,"span",42),N("click",function(o){let r=w(e).$implicit,a=d(3);return T(a.onYearSelect(o,r))})("keydown",function(o){let r=w(e).$implicit,a=d(3);return T(a.onYearCellKeydown(o,r))}),v(1),P(2,AR,2,1,"div",39),m()}if(t&2){let e=i.$implicit,n=d(3);G(n.cx("year",Pe(5,z3,e))),_("pBind",n.ptm("year")),l(),be(" ",e," "),l(),_("ngIf",n.isYearSelected(e))}}function BR(t,i){if(t&1&&(h(0,"div",20),P(1,LR,3,7,"span",41),m()),t&2){let e=d(2);G(e.cx("yearView")),_("pBind",e.ptm("yearView")),l(),_("ngForOf",e.yearPickerValues())}}function VR(t,i){if(t&1&&(Te(0),h(1,"div",20),P(2,RR,13,27,"div",24),m(),P(3,NR,2,4,"div",8)(4,BR,2,4,"div",8),Se()),t&2){let e=d();l(),G(e.cx("calendarContainer")),_("pBind",e.ptm("calendarContainer")),l(),_("ngForOf",e.months),l(),_("ngIf",e.currentView==="month"),l(),_("ngIf",e.currentView==="year")}}function zR(t,i){if(t&1&&(X(),F(0,"svg",46)),t&2){let e=d(3);_("pBind",e.ptm("pcIncrementButton").icon)}}function HR(t,i){}function qR(t,i){t&1&&P(0,HR,0,0,"ng-template")}function GR(t,i){if(t&1&&P(0,zR,1,1,"svg",45)(1,qR,1,0,null,6),t&2){let e=d(2);_("ngIf",!e.incrementIconTemplate&&!e._incrementIconTemplate),l(),_("ngTemplateOutlet",e.incrementIconTemplate||e._incrementIconTemplate)}}function jR(t,i){t&1&&(Te(0),v(1,"0"),Se())}function UR(t,i){if(t&1&&(X(),F(0,"svg",48)),t&2){let e=d(3);_("pBind",e.ptm("pcDecrementButton").icon)}}function $R(t,i){}function WR(t,i){t&1&&P(0,$R,0,0,"ng-template")}function KR(t,i){if(t&1&&P(0,UR,1,1,"svg",47)(1,WR,1,0,null,6),t&2){let e=d(2);_("ngIf",!e.decrementIconTemplate&&!e._decrementIconTemplate),l(),_("ngTemplateOutlet",e.decrementIconTemplate||e._decrementIconTemplate)}}function YR(t,i){if(t&1&&(X(),F(0,"svg",46)),t&2){let e=d(3);_("pBind",e.ptm("pcIncrementButton").icon)}}function XR(t,i){}function ZR(t,i){t&1&&P(0,XR,0,0,"ng-template")}function QR(t,i){if(t&1&&P(0,YR,1,1,"svg",45)(1,ZR,1,0,null,6),t&2){let e=d(2);_("ngIf",!e.incrementIconTemplate&&!e._incrementIconTemplate),l(),_("ngTemplateOutlet",e.incrementIconTemplate||e._incrementIconTemplate)}}function JR(t,i){t&1&&(Te(0),v(1,"0"),Se())}function eO(t,i){if(t&1&&(X(),F(0,"svg",48)),t&2){let e=d(3);_("pBind",e.ptm("pcDecrementButton").icon)}}function tO(t,i){}function nO(t,i){t&1&&P(0,tO,0,0,"ng-template")}function iO(t,i){if(t&1&&P(0,eO,1,1,"svg",47)(1,nO,1,0,null,6),t&2){let e=d(2);_("ngIf",!e.decrementIconTemplate&&!e._decrementIconTemplate),l(),_("ngTemplateOutlet",e.decrementIconTemplate||e._decrementIconTemplate)}}function oO(t,i){if(t&1&&(h(0,"div",20)(1,"span",20),v(2),m()()),t&2){let e=d(2);G(e.cx("separator")),_("pBind",e.ptm("separatorContainer")),l(),_("pBind",e.ptm("separator")),l(),C(e.timeSeparator)}}function rO(t,i){if(t&1&&(X(),F(0,"svg",46)),t&2){let e=d(4);_("pBind",e.ptm("pcIncrementButton").icon)}}function aO(t,i){}function sO(t,i){t&1&&P(0,aO,0,0,"ng-template")}function lO(t,i){if(t&1&&P(0,rO,1,1,"svg",45)(1,sO,1,0,null,6),t&2){let e=d(3);_("ngIf",!e.incrementIconTemplate&&!e._incrementIconTemplate),l(),_("ngTemplateOutlet",e.incrementIconTemplate||e._incrementIconTemplate)}}function cO(t,i){t&1&&(Te(0),v(1,"0"),Se())}function dO(t,i){if(t&1&&(X(),F(0,"svg",48)),t&2){let e=d(4);_("pBind",e.ptm("pcDecrementButton").icon)}}function uO(t,i){}function pO(t,i){t&1&&P(0,uO,0,0,"ng-template")}function hO(t,i){if(t&1&&P(0,dO,1,1,"svg",47)(1,pO,1,0,null,6),t&2){let e=d(3);_("ngIf",!e.decrementIconTemplate&&!e._decrementIconTemplate),l(),_("ngTemplateOutlet",e.decrementIconTemplate||e._decrementIconTemplate)}}function fO(t,i){if(t&1){let e=$();h(0,"div",20)(1,"p-button",43),N("keydown",function(o){w(e);let r=d(2);return T(r.onContainerButtonKeydown(o))})("keydown.enter",function(o){w(e);let r=d(2);return T(r.incrementSecond(o))})("keydown.space",function(o){w(e);let r=d(2);return T(r.incrementSecond(o))})("mousedown",function(o){w(e);let r=d(2);return T(r.onTimePickerElementMouseDown(o,2,1))})("mouseup",function(o){w(e);let r=d(2);return T(r.onTimePickerElementMouseUp(o))})("keyup.enter",function(o){w(e);let r=d(2);return T(r.onTimePickerElementMouseUp(o))})("keyup.space",function(o){w(e);let r=d(2);return T(r.onTimePickerElementMouseUp(o))})("mouseleave",function(){w(e);let o=d(2);return T(o.onTimePickerElementMouseLeave())}),P(2,lO,2,2,"ng-template",null,2,$e),m(),h(4,"span",20),P(5,cO,2,0,"ng-container",7),v(6),m(),h(7,"p-button",43),N("keydown",function(o){w(e);let r=d(2);return T(r.onContainerButtonKeydown(o))})("keydown.enter",function(o){w(e);let r=d(2);return T(r.decrementSecond(o))})("keydown.space",function(o){w(e);let r=d(2);return T(r.decrementSecond(o))})("mousedown",function(o){w(e);let r=d(2);return T(r.onTimePickerElementMouseDown(o,2,-1))})("mouseup",function(o){w(e);let r=d(2);return T(r.onTimePickerElementMouseUp(o))})("keyup.enter",function(o){w(e);let r=d(2);return T(r.onTimePickerElementMouseUp(o))})("keyup.space",function(o){w(e);let r=d(2);return T(r.onTimePickerElementMouseUp(o))})("mouseleave",function(){w(e);let o=d(2);return T(o.onTimePickerElementMouseLeave())}),P(8,hO,2,2,"ng-template",null,2,$e),m()()}if(t&2){let e=d(2);G(e.cx("secondPicker")),_("pBind",e.ptm("secondPicker")),l(),_("styleClass",e.cx("pcIncrementButton"))("pt",e.ptm("pcIncrementButton")),O("aria-label",e.getTranslation("nextSecond"))("data-pc-group-section","timepickerbutton"),l(3),_("pBind",e.ptm("second")),l(),_("ngIf",e.currentSecond<10),l(),C(e.currentSecond),l(),_("styleClass",e.cx("pcDecrementButton"))("pt",e.ptm("pcDecrementButton")),O("aria-label",e.getTranslation("prevSecond"))("data-pc-group-section","timepickerbutton")}}function mO(t,i){if(t&1&&(h(0,"div",20)(1,"span",20),v(2),m()()),t&2){let e=d(2);G(e.cx("separator")),_("pBind",e.ptm("separatorContainer")),l(),_("pBind",e.ptm("separator")),l(),C(e.timeSeparator)}}function _O(t,i){if(t&1&&(X(),F(0,"svg",46)),t&2){let e=d(4);_("pBind",e.ptm("pcIncrementButton").icon)}}function gO(t,i){}function vO(t,i){t&1&&P(0,gO,0,0,"ng-template")}function bO(t,i){if(t&1&&P(0,_O,1,1,"svg",45)(1,vO,1,0,null,6),t&2){let e=d(3);_("ngIf",!e.incrementIconTemplate&&!e._incrementIconTemplate),l(),_("ngTemplateOutlet",e.incrementIconTemplate||e._incrementIconTemplate)}}function yO(t,i){if(t&1&&(X(),F(0,"svg",48)),t&2){let e=d(4);_("pBind",e.ptm("pcDecrementButton").icon)}}function CO(t,i){}function xO(t,i){t&1&&P(0,CO,0,0,"ng-template")}function wO(t,i){if(t&1&&P(0,yO,1,1,"svg",47)(1,xO,1,0,null,6),t&2){let e=d(3);_("ngIf",!e.decrementIconTemplate&&!e._decrementIconTemplate),l(),_("ngTemplateOutlet",e.decrementIconTemplate||e._decrementIconTemplate)}}function TO(t,i){if(t&1){let e=$();h(0,"div",20)(1,"p-button",49),N("keydown",function(o){w(e);let r=d(2);return T(r.onContainerButtonKeydown(o))})("onClick",function(o){w(e);let r=d(2);return T(r.toggleAMPM(o))})("keydown.enter",function(o){w(e);let r=d(2);return T(r.toggleAMPM(o))}),P(2,bO,2,2,"ng-template",null,2,$e),m(),h(4,"span",20),v(5),m(),h(6,"p-button",50),N("keydown",function(o){w(e);let r=d(2);return T(r.onContainerButtonKeydown(o))})("click",function(o){w(e);let r=d(2);return T(r.toggleAMPM(o))})("keydown.enter",function(o){w(e);let r=d(2);return T(r.toggleAMPM(o))}),P(7,wO,2,2,"ng-template",null,2,$e),m()()}if(t&2){let e=d(2);G(e.cx("ampmPicker")),_("pBind",e.ptm("ampmPicker")),l(),_("styleClass",e.cx("pcIncrementButton"))("pt",e.ptm("pcIncrementButton")),O("aria-label",e.getTranslation("am"))("data-pc-group-section","timepickerbutton"),l(3),_("pBind",e.ptm("ampm")),l(),C(e.pm?"PM":"AM"),l(),_("styleClass",e.cx("pcDecrementButton"))("pt",e.ptm("pcDecrementButton")),O("aria-label",e.getTranslation("pm"))("data-pc-group-section","timepickerbutton")}}function SO(t,i){if(t&1){let e=$();h(0,"div",20)(1,"div",20)(2,"p-button",43),N("keydown",function(o){w(e);let r=d();return T(r.onContainerButtonKeydown(o))})("keydown.enter",function(o){w(e);let r=d();return T(r.incrementHour(o))})("keydown.space",function(o){w(e);let r=d();return T(r.incrementHour(o))})("mousedown",function(o){w(e);let r=d();return T(r.onTimePickerElementMouseDown(o,0,1))})("mouseup",function(o){w(e);let r=d();return T(r.onTimePickerElementMouseUp(o))})("keyup.enter",function(o){w(e);let r=d();return T(r.onTimePickerElementMouseUp(o))})("keyup.space",function(o){w(e);let r=d();return T(r.onTimePickerElementMouseUp(o))})("mouseleave",function(){w(e);let o=d();return T(o.onTimePickerElementMouseLeave())}),P(3,GR,2,2,"ng-template",null,2,$e),m(),h(5,"span",20),P(6,jR,2,0,"ng-container",7),v(7),m(),h(8,"p-button",43),N("keydown",function(o){w(e);let r=d();return T(r.onContainerButtonKeydown(o))})("keydown.enter",function(o){w(e);let r=d();return T(r.decrementHour(o))})("keydown.space",function(o){w(e);let r=d();return T(r.decrementHour(o))})("mousedown",function(o){w(e);let r=d();return T(r.onTimePickerElementMouseDown(o,0,-1))})("mouseup",function(o){w(e);let r=d();return T(r.onTimePickerElementMouseUp(o))})("keyup.enter",function(o){w(e);let r=d();return T(r.onTimePickerElementMouseUp(o))})("keyup.space",function(o){w(e);let r=d();return T(r.onTimePickerElementMouseUp(o))})("mouseleave",function(){w(e);let o=d();return T(o.onTimePickerElementMouseLeave())}),P(9,KR,2,2,"ng-template",null,2,$e),m()(),h(11,"div",44)(12,"span",20),v(13),m()(),h(14,"div",20)(15,"p-button",43),N("keydown",function(o){w(e);let r=d();return T(r.onContainerButtonKeydown(o))})("keydown.enter",function(o){w(e);let r=d();return T(r.incrementMinute(o))})("keydown.space",function(o){w(e);let r=d();return T(r.incrementMinute(o))})("mousedown",function(o){w(e);let r=d();return T(r.onTimePickerElementMouseDown(o,1,1))})("mouseup",function(o){w(e);let r=d();return T(r.onTimePickerElementMouseUp(o))})("keyup.enter",function(o){w(e);let r=d();return T(r.onTimePickerElementMouseUp(o))})("keyup.space",function(o){w(e);let r=d();return T(r.onTimePickerElementMouseUp(o))})("mouseleave",function(){w(e);let o=d();return T(o.onTimePickerElementMouseLeave())}),P(16,QR,2,2,"ng-template",null,2,$e),m(),h(18,"span",20),P(19,JR,2,0,"ng-container",7),v(20),m(),h(21,"p-button",43),N("keydown",function(o){w(e);let r=d();return T(r.onContainerButtonKeydown(o))})("keydown.enter",function(o){w(e);let r=d();return T(r.decrementMinute(o))})("keydown.space",function(o){w(e);let r=d();return T(r.decrementMinute(o))})("mousedown",function(o){w(e);let r=d();return T(r.onTimePickerElementMouseDown(o,1,-1))})("mouseup",function(o){w(e);let r=d();return T(r.onTimePickerElementMouseUp(o))})("keyup.enter",function(o){w(e);let r=d();return T(r.onTimePickerElementMouseUp(o))})("keyup.space",function(o){w(e);let r=d();return T(r.onTimePickerElementMouseUp(o))})("mouseleave",function(){w(e);let o=d();return T(o.onTimePickerElementMouseLeave())}),P(22,iO,2,2,"ng-template",null,2,$e),m()(),P(24,oO,3,5,"div",8)(25,fO,10,14,"div",8)(26,mO,3,5,"div",8)(27,TO,9,13,"div",8),m()}if(t&2){let e=d();G(e.cx("timePicker")),_("pBind",e.ptm("timePicker")),l(),G(e.cx("hourPicker")),_("pBind",e.ptm("hourPicker")),l(),_("styleClass",e.cx("pcIncrementButton"))("pt",e.ptm("pcIncrementButton")),O("aria-label",e.getTranslation("nextHour"))("data-pc-group-section","timepickerbutton"),l(3),_("pBind",e.ptm("hour")),l(),_("ngIf",e.currentHour<10),l(),C(e.currentHour),l(),_("styleClass",e.cx("pcDecrementButton"))("pt",e.ptm("pcDecrementButton")),O("aria-label",e.getTranslation("prevHour"))("data-pc-group-section","timepickerbutton"),l(3),_("pBind",e.ptm("separatorContainer")),l(),_("pBind",e.ptm("separator")),l(),C(e.timeSeparator),l(),G(e.cx("minutePicker")),_("pBind",e.ptm("minutePicker")),l(),_("styleClass",e.cx("pcIncrementButton"))("pt",e.ptm("pcIncrementButton")),O("aria-label",e.getTranslation("nextMinute"))("data-pc-group-section","timepickerbutton"),l(3),_("pBind",e.ptm("minute")),l(),_("ngIf",e.currentMinute<10),l(),C(e.currentMinute),l(),_("styleClass",e.cx("pcDecrementButton"))("pt",e.ptm("pcDecrementButton")),O("aria-label",e.getTranslation("prevMinute"))("data-pc-group-section","timepickerbutton"),l(3),_("ngIf",e.showSeconds),l(),_("ngIf",e.showSeconds),l(),_("ngIf",e.hourFormat=="12"),l(),_("ngIf",e.hourFormat=="12")}}function kO(t,i){t&1&&le(0)}function IO(t,i){if(t&1&&P(0,kO,1,0,"ng-container",22),t&2){let e=d(2);_("ngTemplateOutlet",e.buttonBarTemplate||e._buttonBarTemplate)("ngTemplateOutletContext",qn(2,H3,e.onTodayButtonClick.bind(e),e.onClearButtonClick.bind(e)))}}function MO(t,i){if(t&1){let e=$();h(0,"p-button",51),N("keydown",function(o){w(e);let r=d(2);return T(r.onContainerButtonKeydown(o))})("onClick",function(o){w(e);let r=d(2);return T(r.onTodayButtonClick(o))}),m(),h(1,"p-button",51),N("keydown",function(o){w(e);let r=d(2);return T(r.onContainerButtonKeydown(o))})("onClick",function(o){w(e);let r=d(2);return T(r.onClearButtonClick(o))}),m()}if(t&2){let e=d(2);_("styleClass",e.cx("pcTodayButton"))("label",e.getTranslation("today"))("ngClass",e.todayButtonStyleClass)("pt",e.ptm("pcTodayButton")),O("data-pc-group-section","button"),l(),_("styleClass",e.cx("pcClearButton"))("label",e.getTranslation("clear"))("ngClass",e.clearButtonStyleClass)("pt",e.ptm("pcClearButton")),O("data-pc-group-section","button")}}function EO(t,i){if(t&1&&(h(0,"div",20),I(1,IO,1,5,"ng-container")(2,MO,2,10),m()),t&2){let e=d();G(e.cx("buttonbar")),_("pBind",e.ptm("buttonbar")),l(),M(e.buttonBarTemplate||e._buttonBarTemplate?1:2)}}function DO(t,i){t&1&&le(0)}var PO=`
1069
+ ${eb}
1070
+
1071
+ /* For PrimeNG */
1072
+ .p-datepicker.ng-invalid.ng-dirty .p-inputtext {
1073
+ border-color: dt('inputtext.invalid.border.color');
1074
+ }
1075
+ `,RO={root:()=>({position:"relative"})},OO={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:i})=>{let e="";if(t.isRangeSelection()&&t.isSelected(i)&&i.selectable){let n=t.value[0],o=t.value[1],r=n&&i.year===n.getFullYear()&&i.month===n.getMonth()&&i.day===n.getDate(),a=o&&i.year===o.getFullYear()&&i.month===o.getMonth()&&i.day===o.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(i)&&i.selectable,"p-disabled":t.$disabled()||!i.selectable,[e]:!0}},monthView:"p-datepicker-month-view",month:({instance:t,index:i})=>["p-datepicker-month",{"p-datepicker-month-selected":t.isMonthSelected(i),"p-disabled":t.isMonthDisabled(i)}],yearView:"p-datepicker-year-view",year:({instance:t,year:i})=>["p-datepicker-year",{"p-datepicker-year-selected":t.isYearSelected(i),"p-disabled":t.isYearDisabled(i)}],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"},nb=(()=>{class t extends en{name="datepicker";style=PO;classes=OO;inlineStyles=RO;static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})();var FO={provide:es,useExisting:Zi(()=>ob),multi:!0},ib=new ve("DATEPICKER_INSTANCE"),ob=(()=>{class t extends rv{zone;overlayService;componentName="DatePicker";bindDirectiveInstance=p(Ae,{self:!0});$pcDatePicker=p(ib,{optional:!0,skipSelf:!0})??void 0;iconDisplay="button";styleClass;inputStyle;inputId;inputStyleClass;placeholder;ariaLabelledBy;ariaLabel;iconAriaLabel;get dateFormat(){return this._dateFormat}set dateFormat(e){this._dateFormat=e,this.initialized&&this.updateInputfield()}multipleSeparator=",";rangeSeparator="-";inline=!1;showOtherMonths=!0;selectOtherMonths;showIcon;icon;readonlyInput;shortYearCutoff="+10";get hourFormat(){return this._hourFormat}set hourFormat(e){this._hourFormat=e,this.initialized&&this.updateInputfield()}timeOnly;stepHour=1;stepMinute=1;stepSecond=1;showSeconds=!1;showOnFocus=!0;showWeek=!1;startWeekFromFirstDayOfYear=!1;showClear=!1;dataType="date";selectionMode="single";maxDateCount;showButtonBar;todayButtonStyleClass;clearButtonStyleClass;autofocus;autoZIndex=!0;baseZIndex=0;panelStyleClass;panelStyle;keepInvalid=!1;hideOnDateTimeSelect=!0;touchUI;timeSeparator=":";focusTrap=!0;showTransitionOptions=".12s cubic-bezier(0, 0, 0.2, 1)";hideTransitionOptions=".1s linear";tabindex;get minDate(){return this._minDate}set minDate(e){this._minDate=e,this.currentMonth!=null&&this.currentMonth!=null&&this.currentYear&&this.createMonths(this.currentMonth,this.currentYear)}get maxDate(){return this._maxDate}set maxDate(e){this._maxDate=e,this.currentMonth!=null&&this.currentMonth!=null&&this.currentYear&&this.createMonths(this.currentMonth,this.currentYear)}get disabledDates(){return this._disabledDates}set disabledDates(e){this._disabledDates=e,this.currentMonth!=null&&this.currentMonth!=null&&this.currentYear&&this.createMonths(this.currentMonth,this.currentYear)}get disabledDays(){return this._disabledDays}set disabledDays(e){this._disabledDays=e,this.currentMonth!=null&&this.currentMonth!=null&&this.currentYear&&this.createMonths(this.currentMonth,this.currentYear)}get showTime(){return this._showTime}set showTime(e){this._showTime=e,this.currentHour===void 0&&this.initTime(this.value||new Date),this.updateInputfield()}get responsiveOptions(){return this._responsiveOptions}set responsiveOptions(e){this._responsiveOptions=e,this.destroyResponsiveStyleElement(),this.createResponsiveStyle()}get numberOfMonths(){return this._numberOfMonths}set numberOfMonths(e){this._numberOfMonths=e,this.destroyResponsiveStyleElement(),this.createResponsiveStyle()}get firstDayOfWeek(){return this._firstDayOfWeek}set firstDayOfWeek(e){this._firstDayOfWeek=e,this.createWeekDays()}get view(){return this._view}set view(e){this._view=e,this.currentView=this._view}get defaultDate(){return this._defaultDate}set defaultDate(e){if(this._defaultDate=e,this.initialized){let n=e||new Date;this.currentMonth=n.getMonth(),this.currentYear=n.getFullYear(),this.initTime(n),this.createMonths(this.currentMonth,this.currentYear)}}appendTo=B(void 0);motionOptions=B(void 0);computedMotionOptions=S(()=>me(me({},this.ptm("motion")),this.motionOptions()));onFocus=new re;onBlur=new re;onClose=new re;onSelect=new re;onClear=new re;onInput=new re;onTodayClick=new re;onClearClick=new re;onMonthChange=new re;onYearChange=new re;onClickOutside=new re;onShow=new re;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(nb);contentViewChild;value;dates;months;weekDays;currentMonth;currentYear;currentHour;currentMinute;currentSecond;p;pm;mask;maskClickListener;overlay;responsiveStyleElement;overlayVisible;overlayMinWidth;$appendTo=S(()=>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=ut("pn_id_"),this.panelId=this.attributeSelector+"_panel";let e=this.defaultDate||new Date;this.createResponsiveStyle(),this.currentMonth=e.getMonth(),this.currentYear=e.getFullYear(),this.yearOptions=[],this.currentView=this.view,this.view==="date"&&(this.createWeekDays(),this.initTime(e),this.createMonths(this.currentMonth,this.currentYear),this.ticksTo1970=(1969*365+Math.floor(1970/4)-Math.floor(1970/100)+Math.floor(1970/400))*24*60*60*1e7),this.translationSubscription=this.config.translationObserver.subscribe(()=>{this.createWeekDays(),this.cd.markForCheck()}),this.initialized=!0}onAfterViewInit(){this.inline?this.contentViewChild&&this.contentViewChild.nativeElement.setAttribute(this.attributeSelector,""):!this.$disabled()&&this.overlay&&(this.initFocusableCell(),this.numberOfMonths===1&&this.contentViewChild&&this.contentViewChild.nativeElement&&(this.contentViewChild.nativeElement.style.width=P0(this.el?.nativeElement)+"px"))}onAfterViewChecked(){this.bindDirectiveInstance.setAttrs(this.ptms(["host","root"]))}templates;onAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"date":this._dateTemplate=e.template;break;case"decade":this._decadeTemplate=e.template;break;case"disabledDate":this._disabledDateTemplate=e.template;break;case"header":this._headerTemplate=e.template;break;case"inputicon":this._inputIconTemplate=e.template;break;case"buttonbar":this._buttonBarTemplate=e.template;break;case"previousicon":this._previousIconTemplate=e.template;break;case"nexticon":this._nextIconTemplate=e.template;break;case"triggericon":this._triggerIconTemplate=e.template;break;case"clearicon":this._clearIconTemplate=e.template;break;case"decrementicon":this._decrementIconTemplate=e.template;break;case"incrementicon":this._incrementIconTemplate=e.template;break;case"footer":this._footerTemplate=e.template;break;default:this._dateTemplate=e.template;break}})}getTranslation(e){return this.config.getTranslation(e)}populateYearOptions(e,n){this.yearOptions=[];for(let o=e;o<=n;o++)this.yearOptions.push(o)}createWeekDays(){this.weekDays=[];let e=this.getFirstDateOfWeek(),n=this.getTranslation(Jt.DAY_NAMES_MIN);for(let o=0;o<7;o++)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 o=0;o<10;o++)e.push(n+o);return e}createMonths(e,n){this.months=this.months=[];for(let o=0;o<this.numberOfMonths;o++){let r=e+o,a=n;r>11&&(r=r%12,a=n+Math.floor((e+o)/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 o=n.getTime();return n.setMonth(0),n.setDate(1),Math.floor(Math.round((o-n.getTime())/864e5)/7)+1}createMonth(e,n){let o=[],r=this.getFirstDayOfMonthIndex(e,n),a=this.getDaysCountInMonth(e,n),s=this.getDaysCountInPrevMonth(e,n),c=1,u=new Date,f=[],g=Math.ceil((a+r)/7);for(let x=0;x<g;x++){let R=[];if(x==0){for(let A=s-r+1;A<=s;A++){let q=this.getPreviousMonthAndYear(e,n);R.push({day:A,month:q.month,year:q.year,otherMonth:!0,today:this.isToday(u,A,q.month,q.year),selectable:this.isSelectable(A,q.month,q.year,!0)})}let k=7-R.length;for(let A=0;A<k;A++)R.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 A=this.getNextMonthAndYear(e,n);R.push({day:c-a,month:A.month,year:A.year,otherMonth:!0,today:this.isToday(u,c-a,A.month,A.year),selectable:this.isSelectable(c-a,A.month,A.year,!0)})}else R.push({day:c,month:e,year:n,today:this.isToday(u,c,e,n),selectable:this.isSelectable(c,e,n,!1)});c++}this.showWeek&&f.push(this.getWeekNumber(new Date(R[0].year,R[0].month,R[0].day))),o.push(R)}return{month:e,year:n,dates:o,weekNumbers:f}}initTime(e){this.pm=e.getHours()>11,this.showTime?(this.currentMinute=e.getMinutes(),this.currentSecond=this.showSeconds?e.getSeconds():0,this.setCurrentHourPM(e.getHours())):this.timeOnly&&(this.currentMinute=0,this.currentHour=0,this.currentSecond=0)}navBackward(e){if(this.$disabled()){e.preventDefault();return}this.isMonthNavigate=!0,this.currentView==="month"?(this.decrementYear(),setTimeout(()=>{this.updateFocus()},1)):this.currentView==="year"?(this.decrementDecade(),setTimeout(()=>{this.updateFocus()},1)):(this.currentMonth===0?(this.currentMonth=11,this.decrementYear()):this.currentMonth--,this.onMonthChange.emit({month:this.currentMonth+1,year:this.currentYear}),this.createMonths(this.currentMonth,this.currentYear))}navForward(e){if(this.$disabled()){e.preventDefault();return}this.isMonthNavigate=!0,this.currentView==="month"?(this.incrementYear(),setTimeout(()=>{this.updateFocus()},1)):this.currentView==="year"?(this.incrementDecade(),setTimeout(()=>{this.updateFocus()},1)):(this.currentMonth===11?(this.currentMonth=0,this.incrementYear()):this.currentMonth++,this.onMonthChange.emit({month:this.currentMonth+1,year:this.currentYear}),this.createMonths(this.currentMonth,this.currentYear))}decrementYear(){this.currentYear--;let e=this.yearOptions;if(this.currentYear<e[0]){let n=e[e.length-1]-e[0];this.populateYearOptions(e[0]-n,e[e.length-1]-n)}}decrementDecade(){this.currentYear=this.currentYear-10}incrementDecade(){this.currentYear=this.currentYear+10}incrementYear(){this.currentYear++;let e=this.yearOptions;if(this.currentYear>e[e.length-1]){let n=e[e.length-1]-e[0];this.populateYearOptions(e[0]+n,e[e.length-1]+n)}}switchToMonthView(e){this.setCurrentView("month"),e.preventDefault()}switchToYearView(e){this.setCurrentView("year"),e.preventDefault()}onDateSelect(e,n){if(this.$disabled()||!n.selectable){e.preventDefault();return}this.isMultipleSelection()&&this.isSelected(n)?(this.value=this.value.filter((o,r)=>!this.isDateEquals(o,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 o=this.formatDateTime(this.value[n]);e+=o,n!==this.value.length-1&&(e+=this.multipleSeparator+" ")}else if(this.isRangeSelection()&&this.value&&this.value.length){let n=this.value[0],o=this.value[1];e=this.formatDateTime(n),o&&(e+=" "+this.rangeSeparator+" "+this.formatDateTime(o))}}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,o=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=o?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 o=this.value[0],r=this.value[1];!r&&n.getTime()>=o.getTime()?r=n:(o=n,r=null),this.updateModel([o,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(o=>this.formatDateTime(o))),this.writeModelValue(n),this.onModelChange(n)}}getFirstDayOfMonthIndex(e,n){let o=new Date;o.setDate(1),o.setMonth(e),o.setFullYear(n);let r=o.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 o=this.getPreviousMonthAndYear(e,n);return this.getDaysCountInMonth(o.month,o.year)}getPreviousMonthAndYear(e,n){let o,r;return e===0?(o=11,r=n-1):(o=e-1,r=n),{month:o,year:r}}getNextMonthAndYear(e,n){let o,r;return e===11?(o=0,r=n+1):(o=e+1,r=n),{month:o,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 o of this.value)if(n=this.isDateEquals(o,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),o=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>=o&&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 o=n??this.currentYear;for(let r=1;r<this.getDaysCountInMonth(e,o)+1;r++)if(this.isSelectable(r,e,o,!1))return!1;return!0}isYearDisabled(e){return Array(12).fill(0).every((n,o)=>this.isMonthDisabled(o,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&&hr(e)?e.getDate()===n.day&&e.getMonth()===n.month&&e.getFullYear()===n.year:!1}isDateBetween(e,n,o){let r=!1;if(hr(e)&&hr(n)){let a=this.formatDateMetaToDate(o);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,o,r){return e.getDate()===n&&e.getMonth()===o&&e.getFullYear()===r}isSelectable(e,n,o,r){let a=!0,s=!0,c=!0,u=!0;return r&&!this.selectOtherMonths?!1:(this.minDate&&(this.minDate.getFullYear()>o||this.minDate.getFullYear()===o&&this.currentView!="year"&&(this.minDate.getMonth()>n||this.minDate.getMonth()===n&&this.minDate.getDate()>e))&&(a=!1),this.maxDate&&(this.maxDate.getFullYear()<o||this.maxDate.getFullYear()===o&&(this.maxDate.getMonth()<n||this.maxDate.getMonth()===n&&this.maxDate.getDate()<e))&&(s=!1),this.disabledDates&&(c=!this.isDateDisabled(e,n,o)),this.disabledDays&&(u=!this.isDayDisabled(e,n,o)),a&&s&&c&&u)}isDateDisabled(e,n,o){if(this.disabledDates){for(let r of this.disabledDates)if(r.getFullYear()===o&&r.getMonth()===n&&r.getDate()===e)return!0}return!1}isDayDisabled(e,n,o){if(this.disabledDays){let a=new Date(o,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=dt(this.el?.nativeElement,".p-datepicker-header"),o=e.target;if(this.timeOnly)return;o==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&&(If(this.contentViewChild.nativeElement).forEach(n=>n.tabIndex="-1"),this.overlayVisible&&(this.overlayVisible=!1))}onDateCellKeydown(e,n,o){let r=e.currentTarget,a=r.parentElement,s=this.formatDateMetaToDate(n);switch(e.which){case 40:{r.tabIndex="-1";let k=ur(a),A=a.parentElement.nextElementSibling;if(A){let q=A.children[k].children[0];fn(q,"p-disabled")?(this.navigationState={backward:!1},this.navForward(e)):(A.children[k].children[0].tabIndex="0",A.children[k].children[0].focus())}else this.navigationState={backward:!1},this.navForward(e);e.preventDefault();break}case 38:{r.tabIndex="-1";let k=ur(a),A=a.parentElement.previousElementSibling;if(A){let q=A.children[k].children[0];fn(q,"p-disabled")?(this.navigationState={backward:!0},this.navBackward(e)):(q.tabIndex="0",q.focus())}else this.navigationState={backward:!0},this.navBackward(e);e.preventDefault();break}case 37:{r.tabIndex="-1";let k=a.previousElementSibling;if(k){let A=k.children[0];fn(A,"p-disabled")||fn(A.parentElement,"p-datepicker-weeknumber")?this.navigateToMonth(!0,o):(A.tabIndex="0",A.focus())}else this.navigateToMonth(!0,o);e.preventDefault();break}case 39:{r.tabIndex="-1";let k=a.nextElementSibling;if(k){let A=k.children[0];fn(A,"p-disabled")?this.navigateToMonth(!1,o):(A.tabIndex="0",A.focus())}else this.navigateToMonth(!1,o);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()),A=this.formatDateKey(k);this.navigateToMonth(!0,o,`span[data-date='${A}']: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()),A=this.formatDateKey(k);this.navigateToMonth(!1,o,`span[data-date='${A}']:not(.p-disabled):not(.p-ink)`),e.preventDefault();break}case 36:r.tabIndex="-1";let c=new Date(s.getFullYear(),s.getMonth(),1),u=this.formatDateKey(c),f=dt(r.offsetParent,`span[data-date='${u}']:not(.p-disabled):not(.p-ink)`);f&&(f.tabIndex="0",f.focus()),e.preventDefault();break;case 35:r.tabIndex="-1";let g=new Date(s.getFullYear(),s.getMonth()+1,0),x=this.formatDateKey(g),R=dt(r.offsetParent,`span[data-date='${x}']:not(.p-disabled):not(.p-ink)`);g&&(R.tabIndex="0",R.focus()),e.preventDefault();break;default:break}}onMonthCellKeydown(e,n){let o=e.currentTarget;switch(e.which){case 38:case 40:{o.tabIndex="-1";var r=o.parentElement.children,a=ur(o);let s=r[e.which===40?a+3:a-3];s&&(s.tabIndex="0",s.focus()),e.preventDefault();break}case 37:{o.tabIndex="-1";let s=o.previousElementSibling;s?(s.tabIndex="0",s.focus()):(this.navigationState={backward:!0},this.navBackward(e)),e.preventDefault();break}case 39:{o.tabIndex="-1";let s=o.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 o=e.currentTarget;switch(e.which){case 38:case 40:{o.tabIndex="-1";var r=o.parentElement.children,a=ur(o);let s=r[e.which===40?a+2:a-2];s&&(s.tabIndex="0",s.focus()),e.preventDefault();break}case 37:{o.tabIndex="-1";let s=o.previousElementSibling;s?(s.tabIndex="0",s.focus()):(this.navigationState={backward:!0},this.navBackward(e)),e.preventDefault();break}case 39:{o.tabIndex="-1";let s=o.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,o){if(e)if(this.numberOfMonths===1||n===0)this.navigationState={backward:!0},this._focusKey=o,this.navBackward(event);else{let r=this.contentViewChild.nativeElement.children[n-1];if(o){let a=dt(r,o);a.tabIndex="0",a.focus()}else{let a=bn(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=o,this.navForward(event);else{let r=this.contentViewChild.nativeElement.children[n+1];if(o){let a=dt(r,o);a.tabIndex="0",a.focus()}else{let a=dt(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?dt(this.contentViewChild.nativeElement,".p-datepicker-prev-button").focus():dt(this.contentViewChild.nativeElement,".p-datepicker-next-button").focus();else{if(this.navigationState.backward){let n;this.currentView==="month"?n=bn(this.contentViewChild.nativeElement,".p-datepicker-month-view .p-datepicker-month:not(.p-disabled)"):this.currentView==="year"?n=bn(this.contentViewChild.nativeElement,".p-datepicker-year-view .p-datepicker-year:not(.p-disabled)"):n=bn(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=dt(this.contentViewChild.nativeElement,".p-datepicker-month-view .p-datepicker-month:not(.p-disabled)"):this.currentView==="year"?e=dt(this.contentViewChild.nativeElement,".p-datepicker-year-view .p-datepicker-year:not(.p-disabled)"):e=dt(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 o=bn(e,".p-datepicker-month-view .p-datepicker-month:not(.p-disabled)"),r=dt(e,".p-datepicker-month-view .p-datepicker-month.p-highlight");o.forEach(a=>a.tabIndex=-1),n=r||o[0],o.length===0&&bn(e,'.p-datepicker-month-view .p-datepicker-month.p-disabled[tabindex = "0"]').forEach(s=>s.tabIndex=-1)}else if(this.currentView==="year"){let o=bn(e,".p-datepicker-year-view .p-datepicker-year:not(.p-disabled)"),r=dt(e,".p-datepicker-year-view .p-datepicker-year.p-highlight");o.forEach(a=>a.tabIndex=-1),n=r||o[0],o.length===0&&bn(e,'.p-datepicker-year-view .p-datepicker-year.p-disabled[tabindex = "0"]').forEach(s=>s.tabIndex=-1)}else if(n=dt(e,"span.p-highlight"),!n){let o=dt(e,"td.p-datepicker-today span:not(.p-disabled):not(.p-ink)");o?n=o:n=dt(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=If(this.contentViewChild.nativeElement);if(n&&n.length>0)if(!n[0].ownerDocument.activeElement)n[0].focus();else{let o=n.indexOf(n[0].ownerDocument.activeElement);if(e.shiftKey)if(o==-1||o===0)if(this.focusTrap)n[n.length-1].focus();else{if(o===-1)return this.hideOverlay();if(o===0)return}else n[o-1].focus();else if(o==-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(o===n.length-1){if(!this.focusTrap&&o!=-1)return this.hideOverlay();n[0].focus()}else n[o+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,o,r){let a=[e,n,o],s=!1,c=this.value,u=this.convertTo24Hour(e,r),f=this.isRangeSelection(),g=this.isMultipleSelection();(f||g)&&(this.value||(this.value=[new Date,new Date]),f&&(c=this.value[1]||this.value[0]),g&&(c=this.value[this.value.length-1]));let R=c?c.toDateString():null,k=this.minDate&&R&&this.minDate.toDateString()===R,A=this.maxDate&&R&&this.maxDate.toDateString()===R;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()>o):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()>o):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()>o):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()>o):a[2]=this.minDate.getSeconds();break;case(A&&this.maxDate.getHours()<u):a[0]=this.maxDate.getHours();case(A&&this.maxDate.getHours()===u&&this.maxDate.getMinutes()<n):a[1]=this.maxDate.getMinutes();case(A&&this.maxDate.getHours()===u&&this.maxDate.getMinutes()===n&&this.maxDate.getSeconds()<o):a[2]=this.maxDate.getSeconds();break}return a}incrementHour(e){let n=this.currentHour??0,o=(this.currentHour??0)+this.stepHour,r=this.pm;this.hourFormat=="24"?o=o>=24?o-24:o:this.hourFormat=="12"&&(n<12&&o>11&&(r=!this.pm),o=o>=13?o-12:o),this.toggleAMPMIfNotMinDate(r),[this.currentHour,this.currentMinute,this.currentSecond]=this.constrainTime(o,this.currentMinute,this.currentSecond,r),e.preventDefault()}toggleAMPMIfNotMinDate(e){let n=this.value,o=n?n.toDateString():null;this.minDate&&o&&this.minDate.toDateString()===o&&this.minDate.getHours()>=12?this.pm=!0:this.pm=e}onTimePickerElementMouseDown(e,n,o){this.$disabled()||(this.repeat(e,null,n,o),e.preventDefault())}onTimePickerElementMouseUp(e){this.$disabled()||(this.clearTimePickerTimer(),this.updateTime())}onTimePickerElementMouseLeave(){!this.$disabled()&&this.timePickerTimer&&(this.clearTimePickerTimer(),this.updateTime())}repeat(e,n,o,r){let a=n||500;switch(this.clearTimePickerTimer(),this.timePickerTimer=setTimeout(()=>{this.repeat(e,100,o,r),this.cd.markForCheck()},a),o){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,o=this.pm;this.hourFormat=="24"?n=n<0?24+n:n:this.hourFormat=="12"&&(this.currentHour===12&&(o=!this.pm),n=n<=0?12+n:n),this.toggleAMPMIfNotMinDate(o),[this.currentHour,this.currentMinute,this.currentSecond]=this.constrainTime(n,this.currentMinute,this.currentSecond,o),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 o=this.parseValueFromString(n);this.isValidSelection(o)?(this.updateModel(o),this.updateUI()):this.keepInvalid&&this.updateModel(o)}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(o=>this.isSelectable(o.getDate(),o.getMonth(),o.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 o=e.split(this.multipleSeparator);n=[];for(let r of o)n.push(this.parseDateTime(r.trim()))}else if(this.isRangeSelection()){let o=e.split(" "+this.rangeSeparator+" ");n=[];for(let r=0;r<o.length;r++)n[r]=this.parseDateTime(o[r].trim())}return n}parseDateTime(e){let n,o=e.split(" ");if(this.timeOnly)n=new Date,this.populateTime(n,o[0],o[1]);else{let r=this.getDateFormat();if(this.showTime){let a=this.hourFormat=="12"?o.pop():null,s=o.pop();n=this.parseDate(o.join(" "),r),this.populateTime(n,s,a)}else n=this.parseDate(e,r)}return n}populateTime(e,n,o){if(this.hourFormat=="12"&&!o)throw"Invalid Time";this.pm=o==="PM"||o==="pm";let r=this.parseTime(n);e.setHours(r.hour),e.setMinutes(r.minute),e.setSeconds(r.second)}isValidDate(e){return hr(e)&&N0(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`};kf(this.overlay,n||{}),this.appendOverlay(),this.alignOverlay(),this.setZIndex(),this.updateFocus(),this.bindListeners(),this.onShow.emit(e.element)}onOverlayAfterLeave(e){this.autoZIndex&&yn.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):wi(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"?dr(this.overlay,this.inputfieldViewChild?.nativeElement):R0(this.overlay,this.inputfieldViewChild?.nativeElement))}bindListeners(){this.bindDocumentClickListener(),this.bindDocumentResizeListener(),this.bindScrollListener()}setZIndex(){this.autoZIndex&&(this.touchUI?yn.set("modal",this.overlay,this.baseZIndex||this.config.zIndex.modal):yn.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)),cr(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",o=>{this.disableModality(),this.overlayVisible=!1}),this.renderer.appendChild(this.document.body,this.mask),U0())}disableModality(){this.mask&&(cr(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 o=0;o<e.length;o++){let r=e[o];if(fn(r,"p-datepicker-mask-scrollblocker")){n=!0;break}}n||$0(),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(Jt.FIRST_DAY_OF_WEEK)}formatDate(e,n){if(!e)return"";let o,r=f=>{let g=o+1<n.length&&n.charAt(o+1)===f;return g&&o++,g},a=(f,g,x)=>{let R=""+g;if(r(f))for(;R.length<x;)R="0"+R;return R},s=(f,g,x,R)=>r(f)?R[g]:x[g],c="",u=!1;if(e)for(o=0;o<n.length;o++)if(u)n.charAt(o)==="'"&&!r("'")?u=!1:c+=n.charAt(o);else switch(n.charAt(o)){case"d":c+=a("d",e.getDate(),2);break;case"D":c+=s("D",e.getDay(),this.getTranslation(Jt.DAY_NAMES_SHORT),this.getTranslation(Jt.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(Jt.MONTH_NAMES_SHORT),this.getTranslation(Jt.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(o)}return c}formatTime(e){if(!e)return"";let n="",o=e.getHours(),r=e.getMinutes(),a=e.getSeconds();return this.hourFormat=="12"&&o>11&&o!=12&&(o-=12),this.hourFormat=="12"?n+=o===0?12:o<10?"0"+o:o:n+=o<10?"0"+o:o,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(":"),o=this.showSeconds?3:2;if(n.length!==o)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 o,r,a,s=0,c=typeof this.shortYearCutoff!="string"?this.shortYearCutoff:new Date().getFullYear()%100+parseInt(this.shortYearCutoff,10),u=-1,f=-1,g=-1,x=-1,R=!1,k,A=de=>{let Re=o+1<n.length&&n.charAt(o+1)===de;return Re&&o++,Re},q=de=>{let Re=A(de),we=de==="@"?14:de==="!"?20:de==="y"&&Re?4:de==="o"?3:2,Ge=de==="y"?we:1,Nt=new RegExp("^\\d{"+Ge+","+we+"}"),ct=e.substring(s).match(Nt);if(!ct)throw"Missing number at position "+s;return s+=ct[0].length,parseInt(ct[0],10)},W=(de,Re,we)=>{let Ge=-1,Nt=A(de)?we:Re,ct=[];for(let _t=0;_t<Nt.length;_t++)ct.push([_t,Nt[_t]]);ct.sort((_t,tt)=>-(_t[1].length-tt[1].length));for(let _t=0;_t<ct.length;_t++){let tt=ct[_t][1];if(e.substr(s,tt.length).toLowerCase()===tt.toLowerCase()){Ge=ct[_t][0],s+=tt.length;break}}if(Ge!==-1)return Ge+1;throw"Unknown name at position "+s},J=()=>{if(e.charAt(s)!==n.charAt(o))throw"Unexpected literal at position "+s;s++};for(this.view==="month"&&(g=1),o=0;o<n.length;o++)if(R)n.charAt(o)==="'"&&!A("'")?R=!1:J();else switch(n.charAt(o)){case"d":g=q("d");break;case"D":W("D",this.getTranslation(Jt.DAY_NAMES_SHORT),this.getTranslation(Jt.DAY_NAMES));break;case"o":x=q("o");break;case"m":f=q("m");break;case"M":f=W("M",this.getTranslation(Jt.MONTH_NAMES_SHORT),this.getTranslation(Jt.MONTH_NAMES));break;case"y":u=q("y");break;case"@":k=new Date(q("@")),u=k.getFullYear(),f=k.getMonth()+1,g=k.getDate();break;case"!":k=new Date((q("!")-this.ticksTo1970)/1e4),u=k.getFullYear(),f=k.getMonth()+1,g=k.getDate();break;case"'":A("'")?J():R=!0;break;default:J()}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){f=1,g=x;do{if(r=this.getDaysCountInMonth(u,f-1),g<=r)break;f++,g-=r}while(!0)}if(this.view==="year"&&(f=f===-1?1:f,g=g===-1?1:g),k=this.daylightSavingAdjust(new Date(u,f-1,g)),k.getFullYear()!==u||k.getMonth()+1!==f||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,o={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,o),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",pr(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(o=>!!(o.breakpoint&&o.numMonths)).sort((o,r)=>-1*o.breakpoint.localeCompare(r.breakpoint,void 0,{numeric:!0}));for(let o=0;o<n.length;o++){let{breakpoint:r,numMonths:a}=n[o],s=`
1076
+ .p-datepicker[${this.attributeSelector}] .p-datepicker-group:nth-child(${a}) .p-datepicker-next {
1077
+ display: inline-flex !important;
1078
+ }
1079
+ `;for(let c=a;c<this.numberOfMonths;c++)s+=`
1080
+ .p-datepicker[${this.attributeSelector}] .p-datepicker-group:nth-child(${c+1}) {
1081
+ display: none !important;
1082
+ }
1083
+ `;e+=`
1084
+ @media screen and (max-width: ${r}) {
1085
+ ${s}
1086
+ }
1087
+ `}}this.responsiveStyleElement.innerHTML=e,pr(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 fr(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 fn(e.target,"p-datepicker-prev-button")||fn(e.target,"p-datepicker-prev-icon")||fn(e.target,"p-datepicker-next-button")||fn(e.target,"p-datepicker-next-icon")}onWindowResize(){this.overlayVisible&&!Ja()&&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&&yn.clear(this.overlay),this.destroyResponsiveStyleElement(),this.clearTimePickerTimer(),this.restoreOverlayAppend(),this.onOverlayHide()}static \u0275fac=function(n){return new(n||t)(Rn(Xt),Rn(oo))};static \u0275cmp=z({type:t,selectors:[["p-datePicker"],["p-datepicker"],["p-date-picker"]],contentQueries:function(n,o,r){if(n&1&&Hn(r,y3,4)(r,C3,4)(r,x3,4)(r,w3,4)(r,T3,4)(r,S3,4)(r,k3,4)(r,I3,4)(r,M3,4)(r,E3,4)(r,D3,4)(r,P3,4)(r,R3,4)(r,Pt,4),n&2){let a;ee(a=te())&&(o.dateTemplate=a.first),ee(a=te())&&(o.headerTemplate=a.first),ee(a=te())&&(o.footerTemplate=a.first),ee(a=te())&&(o.disabledDateTemplate=a.first),ee(a=te())&&(o.decadeTemplate=a.first),ee(a=te())&&(o.previousIconTemplate=a.first),ee(a=te())&&(o.nextIconTemplate=a.first),ee(a=te())&&(o.triggerIconTemplate=a.first),ee(a=te())&&(o.clearIconTemplate=a.first),ee(a=te())&&(o.decrementIconTemplate=a.first),ee(a=te())&&(o.incrementIconTemplate=a.first),ee(a=te())&&(o.inputIconTemplate=a.first),ee(a=te())&&(o.buttonBarTemplate=a.first),ee(a=te())&&(o.templates=a)}},viewQuery:function(n,o){if(n&1&&to(O3,5)(F3,5),n&2){let r;ee(r=te())&&(o.inputfieldViewChild=r.first),ee(r=te())&&(o.content=r.first)}},hostVars:4,hostBindings:function(n,o){n&2&&(zt(o.sx("root")),G(o.cn(o.cx("root"),o.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",Y],showOtherMonths:[2,"showOtherMonths","showOtherMonths",Y],selectOtherMonths:[2,"selectOtherMonths","selectOtherMonths",Y],showIcon:[2,"showIcon","showIcon",Y],icon:"icon",readonlyInput:[2,"readonlyInput","readonlyInput",Y],shortYearCutoff:"shortYearCutoff",hourFormat:"hourFormat",timeOnly:[2,"timeOnly","timeOnly",Y],stepHour:[2,"stepHour","stepHour",Me],stepMinute:[2,"stepMinute","stepMinute",Me],stepSecond:[2,"stepSecond","stepSecond",Me],showSeconds:[2,"showSeconds","showSeconds",Y],showOnFocus:[2,"showOnFocus","showOnFocus",Y],showWeek:[2,"showWeek","showWeek",Y],startWeekFromFirstDayOfYear:"startWeekFromFirstDayOfYear",showClear:[2,"showClear","showClear",Y],dataType:"dataType",selectionMode:"selectionMode",maxDateCount:[2,"maxDateCount","maxDateCount",Me],showButtonBar:[2,"showButtonBar","showButtonBar",Y],todayButtonStyleClass:"todayButtonStyleClass",clearButtonStyleClass:"clearButtonStyleClass",autofocus:[2,"autofocus","autofocus",Y],autoZIndex:[2,"autoZIndex","autoZIndex",Y],baseZIndex:[2,"baseZIndex","baseZIndex",Me],panelStyleClass:"panelStyleClass",panelStyle:"panelStyle",keepInvalid:[2,"keepInvalid","keepInvalid",Y],hideOnDateTimeSelect:[2,"hideOnDateTimeSelect","hideOnDateTimeSelect",Y],touchUI:[2,"touchUI","touchUI",Y],timeSeparator:"timeSeparator",focusTrap:[2,"focusTrap","focusTrap",Y],showTransitionOptions:"showTransitionOptions",hideTransitionOptions:"hideTransitionOptions",tabindex:[2,"tabindex","tabindex",Me],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:[Ee([FO,nb,{provide:ib,useExisting:t},{provide:tn,useExisting:t}]),Zt([Ae]),Q],ngContentSelectors:A3,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,o){n&1&&(un(N3),P(0,nR,5,28,"ng-template",3),h(1,"p-motion",4),N("onBeforeEnter",function(a){return o.onOverlayBeforeEnter(a)})("onAfterLeave",function(a){return o.onOverlayAfterLeave(a)}),h(2,"div",5,0),N("click",function(a){return o.onOverlayClick(a)}),Ue(4),P(5,iR,1,0,"ng-container",6)(6,VR,5,6,"ng-container",7)(7,SO,28,38,"div",8)(8,EO,3,4,"div",8),Ue(9,1),P(10,DO,1,0,"ng-container",6),m()()),n&2&&(_("ngIf",!o.inline),l(),_("visible",o.inline||o.overlayVisible)("appear",!o.inline)("options",o.computedMotionOptions()),l(),G(o.cn(o.cx("panel"),o.panelStyleClass)),_("ngStyle",o.panelStyle)("pBind",o.ptm("panel")),O("id",o.panelId)("aria-label",o.getTranslation("chooseDate"))("role",o.inline?null:"dialog")("aria-modal",o.inline?null:"true"),l(3),_("ngTemplateOutlet",o.headerTemplate||o._headerTemplate),l(),_("ngIf",!o.timeOnly),l(),_("ngIf",(o.showTime||o.timeOnly)&&o.currentView==="date"),l(),_("ngIf",o.showButtonBar),l(2),_("ngTemplateOutlet",o.footerTemplate||o._footerTemplate))},dependencies:[Dt,Ka,no,xi,hn,io,Gt,as,jv,Uv,$v,tv,nv,Gv,rs,ts,ot,ro,Ae,uo,av],encapsulation:2,changeDetection:0})}return t})(),rb=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=Mt({type:t});static \u0275inj=It({imports:[ob,ot,ot]})}return t})();var NO=["data-p-icon","filter-fill"],ab=(()=>{class t extends De{static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275cmp=z({type:t,selectors:[["","data-p-icon","filter-fill"]],features:[Q],attrs:NO,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,o){n&1&&(X(),oe(0,"path",0))},encapsulation:2})}return t})();var sb=`
1088
+ .p-paginator {
1089
+ display: flex;
1090
+ align-items: center;
1091
+ justify-content: center;
1092
+ flex-wrap: wrap;
1093
+ background: dt('paginator.background');
1094
+ color: dt('paginator.color');
1095
+ padding: dt('paginator.padding');
1096
+ border-radius: dt('paginator.border.radius');
1097
+ gap: dt('paginator.gap');
1098
+ }
1099
+
1100
+ .p-paginator-content {
1101
+ display: flex;
1102
+ align-items: center;
1103
+ justify-content: center;
1104
+ flex-wrap: wrap;
1105
+ gap: dt('paginator.gap');
1106
+ }
1107
+
1108
+ .p-paginator-content-start {
1109
+ margin-inline-end: auto;
1110
+ }
1111
+
1112
+ .p-paginator-content-end {
1113
+ margin-inline-start: auto;
1114
+ }
1115
+
1116
+ .p-paginator-page,
1117
+ .p-paginator-next,
1118
+ .p-paginator-last,
1119
+ .p-paginator-first,
1120
+ .p-paginator-prev {
1121
+ cursor: pointer;
1122
+ display: inline-flex;
1123
+ align-items: center;
1124
+ justify-content: center;
1125
+ line-height: 1;
1126
+ user-select: none;
1127
+ overflow: hidden;
1128
+ position: relative;
1129
+ background: dt('paginator.nav.button.background');
1130
+ border: 0 none;
1131
+ color: dt('paginator.nav.button.color');
1132
+ min-width: dt('paginator.nav.button.width');
1133
+ height: dt('paginator.nav.button.height');
1134
+ transition:
1135
+ background dt('paginator.transition.duration'),
1136
+ color dt('paginator.transition.duration'),
1137
+ outline-color dt('paginator.transition.duration'),
1138
+ box-shadow dt('paginator.transition.duration');
1139
+ border-radius: dt('paginator.nav.button.border.radius');
1140
+ padding: 0;
1141
+ margin: 0;
1142
+ }
1143
+
1144
+ .p-paginator-page:focus-visible,
1145
+ .p-paginator-next:focus-visible,
1146
+ .p-paginator-last:focus-visible,
1147
+ .p-paginator-first:focus-visible,
1148
+ .p-paginator-prev:focus-visible {
1149
+ box-shadow: dt('paginator.nav.button.focus.ring.shadow');
1150
+ outline: dt('paginator.nav.button.focus.ring.width') dt('paginator.nav.button.focus.ring.style') dt('paginator.nav.button.focus.ring.color');
1151
+ outline-offset: dt('paginator.nav.button.focus.ring.offset');
1152
+ }
1153
+
1154
+ .p-paginator-page:not(.p-disabled):not(.p-paginator-page-selected):hover,
1155
+ .p-paginator-first:not(.p-disabled):hover,
1156
+ .p-paginator-prev:not(.p-disabled):hover,
1157
+ .p-paginator-next:not(.p-disabled):hover,
1158
+ .p-paginator-last:not(.p-disabled):hover {
1159
+ background: dt('paginator.nav.button.hover.background');
1160
+ color: dt('paginator.nav.button.hover.color');
1161
+ }
1162
+
1163
+ .p-paginator-page.p-paginator-page-selected {
1164
+ background: dt('paginator.nav.button.selected.background');
1165
+ color: dt('paginator.nav.button.selected.color');
1166
+ }
1167
+
1168
+ .p-paginator-current {
1169
+ color: dt('paginator.current.page.report.color');
1170
+ }
1171
+
1172
+ .p-paginator-pages {
1173
+ display: flex;
1174
+ align-items: center;
1175
+ gap: dt('paginator.gap');
1176
+ }
1177
+
1178
+ .p-paginator-jtp-input .p-inputtext {
1179
+ max-width: dt('paginator.jump.to.page.input.max.width');
1180
+ }
1181
+
1182
+ .p-paginator-first:dir(rtl),
1183
+ .p-paginator-prev:dir(rtl),
1184
+ .p-paginator-next:dir(rtl),
1185
+ .p-paginator-last:dir(rtl) {
1186
+ transform: rotate(180deg);
1187
+ }
1188
+ `;var AO=["dropdownicon"],LO=["firstpagelinkicon"],BO=["previouspagelinkicon"],VO=["lastpagelinkicon"],zO=["nextpagelinkicon"],ps=t=>({$implicit:t}),HO=t=>({pageLink:t});function qO(t,i){t&1&&le(0)}function GO(t,i){if(t&1&&(h(0,"div",10),P(1,qO,1,0,"ng-container",11),m()),t&2){let e=d();G(e.cx("contentStart")),_("pBind",e.ptm("contentStart")),l(),_("ngTemplateOutlet",e.templateLeft)("ngTemplateOutletContext",Pe(5,ps,e.paginatorState))}}function jO(t,i){if(t&1&&(h(0,"span",10),v(1),m()),t&2){let e=d();G(e.cx("current")),_("pBind",e.ptm("current")),l(),C(e.currentPageReport)}}function UO(t,i){if(t&1&&(X(),F(0,"svg",14)),t&2){let e=d(2);G(e.cx("firstIcon")),_("pBind",e.ptm("firstIcon"))}}function $O(t,i){}function WO(t,i){t&1&&P(0,$O,0,0,"ng-template")}function KO(t,i){if(t&1&&(h(0,"span"),P(1,WO,1,0,null,15),m()),t&2){let e=d(2);G(e.cx("firstIcon")),l(),_("ngTemplateOutlet",e.firstPageLinkIconTemplate||e._firstPageLinkIconTemplate)}}function YO(t,i){if(t&1){let e=$();h(0,"button",12),N("click",function(o){w(e);let r=d();return T(r.changePageToFirst(o))}),P(1,UO,1,3,"svg",13)(2,KO,2,3,"span",4),m()}if(t&2){let e=d();G(e.cx("first")),_("pBind",e.ptm("first")),O("aria-label",e.getAriaLabel("firstPageLabel")),l(),_("ngIf",!e.firstPageLinkIconTemplate&&!e._firstPageLinkIconTemplate),l(),_("ngIf",e.firstPageLinkIconTemplate||e._firstPageLinkIconTemplate)}}function XO(t,i){if(t&1&&(X(),F(0,"svg",16)),t&2){let e=d();G(e.cx("prevIcon")),_("pBind",e.ptm("prevIcon"))}}function ZO(t,i){}function QO(t,i){t&1&&P(0,ZO,0,0,"ng-template")}function JO(t,i){if(t&1&&(h(0,"span"),P(1,QO,1,0,null,15),m()),t&2){let e=d();G(e.cx("prevIcon")),l(),_("ngTemplateOutlet",e.previousPageLinkIconTemplate||e._previousPageLinkIconTemplate)}}function eF(t,i){if(t&1){let e=$();h(0,"button",12),N("click",function(o){let r=w(e).$implicit,a=d(2);return T(a.onPageLinkClick(o,r-1))}),v(1),m()}if(t&2){let e=i.$implicit,n=d(2);G(n.cx("page",Pe(6,HO,e))),_("pBind",n.ptm("page")),O("aria-label",n.getPageAriaLabel(e))("aria-current",e-1==n.getPage()?"page":void 0),l(),be(" ",n.getLocalization(e)," ")}}function tF(t,i){if(t&1&&(h(0,"span",10),P(1,eF,2,8,"button",17),m()),t&2){let e=d();G(e.cx("pages")),_("pBind",e.ptm("pages")),l(),_("ngForOf",e.pageLinks)}}function nF(t,i){if(t&1&&v(0),t&2){let e=d(2);C(e.currentPageReport)}}function iF(t,i){t&1&&le(0)}function oF(t,i){if(t&1&&P(0,iF,1,0,"ng-container",11),t&2){let e=i.$implicit,n=d(3);_("ngTemplateOutlet",n.jumpToPageItemTemplate)("ngTemplateOutletContext",Pe(2,ps,e))}}function rF(t,i){t&1&&(Te(0),P(1,oF,1,4,"ng-template",21),Se())}function aF(t,i){t&1&&le(0)}function sF(t,i){if(t&1&&P(0,aF,1,0,"ng-container",15),t&2){let e=d(3);_("ngTemplateOutlet",e.dropdownIconTemplate||e._dropdownIconTemplate)}}function lF(t,i){t&1&&P(0,sF,1,1,"ng-template",22)}function cF(t,i){if(t&1){let e=$();h(0,"p-select",18),N("onChange",function(o){w(e);let r=d();return T(r.onPageDropdownChange(o))}),P(1,nF,1,1,"ng-template",19)(2,rF,2,0,"ng-container",20)(3,lF,1,0,null,20),m()}if(t&2){let e=d();_("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),_("ngIf",e.jumpToPageItemTemplate),l(),_("ngIf",e.dropdownIconTemplate||e._dropdownIconTemplate)}}function dF(t,i){if(t&1&&(X(),F(0,"svg",23)),t&2){let e=d();G(e.cx("nextIcon")),_("pBind",e.ptm("nextIcon"))}}function uF(t,i){}function pF(t,i){t&1&&P(0,uF,0,0,"ng-template")}function hF(t,i){if(t&1&&(h(0,"span"),P(1,pF,1,0,null,15),m()),t&2){let e=d();G(e.cx("nextIcon")),l(),_("ngTemplateOutlet",e.nextPageLinkIconTemplate||e._nextPageLinkIconTemplate)}}function fF(t,i){if(t&1&&(X(),F(0,"svg",25)),t&2){let e=d(2);G(e.cx("lastIcon")),_("pBind",e.ptm("lastIcon"))}}function mF(t,i){}function _F(t,i){t&1&&P(0,mF,0,0,"ng-template")}function gF(t,i){if(t&1&&(h(0,"span"),P(1,_F,1,0,null,15),m()),t&2){let e=d(2);G(e.cx("lastIcon")),l(),_("ngTemplateOutlet",e.lastPageLinkIconTemplate||e._lastPageLinkIconTemplate)}}function vF(t,i){if(t&1){let e=$();h(0,"button",2),N("click",function(o){w(e);let r=d();return T(r.changePageToLast(o))}),P(1,fF,1,3,"svg",24)(2,gF,2,3,"span",4),m()}if(t&2){let e=d();G(e.cx("last")),_("pBind",e.ptm("last"))("disabled",e.isLastPage()||e.empty()),O("aria-label",e.getAriaLabel("lastPageLabel")),l(),_("ngIf",!e.lastPageLinkIconTemplate&&!e._lastPageLinkIconTemplate),l(),_("ngIf",e.lastPageLinkIconTemplate||e._lastPageLinkIconTemplate)}}function bF(t,i){if(t&1){let e=$();h(0,"p-inputnumber",26),N("ngModelChange",function(o){w(e);let r=d();return T(r.changePage(o-1))}),m()}if(t&2){let e=d();G(e.cx("pcJumpToPageInput")),_("pt",e.ptm("pcJumpToPageInput"))("ngModel",e.currentPage())("disabled",e.empty())("unstyled",e.unstyled())}}function yF(t,i){t&1&&le(0)}function CF(t,i){if(t&1&&P(0,yF,1,0,"ng-container",11),t&2){let e=i.$implicit,n=d(3);_("ngTemplateOutlet",n.dropdownItemTemplate)("ngTemplateOutletContext",Pe(2,ps,e))}}function xF(t,i){t&1&&(Te(0),P(1,CF,1,4,"ng-template",21),Se())}function wF(t,i){t&1&&le(0)}function TF(t,i){if(t&1&&P(0,wF,1,0,"ng-container",15),t&2){let e=d(3);_("ngTemplateOutlet",e.dropdownIconTemplate||e._dropdownIconTemplate)}}function SF(t,i){t&1&&P(0,TF,1,1,"ng-template",22)}function kF(t,i){if(t&1){let e=$();h(0,"p-select",27),rr("ngModelChange",function(o){w(e);let r=d();return or(r.rows,o)||(r.rows=o),T(o)}),N("onChange",function(o){w(e);let r=d();return T(r.onRppChange(o))}),P(1,xF,2,0,"ng-container",20)(2,SF,1,0,null,20),m()}if(t&2){let e=d();_("options",e.rowsPerPageItems),ir("ngModel",e.rows),_("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(),_("ngIf",e.dropdownItemTemplate),l(),_("ngIf",e.dropdownIconTemplate||e._dropdownIconTemplate)}}function IF(t,i){t&1&&le(0)}function MF(t,i){if(t&1&&(h(0,"div",10),P(1,IF,1,0,"ng-container",11),m()),t&2){let e=d();G(e.cx("contentEnd")),_("pBind",e.ptm("contentEnd")),l(),_("ngTemplateOutlet",e.templateRight)("ngTemplateOutletContext",Pe(5,ps,e.paginatorState))}}var EF={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:i})=>["p-paginator-page",{"p-paginator-page-selected":i-1==t.getPage()}],current:"p-paginator-current",pcRowPerPageDropdown:"p-paginator-rpp-dropdown",pcJumpToPageDropdown:"p-paginator-jtp-dropdown",pcJumpToPageInput:"p-paginator-jtp-input"},lb=(()=>{class t extends en{name="paginator";style=sb;classes=EF;static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})();var cb=new ve("PAGINATOR_INSTANCE"),Hf=(()=>{class t extends On{componentName="Paginator";bindDirectiveInstance=p(Ae,{self:!0});$pcPaginator=p(cb,{optional:!0,skipSelf:!0})??void 0;onAfterViewChecked(){this.bindDirectiveInstance.setAttrs(this.ptms(["host","root"]))}pageLinkSize=5;styleClass;alwaysShow=!0;dropdownAppendTo;templateLeft;templateRight;dropdownScrollHeight="200px";currentPageReportTemplate="{currentPage} of {totalPages}";showCurrentPageReport;showFirstLastIcon=!0;totalRecords=0;rows=0;rowsPerPageOptions;showJumpToPageDropdown;showJumpToPageInput;jumpToPageItemTemplate;showPageLinks=!0;locale;dropdownItemTemplate;get first(){return this._first}set first(e){this._first=e}appendTo=B(void 0);onPageChange=new re;dropdownIconTemplate;firstPageLinkIconTemplate;previousPageLinkIconTemplate;lastPageLinkIconTemplate;nextPageLinkIconTemplate;templates;_dropdownIconTemplate;_firstPageLinkIconTemplate;_previousPageLinkIconTemplate;_lastPageLinkIconTemplate;_nextPageLinkIconTemplate;pageLinks;pageItems;rowsPerPageItems;paginatorState;_first=0;_page=0;_componentStyle=p(lb);$appendTo=S(()=>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(),o=new Map(n.map((r,a)=>[a,r]));return e>9?String(e).split("").map(a=>o.get(Number(a))).join(""):o.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),o=Math.max(0,Math.ceil(this.getPage()-n/2)),r=Math.min(e-1,o+n-1);var a=this.pageLinkSize-(r-o+1);return o=Math.max(0,o-a),[o,r]}updatePageLinks(){this.pageLinks=[];let e=this.calculatePageLinkBoundaries(),n=e[0],o=e[1];for(let r=n;r<=o;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 o={page:e,first:this.first,rows:this.rows,pageCount:n};this.updatePageLinks(),this.onPageChange.emit(o),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,o,r){if(n&1&&Hn(r,AO,4)(r,LO,4)(r,BO,4)(r,VO,4)(r,zO,4)(r,Pt,4),n&2){let a;ee(a=te())&&(o.dropdownIconTemplate=a.first),ee(a=te())&&(o.firstPageLinkIconTemplate=a.first),ee(a=te())&&(o.previousPageLinkIconTemplate=a.first),ee(a=te())&&(o.lastPageLinkIconTemplate=a.first),ee(a=te())&&(o.nextPageLinkIconTemplate=a.first),ee(a=te())&&(o.templates=a)}},hostVars:4,hostBindings:function(n,o){n&2&&(G(o.cn(o.cx("paginator"),o.styleClass)),Oe("display",o.display))},inputs:{pageLinkSize:[2,"pageLinkSize","pageLinkSize",Me],styleClass:"styleClass",alwaysShow:[2,"alwaysShow","alwaysShow",Y],dropdownAppendTo:"dropdownAppendTo",templateLeft:"templateLeft",templateRight:"templateRight",dropdownScrollHeight:"dropdownScrollHeight",currentPageReportTemplate:"currentPageReportTemplate",showCurrentPageReport:[2,"showCurrentPageReport","showCurrentPageReport",Y],showFirstLastIcon:[2,"showFirstLastIcon","showFirstLastIcon",Y],totalRecords:[2,"totalRecords","totalRecords",Me],rows:[2,"rows","rows",Me],rowsPerPageOptions:"rowsPerPageOptions",showJumpToPageDropdown:[2,"showJumpToPageDropdown","showJumpToPageDropdown",Y],showJumpToPageInput:[2,"showJumpToPageInput","showJumpToPageInput",Y],jumpToPageItemTemplate:"jumpToPageItemTemplate",showPageLinks:[2,"showPageLinks","showPageLinks",Y],locale:"locale",dropdownItemTemplate:"dropdownItemTemplate",first:"first",appendTo:[1,"appendTo"]},outputs:{onPageChange:"onPageChange"},features:[Ee([lb,{provide:cb,useExisting:t},{provide:tn,useExisting:t}]),Zt([Ae]),Q],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,o){n&1&&(P(0,GO,2,7,"div",0)(1,jO,2,4,"span",0)(2,YO,3,6,"button",1),h(3,"button",2),N("click",function(a){return o.changePageToPrev(a)}),P(4,XO,1,3,"svg",3)(5,JO,2,3,"span",4),m(),P(6,tF,2,4,"span",0)(7,cF,4,11,"p-select",5),h(8,"button",2),N("click",function(a){return o.changePageToNext(a)}),P(9,dF,1,3,"svg",6)(10,hF,2,3,"span",4),m(),P(11,vF,3,7,"button",7)(12,bF,1,6,"p-inputnumber",8)(13,kF,3,11,"p-select",9)(14,MF,2,7,"div",0)),n&2&&(_("ngIf",o.templateLeft),l(),_("ngIf",o.showCurrentPageReport),l(),_("ngIf",o.showFirstLastIcon),l(),G(o.cx("prev")),_("pBind",o.ptm("prev"))("disabled",o.isFirstPage()||o.empty()),O("aria-label",o.getAriaLabel("prevPageLabel")),l(),_("ngIf",!o.previousPageLinkIconTemplate&&!o._previousPageLinkIconTemplate),l(),_("ngIf",o.previousPageLinkIconTemplate||o._previousPageLinkIconTemplate),l(),_("ngIf",o.showPageLinks),l(),_("ngIf",o.showJumpToPageDropdown),l(),G(o.cx("next")),_("pBind",o.ptm("next"))("disabled",o.isLastPage()||o.empty()),O("aria-label",o.getAriaLabel("nextPageLabel")),l(),_("ngIf",!o.nextPageLinkIconTemplate&&!o._nextPageLinkIconTemplate),l(),_("ngIf",o.nextPageLinkIconTemplate||o._nextPageLinkIconTemplate),l(),_("ngIf",o.showFirstLastIcon),l(),_("ngIf",o.showJumpToPageInput),l(),_("ngIf",o.rowsPerPageOptions),l(),_("ngIf",o.templateRight))},dependencies:[Dt,no,xi,hn,uv,lv,yt,Rt,Ot,as,Vv,zv,Hv,qv,ot,Pt,Ae],encapsulation:2,changeDetection:0})}return t})(),db=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=Mt({type:t});static \u0275inj=It({imports:[Hf,ot,ot]})}return t})();var ub=`
1189
+ .p-radiobutton {
1190
+ position: relative;
1191
+ display: inline-flex;
1192
+ user-select: none;
1193
+ vertical-align: bottom;
1194
+ width: dt('radiobutton.width');
1195
+ height: dt('radiobutton.height');
1196
+ }
1197
+
1198
+ .p-radiobutton-input {
1199
+ cursor: pointer;
1200
+ appearance: none;
1201
+ position: absolute;
1202
+ top: 0;
1203
+ inset-inline-start: 0;
1204
+ width: 100%;
1205
+ height: 100%;
1206
+ padding: 0;
1207
+ margin: 0;
1208
+ opacity: 0;
1209
+ z-index: 1;
1210
+ outline: 0 none;
1211
+ border: 1px solid transparent;
1212
+ border-radius: 50%;
1213
+ }
1214
+
1215
+ .p-radiobutton-box {
1216
+ display: flex;
1217
+ justify-content: center;
1218
+ align-items: center;
1219
+ border-radius: 50%;
1220
+ border: 1px solid dt('radiobutton.border.color');
1221
+ background: dt('radiobutton.background');
1222
+ width: dt('radiobutton.width');
1223
+ height: dt('radiobutton.height');
1224
+ transition:
1225
+ background dt('radiobutton.transition.duration'),
1226
+ color dt('radiobutton.transition.duration'),
1227
+ border-color dt('radiobutton.transition.duration'),
1228
+ box-shadow dt('radiobutton.transition.duration'),
1229
+ outline-color dt('radiobutton.transition.duration');
1230
+ outline-color: transparent;
1231
+ box-shadow: dt('radiobutton.shadow');
1232
+ }
1233
+
1234
+ .p-radiobutton-icon {
1235
+ transition-duration: dt('radiobutton.transition.duration');
1236
+ background: transparent;
1237
+ font-size: dt('radiobutton.icon.size');
1238
+ width: dt('radiobutton.icon.size');
1239
+ height: dt('radiobutton.icon.size');
1240
+ border-radius: 50%;
1241
+ backface-visibility: hidden;
1242
+ transform: translateZ(0) scale(0.1);
1243
+ }
1244
+
1245
+ .p-radiobutton:not(.p-disabled):has(.p-radiobutton-input:hover) .p-radiobutton-box {
1246
+ border-color: dt('radiobutton.hover.border.color');
1247
+ }
1248
+
1249
+ .p-radiobutton-checked .p-radiobutton-box {
1250
+ border-color: dt('radiobutton.checked.border.color');
1251
+ background: dt('radiobutton.checked.background');
1252
+ }
1253
+
1254
+ .p-radiobutton-checked .p-radiobutton-box .p-radiobutton-icon {
1255
+ background: dt('radiobutton.icon.checked.color');
1256
+ transform: translateZ(0) scale(1, 1);
1257
+ visibility: visible;
1258
+ }
1259
+
1260
+ .p-radiobutton-checked:not(.p-disabled):has(.p-radiobutton-input:hover) .p-radiobutton-box {
1261
+ border-color: dt('radiobutton.checked.hover.border.color');
1262
+ background: dt('radiobutton.checked.hover.background');
1263
+ }
1264
+
1265
+ .p-radiobutton:not(.p-disabled):has(.p-radiobutton-input:hover).p-radiobutton-checked .p-radiobutton-box .p-radiobutton-icon {
1266
+ background: dt('radiobutton.icon.checked.hover.color');
1267
+ }
1268
+
1269
+ .p-radiobutton:not(.p-disabled):has(.p-radiobutton-input:focus-visible) .p-radiobutton-box {
1270
+ border-color: dt('radiobutton.focus.border.color');
1271
+ box-shadow: dt('radiobutton.focus.ring.shadow');
1272
+ outline: dt('radiobutton.focus.ring.width') dt('radiobutton.focus.ring.style') dt('radiobutton.focus.ring.color');
1273
+ outline-offset: dt('radiobutton.focus.ring.offset');
1274
+ }
1275
+
1276
+ .p-radiobutton-checked:not(.p-disabled):has(.p-radiobutton-input:focus-visible) .p-radiobutton-box {
1277
+ border-color: dt('radiobutton.checked.focus.border.color');
1278
+ }
1279
+
1280
+ .p-radiobutton.p-invalid > .p-radiobutton-box {
1281
+ border-color: dt('radiobutton.invalid.border.color');
1282
+ }
1283
+
1284
+ .p-radiobutton.p-variant-filled .p-radiobutton-box {
1285
+ background: dt('radiobutton.filled.background');
1286
+ }
1287
+
1288
+ .p-radiobutton.p-variant-filled.p-radiobutton-checked .p-radiobutton-box {
1289
+ background: dt('radiobutton.checked.background');
1290
+ }
1291
+
1292
+ .p-radiobutton.p-variant-filled:not(.p-disabled):has(.p-radiobutton-input:hover).p-radiobutton-checked .p-radiobutton-box {
1293
+ background: dt('radiobutton.checked.hover.background');
1294
+ }
1295
+
1296
+ .p-radiobutton.p-disabled {
1297
+ opacity: 1;
1298
+ }
1299
+
1300
+ .p-radiobutton.p-disabled .p-radiobutton-box {
1301
+ background: dt('radiobutton.disabled.background');
1302
+ border-color: dt('radiobutton.checked.disabled.border.color');
1303
+ }
1304
+
1305
+ .p-radiobutton-checked.p-disabled .p-radiobutton-box .p-radiobutton-icon {
1306
+ background: dt('radiobutton.icon.disabled.color');
1307
+ }
1308
+
1309
+ .p-radiobutton-sm,
1310
+ .p-radiobutton-sm .p-radiobutton-box {
1311
+ width: dt('radiobutton.sm.width');
1312
+ height: dt('radiobutton.sm.height');
1313
+ }
1314
+
1315
+ .p-radiobutton-sm .p-radiobutton-icon {
1316
+ font-size: dt('radiobutton.icon.sm.size');
1317
+ width: dt('radiobutton.icon.sm.size');
1318
+ height: dt('radiobutton.icon.sm.size');
1319
+ }
1320
+
1321
+ .p-radiobutton-lg,
1322
+ .p-radiobutton-lg .p-radiobutton-box {
1323
+ width: dt('radiobutton.lg.width');
1324
+ height: dt('radiobutton.lg.height');
1325
+ }
1326
+
1327
+ .p-radiobutton-lg .p-radiobutton-icon {
1328
+ font-size: dt('radiobutton.icon.lg.size');
1329
+ width: dt('radiobutton.icon.lg.size');
1330
+ height: dt('radiobutton.icon.lg.size');
1331
+ }
1332
+ `;var PF=["input"],RF=`
1333
+ ${ub}
1334
+
1335
+ /* For PrimeNG */
1336
+ p-radioButton.ng-invalid.ng-dirty .p-radiobutton-box,
1337
+ p-radio-button.ng-invalid.ng-dirty .p-radiobutton-box,
1338
+ p-radiobutton.ng-invalid.ng-dirty .p-radiobutton-box {
1339
+ border-color: dt('radiobutton.invalid.border.color');
1340
+ }
1341
+ `,OF={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"},pb=(()=>{class t extends en{name="radiobutton";style=RF;classes=OF;static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})();var hb=new ve("RADIOBUTTON_INSTANCE"),FF={provide:es,useExisting:Zi(()=>fb),multi:!0},NF=(()=>{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})(),fb=(()=>{class t extends iv{componentName="RadioButton";$pcRadioButton=p(hb,{optional:!0,skipSelf:!0})??void 0;bindDirectiveInstance=p(Ae,{self:!0});onAfterViewChecked(){this.bindDirectiveInstance.setAttrs(this.ptms(["host","root"]))}value;tabindex;inputId;ariaLabelledBy;ariaLabel;styleClass;autofocus;binary;variant=B();size=B();onClick=new re;onFocus=new re;onBlur=new re;inputViewChild;$variant=S(()=>this.variant()||this.config.inputStyle()||this.config.inputVariant());checked;focused;control;_componentStyle=p(pb);injector=p(mt);registry=p(NF);onInit(){this.control=this.injector.get(z0),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(o){return(e||(e=U(t)))(o||t)}})();static \u0275cmp=z({type:t,selectors:[["p-radioButton"],["p-radiobutton"],["p-radio-button"]],viewQuery:function(n,o){if(n&1&&to(PF,5),n&2){let r;ee(r=te())&&(o.inputViewChild=r.first)}},hostVars:5,hostBindings:function(n,o){n&2&&(O("data-p-disabled",o.$disabled())("data-p-checked",o.checked)("data-p",o.dataP),G(o.cx("root")))},inputs:{value:"value",tabindex:[2,"tabindex","tabindex",Me],inputId:"inputId",ariaLabelledBy:"ariaLabelledBy",ariaLabel:"ariaLabel",styleClass:"styleClass",autofocus:[2,"autofocus","autofocus",Y],binary:[2,"binary","binary",Y],variant:[1,"variant"],size:[1,"size"]},outputs:{onClick:"onClick",onFocus:"onFocus",onBlur:"onBlur"},features:[Ee([FF,pb,{provide:hb,useExisting:t},{provide:tn,useExisting:t}]),Zt([Ae]),Q],decls:4,vars:20,consts:[["input",""],["type","radio",3,"focus","blur","change","checked","pAutoFocus","pBind"],[3,"pBind"]],template:function(n,o){n&1&&(h(0,"input",1,0),N("focus",function(a){return o.onInputFocus(a)})("blur",function(a){return o.onInputBlur(a)})("change",function(a){return o.onChange(a)}),m(),h(2,"div",2),F(3,"div",2),m()),n&2&&(G(o.cx("input")),_("checked",o.checked)("pAutoFocus",o.autofocus)("pBind",o.ptm("input")),O("id",o.inputId)("name",o.name())("required",o.required()?"":void 0)("disabled",o.$disabled()?"":void 0)("value",o.modelValue())("aria-labelledby",o.ariaLabelledBy)("aria-label",o.ariaLabel)("aria-checked",o.checked)("tabindex",o.tabindex),l(2),G(o.cx("box")),_("pBind",o.ptm("box")),l(),G(o.cx("icon")),_("pBind",o.ptm("icon")))},dependencies:[Dt,rs,ot,ro,Ae],encapsulation:2,changeDetection:0})}return t})(),mb=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=Mt({type:t});static \u0275inj=It({imports:[fb,ot,ot]})}return t})();var AF=["header"],LF=["headergrouped"],BF=["body"],VF=["loadingbody"],zF=["caption"],HF=["footer"],qF=["footergrouped"],GF=["summary"],jF=["colgroup"],UF=["expandedrow"],$F=["groupheader"],WF=["groupfooter"],KF=["frozenexpandedrow"],YF=["frozenheader"],XF=["frozenbody"],ZF=["frozenfooter"],QF=["frozencolgroup"],JF=["emptymessage"],eN=["paginatorleft"],tN=["paginatorright"],nN=["paginatordropdownitem"],iN=["loadingicon"],oN=["reorderindicatorupicon"],rN=["reorderindicatordownicon"],aN=["sorticon"],sN=["checkboxicon"],lN=["headercheckboxicon"],cN=["paginatordropdownicon"],dN=["paginatorfirstpagelinkicon"],uN=["paginatorlastpagelinkicon"],pN=["paginatorpreviouspagelinkicon"],hN=["paginatornextpagelinkicon"],fN=["resizeHelper"],mN=["reorderIndicatorUp"],_N=["reorderIndicatorDown"],gN=["wrapper"],vN=["table"],bN=["thead"],yN=["tfoot"],CN=["scroller"],xN=t=>({height:t}),_b=(t,i)=>({$implicit:t,options:i}),wN=t=>({columns:t}),qf=t=>({$implicit:t});function TN(t,i){if(t&1&&F(0,"i",17),t&2){let e=d(2);G(e.cn(e.cx("loadingIcon"),e.loadingIcon)),_("pBind",e.ptm("loadingIcon"))}}function SN(t,i){if(t&1&&(X(),F(0,"svg",19)),t&2){let e=d(3);G(e.cx("loadingIcon")),_("spin",!0)("pBind",e.ptm("loadingIcon"))}}function kN(t,i){}function IN(t,i){t&1&&P(0,kN,0,0,"ng-template")}function MN(t,i){if(t&1&&(h(0,"span",17),P(1,IN,1,0,null,20),m()),t&2){let e=d(3);G(e.cx("loadingIcon")),_("pBind",e.ptm("loadingIcon")),l(),_("ngTemplateOutlet",e.loadingIconTemplate||e._loadingIconTemplate)}}function EN(t,i){if(t&1&&(Te(0),P(1,SN,1,4,"svg",18)(2,MN,2,4,"span",10),Se()),t&2){let e=d(2);l(),_("ngIf",!e.loadingIconTemplate&&!e._loadingIconTemplate),l(),_("ngIf",e.loadingIconTemplate||e._loadingIconTemplate)}}function DN(t,i){if(t&1&&(h(0,"div",17),k0("p-overlay-mask-leave-active"),S0("p-overlay-mask-enter-active"),P(1,TN,1,3,"i",10)(2,EN,3,2,"ng-container",14),m()),t&2){let e=d();G(e.cx("mask")),_("pBind",e.ptm("mask")),l(),_("ngIf",e.loadingIcon),l(),_("ngIf",!e.loadingIcon)}}function PN(t,i){t&1&&le(0)}function RN(t,i){if(t&1&&(h(0,"div",17),P(1,PN,1,0,"ng-container",20),m()),t&2){let e=d();G(e.cx("header")),_("pBind",e.ptm("header")),l(),_("ngTemplateOutlet",e.captionTemplate||e._captionTemplate)}}function ON(t,i){t&1&&le(0)}function FN(t,i){if(t&1&&P(0,ON,1,0,"ng-container",20),t&2){let e=d(3);_("ngTemplateOutlet",e.paginatorDropdownIconTemplate||e._paginatorDropdownIconTemplate)}}function NN(t,i){t&1&&P(0,FN,1,1,"ng-template",22)}function AN(t,i){t&1&&le(0)}function LN(t,i){if(t&1&&P(0,AN,1,0,"ng-container",20),t&2){let e=d(3);_("ngTemplateOutlet",e.paginatorFirstPageLinkIconTemplate||e._paginatorFirstPageLinkIconTemplate)}}function BN(t,i){t&1&&P(0,LN,1,1,"ng-template",23)}function VN(t,i){t&1&&le(0)}function zN(t,i){if(t&1&&P(0,VN,1,0,"ng-container",20),t&2){let e=d(3);_("ngTemplateOutlet",e.paginatorPreviousPageLinkIconTemplate||e._paginatorPreviousPageLinkIconTemplate)}}function HN(t,i){t&1&&P(0,zN,1,1,"ng-template",24)}function qN(t,i){t&1&&le(0)}function GN(t,i){if(t&1&&P(0,qN,1,0,"ng-container",20),t&2){let e=d(3);_("ngTemplateOutlet",e.paginatorLastPageLinkIconTemplate||e._paginatorLastPageLinkIconTemplate)}}function jN(t,i){t&1&&P(0,GN,1,1,"ng-template",25)}function UN(t,i){t&1&&le(0)}function $N(t,i){if(t&1&&P(0,UN,1,0,"ng-container",20),t&2){let e=d(3);_("ngTemplateOutlet",e.paginatorNextPageLinkIconTemplate||e._paginatorNextPageLinkIconTemplate)}}function WN(t,i){t&1&&P(0,$N,1,1,"ng-template",26)}function KN(t,i){if(t&1){let e=$();h(0,"p-paginator",21),N("onPageChange",function(o){w(e);let r=d();return T(r.onPageChange(o))}),P(1,NN,1,0,null,14)(2,BN,1,0,null,14)(3,HN,1,0,null,14)(4,jN,1,0,null,14)(5,WN,1,0,null,14),m()}if(t&2){let e=d();_("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(),_("ngIf",e.paginatorDropdownIconTemplate||e._paginatorDropdownIconTemplate),l(),_("ngIf",e.paginatorFirstPageLinkIconTemplate||e._paginatorFirstPageLinkIconTemplate),l(),_("ngIf",e.paginatorPreviousPageLinkIconTemplate||e._paginatorPreviousPageLinkIconTemplate),l(),_("ngIf",e.paginatorLastPageLinkIconTemplate||e._paginatorLastPageLinkIconTemplate),l(),_("ngIf",e.paginatorNextPageLinkIconTemplate||e._paginatorNextPageLinkIconTemplate)}}function YN(t,i){t&1&&le(0)}function XN(t,i){if(t&1&&P(0,YN,1,0,"ng-container",28),t&2){let e=i.$implicit,n=i.options;d(2);let o=gt(8);_("ngTemplateOutlet",o)("ngTemplateOutletContext",qn(2,_b,e,n))}}function ZN(t,i){if(t&1){let e=$();h(0,"p-scroller",27,2),N("onLazyLoad",function(o){w(e);let r=d();return T(r.onLazyItemLoad(o))}),P(2,XN,1,5,"ng-template",null,3,$e),m()}if(t&2){let e=d();zt(Pe(16,xN,e.scrollHeight!=="flex"?e.scrollHeight:void 0)),_("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 QN(t,i){t&1&&le(0)}function JN(t,i){if(t&1&&(Te(0),P(1,QN,1,0,"ng-container",28),Se()),t&2){let e=d(),n=gt(8);l(),_("ngTemplateOutlet",n)("ngTemplateOutletContext",qn(4,_b,e.processedData,Pe(2,wN,e.columns)))}}function e4(t,i){t&1&&le(0)}function t4(t,i){t&1&&le(0)}function n4(t,i){if(t&1&&F(0,"tbody",35),t&2){let e=d().options,n=d();G(n.cx("tbody")),_("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 i4(t,i){if(t&1&&F(0,"tbody",36),t&2){let e=d().options,n=d();zt("height: calc("+e.spacerStyle.height+" - "+e.rows.length*e.itemSize+"px);"),G(n.cx("virtualScrollerSpacer")),_("pBind",n.ptm("virtualScrollerSpacer"))}}function o4(t,i){t&1&&le(0)}function r4(t,i){if(t&1&&(h(0,"tfoot",37,6),P(2,o4,1,0,"ng-container",28),m()),t&2){let e=d().options,n=d();_("ngClass",n.cx("footer"))("ngStyle",n.sx("tfoot"))("pBind",n.ptm("tfoot")),l(2),_("ngTemplateOutlet",n.footerGroupedTemplate||n.footerTemplate||n._footerTemplate||n._footerGroupedTemplate)("ngTemplateOutletContext",Pe(5,qf,e.columns))}}function a4(t,i){if(t&1&&(h(0,"table",29,4),P(2,e4,1,0,"ng-container",28),h(3,"thead",30,5),P(5,t4,1,0,"ng-container",28),m(),P(6,n4,1,10,"tbody",31),F(7,"tbody",32),P(8,i4,1,5,"tbody",33)(9,r4,3,7,"tfoot",34),m()),t&2){let e=i.options,n=d();zt(n.tableStyle),G(n.cn(n.cx("table"),n.tableStyleClass)),_("pBind",n.ptm("table")),O("id",n.id+"-table"),l(2),_("ngTemplateOutlet",n.colGroupTemplate||n._colGroupTemplate)("ngTemplateOutletContext",Pe(28,qf,e.columns)),l(),G(n.cx("thead")),_("ngStyle",n.sx("thead"))("pBind",n.ptm("thead")),l(2),_("ngTemplateOutlet",n.headerGroupedTemplate||n.headerTemplate||n._headerTemplate)("ngTemplateOutletContext",Pe(30,qf,e.columns)),l(),_("ngIf",n.frozenValue||n.frozenBodyTemplate||n._frozenBodyTemplate),l(),zt(e.contentStyle),G(n.cx("tbody",e.contentStyleClass)),_("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(),_("ngIf",e.spacerStyle),l(),_("ngIf",n.footerGroupedTemplate||n.footerTemplate||n._footerTemplate||n._footerGroupedTemplate)}}function s4(t,i){t&1&&le(0)}function l4(t,i){if(t&1&&P(0,s4,1,0,"ng-container",20),t&2){let e=d(3);_("ngTemplateOutlet",e.paginatorDropdownIconTemplate||e._paginatorDropdownIconTemplate)}}function c4(t,i){t&1&&P(0,l4,1,1,"ng-template",22)}function d4(t,i){t&1&&le(0)}function u4(t,i){if(t&1&&P(0,d4,1,0,"ng-container",20),t&2){let e=d(3);_("ngTemplateOutlet",e.paginatorFirstPageLinkIconTemplate||e._paginatorFirstPageLinkIconTemplate)}}function p4(t,i){t&1&&P(0,u4,1,1,"ng-template",23)}function h4(t,i){t&1&&le(0)}function f4(t,i){if(t&1&&P(0,h4,1,0,"ng-container",20),t&2){let e=d(3);_("ngTemplateOutlet",e.paginatorPreviousPageLinkIconTemplate||e._paginatorPreviousPageLinkIconTemplate)}}function m4(t,i){t&1&&P(0,f4,1,1,"ng-template",24)}function _4(t,i){t&1&&le(0)}function g4(t,i){if(t&1&&P(0,_4,1,0,"ng-container",20),t&2){let e=d(3);_("ngTemplateOutlet",e.paginatorLastPageLinkIconTemplate||e._paginatorLastPageLinkIconTemplate)}}function v4(t,i){t&1&&P(0,g4,1,1,"ng-template",25)}function b4(t,i){t&1&&le(0)}function y4(t,i){if(t&1&&P(0,b4,1,0,"ng-container",20),t&2){let e=d(3);_("ngTemplateOutlet",e.paginatorNextPageLinkIconTemplate||e._paginatorNextPageLinkIconTemplate)}}function C4(t,i){t&1&&P(0,y4,1,1,"ng-template",26)}function x4(t,i){if(t&1){let e=$();h(0,"p-paginator",21),N("onPageChange",function(o){w(e);let r=d();return T(r.onPageChange(o))}),P(1,c4,1,0,null,14)(2,p4,1,0,null,14)(3,m4,1,0,null,14)(4,v4,1,0,null,14)(5,C4,1,0,null,14),m()}if(t&2){let e=d();_("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(),_("ngIf",e.paginatorDropdownIconTemplate||e._paginatorDropdownIconTemplate),l(),_("ngIf",e.paginatorFirstPageLinkIconTemplate||e._paginatorFirstPageLinkIconTemplate),l(),_("ngIf",e.paginatorPreviousPageLinkIconTemplate||e._paginatorPreviousPageLinkIconTemplate),l(),_("ngIf",e.paginatorLastPageLinkIconTemplate||e._paginatorLastPageLinkIconTemplate),l(),_("ngIf",e.paginatorNextPageLinkIconTemplate||e._paginatorNextPageLinkIconTemplate)}}function w4(t,i){t&1&&le(0)}function T4(t,i){if(t&1&&(h(0,"div",38),P(1,w4,1,0,"ng-container",20),m()),t&2){let e=d();_("ngClass",e.cx("footer"))("pBind",e.ptm("footer")),l(),_("ngTemplateOutlet",e.summaryTemplate||e._summaryTemplate)}}function S4(t,i){if(t&1&&F(0,"div",38,7),t&2){let e=d();Oe("display","none"),_("ngClass",e.cx("columnResizeIndicator"))("pBind",e.ptm("columnResizeIndicator"))}}function k4(t,i){if(t&1&&(X(),F(0,"svg",40)),t&2){let e=d(2);_("pBind",e.ptm("rowReorderIndicatorUp").icon)}}function I4(t,i){}function M4(t,i){t&1&&P(0,I4,0,0,"ng-template")}function E4(t,i){if(t&1&&(h(0,"span",38,8),P(2,k4,1,1,"svg",39)(3,M4,1,0,null,20),m()),t&2){let e=d();Oe("display","none"),_("ngClass",e.cx("rowReorderIndicatorUp"))("pBind",e.ptm("rowReorderIndicatorUp")),l(2),_("ngIf",!e.reorderIndicatorUpIconTemplate&&!e._reorderIndicatorUpIconTemplate),l(),_("ngTemplateOutlet",e.reorderIndicatorUpIconTemplate||e._reorderIndicatorUpIconTemplate)}}function D4(t,i){if(t&1&&(X(),F(0,"svg",42)),t&2){let e=d(2);_("pBind",e.ptm("rowReorderIndicatorDown").icon)}}function P4(t,i){}function R4(t,i){t&1&&P(0,P4,0,0,"ng-template")}function O4(t,i){if(t&1&&(h(0,"span",38,9),P(2,D4,1,1,"svg",41)(3,R4,1,0,null,20),m()),t&2){let e=d();Oe("display","none"),_("ngClass",e.cx("rowReorderIndicatorDown"))("pBind",e.ptm("rowReorderIndicatorDown")),l(2),_("ngIf",!e.reorderIndicatorDownIconTemplate&&!e._reorderIndicatorDownIconTemplate),l(),_("ngTemplateOutlet",e.reorderIndicatorDownIconTemplate||e._reorderIndicatorDownIconTemplate)}}var F4=["pTableBody",""],Uf=(t,i,e,n,o)=>({$implicit:t,rowIndex:i,columns:e,editing:n,frozen:o}),N4=(t,i,e,n,o,r,a)=>({$implicit:t,rowIndex:i,columns:e,editing:n,frozen:o,rowgroup:r,rowspan:a}),hs=(t,i,e,n,o,r)=>({$implicit:t,rowIndex:i,columns:e,expanded:n,editing:o,frozen:r}),gb=(t,i,e,n)=>({$implicit:t,rowIndex:i,columns:e,frozen:n}),vb=(t,i)=>({$implicit:t,frozen:i});function A4(t,i){t&1&&le(0)}function L4(t,i){if(t&1&&(Te(0,3),P(1,A4,1,0,"ng-container",4),Se()),t&2){let e=d(),n=e.$implicit,o=e.index,r=d(2);l(),_("ngTemplateOutlet",r.dataTable.groupHeaderTemplate||r.dataTable._groupHeaderTemplate)("ngTemplateOutletContext",$a(2,Uf,n,r.getRowIndex(o),r.columns,r.dataTable.editMode==="row"&&r.dataTable.isRowEditing(n),r.frozen))}}function B4(t,i){t&1&&le(0)}function V4(t,i){if(t&1&&(Te(0),P(1,B4,1,0,"ng-container",4),Se()),t&2){let e=d(),n=e.$implicit,o=e.index,r=d(2);l(),_("ngTemplateOutlet",n?r.template:r.dataTable.loadingBodyTemplate||r.dataTable._loadingBodyTemplate)("ngTemplateOutletContext",$a(2,Uf,n,r.getRowIndex(o),r.columns,r.dataTable.editMode==="row"&&r.dataTable.isRowEditing(n),r.frozen))}}function z4(t,i){t&1&&le(0)}function H4(t,i){if(t&1&&(Te(0),P(1,z4,1,0,"ng-container",4),Se()),t&2){let e=d(),n=e.$implicit,o=e.index,r=d(2);l(),_("ngTemplateOutlet",n?r.template:r.dataTable.loadingBodyTemplate||r.dataTable._loadingBodyTemplate)("ngTemplateOutletContext",E0(2,N4,n,r.getRowIndex(o),r.columns,r.dataTable.editMode==="row"&&r.dataTable.isRowEditing(n),r.frozen,r.shouldRenderRowspan(r.value,n,o),r.calculateRowGroupSize(r.value,n,o)))}}function q4(t,i){t&1&&le(0)}function G4(t,i){if(t&1&&(Te(0,3),P(1,q4,1,0,"ng-container",4),Se()),t&2){let e=d(),n=e.$implicit,o=e.index,r=d(2);l(),_("ngTemplateOutlet",r.dataTable.groupFooterTemplate||r.dataTable._groupFooterTemplate)("ngTemplateOutletContext",$a(2,Uf,n,r.getRowIndex(o),r.columns,r.dataTable.editMode==="row"&&r.dataTable.isRowEditing(n),r.frozen))}}function j4(t,i){if(t&1&&P(0,L4,2,8,"ng-container",2)(1,V4,2,8,"ng-container",0)(2,H4,2,10,"ng-container",0)(3,G4,2,8,"ng-container",2),t&2){let e=i.$implicit,n=i.index,o=d(2);_("ngIf",(o.dataTable.groupHeaderTemplate||o.dataTable._groupHeaderTemplate)&&!o.dataTable.virtualScroll&&o.dataTable.rowGroupMode==="subheader"&&o.shouldRenderRowGroupHeader(o.value,e,o.getRowIndex(n))),l(),_("ngIf",o.dataTable.rowGroupMode!=="rowspan"),l(),_("ngIf",o.dataTable.rowGroupMode==="rowspan"),l(),_("ngIf",(o.dataTable.groupFooterTemplate||o.dataTable._groupFooterTemplate)&&!o.dataTable.virtualScroll&&o.dataTable.rowGroupMode==="subheader"&&o.shouldRenderRowGroupFooter(o.value,e,o.getRowIndex(n)))}}function U4(t,i){if(t&1&&(Te(0),P(1,j4,4,4,"ng-template",1),Se()),t&2){let e=d();l(),_("ngForOf",e.value)("ngForTrackBy",e.dataTable.rowTrackBy)}}function $4(t,i){t&1&&le(0)}function W4(t,i){if(t&1&&(Te(0),P(1,$4,1,0,"ng-container",4),Se()),t&2){let e=d(),n=e.$implicit,o=e.index,r=d(2);l(),_("ngTemplateOutlet",r.template)("ngTemplateOutletContext",sr(2,hs,n,r.getRowIndex(o),r.columns,r.dataTable.isRowExpanded(n),r.dataTable.editMode==="row"&&r.dataTable.isRowEditing(n),r.frozen))}}function K4(t,i){t&1&&le(0)}function Y4(t,i){if(t&1&&(Te(0,3),P(1,K4,1,0,"ng-container",4),Se()),t&2){let e=d(),n=e.$implicit,o=e.index,r=d(2);l(),_("ngTemplateOutlet",r.dataTable.groupHeaderTemplate||r.dataTable._groupHeaderTemplate)("ngTemplateOutletContext",sr(2,hs,n,r.getRowIndex(o),r.columns,r.dataTable.isRowExpanded(n),r.dataTable.editMode==="row"&&r.dataTable.isRowEditing(n),r.frozen))}}function X4(t,i){t&1&&le(0)}function Z4(t,i){t&1&&le(0)}function Q4(t,i){if(t&1&&(Te(0,3),P(1,Z4,1,0,"ng-container",4),Se()),t&2){let e=d(2),n=e.$implicit,o=e.index,r=d(2);l(),_("ngTemplateOutlet",r.dataTable.groupFooterTemplate||r.dataTable._groupFooterTemplate)("ngTemplateOutletContext",sr(2,hs,n,r.getRowIndex(o),r.columns,r.dataTable.isRowExpanded(n),r.dataTable.editMode==="row"&&r.dataTable.isRowEditing(n),r.frozen))}}function J4(t,i){if(t&1&&(Te(0),P(1,X4,1,0,"ng-container",4)(2,Q4,2,9,"ng-container",2),Se()),t&2){let e=d(),n=e.$implicit,o=e.index,r=d(2);l(),_("ngTemplateOutlet",r.dataTable.expandedRowTemplate||r.dataTable._expandedRowTemplate)("ngTemplateOutletContext",wf(3,gb,n,r.getRowIndex(o),r.columns,r.frozen)),l(),_("ngIf",(r.dataTable.groupFooterTemplate||r.dataTable._groupFooterTemplate)&&r.dataTable.rowGroupMode==="subheader"&&r.shouldRenderRowGroupFooter(r.value,n,r.getRowIndex(o)))}}function eA(t,i){if(t&1&&P(0,W4,2,9,"ng-container",0)(1,Y4,2,9,"ng-container",2)(2,J4,3,8,"ng-container",0),t&2){let e=i.$implicit,n=i.index,o=d(2);_("ngIf",!(o.dataTable.groupHeaderTemplate&&o.dataTable._groupHeaderTemplate)),l(),_("ngIf",(o.dataTable.groupHeaderTemplate||o.dataTable._groupHeaderTemplate)&&o.dataTable.rowGroupMode==="subheader"&&o.shouldRenderRowGroupHeader(o.value,e,o.getRowIndex(n))),l(),_("ngIf",o.dataTable.isRowExpanded(e))}}function tA(t,i){if(t&1&&(Te(0),P(1,eA,3,3,"ng-template",1),Se()),t&2){let e=d();l(),_("ngForOf",e.value)("ngForTrackBy",e.dataTable.rowTrackBy)}}function nA(t,i){t&1&&le(0)}function iA(t,i){t&1&&le(0)}function oA(t,i){if(t&1&&(Te(0),P(1,iA,1,0,"ng-container",4),Se()),t&2){let e=d(),n=e.$implicit,o=e.index,r=d(2);l(),_("ngTemplateOutlet",r.dataTable.frozenExpandedRowTemplate||r.dataTable._frozenExpandedRowTemplate)("ngTemplateOutletContext",wf(2,gb,n,r.getRowIndex(o),r.columns,r.frozen))}}function rA(t,i){if(t&1&&P(0,nA,1,0,"ng-container",4)(1,oA,2,7,"ng-container",0),t&2){let e=i.$implicit,n=i.index,o=d(2);_("ngTemplateOutlet",o.template)("ngTemplateOutletContext",sr(3,hs,e,o.getRowIndex(n),o.columns,o.dataTable.isRowExpanded(e),o.dataTable.editMode==="row"&&o.dataTable.isRowEditing(e),o.frozen)),l(),_("ngIf",o.dataTable.isRowExpanded(e))}}function aA(t,i){if(t&1&&(Te(0),P(1,rA,2,10,"ng-template",1),Se()),t&2){let e=d();l(),_("ngForOf",e.value)("ngForTrackBy",e.dataTable.rowTrackBy)}}function sA(t,i){t&1&&le(0)}function lA(t,i){if(t&1&&(Te(0),P(1,sA,1,0,"ng-container",4),Se()),t&2){let e=d();l(),_("ngTemplateOutlet",e.dataTable.loadingBodyTemplate||e.dataTable._loadingBodyTemplate)("ngTemplateOutletContext",qn(2,vb,e.columns,e.frozen))}}function cA(t,i){t&1&&le(0)}function dA(t,i){if(t&1&&(Te(0),P(1,cA,1,0,"ng-container",4),Se()),t&2){let e=d();l(),_("ngTemplateOutlet",e.dataTable.emptyMessageTemplate||e.dataTable._emptyMessageTemplate)("ngTemplateOutletContext",qn(2,vb,e.columns,e.frozen))}}var uA=`
1342
+ ${Bv}
1343
+
1344
+ /* For PrimeNG */
1345
+ .p-datatable-scrollable-table > .p-datatable-thead {
1346
+ top: 0;
1347
+ z-index: 2;
1348
+ }
1349
+
1350
+ .p-datatable-scrollable-table > .p-datatable-frozen-tbody {
1351
+ position: sticky;
1352
+ z-index: 2;
1353
+ }
1354
+
1355
+ .p-datatable-scrollable-table > .p-datatable-frozen-tbody + .p-datatable-frozen-tbody {
1356
+ z-index: 1;
1357
+ }
1358
+
1359
+ .p-datatable-mask.p-overlay-mask {
1360
+ position: absolute;
1361
+ display: flex;
1362
+ align-items: center;
1363
+ justify-content: center;
1364
+ z-index: 3;
1365
+ }
1366
+
1367
+ .p-datatable-filter-overlay {
1368
+ position: absolute;
1369
+ background: dt('datatable.filter.overlay.select.background');
1370
+ color: dt('datatable.filter.overlay.select.color');
1371
+ border: 1px solid dt('datatable.filter.overlay.select.border.color');
1372
+ border-radius: dt('datatable.filter.overlay.select.border.radius');
1373
+ box-shadow: dt('datatable.filter.overlay.select.shadow');
1374
+ min-width: 12.5rem;
1375
+ }
1376
+
1377
+ .p-datatable-filter-rule {
1378
+ border-bottom: 1px solid dt('datatable.filter.rule.border.color');
1379
+ }
1380
+
1381
+ .p-datatable-filter-rule:last-child {
1382
+ border-bottom: 0 none;
1383
+ }
1384
+
1385
+ .p-datatable-filter-add-rule-button,
1386
+ .p-datatable-filter-remove-rule-button {
1387
+ width: 100%;
1388
+ }
1389
+
1390
+ .p-datatable-filter-remove-button {
1391
+ width: 100%;
1392
+ }
1393
+
1394
+ .p-datatable-thead > tr > th {
1395
+ padding: dt('datatable.header.cell.padding');
1396
+ background: dt('datatable.header.cell.background');
1397
+ border-color: dt('datatable.header.cell.border.color');
1398
+ border-style: solid;
1399
+ border-width: 0 0 1px 0;
1400
+ color: dt('datatable.header.cell.color');
1401
+ font-weight: dt('datatable.column.title.font.weight');
1402
+ text-align: start;
1403
+ transition:
1404
+ background dt('datatable.transition.duration'),
1405
+ color dt('datatable.transition.duration'),
1406
+ border-color dt('datatable.transition.duration'),
1407
+ outline-color dt('datatable.transition.duration'),
1408
+ box-shadow dt('datatable.transition.duration');
1409
+ }
1410
+
1411
+ .p-datatable-thead > tr > th p-columnfilter {
1412
+ font-weight: normal;
1413
+ }
1414
+
1415
+ .p-datatable-thead > tr > th,
1416
+ .p-datatable-sort-icon,
1417
+ .p-datatable-sort-badge {
1418
+ vertical-align: middle;
1419
+ }
1420
+
1421
+ .p-datatable-thead > tr > th.p-datatable-column-sorted {
1422
+ background: dt('datatable.header.cell.selected.background');
1423
+ color: dt('datatable.header.cell.selected.color');
1424
+ }
1425
+
1426
+ .p-datatable-thead > tr > th.p-datatable-column-sorted .p-datatable-sort-icon {
1427
+ color: dt('datatable.header.cell.selected.color');
1428
+ }
1429
+
1430
+ .p-datatable.p-datatable-striped .p-datatable-tbody > tr:nth-child(odd) {
1431
+ background: dt('datatable.row.striped.background');
1432
+ }
1433
+
1434
+ .p-datatable.p-datatable-striped .p-datatable-tbody > tr:nth-child(odd).p-datatable-row-selected {
1435
+ background: dt('datatable.row.selected.background');
1436
+ color: dt('datatable.row.selected.color');
1437
+ }
1438
+
1439
+ p-sortIcon, p-sort-icon, p-sorticon {
1440
+ display: inline-flex;
1441
+ align-items: center;
1442
+ gap: dt('datatable.header.cell.gap');
1443
+ }
1444
+
1445
+ .p-datatable .p-editable-column.p-cell-editing {
1446
+ padding: 0;
1447
+ }
1448
+
1449
+ .p-datatable .p-editable-column.p-cell-editing p-celleditor {
1450
+ display: block;
1451
+ width: 100%;
1452
+ }
1453
+ `,pA={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})},hA={tableContainer:({instance:t})=>({"max-height":t.virtualScroll?"":t.scrollHeight,overflow:"auto"}),thead:{position:"sticky"},tfoot:{position:"sticky"},rowGroupHeader:({instance:t})=>({top:t.getFrozenRowGroupHeaderStickyPosition})},Gf=(()=>{class t extends en{name="datatable";style=uA;classes=pA;inlineStyles=hA;static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})();var fA=new ve("TABLE_INSTANCE"),jf=(()=>{class t{sortSource=new Xi;selectionSource=new Xi;contextMenuSource=new Xi;valueSource=new Xi;columnsSource=new Xi;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})(),$f=(()=>{class t extends On{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 re;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 re;selectionChange=new re;onRowSelect=new re;onRowUnselect=new re;onPage=new re;onSort=new re;onFilter=new re;onLazyLoad=new re;onRowExpand=new re;onRowCollapse=new re;onContextMenuSelect=new re;onColResize=new re;onColReorder=new re;onRowReorder=new re;onEditInit=new re;onEditComplete=new re;onEditCancel=new re;onHeaderCheckboxToggle=new re;sortFunction=new re;firstChange=new re;rowsChange=new re;onStateSave=new re;onStateRestore=new re;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=W0();styleElement;responsiveStyleElement;overlayService=p(oo);filterService=p(L0);tableService=p(jf);zone=p(Xt);_componentStyle=p(Gf);bindDirectiveInstance=p(Ae,{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(){qt(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&&qt(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 o=this.lazy?0:this.first;return n.slice(o,o+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(Ce.resolveFieldData(e,this.dataKey))]=1;else this.selectionKeys[String(Ce.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 o=n.metaKey||n.ctrlKey,r=this.getSortMeta(e.field);r?o?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())):((!o||!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=Ce.resolveFieldData(r,e),c=Ce.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 o={field:e,order:n};this.onSort.emit(o),this.tableService.onSort(o)}}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,o,r){let a=Ce.resolveFieldData(e,o[r].field),s=Ce.resolveFieldData(n,o[r].field);return Ce.compare(a,s,this.filterLocale)===0?o.length-1>r?this.multisortField(e,n,o,r+1):0:this.compareValuesOnSort(a,s,o[r].order)}compareValuesOnSort(e,n,o){return Ce.sort(e,n,o,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 o=0;o<this.multiSortMeta.length;o++)if(this.multiSortMeta[o].field==e){n=!0;break}}return n}}handleRowClick(e){let n=e.originalEvent.target,o=n.nodeName,r=n.parentElement&&n.parentElement.nodeName;if(!(o=="INPUT"||o=="BUTTON"||o=="A"||r=="INPUT"||r=="BUTTON"||r=="A"||O0(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)ye.clearSelection(),this.rangeRowIndex!=null&&this.clearSelectionRange(e.originalEvent),this.rangeRowIndex=s,this.selectRange(e.originalEvent,s);else{let c=this.isSelected(a);if(!c&&!this.isRowSelectable(a,s))return;let u=this.rowTouched?!1:this.metaKeySelection,f=this.dataKey?String(Ce.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((R,k)=>k!=x),this.selectionChange.emit(this.selection),f&&delete this.selectionKeys[f]}this.onRowUnselect.emit({originalEvent:e.originalEvent,data:a,type:"row"})}else this.isSingleSelectionMode()?(this._selection=a,this.selectionChange.emit(a),f&&(this.selectionKeys={},this.selectionKeys[f]=1)):this.isMultipleSelectionMode()&&(g?this._selection=this.selection||[]:(this._selection=[],this.selectionKeys={}),this._selection=[...this.selection,a],this.selectionChange.emit(this.selection),f&&(this.selectionKeys[f]=1)),this.onRowSelect.emit({originalEvent:e.originalEvent,data:a,type:"row",index:s})}else if(this.selectionMode==="single")c?(this._selection=null,this.selectionKeys={},this.selectionChange.emit(this.selection),this.onRowUnselect.emit({originalEvent:e.originalEvent,data:a,type:"row",index:s})):(this._selection=a,this.selectionChange.emit(this.selection),this.onRowSelect.emit({originalEvent:e.originalEvent,data:a,type:"row",index:s}),f&&(this.selectionKeys={},this.selectionKeys[f]=1));else if(this.selectionMode==="multiple")if(c){let g=this.findIndexInSelection(a);this._selection=this.selection.filter((x,R)=>R!=g),this.selectionChange.emit(this.selection),this.onRowUnselect.emit({originalEvent:e.originalEvent,data:a,type:"row",index:s}),f&&delete this.selectionKeys[f]}else this._selection=this.selection?[...this.selection,a]:[a],this.selectionChange.emit(this.selection),this.onRowSelect.emit({originalEvent:e.originalEvent,data:a,type:"row",index:s}),f&&(this.selectionKeys[f]=1)}this.tableService.onSelectionChange(),this.isStateful()&&this.saveState()}this.rowTouched=!1}}handleRowTouchEnd(e){this.rowTouched=!0}handleRowRightClick(e){if(this.contextMenu){let n=e.rowData,o=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(Ce.resolveFieldData(n,this.dataKey)):null;if(!a){if(!this.isRowSelectable(n,o))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,o){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)&&!o){if(!this.isRowSelectable(u,n))continue;s.push(u),this._selection=[...this.selection,u];let f=this.dataKey?String(Ce.resolveFieldData(u,this.dataKey)):null;f&&(this.selectionKeys[f]=1)}}this.selectionChange.emit(this.selection),this.onRowSelect.emit({originalEvent:e,data:s,type:"row"})}clearSelectionRange(e){let n,o,r=this.rangeRowIndex,a=this.anchorRowIndex;r>a?(n=this.anchorRowIndex,o=this.rangeRowIndex):r<a?(n=this.rangeRowIndex,o=this.anchorRowIndex):(n=this.rangeRowIndex,o=this.rangeRowIndex);for(let s=n;s<=o;s++){let c=this.value[s],u=this.findIndexInSelection(c);this._selection=this.selection.filter((g,x)=>x!=u);let f=this.dataKey?String(Ce.resolveFieldData(c,this.dataKey)):null;f&&delete this.selectionKeys[f],this.onRowUnselect.emit({originalEvent:e,data:c,type:"row"})}}isSelected(e){return e&&this.selection?this.dataKey?this.selectionKeys[Ce.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 o=0;o<this.selection.length;o++)if(this.equals(e,this.selection[o])){n=o;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(Ce.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 o=this.isSelected(n),r=this.dataKey?String(Ce.resolveFieldData(n,this.dataKey)):null;if(this.preventSelectionSetterPropagation=!0,o){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 o=this.selectionPageOnly?this.dataToRender(this.processedData):this.processedData,r=this.selectionPageOnly&&this._selection?this._selection.filter(a=>!o.some(s=>this.equals(a,s))):[];n&&(r=this.frozenValue?[...r,...this.frozenValue,...o]:[...r,...o],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:Ce.equals(e,n,this.dataKey)}filter(e,n,o){this.filterTimeout&&clearTimeout(this.filterTimeout),this.isFilterBlank(e)?this.filters[n]&&delete this.filters[n]:this.filters[n]={value:e,matchMode:o},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 o=!0,r=!1,a=!1;for(let c in this.filters)if(this.filters.hasOwnProperty(c)&&c!=="global"){a=!0;let u=c,f=this.filters[u];if(Array.isArray(f)){for(let g of f)if(o=this.executeLocalFilter(u,this.value[n],g),g.operator===Df.OR&&o||g.operator===Df.AND&&!o)break}else o=this.executeLocalFilter(u,this.value[n],f);if(!o)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](Ce.resolveFieldData(this.value[n],u),this.filters.global.value,this.filterLocale),r)break}let s;this.filters.global?s=a?a&&o&&r:r:s=a&&o,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,o){let r=o.value,a=o.matchMode||A0.STARTS_WITH,s=Ce.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,o="",r=this.columns;e&&e.selectionOnly?n=this.selection||[]:e&&e.allValues?n=this.value||[]:(n=this.filteredValue||this.value,this.frozenValue&&(n=n?[...this.frozenValue,...n]:this.frozenValue));let a=r.filter(f=>f.exportable!==!1&&f.field);o+=a.map(f=>'"'+this.getExportHeader(f)+'"').join(this.csvSeparator);let s=n.map(f=>a.map(g=>{let x=Ce.resolveFieldData(f,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(`
1454
+ `);s.length&&(o+=`
1455
+ `+s);let c=new Blob([new Uint8Array([239,187,191]),o],{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()):(o="data:text/csv;charset=utf-8,"+o,this.document.defaultView?.open(encodeURI(o))),this.renderer.removeChild(this.document.body,u)}onLazyItemLoad(e){this.onLazyLoad.emit(Bt(me(me({},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,o,r){this.editingCell=e,this.editingCellData=n,this.editingCellField=o,this.editingCellRowIndex=r,this.bindDocumentEditListener()}isEditingCellValid(){return this.editingCell&&ye.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()&&ye.removeClass(this.editingCell,"p-cell-editing"),pr(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(Ce.resolveFieldData(e,this.dataKey));this.editingRowKeys[n]=!0}saveRowEdit(e,n){if(ye.find(n,".ng-invalid.ng-dirty").length===0){let o=String(Ce.resolveFieldData(e,this.dataKey));delete this.editingRowKeys[o]}}cancelRowEdit(e){let n=String(Ce.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 o=this.groupRowsBy?String(Ce.resolveFieldData(e,this.groupRowsBy)):String(Ce.resolveFieldData(e,this.dataKey));this.expandedRowKeys[o]!=null?(delete this.expandedRowKeys[o],this.onRowCollapse.emit({originalEvent:n,data:e})):(this.rowExpandMode==="single"&&(this.expandedRowKeys={}),this.expandedRowKeys[o]=!0,this.onRowExpand.emit({originalEvent:n,data:e})),n&&n.preventDefault(),this.isStateful()&&this.saveState()}isRowExpanded(e){return this.groupRowsBy?this.expandedRowKeys[String(Ce.resolveFieldData(e,this.groupRowsBy))]===!0:this.expandedRowKeys[String(Ce.resolveFieldData(e,this.dataKey))]===!0}isRowEditing(e){return this.editingRowKeys[String(Ce.resolveFieldData(e,this.dataKey))]===!0}isSingleSelectionMode(){return this.selectionMode==="single"}isMultipleSelectionMode(){return this.selectionMode==="multiple"}onColumnResizeBegin(e){let n=ye.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=ye.getOffset(this.el?.nativeElement).left;!this.$unstyled()&&ye.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,o=e?-n:n,a=this.resizeColumnElement.offsetWidth+o,s=this.resizeColumnElement.style.minWidth.replace(/[^\d.]/g,""),c=s?parseFloat(s):15;if(a>=c){if(this.columnResizeMode==="fit"){let f=this.resizeColumnElement.nextElementSibling.offsetWidth-o;a>15&&f>15&&this.resizeTableCells(a,f)}else if(this.columnResizeMode==="expand"){this._initialColWidths=this._totalTableWidth();let u=this.tableViewChild?.nativeElement.offsetWidth+o;this.setResizeTableWidth(u+"px"),this.resizeTableCells(a,null)}this.onColResize.emit({element:this.resizeColumnElement,delta:o}),this.isStateful()&&this.saveState()}this.resizeHelperViewChild.nativeElement.style.display="none",ye.removeClass(this.el?.nativeElement,"p-unselectable-text")}_totalTableWidth(){let e=[],n=ye.findSingle(this.el.nativeElement,'[data-pc-section="thead"]');return ye.find(n,"tr > th").forEach(r=>e.push(ye.getOuterWidth(r))),e}onColumnDragStart(e,n){this.reorderIconWidth=ye.getHiddenElementOuterWidth(this.reorderIndicatorUpViewChild?.nativeElement),this.reorderIconHeight=ye.getHiddenElementOuterHeight(this.reorderIndicatorDownViewChild?.nativeElement),this.draggedColumn=n,e.dataTransfer.setData("text","b")}onColumnDragEnter(e,n){if(this.reorderableColumns&&this.draggedColumn&&n){e.preventDefault();let o=ye.getOffset(this.el?.nativeElement),r=ye.getOffset(n);if(this.draggedColumn!=n){let a=ye.indexWithinGroup(this.draggedColumn,"preorderablecolumn"),s=ye.indexWithinGroup(n,"preorderablecolumn"),c=r.left-o.left,u=o.top-r.top,f=r.left+n.offsetWidth/2;this.reorderIndicatorUpViewChild.nativeElement.style.top=r.top-o.top-(this.reorderIconHeight-1)+"px",this.reorderIndicatorDownViewChild.nativeElement.style.top=r.top-o.top+n.offsetHeight+"px",e.pageX>f?(this.reorderIndicatorUpViewChild.nativeElement.style.left=c+n.offsetWidth-Math.ceil(this.reorderIconWidth/2)+"px",this.reorderIndicatorDownViewChild.nativeElement.style.left=c+n.offsetWidth-Math.ceil(this.reorderIconWidth/2)+"px",this.dropPosition=1):(this.reorderIndicatorUpViewChild.nativeElement.style.left=c-Math.ceil(this.reorderIconWidth/2)+"px",this.reorderIndicatorDownViewChild.nativeElement.style.left=c-Math.ceil(this.reorderIconWidth/2)+"px",this.dropPosition=-1),this.reorderIndicatorUpViewChild.nativeElement.style.display="block",this.reorderIndicatorDownViewChild.nativeElement.style.display="block"}else e.dataTransfer.dropEffect="none"}}onColumnDragLeave(e){this.reorderableColumns&&this.draggedColumn&&e.preventDefault()}onColumnDrop(e,n){if(e.preventDefault(),this.draggedColumn){let o=ye.indexWithinGroup(this.draggedColumn,"preorderablecolumn"),r=ye.indexWithinGroup(n,"preorderablecolumn"),a=o!=r;if(a&&(r-o==1&&this.dropPosition===-1||o-r==1&&this.dropPosition===1)&&(a=!1),a&&r<o&&this.dropPosition===1&&(r=r+1),a&&r>o&&this.dropPosition===-1&&(r=r-1),a&&(Ce.reorderArray(this.columns,o,r),this.onColReorder.emit({dragIndex:o,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();Ce.reorderArray(s,o+1,r+1),this.updateStyleElement(s,o,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 o=ye.index(this.resizeColumnElement),r=this.columnResizeMode==="expand"?this._initialColWidths:this._totalTableWidth();this.updateStyleElement(r,o,e,n)}updateStyleElement(e,n,o,r){this.destroyStyleElement(),this.createStyleElement();let a="";e.forEach((s,c)=>{let u=c===n?o:r&&c===n+1?r:s,f=`width: ${u}px !important; max-width: ${u}px !important;`;a+=`
1456
+ #${this.id}-table > .p-datatable-thead > tr > th:nth-child(${c+1}),
1457
+ #${this.id}-table > .p-datatable-tbody > tr > td:nth-child(${c+1}),
1458
+ #${this.id}-table > .p-datatable-tfoot > tr > td:nth-child(${c+1}) {
1459
+ ${f}
1460
+ }
1461
+ `}),this.renderer.setProperty(this.styleElement,"innerHTML",a)}onRowDragStart(e,n){this.rowDragging=!0,this.draggedRowIndex=n,e.dataTransfer.setData("text","b")}onRowDragOver(e,n,o){if(this.rowDragging&&this.draggedRowIndex!==n){let r=ye.getOffset(o).top,a=e.pageY,s=r+ye.getOuterHeight(o)/2,c=o.previousElementSibling;a<s?(ye.removeClass(o,"p-datatable-dragpoint-bottom"),this.droppedRowIndex=n,c&&!this.$unstyled()?ye.addClass(c,"p-datatable-dragpoint-bottom"):!this.$unstyled()&&ye.addClass(o,"p-datatable-dragpoint-top")):(c&&!this.$unstyled()?ye.removeClass(c,"p-datatable-dragpoint-bottom"):!this.$unstyled()&&ye.addClass(o,"p-datatable-dragpoint-top"),this.droppedRowIndex=n+1,!this.$unstyled()&&ye.addClass(o,"p-datatable-dragpoint-bottom"))}}onRowDragLeave(e,n){let o=n.previousElementSibling;o&&!this.$unstyled()&&ye.removeClass(o,"p-datatable-dragpoint-bottom"),!this.$unstyled()&&ye.removeClass(n,"p-datatable-dragpoint-bottom"),!this.$unstyled()&&ye.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 o=this.draggedRowIndex>this.droppedRowIndex?this.droppedRowIndex:this.droppedRowIndex===0?0:this.droppedRowIndex-1;Ce.reorderArray(this.value,this.draggedRowIndex,o),this.virtualScroll&&(this._value=[...this._value]),this.onRowReorder.emit({dragIndex:this.draggedRowIndex,dropIndex:o})}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(qt(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),o=/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z/,r=function(a,s){return typeof s=="string"&&o.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=[],o=[],r=this.el?.nativeElement;r&&(o=ye.find(r,'[data-pc-section="thead"] > tr > th')),o.forEach(a=>n.push(ye.getOuterWidth(a))),e.columnWidths=n.join(","),this.columnResizeMode==="expand"&&this.tableViewChild&&(e.tableWidth=ye.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"),Ce.isNotEmpty(e)){this.createStyleElement();let n="";e.forEach((o,r)=>{let a=`width: ${o}px !important; max-width: ${o}px !important`;n+=`
1462
+ #${this.id}-table > .p-datatable-thead > tr > th:nth-child(${r+1}),
1463
+ #${this.id}-table > .p-datatable-tbody > tr > td:nth-child(${r+1}),
1464
+ #${this.id}-table > .p-datatable-tfoot > tr > td:nth-child(${r+1}) {
1465
+ ${a}
1466
+ }
1467
+ `}),this.styleElement.innerHTML=n}}}saveColumnOrder(e){if(this.columns){let n=[];this.columns.map(o=>{n.push(o.field||o.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",ye.setAttribute(this.styleElement,"nonce",this.config?.csp()?.nonce),this.renderer.appendChild(this.document.head,this.styleElement),ye.setAttribute(this.styleElement,"nonce",this.config?.csp()?.nonce)}getGroupRowsMeta(){return{field:this.groupRowsBy,order:this.groupRowsByOrder}}createResponsiveStyle(){if(qt(this.platformId)&&!this.responsiveStyleElement){this.responsiveStyleElement=this.renderer.createElement("style"),this.responsiveStyleElement.type="text/css",ye.setAttribute(this.responsiveStyleElement,"nonce",this.config?.csp()?.nonce),this.renderer.appendChild(this.document.head,this.responsiveStyleElement);let e=`
1468
+ @media screen and (max-width: ${this.breakpoint}) {
1469
+ #${this.id}-table > .p-datatable-thead > tr > th,
1470
+ #${this.id}-table > .p-datatable-tfoot > tr > td {
1471
+ display: none !important;
1472
+ }
1473
+
1474
+ #${this.id}-table > .p-datatable-tbody > tr > td {
1475
+ display: flex;
1476
+ width: 100% !important;
1477
+ align-items: center;
1478
+ justify-content: space-between;
1479
+ }
1480
+
1481
+ #${this.id}-table > .p-datatable-tbody > tr > td:not(:last-child) {
1482
+ border: 0 none;
1483
+ }
1484
+
1485
+ #${this.id}.p-datatable-gridlines > .p-datatable-table-container > .p-datatable-table > .p-datatable-tbody > tr > td:last-child {
1486
+ border-top: 0;
1487
+ border-right: 0;
1488
+ border-left: 0;
1489
+ }
1490
+
1491
+ #${this.id}-table > .p-datatable-tbody > tr > td > .p-datatable-column-title {
1492
+ display: block;
1493
+ }
1494
+ }
1495
+ `;this.renderer.setProperty(this.responsiveStyleElement,"innerHTML",e),ye.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(o){return(e||(e=U(t)))(o||t)}})();static \u0275cmp=z({type:t,selectors:[["p-table"]],contentQueries:function(n,o,r){if(n&1&&Hn(r,AF,4)(r,LF,4)(r,BF,4)(r,VF,4)(r,zF,4)(r,HF,4)(r,qF,4)(r,GF,4)(r,jF,4)(r,UF,4)(r,$F,4)(r,WF,4)(r,KF,4)(r,YF,4)(r,XF,4)(r,ZF,4)(r,QF,4)(r,JF,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,Pt,4),n&2){let a;ee(a=te())&&(o._headerTemplate=a.first),ee(a=te())&&(o._headerGroupedTemplate=a.first),ee(a=te())&&(o._bodyTemplate=a.first),ee(a=te())&&(o._loadingBodyTemplate=a.first),ee(a=te())&&(o._captionTemplate=a.first),ee(a=te())&&(o._footerTemplate=a.first),ee(a=te())&&(o._footerGroupedTemplate=a.first),ee(a=te())&&(o._summaryTemplate=a.first),ee(a=te())&&(o._colGroupTemplate=a.first),ee(a=te())&&(o._expandedRowTemplate=a.first),ee(a=te())&&(o._groupHeaderTemplate=a.first),ee(a=te())&&(o._groupFooterTemplate=a.first),ee(a=te())&&(o._frozenExpandedRowTemplate=a.first),ee(a=te())&&(o._frozenHeaderTemplate=a.first),ee(a=te())&&(o._frozenBodyTemplate=a.first),ee(a=te())&&(o._frozenFooterTemplate=a.first),ee(a=te())&&(o._frozenColGroupTemplate=a.first),ee(a=te())&&(o._emptyMessageTemplate=a.first),ee(a=te())&&(o._paginatorLeftTemplate=a.first),ee(a=te())&&(o._paginatorRightTemplate=a.first),ee(a=te())&&(o._paginatorDropdownItemTemplate=a.first),ee(a=te())&&(o._loadingIconTemplate=a.first),ee(a=te())&&(o._reorderIndicatorUpIconTemplate=a.first),ee(a=te())&&(o._reorderIndicatorDownIconTemplate=a.first),ee(a=te())&&(o._sortIconTemplate=a.first),ee(a=te())&&(o._checkboxIconTemplate=a.first),ee(a=te())&&(o._headerCheckboxIconTemplate=a.first),ee(a=te())&&(o._paginatorDropdownIconTemplate=a.first),ee(a=te())&&(o._paginatorFirstPageLinkIconTemplate=a.first),ee(a=te())&&(o._paginatorLastPageLinkIconTemplate=a.first),ee(a=te())&&(o._paginatorPreviousPageLinkIconTemplate=a.first),ee(a=te())&&(o._paginatorNextPageLinkIconTemplate=a.first),ee(a=te())&&(o._templates=a)}},viewQuery:function(n,o){if(n&1&&to(fN,5)(mN,5)(_N,5)(gN,5)(vN,5)(bN,5)(yN,5)(CN,5),n&2){let r;ee(r=te())&&(o.resizeHelperViewChild=r.first),ee(r=te())&&(o.reorderIndicatorUpViewChild=r.first),ee(r=te())&&(o.reorderIndicatorDownViewChild=r.first),ee(r=te())&&(o.wrapperViewChild=r.first),ee(r=te())&&(o.tableViewChild=r.first),ee(r=te())&&(o.tableHeaderViewChild=r.first),ee(r=te())&&(o.tableFooterViewChild=r.first),ee(r=te())&&(o.scroller=r.first)}},hostVars:3,hostBindings:function(n,o){n&2&&(O("data-p",o.dataP),G(o.cn(o.cx("root"),o.styleClass)))},inputs:{frozenColumns:"frozenColumns",frozenValue:"frozenValue",styleClass:"styleClass",tableStyle:"tableStyle",tableStyleClass:"tableStyleClass",paginator:[2,"paginator","paginator",Y],pageLinks:[2,"pageLinks","pageLinks",Me],rowsPerPageOptions:"rowsPerPageOptions",alwaysShowPaginator:[2,"alwaysShowPaginator","alwaysShowPaginator",Y],paginatorPosition:"paginatorPosition",paginatorStyleClass:"paginatorStyleClass",paginatorDropdownAppendTo:"paginatorDropdownAppendTo",paginatorDropdownScrollHeight:"paginatorDropdownScrollHeight",currentPageReportTemplate:"currentPageReportTemplate",showCurrentPageReport:[2,"showCurrentPageReport","showCurrentPageReport",Y],showJumpToPageDropdown:[2,"showJumpToPageDropdown","showJumpToPageDropdown",Y],showJumpToPageInput:[2,"showJumpToPageInput","showJumpToPageInput",Y],showFirstLastIcon:[2,"showFirstLastIcon","showFirstLastIcon",Y],showPageLinks:[2,"showPageLinks","showPageLinks",Y],defaultSortOrder:[2,"defaultSortOrder","defaultSortOrder",Me],sortMode:"sortMode",resetPageOnSort:[2,"resetPageOnSort","resetPageOnSort",Y],selectionMode:"selectionMode",selectionPageOnly:[2,"selectionPageOnly","selectionPageOnly",Y],contextMenuSelection:"contextMenuSelection",contextMenuSelectionMode:"contextMenuSelectionMode",dataKey:"dataKey",metaKeySelection:[2,"metaKeySelection","metaKeySelection",Y],rowSelectable:"rowSelectable",rowTrackBy:"rowTrackBy",lazy:[2,"lazy","lazy",Y],lazyLoadOnInit:[2,"lazyLoadOnInit","lazyLoadOnInit",Y],compareSelectionBy:"compareSelectionBy",csvSeparator:"csvSeparator",exportFilename:"exportFilename",filters:"filters",globalFilterFields:"globalFilterFields",filterDelay:[2,"filterDelay","filterDelay",Me],filterLocale:"filterLocale",expandedRowKeys:"expandedRowKeys",editingRowKeys:"editingRowKeys",rowExpandMode:"rowExpandMode",scrollable:[2,"scrollable","scrollable",Y],rowGroupMode:"rowGroupMode",scrollHeight:"scrollHeight",virtualScroll:[2,"virtualScroll","virtualScroll",Y],virtualScrollItemSize:[2,"virtualScrollItemSize","virtualScrollItemSize",Me],virtualScrollOptions:"virtualScrollOptions",virtualScrollDelay:[2,"virtualScrollDelay","virtualScrollDelay",Me],frozenWidth:"frozenWidth",contextMenu:"contextMenu",resizableColumns:[2,"resizableColumns","resizableColumns",Y],columnResizeMode:"columnResizeMode",reorderableColumns:[2,"reorderableColumns","reorderableColumns",Y],loading:[2,"loading","loading",Y],loadingIcon:"loadingIcon",showLoader:[2,"showLoader","showLoader",Y],rowHover:[2,"rowHover","rowHover",Y],customSort:[2,"customSort","customSort",Y],showInitialSortBadge:[2,"showInitialSortBadge","showInitialSortBadge",Y],exportFunction:"exportFunction",exportHeader:"exportHeader",stateKey:"stateKey",stateStorage:"stateStorage",editMode:"editMode",groupRowsBy:"groupRowsBy",size:"size",showGridlines:[2,"showGridlines","showGridlines",Y],stripedRows:[2,"stripedRows","stripedRows",Y],groupRowsByOrder:[2,"groupRowsByOrder","groupRowsByOrder",Me],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:[Ee([jf,Gf,{provide:fA,useExisting:t},{provide:tn,useExisting:t}]),Zt([Ae]),Q],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,o){n&1&&(P(0,DN,3,5,"div",10)(1,RN,2,4,"div",10)(2,KN,6,26,"p-paginator",11),h(3,"div",12,0),P(5,ZN,4,18,"p-scroller",13)(6,JN,2,7,"ng-container",14)(7,a4,10,32,"ng-template",null,1,$e),m(),P(9,x4,6,26,"p-paginator",11)(10,T4,2,3,"div",15)(11,S4,2,4,"div",16)(12,E4,4,6,"span",16)(13,O4,4,6,"span",16)),n&2&&(_("ngIf",o.loading&&o.showLoader),l(),_("ngIf",o.captionTemplate||o._captionTemplate),l(),_("ngIf",o.paginator&&(o.paginatorPosition==="top"||o.paginatorPosition=="both")),l(),G(o.cx("tableContainer")),_("ngStyle",o.sx("tableContainer"))("pBind",o.ptm("tableContainer")),O("data-p",o.dataP),l(2),_("ngIf",o.virtualScroll),l(),_("ngIf",!o.virtualScroll),l(3),_("ngIf",o.paginator&&(o.paginatorPosition==="bottom"||o.paginatorPosition=="both")),l(),_("ngIf",o.summaryTemplate||o._summaryTemplate),l(),_("ngIf",o.resizableColumns),l(),_("ngIf",o.reorderableColumns),l(),_("ngIf",o.reorderableColumns))},dependencies:()=>[Ka,xi,hn,io,Hf,Pt,dv,Af,Lf,Rf,Ae,mA],encapsulation:2})}return t})(),mA=(()=>{class t extends On{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,o){let r=Ce.resolveFieldData(n,this.dataTable?.groupRowsBy||""),a=e[o-(this.dataTable?._first||0)-1];if(a){let s=Ce.resolveFieldData(a,this.dataTable?.groupRowsBy||"");return r!==s}else return!0}shouldRenderRowGroupFooter(e,n,o){let r=Ce.resolveFieldData(n,this.dataTable?.groupRowsBy||""),a=e[o-(this.dataTable?._first||0)+1];if(a){let s=Ce.resolveFieldData(a,this.dataTable?.groupRowsBy||"");return r!==s}else return!0}shouldRenderRowspan(e,n,o){let r=Ce.resolveFieldData(n,this.dataTable?.groupRowsBy),a=e[o-1];if(a){let s=Ce.resolveFieldData(a,this.dataTable?.groupRowsBy||"");return r!==s}else return!0}calculateRowGroupSize(e,n,o){let r=Ce.resolveFieldData(n,this.dataTable?.groupRowsBy),a=r,s=0;for(;r===a;){s++;let c=e[++o];if(c)a=Ce.resolveFieldData(c,this.dataTable?.groupRowsBy||"");else break}return s===1?null:s}onDestroy(){this.subscription&&this.subscription.unsubscribe()}updateFrozenRowStickyPosition(){this.el.nativeElement.style.top=ye.getOuterHeight(this.el.nativeElement.previousElementSibling)+"px"}updateFrozenRowGroupHeaderStickyPosition(){if(this.el.nativeElement.previousElementSibling){let e=ye.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,o=this.getScrollerOption("getItemOptions");return o?o(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)(Rn($f),Rn(jf))};static \u0275cmp=z({type:t,selectors:[["","pTableBody",""]],hostVars:1,hostBindings:function(n,o){n&2&&O("data-p",o.dataP)},inputs:{columns:[0,"pTableBody","columns"],template:[0,"pTableBodyTemplate","template"],value:"value",frozen:[2,"frozen","frozen",Y],frozenRows:[2,"frozenRows","frozenRows",Y],scrollerOptions:"scrollerOptions"},standalone:!1,features:[Q],attrs:F4,decls:5,vars:5,consts:[[4,"ngIf"],["ngFor","",3,"ngForOf","ngForTrackBy"],["role","row",4,"ngIf"],["role","row"],[4,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(n,o){n&1&&P(0,U4,2,2,"ng-container",0)(1,tA,2,2,"ng-container",0)(2,aA,2,2,"ng-container",0)(3,lA,2,5,"ng-container",0)(4,dA,2,5,"ng-container",0),n&2&&(_("ngIf",!o.dataTable.expandedRowTemplate&&!o.dataTable._expandedRowTemplate),l(),_("ngIf",(o.dataTable.expandedRowTemplate||o.dataTable._expandedRowTemplate)&&!(o.frozen&&(o.dataTable.frozenExpandedRowTemplate||o.dataTable._frozenExpandedRowTemplate))),l(),_("ngIf",(o.dataTable.frozenExpandedRowTemplate||o.dataTable._frozenExpandedRowTemplate)&&o.frozen),l(),_("ngIf",o.dataTable.loading),l(),_("ngIf",o.dataTable.isEmpty()&&!o.dataTable.loading))},dependencies:[no,xi,hn],encapsulation:2})}return t})();var bb=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=Mt({type:t});static \u0275inj=It({providers:[Gf],imports:[Dt,db,ns,pv,yt,on,hv,rb,cv,ev,ss,Of,Af,Lf,Rf,Xv,Qv,Zv,Wv,ab,Kv,Yv,Jv,mb,ro,uo,ot,Of]})}return t})();var yb=`
1496
+ .p-progressspinner {
1497
+ position: relative;
1498
+ margin: 0 auto;
1499
+ width: 100px;
1500
+ height: 100px;
1501
+ display: inline-block;
1502
+ }
1503
+
1504
+ .p-progressspinner::before {
1505
+ content: '';
1506
+ display: block;
1507
+ padding-top: 100%;
1508
+ }
1509
+
1510
+ .p-progressspinner-spin {
1511
+ height: 100%;
1512
+ transform-origin: center center;
1513
+ width: 100%;
1514
+ position: absolute;
1515
+ top: 0;
1516
+ bottom: 0;
1517
+ left: 0;
1518
+ right: 0;
1519
+ margin: auto;
1520
+ animation: p-progressspinner-rotate 2s linear infinite;
1521
+ }
1522
+
1523
+ .p-progressspinner-circle {
1524
+ stroke-dasharray: 89, 200;
1525
+ stroke-dashoffset: 0;
1526
+ stroke: dt('progressspinner.colorOne');
1527
+ animation:
1528
+ p-progressspinner-dash 1.5s ease-in-out infinite,
1529
+ p-progressspinner-color 6s ease-in-out infinite;
1530
+ stroke-linecap: round;
1531
+ }
1532
+
1533
+ @keyframes p-progressspinner-rotate {
1534
+ 100% {
1535
+ transform: rotate(360deg);
1536
+ }
1537
+ }
1538
+ @keyframes p-progressspinner-dash {
1539
+ 0% {
1540
+ stroke-dasharray: 1, 200;
1541
+ stroke-dashoffset: 0;
1542
+ }
1543
+ 50% {
1544
+ stroke-dasharray: 89, 200;
1545
+ stroke-dashoffset: -35px;
1546
+ }
1547
+ 100% {
1548
+ stroke-dasharray: 89, 200;
1549
+ stroke-dashoffset: -124px;
1550
+ }
1551
+ }
1552
+ @keyframes p-progressspinner-color {
1553
+ 100%,
1554
+ 0% {
1555
+ stroke: dt('progressspinner.color.one');
1556
+ }
1557
+ 40% {
1558
+ stroke: dt('progressspinner.color.two');
1559
+ }
1560
+ 66% {
1561
+ stroke: dt('progressspinner.color.three');
1562
+ }
1563
+ 80%,
1564
+ 90% {
1565
+ stroke: dt('progressspinner.color.four');
1566
+ }
1567
+ }
1568
+ `;var gA={root:()=>["p-progressspinner"],spin:"p-progressspinner-spin",circle:"p-progressspinner-circle"},Cb=(()=>{class t extends en{name="progressspinner";style=yb;classes=gA;static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})();var xb=new ve("PROGRESSSPINNER_INSTANCE"),Wf=(()=>{class t extends On{componentName="ProgressSpinner";$pcProgressSpinner=p(xb,{optional:!0,skipSelf:!0})??void 0;bindDirectiveInstance=p(Ae,{self:!0});styleClass;strokeWidth="2";fill="none";animationDuration="2s";ariaLabel;onAfterViewChecked(){this.bindDirectiveInstance.setAttrs(this.ptms(["host","root"]))}_componentStyle=p(Cb);static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275cmp=z({type:t,selectors:[["p-progressSpinner"],["p-progress-spinner"],["p-progressspinner"]],hostVars:5,hostBindings:function(n,o){n&2&&(O("aria-label",o.ariaLabel)("role","progressbar")("aria-busy",!0),G(o.cn(o.cx("root"),o.styleClass)))},inputs:{styleClass:"styleClass",strokeWidth:"strokeWidth",fill:"fill",animationDuration:"animationDuration",ariaLabel:"ariaLabel"},features:[Ee([Cb,{provide:xb,useExisting:t},{provide:tn,useExisting:t}]),Zt([Ae]),Q],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,o){n&1&&(X(),h(0,"svg",0),F(1,"circle",1),m()),n&2&&(G(o.cx("spin")),Oe("animation-duration",o.animationDuration),_("pBind",o.ptm("spin")),l(),G(o.cx("circle")),_("pBind",o.ptm("circle")),O("fill",o.fill)("stroke-width",o.strokeWidth))},dependencies:[Dt,ot,Ae],encapsulation:2,changeDetection:0})}return t})(),wb=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=Mt({type:t});static \u0275inj=It({imports:[Wf,ot,ot]})}return t})();var Kn={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",folderAriaLabel:(t,i)=>`${i?"Collapse":"Expand"} folder ${t}`,leafAriaLabel:t=>`Inspect ${t}`,mapVisibilityTooltip:"Toggle visibility on the map",mapCoveredTooltip:"On the map via a selected parent folder. Uncheck the parent to change it.",mapVisibilityAriaLabel:t=>`Toggle ${t} visibility on the map`,isolateTooltip:"Isolate this node and its direct links on the map",isolateAriaLabel:t=>`Isolate ${t} and its direct links on the map`,columns:{tree:"Folder / Node",kind:"Kind",linksIn:"in",linksOut:"out",tokens:"Tokens",issues:"Issues",modified:"Modified"},linksInHeaderTooltip:"Incoming references: how many other nodes link to this one.",linksOutHeaderTooltip:"Outgoing references: how many nodes this one links to.",modifiedHeaderTooltip:"Last modified on disk (file mtime). Hover a cell for the exact time.",sortAriaLabel:t=>`Sort by ${t}`,sortTreeAriaLabel:"Show folder tree",tokensTooltip:t=>`${t.toLocaleString()} tokens`,folderCount:t=>`${t}`,folderErrorTooltip:t=>`${t} ${t===1?"error":"errors"} across this folder`,folderWarnTooltip:t=>`${t} ${t===1?"warning":"warnings"} across this folder`,missing:"\xB7"};var Kf="sm.folders.expanded";function Tb(){let t=null;try{t=localStorage.getItem(Kf)}catch{return new Set}if(!t)return new Set;let i;try{i=JSON.parse(t)}catch{return new Set}if(!Array.isArray(i))return new Set;let e=new Set;for(let n of i)typeof n=="string"&&n.length>0&&e.add(n);return e}function Sb(t){try{if(t.size===0){localStorage.removeItem(Kf);return}localStorage.setItem(Kf,JSON.stringify([...t]))}catch{}}function fs(t){let i=t.split("/").filter(n=>n.length>0);if(i.length===0)return t;let e=i[i.length-1];return e==="SKILL.md"&&i.length>=2?i[i.length-2]:e.replace(/\.md$/,"")}var kb={stable:"success",experimental:"info",deprecated:"warn"};function Ib(t){return t>=.75?"high":t>=.45?"medium":"low"}var Yn={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`,tagFilterAriaLabel:t=>`Select every node tagged ${t} on the map`,ariaExpand:"Expand",ariaFavoriteAdd:"Add to favorites",ariaFavoriteRemove:"Remove from favorites",favoriteAddTooltip:"Mark as favorite",favoriteRemoveTooltip:"Unfavorite"};function Pb(t){let i={path:"",name:"",subfolders:new Map,leaves:[]};for(let e of t){let n=e.path.split("/");if(n.pop()===void 0)continue;let r=i,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 i}function Rb(t,i){let e=new Map,n=o=>{let r=o.leaves.length,a=0,s=0;for(let u of o.leaves)a+=i.errorCounts.get(u.path)??0,s+=i.warnCounts.get(u.path)??0;for(let u of o.subfolders.values()){let f=n(u);r+=f.nodes,a+=f.errors,s+=f.warns}let c={nodes:r,errors:a,warns:s};return e.set(o.path,c),c};return n(t),e}function ms(t,i,e,n=""){let o=SA(t),r=Y0(t),a=t.modifiedAtMs;return{type:"leaf",path:t.path,name:TA(t),prefix:n,depth:i,linksIn:t.linksInCount!==void 0?String(t.linksInCount):Kn.missing,linksOut:t.linksOutCount!==void 0?String(t.linksOutCount):Kn.missing,tokens:t.tokensTotal!==void 0?mr(t.tokensTotal):Kn.missing,modifiedAt:a!==void 0?Z0(a):Kn.missing,modifiedAtFull:a!==void 0?Q0(a):"",linksInRaw:t.linksInCount,linksOutRaw:t.linksOutCount,tokensRaw:t.tokensTotal,modifiedAtRaw:a,errors:e.errorCounts.get(t.path)??0,warns:e.warnCounts.get(t.path)??0,isStale:r,staleTooltip:r?X0(t,Yn.sidecar):"",stability:o,stabilitySeverity:kb[o]}}function bA(t,i,e,n){let o=[],r=(c,u)=>{let f=[c.name],g=c;for(;g.subfolders.size===1&&g.leaves.length===0;){let[W]=g.subfolders.values();f.push(W.name),g=W}let x=f.join("/");if(g.subfolders.size===0&&g.leaves.length===1){o.push(ms(g.leaves[0],u,n,`${x}/`));return}let R=i.has(g.path),k=e.get(g.path)??{nodes:0,errors:0,warns:0};if(o.push({type:"folder",path:g.path,name:x,depth:u,expanded:R,nodeCount:k.nodes,errors:k.errors,warns:k.warns}),!R)return;let A=Array.from(g.subfolders.values()).sort(Eb);for(let W of A)r(W,u+1);let q=[...g.leaves].sort(Db);for(let W of q)o.push(ms(W,u+1,n))},a=Array.from(t.subfolders.values()).sort(Eb);for(let c of a)r(c,0);let s=[...t.leaves].sort(Db);for(let c of s)o.push(ms(c,0,n));return o}function yA(t,i,e){let n=t.map(o=>ms(o,0,e,wA(o.path)));return i.column==="tree"||n.sort(xA(i.column,i.dir)),n}function Ob(t){return t.sort.column==="tree"?bA(t.tree,t.expanded,t.aggregates,t.maps):yA(t.leaves,t.sort,t.maps)}function CA(t){return t.errors*1e6+t.warns*1e3+(t.isStale?1:0)}function xA(t,i){let e=i==="asc"?1:-1;return(n,o)=>{let r=Mb(n,t),a=Mb(o,t);return r===void 0&&a===void 0?n.path.localeCompare(o.path):r===void 0?1:a===void 0?-1:r!==a?(r-a)*e:n.path.localeCompare(o.path)}}function Mb(t,i){switch(i){case"linksIn":return t.linksInRaw;case"linksOut":return t.linksOutRaw;case"tokens":return t.tokensRaw;case"issues":return CA(t);case"modified":return t.modifiedAtRaw}}function wA(t){let i=t.lastIndexOf("/");return i===-1?"":t.slice(0,i)}function TA(t){let i=t.frontmatter.name?.trim();return i||fs(t.path)||Kn.missing}function SA(t){return lo(t)??"stable"}function Eb(t,i){return t.name.localeCompare(i.name)}function Db(t,i){return t.path.localeCompare(i.path)}function Fb(t){let i=new Map,e=new Map;for(let n of t)n.errorCount>0&&i.set(n.path,n.errorCount),n.warnCount>0&&e.set(n.path,n.warnCount);return{errorCounts:i,warnCounts:e}}var Yf="sm.files.sort",kA=["tree","linksIn","linksOut","tokens","issues","modified"],IA=["asc","desc"],Ti={column:"tree",dir:"asc"};function MA(t){return t==="tree"?"asc":"desc"}function Nb(t,i){return i==="tree"?Ti:t.column===i?{column:i,dir:t.dir==="asc"?"desc":"asc"}:{column:i,dir:MA(i)}}function EA(t){return typeof t=="string"&&kA.includes(t)}function DA(t){return typeof t=="string"&&IA.includes(t)}function PA(t){if(typeof t!="object"||t===null)return!1;let i=t;return EA(i.column)&&DA(i.dir)}function Ab(){let t=null;try{t=localStorage.getItem(Yf)}catch{return Ti}if(!t)return Ti;let i;try{i=JSON.parse(t)}catch{return Ti}return PA(i)?{column:i.column,dir:i.dir}:Ti}function Lb(t){try{if(t.column===Ti.column&&t.dir===Ti.dir){localStorage.removeItem(Yf);return}localStorage.setItem(Yf,JSON.stringify({column:t.column,dir:t.dir}))}catch{}}var RA=()=>({width:"1.75rem",height:"1.75rem"});function OA(t,i){if(t&1&&F(0,"p-message",1),t&2){let e=d();_("text",e.error())}}function FA(t,i){if(t&1&&(h(0,"div",2),F(1,"p-progressSpinner",3),h(2,"span",4),v(3),m()()),t&2){let e=d();l(),zt(Et(3,RA)),l(2),C(e.texts.loading)}}function NA(t,i){if(t&1){let e=$();F(0,"i",7),h(1,"p",8),v(2),m(),h(3,"p-button",9),N("onClick",function(){w(e);let o=d(3);return T(o.resetFilters())}),m()}if(t&2){let e=d(3);l(2),C(e.texts.emptyFiltered),l(),_("label",e.texts.resetFilters)("text",!0)}}function AA(t,i){if(t&1&&(F(0,"i",10),h(1,"p",11),v(2),m(),h(3,"p",12),v(4),m()),t&2){let e=d(3);l(2),C(e.texts.emptyAll),l(2),C(e.texts.emptyAllHint)}}function LA(t,i){if(t&1&&(h(0,"div",5),I(1,NA,4,3)(2,AA,5,2),m()),t&2){let e=d(2);l(),M(e.filtersActive()?1:2)}}function BA(t,i){if(t&1){let e=$();h(0,"span",20)(1,"button",28),N("click",function(){w(e);let o=d(4);return T(o.expandAll())}),F(2,"i",29),m(),h(3,"button",30),N("click",function(){w(e);let o=d(4);return T(o.collapseAll())}),F(4,"i",31),m()()}if(t&2){let e=d(4);l(),_("pTooltip",e.texts.expandAll),O("aria-label",e.texts.expandAll),l(2),_("pTooltip",e.texts.collapseAll),O("aria-label",e.texts.collapseAll)}}function VA(t,i){if(t&1){let e=$();h(0,"tr")(1,"th",16)(2,"div",17)(3,"button",18),N("click",function(){w(e);let o=d(3);return T(o.onSortColumn("tree"))}),v(4),F(5,"i",19),m(),I(6,BA,5,4,"span",20),m()(),h(7,"th",21)(8,"button",22),N("click",function(){w(e);let o=d(3);return T(o.onSortColumn("linksIn"))}),v(9),F(10,"i",19),m()(),h(11,"th",23)(12,"button",22),N("click",function(){w(e);let o=d(3);return T(o.onSortColumn("linksOut"))}),v(13),F(14,"i",19),m()(),h(15,"th",24)(16,"button",25),N("click",function(){w(e);let o=d(3);return T(o.onSortColumn("tokens"))}),v(17),F(18,"i",19),m()(),h(19,"th",26)(20,"button",18),N("click",function(){w(e);let o=d(3);return T(o.onSortColumn("issues"))}),v(21),F(22,"i",19),m()(),h(23,"th",27)(24,"button",22),N("click",function(){w(e);let o=d(3);return T(o.onSortColumn("modified"))}),v(25),F(26,"i",19),m()()()}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(),be(" ",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(),M(e.isFlat()?-1:6),l(),O("aria-sort",e.ariaSortFor("linksIn")),l(),ce("files__sort-btn--active",e.sortState().column==="linksIn"),_("pTooltip",e.texts.linksInHeaderTooltip),O("aria-label",e.texts.sortAriaLabel(e.texts.columns.linksIn)),l(),be(" ",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"),_("pTooltip",e.texts.linksOutHeaderTooltip),O("aria-label",e.texts.sortAriaLabel(e.texts.columns.linksOut)),l(),be(" ",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(),be(" ",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(),be(" ",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"),l(),O("aria-sort",e.ariaSortFor("modified")),l(),ce("files__sort-btn--active",e.sortState().column==="modified"),_("pTooltip",e.texts.modifiedHeaderTooltip),O("aria-label",e.texts.sortAriaLabel(e.texts.columns.modified)),l(),be(" ",e.texts.columns.modified," "),l(),ce("pi-sort-amount-up",e.sortState().column==="modified"&&e.sortState().dir==="asc")("pi-sort-amount-down",e.sortState().column==="modified"&&e.sortState().dir==="desc")("pi-sort-alt",e.sortState().column!=="modified")}}function zA(t,i){if(t&1&&(h(0,"span",46),F(1,"i",48),h(2,"span",49),v(3),m()()),t&2){let e=d(2).$implicit,n=d(3);_("pTooltip",n.texts.folderErrorTooltip(e.errors)),O("aria-label",n.texts.folderErrorTooltip(e.errors))("data-testid","files-folder-errors-"+e.path),l(3),C(e.errors)}}function HA(t,i){if(t&1&&(h(0,"span",47),F(1,"i",50),h(2,"span",49),v(3),m()()),t&2){let e=d(2).$implicit,n=d(3);_("pTooltip",n.texts.folderWarnTooltip(e.warns)),O("aria-label",n.texts.folderWarnTooltip(e.warns))("data-testid","files-folder-warns-"+e.path),l(3),C(e.warns)}}function qA(t,i){if(t&1){let e=$();h(0,"tr",34),N("click",function(){w(e);let o=d().$implicit,r=d(3);return T(r.toggleFolder(o))})("keydown.enter",function(){w(e);let o=d().$implicit,r=d(3);return T(r.toggleFolder(o))})("keydown.space",function(o){w(e);let r=d().$implicit,a=d(3);return o.preventDefault(),T(a.toggleFolder(r))}),h(1,"td",35)(2,"span",36),F(3,"span",37),h(4,"button",38),N("click",function(o){w(e);let r=d().$implicit,a=d(3);return T(a.onToggleFolderVisibility(r,o))}),F(5,"i",39),m(),F(6,"i",40)(7,"i",41),h(8,"span",42),v(9),m(),h(10,"span",43),v(11),m()()(),F(12,"td")(13,"td")(14,"td"),h(15,"td",44)(16,"span",45),I(17,zA,4,4,"span",46),I(18,HA,4,4,"span",47),m()(),F(19,"td"),m()}if(t&2){let e=d().$implicit,n=d(3);Oe("--folder-depth",e.depth),_("@rowSlide",void 0),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),_("disabled",n.isCoveredByAncestor(e.path))("pTooltip",n.isCoveredByAncestor(e.path)?n.texts.mapCoveredTooltip:n.texts.mapVisibilityTooltip),O("data-state",n.isCoveredByAncestor(e.path)?"all":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.isCoveredByAncestor(e.path)||n.folderStateMap().get(e.path)==="all")("pi-minus",!n.isCoveredByAncestor(e.path)&&n.folderStateMap().get(e.path)==="some"),l(),ce("files__chevron--open",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)),l(6),M(e.errors>0?17:-1),l(),M(e.warns>0?18:-1)}}function GA(t,i){if(t&1&&(h(0,"span",66),v(1),m()),t&2){let e=d(3).$implicit;l(),C(e.prefix)}}function jA(t,i){if(t&1&&(h(0,"span",54)(1,"span",65),v(2),m(),I(3,GA,2,1,"span",66),m()),t&2){let e=d(2).$implicit;_("pTooltip",e.path),l(2),C(e.name),l(),M(e.prefix?3:-1)}}function UA(t,i){if(t&1&&(h(0,"span",67),v(1),m()),t&2){let e=d(3).$implicit;l(),C(e.prefix)}}function $A(t,i){if(t&1&&(h(0,"span",55),I(1,UA,2,1,"span",67),v(2),m()),t&2){let e=d(2).$implicit;l(),M(e.prefix?1:-1),l(),C(e.name)}}function WA(t,i){if(t&1&&F(0,"i",60),t&2){let e=d(2).$implicit;_("pTooltip",e.staleTooltip),O("aria-label",e.staleTooltip)}}function KA(t,i){if(t&1&&(h(0,"span",61),F(1,"i",48),h(2,"span",49),v(3),m()()),t&2){let e=d(2).$implicit;l(3),C(e.errors)}}function YA(t,i){if(t&1&&(h(0,"span",62),F(1,"i",50),h(2,"span",49),v(3),m()()),t&2){let e=d(2).$implicit;l(3),C(e.warns)}}function XA(t,i){if(t&1&&(h(0,"span",63),v(1),m()),t&2){let e=d(5);l(),C(e.texts.missing)}}function ZA(t,i){if(t&1){let e=$();h(0,"tr",51),N("click",function(){w(e);let o=d().$implicit,r=d(3);return T(r.onLeafActivate(o))})("keydown.enter",function(){w(e);let o=d().$implicit,r=d(3);return T(r.onLeafActivate(o))})("keydown.space",function(o){w(e);let r=d().$implicit,a=d(3);return o.preventDefault(),T(a.onLeafActivate(r))}),h(1,"td",35)(2,"span",36),F(3,"span",37),h(4,"button",38),N("click",function(o){w(e);let r=d().$implicit,a=d(3);return T(a.onToggleLeafVisibility(r,o))}),F(5,"i",39),m(),F(6,"span",52)(7,"i",53),I(8,jA,4,3,"span",54)(9,$A,3,2,"span",55),h(10,"button",56),N("click",function(o){w(e);let r=d().$implicit,a=d(3);return T(a.onSitemapClick(r,o))}),F(11,"i",57),m()()(),h(12,"td",58),v(13),m(),h(14,"td",58),v(15),m(),h(16,"td",59),v(17),m(),h(18,"td",44)(19,"span",45),I(20,WA,1,2,"i",60),I(21,KA,4,1,"span",61),I(22,YA,4,1,"span",62),I(23,XA,2,1,"span",63),m()(),h(24,"td",64),v(25),m()()}if(t&2){let e=d().$implicit,n=d(3);Oe("--folder-depth",e.depth),_("@rowSlide",void 0),O("aria-label",n.texts.leafAriaLabel(e.name))("data-testid","files-leaf-"+e.path),l(4),_("disabled",n.isCoveredByAncestor(e.path))("pTooltip",n.isCoveredByAncestor(e.path)?n.texts.mapCoveredTooltip: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),M(n.isFlat()?8:9),l(2),_("pTooltip",n.texts.isolateTooltip),O("aria-label",n.texts.isolateAriaLabel(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),M(e.isStale?20:-1),l(),M(e.errors>0?21:-1),l(),M(e.warns>0?22:-1),l(),M(!e.isStale&&e.errors===0&&e.warns===0?23:-1),l(),O("title",e.modifiedAtFull||null),l(),C(e.modifiedAt)}}function QA(t,i){if(t&1&&I(0,qA,20,27,"tr",32)(1,ZA,26,26,"tr",33),t&2){let e=i.$implicit;M(e.type==="folder"?0:1)}}function JA(t,i){if(t&1&&(h(0,"div",6)(1,"p-table",13),P(2,VA,27,70,"ng-template",14)(3,QA,2,1,"ng-template",15),m()()),t&2){let e=d(2);l(),_("value",e.rows())("paginator",!1)("scrollable",!0)("scrollHeight","flex")("rowTrackBy",e.trackByPath)}}function eL(t,i){if(t&1&&I(0,LA,3,1,"div",5)(1,JA,4,5,"div",6),t&2){let e=d();M(e.rows().length===0?0:1)}}var Bb=(()=>{class t{loader=p(pt);filters=p(nn);nodeOpenIntent=p(co);mapVisibility=p(so);mapIsolate=p(us);texts=Kn;loading=this.loader.loading;error=this.loader.error;filtersActive=this.filters.isActive;showLoading=S(()=>this.loading()&&this.loader.corpusCount()===0);expanded=K(Tb());sort=K(Ab());sortState=this.sort.asReadonly();isFlat=S(()=>this.sort().column!=="tree");trackByPath=(e,n)=>n.path;constructor(){se(()=>{Sb(this.expanded())}),se(()=>{Lb(this.sort())})}issueMaps=S(()=>Fb(this.loader.liteNodes()));filteredNodes=S(()=>{let e=this.issueMaps(),n={errors:new Set(e.errorCounts.keys()),warns:new Set(e.warnCounts.keys())};return this.filters.apply(this.loader.liteNodeViews(),n)});tree=S(()=>Pb(this.filteredNodes()));aggregates=S(()=>Rb(this.tree(),this.issueMaps()));rows=S(()=>Ob({tree:this.tree(),leaves:this.filteredNodes(),expanded:this.expanded(),aggregates:this.aggregates(),maps:this.issueMaps(),sort:this.sort()}));folderStateMap=S(()=>{let e=this.mapVisibility.paths(),n=new Map,o=r=>{let a=e.has(r.path),s=!1;for(let c of r.leaves)e.has(c.path)&&(s=!0);for(let c of r.subfolders.values())o(c)&&(s=!0);return n.set(r.path,a?"all":s?"some":"none"),a||s};return o(this.tree()),n});leafVisible(e){let n=this.mapVisibility.paths();if(n.has(e))return!0;for(let o of n)if(o!==""&&e.startsWith(`${o}/`))return!0;return!1}isCoveredByAncestor(e){let n=this.mapVisibility.paths();for(let o of n)if(o!==""&&o!==e&&e.startsWith(`${o}/`))return!0;return!1}ngOnInit(){this.loader.liteNodes().length===0&&!this.loader.loading()&&this.loader.load()}toggleFolder(e){let n=new Set(this.expanded());n.has(e.path)?n.delete(e.path):n.add(e.path),this.expanded.set(n)}expandAll(){let e=new Set,n=o=>{o.path&&e.add(o.path);for(let r of o.subfolders.values())n(r)};n(this.tree()),this.expanded.set(e)}collapseAll(){this.expanded.set(new Set)}onSortColumn(e){this.sort.set(Nb(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(),this.mapVisibility.toggleFolder(e.path)}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","rowTrackBy"],["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"],["data-testid","files-col-modified",1,"files__col-num",2,"width","120px"],["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"],["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","disabled","pTooltip"],["aria-hidden","true",1,"pi"],["aria-hidden","true",1,"pi","pi-chevron-right","files__chevron"],["aria-hidden","true",1,"pi","files__folder-icon"],[1,"files__name","files__name--folder"],[1,"files__count"],[1,"files__cell-issues"],[1,"files__issues-row"],["tooltipPosition","top",1,"files__issue","files__issue--error",3,"pTooltip"],["tooltipPosition","top",1,"files__issue","files__issue--warn",3,"pTooltip"],["aria-hidden","true",1,"pi","pi-times-circle"],[1,"files__issue-count"],["aria-hidden","true",1,"pi","pi-exclamation-triangle"],["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-num","files__cell-tokens"],["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__cell-num","files__cell-modified"],[1,"files__leaf-name"],[1,"files__path-suffix"],[1,"files__name-prefix"]],template:function(n,o){n&1&&(h(0,"section",0),I(1,OA,1,1,"p-message",1),I(2,FA,4,4,"div",2)(3,eL,2,1),m()),n&2&&(l(),M(o.error()?1:-1),l(),M(o.showLoading()?2:o.error()?-1:3))},dependencies:[bb,$f,Pt,wb,Wf,mv,fv,on,Gt,Le,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__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%]:disabled{opacity:.45;cursor:default}.files__vis-check[_ngcontent-%COMP%]:disabled:hover{border-color:var(--p-content-border-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;transition:transform .2s ease}.files__chevron--open[_ngcontent-%COMP%]{transform:rotate(90deg)}.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__cell-modified[_ngcontent-%COMP%]{white-space:nowrap;font-variant-numeric:tabular-nums}.files__stale-icon[_ngcontent-%COMP%]{font-size:var(--files-fs-sm);color:var(--p-text-color);line-height:1;opacity:.65}.files__issues-row[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.6rem}.files__issue[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.3rem;font-weight:600;font-size:var(--files-fs-sm);line-height:1;opacity:.65}.files__issue[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:var(--files-fs-sm);line-height:1}.files__issue-count[_ngcontent-%COMP%]{font-variant-numeric:tabular-nums}.files__issue--error[_ngcontent-%COMP%]{color:var(--sm-severity-error)}.files__issue--warn[_ngcontent-%COMP%]{color:var(--sm-severity-warn)}.files__cell-issues-empty[_ngcontent-%COMP%]{color:var(--p-text-muted-color);font-family:var(--sm-font-mono);font-size:var(--files-fs-mono)}"],data:{animation:[Sf("rowSlide",[Qa(":enter",[lr({opacity:0,transform:"translateY(-12px)"}),Za("200ms ease-out",lr({opacity:1,transform:"translateY(0)"}))]),Qa(":leave",[Za("160ms ease-in",lr({opacity:0,transform:"translateY(-12px)"}))])])]},changeDetection:0})}return t})();var Si=class{constructor(i,e,n,o,r){this.center=i,this.radiusX=e,this.radiusY=n,this.startAngle=o,this.endAngle=r}},H=class t{static castToPoint(i){return i||t.initialize()}static initialize(i=0,e=0){return{x:i,y:e}}static copy(i){return t.initialize(i.x,i.y)}static isEqual(i,e){return i.x===e.x&&i.y===e.y}static sum(i,e){return{x:i.x+e.x,y:i.y+e.y}}static sub(i,e){return{x:i.x-e.x,y:i.y-e.y}}static div(i,e){return{x:i.x/e,y:i.y/e}}static mult(i,e){return{x:i.x*e,y:i.y*e}}static interpolatePoints(i,e,n){let o=1-n;return t.initialize(i.x*o+e.x*n,i.y*o+e.y*n)}static roundTo(i,e){let n=Math.trunc(i.x/e),o=Math.trunc(i.y/e);return{x:n*e,y:o*e}}static hypotenuse(i,e){let n=e.x-i.x,o=e.y-i.y;return Math.abs(Math.sqrt(n*n+o*o))}static distance(i,e){let n=i.x-e.x,o=i.y-e.y;return Math.sqrt(n*n+o*o)}static getMinimum(i,e){return t.initialize(Math.min(i.x,e.x),Math.min(i.y,e.y))}static getMaximum(i,e){return t.initialize(Math.max(i.x,e.x),Math.max(i.y,e.y))}static matrixTransform(i,e){let n=t.initialize(i.x,i.y),o=e.getScreenCTM();if(o){let r=e.createSVGPoint();r.x=i.x,r.y=i.y,n=r.matrixTransform(o.inverse())}return n}static elementTransform(i,e){let n=t.initialize(i.x,i.y),o=e.getBoundingClientRect();return n=t.sub(n,t.initialize(o.left,o.top)),n}},he=class t{constructor(i=0,e=0){this.x=i,this.y=e}static fromPoint(i){return new t(i.x,i.y)}add(i){let e=H.sum(this,i);return t.fromPoint(e)}sub(i){let e=H.sub(this,i);return t.fromPoint(e)}subNumber(i){let e=H.sub(this,new t(i,i));return t.fromPoint(e)}div(i){let e=H.div(this,i);return t.fromPoint(e)}mult(i){let e=H.mult(this,i);return t.fromPoint(e)}matrixTransform(i){let e=H.matrixTransform(this,i);return t.fromPoint(e)}elementTransform(i){let e=H.elementTransform(this,i);return t.fromPoint(e)}},gr=class{static initialize(i=H.initialize(),e=H.initialize()){return{point1:i,point2:e}}static copy(i){return{point1:i.point1,point2:i.point2}}static hypotenuse(i){return Math.sqrt(Math.pow(i.point1.x-i.point2.x,2)+Math.pow(i.point1.y-i.point2.y,2))}},ki=class{constructor(i,e){this.point1=i,this.point2=e}},ne=class t{static initialize(i=0,e=0,n=0,o=0){n<0&&(i=i+n,n=-n),o<0&&(e=e+o,o=-o);let r=H.initialize(i+n/2,e+o/2);return{x:i,y:e,width:n,height:o,gravityCenter:r}}static copy(i){return t.initialize(i.x,i.y,i.width,i.height)}static fromElement(i){let{x:e,y:n,width:o,height:r}=i.getBoundingClientRect();return t.initialize(e,n,o,r)}static isIncludePoint(i,e){return e.x>=t.left(i)&&e.x<=t.right(i)&&e.y>=t.top(i)&&e.y<=t.bottom(i)}static intersectionWithRect(i,e){return!(i.x+i.width<e.x||e.x+e.width<i.x||i.y+i.height<e.y||e.y+e.height<i.y)}static left(i){return i.x}static top(i){return i.y}static right(i){return i.x+i.width}static bottom(i){return i.y+i.height}static addPoint(i,e){let n=t.copy(i);return n.x+=e.x,n.y+=e.y,this.initialize(n.x,n.y,n.width,n.height)}static mult(i,e){let n=t.copy(i);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(i,e){let n=t.copy(i);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(i,e){let n=t.copy(i);return n.width+=e.x,n.height+=e.y,this.initialize(n.x,n.y,n.width,n.height)}static union(i){return!i||i.length===0?null:i.reduce((e,n)=>{let o=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(o,r,a-o,s-r)},i[0])}static elementTransform(i,e){let n=e.getBoundingClientRect(),o=H.sub(i,H.initialize(n.left,n.top));return t.initialize(o.x,o.y,i.width,i.height)}static updateIsNotFinite(i){return!Number.isFinite(i.width)||!Number.isFinite(i.height)||!Number.isFinite(i.x)||!Number.isFinite(i.y)?t.initialize(0,0,0,0):i}};function Vb(t,i){let e=Math.max(t.width,i),n=Math.max(t.height,i),o=(e-t.width)/2,r=(n-t.height)/2;return ne.initialize(t.x-o,t.y-r,e,n)}function Zf(t,i){t=ne.updateIsNotFinite(t),i.setAttribute("x",t.x.toString()),i.setAttribute("y",t.y.toString()),i.setAttribute("width",t.width.toString()),i.setAttribute("height",t.height.toString())}function zb(t,i){t=ne.updateIsNotFinite(t),i.setAttribute("viewBox",`${t.x} ${t.y} ${t.width} ${t.height}`)}var rt=class t{constructor(i=0,e=0,n=0,o=0,r=0,a=0,s=0,c=0){this.x=i,this.y=e,this.width=n,this.height=o,this.radius1=r,this.radius2=a,this.radius3=s,this.radius4=c,this.gravityCenter=H.initialize(),this.gravityCenter=this.calculateGravityCenter(this)}calculateGravityCenter(i){return new he(i.x+i.width/2,i.y+i.height/2)}static fromRect(i){return new t(i.x,i.y,i.width,i.height)}static fromRoundedRect(i){return new t(i.x,i.y,i.width,i.height,i.radius1,i.radius2,i.radius3,i.radius4)}static fromCenter(i,e,n){return new t(i.gravityCenter.x-e/2,i.gravityCenter.y-n/2,e,n,i.radius1,i.radius2,i.radius3,i.radius4)}static fromPoint(i){return new t(i.x,i.y)}addPoint(i){let e=t.fromRoundedRect(this);return e.x+=i.x,e.y+=i.y,e.gravityCenter=this.calculateGravityCenter(e),e}},Tt=class t{static initialize(i=0,e=0){return{width:i,height:e}}static isEqual(i,e){return i.width===e.width&&i.height===e.height}static offsetFromElement(i){if(i instanceof SVGGraphicsElement){let e=i.getBBox();return t.initialize(e.width,e.height)}else if(i instanceof HTMLElement)return t.initialize(i.offsetWidth,i.offsetHeight)}};function tL(){return{position:H.initialize(),scaledPosition:H.initialize(),scale:1,rotate:0}}function nL(t){let i;if(t){t=t.replace("matrix(",""),t=t.replace(")","");let e=t.split(" ");i={position:{x:Number(e[4]),y:Number(e[5])},scaledPosition:H.initialize(),scale:Number(e[0]),rotate:0}}return i}var Xn=class{static toString(i){let e=H.sum(i.position,i.scaledPosition);return`matrix(${i.scale}, 0, 0, ${i.scale}, ${e.x}, ${e.y})`}static fromString(i){return nL(i)}static default(){return tL()}},Ft=class t{static initialize(i=0,e=0){return H.initialize(i,e)}static fromPoints(i,e){return t.initialize(e.x-i.x,e.y-i.y)}static vectorLength(i){return Math.sqrt(t.magnitudeSquared(i))}static magnitudeSquared(i){return i.x*i.x+i.y*i.y}static dotProduct(i,e){return i.x*e.x+i.y*e.y}static crossProduct(i,e){return i.x*e.y-i.y*e.x}static subtract(i,e){return t.initialize(i.x-e.x,i.y-e.y)}static add(i,e){return t.initialize(i.x+e.x,i.y+e.y)}static scale(i,e){return t.initialize(i.x*e,i.y*e)}static angle(i,e){let n=Math.acos(Math.max(-1,Math.min(t.dotProduct(i,e)/(t.vectorLength(i)*t.vectorLength(e)),1)));return t.crossProduct(i,e)<0?-n:n}},Xf=class{static parseRoundedRect(i){let e=Math.PI*.5,n=i.x,o=i.y,r=i.x+i.width,a=i.y+i.height,s=i.x+i.radius1,c=i.y+i.radius1,u=i.x+i.width-i.radius2,f=i.y+i.radius2,g=i.x+i.width-i.radius3,x=i.y+i.height-i.radius3,R=i.x+i.radius4,k=i.y+i.height-i.radius4;return[new Si({x:s,y:c},i.radius1,i.radius1,2*e,3*e),new ki({x:s,y:o},{x:u,y:o}),new Si({x:u,y:f},i.radius2,i.radius2,3*e,4*e),new ki({x:r,y:f},{x:r,y:x}),new Si({x:g,y:x},i.radius3,i.radius3,0,e),new ki({x:g,y:a},{x:R,y:a}),new Si({x:R,y:k},i.radius4,i.radius4,e,2*e),new ki({x:n,y:k},{x:n,y:c})]}},fo=class{static getRoundedRectIntersections(i,e,n){let o=Xf.parseRoundedRect(n);for(let r of o)if(r instanceof Si){let a=this.intersectArcWithLine(r,i,e);if(a.length>0)return a}else if(r instanceof ki){let a=this.intersectLineSegments(i,e,r.point1,r.point2);if(a)return[a]}return[]}static getRoundedRectIntersectionsWithSVGPath(i,e){let n=i.getTotalLength(),o=[];for(let r=0;r<=n;r+=1){let a=i.getPointAtLength(r);o.push({x:a.x,y:a.y})}for(let r=1;r<o.length;r++){let a=this.getRoundedRectIntersections(o[r-1],o[r],e);if(a.length>0)return a}return[]}static intersectArcWithLine(i,e,n){return this.filterPointsWithinArc(this.findEllipseLineIntersections(i.center,i.radiusX,i.radiusY,e,n),i)}static intersectLineSegments(i,e,n,o){let r=e.x-i.x,a=e.y-i.y,s=o.x-n.x,c=o.y-n.y,u=(-a*(i.x-n.x)+r*(i.y-n.y))/(-s*a+r*c),f=(s*(i.y-n.y)-c*(i.x-n.x))/(-s*a+r*c);return u>=0&&u<=1&&f>=0&&f<=1?{x:i.x+f*r,y:i.y+f*a}:null}static filterPointsWithinArc(i,e){let{center:n,startAngle:o,endAngle:r}=e;if(i.length===0)return i;r<o&&([o,r]=[r,o]),(o<0||r<0)&&(o+=2*Math.PI,r+=2*Math.PI);let a=[];for(let s of i){let c=this.normalizeAngle(Ft.angle(Ft.initialize(1,0),Ft.initialize(s.x-n.x,s.y-n.y)));c<o&&(c+=2*Math.PI),o<=c&&c<=r&&a.push(s)}return a}static normalizeAngle(i){let e=i%(2*Math.PI);return e<0?e+2*Math.PI:e}static findEllipseLineIntersections(i,e,n,o,r){let a=Ft.initialize(o.x,o.y),s=Ft.fromPoints(o,r),c=Ft.initialize(i.x,i.y),u=Ft.subtract(a,c),f=Ft.initialize(s.x/(e*e),s.y/(n*n)),g=Ft.initialize(u.x/(e*e),u.y/(n*n)),x=Ft.dotProduct(s,f),R=Ft.dotProduct(s,g),k=Ft.dotProduct(u,g)-1,A=R*R-x*k;return A<0?[]:this.calculateIntersectionPoints(A,x,R,o,r)}static calculateIntersectionPoints(i,e,n,o,r){let a=[];if(i>0){let s=Math.sqrt(i),c=(-n-s)/e,u=(-n+s)/e;c>=0&&c<=1&&a.push(H.interpolatePoints(o,r,c)),u>=0&&u<=1&&a.push(H.interpolatePoints(o,r,u))}else{let s=-n/e;s>=0&&s<=1&&a.push(H.interpolatePoints(o,r,s))}return a}};var Qf=class{handle(i,e){let n=!0;if(this.validator&&(n=e.get(this.validator).handle(i)),!!n)return e.get(this.execution).handle(i)}execute(i,e){return e.get(this.execution).handle(i)}setValidator(i){this.validator=i}setExecution(i){this.execution=i}},V=class t{constructor(){this._injector=p(mt)}static registerPipeline(i,e,n){if(!i||!i.fToken)throw new Error("Type must have a fToken static property.");let o=this.pipelines.get(i.fToken)||new Qf;n?o.setValidator(e):o.setExecution(e),this.pipelines.set(i.fToken,o)}send(i){let e=t.pipelines.get(i.constructor.fToken);if(e)return e.handle(i,this._injector);throw new Error("Handler not registered for request type.")}execute(i){return t.pipelines.get(i.constructor.fToken).execute(i,this._injector)}};V.pipelines=new Map;V.\u0275fac=function(i){return new(i||V)};V.\u0275prov=y({token:V,factory:V.\u0275fac});function D(t){return function(i){V.registerPipeline(t,i,!1)}}var iL=(()=>{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})(),oL=(()=>{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})(),rL=new ve("F_LOCAL_STORAGE",{providedIn:"root",factory:()=>qt(p(Ha))?p(iL):p(oL)}),aL=(()=>{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,o){window.open(e,n,o)}static \u0275fac=function(n){return new(n||t)};static \u0275prov=y({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),sL=(()=>{class t{getComputedStyle(e){return new Proxy({getPropertyValue:n=>"0"},{get:(n,o)=>o==="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,o){}static \u0275fac=function(n){return new(n||t)};static \u0275prov=y({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),lL=new ve("F_WINDOW",{providedIn:"root",factory:()=>qt(p(Ha))?p(aL):p(sL)}),Zn=(function(t){return t.MAC_OS="macos",t.IOS="ios",t.WINDOWS="windows",t.ANDROID="android",t.LINUX="linux",t})(Zn||{}),Jf;try{Jf=typeof Intl<"u"&&Intl.v8BreakIterator}catch{Jf=!1}var em=(()=>{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||Jf)&&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?qt(this._platformId):typeof document=="object"&&!!document}getOS(){let e=navigator.userAgent.toLowerCase(),n=/(macintosh|macintel|macppc|mac68k|macos)/i,o=/(win32|win64|windows|wince)/i,r;return n.test(e)?r=Zn.MAC_OS:this.IOS?r=Zn.IOS:o.test(e)?r=Zn.WINDOWS:this.ANDROID?r=Zn.ANDROID:!r&&/linux/.test(e)&&(r=Zn.LINUX),r}static \u0275fac=function(n){return new(n||t)(Qi(Ha))};static \u0275prov=y({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),at=(()=>{class t{injectedDocument;windowService;localStorageService;platformService;constructor(e,n,o,r){this.injectedDocument=e,this.windowService=n,this.localStorageService=o,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,o,r){if(e.endsWith("px"))return parseFloat(e);if(e.endsWith("%")){let a=parseFloat(e)/100;return Math.max(n,o)*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)(Qi(za),Qi(lL),Qi(rL),Qi(em))};static \u0275prov=y({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function tm(t,i){return t.reduce((e,n)=>[...e,...i(n)],[])}function nm(t){let i=t.cloneNode(!0),e=i.querySelectorAll("[id]"),n=t.nodeName.toLowerCase();i.removeAttribute("id");for(let o=0;o<e.length;o++)e[o].removeAttribute("id");return n==="canvas"?Gb(t,i):(n==="input"||n==="select"||n==="textarea")&&qb(t,i),Hb("canvas",t,i,Gb),Hb("input, textarea, select",t,i,qb),i}function Hb(t,i,e,n){let o=i.querySelectorAll(t);if(o.length){let r=e.querySelectorAll(t);for(let a=0;a<o.length;a++)n(o[a],r[a])}}var cL=0;function qb(t,i){i.type!=="file"&&(i.value=t.value),i.type==="radio"&&i.name&&(i.name=`mat-clone-${i.name}-${cL++}`)}function Gb(t,i){let e=i.getContext("2d");if(e)try{e.drawImage(t,0,0)}catch{}}function im(t,i,e){for(let n in i)if(i.hasOwnProperty(n)){let o=i[n];o?t.setProperty(n,o,e?.has(n)?"important":""):t.removeProperty(n)}return t}function jb(t){im(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 Ub(t,i,e){return dL(t,e).dataset[i]}function dL(t,i){return t.closest(i)}function om(t,i){let e=t.rootNodes;if(e.length===1&&e[0].nodeType===i.ELEMENT_NODE)return e[0];let n=i.createElement("div");return e.forEach(o=>n.appendChild(o)),n}function vr(t,i){let e=uL(t,i);return!!e&&!e.classList.contains(i+"-disabled")}function uL(t,i){return t.closest(i)}function Fn(t){return t.match(/^[a-zA-Z_]/)||(t="_"+t),t.replace(/[^a-zA-Z0-9_\-:.]/g,"_")}function mo(t,i,e){let n=e[t.toUpperCase()]||pL(e,t.toLowerCase());if(n===void 0)throw new Error(`Unknown ${i}: ${t}. Accepted values: ${Object.keys(e).join(", ")}`);return n}function pL(t,i){return Object.keys(t).find(e=>t[e]===i)}var hL=["markerElement"],fL=["fConnectionGradientRenderer",""],mL=["f-connection-path",""],_L=["fConnectionSelection",""],gL=["f-connection-drag-handle-start",""],vL=["f-connection-drag-handle-end",""],bL=["defs"],yL=["*"],CL=["fGroupsContainer"],xL=["fNodesContainer"],wL=["fConnectionsContainer"],TL=[[["","fGroup",""],["","fGroups",""]],[["f-snap-connection"]],[["f-connection"],["","fConnections",""]],[["f-connection-for-create"]],[["","fNode",""],["","fNodes",""]]],SL=["[fGroup], [fGroups]","f-snap-connection","f-connection, [fConnections]","f-connection-for-create","[fNode], [fNodes]"],kL=[[["svg","fMarker",""]],[["f-connection-marker-circle"],["f-connection-marker-arrow"]],[["f-connection-gradient"]],[["f-connection-waypoints"]],[["","fConnectionContent",""]]],IL=["svg[fMarker]","f-connection-marker-circle, f-connection-marker-arrow","f-connection-gradient","f-connection-waypoints","[fConnectionContent]"];function ML(t,i){t&1&&(X(),F(0,"linearGradient",3)),t&2&&_("fConnectionGradientRendererFor",i)}function EL(t,i){t&1&&(X(),F(0,"circle",6))}function DL(t,i){t&1&&Ue(0,4)}var PL="[_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}",RL=[[["","fDefinitions",""]],[["f-background"]],[["f-line-alignment"]],[["f-canvas"]],[["f-selection-area"]],"*"],OL=["[fDefinitions]","f-background","f-line-alignment","f-canvas","f-selection-area","*"],cm=new ve("F_BACKGROUND_PATTERN"),qd=class{fPattern;static fToken=Symbol("AddPatternToBackgroundRequest");constructor(i){this.fPattern=i}},yo=class{_items=[];_byId=new Map;get(i){return this._byId.get(i)}require(i){let e=this._byId.get(i);if(!e)throw new Error(`${this.kind} not found: ${i}`);return e}has(i){return this._byId.has(i)}getAll(){return this._items}size(){return this._items.length}add(i){let e=i.fId();if(this._byId.has(e))throw new Error(`${this.kind} already exists: ${e}`);this._items.push(i),this._byId.set(e,i)}addMany(i){for(let e of i)this.add(e)}remove(i){let e=i.fId(),n=this._byId.get(e);if(!n)return!1;this._byId.delete(e);let o=this._items.indexOf(n);return o>=0&&this._items.splice(o,1),!0}removeById(i){let e=this._byId.get(i);if(!e)return;this._byId.delete(i);let n=this._items.indexOf(e);return n>=0&&this._items.splice(n,1),e}clear(){this._items.length=0,this._byId.clear()}};function Ii(t){return{name:t}}var dm=class{_instances=new Map;get(i){return this._instances.get(i.name)}require(i){let e=this.get(i);if(!e)throw new Error(`Instance not found: ${i.name}`);return e}has(i){return this._instances.has(i.name)}add(i,e){if(this._instances.has(i.name))throw new Error(`${i.name} already exists`);this._instances.set(i.name,e)}remove(i){if(!this._instances.has(i.name))throw new Error(`${i.name} does not exist`);return this._instances.delete(i.name),!0}clear(){this._instances.clear()}},yr=class extends yo{kind;constructor(i){super(),this.kind=i}},um=class extends yo{kind="Connection Marker"},pm=class extends yo{kind="Connection";_instancesForCreate;_instancesForSnap;getForSnap(){return this._instancesForSnap}getForCreate(){return this._instancesForCreate}addForCreate(i){this._instancesForCreate=i}addForSnap(i){this._instancesForSnap=i}removeInstanceForCreate(){this._instancesForCreate=void 0}removeInstanceForSnap(){this._instancesForSnap=void 0}},hm=class extends yo{kind="Node"},go=class{notifyOnSubscribe;static fToken=Symbol("ListenConnectionsChangesRequest");constructor(i=!0){this.notifyOnSubscribe=i}};function FL(){return t=>{let i=null,e=null,n=()=>{i!==null&&cancelAnimationFrame(i),e!==null&&cancelAnimationFrame(e),i=e=null};return{callback:()=>{n(),i=requestAnimationFrame(()=>{i=null,e=requestAnimationFrame(()=>{e=null,t()})})},cleanup:n}}}function NL(){return t=>{let i=null;return{callback:()=>{i!==null&&cancelAnimationFrame(i),i=requestAnimationFrame(()=>{i=null,t()})},cleanup:()=>{i!==null&&cancelAnimationFrame(i),i=null}}}}function Gd(t){return i=>{let e=null;return{callback:()=>{e!==null&&clearTimeout(e),e=setTimeout(()=>{e=null,i()},t)},cleanup:()=>{e!==null&&clearTimeout(e),e=null}}}}var rn=class{_listeners=new Set;notify(){this._listeners.forEach(i=>i())}listen(i){return this._listeners.add(i),()=>this.stop(i)}stop(i){this._listeners.delete(i)}},fm=class extends rn{_htmlElement;_observer=new ResizeObserver(()=>this.notify());_isObserving=!1;constructor(i){super(),this._htmlElement=i}listen(i){return this._isObserving||(this._observer.observe(this._htmlElement),this._isObserving=!0),super.listen(i)}stop(i){super.stop(i),this._listeners.size===0&&this._disconnect()}_disconnect(){this._observer.unobserve(this._htmlElement),this._observer.disconnect(),this._isObserving=!1}},xn=class t{_channels=[];_operators=[];constructor(...i){this._channels=[...i]}pipe(...i){let e=new t(...this._channels);return e._operators=[...this._operators,...i],e}listen(i,e){let n=e,o=[],r=[],a=[];for(let g of[...this._operators].reverse()){let x=g(n);n=x.callback,x.cleanup&&o.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,f=()=>{u||(u=!0,c?.(),c=null,s.forEach(g=>g()),o.forEach(g=>g()))};a.slice().reverse().forEach(g=>g(f)),r.slice().reverse().forEach(g=>g(n)),c=i.onDestroy(f)}};function bh(){return t=>{let i=!0;return{callback:t,onSubscribe:e=>{queueMicrotask(()=>{i&&e()})},cleanup:()=>{i=!1}}}}function $b(){return t=>{let i=!1,e=null;return{setTeardown:n=>e=n,callback:()=>{if(!i){i=!0;try{t()}finally{e?.()}}}}}}var AL=(()=>{let t=class bs{_store=p(L);handle({notifyOnSubscribe:e}){return e?new xn(this._store.connectionsChanges$).pipe(bh(),Gd(1)):new xn(this._store.connectionsChanges$).pipe(Gd(1))}static \u0275fac=function(n){return new(n||bs)};static \u0275prov=y({token:bs,factory:bs.\u0275fac})};return t=E([D(go)],t),t})(),mm=class{static fToken=Symbol("ListenNodesChangesRequest")},LL=(()=>{let t=class ys{_store=p(L);handle(e){return new xn(this._store.nodesChanges$)}static \u0275fac=function(n){return new(n||ys)};static \u0275prov=y({token:ys,factory:ys.\u0275fac})};return t=E([D(mm)],t),t})(),jd=class{static fToken=Symbol("ListenTransformChangesRequest")},BL=(()=>{let t=class Cs{_store=p(L);handle(e){return new xn(this._store.transformChanges$,this._store.connectionsChanges$,this._store.nodesChanges$)}static \u0275fac=function(n){return new(n||Cs)};static \u0275prov=y({token:Cs,factory:Cs.\u0275fac})};return t=E([D(jd)],t),t})(),Mi=class{static fToken=Symbol("EmitConnectionsChangesRequest")},VL=(()=>{let t=class xs{_store=p(L);handle(e){this._store.emitConnectionChanges()}static \u0275fac=function(n){return new(n||xs)};static \u0275prov=y({token:xs,factory:xs.\u0275fac})};return t=E([D(Mi)],t),t})(),ti=class{static fToken=Symbol("NotifyTransformChangedRequest")},L=(()=>{class t{transformChanges$=new rn;viewportAnimationChanges$=new rn;connectionsChanges$=new rn;_connectionsRevision=0;connectionsRenderedChanges$=new rn;_connectionsRenderedRevision=0;_connectionsRenderedNodesRevision=0;_viewportAnimationCount=0;nodesChanges$=new rn;_nodesRevision=0;progressiveRenderChanges$=new rn;_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 hm;connections=new pm;connectionMarkers=new um;outputs=new yr("Output");inputs=new yr("Input");outlets=new yr("Outlet");instances=new dm;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})(),Ke={MAGNETIC_LINES:Ii("magnetic-lines"),MAGNETIC_RECTS:Ii("magnetic-rects"),ZOOM:Ii("zoom-controls"),BACKGROUND:Ii("background"),SELECTION_AREA:Ii("selection-area"),MINIMAP:Ii("minimap"),AUTO_PAN:Ii("auto-pan")},zL=(()=>{let t=class ws{_store=p(L);handle(e){this._store.transformChanged()}static \u0275fac=function(n){return new(n||ws)};static \u0275prov=y({token:ws,factory:ws.\u0275fac})};return t=E([D(ti)],t),t})(),ni=class{key;instance;static fToken=Symbol("RegisterPluginInstanceRequest");constructor(i,e){this.key=i,this.instance=e}},HL=(()=>{let t=class Ts{_store=p(L);handle({key:e,instance:n}){this._store.instances.add(e,n)}static \u0275fac=function(n){return new(n||Ts)};static \u0275prov=y({token:Ts,factory:Ts.\u0275fac})};return t=E([D(ni)],t),t})(),ii=class{key;static fToken=Symbol("RemovePluginInstanceRequest");constructor(i){this.key=i}},qL=(()=>{let t=class Ss{_store=p(L);handle({key:e}){this._store.instances.remove(e)}static \u0275fac=function(n){return new(n||Ss)};static \u0275prov=y({token:Ss,factory:Ss.\u0275fac})};return t=E([D(ii)],t),t})(),GL=[L,LL,AL,BL,VL,zL,HL,qL],jL=0,UL=(()=>{let t=class ks{_store=p(L);_browser=p(at);get _backgroundElement(){return this._store.instances.get(Ke.BACKGROUND)?.hostElement}handle(e){let n=this._getPatterns(e.fPattern?.hostElement);if(!n?.length)return;let o=bo("defs",this._browser);if(e.fPattern?.hostElement.remove(),n.forEach(r=>{o.append(r)}),n.length){this._backgroundElement?.firstChild?.appendChild(o),n[n.length-1].id="f-background-pattern-"+jL++;let r=n[n.length-1].id,a=bo("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||Xn.default();e.fPattern?.setTransform(s)}}_getPatterns(e){return Array.from(e?.getElementsByTagName("pattern")||[])}static \u0275fac=function(n){return new(n||ks)};static \u0275prov=y({token:ks,factory:ks.\u0275fac})};return t=E([D(qd)],t),t})(),Cr=class{fTransform;static fToken=Symbol("SetBackgroundTransformRequest");constructor(i){this.fTransform=i}},$L=(()=>{let t=class Is{_store=p(L);handle(e){this._store.instances.get(Ke.BACKGROUND)?.setTransform(e.fTransform)}static \u0275fac=function(n){return new(n||Is)};static \u0275prov=y({token:Is,factory:Is.\u0275fac})};return t=E([D(Cr)],t),t})(),WL=[UL,$L],Ud=class{instance;static fToken=Symbol("AddCanvasToStoreRequest");constructor(i){this.instance=i}},KL=(()=>{let t=class Ms{_store=p(L);handle({instance:e}){this._store.fCanvas=e}static \u0275fac=function(n){return new(n||Ms)};static \u0275prov=y({token:Ms,factory:Ms.\u0275fac})};return t=E([D(Ud)],t),t})(),$d=class{id;animated;static fToken=Symbol("CenterGroupOrNodeRequest");constructor(i,e){this.id=i,this.animated=e}},YL=(()=>{let t=class Es{_store=p(L);_mediator=p(V);get _transform(){return this._store.transform}handle({id:e,animated:n}){let o=this._store.nodes.get(e);o&&(this._toCenter(this._getNodeRect(o),this._getFlowRect(),o._position),this._mediator.execute(new Co(n,Ei.VIEWPORT_ONLY)))}_toCenter(e,n,o){this._transform.scaledPosition=H.initialize(),this._transform.position=H.initialize((n.width-e.width)/2-o.x*this._transform.scale,(n.height-e.height)/2-o.y*this._transform.scale)}_getNodeRect(e){return ne.fromElement(e.hostElement)}_getFlowRect(){return ne.fromElement(this._store.flowHost)}static \u0275fac=function(n){return new(n||Es)};static \u0275prov=y({token:Es,factory:Es.\u0275fac})};return t=E([D($d)],t),t})(),Wd=class{toCenter;animated;static fToken=Symbol("FitToFlowRequest");constructor(i,e){this.toCenter=i,this.animated=e}},XL=(()=>{let t=class Ds{_store=p(L);get _transform(){return this._store.transform}_mediator=p(V);handle({toCenter:e,animated:n}){let o=this._mediator.execute(new Mo)||ne.initialize();o.width===0||o.height===0||(this.fitToParent(o,ne.fromElement(this._store.flowHost),this._store.nodes.getAll().map(r=>r._position),e),this._mediator.execute(new Co(n,Ei.VIEWPORT_ONLY)))}fitToParent(e,n,o,r){this._transform.scaledPosition=H.initialize(),this._transform.position=this._getZeroPositionWithoutScale(o);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=H.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,o=e.length?Math.min(...e.map(r=>r.y)):0;return H.initialize(n,o)}static \u0275fac=function(n){return new(n||Ds)};static \u0275prov=y({token:Ds,factory:Ds.\u0275fac})};return t=E([D(Wd)],t),t})(),Kd=class{transform;position;static fToken=Symbol("InputCanvasPositionRequest");constructor(i,e){this.transform=i,this.position=e}},ZL=(()=>{let t=class Ps{_store=p(L);handle({transform:e,position:n}){n&&(H.isEqual(this._calculateTransformPosition(e),n)||(e.position=n,e.scaledPosition=H.initialize(),this._store.fCanvas?.redraw()))}_calculateTransformPosition(e){return H.sum(e.position,e.scaledPosition)}static \u0275fac=function(n){return new(n||Ps)};static \u0275prov=y({token:Ps,factory:Ps.\u0275fac})};return t=E([D(Kd)],t),t})(),Yd=class{transform;scale;static fToken=Symbol("InputCanvasScaleRequest");constructor(i,e){this.transform=i,this.scale=e}},QL=(()=>{let t=class Rs{_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||Rs)};static \u0275prov=y({token:Rs,factory:Rs.\u0275fac})};return t=E([D(Yd)],t),t})(),Ei=(function(t){return t.VIEWPORT_ONLY="VIEWPORT_ONLY",t.WITH_CONNECTION_CHANGES="WITH_CONNECTION_CHANGES",t})(Ei||{}),Co=class{animated;context;static fToken=Symbol("RedrawCanvasWithAnimationRequest");constructor(i,e=Ei.WITH_CONNECTION_CHANGES){this.animated=i,this.context=e}};function by(t,i){let e=n=>{n.propertyName==="transform"&&(t.removeEventListener("transitionend",e),i(n))};t.addEventListener("transitionend",e)}var JL=(()=>{let t=class Os{_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(),by(this._canvas.hostElement,()=>{this._store.endViewportAnimation(),e===Ei.WITH_CONNECTION_CHANGES&&this._store.emitConnectionChanges()})}_redraw(e){this._canvas?.redraw(),e===Ei.WITH_CONNECTION_CHANGES&&this._store.emitConnectionChanges()}static \u0275fac=function(n){return new(n||Os)};static \u0275prov=y({token:Os,factory:Os.\u0275fac})};return t=E([D(Co)],t),t})(),Xd=class{static fToken=Symbol("RemoveCanvasFromStoreRequest")},e5=(()=>{let t=class Fs{_store=p(L);handle(e){this._store.fCanvas=void 0}static \u0275fac=function(n){return new(n||Fs)};static \u0275prov=y({token:Fs,factory:Fs.\u0275fac})};return t=E([D(Xd)],t),t})(),Zd=class{static fToken=Symbol("ResetScaleRequest")},t5=(()=>{let t=class Ns{_store=p(L);get _transform(){return this._store.transform}handle(e){this._transform.scale=1,this._transform.scaledPosition=H.initialize()}static \u0275fac=function(n){return new(n||Ns)};static \u0275prov=y({token:Ns,factory:Ns.\u0275fac})};return t=E([D(Zd)],t),t})(),Qd=class{animated;static fToken=Symbol("ResetScaleAndCenterRequest");constructor(i){this.animated=i}},n5=(()=>{let t=class As{_mediator=p(V);_store=p(L);get _transform(){return this._store.transform}handle({animated:e}){let n=this._mediator.execute(new Mo)||ne.initialize();n.width===0||n.height===0||(this._oneToOneCentering(n,ne.fromElement(this._store.flowHost),this._store.nodes.getAll().map(o=>o._position)),this._mediator.execute(new Co(e,Ei.VIEWPORT_ONLY)))}_oneToOneCentering(e,n,o){this._transform.scaledPosition=H.initialize(),this._transform.position=this._getZeroPositionWithoutScale(o);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=H.initialize(r,a)}_getZeroPositionWithoutScale(e){let n=e.length?Math.min(...e.map(r=>r.x)):0,o=e.length?Math.min(...e.map(r=>r.y)):0;return H.initialize(n,o)}static \u0275fac=function(n){return new(n||As)};static \u0275prov=y({token:As,factory:As.\u0275fac})};return t=E([D(Qd)],t),t})(),Jd=class{scale;toPosition;static fToken=Symbol("UpdateScaleRequest");constructor(i,e){this.scale=i,this.toPosition=e}},i5=(()=>{let t=class Ls{_store=p(L);get _transform(){return this._store.transform}handle({scale:e,toPosition:n}){if(e===this._transform.scale)return;let o=H.sum(this._transform.scaledPosition,this._transform.position),r=n.x-(n.x-o.x)*e/this._transform.scale,a=n.y-(n.y-o.y)*e/this._transform.scale;this._transform.scale=e,this._transform.scaledPosition=H.sub(H.initialize(r,a),this._transform.position)}static \u0275fac=function(n){return new(n||Ls)};static \u0275prov=y({token:Ls,factory:Ls.\u0275fac})};return t=E([D(Jd)],t),t})(),o5=[KL,YL,XL,ZL,QL,JL,e5,t5,n5,i5],_m=class{connection;static fToken=Symbol("AddConnectionForCreateToStoreRequest");constructor(i){this.connection=i}},r5=(()=>{let t=class Bs{_store=p(L);handle({connection:e}){this._store.connections.addForCreate(e)}static \u0275fac=function(n){return new(n||Bs)};static \u0275prov=y({token:Bs,factory:Bs.\u0275fac})};return t=E([D(_m)],t),t})(),eu=class{instance;static fToken=Symbol("AddConnectionMarkerToStoreRequest");constructor(i){this.instance=i}},a5=(()=>{let t=class Vs{_store=p(L);handle({instance:e}){this._store.connectionMarkers.add(e),this._store.emitNodeChanges()}static \u0275fac=function(n){return new(n||Vs)};static \u0275prov=y({token:Vs,factory:Vs.\u0275fac})};return t=E([D(eu)],t),t})(),tu=class{connection;static fToken=Symbol("AddConnectionToStoreRequest");constructor(i){this.connection=i}},s5=(()=>{let t=class zs{_store=p(L);handle({connection:e}){this._store.connections.add(e),this._store.emitConnectionChanges()}static \u0275fac=function(n){return new(n||zs)};static \u0275prov=y({token:zs,factory:zs.\u0275fac})};return t=E([D(tu)],t),t})(),gm=class{connection;static fToken=Symbol("AddSnapConnectionToStoreRequest");constructor(i){this.connection=i}},l5=(()=>{let t=class Hs{_store=p(L);handle({connection:e}){this._store.connections.addForSnap(e)}static \u0275fac=function(n){return new(n||Hs)};static \u0275prov=y({token:Hs,factory:Hs.\u0275fac})};return t=E([D(gm)],t),t})(),xo=class{connection;static fToken=Symbol("CreateConnectionMarkersRequest");constructor(i){this.connection=i}},Wb=new ve("F_CONNECTION_CONTENT");var nu=class t{points;cumulativeLengths;segmentTangents;totalLength;constructor(i){let e=t._removeConsecutiveDuplicates(i);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,o=n-1,r=new Array(n).fill(0),a=new Array(o),s=0;for(let c=0;c<o;c++){let u=this.points[c+1].x-this.points[c].x,f=this.points[c+1].y-this.points[c].y,g=Math.hypot(u,f),x=g?u/g:1,R=g?f/g:0;a[c]={x,y:R},s+=g,r[c+1]=s}this.cumulativeLengths=r,this.segmentTangents=a,this.totalLength=s||1}static from(i){return new t(i.map(e=>({x:e.x,y:e.y})))}static _removeConsecutiveDuplicates(i){let e=[];for(let n of i){let o=e[e.length-1];(!o||o.x!==n.x||o.y!==n.y)&&e.push({x:n.x,y:n.y})}return e}},vm=class t{_polyline;constructor(i=[]){this._polyline=new nu(i)}updatePoints(i){return this._polyline=new nu(i),this._polyline.totalLength}calculateTotalLength(i){return this.updatePoints(i)}get totalLength(){return this._polyline.totalLength}getPointAtProgress(i){let{points:e,cumulativeLengths:n,segmentTangents:o,totalLength:r}=this._polyline,s=t._clamp(i,0,1)*r,c=.5;if(s<=c)return{point:e[0],tangent:o[0]??{x:1,y:0},atEdge:!0};if(r-s<=c){let J=e.length-1;return{point:e[J],tangent:o[J-1]??{x:1,y:0},atEdge:!0}}let u=t._findRightIndex(n,s),f=Math.max(1,u),g=n[f-1],x=n[f],R=t._safeRatio(s-g,x-g),k=e[f-1],A=e[f],q={x:t._lerp(k.x,A.x,R),y:t._lerp(k.y,A.y,R)},W=o[f-1]??{x:1,y:0};return{point:q,tangent:W,atEdge:!1}}getPointAtLength(i){return this.getPointAtProgress(i)}getPointAtDistance(i){let e=this._polyline.totalLength?i/this._polyline.totalLength:0;return this.getPointAtProgress(e)}static _findRightIndex(i,e){let n=0,o=i.length-1;for(;n<o;){let r=n+o>>1;i[r]<e?n=r+1:o=r}return n}static _lerp(i,e,n){return i+(e-i)*n}static _clamp(i,e,n){return i<e?e:i>n?n:i}static _safeRatio(i,e){let n=Math.abs(e)<1e-6?1e-6:e;return i/n}},yy=(function(t){return t.NONE="none",t.ALONG="along",t})(yy||{}),bm=class{compute(i,e){let n=this._clamp01(e.position()),{point:o,tangent:r}=i.getPointAtLength(n),a={x:-r.y,y:r.x},s=e.offset()??0,c=o.x+a.x*s,u=o.y+a.y*s,g=this._sizeAlongDirection(e.hostElement,r)*.5,x=n*i.totalLength,R=i.totalLength-x,k=this._applyEdgeGuard(c,u,r,x,R,g),A=this._calculateContentRotation(e.align(),r);return{position:k,rotationDeg:A}}_clamp01(i){return i<=0?0:i>=1?1:i}_applyEdgeGuard(i,e,n,o,r,a){if(o<=a){let s=a-o;return{x:i+n.x*s,y:e+n.y*s}}if(r<=a){let s=a-r;return{x:i-n.x*s,y:e-n.y*s}}return{x:i,y:e}}_sizeAlongDirection(i,e){let n=ne.fromElement(i);return Math.abs(e.x)*n.width+Math.abs(e.y)*n.height}_normalize180(i){let e=(i+180)%360;return e<0&&(e+=360),e-180}_keepUpright(i){let e=this._normalize180(i);return e>90?e-=180:e<-90&&(e+=180),e}_calculateContentRotation(i,e){let n=0;return i===yy.ALONG&&(n=Math.atan2(e.y,e.x)*180/Math.PI,n=this._keepUpright(n)),n}},ym=class{_placement;constructor(i=new bm){this._placement=i}layout(i,e){let n=new vm(i),o=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 o}_createTransformString(i,e){return`translate3d(${i.x}px, ${i.y}px, 0) translate(-50%, -50%) rotate(${e}deg)`}};var Kb=new ve("F_CONNECTION_WAYPOINTS");function Cy(t,i,e){return(t.x-i.x)**2+(t.y-i.y)**2<=e**2}function c5(t,i){let e=t.fWaypoints(),n=e?.radius()||8;return e?.candidates().find(o=>Cy(i,o,n))}function d5(t,i){let e=t.fWaypoints(),n=e?.radius()||8;return e?.waypoints().find(o=>Cy(i,o,n))}function u5(t,i){for(let e of t){let n=d5(e,i);if(n&&e.fWaypoints()?.visibility())return{connection:e,waypoint:n};let o=c5(e,i);if(o&&e.fWaypoints()?.visibility())return{connection:e,candidate:o}}}var yh=new ve("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||{}),iu=new ve("F_CONNECTION_MARKER"),p5=0,ou=class{fId=K(`f-marker-${p5++}`);hostElement=p(Xe).nativeElement};function xy(t,i=Be.START){if(typeof t!="string")return i;let e=t.trim().toLowerCase();return e?h5(e)??i:i}function h5(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 wy=(()=>{class t extends ou{_markerElement=nt.required("markerElement");_type=B(Be.END_ALL_STATES,{alias:"type",transform:e=>xy(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(o){return(e||(e=U(t)))(o||t)}})();static \u0275cmp=z({type:t,selectors:[["f-connection-marker-arrow"]],viewQuery:function(n,o){n&1&&pn(o._markerElement,hL,5),n&2&&Vt()},hostAttrs:[1,"f-component",2,"display","none"],inputs:{_type:[1,"type","_type"]},features:[Ee([{provide:iu,useExisting:t}]),Q],decls:3,vars:0,consts:[["markerElement",""],["viewBox","0 0 6 6",1,"f-marker"],["d","M0,0 L6,3 0,6Z"]],template:function(n,o){n&1&&(X(),Z(0,"svg",1,0),oe(2,"path",2),ie())},encapsulation:2})}return t})();var Ty=(()=>{class t extends ou{_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 eu(this))}ngOnDestroy(){this._mediator.execute(new Iu(this))}static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||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=>xy(e,Be.START)],orient:"orient",markerUnits:"markerUnits"},standalone:!1,features:[Ee([{provide:iu,useExisting:t}]),Q]})}return t})(),Jn=(function(t){return t.FIXED="fixed",t.FIXED_CENTER="fixed_center",t.FLOATING="floating",t})(Jn||{}),We=(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})(We||{});function f5({sourceRect:t,targetRect:i}){return{point1:t.gravityCenter,point2:i.gravityCenter}}var j=(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})(j||{}),_o=(function(t){return t.SEGMENT="segment",t.STRAIGHT="straight",t.BEZIER="bezier",t.ADAPTIVE_CURVE="adaptive-curve",t})(_o||{});function m5({sourceRect:t,sourceConnectableSide:i,targetRect:e,targetConnectableSide:n}){return{point1:Yb(t,i===j.AUTO?j.BOTTOM:i),point2:Yb(e,n===j.AUTO?j.TOP:n)}}function Yb(t,i){switch(i){case j.TOP:return{x:t.x+t.width/2,y:t.y};case j.BOTTOM:return{x:t.x+t.width/2,y:t.y+t.height};case j.LEFT:return{x:t.x,y:t.y+t.height/2};case j.RIGHT:return{x:t.x+t.width,y:t.y+t.height/2};default:throw new Error(`Unknown side: ${i}`)}}function Sy(t,i,e,n){if(!n||!n.rotationDeg)return fo.getRoundedRectIntersections(t,i,e)[0];let o=qs(t,-n.rotationDeg,n.pivot),r=qs(i,-n.rotationDeg,n.pivot),a=_5(e,-n.rotationDeg,n.pivot),s=fo.getRoundedRectIntersections(o,r,a)[0];return s?qs(s,n.rotationDeg,n.pivot):void 0}function _5(t,i,e){let n=qs(g5(t),i,e);return new rt(n.x-t.width/2,n.y-t.height/2,t.width,t.height,t.radius1,t.radius2,t.radius3,t.radius4)}function g5(t){return{x:t.x+t.width/2,y:t.y+t.height/2}}function qs(t,i,e){let n=t.x-e.x,o=t.y-e.y,r=i*Math.PI/180,a=Math.cos(r),s=Math.sin(r);return{x:n*a-o*s+e.x,y:n*s+o*a+e.y}}function v5({sourceRect:t,targetRect:i,sourceRotationContext:e,targetRotationContext:n}){return C5(b5(t,i,e),y5(t,i,n),t,i)}function b5(t,i,e){return Sy(t.gravityCenter,i.gravityCenter,t,e)}function y5(t,i,e){return Sy(i.gravityCenter,t.gravityCenter,i,e)}function C5(t,i,e,n){return{point1:t||e.gravityCenter,point2:i||n.gravityCenter}}var gs=.5,x5={[Jn.FLOATING]:v5,[Jn.FIXED_CENTER]:f5,[Jn.FIXED]:m5},Fo=(()=>{class t{handle(e){let n=this._calculateDirectionalVectors(e.sourceRect.gravityCenter.x,e.sourceRect.gravityCenter.y,e.targetRect.gravityCenter.x,e.targetRect.gravityCenter.y),o=this._determineSourceSide(e,n),r=this._determineTargetSide(e,n);return e.connection._applyResolvedSidesToConnection(o,r),this._getBehaviorHandler(e.connection.fBehavior)({sourceRect:e.sourceRect,targetRect:e.targetRect,sourceConnectableSide:o,targetConnectableSide:r,sourceRotationContext:e.sourceRotationContext,targetRotationContext:e.targetRotationContext})}_calculateDirectionalVectors(e,n,o,r){let a=o-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,o,r){if(e===We.DEFAULT)return r;let a=Math.abs(n),s=Math.abs(o);if(a<gs&&s<gs)return r;let u=a>=s;switch(e){case We.CALCULATE:return u?n>=0?j.RIGHT:j.LEFT:o>=0?j.BOTTOM:j.TOP;case We.CALCULATE_HORIZONTAL:return a<gs?r:n>=0?j.RIGHT:j.LEFT;case We.CALCULATE_VERTICAL:return s<gs?r:o>=0?j.BOTTOM:j.TOP;case We.TOP:return j.TOP;case We.BOTTOM:return j.BOTTOM;case We.LEFT:return j.LEFT;case We.RIGHT:return j.RIGHT;default:return r}}_getBehaviorHandler(e){let n=x5[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})(),gn=class{sourceRect;targetRect;connection;sourceConnectableSide;targetConnectableSide;sourceRotationContext;targetRotationContext;constructor(i,e,n,o,r,a,s){this.sourceRect=i,this.targetRect=e,this.connection=n,this.sourceConnectableSide=o,this.targetConnectableSide=r,this.sourceRotationContext=a,this.targetRotationContext=s}};function Ch(t,i,e){return[t,...e??[],i]}function w5(t,i){let e=Math.abs(i.x-t.x)/2,n=i.x<t.x?i.x+e:i.x-e,o=Math.abs(i.y-t.y)/2,r=i.y<t.y?i.y+o:i.y-o;return{x:n,y:r}}function T5(t,i=32){let e=new Array(i+1);e[0]=me({},t[0]);for(let n=1;n<=i;n++)e[n]=ky(t[0],t[1],t[2],t[3],n/i);return e}function ky(t,i,e,n,o){let r=1-o,a=o*o,s=r*r,c=s*r,u=a*o;return{x:c*t.x+3*s*o*i.x+3*r*a*e.x+u*n.x,y:c*t.y+3*s*o*i.y+3*r*a*e.y+u*n.y}}function Iy(t){return t.map(i=>ky(i.p0,i.c1,i.c2,i.p3,.5))}function S5(t){if(t.length<2)throw new Error("Polylines must be at least two points");let i=k5(t);return i<=0?[me({},t[0])]:[I5(t,i/2)]}function k5(t){let i=0;for(let e=0;e<t.length-1;e++)i+=My(t[e],t[e+1]);return i}function I5(t,i){let e=0;for(let o=0;o<t.length-1;o++){let r=t[o],a=t[o+1],s=My(r,a);if(!(s<=0)){if(e+s>=i){let c=(i-e)/s;return{x:r.x+(a.x-r.x)*c,y:r.y+(a.y-r.y)*c}}e+=s}}let n=t[t.length-1];return{x:n.x,y:n.y}}function My(t,i){return Math.hypot(i.x-t.x,i.y-t.y)}function M5(t){let i=[];for(let e of t)for(let n of e){let o=i[i.length-1];(!o||o.x!==n.x||o.y!==n.y)&&i.push(n)}return i}function Ey(t){if(!t.length)return"";let i=`M ${t[0].p0.x} ${t[0].p0.y}`;for(let e=0;e<t.length;e++){let n=t[e],o=e===t.length-1,r=o?n.p3.x+2e-4:n.p3.x,a=o?n.p3.y+2e-4:n.p3.y;i+=` C ${n.c1.x} ${n.c1.y}, ${n.c2.x} ${n.c2.y}, ${r} ${a}`}return i}function Dy(t,i=16){if(!t.length)return[];let e=[];for(let n=0;n<t.length;n++){let o=t[n],r=T5([o.p0,o.c1,o.c2,o.p3],i);n>0&&r.shift(),e.push(...r)}return e}function E5(t,i=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)>i||Math.abs(a.y-s.y)>i)&&n.push(a)}if(n.length<=2)return n;let o=[];o.push(n[0]);for(let r=1;r<n.length-1;r++){let a=o[o.length-1],s=n[r],c=n[r+1],u=Math.abs(a.x-s.x)<=i&&Math.abs(s.x-c.x)<=i,f=Math.abs(a.y-s.y)<=i&&Math.abs(s.y-c.y)<=i;!u&&!f&&o.push(s)}return o.push(n[n.length-1]),o}var Cm=class t{static _dir(i){switch(i){case j.LEFT:return{x:-1,y:0};case j.RIGHT:return{x:1,y:0};case j.TOP:return{x:0,y:-1};case j.BOTTOM:return{x:0,y:1};case j.AUTO:return{x:0,y:0}}return{x:0,y:0}}static _isHorizontal(i){return i===j.LEFT||i===j.RIGHT}static _handleLength(i,e,n,o){let r=Math.abs(e.x-i.x),a=Math.abs(e.y-i.y),s=Math.hypot(r,a),c=n===j.AUTO?Math.max(r,a):this._isHorizontal(n)?r:a,u=Math.max(8,o),f=o+.5*s,g=o*1.05+c*.3;return Math.min(f,Math.max(u,g))}static _softControl(i,e,n,o){let r=this._dir(i),a=n.x-e.x,s=n.y-e.y,c=Math.hypot(a,s)||1,u=a/c,f=s/c;if(i===j.AUTO)return{x:e.x+u*o,y:e.y+f*o};let g=r.x*u+r.y*f,x=.12,R=Math.max(0,-g)*.08,k=Math.min(.2,x+R),A=r.x*(1-k)+u*k,q=r.y*(1-k)+f*k,W=Math.hypot(A,q)||1;return{x:e.x+A/W*o,y:e.y+q/W*o}}handle({source:i,sourceSide:e,target:n,targetSide:o,offset:r,waypoints:a}){let s=Math.max(0,r??0),c=Ch(i,n,a),u=[];for(let g=0;g<c.length-1;g++){let x=c[g],R=c[g+1],k=t._handleLength(x,R,e,s),A=t._handleLength(R,x,o,s),q=t._softControl(e,x,R,k),W=t._softControl(o,R,x,A);u.push({p0:x,c1:q,c2:W,p3:R,chainIndex:g})}let f=Dy(u,12);return{path:Ey(u),secondPoint:u[0]?.c1??i,penultimatePoint:u[u.length-1]?.c2??n,points:f,candidates:Iy(u)}}},xm=class{handle({source:i,sourceSide:e,target:n,targetSide:o,offset:r,waypoints:a}){let s=Ch(i,n,a),c=[];for(let f=0;f<s.length-1;f++){let g=s[f],x=s[f+1],R=Xb(e,g,x,r??0),k=Xb(o,x,g,r??0);c.push({p0:g,c1:R,c2:k,p3:x,chainIndex:f})}let u=Dy(c,12);return{path:Ey(c),secondPoint:c[0]?.c1??i,penultimatePoint:c[c.length-1]?.c2??n,points:u,candidates:Iy(c)}}};function Xb(t,i,e,n){let o={x:i.x,y:i.y};switch(t){case j.LEFT:o.x-=vs(i.x-e.x,n);break;case j.RIGHT:o.x+=vs(e.x-i.x,n);break;case j.TOP:o.y-=vs(i.y-e.y,n);break;case j.BOTTOM:o.y+=vs(e.y-i.y,n);break;case j.AUTO:break}return o}function vs(t,i){return t>=i?t:i*Math.sqrt(i-t)}function D5(t){let{axis:i,source:e,target:n,sourceSide:o,targetSide:r,sourceGap:a,targetGap:s,sourceDir:c,targetDir:u,currentDir:f,offset:g,sourceGapOffset:x,targetGapOffset:R}=t,k=P5(a,s),A=R5(i,c,f,k);return o===r?O5(i,e,n,g,c,f,a,s,x,R):A=F5(i,c,u,a,s,k,A),A}function P5(t,i){return{sourceTarget:[{x:t.x,y:i.y}],targetSource:[{x:i.x,y:t.y}]}}function R5(t,i,e,n){return t==="x"?i.x===e?n.targetSource:n.sourceTarget:i.y===e?n.sourceTarget:n.targetSource}function O5(t,i,e,n,o,r,a,s,c,u){let f=Math.abs(i[t]-e[t]);if(f>n)return;let g=Math.min(n-1,n-f);g<=0||(o[t]===r?c[t]=(a[t]>i[t]?-1:1)*g:u[t]=(s[t]>e[t]?-1:1)*g)}function F5(t,i,e,n,o,r,a){let s=t==="x"?"y":"x",c=i[t]===e[s],u=n[s]>o[s],f=n[s]<o[s];return i[t]===1&&(!c&&u||c&&f)||i[t]!==1&&(!c&&f||c&&u)?t==="x"?r.sourceTarget:r.targetSource:a}var br=1e-6,Zb=2e-4,N5=.75;function A5(t,i){let e=t.length,n=[];n.push(`M ${t[0].x} ${t[0].y}`);for(let r=1;r<e-1;r++)n.push(L5(t[r-1],t[r],t[r+1],i));let o=t[e-1];return n.push(`L ${o.x+Zb} ${o.y+Zb}`),n.join(" ")}function L5(t,i,e,n){let o=i.x,r=i.y;if(n<=0)return`L ${o} ${r}`;let a=Math.abs(t.x-o)<=br&&Math.abs(o-e.x)<=br,s=Math.abs(t.y-r)<=br&&Math.abs(r-e.y)<=br;if(a||s)return`L ${o} ${r}`;let c=Math.hypot(o-t.x,r-t.y),u=Math.hypot(e.x-o,e.y-r),f=Math.min(c*.5,u*.5,n);if(f<N5)return`L ${o} ${r}`;if(Math.abs(t.y-r)<=br){let q=t.x<e.x?-1:1,W=t.y<e.y?1:-1,J=o+f*q,de=r+f*W;return`L ${J} ${r} Q ${o} ${r} ${o} ${de}`}let x=t.x<e.x?1:-1,R=t.y<e.y?-1:1,k=r+f*R,A=o+f*x;return`L ${o} ${k} Q ${o} ${r} ${A} ${r}`}var Qb={[j.LEFT]:H.initialize(-1,0),[j.RIGHT]:H.initialize(1,0),[j.TOP]:H.initialize(0,-1),[j.BOTTOM]:H.initialize(0,1),[j.AUTO]:H.initialize(0,0)},wm=class{handle({source:i,sourceSide:e,target:n,targetSide:o,waypoints:r,offset:a,radius:s}){let c=Ch(i,n,r),u=[],f=[];for(let k=0;k<c.length-1;k++){let A=c[k],q=c[k+1],W=this._getPathPoints(A,e,q,o,a??0);u.push(W),f.push(...S5(W))}let g=E5(M5(u)),x=g.length>1?g[g.length-2]:i,R=g.length>1?g[1]:n;return{path:A5(g,s??0),penultimatePoint:x,secondPoint:R,points:g,candidates:f}}_getPathPoints(i,e,n,o,r){let a=Qb[e],s=Qb[o],c={x:i.x+a.x*r,y:i.y+a.y*r},u={x:n.x+s.x*r,y:n.y+s.y*r},f=this._getDirection(c,e,u),g=f.x!==0?"x":"y",x=f[g],R=[],k=H.initialize(),A=H.initialize(),q=w5(i,n);if(a[g]*s[g]===-1){let W=[{x:q.x,y:c.y},{x:q.x,y:u.y}],J=[{x:c.x,y:q.y},{x:u.x,y:q.y}];a[g]===x?R=g==="x"?W:J:R=g==="x"?J:W}else R=D5({axis:g,source:i,target:n,sourceSide:e,targetSide:o,sourceGap:c,targetGap:u,sourceDir:a,targetDir:s,currentDir:x,offset:r,sourceGapOffset:k,targetGapOffset:A});return[i,{x:c.x+k.x,y:c.y+k.y},...R,{x:u.x+A.x,y:u.y+A.y},n]}_getDirection(i,e,n){return e===j.LEFT||e===j.RIGHT?i.x<n.x?H.initialize(1,0):H.initialize(-1,0):i.y<n.y?H.initialize(0,1):H.initialize(0,-1)}},Jb=2e-4,Tm=class{handle(i){let e=Ch(i.source,i.target,i.waypoints),n=e.length,o=e[0],r=`M ${o.x} ${o.y}`,a=new Array(n-1);for(let s=0;s<n-1;s++){let c=e[s],u=e[s+1],f=s===n-2,g=f?u.x+Jb:u.x,x=f?u.y+Jb: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]??i.target,penultimatePoint:e[n-2]??i.source}}},B5=new ve("F_CONNECTION_BUILDERS"),Py=(()=>{class t{_builtinBuilders={[_o.STRAIGHT]:new Tm,[_o.BEZIER]:new xm,[_o.ADAPTIVE_CURVE]:new Cm,[_o.SEGMENT]:new wm};_providedBuilders;_builders;constructor(){this._providedBuilders=p(B5,{optional:!0})||{},this._builders=me(me({},this._builtinBuilders),this._providedBuilders)}handle({type:e,payload:n}){let o=this._builders[e];if(!o)throw this._createBuilderNotFoundError(e);return o.handle(n)}_createBuilderNotFoundError(e){let n=Object.keys(this._builtinBuilders).sort(),o=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: ${o.length?o.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(`
1569
+ `))}static \u0275fac=function(n){return new(n||t)};static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})();function V5(t,i,e){return Fn("connection_"+t+i+e)}function z5(t,i,e){return Fn("connection_for_selection_"+t+i+e)}function Ry(t){return Fn("connection_gradient_"+t)}function H5(t){return`url(#${Ry(t)})`}var q5=(()=>{class t{_connection=p(yh);_hostElement=p(Xe).nativeElement;_injector=p(mt);_hostAttributes=new Map;_startColor;_endColor;gradientId=S(()=>Ry(this._connection.fId()));ngOnInit(){this._listenColorChanges()}_listenColorChanges(){se(()=>{this.gradient().fStartColor(),this.gradient().fEndColor(),Ht(()=>{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,o=e.point2.y-e.point1.y,r=Math.sqrt(n*n+o*o)||.01,a=new he(.5-.5*n/r,.5-.5*o/r);this._setHostAttribute("x1",a.x.toString()),this._setHostAttribute("y1",a.y.toString());let s=new he(.5+.5*n/r,.5+.5*o/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})(),Sm=(()=>{class t extends q5{gradient=B.required({alias:"fConnectionGradientRendererFor"});static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275cmp=z({type:t,selectors:[["linearGradient","fConnectionGradientRenderer",""]],hostVars:1,hostBindings:function(n,o){n&2&&O("id",o.gradientId())},inputs:{gradient:[1,"fConnectionGradientRendererFor","gradient"]},features:[Q],attrs:fL,decls:3,vars:0,consts:[[0,"xmlns","svg","http://www.w3.org/2000/svg"],["offset","0%"],["offset","100%"]],template:function(n,o){n&1&&(ja(0,0),X(),oe(1,"stop",1)(2,"stop",2),Ua())},encapsulation:2,changeDetection:0})}return t})(),ey=new ve("F_CONNECTION_GRADIENT");var km=new ve("F_CONNECTION_PATH"),Im=class{hostElement=p(Xe).nativeElement},G5=(()=>{class t extends Im{_connection=p(yh);useGradient=B(!1);linkToGradient=S(()=>this.useGradient()?H5(this._connection.fId()):null);get fPathId(){return this._connection.fId()}get attrConnectionId(){return V5(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(#${$5(this._connection.fId())})`),this.hostElement.setAttribute("marker-end",`url(#${W5(this._connection.fId())})`)}deselect(){this.hostElement.setAttribute("marker-start",`url(#${j5(this._connection.fId())})`),this.hostElement.setAttribute("marker-end",`url(#${U5(this._connection.fId())})`)}static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275cmp=z({type:t,selectors:[["path","f-connection-path",""]],hostAttrs:[1,"f-component","f-connection-path"],hostVars:4,hostBindings:function(n,o){n&2&&(O("id",o.attrConnectionId)("data-f-path-id",o.fPathId),Oe("stroke",o.linkToGradient()))},inputs:{useGradient:[1,"useGradient"]},standalone:!1,features:[Ee([{provide:km,useExisting:t}]),Q],attrs:mL,decls:0,vars:0,template:function(n,o){},styles:["[_nghost-%COMP%]{fill:none;pointer-events:stroke}"],changeDetection:0})}return t})();function j5(t){return Fn(`f-connection-marker-start-${t}`)}function U5(t){return Fn(`f-connection-marker-end-${t}`)}function $5(t){return Fn(`f-connection-selected-marker-start-${t}`)}function W5(t){return Fn(`f-connection-selected-marker-end-${t}`)}var Mm=new ve("F_CONNECTION_SELECTION"),Em=class{hostElement=p(Xe).nativeElement},K5=(()=>{class t extends Em{_connection=p(yh);get connectionForSelectionId(){return z5(this._connection.fId(),this._connection.fOutputId(),this._connection.fInputId())}setPath(e){this.hostElement.setAttribute("d",`${e}`)}static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275cmp=z({type:t,selectors:[["path","fConnectionSelection",""]],hostAttrs:[1,"f-component","f-connection-selection"],hostVars:1,hostBindings:function(n,o){n&2&&O("id",o.connectionForSelectionId)},standalone:!1,features:[Ee([{provide:Mm,useExisting:t}]),Q],attrs:_L,decls:0,vars:0,template:function(n,o){},styles:["[_nghost-%COMP%]{fill:none;pointer-events:stroke}"],changeDetection:0})}return t})(),Dm=new ve("F_CONNECTION_DRAG_HANDLE_END"),Pm=new ve("F_CONNECTION_DRAG_HANDLE_START"),ru=class{hostElement=p(Xe).nativeElement;point=H.initialize();class="f-connection-drag-handle";calculateCircleCenter(i,e,n){let o={x:e.x-i.x,y:e.y-i.y},r=Math.sqrt(o.x*o.x+o.y*o.y)||1,a={x:o.x/r,y:o.y/r},s={x:a.x*n,y:a.y*n};return{x:e.x-s.x,y:e.y-s.y}}},Y5=(()=>{class t extends ru{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(o){return(e||(e=U(t)))(o||t)}})();static \u0275cmp=z({type:t,selectors:[["circle","f-connection-drag-handle-start",""]],hostVars:2,hostBindings:function(n,o){n&2&&G(o.class)},standalone:!1,features:[Ee([{provide:Pm,useExisting:t}]),Q],attrs:gL,decls:0,vars:0,template:function(n,o){},encapsulation:2,changeDetection:0})}return t})(),X5=(()=>{class t extends ru{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(o){return(e||(e=U(t)))(o||t)}})();static \u0275cmp=z({type:t,selectors:[["circle","f-connection-drag-handle-end",""]],hostVars:2,hostBindings:function(n,o){n&2&&G(o.class)},standalone:!1,features:[Ee([{provide:Dm,useExisting:t}]),Q],attrs:vL,decls:0,vars:0,template:function(n,o){},encapsulation:2,changeDetection:0})}return t})(),rm="f-selected";function Oy(t){return class extends t{fId=K("");fSelectionDisabled=K(!1);unmarkAsSelected(){this.unmarkChildrenAsSelected?.(),this.hostElement.classList.remove(rm)}markAsSelected(){this.markChildrenAsSelected?.(),this.isSelected()||this.hostElement.classList.add(rm)}isSelected(){return this.hostElement.classList.contains(rm)}markChildrenAsSelected(){}unmarkChildrenAsSelected(){}constructor(...i){super(...i)}}}function Z5(t){return class extends t{show(){this.hostElement.style.display="unset"}hide(){this.hostElement.style.display="none"}constructor(...i){super(...i)}}}var Q5=Oy(Z5(class{hostElement;constructor(t){this.hostElement=t}})),J5=(()=>{class t extends Q5{_fConnectionBuilder=p(Py);path="";line=gr.initialize();fReassignableStart=K(!1);fDraggingDisabled=K(!1);fSelectionDisabled=K(!1);fDefs=nt.required("defs");fPath=nt.required(km);fDragHandleStart=nt(Pm);fDragHandleEnd=nt.required(Dm);fSelection=nt.required(Mm);fContents=Tf(Wb,{descendants:!0});fMarkers=Tf(iu,{descendants:!0});fGradient=Wa(ey);_fGradientRenderer=nt(Sm);fWaypoints=Wa(Kb);fInputSide=K(We.DEFAULT);_contentLayoutEngine=new ym;_sourceSide=j.AUTO;fOutputSide=K(We.DEFAULT);_targetSide=j.AUTO;_penultimatePoint=H.initialize();_secondPoint=H.initialize();constructor(){super(p(Xe).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=gr.initialize(e,n);let{path:o,points:r,penultimatePoint:a,secondPoint:s,candidates:c}=this._getPathResult(e,n);this.path=o,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,o,r){n&1&&xf(r,o.fContents,Wb,5)(r,o.fMarkers,iu,5)(r,o.fGradient,ey,5)(r,o.fWaypoints,Kb,5),n&2&&Vt(4)},viewQuery:function(n,o){n&1&&pn(o.fDefs,bL,5)(o.fPath,km,5)(o.fDragHandleStart,Pm,5)(o.fDragHandleEnd,Dm,5)(o.fSelection,Mm,5)(o._fGradientRenderer,Sm,5),n&2&&Vt(6)},standalone:!1,features:[Q]})}return t})(),e6=(()=>{let t=class Gs{_browser=p(at);_markerCache=new WeakMap;handle({connection:e}){let n=this._findConnectionMarkers(e),o=e.fDefs();if(!o)return!1;let r=t6(n),a=this._markerCache.get(e);if(a?.signature===r&&a.defsElement===o.nativeElement)return!1;let s=Ny("defs",this._browser);return n.forEach(c=>{Fy(c.type).forEach(u=>{let f=n6(u,c,e.fId(),this._browser),g=c.markerElement.cloneNode(!0);g.setAttribute("height",`${c.height}`),g.setAttribute("width",`${c.width}`),g.removeAttribute("markerUnits"),g.style.display="unset",f.append(g),s.append(f)})}),o.nativeElement.innerHTML=s.innerHTML,this._markerCache.set(e,{signature:r,defsElement:o.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||Gs)};static \u0275prov=y({token:Gs,factory:Gs.\u0275fac})};return t=E([D(xo)],t),t})();function t6(t){return t.map(i=>[...Fy(i.type),i.width,i.height,i.refX,i.refY,i.orient,i.markerUnits,i.markerElement.outerHTML].join("|")).join("||")}function n6(t,i,e,n){let o=Ny("marker",n);return o.setAttribute("id",Fn(t+"-"+e)),o.setAttribute("markerHeight",`${i.height}`),o.setAttribute("markerWidth",`${i.width}`),o.setAttribute("orient",`${i.orient}`),o.setAttribute("refX",`${i.refX}`),o.setAttribute("refY",`${i.refY}`),o.setAttribute("markerUnits",`${i.markerUnits}`),o}function Fy(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 Ny(t,i){return i.document.createElementNS("http://www.w3.org/2000/svg",t)}var xh=(()=>{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})(),i6=String.raw`
1570
+ const EPSILON = 0.5;
1571
+
1572
+ addEventListener('message', (event) => {
1573
+ const data = event?.data;
1574
+ const requestId = data?.requestId;
1575
+ const items = Array.isArray(data?.items) ? data.items : [];
1576
+
1577
+ try {
1578
+ const results = items.map((item) => calculateItem(item));
1579
+ postMessage({ requestId, results });
1580
+ } catch (error) {
1581
+ const message = error instanceof Error ? error.message : 'Connection worker failed.';
1582
+ postMessage({ requestId, error: message });
1583
+ }
1584
+ });
1585
+
1586
+ function calculateItem(item) {
1587
+ const sourceCenterX = item.sourceRect.x + item.sourceRect.width / 2;
1588
+ const sourceCenterY = item.sourceRect.y + item.sourceRect.height / 2;
1589
+ const targetCenterX = item.targetRect.x + item.targetRect.width / 2;
1590
+ const targetCenterY = item.targetRect.y + item.targetRect.height / 2;
1591
+
1592
+ const sourceSide = resolveConnectableSide(
1593
+ item.outputSide,
1594
+ targetCenterX - sourceCenterX,
1595
+ targetCenterY - sourceCenterY,
1596
+ item.sourceConnectableSide,
1597
+ );
1598
+
1599
+ const targetSide = resolveConnectableSide(
1600
+ item.inputSide,
1601
+ sourceCenterX - targetCenterX,
1602
+ sourceCenterY - targetCenterY,
1603
+ item.targetConnectableSide,
1604
+ );
1605
+
1606
+ if (item.behavior === 'fixed_center') {
1607
+ return {
1608
+ originalIndex: item.originalIndex,
1609
+ supported: true,
1610
+ sourceSide,
1611
+ targetSide,
1612
+ line: {
1613
+ point1: { x: sourceCenterX, y: sourceCenterY },
1614
+ point2: { x: targetCenterX, y: targetCenterY },
1615
+ },
1616
+ };
1617
+ }
1618
+
1619
+ if (item.sourceRotation || item.targetRotation) {
1620
+ return { originalIndex: item.originalIndex, supported: false };
1621
+ }
1622
+
1623
+ if (item.behavior !== 'fixed') {
1624
+ if (item.behavior !== 'floating') {
1625
+ return { originalIndex: item.originalIndex, supported: false };
1626
+ }
1627
+
1628
+ if (hasRoundedCorners(item.sourceRect) || hasRoundedCorners(item.targetRect)) {
1629
+ return { originalIndex: item.originalIndex, supported: false };
1630
+ }
1631
+
1632
+ return {
1633
+ originalIndex: item.originalIndex,
1634
+ supported: true,
1635
+ sourceSide,
1636
+ targetSide,
1637
+ line: buildFloatingLine(item.sourceRect, item.targetRect),
1638
+ };
1639
+ }
1640
+
1641
+ const line = buildFixedLine(item.sourceRect, item.targetRect, sourceSide, targetSide);
1642
+ if (!line) {
1643
+ return { originalIndex: item.originalIndex, supported: false };
1644
+ }
1645
+
1646
+ return {
1647
+ originalIndex: item.originalIndex,
1648
+ supported: true,
1649
+ sourceSide,
1650
+ targetSide,
1651
+ line,
1652
+ };
1653
+ }
1654
+
1655
+ function resolveConnectableSide(requestedSide, deltaX, deltaY, fallbackSide) {
1656
+ if (requestedSide === 'default') {
1657
+ return fallbackSide;
1658
+ }
1659
+
1660
+ const absX = Math.abs(deltaX);
1661
+ const absY = Math.abs(deltaY);
1662
+ const nearZero = absX < EPSILON && absY < EPSILON;
1663
+
1664
+ if (nearZero) {
1665
+ return fallbackSide;
1666
+ }
1667
+
1668
+ const horizontalDominant = absX >= absY;
1669
+
1670
+ switch (requestedSide) {
1671
+ case 'calculate':
1672
+ return horizontalDominant ? (deltaX >= 0 ? 'right' : 'left') : deltaY >= 0 ? 'bottom' : 'top';
1673
+
1674
+ case 'calculate_horizontal':
1675
+ if (absX < EPSILON) {
1676
+ return fallbackSide;
1677
+ }
1678
+
1679
+ return deltaX >= 0 ? 'right' : 'left';
1680
+
1681
+ case 'calculate_vertical':
1682
+ if (absY < EPSILON) {
1683
+ return fallbackSide;
1684
+ }
1685
+
1686
+ return deltaY >= 0 ? 'bottom' : 'top';
1687
+
1688
+ case 'top':
1689
+ case 'bottom':
1690
+ case 'left':
1691
+ case 'right':
1692
+ return requestedSide;
1693
+
1694
+ default:
1695
+ return fallbackSide;
1696
+ }
1697
+ }
1698
+
1699
+ function buildFixedLine(sourceRect, targetRect, sourceSide, targetSide) {
1700
+ const sourceAnchor = sourceSide === 'auto' ? 'bottom' : sourceSide;
1701
+ const targetAnchor = targetSide === 'auto' ? 'top' : targetSide;
1702
+
1703
+ const point1 = getSidePoint(sourceRect, sourceAnchor);
1704
+ const point2 = getSidePoint(targetRect, targetAnchor);
1705
+
1706
+ if (!point1 || !point2) {
1707
+ return null;
1708
+ }
1709
+
1710
+ return { point1, point2 };
1711
+ }
1712
+
1713
+ function buildFloatingLine(sourceRect, targetRect) {
1714
+ const sourceCenter = getRectCenter(sourceRect);
1715
+ const targetCenter = getRectCenter(targetRect);
1716
+
1717
+ return {
1718
+ point1: getRectBorderIntersection(sourceRect, sourceCenter, targetCenter),
1719
+ point2: getRectBorderIntersection(targetRect, targetCenter, sourceCenter),
1720
+ };
1721
+ }
1722
+
1723
+ function hasRoundedCorners(rect) {
1724
+ return !!(rect.radius1 || rect.radius2 || rect.radius3 || rect.radius4);
1725
+ }
1726
+
1727
+ function getRectCenter(rect) {
1728
+ return {
1729
+ x: rect.x + rect.width / 2,
1730
+ y: rect.y + rect.height / 2,
1731
+ };
1732
+ }
1733
+
1734
+ function getRectBorderIntersection(rect, from, to) {
1735
+ const halfWidth = rect.width / 2;
1736
+ const halfHeight = rect.height / 2;
1737
+ const center = getRectCenter(rect);
1738
+
1739
+ const dx = to.x - from.x;
1740
+ const dy = to.y - from.y;
1741
+
1742
+ if (Math.abs(dx) < EPSILON && Math.abs(dy) < EPSILON) {
1743
+ return center;
1744
+ }
1745
+
1746
+ const scaleX = Math.abs(dx) < EPSILON ? Number.POSITIVE_INFINITY : halfWidth / Math.abs(dx);
1747
+ const scaleY = Math.abs(dy) < EPSILON ? Number.POSITIVE_INFINITY : halfHeight / Math.abs(dy);
1748
+ const scale = Math.min(scaleX, scaleY);
1749
+
1750
+ return {
1751
+ x: center.x + dx * scale,
1752
+ y: center.y + dy * scale,
1753
+ };
1754
+ }
1755
+
1756
+ function getSidePoint(rect, side) {
1757
+ const centerX = rect.x + rect.width / 2;
1758
+ const centerY = rect.y + rect.height / 2;
1759
+
1760
+ switch (side) {
1761
+ case 'top':
1762
+ return { x: centerX, y: rect.y };
1763
+
1764
+ case 'right':
1765
+ return { x: rect.x + rect.width, y: centerY };
1766
+
1767
+ case 'bottom':
1768
+ return { x: centerX, y: rect.y + rect.height };
1769
+
1770
+ case 'left':
1771
+ return { x: rect.x, y: centerY };
1772
+
1773
+ default:
1774
+ return null;
1775
+ }
1776
+ }
1777
+ `.trim();function Ay(t){return!!Ly(t)}function Ly(t){let i=t,e=i?.Blob,n=i?.Worker,o=i?.URL;return!e||!n||typeof o?.createObjectURL!="function"||typeof o.revokeObjectURL!="function"?null:{blobCtor:e,workerCtor:n,urlApi:o}}function o6(t){let i=new t.blobCtor([i6],{type:"text/javascript"});return t.urlApi.createObjectURL(i)}function By(t,i){if(!t)return;let e=i??(typeof URL>"u"?null:URL);typeof e?.revokeObjectURL=="function"&&e.revokeObjectURL(t)}var Li=(()=>{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,By(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})(),au=class{connection;line;static fToken=Symbol("ApplyConnectionRenderRequest");constructor(i,e){this.connection=i,this.line=e}},r6=(()=>{let t=class js{_mediator=p(V);_renderCache=new WeakMap;handle({connection:e,line:n}){!this._mediator.execute(new xo(e))&&!this._shouldRender(e,n)||(e.setLine(n),e.initialize())}_shouldRender(e,n){let o=e.fPath().hostElement,r=this._createConnectionRenderSignature(e,n),a=this._renderCache.get(e);return a?.signature===r&&a.pathElement===o?!1:(this._renderCache.set(e,{signature:r,pathElement:o}),!0)}_createConnectionRenderSignature(e,n){let{sourceSide:o,targetSide:r}=e.getResolvedSides();return[e.fBehavior,e.fType,e.fRadius,e.fOffset,e.fReassignableStart(),this._serializeContents([...e.fContents()||[]]),o,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=E([D(au)],t),t})(),su=class{source;target;static fToken=Symbol("MarkConnectionConnectorsAsConnectedRequest");constructor(i,e){this.source=i,this.target=e}},a6=(()=>{let t=class Us{_state=p(xh);handle({source:e,target:n}){e.setConnected(n),n.setConnected(e),this._state.trackConnectedConnectors(e,n)}static \u0275fac=function(n){return new(n||Us)};static \u0275prov=y({token:Us,factory:Us.\u0275fac})};return t=E([D(su)],t),t})(),oi=class{element;cache;static fToken=Symbol("GetNormalizedConnectorRectRequest");constructor(i,e=!0){this.element=i,this.cache=e}},s6={enabled:!1},wn=new ve("F_CACHE_OPTIONS",{providedIn:"root",factory:()=>me({},s6)});var lu=class{id;nodeId;kind;element;static fToken=Symbol("RegisterFCacheConnectorRequest");constructor(i,e,n,o){this.id=i,this.nodeId=e,this.kind=n,this.element=o}},Tn=(()=>{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})(),Rm=class{key;id;kind;nodeId;element;rect;constructor(i,e,n,o,r,a){this.key=i,this.id=e,this.kind=n,this.nodeId=o,this.element=r,this.rect=a}},xr=class{static build(i,e){return`${i}:${e}`}},Om=class{id;element;reference;rect;constructor(i,e,n,o){this.id=i,this.element=e,this.reference=n,this.rect=o}},wo=class{nodeId;reason;static fToken=Symbol("InvalidateFCacheNodeRequest");constructor(i,e="manual"){this.nodeId=i,this.reason=e}},l6=(()=>{let t=class $s{_store=p(Tn);_options=p(wn);handle({nodeId:e,reason:n}){if(!this._options.enabled)return;let o=this._store.nodeEntries.get(e);if(!o)return;o.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||$s)};static \u0275prov=y({token:$s,factory:$s.\u0275fac})};return t=E([D(wo)],t),t})(),cu=class{id;element;reference;static fToken=Symbol("RegisterFCacheNodeRequest");constructor(i,e,n){this.id=i,this.element=e,this.reference=n}},c6=(()=>{let t=class Ws{_store=p(Tn);_options=p(wn);handle({id:e,element:n,reference:o}){if(!this._options.enabled)return;let r=new Om(e,n,o);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||Ws)};static \u0275prov=y({token:Ws,factory:Ws.\u0275fac})};return t=E([D(cu)],t),t})(),du=class{id;static fToken=Symbol("UnregisterFCacheNodeRequest");constructor(i){this.id=i}},d6=(()=>{let t=class Ks{_store=p(Tn);_mediator=p(V);_options=p(wn);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 o=Array.from(this._store.connectorKeysByNodeId.get(e)??[]);for(let r of o){let a=this._store.connectorEntries.get(r);a&&this._mediator.execute(new wr(a.id,a.kind))}this._store.connectorKeysByNodeId.delete(e)}static \u0275fac=function(n){return new(n||Ks)};static \u0275prov=y({token:Ks,factory:Ks.\u0275fac})};return t=E([D(du)],t),t})(),u6=(()=>{let t=class Ys{_store=p(Tn);_mediator=p(V);_options=p(wn);handle({id:e,nodeId:n,kind:o,element:r}){if(!this._options.enabled)return;let a=xr.build(e,o),s=this._store.connectorEntries.get(a);s&&(this._detachConnectorFromNode(s.key,s.nodeId),this._store.connectorKeyByElement.delete(s.element));let c=new Rm(a,e,o,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 wo(n,"connector-registered"))}_detachConnectorFromNode(e,n){let o=this._store.connectorKeysByNodeId.get(n);o&&(o.delete(e),o.size||this._store.connectorKeysByNodeId.delete(n))}static \u0275fac=function(n){return new(n||Ys)};static \u0275prov=y({token:Ys,factory:Ys.\u0275fac})};return t=E([D(lu)],t),t})(),wr=class{connectorId;kind;static fToken=Symbol("UnregisterFCacheConnectorRequest");constructor(i,e){this.connectorId=i,this.kind=e}},p6=(()=>{let t=class Xs{_store=p(Tn);_mediator=p(V);_options=p(wn);handle({connectorId:e,kind:n}){if(!this._options.enabled)return;let o=xr.build(e,n),r=this._store.connectorEntries.get(o);r&&(this._store.connectorEntries.delete(o),this._store.connectorKeyByElement.delete(r.element),this._detachConnectorFromNode(o,r.nodeId),this._store.nodeEntries.has(r.nodeId)&&this._mediator.execute(new wo(r.nodeId,"connector-unregistered")))}_detachConnectorFromNode(e,n){let o=this._store.connectorKeysByNodeId.get(n);o&&(o.delete(e),o.size||this._store.connectorKeysByNodeId.delete(n))}static \u0275fac=function(n){return new(n||Xs)};static \u0275prov=y({token:Xs,factory:Xs.\u0275fac})};return t=E([D(wr)],t),t})(),To=class{element;static fToken=Symbol("GetCachedFCacheRectRequest");constructor(i){this.element=i}},h6=(()=>{let t=class Zs{_store=p(Tn);_options=p(wn);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 o=this._store.connectorKeyByElement.get(e);if(o)return this._store.connectorEntries.get(o)?.rect??void 0}static \u0275fac=function(n){return new(n||Zs)};static \u0275prov=y({token:Zs,factory:Zs.\u0275fac})};return t=E([D(To)],t),t})(),Di=class{connectorId;kind;rect;static fToken=Symbol("SetFCacheConnectorRectRequest");constructor(i,e,n){this.connectorId=i,this.kind=e,this.rect=n}},f6=(()=>{let t=class Qs{_store=p(Tn);_options=p(wn);handle({connectorId:e,kind:n,rect:o}){if(!this._options.enabled)return;let r=xr.build(e,n),a=this._store.connectorEntries.get(r);a&&(a.rect=rt.fromRoundedRect(o))}static \u0275fac=function(n){return new(n||Qs)};static \u0275prov=y({token:Qs,factory:Qs.\u0275fac})};return t=E([D(Di)],t),t})(),Pi=class{nodeId;rect;static fToken=Symbol("SetFCacheNodeRectRequest");constructor(i,e){this.nodeId=i,this.rect=e}},m6=(()=>{let t=class Js{_store=p(Tn);_options=p(wn);handle({nodeId:e,rect:n}){if(!this._options.enabled)return;let o=this._store.nodeEntries.get(e);if(!o)return;let r=o.rect;o.rect=ne.initialize(n.x,n.y,n.width,n.height),r&&this._updateConnectorRectsByNodeRect(e,r,o.rect)}_updateConnectorRectsByNodeRect(e,n,o){let r=this._store.connectorKeysByNodeId.get(e);if(!r?.size)return;let a=o.x-n.x,s=o.y-n.y,c=n.width!==0,u=n.height!==0,f=c?o.width/n.width:1,g=u?o.height/n.height:1;for(let x of r){let R=this._store.connectorEntries.get(x);if(!R?.rect)continue;let k=R.rect,A=k.gravityCenter,q=c?o.x+(A.x-n.x)*f:A.x+a,W=u?o.y+(A.y-n.y)*g:A.y+s;R.rect=new rt(q-k.width/2,W-k.height/2,k.width,k.height,k.radius1,k.radius2,k.radius3,k.radius4)}}static \u0275fac=function(n){return new(n||Js)};static \u0275prov=y({token:Js,factory:Js.\u0275fac})};return t=E([D(Pi)],t),t})(),Tr=class{element;rect;static fToken=Symbol("UpdateFCacheRectByElementRequest");constructor(i,e){this.element=i,this.rect=e}},_6=(()=>{let t=class el{_store=p(Tn);_options=p(wn);handle({element:e,rect:n}){if(!this._options.enabled)return;let o=this._store.nodeIdByElement.get(e);if(o){let s=this._store.nodeEntries.get(o);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||el)};static \u0275prov=y({token:el,factory:el.\u0275fac})};return t=E([D(Tr)],t),t})(),g6=[Tn,c6,d6,l6,u6,p6,h6,m6,f6,_6];function No(t,i,e){return i?he.fromPoint(t).elementTransform(i).sub(e.scaledPosition).sub(e.position).div(e.scale):he.fromPoint(t)}function Vy(){return{min:{x:-1/0,y:-1/0},max:{x:1/0,y:1/0}}}function So(t){return t?`${t}`:void 0}var v6=(()=>{let t=class tl{_store=p(L);_mediator=p(V);_browser=p(at);get _transform(){return this._store.transform}handle({element:e,cache:n}){let o=this._mediator.execute(new To(e));if(o&&n)return o;let r=this._getElementRoundedRect(e),a=this._normalizePosition(r),s=this._unscaleSize(r),c=this._getUnscaledRect(a,s,r),u=this._getOffsetSize(e,s),f=rt.fromCenter(c,u.width,u.height);return this._mediator.execute(new Tr(e,f)),f}_getElementRoundedRect(e){return this._getRoundedRect(ne.fromElement(e),e,this._getComputedStyle(e))}_getRoundedRect(e,n,o){let[r,a,s,c]=this._normalizeCircularBorderRadii(e.width,e.height,[this._getSystemRadius(o.borderTopLeftRadius,n,o.fontSize),this._getSystemRadius(o.borderTopRightRadius,n,o.fontSize),this._getSystemRadius(o.borderBottomRightRadius,n,o.fontSize),this._getSystemRadius(o.borderBottomLeftRadius,n,o.fontSize)]);return new rt(e.x,e.y,e.width,e.height,r,a,s,c)}_getComputedStyle(e){return this._browser.window.getComputedStyle(e)}_toPixels(e,n,o){return this._browser.toPixels(e,n.clientWidth,n.clientHeight,o)||0}_getSystemRadius(e,n,o){return this._toPixels(e,n,o)*this._transform.scale}_normalizeCircularBorderRadii(e,n,o){let[r,a,s,c]=o.map(f=>Math.max(0,f)),u=Math.min(1,this._getRadiusScaleFactor(e,r+a),this._getRadiusScaleFactor(n,a+s),this._getRadiusScaleFactor(e,s+c),this._getRadiusScaleFactor(n,c+r));return[r*u,a*u,s*u,c*u]}_getRadiusScaleFactor(e,n){return n<=0?1:e<=0?0:e/n}_normalizePosition(e){return No(e,this._store.flowHost,this._transform)}_unscaleSize(e){return Tt.initialize(e.width/this._transform.scale,e.height/this._transform.scale)}_getUnscaledRect(e,n,o){return new rt(e.x,e.y,n.width,n.height,this._unscaleRadius(o.radius1),this._unscaleRadius(o.radius2),this._unscaleRadius(o.radius3),this._unscaleRadius(o.radius4))}_unscaleRadius(e){return e/this._transform.scale}_getOffsetSize(e,n){return Tt.offsetFromElement(e)||n}static \u0275fac=function(n){return new(n||tl)};static \u0275prov=y({token:tl,factory:tl.\u0275fac})};return t=E([D(oi)],t),t})(),uu=class{connector;cache;static fToken=Symbol("ResolveConnectionEndpointRectRequest");constructor(i,e){this.connector=i,this.cache=e}},b6=(()=>{let t=class nl{_mediator=p(V);handle({connector:e,cache:n}){let o=this._buildCacheKey(e),r=n.get(o)??this._calculateRect(e);return n.set(o,r),r}_buildCacheKey(e){return`${e.kind}::${e.fId()}`}_calculateRect(e){return this._mediator.execute(new oi(e.hostElement))}static \u0275fac=function(n){return new(n||nl)};static \u0275prov=y({token:nl,factory:nl.\u0275fac})};return t=E([D(uu)],t),t})(),pu=class{connection;static fToken=Symbol("ResolveConnectionEndpointsRequest");constructor(i){this.connection=i}},y6=(()=>{let t=class il{_store=p(L);handle({connection:e}){let n=this._store.outputs.get(e.fOutputId()),o=this._store.inputs.get(e.fInputId());return!n||!o?null:{source:n,target:o}}static \u0275fac=function(n){return new(n||il)};static \u0275prov=y({token:il,factory:il.\u0275fac})};return t=E([D(pu)],t),t})(),Sr=class{connection;cache;static fToken=Symbol("ResolveConnectionGeometryRequest");constructor(i,e){this.connection=i,this.cache=e}},C6=(()=>{let t=class ol{_mediator=p(V);handle({connection:e,cache:n}){let o=this._resolveConnectionEndpoints(e);return o?Bt(me({},o),{sourceRect:this._resolveEndpointRect(o.source,n),targetRect:this._resolveEndpointRect(o.target,n)}):null}_resolveConnectionEndpoints(e){return this._mediator.execute(new pu(e))}_resolveEndpointRect(e,n){return this._mediator.execute(new uu(e,n))}static \u0275fac=function(n){return new(n||ol)};static \u0275prov=y({token:ol,factory:ol.\u0275fac})};return t=E([D(Sr)],t),t})(),it=class{element;static fToken=Symbol("GetNormalizedElementRectRequest");constructor(i){this.element=i}},x6=(()=>{let t=class rl{_store=p(L);_mediator=p(V);get _transform(){return this._store.transform}handle({element:e}){let n=this._mediator.execute(new To(e));if(n)return n;let o=ne.fromElement(e),r=this._normalizePosition(o),a=this._unscaleSize(o),s=this._getUnscaledRect(r,a),c=this._getOffsetSize(e,a),u=this._fromCenter(s,c.width,c.height);return this._mediator.execute(new Tr(e,u)),u}_fromCenter(e,n,o){return ne.initialize(e.gravityCenter.x-n/2,e.gravityCenter.y-o/2,n,o)}_normalizePosition(e){return No(e,this._store.flowHost,this._transform)}_unscaleSize(e){return Tt.initialize(e.width/this._transform.scale,e.height/this._transform.scale)}_getUnscaledRect(e,n){return new rt(e.x,e.y,n.width,n.height)}_getOffsetSize(e,n){return Tt.offsetFromElement(e)||n}static \u0275fac=function(n){return new(n||rl)};static \u0275prov=y({token:rl,factory:rl.\u0275fac})};return t=E([D(it)],t),t})(),Nn=class{connector;static fToken=Symbol("ResolveConnectionEndpointRotationContextRequest");constructor(i){this.connector=i}},w6=(()=>{let t=class al{_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 o=this._mediator.execute(new it(n.hostElement));return{rotationDeg:n._rotate,pivot:o.gravityCenter}}static \u0275fac=function(n){return new(n||al)};static \u0275prov=y({token:al,factory:al.\u0275fac})};return t=E([D(Nn)],t),t})(),hu=class{connection;geometry;static fToken=Symbol("BuildConnectionLineRequest");constructor(i,e){this.connection=i,this.geometry=e}},T6=(()=>{let t=class sl{_mediator=p(V);_connectionBehaviour=p(Fo);handle({connection:e,geometry:n}){return this._connectionBehaviour.handle(new gn(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 Nn(e))}static \u0275fac=function(n){return new(n||sl)};static \u0275prov=y({token:sl,factory:sl.\u0275fac})};return t=E([D(hu)],t),t})(),kr=class{connection;source;target;line;static fToken=Symbol("RenderConnectionWithLineRequest");constructor(i,e,n,o){this.connection=i,this.source=e,this.target=n,this.line=o}},S6=(()=>{let t=class ll{_mediator=p(V);handle({connection:e,source:n,target:o,line:r}){this._mediator.execute(new su(n,o)),this._mediator.execute(new au(e,r))}static \u0275fac=function(n){return new(n||ll)};static \u0275prov=y({token:ll,factory:ll.\u0275fac})};return t=E([D(kr)],t),t})(),Ir=class{connection;geometry;static fToken=Symbol("RenderConnectionFromGeometryRequest");constructor(i,e){this.connection=i,this.geometry=e}},k6=(()=>{let t=class cl{_mediator=p(V);handle({connection:e,geometry:n}){let o=this._mediator.execute(new hu(e,n));this._mediator.execute(new kr(e,n.source,n.target,o))}static \u0275fac=function(n){return new(n||cl)};static \u0275prov=y({token:cl,factory:cl.\u0275fac})};return t=E([D(Ir)],t),t})(),fu=class{connection;cache;static fToken=Symbol("RenderConnectionRequest");constructor(i,e){this.connection=i,this.cache=e}},I6=(()=>{let t=class dl{_mediator=p(V);handle({connection:e,cache:n}){let o=this._mediator.execute(new Sr(e,n));o&&this._mediator.execute(new Ir(e,o))}static \u0275fac=function(n){return new(n||dl)};static \u0275prov=y({token:dl,factory:dl.\u0275fac})};return t=E([D(fu)],t),t})(),Ri=class{session;static fToken=Symbol("IsConnectionRedrawCurrentRequest");constructor(i){this.session=i}},M6=(()=>{let t=class ul{_store=p(L);_state=p(xh);handle({session:e}){return e.renderTicket===this._state.renderTicket&&e.nodesRevision===this._store.nodesRevision}static \u0275fac=function(n){return new(n||ul)};static \u0275prov=y({token:ul,factory:ul.\u0275fac})};return t=E([D(Ri)],t),t})(),Mr=class{session;static fToken=Symbol("CompleteConnectionRedrawRequest");constructor(i){this.session=i}},E6=(()=>{let t=class pl{_mediator=p(V);_store=p(L);handle({session:e}){this._mediator.execute(new Ri(e))&&this._store.completeConnectionsRender(e.connectionsRevision,e.nodesRevision)}static \u0275fac=function(n){return new(n||pl)};static \u0275prov=y({token:pl,factory:pl.\u0275fac})};return t=E([D(Mr)],t),t})(),mu=class{batchItem;result;static fToken=Symbol("ApplyConnectionWorkerResultRequest");constructor(i,e){this.batchItem=i,this.result=e}},D6=(()=>{let t=class hl{_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 kr(e.connection,e.geometry.source,e.geometry.target,n.line))}catch{this._fallbackToMainThread(e)}}}_fallbackToMainThread(e){this._mediator.execute(new Ir(e.connection,e.geometry))}_isSupportedWorkerResult(e){return!!(e?.supported&&e.sourceSide&&e.targetSide&&e.line)}static \u0275fac=function(n){return new(n||hl)};static \u0275prov=y({token:hl,factory:hl.\u0275fac})};return t=E([D(mu)],t),t})(),ei=class{connections;cache;startIndex;session;batchItems;workerResults;static fToken=Symbol("RunConnectionRedrawSliceRequest");constructor(i,e,n,o,r,a){this.connections=i,this.cache=e,this.startIndex=n,this.session=o,this.batchItems=r,this.workerResults=a}},P6=500,R6=6,O6=(()=>{let t=class fl{_mediator=p(V);_browser=p(at);handle({connections:e,cache:n,startIndex:o,session:r,batchItems:a,workerResults:s}){if(!this._isCurrent(r))return;let c=this._now(),u=o,f=0;for(;u<e.length&&f<P6&&this._isWithinSliceBudget(c);){let g=e[u];if(a?this._mediator.execute(new mu(a[u]??null,s?.[u])):this._mediator.execute(new fu(g,n)),u++,f++,!this._isCurrent(r))return}if(u>=e.length){this._mediator.execute(new Mr(r));return}this._requestAnimationFrame(()=>this._mediator.execute(new ei(e,n,u,r,a,s)))}_isCurrent(e){return this._mediator.execute(new Ri(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<R6:!0}static \u0275fac=function(n){return new(n||fl)};static \u0275prov=y({token:fl,factory:fl.\u0275fac})};return t=E([D(ei)],t),t})(),_u=class{static fToken=Symbol("StartConnectionRedrawRequest")},F6=(()=>{let t=class ml{_store=p(L);_state=p(xh);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||ml)};static \u0275prov=y({token:ml,factory:ml.\u0275fac})};return t=E([D(_u)],t),t})(),Er=class{static fToken=Symbol("RedrawConnectionsRequest")},gu=class{connectionCount;static fToken=Symbol("ShouldUseConnectionWorkerRequest");constructor(i){this.connectionCount=i}},Dr=class{static fToken=Symbol("IsConnectionWorkerEnabledRequest")},N6=(()=>{let t=class _l{_browser=p(at);_state=p(Li);handle(e){if(this._state.isDisabled||!this._isWorkerAvailable())return!1;let n=this._browser.document.defaultView;return Ay(n)}_isWorkerAvailable(){return this._browser.isBrowser()}static \u0275fac=function(n){return new(n||_l)};static \u0275prov=y({token:_l,factory:_l.\u0275fac})};return t=E([D(Dr)],t),t})(),A6=(()=>{let t=class gl{_mediator=p(V);handle({connectionCount:e}){return e>0&&this._mediator.execute(new Dr)}static \u0275fac=function(n){return new(n||gl)};static \u0275prov=y({token:gl,factory:gl.\u0275fac})};return t=E([D(gu)],t),t})(),vu=class{connection;geometry;originalIndex;static fToken=Symbol("BuildConnectionWorkerPayloadItemRequest");constructor(i,e,n){this.connection=i,this.geometry=e,this.originalIndex=n}},L6=(()=>{let t=class vl{_store=p(L);handle({connection:e,geometry:n,originalIndex:o}){let{source:r,target:a,sourceRect:s,targetRect:c}=n;return{originalIndex:o,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||vl)};static \u0275prov=y({token:vl,factory:vl.\u0275fac})};return t=E([D(vu)],t),t})(),bu=class{connections;cache;static fToken=Symbol("BuildConnectionWorkerBatchRequest");constructor(i,e){this.connections=i,this.cache=e}},B6=(()=>{let t=class bl{_mediator=p(V);handle({connections:e,cache:n}){let o=new Array(e.length),r=[];for(let a=0;a<e.length;a++){let s=this._buildBatchItem(e[a],n,a);o[a]=s,s&&r.push(s.payload)}return{items:o,payload:r}}_buildBatchItem(e,n,o){let r=this._mediator.execute(new Sr(e,n));return r?{connection:e,geometry:r,payload:this._mediator.execute(new vu(e,r,o))}:null}static \u0275fac=function(n){return new(n||bl)};static \u0275prov=y({token:bl,factory:bl.\u0275fac})};return t=E([D(bu)],t),t})(),yu=class{error;static fToken=Symbol("DisableConnectionWorkerRequest");constructor(i){this.error=i}},Pr=class{error;static fToken=Symbol("ResetConnectionWorkerRuntimeRequest");constructor(i){this.error=i}},V6=(()=>{let t=class yl{_state=p(Li);handle({error:e}){this._state.resetRuntime(e)}static \u0275fac=function(n){return new(n||yl)};static \u0275prov=y({token:yl,factory:yl.\u0275fac})};return t=E([D(Pr)],t),t})(),z6=(()=>{let t=class Cl{_state=p(Li);_mediator=p(V);handle({error:e}){this._state.isDisabled=!0,this._mediator.execute(new Pr(e))}static \u0275fac=function(n){return new(n||Cl)};static \u0275prov=y({token:Cl,factory:Cl.\u0275fac})};return t=E([D(yu)],t),t})(),Cu=class{message;static fToken=Symbol("HandleConnectionWorkerMessageRequest");constructor(i){this.message=i}},H6=(()=>{let t=class xl{_state=p(Li);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||xl)};static \u0275prov=y({token:xl,factory:xl.\u0275fac})};return t=E([D(Cu)],t),t})(),xu=class{static fToken=Symbol("EnsureConnectionWorkerRequest")},q6=(()=>{let t=class wl{_browser=p(at);_state=p(Li);_mediator=p(V);handle(e){if(this._state.worker)return this._state.worker;let n=this._browser.document.defaultView;if(!Ay(n))return null;let o=Ly(n);if(!o)return null;let r=o6(o);try{let a=new o.workerCtor(r,{name:"f-flow-connection-worker"});return a.onmessage=s=>{this._mediator.execute(new Cu(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 By(r,o.urlApi),this._disableWorker(a instanceof Error?a:new Error("Connection worker initialization failed.")),null}}_disableWorker(e){this._mediator.execute(new yu(e))}_resetWorkerAfterRuntimeError(e){this._mediator.execute(new Pr(e))}static \u0275fac=function(n){return new(n||wl)};static \u0275prov=y({token:wl,factory:wl.\u0275fac})};return t=E([D(xu)],t),t})(),wu=class{payload;static fToken=Symbol("RunConnectionWorkerRequest");constructor(i){this.payload=i}},G6=(()=>{let t=class Tl{_state=p(Li);_mediator=p(V);handle({payload:e}){if(!e.length)return Promise.resolve([]);if(!this._mediator.execute(new Dr))return Promise.reject(new Error("Connection worker is disabled."));this._interruptPendingRequests();let n=this._mediator.execute(new xu);if(!n)return Promise.reject(new Error("Unable to initialize connection worker."));let o=++this._state.nextRequestId;return new Promise((r,a)=>{this._state.pending.set(o,{resolve:r,reject:a});try{n.postMessage({requestId:o,items:e})}catch(s){this._state.pending.delete(o),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||Tl)};static \u0275prov=y({token:Tl,factory:Tl.\u0275fac})};return t=E([D(wu)],t),t})(),Tu=class{batch;static fToken=Symbol("RunConnectionWorkerBatchRequest");constructor(i){this.batch=i}},j6=(()=>{let t=class Sl{_mediator=p(V);handle({batch:e}){return e.payload.length?this._mediator.execute(new wu(e.payload)):Promise.resolve([])}static \u0275fac=function(n){return new(n||Sl)};static \u0275prov=y({token:Sl,factory:Sl.\u0275fac})};return t=E([D(Tu)],t),t})(),Su=class{connections;cache;session;static fToken=Symbol("StartConnectionWorkerRedrawRequest");constructor(i,e,n){this.connections=i,this.cache=e,this.session=n}},U6=(()=>{let t=class kl{_mediator=p(V);handle({connections:e,cache:n,session:o}){let r=this._mediator.execute(new bu(e,n));if(!r.payload.length){this._mediator.execute(new ei(e,n,0,o,r.items));return}this._mediator.execute(new Tu(r)).then(a=>{this._mediator.execute(new Ri(o))&&this._mediator.execute(new ei(e,n,0,o,r.items,this._alignWorkerResults(a,e.length)))}).catch(()=>{this._mediator.execute(new Ri(o))&&this._mediator.execute(new ei(e,n,0,o,r.items))})}_alignWorkerResults(e,n){let o=new Array(n);for(let r of e){let a=r.originalIndex;a<0||a>=n||(o[a]=r)}return o}static \u0275fac=function(n){return new(n||kl)};static \u0275prov=y({token:kl,factory:kl.\u0275fac})};return t=E([D(Su)],t),t})(),$6=(()=>{let t=class Il{_mediator=p(V);_store=p(L);handle(e){let n=this._mediator.execute(new _u);this._createMarkersForCreate(),this._createMarkersForSnap();let o=[...this._store.connections.getAll()],r=new Map;if(!o.length){this._mediator.execute(new Mr(n));return}this._shouldUseConnectionWorker(o.length)?this._redrawUsingWorker(o,r,n):this._redrawWithoutWorker(o,r,n)}_createMarkersForCreate(){let e=this._store.connections.getForCreate();e&&this._mediator.execute(new xo(e))}_createMarkersForSnap(){let e=this._store.connections.getForSnap();e&&this._mediator.execute(new xo(e))}_shouldUseConnectionWorker(e){return this._mediator.execute(new gu(e))}_redrawUsingWorker(e,n,o){this._mediator.execute(new Su(e,n,o))}_redrawWithoutWorker(e,n,o){this._mediator.execute(new ei(e,n,0,o))}static \u0275fac=function(n){return new(n||Il)};static \u0275prov=y({token:Il,factory:Il.\u0275fac})};return t=E([D(Er)],t),t})(),Fm=class{static fToken=Symbol("RemoveConnectionForCreateFromStoreRequest")},W6=(()=>{let t=class Ml{_store=p(L);handle(e){this._store.connections.removeInstanceForCreate()}static \u0275fac=function(n){return new(n||Ml)};static \u0275prov=y({token:Ml,factory:Ml.\u0275fac})};return t=E([D(Fm)],t),t})(),ku=class{connection;static fToken=Symbol("RemoveConnectionFromStoreRequest");constructor(i){this.connection=i}},K6=(()=>{let t=class El{_store=p(L);handle({connection:e}){this._store.connections.remove(e),this._store.emitConnectionChanges()}static \u0275fac=function(n){return new(n||El)};static \u0275prov=y({token:El,factory:El.\u0275fac})};return t=E([D(ku)],t),t})(),Iu=class{instance;static fToken=Symbol("RemoveConnectionMarkerFromStoreRequest");constructor(i){this.instance=i}},Y6=(()=>{let t=class Dl{_store=p(L);handle({instance:e}){this._store.connectionMarkers.remove(e),this._store.emitNodeChanges()}static \u0275fac=function(n){return new(n||Dl)};static \u0275prov=y({token:Dl,factory:Dl.\u0275fac})};return t=E([D(Iu)],t),t})(),Nm=class{waypointIndex;connectionId;static fToken=Symbol("RemoveConnectionWaypointRequest");constructor(i,e){this.waypointIndex=i,this.connectionId=e}},Mu=class{static fToken=Symbol("EmitEndDragSequenceEventRequest")},X6=(()=>{let t=class Pl{_store=p(L);_dragSession=p(fe);handle(e){this._store.flowHost.classList.remove(ht.DRAG_AND_DROP.DRAGGING),this._dragSession.reset(),this._emitEvent()}_emitEvent(){this._store.fDraggable?.fDragEnded?.emit()}static \u0275fac=function(n){return new(n||Pl)};static \u0275prov=y({token:Pl,factory:Pl.\u0275fac})};return t=E([D(Mu)],t),t})(),Eu=class{static fToken=Symbol("EmitStartDragSequenceEventRequest")},Z6=(()=>{let t=class Rl{_mediator=p(V);_store=p(L);_dragContext=p(fe);handle(e){this._dragContext.draggableItems.length>0&&(this._store.flowHost.classList.add(ht.DRAG_AND_DROP.DRAGGING),this._mediator.execute(new Rr),this._emitDragStarted())}_emitDragStarted(){let e=this._dragContext.draggableItems[0].getEvent();this._store.fDraggable?.fDragStarted?.emit(new Nu(e.kind,e.data?me({},e.data):void 0,e.fEventType))}static \u0275fac=function(n){return new(n||Rl)};static \u0275prov=y({token:Rl,factory:Rl.\u0275fac})};return t=E([D(Eu)],t),t})(),Rr=class{static fToken=Symbol("EmitSelectionChangeEventRequest")},Oi=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(i,e){this._event=i,this._target=e}setTarget(i){this._target=i}preventDefault(){this.originalEvent.preventDefault()}get isEventInLockedContext(){return this.targetElement.closest("[fLockedContext]")!==null}},Du=class extends Oi{constructor(i,e){super(i,e)}isMouseLeftButton(){return this.originalEvent.button===0}isMouseRightButton(){return this.originalEvent.buttons===2}getPosition(){return{x:this.originalEvent.clientX,y:this.originalEvent.clientY}}},Am=class extends Oi{constructor(i,e){super(i,e)}isMouseLeftButton(){let i=this.originalEvent;return i.pointerType==="mouse"&&i.button===0||i.pointerType==="touch"}isMouseRightButton(){let i=this.originalEvent;return i.pointerType==="mouse"&&i.button===2||i.pointerType==="touch"}getPosition(){let i=this.originalEvent;return{x:i.clientX,y:i.clientY}}getPointerType(){return this.originalEvent.pointerType}getPointerId(){return this.originalEvent.pointerId}},Lm=class extends Oi{constructor(i){super(i)}isMouseLeftButton(){return!0}isMouseRightButton(){return!1}getPosition(){let i=this.originalEvent.touches;return{x:i[0].clientX,y:i[0].clientY}}},Bm=class extends Oi{constructor(i,e){super(i,e)}isMouseLeftButton(){return!0}isMouseRightButton(){return!1}getPosition(){let i=this.originalEvent.targetTouches[0];return{x:i.clientX,y:i.clientY}}},ze=(()=>{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})(),Q6=800,Vm=class{_document=p(za);_ngZone=p(Xt,{optional:!0});_mouseListeners=ze.emptyListener();_touchListeners=ze.emptyListener();_startListeners=ze.emptyListener();isSyntheticEvent(i){return!!this._lastTouchEventTime&&this._lastTouchEventTime+Q6>Date.now()}_lastTouchEventTime=0;isDragStarted=!1;_dragStartThreshold=3;_dragStartDelay=0;_dragStartTime=0;_dragStartPosition={x:0,y:0};_moveHandler=this._checkDragSequenceToStart;_pointerDownElement=null;_onMouseDown=i=>{let e=this.isSyntheticEvent(i),n=e7(i),o=new Du(i);if(e||n||this.disabled||this.isDragStarted)return;this._pointerDownElement=o.targetElement,this.onPointerDown(o)&&(this._dragStartTime=Date.now(),this._dragStartPosition=o.getPosition(),this._ngZone?.runOutsideAngular(()=>{this._listen("selectstart",this._onSelectStart,ze.activeListener()),this._listen("mousemove",this._onMouseMove),this._listen("pointerup",this._onPointerUpEvent),this._listen("pointercancel",this._onPointerUpEvent,ze.activeCaptureListener()),this._listen("contextmenu",this._preventDuringDrag,ze.activeCaptureListener())}),this._mouseListeners=()=>{this._unlisten("selectstart",this._onSelectStart,ze.activeListener()),this._unlisten("mousemove",this._onMouseMove),this._unlisten("pointerup",this._onPointerUpEvent),this._unlisten("pointercancel",this._onPointerUpEvent,ze.activeCaptureListener()),this._unlisten("contextmenu",this._preventDuringDrag,ze.activeCaptureListener())})};_onTouchDown=i=>{let e=t7(i),n=new Lm(i);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,ze.activeListener()),this._listen("touchmove",this._onTouchMove),this._listen("pointerup",this._onPointerUpEvent),this._listen("pointercancel",this._onPointerUpEvent,ze.activeCaptureListener()),this._listen("contextmenu",this._preventDuringDrag,ze.activeCaptureListener())}),this._touchListeners=()=>{this._unlisten("selectstart",this._onSelectStart,ze.activeListener()),this._unlisten("touchmove",this._onTouchMove),this._unlisten("pointerup",this._onPointerUpEvent),this._unlisten("pointercancel",this._onPointerUpEvent,ze.activeCaptureListener()),this._unlisten("contextmenu",this._preventDuringDrag,ze.activeCaptureListener())})};_onSelectStart=i=>{this.onSelect(i)};_onMouseMove=i=>{this._moveHandler(new Du(i))};_onTouchMove=i=>{this._moveHandler(new Bm(i))};_checkDragSequenceToStart(i){let e=i.getPosition();if(!this.isDragStarted&&this._pointerDownElement){i.setTarget(this._pointerDownElement);let n=Math.abs(e.x-this._dragStartPosition.x),o=Math.abs(e.y-this._dragStartPosition.y);if(n+o>=this._dragStartThreshold){if(!(Date.now()>=this._dragStartTime+this._dragStartDelay)){this._endDragSequence();return}i.preventDefault(),this.prepareDragSequence(i),this.isDragStarted=!0,this._moveHandler=this.onPointerMove,J6(i.originalEvent)&&(this._lastTouchEventTime=Date.now())}}}_onPointerUpEvent=i=>{this.isDragStarted&&this.onPointerUp(new Am(i)),this._endDragSequence()};_endDragSequence(){this.isDragStarted=!1,this._pointerDownElement=null,this._moveHandler=this._checkDragSequenceToStart,this._mouseListeners(),this._mouseListeners=ze.emptyListener(),this._touchListeners(),this._touchListeners=ze.emptyListener(),this.finalizeDragSequence()}subscribe(){this.unsubscribe(),this._ngZone?.runOutsideAngular(()=>{this._listen("mousedown",this._onMouseDown,ze.activeListener()),this._listen("touchstart",this._onTouchDown,ze.passiveListener())}),this._startListeners=()=>{this._unlisten("mousedown",this._onMouseDown,ze.activeListener()),this._unlisten("touchstart",this._onTouchDown,ze.passiveListener())}}unsubscribe(){this._startListeners(),this._startListeners=ze.emptyListener(),this._touchListeners(),this._touchListeners=ze.emptyListener(),this._mouseListeners(),this._mouseListeners=ze.emptyListener()}_listen(i,e,n){this._document.addEventListener(i,e,n)}_unlisten(i,e,n){this._document.removeEventListener(i,e,n)}_preventDuringDrag=i=>{this.isDragStarted&&i.preventDefault()}};function J6(t){return t.type[0]==="t"}function e7(t){return t.buttons===0||t.offsetX===0&&t.offsetY===0}function t7(t){let i=t.touches&&t.touches[0]||t.changedTouches&&t.changedTouches[0];return!!i&&i.identifier===-1&&(i.radiusX==null||i.radiusX===1)&&(i.radiusY==null||i.radiusY===1)}var zm=class extends Oi{_position;_isMouseLeftButton;_isMouseRightButton;constructor(i){super(i.originalEvent,i.targetElement),this._position=i.getPosition(),this._isMouseLeftButton=i.isMouseLeftButton(),this._isMouseRightButton=i.isMouseRightButton()}isMouseLeftButton(){return this._isMouseLeftButton}isMouseRightButton(){return this._isMouseRightButton}getPosition(){return me({},this._position)}};function n7(t){return new zm(t)}var fe=(()=>{class t{selectedItems=[];isSelectedChanged=!1;onPointerDownScale=1;onPointerDownPosition=new he(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 he(0,0),this.autoPanFrameId=null,this.lastPointerEvent=null,this.lastPointerPosition=null,this.isAutoPanCanvasMoved=!1}markSelectionAsChanged(){this.isSelectedChanged=!0}rememberPointerEvent(e){this.lastPointerEvent=n7(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})(),Hm=class{nodeIds;groupIds;connectionIds;get fNodeIds(){return this.nodeIds}get fGroupIds(){return this.groupIds}get fConnectionIds(){return this.connectionIds}constructor(i,e,n){this.nodeIds=i,this.groupIds=e,this.connectionIds=n}},i7=(()=>{let t=class Ol{_mediator=p(V);_store=p(L);_dragSession=p(fe);handle(e){this._dragSession.isSelectedChanged&&(this._emitSelectionChange(this._getSelection()),this._dragSession.isSelectedChanged=!1,this._mediator.execute(new ti))}_getSelection(){return this._mediator.execute(new ta)}_emitSelectionChange(e){this._store.fDraggable?.fSelectionChange.emit(new Hm(e.fNodeIds,e.fGroupIds,e.fConnectionIds))}static \u0275fac=function(n){return new(n||Ol)};static \u0275prov=y({token:Ol,factory:Ol.\u0275fac})};return t=E([D(Rr)],t),t})(),qm=class{nodeOrGroup;static fToken=Symbol("GetNormalizedParentNodeRectRequest");constructor(i){this.nodeOrGroup=i}},o7=(()=>{let t=class Fl{_store=p(L);_mediator=p(V);handle({nodeOrGroup:e}){let n=ne.initialize(-1/0,-1/0,1/0,1/0),o=this._getNode(e.fParentId());return o&&(n=this._getParentRect(o)),n}_getNode(e){return this._store.nodes.get(e)}_getParentRect(e){let n=this._getNodeRect(e),o=this._getNodePadding(e,n);return ne.initialize(n.x+o[0],n.y+o[1],n.width-o[0]-o[2],n.height-o[1]-o[3])}_getNodeRect(e){return this._mediator.execute(new it(e.hostElement))}_getNodePadding(e,n){return this._mediator.execute(new Ni(e,n))}static \u0275fac=function(n){return new(n||Fl)};static \u0275prov=y({token:Fl,factory:Fl.\u0275fac})};return t=E([D(qm)],t),t})(),Gm=class{fParentNodes;fDraggedNodes;static fToken=Symbol("IsArrayHasParentNodeRequest");constructor(i,e){this.fParentNodes=i,this.fDraggedNodes=e}},r7=(()=>{let t=class Nl{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(o=>e.includes(o.fId()))}static \u0275fac=function(n){return new(n||Nl)};static \u0275prov=y({token:Nl,factory:Nl.\u0275fac})};return t=E([D(Gm)],t),t})(),jm=class{fNodeId;fConnectionIds;constructor(i,e){this.fNodeId=i,this.fConnectionIds=e}},Pu=class extends jm{nodeId;connectionIds;constructor(i,e){super(i,e),this.nodeId=i,this.connectionIds=e}},Ru=class{nodeOrGroup;static fToken=Symbol("DetectConnectionsUnderDragNodeRequest");constructor(i){this.nodeOrGroup=i}},a7=(()=>{let t=class Al{_mediator=p(V);_store=p(L);handle({nodeOrGroup:e}){let n=this._collectConnectableConnectorIds(e,"source"),o=this._collectConnectableConnectorIds(e,"target");if(!n.size||!o.size)return;let r=this._collectAttachedConnectionIds(n,o),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 Pu(e.fId(),s)),this._store.fDraggable?.fNodeConnectionsIntersection.emit(new Pu(e.fId(),s)))}_collectConnectableConnectorIds(e,n){let o=n==="source"?this._store.outputs.getAll():this._store.inputs.getAll(),r=new Set;for(let a of o)a.canBeConnected&&e.isContains(a.hostElement)&&r.add(a.fId());return r}_collectAttachedConnectionIds(e,n){let o=new Set;for(let r of this._store.connections.getAll())(e.has(r.fOutputId())||n.has(r.fInputId()))&&o.add(r.fId());return o}_collectConnectionsUnderNode(e){let n=this._mediator.execute(new oi(e.hostElement,!1)),o=[];for(let r of this._store.connections.getAll())this._hasIntersection(r,n)&&o.push(r);return o}_hasIntersection(e,n){return fo.getRoundedRectIntersectionsWithSVGPath(e.fPath().hostElement,n).length>0}static \u0275fac=function(n){return new(n||Al)};static \u0275prov=y({token:Al,factory:Al.\u0275fac})};return t=E([D(Ru)],t),t})(),s7=[Z6,X6,i7,o7,r7,a7],l7=new Set(["create-connection","reassign-connection","drag-node"]),c7=new Set(["selection-area"]),d7=new Set(["assign-to-container"]);function zy(t){let i=null;for(let e of t){if(d7.has(e))continue;let n=l7.has(e)?"rebase":c7.has(e)?"direct":null;if(!n)return null;if(!i){i=n;continue}if(i!==n)return null}return i}function Hy(t,i,e,n,o){return H.initialize(ty(t.x,i.left,i.right,e,n,o),ty(t.y,i.top,i.bottom,e,n,o))}function ty(t,i,e,n,o,r){let a=Math.max(0,n),s=Math.max(0,o);if(!a||!s)return 0;if(t<=i+a){let c=iy((i+a-t)/a,0,1);return ny(c,s,r)}if(t>=e-a){let c=iy((t-(e-a))/a,0,1);return-ny(c,s,r)}return 0}function u7(t,i,e){let n=e||1;return he.fromPoint(t).add(he.fromPoint(i).div(n))}function ny(t,i,e){return e?i*t:i}function iy(t,i,e){return Math.max(i,Math.min(e,t))}var Ou=class{static fToken=Symbol("RunAutoPanFrameRequest")},ri=class{static fToken=Symbol("StopAutoPanRequest")},p7=(()=>{let t=class Ll{_store=p(L);_dragContext=p(fe);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||Ll)};static \u0275prov=y({token:Ll,factory:Ll.\u0275fac})};return t=E([D(ri)],t),t})(),Or=class{static fToken=Symbol("SyncAutoPanRequest")},h7=(()=>{let t=class Bl{_mediator=p(V);_store=p(L);_dragContext=p(fe);handle(e){if(!this._canAutoPan()||!this._hasAutoPanDelta()){this._mediator.execute(new ri);return}this._dragContext.autoPanFrameId===null&&(this._dragContext.autoPanFrameId=requestAnimationFrame(()=>{this._dragContext.autoPanFrameId=null,this._mediator.execute(new Ou)}))}_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?H.initialize():Hy(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(Ke.AUTO_PAN)}static \u0275fac=function(n){return new(n||Bl)};static \u0275prov=y({token:Bl,factory:Bl.\u0275fac})};return t=E([D(Or)],t),t})(),f7=(()=>{let t=class Vl{_mediator=p(V);_store=p(L);_dragContext=p(fe);handle(e){let n=this._getAutoPanMode();if(!this._canAutoPan(n)){this._mediator.execute(new ri);return}let o=this._getAutoPanDelta();if(!o.x&&!o.y){this._mediator.execute(new ri);return}this._applyCanvasDelta(o,n),this._replayLastPointerMove(),this._mediator.execute(new Or)}_applyCanvasDelta(e,n){let o=this._store.transform;n==="rebase"&&(this._dragContext.onPointerDownPosition=u7(this._dragContext.onPointerDownPosition,e,this._dragContext.onPointerDownScale||o.scale||1)),o.position=he.fromPoint(o.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(o=>{o.onPointerMove(me({},n),e)})}_getPointerPositionInCanvas(e){return he.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?H.initialize():Hy(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(Ke.AUTO_PAN)}static \u0275fac=function(n){return new(n||Vl)};static \u0275prov=y({token:Vl,factory:Vl.\u0275fac})};return t=E([D(Ou)],t),t})(),m7=[h7,f7,p7],Fu=class{event;static fToken=Symbol("DragCanvasFinalizeRequest");constructor(i){this.event=i}},Nu=class{kind;data;fEventType;get fData(){return this.data}constructor(i,e,n){this.kind=i,this.data=e,this.fEventType=n??i}},St=class{data(){}_features=[];getEvent(){return new Nu(this.kind,this.data(),this.type)}attachFeature(i){this._features.push(i)}featuresPrepare(i){for(let e of this._features)e.onPrepare?.(i)}featuresMove(i,e){for(let n of this._features)n.onMove?.(i,e)}featuresFinalize(i,e){for(let n of this._features)n.onFinalize?.(i,e)}featuresEnd(i){for(let e of this._features)e.onEnd?.(i)}},Au=class{_isConnected=!1;get isConnected(){return this._isConnected}toConnector=[];isSelfConnectable=!0;fConnectableSide=j.AUTO;userFConnectableSide=j.AUTO;isContains(i){return this.hostElement.contains(i)}setConnected(i){this._isConnected=!0,this.toConnector.push(i)}resetConnected(){this._isConnected=!1,this.toConnector=[]}},_7=new ve("F_NODE_INPUT"),g7=(()=>{class t extends Au{kind="input";get canBeConnected(){return!this.disabled()&&(this.multiple()?!0:!this.isConnected)}static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275dir=je({type:t,standalone:!1,features:[Q]})}return t})(),Cn=(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})(Cn||{});function v7(t){return vr(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})(),wh=new ve("F_NODE"),b7=Oy(class{hostElement;constructor(t){this.hostElement=t}}),Lu=class extends b7{_injector=p(mt);renderer=p(C0);browser=p(at);stateChanges=new rn;_position=H.initialize();_rotate=0;_size;connectors=[];positionChanges(){se(()=>{let i=this.position();Ht(()=>{H.isEqual(this._position,i)||(this._position=i,this.redraw(),this.refresh())})},{injector:this._injector})}sizeChanges(){se(()=>{let i=this.size();Ht(()=>{this._isSizeEqual(i)||(this._size=i,this.redraw(),this.refresh())})},{injector:this._injector})}rotateChanges(){se(()=>{let i=this.rotate();Ht(()=>{this._rotate!==i&&(this._rotate=i,this.redraw(),this.refresh())})},{injector:this._injector})}parentChanges(){se(()=>{this.fParentId(),this.fIncludePadding(),this.fAutoSizeToFitChildren(),Ht(()=>this.refresh())},{injector:this._injector})}_isSizeEqual(i){return this._size?.width===i?.width&&this._size?.height===i?.height}isContains(i){return this.hostElement.contains(i)}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(i){this._position=i}updateRotate(i){this._rotate=i}updateSize(i){this._size=i}setClass(i){this.hostElement.classList.add(i)}removeClass(i){this.hostElement.classList.remove(i)}addConnector(i){this.connectors.push(i),this.refresh()}removeConnector(i){let e=this.connectors.indexOf(i);e!==-1&&this.connectors.splice(e,1),this.refresh()}},y7=0,C7=3,Um=(()=>{class t extends Lu{_debounceTimer=null;_destroyRef=p(bt);_mediator=p(V);fId=B(`f-group-${y7++}`,{alias:"fGroupId"});fParentId=B(null,{alias:"fGroupParentId"});position=Ci(H.initialize(),{alias:"fGroupPosition"});size=B(void 0,{alias:"fGroupSize"});sizeChange=qe({alias:"fGroupSizeChange"});rotate=Ci(0,{alias:"fGroupRotate"});fConnectOnNode=B(!0,{transform:Y});fMinimapClass=B([]);fDraggingDisabled=B(!1,{alias:"fGroupDraggingDisabled",transform:Y});fSelectionDisabled=B(!1,{alias:"fGroupSelectionDisabled",transform:Y});fIncludePadding=B(!0,{transform:Y});fAutoExpandOnChildHit=B(!1,{transform:Y});fAutoSizeToFitChildren=B(!1,{transform:Y});constructor(e){super(e.nativeElement),super.positionChanges(),super.sizeChanges(),super.rotateChanges(),super.parentChanges()}ngOnInit(){super.redraw(),this._mediator.execute(new Kr(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 ti),this._updateConnectorsSides()}_updateConnectorsSides(){this.connectors.length&&(this._debounceTimer&&clearTimeout(this._debounceTimer),this._debounceTimer=setTimeout(()=>this._calculateNodeConnectorsConnectableSides(),C7))}_calculateNodeConnectorsConnectableSides(){this._mediator.execute(new Io(this))}ngAfterViewInit(){this.browser.isBrowser()&&this._listenStateSizeChanges()}_listenStateSizeChanges(){this._mediator.execute(new Xr(this,this._destroyRef))}refresh(){this.stateChanges.notify()}ngOnDestroy(){this._mediator.execute(new Zr(this))}static \u0275fac=function(n){return new(n||t)(Rn(Xe))};static \u0275dir=je({type:t,selectors:[["","fGroup",""]],hostAttrs:[1,"f-group","f-component"],hostVars:5,hostBindings:function(n,o){n&2&&(O("data-f-group-id",o.fId()),ce("f-group-dragging-disabled",o.fDraggingDisabled())("f-group-selection-disabled",o.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:[Ee([{provide:wh,useExisting:t}]),Q]})}return t})(),oy=0,x7=3,Th=(()=>{class t extends Lu{_debounceTimer=null;_destroyRef=p(bt);_mediator=p(V);fId=B(`f-node-${oy++}`,{alias:"fNodeId",transform:e=>So(e)||`f-node-${oy++}`});fParentId=B(null,{alias:"fNodeParentId"});position=Ci(H.initialize(),{alias:"fNodePosition"});size=B(void 0,{alias:"fNodeSize"});sizeChange=qe({alias:"fNodeSizeChange"});rotate=Ci(0,{alias:"fNodeRotate"});fConnectOnNode=B(!0,{transform:Y});fMinimapClass=B([]);fDraggingDisabled=B(!1,{alias:"fNodeDraggingDisabled",transform:Y});fSelectionDisabled=B(!1,{alias:"fNodeSelectionDisabled",transform:Y});fIncludePadding=B(!0,{transform:Y});fAutoExpandOnChildHit=B(!1,{transform:Y});fAutoSizeToFitChildren=B(!1,{transform:Y});constructor(e){super(e.nativeElement),super.positionChanges(),super.sizeChanges(),super.rotateChanges(),super.parentChanges()}ngOnInit(){super.redraw(),this._mediator.execute(new Kr(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 ti),this._updateConnectorsSides()}_updateConnectorsSides(){this.connectors.length&&(this._debounceTimer&&clearTimeout(this._debounceTimer),this._debounceTimer=setTimeout(()=>this._calculateNodeConnectorsConnectableSides(),x7))}_calculateNodeConnectorsConnectableSides(){this._mediator.execute(new Io(this))}ngAfterViewInit(){this.browser.isBrowser()&&this._listenStateSizeChanges()}_listenStateSizeChanges(){this._mediator.execute(new Xr(this,this._destroyRef))}refresh(){this.stateChanges.notify()}ngOnDestroy(){this._mediator.execute(new Zr(this))}static \u0275fac=function(n){return new(n||t)(Rn(Xe))};static \u0275dir=je({type:t,selectors:[["","fNode",""]],hostAttrs:[1,"f-node","f-component"],hostVars:5,hostBindings:function(n,o){n&2&&(O("data-f-node-id",o.fId()),ce("f-node-dragging-disabled",o.fDraggingDisabled())("f-node-selection-disabled",o.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:[Ee([{provide:wh,useExisting:t}]),Q]})}return t})();function w7(t){return!!t.closest("[fNode]")}var ry=0,Gy=(()=>{class t extends g7{hostElement=p(Xe).nativeElement;_mediator=p(V);_node=p(wh);fId=B(`f-node-input-${ry++}`,{alias:"fInputId",transform:e=>So(e)||`f-node-input-${ry++}`});category=B(void 0,{alias:"fInputCategory",transform:So});multiple=B(!0,{alias:"fInputMultiple",transform:Y});disabled=B(!1,{alias:"fInputDisabled",transform:Y});userFConnectableSide=j.AUTO;get fNodeId(){return this._node.fId()}get fNodeHost(){return this._node.hostElement}ngOnInit(){this._mediator.execute(new Ur(this)),this._node.addConnector(this)}ngOnChanges(e){e.userFConnectableSide&&this._node.refresh()}setConnected(e){super.setConnected(e),this.hostElement.classList.toggle(ht.CONNECTOR.INPUT_CONNECTED,!0),this.hostElement.classList.toggle(ht.CONNECTOR.INPUT_NOT_CONNECTABLE,!this.canBeConnected)}resetConnected(){super.resetConnected(),this.hostElement.classList.toggle(ht.CONNECTOR.INPUT_CONNECTED,!1),this.hostElement.classList.toggle(ht.CONNECTOR.INPUT_NOT_CONNECTABLE,!this.canBeConnected)}ngOnDestroy(){this._node.removeConnector(this),this._mediator.execute(new Qr(this))}static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275dir=je({type:t,selectors:[["","fNodeInput",""]],hostAttrs:[1,"f-component","f-node-input"],hostVars:5,hostBindings:function(n,o){n&2&&(O("data-f-input-id",o.fId()),ce("f-node-input-multiple",o.multiple)("f-node-input-disabled",o.disabled()))},inputs:{fId:[1,"fInputId","fId"],category:[1,"fInputCategory","category"],multiple:[1,"fInputMultiple","multiple"],disabled:[1,"fInputDisabled","disabled"],userFConnectableSide:[2,"fInputConnectableSide","userFConnectableSide",e=>mo(e,"fInputConnectableSide",j)]},exportAs:["fNodeInput"],standalone:!1,features:[Ee([{provide:_7,useExisting:t}]),Q,Ji]})}return t})(),T7=(()=>{class t extends Au{get hasConnectionLimits(){return!!this.canBeConnectedInputs&&this.canBeConnectedInputs.length>0}canConnectTo(e){return[e.fId(),e.category()].some(o=>o&&this.canBeConnectedInputs?.includes(o))}static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275dir=je({type:t,standalone:!1,features:[Q]})}return t})();function jy(t){return!!t.closest("[fNodeOutlet]")}var S7=new ve("F_NODE_OUTPUT"),k7=(()=>{class t extends T7{kind="output";get canBeConnected(){return!this.disabled()&&(this.multiple()?!0:!this.isConnected)}static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275dir=je({type:t,standalone:!1,features:[Q]})}return t})();function Uy(t){return!!t.closest("[fNodeOutput]")}var ay=0,$y=(()=>{class t extends k7{hostElement=p(Xe).nativeElement;_mediator=p(V);_node=p(wh);fId=B(`f-node-output-${ay++}`,{alias:"fOutputId",transform:e=>So(e)||`f-node-output-${ay++}`});multiple=B(!1,{alias:"fOutputMultiple",transform:Y});disabled=B(!1,{alias:"fOutputDisabled",transform:Y});userFConnectableSide=j.AUTO;isSelfConnectable=!0;canBeConnectedInputs=[];get fNodeId(){return this._node.fId()}get fNodeHost(){return this._node.hostElement}ngOnInit(){this._mediator.execute(new Ur(this)),this._node.addConnector(this)}ngOnChanges(e){e.userFConnectableSide&&this._node.refresh()}setConnected(e){super.setConnected(e),this.hostElement.classList.toggle(ht.CONNECTOR.OUTPUT_CONNECTED,!0),this.hostElement.classList.toggle(ht.CONNECTOR.OUTPUT_NOT_CONNECTABLE,!this.canBeConnected)}resetConnected(){super.resetConnected(),this.hostElement.classList.toggle(ht.CONNECTOR.OUTPUT_CONNECTED,!1),this.hostElement.classList.toggle(ht.CONNECTOR.OUTPUT_NOT_CONNECTABLE,!this.canBeConnected)}ngOnDestroy(){this._node.removeConnector(this),this._mediator.execute(new Qr(this))}static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275dir=je({type:t,selectors:[["","fNodeOutput",""]],hostAttrs:[1,"f-component","f-node-output"],hostVars:7,hostBindings:function(n,o){n&2&&(O("data-f-output-id",o.fId()),ce("f-node-output-multiple",o.multiple)("f-node-output-disabled",o.disabled())("f-node-output-self-connectable",o.isSelfConnectable))},inputs:{fId:[1,"fOutputId","fId"],multiple:[1,"fOutputMultiple","multiple"],disabled:[1,"fOutputDisabled","disabled"],userFConnectableSide:[2,"fOutputConnectableSide","userFConnectableSide",e=>mo(e,"fOutputConnectableSide",j)],isSelfConnectable:"isSelfConnectable",canBeConnectedInputs:[0,"fCanBeConnectedInputs","canBeConnectedInputs"]},exportAs:["fNodeOutput"],standalone:!1,features:[Ee([{provide:S7,useExisting:t}]),Q,Ji]})}return t})();var Bu=class{event;static fToken=Symbol("CreateConnectionFinalizeRequest");constructor(i){this.event=i}},Fr=class{outlet;static fToken=Symbol("ResolveConnectableOutputForOutletRequest");constructor(i){this.outlet=i}},I7=(()=>{let t=class zl{_store=p(L);handle({outlet:e}){let n=this._findOwnerNode(e);if(!n)throw new Error("The fOutlet must belong to an fNode");let o=this._findFirstConnectableOutputInNode(n);if(!o)throw new Error("Outlet requires at least one connectable output in the same node.");return o}_findOwnerNode(e){let n=e.hostElement;return this._store.nodes.getAll().find(o=>o.isContains(n))}_findFirstConnectableOutputInNode(e){return this._store.outputs.getAll().find(n=>e.isContains(n.hostElement)&&n.canBeConnected)}static \u0275fac=function(n){return new(n||zl)};static \u0275prov=y({token:zl,factory:zl.\u0275fac})};return t=E([D(Fr)],t),t})(),$m=class{sourceId;targetId;dropPosition;fOutputId;fInputId;fDropPosition;constructor(i,e,n){this.sourceId=i,this.targetId=e,this.dropPosition=n,this.fOutputId=i,this.fInputId=e,this.fDropPosition=n}},Vu=(()=>{class t extends St{type="create-connection";kind="create-connection";data(){return{fOutputOrOutletId:this._sourceRef.connector.fId()}}_result=p(si);_mediator=p(V);_connectionBehaviour=p(Fo);_store=p(L);get _connection(){return this._store.connections.getForCreate()}get _snapConnection(){return this._store.connections.getForSnap()}_targets=[];_sourceRef;_pointerDown=new rt;initialize(e,n){this._sourceRef=this._mediator.execute(new Ut(e)),this._pointerDown=rt.fromRect(ne.initialize(n.x,n.y))}prepareDragSequence(){this._collectAndMarkTargets(),this._initSnapConnection(),this._initCreateConnection(),this._connection.show(),this.onPointerMove(H.initialize()),this._result.setData({toConnectorRect:this._pointerDown,canBeConnectedInputs:this._targets,fOutputId:this._sourceRef.connector.fId()})}_collectAndMarkTargets(){this._targets=this._mediator.execute(new Wr(this._sourceRef.connector,this._sourceRef.rect.gravityCenter)),this._mediator.execute(new Do(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),o=this._findClosestTarget(n),r=o?.connector.fConnectableSide||j.TOP;this._drawCreateConnection(n,r);let a=this._snapConnection;if(!a)return;let s=o&&o.distance<a.fSnapThreshold?o:void 0;this._drawSnapConnection(s)}_findClosestTarget(e){return this._mediator.execute(new Fi(e,this._targets))}_drawCreateConnection(e,n){let o=this._connectionBehaviour.handle(new gn(this._sourceRef.rect,e,this._connection,this._sourceRef.connector.fConnectableSide,n,this._resolveRotationContext(this._sourceRef.connector)));this._connection.setLine(o),this._connection.redraw()}_drawSnapConnection(e){let n=this._snapConnection;if(!n)return;if(!e){n.hide();return}let o=this._connectionBehaviour.handle(new gn(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(o),n.redraw()}onPointerUp(){this._connection.redraw(),this._connection.hide(),this._snapConnection?.hide(),this._mediator.execute(new Po(this._targets.map(e=>e.connector)))}_resolveRotationContext(e){return this._mediator.execute(new Nn(e))}static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),M7=(()=>{let t=class Hl{_result=p(si);_mediator=p(V);_store=p(L);_dragContext=p(fe);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 Vu)}_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 jy(e.hostElement)?this._mediator.execute(new Fr(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 $m(this._getTargetOutput(this._getOutput()||this._getOutlet()).fId(),this._getInputUnderPointer(e)?.fId(),e.getPosition()))}_getInputUnderPointer(e){return this._mediator.execute(new $r(e.getPosition(),this._result.getData().canBeConnectedInputs))}static \u0275fac=function(n){return new(n||Hl)};static \u0275prov=y({token:Hl,factory:Hl.\u0275fac})};return t=E([D(Bu)],t),t})(),Nr=class{eventPosition;source;static fToken=Symbol("CreateConnectionCreateDragHandlerRequest");constructor(i,e){this.eventPosition=i,this.source=e}},E7=(()=>{let t=class ql{_store=p(L);_dragContext=p(fe);_dragInjector=p(vt);get _transform(){return this._store.transform}handle({source:e,eventPosition:n}){this._dragContext.onPointerDownScale=this._transform.scale;let o=this._toFlowSpace(n);this._dragContext.onPointerDownPosition=o;let r=this._toCanvasSpace(o),a=this._dragInjector.get(Vu);a.initialize(e,r),this._dragContext.draggableItems=[a]}_toFlowSpace(e){return he.fromPoint(e).elementTransform(this._store.flowHost).div(this._transform.scale)}_toCanvasSpace(e){return he.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||ql)};static \u0275prov=y({token:ql,factory:ql.\u0275fac})};return t=E([D(Nr)],t),t})(),zu=class{event;node;static fToken=Symbol("CreateConnectionFromOutletPreparationRequest");constructor(i,e){this.event=i,this.node=e}},D7=(()=>{let t=class Gl{_mediator=p(V);_store=p(L);handle({event:e,node:n}){let o=this._findOutlet(n);if(!o||(o.setOutputs(this._getOutputs(n)),!o.canBeConnected))return;let r=o.isConnectionFromOutlet?o:this._resolveOutput(o);!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 Fr(e))}_startDrag(e,n){this._mediator.execute(new Nr(e,n))}static \u0275fac=function(n){return new(n||Gl)};static \u0275prov=y({token:Gl,factory:Gl.\u0275fac})};return t=E([D(zu)],t),t})(),Hu=class{event;node;static fToken=Symbol("CreateConnectionFromOutputPreparationRequest");constructor(i,e){this.event=i,this.node=e}},P7=(()=>{let t=class jl{_mediator=p(V);_store=p(L);handle({event:e,node:n}){if(!Uy(e.targetElement)||this._hasOutlet(n))return;let o=this._findOutput(e.targetElement);!o||!o.canBeConnected||this._startDrag(e.getPosition(),o)}_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 Nr(e,n))}static \u0275fac=function(n){return new(n||jl)};static \u0275prov=y({token:jl,factory:jl.\u0275fac})};return t=E([D(Hu)],t),t})(),qu=class{event;fTrigger;static fToken=Symbol("CreateConnectionPreparationRequest");constructor(i,e){this.event=i,this.fTrigger=e}},R7=(()=>{let t=class Ul{_mediator=p(V);_store=p(L);_dragContext=p(fe);handle({event:e,fTrigger:n}){if(!this._isValidConditions()||!this._isValidTrigger(e,n))return;let o=jy(e.targetElement),r=!o&&Uy(e.targetElement);if(!o&&!r)return;let a=this._findOwnerNode(e.targetElement);a&&(o?this._mediator.execute(new zu(e,a)):this._mediator.execute(new Hu(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 an(e.originalEvent,n)}static \u0275fac=function(n){return new(n||Ul)};static \u0275prov=y({token:Ul,factory:Ul.\u0275fac})};return t=E([D(qu)],t),t})(),Gu=class{event;static fToken=Symbol("ReassignConnectionFinalizeRequest");constructor(i){this.event=i}},Wm=class{connectionId;endpoint;previousSourceId;nextSourceId;previousTargetId;nextTargetId;dropPosition;isSourceReassign;isTargetReassign;oldSourceId;newSourceId;oldTargetId;newTargetId;dropPoint;constructor(i,e,n,o,r,a,s){this.connectionId=i,this.endpoint=e,this.previousSourceId=n,this.nextSourceId=o,this.previousTargetId=r,this.nextTargetId=a,this.dropPosition=s,this.isSourceReassign=e==="source",this.isTargetReassign=e==="target",this.oldSourceId=n,this.newSourceId=o,this.oldTargetId=r,this.newTargetId=a,this.dropPoint=s}},O7=(()=>{let t=class $l{_dragResult=p(si);_mediator=p(V);_store=p(L);_dragContext=p(fe);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(),o=this._findConnectableConnector(e,n.candidates);o&&!this._isReassignedToDifferentConnector(n,o)||this._dragDirective.fReassignConnection.emit(this._buildEvent(n,e,o))}_findConnectableConnector(e,n){return this._mediator.execute(new $r(e.getPosition(),n))}_isReassignedToDifferentConnector(e,n){let o=e.connection;return e.draggedEnd==="target"?o.fInputId()!==n.fId():o.fOutputId()!==n.fId()}_buildEvent(e,n,o){let r=e.connection;return new Wm(r.fId(),e.draggedEnd,r.fOutputId(),e.draggedEnd==="source"?o?.fId():void 0,r.fInputId(),e.draggedEnd==="target"?o?.fId():void 0,n.getPosition())}static \u0275fac=function(n){return new(n||$l)};static \u0275prov=y({token:$l,factory:$l.\u0275fac})};return t=E([D(Gu)],t),t})(),ju=class{event;fTrigger;static fToken=Symbol("ReassignConnectionPreparationRequest");constructor(i,e){this.event=i,this.fTrigger=e}};function F7(t,i){return Wy(t,i)||N7(t,i)}function Wy(t,i){return t.fDragHandleEnd()?.point&&Ky(i,t.fDragHandleEnd().point)&&!t.fDraggingDisabled()}function N7(t,i){return!!t.fDragHandleStart()?.point&&Ky(i,t.fDragHandleStart().point)&&!t.fDraggingDisabled()&&t.fReassignableStart()}function Ky(t,i){return(t.x-i.x)**2+(t.y-i.y)**2<=8**2}function Yy(t,i){return t&&t.distance<i.fSnapThreshold?t:void 0}function Uu(t){return rt.fromRect(ne.initialize(t.x,t.y))}var Km=class{_mediator;_behaviour;_connection;_sourceRef;_targetRef;_candidates=[];_snap;_anchorRect;get _source(){return this._sourceRef.connector}get _target(){return this._targetRef.connector}constructor(i,e,n,o,r){this._mediator=i,this._behaviour=e,this._connection=n,this._sourceRef=o,this._targetRef=r,this._anchorRect=Uu(this._connection.line.point1)}candidates(){return this._candidates}collectAndMarkCandidates(){this._candidates=this._mediator.execute(new Kp(this._target,this._targetRef.rect.gravityCenter)),this._candidates.some(i=>i.connector.fId()===this._source.fId())||this._candidates.push(this._sourceRef),this._mediator.execute(new Do(this._candidates.map(i=>i.connector)))}setSnapConnection(i){this._snap=i,i&&(i.fInputId.set(this._connection.fInputId()),i.initialize())}onPointerMove(i){let e=this._anchorRect.addPoint(i),n=this._findClosest(e.gravityCenter),o=n?.connector.fConnectableSide??this._source.fConnectableSide;this._draw(e,o);let r=this._snap;r&&this._drawSnap(Yy(n,r))}_findClosest(i){return this._mediator.execute(new Fi(i,this._candidates))}_draw(i,e){let n=this._behaviour.handle(new gn(i,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(i){let e=this._snap;if(!e)return;if(!i){e.hide();return}let n=this._behaviour.handle(new gn(i.rect,this._targetRef.rect,e,i.connector.fConnectableSide,this._target.fConnectableSide,this._resolveRotationContext(i.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 Po(this._candidates.map(i=>i.connector)))}_resolveRotationContext(i){return this._mediator.execute(new Nn(i))}},Ym=class{_mediator;_behaviour;_connection;_sourceRef;_targetRef;_candidates=[];_snap;_anchorRect;get _source(){return this._sourceRef.connector}get _target(){return this._targetRef.connector}constructor(i,e,n,o,r){this._mediator=i,this._behaviour=e,this._connection=n,this._sourceRef=o,this._targetRef=r,this._anchorRect=Uu(this._connection.line.point2)}candidates(){return this._candidates}collectAndMarkCandidates(){this._candidates=this._mediator.execute(new Wr(this._source,this._sourceRef.rect.gravityCenter));let i=this._connection.fInputId();i&&!this._candidates.some(e=>e.connector.fId()===i)&&this._candidates.push(this._targetRef),this._mediator.execute(new Do(this._candidates.map(e=>e.connector)))}setSnapConnection(i){this._snap=i,i&&(i.fOutputId.set(this._connection.fOutputId()),i.initialize())}onPointerMove(i){let e=this._anchorRect.addPoint(i),n=this._findClosest(e.gravityCenter),o=n?.connector.fConnectableSide??this._target.fConnectableSide;this._draw(e,o);let r=this._snap;r&&this._drawSnap(Yy(n,r))}onPointerUp(){this._draw(this._anchorRect,this._targetRef.connector.fConnectableSide),this._snap?.hide(),this._mediator.execute(new Po(this._candidates.map(i=>i.connector)))}_findClosest(i){return this._mediator.execute(new Fi(i,this._candidates))}_draw(i,e){let n=this._behaviour.handle(new gn(this._sourceRef.rect,i,this._connection,this._source.fConnectableSide,e,this._resolveRotationContext(this._sourceRef.connector),void 0));this._connection.setLine(n),this._connection.redraw()}_drawSnap(i){let e=this._snap;if(!e)return;if(!i){e.hide();return}let n=this._behaviour.handle(new gn(this._sourceRef.rect,i.rect,e,this._source.fConnectableSide,i.connector.fConnectableSide,this._resolveRotationContext(this._sourceRef.connector),this._resolveRotationContext(i.connector)));e.show(),e.setLine(n),e.redraw()}_resolveRotationContext(i){return this._mediator.execute(new Nn(i))}},Xm=(()=>{class t extends St{type="reassign-connection";kind="reassign-connection";data(){return{fConnectionId:this._connection.fId()}}_result=p(si);_mediator=p(V);_connectionBehaviour=p(Fo);_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 Ut(this._store.outputs.require(this._connection.fOutputId()))),this._targetRef=this._mediator.execute(new Ut(this._store.inputs.require(this._connection.fInputId()))),this._reassignHandler=this._draggedEnd==="target"?this._createTargetHandler():this._createSourceHandler()}_createSourceHandler(){return new Km(this._mediator,this._connectionBehaviour,this._connection,this._sourceRef,this._targetRef)}_createTargetHandler(){return new Ym(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:Uu(this._connection.line.point1),targetAnchorRect:Uu(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(o){return(e||(e=U(t)))(o||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),A7=(()=>{let t=class Wl{_mediator=p(V);_store=p(L);_dragContext=p(fe);_dragInjector=p(vt);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=No(e.event.getPosition(),this._store.flowHost,this._transform),o=this._findConnectionAt(n);o&&(this._capturePointerDown(e),this._startDrag(o,n),queueMicrotask(()=>this._bringToFront(o)))}_findConnectionAt(e){return this._connections.find(n=>F7(n,e))}_capturePointerDown(e){this._dragContext.onPointerDownScale=this._transform.scale,this._dragContext.onPointerDownPosition=he.fromPoint(e.event.getPosition()).elementTransform(this._store.flowHost).div(this._transform.scale)}_startDrag(e,n){let o=this._dragInjector.get(Xm);o.initialize(e,Wy(e,n)),this._dragContext.draggableItems=[o]}_isValidTrigger(e){return an(e.event.originalEvent,e.fTrigger)}_bringToFront(e){this._mediator.execute(new Ai(e,this._canvas.fConnectionsContainer().nativeElement))}static \u0275fac=function(n){return new(n||Wl)};static \u0275prov=y({token:Wl,factory:Wl.\u0275fac})};return t=E([D(ju)],t),t})(),$u=class{event;static fToken=Symbol("DragConnectionWaypointFinalizeRequest");constructor(i){this.event=i}},Wu=class{connectionId;waypoints;constructor(i,e){this.connectionId=i,this.waypoints=e}},Ku=(()=>{class t extends St{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=me({},this._pick.candidate),this._waypointsComponent.insert(this._pick.candidate)):this._pick?.waypoint&&(this._point=me({},this._pick.waypoint),this._waypointsComponent.select(this._pick.waypoint)),this._redrawConnection()}onPointerMove(e){this._waypointsComponent.move(H.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 Wu(this._connection.fId(),this._connection.fWaypoints()?.waypoints()||[])}static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),L7=(()=>{let t=class Kl{_dragContext=p(fe);get _fDragHandler(){return this._dragContext.draggableItems[0]}handle(e){this._isDroppedConnectionReassignEvent()&&this._fDragHandler.onPointerUp()}_isDroppedConnectionReassignEvent(){return this._dragContext.draggableItems.some(e=>e instanceof Ku)}static \u0275fac=function(n){return new(n||Kl)};static \u0275prov=y({token:Kl,factory:Kl.\u0275fac})};return t=E([D($u)],t),t})(),Yu=class{event;fTrigger;static fToken=Symbol("DragConnectionWaypointPreparationRequest");constructor(i,e){this.event=i,this.fTrigger=e}},B7=(()=>{let t=class Yl{_mediator=p(V);_store=p(L);_dragContext=p(fe);_dragInjector=p(vt);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=No(e.event.getPosition(),this._flowHost,this._transform),o=this._pickControlPoint(n);if(!o||!this._isValidTrigger(e))return;let r=this._dragInjector.get(Ku);r.setPick(o),this._dragContext.onPointerDownScale=this._transform.scale,this._dragContext.onPointerDownPosition=he.fromPoint(e.event.getPosition()).elementTransform(this._flowHost).div(this._transform.scale),this._dragContext.draggableItems=[r],queueMicrotask(()=>this._updateConnectionLayer(o.connection))}_pickControlPoint(e){if(this._dragContext.isEmpty())return u5(this._connections,e)}_isValidTrigger(e){return an(e.event.originalEvent,e.fTrigger)}_updateConnectionLayer(e){this._mediator.execute(new Ai(e,this._canvas.fConnectionsContainer().nativeElement))}static \u0275fac=function(n){return new(n||Yl)};static \u0275prov=y({token:Yl,factory:Yl.\u0275fac})};return t=E([D(Yu)],t),t})(),V7=[M7,E7,D7,I7,P7,R7,O7,A7,B7,L7],Xu=class{event;static fToken=Symbol("DropToGroupFinalizeRequest");constructor(i){this.event=i}},z7=1,Ar=(()=>{class t extends St{type="move-node-to-parent";kind="assign-to-container";_store=p(L);_dragSession=p(fe);get _transform(){return this._store.transform}_candidateGroups=[];_debounceTimer=null;_activeTarget=null;get activeTarget(){return this._activeTarget}initialize(e){this._candidateGroups=e}prepareDragSequence(){for(let{node:e}of this._candidateGroups)e.hostElement.classList.add(ht.GROUPING.DROP_ACTIVE)}onPointerMove(e){this._debounceTimer&&clearTimeout(this._debounceTimer),this._debounceTimer=setTimeout(()=>this._updateActiveTarget(e),z7)}onPointerUp(){this._clearActiveTarget();for(let{node:e}of this._candidateGroups)e.hostElement.classList.remove(ht.GROUPING.DROP_ACTIVE);this._debounceTimer&&(clearTimeout(this._debounceTimer),this._debounceTimer=null)}_updateActiveTarget(e){let n=this._getPointerInFlow(e),o=this._findTargetUnderPointer(n);o?this._setActiveTarget(o):this._clearActiveTarget()}_getPointerInFlow(e){let n=he.fromPoint(this._dragSession.onPointerDownPosition).add(e),o=he.fromPoint(this._transform.position).add(this._transform.scaledPosition).div(this._transform.scale);return n.sub(o)}_findTargetUnderPointer(e){return this._candidateGroups.find(n=>ne.isIncludePoint(n.rect,e))}_setActiveTarget(e){this._activeTarget?.node!==e.node&&(this._clearActiveTarget(),this._activeTarget=e,e.node.setClass(ht.GROUPING.OVER_BOUNDARY))}_clearActiveTarget(){this._activeTarget?.node.removeClass(ht.GROUPING.OVER_BOUNDARY),this._activeTarget=null}static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),Zu=class{nodesAndGroups;static fToken=Symbol("CreateDragNodeHierarchyRequest");constructor(i){this.nodesAndGroups=i}},Zm=class{rootHandlers;participants;constructor(i,e){this.rootHandlers=i,this.participants=e}},Qm=class{fNodeIds;constructor(i){this.fNodeIds=i}},T_="move-node",S_="drag-node";function H7(t){return t.getEvent().kind===S_||t.getEvent().fEventType===T_}var ai=(()=>{class t extends St{type=T_;kind=S_;data(){return new Qm(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 o=n.getLastRect();e=e?ne.union([e,o]):o}return e??ne.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(o){return(e||(e=U(t)))(o||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),Qu=class{_limits;_quantizeStep;constructor(i,e=.5){this._limits=i,this._quantizeStep=e}applyInto(i,e){let{min:n,max:o}=this._limits,r=this._clamp(i.x,n.x,o.x),a=this._clamp(i.y,n.y,o.y),s=i.x-r,c=i.y-a,u=this._quantizeSigned(s,this._quantizeStep),f=this._quantizeSigned(c,this._quantizeStep);e.value.x=r,e.value.y=a,e.edges.left=u<0,e.edges.right=u>0,e.edges.top=f<0,e.edges.bottom=f>0,e.overflow.x=Math.abs(u),e.overflow.y=Math.abs(f)}_quantizeSigned(i,e){if(e<=0||i===0)return 0;let n=i/e;return(i>0?Math.ceil(n):Math.floor(n))*e}_clamp(i,e,n){return Math.min(Math.max(i,e),n)}},Jm=class{_pointerDown;_vCellSize;_hCellSize;_snapWhileDragging;constructor(i,e){this._pointerDown=e,this._vCellSize=i.vCellSize(),this._hCellSize=i.hCellSize(),this._snapWhileDragging=i.fCellSizeWhileDragging()}snap(i,e){let n=e||this._snapWhileDragging;return this._strategies[+n](i)}_strategies={0:this._noSnap.bind(this),1:this._snapWithCellSize.bind(this)};_snapWithCellSize(i){return{x:this._snapToGrid(this._pointerDown.x+i.x,this._hCellSize)-this._pointerDown.x,y:this._snapToGrid(this._pointerDown.y+i.y,this._vCellSize)-this._pointerDown.y}}_noSnap(i){return i}_snapToGrid(i,e){return Math.round(i/e)*e}};function sy(){return{value:{x:0,y:0},overflow:{x:0,y:0},edges:{left:!1,right:!1,top:!1,bottom:!1}}}var e_=class{_snapper;_hardClamp;_hardResult=sy();_softClamps=[];_softResults=[];constructor(i,e,n){let o=i.get(L).fDraggable;this._snapper=new Jm(o,e),this._hardClamp=new Qu(n.hard,.5);for(let r of n.soft)this._softClamps.push(new Qu(r.limits,.5)),this._softResults.push(sy())}apply(i,e=!1){let n=this._snapper.snap(i,e);this._hardClamp.applyInto(n,this._hardResult);let o={x:this._hardResult.value.x,y:this._hardResult.value.y};for(let r=0;r<this._softClamps.length;r++)this._softClamps[r].applyInto(o,this._softResults[r]);return{hardDelta:o,soft:this._softResults}}finalize(i){return this.apply(i,!0)}};function ly(t,i,e){let{x:n,y:o,width:r,height:a}=t;return e.right&&i.x>0&&(r+=i.x),e.left&&i.x>0&&(n-=i.x,r+=i.x),e.bottom&&i.y>0&&(a+=i.y),e.top&&i.y>0&&(o-=i.y,a+=i.y),ne.initialize(n,o,r,a)}var t_=class extends St{_injector;nodeOrGroup;children;sourceConnectionHandlers;targetConnectionHandlers;type=T_;kind=S_;_startPosition=H.initialize();_startRect=ne.initialize();_applyConstraints=i=>i;_lastSoftResults=[];_deltaConstraints;_constraints;_lastPosition=H.initialize();_softParentConnectionHandlers=[];_mediator;constructor(i,e,n=[],o=[],r=[]){super(),this._injector=i,this.nodeOrGroup=e,this.children=n,this.sourceConnectionHandlers=o,this.targetConnectionHandlers=r,this._mediator=i.get(V),this._startRect=this._mediator.execute(new it(e.hostElement)),this._startPosition=me({},e._position)}setConstraints(i){this._constraints=i,this._deltaConstraints=new e_(this._injector,this._startPosition,i),this._applyConstraints=e=>{let n=this._deltaConstraints.apply(e);return this._applySoftExpansions(n.soft),n.hardDelta}}setSoftParentConnectionHandlers(i){this._softParentConnectionHandlers=i}finalizeConstraints(){this._applyConstraints=i=>{let e=this._deltaConstraints.finalize(i);return this._applySoftExpansions(e.soft),e.hardDelta}}getLastRect(){return ne.initialize(this._lastPosition.x,this._lastPosition.y,this._startRect.width,this._startRect.height)}prepareDragSequence(){for(let i of this.children)i.prepareDragSequence();this.nodeOrGroup.hostElement.classList.add(ht.DRAG_AND_DROP.DRAGGING)}onPointerMove(i){let e=this._applyConstraints(i);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 i of this.children)i.onPointerUp();this.nodeOrGroup.position.set(this.nodeOrGroup._position),this.nodeOrGroup.hostElement.classList.remove(ht.DRAG_AND_DROP.DRAGGING),this._emitExpandedEvent()}_startPlus(i){return H.sum(this._startPosition,i)}_redraw(i){this._lastPosition=i,this.nodeOrGroup.updatePosition(i),this._mediator.execute(new Pi(this.nodeOrGroup.fId(),ne.initialize(i.x,i.y,this._startRect.width,this._startRect.height))),this.nodeOrGroup.redraw()}_applySoftExpansions(i){this._lastSoftResults=i;for(let e=0;e<i.length;e++){let n=i[e],o=this._constraints.soft[e],r=ly(o.boundingRect,n.overflow,n.edges);this._commitParentRect(o.nodeOrGroup,r)&&this._updateParentConnectionHandlers(e)}}_commitParentRect(i,e){let n=i._position.x!==e.x||i._position.y!==e.y||i._size?.width!==e.width||i._size?.height!==e.height;return i.updateSize({width:e.width,height:e.height}),i.updatePosition({x:e.x,y:e.y}),this._mediator.execute(new Pi(i.fId(),e)),i.redraw(),n}_updateParentConnectionHandlers(i){let e=this._softParentConnectionHandlers[i];if(!e)return;let n=new Map;for(let o of e.source){let r=this._readConnectorRect(o.connector,n);o.handler.setSourceDelta(this._buildDelta(o.baselineRect,r))}for(let o of e.target){let r=this._readConnectorRect(o.connector,n);o.handler.setTargetDelta(this._buildDelta(o.baselineRect,r))}}_readConnectorRect(i,e){let n=`${i.kind}::${i.fId()}`,o=e.get(n);if(o)return o;let r=this._mediator.execute(new Ut(i)).rect;return e.set(n,r),r}_buildDelta(i,e){return H.initialize(e.x-i.x,e.y-i.y)}_emitExpandedEvent(){for(let i=0;i<this._lastSoftResults.length;i++){let e=this._lastSoftResults[i];if(!e.overflow.x&&!e.overflow.y)continue;let n=this._constraints.soft[i],o=ly(n.boundingRect,e.overflow,e.edges);n.nodeOrGroup.sizeChange.emit(o)}}destroy(){for(let i of this.children)i.destroy?.();this.children=[],this.sourceConnectionHandlers=[],this.targetConnectionHandlers=[],this._lastSoftResults=[],this._applyConstraints=i=>i,this._softParentConnectionHandlers=[]}},q7=(()=>{let t=class Xl{_injector=p(mt);handle({nodesAndGroups:e}){let n=this._createHandlerByNodeId(e),o=this._linkParentsAndCollectRoots(e,n);return new Zm(o,Array.from(n.values()))}_createHandlerByNodeId(e){let n=new Map;for(let o of e)n.set(o.fId(),new t_(this._injector,o));return n}_linkParentsAndCollectRoots(e,n){let o=[];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):o.push(a)}return o}static \u0275fac=function(n){return new(n||Xl)};static \u0275prov=y({token:Xl,factory:Xl.\u0275fac})};return t=E([D(Zu)],t),t})(),Ju=class{nodeOrGroup;static fToken=Symbol("BuildDragNodeConstraintsRequest");constructor(i){this.nodeOrGroup=i}},Lr=class{nodeOrGroup;childrenPaddings;static fToken=Symbol("ReadNodeBoundsWithPaddingsRequest");constructor(i,e){this.nodeOrGroup=i,this.childrenPaddings=e}},n_=class{nodeOrGroup;boundingRect;innerRect;paddings;constructor(i,e,n,o){this.nodeOrGroup=i,this.boundingRect=e,this.innerRect=n,this.paddings=o}},G7=(()=>{let t=class Zl{_mediator=p(V);handle({nodeOrGroup:e,childrenPaddings:n}){let o=this._readBoundingRect(e),r=this._readOwnPaddings(e,o),a=[r[0]+n[0],r[1]+n[1],r[2]+n[2],r[3]+n[3]],s=ne.initialize(o.x+a[0],o.y+a[1],o.width-a[0]-a[2],o.height-a[1]-a[3]);return new n_(e,o,s,a)}_readBoundingRect(e){return this._mediator.execute(new it(e.hostElement))}_readOwnPaddings(e,n){return this._mediator.execute(new Ni(e,n))}static \u0275fac=function(n){return new(n||Zl)};static \u0275prov=y({token:Zl,factory:Zl.\u0275fac})};return t=E([D(Lr)],t),t})(),j7=(()=>{let t=class Ql{_mediator=p(V);handle({nodeOrGroup:e}){let n=this._readCurrentRect(e),o=this._readParentsChain(e);return this._buildConstraints(o,n)}_readCurrentRect(e){return this._mediator.execute(new it(e.hostElement))}_readParentsChain(e){return this._mediator.execute(new Eo(e))??[]}_buildConstraints(e,n){let o=[],r=Vy(),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))o.push(this._makeSoftLimit(s,c.boundingRect,u));else{r=u;break}}return{soft:o,hard:r}}_readParentBounds(e,n){return this._mediator.execute(new Lr(e,n))}_calculateDifference(e,n){return{min:this._calculateMinimumDifference(e,n),max:this._calculateMaximumDifference(e,n)}}_calculateMinimumDifference(e,n){return H.initialize(e.x-n.x,e.y-n.y)}_calculateMaximumDifference(e,n){return H.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,o){return{nodeOrGroup:e,boundingRect:n,initialSize:e._size,limits:o}}static \u0275fac=function(n){return new(n||Ql)};static \u0275prov=y({token:Ql,factory:Ql.\u0275fac})};return t=E([D(Ju)],t),t})(),ep=class{rootHandlers;participants;static fToken=Symbol("CreateDragNodeHandlerRequest");constructor(i,e){this.rootHandlers=i,this.participants=e}},tp=class{dragHandler;constraints;handlerPool;static fToken=Symbol("AttachSoftParentConnectionDragHandlersToNodeRequest");constructor(i,e,n){this.dragHandler=i,this.constraints=e,this.handlerPool=n}},Br=class{_mediator=p(V);_store=p(L);_behaviour=p(Fo);_source;_target;_sourceRef;_targetRef;_sourceDelta=H.initialize();_targetDelta=H.initialize();connection;initialize(i){this.connection=i,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(i){this._sourceDelta=i,this._mediator.execute(new Di(this._source.fId(),this._source.kind,this._withDelta(this._sourceRef.rect,i)))}setTargetDelta(i){this._targetDelta=i,this._mediator.execute(new Di(this._target.fId(),this._target.kind,this._withDelta(this._targetRef.rect,i)))}redraw(){let i=this._buildLine();this.connection.setLine(i),this.connection.redraw()}_buildLine(){let i=rt.fromRoundedRect(this._sourceRef.rect).addPoint(this._sourceDelta),e=rt.fromRoundedRect(this._targetRef.rect).addPoint(this._targetDelta);return this._behaviour.handle(new gn(i,e,this.connection,this._sourceRef.connector.fConnectableSide,this._targetRef.connector.fConnectableSide,this._resolveRotationContext(this._sourceRef.connector),this._resolveRotationContext(this._targetRef.connector)))}_readRectRef(i){return this._mediator.execute(new Ut(i))}_withDelta(i,e){return rt.fromRoundedRect(i).addPoint(e)}_resolveRotationContext(i){return this._mediator.execute(new Nn(i))}},Vr=(()=>{class t extends Br{setSourceDelta(e){super.setSourceDelta(e),super.redraw()}static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),zr=(()=>{class t extends Br{_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(o){return(e||(e=U(t)))(o||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),Hr=(()=>{class t extends Br{setTargetDelta(e){super.setTargetDelta(e),this.redraw()}static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),U7=(()=>{let t=class Jl{_store=p(L);_mediator=p(V);_dragInjector=p(vt);handle({dragHandler:e,constraints:n,handlerPool:o}){let r=n.soft.map(a=>this._buildParentConnectionHandlers(a.nodeOrGroup,o));e.setSoftParentConnectionHandlers(r)}_buildParentConnectionHandlers(e,n){let o=this._store.outputs.getAll().filter(f=>f.fNodeId===e.fId()),r=this._store.inputs.getAll().filter(f=>f.fNodeId===e.fId());if(!o.length&&!r.length)return{source:[],target:[]};let a=new Set(o.map(f=>f.fId())),s=new Set(r.map(f=>f.fId())),c=new Map,u={source:[],target:[]};for(let f of this._store.connections.getAll()){let g=a.has(f.fOutputId()),x=s.has(f.fInputId());if(!g&&!x)continue;let R=this._getExistingConnectionHandler(n,f);if(R||(R=this._createConnectionHandler(f,g,x),n.push(R)),g){let k=this._store.outputs.require(f.fOutputId());u.source.push({handler:R,connector:k,baselineRect:this._readConnectorRect(k,c)})}if(x){let k=this._store.inputs.require(f.fInputId());u.target.push({handler:R,connector:k,baselineRect:this._readConnectorRect(k,c)})}}return u}_getExistingConnectionHandler(e,n){return e.find(o=>o.connection.fId()===n.fId())}_createConnectionHandler(e,n,o){let r;return n&&o?r=this._dragInjector.createInstance(zr):n?r=this._dragInjector.createInstance(Vr):r=this._dragInjector.createInstance(Hr),r.initialize(e),r}_readConnectorRect(e,n){let o=`${e.kind}::${e.fId()}`,r=n.get(o);if(r)return r;let a=this._mediator.execute(new Ut(e)).rect;return n.set(o,a),a}static \u0275fac=function(n){return new(n||Jl)};static \u0275prov=y({token:Jl,factory:Jl.\u0275fac})};return t=E([D(tp)],t),t})(),$7=(()=>{let t=class ec{_dragInjector=p(vt);_mediator=p(V);handle({rootHandlers:e,participants:n}){let o=this._collectConnectionHandlers(n);this._applyConstraintsToRoots(e,o);let r=this._dragInjector.createInstance(ai);return r.initialize(n,e),r}_applyConstraintsToRoots(e,n){for(let o of e){let r=this._calculateConstraints(o.nodeOrGroup);o.setConstraints(r),this._attachSoftParentConnectionHandlers(o,r,n)}}_collectConnectionHandlers(e){let n=new Map;for(let o of e){for(let r of o.sourceConnectionHandlers)n.set(r.connection.fId(),r);for(let r of o.targetConnectionHandlers)n.set(r.connection.fId(),r)}return Array.from(n.values())}_attachSoftParentConnectionHandlers(e,n,o){this._mediator.execute(new tp(e,n,o))}_calculateConstraints(e){return this._mediator.execute(new Ju(e))}static \u0275fac=function(n){return new(n||ec)};static \u0275prov=y({token:ec,factory:ec.\u0275fac})};return t=E([D(ep)],t),t})(),np=class{dragHandler;sourceIds;handlerPool;static fToken=Symbol("AttachTargetConnectionDragHandlersToNodeRequest");constructor(i,e,n){this.dragHandler=i,this.sourceIds=e,this.handlerPool=n}},W7=(()=>{let t=class tc{_store=p(L);_dragInjector=p(vt);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(o=>n.has(o.fInputId()))}_getNodeInputIds(e){return this._store.inputs.getAll().filter(n=>e.isContains(n.hostElement)).map(n=>n.fId())}_createAndSetConnectionToNodeHandler(e,n){let o=this._getExistingConnectionHandler(n.handlerPool,e);o||(o=this._createConnectionHandler(n.sourceIds,e),n.handlerPool.push(o)),n.dragHandler.targetConnectionHandlers.push(o)}_getExistingConnectionHandler(e,n){return e.find(o=>o.connection.fId()===n.fId())}_createConnectionHandler(e,n){let o;return e.includes(n.fOutputId())?o=this._dragInjector.createInstance(zr):o=this._dragInjector.createInstance(Hr),o.initialize(n),o}static \u0275fac=function(n){return new(n||tc)};static \u0275prov=y({token:tc,factory:tc.\u0275fac})};return t=E([D(np)],t),t})(),ip=class{dragHandler;targetIds;handlerPool;static fToken=Symbol("AttachSourceConnectionDragHandlersToNodeRequest");constructor(i,e,n){this.dragHandler=i,this.targetIds=e,this.handlerPool=n}},K7=(()=>{let t=class nc{_store=p(L);_dragInjector=p(vt);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(o=>n.has(o.fOutputId()))}_getNodeOutputIds(e){return this._store.outputs.getAll().filter(n=>e.isContains(n.hostElement)).map(n=>n.fId())}_createAndSetConnectionToNodeHandler(e,n){let o=this._getExistingConnectionHandler(n.handlerPool,e);o||(o=this._createConnectionHandler(n.targetIds,e),n.handlerPool.push(o)),n.dragHandler.sourceConnectionHandlers.push(o)}_getExistingConnectionHandler(e,n){return e.find(o=>o.connection.fId()===n.fId())}_createConnectionHandler(e,n){let o;return e.includes(n.fInputId())?o=this._dragInjector.createInstance(zr):o=this._dragInjector.createInstance(Vr),o.initialize(n),o}static \u0275fac=function(n){return new(n||nc)};static \u0275prov=y({token:nc,factory:nc.\u0275fac})};return t=E([D(ip)],t),t})(),op=class{nodeOrGroup;static fToken=Symbol("AttachDragNodeHandlerFromSelectionRequest");constructor(i){this.nodeOrGroup=i}},Y7=(()=>{let t=class ic{_mediator=p(V);_store=p(L);_dragSession=p(fe);handle({nodeOrGroup:e}){let n=this._collectSelected(e),o=this._withDeepChildren(n),r=this._mediator.execute(new Zu(o)),a=this._collectSourceConnectorIds(o),s=this._collectTargetConnectorIds(o);return this._attachConnectionHandlers(r.participants,a,s),this._mediator.execute(new ep(r.rootHandlers,r.participants))}_collectSelected(e){let n=[];for(let o of this._dragSession.selectedItems){let r=this._findNodeByHost(o.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 o of e){n.push(o);let r=this._mediator.execute(new Oo(o.fId()));n.push(...r)}return n}_collectSourceConnectorIds(e){return tm(e,n=>this._store.outputs.getAll().filter(o=>o.fNodeId===n.fId()).map(o=>o.fId()))}_collectTargetConnectorIds(e){return tm(e,n=>this._store.inputs.getAll().filter(o=>o.fNodeId===n.fId()).map(o=>o.fId()))}_attachConnectionHandlers(e,n,o){let r=[];for(let a of e)this._mediator.execute(new ip(a,o,r)),this._mediator.execute(new np(a,n,r))}static \u0275fac=function(n){return new(n||ic)};static \u0275prov=y({token:ic,factory:ic.\u0275fac})};return t=E([D(op)],t),t})(),X7=[q7,j7,$7,W7,K7,U7,G7,Y7];function Z7(t,i,e=10){let n=i.x,o=i.y,r=n+i.width,a=o+i.height,s=i.gravityCenter.x,c=i.gravityCenter.y,u,f,g=1/0,x,R,k=1/0,A=(W,J)=>{let de=J<0?-J:J;de<=e&&de<g&&(g=de,u=W,f=J)},q=(W,J)=>{let de=J<0?-J:J;de<=e&&de<k&&(k=de,x=W,R=J)};for(let W=0;W<t.length;W++){let J=t[W],de=J.x,Re=J.y,we=de+J.width,Ge=Re+J.height,Nt=J.gravityCenter.x,ct=J.gravityCenter.y;A(de,n-de),A(we,n-we),A(Nt,s-Nt),A(de,r-de),A(we,r-we),q(Re,o-Re),q(Ge,o-Ge),q(ct,c-ct),q(Re,a-Re),q(Ge,a-Ge)}return{x:{guide:u,delta:f},y:{guide:x,delta:R}}}var cy=["left","top","width","height"],rp=class{_element;constructor(i,e,n="f-line"){this._element=i.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(i){for(let e of cy){let n=i[e];n!=null&&(this._element.style[e]=`${n}px`)}}clearRect(){for(let i of cy)this._element.style.removeProperty(i)}destroy(){this._element.remove()}},i_=class{_horizontal;_vertical;constructor(i,e){this._horizontal=new rp(i,e),this._vertical=new rp(i,e),this._horizontal.hide(),this._vertical.hide()}drawVerticalLine(i,e,n){this._vertical.show(),this._vertical.render({left:i*n.scale+n.position.x+n.scaledPosition.x,top:0,width:1,height:e.height})}drawHorizontalLine(i,e,n){this._horizontal.show(),this._horizontal.render({left:0,top:i*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()}},ap=class{static fToken=Symbol("MagneticLinesPreparationRequest")},Q7=(()=>{let t=class oc{_mediator=p(V);_store=p(L);_browser=p(at);_injector=p(mt);_dragSession=p(fe);_renderer;handle(e){let n=this._store.instances.get(Ke.MAGNETIC_LINES);if(!n)return;let o=this._dragSession.draggableItems.find(r=>r instanceof ai);o&&o.setMagneticLines(new o_(this._injector,this._renderer??this._createRenderer(n),this._flowHostSize(),this._notDraggedRects(this._draggedNodes(o.items))))}_draggedNodes(e){return e.map(n=>n.nodeOrGroup)}_flowHostSize(){return this._store.flowHost.getBoundingClientRect()}_createRenderer({hostElement:e}){return this._renderer=new i_(this._browser,e),this._renderer}_notDraggedRects(e){let n=new Set(e);return this._store.nodes.getAll().filter(r=>!n.has(r)).map(r=>this._mediator.execute(new it(r.hostElement)))}static \u0275fac=function(n){return new(n||oc)};static \u0275prov=y({token:oc,factory:oc.\u0275fac})};return t=E([D(ap)],t),t})(),o_=class{_renderer;_size;_rects;_timerId=null;_canvasTransform;_alignThreshold=10;constructor(i,e,n,o){this._renderer=e,this._size=n,this._rects=o;let r=i.get(L);this._alignThreshold=r.instances.require(Ke.MAGNETIC_LINES).threshold(),this._canvasTransform=r.transform}scheduleRender(i){this._timerId&&clearTimeout(this._timerId),this._timerId=setTimeout(()=>this._renderGuides(this._computeGuides(i)),15)}_renderGuides(i){this._renderVertical(i),this._renderHorizontal(i)}_renderVertical(i){i.x.guide!==void 0?this._renderer.drawVerticalLine(i.x.guide,this._size,this._canvasTransform):this._renderer.hideVertical()}_renderHorizontal(i){i.y.guide!==void 0?this._renderer.drawHorizontalLine(i.y.guide,this._size,this._canvasTransform):this._renderer.hideHorizontal()}_computeGuides(i){return Z7(this._rects,i,this._alignThreshold)}clearGuides(){this._renderer.hideAll(),this._timerId&&(clearTimeout(this._timerId),this._timerId=null)}},dy=["top","center","bottom"],uy=["left","center","right"];function J7(t,i,e=10,n=10){let o=i.x,r=i.y,a=o+i.width,s=r+i.height,c=i.gravityCenter.x,u=i.gravityCenter.y,f=eB(t,i,o,r,a,s,c,u,e,n),g=tB(t,i,o,r,a,s,c,u,e,n);return f&&(!g||f.absDelta<=g.absDelta)?{axis:"x",delta:f.delta,gap:f.gap,rects:f.rects,alignMode:f.alignMode,crossDelta:f.crossDelta}:g?{axis:"y",delta:g.delta,gap:g.gap,rects:g.rects,alignMode:g.alignMode,crossDelta:g.crossDelta}:{rects:[]}}function eB(t,i,e,n,o,r,a,s,c,u){let f=1/0,g,x=0,R,k=[],A=0,q=[],W=[],J=[];for(let de=0;de<dy.length;de++){let Re=de===0?n:de===1?s:r;q.length=0,W.length=0,J.length=0;let we=1/0,Ge=-1/0,Nt=0,ct=1/0,_t=1/0;for(let He=0;He<t.length;He++){let Fe=t[He],Jo=de===0?Fe.y:de===1?Fe.gravityCenter.y:Fe.y+Fe.height,yf=Re-Jo,Dn=vo(yf);if(Dn>c)continue;q.push(He),W.push(Fe.x),J.push(Fe.x+Fe.width);let er=Fe.y,tr=Fe.y+Fe.height;er<we&&(we=er),tr>Ge&&(Ge=tr),(Dn<ct||Dn===ct&&He<_t)&&(ct=Dn,Nt=Jo,_t=He)}let tt=q.length;if(tt<2)continue;Xy(q,W,J);let st=0;for(;st<tt&&W[st]<=a;)st++;let vi=st>0&&st<tt,xt,At;vi?(xt=st-1,At=st):st<=0?(xt=0,At=1):(xt=tt-2,At=tt-1);let Lt=W[At]-J[xt];if(Lt<0)continue;let ft;if(vi){ft=J[xt]+Lt;let He=ft+i.width,Fe=W[At]-He;if(vo(Fe-Lt)>u)continue}else st<=0?ft=W[0]-Lt-i.width:ft=J[tt-1]+Lt;let Qo=e-ft,bi=vo(Qo);if(bi>u||bi>=f)continue;let dn=nB(q,W,J,we,Ge);if(vi){let He=ft,Fe=ft+i.width;dn.push({left:J[xt],top:we,width:He-J[xt],height:Ge-we}),dn.push({left:Fe,top:we,width:W[At]-Fe,height:Ge-we})}else if(st<=0){let He=ft+i.width;dn.push({left:He,top:we,width:W[0]-He,height:Ge-we})}else dn.push({left:J[tt-1],top:we,width:ft-J[tt-1],height:Ge-we});let bf=Re-Nt;f=bi,g=Qo,x=Lt,R=dy[de],k=dn,A=bf}if(!(g===void 0||R===void 0))return{delta:g,absDelta:f,gap:x,rects:k,alignMode:R,crossDelta:A}}function tB(t,i,e,n,o,r,a,s,c,u){let f=1/0,g,x=0,R,k=[],A=0,q=[],W=[],J=[];for(let de=0;de<uy.length;de++){let Re=de===0?e:de===1?a:o;q.length=0,W.length=0,J.length=0;let we=1/0,Ge=-1/0,Nt=0,ct=1/0,_t=1/0;for(let He=0;He<t.length;He++){let Fe=t[He],Jo=de===0?Fe.x:de===1?Fe.gravityCenter.x:Fe.x+Fe.width,yf=Re-Jo,Dn=vo(yf);if(Dn>c)continue;q.push(He),W.push(Fe.y),J.push(Fe.y+Fe.height);let er=Fe.x,tr=Fe.x+Fe.width;er<we&&(we=er),tr>Ge&&(Ge=tr),(Dn<ct||Dn===ct&&He<_t)&&(ct=Dn,Nt=Jo,_t=He)}let tt=q.length;if(tt<2)continue;Xy(q,W,J);let st=0;for(;st<tt&&W[st]<=s;)st++;let vi=st>0&&st<tt,xt,At;vi?(xt=st-1,At=st):st<=0?(xt=0,At=1):(xt=tt-2,At=tt-1);let Lt=W[At]-J[xt];if(Lt<0)continue;let ft;if(vi){ft=J[xt]+Lt;let He=ft+i.height,Fe=W[At]-He;if(vo(Fe-Lt)>u)continue}else st<=0?ft=W[0]-Lt-i.height:ft=J[tt-1]+Lt;let Qo=n-ft,bi=vo(Qo);if(bi>u||bi>=f)continue;let dn=iB(q,W,J,we,Ge);if(vi){let He=ft,Fe=ft+i.height;dn.push({left:we,top:J[xt],width:Ge-we,height:He-J[xt]}),dn.push({left:we,top:Fe,width:Ge-we,height:W[At]-Fe})}else if(st<=0){let He=ft+i.height;dn.push({left:we,top:He,width:Ge-we,height:W[0]-He})}else dn.push({left:we,top:J[tt-1],width:Ge-we,height:ft-J[tt-1]});let bf=Re-Nt;f=bi,g=Qo,x=Lt,R=uy[de],k=dn,A=bf}if(!(g===void 0||R===void 0))return{delta:g,absDelta:f,gap:x,rects:k,alignMode:R,crossDelta:A}}function nB(t,i,e,n,o){let r=[],a=o-n;for(let s=0;s<t.length-1;s++){let c=i[s+1]-e[s];c<0||r.push({left:e[s],top:n,width:c,height:a})}return r}function iB(t,i,e,n,o){let r=[],a=o-n;for(let s=0;s<t.length-1;s++){let c=i[s+1]-e[s];c<0||r.push({left:n,top:e[s],width:a,height:c})}return r}function Xy(t,i,e){for(let n=1;n<i.length;n++){let o=i[n],r=e[n],a=t[n],s=n-1;for(;s>=0;){let c=i[s],u=t[s];if(c<o||c===o&&u<a)break;i[s+1]=c,e[s+1]=e[s],t[s+1]=u,s--}i[s+1]=o,e[s+1]=r,t[s+1]=a}}function vo(t){return t<0?-t:t}var r_=class{_element;_isVisible=!1;_left=Number.NaN;_top=Number.NaN;_width=Number.NaN;_height=Number.NaN;constructor(i,e,n="f-rect"){this._element=i.document.createElement("div"),this._element.classList.add(n);let o=this._element.style;o.position="absolute",o.display="none",o.boxSizing="border-box",o.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(i,e,n,o){let r=this._element.style;i!==this._left&&(this._left=i,r.left=i+"px"),e!==this._top&&(this._top=e,r.top=e+"px"),n!==this._width&&(this._width=n,r.width=n+"px"),o!==this._height&&(this._height=o,r.height=o+"px")}clearRect(){this._left=Number.NaN,this._top=Number.NaN,this._width=Number.NaN,this._height=Number.NaN;let i=this._element.style;i.removeProperty("left"),i.removeProperty("top"),i.removeProperty("width"),i.removeProperty("height")}destroy(){this._element.remove()}},a_=class{_browser;_hostElement;_className;_pool=[];_activeCount=0;constructor(i,e,n="f-rect"){this._browser=i,this._hostElement=e,this._className=n}draw(i,e){let n=e.scale,o=e.position.x+e.scaledPosition.x,r=e.position.y+e.scaledPosition.y;for(let a=0;a<i.length;a++){let s=this._getOrCreate(a),c=i[a];s.show(),s.render(c.left*n+o,c.top*n+r,c.width*n,c.height*n)}for(let a=i.length;a<this._activeCount;a++)this._pool[a].hide();this._activeCount=i.length}hideAll(){for(let i=0;i<this._activeCount;i++)this._pool[i].hide();this._activeCount=0}destroy(){for(let i of this._pool)i.destroy();this._pool.length=0,this._activeCount=0}_getOrCreate(i){if(i<this._pool.length)return this._pool[i];let e=new r_(this._browser,this._hostElement,this._className);return this._pool.push(e),e}},sp=class{static fToken=Symbol("MagneticRectsPreparationRequest")},oB=(()=>{let t=class rc{_mediator=p(V);_store=p(L);_browser=p(at);_injector=p(mt);_dragSession=p(fe);_renderer;handle(e){let n=this._store.instances.get(Ke.MAGNETIC_RECTS);if(!n)return;let o=this._dragSession.draggableItems.find(r=>r instanceof ai);o&&o.setMagneticRects(new s_(this._injector,this._getRenderer(n),this._notDraggedRects(this._draggedNodes(o.items))))}_draggedNodes(e){return e.map(n=>n.nodeOrGroup)}_getRenderer(e){return this._renderer||(this._renderer=new a_(this._browser,e.hostElement)),this._renderer?.destroy(),this._renderer}_notDraggedRects(e){let n=new Set(e);return this._store.nodes.getAll().filter(r=>!n.has(r)).map(r=>this._mediator.execute(new it(r.hostElement)))}static \u0275fac=function(n){return new(n||rc)};static \u0275prov=y({token:rc,factory:rc.\u0275fac})};return t=E([D(sp)],t),t})(),s_=class{_renderer;_rects;_timerId=null;_canvasTransform;_alignThreshold=10;_spacingThreshold=10;constructor(i,e,n){this._renderer=e,this._rects=n;let o=i.get(L),r=o.instances.require(Ke.MAGNETIC_RECTS);this._alignThreshold=r.alignThreshold(),this._spacingThreshold=r.spacingThreshold(),this._canvasTransform=o.transform}scheduleRender(i){this._timerId&&clearTimeout(this._timerId),this._timerId=setTimeout(()=>this._renderRects(this._computeRects(i)),15)}_renderRects(i){if(i.axis!==void 0&&i.delta!==void 0&&i.rects.length>0){this._renderer.draw(i.rects,this._canvasTransform);return}this._renderer.hideAll()}_computeRects(i){return J7(this._rects,i,this._alignThreshold,this._spacingThreshold)}clearGuides(){this._renderer.hideAll(),this._timerId&&(clearTimeout(this._timerId),this._timerId=null)}},lp=class{event;static fToken=Symbol("DragNodeFinalizeRequest");constructor(i){this.event=i}},l_=class{nodes;fNodes;constructor(i){this.nodes=i,this.fNodes=i}},rB=(()=>{let t=class ac{_mediator=p(V);_store=p(L);_dragSession=p(fe);_dragHandler;handle({event:e}){if(this._dragHandler=this._getDragHandler(),!this._dragHandler)return;let n=this._buildDragDelta(e.getPosition()),o=this._dragHandler.calculateMagneticSnaps(n),r=this._applySnapToDelta(n,o.lines,o.rects);this._finalizeMove(this._dragHandler,r),this._emitNodeIntersectIfNeeded(this._dragHandler)}_getDragHandler(){return this._dragSession.draggableItems.find(H7)}_buildDragDelta(e){return he.fromPoint(e).elementTransform(this._store.flowHost).div(this._dragSession.onPointerDownScale).sub(this._dragSession.onPointerDownPosition)}_applySnapToDelta(e,n,o){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(o)&&(o.axis==="x"?(r=e.x-o.delta,a=e.y-(o.crossDelta??0)):(a=e.y-o.delta,r=e.x-(o.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 o of e.roots)o.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 l_(a)}_emitNodeIntersectIfNeeded(e){if(!this._isDraggedJustOneNode(e)||!this._store.fDraggable?.fEmitOnNodeIntersect)return;let n=e.roots[0].nodeOrGroup;queueMicrotask(()=>this._mediator.execute(new Ru(n)))}_isDraggedJustOneNode(e){return e.roots.length===1}static \u0275fac=function(n){return new(n||ac)};static \u0275prov=y({token:ac,factory:ac.\u0275fac})};return t=E([D(lp)],t),t})(),cp=class{event;trigger;static fToken=Symbol("DragNodePreparationRequest");constructor(i,e){this.event=i,this.trigger=e}},aB=(()=>{let t=class sc{_mediator=p(V);_store=p(L);_dragSession=p(fe);handle({event:e,trigger:n}){if(!this._canStartDrag(e,n))return;let o=this._findDraggableNode(e.targetElement);o&&(this._storePointerDownContext(e),this._dragSession.draggableItems=[this._buildDragNodeHandler(o)],this._mediator.execute(new ap),this._mediator.execute(new sp))}_canStartDrag(e,n){return this._dragSession.isEmpty()&&this._isDragHandle(e.targetElement)&&an(e.originalEvent,n)}_isDragHandle(e){return vr(e,".f-drag-handle")}_findDraggableNode(e){let n=this._store.nodes.getAll();for(let o of n)if(!o.fDraggingDisabled()&&o.isContains(e))return o}_storePointerDownContext(e){this._dragSession.onPointerDownScale=this._store.transform.scale,this._dragSession.onPointerDownPosition=he.fromPoint(e.getPosition()).elementTransform(this._store.flowHost).div(this._store.transform.scale)}_buildDragNodeHandler(e){return(e.fSelectionDisabled()||!e.isSelected())&&queueMicrotask(()=>{this._mediator.execute(new Ro(e))}),this._mediator.execute(new op(e))}static \u0275fac=function(n){return new(n||sc)};static \u0275prov=y({token:sc,factory:sc.\u0275fac})};return t=E([D(cp)],t),t})(),sB=[...X7,Q7,oB,rB,aB],c_=class{targetGroupId;nodeIds;dropPosition;fTargetNode;fNodes;fDropPosition;constructor(i,e,n){this.targetGroupId=i,this.nodeIds=e,this.dropPosition=n,this.fTargetNode=i,this.fNodes=e,this.fDropPosition=n}},lB=(()=>{let t=class lc{_dragSession=p(fe);_store=p(L);handle({event:e}){let n=this._findDropHandler();if(!n)return;let o=n.activeTarget?.node;o&&this._emitDropToGroupEvent(o.fId(),e),n.onPointerUp?.()}_findDropHandler(){return this._dragSession.draggableItems.find(e=>e instanceof Ar)}_emitDropToGroupEvent(e,n){this._store.fDraggable?.fDropToGroup.emit(new c_(e,this._getTopLevelDraggedIds(),n.getPosition()))}_getTopLevelDraggedIds(){let n=this._getMoveSummaryHandler().items.map(a=>a.nodeOrGroup),o=new Set(n.map(a=>a.fId())),r=[];for(let a of n){let s=a.fParentId();(!s||!o.has(s))&&r.push(a.fId())}return r}_getMoveSummaryHandler(){let e=this._dragSession.draggableItems.find(n=>n instanceof ai);if(!e)throw new Error("DropToGroup requires DragNodeHandler.");return e}static \u0275fac=function(n){return new(n||lc)};static \u0275prov=y({token:lc,factory:lc.\u0275fac})};return t=E([D(Xu)],t),t})(),dp=class{event;static fToken=Symbol("DropToGroupPreparationRequest");constructor(i){this.event=i}},up=class{candidates;static fToken=Symbol("SortDropCandidatesByLayerRequest");constructor(i){this.candidates=i}},cB=(()=>{let t=class cc{handle({candidates:e}){let n=e.map((o,r)=>({candidate:o,index:r}));return n.sort((o,r)=>{let a=this._compareDomOrder(o.candidate.node.hostElement,r.candidate.node.hostElement);return a!==0?-a:o.index-r.index}),n.map(o=>o.candidate)}_compareDomOrder(e,n){if(e===n)return 0;let o=e.compareDocumentPosition(n);if((o&Node.DOCUMENT_POSITION_FOLLOWING)!==0)return-1;if((o&Node.DOCUMENT_POSITION_PRECEDING)!==0)return 1;if(o&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||cc)};static \u0275prov=y({token:cc,factory:cc.\u0275fac})};return t=E([D(up)],t),t})(),d_=class{_onPointerDown;_limit;_vCellSize;_hCellSize;_adjustCellSize;constructor(i,e,n){this._onPointerDown=e,this._limit=n;let o=i.get(L);this._vCellSize=o.fDraggable.vCellSize(),this._hCellSize=o.fDraggable.hCellSize(),this._adjustCellSize=o.fDraggable.fCellSizeWhileDragging()}limit(i){let{min:e,max:n}=this._limit,{x:o,y:r}=this._cellSizeStrategies[+this._adjustCellSize](i);return{x:this._clamp(o,e.x,n.x),y:this._clamp(r,e.y,n.y)}}_cellSizeStrategies={0:this._skipCellSize.bind(this),1:this._applyCellSize.bind(this)};_applyCellSize(i){return{x:this._snapToGrid(this._onPointerDown.x+i.x,this._hCellSize)-this._onPointerDown.x,y:this._snapToGrid(this._onPointerDown.y+i.y,this._vCellSize)-this._onPointerDown.y}}_skipCellSize(i){return i}_clamp(i,e,n){return Math.min(Math.max(i,e),n)}_snapToGrid(i,e){return Math.round(i/e)*e}},pp=class{externalItem;static fToken=Symbol("DragExternalItemCreatePlaceholderRequest");constructor(i){this.externalItem=i}},dB=(()=>{let t=class dc{_browser=p(at);_containerRef=p(Ga);handle({externalItem:e}){let{hostElement:n,placeholder:o}=e,r=o(),a=r?this._fromTemplate(r):this._fromHost(n);return a.classList.add("f-external-item-placeholder"),a.style.pointerEvents="none",a}_fromTemplate(e){return om(this._createViewRef(e),this._browser.document)}_fromHost(e){return nm(e)}_createViewRef(e){let n=this._containerRef.createEmbeddedView(e);return n.detectChanges(),n}static \u0275fac=function(n){return new(n||dc)};static \u0275prov=y({token:dc,factory:dc.\u0275fac})};return t=E([D(pp)],t),t})(),hp=class{externalItem;static fToken=Symbol("DragExternalItemCreatePreviewRequest");constructor(i){this.externalItem=i}},uB=(()=>{let t=class uc{_browser=p(at);_containerRef=p(Ga);handle({externalItem:e}){let{hostElement:n,preview:o}=e,r=o(),a=r?this._fromTemplate(r):this._fromHost(n);return this._setPreviewStyles(a),jb(a),a.classList.add("f-external-item-preview"),a}_fromTemplate(e){return om(this._createViewRef(e),this._browser.document)}_fromHost(e){return nm(e)}_createViewRef(e){let n=this._containerRef.createEmbeddedView(e);return n.detectChanges(),n}_setPreviewStyles(e){im(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||uc)};static \u0275prov=y({token:uc,factory:uc.\u0275fac})};return t=E([D(hp)],t),t})(),fp=class{event;static fToken=Symbol("DragExternalItemFinalizeRequest");constructor(i){this.event=i}},u_=class{externalItemRect;data;targetContainerId;dropPosition;rect;fTargetNode;fDropPosition;constructor(i,e,n,o){this.externalItemRect=i,this.data=e,this.targetContainerId=n,this.dropPosition=o,this.rect=i,this.fTargetNode=n,this.fDropPosition=o}},pB="external-item",hB="drag-external-item";function fB(t){return t.getEvent().kind===hB||t.getEvent().fEventType===pB}var mB=(()=>{let t=class pc{_result=p(si);_mediator=p(V);_store=p(L);_dragSession=p(fe);_browser=p(at);get _createNodeEmitter(){return this._store.fDraggable?.fCreateNode}handle(e){let n=this._findExternalItemHandler();if(!n)return;let o=this._getDestinationNodeOrGroupId();this._emitEvent(this._getElementsFromPoint(e.event.getPosition()),o,e.event.getPosition()),n.onPointerUp(),this._dragSession.draggableItems=[]}_findExternalItemHandler(){return this._dragSession.draggableItems.find(e=>fB(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 Ar);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,o){this._isPointerInCanvasRect(e)&&this._createNodeEmitter?.emit(new u_(this._getPreviewRect(),this._result.getData().externalItem.data(),n,n?o:void 0))}_isPointerInCanvasRect(e){return e.length?this._store.flowHost.contains(e[0]):!1}_getPreviewRect(){return this._mediator.execute(new it(this._result.getData().preview))}static \u0275fac=function(n){return new(n||pc)};static \u0275prov=y({token:pc,factory:pc.\u0275fac})};return t=E([D(fp)],t),t})(),p_=class{data;constructor(i){this.data=i}},mp=class extends St{_externalItem;_pointerDownClientPosition;type="external-item";kind="drag-external-item";data(){return new p_(this._externalItem.data())}_result;_mediator;_browser;_store;_previewEl;_placeholderEl;_startRect=ne.initialize();_pointerDownRect=ne.initialize();_absoluteOffsetFromFlow=H.initialize();_grabOffsetFromPointer=H.initialize();_originalParent;_originalNextSibling;_originalDisplay;_applyConstraints=i=>i;constructor(i,e,n){super(),this._externalItem=e,this._pointerDownClientPosition=n,this._store=i.get(L),this._result=i.get(si),this._mediator=i.get(V),this._browser=i.get(at),this._originalDisplay=this._host.style.display,this._initConstraints(i)}get _host(){return this._externalItem.hostElement}get _overlayRoot(){return this._browser.document.fullscreenElement??this._browser.document.body}get _transform(){return this._store.transform}_initConstraints(i){this._startRect=this._getStartRect();let e=new d_(i,this._startRect,Vy());this._applyConstraints=n=>e.limit(n)}_getStartRect(){return this._mediator.execute(new it(this._externalItem.hostElement))}prepareDragSequence(){this._pointerDownRect=this._readAbsoluteRect(this._host),this._absoluteOffsetFromFlow=he.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 i=this._host.parentNode;if(!i){this._originalParent=void 0,this._originalNextSibling=null;return}this._originalParent=i,this._originalNextSibling=this._host.nextSibling}_createPreview(){let i=this._mediator.execute(new hp(this._externalItem));return this._externalItem.previewMatchSize()&&this._matchSize(i,this._pointerDownRect),i.style.transform=py(this._pointerDownRect),i}_createPlaceholder(){return this._mediator.execute(new pp(this._externalItem))}_placePreviewIntoOverlay(){this._overlayRoot.appendChild(this._previewEl)}_swapOriginalWithPlaceholderAndMoveOriginalIntoOverlay(){let i=this._originalParent,e=this._placeholderEl;if(!i||!e)return;let n=i.replaceChild(e,this._host);this._overlayRoot.appendChild(n),this._host.style.display="none"}onPointerMove(i,e){if(!this._previewEl)return;let n=this._resolveDeltaFromPointer(i,e),o=this._applyConstraints(n),r=he.fromPoint(this._startRect).add(o),a=this._toAbsolutePoint(r).add(this._absoluteOffsetFromFlow);this._previewEl.style.transform=py(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 i=this._originalParent,e=this._placeholderEl;if(!(!i||!e)){if(e.parentNode===i){i.replaceChild(this._host,e);return}this._originalNextSibling&&this._originalNextSibling.parentNode===i?i.insertBefore(this._host,this._originalNextSibling):i.appendChild(this._host)}}_matchSize(i,e){i.style.width=`${e.width}px`,i.style.height=`${e.height}px`}_readAbsoluteRect(i){let e=i.getBoundingClientRect(),n=this._browser.window.pageYOffset||this._browser.document.documentElement.scrollTop,o=this._browser.window.pageXOffset||this._browser.document.documentElement.scrollLeft;return ne.initialize(e.left+o,e.top+n,e.width,e.height)}_toAbsolutePoint(i){let e=he.fromPoint(this._transform.position).add(this._transform.scaledPosition);return he.fromPoint(i).mult(this._transform.scale).add(e).add(this._getFlowHostAbsolutePosition())}_resolveDeltaFromPointer(i,e){let n=e?.getPosition();if(!n)return i;let o=this._clientToAbsolute(n).sub(this._grabOffsetFromPointer),r=this._toFlowPoint(o);return he.fromPoint(r).sub(this._startRect)}_toFlowPoint(i){let e=this._getFlowHostAbsolutePosition(),n=he.fromPoint(this._transform.position).add(this._transform.scaledPosition);return he.fromPoint(i).sub(e).sub(n).div(this._transform.scale)}_getFlowHostAbsolutePosition(){let i=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 H.initialize(i.left+n,i.top+e)}_clientToAbsolute(i){let e=this._browser.window.pageYOffset||this._browser.document.documentElement.scrollTop,n=this._browser.window.pageXOffset||this._browser.document.documentElement.scrollLeft;return he.fromPoint(i).add(H.initialize(n,e))}};function py({x:t,y:i}){return`translate3d(${Math.round(t)}px, ${Math.round(i)}px, 0)`}var _p=class{event;fTrigger;static fToken=Symbol("DragExternalItemPreparationRequest");constructor(i,e){this.event=i,this.fTrigger=e}};function _B(t){return!!t.closest?.("[fExternalItem]")}function gB(t){return t.closest("[fExternalItem]")}var vB=(()=>{class t{_byHost=new Map;_items=K([]);items=S(()=>this._items());getByElement(e){let n=gB(e);return n?this._byHost.get(n):void 0}getByHost(e){return this._byHost.get(e)}register(e){let n=e.hostElement,o=this._byHost.get(n);o!==e&&(o&&o!==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 bB=(()=>{let t=class hc{_apiService=p(vB);_dragSession=p(fe);_store=p(L);_injector=p(mt);get _flowHost(){return this._store.flowHost}get _transform(){return this._store.transform}handle({event:e,fTrigger:n}){if(!this._dragSession.isEmpty()||!an(e.originalEvent,n))return;let o=this._resolveExternalItem(e.targetElement);if(!o||o.disabled())return;let r=this._transform.scale??1;this._dragSession.onPointerDownScale=r,this._dragSession.onPointerDownPosition=he.fromPoint(e.getPosition()).elementTransform(this._flowHost).div(r),this._dragSession.draggableItems=[new mp(this._injector,o,e.getPosition())]}_resolveExternalItem(e){return this._apiService.getByElement(e)}static \u0275fac=function(n){return new(n||hc)};static \u0275prov=y({token:hc,factory:hc.\u0275fac})};return t=E([D(_p)],t),t})(),gp=class{event;static fToken=Symbol("PreventDefaultIsExternalItemRequest");constructor(i){this.event=i}},yB=(()=>{let t=class fc{handle(e){this._isTargetItemExternal(e.event)&&e.event.preventDefault()}_isTargetItemExternal(e){let n=this._isExternalItem(e.target),o=this._isExternalItem(e.target.parentNode);return n||o}_isExternalItem(e){let n=!1;try{n=_B(e)}catch{}return n}static \u0275fac=function(n){return new(n||fc)};static \u0275prov=y({token:fc,factory:fc.\u0275fac})};return t=E([D(gp)],t),t})(),CB=[dB,uB,mB,bB,yB],xB=(()=>{let t=class mc{_mediator=p(V);_dragContext=p(fe);_store=p(L);_dragInjector=p(vt);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 o=this._sortedTargetsForDrop();if(n){let a=n.fParentId(),s=this._mediator.execute(new Wp(a));s.length&&(o=o.filter(c=>s.includes(c.node.fId())))}let r=this._dragInjector.get(Ar);r.initialize(o),this._dragContext.draggableItems.push(r)}_canPrepare(){return this._hasMoveDrag()||this._hasExternalDrag()}_hasMoveDrag(){return this._dragContext.draggableItems.some(e=>e instanceof ai)}_hasExternalDrag(){return this._dragContext.draggableItems.some(e=>e instanceof mp)}_sortedTargetsForDrop(){let e=this._getDraggedNodes(),n=e.some(s=>s instanceof Um),o=this._withParents(e),a=this._eligibleTargets(o,n).map(s=>{let c=this._mediator.execute(new it(s.hostElement));return{node:s,rect:c}});return this._mediator.execute(new up(a))}_getDraggedNodes(){let e=this._dragContext.draggableItems.find(n=>n instanceof ai);return e?e.items.map(n=>n.nodeOrGroup):[]}_withParents(e){return e.reduce((n,o)=>{n.push(o);let r=this._mediator.execute(new Eo(o));return n.push(...r),n},[])}_eligibleTargets(e,n){let o=this._allNodes.filter(r=>!e.includes(r));return n?o.filter(r=>r instanceof Um):o}static \u0275fac=function(n){return new(n||mc)};static \u0275prov=y({token:mc,factory:mc.\u0275fac})};return t=E([D(dp)],t),t})(),wB=[cB,xB,lB],vp=class{event;static fToken=Symbol("PinchToZoomFinalizeRequest");constructor(i){this.event=i}},TB=.5,bp=(()=>{class t extends St{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(Ke.ZOOM)}_startDistance=null;_startScale=null;_touches;initialize(e){this._touches=e}prepareDragSequence(){let e=hy(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 o=hy(n.touches),r=SB(n.touches);if(o==null||r==null){this._reset();return}if(Math.abs(o-this._startDistance)<TB)return;n.preventDefault();let a=o/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 he.fromPoint(e).elementTransform(this._flowHost)}_reset(){this._startScale=null,this._startDistance=null}onPointerUp(){this._reset(),this._canvas.emitCanvasChangeEvent()}static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})();function SB(t){if(t.length!==2)return null;let i=t[0],e=t[1];return H.initialize((i.clientX+e.clientX)/2,(i.clientY+e.clientY)/2)}function hy(t){if(t.length!==2)return null;let i=t[0],e=t[1];return Math.hypot(e.clientX-i.clientX,e.clientY-i.clientY)}var kB=(()=>{let t=class _c{_dragSession=p(fe);handle(e){if(this._hasPinchZoomHandler())for(let n of this._dragSession.draggableItems)n.onPointerUp?.()}_hasPinchZoomHandler(){return this._dragSession.draggableItems.some(e=>e instanceof bp)}static \u0275fac=function(n){return new(n||_c)};static \u0275prov=y({token:_c,factory:_c.\u0275fac})};return t=E([D(vp)],t),t})(),yp=class{event;static fToken=Symbol("PinchToZoomPreparationRequest");constructor(i){this.event=i}},IB=(()=>{let t=class gc{_dragInjector=p(vt);_store=p(L);_dragSession=p(fe);handle({event:e}){this._canStart(e)&&(this._dragSession.onPointerDownScale=1,this._dragSession.onPointerDownPosition=new he,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(Ke.ZOOM)}_getHandler(e){let n=this._dragInjector.get(bp);return n.initialize(e.touches),n}static \u0275fac=function(n){return new(n||gc)};static \u0275prov=y({token:gc,factory:gc.\u0275fac})};return t=E([D(yp)],t),t})(),MB=[IB,kB],Cp=class{event;static fToken=Symbol("SelectionAreaFinalizeRequest");constructor(i){this.event=i}},EB=(()=>{let t=class vc{_dragSession=p(fe);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||vc)};static \u0275prov=y({token:vc,factory:vc.\u0275fac})};return t=E([D(Cp)],t),t})(),h_=(()=>{class t extends St{type="selection-area";kind="selection-area";_store=p(L);_dragSession=p(fe);_mediator=p(V);_canBeSelected=[];_selectedByMove=[];get _transform(){return this._store.transform}get _canvasPosition(){return he.fromPoint(this._transform.position).add(this._transform.scaledPosition)}get _instance(){return this._store.instances.require(Ke.SELECTION_AREA)}prepareDragSequence(){this._canBeSelected=this._mediator.execute(new ah),this._show(),this._draw(ne.initialize(this._dragSession.onPointerDownPosition.x,this._dragSession.onPointerDownPosition.y))}onPointerMove(e){let n=he.fromPoint(e).add(this._dragSession.onPointerDownPosition),o=this._getMinimumPoint(this._dragSession.onPointerDownPosition,n),r=Math.abs(e.x),a=Math.abs(e.y),s=ne.initialize(o.x,o.y,r,a);this._draw(s),this._selectedByMove=[],this._canBeSelected.forEach(c=>{c.element.unmarkAsSelected();let u=ne.addPoint(ne.mult(c.fRect,this._transform.scale),this._canvasPosition);ne.intersectionWithRect(u,s)&&(c.element.markAsSelected(),this._selectedByMove.push(c.element))}),this._mediator.execute(new ti)}_getMinimumPoint(e,n){return H.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(o){return(e||(e=U(t)))(o||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),xp=class{event;static fToken=Symbol("SelectionAreaPreparationRequest");constructor(i){this.event=i}},DB=(()=>{let t=class bc{_store=p(L);_dragSession=p(fe);_dragInjector=p(vt);get _instance(){return this._store.instances.get(Ke.SELECTION_AREA)}handle(e){this._isValid(e)&&(this._dragSession.onPointerDownScale=1,this._dragSession.onPointerDownPosition=he.fromPoint(e.event.getPosition()).elementTransform(this._store.flowHost),this._dragSession.draggableItems=[this._dragInjector.createInstance(h_)])}_isValid(e){return!!this._instance&&this._dragSession.isEmpty()&&an(e.event.originalEvent,this._instance.fTrigger)}static \u0275fac=function(n){return new(n||bc)};static \u0275prov=y({token:bc,factory:bc.\u0275fac})};return t=E([D(xp)],t),t})(),PB=[DB,EB],wp=class{rect;childrenBounds;static fToken=Symbol("ApplyChildResizeConstraintsRequest");constructor(i,e){this.rect=i,this.childrenBounds=e}},RB=(()=>{let t=class yc{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 o=e.x-n.x;o>0&&(e.x-=o,e.width+=o)}_restrictTop(e,n){let o=e.y-n.y;o>0&&(e.y-=o,e.height+=o)}_restrictRight(e,n){let o=n.x+n.width;e.x+e.width<=o&&(e.width=o-e.x)}_restrictBottom(e,n){let o=n.y+n.height;e.y+e.height<=o&&(e.height=o-e.y)}static \u0275fac=function(n){return new(n||yc)};static \u0275prov=y({token:yc,factory:yc.\u0275fac})};return t=E([D(wp)],t),t})(),Tp=class{rect;limits;static fToken=Symbol("ApplyParentResizeConstraintsRequest");constructor(i,e){this.rect=i,this.limits=e}},OB=(()=>{let t=class Cc{_mediator=p(V);handle({rect:e,limits:n}){this._applyResizeConstraints(e,n)}_applyResizeConstraints(e,n){if(!n)return;let o=this._clampedCopyForCalculation(e,n);this._applySoftParentExpansions(o,n.softLimits),n.hardLimit&&this._clampRectToInner(e,n.hardLimit.innerRect)}_clampedCopyForCalculation(e,n){let o=me({},e);return n.hardLimit&&this._clampRectToInner(o,n.hardLimit.innerRect),o}_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 o=n.x+n.width;e.x+e.width>o&&(e.width=o-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 o of n)this._expandParentFromOriginalIfOverflow(e,o)}_expandParentFromOriginalIfOverflow(e,n){let o=n.innerRect,r=n.boundingRect,a=this._computeOverflow(o,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 o=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:o,top:r,right:a,bottom:s}}_buildExpandedParentRect(e,n){let o=me({},e);return n.left&&(o.x=e.x-n.left,o.width=e.width+n.left),n.top&&(o.y=e.y-n.top,o.height=e.height+n.top),n.right&&(o.width=(o.width??e.width)+n.right),n.bottom&&(o.height=(o.height??e.height)+n.bottom),o}_applyParentRect(e,n){e.nodeOrGroup.updatePosition(n),e.nodeOrGroup.updateSize(n),this._mediator.execute(new Pi(e.nodeOrGroup.fId(),n)),e.nodeOrGroup.redraw()}static \u0275fac=function(n){return new(n||Cc)};static \u0275prov=y({token:Cc,factory:Cc.\u0275fac})};return t=E([D(Tp)],t),t})(),Sp=class{originalRect;difference;handleType;minimumSize;static fToken=Symbol("CalculateChangedRectFromDifferenceRequest");constructor(i,e,n,o){this.originalRect=i,this.difference=e,this.handleType=n,this.minimumSize=o}},fy={[Cn.LEFT]:{x:-1,y:0},[Cn.LEFT_TOP]:{x:-1,y:-1},[Cn.TOP]:{x:0,y:-1},[Cn.RIGHT_TOP]:{x:1,y:-1},[Cn.RIGHT]:{x:1,y:0},[Cn.RIGHT_BOTTOM]:{x:1,y:1},[Cn.BOTTOM]:{x:0,y:1},[Cn.LEFT_BOTTOM]:{x:-1,y:1}},FB=(()=>{let t=class xc{handle({originalRect:e,difference:n,handleType:o,minimumSize:r}){let a=this._changeSizeInRect(e,n,fy[o],r);return this._changePosition(e,n,fy[o],a)}_changeSizeInRect(e,n,o,r){let a=e.width+o.x*n.x,s=e.height+o.y*n.y,c=0,u=0;return a<0&&(c=a,a=Math.abs(a)),a<r.width&&(o.x===-1&&(c+=a-r.width),a=r.width),s<0&&(u=s,s=Math.abs(s)),s<r.height&&(o.y===-1&&(u+=s-r.height),s=r.height),ne.initialize(c,u,a,s)}_changePosition(e,n,o,r){let a=e.x+(o.x===-1?n.x:0)+r.x,s=e.y+(o.y===-1?n.y:0)+r.y;return ne.initialize(a,s,r.width,r.height)}static \u0275fac=function(n){return new(n||xc)};static \u0275prov=y({token:xc,factory:xc.\u0275fac})};return t=E([D(Sp)],t),t})(),kp=class{nodeOrGroup;paddings;static fToken=Symbol("CalculateDirectChildrenUnionRectRequest");constructor(i,e){this.nodeOrGroup=i,this.paddings=e}},NB=(()=>{let t=class wc{_mediator=p(V);_store=p(L);get _allNodesAndGroups(){return this._store.nodes.getAll()}handle({nodeOrGroup:e,paddings:n}){let o=ne.union(this._calculateDirectChildren(e.fId()).map(r=>this._normalizeRect(r)));return o?this._concatRectWithParentPadding(o,n):null}_calculateDirectChildren(e){return this._allNodesAndGroups.filter(n=>n.fParentId()===e)}_normalizeRect(e){return this._mediator.execute(new it(e.hostElement))}_concatRectWithParentPadding(e,n){return ne.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||wc)};static \u0275prov=y({token:wc,factory:wc.\u0275fac})};return t=E([D(kp)],t),t})(),qr=class{nodeOrGroup;rect;static fToken=Symbol("CalculateResizeLimitsRequest");constructor(i,e){this.nodeOrGroup=i,this.rect=e}},AB=(()=>{let t=class Tc{_mediator=p(V);handle({nodeOrGroup:e,rect:n}){let o=this._getParentsChain(e),r=this._calculateNodePaddings(e,n);return{limits:this._buildSoftHardLimits(o),childrenBounds:this._getNormalizedChildrenBounds(e,r),minimumSize:Tt.initialize(r[0]+r[2],r[1]+r[3])}}_calculateNodePaddings(e,n){return this._mediator.execute(new Ni(e,n))}_getNormalizedChildrenBounds(e,n){return this._mediator.execute(new kp(e,n))}_getParentsChain(e){return this._mediator.execute(new Eo(e))??[]}_buildSoftHardLimits(e){let n=[],o,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{o=this._makeLimit(a,s);break}}return{softLimits:n,hardLimit:o}}_getParentInfo(e,n){return this._mediator.execute(new Lr(e,n))}_isAutoExpand(e){return e.fAutoExpandOnChildHit()}_makeLimit(e,{boundingRect:n,innerRect:o}){return{nodeOrGroup:e,boundingRect:n,innerRect:o}}static \u0275fac=function(n){return new(n||Tc)};static \u0275prov=y({token:Tc,factory:Tc.\u0275fac})};return t=E([D(qr)],t),t})(),Ip=class{event;static fToken=Symbol("ResizeNodeFinalizeRequest");constructor(i){this.event=i}},Zy="node-resize",Qy="resize-node";function LB(t){return t.getEvent().kind===Qy||t.getEvent().fEventType===Zy}var BB=(()=>{let t=class Sc{_dragSession=p(fe);handle(e){this._isNodeResizeHandler()&&this._dragSession.draggableItems.forEach(n=>n.onPointerUp?.())}_isNodeResizeHandler(){return this._dragSession.draggableItems.some(e=>LB(e))}static \u0275fac=function(n){return new(n||Sc)};static \u0275prov=y({token:Sc,factory:Sc.\u0275fac})};return t=E([D(Ip)],t),t})(),f_=class{fNodeId;constructor(i){this.fNodeId=i}},m_=(()=>{class t extends St{type=Zy;kind=Qy;data(){return new f_(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 o of this._softParentConnections)this._applyConnectionHandlers(o);this._lastRect=n}onPointerUp(){let e=this._lastRect??this._fallbackRectFromModel();this._nodeOrGroup.sizeChange.emit(e),requestAnimationFrame(()=>this._nodeOrGroup.refresh())}_readBaselineRect(){return this._mediator.execute(new it(this._nodeOrGroup.hostElement))}_buildConstraints(e){return this._mediator.execute(new qr(this._nodeOrGroup,e))}_calcNextRect(e){return this._mediator.execute(new Sp(this._baselineRect,e,this._handleType,this._constraints.minimumSize))}_applyConstraints(e){this._mediator.execute(new wp(e,this._constraints.childrenBounds)),this._mediator.execute(new Tp(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 Pi(this._nodeOrGroup.fId(),e)),this._nodeOrGroup.redraw()}_fallbackRectFromModel(){return ne.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 o of e.source){let r=this._readConnectorRect(o.connector,n);o.handler.setSourceRect(r)}for(let o of e.target){let r=this._readConnectorRect(o.connector,n);o.handler.setTargetRect(r)}}_readConnectorRect(e,n){let o=`${e.kind}::${e.fId()}`,r=n.get(o);if(r)return r;let a=this._mediator.execute(new oi(e.hostElement,!1));return n.set(o,a),a}static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),Gr=class{_mediator=p(V);_store=p(L);_behaviour=p(Fo);_source;_target;_sourceRef;_targetRef;_sourceRect;_targetRect;connection;initialize(i){this.connection=i,this._source=this._store.outputs.require(this.connection.fOutputId()),this._target=this._store.inputs.require(this.connection.fInputId()),this._sourceRef=this._readRectRef(this._source),this._targetRef=this._readRectRef(this._target),this._sourceRect=rt.fromRoundedRect(this._sourceRef.rect),this._targetRect=rt.fromRoundedRect(this._targetRef.rect)}setSourceRect(i){this._sourceRect=rt.fromRoundedRect(i),this._mediator.execute(new Di(this._source.fId(),this._source.kind,this._sourceRect))}setTargetRect(i){this._targetRect=rt.fromRoundedRect(i),this._mediator.execute(new Di(this._target.fId(),this._target.kind,this._targetRect))}redraw(){let i=this._buildLine();this.connection.setLine(i),this.connection.redraw()}_buildLine(){let i=rt.fromRoundedRect(this._sourceRect),e=rt.fromRoundedRect(this._targetRect);return this._behaviour.handle(new gn(i,e,this.connection,this._sourceRef.connector.fConnectableSide,this._targetRef.connector.fConnectableSide,this._resolveRotationContext(this._sourceRef.connector),this._resolveRotationContext(this._targetRef.connector)))}_readRectRef(i){return{connector:i,rect:this._mediator.execute(new oi(i.hostElement,!1))}}_resolveRotationContext(i){return this._mediator.execute(new Nn(i))}},VB=(()=>{class t extends Gr{_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(o){return(e||(e=U(t)))(o||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),zB=(()=>{class t extends Gr{setSourceRect(e){super.setSourceRect(e),super.redraw()}static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),HB=(()=>{class t extends Gr{setTargetRect(e){super.setTargetRect(e),super.redraw()}static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),Mp=class{event;fTrigger;static fToken=Symbol("ResizeNodePreparationRequest");constructor(i,e){this.event=i,this.fTrigger=e}},Ep=class{handler;nodeOrGroup;static fToken=Symbol("AttachResizeConnectionDragHandlersToNodeRequest");constructor(i,e){this.handler=i,this.nodeOrGroup=e}},qB=(()=>{let t=class kc{_store=p(L);_mediator=p(V);_dragInjector=p(vt);handle({handler:e,nodeOrGroup:n}){let o=this._readSoftParents(n),r=[n,...o],a=this._collectSourceConnectorIds(r),s=this._collectTargetConnectorIds(r),c=new Map;e.setNodeConnectionHandlers(this._buildConnectionHandlersForNode(n,a,s,c)),e.setSoftParentConnectionHandlers(o.map(u=>this._buildConnectionHandlersForNode(u,a,s,c)))}_readSoftParents(e){let n=this._mediator.execute(new it(e.hostElement));return this._mediator.execute(new qr(e,n)).limits.softLimits.map(r=>r.nodeOrGroup)}_collectSourceConnectorIds(e){let n=new Set(e.map(o=>o.fId()));return new Set(this._store.outputs.getAll().filter(o=>n.has(o.fNodeId)).map(o=>o.fId()))}_collectTargetConnectorIds(e){let n=new Set(e.map(o=>o.fId()));return new Set(this._store.inputs.getAll().filter(o=>n.has(o.fNodeId)).map(o=>o.fId()))}_buildConnectionHandlersForNode(e,n,o,r){let a=this._store.outputs.getAll().filter(g=>g.fNodeId===e.fId()),s=this._store.inputs.getAll().filter(g=>g.fNodeId===e.fId());if(!a.length&&!s.length)return{source:[],target:[]};let c=new Set(a.map(g=>g.fId())),u=new Set(s.map(g=>g.fId())),f={source:[],target:[]};for(let g of this._store.connections.getAll()){let x=c.has(g.fOutputId()),R=u.has(g.fInputId());if(!x&&!R)continue;let k=r.get(g.fId())??this._createConnectionHandler(g,n,o);if(r.set(g.fId(),k),x){let A=this._store.outputs.require(g.fOutputId());f.source.push({handler:k,connector:A})}if(R){let A=this._store.inputs.require(g.fInputId());f.target.push({handler:k,connector:A})}}return f}_createConnectionHandler(e,n,o){let r=n.has(e.fOutputId()),a=o.has(e.fInputId()),s=r&&a?this._dragInjector.createInstance(VB):r?this._dragInjector.createInstance(zB):this._dragInjector.createInstance(HB);return s.initialize(e),s}static \u0275fac=function(n){return new(n||kc)};static \u0275prov=y({token:kc,factory:kc.\u0275fac})};return t=E([D(Ep)],t),t})(),GB=(()=>{let t=class Ic{_mediator=p(V);_store=p(L);_dragSession=p(fe);_dragInjector=p(vt);get _transform(){return this._store.transform}handle({event:e,fTrigger:n}){if(!this._dragSession.isEmpty()||!this._isResizeHandle(e.targetElement)||!an(e.originalEvent,n))return;let o=this._findResizableNode(e.targetElement);if(!o)return;this._selectBeforeResize(o);let r=this._transform.scale??1;this._dragSession.onPointerDownScale=r,this._dragSession.onPointerDownPosition=he.fromPoint(e.getPosition()).elementTransform(this._store.flowHost).div(r);let a=this._dragInjector.createInstance(m_);a.initialize(o,this._readResizeHandleType(e.targetElement)),this._mediator.execute(new Ep(a,o)),this._dragSession.draggableItems=[a]}_isResizeHandle(e){return vr(e,".f-resize-handle")}_findResizableNode(e){let n=this._store.nodes.getAll().find(o=>o.isContains(e));if(n)return n.fDraggingDisabled()?void 0:n}_selectBeforeResize(e){queueMicrotask(()=>{this._mediator.execute(new Ro(e))})}_readResizeHandleType(e){let n=Ub(e,"fResizeHandleType",".f-resize-handle");return Cn[n]}static \u0275fac=function(n){return new(n||Ic)};static \u0275prov=y({token:Ic,factory:Ic.\u0275fac})};return t=E([D(Mp)],t),t})(),jB=[RB,OB,FB,NB,AB,qB,BB,GB],Dp=class{event;static fToken=Symbol("RotateNodeFinalizeRequest");constructor(i){this.event=i}},Jy="node-rotate",eC="rotate-node";function UB(t){return t.getEvent().kind===eC||t.getEvent().fEventType===Jy}var $B=(()=>{let t=class Mc{_dragSession=p(fe);handle(e){this._isValid()&&this._dragSession.draggableItems.forEach(n=>{n.onPointerUp?.()})}_isValid(){return this._dragSession.draggableItems.some(e=>UB(e))}static \u0275fac=function(n){return new(n||Mc)};static \u0275prov=y({token:Mc,factory:Mc.\u0275fac})};return t=E([D(Dp)],t),t})(),Pp=class{event;fTrigger;static fToken=Symbol("RotateNodePreparationRequest");constructor(i,e){this.event=i,this.fTrigger=e}},__=class{fNodeId;constructor(i){this.fNodeId=i}};function WB(t,i,e){let{x:n,y:o}=KB(t,i,e),r=n-t.x,a=o-t.y;return{x:r,y:a}}function KB(t,i,e){let n=t.x-e.x,o=t.y-e.y,r=i*Math.PI/180,a=Math.cos(r),s=Math.sin(r),c=n*a-o*s,u=n*s+o*a,f=c+e.x,g=u+e.y;return{x:f,y:g}}var g_=(()=>{class t extends St{type=Jy;kind=eC;data(){return new __(this._nodeOrGroup.fId())}_store=p(L);_mediator=p(V);_dragSession=p(fe);_nodeOrGroup;_sourceConnections;_targetConnections;_startRotation=0;_nodeRect;_nodeCenter;_pointerDownInFlow;_rotationOffsetDeg=0;get _transform(){return this._store.transform}initialize(e,n,o){this._nodeOrGroup=e,this._sourceConnections=n,this._targetConnections=o,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=H.sum(this._pointerDownInFlow,e),r=this._angleDeg(n)-this._rotationOffsetDeg;this._applyRotation(r);let a=r-this._startRotation;for(let s of this._sourceConnections)s.connection.setSourceDelta(this._deltaAfterRotation(s.connector,a));for(let s of this._targetConnections)s.connection.setTargetDelta(this._deltaAfterRotation(s.connector,a))}onPointerUp(){this._nodeOrGroup.rotate.set(this._nodeOrGroup._rotate),this._nodeOrGroup.refresh()}_readNodeRect(){return this._mediator.execute(new it(this._nodeOrGroup.hostElement))}_calculatePointerDownInFlow(){return H.sub(this._dragSession.onPointerDownPosition,H.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 WB(e,n,this._nodeCenter)}static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),YB=(()=>{let t=class Ec{_mediator=p(V);_store=p(L);_dragContext=p(fe);_dragInjector=p(vt);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 o=this._transform.scale;this._dragContext.onPointerDownScale=o,this._dragContext.onPointerDownPosition=he.fromPoint(e.event.getPosition()).elementTransform(this._store.flowHost).div(o);let r=this._dragInjector.createInstance(g_);r.initialize(n,this._buildOutputConnectionHandlers(n),this._buildInputConnectionHandlers(n)),this._dragContext.draggableItems=[r]}_isPreparationAllowed({event:e,fTrigger:n}){return this._dragContext.isEmpty()&&v7(e.targetElement)&&an(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 Ro(e))})}_buildInputConnectionHandlers(e){return this._mediator.execute(new Lp(e)).map(n=>{let o=this._store.inputs.require(n.fInputId()),r=this._mediator.execute(new Ut(o)),a=this._dragInjector.get(Hr);return a.initialize(n),{connection:a,connector:r.rect.gravityCenter}})}_buildOutputConnectionHandlers(e){return this._mediator.execute(new $p(e)).map(n=>{let o=this._store.outputs.require(n.fOutputId()),r=this._mediator.execute(new Ut(o)),a=this._dragInjector.get(Vr);return a.initialize(n),{connection:a,connector:r.rect.gravityCenter}})}static \u0275fac=function(n){return new(n||Ec)};static \u0275prov=y({token:Ec,factory:Ec.\u0275fac})};return t=E([D(Pp)],t),t})(),XB=[$B,YB],jr=class{flowRect;canvasPosition;eventPoint;minimap;static fToken=Symbol("CalculateFlowPointFromMinimapPointRequest");constructor(i,e,n,o){this.flowRect=i,this.canvasPosition=e,this.eventPoint=n,this.minimap=o}},ZB=(()=>{let t=class Dc{_store=p(L);get _canvasScale(){return this._store.transform.scale||1}handle(e){return H.sub(e.canvasPosition,H.sub(this._getPositionInViewBox(e.eventPoint,e.minimap),this._getNormalizedFlowCenter(e.flowRect)))}_getNormalizedFlowCenter(e){return he.fromPoint(e.gravityCenter).sub(e)}_getPositionInViewBox(e,n){let o=this.normalizeEventPoint(e,n);return H.sum(o,ne.mult(n.viewBox,this._canvasScale))}normalizeEventPoint(e,n){return this._getEventPointInMinimap(e,n).mult(n.scale).mult(this._canvasScale)}_getEventPointInMinimap(e,n){return he.fromPoint(e).elementTransform(n.element)}static \u0275fac=function(n){return new(n||Dc)};static \u0275prov=y({token:Dc,factory:Dc.\u0275fac})};return t=E([D(jr)],t),t})(),Rp=class{event;static fToken=Symbol("DragMinimapFinalizeRequest");constructor(i){this.event=i}},QB=(()=>{let t=class Pc{_dragSession=p(fe);handle(e){this._isValid()&&this._dragSession.draggableItems.forEach(n=>{n.onPointerUp?.()})}_isValid(){return this._dragSession.draggableItems.some(JB)}static \u0275fac=function(n){return new(n||Pc)};static \u0275prov=y({token:Pc,factory:Pc.\u0275fac})};return t=E([D(Rp)],t),t})(),tC="minimap",nC="minimap";function JB(t){return t.getEvent().kind===nC||t.getEvent().fEventType===tC}var v_=(()=>{class t extends St{type=tC;kind=nC;_store=p(L);_mediator=p(V);_lastDelta=null;_flowRect;_startCanvasPosition;_eventPoint;_minimap;initialize(e,n,o,r){this._flowRect=e,this._startCanvasPosition=n,this._eventPoint=o,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(he.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 jr(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(o){return(e||(e=U(t)))(o||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),Op=class{event;static fToken=Symbol("DragMinimapPreparationRequest");constructor(i){this.event=i}},e9=(()=>{let t=class Rc{_store=p(L);_mediator=p(V);_dragSession=p(fe);_dragInjector=p(vt);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(Ke.MINIMAP).state,o=e.getPosition(),r=he.fromPoint(this._store.transform.position),a=ne.fromElement(this._flowHost);this._canvas.setPosition(this._calculateCanvasPosition(a,o,n)),this._canvas.redraw(),this._canvas.emitCanvasChangeEvent(),this._dragSession.onPointerDownScale=1,this._dragSession.onPointerDownPosition=he.fromPoint(o).elementTransform(this._flowHost);let s=this._dragInjector.createInstance(v_);s.initialize(a,r,o,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(Ke.MINIMAP))}_calculateCanvasPosition(e,n,o){return this._mediator.execute(new jr(e,he.fromPoint(this._canvas.transform.position),n,o))}static \u0275fac=function(n){return new(n||Rc)};static \u0275prov=y({token:Rc,factory:Rc.\u0275fac})};return t=E([D(Op)],t),t})(),t9=[ZB,QB,e9];function n9(t){return!!t&&typeof t.destroy=="function"}var vt=(()=>{class t{_injector=p(mt);_dragInjector=null;_created=[];create(){this._dragInjector=mt.create({providers:[{provide:Fp,useClass:Fp},{provide:Ku,useClass:Ku},{provide:Vu,useClass:Vu},{provide:Xm,useClass:Xm},{provide:Ar,useClass:Ar},{provide:Vr,useClass:Vr},{provide:Hr,useClass:Hr},{provide:zr,useClass:zr},{provide:ai,useClass:ai},{provide:bp,useClass:bp},{provide:h_,useClass:h_},{provide:m_,useClass:m_},{provide:g_,useClass:g_},{provide:v_,useClass:v_}],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=b0(this._dragInjector,()=>new e);return this._created.push(n),n}destroy(){for(let e of this._created)n9(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})(),si=(()=>{class t{_data;setData(e){this._data=me(me({},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})(),my="f-canvas-dragging",_y="canvas-dragging",Fp=(()=>{class t extends St{type="canvas-move";kind="drag-canvas";_store=p(L);_onPointerDownPosition=H.initialize();constructor(){super(),this._store.fCanvas?.hostElement.classList.add(my,_y)}prepareDragSequence(){this._onPointerDownPosition=this._store.transform.position}onPointerMove(e){this._store.fCanvas?.setPosition(he.fromPoint(this._onPointerDownPosition).add(e)),this._store.fCanvas?.redraw()}onPointerUp(){this._store.fCanvas?.emitCanvasChangeEvent(),this._store.fCanvas?.hostElement.classList.remove(my,_y)}static \u0275fac=function(n){return new(n||t)};static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),i9=(()=>{let t=class Oc{_dragContext=p(fe);handle(e){this._isValid()&&this._dragContext.draggableItems.forEach(n=>n.onPointerUp?.())}_isValid(){return this._dragContext.draggableItems.some(e=>e instanceof Fp)}static \u0275fac=function(n){return new(n||Oc)};static \u0275prov=y({token:Oc,factory:Oc.\u0275fac})};return t=E([D(Fu)],t),t})(),Np=class{event;fTrigger;static fToken=Symbol("DragCanvasPreparationRequest");constructor(i,e){this.event=i,this.fTrigger=e}},o9=(()=>{let t=class Fc{_store=p(L);_dragContext=p(fe);_dragInjector=p(vt);handle({event:e,fTrigger:n}){!this._isValid(e)||!this._isValidTrigger(e,n)||(this._dragContext.onPointerDownScale=1,this._dragContext.onPointerDownPosition=he.fromPoint(e.getPosition()).elementTransform(this._store.flowHost),this._dragContext.draggableItems=[this._dragInjector.get(Fp)])}_isValid(e){return this._dragContext.isEmpty()&&(this._isBackgroundElement(e.targetElement)||this._isDragOnHost(e.targetElement))}_isBackgroundElement(e){return this._store.instances.get(Ke.BACKGROUND)?.hostElement.contains(e)}_isDragOnHost(e){return this._store.flowHost.contains(e)&&!this._getNode(e)}_getNode(e){let n=this._store.nodes.getAll().find(o=>o.isContains(e));return n&&n.fDraggingDisabled()&&(n=void 0),n}_isValidTrigger(e,n){return an(e.originalEvent,n)}static \u0275fac=function(n){return new(n||Fc)};static \u0275prov=y({token:Fc,factory:Fc.\u0275fac})};return t=E([D(Np)],t),t})(),r9=[i9,o9],Ap=class{event;trigger;static fToken=Symbol("SelectByPointerRequest");constructor(i,e){this.event=i,this.trigger=e}},a9=(()=>{let t=class Nc{_mediator=p(V);_store=p(L);_dragSession=p(fe);handle({event:e,trigger:n}){if(!this._isSelectionAllowed(e))return;let o=this._resolveSelectable(e.targetElement);this._deferRaiseLayerFor(o),an(e.originalEvent,n)?this._applyToggleSelect(o):this._applySingleSelect(o)}_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 Ai(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||Nc)};static \u0275prov=y({token:Nc,factory:Nc.\u0275fac})};return t=E([D(Ap)],t),t})(),s9=[a9];var b_=class extends Vm{hostElement=p(Xe).nativeElement};function l9(t){return vr(t,".f-drag-blocker")}var iC=(()=>{class t extends b_{_result=p(si);_mediator=p(V);_platform=p(em);disabled=!1;fMultiSelectTrigger=e=>this._platform.getOS()===Zn.MAC_OS?e.metaKey:e.ctrlKey;fReassignConnectionTrigger=mn;fCreateConnectionTrigger=mn;fConnectionWaypointsTrigger=B(mn);fMoveControlPointTrigger=mn;fNodeResizeTrigger=mn;fNodeRotateTrigger=mn;fNodeMoveTrigger=mn;fCanvasMoveTrigger=mn;fExternalItemTrigger=mn;fSelectionChange=new re;fNodeIntersectedWithConnections=new re;fNodeConnectionsIntersection=qe();fEmitOnNodeIntersect=!1;fCreateNode=new re;fMoveNodes=new re;fReassignConnection=new re;fCreateConnection=new re;fConnectionWaypointsChanged=qe();fDropToGroup=new re;vCellSize=B(1,{transform:e=>Me(e,1)});hCellSize=B(1,{transform:e=>Me(e,1)});fCellSizeWhileDragging=B(!1,{transform:e=>Y(e)});fDragStarted=new re;fDragEnded=new re;_dragHandlerInjector=p(vt);ngOnInit(){this._mediator.execute(new zp(this))}ngAfterViewInit(){super.subscribe()}onPointerDown(e){if(l9(e.targetElement))return!1;this._dragHandlerInjector.create(),this._result.clear(),this._mediator.execute(new qp),this._mediator.execute(new xp(e)),this._mediator.execute(new Op(e)),this._mediator.execute(new yp(e)),this._mediator.execute(new Ap(e,this.fMultiSelectTrigger)),this._mediator.execute(new ju(e,this.fReassignConnectionTrigger)),this._mediator.execute(new qu(e,this.fCreateConnectionTrigger)),this._mediator.execute(new Yu(e,this.fConnectionWaypointsTrigger()));let n=e.isMouseLeftButton();return n||this.finalizeDragSequence(),n}prepareDragSequence(e){this._mediator.execute(new Mp(e,this.fNodeResizeTrigger)),this._mediator.execute(new Pp(e,this.fNodeRotateTrigger)),this._mediator.execute(new cp(e,this.fNodeMoveTrigger)),this._mediator.execute(new _p(e,this.fExternalItemTrigger)),this._mediator.execute(new dp(e)),this._mediator.execute(new Np(e,this.fCanvasMoveTrigger)),this._mediator.execute(new Gp)}onSelect(e){this._mediator.execute(new gp(e))}onPointerMove(e){this._mediator.execute(new Hp(e))}onPointerUp(e){this._mediator.execute(new Rp(e)),this._mediator.execute(new Cp(e)),this._mediator.execute(new Gu(e)),this._mediator.execute(new Bu(e)),this._mediator.execute(new Ip(e)),this._mediator.execute(new Dp(e)),this._mediator.execute(new lp(e)),this._mediator.execute(new fp(e)),this._mediator.execute(new Xu(e)),this._mediator.execute(new Fu(e)),this._mediator.execute(new vp(e)),this._mediator.execute(new $u(e)),this._mediator.execute(new Mu)}finalizeDragSequence(){this._mediator.execute(new ri),this._mediator.execute(new Rr),this._result.clear(),this._dragHandlerInjector.destroy()}ngOnDestroy(){this._mediator.execute(new ri),this._mediator.execute(new jp),super.unsubscribe()}static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275dir=je({type:t,selectors:[["f-flow","fDraggable",""]],inputs:{disabled:[2,"fDraggableDisabled","disabled",Y],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",Y],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:[Ee([si,vt]),Q]})}return t})(),c9=[...r9,...V7,...s7,...s9,...CB,...m7,...t9,...sB,...wB,...jB,...XB,...PB,...MB],d9=(()=>{let t=class Ac{_store=p(L);handle({waypointIndex:e,connectionId:n}){let o=this._store.connections.require(n),r=o.fWaypoints()?.waypoints().slice();if(!r)throw new Error("Connection waypoints not found");r.splice(e,1),o.fWaypoints()?.waypoints.set(r),this._store.fDraggable?.fConnectionWaypointsChanged.emit(this._changeEvent(o))}_changeEvent(e){return new Wu(e.fId(),e.fWaypoints()?.waypoints()||[])}static \u0275fac=function(n){return new(n||Ac)};static \u0275prov=y({token:Ac,factory:Ac.\u0275fac})};return t=E([D(Nm)],t),t})(),y_=class{static fToken=Symbol("RemoveSnapConnectionFromStoreRequest")},u9=(()=>{let t=class Lc{_store=p(L);handle(e){this._store.connections.removeInstanceForSnap()}static \u0275fac=function(n){return new(n||Lc)};static \u0275prov=y({token:Lc,factory:Lc.\u0275fac})};return t=E([D(y_)],t),t})(),p9=[xh,Li,r5,a5,s5,l5,e6,D6,r6,T6,B6,L6,E6,z6,q6,H6,M6,N6,a6,$6,I6,k6,S6,b6,w6,y6,C6,V6,O6,G6,j6,A6,F6,U6,W6,K6,Y6,u9,d9],Ur=class{instance;static fToken=Symbol("AddConnectorToStoreRequest");constructor(i){this.instance=i}},h9=(()=>{let t=class Bc{_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 lu(e.fId(),e.fNodeId,e.kind,e.hostElement))}static \u0275fac=function(n){return new(n||Bc)};static \u0275prov=y({token:Bc,factory:Bc.\u0275fac})};return t=E([D(Ur)],t),t})(),Fi=class{position;connectorRefs;static fToken=Symbol("CalculateClosestConnectorRequest");constructor(i,e){this.position=i,this.connectorRefs=e}},f9=(()=>{let t=class Vc{handle({position:e,connectorRefs:n}){let o,r=1/0;for(let a of n){let s=this._distanceToRect(e,a.rect);s<r&&(r=s,o=a)}return o?Bt(me({},o),{distance:r}):void 0}_distanceToRect(e,{x:n,y:o,width:r,height:a}){let s=this._clamp(e.x,n,n+r),c=this._clamp(e.y,o,o+a),u=e.x-s,f=e.y-c;return Math.sqrt(u*u+f*f)}_clamp(e,n,o){return Math.max(n,Math.min(o,e))}static \u0275fac=function(n){return new(n||Vc)};static \u0275prov=y({token:Vc,factory:Vc.\u0275fac})};return t=E([D(Fi)],t),t})(),$r=class{pointerPosition;connectableConnectors;static fToken=Symbol("FindConnectableConnectorUsingPriorityAndPositionRequest");constructor(i,e){this.pointerPosition=i,this.connectableConnectors=e}},m9=(()=>{let t=class zc{_mediator=p(V);_store=p(L);_browser=p(at);get _transform(){return this._store.transform}get _flowHost(){return this._store.flowHost}get _fNodes(){return this._store.nodes.getAll()}get _snapConnection(){return this._store.connections.getForSnap()}handle(e){let n=this._findConnectorAtPosition(e);return n.length>0?n[0]:void 0}_findConnectorAtPosition(e){let n=[];n.push(...this._filterConnectorsThatLocatedAtPosition(e));let o=this._isSnapConnectionEnabledAndHasClosestConnector(e);o&&n.unshift(o.connector);let r=this._getFirstConnectableConnectorOfNodeAtPosition(e);return r&&n.push(r),n}_filterConnectorsThatLocatedAtPosition(e){return e.connectableConnectors.filter(n=>ne.isIncludePoint(n.rect,this._calculatePointerInFlow(e.pointerPosition))).map(n=>n.connector)}_calculatePointerInFlow(e){return No(e,this._flowHost,this._transform)}_isSnapConnectionEnabledAndHasClosestConnector(e){if(!this._snapConnection)return;let n=this._mediator.execute(new Fi(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(o=>o.connector.fNodeId===n.fId())?.connector}static \u0275fac=function(n){return new(n||zc)};static \u0275prov=y({token:zc,factory:zc.\u0275fac})};return t=E([D($r)],t),t})(),Wr=class{source;pointer;static fToken=Symbol("CalculateTargetConnectorsToConnectRequest");constructor(i,e){this.source=i,this.pointer=e}},Ut=class{connector;static fToken=Symbol("GetConnectorRectReferenceRequest");constructor(i){this.connector=i}},_9=(()=>{let t=class Hc{_mediator=p(V);handle({connector:e}){return{connector:e,rect:this._getRect(e)}}_getRect(e){return this._mediator.execute(new oi(e.hostElement))}static \u0275fac=function(n){return new(n||Hc)};static \u0275prov=y({token:Hc,factory:Hc.\u0275fac})};return t=E([D(Ut)],t),t})(),Kr=class{nodeOrGroup;static fToken=Symbol("AddNodeToStoreRequest");constructor(i){this.nodeOrGroup=i}},g9=(()=>{let t=class qc{_store=p(L);_mediator=p(V);handle({nodeOrGroup:e}){this._store.nodes.add(e),this._mediator.execute(new cu(e.fId(),e.hostElement,e)),this._store.emitNodeChanges()}static \u0275fac=function(n){return new(n||qc)};static \u0275prov=y({token:qc,factory:qc.\u0275fac})};return t=E([D(Kr)],t),t})(),Lp=class{nodeOrGroup;static fToken=Symbol("CalculateInputConnectionsRequest");constructor(i){this.nodeOrGroup=i}},v9=(()=>{let t=class Gc{_store=p(L);handle({nodeOrGroup:e}){let n=this._collectInputIds(e);return this._collectConnections(n)}_collectInputIds(e){let n=new Set,o=this._store.inputs.getAll();for(let r of o)e.isContains(r.hostElement)&&n.add(r.fId());return n}_collectConnections(e){let n=[],o=this._store.connections.getAll();for(let r of o)e.has(r.fInputId())&&n.push(r);return n}static \u0275fac=function(n){return new(n||Gc)};static \u0275prov=y({token:Gc,factory:Gc.\u0275fac})};return t=E([D(Lp)],t),t})(),ko=class{connector;pointerPosition;static fToken=Symbol("CalculateConnectableSideByConnectedPositionsRequest");constructor(i,e){this.connector=i,this.pointerPosition=e}},gy=2,Ct=(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})(Ct||{});function b9(t,i,e,n,o){let r=y9(o),a=e-t,s=n-i,c=C9(a,s);return x9(c,r)?c:w9(a,s,r,c)}function y9(t){if(!t||t.length===0)return Ct.ALL;let i=Ct.NONE;for(let e=0;e<t.length;e++)switch(t[e]){case j.LEFT:i|=Ct.LEFT;break;case j.RIGHT:i|=Ct.RIGHT;break;case j.TOP:i|=Ct.TOP;break;case j.BOTTOM:i|=Ct.BOTTOM;break}return i||Ct.ALL}function C9(t,i){let e=t<0?-t:t,n=i<0?-i:i;return e-n>gy?t<0?j.LEFT:j.RIGHT:(n-e>gy,i<0?j.TOP:j.BOTTOM)}function x9(t,i){switch(t){case j.LEFT:return(i&Ct.LEFT)!==0;case j.RIGHT:return(i&Ct.RIGHT)!==0;case j.TOP:return(i&Ct.TOP)!==0;case j.BOTTOM:return(i&Ct.BOTTOM)!==0;default:return!0}}function w9(t,i,e,n){let o=n,r=-1/0;if(e&Ct.RIGHT){let a=t;a>r&&(r=a,o=j.RIGHT)}if(e&Ct.LEFT){let a=-t;a>r&&(r=a,o=j.LEFT)}if(e&Ct.BOTTOM){let a=i;a>r&&(r=a,o=j.BOTTOM)}if(e&Ct.TOP){let a=-i;a>r&&(r=a,o=j.TOP)}return o}function Bp(t){return t===j.CALCULATE||t===j.CALCULATE_HORIZONTAL||t===j.CALCULATE_VERTICAL}var T9={[j.CALCULATE]:[j.TOP,j.BOTTOM,j.LEFT,j.RIGHT],[j.CALCULATE_HORIZONTAL]:[j.LEFT,j.RIGHT],[j.CALCULATE_VERTICAL]:[j.TOP,j.BOTTOM]},S9=(()=>{let t=class jc{_mediator=p(V);handle({connector:e,pointerPosition:n}){let o=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 b9(r.x,r.y,s,c,T9[o])}_accumulateConnectedCenters(e,n,o){let r=o?.x||0,a=o?.y||0,s=o?1:0;if(n&&n.length)for(let c=0;c<n.length;c++){let u=n[c].hostElement;if(u===e)continue;let f=this._getConnectorRect(u).gravityCenter;r+=f.x,a+=f.y,s++}return{sumX:r,sumY:a,count:s}}_getConnectorRect(e){return this._mediator.execute(new it(e))}static \u0275fac=function(n){return new(n||jc)};static \u0275prov=y({token:jc,factory:jc.\u0275fac})};return t=E([D(ko)],t),t})(),Vp=class{connector;static fToken=Symbol("CalculateConnectableSideByInternalPositionRequest");constructor(i){this.connector=i}},zp=class{fComponent;static fToken=Symbol("AddDndToStoreRequest");constructor(i){this.fComponent=i}},k9=(()=>{let t=class Uc{_store=p(L);handle(e){this._store.fDraggable=e.fComponent}static \u0275fac=function(n){return new(n||Uc)};static \u0275prov=y({token:Uc,factory:Uc.\u0275fac})};return t=E([D(zp)],t),t})(),Hp=class{event;static fToken=Symbol("OnPointerMoveRequest");constructor(i){this.event=i}},I9=(()=>{let t=class $c{_mediator=p(V);_store=p(L);get _hostElement(){return this._store.fDraggable?.hostElement}_dragContext=p(fe);handle({event:e}){this._dragContext.rememberPointerEvent(e),this._setDifferenceToDraggableItems(this._getDifferenceBetweenPointerAndPointerDown(e),e),this._mediator.execute(new Or)}_setDifferenceToDraggableItems(e,n){this._dragContext.draggableItems.forEach(o=>{o.onPointerMove(me({},e),n)})}_getDifferenceBetweenPointerAndPointerDown(e){return this._getPointerPositionInCanvas(e).div(this._dragContext.onPointerDownScale).sub(this._dragContext.onPointerDownPosition)}_getPointerPositionInCanvas(e){return he.fromPoint(e.getPosition()).elementTransform(this._hostElement)}static \u0275fac=function(n){return new(n||$c)};static \u0275prov=y({token:$c,factory:$c.\u0275fac})};return t=E([D(Hp)],t),t})(),qp=class{static fToken=Symbol("InitializeDragSequenceRequest")},M9=(()=>{let t=class Wc{_dragContext=p(fe);handle(e){this._dragContext.reset()}static \u0275fac=function(n){return new(n||Wc)};static \u0275prov=y({token:Wc,factory:Wc.\u0275fac})};return t=E([D(qp)],t),t})(),li=class{static fToken=Symbol("IsDragStartedRequest")},E9=(()=>{let t=class Kc{_store=p(L);handle(e){return!!this._store.fDraggable?.isDragStarted}static \u0275fac=function(n){return new(n||Kc)};static \u0275prov=y({token:Kc,factory:Kc.\u0275fac})};return t=E([D(li)],t),t})(),Gp=class{static fToken=Symbol("PrepareDragSequenceRequest")},D9=(()=>{let t=class Yc{_mediator=p(V);_dragContext=p(fe);handle(e){this._callPrepareDragSequence(),this._mediator.execute(new Eu)}_callPrepareDragSequence(){this._dragContext.draggableItems.forEach(e=>e.prepareDragSequence?.())}static \u0275fac=function(n){return new(n||Yc)};static \u0275prov=y({token:Yc,factory:Yc.\u0275fac})};return t=E([D(Gp)],t),t})(),jp=class{static fToken=Symbol("RemoveDndFromStoreRequest")},P9=(()=>{let t=class Xc{_store=p(L);handle(e){this._store.fDraggable=void 0}static \u0275fac=function(n){return new(n||Xc)};static \u0275prov=y({token:Xc,factory:Xc.\u0275fac})};return t=E([D(jp)],t),t})(),R9=[k9,I9,M9,D9,E9,P9],O9=new ve("CONNECTABLE_SIDE_EPSILON"),F9=(()=>{let t=class Zc{_mediator=p(V);_lastSide=new WeakMap;_epsilon=Math.max(0,p(O9,{optional:!0})??2);handle({connector:e}){if(this._isDragging()){let o=this._lastSide.get(e);if(o!==void 0)return o;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,o){let r=ne.fromElement(e),a=n.getBoundingClientRect(),s=r.gravityCenter.x,c=r.gravityCenter.y,u=s-a.left,f=a.right-s,g=c-a.top,x=a.bottom-c,R=0,k=u,A=[u,f,g,x];for(let J=1;J<4;J++){let de=A[J];de<k&&(k=de,R=J)}let q=R===0?j.LEFT:R===1?j.RIGHT:R===2?j.TOP:j.BOTTOM,W=this._lastSide.get(o);if(W!==void 0&&W!==q){let J=W===j.LEFT?0:W===j.RIGHT?1:W===j.TOP?2:3;(J===0?u:J===1?f:J===2?g:x)-k<=this._epsilon&&(q=W)}return q}_isDragging(){return this._mediator.execute(new li)}static \u0275fac=function(n){return new(n||Zc)};static \u0275prov=y({token:Zc,factory:Zc.\u0275fac})};return t=E([D(Vp)],t),t})(),Io=class{nodeOrGroup;static fToken=Symbol("CalculateConnectorsConnectableSidesRequest");constructor(i){this.nodeOrGroup=i}},N9=(()=>{let t=class Qc{_mediator=p(V);handle({nodeOrGroup:e}){let n=e.connectors,o=n.length;for(let a=0;a<o;a++){let s=n[a];s.fConnectableSide=this._resolveSideForConnectorFast(s)}let r=new Set;for(let a=0;a<o;a++){let c=n[a].toConnector;if(c&&c.length)for(let u=0,f=c.length;u<f;u++){let g=c[u],x=g.userFConnectableSide;Bp(x)&&r.add(g)}}r.size>0&&r.forEach(a=>{a.fConnectableSide=this._calculateByConnectedPositions(a)})}_resolveSideForConnectorFast(e){let n=e.userFConnectableSide;return n===j.AUTO?this._mediator.execute(new Vp(e)):Bp(n)?this._calculateByConnectedPositions(e):n}_calculateByConnectedPositions(e){return this._mediator.execute(new ko(e))}static \u0275fac=function(n){return new(n||Qc)};static \u0275prov=y({token:Qc,factory:Qc.\u0275fac})};return t=E([D(Io)],t),t})(),Mo=class{static fToken=Symbol("CalculateNodesBoundingBoxRequest")},A9=(()=>{let t=class Jc{_store=p(L);handle(e){return ne.union(this._nodesRects())}_nodesRects(){return this._store.nodes.getAll().map(e=>ne.fromElement(e.hostElement))}static \u0275fac=function(n){return new(n||Jc)};static \u0275prov=y({token:Jc,factory:Jc.\u0275fac})};return t=E([D(Mo)],t),t})(),Up=class{fNodes;static fToken=Symbol("CalculateNodesBoundingBoxNormalizedPositionRequest");constructor(i){this.fNodes=i}},L9=(()=>{let t=class ed{_store=p(L);_mediator=p(V);handle(e){return ne.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 To(e.hostElement));if(n)return this._getElementRect(e,n);let o=this._mediator.execute(new it(e.hostElement));return this._getElementRect(e,o)}_getElementRect(e,n){return ne.initialize(e._position.x,e._position.y,n.width,n.height)}static \u0275fac=function(n){return new(n||ed)};static \u0275prov=y({token:ed,factory:ed.\u0275fac})};return t=E([D(Up)],t),t})(),$p=class{nodeOrGroup;static fToken=Symbol("CalculateOutputConnectionsRequest");constructor(i){this.nodeOrGroup=i}},B9=(()=>{let t=class td{_store=p(L);handle({nodeOrGroup:e}){let n=this._collectOutputIds(e);return this._collectConnections(n)}_collectOutputIds(e){let n=new Set,o=this._store.outputs.getAll();for(let r of o)e.isContains(r.hostElement)&&n.add(r.fId());return n}_collectConnections(e){let n=[],o=this._store.connections.getAll();for(let r of o)e.has(r.fOutputId())&&n.push(r);return n}static \u0275fac=function(n){return new(n||td)};static \u0275prov=y({token:td,factory:td.\u0275fac})};return t=E([D($p)],t),t})(),Yr=class{nodeOrGroup;static fToken=Symbol("FitToChildNodesAndGroupsRequest");constructor(i){this.nodeOrGroup=i}},Ni=class{fNode;rect;static fToken=Symbol("GetNodePaddingRequest");constructor(i,e){this.fNode=i,this.rect=e}},V9=(()=>{let t=class nd{_browser=p(at);handle(e){return e.fNode.fIncludePadding()?this._getPaddingData(e.fNode,e.rect):[0,0,0,0]}_getPaddingData(e,n){let o=this._browser.window.getComputedStyle(e.hostElement);return[this._browser.toPixels(o.paddingLeft,n.width,n.height,o.fontSize),this._browser.toPixels(o.paddingTop,n.width,n.height,o.fontSize),this._browser.toPixels(o.paddingRight,n.width,n.height,o.fontSize),this._browser.toPixels(o.paddingBottom,n.width,n.height,o.fontSize)]}static \u0275fac=function(n){return new(n||nd)};static \u0275prov=y({token:nd,factory:nd.\u0275fac})};return t=E([D(Ni)],t),t})(),z9=(()=>{let t=class id{_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 o=this._nodes.find(r=>r.fId()===n);o&&this._mediator.execute(new Yr(o))}_calculateDirectChildren(e){return this._nodes.filter(n=>n.fParentId()===e.fId())}_unionRect(e){return ne.union(e.map(n=>this._boundingRect(n)))||ne.initialize()}_boundingRect(e){return this._mediator.execute(new it(e.hostElement))}_paddings(e,n){return this._mediator.execute(new Ni(e,n))}_calculateChildrenBounding(e,[n,o,r,a]){let s=this._unionRect(e);return s=ne.initialize(s.x-n,s.y-o,s.width+n+r,s.height+o+a),s}static \u0275fac=function(n){return new(n||id)};static \u0275prov=y({token:id,factory:id.\u0275fac})};return t=E([D(Yr)],t),t})(),Wp=class{id;static fToken=Symbol("GetChildNodeIdsRequest");constructor(i){this.id=i}},H9=(()=>{let t=class od{_store=p(L);get _allNodesAndGroups(){return this._store.nodes.getAll()}handle(e){if(!e.id)return[];let n=new Set,o=[];return this._collectDescendants(e.id,o,n),o}_collectDescendants(e,n,o){if(o.has(e))throw new Error(`Circular reference detected in the node hierarchy. Node id: ${e}`);o.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,o)}static \u0275fac=function(n){return new(n||od)};static \u0275prov=y({token:od,factory:od.\u0275fac})};return t=E([D(Wp)],t),t})(),Eo=class{nodeOrGroup;static fToken=Symbol("GetParentNodesRequest");constructor(i){this.nodeOrGroup=i}},q9=(()=>{let t=class rd{_store=p(L);handle({nodeOrGroup:e}){return this._getParentNodes(e,new Set,[])}_getParentNodes(e,n,o){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?(o.push(r),this._getParentNodes(r,n,o)):o}static \u0275fac=function(n){return new(n||rd)};static \u0275prov=y({token:rd,factory:rd.\u0275fac})};return t=E([D(Eo)],t),t})(),Xr=class{nodeOrGroup;destroyRef;static fToken=Symbol("UpdateNodeWhenStateOrSizeChangedRequest");constructor(i,e){this.nodeOrGroup=i,this.destroyRef=e}},G9=(()=>{let t=class ad{_mediator=p(V);handle({nodeOrGroup:e,destroyRef:n}){let{hostElement:o,stateChanges:r}=e;new xn(new fm(o),r).listen(n,()=>{this._mediator.execute(new Mi),this._isDragging()||(this._mediator.execute(new wo(e.fId(),"UpdateNodeWhenStateOrSizeChanged")),this._mediator.execute(new Io(e)),this._mediator.execute(new Yr(e)))})}_isDragging(){return this._mediator.execute(new li)}static \u0275fac=function(n){return new(n||ad)};static \u0275prov=y({token:ad,factory:ad.\u0275fac})};return t=E([D(Xr)],t),t})(),Zr=class{instance;static fToken=Symbol("RemoveNodeFromStoreRequest");constructor(i){this.instance=i}},j9=(()=>{let t=class sd{_store=p(L);_mediator=p(V);handle({instance:e}){this._store.nodes.remove(e),this._mediator.execute(new du(e.fId())),this._store.emitNodeChanges()}static \u0275fac=function(n){return new(n||sd)};static \u0275prov=y({token:sd,factory:sd.\u0275fac})};return t=E([D(Zr)],t),t})(),U9=[g9,S9,F9,v9,N9,A9,L9,B9,z9,H9,V9,q9,G9,j9],$9=(()=>{let t=class ld{_mediator=p(V);_store=p(L);get _targets(){return this._store.inputs.getAll()}handle({source:e,pointer:n}){let o=this._getConnectableTargets(e),r=[];for(let a of o)r.push(this._mediator.execute(new Ut(a)));return this._scheduleApplyCalculatedSides(r,n),r}_getConnectableTargets(e){if(e.hasConnectionLimits)return this._targets.filter(o=>e.canConnectTo(o));let n=this._targets.filter(o=>o.canBeConnected);return e.isSelfConnectable||(n=n.filter(o=>o.fNodeId!==e.fNodeId)),n}_scheduleApplyCalculatedSides(e,n){queueMicrotask(()=>this._applyCalculatedConnectableSides(e,n))}_applyCalculatedConnectableSides(e,n){for(let{connector:o}of e)Bp(o.userFConnectableSide)&&(o.fConnectableSide=this._calculateByConnectedPositions(o,n))}_calculateByConnectedPositions(e,n){return this._mediator.execute(new ko(e,n))}static \u0275fac=function(n){return new(n||ld)};static \u0275prov=y({token:ld,factory:ld.\u0275fac})};return t=E([D(Wr)],t),t})(),Kp=class{target;pointer;static fToken=Symbol("CalculateSourceConnectorsToConnectRequest");constructor(i,e){this.target=i,this.pointer=e}},W9=(()=>{let t=class cd{_mediator=p(V);_store=p(L);get _sources(){return this._store.outputs.getAll()}handle({target:e,pointer:n}){let o=this._getConnectableSources(e),r=[];for(let a of o)r.push(this._mediator.execute(new Ut(a)));return this._scheduleApplyCalculatedSides(r,n),r}_getConnectableSources(e){return this._sources.filter(n=>{let o=n.canBeConnected;return o&&n.hasConnectionLimits&&(o=n.canConnectTo(e)),o})}_scheduleApplyCalculatedSides(e,n){queueMicrotask(()=>this._applyCalculatedConnectableSides(e,n))}_applyCalculatedConnectableSides(e,n){for(let{connector:o}of e)Bp(o.userFConnectableSide)&&(o.fConnectableSide=this._calculateByConnectedPositions(o,n))}_calculateByConnectedPositions(e,n){return this._mediator.execute(new ko(e,n))}static \u0275fac=function(n){return new(n||cd)};static \u0275prov=y({token:cd,factory:cd.\u0275fac})};return t=E([D(Kp)],t),t})(),Do=class{connectors;static fToken=Symbol("MarkConnectableConnectorsRequest");constructor(i){this.connectors=i}},ht={DRAG_AND_DROP:{DRAGGING:"f-dragging",CONNECTIONS_DRAGGING:"f-connections-dragging"},GROUPING:{OVER_BOUNDARY:"f-grouping-over-boundary",DROP_ACTIVE:"f-grouping-drop-active"},CONNECTOR:{OUTPUT_CONNECTED:"f-node-output-connected",OUTPUT_NOT_CONNECTABLE:"f-node-output-not-connectable",INPUT_CONNECTED:"f-node-input-connected",INPUT_NOT_CONNECTABLE:"f-node-input-not-connectable",CONNECTABLE:"f-connector-connectable"}},K9=(()=>{let t=class dd{_store=p(L);handle({connectors:e}){this._store.flowHost.classList.add(ht.DRAG_AND_DROP.CONNECTIONS_DRAGGING),e.forEach(n=>this._markConnector(n))}_markConnector({hostElement:e}){e.classList.add(ht.CONNECTOR.CONNECTABLE)}static \u0275fac=function(n){return new(n||dd)};static \u0275prov=y({token:dd,factory:dd.\u0275fac})};return t=E([D(Do)],t),t})(),Qr=class{instance;static fToken=Symbol("RemoveConnectorFromStoreRequest");constructor(i){this.instance=i}},Y9=(()=>{let t=class ud{_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 wr(e.fId(),e.kind))}static \u0275fac=function(n){return new(n||ud)};static \u0275prov=y({token:ud,factory:ud.\u0275fac})};return t=E([D(Qr)],t),t})(),Po=class{connectors;static fToken=Symbol("UnmarkConnectableConnectorsRequest");constructor(i){this.connectors=i}},X9=(()=>{let t=class pd{_store=p(L);handle({connectors:e}){this._store.flowHost.classList.remove(ht.DRAG_AND_DROP.CONNECTIONS_DRAGGING),e.forEach(n=>this._unmarkConnector(n))}_unmarkConnector({hostElement:e}){e.classList.remove(ht.CONNECTOR.CONNECTABLE)}static \u0275fac=function(n){return new(n||pd)};static \u0275prov=y({token:pd,factory:pd.\u0275fac})};return t=E([D(Po)],t),t})(),Z9=[h9,Y9,f9,m9,W9,$9,_9,K9,X9],Yp=class{instance;static fToken=Symbol("AddFlowToStoreRequest");constructor(i){this.instance=i}},Bi=(function(t){return t.TOP_BOTTOM="TOP_BOTTOM",t.BOTTOM_TOP="BOTTOM_TOP",t.LEFT_RIGHT="LEFT_RIGHT",t.RIGHT_LEFT="RIGHT_LEFT",t})(Bi||{}),Qn=(function(t){return t.MANUAL="manual",t.AUTO="auto",t})(Qn||{});function Q9(t){let i=[...t.nodes.map(vy),...t.groups.map(vy)],e=new Set(t.nodes.map(s=>s.id)),n=new Set(t.groups.map(s=>s.id)),o=new Map,r=new Map;for(let s of[...t.nodes,...t.groups]){for(let c of s.fOutputs)o.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=o.get(c.fOutputId),f=r.get(c.fInputId);return!u||!f||s.push({source:u,target:f}),s},[]);return{nodes:i,connections:a,nodeIds:e,groupIds:n}}function vy(t){return{id:t.id,size:t.measuredSize?me({},t.measuredSize):t.size?me({},t.size):void 0}}var J9=1,Sh=(()=>{class t{_destroyRef=p(bt);_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 o=e.fId();this.unregisterFlow(o);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(o)),n.connectionsChanges$.listen(()=>this._handleConnectionsChanges(o))),this._flows.set(o,r),this._engine?.getMode()===Qn.AUTO&&this._scheduleRelayout(o)}unregisterFlow(e){let n=this._flows.get(e);n&&(n.unsubs.forEach(o=>o()),this._clearScheduledWork(n),this._flows.delete(e))}handleModeChanged(e){if(e===Qn.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,o]of this._flows.entries())await this._relayoutRegisteredFlow(n,o)}}_handleNodesChanges(e){let n=this._flows.get(e);if(!n||n.isApplying)return;let o=this._buildNodeSignature(n.store);o!==n.nodeSignature&&(n.nodeSignature=o,this._scheduleRelayout(e))}_handleConnectionsChanges(e){let n=this._flows.get(e);if(!n||n.isApplying)return;let o=this._buildConnectionSignature(n.store);o!==n.connectionSignature&&(n.connectionSignature=o,this._scheduleRelayout(e))}_scheduleRelayout(e){let n=this._flows.get(e);!n||!this._engine||this._engine.getMode()!==Qn.AUTO||(n.timeoutId!==null&&clearTimeout(n.timeoutId),this._cancelAnimationFrames(n),n.timeoutId=setTimeout(()=>{n.timeoutId=null,this._runAfterNextPaint(n,()=>{this._relayoutFlowIfReady(e)})},J9))}async _relayoutFlowIfReady(e){let n=this._flows.get(e);if(!(!n||!this._engine||this._engine.getMode()!==Qn.AUTO)){if(n.store.hasPendingProgressiveRender){this._scheduleRelayout(e);return}await this._relayoutRegisteredFlow(e,n)}}async _relayoutRegisteredFlow(e,n){if(!this._engine)return;let o=Q9(n.flow.getState({measuredSize:!0})),r=++n.runId,a=await this._engine.calculate(o.nodes,o.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,o.nodeIds,o.groupIds)}finally{queueMicrotask(()=>{let u=this._flows.get(e);u&&(u.isApplying=!1)})}}}_emitWriteback(e,n,o,r){let a=this._engine?.getWriteback();a&&a({flowId:e,nodes:n.filter(s=>o.has(s.id)),groups:n.filter(s=>r.has(s.id))})}_applyPositions(e,n){return n.filter(o=>{let r=e.nodes.get(o.id);return!r||H.isEqual(r._position,o.position)?!1:(r.position.set(me({},o.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})(),oC=new ve("F_LAYOUT_OPTIONS");function rC(t,i){return t.reduce((e,n)=>{let o=i.get(n.id);return o&&e.push({id:n.id,position:o}),e},[])}var eV=new ve("F_LAYOUT"),Xp=class{_controller=p(Sh);_config=p(oC,{optional:!0})??{};_interactiveOptions;_mode;_writeback;_defaultOptions;interactiveOptions;constructor(i){this._mode=this._config.mode??Qn.MANUAL,this._writeback=this._config.writeback??null,this._defaultOptions=this.mergeOptions(i,this._config.options),this._interactiveOptions=K(this.mergeOptions(this._defaultOptions,{})),this.interactiveOptions=S(()=>this.mergeOptions(this._interactiveOptions(),{})),this._controller.attachEngine(this)}setMode(i){this._mode=i,this._controller.handleModeChanged(i)}getMode(){return this._mode}setWriteback(i){this._writeback=i}getWriteback(){return this._writeback}setInteractiveOptions(i){this._interactiveOptions.set(this.mergeOptions(this._interactiveOptions(),i))}relayout(i){return this._controller.relayout(i)}getProviderConfig(){return me({},this._config)}resolveLayoutOptions(i){let e=me({},i??{});return delete e.flowId,delete e.mode,this.mergeOptions(this._interactiveOptions(),e)}};function aC(t,i){return[Sh,t,{provide:eV,useExisting:t},{provide:oC,useValue:i??{}}]}var tV=(()=>{let t=class hd{_store=p(L);_layoutController=p(Sh,{optional:!0});handle({instance:e}){this._store.fFlow=e,this._layoutController?.registerFlow(e,this._store)}static \u0275fac=function(n){return new(n||hd)};static \u0275prov=y({token:hd,factory:hd.\u0275fac})};return t=E([D(Yp)],t),t})(),Zp=class{static fToken=Symbol("GetFlowRequest")},nV=(()=>{let t=class fd{_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||fd)};static \u0275prov=y({token:fd,factory:fd.\u0275fac})};return t=E([D(Zp)],t),t})(),Qp=class{static fToken=Symbol("CalculateConnectionsStateRequest")},iV=(()=>{let t=class md{_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||md)};static \u0275prov=y({token:md,factory:md.\u0275fac})};return t=E([D(Qp)],t),t})(),Jr=class{component;measuredSize;static fToken=Symbol("CalculateNodesStateRequest");constructor(i,e=!1){this.component=i,this.measuredSize=e}},oV=(()=>{let t=class _d{_store=p(L);_mediator=p(V);handle({component:e,measuredSize:n}){return this._store.nodes.getAll().filter(o=>o instanceof e).map(o=>{let r=n?this._mediator.execute(new it(o.hostElement)):null;return{id:o.fId(),parentId:o.fParentId()??void 0,position:me({},o._position),size:o._size?me({},o._size):void 0,measuredSize:r?{width:r.width,height:r.height}:void 0,rotate:o._rotate,fOutputs:this._getOutputs(o.hostElement),fInputs:this._getInputs(o.hostElement),isSelected:o.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||_d)};static \u0275prov=y({token:_d,factory:_d.\u0275fac})};return t=E([D(Jr)],t),t})(),Jp=class{measuredSize;static fToken=Symbol("CalculateFlowStateRequest");constructor(i=!1){this.measuredSize=i}},rV=(()=>{let t=class gd{_mediator=p(V);_store=p(L);get _canvas(){return this._store.fCanvas}get _transform(){return this._canvas.transform}get _canvasPosition(){return H.sum(this._transform.position,this._transform.scaledPosition)}handle({measuredSize:e}){return{position:this._canvasPosition,scale:this._canvas.transform.scale,nodes:this._mediator.execute(new Jr(Th,e)),groups:this._mediator.execute(new Jr(Um,e)),connections:this._mediator.execute(new Qp)}}static \u0275fac=function(n){return new(n||gd)};static \u0275prov=y({token:gd,factory:gd.\u0275fac})};return t=E([D(Jp)],t),t})(),aV=[rV,oV,iV],eh=class{instance;static fToken=Symbol("RemoveFlowFromStoreRequest");constructor(i){this.instance=i}},sV=(()=>{let t=class vd{_store=p(L);_layoutController=p(Sh,{optional:!0});handle({instance:e}){this._layoutController?.unregisterFlow(e.fId()),this._store.fFlow=void 0}static \u0275fac=function(n){return new(n||vd)};static \u0275prov=y({token:vd,factory:vd.\u0275fac})};return t=E([D(eh)],t),t})(),kh=(()=>{class t{isNodesRendered=!1;isFullRendered=!1;static \u0275fac=function(n){return new(n||t)};static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),th=class{static fToken=Symbol("NotifyNodesRenderedRequest")},k_=new ve("F_FLOW"),C_=class{},lV=(()=>{let t=class bd{_state=p(kh);_fFlow=p(k_);handle(e){this._state.isNodesRendered||(this._state.isNodesRendered=!0,this._fFlow.fNodesRendered.emit(this._fFlow.fId()))}static \u0275fac=function(n){return new(n||bd)};static \u0275prov=y({token:bd,factory:bd.\u0275fac})};return t=E([D(th)],t),t})(),nh=class{static fToken=Symbol("NotifyFullRenderedRequest")},cV=(()=>{let t=class yd{_state=p(kh);_fFlow=p(k_);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||yd)};static \u0275prov=y({token:yd,factory:yd.\u0275fac})};return t=E([D(nh)],t),t})(),ea=class{targetConnectionsRevision;targetNodesRevision;callback;destroyRef;static fToken=Symbol("WaitForConnectionsRenderedRequest");constructor(i,e,n,o){this.targetConnectionsRevision=i,this.targetNodesRevision=e,this.callback=n,this.destroyRef=o}},dV=(()=>{let t=class Cd{_store=p(L);handle({targetConnectionsRevision:e,targetNodesRevision:n,callback:o,destroyRef:r}){if(this._store.connectionsRenderedRevision>=e&&this._store.connectionsRenderedNodesRevision>=n){o();return}let a=this._store.connectionsRenderedChanges$.listen(()=>{this._store.connectionsRenderedRevision<e||this._store.connectionsRenderedNodesRevision<n||(a(),o())});r.onDestroy(a)}static \u0275fac=function(n){return new(n||Cd)};static \u0275prov=y({token:Cd,factory:Cd.\u0275fac})};return t=E([D(ea)],t),t})(),ih=class{static fToken=Symbol("ResetRenderLifecycleRequest")},uV=(()=>{let t=class xd{_state=p(kh);handle(e){this._state.isNodesRendered=!1,this._state.isFullRendered=!1}static \u0275fac=function(n){return new(n||xd)};static \u0275prov=y({token:xd,factory:xd.\u0275fac})};return t=E([D(ih)],t),t})(),oh=class{destroyRef;static fToken=Symbol("QueueConnectionRedrawRequest");constructor(i){this.destroyRef=i}},sC=(()=>{class t{isWaitingForViewportAnimation=!1;pendingRedraw=!1;static \u0275fac=function(n){return new(n||t)};static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),pV=(()=>{let t=class wd{_state=p(sC);_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 o=this._state.pendingRedraw;n(),this._state.isWaitingForViewportAnimation=!1,this._state.pendingRedraw=!1,o&&this._mediator.execute(new Er)});e.destroyRef.onDestroy(n)}static \u0275fac=function(n){return new(n||wd)};static \u0275prov=y({token:wd,factory:wd.\u0275fac})};return t=E([D(oh)],t),t})(),hV=[tV,nV,...aV,sV,kh,lV,cV,dV,uV,sC,pV],rh=class{static fToken=Symbol("ClearSelectionRequest")},fV=(()=>{let t=class Td{_dragContext=p(fe);handle(e){this._dragContext.selectedItems.forEach(n=>n.unmarkAsSelected()),this._dragContext.selectedItems=[],this._dragContext.isSelectedChanged=!0}static \u0275fac=function(n){return new(n||Td)};static \u0275prov=y({token:Td,factory:Td.\u0275fac})};return t=E([D(rh)],t),t})(),ah=class{static fToken=Symbol("CalculateSelectableItemsRequest")},mV=(()=>{let t=class Sd{_mediator=p(V);_store=p(L);_dragContext=p(fe);get _nodes(){return this._store.nodes.getAll()}get _connections(){return this._store.connections.getAll()}handle(){return[...this._nodeRects(),...this._connectionRects()].filter(e=>!this._dragContext.selectedItems.includes(e.element))}_nodeRects(){return this._nodes.filter(e=>!e.fSelectionDisabled()).map(e=>({element:e,fRect:this._mediator.execute(new it(e.hostElement))}))}_connectionRects(){return this._connections.filter(e=>!e.fSelectionDisabled()).map(e=>({element:e,fRect:this._mediator.execute(new it(e.boundingElement))}))}static \u0275fac=function(n){return new(n||Sd)};static \u0275prov=y({token:Sd,factory:Sd.\u0275fac})};return t=E([D(ah)],t),t})(),ta=class{static fToken=Symbol("GetCurrentSelectionRequest")},_V=(()=>{let t=class kd{_dragContext=p(fe);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||kd)};static \u0275prov=y({token:kd,factory:kd.\u0275fac})};return t=E([D(ta)],t),t})(),sh=class{nodes;connections;isSelectedChanged;static fToken=Symbol("SelectRequest");constructor(i,e,n=!0){this.nodes=i,this.connections=e,this.isSelectedChanged=n}},gV=(()=>{let t=class Id{_dragContext=p(fe);_store=p(L);handle(e){this._dragContext.selectedItems.forEach(n=>{n.unmarkAsSelected()}),this._dragContext.selectedItems=[],e.nodes.forEach(n=>{let o=this._store.nodes.get(n);o&&(o.markAsSelected(),this._dragContext.selectedItems.push(o))}),e.connections.forEach(n=>{let o=this._store.connections.get(n);o&&(o.markAsSelected(),this._dragContext.selectedItems.push(o))}),this._dragContext.isSelectedChanged=e.isSelectedChanged}static \u0275fac=function(n){return new(n||Id)};static \u0275prov=y({token:Id,factory:Id.\u0275fac})};return t=E([D(sh)],t),t})(),lh=class{static fToken=Symbol("SelectAllRequest")},vV=(()=>{let t=class Md{_dragSession=p(fe);_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||Md)};static \u0275prov=y({token:Md,factory:Md.\u0275fac})};return t=E([D(lh)],t),t})(),Ro=class{nodeOrGroup;static fToken=Symbol("SelectAndUpdateNodeLayerRequest");constructor(i){this.nodeOrGroup=i}},ch=class{fItemsContainer;allElements;elementsThatShouldBeInFront;targetIndex;static fToken=Symbol("MoveFrontElementsBeforeTargetElementRequest");constructor(i,e,n,o){this.fItemsContainer=i,this.allElements=e,this.elementsThatShouldBeInFront=n,this.targetIndex=o}},bV=(()=>{let t=class Ed{handle(e){let n=[];for(let o=e.targetIndex+1;o<e.allElements.length;o++){let r=e.allElements[o];e.elementsThatShouldBeInFront.includes(r)||n.push(r)}n.forEach(o=>{e.fItemsContainer.removeChild(o),e.fItemsContainer.insertBefore(o,e.allElements[e.targetIndex])})}static \u0275fac=function(n){return new(n||Ed)};static \u0275prov=y({token:Ed,factory:Ed.\u0275fac})};return t=E([D(ch)],t),t})(),Ai=class{item;itemContainer;static fToken=Symbol("UpdateItemAndChildrenLayersRequest");constructor(i,e){this.item=i,this.itemContainer=e}},Oo=class{nodeOrGroupId;static fToken=Symbol("GetDeepChildrenNodesAndGroupsRequest");constructor(i){this.nodeOrGroupId=i}},yV=(()=>{let t=class Dd{_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 o=this._store.nodes.getAll().filter(r=>r.fParentId()===e);return o.reduce((r,a)=>r.concat(this._getChildrenNodes(a.fId(),n)),o)}static \u0275fac=function(n){return new(n||Dd)};static \u0275prov=y({token:Dd,factory:Dd.\u0275fac})};return t=E([D(Oo)],t),t})(),CV=(()=>{let t=class Pd{_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()),o=this._getChildrenGroups(n);this._updateLayers(this._groupsContainer,e.item.hostElement,o);let r=this._getChildrenNodes(n);r.length&&this._updateLayers(this._nodesContainer,r[0],r)}_handleNode(e){let n=this._getChildrenNodesAndGroups(e.item.fId()),o=this._getChildrenNodes(n);this._updateLayers(e.itemContainer,e.item.hostElement,o)}_handleConnection(e){this._updateLayers(e.itemContainer,e.item.hostElement,[])}_updateLayers(e,n,o){let r=Array.from(e.children),a=r.findIndex(s=>s===n);this._isAnythingNeedToBeMoved(r,a,o)&&this._mediator.execute(new ch(e,r,o,a))}_isAnythingNeedToBeMoved(e,n,o){for(let r=n+1;r<e.length;r++)if(!o.includes(e[r]))return!0;return!1}_getChildrenGroups(e){let n=Array.from(this._groupsContainer.children);return e.filter(o=>this._groupsContainer.contains(o)).sort((o,r)=>n.indexOf(o)-n.indexOf(r))}_getChildrenNodes(e){let n=Array.from(this._nodesContainer.children);return e.filter(o=>this._nodesContainer.contains(o)).sort((o,r)=>n.indexOf(o)-n.indexOf(r))}_getChildrenNodesAndGroups(e){return this._mediator.execute(new Oo(e)).map(n=>n.hostElement)}static \u0275fac=function(n){return new(n||Pd)};static \u0275prov=y({token:Pd,factory:Pd.\u0275fac})};return t=E([D(Ai)],t),t})(),xV=(()=>{let t=class Rd{_dragSession=p(fe);_mediator=p(V);handle({nodeOrGroup:e}){this._selectNodeIfNotSelected(e),this._mediator.execute(new Ai(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||Rd)};static \u0275prov=y({token:Rd,factory:Rd.\u0275fac})};return t=E([D(Ro)],t),t})(),wV=[fV,mV,_V,gV,vV,xV],dh=class{static fToken=Symbol("ResetZoomRequest")},TV=(()=>{let t=class Od{_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||Od)};static \u0275prov=y({token:Od,factory:Od.\u0275fac})};return t=E([D(dh)],t),t})(),uh=class{position;step;direction;animate;static fToken=Symbol("SetZoomRequest");constructor(i,e,n,o=!1){this.position=i,this.step=e,this.direction=n,this.animate=o}},SV=new Set(["drag-node","drag-external-item","resize-node","rotate-node","create-connection","reassign-connection","drag-connection-waypoint","assign-to-container"]),kV=new Set(["drag-canvas","selection-area"]),IV=(()=>{let t=class Fd{_mediator=p(V);_store=p(L);_dragContext=p(fe,{optional:!0});get _flowHost(){return this._store.flowHost}get _canvas(){return this._store.fCanvas}get _zoomComponent(){return this._store.instances.get(Ke.ZOOM)}get _isDragStarted(){return this._mediator.execute(new li)}handle(e){if(!this._zoomComponent)return;let n=this._canvas.transform.scale,o=this._clamp(n+e.step*e.direction);if(o===n)return;let r=this._castPositionToFlow(e.position);if(this._isDragStarted){let a=this._getDragZoomMode();if(a==="blocked")return;a==="rebase"&&this._rebaseDragContext(r,o)}this._canvas.setScale(o,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 he.fromPoint(e).elementTransform(this._flowHost)}_getDragZoomMode(){if(this._dragContext?.isEmpty())return"blocked";let e=!1;for(let n of this._dragContext?.draggableItems??[]){let o=n.getEvent().kind;if(SV.has(o)){e=!0;continue}if(!kV.has(o))return"blocked"}return e?"rebase":"direct"}_rebaseDragContext(e,n){if(!this._dragContext)return;let o=this._dragContext.onPointerDownScale;if(!o||o===n){this._dragContext.onPointerDownScale=n;return}let r=1/n-1/o;this._dragContext.onPointerDownPosition=he.fromPoint(this._dragContext.onPointerDownPosition).add(he.fromPoint(e).mult(r)),this._dragContext.onPointerDownScale=n}static \u0275fac=function(n){return new(n||Fd)};static \u0275prov=y({token:Fd,factory:Fd.\u0275fac})};return t=E([D(uh)],t),t})(),MV=[TV,IV],ph=class{static fToken=Symbol("MinimapDrawNodesRequest")},EV=(()=>{let t=class Nd{_browser=p(at);_store=p(L);handle(e){let n=this._store.fFlow,o=this._store.fCanvas;return!n||!o?[]:this._store.nodes.getAll().map(a=>this._renderNode(a,n,o))}_renderNode(e,n,o){let r=bo("rect",this._browser);Zf(this._nodeRect(e,n,o),r);let a=e instanceof Th;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,o){let r=ne.elementTransform(ne.fromElement(e.hostElement),n.hostElement);return ne.div(r,o.transform.scale)}_minimapClasses(e){let n=e.fMinimapClass();return Array.isArray(n)?n:[n]}static \u0275fac=function(n){return new(n||Nd)};static \u0275prov=y({token:Nd,factory:Nd.\u0275fac})};return t=E([D(ph)],t),t})(),hh=class{svg;minSize;static fToken=Symbol("MinimapCalculateViewportRequest");constructor(i,e){this.svg=i,this.minSize=e}},DV=(()=>{let t=class Ad{_mediator=p(V);_store=p(L);handle({svg:e,minSize:n}){let o=this._store.fFlow,r=this._store.fCanvas;if(!o||!r)return{scale:1,viewBox:ne.initialize(0,0,0,0)};let a=this._contentRectInMinimapSpace(o,r,n),s=this._minimapRectInFlowSpace(e,o),c=this._viewportScale(a,s),u=this._viewportViewBox(a,s,c);return{scale:c,viewBox:u}}_contentRectInMinimapSpace(e,n,o){let r=this._nodesBoundingBox(),a=ne.elementTransform(r,e.hostElement),s=ne.div(a,n.transform.scale);return Vb(s,o)}_nodesBoundingBox(){return this._mediator.execute(new Mo)??ne.initialize(0,0,0,0)}_minimapRectInFlowSpace(e,n){return ne.elementTransform(ne.fromElement(e),n.hostElement)}_viewportScale(e,n){let o=n.width||1,r=n.height||1;return Math.max(e.width/o,e.height/r)}_viewportViewBox(e,n,o){let r=this._viewportSize(n,o),a=e.x-(r.width-e.width)/2,s=e.y-(r.height-e.height)/2;return ne.initialize(a,s,r.width,r.height)}_viewportSize(e,n){return Tt.initialize(e.width*n||0,e.height*n||0)}static \u0275fac=function(n){return new(n||Ad)};static \u0275prov=y({token:Ad,factory:Ad.\u0275fac})};return t=E([D(hh)],t),t})(),fh=class{static fToken=Symbol("MinimapCalculateViewRectRequest")},PV=(()=>{let t=class Ld{_store=p(L);handle(e){let n=this._store.fFlow,o=this._store.fCanvas;if(!n||!o)return ne.initialize();let r=ne.div(ne.fromElement(n.hostElement),o.transform.scale);return r.x=0,r.y=0,r}static \u0275fac=function(n){return new(n||Ld)};static \u0275prov=y({token:Ld,factory:Ld.\u0275fac})};return t=E([D(fh)],t),t})(),mh=class{element;scale;viewBox;constructor(i,e=1,n=ne.initialize(0,0,0,0)){this.element=i,this.scale=e,this.viewBox=n}},RV=[EV,DV,PV],_h=class{position;static fToken=Symbol("GetNormalizedPointRequest");constructor(i){this.position=i}},OV=(()=>{let t=class Bd{_store=p(L);handle({position:e}){return No(e,this._store.flowHost,this._store.transform)}static \u0275fac=function(n){return new(n||Bd)};static \u0275prov=y({token:Bd,factory:Bd.\u0275fac})};return t=E([D(_h)],t),t})(),gh=class{static fToken=Symbol("SortNodeLayersRequest")},FV=(()=>{let t=class Vd{_store=p(L);_mediator=p(V);_browser=p(at);get _canvas(){return this._store.fCanvas}get _groupsContainer(){return this._canvas.fGroupsContainer().nativeElement}get _nodesContainer(){return this._canvas.fNodesContainer().nativeElement}get _fNodeElements(){return Array.from(this._nodesContainer.children)}handle(e){this._getGroups().forEach(n=>{this._moveChildrenNodes(this._getSortedChildrenNodes(n))})}_getGroups(){return this._store.nodes.getAll().filter(e=>this._groupsContainer.contains(e.hostElement))}_getSortedChildrenNodes(e){let n=this._fNodeElements;return this._getChildrenNodes(e.fId()).sort((o,r)=>n.indexOf(o)-n.indexOf(r))}_getChildrenNodes(e){return this._mediator.execute(new Oo(e)).filter(n=>this._nodesContainer.contains(n.hostElement)).map(n=>n.hostElement)}_moveChildrenNodes(e){let n=this._browser.document.createDocumentFragment();e.forEach(o=>{n.appendChild(o)}),this._nodesContainer.appendChild(n)}static \u0275fac=function(n){return new(n||Vd)};static \u0275prov=y({token:Vd,factory:Vd.\u0275fac})};return t=E([D(gh)],t),t})(),na=class{itemsContainer;static fToken=Symbol("SortItemsByParentRequest");constructor(i){this.itemsContainer=i}},NV=(()=>{let t=class zd{_store=p(L);_browser=p(at);handle({itemsContainer:e}){let n=Array.from(e.children);if(n.length<2)return;let o=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,o,c,a,s);u.length&&this._moveBeforeNextSibling(e,u,c.hostElement.nextElementSibling)}}_buildPositions(e){let n=new Map;for(let o=0;o<e.length;o++)n.set(e[o],o);return n}_getSortedChildrenBeforeParent(e,n,o,r,a){let s=n.get(o.hostElement);if(s===void 0)return[];let c=this._getDeepChildren(o.fId(),r,a);if(!c.length)return[];let u=[];for(let f of c){let g=f.hostElement;if(!e.contains(g))continue;let x=n.get(g);x===void 0||x>=s||u.push(g)}return u.sort((f,g)=>(n.get(f)??0)-(n.get(g)??0)),u}_buildChildrenByParentId(e){let n=new Map;for(let o of e){let r=o.fParentId();if(!r)continue;let a=n.get(r)??[];a.push(o),n.set(r,a)}return n}_getDeepChildren(e,n,o){let r=o.get(e);if(r)return r;let a=[],s=[...n.get(e)??[]],c=new Set([e]);for(;s.length;){let u=s.pop();if(!u)continue;let f=u.fId();if(c.has(f))continue;c.add(f),a.push(u);let g=n.get(f);g?.length&&s.push(...g)}return o.set(e,a),a}_moveBeforeNextSibling(e,n,o){let r=this._browser.document.createDocumentFragment();for(let a of n)r.appendChild(a);e.insertBefore(r,o)}static \u0275fac=function(n){return new(n||zd)};static \u0275prov=y({token:zd,factory:zd.\u0275fac})};return t=E([D(na)],t),t})(),vh=class{static fToken=Symbol("SortItemLayersRequest")},AV=(()=>{let t=class Hd{_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(o=>!!o.fParentId())||(this._mediator.execute(new na(this._canvas.fGroupsContainer().nativeElement)),this._mediator.execute(new gh),this._mediator.execute(new na(this._canvas.fNodesContainer().nativeElement)))}static \u0275fac=function(n){return new(n||Hd)};static \u0275prov=y({token:Hd,factory:Hd.\u0275fac})};return t=E([D(vh)],t),t})();function bo(t,i){return i.document.createElementNS("http://www.w3.org/2000/svg",t)}function an(t,i){return i(t)}function mn(t){return!0}function LV(){return/android|iPad|iPhone|iPod/i.test(navigator.userAgent||navigator.vendor||window.opera)}var BV=[...o5,...p9,...WL,...Z9,...R9,...hV,...U9,...wV,...MV,...RV,...g6,yV,v6,x6,OV,AV,NV,FV,CV,bV],VV=0,lC=(()=>{class t{_destroyRef=p(bt);_elementReference=p(Xe);_fBrowser=p(at);_stateChanges=new rn;get hostElement(){return this._elementReference.nativeElement}id=B(`f-pattern-${VV++}`);vColor=B("rgba(0,0,0,0.1)");hColor=B("rgba(0,0,0,0.1)");vSize=B(20,{transform:Me});hSize=B(20,{transform:Me});_transform=Xn.default();_position=H.initialize();_size=Tt.initialize(this.hSize(),this.vSize());_pattern;_vLine;_hLine;constructor(){this._createPattern()}_createPattern(){this._pattern=bo("pattern",this._fBrowser),this._pattern.setAttribute("patternUnits","userSpaceOnUse"),this.hostElement.appendChild(this._pattern),this._vLine=bo("line",this._fBrowser),this._pattern.appendChild(this._vLine),this._hLine=bo("line",this._fBrowser),this._pattern.appendChild(this._hLine)}ngOnInit(){this._listenStateChanges()}_listenStateChanges(){new xn(this._stateChanges).pipe(bh()).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=Tt.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,o,r,a,s){e.setAttribute("stroke",`${n}`),e.setAttribute("x1",`${o}`),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,o){n&2&&O("id",o.id)},inputs:{id:[1,"id"],vColor:[1,"vColor"],hColor:[1,"hColor"],vSize:[1,"vSize"],hSize:[1,"hSize"]},features:[Ee([{provide:cm,useExisting:t}]),Ji],decls:0,vars:0,template:function(n,o){},encapsulation:2,changeDetection:0})}return t})();var zV=new ve("F_BACKGROUND"),HV=(()=>{class t{hostElement=p(Xe).nativeElement;static \u0275fac=function(n){return new(n||t)};static \u0275dir=je({type:t,standalone:!1})}return t})(),cC=(()=>{class t extends HV{_mediator=p(V);fBackgroundPattern=Wa(cm);ngOnInit(){this._mediator.execute(new ni(Ke.BACKGROUND,this))}ngAfterContentInit(){this._mediator.execute(new qd(this.fBackgroundPattern()))}setTransform(e){this.fBackgroundPattern()?.setTransform(e)}ngOnDestroy(){this._mediator.execute(new ii(Ke.BACKGROUND))}static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275cmp=z({type:t,selectors:[["f-background"]],contentQueries:function(n,o,r){n&1&&xf(r,o.fBackgroundPattern,cm,5),n&2&&Vt()},hostAttrs:[1,"f-component","f-background"],features:[Ee([{provide:zV,useExisting:t}]),Q],ngContentSelectors:yL,decls:2,vars:0,template:function(n,o){n&1&&(un(),X(),Z(0,"svg"),Ue(1),ie())},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 x_=class{position;scale;constructor(i,e){this.position=i,this.scale=e}},qV=new ve("F_CANVAS"),GV=(()=>{class t{transform=Xn.default();_fCanvasChange=new rn;destroyRef=p(bt);getPosition(){return this.transform.position}setPosition(e){this.transform.position=e}emitCanvasChangeEvent(){this._fCanvasChange.notify()}subscribeOnCanvasChange(){new xn(this._fCanvasChange).pipe(Gd(this.debounce())).listen(this.destroyRef,()=>{this.fCanvasChange.emit(new x_(H.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})(),ia=(()=>{class t extends GV{_mediator=p(V);_componentsStore=p(L);_elementReference=p(Xe);_injector=p(mt);_flowId;fCanvasChange=qe();position=B(H.initialize(),{transform:H.castToPoint});scale=B(1,{transform:Me});debounceTime=B(0,{transform:Me});debounce=S(()=>this.debounceTime()<0?0:this.debounceTime());get hostElement(){return this._elementReference.nativeElement}fGroupsContainer=nt.required("fGroupsContainer");fNodesContainer=nt.required("fNodesContainer");fConnectionsContainer=nt.required("fConnectionsContainer");get flowId(){return this._flowId||""}ngOnInit(){this._flowId=this._mediator.execute(new Zp).fId(),this._mediator.execute(new Ud(this)),this._positionChange(),this._scaleChange(),super.subscribeOnCanvasChange()}_positionChange(){se(()=>{this._mediator.execute(new Kd(this.transform,this.position()))},{injector:this._injector})}_scaleChange(){se(()=>{this._mediator.execute(new Yd(this.transform,this.scale()))},{injector:this._injector})}redraw(){this._mediator.execute(new Cr(this.transform)),this.hostElement.style.removeProperty("transition"),this.hostElement.style.transform=Xn.toString(this.transform),this._mediator.execute(new ti)}redrawWithAnimation(){this._mediator.execute(new Cr(this.transform)),this.hostElement.style.transition=`transform ${LV()?80:150}ms ease-in-out`,this.hostElement.style.transform=Xn.toString(this.transform),by(this.hostElement,()=>this.redraw())}centerGroupOrNode(e,n=!0){this._afterRedraw(()=>{this._mediator.execute(new $d(e,n))})}fitToScreen(e=H.initialize(),n=!0){this._afterRedraw(()=>{this._mediator.execute(new Wd(e,n))})}resetScaleAndCenter(e=!0){this._afterRedraw(()=>{this._mediator.execute(new Qd(e))})}getScale(){return this.transform.scale||1}setScale(e,n=H.initialize()){this._mediator.execute(new Jd(e,n))}resetScale(){this._mediator.execute(new Zd)}ngOnDestroy(){this._mediator.execute(new Xd)}_afterRedraw(e){this._mediator.execute(new ea(this._componentsStore.connectionsRevision,this._componentsStore.nodesRevision,()=>eo(e,{injector:this._injector}),this.destroyRef))}static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275cmp=z({type:t,selectors:[["f-canvas"]],viewQuery:function(n,o){n&1&&pn(o.fGroupsContainer,CL,5)(o.fNodesContainer,xL,5)(o.fConnectionsContainer,wL,5),n&2&&Vt(3)},hostAttrs:[1,"f-component","f-canvas"],inputs:{position:[1,"position"],scale:[1,"scale"],debounceTime:[1,"debounceTime"]},outputs:{fCanvasChange:"fCanvasChange"},features:[Ee([{provide:qV,useExisting:t}]),Q],ngContentSelectors:SL,decls:12,vars:0,consts:[["fGroupsContainer",""],["fConnectionsContainer",""],["fNodesContainer",""],[1,"f-connections-container"]],template:function(n,o){n&1&&(un(TL),ja(0),Z(1,"div",null,0),Ue(3),ie(),Z(4,"div",3,1),Ue(6,1),Ue(7,2),Ue(8,3),ie(),Z(9,"div",null,2),Ue(11,4),ie(),Ua())},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 jV=0,dC=(()=>{class t extends J5{fId=B(`f-connection-${jV++}`,{alias:"fConnectionId"});fOutputId=B("",{transform:e=>So(e)||""});fInputId=B("",{transform:e=>So(e)||""});fRadius=8;fOffset=12;fBehavior=Jn.FIXED;fType=_o.STRAIGHT;fSelectionDisabled=B(!1,{transform:Y});fReassignableStart=B(!1,{transform:Y});fDraggingDisabled=B(!1,{alias:"fReassignDisabled",transform:Y});fInputSide=B(We.DEFAULT,{transform:e=>mo(e,"fInputSide",We)});fOutputSide=B(We.DEFAULT,{transform:e=>mo(e,"fOutputSide",We)});get boundingElement(){return this.fPath().hostElement}_mediator=p(V);ngOnInit(){this._mediator.execute(new tu(this))}ngOnChanges(){this._mediator.execute(new Mi)}ngOnDestroy(){this._mediator.execute(new ku(this))}static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275cmp=z({type:t,selectors:[["f-connection"]],hostAttrs:[1,"f-component","f-connection"],hostVars:5,hostBindings:function(n,o){n&2&&(O("id",o.fId()),ce("f-connection-selection-disabled",o.fSelectionDisabled())("f-connection-reassign-disabled",o.fDraggingDisabled()))},inputs:{fId:[1,"fConnectionId","fId"],fOutputId:[1,"fOutputId"],fInputId:[1,"fInputId"],fRadius:[2,"fRadius","fRadius",Me],fOffset:[2,"fOffset","fOffset",Me],fBehavior:[2,"fBehavior","fBehavior",e=>mo(e,"fBehavior",Jn)],fType:"fType",fSelectionDisabled:[1,"fSelectionDisabled"],fReassignableStart:[1,"fReassignableStart"],fDraggingDisabled:[1,"fReassignDisabled","fDraggingDisabled"],fInputSide:[1,"fInputSide"],fOutputSide:[1,"fOutputSide"]},exportAs:["fComponent"],standalone:!1,features:[Ee([{provide:yh,useExisting:t}]),Q,Ji],ngContentSelectors:IL,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,o){if(n&1&&(un(kL),X(),h(0,"svg",1),F(1,"defs",null,0),Ue(3),h(4,"g",2),I(5,ML,1,1,":svg:linearGradient",3),F(6,"path",4),h(7,"g"),F(8,"path",5),I(9,EL,1,0,":svg:circle",6),F(10,"circle",7),m()()(),Ue(11,1),Ue(12,2),Ue(13,3),I(14,DL,1,0)),n&2){let r;l(5),M((r=o.fGradient())?5:-1,r),l(),O("d",o.path),l(2),_("useGradient",!!o.fGradient()),O("d",o.path),l(),M(o.fReassignableStart()?9:-1),l(5),M(o.fContents().length?14:-1)}},dependencies:[Sm,Y5,X5,G5,K5],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 UV=new ve("F_MAGNETIC_LINES"),$V=(()=>{class t{hostElement=p(Xe).nativeElement;static \u0275fac=function(n){return new(n||t)};static \u0275dir=je({type:t,standalone:!1})}return t})();var uC=(()=>{class t extends $V{threshold=B(10,{transform:Me,alias:"fAlignThreshold"});_mediator=p(V);ngOnInit(){this._mediator.execute(new ni(Ke.MAGNETIC_LINES,this))}ngOnDestroy(){this._mediator.execute(new ii(Ke.MAGNETIC_LINES))}static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||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:[Ee([{provide:UV,useExisting:t}]),Q],decls:0,vars:0,template:function(n,o){},styles:[PL]})}return t})();var am=(()=>{class t{fMinSize=B(1e3);_mediator=p(V);hostElement=p(Xe).nativeElement;model=new mh(this.hostElement);redraw(){let{scale:e,viewBox:n}=this._mediator.execute(new hh(this.hostElement,this.fMinSize()));this.model=new mh(this.hostElement,e,n),zb(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})(),sm=(()=>{class t{_mediator=p(V);_elementRef=p(Xe);hostElement=this._elementRef.nativeElement;redraw(){this.clear();let e=this._elementRef.nativeElement.ownerDocument.createDocumentFragment();this._mediator.execute(new ph).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})(),lm=(()=>{class t{_mediator=p(V);hostElement=p(Xe).nativeElement;redraw(){Zf(this._mediator.execute(new fh),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})(),WV=new ve("F_MINIMAP_BASE"),KV=(()=>{class t{hostElement=p(Xe).nativeElement;static \u0275fac=function(n){return new(n||t)};static \u0275dir=je({type:t,standalone:!1})}return t})(),pC=(()=>{class t extends KV{_destroyRef=p(bt);_mediator=p(V);_browser=p(at);_store=p(L);_canvas=nt.required(sm);_flow=nt.required(am);_minimapView=nt.required(lm);fMinSize=B(1e3);fNodeRenderLimit=B(1500,{transform:Me});get state(){return this._flow().model}ngOnInit(){this._mediator.execute(new ni(Ke.MINIMAP,this))}ngAfterViewInit(){this._listenTransformChanges()}_listenTransformChanges(){this._mediator.execute(new jd).pipe(bh(),NL()).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 ii(Ke.MINIMAP))}static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275cmp=z({type:t,selectors:[["f-minimap"]],viewQuery:function(n,o){n&1&&pn(o._canvas,sm,5)(o._flow,am,5)(o._minimapView,lm,5),n&2&&Vt(3)},hostAttrs:[1,"f-component","f-minimap"],inputs:{fMinSize:[1,"fMinSize"],fNodeRenderLimit:[1,"fNodeRenderLimit"]},exportAs:["fComponent"],features:[Ee([{provide:WV,useExisting:t}]),Q],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,o){n&1&&(X(),h(0,"svg",0),F(1,"g",1)(2,"rect",2),m()),n&2&&_("fMinSize",o.fMinSize())},dependencies:[am,sm,lm],styles:["[_nghost-%COMP%]{display:block;position:absolute}[_nghost-%COMP%] svg[_ngcontent-%COMP%]{overflow:hidden}"],changeDetection:0})}return t})();var YV=(()=>{class t{hostElement=p(Xe).nativeElement;initialize(){this.hostElement.style.display="none"}static \u0275fac=function(n){return new(n||t)};static \u0275dir=je({type:t,standalone:!1})}return t})(),hC=(()=>{class t extends YV{_mediator=p(V);fTrigger=e=>e.shiftKey;ngOnInit(){this._mediator.execute(new ni(Ke.SELECTION_AREA,this)),super.initialize()}ngOnDestroy(){this._mediator.execute(new ii(Ke.SELECTION_AREA))}static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275cmp=z({type:t,selectors:[["f-selection-area"]],hostAttrs:[1,"f-selection-area","f-component"],inputs:{fTrigger:"fTrigger"},features:[Q],decls:0,vars:0,template:function(n,o){},styles:["[_nghost-%COMP%]{position:absolute}"]})}return t})();var XV=0,ZV=120,oa=(()=>{class t extends C_{_destroyRef=p(bt);_mediator=p(V);_browser=p(at);_componentsStore=p(L);_cache=p(wn);_injector=p(mt);fId=B(`f-flow-${XV++}`,{alias:"fFlowId"});fCache=B(!1,{transform:Y});hostElement=p(Xe).nativeElement;fNodesRendered=qe();fFullRendered=qe();fLoaded=qe();ngOnInit(){this._mediator.execute(new Yp(this)),this._listenCacheChanges()}ngAfterContentInit(){this._browser.isBrowser()&&(this._listenNodesChanges(),this._listenConnectionsChanges())}_listenCacheChanges(){se(()=>{this._cache.enabled=this.fCache()},{injector:this._injector})}_listenNodesChanges(){new xn(this._componentsStore.nodesChanges$,this._componentsStore.progressiveRenderChanges$).pipe(bh(),Gd(ZV),FL()).listen(this._destroyRef,()=>{this._mediator.execute(new li)||this._componentsStore.hasPendingProgressiveRender||(this._mediator.execute(new vh),this._mediator.execute(new th),this._mediator.execute(new ea(this._componentsStore.connectionsRevision+1,this._componentsStore.nodesRevision,()=>this._mediator.execute(new nh),this._destroyRef)),this._mediator.execute(new Mi))})}_listenConnectionsChanges(){this._mediator.execute(new go).listen(this._destroyRef,()=>{if(!this._mediator.execute(new li)){if(this._componentsStore.isViewportAnimating){this._mediator.execute(new oh(this._destroyRef));return}this._mediator.execute(new Er)}})}redraw(){this._mediator.execute(new Mi)}reset(){this._mediator.execute(new ih)}getNodesBoundingBox(){return this._mediator.execute(new Up)}getSelection(){return this._mediator.execute(new ta)}getPositionInFlow(e){return this._mediator.execute(new _h(e))}getState(e){return this._mediator.execute(new Jp(e?.measuredSize??!1))}selectAll(){this._mediator.execute(new go).pipe($b()).listen(this._destroyRef,()=>{this._mediator.execute(new lh)})}select(e,n,o=!0){this._mediator.execute(new go).pipe($b()).listen(this._destroyRef,()=>{this._mediator.execute(new sh(e,n,o))})}clearSelection(){this._mediator.execute(new rh)}ngOnDestroy(){this._mediator.execute(new eh(this))}static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275cmp=z({type:t,selectors:[["f-flow"]],hostAttrs:[1,"f-component","f-flow"],hostVars:1,hostBindings:function(n,o){n&2&&O("id",o.fId())},inputs:{fId:[1,"fFlowId","fId"],fCache:[1,"fCache"]},outputs:{fNodesRendered:"fNodesRendered",fFullRendered:"fFullRendered",fLoaded:"fLoaded"},features:[Ee([V,...GL,Py,Fo,...BV,fe,...c9,{provide:k_,useExisting:t}]),Q],ngContentSelectors:OL,decls:7,vars:0,template:function(n,o){n&1&&(un(RL),ja(0),Ue(1),Ue(2,1),Ue(3,2),Ue(4,3),Ue(5,4),Ue(6,5),Ua())},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 fC=(()=>{class t{fVirtualForOf=[];fVirtualForTrackBy;_vc=p(Ga);_tpl=p(y0);_zone=p(Xt);_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 o=()=>{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(o);return}this._rafId=null,this._finishProgressiveRender()};this._rafId=requestAnimationFrame(o)})}_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:[Ji]})}return t})();var _n=(function(t){return t[t.ZOOM_IN=1]="ZOOM_IN",t[t.ZOOM_OUT=-1]="ZOOM_OUT",t})(_n||{}),QV=new ve("F_ZOOM"),w_=class{},JV=.1,e8=1,t8=.5,n8=60,i8=.5;function o8(t){return Math.abs(t.deltaY)>=Math.abs(t.deltaX)?t.deltaY:t.deltaX}function r8(t,i,e){return a8(t)?l8(i,e):s8(i,e)}function a8(t){return(t.ctrlKey||t.metaKey)&&t.deltaMode===WheelEvent.DOM_DELTA_PIXEL}function s8(t,i){let e=Math.abs(t)/100,n=mC(e,JV,e8);return i*n}function l8(t,i){if(Math.abs(t)<t8)return 0;let e=Math.abs(t)/n8,n=mC(e,0,i8);return i*n}function mC(t,i,e){return Math.max(i,Math.min(e,t))}var ra=(()=>{class t extends w_{_mediator=p(V);_injector=p(mt);_store=p(L);_triggersListener=ze.emptyListener();isEnabled=B(!1,{alias:"fZoom",transform:Y});fWheelTrigger=mn;fDblClickTrigger=mn;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 ni(Ke.ZOOM,this))}ngAfterViewInit(){this._listenZoomEnabledChanges()}_listenZoomEnabledChanges(){se(()=>{this.isEnabled(),Ht(()=>this._listenTriggers())},{injector:this._injector})}_listenTriggers(){this._flowHost&&(this._disposeListeners(),this.isEnabled()&&(this._listen("wheel",this._onWheel,ze.activeListener()),this._listen("dblclick",this._onDoubleClick),this._triggersListener=()=>{this._unlisten("wheel",this._onWheel,ze.activeListener()),this._unlisten("dblclick",this._onDoubleClick)}))}_onWheel=e=>{if(!an(e,this.fWheelTrigger)||(e.preventDefault(),e.target?.closest("[fLockedContext]")))return;let o=o8(e);if(o===0)return;let r=this._normalizeWheelStep(e,o);r!==0&&this.setZoom(H.initialize(e.clientX,e.clientY),r,this._calculateDirection(o),!1)};_normalizeWheelStep(e,n){return r8(e,n,this.step)}_calculateDirection(e){return e>0?_n.ZOOM_OUT:_n.ZOOM_IN}_onDoubleClick=e=>{if(!an(e,this.fDblClickTrigger))return;e.preventDefault();let n=e.target;w7(n)||n?.closest("[fLockedContext]")||this.setZoom(H.initialize(e.clientX,e.clientY),this.dblClickStep,_n.ZOOM_IN,!0)};_getToCenterPosition(e,n){return H.initialize(e?.x||n.gravityCenter.x,e?.y||n.gravityCenter.y)}zoomIn(e){this._onZoomToCenter(_n.ZOOM_IN,e)}zoomOut(e){this._onZoomToCenter(_n.ZOOM_OUT,e)}_onZoomToCenter(e,n){this.setZoom(this._getToCenterPosition(n,ne.fromElement(this._flowHost)),this.step,e,!1)}setZoom(e,n,o,r){this._mediator.execute(new uh(e,n,o,r))}getZoomValue(){return this._canvas.transform.scale||1}reset(){this._mediator.execute(new dh)}_disposeListeners(){this._triggersListener(),this._triggersListener=ze.emptyListener()}ngOnDestroy(){this._disposeListeners(),this._mediator.execute(new ii(Ke.ZOOM))}_listen(e,n,o){this._flowHost.addEventListener(e,n,o)}_unlisten(e,n,o){this._flowHost.removeEventListener(e,n,o)}static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||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",Me],maximum:[2,"fZoomMaximum","maximum",Me],step:[2,"fZoomStep","step",Me],dblClickStep:[2,"fZoomDblClickStep","dblClickStep",Me]},features:[Ee([{provide:QV,useExisting:t}]),Q]})}return t})();var _C=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=Mt({type:t});static \u0275inj=It({imports:[Dt]})}return t})();var rf=t3(hD(),1);var Fa=(function(t){return t.NETWORK_SIMPLEX="network-simplex",t.TIGHT_TREE="tight-tree",t.LONGEST_PATH="longest-path",t})(Fa||{}),woe={direction:Bi.TOP_BOTTOM,nodeGap:48,layerGap:64,algorithm:Fa.NETWORK_SIMPLEX,defaultNodeSize:Tt.initialize(120,72)},e0=(()=>{class t extends Xp{constructor(){super(woe)}mergeOptions(e,n={}){return Bt(me(me({},e),n),{defaultNodeSize:n.defaultNodeSize?Tt.initialize(n.defaultNodeSize.width,n.defaultNodeSize.height):Tt.initialize(e.defaultNodeSize.width,e.defaultNodeSize.height)})}async calculate(e,n,o){let r=this.resolveLayoutOptions(o),a=this._buildGraph(e,n,r),s=new Map;return rf.layout(a),a.nodes().forEach(c=>{let u=a.node(c),f=e.find(x=>x.id===c);if(!u||!f)return;let g=f.size??r.defaultNodeSize;s.set(c,H.initialize(u.x-g.width/2,u.y-g.height/2))}),{nodes:rC(e,s)}}_buildGraph(e,n,o){let r=new rf.graphlib.Graph;return r.setDefaultEdgeLabel(()=>({})),r.setGraph({rankdir:this._mapDirection(o.direction),nodesep:o.nodeGap,ranksep:o.layerGap,ranker:this._mapAlgorithm(o.algorithm)}),e.forEach(a=>{let s=a.size??o.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 Fa.TIGHT_TREE:return"tight-tree";case Fa.LONGEST_PATH:return"longest-path";case Fa.NETWORK_SIMPLEX:default:return"network-simplex"}}_mapDirection(e){switch(e){case Bi.BOTTOM_TOP:return"BT";case Bi.LEFT_RIGHT:return"LR";case Bi.RIGHT_LEFT:return"RL";case Bi.TOP_BOTTOM:default:return"TB"}}static \u0275fac=function(n){return new(n||t)};static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})();var gi={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",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",layoutDirectionLabel:"Layout direction",layoutDirectionTooltip:"Layout direction",layoutDirectionUnavailableTooltip:"Direction does not apply to the Organic layout. Switch to Balanced or Stretched to set it.",layoutSpacingLabel:"Layout spacing",layoutSpacingTooltip:"Layout spacing",layoutSpacingUnavailableTooltip:"Spacing does not apply to the Organic layout. Switch to Balanced or Stretched to set it.",connectionTypeLabel:"Connector style",connectionTypeTooltip:"Connector style"},layout:{algorithm:{options:{"network-simplex":{label:"Balanced"},"longest-path":{label:"Stretched"},force:{label:"Organic"}}},direction:{options:{TOP_BOTTOM:{label:"Top to bottom"},BOTTOM_TOP:{label:"Bottom to top"},LEFT_RIGHT:{label:"Left to right"},RIGHT_LEFT:{label:"Right to left"}}},spacing:{options:{compact:{label:"Compact"},normal:{label:"Normal"},spacious:{label:"Spacious"}}},connection:{options:{segment:{label:"Orthogonal"},straight:{label:"Straight"},bezier:{label:"Bezier"},"adaptive-curve":{label:"Adaptive curve"}}}},panel:{resizeLabel:"Resize panel"},resetLayoutConfirm:{header:"Re-arrange layout?",message:"This replaces every saved node position with a fresh automatic layout.",messageVisible:"This re-arranges the visible nodes and replaces their saved positions.",accept:"Re-arrange",reject:"Cancel"}};var af={graph:{perf:{cache:!0,virtualization:!1},perfHud:!0}};var Toe="adaptive-curve",i0=["segment","straight","bezier","adaptive-curve"],fD="sm.graph.connection-type",mD="sm.graph.layout-algorithm",_D="sm.graph.layout-direction",sf=(()=>{class t{_connectionType=K(t0(fD,Soe,Toe));_layoutAlgorithm=K(t0(mD,Sv,xv));_layoutDirection=K(t0(_D,kv,wv));_layoutSpacing=K(Tv);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),n0(fD,e))}setLayoutAlgorithm(e){this._layoutAlgorithm()!==e&&(this._layoutAlgorithm.set(e),n0(mD,e))}setLayoutDirection(e){this._layoutDirection()!==e&&(this._layoutDirection.set(e),n0(_D,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 t0(t,i,e){let n=null;try{n=localStorage.getItem(t)}catch{return e}return n&&i(n)?n:e}function n0(t,i){try{localStorage.setItem(t,i)}catch{}}function Soe(t){return typeof t=="string"&&i0.includes(t)}var Yo=(()=>{class t{loader=p(pt);bySeverity=S(()=>{let e=this.loader.scan(),n=new Set,o=new Set;if(!e)return{errors:n,warns:o};for(let r of e.issues){let a=r.severity==="error"?n:r.severity==="warn"?o:null;if(a)for(let s of r.nodeIds)a.add(s)}return{errors:n,warns:o}});static \u0275fac=function(n){return new(n||t)};static \u0275prov=y({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function gD(t,i){let e=new Set([i]);for(let n of t.get(i)??[])e.add(n);return e}var koe={TOP_BOTTOM:{output:We.BOTTOM,input:We.TOP},BOTTOM_TOP:{output:We.TOP,input:We.BOTTOM},LEFT_RIGHT:{output:We.RIGHT,input:We.LEFT},RIGHT_LEFT:{output:We.LEFT,input:We.RIGHT}};function vD(t,i){return ls(t)?koe[i]:{input:We.CALCULATE,output:We.CALCULATE}}var bD={body:(t,i)=>`This folder has ${t} ${t===1?"node":"nodes"}; showing ${i} on the map. Pick a sub-folder to narrow it.`};function Ioe(t,i){if(t&1&&(Z(0,"div",0),oe(1,"span",1),Z(2,"p",2),v(3),ie()()),t&2){let e=d();l(3),be(" ",e.state().body," ")}}var yD=(()=>{class t{loader=p(pt);texts=bD;state=S(()=>{let e=this.loader.branch()?.branch;return!e||!e.truncated?{visible:!1,body:""}:{visible:!0,body:this.texts.body(e.total,e.rendered)}});visible=S(()=>this.state().visible);static \u0275fac=function(n){return new(n||t)};static \u0275cmp=z({type:t,selectors:[["sm-branch-cap-banner"]],decls:1,vars:1,consts:[["role","status","data-testid","branch-cap-banner",1,"branch-cap-banner"],["aria-hidden","true",1,"branch-cap-banner__icon","pi","pi-info-circle"],["data-testid","branch-cap-banner-body",1,"branch-cap-banner__body"]],template:function(n,o){n&1&&I(0,Ioe,4,1,"div",0),n&2&&M(o.visible()?0:-1)},styles:["[_nghost-%COMP%]{position:absolute;top:.75rem;left:50%;transform:translate(-50%);z-index:5;max-width:min(90%,40rem);pointer-events:none}.branch-cap-banner[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:.4rem .85rem;border:1px solid var(--p-content-border-color);border-radius:var(--p-border-radius);background:var(--p-content-background);color:var(--p-text-color);box-shadow:var(--p-overlay-popover-shadow);font-size:.8125rem;line-height:1.4}.branch-cap-banner__icon[_ngcontent-%COMP%]{flex:0 0 auto;font-size:1rem;color:var(--p-primary-color)}.branch-cap-banner__body[_ngcontent-%COMP%]{margin:0}"],changeDetection:0})}return t})();var CD=`
1778
+ .p-popover {
1779
+ margin-block-start: dt('popover.gutter');
1780
+ background: dt('popover.background');
1781
+ color: dt('popover.color');
1782
+ border: 1px solid dt('popover.border.color');
1783
+ border-radius: dt('popover.border.radius');
1784
+ box-shadow: dt('popover.shadow');
1785
+ will-change: transform;
1786
+ }
1787
+
1788
+ .p-popover-content {
1789
+ padding: dt('popover.content.padding');
1790
+ }
1791
+
1792
+ .p-popover-flipped {
1793
+ margin-block-start: calc(dt('popover.gutter') * -1);
1794
+ margin-block-end: dt('popover.gutter');
1795
+ }
1796
+
1797
+ .p-popover:after,
1798
+ .p-popover:before {
1799
+ bottom: 100%;
1800
+ left: calc(dt('popover.arrow.offset') + dt('popover.arrow.left'));
1801
+ content: ' ';
1802
+ height: 0;
1803
+ width: 0;
1804
+ position: absolute;
1805
+ pointer-events: none;
1806
+ }
1807
+
1808
+ .p-popover:after {
1809
+ border-width: calc(dt('popover.gutter') - 2px);
1810
+ margin-left: calc(-1 * (dt('popover.gutter') - 2px));
1811
+ border-style: solid;
1812
+ border-color: transparent;
1813
+ border-bottom-color: dt('popover.background');
1814
+ }
1815
+
1816
+ .p-popover:before {
1817
+ border-width: dt('popover.gutter');
1818
+ margin-left: calc(-1 * dt('popover.gutter'));
1819
+ border-style: solid;
1820
+ border-color: transparent;
1821
+ border-bottom-color: dt('popover.border.color');
1822
+ }
1823
+
1824
+ .p-popover-flipped:after,
1825
+ .p-popover-flipped:before {
1826
+ bottom: auto;
1827
+ top: 100%;
1828
+ }
1829
+
1830
+ .p-popover.p-popover-flipped:after {
1831
+ border-bottom-color: transparent;
1832
+ border-top-color: dt('popover.background');
1833
+ }
1834
+
1835
+ .p-popover.p-popover-flipped:before {
1836
+ border-bottom-color: transparent;
1837
+ border-top-color: dt('popover.border.color');
1838
+ }
1839
+ `;var Moe=["content"],Eoe=["*"],Doe=t=>({closeCallback:t});function Poe(t,i){}function Roe(t,i){t&1&&P(0,Poe,0,0,"ng-template")}function Ooe(t,i){if(t&1){let e=$();h(0,"div",1),N("click",function(o){w(e);let r=d();return T(r.onOverlayClick(o))})("pMotionOnEnter",function(o){w(e);let r=d();return T(r.onAnimationStart(o))})("pMotionOnAfterLeave",function(){w(e);let o=d();return T(o.onAnimationEnd())}),h(1,"div",2),N("click",function(o){w(e);let r=d();return T(r.onContentClick(o))})("mousedown",function(o){w(e);let r=d();return T(r.onContentClick(o))}),Ue(2),P(3,Roe,1,0,null,3),m()()}if(t&2){let e=d();zt(e.sx("root")),G(e.cn(e.cx("root"),e.styleClass)),_("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(),G(e.cx("content")),_("pBind",e.ptm("content")),l(2),_("ngTemplateOutlet",e.contentTemplate||e._contentTemplate)("ngTemplateOutletContext",Pe(17,Doe,e.onCloseClick.bind(e)))}}var Foe={root:()=>({position:"absolute"})},Noe={root:"p-popover p-component",content:"p-popover-content"},xD=(()=>{class t extends en{name="popover";style=CD;classes=Noe;inlineStyles=Foe;static \u0275fac=(()=>{let e;return function(o){return(e||(e=U(t)))(o||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})(),wD=new ve("POPOVER_INSTANCE"),o0=(()=>{class t extends On{componentName="Popover";$pcPopover=p(wD,{optional:!0,skipSelf:!0})??void 0;bindDirectiveInstance=p(Ae,{self:!0});onAfterViewChecked(){this.bindDirectiveInstance.setAttrs(this.ptm("host"))}ariaLabel;ariaLabelledBy;dismissable=!0;style;styleClass;appendTo=B("body");autoZIndex=!0;ariaCloseLabel;baseZIndex=0;focusOnShow=!0;showTransitionOptions=".12s cubic-bezier(0, 0, 0.2, 1)";hideTransitionOptions=".1s linear";motionOptions=B(void 0);computedMotionOptions=S(()=>me(me({},this.ptm("motion")),this.motionOptions()));onShow=new re;onHide=new re;$appendTo=S(()=>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(xD);zone=p(Xt);overlayService=p(oo);onAfterContentInit(){this.templates.forEach(e=>{e.getType()==="content"&&(this._contentTemplate=e.template)})}bindDocumentClickListener(){if(qt(this.platformId)&&!this.documentClickListener){let e=F0()?"touchstart":"click",n=this.el?this.el.nativeElement.ownerDocument:this.document;this.documentClickListener=this.renderer.listen(n,e,o=>{this.dismissable&&(!this.container?.contains(o.target)&&this.target!==o.target&&!this.target.contains(o.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"?wi(this.document.body,this.container):wi(this.$appendTo(),this.container))}restoreAppend(){this.container&&this.$appendTo()&&this.$appendTo()!=="self"&&wi(this.el.nativeElement,this.container)}setZIndex(){this.autoZIndex&&yn.set("overlay",this.container,this.baseZIndex+this.config.zIndex.overlay)}align(){if(this.target&&this.container){dr(this.container,this.target,!1);let e=Mf(this.container),n=Mf(this.target),o=this.document.defaultView?.getComputedStyle(this.container).getPropertyValue("border-radius"),r=0;e.left<n.left&&(r=n.left-e.left-parseFloat(o)*2),this.container.style.setProperty(B0("popover.arrow.left").name,`${r}px`),e.top<n.top&&(this.container.setAttribute("data-p-popover-flipped","true"),!this.$unstyled()&&cr(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&&yn.clear(this.container),this.onContainerDestroy(),this.onHide.emit({}),this.render=!1,this.container=null)}focus(){let e=dt(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&&!Ja()&&this.hide()}bindDocumentResizeListener(){if(qt(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(){qt(this.platformId)&&(this.scrollHandler||(this.scrollHandler=new fr(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&&yn.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(o){return(e||(e=U(t)))(o||t)}})();static \u0275cmp=z({type:t,selectors:[["p-popover"]],contentQueries:function(n,o,r){if(n&1&&Hn(r,Moe,4)(r,Pt,4),n&2){let a;ee(a=te())&&(o.contentTemplate=a.first),ee(a=te())&&(o.templates=a)}},hostBindings:function(n,o){n&1&&N("keydown.escape",function(a){return o.onEscapeKeydown(a)},qa)},inputs:{ariaLabel:"ariaLabel",ariaLabelledBy:"ariaLabelledBy",dismissable:[2,"dismissable","dismissable",Y],style:"style",styleClass:"styleClass",appendTo:[1,"appendTo"],autoZIndex:[2,"autoZIndex","autoZIndex",Y],ariaCloseLabel:"ariaCloseLabel",baseZIndex:[2,"baseZIndex","baseZIndex",Me],focusOnShow:[2,"focusOnShow","focusOnShow",Y],showTransitionOptions:"showTransitionOptions",hideTransitionOptions:"hideTransitionOptions",motionOptions:[1,"motionOptions"]},outputs:{onShow:"onShow",onHide:"onHide"},features:[Ee([xD,{provide:wD,useExisting:t},{provide:tn,useExisting:t}]),Zt([Ae]),Q],ngContentSelectors:Eoe,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,o){n&1&&(un(),I(0,Ooe,4,19,"div",0)),n&2&&M(o.render?0:-1)},dependencies:[Dt,hn,io,ot,Ae,uo,sv],encapsulation:2,changeDetection:0})}return t})(),TD=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=Mt({type:t});static \u0275inj=It({imports:[o0,ot,ot]})}return t})();function Loe(t,i){if(t&1){let e=$();h(0,"li",10)(1,"button",14),N("click",function(){let o=w(e).$implicit,r=d(),a=gt(6);return r.setLayoutAlgorithm(o),T(a.hide())}),v(2),m()()}if(t&2){let e=i.$implicit,n=d();l(),ce("is-active",n.layoutAlgorithm()===e),O("aria-checked",n.layoutAlgorithm()===e)("data-testid","graph-layout-algorithm-option-"+e),l(),be(" ",n.layoutAlgorithmLabel(e)," ")}}function Boe(t,i){if(t&1){let e=$();h(0,"button",15),N("click",function(){let o=w(e).$implicit,r=d(),a=gt(11);return r.setLayoutDirection(o),T(a.hide())}),F(1,"i",16),m()}if(t&2){let e=i.$implicit,n=d();ce("is-active",n.layoutDirection()===e),_("pTooltip",n.layoutDirectionLabel(e)),O("aria-checked",n.layoutDirection()===e)("aria-label",n.layoutDirectionLabel(e))("data-testid","graph-layout-direction-option-"+e),l(),G(n.directionItemIcon(e))}}function Voe(t,i){if(t&1){let e=$();h(0,"button",15),N("click",function(){let o=w(e).$implicit,r=d(),a=gt(16);return r.setConnectionType(o),T(a.hide())}),X(),h(1,"svg",17),F(2,"path",7),m()()}if(t&2){let e=i.$implicit,n=d();ce("is-active",n.connectionType()===e),_("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 SD={TOP_BOTTOM:"pi pi-arrow-down",BOTTOM_TOP:"pi pi-arrow-up",LEFT_RIGHT:"pi pi-arrow-right",RIGHT_LEFT:"pi pi-arrow-left"},zoe={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"},kD=(()=>{class t{graphPreferences=p(sf);texts=gi;layoutAlgorithms=yv;layoutDirections=Cv;connectionTypes=i0;layoutAlgorithm=this.graphPreferences.layoutAlgorithm;layoutDirection=this.graphPreferences.layoutDirection;connectionType=this.graphPreferences.connectionType;directionIcon=S(()=>SD[this.layoutDirection()]);directionAvailable=S(()=>ls(this.layoutAlgorithm()));layoutAlgorithmLabel(e){return gi.layout.algorithm.options[e].label}layoutDirectionLabel(e){return gi.layout.direction.options[e].label}connectionTypeLabel(e){return gi.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 SD[e]}connectionTypeItemPath(e){return zoe[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,o){if(n&1){let r=$();h(0,"p-button",3),N("onClick",function(s){w(r);let c=gt(6);return T(c.toggle(s))}),m(),h(1,"p-button",4),N("onClick",function(s){w(r);let c=gt(11);return T(c.toggle(s))}),m(),h(2,"p-button",5),N("onClick",function(s){w(r);let c=gt(16);return T(c.toggle(s))}),X(),h(3,"svg",6),F(4,"path",7),m()(),Va(),h(5,"p-popover",8,0)(7,"ul",9),ue(8,Loe,3,5,"li",10,Ze),m()(),h(10,"p-popover",8,1)(12,"div",11),ue(13,Boe,2,8,"button",12,Ze),m()(),h(15,"p-popover",8,2)(17,"div",13),ue(18,Voe,3,7,"button",12,Ze),m()()}n&2&&(_("ariaLabel",o.texts.toolbar.layoutAlgorithmLabel)("pTooltip",o.texts.toolbar.layoutAlgorithmTooltip)("text",!0)("rounded",!0),l(),_("icon",o.directionIcon())("ariaLabel",o.texts.toolbar.layoutDirectionLabel)("pTooltip",o.directionAvailable()?o.texts.toolbar.layoutDirectionTooltip:o.texts.toolbar.layoutDirectionUnavailableTooltip)("text",!0)("rounded",!0)("disabled",!o.directionAvailable()),l(),_("ariaLabel",o.texts.toolbar.connectionTypeLabel)("pTooltip",o.texts.toolbar.connectionTypeTooltip)("text",!0)("rounded",!0),l(2),O("d",o.connectionTypeItemPath(o.connectionType())),l(4),pe(o.layoutAlgorithms),l(5),pe(o.layoutDirections),l(5),pe(o.connectionTypes))},dependencies:[on,Gt,TD,o0,Le,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 ID={a11y:{toolbarLabel:"Toggle node kinds"},favorites:{label:"Favorites"}};function Hoe(t,i){if(t&1&&oe(0,"i",4),t&2){let e=d();G(e.piClass()),Oe("font-size",e.size(),"px")}}function qoe(t,i){if(t&1&&(X(),Z(0,"svg",1),oe(1,"path"),ie()),t&2){let e=d();O("width",e.size())("height",e.size()),l(),O("d",e.svgPath())}}function Goe(t,i){if(t&1&&(Z(0,"span",4),v(1),ie()),t&2){let e=d();Oe("font-size",e.size(),"px")("line-height",e.size(),"px"),l(),C(e.emoji())}}function joe(t,i){if(t&1&&(Z(0,"span",5),v(1),ie()),t&2){let e=d();Oe("font-size",e.size(),"px")("line-height",e.size(),"px"),l(),C(e.letter())}}var Xo=(()=>{class t{kindRegistry=p(cs);kind=B.required();size=B(18);provider=B(null);resolvedUi=S(()=>this.kindRegistry.lookup(this.kind()));variant=S(()=>{let e=this.resolvedUi();return e?.icon?.kind==="pi"?"pi":e?.icon?.kind==="svg"?"svg":e?.emoji?"emoji":"letter"});piClass=S(()=>{let e=this.resolvedUi()?.icon;return e?.kind==="pi"?`pi ${e.id}`:""});svgPath=S(()=>{let e=this.resolvedUi()?.icon;return e?.kind==="svg"?e.path:""});emoji=S(()=>this.resolvedUi()?.emoji??"");letter=S(()=>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,o){if(n&1&&I(0,Hoe,1,4,"i",0)(1,qoe,2,3,":svg:svg",1)(2,Goe,2,5,"span",2)(3,joe,2,5,"span",3),n&2){let r;M((r=o.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 MD=()=>({class:"kind-palette__content"}),ED=t=>({content:t}),Uoe=(t,i)=>i.kind;function $oe(t,i){if(t&1&&(F(0,"sm-kind-icon",5),h(1,"span"),v(2),m()),t&2){let e=d().$implicit;_("kind",e.kind)("size",16),l(2),C(e.count)}}function Woe(t,i){if(t&1){let e=$();h(0,"p-togglebutton",4),N("ngModelChange",function(){let o=w(e).$implicit,r=d();return T(r.toggle(o.kind))}),P(1,$oe,3,3,"ng-template",null,0,$e),m()}if(t&2){let e=i.$implicit,n=d();_("ngModel",n.isActive(e.kind))("pTooltip",e.label)("ariaLabel",e.label)("styleClass","kind-palette__btn kind-palette__btn--"+e.kind)("pt",Pe(7,ED,Et(6,MD))),O("data-testid","kind-palette-"+e.kind)}}function Koe(t,i){if(t&1&&(F(0,"i",7),h(1,"span"),v(2),m()),t&2){let e=d(2);ce("pi-star-fill",e.favoritesActive())("pi-star",!e.favoritesActive()),l(2),C(e.favoritesCount())}}function Yoe(t,i){if(t&1){let e=$();h(0,"p-togglebutton",6),N("ngModelChange",function(){w(e);let o=d();return T(o.toggleFavoritesOnly())}),P(1,Koe,3,5,"ng-template",null,0,$e),m()}if(t&2){let e=d();_("ngModel",e.favoritesActive())("pTooltip",e.texts.favorites.label)("ariaLabel",e.texts.favorites.label)("pt",Pe(5,ED,Et(4,MD)))}}var DD=(()=>{class t{loader=p(pt);filters=p(nn);kindRegistry=p(cs);issuePaths=p(Yo);texts=ID;entries=S(()=>{let e=this.loader.nodes(),n=new Map;for(let a of e)n.set(a.kind,(n.get(a.kind)??0)+1);let o=new Map,r=this.filters.apply(e,this.issuePaths.bySeverity(),{includeKinds:!1,includeSearch:this.filters.searchAffectsMap()});for(let a of r)o.set(a.kind,(o.get(a.kind)??0)+1);return this.kindRegistry.kinds().map(a=>({kind:a.name,label:a.label,count:o.get(a.name)??0})).filter(a=>(n.get(a.kind)??0)>0)});favoritesCount=S(()=>this.loader.nodes().filter(e=>e.isFavorite===!0).length);showFavorites=S(()=>this.loader.hasAnyFavorites()||this.filters.favoritesOnly());favoritesActive=S(()=>this.filters.favoritesOnly());isActive(e){return this.filters.isKindActive(e)}toggle(e){let n=this.entries().map(o=>o.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,o){n&1&&(h(0,"div",1),ue(1,Woe,3,9,"p-togglebutton",2,Uoe),I(3,Yoe,3,7,"p-togglebutton",3),m()),n&2&&(O("aria-label",o.texts.a11y.toolbarLabel),l(),pe(o.entries()),l(2),M(o.showFavorites()?3:-1))},dependencies:[yt,Rt,Ot,$n,Un,Le,Ve,Xo],styles:["[_nghost-%COMP%]{display:block;pointer-events:auto}.kind-palette[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2px;padding:4px;background:color-mix(in srgb,var(--sm-bg-content) 80%,transparent);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);border:1px solid var(--sm-border);border-radius:var(--sm-radius-xl);box-shadow:var(--sm-shadow-floating)}.kind-palette__btn[_ngcontent-%COMP%]{--p-togglebutton-padding: 0;--p-togglebutton-content-padding: 0 .55rem;--p-togglebutton-border-radius: var(--sm-radius-pill);--p-togglebutton-content-border-radius: var(--sm-radius-pill);--p-togglebutton-gap: .4rem;--p-togglebutton-background: transparent;--p-togglebutton-checked-background: transparent;--p-togglebutton-hover-background: transparent;--p-togglebutton-border-color: transparent;--p-togglebutton-checked-border-color: transparent;--p-togglebutton-content-checked-background: var(--sm-bg-hover);--p-togglebutton-color: var(--p-text-muted-color);--p-togglebutton-hover-color: var(--p-text-color);--p-togglebutton-checked-color: var(--p-text-color);--p-togglebutton-icon-color: var(--p-text-muted-color);--p-togglebutton-icon-hover-color: var(--p-text-color);--p-togglebutton-icon-checked-color: var(--p-text-color);width:56px;height:30px;font-size:.72rem;font-weight:600;font-variant-numeric:tabular-nums}[_nghost-%COMP%] .kind-palette__content{width:100%;height:100%;justify-content:flex-start;display:flex;align-items:center;gap:.4rem}[_nghost-%COMP%] .kind-palette__content>span{flex:1;text-align:right}[_nghost-%COMP%] .kind-palette__btn sm-kind-icon{display:inline-flex;align-items:center;color:var(--p-text-muted-color)}[_nghost-%COMP%] .kind-palette__btn[aria-pressed=true] sm-kind-icon{color:var(--p-text-color)}[_nghost-%COMP%] .kind-palette__btn--skill[aria-pressed=true] sm-kind-icon{color:var(--sm-kind-skill)}[_nghost-%COMP%] .kind-palette__btn--agent[aria-pressed=true] sm-kind-icon{color:var(--sm-kind-agent)}[_nghost-%COMP%] .kind-palette__btn--command[aria-pressed=true] sm-kind-icon{color:var(--sm-kind-command)}[_nghost-%COMP%] .kind-palette__btn--markdown[aria-pressed=true] sm-kind-icon{color:var(--sm-kind-markdown)}[_nghost-%COMP%] .kind-palette__btn--favorites .pi{font-size:.95rem;line-height:1;color:var(--p-text-muted-color)}[_nghost-%COMP%] .kind-palette__btn--favorites:hover .pi{color:var(--p-text-color)}[_nghost-%COMP%] .kind-palette__btn--favorites[aria-pressed=true] .pi{color:var(--p-primary-color)}"],changeDetection:0})}return t})();var En={a11y:{toolbarLabel:"Link kind filters"},kinds:{invokes:"Invokes",references:"References",points:"Points",mentions:"Mentions"},tooltips:{invokes:`Invokes:
1840
+ "/skill-command"`,references:`References:
1841
+ "[link](./link.md)"
1842
+ "@./link.md"`,points:'Points:\n"`references/link.md`" (path in backticks or code blocks)',mentions:`Mention:
1843
+ "@agent"`}};var Xoe=()=>({class:"link-kind-palette__content"}),Zoe=t=>({content:t}),Qoe=(t,i)=>i.kind;function Joe(t,i){if(t&1&&v(0),t&2){let e=d(2).$implicit;be(" ",e.text," ")}}function ere(t,i){if(t&1&&F(0,"i"),t&2){let e=d(2).$implicit;G(e.icon)}}function tre(t,i){if(t&1&&(h(0,"span",4),I(1,Joe,1,1)(2,ere,1,2,"i",5),m()),t&2){let e=d().$implicit;l(),M(e.text?1:e.icon?2:-1)}}function nre(t,i){if(t&1){let e=$();h(0,"p-togglebutton",3),N("ngModelChange",function(){let o=w(e).$implicit,r=d(2);return T(r.toggle(o.kind))}),P(1,tre,3,1,"ng-template",null,0,$e),m()}if(t&2){let e=i.$implicit,n=d(2);_("ngModel",n.isActive(e.kind))("pTooltip",e.tooltip)("ariaLabel",e.label)("styleClass","link-kind-palette__btn link-kind-palette__btn--"+e.kind)("pt",Pe(7,Zoe,Et(6,Xoe))),O("data-testid","link-kind-palette-"+e.kind)}}function ire(t,i){if(t&1&&(h(0,"div",1),ue(1,nre,3,9,"p-togglebutton",2,Qoe),m()),t&2){let e=d();O("aria-label",e.texts.a11y.toolbarLabel),l(),pe(e.entries())}}var PD=[{kind:"invokes",label:En.kinds.invokes,tooltip:En.tooltips.invokes,text:"/"},{kind:"references",label:En.kinds.references,tooltip:En.tooltips.references,icon:"pi pi-link"},{kind:"points",label:En.kinds.points,tooltip:En.tooltips.points,text:"`"},{kind:"mentions",label:En.kinds.mentions,tooltip:En.tooltips.mentions,text:"@"}];for(let t of PD)if(!J0.includes(t.kind))throw new Error(`link-kind-palette: unknown link kind "${t.kind}"`);var RD=(()=>{class t{loader=p(pt);filters=p(nn);texts=En;counts=S(()=>{let e=this.loader.scan(),n=new Map;if(!e)return n;for(let o of e.links)n.set(o.kind,(n.get(o.kind)??0)+1);return n});entries=S(()=>{let e=this.counts(),n=this.filters.selectedLinkKinds(),o=new Set(n);return PD.filter(r=>(e.get(r.kind)??0)>0||o.has(r.kind))});constructor(){se(()=>{let e=this.counts(),n=this.filters.selectedLinkKinds(),o=n.filter(r=>(e.get(r)??0)>0);o.length!==n.length&&this.filters.setLinkKinds(o)})}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,o){n&1&&I(0,ire,3,1,"div",1),n&2&&M(o.entries().length>0?0:-1)},dependencies:[yt,Rt,Ot,$n,Un,Le,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:var(--sm-radius-xl);box-shadow:var(--sm-shadow-floating)}.link-kind-palette__btn[_ngcontent-%COMP%]{--p-togglebutton-padding: 0;--p-togglebutton-content-padding: 0;--p-togglebutton-border-radius: var(--sm-radius-pill);--p-togglebutton-content-border-radius: var(--sm-radius-pill);--p-togglebutton-background: transparent;--p-togglebutton-checked-background: transparent;--p-togglebutton-hover-background: transparent;--p-togglebutton-border-color: transparent;--p-togglebutton-checked-border-color: transparent;--p-togglebutton-content-checked-background: var(--sm-bg-hover);--p-togglebutton-color: var(--p-text-muted-color);--p-togglebutton-hover-color: var(--p-text-color);--p-togglebutton-checked-color: var(--p-text-color);width:100%;height:30px}[_nghost-%COMP%] .link-kind-palette__content{width:100%;height:100%;display:flex;align-items:center;justify-content:center}[_nghost-%COMP%] .link-kind-palette__glyph{font-size:.95rem;line-height:1;font-weight:600;display:inline-flex;align-items:center;justify-content:center}[_nghost-%COMP%] .link-kind-palette__btn--invokes .link-kind-palette__glyph{color:var(--sm-edge-invokes)}[_nghost-%COMP%] .link-kind-palette__btn--invokes[aria-pressed=true] .link-kind-palette__glyph{color:var(--sm-edge-invokes-active)}[_nghost-%COMP%] .link-kind-palette__btn--references .link-kind-palette__glyph{color:var(--sm-edge-references)}[_nghost-%COMP%] .link-kind-palette__btn--references[aria-pressed=true] .link-kind-palette__glyph{color:var(--sm-edge-references-active)}[_nghost-%COMP%] .link-kind-palette__btn--points .link-kind-palette__glyph{color:var(--sm-edge-points)}[_nghost-%COMP%] .link-kind-palette__btn--points[aria-pressed=true] .link-kind-palette__glyph{color:var(--sm-edge-points-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__tooltip{max-width:26rem}[_nghost-%COMP%] .link-kind-palette__tooltip .p-tooltip-text{white-space:pre-line;text-align:left;line-height:1.35}"],changeDetection:0})}return t})();var OD={a11y:{toolbarLabel:"Toggle severity filters"},error:{label:"Errors",tooltip:"Only nodes with errors"},warn:{label:"Warnings",tooltip:"Only nodes with warnings"}};var ND=()=>({class:"severity-palette__content"}),AD=t=>({content:t});function ore(t,i){if(t&1&&(h(0,"span",5),F(1,"i",6),m(),h(2,"span",7),v(3),m()),t&2){let e=d(3);l(3),C(e.errorCount())}}function rre(t,i){if(t&1){let e=$();h(0,"p-togglebutton",4),N("ngModelChange",function(){w(e);let o=d(2);return T(o.toggle("error"))}),P(1,ore,4,1,"ng-template",null,0,$e),m()}if(t&2){let e=d(2);_("ngModel",e.isActive("error"))("pTooltip",e.texts.error.tooltip)("ariaLabel",e.texts.error.label)("pt",Pe(5,AD,Et(4,ND)))}}function are(t,i){if(t&1&&(h(0,"span",5),F(1,"i",9),m(),h(2,"span",7),v(3),m()),t&2){let e=d(3);l(3),C(e.warnCount())}}function sre(t,i){if(t&1){let e=$();h(0,"p-togglebutton",8),N("ngModelChange",function(){w(e);let o=d(2);return T(o.toggle("warn"))}),P(1,are,4,1,"ng-template",null,0,$e),m()}if(t&2){let e=d(2);_("ngModel",e.isActive("warn"))("pTooltip",e.texts.warn.tooltip)("ariaLabel",e.texts.warn.label)("pt",Pe(5,AD,Et(4,ND)))}}function lre(t,i){if(t&1&&(h(0,"div",1),I(1,rre,3,7,"p-togglebutton",2),I(2,sre,3,7,"p-togglebutton",3),m()),t&2){let e=d();O("aria-label",e.texts.a11y.toolbarLabel),l(),M(e.showError()?1:-1),l(),M(e.showWarn()?2:-1)}}var LD=(()=>{class t{loader=p(pt);filters=p(nn);issuePaths=p(Yo);texts=OD;visibleSet=S(()=>{let e=this.filters.apply(this.loader.nodes(),this.issuePaths.bySeverity(),{includeSearch:this.filters.searchAffectsMap()});return new Set(e.map(n=>n.path))});rawErrorCount=S(()=>this.issuePaths.bySeverity().errors.size);rawWarnCount=S(()=>this.issuePaths.bySeverity().warns.size);errorCount=S(()=>FD(this.issuePaths.bySeverity().errors,this.visibleSet()));warnCount=S(()=>FD(this.issuePaths.bySeverity().warns,this.visibleSet()));showError=S(()=>this.rawErrorCount()>0||this.filters.severityErrorActive());showWarn=S(()=>this.rawWarnCount()>0||this.filters.severityWarnActive());hasAny=S(()=>this.showError()||this.showWarn());constructor(){se(()=>{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,o){n&1&&I(0,lre,3,3,"div",1),n&2&&M(o.hasAny()?0:-1)},dependencies:[yt,Rt,Ot,$n,Un,Le,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:var(--sm-radius-xl);box-shadow:var(--sm-shadow-floating)}.severity-palette__btn[_ngcontent-%COMP%]{--p-togglebutton-padding: 0;--p-togglebutton-content-padding: 0 .55rem;--p-togglebutton-border-radius: var(--sm-radius-pill);--p-togglebutton-content-border-radius: var(--sm-radius-pill);--p-togglebutton-gap: .4rem;--p-togglebutton-background: transparent;--p-togglebutton-checked-background: transparent;--p-togglebutton-hover-background: transparent;--p-togglebutton-border-color: transparent;--p-togglebutton-checked-border-color: transparent;--p-togglebutton-color: var(--p-text-muted-color);--p-togglebutton-hover-color: var(--p-text-color);--p-togglebutton-checked-color: var(--p-text-color);--p-togglebutton-icon-color: var(--p-text-muted-color);--p-togglebutton-icon-hover-color: var(--p-text-color);--p-togglebutton-icon-checked-color: var(--p-text-color);width:56px;height:30px;font-size:.72rem;font-weight:600;font-variant-numeric:tabular-nums}.severity-palette__btn--error[_ngcontent-%COMP%]{--p-togglebutton-content-checked-background: color-mix(in srgb, var(--sm-severity-error-bg) 55%, var(--sm-bg-content))}.severity-palette__btn--warn[_ngcontent-%COMP%]{--p-togglebutton-content-checked-background: color-mix(in srgb, var(--sm-severity-warn-bg) 55%, var(--sm-bg-content))}[_nghost-%COMP%] .severity-palette__content{width:100%;height:100%;justify-content:flex-start;display:flex;align-items:center;gap:.4rem}[_nghost-%COMP%] .severity-palette__count{flex:1;text-align:right}[_nghost-%COMP%] .severity-palette__glyph{display:inline-flex;align-items:center;justify-content:center;font-size:.95rem;line-height:1}[_nghost-%COMP%] .severity-palette__btn--error .severity-palette__glyph, [_nghost-%COMP%] .severity-palette__btn--error .severity-palette__count{color:color-mix(in srgb,var(--sm-severity-error) 55%,var(--p-text-muted-color))}[_nghost-%COMP%] .severity-palette__btn--warn .severity-palette__glyph, [_nghost-%COMP%] .severity-palette__btn--warn .severity-palette__count{color:color-mix(in srgb,var(--sm-severity-warn) 55%,var(--p-text-muted-color))}[_nghost-%COMP%] .severity-palette__btn--error:hover .severity-palette__glyph, [_nghost-%COMP%] .severity-palette__btn--error:hover .severity-palette__count{color:color-mix(in srgb,var(--sm-severity-error) 80%,var(--p-text-color))}[_nghost-%COMP%] .severity-palette__btn--warn:hover .severity-palette__glyph, [_nghost-%COMP%] .severity-palette__btn--warn:hover .severity-palette__count{color:color-mix(in srgb,var(--sm-severity-warn) 80%,var(--p-text-color))}[_nghost-%COMP%] .severity-palette__btn--error[aria-pressed=true] .severity-palette__glyph, [_nghost-%COMP%] .severity-palette__btn--error[aria-pressed=true] .severity-palette__count{color:var(--sm-severity-error)}[_nghost-%COMP%] .severity-palette__btn--warn[aria-pressed=true] .severity-palette__glyph, [_nghost-%COMP%] .severity-palette__btn--warn[aria-pressed=true] .severity-palette__count{color:var(--sm-severity-warn)}"],changeDetection:0})}return t})();function FD(t,i){let[e,n]=t.size<=i.size?[t,i]:[i,t],o=0;for(let r of e)n.has(r)&&o++;return o}function BD(t,i){let e=K(null),n=0;return se(()=>{let o=t().trim(),r=++n;e.set(null),o&&i(o).then(a=>{r===n&&e.set(a)}).catch(()=>{r===n&&e.set(null)})}),e.asReadonly()}function Na(t,i){return Pn(Na),BD(t,e=>i.renderInline(e))}function a0(t,i){return Pn(a0),BD(t,e=>i.render(e))}var cre=/^#(?:[0-9a-f]{3}|[0-9a-f]{4}|[0-9a-f]{6}|[0-9a-f]{8})$/i,dre=/^[a-z]+$/i;function lf(t){if(typeof t!="string")return null;let i=t.trim();return i.length===0?null:cre.test(i)||dre.test(i)?i:null}var ure=(t,i)=>i.step;function pre(t,i){t&1&&(h(0,"span",8),v(1),m()),t&2&&(l(),C(i))}function hre(t,i){if(t&1&&(h(0,"span",12)(1,"span",28),v(2,"T"),m(),v(3),m()),t&2){let e=d(),n=Ie(0);_("pTooltip",e.texts.stats.tokens(n.tokensTotal)),l(3),C(e.tokensShort())}}function fre(t,i){if(t&1&&(h(0,"span",13)(1,"span",28),v(2,"B"),m(),v(3),m()),t&2){let e=d(),n=Ie(0);_("pTooltip",e.texts.stats.bytes(n.bytesTotal)),l(3),C(e.bytesShort())}}function mre(t,i){if(t&1){let e=$();h(0,"button",31),N("click",function(o){let r=w(e).$implicit,a=d(2);return T(a.onTagClick(r,o))}),v(1),m()}if(t&2){let e=i.$implicit,n=d(2);O("aria-label",n.texts.tagFilterAriaLabel(e)),l(),C(e)}}function _re(t,i){if(t&1&&(h(0,"span",30),v(1),m()),t&2){let e=d(2),n=Ie(2);l(),C(e.texts.tagOverflow(n))}}function gre(t,i){if(t&1&&(h(0,"div",17),ue(1,mre,2,2,"button",29,Ze),I(3,_re,2,1,"span",30),m()),t&2){d();let e=Ie(1),n=Ie(2);l(),pe(e),l(2),M(n>0?3:-1)}}function vre(t,i){if(t&1&&(h(0,"span",35),v(1),m()),t&2){let e=i.$implicit;l(),C(e)}}function bre(t,i){if(t&1&&(h(0,"div",32)(1,"span",33),v(2),m(),h(3,"div",34),ue(4,vre,2,1,"span",35,Ze),m()()),t&2){let e=d(),n=d(2);l(),_("pTooltip",n.texts.llm.topics.tooltip),l(),C(n.texts.llm.topics.label),l(2),pe(e.topics)}}function yre(t,i){if(t&1&&(h(0,"span",35),v(1),m()),t&2){let e=i.$implicit;l(),C(e)}}function Cre(t,i){if(t&1&&(h(0,"div",32)(1,"span",33),v(2),m(),h(3,"div",34),ue(4,yre,2,1,"span",35,Ze),m()()),t&2){let e=d(),n=d(2);l(),_("pTooltip",n.texts.llm.facts.tooltip),l(),C(n.texts.llm.facts.label),l(2),pe(e.keyFacts)}}function xre(t,i){if(t&1&&(I(0,bre,6,2,"div",32),I(1,Cre,6,2,"div",32)),t&2){let e=i;M(e.topics!=null&&e.topics.length?0:-1),l(),M(e.keyFacts!=null&&e.keyFacts.length?1:-1)}}function wre(t,i){if(t&1&&(h(0,"div",32)(1,"span",33),v(2),m(),h(3,"span"),v(4),m()()),t&2){let e=d(),n=d(2);l(),_("pTooltip",n.texts.llm.when.tooltip),l(),C(n.texts.llm.when.label),l(2),C(e.whenToUse)}}function Tre(t,i){if(t&1&&(h(0,"div",32)(1,"span",33),v(2),m(),h(3,"span"),v(4),m()()),t&2){let e=d(),n=d(2);l(),_("pTooltip",n.texts.llm.style.tooltip),l(),C(n.texts.llm.style.label),l(2),C(e.interactionStyle)}}function Sre(t,i){if(t&1&&(h(0,"span",35),v(1),m()),t&2){let e=i.$implicit;l(),C(e)}}function kre(t,i){if(t&1&&(h(0,"div",32)(1,"span",33),v(2),m(),h(3,"div",34),ue(4,Sre,2,1,"span",35,Ze),m()()),t&2){let e=d(),n=d(2);l(),_("pTooltip",n.texts.llm.does.tooltip),l(),C(n.texts.llm.does.label),l(2),pe(e.capabilities)}}function Ire(t,i){if(t&1&&(I(0,wre,5,3,"div",32),I(1,Tre,5,3,"div",32),I(2,kre,6,2,"div",32)),t&2){let e=i;M(e.whenToUse?0:-1),l(),M(e.interactionStyle?1:-1),l(),M(e.capabilities!=null&&e.capabilities.length?2:-1)}}function Mre(t,i){if(t&1&&v(0),t&2){let e=i.$implicit,n=i.$index,o=i.$count;M0("",e.step,". ",e.description,"",n===o-1?"":" \xB7 ")}}function Ere(t,i){if(t&1&&(h(0,"div",32)(1,"span",33),v(2),m(),h(3,"span"),ue(4,Mre,1,3,null,null,ure),m()()),t&2){let e=d(),n=d(2);l(),_("pTooltip",n.texts.llm.steps.tooltip),l(),C(n.texts.llm.steps.label),l(2),pe(e.recipe)}}function Dre(t,i){if(t&1&&(h(0,"span",35),v(1),m()),t&2){let e=i.$implicit;l(),C(e)}}function Pre(t,i){if(t&1&&(h(0,"div",32)(1,"span",33),v(2),m(),h(3,"div",34),ue(4,Dre,2,1,"span",35,Ze),m()()),t&2){let e=d(),n=d(2);l(),_("pTooltip",n.texts.llm.pre.tooltip),l(),C(n.texts.llm.pre.label),l(2),pe(e.preconditions)}}function Rre(t,i){if(t&1&&(h(0,"span",35),v(1),m()),t&2){let e=i.$implicit;l(),C(e)}}function Ore(t,i){if(t&1&&(h(0,"div",32)(1,"span",33),v(2),m(),h(3,"div",34),ue(4,Rre,2,1,"span",35,Ze),m()()),t&2){let e=d(),n=d(2);l(),_("pTooltip",n.texts.llm.out.tooltip),l(),C(n.texts.llm.out.label),l(2),pe(e.outputs)}}function Fre(t,i){if(t&1&&(h(0,"span",35),v(1),m()),t&2){let e=i.$implicit;l(),C(e)}}function Nre(t,i){if(t&1&&(h(0,"div",32)(1,"span",33),v(2),m(),h(3,"div",34),ue(4,Fre,2,1,"span",35,Ze),m()()),t&2){let e=d(),n=d(2);l(),_("pTooltip",n.texts.llm.fx.tooltip),l(),C(n.texts.llm.fx.label),l(2),pe(e.sideEffects)}}function Are(t,i){if(t&1&&(I(0,Ere,6,2,"div",32),I(1,Pre,6,2,"div",32),I(2,Ore,6,2,"div",32),I(3,Nre,6,2,"div",32)),t&2){let e=i;M(e.recipe!=null&&e.recipe.length?0:-1),l(),M(e.preconditions!=null&&e.preconditions.length?1:-1),l(),M(e.outputs!=null&&e.outputs.length?2:-1),l(),M(e.sideEffects!=null&&e.sideEffects.length?3:-1)}}function Lre(t,i){if(t&1&&(h(0,"div",32)(1,"span",33),v(2),m(),h(3,"code",36),v(4),m()()),t&2){let e=d(),n=d(2);l(),_("pTooltip",n.texts.llm.eg.tooltip),l(),C(n.texts.llm.eg.label),l(2),C(e.invocationExample)}}function Bre(t,i){if(t&1&&(h(0,"span",35),v(1),m()),t&2){let e=i.$implicit;l(),C(e)}}function Vre(t,i){if(t&1&&(h(0,"div",32)(1,"span",33),v(2),m(),h(3,"div",34),ue(4,Bre,2,1,"span",35,Ze),m()()),t&2){let e=d(),n=d(2);l(),_("pTooltip",n.texts.llm.fx.tooltip),l(),C(n.texts.llm.fx.label),l(2),pe(e.sideEffects)}}function zre(t,i){if(t&1&&(I(0,Lre,5,3,"div",32),I(1,Vre,6,2,"div",32)),t&2){let e=i;M(e.invocationExample?0:-1),l(),M(e.sideEffects!=null&&e.sideEffects.length?1:-1)}}function Hre(t,i){if(t&1&&(h(0,"div",22),I(1,xre,2,2),I(2,Ire,3,3),I(3,Are,4,4),I(4,zre,2,2),m()),t&2){let e,n,o,r,a=d();l(),M((e=a.summaryMarkdown())?1:-1,e),l(),M((n=a.summaryAgent())?2:-1,n),l(),M((o=a.summarySkill())?3:-1,o),l(),M((r=a.summaryCommand())?4:-1,r)}}function qre(t,i){if(t&1&&F(0,"div",23),t&2){let e=d();_("innerHTML",e.descriptionHtml(),yi)}}function Gre(t,i){if(t&1&&(h(0,"div",37)(1,"div",38)(2,"span",39),v(3),m(),h(4,"span",40),v(5),m()()()),t&2){let e=d(),n=d();l(3),C(n.texts.meta.model),l(2),C(e.model)}}function jre(t,i){t&1&&I(0,Gre,6,2,"div",37),t&2&&M(i.model?0:-1)}var Ure={selected:!1,highlighted:!1,dimmed:!1},VD=(()=>{class t{node=B.required();stats=B({linksIn:0,linksOut:0});summary=B(null);selection=B(Ure);isFavorite=B(!1);favoriteToggle=qe();tagClick=qe();texts=Yn;expanded=Ci(!1);fmAgent=S(()=>{let e=this.node();return e.kind==="agent"?e.frontmatter:null});summaryAgent=S(()=>{let e=this.summary();return e?.kind==="agent"?e:null});summarySkill=S(()=>{let e=this.summary();return e?.kind==="skill"?e:null});summaryCommand=S(()=>{let e=this.summary();return e?.kind==="command"?e:null});summaryMarkdown=S(()=>{let e=this.summary();return e?.kind==="markdown"?e:null});hasLlmCluster=S(()=>{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=S(()=>{let e=this.node();if(e.kind!=="agent")return null;let n=e.frontmatter;return lf(n.color)});markdown=p(po);bytesShort=S(()=>{let e=this.stats().bytesTotal;return e===void 0?null:mr(e)});tokensShort=S(()=>{let e=this.stats().tokensTotal;return e===void 0?null:mr(e)});version=S(()=>os(this.node()));stability=S(()=>lo(this.node()));tagChips=S(()=>jn(this.node()));visibleTagChips=S(()=>this.tagChips().slice(0,3));moreTagsCount=S(()=>Math.max(0,this.tagChips().length-3));displayName=S(()=>{let e=this.node().frontmatter;return e.name?e.name:fs(this.node().path)});description=S(()=>this.node().frontmatter.description??"");descriptionHtml=Na(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})}onTagClick(e,n){n.stopPropagation(),this.tagClick.emit(e)}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=z({type:t,selectors:[["sm-node-card"]],hostAttrs:[1,"sm-gnode"],hostVars:15,hostBindings:function(n,o){n&2&&(O("data-kind",o.node().kind),Oe("--node-color",o.nodeColor()),ce("sm-gnode--with-color",!!o.nodeColor())("sm-gnode--deprecated",o.stability()==="deprecated")("sm-gnode--expanded",o.expanded())("sm-gnode--selected",o.selection().selected)("sm-gnode--highlighted",o.selection().highlighted)("sm-gnode--dimmed",o.selection().dimmed))},inputs:{node:[1,"node"],stats:[1,"stats"],summary:[1,"summary"],selection:[1,"selection"],isFavorite:[1,"isFavorite"],expanded:[1,"expanded"]},outputs:{favoriteToggle:"favoriteToggle",tagClick:"tagClick",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"],["type","button","data-testid","node-card-tag",1,"sm-gnode__tag-chip"],["data-testid","node-card-tags-more",1,"sm-gnode__tag-more"],["type","button","data-testid","node-card-tag",1,"sm-gnode__tag-chip",3,"click"],[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,o){if(n&1&&(Qt(0)(1)(2),h(3,"div",0)(4,"div",1),F(5,"sm-kind-icon",2),m(),h(6,"div",3)(7,"div",4)(8,"span",5),v(9),m(),F(10,"sm-view-contributions-host",6),m()(),h(11,"div",7),I(12,pre,2,1,"span",8),h(13,"button",9),N("click",function(a){return o.toggleExpanded(a)}),F(14,"i",10),m()(),h(15,"div",11),I(16,hre,4,2,"span",12),I(17,fre,4,2,"span",13),h(18,"button",14),N("click",function(a){return o.toggleFavorite(a)}),F(19,"i",15),m(),F(20,"sm-view-contributions-host",16),m()(),I(21,gre,4,1,"div",17),h(22,"div",18)(23,"div",19),F(24,"i",20),h(25,"span",21),v(26),m()(),I(27,Hre,5,4,"div",22),I(28,qre,1,1,"div",23),I(29,jre,1,1),m(),h(30,"div",24),F(31,"sm-view-contributions-host",25),h(32,"div",26),F(33,"sm-view-contributions-host",27),m()()),n&2){let r,a,s=o.node();wt(o.stats()),l();let c=wt(o.visibleTagChips());l(),wt(o.moreTagsCount()),l(3),_("kind",s.kind)("provider",s.provider)("size",18),l(3),_("pTooltip",s.path),l(),C(o.displayName()),l(),_("node",o.node()),l(2),M((r=o.version())?12:-1,r),l(),O("aria-label",o.texts.ariaExpand),l(3),M(o.tokensShort()!==null?16:-1),l(),M(o.bytesShort()!==null?17:-1),l(),ce("sm-gnode__favorite--on",o.isFavorite()),_("pTooltip",o.isFavorite()?o.texts.favoriteRemoveTooltip:o.texts.favoriteAddTooltip),O("aria-label",o.isFavorite()?o.texts.ariaFavoriteRemove:o.texts.ariaFavoriteAdd),l(),ce("pi-star-fill",o.isFavorite())("pi-star",!o.isFavorite()),l(),_("node",o.node()),l(),M(c.length?21:-1),l(2),_("pTooltip",s.path),l(3),C(s.path),l(),M(o.hasLlmCluster()?27:-1),l(),M(o.description()?28:-1),l(),M((a=o.fmAgent())?29:-1,a),l(2),_("node",o.node()),l(2),_("node",o.node())}},dependencies:[Xo,Le,Ve,Wn],styles:['[_nghost-%COMP%]{--accent: var(--sm-kind-markdown);position:relative;display:inline-block;width:260px;background:var(--sm-bg-content);border:1px solid var(--sm-border);border-radius:var(--sm-radius-lg);box-shadow:var(--sm-shadow-card);overflow:hidden;transition:box-shadow .12s ease,border-color .12s ease,transform .12s ease;-webkit-user-select:none;user-select:none;text-align:start}[_nghost-%COMP%]:hover{box-shadow:var(--sm-shadow-card-hover)}[_nghost-%COMP%]:before{content:"";position:absolute;top:0;left:0;right:0;height:3px;background:var(--accent)}[data-kind="skill"][_nghost-%COMP%]{--accent: var(--sm-kind-skill)}[data-kind="agent"][_nghost-%COMP%]{--accent: var(--sm-kind-agent)}[data-kind="command"][_nghost-%COMP%]{--accent: var(--sm-kind-command)}[data-kind="markdown"][_nghost-%COMP%]{--accent: var(--sm-kind-markdown)}.sm-gnode--deprecated[_nghost-%COMP%]{opacity:.55}.sm-gnode--selected[_nghost-%COMP%]{border-color:var(--p-primary-color);box-shadow:0 0 0 2px var(--p-primary-color),0 4px 16px color-mix(in srgb,var(--p-primary-color) 25%,transparent)}.sm-gnode--highlighted[_nghost-%COMP%]{border-color:var(--p-primary-color);box-shadow:var(--sm-shadow-card-hover)}.sm-gnode--dimmed[_nghost-%COMP%]{opacity:.25}.sm-gnode__main[_ngcontent-%COMP%]{display:grid;grid-template-columns:auto minmax(0,1fr) auto;column-gap:.6rem;row-gap:.3rem;align-items:start;padding:.6rem .65rem}.sm-gnode__icon-box[_ngcontent-%COMP%]{--kind-bg: var(--sm-kind-markdown-bg);--kind-fg: var(--sm-kind-markdown-fg);width:38px;height:38px;border-radius:var(--sm-radius-lg);display:flex;align-items:center;justify-content:center;background:var(--kind-bg);color:var(--kind-fg);flex:none;font-size:1.05rem;grid-row:1 / span 2;align-self:center}[data-kind="skill"][_nghost-%COMP%] .sm-gnode__icon-box[_ngcontent-%COMP%]{--kind-bg: var(--sm-kind-skill-bg);--kind-fg: var(--sm-kind-skill-fg)}[data-kind="agent"][_nghost-%COMP%] .sm-gnode__icon-box[_ngcontent-%COMP%]{--kind-bg: var(--sm-kind-agent-bg);--kind-fg: var(--sm-kind-agent-fg)}[data-kind="command"][_nghost-%COMP%] .sm-gnode__icon-box[_ngcontent-%COMP%]{--kind-bg: var(--sm-kind-command-bg);--kind-fg: var(--sm-kind-command-fg)}[data-kind="markdown"][_nghost-%COMP%] .sm-gnode__icon-box[_ngcontent-%COMP%]{--kind-bg: var(--sm-kind-markdown-bg);--kind-fg: var(--sm-kind-markdown-fg)}.sm-gnode__content[_ngcontent-%COMP%]{min-width:0;width:100%;justify-self:stretch;display:flex;flex-direction:column;gap:.15rem}.sm-gnode__name-row[_ngcontent-%COMP%]{display:flex;align-items:baseline;gap:.35rem;min-width:0}.sm-gnode__name-row[_ngcontent-%COMP%] > sm-view-contributions-host[_ngcontent-%COMP%]{margin-left:auto;align-self:center}.sm-gnode__name[_ngcontent-%COMP%]{font-size:.9rem;font-weight:600;line-height:1.2;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--p-text-color);flex:0 1 auto;min-width:0}.sm-gnode__name-version[_ngcontent-%COMP%]{font-family:var(--sm-font-mono);font-size:.65rem;color:var(--sm-text-muted);background:color-mix(in srgb,var(--accent) 10%,transparent);padding:.05rem .35rem;border-radius:var(--sm-radius-sm);line-height:1.2;flex:none;align-self:center}.sm-gnode--with-color[_nghost-%COMP%] .sm-gnode__name[_ngcontent-%COMP%]{background:color-mix(in srgb,var(--node-color) 7%,transparent);padding:.05rem .4rem;border-radius:var(--sm-radius-sm)}.sm-gnode__actions[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:.2rem}.sm-gnode__confidence[_ngcontent-%COMP%]{display:flex;align-items:flex-start;font-size:.65rem;font-weight:600;font-variant-numeric:tabular-nums;line-height:1;flex:none;cursor:help;padding-top:.35rem}.sm-gnode__llm-marker--high[_ngcontent-%COMP%]{color:var(--sm-severity-success)}.sm-gnode__llm-marker--med[_ngcontent-%COMP%]{color:var(--sm-severity-warn)}.sm-gnode__llm-marker--low[_ngcontent-%COMP%]{color:var(--sm-severity-error)}.sm-gnode__chevron[_ngcontent-%COMP%]{width:22px;height:22px;display:inline-flex;align-items:center;justify-content:center;border:none;background:transparent;cursor:pointer;color:var(--sm-text-muted);border-radius:var(--sm-radius-md);transition:transform .16s ease,background .12s ease,color .12s ease}.sm-gnode__chevron[_ngcontent-%COMP%] .pi[_ngcontent-%COMP%]{font-size:.7rem;line-height:1}.sm-gnode__chevron[_ngcontent-%COMP%]:hover{background:var(--sm-bg-hover);color:var(--p-text-color)}.sm-gnode--expanded[_nghost-%COMP%] .sm-gnode__chevron[_ngcontent-%COMP%]{transform:rotate(180deg)}.sm-gnode__favorite[_ngcontent-%COMP%]{position:absolute;top:-3px;right:0;width:22px;height:22px;display:inline-flex;align-items:center;justify-content:center;border:none;background:transparent;cursor:pointer;color:var(--sm-text-muted);border-radius:var(--sm-radius-md);flex:none;transition:background .12s ease,color .12s ease}.sm-gnode__favorite[_ngcontent-%COMP%] .pi[_ngcontent-%COMP%]{font-size:.8rem;line-height:1}.sm-gnode__favorite[_ngcontent-%COMP%]:hover{background:var(--sm-bg-hover);color:var(--p-text-color)}.sm-gnode__favorite--on[_ngcontent-%COMP%], .sm-gnode__favorite--on[_ngcontent-%COMP%]:hover{color:var(--p-primary-color)}.sm-gnode__sub[_ngcontent-%COMP%]{position:relative;grid-column:2 / -1;grid-row:2;display:flex;flex-wrap:wrap;align-items:center;gap:6px;font-family:var(--sm-font-mono);font-size:.6rem;color:var(--sm-text-muted);line-height:1.2;margin-top:.1rem;min-width:0;width:100%;padding-right:28px}.sm-gnode__sub-stat[_ngcontent-%COMP%]{padding:.08rem .35rem;border-radius:var(--sm-radius-sm);background:var(--sm-bg-hover);font-family:var(--sm-font-mono);font-size:.6rem;color:var(--sm-text-muted);font-weight:400;flex:none}.sm-gnode__sub-stat[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.15rem}.sm-gnode__sub-stat[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:.65rem}.sm-gnode__sub-key[_ngcontent-%COMP%]{font-weight:700}.sm-gnode__sub-stat--tokens[_ngcontent-%COMP%]{background:var(--sm-stat-tokens-bg)}.sm-gnode__sub-stat--bytes[_ngcontent-%COMP%]{background:var(--sm-stat-bytes-bg)}.sm-gnode__panel[_ngcontent-%COMP%]{display:none;border-top:1px solid var(--sm-border)}.sm-gnode--expanded[_nghost-%COMP%] .sm-gnode__panel[_ngcontent-%COMP%]{display:block}.sm-gnode__llm[_ngcontent-%COMP%]{padding:.5rem .7rem;display:flex;flex-direction:column;gap:.25rem;font-size:.75rem;line-height:1.4}.sm-gnode__llm-line[_ngcontent-%COMP%]{display:flex;gap:.4rem;align-items:baseline;color:var(--p-text-color);font-style:italic;min-width:0}.sm-gnode__llm-label[_ngcontent-%COMP%]{flex:none;font-style:normal;color:var(--sm-text-muted);font-size:.6rem;letter-spacing:.04em;text-transform:uppercase;font-weight:600;min-width:2.2rem;padding-top:.2rem;cursor:help}.sm-gnode__chips[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:.25rem;flex:1;min-width:0}.sm-gnode__chip[_ngcontent-%COMP%]{font-size:.65rem;padding:.1rem .4rem;border-radius:var(--sm-radius-sm);border:1px solid var(--sm-border);background:var(--sm-bg-hover);color:var(--p-text-color);line-height:1.3}.sm-gnode__chip--mono[_ngcontent-%COMP%]{font-family:var(--sm-font-mono)}.sm-gnode__chip--allowed[_ngcontent-%COMP%]{border-style:dashed;background:transparent;color:var(--sm-text-muted)}.sm-gnode__chip--llm[_ngcontent-%COMP%]{font-style:italic}.sm-gnode__chip-required[_ngcontent-%COMP%]{color:var(--sm-severity-error);margin-left:2px}.sm-gnode__llm-code[_ngcontent-%COMP%]{font-family:var(--sm-font-mono);background:var(--sm-bg-hover);padding:.1rem .4rem;border-radius:var(--sm-radius-sm);font-size:.7rem;font-style:normal;color:var(--p-text-color)}.sm-gnode__path[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.35rem;padding:.4rem .7rem;font-family:var(--sm-font-mono);font-size:.68rem;color:var(--sm-text-muted);background:var(--sm-bg-hover);border-top:1px solid var(--sm-border);min-width:0}.sm-gnode__path-icon[_ngcontent-%COMP%]{flex:none;font-size:.7rem;color:var(--sm-text-muted)}.sm-gnode__path-value[_ngcontent-%COMP%]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;direction:rtl;unicode-bidi:plaintext;text-align:left}.sm-gnode__desc[_ngcontent-%COMP%]{padding:.55rem .7rem;font-size:.78rem;line-height:1.45;color:var(--p-text-color);max-height:140px;overflow-y:auto;overscroll-behavior:contain;border-top:1px solid var(--sm-border);scrollbar-width:thin;scrollbar-color:var(--sm-border) transparent}.sm-gnode__desc[_ngcontent-%COMP%]::-webkit-scrollbar{width:6px}.sm-gnode__desc[_ngcontent-%COMP%]::-webkit-scrollbar-track{background:transparent}.sm-gnode__desc[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:var(--sm-border);border-radius:var(--sm-radius-sm)}[_nghost-%COMP%] .sm-gnode__desc code{background:var(--sm-bg-hover);padding:.02rem .25rem;border-radius:var(--sm-radius-sm);font-family:var(--sm-font-mono);font-size:.85em}[_nghost-%COMP%] .sm-gnode__desc a{color:var(--p-primary-color);text-decoration:underline}.sm-gnode__meta[_ngcontent-%COMP%]{padding:.5rem .7rem;border-top:1px solid var(--sm-border);display:flex;flex-direction:column;gap:.35rem}.sm-gnode__meta-row[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:.5rem;font-size:.7rem;min-width:0}.sm-gnode__meta-label[_ngcontent-%COMP%]{color:var(--sm-text-muted);text-transform:uppercase;letter-spacing:.04em;font-weight:600;font-size:.6rem;flex:none;min-width:60px;padding-top:.15rem}.sm-gnode__meta-value[_ngcontent-%COMP%]{color:var(--p-text-color);font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sm-gnode__meta-value--mono[_ngcontent-%COMP%]{font-family:var(--sm-font-mono);background:var(--sm-bg-hover);padding:.08rem .4rem;border-radius:var(--sm-radius-sm);font-size:.68rem}.sm-gnode__footer[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.7rem;min-height:1.4rem;padding:.4rem .7rem;border-top:1px solid var(--sm-border);background:var(--sm-bg-hover);font-size:.7rem;color:var(--sm-text-muted)}.sm-gnode__footer-right-cluster[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.7rem;margin-left:auto}.sm-gnode__stat[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.3rem;line-height:1}.sm-gnode__stat[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:.6rem;line-height:1;display:block}.sm-gnode__stat[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{transform:translateY(1px)}.sm-gnode__stat-num[_ngcontent-%COMP%]{font-weight:600;color:var(--p-text-color);line-height:1;display:block}.sm-gnode__stat--error[_ngcontent-%COMP%]{background:var(--sm-severity-error-bg);color:var(--sm-severity-error);padding:.1rem .4rem;border-radius:var(--sm-radius-sm)}.sm-gnode__stat--error[_ngcontent-%COMP%] .sm-gnode__stat-num[_ngcontent-%COMP%]{color:var(--sm-severity-error)}.sm-gnode__stat--warn[_ngcontent-%COMP%]{background:var(--sm-severity-warn-bg);color:var(--sm-severity-warn);padding:.1rem .4rem;border-radius:var(--sm-radius-sm)}.sm-gnode__stat--warn[_ngcontent-%COMP%] .sm-gnode__stat-num[_ngcontent-%COMP%], .sm-gnode__stat--stale[_ngcontent-%COMP%]{color:var(--sm-severity-warn)}.sm-gnode__tagrow[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:center;gap:.25rem;padding:0 .65rem .35rem}.sm-gnode__tag-chip[_ngcontent-%COMP%]{appearance:none;margin:0;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;cursor:pointer;transition:color .12s ease-out,border-color .12s ease-out}.sm-gnode__tag-chip[_ngcontent-%COMP%]:hover{color:var(--p-primary-color);border-color:var(--p-primary-color)}.sm-gnode__tag-chip[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--p-primary-color);outline-offset:1px}.sm-gnode__tag-more[_ngcontent-%COMP%]{font-size:.6rem;color:var(--sm-text-muted);font-style:italic}'],changeDetection:0})}return t})();var zD={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,i)=>`${t}/${i} nodes`,links:t=>`${t} links`}};var $re=["sparkline"],Wre=()=>({class:"perf-hud__content"}),Kre=t=>({content:t});function Yre(t,i){if(t&1&&(h(0,"span",9),v(1),m()),t&2){let e=d(2);l(),C(e.texts.units.mb(e.heapMb()))}}function Xre(t,i){if(t&1&&(h(0,"div",3)(1,"span",4),v(2),m()(),h(3,"div",5)(4,"div",6)(5,"div",7),F(6,"canvas",8,1),h(8,"span",9),v(9),m()(),h(10,"div",10)(11,"div",11),I(12,Yre,2,1,"span",9),h(13,"span",9),v(14),m(),h(15,"span",9),v(16),m()()(),h(17,"div",10)(18,"div",11)(19,"span",9),v(20),m(),h(21,"span",9),v(22),m()()()()()),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),M(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 Zre=30,s0=60,cf=14,HD=(()=>{class t{visible=B(0);total=B(0);edges=B(0);texts=zD;destroyRef=p(bt);zone=p(Xt);fps=K(0);frameTimeMs=K(0);fpsSamples=K([]);sparklineCanvas=nt("sparkline");heapMb=K(null);longTasks=K(0);domNodes=K(0);expanded=K(Qre());hasHeap=S(()=>this.heapMb()!==null);constructor(){let e=0,n=0,o=performance.now(),r=o,a=0,s=u=>{let f=u-o;if(o=u,e+=1,n+=f,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(eae()),this.domNodes.set(document.querySelectorAll("*").length),this.fpsSamples.update(R=>{let k=R.length>=Zre?R.slice(1):R.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(f=>f+u.getEntries().length)}),c.observe({type:"longtask",buffered:!0})}catch{}this.destroyRef.onDestroy(()=>{cancelAnimationFrame(a),c?.disconnect()}),se(()=>{let u=this.sparklineCanvas(),f=this.fpsSamples();u&&tae(u.nativeElement,f)})}setExpanded(e){this.expanded.set(e),Jre(e)}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=z({type:t,selectors:[["sm-perf-hud"]],viewQuery:function(n,o){n&1&&pn(o.sparklineCanvas,$re,5),n&2&&Vt()},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,o){n&1&&(h(0,"p-togglebutton",2),N("ngModelChange",function(a){return o.setExpanded(a)}),P(1,Xre,23,8,"ng-template",null,0,$e),m()),n&2&&_("ngModel",o.expanded())("ariaLabel",o.expanded()?o.texts.a11y.collapse:o.texts.a11y.expand)("styleClass",o.expanded()?"perf-hud perf-hud--expanded":"perf-hud")("pt",Pe(5,Kre,Et(4,Wre)))},dependencies:[yt,Rt,Ot,$n,Un],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})(),qD="sm.perf-hud.expanded";function Qre(){try{return localStorage.getItem(qD)==="1"}catch{return!1}}function Jre(t){try{localStorage.setItem(qD,t?"1":"0")}catch{}}function eae(){let t=performance.memory;return t?Math.round(t.usedJSHeapSize/1024/1024):null}function tae(t,i){let e=window.devicePixelRatio||1,n=s0*e,o=cf*e;(t.width!==n||t.height!==o)&&(t.width=n,t.height=o);let r=t.getContext("2d");if(!r||(r.setTransform(e,0,0,e,0,0),r.clearRect(0,0,s0,cf),i.length<2))return;let a=Math.max(60,...i),s=s0/(i.length-1);r.beginPath();for(let c=0;c<i.length;c+=1){let u=c*s,f=cf-i[c]/a*cf;c===0?r.moveTo(u,f):r.lineTo(u,f)}r.strokeStyle=getComputedStyle(t).color,r.lineWidth=1,r.stroke()}var nae="debug-fps",GD=(()=>{class t{visible=K(this.resolveInitial());resolveInitial(){let n=new URLSearchParams(window.location.search).get(nae);return n!==null&&n!=="0"&&n!=="false"?!0:n==="0"||n==="false"?!1:af.graph.perfHud}static \u0275fac=function(n){return new(n||t)};static \u0275prov=y({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var Zo={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:{actions:"Actions",annotations:"Annotations",connections:"Connections",findings:"Findings",metadata:"Metadata",plugins:"Plugin contributions",body:"Body"},body:{loading:"Loading body\u2026"},findingHintLabel:"Hint:",audit:{headerEmpty:"never bumped",fields:{lastBumpedAt:"Last bumped",lastBumpedBy:"by",createdAt:"Created",createdBy:"by"}}};var jD={cardHeader:"Annotations",emptyOverlay:"No sidecar (.sm) file present for this node.",emptyAnnotations:"Sidecar present but no annotations are declared yet.",sections:{provenance:"Authors",repository:"Repository",docs:"Docs"},fields:{authors:"Authors",license:"License",source:"Source",sourceVersion:"Source version",docsUrl:"Docs URL"}};function Ki(t){if(typeof t!="string"||t.length===0)return null;try{let i=new URL(t);return i.protocol==="http:"||i.protocol==="https:"?t:null}catch{return null}}function iae(t,i){if(t&1&&(Z(0,"p",1),v(1),ie()),t&2){let e=d(2);l(),C(e.texts.emptyOverlay)}}function oae(t,i){if(t&1&&(Z(0,"p",2),v(1),ie()),t&2){let e=d(2);l(),C(e.texts.emptyAnnotations)}}function rae(t,i){if(t&1&&I(0,iae,2,1,"p",1)(1,oae,2,1,"p",2),t&2){let e,n=d();M((e=n.overlay())!=null&&e.present?1:0)}}function aae(t,i){if(t&1&&(Z(0,"span",4),oe(1,"i",5),Z(2,"span"),v(3),ie()()),t&2){let e=i.$implicit;l(3),C(e)}}function sae(t,i){if(t&1&&ue(0,aae,4,1,"span",4,Ze),t&2){d();let e=Ie(0);pe(e.authors)}}function lae(t,i){if(t&1&&(Z(0,"span",4),oe(1,"i",6),Z(2,"span"),v(3),ie()()),t&2){d();let e=Ie(0);l(3),C(e.license)}}function cae(t,i){if(t&1&&(Qt(0),Z(1,"dt"),v(2),ie(),Z(3,"dd",3),I(4,sae,2,0),I(5,lae,4,1,"span",4),ie()),t&2){let e=d(2),n=wt(e.provenance());l(2),C(e.texts.sections.provenance),l(2),M(n.authors.length?4:-1),l(),M(n.license!==null?5:-1)}}function dae(t,i){if(t&1&&(Z(0,"span",4),oe(1,"i",8),Z(2,"a",9),v(3),ie()()),t&2){d();let e=Ie(0);l(2),Qe("href",e.source,nr),l(),C(e.source)}}function uae(t,i){if(t&1&&(Z(0,"span",4),oe(1,"i",10),Z(2,"code"),v(3),ie()()),t&2){d();let e=Ie(0);l(3),C(e.sourceVersion)}}function pae(t,i){if(t&1&&(Qt(0),Z(1,"dt"),v(2),ie(),Z(3,"dd",7),I(4,dae,4,2,"span",4),I(5,uae,4,1,"span",4),ie()),t&2){let e=d(2),n=wt(e.repository());l(2),C(e.texts.sections.repository),l(2),M(n.source!==null?4:-1),l(),M(n.sourceVersion!==null?5:-1)}}function hae(t,i){if(t&1&&(Z(0,"span",4),oe(1,"i",12),Z(2,"a",9),v(3),ie()()),t&2){d();let e=Ie(0);l(2),Qe("href",e.docsUrl,nr),l(),C(e.docsUrl)}}function fae(t,i){if(t&1&&(Qt(0),Z(1,"dt"),v(2),ie(),Z(3,"dd",11),I(4,hae,4,2,"span",4),ie()),t&2){let e=d(2),n=wt(e.docs());l(2),C(e.texts.sections.docs),l(2),M(n.docsUrl!==null?4:-1)}}function mae(t,i){if(t&1&&(Z(0,"dl",0),I(1,cae,6,4),I(2,pae,6,4),I(3,fae,5,3),ie()),t&2){let e=d();l(),M(e.hasProvenance()?1:-1),l(),M(e.hasRepository()?2:-1),l(),M(e.hasDocs()?3:-1)}}var UD=(()=>{class t{overlay=B(void 0);texts=jD;annotations=S(()=>{let e=this.overlay();return!e||!e.present?null:e.annotations??null});hasAnnotations=S(()=>{let e=this.annotations();return e!==null&&Object.keys(e).length>0});hasAnyContent=S(()=>c0(this.overlay()));provenance=S(()=>{let e=this.annotations()??{};return{authors:$D(e.authors),license:df(e.license)}});hasProvenance=S(()=>l0(this.provenance()));repository=S(()=>{let e=this.annotations()??{};return{source:Ki(e.source),sourceVersion:df(e.sourceVersion)}});hasRepository=S(()=>l0(this.repository()));docs=S(()=>{let e=this.annotations()??{};return{docsUrl:Ki(e.docsUrl)}});hasDocs=S(()=>l0(this.docs()));static \u0275fac=function(n){return new(n||t)};static \u0275cmp=z({type:t,selectors:[["sm-annotations-panel"]],inputs:{overlay:[1,"overlay"]},decls:2,vars:1,consts:[[1,"ann-panel__rows","sm-block__kv"],["data-testid","annotations-panel-empty-overlay",1,"ann-panel__empty"],["data-testid","annotations-panel-empty-annotations",1,"ann-panel__empty"],["data-testid","annotations-section-provenance",1,"sm-block__inline"],[1,"sm-block__meta"],["aria-hidden","true",1,"pi","pi-user"],["aria-hidden","true",1,"pi","pi-shield"],["data-testid","annotations-section-repository",1,"sm-block__inline"],["aria-hidden","true",1,"pi","pi-link"],["target","_blank","rel","noopener noreferrer",3,"href"],["aria-hidden","true",1,"pi","pi-tag"],["data-testid","annotations-section-docs",1,"sm-block__inline"],["aria-hidden","true",1,"pi","pi-external-link"]],template:function(n,o){n&1&&I(0,rae,2,1)(1,mae,4,3,"dl",0),n&2&&M(o.hasAnyContent()?1:0)},dependencies:[Le],styles:["[_nghost-%COMP%]{display:block}.ann-panel__empty[_ngcontent-%COMP%]{color:var(--sm-text-muted);font-style:italic;font-size:.85rem;margin:0}.ann-panel__rows[_ngcontent-%COMP%] dd[_ngcontent-%COMP%]{display:flex;align-items:center}"],changeDetection:0})}return t})();function c0(t){if(!t||!t.present)return!1;let i=t.annotations;if(!i||typeof i!="object"||Array.isArray(i))return!1;let e=i;return $D(e.authors).length>0||df(e.license)!==null||Ki(e.source)!==null||df(e.sourceVersion)!==null||Ki(e.docsUrl)!==null}function df(t){return typeof t=="string"&&t.length>0?t:null}function $D(t){return Array.isArray(t)?t.filter(i=>typeof i=="string"&&i.length>0):[]}function l0(t){for(let i of Object.values(t))if(i!=null){if(Array.isArray(i)){if(i.length>0)return!0;continue}if(typeof i=="string"){if(i.length>0)return!0;continue}return!0}return!1}var WD={outgoingHeader:"Outgoing",incomingHeader:"Incoming",loading:"Loading links\u2026",error:"Failed to load links.",confidence:{high:"high",medium:"medium",low:"low"},confidenceTooltip:t=>`confidence: ${t}`,issueOnTargetTooltip:"Target has an issue: ",issueOnSourceTooltip:"Source has an issue: ",externalRefsHeader:"External"};var YD=(t,i)=>i.source+"|"+i.target+"|"+i.kind+"|"+((i.trigger==null?null:i.trigger.normalizedTrigger)??""),_ae=(t,i)=>i.url+"|"+(i.line??-1);function gae(t,i){if(t&1&&(h(0,"p",1),v(1),m()),t&2){let e=d(2);l(),C(e.texts.loading)}}function vae(t,i){if(t&1&&(h(0,"p",2),v(1),m()),t&2){let e=d(2);l(),C(e.texts.error)}}function bae(t,i){if(t&1){let e=$();h(0,"li",11)(1,"button",12),N("click",function(){let o=w(e).$implicit,r=d(4);return T(r.onOpen(o.source))}),v(2),m(),h(3,"span",13),v(4),m(),h(5,"span",14),v(6),m()()}if(t&2){let e=i.$implicit,n=d(4);O("data-testid","linked-nodes-incoming-row-"+e.source),l(),O("data-testid","linked-nodes-incoming-link-"+e.source),l(),C(e.source),l(),Oe("color",n.confidenceColor(e.confidence))("border-color",n.confidenceColor(e.confidence)),_("pTooltip",n.confidenceTooltip(e.confidence)),l(),C(n.confidenceValue(e.confidence)),l(),O("data-kind",e.kind),l(),C(e.kind)}}function yae(t,i){if(t&1&&(h(0,"section",3)(1,"h4",6),F(2,"sm-icon",7),h(3,"span",8),v(4),m(),h(5,"span",9),v(6),m()(),h(7,"ul",10),ue(8,bae,7,11,"li",11,YD),m()()),t&2){let e=d(3);l(4),C(e.incoming().length),l(2),C(e.texts.incomingHeader),l(2),pe(e.incoming())}}function Cae(t,i){if(t&1&&(h(0,"span",17),v(1),m()),t&2){let e=d().$implicit;O("data-testid","linked-nodes-outgoing-link-"+e.target),l(),C(e.target)}}function xae(t,i){if(t&1){let e=$();h(0,"button",12),N("click",function(){w(e);let o=d().$implicit,r=d(4);return T(r.onOpen(o.resolvedTarget??o.target))}),v(1),m()}if(t&2){let e=d().$implicit;O("data-testid","linked-nodes-outgoing-link-"+e.target),l(),C(e.target)}}function wae(t,i){if(t&1&&(h(0,"span",19),v(1),m()),t&2){let e=i,n=d().$implicit;_("pTooltip",e.message),O("data-severity",e.severity)("data-testid","linked-nodes-outgoing-issue-"+n.target),l(),C(e.analyzerId)}}function Tae(t,i){if(t&1&&(h(0,"li",11),I(1,Cae,2,2,"span",17)(2,xae,2,2,"button",18),h(3,"span",13),v(4),m(),h(5,"span",14),v(6),m(),I(7,wae,2,4,"span",19),m()),t&2){let e,n=i.$implicit,o=d(4);O("data-testid","linked-nodes-outgoing-row-"+n.target),l(),M(o.outgoingBroken(n)?1:2),l(2),Oe("color",o.confidenceColor(n.confidence))("border-color",o.confidenceColor(n.confidence)),_("pTooltip",o.confidenceTooltip(n.confidence)),l(),C(o.confidenceValue(n.confidence)),l(),O("data-kind",n.kind),l(),C(n.kind),l(),M((e=o.issueForOutgoing(n))?7:-1,e)}}function Sae(t,i){if(t&1&&(h(0,"section",4)(1,"h4",6),F(2,"sm-icon",15),h(3,"span",16),v(4),m(),h(5,"span",9),v(6),m()(),h(7,"ul",10),ue(8,Tae,8,11,"li",11,YD),m()()),t&2){let e=d(3);l(4),C(e.outgoing().length),l(2),C(e.texts.outgoingHeader),l(2),pe(e.outgoing())}}function kae(t,i){if(t&1&&(h(0,"li",23)(1,"a",24),v(2),m()()),t&2){let e=i.$implicit;O("data-testid","linked-nodes-external-ref-"+e.url),l(),_("href",e.url,nr)("pTooltip",e.url),l(),C(e.url)}}function Iae(t,i){if(t&1&&(h(0,"section",5)(1,"h4",6),F(2,"sm-icon",20),h(3,"span",21),v(4),m(),h(5,"span",9),v(6),m()(),h(7,"ul",22),ue(8,kae,3,4,"li",23,_ae),m()()),t&2){let e=d(3);l(4),C(e.externalRefs().length),l(2),C(e.texts.externalRefsHeader),l(2),pe(e.externalRefs())}}function Mae(t,i){if(t&1&&(I(0,yae,10,2,"section",3),I(1,Sae,10,2,"section",4),I(2,Iae,10,2,"section",5)),t&2){let e=d(2);M(e.incoming().length>0?0:-1),l(),M(e.outgoing().length>0?1:-1),l(),M(e.externalRefs().length>0?2:-1)}}function Eae(t,i){if(t&1&&(h(0,"div",0),I(1,gae,2,1,"p",1)(2,vae,2,1,"p",2)(3,Mae,3,3),m()),t&2){let e,n=d();l(),M((e=n.state())==="loading"?1:e==="error"?2:e==="ready"?3:-1)}}var XD=(()=>{class t{dataSource=p(ao);wsEvents=p(is);destroyRef=p(bt);texts=WD;path=B(null);openPath=qe();state=K("idle");outgoingRaw=K([]);incomingRaw=K([]);outgoing=S(()=>this.outgoingRaw().filter(e=>!KD(e)));incoming=S(()=>this.incomingRaw().filter(e=>!KD(e)));issues=K([]);externalRefsRaw=K([]);externalRefs=S(()=>this.externalRefsRaw().filter(e=>Ki(e.url)!==null));fetchToken=0;hasResults=S(()=>this.state()==="ready"&&(this.outgoing().length>0||this.incoming().length>0));constructor(){this.wsEvents.scanCompleted$.pipe(Gn(this.destroyRef)).subscribe(()=>{let e=this.path();e&&this.fetch(e)}),se(()=>{let e=this.path();if(!e){this.fetchToken++,this.state.set("idle"),this.outgoingRaw.set([]),this.incomingRaw.set([]);return}this.fetch(e)})}onOpen(e){this.openPath.emit(e)}confidenceTooltip(e){return this.texts.confidenceTooltip(this.texts.confidence[Ib(e)])}confidenceValue(e){return e.toFixed(2)}confidenceColor(e){let n=Math.max(0,Math.min(1,e));return`hsl(${Math.round(n*120)}, 60%, 50%)`}outgoingBroken(e){return this.issueForOutgoing(e)?.severity==="error"}issueForOutgoing(e){let n=this.path();if(!n)return null;let o=[e.target,e.resolvedTarget].filter(r=>typeof r=="string");return this.issues().find(r=>{if(!r.nodeIds.includes(n))return!1;let a=r.data?.target;return typeof a!="string"?!1:o.includes(a)})??null}async fetch(e){let n=++this.fetchToken;this.state.set("loading");try{let[o,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(o.status!=="fulfilled"||r.status!=="fulfilled"){this.outgoingRaw.set([]),this.incomingRaw.set([]),this.issues.set([]),this.externalRefsRaw.set([]),this.state.set("error");return}let s=o.value.items,c=r.value.items,u=Dae(e,s,c),f;try{let g=await this.dataSource.listIssues({nodes:u});if(n!==this.fetchToken)return;f=g.items}catch{if(n!==this.fetchToken)return;this.outgoingRaw.set([]),this.incomingRaw.set([]),this.issues.set([]),this.externalRefsRaw.set([]),this.state.set("error");return}this.outgoingRaw.set(s),this.incomingRaw.set(c),this.issues.set(f),this.externalRefsRaw.set(a.status==="fulfilled"?a.value?.item?.externalRefs??[]:[]),this.state.set("ready")}catch{if(n!==this.fetchToken)return;this.outgoingRaw.set([]),this.incomingRaw.set([]),this.issues.set([]),this.externalRefsRaw.set([]),this.state.set("error")}}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=z({type:t,selectors:[["sm-linked-nodes-panel"]],inputs:{path:[1,"path"]},outputs:{openPath:"openPath"},decls:1,vars:1,consts:[["data-testid","linked-nodes-panel",1,"linked-nodes-panel"],["data-testid","linked-nodes-loading",1,"linked-nodes-panel__status"],["data-testid","linked-nodes-error",1,"linked-nodes-panel__status","linked-nodes-panel__status--warn"],["data-testid","linked-nodes-incoming",1,"linked-nodes-panel__section"],["data-testid","linked-nodes-outgoing",1,"linked-nodes-panel__section"],["data-testid","linked-nodes-external-refs",1,"linked-nodes-panel__section"],[1,"linked-nodes-panel__section-title"],["icon","pi-download",1,"linked-nodes-panel__section-icon"],["data-testid","linked-nodes-incoming-count",1,"linked-nodes-panel__section-count"],[1,"linked-nodes-panel__section-label"],[1,"linked-nodes-panel__table"],[1,"linked-nodes-panel__row"],["type","button",1,"linked-nodes-panel__path",3,"click"],[1,"linked-nodes-panel__chip",3,"pTooltip"],[1,"linked-nodes-panel__chip","linked-nodes-panel__chip--kind"],["icon","pi-upload",1,"linked-nodes-panel__section-icon"],["data-testid","linked-nodes-outgoing-count",1,"linked-nodes-panel__section-count"],[1,"linked-nodes-panel__path","linked-nodes-panel__path--broken"],["type","button",1,"linked-nodes-panel__path"],[1,"linked-nodes-panel__chip","linked-nodes-panel__chip--issue",3,"pTooltip"],["icon","pi-link",1,"linked-nodes-panel__section-icon"],["data-testid","linked-nodes-external-count",1,"linked-nodes-panel__section-count"],[1,"linked-nodes-panel__table","linked-nodes-panel__table--external"],[1,"linked-nodes-panel__row","linked-nodes-panel__row--external-ref"],["tooltipPosition","top","target","_blank","rel","noopener noreferrer",1,"linked-nodes-panel__external-ref-url",3,"href","pTooltip"]],template:function(n,o){n&1&&I(0,Eae,4,1,"div",0),n&2&&M(o.path()?0:-1)},dependencies:[Le,Ve,Mv],styles:["[_nghost-%COMP%]{display:block}.linked-nodes-panel__status[_ngcontent-%COMP%]{margin:0;font-size:.85rem;color:var(--p-text-muted-color);font-style:italic}.linked-nodes-panel__status--warn[_ngcontent-%COMP%]{color:var(--sm-severity-warn);font-style:normal}.linked-nodes-panel__section[_ngcontent-%COMP%] + .linked-nodes-panel__section[_ngcontent-%COMP%]{margin-top:1rem}.linked-nodes-panel__section-title[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.4rem;margin:0 0 .4rem;font-size:.8rem}.linked-nodes-panel__section-icon[_ngcontent-%COMP%]{display:inline-flex;align-items:center;font-size:.85rem;color:var(--p-text-color)}.linked-nodes-panel__section-count[_ngcontent-%COMP%]{font-weight:700;font-size:.9rem;line-height:1;color:var(--p-text-color)}.linked-nodes-panel__section-label[_ngcontent-%COMP%]{font-weight:600;text-transform:uppercase;letter-spacing:.04em;color:var(--p-text-muted-color)}.linked-nodes-panel__table[_ngcontent-%COMP%]{list-style:none;margin:0;padding:0;display:flex;flex-direction:column}.linked-nodes-panel__row[_ngcontent-%COMP%]{display:flex;flex-flow:row wrap;align-items:center;gap:.4rem;padding:.4rem .25rem;min-width:0}.linked-nodes-panel__row[_ngcontent-%COMP%] + .linked-nodes-panel__row[_ngcontent-%COMP%]{border-top:1px solid var(--p-content-border-color)}.linked-nodes-panel__path[_ngcontent-%COMP%]{margin:0;padding:0;border:none;background:none;font:inherit;font-size:.8rem;font-weight:400;text-align:left;line-height:1.35;min-width:0;overflow-wrap:anywhere;color:var(--p-primary-color);cursor:pointer}button.linked-nodes-panel__path[_ngcontent-%COMP%]:hover, button.linked-nodes-panel__path[_ngcontent-%COMP%]:focus-visible{text-decoration:underline}.linked-nodes-panel__path--broken[_ngcontent-%COMP%]{color:var(--p-text-color);cursor:default}.linked-nodes-panel__chip[_ngcontent-%COMP%]{display:inline-flex;align-items:center;padding:.02rem .4rem;border:1px solid var(--p-content-border-color);border-radius:999px;font-size:.72rem;line-height:1.5;color:var(--p-text-muted-color);white-space:nowrap}.linked-nodes-panel__chip--kind[_ngcontent-%COMP%]{border-color:var(--sm-edge-neutral);color:var(--sm-edge-neutral)}.linked-nodes-panel__chip--kind[data-kind=invokes][_ngcontent-%COMP%]{border-color:var(--sm-edge-invokes);color:var(--sm-edge-invokes)}.linked-nodes-panel__chip--kind[data-kind=references][_ngcontent-%COMP%]{border-color:var(--sm-edge-references);color:var(--sm-edge-references)}.linked-nodes-panel__chip--kind[data-kind=points][_ngcontent-%COMP%]{border-color:var(--sm-edge-points);color:var(--sm-edge-points)}.linked-nodes-panel__chip--kind[data-kind=mentions][_ngcontent-%COMP%]{border-color:var(--sm-edge-mentions);color:var(--sm-edge-mentions)}.linked-nodes-panel__chip--issue[data-severity=error][_ngcontent-%COMP%]{border-color:var(--sm-severity-error);color:var(--sm-severity-error)}.linked-nodes-panel__chip--issue[data-severity=warn][_ngcontent-%COMP%]{border-color:var(--sm-severity-warn);color:var(--sm-severity-warn)}.linked-nodes-panel__chip--issue[data-severity=info][_ngcontent-%COMP%]{border-color:var(--sm-severity-info);color:var(--sm-severity-info)}.linked-nodes-panel__row--external-ref[_ngcontent-%COMP%]{font-size:.85rem}.linked-nodes-panel__external-ref-url[_ngcontent-%COMP%]{display:block;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--p-primary-color);text-decoration:none}.linked-nodes-panel__external-ref-url[_ngcontent-%COMP%]:hover{text-decoration:underline}"],changeDetection:0})}return t})();function Dae(t,i,e){let n=new Set([t]);for(let o of i)o.resolvedTarget&&n.add(o.resolvedTarget),o.target&&n.add(o.target);for(let o of e)o.source&&n.add(o.source);return[...n]}function KD(t){return!!(t.source===t.target||t.resolvedTarget&&t.source===t.resolvedTarget)}var ZD={sections:{definition:"Definition",initialPrompt:"Initial prompt"},fields:{tools:"Tools",model:"Model",skills:"Skills",disallowedTools:"Disallowed",permissionMode:"Permission",maxTurns:"Max turns",memory:"Memory",background:"Background",effort:"Effort",isolation:"Isolation",color:"Color",mcpServers:"MCP servers",hooks:"Hooks"},skillBaseFields:{whenToUse:"When to use",argumentHint:"Argument hint",arguments:"Arguments",allowedTools:"Allowed tools",disallowedTools:"Disallowed tools",model:"Model",effort:"Effort",context:"Context",agent:"Agent",shell:"Shell",paths:"Paths",disableModelInvocation:"Model invocation",userInvocable:"User invocable"},unknownFieldTooltip:"Unknown field, not part of the documented frontmatter for this provider.",skillUnresolvedTooltip:"Skill not found in this scan."};var QD=(t,i)=>i.key,Pae=(t,i)=>i.name,Rae=(t,i)=>i.event;function Oae(t,i){if(t&1&&(h(0,"dt"),v(1),m(),h(2,"dd")(3,"code"),v(4),m()()),t&2){let e=d(5);l(),C(e.texts.fields.model),l(3),C(i)}}function Fae(t,i){if(t&1&&(h(0,"dt"),v(1),m(),h(2,"dd")(3,"code"),v(4),m()()),t&2){let e=d(5);l(),C(e.texts.fields.effort),l(3),C(i)}}function Nae(t,i){t&1&&(h(0,"span",7),v(1,"\xB7"),m())}function Aae(t,i){if(t&1&&(h(0,"code"),v(1),m(),I(2,Nae,2,0,"span",7)),t&2){let e=i.$implicit,n=i.$index,o=i.$count;l(),C(e),l(),M(n!==o-1?2:-1)}}function Lae(t,i){if(t&1&&(h(0,"dt"),v(1),m(),h(2,"dd",6),ue(3,Aae,3,2,null,null,Ze),m()),t&2){let e=d(5);l(),C(e.texts.fields.tools),l(2),pe(e.tools())}}function Bae(t,i){t&1&&(h(0,"span",7),v(1,"\xB7"),m())}function Vae(t,i){if(t&1&&(h(0,"span",8),F(1,"i",9),h(2,"code"),v(3),m()(),I(4,Bae,2,0,"span",7)),t&2){let e=i.$implicit,n=i.$index,o=i.$count;l(3),C(e),l(),M(n!==o-1?4:-1)}}function zae(t,i){if(t&1&&(h(0,"dt"),v(1),m(),h(2,"dd",6),ue(3,Vae,5,2,null,null,Ze),m()),t&2){let e=d(5);l(),C(e.texts.fields.disallowedTools),l(2),pe(e.disallowedTools())}}function Hae(t,i){if(t&1&&(h(0,"dt"),v(1),m(),h(2,"dd")(3,"code"),v(4),m()()),t&2){let e=d(5);l(),C(e.texts.fields.permissionMode),l(3),C(i)}}function qae(t,i){if(t&1&&(h(0,"dt"),v(1),m(),h(2,"dd",10),F(3,"span",11),h(4,"code"),v(5),m()()),t&2){let e=i,n=d(5);l(),C(n.texts.fields.color),l(2),Oe("background",e),l(2),C(e)}}function Gae(t,i){if(t&1){let e=$();h(0,"a",14),N("click",function(){let o=w(e),r=d(7);return T(r.openSkill(o))})("keydown.enter",function(){let o=w(e),r=d(7);return T(r.openSkill(o))})("keydown.space",function(o){let r=w(e);return d(7).openSkill(r),T(o.preventDefault())}),F(1,"i",15),v(2),m()}if(t&2){let e=d().$implicit;l(2),be(" ",e," ")}}function jae(t,i){if(t&1&&(h(0,"span",13),v(1),m()),t&2){let e=d().$implicit,n=d(6);_("pTooltip",n.texts.skillUnresolvedTooltip),l(),C(e)}}function Uae(t,i){t&1&&(h(0,"span",7),v(1,"\xB7"),m())}function $ae(t,i){if(t&1&&(I(0,Gae,3,1,"a",12)(1,jae,2,2,"span",13),I(2,Uae,2,0,"span",7)),t&2){let e,n=i.$implicit,o=i.$index,r=i.$count,a=d(6);M((e=a.skillPath(n))?0:1,e),l(2),M(o!==r-1?2:-1)}}function Wae(t,i){if(t&1&&(h(0,"dt"),v(1),m(),h(2,"dd",6),ue(3,$ae,3,2,null,null,Ze),m()),t&2){let e=d(5);l(),C(e.texts.fields.skills),l(2),pe(e.skills())}}function Kae(t,i){if(t&1&&(h(0,"dt"),v(1),m(),h(2,"dd")(3,"code"),v(4),m()()),t&2){let e=d(5);l(),C(e.texts.fields.maxTurns),l(3),C(e.maxTurns())}}function Yae(t,i){if(t&1&&(h(0,"dt"),v(1),m(),h(2,"dd")(3,"code"),v(4),m()()),t&2){let e=d(5);l(),C(e.texts.fields.memory),l(3),C(i)}}function Xae(t,i){if(t&1&&(h(0,"dt"),v(1),m(),h(2,"dd")(3,"code"),v(4),m()()),t&2){let e=d(5);l(),C(e.texts.fields.background),l(3),C(e.background())}}function Zae(t,i){if(t&1&&(h(0,"dt"),v(1),m(),h(2,"dd")(3,"code"),v(4),m()()),t&2){let e=d(5);l(),C(e.texts.fields.isolation),l(3),C(i)}}function Qae(t,i){t&1&&(h(0,"span",7),v(1,"\xB7"),m())}function Jae(t,i){if(t&1&&(h(0,"code",16),v(1),m(),I(2,Qae,2,0,"span",7)),t&2){let e=i.$implicit,n=i.$index,o=i.$count;_("pTooltip",e.command??""),l(),C(e.name),l(),M(n!==o-1?2:-1)}}function ese(t,i){if(t&1&&(h(0,"dt"),v(1),m(),h(2,"dd",6),ue(3,Jae,3,3,null,null,Pae),m()),t&2){let e=d(5);l(),C(e.texts.fields.mcpServers),l(2),pe(e.mcpServers())}}function tse(t,i){if(t&1&&(h(0,"span",18),v(1,"\u2192"),m(),h(2,"code"),v(3),m()),t&2){let e=d().$implicit;l(3),C(e.keys[0])}}function nse(t,i){t&1&&(h(0,"span",7),v(1,"\xB7"),m())}function ise(t,i){if(t&1&&(h(0,"span",17)(1,"code"),v(2),m(),I(3,tse,4,1),m(),I(4,nse,2,0,"span",7)),t&2){let e=i.$implicit,n=i.$index,o=i.$count;l(2),C(e.event),l(),M(e.keys.length?3:-1),l(),M(n!==o-1?4:-1)}}function ose(t,i){if(t&1&&(h(0,"dt"),v(1),m(),h(2,"dd",6),ue(3,ise,5,3,null,null,Rae),m()),t&2){let e=d(5);l(),C(e.texts.fields.hooks),l(2),pe(e.hooks())}}function rse(t,i){if(t&1&&(h(0,"dt"),v(1),m(),h(2,"dd",19),F(3,"i",20),h(4,"code"),v(5),m()()),t&2){let e=i.$implicit,n=d(5);l(),C(e.key),l(2),_("pTooltip",n.texts.unknownFieldTooltip),O("aria-label",n.texts.unknownFieldTooltip),l(2),C(e.value)}}function ase(t,i){if(t&1&&(h(0,"dl",5),I(1,Oae,5,2),I(2,Fae,5,2),I(3,Lae,5,1),I(4,zae,5,1),I(5,Hae,5,2),I(6,qae,6,4),I(7,Wae,5,1),I(8,Kae,5,2),I(9,Yae,5,2),I(10,Xae,5,2),I(11,Zae,5,2),I(12,ese,5,1),I(13,ose,5,1),ue(14,rse,6,4,null,null,QD),m()),t&2){let e,n,o,r,a,s,c=d(4);l(),M((e=c.model())?1:-1,e),l(),M((n=c.effort())?2:-1,n),l(),M(c.tools().length?3:-1),l(),M(c.disallowedTools().length?4:-1),l(),M((o=c.permissionMode())?5:-1,o),l(),M((r=c.color())?6:-1,r),l(),M(c.skills().length?7:-1),l(),M(c.maxTurns()!==null?8:-1),l(),M((a=c.memory())?9:-1,a),l(),M(c.background()!==null?10:-1),l(),M((s=c.isolation())?11:-1,s),l(),M(c.mcpServers().length?12:-1),l(),M(c.hooks().length?13:-1),l(),pe(c.extraFields())}}function sse(t,i){if(t&1&&I(0,ase,16,13,"dl",5),t&2){let e=d(3);M(e.hasBehavior()||e.hasCapabilities()||e.extraFields().length?0:-1)}}function lse(t,i){if(t&1&&(h(0,"dt"),v(1),m(),h(2,"dd")(3,"code"),v(4),m()()),t&2){d();let e=Ie(0),n=d(4);l(),C(n.texts.skillBaseFields.model),l(3),C(e.model)}}function cse(t,i){if(t&1&&(h(0,"dt"),v(1),m(),h(2,"dd")(3,"code"),v(4),m()()),t&2){d();let e=Ie(0),n=d(4);l(),C(n.texts.skillBaseFields.effort),l(3),C(e.effort)}}function dse(t,i){if(t&1&&(h(0,"dt"),v(1),m(),h(2,"dd"),v(3),m()),t&2){d();let e=Ie(0),n=d(4);l(),C(n.texts.skillBaseFields.whenToUse),l(2),C(e.when_to_use)}}function use(t,i){if(t&1&&(h(0,"dt"),v(1),m(),h(2,"dd")(3,"code"),v(4),m()()),t&2){d();let e=Ie(0),n=d(4);l(),C(n.texts.skillBaseFields.argumentHint),l(3),C(e.argumentHint)}}function pse(t,i){t&1&&(h(0,"span",7),v(1,"\xB7"),m())}function hse(t,i){if(t&1&&(h(0,"code"),v(1),m(),I(2,pse,2,0,"span",7)),t&2){let e=i.$implicit,n=i.$index,o=i.$count;l(),C(e),l(),M(n!==o-1?2:-1)}}function fse(t,i){if(t&1&&(h(0,"dt"),v(1),m(),h(2,"dd",6),ue(3,hse,3,2,null,null,Ze),m()),t&2){d();let e=Ie(0),n=d(4);l(),C(n.texts.skillBaseFields.arguments),l(2),pe(e.arguments)}}function mse(t,i){t&1&&(h(0,"span",7),v(1,"\xB7"),m())}function _se(t,i){if(t&1&&(h(0,"code"),v(1),m(),I(2,mse,2,0,"span",7)),t&2){let e=i.$implicit,n=i.$index,o=i.$count;l(),C(e),l(),M(n!==o-1?2:-1)}}function gse(t,i){if(t&1&&(h(0,"dt"),v(1),m(),h(2,"dd",6),ue(3,_se,3,2,null,null,Ze),m()),t&2){d();let e=Ie(0),n=d(4);l(),C(n.texts.skillBaseFields.allowedTools),l(2),pe(e.allowedTools)}}function vse(t,i){t&1&&(h(0,"span",7),v(1,"\xB7"),m())}function bse(t,i){if(t&1&&(h(0,"span",8),F(1,"i",9),h(2,"code"),v(3),m()(),I(4,vse,2,0,"span",7)),t&2){let e=i.$implicit,n=i.$index,o=i.$count;l(3),C(e),l(),M(n!==o-1?4:-1)}}function yse(t,i){if(t&1&&(h(0,"dt"),v(1),m(),h(2,"dd",6),ue(3,bse,5,2,null,null,Ze),m()),t&2){d();let e=Ie(0),n=d(4);l(),C(n.texts.skillBaseFields.disallowedTools),l(2),pe(e.disallowedTools)}}function Cse(t,i){if(t&1&&(h(0,"dt"),v(1),m(),h(2,"dd")(3,"code"),v(4),m()()),t&2){d();let e=Ie(0),n=d(4);l(),C(n.texts.skillBaseFields.context),l(3),C(e.context)}}function xse(t,i){if(t&1&&(h(0,"dt"),v(1),m(),h(2,"dd")(3,"code"),v(4),m()()),t&2){d();let e=Ie(0),n=d(4);l(),C(n.texts.skillBaseFields.agent),l(3),C(e.agent)}}function wse(t,i){if(t&1&&(h(0,"dt"),v(1),m(),h(2,"dd")(3,"code"),v(4),m()()),t&2){d();let e=Ie(0),n=d(4);l(),C(n.texts.skillBaseFields.shell),l(3),C(e.shell)}}function Tse(t,i){t&1&&(h(0,"span",7),v(1,"\xB7"),m())}function Sse(t,i){if(t&1&&(h(0,"code"),v(1),m(),I(2,Tse,2,0,"span",7)),t&2){let e=i.$implicit,n=i.$index,o=i.$count;l(),C(e),l(),M(n!==o-1?2:-1)}}function kse(t,i){if(t&1&&(h(0,"dt"),v(1),m(),h(2,"dd",6),ue(3,Sse,3,2,null,null,Ze),m()),t&2){d();let e=Ie(0),n=d(4);l(),C(n.texts.skillBaseFields.paths),l(2),pe(e.paths)}}function Ise(t,i){if(t&1&&(h(0,"dt"),v(1),m(),h(2,"dd")(3,"code"),v(4,"disabled"),m()()),t&2){let e=d(5);l(),C(e.texts.skillBaseFields.disableModelInvocation)}}function Mse(t,i){if(t&1&&(h(0,"dt"),v(1),m(),h(2,"dd")(3,"code"),v(4),m()()),t&2){d();let e=Ie(0),n=d(4);l(),C(n.texts.skillBaseFields.userInvocable),l(3),C(e.userInvocable)}}function Ese(t,i){if(t&1&&(h(0,"dt"),v(1),m(),h(2,"dd",19),F(3,"i",20),h(4,"code"),v(5),m()()),t&2){let e=i.$implicit,n=d(5);l(),C(e.key),l(2),_("pTooltip",n.texts.unknownFieldTooltip),O("aria-label",n.texts.unknownFieldTooltip),l(2),C(e.value)}}function Dse(t,i){if(t&1&&(Qt(0),h(1,"dl",21),I(2,lse,5,2),I(3,cse,5,2),I(4,dse,4,2),I(5,use,5,2),I(6,fse,5,1),I(7,gse,5,1),I(8,yse,5,1),I(9,Cse,5,2),I(10,xse,5,2),I(11,wse,5,2),I(12,kse,5,1),I(13,Ise,5,1),I(14,Mse,5,2),ue(15,Ese,6,4,null,null,QD),m()),t&2){let e=d(4),n=wt(e.skillBase());l(2),M(n.model!==null?2:-1),l(),M(n.effort!==null?3:-1),l(),M(n.when_to_use!==null?4:-1),l(),M(n.argumentHint!==null?5:-1),l(),M(n.arguments.length?6:-1),l(),M(n.allowedTools.length?7:-1),l(),M(n.disallowedTools.length?8:-1),l(),M(n.context!==null?9:-1),l(),M(n.agent!==null?10:-1),l(),M(n.shell!==null?11:-1),l(),M(n.paths.length?12:-1),l(),M(n.disableModelInvocation?13:-1),l(),M(n.userInvocable!==null?14:-1),l(),pe(e.extraFields())}}function Pse(t,i){if(t&1&&I(0,Dse,17,14,"dl",21),t&2){let e=d(3);M(e.hasCapabilities()||e.extraFields().length?0:-1)}}function Rse(t,i){if(t&1&&(h(0,"p",22),v(1),m(),F(2,"blockquote",23)),t&2){let e=d(3);l(),C(e.texts.sections.initialPrompt),l(),_("innerHTML",e.initialPromptHtml(),yi)}}function Ose(t,i){if(t&1&&(I(0,sse,1,1)(1,Pse,1,1),I(2,Rse,3,2)),t&2){let e=d(2);M(e.isAgent()?0:e.isSkillOrCommand()?1:-1),l(2),M(e.hasInitialPrompt()?2:-1)}}function Fse(t,i){if(t&1){let e=$();h(0,"div",0)(1,"section",1)(2,"button",2),N("click",function(){w(e);let o=d();return T(o.toggle.emit())}),h(3,"span",3),v(4),m(),F(5,"i",4),m(),I(6,Ose,3,2),m()()}if(t&2){let e=d();l(2),O("aria-expanded",e.expanded()),l(2),C(e.texts.sections.definition),l(),ce("pi-chevron-right",!e.expanded())("pi-chevron-down",e.expanded()),l(),M(e.expanded()?6:-1)}}var Nse=new Set(["name","description","metadata","model","effort","permissionMode","maxTurns","memory","background","isolation","color","tools","disallowedTools","skills","mcpServers","hooks","initialPrompt"]),Ase=new Set(["name","description","metadata","when_to_use","argument-hint","arguments","disable-model-invocation","user-invocable","allowed-tools","disallowed-tools","model","effort","context","agent","hooks","paths","shell"]),JD=(()=>{class t{frontmatter=B.required();kind=B.required();provider=B(void 0);skillPathByName=B(null);onSkillClick=B(null);expanded=B(!0);toggle=qe();texts=ZD;markdown=p(po);hasVendorSurface=S(()=>{let e=this.kind();return e==="agent"||e==="skill"||e==="command"});isAgent=S(()=>this.kind()==="agent");isSkillOrCommand=S(()=>{let e=this.kind();return e==="skill"||e==="command"});tools=S(()=>pf(this.fm().tools));model=S(()=>Yt(this.fm().model));skills=S(()=>pf(this.fm().skills));disallowedTools=S(()=>pf(this.fm().disallowedTools));initialPrompt=S(()=>Yt(this.fm().initialPrompt));permissionMode=S(()=>Yt(this.fm().permissionMode));maxTurns=S(()=>Lse(this.fm().maxTurns));memory=S(()=>Yt(this.fm().memory));background=S(()=>typeof this.fm().background=="boolean"?this.fm().background:null);effort=S(()=>Yt(this.fm().effort));isolation=S(()=>Yt(this.fm().isolation));color=S(()=>lf(this.fm().color));mcpServers=S(()=>{let e=this.fm().mcpServers;return Array.isArray(e)?e.filter(n=>typeof n=="object"&&n!==null).map((n,o)=>{let r=n.args,a=Array.isArray(r)?r.length:0;return{name:typeof n.name=="string"&&n.name.length>0?n.name:`mcpServer[${o}]`,command:typeof n.command=="string"?n.command:null,argsCount:a}}):[]});hooks=S(()=>{let e=this.fm().hooks;if(typeof e!="object"||e===null)return[];let n=[];for(let[o,r]of Object.entries(e)){let a=typeof r=="object"&&r!==null?Object.keys(r):[];n.push({event:o,keys:a})}return n});skillBase=S(()=>{let e=this.fm();return{when_to_use:Yt(e.when_to_use),argumentHint:Yt(e["argument-hint"]),arguments:uf(e.arguments),disableModelInvocation:e["disable-model-invocation"]===!0,userInvocable:typeof e["user-invocable"]=="boolean"?e["user-invocable"]:null,allowedTools:uf(e["allowed-tools"]),disallowedTools:uf(e["disallowed-tools"]),model:Yt(e.model),effort:Yt(e.effort),context:Yt(e.context),agent:Yt(e.agent),paths:uf(e.paths),shell:Yt(e.shell)}});hasBehavior=S(()=>this.isAgent()?this.model()!==null||this.permissionMode()!==null||this.maxTurns()!==null||this.memory()!==null||this.background()!==null||this.effort()!==null||this.isolation()!==null||this.color()!==null:!1);hasCapabilities=S(()=>{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=S(()=>this.isAgent()&&this.initialPrompt()!==null);initialPromptHtml=a0(()=>this.initialPrompt()??"",this.markdown);extraFields=S(()=>{let e=this.isAgent()?Nse:this.isSkillOrCommand()?Ase:null;if(!e)return[];let n=this.fm(),o=[];for(let r of Object.keys(n)){if(e.has(r))continue;let a=n[r];if(a==null)continue;let s=typeof a=="string"?a:typeof a=="number"||typeof a=="boolean"?String(a):JSON.stringify(a);o.push({key:r,value:s})}return o});hasAnyContent=S(()=>this.hasVendorSurface()&&(this.hasBehavior()||this.hasCapabilities()||this.hasInitialPrompt()||this.extraFields().length>0));skillPath(e){return this.skillPathByName()?.get(e)??null}openSkill(e){let n=this.onSkillClick();n&&n(e)}fm(){return this.frontmatter()}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=z({type:t,selectors:[["sm-vendor-frontmatter"]],inputs:{frontmatter:[1,"frontmatter"],kind:[1,"kind"],provider:[1,"provider"],skillPathByName:[1,"skillPathByName"],onSkillClick:[1,"onSkillClick"],expanded:[1,"expanded"]},outputs:{toggle:"toggle"},decls:1,vars:1,consts:[["data-testid","vendor-frontmatter",1,"vfm"],["data-testid","vendor-frontmatter-definition",1,"sm-block","sm-block--collapsible"],["type","button","data-testid","vendor-frontmatter-toggle",1,"sm-block__row","sm-block__row--toggle",3,"click"],[1,"sm-block__title"],["aria-hidden","true",1,"pi","sm-block__chevron"],[1,"sm-block__kv"],[1,"vfm__inline"],["aria-hidden","true",1,"vfm__sep"],[1,"vfm__danger"],["aria-hidden","true",1,"pi","pi-ban"],[1,"vfm__color"],["aria-hidden","true",1,"vfm__swatch"],["role","button","tabindex","0",1,"sm-node-link","sm-node-link--known"],[1,"sm-node-link",3,"pTooltip"],["role","button","tabindex","0",1,"sm-node-link","sm-node-link--known",3,"click","keydown.enter","keydown.space"],["aria-hidden","true",1,"pi","pi-arrow-up-right"],[3,"pTooltip"],[1,"vfm__hook"],["aria-hidden","true",1,"vfm__sep-arrow"],[1,"vfm__unknown-dd"],["role","img",1,"pi","pi-exclamation-circle","vfm__unknown",3,"pTooltip"],["data-testid","vendor-frontmatter-skill-base",1,"sm-block__kv"],[1,"sm-block__sub"],["data-testid","vendor-frontmatter-initial-prompt-quote",1,"vfm__quote",3,"innerHTML"]],template:function(n,o){n&1&&I(0,Fse,7,7,"div",0),n&2&&M(o.hasAnyContent()?0:-1)},dependencies:[Le,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__hook[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.25rem}.vfm__hook[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{background:var(--sm-bg-hover);padding:.05rem .4rem;border-radius:var(--sm-radius-sm);font-size:.78rem;font-family:var(--sm-font-mono)}.vfm__unknown-dd[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.3rem}.vfm__unknown[_ngcontent-%COMP%]{font-size:.72rem;color:var(--p-text-muted-color);cursor:help;line-height:1}.vfm__color[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.35rem}.vfm__swatch[_ngcontent-%COMP%]{width:.7rem;height:.7rem;border-radius:50%;flex:none;border:1px solid var(--sm-border)}.vfm__quote[_ngcontent-%COMP%]{margin:0;padding:.7rem .95rem;border-left:2px solid var(--sm-border);background:var(--sm-bg-hover);color:var(--p-text-color);font-size:.9rem;line-height:1.55;border-radius:0 var(--sm-radius-sm) var(--sm-radius-sm) 0}[_nghost-%COMP%] .vfm__quote>:first-child{margin-top:0}[_nghost-%COMP%] .vfm__quote>:last-child{margin-bottom:0}[_nghost-%COMP%] .vfm__quote code{background:var(--sm-bg-content);padding:.05rem .4rem;border-radius:var(--sm-radius-sm);font-size:.82rem;font-family:var(--sm-font-mono)}[_nghost-%COMP%] .vfm__quote a{color:var(--p-primary-color);text-decoration:underline}"],changeDetection:0})}return t})();function Yt(t){return typeof t=="string"&&t.length>0?t:null}function Lse(t){return typeof t=="number"&&Number.isFinite(t)?t:null}function pf(t){return Array.isArray(t)?t.filter(i=>typeof i=="string"&&i.length>0):[]}function uf(t){return typeof t=="string"?t.length>0?[t]:[]:Array.isArray(t)?pf(t):[]}var eP={header:"Plugin contributions",count:t=>`${t} namespace${t===1?"":"s"}`,unregisteredBadge:"unregistered",rootContribBadge:t=>`from plugin: ${t}`,empty:"No plugin contributions on this sidecar."};var iP=(t,i)=>i.key,Bse=(t,i)=>i.pluginId;function Vse(t,i){if(t&1&&(h(0,"p",0),v(1),m()),t&2){let e=d();l(),C(e.texts.empty)}}function zse(t,i){if(t&1&&(h(0,"span",5),v(1),m()),t&2){let e=d().$implicit,n=d(3);l(),C(n.texts.rootContribBadge(e.pluginId))}}function Hse(t,i){if(t&1&&(h(0,"div",3)(1,"code",4),v(2),m(),I(3,zse,2,1,"span",5),h(4,"pre",6),v(5),m()()),t&2){let e=i.$implicit;l(2),C(e.key),l(),M(e.pluginId!==null?3:-1),l(2),C(e.value)}}function qse(t,i){if(t&1&&(h(0,"div",1),ue(1,Hse,6,3,"div",3,iP),m()),t&2){let e=d(2);l(),pe(e.rootContributions())}}function Gse(t,i){if(t&1&&(h(0,"span",10),v(1),m()),t&2){let e=d(4);l(),C(e.texts.unregisteredBadge)}}function jse(t,i){if(t&1&&(h(0,"dt",12),v(1),m(),h(2,"dd")(3,"pre"),v(4),m()()),t&2){let e=i.$implicit;_("pTooltip",e.description??""),l(),C(e.key),l(3),C(e.value)}}function Use(t,i){if(t&1&&(h(0,"section",7)(1,"h5",8)(2,"span",9),v(3),m(),I(4,Gse,2,1,"span",10),m(),h(5,"dl",11),ue(6,jse,5,3,null,null,iP),m()()),t&2){let e=i.$implicit;O("data-testid","plugin-contributions-ns-"+e.pluginId),l(3),C(e.pluginId),l(),M(e.registered?-1:4),l(2),pe(e.rows)}}function $se(t,i){if(t&1&&(h(0,"div",2),ue(1,Use,8,3,"section",7,Bse),m()),t&2){let e=d(2);l(),pe(e.namespaces())}}function Wse(t,i){if(t&1&&(I(0,qse,3,0,"div",1),I(1,$se,3,0,"div",2)),t&2){let e=d();M(e.rootContributions().length?0:-1),l(),M(e.namespaces().length?1:-1)}}var tP=new Set(["identity","annotations","settings","audit"]),oP=(()=>{class t{dataSource=p(ao);sidecarRoot=B(void 0);texts=eP;catalog=K(null);constructor(){this.fetchCatalog()}namespaces=S(()=>{let e=this.sidecarRoot();if(!e)return[];let n=this.catalog(),o=new Map;if(n)for(let a of n){if(a.location!=="namespaced")continue;let s=o.get(a.pluginId);s?s.push(a):o.set(a.pluginId,[a])}let r=[];for(let[a,s]of Object.entries(e)){if(tP.has(a)||this.isRegisteredRootKey(a))continue;let u=typeof s=="object"&&s!==null&&!Array.isArray(s)?s:{value:s},f=o.has(a),g=o.get(a)??[],x=Object.entries(u).map(([R,k])=>({key:R,value:nP(k),description:f?Kse(g,R):null}));r.push({pluginId:a,registered:f,rows:x})}return r});rootContributions=S(()=>{let e=this.sidecarRoot();if(!e)return[];let n=this.catalog();if(!n)return[];let o=new Map;for(let a of n)a.location==="root"&&o.set(a.key,a);let r=[];for(let[a,s]of Object.entries(e)){if(tP.has(a))continue;let c=o.get(a);c&&r.push({key:a,pluginId:c.pluginId,value:nP(s)})}return r});count=S(()=>this.namespaces().length+this.rootContributions().length);isEmpty=S(()=>this.count()===0);isRegisteredRootKey(e){let n=this.catalog();return n?n.some(o=>o.location==="root"&&o.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,o){n&1&&I(0,Vse,2,1,"p",0)(1,Wse,2,2),n&2&&M(o.isEmpty()?0:1)},dependencies:[Le,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 nP(t){if(t===null)return"null";if(typeof t=="string")return t;if(typeof t=="number"||typeof t=="boolean")return String(t);try{return JSON.stringify(t,null,2)}catch{return String(t)}}function Kse(t,i){for(let e of t)if(e.key===i){let n=e.schema.description;return typeof n=="string"&&n.length>0?n:null}return null}var Yse=[[["","smSectionTitleExtra",""]],"*"],Xse=["[smSectionTitleExtra]","*"],hf=(()=>{class t{title=B.required();expanded=B.required();toggleTestid=B();toggleAriaLabel=B();toggleTooltip=B();toggle=qe();static \u0275fac=function(n){return new(n||t)};static \u0275cmp=z({type:t,selectors:[["sm-collapsible-section"]],hostAttrs:[1,"sm-block","sm-block--collapsible"],inputs:{title:[1,"title"],expanded:[1,"expanded"],toggleTestid:[1,"toggleTestid"],toggleAriaLabel:[1,"toggleAriaLabel"],toggleTooltip:[1,"toggleTooltip"]},outputs:{toggle:"toggle"},ngContentSelectors:Xse,decls:6,vars:9,consts:[["type","button",1,"sm-block__row","sm-block__row--toggle",3,"click","pTooltip"],[1,"sm-block__title"],["aria-hidden","true",1,"pi","sm-block__chevron"]],template:function(n,o){n&1&&(un(Yse),h(0,"button",0),N("click",function(){return o.toggle.emit()}),h(1,"span",1),v(2),Ue(3),m(),F(4,"i",2),m(),Ue(5,1)),n&2&&(_("pTooltip",o.toggleTooltip()??""),O("aria-expanded",o.expanded())("aria-label",o.toggleAriaLabel()??null)("data-testid",o.toggleTestid()??null),l(2),be(" ",o.title()," "),l(2),ce("pi-chevron-right",!o.expanded())("pi-chevron-down",o.expanded()))},dependencies:[Le,Ve],encapsulation:2,changeDetection:0})}return t})();var Zse=t=>({inputs:t}),Qse=(t,i)=>i.pluginId,Jse=(t,i)=>i.qualifiedId;function ele(t,i){t&1&&le(0)}function tle(t,i){if(t&1&&(h(0,"div",3),P(1,ele,1,0,"ng-container",4),m()),t&2){let e=i.$implicit,n=d(3);O("data-testid","contribution-"+e.qualifiedId.replaceAll("/","-")),l(),_("ngComponentOutlet",n.rendererFor(e.slot))("ngComponentOutletInputs",Pe(3,Zse,e.rendererInputs))}}function nle(t,i){if(t&1&&(h(0,"div",2),ue(1,tle,2,5,"div",3,Jse),m()),t&2){let e=d().$implicit;l(),pe(e.bricks)}}function ile(t,i){if(t&1){let e=$();h(0,"sm-collapsible-section",1),N("toggle",function(){let o=w(e).$implicit,r=d();return T(r.toggle(o.pluginId))}),I(1,nle,3,0,"div",2),m()}if(t&2){let e=i.$implicit,n=d();_("title",e.pluginId)("expanded",n.expanded(e.pluginId))("toggleTestid","inspector-plugin-section-toggle-"+e.pluginId),O("data-testid","inspector-plugin-section-"+e.pluginId),l(),M(n.expanded(e.pluginId)?1:-1)}}var rP="skill-map.ui.inspector.plugin-sections",d0=100,aP=(()=>{class t{node=B(null);registry=p(Iv);collapseState=K(ole());groups=S(()=>{let e=this.node();if(!e)return[];let n=(e.contributions??[]).filter(a=>Dv(a.slot)&&Pv.has(a.slot));if(n.length===0)return[];let o=new Map;for(let a of n){let s=o.get(a.pluginId);s?s.push(a):o.set(a.pluginId,[a])}let r=[];for(let[a,s]of o){let c=d0,u=s.map(f=>{let g=`${f.pluginId}/${f.extensionId}/${f.contributionId}`,x=this.registry.get(g);return typeof x?.pluginOrder=="number"&&(c=x.pluginOrder),{c:f,qualifiedId:g,extensionOrder:x?.extensionOrder??d0,priority:x?.priority??d0,inputs:Rv(f,f.slot,e.path,x)}}).sort((f,g)=>f.extensionOrder!==g.extensionOrder?f.extensionOrder-g.extensionOrder:f.priority!==g.priority?f.priority-g.priority:f.qualifiedId<g.qualifiedId?-1:f.qualifiedId>g.qualifiedId?1:0);r.push({pluginId:a,pluginOrder:c,bricks:u.map(f=>({qualifiedId:f.qualifiedId,slot:f.c.slot,rendererInputs:f.inputs}))})}return r.sort((a,s)=>a.pluginOrder!==s.pluginOrder?a.pluginOrder-s.pluginOrder:a.pluginId<s.pluginId?-1:a.pluginId>s.pluginId?1:0),r});expanded(e){return this.collapseState()[e]??!1}toggle(e){this.collapseState.update(n=>Bt(me({},n),{[e]:!(n[e]??!1)})),rle(this.collapseState())}rendererFor(e){return Ev[e]}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=z({type:t,selectors:[["sm-inspector-plugin-sections"]],inputs:{node:[1,"node"]},decls:2,vars:0,consts:[[3,"title","expanded","toggleTestid"],[3,"toggle","title","expanded","toggleTestid"],[1,"ips__bricks"],[1,"ips__brick"],[4,"ngComponentOutlet","ngComponentOutletInputs"]],template:function(n,o){n&1&&ue(0,ile,2,5,"sm-collapsible-section",0,Qse),n&2&&pe(o.groups())},dependencies:[D0,hf],styles:["[_nghost-%COMP%]{display:contents}.ips__bricks[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.6rem}.ips__brick[_ngcontent-%COMP%]{display:block}"],changeDetection:0})}return t})();function ole(){try{let t=localStorage.getItem(rP);if(!t)return{};let i=JSON.parse(t);return typeof i=="object"&&i!==null?i:{}}catch{return{}}}function rle(t){try{localStorage.setItem(rP,JSON.stringify(t))}catch{}}var sP={header:"Debug",toggleAriaLabel:"Toggle debug panel",fields:{forPath:"for.path",bodyHashStored:"for.bodyHash (stored)",bodyHashLive:"node.bodyHash (live)",frontmatterHashStored:"for.frontmatterHash (stored)",frontmatterHashLive:"node.frontmatterHash (live)",resolvedProvider:"for.resolvedAs.provider",resolvedKind:"for.resolvedAs.kind",sidecarStatus:"sidecar.status"},diffMarker:"!=",absentMarker:"(absent)",notSetMarker:"(not set)",copiedLabel:"Copied",copyA11y:t=>`Copy ${t} to clipboard`};var ale=(t,i,e)=>({key:"body-stored",label:t,value:i,drift:e}),sle=(t,i,e)=>({key:"body-live",label:t,value:i,drift:e}),lle=(t,i,e)=>({key:"fm-stored",label:t,value:i,drift:e}),cle=(t,i,e)=>({key:"fm-live",label:t,value:i,drift:e});function dle(t,i){t&1&&(h(0,"code"),v(1),m()),t&2&&(l(),C(i))}function ule(t,i){if(t&1&&(h(0,"span",3),v(1),m()),t&2){let e=d();l(),C(e.texts.absentMarker)}}function ple(t,i){t&1&&le(0)}function hle(t,i){if(t&1&&P(0,ple,1,0,"ng-container",11),t&2){let e=d(),n=gt(42);_("ngTemplateOutlet",n)("ngTemplateOutletContext",ar(2,ale,e.texts.fields.bodyHashStored,i,e.bodyHashDrift()))}}function fle(t,i){if(t&1&&(h(0,"span",3),v(1),m()),t&2){let e=d();l(),C(e.texts.absentMarker)}}function mle(t,i){t&1&&le(0)}function _le(t,i){if(t&1&&P(0,mle,1,0,"ng-container",11),t&2){let e=d(),n=gt(42);_("ngTemplateOutlet",n)("ngTemplateOutletContext",ar(2,sle,e.texts.fields.bodyHashLive,i,e.bodyHashDrift()))}}function gle(t,i){if(t&1&&(h(0,"span",3),v(1),m()),t&2){let e=d();l(),C(e.texts.absentMarker)}}function vle(t,i){t&1&&le(0)}function ble(t,i){if(t&1&&P(0,vle,1,0,"ng-container",11),t&2){let e=d(),n=gt(42);_("ngTemplateOutlet",n)("ngTemplateOutletContext",ar(2,lle,e.texts.fields.frontmatterHashStored,i,e.frontmatterHashDrift()))}}function yle(t,i){if(t&1&&(h(0,"span",3),v(1),m()),t&2){let e=d();l(),C(e.texts.absentMarker)}}function Cle(t,i){t&1&&le(0)}function xle(t,i){if(t&1&&P(0,Cle,1,0,"ng-container",11),t&2){let e=d(),n=gt(42);_("ngTemplateOutlet",n)("ngTemplateOutletContext",ar(2,cle,e.texts.fields.frontmatterHashLive,i,e.frontmatterHashDrift()))}}function wle(t,i){if(t&1&&(h(0,"span",3),v(1),m()),t&2){let e=d();l(),C(e.texts.absentMarker)}}function Tle(t,i){t&1&&(h(0,"code"),v(1),m()),t&2&&(l(),C(i))}function Sle(t,i){if(t&1&&(h(0,"span",3),v(1),m()),t&2){let e=d();l(),C(e.texts.notSetMarker)}}function kle(t,i){t&1&&(h(0,"code"),v(1),m()),t&2&&(l(),C(i))}function Ile(t,i){if(t&1&&(h(0,"span",3),v(1),m()),t&2){let e=d();l(),C(e.texts.notSetMarker)}}function Mle(t,i){t&1&&(h(0,"code"),v(1),m()),t&2&&(l(),C(i))}function Ele(t,i){if(t&1&&(h(0,"span",3),v(1),m()),t&2){let e=d();l(),C(e.texts.absentMarker)}}function Dle(t,i){if(t&1&&(h(0,"span",13),v(1),m()),t&2){let e=d(2);l(),C(e.texts.copiedLabel)}}function Ple(t,i){if(t&1){let e=$();h(0,"button",12),N("click",function(){let o=w(e),r=o.key,a=o.value,s=d();return T(s.copyHash(r,a))}),h(1,"code"),v(2),m(),I(3,Dle,2,1,"span",13),m()}if(t&2){let e=i.key,n=i.label,o=i.value,r=i.drift,a=d();O("title",o)("aria-label",a.texts.copyA11y(n)),l(),ce("dbg__diff",r),l(),C(a.truncateHash(o)),l(),M(a.copiedKey()===e?3:-1)}}var lP=(()=>{class t{node=B.required();sidecarRoot=B(null);overlay=B(void 0);texts=sP;copiedKey=K(null);identityBlock=S(()=>{let e=this.sidecarRoot(),n={path:null,bodyHash:null,frontmatterHash:null,resolvedProvider:null,resolvedKind:null};if(!e)return n;let o=e.identity;if(typeof o!="object"||o===null)return n;let r=o,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=S(()=>this.node().bodyHash??null);frontmatterHashLive=S(()=>this.node().frontmatterHash??null);bodyHashDrift=S(()=>{let e=this.identityBlock().bodyHash,n=this.bodyHashLive();return e!==null&&n!==null&&e!==n});frontmatterHashDrift=S(()=>{let e=this.identityBlock().frontmatterHash,n=this.frontmatterHashLive();return e!==null&&n!==null&&e!==n});sidecarStatusLiteral=S(()=>{let e=this.overlay();if(!e)return null;let n=e.status??null;return n===null?null:String(n)});async copyHash(e,n){try{await navigator.clipboard.writeText(n),this.copiedKey.set(e),setTimeout(()=>{this.copiedKey()===e&&this.copiedKey.set(null)},2e3)}catch{}}truncateHash(e){return e.length>20?`${e.slice(0,20)}...`:e}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=z({type:t,selectors:[["sm-inspector-debug-panel"]],inputs:{node:[1,"node"],sidecarRoot:[1,"sidecarRoot"],overlay:[1,"overlay"]},decls:43,vars:16,consts:[["hashCell",""],["data-testid","inspector-debug-panel",1,"sm-block__kv","dbg__kv"],["data-testid","dbg-for-path"],[1,"dbg__absent"],["data-testid","dbg-body-hash-stored"],["data-testid","dbg-body-hash-live"],["data-testid","dbg-fm-hash-stored"],["data-testid","dbg-fm-hash-live"],["data-testid","dbg-resolved-provider"],["data-testid","dbg-resolved-kind"],["data-testid","dbg-sidecar-status"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["type","button",1,"dbg__copy",3,"click"],["role","status",1,"dbg__copied"]],template:function(n,o){if(n&1&&(h(0,"dl",1)(1,"dt"),v(2),m(),h(3,"dd",2),I(4,dle,2,1,"code")(5,ule,2,1,"span",3),m(),h(6,"dt"),v(7),m(),h(8,"dd",4),I(9,hle,1,6,"ng-container")(10,fle,2,1,"span",3),m(),h(11,"dt"),v(12),m(),h(13,"dd",5),I(14,_le,1,6,"ng-container")(15,gle,2,1,"span",3),m(),h(16,"dt"),v(17),m(),h(18,"dd",6),I(19,ble,1,6,"ng-container")(20,yle,2,1,"span",3),m(),h(21,"dt"),v(22),m(),h(23,"dd",7),I(24,xle,1,6,"ng-container")(25,wle,2,1,"span",3),m(),h(26,"dt"),v(27),m(),h(28,"dd",8),I(29,Tle,2,1,"code")(30,Sle,2,1,"span",3),m(),h(31,"dt"),v(32),m(),h(33,"dd",9),I(34,kle,2,1,"code")(35,Ile,2,1,"span",3),m(),h(36,"dt"),v(37),m(),h(38,"dd",10),I(39,Mle,2,1,"code")(40,Ele,2,1,"span",3),m()(),P(41,Ple,4,6,"ng-template",null,0,$e)),n&2){let r,a,s,c,u,f,g,x;l(2),C(o.texts.fields.forPath),l(2),M((r=o.identityBlock().path)?4:5,r),l(3),C(o.texts.fields.bodyHashStored),l(2),M((a=o.identityBlock().bodyHash)?9:10,a),l(3),C(o.texts.fields.bodyHashLive),l(2),M((s=o.bodyHashLive())?14:15,s),l(3),C(o.texts.fields.frontmatterHashStored),l(2),M((c=o.identityBlock().frontmatterHash)?19:20,c),l(3),C(o.texts.fields.frontmatterHashLive),l(2),M((u=o.frontmatterHashLive())?24:25,u),l(3),C(o.texts.fields.resolvedProvider),l(2),M((f=o.identityBlock().resolvedProvider)?29:30,f),l(3),C(o.texts.fields.resolvedKind),l(2),M((g=o.identityBlock().resolvedKind)?34:35,g),l(3),C(o.texts.fields.sidecarStatus),l(2),M((x=o.sidecarStatusLiteral())?39:40,x)}},dependencies:[hn],styles:["[_nghost-%COMP%]{display:block}.dbg__kv[_ngcontent-%COMP%] .dbg__diff[_ngcontent-%COMP%]{background:var(--sm-severity-error-bg);color:var(--sm-severity-error)}.dbg__kv[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{word-break:break-all}.dbg__absent[_ngcontent-%COMP%]{font-family:var(--sm-font-mono);font-size:.78rem;color:var(--sm-text-muted);font-style:italic}.dbg__copy[_ngcontent-%COMP%]{display:inline-flex;align-items:baseline;gap:.4rem;padding:0;border:none;background:none;font:inherit;color:inherit;text-align:left;cursor:pointer}.dbg__copy[_ngcontent-%COMP%]:hover code[_ngcontent-%COMP%]{text-decoration:underline dotted;text-underline-offset:2px}.dbg__copy[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--p-primary-color);outline-offset:1px;border-radius:var(--sm-radius-sm)}.dbg__copied[_ngcontent-%COMP%]{font-family:var(--sm-font-mono);font-size:.72rem;font-style:italic;color:var(--sm-severity-success)}"],changeDetection:0})}return t})();function Rle(t,i){if(t&1&&(Z(0,"span",3),oe(1,"i",6),Z(2,"span"),v(3),Z(4,"code"),v(5),ie()()()),t&2){d(2);let e=Ie(0),n=d();l(3),be("",n.texts.fields.lastBumpedBy," "),l(2),C(e.lastBumpedBy)}}function Ole(t,i){if(t&1&&(Z(0,"dt"),v(1),ie(),Z(2,"dd",2)(3,"span",3),oe(4,"i",4),Z(5,"span",5),v(6),ie()(),I(7,Rle,6,2,"span",3),ie()),t&2){d();let e=Ie(0),n=d();l(),C(n.texts.fields.lastBumpedAt),l(4),Qe("title",e.lastBumpedAt),l(),C(n.lastBumpedRel()),l(),M(e.lastBumpedBy!==null?7:-1)}}function Fle(t,i){if(t&1&&(Z(0,"span",3),oe(1,"i",6),Z(2,"span"),v(3),Z(4,"code"),v(5),ie()()()),t&2){d(2);let e=Ie(0),n=d();l(3),be("",n.texts.fields.createdBy," "),l(2),C(e.createdBy)}}function Nle(t,i){if(t&1&&(Z(0,"dt"),v(1),ie(),Z(2,"dd",7)(3,"span",3),oe(4,"i",8),Z(5,"span",5),v(6),ie()(),I(7,Fle,6,2,"span",3),ie()),t&2){d();let e=Ie(0),n=d();l(),C(n.texts.fields.createdAt),l(4),Qe("title",e.createdAt),l(),C(n.createdRel()),l(),M(e.createdBy!==null?7:-1)}}function Ale(t,i){if(t&1&&(Qt(0),Z(1,"dl",0),I(2,Ole,8,4),I(3,Nle,8,4),ie()),t&2){let e=wt(d().audit());l(2),M(e.lastBumpedAt!==null?2:-1),l(),M(e.createdAt!==null?3:-1)}}function Lle(t,i){if(t&1&&(Z(0,"p",1),v(1),ie()),t&2){let e=d();l(),C(e.texts.headerEmpty)}}var cP=(()=>{class t{sidecarRoot=B(null);texts=Zo.audit;audit=S(()=>{let e=this.sidecarRoot(),n={lastBumpedAt:null,lastBumpedBy:null,createdAt:null,createdBy:null};if(!e)return n;let o=e.audit;if(typeof o!="object"||o===null)return n;let r=o;return{lastBumpedAt:ff(r.lastBumpedAt),lastBumpedBy:ff(r.lastBumpedBy),createdAt:ff(r.createdAt),createdBy:ff(r.createdBy)}});hasContent=S(()=>{let e=this.audit();return e.lastBumpedAt!==null||e.lastBumpedBy!==null||e.createdAt!==null||e.createdBy!==null});lastBumpedRel=S(()=>{let e=this.audit().lastBumpedAt;return e===null?null:Pf(e)});createdRel=S(()=>{let e=this.audit().createdAt;return e===null?null:Pf(e)});static \u0275fac=function(n){return new(n||t)};static \u0275cmp=z({type:t,selectors:[["sm-inspector-audit-panel"]],inputs:{sidecarRoot:[1,"sidecarRoot"]},decls:2,vars:1,consts:[["data-testid","inspector-audit-panel",1,"sm-block__kv"],["data-testid","inspector-audit-panel-empty",1,"audit__empty"],["data-testid","inspector-audit-last-bumped",1,"sm-block__inline"],[1,"sm-block__meta"],["aria-hidden","true",1,"pi","pi-history"],[3,"title"],["aria-hidden","true",1,"pi","pi-user"],["data-testid","inspector-audit-created",1,"sm-block__inline"],["aria-hidden","true",1,"pi","pi-calendar-plus"]],template:function(n,o){n&1&&I(0,Ale,4,3,"dl",0)(1,Lle,2,1,"p",1),n&2&&M(o.hasContent()?0:1)},styles:["[_nghost-%COMP%]{display:block}.audit__empty[_ngcontent-%COMP%]{margin:0;font-style:italic;color:var(--sm-text-muted);font-size:.85rem}"],changeDetection:0})}return t})();function ff(t){return typeof t=="string"&&t.length>0?t:null}var dP={tagFilterAriaLabel:t=>`Select every node tagged ${t} on the map`,editTooltip:"Edit tags",addTooltip:"Add tags",viewLabel:"Tags",editorLabel:"Tags",save:"Save",cancel:"Cancel",saveAriaLabel:"Save tags",cancelAriaLabel:"Cancel editing tags",dismissErrorAriaLabel:"Dismiss error"};var Ble=()=>[import("./chunk-VHEFRMK3.js").then(t=>t.InputTypeControl)];function Vle(t,i){if(t&1){let e=$();h(0,"button",6),N("click",function(){let o=w(e).$implicit,r=d(2);return T(r.onChipClick(o))}),F(1,"i",7),v(2),m()}if(t&2){let e=i.$implicit,n=d(2);ce("node-tags__tag--active",n.isActive(e)),O("aria-pressed",n.isActive(e))("aria-label",n.texts.tagFilterAriaLabel(e)),l(2),be(" ",e," ")}}function zle(t,i){if(t&1){let e=$();h(0,"div",0)(1,"span",2),v(2),m(),ue(3,Vle,3,5,"button",3,Ze),h(5,"button",4),N("click",function(){w(e);let o=d();return T(o.startEdit())}),F(6,"i",5),m()()}if(t&2){let e=d();l(2),be("",e.texts.viewLabel,":"),l(),pe(e.tags()),l(2),_("pTooltip",e.editTooltip()),O("aria-label",e.editTooltip())}}function Hle(t,i){if(t&1){let e=$();h(0,"sm-input-type-control",12),N("valueChange",function(o){w(e);let r=d(2);return T(r.onDraftChange(o))}),m()}if(t&2){let e=d(2);_("descriptor",e.descriptor())("value",e.draft())}}function qle(t,i){if(t&1){let e=$();h(0,"span",11),F(1,"i",13),h(2,"span",14),v(3),m(),h(4,"button",15),N("click",function(){w(e);let o=d(2);return T(o.dismissError())}),F(5,"i",16),m()()}if(t&2){let e=d(2);l(3),C(i),l(),O("aria-label",e.texts.dismissErrorAriaLabel)}}function Gle(t,i){if(t&1){let e=$();h(0,"div",1),x0(1,Hle,1,2),w0(2,1,Ble),T0(),h(4,"div",8)(5,"p-button",9),N("onClick",function(){w(e);let o=d();return T(o.save())}),m(),h(6,"p-button",10),N("onClick",function(){w(e);let o=d();return T(o.cancelEdit())}),m()(),I(7,qle,6,2,"span",11),m()}if(t&2){let e,n=d();l(5),_("label",n.texts.save)("loading",n.inFlight())("disabled",n.inFlight()),O("aria-label",n.texts.saveAriaLabel),l(),_("label",n.texts.cancel)("disabled",n.inFlight()),O("aria-label",n.texts.cancelAriaLabel),l(),M((e=n.error())?7:-1,e)}}var jle="core/node-set-tags",uP=(()=>{class t{tags=B.required();activeTag=B(null);nodePath=B.required();tagClick=qe();texts=dP;dispatcher=p(ds);loader=p(pt);allTags=S(()=>{let e=new Set;for(let n of this.loader.nodes())for(let o of jn(n))e.add(o);return[...e].sort((n,o)=>n.localeCompare(o))});editingSig=K(!1);draftSig=K([]);inFlightSig=K(!1);errorSig=K(null);editing=this.editingSig.asReadonly();draft=this.draftSig.asReadonly();inFlight=this.inFlightSig.asReadonly();error=this.errorSig.asReadonly();resetOnNodeChange=se(()=>{this.nodePath(),this.editingSig.set(!1),this.errorSig.set(null)});descriptor=S(()=>({inputType:"string-list",label:this.texts.editorLabel,suggestions:this.allTags()}));editTooltip=S(()=>this.tags().length===0?this.texts.addTooltip:this.texts.editTooltip);isActive(e){return this.activeTag()===e}onChipClick(e){this.tagClick.emit(e)}startEdit(){this.errorSig.set(null),this.draftSig.set([...this.tags()]),this.editingSig.set(!0)}cancelEdit(){this.editingSig.set(!1)}onDraftChange(e){this.draftSig.set(Array.isArray(e)?e.filter(n=>typeof n=="string"):[])}async save(){let e=this.nodePath();if(!(!e||this.inFlightSig())){this.errorSig.set(null),this.inFlightSig.set(!0);try{await this.dispatcher.dispatch(jle,e,{tags:this.draftSig()});let n=this.dispatcher.error();if(n){this.errorSig.set(n);return}this.editingSig.set(!1)}finally{this.inFlightSig.set(!1)}}}dismissError(){this.errorSig.set(null),this.dispatcher.dismissError()}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=z({type:t,selectors:[["sm-node-tags"]],inputs:{tags:[1,"tags"],activeTag:[1,"activeTag"],nodePath:[1,"nodePath"]},outputs:{tagClick:"tagClick"},decls:2,vars:1,consts:[["data-testid","node-tags",1,"node-tags"],["data-testid","node-tags-editor",1,"node-tags","node-tags--editing"],[1,"node-tags__label"],["type","button","data-testid","node-tags-tag",1,"node-tags__tag",3,"node-tags__tag--active"],["type","button","data-testid","node-tags-edit",1,"node-tags__edit",3,"click","pTooltip"],["aria-hidden","true",1,"pi","pi-pencil"],["type","button","data-testid","node-tags-tag",1,"node-tags__tag",3,"click"],["aria-hidden","true",1,"pi","pi-tag"],[1,"node-tags__actions"],["size","small","data-testid","node-tags-save",3,"onClick","label","loading","disabled"],["size","small","severity","secondary","data-testid","node-tags-cancel",3,"onClick","label","disabled"],["role","alert","data-testid","node-tags-error",1,"node-tags__error"],["size","small",1,"node-tags__control",3,"valueChange","descriptor","value"],["aria-hidden","true",1,"pi","pi-exclamation-triangle"],[1,"node-tags__error-text"],["type","button","data-testid","node-tags-error-dismiss",1,"node-tags__error-dismiss",3,"click"],["aria-hidden","true",1,"pi","pi-times"]],template:function(n,o){n&1&&I(0,zle,7,3,"div",0)(1,Gle,8,8,"div",1),n&2&&M(o.editing()?1:0)},dependencies:[on,Gt,Le,Ve],styles:["[_nghost-%COMP%]{display:block;grid-column:1 / -1;margin-top:.55rem;padding-top:.5rem;border-top:1px solid var(--sm-border)}.node-tags[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:center;gap:.3rem}.node-tags__label[_ngcontent-%COMP%]{font-size:.68rem;font-weight:600;text-transform:uppercase;letter-spacing:.04em;color:var(--p-text-muted-color)}.node-tags__tag[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.25rem;padding:.1rem .5rem;border:1px solid transparent;border-radius:var(--sm-radius-sm);background:var(--sm-bg-hover);color:var(--p-text-color);font-size:.72rem;font-weight:500;line-height:1.35;cursor:pointer;transition:background .12s ease-out,color .12s ease-out,border-color .12s ease-out}.node-tags__tag[_ngcontent-%COMP%] .pi[_ngcontent-%COMP%]{font-size:.62rem;opacity:.7}.node-tags__tag[_ngcontent-%COMP%]:not(.node-tags__tag--active):hover{border-color:var(--sm-border);color:var(--p-primary-color)}.node-tags__tag[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--p-primary-color);outline-offset:1px}.node-tags__tag--active[_ngcontent-%COMP%]{background:var(--p-primary-color);color:var(--p-primary-contrast-color);border-color:var(--p-primary-color)}.node-tags__tag--active[_ngcontent-%COMP%]:hover{filter:brightness(1.08)}.node-tags__tag--active[_ngcontent-%COMP%] .pi[_ngcontent-%COMP%]{opacity:1}.node-tags__edit[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:1.5rem;height:1.5rem;padding:0;border:1px solid transparent;border-radius:var(--sm-radius-sm);background:var(--sm-bg-hover);color:var(--p-text-color);cursor:pointer;transition:background .12s ease-out,color .12s ease-out,border-color .12s ease-out}.node-tags__edit[_ngcontent-%COMP%]:hover{border-color:var(--sm-border);color:var(--p-primary-color)}.node-tags__edit[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--p-primary-color);outline-offset:1px}.node-tags__edit[_ngcontent-%COMP%] .pi[_ngcontent-%COMP%]{font-size:.7rem;opacity:.7}.node-tags__edit[_ngcontent-%COMP%]:hover .pi[_ngcontent-%COMP%]{opacity:1}.node-tags--editing[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;align-items:stretch}.node-tags__control[_ngcontent-%COMP%] .itc__label{display:none}[_nghost-%COMP%] .node-tags__control .p-autocomplete, [_nghost-%COMP%] .node-tags__control .p-autocomplete-input, [_nghost-%COMP%] .node-tags__actions .p-button{font-size:.72rem}.node-tags__actions[_ngcontent-%COMP%]{display:flex;gap:.4rem}.node-tags__error[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.55rem;font-size:.85rem;color:var(--sm-severity-error);background:var(--sm-severity-error-bg);padding:.55rem .75rem;border-radius:var(--sm-radius-md);border:1px solid color-mix(in srgb,var(--sm-severity-error) 30%,transparent)}.node-tags__error-text[_ngcontent-%COMP%]{min-width:0}.node-tags__error-dismiss[_ngcontent-%COMP%]{margin-left:auto;background:none;border:none;cursor:pointer;padding:0;line-height:1;color:inherit;display:inline-flex;align-items:center}.node-tags__error-dismiss[_ngcontent-%COMP%] .pi[_ngcontent-%COMP%]{font-size:.75rem}"],changeDetection:0})}return t})();function Ule(t,i){if(t&1&&(h(0,"span",7),F(1,"i",16),v(2),m()),t&2){let e=d();_("pTooltip",e.texts.header.invalidFrontmatterTooltip),l(2),be(" ",e.texts.header.invalidFrontmatter," ")}}function $le(t,i){t&1&&(h(0,"span",8),v(1),m()),t&2&&(l(),C(i))}function Wle(t,i){if(t&1&&(h(0,"span",9)(1,"span",17),v(2,"\u25CF"),m(),v(3),m()),t&2){let e=i;O("data-stability",e),l(3),be(" ",e," ")}}var Kle=new Set(["red","orange","yellow","green","cyan","blue","purple","pink"]),pP=(()=>{class t{node=B.required();frontmatterInvalid=B(!1);activeTag=B(null);favoriteToggle=qe();tagClick=qe();texts=Zo;cardTexts=Yn;headerName=S(()=>{let e=this.node(),n=e.frontmatter.name;return typeof n=="string"&&n.trim().length>0?n:e.path.split("/").pop()??e.path});headerVersion=S(()=>os(this.node()));headerStability=S(()=>lo(this.node()));headerTitleColor=S(()=>{let e=this.node(),o=e.frontmatter.color;return typeof o=="string"&&Kle.has(o)?o:`var(--sm-kind-${e.kind})`});headerTags=S(()=>jn(this.node()));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"],frontmatterInvalid:[1,"frontmatterInvalid"],activeTag:[1,"activeTag"]},outputs:{favoriteToggle:"favoriteToggle",tagClick:"tagClick"},decls:19,vars:21,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"],["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"],["slot","inspector.header.badge",3,"node"],[3,"tagClick","tags","activeTag","nodePath"],["aria-hidden","true",1,"pi","pi-exclamation-triangle"],["aria-hidden","true",1,"inspector__stability-dot"]],template:function(n,o){if(n&1&&(h(0,"header",0)(1,"span",1),v(2),m(),h(3,"div",2),F(4,"sm-kind-icon",3),m(),h(5,"div",4)(6,"div",5)(7,"h2",6),v(8),m(),I(9,Ule,3,2,"span",7),I(10,$le,2,1,"span",8),I(11,Wle,4,2,"span",9),m(),h(12,"code",10),v(13),m()(),h(14,"div",11)(15,"button",12),N("click",function(a){return o.onFavoriteClick(a)}),F(16,"i",13),m(),F(17,"sm-view-contributions-host",14),m(),h(18,"sm-node-tags",15),N("tagClick",function(a){return o.tagClick.emit(a)}),m()()),n&2){let r,a,s=o.node();l(2),C(s.kind),l(2),_("kind",s.kind)("provider",s.provider)("size",18),l(4),C(o.headerName()),l(),M(o.frontmatterInvalid()?9:-1),l(),M((r=o.headerVersion())?10:-1,r),l(),M((a=o.headerStability())?11:-1,a),l(2),C(s.path),l(2),ce("inspector__favorite--on",s.isFavorite===!0),_("pTooltip",s.isFavorite===!0?o.cardTexts.favoriteRemoveTooltip:o.cardTexts.favoriteAddTooltip),O("aria-label",s.isFavorite===!0?o.cardTexts.ariaFavoriteRemove:o.cardTexts.ariaFavoriteAdd),l(),ce("pi-star-fill",s.isFavorite===!0)("pi-star",s.isFavorite!==!0),l(),_("node",s),l(),_("tags",o.headerTags())("activeTag",o.activeTag())("nodePath",s.path)}},dependencies:[Le,Ve,Xo,uP,Wn],styles:["[_nghost-%COMP%]{display:block;flex:0 0 auto;padding:1rem 1.1rem 0}.inspector__header[_ngcontent-%COMP%]{position:relative;display:grid;grid-template-columns:auto minmax(0,1fr) auto;column-gap:.75rem;row-gap:.3rem;align-items:start;padding:0 .85rem .85rem;background:color-mix(in srgb,var(--accent) 10%,transparent);color:var(--p-text-color);border-left:3px solid var(--accent);border-bottom:1px solid var(--sm-border)}.inspector__kind-eyebrow[_ngcontent-%COMP%]{grid-column:1 / -1;grid-row:1;font-size:.78rem;font-weight:600;color:var(--accent);text-transform:lowercase;line-height:1.2}.inspector__icon-box[_ngcontent-%COMP%]{width:40px;height:40px;border-radius:var(--sm-radius-md);display:flex;align-items:center;justify-content:center;background:var(--accent);color:var(--sm-accent-fg);flex:none;font-size:1.05rem;grid-column:1;grid-row:2;align-self:start}.inspector__content[_ngcontent-%COMP%]{min-width:0;width:100%;display:flex;flex-direction:column;gap:.18rem}.inspector__name-row[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:baseline;gap:.5rem;min-width:0}.inspector__name[_ngcontent-%COMP%]{margin:0;font-size:1.05rem;font-weight:600;line-height:1.25;letter-spacing:-.01em;word-break:break-word;color:var(--p-text-color)}.inspector__fm-invalid[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.25rem;padding:.05rem .4rem;border-radius:var(--sm-radius-sm);font-size:.7rem;font-weight:500;text-transform:lowercase;white-space:nowrap;cursor:help;color:var(--sm-severity-warn);background:color-mix(in srgb,var(--sm-severity-warn) 12%,transparent);border:1px solid color-mix(in srgb,var(--sm-severity-warn) 35%,transparent)}.inspector__fm-invalid[_ngcontent-%COMP%] .pi[_ngcontent-%COMP%]{font-size:.68rem}.inspector__stability[_ngcontent-%COMP%]{font-size:.78rem;font-weight:500;text-transform:lowercase;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__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}"],changeDetection:0})}return t})();var hP={header:"Allow skill-map to create files in this project?",body:"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.",alwaysLabel:"Always allow editing .sm files in this project",alwaysHint:"When off, we ask again on the next write. When on, the choice is remembered for this project on this machine.",accept:"Allow",reject:"Not now",ariaLabel:"Sidecar write consent"};var Yle=()=>({width:"32rem"}),fP=(()=>{class t{texts=hP;open=B(!1);decision=qe();always=K(!1);alwaysChecked=S(()=>this.always());resetOnOpen=se(()=>{this.open()&&this.always.set(!1)});accept(){this.decision.emit({accepted:!0,always:this.always()})}decline(){this.decision.emit({accepted:!1,always:!1})}onVisibleChange(e){e||this.decline()}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=z({type:t,selectors:[["sm-sidecar-consent-dialog"]],inputs:{open:[1,"open"]},outputs:{decision:"decision"},decls:13,vars:19,consts:[["appendTo","body","data-testid","sidecar-consent-dialog",3,"visibleChange","visible","modal","closable","draggable","resizable","dismissableMask","header"],["data-testid","sidecar-consent-body",1,"consent__body"],["data-testid","sidecar-consent-always-row",1,"consent__always"],["inputId","sidecar-consent-always","data-testid","sidecar-consent-always",3,"ngModelChange","ngModel","binary"],[1,"consent__always-text"],[1,"consent__always-label"],[1,"consent__always-hint"],[1,"consent__actions"],["severity","secondary","data-testid","sidecar-consent-reject",3,"onClick","label","text"],["severity","primary","data-testid","sidecar-consent-accept",3,"onClick","label"]],template:function(n,o){n&1&&(h(0,"p-dialog",0),N("visibleChange",function(a){return o.onVisibleChange(a)}),h(1,"p",1),v(2),m(),h(3,"label",2)(4,"p-checkbox",3),rr("ngModelChange",function(a){return or(o.always,a)||(o.always=a),a}),m(),h(5,"span",4)(6,"span",5),v(7),m(),h(8,"span",6),v(9),m()()(),h(10,"div",7)(11,"p-button",8),N("onClick",function(){return o.decline()}),m(),h(12,"p-button",9),N("onClick",function(){return o.accept()}),m()()()),n&2&&(zt(Et(18,Yle)),_("visible",o.open())("modal",!0)("closable",!0)("draggable",!1)("resizable",!1)("dismissableMask",!0)("header",o.texts.header),O("aria-label",o.texts.ariaLabel),l(2),C(o.texts.body),l(2),ir("ngModel",o.always),_("binary",!0),l(3),C(o.texts.alwaysLabel),l(2),C(o.texts.alwaysHint),l(2),_("label",o.texts.reject)("text",!0),l(),_("label",o.texts.accept))},dependencies:[yt,Rt,Ot,on,Gt,ss,ov,gv,_v],styles:[".consent__body[_ngcontent-%COMP%]{margin:0 0 1rem;line-height:1.5;color:var(--p-text-color)}.consent__always[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:.6rem;cursor:pointer;margin-bottom:1.25rem}.consent__always-text[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.2rem}.consent__always-label[_ngcontent-%COMP%]{font-weight:600;color:var(--p-text-color)}.consent__always-hint[_ngcontent-%COMP%]{font-size:.85rem;color:var(--p-text-muted-color);line-height:1.4}.consent__actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:.5rem}"],changeDetection:0})}return t})();function u0(t){Pn(u0);let{path:i,dataSource:e,markdown:n}=t,o=K("idle"),r=K(null),a=0,s=async(c,u)=>{try{let f=await e.getNode(c,{includeBody:!0});if(u!==a)return;if(f===null){o.set("unavailable");return}let g=f.item.body;if(g===null){o.set("unavailable");return}if(g===void 0||g.trim().length===0){o.set("empty");return}let x=await n.render(g);if(u!==a)return;r.set(x),o.set("ready")}catch{if(u!==a)return;o.set("error")}};return se(()=>{let c=i(),u=++a;if(r.set(null),!c){o.set("idle");return}o.set("loading"),s(c,u)}),t.scanCompleted$?.pipe(Gn()).subscribe(()=>{let c=i();c&&s(c,++a)}),{bodyState:o.asReadonly(),bodyHtml:r.asReadonly()}}function p0(t){Pn(p0);let{path:i,pathSet:e,dataSource:n}=t,o=K(new Set),r=K(new Set),a=K(new Set);return se(()=>{i(),o.set(new Set),r.set(new Set),a.set(new Set)}),{linkStatus:f=>e().has(f)||o().has(f)?"live":r().has(f)?"dead-confirmed":"dead-heuristic",isVerifying:f=>a().has(f),verifyDeadLink:async f=>{if(!(o().has(f)||r().has(f))&&!a().has(f)){a.update(g=>new Set(g).add(f));try{await n.getNode(f)===null?r.update(x=>new Set(x).add(f)):o.update(x=>new Set(x).add(f))}catch{}finally{a.update(g=>{let x=new Set(g);return x.delete(f),x})}}}}}var _P="skill-map.ui.inspector.sections",Xle={body:!0,findings:!0,actions:!0,connections:!0};function mP(t){return Xle[t]??!1}function h0(){Pn(h0);let t=K(Zle());return se(()=>{Qle(t())}),{expanded:i=>t()[i]??mP(i),toggle:i=>t.update(e=>Bt(me({},e),{[i]:!(e[i]??mP(i))}))}}function Zle(){try{let t=localStorage.getItem(_P);if(!t)return{};let i=JSON.parse(t);if(i===null||typeof i!="object"||Array.isArray(i))return{};let e={};for(let[n,o]of Object.entries(i))typeof o=="boolean"&&(e[n]=o);return e}catch{return{}}}function Qle(t){try{localStorage.setItem(_P,JSON.stringify(t))}catch{}}var Jle=new Set(["identity","annotations","settings","audit"]),ece=new Set(["agent","skill","command"]);function gP(t){let{node:i}=t,e=S(()=>{let s=i()?.sidecar;if(!s||!s.present)return null;if(s.root)return s.root;let c={};return s.annotations&&(c.annotations=s.annotations),c}),n=S(()=>{let s=i()?.kind;return s!==void 0&&ece.has(s)}),o=S(()=>{let s=i();return s?(s.linksOutCount??0)+(s.linksInCount??0)+(s.externalRefsCount??0)>0:!1}),r=S(()=>{let s=e();if(!s)return!1;for(let c of Object.keys(s))if(!Jle.has(c))return!0;return!1}),a=S(()=>e()!==null);return{sidecarRoot:e,hasVendorFrontmatter:n,hasConnections:o,hasPluginContributions:r,hasMetadata:a}}function tce(t,i){if(t&1&&(h(0,"section",0)(1,"div",2),F(2,"span",3),h(3,"p",4),v(4),m(),h(5,"p",5),v(6),m()()()),t&2){let e=d();l(4),C(e.texts.emptyNoSelection.title),l(2),C(e.texts.emptyNoSelection.desc)}}function nce(t,i){if(t&1&&(h(0,"section",0)(1,"div",6),F(2,"span",7),h(3,"p",4),v(4),m(),h(5,"p",5)(6,"code"),v(7),m(),h(8,"span"),v(9),m()()()()),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 ice(t,i){if(t&1&&F(0,"p",11),t&2){let e=d(2);_("innerHTML",e.descriptionHtml(),yi)}}function oce(t,i){if(t&1&&(h(0,"div",23),F(1,"sm-view-contributions-host",24),m()),t&2){d(2);let e=Ie(0);l(),_("node",e)}}function rce(t,i){if(t&1){let e=$();h(0,"sm-collapsible-section",22),N("toggle",function(){w(e);let o=d(2);return T(o.toggleSection("actions"))}),I(1,oce,2,1,"div",23),m()}if(t&2){let e=d(2);_("title",e.texts.sections.actions)("expanded",e.expanded("actions")),l(),M(e.expanded("actions")?1:-1)}}function ace(t,i){if(t&1&&(h(0,"p",33)(1,"strong"),v(2),m(),v(3),m()),t&2){let e=d(5);l(2),C(e.texts.findingHintLabel),l(),be(" ",i," ")}}function sce(t,i){if(t&1&&(h(0,"li",28)(1,"div",29)(2,"span",30),v(3),m(),h(4,"code",31),v(5),m()(),h(6,"p",32),v(7),m(),I(8,ace,4,2,"p",33),m()),t&2){let e,n=i.$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(),M((e=n.fix==null?null:n.fix.summary)?8:-1,e)}}function lce(t,i){if(t&1&&(h(0,"ul",27),ue(1,sce,9,6,"li",28,Cf),m()),t&2){let e=d(3);l(),pe(e.sortedIssues())}}function cce(t,i){if(t&1){let e=$();h(0,"sm-collapsible-section",25),N("toggle",function(){w(e);let o=d(2);return T(o.toggleSection("findings"))}),h(1,"span",26),v(2),m(),I(3,lce,3,0,"ul",27),m()}if(t&2){let e=d(2);_("title",e.texts.sections.findings)("expanded",e.expanded("findings")),l(2),be("(",e.issues().length,")"),l(),M(e.expanded("findings")?3:-1)}}function dce(t,i){if(t&1){let e=$();h(0,"sm-linked-nodes-panel",36),N("openPath",function(o){w(e);let r=d(3);return T(r.openPath(o))}),m()}if(t&2){d(2);let e=Ie(0);_("path",e.path)}}function uce(t,i){if(t&1){let e=$();h(0,"sm-collapsible-section",34),N("toggle",function(){w(e);let o=d(2);return T(o.toggleSection("connections"))}),I(1,dce,1,1,"sm-linked-nodes-panel",35),m()}if(t&2){let e=d(2);_("title",e.texts.sections.connections)("expanded",e.expanded("connections")),l(),M(e.expanded("connections")?1:-1)}}function pce(t,i){if(t&1){let e=$();h(0,"div",15)(1,"sm-vendor-frontmatter",37),N("toggle",function(){w(e);let o=d(2);return T(o.toggleSection("definition"))}),m()()}if(t&2){d();let e=Ie(0),n=Ie(1),o=d();l(),_("frontmatter",n)("kind",e.kind)("provider",e.provider)("skillPathByName",o.skillPathByName())("onSkillClick",o.onSkillChip)("expanded",o.expanded("definition"))}}function hce(t,i){t&1&&(h(0,"code",39),v(1),m()),t&2&&(l(),be("(",i,")"))}function fce(t,i){if(t&1&&F(0,"sm-annotations-panel",40),t&2){d(2);let e=Ie(0);_("overlay",e.sidecar)}}function mce(t,i){if(t&1){let e=$();h(0,"sm-collapsible-section",38),N("toggle",function(){w(e);let o=d(2);return T(o.toggleSection("annotations"))}),I(1,hce,2,1,"code",39),I(2,fce,1,1,"sm-annotations-panel",40),m()}if(t&2){let e,n=d(2);_("title",n.texts.sections.annotations)("expanded",n.expanded("annotations")),l(),M((e=n.sidecarFileName())?1:-1,e),l(),M(n.expanded("annotations")?2:-1)}}function _ce(t,i){if(t&1&&(h(0,"p",42),v(1),m()),t&2){let e=d(4);l(),C(e.texts.body.loading)}}function gce(t,i){if(t&1&&F(0,"div",43),t&2){let e=d(4);_("innerHTML",e.bodyHtml(),yi)}}function vce(t,i){if(t&1&&I(0,_ce,2,1,"p",42)(1,gce,1,1,"div",43),t&2){let e,n=d(3);M((e=n.bodyState())==="loading"?0:e==="ready"?1:-1)}}function bce(t,i){if(t&1){let e=$();h(0,"sm-collapsible-section",41),N("toggle",function(){w(e);let o=d(2);return T(o.toggleSection("body"))}),I(1,vce,2,1),m()}if(t&2){let e=d(2);_("title",e.texts.sections.body)("expanded",e.expanded("body")),l(),M(e.expanded("body")?1:-1)}}function yce(t,i){if(t&1&&F(0,"sm-plugin-contributions",45),t&2){let e=d(3);_("sidecarRoot",e.sidecarRoot())}}function Cce(t,i){if(t&1){let e=$();h(0,"sm-collapsible-section",44),N("toggle",function(){w(e);let o=d(2);return T(o.toggleSection("plugins"))}),I(1,yce,1,1,"sm-plugin-contributions",45),m()}if(t&2){let e=d(2);_("title",e.texts.sections.plugins)("expanded",e.expanded("plugins")),l(),M(e.expanded("plugins")?1:-1)}}function xce(t,i){if(t&1&&(h(0,"div",47),F(1,"sm-inspector-audit-panel",45)(2,"sm-inspector-debug-panel",48),m()),t&2){d(2);let e=Ie(0),n=d();l(),_("sidecarRoot",n.sidecarRoot()),l(),_("node",e)("sidecarRoot",n.sidecarRoot())("overlay",e.sidecar)}}function wce(t,i){if(t&1){let e=$();h(0,"sm-collapsible-section",46),N("toggle",function(){w(e);let o=d(2);return T(o.toggleSection("metadata"))}),I(1,xce,3,4,"div",47),m()}if(t&2){let e=d(2);_("title",e.texts.sections.metadata)("expanded",e.expanded("metadata")),l(),M(e.expanded("metadata")?1:-1)}}function Tce(t,i){if(t&1){let e=$();Qt(0)(1),h(2,"section",8)(3,"sm-inspector-header",9),N("favoriteToggle",function(o){w(e);let r=d();return T(r.onHeaderFavoriteToggle(o))})("tagClick",function(o){w(e);let r=d();return T(r.tagSelect.emit(o))}),m(),h(4,"div",10),I(5,ice,1,1,"p",11),I(6,rce,2,3,"sm-collapsible-section",12),I(7,cce,4,4,"sm-collapsible-section",13),I(8,uce,2,3,"sm-collapsible-section",14),I(9,pce,2,6,"div",15),I(10,mce,3,4,"sm-collapsible-section",16),I(11,bce,2,3,"sm-collapsible-section",17),I(12,Cce,2,3,"sm-collapsible-section",18),F(13,"sm-inspector-plugin-sections",19),I(14,wce,2,3,"sm-collapsible-section",20),m(),h(15,"sm-sidecar-consent-dialog",21),N("decision",function(o){w(e);let r=d();return T(r.onConsentDecision(o))}),m()()}if(t&2){let e=d(),n=wt(e.node());l();let o=wt(n.frontmatter);l(),Oe("--accent","var(--sm-kind-"+n.kind+", var(--sm-kind-markdown))"),l(),_("node",n)("frontmatterInvalid",e.frontmatterInvalid())("activeTag",e.activeTag()),l(2),M(o.description?5:-1),l(),M(e.hasActions()?6:-1),l(),M(e.issues().length>0?7:-1),l(),M(e.hasConnections()?8:-1),l(),M(e.hasVendorFrontmatter()?9:-1),l(),M(e.hasAnnotations()?10:-1),l(),M(e.showBody()?11:-1),l(),M(e.hasPluginContributions()?12:-1),l(),_("node",e.node()),l(),M(e.hasMetadata()?14:-1),l(),_("open",e.consentOpen())}}var vP=(()=>{class t{loader=p(pt);nodeOpenIntent=p(co);dataSource=p(ao);markdown=p(po);wsEvents=p(is);actionDispatch=p(ds);texts=Zo;cardTexts=Yn;path=B(void 0);activeTag=B(null);tagSelect=qe();node=S(()=>{let e=this.path();return e?this.loader.nodes().find(n=>n.path===e)??null:null});pathSet=S(()=>{let e=new Set;for(let n of this.loader.nodes())e.add(n.path);return e});skillPathByName=S(()=>{let e=new Map;for(let n of this.loader.nodes()){if(n.kind!=="skill")continue;let o=n.frontmatter?.name;typeof o=="string"&&o.length>0&&e.set(o,n.path)}return e});sidecarFileName=S(()=>{let e=this.node()?.path;return e?(e.split("/").pop()??e).replace(/\.md$/,".sm"):null});bodyHandle=u0({path:this.path,dataSource:this.dataSource,markdown:this.markdown,scanCompleted$:this.wsEvents.scanCompleted$});bodyState=this.bodyHandle.bodyState;bodyHtml=this.bodyHandle.bodyHtml;showBody=S(()=>{let e=this.bodyState();return e==="loading"||e==="ready"});hasAnnotations=S(()=>c0(this.node()?.sidecar));hasActions=S(()=>(this.node()?.contributions??[]).some(e=>e.slot==="inspector.action.button"));descriptionHtml=Na(()=>this.node()?.frontmatter.description??"",this.markdown);deadLink=p0({path:this.path,pathSet:this.pathSet,dataSource:this.dataSource});sectionCollapse=h0();expanded(e){return this.sectionCollapse.expanded(e)}toggleSection(e){this.sectionCollapse.toggle(e)}derivations=gP({node:this.node});sidecarRoot=this.derivations.sidecarRoot;hasVendorFrontmatter=this.derivations.hasVendorFrontmatter;hasConnections=this.derivations.hasConnections;hasPluginContributions=this.derivations.hasPluginContributions;hasMetadata=this.derivations.hasMetadata;issues=K([]);issuesPath=void 0;issuesLoaderEffect=se(e=>{let n=this.node(),o=n?.path;if(o!==this.issuesPath&&(this.issues.set([]),this.issuesPath=o),!n||!o)return;let r=!1;e(()=>{r=!0}),this.dataSource.listIssues({node:o}).then(a=>{!r&&this.issuesPath===o&&this.issues.set(a.items)}).catch(()=>{!r&&this.issuesPath===o&&this.issues.set([])})});sortedIssues=S(()=>{let e={error:0,warn:1,info:2};return[...this.issues()].sort((n,o)=>e[n.severity]-e[o.severity])});frontmatterInvalid=S(()=>this.issues().some(e=>e.analyzerId==="frontmatter-parse-error"));ngOnInit(){this.loader.scanMeta()===null&&!this.loader.loading()&&this.loader.load()}openPath(e){this.nodeOpenIntent.open(e)}onSkillChip=e=>{this.openPath(e)};pathExists(e){return this.pathSet().has(e)}linkStatus(e){return this.deadLink.linkStatus(e)}isVerifying(e){return this.deadLink.isVerifying(e)}verifyDeadLink(e){return this.deadLink.verifyDeadLink(e)}onHeaderFavoriteToggle(e){let n=this.node();!n||n.path!==e||this.loader.toggleFavorite(e,!n.isFavorite)}consentOpen=this.actionDispatch.consentOpen;onConsentDecision(e){this.actionDispatch.resolveConsent(e)}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"},decls:3,vars:1,consts:[["data-testid","inspector-view",1,"inspector"],["data-testid","inspector-view",1,"inspector","inspector--node",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"],["data-testid","inspector-view",1,"inspector","inspector--node"],[3,"favoriteToggle","tagClick","node","frontmatterInvalid","activeTag"],["data-testid","inspector-scroll",1,"inspector__scroll"],["data-testid","inspector-description",1,"inspector__desc",3,"innerHTML"],["toggleTestid","inspector-actions-toggle","data-testid","inspector-card-actions",3,"title","expanded"],["toggleTestid","inspector-findings-toggle","data-testid","inspector-findings",3,"title","expanded"],["toggleTestid","inspector-connections-toggle","data-testid","inspector-card-linked-nodes",3,"title","expanded"],["data-testid","inspector-card-vendor-frontmatter",1,"inspector__vendor"],["toggleTestid","inspector-annotations-toggle","data-testid","inspector-card-annotations",3,"title","expanded"],["toggleTestid","inspector-body-toggle","data-testid","inspector-card-body",1,"inspector__body-section",3,"title","expanded"],["toggleTestid","inspector-plugins-toggle","data-testid","inspector-card-plugins",3,"title","expanded"],[3,"node"],["toggleTestid","inspector-metadata-toggle","data-testid","inspector-card-metadata",3,"title","expanded"],[3,"decision","open"],["toggleTestid","inspector-actions-toggle","data-testid","inspector-card-actions",3,"toggle","title","expanded"],[1,"inspector__actions"],["slot","inspector.action.button",3,"node"],["toggleTestid","inspector-findings-toggle","data-testid","inspector-findings",3,"toggle","title","expanded"],["smSectionTitleExtra","",1,"sm-block__count"],[1,"inspector__findings-list"],["data-testid","inspector-finding",1,"inspector__finding"],[1,"inspector__finding-head"],[1,"inspector__finding-severity"],[1,"inspector__finding-analyzer"],[1,"inspector__finding-message"],["data-testid","inspector-finding-hint",1,"inspector__finding-hint"],["toggleTestid","inspector-connections-toggle","data-testid","inspector-card-linked-nodes",3,"toggle","title","expanded"],[3,"path"],[3,"openPath","path"],[3,"toggle","frontmatter","kind","provider","skillPathByName","onSkillClick","expanded"],["toggleTestid","inspector-annotations-toggle","data-testid","inspector-card-annotations",3,"toggle","title","expanded"],["smSectionTitleExtra","","data-testid","inspector-sidecar-file",1,"inspector__sidecar-file"],[3,"overlay"],["toggleTestid","inspector-body-toggle","data-testid","inspector-card-body",1,"inspector__body-section",3,"toggle","title","expanded"],["data-testid","inspector-body-loading",1,"inspector__body-status"],["data-testid","inspector-body-rendered",1,"inspector__body-rendered",3,"innerHTML"],["toggleTestid","inspector-plugins-toggle","data-testid","inspector-card-plugins",3,"toggle","title","expanded"],[3,"sidecarRoot"],["toggleTestid","inspector-metadata-toggle","data-testid","inspector-card-metadata",3,"toggle","title","expanded"],["data-testid","inspector-metadata-section",1,"inspector__metadata"],[3,"node","sidecarRoot","overlay"]],template:function(n,o){n&1&&I(0,tce,7,2,"section",0)(1,nce,10,3,"section",0)(2,Tce,16,18,"section",1),n&2&&M(o.path()?o.node()?2:1:0)},dependencies:[XD,UD,JD,oP,aP,lP,cP,pP,hf,Wn,fP],styles:["[_nghost-%COMP%]{display:block;height:100%}.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--node[_ngcontent-%COMP%]{height:100%;min-height:0;overflow:hidden;padding:0;gap:0}.inspector__scroll[_ngcontent-%COMP%]{flex:1 1 auto;min-height:0;overflow-y:auto;display:flex;flex-direction:column;gap:.75rem;padding:.75rem 1.1rem 1.25rem}.inspector--empty[_ngcontent-%COMP%]{padding:2rem;color:var(--p-text-muted-color)}.inspector__desc[_ngcontent-%COMP%]{margin:0;color:var(--p-text-color);font-size:.88rem;line-height:1.5;max-width:none}.inspector__sidecar-file[_ngcontent-%COMP%]{font-family:var(--sm-font-mono);font-size:.7rem;font-weight:400;color:var(--p-text-muted-color)}[_nghost-%COMP%] .inspector__desc code{background:var(--sm-bg-hover);padding:.05rem .3rem;border-radius:var(--sm-radius-sm);font-family:var(--sm-font-mono);font-size:.85em}[_nghost-%COMP%] .inspector__desc a{color:var(--p-primary-color);text-decoration:underline}.inspector__actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.4rem;flex-wrap:wrap}[_nghost-%COMP%] .sm-block{display:flex;flex-direction:column;gap:.45rem;padding-left:.7rem;border-left:2px solid color-mix(in srgb,var(--accent) 70%,transparent);transition:border-color .14s ease}[_nghost-%COMP%] .sm-block--collapsible:hover{border-left-color:var(--accent)}[_nghost-%COMP%] .sm-block__title{margin:0;font-size:.82rem;font-weight:600;letter-spacing:0;color:var(--p-text-color);display:flex;align-items:baseline;gap:.4rem}[_nghost-%COMP%] .sm-block__count{font-size:.75rem;font-weight:500;color:var(--p-text-muted-color)}[_nghost-%COMP%] .sm-block__sub{margin:0;font-size:.72rem;font-weight:500;color:var(--p-text-muted-color);text-transform:uppercase;letter-spacing:.05em}[_nghost-%COMP%] .sm-block__row{display:flex;align-items:center;gap:.5rem;width:100%;padding:0;margin:0;background:transparent;border:none;text-align:left;font:inherit;color:var(--p-text-color)}[_nghost-%COMP%] .sm-block__row--toggle{cursor:pointer}[_nghost-%COMP%] .sm-block--collapsible>.sm-block__row--toggle+*{margin-top:.5rem;padding-top:.7rem;border-top:1px solid var(--sm-border)}[_nghost-%COMP%] .sm-block__row--toggle:hover .sm-block__title{color:var(--accent)}[_nghost-%COMP%] .sm-block__summary{font-size:.78rem;color:var(--p-text-muted-color);font-weight:400;flex:1 1 auto;margin-left:.3rem}[_nghost-%COMP%] .sm-block__chevron{color:var(--p-text-muted-color);font-size:.75rem;margin-left:auto}[_nghost-%COMP%] .sm-block__kv{display:grid;grid-template-columns:max-content 1fr;column-gap:1rem;row-gap:.35rem;margin:0;font-size:.85rem;align-items:baseline}[_nghost-%COMP%] .sm-block__kv dt{color:var(--p-text-muted-color);font-weight:500;font-size:.8rem}[_nghost-%COMP%] .sm-block__kv dd{margin:0;word-break:break-word;color:var(--p-text-color)}[_nghost-%COMP%] .sm-block__kv code{background:var(--sm-bg-hover);padding:.05rem .4rem;border-radius:var(--sm-radius-sm);font-size:.78rem;font-family:var(--sm-font-mono)}[_nghost-%COMP%] .sm-block__inline{display:flex;flex-wrap:wrap;align-items:center;gap:.45rem .65rem;row-gap:.35rem}[_nghost-%COMP%] .sm-block__meta{display:inline-flex;align-items:center;gap:.3rem;font-size:.83rem;color:var(--p-text-color)}[_nghost-%COMP%] .sm-block__meta .pi{color:var(--p-text-muted-color);font-size:.85rem}[_nghost-%COMP%] .sm-block__meta a{color:var(--p-primary-color);word-break:break-all}[_nghost-%COMP%] .sm-block__meta code{background:var(--sm-bg-hover);padding:.05rem .35rem;border-radius:var(--sm-radius-sm);font-size:.78rem}.inspector__vendor[_ngcontent-%COMP%]{display:contents}.inspector__body-section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.6rem}.inspector__body-status[_ngcontent-%COMP%]{margin:0;font-size:.85rem;color:var(--p-text-muted-color);font-style:italic}.inspector__body-status--warn[_ngcontent-%COMP%]{color:var(--sm-severity-warn);font-style:normal}[_nghost-%COMP%] .inspector__body-rendered{font-size:.9rem;line-height:1.6;max-height:480px;overflow:auto;padding:.25rem 0 0;--code-border: color-mix(in srgb, var(--sm-border) 70%, var(--p-text-muted-color))}[_nghost-%COMP%] .inspector__body-rendered :first-child{margin-top:0}[_nghost-%COMP%] .inspector__body-rendered :last-child{margin-bottom:0}[_nghost-%COMP%] .inspector__body-rendered h1, [_nghost-%COMP%] .inspector__body-rendered h2, [_nghost-%COMP%] .inspector__body-rendered h3, [_nghost-%COMP%] .inspector__body-rendered h4, [_nghost-%COMP%] .inspector__body-rendered h5, [_nghost-%COMP%] .inspector__body-rendered h6{margin:1.2rem 0 .6rem;font-weight:600;line-height:1.3}[_nghost-%COMP%] .inspector__body-rendered h1{font-size:1.35rem}[_nghost-%COMP%] .inspector__body-rendered h2{font-size:1.18rem}[_nghost-%COMP%] .inspector__body-rendered h3{font-size:1.05rem}[_nghost-%COMP%] .inspector__body-rendered h4{font-size:.95rem}[_nghost-%COMP%] .inspector__body-rendered h5, [_nghost-%COMP%] .inspector__body-rendered h6{font-size:.9rem;color:var(--p-text-muted-color)}[_nghost-%COMP%] .inspector__body-rendered h1, [_nghost-%COMP%] .inspector__body-rendered h2{padding-bottom:.3rem;border-bottom:1px solid var(--sm-border)}[_nghost-%COMP%] .inspector__body-rendered p{margin:.6rem 0}[_nghost-%COMP%] .inspector__body-rendered a{color:var(--p-primary-color);text-decoration:underline;text-underline-offset:2px}[_nghost-%COMP%] .inspector__body-rendered ul, [_nghost-%COMP%] .inspector__body-rendered ol{margin:.6rem 0;padding-left:1.4rem}[_nghost-%COMP%] .inspector__body-rendered li{margin:.2rem 0}[_nghost-%COMP%] .inspector__body-rendered li>ul, [_nghost-%COMP%] .inspector__body-rendered li>ol{margin:.2rem 0}[_nghost-%COMP%] .inspector__body-rendered blockquote{margin:.75rem 0;padding:.7rem .95rem;border-left:2px solid var(--sm-border);background:var(--sm-bg-hover);color:var(--p-text-color);font-size:.9rem;line-height:1.55;border-radius:0 var(--sm-radius-sm) var(--sm-radius-sm) 0}[_nghost-%COMP%] .inspector__body-rendered blockquote :first-child{margin-top:0}[_nghost-%COMP%] .inspector__body-rendered blockquote :last-child{margin-bottom:0}[_nghost-%COMP%] .inspector__body-rendered hr{margin:1.2rem 0;border:0;border-top:1px solid var(--sm-border)}[_nghost-%COMP%] .inspector__body-rendered img{max-width:100%;height:auto;border-radius:var(--sm-radius-sm)}[_nghost-%COMP%] .inspector__body-rendered table{border-collapse:collapse;width:100%;margin:.75rem 0;font-size:.85rem}[_nghost-%COMP%] .inspector__body-rendered th, [_nghost-%COMP%] .inspector__body-rendered td{border:1px solid var(--sm-border);padding:.35rem .55rem;text-align:left}[_nghost-%COMP%] .inspector__body-rendered th{background:var(--sm-bg-hover);font-weight:600}[_nghost-%COMP%] .inspector__body-rendered tbody tr:nth-child(2n){background:var(--sm-bg-hover)}[_nghost-%COMP%] .inspector__body-rendered pre{background:var(--sm-bg-hover);border:1px solid var(--code-border);border-radius:var(--sm-radius-md);padding:.75rem .85rem;margin:.75rem 0;white-space:pre;font-family:var(--sm-font-mono);font-size:.82rem;line-height:1.5;overflow-x:auto}[_nghost-%COMP%] .inspector__body-rendered code{background:var(--sm-bg-hover);border:1px solid var(--code-border);padding:.05rem .34rem;border-radius:var(--sm-radius-sm);font-family:var(--sm-font-mono);font-size:.85em}[_nghost-%COMP%] .inspector__body-rendered pre code{background:transparent;border:0;padding:0;border-radius:0;font-size:inherit}.inspector__metadata[_ngcontent-%COMP%]{display:flex;flex-direction:column}.inspector__metadata[_ngcontent-%COMP%] > sm-inspector-debug-panel[_ngcontent-%COMP%]{margin-top:.5rem;padding-top:.7rem;border-top:1px solid var(--sm-border)}.inspector__findings-list[_ngcontent-%COMP%]{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:.45rem}.inspector__finding[_ngcontent-%COMP%]{padding:.55rem .7rem;border-left:3px solid var(--p-content-border-color);background:var(--p-content-background);border-radius:var(--sm-radius-sm)}.inspector__finding[data-severity=error][_ngcontent-%COMP%]{border-left-color:var(--sm-severity-error);background:var(--sm-severity-error-bg)}.inspector__finding[data-severity=warn][_ngcontent-%COMP%]{border-left-color:var(--sm-severity-warn);background:var(--sm-severity-warn-bg)}.inspector__finding[data-severity=info][_ngcontent-%COMP%]{border-left-color:var(--sm-severity-info);background:var(--sm-severity-info-bg)}.inspector__finding-head[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;margin-bottom:.2rem}.inspector__finding-severity[_ngcontent-%COMP%]{text-transform:uppercase;font-size:.65rem;font-weight:700;letter-spacing:.05em;padding:.05rem .4rem;border-radius:var(--sm-radius-sm);color:var(--p-content-background);background:var(--p-text-color)}.inspector__finding-severity[data-severity=error][_ngcontent-%COMP%]{background:var(--sm-severity-error)}.inspector__finding-severity[data-severity=warn][_ngcontent-%COMP%]{background:var(--sm-severity-warn)}.inspector__finding-severity[data-severity=info][_ngcontent-%COMP%]{background:var(--sm-severity-info)}.inspector__finding-analyzer[_ngcontent-%COMP%]{font-size:.78rem;color:var(--p-text-muted-color)}.inspector__finding-message[_ngcontent-%COMP%]{margin:0;font-size:.88rem;color:var(--p-text-color);white-space:pre-line;overflow-wrap:anywhere}.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 bP=(()=>{class t{smMiddleMousePan=B.required();origin=null;rafId=null;pendingPosition=null;onMouseDown(e){if(e.button!==1)return;let n=this.smMiddleMousePan();if(!n)return;e.preventDefault();let o=n.getPosition()??{x:0,y:0};this.origin={mouseX:e.clientX,mouseY:e.clientY,canvasX:o.x,canvasY:o.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,o){n&1&&N("mousedown",function(a){return o.onMouseDown(a)})},inputs:{smMiddleMousePan:[1,"smMiddleMousePan"]}})}return t})();function yP(t,i){if(t.size===0)return{next:t,dirty:!1};let e=!1,n=new Set;for(let o of t)i.has(o)?n.add(o):e=!0;return{next:e?n:t,dirty:e}}function CP(t){let{nodes:i,current:e,layout:n}=t,o=new Set(i.map(c=>c.path)),r=!1,a=new Map(e);for(let c of a.keys())o.has(c)||(a.delete(c),r=!0);let s=!1;for(let c of o)if(!a.has(c)){s=!0;break}for(let c of o){let u=n.positions.get(c);if(!u)continue;let f=a.get(c);if(!f){a.set(c,{x:u.x,y:u.y}),r=!0;continue}f.manual!==!0&&s&&(f.x===u.x&&f.y===u.y||(a.set(c,{x:u.x,y:u.y}),r=!0))}return{next:a,dirty:r}}function xP(t){let{selectedPath:i,setSelectedNodeId:e,readSelectedNodeId:n,graphNodes:o,onDeepLinkSelect:r,router:a,route:s}=t,c=K0(s.queryParamMap.pipe(v0(u=>u.get("path"))),{initialValue:s.snapshot.queryParamMap.get("path")});se(()=>{let u=c(),f=o();if(f.length===0||!u)return;let g=Ht(()=>n());if(g!==null&&f.find(k=>k.id===g)?.view.path===u)return;let x=f.find(R=>R.view.path===u);x&&(e(x.id),r?.(x.id))}),se(()=>{let u=i(),f=Ht(()=>c());(u??null)!==(f??null)&&a.navigate([],{relativeTo:s,queryParams:{path:u??null},queryParamsHandling:"merge",replaceUrl:!0})})}function wP(t,i){return jn(t).includes(i)}function TP(t){if(typeof t!="object"||t===null)return!1;let i=t;return typeof i.x=="number"&&typeof i.y=="number"&&Number.isFinite(i.x)&&Number.isFinite(i.y)}function SP(t){if(typeof t!="object"||t===null)return!1;let i=t;return typeof i.x=="number"&&typeof i.y=="number"&&typeof i.scale=="number"&&Number.isFinite(i.x)&&Number.isFinite(i.y)&&Number.isFinite(i.scale)&&i.scale>0}function kP(t){return t.querySelector(".p-overlay-mask, .p-dialog, .p-overlay")!==null}var IP="sm.graph.viewport",MP="sm.graph.node-positions",EP="sm.graph.node-expanded",DP="sm.graph.panel-width";function PP(){let t=null;try{t=localStorage.getItem(IP)}catch{return null}if(!t)return null;let i;try{i=JSON.parse(t)}catch{return null}return SP(i)?i:null}function RP(t){try{localStorage.setItem(IP,JSON.stringify(t))}catch{}}function OP(){let t=new Map,i=null;try{i=localStorage.getItem(MP)}catch{return t}if(!i)return t;let e;try{e=JSON.parse(i)}catch{return t}if(typeof e!="object"||e===null)return t;for(let[n,o]of Object.entries(e)){if(!TP(o))continue;let r=o,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 Aa(t){try{let i={};for(let[e,n]of t)i[e]=n.manual?{x:n.x,y:n.y,manual:!0}:{x:n.x,y:n.y};localStorage.setItem(MP,JSON.stringify(i))}catch{}}function FP(){let t=null;try{t=localStorage.getItem(EP)}catch{return new Set}if(!t)return new Set;let i;try{i=JSON.parse(t)}catch{return new Set}if(!Array.isArray(i))return new Set;let e=new Set;for(let n of i)typeof n=="string"&&n.length>0&&e.add(n);return e}function mf(t){try{localStorage.setItem(EP,JSON.stringify([...t]))}catch{}}function NP(){let t=null;try{t=localStorage.getItem(DP)}catch{return null}if(!t)return null;let i=Number(t);return!Number.isFinite(i)||i<=0?null:i}function AP(t){try{localStorage.setItem(DP,String(Math.round(t)))}catch{}}var gf=500,_f=400,LP=80;function BP(t){let i=K(t.initialWidth),e=K(typeof window>"u"?1920:window.innerWidth);typeof window<"u"&&Ba(window,"resize").pipe(Gn(t.destroyRef)).subscribe(()=>e.set(window.innerWidth));let n=S(()=>{let g=Math.max(_f,e()-LP),x=i();return x>g||x<_f?Math.min(gf,g):x}),o=null,r=null,a=null,s=()=>{a=null,r!==null&&(i.set(r),r=null)},c=g=>{if(!o)return;let x=g.clientX-o.mouseX,R=o.widthAtStart-x,k=Math.max(_f,e()-LP);r=Math.min(k,Math.max(_f,R)),a===null&&typeof window<"u"&&(a=window.requestAnimationFrame(s))},u=()=>{o&&(o=null,document.removeEventListener("mousemove",c),document.removeEventListener("mouseup",u),a!==null&&typeof window<"u"&&(window.cancelAnimationFrame(a),a=null),r!==null&&(i.set(r),r=null),t.onCommit(i()))};return{clampedPanelWidth:n,onPanelResizeStart:g=>{g.button===0&&(g.preventDefault(),g.stopPropagation(),o={mouseX:g.clientX,widthAtStart:n()},document.addEventListener("mousemove",c),document.addEventListener("mouseup",u))}}}function VP(t){let i=K(null),e=null,n=()=>{if(e===null)return;let r=e;e=null,t.mapVisibility.setOnly(r)};return{activeTagSelection:i,onTagSelect:r=>{if(i()===r){i.set(null),n();return}let a=t.nodes().filter(s=>wP(s,r)).map(s=>s.path);if(a.length===0){i.set(null),n();return}e===null&&(e=new Set(t.mapVisibility.paths())),t.mapVisibility.setOnly(a),i.set(r)}}}var f0=.05,m0=2;function zP(t){let i=K(t.savedViewport?{x:t.savedViewport.x,y:t.savedViewport.y}:{x:0,y:0}),e=K(t.savedViewport?.scale??1),n=S(()=>e()<m0-1e-6),o=S(()=>e()>f0+1e-6);return{viewportPosition:i,viewportScale:e,canZoomIn:n,canZoomOut:o,onCanvasChange:a=>{let s=i();(s.x!==a.position.x||s.y!==a.position.y)&&i.set({x:a.position.x,y:a.position.y}),e()!==a.scale&&e.set(a.scale),t.hasCompletedInitialLayout()&&RP({x:a.position.x,y:a.position.y,scale:a.scale})}}}var Sce=.15,kce=.25,Ice=.75,Mce=.6;function HP(t){let i=S(()=>{let u=new Map;for(let f of t.graph().edges)u.has(f.from)||u.set(f.from,new Set),u.has(f.to)||u.set(f.to,new Set),u.get(f.from).add(f.to),u.get(f.to).add(f.from);return u}),e=u=>t.selectedNodeId()===u,n=u=>{let f=t.selectedNodeId();return f===null||f===u?!1:i().get(f)?.has(u)??!1},o=u=>{if(t.activeTagSelection()!==null)return!1;let f=t.selectedNodeId();return f===null||f===u?!1:!(i().get(f)?.has(u)??!1)},r=u=>{let f=t.selectedNodeId();return f!==null&&(u.from===f||u.to===f)},a=u=>{if(t.activeTagSelection()!==null)return!1;let f=t.selectedNodeId();return f===null?!1:u.from!==f&&u.to!==f},s=S(()=>{let u=t.selectedNodeId(),f=t.activeTagSelection()!==null,g=u!==null?i().get(u)??null:null,x=new Map;for(let R of t.graph().nodes){let k=R.id,A=u===k,q=!A&&u!==null&&(g?.has(k)??!1),W=!f&&u!==null&&!A&&!(g?.has(k)??!1);x.set(k,{selected:A,highlighted:q,dimmed:W})}return x}),c=S(()=>{let u=t.selectedNodeId(),f=t.activeTagSelection()!==null,g=new Map;for(let x of t.graph().edges){let R=u!==null&&(x.from===u||x.to===u),k=!f&&u!==null&&!R,A=typeof x.confidence=="number"?x.confidence:Mce,q=k?Sce:kce+Ice*A;g.set(x.id,{highlighted:R,dimmed:k,opacity:q})}return g});return{isSelected:e,isHighlighted:n,isDimmed:o,isEdgeHighlighted:r,isEdgeDimmed:a,selectionView:s,edgeSelectionView:c}}function qP(t){let i=t.onCommit??Aa,e=null,n=!1,o=null,r=()=>{queueMicrotask(()=>{if(!n){o=null;return}n=!1,o&&(t.nodePositions.set(o),o=null),i(t.nodePositions())})},a=(u,f)=>{o||(o=new Map(t.nodePositions())),o.set(u,{x:f.x,y:f.y,manual:!0}),n=!0},s=u=>{e={x:u.clientX,y:u.clientY},document.addEventListener("mouseup",r,{once:!0})},c=u=>{let f=e;if(e=null,!f)return!0;let g=u.clientX-f.x,x=u.clientY-f.y;return Math.hypot(g,x)<=4};return t.destroyRef.onDestroy(()=>{document.removeEventListener("mouseup",r)}),{onNodePositionChange:a,onNodePointerDown:s,isClickWithoutDrag:c}}function GP(t){let i=K(FP());return se(()=>{let r=new Set(t.nodes().map(s=>s.path));if(r.size===0)return;let a=yP(i(),r);a.dirty&&(i.set(a.next),mf(a.next))}),{isExpanded:r=>i().has(r),setExpanded:(r,a)=>{let s=i();if(s.has(r)===a)return;let c=new Set(s);a?c.add(r):c.delete(r),i.set(c),mf(c)},resetAll:()=>{i.set(new Set),mf(new Set)},expandedNodeIds:i}}function jP(t){let i=K(!1),e=!1,n=null;return se(()=>{let o=t.visibleNodes();e||o.length!==0&&queueMicrotask(()=>{e=!0,i.set(!0),t.savedViewport||t.fit()})}),se(()=>{let o=t.pathsFingerprint();if(!e){n=o;return}n!==o&&(n=o,(t.animatedFit??t.fit)())}),{hasCompletedInitialLayout:()=>i()}}function UP(t){let{points:i,wrap:e,panelW:n,zoomMin:o}=t;if(i.length===0)return null;let r=1/0,a=1/0,s=-1/0,c=-1/0;for(let Re of i)Re.x<r&&(r=Re.x),Re.y<a&&(a=Re.y),Re.x+260>s&&(s=Re.x+260),Re.y+120>c&&(c=Re.y+120);let u=Math.max(1,e.width-n),f=Math.max(1,s-r),g=Math.max(1,c-a),x=Math.max(1,u-160),R=Math.max(1,e.height-160),k=Math.min(x/f,R/g),A=Math.min(1,Math.max(o,k)),q=(r+s)/2,W=(a+c)/2,J=u/2-q*A,de=e.height/2-W*A;return{position:{x:J,y:de},scale:A}}function $P(t){let{point:i,wrap:e,panelW:n,scale:o}=t,r=i.x+260/2,a=i.y+120/2,c=Math.max(1,e.width-n)/2-r*o,u=e.height/2-a*o;return{position:{x:c,y:u},scale:o}}function _0(t,i,e){if(typeof requestAnimationFrame>"u"||e<=0){t.writePosition(i.position),t.writeScale(i.scale);return}let n=t.readPosition(),o=t.readScale(),r=performance.now(),a=s=>{if(t.isStaleToken())return;let c=Math.min(1,(s-r)/e),u=Ece(c);t.writePosition({x:n.x+(i.position.x-n.x)*u,y:n.y+(i.position.y-n.y)*u}),t.writeScale(o+(i.scale-o)*u),c<1&&requestAnimationFrame(a)};requestAnimationFrame(a)}function Ece(t){return 1-Math.pow(1-t,3)}var Dce=["canvasWrap"],XP=(t,i)=>i.id;function Pce(t,i){if(t&1&&(h(0,"div",2),F(1,"span",8),h(2,"p",9),v(3),m()()),t&2){let e=d();l(3),C(e.texts.loading)}}function Rce(t,i){if(t&1&&(h(0,"div",3),F(1,"span",10),h(2,"p",9),v(3),m(),h(4,"p",11),v(5),m()()),t&2){let e=d();l(3),C(e.texts.errorTitle),l(2),C(e.error())}}function Oce(t,i){if(t&1){let e=$();h(0,"div",4),F(1,"i",12),h(2,"p",13),v(3),m(),h(4,"p-button",14),N("onClick",function(){w(e);let o=d();return T(o.resetFilters())}),m()()}if(t&2){let e=d();l(3),C(e.texts.emptyTitle),l(),_("label",e.texts.resetFilters)("text",!0)}}function Fce(t,i){if(t&1){let e=$();h(0,"div",5),F(1,"i",15),h(2,"p",9),v(3),m(),h(4,"p-button",16),N("onClick",function(){w(e);let o=d();return T(o.mapVisibility.clear())}),m()()}if(t&2){let e=d();l(3),C(e.texts.curationEmptyTitle),l(),_("label",e.texts.showAllOnMap)("text",!0)}}function Nce(t,i){if(t&1&&(h(0,"f-connection",36),X(),h(1,"svg",37),F(2,"circle",38),m(),Va(),F(3,"f-connection-marker-arrow",39),m()),t&2){let e=i.$implicit,n=d(2),o=n.edgeSelectionFor(e.id);G("f-conn--"+e.kind),Oe("opacity",o.opacity),ce("f-conn--highlighted",o.highlighted)("f-conn--dimmed",o.dimmed),_("fOutputId",e.from+"-out")("fInputId",e.to+"-in")("fOutputSide",n.outputSide())("fInputSide",n.inputSide())("fType",n.connectionType())("fBehavior",n.connectionBehavior)("fReassignDisabled",!0),l(),_("type",n.markerStart)("width",9)("height",9)("refX",4.5)("refY",4.5),l(2),_("type",n.markerEnd)}}function Ace(t,i){if(t&1){let e=$();Te(0,23),h(1,"div",41),N("fNodePositionChange",function(o){let r=w(e).$implicit,a=d(3);return T(a.onNodePositionChange(r.id,o))})("pointerdown",function(o){w(e);let r=d(3);return T(r.onNodePointerDown(o))})("click",function(o){let r=w(e).$implicit,a=d(3);return T(a.selectNode(r,o))})("dblclick",function(){let o=w(e).$implicit,r=d(3);return T(r.openNode(o))}),h(2,"sm-node-card",42),N("expandedChange",function(o){let r=w(e).$implicit,a=d(3);return T(a.setExpanded(r.id,o))})("favoriteToggle",function(o){w(e);let r=d(3);return T(r.onFavoriteToggle(o))})("tagClick",function(o){w(e);let r=d(3);return T(r.onTagSelect(o))}),m(),h(3,"div",43),F(4,"sm-view-contributions-host",44),m()(),Se()}if(t&2){let e=i.$implicit,n=d(3);l(),_("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(),_("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),_("node",e.view)}}function Lce(t,i){if(t&1&&P(0,Ace,5,14,"ng-container",40),t&2){let e=d(2);_("fVirtualForOf",e.graph().nodes)}}function Bce(t,i){if(t&1){let e=$();h(0,"div",46),N("fNodePositionChange",function(o){let r=w(e).$implicit,a=d(3);return T(a.onNodePositionChange(r.id,o))})("pointerdown",function(o){w(e);let r=d(3);return T(r.onNodePointerDown(o))})("click",function(o){let r=w(e).$implicit,a=d(3);return T(a.selectNode(r,o))})("dblclick",function(){let o=w(e).$implicit,r=d(3);return T(r.openNode(o))}),h(1,"sm-node-card",42),N("expandedChange",function(o){let r=w(e).$implicit,a=d(3);return T(a.setExpanded(r.id,o))})("favoriteToggle",function(o){w(e);let r=d(3);return T(r.onFavoriteToggle(o))})("tagClick",function(o){w(e);let r=d(3);return T(r.onTagSelect(o))}),m(),h(2,"div",43),F(3,"sm-view-contributions-host",44),m()()}if(t&2){let e=i.$implicit,n=d(3);_("fNodeId",e.id)("fNodePosition",e.position)("fInputId",e.id+"-in")("fOutputId",e.id+"-out"),O("data-testid","graph-node-"+e.id),l(),_("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),_("node",e.view)}}function Vce(t,i){if(t&1&&(Te(0,23),ue(1,Bce,4,12,"div",45,XP),Se()),t&2){let e=d(2);l(),pe(e.graph().nodes)}}function zce(t,i){if(t&1&&F(0,"sm-perf-hud",29),t&2){let e=d(2);_("visible",e.visibleCount())("total",e.totalCount())("edges",e.edgeCount())}}function Hce(t,i){if(t&1){let e=$();F(0,"span",34),h(1,"p-button",47),N("onClick",function(){w(e);let o=d(2);return T(o.mapVisibility.clear())}),m()}if(t&2){let e=d(2);l(),_("label",e.texts.toolbar.showAllLabel)("ariaLabel",e.texts.toolbar.showAllAria)("pTooltip",e.texts.toolbar.showAllTooltip)("text",!0)}}function qce(t,i){if(t&1){let e=$();h(0,"div",17,0),N("click",function(o){w(e);let r=d();return T(r.onCanvasClick(o))}),F(2,"sm-branch-cap-banner"),h(3,"f-flow",18),N("fLoaded",function(){w(e);let o=d();return T(o.onLoaded())}),F(4,"f-selection-area"),h(5,"f-background"),F(6,"f-rect-pattern"),m(),F(7,"f-line-alignment",19),h(8,"f-canvas",20),N("fCanvasChange",function(o){w(e);let r=d();return T(r.onCanvasChange(o))}),Te(9,21),ue(10,Nce,4,21,"f-connection",22,XP),Se(),I(12,Lce,1,1,"ng-container",23)(13,Vce,3,0,"ng-container",23),m(),F(14,"f-minimap"),m(),h(15,"div",24),F(16,"sm-kind-palette")(17,"sm-severity-palette")(18,"sm-link-kind-palette"),m(),h(19,"aside",25)(20,"div",26),N("mousedown",function(o){w(e);let r=d();return T(r.onPanelResizeStart(o))}),m(),h(21,"div",27)(22,"sm-inspector-view",28),N("tagSelect",function(o){w(e);let r=d();return T(r.onTagSelect(o))}),m()()(),I(23,zce,1,3,"sm-perf-hud",29),h(24,"div",30)(25,"p-button",31),N("onClick",function(){w(e);let o=d();return T(o.zoomIn())}),m(),h(26,"p-button",32),N("onClick",function(){w(e);let o=d();return T(o.zoomOut())}),m(),h(27,"p-button",33),N("onClick",function(){w(e);let o=d();return T(o.fitToScreen())}),m(),F(28,"span",34)(29,"sm-graph-layout-toolbar")(30,"span",34),h(31,"p-button",35),N("onClick",function(){w(e);let o=d();return T(o.resetLayout())}),m(),I(32,Hce,2,4),m()()}if(t&2){let e=d();_("smMiddleMousePan",e.canvas()),l(3),_("fCache",e.perf.cache),l(4),_("fAlignThreshold",20),l(),_("position",e.viewportPosition())("scale",e.viewportScale())("fZoomStep",.06)("fZoomDblClickStep",.35)("fZoomMinimum",e.zoomMin)("fZoomMaximum",e.zoomMax)("debounceTime",150),l(2),pe(e.graph().edges),l(2),M(e.perf.virtualization?12:13),l(7),Oe("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),_("path",e.selectedPath())("activeTag",e.activeTagSelection()),l(),M(e.perfHud()?23:-1),l(),Oe("--sm-graph-inspector-w",e.reservedPanelWidth()+"px"),O("aria-label",e.texts.a11y.toolbar),l(),_("ariaLabel",e.texts.toolbar.zoomIn)("pTooltip",e.texts.toolbar.zoomIn)("text",!0)("rounded",!0)("disabled",!e.canZoomIn()),l(),_("ariaLabel",e.texts.toolbar.zoomOut)("pTooltip",e.texts.toolbar.zoomOut)("text",!0)("rounded",!0)("disabled",!e.canZoomOut()),l(),_("ariaLabel",e.texts.toolbar.fitToScreen)("pTooltip",e.texts.toolbar.fitToScreen)("text",!0)("rounded",!0),l(4),_("ariaLabel",e.texts.toolbar.resetLayoutLabel)("pTooltip",e.texts.toolbar.resetLayoutTooltip)("text",!0)("rounded",!0),l(),M(e.mapVisibility.isActive()?32:-1)}}var KP=.2,YP=420,Gce={selected:!1,highlighted:!1,dimmed:!1},jce={highlighted:!1,dimmed:!1,opacity:1},vf=(()=>{class t{loader=p(pt);filters=p(nn);issuePaths=p(Yo);mapVisibility=p(so);graphPreferences=p(sf);router=p(Xa);route=p(Ya);confirmationService=p(Ef);destroyRef=p(bt);dagreLayout=p(e0);injector=p(mt);usageTracker=p(Ov);flow=nt(oa);canvas=nt(ia);zoom=nt(ra);canvasWrap=nt("canvasWrap");connectionType=this.graphPreferences.connectionType;connectionBehavior=Jn.FIXED;markerStart=Be.START_ALL_STATES;markerEnd=Be.END_ALL_STATES;perf=af.graph.perf;perfHud=p(GD).visible;savedViewport=PP();viewportStore=zP({savedViewport:this.savedViewport,hasCompletedInitialLayout:()=>this.layoutFit.hasCompletedInitialLayout()});viewportPosition=this.viewportStore.viewportPosition;viewportScale=this.viewportStore.viewportScale;canZoomIn=this.viewportStore.canZoomIn;canZoomOut=this.viewportStore.canZoomOut;zoomMin=f0;zoomMax=m0;texts=gi;nodePositions=K(OP());nodeDrag=qP({destroyRef:this.destroyRef,nodePositions:this.nodePositions});expansion=GP({nodes:this.loader.nodes});panelResize=BP({destroyRef:this.destroyRef,initialWidth:NP()??gf,onCommit:e=>AP(e)});clampedPanelWidth=this.panelResize.clampedPanelWidth;loading=this.loader.loading;error=this.loader.error;visibleNodes=S(()=>this.filters.apply(this.loader.nodes(),this.issuePaths.bySeverity(),{includeSearch:this.filters.searchAffectsMap()}));topology=S(()=>Nv(this.loader.nodes(),this.loader.scan()));layoutPositions=K(new Map);layoutComputedAtSignal=K(0);fullLayout=S(()=>Bt(me({},this.topology()),{positions:this.layoutPositions(),computedAt:this.layoutComputedAtSignal()}));mapVisiblePaths=S(()=>new Set(this.visibleNodes().map(e=>e.path)));graph=S(()=>{let e=this.mapVisiblePaths(),n=this.filters.selectedLinkKinds(),o=n.length>0?new Set(n):null;return Av(this.fullLayout(),e,this.nodePositions(),o)});fullAdjacency=S(()=>{let e=new Map,n=(o,r)=>{let a=e.get(o);a||(a=new Set,e.set(o,a)),a.add(r)};for(let o of this.fullLayout().edges)n(o.from,o.to),n(o.to,o.from);return e});hasData=S(()=>this.graph().nodes.length>0);showEmptyState=S(()=>!this.hasData()&&!this.mapVisibility.isActive()&&!this.filters.kindToggleExplicitEmpty()&&this.filters.searchText().trim().length===0);showCurationEmptyState=S(()=>!this.hasData()&&this.mapVisibility.isActive());visibleCount=S(()=>this.graph().nodes.length);totalCount=S(()=>this.loader.nodes().length);edgeCount=S(()=>this.graph().edges.length);layoutComputedAt=S(()=>this.layoutComputedAtSignal());connectionSides=S(()=>vD(this.graphPreferences.layoutAlgorithm(),this.graphPreferences.layoutDirection()));inputSide=S(()=>this.connectionSides().input);outputSide=S(()=>this.connectionSides().output);selectedNodeId=K(null);selectedPath=S(()=>{let e=this.selectedNodeId();return e?this.graph().nodes.find(o=>o.id===e)?.view.path:void 0});reservedPanelWidth=S(()=>this.selectedNodeId()!==null?this.clampedPanelWidth():0);selectionGuard=se(()=>{let e=this.selectedNodeId();if(e===null)return;this.graph().nodes.some(o=>o.id===e)||this.selectedNodeId.set(null)});pathsFingerprint=S(()=>this.loader.nodes().map(e=>e.path).sort().join("|"));layoutFit=jP({visibleNodes:this.visibleNodes,pathsFingerprint:this.pathsFingerprint,savedViewport:this.savedViewport,fit:()=>this.fitToScreenClamped(),animatedFit:()=>this.animatedFitToScreen()});constructor(){let e=S(()=>this.loader.nodes().map(a=>({id:a.path,view:{path:a.path}})),{equal:(a,s)=>{if(a.length!==s.length)return!1;for(let c=0;c<a.length;c++)if(a[c]?.id!==s[c]?.id)return!1;return!0}});xP({selectedPath:this.selectedPath,setSelectedNodeId:a=>this.selectedNodeId.set(a),readSelectedNodeId:()=>this.selectedNodeId(),graphNodes:e,onDeepLinkSelect:a=>{this.pendingCenterNodeId.set(a)},router:this.router,route:this.route}),se(()=>{let a=this.loader.nodes();if(a.length===0)return;let s=this.fullLayout();if(s.positions.size===0)return;let c=CP({nodes:a,current:this.nodePositions(),layout:s});c.dirty&&(this.nodePositions.set(c.next),Aa(c.next))}),se(()=>{this.layoutComputedAt(),this.autoFitPending&&(this.autoFitPending=!1,this.runAnimatedFit())}),se(()=>{this.layoutComputedAt();let a=this.layoutFit.hasCompletedInitialLayout(),s=this.pendingCenterNodeId();s===null||!a||this.fullLayout().positions.size!==0&&(this.pendingCenterNodeId.set(null),eo(()=>this.centerOnNode(s),{injector:this.injector}))});let n=null;se(()=>{this.mapVisibility.paths();let a=this.activeTagSelection(),s=a!==n;if(n=a,s){this.mapFitDebounce!==null&&clearTimeout(this.mapFitDebounce),this.mapFitDebounce=null;return}Ht(()=>this.layoutFit.hasCompletedInitialLayout())&&(this.mapFitDebounce!==null&&clearTimeout(this.mapFitDebounce),this.mapFitDebounce=setTimeout(()=>{eo(()=>this.runAnimatedFit(),{injector:this.injector})},180))}),this.destroyRef.onDestroy(()=>{this.mapFitDebounce!==null&&clearTimeout(this.mapFitDebounce)}),se(()=>{let a=this.loader.liteNodes();a.length!==0&&Ht(()=>this.mapVisibility.prune(new Set(a.map(s=>s.path))))});let o="",r="";se(()=>{let a=this.loader.nodes(),s=this.topology(),c={algorithm:this.graphPreferences.layoutAlgorithm(),direction:this.graphPreferences.layoutDirection(),spacing:this.graphPreferences.layoutSpacing()};if(a.length===0)return;let u=Fv(a,s.edges),f=`${c.algorithm}|${c.direction}|${c.spacing}`,g=`${u}|${f}`;if(g===o)return;let x=r!==""&&r!==f;o=g,r=f,(c.algorithm==="force"?Promise.resolve(Nf(a,s.edges)):Promise.resolve().then(()=>Ff(this.dagreLayout,a,s.edges,c))).then(k=>{this.layoutPositions.set(k),this.layoutComputedAtSignal.set(performance.now()),x&&(this.nodePositions.set(new Map),this.fitToScreenClamped())}).catch(k=>{console.error("[graph-view] layout failed:",k)})})}ngOnInit(){this.loader.scanMeta()===null&&!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),eo(()=>{let o=e.transform.scale;if(o<=1&&o>=this.zoomMin)return;let r=Math.max(this.zoomMin,Math.min(o,1)),a=Math.abs(o-r),s=o>r?_n.ZOOM_OUT:_n.ZOOM_IN;n?.setZoom(this.getViewportCenter(),a,s,!1)},{injector:this.injector}))}autoFitAnimToken=0;autoFitPending=!1;mapFitDebounce=null;pendingCenterNodeId=K(null);animatedFitToScreen(){this.autoFitPending=!0}runAnimatedFit(){let e=this.computeVisibleFitTransform();if(!e)return;let n=++this.autoFitAnimToken;_0({readPosition:()=>this.viewportPosition(),readScale:()=>this.viewportScale(),writePosition:o=>this.viewportPosition.set(o),writeScale:o=>this.viewportScale.set(o),isStaleToken:()=>n!==this.autoFitAnimToken},e,YP)}computeVisibleFitTransform(){let e=this.canvasWrap()?.nativeElement;if(!e)return null;let n=this.fullLayout().positions;if(n.size===0)return null;let o=this.nodePositions(),r=[];for(let a of this.mapVisiblePaths()){let s=o.get(a)??n.get(a);s&&r.push({x:s.x,y:s.y})}return r.length===0?null:UP({points:r,wrap:{width:e.clientWidth,height:e.clientHeight},panelW:this.reservedPanelWidth(),zoomMin:this.zoomMin})}centerOnNode(e){if(!this.mapVisiblePaths().has(e))return;let n=this.canvasWrap()?.nativeElement;if(!n)return;let o=this.nodePositions().get(e)??this.fullLayout().positions.get(e);if(!o)return;let r=$P({point:o,wrap:{width:n.clientWidth,height:n.clientHeight},panelW:this.reservedPanelWidth(),scale:this.viewportScale()}),a=++this.autoFitAnimToken;_0({readPosition:()=>this.viewportPosition(),readScale:()=>this.viewportScale(),writePosition:s=>this.viewportPosition.set(s),writeScale:s=>this.viewportScale.set(s),isStaleToken:()=>a!==this.autoFitAnimToken},r,YP)}isolateNeighborhood(e){this.mapVisibility.isolate(e,gD(this.fullAdjacency(),e))==="isolated"&&this.selectedNodeId.set(e)}onNodePositionChange(e,n){this.nodeDrag.onNodePositionChange(e,n)}zoomIn(){this.zoom()?.setZoom(this.getViewportCenter(),KP,_n.ZOOM_IN,!0)}zoomOut(){this.zoom()?.setZoom(this.getViewportCenter(),KP,_n.ZOOM_OUT,!0)}fitToScreen(){this.runAnimatedFit()}resetLayout(){let e=this.mapVisiblePaths(),n=e.size>=this.loader.nodes().length;if(![...this.nodePositions().values()].some(a=>a.manual===!0)){this.applyResetLayout(e,n);return}let r=gi.resetLayoutConfirm;this.confirmationService.confirm({header:r.header,message:n?r.message:r.messageVisible,icon:"pi pi-info-circle",acceptButtonProps:{label:r.accept},rejectButtonProps:{label:r.reject,severity:"secondary",outlined:!0},accept:()=>this.applyResetLayout(e,n)})}applyResetLayout(e,n){if(this.expansion.resetAll(),n){this.nodePositions.set(new Map),this.runAnimatedFit();return}this.relayoutVisibleSubset(e).then(()=>this.runAnimatedFit()).catch(()=>{})}async relayoutVisibleSubset(e){let n=this.loader.nodes().filter(c=>e.has(c.path));if(n.length===0)return;let o=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"?Nf(n,o):Ff(this.dagreLayout,n,o,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),Aa(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=VP({nodes:this.loader.nodes,mapVisibility:this.mapVisibility});activeTagSelection=this.tagSelection.activeTagSelection;selectionState=HP({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"&&kP(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)??Gce}isExpanded(e){return this.expansion.isExpanded(e)}setExpanded(e,n){this.expansion.setExpanded(e,n)}onFavoriteToggle(e){this.loader.toggleFavorite(e.path,e.value)}edgeSelectionFor(e){return this.selectionState.edgeSelectionView().get(e)??jce}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=z({type:t,selectors:[["sm-graph-view"]],viewQuery:function(n,o){n&1&&pn(o.flow,oa,5)(o.canvas,ia,5)(o.zoom,ra,5)(o.canvasWrap,Dce,5),n&2&&Vt(4)},hostBindings:function(n,o){n&1&&N("keydown.escape",function(){return o.onEscape()},qa)},features:[Ee([Ef,aC(e0,{mode:Qn.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","tagClick","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,o){n&1&&(h(0,"section",1),I(1,Pce,4,1,"div",2)(2,Rce,6,2,"div",3)(3,Oce,5,3,"div",4)(4,Fce,5,3,"div",5)(5,qce,33,42,"div",6),F(6,"p-confirmdialog",7),m()),n&2&&(l(),M(o.loading()&&!o.hasData()?1:o.error()&&!o.hasData()?2:o.showEmptyState()?3:o.showCurationEmptyState()?4:5),l(5),_("ariaLabel",o.texts.resetLayoutConfirm.header))},dependencies:[_C,oa,ia,cC,lC,ra,hC,wy,Ty,dC,Gy,$y,uC,pC,Th,qy,fC,iC,yD,kD,DD,RD,LD,VD,HD,vP,on,Gt,bv,vv,Le,Ve,Wn,bP],styles:['[_nghost-%COMP%]{display:block;height:100%}.graph[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%}.graph__canvas-wrap[_ngcontent-%COMP%]{position:relative;flex:1;min-height:0;background:var(--sm-bg-content);overflow:hidden;--ff-connection-drag-handle-stroke: transparent;--ff-connection-drag-handle-fill: transparent;--ff-canvas-background-color: transparent}.graph__filter-stack[_ngcontent-%COMP%]{position:absolute;top:16px;left:16px;z-index:2;display:flex;flex-direction:column;gap:8px;pointer-events:none}.graph__filter-stack[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{pointer-events:auto}.graph__canvas-wrap[_ngcontent-%COMP%] f-flow[_ngcontent-%COMP%]{width:100%;height:100%}.graph__canvas-wrap[_ngcontent-%COMP%] .f-connection-drag-handle{fill:transparent;stroke:transparent}.graph__panel[_ngcontent-%COMP%]{position:absolute;top:0;right:0;bottom:0;background:var(--sm-bg-content);border-left:1px solid var(--sm-border);box-shadow:var(--sm-shadow-panel);transform:translate(100%);transition:transform .22s ease;z-index:20;pointer-events:none;display:flex;overflow:hidden}.graph__panel.is-open[_ngcontent-%COMP%]{transform:translate(0);pointer-events:auto}.graph__panel-scroll[_ngcontent-%COMP%]{flex:1;min-height:0;min-width:0;overflow-y:auto}.graph__panel-resize[_ngcontent-%COMP%]{position:absolute;top:0;left:-3px;bottom:0;width:6px;cursor:ew-resize;z-index:2}.graph__panel-resize[_ngcontent-%COMP%]:after{content:"";position:absolute;top:0;bottom:0;left:3px;width:4px;background:transparent;transition:background .12s ease}.graph__panel-resize[_ngcontent-%COMP%]:hover:after, .graph__panel-resize[_ngcontent-%COMP%]:active:after{background:var(--p-primary-color)}.graph__toolbar[_ngcontent-%COMP%]{position:absolute;bottom:16px;left:50%;transform:translate(calc(-50% - var(--sm-graph-inspector-w, 0px) / 2));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:transform .22s ease,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--points[_ngcontent-%COMP%]{--ff-connection-color: var(--sm-edge-points);--ff-connection-width: 1.25px;--ff-marker-color: var(--sm-edge-points)}.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--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--points.f-selected[_ngcontent-%COMP%]{--ff-connection-color: var(--sm-edge-points-active);--ff-connection-selected-color: var(--sm-edge-points-active);--ff-marker-color: var(--sm-edge-points-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)}.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 La=440,g0=280,Uce=480;function ZP(t){let i=K(t.initialWidth),e=K(typeof window>"u"?1920:window.innerWidth);typeof window<"u"&&Ba(window,"resize").pipe(Gn(t.destroyRef)).subscribe(()=>e.set(window.innerWidth));let n=()=>Math.max(g0,e()-Uce),o=S(()=>{let x=n(),R=i();return R>x||R<g0?Math.min(La,x):R}),r=null,a=null,s=null,c=()=>{s=null,a!==null&&(i.set(a),a=null)},u=x=>{if(!r)return;let R=x.clientX-r.mouseX,k=r.widthAtStart+R,A=n();a=Math.min(A,Math.max(g0,k)),s===null&&typeof window<"u"&&(s=window.requestAnimationFrame(c))},f=()=>{r&&(r=null,document.removeEventListener("mousemove",u),document.removeEventListener("mouseup",f),s!==null&&typeof window<"u"&&(window.cancelAnimationFrame(s),s=null),a!==null&&(i.set(a),a=null),t.onCommit(i()))};return{clampedRailWidth:o,onRailResizeStart:x=>{x.button===0&&(x.preventDefault(),x.stopPropagation(),r={mouseX:x.clientX,widthAtStart:o()},document.addEventListener("mousemove",u),document.addEventListener("mouseup",f))}}}var QP=(()=>{class t{router=p(Xa);route=p(Ya);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 $ce(t,i){if(t&1){let e=$();h(0,"p-iconfield",6),F(1,"p-inputicon",7),h(2,"input",8),N("ngModelChange",function(o){w(e);let r=d();return T(r.onSearchChange(o))}),m()(),h(3,"button",9),N("click",function(){w(e);let o=d();return T(o.onToggleSearchMap())}),F(4,"i",10),m(),h(5,"button",11),N("click",function(){w(e);let o=d();return T(o.resetView())}),F(6,"i",12),m()}if(t&2){let e=d();l(2),_("placeholder",e.texts.rail.searchPlaceholder)("ngModel",e.searchText()),O("aria-label",e.texts.rail.searchAriaLabel),l(),ce("is-active",e.searchAffectsMap()),_("pTooltip",e.searchAffectsMap()?e.texts.rail.searchMapOn:e.texts.rail.searchMapOff),O("aria-label",e.searchAffectsMap()?e.texts.rail.searchMapOn:e.texts.rail.searchMapOff)("aria-pressed",e.searchAffectsMap()),l(2),_("disabled",!e.canReset())("pTooltip",e.texts.rail.resetTooltip),O("aria-label",e.texts.rail.reset)}}function Wce(t,i){if(t&1){let e=$();h(0,"div",13),F(1,"sm-files-view"),m(),h(2,"div",14),N("mousedown",function(o){w(e);let r=d();return T(r.onRailResizeStart(o))}),m()}if(t&2){let e=d();l(2),O("aria-label",e.texts.rail.resize)}}var JP="sm.workspace.rail-width",e3="sm.workspace.rail-collapsed",ySe=(()=>{class t{store=p(nn);destroyRef=p(bt);loader=p(pt);mapVisibility=p(so);texts=Lv;canReset=S(()=>this.store.isActive()||this.mapVisibility.isActive());storedRailPref=this.readStoredCollapsed();railCollapsed=K(this.storedRailPref??!0);autoRailApplied=!1;userToggledRail=!1;railAnimating=K(!1);railAnimTimer=null;searchText=this.store.searchText;searchAffectsMap=this.store.searchAffectsMap;graphView=nt(vf);isolate(e){this.graphView()?.isolateNeighborhood(e)}resize=ZP({destroyRef:this.destroyRef,initialWidth:this.readStoredWidth(),onCommit:e=>this.writeStoredWidth(e)});clampedRailWidth=this.resize.clampedRailWidth;onRailResizeStart=this.resize.onRailResizeStart;constructor(){se(()=>{if(this.autoRailApplied||this.userToggledRail||this.storedRailPref!==null)return;let e=this.loader.corpusCount();if(e===0)return;this.autoRailApplied=!0;let n=this.loader.scanMeta()?.maxRenderNodes??256;e>n&&this.railCollapsed.set(!1)})}toggleRail(){this.userToggledRail=!0,this.railCollapsed.update(e=>!e),this.writeStoredCollapsed(this.railCollapsed()),this.railAnimating.set(!0),this.railAnimTimer!==null&&clearTimeout(this.railAnimTimer),this.railAnimTimer=setTimeout(()=>this.railAnimating.set(!1),220)}onSearchChange(e){this.store.setSearchText(e)}onToggleSearchMap(){this.store.toggleSearchAffectsMap()}resetView(){this.mapVisibility.clear(),this.store.reset()}readStoredWidth(){if(typeof localStorage>"u")return La;let e=Number(localStorage.getItem(JP));return Number.isFinite(e)&&e>0?e:La}writeStoredWidth(e){if(!(typeof localStorage>"u"))try{localStorage.setItem(JP,String(e))}catch{}}readStoredCollapsed(){if(typeof localStorage>"u")return null;let e=localStorage.getItem(e3);return e===null?null:e==="1"}writeStoredCollapsed(e){if(!(typeof localStorage>"u"))try{localStorage.setItem(e3,e?"1":"0")}catch{}}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=z({type:t,selectors:[["sm-workspace-view"]],viewQuery:function(n,o){n&1&&pn(o.graphView,vf,5),n&2&&Vt()},features:[Ee([{provide:co,useClass:QP},{provide:us,useExisting:Zi(()=>t)}])],decls:9,vars:15,consts:[["data-testid","workspace-view",1,"workspace"],["data-testid","workspace-rail",1,"workspace__rail"],[1,"workspace__rail-bar"],["type","button","tooltipPosition","bottom","data-testid","workspace-rail-toggle",1,"workspace__rail-btn",3,"click","pTooltip"],["aria-hidden","true",1,"pi"],[1,"workspace__map"],["iconPosition","left",1,"workspace__search"],["styleClass","pi pi-search"],["pInputText","","pSize","small","type","text","data-testid","workspace-search",3,"ngModelChange","placeholder","ngModel"],["type","button","tooltipPosition","bottom","data-testid","workspace-search-map-toggle",1,"workspace__rail-btn","workspace__search-map-toggle",3,"click","pTooltip"],["aria-hidden","true",1,"pi","pi-map"],["type","button","tooltipPosition","bottom","data-testid","workspace-reset-filters",1,"workspace__rail-btn",3,"click","disabled","pTooltip"],["aria-hidden","true",1,"pi","pi-filter-slash"],[1,"workspace__rail-body"],["role","separator","aria-orientation","vertical","data-testid","workspace-rail-resize",1,"workspace__rail-resize",3,"mousedown"]],template:function(n,o){n&1&&(h(0,"div",0)(1,"aside",1)(2,"div",2),I(3,$ce,7,11),h(4,"button",3),N("click",function(){return o.toggleRail()}),F(5,"i",4),m()(),I(6,Wce,3,1),m(),h(7,"div",5),F(8,"sm-graph-view"),m()()),n&2&&(l(),Oe("width",o.railCollapsed()?null:o.clampedRailWidth(),"px"),ce("is-collapsed",o.railCollapsed())("is-animating",o.railAnimating()),O("aria-label",o.texts.rail.label),l(2),M(o.railCollapsed()?-1:3),l(),_("pTooltip",o.railCollapsed()?o.texts.rail.expand:o.texts.rail.collapse),O("aria-label",o.railCollapsed()?o.texts.rail.expand:o.texts.rail.collapse),l(),ce("pi-angle-left",!o.railCollapsed())("pi-angle-right",o.railCollapsed()),l(),M(o.railCollapsed()?-1:6))},dependencies:[Bb,vf,yt,V0,Rt,Ot,q0,H0,j0,G0,ns,ts,Le,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:var(--sm-radius-lg);background:transparent;color:var(--p-text-muted-color);cursor:pointer}.workspace__rail-btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--p-content-hover-background);color:var(--p-text-color)}.workspace__rail-btn[_ngcontent-%COMP%]:disabled{opacity:.4;cursor:default}.workspace__search-map-toggle.is-active[_ngcontent-%COMP%]{color:var(--p-primary-color);background:var(--p-highlight-background)}.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{ySe as WorkspaceView};