marketplacepos 3.11.0 → 3.11.3

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 (127) hide show
  1. package/Marketplace/3rdpartylicenses.txt +40 -40
  2. package/Marketplace/chunk-26JYE3EW.js +1 -0
  3. package/Marketplace/chunk-4CIVIS2I.js +1 -0
  4. package/Marketplace/chunk-4IQIUVVU.js +1 -0
  5. package/Marketplace/chunk-54I7BFLJ.js +1 -0
  6. package/Marketplace/chunk-5IPUSVZQ.js +1 -0
  7. package/Marketplace/chunk-6B64VOO7.js +1 -0
  8. package/Marketplace/chunk-6DRNAUKE.js +8 -0
  9. package/Marketplace/chunk-6EMD4N72.js +4 -0
  10. package/Marketplace/chunk-6F6NSBIF.js +1 -0
  11. package/Marketplace/chunk-6MICMEJV.js +1 -0
  12. package/Marketplace/chunk-AL67KXJV.js +2 -0
  13. package/Marketplace/chunk-BD2QQPDK.js +1 -0
  14. package/Marketplace/{chunk-7HACTWDN.js → chunk-BG5B4X23.js} +2 -2
  15. package/Marketplace/chunk-BGR4ZABV.js +1 -0
  16. package/Marketplace/chunk-BMZAGAK3.js +1 -0
  17. package/Marketplace/chunk-DT3B54LD.js +4 -0
  18. package/Marketplace/chunk-DVDUQ5BZ.js +1 -0
  19. package/Marketplace/chunk-EMOFGOQE.js +5 -0
  20. package/Marketplace/chunk-FMQAUTQV.js +1 -0
  21. package/Marketplace/chunk-GPQQ6FGZ.js +1 -0
  22. package/Marketplace/chunk-GRMIXZTT.js +1 -0
  23. package/Marketplace/chunk-HTJWR537.js +1 -0
  24. package/Marketplace/chunk-HWRAMHXZ.js +1 -0
  25. package/Marketplace/chunk-INNTQ5YN.js +1 -0
  26. package/Marketplace/chunk-JI4WVOEH.js +1 -0
  27. package/Marketplace/chunk-JM3LERUP.js +7 -0
  28. package/Marketplace/chunk-K3G6FMDF.js +1 -0
  29. package/Marketplace/chunk-K4BSJ4Z6.js +1 -0
  30. package/Marketplace/chunk-KBYAFLE5.js +1 -0
  31. package/Marketplace/chunk-MBRVLUA3.js +1 -0
  32. package/Marketplace/chunk-MYMGWQRE.js +6 -0
  33. package/Marketplace/chunk-N4S3Q3EC.js +1 -0
  34. package/Marketplace/chunk-NHGAULCC.js +1 -0
  35. package/Marketplace/chunk-NRVXDIHY.js +1 -0
  36. package/Marketplace/chunk-NSM4JDXS.js +1 -0
  37. package/Marketplace/chunk-O4MUVGWL.js +2 -0
  38. package/Marketplace/chunk-PRYDCJG5.js +1 -0
  39. package/Marketplace/chunk-PZOGC5DT.js +1 -0
  40. package/Marketplace/chunk-QQVJ77MJ.js +1 -0
  41. package/Marketplace/chunk-RKYODJUS.js +1 -0
  42. package/Marketplace/{chunk-L24M3VHE.js → chunk-SH3VBTMG.js} +4 -4
  43. package/Marketplace/chunk-SP6QPE3M.js +1 -0
  44. package/Marketplace/chunk-STVMEPEK.js +2 -0
  45. package/Marketplace/chunk-TDHJ34QP.js +1 -0
  46. package/Marketplace/chunk-TDK2QBFI.js +1 -0
  47. package/Marketplace/chunk-U5YOE633.js +5 -0
  48. package/Marketplace/chunk-UETPNACD.js +3 -0
  49. package/Marketplace/chunk-UFSKJNHN.js +1 -0
  50. package/Marketplace/chunk-UHRIJRKZ.js +3 -0
  51. package/Marketplace/chunk-UILE7H6I.js +1 -0
  52. package/Marketplace/chunk-VD2J6EF2.js +2 -0
  53. package/Marketplace/chunk-W3EAYQL3.js +1 -0
  54. package/Marketplace/chunk-WIUP23L2.js +1 -0
  55. package/Marketplace/chunk-WYTSEICB.js +5 -0
  56. package/Marketplace/chunk-XH32N2LH.js +1 -0
  57. package/Marketplace/chunk-YJL4YLVW.js +1 -0
  58. package/Marketplace/chunk-Z7L5UJPR.js +47 -0
  59. package/Marketplace/chunk-ZHDV3I2T.js +1 -0
  60. package/Marketplace/index.html +3 -2
  61. package/Marketplace/main-7ZEC4JUC.js +1 -0
  62. package/Marketplace/polyfills-Y3W47ZLP.js +2 -0
  63. package/Marketplace/scripts-TB7H6DN4.js +5 -0
  64. package/Marketplace/styles-D4MZYFH2.css +1 -0
  65. package/package.json +1 -1
  66. package/Marketplace/chunk-2IRZVYEG.js +0 -2
  67. package/Marketplace/chunk-2UTL7SZX.js +0 -1
  68. package/Marketplace/chunk-2W5FPGNS.js +0 -5
  69. package/Marketplace/chunk-3K7JH744.js +0 -2
  70. package/Marketplace/chunk-3UUBOVMD.js +0 -1
  71. package/Marketplace/chunk-4V5T5AGK.js +0 -2
  72. package/Marketplace/chunk-5MULKC5W.js +0 -8
  73. package/Marketplace/chunk-6REOMLA7.js +0 -1
  74. package/Marketplace/chunk-7B2VFEDY.js +0 -1
  75. package/Marketplace/chunk-AD5UMGB7.js +0 -1
  76. package/Marketplace/chunk-AKID5YWA.js +0 -1
  77. package/Marketplace/chunk-AUSCKEGX.js +0 -1
  78. package/Marketplace/chunk-BIBAEYCG.js +0 -1
  79. package/Marketplace/chunk-BQ523YOG.js +0 -1
  80. package/Marketplace/chunk-C4SBGOAO.js +0 -7
  81. package/Marketplace/chunk-CEU76XGG.js +0 -1
  82. package/Marketplace/chunk-CXVHMJKM.js +0 -1
  83. package/Marketplace/chunk-DJQ6AUNB.js +0 -1
  84. package/Marketplace/chunk-DOT2ZIUM.js +0 -2
  85. package/Marketplace/chunk-DSRLOMEZ.js +0 -1
  86. package/Marketplace/chunk-G7FQBJ7U.js +0 -4
  87. package/Marketplace/chunk-GIMF6SW4.js +0 -1
  88. package/Marketplace/chunk-GMKZZDZY.js +0 -1
  89. package/Marketplace/chunk-GWNC6QPV.js +0 -1
  90. package/Marketplace/chunk-H75UAMG2.js +0 -1
  91. package/Marketplace/chunk-IDA3BCQ7.js +0 -1
  92. package/Marketplace/chunk-IG45JJJB.js +0 -1
  93. package/Marketplace/chunk-IMYVS5QP.js +0 -1
  94. package/Marketplace/chunk-K2GHGVP5.js +0 -1
  95. package/Marketplace/chunk-K427G76F.js +0 -1
  96. package/Marketplace/chunk-KCINXYOQ.js +0 -1
  97. package/Marketplace/chunk-LJRABJLP.js +0 -1
  98. package/Marketplace/chunk-MPUYSITZ.js +0 -1
  99. package/Marketplace/chunk-N5CNFEYR.js +0 -1
  100. package/Marketplace/chunk-N5F5D3WX.js +0 -4
  101. package/Marketplace/chunk-NBRMZAKJ.js +0 -1
  102. package/Marketplace/chunk-NRSNSW7E.js +0 -1
  103. package/Marketplace/chunk-O43UYQJ2.js +0 -1
  104. package/Marketplace/chunk-OSMPOBFL.js +0 -1
  105. package/Marketplace/chunk-P5WTJZG7.js +0 -3
  106. package/Marketplace/chunk-QBKXSMBS.js +0 -1
  107. package/Marketplace/chunk-QY37SUKW.js +0 -1
  108. package/Marketplace/chunk-R7NYYXK4.js +0 -1
  109. package/Marketplace/chunk-THJQFZAV.js +0 -1
  110. package/Marketplace/chunk-U4LOMDYT.js +0 -1
  111. package/Marketplace/chunk-UCCTSVAN.js +0 -3
  112. package/Marketplace/chunk-V663NFYO.js +0 -5
  113. package/Marketplace/chunk-VH3NXF2W.js +0 -1
  114. package/Marketplace/chunk-WSXSTM2K.js +0 -1
  115. package/Marketplace/chunk-WUTBJIZ3.js +0 -39
  116. package/Marketplace/chunk-X3JG2SZJ.js +0 -1
  117. package/Marketplace/chunk-X7VVYHKH.js +0 -6
  118. package/Marketplace/chunk-XLIHXKFC.js +0 -1
  119. package/Marketplace/chunk-YCAHOBTV.js +0 -1
  120. package/Marketplace/chunk-YIKG6QQI.js +0 -5
  121. package/Marketplace/chunk-YUB56KZH.js +0 -1
  122. package/Marketplace/main-M4T6UEQL.js +0 -1
  123. package/Marketplace/polyfills-QFVPVGT7.js +0 -2
  124. package/Marketplace/scripts-M46NWPTC.js +0 -5
  125. package/Marketplace/styles-23F6QRAE.css +0 -1
  126. /package/Marketplace/{chunk-47CCMQZH.js → chunk-662E5VTA.js} +0 -0
  127. /package/Marketplace/{chunk-CNCWPSQQ.js → chunk-IWVYX6KY.js} +0 -0
