marketplacepos 5.43.13 → 5.44.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (129) hide show
  1. package/Marketplace/3rdpartylicenses.txt +41 -41
  2. package/Marketplace/{chunk-IVHM5DMM.js → chunk-22AHRDNQ.js} +1 -1
  3. package/Marketplace/{chunk-YSJSAVBS.js → chunk-2ODVHD2K.js} +1 -1
  4. package/Marketplace/{chunk-DRHWRRQV.js → chunk-35XX6SQT.js} +1 -1
  5. package/Marketplace/{chunk-5BSS4CVK.js → chunk-3OIE7ARG.js} +1 -1
  6. package/Marketplace/chunk-3VUDKIND.js +1 -0
  7. package/Marketplace/{chunk-QQXVBN22.js → chunk-4PDRBB73.js} +1 -1
  8. package/Marketplace/chunk-4YWSKMFD.js +1 -0
  9. package/Marketplace/{chunk-AJJSLBE3.js → chunk-55BJO7BI.js} +2 -2
  10. package/Marketplace/{chunk-WS4A4RPE.js → chunk-5GLSI4QU.js} +1 -1
  11. package/Marketplace/{chunk-G2YN5S5X.js → chunk-5JQJRPL3.js} +1 -1
  12. package/Marketplace/{chunk-CUEO37N7.js → chunk-5W7TCSDK.js} +1 -1
  13. package/Marketplace/{chunk-2GSWEJRP.js → chunk-64JGYG54.js} +1 -1
  14. package/Marketplace/{chunk-2IDDYNBR.js → chunk-6BIM4KEI.js} +1 -1
  15. package/Marketplace/{chunk-722SRHLY.js → chunk-6RKA4STM.js} +1 -1
  16. package/Marketplace/{chunk-QWHPQWPM.js → chunk-77JJJNRM.js} +1 -1
  17. package/Marketplace/{chunk-SRVGUGY2.js → chunk-AO46RPZ4.js} +1 -1
  18. package/Marketplace/{chunk-6FY74YFQ.js → chunk-B5V5KFQU.js} +1 -1
  19. package/Marketplace/{chunk-PXYBLGMN.js → chunk-BO7BG424.js} +1 -1
  20. package/Marketplace/{chunk-WIAQQWWF.js → chunk-BU5LUO3S.js} +1 -1
  21. package/Marketplace/chunk-C3VEI2IE.js +1 -0
  22. package/Marketplace/{chunk-3B2PNJWF.js → chunk-CCWNSX4Y.js} +1 -1
  23. package/Marketplace/{chunk-6W6DKFRE.js → chunk-CIAZIJGR.js} +3 -3
  24. package/Marketplace/{chunk-J2KWRDVH.js → chunk-CUB2QFUO.js} +1 -1
  25. package/Marketplace/{chunk-WPW3D4MQ.js → chunk-D6URDVES.js} +1 -1
  26. package/Marketplace/{chunk-POR3OF22.js → chunk-DHIDUIOD.js} +1 -1
  27. package/Marketplace/{chunk-O5LFGGB2.js → chunk-DL66NZ2A.js} +1 -1
  28. package/Marketplace/chunk-E2SXYIML.js +2 -0
  29. package/Marketplace/{chunk-L7K5HOBY.js → chunk-E4KNET2R.js} +1 -1
  30. package/Marketplace/{chunk-7ZXNQAAU.js → chunk-E4Z7OR75.js} +2 -2
  31. package/Marketplace/{chunk-GH57P6KF.js → chunk-EJWZFRMT.js} +1 -1
  32. package/Marketplace/{chunk-NEYMDA6P.js → chunk-ELE7BOLL.js} +1 -1
  33. package/Marketplace/{chunk-AG2REZBE.js → chunk-ENLYKIFW.js} +8 -8
  34. package/Marketplace/{chunk-B73M3AMU.js → chunk-EQIFZBRG.js} +1 -1
  35. package/Marketplace/chunk-EVXMYPWP.js +1 -0
  36. package/Marketplace/{chunk-E6U3KRK7.js → chunk-G3O7MWIB.js} +1 -1
  37. package/Marketplace/{chunk-624I4PEE.js → chunk-G5DA2OSB.js} +1 -1
  38. package/Marketplace/{chunk-7UHCDGAA.js → chunk-G7R7LUW4.js} +1 -1
  39. package/Marketplace/{chunk-2EOAYJGX.js → chunk-GCDQNJQN.js} +1 -1
  40. package/Marketplace/{chunk-G47XGOST.js → chunk-GIRXMYNI.js} +1 -1
  41. package/Marketplace/{chunk-5HO2IJ47.js → chunk-GRIUDEPO.js} +1 -1
  42. package/Marketplace/chunk-H3DIKLA5.js +1 -0
  43. package/Marketplace/chunk-HWHDJDQN.js +1 -0
  44. package/Marketplace/chunk-HZHUTC6E.js +1 -0
  45. package/Marketplace/{chunk-YCH6HHU3.js → chunk-IHNN4Q2N.js} +3 -3
  46. package/Marketplace/{chunk-H3J5OAIG.js → chunk-IIZDEGGW.js} +2 -2
  47. package/Marketplace/{chunk-N3P55TG2.js → chunk-IMEGV3MV.js} +1 -1
  48. package/Marketplace/{chunk-7PN4XLNE.js → chunk-IMK2JGZA.js} +1 -1
  49. package/Marketplace/{chunk-WHG5PPSE.js → chunk-JF4QOCAZ.js} +1 -1
  50. package/Marketplace/{chunk-TCS2Y6CC.js → chunk-JHYTM6OD.js} +1 -1
  51. package/Marketplace/{chunk-ZUEJZI4O.js → chunk-JIOSKHGT.js} +1 -1
  52. package/Marketplace/{chunk-MHCAI6KP.js → chunk-K5GEJ2GZ.js} +1 -1
  53. package/Marketplace/{chunk-7SVF5UPT.js → chunk-KALG6D6L.js} +1 -1
  54. package/Marketplace/{chunk-Z7LBV3BO.js → chunk-KGMQTWMX.js} +1 -1
  55. package/Marketplace/{chunk-U7TVLBC5.js → chunk-KIPJJIYU.js} +1 -1
  56. package/Marketplace/{chunk-M5JQ7BGW.js → chunk-L3FX4O3H.js} +6 -6
  57. package/Marketplace/{chunk-CRUPQQ56.js → chunk-LC6TXSYB.js} +1 -1
  58. package/Marketplace/{chunk-CROPN4YC.js → chunk-LDHQNVI5.js} +1 -1
  59. package/Marketplace/chunk-LFAU6HXM.js +1 -0
  60. package/Marketplace/{chunk-6NHTTVBK.js → chunk-LRCKOJEI.js} +1 -1
  61. package/Marketplace/{chunk-6G5WVJGA.js → chunk-LYBSI3ZX.js} +1 -1
  62. package/Marketplace/{chunk-LROLRGKE.js → chunk-LYZVX4EZ.js} +1 -1
  63. package/Marketplace/{chunk-YD5TUVFF.js → chunk-M6YFSBMG.js} +1 -1
  64. package/Marketplace/{chunk-6BAZYVHI.js → chunk-MDHPQWC7.js} +2 -2
  65. package/Marketplace/{chunk-3BT5DR3X.js → chunk-MH4SJTQX.js} +1 -1
  66. package/Marketplace/{chunk-2TRFYYCP.js → chunk-MKUH4R2N.js} +1 -1
  67. package/Marketplace/chunk-MRODDSR7.js +1 -0
  68. package/Marketplace/chunk-MS3ZBCON.js +157 -0
  69. package/Marketplace/{chunk-XBUZ27V4.js → chunk-NDSJ4AAU.js} +1 -1
  70. package/Marketplace/{chunk-GMVNN57A.js → chunk-NSS35UR3.js} +1 -1
  71. package/Marketplace/{chunk-OLCFJJOD.js → chunk-OFD3D5IO.js} +1 -1
  72. package/Marketplace/{chunk-3TDK2RMH.js → chunk-OFUTQWBX.js} +1 -1
  73. package/Marketplace/{chunk-RZU7PSKG.js → chunk-OPFENZ3W.js} +1 -1
  74. package/Marketplace/{chunk-3NMM37H7.js → chunk-P7NATRFC.js} +1 -1
  75. package/Marketplace/{chunk-IRLIWSK5.js → chunk-PANQ33RQ.js} +1 -1
  76. package/Marketplace/{chunk-JDIBETL5.js → chunk-PNITO7BE.js} +1 -1
  77. package/Marketplace/{chunk-EOZ2J2CF.js → chunk-PVPN53WE.js} +1 -1
  78. package/Marketplace/{chunk-PFB7XEYZ.js → chunk-QJJ2WFVX.js} +1 -1
  79. package/Marketplace/chunk-QYCOQS7D.js +2 -0
  80. package/Marketplace/{chunk-2YFZS6SG.js → chunk-RHCH74ZR.js} +1 -1
  81. package/Marketplace/chunk-RMAEWPJV.js +1 -0
  82. package/Marketplace/{chunk-VKMFDXJJ.js → chunk-SLI26GUH.js} +1 -1
  83. package/Marketplace/{chunk-C3HL4S2R.js → chunk-STPUGFHI.js} +1 -1
  84. package/Marketplace/{chunk-EZY2ATQQ.js → chunk-TPC5KHGH.js} +1 -1
  85. package/Marketplace/{chunk-LOBNKJGT.js → chunk-TPW56VWM.js} +1 -1
  86. package/Marketplace/chunk-TZQFN56G.js +1 -0
  87. package/Marketplace/{chunk-JILE74BG.js → chunk-UBXKO4QI.js} +1 -1
  88. package/Marketplace/{chunk-J7AN3ZQL.js → chunk-UCQKKX2L.js} +1 -1
  89. package/Marketplace/{chunk-CLER2MX6.js → chunk-UGVEAL7H.js} +3 -3
  90. package/Marketplace/{chunk-2OVYEC6Q.js → chunk-UUSBNUEH.js} +1 -1
  91. package/Marketplace/{chunk-ALSCWTAY.js → chunk-V4D6BB2N.js} +1 -1
  92. package/Marketplace/chunk-W3L5LPU5.js +1 -0
  93. package/Marketplace/{chunk-E6XWD6WX.js → chunk-W6FZQ6XT.js} +1 -1
  94. package/Marketplace/{chunk-OPXWL5G6.js → chunk-W7H6T326.js} +1 -1
  95. package/Marketplace/{chunk-MMVLDCF6.js → chunk-W7VYUPIP.js} +1 -1
  96. package/Marketplace/chunk-WKUTDZ7J.js +5 -0
  97. package/Marketplace/chunk-WY4BY2ID.js +3 -0
  98. package/Marketplace/chunk-X67M7TFE.js +1 -0
  99. package/Marketplace/{chunk-G2CMMGM2.js → chunk-X743YBE6.js} +1 -1
  100. package/Marketplace/chunk-XF4BVLTJ.js +1 -0
  101. package/Marketplace/chunk-XYEV5RMD.js +1 -0
  102. package/Marketplace/{chunk-BFU7VKO3.js → chunk-YM4TJJMM.js} +1 -1
  103. package/Marketplace/{chunk-CIIO2CJ6.js → chunk-YPWHTELF.js} +1 -1
  104. package/Marketplace/chunk-YRSF6N67.js +1 -0
  105. package/Marketplace/{chunk-DYWTLXMP.js → chunk-Z5GRNGHJ.js} +1 -1
  106. package/Marketplace/chunk-ZEYELO7U.js +1 -0
  107. package/Marketplace/chunk-ZMEMG7ZN.js +1 -0
  108. package/Marketplace/{chunk-L64EL5OU.js → chunk-ZQ5EGXEB.js} +2 -2
  109. package/Marketplace/{chunk-4JKDNUTX.js → chunk-ZXNM4AGN.js} +1 -1
  110. package/Marketplace/index.html +3 -3
  111. package/Marketplace/{main-2SUNMEPM.js → main-WUG4WUAT.js} +1 -1
  112. package/package.json +1 -1
  113. package/Marketplace/chunk-4B4NNOKK.js +0 -1
  114. package/Marketplace/chunk-56IX4GTG.js +0 -1
  115. package/Marketplace/chunk-67N4UGA5.js +0 -2
  116. package/Marketplace/chunk-7AQ244V7.js +0 -5
  117. package/Marketplace/chunk-DRMAONR7.js +0 -1
  118. package/Marketplace/chunk-GSZJGR7K.js +0 -2
  119. package/Marketplace/chunk-GVL2YXE5.js +0 -1
  120. package/Marketplace/chunk-HLOBDI4F.js +0 -2
  121. package/Marketplace/chunk-I7FTVK26.js +0 -1
  122. package/Marketplace/chunk-MY5ZX6JG.js +0 -1
  123. package/Marketplace/chunk-OOCYP2XG.js +0 -1
  124. package/Marketplace/chunk-Q3MVAL6O.js +0 -1
  125. package/Marketplace/chunk-QINGXOOA.js +0 -1
  126. package/Marketplace/chunk-SMUCMLEE.js +0 -1
  127. package/Marketplace/chunk-UG7VRDLB.js +0 -3
  128. package/Marketplace/chunk-V2RVHNCX.js +0 -1
  129. package/Marketplace/chunk-ZWBTWIGY.js +0 -1
@@ -30,32 +30,6 @@ Package: @dealpos-npm/ng-dealpos-library
30
30
  License: "ISC"
31
31
 
32
32
 
33
- --------------------------------------------------------------------------------
34
- Package: @angular/cdk
35
- License: "MIT"
36
-
37
- The MIT License
38
-
39
- Copyright (c) 2025 Google LLC.
40
-
41
- Permission is hereby granted, free of charge, to any person obtaining a copy
42
- of this software and associated documentation files (the "Software"), to deal
43
- in the Software without restriction, including without limitation the rights
44
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
45
- copies of the Software, and to permit persons to whom the Software is
46
- furnished to do so, subject to the following conditions:
47
-
48
- The above copyright notice and this permission notice shall be included in
49
- all copies or substantial portions of the Software.
50
-
51
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
52
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
53
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
54
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
55
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
56
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
57
- THE SOFTWARE.
58
-
59
33
  --------------------------------------------------------------------------------
60
34
  Package: primeng
61
35
  License: "SEE LICENSE IN LICENSE.md"
@@ -138,6 +112,32 @@ The term “Software” includes all source and object code, in whole and/or par
138
112
  9. **Indemnification:** Licensee hereby warrants to hold Licensor harmless and indemnify Licensor for any lawsuit brought against it in regards to Licensee’s use of The Software in means that violate, breach or otherwise circumvent this license, Licensor's intellectual property rights or Licensor's title in The Software. Licensor shall promptly notify Licensee in case of such legal action and request Licensee’s consent prior to any settlement in relation to such lawsuit or claim.
139
113
  10. **Governing Law, Jurisdiction:** Licensee hereby agrees not to initiate class-action lawsuits against Licensor in relation to this license and to compensate Licensor for any legal fees, cost or attorney fees should any claim brought by Licensee against Licensor be denied, in part or in full.
140
114
 
115
+ --------------------------------------------------------------------------------
116
+ Package: @angular/cdk
117
+ License: "MIT"
118
+
119
+ The MIT License
120
+
121
+ Copyright (c) 2025 Google LLC.
122
+
123
+ Permission is hereby granted, free of charge, to any person obtaining a copy
124
+ of this software and associated documentation files (the "Software"), to deal
125
+ in the Software without restriction, including without limitation the rights
126
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
127
+ copies of the Software, and to permit persons to whom the Software is
128
+ furnished to do so, subject to the following conditions:
129
+
130
+ The above copyright notice and this permission notice shall be included in
131
+ all copies or substantial portions of the Software.
132
+
133
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
134
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
135
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
136
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
137
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
138
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
139
+ THE SOFTWARE.
140
+
141
141
  --------------------------------------------------------------------------------
142
142
  Package: moment
143
143
  License: "MIT"
@@ -471,6 +471,11 @@ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
471
471
  TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
472
472
  SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
473
473
 
474
+ --------------------------------------------------------------------------------
475
+ Package: @microsoft/signalr
476
+ License: "MIT"
477
+
478
+
474
479
  --------------------------------------------------------------------------------
475
480
  Package: firebase
476
481
  License: "Apache-2.0"
@@ -555,21 +560,6 @@ Package: @firebase/auth-compat
555
560
  License: "Apache-2.0"
556
561
 
557
562
 
558
- --------------------------------------------------------------------------------
559
- Package: @ng-select/ng-select
560
- License: "MIT"
561
-
562
-
563
- --------------------------------------------------------------------------------
564
- Package: ngx-permissions
565
- License: "MIT"
566
-
567
-
568
- --------------------------------------------------------------------------------
569
- Package: @microsoft/signalr
570
- License: "MIT"
571
-
572
-
573
563
  --------------------------------------------------------------------------------
574
564
  Package: ngx-toastr
575
565
  License: "MIT"
@@ -596,6 +586,11 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
596
586
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
597
587
  SOFTWARE.
598
588
 
589
+ --------------------------------------------------------------------------------
590
+ Package: @ng-select/ng-select
591
+ License: "MIT"
592
+
593
+
599
594
  --------------------------------------------------------------------------------
600
595
  Package: @angular/forms
601
596
  License: "MIT"
@@ -648,6 +643,11 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
648
643
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
649
644
  THE SOFTWARE.
650
645
 
646
+ --------------------------------------------------------------------------------
647
+ Package: ngx-permissions
648
+ License: "MIT"
649
+
650
+
651
651
  --------------------------------------------------------------------------------
652
652
  Package: @angular/common
653
653
  License: "MIT"
