dealpos 25.42.2 → 25.42.4

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 (150) hide show
  1. package/browser/{chunk-JU5FQANB.js → chunk-2UQLDUAC.js} +1 -1
  2. package/browser/{chunk-W7R2NCKA.js → chunk-2X5ASLFQ.js} +2 -2
  3. package/browser/{chunk-CKSMLIVU.js → chunk-2ZZ6LRSK.js} +4 -4
  4. package/browser/chunk-3TPCIQTX.js +1 -0
  5. package/browser/{chunk-QCEQZT7E.js → chunk-3VZD4NHF.js} +1 -1
  6. package/browser/{chunk-IJ3Y6CA4.js → chunk-426IRMLK.js} +1 -1
  7. package/browser/{chunk-4WW3BBDP.js → chunk-4QIOM7LI.js} +1 -1
  8. package/browser/{chunk-4WYJGX5K.js → chunk-4QUBIODV.js} +1 -1
  9. package/browser/{chunk-SHMXCJ6Q.js → chunk-56IONBTZ.js} +1 -1
  10. package/browser/{chunk-DKPNAGIM.js → chunk-56K6E74R.js} +1 -1
  11. package/browser/{chunk-7R3X2A2H.js → chunk-5OTEU5ZX.js} +1 -1
  12. package/browser/{chunk-BVVYVR6R.js → chunk-6NX4GWBD.js} +1 -1
  13. package/browser/{chunk-HQQWO76P.js → chunk-6PPRM5TJ.js} +1 -1
  14. package/browser/{chunk-A3CWPPXF.js → chunk-6SQ55MY2.js} +1 -1
  15. package/browser/{chunk-HA6VJJLI.js → chunk-7HOWFXKG.js} +1 -1
  16. package/browser/{chunk-SV4HJFAL.js → chunk-7O5TK73M.js} +1 -1
  17. package/browser/chunk-7PMDXUYJ.js +1 -0
  18. package/browser/{chunk-FKYUI33J.js → chunk-7SJSO64L.js} +1 -1
  19. package/browser/{chunk-DV4MQXAE.js → chunk-7WT2CL3Y.js} +1 -1
  20. package/browser/{chunk-ZSE5MOHQ.js → chunk-AAXRMRTM.js} +1 -1
  21. package/browser/{chunk-XBMOSDDE.js → chunk-AUOW2T4F.js} +1 -1
  22. package/browser/{chunk-EHV62EGB.js → chunk-B3EZA6CX.js} +12 -12
  23. package/browser/{chunk-7X35YY3T.js → chunk-B6L52L6A.js} +1 -1
  24. package/browser/chunk-BBGWXLHJ.js +1 -0
  25. package/browser/chunk-BKCZEGZR.js +14 -0
  26. package/browser/{chunk-QJ4LGJCR.js → chunk-BUPX3XPT.js} +1 -1
  27. package/browser/{chunk-P6LA3P5N.js → chunk-BW5D7NMN.js} +1 -1
  28. package/browser/chunk-BXQFETBZ.js +1 -0
  29. package/browser/chunk-CEKWDJF4.js +1 -0
  30. package/browser/{chunk-XGGQUHUR.js → chunk-CHETA67M.js} +1 -1
  31. package/browser/{chunk-VSF6PYZW.js → chunk-CKNQ2YZ5.js} +1 -1
  32. package/browser/{chunk-TQZQYUFG.js → chunk-CMHBQ7I6.js} +1 -1
  33. package/browser/{chunk-5BZEOCFN.js → chunk-CVL2DR7E.js} +1 -1
  34. package/browser/{chunk-QFO3KUMD.js → chunk-D5YUOO4X.js} +1 -1
  35. package/browser/{chunk-K7ON3WKW.js → chunk-D7S3W7TY.js} +1 -1
  36. package/browser/{chunk-GPP3J3W4.js → chunk-DBERRJC6.js} +1 -1
  37. package/browser/{chunk-4ODUHZAT.js → chunk-DDILJVFU.js} +1 -1
  38. package/browser/{chunk-VD4QQDNI.js → chunk-DKQHZLAC.js} +1 -1
  39. package/browser/{chunk-ZFXZABWG.js → chunk-DZM2KQQZ.js} +1 -1
  40. package/browser/chunk-E4DPE3J5.js +1 -0
  41. package/browser/{chunk-2CU7XQYN.js → chunk-EG4UO6IY.js} +1 -1
  42. package/browser/{chunk-NOQM2VPB.js → chunk-ELIDPKL7.js} +1 -1
  43. package/browser/{chunk-PDKNFOY7.js → chunk-EMW2WRXZ.js} +1 -1
  44. package/browser/{chunk-6A45AGTK.js → chunk-FCUQZ5CM.js} +1 -1
  45. package/browser/{chunk-Y6VMIGXC.js → chunk-FKLSH2TV.js} +1 -1
  46. package/browser/{chunk-47W54HJY.js → chunk-FUV2BXRH.js} +1 -1
  47. package/browser/{chunk-SEXQYEXV.js → chunk-FVG3VTH5.js} +1 -1
  48. package/browser/{chunk-5OS5VELO.js → chunk-FVKF2ZOS.js} +1 -1
  49. package/browser/{chunk-UEQT5HE5.js → chunk-FXLWJQC3.js} +1 -1
  50. package/browser/{chunk-IQ26VFNR.js → chunk-FZCJDAJY.js} +1 -1
  51. package/browser/{chunk-VGNMBCUC.js → chunk-G2NZ3D7U.js} +1 -1
  52. package/browser/{chunk-HAGFCQCM.js → chunk-G3XRMYTN.js} +1 -1
  53. package/browser/{chunk-2O3TR26P.js → chunk-GRXET2IV.js} +8 -8
  54. package/browser/{chunk-IU526HWZ.js → chunk-GTLBCZKI.js} +1 -1
  55. package/browser/{chunk-LQ3Q52LD.js → chunk-GVQSFCBR.js} +1 -1
  56. package/browser/{chunk-IQ4IMICT.js → chunk-GZSXRIAG.js} +1 -1
  57. package/browser/{chunk-EENVAF36.js → chunk-HUH7L2ZO.js} +1 -1
  58. package/browser/{chunk-772SQL5I.js → chunk-HZIKNLNL.js} +1 -1
  59. package/browser/chunk-I6NYJUEM.js +1 -0
  60. package/browser/{chunk-HGADEAZ4.js → chunk-IA7CYVCE.js} +1 -1
  61. package/browser/{chunk-CD3BSGAP.js → chunk-IJ6QEGE5.js} +1 -1
  62. package/browser/{chunk-TUQ4INQ4.js → chunk-IMEZ6PAI.js} +1 -1
  63. package/browser/{chunk-H6LHYTUN.js → chunk-J75KTT4W.js} +1 -1
  64. package/browser/{chunk-IRIE5DZT.js → chunk-J7BBAETB.js} +1 -1
  65. package/browser/{chunk-FAJUK2PL.js → chunk-JNZU3NGN.js} +1 -1
  66. package/browser/{chunk-PZANARAM.js → chunk-JOEBVACW.js} +1 -1
  67. package/browser/{chunk-UE53BLCC.js → chunk-JULIPCEM.js} +4 -4
  68. package/browser/{chunk-FNUNWZ2W.js → chunk-KIFEAYRI.js} +1 -1
  69. package/browser/{chunk-T5HYNGEA.js → chunk-KM74FUZX.js} +1 -1
  70. package/browser/{chunk-GOZYJRWV.js → chunk-KUPGFZQE.js} +1 -1
  71. package/browser/chunk-L35K766G.js +1 -0
  72. package/browser/{chunk-4XWCWJZC.js → chunk-L4BVAFES.js} +1 -1
  73. package/browser/{chunk-EOY5VQKV.js → chunk-LC77SA54.js} +2 -2
  74. package/browser/{chunk-Z5HBVHYO.js → chunk-LNYKIRHF.js} +1 -1
  75. package/browser/{chunk-AEHOTFB4.js → chunk-LQW5KOAB.js} +1 -1
  76. package/browser/{chunk-ERTAWD4X.js → chunk-LXSLO5QA.js} +1 -1
  77. package/browser/chunk-LZJVR4FQ.js +1 -0
  78. package/browser/{chunk-OG45AMIC.js → chunk-M5273AKK.js} +1 -1
  79. package/browser/chunk-MEUJUJB2.js +1 -0
  80. package/browser/{chunk-CRJOVQ56.js → chunk-MJ4WF7R3.js} +2 -2
  81. package/browser/{chunk-DNSE6AZ3.js → chunk-MLU3FELE.js} +1 -1
  82. package/browser/{chunk-TU4O5BX3.js → chunk-MXYELOCB.js} +1 -1
  83. package/browser/{chunk-QPXWIIQK.js → chunk-N6JJCZ2M.js} +1 -1
  84. package/browser/{chunk-G5P4GFMX.js → chunk-NGYW35CT.js} +1 -1
  85. package/browser/{chunk-AQC5G2DR.js → chunk-NKGA724S.js} +1 -1
  86. package/browser/{chunk-Q5IKPX3P.js → chunk-NM5ZUXKR.js} +1 -1
  87. package/browser/{chunk-GGPT7WIY.js → chunk-NUQK6FIB.js} +1 -1
  88. package/browser/{chunk-TRUZ46QL.js → chunk-NXSTJXP3.js} +1 -1
  89. package/browser/{chunk-W7Z44R3C.js → chunk-NZ5JPAQ5.js} +1 -1
  90. package/browser/{chunk-GINOZV6C.js → chunk-O6PVWRA5.js} +1 -1
  91. package/browser/{chunk-BXAYNP7A.js → chunk-O7SRWU2B.js} +1 -1
  92. package/browser/{chunk-QCXWKQ7Z.js → chunk-P3HCTQ6S.js} +1 -1
  93. package/browser/{chunk-SIH5NVFR.js → chunk-PGBIXI75.js} +1 -1
  94. package/browser/{chunk-HYZX6TUF.js → chunk-PLDUPO6N.js} +1 -1
  95. package/browser/{chunk-NXXNEU5Q.js → chunk-PNMCM55F.js} +1 -1
  96. package/browser/{chunk-VKJIDCM7.js → chunk-PTJ5SIZX.js} +1 -1
  97. package/browser/{chunk-HGM42PVN.js → chunk-PTZ5432I.js} +1 -1
  98. package/browser/{chunk-TIX624OU.js → chunk-PXTRJOQN.js} +1 -1
  99. package/browser/{chunk-GKKKOTYZ.js → chunk-Q4BNG6BK.js} +1 -1
  100. package/browser/{chunk-UQP7S73H.js → chunk-Q6HOM6AN.js} +1 -1
  101. package/browser/{chunk-53ACYG5V.js → chunk-Q6RSS3F7.js} +1 -1
  102. package/browser/{chunk-3A4C23H5.js → chunk-QIC57EUK.js} +1 -1
  103. package/browser/{chunk-2L54CRB2.js → chunk-QMNZ3US5.js} +1 -1
  104. package/browser/{chunk-PRBPKAI4.js → chunk-QOPR5ZBR.js} +1 -1
  105. package/browser/{chunk-ITLMINSX.js → chunk-QWYLRTIQ.js} +1 -1
  106. package/browser/{chunk-THXV6YJP.js → chunk-R24JXSUW.js} +1 -1
  107. package/browser/{chunk-3RWVYWJF.js → chunk-R6G33VWA.js} +1 -1
  108. package/browser/{chunk-3JVX2T6M.js → chunk-RDD5CPPK.js} +1 -1
  109. package/browser/{chunk-ZHIGBBGN.js → chunk-RJKR4QDZ.js} +7 -7
  110. package/browser/{chunk-KBO5VO7S.js → chunk-RQGT2FPJ.js} +1 -1
  111. package/browser/{chunk-DNBZTRXL.js → chunk-S3Y4J5BM.js} +1 -1
  112. package/browser/{chunk-EJFVZSWQ.js → chunk-SA2OFGXH.js} +1 -1
  113. package/browser/{chunk-SHPUXNKO.js → chunk-SDOP6ILP.js} +1 -1
  114. package/browser/{chunk-JYNN4IZB.js → chunk-SS5QJI73.js} +1 -1
  115. package/browser/{chunk-LWDGMGFV.js → chunk-SVCDSCAK.js} +1 -1
  116. package/browser/{chunk-TZ74SUXJ.js → chunk-SZUQ6U7I.js} +1 -1
  117. package/browser/{chunk-6G37ZXRX.js → chunk-T3BPEHU7.js} +1 -1
  118. package/browser/{chunk-C32V5IHL.js → chunk-TIRPKUJZ.js} +1 -1
  119. package/browser/{chunk-V52QD5BS.js → chunk-U54UEN3C.js} +1 -1
  120. package/browser/{chunk-XPEGAYJO.js → chunk-UCXUJQTY.js} +1 -1
  121. package/browser/chunk-UR42CPXD.js +3 -0
  122. package/browser/{chunk-O3NKN7KT.js → chunk-UX44UC2P.js} +1 -1
  123. package/browser/{chunk-H66NFIQQ.js → chunk-UYTJTLZV.js} +1 -1
  124. package/browser/{chunk-OSSHGIDA.js → chunk-VELV6XCP.js} +1 -1
  125. package/browser/{chunk-ZH7IWOYT.js → chunk-VQARO64W.js} +1 -1
  126. package/browser/{chunk-6IQQC2YT.js → chunk-W3FK7XY3.js} +1 -1
  127. package/browser/{chunk-R7Y776E5.js → chunk-WDXFLK4E.js} +1 -1
  128. package/browser/{chunk-EMP32K7Q.js → chunk-WGHPXYWX.js} +1 -1
  129. package/browser/{chunk-6CQ6XYJG.js → chunk-WP4MYTR2.js} +1 -1
  130. package/browser/{chunk-A7PNRSF2.js → chunk-XPQKTZA5.js} +1 -1
  131. package/browser/{chunk-TSBV5MA4.js → chunk-XU7DNLG3.js} +1 -1
  132. package/browser/{chunk-TDO7VOF5.js → chunk-Y7V4JJ46.js} +1 -1
  133. package/browser/{chunk-OAY4ZDTS.js → chunk-YCQYZPDK.js} +1 -1
  134. package/browser/{chunk-7275MAOI.js → chunk-YIJ62FAK.js} +1 -1
  135. package/browser/{chunk-4R4W625N.js → chunk-ZIWHZGBX.js} +1 -1
  136. package/browser/{chunk-D5QLS4SZ.js → chunk-ZRKESXDB.js} +1 -1
  137. package/browser/index.html +2 -2
  138. package/browser/main-2YFFQ7PU.js +3 -0
  139. package/package.json +1 -1
  140. package/browser/chunk-7MYFXXHY.js +0 -1
  141. package/browser/chunk-FMHXEKSH.js +0 -1
  142. package/browser/chunk-HMER2IC5.js +0 -1
  143. package/browser/chunk-I6NIUHOQ.js +0 -1
  144. package/browser/chunk-MW6BE5UI.js +0 -1
  145. package/browser/chunk-NII66FBK.js +0 -3
  146. package/browser/chunk-NM2P4KR5.js +0 -1
  147. package/browser/chunk-PNQGP25W.js +0 -1
  148. package/browser/chunk-Q7GDNJAI.js +0 -14
  149. package/browser/chunk-ZOIQWHQE.js +0 -1
  150. package/browser/main-C7YDPF2T.js +0 -3
