@skill-map/cli 0.67.0 → 0.68.1

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 (105) hide show
  1. package/dist/cli/tutorial/sm-tutorial/SKILL.md +30 -23
  2. package/dist/cli/tutorial/sm-tutorial/fixtures-data/edits/agents-hub/providers/agent-skills/en/agents-hub.md +2 -0
  3. package/dist/cli/tutorial/sm-tutorial/fixtures-data/edits/agents-hub/providers/agent-skills/es/agents-hub.md +2 -0
  4. package/dist/cli/tutorial/sm-tutorial/fixtures-data/edits/content-editor-style/providers/agent-skills/en/content-editor-style.md +1 -0
  5. package/dist/cli/tutorial/sm-tutorial/fixtures-data/edits/content-editor-style/providers/agent-skills/es/content-editor-style.md +1 -0
  6. package/dist/cli/tutorial/sm-tutorial/fixtures-data/edits/todo-connectors/providers/agent-skills/en/todo-bullet-guideline.md +1 -0
  7. package/dist/cli/tutorial/sm-tutorial/fixtures-data/edits/todo-connectors/providers/agent-skills/en/todo-bullet-guideline2.md +1 -0
  8. package/dist/cli/tutorial/sm-tutorial/fixtures-data/edits/todo-connectors/providers/agent-skills/en/todo-bullet-skill.md +1 -0
  9. package/dist/cli/tutorial/sm-tutorial/fixtures-data/edits/todo-connectors/providers/agent-skills/es/todo-bullet-guideline.md +1 -0
  10. package/dist/cli/tutorial/sm-tutorial/fixtures-data/edits/todo-connectors/providers/agent-skills/es/todo-bullet-guideline2.md +1 -0
  11. package/dist/cli/tutorial/sm-tutorial/fixtures-data/edits/todo-connectors/providers/agent-skills/es/todo-bullet-skill.md +1 -0
  12. package/dist/cli/tutorial/sm-tutorial/fixtures-data/manifest.json +9 -4
  13. package/dist/cli/tutorial/sm-tutorial/fixtures-data/sets/harness/providers/agent-skills/en/__PROVIDER__/skills/publish/SKILL.md +15 -0
  14. package/dist/cli/tutorial/sm-tutorial/fixtures-data/sets/harness/providers/agent-skills/es/__PROVIDER__/skills/publish/SKILL.md +16 -0
  15. package/dist/cli/tutorial/sm-tutorial/fixtures-data/sets/harness/providers/codex/en/__PROVIDER__/skills/publish/SKILL.md +15 -0
  16. package/dist/cli/tutorial/sm-tutorial/fixtures-data/sets/harness/providers/codex/es/__PROVIDER__/skills/publish/SKILL.md +16 -0
  17. package/dist/cli/tutorial/sm-tutorial/fixtures-data/sets/master/providers/agent-skills/en/__PROVIDER__/skills/master-agent/SKILL.md +13 -0
  18. package/dist/cli/tutorial/sm-tutorial/fixtures-data/sets/master/providers/agent-skills/es/__PROVIDER__/skills/master-agent/SKILL.md +14 -0
  19. package/dist/cli/tutorial/sm-tutorial/fixtures-data/sets/master/providers/codex/en/.codex/agents/master-agent.toml +10 -0
  20. package/dist/cli/tutorial/sm-tutorial/fixtures-data/sets/master/providers/codex/es/.codex/agents/master-agent.toml +10 -0
  21. package/dist/cli/tutorial/sm-tutorial/fixtures-data/sets/portfolio/providers/agent-skills/en/AGENTS.md +7 -0
  22. package/dist/cli/tutorial/sm-tutorial/fixtures-data/sets/portfolio/providers/agent-skills/en/__PROVIDER__/skills/content-editor/SKILL.md +20 -0
  23. package/dist/cli/tutorial/sm-tutorial/fixtures-data/sets/portfolio/providers/agent-skills/es/AGENTS.md +7 -0
  24. package/dist/cli/tutorial/sm-tutorial/fixtures-data/sets/portfolio/providers/agent-skills/es/__PROVIDER__/skills/content-editor/SKILL.md +20 -0
  25. package/dist/cli/tutorial/sm-tutorial/fixtures-data/sets/portfolio/providers/agent-skills/shared/CLAUDE.md +1 -0
  26. package/dist/cli/tutorial/sm-tutorial/fixtures-data/sets/portfolio/providers/codex/en/.codex/agents/content-editor.toml +19 -0
  27. package/dist/cli/tutorial/sm-tutorial/fixtures-data/sets/portfolio/providers/codex/es/.codex/agents/content-editor.toml +19 -0
  28. package/dist/cli/tutorial/sm-tutorial/fixtures-data/sets/prologue/providers/codex/en/.codex/agents/demo-agent.toml +13 -0
  29. package/dist/cli/tutorial/sm-tutorial/fixtures-data/sets/prologue/providers/codex/en/__PROVIDER__/skills/demo-command/SKILL.md +11 -0
  30. package/dist/cli/tutorial/sm-tutorial/fixtures-data/sets/prologue/providers/codex/es/.codex/agents/demo-agent.toml +13 -0
  31. package/dist/cli/tutorial/sm-tutorial/fixtures-data/sets/prologue/providers/codex/es/__PROVIDER__/skills/demo-command/SKILL.md +12 -0
  32. package/dist/cli/tutorial/sm-tutorial/references/_core.md +102 -49
  33. package/dist/cli/tutorial/sm-tutorial/references/_manifest.json +168 -20
  34. package/dist/cli/tutorial/sm-tutorial/references/_manifest.yml +85 -19
  35. package/dist/cli/tutorial/sm-tutorial/references/fixtures.md +6 -7
  36. package/dist/cli/tutorial/sm-tutorial/references/part-authoring.md +2 -2
  37. package/dist/cli/tutorial/sm-tutorial/references/part-basic-daily.md +241 -0
  38. package/dist/cli/tutorial/sm-tutorial/references/part-basic-fundamentals.md +351 -0
  39. package/dist/cli/tutorial/sm-tutorial/references/part-basic-kickoff.md +285 -0
  40. package/dist/cli/tutorial/sm-tutorial/references/part-cli.md +1 -1
  41. package/dist/cli/tutorial/sm-tutorial/references/part-daily-loop.md +62 -99
  42. package/dist/cli/tutorial/sm-tutorial/references/part-fundamentals.md +35 -34
  43. package/dist/cli/tutorial/sm-tutorial/references/part-mcp.md +3 -6
  44. package/dist/cli/tutorial/sm-tutorial/references/part-plugins.md +1 -1
  45. package/dist/cli/tutorial/sm-tutorial/references/part-project-kickoff.md +198 -26
  46. package/dist/cli/tutorial/sm-tutorial/references/part-settings.md +19 -15
  47. package/dist/cli/tutorial/sm-tutorial/scripts/fixtures.js +85 -22
  48. package/dist/cli/tutorial/sm-tutorial/scripts/lib/paths.js +74 -4
  49. package/dist/cli/tutorial/sm-tutorial/scripts/state.js +22 -6
  50. package/dist/cli.js +409 -168
  51. package/dist/conformance/index.js +42 -2
  52. package/dist/index.js +43 -30
  53. package/dist/kernel/index.d.ts +28 -5
  54. package/dist/kernel/index.js +43 -30
  55. package/dist/ui/chunk-22EQLC23.js +1845 -0
  56. package/dist/ui/chunk-3ANNEMV4.js +499 -0
  57. package/dist/ui/{chunk-5BJGO7GH.js → chunk-3U4QZKU2.js} +4 -4
  58. package/dist/ui/chunk-3ZAHOYQ7.js +1 -0
  59. package/dist/ui/{chunk-56CBK7LB.js → chunk-6FGV5O5J.js} +1 -1
  60. package/dist/ui/chunk-7WMT2LX4.js +1 -0
  61. package/dist/ui/{chunk-276RLZR4.js → chunk-BSIR3ADF.js} +14 -14
  62. package/dist/ui/{chunk-FC22ZJQZ.js → chunk-CG25RHMO.js} +1 -1
  63. package/dist/ui/chunk-EFSC6SOL.js +3 -0
  64. package/dist/ui/chunk-EJVWTBMV.js +4 -0
  65. package/dist/ui/chunk-EZI3BXQN.js +1 -0
  66. package/dist/ui/{chunk-JZ2YF7EL.js → chunk-GUPPOK7U.js} +8 -8
  67. package/dist/ui/{chunk-CJURGJTN.js → chunk-HLALESGR.js} +1 -1
  68. package/dist/ui/chunk-I3I4KHR5.js +2 -0
  69. package/dist/ui/{chunk-BOVJVOLH.js → chunk-I6ED2OW7.js} +1 -1
  70. package/dist/ui/chunk-JKPG5PO7.js +375 -0
  71. package/dist/ui/chunk-K3ZRQNN5.js +2 -0
  72. package/dist/ui/chunk-KHDWXSGR.js +1 -0
  73. package/dist/ui/{chunk-HEK4PH5A.js → chunk-KMHXNOFZ.js} +1 -1
  74. package/dist/ui/chunk-KWT7E2RJ.js +16 -0
  75. package/dist/ui/{chunk-WHZVGOS3.js → chunk-MQSU6EFZ.js} +1 -1
  76. package/dist/ui/{chunk-43S72FTV.js → chunk-OGEE252A.js} +1 -1
  77. package/dist/ui/{chunk-J4J42HJ4.js → chunk-PU5OP5RN.js} +1 -1
  78. package/dist/ui/{chunk-UTRZTB6V.js → chunk-QVG7J2MP.js} +1 -1
  79. package/dist/ui/chunk-TLMV4LOQ.js +3 -0
  80. package/dist/ui/chunk-TQBXK5JN.js +1 -0
  81. package/dist/ui/chunk-Z7SOKILO.js +2 -0
  82. package/dist/ui/{chunk-WCABR6TI.js → chunk-ZRJ5ZCFR.js} +1 -1
  83. package/dist/ui/index.html +2 -2
  84. package/dist/ui/main-R7BIU4HU.js +4 -0
  85. package/dist/ui/styles-VEGETYWD.css +1 -0
  86. package/package.json +17 -18
  87. package/dist/cli/tutorial/sm-tutorial/references/part-connect-harness.md +0 -173
  88. package/dist/ui/chunk-34ZZDYNQ.js +0 -1
  89. package/dist/ui/chunk-444BFYGR.js +0 -3
  90. package/dist/ui/chunk-44VNNUSQ.js +0 -2
  91. package/dist/ui/chunk-4SG4352Z.js +0 -7
  92. package/dist/ui/chunk-5ITZXW3A.js +0 -1
  93. package/dist/ui/chunk-7ANZW2OI.js +0 -499
  94. package/dist/ui/chunk-BJ6X6WBO.js +0 -4
  95. package/dist/ui/chunk-CZSLV6YD.js +0 -1
  96. package/dist/ui/chunk-DLYJHLJX.js +0 -2
  97. package/dist/ui/chunk-LGFABCIA.js +0 -16
  98. package/dist/ui/chunk-LPDD2DHE.js +0 -369
  99. package/dist/ui/chunk-P3SNMV4X.js +0 -2
  100. package/dist/ui/chunk-S4S5ZMXJ.js +0 -3
  101. package/dist/ui/chunk-VHEFRMK3.js +0 -1
  102. package/dist/ui/chunk-X6TRIDBI.js +0 -1845
  103. package/dist/ui/main-V77F2KZX.js +0 -4
  104. package/dist/ui/styles-I4ULXD3V.css +0 -1
  105. /package/dist/ui/{chunk-Y2Z26SRI.js → chunk-5RNLC6V4.js} +0 -0
@@ -0,0 +1,1845 @@
1
+ import{a as Yn,b as Xn,d as Av,e as Lv,f as Bv,g as Hv,h as qv,i as ho}from"./chunk-3U4QZKU2.js";import{A as Jv,B as eb,C as tb,D as Zn,I as nb,K as ob,L as rb,M as Gh,N as jh,O as ab,a as ls,b as uo,c as vv,d as Kn,e as bv,f as gr,g as zh,h as yv,i as Cv,j as xv,k as on,l as po,m as Gv,n as ps,o as jv,p as Uv,q as $v,r as Wv,s as Kv,t as Yv,u as fs,w as Xv,x as Zv,y as hs,z as Qv}from"./chunk-K3ZRQNN5.js";import{f as Ja,i as es}from"./chunk-KHDWXSGR.js";import{a as Wn,b as gv,c as lo,e as co,h as ss,i as pt,l as ib}from"./chunk-KMHXNOFZ.js";import"./chunk-Z7SOKILO.js";import{c as Fh,d as ts,f as ur,g as ns}from"./chunk-5RNLC6V4.js";import{a as Vv,b as zv}from"./chunk-QVG7J2MP.js";import{a as wv,b as jt,c as rn}from"./chunk-CG25RHMO.js";import{a as dv,b as uv,c as pv,d as fv,f as Tv,h as Sv,i as kv,j as Iv,k as us,l as Mv,m as Dv,n as Ev,o as fo,p as Pv,q as Rv,s as Ov,t as qh,u as Fv,v as Nv}from"./chunk-BSIR3ADF.js";import{Aa as Hh,B as hr,Ba as ds,D as Lh,H as iv,J as ov,K as is,N as mr,O as ut,Q as Bh,R as rv,S as Vh,T as av,U as ao,X as Ot,Y as ot,Z as en,_ as tn,ba as os,c as ev,ca as lv,da as cv,ea as Ft,fa as Nt,ga as Ct,ha as nn,i as $n,ia as Nn,ja as Le,k as _n,ka as so,l as pr,na as rs,o as fr,oa as as,p as Nh,pa as ye,q as tv,qa as hv,r as nv,ra as mv,sa as _r,t as ki,ta as xe,ua as _v,v as xn,va as wn,w as dt,wa as Be,xa as Fe,y as Ah,ya as cs,za as Pe}from"./chunk-JKPG5PO7.js";import{f as Qa,g as J0,h as oo,i as Si,j as ro,k as mn,l as Rt,p as Gt}from"./chunk-7WMT2LX4.js";import{C as sv}from"./chunk-TQBXK5JN.js";import{$ as yt,$a as Ue,$b as v,Ab as Q,Ac as Za,Bb as ie,Bc as Oh,Cb as oe,Cc as Ti,Db as Se,Eb as ke,Fb as pe,Ga as Gn,Gb as Ka,Ha as rr,Hb as Ya,Ia as $a,Ib as K,Ic as Y,J as Ji,Ja as l,Jb as Qe,Jc as De,K as C,Kb as A,L as Dt,Mb as u,N as _e,Nb as fn,O as eo,Oa as no,Ob as $e,P as p,Pa as G0,Pb as jn,Qb as io,Ra as j0,Rb as ee,Sa as Fn,Sb as te,T as q0,Tb as Ph,U as Cn,Ua as Wa,Ub as hn,V as k,Vb as Ht,W as I,Wb as gt,X as Z,Xb as Oe,Y as Ga,Yb as se,Z as mt,Za as z,Zb as qt,_ as ja,_a as Et,_b as j,ab as Qt,ac as x,ba as re,bb as J,bc as be,ca as Zt,cb as R,cc as X0,d as Qi,db as U0,dc as Z0,ec as ar,fc as sr,g as E,ga as W,gc as lr,hc as Jt,ic as Tt,ja as ce,jb as $0,jc as Me,ka as to,kc as Ee,la as $,lc as Pt,ma as Ze,mb as W0,mc as Re,n as H0,nb as O,nc as Un,ob as K0,oc as cr,pb as Y0,pc as Rh,qa as Ua,qb as M,qc as Xa,rb as D,rc as dr,sb as Eh,sc as Q0,t as qa,tb as qe,tc as We,ub as de,vb as ue,vc as vt,wb as _,wc as S,xb as h,xc as Ge,yb as m,yc as B,zb as F,zc as it}from"./chunk-EJVWTBMV.js";import{a as me,b as Mt,c as Zi,e as b,g as D3}from"./chunk-ZRJ5ZCFR.js";var WC=b((Nme,$C)=>{"use strict";function $8(){this.__data__=[],this.size=0}$C.exports=$8});var Hi=b((Ame,KC)=>{"use strict";function W8(t,i){return t===i||t!==t&&i!==i}KC.exports=W8});var da=b((Lme,YC)=>{"use strict";var K8=Hi();function Y8(t,i){for(var e=t.length;e--;)if(K8(t[e][0],i))return e;return-1}YC.exports=Y8});var ZC=b((Bme,XC)=>{"use strict";var X8=da(),Z8=Array.prototype,Q8=Z8.splice;function J8(t){var i=this.__data__,e=X8(i,t);if(e<0)return!1;var n=i.length-1;return e==n?i.pop():Q8.call(i,e,1),--this.size,!0}XC.exports=J8});var JC=b((Vme,QC)=>{"use strict";var ez=da();function tz(t){var i=this.__data__,e=ez(i,t);return e<0?void 0:i[e][1]}QC.exports=tz});var t1=b((zme,e1)=>{"use strict";var nz=da();function iz(t){return nz(this.__data__,t)>-1}e1.exports=iz});var i1=b((Hme,n1)=>{"use strict";var oz=da();function rz(t,i){var e=this.__data__,n=oz(e,t);return n<0?(++this.size,e.push([t,i])):e[n][1]=i,this}n1.exports=rz});var ua=b((qme,o1)=>{"use strict";var az=WC(),sz=ZC(),lz=JC(),cz=t1(),dz=i1();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=az;Vo.prototype.delete=sz;Vo.prototype.get=lz;Vo.prototype.has=cz;Vo.prototype.set=dz;o1.exports=Vo});var a1=b((Gme,r1)=>{"use strict";var uz=ua();function pz(){this.__data__=new uz,this.size=0}r1.exports=pz});var l1=b((jme,s1)=>{"use strict";function fz(t){var i=this.__data__,e=i.delete(t);return this.size=i.size,e}s1.exports=fz});var d1=b((Ume,c1)=>{"use strict";function hz(t){return this.__data__.get(t)}c1.exports=hz});var p1=b(($me,u1)=>{"use strict";function mz(t){return this.__data__.has(t)}u1.exports=mz});var K_=b((Wme,f1)=>{"use strict";var _z=typeof global=="object"&&global&&global.Object===Object&&global;f1.exports=_z});var cn=b((Kme,h1)=>{"use strict";var gz=K_(),vz=typeof self=="object"&&self&&self.Object===Object&&self,bz=gz||vz||Function("return this")();h1.exports=bz});var qi=b((Yme,m1)=>{"use strict";var yz=cn(),Cz=yz.Symbol;m1.exports=Cz});var b1=b((Xme,v1)=>{"use strict";var _1=qi(),g1=Object.prototype,xz=g1.hasOwnProperty,wz=g1.toString,pa=_1?_1.toStringTag:void 0;function Tz(t){var i=xz.call(t,pa),e=t[pa];try{t[pa]=void 0;var n=!0}catch{}var o=wz.call(t);return n&&(i?t[pa]=e:delete t[pa]),o}v1.exports=Tz});var C1=b((Zme,y1)=>{"use strict";var Sz=Object.prototype,kz=Sz.toString;function Iz(t){return kz.call(t)}y1.exports=Iz});var fi=b((Qme,T1)=>{"use strict";var x1=qi(),Mz=b1(),Dz=C1(),Ez="[object Null]",Pz="[object Undefined]",w1=x1?x1.toStringTag:void 0;function Rz(t){return t==null?t===void 0?Pz:Ez:w1&&w1 in Object(t)?Mz(t):Dz(t)}T1.exports=Rz});var Wt=b((Jme,S1)=>{"use strict";function Oz(t){var i=typeof t;return t!=null&&(i=="object"||i=="function")}S1.exports=Oz});var zo=b((e_e,k1)=>{"use strict";var Fz=fi(),Nz=Wt(),Az="[object AsyncFunction]",Lz="[object Function]",Bz="[object GeneratorFunction]",Vz="[object Proxy]";function zz(t){if(!Nz(t))return!1;var i=Fz(t);return i==Lz||i==Bz||i==Az||i==Vz}k1.exports=zz});var M1=b((t_e,I1)=>{"use strict";var Hz=cn(),qz=Hz["__core-js_shared__"];I1.exports=qz});var P1=b((n_e,E1)=>{"use strict";var Y_=M1(),D1=(function(){var t=/[^.]+$/.exec(Y_&&Y_.keys&&Y_.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""})();function Gz(t){return!!D1&&D1 in t}E1.exports=Gz});var X_=b((i_e,R1)=>{"use strict";var jz=Function.prototype,Uz=jz.toString;function $z(t){if(t!=null){try{return Uz.call(t)}catch{}try{return t+""}catch{}}return""}R1.exports=$z});var F1=b((o_e,O1)=>{"use strict";var Wz=zo(),Kz=P1(),Yz=Wt(),Xz=X_(),Zz=/[\\^$.*+?()[\]{}|]/g,Qz=/^\[object .+?Constructor\]$/,Jz=Function.prototype,eH=Object.prototype,tH=Jz.toString,nH=eH.hasOwnProperty,iH=RegExp("^"+tH.call(nH).replace(Zz,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function oH(t){if(!Yz(t)||Kz(t))return!1;var i=Wz(t)?iH:Qz;return i.test(Xz(t))}O1.exports=oH});var A1=b((r_e,N1)=>{"use strict";function rH(t,i){return t?.[i]}N1.exports=rH});var hi=b((a_e,L1)=>{"use strict";var aH=F1(),sH=A1();function lH(t,i){var e=sH(t,i);return aH(e)?e:void 0}L1.exports=lH});var Lf=b((s_e,B1)=>{"use strict";var cH=hi(),dH=cn(),uH=cH(dH,"Map");B1.exports=uH});var fa=b((l_e,V1)=>{"use strict";var pH=hi(),fH=pH(Object,"create");V1.exports=fH});var q1=b((c_e,H1)=>{"use strict";var z1=fa();function hH(){this.__data__=z1?z1(null):{},this.size=0}H1.exports=hH});var j1=b((d_e,G1)=>{"use strict";function mH(t){var i=this.has(t)&&delete this.__data__[t];return this.size-=i?1:0,i}G1.exports=mH});var $1=b((u_e,U1)=>{"use strict";var _H=fa(),gH="__lodash_hash_undefined__",vH=Object.prototype,bH=vH.hasOwnProperty;function yH(t){var i=this.__data__;if(_H){var e=i[t];return e===gH?void 0:e}return bH.call(i,t)?i[t]:void 0}U1.exports=yH});var K1=b((p_e,W1)=>{"use strict";var CH=fa(),xH=Object.prototype,wH=xH.hasOwnProperty;function TH(t){var i=this.__data__;return CH?i[t]!==void 0:wH.call(i,t)}W1.exports=TH});var X1=b((f_e,Y1)=>{"use strict";var SH=fa(),kH="__lodash_hash_undefined__";function IH(t,i){var e=this.__data__;return this.size+=this.has(t)?0:1,e[t]=SH&&i===void 0?kH:i,this}Y1.exports=IH});var Q1=b((h_e,Z1)=>{"use strict";var MH=q1(),DH=j1(),EH=$1(),PH=K1(),RH=X1();function Ho(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])}}Ho.prototype.clear=MH;Ho.prototype.delete=DH;Ho.prototype.get=EH;Ho.prototype.has=PH;Ho.prototype.set=RH;Z1.exports=Ho});var tx=b((m_e,ex)=>{"use strict";var J1=Q1(),OH=ua(),FH=Lf();function NH(){this.size=0,this.__data__={hash:new J1,map:new(FH||OH),string:new J1}}ex.exports=NH});var ix=b((__e,nx)=>{"use strict";function AH(t){var i=typeof t;return i=="string"||i=="number"||i=="symbol"||i=="boolean"?t!=="__proto__":t===null}nx.exports=AH});var ha=b((g_e,ox)=>{"use strict";var LH=ix();function BH(t,i){var e=t.__data__;return LH(i)?e[typeof i=="string"?"string":"hash"]:e.map}ox.exports=BH});var ax=b((v_e,rx)=>{"use strict";var VH=ha();function zH(t){var i=VH(this,t).delete(t);return this.size-=i?1:0,i}rx.exports=zH});var lx=b((b_e,sx)=>{"use strict";var HH=ha();function qH(t){return HH(this,t).get(t)}sx.exports=qH});var dx=b((y_e,cx)=>{"use strict";var GH=ha();function jH(t){return GH(this,t).has(t)}cx.exports=jH});var px=b((C_e,ux)=>{"use strict";var UH=ha();function $H(t,i){var e=UH(this,t),n=e.size;return e.set(t,i),this.size+=e.size==n?0:1,this}ux.exports=$H});var Bf=b((x_e,fx)=>{"use strict";var WH=tx(),KH=ax(),YH=lx(),XH=dx(),ZH=px();function qo(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])}}qo.prototype.clear=WH;qo.prototype.delete=KH;qo.prototype.get=YH;qo.prototype.has=XH;qo.prototype.set=ZH;fx.exports=qo});var mx=b((w_e,hx)=>{"use strict";var QH=ua(),JH=Lf(),eq=Bf(),tq=200;function nq(t,i){var e=this.__data__;if(e instanceof QH){var n=e.__data__;if(!JH||n.length<tq-1)return n.push([t,i]),this.size=++e.size,this;e=this.__data__=new eq(n)}return e.set(t,i),this.size=e.size,this}hx.exports=nq});var ma=b((T_e,_x)=>{"use strict";var iq=ua(),oq=a1(),rq=l1(),aq=d1(),sq=p1(),lq=mx();function Go(t){var i=this.__data__=new iq(t);this.size=i.size}Go.prototype.clear=oq;Go.prototype.delete=rq;Go.prototype.get=aq;Go.prototype.has=sq;Go.prototype.set=lq;_x.exports=Go});var Vf=b((S_e,gx)=>{"use strict";function cq(t,i){for(var e=-1,n=t==null?0:t.length;++e<n&&i(t[e],e,t)!==!1;);return t}gx.exports=cq});var Z_=b((k_e,vx)=>{"use strict";var dq=hi(),uq=(function(){try{var t=dq(Object,"defineProperty");return t({},"",{}),t}catch{}})();vx.exports=uq});var _a=b((I_e,yx)=>{"use strict";var bx=Z_();function pq(t,i,e){i=="__proto__"&&bx?bx(t,i,{configurable:!0,enumerable:!0,value:e,writable:!0}):t[i]=e}yx.exports=pq});var ga=b((M_e,Cx)=>{"use strict";var fq=_a(),hq=Hi(),mq=Object.prototype,_q=mq.hasOwnProperty;function gq(t,i,e){var n=t[i];(!(_q.call(t,i)&&hq(n,e))||e===void 0&&!(i in t))&&fq(t,i,e)}Cx.exports=gq});var jo=b((D_e,xx)=>{"use strict";var vq=ga(),bq=_a();function yq(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?bq(e,s,c):vq(e,s,c)}return e}xx.exports=yq});var Tx=b((E_e,wx)=>{"use strict";function Cq(t,i){for(var e=-1,n=Array(t);++e<t;)n[e]=i(e);return n}wx.exports=Cq});var yn=b((P_e,Sx)=>{"use strict";function xq(t){return t!=null&&typeof t=="object"}Sx.exports=xq});var Ix=b((R_e,kx)=>{"use strict";var wq=fi(),Tq=yn(),Sq="[object Arguments]";function kq(t){return Tq(t)&&wq(t)==Sq}kx.exports=kq});var Uo=b((O_e,Ex)=>{"use strict";var Mx=Ix(),Iq=yn(),Dx=Object.prototype,Mq=Dx.hasOwnProperty,Dq=Dx.propertyIsEnumerable,Eq=Mx((function(){return arguments})())?Mx:function(t){return Iq(t)&&Mq.call(t,"callee")&&!Dq.call(t,"callee")};Ex.exports=Eq});var lt=b((F_e,Px)=>{"use strict";var Pq=Array.isArray;Px.exports=Pq});var Ox=b((N_e,Rx)=>{"use strict";function Rq(){return!1}Rx.exports=Rq});var Gi=b((va,$o)=>{"use strict";var Oq=cn(),Fq=Ox(),Ax=typeof va=="object"&&va&&!va.nodeType&&va,Fx=Ax&&typeof $o=="object"&&$o&&!$o.nodeType&&$o,Nq=Fx&&Fx.exports===Ax,Nx=Nq?Oq.Buffer:void 0,Aq=Nx?Nx.isBuffer:void 0,Lq=Aq||Fq;$o.exports=Lq});var ba=b((A_e,Lx)=>{"use strict";var Bq=9007199254740991,Vq=/^(?:0|[1-9]\d*)$/;function zq(t,i){var e=typeof t;return i=i??Bq,!!i&&(e=="number"||e!="symbol"&&Vq.test(t))&&t>-1&&t%1==0&&t<i}Lx.exports=zq});var zf=b((L_e,Bx)=>{"use strict";var Hq=9007199254740991;function qq(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=Hq}Bx.exports=qq});var zx=b((B_e,Vx)=>{"use strict";var Gq=fi(),jq=zf(),Uq=yn(),$q="[object Arguments]",Wq="[object Array]",Kq="[object Boolean]",Yq="[object Date]",Xq="[object Error]",Zq="[object Function]",Qq="[object Map]",Jq="[object Number]",eG="[object Object]",tG="[object RegExp]",nG="[object Set]",iG="[object String]",oG="[object WeakMap]",rG="[object ArrayBuffer]",aG="[object DataView]",sG="[object Float32Array]",lG="[object Float64Array]",cG="[object Int8Array]",dG="[object Int16Array]",uG="[object Int32Array]",pG="[object Uint8Array]",fG="[object Uint8ClampedArray]",hG="[object Uint16Array]",mG="[object Uint32Array]",Je={};Je[sG]=Je[lG]=Je[cG]=Je[dG]=Je[uG]=Je[pG]=Je[fG]=Je[hG]=Je[mG]=!0;Je[$q]=Je[Wq]=Je[rG]=Je[Kq]=Je[aG]=Je[Yq]=Je[Xq]=Je[Zq]=Je[Qq]=Je[Jq]=Je[eG]=Je[tG]=Je[nG]=Je[iG]=Je[oG]=!1;function _G(t){return Uq(t)&&jq(t.length)&&!!Je[Gq(t)]}Vx.exports=_G});var ya=b((V_e,Hx)=>{"use strict";function gG(t){return function(i){return t(i)}}Hx.exports=gG});var Hf=b((Ca,Wo)=>{"use strict";var vG=K_(),qx=typeof Ca=="object"&&Ca&&!Ca.nodeType&&Ca,xa=qx&&typeof Wo=="object"&&Wo&&!Wo.nodeType&&Wo,bG=xa&&xa.exports===qx,Q_=bG&&vG.process,yG=(function(){try{var t=xa&&xa.require&&xa.require("util").types;return t||Q_&&Q_.binding&&Q_.binding("util")}catch{}})();Wo.exports=yG});var Ko=b((z_e,Ux)=>{"use strict";var CG=zx(),xG=ya(),Gx=Hf(),jx=Gx&&Gx.isTypedArray,wG=jx?xG(jx):CG;Ux.exports=wG});var J_=b((H_e,$x)=>{"use strict";var TG=Tx(),SG=Uo(),kG=lt(),IG=Gi(),MG=ba(),DG=Ko(),EG=Object.prototype,PG=EG.hasOwnProperty;function RG(t,i){var e=kG(t),n=!e&&SG(t),o=!e&&!n&&IG(t),r=!e&&!n&&!o&&DG(t),a=e||n||o||r,s=a?TG(t.length,String):[],c=s.length;for(var d in t)(i||PG.call(t,d))&&!(a&&(d=="length"||o&&(d=="offset"||d=="parent")||r&&(d=="buffer"||d=="byteLength"||d=="byteOffset")||MG(d,c)))&&s.push(d);return s}$x.exports=RG});var wa=b((q_e,Wx)=>{"use strict";var OG=Object.prototype;function FG(t){var i=t&&t.constructor,e=typeof i=="function"&&i.prototype||OG;return t===e}Wx.exports=FG});var eg=b((G_e,Kx)=>{"use strict";function NG(t,i){return function(e){return t(i(e))}}Kx.exports=NG});var Xx=b((j_e,Yx)=>{"use strict";var AG=eg(),LG=AG(Object.keys,Object);Yx.exports=LG});var qf=b((U_e,Zx)=>{"use strict";var BG=wa(),VG=Xx(),zG=Object.prototype,HG=zG.hasOwnProperty;function qG(t){if(!BG(t))return VG(t);var i=[];for(var e in Object(t))HG.call(t,e)&&e!="constructor"&&i.push(e);return i}Zx.exports=qG});var Mn=b(($_e,Qx)=>{"use strict";var GG=zo(),jG=zf();function UG(t){return t!=null&&jG(t.length)&&!GG(t)}Qx.exports=UG});var Bn=b((W_e,Jx)=>{"use strict";var $G=J_(),WG=qf(),KG=Mn();function YG(t){return KG(t)?$G(t):WG(t)}Jx.exports=YG});var tw=b((K_e,ew)=>{"use strict";var XG=jo(),ZG=Bn();function QG(t,i){return t&&XG(i,ZG(i),t)}ew.exports=QG});var iw=b((Y_e,nw)=>{"use strict";function JG(t){var i=[];if(t!=null)for(var e in Object(t))i.push(e);return i}nw.exports=JG});var rw=b((X_e,ow)=>{"use strict";var ej=Wt(),tj=wa(),nj=iw(),ij=Object.prototype,oj=ij.hasOwnProperty;function rj(t){if(!ej(t))return nj(t);var i=tj(t),e=[];for(var n in t)n=="constructor"&&(i||!oj.call(t,n))||e.push(n);return e}ow.exports=rj});var mi=b((Z_e,aw)=>{"use strict";var aj=J_(),sj=rw(),lj=Mn();function cj(t){return lj(t)?aj(t,!0):sj(t)}aw.exports=cj});var lw=b((Q_e,sw)=>{"use strict";var dj=jo(),uj=mi();function pj(t,i){return t&&dj(i,uj(i),t)}sw.exports=pj});var tg=b((Ta,Yo)=>{"use strict";var fj=cn(),pw=typeof Ta=="object"&&Ta&&!Ta.nodeType&&Ta,cw=pw&&typeof Yo=="object"&&Yo&&!Yo.nodeType&&Yo,hj=cw&&cw.exports===pw,dw=hj?fj.Buffer:void 0,uw=dw?dw.allocUnsafe:void 0;function mj(t,i){if(i)return t.slice();var e=t.length,n=uw?uw(e):new t.constructor(e);return t.copy(n),n}Yo.exports=mj});var ng=b((J_e,fw)=>{"use strict";function _j(t,i){var e=-1,n=t.length;for(i||(i=Array(n));++e<n;)i[e]=t[e];return i}fw.exports=_j});var ig=b((ege,hw)=>{"use strict";function gj(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}hw.exports=gj});var og=b((tge,mw)=>{"use strict";function vj(){return[]}mw.exports=vj});var Gf=b((nge,gw)=>{"use strict";var bj=ig(),yj=og(),Cj=Object.prototype,xj=Cj.propertyIsEnumerable,_w=Object.getOwnPropertySymbols,wj=_w?function(t){return t==null?[]:(t=Object(t),bj(_w(t),function(i){return xj.call(t,i)}))}:yj;gw.exports=wj});var bw=b((ige,vw)=>{"use strict";var Tj=jo(),Sj=Gf();function kj(t,i){return Tj(t,Sj(t),i)}vw.exports=kj});var jf=b((oge,yw)=>{"use strict";function Ij(t,i){for(var e=-1,n=i.length,o=t.length;++e<n;)t[o+e]=i[e];return t}yw.exports=Ij});var Sa=b((rge,Cw)=>{"use strict";var Mj=eg(),Dj=Mj(Object.getPrototypeOf,Object);Cw.exports=Dj});var rg=b((age,xw)=>{"use strict";var Ej=jf(),Pj=Sa(),Rj=Gf(),Oj=og(),Fj=Object.getOwnPropertySymbols,Nj=Fj?function(t){for(var i=[];t;)Ej(i,Rj(t)),t=Pj(t);return i}:Oj;xw.exports=Nj});var Tw=b((sge,ww)=>{"use strict";var Aj=jo(),Lj=rg();function Bj(t,i){return Aj(t,Lj(t),i)}ww.exports=Bj});var ag=b((lge,Sw)=>{"use strict";var Vj=jf(),zj=lt();function Hj(t,i,e){var n=i(t);return zj(t)?n:Vj(n,e(t))}Sw.exports=Hj});var sg=b((cge,kw)=>{"use strict";var qj=ag(),Gj=Gf(),jj=Bn();function Uj(t){return qj(t,jj,Gj)}kw.exports=Uj});var Mw=b((dge,Iw)=>{"use strict";var $j=ag(),Wj=rg(),Kj=mi();function Yj(t){return $j(t,Kj,Wj)}Iw.exports=Yj});var Ew=b((uge,Dw)=>{"use strict";var Xj=hi(),Zj=cn(),Qj=Xj(Zj,"DataView");Dw.exports=Qj});var Rw=b((pge,Pw)=>{"use strict";var Jj=hi(),eU=cn(),tU=Jj(eU,"Promise");Pw.exports=tU});var lg=b((fge,Ow)=>{"use strict";var nU=hi(),iU=cn(),oU=nU(iU,"Set");Ow.exports=oU});var Nw=b((hge,Fw)=>{"use strict";var rU=hi(),aU=cn(),sU=rU(aU,"WeakMap");Fw.exports=sU});var Ui=b((mge,qw)=>{"use strict";var cg=Ew(),dg=Lf(),ug=Rw(),pg=lg(),fg=Nw(),Hw=fi(),Xo=X_(),Aw="[object Map]",lU="[object Object]",Lw="[object Promise]",Bw="[object Set]",Vw="[object WeakMap]",zw="[object DataView]",cU=Xo(cg),dU=Xo(dg),uU=Xo(ug),pU=Xo(pg),fU=Xo(fg),ji=Hw;(cg&&ji(new cg(new ArrayBuffer(1)))!=zw||dg&&ji(new dg)!=Aw||ug&&ji(ug.resolve())!=Lw||pg&&ji(new pg)!=Bw||fg&&ji(new fg)!=Vw)&&(ji=function(t){var i=Hw(t),e=i==lU?t.constructor:void 0,n=e?Xo(e):"";if(n)switch(n){case cU:return zw;case dU:return Aw;case uU:return Lw;case pU:return Bw;case fU:return Vw}return i});qw.exports=ji});var jw=b((_ge,Gw)=>{"use strict";var hU=Object.prototype,mU=hU.hasOwnProperty;function _U(t){var i=t.length,e=new t.constructor(i);return i&&typeof t[0]=="string"&&mU.call(t,"index")&&(e.index=t.index,e.input=t.input),e}Gw.exports=_U});var hg=b((gge,Uw)=>{"use strict";var gU=cn(),vU=gU.Uint8Array;Uw.exports=vU});var Uf=b((vge,Ww)=>{"use strict";var $w=hg();function bU(t){var i=new t.constructor(t.byteLength);return new $w(i).set(new $w(t)),i}Ww.exports=bU});var Yw=b((bge,Kw)=>{"use strict";var yU=Uf();function CU(t,i){var e=i?yU(t.buffer):t.buffer;return new t.constructor(e,t.byteOffset,t.byteLength)}Kw.exports=CU});var Zw=b((yge,Xw)=>{"use strict";var xU=/\w*$/;function wU(t){var i=new t.constructor(t.source,xU.exec(t));return i.lastIndex=t.lastIndex,i}Xw.exports=wU});var nT=b((Cge,tT)=>{"use strict";var Qw=qi(),Jw=Qw?Qw.prototype:void 0,eT=Jw?Jw.valueOf:void 0;function TU(t){return eT?Object(eT.call(t)):{}}tT.exports=TU});var mg=b((xge,iT)=>{"use strict";var SU=Uf();function kU(t,i){var e=i?SU(t.buffer):t.buffer;return new t.constructor(e,t.byteOffset,t.length)}iT.exports=kU});var rT=b((wge,oT)=>{"use strict";var IU=Uf(),MU=Yw(),DU=Zw(),EU=nT(),PU=mg(),RU="[object Boolean]",OU="[object Date]",FU="[object Map]",NU="[object Number]",AU="[object RegExp]",LU="[object Set]",BU="[object String]",VU="[object Symbol]",zU="[object ArrayBuffer]",HU="[object DataView]",qU="[object Float32Array]",GU="[object Float64Array]",jU="[object Int8Array]",UU="[object Int16Array]",$U="[object Int32Array]",WU="[object Uint8Array]",KU="[object Uint8ClampedArray]",YU="[object Uint16Array]",XU="[object Uint32Array]";function ZU(t,i,e){var n=t.constructor;switch(i){case zU:return IU(t);case RU:case OU:return new n(+t);case HU:return MU(t,e);case qU:case GU:case jU:case UU:case $U:case WU:case KU:case YU:case XU:return PU(t,e);case FU:return new n;case NU:case BU:return new n(t);case AU:return DU(t);case LU:return new n;case VU:return EU(t)}}oT.exports=ZU});var _g=b((Tge,sT)=>{"use strict";var QU=Wt(),aT=Object.create,JU=(function(){function t(){}return function(i){if(!QU(i))return{};if(aT)return aT(i);t.prototype=i;var e=new t;return t.prototype=void 0,e}})();sT.exports=JU});var gg=b((Sge,lT)=>{"use strict";var e$=_g(),t$=Sa(),n$=wa();function i$(t){return typeof t.constructor=="function"&&!n$(t)?e$(t$(t)):{}}lT.exports=i$});var dT=b((kge,cT)=>{"use strict";var o$=Ui(),r$=yn(),a$="[object Map]";function s$(t){return r$(t)&&o$(t)==a$}cT.exports=s$});var hT=b((Ige,fT)=>{"use strict";var l$=dT(),c$=ya(),uT=Hf(),pT=uT&&uT.isMap,d$=pT?c$(pT):l$;fT.exports=d$});var _T=b((Mge,mT)=>{"use strict";var u$=Ui(),p$=yn(),f$="[object Set]";function h$(t){return p$(t)&&u$(t)==f$}mT.exports=h$});var yT=b((Dge,bT)=>{"use strict";var m$=_T(),_$=ya(),gT=Hf(),vT=gT&&gT.isSet,g$=vT?_$(vT):m$;bT.exports=g$});var vg=b((Ege,TT)=>{"use strict";var v$=ma(),b$=Vf(),y$=ga(),C$=tw(),x$=lw(),w$=tg(),T$=ng(),S$=bw(),k$=Tw(),I$=sg(),M$=Mw(),D$=Ui(),E$=jw(),P$=rT(),R$=gg(),O$=lt(),F$=Gi(),N$=hT(),A$=Wt(),L$=yT(),B$=Bn(),V$=mi(),z$=1,H$=2,q$=4,CT="[object Arguments]",G$="[object Array]",j$="[object Boolean]",U$="[object Date]",$$="[object Error]",xT="[object Function]",W$="[object GeneratorFunction]",K$="[object Map]",Y$="[object Number]",wT="[object Object]",X$="[object RegExp]",Z$="[object Set]",Q$="[object String]",J$="[object Symbol]",eW="[object WeakMap]",tW="[object ArrayBuffer]",nW="[object DataView]",iW="[object Float32Array]",oW="[object Float64Array]",rW="[object Int8Array]",aW="[object Int16Array]",sW="[object Int32Array]",lW="[object Uint8Array]",cW="[object Uint8ClampedArray]",dW="[object Uint16Array]",uW="[object Uint32Array]",Xe={};Xe[CT]=Xe[G$]=Xe[tW]=Xe[nW]=Xe[j$]=Xe[U$]=Xe[iW]=Xe[oW]=Xe[rW]=Xe[aW]=Xe[sW]=Xe[K$]=Xe[Y$]=Xe[wT]=Xe[X$]=Xe[Z$]=Xe[Q$]=Xe[J$]=Xe[lW]=Xe[cW]=Xe[dW]=Xe[uW]=!0;Xe[$$]=Xe[xT]=Xe[eW]=!1;function $f(t,i,e,n,o,r){var a,s=i&z$,c=i&H$,d=i&q$;if(e&&(a=o?e(t,n,o,r):e(t)),a!==void 0)return a;if(!A$(t))return t;var f=O$(t);if(f){if(a=E$(t),!s)return T$(t,a)}else{var g=D$(t),y=g==xT||g==W$;if(F$(t))return w$(t,s);if(g==wT||g==CT||y&&!o){if(a=c||y?{}:R$(t),!s)return c?k$(t,x$(a,t)):S$(t,C$(a,t))}else{if(!Xe[g])return o?t:{};a=P$(t,g,s)}}r||(r=new v$);var T=r.get(t);if(T)return T;r.set(t,a),L$(t)?t.forEach(function(H){a.add($f(H,i,e,H,t,r))}):N$(t)&&t.forEach(function(H,G){a.set(G,$f(H,i,e,G,t,r))});var w=d?c?M$:I$:c?V$:B$,N=f?void 0:w(t);return b$(N||t,function(H,G){N&&(G=H,H=t[G]),y$(a,G,$f(H,i,e,G,t,r))}),a}TT.exports=$f});var kT=b((Pge,ST)=>{"use strict";var pW=vg(),fW=4;function hW(t){return pW(t,fW)}ST.exports=hW});var Wf=b((Rge,IT)=>{"use strict";function mW(t){return function(){return t}}IT.exports=mW});var DT=b((Oge,MT)=>{"use strict";function _W(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}}MT.exports=_W});var Kf=b((Fge,ET)=>{"use strict";var gW=DT(),vW=gW();ET.exports=vW});var Yf=b((Nge,PT)=>{"use strict";var bW=Kf(),yW=Bn();function CW(t,i){return t&&bW(t,i,yW)}PT.exports=CW});var OT=b((Age,RT)=>{"use strict";var xW=Mn();function wW(t,i){return function(e,n){if(e==null)return e;if(!xW(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}}RT.exports=wW});var ka=b((Lge,FT)=>{"use strict";var TW=Yf(),SW=OT(),kW=SW(TW);FT.exports=kW});var _i=b((Bge,NT)=>{"use strict";function IW(t){return t}NT.exports=IW});var bg=b((Vge,AT)=>{"use strict";var MW=_i();function DW(t){return typeof t=="function"?t:MW}AT.exports=DW});var yg=b((zge,LT)=>{"use strict";var EW=Vf(),PW=ka(),RW=bg(),OW=lt();function FW(t,i){var e=OW(t)?EW:PW;return e(t,RW(i))}LT.exports=FW});var Cg=b((Hge,BT)=>{"use strict";BT.exports=yg()});var zT=b((qge,VT)=>{"use strict";var NW=ka();function AW(t,i){var e=[];return NW(t,function(n,o,r){i(n,o,r)&&e.push(n)}),e}VT.exports=AW});var qT=b((Gge,HT)=>{"use strict";var LW="__lodash_hash_undefined__";function BW(t){return this.__data__.set(t,LW),this}HT.exports=BW});var jT=b((jge,GT)=>{"use strict";function VW(t){return this.__data__.has(t)}GT.exports=VW});var xg=b((Uge,UT)=>{"use strict";var zW=Bf(),HW=qT(),qW=jT();function Xf(t){var i=-1,e=t==null?0:t.length;for(this.__data__=new zW;++i<e;)this.add(t[i])}Xf.prototype.add=Xf.prototype.push=HW;Xf.prototype.has=qW;UT.exports=Xf});var WT=b(($ge,$T)=>{"use strict";function GW(t,i){for(var e=-1,n=t==null?0:t.length;++e<n;)if(i(t[e],e,t))return!0;return!1}$T.exports=GW});var wg=b((Wge,KT)=>{"use strict";function jW(t,i){return t.has(i)}KT.exports=jW});var Tg=b((Kge,YT)=>{"use strict";var UW=xg(),$W=WT(),WW=wg(),KW=1,YW=2;function XW(t,i,e,n,o,r){var a=e&KW,s=t.length,c=i.length;if(s!=c&&!(a&&c>s))return!1;var d=r.get(t),f=r.get(i);if(d&&f)return d==i&&f==t;var g=-1,y=!0,T=e&YW?new UW:void 0;for(r.set(t,i),r.set(i,t);++g<s;){var w=t[g],N=i[g];if(n)var H=a?n(N,w,g,i,t,r):n(w,N,g,t,i,r);if(H!==void 0){if(H)continue;y=!1;break}if(T){if(!$W(i,function(G,X){if(!WW(T,X)&&(w===G||o(w,G,e,n,r)))return T.push(X)})){y=!1;break}}else if(!(w===N||o(w,N,e,n,r))){y=!1;break}}return r.delete(t),r.delete(i),y}YT.exports=XW});var ZT=b((Yge,XT)=>{"use strict";function ZW(t){var i=-1,e=Array(t.size);return t.forEach(function(n,o){e[++i]=[o,n]}),e}XT.exports=ZW});var Zf=b((Xge,QT)=>{"use strict";function QW(t){var i=-1,e=Array(t.size);return t.forEach(function(n){e[++i]=n}),e}QT.exports=QW});var iS=b((Zge,nS)=>{"use strict";var JT=qi(),eS=hg(),JW=Hi(),eK=Tg(),tK=ZT(),nK=Zf(),iK=1,oK=2,rK="[object Boolean]",aK="[object Date]",sK="[object Error]",lK="[object Map]",cK="[object Number]",dK="[object RegExp]",uK="[object Set]",pK="[object String]",fK="[object Symbol]",hK="[object ArrayBuffer]",mK="[object DataView]",tS=JT?JT.prototype:void 0,Sg=tS?tS.valueOf:void 0;function _K(t,i,e,n,o,r,a){switch(e){case mK:if(t.byteLength!=i.byteLength||t.byteOffset!=i.byteOffset)return!1;t=t.buffer,i=i.buffer;case hK:return!(t.byteLength!=i.byteLength||!r(new eS(t),new eS(i)));case rK:case aK:case cK:return JW(+t,+i);case sK:return t.name==i.name&&t.message==i.message;case dK:case pK:return t==i+"";case lK:var s=tK;case uK:var c=n&iK;if(s||(s=nK),t.size!=i.size&&!c)return!1;var d=a.get(t);if(d)return d==i;n|=oK,a.set(t,i);var f=eK(s(t),s(i),n,o,r,a);return a.delete(t),f;case fK:if(Sg)return Sg.call(t)==Sg.call(i)}return!1}nS.exports=_K});var aS=b((Qge,rS)=>{"use strict";var oS=sg(),gK=1,vK=Object.prototype,bK=vK.hasOwnProperty;function yK(t,i,e,n,o,r){var a=e&gK,s=oS(t),c=s.length,d=oS(i),f=d.length;if(c!=f&&!a)return!1;for(var g=c;g--;){var y=s[g];if(!(a?y in i:bK.call(i,y)))return!1}var T=r.get(t),w=r.get(i);if(T&&w)return T==i&&w==t;var N=!0;r.set(t,i),r.set(i,t);for(var H=a;++g<c;){y=s[g];var G=t[y],X=i[y];if(n)var le=a?n(X,G,y,i,t,r):n(G,X,y,t,i,r);if(!(le===void 0?G===X||o(G,X,e,n,r):le)){N=!1;break}H||(H=y=="constructor")}if(N&&!H){var Ce=t.constructor,Te=i.constructor;Ce!=Te&&"constructor"in t&&"constructor"in i&&!(typeof Ce=="function"&&Ce instanceof Ce&&typeof Te=="function"&&Te instanceof Te)&&(N=!1)}return r.delete(t),r.delete(i),N}rS.exports=yK});var hS=b((Jge,fS)=>{"use strict";var kg=ma(),CK=Tg(),xK=iS(),wK=aS(),sS=Ui(),lS=lt(),cS=Gi(),TK=Ko(),SK=1,dS="[object Arguments]",uS="[object Array]",Qf="[object Object]",kK=Object.prototype,pS=kK.hasOwnProperty;function IK(t,i,e,n,o,r){var a=lS(t),s=lS(i),c=a?uS:sS(t),d=s?uS:sS(i);c=c==dS?Qf:c,d=d==dS?Qf:d;var f=c==Qf,g=d==Qf,y=c==d;if(y&&cS(t)){if(!cS(i))return!1;a=!0,f=!1}if(y&&!f)return r||(r=new kg),a||TK(t)?CK(t,i,e,n,o,r):xK(t,i,c,e,n,o,r);if(!(e&SK)){var T=f&&pS.call(t,"__wrapped__"),w=g&&pS.call(i,"__wrapped__");if(T||w){var N=T?t.value():t,H=w?i.value():i;return r||(r=new kg),o(N,H,e,n,r)}}return y?(r||(r=new kg),wK(t,i,e,n,o,r)):!1}fS.exports=IK});var Ig=b((e0e,gS)=>{"use strict";var MK=hS(),mS=yn();function _S(t,i,e,n,o){return t===i?!0:t==null||i==null||!mS(t)&&!mS(i)?t!==t&&i!==i:MK(t,i,e,n,_S,o)}gS.exports=_S});var bS=b((t0e,vS)=>{"use strict";var DK=ma(),EK=Ig(),PK=1,RK=2;function OK(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],d=t[c],f=s[1];if(a&&s[2]){if(d===void 0&&!(c in t))return!1}else{var g=new DK;if(n)var y=n(d,f,c,t,i,g);if(!(y===void 0?EK(f,d,PK|RK,n,g):y))return!1}}return!0}vS.exports=OK});var Mg=b((n0e,yS)=>{"use strict";var FK=Wt();function NK(t){return t===t&&!FK(t)}yS.exports=NK});var xS=b((i0e,CS)=>{"use strict";var AK=Mg(),LK=Bn();function BK(t){for(var i=LK(t),e=i.length;e--;){var n=i[e],o=t[n];i[e]=[n,o,AK(o)]}return i}CS.exports=BK});var Dg=b((o0e,wS)=>{"use strict";function VK(t,i){return function(e){return e==null?!1:e[t]===i&&(i!==void 0||t in Object(e))}}wS.exports=VK});var SS=b((r0e,TS)=>{"use strict";var zK=bS(),HK=xS(),qK=Dg();function GK(t){var i=HK(t);return i.length==1&&i[0][2]?qK(i[0][0],i[0][1]):function(e){return e===t||zK(e,t,i)}}TS.exports=GK});var $i=b((a0e,kS)=>{"use strict";var jK=fi(),UK=yn(),$K="[object Symbol]";function WK(t){return typeof t=="symbol"||UK(t)&&jK(t)==$K}kS.exports=WK});var Jf=b((s0e,IS)=>{"use strict";var KK=lt(),YK=$i(),XK=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ZK=/^\w*$/;function QK(t,i){if(KK(t))return!1;var e=typeof t;return e=="number"||e=="symbol"||e=="boolean"||t==null||YK(t)?!0:ZK.test(t)||!XK.test(t)||i!=null&&t in Object(i)}IS.exports=QK});var ES=b((l0e,DS)=>{"use strict";var MS=Bf(),JK="Expected a function";function Eg(t,i){if(typeof t!="function"||i!=null&&typeof i!="function")throw new TypeError(JK);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(Eg.Cache||MS),e}Eg.Cache=MS;DS.exports=Eg});var RS=b((c0e,PS)=>{"use strict";var eY=ES(),tY=500;function nY(t){var i=eY(t,function(n){return e.size===tY&&e.clear(),n}),e=i.cache;return i}PS.exports=nY});var FS=b((d0e,OS)=>{"use strict";var iY=RS(),oY=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,rY=/\\(\\)?/g,aY=iY(function(t){var i=[];return t.charCodeAt(0)===46&&i.push(""),t.replace(oY,function(e,n,o,r){i.push(o?r.replace(rY,"$1"):n||e)}),i});OS.exports=aY});var Ia=b((u0e,NS)=>{"use strict";function sY(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}NS.exports=sY});var HS=b((p0e,zS)=>{"use strict";var AS=qi(),lY=Ia(),cY=lt(),dY=$i(),uY=1/0,LS=AS?AS.prototype:void 0,BS=LS?LS.toString:void 0;function VS(t){if(typeof t=="string")return t;if(cY(t))return lY(t,VS)+"";if(dY(t))return BS?BS.call(t):"";var i=t+"";return i=="0"&&1/t==-uY?"-0":i}zS.exports=VS});var Pg=b((f0e,qS)=>{"use strict";var pY=HS();function fY(t){return t==null?"":pY(t)}qS.exports=fY});var Ma=b((h0e,GS)=>{"use strict";var hY=lt(),mY=Jf(),_Y=FS(),gY=Pg();function vY(t,i){return hY(t)?t:mY(t,i)?[t]:_Y(gY(t))}GS.exports=vY});var Zo=b((m0e,jS)=>{"use strict";var bY=$i(),yY=1/0;function CY(t){if(typeof t=="string"||bY(t))return t;var i=t+"";return i=="0"&&1/t==-yY?"-0":i}jS.exports=CY});var Da=b((_0e,US)=>{"use strict";var xY=Ma(),wY=Zo();function TY(t,i){i=xY(i,t);for(var e=0,n=i.length;t!=null&&e<n;)t=t[wY(i[e++])];return e&&e==n?t:void 0}US.exports=TY});var WS=b((g0e,$S)=>{"use strict";var SY=Da();function kY(t,i,e){var n=t==null?void 0:SY(t,i);return n===void 0?e:n}$S.exports=kY});var YS=b((v0e,KS)=>{"use strict";function IY(t,i){return t!=null&&i in Object(t)}KS.exports=IY});var Rg=b((b0e,XS)=>{"use strict";var MY=Ma(),DY=Uo(),EY=lt(),PY=ba(),RY=zf(),OY=Zo();function FY(t,i,e){i=MY(i,t);for(var n=-1,o=i.length,r=!1;++n<o;){var a=OY(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&&RY(o)&&PY(a,o)&&(EY(t)||DY(t)))}XS.exports=FY});var Og=b((y0e,ZS)=>{"use strict";var NY=YS(),AY=Rg();function LY(t,i){return t!=null&&AY(t,i,NY)}ZS.exports=LY});var JS=b((C0e,QS)=>{"use strict";var BY=Ig(),VY=WS(),zY=Og(),HY=Jf(),qY=Mg(),GY=Dg(),jY=Zo(),UY=1,$Y=2;function WY(t,i){return HY(t)&&qY(i)?GY(jY(t),i):function(e){var n=VY(e,t);return n===void 0&&n===i?zY(e,t):BY(i,n,UY|$Y)}}QS.exports=WY});var Fg=b((x0e,e2)=>{"use strict";function KY(t){return function(i){return i?.[t]}}e2.exports=KY});var n2=b((w0e,t2)=>{"use strict";var YY=Da();function XY(t){return function(i){return YY(i,t)}}t2.exports=XY});var o2=b((T0e,i2)=>{"use strict";var ZY=Fg(),QY=n2(),JY=Jf(),eX=Zo();function tX(t){return JY(t)?ZY(eX(t)):QY(t)}i2.exports=tX});var Dn=b((S0e,r2)=>{"use strict";var nX=SS(),iX=JS(),oX=_i(),rX=lt(),aX=o2();function sX(t){return typeof t=="function"?t:t==null?oX:typeof t=="object"?rX(t)?iX(t[0],t[1]):nX(t):aX(t)}r2.exports=sX});var Ng=b((k0e,a2)=>{"use strict";var lX=ig(),cX=zT(),dX=Dn(),uX=lt();function pX(t,i){var e=uX(t)?lX:cX;return e(t,dX(i,3))}a2.exports=pX});var l2=b((I0e,s2)=>{"use strict";var fX=Object.prototype,hX=fX.hasOwnProperty;function mX(t,i){return t!=null&&hX.call(t,i)}s2.exports=mX});var Ag=b((M0e,c2)=>{"use strict";var _X=l2(),gX=Rg();function vX(t,i){return t!=null&&gX(t,i,_X)}c2.exports=vX});var u2=b((D0e,d2)=>{"use strict";var bX=qf(),yX=Ui(),CX=Uo(),xX=lt(),wX=Mn(),TX=Gi(),SX=wa(),kX=Ko(),IX="[object Map]",MX="[object Set]",DX=Object.prototype,EX=DX.hasOwnProperty;function PX(t){if(t==null)return!0;if(wX(t)&&(xX(t)||typeof t=="string"||typeof t.splice=="function"||TX(t)||kX(t)||CX(t)))return!t.length;var i=yX(t);if(i==IX||i==MX)return!t.size;if(SX(t))return!bX(t).length;for(var e in t)if(EX.call(t,e))return!1;return!0}d2.exports=PX});var Lg=b((E0e,p2)=>{"use strict";function RX(t){return t===void 0}p2.exports=RX});var Bg=b((P0e,f2)=>{"use strict";var OX=ka(),FX=Mn();function NX(t,i){var e=-1,n=FX(t)?Array(t.length):[];return OX(t,function(o,r,a){n[++e]=i(o,r,a)}),n}f2.exports=NX});var Vg=b((R0e,h2)=>{"use strict";var AX=Ia(),LX=Dn(),BX=Bg(),VX=lt();function zX(t,i){var e=VX(t)?AX:BX;return e(t,LX(i,3))}h2.exports=zX});var _2=b((O0e,m2)=>{"use strict";function HX(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}m2.exports=HX});var v2=b((F0e,g2)=>{"use strict";function qX(t,i,e,n,o){return o(t,function(r,a,s){e=n?(n=!1,r):i(e,r,a,s)}),e}g2.exports=qX});var zg=b((N0e,b2)=>{"use strict";var GX=_2(),jX=ka(),UX=Dn(),$X=v2(),WX=lt();function KX(t,i,e){var n=WX(t)?GX:$X,o=arguments.length<3;return n(t,UX(i,4),e,o,jX)}b2.exports=KX});var C2=b((A0e,y2)=>{"use strict";var YX=fi(),XX=lt(),ZX=yn(),QX="[object String]";function JX(t){return typeof t=="string"||!XX(t)&&ZX(t)&&YX(t)==QX}y2.exports=JX});var w2=b((L0e,x2)=>{"use strict";var eZ=Fg(),tZ=eZ("length");x2.exports=tZ});var S2=b((B0e,T2)=>{"use strict";var nZ="\\ud800-\\udfff",iZ="\\u0300-\\u036f",oZ="\\ufe20-\\ufe2f",rZ="\\u20d0-\\u20ff",aZ=iZ+oZ+rZ,sZ="\\ufe0e\\ufe0f",lZ="\\u200d",cZ=RegExp("["+lZ+nZ+aZ+sZ+"]");function dZ(t){return cZ.test(t)}T2.exports=dZ});var F2=b((V0e,O2)=>{"use strict";var I2="\\ud800-\\udfff",uZ="\\u0300-\\u036f",pZ="\\ufe20-\\ufe2f",fZ="\\u20d0-\\u20ff",hZ=uZ+pZ+fZ,mZ="\\ufe0e\\ufe0f",_Z="["+I2+"]",Hg="["+hZ+"]",qg="\\ud83c[\\udffb-\\udfff]",gZ="(?:"+Hg+"|"+qg+")",M2="[^"+I2+"]",D2="(?:\\ud83c[\\udde6-\\uddff]){2}",E2="[\\ud800-\\udbff][\\udc00-\\udfff]",vZ="\\u200d",P2=gZ+"?",R2="["+mZ+"]?",bZ="(?:"+vZ+"(?:"+[M2,D2,E2].join("|")+")"+R2+P2+")*",yZ=R2+P2+bZ,CZ="(?:"+[M2+Hg+"?",Hg,D2,E2,_Z].join("|")+")",k2=RegExp(qg+"(?="+qg+")|"+CZ+yZ,"g");function xZ(t){for(var i=k2.lastIndex=0;k2.test(t);)++i;return i}O2.exports=xZ});var A2=b((z0e,N2)=>{"use strict";var wZ=w2(),TZ=S2(),SZ=F2();function kZ(t){return TZ(t)?SZ(t):wZ(t)}N2.exports=kZ});var B2=b((H0e,L2)=>{"use strict";var IZ=qf(),MZ=Ui(),DZ=Mn(),EZ=C2(),PZ=A2(),RZ="[object Map]",OZ="[object Set]";function FZ(t){if(t==null)return 0;if(DZ(t))return EZ(t)?PZ(t):t.length;var i=MZ(t);return i==RZ||i==OZ?t.size:IZ(t).length}L2.exports=FZ});var z2=b((q0e,V2)=>{"use strict";var NZ=Vf(),AZ=_g(),LZ=Yf(),BZ=Dn(),VZ=Sa(),zZ=lt(),HZ=Gi(),qZ=zo(),GZ=Wt(),jZ=Ko();function UZ(t,i,e){var n=zZ(t),o=n||HZ(t)||jZ(t);if(i=BZ(i,4),e==null){var r=t&&t.constructor;o?e=n?new r:[]:GZ(t)?e=qZ(r)?AZ(VZ(t)):{}:e={}}return(o?NZ:LZ)(t,function(a,s,c){return i(e,a,s,c)}),e}V2.exports=UZ});var j2=b((G0e,G2)=>{"use strict";var H2=qi(),$Z=Uo(),WZ=lt(),q2=H2?H2.isConcatSpreadable:void 0;function KZ(t){return WZ(t)||$Z(t)||!!(q2&&t&&t[q2])}G2.exports=KZ});var eh=b((j0e,$2)=>{"use strict";var YZ=jf(),XZ=j2();function U2(t,i,e,n,o){var r=-1,a=t.length;for(e||(e=XZ),o||(o=[]);++r<a;){var s=t[r];i>0&&e(s)?i>1?U2(s,i-1,e,n,o):YZ(o,s):n||(o[o.length]=s)}return o}$2.exports=U2});var K2=b((U0e,W2)=>{"use strict";function ZZ(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)}W2.exports=ZZ});var Gg=b(($0e,X2)=>{"use strict";var QZ=K2(),Y2=Math.max;function JZ(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),QZ(t,this,s)}}X2.exports=JZ});var J2=b((W0e,Q2)=>{"use strict";var eQ=Wf(),Z2=Z_(),tQ=_i(),nQ=Z2?function(t,i){return Z2(t,"toString",{configurable:!0,enumerable:!1,value:eQ(i),writable:!0})}:tQ;Q2.exports=nQ});var tk=b((K0e,ek)=>{"use strict";var iQ=800,oQ=16,rQ=Date.now;function aQ(t){var i=0,e=0;return function(){var n=rQ(),o=oQ-(n-e);if(e=n,o>0){if(++i>=iQ)return arguments[0]}else i=0;return t.apply(void 0,arguments)}}ek.exports=aQ});var jg=b((Y0e,nk)=>{"use strict";var sQ=J2(),lQ=tk(),cQ=lQ(sQ);nk.exports=cQ});var Ea=b((X0e,ik)=>{"use strict";var dQ=_i(),uQ=Gg(),pQ=jg();function fQ(t,i){return pQ(uQ(t,i,dQ),t+"")}ik.exports=fQ});var Ug=b((Z0e,ok)=>{"use strict";function hQ(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}ok.exports=hQ});var ak=b((Q0e,rk)=>{"use strict";function mQ(t){return t!==t}rk.exports=mQ});var lk=b((J0e,sk)=>{"use strict";function _Q(t,i,e){for(var n=e-1,o=t.length;++n<o;)if(t[n]===i)return n;return-1}sk.exports=_Q});var dk=b((eve,ck)=>{"use strict";var gQ=Ug(),vQ=ak(),bQ=lk();function yQ(t,i,e){return i===i?bQ(t,i,e):gQ(t,vQ,e)}ck.exports=yQ});var pk=b((tve,uk)=>{"use strict";var CQ=dk();function xQ(t,i){var e=t==null?0:t.length;return!!e&&CQ(t,i,0)>-1}uk.exports=xQ});var hk=b((nve,fk)=>{"use strict";function wQ(t,i,e){for(var n=-1,o=t==null?0:t.length;++n<o;)if(e(i,t[n]))return!0;return!1}fk.exports=wQ});var _k=b((ive,mk)=>{"use strict";function TQ(){}mk.exports=TQ});var vk=b((ove,gk)=>{"use strict";var $g=lg(),SQ=_k(),kQ=Zf(),IQ=1/0,MQ=$g&&1/kQ(new $g([,-0]))[1]==IQ?function(t){return new $g(t)}:SQ;gk.exports=MQ});var yk=b((rve,bk)=>{"use strict";var DQ=xg(),EQ=pk(),PQ=hk(),RQ=wg(),OQ=vk(),FQ=Zf(),NQ=200;function AQ(t,i,e){var n=-1,o=EQ,r=t.length,a=!0,s=[],c=s;if(e)a=!1,o=PQ;else if(r>=NQ){var d=i?null:OQ(t);if(d)return FQ(d);a=!1,o=RQ,c=new DQ}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 y=c.length;y--;)if(c[y]===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}bk.exports=AQ});var Wg=b((ave,Ck)=>{"use strict";var LQ=Mn(),BQ=yn();function VQ(t){return BQ(t)&&LQ(t)}Ck.exports=VQ});var wk=b((sve,xk)=>{"use strict";var zQ=eh(),HQ=Ea(),qQ=yk(),GQ=Wg(),jQ=HQ(function(t){return qQ(zQ(t,1,GQ,!0))});xk.exports=jQ});var Sk=b((lve,Tk)=>{"use strict";var UQ=Ia();function $Q(t,i){return UQ(i,function(e){return t[e]})}Tk.exports=$Q});var Kg=b((cve,kk)=>{"use strict";var WQ=Sk(),KQ=Bn();function YQ(t){return t==null?[]:WQ(t,KQ(t))}kk.exports=YQ});var Kt=b((dve,Ik)=>{"use strict";var th;if(typeof Zi=="function")try{th={clone:kT(),constant:Wf(),each:Cg(),filter:Ng(),has:Ag(),isArray:lt(),isEmpty:u2(),isFunction:zo(),isUndefined:Lg(),keys:Bn(),map:Vg(),reduce:zg(),size:B2(),transform:z2(),union:wk(),values:Kg()}}catch{}th||(th=window._);Ik.exports=th});var nh=b((pve,Pk)=>{"use strict";var ge=Kt();Pk.exports=Ie;var XQ="\0",Wi="\0",Mk="";function Ie(t){this._isDirected=ge.has(t,"directed")?t.directed:!0,this._isMultigraph=ge.has(t,"multigraph")?t.multigraph:!1,this._isCompound=ge.has(t,"compound")?t.compound:!1,this._label=void 0,this._defaultNodeLabelFn=ge.constant(void 0),this._defaultEdgeLabelFn=ge.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[Wi]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}Ie.prototype._nodeCount=0;Ie.prototype._edgeCount=0;Ie.prototype.isDirected=function(){return this._isDirected};Ie.prototype.isMultigraph=function(){return this._isMultigraph};Ie.prototype.isCompound=function(){return this._isCompound};Ie.prototype.setGraph=function(t){return this._label=t,this};Ie.prototype.graph=function(){return this._label};Ie.prototype.setDefaultNodeLabel=function(t){return ge.isFunction(t)||(t=ge.constant(t)),this._defaultNodeLabelFn=t,this};Ie.prototype.nodeCount=function(){return this._nodeCount};Ie.prototype.nodes=function(){return ge.keys(this._nodes)};Ie.prototype.sources=function(){var t=this;return ge.filter(this.nodes(),function(i){return ge.isEmpty(t._in[i])})};Ie.prototype.sinks=function(){var t=this;return ge.filter(this.nodes(),function(i){return ge.isEmpty(t._out[i])})};Ie.prototype.setNodes=function(t,i){var e=arguments,n=this;return ge.each(t,function(o){e.length>1?n.setNode(o,i):n.setNode(o)}),this};Ie.prototype.setNode=function(t,i){return ge.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]=Wi,this._children[t]={},this._children[Wi][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)};Ie.prototype.node=function(t){return this._nodes[t]};Ie.prototype.hasNode=function(t){return ge.has(this._nodes,t)};Ie.prototype.removeNode=function(t){var i=this;if(ge.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],ge.each(this.children(t),function(n){i.setParent(n)}),delete this._children[t]),ge.each(ge.keys(this._in[t]),e),delete this._in[t],delete this._preds[t],ge.each(ge.keys(this._out[t]),e),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this};Ie.prototype.setParent=function(t,i){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(ge.isUndefined(i))i=Wi;else{i+="";for(var e=i;!ge.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};Ie.prototype._removeFromParentsChildList=function(t){delete this._children[this._parent[t]][t]};Ie.prototype.parent=function(t){if(this._isCompound){var i=this._parent[t];if(i!==Wi)return i}};Ie.prototype.children=function(t){if(ge.isUndefined(t)&&(t=Wi),this._isCompound){var i=this._children[t];if(i)return ge.keys(i)}else{if(t===Wi)return this.nodes();if(this.hasNode(t))return[]}};Ie.prototype.predecessors=function(t){var i=this._preds[t];if(i)return ge.keys(i)};Ie.prototype.successors=function(t){var i=this._sucs[t];if(i)return ge.keys(i)};Ie.prototype.neighbors=function(t){var i=this.predecessors(t);if(i)return ge.union(i,this.successors(t))};Ie.prototype.isLeaf=function(t){var i;return this.isDirected()?i=this.successors(t):i=this.neighbors(t),i.length===0};Ie.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;ge.each(this._nodes,function(r,a){t(a)&&i.setNode(a,r)}),ge.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&&ge.each(i.nodes(),function(r){i.setParent(r,o(r))}),i};Ie.prototype.setDefaultEdgeLabel=function(t){return ge.isFunction(t)||(t=ge.constant(t)),this._defaultEdgeLabelFn=t,this};Ie.prototype.edgeCount=function(){return this._edgeCount};Ie.prototype.edges=function(){return ge.values(this._edgeObjs)};Ie.prototype.setPath=function(t,i){var e=this,n=arguments;return ge.reduce(t,function(o,r){return n.length>1?e.setEdge(o,r,i):e.setEdge(o,r),r}),this};Ie.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,ge.isUndefined(e)||(e=""+e);var a=Pa(this._isDirected,t,i,e);if(ge.has(this._edgeLabels,a))return o&&(this._edgeLabels[a]=n),this;if(!ge.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=ZQ(this._isDirected,t,i,e);return t=s.v,i=s.w,Object.freeze(s),this._edgeObjs[a]=s,Dk(this._preds[i],t),Dk(this._sucs[t],i),this._in[i][a]=s,this._out[t][a]=s,this._edgeCount++,this};Ie.prototype.edge=function(t,i,e){var n=arguments.length===1?Yg(this._isDirected,arguments[0]):Pa(this._isDirected,t,i,e);return this._edgeLabels[n]};Ie.prototype.hasEdge=function(t,i,e){var n=arguments.length===1?Yg(this._isDirected,arguments[0]):Pa(this._isDirected,t,i,e);return ge.has(this._edgeLabels,n)};Ie.prototype.removeEdge=function(t,i,e){var n=arguments.length===1?Yg(this._isDirected,arguments[0]):Pa(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],Ek(this._preds[i],t),Ek(this._sucs[t],i),delete this._in[i][n],delete this._out[t][n],this._edgeCount--),this};Ie.prototype.inEdges=function(t,i){var e=this._in[t];if(e){var n=ge.values(e);return i?ge.filter(n,function(o){return o.v===i}):n}};Ie.prototype.outEdges=function(t,i){var e=this._out[t];if(e){var n=ge.values(e);return i?ge.filter(n,function(o){return o.w===i}):n}};Ie.prototype.nodeEdges=function(t,i){var e=this.inEdges(t,i);if(e)return e.concat(this.outEdges(t,i))};function Dk(t,i){t[i]?t[i]++:t[i]=1}function Ek(t,i){--t[i]||delete t[i]}function Pa(t,i,e,n){var o=""+i,r=""+e;if(!t&&o>r){var a=o;o=r,r=a}return o+Mk+r+Mk+(ge.isUndefined(n)?XQ:n)}function ZQ(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 Yg(t,i){return Pa(t,i.v,i.w,i.name)}});var Ok=b((fve,Rk)=>{"use strict";Rk.exports="2.1.8"});var Nk=b((hve,Fk)=>{"use strict";Fk.exports={Graph:nh(),version:Ok()}});var Lk=b((mve,Ak)=>{"use strict";var En=Kt(),QQ=nh();Ak.exports={write:JQ,read:nJ};function JQ(t){var i={options:{directed:t.isDirected(),multigraph:t.isMultigraph(),compound:t.isCompound()},nodes:eJ(t),edges:tJ(t)};return En.isUndefined(t.graph())||(i.value=En.clone(t.graph())),i}function eJ(t){return En.map(t.nodes(),function(i){var e=t.node(i),n=t.parent(i),o={v:i};return En.isUndefined(e)||(o.value=e),En.isUndefined(n)||(o.parent=n),o})}function tJ(t){return En.map(t.edges(),function(i){var e=t.edge(i),n={v:i.v,w:i.w};return En.isUndefined(i.name)||(n.name=i.name),En.isUndefined(e)||(n.value=e),n})}function nJ(t){var i=new QQ(t.options).setGraph(t.value);return En.each(t.nodes,function(e){i.setNode(e.v,e.value),e.parent&&i.setParent(e.v,e.parent)}),En.each(t.edges,function(e){i.setEdge({v:e.v,w:e.w,name:e.name},e.value)}),i}});var Vk=b((_ve,Bk)=>{"use strict";var ih=Kt();Bk.exports=iJ;function iJ(t){var i={},e=[],n;function o(r){ih.has(i,r)||(i[r]=!0,n.push(r),ih.each(t.successors(r),o),ih.each(t.predecessors(r),o))}return ih.each(t.nodes(),function(r){n=[],o(r),n.length&&e.push(n)}),e}});var Xg=b((gve,Hk)=>{"use strict";var zk=Kt();Hk.exports=dn;function dn(){this._arr=[],this._keyIndices={}}dn.prototype.size=function(){return this._arr.length};dn.prototype.keys=function(){return this._arr.map(function(t){return t.key})};dn.prototype.has=function(t){return zk.has(this._keyIndices,t)};dn.prototype.priority=function(t){var i=this._keyIndices[t];if(i!==void 0)return this._arr[i].priority};dn.prototype.min=function(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key};dn.prototype.add=function(t,i){var e=this._keyIndices;if(t=String(t),!zk.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};dn.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var t=this._arr.pop();return delete this._keyIndices[t.key],this._heapify(0),t.key};dn.prototype.decrease=function(t,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)};dn.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)))};dn.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};dn.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 Zg=b((vve,qk)=>{"use strict";var oJ=Kt(),rJ=Xg();qk.exports=sJ;var aJ=oJ.constant(1);function sJ(t,i,e,n){return lJ(t,String(i),e||aJ,n||function(o){return t.outEdges(o)})}function lJ(t,i,e,n){var o={},r=new rJ,a,s,c=function(d){var f=d.v!==a?d.v:d.w,g=o[f],y=e(d),T=s.distance+y;if(y<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+d+" Weight: "+y);T<g.distance&&(g.distance=T,g.predecessor=a,r.decrease(f,T))};for(t.nodes().forEach(function(d){var f=d===i?0:Number.POSITIVE_INFINITY;o[d]={distance:f},r.add(d,f)});r.size()>0&&(a=r.removeMin(),s=o[a],s.distance!==Number.POSITIVE_INFINITY);)n(a).forEach(c);return o}});var jk=b((bve,Gk)=>{"use strict";var cJ=Zg(),dJ=Kt();Gk.exports=uJ;function uJ(t,i,e){return dJ.transform(t.nodes(),function(n,o){n[o]=cJ(t,o,i,e)},{})}});var Qg=b((yve,$k)=>{"use strict";var Uk=Kt();$k.exports=pJ;function pJ(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){Uk.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=[],d;do d=e.pop(),n[d].onStack=!1,c.push(d);while(a!==d);o.push(c)}}return t.nodes().forEach(function(a){Uk.has(n,a)||r(a)}),o}});var Kk=b((Cve,Wk)=>{"use strict";var fJ=Kt(),hJ=Qg();Wk.exports=mJ;function mJ(t){return fJ.filter(hJ(t),function(i){return i.length>1||i.length===1&&t.hasEdge(i[0],i[0])})}});var Xk=b((xve,Yk)=>{"use strict";var _J=Kt();Yk.exports=vJ;var gJ=_J.constant(1);function vJ(t,i,e){return bJ(t,i||gJ,e||function(n){return t.outEdges(n)})}function bJ(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(d){var f=c[r],g=a[d],y=c[d],T=f.distance+g.distance;T<y.distance&&(y.distance=T,y.predecessor=g.predecessor)})})}),n}});var Jg=b((wve,Qk)=>{"use strict";var Ra=Kt();Qk.exports=Zk;Zk.CycleException=oh;function Zk(t){var i={},e={},n=[];function o(r){if(Ra.has(e,r))throw new oh;Ra.has(i,r)||(e[r]=!0,i[r]=!0,Ra.each(t.predecessors(r),o),delete e[r],n.push(r))}if(Ra.each(t.sinks(),o),Ra.size(i)!==t.nodeCount())throw new oh;return n}function oh(){}oh.prototype=new Error});var tI=b((Tve,eI)=>{"use strict";var Jk=Jg();eI.exports=yJ;function yJ(t){try{Jk(t)}catch(i){if(i instanceof Jk.CycleException)return!1;throw i}return!0}});var e0=b((Sve,iI)=>{"use strict";var rh=Kt();iI.exports=CJ;function CJ(t,i,e){rh.isArray(i)||(i=[i]);var n=(t.isDirected()?t.successors:t.neighbors).bind(t),o=[],r={};return rh.each(i,function(a){if(!t.hasNode(a))throw new Error("Graph does not have node: "+a);nI(t,a,e==="post",r,n,o)}),o}function nI(t,i,e,n,o,r){rh.has(n,i)||(n[i]=!0,e||r.push(i),rh.each(o(i),function(a){nI(t,a,e,n,o,r)}),e&&r.push(i))}});var rI=b((kve,oI)=>{"use strict";var xJ=e0();oI.exports=wJ;function wJ(t,i){return xJ(t,i,"post")}});var sI=b((Ive,aI)=>{"use strict";var TJ=e0();aI.exports=SJ;function SJ(t,i){return TJ(t,i,"pre")}});var dI=b((Mve,cI)=>{"use strict";var lI=Kt(),kJ=nh(),IJ=Xg();cI.exports=MJ;function MJ(t,i){var e=new kJ,n={},o=new IJ,r;function a(c){var d=c.v===r?c.w:c.v,f=o.priority(d);if(f!==void 0){var g=i(c);g<f&&(n[d]=r,o.decrease(d,g))}}if(t.nodeCount()===0)return e;lI.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(),lI.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 pI=b((Dve,uI)=>{"use strict";uI.exports={components:Vk(),dijkstra:Zg(),dijkstraAll:jk(),findCycles:Kk(),floydWarshall:Xk(),isAcyclic:tI(),postorder:rI(),preorder:sI(),prim:dI(),tarjan:Qg(),topsort:Jg()}});var mI=b((Eve,hI)=>{"use strict";var fI=Nk();hI.exports={Graph:fI.Graph,json:Lk(),alg:pI(),version:fI.version}});var un=b((Pve,_I)=>{"use strict";var ah;if(typeof Zi=="function")try{ah=mI()}catch{}ah||(ah=window.graphlib);_I.exports=ah});var vI=b((Ove,gI)=>{"use strict";var DJ=vg(),EJ=1,PJ=4;function RJ(t){return DJ(t,EJ|PJ)}gI.exports=RJ});var Oa=b((Fve,bI)=>{"use strict";var OJ=Hi(),FJ=Mn(),NJ=ba(),AJ=Wt();function LJ(t,i,e){if(!AJ(e))return!1;var n=typeof i;return(n=="number"?FJ(e)&&NJ(i,e.length):n=="string"&&i in e)?OJ(e[i],t):!1}bI.exports=LJ});var xI=b((Nve,CI)=>{"use strict";var BJ=Ea(),VJ=Hi(),zJ=Oa(),HJ=mi(),yI=Object.prototype,qJ=yI.hasOwnProperty,GJ=BJ(function(t,i){t=Object(t);var e=-1,n=i.length,o=n>2?i[2]:void 0;for(o&&zJ(i[0],i[1],o)&&(n=1);++e<n;)for(var r=i[e],a=HJ(r),s=-1,c=a.length;++s<c;){var d=a[s],f=t[d];(f===void 0||VJ(f,yI[d])&&!qJ.call(t,d))&&(t[d]=r[d])}return t});CI.exports=GJ});var TI=b((Ave,wI)=>{"use strict";var jJ=Dn(),UJ=Mn(),$J=Bn();function WJ(t){return function(i,e,n){var o=Object(i);if(!UJ(i)){var r=jJ(e,3);i=$J(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}}wI.exports=WJ});var kI=b((Lve,SI)=>{"use strict";var KJ=/\s/;function YJ(t){for(var i=t.length;i--&&KJ.test(t.charAt(i)););return i}SI.exports=YJ});var MI=b((Bve,II)=>{"use strict";var XJ=kI(),ZJ=/^\s+/;function QJ(t){return t&&t.slice(0,XJ(t)+1).replace(ZJ,"")}II.exports=QJ});var RI=b((Vve,PI)=>{"use strict";var JJ=MI(),DI=Wt(),eee=$i(),EI=NaN,tee=/^[-+]0x[0-9a-f]+$/i,nee=/^0b[01]+$/i,iee=/^0o[0-7]+$/i,oee=parseInt;function ree(t){if(typeof t=="number")return t;if(eee(t))return EI;if(DI(t)){var i=typeof t.valueOf=="function"?t.valueOf():t;t=DI(i)?i+"":i}if(typeof t!="string")return t===0?t:+t;t=JJ(t);var e=nee.test(t);return e||iee.test(t)?oee(t.slice(2),e?2:8):tee.test(t)?EI:+t}PI.exports=ree});var t0=b((zve,FI)=>{"use strict";var aee=RI(),OI=1/0,see=17976931348623157e292;function lee(t){if(!t)return t===0?t:0;if(t=aee(t),t===OI||t===-OI){var i=t<0?-1:1;return i*see}return t===t?t:0}FI.exports=lee});var AI=b((Hve,NI)=>{"use strict";var cee=t0();function dee(t){var i=cee(t),e=i%1;return i===i?e?i-e:i:0}NI.exports=dee});var BI=b((qve,LI)=>{"use strict";var uee=Ug(),pee=Dn(),fee=AI(),hee=Math.max;function mee(t,i,e){var n=t==null?0:t.length;if(!n)return-1;var o=e==null?0:fee(e);return o<0&&(o=hee(n+o,0)),uee(t,pee(i,3),o)}LI.exports=mee});var zI=b((Gve,VI)=>{"use strict";var _ee=TI(),gee=BI(),vee=_ee(gee);VI.exports=vee});var n0=b((jve,HI)=>{"use strict";var bee=eh();function yee(t){var i=t==null?0:t.length;return i?bee(t,1):[]}HI.exports=yee});var GI=b((Uve,qI)=>{"use strict";var Cee=Kf(),xee=bg(),wee=mi();function Tee(t,i){return t==null?t:Cee(t,xee(i),wee)}qI.exports=Tee});var UI=b(($ve,jI)=>{"use strict";function See(t){var i=t==null?0:t.length;return i?t[i-1]:void 0}jI.exports=See});var WI=b((Wve,$I)=>{"use strict";var kee=_a(),Iee=Yf(),Mee=Dn();function Dee(t,i){var e={};return i=Mee(i,3),Iee(t,function(n,o,r){kee(e,o,i(n,o,r))}),e}$I.exports=Dee});var sh=b((Kve,KI)=>{"use strict";var Eee=$i();function Pee(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&&!Eee(a):e(a,s)))var s=a,c=r}return c}KI.exports=Pee});var XI=b((Yve,YI)=>{"use strict";function Ree(t,i){return t>i}YI.exports=Ree});var QI=b((Xve,ZI)=>{"use strict";var Oee=sh(),Fee=XI(),Nee=_i();function Aee(t){return t&&t.length?Oee(t,Nee,Fee):void 0}ZI.exports=Aee});var i0=b((Zve,JI)=>{"use strict";var Lee=_a(),Bee=Hi();function Vee(t,i,e){(e!==void 0&&!Bee(t[i],e)||e===void 0&&!(i in t))&&Lee(t,i,e)}JI.exports=Vee});var nM=b((Qve,tM)=>{"use strict";var zee=fi(),Hee=Sa(),qee=yn(),Gee="[object Object]",jee=Function.prototype,Uee=Object.prototype,eM=jee.toString,$ee=Uee.hasOwnProperty,Wee=eM.call(Object);function Kee(t){if(!qee(t)||zee(t)!=Gee)return!1;var i=Hee(t);if(i===null)return!0;var e=$ee.call(i,"constructor")&&i.constructor;return typeof e=="function"&&e instanceof e&&eM.call(e)==Wee}tM.exports=Kee});var o0=b((Jve,iM)=>{"use strict";function Yee(t,i){if(!(i==="constructor"&&typeof t[i]=="function")&&i!="__proto__")return t[i]}iM.exports=Yee});var rM=b((ebe,oM)=>{"use strict";var Xee=jo(),Zee=mi();function Qee(t){return Xee(t,Zee(t))}oM.exports=Qee});var uM=b((tbe,dM)=>{"use strict";var aM=i0(),Jee=tg(),ete=mg(),tte=ng(),nte=gg(),sM=Uo(),lM=lt(),ite=Wg(),ote=Gi(),rte=zo(),ate=Wt(),ste=nM(),lte=Ko(),cM=o0(),cte=rM();function dte(t,i,e,n,o,r,a){var s=cM(t,e),c=cM(i,e),d=a.get(c);if(d){aM(t,e,d);return}var f=r?r(s,c,e+"",t,i,a):void 0,g=f===void 0;if(g){var y=lM(c),T=!y&&ote(c),w=!y&&!T&&lte(c);f=c,y||T||w?lM(s)?f=s:ite(s)?f=tte(s):T?(g=!1,f=Jee(c,!0)):w?(g=!1,f=ete(c,!0)):f=[]:ste(c)||sM(c)?(f=s,sM(s)?f=cte(s):(!ate(s)||rte(s))&&(f=nte(c))):g=!1}g&&(a.set(c,f),o(f,c,n,r,a),a.delete(c)),aM(t,e,f)}dM.exports=dte});var hM=b((nbe,fM)=>{"use strict";var ute=ma(),pte=i0(),fte=Kf(),hte=uM(),mte=Wt(),_te=mi(),gte=o0();function pM(t,i,e,n,o){t!==i&&fte(i,function(r,a){if(o||(o=new ute),mte(r))hte(t,i,a,e,pM,n,o);else{var s=n?n(gte(t,a),r,a+"",t,i,o):void 0;s===void 0&&(s=r),pte(t,a,s)}},_te)}fM.exports=pM});var _M=b((ibe,mM)=>{"use strict";var vte=Ea(),bte=Oa();function yte(t){return vte(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&&bte(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})}mM.exports=yte});var vM=b((obe,gM)=>{"use strict";var Cte=hM(),xte=_M(),wte=xte(function(t,i,e){Cte(t,i,e)});gM.exports=wte});var r0=b((rbe,bM)=>{"use strict";function Tte(t,i){return t<i}bM.exports=Tte});var CM=b((abe,yM)=>{"use strict";var Ste=sh(),kte=r0(),Ite=_i();function Mte(t){return t&&t.length?Ste(t,Ite,kte):void 0}yM.exports=Mte});var wM=b((sbe,xM)=>{"use strict";var Dte=sh(),Ete=Dn(),Pte=r0();function Rte(t,i){return t&&t.length?Dte(t,Ete(i,2),Pte):void 0}xM.exports=Rte});var SM=b((lbe,TM)=>{"use strict";var Ote=cn(),Fte=function(){return Ote.Date.now()};TM.exports=Fte});var MM=b((cbe,IM)=>{"use strict";var Nte=ga(),Ate=Ma(),Lte=ba(),kM=Wt(),Bte=Zo();function Vte(t,i,e,n){if(!kM(t))return t;i=Ate(i,t);for(var o=-1,r=i.length,a=r-1,s=t;s!=null&&++o<r;){var c=Bte(i[o]),d=e;if(c==="__proto__"||c==="constructor"||c==="prototype")return t;if(o!=a){var f=s[c];d=n?n(f,c,s):void 0,d===void 0&&(d=kM(f)?f:Lte(i[o+1])?[]:{})}Nte(s,c,d),s=s[c]}return t}IM.exports=Vte});var EM=b((dbe,DM)=>{"use strict";var zte=Da(),Hte=MM(),qte=Ma();function Gte(t,i,e){for(var n=-1,o=i.length,r={};++n<o;){var a=i[n],s=zte(t,a);e(s,a)&&Hte(r,qte(a,t),s)}return r}DM.exports=Gte});var RM=b((ube,PM)=>{"use strict";var jte=EM(),Ute=Og();function $te(t,i){return jte(t,i,function(e,n){return Ute(t,n)})}PM.exports=$te});var FM=b((pbe,OM)=>{"use strict";var Wte=n0(),Kte=Gg(),Yte=jg();function Xte(t){return Yte(Kte(t,void 0,Wte),t+"")}OM.exports=Xte});var AM=b((fbe,NM)=>{"use strict";var Zte=RM(),Qte=FM(),Jte=Qte(function(t,i){return t==null?{}:Zte(t,i)});NM.exports=Jte});var BM=b((hbe,LM)=>{"use strict";var ene=Math.ceil,tne=Math.max;function nne(t,i,e,n){for(var o=-1,r=tne(ene((i-t)/(e||1)),0),a=Array(r);r--;)a[n?r:++o]=t,t+=e;return a}LM.exports=nne});var zM=b((mbe,VM)=>{"use strict";var ine=BM(),one=Oa(),a0=t0();function rne(t){return function(i,e,n){return n&&typeof n!="number"&&one(i,e,n)&&(e=n=void 0),i=a0(i),e===void 0?(e=i,i=0):e=a0(e),n=n===void 0?i<e?1:-1:a0(n),ine(i,e,n,t)}}VM.exports=rne});var qM=b((_be,HM)=>{"use strict";var ane=zM(),sne=ane();HM.exports=sne});var jM=b((gbe,GM)=>{"use strict";function lne(t,i){var e=t.length;for(t.sort(i);e--;)t[e]=t[e].value;return t}GM.exports=lne});var WM=b((vbe,$M)=>{"use strict";var UM=$i();function cne(t,i){if(t!==i){var e=t!==void 0,n=t===null,o=t===t,r=UM(t),a=i!==void 0,s=i===null,c=i===i,d=UM(i);if(!s&&!d&&!r&&t>i||r&&a&&c&&!s&&!d||n&&a&&c||!e&&c||!o)return 1;if(!n&&!r&&!d&&t<i||d&&e&&o&&!n&&!r||s&&e&&o||!a&&o||!c)return-1}return 0}$M.exports=cne});var YM=b((bbe,KM)=>{"use strict";var dne=WM();function une(t,i,e){for(var n=-1,o=t.criteria,r=i.criteria,a=o.length,s=e.length;++n<a;){var c=dne(o[n],r[n]);if(c){if(n>=s)return c;var d=e[n];return c*(d=="desc"?-1:1)}}return t.index-i.index}KM.exports=une});var ZM=b((ybe,XM)=>{"use strict";var s0=Ia(),pne=Da(),fne=Dn(),hne=Bg(),mne=jM(),_ne=ya(),gne=YM(),vne=_i(),bne=lt();function yne(t,i,e){i.length?i=s0(i,function(r){return bne(r)?function(a){return pne(a,r.length===1?r[0]:r)}:r}):i=[vne];var n=-1;i=s0(i,_ne(fne));var o=hne(t,function(r,a,s){var c=s0(i,function(d){return d(r)});return{criteria:c,index:++n,value:r}});return mne(o,function(r,a){return gne(r,a,e)})}XM.exports=yne});var eD=b((Cbe,JM)=>{"use strict";var Cne=eh(),xne=ZM(),wne=Ea(),QM=Oa(),Tne=wne(function(t,i){if(t==null)return[];var e=i.length;return e>1&&QM(t,i[0],i[1])?i=[]:e>2&&QM(i[0],i[1],i[2])&&(i=[i[0]]),xne(t,Cne(i,1),[])});JM.exports=Tne});var nD=b((xbe,tD)=>{"use strict";var Sne=Pg(),kne=0;function Ine(t){var i=++kne;return Sne(t)+i}tD.exports=Ine});var oD=b((wbe,iD)=>{"use strict";function Mne(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}iD.exports=Mne});var aD=b((Tbe,rD)=>{"use strict";var Dne=ga(),Ene=oD();function Pne(t,i){return Ene(t||[],i||[],Dne)}rD.exports=Pne});var et=b((Sbe,sD)=>{"use strict";var lh;if(typeof Zi=="function")try{lh={cloneDeep:vI(),constant:Wf(),defaults:xI(),each:Cg(),filter:Ng(),find:zI(),flatten:n0(),forEach:yg(),forIn:GI(),has:Ag(),isUndefined:Lg(),last:UI(),map:Vg(),mapValues:WI(),max:QI(),merge:vM(),min:CM(),minBy:wM(),now:SM(),pick:AM(),range:qM(),reduce:zg(),sortBy:eD(),uniqueId:nD(),values:Kg(),zipObject:aD()}}catch{}lh||(lh=window._);sD.exports=lh});var dD=b((Ibe,cD)=>{"use strict";cD.exports=ch;function ch(){var t={};t._next=t._prev=t,this._sentinel=t}ch.prototype.dequeue=function(){var t=this._sentinel,i=t._prev;if(i!==t)return lD(i),i};ch.prototype.enqueue=function(t){var i=this._sentinel;t._prev&&t._next&&lD(t),t._next=i._next,i._next._prev=t,i._next=t,t._prev=i};ch.prototype.toString=function(){for(var t=[],i=this._sentinel,e=i._prev;e!==i;)t.push(JSON.stringify(e,Rne)),e=e._prev;return"["+t.join(", ")+"]"};function lD(t){t._prev._next=t._next,t._next._prev=t._prev,delete t._next,delete t._prev}function Rne(t,i){if(t!=="_next"&&t!=="_prev")return i}});var pD=b((Mbe,uD)=>{"use strict";var Vn=et(),One=un().Graph,Fne=dD();uD.exports=Ane;var Nne=Vn.constant(1);function Ane(t,i){if(t.nodeCount()<=1)return[];var e=Bne(t,i||Nne),n=Lne(e.graph,e.buckets,e.zeroIdx);return Vn.flatten(Vn.map(n,function(o){return t.outEdges(o.v,o.w)}),!0)}function Lne(t,i,e){for(var n=[],o=i[i.length-1],r=i[0],a;t.nodeCount();){for(;a=r.dequeue();)l0(t,i,e,a);for(;a=o.dequeue();)l0(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(l0(t,i,e,a,!0));break}}}return n}function l0(t,i,e,n,o){var r=o?[]:void 0;return Vn.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,c0(i,e,c)}),Vn.forEach(t.outEdges(n.v),function(a){var s=t.edge(a),c=a.w,d=t.node(c);d.in-=s,c0(i,e,d)}),t.removeNode(n.v),r}function Bne(t,i){var e=new One,n=0,o=0;Vn.forEach(t.nodes(),function(s){e.setNode(s,{v:s,in:0,out:0})}),Vn.forEach(t.edges(),function(s){var c=e.edge(s.v,s.w)||0,d=i(s),f=c+d;e.setEdge(s.v,s.w,f),o=Math.max(o,e.node(s.v).out+=d),n=Math.max(n,e.node(s.w).in+=d)});var r=Vn.range(o+n+3).map(function(){return new Fne}),a=n+1;return Vn.forEach(e.nodes(),function(s){c0(r,a,e.node(s))}),{graph:e,buckets:r,zeroIdx:a}}function c0(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 hD=b((Dbe,fD)=>{"use strict";var Ki=et(),Vne=pD();fD.exports={run:zne,undo:qne};function zne(t){var i=t.graph().acyclicer==="greedy"?Vne(t,e(t)):Hne(t);Ki.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,Ki.uniqueId("rev"))});function e(n){return function(o){return n.edge(o).weight}}}function Hne(t){var i=[],e={},n={};function o(r){Ki.has(n,r)||(n[r]=!0,e[r]=!0,Ki.forEach(t.outEdges(r),function(a){Ki.has(e,a.w)?i.push(a):o(a.w)}),delete e[r])}return Ki.forEach(t.nodes(),o),i}function qne(t){Ki.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 It=b((Ebe,vD)=>{"use strict";var Ae=et(),mD=un().Graph;vD.exports={addDummyNode:_D,simplify:Gne,asNonCompoundGraph:jne,successorWeights:Une,predecessorWeights:$ne,intersectRect:Wne,buildLayerMatrix:Kne,normalizeRanks:Yne,removeEmptyRanks:Xne,addBorderNode:Zne,maxRank:gD,partition:Qne,time:Jne,notime:eie};function _D(t,i,e,n){var o;do o=Ae.uniqueId(n);while(t.hasNode(o));return e.dummy=i,t.setNode(o,e),o}function Gne(t){var i=new mD().setGraph(t.graph());return Ae.forEach(t.nodes(),function(e){i.setNode(e,t.node(e))}),Ae.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 jne(t){var i=new mD({multigraph:t.isMultigraph()}).setGraph(t.graph());return Ae.forEach(t.nodes(),function(e){t.children(e).length||i.setNode(e,t.node(e))}),Ae.forEach(t.edges(),function(e){i.setEdge(e,t.edge(e))}),i}function Une(t){var i=Ae.map(t.nodes(),function(e){var n={};return Ae.forEach(t.outEdges(e),function(o){n[o.w]=(n[o.w]||0)+t.edge(o).weight}),n});return Ae.zipObject(t.nodes(),i)}function $ne(t){var i=Ae.map(t.nodes(),function(e){var n={};return Ae.forEach(t.inEdges(e),function(o){n[o.v]=(n[o.v]||0)+t.edge(o).weight}),n});return Ae.zipObject(t.nodes(),i)}function Wne(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,d;return Math.abs(r)*a>Math.abs(o)*s?(r<0&&(s=-s),c=s*o/r,d=s):(o<0&&(a=-a),c=a,d=a*r/o),{x:e+c,y:n+d}}function Kne(t){var i=Ae.map(Ae.range(gD(t)+1),function(){return[]});return Ae.forEach(t.nodes(),function(e){var n=t.node(e),o=n.rank;Ae.isUndefined(o)||(i[o][n.order]=e)}),i}function Yne(t){var i=Ae.min(Ae.map(t.nodes(),function(e){return t.node(e).rank}));Ae.forEach(t.nodes(),function(e){var n=t.node(e);Ae.has(n,"rank")&&(n.rank-=i)})}function Xne(t){var i=Ae.min(Ae.map(t.nodes(),function(r){return t.node(r).rank})),e=[];Ae.forEach(t.nodes(),function(r){var a=t.node(r).rank-i;e[a]||(e[a]=[]),e[a].push(r)});var n=0,o=t.graph().nodeRankFactor;Ae.forEach(e,function(r,a){Ae.isUndefined(r)&&a%o!==0?--n:n&&Ae.forEach(r,function(s){t.node(s).rank+=n})})}function Zne(t,i,e,n){var o={width:0,height:0};return arguments.length>=4&&(o.rank=e,o.order=n),_D(t,"border",o,i)}function gD(t){return Ae.max(Ae.map(t.nodes(),function(i){var e=t.node(i).rank;if(!Ae.isUndefined(e))return e}))}function Qne(t,i){var e={lhs:[],rhs:[]};return Ae.forEach(t,function(n){i(n)?e.lhs.push(n):e.rhs.push(n)}),e}function Jne(t,i){var e=Ae.now();try{return i()}finally{console.log(t+" time: "+(Ae.now()-e)+"ms")}}function eie(t,i){return i()}});var CD=b((Pbe,yD)=>{"use strict";var bD=et(),tie=It();yD.exports={run:nie,undo:oie};function nie(t){t.graph().dummyChains=[],bD.forEach(t.edges(),function(i){iie(t,i)})}function iie(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 d,f,g;for(g=0,++n;n<r;++g,++n)s.points=[],f={width:0,height:0,edgeLabel:s,edgeObj:i,rank:n},d=tie.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,d,{weight:s.weight},a),g===0&&t.graph().dummyChains.push(d),e=d;t.setEdge(e,o,{weight:s.weight},a)}}function oie(t){bD.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 Fa=b((Rbe,xD)=>{"use strict";var dh=et();xD.exports={longestPath:rie,slack:aie};function rie(t){var i={};function e(n){var o=t.node(n);if(dh.has(i,n))return o.rank;i[n]=!0;var r=dh.min(dh.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}dh.forEach(t.sources(),e)}function aie(t,i){return t.node(i.w).rank-t.node(i.v).rank-t.edge(i).minlen}});var d0=b((Obe,wD)=>{"use strict";var uh=et(),sie=un().Graph,ph=Fa().slack;wD.exports=lie;function lie(t){var i=new sie({directed:!1}),e=t.nodes()[0],n=t.nodeCount();i.setNode(e,{});for(var o,r;cie(i,t)<n;)o=die(i,t),r=i.hasNode(o.v)?ph(t,o):-ph(t,o),uie(i,t,r);return i}function cie(t,i){function e(n){uh.forEach(i.nodeEdges(n),function(o){var r=o.v,a=n===r?o.w:r;!t.hasNode(a)&&!ph(i,o)&&(t.setNode(a,{}),t.setEdge(n,a,{}),e(a))})}return uh.forEach(t.nodes(),e),t.nodeCount()}function die(t,i){return uh.minBy(i.edges(),function(e){if(t.hasNode(e.v)!==t.hasNode(e.w))return ph(i,e)})}function uie(t,i,e){uh.forEach(t.nodes(),function(n){i.node(n).rank+=e})}});var PD=b((Fbe,ED)=>{"use strict";var zn=et(),pie=d0(),fie=Fa().slack,hie=Fa().longestPath,mie=un().alg.preorder,_ie=un().alg.postorder,gie=It().simplify;ED.exports=Yi;Yi.initLowLimValues=p0;Yi.initCutValues=u0;Yi.calcCutValue=SD;Yi.leaveEdge=ID;Yi.enterEdge=MD;Yi.exchangeEdges=DD;function Yi(t){t=gie(t),hie(t);var i=pie(t);p0(i),u0(i,t);for(var e,n;e=ID(i);)n=MD(i,t,e),DD(i,t,e,n)}function u0(t,i){var e=_ie(t,t.nodes());e=e.slice(0,e.length-1),zn.forEach(e,function(n){vie(t,i,n)})}function vie(t,i,e){var n=t.node(e),o=n.parent;t.edge(e,o).cutvalue=SD(t,i,e)}function SD(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,zn.forEach(i.nodeEdges(e),function(c){var d=c.v===e,f=d?c.w:c.v;if(f!==o){var g=d===r,y=i.edge(c).weight;if(s+=g?y:-y,yie(t,e,f)){var T=t.edge(e,f).cutvalue;s+=g?-T:T}}}),s}function p0(t,i){arguments.length<2&&(i=t.nodes()[0]),kD(t,{},1,i)}function kD(t,i,e,n,o){var r=e,a=t.node(n);return i[n]=!0,zn.forEach(t.neighbors(n),function(s){zn.has(i,s)||(e=kD(t,i,e,s,n))}),a.low=r,a.lim=e++,o?a.parent=o:delete a.parent,e}function ID(t){return zn.find(t.edges(),function(i){return t.edge(i).cutvalue<0})}function MD(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 d=zn.filter(i.edges(),function(f){return c===TD(t,t.node(f.v),s)&&c!==TD(t,t.node(f.w),s)});return zn.minBy(d,function(f){return fie(i,f)})}function DD(t,i,e,n){var o=e.v,r=e.w;t.removeEdge(o,r),t.setEdge(n.v,n.w,{}),p0(t),u0(t,i),bie(t,i)}function bie(t,i){var e=zn.find(t.nodes(),function(o){return!i.node(o).parent}),n=mie(t,e);n=n.slice(1),zn.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 yie(t,i,e){return t.hasEdge(i,e)}function TD(t,i,e){return e.low<=i.lim&&i.lim<=e.lim}});var ND=b((Nbe,FD)=>{"use strict";var Cie=Fa(),OD=Cie.longestPath,xie=d0(),wie=PD();FD.exports=Tie;function Tie(t){switch(t.graph().ranker){case"network-simplex":RD(t);break;case"tight-tree":kie(t);break;case"longest-path":Sie(t);break;default:RD(t)}}var Sie=OD;function kie(t){OD(t),xie(t)}function RD(t){wie(t)}});var LD=b((Abe,AD)=>{"use strict";var f0=et();AD.exports=Iie;function Iie(t){var i=Die(t);f0.forEach(t.graph().dummyChains,function(e){for(var n=t.node(e),o=n.edgeObj,r=Mie(t,i,o.v,o.w),a=r.path,s=r.lca,c=0,d=a[c],f=!0;e!==o.w;){if(n=t.node(e),f){for(;(d=a[c])!==s&&t.node(d).maxRank<n.rank;)c++;d===s&&(f=!1)}if(!f){for(;c<a.length-1&&t.node(d=a[c+1]).minRank<=n.rank;)c++;d=a[c]}t.setParent(e,d),e=t.successors(e)[0]}})}function Mie(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,d;c=e;do c=t.parent(c),o.push(c);while(c&&(i[c].low>a||s>i[c].lim));for(d=c,c=n;(c=t.parent(c))!==d;)r.push(c);return{path:o.concat(r.reverse()),lca:d}}function Die(t){var i={},e=0;function n(o){var r=e;f0.forEach(t.children(o),n),i[o]={low:r,lim:e++}}return f0.forEach(t.children(),n),i}});var zD=b((Lbe,VD)=>{"use strict";var Hn=et(),h0=It();VD.exports={run:Eie,cleanup:Oie};function Eie(t){var i=h0.addDummyNode(t,"root",{},"_root"),e=Pie(t),n=Hn.max(Hn.values(e))-1,o=2*n+1;t.graph().nestingRoot=i,Hn.forEach(t.edges(),function(a){t.edge(a).minlen*=o});var r=Rie(t)+1;Hn.forEach(t.children(),function(a){BD(t,i,o,r,n,e,a)}),t.graph().nodeRankFactor=o}function BD(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=h0.addBorderNode(t,"_bt"),d=h0.addBorderNode(t,"_bb"),f=t.node(a);t.setParent(c,a),f.borderTop=c,t.setParent(d,a),f.borderBottom=d,Hn.forEach(s,function(g){BD(t,i,e,n,o,r,g);var y=t.node(g),T=y.borderTop?y.borderTop:g,w=y.borderBottom?y.borderBottom:g,N=y.borderTop?n:2*n,H=T!==w?1:o-r[a]+1;t.setEdge(c,T,{weight:N,minlen:H,nestingEdge:!0}),t.setEdge(w,d,{weight:N,minlen:H,nestingEdge:!0})}),t.parent(a)||t.setEdge(i,c,{weight:0,minlen:o+r[a]})}function Pie(t){var i={};function e(n,o){var r=t.children(n);r&&r.length&&Hn.forEach(r,function(a){e(a,o+1)}),i[n]=o}return Hn.forEach(t.children(),function(n){e(n,1)}),i}function Rie(t){return Hn.reduce(t.edges(),function(i,e){return i+t.edge(e).weight},0)}function Oie(t){var i=t.graph();t.removeNode(i.nestingRoot),delete i.nestingRoot,Hn.forEach(t.edges(),function(e){var n=t.edge(e);n.nestingEdge&&t.removeEdge(e)})}});var GD=b((Bbe,qD)=>{"use strict";var m0=et(),Fie=It();qD.exports=Nie;function Nie(t){function i(e){var n=t.children(e),o=t.node(e);if(n.length&&m0.forEach(n,i),m0.has(o,"minRank")){o.borderLeft=[],o.borderRight=[];for(var r=o.minRank,a=o.maxRank+1;r<a;++r)HD(t,"borderLeft","_bl",e,o,r),HD(t,"borderRight","_br",e,o,r)}}m0.forEach(t.children(),i)}function HD(t,i,e,n,o,r){var a={width:0,height:0,rank:r,borderType:i},s=o[i][r-1],c=Fie.addDummyNode(t,"border",a,e);o[i][r]=c,t.setParent(c,n),s&&t.setEdge(s,c,{weight:1})}});var WD=b((Vbe,$D)=>{"use strict";var Pn=et();$D.exports={adjust:Aie,undo:Lie};function Aie(t){var i=t.graph().rankdir.toLowerCase();(i==="lr"||i==="rl")&&UD(t)}function Lie(t){var i=t.graph().rankdir.toLowerCase();(i==="bt"||i==="rl")&&Bie(t),(i==="lr"||i==="rl")&&(Vie(t),UD(t))}function UD(t){Pn.forEach(t.nodes(),function(i){jD(t.node(i))}),Pn.forEach(t.edges(),function(i){jD(t.edge(i))})}function jD(t){var i=t.width;t.width=t.height,t.height=i}function Bie(t){Pn.forEach(t.nodes(),function(i){_0(t.node(i))}),Pn.forEach(t.edges(),function(i){var e=t.edge(i);Pn.forEach(e.points,_0),Pn.has(e,"y")&&_0(e)})}function _0(t){t.y=-t.y}function Vie(t){Pn.forEach(t.nodes(),function(i){g0(t.node(i))}),Pn.forEach(t.edges(),function(i){var e=t.edge(i);Pn.forEach(e.points,g0),Pn.has(e,"x")&&g0(e)})}function g0(t){var i=t.x;t.x=t.y,t.y=i}});var YD=b((zbe,KD)=>{"use strict";var qn=et();KD.exports=zie;function zie(t){var i={},e=qn.filter(t.nodes(),function(s){return!t.children(s).length}),n=qn.max(qn.map(e,function(s){return t.node(s).rank})),o=qn.map(qn.range(n+1),function(){return[]});function r(s){if(!qn.has(i,s)){i[s]=!0;var c=t.node(s);o[c.rank].push(s),qn.forEach(t.successors(s),r)}}var a=qn.sortBy(e,function(s){return t.node(s).rank});return qn.forEach(a,r),o}});var ZD=b((Hbe,XD)=>{"use strict";var gi=et();XD.exports=Hie;function Hie(t,i){for(var e=0,n=1;n<i.length;++n)e+=qie(t,i[n-1],i[n]);return e}function qie(t,i,e){for(var n=gi.zipObject(e,gi.map(e,function(d,f){return f})),o=gi.flatten(gi.map(i,function(d){return gi.sortBy(gi.map(t.outEdges(d),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=gi.map(new Array(a),function(){return 0}),c=0;return gi.forEach(o.forEach(function(d){var f=d.pos+r;s[f]+=d.weight;for(var g=0;f>0;)f%2&&(g+=s[f+1]),f=f-1>>1,s[f]+=d.weight;c+=d.weight*g})),c}});var eE=b((qbe,JD)=>{"use strict";var QD=et();JD.exports=Gie;function Gie(t,i){return QD.map(i,function(e){var n=t.inEdges(e);if(n.length){var o=QD.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 nE=b((Gbe,tE)=>{"use strict";var Yt=et();tE.exports=jie;function jie(t,i){var e={};Yt.forEach(t,function(o,r){var a=e[o.v]={indegree:0,in:[],out:[],vs:[o.v],i:r};Yt.isUndefined(o.barycenter)||(a.barycenter=o.barycenter,a.weight=o.weight)}),Yt.forEach(i.edges(),function(o){var r=e[o.v],a=e[o.w];!Yt.isUndefined(r)&&!Yt.isUndefined(a)&&(a.indegree++,r.out.push(e[o.w]))});var n=Yt.filter(e,function(o){return!o.indegree});return Uie(n)}function Uie(t){var i=[];function e(r){return function(a){a.merged||(Yt.isUndefined(a.barycenter)||Yt.isUndefined(r.barycenter)||a.barycenter>=r.barycenter)&&$ie(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),Yt.forEach(o.in.reverse(),e(o)),Yt.forEach(o.out,n(o))}return Yt.map(Yt.filter(i,function(r){return!r.merged}),function(r){return Yt.pick(r,["vs","i","barycenter","weight"])})}function $ie(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 rE=b((jbe,oE)=>{"use strict";var Na=et(),Wie=It();oE.exports=Kie;function Kie(t,i){var e=Wie.partition(t,function(f){return Na.has(f,"barycenter")}),n=e.lhs,o=Na.sortBy(e.rhs,function(f){return-f.i}),r=[],a=0,s=0,c=0;n.sort(Yie(!!i)),c=iE(r,o,c),Na.forEach(n,function(f){c+=f.vs.length,r.push(f.vs),a+=f.barycenter*f.weight,s+=f.weight,c=iE(r,o,c)});var d={vs:Na.flatten(r,!0)};return s&&(d.barycenter=a/s,d.weight=s),d}function iE(t,i,e){for(var n;i.length&&(n=Na.last(i)).i<=e;)i.pop(),t.push(n.vs),e++;return e}function Yie(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 lE=b((Ube,sE)=>{"use strict";var vi=et(),Xie=eE(),Zie=nE(),Qie=rE();sE.exports=aE;function aE(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=vi.filter(o,function(w){return w!==a&&w!==s}));var d=Xie(t,o);vi.forEach(d,function(w){if(t.children(w.v).length){var N=aE(t,w.v,e,n);c[w.v]=N,vi.has(N,"barycenter")&&eoe(w,N)}});var f=Zie(d,e);Jie(f,c);var g=Qie(f,n);if(a&&(g.vs=vi.flatten([a,g.vs,s],!0),t.predecessors(a).length)){var y=t.node(t.predecessors(a)[0]),T=t.node(t.predecessors(s)[0]);vi.has(g,"barycenter")||(g.barycenter=0,g.weight=0),g.barycenter=(g.barycenter*g.weight+y.order+T.order)/(g.weight+2),g.weight+=2}return g}function Jie(t,i){vi.forEach(t,function(e){e.vs=vi.flatten(e.vs.map(function(n){return i[n]?i[n].vs:n}),!0)})}function eoe(t,i){vi.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 dE=b(($be,cE)=>{"use strict";var Aa=et(),toe=un().Graph;cE.exports=noe;function noe(t,i,e){var n=ioe(t),o=new toe({compound:!0}).setGraph({root:n}).setDefaultNodeLabel(function(r){return t.node(r)});return Aa.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),Aa.forEach(t[e](r),function(c){var d=c.v===r?c.w:c.v,f=o.edge(d,r),g=Aa.isUndefined(f)?0:f.weight;o.setEdge(d,r,{weight:t.edge(c).weight+g})}),Aa.has(a,"minRank")&&o.setNode(r,{borderLeft:a.borderLeft[i],borderRight:a.borderRight[i]}))}),o}function ioe(t){for(var i;t.hasNode(i=Aa.uniqueId("_root")););return i}});var pE=b((Wbe,uE)=>{"use strict";var ooe=et();uE.exports=roe;function roe(t,i,e){var n={},o;ooe.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 gE=b((Kbe,_E)=>{"use strict";var bi=et(),aoe=YD(),soe=ZD(),loe=lE(),coe=dE(),doe=pE(),uoe=un().Graph,fE=It();_E.exports=poe;function poe(t){var i=fE.maxRank(t),e=hE(t,bi.range(1,i+1),"inEdges"),n=hE(t,bi.range(i-1,-1,-1),"outEdges"),o=aoe(t);mE(t,o);for(var r=Number.POSITIVE_INFINITY,a,s=0,c=0;c<4;++s,++c){foe(s%2?e:n,s%4>=2),o=fE.buildLayerMatrix(t);var d=soe(t,o);d<r&&(c=0,a=bi.cloneDeep(o),r=d)}mE(t,a)}function hE(t,i,e){return bi.map(i,function(n){return coe(t,n,e)})}function foe(t,i){var e=new uoe;bi.forEach(t,function(n){var o=n.graph().root,r=loe(n,o,e,i);bi.forEach(r.vs,function(a,s){n.node(a).order=s}),doe(n,e,r.vs)})}function mE(t,i){bi.forEach(i,function(e){bi.forEach(e,function(n,o){t.node(n).order=o})})}});var IE=b((Ybe,kE)=>{"use strict";var ve=et(),hoe=un().Graph,moe=It();kE.exports={positionX:voe,findType1Conflicts:vE,findType2Conflicts:bE,addConflict:v0,hasConflict:yE,verticalAlignment:CE,horizontalCompaction:xE,alignCoordinates:TE,findSmallestWidthAlignment:wE,balance:SE};function vE(t,i){var e={};function n(o,r){var a=0,s=0,c=o.length,d=ve.last(r);return ve.forEach(r,function(f,g){var y=_oe(t,f),T=y?t.node(y).order:c;(y||f===d)&&(ve.forEach(r.slice(s,g+1),function(w){ve.forEach(t.predecessors(w),function(N){var H=t.node(N),G=H.order;(G<a||T<G)&&!(H.dummy&&t.node(w).dummy)&&v0(e,N,w)})}),s=g+1,a=T)}),r}return ve.reduce(i,n),e}function bE(t,i){var e={};function n(r,a,s,c,d){var f;ve.forEach(ve.range(a,s),function(g){f=r[g],t.node(f).dummy&&ve.forEach(t.predecessors(f),function(y){var T=t.node(y);T.dummy&&(T.order<c||T.order>d)&&v0(e,y,f)})})}function o(r,a){var s=-1,c,d=0;return ve.forEach(a,function(f,g){if(t.node(f).dummy==="border"){var y=t.predecessors(f);y.length&&(c=t.node(y[0]).order,n(a,d,g,s,c),d=g,s=c)}n(a,d,a.length,c,r.length)}),a}return ve.reduce(i,o),e}function _oe(t,i){if(t.node(i).dummy)return ve.find(t.predecessors(i),function(e){return t.node(e).dummy})}function v0(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 yE(t,i,e){if(i>e){var n=i;i=e,e=n}return ve.has(t[i],e)}function CE(t,i,e,n){var o={},r={},a={};return ve.forEach(i,function(s){ve.forEach(s,function(c,d){o[c]=c,r[c]=c,a[c]=d})}),ve.forEach(i,function(s){var c=-1;ve.forEach(s,function(d){var f=n(d);if(f.length){f=ve.sortBy(f,function(N){return a[N]});for(var g=(f.length-1)/2,y=Math.floor(g),T=Math.ceil(g);y<=T;++y){var w=f[y];r[d]===d&&c<a[w]&&!yE(e,d,w)&&(r[w]=d,r[d]=o[d]=o[w],c=a[w])}}})}),{root:o,align:r}}function xE(t,i,e,n,o){var r={},a=goe(t,i,e,o),s=o?"borderLeft":"borderRight";function c(g,y){for(var T=a.nodes(),w=T.pop(),N={};w;)N[w]?g(w):(N[w]=!0,T.push(w),T=T.concat(y(w))),w=T.pop()}function d(g){r[g]=a.inEdges(g).reduce(function(y,T){return Math.max(y,r[T.v]+a.edge(T))},0)}function f(g){var y=a.outEdges(g).reduce(function(w,N){return Math.min(w,r[N.w]-a.edge(N))},Number.POSITIVE_INFINITY),T=t.node(g);y!==Number.POSITIVE_INFINITY&&T.borderType!==s&&(r[g]=Math.max(r[g],y))}return c(d,a.predecessors.bind(a)),c(f,a.successors.bind(a)),ve.forEach(n,function(g){r[g]=r[e[g]]}),r}function goe(t,i,e,n){var o=new hoe,r=t.graph(),a=boe(r.nodesep,r.edgesep,n);return ve.forEach(i,function(s){var c;ve.forEach(s,function(d){var f=e[d];if(o.setNode(f),c){var g=e[c],y=o.edge(g,f);o.setEdge(g,f,Math.max(a(t,d,c),y||0))}c=d})}),o}function wE(t,i){return ve.minBy(ve.values(i),function(e){var n=Number.NEGATIVE_INFINITY,o=Number.POSITIVE_INFINITY;return ve.forIn(e,function(r,a){var s=yoe(t,a)/2;n=Math.max(r+s,n),o=Math.min(r-s,o)}),n-o})}function TE(t,i){var e=ve.values(i),n=ve.min(e),o=ve.max(e);ve.forEach(["u","d"],function(r){ve.forEach(["l","r"],function(a){var s=r+a,c=t[s],d;if(c!==i){var f=ve.values(c);d=a==="l"?n-ve.min(f):o-ve.max(f),d&&(t[s]=ve.mapValues(c,function(g){return g+d}))}})})}function SE(t,i){return ve.mapValues(t.ul,function(e,n){if(i)return t[i.toLowerCase()][n];var o=ve.sortBy(ve.map(t,n));return(o[1]+o[2])/2})}function voe(t){var i=moe.buildLayerMatrix(t),e=ve.merge(vE(t,i),bE(t,i)),n={},o;ve.forEach(["u","d"],function(a){o=a==="u"?i:ve.values(i).reverse(),ve.forEach(["l","r"],function(s){s==="r"&&(o=ve.map(o,function(g){return ve.values(g).reverse()}));var c=(a==="u"?t.predecessors:t.successors).bind(t),d=CE(t,o,e,c),f=xE(t,o,d.root,d.align,s==="r");s==="r"&&(f=ve.mapValues(f,function(g){return-g})),n[a+s]=f})});var r=wE(t,n);return TE(n,r),SE(n,t.graph().align)}function boe(t,i,e){return function(n,o,r){var a=n.node(o),s=n.node(r),c=0,d;if(c+=a.width/2,ve.has(a,"labelpos"))switch(a.labelpos.toLowerCase()){case"l":d=-a.width/2;break;case"r":d=a.width/2;break}if(d&&(c+=e?d:-d),d=0,c+=(a.dummy?i:t)/2,c+=(s.dummy?i:t)/2,c+=s.width/2,ve.has(s,"labelpos"))switch(s.labelpos.toLowerCase()){case"l":d=s.width/2;break;case"r":d=-s.width/2;break}return d&&(c+=e?d:-d),d=0,c}}function yoe(t,i){return t.node(i).width}});var EE=b((Xbe,DE)=>{"use strict";var La=et(),ME=It(),Coe=IE().positionX;DE.exports=xoe;function xoe(t){t=ME.asNonCompoundGraph(t),woe(t),La.forEach(Coe(t),function(i,e){t.node(e).x=i})}function woe(t){var i=ME.buildLayerMatrix(t),e=t.graph().ranksep,n=0;La.forEach(i,function(o){var r=La.max(La.map(o,function(a){return t.node(a).height}));La.forEach(o,function(a){t.node(a).y=n+r/2}),n+=r+e})}});var AE=b((Zbe,NE)=>{"use strict";var we=et(),PE=hD(),RE=CD(),Toe=ND(),Soe=It().normalizeRanks,koe=LD(),Ioe=It().removeEmptyRanks,OE=zD(),Moe=GD(),FE=WD(),Doe=gE(),Eoe=EE(),yi=It(),Poe=un().Graph;NE.exports=Roe;function Roe(t,i){var e=i&&i.debugTiming?yi.time:yi.notime;e("layout",function(){var n=e(" buildLayoutGraph",function(){return Goe(t)});e(" runLayout",function(){Ooe(n,e)}),e(" updateInputGraph",function(){Foe(t,n)})})}function Ooe(t,i){i(" makeSpaceForEdgeLabels",function(){joe(t)}),i(" removeSelfEdges",function(){Joe(t)}),i(" acyclic",function(){PE.run(t)}),i(" nestingGraph.run",function(){OE.run(t)}),i(" rank",function(){Toe(yi.asNonCompoundGraph(t))}),i(" injectEdgeLabelProxies",function(){Uoe(t)}),i(" removeEmptyRanks",function(){Ioe(t)}),i(" nestingGraph.cleanup",function(){OE.cleanup(t)}),i(" normalizeRanks",function(){Soe(t)}),i(" assignRankMinMax",function(){$oe(t)}),i(" removeEdgeLabelProxies",function(){Woe(t)}),i(" normalize.run",function(){RE.run(t)}),i(" parentDummyChains",function(){koe(t)}),i(" addBorderSegments",function(){Moe(t)}),i(" order",function(){Doe(t)}),i(" insertSelfEdges",function(){ere(t)}),i(" adjustCoordinateSystem",function(){FE.adjust(t)}),i(" position",function(){Eoe(t)}),i(" positionSelfEdges",function(){tre(t)}),i(" removeBorderNodes",function(){Qoe(t)}),i(" normalize.undo",function(){RE.undo(t)}),i(" fixupEdgeLabelCoords",function(){Xoe(t)}),i(" undoCoordinateSystem",function(){FE.undo(t)}),i(" translateGraph",function(){Koe(t)}),i(" assignNodeIntersects",function(){Yoe(t)}),i(" reversePoints",function(){Zoe(t)}),i(" acyclic.undo",function(){PE.undo(t)})}function Foe(t,i){we.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))}),we.forEach(t.edges(),function(e){var n=t.edge(e),o=i.edge(e);n.points=o.points,we.has(o,"x")&&(n.x=o.x,n.y=o.y)}),t.graph().width=i.graph().width,t.graph().height=i.graph().height}var Noe=["nodesep","edgesep","ranksep","marginx","marginy"],Aoe={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},Loe=["acyclicer","ranker","rankdir","align"],Boe=["width","height"],Voe={width:0,height:0},zoe=["minlen","weight","width","height","labeloffset"],Hoe={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},qoe=["labelpos"];function Goe(t){var i=new Poe({multigraph:!0,compound:!0}),e=y0(t.graph());return i.setGraph(we.merge({},Aoe,b0(e,Noe),we.pick(e,Loe))),we.forEach(t.nodes(),function(n){var o=y0(t.node(n));i.setNode(n,we.defaults(b0(o,Boe),Voe)),i.setParent(n,t.parent(n))}),we.forEach(t.edges(),function(n){var o=y0(t.edge(n));i.setEdge(n,we.merge({},Hoe,b0(o,zoe),we.pick(o,qoe)))}),i}function joe(t){var i=t.graph();i.ranksep/=2,we.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 Uoe(t){we.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};yi.addDummyNode(t,"edge-proxy",r,"_ep")}})}function $oe(t){var i=0;we.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=we.max(i,n.maxRank))}),t.graph().maxRank=i}function Woe(t){we.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 Koe(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(d){var f=d.x,g=d.y,y=d.width,T=d.height;i=Math.min(i,f-y/2),e=Math.max(e,f+y/2),n=Math.min(n,g-T/2),o=Math.max(o,g+T/2)}we.forEach(t.nodes(),function(d){c(t.node(d))}),we.forEach(t.edges(),function(d){var f=t.edge(d);we.has(f,"x")&&c(f)}),i-=a,n-=s,we.forEach(t.nodes(),function(d){var f=t.node(d);f.x-=i,f.y-=n}),we.forEach(t.edges(),function(d){var f=t.edge(d);we.forEach(f.points,function(g){g.x-=i,g.y-=n}),we.has(f,"x")&&(f.x-=i),we.has(f,"y")&&(f.y-=n)}),r.width=e-i+a,r.height=o-n+s}function Yoe(t){we.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(yi.intersectRect(n,r)),e.points.push(yi.intersectRect(o,a))})}function Xoe(t){we.forEach(t.edges(),function(i){var e=t.edge(i);if(we.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 Zoe(t){we.forEach(t.edges(),function(i){var e=t.edge(i);e.reversed&&e.points.reverse()})}function Qoe(t){we.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(we.last(e.borderLeft)),a=t.node(we.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}}),we.forEach(t.nodes(),function(i){t.node(i).dummy==="border"&&t.removeNode(i)})}function Joe(t){we.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 ere(t){var i=yi.buildLayerMatrix(t);we.forEach(i,function(e){var n=0;we.forEach(e,function(o,r){var a=t.node(o);a.order=r+n,we.forEach(a.selfEdges,function(s){yi.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 tre(t){we.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 b0(t,i){return we.mapValues(we.pick(t,i),Number)}function y0(t){var i={};return we.forEach(t,function(e,n){i[n.toLowerCase()]=e}),i}});var BE=b((Qbe,LE)=>{"use strict";var fh=et(),nre=It(),ire=un().Graph;LE.exports={debugOrdering:ore};function ore(t){var i=nre.buildLayerMatrix(t),e=new ire({compound:!0,multigraph:!0}).setGraph({});return fh.forEach(t.nodes(),function(n){e.setNode(n,{label:n}),e.setParent(n,"layer"+t.node(n).rank)}),fh.forEach(t.edges(),function(n){e.setEdge(n.v,n.w,{},n.name)}),fh.forEach(i,function(n,o){var r="layer"+o;e.setNode(r,{rank:"same"}),fh.reduce(n,function(a,s){return e.setEdge(a,s,{style:"invis"}),s})}),e}});var zE=b((Jbe,VE)=>{"use strict";VE.exports="0.8.5"});var qE=b((eye,HE)=>{"use strict";HE.exports={graphlib:un(),layout:AE(),debug:BE(),util:{time:It().time,notime:It().notime},version:zE()}});var sb={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 ms=new _e("MAP_ISOLATE_INTENT",{providedIn:"root",factory:()=>({isolate:()=>{}})});var lb=`
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 E3=["data-p-icon","angle-double-left"],cb=(()=>{class t extends Pe{static \u0275fac=(()=>{let e;return function(o){return(e||(e=$(t)))(o||t)}})();static \u0275cmp=z({type:t,selectors:[["","data-p-icon","angle-double-left"]],features:[J],attrs:E3,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&&(Z(),oe(0,"path",0))},encapsulation:2})}return t})();var P3=["data-p-icon","angle-double-right"],db=(()=>{class t extends Pe{static \u0275fac=(()=>{let e;return function(o){return(e||(e=$(t)))(o||t)}})();static \u0275cmp=z({type:t,selectors:[["","data-p-icon","angle-double-right"]],features:[J],attrs:P3,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&&(Z(),oe(0,"path",0))},encapsulation:2})}return t})();var R3=["data-p-icon","angle-left"],ub=(()=>{class t extends Pe{static \u0275fac=(()=>{let e;return function(o){return(e||(e=$(t)))(o||t)}})();static \u0275cmp=z({type:t,selectors:[["","data-p-icon","angle-left"]],features:[J],attrs:R3,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&&(Z(),oe(0,"path",0))},encapsulation:2})}return t})();var O3=["data-p-icon","angle-right"],pb=(()=>{class t extends Pe{static \u0275fac=(()=>{let e;return function(o){return(e||(e=$(t)))(o||t)}})();static \u0275cmp=z({type:t,selectors:[["","data-p-icon","angle-right"]],features:[J],attrs:O3,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&&(Z(),oe(0,"path",0))},encapsulation:2})}return t})();var F3=["data-p-icon","arrow-down"],Uh=(()=>{class t extends Pe{pathId;onInit(){this.pathId="url(#"+ut()+")"}static \u0275fac=(()=>{let e;return function(o){return(e||(e=$(t)))(o||t)}})();static \u0275cmp=z({type:t,selectors:[["","data-p-icon","arrow-down"]],features:[J],attrs:F3,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&&(Z(),Q(0,"g"),oe(1,"path",0),ie(),Q(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 N3=["data-p-icon","arrow-up"],$h=(()=>{class t extends Pe{pathId;onInit(){this.pathId="url(#"+ut()+")"}static \u0275fac=(()=>{let e;return function(o){return(e||(e=$(t)))(o||t)}})();static \u0275cmp=z({type:t,selectors:[["","data-p-icon","arrow-up"]],features:[J],attrs:N3,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&&(Z(),Q(0,"g"),oe(1,"path",0),ie(),Q(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 A3=["data-p-icon","calendar"],fb=(()=>{class t extends Pe{static \u0275fac=(()=>{let e;return function(o){return(e||(e=$(t)))(o||t)}})();static \u0275cmp=z({type:t,selectors:[["","data-p-icon","calendar"]],features:[J],attrs:A3,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&&(Z(),oe(0,"path",0))},encapsulation:2})}return t})();var L3=["data-p-icon","chevron-left"],hb=(()=>{class t extends Pe{static \u0275fac=(()=>{let e;return function(o){return(e||(e=$(t)))(o||t)}})();static \u0275cmp=z({type:t,selectors:[["","data-p-icon","chevron-left"]],features:[J],attrs:L3,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&&(Z(),oe(0,"path",0))},encapsulation:2})}return t})();var B3=["data-p-icon","chevron-right"],mb=(()=>{class t extends Pe{static \u0275fac=(()=>{let e;return function(o){return(e||(e=$(t)))(o||t)}})();static \u0275cmp=z({type:t,selectors:[["","data-p-icon","chevron-right"]],features:[J],attrs:B3,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&&(Z(),oe(0,"path",0))},encapsulation:2})}return t})();var V3=["data-p-icon","chevron-up"],_b=(()=>{class t extends Pe{static \u0275fac=(()=>{let e;return function(o){return(e||(e=$(t)))(o||t)}})();static \u0275cmp=z({type:t,selectors:[["","data-p-icon","chevron-up"]],features:[J],attrs:V3,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&&(Z(),oe(0,"path",0))},encapsulation:2})}return t})();var z3=["data-p-icon","filter"],gb=(()=>{class t extends Pe{pathId;onInit(){this.pathId="url(#"+ut()+")"}static \u0275fac=(()=>{let e;return function(o){return(e||(e=$(t)))(o||t)}})();static \u0275cmp=z({type:t,selectors:[["","data-p-icon","filter"]],features:[J],attrs:z3,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&&(Z(),Q(0,"g"),oe(1,"path",0),ie(),Q(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"],vb=(()=>{class t extends Pe{pathId;onInit(){this.pathId="url(#"+ut()+")"}static \u0275fac=(()=>{let e;return function(o){return(e||(e=$(t)))(o||t)}})();static \u0275cmp=z({type:t,selectors:[["","data-p-icon","filter-slash"]],features:[J],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&&(Z(),Q(0,"g"),oe(1,"path",0),ie(),Q(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 q3=["data-p-icon","plus"],bb=(()=>{class t extends Pe{pathId;onInit(){this.pathId="url(#"+ut()+")"}static \u0275fac=(()=>{let e;return function(o){return(e||(e=$(t)))(o||t)}})();static \u0275cmp=z({type:t,selectors:[["","data-p-icon","plus"]],features:[J],attrs:q3,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&&(Z(),Q(0,"g"),oe(1,"path",0),ie(),Q(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-alt"],yb=(()=>{class t extends Pe{pathId;onInit(){this.pathId="url(#"+ut()+")"}static \u0275fac=(()=>{let e;return function(o){return(e||(e=$(t)))(o||t)}})();static \u0275cmp=z({type:t,selectors:[["","data-p-icon","sort-alt"]],features:[J],attrs:G3,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&&(Z(),Q(0,"g"),oe(1,"path",0)(2,"path",1)(3,"path",2)(4,"path",3),ie(),Q(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 j3=["data-p-icon","sort-amount-down"],Cb=(()=>{class t extends Pe{pathId;onInit(){this.pathId="url(#"+ut()+")"}static \u0275fac=(()=>{let e;return function(o){return(e||(e=$(t)))(o||t)}})();static \u0275cmp=z({type:t,selectors:[["","data-p-icon","sort-amount-down"]],features:[J],attrs:j3,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&&(Z(),Q(0,"g"),oe(1,"path",0),ie(),Q(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 U3=["data-p-icon","sort-amount-up-alt"],xb=(()=>{class t extends Pe{pathId;onInit(){this.pathId="url(#"+ut()+")"}static \u0275fac=(()=>{let e;return function(o){return(e||(e=$(t)))(o||t)}})();static \u0275cmp=z({type:t,selectors:[["","data-p-icon","sort-amount-up-alt"]],features:[J],attrs:U3,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&&(Z(),Q(0,"g"),oe(1,"path",0),ie(),Q(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 $3=["data-p-icon","trash"],wb=(()=>{class t extends Pe{pathId;onInit(){this.pathId="url(#"+ut()+")"}static \u0275fac=(()=>{let e;return function(o){return(e||(e=$(t)))(o||t)}})();static \u0275cmp=z({type:t,selectors:[["","data-p-icon","trash"]],features:[J],attrs:$3,decls:5,vars:2,consts:[["fill-rule","evenodd","clip-rule","evenodd","d","M3.44802 13.9955H10.552C10.8056 14.0129 11.06 13.9797 11.3006 13.898C11.5412 13.8163 11.7632 13.6877 11.9537 13.5196C12.1442 13.3515 12.2995 13.1473 12.4104 12.9188C12.5213 12.6903 12.5858 12.442 12.6 12.1884V4.36041H13.4C13.5591 4.36041 13.7117 4.29722 13.8243 4.18476C13.9368 4.07229 14 3.91976 14 3.76071C14 3.60166 13.9368 3.44912 13.8243 3.33666C13.7117 3.22419 13.5591 3.16101 13.4 3.16101H12.0537C12.0203 3.1557 11.9863 3.15299 11.952 3.15299C11.9178 3.15299 11.8838 3.1557 11.8503 3.16101H11.2285C11.2421 3.10893 11.2487 3.05513 11.248 3.00106V1.80966C11.2171 1.30262 10.9871 0.828306 10.608 0.48989C10.229 0.151475 9.73159 -0.0236625 9.22402 0.00257442H4.77602C4.27251 -0.0171866 3.78126 0.160868 3.40746 0.498617C3.03365 0.836366 2.807 1.30697 2.77602 1.80966V3.00106C2.77602 3.0556 2.78346 3.10936 2.79776 3.16101H0.6C0.521207 3.16101 0.443185 3.17652 0.37039 3.20666C0.297595 3.2368 0.231451 3.28097 0.175736 3.33666C0.120021 3.39235 0.0758251 3.45846 0.0456722 3.53121C0.0155194 3.60397 0 3.68196 0 3.76071C0 3.83946 0.0155194 3.91744 0.0456722 3.9902C0.0758251 4.06296 0.120021 4.12907 0.175736 4.18476C0.231451 4.24045 0.297595 4.28462 0.37039 4.31476C0.443185 4.3449 0.521207 4.36041 0.6 4.36041H1.40002V12.1884C1.41426 12.442 1.47871 12.6903 1.58965 12.9188C1.7006 13.1473 1.85582 13.3515 2.04633 13.5196C2.23683 13.6877 2.45882 13.8163 2.69944 13.898C2.94005 13.9797 3.1945 14.0129 3.44802 13.9955ZM2.60002 4.36041H11.304V12.1884C11.304 12.5163 10.952 12.7961 10.504 12.7961H3.40002C2.97602 12.7961 2.60002 12.5163 2.60002 12.1884V4.36041ZM3.95429 3.16101C3.96859 3.10936 3.97602 3.0556 3.97602 3.00106V1.80966C3.97602 1.48183 4.33602 1.20197 4.77602 1.20197H9.24802C9.66403 1.20197 10.048 1.48183 10.048 1.80966V3.00106C10.0473 3.05515 10.054 3.10896 10.0678 3.16101H3.95429ZM5.57571 10.997C5.41731 10.995 5.26597 10.9311 5.15395 10.8191C5.04193 10.7071 4.97808 10.5558 4.97601 10.3973V6.77517C4.97601 6.61612 5.0392 6.46359 5.15166 6.35112C5.26413 6.23866 5.41666 6.17548 5.57571 6.17548C5.73476 6.17548 5.8873 6.23866 5.99976 6.35112C6.11223 6.46359 6.17541 6.61612 6.17541 6.77517V10.3894C6.17647 10.4688 6.16174 10.5476 6.13208 10.6213C6.10241 10.695 6.05841 10.762 6.00261 10.8186C5.94682 10.8751 5.88035 10.92 5.80707 10.9506C5.73378 10.9813 5.65514 10.9971 5.57571 10.997ZM7.99968 10.8214C8.11215 10.9339 8.26468 10.997 8.42373 10.997C8.58351 10.9949 8.73604 10.93 8.84828 10.8163C8.96052 10.7025 9.02345 10.5491 9.02343 10.3894V6.77517C9.02343 6.61612 8.96025 6.46359 8.84778 6.35112C8.73532 6.23866 8.58278 6.17548 8.42373 6.17548C8.26468 6.17548 8.11215 6.23866 7.99968 6.35112C7.88722 6.46359 7.82404 6.61612 7.82404 6.77517V10.3973C7.82404 10.5564 7.88722 10.7089 7.99968 10.8214Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(n,o){n&1&&(Z(),Q(0,"g"),oe(1,"path",0),ie(),Q(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 Tb=`
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 K3=["date"],Y3=["header"],X3=["footer"],Z3=["disabledDate"],Q3=["decade"],J3=["previousicon"],eR=["nexticon"],tR=["triggericon"],nR=["clearicon"],iR=["decrementicon"],oR=["incrementicon"],rR=["inputicon"],aR=["buttonbar"],sR=["inputfield"],lR=["contentWrapper"],cR=[[["p-header"]],[["p-footer"]]],dR=["p-header","p-footer"],uR=t=>({clickCallBack:t}),Sb=t=>({visibility:t}),Yh=t=>({$implicit:t}),pR=t=>({date:t}),fR=(t,i)=>({month:t,index:i}),hR=t=>({year:t}),mR=(t,i)=>({todayCallback:t,clearCallback:i});function _R(t,i){if(t&1){let e=K();Z(),h(0,"svg",13),A("click",function(){k(e);let o=u(3);return I(o.clear())}),m()}if(t&2){let e=u(3);j(e.cx("clearIcon")),_("pBind",e.ptm("inputIcon"))}}function gR(t,i){}function vR(t,i){t&1&&R(0,gR,0,0,"ng-template")}function bR(t,i){if(t&1){let e=K();h(0,"span",14),A("click",function(){k(e);let o=u(3);return I(o.clear())}),R(1,vR,1,0,null,6),m()}if(t&2){let e=u(3);j(e.cx("clearIcon")),_("pBind",e.ptm("inputIcon")),l(),_("ngTemplateOutlet",e.clearIconTemplate||e._clearIconTemplate)}}function yR(t,i){if(t&1&&(Se(0),R(1,_R,1,3,"svg",11)(2,bR,2,4,"span",12),ke()),t&2){let e=u(2);l(),_("ngIf",!e.clearIconTemplate&&!e._clearIconTemplate),l(),_("ngIf",e.clearIconTemplate||e._clearIconTemplate)}}function CR(t,i){if(t&1&&F(0,"span",17),t&2){let e=u(3);_("ngClass",e.icon)("pBind",e.ptm("dropdownIcon"))}}function xR(t,i){if(t&1&&(Z(),F(0,"svg",19)),t&2){let e=u(4);_("pBind",e.ptm("dropdownIcon"))}}function wR(t,i){}function TR(t,i){t&1&&R(0,wR,0,0,"ng-template")}function SR(t,i){if(t&1&&(Se(0),R(1,xR,1,1,"svg",18)(2,TR,1,0,null,6),ke()),t&2){let e=u(3);l(),_("ngIf",!e.triggerIconTemplate&&!e._triggerIconTemplate),l(),_("ngTemplateOutlet",e.triggerIconTemplate||e._triggerIconTemplate)}}function kR(t,i){if(t&1){let e=K();h(0,"button",15),A("click",function(o){k(e),u();let r=gt(1),a=u();return I(a.onButtonClick(o,r))}),R(1,CR,1,2,"span",16)(2,SR,3,2,"ng-container",7),m()}if(t&2){let e=u(2);j(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 IR(t,i){if(t&1){let e=K();Z(),h(0,"svg",23),A("click",function(o){k(e);let r=u(3);return I(r.onButtonClick(o))}),m()}if(t&2){let e=u(3);j(e.cx("inputIcon")),_("pBind",e.ptm("inputIcon"))}}function MR(t,i){t&1&&pe(0)}function DR(t,i){if(t&1&&(Se(0),h(1,"span",20),R(2,IR,1,3,"svg",21)(3,MR,1,0,"ng-container",22),m(),ke()),t&2){let e=u(2);l(),j(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",Re(7,uR,e.onButtonClick.bind(e)))}}function ER(t,i){if(t&1){let e=K();h(0,"input",9,1),A("focus",function(o){k(e);let r=u();return I(r.onInputFocus(o))})("keydown",function(o){k(e);let r=u();return I(r.onInputKeydown(o))})("click",function(){k(e);let o=u();return I(o.onInputClick())})("blur",function(o){k(e);let r=u();return I(r.onInputBlur(o))})("input",function(o){k(e);let r=u();return I(r.onUserInput(o))}),m(),R(2,yR,3,2,"ng-container",7)(3,kR,3,9,"button",10)(4,DR,4,9,"ng-container",7)}if(t&2){let e=u();j(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 PR(t,i){t&1&&pe(0)}function RR(t,i){t&1&&(Z(),F(0,"svg",30))}function OR(t,i){}function FR(t,i){t&1&&R(0,OR,0,0,"ng-template")}function NR(t,i){if(t&1&&(h(0,"span"),R(1,FR,1,0,null,6),m()),t&2){let e=u(4);l(),_("ngTemplateOutlet",e.previousIconTemplate||e._previousIconTemplate)}}function AR(t,i){if(t&1&&R(0,RR,1,0,"svg",29)(1,NR,2,1,"span",7),t&2){let e=u(3);_("ngIf",!e.previousIconTemplate&&!e._previousIconTemplate),l(),_("ngIf",e.previousIconTemplate||e._previousIconTemplate)}}function LR(t,i){if(t&1){let e=K();h(0,"button",31),A("click",function(o){k(e);let r=u(3);return I(r.switchToMonthView(o))})("keydown",function(o){k(e);let r=u(3);return I(r.onContainerButtonKeydown(o))}),v(1),m()}if(t&2){let e=u().$implicit,n=u(2);j(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 BR(t,i){if(t&1){let e=K();h(0,"button",31),A("click",function(o){k(e);let r=u(3);return I(r.switchToYearView(o))})("keydown",function(o){k(e);let r=u(3);return I(r.onContainerButtonKeydown(o))}),v(1),m()}if(t&2){let e=u().$implicit,n=u(2);j(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 VR(t,i){if(t&1&&(Se(0),v(1),ke()),t&2){let e=u(4);l(),X0("",e.yearPickerValues()[0]," - ",e.yearPickerValues()[e.yearPickerValues().length-1])}}function zR(t,i){t&1&&pe(0)}function HR(t,i){if(t&1&&(h(0,"span",20),R(1,VR,2,2,"ng-container",7)(2,zR,1,0,"ng-container",22),m()),t&2){let e=u(3);j(e.cx("decade")),_("pBind",e.ptm("decade")),l(),_("ngIf",!e.decadeTemplate&&!e._decadeTemplate),l(),_("ngTemplateOutlet",e.decadeTemplate||e._decadeTemplate)("ngTemplateOutletContext",Re(6,Yh,e.yearPickerValues))}}function qR(t,i){t&1&&(Z(),F(0,"svg",33))}function GR(t,i){}function jR(t,i){t&1&&R(0,GR,0,0,"ng-template")}function UR(t,i){if(t&1&&(Se(0),R(1,jR,1,0,null,6),ke()),t&2){let e=u(4);l(),_("ngTemplateOutlet",e.nextIconTemplate||e._nextIconTemplate)}}function $R(t,i){if(t&1&&R(0,qR,1,0,"svg",32)(1,UR,2,1,"ng-container",7),t&2){let e=u(3);_("ngIf",!e.nextIconTemplate&&!e._nextIconTemplate),l(),_("ngIf",e.nextIconTemplate||e._nextIconTemplate)}}function WR(t,i){if(t&1&&(h(0,"th",20)(1,"span",20),v(2),m()()),t&2){let e=u(4);j(e.cx("weekHeader")),_("pBind",e.ptm("weekHeader")),l(),_("pBind",e.ptm("weekHeaderLabel")),l(),x(e.getTranslation("weekHeader"))}}function KR(t,i){if(t&1&&(h(0,"th",37)(1,"span",20),v(2),m()()),t&2){let e=i.$implicit,n=u(4);j(n.cx("weekDayCell")),_("pBind",n.ptm("weekDayCell")),l(),j(n.cx("weekDay")),_("pBind",n.ptm("weekDay")),l(),x(e)}}function YR(t,i){if(t&1&&(h(0,"td",20)(1,"span",20),v(2),m()()),t&2){let e=u().index,n=u(2).$implicit,o=u(2);j(o.cx("weekNumber")),_("pBind",o.ptm("weekNumber")),l(),j(o.cx("weekLabelContainer")),_("pBind",o.ptm("weekLabelContainer")),l(),be(" ",n.weekNumbers[e]," ")}}function XR(t,i){if(t&1&&(Se(0),v(1),ke()),t&2){let e=u(2).$implicit;l(),x(e.day)}}function ZR(t,i){t&1&&pe(0)}function QR(t,i){if(t&1&&(Se(0),R(1,ZR,1,0,"ng-container",22),ke()),t&2){let e=u(2).$implicit,n=u(5);l(),_("ngTemplateOutlet",n.dateTemplate||n._dateTemplate)("ngTemplateOutletContext",Re(2,Yh,e))}}function JR(t,i){t&1&&pe(0)}function eO(t,i){if(t&1&&(Se(0),R(1,JR,1,0,"ng-container",22),ke()),t&2){let e=u(2).$implicit,n=u(5);l(),_("ngTemplateOutlet",n.disabledDateTemplate||n._disabledDateTemplate)("ngTemplateOutletContext",Re(2,Yh,e))}}function tO(t,i){if(t&1&&(h(0,"div",40),v(1),m()),t&2){let e=u(2).$implicit;l(),be(" ",e.day," ")}}function nO(t,i){if(t&1){let e=K();Se(0),h(1,"span",38),A("click",function(o){k(e);let r=u().$implicit,a=u(5);return I(a.onDateSelect(o,r))})("keydown",function(o){k(e);let r=u().$implicit,a=u(3).index,s=u(2);return I(s.onDateCellKeydown(o,r,a))}),R(2,XR,2,1,"ng-container",7)(3,QR,2,4,"ng-container",7)(4,eO,2,4,"ng-container",7),m(),R(5,tO,2,1,"div",39),ke()}if(t&2){let e=u().$implicit,n=u(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 iO(t,i){if(t&1&&(h(0,"td",20),R(1,nO,6,7,"ng-container",7),m()),t&2){let e=i.$implicit,n=u(5);j(n.cx("dayCell",Re(5,pR,e))),_("pBind",n.ptm("dayCell")),O("aria-label",e.day),l(),_("ngIf",e.otherMonth?n.showOtherMonths:!0)}}function oO(t,i){if(t&1&&(h(0,"tr",20),R(1,YR,3,7,"td",8)(2,iO,2,7,"td",24),m()),t&2){let e=i.$implicit,n=u(4);_("pBind",n.ptm("tableBodyRow")),l(),_("ngIf",n.showWeek),l(),_("ngForOf",e)}}function rO(t,i){if(t&1&&(h(0,"table",34)(1,"thead",20)(2,"tr",20),R(3,WR,3,5,"th",8)(4,KR,3,7,"th",35),m()(),h(5,"tbody",20),R(6,oO,3,3,"tr",36),m()()),t&2){let e=u().$implicit,n=u(2);j(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 aO(t,i){if(t&1){let e=K();h(0,"div",20)(1,"div",20)(2,"p-button",25),A("keydown",function(o){k(e);let r=u(2);return I(r.onContainerButtonKeydown(o))})("onClick",function(o){k(e);let r=u(2);return I(r.onPrevButtonClick(o))}),R(3,AR,2,2,"ng-template",null,2,We),m(),h(5,"div",20),R(6,LR,2,7,"button",26)(7,BR,2,7,"button",26)(8,HR,3,8,"span",8),m(),h(9,"p-button",27),A("keydown",function(o){k(e);let r=u(2);return I(r.onContainerButtonKeydown(o))})("onClick",function(o){k(e);let r=u(2);return I(r.onNextButtonClick(o))}),R(10,$R,2,2,"ng-template",null,2,We),m()(),R(12,rO,7,9,"table",28),m()}if(t&2){let e=i.index,n=u(2);j(n.cx("calendar")),_("pBind",n.ptm("calendar")),l(),j(n.cx("header")),_("pBind",n.ptm("header")),l(),_("styleClass",n.cx("pcPrevButton"))("ngStyle",Re(23,Sb,e===0?"visible":"hidden"))("ariaLabel",n.prevIconAriaLabel)("pt",n.ptm("pcPrevButton")),O("data-pc-group-section","navigator"),l(3),j(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",Re(25,Sb,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 sO(t,i){if(t&1&&(h(0,"div",40),v(1),m()),t&2){let e=u().$implicit;l(),be(" ",e," ")}}function lO(t,i){if(t&1){let e=K();h(0,"span",42),A("click",function(o){let r=k(e).index,a=u(3);return I(a.onMonthSelect(o,r))})("keydown",function(o){let r=k(e).index,a=u(3);return I(a.onMonthCellKeydown(o,r))}),v(1),R(2,sO,2,1,"div",39),m()}if(t&2){let e=i.$implicit,n=i.index,o=u(3);j(o.cx("month",Un(5,fR,e,n))),_("pBind",o.ptm("month")),l(),be(" ",e," "),l(),_("ngIf",o.isMonthSelected(n))}}function cO(t,i){if(t&1&&(h(0,"div",20),R(1,lO,3,8,"span",41),m()),t&2){let e=u(2);j(e.cx("monthView")),_("pBind",e.ptm("monthView")),l(),_("ngForOf",e.monthPickerValues())}}function dO(t,i){if(t&1&&(h(0,"div",40),v(1),m()),t&2){let e=u().$implicit;l(),be(" ",e," ")}}function uO(t,i){if(t&1){let e=K();h(0,"span",42),A("click",function(o){let r=k(e).$implicit,a=u(3);return I(a.onYearSelect(o,r))})("keydown",function(o){let r=k(e).$implicit,a=u(3);return I(a.onYearCellKeydown(o,r))}),v(1),R(2,dO,2,1,"div",39),m()}if(t&2){let e=i.$implicit,n=u(3);j(n.cx("year",Re(5,hR,e))),_("pBind",n.ptm("year")),l(),be(" ",e," "),l(),_("ngIf",n.isYearSelected(e))}}function pO(t,i){if(t&1&&(h(0,"div",20),R(1,uO,3,7,"span",41),m()),t&2){let e=u(2);j(e.cx("yearView")),_("pBind",e.ptm("yearView")),l(),_("ngForOf",e.yearPickerValues())}}function fO(t,i){if(t&1&&(Se(0),h(1,"div",20),R(2,aO,13,27,"div",24),m(),R(3,cO,2,4,"div",8)(4,pO,2,4,"div",8),ke()),t&2){let e=u();l(),j(e.cx("calendarContainer")),_("pBind",e.ptm("calendarContainer")),l(),_("ngForOf",e.months),l(),_("ngIf",e.currentView==="month"),l(),_("ngIf",e.currentView==="year")}}function hO(t,i){if(t&1&&(Z(),F(0,"svg",46)),t&2){let e=u(3);_("pBind",e.ptm("pcIncrementButton").icon)}}function mO(t,i){}function _O(t,i){t&1&&R(0,mO,0,0,"ng-template")}function gO(t,i){if(t&1&&R(0,hO,1,1,"svg",45)(1,_O,1,0,null,6),t&2){let e=u(2);_("ngIf",!e.incrementIconTemplate&&!e._incrementIconTemplate),l(),_("ngTemplateOutlet",e.incrementIconTemplate||e._incrementIconTemplate)}}function vO(t,i){t&1&&(Se(0),v(1,"0"),ke())}function bO(t,i){if(t&1&&(Z(),F(0,"svg",48)),t&2){let e=u(3);_("pBind",e.ptm("pcDecrementButton").icon)}}function yO(t,i){}function CO(t,i){t&1&&R(0,yO,0,0,"ng-template")}function xO(t,i){if(t&1&&R(0,bO,1,1,"svg",47)(1,CO,1,0,null,6),t&2){let e=u(2);_("ngIf",!e.decrementIconTemplate&&!e._decrementIconTemplate),l(),_("ngTemplateOutlet",e.decrementIconTemplate||e._decrementIconTemplate)}}function wO(t,i){if(t&1&&(Z(),F(0,"svg",46)),t&2){let e=u(3);_("pBind",e.ptm("pcIncrementButton").icon)}}function TO(t,i){}function SO(t,i){t&1&&R(0,TO,0,0,"ng-template")}function kO(t,i){if(t&1&&R(0,wO,1,1,"svg",45)(1,SO,1,0,null,6),t&2){let e=u(2);_("ngIf",!e.incrementIconTemplate&&!e._incrementIconTemplate),l(),_("ngTemplateOutlet",e.incrementIconTemplate||e._incrementIconTemplate)}}function IO(t,i){t&1&&(Se(0),v(1,"0"),ke())}function MO(t,i){if(t&1&&(Z(),F(0,"svg",48)),t&2){let e=u(3);_("pBind",e.ptm("pcDecrementButton").icon)}}function DO(t,i){}function EO(t,i){t&1&&R(0,DO,0,0,"ng-template")}function PO(t,i){if(t&1&&R(0,MO,1,1,"svg",47)(1,EO,1,0,null,6),t&2){let e=u(2);_("ngIf",!e.decrementIconTemplate&&!e._decrementIconTemplate),l(),_("ngTemplateOutlet",e.decrementIconTemplate||e._decrementIconTemplate)}}function RO(t,i){if(t&1&&(h(0,"div",20)(1,"span",20),v(2),m()()),t&2){let e=u(2);j(e.cx("separator")),_("pBind",e.ptm("separatorContainer")),l(),_("pBind",e.ptm("separator")),l(),x(e.timeSeparator)}}function OO(t,i){if(t&1&&(Z(),F(0,"svg",46)),t&2){let e=u(4);_("pBind",e.ptm("pcIncrementButton").icon)}}function FO(t,i){}function NO(t,i){t&1&&R(0,FO,0,0,"ng-template")}function AO(t,i){if(t&1&&R(0,OO,1,1,"svg",45)(1,NO,1,0,null,6),t&2){let e=u(3);_("ngIf",!e.incrementIconTemplate&&!e._incrementIconTemplate),l(),_("ngTemplateOutlet",e.incrementIconTemplate||e._incrementIconTemplate)}}function LO(t,i){t&1&&(Se(0),v(1,"0"),ke())}function BO(t,i){if(t&1&&(Z(),F(0,"svg",48)),t&2){let e=u(4);_("pBind",e.ptm("pcDecrementButton").icon)}}function VO(t,i){}function zO(t,i){t&1&&R(0,VO,0,0,"ng-template")}function HO(t,i){if(t&1&&R(0,BO,1,1,"svg",47)(1,zO,1,0,null,6),t&2){let e=u(3);_("ngIf",!e.decrementIconTemplate&&!e._decrementIconTemplate),l(),_("ngTemplateOutlet",e.decrementIconTemplate||e._decrementIconTemplate)}}function qO(t,i){if(t&1){let e=K();h(0,"div",20)(1,"p-button",43),A("keydown",function(o){k(e);let r=u(2);return I(r.onContainerButtonKeydown(o))})("keydown.enter",function(o){k(e);let r=u(2);return I(r.incrementSecond(o))})("keydown.space",function(o){k(e);let r=u(2);return I(r.incrementSecond(o))})("mousedown",function(o){k(e);let r=u(2);return I(r.onTimePickerElementMouseDown(o,2,1))})("mouseup",function(o){k(e);let r=u(2);return I(r.onTimePickerElementMouseUp(o))})("keyup.enter",function(o){k(e);let r=u(2);return I(r.onTimePickerElementMouseUp(o))})("keyup.space",function(o){k(e);let r=u(2);return I(r.onTimePickerElementMouseUp(o))})("mouseleave",function(){k(e);let o=u(2);return I(o.onTimePickerElementMouseLeave())}),R(2,AO,2,2,"ng-template",null,2,We),m(),h(4,"span",20),R(5,LO,2,0,"ng-container",7),v(6),m(),h(7,"p-button",43),A("keydown",function(o){k(e);let r=u(2);return I(r.onContainerButtonKeydown(o))})("keydown.enter",function(o){k(e);let r=u(2);return I(r.decrementSecond(o))})("keydown.space",function(o){k(e);let r=u(2);return I(r.decrementSecond(o))})("mousedown",function(o){k(e);let r=u(2);return I(r.onTimePickerElementMouseDown(o,2,-1))})("mouseup",function(o){k(e);let r=u(2);return I(r.onTimePickerElementMouseUp(o))})("keyup.enter",function(o){k(e);let r=u(2);return I(r.onTimePickerElementMouseUp(o))})("keyup.space",function(o){k(e);let r=u(2);return I(r.onTimePickerElementMouseUp(o))})("mouseleave",function(){k(e);let o=u(2);return I(o.onTimePickerElementMouseLeave())}),R(8,HO,2,2,"ng-template",null,2,We),m()()}if(t&2){let e=u(2);j(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(),x(e.currentSecond),l(),_("styleClass",e.cx("pcDecrementButton"))("pt",e.ptm("pcDecrementButton")),O("aria-label",e.getTranslation("prevSecond"))("data-pc-group-section","timepickerbutton")}}function GO(t,i){if(t&1&&(h(0,"div",20)(1,"span",20),v(2),m()()),t&2){let e=u(2);j(e.cx("separator")),_("pBind",e.ptm("separatorContainer")),l(),_("pBind",e.ptm("separator")),l(),x(e.timeSeparator)}}function jO(t,i){if(t&1&&(Z(),F(0,"svg",46)),t&2){let e=u(4);_("pBind",e.ptm("pcIncrementButton").icon)}}function UO(t,i){}function $O(t,i){t&1&&R(0,UO,0,0,"ng-template")}function WO(t,i){if(t&1&&R(0,jO,1,1,"svg",45)(1,$O,1,0,null,6),t&2){let e=u(3);_("ngIf",!e.incrementIconTemplate&&!e._incrementIconTemplate),l(),_("ngTemplateOutlet",e.incrementIconTemplate||e._incrementIconTemplate)}}function KO(t,i){if(t&1&&(Z(),F(0,"svg",48)),t&2){let e=u(4);_("pBind",e.ptm("pcDecrementButton").icon)}}function YO(t,i){}function XO(t,i){t&1&&R(0,YO,0,0,"ng-template")}function ZO(t,i){if(t&1&&R(0,KO,1,1,"svg",47)(1,XO,1,0,null,6),t&2){let e=u(3);_("ngIf",!e.decrementIconTemplate&&!e._decrementIconTemplate),l(),_("ngTemplateOutlet",e.decrementIconTemplate||e._decrementIconTemplate)}}function QO(t,i){if(t&1){let e=K();h(0,"div",20)(1,"p-button",49),A("keydown",function(o){k(e);let r=u(2);return I(r.onContainerButtonKeydown(o))})("onClick",function(o){k(e);let r=u(2);return I(r.toggleAMPM(o))})("keydown.enter",function(o){k(e);let r=u(2);return I(r.toggleAMPM(o))}),R(2,WO,2,2,"ng-template",null,2,We),m(),h(4,"span",20),v(5),m(),h(6,"p-button",50),A("keydown",function(o){k(e);let r=u(2);return I(r.onContainerButtonKeydown(o))})("click",function(o){k(e);let r=u(2);return I(r.toggleAMPM(o))})("keydown.enter",function(o){k(e);let r=u(2);return I(r.toggleAMPM(o))}),R(7,ZO,2,2,"ng-template",null,2,We),m()()}if(t&2){let e=u(2);j(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(),x(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 JO(t,i){if(t&1){let e=K();h(0,"div",20)(1,"div",20)(2,"p-button",43),A("keydown",function(o){k(e);let r=u();return I(r.onContainerButtonKeydown(o))})("keydown.enter",function(o){k(e);let r=u();return I(r.incrementHour(o))})("keydown.space",function(o){k(e);let r=u();return I(r.incrementHour(o))})("mousedown",function(o){k(e);let r=u();return I(r.onTimePickerElementMouseDown(o,0,1))})("mouseup",function(o){k(e);let r=u();return I(r.onTimePickerElementMouseUp(o))})("keyup.enter",function(o){k(e);let r=u();return I(r.onTimePickerElementMouseUp(o))})("keyup.space",function(o){k(e);let r=u();return I(r.onTimePickerElementMouseUp(o))})("mouseleave",function(){k(e);let o=u();return I(o.onTimePickerElementMouseLeave())}),R(3,gO,2,2,"ng-template",null,2,We),m(),h(5,"span",20),R(6,vO,2,0,"ng-container",7),v(7),m(),h(8,"p-button",43),A("keydown",function(o){k(e);let r=u();return I(r.onContainerButtonKeydown(o))})("keydown.enter",function(o){k(e);let r=u();return I(r.decrementHour(o))})("keydown.space",function(o){k(e);let r=u();return I(r.decrementHour(o))})("mousedown",function(o){k(e);let r=u();return I(r.onTimePickerElementMouseDown(o,0,-1))})("mouseup",function(o){k(e);let r=u();return I(r.onTimePickerElementMouseUp(o))})("keyup.enter",function(o){k(e);let r=u();return I(r.onTimePickerElementMouseUp(o))})("keyup.space",function(o){k(e);let r=u();return I(r.onTimePickerElementMouseUp(o))})("mouseleave",function(){k(e);let o=u();return I(o.onTimePickerElementMouseLeave())}),R(9,xO,2,2,"ng-template",null,2,We),m()(),h(11,"div",44)(12,"span",20),v(13),m()(),h(14,"div",20)(15,"p-button",43),A("keydown",function(o){k(e);let r=u();return I(r.onContainerButtonKeydown(o))})("keydown.enter",function(o){k(e);let r=u();return I(r.incrementMinute(o))})("keydown.space",function(o){k(e);let r=u();return I(r.incrementMinute(o))})("mousedown",function(o){k(e);let r=u();return I(r.onTimePickerElementMouseDown(o,1,1))})("mouseup",function(o){k(e);let r=u();return I(r.onTimePickerElementMouseUp(o))})("keyup.enter",function(o){k(e);let r=u();return I(r.onTimePickerElementMouseUp(o))})("keyup.space",function(o){k(e);let r=u();return I(r.onTimePickerElementMouseUp(o))})("mouseleave",function(){k(e);let o=u();return I(o.onTimePickerElementMouseLeave())}),R(16,kO,2,2,"ng-template",null,2,We),m(),h(18,"span",20),R(19,IO,2,0,"ng-container",7),v(20),m(),h(21,"p-button",43),A("keydown",function(o){k(e);let r=u();return I(r.onContainerButtonKeydown(o))})("keydown.enter",function(o){k(e);let r=u();return I(r.decrementMinute(o))})("keydown.space",function(o){k(e);let r=u();return I(r.decrementMinute(o))})("mousedown",function(o){k(e);let r=u();return I(r.onTimePickerElementMouseDown(o,1,-1))})("mouseup",function(o){k(e);let r=u();return I(r.onTimePickerElementMouseUp(o))})("keyup.enter",function(o){k(e);let r=u();return I(r.onTimePickerElementMouseUp(o))})("keyup.space",function(o){k(e);let r=u();return I(r.onTimePickerElementMouseUp(o))})("mouseleave",function(){k(e);let o=u();return I(o.onTimePickerElementMouseLeave())}),R(22,PO,2,2,"ng-template",null,2,We),m()(),R(24,RO,3,5,"div",8)(25,qO,10,14,"div",8)(26,GO,3,5,"div",8)(27,QO,9,13,"div",8),m()}if(t&2){let e=u();j(e.cx("timePicker")),_("pBind",e.ptm("timePicker")),l(),j(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(),x(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(),x(e.timeSeparator),l(),j(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(),x(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 eF(t,i){t&1&&pe(0)}function tF(t,i){if(t&1&&R(0,eF,1,0,"ng-container",22),t&2){let e=u(2);_("ngTemplateOutlet",e.buttonBarTemplate||e._buttonBarTemplate)("ngTemplateOutletContext",Un(2,mR,e.onTodayButtonClick.bind(e),e.onClearButtonClick.bind(e)))}}function nF(t,i){if(t&1){let e=K();h(0,"p-button",51),A("keydown",function(o){k(e);let r=u(2);return I(r.onContainerButtonKeydown(o))})("onClick",function(o){k(e);let r=u(2);return I(r.onTodayButtonClick(o))}),m(),h(1,"p-button",51),A("keydown",function(o){k(e);let r=u(2);return I(r.onContainerButtonKeydown(o))})("onClick",function(o){k(e);let r=u(2);return I(r.onClearButtonClick(o))}),m()}if(t&2){let e=u(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 iF(t,i){if(t&1&&(h(0,"div",20),M(1,tF,1,5,"ng-container")(2,nF,2,10),m()),t&2){let e=u();j(e.cx("buttonbar")),_("pBind",e.ptm("buttonbar")),l(),D(e.buttonBarTemplate||e._buttonBarTemplate?1:2)}}function oF(t,i){t&1&&pe(0)}var rF=`
1069
+ ${Tb}
1070
+
1071
+ /* For PrimeNG */
1072
+ .p-datepicker.ng-invalid.ng-dirty .p-inputtext {
1073
+ border-color: dt('inputtext.invalid.border.color');
1074
+ }
1075
+ `,aF={root:()=>({position:"relative"})},sF={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"},kb=(()=>{class t extends tn{name="datepicker";style=rF;classes=sF;inlineStyles=aF;static \u0275fac=(()=>{let e;return function(o){return(e||(e=$(t)))(o||t)}})();static \u0275prov=C({token:t,factory:t.\u0275fac})}return t})();var lF={provide:os,useExisting:Ji(()=>Mb),multi:!0},Ib=new _e("DATEPICKER_INSTANCE"),Mb=(()=>{class t extends Mv{zone;overlayService;componentName="DatePicker";bindDirectiveInstance=p(Le,{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(kb);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=tv(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(en.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,d=new Date,f=[],g=Math.ceil((a+r)/7);for(let y=0;y<g;y++){let T=[];if(y==0){for(let N=s-r+1;N<=s;N++){let H=this.getPreviousMonthAndYear(e,n);T.push({day:N,month:H.month,year:H.year,otherMonth:!0,today:this.isToday(d,N,H.month,H.year),selectable:this.isSelectable(N,H.month,H.year,!0)})}let w=7-T.length;for(let N=0;N<w;N++)T.push({day:c,month:e,year:n,today:this.isToday(d,c,e,n),selectable:this.isSelectable(c,e,n,!1)}),c++}else for(let w=0;w<7;w++){if(c>a){let N=this.getNextMonthAndYear(e,n);T.push({day:c-a,month:N.month,year:N.year,otherMonth:!0,today:this.isToday(d,c-a,N.month,N.year),selectable:this.isSelectable(c-a,N.month,N.year,!0)})}else T.push({day:c,month:e,year:n,today:this.isToday(d,c,e,n),selectable:this.isSelectable(c,e,n,!1)});c++}this.showWeek&&f.push(this.getWeekNumber(new Date(T[0].year,T[0].month,T[0].day))),o.push(T)}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&&$n(e)?e.getDate()===n.day&&e.getMonth()===n.month&&e.getFullYear()===n.year:!1}isDateBetween(e,n,o){let r=!1;if($n(e)&&$n(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,d=!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&&(d=!this.isDayDisabled(e,n,o)),a&&s&&c&&d)}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&&(Ah(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 w=hr(a),N=a.parentElement.nextElementSibling;if(N){let H=N.children[w].children[0];_n(H,"p-disabled")?(this.navigationState={backward:!1},this.navForward(e)):(N.children[w].children[0].tabIndex="0",N.children[w].children[0].focus())}else this.navigationState={backward:!1},this.navForward(e);e.preventDefault();break}case 38:{r.tabIndex="-1";let w=hr(a),N=a.parentElement.previousElementSibling;if(N){let H=N.children[w].children[0];_n(H,"p-disabled")?(this.navigationState={backward:!0},this.navBackward(e)):(H.tabIndex="0",H.focus())}else this.navigationState={backward:!0},this.navBackward(e);e.preventDefault();break}case 37:{r.tabIndex="-1";let w=a.previousElementSibling;if(w){let N=w.children[0];_n(N,"p-disabled")||_n(N.parentElement,"p-datepicker-weeknumber")?this.navigateToMonth(!0,o):(N.tabIndex="0",N.focus())}else this.navigateToMonth(!0,o);e.preventDefault();break}case 39:{r.tabIndex="-1";let w=a.nextElementSibling;if(w){let N=w.children[0];_n(N,"p-disabled")?this.navigateToMonth(!1,o):(N.tabIndex="0",N.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 w=new Date(s.getFullYear(),s.getMonth()-1,s.getDate()),N=this.formatDateKey(w);this.navigateToMonth(!0,o,`span[data-date='${N}']:not(.p-disabled):not(.p-ink)`),e.preventDefault();break}case 34:{r.tabIndex="-1";let w=new Date(s.getFullYear(),s.getMonth()+1,s.getDate()),N=this.formatDateKey(w);this.navigateToMonth(!1,o,`span[data-date='${N}']:not(.p-disabled):not(.p-ink)`),e.preventDefault();break}case 36:r.tabIndex="-1";let c=new Date(s.getFullYear(),s.getMonth(),1),d=this.formatDateKey(c),f=dt(r.offsetParent,`span[data-date='${d}']: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),y=this.formatDateKey(g),T=dt(r.offsetParent,`span[data-date='${y}']:not(.p-disabled):not(.p-ink)`);g&&(T.tabIndex="0",T.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=hr(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=hr(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=xn(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=xn(this.contentViewChild.nativeElement,".p-datepicker-month-view .p-datepicker-month:not(.p-disabled)"):this.currentView==="year"?n=xn(this.contentViewChild.nativeElement,".p-datepicker-year-view .p-datepicker-year:not(.p-disabled)"):n=xn(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=xn(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&&xn(e,'.p-datepicker-month-view .p-datepicker-month.p-disabled[tabindex = "0"]').forEach(s=>s.tabIndex=-1)}else if(this.currentView==="year"){let o=xn(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&&xn(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=Ah(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,d=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 T=c&&$n(c)?c.toDateString():null,w=this.minDate&&T&&this.minDate.toDateString()===T,N=this.maxDate&&T&&this.maxDate.toDateString()===T;switch(w&&(s=this.minDate.getHours()>=12),!0){case(w&&s&&this.minDate.getHours()===12&&this.minDate.getHours()>d):a[0]=11;case(w&&this.minDate.getHours()===d&&this.minDate.getMinutes()>n):a[1]=this.minDate.getMinutes();case(w&&this.minDate.getHours()===d&&this.minDate.getMinutes()===n&&this.minDate.getSeconds()>o):a[2]=this.minDate.getSeconds();break;case(w&&!s&&this.minDate.getHours()-1===d&&this.minDate.getHours()>d):a[0]=11,this.pm=!0;case(w&&this.minDate.getHours()===d&&this.minDate.getMinutes()>n):a[1]=this.minDate.getMinutes();case(w&&this.minDate.getHours()===d&&this.minDate.getMinutes()===n&&this.minDate.getSeconds()>o):a[2]=this.minDate.getSeconds();break;case(w&&s&&this.minDate.getHours()>d&&d!==12):this.setCurrentHourPM(this.minDate.getHours()),a[0]=this.currentHour||0;case(w&&this.minDate.getHours()===d&&this.minDate.getMinutes()>n):a[1]=this.minDate.getMinutes();case(w&&this.minDate.getHours()===d&&this.minDate.getMinutes()===n&&this.minDate.getSeconds()>o):a[2]=this.minDate.getSeconds();break;case(w&&this.minDate.getHours()>d):a[0]=this.minDate.getHours();case(w&&this.minDate.getHours()===d&&this.minDate.getMinutes()>n):a[1]=this.minDate.getMinutes();case(w&&this.minDate.getHours()===d&&this.minDate.getMinutes()===n&&this.minDate.getSeconds()>o):a[2]=this.minDate.getSeconds();break;case(N&&this.maxDate.getHours()<d):a[0]=this.maxDate.getHours();case(N&&this.maxDate.getHours()===d&&this.maxDate.getMinutes()<n):a[1]=this.maxDate.getMinutes();case(N&&this.maxDate.getHours()===d&&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(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&&$n(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 $n(e)&&ev(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`};Nh(this.overlay,n||{}),this.appendOverlay(),this.alignOverlay(),this.setZIndex(),this.updateFocus(),this.bindListeners(),this.onShow.emit(e.element)}onOverlayAfterLeave(e){this.autoZIndex&&wn.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):ki(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"?fr(this.overlay,this.inputfieldViewChild?.nativeElement):nv(this.overlay,this.inputfieldViewChild?.nativeElement))}bindListeners(){this.bindDocumentClickListener(),this.bindDocumentResizeListener(),this.bindScrollListener()}setZIndex(){this.autoZIndex&&(this.touchUI?wn.set("modal",this.overlay,this.baseZIndex||this.config.zIndex.modal):wn.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)),pr(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),hv())}disableModality(){this.mask&&(pr(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(_n(r,"p-datepicker-mask-scrollblocker")){n=!0;break}}n||mv(),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(en.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,y)=>{let T=""+g;if(r(f))for(;T.length<y;)T="0"+T;return T},s=(f,g,y,T)=>r(f)?T[g]:y[g],c="",d=!1;if(e)for(o=0;o<n.length;o++)if(d)n.charAt(o)==="'"&&!r("'")?d=!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(en.DAY_NAMES_SHORT),this.getTranslation(en.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(en.MONTH_NAMES_SHORT),this.getTranslation(en.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+="'":d=!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),d=-1,f=-1,g=-1,y=-1,T=!1,w,N=le=>{let Ce=o+1<n.length&&n.charAt(o+1)===le;return Ce&&o++,Ce},H=le=>{let Ce=N(le),Te=le==="@"?14:le==="!"?20:le==="y"&&Ce?4:le==="o"?3:2,je=le==="y"?Te:1,Bt=new RegExp("^\\d{"+je+","+Te+"}"),ct=e.substring(s).match(Bt);if(!ct)throw"Missing number at position "+s;return s+=ct[0].length,parseInt(ct[0],10)},G=(le,Ce,Te)=>{let je=-1,Bt=N(le)?Te:Ce,ct=[];for(let _t=0;_t<Bt.length;_t++)ct.push([_t,Bt[_t]]);ct.sort((_t,nt)=>-(_t[1].length-nt[1].length));for(let _t=0;_t<ct.length;_t++){let nt=ct[_t][1];if(e.substr(s,nt.length).toLowerCase()===nt.toLowerCase()){je=ct[_t][0],s+=nt.length;break}}if(je!==-1)return je+1;throw"Unknown name at position "+s},X=()=>{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(T)n.charAt(o)==="'"&&!N("'")?T=!1:X();else switch(n.charAt(o)){case"d":g=H("d");break;case"D":G("D",this.getTranslation(en.DAY_NAMES_SHORT),this.getTranslation(en.DAY_NAMES));break;case"o":y=H("o");break;case"m":f=H("m");break;case"M":f=G("M",this.getTranslation(en.MONTH_NAMES_SHORT),this.getTranslation(en.MONTH_NAMES));break;case"y":d=H("y");break;case"@":w=new Date(H("@")),d=w.getFullYear(),f=w.getMonth()+1,g=w.getDate();break;case"!":w=new Date((H("!")-this.ticksTo1970)/1e4),d=w.getFullYear(),f=w.getMonth()+1,g=w.getDate();break;case"'":N("'")?X():T=!0;break;default:X()}if(s<e.length&&(a=e.substr(s),!/^\s+/.test(a)))throw"Extra/unparsed characters found in date: "+a;if(d===-1?d=new Date().getFullYear():d<100&&(d+=new Date().getFullYear()-new Date().getFullYear()%100+(d<=c?0:-100)),y>-1){f=1,g=y;do{if(r=this.getDaysCountInMonth(d,f-1),g<=r)break;f++,g-=r}while(!0)}if(this.view==="year"&&(f=f===-1?1:f,g=g===-1?1:g),w=this.daylightSavingAdjust(new Date(d,f-1,g)),w.getFullYear()!==d||w.getMonth()+1!==f||w.getDate()!==g)throw"Invalid date";return w}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",mr(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,mr(this.responsiveStyleElement,"nonce",this.config?.csp()?.nonce)}}destroyResponsiveStyleElement(){this.responsiveStyleElement&&(this.responsiveStyleElement.remove(),this.responsiveStyleElement=null)}bindDocumentClickListener(){this.documentClickListener||this.zone.runOutsideAngular(()=>{let e=this.el?this.el.nativeElement.ownerDocument:this.document;this.documentClickListener=this.renderer.listen(e,"mousedown",n=>{this.isOutsideClicked(n)&&this.overlayVisible&&this.zone.run(()=>{this.hideOverlay(),this.onClickOutside.emit(n),this.cd.markForCheck()})})})}unbindDocumentClickListener(){this.documentClickListener&&(this.documentClickListener(),this.documentClickListener=null)}bindDocumentResizeListener(){!this.documentResizeListener&&!this.touchUI&&(this.documentResizeListener=this.renderer.listen(this.window,"resize",this.onWindowResize.bind(this)))}unbindDocumentResizeListener(){this.documentResizeListener&&(this.documentResizeListener(),this.documentResizeListener=null)}bindScrollListener(){this.scrollHandler||(this.scrollHandler=new _r(this.el?.nativeElement,()=>{this.overlayVisible&&this.hideOverlay()})),this.scrollHandler.bindScrollListener()}unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()}isOutsideClicked(e){return!(this.el.nativeElement.isSameNode(e.target)||this.isNavIconClicked(e)||this.el.nativeElement.contains(e.target)||this.overlay&&this.overlay.contains(e.target))}isNavIconClicked(e){return _n(e.target,"p-datepicker-prev-button")||_n(e.target,"p-datepicker-prev-icon")||_n(e.target,"p-datepicker-next-button")||_n(e.target,"p-datepicker-next-icon")}onWindowResize(){this.overlayVisible&&!is()&&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&&wn.clear(this.overlay),this.destroyResponsiveStyleElement(),this.clearTimePickerTimer(),this.restoreOverlayAppend(),this.onOverlayHide()}static \u0275fac=function(n){return new(n||t)(Fn(Zt),Fn(ao))};static \u0275cmp=z({type:t,selectors:[["p-datePicker"],["p-datepicker"],["p-date-picker"]],contentQueries:function(n,o,r){if(n&1&&jn(r,K3,4)(r,Y3,4)(r,X3,4)(r,Z3,4)(r,Q3,4)(r,J3,4)(r,eR,4)(r,tR,4)(r,nR,4)(r,iR,4)(r,oR,4)(r,rR,4)(r,aR,4)(r,Ot,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&&io(sR,5)(lR,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&&(qt(o.sx("root")),j(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",De],stepMinute:[2,"stepMinute","stepMinute",De],stepSecond:[2,"stepSecond","stepSecond",De],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",De],showButtonBar:[2,"showButtonBar","showButtonBar",Y],todayButtonStyleClass:"todayButtonStyleClass",clearButtonStyleClass:"clearButtonStyleClass",autofocus:[2,"autofocus","autofocus",Y],autoZIndex:[2,"autoZIndex","autoZIndex",Y],baseZIndex:[2,"baseZIndex","baseZIndex",De],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",De],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([lF,kb,{provide:Ib,useExisting:t},{provide:nn,useExisting:t}]),Qt([Le]),J],ngContentSelectors:dR,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&&(fn(cR),R(0,ER,5,28,"ng-template",3),h(1,"p-motion",4),A("onBeforeEnter",function(a){return o.onOverlayBeforeEnter(a)})("onAfterLeave",function(a){return o.onOverlayAfterLeave(a)}),h(2,"div",5,0),A("click",function(a){return o.onOverlayClick(a)}),$e(4),R(5,PR,1,0,"ng-container",6)(6,fO,5,6,"ng-container",7)(7,JO,28,38,"div",8)(8,iF,3,4,"div",8),$e(9,1),R(10,oF,1,0,"ng-container",6),m()()),n&2&&(_("ngIf",!o.inline),l(),_("visible",o.inline||o.overlayVisible)("appear",!o.inline)("options",o.computedMotionOptions()),l(),j(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:[Rt,Qa,oo,Si,mn,ro,jt,ds,hb,mb,_b,Tv,Sv,fb,cs,rs,ot,so,Le,fo,Dv],encapsulation:2,changeDetection:0})}return t})(),Db=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=Et({type:t});static \u0275inj=Dt({imports:[Mb,ot,ot]})}return t})();var cF=["data-p-icon","filter-fill"],Eb=(()=>{class t extends Pe{static \u0275fac=(()=>{let e;return function(o){return(e||(e=$(t)))(o||t)}})();static \u0275cmp=z({type:t,selectors:[["","data-p-icon","filter-fill"]],features:[J],attrs:cF,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&&(Z(),oe(0,"path",0))},encapsulation:2})}return t})();var Pb=`
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 dF=["dropdownicon"],uF=["firstpagelinkicon"],pF=["previouspagelinkicon"],fF=["lastpagelinkicon"],hF=["nextpagelinkicon"],_s=t=>({$implicit:t}),mF=t=>({pageLink:t});function _F(t,i){t&1&&pe(0)}function gF(t,i){if(t&1&&(h(0,"div",10),R(1,_F,1,0,"ng-container",11),m()),t&2){let e=u();j(e.cx("contentStart")),_("pBind",e.ptm("contentStart")),l(),_("ngTemplateOutlet",e.templateLeft)("ngTemplateOutletContext",Re(5,_s,e.paginatorState))}}function vF(t,i){if(t&1&&(h(0,"span",10),v(1),m()),t&2){let e=u();j(e.cx("current")),_("pBind",e.ptm("current")),l(),x(e.currentPageReport)}}function bF(t,i){if(t&1&&(Z(),F(0,"svg",14)),t&2){let e=u(2);j(e.cx("firstIcon")),_("pBind",e.ptm("firstIcon"))}}function yF(t,i){}function CF(t,i){t&1&&R(0,yF,0,0,"ng-template")}function xF(t,i){if(t&1&&(h(0,"span"),R(1,CF,1,0,null,15),m()),t&2){let e=u(2);j(e.cx("firstIcon")),l(),_("ngTemplateOutlet",e.firstPageLinkIconTemplate||e._firstPageLinkIconTemplate)}}function wF(t,i){if(t&1){let e=K();h(0,"button",12),A("click",function(o){k(e);let r=u();return I(r.changePageToFirst(o))}),R(1,bF,1,3,"svg",13)(2,xF,2,3,"span",4),m()}if(t&2){let e=u();j(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 TF(t,i){if(t&1&&(Z(),F(0,"svg",16)),t&2){let e=u();j(e.cx("prevIcon")),_("pBind",e.ptm("prevIcon"))}}function SF(t,i){}function kF(t,i){t&1&&R(0,SF,0,0,"ng-template")}function IF(t,i){if(t&1&&(h(0,"span"),R(1,kF,1,0,null,15),m()),t&2){let e=u();j(e.cx("prevIcon")),l(),_("ngTemplateOutlet",e.previousPageLinkIconTemplate||e._previousPageLinkIconTemplate)}}function MF(t,i){if(t&1){let e=K();h(0,"button",12),A("click",function(o){let r=k(e).$implicit,a=u(2);return I(a.onPageLinkClick(o,r-1))}),v(1),m()}if(t&2){let e=i.$implicit,n=u(2);j(n.cx("page",Re(6,mF,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 DF(t,i){if(t&1&&(h(0,"span",10),R(1,MF,2,8,"button",17),m()),t&2){let e=u();j(e.cx("pages")),_("pBind",e.ptm("pages")),l(),_("ngForOf",e.pageLinks)}}function EF(t,i){if(t&1&&v(0),t&2){let e=u(2);x(e.currentPageReport)}}function PF(t,i){t&1&&pe(0)}function RF(t,i){if(t&1&&R(0,PF,1,0,"ng-container",11),t&2){let e=i.$implicit,n=u(3);_("ngTemplateOutlet",n.jumpToPageItemTemplate)("ngTemplateOutletContext",Re(2,_s,e))}}function OF(t,i){t&1&&(Se(0),R(1,RF,1,4,"ng-template",21),ke())}function FF(t,i){t&1&&pe(0)}function NF(t,i){if(t&1&&R(0,FF,1,0,"ng-container",15),t&2){let e=u(3);_("ngTemplateOutlet",e.dropdownIconTemplate||e._dropdownIconTemplate)}}function AF(t,i){t&1&&R(0,NF,1,1,"ng-template",22)}function LF(t,i){if(t&1){let e=K();h(0,"p-select",18),A("onChange",function(o){k(e);let r=u();return I(r.onPageDropdownChange(o))}),R(1,EF,1,1,"ng-template",19)(2,OF,2,0,"ng-container",20)(3,AF,1,0,null,20),m()}if(t&2){let e=u();_("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 BF(t,i){if(t&1&&(Z(),F(0,"svg",23)),t&2){let e=u();j(e.cx("nextIcon")),_("pBind",e.ptm("nextIcon"))}}function VF(t,i){}function zF(t,i){t&1&&R(0,VF,0,0,"ng-template")}function HF(t,i){if(t&1&&(h(0,"span"),R(1,zF,1,0,null,15),m()),t&2){let e=u();j(e.cx("nextIcon")),l(),_("ngTemplateOutlet",e.nextPageLinkIconTemplate||e._nextPageLinkIconTemplate)}}function qF(t,i){if(t&1&&(Z(),F(0,"svg",25)),t&2){let e=u(2);j(e.cx("lastIcon")),_("pBind",e.ptm("lastIcon"))}}function GF(t,i){}function jF(t,i){t&1&&R(0,GF,0,0,"ng-template")}function UF(t,i){if(t&1&&(h(0,"span"),R(1,jF,1,0,null,15),m()),t&2){let e=u(2);j(e.cx("lastIcon")),l(),_("ngTemplateOutlet",e.lastPageLinkIconTemplate||e._lastPageLinkIconTemplate)}}function $F(t,i){if(t&1){let e=K();h(0,"button",2),A("click",function(o){k(e);let r=u();return I(r.changePageToLast(o))}),R(1,qF,1,3,"svg",24)(2,UF,2,3,"span",4),m()}if(t&2){let e=u();j(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 WF(t,i){if(t&1){let e=K();h(0,"p-inputnumber",26),A("ngModelChange",function(o){k(e);let r=u();return I(r.changePage(o-1))}),m()}if(t&2){let e=u();j(e.cx("pcJumpToPageInput")),_("pt",e.ptm("pcJumpToPageInput"))("ngModel",e.currentPage())("disabled",e.empty())("unstyled",e.unstyled())}}function KF(t,i){t&1&&pe(0)}function YF(t,i){if(t&1&&R(0,KF,1,0,"ng-container",11),t&2){let e=i.$implicit,n=u(3);_("ngTemplateOutlet",n.dropdownItemTemplate)("ngTemplateOutletContext",Re(2,_s,e))}}function XF(t,i){t&1&&(Se(0),R(1,YF,1,4,"ng-template",21),ke())}function ZF(t,i){t&1&&pe(0)}function QF(t,i){if(t&1&&R(0,ZF,1,0,"ng-container",15),t&2){let e=u(3);_("ngTemplateOutlet",e.dropdownIconTemplate||e._dropdownIconTemplate)}}function JF(t,i){t&1&&R(0,QF,1,1,"ng-template",22)}function eN(t,i){if(t&1){let e=K();h(0,"p-select",27),lr("ngModelChange",function(o){k(e);let r=u();return sr(r.rows,o)||(r.rows=o),I(o)}),A("onChange",function(o){k(e);let r=u();return I(r.onRppChange(o))}),R(1,XF,2,0,"ng-container",20)(2,JF,1,0,null,20),m()}if(t&2){let e=u();_("options",e.rowsPerPageItems),ar("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 tN(t,i){t&1&&pe(0)}function nN(t,i){if(t&1&&(h(0,"div",10),R(1,tN,1,0,"ng-container",11),m()),t&2){let e=u();j(e.cx("contentEnd")),_("pBind",e.ptm("contentEnd")),l(),_("ngTemplateOutlet",e.templateRight)("ngTemplateOutletContext",Re(5,_s,e.paginatorState))}}var iN={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"},Rb=(()=>{class t extends tn{name="paginator";style=Pb;classes=iN;static \u0275fac=(()=>{let e;return function(o){return(e||(e=$(t)))(o||t)}})();static \u0275prov=C({token:t,factory:t.\u0275fac})}return t})();var Ob=new _e("PAGINATOR_INSTANCE"),Xh=(()=>{class t extends Nn{componentName="Paginator";bindDirectiveInstance=p(Le,{self:!0});$pcPaginator=p(Ob,{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(Rb);$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&&jn(r,dF,4)(r,uF,4)(r,pF,4)(r,fF,4)(r,hF,4)(r,Ot,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&&(j(o.cn(o.cx("paginator"),o.styleClass)),Oe("display",o.display))},inputs:{pageLinkSize:[2,"pageLinkSize","pageLinkSize",De],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",De],rows:[2,"rows","rows",De],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([Rb,{provide:Ob,useExisting:t},{provide:nn,useExisting:t}]),Qt([Le]),J],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&&(R(0,gF,2,7,"div",0)(1,vF,2,4,"span",0)(2,wF,3,6,"button",1),h(3,"button",2),A("click",function(a){return o.changePageToPrev(a)}),R(4,TF,1,3,"svg",3)(5,IF,2,3,"span",4),m(),R(6,DF,2,4,"span",0)(7,LF,4,11,"p-select",5),h(8,"button",2),A("click",function(a){return o.changePageToNext(a)}),R(9,BF,1,3,"svg",6)(10,HF,2,3,"span",4),m(),R(11,$F,3,7,"button",7)(12,WF,1,6,"p-inputnumber",8)(13,eN,3,11,"p-select",9)(14,nN,2,7,"div",0)),n&2&&(_("ngIf",o.templateLeft),l(),_("ngIf",o.showCurrentPageReport),l(),_("ngIf",o.showFirstLastIcon),l(),j(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(),j(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:[Rt,oo,Si,mn,Fv,Pv,Ct,Ft,Nt,ds,cb,db,ub,pb,ot,Ot,Le],encapsulation:2,changeDetection:0})}return t})(),Fb=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=Et({type:t});static \u0275inj=Dt({imports:[Xh,ot,ot]})}return t})();var Nb=`
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 rN=["input"],aN=`
1333
+ ${Nb}
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
+ `,sN={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"},Ab=(()=>{class t extends tn{name="radiobutton";style=aN;classes=sN;static \u0275fac=(()=>{let e;return function(o){return(e||(e=$(t)))(o||t)}})();static \u0275prov=C({token:t,factory:t.\u0275fac})}return t})();var Lb=new _e("RADIOBUTTON_INSTANCE"),lN={provide:os,useExisting:Ji(()=>Bb),multi:!0},cN=(()=>{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=C({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Bb=(()=>{class t extends kv{componentName="RadioButton";$pcRadioButton=p(Lb,{optional:!0,skipSelf:!0})??void 0;bindDirectiveInstance=p(Le,{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(Ab);injector=p(mt);registry=p(cN);onInit(){this.control=this.injector.get(cv),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=$(t)))(o||t)}})();static \u0275cmp=z({type:t,selectors:[["p-radioButton"],["p-radiobutton"],["p-radio-button"]],viewQuery:function(n,o){if(n&1&&io(rN,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),j(o.cx("root")))},inputs:{value:"value",tabindex:[2,"tabindex","tabindex",De],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([lN,Ab,{provide:Lb,useExisting:t},{provide:nn,useExisting:t}]),Qt([Le]),J],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),A("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&&(j(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),j(o.cx("box")),_("pBind",o.ptm("box")),l(),j(o.cx("icon")),_("pBind",o.ptm("icon")))},dependencies:[Rt,cs,ot,so,Le],encapsulation:2,changeDetection:0})}return t})(),Vb=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=Et({type:t});static \u0275inj=Dt({imports:[Bb,ot,ot]})}return t})();var dN=["header"],uN=["headergrouped"],pN=["body"],fN=["loadingbody"],hN=["caption"],mN=["footer"],_N=["footergrouped"],gN=["summary"],vN=["colgroup"],bN=["expandedrow"],yN=["groupheader"],CN=["groupfooter"],xN=["frozenexpandedrow"],wN=["frozenheader"],TN=["frozenbody"],SN=["frozenfooter"],kN=["frozencolgroup"],IN=["emptymessage"],MN=["paginatorleft"],DN=["paginatorright"],EN=["paginatordropdownitem"],PN=["loadingicon"],RN=["reorderindicatorupicon"],ON=["reorderindicatordownicon"],FN=["sorticon"],NN=["checkboxicon"],AN=["headercheckboxicon"],LN=["paginatordropdownicon"],BN=["paginatorfirstpagelinkicon"],VN=["paginatorlastpagelinkicon"],zN=["paginatorpreviouspagelinkicon"],HN=["paginatornextpagelinkicon"],qN=["resizeHelper"],GN=["reorderIndicatorUp"],jN=["reorderIndicatorDown"],UN=["wrapper"],$N=["table"],WN=["thead"],KN=["tfoot"],YN=["scroller"],XN=t=>({height:t}),zb=(t,i)=>({$implicit:t,options:i}),ZN=t=>({columns:t}),Zh=t=>({$implicit:t});function QN(t,i){if(t&1&&F(0,"i",17),t&2){let e=u(2);j(e.cn(e.cx("loadingIcon"),e.loadingIcon)),_("pBind",e.ptm("loadingIcon"))}}function JN(t,i){if(t&1&&(Z(),F(0,"svg",19)),t&2){let e=u(3);j(e.cx("loadingIcon")),_("spin",!0)("pBind",e.ptm("loadingIcon"))}}function eA(t,i){}function tA(t,i){t&1&&R(0,eA,0,0,"ng-template")}function nA(t,i){if(t&1&&(h(0,"span",17),R(1,tA,1,0,null,20),m()),t&2){let e=u(3);j(e.cx("loadingIcon")),_("pBind",e.ptm("loadingIcon")),l(),_("ngTemplateOutlet",e.loadingIconTemplate||e._loadingIconTemplate)}}function iA(t,i){if(t&1&&(Se(0),R(1,JN,1,4,"svg",18)(2,nA,2,4,"span",10),ke()),t&2){let e=u(2);l(),_("ngIf",!e.loadingIconTemplate&&!e._loadingIconTemplate),l(),_("ngIf",e.loadingIconTemplate||e._loadingIconTemplate)}}function oA(t,i){if(t&1&&(h(0,"div",17),Y0("p-overlay-mask-leave-active"),K0("p-overlay-mask-enter-active"),R(1,QN,1,3,"i",10)(2,iA,3,2,"ng-container",14),m()),t&2){let e=u();j(e.cx("mask")),_("pBind",e.ptm("mask")),l(),_("ngIf",e.loadingIcon),l(),_("ngIf",!e.loadingIcon)}}function rA(t,i){t&1&&pe(0)}function aA(t,i){if(t&1&&(h(0,"div",17),R(1,rA,1,0,"ng-container",20),m()),t&2){let e=u();j(e.cx("header")),_("pBind",e.ptm("header")),l(),_("ngTemplateOutlet",e.captionTemplate||e._captionTemplate)}}function sA(t,i){t&1&&pe(0)}function lA(t,i){if(t&1&&R(0,sA,1,0,"ng-container",20),t&2){let e=u(3);_("ngTemplateOutlet",e.paginatorDropdownIconTemplate||e._paginatorDropdownIconTemplate)}}function cA(t,i){t&1&&R(0,lA,1,1,"ng-template",22)}function dA(t,i){t&1&&pe(0)}function uA(t,i){if(t&1&&R(0,dA,1,0,"ng-container",20),t&2){let e=u(3);_("ngTemplateOutlet",e.paginatorFirstPageLinkIconTemplate||e._paginatorFirstPageLinkIconTemplate)}}function pA(t,i){t&1&&R(0,uA,1,1,"ng-template",23)}function fA(t,i){t&1&&pe(0)}function hA(t,i){if(t&1&&R(0,fA,1,0,"ng-container",20),t&2){let e=u(3);_("ngTemplateOutlet",e.paginatorPreviousPageLinkIconTemplate||e._paginatorPreviousPageLinkIconTemplate)}}function mA(t,i){t&1&&R(0,hA,1,1,"ng-template",24)}function _A(t,i){t&1&&pe(0)}function gA(t,i){if(t&1&&R(0,_A,1,0,"ng-container",20),t&2){let e=u(3);_("ngTemplateOutlet",e.paginatorLastPageLinkIconTemplate||e._paginatorLastPageLinkIconTemplate)}}function vA(t,i){t&1&&R(0,gA,1,1,"ng-template",25)}function bA(t,i){t&1&&pe(0)}function yA(t,i){if(t&1&&R(0,bA,1,0,"ng-container",20),t&2){let e=u(3);_("ngTemplateOutlet",e.paginatorNextPageLinkIconTemplate||e._paginatorNextPageLinkIconTemplate)}}function CA(t,i){t&1&&R(0,yA,1,1,"ng-template",26)}function xA(t,i){if(t&1){let e=K();h(0,"p-paginator",21),A("onPageChange",function(o){k(e);let r=u();return I(r.onPageChange(o))}),R(1,cA,1,0,null,14)(2,pA,1,0,null,14)(3,mA,1,0,null,14)(4,vA,1,0,null,14)(5,CA,1,0,null,14),m()}if(t&2){let e=u();_("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 wA(t,i){t&1&&pe(0)}function TA(t,i){if(t&1&&R(0,wA,1,0,"ng-container",28),t&2){let e=i.$implicit,n=i.options;u(2);let o=gt(8);_("ngTemplateOutlet",o)("ngTemplateOutletContext",Un(2,zb,e,n))}}function SA(t,i){if(t&1){let e=K();h(0,"p-scroller",27,2),A("onLazyLoad",function(o){k(e);let r=u();return I(r.onLazyItemLoad(o))}),R(2,TA,1,5,"ng-template",null,3,We),m()}if(t&2){let e=u();qt(Re(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 kA(t,i){t&1&&pe(0)}function IA(t,i){if(t&1&&(Se(0),R(1,kA,1,0,"ng-container",28),ke()),t&2){let e=u(),n=gt(8);l(),_("ngTemplateOutlet",n)("ngTemplateOutletContext",Un(4,zb,e.processedData,Re(2,ZN,e.columns)))}}function MA(t,i){t&1&&pe(0)}function DA(t,i){t&1&&pe(0)}function EA(t,i){if(t&1&&F(0,"tbody",35),t&2){let e=u().options,n=u();j(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 PA(t,i){if(t&1&&F(0,"tbody",36),t&2){let e=u().options,n=u();qt("height: calc("+e.spacerStyle.height+" - "+e.rows.length*e.itemSize+"px);"),j(n.cx("virtualScrollerSpacer")),_("pBind",n.ptm("virtualScrollerSpacer"))}}function RA(t,i){t&1&&pe(0)}function OA(t,i){if(t&1&&(h(0,"tfoot",37,6),R(2,RA,1,0,"ng-container",28),m()),t&2){let e=u().options,n=u();_("ngClass",n.cx("footer"))("ngStyle",n.sx("tfoot"))("pBind",n.ptm("tfoot")),l(2),_("ngTemplateOutlet",n.footerGroupedTemplate||n.footerTemplate||n._footerTemplate||n._footerGroupedTemplate)("ngTemplateOutletContext",Re(5,Zh,e.columns))}}function FA(t,i){if(t&1&&(h(0,"table",29,4),R(2,MA,1,0,"ng-container",28),h(3,"thead",30,5),R(5,DA,1,0,"ng-container",28),m(),R(6,EA,1,10,"tbody",31),F(7,"tbody",32),R(8,PA,1,5,"tbody",33)(9,OA,3,7,"tfoot",34),m()),t&2){let e=i.options,n=u();qt(n.tableStyle),j(n.cn(n.cx("table"),n.tableStyleClass)),_("pBind",n.ptm("table")),O("id",n.id+"-table"),l(2),_("ngTemplateOutlet",n.colGroupTemplate||n._colGroupTemplate)("ngTemplateOutletContext",Re(28,Zh,e.columns)),l(),j(n.cx("thead")),_("ngStyle",n.sx("thead"))("pBind",n.ptm("thead")),l(2),_("ngTemplateOutlet",n.headerGroupedTemplate||n.headerTemplate||n._headerTemplate)("ngTemplateOutletContext",Re(30,Zh,e.columns)),l(),_("ngIf",n.frozenValue||n.frozenBodyTemplate||n._frozenBodyTemplate),l(),qt(e.contentStyle),j(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 NA(t,i){t&1&&pe(0)}function AA(t,i){if(t&1&&R(0,NA,1,0,"ng-container",20),t&2){let e=u(3);_("ngTemplateOutlet",e.paginatorDropdownIconTemplate||e._paginatorDropdownIconTemplate)}}function LA(t,i){t&1&&R(0,AA,1,1,"ng-template",22)}function BA(t,i){t&1&&pe(0)}function VA(t,i){if(t&1&&R(0,BA,1,0,"ng-container",20),t&2){let e=u(3);_("ngTemplateOutlet",e.paginatorFirstPageLinkIconTemplate||e._paginatorFirstPageLinkIconTemplate)}}function zA(t,i){t&1&&R(0,VA,1,1,"ng-template",23)}function HA(t,i){t&1&&pe(0)}function qA(t,i){if(t&1&&R(0,HA,1,0,"ng-container",20),t&2){let e=u(3);_("ngTemplateOutlet",e.paginatorPreviousPageLinkIconTemplate||e._paginatorPreviousPageLinkIconTemplate)}}function GA(t,i){t&1&&R(0,qA,1,1,"ng-template",24)}function jA(t,i){t&1&&pe(0)}function UA(t,i){if(t&1&&R(0,jA,1,0,"ng-container",20),t&2){let e=u(3);_("ngTemplateOutlet",e.paginatorLastPageLinkIconTemplate||e._paginatorLastPageLinkIconTemplate)}}function $A(t,i){t&1&&R(0,UA,1,1,"ng-template",25)}function WA(t,i){t&1&&pe(0)}function KA(t,i){if(t&1&&R(0,WA,1,0,"ng-container",20),t&2){let e=u(3);_("ngTemplateOutlet",e.paginatorNextPageLinkIconTemplate||e._paginatorNextPageLinkIconTemplate)}}function YA(t,i){t&1&&R(0,KA,1,1,"ng-template",26)}function XA(t,i){if(t&1){let e=K();h(0,"p-paginator",21),A("onPageChange",function(o){k(e);let r=u();return I(r.onPageChange(o))}),R(1,LA,1,0,null,14)(2,zA,1,0,null,14)(3,GA,1,0,null,14)(4,$A,1,0,null,14)(5,YA,1,0,null,14),m()}if(t&2){let e=u();_("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 ZA(t,i){t&1&&pe(0)}function QA(t,i){if(t&1&&(h(0,"div",38),R(1,ZA,1,0,"ng-container",20),m()),t&2){let e=u();_("ngClass",e.cx("footer"))("pBind",e.ptm("footer")),l(),_("ngTemplateOutlet",e.summaryTemplate||e._summaryTemplate)}}function JA(t,i){if(t&1&&F(0,"div",38,7),t&2){let e=u();Oe("display","none"),_("ngClass",e.cx("columnResizeIndicator"))("pBind",e.ptm("columnResizeIndicator"))}}function e4(t,i){if(t&1&&(Z(),F(0,"svg",40)),t&2){let e=u(2);_("pBind",e.ptm("rowReorderIndicatorUp").icon)}}function t4(t,i){}function n4(t,i){t&1&&R(0,t4,0,0,"ng-template")}function i4(t,i){if(t&1&&(h(0,"span",38,8),R(2,e4,1,1,"svg",39)(3,n4,1,0,null,20),m()),t&2){let e=u();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 o4(t,i){if(t&1&&(Z(),F(0,"svg",42)),t&2){let e=u(2);_("pBind",e.ptm("rowReorderIndicatorDown").icon)}}function r4(t,i){}function a4(t,i){t&1&&R(0,r4,0,0,"ng-template")}function s4(t,i){if(t&1&&(h(0,"span",38,9),R(2,o4,1,1,"svg",41)(3,a4,1,0,null,20),m()),t&2){let e=u();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 l4=["pTableBody",""],em=(t,i,e,n,o)=>({$implicit:t,rowIndex:i,columns:e,editing:n,frozen:o}),c4=(t,i,e,n,o,r,a)=>({$implicit:t,rowIndex:i,columns:e,editing:n,frozen:o,rowgroup:r,rowspan:a}),gs=(t,i,e,n,o,r)=>({$implicit:t,rowIndex:i,columns:e,expanded:n,editing:o,frozen:r}),Hb=(t,i,e,n)=>({$implicit:t,rowIndex:i,columns:e,frozen:n}),qb=(t,i)=>({$implicit:t,frozen:i});function d4(t,i){t&1&&pe(0)}function u4(t,i){if(t&1&&(Se(0,3),R(1,d4,1,0,"ng-container",4),ke()),t&2){let e=u(),n=e.$implicit,o=e.index,r=u(2);l(),_("ngTemplateOutlet",r.dataTable.groupHeaderTemplate||r.dataTable._groupHeaderTemplate)("ngTemplateOutletContext",Xa(2,em,n,r.getRowIndex(o),r.columns,r.dataTable.editMode==="row"&&r.dataTable.isRowEditing(n),r.frozen))}}function p4(t,i){t&1&&pe(0)}function f4(t,i){if(t&1&&(Se(0),R(1,p4,1,0,"ng-container",4),ke()),t&2){let e=u(),n=e.$implicit,o=e.index,r=u(2);l(),_("ngTemplateOutlet",n?r.template:r.dataTable.loadingBodyTemplate||r.dataTable._loadingBodyTemplate)("ngTemplateOutletContext",Xa(2,em,n,r.getRowIndex(o),r.columns,r.dataTable.editMode==="row"&&r.dataTable.isRowEditing(n),r.frozen))}}function h4(t,i){t&1&&pe(0)}function m4(t,i){if(t&1&&(Se(0),R(1,h4,1,0,"ng-container",4),ke()),t&2){let e=u(),n=e.$implicit,o=e.index,r=u(2);l(),_("ngTemplateOutlet",n?r.template:r.dataTable.loadingBodyTemplate||r.dataTable._loadingBodyTemplate)("ngTemplateOutletContext",Q0(2,c4,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 _4(t,i){t&1&&pe(0)}function g4(t,i){if(t&1&&(Se(0,3),R(1,_4,1,0,"ng-container",4),ke()),t&2){let e=u(),n=e.$implicit,o=e.index,r=u(2);l(),_("ngTemplateOutlet",r.dataTable.groupFooterTemplate||r.dataTable._groupFooterTemplate)("ngTemplateOutletContext",Xa(2,em,n,r.getRowIndex(o),r.columns,r.dataTable.editMode==="row"&&r.dataTable.isRowEditing(n),r.frozen))}}function v4(t,i){if(t&1&&R(0,u4,2,8,"ng-container",2)(1,f4,2,8,"ng-container",0)(2,m4,2,10,"ng-container",0)(3,g4,2,8,"ng-container",2),t&2){let e=i.$implicit,n=i.index,o=u(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 b4(t,i){if(t&1&&(Se(0),R(1,v4,4,4,"ng-template",1),ke()),t&2){let e=u();l(),_("ngForOf",e.value)("ngForTrackBy",e.dataTable.rowTrackBy)}}function y4(t,i){t&1&&pe(0)}function C4(t,i){if(t&1&&(Se(0),R(1,y4,1,0,"ng-container",4),ke()),t&2){let e=u(),n=e.$implicit,o=e.index,r=u(2);l(),_("ngTemplateOutlet",r.template)("ngTemplateOutletContext",dr(2,gs,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&&pe(0)}function w4(t,i){if(t&1&&(Se(0,3),R(1,x4,1,0,"ng-container",4),ke()),t&2){let e=u(),n=e.$implicit,o=e.index,r=u(2);l(),_("ngTemplateOutlet",r.dataTable.groupHeaderTemplate||r.dataTable._groupHeaderTemplate)("ngTemplateOutletContext",dr(2,gs,n,r.getRowIndex(o),r.columns,r.dataTable.isRowExpanded(n),r.dataTable.editMode==="row"&&r.dataTable.isRowEditing(n),r.frozen))}}function T4(t,i){t&1&&pe(0)}function S4(t,i){t&1&&pe(0)}function k4(t,i){if(t&1&&(Se(0,3),R(1,S4,1,0,"ng-container",4),ke()),t&2){let e=u(2),n=e.$implicit,o=e.index,r=u(2);l(),_("ngTemplateOutlet",r.dataTable.groupFooterTemplate||r.dataTable._groupFooterTemplate)("ngTemplateOutletContext",dr(2,gs,n,r.getRowIndex(o),r.columns,r.dataTable.isRowExpanded(n),r.dataTable.editMode==="row"&&r.dataTable.isRowEditing(n),r.frozen))}}function I4(t,i){if(t&1&&(Se(0),R(1,T4,1,0,"ng-container",4)(2,k4,2,9,"ng-container",2),ke()),t&2){let e=u(),n=e.$implicit,o=e.index,r=u(2);l(),_("ngTemplateOutlet",r.dataTable.expandedRowTemplate||r.dataTable._expandedRowTemplate)("ngTemplateOutletContext",Rh(3,Hb,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 M4(t,i){if(t&1&&R(0,C4,2,9,"ng-container",0)(1,w4,2,9,"ng-container",2)(2,I4,3,8,"ng-container",0),t&2){let e=i.$implicit,n=i.index,o=u(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 D4(t,i){if(t&1&&(Se(0),R(1,M4,3,3,"ng-template",1),ke()),t&2){let e=u();l(),_("ngForOf",e.value)("ngForTrackBy",e.dataTable.rowTrackBy)}}function E4(t,i){t&1&&pe(0)}function P4(t,i){t&1&&pe(0)}function R4(t,i){if(t&1&&(Se(0),R(1,P4,1,0,"ng-container",4),ke()),t&2){let e=u(),n=e.$implicit,o=e.index,r=u(2);l(),_("ngTemplateOutlet",r.dataTable.frozenExpandedRowTemplate||r.dataTable._frozenExpandedRowTemplate)("ngTemplateOutletContext",Rh(2,Hb,n,r.getRowIndex(o),r.columns,r.frozen))}}function O4(t,i){if(t&1&&R(0,E4,1,0,"ng-container",4)(1,R4,2,7,"ng-container",0),t&2){let e=i.$implicit,n=i.index,o=u(2);_("ngTemplateOutlet",o.template)("ngTemplateOutletContext",dr(3,gs,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 F4(t,i){if(t&1&&(Se(0),R(1,O4,2,10,"ng-template",1),ke()),t&2){let e=u();l(),_("ngForOf",e.value)("ngForTrackBy",e.dataTable.rowTrackBy)}}function N4(t,i){t&1&&pe(0)}function A4(t,i){if(t&1&&(Se(0),R(1,N4,1,0,"ng-container",4),ke()),t&2){let e=u();l(),_("ngTemplateOutlet",e.dataTable.loadingBodyTemplate||e.dataTable._loadingBodyTemplate)("ngTemplateOutletContext",Un(2,qb,e.columns,e.frozen))}}function L4(t,i){t&1&&pe(0)}function B4(t,i){if(t&1&&(Se(0),R(1,L4,1,0,"ng-container",4),ke()),t&2){let e=u();l(),_("ngTemplateOutlet",e.dataTable.emptyMessageTemplate||e.dataTable._emptyMessageTemplate)("ngTemplateOutletContext",Un(2,qb,e.columns,e.frozen))}}var V4=`
1342
+ ${lb}
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
+ `,z4={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})},H4={tableContainer:({instance:t})=>({"max-height":t.virtualScroll?"":t.scrollHeight,overflow:"auto"}),thead:{position:"sticky"},tfoot:{position:"sticky"},rowGroupHeader:({instance:t})=>({top:t.getFrozenRowGroupHeaderStickyPosition})},Qh=(()=>{class t extends tn{name="datatable";style=V4;classes=z4;inlineStyles=H4;static \u0275fac=(()=>{let e;return function(o){return(e||(e=$(t)))(o||t)}})();static \u0275prov=C({token:t,factory:t.\u0275fac})}return t})();var q4=new _e("TABLE_INSTANCE"),Jh=(()=>{class t{sortSource=new Qi;selectionSource=new Qi;contextMenuSource=new Qi;valueSource=new Qi;columnsSource=new Qi;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=C({token:t,factory:t.\u0275fac})}return t})(),tm=(()=>{class t extends Nn{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=_v();styleElement;responsiveStyleElement;overlayService=p(ao);filterService=p(av);tableService=p(Jh);zone=p(Zt);_componentStyle=p(Qh);bindDirectiveInstance=p(Le,{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(){Gt(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&&Gt(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(xe.resolveFieldData(e,this.dataKey))]=1;else this.selectionKeys[String(xe.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=xe.resolveFieldData(r,e),c=xe.resolveFieldData(a,e),d=null;return s==null&&c!=null?d=-1:s!=null&&c==null?d=1:s==null&&c==null?d=0:typeof s=="string"&&typeof c=="string"?d=s.localeCompare(c):d=s<c?-1:s>c?1:0,n*(d||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=xe.resolveFieldData(e,o[r].field),s=xe.resolveFieldData(n,o[r].field);return xe.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 xe.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"||iv(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 d=this.rowTouched?!1:this.metaKeySelection,f=this.dataKey?String(xe.resolveFieldData(a,this.dataKey)):null;if(this.anchorRowIndex=s,this.rangeRowIndex=s,d){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 y=this.findIndexInSelection(a);this._selection=this.selection.filter((T,w)=>w!=y),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((y,T)=>T!=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(xe.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 d=this.filteredValue?this.filteredValue[c]:this.value[c];if(!this.isSelected(d)&&!o){if(!this.isRowSelectable(d,n))continue;s.push(d),this._selection=[...this.selection,d];let f=this.dataKey?String(xe.resolveFieldData(d,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],d=this.findIndexInSelection(c);this._selection=this.selection.filter((g,y)=>y!=d);let f=this.dataKey?String(xe.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[xe.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(xe.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(xe.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:xe.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 d=c,f=this.filters[d];if(Array.isArray(f)){for(let g of f)if(o=this.executeLocalFilter(d,this.value[n],g),g.operator===Vh.OR&&o||g.operator===Vh.AND&&!o)break}else o=this.executeLocalFilter(d,this.value[n],f);if(!o)break}if(this.filters.global&&!r&&e)for(let c=0;c<e.length;c++){let d=e[c].field||e[c];if(r=this.filterService.filters[this.filters.global.matchMode](xe.resolveFieldData(this.value[n],d),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||rv.STARTS_WITH,s=xe.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 y=xe.resolveFieldData(f,g.field);return y!=null?this.exportFunction?y=this.exportFunction({data:y,field:g.field}):y=String(y).replace(/"/g,'""'):y="",'"'+y+'"'}).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;"}),d=this.renderer.createElement("a");d.style.display="none",this.renderer.appendChild(this.document.body,d),d.download!==void 0?(d.setAttribute("href",URL.createObjectURL(c)),d.setAttribute("download",this.exportFilename+".csv"),d.click()):(o="data:text/csv;charset=utf-8,"+o,this.document.defaultView?.open(encodeURI(o))),this.renderer.removeChild(this.document.body,d)}onLazyItemLoad(e){this.onLazyLoad.emit(Mt(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"),mr(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(xe.resolveFieldData(e,this.dataKey));this.editingRowKeys[n]=!0}saveRowEdit(e,n){if(ye.find(n,".ng-invalid.ng-dirty").length===0){let o=String(xe.resolveFieldData(e,this.dataKey));delete this.editingRowKeys[o]}}cancelRowEdit(e){let n=String(xe.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(xe.resolveFieldData(e,this.groupRowsBy)):String(xe.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(xe.resolveFieldData(e,this.groupRowsBy))]===!0:this.expandedRowKeys[String(xe.resolveFieldData(e,this.dataKey))]===!0}isRowEditing(e){return this.editingRowKeys[String(xe.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 d=this.tableViewChild?.nativeElement.offsetWidth+o;this.setResizeTableWidth(d+"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,d=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&&(xe.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();xe.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 d=c===n?o:r&&c===n+1?r:s,f=`width: ${d}px !important; max-width: ${d}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;xe.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(Gt(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"),xe.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(Gt(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=$(t)))(o||t)}})();static \u0275cmp=z({type:t,selectors:[["p-table"]],contentQueries:function(n,o,r){if(n&1&&jn(r,dN,4)(r,uN,4)(r,pN,4)(r,fN,4)(r,hN,4)(r,mN,4)(r,_N,4)(r,gN,4)(r,vN,4)(r,bN,4)(r,yN,4)(r,CN,4)(r,xN,4)(r,wN,4)(r,TN,4)(r,SN,4)(r,kN,4)(r,IN,4)(r,MN,4)(r,DN,4)(r,EN,4)(r,PN,4)(r,RN,4)(r,ON,4)(r,FN,4)(r,NN,4)(r,AN,4)(r,LN,4)(r,BN,4)(r,VN,4)(r,zN,4)(r,HN,4)(r,Ot,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&&io(qN,5)(GN,5)(jN,5)(UN,5)($N,5)(WN,5)(KN,5)(YN,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),j(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",De],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",De],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",De],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",De],virtualScrollOptions:"virtualScrollOptions",virtualScrollDelay:[2,"virtualScrollDelay","virtualScrollDelay",De],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",De],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([Jh,Qh,{provide:q4,useExisting:t},{provide:nn,useExisting:t}]),Qt([Le]),J],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&&(R(0,oA,3,5,"div",10)(1,aA,2,4,"div",10)(2,xA,6,26,"p-paginator",11),h(3,"div",12,0),R(5,SA,4,18,"p-scroller",13)(6,IA,2,7,"ng-container",14)(7,FA,10,32,"ng-template",null,1,We),m(),R(9,XA,6,26,"p-paginator",11)(10,QA,2,3,"div",15)(11,JA,2,4,"div",16)(12,i4,4,6,"span",16)(13,s4,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(),j(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:()=>[Qa,Si,mn,ro,Xh,Ot,Ov,Uh,$h,Hh,Le,G4],encapsulation:2})}return t})(),G4=(()=>{class t extends Nn{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=xe.resolveFieldData(n,this.dataTable?.groupRowsBy||""),a=e[o-(this.dataTable?._first||0)-1];if(a){let s=xe.resolveFieldData(a,this.dataTable?.groupRowsBy||"");return r!==s}else return!0}shouldRenderRowGroupFooter(e,n,o){let r=xe.resolveFieldData(n,this.dataTable?.groupRowsBy||""),a=e[o-(this.dataTable?._first||0)+1];if(a){let s=xe.resolveFieldData(a,this.dataTable?.groupRowsBy||"");return r!==s}else return!0}shouldRenderRowspan(e,n,o){let r=xe.resolveFieldData(n,this.dataTable?.groupRowsBy),a=e[o-1];if(a){let s=xe.resolveFieldData(a,this.dataTable?.groupRowsBy||"");return r!==s}else return!0}calculateRowGroupSize(e,n,o){let r=xe.resolveFieldData(n,this.dataTable?.groupRowsBy),a=r,s=0;for(;r===a;){s++;let c=e[++o];if(c)a=xe.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)(Fn(tm),Fn(Jh))};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:[J],attrs:l4,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&&R(0,b4,2,2,"ng-container",0)(1,D4,2,2,"ng-container",0)(2,F4,2,2,"ng-container",0)(3,A4,2,5,"ng-container",0)(4,B4,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:[oo,Si,mn],encapsulation:2})}return t})();var Gb=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=Et({type:t});static \u0275inj=Dt({providers:[Qh],imports:[Rt,Fb,as,Nv,Ct,rn,Av,Db,Rv,wv,us,qh,Uh,$h,Hh,yb,xb,Cb,gb,Eb,vb,bb,wb,Vb,so,fo,ot,qh]})}return t})();var jb=`
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 U4={root:()=>["p-progressspinner"],spin:"p-progressspinner-spin",circle:"p-progressspinner-circle"},Ub=(()=>{class t extends tn{name="progressspinner";style=jb;classes=U4;static \u0275fac=(()=>{let e;return function(o){return(e||(e=$(t)))(o||t)}})();static \u0275prov=C({token:t,factory:t.\u0275fac})}return t})();var $b=new _e("PROGRESSSPINNER_INSTANCE"),nm=(()=>{class t extends Nn{componentName="ProgressSpinner";$pcProgressSpinner=p($b,{optional:!0,skipSelf:!0})??void 0;bindDirectiveInstance=p(Le,{self:!0});styleClass;strokeWidth="2";fill="none";animationDuration="2s";ariaLabel;onAfterViewChecked(){this.bindDirectiveInstance.setAttrs(this.ptms(["host","root"]))}_componentStyle=p(Ub);static \u0275fac=(()=>{let e;return function(o){return(e||(e=$(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),j(o.cn(o.cx("root"),o.styleClass)))},inputs:{styleClass:"styleClass",strokeWidth:"strokeWidth",fill:"fill",animationDuration:"animationDuration",ariaLabel:"ariaLabel"},features:[Ee([Ub,{provide:$b,useExisting:t},{provide:nn,useExisting:t}]),Qt([Le]),J],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&&(Z(),h(0,"svg",0),F(1,"circle",1),m()),n&2&&(j(o.cx("spin")),Oe("animation-duration",o.animationDuration),_("pBind",o.ptm("spin")),l(),j(o.cx("circle")),_("pBind",o.ptm("circle")),O("fill",o.fill)("stroke-width",o.strokeWidth))},dependencies:[Rt,ot,Le],encapsulation:2,changeDetection:0})}return t})(),Wb=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=Et({type:t});static \u0275inj=Dt({imports:[nm,ot,ot]})}return t})();var Qn={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 im="sm.folders.expanded";function Kb(){let t=null;try{t=localStorage.getItem(im)}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 Yb(t){try{if(t.size===0){localStorage.removeItem(im);return}localStorage.setItem(im,JSON.stringify([...t]))}catch{}}function vs(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 Xb={stable:"success",experimental:"info",deprecated:"warn"};function Zb(t){return t>=.75?"high":t>=.45?"medium":"low"}var Jn={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 ty(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 ny(t,i){let e=new Map,n=o=>{let r=o.leaves.length,a=0,s=0;for(let d of o.leaves)a+=i.errorCounts.get(d.path)??0,s+=i.warnCounts.get(d.path)??0;for(let d of o.subfolders.values()){let f=n(d);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 bs(t,i,e,n=""){let o=J4(t),r=vv(t),a=t.modifiedAtMs;return{type:"leaf",path:t.path,name:Q4(t),prefix:n,depth:i,linksIn:t.linksInCount!==void 0?String(t.linksInCount):Qn.missing,linksOut:t.linksOutCount!==void 0?String(t.linksOutCount):Qn.missing,tokens:t.tokensTotal!==void 0?gr(t.tokensTotal):Qn.missing,modifiedAt:a!==void 0?yv(a):Qn.missing,modifiedAtFull:a!==void 0?Cv(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?bv(t,Jn.sidecar):"",stability:o,stabilitySeverity:Xb[o]}}function W4(t,i,e,n){let o=[],r=(c,d)=>{let f=[c.name],g=c;for(;g.subfolders.size===1&&g.leaves.length===0;){let[G]=g.subfolders.values();f.push(G.name),g=G}let y=f.join("/");if(g.subfolders.size===0&&g.leaves.length===1){o.push(bs(g.leaves[0],d,n,`${y}/`));return}let T=i.has(g.path),w=e.get(g.path)??{nodes:0,errors:0,warns:0};if(o.push({type:"folder",path:g.path,name:y,depth:d,expanded:T,nodeCount:w.nodes,errors:w.errors,warns:w.warns}),!T)return;let N=Array.from(g.subfolders.values()).sort(Jb);for(let G of N)r(G,d+1);let H=[...g.leaves].sort(ey);for(let G of H)o.push(bs(G,d+1,n))},a=Array.from(t.subfolders.values()).sort(Jb);for(let c of a)r(c,0);let s=[...t.leaves].sort(ey);for(let c of s)o.push(bs(c,0,n));return o}function K4(t,i,e){let n=t.map(o=>bs(o,0,e,Z4(o.path)));return i.column==="tree"||n.sort(X4(i.column,i.dir)),n}function iy(t){return t.sort.column==="tree"?W4(t.tree,t.expanded,t.aggregates,t.maps):K4(t.leaves,t.sort,t.maps)}function Y4(t){return t.errors*1e6+t.warns*1e3+(t.isStale?1:0)}function X4(t,i){let e=i==="asc"?1:-1;return(n,o)=>{let r=Qb(n,t),a=Qb(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 Qb(t,i){switch(i){case"linksIn":return t.linksInRaw;case"linksOut":return t.linksOutRaw;case"tokens":return t.tokensRaw;case"issues":return Y4(t);case"modified":return t.modifiedAtRaw}}function Z4(t){let i=t.lastIndexOf("/");return i===-1?"":t.slice(0,i)}function Q4(t){let i=t.frontmatter.name?.trim();return i||vs(t.path)||Qn.missing}function J4(t){return uo(t)??"stable"}function Jb(t,i){return t.name.localeCompare(i.name)}function ey(t,i){return t.path.localeCompare(i.path)}function oy(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 om="sm.files.sort",eL=["tree","linksIn","linksOut","tokens","issues","modified"],tL=["asc","desc"],Ii={column:"tree",dir:"asc"};function nL(t){return t==="tree"?"asc":"desc"}function ry(t,i){return i==="tree"?Ii:t.column===i?{column:i,dir:t.dir==="asc"?"desc":"asc"}:{column:i,dir:nL(i)}}function iL(t){return typeof t=="string"&&eL.includes(t)}function oL(t){return typeof t=="string"&&tL.includes(t)}function rL(t){if(typeof t!="object"||t===null)return!1;let i=t;return iL(i.column)&&oL(i.dir)}function ay(){let t=null;try{t=localStorage.getItem(om)}catch{return Ii}if(!t)return Ii;let i;try{i=JSON.parse(t)}catch{return Ii}return rL(i)?{column:i.column,dir:i.dir}:Ii}function sy(t){try{if(t.column===Ii.column&&t.dir===Ii.dir){localStorage.removeItem(om);return}localStorage.setItem(om,JSON.stringify({column:t.column,dir:t.dir}))}catch{}}var aL=()=>({width:"1.75rem",height:"1.75rem"});function sL(t,i){if(t&1&&F(0,"p-message",1),t&2){let e=u();_("text",e.error())}}function lL(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=u();l(),qt(Pt(3,aL)),l(2),x(e.texts.loading)}}function cL(t,i){if(t&1){let e=K();F(0,"i",7),h(1,"p",8),v(2),m(),h(3,"p-button",9),A("onClick",function(){k(e);let o=u(3);return I(o.resetFilters())}),m()}if(t&2){let e=u(3);l(2),x(e.texts.emptyFiltered),l(),_("label",e.texts.resetFilters)("text",!0)}}function dL(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=u(3);l(2),x(e.texts.emptyAll),l(2),x(e.texts.emptyAllHint)}}function uL(t,i){if(t&1&&(h(0,"div",5),M(1,cL,4,3)(2,dL,5,2),m()),t&2){let e=u(2);l(),D(e.filtersActive()?1:2)}}function pL(t,i){if(t&1){let e=K();h(0,"span",20)(1,"button",28),A("click",function(){k(e);let o=u(4);return I(o.expandAll())}),F(2,"i",29),m(),h(3,"button",30),A("click",function(){k(e);let o=u(4);return I(o.collapseAll())}),F(4,"i",31),m()()}if(t&2){let e=u(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 fL(t,i){if(t&1){let e=K();h(0,"tr")(1,"th",16)(2,"div",17)(3,"button",18),A("click",function(){k(e);let o=u(3);return I(o.onSortColumn("tree"))}),v(4),F(5,"i",19),m(),M(6,pL,5,4,"span",20),m()(),h(7,"th",21)(8,"button",22),A("click",function(){k(e);let o=u(3);return I(o.onSortColumn("linksIn"))}),v(9),F(10,"i",19),m()(),h(11,"th",23)(12,"button",22),A("click",function(){k(e);let o=u(3);return I(o.onSortColumn("linksOut"))}),v(13),F(14,"i",19),m()(),h(15,"th",24)(16,"button",25),A("click",function(){k(e);let o=u(3);return I(o.onSortColumn("tokens"))}),v(17),F(18,"i",19),m()(),h(19,"th",26)(20,"button",18),A("click",function(){k(e);let o=u(3);return I(o.onSortColumn("issues"))}),v(21),F(22,"i",19),m()(),h(23,"th",27)(24,"button",22),A("click",function(){k(e);let o=u(3);return I(o.onSortColumn("modified"))}),v(25),F(26,"i",19),m()()()}if(t&2){let e=u(3);l(),O("aria-sort",e.ariaSortFor("tree")),l(2),se("files__sort-btn--active",e.sortState().column==="tree"),O("aria-label",e.texts.sortTreeAriaLabel),l(),be(" ",e.texts.columns.tree," "),l(),se("pi-sort-amount-up",e.sortState().column==="tree"&&e.sortState().dir==="asc")("pi-sort-amount-down",e.sortState().column==="tree"&&e.sortState().dir==="desc")("pi-sort-alt",e.sortState().column!=="tree"),l(),D(e.isFlat()?-1:6),l(),O("aria-sort",e.ariaSortFor("linksIn")),l(),se("files__sort-btn--active",e.sortState().column==="linksIn"),_("pTooltip",e.texts.linksInHeaderTooltip),O("aria-label",e.texts.sortAriaLabel(e.texts.columns.linksIn)),l(),be(" ",e.texts.columns.linksIn," "),l(),se("pi-sort-amount-up",e.sortState().column==="linksIn"&&e.sortState().dir==="asc")("pi-sort-amount-down",e.sortState().column==="linksIn"&&e.sortState().dir==="desc")("pi-sort-alt",e.sortState().column!=="linksIn"),l(),O("aria-sort",e.ariaSortFor("linksOut")),l(),se("files__sort-btn--active",e.sortState().column==="linksOut"),_("pTooltip",e.texts.linksOutHeaderTooltip),O("aria-label",e.texts.sortAriaLabel(e.texts.columns.linksOut)),l(),be(" ",e.texts.columns.linksOut," "),l(),se("pi-sort-amount-up",e.sortState().column==="linksOut"&&e.sortState().dir==="asc")("pi-sort-amount-down",e.sortState().column==="linksOut"&&e.sortState().dir==="desc")("pi-sort-alt",e.sortState().column!=="linksOut"),l(),O("aria-sort",e.ariaSortFor("tokens")),l(),se("files__sort-btn--active",e.sortState().column==="tokens"),O("aria-label",e.texts.sortAriaLabel(e.texts.columns.tokens)),l(),be(" ",e.texts.columns.tokens," "),l(),se("pi-sort-amount-up",e.sortState().column==="tokens"&&e.sortState().dir==="asc")("pi-sort-amount-down",e.sortState().column==="tokens"&&e.sortState().dir==="desc")("pi-sort-alt",e.sortState().column!=="tokens"),l(),O("aria-sort",e.ariaSortFor("issues")),l(),se("files__sort-btn--active",e.sortState().column==="issues"),O("aria-label",e.texts.sortAriaLabel(e.texts.columns.issues)),l(),be(" ",e.texts.columns.issues," "),l(),se("pi-sort-amount-up",e.sortState().column==="issues"&&e.sortState().dir==="asc")("pi-sort-amount-down",e.sortState().column==="issues"&&e.sortState().dir==="desc")("pi-sort-alt",e.sortState().column!=="issues"),l(),O("aria-sort",e.ariaSortFor("modified")),l(),se("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(),se("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 hL(t,i){if(t&1&&(h(0,"span",46),F(1,"i",48),h(2,"span",49),v(3),m()()),t&2){let e=u(2).$implicit,n=u(3);_("pTooltip",n.texts.folderErrorTooltip(e.errors)),O("aria-label",n.texts.folderErrorTooltip(e.errors))("data-testid","files-folder-errors-"+e.path),l(3),x(e.errors)}}function mL(t,i){if(t&1&&(h(0,"span",47),F(1,"i",50),h(2,"span",49),v(3),m()()),t&2){let e=u(2).$implicit,n=u(3);_("pTooltip",n.texts.folderWarnTooltip(e.warns)),O("aria-label",n.texts.folderWarnTooltip(e.warns))("data-testid","files-folder-warns-"+e.path),l(3),x(e.warns)}}function _L(t,i){if(t&1){let e=K();h(0,"tr",34),A("click",function(){k(e);let o=u().$implicit,r=u(3);return I(r.toggleFolder(o))})("keydown.enter",function(){k(e);let o=u().$implicit,r=u(3);return I(r.toggleFolder(o))})("keydown.space",function(o){k(e);let r=u().$implicit,a=u(3);return o.preventDefault(),I(a.toggleFolder(r))}),h(1,"td",35)(2,"span",36),F(3,"span",37),h(4,"button",38),A("click",function(o){k(e);let r=u().$implicit,a=u(3);return I(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),M(17,hL,4,4,"span",46),M(18,mL,4,4,"span",47),m()(),F(19,"td"),m()}if(t&2){let e=u().$implicit,n=u(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(),se("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(),se("files__chevron--open",e.expanded),l(),se("pi-folder",!e.expanded)("pi-folder-open",e.expanded),l(2),x(e.name),l(),O("aria-label",e.nodeCount+" nodes"),l(),x(n.texts.folderCount(e.nodeCount)),l(6),D(e.errors>0?17:-1),l(),D(e.warns>0?18:-1)}}function gL(t,i){if(t&1&&(h(0,"span",66),v(1),m()),t&2){let e=u(3).$implicit;l(),x(e.prefix)}}function vL(t,i){if(t&1&&(h(0,"span",54)(1,"span",65),v(2),m(),M(3,gL,2,1,"span",66),m()),t&2){let e=u(2).$implicit;_("pTooltip",e.path),l(2),x(e.name),l(),D(e.prefix?3:-1)}}function bL(t,i){if(t&1&&(h(0,"span",67),v(1),m()),t&2){let e=u(3).$implicit;l(),x(e.prefix)}}function yL(t,i){if(t&1&&(h(0,"span",55),M(1,bL,2,1,"span",67),v(2),m()),t&2){let e=u(2).$implicit;l(),D(e.prefix?1:-1),l(),x(e.name)}}function CL(t,i){if(t&1&&F(0,"i",60),t&2){let e=u(2).$implicit;_("pTooltip",e.staleTooltip),O("aria-label",e.staleTooltip)}}function xL(t,i){if(t&1&&(h(0,"span",61),F(1,"i",48),h(2,"span",49),v(3),m()()),t&2){let e=u(2).$implicit;l(3),x(e.errors)}}function wL(t,i){if(t&1&&(h(0,"span",62),F(1,"i",50),h(2,"span",49),v(3),m()()),t&2){let e=u(2).$implicit;l(3),x(e.warns)}}function TL(t,i){if(t&1&&(h(0,"span",63),v(1),m()),t&2){let e=u(5);l(),x(e.texts.missing)}}function SL(t,i){if(t&1){let e=K();h(0,"tr",51),A("click",function(){k(e);let o=u().$implicit,r=u(3);return I(r.onLeafActivate(o))})("keydown.enter",function(){k(e);let o=u().$implicit,r=u(3);return I(r.onLeafActivate(o))})("keydown.space",function(o){k(e);let r=u().$implicit,a=u(3);return o.preventDefault(),I(a.onLeafActivate(r))}),h(1,"td",35)(2,"span",36),F(3,"span",37),h(4,"button",38),A("click",function(o){k(e);let r=u().$implicit,a=u(3);return I(a.onToggleLeafVisibility(r,o))}),F(5,"i",39),m(),F(6,"span",52)(7,"i",53),M(8,vL,4,3,"span",54)(9,yL,3,2,"span",55),h(10,"button",56),A("click",function(o){k(e);let r=u().$implicit,a=u(3);return I(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),M(20,CL,1,2,"i",60),M(21,xL,4,1,"span",61),M(22,wL,4,1,"span",62),M(23,TL,2,1,"span",63),m()(),h(24,"td",64),v(25),m()()}if(t&2){let e=u().$implicit,n=u(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(),se("pi-check",n.leafVisible(e.path)),l(3),D(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),x(e.linksIn),l(2),x(e.linksOut),l(),O("title",(e.tokensRaw??0)>0?n.texts.tokensTooltip(e.tokensRaw):null),l(),x(e.tokens),l(3),D(e.isStale?20:-1),l(),D(e.errors>0?21:-1),l(),D(e.warns>0?22:-1),l(),D(!e.isStale&&e.errors===0&&e.warns===0?23:-1),l(),O("title",e.modifiedAtFull||null),l(),x(e.modifiedAt)}}function kL(t,i){if(t&1&&M(0,_L,20,27,"tr",32)(1,SL,26,26,"tr",33),t&2){let e=i.$implicit;D(e.type==="folder"?0:1)}}function IL(t,i){if(t&1&&(h(0,"div",6)(1,"p-table",13),R(2,fL,27,70,"ng-template",14)(3,kL,2,1,"ng-template",15),m()()),t&2){let e=u(2);l(),_("value",e.rows())("paginator",!1)("scrollable",!0)("scrollHeight","flex")("rowTrackBy",e.trackByPath)}}function ML(t,i){if(t&1&&M(0,uL,3,1,"div",5)(1,IL,4,5,"div",6),t&2){let e=u();D(e.rows().length===0?0:1)}}var ly=(()=>{class t{loader=p(pt);filters=p(on);nodeOpenIntent=p(po);mapVisibility=p(co);mapIsolate=p(ms);texts=Qn;loading=this.loader.loading;error=this.loader.error;filtersActive=this.filters.isActive;showLoading=S(()=>this.loading()&&this.loader.corpusCount()===0);expanded=W(Kb());sort=W(ay());sortState=this.sort.asReadonly();isFlat=S(()=>this.sort().column!=="tree");trackByPath=(e,n)=>n.path;constructor(){ce(()=>{Yb(this.expanded())}),ce(()=>{sy(this.sort())})}issueMaps=S(()=>oy(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(()=>ty(this.filteredNodes()));aggregates=S(()=>ny(this.tree(),this.issueMaps()));rows=S(()=>iy({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(ry(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),M(1,sL,1,1,"p-message",1),M(2,lL,4,4,"div",2)(3,ML,2,1),m()),n&2&&(l(),D(o.error()?1:-1),l(),D(o.showLoading()?2:o.error()?-1:3))},dependencies:[Gb,tm,Ot,Wb,nm,Bv,Lv,rn,jt,Fe,Be],styles:["[_nghost-%COMP%]{--files-fs-xs: .75rem;--files-fs-mono: .8rem;--files-fs-sm: .875rem;--files-indent: 1rem;display:block;width:100%;box-sizing:border-box}.files[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.files__loading[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;gap:.5rem;padding:1.5rem 1rem;color:var(--p-text-muted-color)}.files__loading-label[_ngcontent-%COMP%]{font-size:var(--files-fs-xs)}.files__table[_ngcontent-%COMP%]{width:100%}[_nghost-%COMP%] .files__table .p-datatable-tbody td{font-size:var(--files-fs-sm);vertical-align:middle}[_nghost-%COMP%] .files--rail .files__table{--p-datatable-header-cell-background: var(--sm-bg-content);--p-datatable-row-background: var(--sm-bg-content)}.files__sort-btn[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.35rem;width:100%;padding:.15rem .25rem;margin:-.15rem -.25rem;border:0;background:transparent;font:inherit;color:inherit;cursor:pointer;border-radius:var(--sm-radius-sm);transition:background .12s ease-out,color .12s ease-out}.files__sort-btn--num[_ngcontent-%COMP%]{justify-content:flex-end}.files__sort-btn[_ngcontent-%COMP%]:hover{background:var(--sm-bg-hover)}.files__sort-btn[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--p-primary-color);outline-offset:-2px}.files__sort-btn--active[_ngcontent-%COMP%]{color:var(--p-primary-color);font-weight:600}.files__sort-icon[_ngcontent-%COMP%]{font-size:var(--files-fs-xs);color:var(--p-text-muted-color);opacity:.5;flex-shrink:0}.files__sort-btn--active[_ngcontent-%COMP%] .files__sort-icon[_ngcontent-%COMP%]{color:var(--p-primary-color);opacity:1}.files__tree-head[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}.files__tree-head[_ngcontent-%COMP%] .files__sort-btn[_ngcontent-%COMP%]{flex:1 1 auto;width:auto}.files__tree-actions[_ngcontent-%COMP%]{display:inline-flex;flex:0 0 auto;gap:.1rem}.files__tree-action[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:1.4rem;height:1.4rem;padding:0;border:0;background:transparent;border-radius:var(--sm-radius-sm);color:var(--p-text-muted-color);cursor:pointer;transition:background .12s ease-out,color .12s ease-out}.files__tree-action[_ngcontent-%COMP%]:hover{background:var(--sm-bg-hover);color:var(--p-text-color)}.files__tree-action[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--p-primary-color);outline-offset:-2px}.files__tree-action[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:var(--files-fs-xs)}.files__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:[Fh("rowSlide",[ns(":enter",[ur({opacity:0,transform:"translateY(-12px)"}),ts("200ms ease-out",ur({opacity:1,transform:"translateY(0)"}))]),ns(":leave",[ts("160ms ease-in",ur({opacity:0,transform:"translateY(-12px)"}))])])]},changeDetection:0})}return t})();var Mi=class{constructor(i,e,n,o,r){this.center=i,this.radiusX=e,this.radiusY=n,this.startAngle=o,this.endAngle=r}},q=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}},fe=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=q.sum(this,i);return t.fromPoint(e)}sub(i){let e=q.sub(this,i);return t.fromPoint(e)}subNumber(i){let e=q.sub(this,new t(i,i));return t.fromPoint(e)}div(i){let e=q.div(this,i);return t.fromPoint(e)}mult(i){let e=q.mult(this,i);return t.fromPoint(e)}matrixTransform(i){let e=q.matrixTransform(this,i);return t.fromPoint(e)}elementTransform(i){let e=q.elementTransform(this,i);return t.fromPoint(e)}},br=class{static initialize(i=q.initialize(),e=q.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))}},Di=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=q.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=q.sub(i,q.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 cy(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 am(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 dy(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=q.initialize(),this.gravityCenter=this.calculateGravityCenter(this)}calculateGravityCenter(i){return new fe(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}},St=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 DL(){return{position:q.initialize(),scaledPosition:q.initialize(),scale:1,rotate:0}}function EL(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:q.initialize(),scale:Number(e[0]),rotate:0}}return i}var ei=class{static toString(i){let e=q.sum(i.position,i.scaledPosition);return`matrix(${i.scale}, 0, 0, ${i.scale}, ${e.x}, ${e.y})`}static fromString(i){return EL(i)}static default(){return DL()}},Lt=class t{static initialize(i=0,e=0){return q.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}},rm=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,d=i.x+i.width-i.radius2,f=i.y+i.radius2,g=i.x+i.width-i.radius3,y=i.y+i.height-i.radius3,T=i.x+i.radius4,w=i.y+i.height-i.radius4;return[new Mi({x:s,y:c},i.radius1,i.radius1,2*e,3*e),new Di({x:s,y:o},{x:d,y:o}),new Mi({x:d,y:f},i.radius2,i.radius2,3*e,4*e),new Di({x:r,y:f},{x:r,y}),new Mi({x:g,y},i.radius3,i.radius3,0,e),new Di({x:g,y:a},{x:T,y:a}),new Mi({x:T,y:w},i.radius4,i.radius4,e,2*e),new Di({x:n,y:w},{x:n,y:c})]}},_o=class{static getRoundedRectIntersections(i,e,n){let o=rm.parseRoundedRect(n);for(let r of o)if(r instanceof Mi){let a=this.intersectArcWithLine(r,i,e);if(a.length>0)return a}else if(r instanceof Di){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,d=(-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 d>=0&&d<=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(Lt.angle(Lt.initialize(1,0),Lt.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=Lt.initialize(o.x,o.y),s=Lt.fromPoints(o,r),c=Lt.initialize(i.x,i.y),d=Lt.subtract(a,c),f=Lt.initialize(s.x/(e*e),s.y/(n*n)),g=Lt.initialize(d.x/(e*e),d.y/(n*n)),y=Lt.dotProduct(s,f),T=Lt.dotProduct(s,g),w=Lt.dotProduct(d,g)-1,N=T*T-y*w;return N<0?[]:this.calculateIntersectionPoints(N,y,T,o,r)}static calculateIntersectionPoints(i,e,n,o,r){let a=[];if(i>0){let s=Math.sqrt(i),c=(-n-s)/e,d=(-n+s)/e;c>=0&&c<=1&&a.push(q.interpolatePoints(o,r,c)),d>=0&&d<=1&&a.push(q.interpolatePoints(o,r,d))}else{let s=-n/e;s>=0&&s<=1&&a.push(q.interpolatePoints(o,r,s))}return a}};var sm=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 sm;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=C({token:V,factory:V.\u0275fac});function P(t){return function(i){V.registerPipeline(t,i,!1)}}var PL=(()=>{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=C({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),RL=(()=>{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=C({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),OL=new _e("F_LOCAL_STORAGE",{providedIn:"root",factory:()=>Gt(p(Ua))?p(PL):p(RL)}),FL=(()=>{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=C({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),NL=(()=>{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=C({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),AL=new _e("F_WINDOW",{providedIn:"root",factory:()=>Gt(p(Ua))?p(FL):p(NL)}),ti=(function(t){return t.MAC_OS="macos",t.IOS="ios",t.WINDOWS="windows",t.ANDROID="android",t.LINUX="linux",t})(ti||{}),lm;try{lm=typeof Intl<"u"&&Intl.v8BreakIterator}catch{lm=!1}var cm=(()=>{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||lm)&&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?Gt(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=ti.MAC_OS:this.IOS?r=ti.IOS:o.test(e)?r=ti.WINDOWS:this.ANDROID?r=ti.ANDROID:!r&&/linux/.test(e)&&(r=ti.LINUX),r}static \u0275fac=function(n){return new(n||t)(eo(Ua))};static \u0275prov=C({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)(eo(ja),eo(AL),eo(OL),eo(cm))};static \u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function dm(t,i){return t.reduce((e,n)=>[...e,...i(n)],[])}function um(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"?fy(t,i):(n==="input"||n==="select"||n==="textarea")&&py(t,i),uy("canvas",t,i,fy),uy("input, textarea, select",t,i,py),i}function uy(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 LL=0;function py(t,i){i.type!=="file"&&(i.value=t.value),i.type==="radio"&&i.name&&(i.name=`mat-clone-${i.name}-${LL++}`)}function fy(t,i){let e=i.getContext("2d");if(e)try{e.drawImage(t,0,0)}catch{}}function pm(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 hy(t){pm(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 my(t,i,e){return BL(t,e).dataset[i]}function BL(t,i){return t.closest(i)}function fm(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 yr(t,i){let e=VL(t,i);return!!e&&!e.classList.contains(i+"-disabled")}function VL(t,i){return t.closest(i)}function An(t){return t.match(/^[a-zA-Z_]/)||(t="_"+t),t.replace(/[^a-zA-Z0-9_\-:.]/g,"_")}function go(t,i,e){let n=e[t.toUpperCase()]||zL(e,t.toLowerCase());if(n===void 0)throw new Error(`Unknown ${i}: ${t}. Accepted values: ${Object.keys(e).join(", ")}`);return n}function zL(t,i){return Object.keys(t).find(e=>t[e]===i)}var HL=["markerElement"],qL=["fConnectionGradientRenderer",""],GL=["f-connection-path",""],jL=["fConnectionSelection",""],UL=["f-connection-drag-handle-start",""],$L=["f-connection-drag-handle-end",""],WL=["defs"],KL=["*"],YL=["fGroupsContainer"],XL=["fNodesContainer"],ZL=["fConnectionsContainer"],QL=[[["","fGroup",""],["","fGroups",""]],[["f-snap-connection"]],[["f-connection"],["","fConnections",""]],[["f-connection-for-create"]],[["","fNode",""],["","fNodes",""]]],JL=["[fGroup], [fGroups]","f-snap-connection","f-connection, [fConnections]","f-connection-for-create","[fNode], [fNodes]"];function e5(t,i){t&1&&(Q(0,"div",3,0),$e(2),ie())}function t5(t,i){t&1&&(Q(0,"div",4,1),$e(2,1),$e(3,2),$e(4,3),ie())}function n5(t,i){t&1&&(Q(0,"div",5,2),$e(2,4),ie())}function i5(t,i){if(t&1&&M(0,e5,3,0,"div",3)(1,t5,5,0,"div",4)(2,n5,3,0,"div",5),t&2){let e,n=i.$implicit;D((e=n)==="groups"?0:e==="connections"?1:e==="nodes"?2:-1)}}var o5=[[["svg","fMarker",""]],[["f-connection-marker-circle"],["f-connection-marker-arrow"]],[["f-connection-gradient"]],[["f-connection-waypoints"]],[["","fConnectionContent",""]]],r5=["svg[fMarker]","f-connection-marker-circle, f-connection-marker-arrow","f-connection-gradient","f-connection-waypoints","[fConnectionContent]"];function a5(t,i){t&1&&(Z(),F(0,"linearGradient",3)),t&2&&_("fConnectionGradientRendererFor",i)}function s5(t,i){t&1&&(Z(),F(0,"circle",6))}function l5(t,i){t&1&&$e(0,4)}var c5="[_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}",d5=[[["","fDefinitions",""]],[["f-background"]],[["f-line-alignment"]],[["f-canvas"]],[["f-selection-area"]],"*"],u5=["[fDefinitions]","f-background","f-line-alignment","f-canvas","f-selection-area","*"],vm=new _e("F_BACKGROUND_PATTERN"),Kd=class{fPattern;static fToken=Symbol("AddPatternToBackgroundRequest");constructor(i){this.fPattern=i}},xo=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 Ei(t){return{name:t}}var bm=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()}},xr=class extends xo{kind;constructor(i){super(),this.kind=i}},ym=class extends xo{kind="Connection Marker"},Cm=class extends xo{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}},xm=class extends xo{kind="Node"},bo=class{notifyOnSubscribe;static fToken=Symbol("ListenConnectionsChangesRequest");constructor(i=!0){this.notifyOnSubscribe=i}};function p5(){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 f5(){return t=>{let i=null;return{callback:()=>{i!==null&&cancelAnimationFrame(i),i=requestAnimationFrame(()=>{i=null,t()})},cleanup:()=>{i!==null&&cancelAnimationFrame(i),i=null}}}}function Yd(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 sn=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)}},wm=class extends sn{_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}},Sn=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 y=g(n);n=y.callback,y.cleanup&&o.push(y.cleanup),y.onSubscribe&&r.push(y.onSubscribe),y.setTeardown&&a.push(y.setTeardown)}let s=this._channels.map(g=>g.listen(()=>n())),c=null,d=!1,f=()=>{d||(d=!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 Df(){return t=>{let i=!0;return{callback:t,onSubscribe:e=>{queueMicrotask(()=>{i&&e()})},cleanup:()=>{i=!1}}}}function _y(){return t=>{let i=!1,e=null;return{setTeardown:n=>e=n,callback:()=>{if(!i){i=!0;try{t()}finally{e?.()}}}}}}var h5=(()=>{let t=class Ts{_store=p(L);handle({notifyOnSubscribe:e}){return e?new Sn(this._store.connectionsChanges$).pipe(Df(),Yd(1)):new Sn(this._store.connectionsChanges$).pipe(Yd(1))}static \u0275fac=function(n){return new(n||Ts)};static \u0275prov=C({token:Ts,factory:Ts.\u0275fac})};return t=E([P(bo)],t),t})(),Tm=class{static fToken=Symbol("ListenNodesChangesRequest")},m5=(()=>{let t=class Ss{_store=p(L);handle(e){return new Sn(this._store.nodesChanges$)}static \u0275fac=function(n){return new(n||Ss)};static \u0275prov=C({token:Ss,factory:Ss.\u0275fac})};return t=E([P(Tm)],t),t})(),Xd=class{static fToken=Symbol("ListenTransformChangesRequest")},_5=(()=>{let t=class ks{_store=p(L);handle(e){return new Sn(this._store.transformChanges$,this._store.connectionsChanges$,this._store.nodesChanges$)}static \u0275fac=function(n){return new(n||ks)};static \u0275prov=C({token:ks,factory:ks.\u0275fac})};return t=E([P(Xd)],t),t})(),Pi=class{static fToken=Symbol("EmitConnectionsChangesRequest")},g5=(()=>{let t=class Is{_store=p(L);handle(e){this._store.emitConnectionChanges()}static \u0275fac=function(n){return new(n||Is)};static \u0275prov=C({token:Is,factory:Is.\u0275fac})};return t=E([P(Pi)],t),t})(),ri=class{static fToken=Symbol("NotifyTransformChangedRequest")},L=(()=>{class t{transformChanges$=new sn;viewportAnimationChanges$=new sn;connectionsChanges$=new sn;_connectionsRevision=0;connectionsRenderedChanges$=new sn;_connectionsRenderedRevision=0;_connectionsRenderedNodesRevision=0;_viewportAnimationCount=0;nodesChanges$=new sn;_nodesRevision=0;progressiveRenderChanges$=new sn;_pendingProgressiveRenderCount=0;get connectionsRevision(){return this._connectionsRevision}get connectionsRenderedRevision(){return this._connectionsRenderedRevision}get connectionsRenderedNodesRevision(){return this._connectionsRenderedNodesRevision}get nodesRevision(){return this._nodesRevision}get hasPendingProgressiveRender(){return this._pendingProgressiveRenderCount>0}get isViewportAnimating(){return this._viewportAnimationCount>0}get flowHost(){return this.fFlow?.hostElement}fFlow;fCanvas;get transform(){return this.fCanvas?.transform}nodes=new xm;connections=new Cm;connectionMarkers=new ym;outputs=new xr("Output");inputs=new xr("Input");outlets=new xr("Outlet");instances=new bm;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=C({token:t,factory:t.\u0275fac})}return t})(),Ye={MAGNETIC_LINES:Ei("magnetic-lines"),MAGNETIC_RECTS:Ei("magnetic-rects"),ZOOM:Ei("zoom-controls"),BACKGROUND:Ei("background"),SELECTION_AREA:Ei("selection-area"),MINIMAP:Ei("minimap"),AUTO_PAN:Ei("auto-pan")},v5=(()=>{let t=class Ms{_store=p(L);handle(e){this._store.transformChanged()}static \u0275fac=function(n){return new(n||Ms)};static \u0275prov=C({token:Ms,factory:Ms.\u0275fac})};return t=E([P(ri)],t),t})(),ai=class{key;instance;static fToken=Symbol("RegisterPluginInstanceRequest");constructor(i,e){this.key=i,this.instance=e}},b5=(()=>{let t=class Ds{_store=p(L);handle({key:e,instance:n}){this._store.instances.add(e,n)}static \u0275fac=function(n){return new(n||Ds)};static \u0275prov=C({token:Ds,factory:Ds.\u0275fac})};return t=E([P(ai)],t),t})(),si=class{key;static fToken=Symbol("RemovePluginInstanceRequest");constructor(i){this.key=i}},y5=(()=>{let t=class Es{_store=p(L);handle({key:e}){this._store.instances.remove(e)}static \u0275fac=function(n){return new(n||Es)};static \u0275prov=C({token:Es,factory:Es.\u0275fac})};return t=E([P(si)],t),t})(),C5=[L,m5,h5,_5,g5,v5,b5,y5],x5=0,w5=(()=>{let t=class Ps{_store=p(L);_browser=p(at);get _backgroundElement(){return this._store.instances.get(Ye.BACKGROUND)?.hostElement}handle(e){let n=this._getPatterns(e.fPattern?.hostElement);if(!n?.length)return;let o=Co("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-"+x5++;let r=n[n.length-1].id,a=Co("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||ei.default();e.fPattern?.setTransform(s)}}_getPatterns(e){return Array.from(e?.getElementsByTagName("pattern")||[])}static \u0275fac=function(n){return new(n||Ps)};static \u0275prov=C({token:Ps,factory:Ps.\u0275fac})};return t=E([P(Kd)],t),t})(),Sr=class{fTransform;static fToken=Symbol("SetBackgroundTransformRequest");constructor(i){this.fTransform=i}},T5=(()=>{let t=class Rs{_store=p(L);handle(e){this._store.instances.get(Ye.BACKGROUND)?.setTransform(e.fTransform)}static \u0275fac=function(n){return new(n||Rs)};static \u0275prov=C({token:Rs,factory:Rs.\u0275fac})};return t=E([P(Sr)],t),t})(),S5=[w5,T5],Zd=class{instance;static fToken=Symbol("AddCanvasToStoreRequest");constructor(i){this.instance=i}},k5=(()=>{let t=class Os{_store=p(L);handle({instance:e}){this._store.fCanvas=e}static \u0275fac=function(n){return new(n||Os)};static \u0275prov=C({token:Os,factory:Os.\u0275fac})};return t=E([P(Zd)],t),t})(),Qd=class{id;animated;static fToken=Symbol("CenterGroupOrNodeRequest");constructor(i,e){this.id=i,this.animated=e}},I5=(()=>{let t=class Fs{_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 wo(n,Ri.VIEWPORT_ONLY)))}_toCenter(e,n,o){this._transform.scaledPosition=q.initialize(),this._transform.position=q.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||Fs)};static \u0275prov=C({token:Fs,factory:Fs.\u0275fac})};return t=E([P(Qd)],t),t})(),Jd=class{toCenter;animated;static fToken=Symbol("FitToFlowRequest");constructor(i,e){this.toCenter=i,this.animated=e}},M5=(()=>{let t=class Ns{_store=p(L);get _transform(){return this._store.transform}_mediator=p(V);handle({toCenter:e,animated:n}){let o=this._mediator.execute(new Po)||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 wo(n,Ri.VIEWPORT_ONLY)))}fitToParent(e,n,o,r){this._transform.scaledPosition=q.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,d=(n.height-s*this._transform.scale)/2-this._transform.position.y*this._transform.scale;this._transform.position=q.initialize(c+r.x/2*this._transform.scale,d+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 q.initialize(n,o)}static \u0275fac=function(n){return new(n||Ns)};static \u0275prov=C({token:Ns,factory:Ns.\u0275fac})};return t=E([P(Jd)],t),t})(),eu=class{transform;position;static fToken=Symbol("InputCanvasPositionRequest");constructor(i,e){this.transform=i,this.position=e}},D5=(()=>{let t=class As{_store=p(L);handle({transform:e,position:n}){n&&(q.isEqual(this._calculateTransformPosition(e),n)||(e.position=n,e.scaledPosition=q.initialize(),this._store.fCanvas?.redraw()))}_calculateTransformPosition(e){return q.sum(e.position,e.scaledPosition)}static \u0275fac=function(n){return new(n||As)};static \u0275prov=C({token:As,factory:As.\u0275fac})};return t=E([P(eu)],t),t})(),tu=class{transform;scale;static fToken=Symbol("InputCanvasScaleRequest");constructor(i,e){this.transform=i,this.scale=e}},E5=(()=>{let t=class Ls{_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||Ls)};static \u0275prov=C({token:Ls,factory:Ls.\u0275fac})};return t=E([P(tu)],t),t})(),Ri=(function(t){return t.VIEWPORT_ONLY="VIEWPORT_ONLY",t.WITH_CONNECTION_CHANGES="WITH_CONNECTION_CHANGES",t})(Ri||{}),wo=class{animated;context;static fToken=Symbol("RedrawCanvasWithAnimationRequest");constructor(i,e=Ri.WITH_CONNECTION_CHANGES){this.animated=i,this.context=e}};function Uy(t,i){let e=n=>{n.propertyName==="transform"&&(t.removeEventListener("transitionend",e),i(n))};t.addEventListener("transitionend",e)}var P5=(()=>{let t=class Bs{_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(),Uy(this._canvas.hostElement,()=>{this._store.endViewportAnimation(),e===Ri.WITH_CONNECTION_CHANGES&&this._store.emitConnectionChanges()})}_redraw(e){this._canvas?.redraw(),e===Ri.WITH_CONNECTION_CHANGES&&this._store.emitConnectionChanges()}static \u0275fac=function(n){return new(n||Bs)};static \u0275prov=C({token:Bs,factory:Bs.\u0275fac})};return t=E([P(wo)],t),t})(),nu=class{static fToken=Symbol("RemoveCanvasFromStoreRequest")},R5=(()=>{let t=class Vs{_store=p(L);handle(e){this._store.fCanvas=void 0}static \u0275fac=function(n){return new(n||Vs)};static \u0275prov=C({token:Vs,factory:Vs.\u0275fac})};return t=E([P(nu)],t),t})(),iu=class{static fToken=Symbol("ResetScaleRequest")},O5=(()=>{let t=class zs{_store=p(L);get _transform(){return this._store.transform}handle(e){this._transform.scale=1,this._transform.scaledPosition=q.initialize()}static \u0275fac=function(n){return new(n||zs)};static \u0275prov=C({token:zs,factory:zs.\u0275fac})};return t=E([P(iu)],t),t})(),ou=class{animated;static fToken=Symbol("ResetScaleAndCenterRequest");constructor(i){this.animated=i}},F5=(()=>{let t=class Hs{_mediator=p(V);_store=p(L);get _transform(){return this._store.transform}handle({animated:e}){let n=this._mediator.execute(new Po)||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 wo(e,Ri.VIEWPORT_ONLY)))}_oneToOneCentering(e,n,o){this._transform.scaledPosition=q.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=q.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 q.initialize(n,o)}static \u0275fac=function(n){return new(n||Hs)};static \u0275prov=C({token:Hs,factory:Hs.\u0275fac})};return t=E([P(ou)],t),t})(),ru=class{scale;toPosition;static fToken=Symbol("UpdateScaleRequest");constructor(i,e){this.scale=i,this.toPosition=e}},N5=(()=>{let t=class qs{_store=p(L);get _transform(){return this._store.transform}handle({scale:e,toPosition:n}){if(e===this._transform.scale)return;let o=q.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=q.sub(q.initialize(r,a),this._transform.position)}static \u0275fac=function(n){return new(n||qs)};static \u0275prov=C({token:qs,factory:qs.\u0275fac})};return t=E([P(ru)],t),t})(),A5=[k5,I5,M5,D5,E5,P5,R5,O5,F5,N5],Sm=class{connection;static fToken=Symbol("AddConnectionForCreateToStoreRequest");constructor(i){this.connection=i}},L5=(()=>{let t=class Gs{_store=p(L);handle({connection:e}){this._store.connections.addForCreate(e)}static \u0275fac=function(n){return new(n||Gs)};static \u0275prov=C({token:Gs,factory:Gs.\u0275fac})};return t=E([P(Sm)],t),t})(),au=class{instance;static fToken=Symbol("AddConnectionMarkerToStoreRequest");constructor(i){this.instance=i}},B5=(()=>{let t=class js{_store=p(L);handle({instance:e}){this._store.connectionMarkers.add(e),this._store.emitNodeChanges()}static \u0275fac=function(n){return new(n||js)};static \u0275prov=C({token:js,factory:js.\u0275fac})};return t=E([P(au)],t),t})(),su=class{connection;static fToken=Symbol("AddConnectionToStoreRequest");constructor(i){this.connection=i}},V5=(()=>{let t=class Us{_store=p(L);handle({connection:e}){this._store.connections.add(e),this._store.emitConnectionChanges()}static \u0275fac=function(n){return new(n||Us)};static \u0275prov=C({token:Us,factory:Us.\u0275fac})};return t=E([P(su)],t),t})(),km=class{connection;static fToken=Symbol("AddSnapConnectionToStoreRequest");constructor(i){this.connection=i}},z5=(()=>{let t=class $s{_store=p(L);handle({connection:e}){this._store.connections.addForSnap(e)}static \u0275fac=function(n){return new(n||$s)};static \u0275prov=C({token:$s,factory:$s.\u0275fac})};return t=E([P(km)],t),t})(),To=class{connection;static fToken=Symbol("CreateConnectionMarkersRequest");constructor(i){this.connection=i}},gy=new _e("F_CONNECTION_CONTENT");var lu=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 d=this.points[c+1].x-this.points[c].x,f=this.points[c+1].y-this.points[c].y,g=Math.hypot(d,f),y=g?d/g:1,T=g?f/g:0;a[c]={x:y,y:T},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}},Im=class t{_polyline;constructor(i=[]){this._polyline=new lu(i)}updatePoints(i){return this._polyline=new lu(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 X=e.length-1;return{point:e[X],tangent:o[X-1]??{x:1,y:0},atEdge:!0}}let d=t._findRightIndex(n,s),f=Math.max(1,d),g=n[f-1],y=n[f],T=t._safeRatio(s-g,y-g),w=e[f-1],N=e[f],H={x:t._lerp(w.x,N.x,T),y:t._lerp(w.y,N.y,T)},G=o[f-1]??{x:1,y:0};return{point:H,tangent:G,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}},$y=(function(t){return t.NONE="none",t.ALONG="along",t})($y||{}),Mm=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,d=o.y+a.y*s,g=this._sizeAlongDirection(e,r)*.5,y=n*i.totalLength,T=i.totalLength-y,w=this._applyEdgeGuard(c,d,r,y,T,g),N=this._calculateContentRotation(e.align(),r);return{position:w,rotationDeg:N}}_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=i.measureSize();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===$y.ALONG&&(n=Math.atan2(e.y,e.x)*180/Math.PI,n=this._keepUpright(n)),n}},Dm=class{_placement;constructor(i=new Mm){this._placement=i}layout(i,e){let n=new Im(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 vy=new _e("F_CONNECTION_WAYPOINTS");function Wy(t,i,e){return(t.x-i.x)**2+(t.y-i.y)**2<=e**2}function H5(t,i){let e=t.fWaypoints(),n=e?.radius()||8;return e?.candidates().find(o=>Wy(i,o,n))}function q5(t,i){let e=t.fWaypoints(),n=e?.radius()||8;return e?.waypoints().find(o=>Wy(i,o,n))}function G5(t,i){for(let e of t){let n=q5(e,i);if(n&&e.fWaypoints()?.visibility())return{connection:e,waypoint:n};let o=H5(e,i);if(o&&e.fWaypoints()?.visibility())return{connection:e,candidate:o}}}var Ef=new _e("F_CONNECTION_COMPONENTS_PARENT");var Ve=(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})(Ve||{}),cu=new _e("F_CONNECTION_MARKER"),j5=0,du=class{fId=W(`f-marker-${j5++}`);hostElement=p(Ze).nativeElement};function Ky(t,i=Ve.START){if(typeof t!="string")return i;let e=t.trim().toLowerCase();return e?U5(e)??i:i}function U5(t){switch(t){case"start":case"f-connection-marker-start":return Ve.START;case"end":case"f-connection-marker-end":return Ve.END;case"selected-start":case"f-connection-selected-marker-start":return Ve.SELECTED_START;case"selected-end":case"f-connection-selected-marker-end":return Ve.SELECTED_END;case"start-all-states":case"f-connection-marker-start-all-states":case"start-all":case"all-start":return Ve.START_ALL_STATES;case"end-all-states":case"f-connection-marker-end-all-states":case"end-all":case"all-end":return Ve.END_ALL_STATES;default:return null}}var Yy=(()=>{class t extends du{_markerElement=it.required("markerElement");_type=B(Ve.END_ALL_STATES,{alias:"type",transform:e=>Ky(e,Ve.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=$(t)))(o||t)}})();static \u0275cmp=z({type:t,selectors:[["f-connection-marker-arrow"]],viewQuery:function(n,o){n&1&&hn(o._markerElement,HL,5),n&2&&Ht()},hostAttrs:[1,"f-component",2,"display","none"],inputs:{_type:[1,"type","_type"]},features:[Ee([{provide:cu,useExisting:t}]),J],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&&(Z(),Q(0,"svg",1,0),oe(2,"path",2),ie())},encapsulation:2})}return t})();var Xy=(()=>{class t extends du{_mediator=p(V);markerElement=this.hostElement;width=0;height=0;refX=0;refY=0;type=Ve.START;orient="auto";markerUnits="strokeWidth";ngOnInit(){this.hostElement.style.display="none",this._mediator.execute(new au(this))}ngOnDestroy(){this._mediator.execute(new Ou(this))}static \u0275fac=(()=>{let e;return function(o){return(e||(e=$(t)))(o||t)}})();static \u0275dir=Ue({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=>Ky(e,Ve.START)],orient:"orient",markerUnits:"markerUnits"},standalone:!1,features:[Ee([{provide:cu,useExisting:t}]),J]})}return t})(),ii=(function(t){return t.FIXED="fixed",t.FIXED_CENTER="fixed_center",t.FLOATING="floating",t})(ii||{}),Ke=(function(t){return t.DEFAULT="default",t.TOP="top",t.BOTTOM="bottom",t.LEFT="left",t.RIGHT="right",t.CALCULATE="calculate",t.CALCULATE_HORIZONTAL="calculate_horizontal",t.CALCULATE_VERTICAL="calculate_vertical",t})(Ke||{});function $5({sourceRect:t,targetRect:i}){return{point1:t.gravityCenter,point2:i.gravityCenter}}var U=(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})(U||{}),vo=(function(t){return t.SEGMENT="segment",t.STRAIGHT="straight",t.BEZIER="bezier",t.ADAPTIVE_CURVE="adaptive-curve",t})(vo||{});function W5({sourceRect:t,sourceConnectableSide:i,targetRect:e,targetConnectableSide:n}){return{point1:by(t,i===U.AUTO?U.BOTTOM:i),point2:by(e,n===U.AUTO?U.TOP:n)}}function by(t,i){switch(i){case U.TOP:return{x:t.x+t.width/2,y:t.y};case U.BOTTOM:return{x:t.x+t.width/2,y:t.y+t.height};case U.LEFT:return{x:t.x,y:t.y+t.height/2};case U.RIGHT:return{x:t.x+t.width,y:t.y+t.height/2};default:throw new Error(`Unknown side: ${i}`)}}function Zy(t,i,e,n){if(!n||!n.rotationDeg)return _o.getRoundedRectIntersections(t,i,e)[0];let o=Ws(t,-n.rotationDeg,n.pivot),r=Ws(i,-n.rotationDeg,n.pivot),a=K5(e,-n.rotationDeg,n.pivot),s=_o.getRoundedRectIntersections(o,r,a)[0];return s?Ws(s,n.rotationDeg,n.pivot):void 0}function K5(t,i,e){let n=Ws(Y5(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 Y5(t){return{x:t.x+t.width/2,y:t.y+t.height/2}}function Ws(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 X5({sourceRect:t,targetRect:i,sourceRotationContext:e,targetRotationContext:n}){return J5(Z5(t,i,e),Q5(t,i,n),t,i)}function Z5(t,i,e){return Zy(t.gravityCenter,i.gravityCenter,t,e)}function Q5(t,i,e){return Zy(i.gravityCenter,t.gravityCenter,i,e)}function J5(t,i,e,n){return{point1:t||e.gravityCenter,point2:i||n.gravityCenter}}var Cs=.5,e6={[ii.FLOATING]:X5,[ii.FIXED_CENTER]:$5,[ii.FIXED]:W5},Lo=(()=>{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===Ke.DEFAULT)return r;let a=Math.abs(n),s=Math.abs(o);if(a<Cs&&s<Cs)return r;let d=a>=s;switch(e){case Ke.CALCULATE:return d?n>=0?U.RIGHT:U.LEFT:o>=0?U.BOTTOM:U.TOP;case Ke.CALCULATE_HORIZONTAL:return a<Cs?r:n>=0?U.RIGHT:U.LEFT;case Ke.CALCULATE_VERTICAL:return s<Cs?r:o>=0?U.BOTTOM:U.TOP;case Ke.TOP:return U.TOP;case Ke.BOTTOM:return U.BOTTOM;case Ke.LEFT:return U.LEFT;case Ke.RIGHT:return U.RIGHT;default:return r}}_getBehaviorHandler(e){let n=e6[e];if(!n)throw new Error(`[Behavior] No handler for behavior: ${e}`);return n}static \u0275fac=function(n){return new(n||t)};static \u0275prov=C({token:t,factory:t.\u0275fac})}return t})(),bn=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 Pf(t,i,e){return[t,...e??[],i]}function t6(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 n6(t,i=32){let e=new Array(i+1);e[0]=me({},t[0]);for(let n=1;n<=i;n++)e[n]=Qy(t[0],t[1],t[2],t[3],n/i);return e}function Qy(t,i,e,n,o){let r=1-o,a=o*o,s=r*r,c=s*r,d=a*o;return{x:c*t.x+3*s*o*i.x+3*r*a*e.x+d*n.x,y:c*t.y+3*s*o*i.y+3*r*a*e.y+d*n.y}}function Jy(t){return t.map(i=>Qy(i.p0,i.c1,i.c2,i.p3,.5))}function i6(t){if(t.length<2)throw new Error("Polylines must be at least two points");let i=o6(t);return i<=0?[me({},t[0])]:[r6(t,i/2)]}function o6(t){let i=0;for(let e=0;e<t.length-1;e++)i+=eC(t[e],t[e+1]);return i}function r6(t,i){let e=0;for(let o=0;o<t.length-1;o++){let r=t[o],a=t[o+1],s=eC(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 eC(t,i){return Math.hypot(i.x-t.x,i.y-t.y)}function a6(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 tC(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 nC(t,i=16){if(!t.length)return[];let e=[];for(let n=0;n<t.length;n++){let o=t[n],r=n6([o.p0,o.c1,o.c2,o.p3],i);n>0&&r.shift(),e.push(...r)}return e}function s6(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],d=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;!d&&!f&&o.push(s)}return o.push(n[n.length-1]),o}var Em=class t{static _dir(i){switch(i){case U.LEFT:return{x:-1,y:0};case U.RIGHT:return{x:1,y:0};case U.TOP:return{x:0,y:-1};case U.BOTTOM:return{x:0,y:1};case U.AUTO:return{x:0,y:0}}return{x:0,y:0}}static _isHorizontal(i){return i===U.LEFT||i===U.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===U.AUTO?Math.max(r,a):this._isHorizontal(n)?r:a,d=Math.max(8,o),f=o+.5*s,g=o*1.05+c*.3;return Math.min(f,Math.max(d,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,d=a/c,f=s/c;if(i===U.AUTO)return{x:e.x+d*o,y:e.y+f*o};let g=r.x*d+r.y*f,y=.12,T=Math.max(0,-g)*.08,w=Math.min(.2,y+T),N=r.x*(1-w)+d*w,H=r.y*(1-w)+f*w,G=Math.hypot(N,H)||1;return{x:e.x+N/G*o,y:e.y+H/G*o}}handle({source:i,sourceSide:e,target:n,targetSide:o,offset:r,waypoints:a}){let s=Math.max(0,r??0),c=Pf(i,n,a),d=[];for(let g=0;g<c.length-1;g++){let y=c[g],T=c[g+1],w=t._handleLength(y,T,e,s),N=t._handleLength(T,y,o,s),H=t._softControl(e,y,T,w),G=t._softControl(o,T,y,N);d.push({p0:y,c1:H,c2:G,p3:T,chainIndex:g})}let f=nC(d,12);return{path:tC(d),secondPoint:d[0]?.c1??i,penultimatePoint:d[d.length-1]?.c2??n,points:f,candidates:Jy(d)}}},Pm=class{handle({source:i,sourceSide:e,target:n,targetSide:o,offset:r,waypoints:a}){let s=Pf(i,n,a),c=[];for(let f=0;f<s.length-1;f++){let g=s[f],y=s[f+1],T=yy(e,g,y,r??0),w=yy(o,y,g,r??0);c.push({p0:g,c1:T,c2:w,p3:y,chainIndex:f})}let d=nC(c,12);return{path:tC(c),secondPoint:c[0]?.c1??i,penultimatePoint:c[c.length-1]?.c2??n,points:d,candidates:Jy(c)}}};function yy(t,i,e,n){let o={x:i.x,y:i.y};switch(t){case U.LEFT:o.x-=xs(i.x-e.x,n);break;case U.RIGHT:o.x+=xs(e.x-i.x,n);break;case U.TOP:o.y-=xs(i.y-e.y,n);break;case U.BOTTOM:o.y+=xs(e.y-i.y,n);break;case U.AUTO:break}return o}function xs(t,i){return t>=i?t:i*Math.sqrt(i-t)}function l6(t){let{axis:i,source:e,target:n,sourceSide:o,targetSide:r,sourceGap:a,targetGap:s,sourceDir:c,targetDir:d,currentDir:f,offset:g,sourceGapOffset:y,targetGapOffset:T}=t,w=c6(a,s),N=d6(i,c,f,w);return o===r?u6(i,e,n,g,c,f,a,s,y,T):N=p6(i,c,d,a,s,w,N),N}function c6(t,i){return{sourceTarget:[{x:t.x,y:i.y}],targetSource:[{x:i.x,y:t.y}]}}function d6(t,i,e,n){return t==="x"?i.x===e?n.targetSource:n.sourceTarget:i.y===e?n.sourceTarget:n.targetSource}function u6(t,i,e,n,o,r,a,s,c,d){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:d[t]=(s[t]>e[t]?-1:1)*g)}function p6(t,i,e,n,o,r,a){let s=t==="x"?"y":"x",c=i[t]===e[s],d=n[s]>o[s],f=n[s]<o[s];return i[t]===1&&(!c&&d||c&&f)||i[t]!==1&&(!c&&f||c&&d)?t==="x"?r.sourceTarget:r.targetSource:a}var Cr=1e-6,Cy=2e-4,f6=.75;function h6(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(m6(t[r-1],t[r],t[r+1],i));let o=t[e-1];return n.push(`L ${o.x+Cy} ${o.y+Cy}`),n.join(" ")}function m6(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)<=Cr&&Math.abs(o-e.x)<=Cr,s=Math.abs(t.y-r)<=Cr&&Math.abs(r-e.y)<=Cr;if(a||s)return`L ${o} ${r}`;let c=Math.hypot(o-t.x,r-t.y),d=Math.hypot(e.x-o,e.y-r),f=Math.min(c*.5,d*.5,n);if(f<f6)return`L ${o} ${r}`;if(Math.abs(t.y-r)<=Cr){let H=t.x<e.x?-1:1,G=t.y<e.y?1:-1,X=o+f*H,le=r+f*G;return`L ${X} ${r} Q ${o} ${r} ${o} ${le}`}let y=t.x<e.x?1:-1,T=t.y<e.y?-1:1,w=r+f*T,N=o+f*y;return`L ${o} ${w} Q ${o} ${r} ${N} ${r}`}var xy={[U.LEFT]:q.initialize(-1,0),[U.RIGHT]:q.initialize(1,0),[U.TOP]:q.initialize(0,-1),[U.BOTTOM]:q.initialize(0,1),[U.AUTO]:q.initialize(0,0)},Rm=class{handle({source:i,sourceSide:e,target:n,targetSide:o,waypoints:r,offset:a,radius:s}){let c=Pf(i,n,r),d=[],f=[];for(let w=0;w<c.length-1;w++){let N=c[w],H=c[w+1],G=this._getPathPoints(N,e,H,o,a??0);d.push(G),f.push(...i6(G))}let g=s6(a6(d)),y=g.length>1?g[g.length-2]:i,T=g.length>1?g[1]:n;return{path:h6(g,s??0),penultimatePoint:y,secondPoint:T,points:g,candidates:f}}_getPathPoints(i,e,n,o,r){let a=xy[e],s=xy[o],c={x:i.x+a.x*r,y:i.y+a.y*r},d={x:n.x+s.x*r,y:n.y+s.y*r},f=this._getDirection(c,e,d),g=f.x!==0?"x":"y",y=f[g],T=[],w=q.initialize(),N=q.initialize(),H=t6(i,n);if(a[g]*s[g]===-1){let G=[{x:H.x,y:c.y},{x:H.x,y:d.y}],X=[{x:c.x,y:H.y},{x:d.x,y:H.y}];a[g]===y?T=g==="x"?G:X:T=g==="x"?X:G}else T=l6({axis:g,source:i,target:n,sourceSide:e,targetSide:o,sourceGap:c,targetGap:d,sourceDir:a,targetDir:s,currentDir:y,offset:r,sourceGapOffset:w,targetGapOffset:N});return[i,{x:c.x+w.x,y:c.y+w.y},...T,{x:d.x+N.x,y:d.y+N.y},n]}_getDirection(i,e,n){return e===U.LEFT||e===U.RIGHT?i.x<n.x?q.initialize(1,0):q.initialize(-1,0):i.y<n.y?q.initialize(0,1):q.initialize(0,-1)}},wy=2e-4,Om=class{handle(i){let e=Pf(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],d=e[s+1],f=s===n-2,g=f?d.x+wy:d.x,y=f?d.y+wy:d.y;r+=` L ${g} ${y}`,a[s]={x:(c.x+d.x)*.5,y:(c.y+d.y)*.5}}return{path:r,candidates:a,points:e,secondPoint:e[1]??i.target,penultimatePoint:e[n-2]??i.source}}},_6=new _e("F_CONNECTION_BUILDERS"),iC=(()=>{class t{_builtinBuilders={[vo.STRAIGHT]:new Om,[vo.BEZIER]:new Pm,[vo.ADAPTIVE_CURVE]:new Em,[vo.SEGMENT]:new Rm};_providedBuilders;_builders;constructor(){this._providedBuilders=p(_6,{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=C({token:t,factory:t.\u0275fac})}return t})();function g6(t,i,e){return An("connection_"+t+i+e)}function v6(t,i,e){return An("connection_for_selection_"+t+i+e)}function oC(t){return An("connection_gradient_"+t)}function b6(t){return`url(#${oC(t)})`}var y6=(()=>{class t{_connection=p(Ef);_hostElement=p(Ze).nativeElement;_injector=p(mt);_hostAttributes=new Map;_startColor;_endColor;gradientId=S(()=>oC(this._connection.fId()));ngOnInit(){this._listenColorChanges()}_listenColorChanges(){ce(()=>{this.gradient().fStartColor(),this.gradient().fEndColor(),vt(()=>{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 fe(.5-.5*n/r,.5-.5*o/r);this._setHostAttribute("x1",a.x.toString()),this._setHostAttribute("y1",a.y.toString());let s=new fe(.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=Ue({type:t})}return t})(),Fm=(()=>{class t extends y6{gradient=B.required({alias:"fConnectionGradientRendererFor"});static \u0275fac=(()=>{let e;return function(o){return(e||(e=$(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:[J],attrs:qL,decls:3,vars:0,consts:[[0,"xmlns","svg","http://www.w3.org/2000/svg"],["offset","0%"],["offset","100%"]],template:function(n,o){n&1&&(Ka(0,0),Z(),oe(1,"stop",1)(2,"stop",2),Ya())},encapsulation:2,changeDetection:0})}return t})(),Ty=new _e("F_CONNECTION_GRADIENT");var Nm=new _e("F_CONNECTION_PATH"),Am=class{hostElement=p(Ze).nativeElement},C6=(()=>{class t extends Am{_connection=p(Ef);useGradient=B(!1);linkToGradient=S(()=>this.useGradient()?b6(this._connection.fId()):null);get fPathId(){return this._connection.fId()}get attrConnectionId(){return g6(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(#${T6(this._connection.fId())})`),this.hostElement.setAttribute("marker-end",`url(#${S6(this._connection.fId())})`)}deselect(){this.hostElement.setAttribute("marker-start",`url(#${x6(this._connection.fId())})`),this.hostElement.setAttribute("marker-end",`url(#${w6(this._connection.fId())})`)}static \u0275fac=(()=>{let e;return function(o){return(e||(e=$(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:Nm,useExisting:t}]),J],attrs:GL,decls:0,vars:0,template:function(n,o){},styles:["[_nghost-%COMP%]{fill:none;pointer-events:stroke}"],changeDetection:0})}return t})();function x6(t){return An(`f-connection-marker-start-${t}`)}function w6(t){return An(`f-connection-marker-end-${t}`)}function T6(t){return An(`f-connection-selected-marker-start-${t}`)}function S6(t){return An(`f-connection-selected-marker-end-${t}`)}var Lm=new _e("F_CONNECTION_SELECTION"),Bm=class{hostElement=p(Ze).nativeElement},k6=(()=>{class t extends Bm{_connection=p(Ef);get connectionForSelectionId(){return v6(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=$(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:Lm,useExisting:t}]),J],attrs:jL,decls:0,vars:0,template:function(n,o){},styles:["[_nghost-%COMP%]{fill:none;pointer-events:stroke}"],changeDetection:0})}return t})(),Vm=new _e("F_CONNECTION_DRAG_HANDLE_END"),zm=new _e("F_CONNECTION_DRAG_HANDLE_START"),uu=class{hostElement=p(Ze).nativeElement;point=q.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}}},I6=(()=>{class t extends uu{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=$(t)))(o||t)}})();static \u0275cmp=z({type:t,selectors:[["circle","f-connection-drag-handle-start",""]],hostVars:2,hostBindings:function(n,o){n&2&&j(o.class)},standalone:!1,features:[Ee([{provide:zm,useExisting:t}]),J],attrs:UL,decls:0,vars:0,template:function(n,o){},encapsulation:2,changeDetection:0})}return t})(),M6=(()=>{class t extends uu{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=$(t)))(o||t)}})();static \u0275cmp=z({type:t,selectors:[["circle","f-connection-drag-handle-end",""]],hostVars:2,hostBindings:function(n,o){n&2&&j(o.class)},standalone:!1,features:[Ee([{provide:Vm,useExisting:t}]),J],attrs:$L,decls:0,vars:0,template:function(n,o){},encapsulation:2,changeDetection:0})}return t})(),hm="f-selected";function rC(t){return class extends t{fId=W("");fSelectionDisabled=W(!1);unmarkAsSelected(){this.unmarkChildrenAsSelected?.(),this.hostElement.classList.remove(hm)}markAsSelected(){this.markChildrenAsSelected?.(),this.isSelected()||this.hostElement.classList.add(hm)}isSelected(){return this.hostElement.classList.contains(hm)}markChildrenAsSelected(){}unmarkChildrenAsSelected(){}constructor(...i){super(...i)}}}function D6(t){return class extends t{show(){this.hostElement.style.display="unset"}hide(){this.hostElement.style.display="none"}constructor(...i){super(...i)}}}var E6=rC(D6(class{hostElement;constructor(t){this.hostElement=t}})),P6=(()=>{class t extends E6{_fConnectionBuilder=p(iC);path="";line=br.initialize();fReassignableStart=W(!1);fDraggingDisabled=W(!1);fSelectionDisabled=W(!1);fDefs=it.required("defs");fPath=it.required(Nm);fDragHandleStart=it(zm);fDragHandleEnd=it.required(Vm);fSelection=it.required(Lm);fContents=Oh(gy,{descendants:!0});fMarkers=Oh(cu,{descendants:!0});fGradient=Za(Ty);_fGradientRenderer=it(Fm);fWaypoints=Za(vy);fInputSide=W(Ke.DEFAULT);_contentLayoutEngine=new Dm;_sourceSide=U.AUTO;fOutputSide=W(Ke.DEFAULT);_targetSide=U.AUTO;_penultimatePoint=q.initialize();_secondPoint=q.initialize();constructor(){super(p(Ze).nativeElement)}initialize(){this.redraw(),this.isSelected()?this.markChildrenAsSelected():this.unmarkChildrenAsSelected()}isContains(e){return(this.hostElement.firstChild?.lastChild).contains(e)||Array.from(this.fContents()?.values()??[]).some(n=>n.hostElement?.contains(e))||this.fWaypoints()?.hostElement?.contains(e)}setLine({point1:e,point2:n}){this.line=br.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=Ue({type:t,contentQueries:function(n,o,r){n&1&&Ph(r,o.fContents,gy,5)(r,o.fMarkers,cu,5)(r,o.fGradient,Ty,5)(r,o.fWaypoints,vy,5),n&2&&Ht(4)},viewQuery:function(n,o){n&1&&hn(o.fDefs,WL,5)(o.fPath,Nm,5)(o.fDragHandleStart,zm,5)(o.fDragHandleEnd,Vm,5)(o.fSelection,Lm,5)(o._fGradientRenderer,Fm,5),n&2&&Ht(6)},features:[J]})}return t})(),R6=(()=>{let t=class Ks{_browser=p(at);_markerCache=new WeakMap;handle({connection:e}){let n=this._findConnectionMarkers(e),o=e.fDefs();if(!o)return!1;let r=O6(n),a=this._markerCache.get(e);if(a?.signature===r&&a.defsElement===o.nativeElement)return!1;let s=sC("defs",this._browser);return n.forEach(c=>{aC(c.type).forEach(d=>{let f=F6(d,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||Ks)};static \u0275prov=C({token:Ks,factory:Ks.\u0275fac})};return t=E([P(To)],t),t})();function O6(t){return t.map(i=>[...aC(i.type),i.width,i.height,i.refX,i.refY,i.orient,i.markerUnits,i.markerElement.outerHTML].join("|")).join("||")}function F6(t,i,e,n){let o=sC("marker",n);return o.setAttribute("id",An(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 aC(t){switch(t){case Ve.START:return[Ve.START];case Ve.END:return[Ve.END];case Ve.SELECTED_START:return[Ve.SELECTED_START];case Ve.SELECTED_END:return[Ve.SELECTED_END];case Ve.START_ALL_STATES:return[Ve.START,Ve.SELECTED_START];case Ve.END_ALL_STATES:return[Ve.END,Ve.SELECTED_END];default:return[]}}function sC(t,i){return i.document.createElementNS("http://www.w3.org/2000/svg",t)}var Rf=(()=>{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=C({token:t,factory:t.\u0275fac})}return t})(),N6=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 lC(t){return!!cC(t)}function cC(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 A6(t){let i=new t.blobCtor([N6],{type:"text/javascript"});return t.urlApi.createObjectURL(i)}function dC(t,i){if(!t)return;let e=i??(typeof URL>"u"?null:URL);typeof e?.revokeObjectURL=="function"&&e.revokeObjectURL(t)}var Vi=(()=>{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,dC(this.workerUrl),this.workerUrl=null}dispose(){this.resetRuntime(new Error("Connection worker was destroyed."))}static \u0275fac=function(n){return new(n||t)};static \u0275prov=C({token:t,factory:t.\u0275fac})}return t})(),pu=class{connection;line;static fToken=Symbol("ApplyConnectionRenderRequest");constructor(i,e){this.connection=i,this.line=e}},L6=(()=>{let t=class Ys{_mediator=p(V);_renderCache=new WeakMap;handle({connection:e,line:n}){!this._mediator.execute(new To(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||Ys)};static \u0275prov=C({token:Ys,factory:Ys.\u0275fac})};return t=E([P(pu)],t),t})(),fu=class{source;target;static fToken=Symbol("MarkConnectionConnectorsAsConnectedRequest");constructor(i,e){this.source=i,this.target=e}},B6=(()=>{let t=class Xs{_state=p(Rf);handle({source:e,target:n}){e.setConnected(n),n.setConnected(e),this._state.trackConnectedConnectors(e,n)}static \u0275fac=function(n){return new(n||Xs)};static \u0275prov=C({token:Xs,factory:Xs.\u0275fac})};return t=E([P(fu)],t),t})(),li=class{element;cache;static fToken=Symbol("GetNormalizedConnectorRectRequest");constructor(i,e=!0){this.element=i,this.cache=e}},V6={enabled:!1},kn=new _e("F_CACHE_OPTIONS",{providedIn:"root",factory:()=>me({},V6)});var hu=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}},In=(()=>{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=C({token:t,factory:t.\u0275fac})}return t})(),Hm=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}},kr=class{static build(i,e){return`${i}:${e}`}},qm=class{id;element;reference;rect;constructor(i,e,n,o){this.id=i,this.element=e,this.reference=n,this.rect=o}},So=class{nodeId;reason;static fToken=Symbol("InvalidateFCacheNodeRequest");constructor(i,e="manual"){this.nodeId=i,this.reason=e}},z6=(()=>{let t=class Zs{_store=p(In);_options=p(kn);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||Zs)};static \u0275prov=C({token:Zs,factory:Zs.\u0275fac})};return t=E([P(So)],t),t})(),mu=class{id;element;reference;static fToken=Symbol("RegisterFCacheNodeRequest");constructor(i,e,n){this.id=i,this.element=e,this.reference=n}},H6=(()=>{let t=class Qs{_store=p(In);_options=p(kn);handle({id:e,element:n,reference:o}){if(!this._options.enabled)return;let r=new qm(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||Qs)};static \u0275prov=C({token:Qs,factory:Qs.\u0275fac})};return t=E([P(mu)],t),t})(),_u=class{id;static fToken=Symbol("UnregisterFCacheNodeRequest");constructor(i){this.id=i}},q6=(()=>{let t=class Js{_store=p(In);_mediator=p(V);_options=p(kn);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 Ir(a.id,a.kind))}this._store.connectorKeysByNodeId.delete(e)}static \u0275fac=function(n){return new(n||Js)};static \u0275prov=C({token:Js,factory:Js.\u0275fac})};return t=E([P(_u)],t),t})(),G6=(()=>{let t=class el{_store=p(In);_mediator=p(V);_options=p(kn);handle({id:e,nodeId:n,kind:o,element:r}){if(!this._options.enabled)return;let a=kr.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 Hm(a,e,o,n,r);this._store.connectorEntries.set(a,c),this._store.connectorKeyByElement.set(r,a);let d=this._store.connectorKeysByNodeId.get(n)??new Set;d.add(a),this._store.connectorKeysByNodeId.set(n,d),this._mediator.execute(new So(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||el)};static \u0275prov=C({token:el,factory:el.\u0275fac})};return t=E([P(hu)],t),t})(),Ir=class{connectorId;kind;static fToken=Symbol("UnregisterFCacheConnectorRequest");constructor(i,e){this.connectorId=i,this.kind=e}},j6=(()=>{let t=class tl{_store=p(In);_mediator=p(V);_options=p(kn);handle({connectorId:e,kind:n}){if(!this._options.enabled)return;let o=kr.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 So(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||tl)};static \u0275prov=C({token:tl,factory:tl.\u0275fac})};return t=E([P(Ir)],t),t})(),ko=class{element;static fToken=Symbol("GetCachedFCacheRectRequest");constructor(i){this.element=i}},U6=(()=>{let t=class nl{_store=p(In);_options=p(kn);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||nl)};static \u0275prov=C({token:nl,factory:nl.\u0275fac})};return t=E([P(ko)],t),t})(),Oi=class{connectorId;kind;rect;static fToken=Symbol("SetFCacheConnectorRectRequest");constructor(i,e,n){this.connectorId=i,this.kind=e,this.rect=n}},$6=(()=>{let t=class il{_store=p(In);_options=p(kn);handle({connectorId:e,kind:n,rect:o}){if(!this._options.enabled)return;let r=kr.build(e,n),a=this._store.connectorEntries.get(r);a&&(a.rect=rt.fromRoundedRect(o))}static \u0275fac=function(n){return new(n||il)};static \u0275prov=C({token:il,factory:il.\u0275fac})};return t=E([P(Oi)],t),t})(),Fi=class{nodeId;rect;static fToken=Symbol("SetFCacheNodeRectRequest");constructor(i,e){this.nodeId=i,this.rect=e}},W6=(()=>{let t=class ol{_store=p(In);_options=p(kn);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,d=n.height!==0,f=c?o.width/n.width:1,g=d?o.height/n.height:1;for(let y of r){let T=this._store.connectorEntries.get(y);if(!T?.rect)continue;let w=T.rect,N=w.gravityCenter,H=c?o.x+(N.x-n.x)*f:N.x+a,G=d?o.y+(N.y-n.y)*g:N.y+s;T.rect=new rt(H-w.width/2,G-w.height/2,w.width,w.height,w.radius1,w.radius2,w.radius3,w.radius4)}}static \u0275fac=function(n){return new(n||ol)};static \u0275prov=C({token:ol,factory:ol.\u0275fac})};return t=E([P(Fi)],t),t})(),Mr=class{element;rect;static fToken=Symbol("UpdateFCacheRectByElementRequest");constructor(i,e){this.element=i,this.rect=e}},K6=(()=>{let t=class rl{_store=p(In);_options=p(kn);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||rl)};static \u0275prov=C({token:rl,factory:rl.\u0275fac})};return t=E([P(Mr)],t),t})(),Y6=[In,H6,q6,z6,G6,j6,U6,W6,$6,K6];function Bo(t,i,e){return i?fe.fromPoint(t).elementTransform(i).sub(e.scaledPosition).sub(e.position).div(e.scale):fe.fromPoint(t)}function uC(){return{min:{x:-1/0,y:-1/0},max:{x:1/0,y:1/0}}}function Io(t){return t?`${t}`:void 0}var X6=(()=>{let t=class al{_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 ko(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),d=this._getOffsetSize(e,s),f=rt.fromCenter(c,d.width,d.height);return this._mediator.execute(new Mr(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)),d=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*d,a*d,s*d,c*d]}_getRadiusScaleFactor(e,n){return n<=0?1:e<=0?0:e/n}_normalizePosition(e){return Bo(e,this._store.flowHost,this._transform)}_unscaleSize(e){return St.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 St.offsetFromElement(e)||n}static \u0275fac=function(n){return new(n||al)};static \u0275prov=C({token:al,factory:al.\u0275fac})};return t=E([P(li)],t),t})(),gu=class{connector;cache;static fToken=Symbol("ResolveConnectionEndpointRectRequest");constructor(i,e){this.connector=i,this.cache=e}},Z6=(()=>{let t=class sl{_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 li(e.hostElement))}static \u0275fac=function(n){return new(n||sl)};static \u0275prov=C({token:sl,factory:sl.\u0275fac})};return t=E([P(gu)],t),t})(),vu=class{connection;static fToken=Symbol("ResolveConnectionEndpointsRequest");constructor(i){this.connection=i}},Q6=(()=>{let t=class ll{_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||ll)};static \u0275prov=C({token:ll,factory:ll.\u0275fac})};return t=E([P(vu)],t),t})(),Dr=class{connection;cache;static fToken=Symbol("ResolveConnectionGeometryRequest");constructor(i,e){this.connection=i,this.cache=e}},J6=(()=>{let t=class cl{_mediator=p(V);handle({connection:e,cache:n}){let o=this._resolveConnectionEndpoints(e);return o?Mt(me({},o),{sourceRect:this._resolveEndpointRect(o.source,n),targetRect:this._resolveEndpointRect(o.target,n)}):null}_resolveConnectionEndpoints(e){return this._mediator.execute(new vu(e))}_resolveEndpointRect(e,n){return this._mediator.execute(new gu(e,n))}static \u0275fac=function(n){return new(n||cl)};static \u0275prov=C({token:cl,factory:cl.\u0275fac})};return t=E([P(Dr)],t),t})(),tt=class{element;static fToken=Symbol("GetNormalizedElementRectRequest");constructor(i){this.element=i}},e7=(()=>{let t=class dl{_store=p(L);_mediator=p(V);get _transform(){return this._store.transform}handle({element:e}){let n=this._mediator.execute(new ko(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),d=this._fromCenter(s,c.width,c.height);return this._mediator.execute(new Mr(e,d)),d}_fromCenter(e,n,o){return ne.initialize(e.gravityCenter.x-n/2,e.gravityCenter.y-o/2,n,o)}_normalizePosition(e){return Bo(e,this._store.flowHost,this._transform)}_unscaleSize(e){return St.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 St.offsetFromElement(e)||n}static \u0275fac=function(n){return new(n||dl)};static \u0275prov=C({token:dl,factory:dl.\u0275fac})};return t=E([P(tt)],t),t})(),Ln=class{connector;static fToken=Symbol("ResolveConnectionEndpointRotationContextRequest");constructor(i){this.connector=i}},t7=(()=>{let t=class ul{_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 tt(n.hostElement));return{rotationDeg:n._rotate,pivot:o.gravityCenter}}static \u0275fac=function(n){return new(n||ul)};static \u0275prov=C({token:ul,factory:ul.\u0275fac})};return t=E([P(Ln)],t),t})(),bu=class{connection;geometry;static fToken=Symbol("BuildConnectionLineRequest");constructor(i,e){this.connection=i,this.geometry=e}},n7=(()=>{let t=class pl{_mediator=p(V);_connectionBehaviour=p(Lo);handle({connection:e,geometry:n}){return this._connectionBehaviour.handle(new bn(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 Ln(e))}static \u0275fac=function(n){return new(n||pl)};static \u0275prov=C({token:pl,factory:pl.\u0275fac})};return t=E([P(bu)],t),t})(),Er=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}},i7=(()=>{let t=class fl{_mediator=p(V);handle({connection:e,source:n,target:o,line:r}){this._mediator.execute(new fu(n,o)),this._mediator.execute(new pu(e,r))}static \u0275fac=function(n){return new(n||fl)};static \u0275prov=C({token:fl,factory:fl.\u0275fac})};return t=E([P(Er)],t),t})(),Pr=class{connection;geometry;static fToken=Symbol("RenderConnectionFromGeometryRequest");constructor(i,e){this.connection=i,this.geometry=e}},o7=(()=>{let t=class hl{_mediator=p(V);handle({connection:e,geometry:n}){let o=this._mediator.execute(new bu(e,n));this._mediator.execute(new Er(e,n.source,n.target,o))}static \u0275fac=function(n){return new(n||hl)};static \u0275prov=C({token:hl,factory:hl.\u0275fac})};return t=E([P(Pr)],t),t})(),yu=class{connection;cache;static fToken=Symbol("RenderConnectionRequest");constructor(i,e){this.connection=i,this.cache=e}},r7=(()=>{let t=class ml{_mediator=p(V);handle({connection:e,cache:n}){let o=this._mediator.execute(new Dr(e,n));o&&this._mediator.execute(new Pr(e,o))}static \u0275fac=function(n){return new(n||ml)};static \u0275prov=C({token:ml,factory:ml.\u0275fac})};return t=E([P(yu)],t),t})(),Ni=class{session;static fToken=Symbol("IsConnectionRedrawCurrentRequest");constructor(i){this.session=i}},a7=(()=>{let t=class _l{_store=p(L);_state=p(Rf);handle({session:e}){return e.renderTicket===this._state.renderTicket&&e.nodesRevision===this._store.nodesRevision}static \u0275fac=function(n){return new(n||_l)};static \u0275prov=C({token:_l,factory:_l.\u0275fac})};return t=E([P(Ni)],t),t})(),Rr=class{session;static fToken=Symbol("CompleteConnectionRedrawRequest");constructor(i){this.session=i}},s7=(()=>{let t=class gl{_mediator=p(V);_store=p(L);handle({session:e}){this._mediator.execute(new Ni(e))&&this._store.completeConnectionsRender(e.connectionsRevision,e.nodesRevision)}static \u0275fac=function(n){return new(n||gl)};static \u0275prov=C({token:gl,factory:gl.\u0275fac})};return t=E([P(Rr)],t),t})(),Cu=class{batchItem;result;static fToken=Symbol("ApplyConnectionWorkerResultRequest");constructor(i,e){this.batchItem=i,this.result=e}},l7=(()=>{let t=class vl{_mediator=p(V);handle({batchItem:e,result:n}){if(e){if(!this._isSupportedWorkerResult(n)){this._fallbackToMainThread(e);return}try{e.connection._applyResolvedSidesToConnection(n.sourceSide,n.targetSide),this._mediator.execute(new Er(e.connection,e.geometry.source,e.geometry.target,n.line))}catch{this._fallbackToMainThread(e)}}}_fallbackToMainThread(e){this._mediator.execute(new Pr(e.connection,e.geometry))}_isSupportedWorkerResult(e){return!!(e?.supported&&e.sourceSide&&e.targetSide&&e.line)}static \u0275fac=function(n){return new(n||vl)};static \u0275prov=C({token:vl,factory:vl.\u0275fac})};return t=E([P(Cu)],t),t})(),oi=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}},c7=500,d7=6,u7=(()=>{let t=class bl{_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(),d=o,f=0;for(;d<e.length&&f<c7&&this._isWithinSliceBudget(c);){let g=e[d];if(a?this._mediator.execute(new Cu(a[d]??null,s?.[d])):this._mediator.execute(new yu(g,n)),d++,f++,!this._isCurrent(r))return}if(d>=e.length){this._mediator.execute(new Rr(r));return}this._requestAnimationFrame(()=>this._mediator.execute(new oi(e,n,d,r,a,s)))}_isCurrent(e){return this._mediator.execute(new Ni(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<d7:!0}static \u0275fac=function(n){return new(n||bl)};static \u0275prov=C({token:bl,factory:bl.\u0275fac})};return t=E([P(oi)],t),t})(),xu=class{static fToken=Symbol("StartConnectionRedrawRequest")},p7=(()=>{let t=class yl{_store=p(L);_state=p(Rf);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||yl)};static \u0275prov=C({token:yl,factory:yl.\u0275fac})};return t=E([P(xu)],t),t})(),Or=class{static fToken=Symbol("RedrawConnectionsRequest")},wu=class{connectionCount;static fToken=Symbol("ShouldUseConnectionWorkerRequest");constructor(i){this.connectionCount=i}},Fr=class{static fToken=Symbol("IsConnectionWorkerEnabledRequest")},f7=(()=>{let t=class Cl{_browser=p(at);_state=p(Vi);handle(e){if(this._state.isDisabled||!this._isWorkerAvailable())return!1;let n=this._browser.document.defaultView;return lC(n)}_isWorkerAvailable(){return this._browser.isBrowser()}static \u0275fac=function(n){return new(n||Cl)};static \u0275prov=C({token:Cl,factory:Cl.\u0275fac})};return t=E([P(Fr)],t),t})(),h7=(()=>{let t=class xl{_mediator=p(V);handle({connectionCount:e}){return e>0&&this._mediator.execute(new Fr)}static \u0275fac=function(n){return new(n||xl)};static \u0275prov=C({token:xl,factory:xl.\u0275fac})};return t=E([P(wu)],t),t})(),Tu=class{connection;geometry;originalIndex;static fToken=Symbol("BuildConnectionWorkerPayloadItemRequest");constructor(i,e,n){this.connection=i,this.geometry=e,this.originalIndex=n}},m7=(()=>{let t=class wl{_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||wl)};static \u0275prov=C({token:wl,factory:wl.\u0275fac})};return t=E([P(Tu)],t),t})(),Su=class{connections;cache;static fToken=Symbol("BuildConnectionWorkerBatchRequest");constructor(i,e){this.connections=i,this.cache=e}},_7=(()=>{let t=class Tl{_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 Dr(e,n));return r?{connection:e,geometry:r,payload:this._mediator.execute(new Tu(e,r,o))}:null}static \u0275fac=function(n){return new(n||Tl)};static \u0275prov=C({token:Tl,factory:Tl.\u0275fac})};return t=E([P(Su)],t),t})(),ku=class{error;static fToken=Symbol("DisableConnectionWorkerRequest");constructor(i){this.error=i}},Nr=class{error;static fToken=Symbol("ResetConnectionWorkerRuntimeRequest");constructor(i){this.error=i}},g7=(()=>{let t=class Sl{_state=p(Vi);handle({error:e}){this._state.resetRuntime(e)}static \u0275fac=function(n){return new(n||Sl)};static \u0275prov=C({token:Sl,factory:Sl.\u0275fac})};return t=E([P(Nr)],t),t})(),v7=(()=>{let t=class kl{_state=p(Vi);_mediator=p(V);handle({error:e}){this._state.isDisabled=!0,this._mediator.execute(new Nr(e))}static \u0275fac=function(n){return new(n||kl)};static \u0275prov=C({token:kl,factory:kl.\u0275fac})};return t=E([P(ku)],t),t})(),Iu=class{message;static fToken=Symbol("HandleConnectionWorkerMessageRequest");constructor(i){this.message=i}},b7=(()=>{let t=class Il{_state=p(Vi);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||Il)};static \u0275prov=C({token:Il,factory:Il.\u0275fac})};return t=E([P(Iu)],t),t})(),Mu=class{static fToken=Symbol("EnsureConnectionWorkerRequest")},y7=(()=>{let t=class Ml{_browser=p(at);_state=p(Vi);_mediator=p(V);handle(e){if(this._state.worker)return this._state.worker;let n=this._browser.document.defaultView;if(!lC(n))return null;let o=cC(n);if(!o)return null;let r=A6(o);try{let a=new o.workerCtor(r,{name:"f-flow-connection-worker"});return a.onmessage=s=>{this._mediator.execute(new Iu(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 dC(r,o.urlApi),this._disableWorker(a instanceof Error?a:new Error("Connection worker initialization failed.")),null}}_disableWorker(e){this._mediator.execute(new ku(e))}_resetWorkerAfterRuntimeError(e){this._mediator.execute(new Nr(e))}static \u0275fac=function(n){return new(n||Ml)};static \u0275prov=C({token:Ml,factory:Ml.\u0275fac})};return t=E([P(Mu)],t),t})(),Du=class{payload;static fToken=Symbol("RunConnectionWorkerRequest");constructor(i){this.payload=i}},C7=(()=>{let t=class Dl{_state=p(Vi);_mediator=p(V);handle({payload:e}){if(!e.length)return Promise.resolve([]);if(!this._mediator.execute(new Fr))return Promise.reject(new Error("Connection worker is disabled."));this._interruptPendingRequests();let n=this._mediator.execute(new Mu);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||Dl)};static \u0275prov=C({token:Dl,factory:Dl.\u0275fac})};return t=E([P(Du)],t),t})(),Eu=class{batch;static fToken=Symbol("RunConnectionWorkerBatchRequest");constructor(i){this.batch=i}},x7=(()=>{let t=class El{_mediator=p(V);handle({batch:e}){return e.payload.length?this._mediator.execute(new Du(e.payload)):Promise.resolve([])}static \u0275fac=function(n){return new(n||El)};static \u0275prov=C({token:El,factory:El.\u0275fac})};return t=E([P(Eu)],t),t})(),Pu=class{connections;cache;session;static fToken=Symbol("StartConnectionWorkerRedrawRequest");constructor(i,e,n){this.connections=i,this.cache=e,this.session=n}},w7=(()=>{let t=class Pl{_mediator=p(V);handle({connections:e,cache:n,session:o}){let r=this._mediator.execute(new Su(e,n));if(!r.payload.length){this._mediator.execute(new oi(e,n,0,o,r.items));return}this._mediator.execute(new Eu(r)).then(a=>{this._mediator.execute(new Ni(o))&&this._mediator.execute(new oi(e,n,0,o,r.items,this._alignWorkerResults(a,e.length)))}).catch(()=>{this._mediator.execute(new Ni(o))&&this._mediator.execute(new oi(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||Pl)};static \u0275prov=C({token:Pl,factory:Pl.\u0275fac})};return t=E([P(Pu)],t),t})(),T7=(()=>{let t=class Rl{_mediator=p(V);_store=p(L);handle(e){let n=this._mediator.execute(new xu);this._createMarkersForCreate(),this._createMarkersForSnap();let o=[...this._store.connections.getAll()],r=new Map;if(!o.length){this._mediator.execute(new Rr(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 To(e))}_createMarkersForSnap(){let e=this._store.connections.getForSnap();e&&this._mediator.execute(new To(e))}_shouldUseConnectionWorker(e){return this._mediator.execute(new wu(e))}_redrawUsingWorker(e,n,o){this._mediator.execute(new Pu(e,n,o))}_redrawWithoutWorker(e,n,o){this._mediator.execute(new oi(e,n,0,o))}static \u0275fac=function(n){return new(n||Rl)};static \u0275prov=C({token:Rl,factory:Rl.\u0275fac})};return t=E([P(Or)],t),t})(),Gm=class{static fToken=Symbol("RemoveConnectionForCreateFromStoreRequest")},S7=(()=>{let t=class Ol{_store=p(L);handle(e){this._store.connections.removeInstanceForCreate()}static \u0275fac=function(n){return new(n||Ol)};static \u0275prov=C({token:Ol,factory:Ol.\u0275fac})};return t=E([P(Gm)],t),t})(),Ru=class{connection;static fToken=Symbol("RemoveConnectionFromStoreRequest");constructor(i){this.connection=i}},k7=(()=>{let t=class Fl{_store=p(L);handle({connection:e}){this._store.connections.remove(e),this._store.emitConnectionChanges()}static \u0275fac=function(n){return new(n||Fl)};static \u0275prov=C({token:Fl,factory:Fl.\u0275fac})};return t=E([P(Ru)],t),t})(),Ou=class{instance;static fToken=Symbol("RemoveConnectionMarkerFromStoreRequest");constructor(i){this.instance=i}},I7=(()=>{let t=class Nl{_store=p(L);handle({instance:e}){this._store.connectionMarkers.remove(e),this._store.emitNodeChanges()}static \u0275fac=function(n){return new(n||Nl)};static \u0275prov=C({token:Nl,factory:Nl.\u0275fac})};return t=E([P(Ou)],t),t})(),jm=class{waypointIndex;connectionId;static fToken=Symbol("RemoveConnectionWaypointRequest");constructor(i,e){this.waypointIndex=i,this.connectionId=e}},Fu=class{static fToken=Symbol("EmitEndDragSequenceEventRequest")},M7=(()=>{let t=class Al{_store=p(L);_dragSession=p(he);handle(e){this._store.flowHost.classList.remove(ft.DRAG_AND_DROP.DRAGGING),this._dragSession.reset(),this._emitEvent()}_emitEvent(){this._store.fDraggable?.fDragEnded?.emit()}static \u0275fac=function(n){return new(n||Al)};static \u0275prov=C({token:Al,factory:Al.\u0275fac})};return t=E([P(Fu)],t),t})(),Nu=class{static fToken=Symbol("EmitStartDragSequenceEventRequest")},D7=(()=>{let t=class Ll{_mediator=p(V);_store=p(L);_dragContext=p(he);handle(e){this._dragContext.draggableItems.length>0&&(this._store.flowHost.classList.add(ft.DRAG_AND_DROP.DRAGGING),this._mediator.execute(new Ar),this._emitDragStarted())}_emitDragStarted(){let e=this._dragContext.draggableItems[0].getEvent();this._store.fDraggable?.fDragStarted?.emit(new Hu(e.kind,e.data?me({},e.data):void 0,e.fEventType))}static \u0275fac=function(n){return new(n||Ll)};static \u0275prov=C({token:Ll,factory:Ll.\u0275fac})};return t=E([P(Nu)],t),t})(),Ar=class{static fToken=Symbol("EmitSelectionChangeEventRequest")},he=(()=>{class t{selectedItems=[];isSelectedChanged=!1;onPointerDownScale=1;onPointerDownPosition=new fe(0,0);draggableItems=[];autoPanFrameId=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 fe(0,0),this.autoPanFrameId=null,this.lastPointerPosition=null,this.isAutoPanCanvasMoved=!1}markSelectionAsChanged(){this.isSelectedChanged=!0}rememberPointerPosition(e){this.lastPointerPosition=e.getPosition()}isEmpty(){return!this.draggableItems.length}static \u0275fac=function(n){return new(n||t)};static \u0275prov=C({token:t,factory:t.\u0275fac})}return t})(),Um=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}},E7=(()=>{let t=class Bl{_mediator=p(V);_store=p(L);_dragSession=p(he);handle(e){this._dragSession.isSelectedChanged&&(this._emitSelectionChange(this._getSelection()),this._dragSession.isSelectedChanged=!1,this._mediator.execute(new ri))}_getSelection(){return this._mediator.execute(new ra)}_emitSelectionChange(e){this._store.fDraggable?.fSelectionChange.emit(new Um(e.fNodeIds,e.fGroupIds,e.fConnectionIds))}static \u0275fac=function(n){return new(n||Bl)};static \u0275prov=C({token:Bl,factory:Bl.\u0275fac})};return t=E([P(Ar)],t),t})(),$m=class{nodeOrGroup;static fToken=Symbol("GetNormalizedParentNodeRectRequest");constructor(i){this.nodeOrGroup=i}},P7=(()=>{let t=class Vl{_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 tt(e.hostElement))}_getNodePadding(e,n){return this._mediator.execute(new Li(e,n))}static \u0275fac=function(n){return new(n||Vl)};static \u0275prov=C({token:Vl,factory:Vl.\u0275fac})};return t=E([P($m)],t),t})(),Wm=class{fParentNodes;fDraggedNodes;static fToken=Symbol("IsArrayHasParentNodeRequest");constructor(i,e){this.fParentNodes=i,this.fDraggedNodes=e}},R7=(()=>{let t=class zl{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||zl)};static \u0275prov=C({token:zl,factory:zl.\u0275fac})};return t=E([P(Wm)],t),t})(),Km=class{fNodeId;fConnectionIds;constructor(i,e){this.fNodeId=i,this.fConnectionIds=e}},Au=class extends Km{nodeId;connectionIds;constructor(i,e){super(i,e),this.nodeId=i,this.connectionIds=e}},Lu=class{nodeOrGroup;static fToken=Symbol("DetectConnectionsUnderDragNodeRequest");constructor(i){this.nodeOrGroup=i}},O7=(()=>{let t=class Hl{_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 d=c.fId();r.has(d)||s.push(d)}s.length&&(this._store.fDraggable?.fNodeIntersectedWithConnections.emit(new Au(e.fId(),s)),this._store.fDraggable?.fNodeConnectionsIntersection.emit(new Au(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 li(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 _o.getRoundedRectIntersectionsWithSVGPath(e.fPath().hostElement,n).length>0}static \u0275fac=function(n){return new(n||Hl)};static \u0275prov=C({token:Hl,factory:Hl.\u0275fac})};return t=E([P(Lu)],t),t})(),F7=[D7,M7,E7,P7,R7,O7],N7=new Set(["create-connection","reassign-connection","drag-node"]),A7=new Set(["selection-area"]),L7=new Set(["assign-to-container"]);function pC(t){let i=null;for(let e of t){if(L7.has(e))continue;let n=N7.has(e)?"rebase":A7.has(e)?"direct":null;if(!n)return null;if(!i){i=n;continue}if(i!==n)return null}return i}function fC(t,i,e,n,o){return q.initialize(Sy(t.x,i.left,i.right,e,n,o),Sy(t.y,i.top,i.bottom,e,n,o))}function Sy(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 ky(c,s,r)}if(t>=e-a){let c=Iy((t-(e-a))/a,0,1);return-ky(c,s,r)}return 0}function B7(t,i,e){let n=e||1;return fe.fromPoint(t).add(fe.fromPoint(i).div(n))}function ky(t,i,e){return e?i*t:i}function Iy(t,i,e){return Math.max(i,Math.min(e,t))}var Bu=class{static fToken=Symbol("RunAutoPanFrameRequest")},ci=class{static fToken=Symbol("StopAutoPanRequest")},V7=(()=>{let t=class ql{_store=p(L);_dragContext=p(he);handle(e){this._dragContext.autoPanFrameId!==null&&(cancelAnimationFrame(this._dragContext.autoPanFrameId),this._dragContext.autoPanFrameId=null),this._dragContext.isAutoPanCanvasMoved&&(this._store.fCanvas?.emitCanvasChangeEvent(),this._dragContext.isAutoPanCanvasMoved=!1)}static \u0275fac=function(n){return new(n||ql)};static \u0275prov=C({token:ql,factory:ql.\u0275fac})};return t=E([P(ci)],t),t})(),Lr=class{static fToken=Symbol("ScheduleAutoPanFrameRequest")},z7=(()=>{let t=class Gl{_mediator=p(V);_store=p(L);_dragContext=p(he);handle(e){if(!this._canAutoPan()||!this._hasAutoPanDelta()){this._mediator.execute(new ci);return}this._dragContext.autoPanFrameId===null&&(this._dragContext.autoPanFrameId=requestAnimationFrame(()=>{this._dragContext.autoPanFrameId=null,this._mediator.execute(new Bu)}))}_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?q.initialize():fC(e,n.getBoundingClientRect(),this._edgeThreshold(),this._speed(),this._acceleration())}_getAutoPanMode(){return pC(this._dragContext.draggableItems.map(e=>e.getEvent().kind))}_edgeThreshold(){return Math.max(0,this._autoPan()?.fEdgeThreshold()??0)}_speed(){return Math.max(0,this._autoPan()?.fSpeed()??0)}_acceleration(){return!!this._autoPan()?.fAcceleration()}_autoPan(){return this._store.instances.get(Ye.AUTO_PAN)}static \u0275fac=function(n){return new(n||Gl)};static \u0275prov=C({token:Gl,factory:Gl.\u0275fac})};return t=E([P(Lr)],t),t})(),H7=(()=>{let t=class jl{_mediator=p(V);_store=p(L);_dragContext=p(he);handle(e){let n=this._getAutoPanMode();if(!this._canAutoPan(n)){this._mediator.execute(new ci);return}let o=this._getAutoPanDelta();if(!o.x&&!o.y){this._mediator.execute(new ci);return}this._applyCanvasDelta(o,n),this._replayLastPointerMove(),this._mediator.execute(new Lr)}_applyCanvasDelta(e,n){let o=this._store.transform;n==="rebase"&&(this._dragContext.onPointerDownPosition=B7(this._dragContext.onPointerDownPosition,e,this._dragContext.onPointerDownScale||o.scale||1)),o.position=fe.fromPoint(o.position).add(e),this._store.fCanvas?.redraw(),this._dragContext.isAutoPanCanvasMoved=!0}_replayLastPointerMove(){let e=this._dragContext.lastPointerPosition;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))})}_getPointerPositionInCanvas(e){return fe.fromPoint(e).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 pC(this._dragContext.draggableItems.map(e=>e.getEvent().kind))}_getAutoPanDelta(){let e=this._dragContext.lastPointerPosition,n=this._store.fFlow?.hostElement;return!e||!n?q.initialize():fC(e,n.getBoundingClientRect(),this._edgeThreshold(),this._speed(),this._acceleration())}_edgeThreshold(){return Math.max(0,this._autoPan()?.fEdgeThreshold()??0)}_speed(){return Math.max(0,this._autoPan()?.fSpeed()??0)}_acceleration(){return!!this._autoPan()?.fAcceleration()}_autoPan(){return this._store.instances.get(Ye.AUTO_PAN)}static \u0275fac=function(n){return new(n||jl)};static \u0275prov=C({token:jl,factory:jl.\u0275fac})};return t=E([P(Bu)],t),t})(),q7=[z7,H7,V7],Vu=class{event;static fToken=Symbol("DragCanvasFinalizeRequest");constructor(i){this.event=i}},Mo=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}},zu=class extends Mo{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}}},Ym=class extends Mo{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}},Xm=class extends Mo{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}}},Zm=class extends Mo{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})(),G7=800,Qm=class{_document=p(ja);_ngZone=p(Zt,{optional:!0});_mouseListeners=ze.emptyListener();_touchListeners=ze.emptyListener();_startListeners=ze.emptyListener();isSyntheticEvent(i){return!!this._lastTouchEventTime&&this._lastTouchEventTime+G7>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=U7(i),o=new zu(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=$7(i),n=new Xm(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 zu(i))};_onTouchMove=i=>{this._moveHandler(new Zm(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,j7(i.originalEvent)&&(this._lastTouchEventTime=Date.now())}}}_onPointerUpEvent=i=>{this.isDragStarted&&this.onPointerUp(new Ym(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 j7(t){return t.type[0]==="t"}function U7(t){return t.buttons===0||t.offsetX===0&&t.offsetY===0}function $7(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 Hu=class{kind;data;fEventType;get fData(){return this.data}constructor(i,e,n){this.kind=i,this.data=e,this.fEventType=n??i}},kt=class{data(){}_features=[];getEvent(){return new Hu(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)}},qu=class{_isConnected=!1;get isConnected(){return this._isConnected}toConnector=[];isSelfConnectable=!0;fConnectableSide=U.AUTO;userFConnectableSide=U.AUTO;isContains(i){return this.hostElement.contains(i)}setConnected(i){this._isConnected=!0,this.toConnector.push(i)}resetConnected(){this._isConnected=!1,this.toConnector=[]}},W7=new _e("F_NODE_INPUT"),K7=(()=>{class t extends qu{kind="input";get canBeConnected(){return!this.disabled()&&(this.multiple()?!0:!this.isConnected)}static \u0275fac=(()=>{let e;return function(o){return(e||(e=$(t)))(o||t)}})();static \u0275dir=Ue({type:t,features:[J]})}return t})(),Tn=(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})(Tn||{});function Y7(t){return yr(t,".f-rotate-handle")}var hC=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275dir=Ue({type:t,selectors:[["","fDragHandle",""]],hostAttrs:[1,"f-drag-handle","f-component"],standalone:!1})}return t})(),Of=new _e("F_NODE"),X7=rC(class{hostElement;constructor(t){this.hostElement=t}}),Gu=class extends X7{_injector=p(mt);renderer=p(j0);browser=p(at);stateChanges=new sn;_position=q.initialize();_rotate=0;_size;connectors=[];positionChanges(){ce(()=>{let i=this.position();vt(()=>{q.isEqual(this._position,i)||(this._position=i,this.redraw(),this.refresh())})},{injector:this._injector})}sizeChanges(){ce(()=>{let i=this.size();vt(()=>{this._isSizeEqual(i)||(this._size=i,this.redraw(),this.refresh())})},{injector:this._injector})}rotateChanges(){ce(()=>{let i=this.rotate();vt(()=>{this._rotate!==i&&(this._rotate=i,this.redraw(),this.refresh())})},{injector:this._injector})}parentChanges(){ce(()=>{this.fParentId(),this.fIncludePadding(),this.fAutoSizeToFitChildren(),vt(()=>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()}},Z7=0,Q7=3,Jm=(()=>{class t extends Gu{_debounceTimer=null;_destroyRef=p(yt);_mediator=p(V);fId=B(`f-group-${Z7++}`,{alias:"fGroupId"});fParentId=B(null,{alias:"fGroupParentId"});position=Ti(q.initialize(),{alias:"fGroupPosition"});size=B(void 0,{alias:"fGroupSize"});sizeChange=Ge({alias:"fGroupSizeChange"});rotate=Ti(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 Qr(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 ri),this._updateConnectorsSides()}_updateConnectorsSides(){this.connectors.length&&(this._debounceTimer&&clearTimeout(this._debounceTimer),this._debounceTimer=setTimeout(()=>this._calculateNodeConnectorsConnectableSides(),Q7))}_calculateNodeConnectorsConnectableSides(){this._mediator.execute(new Eo(this))}ngAfterViewInit(){this.browser.isBrowser()&&this._listenStateSizeChanges()}_listenStateSizeChanges(){this._mediator.execute(new ea(this,this._destroyRef))}refresh(){this.stateChanges.notify()}ngOnDestroy(){this._mediator.execute(new ta(this))}static \u0275fac=function(n){return new(n||t)(Fn(Ze))};static \u0275dir=Ue({type:t,selectors:[["","fGroup",""]],hostAttrs:[1,"f-group","f-component"],hostVars:6,hostBindings:function(n,o){n&2&&(O("data-f-group-id",o.fId())("data-f-group-parent-id",o.fParentId()),se("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:Of,useExisting:t}]),J]})}return t})(),My=0,J7=3,Ff=(()=>{class t extends Gu{_debounceTimer=null;_destroyRef=p(yt);_mediator=p(V);fId=B(`f-node-${My++}`,{alias:"fNodeId",transform:e=>Io(e)||`f-node-${My++}`});fParentId=B(null,{alias:"fNodeParentId"});position=Ti(q.initialize(),{alias:"fNodePosition"});size=B(void 0,{alias:"fNodeSize"});sizeChange=Ge({alias:"fNodeSizeChange"});rotate=Ti(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 Qr(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 ri),this._updateConnectorsSides()}_updateConnectorsSides(){this.connectors.length&&(this._debounceTimer&&clearTimeout(this._debounceTimer),this._debounceTimer=setTimeout(()=>this._calculateNodeConnectorsConnectableSides(),J7))}_calculateNodeConnectorsConnectableSides(){this._mediator.execute(new Eo(this))}ngAfterViewInit(){this.browser.isBrowser()&&this._listenStateSizeChanges()}_listenStateSizeChanges(){this._mediator.execute(new ea(this,this._destroyRef))}refresh(){this.stateChanges.notify()}ngOnDestroy(){this._mediator.execute(new ta(this))}static \u0275fac=function(n){return new(n||t)(Fn(Ze))};static \u0275dir=Ue({type:t,selectors:[["","fNode",""]],hostAttrs:[1,"f-node","f-component"],hostVars:6,hostBindings:function(n,o){n&2&&(O("data-f-node-id",o.fId())("data-f-node-parent-id",o.fParentId()),se("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:Of,useExisting:t}]),J]})}return t})();function eB(t){return!!t.closest("[fNode]")}var Dy=0,mC=(()=>{class t extends K7{hostElement=p(Ze).nativeElement;_mediator=p(V);_node=p(Of);fId=B(`f-node-input-${Dy++}`,{alias:"fInputId",transform:e=>Io(e)||`f-node-input-${Dy++}`});category=B(void 0,{alias:"fInputCategory",transform:Io});multiple=B(!0,{alias:"fInputMultiple",transform:Y});disabled=B(!1,{alias:"fInputDisabled",transform:Y});userFConnectableSide=U.AUTO;get fNodeId(){return this._node.fId()}get fNodeHost(){return this._node.hostElement}ngOnInit(){this._mediator.execute(new Yr(this)),this._node.addConnector(this)}ngOnChanges(e){e.userFConnectableSide&&this._node.refresh()}setConnected(e){super.setConnected(e),this.hostElement.classList.toggle(ft.CONNECTOR.INPUT_CONNECTED,!0),this.hostElement.classList.toggle(ft.CONNECTOR.INPUT_NOT_CONNECTABLE,!this.canBeConnected)}resetConnected(){super.resetConnected(),this.hostElement.classList.toggle(ft.CONNECTOR.INPUT_CONNECTED,!1),this.hostElement.classList.toggle(ft.CONNECTOR.INPUT_NOT_CONNECTABLE,!this.canBeConnected)}ngOnDestroy(){this._node.removeConnector(this),this._mediator.execute(new na(this))}static \u0275fac=(()=>{let e;return function(o){return(e||(e=$(t)))(o||t)}})();static \u0275dir=Ue({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()),se("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=>go(e,"fInputConnectableSide",U)]},exportAs:["fNodeInput"],standalone:!1,features:[Ee([{provide:W7,useExisting:t}]),J,to]})}return t})(),tB=(()=>{class t extends qu{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=$(t)))(o||t)}})();static \u0275dir=Ue({type:t,features:[J]})}return t})();function _C(t){return!!t.closest("[fNodeOutlet]")}var nB=new _e("F_NODE_OUTPUT"),iB=(()=>{class t extends tB{kind="output";get canBeConnected(){return!this.disabled()&&(this.multiple()?!0:!this.isConnected)}static \u0275fac=(()=>{let e;return function(o){return(e||(e=$(t)))(o||t)}})();static \u0275dir=Ue({type:t,features:[J]})}return t})();function gC(t){return!!t.closest("[fNodeOutput]")}var Ey=0,vC=(()=>{class t extends iB{hostElement=p(Ze).nativeElement;_mediator=p(V);_node=p(Of);fId=B(`f-node-output-${Ey++}`,{alias:"fOutputId",transform:e=>Io(e)||`f-node-output-${Ey++}`});multiple=B(!1,{alias:"fOutputMultiple",transform:Y});disabled=B(!1,{alias:"fOutputDisabled",transform:Y});userFConnectableSide=U.AUTO;isSelfConnectable=!0;canBeConnectedInputs=[];get fNodeId(){return this._node.fId()}get fNodeHost(){return this._node.hostElement}ngOnInit(){this._mediator.execute(new Yr(this)),this._node.addConnector(this)}ngOnChanges(e){e.userFConnectableSide&&this._node.refresh()}setConnected(e){super.setConnected(e),this.hostElement.classList.toggle(ft.CONNECTOR.OUTPUT_CONNECTED,!0),this.hostElement.classList.toggle(ft.CONNECTOR.OUTPUT_NOT_CONNECTABLE,!this.canBeConnected)}resetConnected(){super.resetConnected(),this.hostElement.classList.toggle(ft.CONNECTOR.OUTPUT_CONNECTED,!1),this.hostElement.classList.toggle(ft.CONNECTOR.OUTPUT_NOT_CONNECTABLE,!this.canBeConnected)}ngOnDestroy(){this._node.removeConnector(this),this._mediator.execute(new na(this))}static \u0275fac=(()=>{let e;return function(o){return(e||(e=$(t)))(o||t)}})();static \u0275dir=Ue({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()),se("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=>go(e,"fOutputConnectableSide",U)],isSelfConnectable:"isSelfConnectable",canBeConnectedInputs:[0,"fCanBeConnectedInputs","canBeConnectedInputs"]},exportAs:["fNodeOutput"],standalone:!1,features:[Ee([{provide:nB,useExisting:t}]),J,to]})}return t})();var ju=class{event;static fToken=Symbol("CreateConnectionFinalizeRequest");constructor(i){this.event=i}},Br=class{outlet;static fToken=Symbol("ResolveConnectableOutputForOutletRequest");constructor(i){this.outlet=i}},oB=(()=>{let t=class Ul{_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||Ul)};static \u0275prov=C({token:Ul,factory:Ul.\u0275fac})};return t=E([P(Br)],t),t})(),e_=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}},Uu=(()=>{class t extends kt{type="create-connection";kind="create-connection";data(){return{fOutputOrOutletId:this._sourceRef.connector.fId()}}_result=p(ui);_mediator=p(V);_connectionBehaviour=p(Lo);_store=p(L);get _connection(){return this._store.connections.getForCreate()}get _snapConnection(){return this._store.connections.getForSnap()}_targets=[];_sourceRef;_pointerDown=new rt;initialize(e,n){this._sourceRef=this._mediator.execute(new $t(e)),this._pointerDown=rt.fromRect(ne.initialize(n.x,n.y))}prepareDragSequence(){this._collectAndMarkTargets(),this._initSnapConnection(),this._initCreateConnection(),this._connection.show(),this.onPointerMove(q.initialize()),this._result.setData({toConnectorRect:this._pointerDown,canBeConnectedInputs:this._targets,fOutputId:this._sourceRef.connector.fId()})}_collectAndMarkTargets(){this._targets=this._mediator.execute(new Zr(this._sourceRef.connector,this._sourceRef.rect.gravityCenter)),this._mediator.execute(new Oo(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||U.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 Ai(e,this._targets))}_drawCreateConnection(e,n){let o=this._connectionBehaviour.handle(new bn(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 bn(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 Fo(this._targets.map(e=>e.connector)))}_resolveRotationContext(e){return this._mediator.execute(new Ln(e))}static \u0275fac=(()=>{let e;return function(o){return(e||(e=$(t)))(o||t)}})();static \u0275prov=C({token:t,factory:t.\u0275fac})}return t})(),rB=(()=>{let t=class $l{_result=p(ui);_mediator=p(V);_store=p(L);_dragContext=p(he);get _dragHandler(){return this._dragContext.draggableItems[0]}handle(e){this._isValid()&&(this._emitEvent(e.event),this._dragHandler.onPointerUp())}_isValid(){return this._dragContext.draggableItems.some(e=>e instanceof Uu)}_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 _C(e.hostElement)?this._mediator.execute(new Br(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 e_(this._getTargetOutput(this._getOutput()||this._getOutlet()).fId(),this._getInputUnderPointer(e)?.fId(),e.getPosition()))}_getInputUnderPointer(e){return this._mediator.execute(new Xr(e.getPosition(),this._result.getData().canBeConnectedInputs))}static \u0275fac=function(n){return new(n||$l)};static \u0275prov=C({token:$l,factory:$l.\u0275fac})};return t=E([P(ju)],t),t})(),Vr=class{eventPosition;source;static fToken=Symbol("CreateConnectionCreateDragHandlerRequest");constructor(i,e){this.eventPosition=i,this.source=e}},aB=(()=>{let t=class Wl{_store=p(L);_dragContext=p(he);_dragInjector=p(bt);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(Uu);a.initialize(e,r),this._dragContext.draggableItems=[a]}_toFlowSpace(e){return fe.fromPoint(e).elementTransform(this._store.flowHost).div(this._transform.scale)}_toCanvasSpace(e){return fe.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||Wl)};static \u0275prov=C({token:Wl,factory:Wl.\u0275fac})};return t=E([P(Vr)],t),t})(),$u=class{event;node;static fToken=Symbol("CreateConnectionFromOutletPreparationRequest");constructor(i,e){this.event=i,this.node=e}},sB=(()=>{let t=class Kl{_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 Br(e))}_startDrag(e,n){this._mediator.execute(new Vr(e,n))}static \u0275fac=function(n){return new(n||Kl)};static \u0275prov=C({token:Kl,factory:Kl.\u0275fac})};return t=E([P($u)],t),t})(),Wu=class{event;node;static fToken=Symbol("CreateConnectionFromOutputPreparationRequest");constructor(i,e){this.event=i,this.node=e}},lB=(()=>{let t=class Yl{_mediator=p(V);_store=p(L);handle({event:e,node:n}){if(!gC(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 Vr(e,n))}static \u0275fac=function(n){return new(n||Yl)};static \u0275prov=C({token:Yl,factory:Yl.\u0275fac})};return t=E([P(Wu)],t),t})(),Ku=class{event;fTrigger;static fToken=Symbol("CreateConnectionPreparationRequest");constructor(i,e){this.event=i,this.fTrigger=e}},cB=(()=>{let t=class Xl{_mediator=p(V);_store=p(L);_dragContext=p(he);handle({event:e,fTrigger:n}){if(!this._isValidConditions()||!this._isValidTrigger(e,n))return;let o=_C(e.targetElement),r=!o&&gC(e.targetElement);if(!o&&!r)return;let a=this._findOwnerNode(e.targetElement);a&&(o?this._mediator.execute(new $u(e,a)):this._mediator.execute(new Wu(e,a)))}_findOwnerNode(e){return this._store.nodes.getAll().find(n=>n.isContains(e))}_isValidConditions(){return this._dragContext.isEmpty()&&!!this._store.connections.getForCreate()}_isValidTrigger(e,n){return ln(e.originalEvent,n)}static \u0275fac=function(n){return new(n||Xl)};static \u0275prov=C({token:Xl,factory:Xl.\u0275fac})};return t=E([P(Ku)],t),t})(),Yu=class{event;static fToken=Symbol("ReassignConnectionFinalizeRequest");constructor(i){this.event=i}},t_=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}},dB=(()=>{let t=class Zl{_dragResult=p(ui);_mediator=p(V);_store=p(L);_dragContext=p(he);get _dragDirective(){return this._store.fDraggable}handle({event:e}){let n=this._findReassignHandler();n&&(this._emitIfChanged(e),n.onPointerUp())}_findReassignHandler(){return this._dragContext.draggableItems.find(n=>n.getEvent().fEventType==="reassign-connection")}_emitIfChanged(e){let n=this._dragResult.getData(),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 Xr(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 t_(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||Zl)};static \u0275prov=C({token:Zl,factory:Zl.\u0275fac})};return t=E([P(Yu)],t),t})(),Xu=class{event;fTrigger;static fToken=Symbol("ReassignConnectionPreparationRequest");constructor(i,e){this.event=i,this.fTrigger=e}};function uB(t,i){return bC(t,i)||pB(t,i)}function bC(t,i){return t.fDragHandleEnd()?.point&&yC(i,t.fDragHandleEnd().point)&&!t.fDraggingDisabled()}function pB(t,i){return!!t.fDragHandleStart()?.point&&yC(i,t.fDragHandleStart().point)&&!t.fDraggingDisabled()&&t.fReassignableStart()}function yC(t,i){return(t.x-i.x)**2+(t.y-i.y)**2<=8**2}function CC(t,i){return t&&t.distance<i.fSnapThreshold?t:void 0}function Zu(t){return rt.fromRect(ne.initialize(t.x,t.y))}var n_=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=Zu(this._connection.line.point1)}candidates(){return this._candidates}collectAndMarkCandidates(){this._candidates=this._mediator.execute(new nf(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 Oo(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(CC(n,r))}_findClosest(i){return this._mediator.execute(new Ai(i,this._candidates))}_draw(i,e){let n=this._behaviour.handle(new bn(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 bn(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 Fo(this._candidates.map(i=>i.connector)))}_resolveRotationContext(i){return this._mediator.execute(new Ln(i))}},i_=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=Zu(this._connection.line.point2)}candidates(){return this._candidates}collectAndMarkCandidates(){this._candidates=this._mediator.execute(new Zr(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 Oo(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(CC(n,r))}onPointerUp(){this._draw(this._anchorRect,this._targetRef.connector.fConnectableSide),this._snap?.hide(),this._mediator.execute(new Fo(this._candidates.map(i=>i.connector)))}_findClosest(i){return this._mediator.execute(new Ai(i,this._candidates))}_draw(i,e){let n=this._behaviour.handle(new bn(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 bn(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 Ln(i))}},o_=(()=>{class t extends kt{type="reassign-connection";kind="reassign-connection";data(){return{fConnectionId:this._connection.fId()}}_result=p(ui);_mediator=p(V);_connectionBehaviour=p(Lo);_store=p(L);get _snapConnection(){return this._store.connections.getForSnap()}_connection;_draggedEnd;_sourceRef;_targetRef;_reassignHandler;initialize(e,n){this._connection=e,this._draggedEnd=n?"target":"source",this._sourceRef=this._mediator.execute(new $t(this._store.outputs.require(this._connection.fOutputId()))),this._targetRef=this._mediator.execute(new $t(this._store.inputs.require(this._connection.fInputId()))),this._reassignHandler=this._draggedEnd==="target"?this._createTargetHandler():this._createSourceHandler()}_createSourceHandler(){return new n_(this._mediator,this._connectionBehaviour,this._connection,this._sourceRef,this._targetRef)}_createTargetHandler(){return new i_(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:Zu(this._connection.line.point1),targetAnchorRect:Zu(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=$(t)))(o||t)}})();static \u0275prov=C({token:t,factory:t.\u0275fac})}return t})(),fB=(()=>{let t=class Ql{_mediator=p(V);_store=p(L);_dragContext=p(he);_dragInjector=p(bt);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=Bo(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=>uB(n,e))}_capturePointerDown(e){this._dragContext.onPointerDownScale=this._transform.scale,this._dragContext.onPointerDownPosition=fe.fromPoint(e.event.getPosition()).elementTransform(this._store.flowHost).div(this._transform.scale)}_startDrag(e,n){let o=this._dragInjector.get(o_);o.initialize(e,bC(e,n)),this._dragContext.draggableItems=[o]}_isValidTrigger(e){return ln(e.event.originalEvent,e.fTrigger)}_bringToFront(e){this._mediator.execute(new Bi(e,this._canvas.fConnectionsContainer().nativeElement))}static \u0275fac=function(n){return new(n||Ql)};static \u0275prov=C({token:Ql,factory:Ql.\u0275fac})};return t=E([P(Xu)],t),t})(),Qu=class{event;static fToken=Symbol("DragConnectionWaypointFinalizeRequest");constructor(i){this.event=i}},Ju=class{connectionId;waypoints;constructor(i,e){this.connectionId=i,this.waypoints=e}},ep=(()=>{class t extends kt{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(q.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 Ju(this._connection.fId(),this._connection.fWaypoints()?.waypoints()||[])}static \u0275fac=(()=>{let e;return function(o){return(e||(e=$(t)))(o||t)}})();static \u0275prov=C({token:t,factory:t.\u0275fac})}return t})(),hB=(()=>{let t=class Jl{_dragContext=p(he);get _fDragHandler(){return this._dragContext.draggableItems[0]}handle(e){this._isDroppedConnectionReassignEvent()&&this._fDragHandler.onPointerUp()}_isDroppedConnectionReassignEvent(){return this._dragContext.draggableItems.some(e=>e instanceof ep)}static \u0275fac=function(n){return new(n||Jl)};static \u0275prov=C({token:Jl,factory:Jl.\u0275fac})};return t=E([P(Qu)],t),t})(),tp=class{event;fTrigger;static fToken=Symbol("DragConnectionWaypointPreparationRequest");constructor(i,e){this.event=i,this.fTrigger=e}},mB=(()=>{let t=class ec{_mediator=p(V);_store=p(L);_dragContext=p(he);_dragInjector=p(bt);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=Bo(e.event.getPosition(),this._flowHost,this._transform),o=this._pickControlPoint(n);if(!o||!this._isValidTrigger(e))return;let r=this._dragInjector.get(ep);r.setPick(o),this._dragContext.onPointerDownScale=this._transform.scale,this._dragContext.onPointerDownPosition=fe.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 G5(this._connections,e)}_isValidTrigger(e){return ln(e.event.originalEvent,e.fTrigger)}_updateConnectionLayer(e){this._mediator.execute(new Bi(e,this._canvas.fConnectionsContainer().nativeElement))}static \u0275fac=function(n){return new(n||ec)};static \u0275prov=C({token:ec,factory:ec.\u0275fac})};return t=E([P(tp)],t),t})(),_B=[rB,aB,sB,oB,lB,cB,dB,fB,mB,hB],np=class{event;static fToken=Symbol("DropToGroupFinalizeRequest");constructor(i){this.event=i}},gB=1,zr=(()=>{class t extends kt{type="move-node-to-parent";kind="assign-to-container";_store=p(L);_dragSession=p(he);get _transform(){return this._store.transform}_candidateGroups=[];_debounceTimer=null;_activeTarget=null;get activeTarget(){return this._activeTarget}initialize(e){this._candidateGroups=e}prepareDragSequence(){for(let{node:e}of this._candidateGroups)e.hostElement.classList.add(ft.GROUPING.DROP_ACTIVE)}onPointerMove(e){this._debounceTimer&&clearTimeout(this._debounceTimer),this._debounceTimer=setTimeout(()=>this._updateActiveTarget(e),gB)}onPointerUp(){this._clearActiveTarget();for(let{node:e}of this._candidateGroups)e.hostElement.classList.remove(ft.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=fe.fromPoint(this._dragSession.onPointerDownPosition).add(e),o=fe.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(ft.GROUPING.OVER_BOUNDARY))}_clearActiveTarget(){this._activeTarget?.node.removeClass(ft.GROUPING.OVER_BOUNDARY),this._activeTarget=null}static \u0275fac=(()=>{let e;return function(o){return(e||(e=$(t)))(o||t)}})();static \u0275prov=C({token:t,factory:t.\u0275fac})}return t})(),ip=class{nodesAndGroups;static fToken=Symbol("CreateDragNodeHierarchyRequest");constructor(i){this.nodesAndGroups=i}},r_=class{rootHandlers;participants;constructor(i,e){this.rootHandlers=i,this.participants=e}},a_=class{fNodeIds;constructor(i){this.fNodeIds=i}},G_="move-node",j_="drag-node";function vB(t){return t.getEvent().kind===j_||t.getEvent().fEventType===G_}var di=(()=>{class t extends kt{type=G_;kind=j_;data(){return new a_(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=$(t)))(o||t)}})();static \u0275prov=C({token:t,factory:t.\u0275fac})}return t})(),op=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,d=this._quantizeSigned(s,this._quantizeStep),f=this._quantizeSigned(c,this._quantizeStep);e.value.x=r,e.value.y=a,e.edges.left=d<0,e.edges.right=d>0,e.edges.top=f<0,e.edges.bottom=f>0,e.overflow.x=Math.abs(d),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)}},s_=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 Py(){return{value:{x:0,y:0},overflow:{x:0,y:0},edges:{left:!1,right:!1,top:!1,bottom:!1}}}var l_=class{_snapper;_hardClamp;_hardResult=Py();_softClamps=[];_softResults=[];constructor(i,e,n){let o=i.get(L).fDraggable;this._snapper=new s_(o,e),this._hardClamp=new op(n.hard,.5);for(let r of n.soft)this._softClamps.push(new op(r.limits,.5)),this._softResults.push(Py())}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 Ry(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 c_=class extends kt{_injector;nodeOrGroup;children;sourceConnectionHandlers;targetConnectionHandlers;type=G_;kind=j_;_startPosition=q.initialize();_startRect=ne.initialize();_applyConstraints=i=>i;_lastSoftResults=[];_deltaConstraints;_constraints;_lastPosition=q.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 tt(e.hostElement)),this._startPosition=me({},e._position)}setConstraints(i){this._constraints=i,this._deltaConstraints=new l_(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(ft.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(ft.DRAG_AND_DROP.DRAGGING),this._emitExpandedEvent()}_startPlus(i){return q.sum(this._startPosition,i)}_redraw(i){this._lastPosition=i,this.nodeOrGroup.updatePosition(i),this._mediator.execute(new Fi(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=Ry(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 Fi(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 $t(i)).rect;return e.set(n,r),r}_buildDelta(i,e){return q.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=Ry(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=[]}},bB=(()=>{let t=class tc{_injector=p(mt);handle({nodesAndGroups:e}){let n=this._createHandlerByNodeId(e),o=this._linkParentsAndCollectRoots(e,n);return new r_(o,Array.from(n.values()))}_createHandlerByNodeId(e){let n=new Map;for(let o of e)n.set(o.fId(),new c_(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||tc)};static \u0275prov=C({token:tc,factory:tc.\u0275fac})};return t=E([P(ip)],t),t})(),rp=class{nodeOrGroup;static fToken=Symbol("BuildDragNodeConstraintsRequest");constructor(i){this.nodeOrGroup=i}},Hr=class{nodeOrGroup;childrenPaddings;static fToken=Symbol("ReadNodeBoundsWithPaddingsRequest");constructor(i,e){this.nodeOrGroup=i,this.childrenPaddings=e}},d_=class{nodeOrGroup;boundingRect;innerRect;paddings;constructor(i,e,n,o){this.nodeOrGroup=i,this.boundingRect=e,this.innerRect=n,this.paddings=o}},yB=(()=>{let t=class nc{_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 d_(e,o,s,a)}_readBoundingRect(e){return this._mediator.execute(new tt(e.hostElement))}_readOwnPaddings(e,n){return this._mediator.execute(new Li(e,n))}static \u0275fac=function(n){return new(n||nc)};static \u0275prov=C({token:nc,factory:nc.\u0275fac})};return t=E([P(Hr)],t),t})(),CB=(()=>{let t=class ic{_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 tt(e.hostElement))}_readParentsChain(e){return this._mediator.execute(new Ro(e))??[]}_buildConstraints(e,n){let o=[],r=uC(),a=[0,0,0,0];for(let s of e){let c=this._readParentBounds(s,a);a=c.paddings;let d=this._calculateDifference(c.innerRect,n);if(this._isAutoExpand(s))o.push(this._makeSoftLimit(s,c.boundingRect,d));else{r=d;break}}return{soft:o,hard:r}}_readParentBounds(e,n){return this._mediator.execute(new Hr(e,n))}_calculateDifference(e,n){return{min:this._calculateMinimumDifference(e,n),max:this._calculateMaximumDifference(e,n)}}_calculateMinimumDifference(e,n){return q.initialize(e.x-n.x,e.y-n.y)}_calculateMaximumDifference(e,n){return q.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||ic)};static \u0275prov=C({token:ic,factory:ic.\u0275fac})};return t=E([P(rp)],t),t})(),ap=class{rootHandlers;participants;static fToken=Symbol("CreateDragNodeHandlerRequest");constructor(i,e){this.rootHandlers=i,this.participants=e}},sp=class{dragHandler;constraints;handlerPool;static fToken=Symbol("AttachSoftParentConnectionDragHandlersToNodeRequest");constructor(i,e,n){this.dragHandler=i,this.constraints=e,this.handlerPool=n}},qr=class{_mediator=p(V);_store=p(L);_behaviour=p(Lo);_source;_target;_sourceRef;_targetRef;_sourceDelta=q.initialize();_targetDelta=q.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 Oi(this._source.fId(),this._source.kind,this._withDelta(this._sourceRef.rect,i)))}setTargetDelta(i){this._targetDelta=i,this._mediator.execute(new Oi(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 bn(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 $t(i))}_withDelta(i,e){return rt.fromRoundedRect(i).addPoint(e)}_resolveRotationContext(i){return this._mediator.execute(new Ln(i))}},Gr=(()=>{class t extends qr{setSourceDelta(e){super.setSourceDelta(e),super.redraw()}static \u0275fac=(()=>{let e;return function(o){return(e||(e=$(t)))(o||t)}})();static \u0275prov=C({token:t,factory:t.\u0275fac})}return t})(),jr=(()=>{class t extends qr{_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=$(t)))(o||t)}})();static \u0275prov=C({token:t,factory:t.\u0275fac})}return t})(),Ur=(()=>{class t extends qr{setTargetDelta(e){super.setTargetDelta(e),this.redraw()}static \u0275fac=(()=>{let e;return function(o){return(e||(e=$(t)))(o||t)}})();static \u0275prov=C({token:t,factory:t.\u0275fac})}return t})(),xB=(()=>{let t=class oc{_store=p(L);_mediator=p(V);_dragInjector=p(bt);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,d={source:[],target:[]};for(let f of this._store.connections.getAll()){let g=a.has(f.fOutputId()),y=s.has(f.fInputId());if(!g&&!y)continue;let T=this._getExistingConnectionHandler(n,f);if(T||(T=this._createConnectionHandler(f,g,y),n.push(T)),g){let w=this._store.outputs.require(f.fOutputId());d.source.push({handler:T,connector:w,baselineRect:this._readConnectorRect(w,c)})}if(y){let w=this._store.inputs.require(f.fInputId());d.target.push({handler:T,connector:w,baselineRect:this._readConnectorRect(w,c)})}}return d}_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(jr):n?r=this._dragInjector.createInstance(Gr):r=this._dragInjector.createInstance(Ur),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 $t(e)).rect;return n.set(o,a),a}static \u0275fac=function(n){return new(n||oc)};static \u0275prov=C({token:oc,factory:oc.\u0275fac})};return t=E([P(sp)],t),t})(),wB=(()=>{let t=class rc{_dragInjector=p(bt);_mediator=p(V);handle({rootHandlers:e,participants:n}){let o=this._collectConnectionHandlers(n);this._applyConstraintsToRoots(e,o);let r=this._dragInjector.createInstance(di);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 sp(e,n,o))}_calculateConstraints(e){return this._mediator.execute(new rp(e))}static \u0275fac=function(n){return new(n||rc)};static \u0275prov=C({token:rc,factory:rc.\u0275fac})};return t=E([P(ap)],t),t})(),lp=class{dragHandler;sourceIds;handlerPool;static fToken=Symbol("AttachTargetConnectionDragHandlersToNodeRequest");constructor(i,e,n){this.dragHandler=i,this.sourceIds=e,this.handlerPool=n}},TB=(()=>{let t=class ac{_store=p(L);_dragInjector=p(bt);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(jr):o=this._dragInjector.createInstance(Ur),o.initialize(n),o}static \u0275fac=function(n){return new(n||ac)};static \u0275prov=C({token:ac,factory:ac.\u0275fac})};return t=E([P(lp)],t),t})(),cp=class{dragHandler;targetIds;handlerPool;static fToken=Symbol("AttachSourceConnectionDragHandlersToNodeRequest");constructor(i,e,n){this.dragHandler=i,this.targetIds=e,this.handlerPool=n}},SB=(()=>{let t=class sc{_store=p(L);_dragInjector=p(bt);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(jr):o=this._dragInjector.createInstance(Gr),o.initialize(n),o}static \u0275fac=function(n){return new(n||sc)};static \u0275prov=C({token:sc,factory:sc.\u0275fac})};return t=E([P(cp)],t),t})(),dp=class{nodeOrGroup;static fToken=Symbol("AttachDragNodeHandlerFromSelectionRequest");constructor(i){this.nodeOrGroup=i}},kB=(()=>{let t=class lc{_mediator=p(V);_store=p(L);_dragSession=p(he);handle({nodeOrGroup:e}){let n=this._collectSelected(e),o=this._withDeepChildren(n),r=this._mediator.execute(new ip(o)),a=this._collectSourceConnectorIds(o),s=this._collectTargetConnectorIds(o);return this._attachConnectionHandlers(r.participants,a,s),this._mediator.execute(new ap(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 Ao(o.fId()));n.push(...r)}return n}_collectSourceConnectorIds(e){return dm(e,n=>this._store.outputs.getAll().filter(o=>o.fNodeId===n.fId()).map(o=>o.fId()))}_collectTargetConnectorIds(e){return dm(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 cp(a,o,r)),this._mediator.execute(new lp(a,n,r))}static \u0275fac=function(n){return new(n||lc)};static \u0275prov=C({token:lc,factory:lc.\u0275fac})};return t=E([P(dp)],t),t})(),IB=[bB,CB,wB,TB,SB,xB,yB,kB];function MB(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,d,f,g=1/0,y,T,w=1/0,N=(G,X)=>{let le=X<0?-X:X;le<=e&&le<g&&(g=le,d=G,f=X)},H=(G,X)=>{let le=X<0?-X:X;le<=e&&le<w&&(w=le,y=G,T=X)};for(let G=0;G<t.length;G++){let X=t[G],le=X.x,Ce=X.y,Te=le+X.width,je=Ce+X.height,Bt=X.gravityCenter.x,ct=X.gravityCenter.y;N(le,n-le),N(Te,n-Te),N(Bt,s-Bt),N(le,r-le),N(Te,r-Te),H(Ce,o-Ce),H(je,o-je),H(ct,c-ct),H(Ce,a-Ce),H(je,a-je)}return{x:{guide:d,delta:f},y:{guide:y,delta:T}}}var Oy=["left","top","width","height"],up=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 Oy){let n=i[e];n!=null&&(this._element.style[e]=`${n}px`)}}clearRect(){for(let i of Oy)this._element.style.removeProperty(i)}destroy(){this._element.remove()}},u_=class{_horizontal;_vertical;constructor(i,e){this._horizontal=new up(i,e),this._vertical=new up(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()}},pp=class{static fToken=Symbol("MagneticLinesPreparationRequest")},DB=(()=>{let t=class cc{_mediator=p(V);_store=p(L);_browser=p(at);_injector=p(mt);_dragSession=p(he);_renderer;handle(e){let n=this._store.instances.get(Ye.MAGNETIC_LINES);if(!n)return;let o=this._dragSession.draggableItems.find(r=>r instanceof di);o&&o.setMagneticLines(new p_(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 u_(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 tt(r.hostElement)))}static \u0275fac=function(n){return new(n||cc)};static \u0275prov=C({token:cc,factory:cc.\u0275fac})};return t=E([P(pp)],t),t})(),p_=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(Ye.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 MB(this._rects,i,this._alignThreshold)}clearGuides(){this._renderer.hideAll(),this._timerId&&(clearTimeout(this._timerId),this._timerId=null)}},Fy=["top","center","bottom"],Ny=["left","center","right"];function EB(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,d=i.gravityCenter.y,f=PB(t,i,o,r,a,s,c,d,e,n),g=RB(t,i,o,r,a,s,c,d,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 PB(t,i,e,n,o,r,a,s,c,d){let f=1/0,g,y=0,T,w=[],N=0,H=[],G=[],X=[];for(let le=0;le<Fy.length;le++){let Ce=le===0?n:le===1?s:r;H.length=0,G.length=0,X.length=0;let Te=1/0,je=-1/0,Bt=0,ct=1/0,_t=1/0;for(let He=0;He<t.length;He++){let Ne=t[He],nr=le===0?Ne.y:le===1?Ne.gravityCenter.y:Ne.y+Ne.height,Dh=Ce-nr,On=yo(Dh);if(On>c)continue;H.push(He),G.push(Ne.x),X.push(Ne.x+Ne.width);let ir=Ne.y,or=Ne.y+Ne.height;ir<Te&&(Te=ir),or>je&&(je=or),(On<ct||On===ct&&He<_t)&&(ct=On,Bt=nr,_t=He)}let nt=H.length;if(nt<2)continue;xC(H,G,X);let st=0;for(;st<nt&&G[st]<=a;)st++;let xi=st>0&&st<nt,wt,Vt;xi?(wt=st-1,Vt=st):st<=0?(wt=0,Vt=1):(wt=nt-2,Vt=nt-1);let zt=G[Vt]-X[wt];if(zt<0)continue;let ht;if(xi){ht=X[wt]+zt;let He=ht+i.width,Ne=G[Vt]-He;if(yo(Ne-zt)>d)continue}else st<=0?ht=G[0]-zt-i.width:ht=X[nt-1]+zt;let tr=e-ht,wi=yo(tr);if(wi>d||wi>=f)continue;let pn=OB(H,G,X,Te,je);if(xi){let He=ht,Ne=ht+i.width;pn.push({left:X[wt],top:Te,width:He-X[wt],height:je-Te}),pn.push({left:Ne,top:Te,width:G[Vt]-Ne,height:je-Te})}else if(st<=0){let He=ht+i.width;pn.push({left:He,top:Te,width:G[0]-He,height:je-Te})}else pn.push({left:X[nt-1],top:Te,width:ht-X[nt-1],height:je-Te});let Mh=Ce-Bt;f=wi,g=tr,y=zt,T=Fy[le],w=pn,N=Mh}if(!(g===void 0||T===void 0))return{delta:g,absDelta:f,gap:y,rects:w,alignMode:T,crossDelta:N}}function RB(t,i,e,n,o,r,a,s,c,d){let f=1/0,g,y=0,T,w=[],N=0,H=[],G=[],X=[];for(let le=0;le<Ny.length;le++){let Ce=le===0?e:le===1?a:o;H.length=0,G.length=0,X.length=0;let Te=1/0,je=-1/0,Bt=0,ct=1/0,_t=1/0;for(let He=0;He<t.length;He++){let Ne=t[He],nr=le===0?Ne.x:le===1?Ne.gravityCenter.x:Ne.x+Ne.width,Dh=Ce-nr,On=yo(Dh);if(On>c)continue;H.push(He),G.push(Ne.y),X.push(Ne.y+Ne.height);let ir=Ne.x,or=Ne.x+Ne.width;ir<Te&&(Te=ir),or>je&&(je=or),(On<ct||On===ct&&He<_t)&&(ct=On,Bt=nr,_t=He)}let nt=H.length;if(nt<2)continue;xC(H,G,X);let st=0;for(;st<nt&&G[st]<=s;)st++;let xi=st>0&&st<nt,wt,Vt;xi?(wt=st-1,Vt=st):st<=0?(wt=0,Vt=1):(wt=nt-2,Vt=nt-1);let zt=G[Vt]-X[wt];if(zt<0)continue;let ht;if(xi){ht=X[wt]+zt;let He=ht+i.height,Ne=G[Vt]-He;if(yo(Ne-zt)>d)continue}else st<=0?ht=G[0]-zt-i.height:ht=X[nt-1]+zt;let tr=n-ht,wi=yo(tr);if(wi>d||wi>=f)continue;let pn=FB(H,G,X,Te,je);if(xi){let He=ht,Ne=ht+i.height;pn.push({left:Te,top:X[wt],width:je-Te,height:He-X[wt]}),pn.push({left:Te,top:Ne,width:je-Te,height:G[Vt]-Ne})}else if(st<=0){let He=ht+i.height;pn.push({left:Te,top:He,width:je-Te,height:G[0]-He})}else pn.push({left:Te,top:X[nt-1],width:je-Te,height:ht-X[nt-1]});let Mh=Ce-Bt;f=wi,g=tr,y=zt,T=Ny[le],w=pn,N=Mh}if(!(g===void 0||T===void 0))return{delta:g,absDelta:f,gap:y,rects:w,alignMode:T,crossDelta:N}}function OB(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 FB(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 xC(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],d=t[s];if(c<o||c===o&&d<a)break;i[s+1]=c,e[s+1]=e[s],t[s+1]=d,s--}i[s+1]=o,e[s+1]=r,t[s+1]=a}}function yo(t){return t<0?-t:t}var f_=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()}},h_=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 f_(this._browser,this._hostElement,this._className);return this._pool.push(e),e}},fp=class{static fToken=Symbol("MagneticRectsPreparationRequest")},NB=(()=>{let t=class dc{_mediator=p(V);_store=p(L);_browser=p(at);_injector=p(mt);_dragSession=p(he);_renderer;handle(e){let n=this._store.instances.get(Ye.MAGNETIC_RECTS);if(!n)return;let o=this._dragSession.draggableItems.find(r=>r instanceof di);o&&o.setMagneticRects(new m_(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 h_(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 tt(r.hostElement)))}static \u0275fac=function(n){return new(n||dc)};static \u0275prov=C({token:dc,factory:dc.\u0275fac})};return t=E([P(fp)],t),t})(),m_=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(Ye.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 EB(this._rects,i,this._alignThreshold,this._spacingThreshold)}clearGuides(){this._renderer.hideAll(),this._timerId&&(clearTimeout(this._timerId),this._timerId=null)}},hp=class{event;static fToken=Symbol("DragNodeFinalizeRequest");constructor(i){this.event=i}},mp=class{nodes;fNodes;constructor(i){this.nodes=i,this.fNodes=i}},AB=(()=>{let t=class uc{_mediator=p(V);_store=p(L);_dragSession=p(he);_dragHandler;handle({event:e}){if(this._dragHandler=this._getDragHandler(),!this._dragHandler)return;let n=this._buildDragDelta(e.getPosition()),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(vB)}_buildDragDelta(e){return fe.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 mp(a)}_emitNodeIntersectIfNeeded(e){if(!this._isDraggedJustOneNode(e)||!this._store.fDraggable?.fEmitOnNodeIntersect)return;let n=e.roots[0].nodeOrGroup;queueMicrotask(()=>this._mediator.execute(new Lu(n)))}_isDraggedJustOneNode(e){return e.roots.length===1}static \u0275fac=function(n){return new(n||uc)};static \u0275prov=C({token:uc,factory:uc.\u0275fac})};return t=E([P(hp)],t),t})(),_p=class{event;trigger;static fToken=Symbol("DragNodePreparationRequest");constructor(i,e){this.event=i,this.trigger=e}},LB=(()=>{let t=class pc{_mediator=p(V);_store=p(L);_dragSession=p(he);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 pp),this._mediator.execute(new fp))}_canStartDrag(e,n){return this._dragSession.isEmpty()&&this._isDragHandle(e.targetElement)&&ln(e.originalEvent,n)}_isDragHandle(e){return yr(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=fe.fromPoint(e.getPosition()).elementTransform(this._store.flowHost).div(this._store.transform.scale)}_buildDragNodeHandler(e){return(e.fSelectionDisabled()||!e.isSelected())&&queueMicrotask(()=>{this._mediator.execute(new No(e))}),this._mediator.execute(new dp(e))}static \u0275fac=function(n){return new(n||pc)};static \u0275prov=C({token:pc,factory:pc.\u0275fac})};return t=E([P(_p)],t),t})(),BB=[...IB,DB,NB,AB,LB],__=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}},VB=(()=>{let t=class fc{_dragSession=p(he);_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 zr)}_emitDropToGroupEvent(e,n){this._store.fDraggable?.fDropToGroup.emit(new __(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 di);if(!e)throw new Error("DropToGroup requires DragNodeHandler.");return e}static \u0275fac=function(n){return new(n||fc)};static \u0275prov=C({token:fc,factory:fc.\u0275fac})};return t=E([P(np)],t),t})(),gp=class{event;static fToken=Symbol("DropToGroupPreparationRequest");constructor(i){this.event=i}},vp=class{candidates;static fToken=Symbol("SortDropCandidatesByLayerRequest");constructor(i){this.candidates=i}},zB=(()=>{let t=class hc{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||hc)};static \u0275prov=C({token:hc,factory:hc.\u0275fac})};return t=E([P(vp)],t),t})(),g_=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}},bp=class{externalItem;static fToken=Symbol("DragExternalItemCreatePlaceholderRequest");constructor(i){this.externalItem=i}},HB=(()=>{let t=class mc{_browser=p(at);_containerRef=p(Wa);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 fm(this._createViewRef(e),this._browser.document)}_fromHost(e){return um(e)}_createViewRef(e){let n=this._containerRef.createEmbeddedView(e);return n.detectChanges(),n}static \u0275fac=function(n){return new(n||mc)};static \u0275prov=C({token:mc,factory:mc.\u0275fac})};return t=E([P(bp)],t),t})(),yp=class{externalItem;static fToken=Symbol("DragExternalItemCreatePreviewRequest");constructor(i){this.externalItem=i}},qB=(()=>{let t=class _c{_browser=p(at);_containerRef=p(Wa);handle({externalItem:e}){let{hostElement:n,preview:o}=e,r=o(),a=r?this._fromTemplate(r):this._fromHost(n);return this._setPreviewStyles(a),hy(a),a.classList.add("f-external-item-preview"),a}_fromTemplate(e){return fm(this._createViewRef(e),this._browser.document)}_fromHost(e){return um(e)}_createViewRef(e){let n=this._containerRef.createEmbeddedView(e);return n.detectChanges(),n}_setPreviewStyles(e){pm(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||_c)};static \u0275prov=C({token:_c,factory:_c.\u0275fac})};return t=E([P(yp)],t),t})(),Cp=class{event;static fToken=Symbol("DragExternalItemFinalizeRequest");constructor(i){this.event=i}},v_=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}},GB="external-item",jB="drag-external-item";function UB(t){return t.getEvent().kind===jB||t.getEvent().fEventType===GB}var $B=(()=>{let t=class gc{_result=p(ui);_mediator=p(V);_store=p(L);_dragSession=p(he);_browser=p(at);get _createNodeEmitter(){return this._store.fDraggable?.fCreateNode}handle(e){let n=this._findExternalItemHandler();if(!n)return;let 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=>UB(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 zr);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 v_(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 tt(this._result.getData().preview))}static \u0275fac=function(n){return new(n||gc)};static \u0275prov=C({token:gc,factory:gc.\u0275fac})};return t=E([P(Cp)],t),t})(),b_=class{data;constructor(i){this.data=i}},xp=class extends kt{_externalItem;_pointerDownClientPosition;type="external-item";kind="drag-external-item";data(){return new b_(this._externalItem.data())}_result;_mediator;_browser;_store;_previewEl;_placeholderEl;_startRect=ne.initialize();_pointerDownRect=ne.initialize();_absoluteOffsetFromFlow=q.initialize();_grabOffsetFromPointer=q.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(ui),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 g_(i,this._startRect,uC());this._applyConstraints=n=>e.limit(n)}_getStartRect(){return this._mediator.execute(new tt(this._externalItem.hostElement))}prepareDragSequence(){this._pointerDownRect=this._readAbsoluteRect(this._host),this._absoluteOffsetFromFlow=fe.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 yp(this._externalItem));return this._externalItem.previewMatchSize()&&this._matchSize(i,this._pointerDownRect),i.style.transform=Ay(this._pointerDownRect),i}_createPlaceholder(){return this._mediator.execute(new bp(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=fe.fromPoint(this._startRect).add(o),a=this._toAbsolutePoint(r).add(this._absoluteOffsetFromFlow);this._previewEl.style.transform=Ay(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=fe.fromPoint(this._transform.position).add(this._transform.scaledPosition);return fe.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 fe.fromPoint(r).sub(this._startRect)}_toFlowPoint(i){let e=this._getFlowHostAbsolutePosition(),n=fe.fromPoint(this._transform.position).add(this._transform.scaledPosition);return fe.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 q.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 fe.fromPoint(i).add(q.initialize(n,e))}};function Ay({x:t,y:i}){return`translate3d(${Math.round(t)}px, ${Math.round(i)}px, 0)`}var wp=class{event;fTrigger;static fToken=Symbol("DragExternalItemPreparationRequest");constructor(i,e){this.event=i,this.fTrigger=e}};function WB(t){return!!t.closest?.("[fExternalItem]")}function KB(t){return t.closest("[fExternalItem]")}var YB=(()=>{class t{_byHost=new Map;_items=W([]);items=S(()=>this._items());getByElement(e){let n=KB(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=C({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var XB=(()=>{let t=class vc{_apiService=p(YB);_dragSession=p(he);_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()||!ln(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=fe.fromPoint(e.getPosition()).elementTransform(this._flowHost).div(r),this._dragSession.draggableItems=[new xp(this._injector,o,e.getPosition())]}_resolveExternalItem(e){return this._apiService.getByElement(e)}static \u0275fac=function(n){return new(n||vc)};static \u0275prov=C({token:vc,factory:vc.\u0275fac})};return t=E([P(wp)],t),t})(),Tp=class{event;static fToken=Symbol("PreventDefaultIsExternalItemRequest");constructor(i){this.event=i}},ZB=(()=>{let t=class bc{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=WB(e)}catch{}return n}static \u0275fac=function(n){return new(n||bc)};static \u0275prov=C({token:bc,factory:bc.\u0275fac})};return t=E([P(Tp)],t),t})(),QB=[HB,qB,$B,XB,ZB],JB=(()=>{let t=class yc{_mediator=p(V);_dragContext=p(he);_store=p(L);_dragInjector=p(bt);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 tf(a));s.length&&(o=o.filter(c=>s.includes(c.node.fId())))}let r=this._dragInjector.get(zr);r.initialize(o),this._dragContext.draggableItems.push(r)}_canPrepare(){return this._hasMoveDrag()||this._hasExternalDrag()}_hasMoveDrag(){return this._dragContext.draggableItems.some(e=>e instanceof di)}_hasExternalDrag(){return this._dragContext.draggableItems.some(e=>e instanceof xp)}_sortedTargetsForDrop(){let e=this._getDraggedNodes(),n=e.some(s=>s instanceof Jm),o=this._withParents(e),a=this._eligibleTargets(o,n).map(s=>{let c=this._mediator.execute(new tt(s.hostElement));return{node:s,rect:c}});return this._mediator.execute(new vp(a))}_getDraggedNodes(){let e=this._dragContext.draggableItems.find(n=>n instanceof di);return e?e.items.map(n=>n.nodeOrGroup):[]}_withParents(e){return e.reduce((n,o)=>{n.push(o);let r=this._mediator.execute(new Ro(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 Jm):o}static \u0275fac=function(n){return new(n||yc)};static \u0275prov=C({token:yc,factory:yc.\u0275fac})};return t=E([P(gp)],t),t})(),e9=[zB,JB,VB],Sp=class{event;static fToken=Symbol("PinchToZoomFinalizeRequest");constructor(i){this.event=i}},t9=.5,kp=(()=>{class t extends kt{type="pinch-to-zoom";kind="pinch-to-zoom";_store=p(L);get _flowHost(){return this._store.flowHost}get _canvas(){return this._store.fCanvas}get _zoomComponent(){return this._store.instances.require(Ye.ZOOM)}_startDistance=null;_startScale=null;_touches;initialize(e){this._touches=e}prepareDragSequence(){let e=Ly(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=Ly(n.touches),r=n9(n.touches);if(o==null||r==null){this._reset();return}if(Math.abs(o-this._startDistance)<t9)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 fe.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=$(t)))(o||t)}})();static \u0275prov=C({token:t,factory:t.\u0275fac})}return t})();function n9(t){if(t.length!==2)return null;let i=t[0],e=t[1];return q.initialize((i.clientX+e.clientX)/2,(i.clientY+e.clientY)/2)}function Ly(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 i9=(()=>{let t=class Cc{_dragSession=p(he);handle(e){if(this._hasPinchZoomHandler())for(let n of this._dragSession.draggableItems)n.onPointerUp?.()}_hasPinchZoomHandler(){return this._dragSession.draggableItems.some(e=>e instanceof kp)}static \u0275fac=function(n){return new(n||Cc)};static \u0275prov=C({token:Cc,factory:Cc.\u0275fac})};return t=E([P(Sp)],t),t})(),Ip=class{event;static fToken=Symbol("PinchToZoomPreparationRequest");constructor(i){this.event=i}},o9=(()=>{let t=class xc{_dragInjector=p(bt);_store=p(L);_dragSession=p(he);handle({event:e}){this._canStart(e)&&(this._dragSession.onPointerDownScale=1,this._dragSession.onPointerDownPosition=new fe,this._dragSession.draggableItems=[this._getHandler(e)])}_canStart(e){return this._dragSession.isEmpty()&&e.touches?.length===2&&!e.isEventInLockedContext&&this._hasZoomComponent()}_hasZoomComponent(){return this._store.instances.has(Ye.ZOOM)}_getHandler(e){let n=this._dragInjector.get(kp);return n.initialize(e.touches),n}static \u0275fac=function(n){return new(n||xc)};static \u0275prov=C({token:xc,factory:xc.\u0275fac})};return t=E([P(Ip)],t),t})(),r9=[o9,i9],Mp=class{event;static fToken=Symbol("SelectionAreaFinalizeRequest");constructor(i){this.event=i}},a9=(()=>{let t=class wc{_dragSession=p(he);handle(e){this._isValid()&&this._dragSession.draggableItems.forEach(n=>{n.onPointerUp?.()})}_isValid(){return this._dragSession.draggableItems.some(e=>e.getEvent().kind==="selection-area")}static \u0275fac=function(n){return new(n||wc)};static \u0275prov=C({token:wc,factory:wc.\u0275fac})};return t=E([P(Mp)],t),t})(),y_=(()=>{class t extends kt{type="selection-area";kind="selection-area";_store=p(L);_dragSession=p(he);_mediator=p(V);_canBeSelected=[];_selectedByMove=[];get _transform(){return this._store.transform}get _canvasPosition(){return fe.fromPoint(this._transform.position).add(this._transform.scaledPosition)}get _instance(){return this._store.instances.require(Ye.SELECTION_AREA)}prepareDragSequence(){this._canBeSelected=this._mediator.execute(new mf),this._show(),this._draw(ne.initialize(this._dragSession.onPointerDownPosition.x,this._dragSession.onPointerDownPosition.y))}onPointerMove(e){let n=fe.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 d=ne.addPoint(ne.mult(c.fRect,this._transform.scale),this._canvasPosition);ne.intersectionWithRect(d,s)&&(c.element.markAsSelected(),this._selectedByMove.push(c.element))}),this._mediator.execute(new ri)}_getMinimumPoint(e,n){return q.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=$(t)))(o||t)}})();static \u0275prov=C({token:t,factory:t.\u0275fac})}return t})(),Dp=class{event;static fToken=Symbol("SelectionAreaPreparationRequest");constructor(i){this.event=i}},s9=(()=>{let t=class Tc{_store=p(L);_dragSession=p(he);_dragInjector=p(bt);get _instance(){return this._store.instances.get(Ye.SELECTION_AREA)}handle(e){this._isValid(e)&&(this._dragSession.onPointerDownScale=1,this._dragSession.onPointerDownPosition=fe.fromPoint(e.event.getPosition()).elementTransform(this._store.flowHost),this._dragSession.draggableItems=[this._dragInjector.createInstance(y_)])}_isValid(e){return!!this._instance&&this._dragSession.isEmpty()&&ln(e.event.originalEvent,this._instance.fTrigger)}static \u0275fac=function(n){return new(n||Tc)};static \u0275prov=C({token:Tc,factory:Tc.\u0275fac})};return t=E([P(Dp)],t),t})(),l9=[s9,a9],Ep=class{rect;childrenBounds;static fToken=Symbol("ApplyChildResizeConstraintsRequest");constructor(i,e){this.rect=i,this.childrenBounds=e}},c9=(()=>{let t=class Sc{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||Sc)};static \u0275prov=C({token:Sc,factory:Sc.\u0275fac})};return t=E([P(Ep)],t),t})(),Pp=class{rect;limits;static fToken=Symbol("ApplyParentResizeConstraintsRequest");constructor(i,e){this.rect=i,this.limits=e}},d9=(()=>{let t=class kc{_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 Fi(e.nodeOrGroup.fId(),n)),e.nodeOrGroup.redraw()}static \u0275fac=function(n){return new(n||kc)};static \u0275prov=C({token:kc,factory:kc.\u0275fac})};return t=E([P(Pp)],t),t})(),Rp=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}},By={[Tn.LEFT]:{x:-1,y:0},[Tn.LEFT_TOP]:{x:-1,y:-1},[Tn.TOP]:{x:0,y:-1},[Tn.RIGHT_TOP]:{x:1,y:-1},[Tn.RIGHT]:{x:1,y:0},[Tn.RIGHT_BOTTOM]:{x:1,y:1},[Tn.BOTTOM]:{x:0,y:1},[Tn.LEFT_BOTTOM]:{x:-1,y:1}},u9=(()=>{let t=class Ic{handle({originalRect:e,difference:n,handleType:o,minimumSize:r}){let a=this._changeSizeInRect(e,n,By[o],r);return this._changePosition(e,n,By[o],a)}_changeSizeInRect(e,n,o,r){let a=e.width+o.x*n.x,s=e.height+o.y*n.y,c=0,d=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&&(d=s,s=Math.abs(s)),s<r.height&&(o.y===-1&&(d+=s-r.height),s=r.height),ne.initialize(c,d,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||Ic)};static \u0275prov=C({token:Ic,factory:Ic.\u0275fac})};return t=E([P(Rp)],t),t})(),Op=class{nodeOrGroup;paddings;static fToken=Symbol("CalculateDirectChildrenUnionRectRequest");constructor(i,e){this.nodeOrGroup=i,this.paddings=e}},p9=(()=>{let t=class Mc{_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 tt(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||Mc)};static \u0275prov=C({token:Mc,factory:Mc.\u0275fac})};return t=E([P(Op)],t),t})(),$r=class{nodeOrGroup;rect;static fToken=Symbol("CalculateResizeLimitsRequest");constructor(i,e){this.nodeOrGroup=i,this.rect=e}},f9=(()=>{let t=class Dc{_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:St.initialize(r[0]+r[2],r[1]+r[3])}}_calculateNodePaddings(e,n){return this._mediator.execute(new Li(e,n))}_getNormalizedChildrenBounds(e,n){return this._mediator.execute(new Op(e,n))}_getParentsChain(e){return this._mediator.execute(new Ro(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 Hr(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||Dc)};static \u0275prov=C({token:Dc,factory:Dc.\u0275fac})};return t=E([P($r)],t),t})(),Fp=class{event;static fToken=Symbol("ResizeNodeFinalizeRequest");constructor(i){this.event=i}},wC="node-resize",TC="resize-node";function h9(t){return t.getEvent().kind===TC||t.getEvent().fEventType===wC}var m9=(()=>{let t=class Ec{_dragSession=p(he);handle(e){this._isNodeResizeHandler()&&this._dragSession.draggableItems.forEach(n=>n.onPointerUp?.())}_isNodeResizeHandler(){return this._dragSession.draggableItems.some(e=>h9(e))}static \u0275fac=function(n){return new(n||Ec)};static \u0275prov=C({token:Ec,factory:Ec.\u0275fac})};return t=E([P(Fp)],t),t})(),C_=class{fNodeId;constructor(i){this.fNodeId=i}},wr=(function(t){return t.CENTER_OF_MASS="center-of-mass",t.X_RANGE="x-range",t.DOWNSTREAM_CONNECTIONS="downstream-connections",t})(wr||{}),Np=(function(t){return t.STOP="stop",t.CHAIN_PUSH="chain-push",t})(Np||{}),Tr=(function(t){return t.GLOBAL="global",t.GROUP="group",t.CONNECTED_SUBGRAPH="connected-subgraph",t})(Tr||{}),Ut=(function(t){return t.VERTICAL="vertical",t.HORIZONTAL="horizontal",t.BOTH="both",t})(Ut||{}),U_=(function(t){return t.EDGE_BASED="edge-based",t.CENTER_BASED="center-based",t})(U_||{}),_9=new _e("F_REFLOW_CONFIG"),an={enabled:!0,mode:wr.CENTER_OF_MASS,collision:Np.STOP,scope:Tr.GLOBAL,axis:Ut.BOTH,deltaSource:U_.EDGE_BASED,spacing:{vertical:32,horizontal:32},maxCascadeDepth:8,maxAbsoluteShiftPerPlan:1e4};function Vy(t){return t?{enabled:t.enabled??an.enabled,mode:t.mode??an.mode,collision:t.collision??an.collision,scope:t.scope??an.scope,axis:t.axis??an.axis,deltaSource:t.deltaSource??an.deltaSource,spacing:{vertical:t.spacing?.vertical??an.spacing.vertical,horizontal:t.spacing?.horizontal??an.spacing.horizontal},maxCascadeDepth:t.maxCascadeDepth??an.maxCascadeDepth,maxAbsoluteShiftPerPlan:t.maxAbsoluteShiftPerPlan??an.maxAbsoluteShiftPerPlan}:Mt(me({},an),{spacing:me({},an.spacing)})}var ws=t=>({sourceNodeId:t,shifts:[],deltaEdges:{top:0,right:0,bottom:0,left:0}});function x_(t,i){return{top:t.y-i.y,right:i.x+i.width-(t.x+t.width),bottom:i.y+i.height-(t.y+t.height),left:t.x-i.x}}var w_=class{calculate({baselineRect:i,nextRect:e,candidateRect:n,axis:o}){let r=x_(i,e),a=o===Ut.VERTICAL||o===Ut.BOTH?this._verticalShift(r,i,e,n):0,s=o===Ut.HORIZONTAL||o===Ut.BOTH?this._horizontalShift(r,i,e,n):0;return s===0&&a===0?null:{x:s,y:a}}_verticalShift(i,e,n,o){let r=e.y+e.height,a=e.y,s=n.y+n.height,c=n.y,d=o.y,f=o.y+o.height;return i.bottom>0&&d>=r||i.bottom<0&&d>=s?i.bottom:i.top>0&&f<=a||i.top<0&&f<=c?-i.top:0}_horizontalShift(i,e,n,o){let r=e.x+e.width,a=e.x,s=n.x+n.width,c=n.x,d=o.x,f=o.x+o.width;return i.right>0&&d>=r||i.right<0&&d>=s?i.right:i.left>0&&f<=a||i.left<0&&f<=c?-i.left:0}},T_=class{calculate({baselineRect:i,nextRect:e,candidateRect:n,axis:o}){let r=o===Ut.VERTICAL||o===Ut.BOTH?this._verticalShift(i,e,n):0,a=o===Ut.HORIZONTAL||o===Ut.BOTH?this._horizontalShift(i,e,n):0;return a===0&&r===0?null:{x:a,y:r}}_verticalShift(i,e,n){let o=e.height-i.height;if(o===0)return 0;let r=i.y+i.height/2,a=n.y+n.height/2;return o>0&&a>r||o<0&&a>r?o:0}_horizontalShift(i,e,n){let o=e.width-i.width;if(o===0)return 0;let r=i.x+i.width/2,a=n.x+n.width/2;return o>0&&a>r||o<0&&a>r?o:0}},S_=class{select({sourceId:i,candidates:e}){return e.filter(n=>n.id!==i)}},k_=class{select({sourceId:i,sourceBaselineRect:e,sourceNextRect:n,candidates:o,axis:r}){return o.filter(a=>{if(a.id===i)return!1;switch(r){case Ut.VERTICAL:return this._overlapsX(a.rect,e)||this._overlapsX(a.rect,n);case Ut.HORIZONTAL:return this._overlapsY(a.rect,e)||this._overlapsY(a.rect,n);case Ut.BOTH:default:return this._overlapsX(a.rect,e)||this._overlapsX(a.rect,n)||this._overlapsY(a.rect,e)||this._overlapsY(a.rect,n)}})}_overlapsX(i,e){return!(i.x+i.width<=e.x||e.x+e.width<=i.x)}_overlapsY(i,e){return!(i.y+i.height<=e.y||e.y+e.height<=i.y)}},I_=class{_maxDepth;_visited=new Set;constructor(i){this._maxDepth=i}visit(i){return this._visited.has(i)||this._visited.size>=this._maxDepth?!1:(this._visited.add(i),!0)}has(i){return this._visited.has(i)}size(){return this._visited.size}},M_=class{_maxCascadeDepth;constructor(i){this._maxCascadeDepth=i}select({sourceId:i,candidates:e,connections:n}){let o=new Set,r=new I_(this._maxCascadeDepth),a=[i],s=this._buildAdjacency(n);for(;a.length>0;){let c=a.shift();if(!r.visit(c))continue;let d=s.get(c);if(d)for(let f of d)o.has(f)||f===i||(o.add(f),a.push(f))}return e.filter(c=>c.id!==i&&o.has(c.id))}_buildAdjacency(i){let e=new Map;for(let n of i){let o=e.get(n.outputNodeId);o?o.push(n.inputNodeId):e.set(n.outputNodeId,[n.inputNodeId])}return e}},D_=class{filter({candidates:i}){return i}},E_=class{filter({sourceCandidate:i,candidates:e}){let n=i?.parentId??null;return e.filter(o=>(o.parentId??null)===n)}},P_=class{filter({sourceCandidate:i,candidates:e,connections:n}){if(!i)return e;let o=this._buildBidirectionalAdjacency(n),r=this._bfs(i.id,o);return e.filter(a=>r.has(a.id))}_buildBidirectionalAdjacency(i){let e=new Map,n=(o,r)=>{let a=e.get(o);a?a.push(r):e.set(o,[r])};for(let o of i)n(o.outputNodeId,o.inputNodeId),n(o.inputNodeId,o.outputNodeId);return e}_bfs(i,e){let n=new Set([i]),o=[i];for(;o.length>0;){let r=o.shift(),a=e.get(r);if(a)for(let s of a)n.has(s)||(n.add(s),o.push(s))}return n}},R_=class{resolve({sourceNextRect:i,rawShifts:e,pool:n,spacing:o,maxAbsoluteShift:r}){let a=new Set(e.map(d=>d.candidate.id)),s=n.filter(d=>!a.has(d.id)).map(d=>d.rect),c=[];for(let d of e){let f=d.candidate.rect,g=d.shift.x,y=d.shift.y;if(y!==0&&(y=this._clampVerticalShift(f,y,s,o.vertical)),g!==0&&(g=this._clampHorizontalShift(f,g,s,o.horizontal)),g=this._clampAbs(g,r),y=this._clampAbs(y,r),g===0&&y===0)continue;let T=ne.initialize(f.x+g,f.y+y,f.width,f.height);c.push({candidate:d.candidate,fromRect:f,toRect:T,toPosition:{x:f.x+g,y:f.y+y}})}return c}_clampVerticalShift(i,e,n,o){if(e>0){let a=e;for(let s of n){if(!this._overlapsOnX(i,s)||s.y<i.y+i.height)continue;let c=s.y-(i.y+i.height),d=Math.max(0,c-o);d<a&&(a=d)}return a}let r=e;for(let a of n){if(!this._overlapsOnX(i,a)||a.y+a.height>i.y)continue;let s=i.y-(a.y+a.height),c=Math.min(0,-(s-o));c>r&&(r=c)}return r}_clampHorizontalShift(i,e,n,o){if(e>0){let a=e;for(let s of n){if(!this._overlapsOnY(i,s)||s.x<i.x+i.width)continue;let c=s.x-(i.x+i.width),d=Math.max(0,c-o);d<a&&(a=d)}return a}let r=e;for(let a of n){if(!this._overlapsOnY(i,a)||a.x+a.width>i.x)continue;let s=i.x-(a.x+a.width),c=Math.min(0,-(s-o));c>r&&(r=c)}return r}_overlapsOnX(i,e){return!(i.x+i.width<=e.x||e.x+e.width<=i.x)}_overlapsOnY(i,e){return!(i.y+i.height<=e.y||e.y+e.height<=i.y)}_clampAbs(i,e){return i>e?e:i<-e?-e:i}},O_=class{_maxCascadeDepth;constructor(i){this._maxCascadeDepth=i}resolve({rawShifts:i,pool:e,spacing:n,maxAbsoluteShift:o}){let r=new Map;for(let d of i){let f=this._clampAbs(d.shift.x,o),g=this._clampAbs(d.shift.y,o);f===0&&g===0||r.set(d.candidate.id,{candidate:d.candidate,dx:f,dy:g,toRect:this._shifted(d.candidate.rect,f,g)})}let a=0,s=!0;for(;s&&a<this._maxCascadeDepth;){s=!1,a++;for(let d of[...r.values()])for(let f of e){if(r.has(f.id))continue;let g=this._computePush(d.toRect,f.rect,n);if(!g)continue;let y=this._clampAbs(g.dx,o),T=this._clampAbs(g.dy,o);y===0&&T===0||(r.set(f.id,{candidate:f,dx:y,dy:T,toRect:this._shifted(f.rect,y,T)}),s=!0)}}let c=[];for(let d of r.values())c.push({candidate:d.candidate,fromRect:d.candidate.rect,toRect:d.toRect,toPosition:{x:d.toRect.x,y:d.toRect.y}});return c}_computePush(i,e,n){let o=0,r=0;if(this._overlapsX(i,e)){let a=i.y+i.height,s=e.y+e.height;a+n.vertical>e.y&&i.y<s&&(i.y<e.y?r=a+n.vertical-e.y:r=i.y-s-n.vertical)}if(this._overlapsY(i,e)){let a=i.x+i.width,s=e.x+e.width;a+n.horizontal>e.x&&i.x<s&&(i.x<e.x?o=a+n.horizontal-e.x:o=i.x-s-n.horizontal)}return o===0&&r===0?null:{dx:o,dy:r}}_shifted(i,e,n){return ne.initialize(i.x+e,i.y+n,i.width,i.height)}_overlapsX(i,e){return!(i.x+i.width<=e.x||e.x+e.width<=i.x)}_overlapsY(i,e){return!(i.y+i.height<=e.y||e.y+e.height<=i.y)}_clampAbs(i,e){return i>e?e:i<-e?-e:i}},SC=(()=>{class t{_edgeBased=new w_;_centerBased=new T_;_centerOfMassSelection=new S_;_xRangeSelection=new k_;_globalScope=new D_;_groupScope=new E_;_connectedSubgraphScope=new P_;_stopCollision=new R_;plan(e){let{sourceId:n,baselineRect:o,nextRect:r,candidates:a,connections:s,config:c}=e;if(this._isNoOpDelta(o,r))return ws(n);let d=this._resolveSelection(c.mode,c);if(!d)return ws(n);let f=this._resolveScope(c.scope);if(!f)return ws(n);let g=this._resolveCollision(c.collision,c);if(!g)return ws(n);let y=this._resolveDeltaCalculator(c.deltaSource),T=this._excludeSourceAncestorsAndDescendants(a,n),w=d.select({sourceId:n,sourceBaselineRect:o,sourceNextRect:r,candidates:T,connections:s,axis:c.axis}),N=a.find(Ce=>Ce.id===n)??null,H=f.filter({sourceCandidate:N,candidates:w,connections:s}),G=this._computeRawShifts(y,H,o,r,c),X=this._clampToParentBounds(G,a);if(X.length===0)return{sourceNodeId:n,shifts:[],deltaEdges:x_(o,r)};let le=g.resolve({sourceNextRect:r,rawShifts:X,pool:H,spacing:c.spacing,maxAbsoluteShift:c.maxAbsoluteShiftPerPlan});return{sourceNodeId:n,shifts:le.map(Ce=>({id:Ce.candidate.id,fromRect:Ce.fromRect,toRect:Ce.toRect,toPosition:Ce.toPosition})),deltaEdges:x_(o,r)}}_clampToParentBounds(e,n){let o=new Map(n.map(a=>[a.id,a])),r=[];for(let a of e){let s=a.candidate,c=s.parentId?o.get(s.parentId):null;if(!c){r.push(a);continue}let d=c.rect.x,f=c.rect.x+c.rect.width-s.rect.width,g=c.rect.y,y=c.rect.y+c.rect.height-s.rect.height,T=s.rect.x+a.shift.x,w=s.rect.y+a.shift.y,N=Math.max(d,Math.min(f,T)),H=Math.max(g,Math.min(y,w)),G=N-s.rect.x,X=H-s.rect.y;G===0&&X===0||r.push({candidate:s,shift:{x:G,y:X}})}return r}_excludeSourceAncestorsAndDescendants(e,n){let o=new Map,r=new Map;for(let g of e){o.set(g.id,g);let y=g.parentId??null;if(y){let T=r.get(y)??[];T.push(g.id),r.set(y,T)}}let a=new Set([n]),s=o.get(n)?.parentId??null,c=new Set;for(;s&&!c.has(s);)c.add(s),a.add(s),s=o.get(s)?.parentId??null;let d=[...r.get(n)??[]],f=new Set;for(;d.length>0;){let g=d.shift();if(!f.has(g)){f.add(g),a.add(g);for(let y of r.get(g)??[])d.push(y)}}return e.filter(g=>!a.has(g.id))}_isNoOpDelta(e,n){return e.width===n.width&&e.height===n.height}_resolveSelection(e,n){switch(e){case wr.CENTER_OF_MASS:return this._centerOfMassSelection;case wr.X_RANGE:return this._xRangeSelection;case wr.DOWNSTREAM_CONNECTIONS:return new M_(n.maxCascadeDepth);default:return null}}_resolveScope(e){switch(e){case Tr.GLOBAL:return this._globalScope;case Tr.GROUP:return this._groupScope;case Tr.CONNECTED_SUBGRAPH:return this._connectedSubgraphScope;default:return null}}_resolveCollision(e,n){switch(e){case Np.STOP:return this._stopCollision;case Np.CHAIN_PUSH:return new O_(n.maxCascadeDepth);default:return null}}_resolveDeltaCalculator(e){return e===U_.CENTER_BASED?this._centerBased:this._edgeBased}_computeRawShifts(e,n,o,r,a){let s=[];for(let c of n){if(c.isIgnored)continue;let d=e.calculate({baselineRect:o,nextRect:r,candidateRect:c.rect,axis:a.axis});d!==null&&s.push({candidate:c,shift:d})}return s}static \u0275fac=function(n){return new(n||t)};static \u0275prov=C({token:t,factory:t.\u0275fac})}return t})(),g9=(()=>{class t{_initial=p(_9,{optional:!0});_featureActivated=this._initial!==null;_config=W(this._initial??Vy(void 0));config=this._config.asReadonly();isEnabled=S(()=>this._featureActivated&&this._config().enabled);getConfig(){return this._config()}setConfig(e){this._config.set(Vy(me(me({},this._config()),e)))}static \u0275fac=function(n){return new(n||t)};static \u0275prov=C({token:t,factory:t.\u0275fac})}return t})(),kC=(()=>{class t{_ignored=new Set;add(e){this._ignored.add(e)}remove(e){this._ignored.delete(e)}has(e){return this._ignored.has(e)}static \u0275fac=function(n){return new(n||t)};static \u0275prov=C({token:t,factory:t.\u0275fac})}return t})(),IC=(()=>{class t{_baselines=new Map;get(e){return this._baselines.get(e)}set(e,n){this._baselines.set(e,n)}delete(e){this._baselines.delete(e)}clear(){this._baselines.clear()}static \u0275fac=function(n){return new(n||t)};static \u0275prov=C({token:t,factory:t.\u0275fac})}return t})(),$_=(()=>{class t{_controller=p(g9,{optional:!0});_store=p(L);_mediator=p(V);_ignoreRegistry=p(kC);_planner=p(SC);_tracker=p(IC);handleResize(e,n){if(!this._controller?.isEnabled())return;let o=e.fId(),r=this._safeGetRect(e);if(!r)return;if(!e.hostElement?.isConnected||r.width===0||r.height===0){this._tracker.delete(o);return}let a=n;if(!a){let y=this._tracker.get(o);y&&(a={x:r.x,y:r.y,width:y.width,height:y.height,gravityCenter:{x:r.x+y.width/2,y:r.y+y.height/2}})}if(this._tracker.set(o,r),!a)return;let s=this._buildCandidates(),c=this._buildConnections(),d=this._controller.getConfig(),f=this._planner.plan({sourceId:o,baselineRect:a,nextRect:r,candidates:s,connections:c,config:d});if(f.shifts.length===0)return;let g=[];for(let y of f.shifts){let T=this._store.nodes.get(y.id);if(!T||!T.hostElement?.isConnected)continue;let w={x:y.toPosition.x,y:y.toPosition.y};T.position.set(w),this._tracker.set(y.id,y.toRect),g.push({id:y.id,position:w})}g.length>0&&this._store.fDraggable?.fMoveNodes.emit(new mp(g))}_buildCandidates(){let e=[];for(let n of this._store.nodes.getAll()){let o=n.fId(),r=this._safeGetRect(n);r&&e.push({id:o,rect:r,parentId:n.fParentId(),isIgnored:this._ignoreRegistry.has(o)})}return e}_buildConnections(){let e=new Map;for(let o of this._store.nodes.getAll()){let r=o.fId();for(let a of o.connectors)e.set(a.fId(),r)}let n=[];for(let o of this._store.connections.getAll()){let r=e.get(o.fOutputId()),a=e.get(o.fInputId());!r||!a||n.push({outputNodeId:r,inputNodeId:a})}return n}_safeGetRect(e){if(!e.hostElement)return null;let n=e.position();if(n.x!==e._position.x||n.y!==e._position.y)return null;try{return this._mediator.execute(new tt(e.hostElement))}catch{return null}}static \u0275fac=function(n){return new(n||t)};static \u0275prov=C({token:t,factory:t.\u0275fac})}return t})();var v9=[SC,$_,kC,IC],b9=new _e("F_FLOW_CONFIG");var F_=(()=>{class t extends kt{type=wC;kind=TC;data(){return new C_(this._nodeOrGroup.fId())}_mediator=p(V);_reflowOrchestrator=p($_);_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),this._reflowOrchestrator.handleResize(this._nodeOrGroup,this._baselineRect),requestAnimationFrame(()=>this._nodeOrGroup.refresh())}_readBaselineRect(){return this._mediator.execute(new tt(this._nodeOrGroup.hostElement))}_buildConstraints(e){return this._mediator.execute(new $r(this._nodeOrGroup,e))}_calcNextRect(e){return this._mediator.execute(new Rp(this._baselineRect,e,this._handleType,this._constraints.minimumSize))}_applyConstraints(e){this._mediator.execute(new Ep(e,this._constraints.childrenBounds)),this._mediator.execute(new Pp(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 Fi(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 li(e.hostElement,!1));return n.set(o,a),a}static \u0275fac=(()=>{let e;return function(o){return(e||(e=$(t)))(o||t)}})();static \u0275prov=C({token:t,factory:t.\u0275fac})}return t})(),Wr=class{_mediator=p(V);_store=p(L);_behaviour=p(Lo);_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 Oi(this._source.fId(),this._source.kind,this._sourceRect))}setTargetRect(i){this._targetRect=rt.fromRoundedRect(i),this._mediator.execute(new Oi(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 bn(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 li(i.hostElement,!1))}}_resolveRotationContext(i){return this._mediator.execute(new Ln(i))}},y9=(()=>{class t extends Wr{_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=$(t)))(o||t)}})();static \u0275prov=C({token:t,factory:t.\u0275fac})}return t})(),C9=(()=>{class t extends Wr{setSourceRect(e){super.setSourceRect(e),super.redraw()}static \u0275fac=(()=>{let e;return function(o){return(e||(e=$(t)))(o||t)}})();static \u0275prov=C({token:t,factory:t.\u0275fac})}return t})(),x9=(()=>{class t extends Wr{setTargetRect(e){super.setTargetRect(e),super.redraw()}static \u0275fac=(()=>{let e;return function(o){return(e||(e=$(t)))(o||t)}})();static \u0275prov=C({token:t,factory:t.\u0275fac})}return t})(),Ap=class{event;fTrigger;static fToken=Symbol("ResizeNodePreparationRequest");constructor(i,e){this.event=i,this.fTrigger=e}},Lp=class{handler;nodeOrGroup;static fToken=Symbol("AttachResizeConnectionDragHandlersToNodeRequest");constructor(i,e){this.handler=i,this.nodeOrGroup=e}},w9=(()=>{let t=class Pc{_store=p(L);_mediator=p(V);_dragInjector=p(bt);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(d=>this._buildConnectionHandlersForNode(d,a,s,c)))}_readSoftParents(e){let n=this._mediator.execute(new tt(e.hostElement));return this._mediator.execute(new $r(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())),d=new Set(s.map(g=>g.fId())),f={source:[],target:[]};for(let g of this._store.connections.getAll()){let y=c.has(g.fOutputId()),T=d.has(g.fInputId());if(!y&&!T)continue;let w=r.get(g.fId())??this._createConnectionHandler(g,n,o);if(r.set(g.fId(),w),y){let N=this._store.outputs.require(g.fOutputId());f.source.push({handler:w,connector:N})}if(T){let N=this._store.inputs.require(g.fInputId());f.target.push({handler:w,connector:N})}}return f}_createConnectionHandler(e,n,o){let r=n.has(e.fOutputId()),a=o.has(e.fInputId()),s=r&&a?this._dragInjector.createInstance(y9):r?this._dragInjector.createInstance(C9):this._dragInjector.createInstance(x9);return s.initialize(e),s}static \u0275fac=function(n){return new(n||Pc)};static \u0275prov=C({token:Pc,factory:Pc.\u0275fac})};return t=E([P(Lp)],t),t})(),T9=(()=>{let t=class Rc{_mediator=p(V);_store=p(L);_dragSession=p(he);_dragInjector=p(bt);get _transform(){return this._store.transform}handle({event:e,fTrigger:n}){if(!this._dragSession.isEmpty()||!this._isResizeHandle(e.targetElement)||!ln(e.originalEvent,n))return;let o=this._findResizableNode(e.targetElement);if(!o)return;this._selectBeforeResize(o);let r=this._transform.scale??1;this._dragSession.onPointerDownScale=r,this._dragSession.onPointerDownPosition=fe.fromPoint(e.getPosition()).elementTransform(this._store.flowHost).div(r);let a=this._dragInjector.createInstance(F_);a.initialize(o,this._readResizeHandleType(e.targetElement)),this._mediator.execute(new Lp(a,o)),this._dragSession.draggableItems=[a]}_isResizeHandle(e){return yr(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 No(e))})}_readResizeHandleType(e){let n=my(e,"fResizeHandleType",".f-resize-handle");return Tn[n]}static \u0275fac=function(n){return new(n||Rc)};static \u0275prov=C({token:Rc,factory:Rc.\u0275fac})};return t=E([P(Ap)],t),t})(),S9=[c9,d9,u9,p9,f9,w9,m9,T9],Bp=class{event;static fToken=Symbol("RotateNodeFinalizeRequest");constructor(i){this.event=i}},MC="node-rotate",DC="rotate-node";function k9(t){return t.getEvent().kind===DC||t.getEvent().fEventType===MC}var I9=(()=>{let t=class Oc{_dragSession=p(he);handle(e){this._isValid()&&this._dragSession.draggableItems.forEach(n=>{n.onPointerUp?.()})}_isValid(){return this._dragSession.draggableItems.some(e=>k9(e))}static \u0275fac=function(n){return new(n||Oc)};static \u0275prov=C({token:Oc,factory:Oc.\u0275fac})};return t=E([P(Bp)],t),t})(),Vp=class{event;fTrigger;static fToken=Symbol("RotateNodePreparationRequest");constructor(i,e){this.event=i,this.fTrigger=e}},N_=class{fNodeId;constructor(i){this.fNodeId=i}};function M9(t,i,e){let{x:n,y:o}=D9(t,i,e),r=n-t.x,a=o-t.y;return{x:r,y:a}}function D9(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,d=n*s+o*a,f=c+e.x,g=d+e.y;return{x:f,y:g}}var A_=(()=>{class t extends kt{type=MC;kind=DC;data(){return new N_(this._nodeOrGroup.fId())}_store=p(L);_mediator=p(V);_dragSession=p(he);_nodeOrGroup;_sourceConnections;_targetConnections;_startRotation=0;_nodeRect;_nodeCenter;_pointerDownInFlow;_rotationOffsetDeg=0;get _transform(){return this._store.transform}initialize(e,n,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=q.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 tt(this._nodeOrGroup.hostElement))}_calculatePointerDownInFlow(){return q.sub(this._dragSession.onPointerDownPosition,q.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 M9(e,n,this._nodeCenter)}static \u0275fac=(()=>{let e;return function(o){return(e||(e=$(t)))(o||t)}})();static \u0275prov=C({token:t,factory:t.\u0275fac})}return t})(),E9=(()=>{let t=class Fc{_mediator=p(V);_store=p(L);_dragContext=p(he);_dragInjector=p(bt);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=fe.fromPoint(e.event.getPosition()).elementTransform(this._store.flowHost).div(o);let r=this._dragInjector.createInstance(A_);r.initialize(n,this._buildOutputConnectionHandlers(n),this._buildInputConnectionHandlers(n)),this._dragContext.draggableItems=[r]}_isPreparationAllowed({event:e,fTrigger:n}){return this._dragContext.isEmpty()&&Y7(e.targetElement)&&ln(e.originalEvent,n)}_findRotatableNode(e){for(let n of this._store.nodes.getAll())if(!n.fDraggingDisabled()&&n.isContains(e))return n}_selectBeforeRotate(e){queueMicrotask(()=>{this._mediator.execute(new No(e))})}_buildInputConnectionHandlers(e){return this._mediator.execute(new Up(e)).map(n=>{let o=this._store.inputs.require(n.fInputId()),r=this._mediator.execute(new $t(o)),a=this._dragInjector.get(Ur);return a.initialize(n),{connection:a,connector:r.rect.gravityCenter}})}_buildOutputConnectionHandlers(e){return this._mediator.execute(new ef(e)).map(n=>{let o=this._store.outputs.require(n.fOutputId()),r=this._mediator.execute(new $t(o)),a=this._dragInjector.get(Gr);return a.initialize(n),{connection:a,connector:r.rect.gravityCenter}})}static \u0275fac=function(n){return new(n||Fc)};static \u0275prov=C({token:Fc,factory:Fc.\u0275fac})};return t=E([P(Vp)],t),t})(),P9=[I9,E9],Kr=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}},R9=(()=>{let t=class Nc{_store=p(L);get _canvasScale(){return this._store.transform.scale||1}handle(e){return q.sub(e.canvasPosition,q.sub(this._getPositionInViewBox(e.eventPoint,e.minimap),this._getNormalizedFlowCenter(e.flowRect)))}_getNormalizedFlowCenter(e){return fe.fromPoint(e.gravityCenter).sub(e)}_getPositionInViewBox(e,n){let o=this.normalizeEventPoint(e,n);return q.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 fe.fromPoint(e).elementTransform(n.element)}static \u0275fac=function(n){return new(n||Nc)};static \u0275prov=C({token:Nc,factory:Nc.\u0275fac})};return t=E([P(Kr)],t),t})(),zp=class{event;static fToken=Symbol("DragMinimapFinalizeRequest");constructor(i){this.event=i}},O9=(()=>{let t=class Ac{_dragSession=p(he);handle(e){this._isValid()&&this._dragSession.draggableItems.forEach(n=>{n.onPointerUp?.()})}_isValid(){return this._dragSession.draggableItems.some(F9)}static \u0275fac=function(n){return new(n||Ac)};static \u0275prov=C({token:Ac,factory:Ac.\u0275fac})};return t=E([P(zp)],t),t})(),EC="minimap",PC="minimap";function F9(t){return t.getEvent().kind===PC||t.getEvent().fEventType===EC}var L_=(()=>{class t extends kt{type=EC;kind=PC;_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(fe.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 Kr(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=$(t)))(o||t)}})();static \u0275prov=C({token:t,factory:t.\u0275fac})}return t})(),Hp=class{event;static fToken=Symbol("DragMinimapPreparationRequest");constructor(i){this.event=i}},N9=(()=>{let t=class Lc{_store=p(L);_mediator=p(V);_dragSession=p(he);_dragInjector=p(bt);get _canvas(){return this._store.fCanvas}get _flowHost(){return this._store.flowHost}handle({event:e}){if(!this._isValid(e))return;let n=this._store.instances.require(Ye.MINIMAP).state,o=e.getPosition(),r=fe.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=fe.fromPoint(o).elementTransform(this._flowHost);let s=this._dragInjector.createInstance(L_);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(Ye.MINIMAP))}_calculateCanvasPosition(e,n,o){return this._mediator.execute(new Kr(e,fe.fromPoint(this._canvas.transform.position),n,o))}static \u0275fac=function(n){return new(n||Lc)};static \u0275prov=C({token:Lc,factory:Lc.\u0275fac})};return t=E([P(Hp)],t),t})(),A9=[R9,O9,N9];function L9(t){return!!t&&typeof t.destroy=="function"}var bt=(()=>{class t{_injector=p(mt);_dragInjector=null;_created=[];create(){this._dragInjector=mt.create({providers:[{provide:qp,useClass:qp},{provide:ep,useClass:ep},{provide:Uu,useClass:Uu},{provide:o_,useClass:o_},{provide:zr,useClass:zr},{provide:Gr,useClass:Gr},{provide:Ur,useClass:Ur},{provide:jr,useClass:jr},{provide:di,useClass:di},{provide:kp,useClass:kp},{provide:y_,useClass:y_},{provide:F_,useClass:F_},{provide:A_,useClass:A_},{provide:L_,useClass:L_}],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=q0(this._dragInjector,()=>new e);return this._created.push(n),n}destroy(){for(let e of this._created)L9(e)&&e.destroy();this._created=[],this._dragInjector?.destroy?.(),this._dragInjector=null}static \u0275fac=function(n){return new(n||t)};static \u0275prov=C({token:t,factory:t.\u0275fac})}return t})(),ui=(()=>{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=C({token:t,factory:t.\u0275fac})}return t})(),zy="f-canvas-dragging",Hy="canvas-dragging",qp=(()=>{class t extends kt{type="canvas-move";kind="drag-canvas";_store=p(L);_onPointerDownPosition=q.initialize();constructor(){super(),this._store.fCanvas?.hostElement.classList.add(zy,Hy)}prepareDragSequence(){this._onPointerDownPosition=this._store.transform.position}onPointerMove(e){this._store.fCanvas?._setPosition(fe.fromPoint(this._onPointerDownPosition).add(e)),this._store.fCanvas?.redraw()}onPointerUp(){this._store.fCanvas?.emitCanvasChangeEvent(),this._store.fCanvas?.hostElement.classList.remove(zy,Hy)}static \u0275fac=function(n){return new(n||t)};static \u0275prov=C({token:t,factory:t.\u0275fac})}return t})(),B9=(()=>{let t=class Bc{_dragContext=p(he);handle(e){this._isValid()&&this._dragContext.draggableItems.forEach(n=>n.onPointerUp?.())}_isValid(){return this._dragContext.draggableItems.some(e=>e instanceof qp)}static \u0275fac=function(n){return new(n||Bc)};static \u0275prov=C({token:Bc,factory:Bc.\u0275fac})};return t=E([P(Vu)],t),t})(),Gp=class{event;fTrigger;static fToken=Symbol("DragCanvasPreparationRequest");constructor(i,e){this.event=i,this.fTrigger=e}},V9=(()=>{let t=class Vc{_store=p(L);_dragContext=p(he);_dragInjector=p(bt);handle({event:e,fTrigger:n}){!this._isValid(e)||!this._isValidTrigger(e,n)||(this._dragContext.onPointerDownScale=1,this._dragContext.onPointerDownPosition=fe.fromPoint(e.getPosition()).elementTransform(this._store.flowHost),this._dragContext.draggableItems=[this._dragInjector.get(qp)])}_isValid(e){return this._dragContext.isEmpty()&&(this._isBackgroundElement(e.targetElement)||this._isDragOnHost(e.targetElement))}_isBackgroundElement(e){return this._store.instances.get(Ye.BACKGROUND)?.hostElement.contains(e)}_isDragOnHost(e){return this._store.flowHost.contains(e)&&!this._getNode(e)}_getNode(e){let n=this._store.nodes.getAll().find(o=>o.isContains(e));return n&&n.fDraggingDisabled()&&(n=void 0),n}_isValidTrigger(e,n){return ln(e.originalEvent,n)}static \u0275fac=function(n){return new(n||Vc)};static \u0275prov=C({token:Vc,factory:Vc.\u0275fac})};return t=E([P(Gp)],t),t})(),z9=[B9,V9],jp=class{event;trigger;static fToken=Symbol("SelectByPointerRequest");constructor(i,e){this.event=i,this.trigger=e}},H9=(()=>{let t=class zc{_mediator=p(V);_store=p(L);_dragSession=p(he);handle({event:e,trigger:n}){if(!this._isSelectionAllowed(e))return;let o=this._resolveSelectable(e.targetElement);this._deferRaiseLayerFor(o),ln(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 Bi(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||zc)};static \u0275prov=C({token:zc,factory:zc.\u0275fac})};return t=E([P(jp)],t),t})(),q9=[H9];var B_=class extends Qm{hostElement=p(Ze).nativeElement};function G9(t){return yr(t,".f-drag-blocker")}var RC=(()=>{class t extends B_{_result=p(ui);_mediator=p(V);_platform=p(cm);disabled=!1;fMultiSelectTrigger=e=>this._platform.getOS()===ti.MAC_OS?e.metaKey:e.ctrlKey;fReassignConnectionTrigger=gn;fCreateConnectionTrigger=gn;fConnectionWaypointsTrigger=B(gn);fMoveControlPointTrigger=gn;fNodeResizeTrigger=gn;fNodeRotateTrigger=gn;fNodeMoveTrigger=gn;fCanvasMoveTrigger=gn;fExternalItemTrigger=gn;fSelectionChange=new re;fNodeIntersectedWithConnections=new re;fNodeConnectionsIntersection=Ge();fEmitOnNodeIntersect=!1;fCreateNode=new re;fMoveNodes=new re;fReassignConnection=new re;fCreateConnection=new re;fConnectionWaypointsChanged=Ge();fDropToGroup=new re;vCellSize=B(1,{transform:e=>De(e,1)});hCellSize=B(1,{transform:e=>De(e,1)});fCellSizeWhileDragging=B(!1,{transform:e=>Y(e)});fDragStarted=new re;fDragEnded=new re;_dragHandlerInjector=p(bt);ngOnInit(){this._mediator.execute(new Kp(this))}ngAfterViewInit(){super.subscribe()}onPointerDown(e){if(G9(e.targetElement))return!1;this._dragHandlerInjector.create(),this._result.clear(),this._mediator.execute(new Xp),this._mediator.execute(new Dp(e)),this._mediator.execute(new Hp(e)),this._mediator.execute(new Ip(e)),this._mediator.execute(new jp(e,this.fMultiSelectTrigger)),this._mediator.execute(new Xu(e,this.fReassignConnectionTrigger)),this._mediator.execute(new Ku(e,this.fCreateConnectionTrigger)),this._mediator.execute(new tp(e,this.fConnectionWaypointsTrigger()));let n=e.isMouseLeftButton();return n||this.finalizeDragSequence(),n}prepareDragSequence(e){this._mediator.execute(new Ap(e,this.fNodeResizeTrigger)),this._mediator.execute(new Vp(e,this.fNodeRotateTrigger)),this._mediator.execute(new _p(e,this.fNodeMoveTrigger)),this._mediator.execute(new wp(e,this.fExternalItemTrigger)),this._mediator.execute(new gp(e)),this._mediator.execute(new Gp(e,this.fCanvasMoveTrigger)),this._mediator.execute(new Zp)}onSelect(e){this._mediator.execute(new Tp(e))}onPointerMove(e){this._mediator.execute(new Yp(e)),this._mediator.execute(new Lr)}onPointerUp(e){this._mediator.execute(new zp(e)),this._mediator.execute(new Mp(e)),this._mediator.execute(new Yu(e)),this._mediator.execute(new ju(e)),this._mediator.execute(new Fp(e)),this._mediator.execute(new Bp(e)),this._mediator.execute(new hp(e)),this._mediator.execute(new Cp(e)),this._mediator.execute(new np(e)),this._mediator.execute(new Vu(e)),this._mediator.execute(new Sp(e)),this._mediator.execute(new Qu(e)),this._mediator.execute(new Fu)}finalizeDragSequence(){this._mediator.execute(new ci),this._mediator.execute(new Ar),this._result.clear(),this._dragHandlerInjector.destroy()}ngOnDestroy(){this._mediator.execute(new ci),this._mediator.execute(new Qp),super.unsubscribe()}static \u0275fac=(()=>{let e;return function(o){return(e||(e=$(t)))(o||t)}})();static \u0275dir=Ue({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([ui,bt]),J]})}return t})(),j9=[...z9,..._B,...F7,...q9,...QB,...q7,...A9,...BB,...e9,...S9,...P9,...l9,...r9],U9=(()=>{let t=class Hc{_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 Ju(e.fId(),e.fWaypoints()?.waypoints()||[])}static \u0275fac=function(n){return new(n||Hc)};static \u0275prov=C({token:Hc,factory:Hc.\u0275fac})};return t=E([P(jm)],t),t})(),V_=class{static fToken=Symbol("RemoveSnapConnectionFromStoreRequest")},$9=(()=>{let t=class qc{_store=p(L);handle(e){this._store.connections.removeInstanceForSnap()}static \u0275fac=function(n){return new(n||qc)};static \u0275prov=C({token:qc,factory:qc.\u0275fac})};return t=E([P(V_)],t),t})(),W9=[Rf,Vi,L5,B5,V5,z5,R6,l7,L6,n7,_7,m7,s7,v7,y7,b7,a7,f7,B6,T7,r7,o7,i7,Z6,t7,Q6,J6,g7,u7,C7,x7,h7,p7,w7,S7,k7,I7,$9,U9],Yr=class{instance;static fToken=Symbol("AddConnectorToStoreRequest");constructor(i){this.instance=i}},K9=(()=>{let t=class Gc{_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 hu(e.fId(),e.fNodeId,e.kind,e.hostElement))}static \u0275fac=function(n){return new(n||Gc)};static \u0275prov=C({token:Gc,factory:Gc.\u0275fac})};return t=E([P(Yr)],t),t})(),Ai=class{position;connectorRefs;static fToken=Symbol("CalculateClosestConnectorRequest");constructor(i,e){this.position=i,this.connectorRefs=e}},Y9=(()=>{let t=class jc{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?Mt(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),d=e.x-s,f=e.y-c;return Math.sqrt(d*d+f*f)}_clamp(e,n,o){return Math.max(n,Math.min(o,e))}static \u0275fac=function(n){return new(n||jc)};static \u0275prov=C({token:jc,factory:jc.\u0275fac})};return t=E([P(Ai)],t),t})(),Xr=class{pointerPosition;connectableConnectors;static fToken=Symbol("FindConnectableConnectorUsingPriorityAndPositionRequest");constructor(i,e){this.pointerPosition=i,this.connectableConnectors=e}},X9=(()=>{let t=class Uc{_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 Bo(e,this._flowHost,this._transform)}_isSnapConnectionEnabledAndHasClosestConnector(e){if(!this._snapConnection)return;let n=this._mediator.execute(new Ai(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||Uc)};static \u0275prov=C({token:Uc,factory:Uc.\u0275fac})};return t=E([P(Xr)],t),t})(),Zr=class{source;pointer;static fToken=Symbol("CalculateTargetConnectorsToConnectRequest");constructor(i,e){this.source=i,this.pointer=e}},$t=class{connector;static fToken=Symbol("GetConnectorRectReferenceRequest");constructor(i){this.connector=i}},Z9=(()=>{let t=class $c{_mediator=p(V);handle({connector:e}){return{connector:e,rect:this._getRect(e)}}_getRect(e){return this._mediator.execute(new li(e.hostElement))}static \u0275fac=function(n){return new(n||$c)};static \u0275prov=C({token:$c,factory:$c.\u0275fac})};return t=E([P($t)],t),t})(),Qr=class{nodeOrGroup;static fToken=Symbol("AddNodeToStoreRequest");constructor(i){this.nodeOrGroup=i}},Q9=(()=>{let t=class Wc{_store=p(L);_mediator=p(V);handle({nodeOrGroup:e}){this._store.nodes.add(e),this._mediator.execute(new mu(e.fId(),e.hostElement,e)),this._store.emitNodeChanges()}static \u0275fac=function(n){return new(n||Wc)};static \u0275prov=C({token:Wc,factory:Wc.\u0275fac})};return t=E([P(Qr)],t),t})(),Up=class{nodeOrGroup;static fToken=Symbol("CalculateInputConnectionsRequest");constructor(i){this.nodeOrGroup=i}},J9=(()=>{let t=class Kc{_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||Kc)};static \u0275prov=C({token:Kc,factory:Kc.\u0275fac})};return t=E([P(Up)],t),t})(),Do=class{connector;pointerPosition;static fToken=Symbol("CalculateConnectableSideByConnectedPositionsRequest");constructor(i,e){this.connector=i,this.pointerPosition=e}},qy=2,xt=(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})(xt||{});function eV(t,i,e,n,o){let r=tV(o),a=e-t,s=n-i,c=nV(a,s);return iV(c,r)?c:oV(a,s,r,c)}function tV(t){if(!t||t.length===0)return xt.ALL;let i=xt.NONE;for(let e=0;e<t.length;e++)switch(t[e]){case U.LEFT:i|=xt.LEFT;break;case U.RIGHT:i|=xt.RIGHT;break;case U.TOP:i|=xt.TOP;break;case U.BOTTOM:i|=xt.BOTTOM;break}return i||xt.ALL}function nV(t,i){let e=t<0?-t:t,n=i<0?-i:i;return e-n>qy?t<0?U.LEFT:U.RIGHT:(n-e>qy,i<0?U.TOP:U.BOTTOM)}function iV(t,i){switch(t){case U.LEFT:return(i&xt.LEFT)!==0;case U.RIGHT:return(i&xt.RIGHT)!==0;case U.TOP:return(i&xt.TOP)!==0;case U.BOTTOM:return(i&xt.BOTTOM)!==0;default:return!0}}function oV(t,i,e,n){let o=n,r=-1/0;if(e&xt.RIGHT){let a=t;a>r&&(r=a,o=U.RIGHT)}if(e&xt.LEFT){let a=-t;a>r&&(r=a,o=U.LEFT)}if(e&xt.BOTTOM){let a=i;a>r&&(r=a,o=U.BOTTOM)}if(e&xt.TOP){let a=-i;a>r&&(r=a,o=U.TOP)}return o}function $p(t){return t===U.CALCULATE||t===U.CALCULATE_HORIZONTAL||t===U.CALCULATE_VERTICAL}var rV={[U.CALCULATE]:[U.TOP,U.BOTTOM,U.LEFT,U.RIGHT],[U.CALCULATE_HORIZONTAL]:[U.LEFT,U.RIGHT],[U.CALCULATE_VERTICAL]:[U.TOP,U.BOTTOM]},aV=(()=>{let t=class Yc{_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 eV(r.x,r.y,s,c,rV[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 d=n[c].hostElement;if(d===e)continue;let f=this._getConnectorRect(d).gravityCenter;r+=f.x,a+=f.y,s++}return{sumX:r,sumY:a,count:s}}_getConnectorRect(e){return this._mediator.execute(new tt(e))}static \u0275fac=function(n){return new(n||Yc)};static \u0275prov=C({token:Yc,factory:Yc.\u0275fac})};return t=E([P(Do)],t),t})(),Wp=class{connector;static fToken=Symbol("CalculateConnectableSideByInternalPositionRequest");constructor(i){this.connector=i}},Kp=class{fComponent;static fToken=Symbol("AddDndToStoreRequest");constructor(i){this.fComponent=i}},sV=(()=>{let t=class Xc{_store=p(L);handle(e){this._store.fDraggable=e.fComponent}static \u0275fac=function(n){return new(n||Xc)};static \u0275prov=C({token:Xc,factory:Xc.\u0275fac})};return t=E([P(Kp)],t),t})(),Yp=class{event;static fToken=Symbol("OnPointerMoveRequest");constructor(i){this.event=i}},lV=(()=>{let t=class Zc{_store=p(L);_dragContext=p(he);get _hostElement(){return this._store.fDraggable?.hostElement}handle({event:e}){this._dragContext.rememberPointerPosition(e),this._setDifferenceToDraggableItems(this._getDifferenceBetweenPointerAndPointerDown(e),e)}_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 fe.fromPoint(e.getPosition()).elementTransform(this._hostElement)}static \u0275fac=function(n){return new(n||Zc)};static \u0275prov=C({token:Zc,factory:Zc.\u0275fac})};return t=E([P(Yp)],t),t})(),Xp=class{static fToken=Symbol("InitializeDragSequenceRequest")},cV=(()=>{let t=class Qc{_dragContext=p(he);handle(e){this._dragContext.reset()}static \u0275fac=function(n){return new(n||Qc)};static \u0275prov=C({token:Qc,factory:Qc.\u0275fac})};return t=E([P(Xp)],t),t})(),pi=class{static fToken=Symbol("IsDragStartedRequest")},dV=(()=>{let t=class Jc{_store=p(L);handle(e){return!!this._store.fDraggable?.isDragStarted}static \u0275fac=function(n){return new(n||Jc)};static \u0275prov=C({token:Jc,factory:Jc.\u0275fac})};return t=E([P(pi)],t),t})(),Zp=class{static fToken=Symbol("PrepareDragSequenceRequest")},uV=(()=>{let t=class ed{_mediator=p(V);_dragContext=p(he);handle(e){this._callPrepareDragSequence(),this._mediator.execute(new Nu)}_callPrepareDragSequence(){this._dragContext.draggableItems.forEach(e=>e.prepareDragSequence?.())}static \u0275fac=function(n){return new(n||ed)};static \u0275prov=C({token:ed,factory:ed.\u0275fac})};return t=E([P(Zp)],t),t})(),Qp=class{static fToken=Symbol("RemoveDndFromStoreRequest")},pV=(()=>{let t=class td{_store=p(L);handle(e){this._store.fDraggable=void 0}static \u0275fac=function(n){return new(n||td)};static \u0275prov=C({token:td,factory:td.\u0275fac})};return t=E([P(Qp)],t),t})(),fV=[sV,lV,cV,uV,dV,pV],hV=new _e("CONNECTABLE_SIDE_EPSILON"),mV=(()=>{let t=class nd{_mediator=p(V);_lastSide=new WeakMap;_epsilon=Math.max(0,p(hV,{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,d=s-a.left,f=a.right-s,g=c-a.top,y=a.bottom-c,T=0,w=d,N=[d,f,g,y];for(let X=1;X<4;X++){let le=N[X];le<w&&(w=le,T=X)}let H=T===0?U.LEFT:T===1?U.RIGHT:T===2?U.TOP:U.BOTTOM,G=this._lastSide.get(o);if(G!==void 0&&G!==H){let X=G===U.LEFT?0:G===U.RIGHT?1:G===U.TOP?2:3;(X===0?d:X===1?f:X===2?g:y)-w<=this._epsilon&&(H=G)}return H}_isDragging(){return this._mediator.execute(new pi)}static \u0275fac=function(n){return new(n||nd)};static \u0275prov=C({token:nd,factory:nd.\u0275fac})};return t=E([P(Wp)],t),t})(),Eo=class{nodeOrGroup;static fToken=Symbol("CalculateConnectorsConnectableSidesRequest");constructor(i){this.nodeOrGroup=i}},_V=(()=>{let t=class id{_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 d=0,f=c.length;d<f;d++){let g=c[d],y=g.userFConnectableSide;$p(y)&&r.add(g)}}r.size>0&&r.forEach(a=>{a.fConnectableSide=this._calculateByConnectedPositions(a)})}_resolveSideForConnectorFast(e){let n=e.userFConnectableSide;return n===U.AUTO?this._mediator.execute(new Wp(e)):$p(n)?this._calculateByConnectedPositions(e):n}_calculateByConnectedPositions(e){return this._mediator.execute(new Do(e))}static \u0275fac=function(n){return new(n||id)};static \u0275prov=C({token:id,factory:id.\u0275fac})};return t=E([P(Eo)],t),t})(),Po=class{static fToken=Symbol("CalculateNodesBoundingBoxRequest")},gV=(()=>{let t=class od{_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||od)};static \u0275prov=C({token:od,factory:od.\u0275fac})};return t=E([P(Po)],t),t})(),Jp=class{fNodes;static fToken=Symbol("CalculateNodesBoundingBoxNormalizedPositionRequest");constructor(i){this.fNodes=i}},vV=(()=>{let t=class rd{_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 ko(e.hostElement));if(n)return this._getElementRect(e,n);let o=this._mediator.execute(new tt(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||rd)};static \u0275prov=C({token:rd,factory:rd.\u0275fac})};return t=E([P(Jp)],t),t})(),ef=class{nodeOrGroup;static fToken=Symbol("CalculateOutputConnectionsRequest");constructor(i){this.nodeOrGroup=i}},bV=(()=>{let t=class ad{_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||ad)};static \u0275prov=C({token:ad,factory:ad.\u0275fac})};return t=E([P(ef)],t),t})(),Jr=class{nodeOrGroup;static fToken=Symbol("FitToChildNodesAndGroupsRequest");constructor(i){this.nodeOrGroup=i}},Li=class{fNode;rect;static fToken=Symbol("GetNodePaddingRequest");constructor(i,e){this.fNode=i,this.rect=e}},yV=(()=>{let t=class sd{_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||sd)};static \u0275prov=C({token:sd,factory:sd.\u0275fac})};return t=E([P(Li)],t),t})(),CV=(()=>{let t=class ld{_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 Jr(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 tt(e.hostElement))}_paddings(e,n){return this._mediator.execute(new Li(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||ld)};static \u0275prov=C({token:ld,factory:ld.\u0275fac})};return t=E([P(Jr)],t),t})(),tf=class{id;static fToken=Symbol("GetChildNodeIdsRequest");constructor(i){this.id=i}},xV=(()=>{let t=class cd{_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||cd)};static \u0275prov=C({token:cd,factory:cd.\u0275fac})};return t=E([P(tf)],t),t})(),Ro=class{nodeOrGroup;static fToken=Symbol("GetParentNodesRequest");constructor(i){this.nodeOrGroup=i}},wV=(()=>{let t=class dd{_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||dd)};static \u0275prov=C({token:dd,factory:dd.\u0275fac})};return t=E([P(Ro)],t),t})(),ea=class{nodeOrGroup;destroyRef;static fToken=Symbol("UpdateNodeWhenStateOrSizeChangedRequest");constructor(i,e){this.nodeOrGroup=i,this.destroyRef=e}},TV=(()=>{let t=class ud{_mediator=p(V);_reflowOrchestrator=p($_);handle({nodeOrGroup:e,destroyRef:n}){let{hostElement:o,stateChanges:r}=e;new Sn(new wm(o),r).listen(n,()=>{this._mediator.execute(new Pi),this._isDragging()||(this._mediator.execute(new So(e.fId(),"UpdateNodeWhenStateOrSizeChanged")),this._mediator.execute(new Eo(e)),this._mediator.execute(new Jr(e)),this._reflowOrchestrator.handleResize(e))})}_isDragging(){return this._mediator.execute(new pi)}static \u0275fac=function(n){return new(n||ud)};static \u0275prov=C({token:ud,factory:ud.\u0275fac})};return t=E([P(ea)],t),t})(),ta=class{instance;static fToken=Symbol("RemoveNodeFromStoreRequest");constructor(i){this.instance=i}},SV=(()=>{let t=class pd{_store=p(L);_mediator=p(V);handle({instance:e}){this._store.nodes.remove(e),this._mediator.execute(new _u(e.fId())),this._store.emitNodeChanges()}static \u0275fac=function(n){return new(n||pd)};static \u0275prov=C({token:pd,factory:pd.\u0275fac})};return t=E([P(ta)],t),t})(),kV=[Q9,aV,mV,J9,_V,gV,vV,bV,CV,xV,yV,wV,TV,SV],IV=(()=>{let t=class fd{_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 $t(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)$p(o.userFConnectableSide)&&(o.fConnectableSide=this._calculateByConnectedPositions(o,n))}_calculateByConnectedPositions(e,n){return this._mediator.execute(new Do(e,n))}static \u0275fac=function(n){return new(n||fd)};static \u0275prov=C({token:fd,factory:fd.\u0275fac})};return t=E([P(Zr)],t),t})(),nf=class{target;pointer;static fToken=Symbol("CalculateSourceConnectorsToConnectRequest");constructor(i,e){this.target=i,this.pointer=e}},MV=(()=>{let t=class hd{_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 $t(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)$p(o.userFConnectableSide)&&(o.fConnectableSide=this._calculateByConnectedPositions(o,n))}_calculateByConnectedPositions(e,n){return this._mediator.execute(new Do(e,n))}static \u0275fac=function(n){return new(n||hd)};static \u0275prov=C({token:hd,factory:hd.\u0275fac})};return t=E([P(nf)],t),t})(),Oo=class{connectors;static fToken=Symbol("MarkConnectableConnectorsRequest");constructor(i){this.connectors=i}},ft={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"}},DV=(()=>{let t=class md{_store=p(L);handle({connectors:e}){this._store.flowHost.classList.add(ft.DRAG_AND_DROP.CONNECTIONS_DRAGGING),e.forEach(n=>this._markConnector(n))}_markConnector({hostElement:e}){e.classList.add(ft.CONNECTOR.CONNECTABLE)}static \u0275fac=function(n){return new(n||md)};static \u0275prov=C({token:md,factory:md.\u0275fac})};return t=E([P(Oo)],t),t})(),na=class{instance;static fToken=Symbol("RemoveConnectorFromStoreRequest");constructor(i){this.instance=i}},EV=(()=>{let t=class _d{_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 Ir(e.fId(),e.kind))}static \u0275fac=function(n){return new(n||_d)};static \u0275prov=C({token:_d,factory:_d.\u0275fac})};return t=E([P(na)],t),t})(),Fo=class{connectors;static fToken=Symbol("UnmarkConnectableConnectorsRequest");constructor(i){this.connectors=i}},PV=(()=>{let t=class gd{_store=p(L);handle({connectors:e}){this._store.flowHost.classList.remove(ft.DRAG_AND_DROP.CONNECTIONS_DRAGGING),e.forEach(n=>this._unmarkConnector(n))}_unmarkConnector({hostElement:e}){e.classList.remove(ft.CONNECTOR.CONNECTABLE)}static \u0275fac=function(n){return new(n||gd)};static \u0275prov=C({token:gd,factory:gd.\u0275fac})};return t=E([P(Fo)],t),t})(),RV=[K9,EV,Y9,X9,MV,IV,Z9,DV,PV],of=class{instance;static fToken=Symbol("AddFlowToStoreRequest");constructor(i){this.instance=i}},zi=(function(t){return t.TOP_BOTTOM="TOP_BOTTOM",t.BOTTOM_TOP="BOTTOM_TOP",t.LEFT_RIGHT="LEFT_RIGHT",t.RIGHT_LEFT="RIGHT_LEFT",t})(zi||{}),ni=(function(t){return t.MANUAL="manual",t.AUTO="auto",t})(ni||{});function OV(t){let i=[...t.nodes.map(Gy),...t.groups.map(Gy)],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 d=o.get(c.fOutputId),f=r.get(c.fInputId);return!d||!f||s.push({source:d,target:f}),s},[]);return{nodes:i,connections:a,nodeIds:e,groupIds:n}}function Gy(t){return{id:t.id,size:t.measuredSize?me({},t.measuredSize):t.size?me({},t.size):void 0}}var FV=1,Nf=(()=>{class t{_destroyRef=p(yt);_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()===ni.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===ni.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()!==ni.AUTO||(n.timeoutId!==null&&clearTimeout(n.timeoutId),this._cancelAnimationFrames(n),n.timeoutId=setTimeout(()=>{n.timeoutId=null,this._runAfterNextPaint(n,()=>{this._relayoutFlowIfReady(e)})},FV))}async _relayoutFlowIfReady(e){let n=this._flows.get(e);if(!(!n||!this._engine||this._engine.getMode()!==ni.AUTO)){if(n.store.hasPendingProgressiveRender){this._scheduleRelayout(e);return}await this._relayoutRegisteredFlow(e,n)}}async _relayoutRegisteredFlow(e,n){if(!this._engine)return;let o=OV(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 d=this._flows.get(e);d&&(d.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||q.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=C({token:t,factory:t.\u0275fac})}return t})(),OC=new _e("F_LAYOUT_OPTIONS");function FC(t,i){return t.reduce((e,n)=>{let o=i.get(n.id);return o&&e.push({id:n.id,position:o}),e},[])}var NV=new _e("F_LAYOUT"),rf=class{_controller=p(Nf);_config=p(OC,{optional:!0})??{};_interactiveOptions;_mode;_writeback;_defaultOptions;interactiveOptions;constructor(i){this._mode=this._config.mode??ni.MANUAL,this._writeback=this._config.writeback??null,this._defaultOptions=this.mergeOptions(i,this._config.options),this._interactiveOptions=W(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 NC(t,i){return[Nf,t,{provide:NV,useExisting:t},{provide:OC,useValue:i??{}}]}var AV=(()=>{let t=class vd{_store=p(L);_layoutController=p(Nf,{optional:!0});handle({instance:e}){this._store.fFlow=e,this._layoutController?.registerFlow(e,this._store)}static \u0275fac=function(n){return new(n||vd)};static \u0275prov=C({token:vd,factory:vd.\u0275fac})};return t=E([P(of)],t),t})(),af=class{static fToken=Symbol("GetFlowRequest")},LV=(()=>{let t=class bd{_store=p(L);handle(e){let n=this._store.fFlow;if(!n)throw new Error("Flow not found in store");return n}static \u0275fac=function(n){return new(n||bd)};static \u0275prov=C({token:bd,factory:bd.\u0275fac})};return t=E([P(af)],t),t})(),sf=class{static fToken=Symbol("CalculateConnectionsStateRequest")},BV=(()=>{let t=class yd{_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||yd)};static \u0275prov=C({token:yd,factory:yd.\u0275fac})};return t=E([P(sf)],t),t})(),ia=class{component;measuredSize;static fToken=Symbol("CalculateNodesStateRequest");constructor(i,e=!1){this.component=i,this.measuredSize=e}},VV=(()=>{let t=class Cd{_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 tt(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||Cd)};static \u0275prov=C({token:Cd,factory:Cd.\u0275fac})};return t=E([P(ia)],t),t})(),lf=class{measuredSize;static fToken=Symbol("CalculateFlowStateRequest");constructor(i=!1){this.measuredSize=i}},zV=(()=>{let t=class xd{_mediator=p(V);_store=p(L);get _canvas(){return this._store.fCanvas}get _transform(){return this._canvas.transform}get _canvasPosition(){return q.sum(this._transform.position,this._transform.scaledPosition)}handle({measuredSize:e}){return{position:this._canvasPosition,scale:this._canvas.transform.scale,nodes:this._mediator.execute(new ia(Ff,e)),groups:this._mediator.execute(new ia(Jm,e)),connections:this._mediator.execute(new sf)}}static \u0275fac=function(n){return new(n||xd)};static \u0275prov=C({token:xd,factory:xd.\u0275fac})};return t=E([P(lf)],t),t})(),HV=[zV,VV,BV],cf=class{instance;static fToken=Symbol("RemoveFlowFromStoreRequest");constructor(i){this.instance=i}},qV=(()=>{let t=class wd{_store=p(L);_layoutController=p(Nf,{optional:!0});handle({instance:e}){this._layoutController?.unregisterFlow(e.fId()),this._store.fFlow=void 0}static \u0275fac=function(n){return new(n||wd)};static \u0275prov=C({token:wd,factory:wd.\u0275fac})};return t=E([P(cf)],t),t})(),Af=(()=>{class t{isNodesRendered=!1;isFullRendered=!1;static \u0275fac=function(n){return new(n||t)};static \u0275prov=C({token:t,factory:t.\u0275fac})}return t})(),df=class{static fToken=Symbol("NotifyNodesRenderedRequest")},W_=new _e("F_FLOW"),z_=class{},GV=(()=>{let t=class Td{_state=p(Af);_fFlow=p(W_);handle(e){this._state.isNodesRendered||(this._state.isNodesRendered=!0,this._fFlow.fNodesRendered.emit(this._fFlow.fId()))}static \u0275fac=function(n){return new(n||Td)};static \u0275prov=C({token:Td,factory:Td.\u0275fac})};return t=E([P(df)],t),t})(),uf=class{static fToken=Symbol("NotifyFullRenderedRequest")},jV=(()=>{let t=class Sd{_state=p(Af);_fFlow=p(W_);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||Sd)};static \u0275prov=C({token:Sd,factory:Sd.\u0275fac})};return t=E([P(uf)],t),t})(),oa=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}},UV=(()=>{let t=class kd{_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||kd)};static \u0275prov=C({token:kd,factory:kd.\u0275fac})};return t=E([P(oa)],t),t})(),pf=class{static fToken=Symbol("ResetRenderLifecycleRequest")},$V=(()=>{let t=class Id{_state=p(Af);handle(e){this._state.isNodesRendered=!1,this._state.isFullRendered=!1}static \u0275fac=function(n){return new(n||Id)};static \u0275prov=C({token:Id,factory:Id.\u0275fac})};return t=E([P(pf)],t),t})(),ff=class{destroyRef;static fToken=Symbol("QueueConnectionRedrawRequest");constructor(i){this.destroyRef=i}},AC=(()=>{class t{isWaitingForViewportAnimation=!1;pendingRedraw=!1;static \u0275fac=function(n){return new(n||t)};static \u0275prov=C({token:t,factory:t.\u0275fac})}return t})(),WV=(()=>{let t=class Md{_state=p(AC);_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 Or)});e.destroyRef.onDestroy(n)}static \u0275fac=function(n){return new(n||Md)};static \u0275prov=C({token:Md,factory:Md.\u0275fac})};return t=E([P(ff)],t),t})(),KV=[AV,LV,...HV,qV,Af,GV,jV,UV,$V,AC,WV],hf=class{static fToken=Symbol("ClearSelectionRequest")},YV=(()=>{let t=class Dd{_dragContext=p(he);handle(e){this._dragContext.selectedItems.forEach(n=>n.unmarkAsSelected()),this._dragContext.selectedItems=[],this._dragContext.isSelectedChanged=!0}static \u0275fac=function(n){return new(n||Dd)};static \u0275prov=C({token:Dd,factory:Dd.\u0275fac})};return t=E([P(hf)],t),t})(),mf=class{static fToken=Symbol("CalculateSelectableItemsRequest")},XV=(()=>{let t=class Ed{_mediator=p(V);_store=p(L);_dragContext=p(he);get _nodes(){return this._store.nodes.getAll()}get _connections(){return this._store.connections.getAll()}handle(){return[...this._nodeRects(),...this._connectionRects()].filter(e=>!this._dragContext.selectedItems.includes(e.element))}_nodeRects(){return this._nodes.filter(e=>!e.fSelectionDisabled()).map(e=>({element:e,fRect:this._mediator.execute(new tt(e.hostElement))}))}_connectionRects(){return this._connections.filter(e=>!e.fSelectionDisabled()).map(e=>({element:e,fRect:this._mediator.execute(new tt(e.boundingElement))}))}static \u0275fac=function(n){return new(n||Ed)};static \u0275prov=C({token:Ed,factory:Ed.\u0275fac})};return t=E([P(mf)],t),t})(),ra=class{static fToken=Symbol("GetCurrentSelectionRequest")},ZV=(()=>{let t=class Pd{_dragContext=p(he);handle(){return{fNodeIds:this._getSelectedNodes(),fGroupIds:this._getSelectedGroups(),fConnectionIds:this._getSelectedConnections()}}_getSelectedNodes(){return this._dragContext.selectedItems.filter(e=>e.hostElement.classList.contains("f-node")).map(e=>e.hostElement.dataset.fNodeId)}_getSelectedGroups(){return this._dragContext.selectedItems.filter(e=>e.hostElement.classList.contains("f-group")).map(e=>e.hostElement.dataset.fGroupId)}_getSelectedConnections(){return this._dragContext.selectedItems.filter(e=>!e.hostElement.classList.contains("f-node")&&!e.hostElement.classList.contains("f-group")).map(e=>e.hostElement.id)}static \u0275fac=function(n){return new(n||Pd)};static \u0275prov=C({token:Pd,factory:Pd.\u0275fac})};return t=E([P(ra)],t),t})(),_f=class{nodes;connections;isSelectedChanged;static fToken=Symbol("SelectRequest");constructor(i,e,n=!0){this.nodes=i,this.connections=e,this.isSelectedChanged=n}},QV=(()=>{let t=class Rd{_dragContext=p(he);_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||Rd)};static \u0275prov=C({token:Rd,factory:Rd.\u0275fac})};return t=E([P(_f)],t),t})(),gf=class{static fToken=Symbol("SelectAllRequest")},JV=(()=>{let t=class Od{_dragSession=p(he);_store=p(L);handle(e){this._dragSession.selectedItems.forEach(n=>{n.unmarkAsSelected()}),this._dragSession.selectedItems=[],this._store.nodes.getAll().forEach(n=>{n.markAsSelected(),this._dragSession.selectedItems.push(n)}),this._store.connections.getAll().forEach(n=>{n.markAsSelected(),this._dragSession.selectedItems.push(n)}),this._dragSession.isSelectedChanged=!0}static \u0275fac=function(n){return new(n||Od)};static \u0275prov=C({token:Od,factory:Od.\u0275fac})};return t=E([P(gf)],t),t})(),No=class{nodeOrGroup;static fToken=Symbol("SelectAndUpdateNodeLayerRequest");constructor(i){this.nodeOrGroup=i}},vf=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}},e8=(()=>{let t=class Fd{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||Fd)};static \u0275prov=C({token:Fd,factory:Fd.\u0275fac})};return t=E([P(vf)],t),t})(),Bi=class{item;itemContainer;static fToken=Symbol("UpdateItemAndChildrenLayersRequest");constructor(i,e){this.item=i,this.itemContainer=e}},Ao=class{nodeOrGroupId;static fToken=Symbol("GetDeepChildrenNodesAndGroupsRequest");constructor(i){this.nodeOrGroupId=i}},t8=(()=>{let t=class Nd{_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||Nd)};static \u0275prov=C({token:Nd,factory:Nd.\u0275fac})};return t=E([P(Ao)],t),t})(),n8=(()=>{let t=class Ad{_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 vf(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 Ao(e)).map(n=>n.hostElement)}static \u0275fac=function(n){return new(n||Ad)};static \u0275prov=C({token:Ad,factory:Ad.\u0275fac})};return t=E([P(Bi)],t),t})(),i8=(()=>{let t=class Ld{_dragSession=p(he);_mediator=p(V);handle({nodeOrGroup:e}){this._selectNodeIfNotSelected(e),this._mediator.execute(new Bi(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||Ld)};static \u0275prov=C({token:Ld,factory:Ld.\u0275fac})};return t=E([P(No)],t),t})(),o8=[YV,XV,ZV,QV,JV,i8],bf=class{static fToken=Symbol("ResetZoomRequest")},r8=(()=>{let t=class Bd{_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||Bd)};static \u0275prov=C({token:Bd,factory:Bd.\u0275fac})};return t=E([P(bf)],t),t})(),yf=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}},a8=new Set(["drag-node","drag-external-item","resize-node","rotate-node","create-connection","reassign-connection","drag-connection-waypoint","assign-to-container"]),s8=new Set(["drag-canvas","selection-area"]),l8=(()=>{let t=class Vd{_mediator=p(V);_store=p(L);_dragContext=p(he,{optional:!0});get _flowHost(){return this._store.flowHost}get _canvas(){return this._store.fCanvas}get _zoomComponent(){return this._store.instances.get(Ye.ZOOM)}get _isDragStarted(){return this._mediator.execute(new pi)}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 fe.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(a8.has(o)){e=!0;continue}if(!s8.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=fe.fromPoint(this._dragContext.onPointerDownPosition).add(fe.fromPoint(e).mult(r)),this._dragContext.onPointerDownScale=n}static \u0275fac=function(n){return new(n||Vd)};static \u0275prov=C({token:Vd,factory:Vd.\u0275fac})};return t=E([P(yf)],t),t})(),c8=[r8,l8],Cf=class{static fToken=Symbol("MinimapDrawNodesRequest")},d8=(()=>{let t=class zd{_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=Co("rect",this._browser);am(this._nodeRect(e,n,o),r);let a=e instanceof Ff;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||zd)};static \u0275prov=C({token:zd,factory:zd.\u0275fac})};return t=E([P(Cf)],t),t})(),xf=class{svg;minSize;static fToken=Symbol("MinimapCalculateViewportRequest");constructor(i,e){this.svg=i,this.minSize=e}},u8=(()=>{let t=class Hd{_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),d=this._viewportViewBox(a,s,c);return{scale:c,viewBox:d}}_contentRectInMinimapSpace(e,n,o){let r=this._nodesBoundingBox(),a=ne.elementTransform(r,e.hostElement),s=ne.div(a,n.transform.scale);return cy(s,o)}_nodesBoundingBox(){return this._mediator.execute(new Po)??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 St.initialize(e.width*n||0,e.height*n||0)}static \u0275fac=function(n){return new(n||Hd)};static \u0275prov=C({token:Hd,factory:Hd.\u0275fac})};return t=E([P(xf)],t),t})(),wf=class{static fToken=Symbol("MinimapCalculateViewRectRequest")},p8=(()=>{let t=class qd{_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||qd)};static \u0275prov=C({token:qd,factory:qd.\u0275fac})};return t=E([P(wf)],t),t})(),Tf=class{element;scale;viewBox;constructor(i,e=1,n=ne.initialize(0,0,0,0)){this.element=i,this.scale=e,this.viewBox=n}},f8=[d8,u8,p8],Sf=class{position;static fToken=Symbol("GetNormalizedPointRequest");constructor(i){this.position=i}},h8=(()=>{let t=class Gd{_store=p(L);handle({position:e}){return Bo(e,this._store.flowHost,this._store.transform)}static \u0275fac=function(n){return new(n||Gd)};static \u0275prov=C({token:Gd,factory:Gd.\u0275fac})};return t=E([P(Sf)],t),t})(),kf=class{static fToken=Symbol("SortNodeLayersRequest")},m8=(()=>{let t=class jd{_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 Ao(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||jd)};static \u0275prov=C({token:jd,factory:jd.\u0275fac})};return t=E([P(kf)],t),t})(),aa=class{itemsContainer;static fToken=Symbol("SortItemsByParentRequest");constructor(i){this.itemsContainer=i}},_8=(()=>{let t=class Ud{_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 d=this._getSortedChildrenBeforeParent(e,o,c,a,s);d.length&&this._moveBeforeNextSibling(e,d,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 d=[];for(let f of c){let g=f.hostElement;if(!e.contains(g))continue;let y=n.get(g);y===void 0||y>=s||d.push(g)}return d.sort((f,g)=>(n.get(f)??0)-(n.get(g)??0)),d}_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 d=s.pop();if(!d)continue;let f=d.fId();if(c.has(f))continue;c.add(f),a.push(d);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||Ud)};static \u0275prov=C({token:Ud,factory:Ud.\u0275fac})};return t=E([P(aa)],t),t})(),If=class{static fToken=Symbol("SortItemLayersRequest")},g8=(()=>{let t=class $d{_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 aa(this._canvas.fGroupsContainer().nativeElement)),this._mediator.execute(new kf),this._mediator.execute(new aa(this._canvas.fNodesContainer().nativeElement)))}static \u0275fac=function(n){return new(n||$d)};static \u0275prov=C({token:$d,factory:$d.\u0275fac})};return t=E([P(If)],t),t})();function Co(t,i){return i.document.createElementNS("http://www.w3.org/2000/svg",t)}function ln(t,i){return i(t)}function gn(t){return!0}function v8(){return/android|iPad|iPhone|iPod/i.test(navigator.userAgent||navigator.vendor||window.opera)}var b8=[...A5,...W9,...S5,...RV,...fV,...KV,...kV,...o8,...c8,...f8,...Y6,t8,X6,e7,h8,g8,_8,m8,n8,e8],y8=0,LC=(()=>{class t{_destroyRef=p(yt);_elementReference=p(Ze);_fBrowser=p(at);_stateChanges=new sn;get hostElement(){return this._elementReference.nativeElement}id=B(`f-pattern-${y8++}`);vColor=B("rgba(0,0,0,0.1)");hColor=B("rgba(0,0,0,0.1)");vSize=B(20,{transform:De});hSize=B(20,{transform:De});_transform=ei.default();_position=q.initialize();_size=St.initialize(this.hSize(),this.vSize());_pattern;_vLine;_hLine;constructor(){this._createPattern()}_createPattern(){this._pattern=Co("pattern",this._fBrowser),this._pattern.setAttribute("patternUnits","userSpaceOnUse"),this.hostElement.appendChild(this._pattern),this._vLine=Co("line",this._fBrowser),this._pattern.appendChild(this._vLine),this._hLine=Co("line",this._fBrowser),this._pattern.appendChild(this._hLine)}ngOnInit(){this._listenStateChanges()}_listenStateChanges(){new Sn(this._stateChanges).pipe(Df()).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=St.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:vm,useExisting:t}]),to],decls:0,vars:0,template:function(n,o){},encapsulation:2,changeDetection:0})}return t})();var C8=new _e("F_BACKGROUND"),x8=(()=>{class t{hostElement=p(Ze).nativeElement;static \u0275fac=function(n){return new(n||t)};static \u0275dir=Ue({type:t})}return t})(),BC=(()=>{class t extends x8{_mediator=p(V);fBackgroundPattern=Za(vm);ngOnInit(){this._mediator.execute(new ai(Ye.BACKGROUND,this))}ngAfterContentInit(){this._mediator.execute(new Kd(this.fBackgroundPattern()))}setTransform(e){this.fBackgroundPattern()?.setTransform(e)}ngOnDestroy(){this._mediator.execute(new si(Ye.BACKGROUND))}static \u0275fac=(()=>{let e;return function(o){return(e||(e=$(t)))(o||t)}})();static \u0275cmp=z({type:t,selectors:[["f-background"]],contentQueries:function(n,o,r){n&1&&Ph(r,o.fBackgroundPattern,vm,5),n&2&&Ht()},hostAttrs:[1,"f-component","f-background"],features:[Ee([{provide:C8,useExisting:t}]),J],ngContentSelectors:KL,decls:2,vars:0,template:function(n,o){n&1&&(fn(),Z(),Q(0,"svg"),$e(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 Wd=(function(t){return t.GROUPS="groups",t.CONNECTIONS="connections",t.NODES="nodes",t})(Wd||{}),Mf=[Wd.GROUPS,Wd.CONNECTIONS,Wd.NODES],w8=new _e("F_CANVAS"),T8=(()=>{class t{hostElement=p(Ze).nativeElement;transform=ei.default();_fCanvasChange=new sn;destroyRef=p(yt);getPosition(){return this.transform.position}_setPosition(e){this.transform.position=e}emitCanvasChangeEvent(){this._fCanvasChange.notify()}subscribeOnCanvasChange(){new Sn(this._fCanvasChange).pipe(Yd(this.debounce())).listen(this.destroyRef,()=>{this.fCanvasChange.emit(new H_(q.sum(this.transform.position,this.transform.scaledPosition),this.transform.scale))})}static \u0275fac=function(n){return new(n||t)};static \u0275dir=Ue({type:t})}return t})(),H_=class{position;scale;constructor(i,e){this.position=i,this.scale=e}};function jy(t){let i=new Set(Mf),e=new Set,n=[];for(let o of t??[])!i.has(o)||e.has(o)||(e.add(o),n.push(o));for(let o of Mf)e.has(o)||n.push(o);return n}var S8=new _e("F_CANVAS_CONFIG"),Dme={layers:[...Mf]};var sa=(()=>{class t extends T8{_mediator=p(V);_components=p(L);_injector=p(mt);_config=p(S8,{optional:!0});_flowId;fCanvasChange=Ge();position=B(q.initialize(),{transform:q.castToPoint});scale=B(1,{transform:De});debounceTime=B(0,{transform:De});debounce=S(()=>this.debounceTime()<0?0:this.debounceTime());fLayers=B(void 0);resolvedLayers=S(()=>{let e=this.fLayers();return e&&e.length>0?jy(e):this._config?.layers?jy(this._config.layers):[...Mf]});fGroupsContainer=it.required("fGroupsContainer");fNodesContainer=it.required("fNodesContainer");fConnectionsContainer=it.required("fConnectionsContainer");get flowId(){return this._flowId||""}ngOnInit(){this._flowId=this._mediator.execute(new af).fId(),this._mediator.execute(new Zd(this)),this._positionChange(),this._scaleChange(),super.subscribeOnCanvasChange()}_positionChange(){ce(()=>{let e=this.position();vt(()=>{this._mediator.execute(new eu(this.transform,e))})},{injector:this._injector})}_scaleChange(){ce(()=>{let e=this.scale();vt(()=>{this._mediator.execute(new tu(this.transform,e))})},{injector:this._injector})}redraw(){this._mediator.execute(new Sr(this.transform)),this.hostElement.style.removeProperty("transition"),this.hostElement.style.transform=ei.toString(this.transform),this._mediator.execute(new ri)}redrawWithAnimation(){this._mediator.execute(new Sr(this.transform)),this.hostElement.style.transition=`transform ${v8()?80:150}ms ease-in-out`,this.hostElement.style.transform=ei.toString(this.transform),Uy(this.hostElement,()=>this.redraw())}centerGroupOrNode(e,n=!0){this._afterRedraw(()=>{this._mediator.execute(new Qd(e,n))})}fitToScreen(e=q.initialize(),n=!0){this._afterRedraw(()=>{this._mediator.execute(new Jd(e,n))})}resetScaleAndCenter(e=!0){this._afterRedraw(()=>{this._mediator.execute(new ou(e))})}getScale(){return this.transform.scale||1}setScale(e,n=q.initialize()){this._mediator.execute(new ru(e,n))}resetScale(){this._mediator.execute(new iu)}ngOnDestroy(){this._mediator.execute(new nu)}_afterRedraw(e){this._mediator.execute(new oa(this._components.connectionsRevision,this._components.nodesRevision,()=>no(e,{injector:this._injector}),this.destroyRef))}static \u0275fac=(()=>{let e;return function(o){return(e||(e=$(t)))(o||t)}})();static \u0275cmp=z({type:t,selectors:[["f-canvas"]],viewQuery:function(n,o){n&1&&hn(o.fGroupsContainer,YL,5)(o.fNodesContainer,XL,5)(o.fConnectionsContainer,ZL,5),n&2&&Ht(3)},hostAttrs:[1,"f-component","f-canvas"],inputs:{position:[1,"position"],scale:[1,"scale"],debounceTime:[1,"debounceTime"],fLayers:[1,"fLayers"]},outputs:{fCanvasChange:"fCanvasChange"},features:[Ee([{provide:w8,useExisting:t}]),J],ngContentSelectors:JL,decls:3,vars:0,consts:[["fGroupsContainer",""],["fConnectionsContainer",""],["fNodesContainer",""],[1,"f-groups-container"],[1,"f-connections-container"],[1,"f-nodes-container"]],template:function(n,o){n&1&&(fn(QL),Ka(0),de(1,i5,3,1,null,null,qe),Ya()),n&2&&(l(),ue(o.resolvedLayers()))},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-groups-container[_ngcontent-%COMP%], .f-connections-container[_ngcontent-%COMP%], .f-nodes-container[_ngcontent-%COMP%]{isolation:isolate}.f-connections-container[_ngcontent-%COMP%]{position:absolute}"],changeDetection:0})}return t})();var k8=0,VC=(()=>{class t extends P6{fId=B(`f-connection-${k8++}`,{alias:"fConnectionId"});fOutputId=B("",{transform:e=>Io(e)||""});fInputId=B("",{transform:e=>Io(e)||""});fRadius=8;fOffset=12;fBehavior=ii.FIXED;fType=vo.STRAIGHT;fSelectionDisabled=B(!1,{transform:Y});fReassignableStart=B(!1,{transform:Y});fDraggingDisabled=B(!1,{alias:"fReassignDisabled",transform:Y});fInputSide=B(Ke.DEFAULT,{transform:e=>go(e,"fInputSide",Ke)});fOutputSide=B(Ke.DEFAULT,{transform:e=>go(e,"fOutputSide",Ke)});get boundingElement(){return this.fPath().hostElement}_mediator=p(V);ngOnInit(){this._mediator.execute(new su(this))}ngOnChanges(){this._mediator.execute(new Pi)}ngOnDestroy(){this._mediator.execute(new Ru(this))}static \u0275fac=(()=>{let e;return function(o){return(e||(e=$(t)))(o||t)}})();static \u0275cmp=z({type:t,selectors:[["f-connection"]],hostAttrs:[1,"f-component","f-connection"],hostVars:6,hostBindings:function(n,o){n&2&&(O("id",o.fId())("data-f-connection-type",o.fType),se("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",De],fOffset:[2,"fOffset","fOffset",De],fBehavior:[2,"fBehavior","fBehavior",e=>go(e,"fBehavior",ii)],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:Ef,useExisting:t}]),J,to],ngContentSelectors:r5,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&&(fn(o5),Z(),h(0,"svg",1),F(1,"defs",null,0),$e(3),h(4,"g",2),M(5,a5,1,1,":svg:linearGradient",3),F(6,"path",4),h(7,"g"),F(8,"path",5),M(9,s5,1,0,":svg:circle",6),F(10,"circle",7),m()()(),$e(11,1),$e(12,2),$e(13,3),M(14,l5,1,0)),n&2){let r;l(5),D((r=o.fGradient())?5:-1,r),l(),O("d",o.path),l(2),_("useGradient",!!o.fGradient()),O("d",o.path),l(),D(o.fReassignableStart()?9:-1),l(5),D(o.fContents().length?14:-1)}},dependencies:[Fm,I6,M6,C6,k6],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 I8=new _e("F_MAGNETIC_LINES"),M8=(()=>{class t{hostElement=p(Ze).nativeElement;static \u0275fac=function(n){return new(n||t)};static \u0275dir=Ue({type:t})}return t})();var zC=(()=>{class t extends M8{threshold=B(10,{transform:De,alias:"fAlignThreshold"});_mediator=p(V);ngOnInit(){this._mediator.execute(new ai(Ye.MAGNETIC_LINES,this))}ngOnDestroy(){this._mediator.execute(new si(Ye.MAGNETIC_LINES))}static \u0275fac=(()=>{let e;return function(o){return(e||(e=$(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:I8,useExisting:t}]),J],decls:0,vars:0,template:function(n,o){},styles:[c5]})}return t})();var mm=(()=>{class t{fMinSize=B(1e3);_mediator=p(V);hostElement=p(Ze).nativeElement;model=new Tf(this.hostElement);redraw(){let{scale:e,viewBox:n}=this._mediator.execute(new xf(this.hostElement,this.fMinSize()));this.model=new Tf(this.hostElement,e,n),dy(n,this.hostElement)}static \u0275fac=function(n){return new(n||t)};static \u0275dir=Ue({type:t,selectors:[["svg","fMinimapFlow",""]],inputs:{fMinSize:[1,"fMinSize"]}})}return t})(),_m=(()=>{class t{_mediator=p(V);_elementRef=p(Ze);hostElement=this._elementRef.nativeElement;redraw(){this.clear();let e=this._elementRef.nativeElement.ownerDocument.createDocumentFragment();this._mediator.execute(new Cf).forEach(n=>{e.appendChild(n)}),this.hostElement.appendChild(e)}clear(){this.hostElement.replaceChildren()}static \u0275fac=function(n){return new(n||t)};static \u0275dir=Ue({type:t,selectors:[["g","fMinimapCanvas",""]]})}return t})(),gm=(()=>{class t{_mediator=p(V);hostElement=p(Ze).nativeElement;redraw(){am(this._mediator.execute(new wf),this.hostElement)}static \u0275fac=function(n){return new(n||t)};static \u0275dir=Ue({type:t,selectors:[["rect","fMinimapView",""]],hostAttrs:[1,"f-component","f-minimap-view"]})}return t})(),D8=new _e("F_MINIMAP_BASE"),E8=(()=>{class t{hostElement=p(Ze).nativeElement;static \u0275fac=function(n){return new(n||t)};static \u0275dir=Ue({type:t})}return t})(),HC=(()=>{class t extends E8{_destroyRef=p(yt);_mediator=p(V);_browser=p(at);_store=p(L);_canvas=it.required(_m);_flow=it.required(mm);_minimapView=it.required(gm);fMinSize=B(1e3);fNodeRenderLimit=B(1500,{transform:De});get state(){return this._flow().model}ngOnInit(){this._mediator.execute(new ai(Ye.MINIMAP,this))}ngAfterViewInit(){this._listenTransformChanges()}_listenTransformChanges(){this._mediator.execute(new Xd).pipe(Df(),f5()).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 si(Ye.MINIMAP))}static \u0275fac=(()=>{let e;return function(o){return(e||(e=$(t)))(o||t)}})();static \u0275cmp=z({type:t,selectors:[["f-minimap"]],viewQuery:function(n,o){n&1&&hn(o._canvas,_m,5)(o._flow,mm,5)(o._minimapView,gm,5),n&2&&Ht(3)},hostAttrs:[1,"f-component","f-minimap"],inputs:{fMinSize:[1,"fMinSize"],fNodeRenderLimit:[1,"fNodeRenderLimit"]},exportAs:["fComponent"],features:[Ee([{provide:D8,useExisting:t}]),J],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&&(Z(),h(0,"svg",0),F(1,"g",1)(2,"rect",2),m()),n&2&&_("fMinSize",o.fMinSize())},dependencies:[mm,_m,gm],styles:["[_nghost-%COMP%]{display:block;position:absolute}[_nghost-%COMP%] svg[_ngcontent-%COMP%]{overflow:hidden}"],changeDetection:0})}return t})();var P8=(()=>{class t{hostElement=p(Ze).nativeElement;initialize(){this.hostElement.style.display="none"}static \u0275fac=function(n){return new(n||t)};static \u0275dir=Ue({type:t})}return t})(),qC=(()=>{class t extends P8{_mediator=p(V);fTrigger=e=>e.shiftKey;ngOnInit(){this._mediator.execute(new ai(Ye.SELECTION_AREA,this)),super.initialize()}ngOnDestroy(){this._mediator.execute(new si(Ye.SELECTION_AREA))}static \u0275fac=(()=>{let e;return function(o){return(e||(e=$(t)))(o||t)}})();static \u0275cmp=z({type:t,selectors:[["f-selection-area"]],hostAttrs:[1,"f-selection-area","f-component"],inputs:{fTrigger:"fTrigger"},features:[J],decls:0,vars:0,template:function(n,o){},styles:["[_nghost-%COMP%]{position:absolute}"]})}return t})();var R8=0,O8=120,la=(()=>{class t extends z_{_destroyRef=p(yt);_mediator=p(V);_browser=p(at);_componentsStore=p(L);_cache=p(kn);_injector=p(mt);_flowConfig=p(b9,{optional:!0});fId=B(this._flowConfig?.id??`f-flow-${R8++}`,{alias:"fFlowId"});fCache=B(!1,{transform:Y});hostElement=p(Ze).nativeElement;fNodesRendered=Ge();fFullRendered=Ge();fLoaded=Ge();ngOnInit(){this._mediator.execute(new of(this)),this._listenCacheChanges()}ngAfterContentInit(){this._browser.isBrowser()&&(this._listenNodesChanges(),this._listenConnectionsChanges())}_listenCacheChanges(){ce(()=>{this._cache.enabled=this.fCache()},{injector:this._injector})}_listenNodesChanges(){new Sn(this._componentsStore.nodesChanges$,this._componentsStore.progressiveRenderChanges$).pipe(Df(),Yd(O8),p5()).listen(this._destroyRef,()=>{this._mediator.execute(new pi)||this._componentsStore.hasPendingProgressiveRender||(this._mediator.execute(new If),this._mediator.execute(new df),this._mediator.execute(new oa(this._componentsStore.connectionsRevision+1,this._componentsStore.nodesRevision,()=>this._mediator.execute(new uf),this._destroyRef)),this._mediator.execute(new Pi))})}_listenConnectionsChanges(){this._mediator.execute(new bo).listen(this._destroyRef,()=>{if(!this._mediator.execute(new pi)){if(this._componentsStore.isViewportAnimating){this._mediator.execute(new ff(this._destroyRef));return}this._mediator.execute(new Or)}})}redraw(){this._mediator.execute(new Pi)}reset(){this._mediator.execute(new pf)}getNodesBoundingBox(){return this._mediator.execute(new Jp)}getSelection(){return this._mediator.execute(new ra)}getPositionInFlow(e){return this._mediator.execute(new Sf(e))}getState(e){return this._mediator.execute(new lf(e?.measuredSize??!1))}selectAll(){this._mediator.execute(new bo).pipe(_y()).listen(this._destroyRef,()=>{this._mediator.execute(new gf)})}select(e,n,o=!0){this._mediator.execute(new bo).pipe(_y()).listen(this._destroyRef,()=>{this._mediator.execute(new _f(e,n,o))})}clearSelection(){this._mediator.execute(new hf)}ngOnDestroy(){this._mediator.execute(new cf(this))}static \u0275fac=(()=>{let e;return function(o){return(e||(e=$(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,...C5,iC,Lo,...b8,he,...j9,...v9,{provide:W_,useExisting:t}]),J],ngContentSelectors:u5,decls:7,vars:0,template:function(n,o){n&1&&(fn(d5),Ka(0),$e(1),$e(2,1),$e(3,2),$e(4,3),$e(5,4),$e(6,5),Ya())},styles:["[_nghost-%COMP%]{display:block;position:relative;width:100%;height:100%;overflow:hidden;pointer-events:all;-webkit-user-select:none;user-select:none;touch-action:none} .f-connection-content{position:absolute;left:0;top:0;inline-size:max-content;pointer-events:all;transform-origin:50% 50%} .f-node, .f-group{position:absolute!important;transform-origin:center;-webkit-user-select:none;user-select:none;pointer-events:all;left:0!important;top:0!important;box-sizing:border-box} .f-group{z-index:1} .f-connection-content{z-index:3} .f-node{z-index:4}.hidden[_ngcontent-%COMP%]{opacity:0}"],changeDetection:0})}return t})();var GC=(()=>{class t{fVirtualForOf=[];_vc=p(Wa);_tpl=p(G0);_zone=p(Zt);_componentsStore=p(L,{optional:!0});_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()}_renderProgressively(){let r=0;this._startProgressiveRender(),this._zone.runOutsideAngular(()=>{let a=()=>{let s=this.fVirtualForOf.length,c=performance.now(),d=Math.min(s,r+5),f=0;for(;r<d&&(f===0||performance.now()-c<10);)this._insertView(r),r++,f++;let g=performance.now()-c;if(!(r>=s)&&g<10){let T=g/f,w=(10-g)*.9,N=T>0?Math.floor(w/T):0,H=Math.min(s,r+N);for(;r<H;)this._insertView(r),r++}if(r<s){this._rafId=requestAnimationFrame(a);return}this._rafId=null,this._finishProgressiveRender()};this._rafId=requestAnimationFrame(a)})}_insertView(e){this._vc.createEmbeddedView(this._tpl,{$implicit:this.fVirtualForOf[e],index:e})}_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=Ue({type:t,selectors:[["","fVirtualFor","","fVirtualForOf",""]],inputs:{fVirtualForOf:"fVirtualForOf"},features:[to]})}return t})();var vn=(function(t){return t[t.ZOOM_IN=1]="ZOOM_IN",t[t.ZOOM_OUT=-1]="ZOOM_OUT",t})(vn||{}),F8=new _e("F_ZOOM"),q_=class{},N8=.1,A8=1,L8=.5,B8=60,V8=.5;function z8(t){return Math.abs(t.deltaY)>=Math.abs(t.deltaX)?t.deltaY:t.deltaX}function H8(t,i,e){return q8(t)?j8(i,e):G8(i,e)}function q8(t){return(t.ctrlKey||t.metaKey)&&t.deltaMode===WheelEvent.DOM_DELTA_PIXEL}function G8(t,i){let e=Math.abs(t)/100,n=jC(e,N8,A8);return i*n}function j8(t,i){if(Math.abs(t)<L8)return 0;let e=Math.abs(t)/B8,n=jC(e,0,V8);return i*n}function jC(t,i,e){return Math.max(i,Math.min(e,t))}var ca=(()=>{class t extends q_{_mediator=p(V);_injector=p(mt);_store=p(L);_triggersListener=ze.emptyListener();isEnabled=B(!1,{alias:"fZoom",transform:Y});fWheelTrigger=gn;fDblClickTrigger=gn;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 ai(Ye.ZOOM,this))}ngAfterViewInit(){this._listenZoomEnabledChanges()}_listenZoomEnabledChanges(){ce(()=>{this.isEnabled(),vt(()=>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(!ln(e,this.fWheelTrigger)||(e.preventDefault(),e.target?.closest("[fLockedContext]")))return;let o=z8(e);if(o===0)return;let r=this._normalizeWheelStep(e,o);r!==0&&this.setZoom(q.initialize(e.clientX,e.clientY),r,this._calculateDirection(o),!1)};_normalizeWheelStep(e,n){return H8(e,n,this.step)}_calculateDirection(e){return e>0?vn.ZOOM_OUT:vn.ZOOM_IN}_onDoubleClick=e=>{if(!ln(e,this.fDblClickTrigger))return;e.preventDefault();let n=e.target;eB(n)||n?.closest("[fLockedContext]")||this.setZoom(q.initialize(e.clientX,e.clientY),this.dblClickStep,vn.ZOOM_IN,!0)};_getToCenterPosition(e,n){return q.initialize(e?.x||n.gravityCenter.x,e?.y||n.gravityCenter.y)}zoomIn(e){this._onZoomToCenter(vn.ZOOM_IN,e)}zoomOut(e){this._onZoomToCenter(vn.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 yf(e,n,o,r))}getZoomValue(){return this._canvas.transform.scale||1}reset(){this._mediator.execute(new bf)}_disposeListeners(){this._triggersListener(),this._triggersListener=ze.emptyListener()}ngOnDestroy(){this._disposeListeners(),this._mediator.execute(new si(Ye.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=$(t)))(o||t)}})();static \u0275dir=Ue({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",De],maximum:[2,"fZoomMaximum","maximum",De],step:[2,"fZoomStep","step",De],dblClickStep:[2,"fZoomDblClickStep","dblClickStep",De]},features:[Ee([{provide:F8,useExisting:t}]),J]})}return t})();var UC=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=Et({type:t});static \u0275inj=Dt({imports:[Rt]})}return t})();var hh=D3(qE(),1);var Ba=(function(t){return t.NETWORK_SIMPLEX="network-simplex",t.TIGHT_TREE="tight-tree",t.LONGEST_PATH="longest-path",t})(Ba||{}),rre={direction:zi.TOP_BOTTOM,nodeGap:48,layerGap:64,algorithm:Ba.NETWORK_SIMPLEX,defaultNodeSize:St.initialize(120,72)},C0=(()=>{class t extends rf{constructor(){super(rre)}mergeOptions(e,n={}){return Mt(me(me({},e),n),{defaultNodeSize:n.defaultNodeSize?St.initialize(n.defaultNodeSize.width,n.defaultNodeSize.height):St.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 hh.layout(a),a.nodes().forEach(c=>{let d=a.node(c),f=e.find(y=>y.id===c);if(!d||!f)return;let g=f.size??r.defaultNodeSize;s.set(c,q.initialize(d.x-g.width/2,d.y-g.height/2))}),{nodes:FC(e,s)}}_buildGraph(e,n,o){let r=new hh.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 Ba.TIGHT_TREE:return"tight-tree";case Ba.LONGEST_PATH:return"longest-path";case Ba.NETWORK_SIMPLEX:default:return"network-simplex"}}_mapDirection(e){switch(e){case zi.BOTTOM_TOP:return"BT";case zi.LEFT_RIGHT:return"LR";case zi.RIGHT_LEFT:return"RL";case zi.TOP_BOTTOM:default:return"TB"}}static \u0275fac=function(n){return new(n||t)};static \u0275prov=C({token:t,factory:t.\u0275fac})}return t})();var Ci={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 mh={graph:{perf:{cache:!0,virtualization:!1},perfHud:!0}};var are="adaptive-curve",T0=["segment","straight","bezier","adaptive-curve"],GE="sm.graph.connection-type",jE="sm.graph.layout-algorithm",UE="sm.graph.layout-direction",_h=(()=>{class t{_connectionType=W(x0(GE,sre,are));_layoutAlgorithm=W(x0(jE,Kv,Uv));_layoutDirection=W(x0(UE,Yv,$v));_layoutSpacing=W(Wv);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),w0(GE,e))}setLayoutAlgorithm(e){this._layoutAlgorithm()!==e&&(this._layoutAlgorithm.set(e),w0(jE,e))}setLayoutDirection(e){this._layoutDirection()!==e&&(this._layoutDirection.set(e),w0(UE,e))}static toFoblexEnum(e){return e}static \u0275fac=function(n){return new(n||t)};static \u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function x0(t,i,e){let n=null;try{n=localStorage.getItem(t)}catch{return e}return n&&i(n)?n:e}function w0(t,i){try{localStorage.setItem(t,i)}catch{}}function sre(t){return typeof t=="string"&&T0.includes(t)}var Qo=(()=>{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=C({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function $E(t,i){let e=new Set([i]);for(let n of t.get(i)??[])e.add(n);return e}var lre={TOP_BOTTOM:{output:Ke.BOTTOM,input:Ke.TOP},BOTTOM_TOP:{output:Ke.TOP,input:Ke.BOTTOM},LEFT_RIGHT:{output:Ke.RIGHT,input:Ke.LEFT},RIGHT_LEFT:{output:Ke.LEFT,input:Ke.RIGHT}};function WE(t,i){return ps(t)?lre[i]:{input:Ke.CALCULATE,output:Ke.CALCULATE}}var KE={body:(t,i)=>`This folder has ${t} ${t===1?"node":"nodes"}; showing ${i} on the map. Pick a sub-folder to narrow it.`};function cre(t,i){if(t&1&&(Q(0,"div",0),oe(1,"span",1),Q(2,"p",2),v(3),ie()()),t&2){let e=u();l(3),be(" ",e.state().body," ")}}var YE=(()=>{class t{loader=p(pt);texts=KE;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&&M(0,cre,4,1,"div",0),n&2&&D(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 XE=`
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 dre=["content"],ure=["*"],pre=t=>({closeCallback:t});function fre(t,i){}function hre(t,i){t&1&&R(0,fre,0,0,"ng-template")}function mre(t,i){if(t&1){let e=K();h(0,"div",1),A("click",function(o){k(e);let r=u();return I(r.onOverlayClick(o))})("pMotionOnEnter",function(o){k(e);let r=u();return I(r.onAnimationStart(o))})("pMotionOnAfterLeave",function(){k(e);let o=u();return I(o.onAnimationEnd())}),h(1,"div",2),A("click",function(o){k(e);let r=u();return I(r.onContentClick(o))})("mousedown",function(o){k(e);let r=u();return I(r.onContentClick(o))}),$e(2),R(3,hre,1,0,null,3),m()()}if(t&2){let e=u();qt(e.sx("root")),j(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(),j(e.cx("content")),_("pBind",e.ptm("content")),l(2),_("ngTemplateOutlet",e.contentTemplate||e._contentTemplate)("ngTemplateOutletContext",Re(17,pre,e.onCloseClick.bind(e)))}}var _re={root:()=>({position:"absolute"})},gre={root:"p-popover p-component",content:"p-popover-content"},ZE=(()=>{class t extends tn{name="popover";style=XE;classes=gre;inlineStyles=_re;static \u0275fac=(()=>{let e;return function(o){return(e||(e=$(t)))(o||t)}})();static \u0275prov=C({token:t,factory:t.\u0275fac})}return t})(),QE=new _e("POPOVER_INSTANCE"),S0=(()=>{class t extends Nn{componentName="Popover";$pcPopover=p(QE,{optional:!0,skipSelf:!0})??void 0;bindDirectiveInstance=p(Le,{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(ZE);zone=p(Zt);overlayService=p(ao);onAfterContentInit(){this.templates.forEach(e=>{e.getType()==="content"&&(this._contentTemplate=e.template)})}bindDocumentClickListener(){if(Gt(this.platformId)&&!this.documentClickListener){let e=ov()?"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"?ki(this.document.body,this.container):ki(this.$appendTo(),this.container))}restoreAppend(){this.container&&this.$appendTo()&&this.$appendTo()!=="self"&&ki(this.el.nativeElement,this.container)}setZIndex(){this.autoZIndex&&wn.set("overlay",this.container,this.baseZIndex+this.config.zIndex.overlay)}align(){if(this.target&&this.container){fr(this.container,this.target,!1);let e=Lh(this.container),n=Lh(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(sv("popover.arrow.left").name,`${r}px`),e.top<n.top&&(this.container.setAttribute("data-p-popover-flipped","true"),!this.$unstyled()&&pr(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&&wn.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&&!is()&&this.hide()}bindDocumentResizeListener(){if(Gt(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(){Gt(this.platformId)&&(this.scrollHandler||(this.scrollHandler=new _r(this.target,()=>{this.overlayVisible&&this.hide()})),this.scrollHandler.bindScrollListener())}unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()}onContainerDestroy(){this.cd.destroyed||(this.target=null),this.unbindDocumentClickListener(),this.unbindDocumentResizeListener(),this.unbindScrollListener()}onDestroy(){this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.container&&this.autoZIndex&&wn.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=$(t)))(o||t)}})();static \u0275cmp=z({type:t,selectors:[["p-popover"]],contentQueries:function(n,o,r){if(n&1&&jn(r,dre,4)(r,Ot,4),n&2){let a;ee(a=te())&&(o.contentTemplate=a.first),ee(a=te())&&(o.templates=a)}},hostBindings:function(n,o){n&1&&A("keydown.escape",function(a){return o.onEscapeKeydown(a)},$a)},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",De],focusOnShow:[2,"focusOnShow","focusOnShow",Y],showTransitionOptions:"showTransitionOptions",hideTransitionOptions:"hideTransitionOptions",motionOptions:[1,"motionOptions"]},outputs:{onShow:"onShow",onHide:"onHide"},features:[Ee([ZE,{provide:QE,useExisting:t},{provide:nn,useExisting:t}]),Qt([Le]),J],ngContentSelectors:ure,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&&(fn(),M(0,mre,4,19,"div",0)),n&2&&D(o.render?0:-1)},dependencies:[Rt,mn,ro,ot,Le,fo,Ev],encapsulation:2,changeDetection:0})}return t})(),JE=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=Et({type:t});static \u0275inj=Dt({imports:[S0,ot,ot]})}return t})();function bre(t,i){if(t&1){let e=K();h(0,"li",10)(1,"button",14),A("click",function(){let o=k(e).$implicit,r=u(),a=gt(6);return r.setLayoutAlgorithm(o),I(a.hide())}),v(2),m()()}if(t&2){let e=i.$implicit,n=u();l(),se("is-active",n.layoutAlgorithm()===e),O("aria-checked",n.layoutAlgorithm()===e)("data-testid","graph-layout-algorithm-option-"+e),l(),be(" ",n.layoutAlgorithmLabel(e)," ")}}function yre(t,i){if(t&1){let e=K();h(0,"button",15),A("click",function(){let o=k(e).$implicit,r=u(),a=gt(11);return r.setLayoutDirection(o),I(a.hide())}),F(1,"i",16),m()}if(t&2){let e=i.$implicit,n=u();se("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(),j(n.directionItemIcon(e))}}function Cre(t,i){if(t&1){let e=K();h(0,"button",15),A("click",function(){let o=k(e).$implicit,r=u(),a=gt(16);return r.setConnectionType(o),I(a.hide())}),Z(),h(1,"svg",17),F(2,"path",7),m()()}if(t&2){let e=i.$implicit,n=u();se("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 eP={TOP_BOTTOM:"pi pi-arrow-down",BOTTOM_TOP:"pi pi-arrow-up",LEFT_RIGHT:"pi pi-arrow-right",RIGHT_LEFT:"pi pi-arrow-left"},xre={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"},tP=(()=>{class t{graphPreferences=p(_h);texts=Ci;layoutAlgorithms=Gv;layoutDirections=jv;connectionTypes=T0;layoutAlgorithm=this.graphPreferences.layoutAlgorithm;layoutDirection=this.graphPreferences.layoutDirection;connectionType=this.graphPreferences.connectionType;directionIcon=S(()=>eP[this.layoutDirection()]);directionAvailable=S(()=>ps(this.layoutAlgorithm()));layoutAlgorithmLabel(e){return Ci.layout.algorithm.options[e].label}layoutDirectionLabel(e){return Ci.layout.direction.options[e].label}connectionTypeLabel(e){return Ci.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 eP[e]}connectionTypeItemPath(e){return xre[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=K();h(0,"p-button",3),A("onClick",function(s){k(r);let c=gt(6);return I(c.toggle(s))}),m(),h(1,"p-button",4),A("onClick",function(s){k(r);let c=gt(11);return I(c.toggle(s))}),m(),h(2,"p-button",5),A("onClick",function(s){k(r);let c=gt(16);return I(c.toggle(s))}),Z(),h(3,"svg",6),F(4,"path",7),m()(),Ga(),h(5,"p-popover",8,0)(7,"ul",9),de(8,bre,3,5,"li",10,qe),m()(),h(10,"p-popover",8,1)(12,"div",11),de(13,yre,2,8,"button",12,qe),m()(),h(15,"p-popover",8,2)(17,"div",13),de(18,Cre,3,7,"button",12,qe),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),ue(o.layoutAlgorithms),l(5),ue(o.layoutDirections),l(5),ue(o.connectionTypes))},dependencies:[rn,jt,JE,S0,Fe,Be],styles:['[_nghost-%COMP%] .graph__layout-popover .p-popover-content{padding:4px}.graph__layout-menu[_ngcontent-%COMP%]{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;min-width:160px}.graph__layout-menu-item[_ngcontent-%COMP%]{appearance:none;border:0;background:transparent;color:var(--sm-text);font:inherit;text-align:left;padding:6px 10px;border-radius:var(--sm-radius-sm);cursor:pointer;display:flex;align-items:center;gap:8px;transition:background .12s ease,color .12s ease}.graph__layout-menu-item[_ngcontent-%COMP%]:hover, .graph__layout-menu-item[_ngcontent-%COMP%]:focus-visible{background:color-mix(in srgb,var(--p-primary-color) 12%,transparent);outline:none}.graph__layout-menu-item.is-active[_ngcontent-%COMP%]{background:color-mix(in srgb,var(--p-primary-color) 18%,transparent);color:var(--p-primary-color);font-weight:600}.graph__layout-menu-item[_ngcontent-%COMP%]:before{content:"";display:inline-block;width:6px;height:6px;border-radius:50%;background:transparent;flex-shrink:0}.graph__layout-menu-item.is-active[_ngcontent-%COMP%]:before{background:var(--p-primary-color)}.graph__layout-icon-row[_ngcontent-%COMP%]{display:inline-flex;flex-direction:row;gap:2px;padding:2px}.graph__layout-icon-item[_ngcontent-%COMP%]{appearance:none;border:0;background:transparent;color:var(--sm-text);cursor:pointer;width:32px;height:32px;display:inline-flex;align-items:center;justify-content:center;border-radius:var(--sm-radius-sm);transition:background .12s ease,color .12s ease}.graph__layout-icon-item[_ngcontent-%COMP%] > i[_ngcontent-%COMP%]{font-size:1rem}.graph__connection-svg[_ngcontent-%COMP%]{width:20px;height:20px;overflow:visible}.graph__connection-svg--toggle[_ngcontent-%COMP%]{width:16px;height:16px}.graph__layout-icon-item[_ngcontent-%COMP%]:hover, .graph__layout-icon-item[_ngcontent-%COMP%]:focus-visible{background:color-mix(in srgb,var(--p-primary-color) 12%,transparent);outline:none}.graph__layout-icon-item.is-active[_ngcontent-%COMP%]{background:color-mix(in srgb,var(--p-primary-color) 18%,transparent);color:var(--p-primary-color)}'],changeDetection:0})}return t})();var nP={a11y:{toolbarLabel:"Toggle node kinds"},favorites:{label:"Favorites"}};function wre(t,i){if(t&1&&oe(0,"i",4),t&2){let e=u();j(e.piClass()),Oe("font-size",e.size(),"px")}}function Tre(t,i){if(t&1&&(Z(),Q(0,"svg",1),oe(1,"path"),ie()),t&2){let e=u();O("width",e.size())("height",e.size()),l(),O("d",e.svgPath())}}function Sre(t,i){if(t&1&&(Q(0,"span",4),v(1),ie()),t&2){let e=u();Oe("font-size",e.size(),"px")("line-height",e.size(),"px"),l(),x(e.emoji())}}function kre(t,i){if(t&1&&(Q(0,"span",5),v(1),ie()),t&2){let e=u();Oe("font-size",e.size(),"px")("line-height",e.size(),"px"),l(),x(e.letter())}}var Jo=(()=>{class t{kindRegistry=p(fs);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&&M(0,wre,1,4,"i",0)(1,Tre,2,3,":svg:svg",1)(2,Sre,2,5,"span",2)(3,kre,2,5,"span",3),n&2){let r;D((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 iP=()=>({class:"kind-palette__content"}),oP=t=>({content:t}),Ire=(t,i)=>i.kind;function Mre(t,i){if(t&1&&(F(0,"sm-kind-icon",5),h(1,"span"),v(2),m()),t&2){let e=u().$implicit;_("kind",e.kind)("size",16),l(2),x(e.count)}}function Dre(t,i){if(t&1){let e=K();h(0,"p-togglebutton",4),A("ngModelChange",function(){let o=k(e).$implicit,r=u();return I(r.toggle(o.kind))}),R(1,Mre,3,3,"ng-template",null,0,We),m()}if(t&2){let e=i.$implicit,n=u();Oe("--kind-accent","var(--sm-kind-"+e.kind+")"),_("ngModel",n.isActive(e.kind))("pTooltip",e.label)("ariaLabel",e.label)("styleClass","kind-palette__btn kind-palette__btn--"+e.kind)("pt",Re(9,oP,Pt(8,iP))),O("data-testid","kind-palette-"+e.kind)}}function Ere(t,i){if(t&1&&(F(0,"i",7),h(1,"span"),v(2),m()),t&2){let e=u(2);se("pi-star-fill",e.favoritesActive())("pi-star",!e.favoritesActive()),l(2),x(e.favoritesCount())}}function Pre(t,i){if(t&1){let e=K();h(0,"p-togglebutton",6),A("ngModelChange",function(){k(e);let o=u();return I(o.toggleFavoritesOnly())}),R(1,Ere,3,5,"ng-template",null,0,We),m()}if(t&2){let e=u();_("ngModel",e.favoritesActive())("pTooltip",e.texts.favorites.label)("ariaLabel",e.texts.favorites.label)("pt",Re(5,oP,Pt(4,iP)))}}var rP=(()=>{class t{loader=p(pt);filters=p(on);kindRegistry=p(fs);issuePaths=p(Qo);texts=nP;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","--kind-accent","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),de(1,Dre,3,11,"p-togglebutton",2,Ire),M(3,Pre,3,7,"p-togglebutton",3),m()),n&2&&(O("aria-label",o.texts.a11y.toolbarLabel),l(),ue(o.entries()),l(2),D(o.showFavorites()?3:-1))},dependencies:[Ct,Ft,Nt,Xn,Yn,Fe,Be,Jo],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(--kind-accent, var(--p-text-color))}[_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 Rn={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 Rre=()=>({class:"link-kind-palette__content"}),Ore=t=>({content:t}),Fre=(t,i)=>i.kind;function Nre(t,i){if(t&1&&v(0),t&2){let e=u(2).$implicit;be(" ",e.text," ")}}function Are(t,i){if(t&1&&F(0,"i"),t&2){let e=u(2).$implicit;j(e.icon)}}function Lre(t,i){if(t&1&&(h(0,"span",4),M(1,Nre,1,1)(2,Are,1,2,"i",5),m()),t&2){let e=u().$implicit;l(),D(e.text?1:e.icon?2:-1)}}function Bre(t,i){if(t&1){let e=K();h(0,"p-togglebutton",3),A("ngModelChange",function(){let o=k(e).$implicit,r=u(2);return I(r.toggle(o.kind))}),R(1,Lre,3,1,"ng-template",null,0,We),m()}if(t&2){let e=i.$implicit,n=u(2);_("ngModel",n.isActive(e.kind))("pTooltip",e.tooltip)("ariaLabel",e.label)("styleClass","link-kind-palette__btn link-kind-palette__btn--"+e.kind)("pt",Re(7,Ore,Pt(6,Rre))),O("data-testid","link-kind-palette-"+e.kind)}}function Vre(t,i){if(t&1&&(h(0,"div",1),de(1,Bre,3,9,"p-togglebutton",2,Fre),m()),t&2){let e=u();O("aria-label",e.texts.a11y.toolbarLabel),l(),ue(e.entries())}}var aP=[{kind:"invokes",label:Rn.kinds.invokes,tooltip:Rn.tooltips.invokes,text:"/"},{kind:"references",label:Rn.kinds.references,tooltip:Rn.tooltips.references,icon:"pi pi-link"},{kind:"points",label:Rn.kinds.points,tooltip:Rn.tooltips.points,text:"`"},{kind:"mentions",label:Rn.kinds.mentions,tooltip:Rn.tooltips.mentions,text:"@"}];for(let t of aP)if(!xv.includes(t.kind))throw new Error(`link-kind-palette: unknown link kind "${t.kind}"`);var sP=(()=>{class t{loader=p(pt);filters=p(on);texts=Rn;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 aP.filter(r=>(e.get(r.kind)??0)>0||o.has(r.kind))});constructor(){ce(()=>{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&&M(0,Vre,3,1,"div",1),n&2&&D(o.entries().length>0?0:-1)},dependencies:[Ct,Ft,Nt,Xn,Yn,Fe,Be],styles:["[_nghost-%COMP%]{display:block;width:100%;pointer-events:auto}.link-kind-palette[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(2,1fr);gap:2px;padding:4px;background:color-mix(in srgb,var(--sm-bg-content) 80%,transparent);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);border:1px solid var(--sm-border);border-radius:var(--sm-radius-xl);box-shadow:var(--sm-shadow-floating)}.link-kind-palette__btn[_ngcontent-%COMP%]{--p-togglebutton-padding: 0;--p-togglebutton-content-padding: 0;--p-togglebutton-border-radius: var(--sm-radius-pill);--p-togglebutton-content-border-radius: var(--sm-radius-pill);--p-togglebutton-background: transparent;--p-togglebutton-checked-background: transparent;--p-togglebutton-hover-background: transparent;--p-togglebutton-border-color: transparent;--p-togglebutton-checked-border-color: transparent;--p-togglebutton-content-checked-background: var(--sm-bg-hover);--p-togglebutton-color: var(--p-text-muted-color);--p-togglebutton-hover-color: var(--p-text-color);--p-togglebutton-checked-color: var(--p-text-color);width:100%;height:30px}[_nghost-%COMP%] .link-kind-palette__content{width:100%;height:100%;display:flex;align-items:center;justify-content:center}[_nghost-%COMP%] .link-kind-palette__glyph{font-size:.95rem;line-height:1;font-weight:600;display:inline-flex;align-items:center;justify-content:center}[_nghost-%COMP%] .link-kind-palette__btn--invokes .link-kind-palette__glyph{color:var(--sm-edge-invokes)}[_nghost-%COMP%] .link-kind-palette__btn--invokes[aria-pressed=true] .link-kind-palette__glyph{color:var(--sm-edge-invokes-active)}[_nghost-%COMP%] .link-kind-palette__btn--references .link-kind-palette__glyph{color:var(--sm-edge-references)}[_nghost-%COMP%] .link-kind-palette__btn--references[aria-pressed=true] .link-kind-palette__glyph{color:var(--sm-edge-references-active)}[_nghost-%COMP%] .link-kind-palette__btn--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 lP={a11y:{toolbarLabel:"Toggle severity filters"},error:{label:"Errors",tooltip:"Only nodes with errors"},warn:{label:"Warnings",tooltip:"Only nodes with warnings"}};var dP=()=>({class:"severity-palette__content"}),uP=t=>({content:t});function zre(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=u(3);l(3),x(e.errorCount())}}function Hre(t,i){if(t&1){let e=K();h(0,"p-togglebutton",4),A("ngModelChange",function(){k(e);let o=u(2);return I(o.toggle("error"))}),R(1,zre,4,1,"ng-template",null,0,We),m()}if(t&2){let e=u(2);_("ngModel",e.isActive("error"))("pTooltip",e.texts.error.tooltip)("ariaLabel",e.texts.error.label)("pt",Re(5,uP,Pt(4,dP)))}}function qre(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=u(3);l(3),x(e.warnCount())}}function Gre(t,i){if(t&1){let e=K();h(0,"p-togglebutton",8),A("ngModelChange",function(){k(e);let o=u(2);return I(o.toggle("warn"))}),R(1,qre,4,1,"ng-template",null,0,We),m()}if(t&2){let e=u(2);_("ngModel",e.isActive("warn"))("pTooltip",e.texts.warn.tooltip)("ariaLabel",e.texts.warn.label)("pt",Re(5,uP,Pt(4,dP)))}}function jre(t,i){if(t&1&&(h(0,"div",1),M(1,Hre,3,7,"p-togglebutton",2),M(2,Gre,3,7,"p-togglebutton",3),m()),t&2){let e=u();O("aria-label",e.texts.a11y.toolbarLabel),l(),D(e.showError()?1:-1),l(),D(e.showWarn()?2:-1)}}var pP=(()=>{class t{loader=p(pt);filters=p(on);issuePaths=p(Qo);texts=lP;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(()=>cP(this.issuePaths.bySeverity().errors,this.visibleSet()));warnCount=S(()=>cP(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(){ce(()=>{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&&M(0,jre,3,3,"div",1),n&2&&D(o.hasAny()?0:-1)},dependencies:[Ct,Ft,Nt,Xn,Yn,Fe,Be],styles:["[_nghost-%COMP%]{display:block;width:100%;pointer-events:auto}.severity-palette[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2px;padding:4px;background:color-mix(in srgb,var(--sm-bg-content) 80%,transparent);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);border:1px solid var(--sm-border);border-radius:var(--sm-radius-xl);box-shadow:var(--sm-shadow-floating)}.severity-palette__btn[_ngcontent-%COMP%]{--p-togglebutton-padding: 0;--p-togglebutton-content-padding: 0 .55rem;--p-togglebutton-border-radius: var(--sm-radius-pill);--p-togglebutton-content-border-radius: var(--sm-radius-pill);--p-togglebutton-gap: .4rem;--p-togglebutton-background: transparent;--p-togglebutton-checked-background: transparent;--p-togglebutton-hover-background: transparent;--p-togglebutton-border-color: transparent;--p-togglebutton-checked-border-color: transparent;--p-togglebutton-color: var(--p-text-muted-color);--p-togglebutton-hover-color: var(--p-text-color);--p-togglebutton-checked-color: var(--p-text-color);--p-togglebutton-icon-color: var(--p-text-muted-color);--p-togglebutton-icon-hover-color: var(--p-text-color);--p-togglebutton-icon-checked-color: var(--p-text-color);width:56px;height:30px;font-size:.72rem;font-weight:600;font-variant-numeric:tabular-nums}.severity-palette__btn--error[_ngcontent-%COMP%]{--p-togglebutton-content-checked-background: color-mix(in srgb, var(--sm-severity-error-bg) 55%, var(--sm-bg-content))}.severity-palette__btn--warn[_ngcontent-%COMP%]{--p-togglebutton-content-checked-background: color-mix(in srgb, var(--sm-severity-warn-bg) 55%, var(--sm-bg-content))}[_nghost-%COMP%] .severity-palette__content{width:100%;height:100%;justify-content:flex-start;display:flex;align-items:center;gap:.4rem}[_nghost-%COMP%] .severity-palette__count{flex:1;text-align:right}[_nghost-%COMP%] .severity-palette__glyph{display:inline-flex;align-items:center;justify-content:center;font-size:.95rem;line-height:1}[_nghost-%COMP%] .severity-palette__btn--error .severity-palette__glyph, [_nghost-%COMP%] .severity-palette__btn--error .severity-palette__count{color:color-mix(in srgb,var(--sm-severity-error) 55%,var(--p-text-muted-color))}[_nghost-%COMP%] .severity-palette__btn--warn .severity-palette__glyph, [_nghost-%COMP%] .severity-palette__btn--warn .severity-palette__count{color:color-mix(in srgb,var(--sm-severity-warn) 55%,var(--p-text-muted-color))}[_nghost-%COMP%] .severity-palette__btn--error:hover .severity-palette__glyph, [_nghost-%COMP%] .severity-palette__btn--error:hover .severity-palette__count{color:color-mix(in srgb,var(--sm-severity-error) 80%,var(--p-text-color))}[_nghost-%COMP%] .severity-palette__btn--warn:hover .severity-palette__glyph, [_nghost-%COMP%] .severity-palette__btn--warn:hover .severity-palette__count{color:color-mix(in srgb,var(--sm-severity-warn) 80%,var(--p-text-color))}[_nghost-%COMP%] .severity-palette__btn--error[aria-pressed=true] .severity-palette__glyph, [_nghost-%COMP%] .severity-palette__btn--error[aria-pressed=true] .severity-palette__count{color:var(--sm-severity-error)}[_nghost-%COMP%] .severity-palette__btn--warn[aria-pressed=true] .severity-palette__glyph, [_nghost-%COMP%] .severity-palette__btn--warn[aria-pressed=true] .severity-palette__count{color:var(--sm-severity-warn)}"],changeDetection:0})}return t})();function cP(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 I0(t,i,e={}){let n=e.trim??!0,o=W(null),r=0;return ce(()=>{let a=t(),s=n?a.trim():a,c=++r;o.set(null),s&&i(s).then(d=>{c===r&&o.set(d)}).catch(()=>{c===r&&o.set(null)})}),o.asReadonly()}function Va(t,i){return Cn(Va),I0(t,e=>i.renderInline(e))}function M0(t,i){return Cn(M0),I0(t,e=>i.render(e))}function D0(t,i,e){return Cn(D0),I0(t,n=>i.highlightSource(n,e),{trim:!1})}var Ure=/^#(?:[0-9a-f]{3}|[0-9a-f]{4}|[0-9a-f]{6}|[0-9a-f]{8})$/i,$re=/^[a-z]+$/i;function gh(t){if(typeof t!="string")return null;let i=t.trim();return i.length===0?null:Ure.test(i)||$re.test(i)?i:null}var Wre=(t,i)=>i.step;function Kre(t,i){t&1&&(h(0,"span",8),v(1),m()),t&2&&(l(),x(i))}function Yre(t,i){if(t&1&&(h(0,"span",12)(1,"span",28),v(2,"T"),m(),v(3),m()),t&2){let e=u(),n=Me(0);_("pTooltip",e.texts.stats.tokens(n.tokensTotal)),l(3),x(e.tokensShort())}}function Xre(t,i){if(t&1&&(h(0,"span",13)(1,"span",28),v(2,"B"),m(),v(3),m()),t&2){let e=u(),n=Me(0);_("pTooltip",e.texts.stats.bytes(n.bytesTotal)),l(3),x(e.bytesShort())}}function Zre(t,i){if(t&1){let e=K();h(0,"button",31),A("click",function(o){let r=k(e).$implicit,a=u(2);return I(a.onTagClick(r,o))}),v(1),m()}if(t&2){let e=i.$implicit,n=u(2);O("aria-label",n.texts.tagFilterAriaLabel(e)),l(),x(e)}}function Qre(t,i){if(t&1&&(h(0,"span",30),v(1),m()),t&2){let e=u(2),n=Me(2);l(),x(e.texts.tagOverflow(n))}}function Jre(t,i){if(t&1&&(h(0,"div",17),de(1,Zre,2,2,"button",29,qe),M(3,Qre,2,1,"span",30),m()),t&2){u();let e=Me(1),n=Me(2);l(),ue(e),l(2),D(n>0?3:-1)}}function eae(t,i){if(t&1&&(h(0,"span",35),v(1),m()),t&2){let e=i.$implicit;l(),x(e)}}function tae(t,i){if(t&1&&(h(0,"div",32)(1,"span",33),v(2),m(),h(3,"div",34),de(4,eae,2,1,"span",35,qe),m()()),t&2){let e=u(),n=u(2);l(),_("pTooltip",n.texts.llm.topics.tooltip),l(),x(n.texts.llm.topics.label),l(2),ue(e.topics)}}function nae(t,i){if(t&1&&(h(0,"span",35),v(1),m()),t&2){let e=i.$implicit;l(),x(e)}}function iae(t,i){if(t&1&&(h(0,"div",32)(1,"span",33),v(2),m(),h(3,"div",34),de(4,nae,2,1,"span",35,qe),m()()),t&2){let e=u(),n=u(2);l(),_("pTooltip",n.texts.llm.facts.tooltip),l(),x(n.texts.llm.facts.label),l(2),ue(e.keyFacts)}}function oae(t,i){if(t&1&&(M(0,tae,6,2,"div",32),M(1,iae,6,2,"div",32)),t&2){let e=i;D(e.topics!=null&&e.topics.length?0:-1),l(),D(e.keyFacts!=null&&e.keyFacts.length?1:-1)}}function rae(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=u(),n=u(2);l(),_("pTooltip",n.texts.llm.when.tooltip),l(),x(n.texts.llm.when.label),l(2),x(e.whenToUse)}}function aae(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=u(),n=u(2);l(),_("pTooltip",n.texts.llm.style.tooltip),l(),x(n.texts.llm.style.label),l(2),x(e.interactionStyle)}}function sae(t,i){if(t&1&&(h(0,"span",35),v(1),m()),t&2){let e=i.$implicit;l(),x(e)}}function lae(t,i){if(t&1&&(h(0,"div",32)(1,"span",33),v(2),m(),h(3,"div",34),de(4,sae,2,1,"span",35,qe),m()()),t&2){let e=u(),n=u(2);l(),_("pTooltip",n.texts.llm.does.tooltip),l(),x(n.texts.llm.does.label),l(2),ue(e.capabilities)}}function cae(t,i){if(t&1&&(M(0,rae,5,3,"div",32),M(1,aae,5,3,"div",32),M(2,lae,6,2,"div",32)),t&2){let e=i;D(e.whenToUse?0:-1),l(),D(e.interactionStyle?1:-1),l(),D(e.capabilities!=null&&e.capabilities.length?2:-1)}}function dae(t,i){if(t&1&&v(0),t&2){let e=i.$implicit,n=i.$index,o=i.$count;Z0("",e.step,". ",e.description,"",n===o-1?"":" \xB7 ")}}function uae(t,i){if(t&1&&(h(0,"div",32)(1,"span",33),v(2),m(),h(3,"span"),de(4,dae,1,3,null,null,Wre),m()()),t&2){let e=u(),n=u(2);l(),_("pTooltip",n.texts.llm.steps.tooltip),l(),x(n.texts.llm.steps.label),l(2),ue(e.recipe)}}function pae(t,i){if(t&1&&(h(0,"span",35),v(1),m()),t&2){let e=i.$implicit;l(),x(e)}}function fae(t,i){if(t&1&&(h(0,"div",32)(1,"span",33),v(2),m(),h(3,"div",34),de(4,pae,2,1,"span",35,qe),m()()),t&2){let e=u(),n=u(2);l(),_("pTooltip",n.texts.llm.pre.tooltip),l(),x(n.texts.llm.pre.label),l(2),ue(e.preconditions)}}function hae(t,i){if(t&1&&(h(0,"span",35),v(1),m()),t&2){let e=i.$implicit;l(),x(e)}}function mae(t,i){if(t&1&&(h(0,"div",32)(1,"span",33),v(2),m(),h(3,"div",34),de(4,hae,2,1,"span",35,qe),m()()),t&2){let e=u(),n=u(2);l(),_("pTooltip",n.texts.llm.out.tooltip),l(),x(n.texts.llm.out.label),l(2),ue(e.outputs)}}function _ae(t,i){if(t&1&&(h(0,"span",35),v(1),m()),t&2){let e=i.$implicit;l(),x(e)}}function gae(t,i){if(t&1&&(h(0,"div",32)(1,"span",33),v(2),m(),h(3,"div",34),de(4,_ae,2,1,"span",35,qe),m()()),t&2){let e=u(),n=u(2);l(),_("pTooltip",n.texts.llm.fx.tooltip),l(),x(n.texts.llm.fx.label),l(2),ue(e.sideEffects)}}function vae(t,i){if(t&1&&(M(0,uae,6,2,"div",32),M(1,fae,6,2,"div",32),M(2,mae,6,2,"div",32),M(3,gae,6,2,"div",32)),t&2){let e=i;D(e.recipe!=null&&e.recipe.length?0:-1),l(),D(e.preconditions!=null&&e.preconditions.length?1:-1),l(),D(e.outputs!=null&&e.outputs.length?2:-1),l(),D(e.sideEffects!=null&&e.sideEffects.length?3:-1)}}function bae(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=u(),n=u(2);l(),_("pTooltip",n.texts.llm.eg.tooltip),l(),x(n.texts.llm.eg.label),l(2),x(e.invocationExample)}}function yae(t,i){if(t&1&&(h(0,"span",35),v(1),m()),t&2){let e=i.$implicit;l(),x(e)}}function Cae(t,i){if(t&1&&(h(0,"div",32)(1,"span",33),v(2),m(),h(3,"div",34),de(4,yae,2,1,"span",35,qe),m()()),t&2){let e=u(),n=u(2);l(),_("pTooltip",n.texts.llm.fx.tooltip),l(),x(n.texts.llm.fx.label),l(2),ue(e.sideEffects)}}function xae(t,i){if(t&1&&(M(0,bae,5,3,"div",32),M(1,Cae,6,2,"div",32)),t&2){let e=i;D(e.invocationExample?0:-1),l(),D(e.sideEffects!=null&&e.sideEffects.length?1:-1)}}function wae(t,i){if(t&1&&(h(0,"div",22),M(1,oae,2,2),M(2,cae,3,3),M(3,vae,4,4),M(4,xae,2,2),m()),t&2){let e,n,o,r,a=u();l(),D((e=a.summaryMarkdown())?1:-1,e),l(),D((n=a.summaryAgent())?2:-1,n),l(),D((o=a.summarySkill())?3:-1,o),l(),D((r=a.summaryCommand())?4:-1,r)}}function Tae(t,i){if(t&1&&F(0,"div",23),t&2){let e=u();_("innerHTML",e.descriptionHtml(),Gn)}}function Sae(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=u(),n=u();l(3),x(n.texts.meta.model),l(2),x(e.model)}}function kae(t,i){t&1&&M(0,Sae,6,2,"div",37),t&2&&D(i.model?0:-1)}var Iae={selected:!1,highlighted:!1,dimmed:!1},fP=(()=>{class t{node=B.required();stats=B({linksIn:0,linksOut:0});summary=B(null);selection=B(Iae);isFavorite=B(!1);favoriteToggle=Ge();tagClick=Ge();texts=Jn;expanded=Ti(!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 gh(n.color)});kindAccentVar=S(()=>`var(--sm-kind-${this.node().kind}, var(--sm-kind-markdown))`);kindBgVar=S(()=>`var(--sm-kind-${this.node().kind}-bg, var(--sm-kind-markdown-bg))`);kindFgVar=S(()=>`var(--sm-kind-${this.node().kind}-fg, var(--sm-kind-markdown-fg))`);markdown=p(ho);bytesShort=S(()=>{let e=this.stats().bytesTotal;return e===void 0?null:gr(e)});tokensShort=S(()=>{let e=this.stats().tokensTotal;return e===void 0?null:gr(e)});version=S(()=>ls(this.node()));stability=S(()=>uo(this.node()));tagChips=S(()=>Kn(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:vs(this.node().path)});description=S(()=>this.node().frontmatter.description??"");descriptionHtml=Va(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:21,hostBindings:function(n,o){n&2&&(O("data-kind",o.node().kind),Oe("--node-color",o.nodeColor())("--accent",o.kindAccentVar())("--kind-bg",o.kindBgVar())("--kind-fg",o.kindFgVar()),se("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&&(Jt(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),M(12,Kre,2,1,"span",8),h(13,"button",9),A("click",function(a){return o.toggleExpanded(a)}),F(14,"i",10),m()(),h(15,"div",11),M(16,Yre,4,2,"span",12),M(17,Xre,4,2,"span",13),h(18,"button",14),A("click",function(a){return o.toggleFavorite(a)}),F(19,"i",15),m(),F(20,"sm-view-contributions-host",16),m()(),M(21,Jre,4,1,"div",17),h(22,"div",18)(23,"div",19),F(24,"i",20),h(25,"span",21),v(26),m()(),M(27,wae,5,4,"div",22),M(28,Tae,1,1,"div",23),M(29,kae,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();Tt(o.stats()),l();let c=Tt(o.visibleTagChips());l(),Tt(o.moreTagsCount()),l(3),_("kind",s.kind)("provider",s.provider)("size",18),l(3),_("pTooltip",s.path),l(),x(o.displayName()),l(),_("node",o.node()),l(2),D((r=o.version())?12:-1,r),l(),O("aria-label",o.texts.ariaExpand),l(3),D(o.tokensShort()!==null?16:-1),l(),D(o.bytesShort()!==null?17:-1),l(),se("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(),se("pi-star-fill",o.isFavorite())("pi-star",!o.isFavorite()),l(),_("node",o.node()),l(),D(c.length?21:-1),l(2),_("pTooltip",s.path),l(3),x(s.path),l(),D(o.hasLlmCluster()?27:-1),l(),D(o.description()?28:-1),l(),D((a=o.fmAgent())?29:-1,a),l(2),_("node",o.node()),l(2),_("node",o.node())}},dependencies:[Jo,Fe,Be,Zn],styles:['[_nghost-%COMP%]{--accent: var(--sm-kind-markdown);--kind-bg: var(--sm-kind-markdown-bg);--kind-fg: var(--sm-kind-markdown-fg);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)}.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%]{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}.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 hP={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 Mae=["sparkline"],Dae=()=>({class:"perf-hud__content"}),Eae=t=>({content:t});function Pae(t,i){if(t&1&&(h(0,"span",9),v(1),m()),t&2){let e=u(2);l(),x(e.texts.units.mb(e.heapMb()))}}function Rae(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),M(12,Pae,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=u();l(2),x(e.texts.units.fps(e.fps())),l(),O("aria-hidden",!e.expanded()),l(6),x(e.texts.units.ms(e.frameTimeMs())),l(3),D(e.hasHeap()?12:-1),l(2),x(e.texts.units.domNodes(e.domNodes())),l(2),x(e.texts.units.longTasks(e.longTasks())),l(4),x(e.texts.units.nodes(e.visible(),e.total())),l(2),x(e.texts.units.links(e.edges()))}}var Oae=30,E0=60,vh=14,mP=(()=>{class t{visible=B(0);total=B(0);edges=B(0);texts=hP;destroyRef=p(yt);zone=p(Zt);fps=W(0);frameTimeMs=W(0);fpsSamples=W([]);sparklineCanvas=it("sparkline");heapMb=W(null);longTasks=W(0);domNodes=W(0);expanded=W(Fae());hasHeap=S(()=>this.heapMb()!==null);constructor(){let e=0,n=0,o=performance.now(),r=o,a=0,s=d=>{let f=d-o;if(o=d,e+=1,n+=f,d-r>=1e3){let g=(d-r)/1e3,y=Math.round(e/g);this.fps.set(y),this.frameTimeMs.set(Math.round(n/Math.max(e,1))),this.heapMb.set(Aae()),this.domNodes.set(document.querySelectorAll("*").length),this.fpsSamples.update(T=>{let w=T.length>=Oae?T.slice(1):T.slice();return w.push(y),w}),e=0,n=0,r=d}a=requestAnimationFrame(s)};this.zone.runOutsideAngular(()=>{a=requestAnimationFrame(s)});let c=null;if(typeof PerformanceObserver<"u")try{c=new PerformanceObserver(d=>{this.longTasks.update(f=>f+d.getEntries().length)}),c.observe({type:"longtask",buffered:!0})}catch{}this.destroyRef.onDestroy(()=>{cancelAnimationFrame(a),c?.disconnect()}),ce(()=>{let d=this.sparklineCanvas(),f=this.fpsSamples();d&&Lae(d.nativeElement,f)})}setExpanded(e){this.expanded.set(e),Nae(e)}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=z({type:t,selectors:[["sm-perf-hud"]],viewQuery:function(n,o){n&1&&hn(o.sparklineCanvas,Mae,5),n&2&&Ht()},inputs:{visible:[1,"visible"],total:[1,"total"],edges:[1,"edges"]},decls:3,vars:7,consts:[["content",""],["sparkline",""],["data-testid","perf-hud",3,"ngModelChange","ngModel","ariaLabel","styleClass","pt"],[1,"perf-hud__header"],[1,"perf-hud__cell","perf-hud__cell--fps"],[1,"perf-hud__expandable"],[1,"perf-hud__expandable-inner"],[1,"perf-hud__row","perf-hud__row--sparkline"],["aria-hidden","true",1,"perf-hud__sparkline"],[1,"perf-hud__cell"],[1,"perf-hud__section"],[1,"perf-hud__row"]],template:function(n,o){n&1&&(h(0,"p-togglebutton",2),A("ngModelChange",function(a){return o.setExpanded(a)}),R(1,Rae,23,8,"ng-template",null,0,We),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",Re(5,Eae,Pt(4,Dae)))},dependencies:[Ct,Ft,Nt,Xn,Yn],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})(),_P="sm.perf-hud.expanded";function Fae(){try{return localStorage.getItem(_P)==="1"}catch{return!1}}function Nae(t){try{localStorage.setItem(_P,t?"1":"0")}catch{}}function Aae(){let t=performance.memory;return t?Math.round(t.usedJSHeapSize/1024/1024):null}function Lae(t,i){let e=window.devicePixelRatio||1,n=E0*e,o=vh*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,E0,vh),i.length<2))return;let a=Math.max(60,...i),s=E0/(i.length-1);r.beginPath();for(let c=0;c<i.length;c+=1){let d=c*s,f=vh-i[c]/a*vh;c===0?r.moveTo(d,f):r.lineTo(d,f)}r.strokeStyle=getComputedStyle(t).color,r.lineWidth=1,r.stroke()}var Bae="debug-fps",gP=(()=>{class t{visible=W(this.resolveInitial());resolveInitial(){let n=new URLSearchParams(window.location.search).get(Bae);return n!==null&&n!=="0"&&n!=="false"?!0:n==="0"||n==="false"?!1:mh.graph.perfHud}static \u0275fac=function(n){return new(n||t)};static \u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var er={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",view:{showRaw:"Raw",showRendered:"Rendered",showRawTooltip:"Show the raw source",showRenderedTooltip:"Show the rendered Markdown"}},findingHintLabel:"Hint:",audit:{headerEmpty:"never bumped",fields:{lastBumpedAt:"Last bumped",lastBumpedBy:"by",createdAt:"Created",createdBy:"by"}}};var vP={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 Xi(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 Vae(t,i){if(t&1&&(Q(0,"p",1),v(1),ie()),t&2){let e=u(2);l(),x(e.texts.emptyOverlay)}}function zae(t,i){if(t&1&&(Q(0,"p",2),v(1),ie()),t&2){let e=u(2);l(),x(e.texts.emptyAnnotations)}}function Hae(t,i){if(t&1&&M(0,Vae,2,1,"p",1)(1,zae,2,1,"p",2),t&2){let e,n=u();D((e=n.overlay())!=null&&e.present?1:0)}}function qae(t,i){if(t&1&&(Q(0,"span",4),oe(1,"i",5),Q(2,"span"),v(3),ie()()),t&2){let e=i.$implicit;l(3),x(e)}}function Gae(t,i){if(t&1&&de(0,qae,4,1,"span",4,qe),t&2){u();let e=Me(0);ue(e.authors)}}function jae(t,i){if(t&1&&(Q(0,"span",4),oe(1,"i",6),Q(2,"span"),v(3),ie()()),t&2){u();let e=Me(0);l(3),x(e.license)}}function Uae(t,i){if(t&1&&(Jt(0),Q(1,"dt"),v(2),ie(),Q(3,"dd",3),M(4,Gae,2,0),M(5,jae,4,1,"span",4),ie()),t&2){let e=u(2),n=Tt(e.provenance());l(2),x(e.texts.sections.provenance),l(2),D(n.authors.length?4:-1),l(),D(n.license!==null?5:-1)}}function $ae(t,i){if(t&1&&(Q(0,"span",4),oe(1,"i",8),Q(2,"a",9),v(3),ie()()),t&2){u();let e=Me(0);l(2),Qe("href",e.source,rr),l(),x(e.source)}}function Wae(t,i){if(t&1&&(Q(0,"span",4),oe(1,"i",10),Q(2,"code"),v(3),ie()()),t&2){u();let e=Me(0);l(3),x(e.sourceVersion)}}function Kae(t,i){if(t&1&&(Jt(0),Q(1,"dt"),v(2),ie(),Q(3,"dd",7),M(4,$ae,4,2,"span",4),M(5,Wae,4,1,"span",4),ie()),t&2){let e=u(2),n=Tt(e.repository());l(2),x(e.texts.sections.repository),l(2),D(n.source!==null?4:-1),l(),D(n.sourceVersion!==null?5:-1)}}function Yae(t,i){if(t&1&&(Q(0,"span",4),oe(1,"i",12),Q(2,"a",9),v(3),ie()()),t&2){u();let e=Me(0);l(2),Qe("href",e.docsUrl,rr),l(),x(e.docsUrl)}}function Xae(t,i){if(t&1&&(Jt(0),Q(1,"dt"),v(2),ie(),Q(3,"dd",11),M(4,Yae,4,2,"span",4),ie()),t&2){let e=u(2),n=Tt(e.docs());l(2),x(e.texts.sections.docs),l(2),D(n.docsUrl!==null?4:-1)}}function Zae(t,i){if(t&1&&(Q(0,"dl",0),M(1,Uae,6,4),M(2,Kae,6,4),M(3,Xae,5,3),ie()),t&2){let e=u();l(),D(e.hasProvenance()?1:-1),l(),D(e.hasRepository()?2:-1),l(),D(e.hasDocs()?3:-1)}}var bP=(()=>{class t{overlay=B(void 0);texts=vP;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(()=>R0(this.overlay()));provenance=S(()=>{let e=this.annotations()??{};return{authors:yP(e.authors),license:bh(e.license)}});hasProvenance=S(()=>P0(this.provenance()));repository=S(()=>{let e=this.annotations()??{};return{source:Xi(e.source),sourceVersion:bh(e.sourceVersion)}});hasRepository=S(()=>P0(this.repository()));docs=S(()=>{let e=this.annotations()??{};return{docsUrl:Xi(e.docsUrl)}});hasDocs=S(()=>P0(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&&M(0,Hae,2,1)(1,Zae,4,3,"dl",0),n&2&&D(o.hasAnyContent()?1:0)},dependencies:[Fe],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 R0(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 yP(e.authors).length>0||bh(e.license)!==null||Xi(e.source)!==null||bh(e.sourceVersion)!==null||Xi(e.docsUrl)!==null}function bh(t){return typeof t=="string"&&t.length>0?t:null}function yP(t){return Array.isArray(t)?t.filter(i=>typeof i=="string"&&i.length>0):[]}function P0(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 CP={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 wP=(t,i)=>i.source+"|"+i.target+"|"+i.kind+"|"+((i.trigger==null?null:i.trigger.normalizedTrigger)??""),Qae=(t,i)=>i.url+"|"+(i.line??-1);function Jae(t,i){if(t&1&&(h(0,"p",1),v(1),m()),t&2){let e=u(2);l(),x(e.texts.loading)}}function ese(t,i){if(t&1&&(h(0,"p",2),v(1),m()),t&2){let e=u(2);l(),x(e.texts.error)}}function tse(t,i){if(t&1){let e=K();h(0,"li",11)(1,"button",12),A("click",function(){let o=k(e).$implicit,r=u(4);return I(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=u(4);O("data-testid","linked-nodes-incoming-row-"+e.source),l(),O("data-testid","linked-nodes-incoming-link-"+e.source),l(),x(e.source),l(),Oe("color",n.confidenceColor(e.confidence))("border-color",n.confidenceColor(e.confidence)),_("pTooltip",n.confidenceTooltip(e.confidence)),l(),x(n.confidenceValue(e.confidence)),l(),O("data-kind",e.kind),l(),x(e.kind)}}function nse(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),de(8,tse,7,11,"li",11,wP),m()()),t&2){let e=u(3);l(4),x(e.incoming().length),l(2),x(e.texts.incomingHeader),l(2),ue(e.incoming())}}function ise(t,i){if(t&1&&(h(0,"span",17),v(1),m()),t&2){let e=u().$implicit;O("data-testid","linked-nodes-outgoing-link-"+e.target),l(),x(e.target)}}function ose(t,i){if(t&1){let e=K();h(0,"button",12),A("click",function(){k(e);let o=u().$implicit,r=u(4);return I(r.onOpen(o.resolvedTarget??o.target))}),v(1),m()}if(t&2){let e=u().$implicit;O("data-testid","linked-nodes-outgoing-link-"+e.target),l(),x(e.target)}}function rse(t,i){if(t&1&&(h(0,"span",19),v(1),m()),t&2){let e=i,n=u().$implicit;_("pTooltip",e.message),O("data-severity",e.severity)("data-testid","linked-nodes-outgoing-issue-"+n.target),l(),x(e.analyzerId)}}function ase(t,i){if(t&1&&(h(0,"li",11),M(1,ise,2,2,"span",17)(2,ose,2,2,"button",18),h(3,"span",13),v(4),m(),h(5,"span",14),v(6),m(),M(7,rse,2,4,"span",19),m()),t&2){let e,n=i.$implicit,o=u(4);O("data-testid","linked-nodes-outgoing-row-"+n.target),l(),D(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(),x(o.confidenceValue(n.confidence)),l(),O("data-kind",n.kind),l(),x(n.kind),l(),D((e=o.issueForOutgoing(n))?7:-1,e)}}function sse(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),de(8,ase,8,11,"li",11,wP),m()()),t&2){let e=u(3);l(4),x(e.outgoing().length),l(2),x(e.texts.outgoingHeader),l(2),ue(e.outgoing())}}function lse(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,rr)("pTooltip",e.url),l(),x(e.url)}}function cse(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),de(8,lse,3,4,"li",23,Qae),m()()),t&2){let e=u(3);l(4),x(e.externalRefs().length),l(2),x(e.texts.externalRefsHeader),l(2),ue(e.externalRefs())}}function dse(t,i){if(t&1&&(M(0,nse,10,2,"section",3),M(1,sse,10,2,"section",4),M(2,cse,10,2,"section",5)),t&2){let e=u(2);D(e.incoming().length>0?0:-1),l(),D(e.outgoing().length>0?1:-1),l(),D(e.externalRefs().length>0?2:-1)}}function use(t,i){if(t&1&&(h(0,"div",0),M(1,Jae,2,1,"p",1)(2,ese,2,1,"p",2)(3,dse,3,3),m()),t&2){let e,n=u();l(),D((e=n.state())==="loading"?1:e==="error"?2:e==="ready"?3:-1)}}var TP=(()=>{class t{dataSource=p(lo);wsEvents=p(ss);destroyRef=p(yt);texts=CP;path=B(null);openPath=Ge();state=W("idle");outgoingRaw=W([]);incomingRaw=W([]);outgoing=S(()=>this.outgoingRaw().filter(e=>!xP(e)));incoming=S(()=>this.incomingRaw().filter(e=>!xP(e)));issues=W([]);externalRefsRaw=W([]);externalRefs=S(()=>this.externalRefsRaw().filter(e=>Xi(e.url)!==null));fetchToken=0;hasResults=S(()=>this.state()==="ready"&&(this.outgoing().length>0||this.incoming().length>0));constructor(){this.wsEvents.scanCompleted$.pipe(Wn(this.destroyRef)).subscribe(()=>{let e=this.path();e&&this.fetch(e)}),ce(()=>{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[Zb(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,d=pse(e,s,c),f;try{let g=await this.dataSource.listIssues({nodes:d});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&&M(0,use,4,1,"div",0),n&2&&D(o.path()?0:-1)},dependencies:[Fe,Be,Zv],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 pse(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 xP(t){return!!(t.source===t.target||t.resolvedTarget&&t.source===t.resolvedTarget)}var SP={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",disabledValue:"disabled",userInvocable:"User invocable"},unknownFieldTooltip:"Unknown field, not part of the documented frontmatter for this provider.",skillUnresolvedTooltip:"Skill not found in this scan."};var kP=(t,i)=>i.key,fse=(t,i)=>i.name,hse=(t,i)=>i.event;function mse(t,i){if(t&1&&(h(0,"dt"),v(1),m(),h(2,"dd")(3,"code"),v(4),m()()),t&2){let e=u(5);l(),x(e.texts.fields.model),l(3),x(i)}}function _se(t,i){if(t&1&&(h(0,"dt"),v(1),m(),h(2,"dd")(3,"code"),v(4),m()()),t&2){let e=u(5);l(),x(e.texts.fields.effort),l(3),x(i)}}function gse(t,i){t&1&&(h(0,"span",7),v(1,"\xB7"),m())}function vse(t,i){if(t&1&&(h(0,"code"),v(1),m(),M(2,gse,2,0,"span",7)),t&2){let e=i.$implicit,n=i.$index,o=i.$count;l(),x(e),l(),D(n!==o-1?2:-1)}}function bse(t,i){if(t&1&&(h(0,"dt"),v(1),m(),h(2,"dd",6),de(3,vse,3,2,null,null,qe),m()),t&2){let e=u(5);l(),x(e.texts.fields.tools),l(2),ue(e.tools())}}function yse(t,i){t&1&&(h(0,"span",7),v(1,"\xB7"),m())}function Cse(t,i){if(t&1&&(h(0,"span",8),F(1,"i",9),h(2,"code"),v(3),m()(),M(4,yse,2,0,"span",7)),t&2){let e=i.$implicit,n=i.$index,o=i.$count;l(3),x(e),l(),D(n!==o-1?4:-1)}}function xse(t,i){if(t&1&&(h(0,"dt"),v(1),m(),h(2,"dd",6),de(3,Cse,5,2,null,null,qe),m()),t&2){let e=u(5);l(),x(e.texts.fields.disallowedTools),l(2),ue(e.disallowedTools())}}function wse(t,i){if(t&1&&(h(0,"dt"),v(1),m(),h(2,"dd")(3,"code"),v(4),m()()),t&2){let e=u(5);l(),x(e.texts.fields.permissionMode),l(3),x(i)}}function Tse(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=u(5);l(),x(n.texts.fields.color),l(2),Oe("background",e),l(2),x(e)}}function Sse(t,i){if(t&1){let e=K();h(0,"a",14),A("click",function(){let o=k(e),r=u(7);return I(r.openSkill(o))})("keydown.enter",function(){let o=k(e),r=u(7);return I(r.openSkill(o))})("keydown.space",function(o){let r=k(e);return u(7).openSkill(r),I(o.preventDefault())}),F(1,"i",15),v(2),m()}if(t&2){let e=u().$implicit;l(2),be(" ",e," ")}}function kse(t,i){if(t&1&&(h(0,"span",13),v(1),m()),t&2){let e=u().$implicit,n=u(6);_("pTooltip",n.texts.skillUnresolvedTooltip),l(),x(e)}}function Ise(t,i){t&1&&(h(0,"span",7),v(1,"\xB7"),m())}function Mse(t,i){if(t&1&&(M(0,Sse,3,1,"a",12)(1,kse,2,2,"span",13),M(2,Ise,2,0,"span",7)),t&2){let e,n=i.$implicit,o=i.$index,r=i.$count,a=u(6);D((e=a.skillPath(n))?0:1,e),l(2),D(o!==r-1?2:-1)}}function Dse(t,i){if(t&1&&(h(0,"dt"),v(1),m(),h(2,"dd",6),de(3,Mse,3,2,null,null,qe),m()),t&2){let e=u(5);l(),x(e.texts.fields.skills),l(2),ue(e.skills())}}function Ese(t,i){if(t&1&&(h(0,"dt"),v(1),m(),h(2,"dd")(3,"code"),v(4),m()()),t&2){let e=u(5);l(),x(e.texts.fields.maxTurns),l(3),x(e.maxTurns())}}function Pse(t,i){if(t&1&&(h(0,"dt"),v(1),m(),h(2,"dd")(3,"code"),v(4),m()()),t&2){let e=u(5);l(),x(e.texts.fields.memory),l(3),x(i)}}function Rse(t,i){if(t&1&&(h(0,"dt"),v(1),m(),h(2,"dd")(3,"code"),v(4),m()()),t&2){let e=u(5);l(),x(e.texts.fields.background),l(3),x(e.background())}}function Ose(t,i){if(t&1&&(h(0,"dt"),v(1),m(),h(2,"dd")(3,"code"),v(4),m()()),t&2){let e=u(5);l(),x(e.texts.fields.isolation),l(3),x(i)}}function Fse(t,i){t&1&&(h(0,"span",7),v(1,"\xB7"),m())}function Nse(t,i){if(t&1&&(h(0,"code",16),v(1),m(),M(2,Fse,2,0,"span",7)),t&2){let e=i.$implicit,n=i.$index,o=i.$count;_("pTooltip",e.command??""),l(),x(e.name),l(),D(n!==o-1?2:-1)}}function Ase(t,i){if(t&1&&(h(0,"dt"),v(1),m(),h(2,"dd",6),de(3,Nse,3,3,null,null,fse),m()),t&2){let e=u(5);l(),x(e.texts.fields.mcpServers),l(2),ue(e.mcpServers())}}function Lse(t,i){if(t&1&&(h(0,"span",18),v(1,"\u2192"),m(),h(2,"code"),v(3),m()),t&2){let e=u().$implicit;l(3),x(e.keys[0])}}function Bse(t,i){t&1&&(h(0,"span",7),v(1,"\xB7"),m())}function Vse(t,i){if(t&1&&(h(0,"span",17)(1,"code"),v(2),m(),M(3,Lse,4,1),m(),M(4,Bse,2,0,"span",7)),t&2){let e=i.$implicit,n=i.$index,o=i.$count;l(2),x(e.event),l(),D(e.keys.length?3:-1),l(),D(n!==o-1?4:-1)}}function zse(t,i){if(t&1&&(h(0,"dt"),v(1),m(),h(2,"dd",6),de(3,Vse,5,3,null,null,hse),m()),t&2){let e=u(5);l(),x(e.texts.fields.hooks),l(2),ue(e.hooks())}}function Hse(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=u(5);l(),x(e.key),l(2),_("pTooltip",n.texts.unknownFieldTooltip),O("aria-label",n.texts.unknownFieldTooltip),l(2),x(e.value)}}function qse(t,i){if(t&1&&(h(0,"dl",5),M(1,mse,5,2),M(2,_se,5,2),M(3,bse,5,1),M(4,xse,5,1),M(5,wse,5,2),M(6,Tse,6,4),M(7,Dse,5,1),M(8,Ese,5,2),M(9,Pse,5,2),M(10,Rse,5,2),M(11,Ose,5,2),M(12,Ase,5,1),M(13,zse,5,1),de(14,Hse,6,4,null,null,kP),m()),t&2){let e,n,o,r,a,s,c=u(4);l(),D((e=c.model())?1:-1,e),l(),D((n=c.effort())?2:-1,n),l(),D(c.tools().length?3:-1),l(),D(c.disallowedTools().length?4:-1),l(),D((o=c.permissionMode())?5:-1,o),l(),D((r=c.color())?6:-1,r),l(),D(c.skills().length?7:-1),l(),D(c.maxTurns()!==null?8:-1),l(),D((a=c.memory())?9:-1,a),l(),D(c.background()!==null?10:-1),l(),D((s=c.isolation())?11:-1,s),l(),D(c.mcpServers().length?12:-1),l(),D(c.hooks().length?13:-1),l(),ue(c.extraFields())}}function Gse(t,i){if(t&1&&M(0,qse,16,13,"dl",5),t&2){let e=u(3);D(e.hasBehavior()||e.hasCapabilities()||e.extraFields().length?0:-1)}}function jse(t,i){if(t&1&&(h(0,"dt"),v(1),m(),h(2,"dd")(3,"code"),v(4),m()()),t&2){u();let e=Me(0),n=u(4);l(),x(n.texts.skillBaseFields.model),l(3),x(e.model)}}function Use(t,i){if(t&1&&(h(0,"dt"),v(1),m(),h(2,"dd")(3,"code"),v(4),m()()),t&2){u();let e=Me(0),n=u(4);l(),x(n.texts.skillBaseFields.effort),l(3),x(e.effort)}}function $se(t,i){if(t&1&&(h(0,"dt"),v(1),m(),h(2,"dd"),v(3),m()),t&2){u();let e=Me(0),n=u(4);l(),x(n.texts.skillBaseFields.whenToUse),l(2),x(e.when_to_use)}}function Wse(t,i){if(t&1&&(h(0,"dt"),v(1),m(),h(2,"dd")(3,"code"),v(4),m()()),t&2){u();let e=Me(0),n=u(4);l(),x(n.texts.skillBaseFields.argumentHint),l(3),x(e.argumentHint)}}function Kse(t,i){t&1&&(h(0,"span",7),v(1,"\xB7"),m())}function Yse(t,i){if(t&1&&(h(0,"code"),v(1),m(),M(2,Kse,2,0,"span",7)),t&2){let e=i.$implicit,n=i.$index,o=i.$count;l(),x(e),l(),D(n!==o-1?2:-1)}}function Xse(t,i){if(t&1&&(h(0,"dt"),v(1),m(),h(2,"dd",6),de(3,Yse,3,2,null,null,qe),m()),t&2){u();let e=Me(0),n=u(4);l(),x(n.texts.skillBaseFields.arguments),l(2),ue(e.arguments)}}function Zse(t,i){t&1&&(h(0,"span",7),v(1,"\xB7"),m())}function Qse(t,i){if(t&1&&(h(0,"code"),v(1),m(),M(2,Zse,2,0,"span",7)),t&2){let e=i.$implicit,n=i.$index,o=i.$count;l(),x(e),l(),D(n!==o-1?2:-1)}}function Jse(t,i){if(t&1&&(h(0,"dt"),v(1),m(),h(2,"dd",6),de(3,Qse,3,2,null,null,qe),m()),t&2){u();let e=Me(0),n=u(4);l(),x(n.texts.skillBaseFields.allowedTools),l(2),ue(e.allowedTools)}}function ele(t,i){t&1&&(h(0,"span",7),v(1,"\xB7"),m())}function tle(t,i){if(t&1&&(h(0,"span",8),F(1,"i",9),h(2,"code"),v(3),m()(),M(4,ele,2,0,"span",7)),t&2){let e=i.$implicit,n=i.$index,o=i.$count;l(3),x(e),l(),D(n!==o-1?4:-1)}}function nle(t,i){if(t&1&&(h(0,"dt"),v(1),m(),h(2,"dd",6),de(3,tle,5,2,null,null,qe),m()),t&2){u();let e=Me(0),n=u(4);l(),x(n.texts.skillBaseFields.disallowedTools),l(2),ue(e.disallowedTools)}}function ile(t,i){if(t&1&&(h(0,"dt"),v(1),m(),h(2,"dd")(3,"code"),v(4),m()()),t&2){u();let e=Me(0),n=u(4);l(),x(n.texts.skillBaseFields.context),l(3),x(e.context)}}function ole(t,i){if(t&1&&(h(0,"dt"),v(1),m(),h(2,"dd")(3,"code"),v(4),m()()),t&2){u();let e=Me(0),n=u(4);l(),x(n.texts.skillBaseFields.agent),l(3),x(e.agent)}}function rle(t,i){if(t&1&&(h(0,"dt"),v(1),m(),h(2,"dd")(3,"code"),v(4),m()()),t&2){u();let e=Me(0),n=u(4);l(),x(n.texts.skillBaseFields.shell),l(3),x(e.shell)}}function ale(t,i){t&1&&(h(0,"span",7),v(1,"\xB7"),m())}function sle(t,i){if(t&1&&(h(0,"code"),v(1),m(),M(2,ale,2,0,"span",7)),t&2){let e=i.$implicit,n=i.$index,o=i.$count;l(),x(e),l(),D(n!==o-1?2:-1)}}function lle(t,i){if(t&1&&(h(0,"dt"),v(1),m(),h(2,"dd",6),de(3,sle,3,2,null,null,qe),m()),t&2){u();let e=Me(0),n=u(4);l(),x(n.texts.skillBaseFields.paths),l(2),ue(e.paths)}}function cle(t,i){if(t&1&&(h(0,"dt"),v(1),m(),h(2,"dd")(3,"code"),v(4),m()()),t&2){let e=u(5);l(),x(e.texts.skillBaseFields.disableModelInvocation),l(3),x(e.texts.skillBaseFields.disabledValue)}}function dle(t,i){if(t&1&&(h(0,"dt"),v(1),m(),h(2,"dd")(3,"code"),v(4),m()()),t&2){u();let e=Me(0),n=u(4);l(),x(n.texts.skillBaseFields.userInvocable),l(3),x(e.userInvocable)}}function ule(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=u(5);l(),x(e.key),l(2),_("pTooltip",n.texts.unknownFieldTooltip),O("aria-label",n.texts.unknownFieldTooltip),l(2),x(e.value)}}function ple(t,i){if(t&1&&(Jt(0),h(1,"dl",21),M(2,jse,5,2),M(3,Use,5,2),M(4,$se,4,2),M(5,Wse,5,2),M(6,Xse,5,1),M(7,Jse,5,1),M(8,nle,5,1),M(9,ile,5,2),M(10,ole,5,2),M(11,rle,5,2),M(12,lle,5,1),M(13,cle,5,2),M(14,dle,5,2),de(15,ule,6,4,null,null,kP),m()),t&2){let e=u(4),n=Tt(e.skillBase());l(2),D(n.model!==null?2:-1),l(),D(n.effort!==null?3:-1),l(),D(n.when_to_use!==null?4:-1),l(),D(n.argumentHint!==null?5:-1),l(),D(n.arguments.length?6:-1),l(),D(n.allowedTools.length?7:-1),l(),D(n.disallowedTools.length?8:-1),l(),D(n.context!==null?9:-1),l(),D(n.agent!==null?10:-1),l(),D(n.shell!==null?11:-1),l(),D(n.paths.length?12:-1),l(),D(n.disableModelInvocation?13:-1),l(),D(n.userInvocable!==null?14:-1),l(),ue(e.extraFields())}}function fle(t,i){if(t&1&&M(0,ple,17,14,"dl",21),t&2){let e=u(3);D(e.hasCapabilities()||e.extraFields().length?0:-1)}}function hle(t,i){if(t&1&&(h(0,"p",22),v(1),m(),F(2,"blockquote",23)),t&2){let e=u(3);l(),x(e.texts.sections.initialPrompt),l(),_("innerHTML",e.initialPromptHtml(),Gn)}}function mle(t,i){if(t&1&&(M(0,Gse,1,1)(1,fle,1,1),M(2,hle,3,2)),t&2){let e=u(2);D(e.isAgent()?0:e.isSkillOrCommand()?1:-1),l(2),D(e.hasInitialPrompt()?2:-1)}}function _le(t,i){if(t&1){let e=K();h(0,"div",0)(1,"section",1)(2,"button",2),A("click",function(){k(e);let o=u();return I(o.toggle.emit())}),h(3,"span",3),v(4),m(),F(5,"i",4),m(),M(6,mle,3,2),m()()}if(t&2){let e=u();l(2),O("aria-expanded",e.expanded()),l(2),x(e.texts.sections.definition),l(),se("pi-chevron-right",!e.expanded())("pi-chevron-down",e.expanded()),l(),D(e.expanded()?6:-1)}}var gle=new Set(["name","description","metadata","model","effort","permissionMode","maxTurns","memory","background","isolation","color","tools","disallowedTools","skills","mcpServers","hooks","initialPrompt"]),vle=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"]),IP=(()=>{class t{frontmatter=B.required();kind=B.required();provider=B(void 0);bodyField=B(void 0);skillPathByName=B(null);onSkillClick=B(null);expanded=B(!0);toggle=Ge();texts=SP;markdown=p(ho);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(()=>Ch(this.fm().tools));model=S(()=>Xt(this.fm().model));skills=S(()=>Ch(this.fm().skills));disallowedTools=S(()=>Ch(this.fm().disallowedTools));initialPrompt=S(()=>Xt(this.fm().initialPrompt));permissionMode=S(()=>Xt(this.fm().permissionMode));maxTurns=S(()=>ble(this.fm().maxTurns));memory=S(()=>Xt(this.fm().memory));background=S(()=>typeof this.fm().background=="boolean"?this.fm().background:null);effort=S(()=>Xt(this.fm().effort));isolation=S(()=>Xt(this.fm().isolation));color=S(()=>gh(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:Xt(e.when_to_use),argumentHint:Xt(e["argument-hint"]),arguments:yh(e.arguments),disableModelInvocation:e["disable-model-invocation"]===!0,userInvocable:typeof e["user-invocable"]=="boolean"?e["user-invocable"]:null,allowedTools:yh(e["allowed-tools"]),disallowedTools:yh(e["disallowed-tools"]),model:Xt(e.model),effort:Xt(e.effort),context:Xt(e.context),agent:Xt(e.agent),paths:yh(e.paths),shell:Xt(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=M0(()=>this.initialPrompt()??"",this.markdown);extraFields=S(()=>{let e=this.isAgent()?gle:this.isSkillOrCommand()?vle:null;if(!e)return[];let n=this.fm(),o=this.bodyField(),r=[];for(let a of Object.keys(n)){if(e.has(a)||o!==void 0&&a===o)continue;let s=n[a];if(s==null)continue;let c=typeof s=="string"?s:typeof s=="number"||typeof s=="boolean"?String(s):JSON.stringify(s);r.push({key:a,value:c})}return r});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"],bodyField:[1,"bodyField"],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&&M(0,_le,7,7,"div",0),n&2&&D(o.hasAnyContent()?0:-1)},dependencies:[Fe,Be],styles:["[_nghost-%COMP%]{display:block}.vfm[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.85rem}.vfm__inline[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:center;gap:.3rem;font-size:.83rem}.vfm__inline[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{background:var(--sm-bg-hover);padding:.05rem .4rem;border-radius:var(--sm-radius-sm);font-size:.78rem;color:var(--p-text-color);font-family:var(--sm-font-mono)}.vfm__sep[_ngcontent-%COMP%]{color:var(--sm-border);font-size:.75rem}.vfm__sep-arrow[_ngcontent-%COMP%]{color:var(--p-text-muted-color);font-size:.78rem;margin:0 .1rem}.vfm__danger[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.25rem;color:var(--sm-severity-error)}.vfm__danger[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{background:var(--sm-severity-error-bg);color:var(--sm-severity-error)}.vfm__danger[_ngcontent-%COMP%] .pi[_ngcontent-%COMP%]{font-size:.7rem}.vfm__hook[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.25rem}.vfm__hook[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{background:var(--sm-bg-hover);padding:.05rem .4rem;border-radius:var(--sm-radius-sm);font-size:.78rem;font-family:var(--sm-font-mono)}.vfm__unknown-dd[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.3rem}.vfm__unknown[_ngcontent-%COMP%]{font-size:.72rem;color:var(--p-text-muted-color);cursor:help;line-height:1}.vfm__color[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.35rem}.vfm__swatch[_ngcontent-%COMP%]{width:.7rem;height:.7rem;border-radius:50%;flex:none;border:1px solid var(--sm-border)}.vfm__quote[_ngcontent-%COMP%]{margin:0;padding:.7rem .95rem;border-left:2px solid var(--sm-border);background:var(--sm-bg-hover);color:var(--p-text-color);font-size:.9rem;line-height:1.55;border-radius:0 var(--sm-radius-sm) var(--sm-radius-sm) 0}[_nghost-%COMP%] .vfm__quote>:first-child{margin-top:0}[_nghost-%COMP%] .vfm__quote>:last-child{margin-bottom:0}[_nghost-%COMP%] .vfm__quote code{background:var(--sm-bg-content);padding:.05rem .4rem;border-radius:var(--sm-radius-sm);font-size:.82rem;font-family:var(--sm-font-mono)}[_nghost-%COMP%] .vfm__quote a{color:var(--p-primary-color);text-decoration:underline}"],changeDetection:0})}return t})();function Xt(t){return typeof t=="string"&&t.length>0?t:null}function ble(t){return typeof t=="number"&&Number.isFinite(t)?t:null}function Ch(t){return Array.isArray(t)?t.filter(i=>typeof i=="string"&&i.length>0):[]}function yh(t){return typeof t=="string"?t.length>0?[t]:[]:Array.isArray(t)?Ch(t):[]}var MP={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 PP=(t,i)=>i.key,yle=(t,i)=>i.pluginId;function Cle(t,i){if(t&1&&(h(0,"p",0),v(1),m()),t&2){let e=u();l(),x(e.texts.empty)}}function xle(t,i){if(t&1&&(h(0,"span",5),v(1),m()),t&2){let e=u().$implicit,n=u(3);l(),x(n.texts.rootContribBadge(e.pluginId))}}function wle(t,i){if(t&1&&(h(0,"div",3)(1,"code",4),v(2),m(),M(3,xle,2,1,"span",5),h(4,"pre",6),v(5),m()()),t&2){let e=i.$implicit;l(2),x(e.key),l(),D(e.pluginId!==null?3:-1),l(2),x(e.value)}}function Tle(t,i){if(t&1&&(h(0,"div",1),de(1,wle,6,3,"div",3,PP),m()),t&2){let e=u(2);l(),ue(e.rootContributions())}}function Sle(t,i){if(t&1&&(h(0,"span",10),v(1),m()),t&2){let e=u(4);l(),x(e.texts.unregisteredBadge)}}function kle(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(),x(e.key),l(3),x(e.value)}}function Ile(t,i){if(t&1&&(h(0,"section",7)(1,"h5",8)(2,"span",9),v(3),m(),M(4,Sle,2,1,"span",10),m(),h(5,"dl",11),de(6,kle,5,3,null,null,PP),m()()),t&2){let e=i.$implicit;O("data-testid","plugin-contributions-ns-"+e.pluginId),l(3),x(e.pluginId),l(),D(e.registered?-1:4),l(2),ue(e.rows)}}function Mle(t,i){if(t&1&&(h(0,"div",2),de(1,Ile,8,3,"section",7,yle),m()),t&2){let e=u(2);l(),ue(e.namespaces())}}function Dle(t,i){if(t&1&&(M(0,Tle,3,0,"div",1),M(1,Mle,3,0,"div",2)),t&2){let e=u();D(e.rootContributions().length?0:-1),l(),D(e.namespaces().length?1:-1)}}var DP=new Set(["identity","annotations","settings","audit"]),RP=(()=>{class t{dataSource=p(lo);sidecarRoot=B(void 0);texts=MP;catalog=W(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(DP.has(a)||this.isRegisteredRootKey(a))continue;let d=typeof s=="object"&&s!==null&&!Array.isArray(s)?s:{value:s},f=o.has(a),g=o.get(a)??[],y=Object.entries(d).map(([T,w])=>({key:T,value:EP(w),description:f?Ele(g,T):null}));r.push({pluginId:a,registered:f,rows:y})}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(DP.has(a))continue;let c=o.get(a);c&&r.push({key:a,pluginId:c.pluginId,value:EP(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&&M(0,Cle,2,1,"p",0)(1,Dle,2,2),n&2&&D(o.isEmpty()?0:1)},dependencies:[Fe,Be],styles:["[_nghost-%COMP%]{display:block}.pcp__empty[_ngcontent-%COMP%]{margin:0;font-size:.85rem;color:var(--sm-text-muted);font-style:italic}.pcp__roots[_ngcontent-%COMP%], .pcp__namespaces[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.6rem}.pcp__root-row[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:center;gap:.4rem;font-size:.85rem}.pcp__root-key[_ngcontent-%COMP%]{font-family:var(--sm-font-mono);background:var(--sm-bg-hover);padding:.1rem .4rem;border-radius:var(--sm-radius-sm);font-weight:600}.pcp__root-badge[_ngcontent-%COMP%]{font-size:.7rem;color:var(--sm-text-muted);font-style:italic;background:var(--sm-bg-hover);padding:.05rem .35rem;border-radius:var(--sm-radius-sm)}.pcp__root-value[_ngcontent-%COMP%]{flex:1 1 100%;margin:.2rem 0 0;padding:.45rem .6rem;background:var(--sm-bg-hover);border-radius:var(--sm-radius-sm);font-family:var(--sm-font-mono);font-size:.8rem;white-space:pre-wrap;word-break:break-word}.pcp__ns[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.35rem}.pcp__ns[_ngcontent-%COMP%] + .pcp__ns[_ngcontent-%COMP%]{border-top:1px solid var(--sm-border);padding-top:.5rem}.pcp__ns-header[_ngcontent-%COMP%]{margin:0;display:inline-flex;align-items:center;gap:.5rem;font-size:.85rem;font-weight:600}.pcp__ns-name[_ngcontent-%COMP%]{font-family:var(--sm-font-mono)}.pcp__ns-badge[_ngcontent-%COMP%]{font-size:.65rem;font-weight:500;text-transform:uppercase;letter-spacing:.04em;color:var(--sm-text-muted);background:var(--sm-bg-hover);padding:.05rem .4rem;border-radius:var(--sm-radius-sm)}.pcp__kv[_ngcontent-%COMP%]{display:grid;grid-template-columns:max-content 1fr;column-gap:.6rem;row-gap:.2rem;margin:0;font-size:.85rem}.pcp__kv[_ngcontent-%COMP%] dt[_ngcontent-%COMP%]{color:var(--sm-text-muted);font-weight:500;font-family:var(--sm-font-mono);cursor:help}.pcp__kv[_ngcontent-%COMP%] dd[_ngcontent-%COMP%]{margin:0;word-break:break-word}.pcp__kv[_ngcontent-%COMP%] dd[_ngcontent-%COMP%] pre[_ngcontent-%COMP%]{margin:0;font-family:var(--sm-font-mono);font-size:.8rem;white-space:pre-wrap;word-break:break-word}"],changeDetection:0})}return t})();function EP(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 Ele(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 Ple=[[["","smSectionTitleExtra",""]],"*"],Rle=["[smSectionTitleExtra]","*"],xh=(()=>{class t{title=B.required();expanded=B.required();toggleTestid=B();toggleAriaLabel=B();toggleTooltip=B();toggle=Ge();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:Rle,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&&(fn(Ple),h(0,"button",0),A("click",function(){return o.toggle.emit()}),h(1,"span",1),v(2),$e(3),m(),F(4,"i",2),m(),$e(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),se("pi-chevron-right",!o.expanded())("pi-chevron-down",o.expanded()))},dependencies:[Fe,Be],encapsulation:2,changeDetection:0})}return t})();var Ole=t=>({inputs:t}),Fle=(t,i)=>i.pluginId,Nle=(t,i)=>i.qualifiedId;function Ale(t,i){t&1&&pe(0)}function Lle(t,i){if(t&1&&(h(0,"div",3),R(1,Ale,1,0,"ng-container",4),m()),t&2){let e=i.$implicit,n=u(3);O("data-testid","contribution-"+e.qualifiedId.replaceAll("/","-")),l(),_("ngComponentOutlet",n.rendererFor(e.slot))("ngComponentOutletInputs",Re(3,Ole,e.rendererInputs))}}function Ble(t,i){if(t&1&&(h(0,"div",2),de(1,Lle,2,5,"div",3,Nle),m()),t&2){let e=u().$implicit;l(),ue(e.bricks)}}function Vle(t,i){if(t&1){let e=K();h(0,"sm-collapsible-section",1),A("toggle",function(){let o=k(e).$implicit,r=u();return I(r.toggle(o.pluginId))}),M(1,Ble,3,0,"div",2),m()}if(t&2){let e=i.$implicit,n=u();_("title",e.pluginId)("expanded",n.expanded(e.pluginId))("toggleTestid","inspector-plugin-section-toggle-"+e.pluginId),O("data-testid","inspector-plugin-section-"+e.pluginId),l(),D(n.expanded(e.pluginId)?1:-1)}}var OP="skill-map.ui.inspector.plugin-sections",O0=100,FP=(()=>{class t{node=B(null);registry=p(Xv);collapseState=W(zle());groups=S(()=>{let e=this.node();if(!e)return[];let n=(e.contributions??[]).filter(a=>Jv(a.slot)&&eb.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=O0,d=s.map(f=>{let g=`${f.pluginId}/${f.extensionId}/${f.contributionId}`,y=this.registry.get(g);return typeof y?.pluginOrder=="number"&&(c=y.pluginOrder),{c:f,qualifiedId:g,extensionOrder:y?.extensionOrder??O0,priority:y?.priority??O0,inputs:tb(f,f.slot,e.path,y)}}).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:d.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=>Mt(me({},n),{[e]:!(n[e]??!1)})),Hle(this.collapseState())}rendererFor(e){return Qv[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&&de(0,Vle,2,5,"sm-collapsible-section",0,Fle),n&2&&ue(o.groups())},dependencies:[J0,xh],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 zle(){try{let t=localStorage.getItem(OP);if(!t)return{};let i=JSON.parse(t);return typeof i=="object"&&i!==null?i:{}}catch{return{}}}function Hle(t){try{localStorage.setItem(OP,JSON.stringify(t))}catch{}}var NP={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 qle=(t,i,e)=>({key:"body-stored",label:t,value:i,drift:e}),Gle=(t,i,e)=>({key:"body-live",label:t,value:i,drift:e}),jle=(t,i,e)=>({key:"fm-stored",label:t,value:i,drift:e}),Ule=(t,i,e)=>({key:"fm-live",label:t,value:i,drift:e});function $le(t,i){t&1&&(h(0,"code"),v(1),m()),t&2&&(l(),x(i))}function Wle(t,i){if(t&1&&(h(0,"span",3),v(1),m()),t&2){let e=u();l(),x(e.texts.absentMarker)}}function Kle(t,i){t&1&&pe(0)}function Yle(t,i){if(t&1&&R(0,Kle,1,0,"ng-container",11),t&2){let e=u(),n=gt(42);_("ngTemplateOutlet",n)("ngTemplateOutletContext",cr(2,qle,e.texts.fields.bodyHashStored,i,e.bodyHashDrift()))}}function Xle(t,i){if(t&1&&(h(0,"span",3),v(1),m()),t&2){let e=u();l(),x(e.texts.absentMarker)}}function Zle(t,i){t&1&&pe(0)}function Qle(t,i){if(t&1&&R(0,Zle,1,0,"ng-container",11),t&2){let e=u(),n=gt(42);_("ngTemplateOutlet",n)("ngTemplateOutletContext",cr(2,Gle,e.texts.fields.bodyHashLive,i,e.bodyHashDrift()))}}function Jle(t,i){if(t&1&&(h(0,"span",3),v(1),m()),t&2){let e=u();l(),x(e.texts.absentMarker)}}function ece(t,i){t&1&&pe(0)}function tce(t,i){if(t&1&&R(0,ece,1,0,"ng-container",11),t&2){let e=u(),n=gt(42);_("ngTemplateOutlet",n)("ngTemplateOutletContext",cr(2,jle,e.texts.fields.frontmatterHashStored,i,e.frontmatterHashDrift()))}}function nce(t,i){if(t&1&&(h(0,"span",3),v(1),m()),t&2){let e=u();l(),x(e.texts.absentMarker)}}function ice(t,i){t&1&&pe(0)}function oce(t,i){if(t&1&&R(0,ice,1,0,"ng-container",11),t&2){let e=u(),n=gt(42);_("ngTemplateOutlet",n)("ngTemplateOutletContext",cr(2,Ule,e.texts.fields.frontmatterHashLive,i,e.frontmatterHashDrift()))}}function rce(t,i){if(t&1&&(h(0,"span",3),v(1),m()),t&2){let e=u();l(),x(e.texts.absentMarker)}}function ace(t,i){t&1&&(h(0,"code"),v(1),m()),t&2&&(l(),x(i))}function sce(t,i){if(t&1&&(h(0,"span",3),v(1),m()),t&2){let e=u();l(),x(e.texts.notSetMarker)}}function lce(t,i){t&1&&(h(0,"code"),v(1),m()),t&2&&(l(),x(i))}function cce(t,i){if(t&1&&(h(0,"span",3),v(1),m()),t&2){let e=u();l(),x(e.texts.notSetMarker)}}function dce(t,i){t&1&&(h(0,"code"),v(1),m()),t&2&&(l(),x(i))}function uce(t,i){if(t&1&&(h(0,"span",3),v(1),m()),t&2){let e=u();l(),x(e.texts.absentMarker)}}function pce(t,i){if(t&1&&(h(0,"span",13),v(1),m()),t&2){let e=u(2);l(),x(e.texts.copiedLabel)}}function fce(t,i){if(t&1){let e=K();h(0,"button",12),A("click",function(){let o=k(e),r=o.key,a=o.value,s=u();return I(s.copyHash(r,a))}),h(1,"code"),v(2),m(),M(3,pce,2,1,"span",13),m()}if(t&2){let e=i.key,n=i.label,o=i.value,r=i.drift,a=u();O("title",o)("aria-label",a.texts.copyA11y(n)),l(),se("dbg__diff",r),l(),x(a.truncateHash(o)),l(),D(a.copiedKey()===e?3:-1)}}var AP=(()=>{class t{node=B.required();sidecarRoot=B(null);overlay=B(void 0);texts=NP;copiedKey=W(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),M(4,$le,2,1,"code")(5,Wle,2,1,"span",3),m(),h(6,"dt"),v(7),m(),h(8,"dd",4),M(9,Yle,1,6,"ng-container")(10,Xle,2,1,"span",3),m(),h(11,"dt"),v(12),m(),h(13,"dd",5),M(14,Qle,1,6,"ng-container")(15,Jle,2,1,"span",3),m(),h(16,"dt"),v(17),m(),h(18,"dd",6),M(19,tce,1,6,"ng-container")(20,nce,2,1,"span",3),m(),h(21,"dt"),v(22),m(),h(23,"dd",7),M(24,oce,1,6,"ng-container")(25,rce,2,1,"span",3),m(),h(26,"dt"),v(27),m(),h(28,"dd",8),M(29,ace,2,1,"code")(30,sce,2,1,"span",3),m(),h(31,"dt"),v(32),m(),h(33,"dd",9),M(34,lce,2,1,"code")(35,cce,2,1,"span",3),m(),h(36,"dt"),v(37),m(),h(38,"dd",10),M(39,dce,2,1,"code")(40,uce,2,1,"span",3),m()(),R(41,fce,4,6,"ng-template",null,0,We)),n&2){let r,a,s,c,d,f,g,y;l(2),x(o.texts.fields.forPath),l(2),D((r=o.identityBlock().path)?4:5,r),l(3),x(o.texts.fields.bodyHashStored),l(2),D((a=o.identityBlock().bodyHash)?9:10,a),l(3),x(o.texts.fields.bodyHashLive),l(2),D((s=o.bodyHashLive())?14:15,s),l(3),x(o.texts.fields.frontmatterHashStored),l(2),D((c=o.identityBlock().frontmatterHash)?19:20,c),l(3),x(o.texts.fields.frontmatterHashLive),l(2),D((d=o.frontmatterHashLive())?24:25,d),l(3),x(o.texts.fields.resolvedProvider),l(2),D((f=o.identityBlock().resolvedProvider)?29:30,f),l(3),x(o.texts.fields.resolvedKind),l(2),D((g=o.identityBlock().resolvedKind)?34:35,g),l(3),x(o.texts.fields.sidecarStatus),l(2),D((y=o.sidecarStatusLiteral())?39:40,y)}},dependencies:[mn],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 hce(t,i){if(t&1&&(Q(0,"span",3),oe(1,"i",6),Q(2,"span"),v(3),Q(4,"code"),v(5),ie()()()),t&2){u(2);let e=Me(0),n=u();l(3),be("",n.texts.fields.lastBumpedBy," "),l(2),x(e.lastBumpedBy)}}function mce(t,i){if(t&1&&(Q(0,"dt"),v(1),ie(),Q(2,"dd",2)(3,"span",3),oe(4,"i",4),Q(5,"span",5),v(6),ie()(),M(7,hce,6,2,"span",3),ie()),t&2){u();let e=Me(0),n=u();l(),x(n.texts.fields.lastBumpedAt),l(4),Qe("title",e.lastBumpedAt),l(),x(n.lastBumpedRel()),l(),D(e.lastBumpedBy!==null?7:-1)}}function _ce(t,i){if(t&1&&(Q(0,"span",3),oe(1,"i",6),Q(2,"span"),v(3),Q(4,"code"),v(5),ie()()()),t&2){u(2);let e=Me(0),n=u();l(3),be("",n.texts.fields.createdBy," "),l(2),x(e.createdBy)}}function gce(t,i){if(t&1&&(Q(0,"dt"),v(1),ie(),Q(2,"dd",7)(3,"span",3),oe(4,"i",8),Q(5,"span",5),v(6),ie()(),M(7,_ce,6,2,"span",3),ie()),t&2){u();let e=Me(0),n=u();l(),x(n.texts.fields.createdAt),l(4),Qe("title",e.createdAt),l(),x(n.createdRel()),l(),D(e.createdBy!==null?7:-1)}}function vce(t,i){if(t&1&&(Jt(0),Q(1,"dl",0),M(2,mce,8,4),M(3,gce,8,4),ie()),t&2){let e=Tt(u().audit());l(2),D(e.lastBumpedAt!==null?2:-1),l(),D(e.createdAt!==null?3:-1)}}function bce(t,i){if(t&1&&(Q(0,"p",1),v(1),ie()),t&2){let e=u();l(),x(e.texts.headerEmpty)}}var LP=(()=>{class t{sidecarRoot=B(null);texts=er.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:wh(r.lastBumpedAt),lastBumpedBy:wh(r.lastBumpedBy),createdAt:wh(r.createdAt),createdBy:wh(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:zh(e)});createdRel=S(()=>{let e=this.audit().createdAt;return e===null?null:zh(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&&M(0,vce,4,3,"dl",0)(1,bce,2,1,"p",1),n&2&&D(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 wh(t){return typeof t=="string"&&t.length>0?t:null}var BP={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 yce=()=>[import("./chunk-EZI3BXQN.js").then(t=>t.InputTypeControl)];function Cce(t,i){if(t&1){let e=K();h(0,"button",6),A("click",function(){let o=k(e).$implicit,r=u(2);return I(r.onChipClick(o))}),F(1,"i",7),v(2),m()}if(t&2){let e=i.$implicit,n=u(2);se("node-tags__tag--active",n.isActive(e)),O("aria-pressed",n.isActive(e))("aria-label",n.texts.tagFilterAriaLabel(e)),l(2),be(" ",e," ")}}function xce(t,i){if(t&1){let e=K();h(0,"div",0)(1,"span",2),v(2),m(),de(3,Cce,3,5,"button",3,qe),h(5,"button",4),A("click",function(){k(e);let o=u();return I(o.startEdit())}),F(6,"i",5),m()()}if(t&2){let e=u();l(2),be("",e.texts.viewLabel,":"),l(),ue(e.tags()),l(2),_("pTooltip",e.editTooltip()),O("aria-label",e.editTooltip())}}function wce(t,i){if(t&1){let e=K();h(0,"sm-input-type-control",12),A("valueChange",function(o){k(e);let r=u(2);return I(r.onDraftChange(o))}),m()}if(t&2){let e=u(2);_("descriptor",e.descriptor())("value",e.draft())}}function Tce(t,i){if(t&1){let e=K();h(0,"span",11),F(1,"i",13),h(2,"span",14),v(3),m(),h(4,"button",15),A("click",function(){k(e);let o=u(2);return I(o.dismissError())}),F(5,"i",16),m()()}if(t&2){let e=u(2);l(3),x(i),l(),O("aria-label",e.texts.dismissErrorAriaLabel)}}function Sce(t,i){if(t&1){let e=K();h(0,"div",1),U0(1,wce,1,2),$0(2,1,yce),W0(),h(4,"div",8)(5,"p-button",9),A("onClick",function(){k(e);let o=u();return I(o.save())}),m(),h(6,"p-button",10),A("onClick",function(){k(e);let o=u();return I(o.cancelEdit())}),m()(),M(7,Tce,6,2,"span",11),m()}if(t&2){let e,n=u();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(),D((e=n.error())?7:-1,e)}}var kce="core/node-set-tags",VP=(()=>{class t{tags=B.required();activeTag=B(null);nodePath=B.required();tagClick=Ge();texts=BP;dispatcher=p(hs);loader=p(pt);allTags=S(()=>{let e=new Set;for(let n of this.loader.nodes())for(let o of Kn(n))e.add(o);return[...e].sort((n,o)=>n.localeCompare(o))});editingSig=W(!1);draftSig=W([]);inFlightSig=W(!1);errorSig=W(null);editing=this.editingSig.asReadonly();draft=this.draftSig.asReadonly();inFlight=this.inFlightSig.asReadonly();error=this.errorSig.asReadonly();resetOnNodeChange=ce(()=>{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(kce,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&&M(0,xce,7,3,"div",0)(1,Sce,8,8,"div",1),n&2&&D(o.editing()?1:0)},dependencies:[rn,jt,Fe,Be],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 Ice(t,i){if(t&1&&(h(0,"span",7),F(1,"i",16),v(2),m()),t&2){let e=u();_("pTooltip",e.texts.header.invalidFrontmatterTooltip),l(2),be(" ",e.texts.header.invalidFrontmatter," ")}}function Mce(t,i){t&1&&(h(0,"span",8),v(1),m()),t&2&&(l(),x(i))}function Dce(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 Ece=new Set(["red","orange","yellow","green","cyan","blue","purple","pink"]),zP=(()=>{class t{node=B.required();frontmatterInvalid=B(!1);activeTag=B(null);favoriteToggle=Ge();tagClick=Ge();texts=er;cardTexts=Jn;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(()=>ls(this.node()));headerStability=S(()=>uo(this.node()));headerTitleColor=S(()=>{let e=this.node(),o=e.frontmatter.color;return typeof o=="string"&&Ece.has(o)?o:`var(--sm-kind-${e.kind})`});headerTags=S(()=>Kn(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(),M(9,Ice,3,2,"span",7),M(10,Mce,2,1,"span",8),M(11,Dce,4,2,"span",9),m(),h(12,"code",10),v(13),m()(),h(14,"div",11)(15,"button",12),A("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),A("tagClick",function(a){return o.tagClick.emit(a)}),m()()),n&2){let r,a,s=o.node();l(2),x(s.kind),l(2),_("kind",s.kind)("provider",s.provider)("size",18),l(4),x(o.headerName()),l(),D(o.frontmatterInvalid()?9:-1),l(),D((r=o.headerVersion())?10:-1,r),l(),D((a=o.headerStability())?11:-1,a),l(2),x(s.path),l(2),se("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(),se("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:[Fe,Be,Jo,VP,Zn],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 Pce=()=>({width:"32rem"}),qP=(()=>{class t{texts=HP;open=B(!1);decision=Ge();always=W(!1);alwaysChecked=S(()=>this.always());resetOnOpen=ce(()=>{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),A("visibleChange",function(a){return o.onVisibleChange(a)}),h(1,"p",1),v(2),m(),h(3,"label",2)(4,"p-checkbox",3),lr("ngModelChange",function(a){return sr(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),A("onClick",function(){return o.decline()}),m(),h(12,"p-button",9),A("onClick",function(){return o.accept()}),m()()()),n&2&&(qt(Pt(18,Pce)),_("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),x(o.texts.body),l(2),ar("ngModel",o.always),_("binary",!0),l(3),x(o.texts.alwaysLabel),l(2),x(o.texts.alwaysHint),l(2),_("label",o.texts.reject)("text",!0),l(),_("label",o.texts.accept))},dependencies:[Ct,Ft,Nt,rn,jt,us,Iv,zv,Vv],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 F0(t){Cn(F0);let{path:i,dataSource:e,markdown:n,inlineBody:o}=t,r=W("idle"),a=W(null),s=W(null),c=0,d=async(g,y)=>{if(g.trim().length===0){y===c&&r.set("empty");return}try{let T=await n.render(g);if(y!==c)return;s.set(g),a.set(T),r.set("ready")}catch{y===c&&r.set("error")}},f=async(g,y)=>{try{let T=await e.getNode(g,{includeBody:!0});if(y!==c)return;if(T===null){r.set("unavailable");return}let w=T.item.body;if(w===null){r.set("unavailable");return}if(w===void 0||w.trim().length===0){r.set("empty");return}let N=await n.render(w);if(y!==c)return;s.set(w),a.set(N),r.set("ready")}catch{if(y!==c)return;r.set("error")}};return ce(()=>{let g=i(),y=++c;if(a.set(null),s.set(null),!g){r.set("idle");return}r.set("loading");let T=vt(()=>o?.());T!==void 0?d(T,y):f(g,y)}),t.scanCompleted$?.pipe(Wn()).subscribe(()=>{let g=i();if(!g)return;let y=o?.();y!==void 0?d(y,++c):f(g,++c)}),{bodyState:r.asReadonly(),bodyHtml:a.asReadonly(),bodyRaw:s.asReadonly()}}function N0(t){Cn(N0);let{path:i,pathSet:e,dataSource:n}=t,o=W(new Set),r=W(new Set),a=W(new Set);return ce(()=>{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(y=>new Set(y).add(f)):o.update(y=>new Set(y).add(f))}catch{}finally{a.update(g=>{let y=new Set(g);return y.delete(f),y})}}}}}var jP="skill-map.ui.inspector.sections",Rce={body:!0,findings:!0,actions:!0,connections:!0};function GP(t){return Rce[t]??!1}function A0(){Cn(A0);let t=W(Oce());return ce(()=>{Fce(t())}),{expanded:i=>t()[i]??GP(i),toggle:i=>t.update(e=>Mt(me({},e),{[i]:!(e[i]??GP(i))}))}}function Oce(){try{let t=localStorage.getItem(jP);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 Fce(t){try{localStorage.setItem(jP,JSON.stringify(t))}catch{}}var Nce=new Set(["identity","annotations","settings","audit"]),Ace=new Set(["agent","skill","command"]);function UP(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&&Ace.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(!Nce.has(c))return!0;return!1}),a=S(()=>e()!==null);return{sidecarRoot:e,hasVendorFrontmatter:n,hasConnections:o,hasPluginContributions:r,hasMetadata:a}}function Lce(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=u();l(4),x(e.texts.emptyNoSelection.title),l(2),x(e.texts.emptyNoSelection.desc)}}function Bce(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=u();l(4),x(e.texts.emptyNotFound.title),l(3),x(e.path()),l(2),x(e.texts.emptyNotFound.descSuffix)}}function Vce(t,i){if(t&1&&F(0,"p",11),t&2){let e=u(2);_("innerHTML",e.descriptionHtml(),Gn)}}function zce(t,i){if(t&1&&(h(0,"div",23),F(1,"sm-view-contributions-host",24),m()),t&2){u(2);let e=Me(0);l(),_("node",e)}}function Hce(t,i){if(t&1){let e=K();h(0,"sm-collapsible-section",22),A("toggle",function(){k(e);let o=u(2);return I(o.toggleSection("actions"))}),M(1,zce,2,1,"div",23),m()}if(t&2){let e=u(2);_("title",e.texts.sections.actions)("expanded",e.expanded("actions")),l(),D(e.expanded("actions")?1:-1)}}function qce(t,i){if(t&1&&(h(0,"p",33)(1,"strong"),v(2),m(),v(3),m()),t&2){let e=u(5);l(2),x(e.texts.findingHintLabel),l(),be(" ",i," ")}}function Gce(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(),M(8,qce,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(),x(n.severity),l(2),x(n.analyzerId),l(2),x(n.message),l(),D((e=n.fix==null?null:n.fix.summary)?8:-1,e)}}function jce(t,i){if(t&1&&(h(0,"ul",27),de(1,Gce,9,6,"li",28,Eh),m()),t&2){let e=u(3);l(),ue(e.sortedIssues())}}function Uce(t,i){if(t&1){let e=K();h(0,"sm-collapsible-section",25),A("toggle",function(){k(e);let o=u(2);return I(o.toggleSection("findings"))}),h(1,"span",26),v(2),m(),M(3,jce,3,0,"ul",27),m()}if(t&2){let e=u(2);_("title",e.texts.sections.findings)("expanded",e.expanded("findings")),l(2),be("(",e.issues().length,")"),l(),D(e.expanded("findings")?3:-1)}}function $ce(t,i){if(t&1){let e=K();h(0,"sm-linked-nodes-panel",36),A("openPath",function(o){k(e);let r=u(3);return I(r.openPath(o))}),m()}if(t&2){u(2);let e=Me(0);_("path",e.path)}}function Wce(t,i){if(t&1){let e=K();h(0,"sm-collapsible-section",34),A("toggle",function(){k(e);let o=u(2);return I(o.toggleSection("connections"))}),M(1,$ce,1,1,"sm-linked-nodes-panel",35),m()}if(t&2){let e=u(2);_("title",e.texts.sections.connections)("expanded",e.expanded("connections")),l(),D(e.expanded("connections")?1:-1)}}function Kce(t,i){if(t&1){let e=K();h(0,"div",15)(1,"sm-vendor-frontmatter",37),A("toggle",function(){k(e);let o=u(2);return I(o.toggleSection("definition"))}),m()()}if(t&2){u();let e=Me(0),n=Me(1),o=u();l(),_("frontmatter",n)("kind",e.kind)("provider",e.provider)("bodyField",o.bodyFieldForNode())("skillPathByName",o.skillPathByName())("onSkillClick",o.onSkillChip)("expanded",o.expanded("definition"))}}function Yce(t,i){t&1&&(h(0,"code",39),v(1),m()),t&2&&(l(),be("(",i,")"))}function Xce(t,i){if(t&1&&F(0,"sm-annotations-panel",40),t&2){u(2);let e=Me(0);_("overlay",e.sidecar)}}function Zce(t,i){if(t&1){let e=K();h(0,"sm-collapsible-section",38),A("toggle",function(){k(e);let o=u(2);return I(o.toggleSection("annotations"))}),M(1,Yce,2,1,"code",39),M(2,Xce,1,1,"sm-annotations-panel",40),m()}if(t&2){let e,n=u(2);_("title",n.texts.sections.annotations)("expanded",n.expanded("annotations")),l(),D((e=n.sidecarFileName())?1:-1,e),l(),D(n.expanded("annotations")?2:-1)}}function Qce(t,i){if(t&1&&(h(0,"p",42),v(1),m()),t&2){let e=u(4);l(),x(e.texts.body.loading)}}function Jce(t,i){if(t&1&&(h(0,"div",46)(1,"pre",48),v(2),m(),h(3,"pre",49),F(4,"code",50),m()()),t&2){let e=u(5);l(2),x(e.rawLineNumbers()),l(2),_("innerHTML",e.rawHighlightedHtml(),Gn)}}function ede(t,i){if(t&1&&F(0,"div",47),t&2){let e=u(5);_("innerHTML",e.bodyHtml(),Gn)}}function tde(t,i){if(t&1){let e=K();h(0,"div",43)(1,"button",44),A("click",function(){k(e);let o=u(4);return I(o.toggleBodyView())}),F(2,"i",45),h(3,"span"),v(4),m()()(),M(5,Jce,5,2,"div",46)(6,ede,1,1,"div",47)}if(t&2){let e=u(4),n=e.bodyView()==="raw";l(),_("pTooltip",n?e.texts.body.view.showRenderedTooltip:e.texts.body.view.showRawTooltip),O("aria-label",n?e.texts.body.view.showRenderedTooltip:e.texts.body.view.showRawTooltip),l(),se("pi-code",!n)("pi-eye",n),l(2),x(n?e.texts.body.view.showRendered:e.texts.body.view.showRaw),l(),D(n?5:6)}}function nde(t,i){if(t&1&&M(0,Qce,2,1,"p",42)(1,tde,7,8),t&2){let e,n=u(3);D((e=n.bodyState())==="loading"?0:e==="ready"?1:-1)}}function ide(t,i){if(t&1){let e=K();h(0,"sm-collapsible-section",41),A("toggle",function(){k(e);let o=u(2);return I(o.toggleSection("body"))}),M(1,nde,2,1),m()}if(t&2){let e=u(2);_("title",e.texts.sections.body)("expanded",e.expanded("body")),l(),D(e.expanded("body")?1:-1)}}function ode(t,i){if(t&1&&F(0,"sm-plugin-contributions",52),t&2){let e=u(3);_("sidecarRoot",e.sidecarRoot())}}function rde(t,i){if(t&1){let e=K();h(0,"sm-collapsible-section",51),A("toggle",function(){k(e);let o=u(2);return I(o.toggleSection("plugins"))}),M(1,ode,1,1,"sm-plugin-contributions",52),m()}if(t&2){let e=u(2);_("title",e.texts.sections.plugins)("expanded",e.expanded("plugins")),l(),D(e.expanded("plugins")?1:-1)}}function ade(t,i){if(t&1&&(h(0,"div",54),F(1,"sm-inspector-audit-panel",52)(2,"sm-inspector-debug-panel",55),m()),t&2){u(2);let e=Me(0),n=u();l(),_("sidecarRoot",n.sidecarRoot()),l(),_("node",e)("sidecarRoot",n.sidecarRoot())("overlay",e.sidecar)}}function sde(t,i){if(t&1){let e=K();h(0,"sm-collapsible-section",53),A("toggle",function(){k(e);let o=u(2);return I(o.toggleSection("metadata"))}),M(1,ade,3,4,"div",54),m()}if(t&2){let e=u(2);_("title",e.texts.sections.metadata)("expanded",e.expanded("metadata")),l(),D(e.expanded("metadata")?1:-1)}}function lde(t,i){if(t&1){let e=K();Jt(0)(1),h(2,"section",8)(3,"sm-inspector-header",9),A("favoriteToggle",function(o){k(e);let r=u();return I(r.onHeaderFavoriteToggle(o))})("tagClick",function(o){k(e);let r=u();return I(r.tagSelect.emit(o))}),m(),h(4,"div",10),M(5,Vce,1,1,"p",11),M(6,Hce,2,3,"sm-collapsible-section",12),M(7,Uce,4,4,"sm-collapsible-section",13),M(8,Wce,2,3,"sm-collapsible-section",14),M(9,Kce,2,7,"div",15),M(10,Zce,3,4,"sm-collapsible-section",16),M(11,ide,2,3,"sm-collapsible-section",17),M(12,rde,2,3,"sm-collapsible-section",18),F(13,"sm-inspector-plugin-sections",19),M(14,sde,2,3,"sm-collapsible-section",20),m(),h(15,"sm-sidecar-consent-dialog",21),A("decision",function(o){k(e);let r=u();return I(r.onConsentDecision(o))}),m()()}if(t&2){let e=u(),n=Tt(e.node());l();let o=Tt(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),D(o.description?5:-1),l(),D(e.hasActions()?6:-1),l(),D(e.issues().length>0?7:-1),l(),D(e.hasConnections()?8:-1),l(),D(e.hasVendorFrontmatter()?9:-1),l(),D(e.hasAnnotations()?10:-1),l(),D(e.showBody()?11:-1),l(),D(e.hasPluginContributions()?12:-1),l(),_("node",e.node()),l(),D(e.hasMetadata()?14:-1),l(),_("open",e.consentOpen())}}var $P=(()=>{class t{loader=p(pt);nodeOpenIntent=p(po);dataSource=p(lo);markdown=p(ho);wsEvents=p(ss);actionDispatch=p(hs);providerRegistry=p(ib);texts=er;cardTexts=Jn;path=B(void 0);activeTag=B(null);tagSelect=Ge();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});bodyFieldForNode=S(()=>this.providerRegistry.lookup(this.node()?.provider??"")?.bodyField);inlineBody=S(()=>{let e=this.bodyFieldForNode();if(e===void 0)return;let n=this.node()?.frontmatter?.[e];return typeof n=="string"?n:void 0});bodyHandle=F0({path:this.path,dataSource:this.dataSource,markdown:this.markdown,scanCompleted$:this.wsEvents.scanCompleted$,inlineBody:this.inlineBody});bodyState=this.bodyHandle.bodyState;bodyHtml=this.bodyHandle.bodyHtml;bodyRaw=this.bodyHandle.bodyRaw;bodyView=W("rendered");toggleBodyView(){this.bodyView.update(e=>e==="rendered"?"raw":"rendered")}bodyRawDisplay=S(()=>(this.bodyRaw()??"").replace(/\n+$/,""));rawLineNumbers=S(()=>{let e=this.bodyRawDisplay();if(e.length===0)return"";let n=e.split(`
1844
+ `).length,o="";for(let r=1;r<=n;r++)o+=r===1?"1":`
1845
+ ${r}`;return o});rawHighlightedHtml=D0(()=>this.bodyRawDisplay(),this.markdown,"markdown");showBody=S(()=>{let e=this.bodyState();return e==="loading"||e==="ready"});hasAnnotations=S(()=>R0(this.node()?.sidecar));hasActions=S(()=>(this.node()?.contributions??[]).some(e=>e.slot==="inspector.action.button"));descriptionHtml=Va(()=>this.node()?.frontmatter.description??"",this.markdown);deadLink=N0({path:this.path,pathSet:this.pathSet,dataSource:this.dataSource});sectionCollapse=A0();expanded(e){return this.sectionCollapse.expanded(e)}toggleSection(e){this.sectionCollapse.toggle(e)}derivations=UP({node:this.node});sidecarRoot=this.derivations.sidecarRoot;hasVendorFrontmatter=this.derivations.hasVendorFrontmatter;hasConnections=this.derivations.hasConnections;hasPluginContributions=this.derivations.hasPluginContributions;hasMetadata=this.derivations.hasMetadata;issues=W([]);issuesPath=void 0;issuesLoaderEffect=ce(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","bodyField","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"],[1,"inspector__body-view"],["type","button","data-testid","inspector-body-view-toggle",1,"inspector__body-view-toggle",3,"click","pTooltip"],["aria-hidden","true",1,"pi"],["data-testid","inspector-body-raw",1,"inspector__body-raw"],["data-testid","inspector-body-rendered",1,"inspector__body-rendered",3,"innerHTML"],["aria-hidden","true",1,"inspector__body-raw-gutter"],[1,"inspector__body-raw-code"],["data-testid","inspector-body-raw-code",1,"hljs","language-markdown",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&&M(0,Lce,7,2,"section",0)(1,Bce,10,3,"section",0)(2,lde,16,18,"section",1),n&2&&D(o.path()?o.node()?2:1:0)},dependencies:[TP,bP,IP,RP,FP,AP,LP,zP,xh,Zn,qP,Fe,Be],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}.inspector__body-view[_ngcontent-%COMP%]{display:flex;justify-content:flex-end}.inspector__body-view-toggle[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.3rem;padding:.2rem .5rem;font-size:.75rem;font-weight:500;color:var(--p-text-muted-color);background:var(--sm-bg-hover);border:1px solid var(--sm-border);border-radius:var(--sm-radius-sm);cursor:pointer;transition:color .15s ease,border-color .15s ease}.inspector__body-view-toggle[_ngcontent-%COMP%]:hover{color:var(--p-text-color);border-color:var(--accent)}.inspector__body-view-toggle[_ngcontent-%COMP%] .pi[_ngcontent-%COMP%]{font-size:.72rem}.inspector__body-raw[_ngcontent-%COMP%]{display:flex;align-items:stretch;margin:0;max-height:480px;overflow:auto;background:var(--sm-bg-hover);border:1px solid color-mix(in srgb,var(--sm-border) 70%,var(--p-text-muted-color));border-radius:var(--sm-radius-md);font-family:var(--sm-font-mono);font-size:.82rem;line-height:1.55}.inspector__body-raw-gutter[_ngcontent-%COMP%]{flex:0 0 auto;margin:0;padding:.75rem .7rem;font:inherit;text-align:right;color:var(--p-text-muted-color);background:var(--sm-bg-hover);border-right:1px solid var(--sm-border);-webkit-user-select:none;user-select:none;position:sticky;left:0;z-index:1}.inspector__body-raw-code[_ngcontent-%COMP%]{flex:1 1 auto;margin:0;padding:.75rem .85rem;font:inherit;white-space:pre}.inspector__body-raw-code[_ngcontent-%COMP%] code[_ngcontent-%COMP%], .inspector__body-raw-code[_ngcontent-%COMP%] .hljs[_ngcontent-%COMP%]{background:transparent;padding:0;border:0;font:inherit}[_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 WP=(()=>{class t{smMiddleMousePan=B.required();origin=null;rafId=null;pendingPosition=null;onMouseDown(e){if(e.button!==1)return;e.preventDefault();let n=this.smMiddleMousePan().readPosition();this.origin={mouseX:e.clientX,mouseY:e.clientY,canvasX:n.x,canvasY:n.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,this.pendingPosition&&this.smMiddleMousePan().writePosition(this.pendingPosition)})))};onEnd=()=>{this.rafId!==null&&(cancelAnimationFrame(this.rafId),this.rafId=null);let e=this.origin!==null;this.pendingPosition=null,this.origin=null,document.removeEventListener("mousemove",this.onMove),document.removeEventListener("mouseup",this.onEnd),e&&this.smMiddleMousePan().emitChange()};static \u0275fac=function(n){return new(n||t)};static \u0275dir=Ue({type:t,selectors:[["","smMiddleMousePan",""]],hostBindings:function(n,o){n&1&&A("mousedown",function(a){return o.onMouseDown(a)})},inputs:{smMiddleMousePan:[1,"smMiddleMousePan"]}})}return t})();function KP(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 YP(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 d=n.positions.get(c);if(!d)continue;let f=a.get(c);if(!f){a.set(c,{x:d.x,y:d.y}),r=!0;continue}f.manual!==!0&&s&&(f.x===d.x&&f.y===d.y||(a.set(c,{x:d.x,y:d.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=gv(s.queryParamMap.pipe(H0(d=>d.get("path"))),{initialValue:s.snapshot.queryParamMap.get("path")});ce(()=>{let d=c(),f=o();if(f.length===0||!d)return;let g=vt(()=>n());if(g!==null&&f.find(w=>w.id===g)?.view.path===d)return;let y=f.find(T=>T.view.path===d);y&&(e(y.id),r?.(y.id))}),ce(()=>{let d=i(),f=vt(()=>c());(d??null)!==(f??null)&&a.navigate([],{relativeTo:s,queryParams:{path:d??null},queryParamsHandling:"merge",replaceUrl:!0})})}function ZP(t,i){return Kn(t).includes(i)}function QP(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 JP(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 e3(t){return t.querySelector(".p-overlay-mask, .p-dialog, .p-overlay")!==null}var t3="sm.graph.viewport",n3="sm.graph.node-positions",i3="sm.graph.node-expanded",o3="sm.graph.panel-width";function r3(){let t=null;try{t=localStorage.getItem(t3)}catch{return null}if(!t)return null;let i;try{i=JSON.parse(t)}catch{return null}return JP(i)?i:null}function a3(t){try{localStorage.setItem(t3,JSON.stringify(t))}catch{}}function s3(){let t=new Map,i=null;try{i=localStorage.getItem(n3)}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(!QP(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 za(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(n3,JSON.stringify(i))}catch{}}function l3(){let t=null;try{t=localStorage.getItem(i3)}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 Th(t){try{localStorage.setItem(i3,JSON.stringify([...t]))}catch{}}function c3(){let t=null;try{t=localStorage.getItem(o3)}catch{return null}if(!t)return null;let i=Number(t);return!Number.isFinite(i)||i<=0?null:i}function d3(t){try{localStorage.setItem(o3,String(Math.round(t)))}catch{}}var kh=500,Sh=400,u3=80;function p3(t){let i=W(t.initialWidth),e=W(typeof window>"u"?1920:window.innerWidth);typeof window<"u"&&qa(window,"resize").pipe(Wn(t.destroyRef)).subscribe(()=>e.set(window.innerWidth));let n=S(()=>{let g=Math.max(Sh,e()-u3),y=i();return y>g||y<Sh?Math.min(kh,g):y}),o=null,r=null,a=null,s=()=>{a=null,r!==null&&(i.set(r),r=null)},c=g=>{if(!o)return;let y=g.clientX-o.mouseX,T=o.widthAtStart-y,w=Math.max(Sh,e()-u3);r=Math.min(w,Math.max(Sh,T)),a===null&&typeof window<"u"&&(a=window.requestAnimationFrame(s))},d=()=>{o&&(o=null,document.removeEventListener("mousemove",c),document.removeEventListener("mouseup",d),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",d))}}}function f3(t){let i=W(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=>ZP(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 L0=.05,B0=2;function h3(t){let i=W(t.savedViewport?{x:t.savedViewport.x,y:t.savedViewport.y}:{x:0,y:0}),e=W(t.savedViewport?.scale??1),n=S(()=>e()<B0-1e-6),o=S(()=>e()>L0+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()&&a3({x:a.position.x,y:a.position.y,scale:a.scale})}}}var cde=.15,dde=.25,ude=.75,pde=.6;function m3(t){let i=S(()=>{let d=new Map;for(let f of t.graph().edges)d.has(f.from)||d.set(f.from,new Set),d.has(f.to)||d.set(f.to,new Set),d.get(f.from).add(f.to),d.get(f.to).add(f.from);return d}),e=d=>t.selectedNodeId()===d,n=d=>{let f=t.selectedNodeId();return f===null||f===d?!1:i().get(f)?.has(d)??!1},o=d=>{if(t.activeTagSelection()!==null)return!1;let f=t.selectedNodeId();return f===null||f===d?!1:!(i().get(f)?.has(d)??!1)},r=d=>{let f=t.selectedNodeId();return f!==null&&(d.from===f||d.to===f)},a=d=>{if(t.activeTagSelection()!==null)return!1;let f=t.selectedNodeId();return f===null?!1:d.from!==f&&d.to!==f},s=S(()=>{let d=t.selectedNodeId(),f=t.activeTagSelection()!==null,g=d!==null?i().get(d)??null:null,y=new Map;for(let T of t.graph().nodes){let w=T.id,N=d===w,H=!N&&d!==null&&(g?.has(w)??!1),G=!f&&d!==null&&!N&&!(g?.has(w)??!1);y.set(w,{selected:N,highlighted:H,dimmed:G})}return y}),c=S(()=>{let d=t.selectedNodeId(),f=t.activeTagSelection()!==null,g=new Map;for(let y of t.graph().edges){let T=d!==null&&(y.from===d||y.to===d),w=!f&&d!==null&&!T,N=typeof y.confidence=="number"?y.confidence:pde,H=w?cde:dde+ude*N;g.set(y.id,{highlighted:T,dimmed:w,opacity:H})}return g});return{isSelected:e,isHighlighted:n,isDimmed:o,isEdgeHighlighted:r,isEdgeDimmed:a,selectionView:s,edgeSelectionView:c}}function _3(t){let i=t.onCommit??za,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=(d,f)=>{o||(o=new Map(t.nodePositions())),o.set(d,{x:f.x,y:f.y,manual:!0}),n=!0},s=d=>{e={x:d.clientX,y:d.clientY},document.addEventListener("mouseup",r,{once:!0})},c=d=>{let f=e;if(e=null,!f)return!0;let g=d.clientX-f.x,y=d.clientY-f.y;return Math.hypot(g,y)<=4};return t.destroyRef.onDestroy(()=>{document.removeEventListener("mouseup",r)}),{onNodePositionChange:a,onNodePointerDown:s,isClickWithoutDrag:c}}function g3(t){let i=W(l3());return ce(()=>{let r=new Set(t.nodes().map(s=>s.path));if(r.size===0)return;let a=KP(i(),r);a.dirty&&(i.set(a.next),Th(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),Th(c)},resetAll:()=>{i.set(new Set),Th(new Set)},expandedNodeIds:i}}function v3(t){let i=W(!1),e=!1,n=null;return ce(()=>{let o=t.visibleNodes();e||o.length!==0&&queueMicrotask(()=>{e=!0,i.set(!0),t.savedViewport||t.fit()})}),ce(()=>{let o=t.pathsFingerprint();if(!e){n=o;return}n!==o&&(n=o,(t.animatedFit??t.fit)())}),{hasCompletedInitialLayout:()=>i()}}function b3(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 Ce of i)Ce.x<r&&(r=Ce.x),Ce.y<a&&(a=Ce.y),Ce.x+260>s&&(s=Ce.x+260),Ce.y+120>c&&(c=Ce.y+120);let d=Math.max(1,e.width-n),f=Math.max(1,s-r),g=Math.max(1,c-a),y=Math.max(1,d-160),T=Math.max(1,e.height-160),w=Math.min(y/f,T/g),N=Math.min(1,Math.max(o,w)),H=(r+s)/2,G=(a+c)/2,X=d/2-H*N,le=e.height/2-G*N;return{position:{x:X,y:le},scale:N}}function y3(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,d=e.height/2-a*o;return{position:{x:c,y:d},scale:o}}function V0(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),d=fde(c);t.writePosition({x:n.x+(i.position.x-n.x)*d,y:n.y+(i.position.y-n.y)*d}),t.writeScale(o+(i.scale-o)*d),c<1&&requestAnimationFrame(a)};requestAnimationFrame(a)}function fde(t){return 1-Math.pow(1-t,3)}var hde=["canvasWrap"],T3=(t,i)=>i.id;function mde(t,i){if(t&1&&(h(0,"div",2),F(1,"span",8),h(2,"p",9),v(3),m()()),t&2){let e=u();l(3),x(e.texts.loading)}}function _de(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=u();l(3),x(e.texts.errorTitle),l(2),x(e.error())}}function gde(t,i){if(t&1){let e=K();h(0,"div",4),F(1,"i",12),h(2,"p",13),v(3),m(),h(4,"p-button",14),A("onClick",function(){k(e);let o=u();return I(o.resetFilters())}),m()()}if(t&2){let e=u();l(3),x(e.texts.emptyTitle),l(),_("label",e.texts.resetFilters)("text",!0)}}function vde(t,i){if(t&1){let e=K();h(0,"div",5),F(1,"i",15),h(2,"p",9),v(3),m(),h(4,"p-button",16),A("onClick",function(){k(e);let o=u();return I(o.mapVisibility.clear())}),m()()}if(t&2){let e=u();l(3),x(e.texts.curationEmptyTitle),l(),_("label",e.texts.showAllOnMap)("text",!0)}}function bde(t,i){if(t&1&&(h(0,"f-connection",36),Z(),h(1,"svg",37),F(2,"circle",38),m(),Ga(),F(3,"f-connection-marker-arrow",39),m()),t&2){let e=i.$implicit,n=u(2),o=n.edgeSelectionFor(e.id);j("f-conn--"+e.kind),Oe("opacity",o.opacity),se("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 yde(t,i){if(t&1){let e=K();Se(0,23),h(1,"div",41),A("fNodePositionChange",function(o){let r=k(e).$implicit,a=u(3);return I(a.onNodePositionChange(r.id,o))})("pointerdown",function(o){k(e);let r=u(3);return I(r.onNodePointerDown(o))})("click",function(o){let r=k(e).$implicit,a=u(3);return I(a.selectNode(r,o))})("dblclick",function(){let o=k(e).$implicit,r=u(3);return I(r.openNode(o))}),h(2,"sm-node-card",42),A("expandedChange",function(o){let r=k(e).$implicit,a=u(3);return I(a.setExpanded(r.id,o))})("favoriteToggle",function(o){k(e);let r=u(3);return I(r.onFavoriteToggle(o))})("tagClick",function(o){k(e);let r=u(3);return I(r.onTagSelect(o))}),m(),h(3,"div",43),F(4,"sm-view-contributions-host",44),m()(),ke()}if(t&2){let e=i.$implicit,n=u(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 Cde(t,i){if(t&1&&R(0,yde,5,14,"ng-container",40),t&2){let e=u(2);_("fVirtualForOf",e.graph().nodes)}}function xde(t,i){if(t&1){let e=K();h(0,"div",46),A("fNodePositionChange",function(o){let r=k(e).$implicit,a=u(3);return I(a.onNodePositionChange(r.id,o))})("pointerdown",function(o){k(e);let r=u(3);return I(r.onNodePointerDown(o))})("click",function(o){let r=k(e).$implicit,a=u(3);return I(a.selectNode(r,o))})("dblclick",function(){let o=k(e).$implicit,r=u(3);return I(r.openNode(o))}),h(1,"sm-node-card",42),A("expandedChange",function(o){let r=k(e).$implicit,a=u(3);return I(a.setExpanded(r.id,o))})("favoriteToggle",function(o){k(e);let r=u(3);return I(r.onFavoriteToggle(o))})("tagClick",function(o){k(e);let r=u(3);return I(r.onTagSelect(o))}),m(),h(2,"div",43),F(3,"sm-view-contributions-host",44),m()()}if(t&2){let e=i.$implicit,n=u(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 wde(t,i){if(t&1&&(Se(0,23),de(1,xde,4,12,"div",45,T3),ke()),t&2){let e=u(2);l(),ue(e.graph().nodes)}}function Tde(t,i){if(t&1&&F(0,"sm-perf-hud",29),t&2){let e=u(2);_("visible",e.visibleCount())("total",e.totalCount())("edges",e.edgeCount())}}function Sde(t,i){if(t&1){let e=K();F(0,"span",34),h(1,"p-button",47),A("onClick",function(){k(e);let o=u(2);return I(o.mapVisibility.clear())}),m()}if(t&2){let e=u(2);l(),_("label",e.texts.toolbar.showAllLabel)("ariaLabel",e.texts.toolbar.showAllAria)("pTooltip",e.texts.toolbar.showAllTooltip)("text",!0)}}function kde(t,i){if(t&1){let e=K();h(0,"div",17,0),A("click",function(o){k(e);let r=u();return I(r.onCanvasClick(o))}),F(2,"sm-branch-cap-banner"),h(3,"f-flow",18),A("fLoaded",function(){k(e);let o=u();return I(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),A("fCanvasChange",function(o){k(e);let r=u();return I(r.onCanvasChange(o))}),Se(9,21),de(10,bde,4,21,"f-connection",22,T3),ke(),M(12,Cde,1,1,"ng-container",23)(13,wde,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),A("mousedown",function(o){k(e);let r=u();return I(r.onPanelResizeStart(o))}),m(),h(21,"div",27)(22,"sm-inspector-view",28),A("tagSelect",function(o){k(e);let r=u();return I(r.onTagSelect(o))}),m()()(),M(23,Tde,1,3,"sm-perf-hud",29),h(24,"div",30)(25,"p-button",31),A("onClick",function(){k(e);let o=u();return I(o.zoomIn())}),m(),h(26,"p-button",32),A("onClick",function(){k(e);let o=u();return I(o.zoomOut())}),m(),h(27,"p-button",33),A("onClick",function(){k(e);let o=u();return I(o.fitToScreen())}),m(),F(28,"span",34)(29,"sm-graph-layout-toolbar")(30,"span",34),h(31,"p-button",35),A("onClick",function(){k(e);let o=u();return I(o.resetLayout())}),m(),M(32,Sde,2,4),m()()}if(t&2){let e=u();_("smMiddleMousePan",e.panTarget),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),ue(e.graph().edges),l(2),D(e.perf.virtualization?12:13),l(7),Oe("width",e.clampedPanelWidth(),"px"),se("is-open",e.selectedNodeId()!==null),O("aria-label",e.texts.a11y.panel),l(),O("aria-label",e.texts.panel.resizeLabel),l(2),_("path",e.selectedPath())("activeTag",e.activeTagSelection()),l(),D(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(),D(e.mapVisibility.isActive()?32:-1)}}var x3=.2,w3=420,Ide={selected:!1,highlighted:!1,dimmed:!1},Mde={highlighted:!1,dimmed:!1,opacity:1},Ih=(()=>{class t{loader=p(pt);filters=p(on);issuePaths=p(Qo);mapVisibility=p(co);graphPreferences=p(_h);router=p(es);route=p(Ja);confirmationService=p(Bh);destroyRef=p(yt);dagreLayout=p(C0);injector=p(mt);usageTracker=p(nb);flow=it(la);canvas=it(sa);zoom=it(ca);canvasWrap=it("canvasWrap");connectionType=this.graphPreferences.connectionType;connectionBehavior=ii.FIXED;markerStart=Ve.START_ALL_STATES;markerEnd=Ve.END_ALL_STATES;perf=mh.graph.perf;perfHud=p(gP).visible;savedViewport=r3();viewportStore=h3({savedViewport:this.savedViewport,hasCompletedInitialLayout:()=>this.layoutFit.hasCompletedInitialLayout()});viewportPosition=this.viewportStore.viewportPosition;viewportScale=this.viewportStore.viewportScale;panTarget={readPosition:()=>this.viewportPosition(),writePosition:e=>this.viewportPosition.set(e),emitChange:()=>this.canvas()?.emitCanvasChangeEvent()};canZoomIn=this.viewportStore.canZoomIn;canZoomOut=this.viewportStore.canZoomOut;zoomMin=L0;zoomMax=B0;texts=Ci;nodePositions=W(s3());nodeDrag=_3({destroyRef:this.destroyRef,nodePositions:this.nodePositions});expansion=g3({nodes:this.loader.nodes});panelResize=p3({destroyRef:this.destroyRef,initialWidth:c3()??kh,onCommit:e=>d3(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(()=>rb(this.loader.nodes(),this.loader.scan()));layoutPositions=W(new Map);layoutComputedAtSignal=W(0);fullLayout=S(()=>Mt(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 ab(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(()=>WE(this.graphPreferences.layoutAlgorithm(),this.graphPreferences.layoutDirection()));inputSide=S(()=>this.connectionSides().input);outputSide=S(()=>this.connectionSides().output);selectedNodeId=W(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=ce(()=>{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=v3({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}),ce(()=>{let a=this.loader.nodes();if(a.length===0)return;let s=this.fullLayout();if(s.positions.size===0)return;let c=YP({nodes:a,current:this.nodePositions(),layout:s});c.dirty&&(this.nodePositions.set(c.next),za(c.next))}),ce(()=>{this.layoutComputedAt(),this.autoFitPending&&(this.autoFitPending=!1,this.runAnimatedFit())}),ce(()=>{this.layoutComputedAt();let a=this.layoutFit.hasCompletedInitialLayout(),s=this.pendingCenterNodeId();s===null||!a||this.fullLayout().positions.size!==0&&(this.pendingCenterNodeId.set(null),no(()=>this.centerOnNode(s),{injector:this.injector}))});let n=null;ce(()=>{this.mapVisibility.paths();let a=this.activeTagSelection(),s=a!==n;if(n=a,s){this.mapFitDebounce!==null&&clearTimeout(this.mapFitDebounce),this.mapFitDebounce=null;return}vt(()=>this.layoutFit.hasCompletedInitialLayout())&&(this.mapFitDebounce!==null&&clearTimeout(this.mapFitDebounce),this.mapFitDebounce=setTimeout(()=>{no(()=>this.runAnimatedFit(),{injector:this.injector})},180))}),this.destroyRef.onDestroy(()=>{this.mapFitDebounce!==null&&clearTimeout(this.mapFitDebounce)}),ce(()=>{let a=this.loader.liteNodes();a.length!==0&&vt(()=>this.mapVisibility.prune(new Set(a.map(s=>s.path))))});let o="",r="";ce(()=>{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 d=ob(a,s.edges),f=`${c.algorithm}|${c.direction}|${c.spacing}`,g=`${d}|${f}`;if(g===o)return;let y=r!==""&&r!==f;o=g,r=f,(c.algorithm==="force"?Promise.resolve(jh(a,s.edges)):Promise.resolve().then(()=>Gh(this.dagreLayout,a,s.edges,c))).then(w=>{this.layoutPositions.set(w),this.layoutComputedAtSignal.set(performance.now()),y&&(this.nodePositions.set(new Map),this.fitToScreenClamped())}).catch(w=>{console.error("[graph-view] layout failed:",w)})})}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),no(()=>{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?vn.ZOOM_OUT:vn.ZOOM_IN;n?.setZoom(this.getViewportCenter(),a,s,!1)},{injector:this.injector}))}autoFitAnimToken=0;autoFitPending=!1;mapFitDebounce=null;pendingCenterNodeId=W(null);animatedFitToScreen(){this.autoFitPending=!0}runAnimatedFit(){let e=this.computeVisibleFitTransform();if(!e)return;let n=++this.autoFitAnimToken;V0({readPosition:()=>this.viewportPosition(),readScale:()=>this.viewportScale(),writePosition:o=>this.viewportPosition.set(o),writeScale:o=>this.viewportScale.set(o),isStaleToken:()=>n!==this.autoFitAnimToken},e,w3)}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:b3({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=y3({point:o,wrap:{width:n.clientWidth,height:n.clientHeight},panelW:this.reservedPanelWidth(),scale:this.viewportScale()}),a=++this.autoFitAnimToken;V0({readPosition:()=>this.viewportPosition(),readScale:()=>this.viewportScale(),writePosition:s=>this.viewportPosition.set(s),writeScale:s=>this.viewportScale.set(s),isStaleToken:()=>a!==this.autoFitAnimToken},r,w3)}isolateNeighborhood(e){this.mapVisibility.isolate(e,$E(this.fullAdjacency(),e))==="isolated"&&this.selectedNodeId.set(e)}onNodePositionChange(e,n){this.nodeDrag.onNodePositionChange(e,n)}zoomIn(){this.zoom()?.setZoom(this.getViewportCenter(),x3,vn.ZOOM_IN,!0)}zoomOut(){this.zoom()?.setZoom(this.getViewportCenter(),x3,vn.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=Ci.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"?jh(n,o):Gh(this.dagreLayout,n,o,r)),s=new Map(this.nodePositions());for(let[c,d]of a)s.set(c,{x:d.x,y:d.y,manual:!0});this.nodePositions.set(s),za(s)}getViewportCenter(){let e=this.canvasWrap()?.nativeElement;if(!e)return{x:0,y:0};let n=e.getBoundingClientRect();return{x:n.width/2,y:n.height/2}}onNodePointerDown(e){this.nodeDrag.onNodePointerDown(e)}selectNode(e,n){this.nodeDrag.isClickWithoutDrag(n)&&(this.selectedNodeId.set(e.id),this.usageTracker.trackFeature("inspector"))}tagSelection=f3({nodes:this.loader.nodes,mapVisibility:this.mapVisibility});activeTagSelection=this.tagSelection.activeTagSelection;selectionState=m3({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"&&e3(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)??Ide}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)??Mde}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=z({type:t,selectors:[["sm-graph-view"]],viewQuery:function(n,o){n&1&&hn(o.flow,la,5)(o.canvas,sa,5)(o.zoom,ca,5)(o.canvasWrap,hde,5),n&2&&Ht(4)},hostBindings:function(n,o){n&1&&A("keydown.escape",function(){return o.onEscape()},$a)},features:[Ee([Bh,NC(C0,{mode:ni.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),M(1,mde,4,1,"div",2)(2,_de,6,2,"div",3)(3,gde,5,3,"div",4)(4,vde,5,3,"div",5)(5,kde,33,42,"div",6),F(6,"p-confirmdialog",7),m()),n&2&&(l(),D(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:[UC,la,sa,BC,LC,ca,qC,Yy,Xy,VC,mC,vC,zC,HC,Ff,hC,GC,RC,YE,tP,rP,sP,pP,fP,mP,$P,rn,jt,qv,Hv,Fe,Be,Zn,WP],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 Ha=440,z0=280,Dde=480;function S3(t){let i=W(t.initialWidth),e=W(typeof window>"u"?1920:window.innerWidth);typeof window<"u"&&qa(window,"resize").pipe(Wn(t.destroyRef)).subscribe(()=>e.set(window.innerWidth));let n=()=>Math.max(z0,e()-Dde),o=S(()=>{let y=n(),T=i();return T>y||T<z0?Math.min(Ha,y):T}),r=null,a=null,s=null,c=()=>{s=null,a!==null&&(i.set(a),a=null)},d=y=>{if(!r)return;let T=y.clientX-r.mouseX,w=r.widthAtStart+T,N=n();a=Math.min(N,Math.max(z0,w)),s===null&&typeof window<"u"&&(s=window.requestAnimationFrame(c))},f=()=>{r&&(r=null,document.removeEventListener("mousemove",d),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:y=>{y.button===0&&(y.preventDefault(),y.stopPropagation(),r={mouseX:y.clientX,widthAtStart:o()},document.addEventListener("mousemove",d),document.addEventListener("mouseup",f))}}}var k3=(()=>{class t{router=p(es);route=p(Ja);open(e){this.router.navigate([],{relativeTo:this.route,queryParams:{path:e},queryParamsHandling:"merge"})}static \u0275fac=function(n){return new(n||t)};static \u0275prov=C({token:t,factory:t.\u0275fac})}return t})();function Ede(t,i){if(t&1){let e=K();h(0,"p-iconfield",6),F(1,"p-inputicon",7),h(2,"input",8),A("ngModelChange",function(o){k(e);let r=u();return I(r.onSearchChange(o))}),m()(),h(3,"button",9),A("click",function(){k(e);let o=u();return I(o.onToggleSearchMap())}),F(4,"i",10),m(),h(5,"button",11),A("click",function(){k(e);let o=u();return I(o.resetView())}),F(6,"i",12),m()}if(t&2){let e=u();l(2),_("placeholder",e.texts.rail.searchPlaceholder)("ngModel",e.searchText()),O("aria-label",e.texts.rail.searchAriaLabel),l(),se("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 Pde(t,i){if(t&1){let e=K();h(0,"div",13),F(1,"sm-files-view"),m(),h(2,"div",14),A("mousedown",function(o){k(e);let r=u();return I(r.onRailResizeStart(o))}),m()}if(t&2){let e=u();l(2),O("aria-label",e.texts.rail.resize)}}var I3="sm.workspace.rail-width",M3="sm.workspace.rail-collapsed",s2e=(()=>{class t{store=p(on);destroyRef=p(yt);loader=p(pt);mapVisibility=p(co);texts=sb;canReset=S(()=>this.store.isActive()||this.mapVisibility.isActive());storedRailPref=this.readStoredCollapsed();railCollapsed=W(this.storedRailPref??!0);autoRailApplied=!1;userToggledRail=!1;railAnimating=W(!1);railAnimTimer=null;searchText=this.store.searchText;searchAffectsMap=this.store.searchAffectsMap;graphView=it(Ih);isolate(e){this.graphView()?.isolateNeighborhood(e)}resize=S3({destroyRef:this.destroyRef,initialWidth:this.readStoredWidth(),onCommit:e=>this.writeStoredWidth(e)});clampedRailWidth=this.resize.clampedRailWidth;onRailResizeStart=this.resize.onRailResizeStart;constructor(){ce(()=>{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 Ha;let e=Number(localStorage.getItem(I3));return Number.isFinite(e)&&e>0?e:Ha}writeStoredWidth(e){if(!(typeof localStorage>"u"))try{localStorage.setItem(I3,String(e))}catch{}}readStoredCollapsed(){if(typeof localStorage>"u")return null;let e=localStorage.getItem(M3);return e===null?null:e==="1"}writeStoredCollapsed(e){if(!(typeof localStorage>"u"))try{localStorage.setItem(M3,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&&hn(o.graphView,Ih,5),n&2&&Ht()},features:[Ee([{provide:po,useClass:k3},{provide:ms,useExisting:Ji(()=>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),M(3,Ede,7,11),h(4,"button",3),A("click",function(){return o.toggleRail()}),F(5,"i",4),m()(),M(6,Pde,3,1),m(),h(7,"div",5),F(8,"sm-graph-view"),m()()),n&2&&(l(),Oe("width",o.railCollapsed()?null:o.clampedRailWidth(),"px"),se("is-collapsed",o.railCollapsed())("is-animating",o.railAnimating()),O("aria-label",o.texts.rail.label),l(2),D(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(),se("pi-angle-left",!o.railCollapsed())("pi-angle-right",o.railCollapsed()),l(),D(o.railCollapsed()?-1:6))},dependencies:[ly,Ih,Ct,lv,Ft,Nt,uv,dv,fv,pv,as,rs,Fe,Be],styles:['.workspace[_ngcontent-%COMP%]{display:flex;height:100%;min-height:0}.workspace__rail[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;flex:0 0 auto;width:440px;min-width:0;min-height:0;background:var(--sm-bg-content);border-right:1px solid var(--sm-border)}.workspace__rail.is-collapsed[_ngcontent-%COMP%]{width:44px}.workspace__rail.is-animating[_ngcontent-%COMP%]{transition:width .18s ease}.workspace__rail-bar[_ngcontent-%COMP%]{display:flex;flex:0 0 auto;align-items:center;gap:.4rem;padding:.35rem .4rem;border-bottom:1px solid var(--sm-border)}.workspace__rail.is-collapsed[_ngcontent-%COMP%] .workspace__rail-bar[_ngcontent-%COMP%]{justify-content:center}.workspace__search[_ngcontent-%COMP%]{flex:1;min-width:0;display:block}.workspace__search[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{width:100%}.workspace__rail-btn[_ngcontent-%COMP%]{display:inline-flex;flex:0 0 auto;align-items:center;justify-content:center;width:30px;height:30px;border:none;border-radius:var(--sm-radius-lg);background:transparent;color:var(--p-text-muted-color);cursor:pointer}.workspace__rail-btn[_ngcontent-%COMP%]:hover: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{s2e as WorkspaceView};