@@ -1 +1 @@
1
- import{a as Z,b as ee,c as te,d as oe,e as ie,f as ne}from"./chunk-VIMB2VWB.js";import{a as R}from"./chunk-EZY2ATQQ.js";import"./chunk-B5VBBEEN.js";import"./chunk-E3ROEHBW.js";import"./chunk-AYPY47VM.js";import"./chunk-SM3P57SO.js";import{a as T}from"./chunk-UMP6ZMEJ.js";import{a as X,b as Y}from"./chunk-PAEIUO2F.js";import"./chunk-OZ7LWNOK.js";import"./chunk-ECRWEMEV.js";import"./chunk-LZCEM2PC.js";import"./chunk-5HO2IJ47.js";import{b as J,c as K}from"./chunk-SWQXSJ7O.js";import{b as H}from"./chunk-JXSBFTQM.js";import"./chunk-K5XRGNWG.js";import{m as Q,n as W}from"./chunk-CLER2MX6.js";import"./chunk-6QYD6NIJ.js";import"./chunk-ATZ475FN.js";import"./chunk-YCH6HHU3.js";import"./chunk-B73M3AMU.js";import{E as q,G as U,H as V,J as z,j as B,n as j}from"./chunk-M2FCTYGU.js";import{$c as N,Gb as E,Gc as d,Hc as k,Ic as O,Mb as u,Nc as F,Oc as $,Pc as g,Qc as L,Sc as S,Yb as s,aa as I,ac as G,ad as A,dc as _,ec as b,gc as h,hc as v,ic as r,jc as a,kc as f,lc as C,mc as y,oc as w,pa as m,rb as l,tc as M,uc as c,v as x,ya as P,za as D}from"./chunk-B7KTCPKC.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";var re=t=>({ID:t}),ae=t=>({"border-end-0":t});function le(t,p){if(t&1){let e=w();C(0),r(1,"button",11),M("click",function(){P(e);let n=c(),o=g(0);return D(n.onDeleteGroup(o==null?null:o.id))}),f(2,"i",12),d(3," Delete "),a(),y()}}function pe(t,p){if(t&1&&(C(0),r(1,"a",13),f(2,"i",14),d(3," Edit "),a(),y()),t&2){c();let e=g(0);l(),s("queryParams",S(1,re,e==null?null:e.id))}}function se(t,p){if(t&1&&(r(0,"div",21)(1,"div",22)(2,"p",23),d(3),a()()()),t&2){let e=c(),i=e.$implicit,n=e.$index,o=c(2).$implicit;G(S(4,ae,n!==o.Roles.length-1)),s("pTooltip",i.Description),l(3),O(" ",i.Name," ")}}function ce(t,p){if(t&1&&u(0,se,4,6,"div",20),t&2){let e=p.$implicit;_(e.checked?0:-1)}}function de(t,p){if(t&1&&(r(0,"div",15)(1,"div",16)(2,"div",17)(3,"span",18),d(4),a()()(),r(5,"div",19)(6,"div",15),h(7,ce,1,1,null,null,b),a()()()),t&2){let e=c().$implicit;l(4),k(e.Name),l(3),v(e==null?null:e.Roles)}}function me(t,p){if(t&1&&u(0,de,9,1,"div",15),t&2){let e=p.$implicit;_((e==null||e.Roles==null?null:e.Roles.length)>0?0:-1)}}function ue(t,p){if(t&1&&(r(0,"div",9),h(1,me,1,1,null,null,b),a()),t&2){c();let e=g(0);l(),v(e.groups)}}var Oe=(()=>{class t{constructor(){this.groupService=m(R),this.activatedRoute=m(q),this.toastr=m(H),this.route=m(U),this.group$=this.activatedRoute.queryParams.pipe(I(e=>this.groupService.getGroupsForm(e.ID).pipe(x(i=>(i.ID=e.ID,i)))),x(e=>({id:e.ID,name:e.Group.Name,groups:this.mapSelectedRoles(e.Options,e.RoleSelected),description:e.Group.Description}))),this.userEditRole=T.UserEdit,this.userDeleteRole=T.UserDelete}mapSelectedRoles(e,i){return e.map(n=>(n.Roles=n.Roles.map(o=>(o.checked=i.includes(o.ID),o)).filter(o=>o.checked),n.checked=n.Roles.some(o=>o.checked),n))}onDeleteGroup(e){confirm("Are you sure you want to delete this group?")&&this.groupService.deleteGroups([e]).subscribe(()=>{this.toastr.success("Group deleted successfully","Success"),this.route.navigate(["/menu/users/groups"])})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=E({type:t,selectors:[["app-group-info"]],features:[L([R])],decls:23,vars:11,consts:[[3,"headerTitle","hideSearchBox","hideSearchDropdown"],["role","group","aria-label","User Group Actions",1,"btn-group"],[4,"ngxPermissionsOnly"],[1,"container-fluid"],[1,"row","mt-8"],[1,"col-12"],["type","text","pInputText","","placeholder","Group Name","readonly","",1,"w-100","form-control","rounded-1",2,"padding-top","12px","padding-bottom","12px","font-size","14px",3,"value"],["value","0"],["value","1"],[1,"d-flex","flex-column","row-gap-6","ps-8"],["pInputTextarea","","rows","10","placeholder","Description","readonly","",1,"w-100","form-control","rounded-1",3,"value"],[1,"btn","btn-outline-secondary",3,"click"],[1,"fa","fa-trash","me-1"],["role","button","routerLink","/menu/users/groups/form",1,"btn","btn-outline-secondary",3,"queryParams"],[1,"fa","fa-edit","me-1"],[1,"row"],[1,"col-2","border","d-flex","align-items-center","justify-content-between","border-end-0",2,"height","40px","background","#f6f6f6"],[1,"d-flex","justify-content-center","w-100","align-items-center","gap-4"],[1,"fs-5","w-100","text-center"],[1,"col"],["tooltipPosition","top",1,"col-3","border","p-0","bg-white",2,"height","40px",3,"class","pTooltip"],["tooltipPosition","top",1,"col-3","border","p-0","bg-white",2,"height","40px",3,"pTooltip"],[1,"d-flex","h-100","align-items-center","gap-4","px-2"],[1,"fs-6","text-dark",2,"margin","0"]],template:function(i,n){if(i&1&&(F(0),N(1,"async"),r(2,"mainpanel",0)(3,"actions")(4,"div",1),u(5,le,4,0,"ng-container",2)(6,pe,4,3,"ng-container",2),a()(),r(7,"content")(8,"div",3)(9,"div",4)(10,"div",5),f(11,"input",6),a()(),r(12,"p-tabs",7)(13,"p-tablist")(14,"p-tab",7),d(15,"Permission"),a(),r(16,"p-tab",8),d(17,"Description"),a()(),r(18,"p-tabpanels")(19,"p-tabpanel",7),u(20,ue,3,0,"div",9),a(),r(21,"p-tabpanel",8),f(22,"textarea",10),a()()()()()()),i&2){let o=$(A(1,8,n.group$));l(2),s("headerTitle",(o==null?null:o.name)+" Info")("hideSearchBox",!0)("hideSearchDropdown",!0),l(3),s("ngxPermissionsOnly",n.userDeleteRole),l(),s("ngxPermissionsOnly",n.userEditRole),l(5),s("value",o==null?null:o.name),l(9),_(o?20:-1),l(2),s("value",o==null?null:o.description)}},dependencies:[j,B,W,Q,ne,ie,oe,te,Z,ee,Y,X,K,J,z,V],styles:["[_nghost-%COMP%] .p-tabs{--p-tabs-tab-active-color: #555555;--p-tabs-tab-color: #0976b4}[_nghost-%COMP%] .p-tabs .p-tabpanels{padding-left:0!important}[_nghost-%COMP%] .p-tabs .p-tablist-active-bar{background-color:#555!important}[_nghost-%COMP%] .p-panel .p-panel-header{display:none!important}[_nghost-%COMP%] .btn-outline-secondary{background-color:#fff;border-color:#ccc;color:#000}[_nghost-%COMP%] .btn-outline-secondary:hover{background-color:#f8f9fa;border-color:#b3b3b3;color:#000}"]})}}return t})();export{Oe as GroupInfoComponent};
1
+ import{a as Z,b as ee,c as te,d as oe,e as ie,f as ne}from"./chunk-VIMB2VWB.js";import{a as R}from"./chunk-TPC5KHGH.js";import"./chunk-B5VBBEEN.js";import"./chunk-E3ROEHBW.js";import"./chunk-AYPY47VM.js";import"./chunk-SM3P57SO.js";import{a as T}from"./chunk-UMP6ZMEJ.js";import{a as X,b as Y}from"./chunk-PAEIUO2F.js";import"./chunk-OZ7LWNOK.js";import"./chunk-ECRWEMEV.js";import"./chunk-LZCEM2PC.js";import"./chunk-GRIUDEPO.js";import{b as H}from"./chunk-JXSBFTQM.js";import"./chunk-K5XRGNWG.js";import{m as Q,n as W}from"./chunk-UGVEAL7H.js";import"./chunk-6QYD6NIJ.js";import"./chunk-ATZ475FN.js";import{b as J,c as K}from"./chunk-SWQXSJ7O.js";import"./chunk-IHNN4Q2N.js";import"./chunk-EQIFZBRG.js";import{E as q,G as U,H as V,J as z,j as B,n as j}from"./chunk-M2FCTYGU.js";import{$c as N,Gb as E,Gc as d,Hc as k,Ic as O,Mb as u,Nc as F,Oc as $,Pc as g,Qc as L,Sc as S,Yb as s,aa as I,ac as G,ad as A,dc as _,ec as b,gc as h,hc as v,ic as r,jc as a,kc as f,lc as C,mc as y,oc as w,pa as m,rb as l,tc as M,uc as c,v as x,ya as P,za as D}from"./chunk-B7KTCPKC.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";var re=t=>({ID:t}),ae=t=>({"border-end-0":t});function le(t,p){if(t&1){let e=w();C(0),r(1,"button",11),M("click",function(){P(e);let n=c(),o=g(0);return D(n.onDeleteGroup(o==null?null:o.id))}),f(2,"i",12),d(3," Delete "),a(),y()}}function pe(t,p){if(t&1&&(C(0),r(1,"a",13),f(2,"i",14),d(3," Edit "),a(),y()),t&2){c();let e=g(0);l(),s("queryParams",S(1,re,e==null?null:e.id))}}function se(t,p){if(t&1&&(r(0,"div",21)(1,"div",22)(2,"p",23),d(3),a()()()),t&2){let e=c(),i=e.$implicit,n=e.$index,o=c(2).$implicit;G(S(4,ae,n!==o.Roles.length-1)),s("pTooltip",i.Description),l(3),O(" ",i.Name," ")}}function ce(t,p){if(t&1&&u(0,se,4,6,"div",20),t&2){let e=p.$implicit;_(e.checked?0:-1)}}function de(t,p){if(t&1&&(r(0,"div",15)(1,"div",16)(2,"div",17)(3,"span",18),d(4),a()()(),r(5,"div",19)(6,"div",15),h(7,ce,1,1,null,null,b),a()()()),t&2){let e=c().$implicit;l(4),k(e.Name),l(3),v(e==null?null:e.Roles)}}function me(t,p){if(t&1&&u(0,de,9,1,"div",15),t&2){let e=p.$implicit;_((e==null||e.Roles==null?null:e.Roles.length)>0?0:-1)}}function ue(t,p){if(t&1&&(r(0,"div",9),h(1,me,1,1,null,null,b),a()),t&2){c();let e=g(0);l(),v(e.groups)}}var Oe=(()=>{class t{constructor(){this.groupService=m(R),this.activatedRoute=m(q),this.toastr=m(H),this.route=m(U),this.group$=this.activatedRoute.queryParams.pipe(I(e=>this.groupService.getGroupsForm(e.ID).pipe(x(i=>(i.ID=e.ID,i)))),x(e=>({id:e.ID,name:e.Group.Name,groups:this.mapSelectedRoles(e.Options,e.RoleSelected),description:e.Group.Description}))),this.userEditRole=T.UserEdit,this.userDeleteRole=T.UserDelete}mapSelectedRoles(e,i){return e.map(n=>(n.Roles=n.Roles.map(o=>(o.checked=i.includes(o.ID),o)).filter(o=>o.checked),n.checked=n.Roles.some(o=>o.checked),n))}onDeleteGroup(e){confirm("Are you sure you want to delete this group?")&&this.groupService.deleteGroups([e]).subscribe(()=>{this.toastr.success("Group deleted successfully","Success"),this.route.navigate(["/menu/users/groups"])})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=E({type:t,selectors:[["app-group-info"]],features:[L([R])],decls:23,vars:11,consts:[[3,"headerTitle","hideSearchBox","hideSearchDropdown"],["role","group","aria-label","User Group Actions",1,"btn-group"],[4,"ngxPermissionsOnly"],[1,"container-fluid"],[1,"row","mt-8"],[1,"col-12"],["type","text","pInputText","","placeholder","Group Name","readonly","",1,"w-100","form-control","rounded-1",2,"padding-top","12px","padding-bottom","12px","font-size","14px",3,"value"],["value","0"],["value","1"],[1,"d-flex","flex-column","row-gap-6","ps-8"],["pInputTextarea","","rows","10","placeholder","Description","readonly","",1,"w-100","form-control","rounded-1",3,"value"],[1,"btn","btn-outline-secondary",3,"click"],[1,"fa","fa-trash","me-1"],["role","button","routerLink","/menu/users/groups/form",1,"btn","btn-outline-secondary",3,"queryParams"],[1,"fa","fa-edit","me-1"],[1,"row"],[1,"col-2","border","d-flex","align-items-center","justify-content-between","border-end-0",2,"height","40px","background","#f6f6f6"],[1,"d-flex","justify-content-center","w-100","align-items-center","gap-4"],[1,"fs-5","w-100","text-center"],[1,"col"],["tooltipPosition","top",1,"col-3","border","p-0","bg-white",2,"height","40px",3,"class","pTooltip"],["tooltipPosition","top",1,"col-3","border","p-0","bg-white",2,"height","40px",3,"pTooltip"],[1,"d-flex","h-100","align-items-center","gap-4","px-2"],[1,"fs-6","text-dark",2,"margin","0"]],template:function(i,n){if(i&1&&(F(0),N(1,"async"),r(2,"mainpanel",0)(3,"actions")(4,"div",1),u(5,le,4,0,"ng-container",2)(6,pe,4,3,"ng-container",2),a()(),r(7,"content")(8,"div",3)(9,"div",4)(10,"div",5),f(11,"input",6),a()(),r(12,"p-tabs",7)(13,"p-tablist")(14,"p-tab",7),d(15,"Permission"),a(),r(16,"p-tab",8),d(17,"Description"),a()(),r(18,"p-tabpanels")(19,"p-tabpanel",7),u(20,ue,3,0,"div",9),a(),r(21,"p-tabpanel",8),f(22,"textarea",10),a()()()()()()),i&2){let o=$(A(1,8,n.group$));l(2),s("headerTitle",(o==null?null:o.name)+" Info")("hideSearchBox",!0)("hideSearchDropdown",!0),l(3),s("ngxPermissionsOnly",n.userDeleteRole),l(),s("ngxPermissionsOnly",n.userEditRole),l(5),s("value",o==null?null:o.name),l(9),_(o?20:-1),l(2),s("value",o==null?null:o.description)}},dependencies:[j,B,W,Q,ne,ie,oe,te,Z,ee,Y,X,K,J,z,V],styles:["[_nghost-%COMP%] .p-tabs{--p-tabs-tab-active-color: #555555;--p-tabs-tab-color: #0976b4}[_nghost-%COMP%] .p-tabs .p-tabpanels{padding-left:0!important}[_nghost-%COMP%] .p-tabs .p-tablist-active-bar{background-color:#555!important}[_nghost-%COMP%] .p-panel .p-panel-header{display:none!important}[_nghost-%COMP%] .btn-outline-secondary{background-color:#fff;border-color:#ccc;color:#000}[_nghost-%COMP%] .btn-outline-secondary:hover{background-color:#f8f9fa;border-color:#b3b3b3;color:#000}"]})}}return t})();export{Oe as GroupInfoComponent};
@@ -1,2 +1,2 @@
1
- import{a as de}from"./chunk-O5LFGGB2.js";import{a as Z,b,c as ee,d as V,f as ae,g as ne,h as Y,i as re,j as oe,o as u}from"./chunk-M5JQ7BGW.js";import{b as ie,d as S}from"./chunk-L7K5HOBY.js";import{a as te,b as H}from"./chunk-H3J5OAIG.js";import{a as x}from"./chunk-J2KWRDVH.js";import{a as Q,b as W,f as X}from"./chunk-7SVF5UPT.js";import{a as K}from"./chunk-ACIMXBIC.js";import{g as I,j as J,n as T}from"./chunk-M2FCTYGU.js";import{$c as U,Fc as M,Gb as D,Gc as N,Hc as R,Ka as L,Mb as g,Qc as w,Xb as P,Yb as o,Zb as v,ad as q,ca as F,f as B,g as E,ic as d,ja as O,jc as s,jd as G,kc as C,lc as j,mc as $,oc as k,rb as r,tc as f,uc as y,xa as A,xb as p,xc as z,ya as l,za as c}from"./chunk-B7KTCPKC.js";var ce=["class","component ts"];function pe(a,_){if(a&1){let e=k();d(0,"button",3),f("click",function(){l(e);let i=y(2);return c(i.todayClicked())}),C(1,"i",4),s()}}function se(a,_){if(a&1){let e=k();d(0,"button",5),f("click",function(){l(e);let i=y(2);return c(i.clearClicked())}),C(1,"i",6),s()}}function me(a,_){if(a&1&&(j(0),g(1,pe,2,0,"button",1)(2,se,2,0,"button",2),$()),a&2){let e=_.ngIf;r(),o("ngIf",!e.hideBtnToday),r(),o("ngIf",!e.hideBtnClear)}}function fe(a,_){if(a&1&&(d(0,"mat-label")(1,"span"),N(2),s()()),a&2){let e=y();r(2),R(e.placeholder)}}var le=(()=>{class a{constructor(){this._calendarHeaderConfig=new E({hideBtnClear:!1,hideBtnToday:!1}),this.calendarConfig=this._calendarHeaderConfig.value}setHeaderConfig(e){this._calendarHeaderConfig.next(e)}getHeaderConfig$(){return this._calendarHeaderConfig.asObservable()}static{this.\u0275fac=function(t){return new(t||a)}}static{this.\u0275prov=O({token:a,factory:a.\u0275fac,providedIn:"root"})}}return a})(),ue=(()=>{class a{constructor(e,t,i,n,m){this._datePicker=e,this._calendar=t,this._dateAdapter=i,this.calendarService=n,this._destroyed=new B,t.stateChanges.pipe(F(this._destroyed)).subscribe(h=>m.markForCheck()),this.calendarConfig$=this.calendarService.getHeaderConfig$()}todayClicked(){this._calendar.activeDate=this._dateAdapter.today(),this._datePicker.select(this._dateAdapter.today()),this._datePicker.close()}clearClicked(){this._datePicker.select(null),this._datePicker.close()}ngOnChanges(e){this._calendar.ngOnChanges(e)}ngOnDestroy(){this._destroyed.next(),this._destroyed.complete()}static{this.\u0275fac=function(t){return new(t||a)(p(Y),p(ne),p(b),p(le),p(G))}}static{this.\u0275cmp=D({type:a,selectors:[["POS-DatepickerHeader",8,"component","ts"]],features:[w([u]),A],attrs:ce,decls:3,vars:3,consts:[[4,"ngIf"],["mat-icon-button","","title","Today",3,"click",4,"ngIf"],["mat-icon-button","","title","Clear",3,"click",4,"ngIf"],["mat-icon-button","","title","Today",3,"click"],[1,"far","fa-clock",2,"font-size","18px"],["mat-icon-button","","title","Clear",3,"click"],[1,"far","fa-xmark-circle",2,"font-size","18px"]],template:function(t,i){t&1&&(d(0,"mat-calendar-header"),g(1,me,3,2,"ng-container",0),U(2,"async"),s()),t&2&&(r(),o("ngIf",q(2,1,i.calendarConfig$)))},dependencies:[T,I,J,S,ie,V,u,ae,x,H],encapsulation:2})}}return a})(),_e={parse:{dateInput:"DD MMM YYYY"},display:{dateInput:"DD MMM YYYY",monthYearLabel:"MMM YYYY",dateA11yLabel:"LL",monthYearA11yLabel:"MMMM YYYY"}},Le=(()=>{class a{set hidelClearBtn(e){this.calendarService.setHeaderConfig({hideBtnClear:e,hideBtnToday:this.calendarService.calendarConfig.hideBtnToday})}change(e){let t=null;e&&(t=e.toDate(),t?.setHours(0,0,0,0)),this.dateChange.emit(t)}constructor(e){this.calendarService=e,this.headerComponent=ue,this.data_cy="",this.placeholder="",this.appearance="outline",this.width="",this.isFloatingLabel=!0,this.date="",this.disabled=!1,this.readOnly=!1,this.dateChange=new L,this.minDate=K.MinDate,this.displayToggle=!0}onOpenDatepicker(){let e=document.getElementById("dropdown-filter");if(e){var t=new bootstrap.Dropdown(e);t&&(t._config.autoClose="inside")}}onCloseDatepicker(){let e=document.getElementById("dropdown-filter");if(e){var t=new bootstrap.Dropdown(e);t&&(t._config.autoClose="outside")}}ngOnDestroy(){this.calendarService.setHeaderConfig({hideBtnClear:!1,hideBtnToday:!1})}static{this.\u0275fac=function(t){return new(t||a)(p(le))}}static{this.\u0275cmp=D({type:a,selectors:[["datepicker"]],inputs:{data_cy:"data_cy",placeholder:"placeholder",displayToggle:"displayToggle",appearance:"appearance",width:"width",isFloatingLabel:"isFloatingLabel",date:"date",disabled:"disabled",readOnly:"readOnly",minDateValidation:"minDateValidation",maxDateValidation:"maxDateValidation",hidelClearBtn:"hidelClearBtn"},outputs:{dateChange:"dateChange"},features:[w([{provide:b,useClass:de,deps:[Z]},{provide:ee,useValue:_e},u])],decls:6,vars:16,consts:[["picker1",""],[1,"datepicker",3,"appearance"],[4,"ngIf"],["matInput","",3,"dateChange","click","matDatepicker","min","max","placeholder","value","disabled","readonly"],["matSuffix","",3,"for"],[3,"opened","closed","calendarHeaderComponent"]],template:function(t,i){if(t&1){let n=k();d(0,"mat-form-field",1),g(1,fe,3,1,"mat-label",2),d(2,"input",3),f("dateChange",function(h){return l(n),c(i.change(h.value))})("click",function(){l(n);let h=M(5);return c(h.open())}),s(),C(3,"mat-datepicker-toggle",4),d(4,"mat-datepicker",5,0),f("opened",function(){return l(n),c(i.onOpenDatepicker())})("closed",function(){return l(n),c(i.onCloseDatepicker())}),s()()}if(t&2){let n=M(5);v("width",i.width||100,"%"),o("appearance",i.appearance),r(),o("ngIf",i.isFloatingLabel&&i.placeholder),r(),z("placeholder",i.placeholder||""),o("matDatepicker",n)("min",i.minDateValidation)("max",i.maxDateValidation)("value",i.date==i.minDate?null:i.date)("disabled",i.disabled)("readonly",i.readOnly),P("data-cy",i.data_cy),r(),v("display",i.displayToggle?"unset":"none"),o("for",n),r(),o("calendarHeaderComponent",i.headerComponent)}},dependencies:[T,I,S,V,u,Y,re,oe,x,X,Q,W,H,te],styles:[`.mat-mdc-form-field-disabled ::ng-deep .mat-form-field-appearance-outline{background-color:#e9ecef!important;opacity:1!important}.mat-mdc-form-field-disabled ::ng-deep .mat-form-field-appearance-outline input{color:#00000061!important}.datepicker .mat-mdc-text-field-wrapper.mdc-text-field--outlined .mat-mdc-form-field-infix{min-height:33px;padding-top:18px;padding-bottom:13px}.datepicker .mat-mdc-icon-button.mat-mdc-button-base{padding:0}.datepicker .mat-mdc-form-field-subscript-wrapper{display:none}.mat-calendar-controls .mat-mdc-icon-button.mat-mdc-button-base{padding:0!important}.mat-mdc-form-field .mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{top:28px!important;font-size:16px;color:#9da2a6}.mat-mdc-text-field-wrapper .mat-mdc-form-field-flex .mat-mdc-floating-label{top:23px!important;font-size:.875rem;color:#ccc}.mdc-text-field--filled:not(.mdc-text-field--disabled){background-color:#fff}
1
+ import{a as de}from"./chunk-DL66NZ2A.js";import{a as Z,b,c as ee,d as V,f as ae,g as ne,h as Y,i as re,j as oe,o as u}from"./chunk-L3FX4O3H.js";import{b as ie,d as S}from"./chunk-E4KNET2R.js";import{a as te,b as H}from"./chunk-IIZDEGGW.js";import{a as x}from"./chunk-CUB2QFUO.js";import{a as Q,b as W,f as X}from"./chunk-KALG6D6L.js";import{a as K}from"./chunk-ACIMXBIC.js";import{g as I,j as J,n as T}from"./chunk-M2FCTYGU.js";import{$c as U,Fc as M,Gb as D,Gc as N,Hc as R,Ka as L,Mb as g,Qc as w,Xb as P,Yb as o,Zb as v,ad as q,ca as F,f as B,g as E,ic as d,ja as O,jc as s,jd as G,kc as C,lc as j,mc as $,oc as k,rb as r,tc as f,uc as y,xa as A,xb as p,xc as z,ya as l,za as c}from"./chunk-B7KTCPKC.js";var ce=["class","component ts"];function pe(a,_){if(a&1){let e=k();d(0,"button",3),f("click",function(){l(e);let i=y(2);return c(i.todayClicked())}),C(1,"i",4),s()}}function se(a,_){if(a&1){let e=k();d(0,"button",5),f("click",function(){l(e);let i=y(2);return c(i.clearClicked())}),C(1,"i",6),s()}}function me(a,_){if(a&1&&(j(0),g(1,pe,2,0,"button",1)(2,se,2,0,"button",2),$()),a&2){let e=_.ngIf;r(),o("ngIf",!e.hideBtnToday),r(),o("ngIf",!e.hideBtnClear)}}function fe(a,_){if(a&1&&(d(0,"mat-label")(1,"span"),N(2),s()()),a&2){let e=y();r(2),R(e.placeholder)}}var le=(()=>{class a{constructor(){this._calendarHeaderConfig=new E({hideBtnClear:!1,hideBtnToday:!1}),this.calendarConfig=this._calendarHeaderConfig.value}setHeaderConfig(e){this._calendarHeaderConfig.next(e)}getHeaderConfig$(){return this._calendarHeaderConfig.asObservable()}static{this.\u0275fac=function(t){return new(t||a)}}static{this.\u0275prov=O({token:a,factory:a.\u0275fac,providedIn:"root"})}}return a})(),ue=(()=>{class a{constructor(e,t,i,n,m){this._datePicker=e,this._calendar=t,this._dateAdapter=i,this.calendarService=n,this._destroyed=new B,t.stateChanges.pipe(F(this._destroyed)).subscribe(h=>m.markForCheck()),this.calendarConfig$=this.calendarService.getHeaderConfig$()}todayClicked(){this._calendar.activeDate=this._dateAdapter.today(),this._datePicker.select(this._dateAdapter.today()),this._datePicker.close()}clearClicked(){this._datePicker.select(null),this._datePicker.close()}ngOnChanges(e){this._calendar.ngOnChanges(e)}ngOnDestroy(){this._destroyed.next(),this._destroyed.complete()}static{this.\u0275fac=function(t){return new(t||a)(p(Y),p(ne),p(b),p(le),p(G))}}static{this.\u0275cmp=D({type:a,selectors:[["POS-DatepickerHeader",8,"component","ts"]],features:[w([u]),A],attrs:ce,decls:3,vars:3,consts:[[4,"ngIf"],["mat-icon-button","","title","Today",3,"click",4,"ngIf"],["mat-icon-button","","title","Clear",3,"click",4,"ngIf"],["mat-icon-button","","title","Today",3,"click"],[1,"far","fa-clock",2,"font-size","18px"],["mat-icon-button","","title","Clear",3,"click"],[1,"far","fa-xmark-circle",2,"font-size","18px"]],template:function(t,i){t&1&&(d(0,"mat-calendar-header"),g(1,me,3,2,"ng-container",0),U(2,"async"),s()),t&2&&(r(),o("ngIf",q(2,1,i.calendarConfig$)))},dependencies:[T,I,J,S,ie,V,u,ae,x,H],encapsulation:2})}}return a})(),_e={parse:{dateInput:"DD MMM YYYY"},display:{dateInput:"DD MMM YYYY",monthYearLabel:"MMM YYYY",dateA11yLabel:"LL",monthYearA11yLabel:"MMMM YYYY"}},Le=(()=>{class a{set hidelClearBtn(e){this.calendarService.setHeaderConfig({hideBtnClear:e,hideBtnToday:this.calendarService.calendarConfig.hideBtnToday})}change(e){let t=null;e&&(t=e.toDate(),t?.setHours(0,0,0,0)),this.dateChange.emit(t)}constructor(e){this.calendarService=e,this.headerComponent=ue,this.data_cy="",this.placeholder="",this.appearance="outline",this.width="",this.isFloatingLabel=!0,this.date="",this.disabled=!1,this.readOnly=!1,this.dateChange=new L,this.minDate=K.MinDate,this.displayToggle=!0}onOpenDatepicker(){let e=document.getElementById("dropdown-filter");if(e){var t=new bootstrap.Dropdown(e);t&&(t._config.autoClose="inside")}}onCloseDatepicker(){let e=document.getElementById("dropdown-filter");if(e){var t=new bootstrap.Dropdown(e);t&&(t._config.autoClose="outside")}}ngOnDestroy(){this.calendarService.setHeaderConfig({hideBtnClear:!1,hideBtnToday:!1})}static{this.\u0275fac=function(t){return new(t||a)(p(le))}}static{this.\u0275cmp=D({type:a,selectors:[["datepicker"]],inputs:{data_cy:"data_cy",placeholder:"placeholder",displayToggle:"displayToggle",appearance:"appearance",width:"width",isFloatingLabel:"isFloatingLabel",date:"date",disabled:"disabled",readOnly:"readOnly",minDateValidation:"minDateValidation",maxDateValidation:"maxDateValidation",hidelClearBtn:"hidelClearBtn"},outputs:{dateChange:"dateChange"},features:[w([{provide:b,useClass:de,deps:[Z]},{provide:ee,useValue:_e},u])],decls:6,vars:16,consts:[["picker1",""],[1,"datepicker",3,"appearance"],[4,"ngIf"],["matInput","",3,"dateChange","click","matDatepicker","min","max","placeholder","value","disabled","readonly"],["matSuffix","",3,"for"],[3,"opened","closed","calendarHeaderComponent"]],template:function(t,i){if(t&1){let n=k();d(0,"mat-form-field",1),g(1,fe,3,1,"mat-label",2),d(2,"input",3),f("dateChange",function(h){return l(n),c(i.change(h.value))})("click",function(){l(n);let h=M(5);return c(h.open())}),s(),C(3,"mat-datepicker-toggle",4),d(4,"mat-datepicker",5,0),f("opened",function(){return l(n),c(i.onOpenDatepicker())})("closed",function(){return l(n),c(i.onCloseDatepicker())}),s()()}if(t&2){let n=M(5);v("width",i.width||100,"%"),o("appearance",i.appearance),r(),o("ngIf",i.isFloatingLabel&&i.placeholder),r(),z("placeholder",i.placeholder||""),o("matDatepicker",n)("min",i.minDateValidation)("max",i.maxDateValidation)("value",i.date==i.minDate?null:i.date)("disabled",i.disabled)("readonly",i.readOnly),P("data-cy",i.data_cy),r(),v("display",i.displayToggle?"unset":"none"),o("for",n),r(),o("calendarHeaderComponent",i.headerComponent)}},dependencies:[T,I,S,V,u,Y,re,oe,x,X,Q,W,H,te],styles:[`.mat-mdc-form-field-disabled ::ng-deep .mat-form-field-appearance-outline{background-color:#e9ecef!important;opacity:1!important}.mat-mdc-form-field-disabled ::ng-deep .mat-form-field-appearance-outline input{color:#00000061!important}.datepicker .mat-mdc-text-field-wrapper.mdc-text-field--outlined .mat-mdc-form-field-infix{min-height:33px;padding-top:18px;padding-bottom:13px}.datepicker .mat-mdc-icon-button.mat-mdc-button-base{padding:0}.datepicker .mat-mdc-form-field-subscript-wrapper{display:none}.mat-calendar-controls .mat-mdc-icon-button.mat-mdc-button-base{padding:0!important}.mat-mdc-form-field .mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{top:28px!important;font-size:16px;color:#9da2a6}.mat-mdc-text-field-wrapper .mat-mdc-form-field-flex .mat-mdc-floating-label{top:23px!important;font-size:.875rem;color:#ccc}.mdc-text-field--filled:not(.mdc-text-field--disabled){background-color:#fff}
2
2
  `],encapsulation:2})}}return a})();export{Le as a};
@@ -1,4 +1,4 @@
1
- import{c}from"./chunk-PW42BQIY.js";import{b as d}from"./chunk-JXSBFTQM.js";import{ja as h,pa as f}from"./chunk-B7KTCPKC.js";var w=(()=>{class a{constructor(){this.toastrService=f(d)}showToastrUploadMultiple(l,e){let s=[],i=[],o=null,r=this.getResponseList(l);if(l.filter(t=>c.IsNotEmpty(t)).forEach(t=>{typeof t?.Response=="string"?i=[...i,r.length>1?this.setHtmlli(t.Response):this.setHtmlli(t.Response,!1)]:(t?.Response?.Success_list.forEach(n=>{s=[...s,r.length>1?this.setHtmlli(e?e(n,t.Channel):`
1
+ import{b as d}from"./chunk-JXSBFTQM.js";import{c}from"./chunk-PW42BQIY.js";import{ja as h,pa as f}from"./chunk-B7KTCPKC.js";var w=(()=>{class a{constructor(){this.toastrService=f(d)}showToastrUploadMultiple(l,e){let s=[],i=[],o=null,r=this.getResponseList(l);if(l.filter(t=>c.IsNotEmpty(t)).forEach(t=>{typeof t?.Response=="string"?i=[...i,r.length>1?this.setHtmlli(t.Response):this.setHtmlli(t.Response,!1)]:(t?.Response?.Success_list.forEach(n=>{s=[...s,r.length>1?this.setHtmlli(e?e(n,t.Channel):`
2
2
  <div>
3
3
  Product ${n.Name} was <div class="d-inline fw-bold">successfully</div> uploaded to ${t.Channel}
4
4
  </div>
@@ -1 +1 @@
1
- import{a as bt}from"./chunk-M5XGP4SG.js";import{b as xt}from"./chunk-H3J5OAIG.js";import{a as Ct}from"./chunk-J2KWRDVH.js";import{a as rt}from"./chunk-UMP6ZMEJ.js";import{b as lt}from"./chunk-PW42BQIY.js";import{a as mt,c as ct}from"./chunk-SWQXSJ7O.js";import{e as st}from"./chunk-JXSBFTQM.js";import{b as ut,c as gt,h as ht,j as ft,k as _t}from"./chunk-CLER2MX6.js";import{A as at,c as it,h as nt,m as ot}from"./chunk-6QYD6NIJ.js";import{r as pt,s as dt}from"./chunk-YCH6HHU3.js";import{g as V,i as et,m as L,n as R}from"./chunk-M2FCTYGU.js";import{$c as I,Fc as S,G as U,Gb as M,Gc as m,Hc as w,Ic as k,Jb as K,K as G,Ka as D,Kc as X,Lc as Z,Mb as u,Mc as tt,Oa as h,Ra as _,X as z,Yb as g,Z as J,ad as y,ca as W,cd as $,dc as P,ea as O,f as j,fa as Y,g as A,ic as r,ja as H,jc as l,kc as B,lc as T,mc as v,nc as Q,oa as q,oc as f,rb as a,rd as N,tc as C,uc as s,v as b,xb as E,ya as p,za as d}from"./chunk-B7KTCPKC.js";function Tt(e,c){e&1&&Q(0)}function vt(e,c){if(e&1&&(T(0),u(1,Tt,1,0,"ng-container",5),v()),e&2){s(2);let t=S(4);a(),g("ngTemplateOutlet",t)}}function wt(e,c){if(e&1&&(r(0,"div",6)(1,"label"),m(2,"Editing Data"),l(),r(3,"div")(4,"span"),m(5),I(6,"number"),l()()()),e&2){let t=s(2);a(5),w(y(6,1,t.value))}}function It(e,c){if(e&1&&(T(0),u(1,vt,2,1,"ng-container",4)(2,wt,7,3,"ng-template",null,1,$),v()),e&2){let t=S(3),i=s();a(),g("ngIf",i.hasPriceEdit)("ngIfElse",t)}}function yt(e,c){if(e&1){let t=f();r(0,"div",7)(1,"input",8),tt("ngModelChange",function(n){p(t);let o=s();return Z(o.value,n)||(o.value=n),d(n)}),l(),r(2,"label",9),m(3),l()()}if(e&2){let t=s();a(),X("ngModel",t.value),g("max",t.maxEditInventory),a(2),w(t.item.Table)}}var Ht=(()=>{class e{constructor(t,i,n){this.dialogRef=t,this.item=i,this.permissionService=n,this.maxEditInventory=1e5,this.permissionService.hasPermission(rt.PriceUpdate).then(o=>this.hasPriceEdit=o)}ngOnInit(){this.selectedChannel=this.item.Variant.Channel.find(t=>t.ChannelID==this.item.ChannelID),this.selectedChannel.ID=this.item.Variant.ID,this.selectedChannel.Sku=this.item.Variant.Code,this.item.Table=="inventory"?(this.value=this.selectedChannel.Inventory,this.maxEditInventory=this.selectedChannel?.TypeID==lt.Tokopedia?1e5:null):this.item.Table=="price"&&(this.value=this.selectedChannel.Price,this.maxEditInventory=null),this.selectedChannel.ItemName=this.item.Name,this.selectedChannel.VarName=this.item.Variant.Model,this.initModalConfig()}initModalConfig(){let t=this.item.Table=="inventory"?"Update Inventory":"Update Price";this.modalConfig=new ft,this.modalConfig.title=`${t} ${this.item?.Name} in ${this.selectedChannel?.Title}`}onSubmit(){this.item.Table=="inventory"?this.selectedChannel.Inventory=this.value:this.item.Table=="price"&&(this.selectedChannel.Price=this.value),this.dialogRef.close(this.selectedChannel)}onClose(){this.dialogRef.close()}static{this.\u0275fac=function(i){return new(i||e)(E(ut),E(gt),E(mt))}}static{this.\u0275cmp=M({type:e,selectors:[["app-table-dialog"]],decls:5,vars:4,consts:[["INVENTORY",""],["DISABLED",""],[3,"onClose","onCancel","onOk","dynamicValidated","config"],["content",""],[4,"ngIf","ngIfElse"],[4,"ngTemplateOutlet"],["matTooltipPosition","above","matTooltip","Cannot edit Unit Price because you dont have access ProductEditor role",1,"info-label-group","mt-3",2,"background","#e9ecef","opacity","1"],[1,"form-label-group","mt-3"],["type","text","name","edit","autoNum","",1,"form-control",3,"ngModelChange","ngModel","max"],["for","edit",1,"text-capitalize"]],template:function(i,n){if(i&1){let o=f();r(0,"modal-material",2),C("onClose",function(){return p(o),d(n.onClose())})("onCancel",function(){return p(o),d(n.onClose())})("onOk",function(){return p(o),d(n.onSubmit())}),r(1,"div",3),u(2,It,4,2,"ng-container",4)(3,yt,4,3,"ng-template",null,0,$),l()()}if(i&2){let o=S(4);g("dynamicValidated",n.value)("config",n.modalConfig),a(2),g("ngIf",n.item.Table=="price")("ngIfElse",o)}},dependencies:[R,V,et,L,ht,Ct,xt,bt,_t,at,it,nt,ot,ct,dt,pt],styles:["mat-form-field[_ngcontent-%COMP%]{width:100%;height:100%}.mat-dialog-title[_ngcontent-%COMP%]{margin-left:1rem;margin-right:1rem}.mat-dialog-content[_ngcontent-%COMP%]{padding-left:.5rem;padding-right:.5rem;margin-left:.5rem;margin-right:.5rem}.font-lg[_ngcontent-%COMP%]{font-size:large}.font-lgr[_ngcontent-%COMP%]{font-size:larger}"]})}}return e})();var Kt=(()=>{class e{transform(t,i,n=0){if(!t)return t;let o=i?parseInt(i,10):10;return t.length>o?t.substring(n,o)+"...":t}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275pipe=K({name:"stringLimit",type:e,pure:!0})}}return e})();function Nt(e,c){if(e&1){let t=f();r(0,"span",6),C("click",function(){p(t);let n=s();return d(n.onGetRowCount())}),r(1,"i",7),m(2,"?"),l()()}}function Dt(e,c){if(e&1&&(T(0),r(1,"span"),m(2),I(3,"number"),l(),v()),e&2){let t=s();a(2),w(y(3,1,t.rowCount()))}}function Et(e,c){if(e&1){let t=f();r(0,"a",10),C("click",function(){p(t);let n=s(2);return d(n.onNextPage())}),B(1,"i",11),m(2," Next"),l()}}function Mt(e,c){if(e&1){let t=f();r(0,"a",12),C("click",function(){p(t);let n=s(2);return d(n.onLastPage())}),B(1,"i",13),m(2," Last"),l()}}function St(e,c){if(e&1&&(r(0,"div",5),u(1,Et,3,0,"a",8)(2,Mt,3,0,"a",9),l()),e&2){let t=s();a(),P(t.disableNextButton()&&!t.goToLastPage()?1:-1),a(),P(t.disableNextButton()&&!t.goToLastPage()?2:-1)}}var ie=(()=>{class e{constructor(){this.totalData=h(0),this.rowCount=h(),this.pageNumber=h(),this.disableNextButton=h(),this.goToLastPage=h(),this.hideCount=h(),this.nextPage=new D,this.lastPage=new D,this.getRowCount=new D}onNextPage(){this.nextPage.emit()}onLastPage(){this.lastPage.emit()}onGetRowCount(){this.getRowCount.emit()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=M({type:e,selectors:[["infinite-paginator"]],inputs:{totalData:[1,"totalData"],rowCount:[1,"rowCount"],pageNumber:[1,"pageNumber"],disableNextButton:[1,"disableNextButton"],goToLastPage:[1,"goToLastPage"],hideCount:[1,"hideCount"]},outputs:{nextPage:"onNextPage",lastPage:"onLastPage",getRowCount:"onGetRowCount"},decls:9,vars:7,consts:[[1,"d-flex","justify-content-between","mt-5"],[1,"me-auto","d-sm-block","collapse","mt-3"],[1,"font-weight-bold","font-italic","hidden-xxs"],[2,"cursor","pointer"],[4,"ngIf"],[1,"btn-group"],[2,"cursor","pointer",3,"click"],["title","Retreive rows count",1,"border","p-3"],["role","button","title","Load more for 20 products",1,"btn","btn-outline-secondary","btn-sm","text-primary"],["role","button","title","Load all products",1,"btn","btn-outline-secondary","btn-sm","text-primary","border-start-0"],["role","button","title","Load more for 20 products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-arrow-right"],["role","button","title","Load all products",1,"btn","btn-outline-secondary","btn-sm","text-primary","border-start-0",3,"click"],[1,"fas","fa-share"]],template:function(i,n){i&1&&(r(0,"div",0)(1,"div",1)(2,"div",2),m(3),I(4,"number"),u(5,Nt,3,0,"span",3)(6,Dt,4,3,"ng-container",4),m(7),l()(),u(8,St,3,2,"div",5),l()),i&2&&(a(3),k(" Showing 1 - ",y(4,5,n.totalData())," of "),a(2),P(n.hideCount()?5:-1),a(),g("ngIf",!n.hideCount()&&n.rowCount()),a(),k(" records ~ ",n.pageNumber()," Page "),a(),P(n.totalData()>0?8:-1))},dependencies:[R,V,L],encapsulation:2})}}return e})();var se=(()=>{class e{constructor(t){this.http=t,this.pagination$=new A(null),this._pageNumber=_(1),this.pageNumber=N(()=>this._pageNumber()),this._hideCount=_(!0),this.hideCount=N(()=>this._hideCount()),this._disableNextButton=_(!0),this.disableNextButton=N(()=>this._disableNextButton()),this._goToLastPage=_(!1),this.isLastPage=N(()=>this._goToLastPage()),this.totalData=_(0),this.destroy$=new j,this.data$=this.paginationFunction()}onNextPage(t){t.PageNumber+=1,this.pagination$.next(t)}setPageNumberFooter(t){this._pageNumber.set(t.PageNumber)}setPaginationButtonState(t,i){i==0?this._disableNextButton.set(!0):this._disableNextButton.set(!(i<t.RowCount*t.PageNumber))}reloadPagination(t){t.PageNumber=1,this.pagination$.next(t),this._hideCount.set(!0),this._goToLastPage.set(!1)}onLastPage(t={}){let i=JSON.parse(JSON.stringify(t));this.totalRowCount$=this.http.post(`/api/${this.fethRowCountEndpoint}`,i).pipe(b(n=>n.Total),O(n=>{this._hideCount.set(!1),i.RowCount=n,i.PageNumber=1,this.pagination$.next(i),this._goToLastPage.set(!0)}))}paginationFunction(){return this.pagination$.pipe(W(this.destroy$),U(t=>t!=null),G(t=>this.http.post(`/API/${this.fetchDataEndpoint}`,JSON.stringify(t)).pipe(b(i=>i.Data?i.Data:[]))),Y(this.pagination$),z((t,i)=>{let[n,o]=t,[x]=i;return o.PageNumber==1?[x,o]:[n.concat(x),o]}),O(([t,i])=>{this.setPageNumberFooter(i);let n=this.calculateProductLength(t);this.totalData.set(n),this.setPaginationButtonState(i,n)}),b(([t])=>t),J())}getRowCount(t){this._hideCount.set(!1),this.totalRowCount$=this.http.post(`/API/${this.fethRowCountEndpoint}`,t).pipe(b(i=>i.Total))}calculateProductLength(t=[]){return t.reduce((n,o)=>n+(o.Variants?.length?o.Variants?.length:0),0)}static{this.\u0275fac=function(i){return new(i||e)(q(st))}}static{this.\u0275prov=H({token:e,factory:e.\u0275fac})}}return e})();export{Ht as a,Kt as b,ie as c,se as d};
1
+ import{a as bt}from"./chunk-M5XGP4SG.js";import{b as xt}from"./chunk-IIZDEGGW.js";import{a as Ct}from"./chunk-CUB2QFUO.js";import{a as rt}from"./chunk-UMP6ZMEJ.js";import{e as st}from"./chunk-JXSBFTQM.js";import{b as lt}from"./chunk-PW42BQIY.js";import{b as pt,c as dt,h as ut,j as gt,k as ht}from"./chunk-UGVEAL7H.js";import{A as at,c as it,h as nt,m as ot}from"./chunk-6QYD6NIJ.js";import{a as mt,c as ct}from"./chunk-SWQXSJ7O.js";import{r as ft,s as _t}from"./chunk-IHNN4Q2N.js";import{g as V,i as et,m as L,n as R}from"./chunk-M2FCTYGU.js";import{$c as I,Fc as S,G as U,Gb as M,Gc as m,Hc as w,Ic as k,Jb as K,K as G,Ka as D,Kc as X,Lc as Z,Mb as u,Mc as tt,Oa as h,Ra as _,X as z,Yb as g,Z as J,ad as y,ca as W,cd as $,dc as P,ea as O,f as j,fa as Y,g as A,ic as r,ja as H,jc as l,kc as B,lc as T,mc as v,nc as Q,oa as q,oc as f,rb as a,rd as N,tc as C,uc as s,v as b,xb as E,ya as p,za as d}from"./chunk-B7KTCPKC.js";function Tt(e,c){e&1&&Q(0)}function vt(e,c){if(e&1&&(T(0),u(1,Tt,1,0,"ng-container",5),v()),e&2){s(2);let t=S(4);a(),g("ngTemplateOutlet",t)}}function wt(e,c){if(e&1&&(r(0,"div",6)(1,"label"),m(2,"Editing Data"),l(),r(3,"div")(4,"span"),m(5),I(6,"number"),l()()()),e&2){let t=s(2);a(5),w(y(6,1,t.value))}}function It(e,c){if(e&1&&(T(0),u(1,vt,2,1,"ng-container",4)(2,wt,7,3,"ng-template",null,1,$),v()),e&2){let t=S(3),i=s();a(),g("ngIf",i.hasPriceEdit)("ngIfElse",t)}}function yt(e,c){if(e&1){let t=f();r(0,"div",7)(1,"input",8),tt("ngModelChange",function(n){p(t);let o=s();return Z(o.value,n)||(o.value=n),d(n)}),l(),r(2,"label",9),m(3),l()()}if(e&2){let t=s();a(),X("ngModel",t.value),g("max",t.maxEditInventory),a(2),w(t.item.Table)}}var Ht=(()=>{class e{constructor(t,i,n){this.dialogRef=t,this.item=i,this.permissionService=n,this.maxEditInventory=1e5,this.permissionService.hasPermission(rt.PriceUpdate).then(o=>this.hasPriceEdit=o)}ngOnInit(){this.selectedChannel=this.item.Variant.Channel.find(t=>t.ChannelID==this.item.ChannelID),this.selectedChannel.ID=this.item.Variant.ID,this.selectedChannel.Sku=this.item.Variant.Code,this.item.Table=="inventory"?(this.value=this.selectedChannel.Inventory,this.maxEditInventory=this.selectedChannel?.TypeID==lt.Tokopedia?1e5:null):this.item.Table=="price"&&(this.value=this.selectedChannel.Price,this.maxEditInventory=null),this.selectedChannel.ItemName=this.item.Name,this.selectedChannel.VarName=this.item.Variant.Model,this.initModalConfig()}initModalConfig(){let t=this.item.Table=="inventory"?"Update Inventory":"Update Price";this.modalConfig=new gt,this.modalConfig.title=`${t} ${this.item?.Name} in ${this.selectedChannel?.Title}`}onSubmit(){this.item.Table=="inventory"?this.selectedChannel.Inventory=this.value:this.item.Table=="price"&&(this.selectedChannel.Price=this.value),this.dialogRef.close(this.selectedChannel)}onClose(){this.dialogRef.close()}static{this.\u0275fac=function(i){return new(i||e)(E(pt),E(dt),E(mt))}}static{this.\u0275cmp=M({type:e,selectors:[["app-table-dialog"]],decls:5,vars:4,consts:[["INVENTORY",""],["DISABLED",""],[3,"onClose","onCancel","onOk","dynamicValidated","config"],["content",""],[4,"ngIf","ngIfElse"],[4,"ngTemplateOutlet"],["matTooltipPosition","above","matTooltip","Cannot edit Unit Price because you dont have access ProductEditor role",1,"info-label-group","mt-3",2,"background","#e9ecef","opacity","1"],[1,"form-label-group","mt-3"],["type","text","name","edit","autoNum","",1,"form-control",3,"ngModelChange","ngModel","max"],["for","edit",1,"text-capitalize"]],template:function(i,n){if(i&1){let o=f();r(0,"modal-material",2),C("onClose",function(){return p(o),d(n.onClose())})("onCancel",function(){return p(o),d(n.onClose())})("onOk",function(){return p(o),d(n.onSubmit())}),r(1,"div",3),u(2,It,4,2,"ng-container",4)(3,yt,4,3,"ng-template",null,0,$),l()()}if(i&2){let o=S(4);g("dynamicValidated",n.value)("config",n.modalConfig),a(2),g("ngIf",n.item.Table=="price")("ngIfElse",o)}},dependencies:[R,V,et,L,ut,Ct,xt,bt,ht,at,it,nt,ot,ct,_t,ft],styles:["mat-form-field[_ngcontent-%COMP%]{width:100%;height:100%}.mat-dialog-title[_ngcontent-%COMP%]{margin-left:1rem;margin-right:1rem}.mat-dialog-content[_ngcontent-%COMP%]{padding-left:.5rem;padding-right:.5rem;margin-left:.5rem;margin-right:.5rem}.font-lg[_ngcontent-%COMP%]{font-size:large}.font-lgr[_ngcontent-%COMP%]{font-size:larger}"]})}}return e})();var Kt=(()=>{class e{transform(t,i,n=0){if(!t)return t;let o=i?parseInt(i,10):10;return t.length>o?t.substring(n,o)+"...":t}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275pipe=K({name:"stringLimit",type:e,pure:!0})}}return e})();function Nt(e,c){if(e&1){let t=f();r(0,"span",6),C("click",function(){p(t);let n=s();return d(n.onGetRowCount())}),r(1,"i",7),m(2,"?"),l()()}}function Dt(e,c){if(e&1&&(T(0),r(1,"span"),m(2),I(3,"number"),l(),v()),e&2){let t=s();a(2),w(y(3,1,t.rowCount()))}}function Et(e,c){if(e&1){let t=f();r(0,"a",10),C("click",function(){p(t);let n=s(2);return d(n.onNextPage())}),B(1,"i",11),m(2," Next"),l()}}function Mt(e,c){if(e&1){let t=f();r(0,"a",12),C("click",function(){p(t);let n=s(2);return d(n.onLastPage())}),B(1,"i",13),m(2," Last"),l()}}function St(e,c){if(e&1&&(r(0,"div",5),u(1,Et,3,0,"a",8)(2,Mt,3,0,"a",9),l()),e&2){let t=s();a(),P(t.disableNextButton()&&!t.goToLastPage()?1:-1),a(),P(t.disableNextButton()&&!t.goToLastPage()?2:-1)}}var ie=(()=>{class e{constructor(){this.totalData=h(0),this.rowCount=h(),this.pageNumber=h(),this.disableNextButton=h(),this.goToLastPage=h(),this.hideCount=h(),this.nextPage=new D,this.lastPage=new D,this.getRowCount=new D}onNextPage(){this.nextPage.emit()}onLastPage(){this.lastPage.emit()}onGetRowCount(){this.getRowCount.emit()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=M({type:e,selectors:[["infinite-paginator"]],inputs:{totalData:[1,"totalData"],rowCount:[1,"rowCount"],pageNumber:[1,"pageNumber"],disableNextButton:[1,"disableNextButton"],goToLastPage:[1,"goToLastPage"],hideCount:[1,"hideCount"]},outputs:{nextPage:"onNextPage",lastPage:"onLastPage",getRowCount:"onGetRowCount"},decls:9,vars:7,consts:[[1,"d-flex","justify-content-between","mt-5"],[1,"me-auto","d-sm-block","collapse","mt-3"],[1,"font-weight-bold","font-italic","hidden-xxs"],[2,"cursor","pointer"],[4,"ngIf"],[1,"btn-group"],[2,"cursor","pointer",3,"click"],["title","Retreive rows count",1,"border","p-3"],["role","button","title","Load more for 20 products",1,"btn","btn-outline-secondary","btn-sm","text-primary"],["role","button","title","Load all products",1,"btn","btn-outline-secondary","btn-sm","text-primary","border-start-0"],["role","button","title","Load more for 20 products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-arrow-right"],["role","button","title","Load all products",1,"btn","btn-outline-secondary","btn-sm","text-primary","border-start-0",3,"click"],[1,"fas","fa-share"]],template:function(i,n){i&1&&(r(0,"div",0)(1,"div",1)(2,"div",2),m(3),I(4,"number"),u(5,Nt,3,0,"span",3)(6,Dt,4,3,"ng-container",4),m(7),l()(),u(8,St,3,2,"div",5),l()),i&2&&(a(3),k(" Showing 1 - ",y(4,5,n.totalData())," of "),a(2),P(n.hideCount()?5:-1),a(),g("ngIf",!n.hideCount()&&n.rowCount()),a(),k(" records ~ ",n.pageNumber()," Page "),a(),P(n.totalData()>0?8:-1))},dependencies:[R,V,L],encapsulation:2})}}return e})();var se=(()=>{class e{constructor(t){this.http=t,this.pagination$=new A(null),this._pageNumber=_(1),this.pageNumber=N(()=>this._pageNumber()),this._hideCount=_(!0),this.hideCount=N(()=>this._hideCount()),this._disableNextButton=_(!0),this.disableNextButton=N(()=>this._disableNextButton()),this._goToLastPage=_(!1),this.isLastPage=N(()=>this._goToLastPage()),this.totalData=_(0),this.destroy$=new j,this.data$=this.paginationFunction()}onNextPage(t){t.PageNumber+=1,this.pagination$.next(t)}setPageNumberFooter(t){this._pageNumber.set(t.PageNumber)}setPaginationButtonState(t,i){i==0?this._disableNextButton.set(!0):this._disableNextButton.set(!(i<t.RowCount*t.PageNumber))}reloadPagination(t){t.PageNumber=1,this.pagination$.next(t),this._hideCount.set(!0),this._goToLastPage.set(!1)}onLastPage(t={}){let i=JSON.parse(JSON.stringify(t));this.totalRowCount$=this.http.post(`/api/${this.fethRowCountEndpoint}`,i).pipe(b(n=>n.Total),O(n=>{this._hideCount.set(!1),i.RowCount=n,i.PageNumber=1,this.pagination$.next(i),this._goToLastPage.set(!0)}))}paginationFunction(){return this.pagination$.pipe(W(this.destroy$),U(t=>t!=null),G(t=>this.http.post(`/API/${this.fetchDataEndpoint}`,JSON.stringify(t)).pipe(b(i=>i.Data?i.Data:[]))),Y(this.pagination$),z((t,i)=>{let[n,o]=t,[x]=i;return o.PageNumber==1?[x,o]:[n.concat(x),o]}),O(([t,i])=>{this.setPageNumberFooter(i);let n=this.calculateProductLength(t);this.totalData.set(n),this.setPaginationButtonState(i,n)}),b(([t])=>t),J())}getRowCount(t){this._hideCount.set(!1),this.totalRowCount$=this.http.post(`/API/${this.fethRowCountEndpoint}`,t).pipe(b(i=>i.Total))}calculateProductLength(t=[]){return t.reduce((n,o)=>n+(o.Variants?.length?o.Variants?.length:0),0)}static{this.\u0275fac=function(i){return new(i||e)(q(st))}}static{this.\u0275prov=H({token:e,factory:e.\u0275fac})}}return e})();export{Ht as a,Kt as b,ie as c,se as d};
@@ -0,0 +1 @@
1
+ import{a as Ne}from"./chunk-AEOSNAHH.js";import{a as Ae}from"./chunk-GRIUDEPO.js";import{b as Re,e as $e}from"./chunk-JXSBFTQM.js";import{b as He,c as Me,d as Le,i as be,j as We,k as je}from"./chunk-UGVEAL7H.js";import{m as Pe,n as De}from"./chunk-M2FCTYGU.js";import{$c as V,Gb as Ee,Gc as I,Hc as W,Ic as xe,Mb as _e,Yb as Ie,ad as K,dc as me,g as ve,ic as C,ja as ke,jc as y,kc as we,oa as U,pa as pe,rb as R,tc as Te,uc as J}from"./chunk-B7KTCPKC.js";import{a as _,b as M,c as L,i as d}from"./chunk-66YHNWRR.js";var v=class extends Error{constructor(e,t){let n=new.target.prototype;super(`${e}: Status code '${t}'`),this.statusCode=t,this.__proto__=n}},$=class extends Error{constructor(e="A timeout occurred."){let t=new.target.prototype;super(e),this.__proto__=t}},S=class extends Error{constructor(e="An abort occurred."){let t=new.target.prototype;super(e),this.__proto__=t}},X=class extends Error{constructor(e,t){let n=new.target.prototype;super(e),this.transport=t,this.errorType="UnsupportedTransportError",this.__proto__=n}},G=class extends Error{constructor(e,t){let n=new.target.prototype;super(e),this.transport=t,this.errorType="DisabledTransportError",this.__proto__=n}},Y=class extends Error{constructor(e,t){let n=new.target.prototype;super(e),this.transport=t,this.errorType="FailedToStartTransportError",this.__proto__=n}},O=class extends Error{constructor(e){let t=new.target.prototype;super(e),this.errorType="FailedToNegotiateWithServerError",this.__proto__=t}},Q=class extends Error{constructor(e,t){let n=new.target.prototype;super(e),this.innerErrors=t,this.__proto__=n}};var j=class{constructor(e,t,n){this.statusCode=e,this.statusText=t,this.content=n}},T=class{get(e,t){return this.send(M(_({},t),{method:"GET",url:e}))}post(e,t){return this.send(M(_({},t),{method:"POST",url:e}))}delete(e,t){return this.send(M(_({},t),{method:"DELETE",url:e}))}getCookieString(e){return""}};var s=function(i){return i[i.Trace=0]="Trace",i[i.Debug=1]="Debug",i[i.Information=2]="Information",i[i.Warning=3]="Warning",i[i.Error=4]="Error",i[i.Critical=5]="Critical",i[i.None=6]="None",i}(s||{});var x=class{constructor(){}log(e,t){}};x.instance=new x;var ze="8.0.17",g=class{static isRequired(e,t){if(e==null)throw new Error(`The '${t}' argument is required.`)}static isNotEmpty(e,t){if(!e||e.match(/^\s*$/))throw new Error(`The '${t}' argument should not be empty.`)}static isIn(e,t,n){if(!(e in t))throw new Error(`Unknown ${n} value: ${e}.`)}},p=class i{static get isBrowser(){return!i.isNode&&typeof window=="object"&&typeof window.document=="object"}static get isWebWorker(){return!i.isNode&&typeof self=="object"&&"importScripts"in self}static get isReactNative(){return!i.isNode&&typeof window=="object"&&typeof window.document>"u"}static get isNode(){return typeof process<"u"&&process.release&&process.release.name==="node"}};function N(i,e){let t="";return E(i)?(t=`Binary data of length ${i.byteLength}`,e&&(t+=`. Content: '${Je(i)}'`)):typeof i=="string"&&(t=`String data of length ${i.length}`,e&&(t+=`. Content: '${i}'`)),t}function Je(i){let e=new Uint8Array(i),t="";return e.forEach(n=>{let o=n<16?"0":"";t+=`0x${o}${n.toString(16)} `}),t.substr(0,t.length-1)}function E(i){return i&&typeof ArrayBuffer<"u"&&(i instanceof ArrayBuffer||i.constructor&&i.constructor.name==="ArrayBuffer")}function ee(i,e,t,n,o,r){return d(this,null,function*(){let a={},[c,l]=P();a[c]=l,i.log(s.Trace,`(${e} transport) sending data. ${N(o,r.logMessageContent)}.`);let u=E(o)?"arraybuffer":"text",f=yield t.post(n,{content:o,headers:_(_({},a),r.headers),responseType:u,timeout:r.timeout,withCredentials:r.withCredentials});i.log(s.Trace,`(${e} transport) request complete. Response status: ${f.statusCode}.`)})}function Be(i){return i===void 0?new A(s.Information):i===null?x.instance:i.log!==void 0?i:new A(i)}var Z=class{constructor(e,t){this._subject=e,this._observer=t}dispose(){let e=this._subject.observers.indexOf(this._observer);e>-1&&this._subject.observers.splice(e,1),this._subject.observers.length===0&&this._subject.cancelCallback&&this._subject.cancelCallback().catch(t=>{})}},A=class{constructor(e){this._minLevel=e,this.out=console}log(e,t){if(e>=this._minLevel){let n=`[${new Date().toISOString()}] ${s[e]}: ${t}`;switch(e){case s.Critical:case s.Error:this.out.error(n);break;case s.Warning:this.out.warn(n);break;case s.Information:this.out.info(n);break;default:this.out.log(n);break}}}};function P(){let i="X-SignalR-User-Agent";return p.isNode&&(i="User-Agent"),[i,Ve(ze,Ke(),Ge(),Xe())]}function Ve(i,e,t,n){let o="Microsoft SignalR/",r=i.split(".");return o+=`${r[0]}.${r[1]}`,o+=` (${i}; `,e&&e!==""?o+=`${e}; `:o+="Unknown OS; ",o+=`${t}`,n?o+=`; ${n}`:o+="; Unknown Runtime Version",o+=")",o}function Ke(){if(p.isNode)switch(process.platform){case"win32":return"Windows NT";case"darwin":return"macOS";case"linux":return"Linux";default:return process.platform}else return""}function Xe(){if(p.isNode)return process.versions.node}function Ge(){return p.isNode?"NodeJS":"Browser"}function te(i){return i.stack?i.stack:i.message?i.message:`${i}`}function Ue(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("could not find global")}var ne=class extends T{constructor(e){if(super(),this._logger=e,typeof fetch>"u"||p.isNode){let t=typeof __webpack_require__=="function"?__non_webpack_require__:L;this._jar=new(t("tough-cookie")).CookieJar,typeof fetch>"u"?this._fetchType=t("node-fetch"):this._fetchType=fetch,this._fetchType=t("fetch-cookie")(this._fetchType,this._jar)}else this._fetchType=fetch.bind(Ue());if(typeof AbortController>"u"){let t=typeof __webpack_require__=="function"?__non_webpack_require__:L;this._abortControllerType=t("abort-controller")}else this._abortControllerType=AbortController}send(e){return d(this,null,function*(){if(e.abortSignal&&e.abortSignal.aborted)throw new S;if(!e.method)throw new Error("No method defined.");if(!e.url)throw new Error("No url defined.");let t=new this._abortControllerType,n;e.abortSignal&&(e.abortSignal.onabort=()=>{t.abort(),n=new S});let o=null;if(e.timeout){let l=e.timeout;o=setTimeout(()=>{t.abort(),this._logger.log(s.Warning,"Timeout from HTTP request."),n=new $},l)}e.content===""&&(e.content=void 0),e.content&&(e.headers=e.headers||{},E(e.content)?e.headers["Content-Type"]="application/octet-stream":e.headers["Content-Type"]="text/plain;charset=UTF-8");let r;try{r=yield this._fetchType(e.url,{body:e.content,cache:"no-cache",credentials:e.withCredentials===!0?"include":"same-origin",headers:_({"X-Requested-With":"XMLHttpRequest"},e.headers),method:e.method,mode:"cors",redirect:"follow",signal:t.signal})}catch(l){throw n||(this._logger.log(s.Warning,`Error from HTTP request. ${l}.`),l)}finally{o&&clearTimeout(o),e.abortSignal&&(e.abortSignal.onabort=null)}if(!r.ok){let l=yield Oe(r,"text");throw new v(l||r.statusText,r.status)}let c=yield Oe(r,e.responseType);return new j(r.status,r.statusText,c)})}getCookieString(e){let t="";return p.isNode&&this._jar&&this._jar.getCookies(e,(n,o)=>t=o.join("; ")),t}};function Oe(i,e){let t;switch(e){case"arraybuffer":t=i.arrayBuffer();break;case"text":t=i.text();break;case"blob":case"document":case"json":throw new Error(`${e} is not supported.`);default:t=i.text();break}return t}var oe=class extends T{constructor(e){super(),this._logger=e}send(e){return e.abortSignal&&e.abortSignal.aborted?Promise.reject(new S):e.method?e.url?new Promise((t,n)=>{let o=new XMLHttpRequest;o.open(e.method,e.url,!0),o.withCredentials=e.withCredentials===void 0?!0:e.withCredentials,o.setRequestHeader("X-Requested-With","XMLHttpRequest"),e.content===""&&(e.content=void 0),e.content&&(E(e.content)?o.setRequestHeader("Content-Type","application/octet-stream"):o.setRequestHeader("Content-Type","text/plain;charset=UTF-8"));let r=e.headers;r&&Object.keys(r).forEach(a=>{o.setRequestHeader(a,r[a])}),e.responseType&&(o.responseType=e.responseType),e.abortSignal&&(e.abortSignal.onabort=()=>{o.abort(),n(new S)}),e.timeout&&(o.timeout=e.timeout),o.onload=()=>{e.abortSignal&&(e.abortSignal.onabort=null),o.status>=200&&o.status<300?t(new j(o.status,o.statusText,o.response||o.responseText)):n(new v(o.response||o.responseText||o.statusText,o.status))},o.onerror=()=>{this._logger.log(s.Warning,`Error from HTTP request. ${o.status}: ${o.statusText}.`),n(new v(o.statusText,o.status))},o.ontimeout=()=>{this._logger.log(s.Warning,"Timeout from HTTP request."),n(new $)},o.send(e.content)}):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))}};var ie=class extends T{constructor(e){if(super(),typeof fetch<"u"||p.isNode)this._httpClient=new ne(e);else if(typeof XMLHttpRequest<"u")this._httpClient=new oe(e);else throw new Error("No usable HttpClient found.")}send(e){return e.abortSignal&&e.abortSignal.aborted?Promise.reject(new S):e.method?e.url?this._httpClient.send(e):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))}getCookieString(e){return this._httpClient.getCookieString(e)}};var k=class i{static write(e){return`${e}${i.RecordSeparator}`}static parse(e){if(e[e.length-1]!==i.RecordSeparator)throw new Error("Message is incomplete.");let t=e.split(i.RecordSeparator);return t.pop(),t}};k.RecordSeparatorCode=30;k.RecordSeparator=String.fromCharCode(k.RecordSeparatorCode);var re=class{writeHandshakeRequest(e){return k.write(JSON.stringify(e))}parseHandshakeResponse(e){let t,n;if(E(e)){let c=new Uint8Array(e),l=c.indexOf(k.RecordSeparatorCode);if(l===-1)throw new Error("Message is incomplete.");let u=l+1;t=String.fromCharCode.apply(null,Array.prototype.slice.call(c.slice(0,u))),n=c.byteLength>u?c.slice(u).buffer:null}else{let c=e,l=c.indexOf(k.RecordSeparator);if(l===-1)throw new Error("Message is incomplete.");let u=l+1;t=c.substring(0,u),n=c.length>u?c.substring(u):null}let o=k.parse(t),r=JSON.parse(o[0]);if(r.type)throw new Error("Expected a handshake response from the server.");return[n,r]}};var h=function(i){return i[i.Invocation=1]="Invocation",i[i.StreamItem=2]="StreamItem",i[i.Completion=3]="Completion",i[i.StreamInvocation=4]="StreamInvocation",i[i.CancelInvocation=5]="CancelInvocation",i[i.Ping=6]="Ping",i[i.Close=7]="Close",i[i.Ack=8]="Ack",i[i.Sequence=9]="Sequence",i}(h||{});var se=class{constructor(){this.observers=[]}next(e){for(let t of this.observers)t.next(e)}error(e){for(let t of this.observers)t.error&&t.error(e)}complete(){for(let e of this.observers)e.complete&&e.complete()}subscribe(e){return this.observers.push(e),new Z(this,e)}};var ae=class{constructor(e,t,n){this._bufferSize=1e5,this._messages=[],this._totalMessageCount=0,this._waitForSequenceMessage=!1,this._nextReceivingSequenceId=1,this._latestReceivedSequenceId=0,this._bufferedByteCount=0,this._reconnectInProgress=!1,this._protocol=e,this._connection=t,this._bufferSize=n}_send(e){return d(this,null,function*(){let t=this._protocol.writeMessage(e),n=Promise.resolve();if(this._isInvocationMessage(e)){this._totalMessageCount++;let o=()=>{},r=()=>{};E(t)?this._bufferedByteCount+=t.byteLength:this._bufferedByteCount+=t.length,this._bufferedByteCount>=this._bufferSize&&(n=new Promise((a,c)=>{o=a,r=c})),this._messages.push(new Se(t,this._totalMessageCount,o,r))}try{this._reconnectInProgress||(yield this._connection.send(t))}catch{this._disconnected()}yield n})}_ack(e){let t=-1;for(let n=0;n<this._messages.length;n++){let o=this._messages[n];if(o._id<=e.sequenceId)t=n,E(o._message)?this._bufferedByteCount-=o._message.byteLength:this._bufferedByteCount-=o._message.length,o._resolver();else if(this._bufferedByteCount<this._bufferSize)o._resolver();else break}t!==-1&&(this._messages=this._messages.slice(t+1))}_shouldProcessMessage(e){if(this._waitForSequenceMessage)return e.type!==h.Sequence?!1:(this._waitForSequenceMessage=!1,!0);if(!this._isInvocationMessage(e))return!0;let t=this._nextReceivingSequenceId;return this._nextReceivingSequenceId++,t<=this._latestReceivedSequenceId?(t===this._latestReceivedSequenceId&&this._ackTimer(),!1):(this._latestReceivedSequenceId=t,this._ackTimer(),!0)}_resetSequence(e){if(e.sequenceId>this._nextReceivingSequenceId){this._connection.stop(new Error("Sequence ID greater than amount of messages we've received."));return}this._nextReceivingSequenceId=e.sequenceId}_disconnected(){this._reconnectInProgress=!0,this._waitForSequenceMessage=!0}_resend(){return d(this,null,function*(){let e=this._messages.length!==0?this._messages[0]._id:this._totalMessageCount+1;yield this._connection.send(this._protocol.writeMessage({type:h.Sequence,sequenceId:e}));let t=this._messages;for(let n of t)yield this._connection.send(n._message);this._reconnectInProgress=!1})}_dispose(e){e??(e=new Error("Unable to reconnect to server."));for(let t of this._messages)t._rejector(e)}_isInvocationMessage(e){switch(e.type){case h.Invocation:case h.StreamItem:case h.Completion:case h.StreamInvocation:case h.CancelInvocation:return!0;case h.Close:case h.Sequence:case h.Ping:case h.Ack:return!1}}_ackTimer(){this._ackTimerHandle===void 0&&(this._ackTimerHandle=setTimeout(()=>d(this,null,function*(){try{this._reconnectInProgress||(yield this._connection.send(this._protocol.writeMessage({type:h.Ack,sequenceId:this._latestReceivedSequenceId})))}catch{}clearTimeout(this._ackTimerHandle),this._ackTimerHandle=void 0}),1e3))}},Se=class{constructor(e,t,n,o){this._message=e,this._id=t,this._resolver=n,this._rejector=o}};var Ye=30*1e3,Qe=15*1e3,Ze=1e5,m=function(i){return i.Disconnected="Disconnected",i.Connecting="Connecting",i.Connected="Connected",i.Disconnecting="Disconnecting",i.Reconnecting="Reconnecting",i}(m||{}),ce=class i{static create(e,t,n,o,r,a,c){return new i(e,t,n,o,r,a,c)}constructor(e,t,n,o,r,a,c){this._nextKeepAlive=0,this._freezeEventListener=()=>{this._logger.log(s.Warning,"The page is being frozen, this will likely lead to the connection being closed and messages being lost. For more information see the docs at https://learn.microsoft.com/aspnet/core/signalr/javascript-client#bsleep")},g.isRequired(e,"connection"),g.isRequired(t,"logger"),g.isRequired(n,"protocol"),this.serverTimeoutInMilliseconds=r??Ye,this.keepAliveIntervalInMilliseconds=a??Qe,this._statefulReconnectBufferSize=c??Ze,this._logger=t,this._protocol=n,this.connection=e,this._reconnectPolicy=o,this._handshakeProtocol=new re,this.connection.onreceive=l=>this._processIncomingData(l),this.connection.onclose=l=>this._connectionClosed(l),this._callbacks={},this._methods={},this._closedCallbacks=[],this._reconnectingCallbacks=[],this._reconnectedCallbacks=[],this._invocationId=0,this._receivedHandshakeResponse=!1,this._connectionState=m.Disconnected,this._connectionStarted=!1,this._cachedPingMessage=this._protocol.writeMessage({type:h.Ping})}get state(){return this._connectionState}get connectionId(){return this.connection&&this.connection.connectionId||null}get baseUrl(){return this.connection.baseUrl||""}set baseUrl(e){if(this._connectionState!==m.Disconnected&&this._connectionState!==m.Reconnecting)throw new Error("The HubConnection must be in the Disconnected or Reconnecting state to change the url.");if(!e)throw new Error("The HubConnection url must be a valid url.");this.connection.baseUrl=e}start(){return this._startPromise=this._startWithStateTransitions(),this._startPromise}_startWithStateTransitions(){return d(this,null,function*(){if(this._connectionState!==m.Disconnected)return Promise.reject(new Error("Cannot start a HubConnection that is not in the 'Disconnected' state."));this._connectionState=m.Connecting,this._logger.log(s.Debug,"Starting HubConnection.");try{yield this._startInternal(),p.isBrowser&&window.document.addEventListener("freeze",this._freezeEventListener),this._connectionState=m.Connected,this._connectionStarted=!0,this._logger.log(s.Debug,"HubConnection connected successfully.")}catch(e){return this._connectionState=m.Disconnected,this._logger.log(s.Debug,`HubConnection failed to start successfully because of error '${e}'.`),Promise.reject(e)}})}_startInternal(){return d(this,null,function*(){this._stopDuringStartError=void 0,this._receivedHandshakeResponse=!1;let e=new Promise((t,n)=>{this._handshakeResolver=t,this._handshakeRejecter=n});yield this.connection.start(this._protocol.transferFormat);try{let t=this._protocol.version;this.connection.features.reconnect||(t=1);let n={protocol:this._protocol.name,version:t};if(this._logger.log(s.Debug,"Sending handshake request."),yield this._sendMessage(this._handshakeProtocol.writeHandshakeRequest(n)),this._logger.log(s.Information,`Using HubProtocol '${this._protocol.name}'.`),this._cleanupTimeout(),this._resetTimeoutPeriod(),this._resetKeepAliveInterval(),yield e,this._stopDuringStartError)throw this._stopDuringStartError;(this.connection.features.reconnect||!1)&&(this._messageBuffer=new ae(this._protocol,this.connection,this._statefulReconnectBufferSize),this.connection.features.disconnected=this._messageBuffer._disconnected.bind(this._messageBuffer),this.connection.features.resend=()=>{if(this._messageBuffer)return this._messageBuffer._resend()}),this.connection.features.inherentKeepAlive||(yield this._sendMessage(this._cachedPingMessage))}catch(t){throw this._logger.log(s.Debug,`Hub handshake failed with error '${t}' during start(). Stopping HubConnection.`),this._cleanupTimeout(),this._cleanupPingTimer(),yield this.connection.stop(t),t}})}stop(){return d(this,null,function*(){let e=this._startPromise;this.connection.features.reconnect=!1,this._stopPromise=this._stopInternal(),yield this._stopPromise;try{yield e}catch{}})}_stopInternal(e){if(this._connectionState===m.Disconnected)return this._logger.log(s.Debug,`Call to HubConnection.stop(${e}) ignored because it is already in the disconnected state.`),Promise.resolve();if(this._connectionState===m.Disconnecting)return this._logger.log(s.Debug,`Call to HttpConnection.stop(${e}) ignored because the connection is already in the disconnecting state.`),this._stopPromise;let t=this._connectionState;return this._connectionState=m.Disconnecting,this._logger.log(s.Debug,"Stopping HubConnection."),this._reconnectDelayHandle?(this._logger.log(s.Debug,"Connection stopped during reconnect delay. Done reconnecting."),clearTimeout(this._reconnectDelayHandle),this._reconnectDelayHandle=void 0,this._completeClose(),Promise.resolve()):(t===m.Connected&&this._sendCloseMessage(),this._cleanupTimeout(),this._cleanupPingTimer(),this._stopDuringStartError=e||new S("The connection was stopped before the hub handshake could complete."),this.connection.stop(e))}_sendCloseMessage(){return d(this,null,function*(){try{yield this._sendWithProtocol(this._createCloseMessage())}catch{}})}stream(e,...t){let[n,o]=this._replaceStreamingParams(t),r=this._createStreamInvocation(e,t,o),a,c=new se;return c.cancelCallback=()=>{let l=this._createCancelInvocation(r.invocationId);return delete this._callbacks[r.invocationId],a.then(()=>this._sendWithProtocol(l))},this._callbacks[r.invocationId]=(l,u)=>{if(u){c.error(u);return}else l&&(l.type===h.Completion?l.error?c.error(new Error(l.error)):c.complete():c.next(l.item))},a=this._sendWithProtocol(r).catch(l=>{c.error(l),delete this._callbacks[r.invocationId]}),this._launchStreams(n,a),c}_sendMessage(e){return this._resetKeepAliveInterval(),this.connection.send(e)}_sendWithProtocol(e){return this._messageBuffer?this._messageBuffer._send(e):this._sendMessage(this._protocol.writeMessage(e))}send(e,...t){let[n,o]=this._replaceStreamingParams(t),r=this._sendWithProtocol(this._createInvocation(e,t,!0,o));return this._launchStreams(n,r),r}invoke(e,...t){let[n,o]=this._replaceStreamingParams(t),r=this._createInvocation(e,t,!1,o);return new Promise((c,l)=>{this._callbacks[r.invocationId]=(f,D)=>{if(D){l(D);return}else f&&(f.type===h.Completion?f.error?l(new Error(f.error)):c(f.result):l(new Error(`Unexpected message type: ${f.type}`)))};let u=this._sendWithProtocol(r).catch(f=>{l(f),delete this._callbacks[r.invocationId]});this._launchStreams(n,u)})}on(e,t){!e||!t||(e=e.toLowerCase(),this._methods[e]||(this._methods[e]=[]),this._methods[e].indexOf(t)===-1&&this._methods[e].push(t))}off(e,t){if(!e)return;e=e.toLowerCase();let n=this._methods[e];if(n)if(t){let o=n.indexOf(t);o!==-1&&(n.splice(o,1),n.length===0&&delete this._methods[e])}else delete this._methods[e]}onclose(e){e&&this._closedCallbacks.push(e)}onreconnecting(e){e&&this._reconnectingCallbacks.push(e)}onreconnected(e){e&&this._reconnectedCallbacks.push(e)}_processIncomingData(e){if(this._cleanupTimeout(),this._receivedHandshakeResponse||(e=this._processHandshakeResponse(e),this._receivedHandshakeResponse=!0),e){let t=this._protocol.parseMessages(e,this._logger);for(let n of t)if(!(this._messageBuffer&&!this._messageBuffer._shouldProcessMessage(n)))switch(n.type){case h.Invocation:this._invokeClientMethod(n).catch(o=>{this._logger.log(s.Error,`Invoke client method threw error: ${te(o)}`)});break;case h.StreamItem:case h.Completion:{let o=this._callbacks[n.invocationId];if(o){n.type===h.Completion&&delete this._callbacks[n.invocationId];try{o(n)}catch(r){this._logger.log(s.Error,`Stream callback threw error: ${te(r)}`)}}break}case h.Ping:break;case h.Close:{this._logger.log(s.Information,"Close message received from server.");let o=n.error?new Error("Server returned an error on close: "+n.error):void 0;n.allowReconnect===!0?this.connection.stop(o):this._stopPromise=this._stopInternal(o);break}case h.Ack:this._messageBuffer&&this._messageBuffer._ack(n);break;case h.Sequence:this._messageBuffer&&this._messageBuffer._resetSequence(n);break;default:this._logger.log(s.Warning,`Invalid message type: ${n.type}.`);break}}this._resetTimeoutPeriod()}_processHandshakeResponse(e){let t,n;try{[n,t]=this._handshakeProtocol.parseHandshakeResponse(e)}catch(o){let r="Error parsing handshake response: "+o;this._logger.log(s.Error,r);let a=new Error(r);throw this._handshakeRejecter(a),a}if(t.error){let o="Server returned handshake error: "+t.error;this._logger.log(s.Error,o);let r=new Error(o);throw this._handshakeRejecter(r),r}else this._logger.log(s.Debug,"Server handshake complete.");return this._handshakeResolver(),n}_resetKeepAliveInterval(){this.connection.features.inherentKeepAlive||(this._nextKeepAlive=new Date().getTime()+this.keepAliveIntervalInMilliseconds,this._cleanupPingTimer())}_resetTimeoutPeriod(){if((!this.connection.features||!this.connection.features.inherentKeepAlive)&&(this._timeoutHandle=setTimeout(()=>this.serverTimeout(),this.serverTimeoutInMilliseconds),this._pingServerHandle===void 0)){let e=this._nextKeepAlive-new Date().getTime();e<0&&(e=0),this._pingServerHandle=setTimeout(()=>d(this,null,function*(){if(this._connectionState===m.Connected)try{yield this._sendMessage(this._cachedPingMessage)}catch{this._cleanupPingTimer()}}),e)}}serverTimeout(){this.connection.stop(new Error("Server timeout elapsed without receiving a message from the server."))}_invokeClientMethod(e){return d(this,null,function*(){let t=e.target.toLowerCase(),n=this._methods[t];if(!n){this._logger.log(s.Warning,`No client method with the name '${t}' found.`),e.invocationId&&(this._logger.log(s.Warning,`No result given for '${t}' method and invocation ID '${e.invocationId}'.`),yield this._sendWithProtocol(this._createCompletionMessage(e.invocationId,"Client didn't provide a result.",null)));return}let o=n.slice(),r=!!e.invocationId,a,c,l;for(let u of o)try{let f=a;a=yield u.apply(this,e.arguments),r&&a&&f&&(this._logger.log(s.Error,`Multiple results provided for '${t}'. Sending error to server.`),l=this._createCompletionMessage(e.invocationId,"Client provided multiple results.",null)),c=void 0}catch(f){c=f,this._logger.log(s.Error,`A callback for the method '${t}' threw error '${f}'.`)}l?yield this._sendWithProtocol(l):r?(c?l=this._createCompletionMessage(e.invocationId,`${c}`,null):a!==void 0?l=this._createCompletionMessage(e.invocationId,null,a):(this._logger.log(s.Warning,`No result given for '${t}' method and invocation ID '${e.invocationId}'.`),l=this._createCompletionMessage(e.invocationId,"Client didn't provide a result.",null)),yield this._sendWithProtocol(l)):a&&this._logger.log(s.Error,`Result given for '${t}' method but server is not expecting a result.`)})}_connectionClosed(e){this._logger.log(s.Debug,`HubConnection.connectionClosed(${e}) called while in state ${this._connectionState}.`),this._stopDuringStartError=this._stopDuringStartError||e||new S("The underlying connection was closed before the hub handshake could complete."),this._handshakeResolver&&this._handshakeResolver(),this._cancelCallbacksWithError(e||new Error("Invocation canceled due to the underlying connection being closed.")),this._cleanupTimeout(),this._cleanupPingTimer(),this._connectionState===m.Disconnecting?this._completeClose(e):this._connectionState===m.Connected&&this._reconnectPolicy?this._reconnect(e):this._connectionState===m.Connected&&this._completeClose(e)}_completeClose(e){if(this._connectionStarted){this._connectionState=m.Disconnected,this._connectionStarted=!1,this._messageBuffer&&(this._messageBuffer._dispose(e??new Error("Connection closed.")),this._messageBuffer=void 0),p.isBrowser&&window.document.removeEventListener("freeze",this._freezeEventListener);try{this._closedCallbacks.forEach(t=>t.apply(this,[e]))}catch(t){this._logger.log(s.Error,`An onclose callback called with error '${e}' threw error '${t}'.`)}}}_reconnect(e){return d(this,null,function*(){let t=Date.now(),n=0,o=e!==void 0?e:new Error("Attempting to reconnect due to a unknown error."),r=this._getNextRetryDelay(n++,0,o);if(r===null){this._logger.log(s.Debug,"Connection not reconnecting because the IRetryPolicy returned null on the first reconnect attempt."),this._completeClose(e);return}if(this._connectionState=m.Reconnecting,e?this._logger.log(s.Information,`Connection reconnecting because of error '${e}'.`):this._logger.log(s.Information,"Connection reconnecting."),this._reconnectingCallbacks.length!==0){try{this._reconnectingCallbacks.forEach(a=>a.apply(this,[e]))}catch(a){this._logger.log(s.Error,`An onreconnecting callback called with error '${e}' threw error '${a}'.`)}if(this._connectionState!==m.Reconnecting){this._logger.log(s.Debug,"Connection left the reconnecting state in onreconnecting callback. Done reconnecting.");return}}for(;r!==null;){if(this._logger.log(s.Information,`Reconnect attempt number ${n} will start in ${r} ms.`),yield new Promise(a=>{this._reconnectDelayHandle=setTimeout(a,r)}),this._reconnectDelayHandle=void 0,this._connectionState!==m.Reconnecting){this._logger.log(s.Debug,"Connection left the reconnecting state during reconnect delay. Done reconnecting.");return}try{if(yield this._startInternal(),this._connectionState=m.Connected,this._logger.log(s.Information,"HubConnection reconnected successfully."),this._reconnectedCallbacks.length!==0)try{this._reconnectedCallbacks.forEach(a=>a.apply(this,[this.connection.connectionId]))}catch(a){this._logger.log(s.Error,`An onreconnected callback called with connectionId '${this.connection.connectionId}; threw error '${a}'.`)}return}catch(a){if(this._logger.log(s.Information,`Reconnect attempt failed because of error '${a}'.`),this._connectionState!==m.Reconnecting){this._logger.log(s.Debug,`Connection moved to the '${this._connectionState}' from the reconnecting state during reconnect attempt. Done reconnecting.`),this._connectionState===m.Disconnecting&&this._completeClose();return}o=a instanceof Error?a:new Error(a.toString()),r=this._getNextRetryDelay(n++,Date.now()-t,o)}}this._logger.log(s.Information,`Reconnect retries have been exhausted after ${Date.now()-t} ms and ${n} failed attempts. Connection disconnecting.`),this._completeClose()})}_getNextRetryDelay(e,t,n){try{return this._reconnectPolicy.nextRetryDelayInMilliseconds({elapsedMilliseconds:t,previousRetryCount:e,retryReason:n})}catch(o){return this._logger.log(s.Error,`IRetryPolicy.nextRetryDelayInMilliseconds(${e}, ${t}) threw error '${o}'.`),null}}_cancelCallbacksWithError(e){let t=this._callbacks;this._callbacks={},Object.keys(t).forEach(n=>{let o=t[n];try{o(null,e)}catch(r){this._logger.log(s.Error,`Stream 'error' callback called with '${e}' threw error: ${te(r)}`)}})}_cleanupPingTimer(){this._pingServerHandle&&(clearTimeout(this._pingServerHandle),this._pingServerHandle=void 0)}_cleanupTimeout(){this._timeoutHandle&&clearTimeout(this._timeoutHandle)}_createInvocation(e,t,n,o){if(n)return o.length!==0?{arguments:t,streamIds:o,target:e,type:h.Invocation}:{arguments:t,target:e,type:h.Invocation};{let r=this._invocationId;return this._invocationId++,o.length!==0?{arguments:t,invocationId:r.toString(),streamIds:o,target:e,type:h.Invocation}:{arguments:t,invocationId:r.toString(),target:e,type:h.Invocation}}}_launchStreams(e,t){if(e.length!==0){t||(t=Promise.resolve());for(let n in e)e[n].subscribe({complete:()=>{t=t.then(()=>this._sendWithProtocol(this._createCompletionMessage(n)))},error:o=>{let r;o instanceof Error?r=o.message:o&&o.toString?r=o.toString():r="Unknown error",t=t.then(()=>this._sendWithProtocol(this._createCompletionMessage(n,r)))},next:o=>{t=t.then(()=>this._sendWithProtocol(this._createStreamItemMessage(n,o)))}})}}_replaceStreamingParams(e){let t=[],n=[];for(let o=0;o<e.length;o++){let r=e[o];if(this._isObservable(r)){let a=this._invocationId;this._invocationId++,t[a]=r,n.push(a.toString()),e.splice(o,1)}}return[t,n]}_isObservable(e){return e&&e.subscribe&&typeof e.subscribe=="function"}_createStreamInvocation(e,t,n){let o=this._invocationId;return this._invocationId++,n.length!==0?{arguments:t,invocationId:o.toString(),streamIds:n,target:e,type:h.StreamInvocation}:{arguments:t,invocationId:o.toString(),target:e,type:h.StreamInvocation}}_createCancelInvocation(e){return{invocationId:e,type:h.CancelInvocation}}_createStreamItemMessage(e,t){return{invocationId:e,item:t,type:h.StreamItem}}_createCompletionMessage(e,t,n){return t?{error:t,invocationId:e,type:h.Completion}:{invocationId:e,result:n,type:h.Completion}}_createCloseMessage(){return{type:h.Close}}};var et=[0,2e3,1e4,3e4,null],F=class{constructor(e){this._retryDelays=e!==void 0?[...e,null]:et}nextRetryDelayInMilliseconds(e){return this._retryDelays[e.previousRetryCount]}};var H=(()=>{class i{}return i.Authorization="Authorization",i.Cookie="Cookie",i})();var le=class extends T{constructor(e,t){super(),this._innerClient=e,this._accessTokenFactory=t}send(e){return d(this,null,function*(){let t=!0;this._accessTokenFactory&&(!this._accessToken||e.url&&e.url.indexOf("/negotiate?")>0)&&(t=!1,this._accessToken=yield this._accessTokenFactory()),this._setAuthorizationHeader(e);let n=yield this._innerClient.send(e);return t&&n.statusCode===401&&this._accessTokenFactory?(this._accessToken=yield this._accessTokenFactory(),this._setAuthorizationHeader(e),yield this._innerClient.send(e)):n})}_setAuthorizationHeader(e){e.headers||(e.headers={}),this._accessToken?e.headers[H.Authorization]=`Bearer ${this._accessToken}`:this._accessTokenFactory&&e.headers[H.Authorization]&&delete e.headers[H.Authorization]}getCookieString(e){return this._innerClient.getCookieString(e)}};var b=function(i){return i[i.None=0]="None",i[i.WebSockets=1]="WebSockets",i[i.ServerSentEvents=2]="ServerSentEvents",i[i.LongPolling=4]="LongPolling",i}(b||{}),w=function(i){return i[i.Text=1]="Text",i[i.Binary=2]="Binary",i}(w||{});var he=class{constructor(){this._isAborted=!1,this.onabort=null}abort(){this._isAborted||(this._isAborted=!0,this.onabort&&this.onabort())}get signal(){return this}get aborted(){return this._isAborted}};var q=class{get pollAborted(){return this._pollAbort.aborted}constructor(e,t,n){this._httpClient=e,this._logger=t,this._pollAbort=new he,this._options=n,this._running=!1,this.onreceive=null,this.onclose=null}connect(e,t){return d(this,null,function*(){if(g.isRequired(e,"url"),g.isRequired(t,"transferFormat"),g.isIn(t,w,"transferFormat"),this._url=e,this._logger.log(s.Trace,"(LongPolling transport) Connecting."),t===w.Binary&&typeof XMLHttpRequest<"u"&&typeof new XMLHttpRequest().responseType!="string")throw new Error("Binary protocols over XmlHttpRequest not implementing advanced features are not supported.");let[n,o]=P(),r=_({[n]:o},this._options.headers),a={abortSignal:this._pollAbort.signal,headers:r,timeout:1e5,withCredentials:this._options.withCredentials};t===w.Binary&&(a.responseType="arraybuffer");let c=`${e}&_=${Date.now()}`;this._logger.log(s.Trace,`(LongPolling transport) polling: ${c}.`);let l=yield this._httpClient.get(c,a);l.statusCode!==200?(this._logger.log(s.Error,`(LongPolling transport) Unexpected response code: ${l.statusCode}.`),this._closeError=new v(l.statusText||"",l.statusCode),this._running=!1):this._running=!0,this._receiving=this._poll(this._url,a)})}_poll(e,t){return d(this,null,function*(){try{for(;this._running;)try{let n=`${e}&_=${Date.now()}`;this._logger.log(s.Trace,`(LongPolling transport) polling: ${n}.`);let o=yield this._httpClient.get(n,t);o.statusCode===204?(this._logger.log(s.Information,"(LongPolling transport) Poll terminated by server."),this._running=!1):o.statusCode!==200?(this._logger.log(s.Error,`(LongPolling transport) Unexpected response code: ${o.statusCode}.`),this._closeError=new v(o.statusText||"",o.statusCode),this._running=!1):o.content?(this._logger.log(s.Trace,`(LongPolling transport) data received. ${N(o.content,this._options.logMessageContent)}.`),this.onreceive&&this.onreceive(o.content)):this._logger.log(s.Trace,"(LongPolling transport) Poll timed out, reissuing.")}catch(n){this._running?n instanceof $?this._logger.log(s.Trace,"(LongPolling transport) Poll timed out, reissuing."):(this._closeError=n,this._running=!1):this._logger.log(s.Trace,`(LongPolling transport) Poll errored after shutdown: ${n.message}`)}}finally{this._logger.log(s.Trace,"(LongPolling transport) Polling complete."),this.pollAborted||this._raiseOnClose()}})}send(e){return d(this,null,function*(){return this._running?ee(this._logger,"LongPolling",this._httpClient,this._url,e,this._options):Promise.reject(new Error("Cannot send until the transport is connected"))})}stop(){return d(this,null,function*(){this._logger.log(s.Trace,"(LongPolling transport) Stopping polling."),this._running=!1,this._pollAbort.abort();try{yield this._receiving,this._logger.log(s.Trace,`(LongPolling transport) sending DELETE request to ${this._url}.`);let e={},[t,n]=P();e[t]=n;let o={headers:_(_({},e),this._options.headers),timeout:this._options.timeout,withCredentials:this._options.withCredentials},r;try{yield this._httpClient.delete(this._url,o)}catch(a){r=a}r?r instanceof v&&(r.statusCode===404?this._logger.log(s.Trace,"(LongPolling transport) A 404 response was returned from sending a DELETE request."):this._logger.log(s.Trace,`(LongPolling transport) Error sending a DELETE request: ${r}`)):this._logger.log(s.Trace,"(LongPolling transport) DELETE request accepted.")}finally{this._logger.log(s.Trace,"(LongPolling transport) Stop finished."),this._raiseOnClose()}})}_raiseOnClose(){if(this.onclose){let e="(LongPolling transport) Firing onclose event.";this._closeError&&(e+=" Error: "+this._closeError),this._logger.log(s.Trace,e),this.onclose(this._closeError)}}};var ue=class{constructor(e,t,n,o){this._httpClient=e,this._accessToken=t,this._logger=n,this._options=o,this.onreceive=null,this.onclose=null}connect(e,t){return d(this,null,function*(){return g.isRequired(e,"url"),g.isRequired(t,"transferFormat"),g.isIn(t,w,"transferFormat"),this._logger.log(s.Trace,"(SSE transport) Connecting."),this._url=e,this._accessToken&&(e+=(e.indexOf("?")<0?"?":"&")+`access_token=${encodeURIComponent(this._accessToken)}`),new Promise((n,o)=>{let r=!1;if(t!==w.Text){o(new Error("The Server-Sent Events transport only supports the 'Text' transfer format"));return}let a;if(p.isBrowser||p.isWebWorker)a=new this._options.EventSource(e,{withCredentials:this._options.withCredentials});else{let c=this._httpClient.getCookieString(e),l={};l.Cookie=c;let[u,f]=P();l[u]=f,a=new this._options.EventSource(e,{withCredentials:this._options.withCredentials,headers:_(_({},l),this._options.headers)})}try{a.onmessage=c=>{if(this.onreceive)try{this._logger.log(s.Trace,`(SSE transport) data received. ${N(c.data,this._options.logMessageContent)}.`),this.onreceive(c.data)}catch(l){this._close(l);return}},a.onerror=c=>{r?this._close():o(new Error("EventSource failed to connect. The connection could not be found on the server, either the connection ID is not present on the server, or a proxy is refusing/buffering the connection. If you have multiple servers check that sticky sessions are enabled."))},a.onopen=()=>{this._logger.log(s.Information,`SSE connected to ${this._url}`),this._eventSource=a,r=!0,n()}}catch(c){o(c);return}})})}send(e){return d(this,null,function*(){return this._eventSource?ee(this._logger,"SSE",this._httpClient,this._url,e,this._options):Promise.reject(new Error("Cannot send until the transport is connected"))})}stop(){return this._close(),Promise.resolve()}_close(e){this._eventSource&&(this._eventSource.close(),this._eventSource=void 0,this.onclose&&this.onclose(e))}};var de=class{constructor(e,t,n,o,r,a){this._logger=n,this._accessTokenFactory=t,this._logMessageContent=o,this._webSocketConstructor=r,this._httpClient=e,this.onreceive=null,this.onclose=null,this._headers=a}connect(e,t){return d(this,null,function*(){g.isRequired(e,"url"),g.isRequired(t,"transferFormat"),g.isIn(t,w,"transferFormat"),this._logger.log(s.Trace,"(WebSockets transport) Connecting.");let n;return this._accessTokenFactory&&(n=yield this._accessTokenFactory()),new Promise((o,r)=>{e=e.replace(/^http/,"ws");let a,c=this._httpClient.getCookieString(e),l=!1;if(p.isNode||p.isReactNative){let u={},[f,D]=P();u[f]=D,n&&(u[H.Authorization]=`Bearer ${n}`),c&&(u[H.Cookie]=c),a=new this._webSocketConstructor(e,void 0,{headers:_(_({},u),this._headers)})}else n&&(e+=(e.indexOf("?")<0?"?":"&")+`access_token=${encodeURIComponent(n)}`);a||(a=new this._webSocketConstructor(e)),t===w.Binary&&(a.binaryType="arraybuffer"),a.onopen=u=>{this._logger.log(s.Information,`WebSocket connected to ${e}.`),this._webSocket=a,l=!0,o()},a.onerror=u=>{let f=null;typeof ErrorEvent<"u"&&u instanceof ErrorEvent?f=u.error:f="There was an error with the transport",this._logger.log(s.Information,`(WebSockets transport) ${f}.`)},a.onmessage=u=>{if(this._logger.log(s.Trace,`(WebSockets transport) data received. ${N(u.data,this._logMessageContent)}.`),this.onreceive)try{this.onreceive(u.data)}catch(f){this._close(f);return}},a.onclose=u=>{if(l)this._close(u);else{let f=null;typeof ErrorEvent<"u"&&u instanceof ErrorEvent?f=u.error:f="WebSocket failed to connect. The connection could not be found on the server, either the endpoint may not be a SignalR endpoint, the connection ID is not present on the server, or there is a proxy blocking WebSockets. If you have multiple servers check that sticky sessions are enabled.",r(new Error(f))}}})})}send(e){return this._webSocket&&this._webSocket.readyState===this._webSocketConstructor.OPEN?(this._logger.log(s.Trace,`(WebSockets transport) sending data. ${N(e,this._logMessageContent)}.`),this._webSocket.send(e),Promise.resolve()):Promise.reject("WebSocket is not in the OPEN state")}stop(){return this._webSocket&&this._close(void 0),Promise.resolve()}_close(e){this._webSocket&&(this._webSocket.onclose=()=>{},this._webSocket.onmessage=()=>{},this._webSocket.onerror=()=>{},this._webSocket.close(),this._webSocket=void 0),this._logger.log(s.Trace,"(WebSockets transport) socket closed."),this.onclose&&(this._isCloseEvent(e)&&(e.wasClean===!1||e.code!==1e3)?this.onclose(new Error(`WebSocket closed with status code: ${e.code} (${e.reason||"no reason given"}).`)):e instanceof Error?this.onclose(e):this.onclose())}_isCloseEvent(e){return e&&typeof e.wasClean=="boolean"&&typeof e.code=="number"}};var Fe=100,fe=class{constructor(e,t={}){if(this._stopPromiseResolver=()=>{},this.features={},this._negotiateVersion=1,g.isRequired(e,"url"),this._logger=Be(t.logger),this.baseUrl=this._resolveUrl(e),t=t||{},t.logMessageContent=t.logMessageContent===void 0?!1:t.logMessageContent,typeof t.withCredentials=="boolean"||t.withCredentials===void 0)t.withCredentials=t.withCredentials===void 0?!0:t.withCredentials;else throw new Error("withCredentials option was not a 'boolean' or 'undefined' value");t.timeout=t.timeout===void 0?100*1e3:t.timeout;let n=null,o=null;if(p.isNode&&typeof L<"u"){let r=typeof __webpack_require__=="function"?__non_webpack_require__:L;n=r("ws"),o=r("eventsource")}!p.isNode&&typeof WebSocket<"u"&&!t.WebSocket?t.WebSocket=WebSocket:p.isNode&&!t.WebSocket&&n&&(t.WebSocket=n),!p.isNode&&typeof EventSource<"u"&&!t.EventSource?t.EventSource=EventSource:p.isNode&&!t.EventSource&&typeof o<"u"&&(t.EventSource=o),this._httpClient=new le(t.httpClient||new ie(this._logger),t.accessTokenFactory),this._connectionState="Disconnected",this._connectionStarted=!1,this._options=t,this.onreceive=null,this.onclose=null}start(e){return d(this,null,function*(){if(e=e||w.Binary,g.isIn(e,w,"transferFormat"),this._logger.log(s.Debug,`Starting connection with transfer format '${w[e]}'.`),this._connectionState!=="Disconnected")return Promise.reject(new Error("Cannot start an HttpConnection that is not in the 'Disconnected' state."));if(this._connectionState="Connecting",this._startInternalPromise=this._startInternal(e),yield this._startInternalPromise,this._connectionState==="Disconnecting"){let t="Failed to start the HttpConnection before stop() was called.";return this._logger.log(s.Error,t),yield this._stopPromise,Promise.reject(new S(t))}else if(this._connectionState!=="Connected"){let t="HttpConnection.startInternal completed gracefully but didn't enter the connection into the connected state!";return this._logger.log(s.Error,t),Promise.reject(new S(t))}this._connectionStarted=!0})}send(e){return this._connectionState!=="Connected"?Promise.reject(new Error("Cannot send data if the connection is not in the 'Connected' State.")):(this._sendQueue||(this._sendQueue=new Ce(this.transport)),this._sendQueue.send(e))}stop(e){return d(this,null,function*(){if(this._connectionState==="Disconnected")return this._logger.log(s.Debug,`Call to HttpConnection.stop(${e}) ignored because the connection is already in the disconnected state.`),Promise.resolve();if(this._connectionState==="Disconnecting")return this._logger.log(s.Debug,`Call to HttpConnection.stop(${e}) ignored because the connection is already in the disconnecting state.`),this._stopPromise;this._connectionState="Disconnecting",this._stopPromise=new Promise(t=>{this._stopPromiseResolver=t}),yield this._stopInternal(e),yield this._stopPromise})}_stopInternal(e){return d(this,null,function*(){this._stopError=e;try{yield this._startInternalPromise}catch{}if(this.transport){try{yield this.transport.stop()}catch(t){this._logger.log(s.Error,`HttpConnection.transport.stop() threw error '${t}'.`),this._stopConnection()}this.transport=void 0}else this._logger.log(s.Debug,"HttpConnection.transport is undefined in HttpConnection.stop() because start() failed.")})}_startInternal(e){return d(this,null,function*(){let t=this.baseUrl;this._accessTokenFactory=this._options.accessTokenFactory,this._httpClient._accessTokenFactory=this._accessTokenFactory;try{if(this._options.skipNegotiation)if(this._options.transport===b.WebSockets)this.transport=this._constructTransport(b.WebSockets),yield this._startTransport(t,e);else throw new Error("Negotiation can only be skipped when using the WebSocket transport directly.");else{let n=null,o=0;do{if(n=yield this._getNegotiationResponse(t),this._connectionState==="Disconnecting"||this._connectionState==="Disconnected")throw new S("The connection was stopped during negotiation.");if(n.error)throw new Error(n.error);if(n.ProtocolVersion)throw new Error("Detected a connection attempt to an ASP.NET SignalR Server. This client only supports connecting to an ASP.NET Core SignalR Server. See https://aka.ms/signalr-core-differences for details.");if(n.url&&(t=n.url),n.accessToken){let r=n.accessToken;this._accessTokenFactory=()=>r,this._httpClient._accessToken=r,this._httpClient._accessTokenFactory=void 0}o++}while(n.url&&o<Fe);if(o===Fe&&n.url)throw new Error("Negotiate redirection limit exceeded.");yield this._createTransport(t,this._options.transport,n,e)}this.transport instanceof q&&(this.features.inherentKeepAlive=!0),this._connectionState==="Connecting"&&(this._logger.log(s.Debug,"The HttpConnection connected successfully."),this._connectionState="Connected")}catch(n){return this._logger.log(s.Error,"Failed to start the connection: "+n),this._connectionState="Disconnected",this.transport=void 0,this._stopPromiseResolver(),Promise.reject(n)}})}_getNegotiationResponse(e){return d(this,null,function*(){let t={},[n,o]=P();t[n]=o;let r=this._resolveNegotiateUrl(e);this._logger.log(s.Debug,`Sending negotiation request: ${r}.`);try{let a=yield this._httpClient.post(r,{content:"",headers:_(_({},t),this._options.headers),timeout:this._options.timeout,withCredentials:this._options.withCredentials});if(a.statusCode!==200)return Promise.reject(new Error(`Unexpected status code returned from negotiate '${a.statusCode}'`));let c=JSON.parse(a.content);return(!c.negotiateVersion||c.negotiateVersion<1)&&(c.connectionToken=c.connectionId),c.useStatefulReconnect&&this._options._useStatefulReconnect!==!0?Promise.reject(new O("Client didn't negotiate Stateful Reconnect but the server did.")):c}catch(a){let c="Failed to complete negotiation with the server: "+a;return a instanceof v&&a.statusCode===404&&(c=c+" Either this is not a SignalR endpoint or there is a proxy blocking the connection."),this._logger.log(s.Error,c),Promise.reject(new O(c))}})}_createConnectUrl(e,t){return t?e+(e.indexOf("?")===-1?"?":"&")+`id=${t}`:e}_createTransport(e,t,n,o){return d(this,null,function*(){let r=this._createConnectUrl(e,n.connectionToken);if(this._isITransport(t)){this._logger.log(s.Debug,"Connection was provided an instance of ITransport, using that directly."),this.transport=t,yield this._startTransport(r,o),this.connectionId=n.connectionId;return}let a=[],c=n.availableTransports||[],l=n;for(let u of c){let f=this._resolveTransportOrError(u,t,o,l?.useStatefulReconnect===!0);if(f instanceof Error)a.push(`${u.transport} failed:`),a.push(f);else if(this._isITransport(f)){if(this.transport=f,!l){try{l=yield this._getNegotiationResponse(e)}catch(D){return Promise.reject(D)}r=this._createConnectUrl(e,l.connectionToken)}try{yield this._startTransport(r,o),this.connectionId=l.connectionId;return}catch(D){if(this._logger.log(s.Error,`Failed to start the transport '${u.transport}': ${D}`),l=void 0,a.push(new Y(`${u.transport} failed: ${D}`,b[u.transport])),this._connectionState!=="Connecting"){let ye="Failed to select transport before stop() was called.";return this._logger.log(s.Debug,ye),Promise.reject(new S(ye))}}}}return a.length>0?Promise.reject(new Q(`Unable to connect to the server with any of the available transports. ${a.join(" ")}`,a)):Promise.reject(new Error("None of the transports supported by the client are supported by the server."))})}_constructTransport(e){switch(e){case b.WebSockets:if(!this._options.WebSocket)throw new Error("'WebSocket' is not supported in your environment.");return new de(this._httpClient,this._accessTokenFactory,this._logger,this._options.logMessageContent,this._options.WebSocket,this._options.headers||{});case b.ServerSentEvents:if(!this._options.EventSource)throw new Error("'EventSource' is not supported in your environment.");return new ue(this._httpClient,this._httpClient._accessToken,this._logger,this._options);case b.LongPolling:return new q(this._httpClient,this._logger,this._options);default:throw new Error(`Unknown transport: ${e}.`)}}_startTransport(e,t){return this.transport.onreceive=this.onreceive,this.features.reconnect?this.transport.onclose=n=>d(this,null,function*(){let o=!1;if(this.features.reconnect)try{this.features.disconnected(),yield this.transport.connect(e,t),yield this.features.resend()}catch{o=!0}else{this._stopConnection(n);return}o&&this._stopConnection(n)}):this.transport.onclose=n=>this._stopConnection(n),this.transport.connect(e,t)}_resolveTransportOrError(e,t,n,o){let r=b[e.transport];if(r==null)return this._logger.log(s.Debug,`Skipping transport '${e.transport}' because it is not supported by this client.`),new Error(`Skipping transport '${e.transport}' because it is not supported by this client.`);if(tt(t,r))if(e.transferFormats.map(c=>w[c]).indexOf(n)>=0){if(r===b.WebSockets&&!this._options.WebSocket||r===b.ServerSentEvents&&!this._options.EventSource)return this._logger.log(s.Debug,`Skipping transport '${b[r]}' because it is not supported in your environment.'`),new X(`'${b[r]}' is not supported in your environment.`,r);this._logger.log(s.Debug,`Selecting transport '${b[r]}'.`);try{return this.features.reconnect=r===b.WebSockets?o:void 0,this._constructTransport(r)}catch(c){return c}}else return this._logger.log(s.Debug,`Skipping transport '${b[r]}' because it does not support the requested transfer format '${w[n]}'.`),new Error(`'${b[r]}' does not support ${w[n]}.`);else return this._logger.log(s.Debug,`Skipping transport '${b[r]}' because it was disabled by the client.`),new G(`'${b[r]}' is disabled by the client.`,r)}_isITransport(e){return e&&typeof e=="object"&&"connect"in e}_stopConnection(e){if(this._logger.log(s.Debug,`HttpConnection.stopConnection(${e}) called while in state ${this._connectionState}.`),this.transport=void 0,e=this._stopError||e,this._stopError=void 0,this._connectionState==="Disconnected"){this._logger.log(s.Debug,`Call to HttpConnection.stopConnection(${e}) was ignored because the connection is already in the disconnected state.`);return}if(this._connectionState==="Connecting")throw this._logger.log(s.Warning,`Call to HttpConnection.stopConnection(${e}) was ignored because the connection is still in the connecting state.`),new Error(`HttpConnection.stopConnection(${e}) was called while the connection is still in the connecting state.`);if(this._connectionState==="Disconnecting"&&this._stopPromiseResolver(),e?this._logger.log(s.Error,`Connection disconnected with error '${e}'.`):this._logger.log(s.Information,"Connection disconnected."),this._sendQueue&&(this._sendQueue.stop().catch(t=>{this._logger.log(s.Error,`TransportSendQueue.stop() threw error '${t}'.`)}),this._sendQueue=void 0),this.connectionId=void 0,this._connectionState="Disconnected",this._connectionStarted){this._connectionStarted=!1;try{this.onclose&&this.onclose(e)}catch(t){this._logger.log(s.Error,`HttpConnection.onclose(${e}) threw error '${t}'.`)}}}_resolveUrl(e){if(e.lastIndexOf("https://",0)===0||e.lastIndexOf("http://",0)===0)return e;if(!p.isBrowser)throw new Error(`Cannot resolve '${e}'.`);let t=window.document.createElement("a");return t.href=e,this._logger.log(s.Information,`Normalizing '${e}' to '${t.href}'.`),t.href}_resolveNegotiateUrl(e){let t=new URL(e);t.pathname.endsWith("/")?t.pathname+="negotiate":t.pathname+="/negotiate";let n=new URLSearchParams(t.searchParams);return n.has("negotiateVersion")||n.append("negotiateVersion",this._negotiateVersion.toString()),n.has("useStatefulReconnect")?n.get("useStatefulReconnect")==="true"&&(this._options._useStatefulReconnect=!0):this._options._useStatefulReconnect===!0&&n.append("useStatefulReconnect","true"),t.search=n.toString(),t.toString()}};function tt(i,e){return!i||(e&i)!==0}var Ce=class i{constructor(e){this._transport=e,this._buffer=[],this._executing=!0,this._sendBufferedData=new B,this._transportResult=new B,this._sendLoopPromise=this._sendLoop()}send(e){return this._bufferData(e),this._transportResult||(this._transportResult=new B),this._transportResult.promise}stop(){return this._executing=!1,this._sendBufferedData.resolve(),this._sendLoopPromise}_bufferData(e){if(this._buffer.length&&typeof this._buffer[0]!=typeof e)throw new Error(`Expected data to be of type ${typeof this._buffer} but was of type ${typeof e}`);this._buffer.push(e),this._sendBufferedData.resolve()}_sendLoop(){return d(this,null,function*(){for(;;){if(yield this._sendBufferedData.promise,!this._executing){this._transportResult&&this._transportResult.reject("Connection stopped.");break}this._sendBufferedData=new B;let e=this._transportResult;this._transportResult=void 0;let t=typeof this._buffer[0]=="string"?this._buffer.join(""):i._concatBuffers(this._buffer);this._buffer.length=0;try{yield this._transport.send(t),e.resolve()}catch(n){e.reject(n)}}})}static _concatBuffers(e){let t=e.map(r=>r.byteLength).reduce((r,a)=>r+a),n=new Uint8Array(t),o=0;for(let r of e)n.set(new Uint8Array(r),o),o+=r.byteLength;return n.buffer}},B=class{constructor(){this.promise=new Promise((e,t)=>[this._resolver,this._rejecter]=[e,t])}resolve(){this._resolver()}reject(e){this._rejecter(e)}};var nt="json",ge=class{constructor(){this.name=nt,this.version=2,this.transferFormat=w.Text}parseMessages(e,t){if(typeof e!="string")throw new Error("Invalid input for JSON hub protocol. Expected a string.");if(!e)return[];t===null&&(t=x.instance);let n=k.parse(e),o=[];for(let r of n){let a=JSON.parse(r);if(typeof a.type!="number")throw new Error("Invalid payload.");switch(a.type){case h.Invocation:this._isInvocationMessage(a);break;case h.StreamItem:this._isStreamItemMessage(a);break;case h.Completion:this._isCompletionMessage(a);break;case h.Ping:break;case h.Close:break;case h.Ack:this._isAckMessage(a);break;case h.Sequence:this._isSequenceMessage(a);break;default:t.log(s.Information,"Unknown message type '"+a.type+"' ignored.");continue}o.push(a)}return o}writeMessage(e){return k.write(JSON.stringify(e))}_isInvocationMessage(e){this._assertNotEmptyString(e.target,"Invalid payload for Invocation message."),e.invocationId!==void 0&&this._assertNotEmptyString(e.invocationId,"Invalid payload for Invocation message.")}_isStreamItemMessage(e){if(this._assertNotEmptyString(e.invocationId,"Invalid payload for StreamItem message."),e.item===void 0)throw new Error("Invalid payload for StreamItem message.")}_isCompletionMessage(e){if(e.result&&e.error)throw new Error("Invalid payload for Completion message.");!e.result&&e.error&&this._assertNotEmptyString(e.error,"Invalid payload for Completion message."),this._assertNotEmptyString(e.invocationId,"Invalid payload for Completion message.")}_isAckMessage(e){if(typeof e.sequenceId!="number")throw new Error("Invalid SequenceId for Ack message.")}_isSequenceMessage(e){if(typeof e.sequenceId!="number")throw new Error("Invalid SequenceId for Sequence message.")}_assertNotEmptyString(e,t){if(typeof e!="string"||e==="")throw new Error(t)}};var ot={trace:s.Trace,debug:s.Debug,info:s.Information,information:s.Information,warn:s.Warning,warning:s.Warning,error:s.Error,critical:s.Critical,none:s.None};function it(i){let e=ot[i.toLowerCase()];if(typeof e<"u")return e;throw new Error(`Unknown log level: ${i}`)}var z=class{configureLogging(e){if(g.isRequired(e,"logging"),rt(e))this.logger=e;else if(typeof e=="string"){let t=it(e);this.logger=new A(t)}else this.logger=new A(e);return this}withUrl(e,t){return g.isRequired(e,"url"),g.isNotEmpty(e,"url"),this.url=e,typeof t=="object"?this.httpConnectionOptions=_(_({},this.httpConnectionOptions),t):this.httpConnectionOptions=M(_({},this.httpConnectionOptions),{transport:t}),this}withHubProtocol(e){return g.isRequired(e,"protocol"),this.protocol=e,this}withAutomaticReconnect(e){if(this.reconnectPolicy)throw new Error("A reconnectPolicy has already been set.");return e?Array.isArray(e)?this.reconnectPolicy=new F(e):this.reconnectPolicy=e:this.reconnectPolicy=new F,this}withServerTimeout(e){return g.isRequired(e,"milliseconds"),this._serverTimeoutInMilliseconds=e,this}withKeepAliveInterval(e){return g.isRequired(e,"milliseconds"),this._keepAliveIntervalInMilliseconds=e,this}withStatefulReconnect(e){return this.httpConnectionOptions===void 0&&(this.httpConnectionOptions={}),this.httpConnectionOptions._useStatefulReconnect=!0,this._statefulReconnectBufferSize=e?.bufferSize,this}build(){let e=this.httpConnectionOptions||{};if(e.logger===void 0&&(e.logger=this.logger),!this.url)throw new Error("The 'HubConnectionBuilder.withUrl' method must be called before building the connection.");let t=new fe(this.url,e);return ce.create(t,this.logger||x.instance,this.protocol||new ge,this.reconnectPolicy,this._serverTimeoutInMilliseconds,this._keepAliveIntervalInMilliseconds,this._statefulReconnectBufferSize)}};function rt(i){return i.log!==void 0}function ct(i,e){if(i&1&&(C(0,"span",11),we(1,"i",12),y(),C(2,"h4",13),I(3),y()),i&2){let t=J();R(3),W(t.data==null?null:t.data.Title)}}function lt(i,e){if(i&1&&(C(0,"span",14),we(1,"i",15),y(),C(2,"h4",16),I(3),y()),i&2){let t=J();R(3),W(t.data==null?null:t.data.Title)}}function ht(i,e){if(i&1&&(C(0,"div",4),I(1),y()),i&2){let t=J();R(),xe(" ",(t.data==null?null:t.data.Message)||"An error occurred during scan."," ")}}var qe=(()=>{class i{constructor(){this.data=pe(Me),this.dialogRef=pe(He),this.modalConfig=new We,this.modalConfig.title="Scan Product Notification",this.modalConfig.customWidth="500px",this.modalConfig.hideOk=!0,this.modalConfig.cancelText="Close",this.modalConfig.headerType=this.data?.StatusCode==200?be.Success:be.Error}onOk(){this.dialogRef.close()}onCancel(){this.dialogRef.close()}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=Ee({type:i,selectors:[["app-dialog-scan-notification"]],decls:26,vars:12,consts:[[3,"onClose","onCancel","onOk","config"],["content",""],[1,"card","shadow","rounded-4","border-0","p-4",2,"background","#f8fafc","margin-bottom","0px"],[1,"d-flex","align-items-center","mb-4"],[1,"alert","alert-danger","fw-bold","mb-4","p-2","rounded-3"],[1,"lh-base","list-group","list-group-flush","mb-3","rounded-3","overflow-hidden"],[1,"list-group-item","bg-transparent","d-flex","justify-content-between","align-items-center"],[1,"fw-semibold","fs-5"],[1,"fw-bold","text-dark","fs-5"],[1,"fw-bold","text-success","fs-5"],[1,"fw-bold","text-danger","fs-5"],[1,"bg-success","bg-opacity-10","rounded-circle","d-flex","align-items-center","justify-content-center","me-3",2,"width","48px","height","48px"],[1,"fas","fa-check-circle","text-success","fs-2"],[1,"mb-0","text-success","fw-bold"],[1,"bg-danger","bg-opacity-10","rounded-circle","d-flex","align-items-center","justify-content-center","me-3",2,"width","48px","height","48px"],[1,"fas","fa-exclamation-triangle","text-danger","fs-2"],[1,"mb-0","text-danger","fw-bold"]],template:function(n,o){n&1&&(C(0,"modal-material",0),Te("onClose",function(){return o.onCancel()})("onCancel",function(){return o.onCancel()})("onOk",function(){return o.onOk()}),C(1,"div",1)(2,"div",2)(3,"div",3),_e(4,ct,4,1)(5,lt,4,1),y(),_e(6,ht,2,1,"div",4),C(7,"ul",5)(8,"li",6)(9,"span",7),I(10,"Total Products Scanned"),y(),C(11,"span",8),I(12),V(13,"number"),y()(),C(14,"li",6)(15,"span",7),I(16,"Products Found"),y(),C(17,"span",9),I(18),V(19,"number"),y()(),C(20,"li",6)(21,"span",7),I(22,"Products Not Found"),y(),C(23,"span",10),I(24),V(25,"number"),y()()()()()()),n&2&&(Ie("config",o.modalConfig),R(4),me(o.data.StatusCode==200?4:5),R(2),me(o.data.StatusCode!=200?6:-1),R(6),W(K(13,6,o.data==null?null:o.data.Total)),R(6),W(K(19,8,o.data==null?null:o.data.Found)),R(6),W(K(25,10,o.data==null?null:o.data.NotFound)))},dependencies:[De,Pe,je],encapsulation:2})}}return i})();var Co=(()=>{class i{constructor(t,n,o,r){this.decodeTokenService=t,this.toastr=n,this.httpService=o,this.dialog=r,this.initNotifications(),this.parseToken=this.decodeTokenService.getParseToken(),this.buildConnection()}initNotifications(){let t=JSON.parse(localStorage.getItem("Notifications"));this._notifications=new ve(t||[])}setNotification(t){let o=[...this._notifications.value,t];this.saveNotificationTotal(o),this._notifications.next(o)}saveNotificationTotal(t=[]){localStorage.setItem("Notifications",JSON.stringify(t))}getNotification(){return this._notifications.asObservable()}getNotificationDetail(t){return this.httpService.post("/api/notification/GetByID",{ID:t})}getNotificationV2Detail(t){return this.httpService.post(Ae.GetJobScanDetail,{ID:t})}buildConnection(){this.hubConnection=new z().withUrl("/MarketplaceHub").withAutomaticReconnect().configureLogging(s.Information).build(),this.startConnection(),this.onConnectionClose(),this.subscribeNotification()}connectToRegister(){this.hubConnection.invoke("SubscribeGroup",this.parseToken.PID)}subscribeToJobGroup(t){try{this.hubConnection.send("SubscribeGroup",t)}catch(n){console.error("Error subscribing to job group:",n)}}startConnection(){this.hubConnection.start().then(()=>{this.connectToRegister()}).catch(t=>console.log("Error while starting connection: "+t))}onConnectionClose(){this.hubConnection.onclose(()=>{this.buildConnection()})}subscribeNotification(){this.hubConnection.on("Notification",t=>{this.handleNotification(t)})}handleNotification(t){if(typeof t=="string"){let n=JSON.parse(t);this.setNotification(n),n.ID==this.parseToken.PID&&(n.StatusCode!=200?this.toastr.error(n.Message,n.Title,{enableHtml:!0}):this.toastr.success(n.Message,n.Title,{enableHtml:!0}))}else{let n=t.message?JSON.parse(t.message):null;this.dialog.open(qe,{data:n,id:"DialogScanNotificationComponent"})}}clearNotification(){localStorage.removeItem("Notifications"),this._notifications.next([])}static{this.\u0275fac=function(n){return new(n||i)(U(Ne),U(Re),U($e),U(Le))}}static{this.\u0275prov=ke({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();export{Co as a};
@@ -1 +1 @@
1
- import{a as o}from"./chunk-G2CMMGM2.js";import{a as s,b as l}from"./chunk-7PN4XLNE.js";import"./chunk-UG7VRDLB.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-TGMCGROM.js";import"./chunk-5HO2IJ47.js";import"./chunk-PW42BQIY.js";import"./chunk-SWQXSJ7O.js";import"./chunk-AEOSNAHH.js";import"./chunk-JXSBFTQM.js";import"./chunk-K5XRGNWG.js";import"./chunk-ATZ475FN.js";import"./chunk-YCH6HHU3.js";import"./chunk-B73M3AMU.js";import{F as c,J as d}from"./chunk-M2FCTYGU.js";import{Gb as a,Yb as i,ic as p,jc as m,kc as n,rb as r}from"./chunk-B7KTCPKC.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";var f=(()=>{class t{constructor(){this.tabs=[{Title:"Origin Order API",Url:"/menu/json-api/order-api"},{Title:"Origin Product API",Url:"/menu/json-api/product-api"},{Title:"Origin Escrow API",Url:"/menu/json-api/escrow-api"}]}static{this.\u0275fac=function(e){return new(e||t)}}static{this.\u0275cmp=a({type:t,selectors:[["app-json-api"]],decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(e,v){e&1&&(p(0,"nav",0)(1,"div",1)(2,"div"),n(3,"nav-tab",2),m()()(),n(4,"router-outlet")),e&2&&(r(3),i("Tabs",v.tabs))},dependencies:[l,s,d,c],encapsulation:2})}}return t})(),g=[{path:"",component:f,children:[{path:"",redirectTo:"order-api",pathMatch:"full"},{path:"order-api",loadComponent(){return import("./chunk-6NHTTVBK.js").then(t=>t.OrderApiComponent)},canActivate:[o],data:{title:"Order API"}},{path:"product-api",loadComponent(){return import("./chunk-WHG5PPSE.js").then(t=>t.ProductApiComponent)},canActivate:[o],data:{title:"Product API"}},{path:"escrow-api",loadComponent(){return import("./chunk-POR3OF22.js").then(t=>t.EscrowApiComponent)},canActivate:[o],data:{title:"Escrow API"}}]}];export{f as JsonApiComponent,g as routes};
1
+ import{a as o}from"./chunk-X743YBE6.js";import{a as s,b as l}from"./chunk-IMK2JGZA.js";import"./chunk-WY4BY2ID.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-AEOSNAHH.js";import"./chunk-TGMCGROM.js";import"./chunk-GRIUDEPO.js";import"./chunk-JXSBFTQM.js";import"./chunk-K5XRGNWG.js";import"./chunk-PW42BQIY.js";import"./chunk-ATZ475FN.js";import"./chunk-SWQXSJ7O.js";import"./chunk-IHNN4Q2N.js";import"./chunk-EQIFZBRG.js";import{F as c,J as d}from"./chunk-M2FCTYGU.js";import{Gb as a,Yb as i,ic as p,jc as m,kc as n,rb as r}from"./chunk-B7KTCPKC.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";var f=(()=>{class t{constructor(){this.tabs=[{Title:"Origin Order API",Url:"/menu/json-api/order-api"},{Title:"Origin Product API",Url:"/menu/json-api/product-api"},{Title:"Origin Escrow API",Url:"/menu/json-api/escrow-api"}]}static{this.\u0275fac=function(e){return new(e||t)}}static{this.\u0275cmp=a({type:t,selectors:[["app-json-api"]],decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(e,v){e&1&&(p(0,"nav",0)(1,"div",1)(2,"div"),n(3,"nav-tab",2),m()()(),n(4,"router-outlet")),e&2&&(r(3),i("Tabs",v.tabs))},dependencies:[l,s,d,c],encapsulation:2})}}return t})(),g=[{path:"",component:f,children:[{path:"",redirectTo:"order-api",pathMatch:"full"},{path:"order-api",loadComponent(){return import("./chunk-LRCKOJEI.js").then(t=>t.OrderApiComponent)},canActivate:[o],data:{title:"Order API"}},{path:"product-api",loadComponent(){return import("./chunk-JF4QOCAZ.js").then(t=>t.ProductApiComponent)},canActivate:[o],data:{title:"Product API"}},{path:"escrow-api",loadComponent(){return import("./chunk-DHIDUIOD.js").then(t=>t.EscrowApiComponent)},canActivate:[o],data:{title:"Escrow API"}}]}];export{f as JsonApiComponent,g as routes};
@@ -0,0 +1 @@
1
+ import{a as pe,b as se,c as ce}from"./chunk-V5BKQSAT.js";import{a as ue,b as A}from"./chunk-ZMEMG7ZN.js";import{a as de}from"./chunk-2ODVHD2K.js";import{a as ae}from"./chunk-EPVCMYCI.js";import"./chunk-DL66NZ2A.js";import"./chunk-L3FX4O3H.js";import"./chunk-PNITO7BE.js";import"./chunk-E4KNET2R.js";import"./chunk-74IXJYWO.js";import"./chunk-GIRXMYNI.js";import"./chunk-IIZDEGGW.js";import"./chunk-AQTXFEBA.js";import"./chunk-SDUUFQUI.js";import"./chunk-5OHRA4AS.js";import"./chunk-IL5JIRWJ.js";import"./chunk-MH4SJTQX.js";import"./chunk-3RK6DDJD.js";import"./chunk-CUB2QFUO.js";import"./chunk-KALG6D6L.js";import"./chunk-CMTBBXR5.js";import{a as me}from"./chunk-KIPJJIYU.js";import{a as oe}from"./chunk-D6URDVES.js";import"./chunk-WY4BY2ID.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-AEOSNAHH.js";import"./chunk-TGMCGROM.js";import"./chunk-GRIUDEPO.js";import"./chunk-JXSBFTQM.js";import"./chunk-K5XRGNWG.js";import"./chunk-5JVEEL2T.js";import"./chunk-PW42BQIY.js";import{m as re,n as le}from"./chunk-UGVEAL7H.js";import{A as te,c as Y,h as Z,m as $,o as ee}from"./chunk-6QYD6NIJ.js";import"./chunk-ATZ475FN.js";import"./chunk-SWQXSJ7O.js";import{r as ie,s as ne}from"./chunk-IHNN4Q2N.js";import"./chunk-EQIFZBRG.js";import{j as J,k as K,m as Q,n as X}from"./chunk-M2FCTYGU.js";import{$c as v,Gb as W,Gc as a,Hc as x,Ic as b,Kc as f,Lc as g,Mb as w,Mc as C,Nc as z,Oc as R,Pc as H,Qc as j,Ra as O,Rc as U,Sc as q,Yb as c,Z as L,ac as I,ad as V,bd as G,dc as y,ec as D,gc as B,hc as k,ic as t,jc as i,kc as u,oc as E,pa as N,pb as F,rb as o,tc as M,uc as _,ya as p,za as s}from"./chunk-B7KTCPKC.js";import"./chunk-EU2KAMEK.js";import{a as T,b as P}from"./chunk-66YHNWRR.js";var _e=()=>[],fe=r=>({"td-cell-hover":r});function ge(r,h){if(r&1&&u(0,"variants-dropdown",27),r&2){let e=_().$implicit;c("variants",e==null?null:e.Variants)}}function Ce(r,h){if(r&1&&u(0,"variant-with-image",28),r&2){let e=_().$implicit;c("variant",e==null?null:e.Variants[0])}}function he(r,h){if(r&1&&(t(0,"span"),a(1),i()),r&2){let e=_().$implicit;o(),b("(",e.LogisticService==null?null:e.LogisticService.Option,")")}}function Se(r,h){if(r&1&&(t(0,"tr")(1,"td")(2,"div",23)(3,"div",24)(4,"div"),u(5,"img",25),v(6,"channelImage"),i(),t(7,"div"),u(8,"order-link",26),i()(),t(9,"small"),a(10),v(11,"date"),i()()(),t(12,"td"),a(13),i(),t(14,"td"),w(15,ge,1,1,"variants-dropdown",27)(16,Ce,1,1,"variant-with-image",28),i(),t(17,"td"),a(18),v(19,"number"),i(),t(20,"td")(21,"div",23)(22,"div",24)(23,"span"),a(24),i(),w(25,he,2,1,"span"),i(),t(26,"small"),a(27),i()()()()),r&2){let e=h.$implicit;o(5),c("src",V(6,12,e==null?null:e.MarketType),F)("alt",e==null||e.Variants[0]==null?null:e.Variants[0].Name),o(3),c("order",e),o(2),b(" ",G(11,14,e==null?null:e.Created,"dd/MM/yyyy HH:mm:ss")," "),o(3),x(e.Customer),o(),I(q(19,fe,(e.Variants==null?null:e.Variants.length)>1)),o(),y((e.Variants==null?null:e.Variants.length)>1?15:16),o(3),x(V(19,17,e.Amount)),o(6),x(e.LogisticService!=null&&e.LogisticService.Name?e.LogisticService==null?null:e.LogisticService.Name:"-"),o(),y(e.LogisticService!=null&&e.LogisticService.Option&&(e.LogisticService==null?null:e.LogisticService.Option)!="Default"?25:-1),o(2),b(" ",e.ReferenceNumber?e.ReferenceNumber:"-"," ")}}function ve(r,h){if(r&1){let e=E();t(0,"div",15)(1,"table",17)(2,"thead",18)(3,"tr",19)(4,"th",20),a(5,"Number"),i(),t(6,"th",20),a(7,"Customer"),i(),t(8,"th"),a(9,"Items"),i(),t(10,"th",21),a(11,"Amount"),i(),t(12,"th",21),a(13,"Shipping"),i()()(),t(14,"tbody"),B(15,Se,28,21,"tr",null,D),i()(),t(17,"app-custom-paginator",22),M("next",function(){p(e);let n=_();return s(n.initAllOrders())})("previous",function(){p(e);let n=_();return s(n.initAllOrders())}),i()()}if(r&2){let e=_(),m=H(0);o(15),k(m),o(2),c("filter",e.filter())("totaldata",m==null?null:m.length)}}function we(r,h){r&1&&(t(0,"div",16),u(1,"app-empty-state"),i())}var Ue=(()=>{class r{constructor(){this.orderService=N(A),this.filter=O({PageNumber:1,PageSize:20,ListChannelID:[],From:null,To:null,Number:null})}ngOnInit(){let e=this.orderService.getOrderDefaultValue();this.filter.update(m=>P(T({},m),{From:e})),this.initAllOrders()}initAllOrders(){this.allOrders$=this.orderService.getAllOrders(this.filter()).pipe(L(1))}static{this.\u0275fac=function(m){return new(m||r)}}static{this.\u0275cmp=W({type:r,selectors:[["app-all"]],features:[j([A])],decls:34,vars:12,consts:[["headerTitle","Completed","searchBoxPlaceHolder","Order Number...",3,"onSubmit","textChange","text"],["href","https://ods.dealpos.app","target","_blank","matTooltip","Monitor your Order & Fulfillment in real-time from TV!",1,"btn","btn-outline-secondary","shadow","rounded","ms-2"],[1,"fa-solid","fa-clipboard-list","me-3"],[1,"fw-bold","mb-2"],[3,"ngModelChange","multiple","ngModel"],[1,"mt-5"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","PageSize",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"table"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","250px"],[2,"width","150px"],["rowCountApi","/api/orders/allcount",3,"next","previous","filter","totaldata"],[1,"lh-sm"],[1,"d-flex","align-items-end","gap-2"],[2,"width","14px","padding-bottom","2.5px",3,"src","alt"],[3,"order"],[3,"variants"],[3,"variant"]],template:function(m,n){if(m&1){let d=E();z(0),v(1,"async"),t(2,"mainpanel",0),M("onSubmit",function(){return p(d),s(n.initAllOrders())}),C("textChange",function(l){return p(d),g(n.filter().Number,l)||(n.filter().Number=l),s(l)}),t(3,"actions")(4,"a",1),u(5,"i",2),t(6,"span"),a(7,"Order Fulfillment Display"),i()()(),t(8,"filters")(9,"div")(10,"label",3),a(11,"From/To"),i(),t(12,"channel-select-options",4),C("ngModelChange",function(l){return p(d),g(n.filter().ListChannelID,l)||(n.filter().ListChannelID=l),s(l)}),i()(),t(13,"div",5)(14,"label",3),a(15,"From/To"),i(),t(16,"div",6)(17,"datepicker",7),C("dateChange",function(l){return p(d),g(n.filter().From,l)||(n.filter().From=l),s(l)}),i()(),t(18,"div")(19,"datepicker",8),C("dateChange",function(l){return p(d),g(n.filter().To,l)||(n.filter().To=l),s(l)}),i()()(),t(20,"div",5)(21,"label",9),a(22,"Page Number"),i(),t(23,"input",10),C("ngModelChange",function(l){return p(d),g(n.filter().PageNumber,l)||(n.filter().PageNumber=l),s(l)}),i()(),t(24,"div",5)(25,"label",9),a(26,"Page Size"),i(),t(27,"input",11),C("ngModelChange",function(l){return p(d),g(n.filter().PageSize,l)||(n.filter().PageSize=l),s(l)}),i()()(),t(28,"content")(29,"div",12)(30,"div",13)(31,"div",14),w(32,ve,18,2,"div",15)(33,we,2,0,"div",16),i()()()()()}if(m&2){let d=R(V(1,8,n.allOrders$)||U(11,_e));o(2),f("text",n.filter().Number),o(10),c("multiple",!0),f("ngModel",n.filter().ListChannelID),o(5),f("date",n.filter().From),o(2),f("date",n.filter().To),o(4),f("ngModel",n.filter().PageNumber),o(4),f("ngModel",n.filter().PageSize),o(5),y((d==null?null:d.length)>0?32:33)}},dependencies:[X,J,Q,K,le,re,ae,oe,te,Y,ee,Z,$,pe,se,ce,de,me,ne,ie,ue],encapsulation:2})}}return r})();export{Ue as AllComponent};