marketplacepos 5.41.0 → 5.41.2

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 (215) hide show
  1. package/Marketplace/3rdpartylicenses.txt +123 -123
  2. package/Marketplace/{chunk-5MRT2EFE.js → chunk-25OT4I3W.js} +1 -1
  3. package/Marketplace/chunk-2BUABOHG.js +1 -0
  4. package/Marketplace/chunk-2SXRC4IG.js +1 -0
  5. package/Marketplace/{chunk-KXZCGKQW.js → chunk-2TZBEYNY.js} +1 -1
  6. package/Marketplace/chunk-2ZTDLZVZ.js +1 -0
  7. package/Marketplace/chunk-33IXC6UG.js +1 -0
  8. package/Marketplace/{chunk-7477X7LJ.js → chunk-4CTORK4F.js} +1 -1
  9. package/Marketplace/{chunk-IRKRLYXS.js → chunk-4DV4IT7R.js} +1 -1
  10. package/Marketplace/chunk-4HZR3O3W.js +1 -0
  11. package/Marketplace/chunk-4JG3ZRYP.js +5 -0
  12. package/Marketplace/{chunk-BUFEIJAI.js → chunk-4M63ID5T.js} +1 -1
  13. package/Marketplace/chunk-4PZ5Q3HI.js +1 -0
  14. package/Marketplace/chunk-4YOHPIVG.js +1 -0
  15. package/Marketplace/{chunk-RVYGL22E.js → chunk-55OI2SUF.js} +1 -1
  16. package/Marketplace/chunk-5B4KSPFM.js +1 -0
  17. package/Marketplace/chunk-5DIRXS7I.js +1 -0
  18. package/Marketplace/chunk-5EQNOCXP.js +1 -0
  19. package/Marketplace/chunk-5JYR3YJW.js +1 -0
  20. package/Marketplace/chunk-5QAURMZF.js +222 -0
  21. package/Marketplace/{chunk-V2OJQHE3.js → chunk-5XI7HWS5.js} +2 -2
  22. package/Marketplace/chunk-5ZX2OVBB.js +1 -0
  23. package/Marketplace/chunk-66YHNWRR.js +1 -0
  24. package/Marketplace/chunk-6IFZ2TO6.js +1 -0
  25. package/Marketplace/{chunk-Q72ZXPDP.js → chunk-6LH7FSOW.js} +1 -1
  26. package/Marketplace/{chunk-OLSC6KHB.js → chunk-6MPSYC77.js} +1 -1
  27. package/Marketplace/chunk-6RSAOZUV.js +1 -0
  28. package/Marketplace/chunk-6SBCWEJJ.js +1 -0
  29. package/Marketplace/chunk-6UEHSA6E.js +1 -0
  30. package/Marketplace/{chunk-BIQHA7UA.js → chunk-6X2OBNJQ.js} +4 -4
  31. package/Marketplace/chunk-7H5ILTTK.js +1 -0
  32. package/Marketplace/{chunk-IYYVZ6B6.js → chunk-A2YNWIX6.js} +1 -1
  33. package/Marketplace/chunk-A4F37V57.js +1 -0
  34. package/Marketplace/{chunk-77IUCPIQ.js → chunk-ACIMXBIC.js} +1 -1
  35. package/Marketplace/chunk-AGRVVEIR.js +397 -0
  36. package/Marketplace/chunk-ALKC77XL.js +78 -0
  37. package/Marketplace/chunk-AVEGIEYT.js +193 -0
  38. package/Marketplace/chunk-BBVWQJ7M.js +1 -0
  39. package/Marketplace/chunk-BM4KX73T.js +1 -0
  40. package/Marketplace/chunk-BQTUAYGY.js +1 -0
  41. package/Marketplace/chunk-C7QA2BEN.js +3 -0
  42. package/Marketplace/chunk-CEQA4PTY.js +1 -0
  43. package/Marketplace/chunk-CMZW5QAE.js +1 -0
  44. package/Marketplace/chunk-CSSG7NAJ.js +1 -0
  45. package/Marketplace/chunk-DG32XLYI.js +1 -0
  46. package/Marketplace/chunk-DJILLV4M.js +1 -0
  47. package/Marketplace/chunk-DS4AAABV.js +1 -0
  48. package/Marketplace/{chunk-ZD5LURJS.js → chunk-E2CS7ZMC.js} +1 -1
  49. package/Marketplace/chunk-EL2JACEW.js +1 -0
  50. package/Marketplace/chunk-EU2KAMEK.js +1 -0
  51. package/Marketplace/chunk-EVLYO3HX.js +1 -0
  52. package/Marketplace/chunk-F4GMWHYJ.js +33 -0
  53. package/Marketplace/{chunk-RGR34QZ3.js → chunk-FBZW4Y3J.js} +1 -1
  54. package/Marketplace/chunk-FFAZ3Q3F.js +1 -0
  55. package/Marketplace/chunk-FUWROOE4.js +265 -0
  56. package/Marketplace/{chunk-6NNAICJE.js → chunk-FWG4H3QG.js} +1 -1
  57. package/Marketplace/chunk-GCECFUOP.js +1 -0
  58. package/Marketplace/{chunk-UBMI3NQH.js → chunk-GHBGGQNM.js} +1 -1
  59. package/Marketplace/chunk-GOS4RIF2.js +1 -0
  60. package/Marketplace/{chunk-IEYFOHME.js → chunk-GPC4DECX.js} +1 -1
  61. package/Marketplace/chunk-GZXQUJKX.js +1 -0
  62. package/Marketplace/chunk-H4PA2O6O.js +1 -0
  63. package/Marketplace/chunk-H6WIS2HR.js +2 -0
  64. package/Marketplace/{chunk-TMFFA26Y.js → chunk-HFKKITEW.js} +1 -1
  65. package/Marketplace/chunk-HPGFBOM4.js +1 -0
  66. package/Marketplace/{chunk-KHWTOD6H.js → chunk-HPYTL6TX.js} +1 -1
  67. package/Marketplace/chunk-HTQJCQ32.js +1 -0
  68. package/Marketplace/chunk-IARG7PLL.js +1 -0
  69. package/Marketplace/chunk-IIMHYIRJ.js +1 -0
  70. package/Marketplace/{chunk-GBABJLPQ.js → chunk-IKPRRD5D.js} +1 -1
  71. package/Marketplace/{chunk-EGTYAIU5.js → chunk-JOBWFOGC.js} +1 -1
  72. package/Marketplace/{chunk-PPDHTO44.js → chunk-JRWFZQ5K.js} +1 -1
  73. package/Marketplace/chunk-JS55A2RS.js +7 -0
  74. package/Marketplace/chunk-JV4MMNGD.js +79 -0
  75. package/Marketplace/chunk-K6YEZYU4.js +5 -0
  76. package/Marketplace/{chunk-KQOYVGBL.js → chunk-KJHSB4A2.js} +1 -1
  77. package/Marketplace/chunk-KOKHDU4I.js +1 -0
  78. package/Marketplace/{chunk-GBXNTL4E.js → chunk-KQQCKHF3.js} +1 -1
  79. package/Marketplace/chunk-KTIKLSOU.js +1 -0
  80. package/Marketplace/chunk-KTXS7IPU.js +1 -0
  81. package/Marketplace/chunk-KWQS4KX7.js +1 -0
  82. package/Marketplace/{chunk-COBHWPGI.js → chunk-KX5AWR75.js} +1 -1
  83. package/Marketplace/chunk-KXS76PRS.js +70 -0
  84. package/Marketplace/chunk-KYIY3VQ6.js +141 -0
  85. package/Marketplace/{chunk-J7AGLBPL.js → chunk-LHD7CYML.js} +1 -1
  86. package/Marketplace/chunk-LOPJ3O56.js +1 -0
  87. package/Marketplace/chunk-LR4UZ2OS.js +30 -0
  88. package/Marketplace/{chunk-M3SJUKTG.js → chunk-LSXUXG54.js} +1 -1
  89. package/Marketplace/chunk-LWSRD5LF.js +1 -0
  90. package/Marketplace/{chunk-Q2OEJFVT.js → chunk-M5IQRAHV.js} +1 -1
  91. package/Marketplace/{chunk-3BGJ2T6Y.js → chunk-MCJRJUAO.js} +1 -1
  92. package/Marketplace/chunk-MGVYUYPC.js +15 -0
  93. package/Marketplace/chunk-MP43HA4R.js +1 -0
  94. package/Marketplace/{chunk-RIHLYYZU.js → chunk-MQXPOHBV.js} +1 -1
  95. package/Marketplace/chunk-MTUIRWOB.js +2 -0
  96. package/Marketplace/chunk-MZI5AYCE.js +1 -0
  97. package/Marketplace/{chunk-JBKHY4HH.js → chunk-NRCXYGO3.js} +5 -5
  98. package/Marketplace/chunk-NTW6FBP5.js +1 -0
  99. package/Marketplace/chunk-NZA4BEER.js +102 -0
  100. package/Marketplace/chunk-O55KM5KY.js +1 -0
  101. package/Marketplace/{chunk-G6EG5QJS.js → chunk-OKAPL3YZ.js} +1 -1
  102. package/Marketplace/{chunk-WAW37FIG.js → chunk-OZ77CAJD.js} +1 -1
  103. package/Marketplace/chunk-OZ7LWNOK.js +15 -0
  104. package/Marketplace/chunk-P5FCWMYK.js +1 -0
  105. package/Marketplace/{chunk-NR7IH2JG.js → chunk-PBGDP6XV.js} +1 -1
  106. package/Marketplace/chunk-PE5AFID4.js +1 -0
  107. package/Marketplace/chunk-PEA6KVUS.js +252 -0
  108. package/Marketplace/{chunk-7TWBIV3T.js → chunk-PO7JVKK3.js} +1 -1
  109. package/Marketplace/chunk-PW42BQIY.js +1 -0
  110. package/Marketplace/chunk-Q6V3IOGL.js +1 -0
  111. package/Marketplace/{chunk-AQMHZFKJ.js → chunk-R5TTZPDX.js} +11 -11
  112. package/Marketplace/{chunk-75BDXSG3.js → chunk-R76V3PTN.js} +10 -10
  113. package/Marketplace/chunk-REL734JM.js +1 -0
  114. package/Marketplace/chunk-RHRJXX4W.js +1 -0
  115. package/Marketplace/chunk-S3YMF63V.js +1 -0
  116. package/Marketplace/chunk-SD7M7HOB.js +1 -0
  117. package/Marketplace/{chunk-VGXQU74M.js → chunk-SH7KN2AS.js} +1 -1
  118. package/Marketplace/{chunk-CH2MLZU7.js → chunk-SIYMMMKQ.js} +1 -1
  119. package/Marketplace/chunk-SLQA5QBT.js +1 -0
  120. package/Marketplace/chunk-SRJREA2O.js +5 -0
  121. package/Marketplace/{chunk-QCZIDOKW.js → chunk-SXLKJLAE.js} +1 -1
  122. package/Marketplace/{chunk-6IAGGRZN.js → chunk-SYENQYR7.js} +1 -1
  123. package/Marketplace/chunk-T4K3CJ2R.js +1 -0
  124. package/Marketplace/{chunk-V5WYSCVT.js → chunk-TGMCGROM.js} +1 -1
  125. package/Marketplace/{chunk-OE2JYQHN.js → chunk-TNKPTRB3.js} +1 -1
  126. package/Marketplace/chunk-TQ4ZLZ7C.js +1 -0
  127. package/Marketplace/chunk-TQIIWFRF.js +1 -0
  128. package/Marketplace/chunk-UDQBFSOV.js +1 -0
  129. package/Marketplace/chunk-UF4FKEE7.js +93 -0
  130. package/Marketplace/chunk-UJYSVGLV.js +1 -0
  131. package/Marketplace/{chunk-5GX2GLRY.js → chunk-UMY6NG57.js} +1 -1
  132. package/Marketplace/{chunk-YXFTLQ5M.js → chunk-UPYS4A4M.js} +1 -1
  133. package/Marketplace/chunk-UYW53K3I.js +1 -0
  134. package/Marketplace/chunk-VRI3CYGG.js +1 -0
  135. package/Marketplace/{chunk-6XFYITUD.js → chunk-WGXUKTYP.js} +1 -1
  136. package/Marketplace/{chunk-ZZVNB72Q.js → chunk-WHZ44BAL.js} +1 -1
  137. package/Marketplace/chunk-WTAJSWM2.js +4 -0
  138. package/Marketplace/chunk-WX5S3HCU.js +1 -0
  139. package/Marketplace/{chunk-MNFHFW3E.js → chunk-XEMNZHW6.js} +1 -1
  140. package/Marketplace/chunk-XGYBJAFE.js +1 -0
  141. package/Marketplace/{chunk-J3P46Z53.js → chunk-XQGRC7V2.js} +1 -1
  142. package/Marketplace/chunk-YP2IPJ2O.js +1 -0
  143. package/Marketplace/{chunk-YR2WEZDG.js → chunk-YPVYJUXS.js} +1 -1
  144. package/Marketplace/chunk-Z3ITXK3D.js +1 -0
  145. package/Marketplace/chunk-Z3KD73SP.js +2 -0
  146. package/Marketplace/chunk-ZAVDOMSW.js +1 -0
  147. package/Marketplace/chunk-ZGZ74AJR.js +1 -0
  148. package/Marketplace/{chunk-GHQH62TZ.js → chunk-ZIOAOUAM.js} +1 -1
  149. package/Marketplace/{chunk-2G6NLWKN.js → chunk-ZIUDNFYT.js} +1 -1
  150. package/Marketplace/chunk-ZLNGASME.js +1 -0
  151. package/Marketplace/chunk-ZNDU44GH.js +51 -0
  152. package/Marketplace/{chunk-7FUVW73P.js → chunk-ZR5IXNXB.js} +1 -1
  153. package/Marketplace/index.html +3 -3
  154. package/Marketplace/main-SPNULRF2.js +1 -0
  155. package/Marketplace/{styles-NJFTKO3E.css → styles-X3FXEB7T.css} +1 -1
  156. package/package.json +1 -1
  157. package/Marketplace/chunk-2BBMPSAE.js +0 -93
  158. package/Marketplace/chunk-2Q5YW6MY.js +0 -2
  159. package/Marketplace/chunk-2SUNUZ5Y.js +0 -3
  160. package/Marketplace/chunk-3HTZTPHD.js +0 -1
  161. package/Marketplace/chunk-3ZWNYMH7.js +0 -1
  162. package/Marketplace/chunk-4ASUM4N5.js +0 -1
  163. package/Marketplace/chunk-4G3QN54S.js +0 -193
  164. package/Marketplace/chunk-56YK4SLT.js +0 -1
  165. package/Marketplace/chunk-5FBFUPHZ.js +0 -1
  166. package/Marketplace/chunk-62PFQNHJ.js +0 -1
  167. package/Marketplace/chunk-6ALHX2I4.js +0 -1
  168. package/Marketplace/chunk-6EV6VQBQ.js +0 -1
  169. package/Marketplace/chunk-7GQIIDFF.js +0 -4
  170. package/Marketplace/chunk-AMXLXRQK.js +0 -1
  171. package/Marketplace/chunk-BGEYIOMP.js +0 -1
  172. package/Marketplace/chunk-D54NUPYF.js +0 -153
  173. package/Marketplace/chunk-DI4V7KMK.js +0 -1
  174. package/Marketplace/chunk-DPLEMBB4.js +0 -1
  175. package/Marketplace/chunk-DZ2EE5MV.js +0 -1
  176. package/Marketplace/chunk-E3HMIPER.js +0 -2
  177. package/Marketplace/chunk-EDG73HHT.js +0 -4
  178. package/Marketplace/chunk-EIGDGRRL.js +0 -1
  179. package/Marketplace/chunk-G5MO6R5Z.js +0 -1
  180. package/Marketplace/chunk-GPEVUTDI.js +0 -2
  181. package/Marketplace/chunk-HKYVBAMV.js +0 -1
  182. package/Marketplace/chunk-I6JDDQC2.js +0 -5
  183. package/Marketplace/chunk-IIJMZKPL.js +0 -1
  184. package/Marketplace/chunk-K2H6WANG.js +0 -1
  185. package/Marketplace/chunk-K64THYES.js +0 -1
  186. package/Marketplace/chunk-KP4WSF75.js +0 -1
  187. package/Marketplace/chunk-KQ546ATX.js +0 -1
  188. package/Marketplace/chunk-KQAQTVXQ.js +0 -1
  189. package/Marketplace/chunk-KVP6OL4J.js +0 -2
  190. package/Marketplace/chunk-L4NLJBLA.js +0 -1
  191. package/Marketplace/chunk-LPXBSHUI.js +0 -180
  192. package/Marketplace/chunk-MATSRG2L.js +0 -447
  193. package/Marketplace/chunk-MNQZPU5N.js +0 -1
  194. package/Marketplace/chunk-NEIZYQV3.js +0 -1
  195. package/Marketplace/chunk-PXB4YEY3.js +0 -1
  196. package/Marketplace/chunk-QNT7YFQS.js +0 -1
  197. package/Marketplace/chunk-RLLHX27L.js +0 -1
  198. package/Marketplace/chunk-RNM3GVNZ.js +0 -1
  199. package/Marketplace/chunk-SE2DPPGP.js +0 -1
  200. package/Marketplace/chunk-SMZ7F54P.js +0 -5
  201. package/Marketplace/chunk-SXW52HYQ.js +0 -1
  202. package/Marketplace/chunk-T5ONJF63.js +0 -7
  203. package/Marketplace/chunk-T6QOFDEE.js +0 -1
  204. package/Marketplace/chunk-TAO67VCP.js +0 -1
  205. package/Marketplace/chunk-TQ2P22BQ.js +0 -1
  206. package/Marketplace/chunk-TRHB4HA4.js +0 -1
  207. package/Marketplace/chunk-V6IVDZR7.js +0 -2
  208. package/Marketplace/chunk-VETHPEVU.js +0 -1
  209. package/Marketplace/chunk-VSEWXNVC.js +0 -291
  210. package/Marketplace/chunk-XITXJ764.js +0 -15
  211. package/Marketplace/chunk-XM6GN4VF.js +0 -1
  212. package/Marketplace/chunk-XYIY2TDE.js +0 -1
  213. package/Marketplace/chunk-Y3U6BFV5.js +0 -1
  214. package/Marketplace/chunk-YIUQQGOQ.js +0 -1
  215. package/Marketplace/main-DNC2TBQ6.js +0 -1
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"marketplacepos","version":"5.41.0"}
1
+ {"name":"marketplacepos","version":"5.41.2"}
@@ -1,93 +0,0 @@
1
- import{a as fe,b as de}from"./chunk-MATSRG2L.js";import{a as ce}from"./chunk-D54NUPYF.js";import{Y as se,Z as x,ea as pe}from"./chunk-4G3QN54S.js";import{e as ie}from"./chunk-BUFEIJAI.js";import{r as re,s as ne}from"./chunk-TMFFA26Y.js";import{a as te,h as ae,m as oe,y as le}from"./chunk-DPLEMBB4.js";import{b as g,c as i}from"./chunk-PXB4YEY3.js";import{i as Z,j as ee,n as w}from"./chunk-GPEVUTDI.js";import{Ca as T,Dc as M,Eb as v,Ec as N,Fb as j,Gc as U,Ib as P,Ic as H,Jc as q,Ka as V,Kb as b,Kc as J,Oc as S,Qa as k,Wb as m,Yb as z,Z as L,Zc as K,_c as Q,aa as f,ad as X,bc as B,ea as s,g as c,gc as C,hc as _,ia as A,ja as y,ka as O,lc as I,mc as W,pa as d,q as p,qb as F,rc as G,sc as n,tc as R,uc as Y,xa as E,ya as h,za as u}from"./chunk-T5ONJF63.js";var he=(()=>{class t{constructor(){this.httpService=d(ie),this.shopeeCategories=new c({data:[],isFirstLoad:!1}),this.tiktokCategories=new c({data:[],isFirstLoad:!1}),this.lazadaCategories=new c({data:[],isFirstLoad:!1}),this.tokopediaCategories=new c({data:[],isFirstLoad:!1}),this.wooCommerceCategories=new c({data:[],isFirstLoad:!1})}getCategories(e,o){switch(e){case g.Shopee:return this.shopeeCategories.asObservable().pipe(f(a=>a.isFirstLoad?p(a.data):this.getShopeeCategories(o)));case g.Tiktok:return this.tiktokCategories.asObservable().pipe(f(a=>a.isFirstLoad?p(a.data):this.getTiktokCategories(o)));case g.Lazada:return this.lazadaCategories.asObservable().pipe(f(a=>a.isFirstLoad?p(a.data):this.getLazadaCategories(o)));case g.Tokopedia:return this.tokopediaCategories.asObservable().pipe(f(a=>a.isFirstLoad?p(a.data):this.getTokopediaCategories(o)));case g.WooCommerce:return this.wooCommerceCategories.asObservable().pipe(f(a=>a.isFirstLoad?p(a.data):this.getWooCommerceCategories(o)));default:return p([])}}getShopeeCategories(e){return this.httpService.get("api/product/shopee/GetCategories",[{key:"ID",value:e}]).pipe(s(a=>{let l={data:a,isFirstLoad:!0};this.shopeeCategories.next(l)}))}getTiktokCategories(e){return this.httpService.get("api/product/tiktok/GetCategories",[{key:"ID",value:e}]).pipe(s(a=>{let l={data:a,isFirstLoad:!0};this.tiktokCategories.next(l)}))}getLazadaCategories(e){return this.httpService.get("api/product/lazada/GetCategories",[{key:"ID",value:e}]).pipe(s(a=>{let l={data:a,isFirstLoad:!0};this.lazadaCategories.next(l)}))}getTokopediaCategories(e){return this.httpService.get("api/product/tokopedia/GetCategories",[{key:"ID",value:e}]).pipe(s(a=>{let l={data:a,isFirstLoad:!0};this.tokopediaCategories.next(l)}))}getWooCommerceCategories(e){return this.httpService.get("api/product/woo/GetCategories",[{key:"ID",value:e}]).pipe(s(a=>{let l={data:a,isFirstLoad:!0};this.wooCommerceCategories.next(l)}))}searchByIdWithParentDFS(e,o){let a=[...e];for(;a.length>0;){let l=a.pop();if(l.id===JSON.stringify(o))return l;if(l.children&&l.children.length>0)for(let $ of l.children)$.parent=l,a.push($)}return null}searchSelectAbleNode(e){let o=null;if(e.selectable)return e;let a=e.children?e.children:[];if(a.length==0)return e;for(let l of a){if(l.children.length==0&&l.selectable)return l;if(o=this.searchSelectAbleNode(l),o)return o}return o}generateCategoryLabel(e){let o="";return e?o=i.getLabelPathTree(e):o="Select a Category",o}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275prov=y({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var me=["*"],Ce=({dt:t})=>`
2
- .p-floatlabel {
3
- display: block;
4
- position: relative;
5
- }
6
-
7
- .p-floatlabel label {
8
- position: absolute;
9
- pointer-events: none;
10
- top: 50%;
11
- transform: translateY(-50%);
12
- transition-property: all;
13
- transition-timing-function: ease;
14
- line-height: 1;
15
- font-weight: ${t("floatlabel.font.weight")};
16
- inset-inline-start: ${t("floatlabel.position.x")};
17
- color: ${t("floatlabel.color")};
18
- transition-duration: ${t("floatlabel.transition.duration")};
19
- }
20
-
21
- .p-floatlabel:has(.p-textarea) label {
22
- top: ${t("floatlabel.position.y")};
23
- transform: translateY(0);
24
- }
25
-
26
- .p-floatlabel:has(.p-inputicon:first-child) label {
27
- inset-inline-start: calc((${t("form.field.padding.x")} * 2) + ${t("icon.size")});
28
- }
29
-
30
- .p-floatlabel:has(.ng-invalid.ng-dirty) label {
31
- color: ${t("floatlabel.invalid.color")};
32
- }
33
-
34
- .p-floatlabel:has(input:focus) label,
35
- .p-floatlabel:has(input.p-filled) label,
36
- .p-floatlabel:has(input:-webkit-autofill) label,
37
- .p-floatlabel:has(textarea:focus) label,
38
- .p-floatlabel:has(textarea.p-filled) label,
39
- .p-floatlabel:has(.p-inputwrapper-focus) label,
40
- .p-floatlabel:has(.p-inputwrapper-filled) label {
41
- top: ${t("floatlabel.over.active.top")};
42
- transform: translateY(0);
43
- font-size: ${t("floatlabel.active.font.size")};
44
- font-weight: ${t("floatlabel.label.active.font.weight")};
45
- }
46
-
47
- .p-floatlabel:has(input.p-filled) label,
48
- .p-floatlabel:has(textarea.p-filled) label,
49
- .p-floatlabel:has(.p-inputwrapper-filled) label {
50
- color: ${t("floatlabel.active.color")};
51
- }
52
-
53
- .p-floatlabel:has(input:focus) label,
54
- .p-floatlabel:has(input:-webkit-autofill) label,
55
- .p-floatlabel:has(textarea:focus) label,
56
- .p-floatlabel:has(.p-inputwrapper-focus) label {
57
- color: ${t("floatlabel.focus.color")};
58
- }
59
-
60
- .p-floatlabel-in .p-inputtext,
61
- .p-floatlabel-in .p-textarea,
62
- .p-floatlabel-in .p-select-label,
63
- .p-floatlabel-in .p-multiselect-label-container,
64
- .p-floatlabel-in .p-autocomplete-input-multiple,
65
- .p-floatlabel-in .p-cascadeselect-label,
66
- .p-floatlabel-in .p-treeselect-label {
67
- padding-top: ${t("floatlabel.in.input.padding.top")};
68
- }
69
-
70
- .p-floatlabel-in:has(input:focus) label,
71
- .p-floatlabel-in:has(input.p-filled) label,
72
- .p-floatlabel-in:has(input:-webkit-autofill) label,
73
- .p-floatlabel-in:has(textarea:focus) label,
74
- .p-floatlabel-in:has(textarea.p-filled) label,
75
- .p-floatlabel-in:has(.p-inputwrapper-focus) label,
76
- .p-floatlabel-in:has(.p-inputwrapper-filled) label {
77
- top: ${t("floatlabel.in.active.top")};
78
- }
79
-
80
- .p-floatlabel-on:has(input:focus) label,
81
- .p-floatlabel-on:has(input.p-filled) label,
82
- .p-floatlabel-on:has(input:-webkit-autofill) label,
83
- .p-floatlabel-on:has(textarea:focus) label,
84
- .p-floatlabel-on:has(textarea.p-filled) label,
85
- .p-floatlabel-on:has(.p-inputwrapper-focus) label,
86
- .p-floatlabel-on:has(.p-inputwrapper-filled) label {
87
- top: 0;
88
- transform: translateY(-50%);
89
- border-radius: ${t("floatlabel.on.border.radius")};
90
- background: ${t("floatlabel.on.active.background")};
91
- padding: ${t("floatlabel.on.active.padding")};
92
- }
93
- `,ye={root:({instance:t,props:r})=>["p-floatlabel",{"p-floatlabel-over":r.variant==="over","p-floatlabel-on":r.variant==="on","p-floatlabel-in":r.variant==="in"}]},ue=(()=>{class t extends pe{name="floatlabel";theme=Ce;classes=ye;static \u0275fac=(()=>{let e;return function(a){return(e||(e=T(t)))(a||t)}})();static \u0275prov=y({token:t,factory:t.\u0275fac})}return t})();var D=(()=>{class t extends ce{_componentStyle=d(ue);variant="over";static \u0275fac=(()=>{let e;return function(a){return(e||(e=T(t)))(a||t)}})();static \u0275cmp=v({type:t,selectors:[["p-floatlabel"],["p-floatLabel"],["p-float-label"]],hostVars:8,hostBindings:function(o,a){o&2&&z("p-floatlabel",!0)("p-floatlabel-over",a.variant==="over")("p-floatlabel-on",a.variant==="on")("p-floatlabel-in",a.variant==="in")},inputs:{variant:"variant"},features:[S([ue]),P],ngContentSelectors:me,decls:1,vars:0,template:function(o,a){o&1&&(R(),Y(0))},dependencies:[w,x],encapsulation:2,changeDetection:0})}return t})(),be=(()=>{class t{static \u0275fac=function(o){return new(o||t)};static \u0275mod=j({type:t});static \u0275inj=O({imports:[D,x,x]})}return t})();function _e(t,r){t&1&&I(0)}function Se(t,r){if(t&1&&(C(0,"p-floatLabel",1),b(1,_e,1,0,"ng-container",2),C(2,"label",3),N(3,"Category"),_()()),t&2){n();let e=M(3);F(),m("ngTemplateOutlet",e)}}function we(t,r){t&1&&I(0)}function xe(t,r){if(t&1&&b(0,we,1,0,"ng-container",2),t&2){n();let e=M(3);m("ngTemplateOutlet",e)}}function Le(t,r){if(t&1&&(C(0,"div",6),N(1),_()),t&2){let e=n(2);m("matTooltip",e.selectedCategoryLabel()),F(),U(" ",e.selectedCategoryLabel()," ")}}function Te(t,r){if(t&1){let e=W();C(0,"p-treeSelect",4),K(1,"async"),J("ngModelChange",function(a){h(e);let l=n();return q(l.selectedNode,a)||(l.selectedNode=a),u(a)}),G("click",function(){h(e);let a=n();return u(a.onClickSelect())})("onNodeSelect",function(a){h(e);let l=n();return u(l.onNodeSelect(a))})("onClear",function(){h(e);let a=n();return u(a.onNodeUnselect())}),b(2,Le,2,2,"ng-template",5),_()}if(t&2){let e=n();H("ngModel",e.selectedNode),m("filter",!0)("options",Q(1,5,e.categories$))("showClear",e.showClear)("disabled",e.disabled)}}var st=(()=>{class t{constructor(){this.categoryService=d(he),this.showClear=!1,this.showLabel=!1,this.disabled=!1,this.selectedCategory=new V,this.selectedCategoryLabel=k("Select a Category"),this.selectedNode=k(null),this.onChange=e=>{},this.onTouched=()=>{}}ngOnChanges(e){let o=e?.categoryId?.previousValue,a=e?.categoryId?.currentValue;i.IsEmpty(o)&&i.IsNotEmpty(a)&&this.initCategories(),i.IsEmpty(a)&&i.IsNotEmpty(o)&&this.generateCategoryLabel(null)}initCategories(){this.categories$=this.categoryService.getCategories(this.channelType,this.channelId).pipe(s(e=>this.setDefaultCategory(e)),L(1))}setDefaultCategory(e){try{let o=this.categoryService.searchByIdWithParentDFS(e,this.categoryId);o&&(this.generateCategoryLabel(o),this.selectedNode.set(o))}catch(o){console.error(o)}}onClickSelect(){this.disabled==!1&&(this.categories$=this.categoryService.getCategories(this.channelType,this.channelId).pipe(L(1)))}onNodeSelect(e){let o=this.categoryService.searchSelectAbleNode(e.node);this.selectedCategoryLabel.set(i.getLabelPathTree(o));let a=parseInt(o.id);this.onChange(a),this.selectedCategory.emit(a)}onNodeUnselect(){this.selectedCategoryLabel.set("Select a Category"),this.selectedCategory.emit(null)}generateCategoryLabel(e){e?this.selectedCategoryLabel.set(i.getLabelPathTree(e)):this.selectedCategoryLabel.set("Select a Category")}writeValue(e){i.IsNotEmpty(e)&&(this.categoryId=e,this.initCategories())}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this.disabled=e}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275cmp=v({type:t,selectors:[["app-channel-category-select"]],inputs:{channelId:"channelId",channelType:"channelType",categoryId:"categoryId",showClear:"showClear",showLabel:"showLabel",disabled:"disabled"},outputs:{selectedCategory:"selectedCategory"},features:[S([{provide:te,useExisting:A(()=>t),multi:!0}]),E],decls:4,vars:1,consts:[["categorySelectTemplate",""],["variant","on",1,"w-100"],[4,"ngTemplateOutlet"],["for","selectCategory",1,"tree-category-label"],["appendTo","body","containerStyleClass","w-100","placeholder","Select a Category","id","selectCategory","inputId","selectCategory",3,"ngModelChange","click","onNodeSelect","onClear","ngModel","filter","options","showClear","disabled"],["pTemplate","value"],["matTooltipPosition","above",3,"matTooltip"]],template:function(o,a){o&1&&b(0,Se,4,1,"p-floatLabel",1)(1,xe,1,1,"ng-container")(2,Te,3,7,"ng-template",null,0,X),o&2&&B(a.showLabel?0:1)},dependencies:[w,Z,ee,de,fe,se,ne,re,le,ae,oe,be,D],styles:[".p-overlay.p-component{z-index:10000000000000000000000!important} .p-treeselect-panel .p-treeselect-items-wrapper .p-tree{padding-left:4px!important} .p-inputwrapper-filled~label.tree-category-label{left:.5rem!important}"]})}}return t})();export{he as a,st as b};
@@ -1,2 +0,0 @@
1
- import{a as ke}from"./chunk-XM6GN4VF.js";import"./chunk-7477X7LJ.js";import{a as N}from"./chunk-NR7IH2JG.js";import{a as H}from"./chunk-XHAXYWZ7.js";import{a as Me,b as Pe,c as De,d as G}from"./chunk-KQAQTVXQ.js";import{a as ye,b as Ie,c as we}from"./chunk-RGR34QZ3.js";import{b as Ve}from"./chunk-IEYFOHME.js";import{a as Te,b as Ee}from"./chunk-YXFTLQ5M.js";import"./chunk-MATSRG2L.js";import"./chunk-V2OJQHE3.js";import"./chunk-6XFYITUD.js";import"./chunk-LPXBSHUI.js";import"./chunk-D54NUPYF.js";import{a as be}from"./chunk-EGTYAIU5.js";import"./chunk-7TWBIV3T.js";import"./chunk-J7AGLBPL.js";import"./chunk-6ALHX2I4.js";import"./chunk-4G3QN54S.js";import"./chunk-3RK6DDJD.js";import"./chunk-CH2MLZU7.js";import"./chunk-ZZVNB72Q.js";import{a as Fe}from"./chunk-VGXQU74M.js";import"./chunk-SDUUFQUI.js";import"./chunk-G6EG5QJS.js";import"./chunk-RIHLYYZU.js";import"./chunk-Q2OEJFVT.js";import{e as he}from"./chunk-6IAGGRZN.js";import"./chunk-T6QOFDEE.js";import"./chunk-KXZCGKQW.js";import"./chunk-QCZIDOKW.js";import{l as ue}from"./chunk-2SUNUZ5Y.js";import{b as me,e as _e}from"./chunk-BUFEIJAI.js";import"./chunk-K5XRGNWG.js";import"./chunk-V5WYSCVT.js";import"./chunk-KHWTOD6H.js";import{d as xe,k as fe,l as Se,m as ve}from"./chunk-BIQHA7UA.js";import{r as Ce,s as ge}from"./chunk-TMFFA26Y.js";import"./chunk-WAW37FIG.js";import{b as ae,c as le,h as re,m as se,o as ce,y as pe}from"./chunk-DPLEMBB4.js";import{c as f,f as de}from"./chunk-PXB4YEY3.js";import{d as J,g as ee,j as te,k as ne,m as ie,n as oe}from"./chunk-GPEVUTDI.js";import{$c as R,Dc as Q,Eb as Z,Ec as c,Fc as D,G as Y,Gc as E,Ic as b,Jc as F,Kb as h,Kc as T,Oc as X,Qa as W,Qc as k,Wb as d,Z as B,Zc as g,_c as v,ad as z,bc as y,cc as O,ea as $,ec as U,fc as j,gc as a,hc as r,ic as x,jc as M,kc as P,mc as S,ob as V,pa as K,qb as s,rc as C,sc as l,v as A,vc as q,wb as w,ya as m,za as _}from"./chunk-T5ONJF63.js";import{a as L}from"./chunk-K2H6WANG.js";var Le=i=>({"text-decoration-line-through":i}),Ae=i=>({"ms-10":i}),Be=i=>({"bg-gradient-warning":i});function $e(i,p){if(i&1){let e=S();a(0,"button",38),C("click",function(){m(e);let t=l().ngIf,n=l(2);return _(n.onScanInventory(t))}),x(1,"i",39),c(2,"Refresh "),r()}}function We(i,p){if(i&1){let e=S();a(0,"div",36)(1,"button",40),C("click",function(){m(e);let t=l().ngIf,n=l(2);return _(n.updateStock(t))}),x(2,"i",41),c(3," Update "),r(),x(4,"button",42),a(5,"ul",43)(6,"a",44),C("click",function(){m(e);let t=l(3);return _(t.openExportDialog())}),x(7,"i",45),a(8,"span"),c(9,"Export"),r()()()()}}function Oe(i,p){if(i&1){let e=S();a(0,"button",46),C("click",function(){m(e);let t=l(3);return _(t.openExportDialog())}),x(1,"i",45),a(2,"span"),c(3,"Export"),r()()}}function Ue(i,p){if(i&1&&(a(0,"div"),h(1,$e,3,0,"button",35)(2,We,10,0,"div",36)(3,Oe,4,0,"button",37),r()),i&2){let e=p.ngIf,o=l(2);s(),d("ngIf",o.productService.hasSelectionVariant(e)),s(),y(o.productService.hasSelectionVariant(e)?2:3)}}function je(i,p){i&1&&(a(0,"div",47)(1,"span"),c(2," showing only different stock, please press next to populate more data "),r()())}function Qe(i,p){if(i&1){let e=S();a(0,"th")(1,"input",48),T("ngModelChange",function(t){m(e);let n=l(2);return F(n.checkboxState,t)||(n.checkboxState=t),_(t)}),C("ngModelChange",function(){let t=m(e).ngIf,n=l(2);return _(n.onCheckboxStateChange(t))}),r()()}if(i&2){let e=l(2);s(),b("ngModel",e.checkboxState)}}function ze(i,p){i&1&&(a(0,"th",32),c(1," Reserved "),r())}function Ge(i,p){if(i&1){let e=S();a(0,"input",66),T("ngModelChange",function(t){m(e);let n=l(3).$implicit;return F(n.selected,t)||(n.selected=t),_(t)}),C("ngModelChange",function(){m(e);let t=l(3).$implicit,n=l(2);return _(n.onCheckboxStateProduct(t))}),r()}if(i&2){let e=l(3).$implicit;b("ngModel",e.selected)}}function He(i,p){if(i&1){let e=S();a(0,"img",67),C("click",function(t){m(e);let n=l(3).$implicit,u=l(2);return _(u.onZoomImage(t,n==null?null:n.ImageUrl))}),r()}if(i&2){let e=l(3).$implicit;q("src",e==null?null:e.ThumbnailUrl,V)}}function Ye(i,p){i&1&&x(0,"img",63)}function Ke(i,p){if(i&1&&(x(0,"br"),a(1,"div",68),x(2,"i",69),a(3,"small"),c(4),r()()),i&2){let e=l(3).$implicit;s(4),E("(",e==null?null:e.Category,")")}}function Ze(i,p){if(i&1&&(a(0,"td",59)(1,"div",14),h(2,Ge,1,1,"input",60),a(3,"div",61),h(4,He,1,1,"img",62)(5,Ye,1,0,"img",63),r()()(),a(6,"td",64)(7,"span",65),c(8),r(),h(9,Ke,5,1),r()),i&2){let e=l(2).$implicit,o=l(2);d("rowSpan",e==null?null:e.Variants.length),s(2),y(e.Variants.length>1?2:-1),s(),d("ngClass",k(7,Ae,e.Variants.length<=1)),s(),y(e!=null&&e.ThumbnailUrl?4:5),s(2),d("rowSpan",e==null?null:e.Variants.length),s(2),D(e==null?null:e.Name),s(),y(e.CategoryID!==null&&e.CategoryID!=o.guidEmpty?9:-1)}}function qe(i,p){if(i&1){let e=S();a(0,"input",48),T("ngModelChange",function(t){m(e);let n=l(2).$implicit;return F(n.selected,t)||(n.selected=t),_(t)}),r()}if(i&2){let e=l(2).$implicit;b("ngModel",e.selected)}}function Xe(i,p){if(i&1&&h(0,qe,1,1,"input",53),i&2){let e=l().$implicit;y((e==null?null:e.Inventory)<=1e5?0:-1)}}function Je(i,p){if(i&1){let e=S();a(0,"input",48),T("ngModelChange",function(t){m(e);let n=l().$implicit;return F(n.selected,t)||(n.selected=t),_(t)}),r()}if(i&2){let e=l().$implicit;b("ngModel",e.selected)}}function et(i,p){i&1&&(a(0,"div",70),c(1," Not Found "),r())}function tt(i,p){if(i&1&&(a(0,"div")(1,"span",71),c(2),g(3,"number"),r(),c(4," => "),a(5,"span",72),c(6),g(7,"number"),r()()),i&2){let e=l().$implicit;s(2),E(" ",v(3,2,e==null||e.I==null?null:e.I.Available),""),s(4),D(v(7,4,e==null?null:e.Inventory))}}function nt(i,p){if(i&1&&(c(0),g(1,"number")),i&2){let e=l().$implicit;E(" ",v(1,1,e==null?null:e.Inventory)," ")}}function it(i,p){if(i&1&&(M(0),a(1,"div",73)(2,"a",74),x(3,"i",75),r()(),P()),i&2){let e=l().$implicit,o=l(3);s(2),d("href",o.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(e==null?null:e.ID),V)}}function ot(i,p){if(i&1){let e=S();a(0,"span",80),C("click",function(){let t=m(e).ngIf,n=l(2).$implicit,u=l().$implicit,I=l(2);return _(I.openTableDialog(u,n,t))}),c(1),g(2,"number"),r()}if(i&2){let e=l(2).$implicit;s(),E(" ",v(2,1,e==null||e.Channel[0]==null?null:e.Channel[0].Inventory)," ")}}function at(i,p){if(i&1){let e=S();a(0,"td",76)(1,"div",54)(2,"div"),h(3,ot,3,3,"span",77),g(4,"async"),r(),a(5,"div",73)(6,"a",74),x(7,"i",75),r()(),a(8,"div",73)(9,"span",78),C("click",function(){m(e);let t=l().$implicit,n=l(3);return _(n.refreshInventory(t==null||t.Channel[0]==null?null:t.Channel[0].ChannelItemID,t==null||t.Channel[0]==null?null:t.Channel[0].ChannelVariationID,t==null||t.Channel[0]==null?null:t.Channel[0].ChannelID,t==null?null:t.ID))}),x(10,"i",79),r()()()()}if(i&2){let e=l().$implicit,o=l(3);d("ngClass",k(5,Be,(e==null?null:e.Inventory)!=(e==null||e.Channel[0]==null?null:e.Channel[0].Inventory))),s(3),d("ngIf",v(4,3,o.products$)),s(3),d("href",e==null||e.Channel[0]==null?null:e.Channel[0].Url,V)}}function lt(i,p){if(i&1&&(M(0),a(1,"span",81),c(2),g(3,"number"),r(),P()),i&2){let e=l(2).$implicit;s(2),E(" (",v(3,1,e==null||e.Channel[0]==null?null:e.Channel[0].InventoryReserved),") ")}}function rt(i,p){i&1&&c(0," - ")}function st(i,p){if(i&1&&(M(0),a(1,"td",50),h(2,lt,4,3,"ng-container",58)(3,rt,1,0,"ng-template",null,1,z),r(),P()),i&2){let e=Q(4),o=l().$implicit;s(2),d("ngIf",o==null||o.Channel[0]==null?null:o.Channel[0].InventoryReserved)("ngIfElse",e)}}function ct(i,p){i&1&&(M(0),c(1," - "),P())}function pt(i,p){if(i&1&&(a(0,"span",82),g(1,"date"),c(2),g(3,"date"),r()),i&2){let e=l().$implicit;d("matTooltip",R(1,2,e==null||e.Channel[0]==null?null:e.Channel[0].LastInventorySync,"dd MMMM yyyy HH:mm:ss")),s(2),E(" ",R(3,5,e==null||e.Channel[0]==null?null:e.Channel[0].LastInventorySync,"dd MMM yy HH:mm")," ")}}function mt(i,p){if(i&1&&(a(0,"tr"),h(1,Ze,10,9),a(2,"td",49),c(3),r(),a(4,"td",50)(5,"span",51),c(6),r()(),a(7,"td",52),h(8,Xe,1,1)(9,Je,1,1,"input",53),r(),a(10,"td")(11,"div",54),h(12,et,2,0,"div",55)(13,tt,8,6,"div")(14,nt,2,3)(15,it,4,1,"ng-container",5),r()(),h(16,at,11,7,"td",56)(17,st,5,2,"ng-container",5),a(18,"td",57),h(19,ct,2,0,"ng-container",58)(20,pt,4,8,"ng-template",null,0,z),r()()),i&2){let e=p.$implicit,o=p.$index,t=Q(21),n=l(3);s(),y(o==0?1:-1),s(2),D(e==null?null:e.Model),s(2),d("matTooltip",e.Discontinued?n.discontinuedVariantMsg:"")("ngClass",k(14,Le,e.Discontinued)),s(),D(e==null?null:e.Code),s(2),y((e==null?null:e.Channel[0].TypeID)==1?8:(e==null?null:e.Inventory)>=0?9:-1),s(4),d("ngIf",(e==null?null:e.I)==null),s(),y((e==null?null:e.I)!=null&&(e==null?null:e.Inventory)!=(e==null||e.I==null?null:e.I.Available)?13:-1),s(),y((e==null?null:e.Inventory)==(e==null||e.I==null?null:e.I.Available)?14:-1),s(),d("ngIf",(e==null?null:e.I)!=null),s(),d("ngIf",e==null?null:e.Channel),s(),d("ngIf",n.isShowReservedColumn),s(2),d("ngIf",(e==null||e.Channel[0]==null?null:e.Channel[0].LastInventorySync)==n.minDate)("ngIfElse",t)}}function _t(i,p){if(i&1&&(a(0,"tbody"),U(1,mt,22,16,"tr",null,O),r()),i&2){let e=p.$implicit;s(),j(e.Variants)}}function dt(i,p){if(i&1){let e=S();a(0,"mainpanel",3),C("onSubmit",function(t){m(e);let n=l();return _(n.onSearch(t))}),a(1,"actions")(2,"div",4),h(3,Ue,4,2,"div",5),g(4,"async"),r()(),a(5,"filters")(6,"div")(7,"label",6),c(8,"Channel"),r(),a(9,"multiwarehouse-tree-select",7),C("onChannelChange",function(t){m(e);let n=l();return _(n.onChannelChange(t))}),r()(),a(10,"div",8)(11,"label",9),c(12,"PageNumber"),r(),a(13,"input",10),T("ngModelChange",function(t){m(e);let n=l();return F(n.searchFilter.PageNumber,t)||(n.searchFilter.PageNumber=t),_(t)}),r()(),a(14,"div",8)(15,"label",11),c(16,"Page Size"),r(),a(17,"input",12),T("ngModelChange",function(t){m(e);let n=l();return F(n.searchFilter.RowCount,t)||(n.searchFilter.RowCount=t),_(t)}),r()(),a(18,"div",8)(19,"label",13),c(20,"Quantity From - To"),r(),a(21,"div",14)(22,"input",15),T("ngModelChange",function(t){m(e);let n=l();return F(n.searchFilter.QuantityFrom,t)||(n.searchFilter.QuantityFrom=t),_(t)}),r(),c(23," - "),a(24,"input",16),T("ngModelChange",function(t){m(e);let n=l();return F(n.searchFilter.QuantityTo,t)||(n.searchFilter.QuantityTo=t),_(t)}),r()()()(),a(25,"content")(26,"div",17)(27,"div",18)(28,"div",19),h(29,je,3,0,"div",20),a(30,"table",21),C("matSortChange",function(t){m(e);let n=l();return _(n.onSortVariant(t))}),a(31,"thead",22)(32,"tr")(33,"th",23),c(34," Product "),x(35,"br"),a(36,"mat-slide-toggle",24),C("toggleChange",function(){m(e);let t=l();return t.showDifferenceStock=!t.showDifferenceStock,_(t.onShowDifferenceStock())}),a(37,"small",13),c(38,"FILTER DIFFERENT INVENTORY"),r()()(),a(39,"th",25),c(40,"Variant"),r(),a(41,"th",26),c(42,"SKU"),r(),h(43,Qe,2,1,"th",5),g(44,"async"),a(45,"th",27),c(46," POS "),r(),a(47,"th",28)(48,"div",29),C("click",function(){m(e);let t=l();return _(t.openModalFilter())}),x(49,"img",30),a(50,"span",31),c(51),g(52,"stringLimit"),r()()(),h(53,ze,2,0,"th",32),a(54,"th",33),c(55,"Last Sync"),r()()(),U(56,_t,3,0,"tbody",null,O),g(58,"async"),r(),a(59,"infinite-paginator",34),g(60,"async"),C("onNextPage",function(){m(e);let t=l();return _(t.infinitePagination.onNextPage(t.searchFilter))})("onLastPage",function(){m(e);let t=l();return _(t.infinitePagination.onLastPage(t.searchFilter))})("onGetRowCount",function(){m(e);let t=l();return _(t.infinitePagination.getRowCount(t.searchFilter))}),r()()()()()()}if(i&2){let e,o,t,n=l();d("headerTitle","Inventory Comparison")("pageData",n.pageData)("hideSearchBox",!1),s(3),d("ngIf",v(4,21,n.products$)),s(6),d("ngModel",(n.searchFilter==null?null:n.searchFilter.LocationID)||(n.searchFilter==null?null:n.searchFilter.ChannelID)),s(4),b("ngModel",n.searchFilter.PageNumber),s(4),b("ngModel",n.searchFilter.RowCount),s(5),b("ngModel",n.searchFilter.QuantityFrom),s(2),b("ngModel",n.searchFilter.QuantityTo),s(5),d("ngIf",(n.searchFilter==null?null:n.searchFilter.filterModel)==3),s(14),d("ngIf",v(44,23,n.products$)),s(5),d("matTooltip",((e=n.channelIdentity())==null||e.label==null?null:e.label.length)>13?(e=n.channelIdentity())==null?null:e.label:""),s(),d("src",(o=n.channelIdentity())==null?null:o.img,V),s(2),E(" ",R(52,25,(t=n.channelIdentity())==null?null:t.label,13)," "),s(2),y(n.isShowReservedColumn?53:-1),s(3),j(v(58,28,n.products$)),s(3),d("totalData",n.infinitePagination.totalData())("hideCount",n.infinitePagination.hideCount())("rowCount",v(60,30,n.infinitePagination.totalRowCount$))("pageNumber",n.infinitePagination.pageNumber())("disableNextButton",n.infinitePagination.disableNextButton())("goToLastPage",n.infinitePagination.isLastPage())}}var Zt=(()=>{class i{constructor(e,o,t,n,u,I,Re,Ne){this.http=e,this.toastr=o,this.dialog=t,this.productService=n,this.authService=u,this.biggerPictureService=I,this.inventoryService=Re,this.mainPanelService=Ne,this.infinitePagination=K(G),this.checkboxState=!1,this.showDifferenceStock=!1,this.loaderApi="InventoryLoader/Load",this.fetchApi="Inventory/GetSingleChannelComparison",this.rowCountApi="Inventory/GetInventoryByChannelRowCount",this.minDate=f.MinDate,this.isShowReservedColumn=!0,this.discontinuedVariantMsg="This Variant is discontinued from POS, you must Non Active manually at the seller center so that it is not sold again on the channel.",this.guidEmpty=f.GuidEMpty,this.selectedChannel=W(null),this.channelIdentity=W({img:null,label:null}),this.pageData={Title:"Inventory Realtime",Nav:[{Title:"Inventory Cache",Url:"/menu/inventory",Active:!1},{Title:"Inventory Realtime",Url:"/menu/inventory/realtime",Active:!0}]}}ngOnInit(){this.hostName=this.authService.getDomain(),this.initPageLoader(),this.sourceObs$=this.infinitePagination.data$.pipe($(e=>{this.checkShowReservedColumn(e)}),A(e=>(e=this.calculateAvailableStock(e),e)),B(1)),this.products$=this.sourceObs$}calculateAvailableStock(e){return e.map(t=>(t.totalAvailable=t.Variants.reduce((n,u)=>(n+=u.I?.Available||0,n),0),t))}checkShowReservedColumn(e){let o=0,t;e.forEach(n=>{t=n.Variants.find(u=>f.IsNotEmpty(u?.Channel[0]?.InventoryReserved)),t&&(o+=1)}),this.isShowReservedColumn=o>0}initPageLoader(){this.infinitePagination.fetchDataEndpoint=this.fetchApi,this.infinitePagination.fethRowCountEndpoint=this.rowCountApi,this.loader$=this.http.post(`/api/${this.loaderApi}`,{}).pipe(B(1),$(e=>{this.searchFilter={RowCount:e.Filter.PageSize,filterModel:1,PageNumber:1,ChannelID:e.Filter.ChannelID,LocationID:e.Filter.LocationID},this.initReloadData(),this.showToastrMarketplaceInactive(!e.Filter.IsMarketplaceAppActive)}))}onChannelChange(e){let o=Object.assign({},e);this.selectedChannel.set(o),f.IsEmpty(this.channelIdentity()?.label)&&this.setChannelFilter()}setChannelFilter(){if(this.selectedChannel()){let e=Object.assign({},this.selectedChannel());f.IsNotEmpty(e.parent)?(this.searchFilter.LocationID=e.id,this.searchFilter.ChannelID=e?.parent?.id,e.label=e?.parent?.label+" - "+e?.label,e.img=f.getChannelLogoByTypeId(e?.parent?.typeid)):(this.searchFilter.LocationID=null,e.img=f.getChannelLogoByTypeId(e?.typeid),this.searchFilter.ChannelID=e?.id,this.selectedChannel.set(e)),this.channelIdentity.update(()=>({img:e.img,label:e.label}))}}initReloadData(){this.infinitePagination.reloadPagination(this.searchFilter)}showToastrMarketplaceInactive(e){e&&this.toastr.warning(`Automatic inventory sync disabled.
2
- Please enable Dealpos X Marketplace Apps integration in POS Configuration`,"Warning")}onSearch(e){this.searchFilter.text=e,this.setChannelFilter(),this.initReloadData()}openModalFilter(){this.mainPanelService.openModalFilter()}updateStock(e){let o=this.productService.selectedVariantProduct(e);if(o.length>0){let t=this.searchFilter.LocationID,n=o.map(I=>L({ID:I.ID,Code:I.Code,Inventory:I.Inventory},f.IsNotEmpty(t)&&{LocationID:t})),u={ListChannelID:[this.searchFilter.ChannelID],List:n};this.http.post("/api/Inventory/UpdateChannel",u).subscribe(I=>{this.initReloadData(),this.checkboxState=!1,this.handlingUpdateStock(I)})}}handlingUpdateStock(e){if(e[0]?.Response){let o=e[0]?.Response?.Fail_list,t=e[0]?.Response?.Success_list;this.inventoryService.showToastrUpdateInventory("Stock",t,o)}else this.toastr.error(e[0]?.Exception,"Error")}refreshInventory(e,o,t,n){let u={ChannelItemID:e,ChannelVariationID:o,ChannelID:t,VariantID:n};this.http.post("/api/Inventory/RefreshInventoryChannel",u).subscribe(I=>{this.toastr.success("Successfully updated","Success"),this.initReloadData()})}onCheckboxStateProduct(e){e.Variants=e.Variants.map(o=>(o.Inventory>=0&&(o.selected=e.selected),o))}onCheckboxStateChange(e){e=e.map(o=>(o.Variants=o.Variants.map(t=>(t.selected=this.checkboxState,t)),o))}openTableDialog(e,o,t){this.dialog.open(Me,{data:{Name:e.Name,Variant:o,ChannelID:o?.Channel[0].ChannelID,Table:"inventory",ChannelItemID:e.ChannelItemID}}).afterClosed().pipe(Y(u=>f.IsNotEmpty(u))).subscribe(u=>{this.updateItemAfterDialog(u)})}updateItemAfterDialog(e){let o=this.searchFilter.LocationID,t=L({ID:e.ChannelID,ChannelItemID:e.ChannelItemID,ChannelVariantID:e.ChannelVariationID,NewQuantity:parseFloat(e.Inventory),VariantID:e.ID,SKU:e.Sku},f.IsNotEmpty(o)&&{LocationID:o});this.http.post("/api/Inventory/UpdateQuantityByItem",t).subscribe(n=>{this.searchFilter.PageNumber=1,this.initReloadData(),this.handlingUpdateStock([n])})}onScanInventory(e){let o=this.productService.selectedVariantProduct(e);this.inventoryService.refreshInventory(o).subscribe(()=>{this.initReloadData(),this.toastr.success("Inventory refreshed successfully","Success")})}openExportDialog(){this.dialog.open(Ve,{data:{title:"Export Inventory Single Channel Comparison",pageNumber:this.searchFilter.PageNumber,rowCount:this.searchFilter.RowCount,filterExport:this.searchFilter,getRowCountApi:this.rowCountApi,QuantityFrom:this.searchFilter.QuantityFrom,QuantityTo:this.searchFilter.QuantityTo,exportApi:"Inventory/GetExportSingleChannelComparison"}}).afterClosed().subscribe()}onShowDifferenceStock(){this.showDifferenceStock?this.searchFilter.filterModel=H.DIFFERENCE:this.searchFilter.filterModel=H.ALL,this.initReloadData()}onZoomImage(e,o){this.biggerPictureService.openBiggerPicture(e,o)}onSortVariant(e){if(e.direction==""){this.products$=this.sourceObs$;return}this.products$=this.products$.pipe(A(o=>o.map(t=>(t.Variants=t.Variants.sort((n,u)=>f.compare(n.I?.Available,u.I?.Available,e.direction==="asc")),t)).sort((t,n)=>f.compare(t.totalAvailable,n.totalAvailable,e.direction==="asc"))))}static{this.\u0275fac=function(o){return new(o||i)(w(_e),w(me),w(xe),w(be),w(ue),w(Fe),w(N),w(fe))}}static{this.\u0275cmp=Z({type:i,selectors:[["app-single-channel-comparison"]],features:[X([G,N])],decls:2,vars:3,consts:[["SYNCDATE",""],["EMPTY_RESERVED",""],["textButton","Search",3,"headerTitle","pageData","hideSearchBox","onSubmit",4,"ngIf"],["textButton","Search",3,"onSubmit","headerTitle","pageData","hideSearchBox"],[1,"d-flex"],[4,"ngIf"],["for","channelOptions",1,"fw-bold","mb-2"],["id","channelOptions",3,"onChannelChange","ngModel"],[1,"mt-5"],["for","PageNumber",1,"fw-bold"],["type","number","id","PageNumber","placeholder","PageNumber","name","PageNumber","data-toggle","tooltip","matTooltip","Page Number",1,"mat-mdc-tooltip-trigger","form-control","ng-pristine","ng-valid","ng-touched","mt-3",3,"ngModelChange","ngModel"],["for","RowCount",1,"fw-bold"],["type","number","id","RowCount","placeholder","Page Size","name","RowCount","data-toggle","tooltip","matTooltip","Page Size",1,"mat-mdc-tooltip-trigger","form-control","ng-pristine","ng-valid","ng-touched","mt-3",3,"ngModelChange","ngModel"],[1,"fw-bold"],[1,"d-flex","align-items-center","justify-content-start"],["type","number","name","QuantityFrom",1,"w-25","me-2","mt-3","form-control",3,"ngModelChange","ngModel"],["type","number","name","QuantityTo",1,"w-25","ms-2","form-control","mt-2",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],["class","alert alert-warning d-flex justify-content-between text-dark","role","alert",4,"ngIf"],["matSort","",1,"table","border-bottom",3,"matSortChange"],[1,"thead-light","sticky-top-thead"],["scope","col","colspan","2",1,"text-center","ps-12",2,"width","25%"],[3,"toggleChange"],["scope","col",1,"text-start"],["scope","col",1,"text-end",2,"width","10%"],["scope","col","mat-sort-header","Available","arrowPosition","before",1,"text-end","w-10",2,"width","8%"],[1,"text-end",2,"width","150px"],["role","button","matTooltipPosition","above",1,"d-inline-block",3,"click","matTooltip"],[2,"width","16px",3,"src"],[1,"ms-1"],["matTooltip","Reserved Stock","matTooltipPosition","above",1,"text-end",2,"width","80px"],[1,"text-center",2,"width","145px"],[3,"onNextPage","onLastPage","onGetRowCount","totalData","hideCount","rowCount","pageNumber","disableNextButton","goToLastPage"],["class","btn btn-outline-dark me-3","matTooltip","Fetch the latest stock directly from the channel",3,"click",4,"ngIf"],[1,"btn-group"],[1,"btn","btn-outline-secondary","shadow","rounded"],["matTooltip","Fetch the latest stock directly from the channel",1,"btn","btn-outline-dark","me-3",3,"click"],[1,"fa-solid","fa-arrows-rotate","me-3"],[1,"btn","btn-success",3,"click"],[1,"fas","fa-chevron-circle-up"],["data-bs-toggle","dropdown","aria-expanded","false",1,"btn","btn-success","btn-sm","dropdown-toggle","border-start"],[1,"dropdown-menu","dropdown-menu-end","pointer"],["role","button",1,"dropdown-item","cursor-pointer","fs-5",3,"click"],[1,"fa-solid","fa-print","me-3"],[1,"btn","btn-outline-secondary","shadow","rounded",3,"click"],["role","alert",1,"alert","alert-warning","d-flex","justify-content-between","text-dark"],["type","checkbox",3,"ngModelChange","ngModel"],[1,"text-start"],[1,"text-end"],["matTooltipPosition","above",3,"matTooltip","ngClass"],[1,"align-middle"],["type","checkbox",3,"ngModel"],[1,"d-flex","align-items-center","justify-content-end"],["class","text-danger","matTooltip","This product is no longer available in POS","matTooltipPosition","above",4,"ngIf"],["class","text-end",3,"ngClass",4,"ngIf"],[1,"text-center"],[4,"ngIf","ngIfElse"],[1,"text-start",2,"width","0%",3,"rowSpan"],["type","checkbox",1,"me-3",3,"ngModel"],[3,"ngClass"],[1,"border","rounded","w-img","cursor-pointer",2,"margin-left","20px",3,"src"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded","w-img",2,"margin-left","20px"],[1,"text-start",3,"rowSpan"],[1,"item-name","mb-0"],["type","checkbox",1,"me-3",3,"ngModelChange","ngModel"],[1,"border","rounded","w-img","cursor-pointer",2,"margin-left","20px",3,"click","src"],[1,"d-flex","align-items-center"],["title","Category",1,"fa-solid","fa-tags","me-2",2,"opacity","60%"],["matTooltip","This product is no longer available in POS","matTooltipPosition","above",1,"text-danger"],["title","Stock Available"],["title","Inventory below minimum inventory"],[1,"ms-3"],["target","_blank",3,"href"],[1,"fa-solid","fa-arrow-up-right-from-square","external-link-custom"],[1,"text-end",3,"ngClass"],["class","cursor",3,"click",4,"ngIf"],["matTooltip","Refresh stock according to seller center",1,"pl-5","cursor-pointer",2,"color","var(--bs-link-color)",3,"click"],[1,"fas","fa-sync","fa-lg","external-link-custom","pt-1"],[1,"cursor",3,"click"],[1,"text-danger"],["matTooltipShowDelay","500",3,"matTooltip"]],template:function(o,t){o&1&&(h(0,dt,61,32,"mainpanel",2),g(1,"async")),o&2&&d("ngIf",v(1,1,t.loader$))},dependencies:[oe,J,ee,te,ie,ne,ve,Se,he,pe,le,ce,ae,re,se,Pe,De,de,Ee,Te,ge,Ce,we,ye,Ie,ke],styles:[".w-10[_ngcontent-%COMP%]{width:10%}.w-img[_ngcontent-%COMP%]{width:40px;height:40px}.item-name[_ngcontent-%COMP%]{margin-bottom:-14px!important;font-size:larger}input[type=checkbox][_ngcontent-%COMP%]{width:15px;height:15px}"]})}}return i})();export{Zt as SingleChannelComparisonComponent};
@@ -1,3 +0,0 @@
1
- import{e as te}from"./chunk-BUFEIJAI.js";import{a as ze,b as ge,c as Ge,d as Ve,e as me,f as Ke,g as Ae,h as qe,i as q,j as we,k as C}from"./chunk-V5WYSCVT.js";import{b as fe,c as ee,d as Ze}from"./chunk-PXB4YEY3.js";import{G as $e,L as Je,n as Ue,o as We,p as He}from"./chunk-GPEVUTDI.js";import{F as je,Fb as W,G as Ne,La as F,O as ue,T as Be,Va as U,Z as de,aa as _,ba as he,bd as Le,c as g,cd as Fe,ea as V,f as Y,gd as K,j as _e,ja as k,k as xe,ka as M,ma as y,n as z,o as Q,oa as h,p as x,pa as L,q as G,qa as Me,ua as pe,v as D,w as Oe}from"./chunk-T5ONJF63.js";import{a as le,i as I}from"./chunk-K2H6WANG.js";var Se=function(t){return t.dashboardView="Dashboard",t.report="Report",t.outlet="Outlet",t.price="Price",t.channelView="ChannelView",t.channelAdd="ChannelAdd",t.channelEdit="ChannelEdit",t.channelDelete="ChannelDelete",t.orderView="OrderView",t.downloadOrder="DownloadOrder",t}(Se||{});var Xe={production:!0,version:"5.41.0",firebaseConfig:{apiKey:"AIzaSyDnnitFXpM8TglWKNpzu4ChgF98n25Rgvw",authDomain:"auth.dealpos.com",projectId:"devops-signin",storageBucket:"devops-signin.appspot.com",messagingSenderId:"412465165194",appId:"1:412465165194:web:03d806f6b6ab6f8b460e73",measurementId:"G-MNDBRJ5XZD"},news:"https://changelog.dealpos.app/umbraco/delivery/api/v2/content?fetch=children:omni&sort=sortOrder:asc"};var Ye=(()=>{class t{static{this.SubmitConfig="/api/Channel/SubmitConfig"}static{this.PosAccountTest="/api/POSAccount/Test"}static{this.PosAccountRemove="/api/POSAccount/Remove"}static{this.PosAccountGetConfig="/api/ChannelLoader/GetConfig"}static{this.ChannelGetLastSyncByID="/api/Channel/GetLastSyncByID"}static{this.GetChannel="/api/Channel/GetChannel"}static{this.GetChannelLoader="/api/ChannelLoader/GetChannelLoader"}static{this.TestShopID="/api/Channel/TestShopID"}static{this.UpdateChannelIndex="/api/Channel/UpdateChannelIndex"}static{this.DeleteChannel="/api/Channel/DeleteChannel"}static{this.GetRegisterByOutletName="/api/Channel/GetRegistersByOutletOrder"}static{this.GetChannelRowCount="/api/Channel/GetCountChannel"}static{this.GetChannelWarehouse="/api/Channel/GetChannelWarehouseLocation"}static{this.UnSynchronizedWarehouse="/api/Channel/UnSynchronizedWarehouse"}static{this.GetChannelDetail="/api/ChannelLoader/GetChannelView"}static{this.GetOrderPreview="/api/Orders/Preview"}static{this.GetOrderPreviewV2="/api/Orders/PreviewV2"}static{this.GetDownloadOrder="/api/Orders/Download"}static{this.GetDownloadOrderV2="/api/Orders/DownloadV2"}static{this.ShopeeV2_URL="/api/ChannelAuthorization/ShopeeV2_URL"}static{this.Tiktok_URL="/api/ChannelAuthorization/Tiktok_URL"}static{this.Lazada_URL="/api/ChannelAuthorization/Lazada_URL"}static{this.AddTokopedia="/api/ChannelAdd/Tokopedia"}static{this.AddShopify="/api/ChannelAdd/AddShopify"}static{this.AddWoocommerce="/api/ChannelAdd/AddWooCommerce"}static{this.AddPlugo="/api/ChannelAdd/Plugo"}static{this.UploadPlugoProduct="/api/product/plugo/AddProduct"}static{this.RefreshToken="/api/RefreshToken"}static{this.RefreshInventory="/api/Inventory/RefreshInventory"}static{this.GetOrderApiLog="/api/Orders/GetOrderDetailByChannel"}static{this.GetProductApiLog="/api/Product/GetProductDetailBySKU"}}return t})();var St="firebase",vt="11.10.0";q(St,vt,"app");var H=new Le("ANGULARFIRE2_VERSION");var Qe=(t,a)=>{let e=a?[a]:qe(),n=[];return e.forEach(r=>{r.container.getProvider(t).instances.forEach(i=>{n.includes(i)||n.push(i)})}),n},ve=function(t){return t[t.SILENT=0]="SILENT",t[t.WARN=1]="WARN",t[t.VERBOSE=2]="VERBOSE",t}(ve||{}),_n=K()&&typeof Zone<"u"?ve.WARN:ve.SILENT;var ne=class{zone;delegate;constructor(a,e=xe){this.zone=a,this.delegate=e}now(){return this.delegate.now()}schedule(a,e,n){let r=this.zone,o=function(i){r?r.runGuarded(()=>{a.apply(this,[i])}):a.apply(this,[i])};return this.delegate.schedule(o,e,n)}},ke=(()=>{class t{outsideAngular;insideAngular;constructor(){let e=L(F);this.outsideAngular=e.runOutsideAngular(()=>new ne(typeof Zone>"u"?void 0:Zone.current)),this.insideAngular=e.run(()=>new ne(typeof Zone>"u"?void 0:Zone.current,_e))}static \u0275fac=function(n){return new(n||t)};static \u0275prov=k({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var It=new Map,bt={activated:!1,tokenObservers:[]},yt={initialized:!1,enabled:!1};function T(t){return It.get(t)||Object.assign({},bt)}function rt(){return yt}var Et="https://content-firebaseappcheck.googleapis.com/v1";var Ct="exchangeDebugToken",et={OFFSET_DURATION:5*60*1e3,RETRIAL_MIN_WAIT:30*1e3,RETRIAL_MAX_WAIT:16*60*1e3},Hn=24*60*60*1e3;var ye=class{constructor(a,e,n,r,o){if(this.operation=a,this.retryPolicy=e,this.getWaitDuration=n,this.lowerBound=r,this.upperBound=o,this.pending=null,this.nextErrorWaitInterval=r,r>o)throw new Error("Proactive refresh lower bound greater than upper bound!")}start(){this.nextErrorWaitInterval=this.lowerBound,this.process(!0).catch(()=>{})}stop(){this.pending&&(this.pending.reject("cancelled"),this.pending=null)}isRunning(){return!!this.pending}process(a){return I(this,null,function*(){this.stop();try{this.pending=new ge,this.pending.promise.catch(e=>{}),yield Tt(this.getNextRun(a)),this.pending.resolve(),yield this.pending.promise,this.pending=new ge,this.pending.promise.catch(e=>{}),yield this.operation(),this.pending.resolve(),yield this.pending.promise,this.process(!0).catch(()=>{})}catch(e){this.retryPolicy(e)?this.process(!1).catch(()=>{}):this.stop()}})}getNextRun(a){if(a)return this.nextErrorWaitInterval=this.lowerBound,this.getWaitDuration();{let e=this.nextErrorWaitInterval;return this.nextErrorWaitInterval*=2,this.nextErrorWaitInterval>this.upperBound&&(this.nextErrorWaitInterval=this.upperBound),e}}};function Tt(t){return new Promise(a=>{setTimeout(a,t)})}var Pt={"already-initialized":"You have already called initializeAppCheck() for FirebaseApp {$appName} with different options. To avoid this error, call initializeAppCheck() with the same options as when it was originally called. This will return the already initialized instance.","use-before-activation":"App Check is being used before initializeAppCheck() is called for FirebaseApp {$appName}. Call initializeAppCheck() before instantiating other Firebase services.","fetch-network-error":"Fetch failed to connect to a network. Check Internet connection. Original error: {$originalErrorMessage}.","fetch-parse-error":"Fetch client could not parse response. Original error: {$originalErrorMessage}.","fetch-status-error":"Fetch server returned an HTTP error status. HTTP status: {$httpStatus}.","storage-open":"Error thrown when opening storage. Original error: {$originalErrorMessage}.","storage-get":"Error thrown when reading from storage. Original error: {$originalErrorMessage}.","storage-set":"Error thrown when writing to storage. Original error: {$originalErrorMessage}.","recaptcha-error":"ReCAPTCHA error.","initial-throttle":"{$httpStatus} error. Attempts allowed again after {$time}",throttled:"Requests throttled due to previous {$httpStatus} error. Attempts allowed again after {$time}"},j=new Ve("appCheck","AppCheck",Pt);function ot(t){if(!T(t).activated)throw j.create("use-before-activation",{appName:t.name})}function it(n,r){return I(this,arguments,function*({url:t,body:a},e){let o={"Content-Type":"application/json"},i=e.getImmediate({optional:!0});if(i){let f=yield i.getHeartbeatsHeader();f&&(o["X-Firebase-Client"]=f)}let s={method:"POST",body:JSON.stringify(a),headers:o},l;try{l=yield fetch(t,s)}catch(f){throw j.create("fetch-network-error",{originalErrorMessage:f?.message})}if(l.status!==200)throw j.create("fetch-status-error",{httpStatus:l.status});let c;try{c=yield l.json()}catch(f){throw j.create("fetch-parse-error",{originalErrorMessage:f?.message})}let d=c.ttl.match(/^([\d.]+)(s)$/);if(!d||!d[2]||isNaN(Number(d[1])))throw j.create("fetch-parse-error",{originalErrorMessage:`ttl field (timeToLive) is not in standard Protobuf Duration format: ${c.ttl}`});let u=Number(d[1])*1e3,p=Date.now();return{token:c.token,expireTimeMillis:p+u,issuedAtTimeMillis:p}})}function at(t,a){let{projectId:e,appId:n,apiKey:r}=t.options;return{url:`${Et}/projects/${e}/apps/${n}:${Ct}?key=${r}`,body:{debug_token:a}}}var Dt="firebase-app-check-database",Rt=1,Ee="firebase-app-check-store";var re=null;function _t(){return re||(re=new Promise((t,a)=>{try{let e=indexedDB.open(Dt,Rt);e.onsuccess=n=>{t(n.target.result)},e.onerror=n=>{var r;a(j.create("storage-open",{originalErrorMessage:(r=n.target.error)===null||r===void 0?void 0:r.message}))},e.onupgradeneeded=n=>{let r=n.target.result;switch(n.oldVersion){case 0:r.createObjectStore(Ee,{keyPath:"compositeKey"})}}}catch(e){a(j.create("storage-open",{originalErrorMessage:e?.message}))}}),re)}function xt(t,a){return Ot(jt(t),a)}function Ot(t,a){return I(this,null,function*(){let n=(yield _t()).transaction(Ee,"readwrite"),o=n.objectStore(Ee).put({compositeKey:t,value:a});return new Promise((i,s)=>{o.onsuccess=l=>{i()},n.onerror=l=>{var c;s(j.create("storage-set",{originalErrorMessage:(c=l.target.error)===null||c===void 0?void 0:c.message}))}})})}function jt(t){return`${t.options.appId}-${t.name}`}var J=new Ke("@firebase/app-check");function Ie(t,a){return Ge()?xt(t,a).catch(e=>{J.warn(`Failed to write token to IndexedDB. Error: ${e}`)}):Promise.resolve()}function st(){return rt().enabled}function ct(){return I(this,null,function*(){let t=rt();if(t.enabled&&t.token)return t.token.promise;throw Error(`
2
- Can't get debug token in production mode.
3
- `)})}var Nt={error:"UNKNOWN_ERROR"};function Bt(t){return ze.encodeString(JSON.stringify(t),!1)}function Ce(t,a=!1,e=!1){return I(this,null,function*(){let n=t.app;ot(n);let r=T(n),o=r.token,i;if(o&&!Z(o)&&(r.token=void 0,o=void 0),!o){let c=yield r.cachedTokenPromise;c&&(Z(c)?o=c:yield Ie(n,void 0))}if(!a&&o&&Z(o))return{token:o.token};let s=!1;if(st())try{r.exchangeTokenPromise||(r.exchangeTokenPromise=it(at(n,yield ct()),t.heartbeatServiceProvider).finally(()=>{r.exchangeTokenPromise=void 0}),s=!0);let c=yield r.exchangeTokenPromise;return yield Ie(n,c),r.token=c,{token:c.token}}catch(c){return c.code==="appCheck/throttled"||c.code==="appCheck/initial-throttle"?J.warn(c.message):e&&J.error(c),be(c)}try{r.exchangeTokenPromise||(r.exchangeTokenPromise=r.provider.getToken().finally(()=>{r.exchangeTokenPromise=void 0}),s=!0),o=yield T(n).exchangeTokenPromise}catch(c){c.code==="appCheck/throttled"||c.code==="appCheck/initial-throttle"?J.warn(c.message):e&&J.error(c),i=c}let l;return o?i?Z(o)?l={token:o.token,internalError:i}:l=be(i):(l={token:o.token},r.token=o,yield Ie(n,o)):l=be(i),s&&Ut(n,l),l})}function Mt(t){return I(this,null,function*(){let a=t.app;ot(a);let{provider:e}=T(a);if(st()){let n=yield ct(),{token:r}=yield it(at(a,n),t.heartbeatServiceProvider);return{token:r}}else{let{token:n}=yield e.getToken();return{token:n}}})}function Lt(t,a,e,n){let{app:r}=t,o=T(r),i={next:e,error:n,type:a};if(o.tokenObservers=[...o.tokenObservers,i],o.token&&Z(o.token)){let s=o.token;Promise.resolve().then(()=>{e({token:s.token}),tt(t)}).catch(()=>{})}o.cachedTokenPromise.then(()=>tt(t))}function lt(t,a){let e=T(t),n=e.tokenObservers.filter(r=>r.next!==a);n.length===0&&e.tokenRefresher&&e.tokenRefresher.isRunning()&&e.tokenRefresher.stop(),e.tokenObservers=n}function tt(t){let{app:a}=t,e=T(a),n=e.tokenRefresher;n||(n=Ft(t),e.tokenRefresher=n),!n.isRunning()&&e.isTokenAutoRefreshEnabled&&n.start()}function Ft(t){let{app:a}=t;return new ye(()=>I(null,null,function*(){let e=T(a),n;if(e.token?n=yield Ce(t,!0):n=yield Ce(t),n.error)throw n.error;if(n.internalError)throw n.internalError}),()=>!0,()=>{let e=T(a);if(e.token){let n=e.token.issuedAtTimeMillis+(e.token.expireTimeMillis-e.token.issuedAtTimeMillis)*.5+3e5,r=e.token.expireTimeMillis-5*60*1e3;return n=Math.min(n,r),Math.max(0,n-Date.now())}else return 0},et.RETRIAL_MIN_WAIT,et.RETRIAL_MAX_WAIT)}function Ut(t,a){let e=T(t).tokenObservers;for(let n of e)try{n.type==="EXTERNAL"&&a.error!=null?n.error(a.error):n.next(a)}catch{}}function Z(t){return t.expireTimeMillis-Date.now()>0}function be(t){return{token:Bt(Nt),error:t}}var Te=class{constructor(a,e){this.app=a,this.heartbeatServiceProvider=e}_delete(){let{tokenObservers:a}=T(this.app);for(let e of a)lt(this.app,e.next);return Promise.resolve()}};function Wt(t,a){return new Te(t,a)}function Ht(t){return{getToken:a=>Ce(t,a),getLimitedUseToken:()=>Mt(t),addTokenListener:a=>Lt(t,"INTERNAL",a),removeTokenListener:a=>lt(t.app,a)}}var $t="@firebase/app-check",zt="0.10.1";var Gt="app-check",nt="app-check-internal";function Vt(){Ae(new me(Gt,t=>{let a=t.getProvider("app").getImmediate(),e=t.getProvider("heartbeat");return Wt(a,e)},"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((t,a,e)=>{t.getProvider(nt).initialize()})),Ae(new me(nt,t=>{let a=t.getProvider("app-check").getImmediate();return Ht(a)},"PUBLIC").setInstantiationMode("EXPLICIT")),q($t,zt)}Vt();var Kt="app-check";var oe=class{constructor(){return Qe(Kt)}};var qt=["localhost","0.0.0.0","127.0.0.1"],rr=typeof window<"u"&&qt.includes(window.location.hostname);var E=function(t){return t.USER="user",t.CHANNELS="channels",t.AUTHORIZATION="Authorization",t.INTERCOM="Intercom",t}(E||{});var ut=(()=>{class t{constructor(){}getParseToken(){let e=JSON.parse(window.localStorage.getItem("user"));return this.ParseToken(e.Token.access_token)}GetRoles(){let n=this.getParseToken()["http://schemas.microsoft.com/ws/2008/06/identity/claims/role"];return n||[]}ParseToken(e){try{let r=e.split(".")[0].replace("-","+").replace("_","/"),o=JSON.parse(window.atob(r)),s=e.split(".")[1].replace("-","+").replace("_","/"),l=JSON.parse(window.atob(s));return l.header=o,l}catch{return!1}}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=k({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Xt="firebase",Yt="11.10.0";C.registerVersion(Xt,Yt,"app-compat");var Qt=["ngOnDestroy"],ht=(t,a,e,n={})=>new Proxy(t,{get:(r,o)=>e.runOutsideAngular(()=>{if(t[o])return n?.spy?.get&&n.spy.get(o,t[o]),t[o];if(Qt.indexOf(o)>-1)return()=>{};let i=a.toPromise().then(s=>{let l=s?.[o];return typeof l=="function"?l.bind(s):l?.then?l.then(c=>e.run(()=>c)):e.run(()=>l)});return new Proxy(()=>{},{get:(s,l)=>i[l],apply:(s,l,c)=>i.then(d=>{let u=d?.(...c);return n?.spy?.apply&&n.spy.apply(o,c,u),u})})})});var ie=class{constructor(a){return a}},ae=new y("angularfire2.app.options"),se=new y("angularfire2.app.name");function Pe(t,a,e){let n=typeof e=="string"&&e||"[DEFAULT]",r=typeof e=="object"&&e||{};r.name=r.name||n;let i=C.apps.filter(s=>s&&s.name===r.name)[0]||a.runOutsideAngular(()=>C.initializeApp(t,r));try{if(JSON.stringify(t)!==JSON.stringify(i.options)){let s=!!module.hot;en("error",`${i.name} Firebase App already initialized with different options${s?", you may need to reload as Firebase is not HMR aware.":"."}`)}}catch{}return new ie(i)}var en=(t,...a)=>{K()&&typeof console<"u"&&console[t](...a)},tn={provide:ie,useFactory:Pe,deps:[ae,F,[new Me,se]]},Xo=(()=>{class t{static initializeApp(e,n){return{ngModule:t,providers:[{provide:ae,useValue:e},{provide:se,useValue:n}]}}constructor(e){C.registerVersion("angularfire",H.full,"core"),C.registerVersion("angularfire",H.full,"app-compat"),C.registerVersion("angular",Fe.full,e.toString())}static \u0275fac=function(n){return new(n||t)(h(U))};static \u0275mod=W({type:t});static \u0275inj=M({providers:[tn]})}return t})();function pt(t,a,e,n,r){let[,o,i]=globalThis.\u0275AngularfireInstanceCache.find(s=>s[0]===t)||[];if(o)return nn(r,i)||(dt("error",`${a} was already initialized on the ${e} Firebase App with different settings.${rn?" You may need to reload as Firebase is not HMR aware.":""}`),dt("warn",{is:r,was:i})),o;{let s=n();return globalThis.\u0275AngularfireInstanceCache.push([t,s,r]),s}}function nn(t,a){try{return t.toString()===a.toString()}catch{return t===a}}var rn=typeof module<"u"&&!!module.hot,dt=(t,...a)=>{K()&&typeof console<"u"&&console[t](...a)};globalThis.\u0275AngularfireInstanceCache||=[];var on=new y("angularfire2.auth.use-emulator"),an=new y("angularfire2.auth.settings"),sn=new y("angularfire2.auth.tenant-id"),cn=new y("angularfire2.auth.langugage-code"),ln=new y("angularfire2.auth.use-device-language"),un=new y("angularfire.auth.persistence"),dn=(t,a,e,n,r,o,i,s)=>pt(`${t.name}.auth`,"AngularFireAuth",t.name,()=>{let l=a.runOutsideAngular(()=>t.auth());if(e&&l.useEmulator(...e),n&&(l.tenantId=n),l.languageCode=r,o&&l.useDeviceLanguage(),i)for(let[c,d]of Object.entries(i))l.settings[c]=d;return s&&l.setPersistence(s),l},[e,n,r,o,i,s]),De=(()=>{class t{injector=L(pe);authState;idToken;user;idTokenResult;credential;constructor(e,n,r,o,i,s,l,c,d,u,p,f){let $=new Y,N=G(void 0).pipe(z(i.outsideAngular),_(()=>o.runOutsideAngular(()=>import("./chunk-IIJMZKPL.js"))),D(()=>Pe(e,o,n)),D(P=>dn(P,o,s,c,d,u,l,p)),de({bufferSize:1,refCount:!1}));if(He(r))this.authState=this.user=this.idToken=this.idTokenResult=this.credential=G(null);else{N.pipe(Be()).subscribe();let P=N.pipe(_(A=>A.getRedirectResult().then(R=>R,()=>null)),Je(this.injector),de({bufferSize:1,refCount:!1})),X=N.pipe(_(A=>new g(R=>({unsubscribe:o.runOutsideAngular(()=>A.onAuthStateChanged(B=>R.next(B),B=>R.error(B),()=>R.complete()))})))),ce=N.pipe(_(A=>new g(R=>({unsubscribe:o.runOutsideAngular(()=>A.onIdTokenChanged(B=>R.next(B),B=>R.error(B),()=>R.complete()))}))));this.authState=P.pipe(he(X),Q(i.outsideAngular),z(i.insideAngular)),this.user=P.pipe(he(ce),Q(i.outsideAngular),z(i.insideAngular)),this.idToken=this.user.pipe(_(A=>A?x(A.getIdToken()):G(null))),this.idTokenResult=this.user.pipe(_(A=>A?x(A.getIdTokenResult()):G(null))),this.credential=je(P,$,this.authState.pipe(Ne(A=>!A))).pipe(D(A=>A?.user?A:null),Q(i.outsideAngular),z(i.insideAngular))}return ht(this,N,o,{spy:{apply:(P,X,ce)=>{(P.startsWith("signIn")||P.startsWith("createUser"))&&ce.then(A=>$.next(A))}}})}static \u0275fac=function(n){return new(n||t)(h(ae),h(se,8),h(U),h(F),h(ke),h(on,8),h(an,8),h(sn,8),h(cn,8),h(ln,8),h(un,8),h(oe,8))};static \u0275prov=k({token:t,factory:t.\u0275fac,providedIn:"any"})}return t})(),pi=(()=>{class t{constructor(){C.registerVersion("angularfire",H.full,"auth-compat")}static \u0275fac=function(n){return new(n||t)};static \u0275mod=W({type:t});static \u0275inj=M({providers:[De]})}return t})();function m(t,a,e,n){return new Promise((r,o)=>{t||o("IndexedDB not available");let i=t.open(a,e),s;i.onsuccess=l=>{s=i.result,r(s)},i.onerror=l=>{o(`IndexedDB error: ${i.error}`)},typeof n=="function"&&(i.onupgradeneeded=l=>{n(l,s)})})}function ft(t,a,e,n,r){if(!t)return;let o=t.open(a,e);o.onupgradeneeded=i=>{let s=i.target.result;n.forEach(c=>{if(!s.objectStoreNames.contains(c.store)){let d=s.createObjectStore(c.store,c.storeConfig);c.storeSchema.forEach(u=>{d.createIndex(u.name,u.keypath,u.options)})}});let l=r&&r();l&&Object.keys(l).map(c=>parseInt(c,10)).filter(c=>c>i.oldVersion).sort((c,d)=>c-d).forEach(c=>{l[c](s,o.transaction)}),s.close()},o.onsuccess=i=>{i.target.result.close()}}function pn(t,a,e){if(!t||!a||!e)throw Error('Params: "dbName", "version", "storeName" are mandatory.');return new g(n=>{try{let r=a+1,o=indexedDB.open(t,r);o.onupgradeneeded=i=>{let s=i.target.result;s.deleteObjectStore(e),s.close(),console.log("onupgradeneeded"),n.next(!0),n.complete()},o.onerror=i=>n.error(i)}catch(r){n.error(r)}})}function fn(t,a){return t.objectStoreNames.contains(a)}function b(t,a,e){t||e("You need to use the openDatabase function to create a database before you query it!"),fn(t,a)||e(`objectStore does not exists: ${a}`)}function S(t,a){let e=t.transaction(a.storeName,a.dbMode);return e.onerror=a.error,e.onabort=a.abort,e}function v(t,a,e,n){return{storeName:a,dbMode:t,error:r=>{e(r)},abort:r=>{e(r)}}}var w=function(t){return t.readonly="readonly",t.readwrite="readwrite",t}(w||{}),gt=new y(null),Re=(()=>{class t{constructor(e,n){if(this.dbConfig=e,this.platformId=n,!e.name)throw new Error("NgxIndexedDB: Please, provide the dbName in the configuration");if(!e.version)throw new Error("NgxIndexedDB: Please, provide the db version in the configuration");this.isBrowser=We(this.platformId),this.isBrowser&&(this.indexedDB=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB,ft(this.indexedDB,e.name,e.version,e.objectStoresMeta,e.migrationFactory),m(this.indexedDB,e.name).then(r=>{r.version!==e.version&&(this.dbConfig.version=r.version)}))}createObjectStore(e,n){let r=[e];ft(this.indexedDB,this.dbConfig.name,++this.dbConfig.version,r,n)}add(e,n,r){return new g(o=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(i=>{let l=S(i,v(w.readwrite,e,d=>o.error(d))).objectStore(e),c=r?l.add(n,r):l.add(n);c.onsuccess=d=>I(this,null,function*(){let u=d.target.result,p=l.get(u);p.onsuccess=f=>{o.next(f.target.result),o.complete()}})}).catch(i=>o.error(i))})}bulkAdd(e,n){let r=new Promise((o,i)=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(s=>{let c=S(s,v(w.readwrite,e,o,i)).objectStore(e),d=n.map(u=>new Promise((p,f)=>{let $=u.key;delete u.key;let N=$?c.add(u,$):c.add(u);N.onsuccess=P=>{let X=P.target.result;p(X)}}));o(Promise.all(d))}).catch(s=>i(s))});return x(r)}bulkDelete(e,n){let r=n.map(o=>new Promise((i,s)=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(l=>{let c=S(l,v(w.readwrite,e,s,i));c.objectStore(e).delete(o),c.oncomplete=()=>{this.getAll(e).pipe(ue(1)).subscribe(u=>{i(u)})}}).catch(l=>s(l))}));return x(Promise.all(r))}getByKey(e,n){return new g(r=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(o=>{let l=S(o,v(w.readonly,e,r.error)).objectStore(e).get(n);l.onsuccess=c=>{r.next(c.target.result),r.complete()},l.onerror=c=>{r.error(c)}}).catch(o=>r.error(o))})}bulkGet(e,n){let r=n.map(o=>this.getByKey(e,o));return new g(o=>{Oe(r).subscribe(i=>{o.next(i),o.complete()})})}getByID(e,n){return new g(r=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(o=>{b(o,e,c=>r.error(c));let l=S(o,v(w.readonly,e,r.error,r.next)).objectStore(e).get(n);l.onsuccess=c=>{r.next(c.target.result)}}).catch(o=>r.error(o))})}getByIndex(e,n,r){return new g(o=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(i=>{b(i,e,u=>o.error(u));let d=S(i,v(w.readonly,e,o.error)).objectStore(e).index(n).get(r);d.onsuccess=u=>{o.next(u.target.result),o.complete()}}).catch(i=>o.error(i))})}getAll(e){return new g(n=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(r=>{b(r,e,l=>n.error(l));let s=S(r,v(w.readonly,e,n.error,n.next)).objectStore(e).getAll();s.onerror=l=>{n.error(l)},s.onsuccess=({target:{result:l}})=>{n.next(l),n.complete()}}).catch(r=>n.error(r))})}update(e,n){return new g(r=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(o=>{b(o,e,c=>r.error(c));let s=S(o,v(w.readwrite,e,c=>r.error(c))).objectStore(e),l=s.put(n);l.onsuccess=c=>I(this,null,function*(){let d=c.target.result,u=s.get(d);u.onsuccess=p=>{r.next(p.target.result),r.complete()}})}).catch(o=>r.error(o))})}delete(e,n){return new g(r=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(o=>{b(o,e,l=>r.error(l));let i=S(o,v(w.readwrite,e,l=>r.error(l)));i.objectStore(e).delete(n),i.oncomplete=()=>{this.getAll(e).pipe(ue(1)).subscribe(l=>{r.next(l),r.complete()})}}).catch(o=>r.error(o))})}deleteByKey(e,n){return new g(r=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(o=>{b(o,e,l=>r.error(l));let i=S(o,v(w.readwrite,e,l=>r.error(l))),s=i.objectStore(e);i.oncomplete=()=>{r.next(!0),r.complete()},s.delete(n)}).catch(o=>r.error(o))})}clear(e){return new g(n=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(r=>{b(r,e,s=>n.error(s));let o=S(r,v(w.readwrite,e,s=>n.error(s)));o.objectStore(e).clear(),o.oncomplete=()=>{n.next(!0),n.complete()}}).catch(r=>n.error(r))})}deleteDatabase(){return new g(e=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(n=>I(this,null,function*(){yield n.close();let r=this.indexedDB.deleteDatabase(this.dbConfig.name);r.onsuccess=()=>{e.next(!0),e.complete()},r.onerror=o=>e.error(o),r.onblocked=()=>{throw new Error("Unable to delete database because it's blocked")}})).catch(n=>e.error(n))})}openCursor(e,n){return new g(r=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(o=>{b(o,e,c=>r.error(c));let s=S(o,v(w.readonly,e,r.error)).objectStore(e),l=n===void 0?s.openCursor():s.openCursor(n);l.onsuccess=c=>{r.next(c),r.complete()}}).catch(o=>r.error(o))})}openCursorByIndex(e,n,r,o=w.readonly){let i=new Y;return m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(s=>{b(s,e,p=>{i.error(p)});let u=S(s,v(o,e,p=>{i.error(p)},()=>{i.next()})).objectStore(e).index(n).openCursor(r);u.onsuccess=p=>{i.next(p)}}).catch(s=>i.error(s)),i}getAllByIndex(e,n,r){let o=[];return new g(i=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(s=>{b(s,e,p=>i.error(p));let u=S(s,v(w.readonly,e,i.error)).objectStore(e).index(n).openCursor(r);u.onsuccess=p=>{let f=p.target.result;f?(o.push(f.value),f.continue()):(i.next(o),i.complete())}}).catch(s=>i.error(s))})}getAllKeysByIndex(e,n,r){let o=[];return new g(i=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(s=>{b(s,e,p=>i.error(p));let u=S(s,v(w.readonly,e,i.error)).objectStore(e).index(n).openKeyCursor(r);u.onsuccess=p=>{let f=p.target.result;f?(o.push({primaryKey:f.primaryKey,key:f.key}),f.continue()):(i.next(o),i.complete())}}).catch(s=>i.error(s))})}count(e,n){return new g(r=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(o=>{b(o,e,c=>r.error(c));let l=S(o,v(w.readonly,e,r.error)).objectStore(e).count(n);l.onerror=c=>r.error(c),l.onsuccess=c=>{r.next(c.target.result),r.complete()}}).catch(o=>r.error(o))})}countByIndex(e,n,r){return new g(o=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(i=>{b(i,e,u=>o.error(u));let d=S(i,v(w.readonly,e,o.error)).objectStore(e).index(n).count(r);d.onerror=u=>o.error(u),d.onsuccess=u=>{o.next(u.target.result),o.complete()}}).catch(i=>o.error(i))})}deleteObjectStore(e){return pn(this.dbConfig.name,++this.dbConfig.version,e)}}return t.\u0275fac=function(e){return new(e||t)(h(gt),h(U))},t.\u0275prov=k({token:t,factory:t.\u0275fac}),t})(),ki=(()=>{class t{static forRoot(e){return{ngModule:t,providers:[Re,{provide:gt,useValue:e}]}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=W({type:t}),t.\u0275inj=M({imports:[[Ue]]}),t})();var mt=(()=>{class t{constructor(e){this.db=e,this.DATABASE="Categories"}saveCategoriesByChannelType(e,n){let r=this.getKey(n);return this.db.add(this.DATABASE,e,r).pipe(D(o=>e))}getCategoriesByChannelType(e){let n=this.getKey(e);return this.db.getByKey(this.DATABASE,n)}getKey(e){let n="";switch(e){case fe.Lazada:n="Lazada";break;case fe.Tokopedia:n="Tokopedia";break}return n}clearDatabase(){this.db.clear(this.DATABASE)}getHostName(){let e=localStorage.getItem("Authorization");return this.hostName=JSON.parse(e)?.Host,this.hostName}static{this.\u0275fac=function(n){return new(n||t)(h(Re))}}static{this.\u0275prov=k({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var At=(()=>{class t{inititalizeIntercom(){let e=this.getFromLocalStorage();e?.Enabled&&window.Intercom("boot",{app_id:"xv1oomgl",name:e.Name,email:e.Email,created_at:e.Created,user_hash:e.Hash})}shutdown(){this.getFromLocalStorage()?.Enabled&&(window.Intercom("shutdown"),this.clearStorage())}clearStorage(){localStorage.removeItem("Intercom")}updateLocalStorage(e){let n={Enabled:!0};e&&(n=le(le({},n),e)),localStorage.setItem("Intercom",JSON.stringify(n))}getFromLocalStorage(){let e=localStorage.getItem("Intercom");return JSON.parse(e)}hideLauncher(){let e=this.getFromLocalStorage();e?.Enabled&&(window.Intercom("update",{app_id:"xv1oomgl",hide_default_launcher:!0}),e.hide_default_launcher=!0,this.updateLocalStorage(e))}showLauncher(){let e=this.getFromLocalStorage();e?.Enabled&&(window.Intercom("update",{app_id:"xv1oomgl",hide_default_launcher:!1}),e.hide_default_launcher=!1,this.updateLocalStorage(e))}isHideLauncher(){let e=this.getFromLocalStorage();return ee.IsEmpty(e?.hide_default_launcher)?!1:e?.hide_default_launcher}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=k({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var wt=(()=>{class t{constructor(){this.httpService=L(te)}refreshToken(){return this.httpService.get(Ye.RefreshToken).pipe(V(e=>{this.updateTokenInLocalStorage(e)}))}updateTokenInLocalStorage(e){this.saveUserToLocalStorage(e),this.saveChannelsToLocalStorage(e.Channels)}saveUserToLocalStorage(e){let n=JSON.stringify(e);localStorage.setItem(E.USER,n)}getUser(){let e=localStorage.getItem(E.USER);return e?JSON.parse(e):null}saveChannelsToLocalStorage(e){let n=JSON.stringify(e);localStorage.setItem(E.CHANNELS,n)}getChannels(){let e=localStorage.getItem(E.CHANNELS);return e?JSON.parse(e):[]}clearStorage(){localStorage.removeItem(E.USER),localStorage.removeItem(E.CHANNELS)}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=k({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Hi=(()=>{class t{constructor(e,n,r,o,i,s,l,c){this.httpService=e,this.tokenDecodeService=n,this.afAuth=r,this.ngxPermission=o,this.localDataService=i,this.router=s,this.intercomService=l,this.tokenService=c}login(e){return this.httpService.post("/api/token/Login",e).pipe(V(n=>{this.setLocalStorage(n,e.Host,e.Username),this.loadPermissions()}))}getNews(){return this.httpService.get(Xe.news).pipe(D(e=>e?.items?.map(n=>n?.properties)))}loginWithGoogle(e,n){e.preventDefault();let r=new we;return r.setCustomParameters({prompt:"select_account"}),x(this.afAuth.signInWithPopup(r)).pipe(D(o=>o.credential),D(o=>o.idToken),_(o=>this.httpService.post("/api/token/LoginWithSocialProvider",JSON.stringify({IDToken:o,Host:n}))),V(o=>{this.setLocalStorage(o,n,null),this.loadPermissions()}))}setLocalStorage(e,n,r){this.tokenService.updateTokenInLocalStorage(e),localStorage.setItem(E.AUTHORIZATION,JSON.stringify({Host:n,username:r})),this.intercomService.updateLocalStorage(e.IntercomWidget),this.intercomService.inititalizeIntercom()}loadPermissions(){this.ngxPermission.loadPermissions([]);let e=localStorage.getItem(E.USER);if(ee.IsNotEmpty(e)){let n=this.tokenDecodeService.GetRoles();this.ngxPermission.loadPermissions(n)}}redirectUrl(){return I(this,null,function*(){let e=null;return(yield this.ngxPermission.hasPermission(Se.dashboardView))?e="/menu/dashboard":e="/menu/products/status",e})}getChannels(){return this.tokenService.getChannels()}logout(){this.clearLocalStorage(),this.ngxPermission.flushPermissions()}isActiveToken(){let e=this.tokenService.getUser(),n=new Date;if(e!=null){let r=new Date(e.Token.expiredAt);return n<r?!0:(this.clearLocalStorage(),!1)}else return!1}getDomain(){if(!this.domain){let e=localStorage.getItem(E.AUTHORIZATION);this.domain="https://"+JSON.parse(e).Host}return this.domain}clearLocalStorage(){this.domain=null,this.tokenService.clearStorage(),this.intercomService.shutdown(),this.localDataService.clearDatabase(),this.router.navigate([""])}static{this.\u0275fac=function(n){return new(n||t)(h(te),h(ut),h(De),h(Ze),h(mt),h($e),h(At),h(wt))}}static{this.\u0275prov=k({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();export{Se as a,Xe as b,E as c,ut as d,Xo as e,pi as f,ki as g,mt as h,At as i,Ye as j,wt as k,Hi as l};
@@ -1 +0,0 @@
1
- import{a as Y}from"./chunk-3BGJ2T6Y.js";import{e as J}from"./chunk-6IAGGRZN.js";import{j as H}from"./chunk-2SUNUZ5Y.js";import{b as j,e as F}from"./chunk-BUFEIJAI.js";import"./chunk-K5XRGNWG.js";import"./chunk-V5WYSCVT.js";import{l as G,m as U}from"./chunk-BIQHA7UA.js";import"./chunk-TMFFA26Y.js";import"./chunk-WAW37FIG.js";import{c as B,h as D,m as I,y as R}from"./chunk-DPLEMBB4.js";import"./chunk-PXB4YEY3.js";import{j as P,l as W,n as k}from"./chunk-GPEVUTDI.js";import{Eb as x,Ec as i,Fc as E,Ic as C,Jc as b,Kb as M,Kc as _,Lc as T,Mc as V,Nc as v,Qa as h,Wb as f,Z as y,Zc as S,_c as w,bc as O,gc as e,hc as t,ic as A,mc as L,pa as u,qb as d,rc as g,sc as N,ya as s,za as m}from"./chunk-T5ONJF63.js";import"./chunk-K2H6WANG.js";function z(n,q){if(n&1&&(e(0,"pre",21),i(1),S(2,"json"),t()),n&2){N();let l=v(25);d(),E(w(2,1,l))}}function K(n,q){n&1&&(e(0,"p",22),i(1," Your data will be shown here once it's available "),t())}var ce=(()=>{class n{constructor(){this.httpService=u(F),this.toastr=u(j),this.selectedChannel=h(null),this.orderNumber=h(null)}fetchLog(){if(!this.selectedChannel()||!this.orderNumber()){this.toastr.warning("Please select a channel and enter an order number","Warning");return}this.orderLog$=this.httpService.post(H.GetOrderApiLog,{ChannelID:this.selectedChannel(),OrderNumber:this.orderNumber()}).pipe(y(1))}copyToClipboard(l){if(!l)return;let p=typeof l=="string"?l:JSON.stringify(l,null,2);navigator.clipboard.writeText(p),this.toastr.success("Copied to clipboard!","Success")}static{this.\u0275fac=function(p){return new(p||n)}}static{this.\u0275cmp=x({type:n,selectors:[["app-order-api"]],decls:40,vars:9,consts:[["headerTitle","Origin Order Api",3,"hideSearchBox","hideSearchDropdown"],[1,"btn","btn-success","btn-fill","me-3",3,"click"],[1,"fa","fa-search"],[1,"container-fluid","mt-8","px-10"],[1,"row"],[1,"col-7"],[1,"d-flex","align-items-center"],[1,"w-75"],[1,"mb-0","text-muted","fst-italic"],[1,"w-100"],[3,"ngModelChange","ngModel"],[1,"d-flex","align-items-center","mt-3"],["type","text","placeholder","Order Number or Invoice Number",1,"form-control",3,"ngModelChange","ngModel"],[1,"row","mt-6"],[1,"col-12"],[1,"card"],[1,"card-header","d-flex","justify-content-between","align-items-center"],["type","button",1,"btn","btn-sm","btn-outline-primary",3,"click","disabled"],[1,"card-body"],[1,"col-sm-12"],[1,"form-group","position-relative"],["id","orderLogText"],[1,"text-center","my-12","text-muted"]],template:function(p,r){if(p&1){let a=L();e(0,"mainpanel",0)(1,"actions")(2,"button",1),g("click",function(){return s(a),m(r.fetchLog())}),A(3,"i",2),i(4," Search "),t()(),e(5,"content")(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6)(10,"div",7)(11,"h6"),i(12,"Channel"),t(),e(13,"p",8),i(14," View logs related to Order API activities. "),t()(),e(15,"div",9)(16,"channel-select-options",10),_("ngModelChange",function(o){return s(a),b(r.selectedChannel,o)||(r.selectedChannel=o),m(o)}),t()()(),e(17,"div",11)(18,"div",7)(19,"h6"),i(20,"Order Number"),t(),e(21,"p",8),i(22," Order or Invoice number from Channel. "),t()(),e(23,"div",9)(24,"input",12),_("ngModelChange",function(o){return s(a),b(r.orderNumber,o)||(r.orderNumber=o),m(o)}),t()()()()(),T(25),S(26,"async"),e(27,"div",13)(28,"div",14)(29,"div",15)(30,"div",16)(31,"h5"),i(32,"Response"),t(),e(33,"button",17),g("click",function(){s(a);let o=v(25);return m(r.copyToClipboard(o))}),i(34," Copy "),t()(),e(35,"div",18)(36,"div",19)(37,"div",20),M(38,z,3,3,"pre",21)(39,K,2,0,"p",22),t()()()()()()()()()}if(p&2){f("hideSearchBox",!0)("hideSearchDropdown",!0),d(16),C("ngModel",r.selectedChannel),d(8),C("ngModel",r.orderNumber),d();let a=V(w(26,6,r.orderLog$));d(8),f("disabled",!a),d(5),O(a?38:39)}},dependencies:[k,P,W,U,G,J,R,B,D,I,Y],encapsulation:2})}}return n})();export{ce as OrderApiComponent};
@@ -1 +0,0 @@
1
- import{a as ke}from"./chunk-3BGJ2T6Y.js";import{a as De}from"./chunk-YR2WEZDG.js";import{a as W}from"./chunk-XHAXYWZ7.js";import{a as Oe,b as Ve,c as Ne,d as J}from"./chunk-KQAQTVXQ.js";import{a as Te}from"./chunk-PPDHTO44.js";import{a as we}from"./chunk-7KG3DC5J.js";import{b as Ee}from"./chunk-IEYFOHME.js";import"./chunk-YXFTLQ5M.js";import"./chunk-OLSC6KHB.js";import{a as Fe}from"./chunk-EGTYAIU5.js";import"./chunk-7TWBIV3T.js";import"./chunk-J7AGLBPL.js";import"./chunk-6ALHX2I4.js";import"./chunk-3RK6DDJD.js";import{a as ve,b as Ie,c as ye}from"./chunk-GHQH62TZ.js";import"./chunk-CH2MLZU7.js";import"./chunk-ZZVNB72Q.js";import{a as Me}from"./chunk-VGXQU74M.js";import"./chunk-SDUUFQUI.js";import"./chunk-G6EG5QJS.js";import"./chunk-RIHLYYZU.js";import"./chunk-Q2OEJFVT.js";import"./chunk-6IAGGRZN.js";import"./chunk-T6QOFDEE.js";import"./chunk-KXZCGKQW.js";import"./chunk-QCZIDOKW.js";import{a as ue,l as xe}from"./chunk-2SUNUZ5Y.js";import{b as he,e as ge}from"./chunk-BUFEIJAI.js";import"./chunk-K5XRGNWG.js";import"./chunk-V5WYSCVT.js";import"./chunk-KHWTOD6H.js";import{d as Pe,l as be,m as Se}from"./chunk-BIQHA7UA.js";import{r as A,s as j}from"./chunk-TMFFA26Y.js";import"./chunk-WAW37FIG.js";import{b as _e,h as R,m as L,y as $}from"./chunk-DPLEMBB4.js";import{c as U,e as Ce,f as fe}from"./chunk-PXB4YEY3.js";import{d as se,f as k,g as me,j as pe,m as de,n as B}from"./chunk-GPEVUTDI.js";import{$c as ce,Dc as z,Eb as N,Ec as p,Fc as re,G as K,Gc as f,Ic as D,Jc as O,Ka as ee,Kb as u,Kc as V,Oc as ae,Qa as te,Qc as w,Rc as le,Wb as s,Z as G,Zb as ne,Zc as b,_c as y,ad as H,bc as ie,cc as M,ea as Y,ec as E,fc as T,gc as o,hc as a,ic as P,jc as S,kc as v,mc as I,ob as F,pa as Q,qb as r,rc as h,sc as m,v as q,vc as oe,wb as x,ya as g,za as C}from"./chunk-T5ONJF63.js";import{a as X,b as Z}from"./chunk-K2H6WANG.js";var We=(n,c)=>({color:n,"font-weight":c});function Ke(n,c){if(n&1&&(o(0,"mat-radio-button",2),p(1),a()),n&2){let e=c.$implicit,i=c.index,t=m();ne(le(7,We,t.model==e.Key&&t.activeBold?"#0976b4":"",t.model==e.Key&&t.activeBold?"700":"")),s("disabled",t.exception==e.Value)("matTooltip",t.title.length>0?t.title[i]:"")("value",e.Key)("name",t.name),r(),f("",e.Value," ")}}var Be=(()=>{class n{constructor(){this.disabled=!1,this.modelChange=new ee,this.options=[{Key:!1,Value:"No"},{Key:!0,Value:"Yes"}],this.border=!1,this.name="",this.title=[],this.exception="",this.activeBold=""}change(e){this.modelChange.emit(e)}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275cmp=N({type:n,selectors:[["lib-radio-options"]],inputs:{model:"model",disabled:"disabled",options:"options",border:"border",name:"name",title:"title",exception:"exception",activeBold:"activeBold"},outputs:{modelChange:"modelChange"},decls:2,vars:3,consts:[["color","primary",3,"ngModelChange","disabled","ngModel"],["matTooltipPosition","above","class","me-4 mt-1",3,"style","disabled","matTooltip","value","name",4,"ngFor","ngForOf"],["matTooltipPosition","above",1,"me-4","mt-1",3,"disabled","matTooltip","value","name"]],template:function(i,t){i&1&&(o(0,"mat-radio-group",0),h("ngModelChange",function(d){return t.change(d)}),u(1,Ke,2,10,"mat-radio-button",1),a()),i&2&&(s("disabled",t.disabled)("ngModel",t.model),r(),s("ngForOf",t.options))},dependencies:[B,k,ye,ve,Ie,$,R,L,j,A],styles:["html[_ngcontent-%COMP%]{--mdc-radio-state-layer-size: 36px}html[_ngcontent-%COMP%]{--mat-radio-touch-target-display: block}.mat-mdc-radio-button[_ngcontent-%COMP%] .mdc-radio[_ngcontent-%COMP%] .mdc-radio__native-control[_ngcontent-%COMP%]:enabled:checked + .mdc-radio__background[_ngcontent-%COMP%] .mdc-radio__outer-circle[_ngcontent-%COMP%]{border-color:#0976b4!important}.mat-mdc-radio-button[_ngcontent-%COMP%] .mdc-radio[_ngcontent-%COMP%] .mdc-radio__native-control[_ngcontent-%COMP%]:enabled + .mdc-radio__background[_ngcontent-%COMP%] .mdc-radio__inner-circle[_ngcontent-%COMP%]{background-color:#0976b4!important;border-color:#0976b4!important}"]})}}return n})();var Re=n=>[n],Ge=n=>({"text-decoration-line-through":n}),ze=n=>({"border-bottom":n}),He=n=>({"bg-gradient-warning":n});function Je(n,c){if(n&1){let e=I();S(0),o(1,"div")(2,"label",21),p(3,"Channel"),a(),o(4,"channel-select-options",22),V("ngModelChange",function(t){g(e);let l=m();return O(l.searchFilter.ListChannelID,t)||(l.searchFilter.ListChannelID=t),C(t)}),a()(),o(5,"div",23)(6,"label",24),p(7,"Filter by"),a(),o(8,"lib-radio-options",25),V("modelChange",function(t){g(e);let l=m();return O(l.searchFilter.filterModel,t)||(l.searchFilter.filterModel=t),C(t)}),a()(),v()}if(n&2){let e=m();r(4),s("multiple",!0),D("ngModel",e.searchFilter.ListChannelID),r(4),D("model",e.searchFilter.filterModel),s("options",e.filterTypeOptions)}}function Xe(n,c){if(n&1){let e=I();o(0,"button",27),h("click",function(){g(e);let t=m().ngIf,l=m();return C(l.onUpdateItems(t))}),P(1,"i",28),p(2," Update "),a()}}function Ze(n,c){if(n&1&&(S(0),o(1,"div",4),u(2,Xe,3,0,"button",26),a(),v()),n&2){let e=c.ngIf,i=m();r(2),s("ngIf",i.productService.hasSelectionVariant(e))}}function qe(n,c){if(n&1&&(o(0,"th",15)(1,"div",29),P(2,"img",30),o(3,"div",31),p(4),b(5,"stringLimit"),a()()()),n&2){let e=c.$implicit;r(),s("matTooltip",(e.Name==null?null:e.Name.length)>20?e.Name:""),r(),s("src",e==null?null:e.Img,F),r(2),f(" ",ce(5,3,e.Name,20)," ")}}function Ye(n,c){if(n&1){let e=I();o(0,"th")(1,"input",32),V("ngModelChange",function(t){g(e);let l=m();return O(l.checkboxState,t)||(l.checkboxState=t),C(t)}),h("ngModelChange",function(){g(e);let t=m();return C(t.onSelectAllData())}),a()()}if(n&2){let e=m();r(),D("ngModel",e.checkboxState)}}function Qe(n,c){n&1&&(o(0,"th",33)(1,"span"),p(2,"Expected"),a(),o(3,"span",34),p(4,"(POS)"),a()(),o(5,"th",33),p(6,"Channel"),a())}function et(n,c){if(n&1){let e=I();o(0,"img",47),h("click",function(t){g(e);let l=m(3).$implicit,d=m(2);return C(d.onZoomImage(t,l==null?null:l.ImageUrl))}),a()}if(n&2){let e=m(3).$implicit;oe("src",e==null?null:e.ImageUrl,F)}}function tt(n,c){n&1&&P(0,"img",48)}function nt(n,c){if(n&1&&(o(0,"small",46),p(1),a()),n&2){let e=m(3).$implicit;r(),f("(",e==null?null:e.Category,")")}}function it(n,c){if(n&1&&(S(0),o(1,"td",42),u(2,et,1,1,"img",43)(3,tt,1,0,"ng-template",null,0,H),a(),o(5,"td",44)(6,"h5",45),p(7),a(),u(8,nt,2,1,"small",46),a(),v()),n&2){let e=z(4),i=m().$index,t=m().$implicit,l=m().ngIf;r(),s("rowSpan",t==null?null:t.Variants.length)("ngClass",w(7,ze,i+1==l.length)),r(),s("ngIf",t==null?null:t.ImageUrl)("ngIfElse",e),r(3),s("rowSpan",t==null?null:t.Variants.length),r(2),re(t==null?null:t.Name),r(),ie(t!=null&&t.Category?8:-1)}}function ot(n,c){if(n&1){let e=I();o(0,"td",49)(1,"input",32),V("ngModelChange",function(t){g(e);let l=m().$implicit;return O(l.selected,t)||(l.selected=t),C(t)}),a()()}if(n&2){let e=m().$implicit;r(),D("ngModel",e.selected)}}function rt(n,c){if(n&1){let e=I();S(0),o(1,"td",51),p(2),b(3,"number"),a(),o(4,"td",52),h("click",function(){let t=g(e).$implicit,l=m(2).$implicit,d=m().$implicit,_=m(2);return C(_.openTableDialog(l,d,t))}),o(5,"div",53)(6,"div",54),p(7),b(8,"number"),a(),o(9,"a",55),h("click",function(t){return g(e),C(t==null?null:t.stopPropagation())}),P(10,"i",40),a()()(),v()}if(n&2){let e=c.$implicit;r(2),f(" ",y(3,4,e.PriceExpected)," "),r(2),s("ngClass",w(8,He,e.Price!=e.PriceExpected)),r(3),f(" ",y(8,6,e.Price)," "),r(2),s("href",e.Url,F)}}function at(n,c){n&1&&(o(0,"td",56),p(1," X "),a(),o(2,"td",56),p(3," X "),a())}function lt(n,c){if(n&1&&(S(0),u(1,rt,11,10,"ng-container",50)(2,at,4,0,"ng-template",null,1,H),v()),n&2){let e=c.$implicit,i=z(3),t=m().$implicit,l=m(3);r(),s("ngIf",l.getItemFromChannel(t,e.ID))("ngIfElse",i)}}function ct(n,c){if(n&1&&(o(0,"tr"),u(1,it,9,9,"ng-container",3),o(2,"td",35),p(3),a(),o(4,"td",36)(5,"div",37)(6,"div",38),p(7),a(),o(8,"div",31)(9,"a",39),P(10,"i",40),a()()()(),u(11,ot,2,1,"ng-template",19)(12,lt,4,2,"ng-container",41),a()),n&2){let e=c.$implicit,i=c.$index,t=m(3);r(),s("ngIf",i==0),r(2),f(" ",e==null?null:e.Model," "),r(),s("matTooltip",e.Discontinued?t.discontinuedVariantMsg:""),r(2),s("ngClass",w(8,Ge,e.Discontinued)),r(),f(" ",e==null?null:e.Code," "),r(2),s("href",t.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(e==null?null:e.ID),F),r(2),s("ngxPermissionsOnly",w(10,Re,t.rolePriceEdit)),r(),s("ngForOf",t.channels())}}function st(n,c){if(n&1&&(o(0,"tbody"),E(1,ct,13,12,"tr",null,M),a()),n&2){let e=c.$implicit;r(),T(e.Variants)}}function mt(n,c){if(n&1&&(S(0),E(1,st,3,0,"tbody",null,M),v()),n&2){let e=c.ngIf;r(),T(e)}}var qt=(()=>{class n{constructor(e,i,t,l,d,_,Le){this.http=e,this.toastr=i,this.dialog=t,this.productService=l,this.authService=d,this.biggerPictureService=_,this.paginationService=Le,this.infinitePagination=Q(J),this.searchFilter=new we,this.checkboxState=!1,this.rolePriceEdit=ue.price,this.discontinuedVariantMsg="This Variant is discontinued from POS, you must Non Active manually at the seller center so that it is not sold again on the channel.",this.rowCountAPI="Inventory/GetMultipleChannelComparisonRowCount",this.channels=te([]),this.filterTypeOptions=[{Key:W.ALL,Value:"All"},{Key:W.DIFFERENCE,Value:"Difference"}],this.pageData={Title:"Price Realtime",Nav:[{Title:"Price Cache",Url:"/menu/price",Active:!1}]},this.channelOptions=this.authService.getChannels(),this.hostName=this.authService.getDomain(),this.initPagination(),this.initChannelTable()}initChannelTable(){let e=this.searchFilter.ListChannelID,i=[];U.IsEmpty(e)||e?.length==0?i=this.channelOptions:i=this.channelOptions.filter(t=>e.findIndex(l=>l==t.ID)>-1),this.channels.update(()=>i)}initPagination(){this.infinitePagination.fetchDataEndpoint="Price/GetOutletPrice",this.infinitePagination.fethRowCountEndpoint=this.rowCountAPI,this.initProduct(),this.initPageLoader()}initProduct(){this.data$=this.infinitePagination.data$.pipe(G(1))}initPageLoader(){this.loader$=this.http.post("/api/PriceLoader/LoadMultiple",{}).pipe(Y(e=>{this.searchFilter=e.Filter,this.searchFilter.filterModel=W.ALL,this.infinitePagination.reloadPagination(this.searchFilter)}),G(1))}onSelectAllData(){this.data$=this.data$.pipe(q(e=>(e.map(i=>(i.Variants&&(i.Variants=i.Variants.map(t=>(t.selected=this.checkboxState,t))),i)),e)))}onFilter(e){this.searchFilter.text=e;let i=Z(X({},this.searchFilter),{text:e,PageNumber:this.searchFilter.PageNumber,RowCount:this.searchFilter.RowCount});this.initChannelTable(),this.infinitePagination.reloadPagination(i)}updatePrice(e){let i=this.productService.selectedVariantProduct(e);if(i.length>0){let t=i.map(_=>_.ID),d={ListChannelID:this.channelOptions.filter(_=>_.selected).map(_=>_.ID),ListID:t};this.http.post("/api/Price/UpdateChannelOutletPrice",d).subscribe({next:_=>{this.resetSelectedChannel(),this.onFilter(),this.toastr.success("Successfully updated "+d.ListID.length+" items in "+d.ListChannelID.length+" channels","Success")},error:_=>{this.resetSelectedChannel()}})}}resetSelectedChannel(){this.channelOptions=this.channelOptions.map(e=>(e.selected=!1,e))}getItemFromChannel(e,i){return e.Channel.find(t=>t.ChannelID==i)}onUpdateItems(e){let i=this.productService.selectedVariantProduct(e);this.dialog.open(De,{data:{title:"Updating Price",selectedItems:i,channels:this.channelOptions},width:"400px"}).afterClosed().pipe(K(t=>U.IsNotEmpty(t))).subscribe(t=>{this.channelOptions=t,this.updatePrice(e)})}openTableDialog(e,i,t){let l=JSON.parse(JSON.stringify(e));this.dialog.open(Oe,{data:{Name:i.Name,Variant:l,ChannelID:t?.ChannelID,Table:"price",ChannelItemID:t?.ChannelItemID}}).afterClosed().pipe(K(_=>U.IsNotEmpty(_))).subscribe(_=>{this.updateProductPrice(_,t)})}updateProductPrice(e,i){let t={ID:e.ChannelID,ChannelItemID:e.ChannelItemID,ChannelVariantID:e.ChannelVariationID,Price:parseFloat(e.Price),VariantID:e.ID,SKU:e.Sku};this.http.post("/api/Price/UpdatePriceByID",t).subscribe(l=>{i.Price=t.Price;let d=this.productService.findChannelById(t.ID,this.channelOptions);this.toastr.success(`Successfully updated ${e.ItemName} (${e.VarName}) inventory in ${d.Name} to ${t.Price}`,"Success")})}openExportDialog(){this.dialog.open(Ee,{data:{title:"Export Custom Channel Price",pageNumber:this.searchFilter.PageNumber,rowCount:this.searchFilter.RowCount,filterExport:this.searchFilter,getRowCountApi:this.rowCountAPI,exportApi:"price/GetExportOutletPrice"}}).afterClosed().subscribe()}onZoomImage(e,i){this.biggerPictureService.openBiggerPicture(e,i)}static{this.\u0275fac=function(i){return new(i||n)(x(ge),x(he),x(Pe),x(Fe),x(xe),x(Me),x(Te))}}static{this.\u0275cmp=N({type:n,selectors:[["app-custom-channel-price"]],features:[ae([J])],decls:38,vars:23,consts:[["elsePic",""],["elseCol",""],["headerTitle","Price Comparison",3,"onSubmit","hideSearchBox","hideSearchDropdown","textButton"],[4,"ngIf"],[1,"d-flex"],[1,"btn","btn-outline-secondary","shadow","rounded","ms-2",3,"click"],[1,"fa-solid","fa-print","me-3"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"table"],[1,"thead-light","sticky-top-thead"],[1,"channel-column"],["colspan","5"],["scope","col","colspan","2",1,"text-center","border-bottom-0","border","text-uppercase"],["scope","col","colspan","2",1,"text-center","w-25"],["scope","col",1,"text-start","w-20"],["scope","col",1,"text-end","w-10"],[3,"ngxPermissionsOnly"],[3,"onNextPage","onLastPage","onGetRowCount","totalData","hideCount","rowCount","pageNumber","disableNextButton","goToLastPage"],[1,"fw-bold","mb-2"],[3,"ngModelChange","multiple","ngModel"],[1,"mt-5",2,"height","46px"],[1,"fw-bold","mb-2","d-block"],["name","filterModel",3,"modelChange","model","options"],["type","button","class","btn btn-success shadow rounded","data-toggle","modal",3,"click",4,"ngIf"],["type","button","data-toggle","modal",1,"btn","btn-success","shadow","rounded",3,"click"],[1,"fas","fa-chevron-circle-up"],["matTooltipPosition","above",1,"d-flex","align-items-center","justify-content-center",2,"width","180px",3,"matTooltip"],[2,"width","16px","height","16px",3,"src"],[1,"ms-2"],["type","checkbox",3,"ngModelChange","ngModel"],[1,"text-end","border-top-0","border","w-10"],[1,"ms-1"],[1,"text-start","border-bottom"],["matTooltipPosition","above",1,"text-end","border-bottom",3,"matTooltip"],[1,"d-flex","align-items-center","justify-content-end"],[3,"ngClass"],["target","_blank",3,"href"],[1,"fas","fa-solid","fa-arrow-up-right-from-square","external-link-custom"],[4,"ngFor","ngForOf"],[1,"text-center",3,"rowSpan","ngClass"],["class","border rounded w-img cursor-pointer",3,"src","click",4,"ngIf","ngIfElse"],[1,"text-start","border-bottom",2,"padding-left","0px",3,"rowSpan"],[1,"mb-0","item-name"],[1,"mt-1"],[1,"border","rounded","w-img","cursor-pointer",3,"click","src"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded","w-img"],[1,"align-middle"],[4,"ngIf","ngIfElse"],[1,"text-end","border"],[1,"text-center","border","pointer","cell-hover",3,"click","ngClass"],[1,"d-flex","align-items-center","justify-content-center"],[1,"me-2"],["target","_blank",3,"click","href"],[1,"table-white","border","text-end",2,"color","red"]],template:function(i,t){i&1&&(o(0,"mainpanel",2),h("onSubmit",function(d){return t.onFilter(d)}),o(1,"filters"),u(2,Je,9,4,"ng-container",3),b(3,"async"),a(),o(4,"actions")(5,"div",4),u(6,Ze,3,1,"ng-container",3),b(7,"async"),o(8,"button",5),h("click",function(){return t.openExportDialog()}),P(9,"i",6),o(10,"span"),p(11,"Export"),a()()()(),o(12,"content")(13,"div",7)(14,"div",8)(15,"div",9)(16,"div",10)(17,"table",11)(18,"thead",12)(19,"tr",13),P(20,"th",14),E(21,qe,6,6,"th",15,M),a(),o(23,"tr")(24,"th",16)(25,"span"),p(26," Product "),a()(),o(27,"th",17),p(28,"Variant"),a(),o(29,"th",18),p(30,"SKU"),a(),u(31,Ye,2,1,"ng-template",19),E(32,Qe,7,0,null,null,M),a()(),u(34,mt,3,0,"ng-container",3),b(35,"async"),a(),o(36,"infinite-paginator",20),b(37,"async"),h("onNextPage",function(){return t.infinitePagination.onNextPage(t.searchFilter)})("onLastPage",function(){return t.infinitePagination.onLastPage(t.searchFilter)})("onGetRowCount",function(){return t.infinitePagination.getRowCount(t.searchFilter)}),a()()()()()()()),i&2&&(s("hideSearchBox",!1)("hideSearchDropdown",!1)("textButton","Search"),r(2),s("ngIf",y(3,13,t.loader$)),r(4),s("ngIf",y(7,15,t.data$)),r(15),T(t.channels()),r(10),s("ngxPermissionsOnly",w(21,Re,t.rolePriceEdit)),r(),T(t.channels()),r(2),s("ngIf",y(35,17,t.data$)),r(2),s("totalData",t.infinitePagination.totalData())("hideCount",t.infinitePagination.hideCount())("rowCount",y(37,19,t.infinitePagination.totalRowCount$))("pageNumber",t.infinitePagination.pageNumber())("disableNextButton",t.infinitePagination.disableNextButton())("goToLastPage",t.infinitePagination.isLastPage()))},dependencies:[B,se,k,me,pe,de,Se,be,$,_e,R,L,Ne,Be,j,A,Ve,fe,Ce,ke],styles:[".w-10[_ngcontent-%COMP%]{width:10%}.w-20[_ngcontent-%COMP%]{width:20%}.w-img[_ngcontent-%COMP%]{width:40px;height:40px}.item-name[_ngcontent-%COMP%]{font-weight:400;font-size:larger}.cell-hover[_ngcontent-%COMP%]:hover{background-color:#c9c9c9!important}"]})}}return n})();export{qt as CustomChannelPriceComponent};
@@ -1 +0,0 @@
1
- import{g as y,m as k,n as N}from"./chunk-GPEVUTDI.js";import{Eb as b,Ec as a,Fc as v,Gc as w,Hc as x,Ka as s,Kb as P,Na as C,Wb as p,Zc as u,_c as d,gc as n,hc as o,ic as f,mc as _,qb as i,rc as m,sc as c,ya as g,za as h}from"./chunk-T5ONJF63.js";function I(t,S){if(t&1){let r=_();n(0,"span",10),m("click",function(){g(r);let e=c();return h(e.onShowTotal())}),n(1,"i",11),a(2,"?"),o()()}}function B(t,S){if(t&1&&(n(0,"span"),a(1),u(2,"number"),o()),t&2){let r=c();i(),v(d(2,1,r.paginationTotal))}}var j=(()=>{class t{constructor(){this.nextButtonAlwaysVisible=C(!1),this.next=new s,this.filterChange=new s,this.previous=new s,this.total=new s,this.hasClicked=!1}onShowTotal(){this.total.emit()}onPreviousPage(){this.filter.PageNumber=this.filter.PageNumber-1,this.filterChange.emit(this.filter),this.previous.emit()}onNextPage(){this.filter.PageNumber=this.filter.PageNumber+1,this.filterChange.emit(this.filter),this.next.emit()}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=b({type:t,selectors:[["app-custom-paginator"]],inputs:{nextButtonAlwaysVisible:[1,"nextButtonAlwaysVisible"],filter:"filter",paginationTotal:"paginationTotal",totaldata:"totaldata",hasClicked:"hasClicked"},outputs:{next:"next",filterChange:"filterChange",previous:"previous",total:"total"},decls:16,vars:11,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"],["style","cursor: pointer",3,"click",4,"ngIf"],[4,"ngIf"],[1,"btn-group"],["role","button","title","Load all products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click","hidden"],[1,"fas","fa-arrow-left"],["role","button","title","Load more for 20 products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click","hidden"],[1,"fas","fa-arrow-right"],[2,"cursor","pointer",3,"click"],["title","Retreive rows count",1,"border","p-3"]],template:function(l,e){l&1&&(n(0,"div",0)(1,"div",1)(2,"div",2),a(3),u(4,"number"),u(5,"number"),P(6,I,3,0,"span",3)(7,B,3,3,"span",4),a(8),o()(),n(9,"div",5)(10,"a",6),m("click",function(){return e.onPreviousPage()}),f(11,"i",7),a(12," Prev"),o(),n(13,"a",8),m("click",function(){return e.onNextPage()}),f(14,"i",9),a(15," Next"),o()()()),l&2&&(i(3),x(" Showing ",d(4,7,e.filter.PageSize*(e.filter.PageNumber-1)+1)," - ",d(5,9,e.filter.PageSize*(e.filter.PageNumber-1)+e.totaldata)," of "),i(3),p("ngIf",!e.hasClicked),i(),p("ngIf",e.hasClicked),i(),w(" records ~ ",e.filter.PageNumber," Page "),i(2),p("hidden",e.filter.PageNumber==1),i(3),p("hidden",(e.filter.PageSize*(e.filter.PageNumber-1)+e.totaldata==e.paginationTotal||e.totaldata<e.filter.PageSize)&&!e.nextButtonAlwaysVisible()))},dependencies:[N,y,k],encapsulation:2})}}return t})();export{j as a};