@@ -1 +0,0 @@
1
- import{a as D,b as gt,d as q,e as ee}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.11.0/Marketplace/chunk-4V5T5AGK.js";import{a as Z}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.11.0/Marketplace/chunk-CNCWPSQQ.js";import{a as A}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.11.0/Marketplace/chunk-3UUBOVMD.js";import{d as qt,e as Yt,f as Qt,g as Wt,k as Xt}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.11.0/Marketplace/chunk-P5WTJZG7.js";import{a as Y,b as Ct}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.11.0/Marketplace/chunk-WSXSTM2K.js";import{a as K}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.11.0/Marketplace/chunk-AKID5YWA.js";import{a as Jt,b as zt,c as Ht}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.11.0/Marketplace/chunk-AD5UMGB7.js";import{b as ne}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.11.0/Marketplace/chunk-MPUYSITZ.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.11.0/Marketplace/chunk-YCAHOBTV.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.11.0/Marketplace/chunk-IDA3BCQ7.js";import{a as te}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.11.0/Marketplace/chunk-XLIHXKFC.js";import{a as U}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.11.0/Marketplace/chunk-2W5FPGNS.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.11.0/Marketplace/chunk-U4LOMDYT.js";import{a as Gt,b as Kt}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.11.0/Marketplace/chunk-OSMPOBFL.js";import{a as Zt}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.11.0/Marketplace/chunk-X7VVYHKH.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.11.0/Marketplace/chunk-N5F5D3WX.js";import{a as nt,b as ht,d as H,e as Rt}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.11.0/Marketplace/chunk-2IRZVYEG.js";import{a as W}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.11.0/Marketplace/chunk-IG45JJJB.js";import{d as j,k}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.11.0/Marketplace/chunk-G7FQBJ7U.js";import{a as R}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.11.0/Marketplace/chunk-7B2VFEDY.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.11.0/Marketplace/chunk-C4SBGOAO.js";import{C as V,D as jt,q as _t,r as $t,u as G}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.11.0/Marketplace/chunk-3K7JH744.js";import{T as Bt}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.11.0/Marketplace/chunk-NRSNSW7E.js";import{b as At,c as et,h as B,k as $,u as Lt}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.11.0/Marketplace/chunk-YUB56KZH.js";import{b as z,c as _}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.11.0/Marketplace/chunk-GWNC6QPV.js";import{$a as a,Aa as O,Ac as Ut,B as y,Fb as F,Ga as c,Gb as T,Ha as x,Hb as Nt,Ob as tt,Qa as s,T as J,V as Pt,Wa as S,X as Ft,aa as Dt,ab as l,ac as N,bb as C,bc as E,c as Mt,cb as P,db as b,ea as M,ec as pt,fa as Tt,fb as v,fc as Et,hc as dt,ic as kt,ja as u,jb as g,ka as h,lb as d,q as Ot,qb as L,rb as m,sb as st,tb as I,vc as mt,wc as Vt,xb as Q,yb as it,yc as ut}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.11.0/Marketplace/chunk-5MULKC5W.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.11.0/Marketplace/chunk-6REOMLA7.js";var me=()=>["/menu/products/download/by-url"],ie=(()=>{let r=class r{constructor(){this.productTabs=[{Title:"Sold in Channel",Url:"/menu/products/status/sold-in-channel",Description:"SKU has been mapped between dealpos and marketplace"},{Title:"Not in POS",Url:"/menu/products/status/not-in-pos",Description:"SKU sold in Marketplace but not exist in DEALPOS"},{Title:"Not in Channel",Url:"/menu/products/status/not-in-channel",Description:"SKU has not been sold on one of channels"},{Title:"In POS",Url:"/menu/products/status/in-pos",Description:"All products which is already available in POS"},{Title:"Multiple Listing",Url:"/menu/products/status/duplicate-sku",Description:"SKU(s) which is listed more than one time (one to many)"},{Title:"Channel Statistic",Url:"/menu/products/status/channel-statistic",Description:"Product statistic from each channel obtained from the last product scan"}]}};r.\u0275fac=function(e){return new(e||r)},r.\u0275cmp=M({type:r,selectors:[["app-status"]],decls:13,vars:3,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid","d-flex","align-items-center","justify-content-between"],[3,"Tabs"],[1,"dropdown","me-6"],["role","button","data-bs-toggle","dropdown","aria-expanded","false",1,"text-dark"],[1,"fa-solid","fa-bars","fa-lg"],[1,"dropdown-menu","dropdown-menu-end","row"],[1,"d-flex"],[1,"dropdown-item",3,"routerLink"]],template:function(e,i){e&1&&(a(0,"nav",0)(1,"div",1)(2,"div"),C(3,"nav-tab",2),l()(),a(4,"div")(5,"div",3)(6,"a",4),C(7,"i",5),l(),a(8,"div",6)(9,"div",7)(10,"a",8),m(11,"Download Product By Url"),l()()()()()(),C(12,"router-outlet")),e&2&&(c(3),s("Tabs",i.productTabs),c(7),s("routerLink",Q(2,me)))},dependencies:[Gt,Vt,ut]});let o=r;return o})();function ue(o,r){if(o&1){let n=v();a(0,"button",13),g("click",function(){u(n);let e=d(2);return h(e.onOpenScanDialog())}),C(1,"i",14),m(2," Scan Channel "),l()}}function he(o,r){if(o&1&&(P(0),S(1,ue,3,0,"button",12),b()),o&2){let n=d();c(1),s("ngIf",!n.productService.hasSelection(n.products))}}function _e(o,r){if(o&1){let n=v();P(0),a(1,"button",15),g("click",function(){u(n);let e=d();return h(e.onScanMultipleProduct())}),C(2,"i",14),m(3),l(),b()}if(o&2){let n=d(),t;c(3),I(" Scan (",(t=n.productService.selectedProduct(n.products))==null?null:t.length,") ")}}function ge(o,r){if(o&1){let n=v();P(0),a(1,"button",16),g("click",function(){u(n);let e=d();return h(e.onUploadMultipleProduct())}),C(2,"i",17),m(3),l(),b()}if(o&2){let n=d(),t;c(3),I(" Upload (",(t=n.productService.selectedProduct(n.products))==null?null:t.length,") ")}}function Ce(o,r){if(o&1){let n=v();a(0,"div",18)(1,"app-product-card",19),g("onUpload",function(){let i=u(n).$implicit,p=d();return h(p.onUploadToMultipleChannel(i))})("onScan",function(){let i=u(n).$implicit,p=d();return h(p.onScanSingleProduct(i))})("onDescEvent",function(){let i=u(n).index,p=d();return h(p.onOpenDialogVariant(i))})("onCheckBoxChange",function(e){let p=u(n).$implicit;return h(p.selected=e)}),l()()}if(o&2){let n=r.$implicit,t=d();c(1),s("productId",n.ID)("title",n==null?null:n.Name)("image",n==null?null:n.ThumbnailUrl)("description",(n==null?null:n.Variants.length)>1?(n==null?null:n.Variants.length)+" Variants":null)("channels",t.productService.getChannelProduct(n))("code",t.getVariantCode(n==null?null:n.Variants))("showCheckBox",(n==null?null:n.Channel.length)<t.channelOptions.length)("scanButton",!0)("uploadButton",n==null?null:n.hasUpload)("imageForZoom",n==null?null:n.ImageUrl)}}function fe(o,r){o&1&&(P(0),a(1,"div",20),C(2,"app-empty-state"),l(),b())}function Se(o,r){if(o&1){let n=v();P(0),a(1,"div",21)(2,"div",22)(3,"app-custom-paginator",23),g("next",function(){u(n);let e=d();return h(e.onNextPage())})("previous",function(){u(n);let e=d();return h(e.onPrevPage())}),l()()(),b()}if(o&2){let n=d();c(3),s("filter",n.searchFilter)("totaldata",n.products==null?null:n.products.length)("paginationTotal",n.rowCount)("hasClicked",!0)}}var re=(()=>{let r=class r{constructor(t,e,i,p,f){this.http=t,this.toastr=e,this.dialog=i,this.productService=p,this.authService=f,this.searchFilter=new Z,this.products=[],this.rowCount=0,this.multipeScanChannels=[],this.getLoaderPage(),this.channelOptions=this.authService.getChannels(),this.initMultiScanChannels()}getLoaderPage(){this.productService.LoadInPOS().subscribe(t=>{this.Categories=t.Options.Categories,this.searchFilter.PageNumber=t.Filter.PageNumber,this.searchFilter.RowCount=t.Filter.RowCount,this.searchFilter.ChannelID=null,this.searchFilter.Category=t.Filter.Category,this.searchFilter.PageSize=100,this.getProducts()})}initMultiScanChannels(){this.multipeScanChannels=this.productService.filterChannelByTypeId(this.channelOptions,[z.Tokopedia,z.Tiktok])}getProducts(){let t={PageNumber:this.searchFilter.PageNumber,RowCount:this.searchFilter.RowCount,text:this.searchFilter.text,Category:this.searchFilter.Category,From:this.startDate,To:this.endDate};this.http.post("/api/product/GetInPOS",t).subscribe(e=>{this.products=e.Data,this.rowCount=e.Total==null?this.searchFilter.RowCount:e.Total.toString(),this.products=this.productService.checkProductHasUploadBtn(this.products,this.channelOptions)})}onOpenScanDialog(){let t=JSON.parse(JSON.stringify(this.searchFilter));t.ChannelID=_.GuidEMpty,this.dialog.open(D,{data:{filter:t,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(y(i=>_.IsNotEmpty(i))).subscribe(i=>{this.searchFilter.ChannelID=i.ChannelID,this.searchFilter.ScanFull=i.ScanFull,this.searchFilter.UpdatedProduct=i.UpdatedProduct,this.searchFilter.Async=i.Async,this.scanAllProduct()})}scanAllProduct(){if(this.searchFilter.ChannelID==null){this.toastr.error("Please Select Channel","Error");return}this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).subscribe(t=>{if(this.searchFilter.Async)this.toastr.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"});else{this.getLoaderPage();let e=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.productService.successToastrScanAllProduct(t,e,!this.searchFilter.UpdatedProduct)}})}onOpenDialogVariant(t){this.dialog.open(gt,{data:{title:this.products[t].Name,variants:this.products[t].Variants},width:"800px"})}onUploadMultipleProduct(){let t=this.productService.selectedProduct(this.products),e=this.productService.filterUnselectedChannel(t,this.channelOptions);this.dialog.open(q,{width:"700px",data:{title:"Upload Multiple Product",channels:e}}).afterClosed().pipe(y(i=>_.IsNotEmpty(i)),J(i=>this.productService.uploadMultipleProduct(t,i))).subscribe({next:i=>{this.getProducts()}})}onUploadToMultipleChannel(t){let e=this.productService.getChannelProduct(t);t.Channel=e;let i=this.productService.filterUnselectedChannel([t],this.channelOptions);this.dialog.open(q,{width:"700px",data:{title:`Upload - ${t.Name}`,channels:i,product:t}}).afterClosed().pipe(y(p=>_.IsNotEmpty(p)),J(p=>this.productService.uploadSingleProduct([t],p))).subscribe({next:p=>{this.getProducts()}})}searchProduct(t){this.searchFilter.text=t,this.getProducts()}onNextPage(){this.getProducts()}onPrevPage(){this.getProducts()}onScanMultipleProduct(){let t=JSON.parse(JSON.stringify(this.searchFilter));t.ChannelID=_.GuidEMpty;let e=this.productService.filterChannelByTypeId(this.channelOptions,[z.Tokopedia,z.Tiktok]);this.dialog.open(D,{data:{filter:t,channelOptions:e,isSingleChannel:!0},width:"600px"}).afterClosed().pipe(y(p=>_.IsNotEmpty(p))).subscribe(p=>{this.searchFilter.ChannelID=p.ChannelID,this.searchFilter.ScanFull=p.ScanFull,this.searchFilter.UpdatedProduct=p.UpdatedProduct;let f=this.productService.selectedProduct(this.products),w=this.productService.getVariantCodesProducts(f);this.scanSingleProduct(w)})}onScanSingleProduct(t){let e=JSON.parse(JSON.stringify(this.searchFilter));e.ChannelID=_.GuidEMpty,this.dialog.open(D,{data:{filter:e,channelOptions:this.channelOptions,isSingleChannel:!0},width:"600px"}).afterClosed().pipe(y(i=>_.IsNotEmpty(i))).subscribe(i=>{this.searchFilter.ChannelID=i.ChannelID;let p=this.productService.getVariantCodesProduct(t);this.scanSingleProduct(p)})}scanSingleProduct(t){this.productService.scanSingle(this.searchFilter.ChannelID,t).subscribe({next:e=>{if(e)this.toastr.success("Successfully Scan ","Success");else{let i=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.toastr.error(`This product is not existed in ${i?.Name} `,"Error")}this.searchFilter.ChannelID=_.GuidEMpty,e&&this.getProducts()},error:e=>{this.searchFilter.ChannelID=_.GuidEMpty}})}getVariantCode(t){let e;return t.length>1&&(e=(t[0].model?t[0].model:"")+t[0].Code),t.length==1&&(e=t[0].Code),e}};r.\u0275fac=function(e){return new(e||r)(x(R),x(j),x(G),x(U),x(k))},r.\u0275cmp=M({type:r,selectors:[["app-in-pos"]],decls:22,vars:13,consts:[["description","All products which is already available in POS",3,"headerTitle","onSubmit"],[4,"ngIf"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","Name","bindValue","Name","placeholder","Select Category",1,"center-text",3,"clearable","items","ngModel","ngModelChange"],[1,"mt-5"],["id","dates",1,"form-control","rounded","dateRange",3,"rangePicker"],["matStartDate","","placeholder","Start date",3,"ngModel","ngModelChange","click"],["matEndDate","","placeholder","End date",3,"ngModel","ngModelChange","click"],["picker",""],[1,"container-fluid"],[1,"row","mt-8"],["class","col-12 col-md-6 col-xl-4 px-3 my-3",4,"ngFor","ngForOf"],["type","button","data-cy","scanSoldinChannel","class","btn btn-outline-secondary shadow rounded",3,"click",4,"ngIf"],["type","button","data-cy","scanSoldinChannel",1,"btn","btn-outline-secondary","shadow","rounded",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],["type","button","data-cy","scanInPos",1,"btn","btn-outline-secondary","shadow","rounded","me-2",3,"click"],[1,"btn","btn-light","shadow","rounded","ms-2",3,"click"],["aria-hidden","true",1,"fa","fa-upload"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[3,"productId","title","image","description","channels","code","showCheckBox","scanButton","uploadButton","imageForZoom","onUpload","onScan","onDescEvent","onCheckBoxChange"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"row","mt-2","justify-content-end"],[1,"col-md-12"],[3,"filter","totaldata","paginationTotal","hasClicked","next","previous"]],template:function(e,i){if(e&1){let p=v();a(0,"mainpanel",0),g("onSubmit",function(w){return i.searchProduct(w)}),a(1,"actions"),S(2,he,2,1,"ng-container",1)(3,_e,4,1,"ng-container",1)(4,ge,4,1,"ng-container",1),l(),a(5,"filters")(6,"div")(7,"label",2),m(8,"Category"),l(),a(9,"ng-select",3),g("ngModelChange",function(w){return i.searchFilter.Category=w}),l()(),a(10,"div",4)(11,"mat-date-range-input",5)(12,"input",6),g("ngModelChange",function(w){return i.startDate=w})("click",function(){u(p);let w=L(15);return h(w.open())}),l(),a(13,"input",7),g("ngModelChange",function(w){return i.endDate=w})("click",function(){u(p);let w=L(15);return h(w.open())}),l()(),C(14,"mat-date-range-picker",null,8),l()(),a(16,"content")(17,"div",9)(18,"div",10),S(19,Ce,2,10,"div",11)(20,fe,3,0,"ng-container",1),l(),S(21,Se,4,4,"ng-container",1),l()()()}if(e&2){let p=L(15);s("headerTitle","In POS ("+i.rowCount+")"),c(2),s("ngIf",!i.productService.hasSelection(i.products)),c(1),s("ngIf",i.productService.hasSelection(i.products)&&i.multipeScanChannels.length>0),c(1),s("ngIf",i.productService.hasSelection(i.products)),c(5),s("clearable",!0)("items",i.Categories)("ngModel",i.searchFilter.Category),c(2),s("rangePicker",p),c(1),s("ngModel",i.startDate),c(1),s("ngModel",i.endDate),c(6),s("ngForOf",i.products),c(1),s("ngIf",i.products.length==0),c(1),s("ngIf",i.products.length>0)}},dependencies:[N,E,et,B,$,V,H,K,Y,A,Qt,qt,Yt,Wt],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media (min-width: 1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}.navbar-toggler[_ngcontent-%COMP%]:focus{box-shadow:none!important}.img-logo[_ngcontent-%COMP%]{height:24px;width:24px}.dateRange[_ngcontent-%COMP%]{padding-top:.8rem;padding-bottom:.8rem}"]});let o=r;return o})();function xe(o,r){if(o&1){let n=v();P(0),a(1,"button",10),g("click",function(){u(n);let e=d();return h(e.onOpenScanDialog())}),C(2,"i",11),m(3," Scan Channel "),l(),b()}}function ve(o,r){if(o&1){let n=v();P(0),a(1,"button",12),g("click",function(){u(n);let e=d();return h(e.onScanMultipleProduct())}),C(2,"i",11),m(3),l(),b()}if(o&2){let n=d();c(3),I(" Scan (",n.productService.selectedProduct(n.products).length,") ")}}function Pe(o,r){if(o&1){let n=v();P(0),a(1,"button",13),g("click",function(){u(n);let e=d();return h(e.onUploadMultipleProduct())}),C(2,"i",14),m(3),l(),b()}if(o&2){let n=d();c(3),I(" Upload (",n.productService.selectedProduct(n.products).length,") ")}}function be(o,r){if(o&1&&(a(0,"span",15),C(1,"img",16),l(),m(2)),o&2){let n=r.item;c(1),s("src",n.Img,O)("alt",n.Name),c(1),I(" ",n.Name," ")}}function Ie(o,r){if(o&1){let n=v();a(0,"div",17)(1,"label",18),m(2,"Item ID"),l(),a(3,"input",19),g("ngModelChange",function(e){u(n);let i=d();return h(i.searchFilter.Item_id=e)}),l()()}if(o&2){let n=d();c(3),s("ngModel",n.searchFilter.Item_id)}}function ye(o,r){if(o&1){let n=v();a(0,"div",20)(1,"app-product-card",21),g("onUpload",function(){let i=u(n).$implicit,p=d();return h(p.onUploadToMultipleChannel(i))})("onDescEvent",function(){let i=u(n).index,p=d();return h(p.onOpenVariantDetail(i))})("onScan",function(){let i=u(n).$implicit,p=d();return h(p.onScanSingleProduct(i))})("onCheckBoxChange",function(e){let p=u(n).$implicit;return h(p.selected=e)}),l()()}if(o&2){let n=r.$implicit,t=d();c(1),s("productId",n==null?null:n.ID)("title",n==null?null:n.Name)("image",n==null?null:n.ThumbnailUrl)("description",(n==null||n.Variants==null?null:n.Variants.length)>1?(n==null||n.Variants==null?null:n.Variants.length)+" Variants":null)("channels",t.productService.getChannelProduct(n))("code",t.getVariantCode(n==null?null:n.Variants))("showCheckBox",n==null?null:n.hasScan)("scanButton",!0)("uploadButton",n==null?null:n.hasUpload)("imageForZoom",n==null?null:n.ImageUrl)}}function we(o,r){o&1&&(P(0),a(1,"div",22),C(2,"app-empty-state"),l(),b())}function Me(o,r){if(o&1){let n=v();a(0,"div",23)(1,"div",24)(2,"app-custom-paginator",25),g("total",function(){u(n);let e=d();return h(e.getRowCount())})("next",function(){u(n);let e=d();return h(e.onNextPage())})("previous",function(){u(n);let e=d();return h(e.onPreviousPage())}),l()()()}if(o&2){let n=d();c(2),s("filter",n.searchFilter)("totaldata",n.products==null?null:n.products.length)("paginationTotal",n.rowCount)("hasClicked",n.hasClickRowCount)}}var ae=(()=>{let r=class r{constructor(t,e,i,p,f,w){this.http=t,this.dialog=e,this.toastr=i,this.productService=p,this.activateRouter=f,this.authService=w,this.searchFilter=new Z,this.products=[],this.rowCount=0,this.hasClickRowCount=!1,this.guidEmpty=_.GuidEMpty,this.multipeScanChannels=[],this.channelOptions=this.authService.getChannels(),this.initMultiScanChannels()}ngOnInit(){this.activateRouter.queryParams.subscribe(t=>{t.ID?this.initPageLoader(t.ID):this.initPageLoader(_.GuidEMpty)})}initPageLoader(t){this.productService.loader(t).subscribe(e=>{this.searchFilter=e.Filter,e.Filter.ChannelID!=_.GuidEMpty&&(this.searchFilter.ListChannelID=[],this.searchFilter.ListChannelID.push(e.Filter.ChannelID)),this.searchFilter.PageSize=e.Filter.RowCount,this.searchFilter.Item_id="",this.getProducts()})}initMultiScanChannels(){this.multipeScanChannels=this.productService.filterChannelByTypeId(this.channelOptions,[z.Tokopedia,z.Tiktok])}getProducts(){let t={ListChannelID:this.searchFilter.ListChannelID,PageNumber:this.searchFilter.PageNumber,RowCount:this.searchFilter.RowCount,text:this.searchFilter.text,Item_id:this.searchFilter.Item_id};this.productService.findAllSoldInChannel(t).subscribe(e=>{this.products=e.Data,this.products=this.productService.checkProductHasUploadBtn(this.products,this.channelOptions),this.products=this.productService.checkProductHasScanButton(this.products,this.channelOptions)})}searchProduct(t){this.searchFilter.text=t,this.hasClickRowCount=!1,this.getProducts()}onOpenVariantDetail(t){let e=this.products[t].Variants;this.dialog.open(gt,{data:{variants:e,title:this.products[t].Name},width:"800px"})}onOpenScanDialog(){let t=JSON.parse(JSON.stringify(this.searchFilter));t.ChannelID=_.GuidEMpty,this.dialog.open(D,{data:{filter:t,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(y(i=>_.IsNotEmpty(i))).subscribe(i=>{this.searchFilter.ChannelID=i.ChannelID,this.searchFilter.ScanFull=i.ScanFull,this.searchFilter.UpdatedProduct=i.UpdatedProduct,this.searchFilter.Async=i.Async,this.scanAllProduct()})}scanAllProduct(){let t=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).pipe(y(e=>e)).subscribe(e=>{this.searchFilter.Async?this.toastr.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"}):(this.productService.successToastrScanAllProduct(e,t,!this.searchFilter.UpdatedProduct),this.initPageLoader(_.GuidEMpty))})}onScanSingleProduct(t){t.Channel=this.productService.getChannelProduct(t);let e=JSON.parse(JSON.stringify(this.searchFilter));this.dialog.open(D,{data:{filter:e,channelOptions:this.channelOptions,isSingleChannel:!0},width:"600px"}).afterClosed().pipe(y(i=>_.IsNotEmpty(i))).subscribe(i=>{this.searchFilter.ChannelID=i.ChannelID;let p=this.productService.getVariantCodesProduct(t);this.scanProducts(p)})}onUploadToMultipleChannel(t){let e=this.productService.getChannelProduct(t);t.Channel=e;let i=this.productService.filterUnselectedChannel([t],this.channelOptions);this.dialog.open(q,{width:"700px",data:{title:`Upload - ${t.Name}`,channels:i,product:t}}).afterClosed().pipe(y(p=>_.IsNotEmpty(p)),J(p=>this.productService.uploadSingleProduct([t],p))).subscribe({next:p=>{this.getProducts()}})}onScanMultipleProduct(){this.searchFilter.ChannelID=_.GuidEMpty;let t=JSON.parse(JSON.stringify(this.searchFilter));this.dialog.open(D,{data:{filter:t,channelOptions:this.multipeScanChannels,isSingleChannel:!0},width:"600px"}).afterClosed().pipe(y(i=>_.IsNotEmpty(i))).subscribe(i=>{this.searchFilter.ChannelID=i.ChannelID,this.searchFilter.ScanFull=i.ScanFull,this.searchFilter.UpdatedProduct=i.UpdatedProduct;let p=this.productService.selectedProduct(this.products),f=this.productService.getVariantCodesProducts(p);this.scanProducts(f)})}scanProducts(t){this.productService.scanSingle(this.searchFilter.ChannelID,t).subscribe({next:e=>{let i=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);e?this.toastr.success(`Product Successfully scan with ${i?.Name}`,"Success"):this.toastr.error(`This product is not existed in ${i?.Name} `,"Error"),this.searchFilter.ChannelID=_.GuidEMpty,e&&this.getProducts()},error:e=>{this.searchFilter.ChannelID=_.GuidEMpty}})}getVariantCode(t){let e;return t.length>1&&(e=(t[0].model?t[0].model:"")+t[0].Code),t.length==1&&(e=t[0].Code),e}onClearFilterChannel(){this.searchFilter.ChannelID=_.GuidEMpty,this.searchFilter.Item_id=""}onUploadMultipleProduct(){let t=this.productService.selectedProduct(this.products),e=this.productService.filterUnselectedChannel(t,this.channelOptions);this.dialog.open(q,{width:"700px",data:{title:"Upload Multiple Product",channels:e}}).afterClosed().pipe(y(i=>_.IsNotEmpty(i)),J(i=>this.productService.uploadMultipleProduct(t,i))).subscribe({next:i=>{this.getProducts()}})}getRowCount(){let t={ListChannelID:this.searchFilter.ListChannelID,text:this.searchFilter.text};this.http.post("/api/product/GetSoldInChannelRowCount",t).subscribe(e=>{this.hasClickRowCount=!0,this.rowCount=e.Total})}onNextPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber+1,this.getProducts()}onPreviousPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber-1,this.getProducts()}};r.\u0275fac=function(e){return new(e||r)(x(R),x(G),x(j),x(U),x(mt),x(k))},r.\u0275cmp=M({type:r,selectors:[["app-sold-in-channel"]],decls:18,vars:12,consts:[["description","SKU has been mapped between dealpos and marketplace",3,"headerTitle","onSubmit"],[4,"ngIf"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"clearable","multiple","items","ngModel","ngModelChange","clear"],["ng-option-tmp","","ng-label-tmp",""],["class","mt-5",4,"ngIf"],[1,"container-fluid"],[1,"row","mt-8"],["class","col-12 col-md-6 col-xl-4 px-3 my-3",4,"ngFor","ngForOf"],["class","row",4,"ngIf"],["type","button","data-cy","scanSoldinChannel",1,"btn","btn-outline-secondary","shadow","rounded",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],["type","button","data-cy","scanInPos",1,"btn","btn-outline-secondary","shadow","rounded","me-2",3,"click"],[1,"btn","btn-light","shadow","rounded","ms-2",3,"click"],["aria-hidden","true",1,"fa","fa-upload"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"mt-5"],[1,"fw-bold"],["type","text","name","Item_id","id","Item_id",1,"form-control","mt-2",3,"ngModel","ngModelChange"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[3,"productId","title","image","description","channels","code","showCheckBox","scanButton","uploadButton","imageForZoom","onUpload","onDescEvent","onScan","onCheckBoxChange"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"row"],[1,"col-12"],[3,"filter","totaldata","paginationTotal","hasClicked","total","next","previous"]],template:function(e,i){e&1&&(a(0,"mainpanel",0),g("onSubmit",function(f){return i.searchProduct(f)}),a(1,"actions"),S(2,xe,4,0,"ng-container",1)(3,ve,4,1,"ng-container",1)(4,Pe,4,1,"ng-container",1),l(),a(5,"filters")(6,"div")(7,"label",2),m(8,"Channel"),l(),a(9,"ng-select",3),g("ngModelChange",function(f){return i.searchFilter.ListChannelID=f})("clear",function(){return i.onClearFilterChannel()}),S(10,be,3,3,"ng-template",4),l()(),S(11,Ie,4,1,"div",5),l(),a(12,"content")(13,"div",6)(14,"div",7),S(15,ye,2,10,"div",8)(16,we,3,0,"ng-container",1),l(),S(17,Me,3,4,"div",9),l()()()),e&2&&(s("headerTitle","Sold in Channel"),c(2),s("ngIf",!i.productService.hasSelection(i.products)),c(1),s("ngIf",i.multipeScanChannels.length>0&&i.productService.hasSelection(i.products)),c(1),s("ngIf",i.productService.hasSelection(i.products)),c(5),s("clearable",!0)("multiple",!0)("items",i.channelOptions)("ngModel",i.searchFilter.ListChannelID),c(2),s("ngIf",i.searchFilter.ListChannelID!=null),c(4),s("ngForOf",i.products),c(1),s("ngIf",i.products.length==0),c(1),s("ngIf",i.products==null?null:i.products.length))},dependencies:[N,E,et,B,$,V,H,nt,ht,K,Y,A],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media (min-width: 1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}.navbar-toggler[_ngcontent-%COMP%]:focus{box-shadow:none!important}"]});let o=r;return o})();function Fe(o,r){if(o&1){let n=v();a(0,"button",10),g("click",function(){u(n);let e=d(2);return h(e.uploadMultipleProduct())}),C(1,"i",11),m(2),l()}if(o&2){let n=d(2);c(2),I(" upload (",n.selectedProducts==null?null:n.selectedProducts.length,") ")}}function De(o,r){if(o&1){let n=v();P(0),a(1,"td",26)(2,"input",27),g("ngModelChange",function(e){u(n);let i=d(2).$implicit;return h(i.selected=e)})("ngModelChange",function(){u(n);let e=d(3).ngIf,i=d(3);return h(i.onSelectProduct(e))}),l()(),b()}if(o&2){let n=d(2).$implicit;c(1),s("rowSpan",n==null?null:n.Variants.length),c(1),s("ngModel",n.selected)}}function Te(o,r){if(o&1){let n=v();P(0),a(1,"img",33),g("click",function(e){u(n);let i=d(3).$implicit,p=d(4);return h(p.onZoomImage(e,i==null?null:i.ImageUrl))}),l(),b()}if(o&2){let n=d(3).$implicit;c(1),s("src",n==null?null:n.ImageUrl,O)}}function Ne(o,r){o&1&&C(0,"img",34)}function Ee(o,r){if(o&1&&(P(0),a(1,"td",26)(2,"div",28),S(3,Te,2,1,"ng-container",7)(4,Ne,1,0,"ng-template",null,29,tt),l()(),a(6,"td",30)(7,"h4",31)(8,"span",32),m(9),l()()(),b()),o&2){let n=L(5),t=d(2).$implicit;c(1),s("rowSpan",t==null?null:t.Variants.length),c(2),s("ngIf",t==null?null:t.ImageUrl)("ngIfElse",n),c(3),s("rowSpan",t==null?null:t.Variants.length),c(2),s("matTooltip",(t==null||t.Name==null?null:t.Name.length)>50?t==null?null:t.Name:""),c(1),I(" ",t==null?null:t.Name," ")}}function ke(o,r){if(o&1&&(a(0,"div")(1,"a",22),C(2,"img",35),l()()),o&2){let n=r.$implicit;c(1),s("href",n.URL,O),c(1),s("src",n.Img,O)("matTooltip",n.Name)}}function Ve(o,r){if(o&1&&(a(0,"div"),C(1,"img",35),l()),o&2){let n=r.$implicit;c(1),s("src",n.Img,O)("matTooltip",n.Name)}}function Ue(o,r){if(o&1&&(a(0,"tr"),S(1,De,3,2,"ng-container",9)(2,Ee,10,6,"ng-container",9),a(3,"td"),m(4),l(),a(5,"td")(6,"span"),m(7),l(),a(8,"span",21)(9,"a",22),C(10,"i",23),l()()(),a(11,"td",24)(12,"div",25),S(13,ke,3,3,"div",20),l()(),a(14,"td",24)(15,"div",25),S(16,Ve,2,2,"div",20),l()()()),o&2){let n=r.$implicit,t=r.index,e=d(5);c(1),s("ngIf",t==0),c(1),s("ngIf",t==0),c(2),I(" ",n.Name," "),c(3),I(" ",n.Code," "),c(2),s("href",e.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(n==null?null:n.ID),O),c(4),s("ngForOf",n==null?null:n.Available),c(3),s("ngForOf",n==null?null:n.NotAvailable)}}function Ae(o,r){if(o&1&&(P(0),S(1,Ue,17,7,"tr",20),b()),o&2){let n=r.$implicit;c(1),s("ngForOf",n.Variants)}}function Le(o,r){if(o&1&&(a(0,"tbody"),S(1,Ae,2,1,"ng-container",20),l()),o&2){let n=r.ngIf;c(1),s("ngForOf",n)}}function Re(o,r){if(o&1&&(P(0),a(1,"div",12)(2,"table",13)(3,"thead",14)(4,"tr"),C(5,"th",15),a(6,"th",16),m(7,"Product"),l(),a(8,"th",17),m(9,"Variant"),l(),a(10,"th",17),m(11,"SKU"),l(),a(12,"th",18),m(13,"Available In"),l(),a(14,"th",19),m(15,"Not Available In"),l()()(),S(16,Le,2,1,"tbody",9),F(17,"async"),l()(),b()),o&2){let n=d(2);c(16),s("ngIf",T(17,1,n.data$))}}function Be(o,r){o&1&&(a(0,"div",36),C(1,"app-empty-state"),l())}function $e(o,r){if(o&1){let n=v();a(0,"span",44),g("click",function(){u(n);let e=d(4);return h(e.getRowCount())}),a(1,"i",45),m(2,"?"),l()()}}function je(o,r){if(o&1&&(a(0,"span"),m(1),F(2,"number"),l()),o&2){let n=r.ngIf;c(1),st(T(2,1,n==null?null:n.Count))}}function Ge(o,r){if(o&1){let n=v();a(0,"a",46),g("click",function(){u(n);let e=d(4);return h(e.onNextPage())}),C(1,"i",47),m(2," Next"),l()}}function Ke(o,r){if(o&1){let n=v();a(0,"a",48),g("click",function(){u(n);let e=d(4);return h(e.onLastPage())}),C(1,"i",49),m(2," Last"),l()}}function Je(o,r){if(o&1&&(P(0),a(1,"div",37)(2,"div",38)(3,"div",39),m(4),F(5,"number"),S(6,$e,3,0,"span",40)(7,je,3,3,"span",9),F(8,"async"),m(9),l()(),a(10,"div",41),S(11,Ge,3,0,"a",42)(12,Ke,3,0,"a",43),l()(),b()),o&2){let n=d().ngIf,t=d(2);c(4),I(" Showing 1 - ",T(5,6,n==null?null:n.length)," of "),c(2),s("ngIf",t.paginationService.hideCount),c(1),s("ngIf",!t.paginationService.hideCount&&T(8,8,t.rowCount$)),c(2),I(" records ~ ",t.paginationService.footerPageNumber," Page "),c(2),s("ngIf",t.paginationService.disableNextButton&&!t.paginationService.goToLastPage),c(1),s("ngIf",t.paginationService.disableNextButton&&!t.paginationService.goToLastPage)}}function ze(o,r){if(o&1&&(P(0),S(1,Je,13,10,"ng-container",9),b()),o&2){let n=r.ngIf;c(1),s("ngIf",(n==null?null:n.length)>0)}}function He(o,r){if(o&1){let n=v();a(0,"mainpanel",1),g("onSubmit",function(e){u(n);let i=d();return h(i.searchProduct(e))}),a(1,"actions"),S(2,Fe,3,1,"button",2),a(3,"button",3),g("click",function(){u(n);let e=d();return h(e.openScanDialog())}),C(4,"i",4),m(5," Scan Channel "),l()(),a(6,"content")(7,"div",5)(8,"div",6),S(9,Re,18,3,"ng-container",7),F(10,"async"),S(11,Be,2,0,"ng-template",null,8,tt),l(),S(13,ze,2,1,"ng-container",9),F(14,"async"),l()()()}if(o&2){let n=L(12),t=d(),e;s("hideSearchDropdown",!0),c(2),s("ngIf",t.hasSelectionProduct),c(7),s("ngIf",((e=T(10,5,t.data$))==null?null:e.length)>0)("ngIfElse",n),c(4),s("ngIf",T(14,7,t.data$))}}var le=(()=>{let r=class r{constructor(t,e,i,p,f,w,wt){this.http=t,this.dialog=e,this.toastr=i,this.productService=p,this.paginationService=f,this.biggerPictureService=w,this.authService=wt,this.loaderAPI="product/Load",this.rowCountAPI="product/GetNotInChannelRowCount",this.notChannelAPI="product/GetNotInChannelV2",this.hasSelectionProduct=!1,this.selectedProducts=[],this.channelOptions=wt.getChannels(),this.hostName=this.authService.getDomain()}ngOnInit(){this.initPageLoader(),this.iniData()}initPageLoader(){this.paginationService.fetchDataEndpoint=this.notChannelAPI,this.loader$=this.http.post(`api/${this.loaderAPI}`,{}).pipe(Ft(t=>{this.filterSearch=t.Filter,this.paginationService.reloadPagination(t.Filter)}))}iniData(){this.data$=this.paginationService.data$.pipe(Ot(t=>(t=t.map(e=>(e.Variants=e.Variants.map(i=>(i.Available=this.productService.sortChannel(i.Available),i.NotAvailable=this.productService.sortChannel(i.NotAvailable),i.Available=this.assignLogoChannel(i.Available),i.NotAvailable=this.assignLogoChannel(i.NotAvailable),i)),e)),t)))}assignLogoChannel(t){return t=t.map(e=>(e.Img=_.getChannelLogoByTypeId(e.TypeID),e)),t}searchProduct(t){this.filterSearch.text=t,this.paginationService.reloadPagination(this.filterSearch)}scanAllProduct(){let t=this.productService.findChannelById(this.filterSearch.ChannelID,this.channelOptions);this.productService.scanAll(this.filterSearch.ChannelID,this.filterSearch.ScanFull,this.filterSearch.UpdatedProduct,this.filterSearch.Async).subscribe(e=>{this.filterSearch.Async?this.toastr.success("You will be notified when the scan is completed.","Scan Asynchronous"):(this.productService.successToastrScanAllProduct(e,t,!this.filterSearch.UpdatedProduct),this.initPageLoader())})}openScanDialog(){let t=JSON.parse(JSON.stringify(this.filterSearch));t.ChannelID=_.GuidEMpty,this.dialog.open(D,{data:{filter:t,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(y(i=>_.IsNotEmpty(i))).subscribe(i=>{this.filterSearch.ChannelID=i.ChannelID,this.filterSearch.ScanFull=i.ScanFull,this.filterSearch.UpdatedProduct=i.UpdatedProduct,this.filterSearch.Async=i.Async,this.scanAllProduct()})}getRowCount(){this.paginationService.hideCount=!1,this.rowCount$=this.http.post(`/api/${this.rowCountAPI}`,this.filterSearch)}onNextPage(){this.paginationService.onNextPage(this.filterSearch)}onLastPage(){this.http.post(`/api/${this.rowCountAPI}`,{}).subscribe({next:t=>{this.filterSearch.PageNumber=1,this.paginationService.getAllData(this.filterSearch,t.Count)}})}onZoomImage(t,e){this.biggerPictureService.openBiggerPicture(t,e)}onSelectProduct(t){this.hasSelectionProduct=this.productService.hasSelection(t),this.selectedProducts=this.productService.selectedProduct(t)}uploadMultipleProduct(){let t=this.getUniqueChannels();t=t.map(e=>(e.ID=e.ChannelID,e)),this.dialog.open(q,{width:"700px",data:{title:"Upload Multiple Product",channels:t}}).afterClosed().pipe(y(e=>_.IsNotEmpty(e)),J(e=>{let i=this.getSelectedProductIds();return this.productService.uploadNotInChannel(i,e)})).subscribe({next:()=>{this.paginationService.reloadPagination(this.filterSearch),this.selectedProducts=[],this.hasSelectionProduct=!1},error:e=>{this.selectedProducts=[],this.hasSelectionProduct=!1}})}getSelectedProductIds(){return this.selectedProducts.map(e=>({ID:e.ProductID}))}getUniqueChannels(){let t=[];return this.selectedProducts.forEach(e=>{t=[...t,...e.Variants[0].NotAvailable]}),t=t.filter((e,i,p)=>p.findIndex(f=>f.ChannelID==e.ChannelID)==i),t}ngOnDestroy(){this.paginationService.destroy()}};r.\u0275fac=function(e){return new(e||r)(x(R),x(G),x(j),x(U),x(te),x(Zt),x(k))},r.\u0275cmp=M({type:r,selectors:[["app-not-in-channel"]],decls:2,vars:3,consts:[["headerTitle","Not in Channel","description","SKU has not been sold on one of channels",3,"hideSearchDropdown","onSubmit",4,"ngIf"],["headerTitle","Not in Channel","description","SKU has not been sold on one of channels",3,"hideSearchDropdown","onSubmit"],["class","btn btn-light shadow rounded ms-2",3,"click",4,"ngIf"],["data-cy","scanNotinChannel","type","button",1,"btn","btn-outline-secondary","shadow","rounded","ms-2",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],[1,"container-fluid","mt-3"],[1,"row"],[4,"ngIf","ngIfElse"],["EMPTY",""],[4,"ngIf"],[1,"btn","btn-light","shadow","rounded","ms-2",3,"click"],["aria-hidden","true",1,"fa","fa-upload"],[1,"col-md-12"],[1,"table","border-bottom"],[1,"thead-light","sticky-top-thead"],[2,"width","10px"],["colspan","2",1,"ms-5","text-center",2,"width","450px"],[2,"width","150px"],[2,"width","20%"],[2,"width","16%"],[4,"ngFor","ngForOf"],[1,"ms-1"],["target","_blank",3,"href"],[1,"fas","fa-lg","fa-external-link-alt","external-link-custom"],[2,"padding-left","0px"],[1,"d-flex","flex-wrap","mb-1"],[1,"text-center",3,"rowSpan"],["type","checkbox",3,"ngModel","ngModelChange"],[2,"padding-right","0px"],["elsePic",""],[1,"text-start",3,"rowSpan"],[1,"ms-5","fw-normal","text-ellipsis",2,"max-width","26vw !important"],[3,"matTooltip"],[1,"border","rounded","cursor-pointer",2,"max-width","40px",3,"src","click"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded",2,"max-width","40px"],["alt","",1,"channel-logo","cursor-pointer","ms-4","mt-3",3,"src","matTooltip"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[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"],[1,"btn-group"],["role","button","class","btn btn-outline-secondary btn-sm text-primary","title","Load more for 20 products",3,"click",4,"ngIf"],["role","button","class","btn btn-outline-secondary btn-sm text-primary","title","Load all products",3,"click",4,"ngIf"],[2,"cursor","pointer",3,"click"],["title","Retreive rows count",1,"border","p-3"],["role","button","title","Load more for 20 products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-arrow-right"],["role","button","title","Load all products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-share"]],template:function(e,i){e&1&&(S(0,He,15,9,"mainpanel",0),F(1,"async")),e&2&&s("ngIf",T(1,1,i.loader$))},dependencies:[N,E,At,B,$,V,_t,A,pt,dt],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media (min-width: 1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}.navbar-toggler[_ngcontent-%COMP%]:focus{box-shadow:none!important}thead[_ngcontent-%COMP%]{position:sticky;top:0}.channel-logo[_ngcontent-%COMP%]{width:20px}.w-img[_ngcontent-%COMP%]{width:100%}"]});let o=r;return o})();function Ze(o,r){if(o&1){let n=v();a(0,"button",15),g("click",function(){u(n);let e=d();return h(e.openScanDialog())}),C(1,"i",16),m(2," Scan Channel "),l()}}function qe(o,r){if(o&1){let n=v();P(0),a(1,"button",17),g("click",function(){u(n);let e=d();return h(e.onDownloadAllProduct("SELECTED"))}),C(2,"i",18),m(3),l(),b()}if(o&2){let n=d(),t;c(3),I(" Download (",(t=n.productService.selectedProduct(n.products))==null?null:t.length,") ")}}function Ye(o,r){if(o&1&&(a(0,"span",19),C(1,"img",20),l(),m(2)),o&2){let n=r.item;c(1),s("src",n.Img,O)("alt",n.Name),c(1),I(" ",n.Name," ")}}var Qe=o=>[o],We=()=>[];function Xe(o,r){if(o&1){let n=v();a(0,"div",21)(1,"app-product-card",22),g("onCheckBoxChange",function(e){let p=u(n).index,f=d();return h(f.onSelectProduct(e,p))})("onDescEvent",function(){let i=u(n).index,p=d();return h(p.onShowVariantDetail(i))})("onDownload",function(){let i=u(n).$implicit,p=d();return h(p.onDownloadProduct(i))})("onScan",function(){let i=u(n).$implicit,p=d();return h(p.onScanChannel(i))}),l()()}if(o&2){let n=r.$implicit;c(1),s("showRedirectIcon",!1)("title",n==null?null:n.Name)("image",n==null?null:n.Image)("imageForZoom",n==null?null:n.Image)("code",n==null?null:n.SKU)("description",(n==null||n.Variant==null?null:n.Variant.length)>0?(n==null||n.Variant==null?null:n.Variant.length)+" Variants":null)("downloadButton",!0)("channels",n!=null&&n.Channel?it(10,Qe,n==null?null:n.Channel):Q(12,We))("showCheckBox",!0)("scanButton",!0)}}function tn(o,r){o&1&&(P(0),a(1,"div",23),C(2,"app-empty-state"),l(),b())}function en(o,r){if(o&1){let n=v();a(0,"div",24)(1,"div",25)(2,"app-custom-paginator",26),g("total",function(){u(n);let e=d();return h(e.getRowCount())})("next",function(){u(n);let e=d();return h(e.onNextPage())})("previous",function(){u(n);let e=d();return h(e.onPreviousPage())}),l()()()}if(o&2){let n=d();c(2),s("filter",n.searchFilter)("totaldata",n.products==null?null:n.products.length)("paginationTotal",n.rowCount)("hasClicked",n.hasClickRowCount)}}var ce=(()=>{let r=class r{constructor(t,e,i,p,f,w){this.http=t,this.dialog=e,this.productService=i,this.toastrService=p,this.activateRouter=f,this.authService=w,this.searchFilter=new Z,this.products=[],this.hasClickRowCount=!1,this.channelOptions=this.authService.getChannels()}ngOnInit(){this.activateRouter.queryParams.subscribe(t=>{t.ID?this.initPageLoader(t.ID):this.initPageLoader(_.GuidEMpty)})}initPageLoader(t){this.productService.loader(t).subscribe(e=>{this.searchFilter=e.Filter,this.searchFilter.PageSize=e.Filter.RowCount,this.getProducts()})}getProducts(){this.http.post("/api/product/GetProductChannelNotPOS",this.searchFilter).subscribe(t=>{this.products=t.Data,this.mapChannelToProduct(),this.setSkuProduct()})}mapChannelToProduct(){let t;this.products=this.products.map(e=>(t=this.channelOptions.find(i=>i.ID==e.ChannelID),t?e.Channel=JSON.parse(JSON.stringify(t)):e.Channel=null,e)).map(e=>(e.Channel&&(e.Channel.Url=e.Url),e))}setSkuProduct(){this.products=this.products.map(t=>(t?.Variant?.length==0?_.IsNotEmpty(t?.ChannelItemSKU)?t.SKU=t?.ChannelItemSKU:t.SKU="SKU not assigned":t.SKU=t?.Variant[0]?.ChannelVariationSKU?t?.Variant[0]?.ChannelVariationSKU:"SKU not assigned",t))}onSearch(t){this.searchFilter.text=t,this.hasClickRowCount=!1,this.getProducts()}onClearChannelFilter(){this.searchFilter.ChannelID=_.GuidEMpty}onScanAll(){let t=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).subscribe(e=>{this.searchFilter.Async?this.toastrService.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"}):(this.initPageLoader(_.GuidEMpty),this.productService.successToastrScanAllProduct(e,t,!this.searchFilter.UpdatedProduct)),this.searchFilter.ChannelID=_.GuidEMpty})}openScanDialog(){let t=JSON.parse(JSON.stringify(this.searchFilter));t.ChannelID=_.GuidEMpty,this.dialog.open(D,{data:{filter:t,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(y(i=>_.IsNotEmpty(i))).subscribe(i=>{this.searchFilter.ChannelID=i.ChannelID,this.searchFilter.UpdatedProduct=i.UpdatedProduct,this.searchFilter.ScanFull=i.ScanFull,this.searchFilter.Async=i.Async,this.onScanAll()})}onDownloadAllProduct(t){let e;t=="ALL"?e=this.products:e=this.productService.selectedProduct(this.products),e.length>0&&this.productService.downloadMultipleProduct(e).subscribe({next:()=>{this.getProducts()}})}onSelectProduct(t,e){this.products[e].selected=t}onDownloadProduct(t){confirm(`Are you sure you want to Retrieve product ${t?.Name} from ${t?.Channel.Name} to POS?`)&&this.productService.downloadProduct(t).subscribe({next:()=>{this.getProducts()}})}onScanChannel(t){let e=JSON.parse(JSON.stringify(t));delete e.Channel,this.productService.scanCompareToPos([e]).subscribe(i=>{i.Status?(this.initPageLoader(_.GuidEMpty),this.toastrService.success(`product ${t.Name} have been successfully scanned and synchronized with POS`,"Success")):this.toastrService.error(`Product ${t.Name} is not existed in POS`,"Error")})}onShowVariantDetail(t){let e=this.products[t].Variant;e.length>0&&this.dialog.open(ee,{data:{title:this.products[t].Name,variants:e},width:"30%"})}getRowCount(){let t={ChannelID:this.searchFilter.ChannelID,text:this.searchFilter.text,HaveSku:parseInt(this.searchFilter.HaveSku)};this.http.post("/api/product/GetProductChannelNotPOSRowCount",t).subscribe(e=>{this.hasClickRowCount=!0,this.rowCount=e.Count})}onNextPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber+1,this.getProducts()}onPreviousPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber-1,this.getProducts()}};r.\u0275fac=function(e){return new(e||r)(x(R),x(G),x(U),x(j),x(mt),x(k))},r.\u0275cmp=M({type:r,selectors:[["app-not-in-pos"]],decls:30,vars:13,consts:[["headerTitle","Not in POS","textButton","Search","description","SKU sold in Marketplace but not exist in DEALPOS",3,"onSubmit"],["type","button","data-cy","scanNotInPos","class","btn btn-outline-secondary shadow rounded",3,"click",4,"ngIf"],[4,"ngIf"],[1,"fw-bold","mb-2"],["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel","appendTo","body",1,"center-text",3,"clearable","items","ngModel","ngModelChange"],["ng-option-tmp",""],[1,"mt-5"],[1,"fw-bold"],["name","haveSKU",1,"form-control","h-100","pt-3","rounded","mt-2",3,"ngModel","ngModelChange"],[1,"me-5",3,"value"],["type","text","name","Item_id","id","Item_id","placeholder","item id",1,"form-control","mt-2",3,"ngModel","ngModelChange"],[1,"container-fluid","mt-3"],[1,"row","mt-8"],["class","col-12 col-md-6 col-xl-4 px-3 my-3",4,"ngFor","ngForOf"],["class","row",4,"ngIf"],["type","button","data-cy","scanNotInPos",1,"btn","btn-outline-secondary","shadow","rounded",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],["type","button",1,"btn","btn-success","shadow-sm","rounded","ms-3",3,"click"],[1,"fa","fa-download"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[3,"showRedirectIcon","title","image","imageForZoom","code","description","downloadButton","channels","showCheckBox","scanButton","onCheckBoxChange","onDescEvent","onDownload","onScan"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"row"],[1,"col-12"],[3,"filter","totaldata","paginationTotal","hasClicked","total","next","previous"]],template:function(e,i){e&1&&(a(0,"mainpanel",0),g("onSubmit",function(f){return i.onSearch(f)}),a(1,"actions"),S(2,Ze,3,0,"button",1)(3,qe,4,1,"ng-container",2),l(),a(4,"filters")(5,"div")(6,"label",3),m(7,"Channel"),l(),a(8,"ng-select",4),g("ngModelChange",function(f){return i.searchFilter.ChannelID=f}),S(9,Ye,3,3,"ng-template",5),l()(),a(10,"div",6)(11,"label",7),m(12,"SKU Assigned"),l(),a(13,"mat-radio-group",8),g("ngModelChange",function(f){return i.searchFilter.HaveSku=f}),a(14,"mat-radio-button",9),m(15," All "),l(),a(16,"mat-radio-button",9),m(17," Yes "),l(),a(18,"mat-radio-button",9),m(19," No "),l()()(),a(20,"div",6)(21,"label",7),m(22,"Item ID"),l(),a(23,"input",10),g("ngModelChange",function(f){return i.searchFilter.Item_id=f}),l()()(),a(24,"content")(25,"div",11)(26,"div",12),S(27,Xe,2,13,"div",13)(28,tn,3,0,"ng-container",2),l(),S(29,en,3,4,"div",14),l()()()),e&2&&(c(2),s("ngIf",!i.productService.hasSelection(i.products)),c(1),s("ngIf",i.productService.hasSelection(i.products)),c(5),s("clearable",!0)("items",i.channelOptions)("ngModel",i.searchFilter.ChannelID),c(5),s("ngModel",i.searchFilter.HaveSku),c(1),s("value",0),c(2),s("value",1),c(2),s("value",2),c(5),s("ngModel",i.searchFilter.Item_id),c(4),s("ngForOf",i.products),c(1),s("ngIf",i.products.length==0),c(1),s("ngIf",(i.products==null?null:i.products.length)>0))},dependencies:[N,E,et,B,$,V,H,nt,Jt,zt,K,Y,A],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media (min-width: 1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}.navbar-toggler[_ngcontent-%COMP%]:focus{box-shadow:none!important}.itemTitle[_ngcontent-%COMP%]{cursor:pointer}"]});let o=r;return o})();function nn(o,r){if(o&1&&(a(0,"span",9),C(1,"img",10),l(),m(2)),o&2){let n=r.item,t=d();c(1),s("src",t.getChannelLogo(n.TypeID),O),c(1),I(" ",n.Name," ")}}function on(o,r){if(o&1&&(a(0,"div",11),C(1,"app-duplicate-product-card",12),l()),o&2){let n=r.$implicit,t=r.index;c(1),s("imageForZoom",n.ImageUrl)("title",n.Name)("code",n.Code)("id",t)("image",n.ThumbnailURL)("channels",n.Channels)}}function rn(o,r){o&1&&(P(0),a(1,"div",13),C(2,"app-empty-state"),l(),b())}function an(o,r){if(o&1){let n=v();P(0),a(1,"div",14)(2,"div",15)(3,"app-custom-paginator",16),g("next",function(){u(n);let e=d();return h(e.onNextPage())})("previous",function(){u(n);let e=d();return h(e.onPrevPage())})("total",function(){u(n);let e=d();return h(e.getRowCount())}),l()()(),b()}if(o&2){let n=d();c(3),s("filter",n.searchFilter)("totaldata",n.products==null?null:n.products.length)("paginationTotal",n.rowCount)("hasClicked",n.hasClickedRowCount)}}var se=(()=>{let r=class r{constructor(t,e,i){this.httpService=t,this.productService=e,this.authService=i,this.searchFilter=new Z,this.products=[],this.hasClickedRowCount=!1,this.getPageLoader(),this.channelOptions=i.getChannels()}getPageLoader(){this.productService.loader().subscribe(t=>{this.searchFilter=t.Filter,this.searchFilter.PageSize=t.Filter.RowCount,this.getProducts()})}getProducts(){let t={ListChannelID:this.searchFilter.ListChannelID,RowCount:this.searchFilter.RowCount,PageNumber:this.searchFilter.PageNumber,text:this.searchFilter.text};this.httpService.post("/api/product/GetDuplicateInChannel",t).subscribe(e=>{this.products=e.Data})}onSearch(t){this.searchFilter.text=t,this.hasClickedRowCount=!1,this.getProducts()}onClearFilter(){this.searchFilter.ChannelID=_.GuidEMpty}getChannelLogo(t){return _.getChannelLogoByTypeId(t)}onNextPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber+1,this.getProducts()}onPrevPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber-1,this.getProducts()}getRowCount(){let t={text:this.searchFilter.text,ChannelID:this.searchFilter.ChannelID};this.httpService.post("/api/product/GetDuplicateInChannelRowCount",t).subscribe(e=>{this.hasClickedRowCount=!0,this.rowCount=e.Total})}};r.\u0275fac=function(e){return new(e||r)(x(R),x(U),x(k))},r.\u0275cmp=M({type:r,selectors:[["app-duplicate-sku"]],decls:14,vars:7,consts:[["headerTitle","Multiple Listing","textButton"," Search","description","SKU(s) which is listed more than one time (one to many)",3,"onSubmit"],["container",""],[1,"mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"multiple","clearable","items","ngModel","ngModelChange","clear"],["ng-option-tmp","","ng-label-tmp",""],[1,"container-fluid"],[1,"row","mt-8","mx-1"],["class","col-12 col-md-6 col-xl-4 px-3 my-3",4,"ngFor","ngForOf"],[4,"ngIf"],[1,"me-2"],["alt","",2,"width","18px",3,"src"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[3,"imageForZoom","title","code","id","image","channels"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"row","mt-2","justify-content-end"],[1,"col-md-12"],[3,"filter","totaldata","paginationTotal","hasClicked","next","previous","total"]],template:function(e,i){e&1&&(a(0,"mainpanel",0),g("onSubmit",function(f){return i.onSearch(f)}),a(1,"filters")(2,"div",1)(3,"div")(4,"h6",2),m(5,"Channel"),l(),a(6,"ng-select",3),g("ngModelChange",function(f){return i.searchFilter.ListChannelID=f})("clear",function(){return i.onClearFilter()}),S(7,nn,3,2,"ng-template",4),l()()()(),a(8,"content")(9,"div",5)(10,"div",6),S(11,on,2,6,"div",7)(12,rn,3,0,"ng-container",8),l(),S(13,an,4,4,"ng-container",8),l()()()),e&2&&(c(6),s("multiple",!0)("clearable",!0)("items",i.channelOptions)("ngModel",i.searchFilter.ListChannelID),c(5),s("ngForOf",i.products),c(1),s("ngIf",(i.products==null?null:i.products.length)==0),c(1),s("ngIf",(i.products==null?null:i.products.length)>0))},dependencies:[N,E,B,$,V,H,nt,ht,Ct,K,A]});let o=r;return o})();function ln(o,r){if(o&1&&(P(0),m(1),b()),o&2){let n=d().$implicit;c(1),I(" ",n.Count," ")}}function cn(o,r){if(o&1){let n=v();a(0,"span",26),g("click",function(){u(n);let e=d().$implicit,i=d(2);return h(i.getLiveProductCount(e.ID,e))}),C(1,"i",27),l()}}var sn=()=>["/menu/products/status/sold-in-channel"],pe=o=>({ID:o}),pn=()=>["/menu/products/status/not-in-pos"];function dn(o,r){if(o&1){let n=v();a(0,"tr")(1,"td"),C(2,"img",16),a(3,"span",17),m(4),l()(),a(5,"td",18),S(6,ln,2,1,"ng-container",4)(7,cn,2,0,"ng-template",null,19,tt),l(),a(9,"td",18)(10,"a",20),m(11),F(12,"number"),l()(),a(13,"td",18)(14,"a",20),m(15),F(16,"number"),l()(),a(17,"td"),m(18),F(19,"date"),l(),a(20,"td")(21,"div",21)(22,"button",22),g("click",function(){let i=u(n).$implicit,p=d(2);return h(p.onScanChannel(i))}),C(23,"i",23),m(24," Scan "),l(),a(25,"button",24),g("click",function(){let i=u(n).$implicit,p=d(2);return h(p.onClearCache(i.ID))}),C(26,"i",25),m(27," Clear "),l()()()()}if(o&2){let n=r.$implicit,t=L(8),e=d(2);c(2),s("src",e.getChannelLogo(n.TypeID),O),c(2),st(n.Name),c(2),s("ngIf",n.Count!==void 0)("ngIfElse",t),c(4),s("routerLink",Q(18,sn))("queryParams",it(19,pe,n.ID)),c(1),I(" ",T(12,11,n.SoldInChannel)," "),c(3),s("routerLink",Q(21,pn))("queryParams",it(22,pe,n.ID)),c(1),I(" ",T(16,13,n.NotInPOS)," "),c(3),I("",n.LastSync?Nt(19,15,n.LastSync,"dd MMM yyyy HH:mm"):"-"," ")}}function mn(o,r){if(o&1&&(P(0),a(1,"div",6)(2,"table",7)(3,"thead",8)(4,"tr",9)(5,"th"),m(6,"Channel"),l(),a(7,"th",10),m(8,"Live Product"),l(),a(9,"th",11),m(10,"Sold In Channel"),l(),a(11,"th",12),m(12,"Product Not in POS"),l(),a(13,"th",13),m(14,"Last Sync"),l(),C(15,"th",14),l()(),a(16,"tbody"),S(17,dn,28,24,"tr",15),F(18,"async"),l()()(),b()),o&2){let n=d(),t;c(17),s("ngForOf",(t=T(18,1,n.channels$))==null?null:t.Data)}}function un(o,r){o&1&&(a(0,"div",28),C(1,"app-empty-state"),l())}var de=(()=>{let r=class r{constructor(t,e,i,p){this.productService=t,this.toastr=e,this.dialog=i,this.authService=p,this.destroy$=new Mt,this.channelOptions=p.getChannels()}ngOnInit(){this.setObsProductStatistic()}setObsProductStatistic(){this.channels$=this.productService.getProductStatistic()}getLiveProductCount(t,e){this.productService.getTotalProductLive(t).pipe(Pt(this.destroy$)).subscribe(i=>{e.Count=i.Count})}onScanChannel(t){this.dialog.open(D,{width:"700px",data:{channelOptions:this.channelOptions,filter:{ChannelID:t.ID},disabledChannelOption:!0}}).afterClosed().pipe(y(e=>_.IsNotEmpty(e))).subscribe(e=>{this.scanAllProduct(t.ID,e)})}scanAllProduct(t,e){let i=this.productService.findChannelById(t,this.channelOptions);this.productService.scanAll(e.ChannelID,e.ScanFull,e.UpdatedProduct,e.Async).pipe(y(p=>p)).subscribe(p=>{e.Async?this.toastr.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"}):(this.productService.successToastrScanAllProduct(p,i,!e.UpdatedProduct),this.setObsProductStatistic())})}onClearCache(t){confirm("Are you sure you want to Clear Cache? This Process will remove your product integration to marketplace")&&this.productService.clearCacheChannel(t).pipe(Pt(this.destroy$)).subscribe(i=>{this.toastr.success("Successfully cleared cache","Success"),this.setObsProductStatistic()})}getChannelLogo(t){return _.getChannelLogoByTypeId(t)}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}};r.\u0275fac=function(e){return new(e||r)(x(U),x(j),x(G),x(k))},r.\u0275cmp=M({type:r,selectors:[["app-channel-statistic"]],decls:9,vars:6,consts:[["headerTitle","Products Statistic",3,"hideSearchBox","hideSearchDropdown"],[1,"container-fluid"],[1,"row","mt-4"],[1,"col-md-12"],[4,"ngIf","ngIfElse"],["EMPTY",""],[1,"table-responsive"],[1,"table","table-hover"],[1,"sticky-top-thead"],[1,"table-light"],[1,"text-center",2,"width","13rem"],[1,"text-center",2,"width","9rem"],[1,"text-center",2,"width","14rem"],[2,"width","10rem"],[2,"width","12rem"],[4,"ngFor","ngForOf"],[2,"width","24px","height","24px",3,"src"],[1,"ms-3"],[1,"text-center"],["QUESTION",""],[3,"routerLink","queryParams"],[1,"d-flex","align-items-center","justify-content-center"],[1,"btn","btn-sm","btn-secondary","fs-6",3,"click"],[1,"fa","fa-spinner"],[1,"btn","btn-sm","btn-secondary","fs-6","ms-3",3,"click"],[1,"fa","fa-trash"],["matTooltip","Click to see total live product",1,"cursor-pointer","fs-5","text-primary",3,"click"],[1,"fa-solid","fa-circle-question","cursor"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(e,i){if(e&1&&(a(0,"mainpanel",0)(1,"content")(2,"div",1)(3,"div",2)(4,"div",3),S(5,mn,19,3,"ng-container",4),F(6,"async"),S(7,un,2,0,"ng-template",null,5,tt),l()()()()()),e&2){let p=L(8),f;s("hideSearchBox",!0)("hideSearchDropdown",!0),c(5),s("ngIf",((f=T(6,4,i.channels$))==null||f.Data==null?null:f.Data.length)>0)("ngIfElse",p)}},dependencies:[N,E,V,_t,ut,A,pt,dt,Et]});let o=r;return o})();var hn=[{component:ie,path:"",children:[{path:"",redirectTo:"sold-in-channel",pathMatch:"full"},{path:"in-pos",component:re,canActivate:[W],data:{title:"Products in POS"}},{path:"sold-in-channel",component:ae,canActivate:[W],data:{title:"Products Sold in Channel"}},{path:"not-in-channel",component:le,canActivate:[W],data:{title:"Products not in Channel"}},{path:"not-in-pos",component:ce,canActivate:[W],data:{title:"Products not in POS"}},{path:"duplicate-sku",component:se,canActivate:[W],data:{title:"Duplicate Sku in Channel"}},{path:"channel-statistic",component:de,canActivate:[W],data:{title:"Channel Statistic"}}]}],wi=(()=>{let r=class r{};r.\u0275fac=function(e){return new(e||r)},r.\u0275mod=Tt({type:r}),r.\u0275inj=Dt({imports:[kt,Lt,jt,$t,Rt,ne,Ht,Kt,Ct,K,Y,Ut.forChild(hn),Xt,Bt]});let o=r;return o})();export{wi as StatusModule};
@@ -1 +0,0 @@
1
- import{J as C,W as g,X as Q}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.11.0/Marketplace/chunk-NRSNSW7E.js";import{a as X}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.11.0/Marketplace/chunk-YUB56KZH.js";import{$a as a,Ca as M,Ga as k,Ha as d,Ja as L,Kb as u,La as y,Lb as x,Ma as O,Nb as p,Oa as S,Pa as F,Qa as s,Sa as b,Ta as j,Vb as m,Wb as U,Z as A,aa as f,ab as r,ba as E,bb as l,ea as I,fa as v,gb as P,jb as _,la as z,ma as w,mb as q,nb as N,oa as R,qb as V,vb as B,wa as D}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.11.0/Marketplace/chunk-5MULKC5W.js";var Y=["input"],$=["label"],J=["*"],W=new E("mat-checkbox-default-options",{providedIn:"root",factory:Z});function Z(){return{color:"accent",clickAction:"check-indeterminate"}}var ee={provide:X,useExisting:A(()=>oe),multi:!0},T=class{},ce=0,H=Z(),oe=(()=>{let t=class t{focus(){this._inputElement.nativeElement.focus()}_createChangeEvent(e){let o=new T;return o.source=this,o.checked=e,o}_getAnimationTargetElement(){return this._inputElement?.nativeElement}get inputId(){return`${this.id||this._uniqueId}-input`}constructor(e,o,c,i,h,G){this._elementRef=e,this._changeDetectorRef=o,this._ngZone=c,this._animationMode=h,this._options=G,this._animationClasses={uncheckedToChecked:"mdc-checkbox--anim-unchecked-checked",uncheckedToIndeterminate:"mdc-checkbox--anim-unchecked-indeterminate",checkedToUnchecked:"mdc-checkbox--anim-checked-unchecked",checkedToIndeterminate:"mdc-checkbox--anim-checked-indeterminate",indeterminateToChecked:"mdc-checkbox--anim-indeterminate-checked",indeterminateToUnchecked:"mdc-checkbox--anim-indeterminate-unchecked"},this.ariaLabel="",this.ariaLabelledby=null,this.labelPosition="after",this.name=null,this.change=new y,this.indeterminateChange=new y,this._onTouched=()=>{},this._currentAnimationClass="",this._currentCheckState=0,this._controlValueAccessorChangeFn=()=>{},this._checked=!1,this._disabled=!1,this._indeterminate=!1,this._options=this._options||H,this.color=this._options.color||H.color,this.tabIndex=parseInt(i)||0,this.id=this._uniqueId=`mat-mdc-checkbox-${++ce}`}ngAfterViewInit(){this._syncIndeterminate(this._indeterminate)}get checked(){return this._checked}set checked(e){e!=this.checked&&(this._checked=e,this._changeDetectorRef.markForCheck())}get disabled(){return this._disabled}set disabled(e){e!==this.disabled&&(this._disabled=e,this._changeDetectorRef.markForCheck())}get indeterminate(){return this._indeterminate}set indeterminate(e){let o=e!=this._indeterminate;this._indeterminate=e,o&&(this._indeterminate?this._transitionCheckState(3):this._transitionCheckState(this.checked?1:2),this.indeterminateChange.emit(this._indeterminate)),this._syncIndeterminate(this._indeterminate)}_isRippleDisabled(){return this.disableRipple||this.disabled}_onLabelTextChange(){this._changeDetectorRef.detectChanges()}writeValue(e){this.checked=!!e}registerOnChange(e){this._controlValueAccessorChangeFn=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this.disabled=e}_transitionCheckState(e){let o=this._currentCheckState,c=this._getAnimationTargetElement();if(!(o===e||!c)&&(this._currentAnimationClass&&c.classList.remove(this._currentAnimationClass),this._currentAnimationClass=this._getAnimationClassForCheckStateTransition(o,e),this._currentCheckState=e,this._currentAnimationClass.length>0)){c.classList.add(this._currentAnimationClass);let i=this._currentAnimationClass;this._ngZone.runOutsideAngular(()=>{setTimeout(()=>{c.classList.remove(i)},1e3)})}}_emitChangeEvent(){this._controlValueAccessorChangeFn(this.checked),this.change.emit(this._createChangeEvent(this.checked)),this._inputElement&&(this._inputElement.nativeElement.checked=this.checked)}toggle(){this.checked=!this.checked,this._controlValueAccessorChangeFn(this.checked)}_handleInputClick(){let e=this._options?.clickAction;!this.disabled&&e!=="noop"?(this.indeterminate&&e!=="check"&&Promise.resolve().then(()=>{this._indeterminate=!1,this.indeterminateChange.emit(this._indeterminate)}),this._checked=!this._checked,this._transitionCheckState(this._checked?1:2),this._emitChangeEvent()):!this.disabled&&e==="noop"&&(this._inputElement.nativeElement.checked=this.checked,this._inputElement.nativeElement.indeterminate=this.indeterminate)}_onInteractionEvent(e){e.stopPropagation()}_onBlur(){Promise.resolve().then(()=>{this._onTouched(),this._changeDetectorRef.markForCheck()})}_getAnimationClassForCheckStateTransition(e,o){if(this._animationMode==="NoopAnimations")return"";switch(e){case 0:if(o===1)return this._animationClasses.uncheckedToChecked;if(o==3)return this._checked?this._animationClasses.checkedToIndeterminate:this._animationClasses.uncheckedToIndeterminate;break;case 2:return o===1?this._animationClasses.uncheckedToChecked:this._animationClasses.uncheckedToIndeterminate;case 1:return o===2?this._animationClasses.checkedToUnchecked:this._animationClasses.checkedToIndeterminate;case 3:return o===1?this._animationClasses.indeterminateToChecked:this._animationClasses.indeterminateToUnchecked}return""}_syncIndeterminate(e){let o=this._inputElement;o&&(o.nativeElement.indeterminate=e)}_onInputClick(){this._handleInputClick()}_onTouchTargetClick(){this._handleInputClick(),this.disabled||this._inputElement.nativeElement.focus()}_preventBubblingFromLabel(e){e.target&&this._labelElement.nativeElement.contains(e.target)&&e.stopPropagation()}};t.\u0275fac=function(o){return new(o||t)(d(M),d(L),d(O),R("tabindex"),d(D,8),d(W,8))},t.\u0275cmp=I({type:t,selectors:[["mat-checkbox"]],viewQuery:function(o,c){if(o&1&&(x(Y,5),x($,5),x(g,5)),o&2){let i;u(i=p())&&(c._inputElement=i.first),u(i=p())&&(c._labelElement=i.first),u(i=p())&&(c.ripple=i.first)}},hostAttrs:[1,"mat-mdc-checkbox"],hostVars:14,hostBindings:function(o,c){o&2&&(P("id",c.id),F("tabindex",null)("aria-label",null)("aria-labelledby",null),j(c.color?"mat-"+c.color:"mat-accent"),b("_mat-animation-noopable",c._animationMode==="NoopAnimations")("mdc-checkbox--disabled",c.disabled)("mat-mdc-checkbox-disabled",c.disabled)("mat-mdc-checkbox-checked",c.checked))},inputs:{ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],ariaDescribedby:["aria-describedby","ariaDescribedby"],id:"id",required:["required","required",m],labelPosition:"labelPosition",name:"name",value:"value",disableRipple:["disableRipple","disableRipple",m],tabIndex:["tabIndex","tabIndex",e=>e==null?void 0:U(e)],color:"color",checked:["checked","checked",m],disabled:["disabled","disabled",m],indeterminate:["indeterminate","indeterminate",m]},outputs:{change:"change",indeterminateChange:"indeterminateChange"},exportAs:["matCheckbox"],features:[B([ee]),S],ngContentSelectors:J,decls:15,vars:20,consts:[[1,"mdc-form-field",3,"click"],[1,"mdc-checkbox"],["checkbox",""],[1,"mat-mdc-checkbox-touch-target",3,"click"],["type","checkbox",1,"mdc-checkbox__native-control",3,"checked","indeterminate","disabled","id","required","tabIndex","blur","click","change"],["input",""],[1,"mdc-checkbox__ripple"],[1,"mdc-checkbox__background"],["focusable","false","viewBox","0 0 24 24","aria-hidden","true",1,"mdc-checkbox__checkmark"],["fill","none","d","M1.73,12.91 8.1,19.28 22.79,4.59",1,"mdc-checkbox__checkmark-path"],[1,"mdc-checkbox__mixedmark"],["mat-ripple","",1,"mat-mdc-checkbox-ripple","mat-mdc-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleCentered"],[1,"mdc-label",3,"for"],["label",""]],template:function(o,c){if(o&1&&(q(),a(0,"div",0),_("click",function(h){return c._preventBubblingFromLabel(h)}),a(1,"div",1,2)(3,"div",3),_("click",function(){return c._onTouchTargetClick()}),r(),a(4,"input",4,5),_("blur",function(){return c._onBlur()})("click",function(){return c._onInputClick()})("change",function(h){return c._onInteractionEvent(h)}),r(),l(6,"div",6),a(7,"div",7),z(),a(8,"svg",8),l(9,"path",9),r(),w(),l(10,"div",10),r(),l(11,"div",11),r(),a(12,"label",12,13),N(14),r()()),o&2){let i=V(2);b("mdc-form-field--align-end",c.labelPosition=="before"),k(4),b("mdc-checkbox--selected",c.checked),s("checked",c.checked)("indeterminate",c.indeterminate)("disabled",c.disabled)("id",c.inputId)("required",c.required)("tabIndex",c.disabled?-1:c.tabIndex),F("aria-label",c.ariaLabel||null)("aria-labelledby",c.ariaLabelledby)("aria-describedby",c.ariaDescribedby)("aria-checked",c.indeterminate?"mixed":null)("name",c.name)("value",c.value),k(7),s("matRippleTrigger",i)("matRippleDisabled",c.disableRipple||c.disabled)("matRippleCentered",!0),k(1),s("for",c.inputId)}},dependencies:[g],styles:['.mdc-touch-target-wrapper{display:inline}@keyframes mdc-checkbox-unchecked-checked-checkmark-path{0%,50%{stroke-dashoffset:29.7833385}50%{animation-timing-function:cubic-bezier(0, 0, 0.2, 1)}100%{stroke-dashoffset:0}}@keyframes mdc-checkbox-unchecked-indeterminate-mixedmark{0%,68.2%{transform:scaleX(0)}68.2%{animation-timing-function:cubic-bezier(0, 0, 0, 1)}100%{transform:scaleX(1)}}@keyframes mdc-checkbox-checked-unchecked-checkmark-path{from{animation-timing-function:cubic-bezier(0.4, 0, 1, 1);opacity:1;stroke-dashoffset:0}to{opacity:0;stroke-dashoffset:-29.7833385}}@keyframes mdc-checkbox-checked-indeterminate-checkmark{from{animation-timing-function:cubic-bezier(0, 0, 0.2, 1);transform:rotate(0deg);opacity:1}to{transform:rotate(45deg);opacity:0}}@keyframes mdc-checkbox-indeterminate-checked-checkmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);transform:rotate(45deg);opacity:0}to{transform:rotate(360deg);opacity:1}}@keyframes mdc-checkbox-checked-indeterminate-mixedmark{from{animation-timing-function:mdc-animation-deceleration-curve-timing-function;transform:rotate(-45deg);opacity:0}to{transform:rotate(0deg);opacity:1}}@keyframes mdc-checkbox-indeterminate-checked-mixedmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);transform:rotate(0deg);opacity:1}to{transform:rotate(315deg);opacity:0}}@keyframes mdc-checkbox-indeterminate-unchecked-mixedmark{0%{animation-timing-function:linear;transform:scaleX(1);opacity:1}32.8%,100%{transform:scaleX(0);opacity:0}}.mdc-checkbox{display:inline-block;position:relative;flex:0 0 18px;box-sizing:content-box;width:18px;height:18px;line-height:0;white-space:nowrap;cursor:pointer;vertical-align:bottom}.mdc-checkbox[hidden]{display:none}.mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__focus-ring,.mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__focus-ring{pointer-events:none;border:2px solid rgba(0,0,0,0);border-radius:6px;box-sizing:content-box;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:100%;width:100%}@media screen and (forced-colors: active){.mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__focus-ring,.mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__focus-ring{border-color:CanvasText}}.mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__focus-ring::after,.mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__focus-ring::after{content:"";border:2px solid rgba(0,0,0,0);border-radius:8px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc(100% + 4px);width:calc(100% + 4px)}@media screen and (forced-colors: active){.mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__focus-ring::after,.mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__focus-ring::after{border-color:CanvasText}}@media all and (-ms-high-contrast: none){.mdc-checkbox .mdc-checkbox__focus-ring{display:none}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-checkbox__mixedmark{margin:0 1px}}.mdc-checkbox--disabled{cursor:default;pointer-events:none}.mdc-checkbox__background{display:inline-flex;position:absolute;align-items:center;justify-content:center;box-sizing:border-box;width:18px;height:18px;border:2px solid currentColor;border-radius:2px;background-color:rgba(0,0,0,0);pointer-events:none;will-change:background-color,border-color;transition:background-color 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1),border-color 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-checkbox__checkmark{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;opacity:0;transition:opacity 180ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-checkbox--upgraded .mdc-checkbox__checkmark{opacity:1}.mdc-checkbox__checkmark-path{transition:stroke-dashoffset 180ms 0ms cubic-bezier(0.4, 0, 0.6, 1);stroke:currentColor;stroke-width:3.12px;stroke-dashoffset:29.7833385;stroke-dasharray:29.7833385}.mdc-checkbox__mixedmark{width:100%;height:0;transform:scaleX(0) rotate(0deg);border-width:1px;border-style:solid;opacity:0;transition:opacity 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1),transform 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__background,.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__background,.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__background,.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__background{animation-duration:180ms;animation-timing-function:linear}.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__checkmark-path{animation:mdc-checkbox-unchecked-checked-checkmark-path 180ms linear 0s;transition:none}.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__mixedmark{animation:mdc-checkbox-unchecked-indeterminate-mixedmark 90ms linear 0s;transition:none}.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__checkmark-path{animation:mdc-checkbox-checked-unchecked-checkmark-path 90ms linear 0s;transition:none}.mdc-checkbox--anim-checked-indeterminate .mdc-checkbox__checkmark{animation:mdc-checkbox-checked-indeterminate-checkmark 90ms linear 0s;transition:none}.mdc-checkbox--anim-checked-indeterminate .mdc-checkbox__mixedmark{animation:mdc-checkbox-checked-indeterminate-mixedmark 90ms linear 0s;transition:none}.mdc-checkbox--anim-indeterminate-checked .mdc-checkbox__checkmark{animation:mdc-checkbox-indeterminate-checked-checkmark 500ms linear 0s;transition:none}.mdc-checkbox--anim-indeterminate-checked .mdc-checkbox__mixedmark{animation:mdc-checkbox-indeterminate-checked-mixedmark 500ms linear 0s;transition:none}.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__mixedmark{animation:mdc-checkbox-indeterminate-unchecked-mixedmark 300ms linear 0s;transition:none}.mdc-checkbox__native-control:checked~.mdc-checkbox__background,.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background,.mdc-checkbox__native-control[data-indeterminate=true]~.mdc-checkbox__background{transition:border-color 90ms 0ms cubic-bezier(0, 0, 0.2, 1),background-color 90ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__checkmark-path,.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__checkmark-path,.mdc-checkbox__native-control[data-indeterminate=true]~.mdc-checkbox__background .mdc-checkbox__checkmark-path{stroke-dashoffset:0}.mdc-checkbox__native-control{position:absolute;margin:0;padding:0;opacity:0;cursor:inherit}.mdc-checkbox__native-control:disabled{cursor:default;pointer-events:none}.mdc-checkbox--touch{margin:calc((var(--mdc-checkbox-state-layer-size) - var(--mdc-checkbox-state-layer-size)) / 2)}.mdc-checkbox--touch .mdc-checkbox__native-control{top:calc((var(--mdc-checkbox-state-layer-size) - var(--mdc-checkbox-state-layer-size)) / 2);right:calc((var(--mdc-checkbox-state-layer-size) - var(--mdc-checkbox-state-layer-size)) / 2);left:calc((var(--mdc-checkbox-state-layer-size) - var(--mdc-checkbox-state-layer-size)) / 2);width:var(--mdc-checkbox-state-layer-size);height:var(--mdc-checkbox-state-layer-size)}.mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__checkmark{transition:opacity 180ms 0ms cubic-bezier(0, 0, 0.2, 1),transform 180ms 0ms cubic-bezier(0, 0, 0.2, 1);opacity:1}.mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__mixedmark{transform:scaleX(1) rotate(-45deg)}.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__checkmark,.mdc-checkbox__native-control[data-indeterminate=true]~.mdc-checkbox__background .mdc-checkbox__checkmark{transform:rotate(45deg);opacity:0;transition:opacity 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1),transform 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__mixedmark,.mdc-checkbox__native-control[data-indeterminate=true]~.mdc-checkbox__background .mdc-checkbox__mixedmark{transform:scaleX(1) rotate(0deg);opacity:1}.mdc-checkbox.mdc-checkbox--upgraded .mdc-checkbox__background,.mdc-checkbox.mdc-checkbox--upgraded .mdc-checkbox__checkmark,.mdc-checkbox.mdc-checkbox--upgraded .mdc-checkbox__checkmark-path,.mdc-checkbox.mdc-checkbox--upgraded .mdc-checkbox__mixedmark{transition:none}.mdc-form-field{display:inline-flex;align-items:center;vertical-align:middle}.mdc-form-field[hidden]{display:none}.mdc-form-field>label{margin-left:0;margin-right:auto;padding-left:4px;padding-right:0;order:0}[dir=rtl] .mdc-form-field>label,.mdc-form-field>label[dir=rtl]{margin-left:auto;margin-right:0}[dir=rtl] .mdc-form-field>label,.mdc-form-field>label[dir=rtl]{padding-left:0;padding-right:4px}.mdc-form-field--nowrap>label{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.mdc-form-field--align-end>label{margin-left:auto;margin-right:0;padding-left:0;padding-right:4px;order:-1}[dir=rtl] .mdc-form-field--align-end>label,.mdc-form-field--align-end>label[dir=rtl]{margin-left:0;margin-right:auto}[dir=rtl] .mdc-form-field--align-end>label,.mdc-form-field--align-end>label[dir=rtl]{padding-left:4px;padding-right:0}.mdc-form-field--space-between{justify-content:space-between}.mdc-form-field--space-between>label{margin:0}[dir=rtl] .mdc-form-field--space-between>label,.mdc-form-field--space-between>label[dir=rtl]{margin:0}.mdc-checkbox{padding:calc((var(--mdc-checkbox-state-layer-size) - 18px) / 2);margin:calc((var(--mdc-checkbox-state-layer-size) - var(--mdc-checkbox-state-layer-size)) / 2)}.mdc-checkbox .mdc-checkbox__native-control[disabled]:not(:checked):not(:indeterminate):not([data-indeterminate=true])~.mdc-checkbox__background{border-color:var(--mdc-checkbox-disabled-unselected-icon-color);background-color:transparent}.mdc-checkbox .mdc-checkbox__native-control[disabled]:checked~.mdc-checkbox__background,.mdc-checkbox .mdc-checkbox__native-control[disabled]:indeterminate~.mdc-checkbox__background,.mdc-checkbox .mdc-checkbox__native-control[data-indeterminate=true][disabled]~.mdc-checkbox__background{border-color:transparent;background-color:var(--mdc-checkbox-disabled-selected-icon-color)}.mdc-checkbox .mdc-checkbox__native-control:enabled~.mdc-checkbox__background .mdc-checkbox__checkmark{color:var(--mdc-checkbox-selected-checkmark-color)}.mdc-checkbox .mdc-checkbox__native-control:enabled~.mdc-checkbox__background .mdc-checkbox__mixedmark{border-color:var(--mdc-checkbox-selected-checkmark-color)}.mdc-checkbox .mdc-checkbox__native-control:disabled~.mdc-checkbox__background .mdc-checkbox__checkmark{color:var(--mdc-checkbox-disabled-selected-checkmark-color)}.mdc-checkbox .mdc-checkbox__native-control:disabled~.mdc-checkbox__background .mdc-checkbox__mixedmark{border-color:var(--mdc-checkbox-disabled-selected-checkmark-color)}.mdc-checkbox .mdc-checkbox__native-control:enabled:not(:checked):not(:indeterminate):not([data-indeterminate=true])~.mdc-checkbox__background{border-color:var(--mdc-checkbox-unselected-icon-color);background-color:transparent}.mdc-checkbox .mdc-checkbox__native-control:enabled:checked~.mdc-checkbox__background,.mdc-checkbox .mdc-checkbox__native-control:enabled:indeterminate~.mdc-checkbox__background,.mdc-checkbox .mdc-checkbox__native-control[data-indeterminate=true]:enabled~.mdc-checkbox__background{border-color:var(--mdc-checkbox-selected-icon-color);background-color:var(--mdc-checkbox-selected-icon-color)}@keyframes mdc-checkbox-fade-in-background-8A000000FFF4433600000000FFF44336{0%{border-color:var(--mdc-checkbox-unselected-icon-color);background-color:transparent}50%{border-color:var(--mdc-checkbox-selected-icon-color);background-color:var(--mdc-checkbox-selected-icon-color)}}@keyframes mdc-checkbox-fade-out-background-8A000000FFF4433600000000FFF44336{0%,80%{border-color:var(--mdc-checkbox-selected-icon-color);background-color:var(--mdc-checkbox-selected-icon-color)}100%{border-color:var(--mdc-checkbox-unselected-icon-color);background-color:transparent}}.mdc-checkbox.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mdc-checkbox.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-in-background-8A000000FFF4433600000000FFF44336}.mdc-checkbox.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mdc-checkbox.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-out-background-8A000000FFF4433600000000FFF44336}.mdc-checkbox:hover .mdc-checkbox__native-control:enabled:not(:checked):not(:indeterminate):not([data-indeterminate=true])~.mdc-checkbox__background{border-color:var(--mdc-checkbox-unselected-hover-icon-color);background-color:transparent}.mdc-checkbox:hover .mdc-checkbox__native-control:enabled:checked~.mdc-checkbox__background,.mdc-checkbox:hover .mdc-checkbox__native-control:enabled:indeterminate~.mdc-checkbox__background,.mdc-checkbox:hover .mdc-checkbox__native-control[data-indeterminate=true]:enabled~.mdc-checkbox__background{border-color:var(--mdc-checkbox-selected-hover-icon-color);background-color:var(--mdc-checkbox-selected-hover-icon-color)}@keyframes mdc-checkbox-fade-in-background-FF212121FFF4433600000000FFF44336{0%{border-color:var(--mdc-checkbox-unselected-hover-icon-color);background-color:transparent}50%{border-color:var(--mdc-checkbox-selected-hover-icon-color);background-color:var(--mdc-checkbox-selected-hover-icon-color)}}@keyframes mdc-checkbox-fade-out-background-FF212121FFF4433600000000FFF44336{0%,80%{border-color:var(--mdc-checkbox-selected-hover-icon-color);background-color:var(--mdc-checkbox-selected-hover-icon-color)}100%{border-color:var(--mdc-checkbox-unselected-hover-icon-color);background-color:transparent}}.mdc-checkbox:hover.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mdc-checkbox:hover.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-in-background-FF212121FFF4433600000000FFF44336}.mdc-checkbox:hover.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mdc-checkbox:hover.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-out-background-FF212121FFF4433600000000FFF44336}.mdc-checkbox:not(:disabled):active .mdc-checkbox__native-control:enabled:not(:checked):not(:indeterminate):not([data-indeterminate=true])~.mdc-checkbox__background{border-color:var(--mdc-checkbox-unselected-pressed-icon-color);background-color:transparent}.mdc-checkbox:not(:disabled):active .mdc-checkbox__native-control:enabled:checked~.mdc-checkbox__background,.mdc-checkbox:not(:disabled):active .mdc-checkbox__native-control:enabled:indeterminate~.mdc-checkbox__background,.mdc-checkbox:not(:disabled):active .mdc-checkbox__native-control[data-indeterminate=true]:enabled~.mdc-checkbox__background{border-color:var(--mdc-checkbox-selected-pressed-icon-color);background-color:var(--mdc-checkbox-selected-pressed-icon-color)}@keyframes mdc-checkbox-fade-in-background-8A000000FFF4433600000000FFF44336{0%{border-color:var(--mdc-checkbox-unselected-pressed-icon-color);background-color:transparent}50%{border-color:var(--mdc-checkbox-selected-pressed-icon-color);background-color:var(--mdc-checkbox-selected-pressed-icon-color)}}@keyframes mdc-checkbox-fade-out-background-8A000000FFF4433600000000FFF44336{0%,80%{border-color:var(--mdc-checkbox-selected-pressed-icon-color);background-color:var(--mdc-checkbox-selected-pressed-icon-color)}100%{border-color:var(--mdc-checkbox-unselected-pressed-icon-color);background-color:transparent}}.mdc-checkbox:not(:disabled):active.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mdc-checkbox:not(:disabled):active.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-in-background-8A000000FFF4433600000000FFF44336}.mdc-checkbox:not(:disabled):active.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mdc-checkbox:not(:disabled):active.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-out-background-8A000000FFF4433600000000FFF44336}.mdc-checkbox .mdc-checkbox__background{top:calc((var(--mdc-checkbox-state-layer-size) - 18px) / 2);left:calc((var(--mdc-checkbox-state-layer-size) - 18px) / 2)}.mdc-checkbox .mdc-checkbox__native-control{top:calc((var(--mdc-checkbox-state-layer-size) - var(--mdc-checkbox-state-layer-size)) / 2);right:calc((var(--mdc-checkbox-state-layer-size) - var(--mdc-checkbox-state-layer-size)) / 2);left:calc((var(--mdc-checkbox-state-layer-size) - var(--mdc-checkbox-state-layer-size)) / 2);width:var(--mdc-checkbox-state-layer-size);height:var(--mdc-checkbox-state-layer-size)}.mdc-checkbox .mdc-checkbox__native-control:enabled:focus:focus:not(:checked):not(:indeterminate)~.mdc-checkbox__background{border-color:var(--mdc-checkbox-unselected-focus-icon-color)}.mdc-checkbox .mdc-checkbox__native-control:enabled:focus:checked~.mdc-checkbox__background,.mdc-checkbox .mdc-checkbox__native-control:enabled:focus:indeterminate~.mdc-checkbox__background{border-color:var(--mdc-checkbox-selected-focus-icon-color);background-color:var(--mdc-checkbox-selected-focus-icon-color)}.mdc-checkbox:hover .mdc-checkbox__ripple{opacity:var(--mdc-checkbox-unselected-hover-state-layer-opacity);background-color:var(--mdc-checkbox-unselected-hover-state-layer-color)}.mdc-checkbox:hover .mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mdc-checkbox-unselected-hover-state-layer-color)}.mdc-checkbox .mdc-checkbox__native-control:focus~.mdc-checkbox__ripple{opacity:var(--mdc-checkbox-unselected-focus-state-layer-opacity);background-color:var(--mdc-checkbox-unselected-focus-state-layer-color)}.mdc-checkbox .mdc-checkbox__native-control:focus~.mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mdc-checkbox-unselected-focus-state-layer-color)}.mdc-checkbox:active .mdc-checkbox__native-control~.mdc-checkbox__ripple{opacity:var(--mdc-checkbox-unselected-pressed-state-layer-opacity);background-color:var(--mdc-checkbox-unselected-pressed-state-layer-color)}.mdc-checkbox:active .mdc-checkbox__native-control~.mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mdc-checkbox-unselected-pressed-state-layer-color)}.mdc-checkbox:hover .mdc-checkbox__native-control:checked~.mdc-checkbox__ripple{opacity:var(--mdc-checkbox-selected-hover-state-layer-opacity);background-color:var(--mdc-checkbox-selected-hover-state-layer-color)}.mdc-checkbox:hover .mdc-checkbox__native-control:checked~.mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mdc-checkbox-selected-hover-state-layer-color)}.mdc-checkbox .mdc-checkbox__native-control:focus:checked~.mdc-checkbox__ripple{opacity:var(--mdc-checkbox-selected-focus-state-layer-opacity);background-color:var(--mdc-checkbox-selected-focus-state-layer-color)}.mdc-checkbox .mdc-checkbox__native-control:focus:checked~.mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mdc-checkbox-selected-focus-state-layer-color)}.mdc-checkbox:active .mdc-checkbox__native-control:checked~.mdc-checkbox__ripple{opacity:var(--mdc-checkbox-selected-pressed-state-layer-opacity);background-color:var(--mdc-checkbox-selected-pressed-state-layer-color)}.mdc-checkbox:active .mdc-checkbox__native-control:checked~.mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mdc-checkbox-selected-pressed-state-layer-color)}.mat-mdc-checkbox{display:inline-block;position:relative;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-checkbox .mdc-checkbox__background{-webkit-print-color-adjust:exact;color-adjust:exact}.mat-mdc-checkbox._mat-animation-noopable *,.mat-mdc-checkbox._mat-animation-noopable *::before{transition:none !important;animation:none !important}.mat-mdc-checkbox label{cursor:pointer}.mat-mdc-checkbox.mat-mdc-checkbox-disabled label{cursor:default}.mat-mdc-checkbox label:empty{display:none}.cdk-high-contrast-active .mat-mdc-checkbox.mat-mdc-checkbox-disabled{opacity:.5}.cdk-high-contrast-active .mat-mdc-checkbox .mdc-checkbox__checkmark{--mdc-checkbox-selected-checkmark-color: CanvasText;--mdc-checkbox-disabled-selected-checkmark-color: CanvasText}.mat-mdc-checkbox .mdc-checkbox__ripple{opacity:0}.mat-mdc-checkbox-ripple,.mdc-checkbox__ripple{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:50%;pointer-events:none}.mat-mdc-checkbox-ripple:not(:empty),.mdc-checkbox__ripple:not(:empty){transform:translateZ(0)}.mat-mdc-checkbox-ripple .mat-ripple-element{opacity:.1}.mat-mdc-checkbox-touch-target{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%)}.mat-mdc-checkbox-ripple::before{border-radius:50%}.mdc-checkbox__native-control:focus~.mat-mdc-focus-indicator::before{content:""}'],encapsulation:2,changeDetection:0});let n=t;return n})();var K=(()=>{let t=class t{};t.\u0275fac=function(o){return new(o||t)},t.\u0275mod=v({type:t}),t.\u0275inj=f({});let n=t;return n})(),Te=(()=>{let t=class t{};t.\u0275fac=function(o){return new(o||t)},t.\u0275mod=v({type:t}),t.\u0275inj=f({imports:[C,Q,K,C,K]});let n=t;return n})();export{oe as a,Te as b};
@@ -1 +0,0 @@
1
- import{a as P}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.11.0/Marketplace/chunk-2UTL7SZX.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.11.0/Marketplace/chunk-7B2VFEDY.js";import{C,D as B}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.11.0/Marketplace/chunk-3K7JH744.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.11.0/Marketplace/chunk-NRSNSW7E.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.11.0/Marketplace/chunk-YUB56KZH.js";import{$a as t,Ac as A,Fb as s,Ga as a,Gb as m,Ha as c,Hb as v,Q as f,Qa as u,Wa as g,ab as i,bc as x,ea as h,ec as E,fc as _,gc as D,hc as R,ic as b,q as y,rb as n,sb as p,tb as S,vc as M,wb as I,yc as L}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.11.0/Marketplace/chunk-5MULKC5W.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.11.0/Marketplace/chunk-6REOMLA7.js";function j(d,l){if(d&1&&(t(0,"div",3)(1,"div",4)(2,"div",5)(3,"div",6)(4,"div",7)(5,"h5"),n(6,"General"),i()(),t(7,"div",8)(8,"div",9)(9,"div",10)(10,"div",11)(11,"label"),n(12,"Created"),i(),t(13,"div")(14,"span"),n(15),s(16,"date"),i()()()(),t(17,"div",10)(18,"div",11)(19,"label"),n(20,"Duration"),i(),t(21,"div")(22,"span"),n(23),s(24,"number"),i()()()(),t(25,"div",10)(26,"div",11)(27,"label"),n(28,"Response Code"),i(),t(29,"div")(30,"span"),n(31),i()()()()()()()()(),t(32,"div",4)(33,"div",10)(34,"div",6)(35,"div",7)(36,"h5"),n(37,"Request"),i()(),t(38,"div",8)(39,"div",12)(40,"div",13)(41,"pre"),n(42),s(43,"json"),i()()()()()(),t(44,"div",10)(45,"div",6)(46,"div",7)(47,"h5"),n(48,"Response"),i()(),t(49,"div",8)(50,"div",14)(51,"div",13)(52,"pre"),n(53),s(54,"json"),i()()()()()()()()),d&2){let e=l.ngIf;a(15),p(v(16,5,e==null?null:e._source["@timestamp"],"dd MMM yyyy HH:mm:ss")),a(8),S("",v(24,8,e==null?null:e.DurationInSecond,"1.1-1")," s"),a(8),p(e==null||e._source==null||e._source.log==null?null:e._source.log.respCode),a(11),p(m(43,11,e==null||e._source==null||e._source.log==null?null:e._source.log.req)),a(11),p(m(54,13,e==null||e._source==null||e._source.log==null?null:e._source.log.res))}}var J=(()=>{let l=class l{constructor(r,o){this.inventoryAsyncServiceLog=r,this.activatedRoute=o}ngOnInit(){let r=this.activatedRoute.snapshot.queryParams;this.initInventoryLog(r?.ID)}initInventoryLog(r){this.inventoryLog$=this.inventoryAsyncServiceLog.getInventoryAsyncLogDetail(r).pipe(y(o=>(o.hits[0].DurationInSecond=parseInt(o.hits[0]._source?.Duration)/1e3,o?.hits[0])),f(1))}};l.\u0275fac=function(o){return new(o||l)(c(P),c(M))},l.\u0275cmp=h({type:l,selectors:[["app-inventory-async-detail"]],standalone:!0,features:[I],decls:7,vars:6,consts:[[3,"headerTitle","hideSearchBox","hideSearchDropdown"],["role","button","routerLink","/menu/log/inventory-async",1,"btn","btn-secondary","btn-fill","btn-lg","me-3"],["class","container-fluid mt-3",4,"ngIf"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-12"],[1,"card"],[1,"card-header"],[1,"card-body"],[1,"row","mt-7"],[1,"col-sm-6"],[1,"info-label-group"],[1,"col-sm-12"],[1,"form-group"],[1,"col-sm-12","mt-2"]],template:function(o,w){o&1&&(t(0,"mainpanel",0)(1,"actions")(2,"a",1),n(3,"Back"),i()(),t(4,"content"),g(5,j,55,15,"div",2),s(6,"async"),i()()),o&2&&(u("headerTitle","Sync Inventory Async")("hideSearchBox",!0)("hideSearchDropdown",!0),a(5),u("ngIf",m(6,4,w.inventoryLog$)))},dependencies:[b,x,E,D,R,_,B,C,A,L]});let d=l;return d})();export{J as InventoryAsyncDetailComponent};
@@ -1,2 +0,0 @@
1
- import{a as D,b as Ee,c as Pe,d as ae,e as oe}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.11.0/Marketplace/chunk-V663NFYO.js";import{a as Me}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.11.0/Marketplace/chunk-NBRMZAKJ.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.11.0/Marketplace/chunk-CXVHMJKM.js";import{a as Ve,b as De}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.11.0/Marketplace/chunk-BQ523YOG.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.11.0/Marketplace/chunk-47CCMQZH.js";import{a as ie}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.11.0/Marketplace/chunk-XLIHXKFC.js";import{a as ne}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.11.0/Marketplace/chunk-2W5FPGNS.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.11.0/Marketplace/chunk-U4LOMDYT.js";import{a as Ie,b as we}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.11.0/Marketplace/chunk-OSMPOBFL.js";import{a as Te}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.11.0/Marketplace/chunk-X7VVYHKH.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.11.0/Marketplace/chunk-N5F5D3WX.js";import{a as Ce,b as fe,d as xe,e as ve}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.11.0/Marketplace/chunk-2IRZVYEG.js";import{a as re}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.11.0/Marketplace/chunk-IG45JJJB.js";import{d as q,k as W}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.11.0/Marketplace/chunk-G7FQBJ7U.js";import{a as H}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.11.0/Marketplace/chunk-7B2VFEDY.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.11.0/Marketplace/chunk-C4SBGOAO.js";import{B as ye,C as te,D as be,q as X,r as Se,u as ee}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.11.0/Marketplace/chunk-3K7JH744.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.11.0/Marketplace/chunk-NRSNSW7E.js";import{b as ge,c as K,h as Y,k as J,m as Z,u as he}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.11.0/Marketplace/chunk-YUB56KZH.js";import{c as V}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.11.0/Marketplace/chunk-GWNC6QPV.js";import{$a as l,Aa as k,Ac as G,B as $,Fb as C,Ga as r,Gb as x,Ha as y,Hb as O,Ob as R,Qa as s,Wa as u,X as N,_b as me,aa as A,ab as p,ac as de,bb as v,bc as U,cb as b,db as I,ea as P,ec as j,fa as B,fb as S,fc as _e,hc as z,ic as Q,ja as d,jb as g,ka as _,lb as c,ob as se,q as pe,qb as F,rb as m,sb as E,tb as w,ub as ce,wc as ue,yb as L}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.11.0/Marketplace/chunk-5MULKC5W.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.11.0/Marketplace/chunk-6REOMLA7.js";var ke=(()=>{let a=class a{constructor(){this.inventoryTabs=[{Title:"Single Channel Comparison",Url:"/menu/inventory/bychannel"},{Title:"Multi Channel Comparison",Url:"/menu/inventory/pos"}]}};a.\u0275fac=function(n){return new(n||a)},a.\u0275cmp=P({type:a,selectors:[["app-inventory"]],decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(n,o){n&1&&(l(0,"nav",0)(1,"div",1)(2,"div"),v(3,"nav-tab",2),p()()(),v(4,"router-outlet")),n&2&&(r(3),s("Tabs",o.inventoryTabs))},dependencies:[ue,Ie]});let i=a;return i})();function Ye(i,a){if(i&1){let e=S();l(0,"button",21),g("click",function(){d(e);let n=c().ngIf,o=c(2);return _(o.onUpdateItems(n))}),v(1,"i",22),m(2," Update "),p()}}function Je(i,a){if(i&1&&(l(0,"actions")(1,"div",19),u(2,Ye,3,0,"button",20),p()()),i&2){let e=a.ngIf,t=c(2);r(2),s("ngIf",t.productService.hasSelectionVariant(e))}}function Ze(i,a){if(i&1){let e=S();l(0,"app-table",23),g("onToggle",function(n){d(e);let o=c(2);return _(o.onShowDifferenceStock(n))})("onSubmit",function(n){let h=d(e).ngIf,f=c(2);return _(f.updateStockByVariant(n,h))}),p()}if(i&2){let e=a.ngIf,t=c(2);s("data",e)("channel",t.channelOptions)("showProductToggle",!0)("filter",t.searchFilter)}}function qe(i,a){if(i&1){let e=S();l(0,"span",24),g("click",function(){d(e);let n=c(2);return _(n.getRowCount())}),l(1,"i",25),m(2,"?"),p()()}}function We(i,a){if(i&1&&(l(0,"span"),m(1),C(2,"number"),p()),i&2){let e=a.ngIf;r(1),E(x(2,1,e))}}function Xe(i,a){if(i&1){let e=S();l(0,"a",26),g("click",function(){d(e);let n=c(2);return _(n.nextPage())}),v(1,"i",27),m(2," Next"),p()}}function et(i,a){if(i&1){let e=S();l(0,"a",28),g("click",function(){d(e);let n=c(2);return _(n.getAllData())}),v(1,"i",29),m(2," Last"),p()}}function tt(i,a){if(i&1){let e=S();l(0,"mainpanel",1),g("onSubmit",function(n){d(e);let o=c();return _(o.onSearch(n))}),u(1,Je,3,1,"actions",2),C(2,"async"),l(3,"filters")(4,"div")(5,"label",3),m(6,"PageNumber"),p(),l(7,"input",4),g("ngModelChange",function(n){d(e);let o=c();return _(o.searchFilter.PageNumber=n)}),p()(),l(8,"div",5)(9,"label",6),m(10,"Page Size"),p(),l(11,"input",7),g("ngModelChange",function(n){d(e);let o=c();return _(o.searchFilter.RowCount=n)}),p()()(),l(12,"content")(13,"div",8)(14,"div",9)(15,"div",10),u(16,Ze,1,4,"app-table",11),C(17,"async"),b(18),l(19,"div",12)(20,"div",13)(21,"div",14),m(22),C(23,"number"),C(24,"async"),u(25,qe,3,0,"span",15)(26,We,3,3,"span",2),C(27,"async"),m(28),p()(),l(29,"div",16),u(30,Xe,3,0,"a",17)(31,et,3,0,"a",18),p()(),I(),p()()()()()}if(i&2){let e=c(),t;s("pageData",e.pageData)("hideSearchBox",!1)("textButton","Search"),r(1),s("ngIf",x(2,13,e.paginationService.data$)),r(6),s("ngModel",e.searchFilter.PageNumber),r(4),s("ngModel",e.searchFilter.RowCount),r(5),s("ngIf",x(17,15,e.paginationService.data$)),r(6),w(" Showing 1 - ",x(23,17,(t=x(24,19,e.paginationService.data$))==null?null:t.length)," of "),r(3),s("ngIf",e.paginationService.hideCount),r(1),s("ngIf",x(27,21,!e.paginationService.hideCount&&e.allDataCount$)),r(2),w(" records ~ ",e.paginationService.footerPageNumber," Page "),r(2),s("ngIf",e.paginationService.disableNextButton&&!e.paginationService.goToLastPage),r(1),s("ngIf",e.paginationService.disableNextButton&&!e.paginationService.goToLastPage)}}var Ne=(()=>{let a=class a{constructor(t,n,o,h,f,T){this.http=t,this.toastr=n,this.dialog=o,this.paginationService=h,this.productService=f,this.authService=T,this.loaderEndpoint="InventoryLoader/GetMultipleInventoryComparison",this.dataEndpoint="Inventory/GetMultipleChannelComparison",this.allDataCountEndpoint="Inventory/GetMultipleChannelComparisonRowCount",this.filterTypeOptions=[{Key:1,Value:"All"},{Key:3,Value:"Difference"}],this.pageData={Title:"Inventory",Nav:[{Title:"Inventory Cache",Url:"/menu/inventory/pos",Active:!0},{Title:"Inventory Realtime",Url:"/menu/inventory/realtime",Active:!1}]},this.channelOptions=this.authService.getChannels()}ngOnInit(){this.initPageLoader()}initPageLoader(){this.paginationService.fetchDataEndpoint=this.dataEndpoint,this.loader$=this.http.post(`/API/${this.loaderEndpoint}`,{}).pipe(N(t=>{t.Filter={PageNumber:t.Filter.PageNumber,filterModel:D.ALL,RowCount:t.Filter.PageSize,HiddenIPOSInventory:t.Filter.HiddenIPOSInventory},this.searchFilter=t.Filter,this.paginationService.reloadPagination(this.searchFilter)}))}onSearch(t){this.searchFilter.text=t,this.paginationService.reloadPagination(this.searchFilter)}updateStock(t,n){let o=this.productService.selectedVariantProduct(t);if(o.length>0){let f=o.map(M=>({ID:M.ID,Code:M.Code,Inventory:M.Inventory}));var h=n.filter(M=>M.selected).map(M=>M.ID);let T={ListChannelID:h,List:f};this.http.post("/api/Inventory/UpdateChannel",T).subscribe(M=>{this.paginationService.reloadPagination(this.searchFilter),this.toastr.success("Successfully updated "+T.List.length+" variants in "+T.ListChannelID.length+" channels","Success")})}}updateStockByVariant(t,n){let o={ID:t.ChannelID,ChannelItemID:t.ChannelItemID,ChannelVariantID:t.ChannelVariationID,NewQuantity:parseFloat(t.Inventory),VariantID:t.ID,SKU:t.Sku};this.http.post("/api/Inventory/UpdateQuantityByItem",o).subscribe(h=>{let f=this.productService.findChannelById(o.ID,this.channelOptions);this.toastr.success("Successfully updated "+t.ItemName+"("+t.VarName+") inventory in "+f.Name+" to "+o.NewQuantity,"Success")})}onShowDifferenceStock(t){t?this.searchFilter.filterModel=D.DIFFERENCE:this.searchFilter.filterModel=D.ALL,this.paginationService.reloadPagination(this.searchFilter)}onUpdateItems(t){let n=this.productService.selectedVariantProduct(t);this.dialog.open(Me,{data:{selectedItems:n,channels:JSON.parse(JSON.stringify(this.channelOptions))},width:"600px"}).afterClosed().pipe($(o=>V.IsNotEmpty(o))).subscribe(o=>{this.updateStock(t,o)})}getRowCount(){this.paginationService.hideCount=!1;let t={text:this.searchFilter.text};this.allDataCount$=this.http.post(`/API/${this.allDataCountEndpoint}`,t)}nextPage(){this.paginationService.onNextPage(this.searchFilter)}getAllData(){this.http.post(`/API/${this.allDataCountEndpoint}`,{}).subscribe({next:t=>{this.searchFilter.PageNumber=1,this.paginationService.getAllData(this.searchFilter,t)}})}ngOnDestroy(){this.paginationService.destroy()}};a.\u0275fac=function(n){return new(n||a)(y(H),y(q),y(ee),y(ie),y(ne),y(W))},a.\u0275cmp=P({type:a,selectors:[["app-multi-channel-comparison"]],decls:2,vars:3,consts:[["headerTitle","Inventory Comparison",3,"pageData","hideSearchBox","textButton","onSubmit",4,"ngIf"],["headerTitle","Inventory Comparison",3,"pageData","hideSearchBox","textButton","onSubmit"],[4,"ngIf"],["for","PageNumber",1,"fw-bold"],["type","number","id","PageNumber","placeholder","PageNumber","name","PageNumber","data-toggle","tooltip","matTooltip","Page Number",1,"form-control","mt-2",3,"ngModel","ngModelChange"],[1,"mt-5"],["for","RowCount",1,"fw-bold"],["type","number","id","RowCount","placeholder","Page Size","name","RowCount","data-toggle","tooltip","matTooltip","Page Size",1,"form-control","mt-2",3,"ngModel","ngModelChange"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],["table","inventory",3,"data","channel","showProductToggle","filter","onToggle","onSubmit",4,"ngIf"],[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"],[1,"btn-group"],["role","button","class","btn btn-outline-secondary btn-sm text-primary","title","Load more for 20 products",3,"click",4,"ngIf"],["role","button","class","btn btn-outline-secondary btn-sm text-primary border-start-0","title","Load all products",3,"click",4,"ngIf"],[1,"d-flex"],["type","button","class","btn btn-success shadow-sm rounded me-3",3,"click",4,"ngIf"],["type","button",1,"btn","btn-success","shadow-sm","rounded","me-3",3,"click"],[1,"fas","fa-chevron-circle-up"],["table","inventory",3,"data","channel","showProductToggle","filter","onToggle","onSubmit"],[2,"cursor","pointer",3,"click"],["title","Retreive rows count",1,"border","p-3"],["role","button","title","Load more for 20 products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-arrow-right"],["role","button","title","Load all products",1,"btn","btn-outline-secondary","btn-sm","text-primary","border-start-0",3,"click"],[1,"fas","fa-share"]],template:function(n,o){n&1&&(u(0,tt,32,23,"mainpanel",0),C(1,"async")),n&2&&s("ngIf",x(1,1,o.loader$))},dependencies:[U,K,Z,Y,J,te,ae,X,j,z],styles:[".no-bullet[_ngcontent-%COMP%]{list-style-type:none}"]});let i=a;return i})();function nt(i,a){if(i&1){let e=S();l(0,"button",39),g("click",function(){d(e);let n=c().ngIf,o=c(2);return _(o.updateStock(n))}),v(1,"i",40),m(2," Update"),p()}}function it(i,a){if(i&1&&(l(0,"div"),u(1,nt,3,0,"button",38),p()),i&2){let e=a.ngIf,t=c(2);r(1),s("ngIf",t.productService.hasSelectionVariant(e))}}function at(i,a){if(i&1&&(l(0,"span",41),v(1,"img",42),p(),m(2)),i&2){let e=a.item;r(1),s("src",e==null?null:e.Img,k),r(1),w(" ",e.Name," ")}}function ot(i,a){i&1&&(l(0,"div",43)(1,"span"),m(2," showing only different stock, please press next to populate more data "),p()())}function lt(i,a){if(i&1){let e=S();l(0,"th")(1,"input",44),g("ngModelChange",function(n){d(e);let o=c(2);return _(o.checkboxState=n)})("ngModelChange",function(){let o=d(e).ngIf,h=c(2);return _(h.onCheckboxStateChange(o))}),p()()}if(i&2){let e=c(2);r(1),s("ngModel",e.checkboxState)}}function rt(i,a){i&1&&(b(0),l(1,"th",45),m(2," Reserved "),p(),I())}function pt(i,a){if(i&1){let e=S();b(0),l(1,"input",61),g("ngModelChange",function(n){d(e);let o=c(3).$implicit;return _(o.selected=n)})("ngModelChange",function(){d(e);let n=c(3).$implicit,o=c(2);return _(o.onCheckboxStateProduct(n))}),p(),I()}if(i&2){let e=c(3).$implicit;r(1),s("ngModel",e.selected)}}function st(i,a){if(i&1){let e=S();b(0),l(1,"img",62),g("click",function(n){d(e);let o=c(3).$implicit,h=c(2);return _(h.onZoomImage(n,o==null?null:o.ImageUrl))}),p(),I()}if(i&2){let e=c(3).$implicit;r(1),se("src",e==null?null:e.ThumbnailUrl,k)}}function ct(i,a){i&1&&v(0,"img",63)}function mt(i,a){if(i&1&&(b(0),v(1,"br"),l(2,"div",64),v(3,"i",65),l(4,"small"),m(5),p()(),I()),i&2){let e=c(3).$implicit;r(5),w("(",e==null?null:e.Category,")")}}var dt=i=>({"ms-10":i});function _t(i,a){if(i&1&&(b(0),l(1,"td",57)(2,"div",13),u(3,pt,2,1,"ng-container",3),l(4,"div",49),u(5,st,2,1,"ng-container",51)(6,ct,1,0,"ng-template",null,58,R),p()()(),l(8,"td",59)(9,"span",60),m(10),p(),u(11,mt,6,1,"ng-container",3),p(),I()),i&2){let e=F(7),t=c(2).$implicit,n=c(2);r(1),s("rowSpan",t==null?null:t.Variants.length),r(2),s("ngIf",t.Variants.length>1),r(1),s("ngClass",L(8,dt,t.Variants.length<=1)),r(1),s("ngIf",t==null?null:t.ThumbnailUrl)("ngIfElse",e),r(3),s("rowSpan",t==null?null:t.Variants.length),r(2),E(t==null?null:t.Name),r(1),s("ngIf",t.CategoryID!==null&&t.CategoryID!=n.guidEmpty)}}function ut(i,a){if(i&1){let e=S();b(0),l(1,"input",44),g("ngModelChange",function(n){d(e);let o=c(2).$implicit;return _(o.selected=n)}),p(),I()}if(i&2){let e=c(2).$implicit;r(1),s("ngModel",e.selected)}}function gt(i,a){if(i&1&&(b(0),u(1,ut,2,1,"ng-container",3),I()),i&2){let e=c().$implicit;r(1),s("ngIf",(e==null?null:e.Inventory)<=1e5)}}function ht(i,a){if(i&1){let e=S();l(0,"input",44),g("ngModelChange",function(n){d(e);let o=c(2).$implicit;return _(o.selected=n)}),p()}if(i&2){let e=c(2).$implicit;s("ngModel",e.selected)}}function Ct(i,a){if(i&1&&u(0,ht,1,1,"input",66),i&2){let e=c().$implicit;s("ngIf",(e==null?null:e.Inventory)>=0)}}function ft(i,a){i&1&&(l(0,"div",67),m(1,"Not Found"),p())}function xt(i,a){if(i&1&&(l(0,"div")(1,"span",68),m(2),C(3,"number"),p(),m(4," => "),l(5,"span",69),m(6),C(7,"number"),p()()),i&2){let e=c().$implicit;r(2),w(" ",x(3,2,e==null||e.I==null?null:e.I.Available),""),r(4),E(x(7,4,e==null?null:e.Inventory))}}function vt(i,a){if(i&1&&(l(0,"div"),m(1),C(2,"number"),p()),i&2){let e=c().$implicit;r(1),w(" ",x(2,1,e==null?null:e.Inventory)," ")}}function St(i,a){if(i&1&&(b(0),l(1,"div",70)(2,"a",71),v(3,"i",72),p()(),I()),i&2){let e=c().$implicit,t=c(3);r(2),s("href",t.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(e==null?null:e.ID),k)}}var yt=i=>({"bg-gradient-warning":i});function bt(i,a){if(i&1){let e=S();l(0,"td",73)(1,"div",48)(2,"div")(3,"span",74),g("click",function(){d(e);let n=c().$implicit,o=c(),h=o.$implicit,f=o.ngForOf,T=c(2);return _(T.openTableDialog(h,n,f))}),m(4),C(5,"number"),p()(),l(6,"div",70)(7,"a",71),v(8,"i",72),p()(),l(9,"div",70)(10,"span",75),g("click",function(){d(e);let n=c().$implicit,o=c(3);return _(o.refreshInventory(n==null||n.Channel[0]==null?null:n.Channel[0].ChannelItemID,n==null||n.Channel[0]==null?null:n.Channel[0].ChannelVariationID,n==null||n.Channel[0]==null?null:n.Channel[0].ChannelID,n==null?null:n.ID))}),v(11,"i",76),p()()()()}if(i&2){let e=c().$implicit;s("ngClass",L(5,yt,(e==null?null:e.Inventory)!=(e==null||e.Channel[0]==null?null:e.Channel[0].Inventory))),r(4),w(" ",x(5,3,e==null||e.Channel[0]==null?null:e.Channel[0].Inventory)," "),r(3),s("href",e==null||e.Channel[0]==null?null:e.Channel[0].Url,k)}}function It(i,a){if(i&1&&(b(0),l(1,"span",79),m(2),C(3,"number"),p(),I()),i&2){let e=c(2).$implicit;r(2),w(" (",x(3,1,e==null||e.Channel[0]==null?null:e.Channel[0].InventoryReserved),") ")}}function wt(i,a){i&1&&m(0," - ")}function Tt(i,a){if(i&1&&(b(0),l(1,"td",77),u(2,It,4,3,"ng-container",51)(3,wt,1,0,"ng-template",null,78,R),p(),I()),i&2){let e=F(4),t=c().$implicit;r(2),s("ngIf",t==null||t.Channel[0]==null?null:t.Channel[0].InventoryReserved)("ngIfElse",e)}}function Mt(i,a){i&1&&(b(0),m(1," - "),I())}function Et(i,a){if(i&1&&(l(0,"span",80),C(1,"date"),m(2),C(3,"date"),p()),i&2){let e=c().$implicit;s("matTooltip",O(1,2,e==null||e.Channel[0]==null?null:e.Channel[0].LastInventorySync,"dd MMMM yyyy HH:mm:ss")),r(2),w(" ",O(3,5,e==null||e.Channel[0]==null?null:e.Channel[0].LastInventorySync,"dd MMM yy HH:mm")," ")}}var Vt=i=>({"text-decoration-line-through":i});function Dt(i,a){if(i&1&&(l(0,"tr"),u(1,_t,12,10,"ng-container",3),l(2,"td",46),m(3),p(),l(4,"td",47)(5,"div",48)(6,"span",49),m(7),p()()(),l(8,"td",50),u(9,gt,2,1,"ng-container",51)(10,Ct,1,1,"ng-template",null,52,R),p(),l(12,"td")(13,"div",48),u(14,ft,2,0,"div",53)(15,xt,8,6,"div",3)(16,vt,3,3,"div",3)(17,St,4,1,"ng-container",3),p()(),u(18,bt,12,7,"td",54)(19,Tt,5,2,"ng-container",3),l(20,"td",55),u(21,Mt,2,0,"ng-container",51)(22,Et,4,8,"ng-template",null,56,R),p()()),i&2){let e=a.$implicit,t=a.index,n=F(11),o=F(23),h=c(3);r(1),s("ngIf",t==0),r(2),E(e==null?null:e.Model),r(1),s("matTooltip",e.isDiscontinued?h.discontinuedVariantMsg:""),r(2),s("ngClass",L(15,Vt,e.isDiscontinued)),r(1),E(e==null?null:e.Code),r(2),s("ngIf",(e==null?null:e.Channel[0].TypeID)==1)("ngIfElse",n),r(5),s("ngIf",(e==null?null:e.I)==null),r(1),s("ngIf",(e==null?null:e.I)!=null&&(e==null?null:e.Inventory)!=(e==null||e.I==null?null:e.I.Available)),r(1),s("ngIf",(e==null?null:e.I)!=null&&(e==null?null:e.Inventory)==(e==null||e.I==null?null:e.I.Available)),r(1),s("ngIf",(e==null?null:e.I)!=null),r(1),s("ngIf",e==null?null:e.Channel),r(1),s("ngIf",h.isShowReservedColumn),r(2),s("ngIf",(e==null||e.Channel[0]==null?null:e.Channel[0].LastInventorySync)==h.minDate)("ngIfElse",o)}}function Pt(i,a){if(i&1&&(l(0,"tbody"),u(1,Dt,24,17,"tr",32),p()),i&2){let e=a.$implicit;r(1),s("ngForOf",e.Variants)}}function kt(i,a){if(i&1){let e=S();l(0,"span",81),g("click",function(){d(e);let n=c(2);return _(n.getRowCount())}),l(1,"i",82),m(2,"?"),p()()}}function Nt(i,a){if(i&1&&(l(0,"span"),m(1),C(2,"number"),p()),i&2){let e=a.ngIf;r(1),E(x(2,1,e==null?null:e.Total))}}function Ft(i,a){if(i&1){let e=S();l(0,"a",86),g("click",function(){d(e);let n=c(3);return _(n.onNextPage())}),v(1,"i",87),m(2," Next"),p()}}function Rt(i,a){if(i&1){let e=S();l(0,"a",88),g("click",function(){d(e);let n=c(3);return _(n.onLastPage())}),v(1,"i",89),m(2," Last"),p()}}function $t(i,a){if(i&1&&(l(0,"div",83),u(1,Ft,3,0,"a",84)(2,Rt,3,0,"a",85),p()),i&2){let e=c(2);r(1),s("ngIf",e.paginationService.disableNextButton&&!e.paginationService.goToLastPage),r(1),s("ngIf",e.paginationService.disableNextButton&&!e.paginationService.goToLastPage)}}function At(i,a){if(i&1){let e=S();l(0,"mainpanel",1),g("onSubmit",function(n){d(e);let o=c();return _(o.onSearch(n))}),l(1,"actions")(2,"div",2),u(3,it,2,1,"div",3),C(4,"async"),p()(),l(5,"filters")(6,"div")(7,"label",4),m(8,"Channel"),p(),l(9,"ng-select",5),g("ngModelChange",function(n){d(e);let o=c();return _(o.searchFilter.ChannelID=n)}),u(10,at,3,2,"ng-template",6),p()(),l(11,"div",7)(12,"label",8),m(13,"PageNumber"),p(),l(14,"input",9),g("ngModelChange",function(n){d(e);let o=c();return _(o.searchFilter.PageNumber=n)}),p()(),l(15,"div",7)(16,"label",10),m(17,"Page Size"),p(),l(18,"input",11),g("ngModelChange",function(n){d(e);let o=c();return _(o.searchFilter.RowCount=n)}),p()(),l(19,"div",7)(20,"label",12),m(21,"Quantity From - To"),p(),l(22,"div",13)(23,"input",14),g("ngModelChange",function(n){d(e);let o=c();return _(o.searchFilter.QuantityFrom=n)}),p(),m(24," - "),l(25,"input",15),g("ngModelChange",function(n){d(e);let o=c();return _(o.searchFilter.QuantityTo=n)}),p()()()(),l(26,"content")(27,"div",16)(28,"div",17)(29,"div",18),u(30,ot,3,0,"div",19),l(31,"table",20)(32,"thead",21)(33,"tr")(34,"th",22),m(35,"Product "),v(36,"br"),l(37,"mat-slide-toggle",23),g("toggleChange",function(){d(e);let n=c();return n.showDifferenceStock=!n.showDifferenceStock,_(n.onShowDifferenceStock())}),l(38,"small",12),m(39,"FILTER DIFFERENT INVENTORY"),p()()(),l(40,"th",24),m(41,"Variant"),p(),l(42,"th",25),m(43,"SKU"),p(),u(44,lt,2,1,"th",3),C(45,"async"),l(46,"th",26),m(47,"POS"),p(),l(48,"th",27)(49,"div",28),g("click",function(){d(e);let n=c();return _(n.openModalFilter())}),v(50,"img",29),l(51,"span",30),m(52),C(53,"stringLimit"),p()()(),u(54,rt,3,0,"ng-container",3),l(55,"th",31),m(56,"Last Sync"),p()()(),u(57,Pt,2,1,"tbody",32),C(58,"async"),p(),l(59,"div",33)(60,"div",34)(61,"div",35),m(62),C(63,"number"),C(64,"async"),u(65,kt,3,0,"span",36)(66,Nt,3,3,"span",3),C(67,"async"),m(68),p()(),u(69,$t,3,2,"div",37),C(70,"async"),p()()()()()()}if(i&2){let e=c(),t,n;s("headerTitle","Inventory Comparison")("pageData",e.pageData)("hideSearchBox",!1),r(3),s("ngIf",x(4,24,e.paginationService.data$)),r(6),s("clearable",!1)("items",e.channelOptions)("ngModel",e.searchFilter.ChannelID),r(5),s("ngModel",e.searchFilter.PageNumber),r(4),s("ngModel",e.searchFilter.RowCount),r(5),s("ngModel",e.searchFilter.QuantityFrom),r(2),s("ngModel",e.searchFilter.QuantityTo),r(5),s("ngIf",(e.searchFilter==null?null:e.searchFilter.filterModel)==3),r(14),s("ngIf",x(45,26,e.paginationService.data$)),r(5),s("matTooltip",(e.selectedChannel==null||e.selectedChannel.Name==null?null:e.selectedChannel.Name.length)>13?e.selectedChannel==null?null:e.selectedChannel.Name:""),r(1),s("src",e.selectedChannel==null?null:e.selectedChannel.Img,k),r(2),ce(" ",O(53,28,e.selectedChannel==null?null:e.selectedChannel.Name,13),"",(e.selectedChannel==null||e.selectedChannel.Name==null?null:e.selectedChannel.Name.length)>13?"...":""," "),r(2),s("ngIf",e.isShowReservedColumn),r(3),s("ngForOf",x(58,31,e.products$)),r(5),w(" Showing 1 - ",x(63,33,(t=x(64,35,e.paginationService.data$))==null?null:t.length)," of "),r(3),s("ngIf",e.paginationService.hideCount),r(1),s("ngIf",x(67,37,!e.paginationService.hideCount&&e.rowCount$)),r(2),w(" records ~ ",e.paginationService.footerPageNumber," Page "),r(1),s("ngIf",((n=x(70,39,e.paginationService.data$))==null?null:n.length)>0)}}var Fe=(()=>{let a=class a{constructor(t,n,o,h,f,T,M,$e,Ae){this.http=t,this.toastr=n,this.dialog=o,this.paginationService=h,this.productService=f,this.authService=T,this.biggerPictureService=M,this.inventoryService=$e,this.mainPanelService=Ae,this.checkboxState=!1,this.showDifferenceStock=!1,this.loaderApi="/api/InventoryLoader/Load",this.rowCountApi="/api/Inventory/GetInventoryByChannelRowCount",this.minDate=V.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=V.GuidEMpty,this.Options=[{Key:1,Value:"All"},{Key:3,Value:"Difference"}],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.channelOptions=this.authService.getChannels(),this.hostName=this.authService.getDomain(),this.initPageLoader(),this.products$=this.paginationService.data$.pipe(pe(t=>(t=t.map(n=>(n.Variants&&(n.Variants=n.Variants.map(o=>(o.isDiscontinued=n.Discontinued=="Yes",o))),n)),t)),N(t=>{this.checkShowReservedColumn(t)}))}checkShowReservedColumn(t){let n=0,o;t.forEach(h=>{o=h.Variants.find(f=>V.IsNotEmpty(f?.Channel[0]?.InventoryReserved)),o&&(n+=1)}),this.isShowReservedColumn=n>0}initPageLoader(){this.paginationService.fetchDataEndpoint="Inventory/GetSingleChannelComparison",this.loader$=this.http.post(this.loaderApi,{}).pipe(N(t=>{if(this.searchFilter={RowCount:t.Filter.PageSize,filterModel:1,PageNumber:1,ChannelID:t.Filter.ChannelID},this.initSelectedChannel(),this.paginationService.reloadPagination(this.searchFilter),!t.Filter.IsMarketplaceAppActive){let n=`Automatic inventory sync disabled.
2
- Please enable Dealpos X Marketplace Apps integration in POS Configuration`;this.toastr.warning(n,"Warning")}}))}initSelectedChannel(){this.selectedChannel=this.channelOptions.find(t=>t.ID==this.searchFilter.ChannelID)}onSearch(t){this.searchFilter.text=t,this.paginationService.reloadPagination(this.searchFilter),this.initSelectedChannel()}openModalFilter(){this.mainPanelService.openModalFilter()}updateStock(t){let n=this.productService.selectedVariantProduct(t);if(n.length>0){let o=n.map(f=>({ID:f.ID,Code:f.Code,Inventory:f.Inventory})),h={ListChannelID:[this.searchFilter.ChannelID],List:o};this.http.post("/api/Inventory/UpdateChannel",h).subscribe(f=>{this.searchFilter.PageNumber=1,this.paginationService.reloadPagination(this.searchFilter),this.checkboxState=!1,this.handlingUpdateStock(f)})}}handlingUpdateStock(t){if(t[0]?.StatusProduct){let n=t[0].StatusProduct.Fail_list,o=t[0].StatusProduct.Success_list;this.inventoryService.showToastrUpdateInventory("Stock",o,n)}else this.toastr.error(t[0]?.Exception,"Error")}refreshInventory(t,n,o,h){let f={ChannelItemID:t,ChannelVariationID:n,ChannelID:o,VariantID:h};this.http.post("/api/Inventory/RefreshInventoryChannel",f).subscribe(T=>{this.toastr.success("Successfully updated","Success"),this.paginationService.reloadPagination(this.searchFilter)})}onCheckboxStateProduct(t){t.Variants=t.Variants.map(n=>(n.Inventory>=0&&(n.selected=t.selected),n))}onCheckboxStateChange(t){t=t.map(n=>(n.Variants=n.Variants.map(o=>(o.selected=this.checkboxState,o)),n))}openTableDialog(t,n,o){this.dialog.open(Ee,{data:{Name:t.Name,Variant:n,ChannelID:n?.Channel[0].ChannelID,Table:"inventory",ChannelItemID:t.ChannelItemID}}).afterClosed().pipe($(f=>V.IsNotEmpty(f))).subscribe(f=>{this.updateItemAfterDialog(f,o)})}updateItemAfterDialog(t,n){let o={ID:t.ChannelID,ChannelItemID:t.ChannelItemID,ChannelVariantID:t.ChannelVariationID,NewQuantity:parseFloat(t.Inventory),VariantID:t.ID,SKU:t.Sku};this.http.post("/api/Inventory/UpdateQuantityByItem",o).subscribe(h=>{this.searchFilter.PageNumber=1,this.paginationService.reloadPagination(this.searchFilter),this.handlingUpdateStock([h])})}onShowDifferenceStock(){this.showDifferenceStock?this.searchFilter.filterModel=D.DIFFERENCE:this.searchFilter.filterModel=D.ALL,this.paginationService.reloadPagination(this.searchFilter)}onNextPage(){this.paginationService.onNextPage(this.searchFilter)}getRowCount(){let t={ChannelID:this.searchFilter.ChannelID,PageNumber:1,text:this.searchFilter.text};this.paginationService.hideCount=!1,this.rowCount$=this.http.post(`${this.rowCountApi}`,t)}onLastPage(){let t={ChannelID:this.searchFilter.ChannelID,PageNumber:1};this.http.post(`${this.rowCountApi}`,t).subscribe({next:n=>{this.searchFilter.PageNumber=1,this.paginationService.getAllData(this.searchFilter,n.Total)}})}onZoomImage(t,n){this.biggerPictureService.openBiggerPicture(t,n)}ngOnDestroy(){this.paginationService.destroy()}};a.\u0275fac=function(n){return new(n||a)(y(H),y(q),y(ee),y(ie),y(ne),y(W),y(Te),y(oe),y(ye))},a.\u0275cmp=P({type:a,selectors:[["app-single-channel-comparison"]],decls:2,vars:3,consts:[["textButton","Search",3,"headerTitle","pageData","hideSearchBox","onSubmit",4,"ngIf"],["textButton","Search",3,"headerTitle","pageData","hideSearchBox","onSubmit"],[1,"d-flex"],[4,"ngIf"],["for","ng-select",1,"fw-bold"],["id","ng-select","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel","appendTo","body",1,"center-text","mt-3",3,"clearable","items","ngModel","ngModelChange"],["ng-option-tmp","","ng-label-tmp",""],[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,"ngModel","ngModelChange"],["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,"ngModel","ngModelChange"],[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,"ngModel","ngModelChange"],["type","number","name","QuantityTo",1,"w-25","ms-2","form-control","mt-2",3,"ngModel","ngModelChange"],[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"],[1,"table","border-bottom"],[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",1,"text-end","w-10",2,"width","8%"],[1,"text-end",2,"width","150px"],["role","button","matTooltipPosition","above",1,"d-inline-block",3,"matTooltip","click"],[2,"width","16px",3,"src"],[1,"ms-1"],[1,"text-center",2,"width","145px"],[4,"ngFor","ngForOf"],[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"],["class","btn-group",4,"ngIf"],["class","btn btn-success",3,"click",4,"ngIf"],[1,"btn","btn-success",3,"click"],[1,"fas","fa-chevron-circle-up"],[1,"me-2"],[2,"width","18px",3,"src"],["role","alert",1,"alert","alert-warning","d-flex","justify-content-between","text-dark"],["type","checkbox",3,"ngModel","ngModelChange"],["matTooltip","Reserved Stock","matTooltipPosition","above",1,"text-end",2,"width","80px"],[1,"text-start"],["matTooltipPosition","above",1,"text-end",3,"matTooltip"],[1,"d-flex","align-items-center","justify-content-end"],[3,"ngClass"],[1,"align-middle"],[4,"ngIf","ngIfElse"],["OTHER_CHANNEL",""],["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"],["SYNCDATE",""],[1,"text-start",2,"width","0%",3,"rowSpan"],["elsePic",""],[1,"text-start",3,"rowSpan"],[1,"item-name","mb-0"],["type","checkbox",1,"me-3",3,"ngModel","ngModelChange"],[1,"border","rounded","w-img","cursor-pointer",2,"margin-left","20px",3,"src","click"],["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,"d-flex","align-items-center"],["title","Category",1,"fa-solid","fa-tags","me-2",2,"opacity","60%"],["type","checkbox",3,"ngModel","ngModelChange",4,"ngIf"],["matTooltip","This product is no longer available in POS","matTooltipPosition","above",1,"text-danger"],["title","Allocated"],["title","Inventory below minimum inventory"],[1,"ms-3"],["target","_blank",3,"href"],[1,"fas","fa-lg","fa-external-link-alt","external-link-custom"],[1,"text-end",3,"ngClass"],[1,"cursor",3,"click"],["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"],[1,"text-end"],["EMPTY_RESERVED",""],[1,"text-danger"],["matTooltipShowDelay","500",3,"matTooltip"],[2,"cursor","pointer",3,"click"],["title","Retreive rows count",1,"border","p-3"],[1,"btn-group"],["role","button","class","btn btn-outline-secondary btn-sm text-primary","title","Load more for 20 products",3,"click",4,"ngIf"],["role","button","class","btn btn-outline-secondary btn-sm text-primary border-start-0","title","Load all products",3,"click",4,"ngIf"],["role","button","title","Load more for 20 products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-arrow-right"],["role","button","title","Load all products",1,"btn","btn-outline-secondary","btn-sm","text-primary","border-start-0",3,"click"],[1,"fas","fa-share"]],template:function(n,o){n&1&&(u(0,At,71,41,"mainpanel",0),C(1,"async")),n&2&&s("ngIf",x(1,1,o.loader$))},dependencies:[me,de,U,K,Z,ge,Y,J,xe,Ce,fe,Ve,te,X,j,z,_e,Pe],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}"]});let i=a;return i})();var Bt=[{path:"",component:ke,children:[{path:"",redirectTo:"bychannel",pathMatch:"full"},{path:"pos",component:Ne,canActivate:[re],data:{title:"Inventory Comparison"}},{path:"bychannel",component:Fe,canActivate:[re],data:{title:"Inventory Comparison"}}]}],Re=(()=>{let a=class a{};a.\u0275fac=function(n){return new(n||a)},a.\u0275mod=B({type:a}),a.\u0275inj=A({imports:[Q,G.forChild(Bt)]});let i=a;return i})();var kn=(()=>{let a=class a{};a.\u0275fac=function(n){return new(n||a)},a.\u0275mod=B({type:a}),a.\u0275inj=A({providers:[oe],imports:[Q,Re,G,we,he,ve,De,be,ae,Se]});let i=a;return i})();export{kn as InventoryModule};
@@ -1 +0,0 @@
1
- import{a as ce}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.11.0/Marketplace/chunk-K2GHGVP5.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.11.0/Marketplace/chunk-H75UAMG2.js";import{c as xe}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.11.0/Marketplace/chunk-4V5T5AGK.js";import{c as be}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.11.0/Marketplace/chunk-AD5UMGB7.js";import{b as Me}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.11.0/Marketplace/chunk-YCAHOBTV.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.11.0/Marketplace/chunk-NBRMZAKJ.js";import{b as Ee}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.11.0/Marketplace/chunk-CXVHMJKM.js";import{a as C}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.11.0/Marketplace/chunk-47CCMQZH.js";import{c as Oe}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.11.0/Marketplace/chunk-U4LOMDYT.js";import{h as Ce}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.11.0/Marketplace/chunk-N5F5D3WX.js";import{e as me}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.11.0/Marketplace/chunk-2IRZVYEG.js";import{a as p}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.11.0/Marketplace/chunk-IG45JJJB.js";import{a as ee,b as ae,k as le}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.11.0/Marketplace/chunk-G7FQBJ7U.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.11.0/Marketplace/chunk-7B2VFEDY.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.11.0/Marketplace/chunk-C4SBGOAO.js";import{A as _e,D as ve,a as de,q as he,r as k,x as ue}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.11.0/Marketplace/chunk-3K7JH744.js";import{E as fe,J as z,t as pe,w as ge}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.11.0/Marketplace/chunk-NRSNSW7E.js";import{u as oe}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.11.0/Marketplace/chunk-YUB56KZH.js";import{e as re,f as se}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.11.0/Marketplace/chunk-GWNC6QPV.js";import{$a as s,Aa as H,Ac as L,Ca as V,Ea as G,Fb as B,Ga as r,Gb as R,Ha as d,Ma as W,Oa as q,Ob as I,Qa as m,Sa as M,Ta as w,Vb as y,Wa as u,Yb as Z,_b as Y,aa as f,ab as l,ac as Q,bb as _,bc as X,cb as x,da as D,db as O,ea as $,ec as J,fa as h,fc as K,ga as j,ic as P,jb as N,lb as c,q as U,qb as E,rb as g,sb as A,tb as b,wa as F,wc as te,yc as ie,zc as ne}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.11.0/Marketplace/chunk-5MULKC5W.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.11.0/Marketplace/chunk-6REOMLA7.js";var S=class{constructor(){this.menus=[{Icon:"fa-solid fa-chart-pie",Title:"Dashboard",Url:"/menu/dashboard",Roles:[C.dashboardView]},{Icon:"fas fa-tag",Title:"Products",Url:"/menu/products",Roles:[]},{Icon:"fas fa-archive",Title:"Inventory",Url:"/menu/inventory",Roles:[]},{Icon:"fas fa-money-bill-alt",Title:"Price",Url:"/menu/price",Roles:[]},{Icon:"fas fa-shopping-cart",Title:"Order",Url:"/menu/Order",Roles:[C.orderView]},{Icon:"fas fa-clipboard-list",Title:"Sync Log",Url:"/menu/sync-log",Roles:[C.orderView]},{Icon:"fas fa-dolly",Title:"Logistic",Url:"/menu/Logistic",Roles:[]},{Icon:"fas fa-cog",Title:"Channel",Url:"/menu/channel",Roles:[C.channelView]},{Icon:"fas fa-file-alt",Title:"Logs",Url:"/menu/log",Roles:[]},{Icon:"fas fa-bell",Title:"Notification",Url:"/menu/notification",Badge:!0,Roles:[]},{Icon:"fas fa-wand-magic-sparkles",Title:"What`s New",Url:`https://changelog.dealpos.com/?categories=cat_nILYcoEQzgGWX&view=complete&v=${ae.version}`,ExternalLink:!0,CustomColor:"#ff2323",Badge:!0,Roles:[]}]}get getMenu(){return this.menus}};var we=0,Ie="mat-badge-content",ye=(()=>{let i=class i{get color(){return this._color}set color(t){this._setColor(t),this._color=t}get content(){return this._content}set content(t){this._updateRenderedContent(t)}get description(){return this._description}set description(t){this._updateDescription(t)}constructor(t,n,o,v,De){this._ngZone=t,this._elementRef=n,this._ariaDescriber=o,this._renderer=v,this._animationMode=De,this._color="primary",this.overlap=!0,this.position="above after",this.size="medium",this._id=we++,this._isInitialized=!1,this._interactivityChecker=D(ge),this._document=D(Z)}isAbove(){return this.position.indexOf("below")===-1}isAfter(){return this.position.indexOf("before")===-1}getBadgeElement(){return this._badgeElement}ngOnInit(){this._clearExistingBadges(),this.content&&!this._badgeElement&&(this._badgeElement=this._createBadgeElement(),this._updateRenderedContent(this.content)),this._isInitialized=!0}ngOnDestroy(){this._renderer.destroyNode&&(this._renderer.destroyNode(this._badgeElement),this._inlineBadgeDescription?.remove()),this._ariaDescriber.removeDescription(this._elementRef.nativeElement,this.description)}_isHostInteractive(){return this._interactivityChecker.isFocusable(this._elementRef.nativeElement,{ignoreVisibility:!0})}_createBadgeElement(){let t=this._renderer.createElement("span"),n="mat-badge-active";return t.setAttribute("id",`mat-badge-content-${this._id}`),t.setAttribute("aria-hidden","true"),t.classList.add(Ie),this._animationMode==="NoopAnimations"&&t.classList.add("_mat-animation-noopable"),this._elementRef.nativeElement.appendChild(t),typeof requestAnimationFrame=="function"&&this._animationMode!=="NoopAnimations"?this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>{t.classList.add(n)})}):t.classList.add(n),t}_updateRenderedContent(t){let n=`${t??""}`.trim();this._isInitialized&&n&&!this._badgeElement&&(this._badgeElement=this._createBadgeElement()),this._badgeElement&&(this._badgeElement.textContent=n),this._content=n}_updateDescription(t){this._ariaDescriber.removeDescription(this._elementRef.nativeElement,this.description),(!t||this._isHostInteractive())&&this._removeInlineDescription(),this._description=t,this._isHostInteractive()?this._ariaDescriber.describe(this._elementRef.nativeElement,t):this._updateInlineDescription()}_updateInlineDescription(){this._inlineBadgeDescription||(this._inlineBadgeDescription=this._document.createElement("span"),this._inlineBadgeDescription.classList.add("cdk-visually-hidden")),this._inlineBadgeDescription.textContent=this.description,this._badgeElement?.appendChild(this._inlineBadgeDescription)}_removeInlineDescription(){this._inlineBadgeDescription?.remove(),this._inlineBadgeDescription=void 0}_setColor(t){let n=this._elementRef.nativeElement.classList;n.remove(`mat-badge-${this._color}`),t&&n.add(`mat-badge-${t}`)}_clearExistingBadges(){let t=this._elementRef.nativeElement.querySelectorAll(`:scope > .${Ie}`);for(let n of Array.from(t))n!==this._badgeElement&&n.remove()}};i.\u0275fac=function(n){return new(n||i)(d(W),d(V),d(pe),d(G),d(F,8))},i.\u0275dir=j({type:i,selectors:[["","matBadge",""]],hostAttrs:[1,"mat-badge"],hostVars:20,hostBindings:function(n,o){n&2&&M("mat-badge-overlap",o.overlap)("mat-badge-above",o.isAbove())("mat-badge-below",!o.isAbove())("mat-badge-before",!o.isAfter())("mat-badge-after",o.isAfter())("mat-badge-small",o.size==="small")("mat-badge-medium",o.size==="medium")("mat-badge-large",o.size==="large")("mat-badge-hidden",o.hidden||!o.content)("mat-badge-disabled",o.disabled)},inputs:{color:["matBadgeColor","color"],overlap:["matBadgeOverlap","overlap",y],disabled:["matBadgeDisabled","disabled",y],position:["matBadgePosition","position"],content:["matBadge","content"],description:["matBadgeDescription","description"],size:["matBadgeSize","size"],hidden:["matBadgeHidden","hidden",y]},features:[q]});let e=i;return e})(),Pe=(()=>{let i=class i{};i.\u0275fac=function(n){return new(n||i)},i.\u0275mod=h({type:i}),i.\u0275inj=f({imports:[fe,z,z]});let e=i;return e})();function Ae(e,i){if(e&1&&(x(0),s(1,"p",22),g(2),l(),O()),e&2){let a=c(3).$implicit;r(2),A(a.Title)}}function Be(e,i){if(e&1&&(s(0,"p"),g(1),l()),e&2){let a=c(3).$implicit;r(1),b("",a.Title," ")}}function Re(e,i){if(e&1&&(s(0,"a",20),_(1,"i"),u(2,Ae,3,1,"ng-container",17)(3,Be,2,1,"ng-template",null,21,I),l()),e&2){let a=E(4),t=c(2).$implicit;m("href",t.Url,H),r(1),w(t.Icon),r(1),m("ngIf",t.Badge)("ngIfElse",a)}}function Le(e,i){if(e&1&&(x(0),u(1,Re,5,5,"a",19),O()),e&2){let a=c().$implicit;r(1),m("ngxPermissionsOnly",a.Roles)}}function ze(e,i){if(e&1&&(x(0),s(1,"p",26),B(2,"async"),g(3),l(),O()),e&2){let a=c(3).$implicit,t=c();r(1),m("matBadgeHidden",R(2,2,t.notifications$)==0),r(2),A(a.Title)}}function Ue(e,i){if(e&1&&(s(0,"p"),g(1),l()),e&2){let a=c(3).$implicit;r(1),b("",a.Title," ")}}function $e(e,i){if(e&1&&(s(0,"a",24),_(1,"i"),u(2,ze,4,4,"ng-container",17)(3,Ue,2,1,"ng-template",null,25,I),l()),e&2){let a=E(4),t=c(2).$implicit,n=c();m("matTooltip",n.isCollapseSidebar?t.Title:"")("routerLink",t.Url),r(1),w(t.Icon),r(1),m("ngIf",t.Badge)("ngIfElse",a)}}function je(e,i){if(e&1&&u(0,$e,5,6,"a",23),e&2){let a=c().$implicit;m("ngxPermissionsOnly",a.Roles)}}function Fe(e,i){if(e&1&&(s(0,"li",16),u(1,Le,2,1,"ng-container",17)(2,je,1,1,"ng-template",null,18,I),l()),e&2){let a=i.$implicit,t=E(3);r(1),m("ngIf",a.ExternalLink)("ngIfElse",t)}}var ke=(()=>{let i=class i{constructor(t,n,o,v){this.toggleSidebarService=t,this.notificationService=n,this.decodeTokenService=o,this.authService=v,this.Menu={},this.isCollapseSidebar=!1,this.token=o.getParseToken(),this.storeName=this.token.StoreName,this.Menu=new S().getMenu,this.toggleState$=this.toggleSidebarService.toggleState$}ngOnInit(){this.initNotifications()}initNotifications(){this.notifications$=this.notificationService.getNotification().pipe(U(t=>t.length))}onLogout(){this.authService.logout()}onCallapseSidebar(){this.isCollapseSidebar=!this.isCollapseSidebar,this.storeName=this.token.StoreName,this.isCollapseSidebar&&(this.storeName=this.getInitialTitle(this.token.StoreName))}getInitialTitle(t){if(t){let n,o=t.split(" ");return o.length==1?n=o[0].substring(0,2):n=o.shift().charAt(0)+o.pop().charAt(0),n}}};i.\u0275fac=function(n){return new(n||i)(d(de),d(ce),d(ee),d(le))},i.\u0275cmp=$({type:i,selectors:[["app-menu"]],decls:23,vars:9,consts:[[1,"wrapper"],["data-color","green",1,"sidebar",3,"ngClass"],[1,"btn-minimize","d-md-block","d-none","p-0","border-0","bg-white",3,"click"],[1,"fas","cursor",3,"ngClass"],[1,"logo"],[1,"navbar","dropdown","bg-transparent","border-0"],["data-bs-toggle","dropdown","aria-expanded","false",1,"simple-text","text-start","dropdown-toggle","d-flex","align-items-center","justify-content-center","cursor-pointer"],[1,"dropdown-menu"],[1,"dropdown-header","text-dark","border-bottom"],[1,"divider","m-0"],[1,"dropdown-item","h5",2,"cursor","pointer",3,"click"],["aria-hidden","true",1,"fas","fa-sign-out-alt"],[1,"sidebar-wrapper"],[1,"nav"],["routerLinkActive","active",4,"ngFor","ngForOf"],[1,"main-panel"],["routerLinkActive","active"],[4,"ngIf","ngIfElse"],["DEFAULT_ROUTE",""],["class","nav-link position-relative d-block changelog","target","_blank",3,"href",4,"ngxPermissionsOnly"],["target","_blank",1,"nav-link","position-relative","d-block","changelog",3,"href"],["NO_BADGE",""],["matBadge","!","matBadgeColor","warn","matBadgeSize","small",1,"shake-animation"],["class","nav-link position-relative d-block","matTooltipPosition","right",3,"matTooltip","routerLink",4,"ngxPermissionsOnly"],["matTooltipPosition","right",1,"nav-link","position-relative","d-block",3,"matTooltip","routerLink"],["WITHOUT_BADGE",""],["matBadge","!","matBadgeColor","warn","matBadgeSize","small",1,"shake-animation",3,"matBadgeHidden"]],template:function(n,o){n&1&&(s(0,"div",0),B(1,"async"),s(2,"div",1)(3,"button",2),N("click",function(){return o.onCallapseSidebar()}),_(4,"i",3),l(),s(5,"div",4)(6,"div",5)(7,"a",6),g(8),l(),s(9,"div",7)(10,"div",8),g(11),l(),_(12,"div",9),s(13,"a",10),N("click",function(){return o.onLogout()}),_(14,"i",11),g(15,"\xA0 "),s(16,"span"),g(17," Log Out"),l()()()()(),s(18,"div",12)(19,"ul",13),u(20,Fe,4,2,"li",14),l()()(),s(21,"div",15),_(22,"router-outlet"),l()()),n&2&&(M("nav-open",R(1,7,o.toggleState$)),r(2),m("ngClass",o.isCollapseSidebar?"collapses":""),r(2),m("ngClass",o.isCollapseSidebar?"fa-angle-left":"fa-angle-right"),r(4),b(" ",o.storeName," "),r(3),b("",o.token==null?null:o.token.LID," "),r(9),m("ngForOf",o.Menu))},dependencies:[Y,Q,X,te,ie,ne,he,ye,re,J],styles:["@media (max-width: 468px){.navbar[_ngcontent-%COMP%] .navbar-brand[_ngcontent-%COMP%]{white-space:nowrap;max-width:7em;overflow:hidden;text-overflow:ellipsis}}@media only screen and (min-width: 992px){.sidebar[_ngcontent-%COMP%]{z-index:1050!important;transition:all .3s}.sidebar[_ngcontent-%COMP%] .sidebar-wrapper[_ngcontent-%COMP%]{transition:all .3s}.sidebar[_ngcontent-%COMP%] + .main-panel[_ngcontent-%COMP%]{transition:all .3s}.sidebar[_ngcontent-%COMP%] + .main-panel[_ngcontent-%COMP%] .navbar.fixed-top[_ngcontent-%COMP%]{transition:all .3s}.sidebar.collapses[_ngcontent-%COMP%], .sidebar.collapses[_ngcontent-%COMP%] .sidebar-wrapper[_ngcontent-%COMP%]{width:70px;transition:all .3s}.sidebar.collapses[_ngcontent-%COMP%] .logo[_ngcontent-%COMP%] .simple-text[_ngcontent-%COMP%]{background-color:#ffffff3b;border-radius:20px;height:40px;width:40px}.sidebar.collapses[_ngcontent-%COMP%] .nav[_ngcontent-%COMP%] li[_ngcontent-%COMP%] .nav-link[_ngcontent-%COMP%]{padding:10px 0 10px 10px!important;height:50px;text-align:center;margin:10px}.sidebar.collapses[_ngcontent-%COMP%] .nav[_ngcontent-%COMP%] li[_ngcontent-%COMP%] .nav-link[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{display:none}.sidebar.collapses[_ngcontent-%COMP%] + .main-panel[_ngcontent-%COMP%]{padding-left:70px}.sidebar.collapses[_ngcontent-%COMP%] + .main-panel[_ngcontent-%COMP%] .navbar.fixed-top[_ngcontent-%COMP%]{left:70px!important;transition:all .3s}.sidebar[_ngcontent-%COMP%] .btn-minimize[_ngcontent-%COMP%]{position:absolute;top:17px;right:-20px;z-index:7;-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg);border-radius:50%;box-shadow:0 0 0 1px #091e4214,0 2px 4px 1px #091e4214;color:#000;cursor:pointer;height:24px;opacity:0;outline:0;width:24px;-webkit-transform-origin:7px;-ms-transform-origin:7px;transform-origin:7px;transition:opacity .5s;-webkit-transition:opacity .5s}.sidebar[_ngcontent-%COMP%] .btn-minimize[_ngcontent-%COMP%]:hover{color:#2996cc}.sidebar[_ngcontent-%COMP%]:hover .btn-minimize[_ngcontent-%COMP%]{opacity:1;background-color:#fff;position:absolute;top:17px;right:-20px;z-index:7;-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg);border:0;border-radius:50%;box-shadow:0 0 0 1px #091e4214,0 2px 4px 1px #091e4214;color:#000;cursor:pointer;height:24px;opacity:0;outline:0;padding:0;width:24px;-webkit-transform-origin:7px;-ms-transform-origin:7px;transform-origin:7px;transition:opacity .5s;-webkit-transition:opacity .5s}.sidebar[_ngcontent-%COMP%]:hover .btn-minimize[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{cursor:pointer}.sidebar[_ngcontent-%COMP%]:hover .btn-minimize[_ngcontent-%COMP%]:hover{color:#2996cc}.sidebar[_ngcontent-%COMP%]:hover:hover .btn-minimize[_ngcontent-%COMP%]{opacity:1}.full-container[_ngcontent-%COMP%]{padding-top:0!important}} p.shake-animation.mat-badge>span.mat-badge-content{animation:_ngcontent-%COMP%_shake-animation 4.72s ease infinite;font-size:12px;transform-origin:50% 50%;right:-14px!important}@keyframes _ngcontent-%COMP%_shake-animation{0%{transform:translate(0)}1.78571%{transform:translate(5px)}3.57143%{transform:translate(0)}5.35714%{transform:translate(5px)}7.14286%{transform:translate(0)}8.92857%{transform:translate(5px)}10.71429%{transform:translate(0)}to{transform:translate(0)}} .changelog:visited p.shake-animation.mat-badge>span.mat-badge-content{color:#77c425;background-color:#77c425;z-index:-1}@media print{.main-panel[_ngcontent-%COMP%]{padding:0!important}}"]});let e=i;return e})();var He=[{path:"",component:ke,children:[{path:"",redirectTo:"dashboard",pathMatch:"full"},{path:"dashboard",loadChildren:()=>import("https://cdn.jsdelivr.net/npm/marketplacepos@3.11.0/Marketplace/chunk-7HACTWDN.js").then(e=>e.DashboardModule),canActivate:[p],data:{title:"Dashboard"}},{path:"products",loadChildren:()=>import("https://cdn.jsdelivr.net/npm/marketplacepos@3.11.0/Marketplace/chunk-THJQFZAV.js").then(e=>e.ProductModule),canActivate:[p],data:{title:"Products"}},{path:"inventory",loadChildren:()=>import("https://cdn.jsdelivr.net/npm/marketplacepos@3.11.0/Marketplace/chunk-DOT2ZIUM.js").then(e=>e.InventoryModule),canActivate:[p],data:{title:"Inventory"}},{path:"price",loadChildren:()=>import("https://cdn.jsdelivr.net/npm/marketplacepos@3.11.0/Marketplace/chunk-X3JG2SZJ.js").then(e=>e.PriceModule),canActivate:[p],data:{title:"Price"}},{path:"Order",loadChildren:()=>import("https://cdn.jsdelivr.net/npm/marketplacepos@3.11.0/Marketplace/chunk-WUTBJIZ3.js").then(e=>e.OrdersModule),canActivate:[p],data:{title:"Order"}},{path:"sync-log",loadChildren:()=>import("https://cdn.jsdelivr.net/npm/marketplacepos@3.11.0/Marketplace/chunk-BIBAEYCG.js").then(e=>e.ReportModule),canActivate:[p],data:{title:"Report"}},{path:"Logistic",loadChildren:()=>import("https://cdn.jsdelivr.net/npm/marketplacepos@3.11.0/Marketplace/chunk-QBKXSMBS.js").then(e=>e.LogisticModule),canActivate:[p],data:{title:"Logistic"}},{path:"channel",loadChildren:()=>import("https://cdn.jsdelivr.net/npm/marketplacepos@3.11.0/Marketplace/chunk-UCCTSVAN.js").then(e=>e.ChannelsModule),canActivate:[p],data:{title:"Marketplace"}},{path:"log",loadChildren:()=>import("https://cdn.jsdelivr.net/npm/marketplacepos@3.11.0/Marketplace/chunk-K427G76F.js").then(e=>e.LogsModule),canActivate:[p],data:{title:"Orders"}},{path:"notification",loadChildren:()=>import("https://cdn.jsdelivr.net/npm/marketplacepos@3.11.0/Marketplace/chunk-QY37SUKW.js").then(e=>e.NotificationModule),canActivate:[p],data:{title:"Push Notification"}}]}],Se=(()=>{let i=class i{};i.\u0275fac=function(n){return new(n||i)},i.\u0275mod=h({type:i}),i.\u0275inj=f({imports:[L.forChild(He),L]});let e=i;return e})();var Te=(()=>{let i=class i{};i.\u0275fac=function(n){return new(n||i)},i.\u0275mod=h({type:i}),i.\u0275inj=f({imports:[P,oe,ue,be,Oe,Ce,Me,Ee,k,_e,xe,me]});let e=i;return e})();var di=(()=>{let i=class i{};i.\u0275fac=function(n){return new(n||i)},i.\u0275mod=h({type:i}),i.\u0275inj=f({providers:[K],imports:[P,Se,ve,k,Te,Pe,se.forChild()]});let e=i;return e})();export{di as MenuModule};
@@ -1,4 +0,0 @@
1
- import{a as St}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.11.0/Marketplace/chunk-7B2VFEDY.js";import{a as Dt,b as We,c as xt,d as Pt,e as Ue,f as Rt,g as Ve,h as Ot,i as de,j as Ke,k as R}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.11.0/Marketplace/chunk-C4SBGOAO.js";import{b as Le,c as ue,d as jt}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.11.0/Marketplace/chunk-GWNC6QPV.js";import{$ as b,$a as P,A as ht,B as pt,Ba as Tt,Cc as Et,Dc as $e,Ga as g,Gc as Te,Ha as J,Hc as be,I as Se,Jc as ze,Ma as F,N as ft,Pa as re,Pb as wt,Q as ke,Qa as I,Qb as yt,Ra as se,Sb as ve,T as B,Ta as H,U as Ee,Ub as Be,Wa as ae,X as oe,Yb as Fe,aa as W,ab as L,b as m,ba as S,bb as ce,bc as He,c as x,ca as h,cb as Oe,da as ee,db as je,ea as De,fa as U,fb as Me,g as lt,h as ut,hb as bt,ic as _t,ja as xe,jb as le,jc as Ct,k as Z,ka as Pe,kc as It,l as Q,lb as k,m as z,n as ie,pa as mt,q as M,r as dt,ra as gt,rb as $,ta as ge,tb as X,tc as At,va as te,wb as Ne,xc as kt,ya as vt,za as Re}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.11.0/Marketplace/chunk-5MULKC5W.js";import{a as C,b as Y,h as D}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.11.0/Marketplace/chunk-6REOMLA7.js";var Mt={production:!0,version:"3.11.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/v1/content?fetch=children:omni&sort=sortOrder:asc"};var Nt=(()=>{let o=class o{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("_","/"),s=JSON.parse(window.atob(r)),c=e.split(".")[1].replace("-","+").replace("_","/"),l=JSON.parse(window.atob(c));return l.header=s,l}catch{return!1}}};o.\u0275fac=function(n){return new(n||o)},o.\u0275prov=b({token:o,factory:o.\u0275fac,providedIn:"root"});let i=o;return i})();var Bt=["toast-component",""];function ln(i,o){if(i&1){let t=Me();P(0,"button",5),le("click",function(){xe(t);let n=k();return Pe(n.remove())}),P(1,"span",6),$(2,"\xD7"),L()()}}function un(i,o){if(i&1&&(Oe(0),$(1),je()),i&2){let t=k(2);g(1),X("[",t.duplicatesCount+1,"]")}}function dn(i,o){if(i&1&&(P(0,"div"),$(1),ae(2,un,2,1,"ng-container",4),L()),i&2){let t=k();H(t.options.titleClass),re("aria-label",t.title),g(1),X(" ",t.title," "),g(1),I("ngIf",t.duplicatesCount)}}function hn(i,o){if(i&1&&ce(0,"div",7),i&2){let t=k();H(t.options.messageClass),I("innerHTML",t.message,Re)}}function pn(i,o){if(i&1&&(P(0,"div",8),$(1),L()),i&2){let t=k();H(t.options.messageClass),re("aria-label",t.message),g(1),X(" ",t.message," ")}}function fn(i,o){if(i&1&&(P(0,"div"),ce(1,"div",9),L()),i&2){let t=k();g(1),se("width",t.width+"%")}}function mn(i,o){if(i&1){let t=Me();P(0,"button",5),le("click",function(){xe(t);let n=k();return Pe(n.remove())}),P(1,"span",6),$(2,"\xD7"),L()()}}function gn(i,o){if(i&1&&(Oe(0),$(1),je()),i&2){let t=k(2);g(1),X("[",t.duplicatesCount+1,"]")}}function vn(i,o){if(i&1&&(P(0,"div"),$(1),ae(2,gn,2,1,"ng-container",4),L()),i&2){let t=k();H(t.options.titleClass),re("aria-label",t.title),g(1),X(" ",t.title," "),g(1),I("ngIf",t.duplicatesCount)}}function Tn(i,o){if(i&1&&ce(0,"div",7),i&2){let t=k();H(t.options.messageClass),I("innerHTML",t.message,Re)}}function bn(i,o){if(i&1&&(P(0,"div",8),$(1),L()),i&2){let t=k();H(t.options.messageClass),re("aria-label",t.message),g(1),X(" ",t.message," ")}}function wn(i,o){if(i&1&&(P(0,"div"),ce(1,"div",9),L()),i&2){let t=k();g(1),se("width",t.width+"%")}}var qe=class{_attachedHost;component;viewContainerRef;injector;constructor(o,t){this.component=o,this.injector=t}attach(o,t){return this._attachedHost=o,o.attach(this,t)}detach(){let o=this._attachedHost;if(o)return this._attachedHost=void 0,o.detach()}get isAttached(){return this._attachedHost!=null}setAttachedHost(o){this._attachedHost=o}},Ge=class{_attachedPortal;_disposeFn;attach(o,t){return this._attachedPortal=o,this.attachComponentPortal(o,t)}detach(){this._attachedPortal&&this._attachedPortal.setAttachedHost(),this._attachedPortal=void 0,this._disposeFn&&(this._disposeFn(),this._disposeFn=void 0)}setDisposeFn(o){this._disposeFn=o}},Ze=class{_overlayRef;componentInstance;duplicatesCount=0;_afterClosed=new x;_activate=new x;_manualClose=new x;_resetTimeout=new x;_countDuplicate=new x;constructor(o){this._overlayRef=o}manualClose(){this._manualClose.next(),this._manualClose.complete()}manualClosed(){return this._manualClose.asObservable()}timeoutReset(){return this._resetTimeout.asObservable()}countDuplicate(){return this._countDuplicate.asObservable()}close(){this._overlayRef.detach(),this._afterClosed.next(),this._manualClose.next(),this._afterClosed.complete(),this._manualClose.complete(),this._activate.complete(),this._resetTimeout.complete(),this._countDuplicate.complete()}afterClosed(){return this._afterClosed.asObservable()}isInactive(){return this._activate.isStopped}activate(){this._activate.next(),this._activate.complete()}afterActivate(){return this._activate.asObservable()}onDuplicate(o,t){o&&this._resetTimeout.next(),t&&this._countDuplicate.next(++this.duplicatesCount)}},ne=class{toastId;config;message;title;toastType;toastRef;_onTap=new x;_onAction=new x;constructor(o,t,e,n,r,s){this.toastId=o,this.config=t,this.message=e,this.title=n,this.toastType=r,this.toastRef=s,this.toastRef.afterClosed().subscribe(()=>{this._onAction.complete(),this._onTap.complete()})}triggerTap(){this._onTap.next(),this.config.tapToDismiss&&this._onTap.complete()}onTap(){return this._onTap.asObservable()}triggerAction(o){this._onAction.next(o)}onAction(){return this._onAction.asObservable()}},Ft={maxOpened:0,autoDismiss:!1,newestOnTop:!0,preventDuplicates:!1,countDuplicates:!1,resetTimeoutOnDuplicate:!1,includeTitleDuplicates:!1,iconClasses:{error:"toast-error",info:"toast-info",success:"toast-success",warning:"toast-warning"},closeButton:!1,disableTimeOut:!1,timeOut:5e3,extendedTimeOut:1e3,enableHtml:!1,progressBar:!1,toastClass:"ngx-toastr",positionClass:"toast-top-right",titleClass:"toast-title",messageClass:"toast-message",easing:"ease-in",easeTime:300,tapToDismiss:!0,onActivateTick:!1,progressAnimation:"decreasing"},Ht=new S("ToastConfig"),Je=class extends Ge{_hostDomElement;_componentFactoryResolver;_appRef;constructor(o,t,e){super(),this._hostDomElement=o,this._componentFactoryResolver=t,this._appRef=e}attachComponentPortal(o,t){let e=this._componentFactoryResolver.resolveComponentFactory(o.component),n;return n=e.create(o.injector),this._appRef.attachView(n.hostView),this.setDisposeFn(()=>{this._appRef.detachView(n.hostView),n.destroy()}),t?this._hostDomElement.insertBefore(this._getComponentRootNode(n),this._hostDomElement.firstChild):this._hostDomElement.appendChild(this._getComponentRootNode(n)),n}_getComponentRootNode(o){return o.hostView.rootNodes[0]}},yn=(()=>{class i{_document=ee(Fe);_containerElement;ngOnDestroy(){this._containerElement&&this._containerElement.parentNode&&this._containerElement.parentNode.removeChild(this._containerElement)}getContainerElement(){return this._containerElement||this._createContainer(),this._containerElement}_createContainer(){let t=this._document.createElement("div");t.classList.add("overlay-container"),t.setAttribute("aria-live","polite"),this._document.body.appendChild(t),this._containerElement=t}static \u0275fac=function(e){return new(e||i)};static \u0275prov=b({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),Xe=class{_portalHost;constructor(o){this._portalHost=o}attach(o,t=!0){return this._portalHost.attach(o,t)}detach(){return this._portalHost.detach()}},_n=(()=>{class i{_overlayContainer=ee(yn);_componentFactoryResolver=ee(Tt);_appRef=ee(ve);_document=ee(Fe);_paneElements=new Map;create(t,e){return this._createOverlayRef(this.getPaneElement(t,e))}getPaneElement(t="",e){return this._paneElements.get(e)||this._paneElements.set(e,{}),this._paneElements.get(e)[t]||(this._paneElements.get(e)[t]=this._createPaneElement(t,e)),this._paneElements.get(e)[t]}_createPaneElement(t,e){let n=this._document.createElement("div");return n.id="toast-container",n.classList.add(t),n.classList.add("toast-container"),e?e.getContainerElement().appendChild(n):this._overlayContainer.getContainerElement().appendChild(n),n}_createPortalHost(t){return new Je(t,this._componentFactoryResolver,this._appRef)}_createOverlayRef(t){return new Xe(this._createPortalHost(t))}static \u0275fac=function(e){return new(e||i)};static \u0275prov=b({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),Lt=(()=>{class i{overlay;_injector;sanitizer;ngZone;toastrConfig;currentlyActive=0;toasts=[];overlayContainer;previousToastMessage;index=0;constructor(t,e,n,r,s){this.overlay=e,this._injector=n,this.sanitizer=r,this.ngZone=s,this.toastrConfig=C(C({},t.default),t.config),t.config.iconClasses&&(this.toastrConfig.iconClasses=C(C({},t.default.iconClasses),t.config.iconClasses))}show(t,e,n={},r=""){return this._preBuildNotification(r,t,e,this.applyConfig(n))}success(t,e,n={}){let r=this.toastrConfig.iconClasses.success||"";return this._preBuildNotification(r,t,e,this.applyConfig(n))}error(t,e,n={}){let r=this.toastrConfig.iconClasses.error||"";return this._preBuildNotification(r,t,e,this.applyConfig(n))}info(t,e,n={}){let r=this.toastrConfig.iconClasses.info||"";return this._preBuildNotification(r,t,e,this.applyConfig(n))}warning(t,e,n={}){let r=this.toastrConfig.iconClasses.warning||"";return this._preBuildNotification(r,t,e,this.applyConfig(n))}clear(t){for(let e of this.toasts)if(t!==void 0){if(e.toastId===t){e.toastRef.manualClose();return}}else e.toastRef.manualClose()}remove(t){let e=this._findToast(t);if(!e||(e.activeToast.toastRef.close(),this.toasts.splice(e.index,1),this.currentlyActive=this.currentlyActive-1,!this.toastrConfig.maxOpened||!this.toasts.length))return!1;if(this.currentlyActive<this.toastrConfig.maxOpened&&this.toasts[this.currentlyActive]){let n=this.toasts[this.currentlyActive].toastRef;n.isInactive()||(this.currentlyActive=this.currentlyActive+1,n.activate())}return!0}findDuplicate(t="",e="",n,r){let{includeTitleDuplicates:s}=this.toastrConfig;for(let a of this.toasts){let c=s&&a.title===t;if((!s||c)&&a.message===e)return a.toastRef.onDuplicate(n,r),a}return null}applyConfig(t={}){return C(C({},this.toastrConfig),t)}_findToast(t){for(let e=0;e<this.toasts.length;e++)if(this.toasts[e].toastId===t)return{index:e,activeToast:this.toasts[e]};return null}_preBuildNotification(t,e,n,r){return r.onActivateTick?this.ngZone.run(()=>this._buildNotification(t,e,n,r)):this._buildNotification(t,e,n,r)}_buildNotification(t,e,n,r){if(!r.toastComponent)throw new Error("toastComponent required");let s=this.findDuplicate(n,e,this.toastrConfig.resetTimeoutOnDuplicate&&r.timeOut>0,this.toastrConfig.countDuplicates);if((this.toastrConfig.includeTitleDuplicates&&n||e)&&this.toastrConfig.preventDuplicates&&s!==null)return s;this.previousToastMessage=e;let a=!1;this.toastrConfig.maxOpened&&this.currentlyActive>=this.toastrConfig.maxOpened&&(a=!0,this.toastrConfig.autoDismiss&&this.clear(this.toasts[0].toastId));let c=this.overlay.create(r.positionClass,this.overlayContainer);this.index=this.index+1;let l=e;e&&r.enableHtml&&(l=this.sanitizer.sanitize(vt.HTML,e));let d=new Ze(c),u=new ne(this.index,r,l,n,t,d),p=[{provide:ne,useValue:u}],f=ge.create({providers:p,parent:this._injector}),q=new qe(r.toastComponent,f),j=c.attach(q,r.newestOnTop);d.componentInstance=j.instance;let A={toastId:this.index,title:n||"",message:e||"",toastRef:d,onShown:d.afterActivate(),onHidden:d.afterClosed(),onTap:u.onTap(),onAction:u.onAction(),portal:j};return a||(this.currentlyActive=this.currentlyActive+1,setTimeout(()=>{A.toastRef.activate()})),this.toasts.push(A),A}static \u0275fac=function(e){return new(e||i)(h(Ht),h(_n),h(ge),h(At),h(F))};static \u0275prov=b({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),Cn=(()=>{class i{toastrService;toastPackage;ngZone;message;title;options;duplicatesCount;originalTimeout;width=-1;toastClasses="";state;get displayStyle(){if(this.state.value==="inactive")return"none"}timeout;intervalId;hideTime;sub;sub1;sub2;sub3;constructor(t,e,n){this.toastrService=t,this.toastPackage=e,this.ngZone=n,this.message=e.message,this.title=e.title,this.options=e.config,this.originalTimeout=e.config.timeOut,this.toastClasses=`${e.toastType} ${e.config.toastClass}`,this.sub=e.toastRef.afterActivate().subscribe(()=>{this.activateToast()}),this.sub1=e.toastRef.manualClosed().subscribe(()=>{this.remove()}),this.sub2=e.toastRef.timeoutReset().subscribe(()=>{this.resetTimeout()}),this.sub3=e.toastRef.countDuplicate().subscribe(r=>{this.duplicatesCount=r}),this.state={value:"inactive",params:{easeTime:this.toastPackage.config.easeTime,easing:"ease-in"}}}ngOnDestroy(){this.sub.unsubscribe(),this.sub1.unsubscribe(),this.sub2.unsubscribe(),this.sub3.unsubscribe(),clearInterval(this.intervalId),clearTimeout(this.timeout)}activateToast(){this.state=Y(C({},this.state),{value:"active"}),!(this.options.disableTimeOut===!0||this.options.disableTimeOut==="timeOut")&&this.options.timeOut&&(this.outsideTimeout(()=>this.remove(),this.options.timeOut),this.hideTime=new Date().getTime()+this.options.timeOut,this.options.progressBar&&this.outsideInterval(()=>this.updateProgress(),10))}updateProgress(){if(this.width===0||this.width===100||!this.options.timeOut)return;let t=new Date().getTime(),e=this.hideTime-t;this.width=e/this.options.timeOut*100,this.options.progressAnimation==="increasing"&&(this.width=100-this.width),this.width<=0&&(this.width=0),this.width>=100&&(this.width=100)}resetTimeout(){clearTimeout(this.timeout),clearInterval(this.intervalId),this.state=Y(C({},this.state),{value:"active"}),this.outsideTimeout(()=>this.remove(),this.originalTimeout),this.options.timeOut=this.originalTimeout,this.hideTime=new Date().getTime()+(this.options.timeOut||0),this.width=-1,this.options.progressBar&&this.outsideInterval(()=>this.updateProgress(),10)}remove(){this.state.value!=="removed"&&(clearTimeout(this.timeout),this.state=Y(C({},this.state),{value:"removed"}),this.outsideTimeout(()=>this.toastrService.remove(this.toastPackage.toastId),+this.toastPackage.config.easeTime))}tapToast(){this.state.value!=="removed"&&(this.toastPackage.triggerTap(),this.options.tapToDismiss&&this.remove())}stickAround(){this.state.value!=="removed"&&this.options.disableTimeOut!=="extendedTimeOut"&&(clearTimeout(this.timeout),this.options.timeOut=0,this.hideTime=0,clearInterval(this.intervalId),this.width=0)}delayedHideToast(){this.options.disableTimeOut===!0||this.options.disableTimeOut==="extendedTimeOut"||this.options.extendedTimeOut===0||this.state.value==="removed"||(this.outsideTimeout(()=>this.remove(),this.options.extendedTimeOut),this.options.timeOut=this.options.extendedTimeOut,this.hideTime=new Date().getTime()+(this.options.timeOut||0),this.width=-1,this.options.progressBar&&this.outsideInterval(()=>this.updateProgress(),10))}outsideTimeout(t,e){this.ngZone?this.ngZone.runOutsideAngular(()=>this.timeout=setTimeout(()=>this.runInsideAngular(t),e)):this.timeout=setTimeout(()=>t(),e)}outsideInterval(t,e){this.ngZone?this.ngZone.runOutsideAngular(()=>this.intervalId=setInterval(()=>this.runInsideAngular(t),e)):this.intervalId=setInterval(()=>t(),e)}runInsideAngular(t){this.ngZone?this.ngZone.run(()=>t()):t()}static \u0275fac=function(e){return new(e||i)(J(Lt),J(ne),J(F))};static \u0275cmp=De({type:i,selectors:[["","toast-component",""]],hostVars:5,hostBindings:function(e,n){e&1&&le("click",function(){return n.tapToast()})("mouseenter",function(){return n.stickAround()})("mouseleave",function(){return n.delayedHideToast()}),e&2&&(bt("@flyInOut",n.state),H(n.toastClasses),se("display",n.displayStyle))},standalone:!0,features:[Ne],attrs:Bt,decls:5,vars:5,consts:[["type","button","class","toast-close-button","aria-label","Close",3,"click",4,"ngIf"],[3,"class",4,"ngIf"],["role","alert",3,"class","innerHTML",4,"ngIf"],["role","alert",3,"class",4,"ngIf"],[4,"ngIf"],["type","button","aria-label","Close",1,"toast-close-button",3,"click"],["aria-hidden","true"],["role","alert",3,"innerHTML"],["role","alert"],[1,"toast-progress"]],template:function(e,n){e&1&&ae(0,ln,3,0,"button",0)(1,dn,3,5,"div",1)(2,hn,1,3,"div",2)(3,pn,2,4,"div",3)(4,fn,2,2,"div",4),e&2&&(I("ngIf",n.options.closeButton),g(1),I("ngIf",n.title),g(1),I("ngIf",n.message&&n.options.enableHtml),g(1),I("ngIf",n.message&&!n.options.enableHtml),g(1),I("ngIf",n.options.progressBar))},dependencies:[He],encapsulation:2,data:{animation:[Et("flyInOut",[be("inactive",Te({opacity:0})),be("active",Te({opacity:1})),be("removed",Te({opacity:0})),ze("inactive => active",$e("{{ easeTime }}ms {{ easing }}")),ze("active => removed",$e("{{ easeTime }}ms {{ easing }}"))])]}})}return i})(),In=Y(C({},Ft),{toastComponent:Cn}),An=(i={})=>gt([{provide:Ht,useValue:{default:In,config:i}}]),zi=(()=>{class i{static forRoot(t={}){return{ngModule:i,providers:[An(t)]}}static \u0275fac=function(e){return new(e||i)};static \u0275mod=U({type:i});static \u0275inj=W({})}return i})();var Sn=(()=>{class i{toastrService;toastPackage;appRef;message;title;options;duplicatesCount;originalTimeout;width=-1;toastClasses="";get displayStyle(){return this.state==="inactive"?"none":null}state="inactive";timeout;intervalId;hideTime;sub;sub1;sub2;sub3;constructor(t,e,n){this.toastrService=t,this.toastPackage=e,this.appRef=n,this.message=e.message,this.title=e.title,this.options=e.config,this.originalTimeout=e.config.timeOut,this.toastClasses=`${e.toastType} ${e.config.toastClass}`,this.sub=e.toastRef.afterActivate().subscribe(()=>{this.activateToast()}),this.sub1=e.toastRef.manualClosed().subscribe(()=>{this.remove()}),this.sub2=e.toastRef.timeoutReset().subscribe(()=>{this.resetTimeout()}),this.sub3=e.toastRef.countDuplicate().subscribe(r=>{this.duplicatesCount=r})}ngOnDestroy(){this.sub.unsubscribe(),this.sub1.unsubscribe(),this.sub2.unsubscribe(),this.sub3.unsubscribe(),clearInterval(this.intervalId),clearTimeout(this.timeout)}activateToast(){this.state="active",!(this.options.disableTimeOut===!0||this.options.disableTimeOut==="timeOut")&&this.options.timeOut&&(this.timeout=setTimeout(()=>{this.remove()},this.options.timeOut),this.hideTime=new Date().getTime()+this.options.timeOut,this.options.progressBar&&(this.intervalId=setInterval(()=>this.updateProgress(),10))),this.options.onActivateTick&&this.appRef.tick()}updateProgress(){if(this.width===0||this.width===100||!this.options.timeOut)return;let t=new Date().getTime(),e=this.hideTime-t;this.width=e/this.options.timeOut*100,this.options.progressAnimation==="increasing"&&(this.width=100-this.width),this.width<=0&&(this.width=0),this.width>=100&&(this.width=100)}resetTimeout(){clearTimeout(this.timeout),clearInterval(this.intervalId),this.state="active",this.options.timeOut=this.originalTimeout,this.timeout=setTimeout(()=>this.remove(),this.originalTimeout),this.hideTime=new Date().getTime()+(this.originalTimeout||0),this.width=-1,this.options.progressBar&&(this.intervalId=setInterval(()=>this.updateProgress(),10))}remove(){this.state!=="removed"&&(clearTimeout(this.timeout),this.state="removed",this.timeout=setTimeout(()=>this.toastrService.remove(this.toastPackage.toastId)))}tapToast(){this.state!=="removed"&&(this.toastPackage.triggerTap(),this.options.tapToDismiss&&this.remove())}stickAround(){this.state!=="removed"&&(clearTimeout(this.timeout),this.options.timeOut=0,this.hideTime=0,clearInterval(this.intervalId),this.width=0)}delayedHideToast(){this.options.disableTimeOut===!0||this.options.disableTimeOut==="extendedTimeOut"||this.options.extendedTimeOut===0||this.state==="removed"||(this.timeout=setTimeout(()=>this.remove(),this.options.extendedTimeOut),this.options.timeOut=this.options.extendedTimeOut,this.hideTime=new Date().getTime()+(this.options.timeOut||0),this.width=-1,this.options.progressBar&&(this.intervalId=setInterval(()=>this.updateProgress(),10)))}static \u0275fac=function(e){return new(e||i)(J(Lt),J(ne),J(ve))};static \u0275cmp=De({type:i,selectors:[["","toast-component",""]],hostVars:4,hostBindings:function(e,n){e&1&&le("click",function(){return n.tapToast()})("mouseenter",function(){return n.stickAround()})("mouseleave",function(){return n.delayedHideToast()}),e&2&&(H(n.toastClasses),se("display",n.displayStyle))},standalone:!0,features:[Ne],attrs:Bt,decls:5,vars:5,consts:[["type","button","class","toast-close-button","aria-label","Close",3,"click",4,"ngIf"],[3,"class",4,"ngIf"],["role","alert",3,"class","innerHTML",4,"ngIf"],["role","alert",3,"class",4,"ngIf"],[4,"ngIf"],["type","button","aria-label","Close",1,"toast-close-button",3,"click"],["aria-hidden","true"],["role","alert",3,"innerHTML"],["role","alert"],[1,"toast-progress"]],template:function(e,n){e&1&&ae(0,mn,3,0,"button",0)(1,vn,3,5,"div",1)(2,Tn,1,3,"div",2)(3,bn,2,4,"div",3)(4,wn,2,2,"div",4),e&2&&(I("ngIf",n.options.closeButton),g(1),I("ngIf",n.title),g(1),I("ngIf",n.message&&n.options.enableHtml),g(1),I("ngIf",n.message&&!n.options.enableHtml),g(1),I("ngIf",n.options.progressBar))},dependencies:[He],encapsulation:2})}return i})(),Wi=Y(C({},Ft),{toastComponent:Sn});var kn="firebase",En="10.7.1";de(kn,En,"app");var pe=new wt("ANGULARFIRE2_VERSION");var Dn=(i,o)=>{let t=o?[o]:Ot(),e=[];return t.forEach(n=>{n.container.getProvider(i).instances.forEach(s=>{e.includes(s)||e.push(s)})}),e},he=class{constructor(){return Dn(xn)}},xn="app-check";function Ye(){}var we=class{zone;delegate;constructor(o,t=ut){this.zone=o,this.delegate=t}now(){return this.delegate.now()}schedule(o,t,e){let n=this.zone,r=function(s){n.runGuarded(()=>{o.apply(this,[s])})};return this.delegate.schedule(r,t,e)}},Qe=class{zone;task=null;constructor(o){this.zone=o}call(o,t){let e=this.unscheduleTask.bind(this);return this.task=this.zone.run(()=>Zone.current.scheduleMacroTask("firebaseZoneBlock",Ye,{},Ye,Ye)),t.pipe(oe({next:e,complete:e,error:e})).subscribe(o).add(e)}unscheduleTask(){setTimeout(()=>{this.task!=null&&this.task.state==="scheduled"&&(this.task.invoke(),this.task=null)},10)}},$t=(()=>{class i{ngZone;outsideAngular;insideAngular;constructor(t){this.ngZone=t,this.outsideAngular=t.runOutsideAngular(()=>new we(Zone.current)),this.insideAngular=t.run(()=>new we(Zone.current,lt)),globalThis.\u0275AngularFireScheduler||=this}static \u0275fac=function(e){return new(e||i)(h(F))};static \u0275prov=b({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();function Pn(){let i=globalThis.\u0275AngularFireScheduler;if(!i)throw new Error(`Either AngularFireModule has not been provided in your AppModule (this can be done manually or implictly using
2
- provideFirebaseApp) or you're calling an AngularFire method outside of an NgModule (which is not supported).`);return i}function zt(i){return Rn(Pn())(i)}function Rn(i){return function(t){return t=t.lift(new Qe(i.ngZone)),t.pipe(Q(i.outsideAngular),Z(i.insideAngular))}}var jn="firebase",Mn="10.7.1";R.registerVersion(jn,Mn,"app-compat");var Nn=["ngOnDestroy"],Ut=(i,o,t,e={})=>new Proxy(i,{get:(n,r)=>t.runOutsideAngular(()=>{if(i[r])return e?.spy?.get&&e.spy.get(r,i[r]),i[r];if(Nn.indexOf(r)>-1)return()=>{};let s=o.toPromise().then(a=>{let c=a?.[r];return typeof c=="function"?c.bind(a):c?.then?c.then(l=>t.run(()=>l)):t.run(()=>c)});return new Proxy(()=>{},{get:(a,c)=>s[c],apply:(a,c,l)=>s.then(d=>{let u=d?.(...l);return e?.spy?.apply&&e.spy.apply(r,l,u),u})})})});var ye=class{constructor(o){return o}},_e=new S("angularfire2.app.options"),Ce=new S("angularfire2.app.name");function et(i,o,t){let e=typeof t=="string"&&t||"[DEFAULT]",n=typeof t=="object"&&t||{};n.name=n.name||e;let s=R.apps.filter(a=>a&&a.name===n.name)[0]||o.runOutsideAngular(()=>R.initializeApp(i,n));try{if(JSON.stringify(i)!==JSON.stringify(s.options)){let a=!!module.hot;Bn("error",`${s.name} Firebase App already initialized with different options${a?", you may need to reload as Firebase is not HMR aware.":"."}`)}}catch{}return new ye(s)}var Bn=(i,...o)=>{Be()&&typeof console<"u"&&console[i](...o)},Fn={provide:ye,useFactory:et,deps:[_e,F,[new mt,Ce]]},co=(()=>{class i{static initializeApp(t,e){return{ngModule:i,providers:[{provide:_e,useValue:t},{provide:Ce,useValue:e}]}}constructor(t){R.registerVersion("angularfire",pe.full,"core"),R.registerVersion("angularfire",pe.full,"app-compat"),R.registerVersion("angular",yt.full,t.toString())}static \u0275fac=function(e){return new(e||i)(h(te))};static \u0275mod=U({type:i});static \u0275inj=W({providers:[Fn]})}return i})();function Vt(i,o,t,e,n){let[,r,s]=globalThis.\u0275AngularfireInstanceCache.find(a=>a[0]===i)||[];if(r)return Hn(n,s)||(Wt("error",`${o} was already initialized on the ${t} Firebase App with different settings.${Ln?" You may need to reload as Firebase is not HMR aware.":""}`),Wt("warn",{is:n,was:s})),r;{let a=e();return globalThis.\u0275AngularfireInstanceCache.push([i,a,n]),a}}function Hn(i,o){try{return i.toString()===o.toString()}catch{return i===o}}var Ln=typeof module<"u"&&!!module.hot,Wt=(i,...o)=>{Be()&&typeof console<"u"&&console[i](...o)};globalThis.\u0275AngularfireInstanceCache||=[];var $n=new Map,zn={activated:!1,tokenObservers:[]},Wn={initialized:!1,enabled:!1};function O(i){return $n.get(i)||Object.assign({},zn)}function Jt(){return Wn}var Un="https://content-firebaseappcheck.googleapis.com/v1";var Vn="exchangeDebugToken",Kt={OFFSET_DURATION:5*60*1e3,RETRIAL_MIN_WAIT:30*1e3,RETRIAL_MAX_WAIT:16*60*1e3},_o=24*60*60*1e3;var nt=class{constructor(o,t,e,n,r){if(this.operation=o,this.retryPolicy=t,this.getWaitDuration=e,this.lowerBound=n,this.upperBound=r,this.pending=null,this.nextErrorWaitInterval=n,n>r)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(o){return D(this,null,function*(){this.stop();try{this.pending=new We,this.pending.promise.catch(t=>{}),yield Kn(this.getNextRun(o)),this.pending.resolve(),yield this.pending.promise,this.pending=new We,this.pending.promise.catch(t=>{}),yield this.operation(),this.pending.resolve(),yield this.pending.promise,this.process(!0).catch(()=>{})}catch(t){this.retryPolicy(t)?this.process(!1).catch(()=>{}):this.stop()}})}getNextRun(o){if(o)return this.nextErrorWaitInterval=this.lowerBound,this.getWaitDuration();{let t=this.nextErrorWaitInterval;return this.nextErrorWaitInterval*=2,this.nextErrorWaitInterval>this.upperBound&&(this.nextErrorWaitInterval=this.upperBound),t}}};function Kn(i){return new Promise(o=>{setTimeout(o,i)})}var qn={"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.",throttled:"Requests throttled due to {$httpStatus} error. Attempts allowed again after {$time}"},K=new Pt("appCheck","AppCheck",qn);function Xt(i){if(!O(i).activated)throw K.create("use-before-activation",{appName:i.name})}function Yt(e,n){return D(this,arguments,function*({url:i,body:o},t){let r={"Content-Type":"application/json"},s=t.getImmediate({optional:!0});if(s){let f=yield s.getHeartbeatsHeader();f&&(r["X-Firebase-Client"]=f)}let a={method:"POST",body:JSON.stringify(o),headers:r},c;try{c=yield fetch(i,a)}catch(f){throw K.create("fetch-network-error",{originalErrorMessage:f?.message})}if(c.status!==200)throw K.create("fetch-status-error",{httpStatus:c.status});let l;try{l=yield c.json()}catch(f){throw K.create("fetch-parse-error",{originalErrorMessage:f?.message})}let d=l.ttl.match(/^([\d.]+)(s)$/);if(!d||!d[2]||isNaN(Number(d[1])))throw K.create("fetch-parse-error",{originalErrorMessage:`ttl field (timeToLive) is not in standard Protobuf Duration format: ${l.ttl}`});let u=Number(d[1])*1e3,p=Date.now();return{token:l.token,expireTimeMillis:p+u,issuedAtTimeMillis:p}})}function Qt(i,o){let{projectId:t,appId:e,apiKey:n}=i.options;return{url:`${Un}/projects/${t}/apps/${e}:${Vn}?key=${n}`,body:{debug_token:o}}}var Gn="firebase-app-check-database",Zn=1,it="firebase-app-check-store";var Ie=null;function Jn(){return Ie||(Ie=new Promise((i,o)=>{try{let t=indexedDB.open(Gn,Zn);t.onsuccess=e=>{i(e.target.result)},t.onerror=e=>{var n;o(K.create("storage-open",{originalErrorMessage:(n=e.target.error)===null||n===void 0?void 0:n.message}))},t.onupgradeneeded=e=>{let n=e.target.result;switch(e.oldVersion){case 0:n.createObjectStore(it,{keyPath:"compositeKey"})}}}catch(t){o(K.create("storage-open",{originalErrorMessage:t?.message}))}}),Ie)}function Xn(i,o){return Yn(Qn(i),o)}function Yn(i,o){return D(this,null,function*(){let e=(yield Jn()).transaction(it,"readwrite"),r=e.objectStore(it).put({compositeKey:i,value:o});return new Promise((s,a)=>{r.onsuccess=c=>{s()},e.onerror=c=>{var l;a(K.create("storage-set",{originalErrorMessage:(l=c.target.error)===null||l===void 0?void 0:l.message}))}})})}function Qn(i){return`${i.options.appId}-${i.name}`}var ot=new Rt("@firebase/app-check");function tt(i,o){return xt()?Xn(i,o).catch(t=>{ot.warn(`Failed to write token to IndexedDB. Error: ${t}`)}):Promise.resolve()}function en(){return Jt().enabled}function tn(){return D(this,null,function*(){let i=Jt();if(i.enabled&&i.token)return i.token.promise;throw Error(`
3
- Can't get debug token in production mode.
4
- `)})}var ei={error:"UNKNOWN_ERROR"};function ti(i){return Dt.encodeString(JSON.stringify(i),!1)}function rt(i,o=!1){return D(this,null,function*(){let t=i.app;Xt(t);let e=O(t),n=e.token,r;if(n&&!fe(n)&&(e.token=void 0,n=void 0),!n){let c=yield e.cachedTokenPromise;c&&(fe(c)?n=c:yield tt(t,void 0))}if(!o&&n&&fe(n))return{token:n.token};let s=!1;if(en()){e.exchangeTokenPromise||(e.exchangeTokenPromise=Yt(Qt(t,yield tn()),i.heartbeatServiceProvider).finally(()=>{e.exchangeTokenPromise=void 0}),s=!0);let c=yield e.exchangeTokenPromise;return yield tt(t,c),e.token=c,{token:c.token}}try{e.exchangeTokenPromise||(e.exchangeTokenPromise=e.provider.getToken().finally(()=>{e.exchangeTokenPromise=void 0}),s=!0),n=yield O(t).exchangeTokenPromise}catch(c){c.code==="appCheck/throttled"?ot.warn(c.message):ot.error(c),r=c}let a;return n?r?fe(n)?a={token:n.token,internalError:r}:a=Gt(r):(a={token:n.token},e.token=n,yield tt(t,n)):a=Gt(r),s&&ri(t,a),a})}function ni(i){return D(this,null,function*(){let o=i.app;Xt(o);let{provider:t}=O(o);if(en()){let e=yield tn(),{token:n}=yield Yt(Qt(o,e),i.heartbeatServiceProvider);return{token:n}}else{let{token:e}=yield t.getToken();return{token:e}}})}function ii(i,o,t,e){let{app:n}=i,r=O(n),s={next:t,error:e,type:o};if(r.tokenObservers=[...r.tokenObservers,s],r.token&&fe(r.token)){let a=r.token;Promise.resolve().then(()=>{t({token:a.token}),qt(i)}).catch(()=>{})}r.cachedTokenPromise.then(()=>qt(i))}function nn(i,o){let t=O(i),e=t.tokenObservers.filter(n=>n.next!==o);e.length===0&&t.tokenRefresher&&t.tokenRefresher.isRunning()&&t.tokenRefresher.stop(),t.tokenObservers=e}function qt(i){let{app:o}=i,t=O(o),e=t.tokenRefresher;e||(e=oi(i),t.tokenRefresher=e),!e.isRunning()&&t.isTokenAutoRefreshEnabled&&e.start()}function oi(i){let{app:o}=i;return new nt(()=>D(this,null,function*(){let t=O(o),e;if(t.token?e=yield rt(i,!0):e=yield rt(i),e.error)throw e.error;if(e.internalError)throw e.internalError}),()=>!0,()=>{let t=O(o);if(t.token){let e=t.token.issuedAtTimeMillis+(t.token.expireTimeMillis-t.token.issuedAtTimeMillis)*.5+3e5,n=t.token.expireTimeMillis-5*60*1e3;return e=Math.min(e,n),Math.max(0,e-Date.now())}else return 0},Kt.RETRIAL_MIN_WAIT,Kt.RETRIAL_MAX_WAIT)}function ri(i,o){let t=O(i).tokenObservers;for(let e of t)try{e.type==="EXTERNAL"&&o.error!=null?e.error(o.error):e.next(o)}catch{}}function fe(i){return i.expireTimeMillis-Date.now()>0}function Gt(i){return{token:ti(ei),error:i}}var st=class{constructor(o,t){this.app=o,this.heartbeatServiceProvider=t}_delete(){let{tokenObservers:o}=O(this.app);for(let t of o)nn(this.app,t.next);return Promise.resolve()}};function si(i,o){return new st(i,o)}function ai(i){return{getToken:o=>rt(i,o),getLimitedUseToken:()=>ni(i),addTokenListener:o=>ii(i,"INTERNAL",o),removeTokenListener:o=>nn(i.app,o)}}var ci="@firebase/app-check",li="0.8.1";var ui="app-check",Zt="app-check-internal";function di(){Ve(new Ue(ui,i=>{let o=i.getProvider("app").getImmediate(),t=i.getProvider("heartbeat");return si(o,t)},"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((i,o,t)=>{i.getProvider(Zt).initialize()})),Ve(new Ue(Zt,i=>{let o=i.getProvider("app-check").getImmediate();return ai(o)},"PUBLIC").setInstantiationMode("EXPLICIT")),de(ci,li)}di();var hi=["localhost","0.0.0.0","127.0.0.1"],jo=typeof window<"u"&&hi.includes(window.location.hostname);var fi=new S("angularfire2.auth.use-emulator"),mi=new S("angularfire2.auth.settings"),gi=new S("angularfire2.auth.tenant-id"),vi=new S("angularfire2.auth.langugage-code"),Ti=new S("angularfire2.auth.use-device-language"),bi=new S("angularfire.auth.persistence"),wi=(i,o,t,e,n,r,s,a)=>Vt(`${i.name}.auth`,"AngularFireAuth",i.name,()=>{let c=o.runOutsideAngular(()=>i.auth());if(t&&c.useEmulator(...t),e&&(c.tenantId=e),c.languageCode=n,r&&c.useDeviceLanguage(),s)for(let[l,d]of Object.entries(s))c.settings[l]=d;return a&&c.setPersistence(a),c},[t,e,n,r,s,a]),at=(()=>{class i{authState;idToken;user;idTokenResult;credential;constructor(t,e,n,r,s,a,c,l,d,u,p,f){let q=new x,j=ie(void 0).pipe(Z(s.outsideAngular),B(()=>r.runOutsideAngular(()=>import("https://cdn.jsdelivr.net/npm/marketplacepos@3.11.0/Marketplace/chunk-N5CNFEYR.js"))),M(()=>et(t,r,e)),M(A=>wi(A,r,a,l,d,u,c,p)),ke({bufferSize:1,refCount:!1}));if(It(n))this.authState=this.user=this.idToken=this.idTokenResult=this.credential=ie(null);else{j.pipe(ft()).subscribe();let A=j.pipe(B(T=>T.getRedirectResult().then(N=>N,()=>null)),zt,ke({bufferSize:1,refCount:!1})),me=j.pipe(B(T=>new m(N=>({unsubscribe:r.runOutsideAngular(()=>T.onAuthStateChanged(G=>N.next(G),G=>N.error(G),()=>N.complete()))})))),Ae=j.pipe(B(T=>new m(N=>({unsubscribe:r.runOutsideAngular(()=>T.onIdTokenChanged(G=>N.next(G),G=>N.error(G),()=>N.complete()))}))));this.authState=A.pipe(Ee(me),Q(s.outsideAngular),Z(s.insideAngular)),this.user=A.pipe(Ee(Ae),Q(s.outsideAngular),Z(s.insideAngular)),this.idToken=this.user.pipe(B(T=>T?z(T.getIdToken()):ie(null))),this.idTokenResult=this.user.pipe(B(T=>T?z(T.getIdTokenResult()):ie(null))),this.credential=ht(A,q,this.authState.pipe(pt(T=>!T))).pipe(M(T=>T?.user?T:null),Q(s.outsideAngular),Z(s.insideAngular))}return Ut(this,j,r,{spy:{apply:(A,me,Ae)=>{(A.startsWith("signIn")||A.startsWith("createUser"))&&Ae.then(T=>q.next(T))}}})}static \u0275fac=function(e){return new(e||i)(h(_e),h(Ce,8),h(te),h(F),h($t),h(fi,8),h(mi,8),h(gi,8),h(vi,8),h(Ti,8),h(bi,8),h(he,8))};static \u0275prov=b({token:i,factory:i.\u0275fac,providedIn:"any"})}return i})(),Jo=(()=>{class i{constructor(){R.registerVersion("angularfire",pe.full,"auth-compat")}static \u0275fac=function(e){return new(e||i)};static \u0275mod=U({type:i});static \u0275inj=W({providers:[at]})}return i})();function v(i,o,t,e){return new Promise((n,r)=>{i||r("IndexedDB not available");let s=i.open(o,t),a;s.onsuccess=c=>{a=s.result,n(a)},s.onerror=c=>{r(`IndexedDB error: ${s.error}`)},typeof e=="function"&&(s.onupgradeneeded=c=>{e(c,a)})})}function on(i,o,t,e,n){if(!i)return;let r=i.open(o,t);r.onupgradeneeded=s=>{let a=s.target.result;e.forEach(l=>{if(!a.objectStoreNames.contains(l.store)){let d=a.createObjectStore(l.store,l.storeConfig);l.storeSchema.forEach(u=>{d.createIndex(u.name,u.keypath,u.options)})}});let c=n&&n();c&&Object.keys(c).map(l=>parseInt(l,10)).filter(l=>l>s.oldVersion).sort((l,d)=>l-d).forEach(l=>{c[l](a,r.transaction)}),a.close()},r.onsuccess=s=>{s.target.result.close()}}function _i(i,o,t){if(!i||!o||!t)throw Error('Params: "dbName", "version", "storeName" are mandatory.');return new m(e=>{try{let n=o+1,r=indexedDB.open(i,n);r.onupgradeneeded=s=>{let a=s.target.result;a.deleteObjectStore(t),a.close(),console.log("onupgradeneeded"),e.next(!0),e.complete()},r.onerror=s=>e.error(s)}catch(n){e.error(n)}})}function Ci(i,o){return i.objectStoreNames.contains(o)}function E(i,o,t){i||t("You need to use the openDatabase function to create a database before you query it!"),Ci(i,o)||t(`objectStore does not exists: ${o}`)}function y(i,o){let t=i.transaction(o.storeName,o.dbMode);return t.onerror=o.error,t.onabort=o.abort,t}function _(i,o,t,e){return{storeName:o,dbMode:i,error:n=>{t(n)},abort:n=>{t(n)}}}var w=function(i){return i.readonly="readonly",i.readwrite="readwrite",i}(w||{}),rn=new S(null),ct=(()=>{class i{constructor(t,e){if(this.dbConfig=t,this.platformId=e,!t.name)throw new Error("NgxIndexedDB: Please, provide the dbName in the configuration");if(!t.version)throw new Error("NgxIndexedDB: Please, provide the db version in the configuration");this.isBrowser=Ct(this.platformId),this.isBrowser&&(this.indexedDB=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB,on(this.indexedDB,t.name,t.version,t.objectStoresMeta,t.migrationFactory),v(this.indexedDB,t.name).then(n=>{n.version!==t.version&&(this.dbConfig.version=n.version)}))}createObjectStore(t,e){let n=[t];on(this.indexedDB,this.dbConfig.name,++this.dbConfig.version,n,e)}add(t,e,n){return new m(r=>{v(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(s=>{let c=y(s,_(w.readwrite,t,d=>r.error(d))).objectStore(t),l=n?c.add(e,n):c.add(e);l.onsuccess=d=>D(this,null,function*(){let u=d.target.result,p=c.get(u);p.onsuccess=f=>{r.next(f.target.result),r.complete()}})}).catch(s=>r.error(s))})}bulkAdd(t,e){let n=new Promise((r,s)=>{v(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(a=>{let l=y(a,_(w.readwrite,t,r,s)).objectStore(t),d=e.map(u=>new Promise((p,f)=>{let q=u.key;delete u.key;let j=q?l.add(u,q):l.add(u);j.onsuccess=A=>{let me=A.target.result;p(me)}}));r(Promise.all(d))}).catch(a=>s(a))});return z(n)}bulkDelete(t,e){let n=e.map(r=>new Promise((s,a)=>{v(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(c=>{let l=y(c,_(w.readwrite,t,a,s));l.objectStore(t).delete(r),l.oncomplete=()=>{this.getAll(t).pipe(Se(1)).subscribe(u=>{s(u)})}}).catch(c=>a(c))}));return z(Promise.all(n))}getByKey(t,e){return new m(n=>{v(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(r=>{let c=y(r,_(w.readonly,t,n.error)).objectStore(t).get(e);c.onsuccess=l=>{n.next(l.target.result),n.complete()},c.onerror=l=>{n.error(l)}}).catch(r=>n.error(r))})}bulkGet(t,e){let n=e.map(r=>this.getByKey(t,r));return new m(r=>{dt(n).subscribe(s=>{r.next(s),r.complete()})})}getByID(t,e){return new m(n=>{v(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(r=>{E(r,t,l=>n.error(l));let c=y(r,_(w.readonly,t,n.error,n.next)).objectStore(t).get(e);c.onsuccess=l=>{n.next(l.target.result)}}).catch(r=>n.error(r))})}getByIndex(t,e,n){return new m(r=>{v(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(s=>{E(s,t,u=>r.error(u));let d=y(s,_(w.readonly,t,r.error)).objectStore(t).index(e).get(n);d.onsuccess=u=>{r.next(u.target.result),r.complete()}}).catch(s=>r.error(s))})}getAll(t){return new m(e=>{v(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(n=>{E(n,t,c=>e.error(c));let a=y(n,_(w.readonly,t,e.error,e.next)).objectStore(t).getAll();a.onerror=c=>{e.error(c)},a.onsuccess=({target:{result:c}})=>{e.next(c),e.complete()}}).catch(n=>e.error(n))})}update(t,e){return new m(n=>{v(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(r=>{E(r,t,l=>n.error(l));let a=y(r,_(w.readwrite,t,l=>n.error(l))).objectStore(t),c=a.put(e);c.onsuccess=l=>D(this,null,function*(){let d=l.target.result,u=a.get(d);u.onsuccess=p=>{n.next(p.target.result),n.complete()}})}).catch(r=>n.error(r))})}delete(t,e){return new m(n=>{v(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(r=>{E(r,t,c=>n.error(c));let s=y(r,_(w.readwrite,t,c=>n.error(c)));s.objectStore(t).delete(e),s.oncomplete=()=>{this.getAll(t).pipe(Se(1)).subscribe(c=>{n.next(c),n.complete()})}}).catch(r=>n.error(r))})}deleteByKey(t,e){return new m(n=>{v(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(r=>{E(r,t,c=>n.error(c));let s=y(r,_(w.readwrite,t,c=>n.error(c))),a=s.objectStore(t);s.oncomplete=()=>{n.next(!0),n.complete()},a.delete(e)}).catch(r=>n.error(r))})}clear(t){return new m(e=>{v(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(n=>{E(n,t,a=>e.error(a));let r=y(n,_(w.readwrite,t,a=>e.error(a)));r.objectStore(t).clear(),r.oncomplete=()=>{e.next(!0),e.complete()}}).catch(n=>e.error(n))})}deleteDatabase(){return new m(t=>{v(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(e=>D(this,null,function*(){yield e.close();let n=this.indexedDB.deleteDatabase(this.dbConfig.name);n.onsuccess=()=>{t.next(!0),t.complete()},n.onerror=r=>t.error(r),n.onblocked=()=>{throw new Error("Unable to delete database because it's blocked")}})).catch(e=>t.error(e))})}openCursor(t,e){return new m(n=>{v(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(r=>{E(r,t,l=>n.error(l));let a=y(r,_(w.readonly,t,n.error)).objectStore(t),c=e===void 0?a.openCursor():a.openCursor(e);c.onsuccess=l=>{n.next(l),n.complete()}}).catch(r=>n.error(r))})}openCursorByIndex(t,e,n,r=w.readonly){let s=new x;return v(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(a=>{E(a,t,p=>{s.error(p)});let u=y(a,_(r,t,p=>{s.error(p)},()=>{s.next()})).objectStore(t).index(e).openCursor(n);u.onsuccess=p=>{s.next(p)}}).catch(a=>s.error(a)),s}getAllByIndex(t,e,n){let r=[];return new m(s=>{v(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(a=>{E(a,t,p=>s.error(p));let u=y(a,_(w.readonly,t,s.error)).objectStore(t).index(e).openCursor(n);u.onsuccess=p=>{let f=p.target.result;f?(r.push(f.value),f.continue()):(s.next(r),s.complete())}}).catch(a=>s.error(a))})}getAllKeysByIndex(t,e,n){let r=[];return new m(s=>{v(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(a=>{E(a,t,p=>s.error(p));let u=y(a,_(w.readonly,t,s.error)).objectStore(t).index(e).openKeyCursor(n);u.onsuccess=p=>{let f=p.target.result;f?(r.push({primaryKey:f.primaryKey,key:f.key}),f.continue()):(s.next(r),s.complete())}}).catch(a=>s.error(a))})}count(t,e){return new m(n=>{v(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(r=>{E(r,t,l=>n.error(l));let c=y(r,_(w.readonly,t,n.error)).objectStore(t).count(e);c.onerror=l=>n.error(l),c.onsuccess=l=>{n.next(l.target.result),n.complete()}}).catch(r=>n.error(r))})}countByIndex(t,e,n){return new m(r=>{v(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(s=>{E(s,t,u=>r.error(u));let d=y(s,_(w.readonly,t,r.error)).objectStore(t).index(e).count(n);d.onerror=u=>r.error(u),d.onsuccess=u=>{r.next(u.target.result),r.complete()}}).catch(s=>r.error(s))})}deleteObjectStore(t){return _i(this.dbConfig.name,++this.dbConfig.version,t)}}return i.\u0275fac=function(t){return new(t||i)(h(rn),h(te))},i.\u0275prov=b({token:i,factory:i.\u0275fac}),i})(),or=(()=>{class i{static forRoot(t){return{ngModule:i,providers:[ct,{provide:rn,useValue:t}]}}}return i.\u0275fac=function(t){return new(t||i)},i.\u0275mod=U({type:i}),i.\u0275inj=W({imports:[[_t]]}),i})();var sn=(()=>{let o=class o{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(M(s=>e))}getCategoriesByChannelType(e){let n=this.getKey(e);return this.db.getByKey(this.DATABASE,n)}getKey(e){let n="";switch(e){case Le.Lazada:n="Lazada";break;case Le.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}};o.\u0275fac=function(n){return new(n||o)(h(ct))},o.\u0275prov=b({token:o,factory:o.\u0275fac,providedIn:"root"});let i=o;return i})();var an=(()=>{let o=class o{constructor(){}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=C(C({},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 ue.IsEmpty(e?.hide_default_launcher)?!1:e?.hide_default_launcher}};o.\u0275fac=function(n){return new(n||o)},o.\u0275prov=b({token:o,factory:o.\u0275fac,providedIn:"root"});let i=o;return i})();var Ys=(()=>{let o=class o{constructor(e,n,r,s,a,c,l){this.httpService=e,this.tokenDecodeService=n,this.afAuth=r,this.ngxPermission=s,this.localDataService=a,this.router=c,this.intercomService=l,this.channels=[]}login(e){return this.httpService.post("/api/token/Login",e).pipe(oe(n=>{this.setLocalStorage(n,e.Host,e.Username),this.loadPermissions()}))}getNews(){return this.httpService.get(Mt.news).pipe(M(e=>e?.items?.map(n=>n?.properties)))}loginWithGoogle(e,n){e.preventDefault();let r=new Ke;return r.setCustomParameters({prompt:"select_account"}),z(this.afAuth.signInWithPopup(r)).pipe(M(s=>s.credential),M(s=>s.idToken),B(s=>this.httpService.post("/api/token/LoginWithSocialProvider",JSON.stringify({IDToken:s,Host:n}))),oe(s=>{this.setLocalStorage(s,n,null),this.loadPermissions()}))}setLocalStorage(e,n,r){localStorage.setItem("user",JSON.stringify(e)),localStorage.setItem("Authorization",JSON.stringify({Host:n,username:r})),localStorage.setItem("channels",JSON.stringify(e.Channels)),this.intercomService.updateLocalStorage(e.IntercomWidget),this.intercomService.inititalizeIntercom()}loadPermissions(){this.ngxPermission.loadPermissions([]);let e=localStorage.getItem("user");if(ue.IsNotEmpty(e)){let n=this.tokenDecodeService.GetRoles();this.ngxPermission.loadPermissions(n)}}getChannels(){let e=JSON.parse(JSON.stringify(this.channels));if(this.channels.length===0){let n=localStorage.getItem("channels");n?(this.channels=JSON.parse(n),e=JSON.parse(JSON.stringify(this.channels))):(this.channels=[],e=[])}return e=this.setChannelLogo(e),e}setChannelLogo(e){return e=e.map(n=>(n.Img=ue.getChannelLogoByTypeId(n.TypeID),n)),e}logout(){this.clearLocalStorage(),this.ngxPermission.flushPermissions()}isActiveToken(){let e=JSON.parse(window.localStorage.getItem("user")),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("Authorization");this.domain="https://"+JSON.parse(e).Host}return this.domain}clearLocalStorage(){this.domain=null,this.channels=[],localStorage.removeItem("channels"),localStorage.removeItem("user"),this.intercomService.shutdown(),this.localDataService.clearDatabase(),this.router.navigate([""])}};o.\u0275fac=function(n){return new(n||o)(h(St),h(Nt),h(at),h(jt),h(sn),h(kt),h(an))},o.\u0275prov=b({token:o,factory:o.\u0275fac,providedIn:"root"});let i=o;return i})();export{Nt as a,Mt as b,ne as c,Lt as d,Cn as e,zi as f,co as g,Jo as h,or as i,sn as j,Ys as k};
@@ -1 +0,0 @@
1
- import{b as z}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.11.0/Marketplace/chunk-L24M3VHE.js";import{a as j}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.11.0/Marketplace/chunk-2UTL7SZX.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.11.0/Marketplace/chunk-P5WTJZG7.js";import{a as q,b as x}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.11.0/Marketplace/chunk-MPUYSITZ.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.11.0/Marketplace/chunk-YCAHOBTV.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.11.0/Marketplace/chunk-IDA3BCQ7.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.11.0/Marketplace/chunk-U4LOMDYT.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.11.0/Marketplace/chunk-N5F5D3WX.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.11.0/Marketplace/chunk-7B2VFEDY.js";import{C as O,D as H}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.11.0/Marketplace/chunk-3K7JH744.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.11.0/Marketplace/chunk-NRSNSW7E.js";import{c as w,h as B,k as N,u as $}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.11.0/Marketplace/chunk-YUB56KZH.js";import{$a as n,Ac as k,Fb as u,Ga as o,Gb as c,Ha as S,Hb as _,Q as h,Qa as m,Ta as I,Wa as M,ab as i,ac as F,ea as C,ec as E,fc as A,hc as T,ic as R,jb as g,q as v,rb as r,tb as f,wb as b,xb as L,yb as P,yc as D}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.11.0/Marketplace/chunk-5MULKC5W.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.11.0/Marketplace/chunk-6REOMLA7.js";var V=()=>["/menu/log/inventory-async/detail"],G=a=>({ID:a});function J(a,l){if(a&1&&(n(0,"tr")(1,"td")(2,"a",14),r(3),u(4,"date"),i()(),n(5,"td"),r(6),u(7,"number"),i(),n(8,"td")(9,"span",15),r(10),i()()()),a&2){let t=l.$implicit;o(2),m("routerLink",L(13,V))("queryParams",P(14,G,t._id)),o(1),f(" ",_(4,7,t==null?null:t._source["@timestamp"],"dd MMM yyyy HH:mm:ss")," "),o(3),f(" ",_(7,10,t.DurationInSecond,"1.1-1")," s "),o(3),I((t==null||t._source==null||t._source.log==null?null:t._source.log.respCode)===200||(t==null||t._source==null||t._source.log==null?null:t._source.log.respCode)===202?"bg-success":"bg-warning"),o(1),f(" ",t==null||t._source==null||t._source.log==null?null:t._source.log.respCode," ")}}var le=(()=>{let l=class l{constructor(p){this.inventoryAsyncServiceLog=p,this.filters={PageNumber:1,RowCount:100,From:null,To:null,StatusCode:""}}ngOnInit(){this.initInventoryLog()}initInventoryLog(){let p=this.inventoryAsyncServiceLog.getInventoryAsyncLog(this.filters).pipe(h(1));this.inventoryLog$=p.pipe(v(s=>s?.hits)),this.totalPagination$=p.pipe(v(s=>s?.total.value))}onPaginationChange(p){this.filters.PageNumber=p.pageIndex+1,this.initInventoryLog()}onSubmitFilter(){this.initInventoryLog()}};l.\u0275fac=function(s){return new(s||l)(S(j))},l.\u0275cmp=C({type:l,selectors:[["app-inventory-async-log"]],standalone:!0,features:[b],decls:33,vars:16,consts:[["headerTitle","Async Inventory",3,"hideSearchBox","onSubmit"],["container",""],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],[1,"mt-5"],["type","text","name","StatusCode",1,"w-100","mt-2","form-control",3,"ngModel","ngModelChange"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col"],[1,"table-responsive"],[1,"table","table-hover"],[1,"table-light"],[4,"ngFor","ngForOf"],[3,"length","pageSize","pageIndex","page"],[3,"routerLink","queryParams"],[1,"text-white","p-2","rounded","response-desc"]],template:function(s,e){s&1&&(n(0,"mainpanel",0),g("onSubmit",function(){return e.onSubmitFilter()}),n(1,"filters")(2,"div",1)(3,"div")(4,"label"),r(5,"From/To"),i(),n(6,"datepicker",2),g("dateChange",function(d){return e.filters.From=d}),i(),n(7,"datepicker",3),g("dateChange",function(d){return e.filters.To=d}),i()(),n(8,"div",4)(9,"label"),r(10,"Response Code"),i(),n(11,"input",5),g("ngModelChange",function(d){return e.filters.StatusCode=d}),i()()()(),n(12,"content")(13,"div",6)(14,"div",7)(15,"div",8)(16,"div",9)(17,"table",10)(18,"thead")(19,"tr",11)(20,"th"),r(21,"Created"),i(),n(22,"th"),r(23,"Duration"),i(),n(24,"th"),r(25,"Response code"),i()()(),n(26,"tbody"),M(27,J,11,16,"tr",12),u(28,"async"),i()(),n(29,"mat-paginator",13),g("page",function(d){return e.onPaginationChange(d)}),u(30,"async"),u(31,"async"),u(32,"async"),i()()()()()()()),s&2&&(m("hideSearchBox",!0),o(6),m("date",e.filters.From),o(1),m("date",e.filters.To),o(4),m("ngModel",e.filters.StatusCode),o(16),m("ngForOf",c(28,8,e.inventoryLog$)),o(2),m("length",c(30,10,e.totalPagination$))("pageSize",e.filters.RowCount>c(31,12,e.totalPagination$)?c(32,14,e.totalPagination$):e.filters.RowCount)("pageIndex",(e.filters==null?null:e.filters.PageNumber)==0?0:(e.filters==null?null:e.filters.PageNumber)-1))},dependencies:[$,w,B,N,R,F,E,T,A,H,O,x,q,z,k,D]});let a=l;return a})();export{le as InventoryAsyncLogComponent};