dealposbooks 5.49.4 → 5.50.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (163) hide show
  1. package/3rdpartylicenses.txt +26 -26
  2. package/chunk-27SC6O47.js +1 -0
  3. package/{chunk-ELMSU4U7.js → chunk-2ABEICLB.js} +1 -1
  4. package/{chunk-672TXWSC.js → chunk-2JFOEOZ2.js} +1 -1
  5. package/{chunk-7B7LNBD5.js → chunk-3ALAWCRA.js} +1 -1
  6. package/chunk-3GYSEQ25.js +1 -0
  7. package/{chunk-2XW2ZOT4.js → chunk-43JH7CKX.js} +1 -1
  8. package/chunk-47G2N7SA.js +1 -0
  9. package/{chunk-FWAGEKIF.js → chunk-4AGTFPOU.js} +1 -1
  10. package/{chunk-FOPCQ346.js → chunk-4IMFKRR6.js} +1 -1
  11. package/chunk-4RBG4SFN.js +1 -0
  12. package/chunk-56CZGYL5.js +1 -0
  13. package/chunk-5N5QHECN.js +1 -0
  14. package/{chunk-DJXQKSLT.js → chunk-5U7KZJ3H.js} +1 -1
  15. package/{chunk-B4C3ZPN6.js → chunk-5VKDAA74.js} +1 -1
  16. package/chunk-65V5R4TS.js +1 -0
  17. package/{chunk-HCJK6VTO.js → chunk-6GILMLXA.js} +1 -1
  18. package/chunk-6GO647AV.js +1 -0
  19. package/chunk-7DBOORB2.js +1 -0
  20. package/{chunk-UPSNJEHO.js → chunk-7L5IAWG2.js} +1 -1
  21. package/chunk-A6T2KR7U.js +1 -0
  22. package/chunk-AF6G72MJ.js +1 -0
  23. package/chunk-ALLR2NXQ.js +1 -0
  24. package/chunk-BB2CNXSH.js +1 -0
  25. package/chunk-BFEM6LX7.js +2 -0
  26. package/{chunk-EBEY2MBR.js → chunk-BME4Z6DH.js} +1 -1
  27. package/chunk-BOQI2TMP.js +8 -0
  28. package/{chunk-DGACZ747.js → chunk-BTFX33U6.js} +1 -1
  29. package/{chunk-E7QWESN4.js → chunk-CN6AT4LE.js} +1 -1
  30. package/chunk-COSMZ2AH.js +1 -0
  31. package/chunk-DAFEIZYQ.js +1 -0
  32. package/{chunk-NMU2YBAB.js → chunk-DAM2WKDY.js} +1 -1
  33. package/chunk-DM2JLWKE.js +1 -0
  34. package/chunk-DM45YT57.js +1 -0
  35. package/chunk-DZCJWJUG.js +1 -0
  36. package/{chunk-WXIG4CXY.js → chunk-FHJOSHI3.js} +1 -1
  37. package/chunk-FHXTQXB7.js +160 -0
  38. package/{chunk-WMZF4DQK.js → chunk-FMAG3RQL.js} +1 -1
  39. package/{chunk-BKTBVFNX.js → chunk-FNGX2XFA.js} +1 -1
  40. package/{chunk-3DBSHDAQ.js → chunk-FTBQKOYS.js} +1 -1
  41. package/chunk-GAXDMEOS.js +1 -0
  42. package/chunk-GGQ7LRWG.js +0 -0
  43. package/{chunk-E6SW7I4D.js → chunk-GIRWHO6Q.js} +1 -1
  44. package/{chunk-2RRP7JK7.js → chunk-GU4FXUJC.js} +1 -1
  45. package/{chunk-2VZ7JZIO.js → chunk-HMZX6SME.js} +1 -1
  46. package/chunk-HQHEWKLC.js +1 -0
  47. package/chunk-I2OULINE.js +1 -0
  48. package/{chunk-PPXXWO4E.js → chunk-II7KELI4.js} +1 -1
  49. package/{chunk-WSQPSWDS.js → chunk-IMPGOCFC.js} +1 -1
  50. package/{chunk-AD247LWQ.js → chunk-ISIYG4D5.js} +1 -1
  51. package/chunk-J3HFAWXU.js +229 -0
  52. package/chunk-JERRSTLA.js +1 -0
  53. package/chunk-JRBGNG24.js +1 -0
  54. package/{chunk-URH77XNK.js → chunk-JWNGZMSE.js} +1 -1
  55. package/{chunk-PGOSR3RI.js → chunk-KARG227P.js} +1 -1
  56. package/chunk-KL3TPLRB.js +2 -0
  57. package/{chunk-QPPFPDWZ.js → chunk-KONCSTVQ.js} +1 -1
  58. package/{chunk-2LNMV22E.js → chunk-KORGIX2B.js} +1 -1
  59. package/{chunk-VDXZGF3M.js → chunk-KQZMRRMA.js} +1 -1
  60. package/chunk-KXW5NWRO.js +1 -0
  61. package/{chunk-JD3HX7VY.js → chunk-KZU3VXLG.js} +1 -1
  62. package/{chunk-M4SSELXT.js → chunk-L4ENW4RK.js} +1 -1
  63. package/{chunk-WPJG57AR.js → chunk-LBXNL7E4.js} +1 -1
  64. package/{chunk-UVSR4LPB.js → chunk-LO4HJ77Y.js} +1 -1
  65. package/chunk-MGIEURA2.js +193 -0
  66. package/{chunk-VKNINE5Q.js → chunk-MJGBBYIO.js} +1 -1
  67. package/chunk-NHW7GVHK.js +1 -0
  68. package/{chunk-ME4ALIS7.js → chunk-O44DI62I.js} +1 -1
  69. package/{chunk-PKO36DGM.js → chunk-ON7PMYMV.js} +1 -1
  70. package/chunk-OOCCZG53.js +129 -0
  71. package/{chunk-AN4SAUSA.js → chunk-OW2ND5HU.js} +1 -1
  72. package/chunk-PB2MFYIM.js +1 -0
  73. package/chunk-Q4XWXOWE.js +1 -0
  74. package/chunk-RBNXJUFM.js +252 -0
  75. package/{chunk-F7XGJYCZ.js → chunk-RMHKEGL5.js} +1 -1
  76. package/{chunk-VFKJMUGN.js → chunk-RVUOVLL5.js} +1 -1
  77. package/chunk-SASRJPT7.js +1 -0
  78. package/chunk-SJOOTBQ5.js +1 -0
  79. package/{chunk-3UAQHNUY.js → chunk-SLD7RSX6.js} +1 -1
  80. package/{chunk-CAS5GLLU.js → chunk-SOYJAYJK.js} +1 -1
  81. package/{chunk-KZHI6PGZ.js → chunk-SVGPDGYN.js} +1 -1
  82. package/chunk-SX4XIR77.js +1 -0
  83. package/{chunk-L3GNPRRN.js → chunk-SXNOZOOP.js} +5 -5
  84. package/{chunk-RM5HLXNW.js → chunk-TAN6GLIH.js} +1 -1
  85. package/{chunk-5DRALZZF.js → chunk-TOR7QRRB.js} +1 -1
  86. package/{chunk-D6IS6PE6.js → chunk-U4AN6IWJ.js} +1 -1
  87. package/chunk-URGN4QVD.js +1 -0
  88. package/chunk-UTOLWW4T.js +1 -0
  89. package/chunk-VJROOSEO.js +7 -0
  90. package/chunk-VKUW7E75.js +1 -0
  91. package/{chunk-S27Z7D3D.js → chunk-VM56C6ZV.js} +1 -1
  92. package/chunk-VNZUZ5UI.js +1 -0
  93. package/{chunk-AMGBUOC4.js → chunk-VSDW2RJ5.js} +1 -1
  94. package/{chunk-U2VDC52W.js → chunk-WL6ZZCYW.js} +1 -1
  95. package/chunk-WYLIU52Q.js +1 -0
  96. package/{chunk-5B5AMMR3.js → chunk-X6KL7VKV.js} +1 -1
  97. package/chunk-XGU6GBEK.js +1 -0
  98. package/chunk-XN4CDKDI.js +1 -0
  99. package/chunk-XULSWUMO.js +1 -0
  100. package/chunk-YHLRDTIS.js +1 -0
  101. package/chunk-YQYRAH7V.js +1 -0
  102. package/{chunk-ENH6HA3V.js → chunk-YR5KRTHR.js} +1 -1
  103. package/{chunk-KBR5PEJ3.js → chunk-YU4Q7ASX.js} +1 -1
  104. package/chunk-Z3ZKNQZS.js +1 -0
  105. package/chunk-Z4XRTHAH.js +1 -0
  106. package/{chunk-ETNPJTRI.js → chunk-ZAMQ4RCL.js} +1 -1
  107. package/chunk-ZC2ADHDH.js +130 -0
  108. package/{chunk-MHRSQRHT.js → chunk-ZC7ZENN7.js} +1 -1
  109. package/chunk-ZWNKUBMG.js +202 -0
  110. package/index.html +2 -2
  111. package/main-UCTZ3G6L.js +1 -0
  112. package/package.json +1 -1
  113. package/chunk-23PWXRYN.js +0 -1
  114. package/chunk-2BI7WNJP.js +0 -1
  115. package/chunk-5JNGJ6UW.js +0 -1
  116. package/chunk-6EIUS53G.js +0 -1
  117. package/chunk-6WWXJJID.js +0 -1
  118. package/chunk-AVSCJ22B.js +0 -1
  119. package/chunk-BEZIBXGN.js +0 -1
  120. package/chunk-BF6PW4QM.js +0 -1
  121. package/chunk-BMM5YFHU.js +0 -130
  122. package/chunk-BP4OMNR2.js +0 -8
  123. package/chunk-CFUVIXAX.js +0 -1
  124. package/chunk-CNMK2GSA.js +0 -1
  125. package/chunk-DIG4FYVW.js +0 -1
  126. package/chunk-F7PVAVLQ.js +0 -1
  127. package/chunk-FSJNWH2Y.js +0 -1
  128. package/chunk-FZS2ZX6Y.js +0 -1
  129. package/chunk-G4XX7EU2.js +0 -1
  130. package/chunk-GEFAWOOV.js +0 -129
  131. package/chunk-GTMCB3SL.js +0 -1
  132. package/chunk-H6FEO7T3.js +0 -1
  133. package/chunk-HOAF22JI.js +0 -1
  134. package/chunk-I33QA736.js +0 -1
  135. package/chunk-IPOA3SOW.js +0 -1
  136. package/chunk-IWAIAUMO.js +0 -1
  137. package/chunk-JDRK7YG6.js +0 -1
  138. package/chunk-JIFUQXVH.js +0 -1
  139. package/chunk-KNBVJM2U.js +0 -160
  140. package/chunk-LNFCBMAA.js +0 -1
  141. package/chunk-OJTHBHGK.js +0 -1
  142. package/chunk-OMLO5E65.js +0 -1
  143. package/chunk-PK7RYZ5A.js +0 -1
  144. package/chunk-PSSATQO3.js +0 -1
  145. package/chunk-QC7NAJZG.js +0 -1
  146. package/chunk-RAF7SWW4.js +0 -229
  147. package/chunk-RDQ7RWJC.js +0 -1
  148. package/chunk-RRL6OTRO.js +0 -1
  149. package/chunk-SLD2HX2B.js +0 -1
  150. package/chunk-U5YVZKME.js +0 -1
  151. package/chunk-URSKOWIQ.js +0 -1
  152. package/chunk-V7EXGBKT.js +0 -1
  153. package/chunk-VMI3QWC6.js +0 -193
  154. package/chunk-VQKIYDID.js +0 -1
  155. package/chunk-W6US3XIE.js +0 -1
  156. package/chunk-X3FAXRYR.js +0 -252
  157. package/chunk-YIG2I6WR.js +0 -1
  158. package/chunk-YRW7AH7I.js +0 -1
  159. package/chunk-ZFNIPERQ.js +0 -2
  160. package/chunk-ZIQBCB5X.js +0 -7
  161. package/chunk-ZK43JB4A.js +0 -2
  162. package/chunk-ZY4AYAWJ.js +0 -202
  163. package/main-VIRQJVUE.js +0 -1
