marketplacepos 2.4.2 → 2.4.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 (30) hide show
  1. package/Marketplace/102.00a16fb36f5a57f2.js +1 -0
  2. package/Marketplace/162.9784f9e579112c86.js +1 -0
  3. package/Marketplace/285.7583f3169c88c210.js +1 -0
  4. package/Marketplace/387.10f091023152d154.js +1 -0
  5. package/Marketplace/402.60951eab064c9706.js +1 -0
  6. package/Marketplace/{458.12f2630e8891b53a.js → 458.556f206f7d19bc29.js} +1 -1
  7. package/Marketplace/616.fb179a9605c3e98c.js +1 -0
  8. package/Marketplace/667.b7320f874219caa9.js +1 -0
  9. package/Marketplace/785.a0973529f8e8819e.js +1 -0
  10. package/Marketplace/796.d34bd45b5a924fca.js +1 -0
  11. package/Marketplace/874.9879a8b9489c9845.js +1 -0
  12. package/Marketplace/882.5d3edc53a8e4c38e.js +1 -0
  13. package/Marketplace/index.html +2 -2
  14. package/Marketplace/runtime.9cbc4802b0456746.js +1 -0
  15. package/Marketplace/scripts.09af772bfa77d50d.js +1 -0
  16. package/Marketplace/{styles.296cdf56f9059ddb.css → styles.f8366e17917068bd.css} +2 -21
  17. package/package.json +1 -1
  18. package/Marketplace/102.635de205af00df15.js +0 -1
  19. package/Marketplace/162.fb6aac67d4ab0ff8.js +0 -1
  20. package/Marketplace/285.1f547ef81e91fc15.js +0 -1
  21. package/Marketplace/387.f8d525b15c777074.js +0 -1
  22. package/Marketplace/402.2999196dce334514.js +0 -1
  23. package/Marketplace/616.507588c0a5d7b9e1.js +0 -1
  24. package/Marketplace/667.d0658dfbb8c75eb3.js +0 -1
  25. package/Marketplace/796.3be8ad424aad7864.js +0 -1
  26. package/Marketplace/801.8eb1454f763d4534.js +0 -1
  27. package/Marketplace/874.947c66675e9d3698.js +0 -1
  28. package/Marketplace/882.1c9c716bbdb403b5.js +0 -1
  29. package/Marketplace/runtime.d2e34b8aa2806626.js +0 -1
  30. package/Marketplace/scripts.6c7ffbfab0ec93ff.js +0 -1
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkpos_marketplace=self.webpackChunkpos_marketplace||[]).push([[667],{1667:(Je,Tt,u)=>{u.r(Tt),u.d(Tt,{ProductModule:()=>Ae});var c=u(6895),vt=u(7398),v=u(4006),pt=u(8252),t=u(4650);let At=(()=>{class e{constructor(){this.productTabs=[{Title:"Sold in Channel",Url:"/menu/products/sold-in-channel",Description:"SKU has been mapped between dealpos and marketplace"},{Title:"Not in POS",Url:"/menu/products/not-in-pos",Description:"SKU sold in Marketplace but not exist in DEALPOS"},{Title:"Not in Channel",Url:"/menu/products/not-in-channel",Description:"SKU has not been sold on one of channels"},{Title:"In POS",Url:"/menu/products/in-pos",Description:"Products have been registered in POS"},{Title:"Duplicate SKU",Url:"/menu/products/duplicate-sku",Description:"SKU has more than one different product name"}]}}return e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=t.Xpm({type:e,selectors:[["app-products"]],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){1&n&&(t.TgZ(0,"nav",0)(1,"div",1)(2,"div"),t._UZ(3,"nav-tab",2),t.qZA()()(),t._UZ(4,"router-outlet")),2&n&&(t.xp6(3),t.Q6J("Tabs",o.productTabs))},dependencies:[vt.e,pt.lC],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}}"]}),e})();class z{}var U=u(8231),m=u(5412),St=u(3900),Dt=u(9646),Jt=u(9568),J=u(1318);let yt=(()=>{class e{constructor(n,o){this.LocalData=n,this.httpService=o}getCategoriesByTypeId(n){return this.LocalData.getCategoriesByChannelType(n).pipe((0,St.w)(o=>null!=o?(0,Dt.of)(o):this._getCategoriesByTypeID(n)))}_getCategoriesByTypeID(n){return this.httpService.post("/api/Channel/getCategoriesByTypeID",{TypeID:n}).pipe((0,St.w)(i=>this.LocalData.saveCategoriesByChannelType(i,n)))}}return e.\u0275fac=function(n){return new(n||e)(t.LFG(Jt.T),t.LFG(J.O))},e.\u0275prov=t.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();var wt=u(8966);function Et(e,a){if(1&e){const n=t.EpF();t.ynx(0),t.TgZ(1,"h5",4),t._uU(2,"Category"),t.qZA(),t.TgZ(3,"app-select-search",10),t.NdJ("onSelect",function(i){t.CHM(n);const l=t.oxw();return t.KtG(l.onSelectCategory(i))}),t.qZA(),t.BQk()}if(2&e){const n=t.oxw();t.xp6(3),t.Q6J("appearance","outline")("batchSize",30)("data",n.options)("bindLabel","Value")("bindValue","Key")("placeholder","Select Category")}}let It=(()=>{class e{constructor(n,o,i,l){this.data=n,this.channelCategoriesService=o,this.http=i,this.dialogRef=l,this.item=n.item,this.selectItemMissingChannel=n.selectedItemMissingChannel,this.options=[],this.optionVisible=!1}onSelectItem(n){this.selectedChannelID=n;let o=this.selectItemMissingChannel.find(i=>i.ID==n);!o||1!==o.TypeID&&7!==o.TypeID?this.optionVisible=!1:this.channelCategoriesService.getCategoriesByTypeId(o.TypeID).subscribe({next:i=>{this.options=i,this.optionVisible=!0},error:i=>{console.error(i)}})}onSelectCategory(n){this.selectedCategoryID=n}onClose(){this.dialogRef.close()}onSave(){this.selectedChannelID&&(this.selectedCategoryID||!this.optionVisible)&&this.dialogRef.close({channelID:this.selectedChannelID,categoryID:this.selectedCategoryID})}}return e.\u0275fac=function(n){return new(n||e)(t.Y36(m.WI),t.Y36(yt),t.Y36(J.O),t.Y36(m.so))},e.\u0275cmp=t.Xpm({type:e,selectors:[["app-uploadProductDialog"]],decls:16,vars:7,consts:[["mat-dialog-title","",1,"pt-2","pb-3"],[1,"py-5","mt-4","mx-0","border-top","border-bottom"],[1,"row"],[1,"col-12"],[1,"mb-3","fw-normal"],[3,"appearance","data","bindLabel","bindValue","placeholder","onSelect"],[4,"ngIf"],[1,"justify-content-end","mx-4"],["mat-button","",1,"btn","btn-light","mx-3",3,"click"],["mat-button","","data-cy","scan",1,"btn","btn-success","mx-3",3,"click"],[3,"appearance","batchSize","data","bindLabel","bindValue","placeholder","onSelect"]],template:function(n,o){1&n&&(t.TgZ(0,"h1",0),t._uU(1),t.qZA(),t.TgZ(2,"mat-dialog-content",1)(3,"div",2)(4,"div",3)(5,"h5",4),t._uU(6,"Channel :"),t.qZA(),t.TgZ(7,"app-select-search",5),t.NdJ("onSelect",function(l){return o.onSelectItem(l)}),t.qZA()()(),t.TgZ(8,"div",2)(9,"div",3),t.YNc(10,Et,4,6,"ng-container",6),t.qZA()()(),t.TgZ(11,"mat-dialog-actions",7)(12,"button",8),t.NdJ("click",function(){return o.onClose()}),t._uU(13,"Cancel"),t.qZA(),t.TgZ(14,"button",9),t.NdJ("click",function(){return o.onSave()}),t._uU(15,"Upload"),t.qZA()()),2&n&&(t.xp6(1),t.hij("Upload ",null==o.item?null:o.item.Name,""),t.xp6(6),t.Q6J("appearance","outline")("data",o.selectItemMissingChannel)("bindLabel","Name")("bindValue","ID")("placeholder","Choose "),t.xp6(3),t.Q6J("ngIf",o.optionVisible))},dependencies:[c.O5,m.uh,m.xY,m.H8,wt.h],styles:["mat-form-field[_ngcontent-%COMP%]{width:100%;height:100%}.mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}"]}),e})();var s=u(3154),F=u(266);function qt(e,a){if(1&e&&(t.ynx(0),t.TgZ(1,"tr")(2,"td",11),t._uU(3),t.qZA(),t.TgZ(4,"td",11),t._uU(5),t.qZA(),t.TgZ(6,"td",12)(7,"p",13),t._uU(8,"Product Not in Channel!"),t.qZA()()(),t.BQk()),2&e){const n=t.oxw().$implicit;t.xp6(3),t.hij(" ",null==n?null:n.Model,""),t.xp6(2),t.hij(" ",null==n?null:n.Code,"")}}function Lt(e,a){if(1&e&&(t.TgZ(0,"td",11),t._uU(1),t.qZA()),2&e){const n=t.oxw(3).$implicit;t.uIk("rowspan",n.Channel.length),t.xp6(1),t.hij(" ",null==n?null:n.Model,"")}}function Qt(e,a){if(1&e&&(t.TgZ(0,"td",11),t._uU(1),t.qZA()),2&e){const n=t.oxw(3).$implicit;t.uIk("rowspan",n.Channel.length),t.xp6(1),t.hij(" ",null==n?null:n.Code,"")}}function Bt(e,a){if(1&e&&(t.TgZ(0,"tr"),t.YNc(1,Lt,2,2,"td",14),t.YNc(2,Qt,2,2,"td",14),t.TgZ(3,"td",11)(4,"div",15)(5,"a",16),t._UZ(6,"img",17),t.qZA(),t.TgZ(7,"div",18),t._uU(8),t.qZA()()(),t.TgZ(9,"td",11),t._uU(10),t.ALo(11,"number"),t.qZA(),t.TgZ(12,"td",19),t._uU(13),t.ALo(14,"number"),t.qZA()()),2&e){const n=a.$implicit,o=a.index,i=t.oxw(3);t.xp6(1),t.Q6J("ngIf",0==o),t.xp6(1),t.Q6J("ngIf",0==o),t.xp6(3),t.Q6J("href",n.Url,t.LSH)("title",n.Title),t.xp6(1),t.Q6J("src",i.getChannelLogo(n.TypeID),t.LSH),t.xp6(1),t.Q6J("matTooltip",(null==n||null==n.Name?null:n.Name.length)>55?null==n?null:n.Name:""),t.xp6(1),t.hij(" ",n.Name," "),t.xp6(2),t.Oqu(t.lcZ(11,9,n.Price)),t.xp6(3),t.Oqu(t.lcZ(14,11,n.Inventory))}}function Yt(e,a){if(1&e&&t.YNc(0,Bt,15,13,"tr",8),2&e){const n=t.oxw().$implicit;t.Q6J("ngForOf",null==n?null:n.Channel)}}function Vt(e,a){if(1&e&&(t.ynx(0),t.YNc(1,qt,9,2,"ng-container",9),t.YNc(2,Yt,1,1,"ng-template",null,10,t.W1O),t.BQk()),2&e){const n=a.$implicit,o=t.MAs(3);t.xp6(1),t.Q6J("ngIf",!n.Channel||n.Channel.length<1)("ngIfElse",o)}}let Mt=(()=>{class e{constructor(n){this.data=n,this.variants=n.variants,this.title=n.title}getChannelLogo(n){return s.g.getChannelLogoByTypeId(n)}}return e.\u0275fac=function(n){return new(n||e)(t.Y36(m.WI))},e.\u0275cmp=t.Xpm({type:e,selectors:[["app-modal-variant"]],decls:23,vars:2,consts:[["mat-dialog-title","",1,"pt-2","pb-3","text-center"],[1,"pb-5","px-3"],[1,"table"],[1,"sticky-top-thead","variant-modal"],[1,"text-start","sticky-top"],["matTooltip","Variant from POS",1,"fas","fa-info-circle","ms-1"],["matTooltip","Product and Variant from each Channel",1,"fas","fa-info-circle","ms-1"],[1,"text-start","sticky-top",2,"width","0%"],[4,"ngFor","ngForOf"],[4,"ngIf","ngIfElse"],["printChannelModal",""],[1,"text-start"],["colspan","3",1,"text-center"],[1,"my-auto"],["class","text-start",4,"ngIf"],[1,"d-flex"],["target","_blank",1,"me-1",3,"href","title"],[2,"width","20px","height","20px",3,"src"],[1,"text-ellipsis","ps-2",2,"max-width","18vw",3,"matTooltip"],[1,"text-center"]],template:function(n,o){1&n&&(t.TgZ(0,"h1",0),t._uU(1),t.qZA(),t._UZ(2,"hr"),t.TgZ(3,"mat-dialog-content",1)(4,"table",2)(5,"thead",3)(6,"tr")(7,"th",4),t._uU(8," VARIANT "),t.TgZ(9,"sup"),t._UZ(10,"i",5),t.qZA()(),t.TgZ(11,"th",4),t._uU(12,"SKU"),t.qZA(),t.TgZ(13,"th",4),t._uU(14," PRODUCT "),t.TgZ(15,"sup"),t._UZ(16,"i",6),t.qZA()(),t.TgZ(17,"th",4),t._uU(18,"PRICE"),t.qZA(),t.TgZ(19,"th",7),t._uU(20,"INVENTORY"),t.qZA()()(),t.TgZ(21,"tbody"),t.YNc(22,Vt,4,2,"ng-container",8),t.qZA()()()),2&n&&(t.xp6(1),t.Oqu(o.title),t.xp6(21),t.Q6J("ngForOf",o.variants))},dependencies:[c.sg,c.O5,m.uh,m.xY,F.gM,c.JJ],styles:[".mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}.sticky-top-thead[_ngcontent-%COMP%] th.sticky-top[_ngcontent-%COMP%]{top:0px}.table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] tr.sticky-top[_ngcontent-%COMP%]{border:none!important;border-bottom:1px solid!important}table[_ngcontent-%COMP%] > thead[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%]{border-top:none!important;border-left:none!important;border-right:none!important}.table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{background-color:#fff!important}.sticky-top-thead.variant-modal[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:last-child:after{border-right:0px!important}.sticky-top-thead.variant-modal[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:first-child:before{border-left:0px!important}.sticky-top-thead.variant-modal[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:before{border-top:0px}"]}),e})();var M=u(9300),$t=u(7579),Ht=u(2722),A=u(9694),R=u(6082),W=u(7185);function Rt(e,a){if(1&e){const n=t.EpF();t.TgZ(0,"th",13)(1,"input",14),t.NdJ("change",function(i){t.CHM(n);const l=t.oxw();return t.KtG(l.onSelectAllChannel(i.target.checked))}),t.qZA()()}}function Gt(e,a){1&e&&(t.ynx(0),t.TgZ(1,"th",15),t._uU(2,"Status"),t.qZA(),t.BQk())}function Kt(e,a){if(1&e){const n=t.EpF();t.TgZ(0,"td",15)(1,"input",22),t.NdJ("ngModelChange",function(i){t.CHM(n);const l=t.oxw().$implicit;return t.KtG(l.Selected=i)}),t.qZA()()}if(2&e){const n=t.oxw().$implicit;t.xp6(1),t.Q6J("ngModel",n.Selected)}}function jt(e,a){if(1&e){const n=t.EpF();t.ynx(0),t.TgZ(1,"app-select-search",23),t.NdJ("onSelect",function(i){t.CHM(n);const l=t.oxw().index,r=t.oxw();return t.KtG(r.onSelectCategory(i,l))}),t.qZA(),t.BQk()}if(2&e){const n=t.oxw().$implicit,o=t.oxw();t.xp6(1),t.Q6J("data",n.Categories)("batchSize",30)("disabled",o.uploadResponse.length>0)}}function zt(e,a){1&e&&(t.TgZ(0,"div",24),t._UZ(1,"input",25),t.qZA())}function Wt(e,a){if(1&e&&(t.TgZ(0,"span",29)(1,"a",30),t._UZ(2,"i",31),t.qZA()()),2&e){const n=t.oxw().$implicit;t.xp6(1),t.Q6J("href",n.URL,t.LSH)}}function Xt(e,a){if(1&e&&(t.TgZ(0,"span",32),t._uU(1," X "),t.qZA()),2&e){const n=t.oxw().$implicit;t.Q6J("matTooltip",n.Response)}}function tn(e,a){if(1&e&&(t.ynx(0),t.YNc(1,Wt,3,1,"span",27),t.YNc(2,Xt,2,1,"span",28),t.BQk()),2&e){const n=a.$implicit,o=t.oxw(2).$implicit;t.xp6(1),t.Q6J("ngIf",n.ChannelID==o.ID&&n.Status),t.xp6(1),t.Q6J("ngIf",n.ChannelID==o.ID&&!n.Status)}}function nn(e,a){if(1&e&&(t.ynx(0),t.TgZ(1,"td",26),t.YNc(2,tn,3,2,"ng-container",7),t.qZA(),t.BQk()),2&e){const n=t.oxw(2);t.xp6(2),t.Q6J("ngForOf",n.uploadResponse)}}const Ot=function(e){return{"ps-8":e}};function en(e,a){if(1&e&&(t.ynx(0),t.TgZ(1,"tr"),t.YNc(2,Kt,2,1,"td",16),t.TgZ(3,"td",17)(4,"div",18),t._UZ(5,"img",19),t.TgZ(6,"span",20),t._uU(7),t.qZA()()(),t.TgZ(8,"td"),t.YNc(9,jt,2,3,"ng-container",10),t.YNc(10,zt,2,0,"ng-template",null,21,t.W1O),t.qZA(),t.YNc(12,nn,3,1,"ng-container",6),t.qZA(),t.BQk()),2&e){const n=a.$implicit,o=t.MAs(11),i=t.oxw();t.xp6(2),t.Q6J("ngIf",0==i.uploadResponse.length),t.xp6(1),t.Q6J("ngClass",t.VKq(7,Ot,i.uploadResponse.length>0)),t.xp6(2),t.Q6J("src",n.Img,t.LSH),t.xp6(2),t.Oqu(n.Name),t.xp6(2),t.Q6J("ngIf",n.Categories.length>0)("ngIfElse",o),t.xp6(3),t.Q6J("ngIf",i.uploadResponse.length>0)}}function on(e,a){1&e&&(t.TgZ(0,"span"),t._uU(1," Cancel "),t.qZA())}function an(e,a){1&e&&t._uU(0," Close ")}function ln(e,a){if(1&e){const n=t.EpF();t.TgZ(0,"button",33),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.onSave())}),t._uU(1," Upload "),t.qZA()}if(2&e){const n=t.oxw();t.Q6J("disabled",!n.hasSelectedChannel())}}let Zt=(()=>{class e{constructor(n,o,i,l,r){this.data=n,this.channelService=o,this.productService=i,this.dialogRef=l,this.toastrService=r,this.channelOptions=[],this.uploadResponse=[],this.destroy$=new $t.x,this.uploadResponse=[],this.title=this.data.title,this.channels=this.data.channels,this.products=this.data.products}ngOnInit(){this.initChannelOptions(),this.initCategories()}initCategories(){this.filterChannelTypeId().forEach(o=>{this.channelService.getCategoriesByTypeId(o).pipe((0,Ht.R)(this.destroy$)).subscribe(i=>{this.setCategoriesChannelOption(o,i)})})}setCategoriesChannelOption(n,o){this.channelOptions=this.channelOptions.map(i=>(i.TypeID==n&&(i.Categories=o),i))}initChannelOptions(){this.channelOptions=this.channels.map(n=>({Name:n.Name,Img:n.Img,ID:n.ID,Selected:!1,CategoryID:0,TypeID:n.TypeID,Categories:[]}))}filterChannelTypeId(){return this.data.channels.map(o=>o.TypeID).filter((o,i,l)=>l.indexOf(o)==i).filter(o=>o==A.x.Lazada||o==A.x.Tokopedia)}onSelectCategory(n,o){this.channelOptions[o].CategoryID=n}onSelectAllChannel(n){this.channelOptions=this.channelOptions.map(o=>(o.Selected=n,o))}hasSelectedChannel(){return-1!==this.channelOptions.findIndex(n=>n.Selected)}onClose(){this.dialogRef.close(this.uploadResponse.length>0)}onSave(){if(!this.validateSelectedCategory())return void this.toastrService.warning("Category is required","Warning!");const n=this.channelOptions.filter(o=>o.Selected).map(o=>({CategoryID:o.CategoryID,ChannelID:o.ID}));this.submitToServer(n)}validateSelectedCategory(){return-1==this.channelOptions.filter(o=>o.Selected).filter(o=>o.TypeID==A.x.Lazada||o.TypeID==A.x.Tokopedia).findIndex(o=>0==o.CategoryID)}submitToServer(n){this.productService.uploadToMultipleChannel(this.products,n).subscribe({next:o=>{this.uploadResponse=o,this.filterChannelOptions()},error:o=>{console.error(o)}})}filterChannelOptions(){this.channelOptions=this.channelOptions.filter(n=>-1!==this.uploadResponse.findIndex(o=>o.ChannelID==n.ID))}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}}return e.\u0275fac=function(n){return new(n||e)(t.Y36(m.WI),t.Y36(yt),t.Y36(R.M),t.Y36(m.so),t.Y36(W._W))},e.\u0275cmp=t.Xpm({type:e,selectors:[["app-modal-uploadMultiple-product"]],decls:21,vars:10,consts:[["mat-dialog-title","",1,"pt-1","pb-1","text-center"],[1,"px-1"],[1,"table"],["style","width: 6%","class","text-center",4,"ngIf"],[2,"width","30%",3,"ngClass"],[2,"width","60%"],[4,"ngIf"],[4,"ngFor","ngForOf"],[1,"d-flex","justify-content-end","pe-8"],["mat-button","",1,"btn","btn-light","mx-3",3,"click"],[4,"ngIf","ngIfElse"],["CLOSE",""],["mat-button","","data-cy","scan","class","btn btn-success mx-3",3,"disabled","click",4,"ngIf"],[1,"text-center",2,"width","6%"],["type","checkbox",3,"change"],[1,"text-center"],["class","text-center",4,"ngIf"],[3,"ngClass"],[1,"d-flex","align-items-center"],["alt","",1,"channel-logo",3,"src"],[1,"ms-3"],["EMPTY",""],["type","checkbox",3,"ngModel","ngModelChange"],["appearance","outline","bindLabel","Value","bindValue","Key","placeholder","Select Category",3,"data","batchSize","disabled","onSelect"],["matTooltip","Cannot choose category Product, Please change category after uploading in seller center","matTooltipPosition","above"],["type","text","disabled","","placeholder","Unavailable Category",1,"form-control","rounded",2,"height","40px"],[1,"text-center","fw-bold","fs-4"],["matTooltip","Upload Success",4,"ngIf"],["class","cursor-pointer text-danger",3,"matTooltip",4,"ngIf"],["matTooltip","Upload Success"],["target","_blank",3,"href"],[1,"fa","fa-check","text-success"],[1,"cursor-pointer","text-danger",3,"matTooltip"],["mat-button","","data-cy","scan",1,"btn","btn-success","mx-3",3,"disabled","click"]],template:function(n,o){if(1&n&&(t.TgZ(0,"h1",0),t._uU(1),t.qZA(),t._UZ(2,"hr"),t.TgZ(3,"mat-dialog-content",1)(4,"table",2)(5,"thead")(6,"tr"),t.YNc(7,Rt,2,0,"th",3),t.TgZ(8,"th",4),t._uU(9," CHANNEL "),t.qZA(),t.TgZ(10,"th",5),t._uU(11,"CATEGORY"),t.qZA(),t.YNc(12,Gt,3,0,"ng-container",6),t.qZA()(),t.TgZ(13,"tbody"),t.YNc(14,en,13,9,"ng-container",7),t.qZA()()(),t.TgZ(15,"mat-dialog-actions",8)(16,"button",9),t.NdJ("click",function(){return o.onClose()}),t.YNc(17,on,2,0,"span",10),t.YNc(18,an,1,0,"ng-template",null,11,t.W1O),t.qZA(),t.YNc(20,ln,2,1,"button",12),t.qZA()),2&n){const i=t.MAs(19);t.xp6(1),t.hij(" ",o.title,"\n"),t.xp6(6),t.Q6J("ngIf",0==o.uploadResponse.length),t.xp6(1),t.Q6J("ngClass",t.VKq(8,Ot,o.uploadResponse.length>0)),t.xp6(4),t.Q6J("ngIf",o.uploadResponse.length>0),t.xp6(2),t.Q6J("ngForOf",o.channelOptions),t.xp6(3),t.Q6J("ngIf",0==o.uploadResponse.length)("ngIfElse",i),t.xp6(3),t.Q6J("ngIf",0==o.uploadResponse.length)}},dependencies:[c.mk,c.sg,c.O5,v.Wl,v.JJ,v.On,m.uh,m.xY,m.H8,F.gM,wt.h],styles:["input[type=checkbox][_ngcontent-%COMP%]{width:15px;height:15px}img.channel-logo[_ngcontent-%COMP%]{width:24px;height:24px}table[_ngcontent-%COMP%] > thead[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%]{border-top:none!important;border-left:none!important;border-right:none!important}"]}),e})();var Y=u(7481);let f,Nt,p,h,T,O,V,Z,D,E,ut,X,w,kt,S,q,tt,nt,et,ot,N,ht;const it=[];let at,gt,G,mt,lt,rt,g,_,$,ct,x,L={};const C="appendChild",b="createElement",I="removeChild";function Ut(){const{top:e,left:a,width:n,height:o}=f.getBoundingClientRect();return`transform:translate3D(${a-(p.clientWidth-n)/2}px, ${e-(p.clientHeight-o)/2}px, 0) scale3D(${f.clientWidth/h.clientWidth}, ${f.clientHeight/h.clientHeight}, 0)`}function k(e){const a=_.length-1;if(!w){if(e>0&&g===a||e<0&&!g){if(!x.loop)return P(T,""),void setTimeout(P,9,T,`animation:${e>0?"bpl":"bpf"} .3s;transition:transform .35s`);g=e>0?-1:a+1}if(g=Math.max(0,Math.min(g+e,a)),[g-1,g,g+1].forEach(o=>{if(o=Math.max(0,Math.min(o,a)),L[o])return;const i=_[o].src,l=document[b]("IMG");l.addEventListener("load",Ft.bind(null,i)),l.src=i,L[o]=l}),L[g].complete)return _t(e);w=!0,P(S,"opacity:.4;"),p[C](S),L[g].onload=()=>{N&&_t(e)},L[g].onerror=()=>{_[g]={error:"Error loading image"},N&&_t(e)}}}function _t(e){w&&(p[I](S),w=!1);const a=_[g];if(a.error)alert(a.error);else{const n=p.querySelector("img:last-of-type");T=h=L[g],P(T,`animation:${e>0?"bpfl":"bpfr"} .35s;transition:transform .35s`),P(n,`animation:${e>0?"bpfol":"bpfor"} .35s both`),p[C](T),a.el&&(f=a.el)}$.innerHTML=`${g+1}/${_.length}`,st(_[g].caption),mt&&mt([T,_[g]])}function Ct(){let e,a;const n=.95*window.innerHeight,o=.95*window.innerWidth,i=n/o,[l,r]=x.dimensions||[1920,1080],d=r/l;d>i?(e=Math.min(r,n),a=e/d):(a=Math.min(l,o),e=a*d),Z.style.cssText+=`width:${a}px;height:${e}px;`}function ft(e){~[1,4].indexOf(h.readyState)?(Q(),setTimeout(()=>{h.play()},99)):h.error?Q(e):kt=setTimeout(ft,35,e)}function H(e){x.noLoader||(e&&P(S,`top:${f.offsetTop}px;left:${f.offsetLeft}px;height:${f.clientHeight}px;width:${f.clientWidth}px`),f.parentElement[e?C:I](S),w=e)}function st(e){e&&(tt.innerHTML=e),P(q,"opacity:"+(e?"1;pointer-events:auto":"0"))}function Ft(e){!~it.indexOf(e)&&it.push(e)}function Q(e){if(w&&H(),gt&&gt(),"string"==typeof e)return bt(),x.onError?x.onError():alert(`Error: The requested ${e} could not be loaded.`);at&&Ft(E),h.style.cssText+=Ut(),P(p,"opacity:1;pointer-events:auto"),G&&(G=setTimeout(G,410)),ot=!0,N=!!_,setTimeout(()=>{h.style.cssText+="transition:transform .35s;transform:none",nt&&setTimeout(st,250,nt)},60)}function xt(e){const a=e?e.target:p,n=[q,et,O,V,tt,rt,lt,S];a.blur(),!ht&&!~n.indexOf(a)&&(h.style.cssText+=Ut(),P(p,"pointer-events:auto"),setTimeout(bt,350),clearTimeout(G),ot=!1,ht=!0)}function bt(){if((h===Z?D:h).removeAttribute("src"),document.body[I](p),p[I](h),P(p,""),P(h,""),st(!1),N){const a=p.querySelectorAll("img");for(let n=0;n<a.length;n++)p[I](a[n]);w&&p[I](S),p[I]($),N=_=!1,L={},ct||p[I](lt),ct||p[I](rt),T.onload=Q,T.onerror=Q.bind(null,"image")}x.onClose&&x.onClose(),ht=w=!1}function P({style:e},a){e.cssText=a}function un(e,a){if(1&e){const n=t.EpF();t.ynx(0),t.TgZ(1,"img",18),t.NdJ("click",function(i){t.CHM(n);const l=t.oxw();return t.KtG(l.onZoomImage(i))}),t.qZA(),t.BQk()}if(2&e){const n=t.oxw();t.xp6(1),t.Q6J("src",n.image,t.LSH)}}function hn(e,a){1&e&&t._UZ(0,"img",19)}function gn(e,a){if(1&e){const n=t.EpF();t.TgZ(0,"div",20),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.onEventDesc())}),t._UZ(1,"i",21),t.TgZ(2,"span"),t._uU(3),t.qZA()()}if(2&e){const n=t.oxw();t.xp6(3),t.Oqu(n.code)}}function mn(e,a){if(1&e){const n=t.EpF();t.TgZ(0,"div",20),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.onEventDesc())}),t._UZ(1,"i",22),t.TgZ(2,"span"),t._uU(3),t.qZA()()}if(2&e){const n=t.oxw();t.xp6(3),t.Oqu(n.description)}}function _n(e,a){if(1&e){const n=t.EpF();t.TgZ(0,"div",23)(1,"input",24),t.NdJ("change",function(i){t.CHM(n);const l=t.oxw();return t.KtG(l.onCheck(i.target.checked))}),t.qZA()()}}function Cn(e,a){if(1&e){const n=t.EpF();t.TgZ(0,"button",25),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.onDownload())}),t._UZ(1,"i",26),t._uU(2," Download "),t.qZA()}}function fn(e,a){if(1&e){const n=t.EpF();t.TgZ(0,"button",25),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.onUpload())}),t._UZ(1,"i",27),t._uU(2," Upload "),t.qZA()}}function xn(e,a){if(1&e){const n=t.EpF();t.TgZ(0,"button",28),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.onScan())}),t._UZ(1,"i",29),t._uU(2," Scan "),t.qZA()}}const bn=function(e){return{"me-3":e}};function Pn(e,a){if(1&e&&(t.ynx(0),t.TgZ(1,"a",31),t._UZ(2,"img",32),t.qZA(),t.BQk()),2&e){const n=a.$implicit,o=a.index,i=t.oxw(2);t.xp6(1),t.s9C("href",n.Url,t.LSH),t.xp6(1),t.Q6J("ngClass",t.VKq(4,bn,o!=i.channels.length-1))("src",i.getChannelLogo(n),t.LSH)("matTooltip",n.Title?n.Title:n.Name)}}function Tn(e,a){if(1&e&&(t.ynx(0),t.YNc(1,Pn,3,6,"ng-container",30),t.BQk()),2&e){const n=t.oxw();t.xp6(1),t.Q6J("ngForOf",n.channels)}}const vn=function(e){return{"border-bottom pb-2":e}};function Sn(e,a){if(1&e&&(t.TgZ(0,"li")(1,"div",36)(2,"div",37)(3,"a",31),t._UZ(4,"img",38),t.TgZ(5,"span",39),t._uU(6),t.qZA()()()()()),2&e){const n=a.$implicit,o=a.index,i=t.oxw(2);t.xp6(2),t.Q6J("ngClass",t.VKq(4,vn,o!=i.channels.length-1)),t.xp6(1),t.Q6J("href",n.Url,t.LSH),t.xp6(1),t.Q6J("src",i.getChannelLogo(n),t.LSH),t.xp6(2),t.Oqu(n.Title)}}function yn(e,a){if(1&e&&(t.TgZ(0,"div",33)(1,"button",34),t._uU(2),t.qZA(),t.TgZ(3,"ul",35),t.YNc(4,Sn,7,6,"li",30),t.qZA()()),2&e){const n=t.oxw();t.xp6(2),t.hij(" ",n.channels.length," CHANNELS "),t.xp6(2),t.Q6J("ngForOf",n.channels)}}let Pt=(()=>{class e{constructor(){this.uploadButton=!1,this.scanButton=!1,this.showCheckBox=!1,this.downloadButton=!1,this.hasZoom=!0,this.onUploadEvent=new t.vpe,this.onScanEvent=new t.vpe,this.checkBoxChange=new t.vpe,this.onDescEvent=new t.vpe,this.onDownloadEvent=new t.vpe}onUpload(){this.onUploadEvent.emit()}onScan(){this.onScanEvent.emit()}onCheck(n){this.checkBoxChange.emit(n)}onEventDesc(){this.onDescEvent.emit()}onDownload(){this.onDownloadEvent.emit()}getChannelLogo(n){return s.g.getChannelLogoByTypeId(n.TypeID)}onZoomImage(n){this.hasZoom&&(e=>{Nt||function cn(e){let a,n;function o(d){const y=document[b]("button");return y.className=d,y.innerHTML='<svg viewBox="0 0 48 48"><path d="M28 24L47 5a3 3 0 1 0-4-4L24 20 5 1a3 3 0 1 0-4 4l19 19L1 43a3 3 0 1 0 4 4l19-19 19 19a3 3 0 0 0 4 0v-4L28 24z"/></svg>',y}function i(d,y){const j=document[b]("button");return j.className="bp-lr",j.innerHTML='<svg viewBox="0 0 129 129" height="70" fill="#fff"><path d="M88.6 121.3c.8.8 1.8 1.2 2.9 1.2s2.1-.4 2.9-1.2a4.1 4.1 0 0 0 0-5.8l-51-51 51-51a4.1 4.1 0 0 0-5.8-5.8l-54 53.9a4.1 4.1 0 0 0 0 5.8l54 53.9z"/></svg>',P(j,y),j.onclick=De=>{De.stopPropagation(),k(d)},j}const l=document[b]("STYLE");l.innerHTML=`#bp_caption,#bp_container{bottom:0;left:0;right:0;position:fixed;opacity:0}#bp_container>*,#bp_loader{position:absolute;right:0;z-index:10}#bp_container,#bp_caption,#bp_container svg{pointer-events:none}#bp_container{top:0;z-index:9999;background:${e&&e.overlayColor?e.overlayColor:"rgba(0,0,0,.7)"};opacity:0;transition:opacity .35s}#bp_loader{top:0;left:0;bottom:0;display:flex;align-items:center;cursor:wait;background:0;z-index:9}#bp_loader svg{width:50%;max-width:300px;max-height:50%;margin:auto;animation:bpturn 1s infinite linear}#bp_aud,#bp_container img,#bp_sv,#bp_vid{user-select:none;max-height:96%;max-width:96%;top:0;bottom:0;left:0;margin:auto;box-shadow:0 0 3em rgba(0,0,0,.4);z-index:-1}#bp_sv{background:#111}#bp_sv svg{width:66px}#bp_caption{font-size:.9em;padding:1.3em;background:rgba(15,15,15,.94);color:#fff;text-align:center;transition:opacity .3s}#bp_aud{width:650px;top:calc(50% - 20px);bottom:auto;box-shadow:none}#bp_count{left:0;right:auto;padding:14px;color:rgba(255,255,255,.7);font-size:22px;cursor:default}#bp_container button{position:absolute;border:0;outline:0;background:0;cursor:pointer;transition:all .1s}#bp_container>.bp-x{padding:0;height:41px;width:41px;border-radius:100%;top:8px;right:14px;opacity:.8;line-height:1}#bp_container>.bp-x:focus,#bp_container>.bp-x:hover{background:rgba(255,255,255,.2)}.bp-x svg,.bp-xc svg{height:21px;width:20px;fill:#fff;vertical-align:top;}.bp-xc svg{width:16px}#bp_container .bp-xc{left:2%;bottom:100%;padding:9px 20px 7px;background:#d04444;border-radius:2px 2px 0 0;opacity:.85}#bp_container .bp-xc:focus,#bp_container .bp-xc:hover{opacity:1}.bp-lr{top:50%;top:calc(50% - 130px);padding:99px 0;width:6%;background:0;border:0;opacity:.4;transition:opacity .1s}.bp-lr:focus,.bp-lr:hover{opacity:.8}@keyframes bpf{50%{transform:translatex(15px)}100%{transform:none}}@keyframes bpl{50%{transform:translatex(-15px)}100%{transform:none}}@keyframes bpfl{0%{opacity:0;transform:translatex(70px)}100%{opacity:1;transform:none}}@keyframes bpfr{0%{opacity:0;transform:translatex(-70px)}100%{opacity:1;transform:none}}@keyframes bpfol{0%{opacity:1;transform:none}100%{opacity:0;transform:translatex(-70px)}}@keyframes bpfor{0%{opacity:1;transform:none}100%{opacity:0;transform:translatex(70px)}}@keyframes bpturn{0%{transform:none}100%{transform:rotate(360deg)}}@media (max-width:600px){.bp-lr{font-size:15vw}}`,document.head[C](l),p=document[b]("DIV"),p.id="bp_container",p.onclick=xt,ut=o("bp-x"),p[C](ut),"ontouchend"in window&&window.visualViewport&&(ct=!0,p.ontouchstart=({touches:d,changedTouches:y})=>{n=d.length>1,a=y[0].pageX},p.ontouchend=({changedTouches:d})=>{if(N&&!n&&window.visualViewport.scale<=1){let y=d[0].pageX-a;y<-30&&k(1),y>30&&k(-1)}}),T=document[b]("IMG"),O=document[b]("VIDEO"),O.id="bp_vid",O.setAttribute("playsinline",!0),O.controls=!0,O.loop=!0,V=document[b]("audio"),V.id="bp_aud",V.controls=!0,V.loop=!0,$=document[b]("span"),$.id="bp_count",q=document[b]("DIV"),q.id="bp_caption",et=o("bp-xc"),et.onclick=st.bind(null,!1),q[C](et),tt=document[b]("SPAN"),q[C](tt),p[C](q),lt=i(1,"transform:scalex(-1)"),rt=i(-1,"left:0;right:auto"),S=document[b]("DIV"),S.id="bp_loader",S.innerHTML='<svg viewbox="0 0 32 32" fill="#fff" opacity=".8"><path d="M16 0a16 16 0 0 0 0 32 16 16 0 0 0 0-32m0 4a12 12 0 0 1 0 24 12 12 0 0 1 0-24" fill="#000" opacity=".5"/><path d="M16 0a16 16 0 0 1 16 16h-4A12 12 0 0 0 16 4z"/></svg>',Z=document[b]("DIV"),Z.id="bp_sv",D=document[b]("IFRAME"),D.setAttribute("allowfullscreen",!0),D.allow="autoplay; fullscreen",D.onload=()=>Z[I](S),P(D,"border:0;position:absolute;height:100%;width:100%;left:0;top:0"),Z[C](D),T.onload=Q,T.onerror=Q.bind(null,"image"),window.addEventListener("resize",()=>{N||w&&H(!0),h===Z&&Ct()}),document.addEventListener("keyup",({keyCode:d})=>{27===d&&ot&&xt(),N&&(39===d&&k(1),37===d&&k(-1),38===d&&k(10),40===d&&k(-10))}),document.addEventListener("keydown",d=>{N&&~[37,38,39,40].indexOf(d.keyCode)&&d.preventDefault()}),document.addEventListener("focus",d=>{ot&&!p.contains(d.target)&&(d.stopPropagation(),ut.focus())},!0),Nt=!0}(e),w&&(clearTimeout(kt),bt()),x=e,X=e.ytSrc||e.vimeoSrc,gt=e.animationStart,G=e.animationEnd,mt=e.onChangeImage,f=e.el,at=!1,nt=f.getAttribute("data-caption"),e.gallery?function dn(e,a){let n=x.galleryAttribute||"data-bp";if(Array.isArray(e))g=a||0,_=e,nt=e[g].caption;else{_=[].slice.call("string"==typeof e?document.querySelectorAll(`${e} [${n}]`):e);const o=_.indexOf(f);g=0===a||a?a:-1!==o?o:0,_=_.map(i=>({el:i,src:i.getAttribute(n),caption:i.getAttribute("data-caption")}))}at=!0,E=_[g].src,!~it.indexOf(E)&&H(!0),_.length>1?(p[C]($),$.innerHTML=`${g+1}/${_.length}`,ct||(p[C](lt),p[C](rt))):_=!1,h=T,h.src=E}(e.gallery,e.position):X||e.iframeSrc?(h=Z,function pn(){let e;const a="https://",n="autoplay=1";x.ytSrc?e=`${a}www.youtube${x.ytNoCookie?"-nocookie":""}.com/embed/${X}?html5=1&rel=0&playsinline=1&${n}`:x.vimeoSrc?e=`${a}player.vimeo.com/video/${X}?${n}`:x.iframeSrc&&(e=x.iframeSrc),P(S,""),Z[C](S),D.src=e,Ct(),setTimeout(Q,9)}()):e.imgSrc?(at=!0,E=e.imgSrc,!~it.indexOf(E)&&H(!0),h=T,h.src=E):e.audio?(H(!0),h=V,h.src=e.audio,ft("audio file")):e.vidSrc?(H(!0),e.dimensions&&P(O,`width:${e.dimensions[0]}px`),function sn(e){Array.isArray(e)?(h=O.cloneNode(),e.forEach(a=>{const n=document[b]("SOURCE");n.src=a,n.type=`video/${a.match(/.(\w+)$/)[1]}`,h[C](n)})):(h=O,h.src=e)}(e.vidSrc),ft("video")):(h=T,h.src="IMG"===f.tagName?f.src:window.getComputedStyle(f).backgroundImage.replace(/^url|[(|)|'|"]/g,"")),p[C](h),document.body[C](p)})({el:n.target,imgSrc:this.imageForZoom,noLoader:!1})}}return e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=t.Xpm({type:e,selectors:[["app-product-card"]],inputs:{uploadButton:"uploadButton",scanButton:"scanButton",showCheckBox:"showCheckBox",downloadButton:"downloadButton",image:"image",title:"title",code:"code",description:"description",channels:"channels",check:"check",imageForZoom:"imageForZoom",hasZoom:"hasZoom"},outputs:{onUploadEvent:"onUpload",onScanEvent:"onScan",checkBoxChange:"onCheckBoxChange",onDescEvent:"onDescEvent",onDownloadEvent:"onDownload"},decls:26,vars:11,consts:[[1,"card",2,"margin-bottom","0px"],[1,"card-body","py-6"],[1,"row"],[1,"col-4"],[1,"productUpload_defaultSize","me-2","image-upload"],[1,"imgContainer"],[4,"ngIf","ngIfElse"],["elsePic",""],[1,"col-7","d-inline-block","justify-content-between","gx-0",2,"padding-left","0px"],[1,"itemTitle","cursor-pointer",3,"click"],["class","description cursor-pointer",3,"click",4,"ngIf"],[1,"col-1","gx-0","d-flex","justify-content-center"],[1,"text-end"],["class","text-end gx-0",4,"ngIf"],[1,"card-footer","d-flex","justify-content-between","py-5","bg-footer","align-items-center",2,"border-top","0.1px solid rgb(220 220 220)"],["class","fs-6 btn btn-light btn-sm me-3",3,"click",4,"ngIf"],["class","fs-6 btn btn-light btn-sm",3,"click",4,"ngIf"],["DROPDOWN",""],["alt","",1,"rounded","imgUpload","float-left",3,"src","click"],["src","//res.cloudinary.com/pos/image/upload/w_110/POS/Images/Icon/products_thumb.png",1,"rounded","float-left","imgUpload"],[1,"description","cursor-pointer",3,"click"],[1,"fa","fa-barcode","me-2"],[1,"fa","fa-tag","me-2"],[1,"text-end","gx-0"],["type","checkbox",3,"change"],[1,"fs-6","btn","btn-light","btn-sm","me-3",3,"click"],["aria-hidden","true",1,"fa","fa-download"],["aria-hidden","true",1,"fa","fa-upload"],[1,"fs-6","btn","btn-light","btn-sm",3,"click"],[1,"fa","fa-spinner"],[4,"ngFor","ngForOf"],["target","_blank",3,"href"],["alt","",1,"img-logo",3,"ngClass","src","matTooltip"],[1,"dropdown"],["type","button","id","dropdownMenuButton1","data-bs-toggle","dropdown","aria-expanded","false",1,"btn","fs-6","btn-sm","btn-light","dropdown-toggle"],[1,"dropdown-menu"],[1,"dropdown-item","py-2",2,"cursor","pointer"],[3,"ngClass"],[1,"img-logo",3,"src"],[1,"ms-4"]],template:function(n,o){if(1&n&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"div",5),t.YNc(6,un,2,1,"ng-container",6),t.YNc(7,hn,1,0,"ng-template",null,7,t.W1O),t.qZA()()(),t.TgZ(9,"div",8)(10,"h4",9),t.NdJ("click",function(){return o.onEventDesc()}),t._uU(11),t.qZA(),t.YNc(12,gn,4,1,"div",10),t.YNc(13,mn,4,1,"div",10),t.qZA(),t.TgZ(14,"div",11)(15,"div",12),t.YNc(16,_n,2,0,"div",13),t.qZA()()()(),t.TgZ(17,"div",14)(18,"div"),t.YNc(19,Cn,3,0,"button",15),t.YNc(20,fn,3,0,"button",15),t.YNc(21,xn,3,0,"button",16),t.qZA(),t.TgZ(22,"div"),t.YNc(23,Tn,2,1,"ng-container",6),t.YNc(24,yn,5,2,"ng-template",null,17,t.W1O),t.qZA()()()),2&n){const i=t.MAs(8),l=t.MAs(25);t.xp6(6),t.Q6J("ngIf",o.image)("ngIfElse",i),t.xp6(5),t.hij(" ",o.title," "),t.xp6(1),t.Q6J("ngIf",o.code),t.xp6(1),t.Q6J("ngIf",o.description),t.xp6(3),t.Q6J("ngIf",o.showCheckBox),t.xp6(3),t.Q6J("ngIf",o.downloadButton),t.xp6(1),t.Q6J("ngIf",o.uploadButton),t.xp6(1),t.Q6J("ngIf",o.scanButton),t.xp6(2),t.Q6J("ngIf",o.channels.length<4)("ngIfElse",l)}},dependencies:[c.mk,c.sg,c.O5,F.gM],styles:[".img-logo[_ngcontent-%COMP%]{height:24px;width:24px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;max-width:100%}.bg-footer[_ngcontent-%COMP%]{background-color:#ededed69}.description[_ngcontent-%COMP%]{font-weight:300;margin-left:2px}.productUpload_defaultSize[_ngcontent-%COMP%]{max-width:100px!important;max-height:100px!important;width:auto!important;height:auto!important}.image-upload[_ngcontent-%COMP%]{position:relative}.imgContainer[_ngcontent-%COMP%]{width:100%;height:100px}.imgUpload[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:scale-down;cursor:pointer}.dropdown[_ngcontent-%COMP%] .dropdown-menu.show[_ngcontent-%COMP%]{top:unset!important}"]}),e})();function wn(e,a){if(1&e){const n=t.EpF();t.TgZ(0,"span",10),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.getTotal())}),t.TgZ(1,"i",11),t._uU(2,"?"),t.qZA()()}}function In(e,a){if(1&e&&(t.TgZ(0,"span"),t._uU(1),t.ALo(2,"number"),t.qZA()),2&e){const n=t.oxw();t.xp6(1),t.Oqu(t.lcZ(2,1,n.paginationTotal))}}let dt=(()=>{class e{constructor(){this.get=new t.vpe,this.change=new t.vpe,this.next=new t.vpe,this.previous=new t.vpe,this.total=new t.vpe,this.hasClicked=!1}changePage(n){this.filter.PageNumber=n.pageIndex+1,this.change.emit(this.filter)}getTotal(){this.total.emit()}PreviousPage(){this.previous.emit()}NextPage(){this.next.emit()}}return e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=t.Xpm({type:e,selectors:[["app-custom-paginator"]],inputs:{filter:"filter",paginationTotal:"paginationTotal",totaldata:"totaldata",hasClicked:"hasClicked"},outputs:{get:"get",change:"change",next:"next",previous:"previous",total:"total"},decls:16,vars:11,consts:[[1,"d-flex","justify-content-between","mt-5"],[1,"me-auto","d-sm-block","collapse","mt-3"],[1,"font-weight-bold","font-italic","hidden-xxs"],["style","cursor: pointer",3,"click",4,"ngIf"],[4,"ngIf"],[1,"btn-group"],["role","button","title","Load all products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"hidden","click"],[1,"fas","fa-arrow-left"],["role","button","title","Load more for 20 products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"hidden","click"],[1,"fas","fa-arrow-right"],[2,"cursor","pointer",3,"click"],["title","Retreive rows count",1,"border","p-3"]],template:function(n,o){1&n&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2),t._uU(3),t.ALo(4,"number"),t.ALo(5,"number"),t.YNc(6,wn,3,0,"span",3),t.YNc(7,In,3,3,"span",4),t._uU(8),t.qZA()(),t.TgZ(9,"div",5)(10,"a",6),t.NdJ("click",function(){return o.PreviousPage()}),t._UZ(11,"i",7),t._uU(12," Prev"),t.qZA(),t.TgZ(13,"a",8),t.NdJ("click",function(){return o.NextPage()}),t._UZ(14,"i",9),t._uU(15," Next"),t.qZA()()()),2&n&&(t.xp6(3),t.AsE(" Showing ",t.lcZ(4,7,o.filter.PageSize*(o.filter.PageNumber-1)+1)," - ",t.lcZ(5,9,o.filter.PageSize*(o.filter.PageNumber-1)+o.totaldata)," of "),t.xp6(3),t.Q6J("ngIf",!o.hasClicked),t.xp6(1),t.Q6J("ngIf",o.hasClicked),t.xp6(1),t.hij(" records ~ ",o.filter.PageNumber," Page "),t.xp6(2),t.Q6J("hidden",1==o.filter.PageNumber),t.xp6(3),t.Q6J("hidden",o.filter.PageSize*(o.filter.PageNumber-1)+o.totaldata==o.paginationTotal||o.totaldata<o.filter.PageSize))},dependencies:[c.O5,c.JJ]}),e})();function Mn(e,a){if(1&e){const n=t.EpF();t.TgZ(0,"button",10),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.onOpenScanDialog())}),t._UZ(1,"i",11),t._uU(2," Scan Channel "),t.qZA()}}function On(e,a){if(1&e){const n=t.EpF();t.TgZ(0,"button",12),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.onScanMultipleProduct())}),t._UZ(1,"i",11),t._uU(2),t.qZA()}if(2&e){const n=t.oxw();let o;t.xp6(2),t.hij(" Scan Selected Product (",null==(o=n.productService.selectedProduct(n.products))?null:o.length,") ")}}function Zn(e,a){if(1&e){const n=t.EpF();t.TgZ(0,"button",13),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.onUploadMultipleProductSingleChannel())}),t._UZ(1,"i",14),t._uU(2," Upload Bulk "),t.qZA()}}function Nn(e,a){if(1&e){const n=t.EpF();t.TgZ(0,"div",15)(1,"app-product-card",16),t.NdJ("onUpload",function(){const l=t.CHM(n).$implicit,r=t.oxw();return t.KtG(r.onUploadToMultipleChannel(l))})("onScan",function(){const l=t.CHM(n).$implicit,r=t.oxw();return t.KtG(r.onScanSingleProduct(l))})("onDescEvent",function(){const l=t.CHM(n).index,r=t.oxw();return t.KtG(r.onOpenDialogVariant(l))})("onCheckBoxChange",function(i){const r=t.CHM(n).$implicit;return t.KtG(r.selected=i)}),t.qZA()()}if(2&e){const n=a.$implicit,o=t.oxw();t.xp6(1),t.Q6J("title",null==n?null:n.Name)("image",null==n?null:n.ThumbnailUrl)("description",(null==n?null:n.Variants.length)>1?(null==n?null:n.Variants.length)+" Variants":null)("channels",o.productService.getChannelProduct(n))("code",o.getVariantCode(null==n?null:n.Variants))("showCheckBox",(null==n?null:n.Channel.length)<o.channelOptions.length)("scanButton",!0)("uploadButton",null==n?null:n.hasUpload)("imageForZoom",null==n?null:n.ImageUrl)}}let kn=(()=>{class e{constructor(n,o,i,l){this.http=n,this.toastr=o,this.dialog=i,this.productService=l,this.searchFilter=new z,this.rowCount=0,this.getLoaderPage()}getLoaderPage(){this.http.post("/api/product/Load",{}).subscribe(n=>{this.channelOptions=n.Options.Channel,this.searchFilter.PageNumber=n.Filter.PageNumber,this.searchFilter.RowCount=n.Filter.RowCount,this.searchFilter.ChannelID=null,this.searchFilter.PageSize=100,this.getProducts()})}getProducts(){this.http.post("/api/product/GetInPOS",this.searchFilter).subscribe(n=>{this.products=n.Data,this.rowCount=null==n.Total?this.searchFilter.RowCount:n.Total.toString(),this.products=this.productService.checkProductHasUploadBtn(this.products,this.channelOptions)})}onOpenScanDialog(){let n=JSON.parse(JSON.stringify(this.searchFilter));n.ChannelID=s.g.GuidEMpty,this.dialog.open(U.j,{data:{filter:n,Channel:this.channelOptions},width:"40%"}).afterClosed().pipe((0,M.h)(i=>s.g.IsNotEmpty(i))).subscribe(i=>{this.searchFilter.ChannelID=i.ChannelID,this.searchFilter.ScanFull=i.ScanFull,this.searchFilter.UpdatedProduct=i.UpdatedProduct,this.scanAllProduct()})}scanAllProduct(){null!=this.searchFilter.ChannelID?this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct).subscribe(n=>{this.getLoaderPage();let o=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.productService.successToastrScanAllProduct(n,o,!this.searchFilter.UpdatedProduct)}):this.toastr.error("Please Select Channel","Error")}onOpenDialogVariant(n){this.dialog.open(Mt,{data:{title:this.products[n].Name,variants:this.products[n].Variants},width:"45%"})}onUploadMultipleProductSingleChannel(){this.dialog.open(It,{width:"350px",data:{item:null,selectedItemMissingChannel:this.channelOptions}}).afterClosed().subscribe(n=>{n&&this.uploadMultipleProduct(n.channelID,n.categoryID)})}uploadMultipleProduct(n,o){const i=this.productService.selectedProduct(this.products);this.productService.uploadMultipleProduct(i,n,o).subscribe(l=>{this.getProducts();const r=this.productService.findChannelById(n,this.channelOptions);this.toastr.success(i.length>1?"Successfully uploaded "+i.length+" Product to channel "+r?.Name:r?.Name+" Successfully Created","Success")})}onUploadToMultipleChannel(n){let o=this.productService.getChannelProduct(n);n.Channel=o;let i=this.productService.filterUnselectedChannel(n,this.channelOptions);this.dialog.open(Zt,{width:"700px",data:{title:`Upload ${n.Name}`,channels:i,products:[n]}}).afterClosed().subscribe(l=>{l&&this.getProducts()})}searchProduct(n){this.searchFilter.text=n,this.getProducts()}onNextPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber+1,this.getProducts()}onPrevPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber-1,this.getProducts()}onScanMultipleProduct(){let n=JSON.parse(JSON.stringify(this.searchFilter));n.ChannelID=s.g.GuidEMpty;let o=this.productService.filterChannelByTypeId(this.channelOptions,[A.x.Tokopedia,A.x.Tiktok]);this.dialog.open(U.j,{data:{filter:n,Channel:o,isSingleChannel:!0},width:"30%"}).afterClosed().pipe((0,M.h)(l=>s.g.IsNotEmpty(l))).subscribe(l=>{this.searchFilter.ChannelID=l.ChannelID,this.searchFilter.ScanFull=l.ScanFull,this.searchFilter.UpdatedProduct=l.UpdatedProduct;let r=this.productService.selectedProduct(this.products),d=this.productService.getVariantCodesProducts(r);this.scanSingleProduct(d)})}onScanSingleProduct(n){let o=JSON.parse(JSON.stringify(this.searchFilter));o.ChannelID=s.g.GuidEMpty,this.dialog.open(U.j,{data:{filter:o,Channel:this.channelOptions,isSingleChannel:!0},width:"40%"}).afterClosed().pipe((0,M.h)(i=>s.g.IsNotEmpty(i))).subscribe(i=>{this.searchFilter.ChannelID=i.ChannelID;const l=this.productService.getVariantCodesProduct(n);this.scanSingleProduct(l)})}scanSingleProduct(n){this.productService.scanSingle(this.searchFilter.ChannelID,n).subscribe({next:o=>{if(o)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=s.g.GuidEMpty,o&&this.getProducts()},error:o=>{this.searchFilter.ChannelID=s.g.GuidEMpty}})}getVariantCode(n){let o;return n.length>1&&(o=(n[0].model?n[0].model:"")+n[0].Code),1==n.length&&(o=n[0].Code),o}}return e.\u0275fac=function(n){return new(n||e)(t.Y36(J.O),t.Y36(W._W),t.Y36(m.uw),t.Y36(R.M))},e.\u0275cmp=t.Xpm({type:e,selectors:[["app-in-pos"]],decls:12,vars:9,consts:[["hideSearchDropdown","true","hideSearchDropdown","false","description","Products have been registered in POS",3,"headerTitle","onSubmit"],["type","button","data-cy","scanSoldinChannel","class","btn btn-outline-secondary shadow rounded",3,"click",4,"ngIf"],["type","button","data-cy","scanInPos","class","btn btn-outline-secondary shadow rounded me-2",3,"click",4,"ngIf"],["class","btn btn-light shadow rounded ms-2",3,"click",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"],[1,"row","mt-2","justify-content-end"],[1,"col-md-12"],[3,"filter","totaldata","paginationTotal","hasClicked","next","previous"],["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,"title","image","description","channels","code","showCheckBox","scanButton","uploadButton","imageForZoom","onUpload","onScan","onDescEvent","onCheckBoxChange"]],template:function(n,o){1&n&&(t.TgZ(0,"mainpanel",0),t.NdJ("onSubmit",function(l){return o.searchProduct(l)}),t.TgZ(1,"actions"),t.YNc(2,Mn,3,0,"button",1),t.YNc(3,On,3,1,"button",2),t.YNc(4,Zn,3,0,"button",3),t.qZA(),t.TgZ(5,"content")(6,"div",4)(7,"div",5),t.YNc(8,Nn,2,9,"div",6),t.qZA(),t.TgZ(9,"div",7)(10,"div",8)(11,"app-custom-paginator",9),t.NdJ("next",function(){return o.onNextPage()})("previous",function(){return o.onPrevPage()}),t.qZA()()()()()()),2&n&&(t.Q6J("headerTitle","In POS ("+o.rowCount+")"),t.xp6(2),t.Q6J("ngIf",!o.productService.hasSelection(o.products)),t.xp6(1),t.Q6J("ngIf",o.productService.hasSelection(o.products)),t.xp6(1),t.Q6J("ngIf",o.productService.hasSelection(o.products)),t.xp6(4),t.Q6J("ngForOf",o.products),t.xp6(3),t.Q6J("filter",o.searchFilter)("totaldata",null==o.products?null:o.products.length)("paginationTotal",o.rowCount)("hasClicked",!0))},dependencies:[c.sg,c.O5,Y.p,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}}.img-logo[_ngcontent-%COMP%]{height:24px;width:24px}"]}),e})();var B=u(8796);function Un(e,a){if(1&e){const n=t.EpF();t.TgZ(0,"button",14),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.onOpenScanDialog())}),t._UZ(1,"i",15),t._uU(2," Scan Channel "),t.qZA()}}function Fn(e,a){if(1&e){const n=t.EpF();t.TgZ(0,"button",16),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.onScanSelectedProduct())}),t._UZ(1,"i",15),t._uU(2),t.qZA()}if(2&e){const n=t.oxw();t.xp6(2),t.hij(" Scan Selected Product (",n.productService.selectedProduct(n.products).length,") ")}}function An(e,a){if(1&e&&(t.TgZ(0,"span",17),t._UZ(1,"img",18),t.qZA(),t._uU(2)),2&e){const n=a.item,o=t.oxw();t.xp6(1),t.Q6J("src",o.getChannelLogo(n.TypeID),t.LSH),t.xp6(1),t.hij(" ",n.Name," ")}}function Dn(e,a){if(1&e){const n=t.EpF();t.TgZ(0,"div")(1,"h6"),t._uU(2,"Item ID"),t.qZA(),t.TgZ(3,"input",19),t.NdJ("ngModelChange",function(i){t.CHM(n);const l=t.oxw();return t.KtG(l.searchFilter.Item_id=i)}),t.qZA()()}if(2&e){const n=t.oxw();t.xp6(3),t.Q6J("ngModel",n.searchFilter.Item_id)}}function Jn(e,a){if(1&e){const n=t.EpF();t.TgZ(0,"div",20)(1,"app-product-card",21),t.NdJ("onUpload",function(){const l=t.CHM(n).$implicit,r=t.oxw();return t.KtG(r.onUploadToMultipleChannel(l))})("onDescEvent",function(){const l=t.CHM(n).index,r=t.oxw();return t.KtG(r.onOpenVariantDetail(l))})("onScan",function(){const l=t.CHM(n).$implicit,r=t.oxw();return t.KtG(r.onScanSingleProduct(l))})("onCheckBoxChange",function(i){const r=t.CHM(n).$implicit;return t.KtG(r.selected=i)}),t.qZA()()}if(2&e){const n=a.$implicit,o=t.oxw();t.xp6(1),t.Q6J("title",null==n?null:n.Name)("image",null==n?null:n.ThumbnailUrl)("description",(null==n||null==n.Variants?null:n.Variants.length)>1?(null==n||null==n.Variants?null:n.Variants.length)+" Variants":null)("channels",o.productService.getChannelProduct(n))("code",o.getVariantCode(null==n?null:n.Variants))("showCheckBox",null==n?null:n.hasScan)("scanButton",!0)("uploadButton",null==n?null:n.hasUpload)("imageForZoom",null==n?null:n.ImageUrl)}}function En(e,a){if(1&e){const n=t.EpF();t.TgZ(0,"div",22)(1,"div",23)(2,"app-custom-paginator",24),t.NdJ("total",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.getRowCount())})("next",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.onNextPage())})("previous",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.onPreviousPage())}),t.qZA()()()}if(2&e){const n=t.oxw();t.xp6(2),t.Q6J("filter",n.searchFilter)("totaldata",null==n.products?null:n.products.length)("paginationTotal",n.rowCount)("hasClicked",n.hasClickRowCount)}}let qn=(()=>{class e{constructor(n,o,i,l){this.http=n,this.dialog=o,this.toastr=i,this.productService=l,this.searchFilter=new z,this.rowCount=0,this.hasClickRowCount=!1,this.guidEmpty=s.g.GuidEMpty}ngOnInit(){this.initPageLoader()}initPageLoader(){this.http.post("/api/product/Load",{}).subscribe(n=>{this.channelOptions=n.Options.Channel,this.searchFilter=n.Filter,this.searchFilter.ChannelID=n.Filter.ChannelID,this.searchFilter.mode=1,this.searchFilter.PageSize=n.Filter.RowCount,this.searchFilter.Item_id="",this.getProducts()})}getProducts(){this.productService.findAllSoldInChannel(this.searchFilter).subscribe(n=>{this.products=n.Data,this.products=this.productService.checkProductHasUploadBtn(this.products,this.channelOptions)})}searchProduct(n){this.searchFilter.text=n,this.hasClickRowCount=!1,this.getProducts()}onOpenVariantDetail(n){this.dialog.open(Mt,{data:{variants:this.products[n].Variants,title:this.products[n].Name},width:"45%"})}onOpenScanDialog(){let n=JSON.parse(JSON.stringify(this.searchFilter));n.ChannelID=s.g.GuidEMpty,this.dialog.open(U.j,{data:{filter:n,Channel:this.channelOptions},width:"40%"}).afterClosed().pipe((0,M.h)(i=>s.g.IsNotEmpty(i))).subscribe(i=>{this.searchFilter.ChannelID=i.ChannelID,this.searchFilter.ScanFull=i.ScanFull,this.searchFilter.UpdatedProduct=i.UpdatedProduct,this.scanAllProduct()})}scanAllProduct(){let n=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct).pipe((0,M.h)(o=>o)).subscribe(o=>{this.productService.successToastrScanAllProduct(o,n,!this.searchFilter.UpdatedProduct),this.initPageLoader()})}onScanSingleProduct(n){n.Channel=this.productService.getChannelProduct(n);let o=JSON.parse(JSON.stringify(this.searchFilter));this.dialog.open(U.j,{data:{filter:o,Channel:this.channelOptions,isSingleChannel:!0},width:"40%"}).afterClosed().pipe((0,M.h)(i=>s.g.IsNotEmpty(i))).subscribe(i=>{this.searchFilter.ChannelID=i.ChannelID;const l=this.productService.getVariantCodesProduct(n);this.scanSingleProduct(l)})}onUploadToMultipleChannel(n){let o=this.productService.getChannelProduct(n);n.Channel=o;let i=this.productService.filterUnselectedChannel(n,this.channelOptions);this.dialog.open(Zt,{width:"700px",data:{title:`Upload ${n.Name}`,channels:i,products:[n]}}).afterClosed().subscribe(l=>{l&&this.getProducts()})}onScanSelectedProduct(){let n=this.productService.filterChannelByTypeId(this.channelOptions,[A.x.Tokopedia,A.x.Tiktok]);this.searchFilter.ChannelID=s.g.GuidEMpty;let o=JSON.parse(JSON.stringify(this.searchFilter));this.dialog.open(U.j,{data:{filter:o,Channel:n,isSingleChannel:!0,showScanUpdateType:!1,showScanType:!1},width:"40%"}).afterClosed().pipe((0,M.h)(l=>s.g.IsNotEmpty(l))).subscribe(l=>{this.searchFilter.ChannelID=l.ChannelID,this.searchFilter.ScanFull=l.ScanFull,this.searchFilter.UpdatedProduct=l.UpdatedProduct;let r=this.productService.selectedProduct(this.products),d=this.productService.getVariantCodesProducts(r);this.scanSingleProduct(d)})}scanSingleProduct(n){this.productService.scanSingle(this.searchFilter.ChannelID,n).subscribe({next:o=>{if(o)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=s.g.GuidEMpty,o&&this.getProducts()},error:o=>{this.searchFilter.ChannelID=s.g.GuidEMpty}})}getVariantCode(n){let o;return n.length>1&&(o=(n[0].model?n[0].model:"")+n[0].Code),1==n.length&&(o=n[0].Code),o}onClearFilterChannel(){this.searchFilter.ChannelID=s.g.GuidEMpty,this.searchFilter.Item_id=""}onUploadMultipleProductSingleChannel(){this.dialog.open(It,{width:"350px",data:{item:null,selectedItemMissingChannel:this.channelOptions}}).afterClosed().subscribe(n=>{n&&this.uploadMultipleProduct(n.channelID,n.categoryID)})}uploadMultipleProduct(n,o){const i=this.productService.selectedProduct(this.products);this.productService.uploadMultipleProduct(i,n,o).subscribe(l=>{this.getProducts();const r=this.productService.findChannelById(n,this.channelOptions);this.toastr.success(i.length>1?"Successfully uploaded "+i.length+" Product to channel "+r?.Name:r?.Name+" Successfully Created","Success")})}getRowCount(){this.http.post("/api/product/GetSoldInChannelRowCount",{ChannelID:this.searchFilter.ChannelID,text:this.searchFilter.text}).subscribe(o=>{this.hasClickRowCount=!0,this.rowCount=o.Total})}onNextPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber+1,this.getProducts()}onPreviousPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber-1,this.getProducts()}getChannelLogo(n){return s.g.getChannelLogoByTypeId(n)}}return e.\u0275fac=function(n){return new(n||e)(t.Y36(J.O),t.Y36(m.uw),t.Y36(W._W),t.Y36(R.M))},e.\u0275cmp=t.Xpm({type:e,selectors:[["app-sold-in-channel"]],decls:21,vars:9,consts:[["headerTitle","Sold in Channel","description","SKU has been mapped between dealpos and marketplace",3,"onSubmit"],["type","button","data-cy","scanSoldinChannel","class","btn btn-outline-secondary shadow rounded",3,"click",4,"ngIf"],["type","button","data-cy","scanInPos","class","btn btn-outline-secondary shadow rounded me-2",3,"click",4,"ngIf"],[1,"btn","btn-light","shadow","rounded","ms-2",3,"hidden","click"],["aria-hidden","true",1,"fa","fa-upload"],[1,"d-flex"],["container",""],["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"clearable","items","ngModel","ngModelChange","clear"],["ng-option-tmp",""],[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,"me-2"],["alt","",2,"width","18px",3,"src"],["type","text","name","Item_id","id","Item_id",1,"form-control",3,"ngModel","ngModelChange"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[3,"title","image","description","channels","code","showCheckBox","scanButton","uploadButton","imageForZoom","onUpload","onDescEvent","onScan","onCheckBoxChange"],[1,"row"],[1,"col-12"],[3,"filter","totaldata","paginationTotal","hasClicked","total","next","previous"]],template:function(n,o){1&n&&(t.TgZ(0,"mainpanel",0),t.NdJ("onSubmit",function(l){return o.searchProduct(l)}),t.TgZ(1,"actions"),t.YNc(2,Un,3,0,"button",1),t.YNc(3,Fn,3,1,"button",2),t.TgZ(4,"button",3),t.NdJ("click",function(){return o.onUploadMultipleProductSingleChannel()}),t._UZ(5,"i",4),t._uU(6," Upload Bulk "),t.qZA()(),t.TgZ(7,"filters")(8,"div",5)(9,"div",6)(10,"div")(11,"h6"),t._uU(12,"Channel"),t.qZA(),t.TgZ(13,"ng-select",7),t.NdJ("ngModelChange",function(l){return o.searchFilter.ChannelID=l})("clear",function(){return o.onClearFilterChannel()}),t.YNc(14,An,3,2,"ng-template",8),t.qZA()(),t.YNc(15,Dn,4,1,"div",9),t.qZA()()(),t.TgZ(16,"content")(17,"div",10)(18,"div",11),t.YNc(19,Jn,2,9,"div",12),t.qZA(),t.YNc(20,En,3,4,"div",13),t.qZA()()()),2&n&&(t.xp6(2),t.Q6J("ngIf",!o.productService.hasSelection(o.products)),t.xp6(1),t.Q6J("ngIf",o.productService.hasSelection(o.products)),t.xp6(1),t.Q6J("hidden",!o.productService.hasSelection(o.products)),t.xp6(9),t.Q6J("clearable",!0)("items",o.channelOptions)("ngModel",o.searchFilter.ChannelID==o.guidEmpty?null:o.searchFilter.ChannelID),t.xp6(2),t.Q6J("ngIf",o.searchFilter.ChannelID!=o.guidEmpty),t.xp6(4),t.Q6J("ngForOf",o.products),t.xp6(1),t.Q6J("ngIf",null==o.products?null:o.products.length))},dependencies:[c.sg,c.O5,v.Fj,v.JJ,v.On,Y.p,B.w9,B.ir,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}}"]}),e})();var Ln=u(8505),Qn=u(4004),Bn=u(7287);function Yn(e,a){if(1&e&&(t.ynx(0),t._UZ(1,"img",25),t.BQk()),2&e){const n=t.oxw(3).$implicit;t.xp6(1),t.Q6J("src",null==n?null:n.ImageUrl,t.LSH)}}function Vn(e,a){1&e&&t._UZ(0,"img",26)}function $n(e,a){if(1&e&&(t.ynx(0),t.TgZ(1,"td",18)(2,"div",19),t.YNc(3,Yn,2,1,"ng-container",20),t.YNc(4,Vn,1,0,"ng-template",null,21,t.W1O),t.qZA()(),t.TgZ(6,"td",22)(7,"h4",23)(8,"span",24),t._uU(9),t.qZA()()(),t.BQk()),2&e){const n=t.MAs(5),o=t.oxw(2).$implicit;t.xp6(1),t.Q6J("rowSpan",null==o?null:o.Variants.length),t.xp6(2),t.Q6J("ngIf",null==o?null:o.ImageUrl)("ngIfElse",n),t.xp6(3),t.Q6J("rowSpan",null==o?null:o.Variants.length),t.xp6(2),t.Q6J("matTooltip",(null==o||null==o.Name?null:o.Name.length)>50?null==o?null:o.Name:""),t.xp6(1),t.Oqu(null==o?null:o.Name)}}function Hn(e,a){if(1&e&&(t.TgZ(0,"div")(1,"a",27),t._UZ(2,"img",28),t.qZA()()),2&e){const n=a.$implicit;t.xp6(1),t.Q6J("href",n.URL,t.LSH),t.xp6(1),t.Q6J("src",n.Img,t.LSH)("matTooltip",n.Name)}}function Rn(e,a){if(1&e&&(t.TgZ(0,"div"),t._UZ(1,"img",28),t.qZA()),2&e){const n=a.$implicit;t.xp6(1),t.Q6J("src",n.Img,t.LSH)("matTooltip",n.Name)}}function Gn(e,a){if(1&e&&(t.TgZ(0,"tr"),t.YNc(1,$n,10,6,"ng-container",13),t.TgZ(2,"td"),t._uU(3),t.qZA(),t.TgZ(4,"td"),t._uU(5),t.qZA(),t.TgZ(6,"td",16)(7,"div",17),t.YNc(8,Hn,3,3,"div",15),t.qZA()(),t.TgZ(9,"td",16)(10,"div",17),t.YNc(11,Rn,2,2,"div",15),t.qZA()()()),2&e){const n=a.$implicit,o=a.index;t.xp6(1),t.Q6J("ngIf",0==o),t.xp6(2),t.hij(" ",n.Name," "),t.xp6(2),t.hij(" ",n.Code," "),t.xp6(3),t.Q6J("ngForOf",null==n?null:n.Available),t.xp6(3),t.Q6J("ngForOf",null==n?null:n.NotAvailable)}}function Kn(e,a){if(1&e&&(t.ynx(0),t.YNc(1,Gn,12,5,"tr",15),t.BQk()),2&e){const n=a.$implicit;t.xp6(1),t.Q6J("ngForOf",n.Variants)}}function jn(e,a){if(1&e&&(t.TgZ(0,"tbody"),t.YNc(1,Kn,2,1,"ng-container",15),t.qZA()),2&e){const n=a.ngIf;t.xp6(1),t.Q6J("ngForOf",n)}}function zn(e,a){if(1&e){const n=t.EpF();t.TgZ(0,"span",36),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.getRowCount())}),t.TgZ(1,"i",37),t._uU(2,"?"),t.qZA()()}}function Wn(e,a){if(1&e&&(t.TgZ(0,"span"),t._uU(1),t.ALo(2,"number"),t.qZA()),2&e){const n=a.ngIf;t.xp6(1),t.Oqu(t.lcZ(2,1,null==n?null:n.Count))}}function Xn(e,a){if(1&e){const n=t.EpF();t.TgZ(0,"a",38),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.onNextPage())}),t._UZ(1,"i",39),t._uU(2," Next"),t.qZA()}}function te(e,a){if(1&e){const n=t.EpF();t.TgZ(0,"a",40),t.NdJ("click",function(){t.CHM(n);const i=t.oxw(3);return t.KtG(i.onLastPage())}),t._UZ(1,"i",41),t._uU(2," Last"),t.qZA()}}function ne(e,a){if(1&e&&(t.TgZ(0,"div",29)(1,"div",30)(2,"div",31),t._uU(3),t.ALo(4,"number"),t.YNc(5,zn,3,0,"span",32),t.YNc(6,Wn,3,3,"span",13),t.ALo(7,"async"),t._uU(8),t.qZA()(),t.TgZ(9,"div",33),t.YNc(10,Xn,3,0,"a",34),t.YNc(11,te,3,0,"a",35),t.qZA()()),2&e){const n=a.ngIf,o=t.oxw(2);t.xp6(3),t.hij(" Showing 1 - ",t.lcZ(4,6,null==n?null:n.length)," of "),t.xp6(2),t.Q6J("ngIf",o.paginationService.hideCount),t.xp6(1),t.Q6J("ngIf",!o.paginationService.hideCount&&t.lcZ(7,8,o.rowCount$)),t.xp6(2),t.hij(" records ~ ",o.paginationService.footerPageNumber," Page "),t.xp6(2),t.Q6J("ngIf",o.paginationService.disableNextButton&&!o.paginationService.goToLastPage),t.xp6(1),t.Q6J("ngIf",o.paginationService.disableNextButton&&!o.paginationService.goToLastPage)}}function ee(e,a){if(1&e){const n=t.EpF();t.TgZ(0,"mainpanel",1),t.NdJ("onSubmit",function(i){t.CHM(n);const l=t.oxw();return t.KtG(l.searchProduct(i))}),t.TgZ(1,"actions")(2,"button",2),t.NdJ("click",function(){const l=t.CHM(n).ngIf,r=t.oxw();return t.KtG(r.openScanDialog(l))}),t._UZ(3,"i",3),t._uU(4," Scan Channel "),t.qZA()(),t.TgZ(5,"content")(6,"div",4)(7,"div",5)(8,"div",6)(9,"table",7)(10,"thead",8)(11,"tr")(12,"th",9),t._uU(13,"Product"),t.qZA(),t.TgZ(14,"th",10),t._uU(15,"Variant"),t.qZA(),t.TgZ(16,"th",10),t._uU(17,"SKU"),t.qZA(),t.TgZ(18,"th",11),t._uU(19,"Available In"),t.qZA(),t.TgZ(20,"th",12),t._uU(21,"Not Available In"),t.qZA()()(),t.YNc(22,jn,2,1,"tbody",13),t.ALo(23,"async"),t.qZA()()(),t.YNc(24,ne,12,10,"div",14),t.ALo(25,"async"),t.qZA()()()}if(2&e){const n=t.oxw();t.Q6J("hideSearchDropdown",!0),t.xp6(22),t.Q6J("ngIf",t.lcZ(23,3,n.data$)),t.xp6(2),t.Q6J("ngIf",t.lcZ(25,5,n.data$))}}let oe=(()=>{class e{constructor(n,o,i,l,r){this.http=n,this.dialog=o,this.toastr=i,this.productService=l,this.paginationService=r,this.loaderAPI="product/Load",this.rowCountAPI="product/GetNotInChannelRowCount",this.notChannelAPI="product/GetNotInChannelV2"}ngOnInit(){this.initPageLoader(),this.iniData()}initPageLoader(){this.paginationService.fetchDataEndpoint=this.notChannelAPI,this.loader$=this.http.post(`api/${this.loaderAPI}`,{}).pipe((0,Ln.b)(n=>{this.filterSearch=n.Filter,this.paginationService.resetToFirstPage(n.Filter)}))}iniData(){this.data$=this.paginationService.data$.pipe((0,Qn.U)(n=>n.map(o=>(o.Variants=o.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)),o))))}assignLogoChannel(n){return n.map(o=>(o.Img=s.g.getChannelLogoByTypeId(o.TypeID),o))}searchProduct(n){this.filterSearch.text=n,this.paginationService.resetToFirstPage(this.filterSearch)}scanAllProduct(n){let o=this.productService.findChannelById(this.filterSearch.ChannelID,n.Options.Channel);this.productService.scanAll(this.filterSearch.ChannelID,this.filterSearch.ScanFull,this.filterSearch.UpdatedProduct).subscribe(i=>{this.productService.successToastrScanAllProduct(i,o,!this.filterSearch.UpdatedProduct),this.initPageLoader()})}openScanDialog(n){let o=JSON.parse(JSON.stringify(this.filterSearch));o.ChannelID=s.g.GuidEMpty,this.dialog.open(U.j,{data:{filter:o,Channel:n.Options.Channel},width:"40%"}).afterClosed().pipe((0,M.h)(l=>s.g.IsNotEmpty(l))).subscribe(l=>{this.filterSearch.ChannelID=l.ChannelID,this.filterSearch.ScanFull=l.ScanFull,this.filterSearch.UpdatedProduct=l.UpdatedProduct,this.scanAllProduct(n)})}getChannelLogoById(n){return s.g.getChannelLogoByTypeId(n)}uploadProductToSingleChannel(n,o,i,l){let r=this.productService.findChannelById(o,l.Options.Channel);this.productService.uploadMultipleProduct([n],o,i).subscribe(d=>{this.paginationService.resetToFirstPage(l.Filter),this.toastr.success("Successfully uploaded "+n.Name+" to "+r.Name,"Success")})}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:n=>{this.filterSearch.PageNumber=1,this.paginationService.getAllData(this.filterSearch,n.Count)}})}ngOnDestroy(){this.paginationService.destroy()}}return e.\u0275fac=function(n){return new(n||e)(t.Y36(J.O),t.Y36(m.uw),t.Y36(W._W),t.Y36(R.M),t.Y36(Bn.b))},e.\u0275cmp=t.Xpm({type:e,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"],["data-cy","scanNotinChannel","type","button",1,"btn","btn-outline-secondary","shadow","rounded",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table","border-bottom"],[1,"thead-light","sticky-top-thead"],["colspan","2",1,"ms-5","text-center",2,"width","450px"],[2,"width","150px"],[2,"width","20%"],[2,"width","16%"],[4,"ngIf"],["class","d-flex justify-content-between mt-5",4,"ngIf"],[4,"ngFor","ngForOf"],[2,"padding-left","0px"],[1,"d-flex","flex-wrap","mb-1"],[1,"text-center",3,"rowSpan"],[2,"padding-right","0px"],[4,"ngIf","ngIfElse"],["elsePic",""],[1,"text-start",3,"rowSpan"],[1,"ms-5","d-inline","fw-normal","itemTitle"],[3,"matTooltip"],[1,"border","rounded",2,"max-width","40px",3,"src"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded",2,"max-width","40px"],["target","_blank",3,"href"],["alt","",1,"channel-logo","cursor-pointer","ms-4","mt-3",3,"src","matTooltip"],[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(n,o){1&n&&(t.YNc(0,ee,26,7,"mainpanel",0),t.ALo(1,"async")),2&n&&t.Q6J("ngIf",t.lcZ(1,1,o.loader$))},dependencies:[c.sg,c.O5,F.gM,Y.p,c.Ov,c.JJ],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}}thead[_ngcontent-%COMP%]{position:sticky;top:0}.channel-logo[_ngcontent-%COMP%]{width:20px}.itemTitle[_ngcontent-%COMP%]{max-width:26vw;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.w-img[_ngcontent-%COMP%]{width:100%}"]}),e})();function ie(e,a){if(1&e&&(t.TgZ(0,"tr")(1,"td"),t._uU(2),t.qZA(),t.TgZ(3,"td"),t._uU(4),t.qZA()()),2&e){const n=a.$implicit;t.xp6(2),t.Oqu(null==n?null:n.Name),t.xp6(2),t.Oqu(null==n?null:n.ChannelVariationSKU)}}let ae=(()=>{class e{constructor(n){this.data=n}}return e.\u0275fac=function(n){return new(n||e)(t.Y36(m.WI))},e.\u0275cmp=t.Xpm({type:e,selectors:[["app-modal-variants"]],decls:13,vars:2,consts:[["mat-dialog-title","",1,"pt-2","pb-3","text-center","fw-normal"],[1,"pb-5","mx-0","pt-2","px-10","d-flex","justify-content-center"],[1,"table"],[1,"thead-light"],[4,"ngFor","ngForOf"]],template:function(n,o){1&n&&(t.TgZ(0,"h1",0),t._uU(1),t.qZA(),t._UZ(2,"hr"),t.TgZ(3,"mat-dialog-content",1)(4,"table",2)(5,"thead",3)(6,"tr")(7,"th"),t._uU(8,"Variant"),t.qZA(),t.TgZ(9,"th"),t._uU(10,"SKU"),t.qZA()()(),t.TgZ(11,"tbody"),t.YNc(12,ie,5,2,"tr",4),t.qZA()()()),2&n&&(t.xp6(1),t.Oqu(null==o.data?null:o.data.title),t.xp6(11),t.Q6J("ngForOf",o.data.variants))},dependencies:[c.sg],styles:[".mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}"]}),e})();function le(e,a){if(1&e){const n=t.EpF();t.TgZ(0,"button",11),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.openScanDialog())}),t._UZ(1,"i",12),t._uU(2," Scan Channel "),t.qZA()}}function re(e,a){if(1&e){const n=t.EpF();t.ynx(0),t.TgZ(1,"button",13),t.NdJ("click",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.onDownloadAllProduct("SELECTED"))}),t._UZ(2,"i",14),t._uU(3),t.qZA(),t.BQk()}if(2&e){const n=t.oxw();let o;t.xp6(3),t.hij(" Download Product (",null==(o=n.productService.selectedProduct(n.products))?null:o.length,") ")}}function ce(e,a){if(1&e&&(t.TgZ(0,"span",15),t._UZ(1,"img",16),t.qZA(),t._uU(2)),2&e){const n=a.item,o=t.oxw();t.xp6(1),t.Q6J("src",o.getChannelLogo(n.TypeID),t.LSH),t.xp6(1),t.hij(" ",n.Name," ")}}const se=function(e){return[e]},de=function(){return[]};function pe(e,a){if(1&e){const n=t.EpF();t.TgZ(0,"div",17)(1,"app-product-card",18),t.NdJ("onCheckBoxChange",function(i){const r=t.CHM(n).index,d=t.oxw();return t.KtG(d.onSelectProduct(i,r))})("onDescEvent",function(){const l=t.CHM(n).index,r=t.oxw();return t.KtG(r.onShowVariantDetail(l))})("onDownload",function(){const l=t.CHM(n).$implicit,r=t.oxw();return t.KtG(r.onDownloadProduct(l))}),t.qZA()()}if(2&e){const n=a.$implicit;t.xp6(1),t.Q6J("title",null==n?null:n.Name)("image",null==n?null:n.Image)("code",0==(null==n||null==n.Variant?null:n.Variant.length)?null==n?null:n.ChannelItemSKU:null)("description",(null==n||null==n.Variant?null:n.Variant.length)>0?(null==n||null==n.Variant?null:n.Variant.length)+" Variants":null)("downloadButton",!0)("channels",null!=n&&n.Channel?t.VKq(7,se,null==n?null:n.Channel):t.DdM(9,de))("showCheckBox",!0)}}function ue(e,a){if(1&e){const n=t.EpF();t.TgZ(0,"div",19)(1,"div",20)(2,"app-custom-paginator",21),t.NdJ("total",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.getRowCount())})("next",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.onNextPage())})("previous",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.onPreviousPage())}),t.qZA()()()}if(2&e){const n=t.oxw();t.xp6(2),t.Q6J("filter",n.searchFilter)("totaldata",null==n.products?null:n.products.length)("paginationTotal",n.rowCount)("hasClicked",n.hasClickRowCount)}}let he=(()=>{class e{constructor(n,o,i){this.http=n,this.dialog=o,this.productService=i,this.searchFilter=new z,this.hasClickRowCount=!1}ngOnInit(){this.initPageLoader()}initPageLoader(){this.productService.loader().subscribe(n=>{this.channelOptions=n.Options.Channel,this.searchFilter=n.Filter,this.searchFilter.PageSize=n.Filter.RowCount,this.getProducts()})}getProducts(){this.http.post("/api/product/GetProductChannelNotPOS",this.searchFilter).subscribe(n=>{this.products=n.Data,this.mapChannelToProduct()})}mapChannelToProduct(){this.products=this.products.map(n=>(n.Channel=this.channelOptions.find(o=>o.ID==n.ChannelID),n.Channel&&(n.Channel.Url=n.Url),n))}onSearch(n){this.searchFilter.text=n,this.hasClickRowCount=!1,this.getProducts()}onClearChannelFilter(){this.searchFilter.ChannelID=s.g.GuidEMpty}onScanAll(){let n=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct).subscribe(o=>{this.searchFilter.ChannelID=s.g.GuidEMpty,this.productService.successToastrScanAllProduct(o,n,!this.searchFilter.UpdatedProduct),this.initPageLoader()})}openScanDialog(){let n=JSON.parse(JSON.stringify(this.searchFilter));n.ChannelID=s.g.GuidEMpty,this.dialog.open(U.j,{data:{filter:n,Channel:this.channelOptions},width:"40%"}).afterClosed().pipe((0,M.h)(i=>s.g.IsNotEmpty(i))).subscribe(i=>{this.searchFilter.ChannelID=i.ChannelID,this.searchFilter.UpdatedProduct=i.UpdatedProduct,this.searchFilter.ScanFull=i.ScanFull,this.onScanAll()})}onDownloadAllProduct(n){let o;o="ALL"==n?this.products:this.productService.selectedProduct(this.products),o.length>0&&this.productService.downloadMultipleProduct(o).subscribe({next:()=>{this.getProducts()}})}onSelectProduct(n,o){this.products[o].selected=n}onDownloadProduct(n){!confirm(`Are you sure you want to Retrieve product ${n?.Name} from ${n?.Channel.Name} to POS?`)||this.productService.downloadProduct(n).subscribe({next:()=>{this.getProducts()}})}onShowVariantDetail(n){let o=this.products[n].Variant;o.length>0&&this.dialog.open(ae,{data:{title:this.products[n].Name,variants:o},width:"30%"})}getRowCount(){this.http.post("/api/product/GetProductChannelNotPOSRowCount",{ChannelID:this.searchFilter.ChannelID,text:this.searchFilter.text}).subscribe(o=>{this.hasClickRowCount=!0,this.rowCount=o.Count})}onNextPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber+1,this.getProducts()}onPreviousPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber-1,this.getProducts()}getChannelLogo(n){return s.g.getChannelLogoByTypeId(n)}}return e.\u0275fac=function(n){return new(n||e)(t.Y36(J.O),t.Y36(m.uw),t.Y36(R.M))},e.\u0275cmp=t.Xpm({type:e,selectors:[["app-not-in-pos"]],decls:17,vars:7,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,"d-flex"],["container",""],["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"clearable","items","ngModel","ngModelChange","clear"],["ng-option-tmp",""],[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"],["alt","",2,"width","18px",3,"src"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[3,"title","image","code","description","downloadButton","channels","showCheckBox","onCheckBoxChange","onDescEvent","onDownload"],[1,"row"],[1,"col-12"],[3,"filter","totaldata","paginationTotal","hasClicked","total","next","previous"]],template:function(n,o){1&n&&(t.TgZ(0,"mainpanel",0),t.NdJ("onSubmit",function(l){return o.onSearch(l)}),t.TgZ(1,"actions"),t.YNc(2,le,3,0,"button",1),t.YNc(3,re,4,1,"ng-container",2),t.qZA(),t.TgZ(4,"filters")(5,"div",3)(6,"div",4)(7,"div")(8,"h6"),t._uU(9,"Channel"),t.qZA(),t.TgZ(10,"ng-select",5),t.NdJ("ngModelChange",function(l){return o.searchFilter.ChannelID=l})("clear",function(){return o.onClearChannelFilter()}),t.YNc(11,ce,3,2,"ng-template",6),t.qZA()()()()(),t.TgZ(12,"content")(13,"div",7)(14,"div",8),t.YNc(15,pe,2,10,"div",9),t.qZA(),t.YNc(16,ue,3,4,"div",10),t.qZA()()()),2&n&&(t.xp6(2),t.Q6J("ngIf",!o.productService.hasSelection(o.products)),t.xp6(1),t.Q6J("ngIf",o.productService.hasSelection(o.products)),t.xp6(7),t.Q6J("clearable",!0)("items",o.channelOptions)("ngModel",o.searchFilter.ChannelID),t.xp6(5),t.Q6J("ngForOf",o.products),t.xp6(1),t.Q6J("ngIf",(null==o.products?null:o.products.length)>0))},dependencies:[c.sg,c.O5,v.JJ,v.On,Y.p,B.w9,B.ir,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}}.itemTitle[_ngcontent-%COMP%]{cursor:pointer}"]}),e})();function ge(e,a){if(1&e&&(t.ynx(0),t._UZ(1,"img",14),t.BQk()),2&e){const n=t.oxw();t.xp6(1),t.Q6J("src",n.image,t.LSH)}}function me(e,a){1&e&&t._UZ(0,"img",15)}function _e(e,a){if(1&e&&(t.TgZ(0,"div",16),t._UZ(1,"i",17),t.TgZ(2,"span"),t._uU(3),t.qZA()()),2&e){const n=t.oxw();t.xp6(3),t.Oqu(n.code)}}const Ce=function(e){return{"border-bottom":e}};function fe(e,a){if(1&e&&(t.ynx(0),t.TgZ(1,"div",28)(2,"div",29),t._uU(3),t.qZA(),t.TgZ(4,"div")(5,"a",30),t._UZ(6,"i",31),t.qZA()()(),t.BQk()),2&e){const n=a.$implicit,o=a.index,i=t.oxw().$implicit;t.xp6(1),t.Q6J("ngClass",t.VKq(3,Ce,o!==(null==i?null:i.Map.length)-1)),t.xp6(2),t.hij(" ",n.Name," "),t.xp6(2),t.Q6J("href",n.URL,t.LSH)}}const xe=function(e){return{"border-bottom-0":e}};function be(e,a){if(1&e&&(t.TgZ(0,"div",18)(1,"h2",19)(2,"button",20)(3,"div",21),t._UZ(4,"img",22),t.TgZ(5,"span",23),t._uU(6),t.qZA(),t.TgZ(7,"span",24)(8,"h4"),t._uU(9),t.qZA()()()()(),t.TgZ(10,"div",25)(11,"div",26),t.YNc(12,fe,7,5,"ng-container",27),t.qZA()()()),2&e){const n=a.$implicit,o=a.index,i=t.oxw();t.Q6J("ngClass",t.VKq(11,xe,i.channels.length-1==o)),t.xp6(1),t.Q6J("id","heading"+o+i.code),t.xp6(1),t.uIk("data-bs-target","#collapse"+o+i.code)("aria-controls","#collapse"+o+i.code),t.xp6(2),t.Q6J("src",i.getChannelLogo(n.TypeID),t.LSH),t.xp6(1),t.Q6J("matTooltip",(null==n||null==n.Name?null:n.Name.length)>30?n.Name:""),t.xp6(1),t.Oqu(n.Name),t.xp6(3),t.hij("- ",n.Map.length," Listing"),t.xp6(1),t.Q6J("id","collapse"+o+i.code),t.uIk("aria-labelledby","heading"+o+i.code),t.xp6(2),t.Q6J("ngForOf",n.Map)}}let Pe=(()=>{class e{getChannelLogo(n){return s.g.getChannelLogoByTypeId(n)}}return e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=t.Xpm({type:e,selectors:[["app-duplicate-product-card"]],inputs:{image:"image",title:"title",code:"code",channels:"channels"},decls:16,vars:5,consts:[[1,"card"],[1,"card-body","py-6"],[1,"row"],[1,"col-4"],[1,"productUpload_defaultSize","me-2","image-upload"],[1,"imgContainer"],[4,"ngIf","ngIfElse"],["elsePic",""],[1,"col-8","d-inline-block","justify-content-between","gx-0",2,"padding-left","0px"],[1,"itemTitle"],["class","description",4,"ngIf"],[1,"card-footer",2,"padding-left","0px","padding-right","0px"],["id","accordionParent",1,"accordion","accordion-flush"],["class","accordion-item border-start-0 border-end-0",3,"ngClass",4,"ngFor","ngForOf"],[1,"rounded","imgUpload","float-left",3,"src"],["src","//res.cloudinary.com/pos/image/upload/w_110/POS/Images/Icon/products_thumb.png",1,"rounded","float-left","imgUpload"],[1,"description"],[1,"fa","fa-barcode","me-2"],[1,"accordion-item","border-start-0","border-end-0",3,"ngClass"],[1,"accordion-header",3,"id"],["type","button","data-bs-toggle","collapse","aria-expanded","true",1,"accordion-button","collapsed",2,"height","40px"],[1,"d-flex","align-items-center","justify-content-start","w-100"],["alt","",1,"channel-logo",3,"src"],[1,"fs-4","ps-4","text-ellipsis",2,"max-width","13vw",3,"matTooltip"],[1,"ps-2"],["data-bs-parent","#accordionParent",1,"accordion-collapse","collapse",3,"id"],[1,"accordion-body",2,"padding-top","0px","padding-bottom","0px"],[4,"ngFor","ngForOf"],[1,"d-flex","justify-content-between","align-items-center","py-4",3,"ngClass"],[1,"text-ellipsis"],["target","_blank",1,"text-secondary",3,"href"],[1,"fa","fa-external-link-alt"]],template:function(n,o){if(1&n&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"div",5),t.YNc(6,ge,2,1,"ng-container",6),t.YNc(7,me,1,0,"ng-template",null,7,t.W1O),t.qZA()()(),t.TgZ(9,"div",8)(10,"h4",9),t._uU(11),t.qZA(),t.YNc(12,_e,4,1,"div",10),t.qZA()()(),t.TgZ(13,"div",11)(14,"div",12),t.YNc(15,be,13,13,"div",13),t.qZA()()()),2&n){const i=t.MAs(8);t.xp6(6),t.Q6J("ngIf",o.image)("ngIfElse",i),t.xp6(5),t.hij(" ",o.title," "),t.xp6(1),t.Q6J("ngIf",o.code),t.xp6(3),t.Q6J("ngForOf",o.channels)}},dependencies:[c.mk,c.sg,c.O5,F.gM],styles:[".productUpload_defaultSize[_ngcontent-%COMP%]{max-width:100px!important;max-height:100px!important;width:auto!important;height:auto!important}.image-upload[_ngcontent-%COMP%]{position:relative}.imgContainer[_ngcontent-%COMP%]{width:100%;height:100px}.imgUpload[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:scale-down}.channel-logo[_ngcontent-%COMP%]{width:18px;height:18px}.accordion-button[_ngcontent-%COMP%]{background-color:#ededed69!important}.accordion-button[_ngcontent-%COMP%]:not(.collapsed){background-color:#ededed69!important;color:#333}.accordion-button[_ngcontent-%COMP%]:after{background-image:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23333333'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e\")}.accordion-button[_ngcontent-%COMP%]:focus{box-shadow:none!important}.card[_ngcontent-%COMP%]{margin-bottom:0!important}"]}),e})();function Te(e,a){if(1&e&&(t.TgZ(0,"span",9),t._UZ(1,"img",10),t.qZA(),t._uU(2)),2&e){const n=a.item,o=t.oxw();t.xp6(1),t.Q6J("src",o.getChannelLogo(n.TypeID),t.LSH),t.xp6(1),t.hij(" ",n.Name," ")}}function ve(e,a){if(1&e&&(t.TgZ(0,"div",12),t._UZ(1,"app-duplicate-product-card",13),t.qZA()),2&e){const n=a.$implicit;t.xp6(1),t.Q6J("title",n.Name)("code",n.Code)("image",n.ThumbnailURL)("channels",n.Channel)}}function Se(e,a){if(1&e&&(t.ynx(0),t.YNc(1,ve,2,4,"div",11),t.BQk()),2&e){const n=t.oxw();t.xp6(1),t.Q6J("ngForOf",n.products)}}function ye(e,a){1&e&&(t.TgZ(0,"div",14)(1,"div"),t._UZ(2,"i",15),t.qZA(),t.TgZ(3,"h4",16),t._uU(4,"No product found"),t.qZA(),t.TgZ(5,"h6",17),t._uU(6,"Once you have a duplicate product"),t.qZA(),t.TgZ(7,"h6",18),t._uU(8,"you`ll see them here"),t.qZA()())}function we(e,a){if(1&e){const n=t.EpF();t.ynx(0),t.TgZ(1,"div",19)(2,"div",20)(3,"app-custom-paginator",21),t.NdJ("next",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.onNextPage())})("previous",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.onPrevPage())})("total",function(){t.CHM(n);const i=t.oxw();return t.KtG(i.getRowCount())}),t.qZA()()(),t.BQk()}if(2&e){const n=t.oxw();t.xp6(3),t.Q6J("filter",n.searchFilter)("totaldata",null==n.products?null:n.products.length)("paginationTotal",n.rowCount)("hasClicked",n.hasClickedRowCount)}}let Ie=(()=>{class e{constructor(n){this.httpService=n,this.searchFilter=new z,this.products=[],this.hasClickedRowCount=!1,this.getPageLoader()}getPageLoader(){this.httpService.post("/api/product/Load",{}).subscribe(n=>{this.searchFilter=n.Filter,this.searchFilter.PageSize=n.Filter.RowCount,this.channelOptions=n.Options.Channel,this.getProducts()})}getProducts(){this.httpService.post("/api/product/GetDuplicateInChannel",{ChannelID:this.searchFilter.ChannelID,RowCount:this.searchFilter.RowCount,PageNumber:this.searchFilter.PageNumber,text:this.searchFilter.text}).subscribe(o=>{this.products=o.Data})}onSearch(n){this.searchFilter.text=n,this.hasClickedRowCount=!1,this.getProducts()}onClearFilter(){this.searchFilter.ChannelID=s.g.GuidEMpty}getChannelLogo(n){return s.g.getChannelLogoByTypeId(n)}onNextPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber+1,this.getProducts()}onPrevPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber-1,this.getProducts()}getRowCount(){this.httpService.post("/api/product/GetDuplicateInChannelRowCount",{text:this.searchFilter.text,ChannelID:this.searchFilter.ChannelID}).subscribe(o=>{this.hasClickedRowCount=!0,this.rowCount=o.Total})}}return e.\u0275fac=function(n){return new(n||e)(t.Y36(J.O))},e.\u0275cmp=t.Xpm({type:e,selectors:[["app-duplicate-sku"]],decls:15,vars:6,consts:[["headerTitle","Duplicate Sku","textButton"," Search","description","SKU has more than one different product name",3,"onSubmit"],["container",""],["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"clearable","items","ngModel","ngModelChange","clear"],["ng-option-tmp",""],[1,"container-fluid"],[1,"row","mt-8","mx-1"],[4,"ngIf","ngIfElse"],["EMPTY",""],[4,"ngIf"],[1,"me-2"],["alt","",2,"width","18px",3,"src"],["class","col-12 col-md-6 col-xl-4 px-3 my-3",4,"ngFor","ngForOf"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[3,"title","code","image","channels"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"far","fa-file","text-secondary",2,"font-size","95px"],[1,"text-secondary","mt-6"],[1,"text-secondary","fw-normal","m-2"],[1,"text-secondary","fw-normal"],[1,"row","mt-2","justify-content-end"],[1,"col-md-12"],[3,"filter","totaldata","paginationTotal","hasClicked","next","previous","total"]],template:function(n,o){if(1&n&&(t.TgZ(0,"mainpanel",0),t.NdJ("onSubmit",function(l){return o.onSearch(l)}),t.TgZ(1,"filters")(2,"div",1)(3,"div")(4,"h6"),t._uU(5,"Channel"),t.qZA(),t.TgZ(6,"ng-select",2),t.NdJ("ngModelChange",function(l){return o.searchFilter.ChannelID=l})("clear",function(){return o.onClearFilter()}),t.YNc(7,Te,3,2,"ng-template",3),t.qZA()()()(),t.TgZ(8,"content")(9,"div",4)(10,"div",5),t.YNc(11,Se,2,1,"ng-container",6),t.YNc(12,ye,9,0,"ng-template",null,7,t.W1O),t.qZA(),t.YNc(14,we,4,4,"ng-container",8),t.qZA()()()),2&n){const i=t.MAs(13);t.xp6(6),t.Q6J("clearable",!0)("items",o.channelOptions)("ngModel",o.searchFilter.ChannelID),t.xp6(5),t.Q6J("ngIf",(null==o.products?null:o.products.length)>0)("ngIfElse",i),t.xp6(3),t.Q6J("ngIf",(null==o.products?null:o.products.length)>0)}},dependencies:[c.sg,c.O5,v.JJ,v.On,Y.p,B.w9,B.ir,dt,Pe]}),e})();var K=u(8063);const Me=[{path:"",component:At,children:[{path:"",redirectTo:"sold-in-channel",pathMatch:"full"},{path:"in-pos",component:kn,canActivate:[K.a],data:{title:"Products in POS"}},{path:"sold-in-channel",component:qn,canActivate:[K.a],data:{title:"Products Sold in Channel"}},{path:"not-in-channel",component:oe,canActivate:[K.a],data:{title:"Products not in Channel"}},{path:"not-in-pos",component:he,canActivate:[K.a],data:{title:"Products not in POS"}},{path:"duplicate-sku",component:Ie,canActivate:[K.a],data:{title:"Duplicate Sku in Channel"}}]}];let Oe=(()=>{class e{}return e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=t.oAB({type:e}),e.\u0275inj=t.cJS({imports:[c.ez,pt.Bz.forChild(Me)]}),e})();var Ze=u(8739),Ne=u(2594);let ke=(()=>{class e{}return e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=t.oAB({type:e}),e.\u0275inj=t.cJS({imports:[c.ez,v.u5,F.AV]}),e})(),Ue=(()=>{class e{}return e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=t.oAB({type:e}),e.\u0275inj=t.cJS({imports:[c.ez]}),e})(),Fe=(()=>{class e{}return e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=t.oAB({type:e}),e.\u0275inj=t.cJS({imports:[c.ez,v.u5,F.AV]}),e})(),Ae=(()=>{class e{}return e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=t.oAB({type:e}),e.\u0275inj=t.cJS({imports:[c.ez,vt.Z,v.u5,pt.Bz,Oe,F.AV,Y.R,B.A0,Ze.TU,Ne.K,ke,Ue,Fe]}),e})()}}]);