@@ -1,2 +1,2 @@
1
- import{u as G,v as q,w as B}from"./chunk-CD3BSGAP.js";import{b as P,c as R}from"./chunk-JOXTERIM.js";import{e as j,f as V,g as W,l as L}from"./chunk-3YKVLHZG.js";import{a as w}from"./chunk-2FWFPV5I.js";import{F as A,a as E,c as O,h as F,o as k}from"./chunk-RVXZOIFQ.js";import{a as D}from"./chunk-ZZGSAFGO.js";import{$a as r,E as g,Ib as t,Jb as m,Qb as u,Vd as S,Wc as T,Zc as I,db as a,ec as l,gc as d,jc as C,jd as f,kb as p,kc as M,lc as h,pc as _,qb as N,sc as y,vb as s}from"./chunk-UXRO4UFY.js";var b=class n{constructor(e,i,o){this.dialogRef=e;this.data=i;this.toastr=o;this.config.title=`Edit ${i.transactionType} Number`,this.config.customWidth="300px",this.invoiceNumber=i.invoiceNumber,this.transactionType=i.transactionType}config=new G;invoiceNumber;transactionType;ok(){D.IsNotEmpty(this.invoiceNumber)?this.dialogRef.close(this.invoiceNumber):this.toastr.info("Invoice number can not be empty",w.Info)}static \u0275fac=function(i){return new(i||n)(a(j),a(V),a(S))};static \u0275cmp=p({type:n,selectors:[["POS-modal-invoice-number"]],decls:6,vars:3,consts:[[3,"onOk","onCancel","onClose","config"],[1,"form-floating-outline","m-0"],["type","text","id","invoiceNumber","name","invoiceNumber",1,"form-control",3,"ngModelChange","ngModel"],["for","invoiceNumber"]],template:function(i,o){i&1&&(t(0,"modal-material",0),u("onOk",function(){return o.ok()})("onCancel",function(){return o.dialogRef.close()})("onClose",function(){return o.dialogRef.close()}),t(1,"content")(2,"div",1)(3,"input",2),h("ngModelChange",function(v){return M(o.invoiceNumber,v)||(o.invoiceNumber=v),v}),m(),t(4,"label",3),l(5),m()()()()),i&2&&(s("config",o.config),r(3),C("ngModel",o.invoiceNumber),r(2),d("",o.transactionType," Number"))},dependencies:[f,A,O,F,k,B,q],encapsulation:2})};var K=(n,e)=>({"px-2 py-2 number-disabled":n,pointer:e});function Q(n,e){n&1&&(t(0,"span"),l(1,"Editing"),m())}var H=class n{constructor(e){this.matDialog=e}isEdit=!1;transactionType="Purchase Order";disabled=!1;invoiceNumber="";onChange=e=>{};onTouched=()=>{};writeValue(e){this.invoiceNumber=e}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this.disabled=e}openModalSelectOutlet(){this.disabled||this.matDialog.open(b,{data:{transactionType:this.transactionType,invoiceNumber:this.invoiceNumber}}).afterClosed().pipe(g(e=>e)).subscribe(e=>{this.invoiceNumber=e,this.onChange(this.invoiceNumber)})}static \u0275fac=function(i){return new(i||n)(a(W))};static \u0275cmp=p({type:n,selectors:[["POS-invoice-number-form"]],inputs:{isEdit:"isEdit",transactionType:"transactionType"},features:[_([{provide:E,multi:!0,useExisting:n}])],decls:3,vars:7,consts:[[1,"fw-normal",3,"click","ngClass","matTooltip"],[4,"ngIf"]],template:function(i,o){i&1&&(t(0,"h6",0),u("click",function(){return o.openModalSelectOutlet()}),N(1,Q,2,0,"span",1),l(2),m()),i&2&&(s("ngClass",y(4,K,o.disabled,!o.disabled))("matTooltip",o.disabled?"Number Edit role is required":""),r(),s("ngIf",o.isEdit),r(),d(" ",o.invoiceNumber?o.transactionType+" #"+o.invoiceNumber:"Order Number",`
1
+ import{u as G,v as q,w as B}from"./chunk-IJ6QEGE5.js";import{b as P,c as R}from"./chunk-JOXTERIM.js";import{e as j,f as V,g as W,l as L}from"./chunk-3YKVLHZG.js";import{a as w}from"./chunk-2FWFPV5I.js";import{F as A,a as E,c as O,h as F,o as k}from"./chunk-RVXZOIFQ.js";import{a as D}from"./chunk-ZZGSAFGO.js";import{$a as r,E as g,Ib as t,Jb as m,Qb as u,Vd as S,Wc as T,Zc as I,db as a,ec as l,gc as d,jc as C,jd as f,kb as p,kc as M,lc as h,pc as _,qb as N,sc as y,vb as s}from"./chunk-UXRO4UFY.js";var b=class n{constructor(e,i,o){this.dialogRef=e;this.data=i;this.toastr=o;this.config.title=`Edit ${i.transactionType} Number`,this.config.customWidth="300px",this.invoiceNumber=i.invoiceNumber,this.transactionType=i.transactionType}config=new G;invoiceNumber;transactionType;ok(){D.IsNotEmpty(this.invoiceNumber)?this.dialogRef.close(this.invoiceNumber):this.toastr.info("Invoice number can not be empty",w.Info)}static \u0275fac=function(i){return new(i||n)(a(j),a(V),a(S))};static \u0275cmp=p({type:n,selectors:[["POS-modal-invoice-number"]],decls:6,vars:3,consts:[[3,"onOk","onCancel","onClose","config"],[1,"form-floating-outline","m-0"],["type","text","id","invoiceNumber","name","invoiceNumber",1,"form-control",3,"ngModelChange","ngModel"],["for","invoiceNumber"]],template:function(i,o){i&1&&(t(0,"modal-material",0),u("onOk",function(){return o.ok()})("onCancel",function(){return o.dialogRef.close()})("onClose",function(){return o.dialogRef.close()}),t(1,"content")(2,"div",1)(3,"input",2),h("ngModelChange",function(v){return M(o.invoiceNumber,v)||(o.invoiceNumber=v),v}),m(),t(4,"label",3),l(5),m()()()()),i&2&&(s("config",o.config),r(3),C("ngModel",o.invoiceNumber),r(2),d("",o.transactionType," Number"))},dependencies:[f,A,O,F,k,B,q],encapsulation:2})};var K=(n,e)=>({"px-2 py-2 number-disabled":n,pointer:e});function Q(n,e){n&1&&(t(0,"span"),l(1,"Editing"),m())}var H=class n{constructor(e){this.matDialog=e}isEdit=!1;transactionType="Purchase Order";disabled=!1;invoiceNumber="";onChange=e=>{};onTouched=()=>{};writeValue(e){this.invoiceNumber=e}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this.disabled=e}openModalSelectOutlet(){this.disabled||this.matDialog.open(b,{data:{transactionType:this.transactionType,invoiceNumber:this.invoiceNumber}}).afterClosed().pipe(g(e=>e)).subscribe(e=>{this.invoiceNumber=e,this.onChange(this.invoiceNumber)})}static \u0275fac=function(i){return new(i||n)(a(W))};static \u0275cmp=p({type:n,selectors:[["POS-invoice-number-form"]],inputs:{isEdit:"isEdit",transactionType:"transactionType"},features:[_([{provide:E,multi:!0,useExisting:n}])],decls:3,vars:7,consts:[[1,"fw-normal",3,"click","ngClass","matTooltip"],[4,"ngIf"]],template:function(i,o){i&1&&(t(0,"h6",0),u("click",function(){return o.openModalSelectOutlet()}),N(1,Q,2,0,"span",1),l(2),m()),i&2&&(s("ngClass",y(4,K,o.disabled,!o.disabled))("matTooltip",o.disabled?"Number Edit role is required":""),r(),s("ngIf",o.isEdit),r(),d(" ",o.invoiceNumber?o.transactionType+" #"+o.invoiceNumber:"Order Number",`
2
2
  `))},dependencies:[f,T,I,L,R,P],styles:[".number-disabled[_ngcontent-%COMP%]{background-color:#ebebe4}"]})};export{H as a};
@@ -1 +1 @@
1
- import{e as z,f as S}from"./chunk-TSBV5MA4.js";import"./chunk-VGNMBCUC.js";import"./chunk-3GOO5E5D.js";import"./chunk-XMYLHF4C.js";import"./chunk-CD3BSGAP.js";import"./chunk-JOXTERIM.js";import"./chunk-5OS5VELO.js";import"./chunk-3YKVLHZG.js";import"./chunk-ZHY3BUQJ.js";import"./chunk-LE3BKIDY.js";import"./chunk-2FWFPV5I.js";import"./chunk-EEEAUYZ6.js";import"./chunk-RVXZOIFQ.js";import"./chunk-TDO7VOF5.js";import"./chunk-NOQM2VPB.js";import"./chunk-ZZGSAFGO.js";import"./chunk-PZANARAM.js";import{$a as p,Ib as o,Jb as i,Kb as g,Qd as x,Td as l,db as d,ec as r,fc as v,jd as M,ka as a,kb as h,lb as s,vb as f}from"./chunk-UXRO4UFY.js";import"./chunk-7DCB7DB2.js";var m=class e{constructor(n){this.router=n;console.log(this.router.getCurrentNavigation()),console.log(this.router.lastSuccessfulNavigation),this.previousPage=this.router.lastSuccessfulNavigation?.finalUrl?.root?.children?.primary?.segments?.join("/"),this.role=this.router.getCurrentNavigation()?.extras?.state.role??localStorage.getItem("role"),localStorage.setItem("role",this.role),console.log(this.previousPage)}previousPage="";role="";menuData={H:"Unauthorized"};static \u0275fac=function(t){return new(t||e)(d(x))};static \u0275cmp=h({type:e,selectors:[["POS-unauthorized"]],standalone:!1,decls:13,vars:4,consts:[[3,"pageData","hideSearchDropdown","hideSearchBox"],[1,"d-flex","align-items-center","justify-content-center","mt-8",2,"height","350px"],[1,"text-center"],["src","https://res.cloudinary.com/pos/image/upload/v1702547639/POS/Images/Dashboard/locked.svg",2,"width","200px"],[1,"mt-2","mb-6"],[1,"fw-bold"]],template:function(t,c){t&1&&(o(0,"mainpanel-cmp",0)(1,"content")(2,"div",1)(3,"div",2)(4,"div"),g(5,"img",3),i(),o(6,"h1",4),r(7,"You are not authorized"),i(),o(8,"p"),r(9," This page require "),o(10,"span",5),r(11),i(),r(12," role. Please contact your Administrator to gain access! "),i()()()()()),t&2&&(f("pageData",c.menuData)("hideSearchDropdown",!0)("hideSearchBox",!0),p(11),v(c.role))},dependencies:[z],encapsulation:2})};var D=[{path:"Main/Unauthorized",component:m},{path:"",redirectTo:"Main/Unauthorized",pathMatch:"full"}],u=class e{static \u0275fac=function(t){return new(t||e)};static \u0275mod=s({type:e});static \u0275inj=a({imports:[l.forChild(D),l]})};var y=class e{static \u0275fac=function(t){return new(t||e)};static \u0275mod=s({type:e});static \u0275inj=a({imports:[M,u,S]})};export{y as UnauthorizedModule};
1
+ import{e as z,f as S}from"./chunk-XU7DNLG3.js";import"./chunk-G2NZ3D7U.js";import"./chunk-3GOO5E5D.js";import"./chunk-XMYLHF4C.js";import"./chunk-IJ6QEGE5.js";import"./chunk-JOXTERIM.js";import"./chunk-FVKF2ZOS.js";import"./chunk-3YKVLHZG.js";import"./chunk-ZHY3BUQJ.js";import"./chunk-LE3BKIDY.js";import"./chunk-2FWFPV5I.js";import"./chunk-EEEAUYZ6.js";import"./chunk-RVXZOIFQ.js";import"./chunk-Y7V4JJ46.js";import"./chunk-ELIDPKL7.js";import"./chunk-ZZGSAFGO.js";import"./chunk-JOEBVACW.js";import{$a as p,Ib as o,Jb as i,Kb as g,Qd as x,Td as l,db as d,ec as r,fc as v,jd as M,ka as a,kb as h,lb as s,vb as f}from"./chunk-UXRO4UFY.js";import"./chunk-7DCB7DB2.js";var m=class e{constructor(n){this.router=n;console.log(this.router.getCurrentNavigation()),console.log(this.router.lastSuccessfulNavigation),this.previousPage=this.router.lastSuccessfulNavigation?.finalUrl?.root?.children?.primary?.segments?.join("/"),this.role=this.router.getCurrentNavigation()?.extras?.state.role??localStorage.getItem("role"),localStorage.setItem("role",this.role),console.log(this.previousPage)}previousPage="";role="";menuData={H:"Unauthorized"};static \u0275fac=function(t){return new(t||e)(d(x))};static \u0275cmp=h({type:e,selectors:[["POS-unauthorized"]],standalone:!1,decls:13,vars:4,consts:[[3,"pageData","hideSearchDropdown","hideSearchBox"],[1,"d-flex","align-items-center","justify-content-center","mt-8",2,"height","350px"],[1,"text-center"],["src","https://res.cloudinary.com/pos/image/upload/v1702547639/POS/Images/Dashboard/locked.svg",2,"width","200px"],[1,"mt-2","mb-6"],[1,"fw-bold"]],template:function(t,c){t&1&&(o(0,"mainpanel-cmp",0)(1,"content")(2,"div",1)(3,"div",2)(4,"div"),g(5,"img",3),i(),o(6,"h1",4),r(7,"You are not authorized"),i(),o(8,"p"),r(9," This page require "),o(10,"span",5),r(11),i(),r(12," role. Please contact your Administrator to gain access! "),i()()()()()),t&2&&(f("pageData",c.menuData)("hideSearchDropdown",!0)("hideSearchBox",!0),p(11),v(c.role))},dependencies:[z],encapsulation:2})};var D=[{path:"Main/Unauthorized",component:m},{path:"",redirectTo:"Main/Unauthorized",pathMatch:"full"}],u=class e{static \u0275fac=function(t){return new(t||e)};static \u0275mod=s({type:e});static \u0275inj=a({imports:[l.forChild(D),l]})};var y=class e{static \u0275fac=function(t){return new(t||e)};static \u0275mod=s({type:e});static \u0275inj=a({imports:[M,u,S]})};export{y as UnauthorizedModule};
@@ -1 +1 @@
1
- import{a as ae}from"./chunk-TRUZ46QL.js";import{a as ne,b as ie,c as oe}from"./chunk-ITLMINSX.js";import{a as fe,b as ye}from"./chunk-HMER2IC5.js";import{f as Ce}from"./chunk-HA6VJJLI.js";import{c as ge}from"./chunk-SV4HJFAL.js";import{b as pe}from"./chunk-TZ74SUXJ.js";import{a as se}from"./chunk-XZR3IMWZ.js";import{e as _e,f as ue}from"./chunk-TSBV5MA4.js";import{b as de}from"./chunk-DV4MQXAE.js";import{b as ee,c as te}from"./chunk-JOXTERIM.js";import{a as le,d as me,e as ce}from"./chunk-XYB3YDKL.js";import{g as re}from"./chunk-3YKVLHZG.js";import{F as Y,c as K,h as J,o as U,q as X}from"./chunk-RVXZOIFQ.js";import{d as $}from"./chunk-ZZGSAFGO.js";import{$a as i,Ac as w,Db as C,Fc as H,Ib as o,Jb as a,Kb as W,Lb as A,Ma as F,Mb as M,Ob as T,Qb as V,Qc as j,Rb as r,Rd as q,Ub as N,Vd as z,Yc as k,Yd as Z,Zc as Q,db as h,ec as c,fc as D,gc as f,gd as G,jc as y,jd as R,kb as O,kc as v,lc as x,na as E,ob as L,qb as g,rc as B,va as s,vb as d,wa as _,zc as S}from"./chunk-UXRO4UFY.js";import{a as b,b as P}from"./chunk-7DCB7DB2.js";var xe=n=>({ID:n});function Ie(n,p){if(n&1){let e=T();o(0,"button",18),V("click",function(){s(e);let t=r();return _(t.openExportModal())}),W(1,"i",19),c(2," Export "),a()}}function he(n,p){if(n&1&&(o(0,"span",29),c(1),a()),n&2){let e=p.item;N("matTooltip",e.Value),i(),D(e.Value)}}function De(n,p){if(n&1){let e=T();o(0,"div",20)(1,"div")(2,"h6"),c(3,"Outlet"),a(),o(4,"outlet-selector",21),x("ngModelChange",function(t){s(e);let l=r();return v(l.pageData.Filter.OutletID,t)||(l.pageData.Filter.OutletID=t),_(t)}),a()(),o(5,"div")(6,"h6"),c(7,"Category"),a(),o(8,"POS-product-category-select",22),x("selectedCategoryIDChange",function(t){s(e);let l=r();return v(l.pageData.Filter.ProductCategoryID,t)||(l.pageData.Filter.ProductCategoryID=t),_(t)}),a()(),o(9,"div")(10,"h6"),c(11,"Brand"),a(),o(12,"ng-select",23),x("ngModelChange",function(t){s(e);let l=r();return v(l.pageData.Filter.ProductBrandID,t)||(l.pageData.Filter.ProductBrandID=t),_(t)}),g(13,he,2,2,"ng-template",24),a()(),o(14,"div")(15,"h6"),c(16,"Product Tags"),a(),o(17,"ng-select",25),x("ngModelChange",function(t){s(e);let l=r();return v(l.pageData.Filter.ProductTagID,t)||(l.pageData.Filter.ProductTagID=t),_(t)}),a()(),o(18,"div")(19,"h6"),c(20,"Quantity From - To"),a(),o(21,"div",26)(22,"input",27),x("ngModelChange",function(t){s(e);let l=r();return v(l.pageData.Filter.QtyFrom,t)||(l.pageData.Filter.QtyFrom=t),_(t)}),a(),c(23," - "),o(24,"input",28),x("ngModelChange",function(t){s(e);let l=r();return v(l.pageData.Filter.QtyTo,t)||(l.pageData.Filter.QtyTo=t),_(t)}),a()()()()}if(n&2){let e=r();i(4),d("accessType",2),y("ngModel",e.pageData.Filter.OutletID),i(4),y("selectedCategoryID",e.pageData.Filter.ProductCategoryID),d("showClear",!0),i(4),d("items",e.pageData.Options==null?null:e.pageData.Options.Brands),y("ngModel",e.pageData.Filter.ProductBrandID),i(5),d("items",e.pageData.Options==null?null:e.pageData.Options.Tags),y("ngModel",e.pageData.Filter.ProductTagID),i(5),y("ngModel",e.pageData.Filter.QtyFrom),i(2),y("ngModel",e.pageData.Filter.QtyTo)}}function Se(n,p){if(n&1&&(o(0,"th",10),c(1),a()),n&2){let e=r();i(),f(" ",e.column.VariantName.name," ")}}function we(n,p){if(n&1&&(o(0,"th",11),c(1),a()),n&2){let e=r();i(),f(" ",e.column.VariantCode.name," ")}}function Te(n,p){if(n&1&&(o(0,"th",12),c(1),a()),n&2){let e=r();i(),f(" ",e.column.OnHand.name," ")}}function Ve(n,p){if(n&1&&(o(0,"th",30),c(1),a()),n&2){let e=r();i(),f(" ",e.column.DirectAllocated.name," ")}}function be(n,p){if(n&1&&(o(0,"th",14),c(1),a()),n&2){let e=r();i(),f(" ",e.column.IndirectAllocated.name," ")}}function Pe(n,p){if(n&1&&(o(0,"th",15),c(1),a()),n&2){let e=r();i(),f(" ",e.column.Available.name," ")}}function Ae(n,p){if(n&1&&(o(0,"td")(1,"a",31),c(2),a()()),n&2){let e=r().$implicit;i(),d("routerLink","/menu/Products/Catalog/Variants/Info")("queryParams",B(3,xe,e.VariantID)),i(),f(" ",e.VariantName," ")}}function Me(n,p){if(n&1&&(o(0,"td"),c(1),a()),n&2){let e=r().$implicit;i(),D(e.VariantCode)}}function Ee(n,p){if(n&1&&(o(0,"td"),c(1),S(2,"number"),a()),n&2){let e=r().$implicit;i(),D(w(2,1,e.OnHand))}}function Fe(n,p){if(n&1&&(o(0,"td"),c(1),S(2,"number"),a()),n&2){let e=r(2).$implicit;i(),f(" ",w(2,1,e.DirectAllocated)," ")}}function Oe(n,p){if(n&1&&g(0,Fe,3,3,"td",17),n&2){let e=r(2);d("ngIf",e.column.DirectAllocated&&e.column.DirectAllocated.selected)}}function Le(n,p){if(n&1&&(o(0,"td"),c(1),S(2,"number"),a()),n&2){let e=r(2).$implicit;i(),f(" ",w(2,1,e.DirectAllocated)," ")}}function We(n,p){if(n&1&&g(0,Le,3,3,"td",17),n&2){let e=r(2);d("ngIf",e.column.DirectAllocated&&e.column.DirectAllocated.selected)}}function Ne(n,p){if(n&1&&(o(0,"td"),c(1),S(2,"number"),a()),n&2){let e=r().$implicit;i(),D(w(2,1,e.IndirectAllocated))}}function Be(n,p){if(n&1&&(o(0,"td"),c(1),S(2,"number"),a()),n&2){let e=r().$implicit;i(),D(w(2,1,e.Available))}}function He(n,p){if(n&1&&(o(0,"tr"),g(1,Ae,3,5,"td")(2,Me,2,1,"td")(3,Ee,3,3,"td")(4,Oe,1,1,"td")(5,We,1,1,"td")(6,Ne,3,3,"td")(7,Be,3,3,"td"),a()),n&2){let e=r();i(),C(e.column.VariantName&&e.column.VariantName.selected?1:-1),i(),C(e.column.VariantCode&&e.column.VariantCode.selected?2:-1),i(),C(e.column.OnHand&&e.column.OnHand.selected?3:-1),i(),C(e.totalIndirect()>0?4:5),i(2),C(e.column.IndirectAllocated&&e.column.IndirectAllocated.selected&&e.totalIndirect()>0?6:-1),i(),C(e.column.Available&&e.column.Available.selected?7:-1)}}function je(n,p){if(n&1){let e=T();o(0,"div")(1,"POS-complex-pagination",32),V("jumpToPage",function(){s(e);let t=r();return _(t.getListData())})("previousPage",function(){s(e);let t=r();return _(t.getListData())})("nextPage",function(){s(e);let t=r();return _(t.getListData())}),a()()}if(n&2){let e=r();i(),d("total",e.data.Data.length)("pageData",e.pageData)}}var ve=class n extends ae{constructor(e,m,t,l,I){super(e,m,"inventory/GetListInventoryComposite","inventoryloader/GetListInventoryComposite",t,void 0,!1);this.httpService=m;this.csvConverter=l;this.roleService=I;j(()=>{let u=this.totalIndirect();u!==null&&u<=0&&(console.log("Indirect allocation is zero or negative"),this.column=P(b({},this.column),{DirectAllocated:P(b({},this.column.DirectAllocated),{name:"Allocated"}),IndirectAllocated:P(b({},this.column.IndirectAllocated),{show:!1})}))})}column={VariantName:{selected:!0,name:"Name",show:!0},VariantCode:{selected:!0,name:"Code",show:!0},OnHand:{selected:!0,name:"On Hand",show:!0},DirectAllocated:{selected:!0,name:"Direct Allocated",show:!0},IndirectAllocated:{selected:!0,name:"Indirect Allocated",show:!0},Available:{selected:!0,name:"Available",show:!0}};totalIndirect=F(null);dialog=E(re);afterPostInit(e){console.log("Composite Inventory Data",e);let m=e.Data.reduce((t,l)=>t+l.IndirectAllocated,0);console.log("Total Indirect Allocated:",m),this.totalIndirect.set(m)}sortData(e){let m=[...this.data.Data];if(!e.active||e.direction===""){this.infiniteList=m;return}this.infiniteList=m.sort((t,l)=>{let I=e.direction==="asc";return this.compare(t[e.active],l[e.active],I)})}openExportModal(){this.dialog.open(pe,{data:{title:"Composite Inventory",exportTypes:[{ID:"inventoryExport/GetExportInventoryComposite",Value:"Default",FileName:"Composite Inventory"}],filterExport:this.pageData.Filter,getAllDataLengthAPI:"inventory/GetCountInventoryComposite",pagination:!0}})}static \u0275fac=function(m){return new(m||n)(h(de),h(Z),h(z),h(se),h($))};static \u0275cmp=O({type:n,selectors:[["pos-composite-inventory"]],features:[L],decls:21,vars:14,consts:[["pageFilterTemplate",""],["tooltipTitle","Identify and manage unsold inventory that has been stagnant for a long time",3,"textChange","onSubmit","filterChange","pageData","text","isFilterOnDropdown","filter","column"],["ngProjectAs","actions",5,["actions"]],["class","btn btn-outline-secondary me-3",3,"click",4,"ngIf"],["ngProjectAs","filters",5,["filters"]],["ngProjectAs","content",5,["content"]],[1,"container-fluid","mt-3"],[1,"table-responsive"],["id","tableGrid","matSort","",1,"table","border-bottom",3,"matSortChange"],[1,"thead-light","sticky-top-thead"],["mat-sort-header","VariantName",2,"width","20%"],["mat-sort-header","VariantCode",2,"width","20%"],["mat-sort-header","OnHand",2,"width","10%"],["style","width: 10%","mat-sort-header","DirectAllocated",4,"ngIf"],["mat-sort-header","IndirectAllocated",2,"width","10%"],["mat-sort-header","Available",2,"width","10%"],[4,"ngFor","ngForOf"],[4,"ngIf"],[1,"btn","btn-outline-secondary","me-3",3,"click"],["aria-hidden","true",1,"fa-solid","fa-upload"],[1,"d-flex","flex-column","gap-4"],["placeholder","Choose Outlets (Leave Blank to Choose All)",1,"ng-select-multiple",3,"ngModelChange","accessType","ngModel"],[1,"tree-select-as-filter",3,"selectedCategoryIDChange","selectedCategoryID","showClear"],["bindLabel","Value","bindValue","Key","placeholder","Choose Brand",3,"ngModelChange","items","ngModel"],["ng-option-tmp",""],["appendTo","body","bindLabel","Name","bindValue","ID","placeholder","Choose Tag",3,"ngModelChange","items","ngModel"],[1,"d-flex","align-items-center",2,"column-gap","8px"],["type","number","name","QuantityFrom",1,"form-control","input-filter",3,"ngModelChange","ngModel"],["type","number","name","QuantityTo",1,"form-control","input-filter",3,"ngModelChange","ngModel"],["matTooltipPosition","above",3,"matTooltip"],["mat-sort-header","DirectAllocated",2,"width","10%"],[3,"routerLink","queryParams"],["api","inventory/GetCountInventoryComposite",3,"jumpToPage","previousPage","nextPage","total","pageData"]],template:function(m,t){if(m&1){let l=T();o(0,"mainpanel-cmp",1),x("textChange",function(u){return s(l),v(t.pageData.Filter.SearchText,u)||(t.pageData.Filter.SearchText=u),_(u)}),V("onSubmit",function(){return s(l),_(t.searchFromPageOne())}),x("filterChange",function(u){return s(l),v(t.pageData.Filter,u)||(t.pageData.Filter=u),_(u)}),A(1,2),g(2,Ie,3,0,"button",3),M(),A(3,4),g(4,De,25,10,"ng-template",null,0,H),M(),A(6,5),o(7,"div",6)(8,"div",7)(9,"table",8),V("matSortChange",function(u){return s(l),_(t.sortData(u))}),o(10,"thead",9)(11,"tr"),g(12,Se,2,1,"th",10)(13,we,2,1,"th",11)(14,Te,2,1,"th",12)(15,Ve,2,1,"th",13)(16,be,2,1,"th",14)(17,Pe,2,1,"th",15),a()(),o(18,"tbody"),g(19,He,8,6,"tr",16),a()()(),g(20,je,2,2,"div",17),a(),M(),a()}m&2&&(d("pageData",t.menuData),y("text",t.pageData.Filter.SearchText),d("isFilterOnDropdown",!1),y("filter",t.pageData.Filter),d("column",t.column),i(2),d("ngIf",t.roleService.global.Export),i(10),C(t.column.VariantName&&t.column.VariantName.selected?12:-1),i(),C(t.column.VariantCode&&t.column.VariantCode.selected?13:-1),i(),C(t.column.OnHand&&t.column.OnHand.selected?14:-1),i(),d("ngIf",t.column.DirectAllocated&&t.column.DirectAllocated.selected),i(),C(t.column.IndirectAllocated&&t.column.IndirectAllocated.selected&&t.totalIndirect()>0?16:-1),i(),C(t.column.Available&&t.column.Available.selected?17:-1),i(2),d("ngForOf",t.infiniteList),i(),d("ngIf",t.data))},dependencies:[ue,_e,ge,Ce,Y,K,X,J,U,ce,me,le,te,ee,ye,fe,R,k,Q,G,q,oe,ne,ie],styles:["[_nghost-%COMP%]{display:block}"]})};export{ve as a};
1
+ import{a as ae}from"./chunk-NXSTJXP3.js";import{a as ne,b as ie,c as oe}from"./chunk-QWYLRTIQ.js";import{a as fe,b as ye}from"./chunk-BBGWXLHJ.js";import{f as Ce}from"./chunk-7HOWFXKG.js";import{c as ge}from"./chunk-7O5TK73M.js";import{b as pe}from"./chunk-SZUQ6U7I.js";import{a as se}from"./chunk-XZR3IMWZ.js";import{e as _e,f as ue}from"./chunk-XU7DNLG3.js";import{b as de}from"./chunk-7WT2CL3Y.js";import{b as ee,c as te}from"./chunk-JOXTERIM.js";import{a as le,d as me,e as ce}from"./chunk-XYB3YDKL.js";import{g as re}from"./chunk-3YKVLHZG.js";import{F as Y,c as K,h as J,o as U,q as X}from"./chunk-RVXZOIFQ.js";import{d as $}from"./chunk-ZZGSAFGO.js";import{$a as i,Ac as w,Db as C,Fc as H,Ib as o,Jb as a,Kb as W,Lb as A,Ma as F,Mb as M,Ob as T,Qb as V,Qc as j,Rb as r,Rd as q,Ub as N,Vd as z,Yc as k,Yd as Z,Zc as Q,db as h,ec as c,fc as D,gc as f,gd as G,jc as y,jd as R,kb as O,kc as v,lc as x,na as E,ob as L,qb as g,rc as B,va as s,vb as d,wa as _,zc as S}from"./chunk-UXRO4UFY.js";import{a as b,b as P}from"./chunk-7DCB7DB2.js";var xe=n=>({ID:n});function Ie(n,p){if(n&1){let e=T();o(0,"button",18),V("click",function(){s(e);let t=r();return _(t.openExportModal())}),W(1,"i",19),c(2," Export "),a()}}function he(n,p){if(n&1&&(o(0,"span",29),c(1),a()),n&2){let e=p.item;N("matTooltip",e.Value),i(),D(e.Value)}}function De(n,p){if(n&1){let e=T();o(0,"div",20)(1,"div")(2,"h6"),c(3,"Outlet"),a(),o(4,"outlet-selector",21),x("ngModelChange",function(t){s(e);let l=r();return v(l.pageData.Filter.OutletID,t)||(l.pageData.Filter.OutletID=t),_(t)}),a()(),o(5,"div")(6,"h6"),c(7,"Category"),a(),o(8,"POS-product-category-select",22),x("selectedCategoryIDChange",function(t){s(e);let l=r();return v(l.pageData.Filter.ProductCategoryID,t)||(l.pageData.Filter.ProductCategoryID=t),_(t)}),a()(),o(9,"div")(10,"h6"),c(11,"Brand"),a(),o(12,"ng-select",23),x("ngModelChange",function(t){s(e);let l=r();return v(l.pageData.Filter.ProductBrandID,t)||(l.pageData.Filter.ProductBrandID=t),_(t)}),g(13,he,2,2,"ng-template",24),a()(),o(14,"div")(15,"h6"),c(16,"Product Tags"),a(),o(17,"ng-select",25),x("ngModelChange",function(t){s(e);let l=r();return v(l.pageData.Filter.ProductTagID,t)||(l.pageData.Filter.ProductTagID=t),_(t)}),a()(),o(18,"div")(19,"h6"),c(20,"Quantity From - To"),a(),o(21,"div",26)(22,"input",27),x("ngModelChange",function(t){s(e);let l=r();return v(l.pageData.Filter.QtyFrom,t)||(l.pageData.Filter.QtyFrom=t),_(t)}),a(),c(23," - "),o(24,"input",28),x("ngModelChange",function(t){s(e);let l=r();return v(l.pageData.Filter.QtyTo,t)||(l.pageData.Filter.QtyTo=t),_(t)}),a()()()()}if(n&2){let e=r();i(4),d("accessType",2),y("ngModel",e.pageData.Filter.OutletID),i(4),y("selectedCategoryID",e.pageData.Filter.ProductCategoryID),d("showClear",!0),i(4),d("items",e.pageData.Options==null?null:e.pageData.Options.Brands),y("ngModel",e.pageData.Filter.ProductBrandID),i(5),d("items",e.pageData.Options==null?null:e.pageData.Options.Tags),y("ngModel",e.pageData.Filter.ProductTagID),i(5),y("ngModel",e.pageData.Filter.QtyFrom),i(2),y("ngModel",e.pageData.Filter.QtyTo)}}function Se(n,p){if(n&1&&(o(0,"th",10),c(1),a()),n&2){let e=r();i(),f(" ",e.column.VariantName.name," ")}}function we(n,p){if(n&1&&(o(0,"th",11),c(1),a()),n&2){let e=r();i(),f(" ",e.column.VariantCode.name," ")}}function Te(n,p){if(n&1&&(o(0,"th",12),c(1),a()),n&2){let e=r();i(),f(" ",e.column.OnHand.name," ")}}function Ve(n,p){if(n&1&&(o(0,"th",30),c(1),a()),n&2){let e=r();i(),f(" ",e.column.DirectAllocated.name," ")}}function be(n,p){if(n&1&&(o(0,"th",14),c(1),a()),n&2){let e=r();i(),f(" ",e.column.IndirectAllocated.name," ")}}function Pe(n,p){if(n&1&&(o(0,"th",15),c(1),a()),n&2){let e=r();i(),f(" ",e.column.Available.name," ")}}function Ae(n,p){if(n&1&&(o(0,"td")(1,"a",31),c(2),a()()),n&2){let e=r().$implicit;i(),d("routerLink","/menu/Products/Catalog/Variants/Info")("queryParams",B(3,xe,e.VariantID)),i(),f(" ",e.VariantName," ")}}function Me(n,p){if(n&1&&(o(0,"td"),c(1),a()),n&2){let e=r().$implicit;i(),D(e.VariantCode)}}function Ee(n,p){if(n&1&&(o(0,"td"),c(1),S(2,"number"),a()),n&2){let e=r().$implicit;i(),D(w(2,1,e.OnHand))}}function Fe(n,p){if(n&1&&(o(0,"td"),c(1),S(2,"number"),a()),n&2){let e=r(2).$implicit;i(),f(" ",w(2,1,e.DirectAllocated)," ")}}function Oe(n,p){if(n&1&&g(0,Fe,3,3,"td",17),n&2){let e=r(2);d("ngIf",e.column.DirectAllocated&&e.column.DirectAllocated.selected)}}function Le(n,p){if(n&1&&(o(0,"td"),c(1),S(2,"number"),a()),n&2){let e=r(2).$implicit;i(),f(" ",w(2,1,e.DirectAllocated)," ")}}function We(n,p){if(n&1&&g(0,Le,3,3,"td",17),n&2){let e=r(2);d("ngIf",e.column.DirectAllocated&&e.column.DirectAllocated.selected)}}function Ne(n,p){if(n&1&&(o(0,"td"),c(1),S(2,"number"),a()),n&2){let e=r().$implicit;i(),D(w(2,1,e.IndirectAllocated))}}function Be(n,p){if(n&1&&(o(0,"td"),c(1),S(2,"number"),a()),n&2){let e=r().$implicit;i(),D(w(2,1,e.Available))}}function He(n,p){if(n&1&&(o(0,"tr"),g(1,Ae,3,5,"td")(2,Me,2,1,"td")(3,Ee,3,3,"td")(4,Oe,1,1,"td")(5,We,1,1,"td")(6,Ne,3,3,"td")(7,Be,3,3,"td"),a()),n&2){let e=r();i(),C(e.column.VariantName&&e.column.VariantName.selected?1:-1),i(),C(e.column.VariantCode&&e.column.VariantCode.selected?2:-1),i(),C(e.column.OnHand&&e.column.OnHand.selected?3:-1),i(),C(e.totalIndirect()>0?4:5),i(2),C(e.column.IndirectAllocated&&e.column.IndirectAllocated.selected&&e.totalIndirect()>0?6:-1),i(),C(e.column.Available&&e.column.Available.selected?7:-1)}}function je(n,p){if(n&1){let e=T();o(0,"div")(1,"POS-complex-pagination",32),V("jumpToPage",function(){s(e);let t=r();return _(t.getListData())})("previousPage",function(){s(e);let t=r();return _(t.getListData())})("nextPage",function(){s(e);let t=r();return _(t.getListData())}),a()()}if(n&2){let e=r();i(),d("total",e.data.Data.length)("pageData",e.pageData)}}var ve=class n extends ae{constructor(e,m,t,l,I){super(e,m,"inventory/GetListInventoryComposite","inventoryloader/GetListInventoryComposite",t,void 0,!1);this.httpService=m;this.csvConverter=l;this.roleService=I;j(()=>{let u=this.totalIndirect();u!==null&&u<=0&&(console.log("Indirect allocation is zero or negative"),this.column=P(b({},this.column),{DirectAllocated:P(b({},this.column.DirectAllocated),{name:"Allocated"}),IndirectAllocated:P(b({},this.column.IndirectAllocated),{show:!1})}))})}column={VariantName:{selected:!0,name:"Name",show:!0},VariantCode:{selected:!0,name:"Code",show:!0},OnHand:{selected:!0,name:"On Hand",show:!0},DirectAllocated:{selected:!0,name:"Direct Allocated",show:!0},IndirectAllocated:{selected:!0,name:"Indirect Allocated",show:!0},Available:{selected:!0,name:"Available",show:!0}};totalIndirect=F(null);dialog=E(re);afterPostInit(e){console.log("Composite Inventory Data",e);let m=e.Data.reduce((t,l)=>t+l.IndirectAllocated,0);console.log("Total Indirect Allocated:",m),this.totalIndirect.set(m)}sortData(e){let m=[...this.data.Data];if(!e.active||e.direction===""){this.infiniteList=m;return}this.infiniteList=m.sort((t,l)=>{let I=e.direction==="asc";return this.compare(t[e.active],l[e.active],I)})}openExportModal(){this.dialog.open(pe,{data:{title:"Composite Inventory",exportTypes:[{ID:"inventoryExport/GetExportInventoryComposite",Value:"Default",FileName:"Composite Inventory"}],filterExport:this.pageData.Filter,getAllDataLengthAPI:"inventory/GetCountInventoryComposite",pagination:!0}})}static \u0275fac=function(m){return new(m||n)(h(de),h(Z),h(z),h(se),h($))};static \u0275cmp=O({type:n,selectors:[["pos-composite-inventory"]],features:[L],decls:21,vars:14,consts:[["pageFilterTemplate",""],["tooltipTitle","Identify and manage unsold inventory that has been stagnant for a long time",3,"textChange","onSubmit","filterChange","pageData","text","isFilterOnDropdown","filter","column"],["ngProjectAs","actions",5,["actions"]],["class","btn btn-outline-secondary me-3",3,"click",4,"ngIf"],["ngProjectAs","filters",5,["filters"]],["ngProjectAs","content",5,["content"]],[1,"container-fluid","mt-3"],[1,"table-responsive"],["id","tableGrid","matSort","",1,"table","border-bottom",3,"matSortChange"],[1,"thead-light","sticky-top-thead"],["mat-sort-header","VariantName",2,"width","20%"],["mat-sort-header","VariantCode",2,"width","20%"],["mat-sort-header","OnHand",2,"width","10%"],["style","width: 10%","mat-sort-header","DirectAllocated",4,"ngIf"],["mat-sort-header","IndirectAllocated",2,"width","10%"],["mat-sort-header","Available",2,"width","10%"],[4,"ngFor","ngForOf"],[4,"ngIf"],[1,"btn","btn-outline-secondary","me-3",3,"click"],["aria-hidden","true",1,"fa-solid","fa-upload"],[1,"d-flex","flex-column","gap-4"],["placeholder","Choose Outlets (Leave Blank to Choose All)",1,"ng-select-multiple",3,"ngModelChange","accessType","ngModel"],[1,"tree-select-as-filter",3,"selectedCategoryIDChange","selectedCategoryID","showClear"],["bindLabel","Value","bindValue","Key","placeholder","Choose Brand",3,"ngModelChange","items","ngModel"],["ng-option-tmp",""],["appendTo","body","bindLabel","Name","bindValue","ID","placeholder","Choose Tag",3,"ngModelChange","items","ngModel"],[1,"d-flex","align-items-center",2,"column-gap","8px"],["type","number","name","QuantityFrom",1,"form-control","input-filter",3,"ngModelChange","ngModel"],["type","number","name","QuantityTo",1,"form-control","input-filter",3,"ngModelChange","ngModel"],["matTooltipPosition","above",3,"matTooltip"],["mat-sort-header","DirectAllocated",2,"width","10%"],[3,"routerLink","queryParams"],["api","inventory/GetCountInventoryComposite",3,"jumpToPage","previousPage","nextPage","total","pageData"]],template:function(m,t){if(m&1){let l=T();o(0,"mainpanel-cmp",1),x("textChange",function(u){return s(l),v(t.pageData.Filter.SearchText,u)||(t.pageData.Filter.SearchText=u),_(u)}),V("onSubmit",function(){return s(l),_(t.searchFromPageOne())}),x("filterChange",function(u){return s(l),v(t.pageData.Filter,u)||(t.pageData.Filter=u),_(u)}),A(1,2),g(2,Ie,3,0,"button",3),M(),A(3,4),g(4,De,25,10,"ng-template",null,0,H),M(),A(6,5),o(7,"div",6)(8,"div",7)(9,"table",8),V("matSortChange",function(u){return s(l),_(t.sortData(u))}),o(10,"thead",9)(11,"tr"),g(12,Se,2,1,"th",10)(13,we,2,1,"th",11)(14,Te,2,1,"th",12)(15,Ve,2,1,"th",13)(16,be,2,1,"th",14)(17,Pe,2,1,"th",15),a()(),o(18,"tbody"),g(19,He,8,6,"tr",16),a()()(),g(20,je,2,2,"div",17),a(),M(),a()}m&2&&(d("pageData",t.menuData),y("text",t.pageData.Filter.SearchText),d("isFilterOnDropdown",!1),y("filter",t.pageData.Filter),d("column",t.column),i(2),d("ngIf",t.roleService.global.Export),i(10),C(t.column.VariantName&&t.column.VariantName.selected?12:-1),i(),C(t.column.VariantCode&&t.column.VariantCode.selected?13:-1),i(),C(t.column.OnHand&&t.column.OnHand.selected?14:-1),i(),d("ngIf",t.column.DirectAllocated&&t.column.DirectAllocated.selected),i(),C(t.column.IndirectAllocated&&t.column.IndirectAllocated.selected&&t.totalIndirect()>0?16:-1),i(),C(t.column.Available&&t.column.Available.selected?17:-1),i(2),d("ngForOf",t.infiniteList),i(),d("ngIf",t.data))},dependencies:[ue,_e,ge,Ce,Y,K,X,J,U,ce,me,le,te,ee,ye,fe,R,k,Q,G,q,oe,ne,ie],styles:["[_nghost-%COMP%]{display:block}"]})};export{ve as a};
@@ -1,4 +1,4 @@
1
- import{a as zt,e as lt,g as Wt}from"./chunk-CD3BSGAP.js";import{B as Ht,F as ot,I as Vt,J as Nt,N as Ot,Q as Qt,R as st,ea as dt,f as nt,g as rt,m as Lt,n as Et,r as At,y as St,z as Ft}from"./chunk-ZHY3BUQJ.js";import{$ as V,$a as f,$b as b,B as vt,Ba as U,D as H,Db as J,E as yt,Fa as u,Fb as tt,Ga as O,Gb as et,Hb as at,Ib as h,Jb as y,Ka as M,Kb as G,Kc as Z,M as kt,Mc as _,Na as It,Nc as K,Ob as E,Qa as Q,Qb as C,Rb as v,Sb as $,Ta as z,Tb as q,Yb as A,Z as Tt,Zb as p,_b as m,a as x,aa as Ct,ab as W,c as ut,cb as X,d as F,da as B,dc as it,ec as Bt,fb as Dt,fc as Pt,k as ft,ka as wt,kb as P,la as D,lb as Mt,mb as I,na as r,o as gt,ob as L,pc as S,qb as R,ua as xt,ub as k,va as l,vb as T,wa as c,wb as Rt,xb as g,za as N,zb as j}from"./chunk-UXRO4UFY.js";var pt=["*"];function Xt(n,d){n&1&&q(0)}var Jt=["tabListContainer"],te=["tabList"],ee=["tabListInner"],ae=["nextPaginator"],ie=["previousPaginator"],ne=["content"];function re(n,d){}var oe=["tabBodyWrapper"],se=["tabHeader"];function de(n,d){}function le(n,d){if(n&1&&R(0,de,0,0,"ng-template",12),n&2){let t=v().$implicit;T("cdkPortalOutlet",t.templateLabel)}}function ce(n,d){if(n&1&&Bt(0),n&2){let t=v().$implicit;Pt(t.textLabel)}}function me(n,d){if(n&1){let t=E();h(0,"div",7,2),C("click",function(){let a=l(t),i=a.$implicit,o=a.$index,s=v(),w=it(1);return c(s._handleClick(i,w,o))})("cdkFocusChange",function(a){let i=l(t).$index,o=v();return c(o._tabFocusChanged(a,i))}),G(2,"span",8)(3,"div",9),h(4,"span",10)(5,"span",11),R(6,le,1,1,null,12)(7,ce,1,1),y()()()}if(n&2){let t=d.$implicit,e=d.$index,a=it(1),i=v();j(t.labelClass),g("mdc-tab--active",i.selectedIndex===e),T("id",i._getTabLabelId(t,e))("disabled",t.disabled)("fitInkBarToContent",i.fitInkBarToContent),k("tabIndex",i._getTabIndex(e))("aria-posinset",e+1)("aria-setsize",i._tabs.length)("aria-controls",i._getTabContentId(e))("aria-selected",i.selectedIndex===e)("aria-label",t.ariaLabel||null)("aria-labelledby",!t.ariaLabel&&t.ariaLabelledby?t.ariaLabelledby:null),f(3),T("matRippleTrigger",a)("matRippleDisabled",t.disabled||i.disableRipple),f(3),J(t.templateLabel?6:7)}}function be(n,d){n&1&&q(0)}function he(n,d){if(n&1){let t=E();h(0,"mat-tab-body",13),C("_onCentered",function(){l(t);let a=v();return c(a._removeTabBodyWrapperHeight())})("_onCentering",function(a){l(t);let i=v();return c(i._setTabBodyWrapperHeight(a))})("_beforeCentering",function(a){l(t);let i=v();return c(i._bodyCentered(a))}),y()}if(n&2){let t=d.$implicit,e=d.$index,a=v();j(t.bodyClass),T("id",a._getTabContentId(e))("content",t.content)("position",t.position)("animationDuration",a.animationDuration)("preserveContent",a.preserveContent),k("tabindex",a.contentTabIndex!=null&&a.selectedIndex===e?a.contentTabIndex:null)("aria-labelledby",a._getTabLabelId(t,e))("aria-hidden",a.selectedIndex!==e)}}var pe=new D("MatTabContent"),_e=(()=>{class n{template=r(W);constructor(){}static \u0275fac=function(e){return new(e||n)};static \u0275dir=I({type:n,selectors:[["","matTabContent",""]],features:[S([{provide:pe,useExisting:n}])]})}return n})(),ue=new D("MatTabLabel"),qt=new D("MAT_TAB"),fe=(()=>{class n extends Qt{_closestTab=r(qt,{optional:!0});static \u0275fac=(()=>{let t;return function(a){return(t||(t=N(n)))(a||n)}})();static \u0275dir=I({type:n,selectors:[["","mat-tab-label",""],["","matTabLabel",""]],features:[S([{provide:ue,useExisting:n}]),L]})}return n})(),Zt=new D("MAT_TAB_GROUP"),ge=(()=>{class n{_viewContainerRef=r(Dt);_closestTabGroup=r(Zt,{optional:!0});disabled=!1;get templateLabel(){return this._templateLabel}set templateLabel(t){this._setTemplateLabelInput(t)}_templateLabel;_explicitContent=void 0;_implicitContent;textLabel="";ariaLabel;ariaLabelledby;labelClass;bodyClass;id=null;_contentPortal=null;get content(){return this._contentPortal}_stateChanges=new F;position=null;origin=null;isActive=!1;constructor(){r(Et).load(zt)}ngOnChanges(t){(t.hasOwnProperty("textLabel")||t.hasOwnProperty("disabled"))&&this._stateChanges.next()}ngOnDestroy(){this._stateChanges.complete()}ngOnInit(){this._contentPortal=new Ot(this._explicitContent||this._implicitContent,this._viewContainerRef)}_setTemplateLabelInput(t){t&&t._closestTab===this&&(this._templateLabel=t)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=P({type:n,selectors:[["mat-tab"]],contentQueries:function(e,a,i){if(e&1&&(A(i,fe,5),A(i,_e,7,W)),e&2){let o;m(o=b())&&(a.templateLabel=o.first),m(o=b())&&(a._explicitContent=o.first)}},viewQuery:function(e,a){if(e&1&&p(W,7),e&2){let i;m(i=b())&&(a._implicitContent=i.first)}},hostAttrs:["hidden",""],hostVars:1,hostBindings:function(e,a){e&2&&k("id",null)},inputs:{disabled:[2,"disabled","disabled",_],textLabel:[0,"label","textLabel"],ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],labelClass:"labelClass",bodyClass:"bodyClass",id:"id"},exportAs:["matTab"],features:[S([{provide:qt,useExisting:n}]),xt],ngContentSelectors:pt,decls:1,vars:0,template:function(e,a){e&1&&($(),R(0,Xt,1,0,"ng-template"))},encapsulation:2})}return n})(),ct="mdc-tab-indicator--active",jt="mdc-tab-indicator--no-transition",mt=class{_items;_currentItem;constructor(d){this._items=d}hide(){this._items.forEach(d=>d.deactivateInkBar()),this._currentItem=void 0}alignToElement(d){let t=this._items.find(a=>a.elementRef.nativeElement===d),e=this._currentItem;if(t!==e&&(e?.deactivateInkBar(),t)){let a=e?.elementRef.nativeElement.getBoundingClientRect?.();t.activateInkBar(a),this._currentItem=t}}},ve=(()=>{class n{_elementRef=r(M);_inkBarElement;_inkBarContentElement;_fitToContent=!1;get fitInkBarToContent(){return this._fitToContent}set fitInkBarToContent(t){this._fitToContent!==t&&(this._fitToContent=t,this._inkBarElement&&this._appendInkBarElement())}activateInkBar(t){let e=this._elementRef.nativeElement;if(!t||!e.getBoundingClientRect||!this._inkBarContentElement){e.classList.add(ct);return}let a=e.getBoundingClientRect(),i=t.width/a.width,o=t.left-a.left;e.classList.add(jt),this._inkBarContentElement.style.setProperty("transform",`translateX(${o}px) scaleX(${i})`),e.getBoundingClientRect(),e.classList.remove(jt),e.classList.add(ct),this._inkBarContentElement.style.setProperty("transform","")}deactivateInkBar(){this._elementRef.nativeElement.classList.remove(ct)}ngOnInit(){this._createInkBarElement()}ngOnDestroy(){this._inkBarElement?.remove(),this._inkBarElement=this._inkBarContentElement=null}_createInkBarElement(){let t=this._elementRef.nativeElement.ownerDocument||document,e=this._inkBarElement=t.createElement("span"),a=this._inkBarContentElement=t.createElement("span");e.className="mdc-tab-indicator",a.className="mdc-tab-indicator__content mdc-tab-indicator__content--underline",e.appendChild(this._inkBarContentElement),this._appendInkBarElement()}_appendInkBarElement(){this._inkBarElement;let t=this._fitToContent?this._elementRef.nativeElement.querySelector(".mdc-tab__content"):this._elementRef.nativeElement;t.appendChild(this._inkBarElement)}static \u0275fac=function(e){return new(e||n)};static \u0275dir=I({type:n,inputs:{fitInkBarToContent:[2,"fitInkBarToContent","fitInkBarToContent",_]}})}return n})();var Kt=(()=>{class n extends ve{elementRef=r(M);disabled=!1;focus(){this.elementRef.nativeElement.focus()}getOffsetLeft(){return this.elementRef.nativeElement.offsetLeft}getOffsetWidth(){return this.elementRef.nativeElement.offsetWidth}static \u0275fac=(()=>{let t;return function(a){return(t||(t=N(n)))(a||n)}})();static \u0275dir=I({type:n,selectors:[["","matTabLabelWrapper",""]],hostVars:3,hostBindings:function(e,a){e&2&&(k("aria-disabled",!!a.disabled),g("mat-mdc-tab-disabled",a.disabled))},inputs:{disabled:[2,"disabled","disabled",_]},features:[L]})}return n})(),Gt={passive:!0},ye=650,ke=100,Te=(()=>{class n{_elementRef=r(M);_changeDetectorRef=r(Z);_viewportRuler=r(Nt);_dir=r(ot,{optional:!0});_ngZone=r(O);_platform=r(rt);_sharedResizeObserver=r(Wt);_injector=r(U);_renderer=r(X);_animationMode=r(Q,{optional:!0});_eventCleanups;_scrollDistance=0;_selectedIndexChanged=!1;_destroyed=new F;_showPaginationControls=!1;_disableScrollAfter=!0;_disableScrollBefore=!0;_tabLabelCount;_scrollDistanceChanged;_keyManager;_currentTextContent;_stopScrolling=new F;disablePagination=!1;get selectedIndex(){return this._selectedIndex}set selectedIndex(t){let e=isNaN(t)?0:t;this._selectedIndex!=e&&(this._selectedIndexChanged=!0,this._selectedIndex=e,this._keyManager&&this._keyManager.updateActiveItem(e))}_selectedIndex=0;selectFocusedIndex=new u;indexFocused=new u;constructor(){this._eventCleanups=this._ngZone.runOutsideAngular(()=>[this._renderer.listen(this._elementRef.nativeElement,"mouseleave",()=>this._stopInterval())])}ngAfterViewInit(){this._eventCleanups.push(nt(this._renderer,this._previousPaginator.nativeElement,"touchstart",()=>this._handlePaginatorPress("before"),Gt),nt(this._renderer,this._nextPaginator.nativeElement,"touchstart",()=>this._handlePaginatorPress("after"),Gt))}ngAfterContentInit(){let t=this._dir?this._dir.change:gt("ltr"),e=this._sharedResizeObserver.observe(this._elementRef.nativeElement).pipe(kt(32),B(this._destroyed)),a=this._viewportRuler.change(150).pipe(B(this._destroyed)),i=()=>{this.updatePagination(),this._alignInkBarToSelectedTab()};this._keyManager=new Ht(this._items).withHorizontalOrientation(this._getLayoutDirection()).withHomeAndEnd().withWrap().skipPredicate(()=>!1),this._keyManager.updateActiveItem(Math.max(this._selectedIndex,0)),z(i,{injector:this._injector}),H(t,a,e,this._items.changes,this._itemsResized()).pipe(B(this._destroyed)).subscribe(()=>{this._ngZone.run(()=>{Promise.resolve().then(()=>{this._scrollDistance=Math.max(0,Math.min(this._getMaxScrollDistance(),this._scrollDistance)),i()})}),this._keyManager?.withHorizontalOrientation(this._getLayoutDirection())}),this._keyManager.change.subscribe(o=>{this.indexFocused.emit(o),this._setTabFocus(o)})}_itemsResized(){return typeof ResizeObserver!="function"?ft:this._items.changes.pipe(V(this._items),Ct(t=>new ut(e=>this._ngZone.runOutsideAngular(()=>{let a=new ResizeObserver(i=>e.next(i));return t.forEach(i=>a.observe(i.elementRef.nativeElement)),()=>{a.disconnect()}}))),Tt(1),yt(t=>t.some(e=>e.contentRect.width>0&&e.contentRect.height>0)))}ngAfterContentChecked(){this._tabLabelCount!=this._items.length&&(this.updatePagination(),this._tabLabelCount=this._items.length,this._changeDetectorRef.markForCheck()),this._selectedIndexChanged&&(this._scrollToLabel(this._selectedIndex),this._checkScrollingControls(),this._alignInkBarToSelectedTab(),this._selectedIndexChanged=!1,this._changeDetectorRef.markForCheck()),this._scrollDistanceChanged&&(this._updateTabScrollPosition(),this._scrollDistanceChanged=!1,this._changeDetectorRef.markForCheck())}ngOnDestroy(){this._eventCleanups.forEach(t=>t()),this._keyManager?.destroy(),this._destroyed.next(),this._destroyed.complete(),this._stopScrolling.complete()}_handleKeydown(t){if(!Ft(t))switch(t.keyCode){case 13:case 32:if(this.focusIndex!==this.selectedIndex){let e=this._items.get(this.focusIndex);e&&!e.disabled&&(this.selectFocusedIndex.emit(this.focusIndex),this._itemSelected(t))}break;default:this._keyManager?.onKeydown(t)}}_onContentChanges(){let t=this._elementRef.nativeElement.textContent;t!==this._currentTextContent&&(this._currentTextContent=t||"",this._ngZone.run(()=>{this.updatePagination(),this._alignInkBarToSelectedTab(),this._changeDetectorRef.markForCheck()}))}updatePagination(){this._checkPaginationEnabled(),this._checkScrollingControls(),this._updateTabScrollPosition()}get focusIndex(){return this._keyManager?this._keyManager.activeItemIndex:0}set focusIndex(t){!this._isValidIndex(t)||this.focusIndex===t||!this._keyManager||this._keyManager.setActiveItem(t)}_isValidIndex(t){return this._items?!!this._items.toArray()[t]:!0}_setTabFocus(t){if(this._showPaginationControls&&this._scrollToLabel(t),this._items&&this._items.length){this._items.toArray()[t].focus();let e=this._tabListContainer.nativeElement;this._getLayoutDirection()=="ltr"?e.scrollLeft=0:e.scrollLeft=e.scrollWidth-e.offsetWidth}}_getLayoutDirection(){return this._dir&&this._dir.value==="rtl"?"rtl":"ltr"}_updateTabScrollPosition(){if(this.disablePagination)return;let t=this.scrollDistance,e=this._getLayoutDirection()==="ltr"?-t:t;this._tabList.nativeElement.style.transform=`translateX(${Math.round(e)}px)`,(this._platform.TRIDENT||this._platform.EDGE)&&(this._tabListContainer.nativeElement.scrollLeft=0)}get scrollDistance(){return this._scrollDistance}set scrollDistance(t){this._scrollTo(t)}_scrollHeader(t){let e=this._tabListContainer.nativeElement.offsetWidth,a=(t=="before"?-1:1)*e/3;return this._scrollTo(this._scrollDistance+a)}_handlePaginatorClick(t){this._stopInterval(),this._scrollHeader(t)}_scrollToLabel(t){if(this.disablePagination)return;let e=this._items?this._items.toArray()[t]:null;if(!e)return;let a=this._tabListContainer.nativeElement.offsetWidth,{offsetLeft:i,offsetWidth:o}=e.elementRef.nativeElement,s,w;this._getLayoutDirection()=="ltr"?(s=i,w=s+o):(w=this._tabListInner.nativeElement.offsetWidth-i,s=w-o);let Y=this.scrollDistance,_t=this.scrollDistance+a;s<Y?this.scrollDistance-=Y-s:w>_t&&(this.scrollDistance+=Math.min(w-_t,s-Y))}_checkPaginationEnabled(){if(this.disablePagination)this._showPaginationControls=!1;else{let t=this._tabListInner.nativeElement.scrollWidth,e=this._elementRef.nativeElement.offsetWidth,a=t-e>=5;a||(this.scrollDistance=0),a!==this._showPaginationControls&&(this._showPaginationControls=a,this._changeDetectorRef.markForCheck())}}_checkScrollingControls(){this.disablePagination?this._disableScrollAfter=this._disableScrollBefore=!0:(this._disableScrollBefore=this.scrollDistance==0,this._disableScrollAfter=this.scrollDistance==this._getMaxScrollDistance(),this._changeDetectorRef.markForCheck())}_getMaxScrollDistance(){let t=this._tabListInner.nativeElement.scrollWidth,e=this._tabListContainer.nativeElement.offsetWidth;return t-e||0}_alignInkBarToSelectedTab(){let t=this._items&&this._items.length?this._items.toArray()[this.selectedIndex]:null,e=t?t.elementRef.nativeElement:null;e?this._inkBar.alignToElement(e):this._inkBar.hide()}_stopInterval(){this._stopScrolling.next()}_handlePaginatorPress(t,e){e&&e.button!=null&&e.button!==0||(this._stopInterval(),vt(ye,ke).pipe(B(H(this._stopScrolling,this._destroyed))).subscribe(()=>{let{maxScrollDistance:a,distance:i}=this._scrollHeader(t);(i===0||i>=a)&&this._stopInterval()}))}_scrollTo(t){if(this.disablePagination)return{maxScrollDistance:0,distance:0};let e=this._getMaxScrollDistance();return this._scrollDistance=Math.max(0,Math.min(e,t)),this._scrollDistanceChanged=!0,this._checkScrollingControls(),{maxScrollDistance:e,distance:this._scrollDistance}}static \u0275fac=function(e){return new(e||n)};static \u0275dir=I({type:n,inputs:{disablePagination:[2,"disablePagination","disablePagination",_],selectedIndex:[2,"selectedIndex","selectedIndex",K]},outputs:{selectFocusedIndex:"selectFocusedIndex",indexFocused:"indexFocused"}})}return n})(),Ce=(()=>{class n extends Te{_items;_tabListContainer;_tabList;_tabListInner;_nextPaginator;_previousPaginator;_inkBar;ariaLabel;ariaLabelledby;disableRipple=!1;ngAfterContentInit(){this._inkBar=new mt(this._items),super.ngAfterContentInit()}_itemSelected(t){t.preventDefault()}static \u0275fac=(()=>{let t;return function(a){return(t||(t=N(n)))(a||n)}})();static \u0275cmp=P({type:n,selectors:[["mat-tab-header"]],contentQueries:function(e,a,i){if(e&1&&A(i,Kt,4),e&2){let o;m(o=b())&&(a._items=o)}},viewQuery:function(e,a){if(e&1&&(p(Jt,7),p(te,7),p(ee,7),p(ae,5),p(ie,5)),e&2){let i;m(i=b())&&(a._tabListContainer=i.first),m(i=b())&&(a._tabList=i.first),m(i=b())&&(a._tabListInner=i.first),m(i=b())&&(a._nextPaginator=i.first),m(i=b())&&(a._previousPaginator=i.first)}},hostAttrs:[1,"mat-mdc-tab-header"],hostVars:4,hostBindings:function(e,a){e&2&&g("mat-mdc-tab-header-pagination-controls-enabled",a._showPaginationControls)("mat-mdc-tab-header-rtl",a._getLayoutDirection()=="rtl")},inputs:{ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],disableRipple:[2,"disableRipple","disableRipple",_]},features:[L],ngContentSelectors:pt,decls:13,vars:10,consts:[["previousPaginator",""],["tabListContainer",""],["tabList",""],["tabListInner",""],["nextPaginator",""],["mat-ripple","",1,"mat-mdc-tab-header-pagination","mat-mdc-tab-header-pagination-before",3,"click","mousedown","touchend","matRippleDisabled"],[1,"mat-mdc-tab-header-pagination-chevron"],[1,"mat-mdc-tab-label-container",3,"keydown"],["role","tablist",1,"mat-mdc-tab-list",3,"cdkObserveContent"],[1,"mat-mdc-tab-labels"],["mat-ripple","",1,"mat-mdc-tab-header-pagination","mat-mdc-tab-header-pagination-after",3,"mousedown","click","touchend","matRippleDisabled"]],template:function(e,a){if(e&1){let i=E();$(),h(0,"div",5,0),C("click",function(){return l(i),c(a._handlePaginatorClick("before"))})("mousedown",function(s){return l(i),c(a._handlePaginatorPress("before",s))})("touchend",function(){return l(i),c(a._stopInterval())}),G(2,"div",6),y(),h(3,"div",7,1),C("keydown",function(s){return l(i),c(a._handleKeydown(s))}),h(5,"div",8,2),C("cdkObserveContent",function(){return l(i),c(a._onContentChanges())}),h(7,"div",9,3),q(9),y()()(),h(10,"div",10,4),C("mousedown",function(s){return l(i),c(a._handlePaginatorPress("after",s))})("click",function(){return l(i),c(a._handlePaginatorClick("after"))})("touchend",function(){return l(i),c(a._stopInterval())}),G(12,"div",6),y()}e&2&&(g("mat-mdc-tab-header-pagination-disabled",a._disableScrollBefore),T("matRippleDisabled",a._disableScrollBefore||a.disableRipple),f(3),g("_mat-animation-noopable",a._animationMode==="NoopAnimations"),f(2),k("aria-label",a.ariaLabel||null)("aria-labelledby",a.ariaLabelledby||null),f(5),g("mat-mdc-tab-header-pagination-disabled",a._disableScrollAfter),T("matRippleDisabled",a._disableScrollAfter||a.disableRipple))},dependencies:[lt,At],styles:[`.mat-mdc-tab-header{display:flex;overflow:hidden;position:relative;flex-shrink:0}.mdc-tab-indicator .mdc-tab-indicator__content{transition-duration:var(--mat-tab-animation-duration, 250ms)}.mat-mdc-tab-header-pagination{-webkit-user-select:none;user-select:none;position:relative;display:none;justify-content:center;align-items:center;min-width:32px;cursor:pointer;z-index:2;-webkit-tap-highlight-color:rgba(0,0,0,0);touch-action:none;box-sizing:content-box;outline:0}.mat-mdc-tab-header-pagination::-moz-focus-inner{border:0}.mat-mdc-tab-header-pagination .mat-ripple-element{opacity:.12;background-color:var(--mat-tab-header-inactive-ripple-color, var(--mat-sys-on-surface))}.mat-mdc-tab-header-pagination-controls-enabled .mat-mdc-tab-header-pagination{display:flex}.mat-mdc-tab-header-pagination-before,.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-after{padding-left:4px}.mat-mdc-tab-header-pagination-before .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-after .mat-mdc-tab-header-pagination-chevron{transform:rotate(-135deg)}.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-before,.mat-mdc-tab-header-pagination-after{padding-right:4px}.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-before .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-header-pagination-after .mat-mdc-tab-header-pagination-chevron{transform:rotate(45deg)}.mat-mdc-tab-header-pagination-chevron{border-style:solid;border-width:2px 2px 0 0;height:8px;width:8px;border-color:var(--mat-tab-header-pagination-icon-color, var(--mat-sys-on-surface))}.mat-mdc-tab-header-pagination-disabled{box-shadow:none;cursor:default;pointer-events:none}.mat-mdc-tab-header-pagination-disabled .mat-mdc-tab-header-pagination-chevron{opacity:.4}.mat-mdc-tab-list{flex-grow:1;position:relative;transition:transform 500ms cubic-bezier(0.35, 0, 0.25, 1)}._mat-animation-noopable .mat-mdc-tab-list{transition:none}.mat-mdc-tab-label-container{display:flex;flex-grow:1;overflow:hidden;z-index:1;border-bottom-style:solid;border-bottom-width:var(--mat-tab-header-divider-height, 1px);border-bottom-color:var(--mat-tab-header-divider-color, var(--mat-sys-surface-variant))}.mat-mdc-tab-group-inverted-header .mat-mdc-tab-label-container{border-bottom:none;border-top-style:solid;border-top-width:var(--mat-tab-header-divider-height, 1px);border-top-color:var(--mat-tab-header-divider-color, var(--mat-sys-surface-variant))}.mat-mdc-tab-labels{display:flex;flex:1 0 auto}[mat-align-tabs=center]>.mat-mdc-tab-header .mat-mdc-tab-labels{justify-content:center}[mat-align-tabs=end]>.mat-mdc-tab-header .mat-mdc-tab-labels{justify-content:flex-end}.cdk-drop-list .mat-mdc-tab-labels,.mat-mdc-tab-labels.cdk-drop-list{min-height:var(--mdc-secondary-navigation-tab-container-height, 48px)}.mat-mdc-tab::before{margin:5px}@media(forced-colors: active){.mat-mdc-tab[aria-disabled=true]{color:GrayText}}
1
+ import{a as zt,e as lt,g as Wt}from"./chunk-IJ6QEGE5.js";import{B as Ht,F as ot,I as Vt,J as Nt,N as Ot,Q as Qt,R as st,ea as dt,f as nt,g as rt,m as Lt,n as Et,r as At,y as St,z as Ft}from"./chunk-ZHY3BUQJ.js";import{$ as V,$a as f,$b as b,B as vt,Ba as U,D as H,Db as J,E as yt,Fa as u,Fb as tt,Ga as O,Gb as et,Hb as at,Ib as h,Jb as y,Ka as M,Kb as G,Kc as Z,M as kt,Mc as _,Na as It,Nc as K,Ob as E,Qa as Q,Qb as C,Rb as v,Sb as $,Ta as z,Tb as q,Yb as A,Z as Tt,Zb as p,_b as m,a as x,aa as Ct,ab as W,c as ut,cb as X,d as F,da as B,dc as it,ec as Bt,fb as Dt,fc as Pt,k as ft,ka as wt,kb as P,la as D,lb as Mt,mb as I,na as r,o as gt,ob as L,pc as S,qb as R,ua as xt,ub as k,va as l,vb as T,wa as c,wb as Rt,xb as g,za as N,zb as j}from"./chunk-UXRO4UFY.js";var pt=["*"];function Xt(n,d){n&1&&q(0)}var Jt=["tabListContainer"],te=["tabList"],ee=["tabListInner"],ae=["nextPaginator"],ie=["previousPaginator"],ne=["content"];function re(n,d){}var oe=["tabBodyWrapper"],se=["tabHeader"];function de(n,d){}function le(n,d){if(n&1&&R(0,de,0,0,"ng-template",12),n&2){let t=v().$implicit;T("cdkPortalOutlet",t.templateLabel)}}function ce(n,d){if(n&1&&Bt(0),n&2){let t=v().$implicit;Pt(t.textLabel)}}function me(n,d){if(n&1){let t=E();h(0,"div",7,2),C("click",function(){let a=l(t),i=a.$implicit,o=a.$index,s=v(),w=it(1);return c(s._handleClick(i,w,o))})("cdkFocusChange",function(a){let i=l(t).$index,o=v();return c(o._tabFocusChanged(a,i))}),G(2,"span",8)(3,"div",9),h(4,"span",10)(5,"span",11),R(6,le,1,1,null,12)(7,ce,1,1),y()()()}if(n&2){let t=d.$implicit,e=d.$index,a=it(1),i=v();j(t.labelClass),g("mdc-tab--active",i.selectedIndex===e),T("id",i._getTabLabelId(t,e))("disabled",t.disabled)("fitInkBarToContent",i.fitInkBarToContent),k("tabIndex",i._getTabIndex(e))("aria-posinset",e+1)("aria-setsize",i._tabs.length)("aria-controls",i._getTabContentId(e))("aria-selected",i.selectedIndex===e)("aria-label",t.ariaLabel||null)("aria-labelledby",!t.ariaLabel&&t.ariaLabelledby?t.ariaLabelledby:null),f(3),T("matRippleTrigger",a)("matRippleDisabled",t.disabled||i.disableRipple),f(3),J(t.templateLabel?6:7)}}function be(n,d){n&1&&q(0)}function he(n,d){if(n&1){let t=E();h(0,"mat-tab-body",13),C("_onCentered",function(){l(t);let a=v();return c(a._removeTabBodyWrapperHeight())})("_onCentering",function(a){l(t);let i=v();return c(i._setTabBodyWrapperHeight(a))})("_beforeCentering",function(a){l(t);let i=v();return c(i._bodyCentered(a))}),y()}if(n&2){let t=d.$implicit,e=d.$index,a=v();j(t.bodyClass),T("id",a._getTabContentId(e))("content",t.content)("position",t.position)("animationDuration",a.animationDuration)("preserveContent",a.preserveContent),k("tabindex",a.contentTabIndex!=null&&a.selectedIndex===e?a.contentTabIndex:null)("aria-labelledby",a._getTabLabelId(t,e))("aria-hidden",a.selectedIndex!==e)}}var pe=new D("MatTabContent"),_e=(()=>{class n{template=r(W);constructor(){}static \u0275fac=function(e){return new(e||n)};static \u0275dir=I({type:n,selectors:[["","matTabContent",""]],features:[S([{provide:pe,useExisting:n}])]})}return n})(),ue=new D("MatTabLabel"),qt=new D("MAT_TAB"),fe=(()=>{class n extends Qt{_closestTab=r(qt,{optional:!0});static \u0275fac=(()=>{let t;return function(a){return(t||(t=N(n)))(a||n)}})();static \u0275dir=I({type:n,selectors:[["","mat-tab-label",""],["","matTabLabel",""]],features:[S([{provide:ue,useExisting:n}]),L]})}return n})(),Zt=new D("MAT_TAB_GROUP"),ge=(()=>{class n{_viewContainerRef=r(Dt);_closestTabGroup=r(Zt,{optional:!0});disabled=!1;get templateLabel(){return this._templateLabel}set templateLabel(t){this._setTemplateLabelInput(t)}_templateLabel;_explicitContent=void 0;_implicitContent;textLabel="";ariaLabel;ariaLabelledby;labelClass;bodyClass;id=null;_contentPortal=null;get content(){return this._contentPortal}_stateChanges=new F;position=null;origin=null;isActive=!1;constructor(){r(Et).load(zt)}ngOnChanges(t){(t.hasOwnProperty("textLabel")||t.hasOwnProperty("disabled"))&&this._stateChanges.next()}ngOnDestroy(){this._stateChanges.complete()}ngOnInit(){this._contentPortal=new Ot(this._explicitContent||this._implicitContent,this._viewContainerRef)}_setTemplateLabelInput(t){t&&t._closestTab===this&&(this._templateLabel=t)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=P({type:n,selectors:[["mat-tab"]],contentQueries:function(e,a,i){if(e&1&&(A(i,fe,5),A(i,_e,7,W)),e&2){let o;m(o=b())&&(a.templateLabel=o.first),m(o=b())&&(a._explicitContent=o.first)}},viewQuery:function(e,a){if(e&1&&p(W,7),e&2){let i;m(i=b())&&(a._implicitContent=i.first)}},hostAttrs:["hidden",""],hostVars:1,hostBindings:function(e,a){e&2&&k("id",null)},inputs:{disabled:[2,"disabled","disabled",_],textLabel:[0,"label","textLabel"],ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],labelClass:"labelClass",bodyClass:"bodyClass",id:"id"},exportAs:["matTab"],features:[S([{provide:qt,useExisting:n}]),xt],ngContentSelectors:pt,decls:1,vars:0,template:function(e,a){e&1&&($(),R(0,Xt,1,0,"ng-template"))},encapsulation:2})}return n})(),ct="mdc-tab-indicator--active",jt="mdc-tab-indicator--no-transition",mt=class{_items;_currentItem;constructor(d){this._items=d}hide(){this._items.forEach(d=>d.deactivateInkBar()),this._currentItem=void 0}alignToElement(d){let t=this._items.find(a=>a.elementRef.nativeElement===d),e=this._currentItem;if(t!==e&&(e?.deactivateInkBar(),t)){let a=e?.elementRef.nativeElement.getBoundingClientRect?.();t.activateInkBar(a),this._currentItem=t}}},ve=(()=>{class n{_elementRef=r(M);_inkBarElement;_inkBarContentElement;_fitToContent=!1;get fitInkBarToContent(){return this._fitToContent}set fitInkBarToContent(t){this._fitToContent!==t&&(this._fitToContent=t,this._inkBarElement&&this._appendInkBarElement())}activateInkBar(t){let e=this._elementRef.nativeElement;if(!t||!e.getBoundingClientRect||!this._inkBarContentElement){e.classList.add(ct);return}let a=e.getBoundingClientRect(),i=t.width/a.width,o=t.left-a.left;e.classList.add(jt),this._inkBarContentElement.style.setProperty("transform",`translateX(${o}px) scaleX(${i})`),e.getBoundingClientRect(),e.classList.remove(jt),e.classList.add(ct),this._inkBarContentElement.style.setProperty("transform","")}deactivateInkBar(){this._elementRef.nativeElement.classList.remove(ct)}ngOnInit(){this._createInkBarElement()}ngOnDestroy(){this._inkBarElement?.remove(),this._inkBarElement=this._inkBarContentElement=null}_createInkBarElement(){let t=this._elementRef.nativeElement.ownerDocument||document,e=this._inkBarElement=t.createElement("span"),a=this._inkBarContentElement=t.createElement("span");e.className="mdc-tab-indicator",a.className="mdc-tab-indicator__content mdc-tab-indicator__content--underline",e.appendChild(this._inkBarContentElement),this._appendInkBarElement()}_appendInkBarElement(){this._inkBarElement;let t=this._fitToContent?this._elementRef.nativeElement.querySelector(".mdc-tab__content"):this._elementRef.nativeElement;t.appendChild(this._inkBarElement)}static \u0275fac=function(e){return new(e||n)};static \u0275dir=I({type:n,inputs:{fitInkBarToContent:[2,"fitInkBarToContent","fitInkBarToContent",_]}})}return n})();var Kt=(()=>{class n extends ve{elementRef=r(M);disabled=!1;focus(){this.elementRef.nativeElement.focus()}getOffsetLeft(){return this.elementRef.nativeElement.offsetLeft}getOffsetWidth(){return this.elementRef.nativeElement.offsetWidth}static \u0275fac=(()=>{let t;return function(a){return(t||(t=N(n)))(a||n)}})();static \u0275dir=I({type:n,selectors:[["","matTabLabelWrapper",""]],hostVars:3,hostBindings:function(e,a){e&2&&(k("aria-disabled",!!a.disabled),g("mat-mdc-tab-disabled",a.disabled))},inputs:{disabled:[2,"disabled","disabled",_]},features:[L]})}return n})(),Gt={passive:!0},ye=650,ke=100,Te=(()=>{class n{_elementRef=r(M);_changeDetectorRef=r(Z);_viewportRuler=r(Nt);_dir=r(ot,{optional:!0});_ngZone=r(O);_platform=r(rt);_sharedResizeObserver=r(Wt);_injector=r(U);_renderer=r(X);_animationMode=r(Q,{optional:!0});_eventCleanups;_scrollDistance=0;_selectedIndexChanged=!1;_destroyed=new F;_showPaginationControls=!1;_disableScrollAfter=!0;_disableScrollBefore=!0;_tabLabelCount;_scrollDistanceChanged;_keyManager;_currentTextContent;_stopScrolling=new F;disablePagination=!1;get selectedIndex(){return this._selectedIndex}set selectedIndex(t){let e=isNaN(t)?0:t;this._selectedIndex!=e&&(this._selectedIndexChanged=!0,this._selectedIndex=e,this._keyManager&&this._keyManager.updateActiveItem(e))}_selectedIndex=0;selectFocusedIndex=new u;indexFocused=new u;constructor(){this._eventCleanups=this._ngZone.runOutsideAngular(()=>[this._renderer.listen(this._elementRef.nativeElement,"mouseleave",()=>this._stopInterval())])}ngAfterViewInit(){this._eventCleanups.push(nt(this._renderer,this._previousPaginator.nativeElement,"touchstart",()=>this._handlePaginatorPress("before"),Gt),nt(this._renderer,this._nextPaginator.nativeElement,"touchstart",()=>this._handlePaginatorPress("after"),Gt))}ngAfterContentInit(){let t=this._dir?this._dir.change:gt("ltr"),e=this._sharedResizeObserver.observe(this._elementRef.nativeElement).pipe(kt(32),B(this._destroyed)),a=this._viewportRuler.change(150).pipe(B(this._destroyed)),i=()=>{this.updatePagination(),this._alignInkBarToSelectedTab()};this._keyManager=new Ht(this._items).withHorizontalOrientation(this._getLayoutDirection()).withHomeAndEnd().withWrap().skipPredicate(()=>!1),this._keyManager.updateActiveItem(Math.max(this._selectedIndex,0)),z(i,{injector:this._injector}),H(t,a,e,this._items.changes,this._itemsResized()).pipe(B(this._destroyed)).subscribe(()=>{this._ngZone.run(()=>{Promise.resolve().then(()=>{this._scrollDistance=Math.max(0,Math.min(this._getMaxScrollDistance(),this._scrollDistance)),i()})}),this._keyManager?.withHorizontalOrientation(this._getLayoutDirection())}),this._keyManager.change.subscribe(o=>{this.indexFocused.emit(o),this._setTabFocus(o)})}_itemsResized(){return typeof ResizeObserver!="function"?ft:this._items.changes.pipe(V(this._items),Ct(t=>new ut(e=>this._ngZone.runOutsideAngular(()=>{let a=new ResizeObserver(i=>e.next(i));return t.forEach(i=>a.observe(i.elementRef.nativeElement)),()=>{a.disconnect()}}))),Tt(1),yt(t=>t.some(e=>e.contentRect.width>0&&e.contentRect.height>0)))}ngAfterContentChecked(){this._tabLabelCount!=this._items.length&&(this.updatePagination(),this._tabLabelCount=this._items.length,this._changeDetectorRef.markForCheck()),this._selectedIndexChanged&&(this._scrollToLabel(this._selectedIndex),this._checkScrollingControls(),this._alignInkBarToSelectedTab(),this._selectedIndexChanged=!1,this._changeDetectorRef.markForCheck()),this._scrollDistanceChanged&&(this._updateTabScrollPosition(),this._scrollDistanceChanged=!1,this._changeDetectorRef.markForCheck())}ngOnDestroy(){this._eventCleanups.forEach(t=>t()),this._keyManager?.destroy(),this._destroyed.next(),this._destroyed.complete(),this._stopScrolling.complete()}_handleKeydown(t){if(!Ft(t))switch(t.keyCode){case 13:case 32:if(this.focusIndex!==this.selectedIndex){let e=this._items.get(this.focusIndex);e&&!e.disabled&&(this.selectFocusedIndex.emit(this.focusIndex),this._itemSelected(t))}break;default:this._keyManager?.onKeydown(t)}}_onContentChanges(){let t=this._elementRef.nativeElement.textContent;t!==this._currentTextContent&&(this._currentTextContent=t||"",this._ngZone.run(()=>{this.updatePagination(),this._alignInkBarToSelectedTab(),this._changeDetectorRef.markForCheck()}))}updatePagination(){this._checkPaginationEnabled(),this._checkScrollingControls(),this._updateTabScrollPosition()}get focusIndex(){return this._keyManager?this._keyManager.activeItemIndex:0}set focusIndex(t){!this._isValidIndex(t)||this.focusIndex===t||!this._keyManager||this._keyManager.setActiveItem(t)}_isValidIndex(t){return this._items?!!this._items.toArray()[t]:!0}_setTabFocus(t){if(this._showPaginationControls&&this._scrollToLabel(t),this._items&&this._items.length){this._items.toArray()[t].focus();let e=this._tabListContainer.nativeElement;this._getLayoutDirection()=="ltr"?e.scrollLeft=0:e.scrollLeft=e.scrollWidth-e.offsetWidth}}_getLayoutDirection(){return this._dir&&this._dir.value==="rtl"?"rtl":"ltr"}_updateTabScrollPosition(){if(this.disablePagination)return;let t=this.scrollDistance,e=this._getLayoutDirection()==="ltr"?-t:t;this._tabList.nativeElement.style.transform=`translateX(${Math.round(e)}px)`,(this._platform.TRIDENT||this._platform.EDGE)&&(this._tabListContainer.nativeElement.scrollLeft=0)}get scrollDistance(){return this._scrollDistance}set scrollDistance(t){this._scrollTo(t)}_scrollHeader(t){let e=this._tabListContainer.nativeElement.offsetWidth,a=(t=="before"?-1:1)*e/3;return this._scrollTo(this._scrollDistance+a)}_handlePaginatorClick(t){this._stopInterval(),this._scrollHeader(t)}_scrollToLabel(t){if(this.disablePagination)return;let e=this._items?this._items.toArray()[t]:null;if(!e)return;let a=this._tabListContainer.nativeElement.offsetWidth,{offsetLeft:i,offsetWidth:o}=e.elementRef.nativeElement,s,w;this._getLayoutDirection()=="ltr"?(s=i,w=s+o):(w=this._tabListInner.nativeElement.offsetWidth-i,s=w-o);let Y=this.scrollDistance,_t=this.scrollDistance+a;s<Y?this.scrollDistance-=Y-s:w>_t&&(this.scrollDistance+=Math.min(w-_t,s-Y))}_checkPaginationEnabled(){if(this.disablePagination)this._showPaginationControls=!1;else{let t=this._tabListInner.nativeElement.scrollWidth,e=this._elementRef.nativeElement.offsetWidth,a=t-e>=5;a||(this.scrollDistance=0),a!==this._showPaginationControls&&(this._showPaginationControls=a,this._changeDetectorRef.markForCheck())}}_checkScrollingControls(){this.disablePagination?this._disableScrollAfter=this._disableScrollBefore=!0:(this._disableScrollBefore=this.scrollDistance==0,this._disableScrollAfter=this.scrollDistance==this._getMaxScrollDistance(),this._changeDetectorRef.markForCheck())}_getMaxScrollDistance(){let t=this._tabListInner.nativeElement.scrollWidth,e=this._tabListContainer.nativeElement.offsetWidth;return t-e||0}_alignInkBarToSelectedTab(){let t=this._items&&this._items.length?this._items.toArray()[this.selectedIndex]:null,e=t?t.elementRef.nativeElement:null;e?this._inkBar.alignToElement(e):this._inkBar.hide()}_stopInterval(){this._stopScrolling.next()}_handlePaginatorPress(t,e){e&&e.button!=null&&e.button!==0||(this._stopInterval(),vt(ye,ke).pipe(B(H(this._stopScrolling,this._destroyed))).subscribe(()=>{let{maxScrollDistance:a,distance:i}=this._scrollHeader(t);(i===0||i>=a)&&this._stopInterval()}))}_scrollTo(t){if(this.disablePagination)return{maxScrollDistance:0,distance:0};let e=this._getMaxScrollDistance();return this._scrollDistance=Math.max(0,Math.min(e,t)),this._scrollDistanceChanged=!0,this._checkScrollingControls(),{maxScrollDistance:e,distance:this._scrollDistance}}static \u0275fac=function(e){return new(e||n)};static \u0275dir=I({type:n,inputs:{disablePagination:[2,"disablePagination","disablePagination",_],selectedIndex:[2,"selectedIndex","selectedIndex",K]},outputs:{selectFocusedIndex:"selectFocusedIndex",indexFocused:"indexFocused"}})}return n})(),Ce=(()=>{class n extends Te{_items;_tabListContainer;_tabList;_tabListInner;_nextPaginator;_previousPaginator;_inkBar;ariaLabel;ariaLabelledby;disableRipple=!1;ngAfterContentInit(){this._inkBar=new mt(this._items),super.ngAfterContentInit()}_itemSelected(t){t.preventDefault()}static \u0275fac=(()=>{let t;return function(a){return(t||(t=N(n)))(a||n)}})();static \u0275cmp=P({type:n,selectors:[["mat-tab-header"]],contentQueries:function(e,a,i){if(e&1&&A(i,Kt,4),e&2){let o;m(o=b())&&(a._items=o)}},viewQuery:function(e,a){if(e&1&&(p(Jt,7),p(te,7),p(ee,7),p(ae,5),p(ie,5)),e&2){let i;m(i=b())&&(a._tabListContainer=i.first),m(i=b())&&(a._tabList=i.first),m(i=b())&&(a._tabListInner=i.first),m(i=b())&&(a._nextPaginator=i.first),m(i=b())&&(a._previousPaginator=i.first)}},hostAttrs:[1,"mat-mdc-tab-header"],hostVars:4,hostBindings:function(e,a){e&2&&g("mat-mdc-tab-header-pagination-controls-enabled",a._showPaginationControls)("mat-mdc-tab-header-rtl",a._getLayoutDirection()=="rtl")},inputs:{ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],disableRipple:[2,"disableRipple","disableRipple",_]},features:[L],ngContentSelectors:pt,decls:13,vars:10,consts:[["previousPaginator",""],["tabListContainer",""],["tabList",""],["tabListInner",""],["nextPaginator",""],["mat-ripple","",1,"mat-mdc-tab-header-pagination","mat-mdc-tab-header-pagination-before",3,"click","mousedown","touchend","matRippleDisabled"],[1,"mat-mdc-tab-header-pagination-chevron"],[1,"mat-mdc-tab-label-container",3,"keydown"],["role","tablist",1,"mat-mdc-tab-list",3,"cdkObserveContent"],[1,"mat-mdc-tab-labels"],["mat-ripple","",1,"mat-mdc-tab-header-pagination","mat-mdc-tab-header-pagination-after",3,"mousedown","click","touchend","matRippleDisabled"]],template:function(e,a){if(e&1){let i=E();$(),h(0,"div",5,0),C("click",function(){return l(i),c(a._handlePaginatorClick("before"))})("mousedown",function(s){return l(i),c(a._handlePaginatorPress("before",s))})("touchend",function(){return l(i),c(a._stopInterval())}),G(2,"div",6),y(),h(3,"div",7,1),C("keydown",function(s){return l(i),c(a._handleKeydown(s))}),h(5,"div",8,2),C("cdkObserveContent",function(){return l(i),c(a._onContentChanges())}),h(7,"div",9,3),q(9),y()()(),h(10,"div",10,4),C("mousedown",function(s){return l(i),c(a._handlePaginatorPress("after",s))})("click",function(){return l(i),c(a._handlePaginatorClick("after"))})("touchend",function(){return l(i),c(a._stopInterval())}),G(12,"div",6),y()}e&2&&(g("mat-mdc-tab-header-pagination-disabled",a._disableScrollBefore),T("matRippleDisabled",a._disableScrollBefore||a.disableRipple),f(3),g("_mat-animation-noopable",a._animationMode==="NoopAnimations"),f(2),k("aria-label",a.ariaLabel||null)("aria-labelledby",a.ariaLabelledby||null),f(5),g("mat-mdc-tab-header-pagination-disabled",a._disableScrollAfter),T("matRippleDisabled",a._disableScrollAfter||a.disableRipple))},dependencies:[lt,At],styles:[`.mat-mdc-tab-header{display:flex;overflow:hidden;position:relative;flex-shrink:0}.mdc-tab-indicator .mdc-tab-indicator__content{transition-duration:var(--mat-tab-animation-duration, 250ms)}.mat-mdc-tab-header-pagination{-webkit-user-select:none;user-select:none;position:relative;display:none;justify-content:center;align-items:center;min-width:32px;cursor:pointer;z-index:2;-webkit-tap-highlight-color:rgba(0,0,0,0);touch-action:none;box-sizing:content-box;outline:0}.mat-mdc-tab-header-pagination::-moz-focus-inner{border:0}.mat-mdc-tab-header-pagination .mat-ripple-element{opacity:.12;background-color:var(--mat-tab-header-inactive-ripple-color, var(--mat-sys-on-surface))}.mat-mdc-tab-header-pagination-controls-enabled .mat-mdc-tab-header-pagination{display:flex}.mat-mdc-tab-header-pagination-before,.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-after{padding-left:4px}.mat-mdc-tab-header-pagination-before .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-after .mat-mdc-tab-header-pagination-chevron{transform:rotate(-135deg)}.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-before,.mat-mdc-tab-header-pagination-after{padding-right:4px}.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-before .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-header-pagination-after .mat-mdc-tab-header-pagination-chevron{transform:rotate(45deg)}.mat-mdc-tab-header-pagination-chevron{border-style:solid;border-width:2px 2px 0 0;height:8px;width:8px;border-color:var(--mat-tab-header-pagination-icon-color, var(--mat-sys-on-surface))}.mat-mdc-tab-header-pagination-disabled{box-shadow:none;cursor:default;pointer-events:none}.mat-mdc-tab-header-pagination-disabled .mat-mdc-tab-header-pagination-chevron{opacity:.4}.mat-mdc-tab-list{flex-grow:1;position:relative;transition:transform 500ms cubic-bezier(0.35, 0, 0.25, 1)}._mat-animation-noopable .mat-mdc-tab-list{transition:none}.mat-mdc-tab-label-container{display:flex;flex-grow:1;overflow:hidden;z-index:1;border-bottom-style:solid;border-bottom-width:var(--mat-tab-header-divider-height, 1px);border-bottom-color:var(--mat-tab-header-divider-color, var(--mat-sys-surface-variant))}.mat-mdc-tab-group-inverted-header .mat-mdc-tab-label-container{border-bottom:none;border-top-style:solid;border-top-width:var(--mat-tab-header-divider-height, 1px);border-top-color:var(--mat-tab-header-divider-color, var(--mat-sys-surface-variant))}.mat-mdc-tab-labels{display:flex;flex:1 0 auto}[mat-align-tabs=center]>.mat-mdc-tab-header .mat-mdc-tab-labels{justify-content:center}[mat-align-tabs=end]>.mat-mdc-tab-header .mat-mdc-tab-labels{justify-content:flex-end}.cdk-drop-list .mat-mdc-tab-labels,.mat-mdc-tab-labels.cdk-drop-list{min-height:var(--mdc-secondary-navigation-tab-container-height, 48px)}.mat-mdc-tab::before{margin:5px}@media(forced-colors: active){.mat-mdc-tab[aria-disabled=true]{color:GrayText}}
2
2
  `],encapsulation:2})}return n})(),we=new D("MAT_TABS_CONFIG"),$t=(()=>{class n extends st{_host=r(bt);_centeringSub=x.EMPTY;_leavingSub=x.EMPTY;constructor(){super()}ngOnInit(){super.ngOnInit(),this._centeringSub=this._host._beforeCentering.pipe(V(this._host._isCenterPosition())).subscribe(t=>{this._host._content&&t&&!this.hasAttached()&&this.attach(this._host._content)}),this._leavingSub=this._host._afterLeavingCenter.subscribe(()=>{this._host.preserveContent||this.detach()})}ngOnDestroy(){super.ngOnDestroy(),this._centeringSub.unsubscribe(),this._leavingSub.unsubscribe()}static \u0275fac=function(e){return new(e||n)};static \u0275dir=I({type:n,selectors:[["","matTabBodyHost",""]],features:[L]})}return n})(),bt=(()=>{class n{_elementRef=r(M);_dir=r(ot,{optional:!0});_ngZone=r(O);_injector=r(U);_renderer=r(X);_animationsModule=r(Q,{optional:!0});_eventCleanups;_initialized;_fallbackTimer;_positionIndex;_dirChangeSubscription=x.EMPTY;_position;_previousPosition;_onCentering=new u;_beforeCentering=new u;_afterLeavingCenter=new u;_onCentered=new u(!0);_portalHost;_contentElement;_content;animationDuration="500ms";preserveContent=!1;set position(t){this._positionIndex=t,this._computePositionAnimationState()}constructor(){if(this._dir){let t=r(Z);this._dirChangeSubscription=this._dir.change.subscribe(e=>{this._computePositionAnimationState(e),t.markForCheck()})}}ngOnInit(){this._bindTransitionEvents(),this._position==="center"&&(this._setActiveClass(!0),z(()=>this._onCentering.emit(this._elementRef.nativeElement.clientHeight),{injector:this._injector})),this._initialized=!0}ngOnDestroy(){clearTimeout(this._fallbackTimer),this._eventCleanups?.forEach(t=>t()),this._dirChangeSubscription.unsubscribe()}_bindTransitionEvents(){this._ngZone.runOutsideAngular(()=>{let t=this._elementRef.nativeElement,e=a=>{a.target===this._contentElement?.nativeElement&&(this._elementRef.nativeElement.classList.remove("mat-tab-body-animating"),a.type==="transitionend"&&this._transitionDone())};this._eventCleanups=[this._renderer.listen(t,"transitionstart",a=>{a.target===this._contentElement?.nativeElement&&(this._elementRef.nativeElement.classList.add("mat-tab-body-animating"),this._transitionStarted())}),this._renderer.listen(t,"transitionend",e),this._renderer.listen(t,"transitioncancel",e)]})}_transitionStarted(){clearTimeout(this._fallbackTimer);let t=this._position==="center";this._beforeCentering.emit(t),t&&this._onCentering.emit(this._elementRef.nativeElement.clientHeight)}_transitionDone(){this._position==="center"?this._onCentered.emit():this._previousPosition==="center"&&this._afterLeavingCenter.emit()}_setActiveClass(t){this._elementRef.nativeElement.classList.toggle("mat-mdc-tab-body-active",t)}_getLayoutDirection(){return this._dir&&this._dir.value==="rtl"?"rtl":"ltr"}_isCenterPosition(){return this._positionIndex===0}_computePositionAnimationState(t=this._getLayoutDirection()){this._previousPosition=this._position,this._positionIndex<0?this._position=t=="ltr"?"left":"right":this._positionIndex>0?this._position=t=="ltr"?"right":"left":this._position="center",this._animationsDisabled()?this._simulateTransitionEvents():this._initialized&&(this._position==="center"||this._previousPosition==="center")&&(clearTimeout(this._fallbackTimer),this._fallbackTimer=this._ngZone.runOutsideAngular(()=>setTimeout(()=>this._simulateTransitionEvents(),100)))}_simulateTransitionEvents(){this._transitionStarted(),z(()=>this._transitionDone(),{injector:this._injector})}_animationsDisabled(){return this._animationsModule==="NoopAnimations"||this.animationDuration==="0ms"||this.animationDuration==="0s"}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=P({type:n,selectors:[["mat-tab-body"]],viewQuery:function(e,a){if(e&1&&(p($t,5),p(ne,5)),e&2){let i;m(i=b())&&(a._portalHost=i.first),m(i=b())&&(a._contentElement=i.first)}},hostAttrs:[1,"mat-mdc-tab-body"],hostVars:1,hostBindings:function(e,a){e&2&&k("inert",a._position==="center"?null:"")},inputs:{_content:[0,"content","_content"],animationDuration:"animationDuration",preserveContent:"preserveContent",position:"position"},outputs:{_onCentering:"_onCentering",_beforeCentering:"_beforeCentering",_onCentered:"_onCentered"},decls:3,vars:6,consts:[["content",""],["cdkScrollable","",1,"mat-mdc-tab-body-content"],["matTabBodyHost",""]],template:function(e,a){e&1&&(h(0,"div",1,0),R(2,re,0,0,"ng-template",2),y()),e&2&&g("mat-tab-body-content-left",a._position==="left")("mat-tab-body-content-right",a._position==="right")("mat-tab-body-content-can-animate",a._position==="center"||a._previousPosition==="center")},dependencies:[$t,Vt],styles:[`.mat-mdc-tab-body{top:0;left:0;right:0;bottom:0;position:absolute;display:block;overflow:hidden;outline:0;flex-basis:100%}.mat-mdc-tab-body.mat-mdc-tab-body-active{position:relative;overflow-x:hidden;overflow-y:auto;z-index:1;flex-grow:1}.mat-mdc-tab-group.mat-mdc-tab-group-dynamic-height .mat-mdc-tab-body.mat-mdc-tab-body-active{overflow-y:hidden}.mat-mdc-tab-body-content{height:100%;overflow:auto;transform:none;visibility:hidden}.mat-tab-body-animating>.mat-mdc-tab-body-content,.mat-mdc-tab-body-active>.mat-mdc-tab-body-content{visibility:visible}.mat-mdc-tab-group-dynamic-height .mat-mdc-tab-body-content{overflow:hidden}.mat-tab-body-content-can-animate{transition:transform var(--mat-tab-animation-duration) 1ms cubic-bezier(0.35, 0, 0.25, 1)}.mat-mdc-tab-body-wrapper._mat-animation-noopable .mat-tab-body-content-can-animate{transition:none}.mat-tab-body-content-left{transform:translate3d(-100%, 0, 0)}.mat-tab-body-content-right{transform:translate3d(100%, 0, 0)}
3
3
  `],encapsulation:2})}return n})(),ra=(()=>{class n{_elementRef=r(M);_changeDetectorRef=r(Z);_ngZone=r(O);_tabsSubscription=x.EMPTY;_tabLabelSubscription=x.EMPTY;_tabBodySubscription=x.EMPTY;_diAnimationsDisabled=r(Q,{optional:!0})==="NoopAnimations";_allTabs;_tabBodies;_tabBodyWrapper;_tabHeader;_tabs=new It;_indexToSelect=0;_lastFocusedTabIndex=null;_tabBodyWrapperHeight=0;color;get fitInkBarToContent(){return this._fitInkBarToContent}set fitInkBarToContent(t){this._fitInkBarToContent=t,this._changeDetectorRef.markForCheck()}_fitInkBarToContent=!1;stretchTabs=!0;alignTabs=null;dynamicHeight=!1;get selectedIndex(){return this._selectedIndex}set selectedIndex(t){this._indexToSelect=isNaN(t)?null:t}_selectedIndex=null;headerPosition="above";get animationDuration(){return this._animationDuration}set animationDuration(t){let e=t+"";this._animationDuration=/^\d+$/.test(e)?t+"ms":e}_animationDuration;get contentTabIndex(){return this._contentTabIndex}set contentTabIndex(t){this._contentTabIndex=isNaN(t)?null:t}_contentTabIndex;disablePagination=!1;disableRipple=!1;preserveContent=!1;get backgroundColor(){return this._backgroundColor}set backgroundColor(t){let e=this._elementRef.nativeElement.classList;e.remove("mat-tabs-with-background",`mat-background-${this.backgroundColor}`),t&&e.add("mat-tabs-with-background",`mat-background-${t}`),this._backgroundColor=t}_backgroundColor;ariaLabel;ariaLabelledby;selectedIndexChange=new u;focusChange=new u;animationDone=new u;selectedTabChange=new u(!0);_groupId;_isServer=!r(rt).isBrowser;constructor(){let t=r(we,{optional:!0});this._groupId=r(St).getId("mat-tab-group-"),this.animationDuration=t&&t.animationDuration?t.animationDuration:"500ms",this.disablePagination=t&&t.disablePagination!=null?t.disablePagination:!1,this.dynamicHeight=t&&t.dynamicHeight!=null?t.dynamicHeight:!1,t?.contentTabIndex!=null&&(this.contentTabIndex=t.contentTabIndex),this.preserveContent=!!t?.preserveContent,this.fitInkBarToContent=t&&t.fitInkBarToContent!=null?t.fitInkBarToContent:!1,this.stretchTabs=t&&t.stretchTabs!=null?t.stretchTabs:!0,this.alignTabs=t&&t.alignTabs!=null?t.alignTabs:null}ngAfterContentChecked(){let t=this._indexToSelect=this._clampTabIndex(this._indexToSelect);if(this._selectedIndex!=t){let e=this._selectedIndex==null;if(!e){this.selectedTabChange.emit(this._createChangeEvent(t));let a=this._tabBodyWrapper.nativeElement;a.style.minHeight=a.clientHeight+"px"}Promise.resolve().then(()=>{this._tabs.forEach((a,i)=>a.isActive=i===t),e||(this.selectedIndexChange.emit(t),this._tabBodyWrapper.nativeElement.style.minHeight="")})}this._tabs.forEach((e,a)=>{e.position=a-t,this._selectedIndex!=null&&e.position==0&&!e.origin&&(e.origin=t-this._selectedIndex)}),this._selectedIndex!==t&&(this._selectedIndex=t,this._lastFocusedTabIndex=null,this._changeDetectorRef.markForCheck())}ngAfterContentInit(){this._subscribeToAllTabChanges(),this._subscribeToTabLabels(),this._tabsSubscription=this._tabs.changes.subscribe(()=>{let t=this._clampTabIndex(this._indexToSelect);if(t===this._selectedIndex){let e=this._tabs.toArray(),a;for(let i=0;i<e.length;i++)if(e[i].isActive){this._indexToSelect=this._selectedIndex=i,this._lastFocusedTabIndex=null,a=e[i];break}!a&&e[t]&&Promise.resolve().then(()=>{e[t].isActive=!0,this.selectedTabChange.emit(this._createChangeEvent(t))})}this._changeDetectorRef.markForCheck()})}ngAfterViewInit(){this._tabBodySubscription=this._tabBodies.changes.subscribe(()=>this._bodyCentered(!0))}_subscribeToAllTabChanges(){this._allTabs.changes.pipe(V(this._allTabs)).subscribe(t=>{this._tabs.reset(t.filter(e=>e._closestTabGroup===this||!e._closestTabGroup)),this._tabs.notifyOnChanges()})}ngOnDestroy(){this._tabs.destroy(),this._tabsSubscription.unsubscribe(),this._tabLabelSubscription.unsubscribe(),this._tabBodySubscription.unsubscribe()}realignInkBar(){this._tabHeader&&this._tabHeader._alignInkBarToSelectedTab()}updatePagination(){this._tabHeader&&this._tabHeader.updatePagination()}focusTab(t){let e=this._tabHeader;e&&(e.focusIndex=t)}_focusChanged(t){this._lastFocusedTabIndex=t,this.focusChange.emit(this._createChangeEvent(t))}_createChangeEvent(t){let e=new ht;return e.index=t,this._tabs&&this._tabs.length&&(e.tab=this._tabs.toArray()[t]),e}_subscribeToTabLabels(){this._tabLabelSubscription&&this._tabLabelSubscription.unsubscribe(),this._tabLabelSubscription=H(...this._tabs.map(t=>t._stateChanges)).subscribe(()=>this._changeDetectorRef.markForCheck())}_clampTabIndex(t){return Math.min(this._tabs.length-1,Math.max(t||0,0))}_getTabLabelId(t,e){return t.id||`${this._groupId}-label-${e}`}_getTabContentId(t){return`${this._groupId}-content-${t}`}_setTabBodyWrapperHeight(t){if(!this.dynamicHeight||!this._tabBodyWrapperHeight){this._tabBodyWrapperHeight=t;return}let e=this._tabBodyWrapper.nativeElement;e.style.height=this._tabBodyWrapperHeight+"px",this._tabBodyWrapper.nativeElement.offsetHeight&&(e.style.height=t+"px")}_removeTabBodyWrapperHeight(){let t=this._tabBodyWrapper.nativeElement;this._tabBodyWrapperHeight=t.clientHeight,t.style.height="",this._ngZone.run(()=>this.animationDone.emit())}_handleClick(t,e,a){e.focusIndex=a,t.disabled||(this.selectedIndex=a)}_getTabIndex(t){let e=this._lastFocusedTabIndex??this.selectedIndex;return t===e?0:-1}_tabFocusChanged(t,e){t&&t!=="mouse"&&t!=="touch"&&(this._tabHeader.focusIndex=e)}_bodyCentered(t){t&&this._tabBodies?.forEach((e,a)=>e._setActiveClass(a===this._selectedIndex))}_animationsDisabled(){return this._diAnimationsDisabled||this.animationDuration==="0"||this.animationDuration==="0ms"}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=P({type:n,selectors:[["mat-tab-group"]],contentQueries:function(e,a,i){if(e&1&&A(i,ge,5),e&2){let o;m(o=b())&&(a._allTabs=o)}},viewQuery:function(e,a){if(e&1&&(p(oe,5),p(se,5),p(bt,5)),e&2){let i;m(i=b())&&(a._tabBodyWrapper=i.first),m(i=b())&&(a._tabHeader=i.first),m(i=b())&&(a._tabBodies=i)}},hostAttrs:[1,"mat-mdc-tab-group"],hostVars:11,hostBindings:function(e,a){e&2&&(k("mat-align-tabs",a.alignTabs),j("mat-"+(a.color||"primary")),Rt("--mat-tab-animation-duration",a.animationDuration),g("mat-mdc-tab-group-dynamic-height",a.dynamicHeight)("mat-mdc-tab-group-inverted-header",a.headerPosition==="below")("mat-mdc-tab-group-stretch-tabs",a.stretchTabs))},inputs:{color:"color",fitInkBarToContent:[2,"fitInkBarToContent","fitInkBarToContent",_],stretchTabs:[2,"mat-stretch-tabs","stretchTabs",_],alignTabs:[0,"mat-align-tabs","alignTabs"],dynamicHeight:[2,"dynamicHeight","dynamicHeight",_],selectedIndex:[2,"selectedIndex","selectedIndex",K],headerPosition:"headerPosition",animationDuration:"animationDuration",contentTabIndex:[2,"contentTabIndex","contentTabIndex",K],disablePagination:[2,"disablePagination","disablePagination",_],disableRipple:[2,"disableRipple","disableRipple",_],preserveContent:[2,"preserveContent","preserveContent",_],backgroundColor:"backgroundColor",ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"]},outputs:{selectedIndexChange:"selectedIndexChange",focusChange:"focusChange",animationDone:"animationDone",selectedTabChange:"selectedTabChange"},exportAs:["matTabGroup"],features:[S([{provide:Zt,useExisting:n}])],ngContentSelectors:pt,decls:9,vars:8,consts:[["tabHeader",""],["tabBodyWrapper",""],["tabNode",""],[3,"indexFocused","selectFocusedIndex","selectedIndex","disableRipple","disablePagination","aria-label","aria-labelledby"],["role","tab","matTabLabelWrapper","","cdkMonitorElementFocus","",1,"mdc-tab","mat-mdc-tab","mat-focus-indicator",3,"id","mdc-tab--active","class","disabled","fitInkBarToContent"],[1,"mat-mdc-tab-body-wrapper"],["role","tabpanel",3,"id","class","content","position","animationDuration","preserveContent"],["role","tab","matTabLabelWrapper","","cdkMonitorElementFocus","",1,"mdc-tab","mat-mdc-tab","mat-focus-indicator",3,"click","cdkFocusChange","id","disabled","fitInkBarToContent"],[1,"mdc-tab__ripple"],["mat-ripple","",1,"mat-mdc-tab-ripple",3,"matRippleTrigger","matRippleDisabled"],[1,"mdc-tab__content"],[1,"mdc-tab__text-label"],[3,"cdkPortalOutlet"],["role","tabpanel",3,"_onCentered","_onCentering","_beforeCentering","id","content","position","animationDuration","preserveContent"]],template:function(e,a){if(e&1){let i=E();$(),h(0,"mat-tab-header",3,0),C("indexFocused",function(s){return l(i),c(a._focusChanged(s))})("selectFocusedIndex",function(s){return l(i),c(a.selectedIndex=s)}),et(2,me,8,17,"div",4,tt),y(),R(4,be,1,0),h(5,"div",5,1),et(7,he,1,10,"mat-tab-body",6,tt),y()}e&2&&(T("selectedIndex",a.selectedIndex||0)("disableRipple",a.disableRipple)("disablePagination",a.disablePagination)("aria-label",a.ariaLabel)("aria-labelledby",a.ariaLabelledby),f(2),at(a._tabs),f(2),J(a._isServer?4:-1),f(),g("_mat-animation-noopable",a._animationsDisabled()),f(2),at(a._tabs))},dependencies:[Ce,Kt,Lt,lt,st,bt],styles:[`.mdc-tab{min-width:90px;padding:0 24px;display:flex;flex:1 0 auto;justify-content:center;box-sizing:border-box;border:none;outline:none;text-align:center;white-space:nowrap;cursor:pointer;z-index:1}.mdc-tab__content{display:flex;align-items:center;justify-content:center;height:inherit;pointer-events:none}.mdc-tab__text-label{transition:150ms color linear;display:inline-block;line-height:1;z-index:2}.mdc-tab--active .mdc-tab__text-label{transition-delay:100ms}._mat-animation-noopable .mdc-tab__text-label{transition:none}.mdc-tab-indicator{display:flex;position:absolute;top:0;left:0;justify-content:center;width:100%;height:100%;pointer-events:none;z-index:1}.mdc-tab-indicator__content{transition:var(--mat-tab-animation-duration, 250ms) transform cubic-bezier(0.4, 0, 0.2, 1);transform-origin:left;opacity:0}.mdc-tab-indicator__content--underline{align-self:flex-end;box-sizing:border-box;width:100%;border-top-style:solid}.mdc-tab-indicator--active .mdc-tab-indicator__content{opacity:1}._mat-animation-noopable .mdc-tab-indicator__content,.mdc-tab-indicator--no-transition .mdc-tab-indicator__content{transition:none}.mat-mdc-tab-ripple.mat-mdc-tab-ripple{position:absolute;top:0;left:0;bottom:0;right:0;pointer-events:none}.mat-mdc-tab{-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none;background:none;height:var(--mdc-secondary-navigation-tab-container-height, 48px);font-family:var(--mat-tab-header-label-text-font, var(--mat-sys-title-small-font));font-size:var(--mat-tab-header-label-text-size, var(--mat-sys-title-small-size));letter-spacing:var(--mat-tab-header-label-text-tracking, var(--mat-sys-title-small-tracking));line-height:var(--mat-tab-header-label-text-line-height, var(--mat-sys-title-small-line-height));font-weight:var(--mat-tab-header-label-text-weight, var(--mat-sys-title-small-weight))}.mat-mdc-tab.mdc-tab{flex-grow:0}.mat-mdc-tab .mdc-tab-indicator__content--underline{border-color:var(--mdc-tab-indicator-active-indicator-color, var(--mat-sys-primary));border-top-width:var(--mdc-tab-indicator-active-indicator-height, 2px);border-radius:var(--mdc-tab-indicator-active-indicator-shape, 0)}.mat-mdc-tab:hover .mdc-tab__text-label{color:var(--mat-tab-header-inactive-hover-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-tab:focus .mdc-tab__text-label{color:var(--mat-tab-header-inactive-focus-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-tab.mdc-tab--active .mdc-tab__text-label{color:var(--mat-tab-header-active-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-tab.mdc-tab--active .mdc-tab__ripple::before,.mat-mdc-tab.mdc-tab--active .mat-ripple-element{background-color:var(--mat-tab-header-active-ripple-color, var(--mat-sys-on-surface))}.mat-mdc-tab.mdc-tab--active:hover .mdc-tab__text-label{color:var(--mat-tab-header-active-hover-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-tab.mdc-tab--active:hover .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-header-active-hover-indicator-color, var(--mat-sys-primary))}.mat-mdc-tab.mdc-tab--active:focus .mdc-tab__text-label{color:var(--mat-tab-header-active-focus-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-tab.mdc-tab--active:focus .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-header-active-focus-indicator-color, var(--mat-sys-primary))}.mat-mdc-tab.mat-mdc-tab-disabled{opacity:.4;pointer-events:none}.mat-mdc-tab.mat-mdc-tab-disabled .mdc-tab__content{pointer-events:none}.mat-mdc-tab.mat-mdc-tab-disabled .mdc-tab__ripple::before,.mat-mdc-tab.mat-mdc-tab-disabled .mat-ripple-element{background-color:var(--mat-tab-header-disabled-ripple-color)}.mat-mdc-tab .mdc-tab__ripple::before{content:"";display:block;position:absolute;top:0;left:0;right:0;bottom:0;opacity:0;pointer-events:none;background-color:var(--mat-tab-header-inactive-ripple-color, var(--mat-sys-on-surface))}.mat-mdc-tab .mdc-tab__text-label{color:var(--mat-tab-header-inactive-label-text-color, var(--mat-sys-on-surface));display:inline-flex;align-items:center}.mat-mdc-tab .mdc-tab__content{position:relative;pointer-events:auto}.mat-mdc-tab:hover .mdc-tab__ripple::before{opacity:.04}.mat-mdc-tab.cdk-program-focused .mdc-tab__ripple::before,.mat-mdc-tab.cdk-keyboard-focused .mdc-tab__ripple::before{opacity:.12}.mat-mdc-tab .mat-ripple-element{opacity:.12;background-color:var(--mat-tab-header-inactive-ripple-color, var(--mat-sys-on-surface))}.mat-mdc-tab-group.mat-mdc-tab-group-stretch-tabs>.mat-mdc-tab-header .mat-mdc-tab{flex-grow:1}.mat-mdc-tab-group{display:flex;flex-direction:column;max-width:100%}.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination{background-color:var(--mat-tab-header-with-background-background-color)}.mat-mdc-tab-group.mat-tabs-with-background.mat-primary>.mat-mdc-tab-header .mat-mdc-tab .mdc-tab__text-label{color:var(--mat-tab-header-with-background-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background.mat-primary>.mat-mdc-tab-header .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-header-with-background-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background:not(.mat-primary)>.mat-mdc-tab-header .mat-mdc-tab:not(.mdc-tab--active) .mdc-tab__text-label{color:var(--mat-tab-header-with-background-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background:not(.mat-primary)>.mat-mdc-tab-header .mat-mdc-tab:not(.mdc-tab--active) .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-header-with-background-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mat-focus-indicator::before,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-focus-indicator::before{border-color:var(--mat-tab-header-with-background-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mat-ripple-element,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mdc-tab__ripple::before,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-ripple-element,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mdc-tab__ripple::before{background-color:var(--mat-tab-header-with-background-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-mdc-tab-header-pagination-chevron{color:var(--mat-tab-header-with-background-foreground-color)}.mat-mdc-tab-group.mat-mdc-tab-group-inverted-header{flex-direction:column-reverse}.mat-mdc-tab-group.mat-mdc-tab-group-inverted-header .mdc-tab-indicator__content--underline{align-self:flex-start}.mat-mdc-tab-body-wrapper{position:relative;overflow:hidden;display:flex;transition:height 500ms cubic-bezier(0.35, 0, 0.25, 1)}.mat-mdc-tab-body-wrapper._mat-animation-noopable{transition:none !important;animation:none !important}
4
4
  `],encapsulation:2})}return n})(),ht=class{index;tab};var oa=(()=>{class n{static \u0275fac=function(e){return new(e||n)};static \u0275mod=Mt({type:n});static \u0275inj=wt({imports:[dt,dt]})}return n})();export{_e as a,fe as b,ge as c,ra as d,oa as e};
@@ -1,4 +1,4 @@
1
- import{a as Ut}from"./chunk-YEDKRNXU.js";import{b as it,c as rt,d as Qt}from"./chunk-TQZQYUFG.js";import{a as Zt,b as Xt}from"./chunk-7QWJJPNG.js";import{a as Gt,k as $t,l as nt}from"./chunk-CD3BSGAP.js";import{F as $,K as Lt,M as tt,N as Bt,R as at,S as Ht,T as zt,W as Kt,_ as Le,ba as Wt,d as Je,da as jt,ea as qt,f as L,g as Yt,m as et,n as pe,o as Ne,v as Pt,x as Nt,y as ue,z as W}from"./chunk-ZHY3BUQJ.js";import{a as Ye,d as Pe,e as he,f as Tt,g as Ft,k as Rt,t as Ot}from"./chunk-RVXZOIFQ.js";import{$ as Ce,$a as l,$b as k,Ba as Se,Ca as At,D as ne,Db as de,E as Ct,Fa as p,Ga as qe,Gb as Ie,Hb as xe,Ib as d,Ic as Vt,Jb as c,Ka as z,Kb as I,Kc as T,Ma as Ge,Mc as R,N as wt,Ob as le,Pb as Te,Qa as Mt,Qb as g,Rb as u,Sb as ce,Sc as It,Ta as Qe,Tb as Q,Wc as xt,Yb as Et,Zb as x,_b as M,a as A,ab as kt,cb as Ue,d as S,eb as St,ec as D,fb as $e,fc as F,gc as U,hc as Xe,ia as We,ja as O,jc as Fe,ka as we,kb as C,kc as Re,la as G,lb as Ee,lc as Oe,ma as Ae,mb as E,na as o,o as ve,ob as K,pa as Me,pc as N,qa as ke,qb as P,ua as Y,ub as b,va as y,vb as _,wa as v,wb as Ve,xa as se,xb as V,ya as je,za as oe,zb as Ze}from"./chunk-UXRO4UFY.js";import{a as yt,b as vt}from"./chunk-7DCB7DB2.js";var st=new G("MAT_DATE_LOCALE",{providedIn:"root",factory:Da});function Da(){return o(Vt)}var Z="Method not implemented",m=class{locale;_localeChanges=new S;localeChanges=this._localeChanges;setTime(s,e,a,t){throw new Error(Z)}getHours(s){throw new Error(Z)}getMinutes(s){throw new Error(Z)}getSeconds(s){throw new Error(Z)}parseTime(s,e){throw new Error(Z)}addSeconds(s,e){throw new Error(Z)}getValidDateOrNull(s){return this.isDateInstance(s)&&this.isValid(s)?s:null}deserialize(s){return s==null||this.isDateInstance(s)&&this.isValid(s)?s:this.invalid()}setLocale(s){this.locale=s,this._localeChanges.next()}compareDate(s,e){return this.getYear(s)-this.getYear(e)||this.getMonth(s)-this.getMonth(e)||this.getDate(s)-this.getDate(e)}compareTime(s,e){return this.getHours(s)-this.getHours(e)||this.getMinutes(s)-this.getMinutes(e)||this.getSeconds(s)-this.getSeconds(e)}sameDate(s,e){if(s&&e){let a=this.isValid(s),t=this.isValid(e);return a&&t?!this.compareDate(s,e):a==t}return s==e}sameTime(s,e){if(s&&e){let a=this.isValid(s),t=this.isValid(e);return a&&t?!this.compareTime(s,e):a==t}return s==e}clampDate(s,e,a){return e&&this.compareDate(s,e)<0?e:a&&this.compareDate(s,a)>0?a:s}},B=new G("mat-date-formats");var va=["mat-calendar-body",""];function Ca(i,s){return this._trackRow(s)}var sa=(i,s)=>s.id;function wa(i,s){if(i&1&&(d(0,"tr",0)(1,"td",3),D(2),c()()),i&2){let e=u();l(),Ve("padding-top",e._cellPadding)("padding-bottom",e._cellPadding),b("colspan",e.numCols),l(),U(" ",e.label," ")}}function Aa(i,s){if(i&1&&(d(0,"td",3),D(1),c()),i&2){let e=u(2);Ve("padding-top",e._cellPadding)("padding-bottom",e._cellPadding),b("colspan",e._firstRowOffset),l(),U(" ",e._firstRowOffset>=e.labelMinRequiredCells?e.label:""," ")}}function Ma(i,s){if(i&1){let e=le();d(0,"td",6)(1,"button",7),g("click",function(t){let r=y(e).$implicit,n=u(2);return v(n._cellClicked(r,t))})("focus",function(t){let r=y(e).$implicit,n=u(2);return v(n._emitActiveDateChange(r,t))}),d(2,"span",8),D(3),c(),I(4,"span",9),c()()}if(i&2){let e=s.$implicit,a=s.$index,t=u().$index,r=u();Ve("width",r._cellWidth)("padding-top",r._cellPadding)("padding-bottom",r._cellPadding),b("data-mat-row",t)("data-mat-col",a),l(),V("mat-calendar-body-disabled",!e.enabled)("mat-calendar-body-active",r._isActiveCell(t,a))("mat-calendar-body-range-start",r._isRangeStart(e.compareValue))("mat-calendar-body-range-end",r._isRangeEnd(e.compareValue))("mat-calendar-body-in-range",r._isInRange(e.compareValue))("mat-calendar-body-comparison-bridge-start",r._isComparisonBridgeStart(e.compareValue,t,a))("mat-calendar-body-comparison-bridge-end",r._isComparisonBridgeEnd(e.compareValue,t,a))("mat-calendar-body-comparison-start",r._isComparisonStart(e.compareValue))("mat-calendar-body-comparison-end",r._isComparisonEnd(e.compareValue))("mat-calendar-body-in-comparison-range",r._isInComparisonRange(e.compareValue))("mat-calendar-body-preview-start",r._isPreviewStart(e.compareValue))("mat-calendar-body-preview-end",r._isPreviewEnd(e.compareValue))("mat-calendar-body-in-preview",r._isInPreview(e.compareValue)),_("ngClass",e.cssClasses)("tabindex",r._isActiveCell(t,a)?0:-1),b("aria-label",e.ariaLabel)("aria-disabled",!e.enabled||null)("aria-pressed",r._isSelected(e.compareValue))("aria-current",r.todayValue===e.compareValue?"date":null)("aria-describedby",r._getDescribedby(e.compareValue)),l(),V("mat-calendar-body-selected",r._isSelected(e.compareValue))("mat-calendar-body-comparison-identical",r._isComparisonIdentical(e.compareValue))("mat-calendar-body-today",r.todayValue===e.compareValue),l(),U(" ",e.displayValue," ")}}function ka(i,s){if(i&1&&(d(0,"tr",1),P(1,Aa,2,6,"td",4),Ie(2,Ma,5,48,"td",5,sa),c()),i&2){let e=s.$implicit,a=s.$index,t=u();l(),de(a===0&&t._firstRowOffset?1:-1),l(),xe(e)}}function Sa(i,s){if(i&1&&(d(0,"th",2)(1,"span",6),D(2),c(),d(3,"span",3),D(4),c()()),i&2){let e=s.$implicit;l(2),F(e.long),l(2),F(e.narrow)}}var oa=["*"];function Ea(i,s){}function Va(i,s){if(i&1){let e=le();d(0,"mat-month-view",4),Oe("activeDateChange",function(t){y(e);let r=u();return Re(r.activeDate,t)||(r.activeDate=t),v(t)}),g("_userSelection",function(t){y(e);let r=u();return v(r._dateSelected(t))})("dragStarted",function(t){y(e);let r=u();return v(r._dragStarted(t))})("dragEnded",function(t){y(e);let r=u();return v(r._dragEnded(t))}),c()}if(i&2){let e=u();Fe("activeDate",e.activeDate),_("selected",e.selected)("dateFilter",e.dateFilter)("maxDate",e.maxDate)("minDate",e.minDate)("dateClass",e.dateClass)("comparisonStart",e.comparisonStart)("comparisonEnd",e.comparisonEnd)("startDateAccessibleName",e.startDateAccessibleName)("endDateAccessibleName",e.endDateAccessibleName)("activeDrag",e._activeDrag)}}function Ia(i,s){if(i&1){let e=le();d(0,"mat-year-view",5),Oe("activeDateChange",function(t){y(e);let r=u();return Re(r.activeDate,t)||(r.activeDate=t),v(t)}),g("monthSelected",function(t){y(e);let r=u();return v(r._monthSelectedInYearView(t))})("selectedChange",function(t){y(e);let r=u();return v(r._goToDateInView(t,"month"))}),c()}if(i&2){let e=u();Fe("activeDate",e.activeDate),_("selected",e.selected)("dateFilter",e.dateFilter)("maxDate",e.maxDate)("minDate",e.minDate)("dateClass",e.dateClass)}}function xa(i,s){if(i&1){let e=le();d(0,"mat-multi-year-view",6),Oe("activeDateChange",function(t){y(e);let r=u();return Re(r.activeDate,t)||(r.activeDate=t),v(t)}),g("yearSelected",function(t){y(e);let r=u();return v(r._yearSelectedInMultiYearView(t))})("selectedChange",function(t){y(e);let r=u();return v(r._goToDateInView(t,"year"))}),c()}if(i&2){let e=u();Fe("activeDate",e.activeDate),_("selected",e.selected)("dateFilter",e.dateFilter)("maxDate",e.maxDate)("minDate",e.minDate)("dateClass",e.dateClass)}}function Ta(i,s){}var Fa=["button"],Ra=[[["","matDatepickerToggleIcon",""]]],Oa=["[matDatepickerToggleIcon]"];function Ya(i,s){i&1&&(se(),d(0,"svg",2),I(1,"path",3),c())}var Pa=[[["input","matStartDate",""]],[["input","matEndDate",""]]],Na=["input[matStartDate]","input[matEndDate]"];function La(i,s){i&1&&(d(0,"div",0),Q(1),c())}var re=(()=>{class i{changes=new S;calendarLabel="Calendar";openCalendarLabel="Open calendar";closeCalendarLabel="Close calendar";prevMonthLabel="Previous month";nextMonthLabel="Next month";prevYearLabel="Previous year";nextYearLabel="Next year";prevMultiYearLabel="Previous 24 years";nextMultiYearLabel="Next 24 years";switchToMonthViewLabel="Choose date";switchToMultiYearViewLabel="Choose month and year";startDateLabel="Start date";endDateLabel="End date";comparisonDateLabel="Comparison range";formatYearRange(e,a){return`${e} \u2013 ${a}`}formatYearRangeLabel(e,a){return`${e} to ${a}`}static \u0275fac=function(a){return new(a||i)};static \u0275prov=O({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),Ba=0,ge=class{value;displayValue;ariaLabel;enabled;cssClasses;compareValue;rawValue;id=Ba++;constructor(s,e,a,t,r={},n=s,h){this.value=s,this.displayValue=e,this.ariaLabel=a,this.enabled=t,this.cssClasses=r,this.compareValue=n,this.rawValue=h}},Ha={passive:!1,capture:!0},Be={passive:!0,capture:!0},Jt={passive:!0},te=(()=>{class i{_elementRef=o(z);_ngZone=o(qe);_platform=o(Yt);_intl=o(re);_eventCleanups;_skipNextFocus;_focusActiveCellAfterViewChecked=!1;label;rows;todayValue;startValue;endValue;labelMinRequiredCells;numCols=7;activeCell=0;ngAfterViewChecked(){this._focusActiveCellAfterViewChecked&&(this._focusActiveCell(),this._focusActiveCellAfterViewChecked=!1)}isRange=!1;cellAspectRatio=1;comparisonStart;comparisonEnd;previewStart=null;previewEnd=null;startDateAccessibleName;endDateAccessibleName;selectedValueChange=new p;previewChange=new p;activeDateChange=new p;dragStarted=new p;dragEnded=new p;_firstRowOffset;_cellPadding;_cellWidth;_startDateLabelId;_endDateLabelId;_comparisonStartDateLabelId;_comparisonEndDateLabelId;_didDragSinceMouseDown=!1;_injector=o(Se);comparisonDateAccessibleName=this._intl.comparisonDateLabel;_trackRow=e=>e;constructor(){let e=o(Ue),a=o(ue);this._startDateLabelId=a.getId("mat-calendar-body-start-"),this._endDateLabelId=a.getId("mat-calendar-body-end-"),this._comparisonStartDateLabelId=a.getId("mat-calendar-body-comparison-start-"),this._comparisonEndDateLabelId=a.getId("mat-calendar-body-comparison-end-"),o(pe).load(Gt),this._ngZone.runOutsideAngular(()=>{let t=this._elementRef.nativeElement,r=[L(e,t,"touchmove",this._touchmoveHandler,Ha),L(e,t,"mouseenter",this._enterHandler,Be),L(e,t,"focus",this._enterHandler,Be),L(e,t,"mouseleave",this._leaveHandler,Be),L(e,t,"blur",this._leaveHandler,Be),L(e,t,"mousedown",this._mousedownHandler,Jt),L(e,t,"touchstart",this._mousedownHandler,Jt)];this._platform.isBrowser&&r.push(e.listen("window","mouseup",this._mouseupHandler),e.listen("window","touchend",this._touchendHandler)),this._eventCleanups=r})}_cellClicked(e,a){this._didDragSinceMouseDown||e.enabled&&this.selectedValueChange.emit({value:e.value,event:a})}_emitActiveDateChange(e,a){e.enabled&&this.activeDateChange.emit({value:e.value,event:a})}_isSelected(e){return this.startValue===e||this.endValue===e}ngOnChanges(e){let a=e.numCols,{rows:t,numCols:r}=this;(e.rows||a)&&(this._firstRowOffset=t&&t.length&&t[0].length?r-t[0].length:0),(e.cellAspectRatio||a||!this._cellPadding)&&(this._cellPadding=`${50*this.cellAspectRatio/r}%`),(a||!this._cellWidth)&&(this._cellWidth=`${100/r}%`)}ngOnDestroy(){this._eventCleanups.forEach(e=>e())}_isActiveCell(e,a){let t=e*this.numCols+a;return e&&(t-=this._firstRowOffset),t==this.activeCell}_focusActiveCell(e=!0){Qe(()=>{setTimeout(()=>{let a=this._elementRef.nativeElement.querySelector(".mat-calendar-body-active");a&&(e||(this._skipNextFocus=!0),a.focus())})},{injector:this._injector})}_scheduleFocusActiveCellAfterViewChecked(){this._focusActiveCellAfterViewChecked=!0}_isRangeStart(e){return lt(e,this.startValue,this.endValue)}_isRangeEnd(e){return ct(e,this.startValue,this.endValue)}_isInRange(e){return ht(e,this.startValue,this.endValue,this.isRange)}_isComparisonStart(e){return lt(e,this.comparisonStart,this.comparisonEnd)}_isComparisonBridgeStart(e,a,t){if(!this._isComparisonStart(e)||this._isRangeStart(e)||!this._isInRange(e))return!1;let r=this.rows[a][t-1];if(!r){let n=this.rows[a-1];r=n&&n[n.length-1]}return r&&!this._isRangeEnd(r.compareValue)}_isComparisonBridgeEnd(e,a,t){if(!this._isComparisonEnd(e)||this._isRangeEnd(e)||!this._isInRange(e))return!1;let r=this.rows[a][t+1];if(!r){let n=this.rows[a+1];r=n&&n[0]}return r&&!this._isRangeStart(r.compareValue)}_isComparisonEnd(e){return ct(e,this.comparisonStart,this.comparisonEnd)}_isInComparisonRange(e){return ht(e,this.comparisonStart,this.comparisonEnd,this.isRange)}_isComparisonIdentical(e){return this.comparisonStart===this.comparisonEnd&&e===this.comparisonStart}_isPreviewStart(e){return lt(e,this.previewStart,this.previewEnd)}_isPreviewEnd(e){return ct(e,this.previewStart,this.previewEnd)}_isInPreview(e){return ht(e,this.previewStart,this.previewEnd,this.isRange)}_getDescribedby(e){if(!this.isRange)return null;if(this.startValue===e&&this.endValue===e)return`${this._startDateLabelId} ${this._endDateLabelId}`;if(this.startValue===e)return this._startDateLabelId;if(this.endValue===e)return this._endDateLabelId;if(this.comparisonStart!==null&&this.comparisonEnd!==null){if(e===this.comparisonStart&&e===this.comparisonEnd)return`${this._comparisonStartDateLabelId} ${this._comparisonEndDateLabelId}`;if(e===this.comparisonStart)return this._comparisonStartDateLabelId;if(e===this.comparisonEnd)return this._comparisonEndDateLabelId}return null}_enterHandler=e=>{if(this._skipNextFocus&&e.type==="focus"){this._skipNextFocus=!1;return}if(e.target&&this.isRange){let a=this._getCellFromElement(e.target);a&&this._ngZone.run(()=>this.previewChange.emit({value:a.enabled?a:null,event:e}))}};_touchmoveHandler=e=>{if(!this.isRange)return;let a=ea(e),t=a?this._getCellFromElement(a):null;a!==e.target&&(this._didDragSinceMouseDown=!0),dt(e.target)&&e.preventDefault(),this._ngZone.run(()=>this.previewChange.emit({value:t?.enabled?t:null,event:e}))};_leaveHandler=e=>{this.previewEnd!==null&&this.isRange&&(e.type!=="blur"&&(this._didDragSinceMouseDown=!0),e.target&&this._getCellFromElement(e.target)&&!(e.relatedTarget&&this._getCellFromElement(e.relatedTarget))&&this._ngZone.run(()=>this.previewChange.emit({value:null,event:e})))};_mousedownHandler=e=>{if(!this.isRange)return;this._didDragSinceMouseDown=!1;let a=e.target&&this._getCellFromElement(e.target);!a||!this._isInRange(a.compareValue)||this._ngZone.run(()=>{this.dragStarted.emit({value:a.rawValue,event:e})})};_mouseupHandler=e=>{if(!this.isRange)return;let a=dt(e.target);if(!a){this._ngZone.run(()=>{this.dragEnded.emit({value:null,event:e})});return}a.closest(".mat-calendar-body")===this._elementRef.nativeElement&&this._ngZone.run(()=>{let t=this._getCellFromElement(a);this.dragEnded.emit({value:t?.rawValue??null,event:e})})};_touchendHandler=e=>{let a=ea(e);a&&this._mouseupHandler({target:a})};_getCellFromElement(e){let a=dt(e);if(a){let t=a.getAttribute("data-mat-row"),r=a.getAttribute("data-mat-col");if(t&&r)return this.rows[parseInt(t)][parseInt(r)]}return null}static \u0275fac=function(a){return new(a||i)};static \u0275cmp=C({type:i,selectors:[["","mat-calendar-body",""]],hostAttrs:[1,"mat-calendar-body"],inputs:{label:"label",rows:"rows",todayValue:"todayValue",startValue:"startValue",endValue:"endValue",labelMinRequiredCells:"labelMinRequiredCells",numCols:"numCols",activeCell:"activeCell",isRange:"isRange",cellAspectRatio:"cellAspectRatio",comparisonStart:"comparisonStart",comparisonEnd:"comparisonEnd",previewStart:"previewStart",previewEnd:"previewEnd",startDateAccessibleName:"startDateAccessibleName",endDateAccessibleName:"endDateAccessibleName"},outputs:{selectedValueChange:"selectedValueChange",previewChange:"previewChange",activeDateChange:"activeDateChange",dragStarted:"dragStarted",dragEnded:"dragEnded"},exportAs:["matCalendarBody"],features:[Y],attrs:va,decls:11,vars:11,consts:[["aria-hidden","true"],["role","row"],[1,"mat-calendar-body-hidden-label",3,"id"],[1,"mat-calendar-body-label"],[1,"mat-calendar-body-label",3,"paddingTop","paddingBottom"],["role","gridcell",1,"mat-calendar-body-cell-container",3,"width","paddingTop","paddingBottom"],["role","gridcell",1,"mat-calendar-body-cell-container"],["type","button",1,"mat-calendar-body-cell",3,"click","focus","ngClass","tabindex"],[1,"mat-calendar-body-cell-content","mat-focus-indicator"],["aria-hidden","true",1,"mat-calendar-body-cell-preview"]],template:function(a,t){a&1&&(P(0,wa,3,6,"tr",0),Ie(1,ka,4,1,"tr",1,Ca,!0),d(3,"span",2),D(4),c(),d(5,"span",2),D(6),c(),d(7,"span",2),D(8),c(),d(9,"span",2),D(10),c()),a&2&&(de(t._firstRowOffset<t.labelMinRequiredCells?0:-1),l(),xe(t.rows),l(2),_("id",t._startDateLabelId),l(),U(" ",t.startDateAccessibleName,`
1
+ import{a as Ut}from"./chunk-YEDKRNXU.js";import{b as it,c as rt,d as Qt}from"./chunk-CMHBQ7I6.js";import{a as Zt,b as Xt}from"./chunk-7QWJJPNG.js";import{a as Gt,k as $t,l as nt}from"./chunk-IJ6QEGE5.js";import{F as $,K as Lt,M as tt,N as Bt,R as at,S as Ht,T as zt,W as Kt,_ as Le,ba as Wt,d as Je,da as jt,ea as qt,f as L,g as Yt,m as et,n as pe,o as Ne,v as Pt,x as Nt,y as ue,z as W}from"./chunk-ZHY3BUQJ.js";import{a as Ye,d as Pe,e as he,f as Tt,g as Ft,k as Rt,t as Ot}from"./chunk-RVXZOIFQ.js";import{$ as Ce,$a as l,$b as k,Ba as Se,Ca as At,D as ne,Db as de,E as Ct,Fa as p,Ga as qe,Gb as Ie,Hb as xe,Ib as d,Ic as Vt,Jb as c,Ka as z,Kb as I,Kc as T,Ma as Ge,Mc as R,N as wt,Ob as le,Pb as Te,Qa as Mt,Qb as g,Rb as u,Sb as ce,Sc as It,Ta as Qe,Tb as Q,Wc as xt,Yb as Et,Zb as x,_b as M,a as A,ab as kt,cb as Ue,d as S,eb as St,ec as D,fb as $e,fc as F,gc as U,hc as Xe,ia as We,ja as O,jc as Fe,ka as we,kb as C,kc as Re,la as G,lb as Ee,lc as Oe,ma as Ae,mb as E,na as o,o as ve,ob as K,pa as Me,pc as N,qa as ke,qb as P,ua as Y,ub as b,va as y,vb as _,wa as v,wb as Ve,xa as se,xb as V,ya as je,za as oe,zb as Ze}from"./chunk-UXRO4UFY.js";import{a as yt,b as vt}from"./chunk-7DCB7DB2.js";var st=new G("MAT_DATE_LOCALE",{providedIn:"root",factory:Da});function Da(){return o(Vt)}var Z="Method not implemented",m=class{locale;_localeChanges=new S;localeChanges=this._localeChanges;setTime(s,e,a,t){throw new Error(Z)}getHours(s){throw new Error(Z)}getMinutes(s){throw new Error(Z)}getSeconds(s){throw new Error(Z)}parseTime(s,e){throw new Error(Z)}addSeconds(s,e){throw new Error(Z)}getValidDateOrNull(s){return this.isDateInstance(s)&&this.isValid(s)?s:null}deserialize(s){return s==null||this.isDateInstance(s)&&this.isValid(s)?s:this.invalid()}setLocale(s){this.locale=s,this._localeChanges.next()}compareDate(s,e){return this.getYear(s)-this.getYear(e)||this.getMonth(s)-this.getMonth(e)||this.getDate(s)-this.getDate(e)}compareTime(s,e){return this.getHours(s)-this.getHours(e)||this.getMinutes(s)-this.getMinutes(e)||this.getSeconds(s)-this.getSeconds(e)}sameDate(s,e){if(s&&e){let a=this.isValid(s),t=this.isValid(e);return a&&t?!this.compareDate(s,e):a==t}return s==e}sameTime(s,e){if(s&&e){let a=this.isValid(s),t=this.isValid(e);return a&&t?!this.compareTime(s,e):a==t}return s==e}clampDate(s,e,a){return e&&this.compareDate(s,e)<0?e:a&&this.compareDate(s,a)>0?a:s}},B=new G("mat-date-formats");var va=["mat-calendar-body",""];function Ca(i,s){return this._trackRow(s)}var sa=(i,s)=>s.id;function wa(i,s){if(i&1&&(d(0,"tr",0)(1,"td",3),D(2),c()()),i&2){let e=u();l(),Ve("padding-top",e._cellPadding)("padding-bottom",e._cellPadding),b("colspan",e.numCols),l(),U(" ",e.label," ")}}function Aa(i,s){if(i&1&&(d(0,"td",3),D(1),c()),i&2){let e=u(2);Ve("padding-top",e._cellPadding)("padding-bottom",e._cellPadding),b("colspan",e._firstRowOffset),l(),U(" ",e._firstRowOffset>=e.labelMinRequiredCells?e.label:""," ")}}function Ma(i,s){if(i&1){let e=le();d(0,"td",6)(1,"button",7),g("click",function(t){let r=y(e).$implicit,n=u(2);return v(n._cellClicked(r,t))})("focus",function(t){let r=y(e).$implicit,n=u(2);return v(n._emitActiveDateChange(r,t))}),d(2,"span",8),D(3),c(),I(4,"span",9),c()()}if(i&2){let e=s.$implicit,a=s.$index,t=u().$index,r=u();Ve("width",r._cellWidth)("padding-top",r._cellPadding)("padding-bottom",r._cellPadding),b("data-mat-row",t)("data-mat-col",a),l(),V("mat-calendar-body-disabled",!e.enabled)("mat-calendar-body-active",r._isActiveCell(t,a))("mat-calendar-body-range-start",r._isRangeStart(e.compareValue))("mat-calendar-body-range-end",r._isRangeEnd(e.compareValue))("mat-calendar-body-in-range",r._isInRange(e.compareValue))("mat-calendar-body-comparison-bridge-start",r._isComparisonBridgeStart(e.compareValue,t,a))("mat-calendar-body-comparison-bridge-end",r._isComparisonBridgeEnd(e.compareValue,t,a))("mat-calendar-body-comparison-start",r._isComparisonStart(e.compareValue))("mat-calendar-body-comparison-end",r._isComparisonEnd(e.compareValue))("mat-calendar-body-in-comparison-range",r._isInComparisonRange(e.compareValue))("mat-calendar-body-preview-start",r._isPreviewStart(e.compareValue))("mat-calendar-body-preview-end",r._isPreviewEnd(e.compareValue))("mat-calendar-body-in-preview",r._isInPreview(e.compareValue)),_("ngClass",e.cssClasses)("tabindex",r._isActiveCell(t,a)?0:-1),b("aria-label",e.ariaLabel)("aria-disabled",!e.enabled||null)("aria-pressed",r._isSelected(e.compareValue))("aria-current",r.todayValue===e.compareValue?"date":null)("aria-describedby",r._getDescribedby(e.compareValue)),l(),V("mat-calendar-body-selected",r._isSelected(e.compareValue))("mat-calendar-body-comparison-identical",r._isComparisonIdentical(e.compareValue))("mat-calendar-body-today",r.todayValue===e.compareValue),l(),U(" ",e.displayValue," ")}}function ka(i,s){if(i&1&&(d(0,"tr",1),P(1,Aa,2,6,"td",4),Ie(2,Ma,5,48,"td",5,sa),c()),i&2){let e=s.$implicit,a=s.$index,t=u();l(),de(a===0&&t._firstRowOffset?1:-1),l(),xe(e)}}function Sa(i,s){if(i&1&&(d(0,"th",2)(1,"span",6),D(2),c(),d(3,"span",3),D(4),c()()),i&2){let e=s.$implicit;l(2),F(e.long),l(2),F(e.narrow)}}var oa=["*"];function Ea(i,s){}function Va(i,s){if(i&1){let e=le();d(0,"mat-month-view",4),Oe("activeDateChange",function(t){y(e);let r=u();return Re(r.activeDate,t)||(r.activeDate=t),v(t)}),g("_userSelection",function(t){y(e);let r=u();return v(r._dateSelected(t))})("dragStarted",function(t){y(e);let r=u();return v(r._dragStarted(t))})("dragEnded",function(t){y(e);let r=u();return v(r._dragEnded(t))}),c()}if(i&2){let e=u();Fe("activeDate",e.activeDate),_("selected",e.selected)("dateFilter",e.dateFilter)("maxDate",e.maxDate)("minDate",e.minDate)("dateClass",e.dateClass)("comparisonStart",e.comparisonStart)("comparisonEnd",e.comparisonEnd)("startDateAccessibleName",e.startDateAccessibleName)("endDateAccessibleName",e.endDateAccessibleName)("activeDrag",e._activeDrag)}}function Ia(i,s){if(i&1){let e=le();d(0,"mat-year-view",5),Oe("activeDateChange",function(t){y(e);let r=u();return Re(r.activeDate,t)||(r.activeDate=t),v(t)}),g("monthSelected",function(t){y(e);let r=u();return v(r._monthSelectedInYearView(t))})("selectedChange",function(t){y(e);let r=u();return v(r._goToDateInView(t,"month"))}),c()}if(i&2){let e=u();Fe("activeDate",e.activeDate),_("selected",e.selected)("dateFilter",e.dateFilter)("maxDate",e.maxDate)("minDate",e.minDate)("dateClass",e.dateClass)}}function xa(i,s){if(i&1){let e=le();d(0,"mat-multi-year-view",6),Oe("activeDateChange",function(t){y(e);let r=u();return Re(r.activeDate,t)||(r.activeDate=t),v(t)}),g("yearSelected",function(t){y(e);let r=u();return v(r._yearSelectedInMultiYearView(t))})("selectedChange",function(t){y(e);let r=u();return v(r._goToDateInView(t,"year"))}),c()}if(i&2){let e=u();Fe("activeDate",e.activeDate),_("selected",e.selected)("dateFilter",e.dateFilter)("maxDate",e.maxDate)("minDate",e.minDate)("dateClass",e.dateClass)}}function Ta(i,s){}var Fa=["button"],Ra=[[["","matDatepickerToggleIcon",""]]],Oa=["[matDatepickerToggleIcon]"];function Ya(i,s){i&1&&(se(),d(0,"svg",2),I(1,"path",3),c())}var Pa=[[["input","matStartDate",""]],[["input","matEndDate",""]]],Na=["input[matStartDate]","input[matEndDate]"];function La(i,s){i&1&&(d(0,"div",0),Q(1),c())}var re=(()=>{class i{changes=new S;calendarLabel="Calendar";openCalendarLabel="Open calendar";closeCalendarLabel="Close calendar";prevMonthLabel="Previous month";nextMonthLabel="Next month";prevYearLabel="Previous year";nextYearLabel="Next year";prevMultiYearLabel="Previous 24 years";nextMultiYearLabel="Next 24 years";switchToMonthViewLabel="Choose date";switchToMultiYearViewLabel="Choose month and year";startDateLabel="Start date";endDateLabel="End date";comparisonDateLabel="Comparison range";formatYearRange(e,a){return`${e} \u2013 ${a}`}formatYearRangeLabel(e,a){return`${e} to ${a}`}static \u0275fac=function(a){return new(a||i)};static \u0275prov=O({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),Ba=0,ge=class{value;displayValue;ariaLabel;enabled;cssClasses;compareValue;rawValue;id=Ba++;constructor(s,e,a,t,r={},n=s,h){this.value=s,this.displayValue=e,this.ariaLabel=a,this.enabled=t,this.cssClasses=r,this.compareValue=n,this.rawValue=h}},Ha={passive:!1,capture:!0},Be={passive:!0,capture:!0},Jt={passive:!0},te=(()=>{class i{_elementRef=o(z);_ngZone=o(qe);_platform=o(Yt);_intl=o(re);_eventCleanups;_skipNextFocus;_focusActiveCellAfterViewChecked=!1;label;rows;todayValue;startValue;endValue;labelMinRequiredCells;numCols=7;activeCell=0;ngAfterViewChecked(){this._focusActiveCellAfterViewChecked&&(this._focusActiveCell(),this._focusActiveCellAfterViewChecked=!1)}isRange=!1;cellAspectRatio=1;comparisonStart;comparisonEnd;previewStart=null;previewEnd=null;startDateAccessibleName;endDateAccessibleName;selectedValueChange=new p;previewChange=new p;activeDateChange=new p;dragStarted=new p;dragEnded=new p;_firstRowOffset;_cellPadding;_cellWidth;_startDateLabelId;_endDateLabelId;_comparisonStartDateLabelId;_comparisonEndDateLabelId;_didDragSinceMouseDown=!1;_injector=o(Se);comparisonDateAccessibleName=this._intl.comparisonDateLabel;_trackRow=e=>e;constructor(){let e=o(Ue),a=o(ue);this._startDateLabelId=a.getId("mat-calendar-body-start-"),this._endDateLabelId=a.getId("mat-calendar-body-end-"),this._comparisonStartDateLabelId=a.getId("mat-calendar-body-comparison-start-"),this._comparisonEndDateLabelId=a.getId("mat-calendar-body-comparison-end-"),o(pe).load(Gt),this._ngZone.runOutsideAngular(()=>{let t=this._elementRef.nativeElement,r=[L(e,t,"touchmove",this._touchmoveHandler,Ha),L(e,t,"mouseenter",this._enterHandler,Be),L(e,t,"focus",this._enterHandler,Be),L(e,t,"mouseleave",this._leaveHandler,Be),L(e,t,"blur",this._leaveHandler,Be),L(e,t,"mousedown",this._mousedownHandler,Jt),L(e,t,"touchstart",this._mousedownHandler,Jt)];this._platform.isBrowser&&r.push(e.listen("window","mouseup",this._mouseupHandler),e.listen("window","touchend",this._touchendHandler)),this._eventCleanups=r})}_cellClicked(e,a){this._didDragSinceMouseDown||e.enabled&&this.selectedValueChange.emit({value:e.value,event:a})}_emitActiveDateChange(e,a){e.enabled&&this.activeDateChange.emit({value:e.value,event:a})}_isSelected(e){return this.startValue===e||this.endValue===e}ngOnChanges(e){let a=e.numCols,{rows:t,numCols:r}=this;(e.rows||a)&&(this._firstRowOffset=t&&t.length&&t[0].length?r-t[0].length:0),(e.cellAspectRatio||a||!this._cellPadding)&&(this._cellPadding=`${50*this.cellAspectRatio/r}%`),(a||!this._cellWidth)&&(this._cellWidth=`${100/r}%`)}ngOnDestroy(){this._eventCleanups.forEach(e=>e())}_isActiveCell(e,a){let t=e*this.numCols+a;return e&&(t-=this._firstRowOffset),t==this.activeCell}_focusActiveCell(e=!0){Qe(()=>{setTimeout(()=>{let a=this._elementRef.nativeElement.querySelector(".mat-calendar-body-active");a&&(e||(this._skipNextFocus=!0),a.focus())})},{injector:this._injector})}_scheduleFocusActiveCellAfterViewChecked(){this._focusActiveCellAfterViewChecked=!0}_isRangeStart(e){return lt(e,this.startValue,this.endValue)}_isRangeEnd(e){return ct(e,this.startValue,this.endValue)}_isInRange(e){return ht(e,this.startValue,this.endValue,this.isRange)}_isComparisonStart(e){return lt(e,this.comparisonStart,this.comparisonEnd)}_isComparisonBridgeStart(e,a,t){if(!this._isComparisonStart(e)||this._isRangeStart(e)||!this._isInRange(e))return!1;let r=this.rows[a][t-1];if(!r){let n=this.rows[a-1];r=n&&n[n.length-1]}return r&&!this._isRangeEnd(r.compareValue)}_isComparisonBridgeEnd(e,a,t){if(!this._isComparisonEnd(e)||this._isRangeEnd(e)||!this._isInRange(e))return!1;let r=this.rows[a][t+1];if(!r){let n=this.rows[a+1];r=n&&n[0]}return r&&!this._isRangeStart(r.compareValue)}_isComparisonEnd(e){return ct(e,this.comparisonStart,this.comparisonEnd)}_isInComparisonRange(e){return ht(e,this.comparisonStart,this.comparisonEnd,this.isRange)}_isComparisonIdentical(e){return this.comparisonStart===this.comparisonEnd&&e===this.comparisonStart}_isPreviewStart(e){return lt(e,this.previewStart,this.previewEnd)}_isPreviewEnd(e){return ct(e,this.previewStart,this.previewEnd)}_isInPreview(e){return ht(e,this.previewStart,this.previewEnd,this.isRange)}_getDescribedby(e){if(!this.isRange)return null;if(this.startValue===e&&this.endValue===e)return`${this._startDateLabelId} ${this._endDateLabelId}`;if(this.startValue===e)return this._startDateLabelId;if(this.endValue===e)return this._endDateLabelId;if(this.comparisonStart!==null&&this.comparisonEnd!==null){if(e===this.comparisonStart&&e===this.comparisonEnd)return`${this._comparisonStartDateLabelId} ${this._comparisonEndDateLabelId}`;if(e===this.comparisonStart)return this._comparisonStartDateLabelId;if(e===this.comparisonEnd)return this._comparisonEndDateLabelId}return null}_enterHandler=e=>{if(this._skipNextFocus&&e.type==="focus"){this._skipNextFocus=!1;return}if(e.target&&this.isRange){let a=this._getCellFromElement(e.target);a&&this._ngZone.run(()=>this.previewChange.emit({value:a.enabled?a:null,event:e}))}};_touchmoveHandler=e=>{if(!this.isRange)return;let a=ea(e),t=a?this._getCellFromElement(a):null;a!==e.target&&(this._didDragSinceMouseDown=!0),dt(e.target)&&e.preventDefault(),this._ngZone.run(()=>this.previewChange.emit({value:t?.enabled?t:null,event:e}))};_leaveHandler=e=>{this.previewEnd!==null&&this.isRange&&(e.type!=="blur"&&(this._didDragSinceMouseDown=!0),e.target&&this._getCellFromElement(e.target)&&!(e.relatedTarget&&this._getCellFromElement(e.relatedTarget))&&this._ngZone.run(()=>this.previewChange.emit({value:null,event:e})))};_mousedownHandler=e=>{if(!this.isRange)return;this._didDragSinceMouseDown=!1;let a=e.target&&this._getCellFromElement(e.target);!a||!this._isInRange(a.compareValue)||this._ngZone.run(()=>{this.dragStarted.emit({value:a.rawValue,event:e})})};_mouseupHandler=e=>{if(!this.isRange)return;let a=dt(e.target);if(!a){this._ngZone.run(()=>{this.dragEnded.emit({value:null,event:e})});return}a.closest(".mat-calendar-body")===this._elementRef.nativeElement&&this._ngZone.run(()=>{let t=this._getCellFromElement(a);this.dragEnded.emit({value:t?.rawValue??null,event:e})})};_touchendHandler=e=>{let a=ea(e);a&&this._mouseupHandler({target:a})};_getCellFromElement(e){let a=dt(e);if(a){let t=a.getAttribute("data-mat-row"),r=a.getAttribute("data-mat-col");if(t&&r)return this.rows[parseInt(t)][parseInt(r)]}return null}static \u0275fac=function(a){return new(a||i)};static \u0275cmp=C({type:i,selectors:[["","mat-calendar-body",""]],hostAttrs:[1,"mat-calendar-body"],inputs:{label:"label",rows:"rows",todayValue:"todayValue",startValue:"startValue",endValue:"endValue",labelMinRequiredCells:"labelMinRequiredCells",numCols:"numCols",activeCell:"activeCell",isRange:"isRange",cellAspectRatio:"cellAspectRatio",comparisonStart:"comparisonStart",comparisonEnd:"comparisonEnd",previewStart:"previewStart",previewEnd:"previewEnd",startDateAccessibleName:"startDateAccessibleName",endDateAccessibleName:"endDateAccessibleName"},outputs:{selectedValueChange:"selectedValueChange",previewChange:"previewChange",activeDateChange:"activeDateChange",dragStarted:"dragStarted",dragEnded:"dragEnded"},exportAs:["matCalendarBody"],features:[Y],attrs:va,decls:11,vars:11,consts:[["aria-hidden","true"],["role","row"],[1,"mat-calendar-body-hidden-label",3,"id"],[1,"mat-calendar-body-label"],[1,"mat-calendar-body-label",3,"paddingTop","paddingBottom"],["role","gridcell",1,"mat-calendar-body-cell-container",3,"width","paddingTop","paddingBottom"],["role","gridcell",1,"mat-calendar-body-cell-container"],["type","button",1,"mat-calendar-body-cell",3,"click","focus","ngClass","tabindex"],[1,"mat-calendar-body-cell-content","mat-focus-indicator"],["aria-hidden","true",1,"mat-calendar-body-cell-preview"]],template:function(a,t){a&1&&(P(0,wa,3,6,"tr",0),Ie(1,ka,4,1,"tr",1,Ca,!0),d(3,"span",2),D(4),c(),d(5,"span",2),D(6),c(),d(7,"span",2),D(8),c(),d(9,"span",2),D(10),c()),a&2&&(de(t._firstRowOffset<t.labelMinRequiredCells?0:-1),l(),xe(t.rows),l(2),_("id",t._startDateLabelId),l(),U(" ",t.startDateAccessibleName,`
2
2
  `),l(),_("id",t._endDateLabelId),l(),U(" ",t.endDateAccessibleName,`
3
3
  `),l(),_("id",t._comparisonStartDateLabelId),l(),Xe(" ",t.comparisonDateAccessibleName," ",t.startDateAccessibleName,`
4
4
  `),l(),_("id",t._comparisonEndDateLabelId),l(),Xe(" ",t.comparisonDateAccessibleName," ",t.endDateAccessibleName,`
@@ -1 +1 @@
1
- import{b as P,c as V}from"./chunk-VSF6PYZW.js";import{u as N,v as G,w as L}from"./chunk-CD3BSGAP.js";import{e as A,f as j}from"./chunk-3YKVLHZG.js";import{F as R}from"./chunk-RVXZOIFQ.js";import{$a as o,Ac as k,Bc as E,Db as C,Eb as s,Gb as p,Hb as _,Ib as a,Jb as r,Kb as x,Ma as d,Ob as $,Qb as M,Rb as l,db as T,ec as m,ed as O,fc as g,gc as h,gd as w,jd as B,kb as b,na as I,qb as u,rc as S,va as y,vb as f,wa as v,zb as F,zc as D}from"./chunk-UXRO4UFY.js";var H=t=>({"text-end":t});function J(t,n){if(t&1&&(a(0,"th"),m(1),r()),t&2){let e=n.$implicit,i=n.$index,c=l();F(S(3,H,e.type=="number")),o(),h(" ",c.headers()[i]," ")}}function K(t,n){if(t&1&&(a(0,"td"),m(1),D(2,"date"),r()),t&2){let e=l().$implicit,i=l().$implicit;o(),g(E(2,1,i[e.field],"dd MMM yyyy"))}}function Q(t,n){if(t&1&&(a(0,"td",7),m(1),D(2,"number"),r()),t&2){let e=l().$implicit,i=l().$implicit;o(),g(k(2,1,i[e.field]))}}function U(t,n){if(t&1&&(a(0,"td"),m(1),r()),t&2){let e=l().$implicit,i=l().$implicit;o(),g(i[e.field])}}function W(t,n){if(t&1&&u(0,K,3,4,"td")(1,Q,3,3,"td",7)(2,U,2,1,"td"),t&2){let e=n.$implicit;C(e.type=="date"?0:e.type=="number"?1:2)}}function X(t,n){if(t&1&&(a(0,"small",6),m(1),r()),t&2){let e=l(2);o(),h("(",e.actionTitle(),")")}}function Y(t,n){if(t&1){let e=$();a(0,"tr")(1,"td")(2,"mat-radio-button",5),M("change",function(){let c=y(e).$implicit,z=l();return v(z.selectedId.set(c.ID))}),r()(),p(3,W,3,1,null,null,s),a(5,"td"),u(6,X,2,1,"small",6),r()()}if(t&2){let e=n.$implicit,i=l();o(2),f("id",e.ID)("checked",i.selectedId()==e.ID)("name",e.ID)("value",e.ID),o(),_(i.columns()),o(3),C(i.selectedId()!=e.ID?6:-1)}}var q=class t{constructor(n){this.dialogData=n;this.data.set(n.data),this.columns.set(n.columns),this.headers.set(n.headers),this.selectedId.set(this.data()[0]?.ID),this.actionTitle.set(n.actionTitle?n.actionTitle:"Deleted"),this.config.title=n.title,this.config.bodyScrollable=!0}dialogRef=I(A);config=new N;selectedId=d(null);data=d([]);actionTitle=d("Deleted");columns=d([]);headers=d([]);onOk(){let n=this.data()?.filter(i=>i.ID!==this.selectedId())?.map(i=>i.ID),e={mergeTarget:this.selectedId(),deleted:n};this.dialogRef.close(e)}onClose(){this.dialogRef.close(!1)}static \u0275fac=function(e){return new(e||t)(T(j))};static \u0275cmp=b({type:t,selectors:[["app-merge-dialog"]],decls:12,vars:2,consts:[[3,"onOk","onCancel","onClose","config","dynamicValidated"],[1,"table"],[1,"thead-light"],[2,"width","5px"],[3,"class"],["color","primary",3,"change","id","checked","name","value"],[1,"fst-italic","ms-2","text-danger"],[1,"text-end"]],template:function(e,i){e&1&&(a(0,"modal-material",0),M("onOk",function(){return i.onOk()})("onCancel",function(){return i.onClose()})("onClose",function(){return i.onClose()}),a(1,"content")(2,"table",1)(3,"thead",2)(4,"tr"),x(5,"th",3),p(6,J,2,5,"th",4,s),x(8,"th"),r()(),a(9,"tbody"),p(10,Y,7,5,"tr",null,s),r()()()()),e&2&&(f("config",i.config)("dynamicValidated",i.selectedId()),o(6),_(i.columns()),o(4),_(i.data()))},dependencies:[B,w,O,L,G,V,P,R],styles:[".radio-group[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:15px 0;align-items:flex-start}.radio-button[_ngcontent-%COMP%]{margin:5px}"]})};export{q as a};
1
+ import{b as P,c as V}from"./chunk-CKNQ2YZ5.js";import{u as N,v as G,w as L}from"./chunk-IJ6QEGE5.js";import{e as A,f as j}from"./chunk-3YKVLHZG.js";import{F as R}from"./chunk-RVXZOIFQ.js";import{$a as o,Ac as k,Bc as E,Db as C,Eb as s,Gb as p,Hb as _,Ib as a,Jb as r,Kb as x,Ma as d,Ob as $,Qb as M,Rb as l,db as T,ec as m,ed as O,fc as g,gc as h,gd as w,jd as B,kb as b,na as I,qb as u,rc as S,va as y,vb as f,wa as v,zb as F,zc as D}from"./chunk-UXRO4UFY.js";var H=t=>({"text-end":t});function J(t,n){if(t&1&&(a(0,"th"),m(1),r()),t&2){let e=n.$implicit,i=n.$index,c=l();F(S(3,H,e.type=="number")),o(),h(" ",c.headers()[i]," ")}}function K(t,n){if(t&1&&(a(0,"td"),m(1),D(2,"date"),r()),t&2){let e=l().$implicit,i=l().$implicit;o(),g(E(2,1,i[e.field],"dd MMM yyyy"))}}function Q(t,n){if(t&1&&(a(0,"td",7),m(1),D(2,"number"),r()),t&2){let e=l().$implicit,i=l().$implicit;o(),g(k(2,1,i[e.field]))}}function U(t,n){if(t&1&&(a(0,"td"),m(1),r()),t&2){let e=l().$implicit,i=l().$implicit;o(),g(i[e.field])}}function W(t,n){if(t&1&&u(0,K,3,4,"td")(1,Q,3,3,"td",7)(2,U,2,1,"td"),t&2){let e=n.$implicit;C(e.type=="date"?0:e.type=="number"?1:2)}}function X(t,n){if(t&1&&(a(0,"small",6),m(1),r()),t&2){let e=l(2);o(),h("(",e.actionTitle(),")")}}function Y(t,n){if(t&1){let e=$();a(0,"tr")(1,"td")(2,"mat-radio-button",5),M("change",function(){let c=y(e).$implicit,z=l();return v(z.selectedId.set(c.ID))}),r()(),p(3,W,3,1,null,null,s),a(5,"td"),u(6,X,2,1,"small",6),r()()}if(t&2){let e=n.$implicit,i=l();o(2),f("id",e.ID)("checked",i.selectedId()==e.ID)("name",e.ID)("value",e.ID),o(),_(i.columns()),o(3),C(i.selectedId()!=e.ID?6:-1)}}var q=class t{constructor(n){this.dialogData=n;this.data.set(n.data),this.columns.set(n.columns),this.headers.set(n.headers),this.selectedId.set(this.data()[0]?.ID),this.actionTitle.set(n.actionTitle?n.actionTitle:"Deleted"),this.config.title=n.title,this.config.bodyScrollable=!0}dialogRef=I(A);config=new N;selectedId=d(null);data=d([]);actionTitle=d("Deleted");columns=d([]);headers=d([]);onOk(){let n=this.data()?.filter(i=>i.ID!==this.selectedId())?.map(i=>i.ID),e={mergeTarget:this.selectedId(),deleted:n};this.dialogRef.close(e)}onClose(){this.dialogRef.close(!1)}static \u0275fac=function(e){return new(e||t)(T(j))};static \u0275cmp=b({type:t,selectors:[["app-merge-dialog"]],decls:12,vars:2,consts:[[3,"onOk","onCancel","onClose","config","dynamicValidated"],[1,"table"],[1,"thead-light"],[2,"width","5px"],[3,"class"],["color","primary",3,"change","id","checked","name","value"],[1,"fst-italic","ms-2","text-danger"],[1,"text-end"]],template:function(e,i){e&1&&(a(0,"modal-material",0),M("onOk",function(){return i.onOk()})("onCancel",function(){return i.onClose()})("onClose",function(){return i.onClose()}),a(1,"content")(2,"table",1)(3,"thead",2)(4,"tr"),x(5,"th",3),p(6,J,2,5,"th",4,s),x(8,"th"),r()(),a(9,"tbody"),p(10,Y,7,5,"tr",null,s),r()()()()),e&2&&(f("config",i.config)("dynamicValidated",i.selectedId()),o(6),_(i.columns()),o(4),_(i.data()))},dependencies:[B,w,O,L,G,V,P,R],styles:[".radio-group[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:15px 0;align-items:flex-start}.radio-button[_ngcontent-%COMP%]{margin:5px}"]})};export{q as a};
@@ -1,4 +1,4 @@
1
- import{a as ee,d as It,e as Dt}from"./chunk-VGNMBCUC.js";import{d as te}from"./chunk-3GOO5E5D.js";import{a as gt}from"./chunk-XMYLHF4C.js";import{F as Tt,G as Mt,u as xt,v as wt,w as St}from"./chunk-CD3BSGAP.js";import{b as ht,c as vt}from"./chunk-JOXTERIM.js";import{N as kt,n as Vt}from"./chunk-5OS5VELO.js";import{a as nt,e as bt,f as yt,g as Ct}from"./chunk-3YKVLHZG.js";import{q as _t}from"./chunk-ZHY3BUQJ.js";import{a as ut,c as ft}from"./chunk-LE3BKIDY.js";import{C as _e,K as lt,L as st,b as it,i as ot,ia as ct,la as pt,m as at,ma as J,ra as dt,s as rt,ua as mt}from"./chunk-EEEAUYZ6.js";import{F as Je,c as Ue,h as qe,i as Ze,k as Ye,o as Ge,p as Xe}from"./chunk-RVXZOIFQ.js";import{a as $e,c as tt}from"./chunk-TDO7VOF5.js";import{a as et}from"./chunk-NOQM2VPB.js";import{a as K}from"./chunk-ZZGSAFGO.js";import{$a as c,$b as D,Ac as me,Ad as je,Bc as Be,Bd as fe,Db as De,Dd as G,Ed as X,Fa as y,Fc as Ke,Ga as Se,Gd as ge,Ib as a,Ja as ce,Jb as l,Kb as g,Lb as k,Lc as Ae,Mb as T,Mc as z,N as xe,Nb as Pe,Nc as Le,Ob as h,Qb as f,Qc as ue,Rb as p,Rd as He,Sb as H,Sd as We,Tb as x,Td as Qe,Ub as O,Vd as ze,Wc as U,Yb as M,Yc as Re,Zc as q,_a as Ve,_b as I,aa as we,ad as Ne,bc as W,bd as Z,cc as Ee,d as ye,db as b,dc as Fe,ec as _,fc as P,gb as N,gc as A,ja as L,jc as w,jd as B,ka as R,kb as F,kc as S,kd as Y,lb as j,lc as V,na as E,nb as ke,ob as Te,pc as Oe,qb as d,qc as Q,rc as C,sc as de,t as Ce,ub as Me,va as m,vb as s,wa as u,xb as pe,za as se,zb as Ie,zc as $}from"./chunk-UXRO4UFY.js";import{a as le,b as be}from"./chunk-7DCB7DB2.js";var ne=class t{_openDialog=new ye;openDialog$=this._openDialog.asObservable();openDialog(){this._openDialog.next()}static \u0275fac=function(e){return new(e||t)};static \u0275prov=L({token:t,factory:t.\u0275fac,providedIn:"root"})};var Lt=["content"],Rt=["*"],Nt=(t,o)=>({showTransitionParams:t,hideTransitionParams:o}),jt=(t,o)=>({value:t,params:o}),Ht=t=>({closeCallback:t});function Wt(t,o){}function Qt(t,o){t&1&&d(0,Wt,0,0,"ng-template")}function $t(t,o){if(t&1){let e=h();a(0,"div",1),f("click",function(i){m(e);let r=p();return u(r.onOverlayClick(i))})("@animation.start",function(i){m(e);let r=p();return u(r.onAnimationStart(i))})("@animation.done",function(i){m(e);let r=p();return u(r.onAnimationEnd(i))}),a(1,"div",2),f("click",function(i){m(e);let r=p();return u(r.onContentClick(i))})("mousedown",function(i){m(e);let r=p();return u(r.onContentClick(i))}),x(2),d(3,Qt,1,0,null,3),l()()}if(t&2){let e=p();Ie(e.styleClass),s("ngClass","p-popover p-component")("ngStyle",e.style)("@animation",de(13,jt,e.overlayVisible?"open":"close",de(10,Nt,e.showTransitionOptions,e.hideTransitionOptions))),Me("aria-modal",e.overlayVisible)("aria-label",e.ariaLabel)("aria-labelledBy",e.ariaLabelledBy),c(3),s("ngTemplateOutlet",e.contentTemplate||e._contentTemplate)("ngTemplateOutletContext",C(16,Ht,e.onCloseClick.bind(e)))}}var zt=({dt:t})=>`
1
+ import{a as ee,d as It,e as Dt}from"./chunk-G2NZ3D7U.js";import{d as te}from"./chunk-3GOO5E5D.js";import{a as gt}from"./chunk-XMYLHF4C.js";import{F as Tt,G as Mt,u as xt,v as wt,w as St}from"./chunk-IJ6QEGE5.js";import{b as ht,c as vt}from"./chunk-JOXTERIM.js";import{N as kt,n as Vt}from"./chunk-FVKF2ZOS.js";import{a as nt,e as bt,f as yt,g as Ct}from"./chunk-3YKVLHZG.js";import{q as _t}from"./chunk-ZHY3BUQJ.js";import{a as ut,c as ft}from"./chunk-LE3BKIDY.js";import{C as _e,K as lt,L as st,b as it,i as ot,ia as ct,la as pt,m as at,ma as J,ra as dt,s as rt,ua as mt}from"./chunk-EEEAUYZ6.js";import{F as Je,c as Ue,h as qe,i as Ze,k as Ye,o as Ge,p as Xe}from"./chunk-RVXZOIFQ.js";import{a as $e,c as tt}from"./chunk-Y7V4JJ46.js";import{a as et}from"./chunk-ELIDPKL7.js";import{a as K}from"./chunk-ZZGSAFGO.js";import{$a as c,$b as D,Ac as me,Ad as je,Bc as Be,Bd as fe,Db as De,Dd as G,Ed as X,Fa as y,Fc as Ke,Ga as Se,Gd as ge,Ib as a,Ja as ce,Jb as l,Kb as g,Lb as k,Lc as Ae,Mb as T,Mc as z,N as xe,Nb as Pe,Nc as Le,Ob as h,Qb as f,Qc as ue,Rb as p,Rd as He,Sb as H,Sd as We,Tb as x,Td as Qe,Ub as O,Vd as ze,Wc as U,Yb as M,Yc as Re,Zc as q,_a as Ve,_b as I,aa as we,ad as Ne,bc as W,bd as Z,cc as Ee,d as ye,db as b,dc as Fe,ec as _,fc as P,gb as N,gc as A,ja as L,jc as w,jd as B,ka as R,kb as F,kc as S,kd as Y,lb as j,lc as V,na as E,nb as ke,ob as Te,pc as Oe,qb as d,qc as Q,rc as C,sc as de,t as Ce,ub as Me,va as m,vb as s,wa as u,xb as pe,za as se,zb as Ie,zc as $}from"./chunk-UXRO4UFY.js";import{a as le,b as be}from"./chunk-7DCB7DB2.js";var ne=class t{_openDialog=new ye;openDialog$=this._openDialog.asObservable();openDialog(){this._openDialog.next()}static \u0275fac=function(e){return new(e||t)};static \u0275prov=L({token:t,factory:t.\u0275fac,providedIn:"root"})};var Lt=["content"],Rt=["*"],Nt=(t,o)=>({showTransitionParams:t,hideTransitionParams:o}),jt=(t,o)=>({value:t,params:o}),Ht=t=>({closeCallback:t});function Wt(t,o){}function Qt(t,o){t&1&&d(0,Wt,0,0,"ng-template")}function $t(t,o){if(t&1){let e=h();a(0,"div",1),f("click",function(i){m(e);let r=p();return u(r.onOverlayClick(i))})("@animation.start",function(i){m(e);let r=p();return u(r.onAnimationStart(i))})("@animation.done",function(i){m(e);let r=p();return u(r.onAnimationEnd(i))}),a(1,"div",2),f("click",function(i){m(e);let r=p();return u(r.onContentClick(i))})("mousedown",function(i){m(e);let r=p();return u(r.onContentClick(i))}),x(2),d(3,Qt,1,0,null,3),l()()}if(t&2){let e=p();Ie(e.styleClass),s("ngClass","p-popover p-component")("ngStyle",e.style)("@animation",de(13,jt,e.overlayVisible?"open":"close",de(10,Nt,e.showTransitionOptions,e.hideTransitionOptions))),Me("aria-modal",e.overlayVisible)("aria-label",e.ariaLabel)("aria-labelledBy",e.ariaLabelledBy),c(3),s("ngTemplateOutlet",e.contentTemplate||e._contentTemplate)("ngTemplateOutletContext",C(16,Ht,e.onCloseClick.bind(e)))}}var zt=({dt:t})=>`
2
2
  .p-popover {
3
3
  margin-top: ${t("popover.gutter")};
4
4
  background: ${t("popover.background")};
@@ -1 +1 @@
1
- import{a as b}from"./chunk-NOQM2VPB.js";import{a as p,d as T,e as R}from"./chunk-ZZGSAFGO.js";import{Pa as S,Qd as v,Sc as d,Yd as k,fa as h,ja as u,kd as I,ma as c}from"./chunk-UXRO4UFY.js";var U=(o=>(o[o.PAID=0]="PAID",o[o.OVERDUE=1]="OVERDUE",o[o.SELL_ONLY=2]="SELL_ONLY",o[o.SUSPENDED=3]="SUSPENDED",o))(U||{});var y=(()=>{class n{constructor(e,i){this.document=e,this.platformId=i,this.documentIsAccessible=I(this.platformId)}static getCookieRegExp(e){let i=e.replace(/([\[\]{}()|=;+?,.*^$])/gi,"\\$1");return new RegExp("(?:^"+i+"|;\\s*"+i+")=(.*?)(?:;|$)","g")}static safeDecodeURIComponent(e){try{return decodeURIComponent(e)}catch{return e}}check(e){return this.documentIsAccessible?(e=encodeURIComponent(e),n.getCookieRegExp(e).test(this.document.cookie)):!1}get(e){if(this.check(e)){e=encodeURIComponent(e);let o=n.getCookieRegExp(e).exec(this.document.cookie);return o&&o[1]?n.safeDecodeURIComponent(o[1]):""}else return""}getAll(){if(!this.documentIsAccessible)return{};let e={},i=this.document;return i.cookie&&i.cookie!==""&&i.cookie.split(";").forEach(o=>{let[a,s]=o.split("=");e[n.safeDecodeURIComponent(a.replace(/^ /,""))]=n.safeDecodeURIComponent(s)}),e}set(e,i,o,a,s,m,f,D){if(!this.documentIsAccessible)return;if(typeof o=="number"||o instanceof Date||a||s||m||f){let g={expires:o,path:a,domain:s,secure:m,sameSite:f||"Lax",partitioned:D};this.set(e,i,g);return}let l=encodeURIComponent(e)+"="+encodeURIComponent(i)+";",r=o||{};if(r.expires)if(typeof r.expires=="number"){let g=new Date(new Date().getTime()+r.expires*1e3*60*60*24);l+="expires="+g.toUTCString()+";"}else l+="expires="+r.expires.toUTCString()+";";r.path&&(l+="path="+r.path+";"),r.domain&&(l+="domain="+r.domain+";"),r.secure===!1&&r.sameSite==="None"&&(r.secure=!0,console.warn(`[ngx-cookie-service] Cookie ${e} was forced with secure flag because sameSite=None.More details : https://github.com/stevermeister/ngx-cookie-service/issues/86#issuecomment-597720130`)),r.secure&&(l+="secure;"),r.sameSite||(r.sameSite="Lax"),l+="sameSite="+r.sameSite+";",r.partitioned&&(l+="Partitioned;"),this.document.cookie=l}delete(e,i,o,a,s="Lax"){if(!this.documentIsAccessible)return;let m=new Date("Thu, 01 Jan 1970 00:00:01 GMT");this.set(e,"",{expires:m,path:i,domain:o,secure:a,sameSite:s})}deleteAll(e,i,o,a="Lax"){if(!this.documentIsAccessible)return;let s=this.getAll();for(let m in s)s.hasOwnProperty(m)&&this.delete(m,e,i,o,a)}static{this.\u0275fac=function(i){return new(i||n)(c(d),c(S))}}static{this.\u0275prov=u({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var C=class n{constructor(t,e,i,o,a,s){this.httpService=t;this.cookieService=e;this.router=i;this.roleService=o;this.intercomService=a;this.fraction=s}role=[];_returnUrl;_loginResponse;_jwtToken;set returnUrl(t){this._returnUrl=t}get returnUrl(){return this._returnUrl}login(t){return this.httpService.post("/api/Login/Web",t).pipe(h(e=>{this._loginResponse=e,e.Type=="geo"||e.Type=="totp"||this.saveLoginConfigToStorage(e)}))}loginLoader(){return this.httpService.get("/api/login/Loader")}getRedirectUrl(){let t=this.getSubscriptionStatus(),e=this.getRedirectUrlByRole();return(t==2||t==3)&&(e="/menu/Profile/Main/My_Subscription"),e}getRedirectUrlByRole(){let t,e=this.roleService;return e.dashboard.View?t="/menu/Dashboard":e.product.View?t="/menu/Products":t="/menu/Sell",t}logout(){localStorage.removeItem("ConfigData"),localStorage.removeItem("Token"),localStorage.removeItem("Roles"),localStorage.removeItem("AccountInfo"),localStorage.removeItem("CloudinaryConfig"),localStorage.removeItem("SubscriptionStatus"),this.cookieService.delete("ReportFilter","/"),this.intercomService.shutdown(),this._jwtToken=null,this.roleService.resetRoles(),this.router.navigate(["/"])}refreshToken(){this.httpService.post("/API/Authentication/RefreshToken",{}).subscribe(t=>{localStorage.removeItem("Token"),localStorage.setItem("Token",t.Token),this._jwtToken=null,this.roleService.resetRoles(),this.roleService.parseJWTRoles()})}isTokenExpired(){let t=localStorage.getItem("Token");if(t){let e=p.parseJwt(t),i=this.convertUnixTimesTamp(e.exp),o=new Date;if(i.getTime()-o.getTime()>0)return!1}return!0}isInRole(t){t.forEach(e=>e(this.role))}convertUnixTimesTamp(t){return new Date(t*1e3)}saveLoginConfigToStorage(t){localStorage.setItem("quantityFraction",JSON.stringify(t.UIConfig.Fraction.Quantity)),localStorage.setItem("amountFraction",JSON.stringify(t.UIConfig.Fraction.Amount)),this.fraction.setAmountFraction(t.UIConfig.Fraction.Amount.Minimum,t.UIConfig.Fraction.Amount.Maximum),this.fraction.setQuantityFraction(t.UIConfig.Fraction.Quantity.Minimum,t.UIConfig.Fraction.Quantity.Maximum),localStorage.setItem("AccountInfo",JSON.stringify(t?.AccountInfo)),localStorage.setItem("Token",t?.Token),localStorage.setItem("TinyMCEPlugins",t?.UIConfig.TinyMCE),this.intercomService.updateLocalStorage(t?.Intercom),localStorage.setItem("CloudinaryConfig",t?.UIConfig.CloudinaryConfig),localStorage.setItem("DataDaysRange",t?.UIConfig.DataDaysRange),localStorage.setItem("SubscriptionStatus",JSON.stringify(t?.SubscriptionStatus));let e=this.getParseToken();p.IsNotEmpty(e?.NotificationOutletID)&&localStorage.setItem("NotificationOutletID",e?.NotificationOutletID),this.roleService.parseJWTRoles(),this._loginResponse=null}getParseToken(){let t=localStorage.getItem("Token");return t&&!this._jwtToken&&(this._jwtToken=p.parseJwt(t)),this._jwtToken}get loginResponse(){return this._loginResponse}getSubscriptionStatus(){let t=localStorage.getItem("SubscriptionStatus");return t?parseInt(t):null}static \u0275fac=function(e){return new(e||n)(c(k),c(y),c(v),c(T),c(b),c(R))};static \u0275prov=u({token:n,factory:n.\u0275fac,providedIn:"root"})};export{U as a,y as b,C as c};
1
+ import{a as R}from"./chunk-ELIDPKL7.js";import{a as u,d as h,e as C}from"./chunk-ZZGSAFGO.js";import{Pa as T,Qd as N,Sc as S,Yd as v,fa as g,ja as p,kd as d,ma as c}from"./chunk-UXRO4UFY.js";var U=(i=>(i[i.PAID=0]="PAID",i[i.OVERDUE=1]="OVERDUE",i[i.SELL_ONLY=2]="SELL_ONLY",i[i.SUSPENDED=3]="SUSPENDED",i))(U||{});var O=(()=>{class n{constructor(e,o){this.document=e,this.platformId=o,this.documentIsAccessible=d(this.platformId)}static getCookieRegExp(e){let o=e.replace(/([\[\]{}()|=;+?,.*^$])/gi,"\\$1");return new RegExp("(?:^"+o+"|;\\s*"+o+")=(.*?)(?:;|$)","g")}static safeDecodeURIComponent(e){try{return decodeURIComponent(e)}catch{return e}}check(e){return this.documentIsAccessible?(e=encodeURIComponent(e),n.getCookieRegExp(e).test(this.document.cookie)):!1}get(e){if(this.check(e)){e=encodeURIComponent(e);let i=n.getCookieRegExp(e).exec(this.document.cookie);return i&&i[1]?n.safeDecodeURIComponent(i[1]):""}else return""}getAll(){if(!this.documentIsAccessible)return{};let e={},o=this.document;return o.cookie&&o.cookie!==""&&o.cookie.split(";").forEach(i=>{let[a,s]=i.split("=");e[n.safeDecodeURIComponent(a.replace(/^ /,""))]=n.safeDecodeURIComponent(s)}),e}set(e,o,i,a,s,l,f,E){if(!this.documentIsAccessible)return;if(typeof i=="number"||i instanceof Date||a||s||l||f){let I={expires:i,path:a,domain:s,secure:l,sameSite:f||"Lax",partitioned:E};this.set(e,o,I);return}let m=encodeURIComponent(e)+"="+encodeURIComponent(o)+";",r=i||{};if(r.expires)if(typeof r.expires=="number"){let I=new Date(new Date().getTime()+r.expires*1e3*60*60*24);m+="expires="+I.toUTCString()+";"}else m+="expires="+r.expires.toUTCString()+";";r.path&&(m+="path="+r.path+";"),r.domain&&(m+="domain="+r.domain+";"),r.secure===!1&&r.sameSite==="None"&&(r.secure=!0,console.warn(`[ngx-cookie-service] Cookie ${e} was forced with secure flag because sameSite=None.More details : https://github.com/stevermeister/ngx-cookie-service/issues/86#issuecomment-597720130`)),r.secure&&(m+="secure;"),r.sameSite||(r.sameSite="Lax"),m+="sameSite="+r.sameSite+";",r.partitioned&&(m+="Partitioned;"),this.document.cookie=m}delete(e,o,i,a,s="Lax"){if(!this.documentIsAccessible)return;let l=new Date("Thu, 01 Jan 1970 00:00:01 GMT");this.set(e,"",{expires:l,path:o,domain:i,secure:a,sameSite:s})}deleteAll(e,o,i,a="Lax"){if(!this.documentIsAccessible)return;let s=this.getAll();for(let l in s)s.hasOwnProperty(l)&&this.delete(l,e,o,i,a)}static{this.\u0275fac=function(o){return new(o||n)(c(S),c(T))}}static{this.\u0275prov=p({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var D=class n{constructor(t,e,o,i,a,s){this.httpService=t;this.cookieService=e;this.router=o;this.roleService=i;this.intercomService=a;this.fraction=s}role=[];_returnUrl;_loginResponse;_jwtToken;set returnUrl(t){this._returnUrl=t}get returnUrl(){return this._returnUrl}login(t){return this.httpService.post("/api/Login/Web",t).pipe(g(e=>{this._loginResponse=e,e.Type=="geo"||e.Type=="totp"||this.saveLoginConfigToStorage(e)}))}loginLoader(){return this.httpService.get("/api/login/Loader")}getRedirectUrl(){let t=this.getSubscriptionStatus(),e=this.getRedirectUrlByRole();return(t==2||t==3)&&(e="/menu/Profile/Main/My_Subscription"),e}getRedirectUrlByRole(){let t,e=this.roleService;return e.dashboard.View?t="/menu/Dashboard":e.product.View?t="/menu/Products":t="/menu/Sell",t}logout(){localStorage.removeItem("ConfigData"),localStorage.removeItem("Token"),localStorage.removeItem("Roles"),localStorage.removeItem("AccountInfo"),localStorage.removeItem("CloudinaryConfig"),localStorage.removeItem("SubscriptionStatus"),this.cookieService.delete("ReportFilter","/"),this.intercomService.shutdown(),this._jwtToken=null,this.roleService.resetRoles(),this.router.navigate(["/"])}refreshToken(){this.httpService.post("/API/Authentication/RefreshToken",{}).subscribe(t=>{localStorage.removeItem("Token"),localStorage.setItem("Token",t.Token),this._jwtToken=null,this.roleService.resetRoles(),this.roleService.parseJWTRoles()})}isTokenExpired(){let t=localStorage.getItem("Token");if(t){let e=u.parseJwt(t),o=this.convertUnixTimesTamp(e.exp),i=new Date;if(o.getTime()-i.getTime()>0)return!1}return!0}isInRole(t){t.forEach(e=>e(this.role))}convertUnixTimesTamp(t){return new Date(t*1e3)}saveLoginConfigToStorage(t){localStorage.setItem("quantityFraction",JSON.stringify(t.UIConfig.Fraction.Quantity)),localStorage.setItem("amountFraction",JSON.stringify(t.UIConfig.Fraction.Amount)),this.fraction.setAmountFraction(t.UIConfig.Fraction.Amount.Minimum,t.UIConfig.Fraction.Amount.Maximum),this.fraction.setQuantityFraction(t.UIConfig.Fraction.Quantity.Minimum,t.UIConfig.Fraction.Quantity.Maximum),localStorage.setItem("AccountInfo",JSON.stringify(t?.AccountInfo)),localStorage.setItem("Token",t?.Token),localStorage.setItem("TinyMCEPlugins",t?.UIConfig.TinyMCE),this.intercomService.updateLocalStorage(t?.Intercom),localStorage.setItem("CloudinaryConfig",t?.UIConfig.CloudinaryConfig),localStorage.setItem("DataDaysRange",t?.UIConfig.DataDaysRange),localStorage.setItem("SubscriptionStatus",JSON.stringify(t?.SubscriptionStatus));let e=this.getParseToken();u.IsNotEmpty(e?.NotificationOutletID)&&localStorage.setItem("NotificationOutletID",e?.NotificationOutletID),this.roleService.parseJWTRoles(),this._loginResponse=null}getParseToken(){let t=localStorage.getItem("Token");return t&&!this._jwtToken&&(this._jwtToken=u.parseJwt(t)),this._jwtToken}get loginResponse(){return this._loginResponse}getSubscriptionStatus(){let t=localStorage.getItem("SubscriptionStatus");return t?parseInt(t):null}static \u0275fac=function(e){return new(e||n)(c(v),c(O),c(N),c(h),c(R),c(C))};static \u0275prov=p({token:n,factory:n.\u0275fac,providedIn:"root"})};export{U as a,O as b,D as c};
@@ -1,4 +1,4 @@
1
- import{a as Wi}from"./chunk-HQQWO76P.js";import{a as Hi,c as Ji}from"./chunk-GGPT7WIY.js";import{a as Xt}from"./chunk-SHMXCJ6Q.js";import{a as Bi,b as ji,c as Li,d as Qi,e as Ui,f as je}from"./chunk-QCXWKQ7Z.js";import"./chunk-23PJKOTU.js";import{a as Ri}from"./chunk-IQ4IMICT.js";import{a as $i}from"./chunk-ZH7IWOYT.js";import"./chunk-7ENDP7TZ.js";import{a as Gt}from"./chunk-B5VF422M.js";import{a as Ii}from"./chunk-L7RHCBKX.js";import{a as Yt}from"./chunk-ECOW7JD7.js";import{a as ki}from"./chunk-6PGUQ3CR.js";import{a as Vi}from"./chunk-JYNN4IZB.js";import"./chunk-2YDEXJE5.js";import"./chunk-NQX7EX5A.js";import"./chunk-EWZ63XSS.js";import"./chunk-P3KIIKY4.js";import{a as Pn}from"./chunk-OKIBXXRJ.js";import{c as wi,d as Ei}from"./chunk-6A45AGTK.js";import{a as qt,b as Oi,c as Ti}from"./chunk-TUQ4INQ4.js";import"./chunk-4R4W625N.js";import{a as Tt}from"./chunk-5M3JINH2.js";import{a as Ut}from"./chunk-YNDNTAII.js";import"./chunk-4SKJU2FQ.js";import{b as Mi}from"./chunk-THXV6YJP.js";import{a as Ni,b as Fi,c as Ai}from"./chunk-BKUC3UED.js";import"./chunk-O2QTP22K.js";import"./chunk-YRGGDRUH.js";import{a as Kt,b as zt}from"./chunk-OISKO6QJ.js";import"./chunk-BYXBJQAS.js";import"./chunk-NXXNEU5Q.js";import"./chunk-BYXBJQAS.js";import{b as Si}from"./chunk-Q4CKRRGM.js";import"./chunk-PIYM2FOP.js";import"./chunk-2OWHEMAL.js";import"./chunk-XZELBTQR.js";import{e as _t}from"./chunk-EMP32K7Q.js";import{a as Pi}from"./chunk-MPSML3FA.js";import{d as xi,e as Jt}from"./chunk-6G37ZXRX.js";import"./chunk-BXAYNP7A.js";import"./chunk-3RK6DDJD.js";import"./chunk-FP4HFB5J.js";import"./chunk-6CQ6XYJG.js";import"./chunk-YEDKRNXU.js";import"./chunk-TQZQYUFG.js";import"./chunk-7QWJJPNG.js";import"./chunk-VHAM2DWK.js";import{a as Ht}from"./chunk-JPXXXD26.js";import"./chunk-4QQTEPQT.js";import{a as pi,b as mi,c as di}from"./chunk-GINOZV6C.js";import"./chunk-CWITQVZH.js";import"./chunk-QHRP323Q.js";import"./chunk-WDQ4UKKY.js";import{a as ui,d as fi,f as gi,h as yi}from"./chunk-MFCXEITE.js";import{a as ct,c as pt}from"./chunk-MUJ6277G.js";import"./chunk-3LBZDIW2.js";import"./chunk-KTCV3KOE.js";import"./chunk-KZDE63UL.js";import{a as bi,b as Ci}from"./chunk-DV4MQXAE.js";import"./chunk-3GOO5E5D.js";import{a as si}from"./chunk-XMYLHF4C.js";import{A as hi,G as Di,q as ci,u as we,v as Ee,w as Ne,x as vi,z as _i}from"./chunk-CD3BSGAP.js";import{b as lt,c as st}from"./chunk-JOXTERIM.js";import{O as Be}from"./chunk-5OS5VELO.js";import{d as ht}from"./chunk-XYB3YDKL.js";import{a as ti,b as ni,c as ii}from"./chunk-GIKR6Y2K.js";import{a as Z,e as Te,f as $e,g as ne,l as Wt}from"./chunk-3YKVLHZG.js";import"./chunk-ZHY3BUQJ.js";import"./chunk-VFTGIP5A.js";import"./chunk-LE3BKIDY.js";import{a as Se}from"./chunk-2FWFPV5I.js";import"./chunk-EEEAUYZ6.js";import{E as ri,F as Oe,G as Ze,a as Ye,b as oi,c as De,h as le,l as de,o as Pe,r as ai,s as Xe}from"./chunk-RVXZOIFQ.js";import{a as li}from"./chunk-NOQM2VPB.js";import{a as M,d as xe}from"./chunk-ZZGSAFGO.js";import"./chunk-PZANARAM.js";import{$ as He,$a as l,$b as Vt,Ac as y,Bc as Ot,D as at,Db as ke,E as V,Fc as ge,H as $n,I as he,Ib as r,Jb as a,Ka as In,Kb as I,Lb as Q,M as Bn,Ma as Je,Mb as U,N as Sn,Nb as Kn,Ob as B,Od as ei,Q as jn,Qb as _,Qc as zn,Qd as jt,Rb as d,Rd as Lt,T as Ln,Td as Qt,Ub as Mn,Va as Un,Vd as ze,W as Pt,Wa as rt,Wc as qe,Y as te,Yc as Ke,Yd as se,Zb as At,Zc as me,_a as Wn,_b as kt,aa as ee,bc as Rt,bd as Yn,ca as Qn,cb as Hn,cc as $t,cd as Re,d as ve,db as f,dc as pe,e as nt,ec as m,ed as Xn,f as kn,fa as E,fb as Jn,fc as Y,ga as ue,gb as Ft,gc as j,gd as Me,hc as Ge,ja as ae,jc as H,jd as F,k as Ae,kb as N,kc as L,lc as J,ma as W,n as Vn,na as ce,o as it,ob as Gn,p as Rn,pc as Ve,qb as D,qc as Bt,rc as oe,sc as vt,sd as Zn,t as u,u as _e,v as xn,va as x,vb as c,wa as S,xb as Ct,y as ut,zb as qn,zc as g}from"./chunk-UXRO4UFY.js";import{a as T,b as $,d as An,j as bt}from"./chunk-7DCB7DB2.js";var q=class i{constructor(t,e){this.http=e;this.buyForm=t.group({NewOrderID:[""],Order:t.group({Att:[""],SupplierID:[""],Number:[""],Date:[new Date],ID:[M.GuidEmpty]}),Invoice:t.group({ID:[M.GuidEmpty],Due:[new Date],Tax:[0]}),Payment:t.group({ID:[M.GuidEmpty],Amount:[0],MethodID:[0],Code:[""],Note:[""],ImageUrl:[""]})})}outlet=new de({ID:"",Name:"Choose an Outlet"});dueDays=new de(0);deliveryEntityID=new de(M.GuidEmpty);noteForm=new de({Note:"",TagID:"",Currency:{ID:"",ExchangeRate:0,Symbol:""},InvoiceNumber:""});discountAndTaxForm=new de({Discount:{Amount:0,Percentage:0},Tax:{ID:"",CalculationTypeName:"",Rate:0,Label:"",Discontinue:!1}});buyForm;setPONumber(t){let e="";if(t.Seed){let n=t.Seed+"";for(;n.length<t.Digit;)n="0"+n;e=M.StringFormat(t.Prefix,n)}this.buyForm.controls.Order.controls.Number.setValue(e)}setDueDateBasedOnDaysDue(t){console.log(t);let e=this.invoiceDate,n=new Date(M.cloneObject(e));n.setDate(n.getDate()+t),this.buyForm.controls.Invoice.controls.Due.setValue(n)}get dueDate(){return this.buyForm.controls.Invoice.controls.Due.value}get invoiceDate(){return this.buyForm.controls.Order.controls.Date.value}setAmount(t){this.buyForm.controls.Payment.controls.Amount.setValue(t)}setPaymentMethodID(t){this.buyForm.controls.Payment.controls.MethodID.setValue(t)}setTaxAmount(t){this.buyForm.controls.Invoice.controls.Tax.setValue(t)}setNewOrderID(t){this.buyForm.controls.NewOrderID.setValue(t)}setTax(t){let e=T({},this.discountAndTaxForm.value.Discount);this.discountAndTaxForm.setValue({Discount:e,Tax:t})}setCurrency(t){let e=this.noteForm.value;this.noteForm.setValue($(T({},e),{Currency:t}))}setDeliveryEntityID(t){this.deliveryEntityID.setValue(t)}setdueDays(t){this.dueDays.setValue(t)}setBulkOrderForm(t){this.buyForm.controls.Order.setValue(t)}setBulkNoteForm(t){this.noteForm.setValue(t)}setBulkDiscountAndTaxForm(t){this.discountAndTaxForm.setValue(t)}setOutletForm(t){this.outlet.setValue(t)}setBulkInvoice(t){this.buyForm.controls.Invoice.setValue(T(T({},this.buyForm.controls.Invoice.value),t))}setBulkPayment(t){this.buyForm.controls.Payment.setValue(t)}resetOutletForm(){this.outlet.setValue({ID:"",Name:"Choose an Outlet"})}resetDueDaysForm(){this.dueDays.setValue(0)}resetDeliveryEntityID(){this.deliveryEntityID.setValue(M.GuidEmpty)}resetNoteForm(){this.noteForm.setValue($(T({},this.noteForm.value),{Note:"",TagID:"",InvoiceNumber:""}))}resetDiscountAndTaxForm(){let t=this.discountAndTaxForm.value;this.discountAndTaxForm.setValue($(T({},t),{Discount:{Amount:0,Percentage:0}}))}resetBuyForm(){this.buyForm.reset(),this.buyForm.controls.Invoice.controls.ID.setValue(M.GuidEmpty),this.buyForm.controls.Invoice.controls.Due.setValue(new Date),this.buyForm.controls.Order.controls.Date.setValue(new Date),this.buyForm.controls.Order.controls.ID.setValue(M.GuidEmpty),this.generateNumberOnNewTransaction()}generateNumberOnNewTransaction(){this.http.post("/API/Buy/GenerateNumber",{ID:this.outlet.value.ID}).subscribe(t=>{this.setNewOrderID(M.Guid_NewGuid()),this.buyForm.controls.Order.controls.Number.setValue(t.Number)})}static \u0275fac=function(e){return new(e||i)(W(ri),W(se))};static \u0275prov=ae({token:i,factory:i.\u0275fac,providedIn:"root"})};var ye=class i{entities$;appConfigJSON$;taxes$;currencies$;supplierPOTypes$;predefinedNotes$;denomination$;defaultDueDays$;constructor(t,e){let n=t.get("/API/Buy2/Load").pipe(E(o=>e.setCurrency(o.Currencies.find(s=>s.ID==o.AppConfigJSON.CoreDefaults.CurrencyID))),te(1));this.denomination$=n.pipe(u(o=>o.Denomination)),this.entities$=n.pipe(u(o=>o.Entities)),this.appConfigJSON$=n.pipe(u(o=>o.AppConfigJSON)),this.taxes$=n.pipe(u(o=>o.Taxes),te(1)),this.currencies$=n.pipe(u(o=>o.Currencies),te(1)),this.supplierPOTypes$=n.pipe(u(o=>o.SupplierPOTypes)),this.predefinedNotes$=n.pipe(u(o=>o.PredefinedNotes)),this.defaultDueDays$=n.pipe(u(o=>o.AppConfigJSON.ModuleBuy.PaymentDialog.DefaultDueDays),E(o=>e.setdueDays(o)),E(o=>e.setDueDateBasedOnDaysDue(o)))}updateDueDays(){this.defaultDueDays$.subscribe()}static \u0275fac=function(e){return new(e||i)(W(se),W(q))};static \u0275prov=ae({token:i,factory:i.\u0275fac,providedIn:"root"})};var mt=class i{returnInvoiceNumber=new de("");invoiceInfo$;constructor(t,e,n){let o=e.outlet.valueChanges.pipe(u(p=>p.ID),Z());this.invoiceInfo$=this.returnInvoiceNumber.valueChanges.pipe(V(p=>!!p),ue(o),ee(([p,O])=>t.post("/API/Buy/GetSupplierInvoiceRetur2",{EntityID:O,Number:p}).pipe(he(()=>Ae))),te(1),Z());let s=this.invoiceInfo$.pipe(u(p=>T({},p.Order)),E(p=>{let O={Att:p.Att,SupplierID:{Key:p.SupplierID,Value:p.SupplierName,OnSet:!0},Date:new Date,Number:e.buyForm.controls.Order.controls.Number.value,ID:M.GuidEmpty};e.setBulkOrderForm(O)}),Z()),P=this.invoiceInfo$.pipe(u(p=>p.Order),E(p=>{let O={Note:`Return #${p.Number}`,TagID:p.TypeID,Currency:{ID:p.CurrencyID,ExchangeRate:p.CurrencyRate,Symbol:p.CurrencySymbol??"$"},InvoiceNumber:p.Number};e.setBulkNoteForm(O)}),Z()),v=this.invoiceInfo$.pipe(u(p=>p.Order),ue(n.taxes$),u(([p,O])=>$(T({},p),{Tax:O.find(G=>G.ID===p.TaxTypeID)})),E(p=>{let O={Discount:{Amount:p.DiscountAmount,Percentage:p.Discount},Tax:{ID:p.TaxTypeID,Rate:p.Tax?.Rate,CalculationTypeName:p.Tax?.CalculationTypeName,Label:p.Tax?.Label,Discontinue:!p.Tax?.Label}};e.setBulkDiscountAndTaxForm(O)}),Z()),R=this.invoiceInfo$.pipe(u(p=>p.DeliveryEntityID),E(p=>e.setDeliveryEntityID(p)),Z()),K=this.invoiceInfo$.pipe(u(p=>p.Invoice),E(p=>{let O={ID:p.ID,Tax:p.Tax};e.setBulkInvoice(O)}),Z()),h=this.invoiceInfo$.pipe(u(p=>p.Payment),E(p=>{let O={ID:M.GuidEmpty,Amount:p.Amount,MethodID:p.MethodID,Note:p.Note,Code:p.Code,ImageUrl:p.ImageUrl};e.setBulkPayment(O)}),Z());_e(s,P,v,R,K,h).pipe(Z()).subscribe()}static \u0275fac=function(e){return new(e||i)(W(se),W(q),W(ye))};static \u0275prov=ae({token:i,factory:i.\u0275fac,providedIn:"root"})};var ie=class i{constructor(t,e,n,o){this.matDialog=o;let s=e.outlet.valueChanges.pipe(u(p=>p.ID));this.addVariantThroughSerial$=this._addVariantThroughSerial.asObservable().pipe(ue(s),ee(([p,O])=>t.get(Be.GetVariantBySerial,[{key:"Serial",value:p},{key:"EntityID",value:O}]).pipe(he(()=>Ae))),u(p=>this.setUnitPrice(p)),u(p=>$(T({},p),{Quantity:1,Total:p.UnitPrice,VariantID:p.ID})),u(p=>({action:"addAsSerial",variant:p})));let P=this.variantAutocomplete.valueChanges.pipe(V(p=>M.IsNotEmpty(p)&&p.type=="Code"),u(p=>p.str),ue(s),ee(([p,O])=>t.get(Be.GetVariantByCode,[{key:"Code",value:p},{key:"EntityID",value:O},{key:"Promotion",value:!0}]).pipe(he(()=>Ae))),u(p=>this.setUnitPrice(p)),u(p=>$(T({},p),{Quantity:1,Total:p.UnitPrice*((100-p.PriceDiscount)/100),Discount:p.PriceDiscount,VariantID:p.ID}))),v=this.variantAutocomplete.valueChanges.pipe(V(p=>M.IsNotEmpty(p)&&p.type=="ID"),u(p=>p.str)),R=this.variantQuickKey.valueChanges,K=at(v,R).pipe(ue(s),ee(([p,O])=>t.get(Be.GetVariantByID,[{key:"ID",value:p},{key:"EntityID",value:O}]).pipe(he(()=>Ae))),u(p=>this.setUnitPrice(p)),u(p=>$(T({},p),{Quantity:1,Total:p.UnitPrice*((100-p.OrderPriceDiscount)/100),Discount:p.OrderPriceDiscount,VariantID:p.ID}))),h=at(K,P).pipe(E(p=>{p.CategoryTypeID===1&&this.toastr.info(`${p.Name} is sellable only.`,Se.Info)}),V(p=>p.CategoryTypeID!==1),u(p=>({action:"add",variant:p})),E(()=>{this.cartDisplayRef&&setTimeout(()=>{let p=this.cartDisplayRef.nativeElement.scrollHeight;this.cartDisplayRef.nativeElement.scrollTop=p},1)})),A=n.invoiceInfo$.pipe(u(p=>({action:"returnInvoice",variants:p.Items.map(O=>$(T({},O.Variant),{Quantity:O.Quantity,Total:O.Total,UnitPrice:O.UnitPrice,Discount:O.Discount,Serial:O.Serial,ID:O.ID,DiscountAmount:O.DiscountAmount,VariantID:O.VariantID,UnitQuantity:O.UnitQuantity}))})));this.cart$=at(h,A,this.deleteVariant$,this.dragDropCart$,this.returnCart$,this.updateVariant$,this.returnVariant$,this.purchaseVariant$,this.clearCart$,this.onEditForm$,this.addVariantThroughSerial$,this.addVariant$,this.onUploadCart$,this.listenRFID$).pipe(Pt((p,O)=>{let G=[...p],X=[],b=O.action;if(b=="add"){let C=O.variant;X=!!G.find(k=>k.VariantID==C.ID)?G.map(k=>k.VariantID==C.ID?$(T({},k),{Quantity:k.Quantity+1,Total:k.Total+k.UnitPrice}):k):[...G,C]}else if(b=="returnInvoice"||b=="onEditForm")X=O.variants;else if(b=="delete"){let C=O.index;X=G.filter((w,k)=>k!=C)}else if(b=="sort"){let C=O.ev;X=G,ui(X,C.previousIndex,C.currentIndex)}else if(b=="returnCart")X=G.map(C=>$(T({},C),{Quantity:-Math.abs(C.Quantity),Total:-Math.abs(C.Total)}));else if(b=="update"){let C=O.index;X=G.map((w,k)=>k==C?O.variant:w)}else if(b=="returnVariant"){let C=O.index;X=G.map((w,k)=>k==C?$(T({},w),{Quantity:-Math.abs(w.Quantity),Total:-Math.abs(w.Total)}):w)}else if(b=="purchaseVariant"){let C=O.index;X=G.map((w,k)=>k==C?$(T({},w),{Quantity:Math.abs(w.Quantity),Total:Math.abs(w.Total)}):w)}else if(b=="clearCart")X=[];else if(b=="addAsSerial"){let C=$(T({},O.variant),{Serial:[{Number:O.variant.Serial.Number,Quantity:1,ExpiryDate:O.variant.Serial.ExpiryDate}]});if(!!G.find(k=>k.ID==C.ID)){let k=C.Serial[0],Ce=G.find(fe=>fe.ID==C.ID),Nt=!!Ce.Serial.find(fe=>fe.Number==k.Number)?[...Ce.Serial].map(fe=>fe.Number==k.Number?$(T({},fe),{Quantity:fe.Quantity+1}):fe):[...Ce.Serial,k];X=G.map(fe=>fe.ID==C.ID?$(T({},fe),{Quantity:fe.Quantity+1,Total:fe.Total+fe.UnitPrice,Serial:Nt}):fe)}else X=[...G,$(T({},C),{Quantity:1,Total:C.UnitPrice})]}else if(b=="uploadCart")X=[...G,...O.variants];else if(b=="addNewRow"){let C=O.variant;X=[...G,C]}else if(b=="rfid"){let C=O.variants;Object.keys(C).forEach(w=>{if(C.hasOwnProperty(w)){let k=C[w];if(k&&Object.keys(k.variant).length>0){let Ce=G.findIndex(yt=>yt.Code.toLowerCase()===w.toLowerCase());if(Ce!==-1){let yt=Number(k.count);G[Ce].Quantity+=yt,G[Ce].Total=+G[Ce].UnitPrice*+G[Ce].Quantity,delete C[w],X=[...G]}else{let yt=k.variant,Nt=Number(k.count),fe=this.setUnitPrice(yt),Yi=this.formatItemObject($(T({},fe),{Quantity:Nt,Total:+fe.UnitPrice*+Nt}));delete C[w],X=[...G,Yi]}}}})}return X},[]),He([]),te(1)),this.totalVariantOrdered$=this.cart$.pipe(u(p=>p.map(O=>O.Quantity)),u(p=>p.reduce((O,G)=>O+G,0)),He(0))}toastr=ce(ze);cartDisplayRef;variantAutocomplete=new de;variantQuickKey=new de;_listenRFID=new ve;listenRFID$=this._listenRFID.asObservable().pipe(u(t=>({action:"rfid",variants:t})));_deleteVariant=new ve;deleteVariant$=this._deleteVariant.asObservable().pipe(u(t=>({action:"delete",index:t})));_dragDropCart=new ve;dragDropCart$=this._dragDropCart.asObservable().pipe(u(t=>({action:"sort",ev:t})));_returnCart=new ve;returnCart$=this._returnCart.asObservable().pipe(u(()=>({action:"returnCart"})));_onEditForm=new nt(null);onEditForm$=this._onEditForm.asObservable().pipe(V(t=>!!t),u(t=>({action:"onEditForm",variants:t})));_clearCart=new ve;clearCart$=this._clearCart.asObservable().pipe(u(()=>({action:"clearCart"})));_updateVariant=new ve;updateVariant$=this._updateVariant.asObservable().pipe(u(t=>({action:"update",variant:t.variant,index:t.index})));_returnVariant=new ve;returnVariant$=this._returnVariant.asObservable().pipe(u(t=>({action:"returnVariant",index:t})));_purchaseVariant=new ve;purchaseVariant$=this._purchaseVariant.asObservable().pipe(u(t=>({action:"purchaseVariant",index:t})));_addVariant=new ve;addVariant$=this._addVariant.asObservable().pipe(u(t=>({action:"addNewRow",variant:t})));_onUploadCart=new ve;onUploadCart$=this._onUploadCart.asObservable().pipe(u(t=>({action:"uploadCart",variants:t})));cart$;totalVariantOrdered$;_addVariantThroughSerial=new ve;addVariantThroughSerial$;deleteVariant(t){this._deleteVariant.next(t)}dragDropCart(t){this._dragDropCart.next(t)}returnCart(){this._returnCart.next()}updateVariant(t,e){this._updateVariant.next({variant:t,index:e})}returnVariant(t){this._returnVariant.next(t)}purchaseVariant(t){this._purchaseVariant.next(t)}clearCart(){this._clearCart.next()}editForm(t){this._onEditForm.next(t)}addVariant(t){this._addVariant.next(t)}addVariantThroughSerial(t){this._addVariantThroughSerial.next(t)}uploadCart(t){this._onUploadCart.next(t)}setUnitPrice(t){let e=T({},t);return M.IsNotEmpty(t.OrderPrice)?e.UnitPrice=t.OrderPrice:e.UnitPrice=t.UnitCost,e}formatItemObject=t=>{let o=t,{ID:e}=o,n=An(o,["ID"]);return $(T({},n),{Quantity:n.Quantity??1,Total:n.Total??n.UnitPrice,VariantID:e})};addCartRFID(t){this._listenRFID.next(t)}static \u0275fac=function(e){return new(e||i)(W(se),W(q),W(mt),W(ne))};static \u0275prov=ae({token:i,factory:i.\u0275fac,providedIn:"root"})};var Le=class i{_isEdit=new ve;isEdit$;id$;isUnpaid$;dialog=ce(ne);constructor(t,e,n,o,s){let P=it(t.snapshot.queryParams);this.isEdit$=at(P.pipe(u(b=>!!b.ID)),this._isEdit.asObservable()).pipe(te(1)),this.id$=P.pipe(V(b=>b.ID),u(b=>b.ID));let v=this.id$.pipe(ee(b=>e.post("/api/Buy2/GetDataByID2",{ID:b})),te(1)),R=ut(()=>o.entities$).pipe(ee(b=>v.pipe(u(C=>[C.Order,b]))),E(([b,C])=>{let w={Att:b.Att,SupplierID:{Key:b.SupplierID,Value:b.SupplierName,OnSet:!0},Date:b.Date,Number:b.Number,ID:b.ID};n.setBulkOrderForm(w)}),E(([b,C])=>{let w=C.find(k=>k.ID==b.EntityID);n.setOutletForm(w)})),K=v.pipe(u(b=>b.Items),u(b=>b.map(C=>$(T({},C.Variant),{Quantity:C.Quantity,Total:C.Total,Note:C.Note,UnitPrice:C.UnitPrice,Discount:C.Discount,Serial:C.Serial,ID:C.ID,VariantID:C.VariantID,UnitQuantity:C.UnitQuantity,QtyRequested:C.QtyRequested,DiscountAmount:C.DiscountAmount}))),E(b=>s.editForm(b))),h=ut(()=>o.currencies$).pipe(ee(b=>v.pipe(u(C=>[C.Order,b,C.Invoice]))),u(([b,C,w])=>$(T({},b),{Number:b.Number!=w.Number?w.Number:b.Number,Currency:C.find(k=>k.ID===b.CurrencyID)})),E(b=>{let C={Note:b.Note,TagID:b.TypeID,Currency:T({},b.Currency),InvoiceNumber:b.Number};n.setBulkNoteForm(C)})),A=v.pipe(u(b=>b.DeliveryEntityID),E(b=>n.setDeliveryEntityID(b))),p=ut(()=>o.taxes$).pipe(ee(b=>v.pipe(u(C=>[C.Order,b]))),u(([b,C])=>$(T({},b),{Taxes:C})),E(b=>{let C=b.Taxes.find(k=>k.ID===b.TaxTypeID);C?.Bin&&this.dialog.open(qt,{id:"ModalInfo",data:{title:"Default Tax Discontinued",message:`
1
+ import{a as Wi}from"./chunk-6PPRM5TJ.js";import{a as Hi,c as Ji}from"./chunk-NUQK6FIB.js";import{a as Xt}from"./chunk-56IONBTZ.js";import{a as Bi,b as ji,c as Li,d as Qi,e as Ui,f as je}from"./chunk-P3HCTQ6S.js";import"./chunk-23PJKOTU.js";import{a as Ri}from"./chunk-GZSXRIAG.js";import{a as $i}from"./chunk-VQARO64W.js";import"./chunk-7ENDP7TZ.js";import{a as Gt}from"./chunk-B5VF422M.js";import{a as Ii}from"./chunk-L7RHCBKX.js";import{a as Yt}from"./chunk-ECOW7JD7.js";import{a as ki}from"./chunk-6PGUQ3CR.js";import{a as Vi}from"./chunk-SS5QJI73.js";import"./chunk-2YDEXJE5.js";import"./chunk-NQX7EX5A.js";import"./chunk-EWZ63XSS.js";import"./chunk-P3KIIKY4.js";import{a as Pn}from"./chunk-OKIBXXRJ.js";import{c as wi,d as Ei}from"./chunk-FCUQZ5CM.js";import{a as qt,b as Oi,c as Ti}from"./chunk-IMEZ6PAI.js";import"./chunk-ZIWHZGBX.js";import{a as Tt}from"./chunk-5M3JINH2.js";import{a as Ut}from"./chunk-YNDNTAII.js";import"./chunk-4SKJU2FQ.js";import{b as Mi}from"./chunk-R24JXSUW.js";import{a as Ni,b as Fi,c as Ai}from"./chunk-BKUC3UED.js";import"./chunk-O2QTP22K.js";import"./chunk-YRGGDRUH.js";import{a as Kt,b as zt}from"./chunk-OISKO6QJ.js";import"./chunk-BYXBJQAS.js";import"./chunk-PNMCM55F.js";import"./chunk-BYXBJQAS.js";import{b as Si}from"./chunk-Q4CKRRGM.js";import"./chunk-PIYM2FOP.js";import"./chunk-2OWHEMAL.js";import"./chunk-XZELBTQR.js";import{e as _t}from"./chunk-WGHPXYWX.js";import{a as Pi}from"./chunk-MPSML3FA.js";import{d as xi,e as Jt}from"./chunk-T3BPEHU7.js";import"./chunk-O7SRWU2B.js";import"./chunk-3RK6DDJD.js";import"./chunk-FP4HFB5J.js";import"./chunk-WP4MYTR2.js";import"./chunk-YEDKRNXU.js";import"./chunk-CMHBQ7I6.js";import"./chunk-7QWJJPNG.js";import"./chunk-VHAM2DWK.js";import{a as Ht}from"./chunk-JPXXXD26.js";import"./chunk-4QQTEPQT.js";import{a as pi,b as mi,c as di}from"./chunk-O6PVWRA5.js";import"./chunk-CWITQVZH.js";import"./chunk-QHRP323Q.js";import"./chunk-WDQ4UKKY.js";import{a as ui,d as fi,f as gi,h as yi}from"./chunk-MFCXEITE.js";import{a as ct,c as pt}from"./chunk-MUJ6277G.js";import"./chunk-3LBZDIW2.js";import"./chunk-KTCV3KOE.js";import"./chunk-KZDE63UL.js";import{a as bi,b as Ci}from"./chunk-7WT2CL3Y.js";import"./chunk-3GOO5E5D.js";import{a as si}from"./chunk-XMYLHF4C.js";import{A as hi,G as Di,q as ci,u as we,v as Ee,w as Ne,x as vi,z as _i}from"./chunk-IJ6QEGE5.js";import{b as lt,c as st}from"./chunk-JOXTERIM.js";import{O as Be}from"./chunk-FVKF2ZOS.js";import{d as ht}from"./chunk-XYB3YDKL.js";import{a as ti,b as ni,c as ii}from"./chunk-GIKR6Y2K.js";import{a as Z,e as Te,f as $e,g as ne,l as Wt}from"./chunk-3YKVLHZG.js";import"./chunk-ZHY3BUQJ.js";import"./chunk-VFTGIP5A.js";import"./chunk-LE3BKIDY.js";import{a as Se}from"./chunk-2FWFPV5I.js";import"./chunk-EEEAUYZ6.js";import{E as ri,F as Oe,G as Ze,a as Ye,b as oi,c as De,h as le,l as de,o as Pe,r as ai,s as Xe}from"./chunk-RVXZOIFQ.js";import{a as li}from"./chunk-ELIDPKL7.js";import{a as M,d as xe}from"./chunk-ZZGSAFGO.js";import"./chunk-JOEBVACW.js";import{$ as He,$a as l,$b as Vt,Ac as y,Bc as Ot,D as at,Db as ke,E as V,Fc as ge,H as $n,I as he,Ib as r,Jb as a,Ka as In,Kb as I,Lb as Q,M as Bn,Ma as Je,Mb as U,N as Sn,Nb as Kn,Ob as B,Od as ei,Q as jn,Qb as _,Qc as zn,Qd as jt,Rb as d,Rd as Lt,T as Ln,Td as Qt,Ub as Mn,Va as Un,Vd as ze,W as Pt,Wa as rt,Wc as qe,Y as te,Yc as Ke,Yd as se,Zb as At,Zc as me,_a as Wn,_b as kt,aa as ee,bc as Rt,bd as Yn,ca as Qn,cb as Hn,cc as $t,cd as Re,d as ve,db as f,dc as pe,e as nt,ec as m,ed as Xn,f as kn,fa as E,fb as Jn,fc as Y,ga as ue,gb as Ft,gc as j,gd as Me,hc as Ge,ja as ae,jc as H,jd as F,k as Ae,kb as N,kc as L,lc as J,ma as W,n as Vn,na as ce,o as it,ob as Gn,p as Rn,pc as Ve,qb as D,qc as Bt,rc as oe,sc as vt,sd as Zn,t as u,u as _e,v as xn,va as x,vb as c,wa as S,xb as Ct,y as ut,zb as qn,zc as g}from"./chunk-UXRO4UFY.js";import{a as T,b as $,d as An,j as bt}from"./chunk-7DCB7DB2.js";var q=class i{constructor(t,e){this.http=e;this.buyForm=t.group({NewOrderID:[""],Order:t.group({Att:[""],SupplierID:[""],Number:[""],Date:[new Date],ID:[M.GuidEmpty]}),Invoice:t.group({ID:[M.GuidEmpty],Due:[new Date],Tax:[0]}),Payment:t.group({ID:[M.GuidEmpty],Amount:[0],MethodID:[0],Code:[""],Note:[""],ImageUrl:[""]})})}outlet=new de({ID:"",Name:"Choose an Outlet"});dueDays=new de(0);deliveryEntityID=new de(M.GuidEmpty);noteForm=new de({Note:"",TagID:"",Currency:{ID:"",ExchangeRate:0,Symbol:""},InvoiceNumber:""});discountAndTaxForm=new de({Discount:{Amount:0,Percentage:0},Tax:{ID:"",CalculationTypeName:"",Rate:0,Label:"",Discontinue:!1}});buyForm;setPONumber(t){let e="";if(t.Seed){let n=t.Seed+"";for(;n.length<t.Digit;)n="0"+n;e=M.StringFormat(t.Prefix,n)}this.buyForm.controls.Order.controls.Number.setValue(e)}setDueDateBasedOnDaysDue(t){console.log(t);let e=this.invoiceDate,n=new Date(M.cloneObject(e));n.setDate(n.getDate()+t),this.buyForm.controls.Invoice.controls.Due.setValue(n)}get dueDate(){return this.buyForm.controls.Invoice.controls.Due.value}get invoiceDate(){return this.buyForm.controls.Order.controls.Date.value}setAmount(t){this.buyForm.controls.Payment.controls.Amount.setValue(t)}setPaymentMethodID(t){this.buyForm.controls.Payment.controls.MethodID.setValue(t)}setTaxAmount(t){this.buyForm.controls.Invoice.controls.Tax.setValue(t)}setNewOrderID(t){this.buyForm.controls.NewOrderID.setValue(t)}setTax(t){let e=T({},this.discountAndTaxForm.value.Discount);this.discountAndTaxForm.setValue({Discount:e,Tax:t})}setCurrency(t){let e=this.noteForm.value;this.noteForm.setValue($(T({},e),{Currency:t}))}setDeliveryEntityID(t){this.deliveryEntityID.setValue(t)}setdueDays(t){this.dueDays.setValue(t)}setBulkOrderForm(t){this.buyForm.controls.Order.setValue(t)}setBulkNoteForm(t){this.noteForm.setValue(t)}setBulkDiscountAndTaxForm(t){this.discountAndTaxForm.setValue(t)}setOutletForm(t){this.outlet.setValue(t)}setBulkInvoice(t){this.buyForm.controls.Invoice.setValue(T(T({},this.buyForm.controls.Invoice.value),t))}setBulkPayment(t){this.buyForm.controls.Payment.setValue(t)}resetOutletForm(){this.outlet.setValue({ID:"",Name:"Choose an Outlet"})}resetDueDaysForm(){this.dueDays.setValue(0)}resetDeliveryEntityID(){this.deliveryEntityID.setValue(M.GuidEmpty)}resetNoteForm(){this.noteForm.setValue($(T({},this.noteForm.value),{Note:"",TagID:"",InvoiceNumber:""}))}resetDiscountAndTaxForm(){let t=this.discountAndTaxForm.value;this.discountAndTaxForm.setValue($(T({},t),{Discount:{Amount:0,Percentage:0}}))}resetBuyForm(){this.buyForm.reset(),this.buyForm.controls.Invoice.controls.ID.setValue(M.GuidEmpty),this.buyForm.controls.Invoice.controls.Due.setValue(new Date),this.buyForm.controls.Order.controls.Date.setValue(new Date),this.buyForm.controls.Order.controls.ID.setValue(M.GuidEmpty),this.generateNumberOnNewTransaction()}generateNumberOnNewTransaction(){this.http.post("/API/Buy/GenerateNumber",{ID:this.outlet.value.ID}).subscribe(t=>{this.setNewOrderID(M.Guid_NewGuid()),this.buyForm.controls.Order.controls.Number.setValue(t.Number)})}static \u0275fac=function(e){return new(e||i)(W(ri),W(se))};static \u0275prov=ae({token:i,factory:i.\u0275fac,providedIn:"root"})};var ye=class i{entities$;appConfigJSON$;taxes$;currencies$;supplierPOTypes$;predefinedNotes$;denomination$;defaultDueDays$;constructor(t,e){let n=t.get("/API/Buy2/Load").pipe(E(o=>e.setCurrency(o.Currencies.find(s=>s.ID==o.AppConfigJSON.CoreDefaults.CurrencyID))),te(1));this.denomination$=n.pipe(u(o=>o.Denomination)),this.entities$=n.pipe(u(o=>o.Entities)),this.appConfigJSON$=n.pipe(u(o=>o.AppConfigJSON)),this.taxes$=n.pipe(u(o=>o.Taxes),te(1)),this.currencies$=n.pipe(u(o=>o.Currencies),te(1)),this.supplierPOTypes$=n.pipe(u(o=>o.SupplierPOTypes)),this.predefinedNotes$=n.pipe(u(o=>o.PredefinedNotes)),this.defaultDueDays$=n.pipe(u(o=>o.AppConfigJSON.ModuleBuy.PaymentDialog.DefaultDueDays),E(o=>e.setdueDays(o)),E(o=>e.setDueDateBasedOnDaysDue(o)))}updateDueDays(){this.defaultDueDays$.subscribe()}static \u0275fac=function(e){return new(e||i)(W(se),W(q))};static \u0275prov=ae({token:i,factory:i.\u0275fac,providedIn:"root"})};var mt=class i{returnInvoiceNumber=new de("");invoiceInfo$;constructor(t,e,n){let o=e.outlet.valueChanges.pipe(u(p=>p.ID),Z());this.invoiceInfo$=this.returnInvoiceNumber.valueChanges.pipe(V(p=>!!p),ue(o),ee(([p,O])=>t.post("/API/Buy/GetSupplierInvoiceRetur2",{EntityID:O,Number:p}).pipe(he(()=>Ae))),te(1),Z());let s=this.invoiceInfo$.pipe(u(p=>T({},p.Order)),E(p=>{let O={Att:p.Att,SupplierID:{Key:p.SupplierID,Value:p.SupplierName,OnSet:!0},Date:new Date,Number:e.buyForm.controls.Order.controls.Number.value,ID:M.GuidEmpty};e.setBulkOrderForm(O)}),Z()),P=this.invoiceInfo$.pipe(u(p=>p.Order),E(p=>{let O={Note:`Return #${p.Number}`,TagID:p.TypeID,Currency:{ID:p.CurrencyID,ExchangeRate:p.CurrencyRate,Symbol:p.CurrencySymbol??"$"},InvoiceNumber:p.Number};e.setBulkNoteForm(O)}),Z()),v=this.invoiceInfo$.pipe(u(p=>p.Order),ue(n.taxes$),u(([p,O])=>$(T({},p),{Tax:O.find(G=>G.ID===p.TaxTypeID)})),E(p=>{let O={Discount:{Amount:p.DiscountAmount,Percentage:p.Discount},Tax:{ID:p.TaxTypeID,Rate:p.Tax?.Rate,CalculationTypeName:p.Tax?.CalculationTypeName,Label:p.Tax?.Label,Discontinue:!p.Tax?.Label}};e.setBulkDiscountAndTaxForm(O)}),Z()),R=this.invoiceInfo$.pipe(u(p=>p.DeliveryEntityID),E(p=>e.setDeliveryEntityID(p)),Z()),K=this.invoiceInfo$.pipe(u(p=>p.Invoice),E(p=>{let O={ID:p.ID,Tax:p.Tax};e.setBulkInvoice(O)}),Z()),h=this.invoiceInfo$.pipe(u(p=>p.Payment),E(p=>{let O={ID:M.GuidEmpty,Amount:p.Amount,MethodID:p.MethodID,Note:p.Note,Code:p.Code,ImageUrl:p.ImageUrl};e.setBulkPayment(O)}),Z());_e(s,P,v,R,K,h).pipe(Z()).subscribe()}static \u0275fac=function(e){return new(e||i)(W(se),W(q),W(ye))};static \u0275prov=ae({token:i,factory:i.\u0275fac,providedIn:"root"})};var ie=class i{constructor(t,e,n,o){this.matDialog=o;let s=e.outlet.valueChanges.pipe(u(p=>p.ID));this.addVariantThroughSerial$=this._addVariantThroughSerial.asObservable().pipe(ue(s),ee(([p,O])=>t.get(Be.GetVariantBySerial,[{key:"Serial",value:p},{key:"EntityID",value:O}]).pipe(he(()=>Ae))),u(p=>this.setUnitPrice(p)),u(p=>$(T({},p),{Quantity:1,Total:p.UnitPrice,VariantID:p.ID})),u(p=>({action:"addAsSerial",variant:p})));let P=this.variantAutocomplete.valueChanges.pipe(V(p=>M.IsNotEmpty(p)&&p.type=="Code"),u(p=>p.str),ue(s),ee(([p,O])=>t.get(Be.GetVariantByCode,[{key:"Code",value:p},{key:"EntityID",value:O},{key:"Promotion",value:!0}]).pipe(he(()=>Ae))),u(p=>this.setUnitPrice(p)),u(p=>$(T({},p),{Quantity:1,Total:p.UnitPrice*((100-p.PriceDiscount)/100),Discount:p.PriceDiscount,VariantID:p.ID}))),v=this.variantAutocomplete.valueChanges.pipe(V(p=>M.IsNotEmpty(p)&&p.type=="ID"),u(p=>p.str)),R=this.variantQuickKey.valueChanges,K=at(v,R).pipe(ue(s),ee(([p,O])=>t.get(Be.GetVariantByID,[{key:"ID",value:p},{key:"EntityID",value:O}]).pipe(he(()=>Ae))),u(p=>this.setUnitPrice(p)),u(p=>$(T({},p),{Quantity:1,Total:p.UnitPrice*((100-p.OrderPriceDiscount)/100),Discount:p.OrderPriceDiscount,VariantID:p.ID}))),h=at(K,P).pipe(E(p=>{p.CategoryTypeID===1&&this.toastr.info(`${p.Name} is sellable only.`,Se.Info)}),V(p=>p.CategoryTypeID!==1),u(p=>({action:"add",variant:p})),E(()=>{this.cartDisplayRef&&setTimeout(()=>{let p=this.cartDisplayRef.nativeElement.scrollHeight;this.cartDisplayRef.nativeElement.scrollTop=p},1)})),A=n.invoiceInfo$.pipe(u(p=>({action:"returnInvoice",variants:p.Items.map(O=>$(T({},O.Variant),{Quantity:O.Quantity,Total:O.Total,UnitPrice:O.UnitPrice,Discount:O.Discount,Serial:O.Serial,ID:O.ID,DiscountAmount:O.DiscountAmount,VariantID:O.VariantID,UnitQuantity:O.UnitQuantity}))})));this.cart$=at(h,A,this.deleteVariant$,this.dragDropCart$,this.returnCart$,this.updateVariant$,this.returnVariant$,this.purchaseVariant$,this.clearCart$,this.onEditForm$,this.addVariantThroughSerial$,this.addVariant$,this.onUploadCart$,this.listenRFID$).pipe(Pt((p,O)=>{let G=[...p],X=[],b=O.action;if(b=="add"){let C=O.variant;X=!!G.find(k=>k.VariantID==C.ID)?G.map(k=>k.VariantID==C.ID?$(T({},k),{Quantity:k.Quantity+1,Total:k.Total+k.UnitPrice}):k):[...G,C]}else if(b=="returnInvoice"||b=="onEditForm")X=O.variants;else if(b=="delete"){let C=O.index;X=G.filter((w,k)=>k!=C)}else if(b=="sort"){let C=O.ev;X=G,ui(X,C.previousIndex,C.currentIndex)}else if(b=="returnCart")X=G.map(C=>$(T({},C),{Quantity:-Math.abs(C.Quantity),Total:-Math.abs(C.Total)}));else if(b=="update"){let C=O.index;X=G.map((w,k)=>k==C?O.variant:w)}else if(b=="returnVariant"){let C=O.index;X=G.map((w,k)=>k==C?$(T({},w),{Quantity:-Math.abs(w.Quantity),Total:-Math.abs(w.Total)}):w)}else if(b=="purchaseVariant"){let C=O.index;X=G.map((w,k)=>k==C?$(T({},w),{Quantity:Math.abs(w.Quantity),Total:Math.abs(w.Total)}):w)}else if(b=="clearCart")X=[];else if(b=="addAsSerial"){let C=$(T({},O.variant),{Serial:[{Number:O.variant.Serial.Number,Quantity:1,ExpiryDate:O.variant.Serial.ExpiryDate}]});if(!!G.find(k=>k.ID==C.ID)){let k=C.Serial[0],Ce=G.find(fe=>fe.ID==C.ID),Nt=!!Ce.Serial.find(fe=>fe.Number==k.Number)?[...Ce.Serial].map(fe=>fe.Number==k.Number?$(T({},fe),{Quantity:fe.Quantity+1}):fe):[...Ce.Serial,k];X=G.map(fe=>fe.ID==C.ID?$(T({},fe),{Quantity:fe.Quantity+1,Total:fe.Total+fe.UnitPrice,Serial:Nt}):fe)}else X=[...G,$(T({},C),{Quantity:1,Total:C.UnitPrice})]}else if(b=="uploadCart")X=[...G,...O.variants];else if(b=="addNewRow"){let C=O.variant;X=[...G,C]}else if(b=="rfid"){let C=O.variants;Object.keys(C).forEach(w=>{if(C.hasOwnProperty(w)){let k=C[w];if(k&&Object.keys(k.variant).length>0){let Ce=G.findIndex(yt=>yt.Code.toLowerCase()===w.toLowerCase());if(Ce!==-1){let yt=Number(k.count);G[Ce].Quantity+=yt,G[Ce].Total=+G[Ce].UnitPrice*+G[Ce].Quantity,delete C[w],X=[...G]}else{let yt=k.variant,Nt=Number(k.count),fe=this.setUnitPrice(yt),Yi=this.formatItemObject($(T({},fe),{Quantity:Nt,Total:+fe.UnitPrice*+Nt}));delete C[w],X=[...G,Yi]}}}})}return X},[]),He([]),te(1)),this.totalVariantOrdered$=this.cart$.pipe(u(p=>p.map(O=>O.Quantity)),u(p=>p.reduce((O,G)=>O+G,0)),He(0))}toastr=ce(ze);cartDisplayRef;variantAutocomplete=new de;variantQuickKey=new de;_listenRFID=new ve;listenRFID$=this._listenRFID.asObservable().pipe(u(t=>({action:"rfid",variants:t})));_deleteVariant=new ve;deleteVariant$=this._deleteVariant.asObservable().pipe(u(t=>({action:"delete",index:t})));_dragDropCart=new ve;dragDropCart$=this._dragDropCart.asObservable().pipe(u(t=>({action:"sort",ev:t})));_returnCart=new ve;returnCart$=this._returnCart.asObservable().pipe(u(()=>({action:"returnCart"})));_onEditForm=new nt(null);onEditForm$=this._onEditForm.asObservable().pipe(V(t=>!!t),u(t=>({action:"onEditForm",variants:t})));_clearCart=new ve;clearCart$=this._clearCart.asObservable().pipe(u(()=>({action:"clearCart"})));_updateVariant=new ve;updateVariant$=this._updateVariant.asObservable().pipe(u(t=>({action:"update",variant:t.variant,index:t.index})));_returnVariant=new ve;returnVariant$=this._returnVariant.asObservable().pipe(u(t=>({action:"returnVariant",index:t})));_purchaseVariant=new ve;purchaseVariant$=this._purchaseVariant.asObservable().pipe(u(t=>({action:"purchaseVariant",index:t})));_addVariant=new ve;addVariant$=this._addVariant.asObservable().pipe(u(t=>({action:"addNewRow",variant:t})));_onUploadCart=new ve;onUploadCart$=this._onUploadCart.asObservable().pipe(u(t=>({action:"uploadCart",variants:t})));cart$;totalVariantOrdered$;_addVariantThroughSerial=new ve;addVariantThroughSerial$;deleteVariant(t){this._deleteVariant.next(t)}dragDropCart(t){this._dragDropCart.next(t)}returnCart(){this._returnCart.next()}updateVariant(t,e){this._updateVariant.next({variant:t,index:e})}returnVariant(t){this._returnVariant.next(t)}purchaseVariant(t){this._purchaseVariant.next(t)}clearCart(){this._clearCart.next()}editForm(t){this._onEditForm.next(t)}addVariant(t){this._addVariant.next(t)}addVariantThroughSerial(t){this._addVariantThroughSerial.next(t)}uploadCart(t){this._onUploadCart.next(t)}setUnitPrice(t){let e=T({},t);return M.IsNotEmpty(t.OrderPrice)?e.UnitPrice=t.OrderPrice:e.UnitPrice=t.UnitCost,e}formatItemObject=t=>{let o=t,{ID:e}=o,n=An(o,["ID"]);return $(T({},n),{Quantity:n.Quantity??1,Total:n.Total??n.UnitPrice,VariantID:e})};addCartRFID(t){this._listenRFID.next(t)}static \u0275fac=function(e){return new(e||i)(W(se),W(q),W(mt),W(ne))};static \u0275prov=ae({token:i,factory:i.\u0275fac,providedIn:"root"})};var Le=class i{_isEdit=new ve;isEdit$;id$;isUnpaid$;dialog=ce(ne);constructor(t,e,n,o,s){let P=it(t.snapshot.queryParams);this.isEdit$=at(P.pipe(u(b=>!!b.ID)),this._isEdit.asObservable()).pipe(te(1)),this.id$=P.pipe(V(b=>b.ID),u(b=>b.ID));let v=this.id$.pipe(ee(b=>e.post("/api/Buy2/GetDataByID2",{ID:b})),te(1)),R=ut(()=>o.entities$).pipe(ee(b=>v.pipe(u(C=>[C.Order,b]))),E(([b,C])=>{let w={Att:b.Att,SupplierID:{Key:b.SupplierID,Value:b.SupplierName,OnSet:!0},Date:b.Date,Number:b.Number,ID:b.ID};n.setBulkOrderForm(w)}),E(([b,C])=>{let w=C.find(k=>k.ID==b.EntityID);n.setOutletForm(w)})),K=v.pipe(u(b=>b.Items),u(b=>b.map(C=>$(T({},C.Variant),{Quantity:C.Quantity,Total:C.Total,Note:C.Note,UnitPrice:C.UnitPrice,Discount:C.Discount,Serial:C.Serial,ID:C.ID,VariantID:C.VariantID,UnitQuantity:C.UnitQuantity,QtyRequested:C.QtyRequested,DiscountAmount:C.DiscountAmount}))),E(b=>s.editForm(b))),h=ut(()=>o.currencies$).pipe(ee(b=>v.pipe(u(C=>[C.Order,b,C.Invoice]))),u(([b,C,w])=>$(T({},b),{Number:b.Number!=w.Number?w.Number:b.Number,Currency:C.find(k=>k.ID===b.CurrencyID)})),E(b=>{let C={Note:b.Note,TagID:b.TypeID,Currency:T({},b.Currency),InvoiceNumber:b.Number};n.setBulkNoteForm(C)})),A=v.pipe(u(b=>b.DeliveryEntityID),E(b=>n.setDeliveryEntityID(b))),p=ut(()=>o.taxes$).pipe(ee(b=>v.pipe(u(C=>[C.Order,b]))),u(([b,C])=>$(T({},b),{Taxes:C})),E(b=>{let C=b.Taxes.find(k=>k.ID===b.TaxTypeID);C?.Bin&&this.dialog.open(qt,{id:"ModalInfo",data:{title:"Default Tax Discontinued",message:`
2
2
  <div class="d-flex justify-content-center my-4">
3
3
  <img class="img-2x" src="https://res.cloudinary.com/pos/image/upload/v1705387550/POS/Images/Cashier/globalerror.svg"
4
4
  alt="Empty Sales Order Tag" />