@@ -0,0 +1,160 @@
1
+ import{a as _t}from"./chunk-ARJ7OCQO.js";import{a as qi,b as zi}from"./chunk-KARG227P.js";import{a as Gi}from"./chunk-XKI7WLHE.js";import{a as Di}from"./chunk-5VKDAA74.js";import{a as $i,b as Ee,c as Pe,d as Ki}from"./chunk-6GILMLXA.js";import{a as Ri,b as Bi}from"./chunk-2ABEICLB.js";import"./chunk-KQZMRRMA.js";import"./chunk-ZC7ZENN7.js";import{a as ut,b as ft}from"./chunk-HMZX6SME.js";import{m as ye}from"./chunk-Q4XWXOWE.js";import"./chunk-WL6ZZCYW.js";import{a as lt,b as st}from"./chunk-3VQUNDVT.js";import{a as pt,b as dt,c as Oi,d as Fi,i as Li,j as Ni,k as Vi}from"./chunk-BTFX33U6.js";import"./chunk-BME4Z6DH.js";import"./chunk-VSDW2RJ5.js";import"./chunk-7L5IAWG2.js";import{a as X}from"./chunk-SOYJAYJK.js";import{a as V}from"./chunk-BT7Y4ADP.js";import{b as Si}from"./chunk-5U7KZJ3H.js";import{a as bi}from"./chunk-MJGBBYIO.js";import"./chunk-CN6AT4LE.js";import{a as ct,b as mt}from"./chunk-OW2ND5HU.js";import"./chunk-JWNGZMSE.js";import"./chunk-II7KELI4.js";import"./chunk-FTBQKOYS.js";import"./chunk-L4ENW4RK.js";import{a as at,b as K}from"./chunk-FHJOSHI3.js";import"./chunk-KONCSTVQ.js";import"./chunk-FMAG3RQL.js";import{f as Mi,i as $}from"./chunk-J3HFAWXU.js";import"./chunk-VM56C6ZV.js";import{a as se,b as ce}from"./chunk-ISIYG4D5.js";import"./chunk-ALLR2NXQ.js";import{b as J,c as Ai,d as wi,f as Ei,g as Pi,h as ki}from"./chunk-FNGX2XFA.js";import{c as et,d as li,f as si}from"./chunk-BFEM6LX7.js";import{a as wt,f as Et,n as nt,o as ot,p as vi,t as Ti,u as Pt,w as ae,x as le,y as rt,z as _e}from"./chunk-O44DI62I.js";import"./chunk-DTYVTTET.js";import{$ as ui,Ba as hi,E as bt,Ea as xi,J as ci,Ja as Ci,L as mi,Ma as we,N as pi,Na as De,Pa as yi,R as tt,S as it,Va as Ii,X as di,Y as vt,b as oe,c as fe,e as Y,ea as fi,f as Ie,g as ri,ha as _i,i as N,j as Je,k as ai,la as gi,m as be,oa as St,p as ve,ra as re,v as Se,wa as Tt,x as Te,xa as At,y as Ae}from"./chunk-MGIEURA2.js";import{b as ie,d as ne,e as B,l as L}from"./chunk-DZCJWJUG.js";import{a as oi}from"./chunk-TOR7QRRB.js";import"./chunk-YQYRAH7V.js";import"./chunk-KL3TPLRB.js";import"./chunk-RVUOVLL5.js";import"./chunk-GGQ7LRWG.js";import{c as yt,d as It,f as Ne,h as Ve}from"./chunk-F2X3VGZZ.js";import{j as z,l as Ye,m as O,n as Ct,o as ii,r as ni,s as Xe,u as F,x as Le}from"./chunk-DM2JLWKE.js";import{$c as Ce,Aa as ee,Cb as Oe,D as Ke,Dc as he,Eb as u,Ec as R,Fc as T,Gc as ei,Ha as v,J as qe,L as qt,Lb as P,Mb as l,Oc as de,P as zt,Pb as He,Pc as xe,Qb as Fe,Qc as ti,Rb as Qt,Sb as Wt,Sc as I,Ub as Yt,Vb as Xt,Wb as a,Xb as r,Y as D,Yb as h,Zb as H,_ as A,_b as U,_c as ue,ac as w,ba as Gt,bd as W,c as $e,ca as ze,cd as We,da as Ht,db as Me,eb as jt,fc as S,gc as m,ia as x,ib as c,lc as Ue,mc as pe,nc as j,ob as xt,oc as Z,qa as _,ra as g,rc as te,s as G,sc as p,t as Kt,tc as E,ua as Ge,uc as Q,wa as Ut,wc as Jt,xc as je,yb as M,yc as Ze,zb as Zt,zc as Qe}from"./chunk-6QJHEOXN.js";import{a as C,b as y}from"./chunk-YQFG5XE2.js";var on=["class","page"],rn=t=>({id:t}),an=()=>({"overflow-x":"auto"}),ln=t=>({"table-borderless":t}),sn=t=>["fa-solid",t],cn=t=>["/pages/journal/journal-entry/",t];function mn(t,s){t&1&&h(0,"p-button",8)}function pn(t,s){if(t&1){let e=w();a(0,"p-button",9),S("onClick",function(){_(e);let n=m(2);return g(n.onDelete())}),r()}}function dn(t,s){if(t&1&&(a(0,"div",4)(1,"p-button-group"),u(2,mn,1,0,"p-button",5)(3,pn,1,0,"p-button",6),r(),a(4,"a",7),p(5,"Ledger"),r()()),t&2){let e,i=m();c(2),l("ngIf",i.roleService.permissions().coa.edit),c(),l("ngIf",i.roleService.permissions().coa.delete),c(),l("queryParams",T(3,rn,(e=i.COAInfo())==null?null:e.id))}}function un(t,s){if(t&1&&h(0,"i",25),t&2){let e=s.checked;l("ngClass",T(1,sn,e?"fa-check":"fa-xmark"))}}function fn(t,s){if(t&1&&(H(0),p(1),de(2,"number"),U()),t&2){let e=m().$implicit;c(),Q(" ",xe(2,1,e.debitAmount)," ")}}function _n(t,s){if(t&1&&(H(0),p(1),de(2,"number"),U()),t&2){let e=m().$implicit;c(),Q(" ",xe(2,1,e.creditAmount)," ")}}function gn(t,s){if(t&1&&(a(0,"tr")(1,"td"),p(2),de(3,"date"),r(),a(4,"td")(5,"div",26)(6,"a",27),p(7),r()()(),a(8,"td",28),u(9,fn,3,3,"ng-container",29),r(),a(10,"td",30),u(11,_n,3,3,"ng-container",29),r(),a(12,"td",31),p(13),de(14,"number"),r()()),t&2){let e=s.$implicit;c(2),E(ti(3,6,e.date,"dd MMM yyyy")),c(4),l("routerLink",T(11,cn,e.id)),c(),E(e.number),c(2),l("ngIf",e.debitAmount!==0),c(2),l("ngIf",e.creditAmount!==0),c(2),Q(" ",xe(14,9,e.balance)," ")}}function hn(t,s){t&1&&(a(0,"tr")(1,"td",32)(2,"div",33),h(3,"img",34),a(4,"div",26)(5,"span",35),p(6,"No Data Available"),r(),a(7,"span",35),p(8,"Your data will be shown here once it's available"),r()()()()())}function xn(t,s){if(t&1){let e=w();a(0,"div",12)(1,"div",13)(2,"p-card",14)(3,"div",15)(4,"div",16)(5,"div",17),p(6,"Name"),r(),a(7,"div",18),p(8),r()(),a(9,"div",16)(10,"div",17),p(11,"Code"),r(),a(12,"div",18),p(13),r()(),a(14,"div",16)(15,"div",17),p(16,"Category"),r(),a(17,"div",18),p(18),r()(),a(19,"div",16)(20,"div",17),p(21,"Note"),r(),a(22,"div",18),p(23),r()(),a(24,"div",16)(25,"div",17),p(26,"Tag"),r(),a(27,"div",18),p(28),r()(),a(29,"div",16)(30,"div",17),p(31,"Discontinued"),r(),a(32,"div",18)(33,"p-toggleswitch",19),S("onChange",function(n){_(e);let o=m(2);return g(o.onDiscontinued(n))}),u(34,un,1,3,"ng-template",null,2,I),r()()(),a(36,"div",16)(37,"div",17),p(38,"Access Type"),r(),a(39,"div",18),p(40),r()()()()(),a(41,"div",20)(42,"p-card",21)(43,"table",22)(44,"thead")(45,"tr")(46,"th",23),p(47,"Date"),r(),a(48,"th",23),p(49,"Number"),r(),a(50,"th",24),p(51,"Debit"),r(),a(52,"th",24),p(53,"Credit"),r(),a(54,"th",24),p(55,"Balance"),r()()(),a(56,"tbody"),Yt(57,gn,15,13,"tr",null,Wt),u(59,hn,9,0,"tr"),r()()()()()}if(t&2){let e,i,n,o,d,f,b=m(2);c(8),E((e=b.COAInfo().name)!==null&&e!==void 0?e:"-"),c(5),E((i=b.COAInfo().code)!==null&&i!==void 0?i:"-"),c(5),E((n=b.COAInfo().category)!==null&&n!==void 0?n:"-"),c(5),E((o=b.COAInfo().note)!==null&&o!==void 0?o:"-"),c(5),E((d=b.COAInfo().outletName)!==null&&d!==void 0?d:"-"),c(5),l("ngModel",b.COAInfo().bin),c(7),E((f=b.COAInfo().accessType)!==null&&f!==void 0?f:"-"),c(2),He(R(11,an)),c(),l("ngClass",T(12,ln,b.COAInfo().transactions.length===0)),c(14),Xt(b.COAInfo().transactions),c(2),Qt(b.COAInfo().transactions.length===0?59:-1)}}function Cn(t,s){if(t&1&&(a(0,"div",10),u(1,xn,60,14,"div",11),r()),t&2){let e=m();c(),l("ngIf",e.COAInfo())}}var Hi=(()=>{class t{constructor(){this.#e=x(X),this.#t=x(ie),this.router=x(ne),this.COAInfo=v(null),this.checked=v(!1),this.roleService=x(ye)}#e;#t;ngOnInit(){this.#t.paramMap.pipe(V("params"),D(e=>this.#e.getChartAccountById(e.get("id"))),A(e=>this.COAInfo.set(e)),V("response")).subscribe()}onDelete(){if(!confirm("Are you sure you want to delete this Chart of Accounts?"))return;let i=[this.#t.snapshot.paramMap.get("id")];this.#e.deleteChartAccount(i).pipe(A(()=>{this.router.navigate(["/pages/chart-of-account/account"])})).subscribe()}onDiscontinued(e){this.#e.discountedChartAccounts(this.#t.snapshot.paramMap.get("id"),{Discontinued:e.checked}).subscribe()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=M({type:t,selectors:[["app-coa-account-info",8,"page"]],attrs:on,decls:5,vars:1,consts:[["actionButton",""],["content",""],["handle",""],["pageTitle","Chart of Account Details",3,"overflowScroll"],[1,"d-flex","gap-2"],["routerLink","edit","severity","secondary","outlined","","label","Edit","icon","fa-solid fa-pen-to-square",4,"ngIf"],["severity","secondary","outlined","","label","Delete","icon","fa-solid fa-trash",3,"onClick",4,"ngIf"],["routerLink","/pages/report/general-ledger",1,"p-button",3,"queryParams"],["routerLink","edit","severity","secondary","outlined","","label","Edit","icon","fa-solid fa-pen-to-square"],["severity","secondary","outlined","","label","Delete","icon","fa-solid fa-trash",3,"onClick"],[1,"container-fluid"],["class","row justify-content-center mt-3 px-2",4,"ngIf"],[1,"row","justify-content-center","mt-3","px-2"],[1,"col","col-lg-5"],["styleClass","h-100"],[1,"d-flex","flex-column","row-gap-4"],[1,"row"],[1,"col","col-lg-4"],[1,"col"],[3,"onChange","ngModel"],[1,"col","col-lg-7"],["styleClass","h-100",1,"right-panel","h-100"],[1,"table",3,"ngClass"],["scope","col"],["scope","col",1,"text-end"],[3,"ngClass"],[1,"d-flex","flex-column"],["target","_blank",1,"link","link-primary",3,"routerLink"],[1,"text-success","text-end"],[4,"ngIf"],[1,"text-danger","text-end"],[1,"text-end"],["colspan","5",1,"text-center"],[1,"d-flex","flex-column","align-items-center","gap-2"],["src","https://resc.cloudinary.com/pos/image/upload/v1705388070/POS/Images/Cashier/globalnodata.svg","alt","No Data"],[1,"text-secondary","text-opacity-75"]],template:function(i,n){i&1&&(a(0,"app-main-panel",3),u(1,dn,6,5,"ng-template",null,0,I)(3,Cn,2,1,"ng-template",null,1,I),r()),i&2&&l("overflowScroll",!0)},dependencies:[F,z,O,Xe,ni,Te,Y,Je,et,L,B,$,K,at,le,ae,ft,ut,Oi,Di],styles:[".table>thead>tr>th{background-color:#f6f6f6!important;color:#000!important;font-weight:500!important}"],changeDetection:0})}}return t})();var me=(()=>{class t{constructor(){this.httpService=x(oi)}fetchCOACategories(){return this.httpService.get("","api/ChartOfAccount/Category")}getCOACategoryByID(e){let i={params:e};return this.httpService.get("","api/ChartOfAccount/CategoryInfo",i)}renameCategory(e,i){return this.httpService.put("",`api/ChartOfAccount/RenameCategory/${e}`,i)}updateParentCategory(e,i){return this.httpService.put("",`api/ChartOfAccount/UpdateParentCategory/${e}`,i).pipe()}deleteCategory(e){return this.httpService.delete("",`api/ChartOfAccount/Category/${e}`)}submitCategory(e,i={}){return this.httpService.post("","api/ChartOfAccount/SubmitCategory",e,i)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=ze({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Mt=t=>t?t.reduce((s,e)=>(s.push({label:e.label,data:e.data,key:e.key}),e.children&&e.children.length?s.push(...Mt(e.children)):s.push({label:`${e.label} (no children)`,data:e.data,key:`${e.key}-no-children`}),s),[]):[];var Ot=(t,s,e)=>{let i=Math.ceil(e/s),n=(t-1)*s+1,o=Math.min(t*s,e);return{start:n,end:o,totalRecords:e,totalPages:i}};var yn={filter:{PageSize:20,PageNumber:1,CategoryID:"",Text:"",listOutletID:[],Discontinued:2,AccessLevel:-1},options:{entities:[],categories:[],accessLevels:[]},data:[],count:0,perPages:[{key:20,value:"20 per page"},{key:40,value:"40 per page"},{key:60,value:"60 per page"},{key:80,value:"80 per page"},{key:100,value:"100 per page"}]},Ft=Ai(Pi(yn),ki("ChartOfAccount"),wi(t=>({isAllChecked:W(()=>t.data().every(s=>s.checked)),checkedItems:W(()=>t.data().filter(s=>s.checked)),IDsChecked:W(()=>t.data().filter(s=>s.checked).map(s=>s.id)),categories:W(()=>Mt(t.options.categories())),first:W(()=>{let{start:s}=Ot(t.filter().PageNumber,t.filter().PageSize,t.count());return s}),last:W(()=>{let{end:s}=Ot(t.filter().PageNumber,t.filter().PageSize,t.count());return s})})),Ei(t=>{let s=x(X),e=x(me),i={updateFilter(n){J(t,{filter:C({},n)})},checkedItem(n){if(Array.isArray(n))n.forEach(o=>{let d=t.data().map(f=>f.id===o.id?y(C({},f),{checked:!o.checked}):f);J(t,{data:d})});else{let o=n,d=t.data().map(f=>f.id===o.id?y(C({},f),{checked:!o.checked}):f);J(t,{data:d})}},checkAllCheckbox(){let n=t.data().map(o=>y(C({},o),{checked:!o.checked}));J(t,{data:n})},fetchChartOfAccount:lt($e(Ke(()=>!!t.filter()),qt(300),zt(),D(n=>s.getPaginatedChartAccounts(n).pipe(G(o=>y(C({},o),{data:o.data.map(d=>y(C({},d),{checked:!1}))})),st({next:o=>J(t,{data:o.data,count:o.count}),error:o=>{J(t,{data:[],count:0}),console.error(o)}}))))),fetchLoader:lt($e(D(()=>s.getChartOfAccountLoader().pipe(st({next:n=>{J(t,{filter:y(C({},t.filter()),{PageSize:n.filter.pageSize,PageNumber:1,CategoryID:n.filter.categoryID||null,Text:"",listOutletID:[],AccessLevel:n.filter.accessLevel!==void 0?n.filter.accessLevel:t.filter().AccessLevel}),options:n.options}),i.fetchChartOfAccount(t.filter)},error:n=>{console.error(n)}}))))),getCategories:lt($e(qe(()=>e.fetchCOACategories().pipe(st({next:n=>{J(t,{options:y(C({},t.options()),{entities:t.options.entities(),categories:n})})},error:n=>{console.error(n)}})))))};return i}));var Sn=["class","page"],Tn=t=>["../account/",t],An=t=>({"text-decoration-line-through":t}),wn=()=>["/pages/report/general-ledger"],En=t=>({id:t});function Pn(t,s){if(t&1){let e=w();a(0,"p-button",13),S("onClick",function(){_(e);let n=m(2);return g(n.deleteCOA())}),r()}}function kn(t,s){t&1&&h(0,"p-button",14)}function Mn(t,s){if(t&1){let e=w();a(0,"p-button",15),S("onClick",function(){_(e);let n=m(2);return g(n.onExport())}),r()}}function On(t,s){t&1&&(a(0,"a",16),h(1,"i",17),p(2," Add"),r())}function Fn(t,s){if(t&1&&(a(0,"div",8),u(1,Pn,1,0,"p-button",9),a(2,"p-button-group"),u(3,kn,1,0,"p-button",10)(4,Mn,1,0,"p-button",11),r(),u(5,On,3,0,"a",12),r()),t&2){let e=m();c(),l("ngIf",e.store.checkedItems().length&&e.roleService.permissions().coa.delete),c(2),l("ngIf",e.roleService.permissions().coa.create),c(),l("ngIf",e.roleService.permissions().global.export),c(),l("ngIf",e.roleService.permissions().coa.create)}}function Ln(t,s){t&1&&(a(0,"th",21),h(1,"p-tableHeaderCheckbox"),r())}function Nn(t,s){if(t&1&&(a(0,"tr"),u(1,Ln,2,0,"th",19),a(2,"th"),p(3,"Code"),r(),a(4,"th"),p(5,"Name"),r(),a(6,"th"),p(7,"Category"),r(),a(8,"th"),p(9,"Tag"),r(),a(10,"th",20),p(11,"Balance"),r()()),t&2){let e=m(2);c(),l("ngIf",e.roleService.permissions().coa.delete)}}function Vn(t,s){if(t&1&&(a(0,"td"),h(1,"p-tableCheckbox",25),r()),t&2){let e=m().$implicit;c(),l("value",e)}}function Dn(t,s){if(t&1&&(a(0,"tr"),u(1,Vn,2,1,"td",22),a(2,"td"),p(3),r(),a(4,"td")(5,"a",23),p(6),r()(),a(7,"td"),p(8),r(),a(9,"td"),p(10),r(),a(11,"td",20)(12,"a",24),p(13),de(14,"number"),r()()()),t&2){let e,i=s.$implicit,n=m(2);c(),l("ngIf",n.roleService.permissions().coa.delete),c(2),E(i.code),c(2),l("routerLink",T(12,Tn,i.id))("ngClass",T(14,An,i.bin)),c(),E(i.name),c(2),E(i.category),c(2),E(i.outletName),c(2),l("routerLink",R(16,wn))("queryParams",T(17,En,i.id)),c(),E(xe(14,10,(e=i.balance)!==null&&e!==void 0?e:0))}}function Rn(t,s){if(t&1&&p(0),t&2){let e=m(2);Jt(" Showing ",e.store.first()," to ",e.store.last()," of ",e.store.count()," entries ")}}function Bn(t,s){t&1&&(a(0,"tr")(1,"td",26)(2,"span"),p(3,"No records found."),r()()())}function $n(t,s){if(t&1){let e=w();a(0,"p-panel")(1,"p-table",18),S("onLazyLoad",function(n){_(e);let o=m();return g(o.loadData(n))})("onRowSelect",function(n){_(e);let o=m();return g(o.onRowSelect(n))})("onRowUnselect",function(n){_(e);let o=m();return g(o.onRowUnselect(n))})("onHeaderCheckboxToggle",function(n){_(e);let o=m();return g(o.onSelectAll(n))})("onPage",function(n){_(e);let o=m();return g(o.onPageChange(n))}),u(2,Nn,12,1,"ng-template",null,3,I)(4,Dn,15,19,"ng-template",null,4,I)(6,Rn,1,3,"ng-template",null,5,I)(8,Bn,4,0,"ng-template",null,6,I),r()()}if(t&2){let e=m();c(),l("lazy",!0)("value",e.store.data())("paginator",!0)("rows",e.store.filter().PageSize)("totalRecords",e.store.count())}}function Kn(t,s){if(t&1){let e=w();a(0,"form",28)(1,"div",29)(2,"label",30),p(3,"Tag"),r(),h(4,"p-multiselect",31),r(),a(5,"div",29)(6,"label",30),p(7,"Category"),r(),a(8,"p-treeselect",32),S("onFocus",function(){_(e);let n=m(2);return g(n.onCategoryFocus())}),r()(),a(9,"div",29)(10,"label",30),p(11,"Access Level"),r(),h(12,"p-select",33),r(),a(13,"div",34)(14,"label",30),p(15,"Page Size"),r(),h(16,"input",35),r(),a(17,"div",34)(18,"label",30),p(19,"Discontinued"),r(),a(20,"div",36)(21,"div",37),h(22,"p-radiobutton",38),a(23,"label",39),p(24,"No"),r()(),a(25,"div",37),h(26,"p-radiobutton",40),a(27,"label",41),p(28,"Yes"),r()(),a(29,"div",37),h(30,"p-radiobutton",40),a(31,"label",41),p(32,"All"),r()()()()()}if(t&2){let e=m(2);l("formGroup",e.formFilter),c(4),l("showClear",!0)("virtualScroll",!0)("virtualScrollItemSize",50)("options",e.store.options().entities),c(4),l("fluid",!0)("showClear",!0)("options",e.categoryNodes()),c(4),l("showClear",!0)("options",e.store.options().accessLevels),c(10),l("value",0),c(4),l("value",1),c(4),l("value",2)}}function qn(t,s){if(t&1&&u(0,Kn,33,13,"form",27),t&2){let e=m();l("ngIf",e.formFilter)}}var ji=(()=>{class t{ngOnInit(){this.initializeFilterEffect(),this.store.fetchLoader()}#e;constructor(){this.routeInfo=Zi,this.store=x(Ft),this.#e=x(X),this.modalService=x(li),this.roleService=x(ye),this.dialogVisible=v(!1),this.categoryNodes=v([]),this.fb=x(Se),this.injector=x(Ut),this.isDialogFilterVisible=v(!1)}initializeFilterEffect(){We(()=>{this.store.filter()&&this.generateFilterForm()},{injector:this.injector})}generateFilterForm(){let e=this.store.filter();this.formFilter=this.fb.group({outletID:this.fb.control(e.listOutletID||[]),categoryID:this.fb.control(null),pageSize:this.fb.control(e.PageSize),discontinued:this.fb.control(e.Discontinued),accessLevel:this.fb.control(e.AccessLevel)})}onPageChange(e){console.log("Page changed to: ",e),this.store.updateFilter(y(C({},this.store.filter()),{PageNumber:e.first/e.rows+1}))}onCategoryFocus(){this.#e.getCachedCategoriesOptions().pipe(A(e=>this.categoryNodes.set(e))).subscribe()}onRowSelect(e){console.log("Row select event: ",e),this.store.checkedItem(e.data)}onRowUnselect(e){console.log("Row unselect event: ",e),this.store.checkedItem(e.data)}onSelectAll(e){console.log("Select all event: ",e),this.store.checkAllCheckbox()}loadData(e){console.log("Lazy load event: ",e)}onSearch(e){console.log("Search text: ",e),this.store.updateFilter(y(C({},this.store.filter()),{Text:e}))}updateFilter(e,i){this.store.updateFilter(y(C({},this.store.filter()),{[e]:i}))}checkAllCheckBox(){this.store.checkAllCheckbox()}checkedItem(e){this.store.checkedItem(e)}deleteCOA(){confirm("Are you sure you want to delete selected Chart of Accounts?")&&this.#e.deleteChartAccount(this.store.IDsChecked()).pipe(V("response"),A(e=>{console.log("Delete COA Response: ",e),this.store.updateFilter(C({},this.store.filter()))})).subscribe()}onSearchEvent(e){this.store.updateFilter(y(C({},this.store.filter()),{PageNumber:1,Text:e.trim()}))}onFilterEvent(){this.dialogVisible.update(e=>!e)}onFilterOKEvent(){let{categoryID:e,pageSize:i,outletID:n,discontinued:o,accessLevel:d}=this.formFilter.value;this.store.updateFilter(y(C({},this.store.filter()),{listOutletID:n,CategoryID:e?e.key:"",PageSize:+i,Discontinued:o,AccessLevel:d})),this.isDialogFilterVisible.update(f=>!f)}onExport(){let e=y(C({},this.store.filter()),{ExportPageNumber:1,ExportPageSize:1e4});this.#e.exportChartOfAccounts(e).pipe(A(i=>{let n=i.headers;console.log("All headers:",n.keys());let o=n.get("Content-Disposition"),d=n.get("content-disposition"),f=o??d,b="download.csv";if(f){let q=f.match(/filename\*?=(?:UTF-8'')?"?([^;\r\n"]+)/i);q&&q[1]&&(b=decodeURIComponent(q[1].replace(/"/g,"")))}let k=i.body;Ki(k,b,k.type)})).subscribe()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=M({type:t,selectors:[["app-cash-of-account",8,"page"]],features:[he([Ft])],attrs:Sn,decls:7,vars:4,consts:[["actionButton",""],["content",""],["filters",""],["header",""],["body",""],["paginatorleft",""],["emptymessage",""],["pageTitle","Chart of Account",3,"search","isDialogFilterVisibleChange","filterEmitted","filterConfirmed","isSearchableInput","isDialogFilterVisible","isFilterable","scrollable"],[1,"d-flex","gap-2"],["icon","fa-solid fa-trash","label","Delete","severity","danger",3,"onClick",4,"ngIf"],["routerLink","import","severity","secondary","outlined","","label","Import","icon","fa-solid fa-download",4,"ngIf"],["outlined","","severity","secondary","label","Export","icon","fa-solid fa-upload",3,"onClick",4,"ngIf"],["class","p-button","routerLink","add",4,"ngIf"],["icon","fa-solid fa-trash","label","Delete","severity","danger",3,"onClick"],["routerLink","import","severity","secondary","outlined","","label","Import","icon","fa-solid fa-download"],["outlined","","severity","secondary","label","Export","icon","fa-solid fa-upload",3,"onClick"],["routerLink","add",1,"p-button"],[1,"fa-solid","fa-plus"],["dataKey","id","styleClass","d-flex flex-column justify-content-between h-100",1,"",3,"onLazyLoad","onRowSelect","onRowUnselect","onHeaderCheckboxToggle","onPage","lazy","value","paginator","rows","totalRecords"],["style","width: 1rem",4,"ngIf"],[1,"text-end"],[2,"width","1rem"],[4,"ngIf"],[1,"link-primary",3,"routerLink","ngClass"],[1,"link","link-primary",3,"routerLink","queryParams"],[3,"value"],["colspan","6"],["class","d-flex flex-column row-gap-3",3,"formGroup",4,"ngIf"],[1,"d-flex","flex-column","row-gap-3",3,"formGroup"],[1,"d-flex","flex-column","position-relative"],["for",""],["appendTo","body","formControlName","outletID","optionLabel","name","optionValue","id","placeholder","Select an Tags",3,"showClear","virtualScroll","virtualScrollItemSize","options"],["scrollHeight","300px","filter","","filterBy","label","appendTo","body","formControlName","categoryID","optionLabel","label","optionValue","key","placeholder","Select a Category",3,"onFocus","fluid","showClear","options"],["appendTo","body","formControlName","accessLevel","optionLabel","value","optionValue","key","placeholder","Select an Access Level",3,"showClear","options"],[1,"d-flex","flex-column"],["formControlName","pageSize","type","text","pInputText",""],[1,"d-flex","flex-wrap","gap-4"],[1,"d-flex","align-items-center","gap-2"],["name","discontinued","formControlName","discontinued","inputId","ingredient1",3,"value"],["for","ingredient1",1,"m-0"],["name","discontinued","formControlName","discontinued","inputId","ingredient2",3,"value"],["for","ingredient2",1,"m-0"]],template:function(i,n){if(i&1){let o=w();a(0,"app-main-panel",7),S("search",function(f){return _(o),g(n.onSearchEvent(f))}),Qe("isDialogFilterVisibleChange",function(f){return _(o),Ze(n.isDialogFilterVisible,f)||(n.isDialogFilterVisible=f),g(f)}),S("filterEmitted",function(){return _(o),g(n.onFilterEvent())})("filterConfirmed",function(){return _(o),g(n.onFilterOKEvent())}),u(1,Fn,6,4,"ng-template",null,0,I)(3,$n,10,5,"ng-template",null,1,I)(5,qn,1,1,"ng-template",null,2,I),r()}i&2&&(l("isSearchableInput",!0),je("isDialogFilterVisible",n.isDialogFilterVisible),l("isFilterable",!0)("scrollable",!0))},dependencies:[F,z,O,Xe,$,si,ft,ut,_t,Te,ai,oe,Y,Ie,L,B,Ae,be,ve,et,Vi,Fi,Li,Ni,K,Mi,le,ae,mt,ct,ot,nt,_e,Bi,Ri,Pe,Ee,ce,se,dt,pt],styles:[".p-card{height:100%} .p-card .p-card-body{height:inherit} .p-card .p-card-body .p-card-content{height:inherit}"],changeDetection:0})}}return t})();var Gn=["class","page"],Hn=()=>["../../"],Nt=t=>({"ng-invalid ng-dirty":t}),Un=t=>({"ng-dirty ng-invalid":t});function jn(t,s){if(t&1){let e=w();a(0,"div",5)(1,"a",6),p(2,"Cancel"),r(),a(3,"p-button",7),S("onClick",function(){_(e);let n=m();return g(n.onSubmit())}),r()()}t&2&&(c(),l("routerLink",R(1,Hn)))}function Zn(t,s){t&1&&(a(0,"div",34),p(1," Name is required "),r())}function Qn(t,s){if(t&1&&(a(0,"div"),u(1,Zn,2,0,"div",33),r()),t&2){let e=m(2);c(),l("ngIf",e.form.controls.Name.errors.required)}}function Wn(t,s){t&1&&(a(0,"div",35)(1,"p"),p(2," If you assign an tags for this account, it is only visible for users who has access to that tags. "),r()())}function Yn(t,s){if(t&1&&(a(0,"span",36),p(1),r()),t&2){let e=s.$implicit;l("pTooltip",e.name),c(),Q(" ",e.name," ")}}function Xn(t,s){t&1&&(a(0,"div",34),p(1," Code is required "),r())}function Jn(t,s){if(t&1&&(a(0,"div"),u(1,Xn,2,0,"div",33),r()),t&2){let e=m(2);c(),l("ngIf",e.form.controls.Code.errors.required)}}function eo(t,s){t&1&&(a(0,"div",34),p(1," Note is required "),r())}function to(t,s){if(t&1&&(a(0,"div"),u(1,eo,2,0,"div",33),r()),t&2){let e=m(2);c(),l("ngIf",e.form.controls.Note.errors.required)}}function io(t,s){if(t&1&&p(0),t&2){let e=s.$implicit;Q(" ",(e==null?null:e.fullLabel)||(e==null?null:e.label)||"Select a category"," ")}}function no(t,s){t&1&&(a(0,"div",34),p(1," Category is required "),r())}function oo(t,s){if(t&1&&(a(0,"div"),u(1,no,2,0,"div",33),r()),t&2){let e=m(2);c(),l("ngIf",e.form.controls.Category.errors.required)}}function ro(t,s){t&1&&(a(0,"div",34),p(1," Note is required "),r())}function ao(t,s){if(t&1&&(a(0,"div"),u(1,ro,2,0,"div",33),r()),t&2){let e=m(2);c(),l("ngIf",e.form.controls.Note.errors.required)}}function lo(t,s){t&1&&(a(0,"div",34),p(1," Note is required "),r())}function so(t,s){if(t&1&&(a(0,"div"),u(1,lo,2,0,"div",33),r()),t&2){let e=m(2);c(),l("ngIf",e.form.controls.Note.errors.required)}}function co(t,s){if(t&1&&(a(0,"p-panel",8)(1,"div",9)(2,"div",10)(3,"div",11)(4,"div",12)(5,"label",13),p(6,"Name"),r(),h(7,"input",14),u(8,Qn,2,1,"div",15),r()(),a(9,"div",11)(10,"div",16)(11,"label",13),p(12,"Tag"),r(),a(13,"span",17),h(14,"i",18),r(),u(15,Wn,3,0,"ng-template",null,2,I),r(),a(17,"p-select",19),u(18,Yn,2,2,"ng-template",null,3,I),r()()(),a(20,"div",10)(21,"div",11)(22,"div",12)(23,"label",13),p(24,"Code"),r(),h(25,"input",20),u(26,Jn,2,1,"div",15),r()(),a(27,"div",11)(28,"div",12)(29,"label",13),p(30,"Discontinued"),r(),a(31,"div",10)(32,"div",21),h(33,"p-radiobutton",22),a(34,"label",23),p(35,"No"),r()(),a(36,"div",24),h(37,"p-radiobutton",25),a(38,"label",26),p(39,"Yes"),r()()(),u(40,to,2,1,"div",15),r()()(),a(41,"div",10)(42,"div",11)(43,"div",27)(44,"label",13),p(45,"Category"),r(),a(46,"p-treeselect",28),u(47,io,1,1,"ng-template",29),r(),u(48,oo,2,1,"div",15),r()(),a(49,"div",11)(50,"div",12)(51,"label",13),p(52,"Access Type"),r(),a(53,"div",10)(54,"div",30),h(55,"p-select",31),r()(),u(56,ao,2,1,"div",15),r()()(),a(57,"div",10)(58,"div",11)(59,"div",12)(60,"label",13),p(61,"Note"),r(),h(62,"textarea",32),u(63,so,2,1,"div",15),r()(),h(64,"div",11),r()()()),t&2){let e=te(16),i=m();l("formGroup",i.form),c(7),l("ngClass",T(21,Nt,i.form.controls.Name.invalid&&(i.form.controls.Name.dirty||i.form.controls.Name.touched))),c(),l("ngIf",i.form.controls.Name.invalid&&(i.form.controls.Name.dirty||i.form.controls.Name.touched)),c(5),l("pTooltip",e),c(4),l("fluid",!0)("options",i.outlets()),c(8),l("ngClass",T(23,Nt,i.form.controls.Code.invalid&&(i.form.controls.Code.dirty||i.form.controls.Code.touched))),c(),l("ngIf",i.form.controls.Code.invalid&&(i.form.controls.Code.dirty||i.form.controls.Code.touched)),c(7),l("value",!1),c(4),l("value",!0),c(3),l("ngIf",i.form.controls.Note.errors),c(6),l("fluid",!0)("options",i.categoryOptions())("ngClass",T(25,Un,i.form.controls.Category.invalid&&(i.form.controls.Category.dirty||i.form.controls.Category.touched))),c(2),l("ngIf",i.form.controls.Category.invalid&&(i.form.controls.Category.dirty||i.form.controls.Category.touched)),c(7),l("options",i.accessTypes())("fluid",!0),c(),l("ngIf",i.form.controls.Note.errors),c(6),l("ngClass",T(27,Nt,i.form.controls.Note.invalid&&(i.form.controls.Note.dirty||i.form.controls.Note.touched)))("autoResize",!0),c(),l("ngIf",i.form.controls.Note.errors)}}var Vt=(()=>{class t{constructor(){this.route=x(ie),this.coa_service=x(X),this.coa_info=v(null),this.fb=x(Se),this.isEdit=v(!1),this.categoryOptions=v([]),this.router=x(ne),this.outlets=W(()=>this.coa_info()?this.coa_info().options.entities:[]),this.accessTypes=W(()=>{let e=["This Chart of Account can be viewed by all users.","Restricted access, only visible to users with the private role"];return this.coa_info()?this.coa_info().options.coaAccessType.map((i,n)=>y(C({},i),{description:e[n]})):[]})}findParenChilds(e,i){function n(o,d=null){for(let f of o){if(f.key===i)return{parent:d,child:f};if(f.children){let b=n(f.children,f);if(b)return b}}return null}return n(e)}generateForm(e){this.form=this.fb.group({ID:new N(e.id||""),Name:new N(e.name||"",[fe.required]),Code:new N(e.code||"",[fe.required]),Note:new N(e.note||"",[]),Balance:new N(e.balance||0),Outlet:new N(e.outletID||""),AccessType:new N(e.accessTypeID||0),Category:new N(null,[fe.required]),Bin:new N(e.bin||!1)})}ngOnInit(){this.generateForm({id:"",name:"",code:"",note:"",balance:0,outletID:"",accessTypeID:0,categoryID:null,bin:!1}),this.fetchLoader(),this.fetchCategoryOptions()}fetchLoader(){this.route.paramMap.pipe(qe(e=>{if(e.has("id")){this.isEdit.set(!0);let i=e.get("id");return this.coa_service.getChartAccountFormById(i)}else return this.coa_service.getChartAccountForm()}),V("response"),G(e=>y(C({},e),{form:y(C({},e.form),{categoryID:e.form.categoryID==="00000000-0000-0000-0000-000000000000"?"":e.form.categoryID})})),A(e=>{this.coa_info.set(e),this.generateForm(e.form)})).subscribe()}get hasIdParam(){return this.route.snapshot.paramMap.has("id")}onSubmit(){if(this.form.invalid){this.form.markAllAsTouched();return}let{AccessType:e,Balance:i,Category:n,Code:o,Name:d,Note:f,Outlet:b}=this.form.value,k;this.hasIdParam?k={id:this.coa_info().form.id,categoryID:n.key,name:d,bin:this.form.value.Bin||!1,code:o,note:f,outletID:b||null,balance:i,accessTypeID:e}:k={id:this.coa_info().form.id,categoryID:n.key,bin:this.form.value.Bin||!1,name:d,code:o,note:f,outletID:b||null,balance:i,accessTypeID:e},this.hasIdParam?this.coa_service.submitChartAccount(k).pipe(V("submitChartAccount"),A(()=>{this.form.reset(),this.router.navigate(["/pages/chart-of-account/account"])})).subscribe():this.coa_service.submitChartAccount(k).pipe(V("submitChartAccount"),A(()=>{this.form.reset(),this.router.navigate(["/pages/chart-of-account/account"])})).subscribe()}fetchCategoryOptions(){this.coa_service.fetchCategoryOptions().pipe(V("response"),A(e=>{this.categoryOptions.set(e);let i=this.findParenChilds(this.categoryOptions(),this.coa_info()?.form?.categoryID);this.form.controls.Category.setValue(i?.child)})).subscribe()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=M({type:t,selectors:[["app-coa-account-form",8,"page"]],attrs:Gn,decls:5,vars:1,consts:[["actionButton",""],["content",""],["tooltipContent",""],["item",""],["pageTitle","Chart Of Account Form",3,"hasMainWrapperPadding"],[1,"d-flex","gap-2"],["type","button",1,"p-button","p-button-secondary","p-button-outlined",3,"routerLink"],["label","Submit",3,"onClick"],["styleClass","rounded-2",3,"formGroup"],[1,"d-flex","flex-column","gap-2"],[1,"row"],[1,"col-6"],[1,"d-flex","flex-column"],["for",""],["size","small","formControlName","Name","type","text","pInputText","",3,"ngClass"],[4,"ngIf"],[1,"d-flex","align-items-baseline","gap-2"],[3,"pTooltip"],[1,"fa-solid","fa-circle-info"],["appendTo","body","formControlName","Outlet","optionLabel","name","optionValue","id","placeholder","Select Outlet",3,"fluid","options"],["size","small","formControlName","Code","type","text","pInputText","",3,"ngClass"],[1,"col-3","d-flex","align-items-center","gap-2"],["name","Bin","formControlName","Bin","inputId","ingredient1",3,"value"],["for","ingredient1",1,"m-0"],[1,"col","d-flex","align-items-center","gap-2"],["name","Bin","formControlName","Bin","inputId","ingredient2",3,"value"],["for","ingredient2",1,"m-0"],[1,"form-group","d-flex","flex-column"],["formControlName","Category","containerStyleClass","w-full","placeholder","Select a Category",1,"w-full",3,"fluid","options","ngClass"],["pTemplate","value"],[1,"col"],["optionLabel","value","optionValue","key","formControlName","AccessType","placeholder","Select Access Type",3,"options","fluid"],["pSize","small","rows","5","cols","30","pTextarea","","formControlName","Note",3,"ngClass","autoResize"],["class","invalid-feedback text-danger d-block",4,"ngIf"],[1,"invalid-feedback","text-danger","d-block"],[1,"flex","items-center"],[1,"d-inline-block","text-truncate",2,"max-width","200px",3,"pTooltip"]],template:function(i,n){i&1&&(a(0,"app-main-panel",4),u(1,jn,4,2,"ng-template",null,0,I)(3,co,65,29,"ng-template",null,1,I),r()),i&2&&l("hasMainWrapperPadding",!0)},dependencies:[$,Ae,oe,Y,Ie,be,ve,_t,F,z,O,L,B,Pe,Ee,we,K,ot,nt,zi,qi,mt,ct,_e,rt,le,ae,ce,se,dt,pt],styles:["[_nghost-%COMP%]{display:block}[_nghost-%COMP%] .p-treeselect{width:100%!important}"],changeDetection:0})}}return t})();var mo=["sublist"],po=(t,s)=>({"p-contextmenu-submenu":t,"p-contextmenu-root-list":s}),uo=()=>({"p-contextmenu-item-link":!0}),Yi=()=>({class:"p-contextmenu-submenu-icon"}),fo=()=>({exact:!1}),_o=t=>({"p-contextmenu-item-link":!0,"p-disabled":t}),go=t=>({$implicit:t});function ho(t,s){if(t&1&&h(0,"li",8),t&2){let e=m().$implicit,i=m(2);He(i.getItemProp(e,"style")),l("ngClass",i.getSeparatorItemClass(e)),P("id",i.getItemId(e))("data-pc-section","separator")}}function xo(t,s){if(t&1&&h(0,"span",19),t&2){let e=m(4).$implicit,i=m(2);l("ngClass",i.getItemProp(e,"icon"))("ngStyle",i.getItemProp(e,"iconStyle")),P("data-pc-section","icon")("aria-hidden",!0)("tabindex",-1)}}function Co(t,s){if(t&1&&(a(0,"span",20),p(1),r()),t&2){let e=m(4).$implicit,i=m(2);P("data-pc-section","label"),c(),Q(" ",i.getItemLabel(e)," ")}}function yo(t,s){if(t&1&&h(0,"span",21),t&2){let e=m(4).$implicit,i=m(2);l("innerHTML",i.getItemLabel(e),Me),P("data-pc-section","label")}}function Io(t,s){if(t&1&&h(0,"p-badge",22),t&2){let e=m(4).$implicit,i=m(2);l("styleClass",i.getItemProp(e,"badgeStyleClass"))("value",i.getItemProp(e,"badge"))}}function bo(t,s){t&1&&h(0,"AngleRightIcon"),t&2&&(Fe("p-contextmenu-submenu-icon"),P("data-pc-section","submenuicon")("aria-hidden",!0))}function vo(t,s){}function So(t,s){t&1&&u(0,vo,0,0,"ng-template",25),t&2&&l("data-pc-section","submenuicon")("aria-hidden",!0)}function To(t,s){if(t&1&&(H(0),u(1,bo,1,4,"AngleRightIcon",23)(2,So,1,2,null,24),U()),t&2){let e=m(6);c(),l("ngIf",!e.contextMenu.submenuIconTemplate&&!e.contextMenu._submenuIconTemplate),c(),l("ngTemplateOutlet",e.contextMenu.submenuIconTemplate||e.contextMenu._submenuIconTemplate)("ngTemplateOutletContext",R(3,Yi))}}function Ao(t,s){if(t&1&&(a(0,"a",15),u(1,xo,1,5,"span",16)(2,Co,2,2,"span",17)(3,yo,1,2,"ng-template",null,2,I)(5,Io,1,2,"p-badge",18)(6,To,3,4,"ng-container",11),r()),t&2){let e=te(4),i=m(3).$implicit,n=m(2);l("target",n.getItemProp(i,"target"))("ngClass",R(12,uo)),P("href",n.getItemProp(i,"url"),jt)("aria-hidden",!0)("data-automationid",n.getItemProp(i,"automationId"))("data-pc-section","action")("tabindex",-1),c(),l("ngIf",n.getItemProp(i,"icon")),c(),l("ngIf",n.getItemProp(i,"escape"))("ngIfElse",e),c(3),l("ngIf",n.getItemProp(i,"badge")),c(),l("ngIf",n.isItemGroup(i))}}function wo(t,s){if(t&1&&h(0,"span",19),t&2){let e=m(4).$implicit,i=m(2);l("ngClass",i.getItemProp(e,"icon"))("ngStyle",i.getItemProp(e,"iconStyle")),P("data-pc-section","icon")("aria-hidden",!0)("tabindex",-1)}}function Eo(t,s){if(t&1&&(a(0,"span",20),p(1),r()),t&2){let e=m(4).$implicit,i=m(2);P("data-pc-section","label"),c(),Q(" ",i.getItemLabel(e)," ")}}function Po(t,s){if(t&1&&h(0,"span",21),t&2){let e=m(4).$implicit,i=m(2);l("innerHTML",i.getItemLabel(e),Me),P("data-pc-section","label")}}function ko(t,s){if(t&1&&h(0,"p-badge",22),t&2){let e=m(4).$implicit,i=m(2);l("styleClass",i.getItemProp(e,"badgeStyleClass"))("value",i.getItemProp(e,"badge"))}}function Mo(t,s){t&1&&h(0,"AngleRightIcon"),t&2&&(Fe("p-contextmenu-submenu-icon"),P("data-pc-section","submenuicon")("aria-hidden",!0))}function Oo(t,s){}function Fo(t,s){t&1&&u(0,Oo,0,0,"ng-template",25),t&2&&l("data-pc-section","submenuicon")("aria-hidden",!0)}function Lo(t,s){if(t&1&&(H(0),u(1,Mo,1,4,"AngleRightIcon",23)(2,Fo,1,2,null,24),U()),t&2){let e=m(6);c(),l("ngIf",!e.contextMenu.submenuIconTemplate&&!e.contextMenu._submenuIconTemplate),c(),l("ngTemplateOutlet",!e.contextMenu.submenuIconTemplate||!e.contextMenu._submenuIconTemplate)("ngTemplateOutletContext",R(3,Yi))}}function No(t,s){if(t&1&&(a(0,"a",26),u(1,wo,1,5,"span",16)(2,Eo,2,2,"span",17)(3,Po,1,2,"ng-template",null,2,I)(5,ko,1,2,"p-badge",18)(6,Lo,3,4,"ng-container",11),r()),t&2){let e=te(4),i=m(3).$implicit,n=m(2);l("routerLink",n.getItemProp(i,"routerLink"))("queryParams",n.getItemProp(i,"queryParams"))("routerLinkActiveOptions",n.getItemProp(i,"routerLinkActiveOptions")||R(20,fo))("target",n.getItemProp(i,"target"))("ngClass",T(21,_o,n.getItemProp(i,"disabled")))("fragment",n.getItemProp(i,"fragment"))("queryParamsHandling",n.getItemProp(i,"queryParamsHandling"))("preserveFragment",n.getItemProp(i,"preserveFragment"))("skipLocationChange",n.getItemProp(i,"skipLocationChange"))("replaceUrl",n.getItemProp(i,"replaceUrl"))("state",n.getItemProp(i,"state")),P("data-automationid",n.getItemProp(i,"automationId"))("tabindex",-1)("aria-hidden",!0)("data-pc-section","action"),c(),l("ngIf",n.getItemProp(i,"icon")),c(),l("ngIf",n.getItemProp(i,"escape"))("ngIfElse",e),c(3),l("ngIf",n.getItemProp(i,"badge")),c(),l("ngIf",n.isItemGroup(i))}}function Vo(t,s){if(t&1&&(H(0),u(1,Ao,7,13,"a",13)(2,No,7,23,"a",14),U()),t&2){let e=m(2).$implicit,i=m(2);c(),l("ngIf",!i.getItemProp(e,"routerLink")),c(),l("ngIf",i.getItemProp(e,"routerLink"))}}function Do(t,s){}function Ro(t,s){t&1&&u(0,Do,0,0,"ng-template")}function Bo(t,s){if(t&1&&(H(0),u(1,Ro,1,0,null,24),U()),t&2){let e=m(2).$implicit,i=m(2);c(),l("ngTemplateOutlet",i.itemTemplate)("ngTemplateOutletContext",T(2,go,e.item))}}function $o(t,s){if(t&1){let e=w();a(0,"p-contextmenu-sub",27),S("itemClick",function(n){_(e);let o=m(4);return g(o.itemClick.emit(n))})("itemMouseEnter",function(n){_(e);let o=m(4);return g(o.onItemMouseEnter(n))}),r()}if(t&2){let e=m(2).$implicit,i=m(2);l("items",e.items)("itemTemplate",i.itemTemplate)("menuId",i.menuId)("visible",i.isItemActive(e)&&i.isItemGroup(e))("activeItemPath",i.activeItemPath)("focusedItemId",i.focusedItemId)("level",i.level+1)}}function Ko(t,s){if(t&1){let e=w();a(0,"li",9,1)(2,"div",10),S("click",function(n){_(e);let o=m().$implicit,d=m(2);return g(d.onItemClick(n,o))})("mouseenter",function(n){_(e);let o=m().$implicit,d=m(2);return g(d.onItemMouseEnter({$event:n,processedItem:o}))}),u(3,Vo,3,2,"ng-container",11)(4,Bo,2,4,"ng-container",11),r(),u(5,$o,1,7,"p-contextmenu-sub",12),r()}if(t&2){let e=m(),i=e.$implicit,n=e.index,o=m(2);Fe(o.getItemProp(i,"styleClass")),l("ngStyle",o.getItemProp(i,"style"))("ngClass",o.getItemClass(i))("tooltipOptions",o.getItemProp(i,"tooltipOptions")),P("id",o.getItemId(i))("data-pc-section","menuitem")("data-p-highlight",o.isItemActive(i))("data-p-focused",o.isItemFocused(i))("data-p-disabled",o.isItemDisabled(i))("aria-label",o.getItemLabel(i))("aria-disabled",o.isItemDisabled(i)||void 0)("aria-haspopup",o.isItemGroup(i)&&!o.getItemProp(i,"to")?"menu":void 0)("aria-expanded",o.isItemGroup(i)?o.isItemActive(i):void 0)("aria-level",o.level+1)("aria-setsize",o.getAriaSetSize())("aria-posinset",o.getAriaPosInset(n)),c(2),P("data-pc-section","content"),c(),l("ngIf",!o.itemTemplate),c(),l("ngIf",o.itemTemplate),c(),l("ngIf",o.isItemVisible(i)&&o.isItemGroup(i))}}function qo(t,s){if(t&1&&u(0,ho,1,5,"li",6)(1,Ko,6,21,"li",7),t&2){let e=s.$implicit,i=m(2);l("ngIf",i.isItemVisible(e)&&i.getItemProp(e,"separator")),c(),l("ngIf",i.isItemVisible(e)&&!i.getItemProp(e,"separator"))}}function zo(t,s){if(t&1){let e=w();a(0,"ul",4,0),S("@overlayAnimation.start",function(n){_(e);let o=te(1),d=m();return g(d.onEnter(n,o))})("keydown",function(n){_(e);let o=m();return g(o.menuKeydown.emit(n))})("focus",function(n){_(e);let o=m();return g(o.menuFocus.emit(n))})("blur",function(n){_(e);let o=m();return g(o.menuBlur.emit(n))}),u(2,qo,2,2,"ng-template",5),r()}if(t&2){let e=m();l("ngClass",ei(10,po,!e.root,e.root))("@overlayAnimation",e.visible)("tabindex",e.tabindex),P("id",e.menuId+"_list")("aria-label",e.ariaLabel)("aria-labelledBy",e.ariaLabelledBy)("aria-activedescendant",e.focusedItemId)("aria-orientation","vertical")("data-pc-section","menu"),c(2),l("ngForOf",e.items)}}var Go=["item"],Ho=["submenuicon"],Uo=["rootmenu"],jo=["container"],Zo=t=>({"p-contextmenu p-component":!0,"p-contextmenu-mobile":t}),Qo=()=>({value:"visible"});function Wo(t,s){if(t&1){let e=w();a(0,"div",3,0),S("@overlayAnimation.start",function(n){_(e);let o=m();return g(o.onOverlayAnimationStart(n))})("@overlayAnimation.done",function(n){_(e);let o=m();return g(o.onOverlayAnimationEnd(n))}),a(2,"p-contextmenu-sub",4,1),S("itemClick",function(n){_(e);let o=m();return g(o.onItemClick(n))})("menuFocus",function(n){_(e);let o=m();return g(o.onMenuFocus(n))})("menuBlur",function(n){_(e);let o=m();return g(o.onMenuBlur(n))})("menuKeydown",function(n){_(e);let o=m();return g(o.onKeyDown(n))})("itemMouseEnter",function(n){_(e);let o=m();return g(o.onItemMouseEnter(n))}),r()()}if(t&2){let e=m();Fe(e.styleClass),l("ngClass",T(20,Zo,e.queryMatches))("ngStyle",e.style)("@overlayAnimation",R(22,Qo)),P("data-pc-section","root")("data-pc-name","contextmenu")("id",e.id),c(2),l("root",!0)("items",e.processedItems)("itemTemplate",e.itemTemplate||e._itemTemplate)("menuId",e.id)("tabindex",e.disabled?-1:e.tabindex)("ariaLabel",e.ariaLabel)("ariaLabelledBy",e.ariaLabelledBy)("baseZIndex",e.baseZIndex)("autoZIndex",e.autoZIndex)("visible",e.submenuVisible())("focusedItemId",e.focused?e.focusedItemId:void 0)("activeItemPath",e.activeItemPath())}}var Yo=({dt:t})=>`
2
+ .p-contextmenu {
3
+ position: absolute;
4
+ background: ${t("contextmenu.background")};
5
+ color: ${t("contextmenu.color")};
6
+ border: 1px solid ${t("contextmenu.border.color")};
7
+ border-radius: ${t("contextmenu.border.radius")};
8
+ box-shadow: ${t("contextmenu.shadow")};
9
+ min-width: 12.5rem;
10
+ }
11
+
12
+ .p-contextmenu-root-list,
13
+ .p-contextmenu-submenu {
14
+ margin: 0;
15
+ padding: ${t("contextmenu.list.padding")};
16
+ list-style: none;
17
+ outline: 0 none;
18
+ display: flex;
19
+ flex-direction: column;
20
+ gap: ${t("contextmenu.list.gap")};
21
+ }
22
+
23
+ .p-contextmenu-submenu {
24
+ position: absolute;
25
+ display: flex;
26
+ flex-direction: column;
27
+ min-width: 100%;
28
+ z-index: 1;
29
+ background: ${t("contextmenu.background")};
30
+ color: ${t("contextmenu.color")};
31
+ border: 1px solid ${t("contextmenu.border.color")};
32
+ border-radius: ${t("contextmenu.border.radius")};
33
+ box-shadow: ${t("contextmenu.shadow")};
34
+ }
35
+
36
+ .p-contextmenu-item {
37
+ position: relative;
38
+ }
39
+
40
+ .p-contextmenu-item-content {
41
+ transition: background ${t("contextmenu.transition.duration")}, color ${t("contextmenu.transition.duration")};
42
+ border-radius: ${t("contextmenu.item.border.radius")};
43
+ color: ${t("contextmenu.item.color")};
44
+ }
45
+
46
+ .p-contextmenu-item-link {
47
+ cursor: pointer;
48
+ display: flex;
49
+ align-items: center;
50
+ text-decoration: none;
51
+ overflow: hidden;
52
+ position: relative;
53
+ color: inherit;
54
+ padding: ${t("contextmenu.item.padding")};
55
+ gap: ${t("contextmenu.item.gap")};
56
+ user-select: none;
57
+ }
58
+
59
+ .p-contextmenu-item-label {
60
+ line-height: 1;
61
+ }
62
+
63
+ .p-contextmenu-item-icon {
64
+ color: ${t("contextmenu.item.icon.color")};
65
+ }
66
+
67
+ .p-contextmenu-submenu-icon {
68
+ color: ${t("contextmenu.submenu.icon.color")};
69
+ margin-left: auto;
70
+ font-size: ${t("contextmenu.submenu.icon.size")};
71
+ width: ${t("contextmenu.submenu.icon.size")};
72
+ height: ${t("contextmenu.submenu.icon.size")};
73
+ }
74
+
75
+ .p-contextmenu-submenu-icon:dir(rtl) {
76
+ margin-left: 0;
77
+ margin-right: auto;
78
+ }
79
+
80
+ .p-contextmenu-item.p-focus > .p-contextmenu-item-content {
81
+ color: ${t("contextmenu.item.focus.color")};
82
+ background: ${t("contextmenu.item.focus.background")};
83
+ }
84
+
85
+ .p-contextmenu-item.p-focus > .p-contextmenu-item-content .p-contextmenu-item-icon {
86
+ color: ${t("contextmenu.item.icon.focus.color")};
87
+ }
88
+
89
+ .p-contextmenu-item.p-focus > .p-contextmenu-item-content .p-contextmenu-submenu-icon {
90
+ color: ${t("contextmenu.submenu.icon.focus.color")};
91
+ }
92
+
93
+ .p-contextmenu-item:not(.p-disabled) > .p-contextmenu-item-content:hover {
94
+ color: ${t("contextmenu.item.focus.color")};
95
+ background: ${t("contextmenu.item.focus.background")};
96
+ }
97
+
98
+ .p-contextmenu-item:not(.p-disabled) > .p-contextmenu-item-content:hover .p-contextmenu-item-icon {
99
+ color: ${t("contextmenu.item.icon.focus.color")};
100
+ }
101
+
102
+ .p-contextmenu-item:not(.p-disabled) > .p-contextmenu-item-content:hover .p-contextmenu-submenu-icon {
103
+ color: ${t("contextmenu.submenu.icon.focus.color")};
104
+ }
105
+
106
+ .p-contextmenu-item-active > .p-contextmenu-item-content {
107
+ color: ${t("contextmenu.item.active.color")};
108
+ background: ${t("contextmenu.item.active.background")};
109
+ }
110
+
111
+ .p-contextmenu-item-active > .p-contextmenu-item-content .p-contextmenu-item-icon {
112
+ color: ${t("contextmenu.item.icon.active.color")};
113
+ }
114
+
115
+ .p-contextmenu-item-active > .p-contextmenu-item-content .p-contextmenu-submenu-icon {
116
+ color: ${t("contextmenu.submenu.icon.active.color")};
117
+ }
118
+
119
+ .p-contextmenu-separator {
120
+ border-top: 1px solid ${t("contextmenu.separator.border.color")};
121
+ }
122
+
123
+ .p-contextmenu-enter-from,
124
+ .p-contextmenu-leave-active {
125
+ opacity: 0;
126
+ }
127
+
128
+ .p-contextmenu-enter-active {
129
+ transition: opacity 250ms;
130
+ }
131
+
132
+ .p-contextmenu-mobile .p-contextmenu-submenu {
133
+ position: static;
134
+ box-shadow: none;
135
+ border: 0 none;
136
+ padding-left: ${t("tieredmenu.submenu.mobile.indent")};
137
+ padding-right: 0;
138
+ }
139
+
140
+ .p-contextmenu-mobile .p-contextmenu-submenu-icon {
141
+ transition: transform 0.2s;
142
+ transform: rotate(90deg);
143
+ }
144
+
145
+ .p-contextmenu-mobile .p-contextmenu-item-active > .p-contextmenu-item-content .p-contextmenu-submenu-icon {
146
+ transform: rotate(-90deg);
147
+ }
148
+
149
+ /* For PrimeNG */
150
+ .p-contextmenu-submenu-icon.p-iconwrapper {
151
+ margin-left: auto;
152
+ }
153
+
154
+ .p-contextmenu-submenu-icon.p-iconwrapper:dir(rtl) {
155
+ margin-left: 0;
156
+ margin-right: auto;
157
+ }
158
+ `,Xo={root:"p-contextmenu p-component",rootList:"p-contextmenu-root-list",item:({instance:t,processedItem:s})=>["p-contextmenu-item",{"p-contextmenu-item-active":t.isItemActive(s),"p-focus":t.isItemFocused(s),"p-disabled":t.isItemDisabled(s)}],itemContent:"p-contextmenu-item-content",itemLink:"p-contextmenu-item-link",itemIcon:"p-contextmenu-item-icon",itemLabel:"p-contextmenu-item-label",submenuIcon:"p-contextmenu-submenu-icon",submenu:"p-contextmenu-submenu",separator:"p-contextmenu-separator"},Wi=(()=>{class t extends Ii{name="contextmenu";theme=Yo;classes=Xo;static \u0275fac=(()=>{let e;return function(n){return(e||(e=Ge(t)))(n||t)}})();static \u0275prov=ze({token:t,factory:t.\u0275fac})}return t})();var Jo=(()=>{class t extends wt{contextMenu;visible=!1;items;itemTemplate;root=!1;autoZIndex=!0;baseZIndex=0;popup;menuId;ariaLabel;ariaLabelledBy;level=0;focusedItemId;activeItemPath;tabindex=0;itemClick=new ee;itemMouseEnter=new ee;menuFocus=new ee;menuBlur=new ee;menuKeydown=new ee;sublistViewChild;constructor(e){super(),this.contextMenu=e}getItemProp(e,i,n=null){return e&&e.item?At(e.item[i],n):void 0}getItemId(e){return e.item&&e.item?.id?e.item.id:`${this.menuId}_${e.key}`}getItemKey(e){return this.getItemId(e)}getItemClass(e){return y(C({},this.getItemProp(e,"class")),{"p-contextmenu-item":!0,"p-contextmenu-item-active":this.isItemActive(e),"p-focus":this.isItemFocused(e),"p-disabled":this.isItemDisabled(e)})}getItemLabel(e){return this.getItemProp(e,"label")}getSeparatorItemClass(e){return y(C({},this.getItemProp(e,"class")),{"p-contextmenu-separator":!0})}getAriaSetSize(){return this.items.filter(e=>this.isItemVisible(e)&&!this.getItemProp(e,"separator")).length}getAriaPosInset(e){return e-this.items.slice(0,e).filter(i=>this.isItemVisible(i)&&this.getItemProp(i,"separator")).length+1}isItemVisible(e){return this.getItemProp(e,"visible")!==!1}isItemActive(e){if(this.activeItemPath)return this.activeItemPath.some(i=>i.key===e.key)}isItemDisabled(e){return this.getItemProp(e,"disabled")}isItemFocused(e){return this.focusedItemId===this.getItemId(e)}isItemGroup(e){return re(e.items)}onItemMouseEnter(e){let{event:i,processedItem:n}=e;this.itemMouseEnter.emit({originalEvent:i,processedItem:n})}onItemClick(e,i){this.getItemProp(i,"command",{originalEvent:e,item:i.item}),this.itemClick.emit({originalEvent:e,processedItem:i,isFocus:!0})}onEnter(e,i){if(e.fromState==="void"&&e.toState){let n=e.element;this.position(n)}}position(e){let i=e.parentElement.parentElement,n=ui(e.parentElement.parentElement),o=bt(),d=e.offsetParent?e.offsetWidth:vt(e),f=ci(i.children[0]);e.style.top="0px",parseInt(n.left,10)+f+d>o.width-pi()?e.style.left=-1*d+"px":e.style.left=f+"px"}static \u0275fac=function(i){return new(i||t)(xt(Gt(()=>ht)))};static \u0275cmp=M({type:t,selectors:[["p-contextMenuSub"],["p-contextmenu-sub"]],viewQuery:function(i,n){if(i&1&&pe(mo,5),i&2){let o;j(o=Z())&&(n.sublistViewChild=o.first)}},inputs:{visible:[2,"visible","visible",ue],items:"items",itemTemplate:"itemTemplate",root:[2,"root","root",ue],autoZIndex:[2,"autoZIndex","autoZIndex",ue],baseZIndex:[2,"baseZIndex","baseZIndex",Ce],popup:[2,"popup","popup",ue],menuId:"menuId",ariaLabel:"ariaLabel",ariaLabelledBy:"ariaLabelledBy",level:[2,"level","level",Ce],focusedItemId:"focusedItemId",activeItemPath:"activeItemPath",tabindex:[2,"tabindex","tabindex",Ce]},outputs:{itemClick:"itemClick",itemMouseEnter:"itemMouseEnter",menuFocus:"menuFocus",menuBlur:"menuBlur",menuKeydown:"menuKeydown"},features:[Oe],decls:1,vars:1,consts:[["sublist",""],["listItem",""],["htmlLabel",""],["role","menu",3,"ngClass","tabindex","keydown","focus","blur",4,"ngIf"],["role","menu",3,"keydown","focus","blur","ngClass","tabindex"],["ngFor","",3,"ngForOf"],["role","separator",3,"style","ngClass",4,"ngIf"],["role","menuitem","pTooltip","",3,"ngStyle","ngClass","class","tooltipOptions",4,"ngIf"],["role","separator",3,"ngClass"],["role","menuitem","pTooltip","",3,"ngStyle","ngClass","tooltipOptions"],[1,"p-contextmenu-item-content",3,"click","mouseenter"],[4,"ngIf"],[3,"items","itemTemplate","menuId","visible","activeItemPath","focusedItemId","level","itemClick","itemMouseEnter",4,"ngIf"],["pRipple","",3,"target","ngClass",4,"ngIf"],["pRipple","",3,"routerLink","queryParams","routerLinkActiveOptions","target","ngClass","fragment","queryParamsHandling","preserveFragment","skipLocationChange","replaceUrl","state",4,"ngIf"],["pRipple","",3,"target","ngClass"],["class","p-contextmenu-item-icon",3,"ngClass","ngStyle",4,"ngIf"],["class","p-contextmenu-item-label",4,"ngIf","ngIfElse"],[3,"styleClass","value",4,"ngIf"],[1,"p-contextmenu-item-icon",3,"ngClass","ngStyle"],[1,"p-contextmenu-item-label"],[1,"p-contextmenu-item-label",3,"innerHTML"],[3,"styleClass","value"],[3,"class",4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"data-pc-section","aria-hidden"],["pRipple","",3,"routerLink","queryParams","routerLinkActiveOptions","target","ngClass","fragment","queryParamsHandling","preserveFragment","skipLocationChange","replaceUrl","state"],[3,"itemClick","itemMouseEnter","items","itemTemplate","menuId","visible","activeItemPath","focusedItemId","level"]],template:function(i,n){i&1&&u(0,zo,3,13,"ul",3),i&2&&l("ngIf",n.root?!0:n.visible)},dependencies:[t,F,z,Ye,O,ii,Ct,L,B,vi,_e,rt,bi,Pt,Ti,De],encapsulation:2,data:{animation:[yt("overlayAnimation",[Ve(":enter",[Ne({opacity:0})]),Ve(":leave",[Ne({opacity:0})])])]}})}return t})(),ht=(()=>{class t extends wt{overlayService;set model(e){this._model=e,this._processedItems=this.createProcessedItems(this._model||[])}get model(){return this._model}triggerEvent="contextmenu";target;global;style;styleClass;appendTo;autoZIndex=!0;baseZIndex=0;id;breakpoint="960px";ariaLabel;ariaLabelledBy;pressDelay=500;onShow=new ee;onHide=new ee;rootmenu;containerViewChild;container;outsideClickListener;resizeListener;triggerEventListener;documentClickListener;documentTriggerListener;touchEndListener;pageX;pageY;visible=v(!1);relativeAlign;window;focused=!1;activeItemPath=v([]);focusedItemInfo=v({index:-1,level:0,parentKey:"",item:null});submenuVisible=v(!1);searchValue="";searchTimeout;_processedItems;_model;pressTimer;matchMediaListener;query;queryMatches;_componentStyle=x(Wi);get visibleItems(){let e=this.activeItemPath().find(i=>i.key===this.focusedItemInfo().parentKey);return e?e.items:this.processedItems}get processedItems(){return(!this._processedItems||!this._processedItems.length)&&(this._processedItems=this.createProcessedItems(this.model||[])),this._processedItems}get focusedItemId(){let e=this.focusedItemInfo();return e.item&&e.item?.id?e.item.id:e.index!==-1?`${this.id}${re(e.parentKey)?"_"+e.parentKey:""}_${e.index}`:null}constructor(e){super(),this.overlayService=e,We(()=>{let i=this.activeItemPath();re(i)?this.bindGlobalListeners():this.visible()||this.unbindGlobalListeners()})}ngOnInit(){super.ngOnInit(),this.id=this.id||xi("pn_id_"),this.bindMatchMediaListener(),this.bindTriggerEventListener()}isMobile(){return _i()||fi()}bindTriggerEventListener(){Le(this.platformId)&&(this.triggerEventListener||(this.isMobile()?this.global?(this.triggerEventListener=this.renderer.listen(this.document,"touchstart",this.onTouchStart.bind(this)),this.touchEndListener=this.renderer.listen(this.document,"touchend",this.onTouchEnd.bind(this))):this.target&&(this.triggerEventListener=this.renderer.listen(this.target,"touchstart",this.onTouchStart.bind(this)),this.touchEndListener=this.renderer.listen(this.target,"touchend",this.onTouchEnd.bind(this))):this.global?this.triggerEventListener=this.renderer.listen(this.document,this.triggerEvent,e=>{this.show(e)}):this.target&&(this.triggerEventListener=this.renderer.listen(this.target,this.triggerEvent,e=>{this.show(e)}))))}bindGlobalListeners(){if(Le(this.platformId)){if(!this.documentClickListener){let e=this.el?this.el.nativeElement.ownerDocument:"document";this.documentClickListener=this.renderer.listen(e,"click",i=>{this.containerViewChild.nativeElement.offsetParent&&this.isOutsideClicked(i)&&!i.ctrlKey&&i.button!==2&&this.triggerEvent!=="click"&&this.hide()}),this.documentTriggerListener=this.renderer.listen(e,this.triggerEvent,i=>{this.containerViewChild.nativeElement.offsetParent&&this.isOutsideClicked(i)&&this.hide()})}this.resizeListener||(this.resizeListener=this.renderer.listen(this.document.defaultView,"resize",e=>{this.hide()}))}}itemTemplate;submenuIconTemplate;templates;_submenuIconTemplate;_itemTemplate;ngAfterContentInit(){this.templates?.forEach(e=>{switch(e.getType()){case"submenuicon":this._submenuIconTemplate=e.template;break;case"item":this._itemTemplate=e.template;break;default:this._itemTemplate=e.template;break}})}createProcessedItems(e,i=0,n={},o=""){let d=[];return e&&e.forEach((f,b)=>{let k=(o!==""?o+"_":"")+b,q={item:f,index:b,level:i,key:k,parent:n,parentKey:o};q.items=this.createProcessedItems(f.items,i+1,q,k),d.push(q)}),d}bindMatchMediaListener(){if(Le(this.platformId)&&!this.matchMediaListener){let e=window.matchMedia(`(max-width: ${this.breakpoint})`);this.query=e,this.queryMatches=e.matches,this.matchMediaListener=()=>{this.queryMatches=e.matches},e.addEventListener("change",this.matchMediaListener)}}unbindMatchMediaListener(){this.matchMediaListener&&(this.query.removeEventListener("change",this.matchMediaListener),this.matchMediaListener=null)}getItemProp(e,i){return e?At(e[i]):void 0}getProccessedItemLabel(e){return e?this.getItemLabel(e.item):void 0}getItemLabel(e){return this.getItemProp(e,"label")}isProcessedItemGroup(e){return e&&re(e.items)}isSelected(e){return this.activeItemPath().some(i=>i.key===e.key)}isValidSelectedItem(e){return this.isValidItem(e)&&this.isSelected(e)}isValidItem(e){return!!e&&!this.isItemDisabled(e.item)&&!this.isItemSeparator(e.item)}isItemDisabled(e){return this.getItemProp(e,"disabled")}isItemSeparator(e){return this.getItemProp(e,"separator")}isItemMatched(e){return this.isValidItem(e)&&this.getProccessedItemLabel(e).toLocaleLowerCase().startsWith(this.searchValue.toLocaleLowerCase())}isProccessedItemGroup(e){return e&&re(e.items)}onItemClick(e){let{processedItem:i}=e,n=this.isProcessedItemGroup(i);if(this.isSelected(i)){let{index:d,key:f,level:b,parentKey:k,item:q}=i;this.activeItemPath.set(this.activeItemPath().filter(Be=>f!==Be.key&&f.startsWith(Be.key))),this.focusedItemInfo.set({index:d,level:b,parentKey:k,item:q}),it(this.rootmenu.sublistViewChild.nativeElement)}else n?this.onItemChange(e):this.hide()}onItemMouseEnter(e){this.onItemChange(e,"hover")}onKeyDown(e){let i=e.metaKey||e.ctrlKey;switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e);break;case"ArrowLeft":this.onArrowLeftKey(e);break;case"ArrowRight":this.onArrowRightKey(e);break;case"Home":this.onHomeKey(e);break;case"End":this.onEndKey(e);break;case"Space":this.onSpaceKey(e);break;case"Enter":this.onEnterKey(e);break;case"Escape":this.onEscapeKey(e);break;case"Tab":this.onTabKey(e);break;case"PageDown":case"PageUp":case"Backspace":case"ShiftLeft":case"ShiftRight":break;default:!i&&hi(e.key)&&this.searchItems(e,e.key);break}}onArrowDownKey(e){let i=this.focusedItemInfo().index!==-1?this.findNextItemIndex(this.focusedItemInfo().index):this.findFirstFocusedItemIndex();this.changeFocusedItemIndex(e,i),e.preventDefault()}onArrowRightKey(e){let i=this.visibleItems[this.focusedItemInfo().index];this.isProccessedItemGroup(i)&&(this.onItemChange({originalEvent:e,processedItem:i}),this.focusedItemInfo.set({index:-1,parentKey:i.key,item:i.item}),this.searchValue="",this.onArrowDownKey(e)),e.preventDefault()}onArrowUpKey(e){if(e.altKey){if(this.focusedItemInfo().index!==-1){let i=this.visibleItems[this.focusedItemInfo().index];!this.isProccessedItemGroup(i)&&this.onItemChange({originalEvent:e,processedItem:i})}this.hide(),e.preventDefault()}else{let i=this.focusedItemInfo().index!==-1?this.findPrevItemIndex(this.focusedItemInfo().index):this.findLastFocusedItemIndex();this.changeFocusedItemIndex(e,i),e.preventDefault()}}onArrowLeftKey(e){let i=this.visibleItems[this.focusedItemInfo().index],n=this.activeItemPath().find(f=>f.key===i.parentKey);St(i.parent)||(this.focusedItemInfo.set({index:-1,parentKey:n?n.parentKey:"",item:i.item}),this.searchValue="",this.onArrowDownKey(e));let d=this.activeItemPath().filter(f=>f.parentKey!==this.focusedItemInfo().parentKey);this.activeItemPath.set(d),e.preventDefault()}onHomeKey(e){this.changeFocusedItemIndex(e,this.findFirstItemIndex()),e.preventDefault()}onEndKey(e){this.changeFocusedItemIndex(e,this.findLastItemIndex()),e.preventDefault()}onSpaceKey(e){this.onEnterKey(e)}onEscapeKey(e){this.hide();let i=this.findVisibleItem(this.findFirstFocusedItemIndex()),n=this.focusedItemInfo();this.focusedItemInfo.set(y(C({},n),{index:this.findFirstFocusedItemIndex(),item:i.item})),e.preventDefault()}onTabKey(e){if(this.focusedItemInfo().index!==-1){let i=this.visibleItems[this.focusedItemInfo().index];!this.isProccessedItemGroup(i)&&this.onItemChange({originalEvent:e,processedItem:i})}this.hide()}onEnterKey(e){if(this.focusedItemInfo().index!==-1){let i=tt(this.rootmenu.el.nativeElement,`li[id="${`${this.focusedItemId}`}"]`),n=i&&tt(i,'a[data-pc-section="action"]');n?n.click():i&&i.click();let o=this.visibleItems[this.focusedItemInfo().index];if(!this.isProccessedItemGroup(o)){let f=this.focusedItemInfo();this.focusedItemInfo.set(y(C({},f),{index:this.findFirstFocusedItemIndex()}))}}e.preventDefault()}onItemChange(e,i){let{processedItem:n,isFocus:o}=e;if(St(n))return;let{index:d,key:f,level:b,parentKey:k,items:q}=n,Be=re(q),Bt=this.activeItemPath().filter($t=>$t.parentKey!==k&&$t.parentKey!==f);Be&&(Bt.push(n),this.submenuVisible.set(!0)),this.focusedItemInfo.set({index:d,level:b,parentKey:k,item:n.item}),o&&it(this.rootmenu.sublistViewChild.nativeElement),!(i==="hover"&&this.queryMatches)&&this.activeItemPath.set(Bt)}onMenuFocus(e){this.focused=!0;let i=this.focusedItemInfo().index!==-1?this.focusedItemInfo():{index:-1,level:0,parentKey:"",item:null};this.focusedItemInfo.set(i)}onMenuBlur(e){this.focused=!1,this.focusedItemInfo.set({index:-1,level:0,parentKey:"",item:null}),this.searchValue=""}onOverlayAnimationStart(e){switch(e.toState){case"visible":this.container=e.element,this.position(),this.moveOnTop(),this.appendOverlay(),this.bindGlobalListeners(),it(this.rootmenu.sublistViewChild.nativeElement);break}}onOverlayAnimationEnd(e){switch(e.toState){case"void":this.onOverlayHide();break}}appendOverlay(){this.appendTo&&(this.appendTo==="body"?this.renderer.appendChild(this.document.body,this.containerViewChild.nativeElement):mi(this.appendTo,this.containerViewChild.nativeElement))}moveOnTop(){this.autoZIndex&&this.containerViewChild&&Et.set("menu",this.containerViewChild.nativeElement,this.baseZIndex+this.config.zIndex.menu)}onOverlayHide(){this.unbindGlobalListeners(),this.cd.destroyed||(this.target=null),this.container&&this.autoZIndex&&Et.clear(this.container),this.container=null}onTouchStart(e){this.pressTimer=setTimeout(()=>{this.show(e)},this.pressDelay)}onTouchEnd(){clearTimeout(this.pressTimer)}hide(){this.visible.set(!1),this.onHide.emit(),this.activeItemPath.set([]),this.focusedItemInfo.set({index:-1,level:0,parentKey:"",item:null})}toggle(e){this.visible()?this.hide():this.show(e)}show(e){this.activeItemPath.set([]),this.focusedItemInfo.set({index:-1,level:0,parentKey:"",item:null}),this.pageX=e.pageX,this.pageY=e.pageY,this.onShow.emit(),this.visible()?this.position():this.visible.set(!0),e.stopPropagation(),e.preventDefault()}position(){let e=this.pageX+1,i=this.pageY+1,n=this.containerViewChild.nativeElement.offsetParent?this.containerViewChild.nativeElement.offsetWidth:vt(this.containerViewChild.nativeElement),o=this.containerViewChild.nativeElement.offsetParent?this.containerViewChild.nativeElement.offsetHeight:di(this.containerViewChild.nativeElement),d=bt();e+n-this.document.scrollingElement.scrollLeft>d.width&&(e-=n),i+o-this.document.scrollingElement.scrollTop>d.height&&(i-=o),e<this.document.scrollingElement.scrollLeft&&(e=this.document.scrollingElement.scrollLeft),i<this.document.scrollingElement.scrollTop&&(i=this.document.scrollingElement.scrollTop),this.containerViewChild.nativeElement.style.left=e+"px",this.containerViewChild.nativeElement.style.top=i+"px"}searchItems(e,i){this.searchValue=(this.searchValue||"")+i;let n=-1,o=!1;return this.focusedItemInfo().index!==-1?(n=this.visibleItems.slice(this.focusedItemInfo().index).findIndex(d=>this.isItemMatched(d)),n=n===-1?this.visibleItems.slice(0,this.focusedItemInfo().index).findIndex(d=>this.isItemMatched(d)):n+this.focusedItemInfo().index):n=this.visibleItems.findIndex(d=>this.isItemMatched(d)),n!==-1&&(o=!0),n===-1&&this.focusedItemInfo().index===-1&&(n=this.findFirstFocusedItemIndex()),n!==-1&&this.changeFocusedItemIndex(e,n),this.searchTimeout&&clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout(()=>{this.searchValue="",this.searchTimeout=null},500),o}findVisibleItem(e){return re(this.visibleItems)?this.visibleItems[e]:null}findLastFocusedItemIndex(){let e=this.findSelectedItemIndex();return e<0?this.findLastItemIndex():e}findLastItemIndex(){return Tt(this.visibleItems,e=>this.isValidItem(e))}findPrevItemIndex(e){let i=e>0?Tt(this.visibleItems.slice(0,e),n=>this.isValidItem(n)):-1;return i>-1?i:e}findNextItemIndex(e){let i=e<this.visibleItems.length-1?this.visibleItems.slice(e+1).findIndex(n=>this.isValidItem(n)):-1;return i>-1?i+e+1:e}findFirstFocusedItemIndex(){let e=this.findSelectedItemIndex();return e<0?this.findFirstItemIndex():e}findFirstItemIndex(){return this.visibleItems.findIndex(e=>this.isValidItem(e))}findSelectedItemIndex(){return this.visibleItems.findIndex(e=>this.isValidSelectedItem(e))}changeFocusedItemIndex(e,i){let n=this.findVisibleItem(i),o=this.focusedItemInfo();o.index!==i&&(this.focusedItemInfo.set(y(C({},o),{index:i,item:n.item})),this.scrollInView())}scrollInView(e=-1){let i=e!==-1?`${this.id}_${e}`:this.focusedItemId,n=tt(this.rootmenu.el.nativeElement,`li[id="${i}"]`);n&&n.scrollIntoView&&n.scrollIntoView({block:"nearest",inline:"nearest"})}bindResizeListener(){Le(this.platformId)&&(this.resizeListener||(this.resizeListener=this.renderer.listen(this.document.defaultView,"resize",e=>{this.hide()})))}isOutsideClicked(e){return!(this.containerViewChild.nativeElement.isSameNode(e.target)||this.containerViewChild.nativeElement.contains(e.target))}unbindResizeListener(){this.resizeListener&&(this.resizeListener(),this.resizeListener=null)}unbindGlobalListeners(){this.documentClickListener&&(this.documentClickListener(),this.documentClickListener=null),this.documentTriggerListener&&(this.documentTriggerListener(),this.documentTriggerListener=null),this.resizeListener&&(this.resizeListener(),this.resizeListener=null),this.touchEndListener&&(this.touchEndListener(),this.touchEndListener=null)}unbindTriggerEventListener(){this.triggerEventListener&&(this.triggerEventListener(),this.triggerEventListener=null)}removeAppendedElements(){this.appendTo&&this.containerViewChild&&(this.appendTo==="body"?this.renderer.removeChild(this.document.body,this.containerViewChild.nativeElement):gi(this.containerViewChild.nativeElement,this.appendTo))}ngOnDestroy(){this.unbindGlobalListeners(),this.unbindTriggerEventListener(),this.unbindMatchMediaListener(),this.removeAppendedElements(),super.ngOnDestroy()}static \u0275fac=function(i){return new(i||t)(xt(Ci))};static \u0275cmp=M({type:t,selectors:[["p-contextMenu"],["p-contextmenu"],["p-context-menu"]],contentQueries:function(i,n,o){if(i&1&&(Ue(o,Go,4),Ue(o,Ho,4),Ue(o,we,4)),i&2){let d;j(d=Z())&&(n.itemTemplate=d.first),j(d=Z())&&(n.submenuIconTemplate=d.first),j(d=Z())&&(n.templates=d)}},viewQuery:function(i,n){if(i&1&&(pe(Uo,5),pe(jo,5)),i&2){let o;j(o=Z())&&(n.rootmenu=o.first),j(o=Z())&&(n.containerViewChild=o.first)}},inputs:{model:"model",triggerEvent:"triggerEvent",target:"target",global:[2,"global","global",ue],style:"style",styleClass:"styleClass",appendTo:"appendTo",autoZIndex:[2,"autoZIndex","autoZIndex",ue],baseZIndex:[2,"baseZIndex","baseZIndex",Ce],id:"id",breakpoint:"breakpoint",ariaLabel:"ariaLabel",ariaLabelledBy:"ariaLabelledBy",pressDelay:[2,"pressDelay","pressDelay",Ce]},outputs:{onShow:"onShow",onHide:"onHide"},features:[he([Wi]),Oe],decls:1,vars:1,consts:[["container",""],["rootmenu",""],[3,"ngClass","class","ngStyle",4,"ngIf"],[3,"ngClass","ngStyle"],[3,"itemClick","menuFocus","menuBlur","menuKeydown","itemMouseEnter","root","items","itemTemplate","menuId","tabindex","ariaLabel","ariaLabelledBy","baseZIndex","autoZIndex","visible","focusedItemId","activeItemPath"]],template:function(i,n){i&1&&u(0,Wo,4,23,"div",2),i&2&&l("ngIf",n.visible())},dependencies:[F,z,O,Ct,Jo,L,_e,Pt,De],encapsulation:2,data:{animation:[yt("overlayAnimation",[Ve(":enter",[Ne({opacity:0}),It("250ms")]),Ve(":leave",[It(".1s linear",Ne({opacity:0}))])])]},changeDetection:0})}return t})(),Xi=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=Zt({type:t});static \u0275inj=Ht({imports:[ht,De,De]})}return t})();var tr=["editInput"],ir=["tree"],nr=["class","page"];function or(t,s){t&1&&(a(0,"a",7),h(1,"i",8),p(2," Add"),r())}function rr(t,s){if(t&1&&u(0,or,3,0,"a",6),t&2){let e=m();l("ngIf",e.roleService.permissions().coa.create)}}function ar(t,s){if(t&1){let e=w();a(0,"input",15,4),Qe("ngModelChange",function(n){let o=_(e).$implicit;return Ze(o.label,n)||(o.label=n),g(n)}),S("keydown",function(n){_(e);let o=m(2);return g(o.handleEditKeydown(n))})("blur",function(n){_(e);let o=m(2);return g(o.onNodeEditBlur(n))}),r()}if(t&2){let e=s.$implicit;je("ngModel",e.label)}}function lr(t,s){if(t&1){let e=w();a(0,"div",9)(1,"div",10)(2,"p-panel",11)(3,"p-tree",12,2),S("onNodeContextMenuSelect",function(n){_(e);let o=m();return g(o.onNodeContextMenuSelect(n))})("onNodeSelect",function(n){_(e);let o=m();return g(o.onNodeSelect(n))})("onNodeUnselect",function(n){_(e);let o=m();return g(o.onNodeUnselect(n))})("onNodeDrop",function(n){_(e);let o=m();return g(o.onNodeDrop(n))}),u(5,ar,2,1,"ng-template",13),r(),h(6,"p-contextmenu",14,3),r()()()}if(t&2){let e=te(7),i=m();c(2),l("showHeader",!1),c(),l("value",i.categoryTree())("contextMenu",e)("selection",i.selectedCategory)("draggableNodes",!0)("droppableNodes",!0)("propagateSelectionUp",!1)("propagateSelectionDown",!1),c(3),l("model",i.contextMenuItems())}}var Ji=(()=>{class t{constructor(){this._coaTypesService=x(me),this._router=x(ne),this.roleService=x(ye),this.contextMenuItems=v([]),this.categoryTree=v([]),this.selectedCategory=null,this._shouldAutoFocus=v(!1)}ngOnInit(){this._loadCategories().subscribe(),this._initializeContextMenuItems(),this.expandAllNodes()}ngAfterViewChecked(){this.selectedCategory&&!this._shouldAutoFocus()&&this.editInputRef&&(this.editInputRef.nativeElement.focus(),this.editInputRef.nativeElement.select(),this._shouldAutoFocus.set(!0))}_loadCategories(){return this._coaTypesService.fetchCOACategories().pipe(A(e=>{this.categoryTree.set(e),this.expandAllNodes()}))}_assignTreeIcons(e){return e.map(i=>{let n=!!i.children?.length;return y(C({},i),{icon:void 0,expandedIcon:n?"fa-solid fa-folder-open":void 0,collapsedIcon:n?"fa-solid fa-folder":"fa-solid fa-file",children:n?this._assignTreeIcons(i.children):[]})})}_initializeContextMenuItems(){this.contextMenuItems.set([{label:"Add",icon:"fa-light fa-plus",disabled:!1,command:()=>this._createChildCategory()},{label:"Edit",icon:"fa-light fa-pen-to-square",disabled:!1,command:()=>this._setSelectedNodeToEditMode()},{label:"Delete",icon:"fa-light fa-trash",disabled:!1,command:()=>this._deleteSelectedCategory()},{label:"Properties",icon:"fa-light fa-file",disabled:!1,command:()=>{this._router.navigate(["/pages/chart-of-account/coa-types/info"],{queryParams:{ID:this.selectedCategory?.key}})}}])}_findNodeByKey(e){return this.treeComponent.getNodeWithKey(e,this.categoryTree())??null}_setSelectedNodeToEditMode(){let e=this._findNodeByKey(this.selectedCategory?.key);e&&(this.selectedCategory=e,e.type="edit")}_createChildCategory(){this._coaTypesService.submitCategory({Name:"New Child Node",ParentID:this.selectedCategory.key,Code:"",Note:""}).pipe(D(e=>this._loadCategories().pipe(G(()=>e))),A(e=>{let i=this._findNodeByKey(e.id);i&&(this.selectedCategory=i,this._shouldAutoFocus.set(!1),i.type="edit")})).subscribe()}_deleteSelectedCategory(){this.selectedCategory?.key&&this._coaTypesService.deleteCategory(this.selectedCategory.key).pipe(D(()=>this._loadCategories())).subscribe()}renameNode(e,i=this.selectedCategory){this._coaTypesService.renameCategory(i.key,{Name:e}).pipe(D(()=>this._loadCategories())).subscribe()}onNodeSelect(e){this.selectedCategory=e.node,this._shouldAutoFocus.set(!1),e.node.children?.length&&(e.node.icon="fa-solid fa-folder-open")}onNodeUnselect(e){e.node.children?.length&&(e.node.icon="fa-solid fa-folder")}onNodeContextMenuSelect(e){this.selectedCategory=e.node,["Asset","Liability","Equity","Revenue","Expense"].includes(e.node.label)?this.contextMenuItems.set(this.contextMenuItems().map(n=>["Edit","Delete"].includes(n.label)?y(C({},n),{disabled:!0}):y(C({},n),{disabled:!1}))):this.contextMenuItems.set(this.contextMenuItems().map(n=>n.label==="Add"?y(C({},n),{disabled:!this.roleService.permissions().coa.create}):n.label==="Edit"?y(C({},n),{disabled:!this.roleService.permissions().coa.edit}):n.label==="Delete"?y(C({},n),{disabled:!this.roleService.permissions().coa.delete}):y(C({},n),{disabled:!1})))}onNodeDrop(e){let{dragNode:i,dropNode:n}=e;this._coaTypesService.updateParentCategory(i.key,{ParentID:n.key}).pipe(A(()=>this._loadCategories())).subscribe()}onNodeEditBlur(e){let i=e.target;this.renameNode(i.value);let n=this._findNodeByKey(this.selectedCategory?.key);n&&delete n.type}handleEditKeydown(e){let i=e.target;if([" ","Enter"].includes(e.key)&&e.stopPropagation(),e.key==="Enter"){this.renameNode(i.value);let n=this._findNodeByKey(this.selectedCategory?.key);n&&(delete n.type,this.treeComponent.updateSerializedValue?.())}}expandAllNodes(){this.categoryTree().forEach(e=>this._expandRecursive(e,!0))}collapseAllNodes(){this.categoryTree().forEach(e=>this._expandRecursive(e,!1))}_expandRecursive(e,i){e.expanded=i,e.children?.forEach(n=>this._expandRecursive(n,i))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=M({type:t,selectors:[["app-coa-type",8,"page"]],viewQuery:function(i,n){if(i&1&&(pe(tr,5),pe(ir,5)),i&2){let o;j(o=Z())&&(n.editInputRef=o.first),j(o=Z())&&(n.treeComponent=o.first)}},features:[he([yi])],attrs:nr,decls:5,vars:1,consts:[["actionButton",""],["content",""],["tree",""],["cm",""],["editInput",""],["pageTitle",`Chart of Accounts Category
159
+ `,3,"scrollable"],["class","p-button","routerLink","add",4,"ngIf"],["routerLink","add",1,"p-button"],[1,"fa-solid","fa-plus"],[1,"row","justify-content-center","m-0"],[1,"col","p-0"],[3,"showHeader"],["selectionMode","single","draggableScope","self","droppableScope","self",1,"custom-tree-spacing",3,"onNodeContextMenuSelect","onNodeSelect","onNodeUnselect","onNodeDrop","value","contextMenu","selection","draggableNodes","droppableNodes","propagateSelectionUp","propagateSelectionDown"],["pTemplate","edit"],["appendTo","body",3,"model"],["type","text",1,"form-control",3,"ngModelChange","keydown","blur","ngModel"]],template:function(i,n){i&1&&(a(0,"app-main-panel",5),u(1,rr,1,1,"ng-template",null,0,I)(3,lr,8,9,"ng-template",null,1,I),r()),i&2&&l("scrollable",!0)},dependencies:[$,$i,L,B,Xi,ht,we,F,O,Te,oe,Y,Je,K,Si,ce,se],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var sr=["class","page"],Dt=t=>({"is-invalid":t}),cr=t=>({"ng-invalid ng-dirty":t});function mr(t,s){if(t&1){let e=w();a(0,"div",3)(1,"p-button",4),S("onClick",function(){_(e);let n=m();return g(n.goBack())}),r(),a(2,"p-button",5),S("onClick",function(){_(e);let n=m();return g(n.onSubmit())}),r()()}}function pr(t,s){t&1&&(a(0,"div",20),p(1," Name is required "),r())}function dr(t,s){t&1&&(a(0,"div",20),p(1," Code is required "),r())}function ur(t,s){t&1&&(a(0,"div",20),p(1," Note is required "),r())}function fr(t,s){if(t&1&&(a(0,"div")(1,"span",22),p(2),r()()),t&2){let e=s.$implicit;c(2),E(e)}}function _r(t,s){if(t&1&&(a(0,"div"),u(1,fr,3,1,"div",21),r()),t&2){let e=m(2);c(),l("ngForOf",e.getErrors("Category"))}}function gr(t,s){if(t&1){let e=w();a(0,"p-panel")(1,"div",6)(2,"div",7)(3,"div",8)(4,"div",9)(5,"div",10)(6,"label",11),p(7,"Name"),r(),h(8,"input",12),u(9,pr,2,0,"div",13),r()(),a(10,"div",14)(11,"div",10)(12,"label",11),p(13,"Code"),r(),h(14,"input",15),u(15,dr,2,0,"div",13),r()(),a(16,"div",9)(17,"div",10)(18,"label",11),p(19,"Note"),r(),h(20,"textarea",16),u(21,ur,2,0,"div",13),r()(),a(22,"div",9)(23,"div",17)(24,"label",11),p(25,"Category"),r(),a(26,"p-treeselect",18),S("onFocus",function(){_(e);let n=m();return g(n.loadCategories())}),r(),u(27,_r,2,1,"div",19),r()()()()()()}if(t&2){let e=m();c(3),l("formGroup",e.form),c(5),l("ngClass",T(10,Dt,e.form.controls.Name.invalid&&(e.form.controls.Name.dirty||e.form.controls.Name.touched))),c(),l("ngIf",e.form.controls.Name.errors==null?null:e.form.controls.Name.errors.required),c(5),l("ngClass",T(12,Dt,e.form.controls.Code.invalid&&(e.form.controls.Code.dirty||e.form.controls.Code.touched))),c(),l("ngIf",e.form.controls.Code==null||e.form.controls.Code.errors==null?null:e.form.controls.Code.errors.required),c(5),l("ngClass",T(14,Dt,e.form.controls.Note.invalid&&(e.form.controls.Note.dirty||e.form.controls.Note.touched))),c(),l("ngIf",e.form.controls.Note.errors==null?null:e.form.controls.Note.errors.required),c(5),l("ngClass",T(16,cr,e.isInvalid("Category")))("options",e.categories()),c(),l("ngIf",e.isInvalid("Category"))}}var Rt=(()=>{class t extends Gi{constructor(){super(...arguments),this.categories=v([]),this.COATypeService=x(me),this.COAService=x(X),this.info=v(null),this.route=x(ie),this.router=x(ne),this.fb=x(Se)}goBack(){this.router.navigate(["/pages/chart-of-account/coa-types"])}ngOnInit(){this.generateForm(),Kt([this.route.paramMap.pipe(G(e=>e.get("id")),Ke(e=>!!e)),this.COATypeService.fetchCOACategories()]).pipe(V("fetchCOACategories"),D(([e,i])=>{let n=this.findNodeByKeyInArray(i,e);return this.categories.set(i),this.COATypeService.getCOACategoryByID({ID:e}).pipe(A(o=>{this.form.patchValue({Name:o.name,Code:o.code,Note:o.note,Category:n.parent}),["Asset","Liability","Equity","Revenue","Expense"].includes(o.name)&&this.form.controls.Category.disable()}))})).subscribe()}loadCategories(){this.COAService.getCachedCategoriesOptions().pipe(A(e=>this.categories.set(e))).subscribe()}generateForm(){this.form=new ri({Name:new N("",[fe.required]),Code:new N("",[]),Category:new N(null,[fe.required]),Note:new N("",[])})}findNodeByKeyInArray(e,i){for(let n of e){let o=this.findNodeByKey(n,i);if(o)return o}return null}findNodeByKey(e,i,n=null){if(e.key===i||e.label===i)return n&&(e.parent=n),e;if(e.children&&e.children.length>0)for(let o of e.children){let d=this.findNodeByKey(o,i,e);if(d)return d}return null}onSubmit(){let{Name:e,Code:i,Note:n,Category:o}=this.form.value,d=null,f=null;if(this.form.invalid){this.form.markAllAsTouched();return}this.route.snapshot.params.id?(d=this.findNodeByKeyInArray(this.categories(),this.route.snapshot.params.id),f={Name:e,Code:i,ParentID:d&&d.parent?d.parent.key:d.key,Note:n,ID:this.route.snapshot.params.id||null}):(d=this.findNodeByKeyInArray(this.categories(),o.key),f={Name:e,Code:i,ParentID:d&&d.parent?d.parent.key:d.key,Note:n}),this.COATypeService.submitCategory(f,{observe:"response"}).pipe(V("response"),A(()=>{this.router.navigate(["/pages/chart-of-account/coa-types"])})).subscribe()}static{this.\u0275fac=(()=>{let e;return function(n){return(e||(e=Ge(t)))(n||t)}})()}static{this.\u0275cmp=M({type:t,selectors:[["app-coa-type-form",8,"page"]],features:[Oe],attrs:sr,decls:5,vars:1,consts:[["actionButton",""],["content",""],["pageTitle","Chart of Account Category Form",3,"hasMainWrapperPadding"],[1,"d-flex","gap-2"],["label","Cancel","variant","outlined","severity","secondary",3,"onClick"],["label","Submit",3,"onClick"],[1,"row","justify-content-center"],[1,"col"],[1,"row","row-gap-2",3,"formGroup"],[1,"ol-12","col-md-6","col-lg-6"],[1,"form-group","has-validation"],["for",""],["formControlName","Name",1,"form-control",3,"ngClass"],["id","validationServer03Feedback","class","invalid-feedback",4,"ngIf"],[1,"col-12","col-md-6","col-lg-6"],["formControlName","Code",1,"form-control",3,"ngClass"],["formControlName","Note","placeholder","Enter a description for this COA category","id","floatingTextarea2",1,"form-control",2,"height","100px",3,"ngClass"],[1,"form-group","has-validation","d-flex","flex-column"],["showClear","","placeholder","Select a Category","formControlName","Category",1,"ng-invalid","ng-dirty",3,"onFocus","ngClass","options"],[4,"ngIf"],["id","validationServer03Feedback",1,"invalid-feedback"],[4,"ngFor","ngForOf"],[1,"text-danger"]],template:function(i,n){i&1&&(a(0,"app-main-panel",2),u(1,mr,3,0,"ng-template",null,0,I)(3,gr,28,18,"ng-template",null,1,I),r()),i&2&&l("hasMainWrapperPadding",!0)},dependencies:[$,L,Pe,Ee,Ae,oe,Y,Ie,be,ve,F,z,Ye,O,K,le,ae,ce,se],styles:["[_nghost-%COMP%]{display:block} .p-treeselect{width:100%}"],changeDetection:0})}}return t})();var hr=t=>[t];function xr(t,s){if(t&1&&(a(0,"a",4),h(1,"i",5),a(2,"span"),p(3,"Edit"),r()()),t&2){let e=m(2);l("routerLink",T(1,hr,"/pages/chart-of-account/coa-types/"+e.info().id+"/edit"))}}function Cr(t,s){if(t&1&&(a(0,"div",6)(1,"div",7)(2,"p-card")(3,"div",8)(4,"div",9)(5,"div",10),p(6,"Name"),r(),a(7,"div",11),p(8),r()(),a(9,"div",9)(10,"div",10),p(11,"Code"),r(),a(12,"div",11),p(13),r()(),a(14,"div",9)(15,"div",10),p(16,"Category"),r(),a(17,"div",11),p(18),r()(),a(19,"div",9)(20,"div",10),p(21,"Note"),r(),a(22,"div",11),h(23,"div",12),r()()()()()()),t&2){let e=m(2);c(8),E(e.info().name),c(5),E(e.info().code),c(5),E(e.info().parentName),c(5),l("innerHTML",e.info().note,Me)}}function yr(t,s){t&1&&(H(0),a(1,"app-main-panel",3),u(2,xr,4,3,"ng-template",null,0,I)(4,Cr,24,4,"ng-template",null,1,I),r(),U())}var en=(()=>{class t{constructor(){this.COATypeService=x(me),this.route=x(ie),this.info=v(null)}ngOnInit(){this.route.queryParamMap.pipe(G(e=>e.get("ID")),D(e=>this.COATypeService.getCOACategoryByID({ID:e})),V("getCOACategoryByID"),A(e=>this.info.set(e))).subscribe()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=M({type:t,selectors:[["app-coa-type-info"]],decls:1,vars:1,consts:[["actionButton",""],["content",""],[4,"ngIf"],["pageTitle",`Type of Account Info
160
+ `],["type","button",1,"p-button","p-button-success",3,"routerLink"],[1,"fa-solid","fa-pen-to-square"],[1,"row","justify-content-center","mt-3"],[1,"col-12","col-lg-8"],[1,"d-flex","flex-column","gap-3"],[1,"d-flex"],[1,"col-3"],[1,"col"],[3,"innerHTML"]],template:function(i,n){i&1&&u(0,yr,6,0,"ng-container",2),i&2&&l("ngIf",n.info())},dependencies:[F,O,$,K,at,L,B],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var Ps=[{path:"",redirectTo:"account",pathMatch:"full"},{path:"",children:[{path:"account",component:ji},{path:"account/add",component:Vt},{path:"account/import",loadComponent:()=>import("./chunk-IMPGOCFC.js").then(t=>t.CoaImportComponent)},{path:"account/:id",component:Hi},{path:"account/:id/edit",component:Vt},{path:"coa-types",component:Ji},{path:"coa-types/add",component:Rt},{path:"coa-types/info",component:en},{path:"coa-types/:id/edit",component:Rt}]}],Zi={path:"cash-of-account",title:"COA",iconName:"fa fa-calculator",class:"",label:"",labelClass:"",extralink:!1,submenu:[{path:"account",title:"Ticket List",iconName:"solar:stop-circle-line-duotone",class:"",label:"",labelClass:"",extralink:!1,submenu:[]},{path:"coa-types",title:"Ticket Details",iconName:"solar:stop-circle-line-duotone",class:"",label:"",labelClass:"",extralink:!1,submenu:[]}]};export{Ps as CHART_OF_ACCOUNT_ROUTES,Zi as CHART_OF_ACCOUNT_ROUTE_PAGE};
@@ -1 +1 @@
1
- import{h as p}from"./chunk-ME4ALIS7.js";import{Cb as s,Lb as l,Qb as C,Wb as c,Xb as m,Yb as d,sa as i,ua as a,yb as r}from"./chunk-6QJHEOXN.js";var u=(()=>{class t extends p{static \u0275fac=(()=>{let n;return function(e){return(n||(n=a(t)))(e||t)}})();static \u0275cmp=r({type:t,selectors:[["ChevronDownIcon"]],features:[s],decls:2,vars:5,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M7.01744 10.398C6.91269 10.3985 6.8089 10.378 6.71215 10.3379C6.61541 10.2977 6.52766 10.2386 6.45405 10.1641L1.13907 4.84913C1.03306 4.69404 0.985221 4.5065 1.00399 4.31958C1.02276 4.13266 1.10693 3.95838 1.24166 3.82747C1.37639 3.69655 1.55301 3.61742 1.74039 3.60402C1.92777 3.59062 2.11386 3.64382 2.26584 3.75424L7.01744 8.47394L11.769 3.75424C11.9189 3.65709 12.097 3.61306 12.2748 3.62921C12.4527 3.64535 12.6199 3.72073 12.7498 3.84328C12.8797 3.96582 12.9647 4.12842 12.9912 4.30502C13.0177 4.48162 12.9841 4.662 12.8958 4.81724L7.58083 10.1322C7.50996 10.2125 7.42344 10.2775 7.32656 10.3232C7.22968 10.3689 7.12449 10.3944 7.01744 10.398Z","fill","currentColor"]],template:function(o,e){o&1&&(i(),c(0,"svg",0),d(1,"path",1),m()),o&2&&(C(e.getClassNames()),l("aria-label",e.ariaLabel)("aria-hidden",e.ariaHidden)("role",e.role))},encapsulation:2})}return t})();export{u as a};
1
+ import{h as p}from"./chunk-O44DI62I.js";import{Cb as s,Lb as l,Qb as C,Wb as c,Xb as m,Yb as d,sa as i,ua as a,yb as r}from"./chunk-6QJHEOXN.js";var u=(()=>{class t extends p{static \u0275fac=(()=>{let n;return function(e){return(n||(n=a(t)))(e||t)}})();static \u0275cmp=r({type:t,selectors:[["ChevronDownIcon"]],features:[s],decls:2,vars:5,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M7.01744 10.398C6.91269 10.3985 6.8089 10.378 6.71215 10.3379C6.61541 10.2977 6.52766 10.2386 6.45405 10.1641L1.13907 4.84913C1.03306 4.69404 0.985221 4.5065 1.00399 4.31958C1.02276 4.13266 1.10693 3.95838 1.24166 3.82747C1.37639 3.69655 1.55301 3.61742 1.74039 3.60402C1.92777 3.59062 2.11386 3.64382 2.26584 3.75424L7.01744 8.47394L11.769 3.75424C11.9189 3.65709 12.097 3.61306 12.2748 3.62921C12.4527 3.64535 12.6199 3.72073 12.7498 3.84328C12.8797 3.96582 12.9647 4.12842 12.9912 4.30502C13.0177 4.48162 12.9841 4.662 12.8958 4.81724L7.58083 10.1322C7.50996 10.2125 7.42344 10.2775 7.32656 10.3232C7.22968 10.3689 7.12449 10.3944 7.01744 10.398Z","fill","currentColor"]],template:function(o,e){o&1&&(i(),c(0,"svg",0),d(1,"path",1),m()),o&2&&(C(e.getClassNames()),l("aria-label",e.ariaLabel)("aria-hidden",e.ariaHidden)("role",e.role))},encapsulation:2})}return t})();export{u as a};
@@ -1 +1 @@
1
- import{t as _}from"./chunk-ZK43JB4A.js";import{Bb as N,Ga as K,Ha as g,La as A,ad as S,bd as m,ca as y,cd as E,fa as T,ia as h,xa as $}from"./chunk-6QJHEOXN.js";import{a as c,b as u}from"./chunk-YQFG5XE2.js";var ce=(()=>{class t{transform(e,o=50,r=!1,a="..."){if(!e||typeof e!="string")return"";if(e.length<=o)return e;let i=e.substring(0,o);if(r){let s=i.lastIndexOf(" ");s>0&&(i=i.substring(0,s))}return i+a}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275pipe=N({name:"truncate",type:t,pure:!0})}}return t})();function R(t){let n=S(()=>t());return J(n)?new Proxy(t,{get(e,o){return o in n?(K(e[o])||Object.defineProperty(e,o,{value:m(()=>e()[o]),configurable:!0}),R(e[o])):e[o]}}):t}var H=[WeakSet,WeakMap,Promise,Date,Error,RegExp,ArrayBuffer,DataView,Function];function J(t){if(t===null||typeof t!="object"||q(t))return!1;let n=Object.getPrototypeOf(t);if(n===Object.prototype)return!0;for(;n&&n!==Object.prototype;){if(H.includes(n.constructor))return!1;n=Object.getPrototypeOf(n)}return n===Object.prototype}function q(t){return typeof t?.[Symbol.iterator]=="function"}var G=new WeakMap,d=Symbol("STATE_SOURCE");function I(t,...n){t[d].update(e=>n.reduce((o,r)=>c(c({},o),typeof r=="function"?r(o):r),e)),Y(t)}function j(t){return t[d]()}function Q(t){return G.get(t[d])||[]}function Y(t){let n=Q(t);for(let e of n){let o=S(()=>j(t));e(o)}}function F(...t){let n=[...t],e=typeof n[0]=="function"?{}:n.shift(),o=n;return(()=>{class a{constructor(){let s=o.reduce((p,X)=>X(p),Z()),{stateSignals:l,props:f,methods:w,hooks:B}=s,M=c(c(c({},l),f),w);this[d]=s[d];for(let p of Reflect.ownKeys(M))this[p]=M[p];let{onInit:x,onDestroy:P}=B;x&&x(),P&&h($).onDestroy(P)}static \u0275fac=function(l){return new(l||a)};static \u0275prov=y({token:a,factory:a.\u0275fac,providedIn:e.providedIn||null})}return a})()}function Z(){return{[d]:g({}),stateSignals:{},props:{},methods:{},hooks:{}}}function k(t,...n){let e=typeof t=="function"?[t,...n]:n;return o=>e.reduce((r,a)=>a(r),o)}function z(t){return n=>{let e=t(c(c(c({[d]:n[d]},n.stateSignals),n.props),n.methods));return Reflect.ownKeys(e),u(c({},n),{props:c(c({},n.props),e)})}}function ee(t){return z(t)}function U(t){return n=>{let e=c(c(c({[d]:n[d]},n.stateSignals),n.props),n.methods),o=typeof t=="function"?t(e):t,r=a=>{let i=o[a],s=n.hooks[a];return i?()=>{s&&s(),i(e)}:s};return u(c({},n),{hooks:{onInit:r("onInit"),onDestroy:r("onDestroy")}})}}function v(t){return n=>{let e=t(c(c(c({[d]:n[d]},n.stateSignals),n.props),n.methods));return Reflect.ownKeys(e),u(c({},n),{methods:c(c({},n.methods),e)})}}function b(t){return n=>{let e=typeof t=="function"?t():t,o=Reflect.ownKeys(e);n[d].update(a=>c(c({},a),e));let r=o.reduce((a,i)=>{let s=m(()=>n[d]()[i]);return u(c({},a),{[i]:R(s)})},{});return u(c({},n),{stateSignals:c(c({},n.stateSignals),r)})}}var D=new Set;function te(t){if(t==null)throw new Error("");return t}var L={send:()=>{}},W=(()=>{class t{#e={};#n=_(h(A));#o=[];#t={};#i=1;#c=this.#n&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__.connect({name:"NgRx SignalStore"}):L;constructor(){if(!this.#n)return;!!window.__REDUX_DEVTOOLS_EXTENSION__||console.info("NgRx Toolkit/DevTools: Redux DevTools Extension is not available.")}ngOnDestroy(){D.clear()}syncToDevTools(e){let o=Object.entries(e).reduce((i,[s,l])=>{let{options:f,name:w}=this.#e[s];return i[w]=f.map(l),i},{});this.#t=c(c({},this.#t),o);let r=Array.from(D),a=r.length?r.join(", "):"Store Update";D.clear(),this.#c.send({type:a},this.#t)}getNextId(){return String(this.#i++)}addStore(e,o,r,a){let i=o,s=Object.values(this.#e).map(f=>f.name);if(s.includes(i)&&!a.indexNames)throw new Error(`An instance of the store ${i} already exists. Enable automatic indexing via withDevTools('${i}', { indexNames: true }), or rename it upon instantiation.`);for(let f=1;s.includes(i);f++)i=`${o}-${f}`;this.#e[e]={name:i,options:a};let l=a.tracker;this.#o.includes(l)||this.#o.push(l),l.onChange(f=>this.syncToDevTools(f)),l.track(e,r)}removeStore(e){let o=this.#e[e].name;this.#e=Object.entries(this.#e).reduce((r,[a,i])=>(a!==e&&(r[a]=i),r),{}),this.#t=Object.entries(this.#t).reduce((r,[a,i])=>(a!==o&&(r[o]=i),r),{});for(let r of this.#o)r.removeStore(e)}renameStore(e,o){let r=Object.values(this.#e).map(i=>i.name),a=te(Object.keys(this.#e).find(i=>this.#e[i].name===e));if(r.includes(o))throw new Error(`NgRx Toolkit/DevTools: cannot rename from ${e} to ${o}. ${o} is already assigned to another SignalStore instance.`);this.#e=Object.entries(this.#e).reduce((i,[s,l])=>(l.name===e?i[s]=u(c({},l),{name:o}):i[s]=l,i),{}),this.#t=Object.entries(this.#t).reduce((i,[s,l])=>(s!==e&&(i[s]=l),i),{}),this.#o.forEach(i=>i.notifyRenamedStore(a))}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275prov=y({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})(),ne=(()=>{class t{#e=g({});get stores(){return this.#e()}#n;#o=E(()=>{if(this.#n===void 0)throw new Error("no callback function defined");let e=this.#e(),o=Object.entries(e).reduce((r,[a,i])=>u(c({},r),{[a]:j(i)}),{});this.#n(o)});track(e,o){this.#e.update(r=>u(c({},r),{[e]:o}))}onChange(e){this.#n=e}removeStore(e){this.#e.update(o=>Object.entries(o).reduce((r,[a,i])=>(a!==e&&(r[a]=i),r),{}))}notifyRenamedStore(e){this.#e()[e]&&this.#e.update(o=>c({},o))}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275prov=y({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})(),oe="___renameDevtoolsName",O="___uniqueDevtoolsId",we=new T("Array contain existing names for the signal stores",{factory:()=>[],providedIn:"root"});function V(t,...n){return k(v(()=>{let e=h(W),o=e.getNextId();return{[oe]:r=>{e.renameStore(t,r)},[O]:()=>o}}),U(e=>{let o=h(W),r=String(e[O]());return{onInit(){let a=String(e[O]()),i={indexNames:!n.some(s=>s.indexNames===!1),map:n.find(s=>s.map)?.map??(s=>s),tracker:h(n.find(s=>s.tracker)?.tracker||ne)};o.addStore(a,t,e,i)},onDestroy(){o.removeStore(r)}}}))}var Ke=Symbol("DEVTOOLS_FEATURE");var Ee=k(b({}));var ie={themeOptions:{theme:"light",dir:"ltr",layout:"vertical",sidebartype:"full",boxed:"boxed",colorTheme:"Blue_Theme",cardType:"shadow"}},Oe=F({providedIn:"root"},b(ie),V("LayoutThemeStore"),v(t=>({updateSidebarType(){I(t,n=>{switch(n.themeOptions.sidebartype){case"full":return u(c({},n),{themeOptions:u(c({},n.themeOptions),{sidebartype:"mini-sidebar"})});case"mini-sidebar":return u(c({},n),{themeOptions:u(c({},n.themeOptions),{sidebartype:"full"})});default:return n}})}})));export{ce as a,I as b,F as c,ee as d,U as e,v as f,b as g,V as h,Oe as i};
1
+ import{x as _}from"./chunk-DM2JLWKE.js";import{Bb as N,Ga as K,Ha as g,La as A,ad as S,bd as m,ca as y,cd as E,fa as T,ia as h,xa as $}from"./chunk-6QJHEOXN.js";import{a as c,b as u}from"./chunk-YQFG5XE2.js";var ce=(()=>{class t{transform(e,o=50,r=!1,a="..."){if(!e||typeof e!="string")return"";if(e.length<=o)return e;let i=e.substring(0,o);if(r){let s=i.lastIndexOf(" ");s>0&&(i=i.substring(0,s))}return i+a}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275pipe=N({name:"truncate",type:t,pure:!0})}}return t})();function R(t){let n=S(()=>t());return J(n)?new Proxy(t,{get(e,o){return o in n?(K(e[o])||Object.defineProperty(e,o,{value:m(()=>e()[o]),configurable:!0}),R(e[o])):e[o]}}):t}var H=[WeakSet,WeakMap,Promise,Date,Error,RegExp,ArrayBuffer,DataView,Function];function J(t){if(t===null||typeof t!="object"||q(t))return!1;let n=Object.getPrototypeOf(t);if(n===Object.prototype)return!0;for(;n&&n!==Object.prototype;){if(H.includes(n.constructor))return!1;n=Object.getPrototypeOf(n)}return n===Object.prototype}function q(t){return typeof t?.[Symbol.iterator]=="function"}var G=new WeakMap,d=Symbol("STATE_SOURCE");function I(t,...n){t[d].update(e=>n.reduce((o,r)=>c(c({},o),typeof r=="function"?r(o):r),e)),Y(t)}function j(t){return t[d]()}function Q(t){return G.get(t[d])||[]}function Y(t){let n=Q(t);for(let e of n){let o=S(()=>j(t));e(o)}}function F(...t){let n=[...t],e=typeof n[0]=="function"?{}:n.shift(),o=n;return(()=>{class a{constructor(){let s=o.reduce((p,X)=>X(p),Z()),{stateSignals:l,props:f,methods:w,hooks:B}=s,M=c(c(c({},l),f),w);this[d]=s[d];for(let p of Reflect.ownKeys(M))this[p]=M[p];let{onInit:x,onDestroy:P}=B;x&&x(),P&&h($).onDestroy(P)}static \u0275fac=function(l){return new(l||a)};static \u0275prov=y({token:a,factory:a.\u0275fac,providedIn:e.providedIn||null})}return a})()}function Z(){return{[d]:g({}),stateSignals:{},props:{},methods:{},hooks:{}}}function k(t,...n){let e=typeof t=="function"?[t,...n]:n;return o=>e.reduce((r,a)=>a(r),o)}function z(t){return n=>{let e=t(c(c(c({[d]:n[d]},n.stateSignals),n.props),n.methods));return Reflect.ownKeys(e),u(c({},n),{props:c(c({},n.props),e)})}}function ee(t){return z(t)}function U(t){return n=>{let e=c(c(c({[d]:n[d]},n.stateSignals),n.props),n.methods),o=typeof t=="function"?t(e):t,r=a=>{let i=o[a],s=n.hooks[a];return i?()=>{s&&s(),i(e)}:s};return u(c({},n),{hooks:{onInit:r("onInit"),onDestroy:r("onDestroy")}})}}function v(t){return n=>{let e=t(c(c(c({[d]:n[d]},n.stateSignals),n.props),n.methods));return Reflect.ownKeys(e),u(c({},n),{methods:c(c({},n.methods),e)})}}function b(t){return n=>{let e=typeof t=="function"?t():t,o=Reflect.ownKeys(e);n[d].update(a=>c(c({},a),e));let r=o.reduce((a,i)=>{let s=m(()=>n[d]()[i]);return u(c({},a),{[i]:R(s)})},{});return u(c({},n),{stateSignals:c(c({},n.stateSignals),r)})}}var D=new Set;function te(t){if(t==null)throw new Error("");return t}var L={send:()=>{}},W=(()=>{class t{#e={};#n=_(h(A));#o=[];#t={};#i=1;#c=this.#n&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__.connect({name:"NgRx SignalStore"}):L;constructor(){if(!this.#n)return;!!window.__REDUX_DEVTOOLS_EXTENSION__||console.info("NgRx Toolkit/DevTools: Redux DevTools Extension is not available.")}ngOnDestroy(){D.clear()}syncToDevTools(e){let o=Object.entries(e).reduce((i,[s,l])=>{let{options:f,name:w}=this.#e[s];return i[w]=f.map(l),i},{});this.#t=c(c({},this.#t),o);let r=Array.from(D),a=r.length?r.join(", "):"Store Update";D.clear(),this.#c.send({type:a},this.#t)}getNextId(){return String(this.#i++)}addStore(e,o,r,a){let i=o,s=Object.values(this.#e).map(f=>f.name);if(s.includes(i)&&!a.indexNames)throw new Error(`An instance of the store ${i} already exists. Enable automatic indexing via withDevTools('${i}', { indexNames: true }), or rename it upon instantiation.`);for(let f=1;s.includes(i);f++)i=`${o}-${f}`;this.#e[e]={name:i,options:a};let l=a.tracker;this.#o.includes(l)||this.#o.push(l),l.onChange(f=>this.syncToDevTools(f)),l.track(e,r)}removeStore(e){let o=this.#e[e].name;this.#e=Object.entries(this.#e).reduce((r,[a,i])=>(a!==e&&(r[a]=i),r),{}),this.#t=Object.entries(this.#t).reduce((r,[a,i])=>(a!==o&&(r[o]=i),r),{});for(let r of this.#o)r.removeStore(e)}renameStore(e,o){let r=Object.values(this.#e).map(i=>i.name),a=te(Object.keys(this.#e).find(i=>this.#e[i].name===e));if(r.includes(o))throw new Error(`NgRx Toolkit/DevTools: cannot rename from ${e} to ${o}. ${o} is already assigned to another SignalStore instance.`);this.#e=Object.entries(this.#e).reduce((i,[s,l])=>(l.name===e?i[s]=u(c({},l),{name:o}):i[s]=l,i),{}),this.#t=Object.entries(this.#t).reduce((i,[s,l])=>(s!==e&&(i[s]=l),i),{}),this.#o.forEach(i=>i.notifyRenamedStore(a))}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275prov=y({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})(),ne=(()=>{class t{#e=g({});get stores(){return this.#e()}#n;#o=E(()=>{if(this.#n===void 0)throw new Error("no callback function defined");let e=this.#e(),o=Object.entries(e).reduce((r,[a,i])=>u(c({},r),{[a]:j(i)}),{});this.#n(o)});track(e,o){this.#e.update(r=>u(c({},r),{[e]:o}))}onChange(e){this.#n=e}removeStore(e){this.#e.update(o=>Object.entries(o).reduce((r,[a,i])=>(a!==e&&(r[a]=i),r),{}))}notifyRenamedStore(e){this.#e()[e]&&this.#e.update(o=>c({},o))}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275prov=y({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})(),oe="___renameDevtoolsName",O="___uniqueDevtoolsId",we=new T("Array contain existing names for the signal stores",{factory:()=>[],providedIn:"root"});function V(t,...n){return k(v(()=>{let e=h(W),o=e.getNextId();return{[oe]:r=>{e.renameStore(t,r)},[O]:()=>o}}),U(e=>{let o=h(W),r=String(e[O]());return{onInit(){let a=String(e[O]()),i={indexNames:!n.some(s=>s.indexNames===!1),map:n.find(s=>s.map)?.map??(s=>s),tracker:h(n.find(s=>s.tracker)?.tracker||ne)};o.addStore(a,t,e,i)},onDestroy(){o.removeStore(r)}}}))}var Ke=Symbol("DEVTOOLS_FEATURE");var Ee=k(b({}));var ie={themeOptions:{theme:"light",dir:"ltr",layout:"vertical",sidebartype:"full",boxed:"boxed",colorTheme:"Blue_Theme",cardType:"shadow"}},Oe=F({providedIn:"root"},b(ie),V("LayoutThemeStore"),v(t=>({updateSidebarType(){I(t,n=>{switch(n.themeOptions.sidebartype){case"full":return u(c({},n),{themeOptions:u(c({},n.themeOptions),{sidebartype:"mini-sidebar"})});case"mini-sidebar":return u(c({},n),{themeOptions:u(c({},n.themeOptions),{sidebartype:"full"})});default:return n}})}})));export{ce as a,I as b,F as c,ee as d,U as e,v as f,b as g,V as h,Oe as i};
@@ -1,4 +1,4 @@
1
- import{a as Ft,h as U,i as Pt}from"./chunk-ME4ALIS7.js";import{Da as Vt,La as Lt,Ma as K,Q as Et,Ua as Ot,V as R,ca as D,ea as et,ia as xt}from"./chunk-VMI3QWC6.js";import{h as St,j as It,k as vt,l as Tt,m as zt,s as bt,t as tt}from"./chunk-ZK43JB4A.js";import{$b as W,Aa as J,Ba as ht,Cb as B,Dc as yt,Eb as w,Ec as wt,Fc as A,Gc as N,Hc as Ct,Lb as T,Mb as m,Nb as mt,Pb as pt,Qb as Q,Sc as j,Wb as z,Xb as b,Yb as E,Zb as x,_b as V,ac as ut,ca as nt,da as st,fc as _t,gc as y,hc as gt,ia as ot,ib as _,ic as ft,lc as k,mc as Y,nc as L,ob as ct,oc as O,pa as lt,qa as rt,ra as at,rc as $,sa as G,ua as M,yb as H,zb as dt}from"./chunk-6QJHEOXN.js";import{a as Z,b as X}from"./chunk-YQFG5XE2.js";var ge=(()=>{class i extends U{static \u0275fac=(()=>{let t;return function(n){return(t||(t=M(i)))(n||i)}})();static \u0275cmp=H({type:i,selectors:[["BlankIcon"]],features:[B],decls:2,vars:0,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["width","1","height","1","fill","currentColor","fill-opacity","0"]],template:function(e,n){e&1&&(G(),z(0,"svg",0),E(1,"rect",1),b())},encapsulation:2})}return i})();var Ce=(()=>{class i extends U{pathId;ngOnInit(){this.pathId="url(#"+Vt()+")"}static \u0275fac=(()=>{let t;return function(n){return(t||(t=M(i)))(n||i)}})();static \u0275cmp=H({type:i,selectors:[["SearchIcon"]],features:[B],decls:6,vars:7,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["fill-rule","evenodd","clip-rule","evenodd","d","M2.67602 11.0265C3.6661 11.688 4.83011 12.0411 6.02086 12.0411C6.81149 12.0411 7.59438 11.8854 8.32483 11.5828C8.87005 11.357 9.37808 11.0526 9.83317 10.6803L12.9769 13.8241C13.0323 13.8801 13.0983 13.9245 13.171 13.9548C13.2438 13.985 13.3219 14.0003 13.4007 14C13.4795 14.0003 13.5575 13.985 13.6303 13.9548C13.7031 13.9245 13.7691 13.8801 13.8244 13.8241C13.9367 13.7116 13.9998 13.5592 13.9998 13.4003C13.9998 13.2414 13.9367 13.089 13.8244 12.9765L10.6807 9.8328C11.053 9.37773 11.3573 8.86972 11.5831 8.32452C11.8857 7.59408 12.0414 6.81119 12.0414 6.02056C12.0414 4.8298 11.6883 3.66579 11.0268 2.67572C10.3652 1.68564 9.42494 0.913972 8.32483 0.45829C7.22472 0.00260857 6.01418 -0.116618 4.84631 0.115686C3.67844 0.34799 2.60568 0.921393 1.76369 1.76338C0.921698 2.60537 0.348296 3.67813 0.115991 4.84601C-0.116313 6.01388 0.00291375 7.22441 0.458595 8.32452C0.914277 9.42464 1.68595 10.3649 2.67602 11.0265ZM3.35565 2.0158C4.14456 1.48867 5.07206 1.20731 6.02086 1.20731C7.29317 1.20731 8.51338 1.71274 9.41304 2.6124C10.3127 3.51206 10.8181 4.73226 10.8181 6.00457C10.8181 6.95337 10.5368 7.88088 10.0096 8.66978C9.48251 9.45868 8.73328 10.0736 7.85669 10.4367C6.98011 10.7997 6.01554 10.8947 5.08496 10.7096C4.15439 10.5245 3.2996 10.0676 2.62869 9.39674C1.95778 8.72583 1.50089 7.87104 1.31579 6.94046C1.13068 6.00989 1.22568 5.04532 1.58878 4.16874C1.95187 3.29215 2.56675 2.54292 3.35565 2.0158Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(e,n){e&1&&(G(),z(0,"svg",0)(1,"g"),E(2,"path",1),b(),z(3,"defs")(4,"clipPath",2),E(5,"rect",3),b()()()),e&2&&(Q(n.getClassNames()),T("aria-label",n.ariaLabel)("aria-hidden",n.ariaHidden)("role",n.role),_(),T("clip-path",n.pathId),_(3),m("id",n.pathId))},encapsulation:2})}return i})();var Dt=["content"],Bt=["item"],Wt=["loader"],kt=["loadericon"],At=["element"],Qt=["*"],$t=(i,h,t)=>({"p-virtualscroller":!0,"p-virtualscroller-inline":i,"p-virtualscroller-both p-both-scroll":h,"p-virtualscroller-horizontal p-horizontal-scroll":t}),it=(i,h)=>({$implicit:i,options:h}),Nt=i=>({"p-virtualscroller-content":!0,"p-virtualscroller-loading ":i}),jt=i=>({"p-virtualscroller-loader-mask":i}),qt=i=>({numCols:i}),Ht=i=>({options:i}),Zt=()=>({styleClass:"p-virtualscroller-loading-icon"}),Gt=(i,h)=>({rows:i,columns:h});function Jt(i,h){i&1&&W(0)}function Kt(i,h){if(i&1&&(x(0),w(1,Jt,1,0,"ng-container",10),V()),i&2){let t=y(2);_(),m("ngTemplateOutlet",t.contentTemplate||t._contentTemplate)("ngTemplateOutletContext",N(2,it,t.loadedItems,t.getContentOptions()))}}function Ut(i,h){i&1&&W(0)}function Xt(i,h){if(i&1&&(x(0),w(1,Ut,1,0,"ng-container",10),V()),i&2){let t=h.$implicit,e=h.index,n=y(3);_(),m("ngTemplateOutlet",n.itemTemplate||n._itemTemplate)("ngTemplateOutletContext",N(2,it,t,n.getOptions(e)))}}function Yt(i,h){if(i&1&&(z(0,"div",11,3),w(2,Xt,2,5,"ng-container",12),b()),i&2){let t=y(2);pt(t.contentStyle),Q(t.contentStyleClass),m("ngClass",A(8,Nt,t.d_loading)),T("data-pc-section","content"),_(2),m("ngForOf",t.loadedItems)("ngForTrackBy",t._trackBy)}}function te(i,h){if(i&1&&E(0,"div",13),i&2){let t=y(2);m("ngStyle",t.spacerStyle),T("data-pc-section","spacer")}}function ee(i,h){i&1&&W(0)}function ie(i,h){if(i&1&&(x(0),w(1,ee,1,0,"ng-container",10),V()),i&2){let t=h.index,e=y(4);_(),m("ngTemplateOutlet",e.loaderTemplate||e._loaderTemplate)("ngTemplateOutletContext",A(4,Ht,e.getLoaderOptions(t,e.both&&A(2,qt,e.numItemsInViewport.cols))))}}function ne(i,h){if(i&1&&(x(0),w(1,ie,2,6,"ng-container",15),V()),i&2){let t=y(3);_(),m("ngForOf",t.loaderArr)}}function se(i,h){i&1&&W(0)}function oe(i,h){if(i&1&&(x(0),w(1,se,1,0,"ng-container",10),V()),i&2){let t=y(4);_(),m("ngTemplateOutlet",t.loaderIconTemplate||t._loaderIconTemplate)("ngTemplateOutletContext",A(3,Ht,wt(2,Zt)))}}function le(i,h){i&1&&E(0,"SpinnerIcon",16),i&2&&(m("styleClass","p-virtualscroller-loading-icon pi-spin"),T("data-pc-section","loadingIcon"))}function re(i,h){if(i&1&&w(0,oe,2,5,"ng-container",6)(1,le,1,2,"ng-template",null,5,j),i&2){let t=$(2),e=y(3);m("ngIf",e.loaderIconTemplate||e._loaderIconTemplate)("ngIfElse",t)}}function ae(i,h){if(i&1&&(z(0,"div",14),w(1,ne,2,1,"ng-container",6)(2,re,3,2,"ng-template",null,4,j),b()),i&2){let t=$(3),e=y(2);m("ngClass",A(4,jt,!e.loaderTemplate)),T("data-pc-section","loader"),_(),m("ngIf",e.loaderTemplate||e._loaderTemplate)("ngIfElse",t)}}function he(i,h){if(i&1){let t=ut();x(0),z(1,"div",7,1),_t("scroll",function(n){rt(t);let s=y();return at(s.onContainerScroll(n))}),w(3,Kt,2,5,"ng-container",6)(4,Yt,3,10,"ng-template",null,2,j)(6,te,1,2,"div",8)(7,ae,4,6,"div",9),b(),V()}if(i&2){let t=$(5),e=y();_(),Q(e._styleClass),m("ngStyle",e._style)("ngClass",Ct(12,$t,e.inline,e.both,e.horizontal)),T("id",e._id)("tabindex",e.tabindex)("data-pc-name","scroller")("data-pc-section","root"),_(2),m("ngIf",e.contentTemplate||e._contentTemplate)("ngIfElse",t),_(3),m("ngIf",e._showSpacer),_(),m("ngIf",!e.loaderDisabled&&e._showLoader&&e.d_loading)}}function ce(i,h){i&1&&W(0)}function de(i,h){if(i&1&&(x(0),w(1,ce,1,0,"ng-container",10),V()),i&2){let t=y(2);_(),m("ngTemplateOutlet",t.contentTemplate||t._contentTemplate)("ngTemplateOutletContext",N(5,it,t.items,N(2,Gt,t._items,t.loadedColumns)))}}function me(i,h){if(i&1&&(ft(0),w(1,de,2,8,"ng-container",17)),i&2){let t=y();_(),m("ngIf",t.contentTemplate||t._contentTemplate)}}var pe=({dt:i})=>`
1
+ import{a as Ft,h as U,i as Pt}from"./chunk-O44DI62I.js";import{Ea as Vt,Ma as Lt,Na as K,R as Et,Va as Ot,W as R,da as D,fa as et,ja as xt}from"./chunk-MGIEURA2.js";import{j as St,l as It,m as vt,n as Tt,o as zt,u as bt,x as tt}from"./chunk-DM2JLWKE.js";import{$b as W,Aa as J,Ba as ht,Cb as B,Dc as yt,Eb as w,Ec as wt,Fc as A,Gc as N,Hc as Ct,Lb as T,Mb as m,Nb as mt,Pb as pt,Qb as Q,Sc as j,Wb as z,Xb as b,Yb as E,Zb as x,_b as V,ac as ut,ca as nt,da as st,fc as _t,gc as y,hc as gt,ia as ot,ib as _,ic as ft,lc as k,mc as Y,nc as L,ob as ct,oc as O,pa as lt,qa as rt,ra as at,rc as $,sa as G,ua as M,yb as H,zb as dt}from"./chunk-6QJHEOXN.js";import{a as Z,b as X}from"./chunk-YQFG5XE2.js";var ge=(()=>{class i extends U{static \u0275fac=(()=>{let t;return function(n){return(t||(t=M(i)))(n||i)}})();static \u0275cmp=H({type:i,selectors:[["BlankIcon"]],features:[B],decls:2,vars:0,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["width","1","height","1","fill","currentColor","fill-opacity","0"]],template:function(e,n){e&1&&(G(),z(0,"svg",0),E(1,"rect",1),b())},encapsulation:2})}return i})();var Ce=(()=>{class i extends U{pathId;ngOnInit(){this.pathId="url(#"+Vt()+")"}static \u0275fac=(()=>{let t;return function(n){return(t||(t=M(i)))(n||i)}})();static \u0275cmp=H({type:i,selectors:[["SearchIcon"]],features:[B],decls:6,vars:7,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["fill-rule","evenodd","clip-rule","evenodd","d","M2.67602 11.0265C3.6661 11.688 4.83011 12.0411 6.02086 12.0411C6.81149 12.0411 7.59438 11.8854 8.32483 11.5828C8.87005 11.357 9.37808 11.0526 9.83317 10.6803L12.9769 13.8241C13.0323 13.8801 13.0983 13.9245 13.171 13.9548C13.2438 13.985 13.3219 14.0003 13.4007 14C13.4795 14.0003 13.5575 13.985 13.6303 13.9548C13.7031 13.9245 13.7691 13.8801 13.8244 13.8241C13.9367 13.7116 13.9998 13.5592 13.9998 13.4003C13.9998 13.2414 13.9367 13.089 13.8244 12.9765L10.6807 9.8328C11.053 9.37773 11.3573 8.86972 11.5831 8.32452C11.8857 7.59408 12.0414 6.81119 12.0414 6.02056C12.0414 4.8298 11.6883 3.66579 11.0268 2.67572C10.3652 1.68564 9.42494 0.913972 8.32483 0.45829C7.22472 0.00260857 6.01418 -0.116618 4.84631 0.115686C3.67844 0.34799 2.60568 0.921393 1.76369 1.76338C0.921698 2.60537 0.348296 3.67813 0.115991 4.84601C-0.116313 6.01388 0.00291375 7.22441 0.458595 8.32452C0.914277 9.42464 1.68595 10.3649 2.67602 11.0265ZM3.35565 2.0158C4.14456 1.48867 5.07206 1.20731 6.02086 1.20731C7.29317 1.20731 8.51338 1.71274 9.41304 2.6124C10.3127 3.51206 10.8181 4.73226 10.8181 6.00457C10.8181 6.95337 10.5368 7.88088 10.0096 8.66978C9.48251 9.45868 8.73328 10.0736 7.85669 10.4367C6.98011 10.7997 6.01554 10.8947 5.08496 10.7096C4.15439 10.5245 3.2996 10.0676 2.62869 9.39674C1.95778 8.72583 1.50089 7.87104 1.31579 6.94046C1.13068 6.00989 1.22568 5.04532 1.58878 4.16874C1.95187 3.29215 2.56675 2.54292 3.35565 2.0158Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(e,n){e&1&&(G(),z(0,"svg",0)(1,"g"),E(2,"path",1),b(),z(3,"defs")(4,"clipPath",2),E(5,"rect",3),b()()()),e&2&&(Q(n.getClassNames()),T("aria-label",n.ariaLabel)("aria-hidden",n.ariaHidden)("role",n.role),_(),T("clip-path",n.pathId),_(3),m("id",n.pathId))},encapsulation:2})}return i})();var Dt=["content"],Bt=["item"],Wt=["loader"],kt=["loadericon"],At=["element"],Qt=["*"],$t=(i,h,t)=>({"p-virtualscroller":!0,"p-virtualscroller-inline":i,"p-virtualscroller-both p-both-scroll":h,"p-virtualscroller-horizontal p-horizontal-scroll":t}),it=(i,h)=>({$implicit:i,options:h}),Nt=i=>({"p-virtualscroller-content":!0,"p-virtualscroller-loading ":i}),jt=i=>({"p-virtualscroller-loader-mask":i}),qt=i=>({numCols:i}),Ht=i=>({options:i}),Zt=()=>({styleClass:"p-virtualscroller-loading-icon"}),Gt=(i,h)=>({rows:i,columns:h});function Jt(i,h){i&1&&W(0)}function Kt(i,h){if(i&1&&(x(0),w(1,Jt,1,0,"ng-container",10),V()),i&2){let t=y(2);_(),m("ngTemplateOutlet",t.contentTemplate||t._contentTemplate)("ngTemplateOutletContext",N(2,it,t.loadedItems,t.getContentOptions()))}}function Ut(i,h){i&1&&W(0)}function Xt(i,h){if(i&1&&(x(0),w(1,Ut,1,0,"ng-container",10),V()),i&2){let t=h.$implicit,e=h.index,n=y(3);_(),m("ngTemplateOutlet",n.itemTemplate||n._itemTemplate)("ngTemplateOutletContext",N(2,it,t,n.getOptions(e)))}}function Yt(i,h){if(i&1&&(z(0,"div",11,3),w(2,Xt,2,5,"ng-container",12),b()),i&2){let t=y(2);pt(t.contentStyle),Q(t.contentStyleClass),m("ngClass",A(8,Nt,t.d_loading)),T("data-pc-section","content"),_(2),m("ngForOf",t.loadedItems)("ngForTrackBy",t._trackBy)}}function te(i,h){if(i&1&&E(0,"div",13),i&2){let t=y(2);m("ngStyle",t.spacerStyle),T("data-pc-section","spacer")}}function ee(i,h){i&1&&W(0)}function ie(i,h){if(i&1&&(x(0),w(1,ee,1,0,"ng-container",10),V()),i&2){let t=h.index,e=y(4);_(),m("ngTemplateOutlet",e.loaderTemplate||e._loaderTemplate)("ngTemplateOutletContext",A(4,Ht,e.getLoaderOptions(t,e.both&&A(2,qt,e.numItemsInViewport.cols))))}}function ne(i,h){if(i&1&&(x(0),w(1,ie,2,6,"ng-container",15),V()),i&2){let t=y(3);_(),m("ngForOf",t.loaderArr)}}function se(i,h){i&1&&W(0)}function oe(i,h){if(i&1&&(x(0),w(1,se,1,0,"ng-container",10),V()),i&2){let t=y(4);_(),m("ngTemplateOutlet",t.loaderIconTemplate||t._loaderIconTemplate)("ngTemplateOutletContext",A(3,Ht,wt(2,Zt)))}}function le(i,h){i&1&&E(0,"SpinnerIcon",16),i&2&&(m("styleClass","p-virtualscroller-loading-icon pi-spin"),T("data-pc-section","loadingIcon"))}function re(i,h){if(i&1&&w(0,oe,2,5,"ng-container",6)(1,le,1,2,"ng-template",null,5,j),i&2){let t=$(2),e=y(3);m("ngIf",e.loaderIconTemplate||e._loaderIconTemplate)("ngIfElse",t)}}function ae(i,h){if(i&1&&(z(0,"div",14),w(1,ne,2,1,"ng-container",6)(2,re,3,2,"ng-template",null,4,j),b()),i&2){let t=$(3),e=y(2);m("ngClass",A(4,jt,!e.loaderTemplate)),T("data-pc-section","loader"),_(),m("ngIf",e.loaderTemplate||e._loaderTemplate)("ngIfElse",t)}}function he(i,h){if(i&1){let t=ut();x(0),z(1,"div",7,1),_t("scroll",function(n){rt(t);let s=y();return at(s.onContainerScroll(n))}),w(3,Kt,2,5,"ng-container",6)(4,Yt,3,10,"ng-template",null,2,j)(6,te,1,2,"div",8)(7,ae,4,6,"div",9),b(),V()}if(i&2){let t=$(5),e=y();_(),Q(e._styleClass),m("ngStyle",e._style)("ngClass",Ct(12,$t,e.inline,e.both,e.horizontal)),T("id",e._id)("tabindex",e.tabindex)("data-pc-name","scroller")("data-pc-section","root"),_(2),m("ngIf",e.contentTemplate||e._contentTemplate)("ngIfElse",t),_(3),m("ngIf",e._showSpacer),_(),m("ngIf",!e.loaderDisabled&&e._showLoader&&e.d_loading)}}function ce(i,h){i&1&&W(0)}function de(i,h){if(i&1&&(x(0),w(1,ce,1,0,"ng-container",10),V()),i&2){let t=y(2);_(),m("ngTemplateOutlet",t.contentTemplate||t._contentTemplate)("ngTemplateOutletContext",N(5,it,t.items,N(2,Gt,t._items,t.loadedColumns)))}}function me(i,h){if(i&1&&(ft(0),w(1,de,2,8,"ng-container",17)),i&2){let t=y();_(),m("ngIf",t.contentTemplate||t._contentTemplate)}}var pe=({dt:i})=>`
2
2
  .p-virtualscroller {
3
3
  position: relative;
4
4
  overflow: auto;
@@ -0,0 +1 @@
1
+ import{a as T,b as J}from"./chunk-VKUW7E75.js";import"./chunk-LBXNL7E4.js";import{m as j}from"./chunk-Q4XWXOWE.js";import"./chunk-WL6ZZCYW.js";import{a as R,b as O}from"./chunk-5U7KZJ3H.js";import"./chunk-FHJOSHI3.js";import{i as z}from"./chunk-J3HFAWXU.js";import"./chunk-VM56C6ZV.js";import{a as G,b as H}from"./chunk-ISIYG4D5.js";import"./chunk-ALLR2NXQ.js";import"./chunk-FNGX2XFA.js";import"./chunk-BFEM6LX7.js";import{w as D,x as N,y as L,z as q}from"./chunk-O44DI62I.js";import"./chunk-DTYVTTET.js";import"./chunk-MGIEURA2.js";import"./chunk-TOR7QRRB.js";import{a as V}from"./chunk-YQYRAH7V.js";import"./chunk-KL3TPLRB.js";import"./chunk-RVUOVLL5.js";import"./chunk-GGQ7LRWG.js";import"./chunk-F2X3VGZZ.js";import{p as E,u as I}from"./chunk-DM2JLWKE.js";import{Dc as F,Eb as C,Ec as v,Mb as m,Oc as c,Pb as y,Pc as l,Rb as h,Sc as S,W as M,Wb as n,Xb as o,Y as k,Yb as u,_ as A,ac as x,fc as P,gc as a,h as b,ia as s,ib as r,qa as g,ra as _,s as f,sa as B,ta as w,yb as $}from"./chunk-6QJHEOXN.js";import"./chunk-YQFG5XE2.js";var K=()=>({height:"calc(100vh - 100px)"});function Q(t,d){if(t&1){let e=x();n(0,"p-button",6),P("onClick",function(){g(e);let p=a(2);return _(p.onFormat())}),o()}}function U(t,d){if(t&1){let e=x();n(0,"p-button",7),c(1,"async"),c(2,"async"),P("onClick",function(){g(e);let p=a(2);return _(p.migratePaymentAccount())}),o()}if(t&2){let e=a(2);m("disabled",l(1,2,e.countInBooks$)!==0)("pTooltip",l(2,4,e.countInBooks$)!==0?"Books already has entries. Please format before re-migrating.":null)}}function W(t,d){if(t&1&&(n(0,"div",3),C(1,Q,1,0,"p-button",4)(2,U,3,6,"p-button",5),o()),t&2){let e=a();r(),h(e.roleService.permissions().migrate.delete?1:-1),r(),h(e.roleService.permissions().migrate.create?2:-1)}}function X(t,d){if(t&1&&(n(0,"p-scroll-panel")(1,"p-panel")(2,"div",8),u(3,"app-migration-cards",9),c(4,"async"),B(),n(5,"svg",10),u(6,"path",11),o(),w(),u(7,"app-migration-cards",12),c(8,"async"),o()()()),t&2){let e=a();y(v(12,K)),r(),y(v(13,K)),r(2),m("migrationCount",l(4,8,e.countInPOS$))("migrationTitle",e.pageTitle),r(4),m("migrationCount",l(8,10,e.countInBooks$))("migrationTitle",e.pageTitle)}}var Ce=(()=>{class t{constructor(){this.migrateService=s(T),this.toastr=s(V),this.refresh$=new b(void 0),this.pageTitle="Payment Account",this.roleService=s(j)}ngOnInit(){let e=this.refresh$.pipe(k(()=>this.migrateService.getPaymentMethodAccountCount()),A(i=>console.log("API response:",i)),M(1));this.countInPOS$=e.pipe(f(i=>Number(i.pos))),this.countInBooks$=e.pipe(f(i=>Number(i.books)))}migratePaymentAccount(){this.migrateService.migratePaymentMethod().subscribe(e=>{this.refresh$.next(),this.toastr.success(e.message,"Migration Successful")})}onFormat(){confirm("Are you sure you want to format?")&&this.migrateService.formatPaymentAccount().subscribe(e=>{this.refresh$.next(),this.toastr.success(e.message,"Format Successful")})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=$({type:t,selectors:[["app-payment-account"]],features:[F([T])],decls:5,vars:1,consts:[["actionButton",""],["content",""],[3,"pageTitle"],[1,"d-flex","gap-2"],["label","Format","severity","danger"],["label","Create","tooltipPosition","left",3,"disabled","pTooltip"],["label","Format","severity","danger",3,"onClick"],["label","Create","tooltipPosition","left",3,"onClick","disabled","pTooltip"],[1,"flex","gap-30","flex-wrap",2,"display","flex","justify-content","center","align-items","center","gap","1rem","margin-top","40px"],["migrationPlace","Accounting",3,"migrationCount","migrationTitle"],["width","40","height","40","viewBox","0 0 24 24","fill","none"],["d","M8 5l8 7-8 7","stroke","#007bff","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],["migrationPlace","Books",3,"migrationCount","migrationTitle"]],template:function(i,p){i&1&&(n(0,"app-main-panel",2),C(1,W,3,2,"ng-template",null,0,S)(3,X,9,14,"ng-template",null,1,S),o()),i&2&&m("pageTitle",p.pageTitle)},dependencies:[z,I,E,O,R,H,G,q,L,J,N,D],encapsulation:2})}}return t})();export{Ce as PaymentAccountComponent};
File without changes
@@ -1,4 +1,4 @@
1
- import{a as M}from"./chunk-ME4ALIS7.js";import{Ma as D,Ua as C}from"./chunk-VMI3QWC6.js";import{s as z}from"./chunk-ZK43JB4A.js";import{Cb as v,Dc as b,Lb as c,Nb as g,Ob as u,Qb as p,Wb as y,Xb as f,ca as o,da as d,hc as h,ia as l,ic as m,ua as r,yb as a,zb as s}from"./chunk-6QJHEOXN.js";var j=["*"],$=({dt:e})=>`
1
+ import{a as M}from"./chunk-O44DI62I.js";import{Na as D,Va as C}from"./chunk-MGIEURA2.js";import{u as z}from"./chunk-DM2JLWKE.js";import{Cb as v,Dc as b,Lb as c,Nb as g,Ob as u,Qb as p,Wb as y,Xb as f,ca as o,da as d,hc as h,ia as l,ic as m,ua as r,yb as a,zb as s}from"./chunk-6QJHEOXN.js";var j=["*"],$=({dt:e})=>`
2
2
  .p-divider-horizontal {
3
3
  display: flex;
4
4
  width: 100%;
@@ -1 +1 @@
1
- import"./chunk-YQFG5XE2.js";var t=[{path:"",redirectTo:"users",pathMatch:"full"},{path:"",children:[{path:"users",loadComponent:()=>import("./chunk-ZY4AYAWJ.js").then(o=>o.UserPageComponent)},{path:"groups",loadComponent:()=>import("./chunk-X3FAXRYR.js").then(o=>o.GroupPageComponent)},{path:"groups/forms",loadComponent:()=>import("./chunk-RDQ7RWJC.js").then(o=>o.GroupFormComponent)}]}];export{t as USERS_ROUTES};
1
+ import"./chunk-YQFG5XE2.js";var t=[{path:"",redirectTo:"users",pathMatch:"full"},{path:"",children:[{path:"users",loadComponent:()=>import("./chunk-ZWNKUBMG.js").then(o=>o.UserPageComponent)},{path:"groups",loadComponent:()=>import("./chunk-RBNXJUFM.js").then(o=>o.GroupPageComponent)},{path:"groups/forms",loadComponent:()=>import("./chunk-3GYSEQ25.js").then(o=>o.GroupFormComponent)}]}];export{t as USERS_ROUTES};
@@ -1,4 +1,4 @@
1
- import{a as h}from"./chunk-ME4ALIS7.js";import{Ua as m}from"./chunk-VMI3QWC6.js";import{s as g}from"./chunk-ZK43JB4A.js";import{Cb as a,Dc as y,Wb as d,Xb as f,ca as u,da as r,hc as c,ia as s,ic as l,ua as p,yb as i,zb as b}from"./chunk-6QJHEOXN.js";var D=["*"],F=({dt:t})=>`
1
+ import{a as h}from"./chunk-O44DI62I.js";import{Va as m}from"./chunk-MGIEURA2.js";import{u as g}from"./chunk-DM2JLWKE.js";import{Cb as a,Dc as y,Wb as d,Xb as f,ca as u,da as r,hc as c,ia as s,ic as l,ua as p,yb as i,zb as b}from"./chunk-6QJHEOXN.js";var D=["*"],F=({dt:t})=>`
2
2
  .p-buttongroup .p-button {
3
3
  margin: 0;
4
4
  }
@@ -0,0 +1 @@
1
+ import{a as Le,b as Ne}from"./chunk-GIRWHO6Q.js";import{b as Me}from"./chunk-LBXNL7E4.js";import{a as Ae}from"./chunk-XKI7WLHE.js";import{a as je,b as Ve}from"./chunk-2ABEICLB.js";import"./chunk-KQZMRRMA.js";import"./chunk-ZC7ZENN7.js";import{m as pe}from"./chunk-Q4XWXOWE.js";import"./chunk-WL6ZZCYW.js";import{a as H,b as O}from"./chunk-3VQUNDVT.js";import{d as ke,i as Ie,j as Te,k as Fe}from"./chunk-BTFX33U6.js";import{a as De,b as ye}from"./chunk-BME4Z6DH.js";import"./chunk-VSDW2RJ5.js";import"./chunk-7L5IAWG2.js";import{a as y}from"./chunk-BT7Y4ADP.js";import"./chunk-MJGBBYIO.js";import"./chunk-CN6AT4LE.js";import"./chunk-OW2ND5HU.js";import"./chunk-JWNGZMSE.js";import"./chunk-II7KELI4.js";import"./chunk-FTBQKOYS.js";import"./chunk-L4ENW4RK.js";import"./chunk-KONCSTVQ.js";import"./chunk-FMAG3RQL.js";import{i as we}from"./chunk-J3HFAWXU.js";import"./chunk-VM56C6ZV.js";import{a as he,b as Ee}from"./chunk-ISIYG4D5.js";import"./chunk-ALLR2NXQ.js";import{b as h,c as Re,d as be,e as Se,f as Ce,g as ve,h as Pe}from"./chunk-FNGX2XFA.js";import"./chunk-BFEM6LX7.js";import{w as xe,x as _e}from"./chunk-O44DI62I.js";import"./chunk-DTYVTTET.js";import{c as N,e as ce,f as me,m as de,p as ue,v as fe,y as ge}from"./chunk-MGIEURA2.js";import{e as ae,l as se}from"./chunk-DZCJWJUG.js";import{a as le}from"./chunk-TOR7QRRB.js";import"./chunk-YQYRAH7V.js";import"./chunk-KL3TPLRB.js";import"./chunk-RVUOVLL5.js";import"./chunk-GGQ7LRWG.js";import"./chunk-F2X3VGZZ.js";import{j as ee,l as te,m as ie,r as ne,s as re,u as oe}from"./chunk-DM2JLWKE.js";import{Cb as z,D as B,Dc as W,Eb as _,Ec as X,Fc as V,L as G,Mb as x,Oc as A,P as $,Pb as J,Pc as Y,Qc as Z,Rb as D,Sc as b,Wb as o,Xb as a,Y as T,Yb as E,_ as F,ac as M,bd as L,c as I,ca as q,fc as j,gc as f,ia as g,ib as m,qa as P,ra as w,s as v,sc as d,tc as R,uc as Q,yb as K}from"./chunk-6QJHEOXN.js";import{a as l,b as c}from"./chunk-YQFG5XE2.js";var k=(()=>{class e{constructor(){this.httpService=g(le)}getPostRecurringExpenseLoader(){return this.httpService.get(void 0,"api/RecurringExpenseLoader/RecurringExpensesGenerate")}previewPostRecurringExpense(t){return this.httpService.post(void 0,"api/RecurringExpense/RecurringExpensesGeneratePreview",t)}submitPostRecurringExpense(t){return this.httpService.post(void 0,"api/RecurringExpense/RecurringExpensesGenerate",t)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=q({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var Oe={data:{data:[]},meta:{options:{expenses:[]},form:{date:"",number:"",listIDs:[]}},filter:{date:"",number:"",listIDs:[]}},U=Re(ve(Oe),Pe("PostRecurringExpenseStore"),be(e=>({hasCheckedRows:L(()=>e.data().data.some(s=>s.checked)),checkedPRE:L(()=>e.data().data.filter(s=>s.checked))})),Ce(e=>{let s=g(k);return{updateFilter:i=>{h(e,n=>c(l({},n),{filter:l(l({},n.filter),i)}))},emptyData(){h(e,i=>c(l({},i),{data:{data:[],totalCount:0}}))},onRowSelect(i){h(e,n=>{let r=n.data.data.map(p=>p.lastExpenseDate===i.lastExpenseDate?c(l({},p),{checked:!0}):p);return c(l({},n),{data:c(l({},n.data),{data:r})})})},onRowUnselect(i){h(e,n=>{let r=n.data.data.map(p=>p.lastExpenseDate===i.lastExpenseDate?c(l({},p),{checked:!1}):p);return c(l({},n),{data:c(l({},n.data),{data:r})})})},onHeaderCheckboxToggle(i){h(e,n=>{let r=n.data.data.map(p=>c(l({},p),{checked:i}));return c(l({},n),{data:c(l({},n.data),{data:r})})})},getPRELoader:H(I(T(()=>s.getPostRecurringExpenseLoader().pipe(O({next:i=>{h(e,n=>c(l({},n),{meta:i}))},error:i=>{console.error("Error fetching PRE Loader:",i)}}))))),getPREPreview:H(I(B(i=>i.date&&i.listIDs.length>0),v(i=>({Date:i.date,Number:i.number,ListIDs:i.listIDs})),T(i=>s.previewPostRecurringExpense(i).pipe(v(n=>c(l({},n),{data:n.data.map(r=>c(l({},r),{checked:!1}))})),O({next:n=>{h(e,r=>c(l({},r),{data:n}))},error:n=>{console.error("Error fetching PRE Preview:",n)}})))))}}),Se(e=>({onInit:()=>{e.getPRELoader(),e.getPREPreview(e.filter)}})));var Ue=()=>({height:"calc(100vh - 70px)"}),Be=e=>({"ng-invalid ng-dirty":e}),Ge=e=>["/pages/recurring/recurring-expense/details/",e];function $e(e,s){if(e&1){let t=M();o(0,"p-button",8),j("onClick",function(){P(t);let n=f(3);return w(n.onSubmitPRE())}),a()}}function qe(e,s){if(e&1&&_(0,$e,1,0,"p-button",7),e&2){let t=f(2);x("ngIf",t.store.hasCheckedRows())}}function Ke(e,s){if(e&1&&_(0,qe,1,1,"p-button",6),e&2){let t=f();D(t.roleService.permissions().recurring.create?0:-1)}}function ze(e,s){if(e&1&&(o(0,"div")(1,"span",20),d(2),a()()),e&2){let t=s.$implicit;m(2),R(t)}}function Je(e,s){if(e&1&&(o(0,"div"),_(1,ze,3,1,"div",19),a()),e&2){let t=f(2);m(),x("ngForOf",t.getErrors("listIDs"))}}function Qe(e,s){e&1&&(o(0,"th",21),E(1,"p-tableHeaderCheckbox"),a())}function We(e,s){if(e&1&&(o(0,"tr"),_(1,Qe,2,0,"th",21),o(2,"th"),d(3,"Name"),a(),o(4,"th"),d(5,"Date"),a(),o(6,"th"),d(7,"Asset Account"),a(),o(8,"th"),d(9,"Expense Account"),a(),o(10,"th",22),d(11,"Amount"),a()()),e&2){let t=f(2);m(),D(t.roleService.permissions().recurring.create?1:-1)}}function Xe(e,s){if(e&1&&(o(0,"td"),E(1,"p-tableCheckbox",24),a()),e&2){let t=f().$implicit;m(),x("value",t)}}function Ye(e,s){if(e&1&&(o(0,"tr"),_(1,Xe,2,1,"td"),o(2,"td")(3,"a",23),d(4),a()(),o(5,"td"),d(6),A(7,"date"),a(),o(8,"td"),d(9),a(),o(10,"td"),d(11),a(),o(12,"td",22),d(13),A(14,"number"),a()()),e&2){let t=s.$implicit,i=f(2);m(),D(i.roleService.permissions().recurring.create?1:-1),m(2),x("routerLink",V(12,Ge,t.id)),m(),Q(" ",t.name," "),m(2),R(Z(7,7,t.nextExpenseDate,"d MMM y")),m(3),R(t.paymentName),m(2),R(t.expenseName),m(2),R(Y(14,10,t.amount))}}function Ze(e,s){e&1&&(o(0,"tr")(1,"td",25)(2,"span"),d(3,"No records found."),a()()())}function et(e,s){if(e&1){let t=M();o(0,"p-panel")(1,"div",9)(2,"div",10)(3,"div",11)(4,"div",12)(5,"div",13)(6,"label",14),d(7,"Date"),a(),E(8,"p-datepicker",15),a()(),o(9,"div",12)(10,"div",13)(11,"label",14),d(12,"Recurring Expense"),a(),E(13,"p-multiselect",16),_(14,Je,2,1,"div",17),a()()()()(),E(15,"p-divider"),o(16,"p-table",18),j("onHeaderCheckboxToggle",function(n){P(t);let r=f();return w(r.onHeaderCheckboxToggle(n))})("onRowSelect",function(n){P(t);let r=f();return w(r.onRowSelect(n))})("onRowUnselect",function(n){P(t);let r=f();return w(r.onRowUnselect(n))}),_(17,We,12,1,"ng-template",null,2,b)(19,Ye,15,14,"ng-template",null,3,b)(21,Ze,4,0,"ng-template",null,4,b),a()()}if(e&2){let t=f();J(X(7,Ue)),m(),x("formGroup",t.form),m(12),x("ngClass",V(8,Be,t.isInvalid("listIDs")))("options",t.store.meta().options.expenses),m(),x("ngIf",t.isInvalid("listIDs")),m(2),x("value",t.store.data().data)}}var Gt=(()=>{class e extends Ae{constructor(){super(),this.store=g(U),this.fb=g(fe),this.dayjsService=g(Me),this.PREService=g(k),this.roleService=g(pe)}ngOnInit(){this.initForm(),this.form.valueChanges.pipe(G(300),$(),y("Form Value Changes"),v(t=>Object.entries(t).reduce((i,[n,r])=>{switch(n){case"date":typeof r=="object"&&r!==null&&!Array.isArray(r)?i[n]=this.dayjsService.from(r)?this.dayjsService.format(r):null:(typeof r=="string"||typeof r=="number"||r instanceof Date)&&!Array.isArray(r)?i[n]=r!=null?String(r):null:i[n]=null;break;default:i[n]=r===null?"":r;break}return i},{})),y("Mapped Form Value"),F(t=>{(!t.listIDs||t.listIDs.length===0)&&this.store.emptyData(),this.store.updateFilter(t)})).subscribe()}initForm(){let{date:t,listIDs:i,number:n}=this.store.filter();this.form=this.fb.group({date:this.fb.control(this.dayjsService.from(t)?this.dayjsService.from(t).toDate():this.dayjsService.now.toDate(),[N.required]),number:this.fb.control(n||""),listIDs:this.fb.control(i,[N.required])})}onRowSelect(t){this.store.onRowSelect(t.data)}onRowUnselect(t){if(Array.isArray(t.data)){t.data.forEach(i=>{this.store.onRowUnselect(i)});return}else this.store.onRowUnselect(t.data)}onHeaderCheckboxToggle(t){this.store.onHeaderCheckboxToggle(t.checked)}onSubmitPRE(){console.log(this.store.checkedPRE());let i=this.store.checkedPRE().reduce((r,p)=>(r[p.id]||(r[p.id]={ID:p.id,ListDate:[]}),r[p.id].ListDate.push(p.lastExpenseDate),r),{}),n=Object.values(i);console.log("Submitting PRE with body:",n),this.PREService.submitPostRecurringExpense(n).pipe(y("Submit Post Recurring Expense"),F(()=>{let r=this.form.getRawValue(),p=Object.entries(r).reduce((S,[C,u])=>{switch(C){case"date":typeof u=="object"&&u!==null&&!Array.isArray(u)?S[C]=this.dayjsService.from(u)?this.dayjsService.format(u):null:(typeof u=="string"||typeof u=="number"||u instanceof Date)&&!Array.isArray(u)?S[C]=u!=null?String(u):null:S[C]=null;break;default:S[C]=u===null?"":u;break}return S},{});this.store.updateFilter(p)})).subscribe()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=K({type:e,selectors:[["app-post-recurring-expense"]],features:[W([U]),z],decls:5,vars:1,consts:[["actionButton",""],["content",""],["header",""],["body",""],["emptymessage",""],["pageTitle","Post Recurring Expense",3,"scrollable"],["label","Submit"],["label","Submit",3,"onClick",4,"ngIf"],["label","Submit",3,"onClick"],[1,"row",3,"formGroup"],[1,"col-6"],[1,"row"],[1,"col"],[1,"d-flex","flex-column"],["for",""],["fluid","","formControlName","date"],["display","chip","fluid","","formControlName","listIDs","optionLabel","name","optionValue","id","placeholder","Select Recurring Expenses",3,"ngClass","options"],[4,"ngIf"],["dataKey","lastExpenseDate",3,"onHeaderCheckboxToggle","onRowSelect","onRowUnselect","value"],[4,"ngFor","ngForOf"],[1,"text-danger"],[2,"width","1rem"],[1,"text-end"],["target","_blank",1,"link","link-primary",3,"routerLink"],[3,"value"],["colspan","6"]],template:function(i,n){i&1&&(o(0,"app-main-panel",5),_(1,Ke,1,1,"ng-template",null,0,b)(3,et,23,10,"ng-template",null,1,b),a()),i&2&&x("scrollable",!0)},dependencies:[we,oe,ee,te,ie,re,ne,Ee,he,Ne,Le,ye,De,Ve,je,ge,ce,me,de,ue,Fe,ke,Ie,Te,_e,xe,se,ae],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return e})();export{Gt as PostRecurringExpenseComponent};
@@ -0,0 +1 @@
1
+ import{a as A}from"./chunk-4IMFKRR6.js";import{a as Me}from"./chunk-SVGPDGYN.js";import{a as ne}from"./chunk-2JFOEOZ2.js";import{b as Ne}from"./chunk-LBXNL7E4.js";import{a as Re}from"./chunk-XKI7WLHE.js";import"./chunk-WL6ZZCYW.js";import{a as M,b as P}from"./chunk-3VQUNDVT.js";import{d as Ve,i as Je,j as De,k as ke}from"./chunk-BTFX33U6.js";import{a as Ee,b as Ie}from"./chunk-BME4Z6DH.js";import"./chunk-VSDW2RJ5.js";import"./chunk-7L5IAWG2.js";import"./chunk-MJGBBYIO.js";import"./chunk-CN6AT4LE.js";import{a as Ae,b as Fe}from"./chunk-OW2ND5HU.js";import"./chunk-JWNGZMSE.js";import"./chunk-II7KELI4.js";import"./chunk-FTBQKOYS.js";import"./chunk-L4ENW4RK.js";import"./chunk-KONCSTVQ.js";import"./chunk-FMAG3RQL.js";import{i as Te}from"./chunk-J3HFAWXU.js";import"./chunk-VM56C6ZV.js";import{a as ge,b as he}from"./chunk-ISIYG4D5.js";import"./chunk-ALLR2NXQ.js";import{a as Se,b as w,c as Ce,d as ve,e as we,f as ye,g as je}from"./chunk-FNGX2XFA.js";import"./chunk-BFEM6LX7.js";import{n as ue,o as ce,w as fe,x as _e,y as xe,z as be}from"./chunk-O44DI62I.js";import"./chunk-DTYVTTET.js";import{b as oe,e as re,f as ae,k as le,m as me,p as pe,v as se,y as de}from"./chunk-MGIEURA2.js";import"./chunk-DZCJWJUG.js";import"./chunk-TOR7QRRB.js";import"./chunk-YQYRAH7V.js";import"./chunk-KL3TPLRB.js";import"./chunk-RVUOVLL5.js";import"./chunk-GGQ7LRWG.js";import"./chunk-F2X3VGZZ.js";import{j as X,l as Y,m as Z,r as ee,s as te,u as ie}from"./chunk-DM2JLWKE.js";import{Cb as L,Dc as Q,Eb as g,Fc as E,Ha as D,Mb as s,Oc as I,Pc as $,Qc as R,Sc as C,Wb as a,Xb as r,Y as J,Yb as b,_ as B,ac as j,bd as y,c as F,db as G,eb as O,fc as T,gc as f,ia as v,ib as m,qa as h,ra as x,s as V,sc as p,tc as S,uc as k,wc as W,xc as K,yb as U,yc as N,zc as q}from"./chunk-6QJHEOXN.js";import{a as d,b as c}from"./chunk-YQFG5XE2.js";var He={data:{data:[],totalCount:0},meta:{options:{outlets:[]},filter:{number:null,from:null,to:null,pageNumber:1,pageSize:20,export:!1,exportPageNumber:1,exportPageSize:1e4,outletName:""}},filter:{number:null,from:null,to:null,pageNumber:1,pageSize:20,export:!1,exportPageNumber:1,exportPageSize:1e4,outletName:""}},z=Ce(je(He),ve(t=>({first:y(()=>(t.filter().pageNumber-1)*t.filter().pageSize+1),end:y(()=>Math.min(t.filter().pageNumber*t.filter().pageSize,t.data().totalCount)),hasCheckedRows:y(()=>t.data().data.some(l=>l.checked)),checkedAdjustment:y(()=>t.data().data.filter(l=>l.checked).map(l=>l.id))})),ye(t=>{let l=v(A);return{updateFilter(n){w(t,i=>c(d({},i),{filter:d(d({},i.filter),n)}))},onRowSelect(n){w(t,i=>{let o=i.data.data.map(u=>u.id===n.id?c(d({},u),{checked:!0}):u);return c(d({},i),{data:c(d({},i.data),{data:o})})})},onRowUnselect(n){w(t,i=>{let o=i.data.data.map(u=>u.id===n.id?c(d({},u),{checked:!1}):u);return c(d({},i),{data:c(d({},i.data),{data:o})})})},onHeaderCheckboxToggle(n){w(t,i=>{let o=i.data.data.map(u=>c(d({},u),{checked:n}));return c(d({},i),{data:c(d({},i.data),{data:o})})})},getGJAdjustmentLoader:M(F(J(()=>l.getGJAdjustmentLoader().pipe(P({next:n=>{w(t,i=>c(d({},i),{meta:n}))},error:n=>{console.error("Error fetching adjustment loader:",n)}}))))),getAdjustmentJournal:M(F(V(n=>Object.entries(n).reduce((i,[o,u])=>(u!=null&&(i[o]=u),i),{})),J(n=>l.getAdjustmentJournal(n).pipe(V(i=>c(d({},i),{data:i.data.map(o=>c(d({},o),{checked:!1}))})),P({next:i=>{w(t,o=>c(d({},o),{data:i}))},error:i=>{console.error("Error fetching customer invoice:",i)}})))))}}),we(t=>({onInit:()=>{t.getGJAdjustmentLoader(),t.getAdjustmentJournal(t.filter)}})));var H=t=>({"ng-invalid ng-dirty":t});function Be(t,l){if(t&1){let e=j();a(0,"p-button",10),T("onClick",function(){h(e);let i=f(2);return x(i.generateAdjusmentJournal())}),r()}}function Ge(t,l){if(t&1&&g(0,Be,1,0,"p-button",9),t&2){let e=f();s("ngIf",e.store.hasCheckedRows())}}function Oe(t,l){t&1&&(a(0,"tr")(1,"th",12),b(2,"p-tableHeaderCheckbox"),r(),a(3,"th",13),p(4,"Tag"),r(),a(5,"th",14),p(6,"Number"),r(),a(7,"th",15),p(8,"Date"),r(),a(9,"th",14),p(10,"Adjustment Qty"),r(),a(11,"th",13),p(12,"Type"),r(),a(13,"th",16),p(14,"State"),r(),a(15,"th",17),p(16,"Note"),r(),b(17,"th",18),r())}function Ue(t,l){if(t&1&&(a(0,"tr")(1,"td"),b(2,"p-tableCheckbox",19),r(),a(3,"td"),p(4),r(),a(5,"td")(6,"a",20),p(7),r()(),a(8,"td"),p(9),I(10,"date"),r(),a(11,"td"),p(12),I(13,"number"),r(),a(14,"td"),p(15),r(),a(16,"td"),p(17),r(),a(18,"td"),b(19,"div",21),r(),a(20,"td"),b(21,"p-button",22),r()()),t&2){let e=l.$implicit,n=f(2);m(2),s("value",e),m(2),S(e.outlet),m(2),s("href",n.authService.getTenantExternalURL()+"/menu/Adjustment/Adjustment/Archive/Info?ID="+e.id,O),m(),k(" ",e.number," "),m(2),S(R(10,12,e.date,"d MMM y")),m(3),S($(13,15,e.quantitySUM)),m(3),S(e.type),m(2),S(e.state),m(2),s("innerHTML",e.note,G),m(2),s("icon",e.integrated?"fa-solid fa-circle-check":"fa-solid fa-circle-xmark")("severity",e.integrated?"success":"danger")("text",!0)}}function Le(t,l){if(t&1&&p(0),t&2){let e=f(2);W(" Showing ",e.store.first()," to ",e.store.end()," of ",e.store.data().totalCount," entries ")}}function We(t,l){t&1&&(a(0,"tr")(1,"td",23)(2,"span"),p(3,"No records found."),r()()())}function Ke(t,l){if(t&1){let e=j();a(0,"p-panel")(1,"p-table",11),T("onRowSelect",function(i){h(e);let o=f();return x(o.onRowSelect(i))})("onRowUnselect",function(i){h(e);let o=f();return x(o.onRowUnselect(i))})("onHeaderCheckboxToggle",function(i){h(e);let o=f();return x(o.onHeaderCheckboxToggle(i))})("onPage",function(i){h(e);let o=f();return x(o.onPageChange(i))}),g(2,Oe,18,0,"ng-template",null,3,C)(4,Ue,22,17,"ng-template",null,4,C)(6,Le,1,3,"ng-template",null,5,C)(8,We,4,0,"ng-template",null,6,C),r()()}if(t&2){let e=f();m(),s("value",e.store.data().data)("paginator",!0)("rows",e.store.filter().pageSize)("totalRecords",e.store.data().totalCount)("lazy",!0)}}function qe(t,l){if(t&1&&(a(0,"span",33),p(1),I(2,"truncate"),r()),t&2){let e=l.$implicit;s("pTooltip",e.name),m(),k(" ",R(2,2,e.name,30)," ")}}function Qe(t,l){if(t&1&&(a(0,"div")(1,"span",35),p(2),r()()),t&2){let e=l.$implicit;m(2),S(e)}}function $e(t,l){if(t&1&&(a(0,"div"),g(1,Qe,3,1,"div",34),r()),t&2){let e=f(2);m(),s("ngForOf",e.getErrors("from"))}}function Xe(t,l){if(t&1&&(a(0,"div")(1,"span",35),p(2),r()()),t&2){let e=l.$implicit;m(2),S(e)}}function Ye(t,l){if(t&1&&(a(0,"div"),g(1,Xe,3,1,"div",34),r()),t&2){let e=f(2);m(),s("ngForOf",e.getErrors("to"))}}function Ze(t,l){if(t&1&&(a(0,"div")(1,"span",35),p(2),r()()),t&2){let e=l.$implicit;m(2),S(e)}}function et(t,l){if(t&1&&(a(0,"div"),g(1,Ze,3,1,"div",34),r()),t&2){let e=f(2);m(),s("ngForOf",e.getErrors("pageSize"))}}function tt(t,l){if(t&1&&(a(0,"form",24)(1,"div",25)(2,"label",26),p(3,"Tag"),r(),a(4,"p-select",27),g(5,qe,3,5,"ng-template",null,7,C),r()(),a(7,"div",25)(8,"label",26),p(9,"From - To"),r(),a(10,"div",28),b(11,"p-datepicker",29),g(12,$e,2,1,"div",30),b(13,"p-datepicker",31),g(14,Ye,2,1,"div",30),r()(),a(15,"div",25)(16,"label",26),p(17,"Page Size"),r(),b(18,"input",32),g(19,et,2,1,"div",30),r()()),t&2){let e=f();s("formGroup",e.form),m(4),s("virtualScrollItemSize",50)("options",e.store.meta().options.outlets),m(7),s("iconDisplay","input")("showIcon",!0)("ngClass",E(13,H,e.isInvalid("from"))),m(),s("ngIf",e.isInvalid("from")),m(),s("iconDisplay","input")("showIcon",!0)("ngClass",E(15,H,e.isInvalid("to"))),m(),s("ngIf",e.isInvalid("to")),m(4),s("ngClass",E(17,H,e.isInvalid("pageSize"))),m(),s("ngIf",e.isInvalid("pageSize"))}}var Bt=(()=>{class t extends Re{constructor(){super(),this.store=v(z),this.generateJournalService=v(A),this.authService=v(ne),this.isDialogFilterVisible=D(!1),this.isInitDialogFilterVisible=D(!1),this.fb=v(se),this.dayjsService=v(Ne)}ngOnInit(){this.initForm()}initForm(){let{number:e,from:n,to:i,pageNumber:o,pageSize:u,export:_,exportPageNumber:Pe,exportPageSize:ze}=this.store.filter();this.form=this.fb.group({number:this.fb.control(e),outletName:this.fb.control(""),from:this.fb.control(this.dayjsService.from(n)?this.dayjsService.from(n).toDate():null),to:this.fb.control(this.dayjsService.from(i)?this.dayjsService.from(i).toDate():null),pageNumber:this.fb.control(o),pageSize:this.fb.control(u),export:this.fb.control(_),exportPageNumber:this.fb.control(Pe),exportPageSize:this.fb.control(ze)})}onSearch(e){this.store.updateFilter(c(d({},this.store.filter()),{number:e,pageNumber:1}))}onFilterOKEvent(){if(this.form.invalid){this.form.markAllAsTouched();return}let e=Object.entries(this.form.getRawValue()).reduce((n,[i,o])=>{switch(i){case"from":typeof o=="object"?n[i]=this.dayjsService.from(o)?this.dayjsService.format(o):null:n[i]=o!=null?String(o):null;break;case"to":typeof o=="object"?n[i]=this.dayjsService.from(o)?this.dayjsService.format(o):null:n[i]=o!=null?String(o):null;break;default:n[i]=o===null?"":o;break}return n},{});this.store.updateFilter(e),this.isDialogFilterVisible.set(!1)}onRowSelect(e){this.store.onRowSelect(e.data)}onRowUnselect(e){if(Array.isArray(e.data)){e.data.forEach(n=>{this.store.onRowUnselect(n)});return}else this.store.onRowUnselect(e.data)}onHeaderCheckboxToggle(e){this.store.onHeaderCheckboxToggle(e.checked)}onPageChange(e){let n=e.first/e.rows;this.store.updateFilter(c(d({},this.store.filter()),{pageNumber:n+1}))}generateAdjusmentJournal(){this.generateJournalService.createAdjustmentJournal(this.store.checkedAdjustment()).pipe(B(()=>this.store.getAdjustmentJournal(this.store.filter))).subscribe()}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=U({type:t,selectors:[["app-adjustment-journal"]],features:[Q([z]),L],decls:7,vars:5,consts:[["actionButton",""],["content",""],["filters",""],["header",""],["body",""],["paginatorleft",""],["emptymessage",""],["item",""],["pageTitle","Adjustment",3,"isDialogFilterVisibleChange","isInitDialogFilterVisibleChange","filterConfirmed","search","isSearchableInput","isFilterable","isDialogFilterVisible","isInitDialogFilterVisible","scrollable"],["label","Generate Journal",3,"onClick",4,"ngIf"],["label","Generate Journal",3,"onClick"],["dataKey","id",3,"onRowSelect","onRowUnselect","onHeaderCheckboxToggle","onPage","value","paginator","rows","totalRecords","lazy"],[2,"width","1rem"],[2,"width","10rem"],[2,"width","12rem"],[2,"width","11rem"],[2,"width","9rem"],[2,"width","14rem"],[2,"width","4rem"],[3,"value"],["target","_blank",1,"link","link-primary",3,"href"],[3,"innerHTML"],[3,"icon","severity","text"],["colspan","9"],[1,"d-flex","flex-column","row-gap-3",3,"formGroup"],[1,"d-flex","flex-column"],["for","outlet"],["virtualScroll","","showClear","","filter","","filterBy","name","formControlName","outletName","appendTo","body","optionLabel","name","optionValue","name","placeholder","Select an Tag",3,"virtualScrollItemSize","options"],[1,"d-flex","flex-column","gap-2"],["showClear","","formControlName","from","styleClass","w-100","appendTo","body","inputId","icondisplay",3,"iconDisplay","showIcon","ngClass"],[4,"ngIf"],["showClear","","formControlName","to","styleClass","w-100","appendTo","body","inputId","icondisplay",3,"iconDisplay","showIcon","ngClass"],["type","text","pInputText","","formControlName","pageSize","appMaskNumber","",3,"ngClass"],[3,"pTooltip"],[4,"ngFor","ngForOf"],[1,"text-danger"]],template:function(n,i){if(n&1){let o=j();a(0,"app-main-panel",8),q("isDialogFilterVisibleChange",function(_){return h(o),N(i.isDialogFilterVisible,_)||(i.isDialogFilterVisible=_),x(_)})("isInitDialogFilterVisibleChange",function(_){return h(o),N(i.isInitDialogFilterVisible,_)||(i.isInitDialogFilterVisible=_),x(_)}),T("filterConfirmed",function(){return h(o),x(i.onFilterOKEvent())})("search",function(_){return h(o),x(i.onSearch(_))}),g(1,Ge,1,1,"ng-template",null,0,C)(3,Ke,10,5,"ng-template",null,1,C)(5,tt,20,19,"ng-template",null,2,C),r()}n&2&&(s("isSearchableInput",!0)("isFilterable",!0),K("isDialogFilterVisible",i.isDialogFilterVisible)("isInitDialogFilterVisible",i.isInitDialogFilterVisible),s("scrollable",!0))},dependencies:[Te,ke,Ve,Je,De,ie,X,Y,Z,te,ee,he,ge,_e,fe,Ie,Ee,Fe,Ae,de,le,oe,re,ae,me,pe,ce,ue,Se,be,xe,Me],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();export{Bt as AdjustmentJournalComponent};
@@ -1,4 +1,4 @@
1
- import{a as ce}from"./chunk-M4SSELXT.js";import{i as ie}from"./chunk-ZFNIPERQ.js";import{a as oe}from"./chunk-ME4ALIS7.js";import{La as Z,Ma as C,Ua as ee,a as X,d as J,sa as W,ta as Y}from"./chunk-VMI3QWC6.js";import{h as U,k as G,m as H,s as K}from"./chunk-ZK43JB4A.js";import{$c as P,Aa as k,Cb as D,Dc as j,Eb as d,Ec as A,Fc as R,Ha as E,Lb as s,Mb as t,Pb as _,Qb as v,Wb as $,Xb as I,Yb as x,Zb as w,_b as T,_c as h,ac as L,ba as M,ca as F,da as S,fc as Q,gc as f,ia as z,ib as l,lc as V,mc as N,nc as g,oc as m,pa as B,qa as u,ra as p,ua as y,yb as O,zb as q}from"./chunk-6QJHEOXN.js";var ae=["checkboxicon"],re=["input"],le=()=>({"p-checkbox-input":!0}),he=e=>({checked:e,class:"p-checkbox-icon"});function se(e,a){if(e&1&&x(0,"span",8),e&2){let o=f(3);t("ngClass",o.checkboxIcon),s("data-pc-section","icon")}}function be(e,a){e&1&&x(0,"CheckIcon",9),e&2&&(t("styleClass","p-checkbox-icon"),s("data-pc-section","icon"))}function de(e,a){if(e&1&&(w(0),d(1,se,1,2,"span",7)(2,be,1,2,"CheckIcon",6),T()),e&2){let o=f(2);l(),t("ngIf",o.checkboxIcon),l(),t("ngIf",!o.checkboxIcon)}}function ue(e,a){e&1&&x(0,"MinusIcon",9),e&2&&(t("styleClass","p-checkbox-icon"),s("data-pc-section","icon"))}function pe(e,a){if(e&1&&(w(0),d(1,de,3,2,"ng-container",4)(2,ue,1,2,"MinusIcon",6),T()),e&2){let o=f();l(),t("ngIf",o.checked),l(),t("ngIf",o._indeterminate())}}function ke(e,a){}function xe(e,a){e&1&&d(0,ke,0,0,"ng-template")}var fe=({dt:e})=>`
1
+ import{a as ce}from"./chunk-L4ENW4RK.js";import{a as ie}from"./chunk-ALLR2NXQ.js";import{a as oe}from"./chunk-O44DI62I.js";import{Ma as Z,Na as C,Va as ee,a as X,d as J,ta as W,ua as Y}from"./chunk-MGIEURA2.js";import{j as U,m as G,o as H,u as K}from"./chunk-DM2JLWKE.js";import{$c as P,Aa as k,Cb as D,Dc as j,Eb as d,Ec as A,Fc as R,Ha as E,Lb as s,Mb as t,Pb as _,Qb as v,Wb as $,Xb as I,Yb as x,Zb as w,_b as T,_c as h,ac as L,ba as M,ca as F,da as S,fc as Q,gc as f,ia as z,ib as l,lc as V,mc as N,nc as g,oc as m,pa as B,qa as u,ra as p,ua as y,yb as O,zb as q}from"./chunk-6QJHEOXN.js";var ae=["checkboxicon"],re=["input"],le=()=>({"p-checkbox-input":!0}),he=e=>({checked:e,class:"p-checkbox-icon"});function se(e,a){if(e&1&&x(0,"span",8),e&2){let o=f(3);t("ngClass",o.checkboxIcon),s("data-pc-section","icon")}}function be(e,a){e&1&&x(0,"CheckIcon",9),e&2&&(t("styleClass","p-checkbox-icon"),s("data-pc-section","icon"))}function de(e,a){if(e&1&&(w(0),d(1,se,1,2,"span",7)(2,be,1,2,"CheckIcon",6),T()),e&2){let o=f(2);l(),t("ngIf",o.checkboxIcon),l(),t("ngIf",!o.checkboxIcon)}}function ue(e,a){e&1&&x(0,"MinusIcon",9),e&2&&(t("styleClass","p-checkbox-icon"),s("data-pc-section","icon"))}function pe(e,a){if(e&1&&(w(0),d(1,de,3,2,"ng-container",4)(2,ue,1,2,"MinusIcon",6),T()),e&2){let o=f();l(),t("ngIf",o.checked),l(),t("ngIf",o._indeterminate())}}function ke(e,a){}function xe(e,a){e&1&&d(0,ke,0,0,"ng-template")}var fe=({dt:e})=>`
2
2
  .p-checkbox {
3
3
  position: relative;
4
4
  display: inline-flex;