marketplacepos 2.7.2 → 2.7.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.
- package/Marketplace/174.ef0e2b8b4c9d2b0b.js +1 -0
- package/Marketplace/25.43ab1ee524b9049a.js +1 -0
- package/Marketplace/277.e644e3531765ce65.js +1 -0
- package/Marketplace/291.779ede87479fb9b2.js +1 -0
- package/Marketplace/360.45dba871a275bde4.js +1 -0
- package/Marketplace/369.fe9dd78b5ae1f834.js +1 -0
- package/Marketplace/397.5668d07ae2910130.js +1 -0
- package/Marketplace/3rdpartylicenses.txt +631 -0
- package/Marketplace/501.7645c32a140dd7f8.js +1 -0
- package/Marketplace/512.8bb0df7db698606b.js +1 -0
- package/Marketplace/516.6cbc60a45960d8fd.js +1 -0
- package/Marketplace/545.4809f373cc63f3b4.js +1 -0
- package/Marketplace/587.b913510ac1ecfe12.js +1 -0
- package/Marketplace/61.b5326b8a8507ca2b.js +1 -0
- package/Marketplace/616.ce2eff13bf85dd2a.js +1 -0
- package/Marketplace/628.161d18d5f92f87c9.js +1 -0
- package/Marketplace/643.cee753340fd82dfa.js +1 -0
- package/Marketplace/716.986295839ef23655.js +1 -0
- package/Marketplace/717.b70435564cbfa38c.js +1 -0
- package/Marketplace/72.23a9b1a59cf7bfca.js +1 -0
- package/Marketplace/739.a22c3c892afd39b9.js +1 -0
- package/Marketplace/796.f712080a257b33c0.js +1 -0
- package/Marketplace/863.73daa64a1cf098b8.js +1 -0
- package/Marketplace/874.23cc68e9ff331b03.js +1 -0
- package/Marketplace/913.c2ffbc12dd99b85d.js +1 -0
- package/Marketplace/970.7c36426f4bcc50cb.js +1 -0
- package/Marketplace/997.c2b107d851cf971c.js +1 -0
- package/Marketplace/common.8f5889e94b19f645.js +1 -0
- package/Marketplace/favicon.ico +0 -0
- package/Marketplace/index.html +22 -0
- package/Marketplace/main.f4b54c0122a625bf.js +1 -0
- package/Marketplace/polyfills.bee3c4d96e890990.js +1 -0
- package/Marketplace/runtime.aa1e68d995bcf102.js +1 -0
- package/Marketplace/scripts.b7cebc1258dbcca8.js +1 -0
- package/Marketplace/styles.ca007450064f7ae0.css +20 -0
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkpos_marketplace=self.webpackChunkpos_marketplace||[]).push([[72],{5072:(bn,T,r)=>{r.r(T),r.d(T,{InventoryModule:()=>m});var p=r(6895),n=r(4650),S=r(6806),Z=r(7398);class d{constructor(){this.inventoryTabs=[{Title:"Single Channel Comparison",Url:"/menu/inventory/bychannel"},{Title:"Multi Channel Comparison",Url:"/menu/inventory/pos"}]}}d.\u0275fac=function(e){return new(e||d)},d.\u0275cmp=n.Xpm({type:d,selectors:[["app-inventory"]],decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(e,t){1&e&&(n.TgZ(0,"nav",0)(1,"div",1)(2,"div"),n._UZ(3,"nav-tab",2),n.qZA()()(),n._UZ(4,"router-outlet")),2&e&&(n.xp6(3),n.Q6J("Tabs",t.inventoryTabs))},dependencies:[S.lC,Z.e]});var F=r(8231),L=r(6304),w=r(8505),v=r(9300),h=r(3154),C=r(8705),A=r(1318),y=r(7185),M=r(5412),N=r(9425),D=r(6082),I=r(7481),P=r(6114);function O(a,e){if(1&a){const t=n.EpF();n.TgZ(0,"button",17),n.NdJ("click",function(){n.CHM(t);const o=n.oxw(3);return n.KtG(o.openScanDialog())}),n._UZ(1,"i",18),n._uU(2," Scan Channel "),n.qZA()}}function Q(a,e){if(1&a){const t=n.EpF();n.TgZ(0,"button",19),n.NdJ("click",function(){n.CHM(t);const o=n.oxw().ngIf,l=n.oxw(2);return n.KtG(l.onUpdateItems(o))}),n._UZ(1,"i",20),n._uU(2," Update "),n.qZA()}}function E(a,e){if(1&a&&(n.TgZ(0,"actions")(1,"div",14)(2,"div"),n.YNc(3,O,3,0,"button",15),n.YNc(4,Q,3,0,"button",16),n.qZA()()()),2&a){const t=e.ngIf,i=n.oxw(2);n.xp6(3),n.Q6J("ngIf",!i.productService.hasSelectionVariant(t)),n.xp6(1),n.Q6J("ngIf",i.productService.hasSelectionVariant(t))}}function Y(a,e){if(1&a){const t=n.EpF();n.TgZ(0,"app-table",21),n.NdJ("onToggle",function(o){n.CHM(t);const l=n.oxw(2);return n.KtG(l.onShowDifferenceStock(o))})("onSubmit",function(o){const s=n.CHM(t).ngIf,c=n.oxw(2);return n.KtG(c.updateStockByVariant(o,s))}),n.qZA()}if(2&a){const t=e.ngIf,i=n.oxw(2);n.Q6J("data",t)("channel",i.channelOptions)("showProductToggle",!0)("filter",i.searchFilter)}}function $(a,e){if(1&a){const t=n.EpF();n.TgZ(0,"span",22),n.NdJ("click",function(){n.CHM(t);const o=n.oxw(2);return n.KtG(o.getRowCount())}),n.TgZ(1,"i",23),n._uU(2,"?"),n.qZA()()}}function q(a,e){if(1&a&&(n.TgZ(0,"span"),n._uU(1),n.ALo(2,"number"),n.qZA()),2&a){const t=e.ngIf;n.xp6(1),n.Oqu(n.lcZ(2,1,t))}}function H(a,e){if(1&a){const t=n.EpF();n.TgZ(0,"a",24),n.NdJ("click",function(){n.CHM(t);const o=n.oxw(2);return n.KtG(o.nextPage())}),n._UZ(1,"i",25),n._uU(2," Next"),n.qZA()}}function V(a,e){if(1&a){const t=n.EpF();n.TgZ(0,"a",26),n.NdJ("click",function(){n.CHM(t);const o=n.oxw(2);return n.KtG(o.getAllData())}),n._UZ(1,"i",27),n._uU(2," Last"),n.qZA()}}function R(a,e){if(1&a){const t=n.EpF();n.TgZ(0,"mainpanel",1),n.NdJ("onSubmit",function(o){n.CHM(t);const l=n.oxw();return n.KtG(l.onSearch(o))}),n.YNc(1,E,5,2,"actions",2),n.ALo(2,"async"),n.TgZ(3,"content")(4,"div",3)(5,"div",4)(6,"div",5),n.YNc(7,Y,1,4,"app-table",6),n.ALo(8,"async"),n.ynx(9),n.TgZ(10,"div",7)(11,"div",8)(12,"div",9),n._uU(13),n.ALo(14,"number"),n.ALo(15,"async"),n.YNc(16,$,3,0,"span",10),n.YNc(17,q,3,3,"span",2),n.ALo(18,"async"),n._uU(19),n.qZA()(),n.TgZ(20,"div",11),n.YNc(21,H,3,0,"a",12),n.YNc(22,V,3,0,"a",13),n.qZA()(),n.BQk(),n.qZA()()()()()}if(2&a){const t=n.oxw();let i;n.Q6J("pageData",t.pageData)("hideSearchBox",!1)("hideSearchDropdown",!0)("textButton","Search"),n.xp6(1),n.Q6J("ngIf",n.lcZ(2,12,t.paginationService.data$)),n.xp6(6),n.Q6J("ngIf",n.lcZ(8,14,t.paginationService.data$)),n.xp6(6),n.hij(" Showing 1 - ",n.lcZ(14,16,null==(i=n.lcZ(15,18,t.paginationService.data$))?null:i.length)," of "),n.xp6(3),n.Q6J("ngIf",t.paginationService.hideCount),n.xp6(1),n.Q6J("ngIf",n.lcZ(18,20,!t.paginationService.hideCount&&t.allDataCount$)),n.xp6(2),n.hij(" records ~ ",t.paginationService.footerPageNumber," Page "),n.xp6(2),n.Q6J("ngIf",t.paginationService.disableNextButton&&!t.paginationService.goToLastPage),n.xp6(1),n.Q6J("ngIf",t.paginationService.disableNextButton&&!t.paginationService.goToLastPage)}}class f{constructor(e,t,i,o,l){this.http=e,this.toastr=t,this.dialog=i,this.paginationService=o,this.productService=l,this.loaderEndpoint="InventoryLoader/GetMultipleInventoryComparison",this.dataEndpoint="Inventory/GetMultipleChannelComparison",this.allDataCountEndpoint="Inventory/GetMultipleChannelComparisonRowCount",this.filterTypeOptions=[{Key:1,Value:"All"},{Key:3,Value:"Difference"}],this.pageData={Title:"Inventory",Nav:[{Title:"Inventory Cache",Url:"/menu/inventory/pos",Active:!0},{Title:"Inventory Realtime",Url:"/menu/inventory/realtime",Active:!1}]}}ngOnInit(){this.initPageLoader()}initPageLoader(){this.paginationService.fetchDataEndpoint=this.dataEndpoint,this.loader$=this.http.post(`/API/${this.loaderEndpoint}`,{}).pipe((0,w.b)(e=>{this.channelOptions=e.Options.Channel,e.Filter={PageNumber:e.Filter.PageNumber,filterModel:C.v.ALL,RowCount:e.Filter.PageSize,HiddenIPOSInventory:e.Filter.HiddenIPOSInventory},this.searchFilter=e.Filter,this.paginationService.resetToFirstPage(this.searchFilter)}))}onSearch(e){this.searchFilter.text=e,this.paginationService.resetToFirstPage(this.searchFilter)}updateStock(e,t){let i=this.productService.selectedVariantProduct(e);if(i.length>0){let l=i.map(c=>({ID:c.ID,Code:c.Code,Inventory:c.Inventory})),s={ListChannelID:t.filter(c=>c.selected).map(c=>c.ID),List:l};this.http.post("/api/Inventory/UpdateChannel",s).subscribe(c=>{this.paginationService.resetToFirstPage(this.searchFilter),this.toastr.success("Successfully updated "+s.List.length+" variants in "+s.ListChannelID.length+" channels","Success")})}}openScanDialog(){let e=JSON.parse(JSON.stringify(this.searchFilter));this.dialog.open(F.j,{data:{filter:e,channelOptions:this.channelOptions},width:"40%"}).afterClosed().pipe((0,v.h)(i=>h.g.IsNotEmpty(i))).subscribe(i=>{this.searchFilter.ScanFull=i.ScanFull,this.searchFilter.ChannelID=i.ChannelID,this.searchFilter.UpdatedProduct=i.UpdatedProduct,this.searchFilter.Async=i.Async,this.scanAll()})}scanAll(){this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).subscribe(e=>{if(this.searchFilter.Async)this.toastr.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"});else{let t=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.productService.successToastrScanAllProduct(e,t,!this.searchFilter.UpdatedProduct),this.initPageLoader()}this.searchFilter.ChannelID=h.g.GuidEMpty})}updateStockByVariant(e,t){let i={ID:e.ChannelID,ChannelItemID:e.ChannelItemID,ChannelVariantID:e.ChannelVariationID,NewQuantity:parseFloat(e.Inventory),VariantID:e.ID,SKU:e.Sku};this.http.post("/api/Inventory/UpdateQuantityByItem",i).subscribe(o=>{let l=this.productService.findChannelById(i.ID,this.channelOptions);this.toastr.success("Successfully updated "+e.ItemName+"("+e.VarName+") inventory in "+l.Name+" to "+i.NewQuantity,"Success")})}onShowDifferenceStock(e){this.searchFilter.filterModel=e?C.v.DIFFERENCE:C.v.ALL,this.paginationService.resetToFirstPage(this.searchFilter)}onUpdateItems(e){const t=this.productService.selectedVariantProduct(e);this.dialog.open(L.j,{data:{selectedItems:t,channels:JSON.parse(JSON.stringify(this.channelOptions))},width:"40%"}).afterClosed().pipe((0,v.h)(i=>h.g.IsNotEmpty(i))).subscribe(i=>{this.updateStock(e,i)})}getRowCount(){this.paginationService.hideCount=!1,this.allDataCount$=this.http.post(`/API/${this.allDataCountEndpoint}`,{text:this.searchFilter.text})}nextPage(){this.paginationService.onNextPage(this.searchFilter)}getAllData(){this.http.post(`/API/${this.allDataCountEndpoint}`,{}).subscribe({next:e=>{this.searchFilter.PageNumber=1,this.paginationService.getAllData(this.searchFilter,e)}})}ngOnDestroy(){this.paginationService.destroy()}}f.\u0275fac=function(e){return new(e||f)(n.Y36(A.O),n.Y36(y._W),n.Y36(M.uw),n.Y36(N.b),n.Y36(D.M))},f.\u0275cmp=n.Xpm({type:f,selectors:[["app-multi-channel-comparison"]],decls:2,vars:3,consts:[["headerTitle","Inventory Comparison",3,"pageData","hideSearchBox","hideSearchDropdown","textButton","onSubmit",4,"ngIf"],["headerTitle","Inventory Comparison",3,"pageData","hideSearchBox","hideSearchDropdown","textButton","onSubmit"],[4,"ngIf"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],["table","inventory",3,"data","channel","showProductToggle","filter","onToggle","onSubmit",4,"ngIf"],[1,"d-flex","justify-content-between","mt-5"],[1,"me-auto","d-sm-block","collapse","mt-3"],[1,"font-weight-bold","font-italic","hidden-xxs"],["style","cursor: pointer",3,"click",4,"ngIf"],[1,"btn-group"],["role","button","class","btn btn-outline-secondary btn-sm text-primary","title","Load more for 20 products",3,"click",4,"ngIf"],["role","button","class","btn btn-outline-secondary btn-sm text-primary","title","Load all products",3,"click",4,"ngIf"],[1,"d-flex"],["type","button","data-cy","scanInPos","class","btn btn-outline-secondary shadow rounded me-3",3,"click",4,"ngIf"],["type","button","class","btn btn-success shadow-sm rounded me-3",3,"click",4,"ngIf"],["type","button","data-cy","scanInPos",1,"btn","btn-outline-secondary","shadow","rounded","me-3",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],["type","button",1,"btn","btn-success","shadow-sm","rounded","me-3",3,"click"],[1,"fas","fa-chevron-circle-up"],["table","inventory",3,"data","channel","showProductToggle","filter","onToggle","onSubmit"],[2,"cursor","pointer",3,"click"],["title","Retreive rows count",1,"border","p-3"],["role","button","title","Load more for 20 products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-arrow-right"],["role","button","title","Load all products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-share"]],template:function(e,t){1&e&&(n.YNc(0,R,23,22,"mainpanel",0),n.ALo(1,"async")),2&e&&n.Q6J("ngIf",n.lcZ(1,1,t.loader$))},dependencies:[p.O5,I.p,P.a,p.Ov,p.JJ],styles:[".no-bullet[_ngcontent-%COMP%]{list-style-type:none}"]});var G=r(7945),K=r(1739);class u{constructor(e){this.toastrService=e}showToastrUpdateInventory(e,t){const i=e.length>0,o=t.length>0;if(!o&&i&&this.toastrService.success(`${this.generateSuccessMessage(e.length)}`,"Success",{enableHtml:!0}),o&&i){const l=`<li>${this.generateSuccessMessage(e.length)}</li>`,s=this.generateErrorMessage(t);this.toastrService.warning(`<ol>${l} ${s}</ol>`,"Warning",{enableHtml:!0})}if(o&&!i){const l=`<ol>${this.generateErrorMessage(t)}</ol>`;this.toastrService.error(l,"Error",{enableHtml:!0})}}generateSuccessMessage(e){return`<span class="fw-bold">Successfully</span> updated ${e} variants in 1 channels`}generateErrorMessage(e=[]){let t="";return e.forEach((i,o)=>{t+=`<li><span class="fw-bold">Error</span> Updating stock for [${i.Name}] - <b>${i.Message}</b></li>`}),t}}u.\u0275fac=function(e){return new(e||u)(n.LFG(y._W))},u.\u0275prov=n.Yz7({token:u,factory:u.\u0275fac});var g=r(4006),b=r(8796),U=r(455),k=r(266);function B(a,e){if(1&a){const t=n.EpF();n.TgZ(0,"button",33),n.NdJ("click",function(){n.CHM(t);const o=n.oxw(2).ngIf,l=n.oxw();return n.KtG(l.openScanDialog(o))}),n._UZ(1,"i",34),n._uU(2," Scan Channel "),n.qZA()}}function j(a,e){if(1&a){const t=n.EpF();n.TgZ(0,"button",35),n.NdJ("click",function(){n.CHM(t);const o=n.oxw().ngIf,l=n.oxw(2);return n.KtG(l.updateStock(o))}),n._UZ(1,"i",36),n._uU(2," Update"),n.qZA()}}function z(a,e){if(1&a&&(n.TgZ(0,"div"),n.YNc(1,B,3,0,"button",31),n.YNc(2,j,3,0,"button",32),n.qZA()),2&a){const t=e.ngIf,i=n.oxw(2);n.xp6(1),n.Q6J("ngIf",!i.productService.hasSelectionVariant(t)),n.xp6(1),n.Q6J("ngIf",i.productService.hasSelectionVariant(t))}}function W(a,e){1&a&&(n.TgZ(0,"div",37)(1,"span"),n._uU(2," showing only different stock, please press next to populate more data "),n.qZA()())}function X(a,e){if(1&a){const t=n.EpF();n.TgZ(0,"th")(1,"input",38),n.NdJ("ngModelChange",function(o){n.CHM(t);const l=n.oxw(2);return n.KtG(l.checkboxState=o)})("ngModelChange",function(){const l=n.CHM(t).ngIf,s=n.oxw(2);return n.KtG(s.onCheckboxStateChange(l))}),n.qZA()()}if(2&a){const t=n.oxw(2);n.xp6(1),n.Q6J("ngModel",t.checkboxState)}}function nn(a,e){if(1&a&&(n.TgZ(0,"ng-option",39),n._UZ(1,"img",40),n._uU(2),n.qZA()),2&a){const t=e.$implicit;n.Q6J("value",t.ID),n.xp6(1),n.s9C("src",t.Img,n.LSH),n.xp6(1),n.hij("",t.Name," ")}}function tn(a,e){if(1&a){const t=n.EpF();n.TgZ(0,"input",64),n.NdJ("ngModelChange",function(o){n.CHM(t);const l=n.oxw(3).$implicit;return n.KtG(l.selected=o)})("ngModelChange",function(){n.CHM(t);const o=n.oxw(3).$implicit,l=n.oxw(2);return n.KtG(l.onCheckboxStateProduct(o))}),n.qZA()}if(2&a){const t=n.oxw(3).$implicit;n.Q6J("ngModel",t.selected)}}function en(a,e){if(1&a){const t=n.EpF();n.TgZ(0,"img",65),n.NdJ("click",function(o){n.CHM(t);const l=n.oxw(3).$implicit,s=n.oxw(2);return n.KtG(s.onZoomImage(o,null==l?null:l.ImageUrl))}),n.qZA()}if(2&a){const t=n.oxw(3).$implicit;n.s9C("src",null==t?null:t.ThumbnailUrl,n.LSH)}}function an(a,e){1&a&&n._UZ(0,"img",66)}function on(a,e){if(1&a&&(n.ynx(0),n.TgZ(1,"td",55)(2,"div",56),n.YNc(3,tn,1,1,"input",57),n.YNc(4,en,1,1,"img",58),n.YNc(5,an,1,0,"ng-template",null,59,n.W1O),n.qZA()(),n.TgZ(7,"td",60)(8,"span",61),n._uU(9),n.qZA(),n._UZ(10,"br"),n.TgZ(11,"div",62),n._UZ(12,"i",63),n.TgZ(13,"small"),n._uU(14),n.qZA()()(),n.BQk()),2&a){const t=n.MAs(6),i=n.oxw().$implicit,o=n.oxw().$implicit;n.xp6(1),n.Q6J("rowSpan",null==o?null:o.Variants.length),n.xp6(2),n.Q6J("ngIf",(null==i?null:i.Inventory)>=0||o.Variants.length>1),n.xp6(1),n.Q6J("ngIf",null==o?null:o.ThumbnailUrl)("ngIfElse",t),n.xp6(3),n.Q6J("rowSpan",null==o?null:o.Variants.length),n.xp6(2),n.Oqu(null==o?null:o.Name),n.xp6(5),n.hij("(",null==o?null:o.Category,")")}}function ln(a,e){if(1&a){const t=n.EpF();n.TgZ(0,"input",38),n.NdJ("ngModelChange",function(o){n.CHM(t);const l=n.oxw().$implicit;return n.KtG(l.selected=o)}),n.qZA()}if(2&a){const t=n.oxw().$implicit;n.Q6J("ngModel",t.selected)}}function rn(a,e){if(1&a&&(n.TgZ(0,"span")(1,"span",67),n._uU(2),n.ALo(3,"number"),n.qZA(),n._uU(4," => "),n.TgZ(5,"span",68),n._uU(6),n.ALo(7,"number"),n.qZA()()),2&a){const t=n.oxw().$implicit;n.xp6(2),n.hij(" ",n.lcZ(3,2,null==t||null==t.I?null:t.I.Available),""),n.xp6(4),n.Oqu(n.lcZ(7,4,null==t?null:t.Inventory))}}function sn(a,e){if(1&a&&(n.TgZ(0,"span"),n._uU(1),n.ALo(2,"number"),n.qZA()),2&a){const t=n.oxw().$implicit;n.xp6(1),n.hij(" ",n.lcZ(2,1,null==t?null:t.Inventory)," ")}}function cn(a,e){if(1&a&&(n.ynx(0),n.TgZ(1,"span",71),n._uU(2),n.ALo(3,"number"),n.qZA(),n.BQk()),2&a){const t=n.oxw(2).$implicit;n.xp6(2),n.hij(" (",n.lcZ(3,1,null==t||null==t.Channel[0]?null:t.Channel[0].InventoryReserved),") ")}}const pn=function(a){return{"bg-gradient-warning":a}};function hn(a,e){if(1&a){const t=n.EpF();n.TgZ(0,"td",69),n.YNc(1,cn,4,3,"ng-container",3),n.TgZ(2,"span",70),n.NdJ("click",function(){n.CHM(t);const o=n.oxw().$implicit,l=n.oxw(),s=l.$implicit,c=l.ngForOf,In=n.oxw(2);return n.KtG(In.openTableDialog(s,o,c))}),n._uU(3),n.ALo(4,"number"),n.qZA()()}if(2&a){const t=n.oxw().$implicit;n.Q6J("ngClass",n.VKq(5,pn,(null==t?null:t.Inventory)!=(null==t||null==t.Channel[0]?null:t.Channel[0].Inventory))),n.xp6(1),n.Q6J("ngIf",null==t||null==t.Channel[0]?null:t.Channel[0].InventoryReserved),n.xp6(2),n.hij(" ",n.lcZ(4,3,null==t||null==t.Channel[0]?null:t.Channel[0].Inventory)," ")}}function un(a,e){1&a&&(n.ynx(0),n._uU(1," - "),n.BQk())}function gn(a,e){if(1&a&&(n.TgZ(0,"span",72),n.ALo(1,"date"),n._uU(2),n.ALo(3,"date"),n.qZA()),2&a){const t=n.oxw().$implicit;n.Q6J("matTooltip",n.xi3(1,2,null==t||null==t.Channel[0]?null:t.Channel[0].LastInventorySync,"dd MMMM yyyy HH:mm:ss")),n.xp6(2),n.hij(" ",n.xi3(3,5,null==t||null==t.Channel[0]?null:t.Channel[0].LastInventorySync,"dd MMM yy HH:mm")," ")}}function _n(a,e){if(1&a){const t=n.EpF();n.TgZ(0,"tr"),n.YNc(1,on,15,7,"ng-container",3),n.TgZ(2,"td",41),n._uU(3),n.qZA(),n.TgZ(4,"td",42)(5,"div",43)(6,"span"),n._uU(7),n.qZA(),n.TgZ(8,"span",44)(9,"a",45),n._UZ(10,"i",46),n.qZA()()()(),n.TgZ(11,"td",47),n.YNc(12,ln,1,1,"input",48),n.qZA(),n.TgZ(13,"td",42),n.YNc(14,rn,8,6,"span",3),n.YNc(15,sn,3,3,"span",3),n.qZA(),n.YNc(16,hn,5,7,"td",49),n.TgZ(17,"td",23),n.YNc(18,un,2,0,"ng-container",50),n.YNc(19,gn,4,8,"ng-template",null,51,n.W1O),n.qZA(),n.TgZ(21,"td")(22,"div",10)(23,"div",52)(24,"a",45),n._UZ(25,"i",46),n.qZA(),n._uU(26," \xa0\xa0 "),n.TgZ(27,"span",53),n.NdJ("click",function(){const l=n.CHM(t).$implicit,s=n.oxw(3);return n.KtG(s.refreshInventory(null==l||null==l.Channel[0]?null:l.Channel[0].ChannelItemID,null==l||null==l.Channel[0]?null:l.Channel[0].ChannelVariationID,null==l||null==l.Channel[0]?null:l.Channel[0].ChannelID,null==l?null:l.ID))}),n._UZ(28,"i",54),n.qZA()()()()()}if(2&a){const t=e.$implicit,i=e.index,o=n.MAs(20),l=n.oxw(3);n.xp6(1),n.Q6J("ngIf",0==i),n.xp6(2),n.Oqu(null==t?null:t.Model),n.xp6(4),n.Oqu(null==t?null:t.Code),n.xp6(2),n.Q6J("href","https://"+l.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(null==t?null:t.ID),n.LSH),n.xp6(3),n.Q6J("ngIf",(null==t?null:t.Inventory)>=0),n.xp6(2),n.Q6J("ngIf",(null==t?null:t.Inventory)!=(null==t||null==t.I?null:t.I.Available)),n.xp6(1),n.Q6J("ngIf",(null==t?null:t.Inventory)==(null==t||null==t.I?null:t.I.Available)),n.xp6(1),n.Q6J("ngIf",null==t?null:t.Channel),n.xp6(2),n.Q6J("ngIf",(null==t||null==t.Channel[0]?null:t.Channel[0].LastInventorySync)==l.minDate)("ngIfElse",o),n.xp6(6),n.Q6J("href",null==t||null==t.Channel[0]?null:t.Channel[0].Url,n.LSH)}}function mn(a,e){if(1&a&&(n.TgZ(0,"tbody"),n.YNc(1,_n,29,11,"tr",25),n.qZA()),2&a){const t=e.$implicit;n.xp6(1),n.Q6J("ngForOf",t.Variants)}}function dn(a,e){if(1&a){const t=n.EpF();n.TgZ(0,"span",73),n.NdJ("click",function(){n.CHM(t);const o=n.oxw(2);return n.KtG(o.getRowCount())}),n.TgZ(1,"i",74),n._uU(2,"?"),n.qZA()()}}function Cn(a,e){if(1&a&&(n.TgZ(0,"span"),n._uU(1),n.ALo(2,"number"),n.qZA()),2&a){const t=e.ngIf;n.xp6(1),n.Oqu(n.lcZ(2,1,null==t?null:t.Total))}}function fn(a,e){if(1&a){const t=n.EpF();n.TgZ(0,"a",78),n.NdJ("click",function(){n.CHM(t);const o=n.oxw(3);return n.KtG(o.onNextPage())}),n._UZ(1,"i",79),n._uU(2," Next"),n.qZA()}}function xn(a,e){if(1&a){const t=n.EpF();n.TgZ(0,"a",80),n.NdJ("click",function(){n.CHM(t);const o=n.oxw(3);return n.KtG(o.onLastPage())}),n._UZ(1,"i",81),n._uU(2," Last"),n.qZA()}}function vn(a,e){if(1&a&&(n.TgZ(0,"div",75),n.YNc(1,fn,3,0,"a",76),n.YNc(2,xn,3,0,"a",77),n.qZA()),2&a){const t=n.oxw(2);n.xp6(1),n.Q6J("ngIf",t.paginationService.disableNextButton&&!t.paginationService.goToLastPage),n.xp6(1),n.Q6J("ngIf",t.paginationService.disableNextButton&&!t.paginationService.goToLastPage)}}function Sn(a,e){if(1&a){const t=n.EpF();n.TgZ(0,"mainpanel",1),n.NdJ("onSubmit",function(o){n.CHM(t);const l=n.oxw();return n.KtG(l.onSearch(o))}),n.TgZ(1,"actions")(2,"div",2),n.YNc(3,z,3,2,"div",3),n.ALo(4,"async"),n.qZA()(),n.TgZ(5,"filters")(6,"div",2)(7,"div",4)(8,"div")(9,"label",5),n._uU(10,"PageNumber"),n.qZA(),n.TgZ(11,"input",6),n.NdJ("ngModelChange",function(o){n.CHM(t);const l=n.oxw();return n.KtG(l.searchFilter.PageNumber=o)}),n.qZA()(),n.TgZ(12,"div")(13,"label",7),n._uU(14,"Page Size"),n.qZA(),n.TgZ(15,"input",8),n.NdJ("ngModelChange",function(o){n.CHM(t);const l=n.oxw();return n.KtG(l.searchFilter.RowCount=o)}),n.qZA()()()()(),n.TgZ(16,"content")(17,"div",9)(18,"div",10)(19,"div",11),n.YNc(20,W,3,0,"div",12),n.TgZ(21,"table",13)(22,"thead",14)(23,"tr")(24,"th",15),n._uU(25,"Product "),n._UZ(26,"br"),n.TgZ(27,"mat-slide-toggle",16),n.NdJ("toggleChange",function(){n.CHM(t);const o=n.oxw();return o.showDifferenceStock=!o.showDifferenceStock,n.KtG(o.onShowDifferenceStock())}),n.TgZ(28,"small",17),n._uU(29,"FILTER DIFFERENT INVENTORY"),n.qZA()()(),n.TgZ(30,"th",18),n._uU(31,"Variant"),n.qZA(),n.TgZ(32,"th",19),n._uU(33,"SKU"),n.qZA(),n.YNc(34,X,2,1,"th",3),n.ALo(35,"async"),n.TgZ(36,"th",20),n._uU(37,"POS"),n.qZA(),n.TgZ(38,"th")(39,"ng-select",21),n.NdJ("change",function(o){n.CHM(t);const l=n.oxw();return n.KtG(l.onFilterChannel(o))})("ngModelChange",function(o){n.CHM(t);const l=n.oxw();return n.KtG(l.searchFilter.ChannelID=o)}),n.YNc(40,nn,3,3,"ng-option",22),n.qZA()(),n.TgZ(41,"th",23),n._uU(42,"Last Sync"),n.qZA(),n._UZ(43,"th",24),n.qZA()(),n.YNc(44,mn,2,1,"tbody",25),n.ALo(45,"async"),n.qZA(),n.TgZ(46,"div",26)(47,"div",27)(48,"div",28),n._uU(49),n.ALo(50,"number"),n.ALo(51,"async"),n.YNc(52,dn,3,0,"span",29),n.YNc(53,Cn,3,3,"span",3),n.ALo(54,"async"),n._uU(55),n.qZA()(),n.YNc(56,vn,3,2,"div",30),n.ALo(57,"async"),n.qZA()()()()()()}if(2&a){const t=e.ngIf,i=n.oxw();let o,l;n.Q6J("headerTitle","Inventory Comparison")("pageData",i.pageData)("hideSearchBox",!1),n.xp6(3),n.Q6J("ngIf",n.lcZ(4,17,i.paginationService.data$)),n.xp6(8),n.Q6J("ngModel",i.searchFilter.PageNumber),n.xp6(4),n.Q6J("ngModel",i.searchFilter.RowCount),n.xp6(5),n.Q6J("ngIf",3==(null==i.searchFilter?null:i.searchFilter.filterModel)),n.xp6(14),n.Q6J("ngIf",n.lcZ(35,19,i.paginationService.data$)),n.xp6(5),n.Q6J("clearable",!1)("ngModel",i.searchFilter.ChannelID),n.xp6(1),n.Q6J("ngForOf",t.Options.Channel),n.xp6(4),n.Q6J("ngForOf",n.lcZ(45,21,i.paginationService.data$)),n.xp6(5),n.hij(" Showing 1 - ",n.lcZ(50,23,null==(o=n.lcZ(51,25,i.paginationService.data$))?null:o.length)," of "),n.xp6(3),n.Q6J("ngIf",i.paginationService.hideCount),n.xp6(1),n.Q6J("ngIf",n.lcZ(54,27,!i.paginationService.hideCount&&i.rowCount$)),n.xp6(2),n.hij(" records ~ ",i.paginationService.footerPageNumber," Page "),n.xp6(1),n.Q6J("ngIf",(null==(l=n.lcZ(57,29,i.paginationService.data$))?null:l.length)>0)}}class x{constructor(e,t,i,o,l,s,c){this.http=e,this.toastr=t,this.dialog=i,this.paginationService=o,this.productService=l,this.biggerPictureService=s,this.inventoryService=c,this.checkboxState=!1,this.showDifferenceStock=!1,this.loaderApi="/api/InventoryLoader/Load",this.rowCountApi="/api/Inventory/GetInventoryByChannelRowCount",this.minDate=h.g.MinDate,this.Options=[{Key:1,Value:"All"},{Key:3,Value:"Difference"}],this.pageData={Title:"Inventory Realtime",Nav:[{Title:"Inventory Cache",Url:"/menu/inventory",Active:!1},{Title:"Inventory Realtime",Url:"/menu/inventory/realtime",Active:!0}]},this.hostName=l.getHostName()}ngOnInit(){this.initPageLoader()}initPageLoader(){this.paginationService.fetchDataEndpoint="Inventory/GetSingleChannelComparison",this.loader$=this.http.post(this.loaderApi,{}).pipe((0,w.b)(e=>{this.channelOptions=e.Options.Channel,this.searchFilter={RowCount:e.Filter.PageSize,filterModel:1,PageNumber:1,ChannelID:e.Filter.ChannelID},this.paginationService.resetToFirstPage(this.searchFilter),e.Filter.IsMarketplaceAppActive||this.toastr.warning("Automatic inventory sync disabled.\n Please enable Dealpos X Marketplace Apps integration in POS Configuration","Warning")}))}onSearch(e){this.searchFilter.text=e,this.paginationService.resetToFirstPage(this.searchFilter)}onFilterChannel(e){this.searchFilter.ChannelID=e,this.searchFilter.PageNumber=1,this.paginationService.resetToFirstPage(this.searchFilter)}updateStock(e){const t=this.productService.selectedVariantProduct(e);if(t.length>0){let i=t.map(l=>({ID:l.ID,Code:l.Code,Inventory:l.Inventory}));this.http.post("/api/Inventory/UpdateChannel",{ListChannelID:[this.searchFilter.ChannelID],List:i}).subscribe(l=>{this.searchFilter.PageNumber=1,this.paginationService.resetToFirstPage(this.searchFilter),this.checkboxState=!1,this.handlingUpdateStock(l)})}}handlingUpdateStock(e){e[0]?.StatusProduct?this.inventoryService.showToastrUpdateInventory(e[0].StatusProduct.Success_list,e[0].StatusProduct.Fail_list):this.toastr.error(e[0]?.Exception,"Error")}openScanDialog(e){const t=JSON.parse(JSON.stringify(this.searchFilter));t.ChannelID=h.g.GuidEMpty,this.dialog.open(F.j,{data:{filter:t,channelOptions:e.Options.Channel},width:"40%"}).afterClosed().pipe((0,v.h)(o=>h.g.IsNotEmpty(o))).subscribe(o=>{this.searchFilter.ChannelID=o.ChannelID,this.searchFilter.ScanFull=o.ScanFull,this.searchFilter.UpdatedProduct=o.UpdatedProduct,this.searchFilter.Async=o.Async,this.scannALl(e)})}scannALl(e){const t=this.productService.findChannelById(this.searchFilter.ChannelID,e.Options.Channel);this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).subscribe(i=>{this.searchFilter.Async?this.toastr.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"}):(this.searchFilter.ScanFull=!1,this.initPageLoader(),this.toastr.success("Successfully scanned from "+t?.Name,"Success"))})}refreshInventory(e,t,i,o){this.http.post("/api/Inventory/RefreshInventoryChannel",{ChannelItemID:e,ChannelVariationID:t,ChannelID:i,VariantID:o}).subscribe(s=>{this.toastr.success("Successfully updated","Success"),this.paginationService.resetToFirstPage(this.searchFilter)})}onCheckboxStateProduct(e){e.Variants=e.Variants.map(t=>(t.Inventory>=0&&(t.selected=e.selected),t))}onCheckboxStateChange(e){e=e.map(t=>(t.Variants=t.Variants.map(i=>(i.selected=this.checkboxState,i)),t))}openTableDialog(e,t,i){this.dialog.open(G.k,{data:{Name:e.Name,Variant:t,ChannelID:t?.Channel[0].ChannelID,Table:"inventory",ChannelItemID:e.ChannelItemID}}).afterClosed().pipe((0,v.h)(l=>h.g.IsNotEmpty(l))).subscribe(l=>{this.updateItemAfterDialog(l,i)})}updateItemAfterDialog(e,t){let i={ID:e.ChannelID,ChannelItemID:e.ChannelItemID,ChannelVariantID:e.ChannelVariationID,NewQuantity:parseFloat(e.Inventory),VariantID:e.ID,SKU:e.Sku};const o=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.http.post("/api/Inventory/UpdateQuantityByItem",i).subscribe(l=>{this.toastr.success("Successfully updated "+e.ItemName+"("+e.VarName+") inventory in "+o?.Name+" to "+i.NewQuantity,"Success")})}onShowDifferenceStock(){this.searchFilter.filterModel=this.showDifferenceStock?C.v.DIFFERENCE:C.v.ALL,this.paginationService.resetToFirstPage(this.searchFilter)}onNextPage(){this.paginationService.onNextPage(this.searchFilter)}getRowCount(){const e={ChannelID:this.searchFilter.ChannelID,PageNumber:1,text:this.searchFilter.text};this.paginationService.hideCount=!1,this.rowCount$=this.http.post(`${this.rowCountApi}`,e)}onLastPage(){this.http.post(`${this.rowCountApi}`,{ChannelID:this.searchFilter.ChannelID,PageNumber:1}).subscribe({next:t=>{this.searchFilter.PageNumber=1,this.paginationService.getAllData(this.searchFilter,t.Total)}})}onZoomImage(e,t){this.biggerPictureService.openBiggerPicture(e,t)}ngOnDestroy(){this.paginationService.destroy()}}x.\u0275fac=function(e){return new(e||x)(n.Y36(A.O),n.Y36(y._W),n.Y36(M.uw),n.Y36(N.b),n.Y36(D.M),n.Y36(K.k),n.Y36(u))},x.\u0275cmp=n.Xpm({type:x,selectors:[["app-single-channel-comparison"]],decls:2,vars:3,consts:[["textButton","Search",3,"headerTitle","pageData","hideSearchBox","onSubmit",4,"ngIf"],["textButton","Search",3,"headerTitle","pageData","hideSearchBox","onSubmit"],[1,"d-flex"],[4,"ngIf"],["container",""],["for","PageNumber"],["type","number","id","PageNumber","placeholder","PageNumber","name","PageNumber","data-toggle","tooltip","matTooltip","Page Number",1,"form-control",3,"ngModel","ngModelChange"],["for","RowCount"],["type","number","id","RowCount","placeholder","Page Size","name","RowCount","data-toggle","tooltip","matTooltip","Page Size",1,"form-control",3,"ngModel","ngModelChange"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],["class","alert alert-warning d-flex justify-content-between text-dark","role","alert",4,"ngIf"],[1,"table","border-bottom"],[1,"thead-light","sticky-top-thead"],["scope","col","colspan","2",1,"text-center","ps-12",2,"width","25%"],[3,"toggleChange"],[1,"fw-bold"],["scope","col",1,"text-start"],["scope","col",1,"text-end",2,"width","10%"],["scope","col",1,"text-end","w-10",2,"width","8%"],[3,"clearable","ngModel","change","ngModelChange"],[3,"value",4,"ngFor","ngForOf"],[1,"text-center"],[2,"width","4%"],[4,"ngFor","ngForOf"],[1,"d-flex","justify-content-between","mt-5"],[1,"me-auto","d-sm-block","collapse","mt-3"],[1,"font-weight-bold","font-italic","hidden-xxs"],["style","cursor: pointer",3,"click",4,"ngIf"],["class","btn-group",4,"ngIf"],["type","button","data-cy","scanInPos","class","btn btn-outline-secondary shadow rounded me-3",3,"click",4,"ngIf"],["class","btn btn-success",3,"click",4,"ngIf"],["type","button","data-cy","scanInPos",1,"btn","btn-outline-secondary","shadow","rounded","me-3",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],[1,"btn","btn-success",3,"click"],[1,"fas","fa-chevron-circle-up"],["role","alert",1,"alert","alert-warning","d-flex","justify-content-between","text-dark"],["type","checkbox",3,"ngModel","ngModelChange"],[3,"value"],[2,"width","18px","margin-right","10px",3,"src"],[1,"text-start"],[1,"text-end"],[1,"d-flex","align-items-center","justify-content-end"],[1,"ms-2"],["target","_blank",3,"href"],[1,"fas","fa-lg","fa-external-link-alt","external-link-custom"],[1,"align-middle"],["type","checkbox",3,"ngModel","ngModelChange",4,"ngIf"],["class","text-end",3,"ngClass",4,"ngIf"],[4,"ngIf","ngIfElse"],["SYNCDATE",""],[1,"col-12","ps-0","d-flex","justify-content-between"],["matTooltip","Refresh stock according to seller center",1,"pl-5","cursor-pointer",2,"color","var(--bs-link-color)",3,"click"],[1,"fas","fa-sync","fa-lg","external-link-custom"],[1,"text-start",2,"width","0%",3,"rowSpan"],[1,"d-flex","align-items-center","justify-content-start"],["type","checkbox","class","me-3",3,"ngModel","ngModelChange",4,"ngIf"],["class","border rounded w-img cursor-pointer","style","margin-left: 20px",3,"src","click",4,"ngIf","ngIfElse"],["elsePic",""],[1,"text-start",3,"rowSpan"],[1,"item-name","mb-0"],[1,"d-flex","align-items-center"],["title","Category",1,"fa-solid","fa-tags","me-2",2,"opacity","60%"],["type","checkbox",1,"me-3",3,"ngModel","ngModelChange"],[1,"border","rounded","w-img","cursor-pointer",2,"margin-left","20px",3,"src","click"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded","w-img",2,"margin-left","20px"],["title","Allocated"],["title","Inventory below minimum inventory"],[1,"text-end",3,"ngClass"],[1,"cursor",3,"click"],["matTooltip","Reserved Stock","matTooltipPosition","above",1,"text-danger"],["matTooltipShowDelay","500",3,"matTooltip"],[2,"cursor","pointer",3,"click"],["title","Retreive rows count",1,"border","p-3"],[1,"btn-group"],["role","button","class","btn btn-outline-secondary btn-sm text-primary","title","Load more for 20 products",3,"click",4,"ngIf"],["role","button","class","btn btn-outline-secondary btn-sm text-primary","title","Load all products",3,"click",4,"ngIf"],["role","button","title","Load more for 20 products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-arrow-right"],["role","button","title","Load all products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-share"]],template:function(e,t){1&e&&(n.YNc(0,Sn,58,31,"mainpanel",0),n.ALo(1,"async")),2&e&&n.Q6J("ngIf",n.lcZ(1,1,t.loader$))},dependencies:[p.mk,p.sg,p.O5,g.Fj,g.wV,g.Wl,g.JJ,g.On,b.w9,b.jq,U.Rr,I.p,k.gM,p.Ov,p.JJ,p.uU],styles:[".w-10[_ngcontent-%COMP%]{width:10%}.w-img[_ngcontent-%COMP%]{width:40px;height:40px}.item-name[_ngcontent-%COMP%]{margin-bottom:-14px!important;font-size:larger}input[type=checkbox][_ngcontent-%COMP%]{width:15px;height:15px}"]});var J=r(8063);const yn=[{path:"",component:d,children:[{path:"",redirectTo:"bychannel",pathMatch:"full"},{path:"pos",component:f,canActivate:[J.a],data:{title:"Inventory Comparison"}},{path:"bychannel",component:x,canActivate:[J.a],data:{title:"Inventory Comparison"}}]}];class _{}_.\u0275fac=function(e){return new(e||_)},_.\u0275mod=n.oAB({type:_}),_.\u0275inj=n.cJS({imports:[p.ez,S.Bz.forChild(yn)]});class m{}m.\u0275fac=function(e){return new(e||m)},m.\u0275mod=n.oAB({type:m}),m.\u0275inj=n.cJS({providers:[u],imports:[p.ez,_,S.Bz,Z.Z,g.u5,b.A0,U.rP,I.R,P.a,k.AV]})}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkpos_marketplace=self.webpackChunkpos_marketplace||[]).push([[739],{1739:(sn,Ct,Ce)=>{Ce.d(Ct,{k:()=>de});var It=Ce(5861);function R(){}const $e=e=>e;function et(e,t){for(const n in t)e[n]=t[n];return e}function tt(e){return e()}function X(e){e.forEach(tt)}function Ie(e){return"function"==typeof e}function Q(e,t){return e!=e?t==t:e!==t}function se(e,t,n){e.$$.on_destroy.push(function Dt(e,...t){if(null==e)return R;const n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}(t,n))}function Pe(e){return e&&Ie(e.destroy)?e.destroy:R}let Xe=()=>globalThis.performance.now(),Ne=e=>requestAnimationFrame(e);const le=new Set;function nt(e){le.forEach(t=>{t.c(e)||(le.delete(t),t.f())}),0!==le.size&&Ne(nt)}function We(e){let t;return 0===le.size&&Ne(nt),{promise:new Promise(n=>{le.add(t={c:e,f:n})}),abort(){le.delete(t)}}}function K(e,t){e.appendChild(t)}function E(e,t,n){e.insertBefore(t,n||null)}function O(e){e.parentNode.removeChild(e)}function C(e){return document.createElement(e)}function De(){return function Mt(e){return document.createTextNode(e)}("")}function L(e,t,n,i){return e.addEventListener(t,n,i),()=>e.removeEventListener(t,n,i)}function y(e,t,n){null==n?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function M(e,t,n,i){null===n?e.style.removeProperty(t):e.style.setProperty(t,n)}function Y(e,t,n){e.classList[n?"add":"remove"](t)}let ce,je,Fe=0,Be={};function it(e,t,n,i,r,s,l,o=0){const c=16.666/i;let u="{\n";for(let d=0;d<=1;d+=c){const f=t+(n-t)*s(d);u+=100*d+`%{${l(f,1-f)}}\n`}const m=u+`100% {${l(n,1-n)}}\n}`,p=`_bp_${Math.round(1e9*Math.random())}_${o}`;if(!Be[p]){if(!ce){const d=C("style");document.head.appendChild(d),ce=d.sheet}Be[p]=!0,ce.insertRule(`@keyframes ${p} ${m}`,ce.cssRules.length)}const h=e.style.animation||"";return e.style.animation=`${h?`${h}, `:""}${p} ${i}ms linear ${r}ms 1 both`,Fe+=1,p}function Ze(e,t){e.style.animation=(e.style.animation||"").split(", ").filter(t?n=>n.indexOf(t)<0:n=>-1===n.indexOf("_bp")).join(", "),t&&!--Fe&&function At(){Ne(()=>{if(Fe)return;let e=ce.cssRules.length;for(;e--;)ce.deleteRule(e);Be={}})}()}function _e(e){je=e}const be=[],rt=[],Me=[],ot=[],Et=Promise.resolve();let Ke=!1;function x(e){Me.push(e)}const Ve=new Set;let ke,Se=0;function st(){const e=je;do{for(;Se<be.length;){const t=be[Se];Se++,_e(t),Rt(t.$$)}for(_e(null),be.length=0,Se=0;rt.length;)rt.pop()();for(let t=0;t<Me.length;t+=1){const n=Me[t];Ve.has(n)||(Ve.add(n),n())}Me.length=0}while(be.length);for(;ot.length;)ot.pop()();Ke=!1,Ve.clear(),_e(e)}function Rt(e){if(null!==e.fragment){e.update(),X(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(x)}}function lt(){return ke||(ke=Promise.resolve(),ke.then(()=>{ke=null})),ke}function Ae(e,t,n){e.dispatchEvent(function St(e,t,n=!1){const i=document.createEvent("CustomEvent");return i.initCustomEvent(e,n,!1,t),i}(`${t?"intro":"outro"}${n}`))}const Ee=new Set;let V;function ee(){V={r:0,c:[],p:V}}function te(){V.r||X(V.c),V=V.p}function z(e,t){e&&e.i&&(Ee.delete(e),e.i(t))}function P(e,t,n,i){if(e&&e.o){if(Ee.has(e))return;Ee.add(e),V.c.push(()=>{Ee.delete(e),i&&(n&&e.d(1),i())}),e.o(t)}}const ct={duration:0};function ut(e,t,n){let s,l,i=t(e,n),r=!1,o=0;function c(){s&&Ze(e,s)}function u(){const{delay:p=0,duration:h=300,easing:d=$e,tick:f=R,css:g}=i||ct;g&&(s=it(e,0,1,h,p,d,g,o++)),f(0,1);const k=Xe()+p,N=k+h;l&&l.abort(),r=!0,x(()=>Ae(e,!0,"start")),l=We(W=>{if(r){if(W>=N)return f(1,0),Ae(e,!0,"end"),c(),r=!1;if(W>=k){const w=d((W-k)/h);f(w,1-w)}}return r})}let m=!1;return{start(){m||(m=!0,Ze(e),Ie(i)?(i=i(),lt().then(u)):u())},invalidate(){m=!1},end(){r&&(c(),r=!1)}}}function ue(e,t,n){let s,i=t(e,n),r=!0;const l=V;function o(){const{delay:c=0,duration:u=300,easing:m=$e,tick:p=R,css:h}=i||ct;h&&(s=it(e,1,0,u,c,m,h));const d=Xe()+c,f=d+u;x(()=>Ae(e,!1,"start")),We(g=>{if(r){if(g>=f)return p(0,1),Ae(e,!1,"end"),--l.r||X(l.c),!1;if(g>=d){const k=m((g-d)/u);p(1-k,k)}}return r})}return l.r+=1,Ie(i)?lt().then(()=>{i=i(),o()}):o(),{end(c){c&&i.tick&&i.tick(1,0),r&&(s&&Ze(e,s),r=!1)}}}function fe(e){e&&e.c()}function ne(e,t,n,i){const{fragment:r,on_mount:s,on_destroy:l,after_update:o}=e.$$;r&&r.m(t,n),i||x(()=>{const c=s.map(tt).filter(Ie);l?l.push(...c):X(c),e.$$.on_mount=[]}),o.forEach(x)}function ie(e,t){const n=e.$$;null!==n.fragment&&(X(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function ye(e,t,n,i,r,s,l,o=[-1]){const c=je;_e(e);const u=e.$$={fragment:null,ctx:null,props:s,update:R,not_equal:r,bound:{},on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(c?c.$$.context:[])),callbacks:{},dirty:o,skip_bound:!1,root:t.target||c.$$.root};l&&l(u.root);let m=!1;u.ctx=n?n(e,t.props||{},(p,h,...d)=>{const f=d.length?d[0]:h;return u.ctx&&r(u.ctx[p],u.ctx[p]=f)&&(!u.skip_bound&&u.bound[p]&&u.bound[p](f),m&&function Ht(e,t){-1===e.$$.dirty[0]&&(be.push(e),function Ot(){Ke||(Ke=!0,Et.then(st))}(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}(e,p)),h}):[],u.update(),m=!0,X(u.before_update),u.fragment=!!i&&i(u.ctx),t.target&&(u.fragment&&u.fragment.c(),ne(e,t.target,t.anchor,t.customElement),st()),_e(c)}class we{$destroy(){ie(this,1),this.$destroy=R}$on(t,n){const i=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return i.push(n),()=>{const r=i.indexOf(n);-1!==r&&i.splice(r,1)}}$set(t){this.$$set&&!function Pt(e){return 0===Object.keys(e).length}(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}function Ue(e){const t=e-1;return t*t*t+1}function U(e,{delay:t=0,duration:n=400,easing:i=Ue,x:r=0,y:s=0,opacity:l=0}={}){const o=getComputedStyle(e),c=+o.opacity,u="none"===o.transform?"":o.transform,m=c*(1-l);return{delay:t,duration:n,easing:i,css:(p,h)=>`\n\t\t\ttransform: ${u} translate(${(1-p)*r}px, ${(1-p)*s}px);\n\t\t\topacity: ${c-m*h}`}}const ae=[];function qe(e,t=R){let n;const i=new Set;function r(o){if(Q(e,o)&&(e=o,n)){const c=!ae.length;for(const u of i)u[1](),ae.push(u,e);if(c){for(let u=0;u<ae.length;u+=2)ae[u][0](ae[u+1]);ae.length=0}}}return{set:r,update:function s(o){r(o(e))},subscribe:function l(o,c=R){const u=[o,c];return i.add(u),1===i.size&&(n=t(r)||R),o(e),()=>{i.delete(u),0===i.size&&(n(),n=null)}}}}function ft(e,t){if(e===t||e!=e)return()=>e;const n=typeof e;if(Array.isArray(e)){const i=t.map((r,s)=>ft(e[s],r));return r=>i.map(s=>s(r))}if("number"===n){const i=t-e;return r=>e+r*i}}function at(e,t={}){const n=qe(e);let i,r=e;function s(l,o){if(null==e)return n.set(e=l),Promise.resolve();r=l;let c=i,u=!1,{delay:m=0,duration:p=400,easing:h=$e,interpolate:d=ft}=et(et({},t),o);if(0===p)return c&&(c.abort(),c=null),n.set(e=r),Promise.resolve();const f=Xe()+m;let g;return i=We(k=>{if(k<f)return!0;u||(g=d(e,l),"function"==typeof p&&(p=p(e,l)),u=!0),c&&(c.abort(),c=null);const N=k-f;return N>p?(n.set(e=l),!1):(n.set(e=g(h(N/p))),!0)}),i.promise}return{set:s,update:(l,o)=>s(l(r,e),o),subscribe:n.subscribe}}const Oe=qe(0),Lt=globalThis.matchMedia?.("(prefers-reduced-motion: reduce)").matches,Ge=e=>({easing:Ue,duration:Lt?0:e});function dt(e){let t,n,i,r,s=!e[2]&&pt();return{c(){t=C("div"),s&&s.c(),y(t,"class","bp-load"),M(t,"background-image","url("+e[0]+")")},m(l,o){E(l,t,o),s&&s.m(t,null),r=!0},p(l,o){(e=l)[2]?s&&(s.d(1),s=null):s||(s=pt(),s.c(),s.m(t,null)),(!r||1&o)&&M(t,"background-image","url("+e[0]+")")},i(l){r||(x(()=>{i&&i.end(1),n=ut(t,U,{duration:e[1]?400:0}),n.start()}),r=!0)},o(l){n&&n.invalidate(),l&&(i=ue(t,U,{duration:480})),r=!1},d(l){l&&O(t),s&&s.d(),l&&i&&i.end()}}}function pt(e){let t,n;return{c(){t=C("span"),n=C("span"),y(t,"class","bp-bar"),y(n,"class","bp-o")},m(i,r){E(i,t,r),E(i,n,r)},d(i){i&&O(t),i&&O(n)}}}function Yt(e){let t,n=(!e[1]||e[2])&&dt(e);return{c(){n&&n.c(),t=De()},m(i,r){n&&n.m(i,r),E(i,t,r)},p(i,[r]){!i[1]||i[2]?n?(n.p(i,r),6&r&&z(n,1)):(n=dt(i),n.c(),z(n,1),n.m(t.parentNode,t)):n&&(ee(),P(n,1,1,()=>{n=null}),te())},i(i){z(n)},o(i){P(n)},d(i){n&&n.d(i),i&&O(t)}}}function $t(e,t,n){let i;se(e,Oe,l=>n(2,i=l));let{thumb:r}=t,{loaded:s}=t;return e.$$set=l=>{"thumb"in l&&n(0,r=l.thumb),"loaded"in l&&n(1,s=l.loaded)},[r,s,i]}class Je extends we{constructor(t){super(),ye(this,t,$t,Yt,Q,{thumb:0,loaded:1})}}function mt(e){let t,n,i,r,s,l;return{c(){t=C("img"),y(t,"srcset",n=e[7].img),y(t,"sizes",i=e[8].sizes||`${e[1]}px`),y(t,"alt",r=e[7].alt)},m(o,c){E(o,t,c),l=!0},p(o,c){(!l||2&c[0]&&i!==(i=o[8].sizes||`${o[1]}px`))&&y(t,"sizes",i)},i(o){l||(s&&s.end(1),l=!0)},o(o){s=ue(t,U,{}),l=!1},d(o){o&&O(t),o&&s&&s.end()}}}function gt(e){let t,n;return t=new Je({props:{thumb:e[7].thumb,loaded:e[2]}}),{c(){fe(t.$$.fragment)},m(i,r){ne(t,i,r),n=!0},p(i,r){const s={};4&r[0]&&(s.loaded=i[2]),t.$set(s)},i(i){n||(z(t.$$.fragment,i),n=!0)},o(i){P(t.$$.fragment,i),n=!1},d(i){ie(t,i)}}}function Xt(e){let t,n,i,r,s,l,o=e[2]&&mt(e),c=e[3]&>(e);return{c(){t=C("div"),n=C("div"),o&&o.c(),i=De(),c&&c.c(),y(n,"class","bp-img"),M(n,"background-image","url("+e[7].thumb+")"),M(n,"width",e[0][0]+"px"),M(n,"height",e[0][1]+"px"),M(n,"transform","translate3d("+(e[0][0]/-2+e[6][0])+"px, "+(e[0][1]/-2+e[6][1])+"px, 0)"),y(t,"class","bp-img-wrap"),Y(t,"bp-drag",e[4]),Y(t,"bp-close",e[5])},m(u,m){E(u,t,m),K(t,n),o&&o.m(n,null),K(n,i),c&&c.m(n,null),r=!0,s||(l=[Pe(e[17].call(null,n)),L(t,"wheel",e[12]),L(t,"pointerdown",e[13]),L(t,"pointermove",e[14]),L(t,"pointerup",e[16]),L(t,"pointercancel",e[15])],s=!0)},p(u,m){u[2]?o?(o.p(u,m),4&m[0]&&z(o,1)):(o=mt(u),o.c(),z(o,1),o.m(n,i)):o&&(ee(),P(o,1,1,()=>{o=null}),te()),u[3]?c?(c.p(u,m),8&m[0]&&z(c,1)):(c=gt(u),c.c(),z(c,1),c.m(n,null)):c&&(ee(),P(c,1,1,()=>{c=null}),te()),(!r||1&m[0])&&M(n,"width",u[0][0]+"px"),(!r||1&m[0])&&M(n,"height",u[0][1]+"px"),(!r||65&m[0])&&M(n,"transform","translate3d("+(u[0][0]/-2+u[6][0])+"px, "+(u[0][1]/-2+u[6][1])+"px, 0)"),16&m[0]&&Y(t,"bp-drag",u[4]),32&m[0]&&Y(t,"bp-close",u[5])},i(u){r||(z(o),z(c),r=!0)},o(u){P(o),P(c),r=!1},d(u){u&&O(t),o&&o.d(),c&&c.d(),s=!1,X(l)}}}function Nt(e,t,n){let i,r,s,l;se(e,Oe,a=>n(22,s=a));let{props:o}=t,{smallScreen:c}=t,{activeItem:u,opts:m,prev:p,next:h,zoomed:d,container:f}=o;se(e,d,a=>n(21,i=a));let W,w,F,Re,S,G,pe,me,He,ge,Le,g=u.maxZoom||m.maxZoom||10,k=o.calculateDimensions(u),N=k[0],q=0;const he=+u.width,ve=[],re=new Map,J=at(k,Ge(400));se(e,J,a=>n(0,l=a));const B=at([0,0],Ge(400));se(e,B,a=>n(6,r=a));const ze=([a,v],D=l)=>{const I=(D[0]-f.w)/2,$=(D[1]-f.h)/2;return I<0?a=0:a>I?c?(a=S?I+(a-I)/10:I)>I+20&&n(4,S=p()):a=I:a<-I&&(c?(a=S?-I-(-I-a)/10:-I)<-I-20&&n(4,S=h()):a=-I),$<0?v=0:v>$?v=$:v<-$&&(v=-$),[a,v]},Te=(a,v=g)=>{if(s)return;const D=k[0]*g,[I,$]=l;let H=I+I*v,Ye=$+$*v;if(v>0)H>D&&(H=D,Ye=k[1]*g),H>he&&(H=he,Ye=+u.height);else if(H<k[0])return J.set(k),B.set([0,0]);let{x:Qe,y:xe,width:yt,height:wt}=Re.getBoundingClientRect();const vt=a.clientX-Qe-yt/2,zt=a.clientY-xe-wt/2;Qe=H/yt*-vt+vt,xe=Ye/wt*-zt+zt;const Tt=[H,Ye];J.set(Tt).then(()=>{n(1,N=Math.round(Math.max(N,H)))}),B.set(ze([r[0]+Qe,r[1]+xe],Tt))},Z=a=>re.delete(a.pointerId);return e.$$set=a=>{"smallScreen"in a&&n(19,c=a.smallScreen)},e.$$.update=()=>{if(1048577&e.$$.dirty[0]&&d.set(l[0]-10>k[0]),7340032&e.$$.dirty[0]&&s&&i&&!m.intro){const a=Ge(480);B.set([0,0],a),J.set(k,a),n(5,Le=!0)}},[l,N,W,w,S,Le,r,u,m,d,J,B,a=>{m.inline&&!i||(a.preventDefault(),Te(a,a.deltaY/-300))},a=>{2!==a.button&&(a.preventDefault(),n(4,S=!0),re.set(a.pointerId,a),pe=a.clientX,me=a.clientY,He=r[0],ge=r[1])},a=>{if(re.size>1)return n(4,S=!1),m.noPinch?.(f.el)||(a=>{const[v,D]=re.set(a.pointerId,a).values(),H=Math.hypot(v.clientX-D.clientX,v.clientY-D.clientY);F=F||{clientX:(v.clientX+D.clientX)/2,clientY:(v.clientY+D.clientY)/2},Te(F,((q||H)-H)/-35),q=H})(a);if(!S)return;let v=a.clientX,D=a.clientY;G=ve.push({x:v,y:D})>2,v-=pe,D-=me,i||(D<-90&&n(4,S=!m.noClose&&o.close()),Math.abs(D)<30&&(v>40&&n(4,S=p()),v<-40&&n(4,S=h()))),i&&G&&!s&&B.set(ze([He+v,ge+D]),{duration:0})},Z,function j(a){if(Z(a),F&&(n(4,S=q=0),F=re.size?F:null),S){if(n(4,S=!1),a.target===this&&!m.noClose)return o.close();if(G){const[v,D,I]=ve.slice(-3);Math.hypot(D.x-I.x,D.y-I.y)>5&&B.set(ze([r[0]-5*(v.x-I.x),r[1]-5*(v.y-I.y)]))}else m.onImageClick?.(f.el,u)||Te(a,i?-g:g);G=!1,ve.length=0}},a=>{Re=a,o.setResizeFunc(()=>{n(20,k=o.calculateDimensions(u)),(m.inline||!c)&&(J.set(k),B.set([0,0]))}),o.loadImage(u).then(()=>{n(2,W=!0),o.preloadNext()}),setTimeout(()=>{n(3,w=!W)},250)},o,c,k,i,s]}class Wt extends we{constructor(t){super(),ye(this,t,Nt,Xt,Q,{props:18,smallScreen:19},null,[-1,-1])}}function Ft(e){let t,n,i,r,s,l;return i=new Je({props:{thumb:e[2].thumb,loaded:e[0]}}),{c(){t=C("div"),n=C("iframe"),fe(i.$$.fragment),y(n,"allow","autoplay; fullscreen"),y(n,"title",e[2].title),y(t,"class","bp-if"),M(t,"width",e[1][0]+"px"),M(t,"height",e[1][1]+"px")},m(o,c){E(o,t,c),K(t,n),ne(i,t,null),r=!0,s||(l=[Pe(e[3].call(null,n)),L(n,"load",e[5])],s=!0)},p(o,[c]){const u={};1&c&&(u.loaded=o[0]),i.$set(u),(!r||2&c)&&M(t,"width",o[1][0]+"px"),(!r||2&c)&&M(t,"height",o[1][1]+"px")},i(o){r||(z(i.$$.fragment,o),r=!0)},o(o){P(i.$$.fragment,o),r=!1},d(o){o&&O(t),ie(i),s=!1,X(l)}}}function Bt(e,t,n){let r,s,{props:i}=t;const{activeItem:l}=i,o=()=>n(1,s=i.calculateDimensions(l));return o(),i.setResizeFunc(o),[r,s,l,m=>m.src=l.iframe,i,()=>n(0,r=!0)]}class Zt extends we{constructor(t){super(),ye(this,t,Bt,Ft,Q,{props:4})}}function jt(e){let t,n,i,r,s;return n=new Je({props:{thumb:e[2].thumb,loaded:e[0]}}),{c(){t=C("div"),fe(n.$$.fragment),y(t,"class","bp-vid"),M(t,"width",e[1][0]+"px"),M(t,"height",e[1][1]+"px"),M(t,"background-image","url("+e[2].thumb+")")},m(l,o){E(l,t,o),ne(n,t,null),i=!0,r||(s=Pe(e[3].call(null,t)),r=!0)},p(l,[o]){const c={};1&o&&(c.loaded=l[0]),n.$set(c),(!i||2&o)&&M(t,"width",l[1][0]+"px"),(!i||2&o)&&M(t,"height",l[1][1]+"px")},i(l){i||(z(n.$$.fragment,l),i=!0)},o(l){P(n.$$.fragment,l),i=!1},d(l){l&&O(t),ie(n),r=!1,s()}}}function Kt(e,t,n){let r,s,{props:i}=t;const{activeItem:l}=i,o=()=>n(1,s=i.calculateDimensions(l));o(),i.setResizeFunc(o);const c=(m,p)=>{for(const h in p)y(m,h,p[h])};return[r,s,l,m=>{let p;const h=(d,f)=>{Array.isArray(f)||(f=JSON.parse(f));for(const g of f){p||(p=C(g.type?.includes("audio")?"audio":"video"),c(p,{controls:!0,autoplay:!0,playsinline:!0,tabindex:"0"}));const k=C(d);c(k,g),K(p,k)}};h("source",l.sources),h("track",l.tracks||[]),L(p,"canplay",()=>n(0,r=!0)),K(m,p)},i]}class Vt extends we{constructor(t){super(),ye(this,t,Kt,jt,Q,{props:4})}}function ht(e){let t,n,i,s,l,o,c,u,m,p,r=e[6].i,h=bt(e),d=e[0].length>1&&kt(e);return{c(){t=C("div"),n=C("div"),h.c(),s=C("div"),l=C("button"),d&&d.c(),y(l,"class","bp-x"),y(l,"title","Close"),y(l,"aria-label","Close"),y(s,"class","bp-controls"),y(t,"class","bp-wrap"),Y(t,"bp-zoomed",e[10]),Y(t,"bp-inline",e[8]),Y(t,"bp-small",e[7]),Y(t,"bp-noclose",e[5].noClose)},m(f,g){E(f,t,g),K(t,n),h.m(t,null),K(t,s),K(s,l),d&&d.m(s,null),u=!0,m||(p=[L(l,"click",e[1]),Pe(c=e[14].call(null,t))],m=!0)},p(f,g){64&g[0]&&Q(r,r=f[6].i)?(ee(),P(h,1,1,R),te(),h=bt(f),h.c(),z(h),h.m(t,s)):h.p(f,g),f[0].length>1?d?d.p(f,g):(d=kt(f),d.c(),d.m(s,null)):d&&(d.d(1),d=null),1024&g[0]&&Y(t,"bp-zoomed",f[10]),256&g[0]&&Y(t,"bp-inline",f[8]),128&g[0]&&Y(t,"bp-small",f[7]),32&g[0]&&Y(t,"bp-noclose",f[5].noClose)},i(f){u||(i&&i.end(1),z(h),o&&o.end(1),u=!0)},o(f){i=ue(n,U,{duration:480}),P(h),o=ue(s,U,{}),u=!1},d(f){f&&O(t),f&&i&&i.end(),h.d(f),d&&d.d(),f&&o&&o.end(),m=!1,X(p)}}}function Ut(e){let t,n=e[6].html+"";return{c(){t=C("div"),y(t,"class","bp-html")},m(i,r){E(i,t,r),t.innerHTML=n},p(i,r){64&r[0]&&n!==(n=i[6].html+"")&&(t.innerHTML=n)},i:R,o:R,d(i){i&&O(t)}}}function qt(e){let t,n;return t=new Zt({props:{props:e[13]()}}),{c(){fe(t.$$.fragment)},m(i,r){ne(t,i,r),n=!0},p:R,i(i){n||(z(t.$$.fragment,i),n=!0)},o(i){P(t.$$.fragment,i),n=!1},d(i){ie(t,i)}}}function Gt(e){let t,n;return t=new Vt({props:{props:e[13]()}}),{c(){fe(t.$$.fragment)},m(i,r){ne(t,i,r),n=!0},p:R,i(i){n||(z(t.$$.fragment,i),n=!0)},o(i){P(t.$$.fragment,i),n=!1},d(i){ie(t,i)}}}function Jt(e){let t,n;return t=new Wt({props:{props:e[13](),smallScreen:e[7]}}),{c(){fe(t.$$.fragment)},m(i,r){ne(t,i,r),n=!0},p(i,r){const s={};128&r[0]&&(s.smallScreen=i[7]),t.$set(s)},i(i){n||(z(t.$$.fragment,i),n=!0)},o(i){P(t.$$.fragment,i),n=!1},d(i){ie(t,i)}}}function _t(e){let t,i,r,n=e[6].caption+"";return{c(){t=C("div"),y(t,"class","bp-cap"),y(t,"tabindex","0")},m(s,l){E(s,t,l),t.innerHTML=n,r=!0},p(s,l){(!r||64&l[0])&&n!==(n=s[6].caption+"")&&(t.innerHTML=n)},i(s){r||(i&&i.end(1),r=!0)},o(s){i=ue(t,U,{duration:200}),r=!1},d(s){s&&O(t),s&&i&&i.end()}}}function bt(e){let t,n,i,r,s,l,o,c,u;const m=[Jt,Gt,qt,Ut],p=[];function h(f,g){return f[6].img?0:f[6].sources?1:f[6].iframe?2:3}n=h(e),i=p[n]=m[n](e);let d=e[6].caption&&_t(e);return{c(){t=C("div"),i.c(),d&&d.c(),l=De(),y(t,"class","bp-inner")},m(f,g){E(f,t,g),p[n].m(t,null),d&&d.m(f,g),E(f,l,g),o=!0,c||(u=[L(t,"pointerdown",e[21]),L(t,"pointerup",e[22])],c=!0)},p(f,g){let k=n;n=h(f),n===k?p[n].p(f,g):(ee(),P(p[k],1,1,()=>{p[k]=null}),te(),i=p[n],i?i.p(f,g):(i=p[n]=m[n](f),i.c()),z(i,1),i.m(t,null)),f[6].caption?d?(d.p(f,g),64&g[0]&&z(d,1)):(d=_t(f),d.c(),z(d,1),d.m(l.parentNode,l)):d&&(ee(),P(d,1,1,()=>{d=null}),te())},i(f){o||(z(i),x(()=>{s&&s.end(1),r=ut(t,e[12],!0),r.start()}),z(d),o=!0)},o(f){P(i),r&&r.invalidate(),s=ue(t,e[12],!1),P(d),o=!1},d(f){f&&O(t),p[n].d(),f&&s&&s.end(),d&&d.d(f),f&&O(l),c=!1,X(u)}}}function kt(e){let t,i,r,s,l,n=`${e[4]+1} / ${e[0].length}`;return{c(){t=C("div"),i=C("button"),r=C("button"),y(t,"class","bp-count"),y(i,"class","bp-prev"),y(i,"title","Previous"),y(i,"aria-label","Previous"),y(r,"class","bp-next"),y(r,"title","Next"),y(r,"aria-label","Next")},m(o,c){E(o,t,c),t.innerHTML=n,E(o,i,c),E(o,r,c),s||(l=[L(i,"click",e[2]),L(r,"click",e[3])],s=!0)},p(o,c){17&c[0]&&n!==(n=`${o[4]+1} / ${o[0].length}`)&&(t.innerHTML=n)},d(o){o&&O(t),o&&O(i),o&&O(r),s=!1,X(l)}}}function Qt(e){let t,n,i=e[0]&&ht(e);return{c(){i&&i.c(),t=De()},m(r,s){i&&i.m(r,s),E(r,t,s),n=!0},p(r,s){r[0]?i?(i.p(r,s),1&s[0]&&z(i,1)):(i=ht(r),i.c(),z(i,1),i.m(t.parentNode,t)):i&&(ee(),P(i,1,1,()=>{i=null}),te())},i(r){n||(z(i),n=!0)},o(r){P(i),n=!1},d(r){i&&i.d(r),r&&O(t)}}}function xt(e,t,n){let i,{items:r}=t,{target:s}=t;const l=document.documentElement;let o,c,u,m,p,h,d,f,g,k,N;const W=_=>N=_,w={},F=qe(0);se(e,F,_=>n(10,i=_));const q=()=>{c.onClose?.(w.el,g),Oe.set(!0),n(0,r=null),m?.focus({preventScroll:!0})},S=()=>pe(o-1),G=()=>pe(o+1),pe=_=>{d=_-o,n(4,o=me(_))},me=_=>(_+r.length)%r.length,He=_=>{const{key:b,shiftKey:T}=_;if("Escape"===b)!c.noClose&&q();else if("ArrowRight"===b)G();else if("ArrowLeft"===b)S();else if("Tab"===b){const{activeElement:A}=document;if(T||!A.controls){_.preventDefault();const{focusWrap:Z=w.el}=c,j=[...Z.querySelectorAll("*")].filter(a=>a.tabIndex>=0);let oe=j.indexOf(A);oe+=j.length+(T?-1:1),j[oe%j.length].focus()}}},ge=({width:_=1920,height:b=1080})=>{const{scale:T=.99}=c,A=Math.min(1,w.w/_*T,w.h/b*T);return[Math.round(_*A),Math.round(b*A)]},Le=()=>{if(r){const _=r[me(o+1)],b=r[me(o-1)];!_.preload&&he(_),!b.preload&&he(b)}},he=_=>{if(_.img){const b=C("img");return b.sizes=c.sizes||`${ge(_)[0]}px`,b.srcset=_.img,_.preload=!0,b.decode()}};return e.$$set=_=>{"items"in _&&n(0,r=_.items),"target"in _&&n(15,s=_.target)},e.$$.update=()=>{1835121&e.$$.dirty[0]&&r&&(n(6,g=r[o]),n(19,k=g.hasOwnProperty("html")),u&&(k&&W(null),c.onUpdate?.(w.el,g)))},[r,q,S,G,o,c,g,p,h,f,i,F,(_,b)=>u&&r?U(_,{x:(d>0?20:-20)*(b?1:-1),duration:250}):(n(18,u=b),c.intro?U(_,{y:b?10:-10}):(_=>{let b;if(k){const a=_.firstChild.firstChild;b=[a.clientWidth,a.clientHeight]}else b=ge(g);const T=(g.element||m).getBoundingClientRect(),A=T.left-(w.w-T.width)/2,Z=T.top-(w.h-T.height)/2,j=T.width/b[0],oe=T.height/b[1];return{duration:480,easing:Ue,css:(a,v)=>`transform:translate3d(${A*v}px, ${Z*v}px, 0) scale3d(${j+a*(1-j)}, ${oe+a*(1-oe)}, 1)`}})(_)),()=>({activeItem:g,calculateDimensions:ge,loadImage:he,preloadNext:Le,opts:c,prev:S,next:G,close:q,setResizeFunc:W,zoomed:F,container:w}),_=>{let b,T;n(20,w.el=_,w),c.onOpen?.(w.el,g),h||(b=L(globalThis,"keydown",He));const A=new ResizeObserver(Z=>{T&&(n(20,w.w=Z[0].contentRect.width,w),n(20,w.h=Z[0].contentRect.height,w),n(7,p=w.w<769),N?.(),c.onResize?.(w.el,g)),T=!0});return A.observe(_),{destroy(){A.disconnect(),b?.(),Oe.set(!1),l.classList.remove("bp-lock"),c.onClosed?.()}}},s,_=>{n(5,c=_),n(8,h=c.inline);const b=c.items;!h&&l.scrollHeight>l.clientHeight&&l.classList.add("bp-lock"),m=document.activeElement,n(20,w.w=s.offsetWidth,w),n(20,w.h=s===document.body?globalThis.innerHeight:s.clientHeight,w),n(7,p=w.w<769),n(4,o=c.position||0),Array.isArray(b)?n(0,r=b.map((T,A)=>(c.el&&c.el===T.element&&n(4,o=A),{i:A,...T}))):n(0,r=(b.length?[...b]:[b]).map((T,A)=>(c.el===T&&n(4,o=A),{element:T,i:A,...T.dataset})))},pe,u,k,w,_=>n(9,f=_.target),function(_){2!==_.button&&_.target===this&&f===this&&!c.noClose&&q()}]}class en extends we{constructor(t){super(),ye(this,t,xt,Qt,Q,{items:0,target:15,open:16,close:1,prev:2,next:3,setPosition:17},null,[-1,-1])}get items(){return this.$$.ctx[0]}get target(){return this.$$.ctx[15]}get open(){return this.$$.ctx[16]}get close(){return this.$$.ctx[1]}get prev(){return this.$$.ctx[2]}get next(){return this.$$.ctx[3]}get setPosition(){return this.$$.ctx[17]}}var nn=Ce(3154),rn=Ce(4650);const on=function tn(e){return new en({...e,props:e})}({target:document.body});class de{constructor(){}openBiggerPicture(t,n){return(0,It.Z)(function*(){t.preventDefault();try{const i=yield nn.g.getImageInfo(n);on.open({items:[i],intro:"fadeup"})}catch(i){alert(i)}})()}}de.\u0275fac=function(t){return new(t||de)},de.\u0275prov=rn.Yz7({token:de,factory:de.\u0275fac,providedIn:"root"})}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkpos_marketplace=self.webpackChunkpos_marketplace||[]).push([[796],{8796:($e,M,d)=>{d.d(M,{A0:()=>je,ir:()=>x,jq:()=>N,w9:()=>Qe});var t=d(4650),P=d(4006),E=d(2722),R=d(3601),H=d(8675),V=d(8505),U=d(8372),Y=d(9300),G=d(4004),Z=d(6406),W=d(3101),C=d(7579),b=d(4968),F=d(6451),f=d(6895);const K=["content"],Q=["scroll"],z=["padding"],T=function(i){return{searchTerm:i}};function J(i,s){if(1&i&&(t.TgZ(0,"div",6),t.GkF(1,7),t.qZA()),2&i){const e=t.oxw();t.xp6(1),t.Q6J("ngTemplateOutlet",e.headerTemplate)("ngTemplateOutletContext",t.VKq(2,T,e.filterValue))}}function j(i,s){if(1&i&&(t.TgZ(0,"div",8),t.GkF(1,7),t.qZA()),2&i){const e=t.oxw();t.xp6(1),t.Q6J("ngTemplateOutlet",e.footerTemplate)("ngTemplateOutletContext",t.VKq(2,T,e.filterValue))}}const I=["*"],$=["searchInput"];function q(i,s){if(1&i){const e=t.EpF();t.TgZ(0,"span",15),t.NdJ("click",function(){t.CHM(e);const l=t.oxw().$implicit,o=t.oxw(2);return t.KtG(o.unselect(l))}),t._uU(1,"\xd7"),t.qZA(),t._UZ(2,"span",16)}if(2&i){const e=t.oxw().$implicit,n=t.oxw(2);t.xp6(2),t.Q6J("ngItemLabel",e.label)("escape",n.escapeHTML)}}function X(i,s){}const ee=function(i,s,e){return{item:i,clear:s,label:e}};function te(i,s){if(1&i&&(t.TgZ(0,"div",12),t.YNc(1,q,3,2,"ng-template",null,13,t.W1O),t.YNc(3,X,0,0,"ng-template",14),t.qZA()),2&i){const e=s.$implicit,n=t.MAs(2),l=t.oxw(2);t.ekj("ng-value-disabled",e.disabled),t.xp6(3),t.Q6J("ngTemplateOutlet",l.labelTemplate||n)("ngTemplateOutletContext",t.kEZ(4,ee,e.value,l.clearItem,e.label))}}function ne(i,s){if(1&i&&(t.ynx(0),t.YNc(1,te,4,8,"div",11),t.BQk()),2&i){const e=t.oxw();t.xp6(1),t.Q6J("ngForOf",e.selectedItems)("ngForTrackBy",e.trackByOption)}}function ie(i,s){}const se=function(i,s){return{items:i,clear:s}};function le(i,s){if(1&i&&t.YNc(0,ie,0,0,"ng-template",14),2&i){const e=t.oxw();t.Q6J("ngTemplateOutlet",e.multiLabelTemplate)("ngTemplateOutletContext",t.WLB(2,se,e.selectedValues,e.clearItem))}}function oe(i,s){1&i&&t._UZ(0,"div",19)}function re(i,s){}function ae(i,s){if(1&i&&(t.ynx(0),t.YNc(1,oe,1,0,"ng-template",null,17,t.W1O),t.YNc(3,re,0,0,"ng-template",18),t.BQk()),2&i){const e=t.MAs(2),n=t.oxw();t.xp6(3),t.Q6J("ngTemplateOutlet",n.loadingSpinnerTemplate||e)}}function ue(i,s){if(1&i&&(t.TgZ(0,"span",20)(1,"span",21),t._uU(2,"\xd7"),t.qZA()()),2&i){const e=t.oxw();t.s9C("title",e.clearAllText)}}function ce(i,s){if(1&i&&t._UZ(0,"span",27),2&i){const e=t.oxw().$implicit,n=t.oxw(2);t.Q6J("ngItemLabel",e.label)("escape",n.escapeHTML)}}function de(i,s){}const he=function(i,s,e,n){return{item:i,item$:s,index:e,searchTerm:n}};function pe(i,s){if(1&i){const e=t.EpF();t.TgZ(0,"div",25),t.NdJ("click",function(){const o=t.CHM(e).$implicit,r=t.oxw(2);return t.KtG(r.toggleItem(o))})("mouseover",function(){const o=t.CHM(e).$implicit,r=t.oxw(2);return t.KtG(r.onItemHover(o))}),t.YNc(1,ce,1,2,"ng-template",null,26,t.W1O),t.YNc(3,de,0,0,"ng-template",14),t.qZA()}if(2&i){const e=s.$implicit,n=t.MAs(2),l=t.oxw(2);t.ekj("ng-option-disabled",e.disabled)("ng-option-selected",e.selected)("ng-optgroup",e.children)("ng-option",!e.children)("ng-option-child",!!e.parent)("ng-option-marked",e===l.itemsList.markedItem),t.uIk("role",e.children?"group":"option")("aria-selected",e.selected)("id",null==e?null:e.htmlId),t.xp6(3),t.Q6J("ngTemplateOutlet",e.children?l.optgroupTemplate||n:l.optionTemplate||n)("ngTemplateOutletContext",t.l5B(17,he,e.value,e,e.index,l.searchTerm))}}function ge(i,s){if(1&i&&(t.TgZ(0,"span")(1,"span",30),t._uU(2),t.qZA(),t._uU(3),t.qZA()),2&i){const e=t.oxw(3);t.xp6(2),t.Oqu(e.addTagText),t.xp6(1),t.hij('"',e.searchTerm,'"')}}function me(i,s){}function _e(i,s){if(1&i){const e=t.EpF();t.TgZ(0,"div",28),t.NdJ("mouseover",function(){t.CHM(e);const l=t.oxw(2);return t.KtG(l.itemsList.unmarkItem())})("click",function(){t.CHM(e);const l=t.oxw(2);return t.KtG(l.selectTag())}),t.YNc(1,ge,4,2,"ng-template",null,29,t.W1O),t.YNc(3,me,0,0,"ng-template",14),t.qZA()}if(2&i){const e=t.MAs(2),n=t.oxw(2);t.ekj("ng-option-marked",!n.itemsList.markedItem),t.xp6(3),t.Q6J("ngTemplateOutlet",n.tagTemplate||e)("ngTemplateOutletContext",t.VKq(4,T,n.searchTerm))}}function fe(i,s){if(1&i&&(t.TgZ(0,"div",32),t._uU(1),t.qZA()),2&i){const e=t.oxw(3);t.xp6(1),t.Oqu(e.notFoundText)}}function Ee(i,s){}function Te(i,s){if(1&i&&(t.ynx(0),t.YNc(1,fe,2,1,"ng-template",null,31,t.W1O),t.YNc(3,Ee,0,0,"ng-template",14),t.BQk()),2&i){const e=t.MAs(2),n=t.oxw(2);t.xp6(3),t.Q6J("ngTemplateOutlet",n.notFoundTemplate||e)("ngTemplateOutletContext",t.VKq(2,T,n.searchTerm))}}function ve(i,s){if(1&i&&(t.TgZ(0,"div",32),t._uU(1),t.qZA()),2&i){const e=t.oxw(3);t.xp6(1),t.Oqu(e.typeToSearchText)}}function Ce(i,s){}function be(i,s){if(1&i&&(t.ynx(0),t.YNc(1,ve,2,1,"ng-template",null,33,t.W1O),t.YNc(3,Ce,0,0,"ng-template",18),t.BQk()),2&i){const e=t.MAs(2),n=t.oxw(2);t.xp6(3),t.Q6J("ngTemplateOutlet",n.typeToSearchTemplate||e)}}function Ae(i,s){if(1&i&&(t.TgZ(0,"div",32),t._uU(1),t.qZA()),2&i){const e=t.oxw(3);t.xp6(1),t.Oqu(e.loadingText)}}function Se(i,s){}function we(i,s){if(1&i&&(t.ynx(0),t.YNc(1,Ae,2,1,"ng-template",null,34,t.W1O),t.YNc(3,Se,0,0,"ng-template",14),t.BQk()),2&i){const e=t.MAs(2),n=t.oxw(2);t.xp6(3),t.Q6J("ngTemplateOutlet",n.loadingTextTemplate||e)("ngTemplateOutletContext",t.VKq(2,T,n.searchTerm))}}function Fe(i,s){if(1&i){const e=t.EpF();t.TgZ(0,"ng-dropdown-panel",22),t.NdJ("update",function(l){t.CHM(e);const o=t.oxw();return t.KtG(o.viewPortItems=l)})("scroll",function(l){t.CHM(e);const o=t.oxw();return t.KtG(o.scroll.emit(l))})("scrollToEnd",function(l){t.CHM(e);const o=t.oxw();return t.KtG(o.scrollToEnd.emit(l))})("outsideClick",function(){t.CHM(e);const l=t.oxw();return t.KtG(l.close())}),t.ynx(1),t.YNc(2,pe,4,22,"div",23),t.YNc(3,_e,4,6,"div",24),t.BQk(),t.YNc(4,Te,4,4,"ng-container",3),t.YNc(5,be,4,1,"ng-container",3),t.YNc(6,we,4,4,"ng-container",3),t.qZA()}if(2&i){const e=t.oxw();t.ekj("ng-select-multiple",e.multiple),t.Q6J("virtualScroll",e.virtualScroll)("bufferAmount",e.bufferAmount)("appendTo",e.appendTo)("position",e.dropdownPosition)("headerTemplate",e.headerTemplate)("footerTemplate",e.footerTemplate)("filterValue",e.searchTerm)("items",e.itemsList.filteredItems)("markedItem",e.itemsList.markedItem)("ngClass",e.appendTo?e.classes:null)("id",e.dropdownId),t.xp6(2),t.Q6J("ngForOf",e.viewPortItems)("ngForTrackBy",e.trackByOption),t.xp6(1),t.Q6J("ngIf",e.showAddTag),t.xp6(1),t.Q6J("ngIf",e.showNoItemsFound()),t.xp6(1),t.Q6J("ngIf",e.showTypeToSearch()),t.xp6(1),t.Q6J("ngIf",e.loading&&0===e.itemsList.filteredItems.length)}}const D=/[&<>"']/g,Ie=RegExp(D.source),De={"&":"&","<":"<",">":">",'"':""","'":"'"};function u(i){return null!=i}function v(i){return"object"==typeof i&&u(i)}function A(i){return i instanceof Function}let ye=(()=>{class i{constructor(e){this.element=e,this.escape=!0}ngOnChanges(e){this.element.nativeElement.innerHTML=this.escape?function xe(i){return i&&Ie.test(i)?i.replace(D,s=>De[s]):i}(this.ngItemLabel):this.ngItemLabel}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(t.SBq))},i.\u0275dir=t.lG2({type:i,selectors:[["","ngItemLabel",""]],inputs:{ngItemLabel:"ngItemLabel",escape:"escape"},features:[t.TTD]}),i})(),x=(()=>{class i{constructor(e){this.template=e}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(t.Rgc))},i.\u0275dir=t.lG2({type:i,selectors:[["","ng-option-tmp",""]]}),i})(),Le=(()=>{class i{constructor(e){this.template=e}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(t.Rgc))},i.\u0275dir=t.lG2({type:i,selectors:[["","ng-optgroup-tmp",""]]}),i})(),ke=(()=>{class i{constructor(e){this.template=e}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(t.Rgc))},i.\u0275dir=t.lG2({type:i,selectors:[["","ng-label-tmp",""]]}),i})(),Ne=(()=>{class i{constructor(e){this.template=e}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(t.Rgc))},i.\u0275dir=t.lG2({type:i,selectors:[["","ng-multi-label-tmp",""]]}),i})(),Be=(()=>{class i{constructor(e){this.template=e}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(t.Rgc))},i.\u0275dir=t.lG2({type:i,selectors:[["","ng-header-tmp",""]]}),i})(),Me=(()=>{class i{constructor(e){this.template=e}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(t.Rgc))},i.\u0275dir=t.lG2({type:i,selectors:[["","ng-footer-tmp",""]]}),i})(),Pe=(()=>{class i{constructor(e){this.template=e}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(t.Rgc))},i.\u0275dir=t.lG2({type:i,selectors:[["","ng-notfound-tmp",""]]}),i})(),Re=(()=>{class i{constructor(e){this.template=e}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(t.Rgc))},i.\u0275dir=t.lG2({type:i,selectors:[["","ng-typetosearch-tmp",""]]}),i})(),He=(()=>{class i{constructor(e){this.template=e}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(t.Rgc))},i.\u0275dir=t.lG2({type:i,selectors:[["","ng-loadingtext-tmp",""]]}),i})(),Ve=(()=>{class i{constructor(e){this.template=e}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(t.Rgc))},i.\u0275dir=t.lG2({type:i,selectors:[["","ng-tag-tmp",""]]}),i})(),Ue=(()=>{class i{constructor(e){this.template=e}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(t.Rgc))},i.\u0275dir=t.lG2({type:i,selectors:[["","ng-loadingspinner-tmp",""]]}),i})();function O(){return"axxxxxxxxxxx".replace(/[x]/g,()=>(16*Math.random()|0).toString(16))}const Ye={"\u24b6":"A",\uff21:"A",\u00c0:"A",\u00c1:"A",\u00c2:"A",\u1ea6:"A",\u1ea4:"A",\u1eaa:"A",\u1ea8:"A",\u00c3:"A",\u0100:"A",\u0102:"A",\u1eb0:"A",\u1eae:"A",\u1eb4:"A",\u1eb2:"A",\u0226:"A",\u01e0:"A",\u00c4:"A",\u01de:"A",\u1ea2:"A",\u00c5:"A",\u01fa:"A",\u01cd:"A",\u0200:"A",\u0202:"A",\u1ea0:"A",\u1eac:"A",\u1eb6:"A",\u1e00:"A",\u0104:"A",\u023a:"A",\u2c6f:"A",\ua732:"AA",\u00c6:"AE",\u01fc:"AE",\u01e2:"AE",\ua734:"AO",\ua736:"AU",\ua738:"AV",\ua73a:"AV",\ua73c:"AY","\u24b7":"B",\uff22:"B",\u1e02:"B",\u1e04:"B",\u1e06:"B",\u0243:"B",\u0182:"B",\u0181:"B","\u24b8":"C",\uff23:"C",\u0106:"C",\u0108:"C",\u010a:"C",\u010c:"C",\u00c7:"C",\u1e08:"C",\u0187:"C",\u023b:"C",\ua73e:"C","\u24b9":"D",\uff24:"D",\u1e0a:"D",\u010e:"D",\u1e0c:"D",\u1e10:"D",\u1e12:"D",\u1e0e:"D",\u0110:"D",\u018b:"D",\u018a:"D",\u0189:"D",\ua779:"D",\u01f1:"DZ",\u01c4:"DZ",\u01f2:"Dz",\u01c5:"Dz","\u24ba":"E",\uff25:"E",\u00c8:"E",\u00c9:"E",\u00ca:"E",\u1ec0:"E",\u1ebe:"E",\u1ec4:"E",\u1ec2:"E",\u1ebc:"E",\u0112:"E",\u1e14:"E",\u1e16:"E",\u0114:"E",\u0116:"E",\u00cb:"E",\u1eba:"E",\u011a:"E",\u0204:"E",\u0206:"E",\u1eb8:"E",\u1ec6:"E",\u0228:"E",\u1e1c:"E",\u0118:"E",\u1e18:"E",\u1e1a:"E",\u0190:"E",\u018e:"E","\u24bb":"F",\uff26:"F",\u1e1e:"F",\u0191:"F",\ua77b:"F","\u24bc":"G",\uff27:"G",\u01f4:"G",\u011c:"G",\u1e20:"G",\u011e:"G",\u0120:"G",\u01e6:"G",\u0122:"G",\u01e4:"G",\u0193:"G",\ua7a0:"G",\ua77d:"G",\ua77e:"G","\u24bd":"H",\uff28:"H",\u0124:"H",\u1e22:"H",\u1e26:"H",\u021e:"H",\u1e24:"H",\u1e28:"H",\u1e2a:"H",\u0126:"H",\u2c67:"H",\u2c75:"H",\ua78d:"H","\u24be":"I",\uff29:"I",\u00cc:"I",\u00cd:"I",\u00ce:"I",\u0128:"I",\u012a:"I",\u012c:"I",\u0130:"I",\u00cf:"I",\u1e2e:"I",\u1ec8:"I",\u01cf:"I",\u0208:"I",\u020a:"I",\u1eca:"I",\u012e:"I",\u1e2c:"I",\u0197:"I","\u24bf":"J",\uff2a:"J",\u0134:"J",\u0248:"J","\u24c0":"K",\uff2b:"K",\u1e30:"K",\u01e8:"K",\u1e32:"K",\u0136:"K",\u1e34:"K",\u0198:"K",\u2c69:"K",\ua740:"K",\ua742:"K",\ua744:"K",\ua7a2:"K","\u24c1":"L",\uff2c:"L",\u013f:"L",\u0139:"L",\u013d:"L",\u1e36:"L",\u1e38:"L",\u013b:"L",\u1e3c:"L",\u1e3a:"L",\u0141:"L",\u023d:"L",\u2c62:"L",\u2c60:"L",\ua748:"L",\ua746:"L",\ua780:"L",\u01c7:"LJ",\u01c8:"Lj","\u24c2":"M",\uff2d:"M",\u1e3e:"M",\u1e40:"M",\u1e42:"M",\u2c6e:"M",\u019c:"M","\u24c3":"N",\uff2e:"N",\u01f8:"N",\u0143:"N",\u00d1:"N",\u1e44:"N",\u0147:"N",\u1e46:"N",\u0145:"N",\u1e4a:"N",\u1e48:"N",\u0220:"N",\u019d:"N",\ua790:"N",\ua7a4:"N",\u01ca:"NJ",\u01cb:"Nj","\u24c4":"O",\uff2f:"O",\u00d2:"O",\u00d3:"O",\u00d4:"O",\u1ed2:"O",\u1ed0:"O",\u1ed6:"O",\u1ed4:"O",\u00d5:"O",\u1e4c:"O",\u022c:"O",\u1e4e:"O",\u014c:"O",\u1e50:"O",\u1e52:"O",\u014e:"O",\u022e:"O",\u0230:"O",\u00d6:"O",\u022a:"O",\u1ece:"O",\u0150:"O",\u01d1:"O",\u020c:"O",\u020e:"O",\u01a0:"O",\u1edc:"O",\u1eda:"O",\u1ee0:"O",\u1ede:"O",\u1ee2:"O",\u1ecc:"O",\u1ed8:"O",\u01ea:"O",\u01ec:"O",\u00d8:"O",\u01fe:"O",\u0186:"O",\u019f:"O",\ua74a:"O",\ua74c:"O",\u01a2:"OI",\ua74e:"OO",\u0222:"OU","\u24c5":"P",\uff30:"P",\u1e54:"P",\u1e56:"P",\u01a4:"P",\u2c63:"P",\ua750:"P",\ua752:"P",\ua754:"P","\u24c6":"Q",\uff31:"Q",\ua756:"Q",\ua758:"Q",\u024a:"Q","\u24c7":"R",\uff32:"R",\u0154:"R",\u1e58:"R",\u0158:"R",\u0210:"R",\u0212:"R",\u1e5a:"R",\u1e5c:"R",\u0156:"R",\u1e5e:"R",\u024c:"R",\u2c64:"R",\ua75a:"R",\ua7a6:"R",\ua782:"R","\u24c8":"S",\uff33:"S",\u1e9e:"S",\u015a:"S",\u1e64:"S",\u015c:"S",\u1e60:"S",\u0160:"S",\u1e66:"S",\u1e62:"S",\u1e68:"S",\u0218:"S",\u015e:"S",\u2c7e:"S",\ua7a8:"S",\ua784:"S","\u24c9":"T",\uff34:"T",\u1e6a:"T",\u0164:"T",\u1e6c:"T",\u021a:"T",\u0162:"T",\u1e70:"T",\u1e6e:"T",\u0166:"T",\u01ac:"T",\u01ae:"T",\u023e:"T",\ua786:"T",\ua728:"TZ","\u24ca":"U",\uff35:"U",\u00d9:"U",\u00da:"U",\u00db:"U",\u0168:"U",\u1e78:"U",\u016a:"U",\u1e7a:"U",\u016c:"U",\u00dc:"U",\u01db:"U",\u01d7:"U",\u01d5:"U",\u01d9:"U",\u1ee6:"U",\u016e:"U",\u0170:"U",\u01d3:"U",\u0214:"U",\u0216:"U",\u01af:"U",\u1eea:"U",\u1ee8:"U",\u1eee:"U",\u1eec:"U",\u1ef0:"U",\u1ee4:"U",\u1e72:"U",\u0172:"U",\u1e76:"U",\u1e74:"U",\u0244:"U","\u24cb":"V",\uff36:"V",\u1e7c:"V",\u1e7e:"V",\u01b2:"V",\ua75e:"V",\u0245:"V",\ua760:"VY","\u24cc":"W",\uff37:"W",\u1e80:"W",\u1e82:"W",\u0174:"W",\u1e86:"W",\u1e84:"W",\u1e88:"W",\u2c72:"W","\u24cd":"X",\uff38:"X",\u1e8a:"X",\u1e8c:"X","\u24ce":"Y",\uff39:"Y",\u1ef2:"Y",\u00dd:"Y",\u0176:"Y",\u1ef8:"Y",\u0232:"Y",\u1e8e:"Y",\u0178:"Y",\u1ef6:"Y",\u1ef4:"Y",\u01b3:"Y",\u024e:"Y",\u1efe:"Y","\u24cf":"Z",\uff3a:"Z",\u0179:"Z",\u1e90:"Z",\u017b:"Z",\u017d:"Z",\u1e92:"Z",\u1e94:"Z",\u01b5:"Z",\u0224:"Z",\u2c7f:"Z",\u2c6b:"Z",\ua762:"Z","\u24d0":"a",\uff41:"a",\u1e9a:"a",\u00e0:"a",\u00e1:"a",\u00e2:"a",\u1ea7:"a",\u1ea5:"a",\u1eab:"a",\u1ea9:"a",\u00e3:"a",\u0101:"a",\u0103:"a",\u1eb1:"a",\u1eaf:"a",\u1eb5:"a",\u1eb3:"a",\u0227:"a",\u01e1:"a",\u00e4:"a",\u01df:"a",\u1ea3:"a",\u00e5:"a",\u01fb:"a",\u01ce:"a",\u0201:"a",\u0203:"a",\u1ea1:"a",\u1ead:"a",\u1eb7:"a",\u1e01:"a",\u0105:"a",\u2c65:"a",\u0250:"a",\ua733:"aa",\u00e6:"ae",\u01fd:"ae",\u01e3:"ae",\ua735:"ao",\ua737:"au",\ua739:"av",\ua73b:"av",\ua73d:"ay","\u24d1":"b",\uff42:"b",\u1e03:"b",\u1e05:"b",\u1e07:"b",\u0180:"b",\u0183:"b",\u0253:"b","\u24d2":"c",\uff43:"c",\u0107:"c",\u0109:"c",\u010b:"c",\u010d:"c",\u00e7:"c",\u1e09:"c",\u0188:"c",\u023c:"c",\ua73f:"c",\u2184:"c","\u24d3":"d",\uff44:"d",\u1e0b:"d",\u010f:"d",\u1e0d:"d",\u1e11:"d",\u1e13:"d",\u1e0f:"d",\u0111:"d",\u018c:"d",\u0256:"d",\u0257:"d",\ua77a:"d",\u01f3:"dz",\u01c6:"dz","\u24d4":"e",\uff45:"e",\u00e8:"e",\u00e9:"e",\u00ea:"e",\u1ec1:"e",\u1ebf:"e",\u1ec5:"e",\u1ec3:"e",\u1ebd:"e",\u0113:"e",\u1e15:"e",\u1e17:"e",\u0115:"e",\u0117:"e",\u00eb:"e",\u1ebb:"e",\u011b:"e",\u0205:"e",\u0207:"e",\u1eb9:"e",\u1ec7:"e",\u0229:"e",\u1e1d:"e",\u0119:"e",\u1e19:"e",\u1e1b:"e",\u0247:"e",\u025b:"e",\u01dd:"e","\u24d5":"f",\uff46:"f",\u1e1f:"f",\u0192:"f",\ua77c:"f","\u24d6":"g",\uff47:"g",\u01f5:"g",\u011d:"g",\u1e21:"g",\u011f:"g",\u0121:"g",\u01e7:"g",\u0123:"g",\u01e5:"g",\u0260:"g",\ua7a1:"g",\u1d79:"g",\ua77f:"g","\u24d7":"h",\uff48:"h",\u0125:"h",\u1e23:"h",\u1e27:"h",\u021f:"h",\u1e25:"h",\u1e29:"h",\u1e2b:"h",\u1e96:"h",\u0127:"h",\u2c68:"h",\u2c76:"h",\u0265:"h",\u0195:"hv","\u24d8":"i",\uff49:"i",\u00ec:"i",\u00ed:"i",\u00ee:"i",\u0129:"i",\u012b:"i",\u012d:"i",\u00ef:"i",\u1e2f:"i",\u1ec9:"i",\u01d0:"i",\u0209:"i",\u020b:"i",\u1ecb:"i",\u012f:"i",\u1e2d:"i",\u0268:"i",\u0131:"i","\u24d9":"j",\uff4a:"j",\u0135:"j",\u01f0:"j",\u0249:"j","\u24da":"k",\uff4b:"k",\u1e31:"k",\u01e9:"k",\u1e33:"k",\u0137:"k",\u1e35:"k",\u0199:"k",\u2c6a:"k",\ua741:"k",\ua743:"k",\ua745:"k",\ua7a3:"k","\u24db":"l",\uff4c:"l",\u0140:"l",\u013a:"l",\u013e:"l",\u1e37:"l",\u1e39:"l",\u013c:"l",\u1e3d:"l",\u1e3b:"l",\u017f:"l",\u0142:"l",\u019a:"l",\u026b:"l",\u2c61:"l",\ua749:"l",\ua781:"l",\ua747:"l",\u01c9:"lj","\u24dc":"m",\uff4d:"m",\u1e3f:"m",\u1e41:"m",\u1e43:"m",\u0271:"m",\u026f:"m","\u24dd":"n",\uff4e:"n",\u01f9:"n",\u0144:"n",\u00f1:"n",\u1e45:"n",\u0148:"n",\u1e47:"n",\u0146:"n",\u1e4b:"n",\u1e49:"n",\u019e:"n",\u0272:"n",\u0149:"n",\ua791:"n",\ua7a5:"n",\u01cc:"nj","\u24de":"o",\uff4f:"o",\u00f2:"o",\u00f3:"o",\u00f4:"o",\u1ed3:"o",\u1ed1:"o",\u1ed7:"o",\u1ed5:"o",\u00f5:"o",\u1e4d:"o",\u022d:"o",\u1e4f:"o",\u014d:"o",\u1e51:"o",\u1e53:"o",\u014f:"o",\u022f:"o",\u0231:"o",\u00f6:"o",\u022b:"o",\u1ecf:"o",\u0151:"o",\u01d2:"o",\u020d:"o",\u020f:"o",\u01a1:"o",\u1edd:"o",\u1edb:"o",\u1ee1:"o",\u1edf:"o",\u1ee3:"o",\u1ecd:"o",\u1ed9:"o",\u01eb:"o",\u01ed:"o",\u00f8:"o",\u01ff:"o",\u0254:"o",\ua74b:"o",\ua74d:"o",\u0275:"o",\u01a3:"oi",\u0223:"ou",\ua74f:"oo","\u24df":"p",\uff50:"p",\u1e55:"p",\u1e57:"p",\u01a5:"p",\u1d7d:"p",\ua751:"p",\ua753:"p",\ua755:"p","\u24e0":"q",\uff51:"q",\u024b:"q",\ua757:"q",\ua759:"q","\u24e1":"r",\uff52:"r",\u0155:"r",\u1e59:"r",\u0159:"r",\u0211:"r",\u0213:"r",\u1e5b:"r",\u1e5d:"r",\u0157:"r",\u1e5f:"r",\u024d:"r",\u027d:"r",\ua75b:"r",\ua7a7:"r",\ua783:"r","\u24e2":"s",\uff53:"s",\u00df:"s",\u015b:"s",\u1e65:"s",\u015d:"s",\u1e61:"s",\u0161:"s",\u1e67:"s",\u1e63:"s",\u1e69:"s",\u0219:"s",\u015f:"s",\u023f:"s",\ua7a9:"s",\ua785:"s",\u1e9b:"s","\u24e3":"t",\uff54:"t",\u1e6b:"t",\u1e97:"t",\u0165:"t",\u1e6d:"t",\u021b:"t",\u0163:"t",\u1e71:"t",\u1e6f:"t",\u0167:"t",\u01ad:"t",\u0288:"t",\u2c66:"t",\ua787:"t",\ua729:"tz","\u24e4":"u",\uff55:"u",\u00f9:"u",\u00fa:"u",\u00fb:"u",\u0169:"u",\u1e79:"u",\u016b:"u",\u1e7b:"u",\u016d:"u",\u00fc:"u",\u01dc:"u",\u01d8:"u",\u01d6:"u",\u01da:"u",\u1ee7:"u",\u016f:"u",\u0171:"u",\u01d4:"u",\u0215:"u",\u0217:"u",\u01b0:"u",\u1eeb:"u",\u1ee9:"u",\u1eef:"u",\u1eed:"u",\u1ef1:"u",\u1ee5:"u",\u1e73:"u",\u0173:"u",\u1e77:"u",\u1e75:"u",\u0289:"u","\u24e5":"v",\uff56:"v",\u1e7d:"v",\u1e7f:"v",\u028b:"v",\ua75f:"v",\u028c:"v",\ua761:"vy","\u24e6":"w",\uff57:"w",\u1e81:"w",\u1e83:"w",\u0175:"w",\u1e87:"w",\u1e85:"w",\u1e98:"w",\u1e89:"w",\u2c73:"w","\u24e7":"x",\uff58:"x",\u1e8b:"x",\u1e8d:"x","\u24e8":"y",\uff59:"y",\u1ef3:"y",\u00fd:"y",\u0177:"y",\u1ef9:"y",\u0233:"y",\u1e8f:"y",\u00ff:"y",\u1ef7:"y",\u1e99:"y",\u1ef5:"y",\u01b4:"y",\u024f:"y",\u1eff:"y","\u24e9":"z",\uff5a:"z",\u017a:"z",\u1e91:"z",\u017c:"z",\u017e:"z",\u1e93:"z",\u1e95:"z",\u01b6:"z",\u0225:"z",\u0240:"z",\u2c6c:"z",\ua763:"z",\u0386:"\u0391",\u0388:"\u0395",\u0389:"\u0397",\u038a:"\u0399",\u03aa:"\u0399",\u038c:"\u039f",\u038e:"\u03a5",\u03ab:"\u03a5",\u038f:"\u03a9",\u03ac:"\u03b1",\u03ad:"\u03b5",\u03ae:"\u03b7",\u03af:"\u03b9",\u03ca:"\u03b9",\u0390:"\u03b9",\u03cc:"\u03bf",\u03cd:"\u03c5",\u03cb:"\u03c5",\u03b0:"\u03c5",\u03c9:"\u03c9",\u03c2:"\u03c3"};function S(i){return i.replace(/[^\u0000-\u007E]/g,e=>Ye[e]||e)}class Ge{constructor(s,e){this._ngSelect=s,this._selectionModel=e,this._items=[],this._filteredItems=[],this._markedIndex=-1}get items(){return this._items}get filteredItems(){return this._filteredItems}get markedIndex(){return this._markedIndex}get selectedItems(){return this._selectionModel.value}get markedItem(){return this._filteredItems[this._markedIndex]}get noItemsToSelect(){return this._ngSelect.hideSelected&&this._items.length===this.selectedItems.length}get maxItemsSelected(){return this._ngSelect.multiple&&this._ngSelect.maxSelectedItems<=this.selectedItems.length}get lastSelectedItem(){let s=this.selectedItems.length-1;for(;s>=0;s--){const e=this.selectedItems[s];if(!e.disabled)return e}return null}setItems(s){this._items=s.map((e,n)=>this.mapItem(e,n)),this._ngSelect.groupBy?(this._groups=this._groupBy(this._items,this._ngSelect.groupBy),this._items=this._flatten(this._groups)):(this._groups=new Map,this._groups.set(void 0,this._items)),this._filteredItems=[...this._items]}select(s){if(s.selected||this.maxItemsSelected)return;const e=this._ngSelect.multiple;e||this.clearSelected(),this._selectionModel.select(s,e,this._ngSelect.selectableGroupAsModel),this._ngSelect.hideSelected&&this._hideSelected(s)}unselect(s){s.selected&&(this._selectionModel.unselect(s,this._ngSelect.multiple),this._ngSelect.hideSelected&&u(s.index)&&this._ngSelect.multiple&&this._showSelected(s))}findItem(s){let e;return e=this._ngSelect.compareWith?n=>this._ngSelect.compareWith(n.value,s):this._ngSelect.bindValue?n=>!n.children&&this.resolveNested(n.value,this._ngSelect.bindValue)===s:n=>n.value===s||!n.children&&n.label&&n.label===this.resolveNested(s,this._ngSelect.bindLabel),this._items.find(n=>e(n))}addItem(s){const e=this.mapItem(s,this._items.length);return this._items.push(e),this._filteredItems.push(e),e}clearSelected(s=!1){this._selectionModel.clear(s),this._items.forEach(e=>{e.selected=s&&e.selected&&e.disabled,e.marked=!1}),this._ngSelect.hideSelected&&this.resetFilteredItems()}findByLabel(s){return s=S(s).toLocaleLowerCase(),this.filteredItems.find(e=>S(e.label).toLocaleLowerCase().substr(0,s.length)===s)}filter(s){if(!s)return void this.resetFilteredItems();this._filteredItems=[],s=this._ngSelect.searchFn?s:S(s).toLocaleLowerCase();const e=this._ngSelect.searchFn||this._defaultSearchFn,n=this._ngSelect.hideSelected;for(const l of Array.from(this._groups.keys())){const o=[];for(const r of this._groups.get(l))n&&(r.parent&&r.parent.selected||r.selected)||e(s,this._ngSelect.searchFn?r.value:r)&&o.push(r);if(o.length>0){const[r]=o.slice(-1);if(r.parent){const a=this._items.find(h=>h===r.parent);this._filteredItems.push(a)}this._filteredItems.push(...o)}}}resetFilteredItems(){this._filteredItems.length!==this._items.length&&(this._filteredItems=this._ngSelect.hideSelected&&this.selectedItems.length>0?this._items.filter(s=>!s.selected):this._items)}unmarkItem(){this._markedIndex=-1}markNextItem(){this._stepToItem(1)}markPreviousItem(){this._stepToItem(-1)}markItem(s){this._markedIndex=this._filteredItems.indexOf(s)}markSelectedOrDefault(s){if(0===this._filteredItems.length)return;const e=this._getLastMarkedIndex();this._markedIndex=e>-1?e:s?this.filteredItems.findIndex(n=>!n.disabled):-1}resolveNested(s,e){if(!v(s))return s;if(-1===e.indexOf("."))return s[e];{const n=e.split(".");let l=s;for(let o=0,r=n.length;o<r;++o){if(null==l)return null;l=l[n[o]]}return l}}mapItem(s,e){const n=u(s.$ngOptionLabel)?s.$ngOptionLabel:this.resolveNested(s,this._ngSelect.bindLabel),l=u(s.$ngOptionValue)?s.$ngOptionValue:s;return{index:e,label:u(n)?n.toString():"",value:l,disabled:s.disabled,htmlId:`${this._ngSelect.dropdownId}-${e}`}}mapSelectedItems(){const s=this._ngSelect.multiple;for(const e of this.selectedItems){const n=this._ngSelect.bindValue?this.resolveNested(e.value,this._ngSelect.bindValue):e.value,l=u(n)?this.findItem(n):null;this._selectionModel.unselect(e,s),this._selectionModel.select(l||e,s,this._ngSelect.selectableGroupAsModel)}this._ngSelect.hideSelected&&(this._filteredItems=this.filteredItems.filter(e=>-1===this.selectedItems.indexOf(e)))}_showSelected(s){if(this._filteredItems.push(s),s.parent){const e=s.parent;this._filteredItems.find(l=>l===e)||this._filteredItems.push(e)}else if(s.children)for(const e of s.children)e.selected=!1,this._filteredItems.push(e);this._filteredItems=[...this._filteredItems.sort((e,n)=>e.index-n.index)]}_hideSelected(s){this._filteredItems=this._filteredItems.filter(e=>e!==s),s.parent?s.parent.children.every(n=>n.selected)&&(this._filteredItems=this._filteredItems.filter(n=>n!==s.parent)):s.children&&(this._filteredItems=this.filteredItems.filter(e=>e.parent!==s))}_defaultSearchFn(s,e){return S(e.label).toLocaleLowerCase().indexOf(s)>-1}_getNextItemIndex(s){return s>0?this._markedIndex>=this._filteredItems.length-1?0:this._markedIndex+1:this._markedIndex<=0?this._filteredItems.length-1:this._markedIndex-1}_stepToItem(s){0===this._filteredItems.length||this._filteredItems.every(e=>e.disabled)||(this._markedIndex=this._getNextItemIndex(s),this.markedItem.disabled&&this._stepToItem(s))}_getLastMarkedIndex(){if(this._ngSelect.hideSelected||this._markedIndex>-1&&void 0===this.markedItem)return-1;const s=this._filteredItems.indexOf(this.lastSelectedItem);return this.lastSelectedItem&&s<0?-1:Math.max(this.markedIndex,s)}_groupBy(s,e){const n=new Map;if(0===s.length)return n;if(Array.isArray(s[0].value[e])){for(const r of s){const a=(r.value[e]||[]).map((h,c)=>this.mapItem(h,c));n.set(r,a)}return n}const l=A(this._ngSelect.groupBy),o=r=>{const a=l?e(r.value):r.value[e];return u(a)?a:void 0};for(const r of s){const a=o(r),h=n.get(a);h?h.push(r):n.set(a,[r])}return n}_flatten(s){const e=A(this._ngSelect.groupBy),n=[];for(const l of Array.from(s.keys())){let o=n.length;if(void 0===l){const p=s.get(void 0)||[];n.push(...p.map(g=>(g.index=o++,g)));continue}const r=v(l),a={label:r?"":String(l),children:void 0,parent:null,index:o++,disabled:!this._ngSelect.selectableGroup,htmlId:O()},h=e?this._ngSelect.bindLabel:this._ngSelect.groupBy,c=this._ngSelect.groupValue||(()=>r?l.value:{[h]:l}),_=s.get(l).map(p=>(p.parent=a,p.children=void 0,p.index=o++,p));a.children=_,a.value=c(l,_.map(p=>p.value)),n.push(a),n.push(..._)}return n}}var m=(()=>{return(i=m||(m={}))[i.Tab=9]="Tab",i[i.Enter=13]="Enter",i[i.Esc=27]="Esc",i[i.Space=32]="Space",i[i.ArrowUp=38]="ArrowUp",i[i.ArrowDown=40]="ArrowDown",i[i.Backspace=8]="Backspace",m;var i})();let y=(()=>{class i{constructor(){this._dimensions={itemHeight:0,panelHeight:0,itemsPerViewport:0}}get dimensions(){return this._dimensions}calculateItems(e,n,l){const o=this._dimensions,r=o.itemHeight*n,h=Math.max(0,e)/r*n;let c=Math.min(n,Math.ceil(h)+(o.itemsPerViewport+1));const p=Math.max(0,c-o.itemsPerViewport);let g=Math.min(p,Math.floor(h)),w=o.itemHeight*Math.ceil(g)-o.itemHeight*Math.min(g,l);return w=isNaN(w)?0:w,g=isNaN(g)?-1:g,c=isNaN(c)?-1:c,g-=l,g=Math.max(0,g),c+=l,c=Math.min(n,c),{topPadding:w,scrollHeight:r,start:g,end:c}}setDimensions(e,n){const l=Math.max(1,Math.floor(n/e));this._dimensions={itemHeight:e,panelHeight:n,itemsPerViewport:l}}getScrollTo(e,n,l){const{panelHeight:o}=this.dimensions,r=e+n,h=l+o;return o>=r&&l===e?null:r>h?l+r-h:e<=l?e:null}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=t.Yz7({token:i,factory:i.\u0275fac}),i})();const L=["top","right","bottom","left"],Ze=typeof requestAnimationFrame<"u"?Z.Z:W.E;let k=(()=>{class i{constructor(e,n,l,o,r){this._renderer=e,this._zone=n,this._panelService=l,this._document=r,this.items=[],this.position="auto",this.virtualScroll=!1,this.filterValue=null,this.update=new t.vpe,this.scroll=new t.vpe,this.scrollToEnd=new t.vpe,this.outsideClick=new t.vpe,this._destroy$=new C.x,this._scrollToEndFired=!1,this._updateScrollHeight=!1,this._lastScrollPosition=0,this._dropdown=o.nativeElement}get currentPosition(){return this._currentPosition}get itemsLength(){return this._itemsLength}set itemsLength(e){e!==this._itemsLength&&(this._itemsLength=e,this._onItemsLengthChanged())}get _startOffset(){if(this.markedItem){const{itemHeight:e,panelHeight:n}=this._panelService.dimensions,l=this.markedItem.index*e;return n>l?0:l}return 0}ngOnInit(){this._select=this._dropdown.parentElement,this._virtualPadding=this.paddingElementRef.nativeElement,this._scrollablePanel=this.scrollElementRef.nativeElement,this._contentPanel=this.contentElementRef.nativeElement,this._handleScroll(),this._handleOutsideClick(),this._appendDropdown(),this._setupMousedownListener()}ngOnChanges(e){if(e.items){const n=e.items;this._onItemsChange(n.currentValue,n.firstChange)}}ngOnDestroy(){this._destroy$.next(),this._destroy$.complete(),this._destroy$.unsubscribe(),this.appendTo&&this._renderer.removeChild(this._dropdown.parentNode,this._dropdown)}scrollTo(e,n=!1){if(!e)return;const l=this.items.indexOf(e);if(l<0||l>=this.itemsLength)return;let o;if(this.virtualScroll){const r=this._panelService.dimensions.itemHeight;o=this._panelService.getScrollTo(l*r,r,this._lastScrollPosition)}else{const r=this._dropdown.querySelector(`#${e.htmlId}`);o=this._panelService.getScrollTo(r.offsetTop,r.clientHeight,n?r.offsetTop:this._lastScrollPosition)}u(o)&&(this._scrollablePanel.scrollTop=o)}scrollToTag(){const e=this._scrollablePanel;e.scrollTop=e.scrollHeight-e.clientHeight}adjustPosition(){this._updateYPosition()}_handleDropdownPosition(){this._currentPosition=this._calculateCurrentPosition(this._dropdown),L.includes(this._currentPosition)?this._updateDropdownClass(this._currentPosition):this._updateDropdownClass("bottom"),this.appendTo&&this._updateYPosition(),this._dropdown.style.opacity="1"}_updateDropdownClass(e){L.forEach(l=>{const o=`ng-select-${l}`;this._renderer.removeClass(this._dropdown,o),this._renderer.removeClass(this._select,o)});const n=`ng-select-${e}`;this._renderer.addClass(this._dropdown,n),this._renderer.addClass(this._select,n)}_handleScroll(){this._zone.runOutsideAngular(()=>{(0,b.R)(this.scrollElementRef.nativeElement,"scroll").pipe((0,E.R)(this._destroy$),(0,R.e)(0,Ze)).subscribe(e=>{const n=e.path||e.composedPath&&e.composedPath();this._onContentScrolled(n&&0!==n.length?n[0].scrollTop:e.target.scrollTop)})})}_handleOutsideClick(){this._document&&this._zone.runOutsideAngular(()=>{(0,F.T)((0,b.R)(this._document,"touchstart",{capture:!0}),(0,b.R)(this._document,"mousedown",{capture:!0})).pipe((0,E.R)(this._destroy$)).subscribe(e=>this._checkToClose(e))})}_checkToClose(e){if(this._select.contains(e.target)||this._dropdown.contains(e.target))return;const n=e.path||e.composedPath&&e.composedPath();e.target&&e.target.shadowRoot&&n&&n[0]&&this._select.contains(n[0])||this._zone.run(()=>this.outsideClick.emit())}_onItemsChange(e,n){this.items=e||[],this._scrollToEndFired=!1,this.itemsLength=e.length,this.virtualScroll?this._updateItemsRange(n):(this._setVirtualHeight(),this._updateItems(n))}_updateItems(e){this.update.emit(this.items),!1!==e&&this._zone.runOutsideAngular(()=>{Promise.resolve().then(()=>{this._panelService.setDimensions(0,this._scrollablePanel.clientHeight),this._handleDropdownPosition(),this.scrollTo(this.markedItem,e)})})}_updateItemsRange(e){this._zone.runOutsideAngular(()=>{this._measureDimensions().then(()=>{e?(this._renderItemsRange(this._startOffset),this._handleDropdownPosition()):this._renderItemsRange()})})}_onContentScrolled(e){this.virtualScroll&&this._renderItemsRange(e),this._lastScrollPosition=e,this._fireScrollToEnd(e)}_updateVirtualHeight(e){this._updateScrollHeight&&(this._virtualPadding.style.height=`${e}px`,this._updateScrollHeight=!1)}_setVirtualHeight(){this._virtualPadding&&(this._virtualPadding.style.height="0px")}_onItemsLengthChanged(){this._updateScrollHeight=!0}_renderItemsRange(e=null){if(e&&this._lastScrollPosition===e)return;const n=this._panelService.calculateItems(e=e||this._scrollablePanel.scrollTop,this.itemsLength,this.bufferAmount);this._updateVirtualHeight(n.scrollHeight),this._contentPanel.style.transform=`translateY(${n.topPadding}px)`,this._zone.run(()=>{this.update.emit(this.items.slice(n.start,n.end)),this.scroll.emit({start:n.start,end:n.end})}),u(e)&&0===this._lastScrollPosition&&(this._scrollablePanel.scrollTop=e,this._lastScrollPosition=e)}_measureDimensions(){if(this._panelService.dimensions.itemHeight>0||0===this.itemsLength)return Promise.resolve(this._panelService.dimensions);const[e]=this.items;return this.update.emit([e]),Promise.resolve().then(()=>{const l=this._dropdown.querySelector(`#${e.htmlId}`).clientHeight;return this._virtualPadding.style.height=l*this.itemsLength+"px",this._panelService.setDimensions(l,this._scrollablePanel.clientHeight),this._panelService.dimensions})}_fireScrollToEnd(e){this._scrollToEndFired||0===e||e+this._dropdown.clientHeight>=(this.virtualScroll?this._virtualPadding:this._contentPanel).clientHeight-1&&(this._zone.run(()=>this.scrollToEnd.emit()),this._scrollToEndFired=!0)}_calculateCurrentPosition(e){if("auto"!==this.position)return this.position;const n=this._select.getBoundingClientRect(),l=document.documentElement.scrollTop||document.body.scrollTop;return n.top+window.pageYOffset+n.height+e.getBoundingClientRect().height>l+document.documentElement.clientHeight?"top":"bottom"}_appendDropdown(){if(this.appendTo){if(this._parent=document.querySelector(this.appendTo),!this._parent)throw new Error(`appendTo selector ${this.appendTo} did not found any parent element`);this._updateXPosition(),this._parent.appendChild(this._dropdown)}}_updateXPosition(){const e=this._select.getBoundingClientRect(),n=this._parent.getBoundingClientRect();this._dropdown.style.left=e.left-n.left+"px",this._dropdown.style.width=e.width+"px",this._dropdown.style.minWidth=e.width+"px"}_updateYPosition(){const e=this._select.getBoundingClientRect(),n=this._parent.getBoundingClientRect(),l=e.height;"top"===this._currentPosition?(this._dropdown.style.bottom=n.bottom-e.bottom+l+"px",this._dropdown.style.top="auto"):"bottom"===this._currentPosition&&(this._dropdown.style.top=e.top-n.top+l+"px",this._dropdown.style.bottom="auto")}_setupMousedownListener(){this._zone.runOutsideAngular(()=>{(0,b.R)(this._dropdown,"mousedown").pipe((0,E.R)(this._destroy$)).subscribe(e=>{"INPUT"!==e.target.tagName&&e.preventDefault()})})}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(t.Qsj),t.Y36(t.R0b),t.Y36(y),t.Y36(t.SBq),t.Y36(f.K0,8))},i.\u0275cmp=t.Xpm({type:i,selectors:[["ng-dropdown-panel"]],viewQuery:function(e,n){if(1&e&&(t.Gf(K,7,t.SBq),t.Gf(Q,7,t.SBq),t.Gf(z,7,t.SBq)),2&e){let l;t.iGM(l=t.CRH())&&(n.contentElementRef=l.first),t.iGM(l=t.CRH())&&(n.scrollElementRef=l.first),t.iGM(l=t.CRH())&&(n.paddingElementRef=l.first)}},inputs:{items:"items",markedItem:"markedItem",position:"position",appendTo:"appendTo",bufferAmount:"bufferAmount",virtualScroll:"virtualScroll",headerTemplate:"headerTemplate",footerTemplate:"footerTemplate",filterValue:"filterValue"},outputs:{update:"update",scroll:"scroll",scrollToEnd:"scrollToEnd",outsideClick:"outsideClick"},features:[t.TTD],ngContentSelectors:I,decls:9,vars:6,consts:[["class","ng-dropdown-header",4,"ngIf"],[1,"ng-dropdown-panel-items","scroll-host"],["scroll",""],["padding",""],["content",""],["class","ng-dropdown-footer",4,"ngIf"],[1,"ng-dropdown-header"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"ng-dropdown-footer"]],template:function(e,n){1&e&&(t.F$t(),t.YNc(0,J,2,4,"div",0),t.TgZ(1,"div",1,2),t._UZ(3,"div",null,3),t.TgZ(5,"div",null,4),t.Hsn(7),t.qZA()(),t.YNc(8,j,2,4,"div",5)),2&e&&(t.Q6J("ngIf",n.headerTemplate),t.xp6(3),t.ekj("total-padding",n.virtualScroll),t.xp6(2),t.ekj("scrollable-content",n.virtualScroll&&n.items.length),t.xp6(3),t.Q6J("ngIf",n.footerTemplate))},dependencies:[f.O5,f.tP],encapsulation:2,changeDetection:0}),i})(),N=(()=>{class i{constructor(e){this.elementRef=e,this.stateChange$=new C.x,this._disabled=!1}get disabled(){return this._disabled}set disabled(e){this._disabled=this._isDisabled(e)}get label(){return(this.elementRef.nativeElement.textContent||"").trim()}ngOnChanges(e){e.disabled&&this.stateChange$.next({value:this.value,disabled:this._disabled})}ngAfterViewChecked(){this.label!==this._previousLabel&&(this._previousLabel=this.label,this.stateChange$.next({value:this.value,disabled:this._disabled,label:this.elementRef.nativeElement.innerHTML}))}ngOnDestroy(){this.stateChange$.complete()}_isDisabled(e){return null!=e&&"false"!=`${e}`}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(t.SBq))},i.\u0275cmp=t.Xpm({type:i,selectors:[["ng-option"]],inputs:{value:"value",disabled:"disabled"},features:[t.TTD],ngContentSelectors:I,decls:1,vars:0,template:function(e,n){1&e&&(t.F$t(),t.Hsn(0))},encapsulation:2,changeDetection:0}),i})(),We=(()=>{class i{constructor(){this.notFoundText="No items found",this.typeToSearchText="Type to search",this.addTagText="Add item",this.loadingText="Loading...",this.clearAllText="Clear all",this.disableVirtualScroll=!0,this.openOnEnter=!0,this.appearance="underline"}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=t.Yz7({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),Ke=(()=>{class i{warn(e){console.warn(e)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=t.Yz7({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const B=new t.OlP("ng-select-selection-model");let Qe=(()=>{class i{constructor(e,n,l,o,r,a,h){this.classes=e,this.autoFocus=n,this.config=l,this._cd=a,this._console=h,this.markFirst=!0,this.dropdownPosition="auto",this.loading=!1,this.closeOnSelect=!0,this.hideSelected=!1,this.selectOnTab=!1,this.bufferAmount=4,this.selectableGroup=!1,this.selectableGroupAsModel=!0,this.searchFn=null,this.trackByFn=null,this.clearOnBackspace=!0,this.labelForId=null,this.inputAttrs={},this.readonly=!1,this.searchWhileComposing=!0,this.minTermLength=0,this.editableSearchTerm=!1,this.keyDownFn=c=>!0,this.multiple=!1,this.addTag=!1,this.searchable=!0,this.clearable=!0,this.isOpen=!1,this.blurEvent=new t.vpe,this.focusEvent=new t.vpe,this.changeEvent=new t.vpe,this.openEvent=new t.vpe,this.closeEvent=new t.vpe,this.searchEvent=new t.vpe,this.clearEvent=new t.vpe,this.addEvent=new t.vpe,this.removeEvent=new t.vpe,this.scroll=new t.vpe,this.scrollToEnd=new t.vpe,this.useDefaultClass=!0,this.viewPortItems=[],this.searchTerm=null,this.dropdownId=O(),this.escapeHTML=!0,this._items=[],this._defaultLabel="label",this._pressedKeys=[],this._isComposing=!1,this._destroy$=new C.x,this._keyPress$=new C.x,this._onChange=c=>{},this._onTouched=()=>{},this.clearItem=c=>{const _=this.selectedItems.find(p=>p.value===c);this.unselect(_)},this.trackByOption=(c,_)=>this.trackByFn?this.trackByFn(_.value):_,this._mergeGlobalConfig(l),this.itemsList=new Ge(this,o()),this.element=r.nativeElement}get items(){return this._items}set items(e){null===e&&(e=[]),this._itemsAreUsed=!0,this._items=e}get compareWith(){return this._compareWith}set compareWith(e){if(null!=e&&!A(e))throw Error("`compareWith` must be a function.");this._compareWith=e}get clearSearchOnAdd(){return u(this._clearSearchOnAdd)?this._clearSearchOnAdd:u(this.config.clearSearchOnAdd)?this.config.clearSearchOnAdd:this.closeOnSelect}set clearSearchOnAdd(e){this._clearSearchOnAdd=e}get disabled(){return this.readonly||this._disabled}get filtered(){return!!this.searchTerm&&this.searchable||this._isComposing}get single(){return!this.multiple}get _editableSearchTerm(){return this.editableSearchTerm&&!this.multiple}get selectedItems(){return this.itemsList.selectedItems}get selectedValues(){return this.selectedItems.map(e=>e.value)}get hasValue(){return this.selectedItems.length>0}get currentPanelPosition(){if(this.dropdownPanel)return this.dropdownPanel.currentPosition}ngOnInit(){this._handleKeyPresses(),this._setInputAttributes()}ngOnChanges(e){e.multiple&&this.itemsList.clearSelected(),e.items&&this._setItems(e.items.currentValue||[]),e.isOpen&&(this._manualOpen=u(e.isOpen.currentValue))}ngAfterViewInit(){this._itemsAreUsed||(this.escapeHTML=!1,this._setItemsFromNgOptions()),u(this.autoFocus)&&this.focus()}ngOnDestroy(){this._destroy$.next(),this._destroy$.complete()}handleKeyDown(e){if(m[e.which]){if(!1===this.keyDownFn(e))return;this.handleKeyCode(e)}else e.key&&1===e.key.length&&this._keyPress$.next(e.key.toLocaleLowerCase())}handleKeyCode(e){switch(e.which){case m.ArrowDown:this._handleArrowDown(e);break;case m.ArrowUp:this._handleArrowUp(e);break;case m.Space:this._handleSpace(e);break;case m.Enter:this._handleEnter(e);break;case m.Tab:this._handleTab(e);break;case m.Esc:this.close(),e.preventDefault();break;case m.Backspace:this._handleBackspace()}}handleMousedown(e){const n=e.target;"INPUT"!==n.tagName&&e.preventDefault(),n.classList.contains("ng-clear-wrapper")?this.handleClearClick():n.classList.contains("ng-arrow-wrapper")?this.handleArrowClick():n.classList.contains("ng-value-icon")||(this.focused||this.focus(),this.searchable?this.open():this.toggle())}handleArrowClick(){this.isOpen?this.close():this.open()}handleClearClick(){this.hasValue&&(this.itemsList.clearSelected(!0),this._updateNgModel()),this._clearSearch(),this.focus(),this.clearEvent.emit(),this._onSelectionChanged()}clearModel(){this.clearable&&(this.itemsList.clearSelected(),this._updateNgModel())}writeValue(e){this.itemsList.clearSelected(),this._handleWriteValue(e),this._cd.markForCheck()}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this._disabled=e,this._cd.markForCheck()}toggle(){this.isOpen?this.close():this.open()}open(){this.disabled||this.isOpen||this._manualOpen||!this._isTypeahead&&!this.addTag&&this.itemsList.noItemsToSelect||(this.isOpen=!0,this.itemsList.markSelectedOrDefault(this.markFirst),this.openEvent.emit(),this.searchTerm||this.focus(),this.detectChanges())}close(){!this.isOpen||this._manualOpen||(this.isOpen=!1,this._isComposing=!1,this._editableSearchTerm?this.itemsList.resetFilteredItems():this._clearSearch(),this.itemsList.unmarkItem(),this._onTouched(),this.closeEvent.emit(),this._cd.markForCheck())}toggleItem(e){!e||e.disabled||this.disabled||(this.multiple&&e.selected?this.unselect(e):this.select(e),this._editableSearchTerm&&this._setSearchTermFromItems(),this._onSelectionChanged())}select(e){e.selected||(this.itemsList.select(e),this.clearSearchOnAdd&&!this._editableSearchTerm&&this._clearSearch(),this._updateNgModel(),this.multiple&&this.addEvent.emit(e.value)),(this.closeOnSelect||this.itemsList.noItemsToSelect)&&this.close()}focus(){this.searchInput.nativeElement.focus()}blur(){this.searchInput.nativeElement.blur()}unselect(e){e&&(this.itemsList.unselect(e),this.focus(),this._updateNgModel(),this.removeEvent.emit(e))}selectTag(){let e;e=A(this.addTag)?this.addTag(this.searchTerm):this._primitive?this.searchTerm:{[this.bindLabel]:this.searchTerm};const n=l=>this._isTypeahead||!this.isOpen?this.itemsList.mapItem(l,null):this.itemsList.addItem(l);!function Oe(i){return i instanceof Promise}(e)?e&&this.select(n(e)):e.then(l=>this.select(n(l))).catch(()=>{})}showClear(){return this.clearable&&(this.hasValue||this.searchTerm)&&!this.disabled}get showAddTag(){if(!this._validTerm)return!1;const e=this.searchTerm.toLowerCase().trim();return this.addTag&&!this.itemsList.filteredItems.some(n=>n.label.toLowerCase()===e)&&(!this.hideSelected&&this.isOpen||!this.selectedItems.some(n=>n.label.toLowerCase()===e))&&!this.loading}showNoItemsFound(){const e=0===this.itemsList.filteredItems.length;return(e&&!this._isTypeahead&&!this.loading||e&&this._isTypeahead&&this._validTerm&&!this.loading)&&!this.showAddTag}showTypeToSearch(){return 0===this.itemsList.filteredItems.length&&this._isTypeahead&&!this._validTerm&&!this.loading}onCompositionStart(){this._isComposing=!0}onCompositionEnd(e){this._isComposing=!1,!this.searchWhileComposing&&this.filter(e)}filter(e){this._isComposing&&!this.searchWhileComposing||(this.searchTerm=e,this._isTypeahead&&(this._validTerm||0===this.minTermLength)&&this.typeahead.next(e),this._isTypeahead||(this.itemsList.filter(this.searchTerm),this.isOpen&&this.itemsList.markSelectedOrDefault(this.markFirst)),this.searchEvent.emit({term:e,items:this.itemsList.filteredItems.map(n=>n.value)}),this.open())}onInputFocus(e){this.focused||(this._editableSearchTerm&&this._setSearchTermFromItems(),this.element.classList.add("ng-select-focused"),this.focusEvent.emit(e),this.focused=!0)}onInputBlur(e){this.element.classList.remove("ng-select-focused"),this.blurEvent.emit(e),!this.isOpen&&!this.disabled&&this._onTouched(),this._editableSearchTerm&&this._setSearchTermFromItems(),this.focused=!1}onItemHover(e){e.disabled||this.itemsList.markItem(e)}detectChanges(){this._cd.destroyed||this._cd.detectChanges()}_setSearchTermFromItems(){const e=this.selectedItems&&this.selectedItems[0];this.searchTerm=e&&e.label||null}_setItems(e){const n=e[0];this.bindLabel=this.bindLabel||this._defaultLabel,this._primitive=u(n)?!v(n):this._primitive||this.bindLabel===this._defaultLabel,this.itemsList.setItems(e),e.length>0&&this.hasValue&&this.itemsList.mapSelectedItems(),this.isOpen&&u(this.searchTerm)&&!this._isTypeahead&&this.itemsList.filter(this.searchTerm),(this._isTypeahead||this.isOpen)&&this.itemsList.markSelectedOrDefault(this.markFirst)}_setItemsFromNgOptions(){const e=l=>{this.items=l.map(o=>({$ngOptionValue:o.value,$ngOptionLabel:o.elementRef.nativeElement.innerHTML,disabled:o.disabled})),this.itemsList.setItems(this.items),this.hasValue&&this.itemsList.mapSelectedItems(),this.detectChanges()},n=()=>{const l=(0,F.T)(this.ngOptions.changes,this._destroy$);(0,F.T)(...this.ngOptions.map(o=>o.stateChange$)).pipe((0,E.R)(l)).subscribe(o=>{const r=this.itemsList.findItem(o.value);r.disabled=o.disabled,r.label=o.label||r.label,this._cd.detectChanges()})};this.ngOptions.changes.pipe((0,H.O)(this.ngOptions),(0,E.R)(this._destroy$)).subscribe(l=>{this.bindLabel=this._defaultLabel,e(l),n()})}_isValidWriteValue(e){if(!u(e)||this.multiple&&""===e||Array.isArray(e)&&0===e.length)return!1;const n=l=>!(!u(this.compareWith)&&v(l)&&this.bindValue&&(this._console.warn(`Setting object(${JSON.stringify(l)}) as your model with bindValue is not allowed unless [compareWith] is used.`),1));return this.multiple?Array.isArray(e)?e.every(l=>n(l)):(this._console.warn("Multiple select ngModel should be array."),!1):n(e)}_handleWriteValue(e){if(!this._isValidWriteValue(e))return;const n=l=>{let o=this.itemsList.findItem(l);if(o)this.itemsList.select(o);else{const r=v(l);r||!r&&!this.bindValue?this.itemsList.select(this.itemsList.mapItem(l,null)):this.bindValue&&(o={[this.bindLabel]:null,[this.bindValue]:l},this.itemsList.select(this.itemsList.mapItem(o,null)))}};this.multiple?e.forEach(l=>n(l)):n(e)}_handleKeyPresses(){this.searchable||this._keyPress$.pipe((0,E.R)(this._destroy$),(0,V.b)(e=>this._pressedKeys.push(e)),(0,U.b)(200),(0,Y.h)(()=>this._pressedKeys.length>0),(0,G.U)(()=>this._pressedKeys.join(""))).subscribe(e=>{const n=this.itemsList.findByLabel(e);n&&(this.isOpen?(this.itemsList.markItem(n),this._scrollToMarked(),this._cd.markForCheck()):this.select(n)),this._pressedKeys=[]})}_setInputAttributes(){const e=this.searchInput.nativeElement,n={type:"text",autocorrect:"off",autocapitalize:"off",autocomplete:this.labelForId?"off":this.dropdownId,...this.inputAttrs};for(const l of Object.keys(n))e.setAttribute(l,n[l])}_updateNgModel(){const e=[];for(const l of this.selectedItems)if(this.bindValue){let o=null;o=l.children?l.value[(this.groupValue?this.bindValue:this.groupBy)||this.groupBy]:this.itemsList.resolveNested(l.value,this.bindValue),e.push(o)}else e.push(l.value);const n=this.selectedItems.map(l=>l.value);this.multiple?(this._onChange(e),this.changeEvent.emit(n)):(this._onChange(u(e[0])?e[0]:null),this.changeEvent.emit(n[0])),this._cd.markForCheck()}_clearSearch(){this.searchTerm&&(this._changeSearch(null),this.itemsList.resetFilteredItems())}_changeSearch(e){this.searchTerm=e,this._isTypeahead&&this.typeahead.next(e)}_scrollToMarked(){!this.isOpen||!this.dropdownPanel||this.dropdownPanel.scrollTo(this.itemsList.markedItem)}_scrollToTag(){!this.isOpen||!this.dropdownPanel||this.dropdownPanel.scrollToTag()}_onSelectionChanged(){this.isOpen&&this.multiple&&this.appendTo&&(this._cd.detectChanges(),this.dropdownPanel.adjustPosition())}_handleTab(e){!1===this.isOpen&&!this.addTag||(this.selectOnTab?this.itemsList.markedItem?(this.toggleItem(this.itemsList.markedItem),e.preventDefault()):this.showAddTag?(this.selectTag(),e.preventDefault()):this.close():this.close())}_handleEnter(e){if(this.isOpen||this._manualOpen)this.itemsList.markedItem?this.toggleItem(this.itemsList.markedItem):this.showAddTag&&this.selectTag();else{if(!this.openOnEnter)return;this.open()}e.preventDefault()}_handleSpace(e){this.isOpen||this._manualOpen||(this.open(),e.preventDefault())}_handleArrowDown(e){this._nextItemIsTag(1)?(this.itemsList.unmarkItem(),this._scrollToTag()):(this.itemsList.markNextItem(),this._scrollToMarked()),this.open(),e.preventDefault()}_handleArrowUp(e){this.isOpen&&(this._nextItemIsTag(-1)?(this.itemsList.unmarkItem(),this._scrollToTag()):(this.itemsList.markPreviousItem(),this._scrollToMarked()),e.preventDefault())}_nextItemIsTag(e){const n=this.itemsList.markedIndex+e;return this.addTag&&this.searchTerm&&this.itemsList.markedItem&&(n<0||n===this.itemsList.filteredItems.length)}_handleBackspace(){this.searchTerm||!this.clearable||!this.clearOnBackspace||!this.hasValue||(this.multiple?this.unselect(this.itemsList.lastSelectedItem):this.clearModel())}get _isTypeahead(){return this.typeahead&&this.typeahead.observers.length>0}get _validTerm(){const e=this.searchTerm&&this.searchTerm.trim();return e&&e.length>=this.minTermLength}_mergeGlobalConfig(e){this.placeholder=this.placeholder||e.placeholder,this.notFoundText=this.notFoundText||e.notFoundText,this.typeToSearchText=this.typeToSearchText||e.typeToSearchText,this.addTagText=this.addTagText||e.addTagText,this.loadingText=this.loadingText||e.loadingText,this.clearAllText=this.clearAllText||e.clearAllText,this.virtualScroll=u(this.virtualScroll)?this.virtualScroll:!!u(e.disableVirtualScroll)&&!e.disableVirtualScroll,this.openOnEnter=u(this.openOnEnter)?this.openOnEnter:e.openOnEnter,this.appendTo=this.appendTo||e.appendTo,this.bindValue=this.bindValue||e.bindValue,this.bindLabel=this.bindLabel||e.bindLabel,this.appearance=this.appearance||e.appearance}}return i.\u0275fac=function(e){return new(e||i)(t.$8M("class"),t.$8M("autofocus"),t.Y36(We),t.Y36(B),t.Y36(t.SBq),t.Y36(t.sBO),t.Y36(Ke))},i.\u0275cmp=t.Xpm({type:i,selectors:[["ng-select"]],contentQueries:function(e,n,l){if(1&e&&(t.Suo(l,x,5,t.Rgc),t.Suo(l,Le,5,t.Rgc),t.Suo(l,ke,5,t.Rgc),t.Suo(l,Ne,5,t.Rgc),t.Suo(l,Be,5,t.Rgc),t.Suo(l,Me,5,t.Rgc),t.Suo(l,Pe,5,t.Rgc),t.Suo(l,Re,5,t.Rgc),t.Suo(l,He,5,t.Rgc),t.Suo(l,Ve,5,t.Rgc),t.Suo(l,Ue,5,t.Rgc),t.Suo(l,N,5)),2&e){let o;t.iGM(o=t.CRH())&&(n.optionTemplate=o.first),t.iGM(o=t.CRH())&&(n.optgroupTemplate=o.first),t.iGM(o=t.CRH())&&(n.labelTemplate=o.first),t.iGM(o=t.CRH())&&(n.multiLabelTemplate=o.first),t.iGM(o=t.CRH())&&(n.headerTemplate=o.first),t.iGM(o=t.CRH())&&(n.footerTemplate=o.first),t.iGM(o=t.CRH())&&(n.notFoundTemplate=o.first),t.iGM(o=t.CRH())&&(n.typeToSearchTemplate=o.first),t.iGM(o=t.CRH())&&(n.loadingTextTemplate=o.first),t.iGM(o=t.CRH())&&(n.tagTemplate=o.first),t.iGM(o=t.CRH())&&(n.loadingSpinnerTemplate=o.first),t.iGM(o=t.CRH())&&(n.ngOptions=o)}},viewQuery:function(e,n){if(1&e&&(t.Gf(k,5),t.Gf($,7)),2&e){let l;t.iGM(l=t.CRH())&&(n.dropdownPanel=l.first),t.iGM(l=t.CRH())&&(n.searchInput=l.first)}},hostVars:20,hostBindings:function(e,n){1&e&&t.NdJ("keydown",function(o){return n.handleKeyDown(o)}),2&e&&t.ekj("ng-select-typeahead",n.typeahead)("ng-select-multiple",n.multiple)("ng-select-taggable",n.addTag)("ng-select-searchable",n.searchable)("ng-select-clearable",n.clearable)("ng-select-opened",n.isOpen)("ng-select",n.useDefaultClass)("ng-select-disabled",n.disabled)("ng-select-filtered",n.filtered)("ng-select-single",n.single)},inputs:{bindLabel:"bindLabel",bindValue:"bindValue",markFirst:"markFirst",placeholder:"placeholder",notFoundText:"notFoundText",typeToSearchText:"typeToSearchText",addTagText:"addTagText",loadingText:"loadingText",clearAllText:"clearAllText",appearance:"appearance",dropdownPosition:"dropdownPosition",appendTo:"appendTo",loading:"loading",closeOnSelect:"closeOnSelect",hideSelected:"hideSelected",selectOnTab:"selectOnTab",openOnEnter:"openOnEnter",maxSelectedItems:"maxSelectedItems",groupBy:"groupBy",groupValue:"groupValue",bufferAmount:"bufferAmount",virtualScroll:"virtualScroll",selectableGroup:"selectableGroup",selectableGroupAsModel:"selectableGroupAsModel",searchFn:"searchFn",trackByFn:"trackByFn",clearOnBackspace:"clearOnBackspace",labelForId:"labelForId",inputAttrs:"inputAttrs",tabIndex:"tabIndex",readonly:"readonly",searchWhileComposing:"searchWhileComposing",minTermLength:"minTermLength",editableSearchTerm:"editableSearchTerm",keyDownFn:"keyDownFn",typeahead:"typeahead",multiple:"multiple",addTag:"addTag",searchable:"searchable",clearable:"clearable",isOpen:"isOpen",items:"items",compareWith:"compareWith",clearSearchOnAdd:"clearSearchOnAdd"},outputs:{blurEvent:"blur",focusEvent:"focus",changeEvent:"change",openEvent:"open",closeEvent:"close",searchEvent:"search",clearEvent:"clear",addEvent:"add",removeEvent:"remove",scroll:"scroll",scrollToEnd:"scrollToEnd"},features:[t._Bn([{provide:P.JU,useExisting:(0,t.Gpc)(()=>i),multi:!0},y]),t.TTD],decls:14,vars:19,consts:[[1,"ng-select-container",3,"mousedown"],[1,"ng-value-container"],[1,"ng-placeholder"],[4,"ngIf"],["role","combobox","aria-haspopup","listbox",1,"ng-input"],["aria-autocomplete","list",3,"readOnly","disabled","value","input","compositionstart","compositionend","focus","blur","change"],["searchInput",""],["class","ng-clear-wrapper",3,"title",4,"ngIf"],[1,"ng-arrow-wrapper"],[1,"ng-arrow"],["class","ng-dropdown-panel","role","listbox","aria-label","Options list",3,"virtualScroll","bufferAmount","appendTo","position","headerTemplate","footerTemplate","filterValue","items","markedItem","ng-select-multiple","ngClass","id","update","scroll","scrollToEnd","outsideClick",4,"ngIf"],["class","ng-value",3,"ng-value-disabled",4,"ngFor","ngForOf","ngForTrackBy"],[1,"ng-value"],["defaultLabelTemplate",""],[3,"ngTemplateOutlet","ngTemplateOutletContext"],["aria-hidden","true",1,"ng-value-icon","left",3,"click"],[1,"ng-value-label",3,"ngItemLabel","escape"],["defaultLoadingSpinnerTemplate",""],[3,"ngTemplateOutlet"],[1,"ng-spinner-loader"],[1,"ng-clear-wrapper",3,"title"],["aria-hidden","true",1,"ng-clear"],["role","listbox","aria-label","Options list",1,"ng-dropdown-panel",3,"virtualScroll","bufferAmount","appendTo","position","headerTemplate","footerTemplate","filterValue","items","markedItem","ngClass","id","update","scroll","scrollToEnd","outsideClick"],["class","ng-option",3,"ng-option-disabled","ng-option-selected","ng-optgroup","ng-option","ng-option-child","ng-option-marked","click","mouseover",4,"ngFor","ngForOf","ngForTrackBy"],["class","ng-option","role","option",3,"ng-option-marked","mouseover","click",4,"ngIf"],[1,"ng-option",3,"click","mouseover"],["defaultOptionTemplate",""],[1,"ng-option-label",3,"ngItemLabel","escape"],["role","option",1,"ng-option",3,"mouseover","click"],["defaultTagTemplate",""],[1,"ng-tag-label"],["defaultNotFoundTemplate",""],[1,"ng-option","ng-option-disabled"],["defaultTypeToSearchTemplate",""],["defaultLoadingTextTemplate",""]],template:function(e,n){if(1&e){const l=t.EpF();t.TgZ(0,"div",0),t.NdJ("mousedown",function(r){return n.handleMousedown(r)}),t.TgZ(1,"div",1)(2,"div",2),t._uU(3),t.qZA(),t.YNc(4,ne,2,2,"ng-container",3),t.YNc(5,le,1,5,null,3),t.TgZ(6,"div",4)(7,"input",5,6),t.NdJ("input",function(){t.CHM(l);const r=t.MAs(8);return t.KtG(n.filter(r.value))})("compositionstart",function(){return n.onCompositionStart()})("compositionend",function(){t.CHM(l);const r=t.MAs(8);return t.KtG(n.onCompositionEnd(r.value))})("focus",function(r){return n.onInputFocus(r)})("blur",function(r){return n.onInputBlur(r)})("change",function(r){return r.stopPropagation()}),t.qZA()()(),t.YNc(9,ae,4,1,"ng-container",3),t.YNc(10,ue,3,1,"span",7),t.TgZ(11,"span",8),t._UZ(12,"span",9),t.qZA()(),t.YNc(13,Fe,7,19,"ng-dropdown-panel",10)}2&e&&(t.ekj("ng-appearance-outline","outline"===n.appearance)("ng-has-value",n.hasValue),t.xp6(3),t.Oqu(n.placeholder),t.xp6(1),t.Q6J("ngIf",(!n.multiLabelTemplate||!n.multiple)&&n.selectedItems.length>0),t.xp6(1),t.Q6J("ngIf",n.multiple&&n.multiLabelTemplate&&n.selectedValues.length>0),t.xp6(1),t.uIk("aria-expanded",n.isOpen)("aria-owns",n.isOpen?n.dropdownId:null),t.xp6(1),t.Q6J("readOnly",!n.searchable||n.itemsList.maxItemsSelected)("disabled",n.disabled)("value",n.searchTerm?n.searchTerm:""),t.uIk("id",n.labelForId)("tabindex",n.tabIndex)("aria-activedescendant",n.isOpen?null==n.itemsList||null==n.itemsList.markedItem?null:n.itemsList.markedItem.htmlId:null)("aria-controls",n.isOpen?n.dropdownId:null),t.xp6(2),t.Q6J("ngIf",n.loading),t.xp6(1),t.Q6J("ngIf",n.showClear()),t.xp6(3),t.Q6J("ngIf",n.isOpen))},dependencies:[f.mk,f.sg,f.O5,f.tP,k,ye],styles:['@charset "UTF-8";.ng-select{position:relative;display:block;box-sizing:border-box}.ng-select div,.ng-select input,.ng-select span{box-sizing:border-box}.ng-select [hidden]{display:none}.ng-select.ng-select-searchable .ng-select-container .ng-value-container .ng-input{opacity:1}.ng-select.ng-select-opened .ng-select-container{z-index:1001}.ng-select.ng-select-disabled .ng-select-container .ng-value-container .ng-placeholder,.ng-select.ng-select-disabled .ng-select-container .ng-value-container .ng-value{-webkit-user-select:none;user-select:none;cursor:default}.ng-select.ng-select-disabled .ng-arrow-wrapper{cursor:default}.ng-select.ng-select-filtered .ng-placeholder{display:none}.ng-select .ng-select-container{cursor:default;display:flex;outline:none;overflow:hidden;position:relative;width:100%}.ng-select .ng-select-container .ng-value-container{display:flex;flex:1}.ng-select .ng-select-container .ng-value-container .ng-input{opacity:0}.ng-select .ng-select-container .ng-value-container .ng-input>input{box-sizing:content-box;background:none transparent;border:0 none;box-shadow:none;outline:none;padding:0;cursor:default;width:100%}.ng-select .ng-select-container .ng-value-container .ng-input>input::-ms-clear{display:none}.ng-select .ng-select-container .ng-value-container .ng-input>input[readonly]{-webkit-user-select:none;user-select:none;width:0;padding:0}.ng-select.ng-select-single.ng-select-filtered .ng-select-container .ng-value-container .ng-value{visibility:hidden}.ng-select.ng-select-single .ng-select-container .ng-value-container,.ng-select.ng-select-single .ng-select-container .ng-value-container .ng-value{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ng-select.ng-select-single .ng-select-container .ng-value-container .ng-value .ng-value-icon{display:none}.ng-select.ng-select-single .ng-select-container .ng-value-container .ng-input{position:absolute;left:0;width:100%}.ng-select.ng-select-multiple.ng-select-disabled>.ng-select-container .ng-value-container .ng-value .ng-value-icon{display:none}.ng-select.ng-select-multiple .ng-select-container .ng-value-container{flex-wrap:wrap}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-placeholder{position:absolute}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value{white-space:nowrap}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value.ng-value-disabled .ng-value-icon{display:none}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value .ng-value-icon{cursor:pointer}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-input{flex:1;z-index:2}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-placeholder{z-index:1}.ng-select .ng-clear-wrapper{cursor:pointer;position:relative;width:17px;-webkit-user-select:none;user-select:none}.ng-select .ng-clear-wrapper .ng-clear{display:inline-block;font-size:18px;line-height:1;pointer-events:none}.ng-select .ng-spinner-loader{border-radius:50%;width:17px;height:17px;margin-right:5px;font-size:10px;position:relative;text-indent:-9999em;border-top:2px solid rgba(66,66,66,.2);border-right:2px solid rgba(66,66,66,.2);border-bottom:2px solid rgba(66,66,66,.2);border-left:2px solid #424242;transform:translateZ(0);animation:load8 .8s infinite linear}.ng-select .ng-spinner-loader:after{border-radius:50%;width:17px;height:17px}@keyframes load8{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.ng-select .ng-arrow-wrapper{cursor:pointer;position:relative;text-align:center;-webkit-user-select:none;user-select:none}.ng-select .ng-arrow-wrapper .ng-arrow{pointer-events:none;display:inline-block;height:0;width:0;position:relative}.ng-dropdown-panel{box-sizing:border-box;position:absolute;opacity:0;width:100%;z-index:1050;-webkit-overflow-scrolling:touch}.ng-dropdown-panel .ng-dropdown-panel-items{display:block;height:auto;box-sizing:border-box;max-height:240px;overflow-y:auto}.ng-dropdown-panel .ng-dropdown-panel-items .ng-optgroup{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option{box-sizing:border-box;cursor:pointer;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option .ng-option-label:empty:before{content:"\\200b"}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option .highlighted{font-weight:700;text-decoration:underline}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option.disabled{cursor:default}.ng-dropdown-panel .scroll-host{overflow:hidden;overflow-y:auto;position:relative;display:block;-webkit-overflow-scrolling:touch}.ng-dropdown-panel .scrollable-content{top:0;left:0;width:100%;height:100%;position:absolute}.ng-dropdown-panel .total-padding{width:1px;opacity:0}\n'],encapsulation:2,changeDetection:0}),i})();function ze(){return new Je}class Je{constructor(){this._selected=[]}get value(){return this._selected}select(s,e,n){if(s.selected=!0,(!s.children||!e&&n)&&this._selected.push(s),e)if(s.parent){const l=s.parent.children.length,o=s.parent.children.filter(r=>r.selected).length;s.parent.selected=l===o}else s.children&&(this._setChildrenSelectedState(s.children,!0),this._removeChildren(s),this._selected=n&&this._activeChildren(s)?[...this._selected.filter(l=>l.parent!==s),s]:[...this._selected,...s.children.filter(l=>!l.disabled)])}unselect(s,e){if(this._selected=this._selected.filter(n=>n!==s),s.selected=!1,e)if(s.parent&&s.parent.selected){const n=s.parent.children;this._removeParent(s.parent),this._removeChildren(s.parent),this._selected.push(...n.filter(l=>l!==s&&!l.disabled)),s.parent.selected=!1}else s.children&&(this._setChildrenSelectedState(s.children,!1),this._removeChildren(s))}clear(s){this._selected=s?this._selected.filter(e=>e.disabled):[]}_setChildrenSelectedState(s,e){for(const n of s)n.disabled||(n.selected=e)}_removeChildren(s){this._selected=[...this._selected.filter(e=>e.parent!==s),...s.children.filter(e=>e.parent===s&&e.disabled&&e.selected)]}_removeParent(s){this._selected=this._selected.filter(e=>e!==s)}_activeChildren(s){return s.children.every(e=>!e.disabled||e.selected)}}let je=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=t.oAB({type:i}),i.\u0275inj=t.cJS({providers:[{provide:B,useValue:ze}],imports:[f.ez]}),i})()}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkpos_marketplace=self.webpackChunkpos_marketplace||[]).push([[863],{7398:(ot,N,l)=>{l.d(N,{Z:()=>x,e:()=>f});var p=l(6895),t=l(266),I=l(6806),h=l(4650);function R(_,u){if(1&_&&(h.TgZ(0,"li",2)(1,"a",3),h._uU(2),h.qZA()()),2&_){const r=u.$implicit;h.xp6(1),h.s9C("routerLink",r.Url),h.Q6J("title",r.Description?r.Description:""),h.xp6(1),h.hij(" ",r.Title," ")}}class f{}f.\u0275fac=function(u){return new(u||f)},f.\u0275cmp=h.Xpm({type:f,selectors:[["nav-tab"]],inputs:{Tabs:"Tabs"},decls:2,vars:1,consts:[[1,"nav","navbar-nav","navbar-left","nav-tab-arrow"],["routerLinkActive","active","class","nav-item me-6",4,"ngFor","ngForOf"],["routerLinkActive","active",1,"nav-item","me-6"],[1,"nav-link","nav-link-arrow","mb-0",3,"routerLink","title"]],template:function(u,r){1&u&&(h.TgZ(0,"ul",0),h.YNc(1,R,3,3,"li",1),h.qZA()),2&u&&(h.xp6(1),h.Q6J("ngForOf",r.Tabs))},dependencies:[p.sg,I.rH,I.Od]});class x{}x.\u0275fac=function(u){return new(u||x)},x.\u0275mod=h.oAB({type:x}),x.\u0275inj=h.cJS({imports:[p.ez,I.Bz,t.AV]})},9863:(ot,N,l)=>{l.r(N),l.d(N,{StatusModule:()=>E});var p=l(6895),t=l(4650),I=l(7398),h=l(6806);const R=function(){return["/menu/products/download/by-url"]};class f{constructor(){this.productTabs=[{Title:"Sold in Channel",Url:"/menu/products/status/sold-in-channel",Description:"SKU has been mapped between dealpos and marketplace"},{Title:"Not in POS",Url:"/menu/products/status/not-in-pos",Description:"SKU sold in Marketplace but not exist in DEALPOS"},{Title:"Not in Channel",Url:"/menu/products/status/not-in-channel",Description:"SKU has not been sold on one of channels"},{Title:"In POS",Url:"/menu/products/status/in-pos",Description:"All products which is already available in POS"},{Title:"Multiple Listed SKU",Url:"/menu/products/status/duplicate-sku",Description:"SKU(s) which is listed more than one time (one to many)"}]}ngOnInit(){}}f.\u0275fac=function(e){return new(e||f)},f.\u0275cmp=t.Xpm({type:f,selectors:[["app-status"]],decls:13,vars:3,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid","d-flex","align-items-center","justify-content-between"],[3,"Tabs"],[1,"dropdown","me-6"],["role","button","data-bs-toggle","dropdown","aria-expanded","false",1,"text-dark"],[1,"fa-solid","fa-bars","fa-lg"],[1,"dropdown-menu","dropdown-menu-end","row"],[1,"d-flex"],[1,"dropdown-item",3,"routerLink"]],template:function(e,n){1&e&&(t.TgZ(0,"nav",0)(1,"div",1)(2,"div"),t._UZ(3,"nav-tab",2),t.qZA()(),t.TgZ(4,"div")(5,"div",3)(6,"a",4),t._UZ(7,"i",5),t.qZA(),t.TgZ(8,"div",6)(9,"div",7)(10,"a",8),t._uU(11,"Download Product By Url"),t.qZA()()()()()(),t._UZ(12,"router-outlet")),2&e&&(t.xp6(3),t.Q6J("Tabs",n.productTabs),t.xp6(7),t.Q6J("routerLink",t.DdM(2,R)))},dependencies:[I.e,h.lC,h.rH]});var x=l(1290),_=l(8231),u=l(5412),r=l(3154),g=l(9694),S=(()=>{return(i=S||(S={})).Tokopedia="https://seller.tokopedia.com",i.Shoope="https://seller.shopee.co.id",i.Tiktok="https://seller-id.tiktok.com",i.WooCommerce="https://woocommerce.dealpos.app",i.Lazada="https://sellercenter.lazada.co.id",S;var i})(),Q=l(6779),F=l(266),Y=l(6401);function tt(i,e){if(1&i&&(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&i){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 W(i,e){if(1&i&&(t.TgZ(0,"td",11),t._uU(1),t.qZA()),2&i){const n=t.oxw(3).$implicit;t.uIk("rowspan",n.Channel.length),t.xp6(1),t.hij(" ",null==n?null:n.Model,"")}}function nt(i,e){if(1&i&&(t.TgZ(0,"td",11),t._uU(1),t.qZA()),2&i){const n=t.oxw(3).$implicit;t.uIk("rowspan",n.Channel.length),t.xp6(1),t.hij(" ",null==n?null:n.Code,"")}}const T=function(i){return{"is-disabled":i}};function y(i,e){if(1&i&&(t.TgZ(0,"tr"),t.YNc(1,W,2,2,"td",14),t.YNc(2,nt,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(),t.TgZ(15,"td",19)(16,"a",20),t._UZ(17,"i",21),t.TgZ(18,"span",22),t._uU(19,"Edit"),t.qZA()()()()),2&i){const n=e.$implicit,o=e.index,a=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",a.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,12,n.Price)),t.xp6(3),t.Oqu(t.lcZ(14,14,n.Inventory)),t.xp6(3),t.Q6J("href",a.getHyperlinkSellerCenter(n),t.LSH)("ngClass",t.VKq(16,T,n.TypeID==a.channelType.KalCare))("matTooltip",n.TypeID!=a.channelType.KalCare?"Edit this product in Seller Center, inventory changes must be done via DEALPOS":"")}}function d(i,e){if(1&i&&t.YNc(0,y,20,18,"tr",8),2&i){const n=t.oxw().$implicit;t.Q6J("ngForOf",null==n?null:n.Channel)}}function C(i,e){if(1&i&&(t.ynx(0),t.YNc(1,tt,9,2,"ng-container",9),t.YNc(2,d,1,1,"ng-template",null,10,t.W1O),t.BQk()),2&i){const n=e.$implicit,o=t.MAs(3);t.xp6(1),t.Q6J("ngIf",!n.Channel||n.Channel.length<1)("ngIfElse",o)}}class P{constructor(e,n){this.data=e,this.dialogRef=n,this.channelType=g.x,this.variants=e.variants,this.title=e.title}ngOnInit(){this.initModalConfig()}initModalConfig(){this.modalConfig=new Q.O,this.modalConfig.title=this.data.title,this.modalConfig.bodyScrollable=!0,this.modalConfig.hideCancel=!0,this.modalConfig.hideOk=!0}getChannelLogo(e){return r.g.getChannelLogoByTypeId(e)}getHyperlinkSellerCenter(e){let n="javascript:void(0)";switch(e.TypeID){case g.x.ShopeeV2:n=`${S.Shoope}/portal/product/${e.ChannelItemID}`;break;case g.x.Tiktok:n=`${S.Tiktok}/product/edit/${e.ChannelItemID}`;break;case g.x.Tokopedia:n=`${S.Tokopedia}/edit-product/${e.ChannelItemID}`;break;case g.x.WooCommerce:n=`${S.WooCommerce}/wp-admin/post.php?post=${e.ChannelItemID}&action=edit`;break;case g.x.Lazada:n=`${S.Lazada}/apps/product/publish?productId=${e.ChannelItemID}`}return n}}P.\u0275fac=function(e){return new(e||P)(t.Y36(u.WI),t.Y36(u.so))},P.\u0275cmp=t.Xpm({type:P,selectors:[["app-modal-variant"]],decls:22,vars:2,consts:[[3,"config","onCancel"],["content",""],[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"],["target","_blank",1,"btn","btn-small","btn-light","px-4","py-2",3,"href","ngClass","matTooltip"],[1,"fa-solid","fa-pencil","me-2",2,"font-size","10px"],[1,"fs-6"]],template:function(e,n){1&e&&(t.TgZ(0,"modal-material",0),t.NdJ("onCancel",function(){return n.dialogRef.close()}),t.TgZ(1,"div",1)(2,"table",2)(3,"thead",3)(4,"tr")(5,"th",4),t._uU(6," VARIANT "),t.TgZ(7,"sup"),t._UZ(8,"i",5),t.qZA()(),t.TgZ(9,"th",4),t._uU(10,"SKU"),t.qZA(),t.TgZ(11,"th",4),t._uU(12," PRODUCT "),t.TgZ(13,"sup"),t._UZ(14,"i",6),t.qZA()(),t.TgZ(15,"th",4),t._uU(16,"PRICE"),t.qZA(),t.TgZ(17,"th",7),t._uU(18,"INVENTORY"),t.qZA(),t._UZ(19,"th",4),t.qZA()(),t.TgZ(20,"tbody"),t.YNc(21,C,4,2,"ng-container",8),t.qZA()()()()),2&e&&(t.Q6J("config",n.modalConfig),t.xp6(21),t.Q6J("ngForOf",n.variants))},dependencies:[p.mk,p.sg,p.O5,F.gM,Y.M,p.JJ],styles:[".mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}.sticky-top-thead[_ngcontent-%COMP%] th.sticky-top[_ngcontent-%COMP%]{top:0}.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}a.is-disabled[_ngcontent-%COMP%]{color:gray;cursor:default}a.is-disabled[_ngcontent-%COMP%]:hover{text-decoration:none}"]});var m=l(9300),O=l(7579),Z=l(2722),A=l(3900),v=l(9646),U=l(9568),D=l(1318);class k{constructor(e,n){this.LocalData=e,this.httpService=n}getCategoriesByTypeId(e,n){return this.LocalData.getCategoriesByChannelType(e).pipe((0,A.w)(o=>null!=o?(0,v.of)(o):this._getCategoriesByTypeID(e,n)))}_getCategoriesByTypeID(e,n){return this.httpService.post("/api/Channel/getCategoriesByTypeID",{TypeID:e,ID:n}).pipe((0,A.w)(a=>this.LocalData.saveCategoriesByChannelType(a,e)))}}k.\u0275fac=function(e){return new(e||k)(t.LFG(U.T),t.LFG(D.O))},k.\u0275prov=t.Yz7({token:k,factory:k.\u0275fac,providedIn:"root"});var J=l(6082),B=l(7185),b=l(4006),at=l(7963);function lt(i,e){if(1&i){const n=t.EpF();t.ynx(0),t.TgZ(1,"app-select-search",16),t.NdJ("onSelect",function(a){t.CHM(n);const s=t.oxw().index,c=t.oxw();return t.KtG(c.onSelectCategory(a,s))}),t.qZA(),t.BQk()}if(2&i){const n=t.oxw().$implicit;t.xp6(1),t.Q6J("data",n.Categories)("batchSize",30)}}function rt(i,e){if(1&i&&(t.TgZ(0,"div",17),t._UZ(1,"input",18),t.qZA()),2&i){const n=t.oxw().$implicit,o=t.oxw();t.xp6(1),t.Q6J("placeholder",o.getChannelCategory(n.TypeID))}}function st(i,e){if(1&i){const n=t.EpF();t.ynx(0),t.TgZ(1,"tr")(2,"td",9)(3,"input",10),t.NdJ("ngModelChange",function(a){const c=t.CHM(n).$implicit;return t.KtG(c.Selected=a)})("ngModelChange",function(){t.CHM(n);const a=t.oxw();return t.KtG(a.onSelectChannel())}),t.qZA()(),t.TgZ(4,"td")(5,"div",11),t._UZ(6,"img",12),t.TgZ(7,"span",13),t._uU(8),t.qZA()()(),t.TgZ(9,"td"),t.YNc(10,lt,2,2,"ng-container",14),t.YNc(11,rt,2,1,"ng-template",null,15,t.W1O),t.qZA()(),t.BQk()}if(2&i){const n=e.$implicit,o=t.MAs(12);t.xp6(3),t.Q6J("ngModel",n.Selected),t.xp6(3),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)}}class M{constructor(e,n,o,a,s){this.data=e,this.channelService=n,this.productService=o,this.dialogRef=a,this.toastrService=s,this.channelOptions=[],this.uploadResponse=[],this.channelType=g.x,this.enableBtnOk=!1,this.destroy$=new O.x,this.uploadResponse=[],this.channels=this.data.channels,this.products=this.data.products,this.isMultipleProduct=e.multipleProduct}ngOnInit(){this.initModalConfig(),this.initChannelOptions(),this.initCategories()}initModalConfig(){this.modalConfig=new Q.O,this.modalConfig.title=this.data.title,this.modalConfig.bodyScrollable=!0}initCategories(){this.filterChannelTypeId().forEach(n=>{this.channelService.getCategoriesByTypeId(n.channelType,n.channelId).pipe((0,Z.R)(this.destroy$)).subscribe(o=>{this.setCategoriesChannelOption(n.channelType,o)})})}setCategoriesChannelOption(e,n){this.channelOptions=this.channelOptions.map(o=>(o.TypeID==e&&(o.Categories=n),o))}initChannelOptions(){this.channelOptions=this.channels.map(e=>({Name:e.Name,Img:e.Img,ID:e.ID,Selected:!1,CategoryID:this.initDefaultChannelCategoryId(e.TypeID),TypeID:e.TypeID,Categories:[]}))}initDefaultChannelCategoryId(e){let n=0;return e===g.x.Lazada&&(n=6509),n}filterChannelTypeId(){return this.data.channels.map(n=>({channelType:n.TypeID,channelId:n.ID})).filter((n,o,a)=>a.findIndex(s=>n.channelType==s.channelType)==o).filter(n=>n.channelType==g.x.Tokopedia)}onSelectCategory(e,n){this.channelOptions[n].CategoryID=e,this.channelOptions[n].Selected=!0,this.onSelectChannel()}onSelectAllChannel(e){this.channelOptions=this.channelOptions.map(n=>(n.Selected=e,n)),this.enableBtnOk=e}onSelectChannel(){this.enableBtnOk=this.hasSelectedChannel()}hasSelectedChannel(){return-1!==this.channelOptions.findIndex(e=>e.Selected)}onClose(){this.dialogRef.close("CANCEL")}onSave(){if(!this.validateSelectedCategory())return void this.toastrService.warning("Category is required","Warning!");const e=this.channelOptions.filter(n=>n.Selected).map(n=>({CategoryID:n.CategoryID,ChannelID:n.ID}));this.submitToServer(e)}validateSelectedCategory(){return-1==this.channelOptions.filter(n=>n.Selected).filter(n=>n.TypeID==g.x.Tokopedia).findIndex(n=>0==n.CategoryID)}submitToServer(e){this.isMultipleProduct?this.uploadMultipleProduct(e):this.uploadSingleProduct(e)}uploadMultipleProduct(e){this.productService.uploadMultipleProduct(this.products,e).subscribe({next:n=>{this.dialogRef.close(n),this.productService.showToastrSuccessUploadMultiple(n,this.data.products[0])},error:n=>{this.dialogRef.close("ERROR"),this.productService.showToastErrorUploadMultiple(n,this.data.products[0])}})}uploadSingleProduct(e){this.productService.uploadSingleProduct(this.products,e).subscribe({next:n=>{this.dialogRef.close(n),this.productService.showToastrSuccessUploadMultiple(n,this.data.products[0])},error:n=>{this.dialogRef.close("ERROR"),this.productService.showToastErrorUploadMultiple(n,this.data.products[0])}})}getChannelCategory(e){let n;switch(e){case g.x.ShopeeV2:n="Perlengkapan Rumah Lainnya";break;case g.x.Tiktok:n="Perlengkapan Rumah - Dekorasi Rumah - Poster & Produck Cetak";break;case g.x.WooCommerce:n="New Product";break;case g.x.Lazada:n="Fashion Accessories / Women Accessories / Others";break;default:n="Unavailable Category"}return n}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}}M.\u0275fac=function(e){return new(e||M)(t.Y36(u.WI),t.Y36(k),t.Y36(J.M),t.Y36(u.so),t.Y36(B._W))},M.\u0275cmp=t.Xpm({type:M,selectors:[["app-modal-uploadMultiple-product"]],decls:15,vars:3,consts:[[3,"dynamicValidated","config","onOk","onClose","onCancel"],["content",""],[1,"table"],[1,"text-center",2,"width","6%"],["type","checkbox",3,"change"],[2,"width","30%"],[1,"fs-6"],[2,"width","60%"],[4,"ngFor","ngForOf"],[1,"text-center"],["type","checkbox",3,"ngModel","ngModelChange"],[1,"d-flex","align-items-center"],["alt","",1,"channel-logo-size",3,"src"],[1,"ms-3","fs-6"],[4,"ngIf","ngIfElse"],["EMPTY",""],["appearance","outline","bindLabel","Value","bindValue","Key","placeholder","Select Category",3,"data","batchSize","onSelect"],["matTooltip","Product Category is Harcoded, Please Change Product Category in Seller Center","matTooltipPosition","above","matTooltipClass","custom-width-tooltip"],["type","text","disabled","",1,"form-control","rounded",2,"height","40px",3,"placeholder"]],template:function(e,n){1&e&&(t.TgZ(0,"modal-material",0),t.NdJ("onOk",function(){return n.onSave()})("onClose",function(){return n.onClose()})("onCancel",function(){return n.onClose()}),t.TgZ(1,"div",1)(2,"table",2)(3,"thead")(4,"tr")(5,"th",3)(6,"input",4),t.NdJ("change",function(a){return n.onSelectAllChannel(a.target.checked)}),t.qZA()(),t.TgZ(7,"th",5)(8,"span",6),t._uU(9,"CHANNEL"),t.qZA()(),t.TgZ(10,"th",7)(11,"span",6),t._uU(12,"CATEGORY"),t.qZA()()()(),t.TgZ(13,"tbody"),t.YNc(14,st,13,5,"ng-container",8),t.qZA()()()()),2&e&&(t.Q6J("dynamicValidated",n.enableBtnOk)("config",n.modalConfig),t.xp6(14),t.Q6J("ngForOf",n.channelOptions))},dependencies:[p.sg,p.O5,b.Wl,b.JJ,b.On,F.gM,Y.M,at.h],styles:["input[type=checkbox]{width:15px;height:15px}img.channel-logo-size{width:24px;height:24px}table>thead>tr{border-top:none!important;border-left:none!important;border-right:none!important}\n"],encapsulation:2});var L=l(7481),V=l(6732),X=l(6956);function ct(i,e){if(1&i){const n=t.EpF();t.TgZ(0,"button",10),t.NdJ("click",function(){t.CHM(n);const a=t.oxw();return t.KtG(a.onOpenScanDialog())}),t._UZ(1,"i",11),t._uU(2," Scan Channel "),t.qZA()}}function dt(i,e){if(1&i){const n=t.EpF();t.TgZ(0,"button",12),t.NdJ("click",function(){t.CHM(n);const a=t.oxw();return t.KtG(a.onScanMultipleProduct())}),t._UZ(1,"i",11),t._uU(2),t.qZA()}if(2&i){const n=t.oxw();let o;t.xp6(2),t.hij(" Scan (",null==(o=n.productService.selectedProduct(n.products))?null:o.length,") ")}}function pt(i,e){if(1&i){const n=t.EpF();t.TgZ(0,"button",13),t.NdJ("click",function(){t.CHM(n);const a=t.oxw();return t.KtG(a.onUploadMultipleProduct())}),t._UZ(1,"i",14),t._uU(2),t.qZA()}if(2&i){const n=t.oxw();let o;t.xp6(2),t.hij(" Upload (",null==(o=n.productService.selectedProduct(n.products))?null:o.length,") ")}}function ht(i,e){if(1&i){const n=t.EpF();t.TgZ(0,"div",15)(1,"app-product-card",16),t.NdJ("onUpload",function(){const s=t.CHM(n).$implicit,c=t.oxw();return t.KtG(c.onUploadToMultipleChannel(s))})("onScan",function(){const s=t.CHM(n).$implicit,c=t.oxw();return t.KtG(c.onScanSingleProduct(s))})("onDescEvent",function(){const s=t.CHM(n).index,c=t.oxw();return t.KtG(c.onOpenDialogVariant(s))})("onCheckBoxChange",function(a){const c=t.CHM(n).$implicit;return t.KtG(c.selected=a)}),t.qZA()()}if(2&i){const n=e.$implicit,o=t.oxw();t.xp6(1),t.Q6J("productId",n.ID)("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)}}class ${constructor(e,n,o,a){this.http=e,this.toastr=n,this.dialog=o,this.productService=a,this.searchFilter=new x.k,this.rowCount=0,this.getLoaderPage()}getLoaderPage(){this.productService.loader().subscribe(e=>{this.channelOptions=e.Options.Channel,this.searchFilter.PageNumber=e.Filter.PageNumber,this.searchFilter.RowCount=e.Filter.RowCount,this.searchFilter.ChannelID=null,this.searchFilter.PageSize=100,this.getProducts()})}getProducts(){this.http.post("/api/product/GetInPOS",{PageNumber:this.searchFilter.PageNumber,RowCount:this.searchFilter.RowCount,text:this.searchFilter.text}).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 e=JSON.parse(JSON.stringify(this.searchFilter));e.ChannelID=r.g.GuidEMpty,this.dialog.open(_.j,{data:{filter:e,channelOptions:this.channelOptions},width:"40%"}).afterClosed().pipe((0,m.h)(o=>r.g.IsNotEmpty(o))).subscribe(o=>{this.searchFilter.ChannelID=o.ChannelID,this.searchFilter.ScanFull=o.ScanFull,this.searchFilter.UpdatedProduct=o.UpdatedProduct,this.searchFilter.Async=o.Async,this.scanAllProduct()})}scanAllProduct(){null!=this.searchFilter.ChannelID?this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).subscribe(e=>{if(this.searchFilter.Async)this.toastr.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"});else{this.getLoaderPage();let n=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.productService.successToastrScanAllProduct(e,n,!this.searchFilter.UpdatedProduct)}}):this.toastr.error("Please Select Channel","Error")}onOpenDialogVariant(e){this.dialog.open(P,{data:{title:this.products[e].Name,variants:this.products[e].Variants},width:"50%"})}onUploadMultipleProduct(){let e=this.productService.selectedProduct(this.products),n=this.productService.filterUnselectedChannel(e,this.channelOptions);this.dialog.open(M,{width:"700px",data:{title:"Upload Multiple Product",channels:n,products:e,multipleProduct:!0}}).afterClosed().pipe((0,m.h)(o=>"CANCEL"!==o)).subscribe({next:o=>{this.getProducts()}})}onUploadToMultipleChannel(e){let n=this.productService.getChannelProduct(e);e.Channel=n;let o=this.productService.filterUnselectedChannel([e],this.channelOptions);this.dialog.open(M,{width:"700px",data:{title:`Upload - ${e.Name}`,channels:o,products:[e]}}).afterClosed().pipe((0,m.h)(a=>"CANCEL"!==a)).subscribe(a=>{this.getProducts()})}searchProduct(e){this.searchFilter.text=e,this.getProducts()}onNextPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber+1,this.getProducts()}onPrevPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber-1,this.getProducts()}onScanMultipleProduct(){let e=JSON.parse(JSON.stringify(this.searchFilter));e.ChannelID=r.g.GuidEMpty;let n=this.productService.filterChannelByTypeId(this.channelOptions,[g.x.Tokopedia,g.x.Tiktok]);this.dialog.open(_.j,{data:{filter:e,channelOptions:n,isSingleChannel:!0},width:"40%"}).afterClosed().pipe((0,m.h)(a=>r.g.IsNotEmpty(a))).subscribe(a=>{this.searchFilter.ChannelID=a.ChannelID,this.searchFilter.ScanFull=a.ScanFull,this.searchFilter.UpdatedProduct=a.UpdatedProduct;let s=this.productService.selectedProduct(this.products),c=this.productService.getVariantCodesProducts(s);this.scanSingleProduct(c)})}onScanSingleProduct(e){let n=JSON.parse(JSON.stringify(this.searchFilter));n.ChannelID=r.g.GuidEMpty,this.dialog.open(_.j,{data:{filter:n,channelOptions:this.channelOptions,isSingleChannel:!0},width:"40%"}).afterClosed().pipe((0,m.h)(o=>r.g.IsNotEmpty(o))).subscribe(o=>{this.searchFilter.ChannelID=o.ChannelID;const a=this.productService.getVariantCodesProduct(e);this.scanSingleProduct(a)})}scanSingleProduct(e){this.productService.scanSingle(this.searchFilter.ChannelID,e).subscribe({next:n=>{if(n)this.toastr.success("Successfully Scan ","Success");else{let o=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.toastr.error(`This product is not existed in ${o?.Name} `,"Error")}this.searchFilter.ChannelID=r.g.GuidEMpty,n&&this.getProducts()},error:n=>{this.searchFilter.ChannelID=r.g.GuidEMpty}})}getVariantCode(e){let n;return e.length>1&&(n=(e[0].model?e[0].model:"")+e[0].Code),1==e.length&&(n=e[0].Code),n}}$.\u0275fac=function(e){return new(e||$)(t.Y36(D.O),t.Y36(B._W),t.Y36(u.uw),t.Y36(J.M))},$.\u0275cmp=t.Xpm({type:$,selectors:[["app-in-pos"]],decls:12,vars:9,consts:[["hideSearchDropdown","true","hideSearchDropdown","false","description","All products which is already available 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,"productId","title","image","description","channels","code","showCheckBox","scanButton","uploadButton","imageForZoom","onUpload","onScan","onDescEvent","onCheckBoxChange"]],template:function(e,n){1&e&&(t.TgZ(0,"mainpanel",0),t.NdJ("onSubmit",function(a){return n.searchProduct(a)}),t.TgZ(1,"actions"),t.YNc(2,ct,3,0,"button",1),t.YNc(3,dt,3,1,"button",2),t.YNc(4,pt,3,1,"button",3),t.qZA(),t.TgZ(5,"content")(6,"div",4)(7,"div",5),t.YNc(8,ht,2,10,"div",6),t.qZA(),t.TgZ(9,"div",7)(10,"div",8)(11,"app-custom-paginator",9),t.NdJ("next",function(){return n.onNextPage()})("previous",function(){return n.onPrevPage()}),t.qZA()()()()()()),2&e&&(t.Q6J("headerTitle","In POS ("+n.rowCount+")"),t.xp6(2),t.Q6J("ngIf",!n.productService.hasSelection(n.products)),t.xp6(1),t.Q6J("ngIf",n.productService.hasSelection(n.products)),t.xp6(1),t.Q6J("ngIf",n.productService.hasSelection(n.products)),t.xp6(4),t.Q6J("ngForOf",n.products),t.xp6(3),t.Q6J("filter",n.searchFilter)("totaldata",null==n.products?null:n.products.length)("paginationTotal",n.rowCount)("hasClicked",!0))},dependencies:[p.sg,p.O5,L.p,V.y,X.Y],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media (min-width: 1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}.navbar-toggler[_ngcontent-%COMP%]:focus{box-shadow:none!important}.img-logo[_ngcontent-%COMP%]{height:24px;width:24px}"]});var w=l(8796);function ut(i,e){if(1&i){const n=t.EpF();t.TgZ(0,"button",13),t.NdJ("click",function(){t.CHM(n);const a=t.oxw();return t.KtG(a.onOpenScanDialog())}),t._UZ(1,"i",14),t._uU(2," Scan Channel "),t.qZA()}}function gt(i,e){if(1&i){const n=t.EpF();t.TgZ(0,"button",15),t.NdJ("click",function(){t.CHM(n);const a=t.oxw();return t.KtG(a.onScanMultipleProduct())}),t._UZ(1,"i",14),t._uU(2),t.qZA()}if(2&i){const n=t.oxw();t.xp6(2),t.hij(" Scan (",n.productService.selectedProduct(n.products).length,") ")}}function mt(i,e){if(1&i){const n=t.EpF();t.TgZ(0,"button",16),t.NdJ("click",function(){t.CHM(n);const a=t.oxw();return t.KtG(a.onUploadMultipleProductSingleChannel())}),t._UZ(1,"i",17),t._uU(2),t.qZA()}if(2&i){const n=t.oxw();t.xp6(2),t.hij(" Upload (",n.productService.selectedProduct(n.products).length,") ")}}function _t(i,e){if(1&i&&(t.TgZ(0,"span",18),t._UZ(1,"img",19),t.qZA(),t._uU(2)),2&i){const n=e.item,o=t.oxw();t.xp6(1),t.Q6J("src",o.getChannelLogo(n.TypeID),t.LSH),t.xp6(1),t.hij(" ",n.Name," ")}}function Ct(i,e){if(1&i){const n=t.EpF();t.TgZ(0,"div")(1,"h6"),t._uU(2,"Item ID"),t.qZA(),t.TgZ(3,"input",20),t.NdJ("ngModelChange",function(a){t.CHM(n);const s=t.oxw();return t.KtG(s.searchFilter.Item_id=a)}),t.qZA()()}if(2&i){const n=t.oxw();t.xp6(3),t.Q6J("ngModel",n.searchFilter.Item_id)}}function ft(i,e){if(1&i){const n=t.EpF();t.TgZ(0,"div",21)(1,"app-product-card",22),t.NdJ("onUpload",function(){const s=t.CHM(n).$implicit,c=t.oxw();return t.KtG(c.onUploadToMultipleChannel(s))})("onDescEvent",function(){const s=t.CHM(n).index,c=t.oxw();return t.KtG(c.onOpenVariantDetail(s))})("onScan",function(){const s=t.CHM(n).$implicit,c=t.oxw();return t.KtG(c.onScanSingleProduct(s))})("onCheckBoxChange",function(a){const c=t.CHM(n).$implicit;return t.KtG(c.selected=a)}),t.qZA()()}if(2&i){const n=e.$implicit,o=t.oxw();t.xp6(1),t.Q6J("productId",null==n?null:n.ID)("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 xt(i,e){if(1&i){const n=t.EpF();t.TgZ(0,"div",23)(1,"div",24)(2,"app-custom-paginator",25),t.NdJ("total",function(){t.CHM(n);const a=t.oxw();return t.KtG(a.getRowCount())})("next",function(){t.CHM(n);const a=t.oxw();return t.KtG(a.onNextPage())})("previous",function(){t.CHM(n);const a=t.oxw();return t.KtG(a.onPreviousPage())}),t.qZA()()()}if(2&i){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)}}class K{constructor(e,n,o,a,s){this.http=e,this.dialog=n,this.toastr=o,this.productService=a,this.activateRouter=s,this.searchFilter=new x.k,this.rowCount=0,this.hasClickRowCount=!1,this.guidEmpty=r.g.GuidEMpty}ngOnInit(){this.activateRouter.queryParams.subscribe(e=>{this.initPageLoader(e.ID?e.ID:r.g.GuidEMpty)})}initPageLoader(e){this.productService.loader(e).subscribe(n=>{this.channelOptions=n.Options.Channel,this.searchFilter=n.Filter,n.Filter.ChannelID!=r.g.GuidEMpty&&(this.searchFilter.ListChannelID=[],this.searchFilter.ListChannelID.push(n.Filter.ChannelID)),this.searchFilter.PageSize=n.Filter.RowCount,this.searchFilter.Item_id="",this.getProducts()})}getProducts(){this.productService.findAllSoldInChannel({ListChannelID:this.searchFilter.ListChannelID,PageNumber:this.searchFilter.PageNumber,RowCount:this.searchFilter.RowCount,text:this.searchFilter.text,Item_id:this.searchFilter.Item_id}).subscribe(n=>{this.products=n.Data,this.products=this.productService.checkProductHasUploadBtn(this.products,this.channelOptions),this.products=this.productService.checkProductHasScanButton(this.products,this.channelOptions)})}searchProduct(e){this.searchFilter.text=e,this.hasClickRowCount=!1,this.getProducts()}onOpenVariantDetail(e){this.dialog.open(P,{data:{variants:this.products[e].Variants,title:this.products[e].Name},width:"50%"})}onOpenScanDialog(){let e=JSON.parse(JSON.stringify(this.searchFilter));e.ChannelID=r.g.GuidEMpty,this.dialog.open(_.j,{data:{filter:e,channelOptions:this.channelOptions},width:"40%"}).afterClosed().pipe((0,m.h)(o=>r.g.IsNotEmpty(o))).subscribe(o=>{this.searchFilter.ChannelID=o.ChannelID,this.searchFilter.ScanFull=o.ScanFull,this.searchFilter.UpdatedProduct=o.UpdatedProduct,this.searchFilter.Async=o.Async,this.scanAllProduct()})}scanAllProduct(){let e=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).pipe((0,m.h)(n=>n)).subscribe(n=>{this.searchFilter.Async?this.toastr.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"}):(this.productService.successToastrScanAllProduct(n,e,!this.searchFilter.UpdatedProduct),this.initPageLoader(r.g.GuidEMpty))})}onScanSingleProduct(e){e.Channel=this.productService.getChannelProduct(e);let n=JSON.parse(JSON.stringify(this.searchFilter));this.dialog.open(_.j,{data:{filter:n,channelOptions:this.channelOptions,isSingleChannel:!0},width:"40%"}).afterClosed().pipe((0,m.h)(o=>r.g.IsNotEmpty(o))).subscribe(o=>{this.searchFilter.ChannelID=o.ChannelID;const a=this.productService.getVariantCodesProduct(e);this.scanProduct(a)})}onUploadToMultipleChannel(e){let n=this.productService.getChannelProduct(e);e.Channel=n;let o=this.productService.filterUnselectedChannel([e],this.channelOptions);this.dialog.open(M,{width:"700px",data:{title:`Upload - ${e.Name}`,channels:o,products:[e]}}).afterClosed().pipe((0,m.h)(a=>"CANCEL"!==a)).subscribe({next:a=>{this.getProducts()}})}onScanMultipleProduct(){let e=this.productService.filterChannelByTypeId(this.channelOptions,[g.x.Tokopedia,g.x.Tiktok]);this.searchFilter.ChannelID=r.g.GuidEMpty;let n=JSON.parse(JSON.stringify(this.searchFilter));this.dialog.open(_.j,{data:{filter:n,channelOptions:e,isSingleChannel:!0},width:"40%"}).afterClosed().pipe((0,m.h)(a=>r.g.IsNotEmpty(a))).subscribe(a=>{this.searchFilter.ChannelID=a.ChannelID,this.searchFilter.ScanFull=a.ScanFull,this.searchFilter.UpdatedProduct=a.UpdatedProduct;let s=this.productService.selectedProduct(this.products),c=this.productService.getVariantCodesProducts(s);this.scanProduct(c)})}scanProduct(e){this.productService.scanSingle(this.searchFilter.ChannelID,e).subscribe({next:n=>{if(n)this.toastr.success("Successfully Scan ","Success");else{let o=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.toastr.error(`This product is not existed in ${o?.Name} `,"Error")}this.searchFilter.ChannelID=r.g.GuidEMpty,n&&this.getProducts()},error:n=>{this.searchFilter.ChannelID=r.g.GuidEMpty}})}getVariantCode(e){let n;return e.length>1&&(n=(e[0].model?e[0].model:"")+e[0].Code),1==e.length&&(n=e[0].Code),n}onClearFilterChannel(){this.searchFilter.ChannelID=r.g.GuidEMpty,this.searchFilter.Item_id=""}onUploadMultipleProductSingleChannel(){let e=this.productService.selectedProduct(this.products),n=this.productService.filterUnselectedChannel(e,this.channelOptions);this.dialog.open(M,{width:"700px",data:{title:"Upload Multiple Product",channels:n,products:e,multipleProduct:!0}}).afterClosed().pipe((0,m.h)(o=>"CANCEL"!==o)).subscribe({next:o=>{this.getProducts()}})}getRowCount(){this.http.post("/api/product/GetSoldInChannelRowCount",{ListChannelID:this.searchFilter.ListChannelID,text:this.searchFilter.text}).subscribe(n=>{this.hasClickRowCount=!0,this.rowCount=n.Total})}onNextPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber+1,this.getProducts()}onPreviousPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber-1,this.getProducts()}getChannelLogo(e){return r.g.getChannelLogoByTypeId(e)}}K.\u0275fac=function(e){return new(e||K)(t.Y36(D.O),t.Y36(u.uw),t.Y36(B._W),t.Y36(J.M),t.Y36(h.gz))},K.\u0275cmp=t.Xpm({type:K,selectors:[["app-sold-in-channel"]],decls:19,vars:10,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"],["class","btn btn-light shadow rounded ms-2",3,"click",4,"ngIf"],[1,"d-flex"],["container",""],["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"clearable","multiple","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,"btn","btn-light","shadow","rounded","ms-2",3,"click"],["aria-hidden","true",1,"fa","fa-upload"],[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,"productId","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(e,n){1&e&&(t.TgZ(0,"mainpanel",0),t.NdJ("onSubmit",function(a){return n.searchProduct(a)}),t.TgZ(1,"actions"),t.YNc(2,ut,3,0,"button",1),t.YNc(3,gt,3,1,"button",2),t.YNc(4,mt,3,1,"button",3),t.qZA(),t.TgZ(5,"filters")(6,"div",4)(7,"div",5)(8,"div")(9,"h6"),t._uU(10,"Channel"),t.qZA(),t.TgZ(11,"ng-select",6),t.NdJ("ngModelChange",function(a){return n.searchFilter.ListChannelID=a})("clear",function(){return n.onClearFilterChannel()}),t.YNc(12,_t,3,2,"ng-template",7),t.qZA()(),t.YNc(13,Ct,4,1,"div",8),t.qZA()()(),t.TgZ(14,"content")(15,"div",9)(16,"div",10),t.YNc(17,ft,2,10,"div",11),t.qZA(),t.YNc(18,xt,3,4,"div",12),t.qZA()()()),2&e&&(t.xp6(2),t.Q6J("ngIf",!n.productService.hasSelection(n.products)),t.xp6(1),t.Q6J("ngIf",n.productService.hasSelection(n.products)),t.xp6(1),t.Q6J("ngIf",n.productService.hasSelection(n.products)),t.xp6(7),t.Q6J("clearable",!0)("multiple",!0)("items",n.channelOptions)("ngModel",n.searchFilter.ListChannelID),t.xp6(2),t.Q6J("ngIf",null!=n.searchFilter.ListChannelID),t.xp6(4),t.Q6J("ngForOf",n.products),t.xp6(1),t.Q6J("ngIf",null==n.products?null:n.products.length))},dependencies:[p.sg,p.O5,b.Fj,b.JJ,b.On,L.p,w.w9,w.ir,V.y,X.Y],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media (min-width: 1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}.navbar-toggler[_ngcontent-%COMP%]:focus{box-shadow:none!important}"]});var G=l(8063),Pt=l(8505),bt=l(4004),St=l(9425),vt=l(1739);function It(i,e){if(1&i){const n=t.EpF();t.ynx(0),t.TgZ(1,"img",28),t.NdJ("click",function(a){t.CHM(n);const s=t.oxw(3).$implicit,c=t.oxw(3);return t.KtG(c.onZoomImage(a,null==s?null:s.ImageUrl))}),t.qZA(),t.BQk()}if(2&i){const n=t.oxw(3).$implicit;t.xp6(1),t.Q6J("src",null==n?null:n.ImageUrl,t.LSH)}}function Tt(i,e){1&i&&t._UZ(0,"img",29)}function yt(i,e){if(1&i&&(t.ynx(0),t.TgZ(1,"td",21)(2,"div",22),t.YNc(3,It,2,1,"ng-container",23),t.YNc(4,Tt,1,0,"ng-template",null,24,t.W1O),t.qZA()(),t.TgZ(6,"td",25)(7,"h4",26)(8,"span",27),t._uU(9),t.qZA()()(),t.BQk()),2&i){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.hij(" ",null==o?null:o.Name," ")}}function Mt(i,e){if(1&i&&(t.TgZ(0,"div")(1,"a",17),t._UZ(2,"img",30),t.qZA()()),2&i){const n=e.$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 Ot(i,e){if(1&i&&(t.TgZ(0,"div"),t._UZ(1,"img",30),t.qZA()),2&i){const n=e.$implicit;t.xp6(1),t.Q6J("src",n.Img,t.LSH)("matTooltip",n.Name)}}function wt(i,e){if(1&i&&(t.TgZ(0,"tr"),t.YNc(1,yt,10,6,"ng-container",13),t.TgZ(2,"td"),t._uU(3),t.qZA(),t.TgZ(4,"td")(5,"span"),t._uU(6),t.qZA(),t.TgZ(7,"span",16)(8,"a",17),t._UZ(9,"i",18),t.qZA()()(),t.TgZ(10,"td",19)(11,"div",20),t.YNc(12,Mt,3,3,"div",15),t.qZA()(),t.TgZ(13,"td",19)(14,"div",20),t.YNc(15,Ot,2,2,"div",15),t.qZA()()()),2&i){const n=e.$implicit,o=e.index,a=t.oxw(4);t.xp6(1),t.Q6J("ngIf",0==o),t.xp6(2),t.hij(" ",n.Name," "),t.xp6(3),t.hij(" ",n.Code," "),t.xp6(2),t.Q6J("href","https://"+a.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(null==n?null:n.ID),t.LSH),t.xp6(4),t.Q6J("ngForOf",null==n?null:n.Available),t.xp6(3),t.Q6J("ngForOf",null==n?null:n.NotAvailable)}}function Nt(i,e){if(1&i&&(t.ynx(0),t.YNc(1,wt,16,6,"tr",15),t.BQk()),2&i){const n=e.$implicit;t.xp6(1),t.Q6J("ngForOf",n.Variants)}}function Ft(i,e){if(1&i&&(t.TgZ(0,"tbody"),t.YNc(1,Nt,2,1,"ng-container",15),t.qZA()),2&i){const n=e.ngIf;t.xp6(1),t.Q6J("ngForOf",n)}}function Zt(i,e){if(1&i){const n=t.EpF();t.TgZ(0,"span",38),t.NdJ("click",function(){t.CHM(n);const a=t.oxw(3);return t.KtG(a.getRowCount())}),t.TgZ(1,"i",39),t._uU(2,"?"),t.qZA()()}}function At(i,e){if(1&i&&(t.TgZ(0,"span"),t._uU(1),t.ALo(2,"number"),t.qZA()),2&i){const n=e.ngIf;t.xp6(1),t.Oqu(t.lcZ(2,1,null==n?null:n.Count))}}function Ut(i,e){if(1&i){const n=t.EpF();t.TgZ(0,"a",40),t.NdJ("click",function(){t.CHM(n);const a=t.oxw(3);return t.KtG(a.onNextPage())}),t._UZ(1,"i",41),t._uU(2," Next"),t.qZA()}}function Dt(i,e){if(1&i){const n=t.EpF();t.TgZ(0,"a",42),t.NdJ("click",function(){t.CHM(n);const a=t.oxw(3);return t.KtG(a.onLastPage())}),t._UZ(1,"i",43),t._uU(2," Last"),t.qZA()}}function kt(i,e){if(1&i&&(t.TgZ(0,"div",31)(1,"div",32)(2,"div",33),t._uU(3),t.ALo(4,"number"),t.YNc(5,Zt,3,0,"span",34),t.YNc(6,At,3,3,"span",13),t.ALo(7,"async"),t._uU(8),t.qZA()(),t.TgZ(9,"div",35),t.YNc(10,Ut,3,0,"a",36),t.YNc(11,Dt,3,0,"a",37),t.qZA()()),2&i){const n=e.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 Jt(i,e){if(1&i){const n=t.EpF();t.TgZ(0,"mainpanel",1),t.NdJ("onSubmit",function(a){t.CHM(n);const s=t.oxw();return t.KtG(s.searchProduct(a))}),t.TgZ(1,"actions")(2,"button",2),t.NdJ("click",function(){const s=t.CHM(n).ngIf,c=t.oxw();return t.KtG(c.openScanDialog(s))}),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,Ft,2,1,"tbody",13),t.ALo(23,"async"),t.qZA()()(),t.YNc(24,kt,12,10,"div",14),t.ALo(25,"async"),t.qZA()()()}if(2&i){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$))}}class H{constructor(e,n,o,a,s,c){this.http=e,this.dialog=n,this.toastr=o,this.productService=a,this.paginationService=s,this.biggerPictureService=c,this.loaderAPI="product/Load",this.rowCountAPI="product/GetNotInChannelRowCount",this.notChannelAPI="product/GetNotInChannelV2"}ngOnInit(){this.initPageLoader(),this.iniData(),this.initHostName()}initHostName(){const e=localStorage.getItem("Authorization");this.hostName=JSON.parse(e)?.Host}initPageLoader(){this.paginationService.fetchDataEndpoint=this.notChannelAPI,this.loader$=this.http.post(`api/${this.loaderAPI}`,{}).pipe((0,Pt.b)(e=>{this.filterSearch=e.Filter,this.paginationService.resetToFirstPage(e.Filter)}))}iniData(){this.data$=this.paginationService.data$.pipe((0,bt.U)(e=>e.map(n=>(n.Variants=n.Variants.map(o=>(o.Available=this.productService.sortChannel(o.Available),o.NotAvailable=this.productService.sortChannel(o.NotAvailable),o.Available=this.assignLogoChannel(o.Available),o.NotAvailable=this.assignLogoChannel(o.NotAvailable),o)),n))))}assignLogoChannel(e){return e.map(n=>(n.Img=r.g.getChannelLogoByTypeId(n.TypeID),n))}searchProduct(e){this.filterSearch.text=e,this.paginationService.resetToFirstPage(this.filterSearch)}scanAllProduct(e){let n=this.productService.findChannelById(this.filterSearch.ChannelID,e.Options.Channel);this.productService.scanAll(this.filterSearch.ChannelID,this.filterSearch.ScanFull,this.filterSearch.UpdatedProduct,this.filterSearch.Async).subscribe(o=>{this.filterSearch.Async?this.toastr.success("You will be notified when the scan is completed.","Scan Asynchronous"):(this.productService.successToastrScanAllProduct(o,n,!this.filterSearch.UpdatedProduct),this.initPageLoader())})}openScanDialog(e){let n=JSON.parse(JSON.stringify(this.filterSearch));n.ChannelID=r.g.GuidEMpty,this.dialog.open(_.j,{data:{filter:n,channelOptions:e.Options.Channel},width:"40%"}).afterClosed().pipe((0,m.h)(a=>r.g.IsNotEmpty(a))).subscribe(a=>{this.filterSearch.ChannelID=a.ChannelID,this.filterSearch.ScanFull=a.ScanFull,this.filterSearch.UpdatedProduct=a.UpdatedProduct,this.filterSearch.Async=a.Async,this.scanAllProduct(e)})}getChannelLogoById(e){return r.g.getChannelLogoByTypeId(e)}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:e=>{this.filterSearch.PageNumber=1,this.paginationService.getAllData(this.filterSearch,e.Count)}})}onZoomImage(e,n){this.biggerPictureService.openBiggerPicture(e,n)}ngOnDestroy(){this.paginationService.destroy()}}function Lt(i,e){if(1&i&&(t.TgZ(0,"tr")(1,"td"),t._uU(2),t.qZA(),t.TgZ(3,"td"),t._uU(4),t.qZA()()),2&i){const n=e.$implicit;t.xp6(2),t.Oqu(null==n?null:n.Name),t.xp6(2),t.Oqu(null==n?null:n.ChannelVariationSKU)}}H.\u0275fac=function(e){return new(e||H)(t.Y36(D.O),t.Y36(u.uw),t.Y36(B._W),t.Y36(J.M),t.Y36(St.b),t.Y36(vt.k))},H.\u0275cmp=t.Xpm({type:H,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"],[1,"ms-1"],["target","_blank",3,"href"],[1,"fas","fa-lg","fa-external-link-alt","external-link-custom"],[2,"padding-left","0px"],[1,"d-flex","flex-wrap","mb-1"],[1,"text-center",3,"rowSpan"],[2,"padding-right","0px"],[4,"ngIf","ngIfElse"],["elsePic",""],[1,"text-start",3,"rowSpan"],[1,"ms-5","fw-normal","text-ellipsis",2,"max-width","26vw !important"],[3,"matTooltip"],[1,"border","rounded","cursor-pointer",2,"max-width","40px",3,"src","click"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded",2,"max-width","40px"],["alt","",1,"channel-logo","cursor-pointer","ms-4","mt-3",3,"src","matTooltip"],[1,"d-flex","justify-content-between","mt-5"],[1,"me-auto","d-sm-block","collapse","mt-3"],[1,"font-weight-bold","font-italic","hidden-xxs"],["style","cursor: pointer",3,"click",4,"ngIf"],[1,"btn-group"],["role","button","class","btn btn-outline-secondary btn-sm text-primary","title","Load more for 20 products",3,"click",4,"ngIf"],["role","button","class","btn btn-outline-secondary btn-sm text-primary","title","Load all products",3,"click",4,"ngIf"],[2,"cursor","pointer",3,"click"],["title","Retreive rows count",1,"border","p-3"],["role","button","title","Load more for 20 products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-arrow-right"],["role","button","title","Load all products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-share"]],template:function(e,n){1&e&&(t.YNc(0,Jt,26,7,"mainpanel",0),t.ALo(1,"async")),2&e&&t.Q6J("ngIf",t.lcZ(1,1,n.loader$))},dependencies:[p.sg,p.O5,L.p,F.gM,p.Ov,p.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}}.navbar-toggler[_ngcontent-%COMP%]:focus{box-shadow:none!important}thead[_ngcontent-%COMP%]{position:sticky;top:0}.channel-logo[_ngcontent-%COMP%]{width:20px}.w-img[_ngcontent-%COMP%]{width:100%}"]});class q{constructor(e,n){this.data=e,this.dialogRef=n}ngOnInit(){this.initModalConfig()}initModalConfig(){this.modalConfig=new Q.O,this.modalConfig.title=this.data?.title,this.modalConfig.hideOk=!0,this.modalConfig.hideCancel=!0}}q.\u0275fac=function(e){return new(e||q)(t.Y36(u.WI),t.Y36(u.so))},q.\u0275cmp=t.Xpm({type:q,selectors:[["app-modal-variants"]],decls:11,vars:2,consts:[[3,"config","onCancel"],["content",""],[1,"table"],[1,"thead-light"],[4,"ngFor","ngForOf"]],template:function(e,n){1&e&&(t.TgZ(0,"modal-material",0),t.NdJ("onCancel",function(){return n.dialogRef.close()}),t.TgZ(1,"div",1)(2,"table",2)(3,"thead",3)(4,"tr")(5,"th"),t._uU(6,"Variant"),t.qZA(),t.TgZ(7,"th"),t._uU(8,"SKU"),t.qZA()()(),t.TgZ(9,"tbody"),t.YNc(10,Lt,5,2,"tr",4),t.qZA()()()()),2&e&&(t.Q6J("config",n.modalConfig),t.xp6(10),t.Q6J("ngForOf",n.data.variants))},dependencies:[p.sg,Y.M],styles:[".mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}"]});var et=l(1948);function Et(i,e){if(1&i){const n=t.EpF();t.TgZ(0,"button",13),t.NdJ("click",function(){t.CHM(n);const a=t.oxw();return t.KtG(a.openScanDialog())}),t._UZ(1,"i",14),t._uU(2," Scan Channel "),t.qZA()}}function Rt(i,e){if(1&i){const n=t.EpF();t.ynx(0),t.TgZ(1,"button",15),t.NdJ("click",function(){t.CHM(n);const a=t.oxw();return t.KtG(a.onDownloadAllProduct("SELECTED"))}),t._UZ(2,"i",16),t._uU(3),t.qZA(),t.BQk()}if(2&i){const n=t.oxw();let o;t.xp6(3),t.hij(" Download (",null==(o=n.productService.selectedProduct(n.products))?null:o.length,") ")}}function Qt(i,e){if(1&i&&(t.TgZ(0,"span",17),t._UZ(1,"img",18),t.qZA(),t._uU(2)),2&i){const n=e.item,o=t.oxw();t.xp6(1),t.Q6J("src",o.getChannelLogo(n.TypeID),t.LSH),t.xp6(1),t.hij(" ",n.Name," ")}}const Yt=function(i){return[i]},Bt=function(){return[]};function Vt(i,e){if(1&i){const n=t.EpF();t.TgZ(0,"div",19)(1,"app-product-card",20),t.NdJ("onCheckBoxChange",function(a){const c=t.CHM(n).index,Xt=t.oxw();return t.KtG(Xt.onSelectProduct(a,c))})("onDescEvent",function(){const s=t.CHM(n).index,c=t.oxw();return t.KtG(c.onShowVariantDetail(s))})("onDownload",function(){const s=t.CHM(n).$implicit,c=t.oxw();return t.KtG(c.onDownloadProduct(s))})("onScan",function(){const s=t.CHM(n).$implicit,c=t.oxw();return t.KtG(c.onScanChannel(s))}),t.qZA()()}if(2&i){const n=e.$implicit;t.xp6(1),t.Q6J("showRedirectIcon",!1)("title",null==n?null:n.Name)("image",null==n?null:n.Image)("imageForZoom",null==n?null:n.Image)("code",null==n?null:n.SKU)("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(10,Yt,null==n?null:n.Channel):t.DdM(12,Bt))("showCheckBox",!0)("scanButton",!0)}}function $t(i,e){if(1&i){const n=t.EpF();t.TgZ(0,"div",21)(1,"div",22)(2,"app-custom-paginator",23),t.NdJ("total",function(){t.CHM(n);const a=t.oxw();return t.KtG(a.getRowCount())})("next",function(){t.CHM(n);const a=t.oxw();return t.KtG(a.onNextPage())})("previous",function(){t.CHM(n);const a=t.oxw();return t.KtG(a.onPreviousPage())}),t.qZA()()()}if(2&i){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)}}class j{constructor(e,n,o,a,s){this.http=e,this.dialog=n,this.productService=o,this.toastrService=a,this.activateRouter=s,this.searchFilter=new x.k,this.hasClickRowCount=!1}ngOnInit(){this.activateRouter.queryParams.subscribe(e=>{this.initPageLoader(e.ID?e.ID:r.g.GuidEMpty)})}initPageLoader(e){this.productService.loader(e).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",{ChannelID:this.searchFilter.ChannelID,PageNumber:this.searchFilter.PageNumber,RowCount:this.searchFilter.RowCount,text:this.searchFilter.text,HaveSku:this.searchFilter.HaveSku}).subscribe(n=>{this.products=n.Data,this.mapChannelToProduct(),this.setSkuProduct()})}mapChannelToProduct(){this.products=this.products.map(e=>(e.Channel=JSON.parse(JSON.stringify(this.channelOptions.find(n=>n.ID==e.ChannelID))),e)).map(e=>(e.Channel.Url=e.Url,e))}setSkuProduct(){this.products=this.products.map(e=>(e.SKU=0==e?.Variant?.length?r.g.IsNotEmpty(e?.ChannelItemSKU)?e?.ChannelItemSKU:"SKU not assigned":e?.Variant[0]?.ChannelVariationSKU?e?.Variant[0]?.ChannelVariationSKU:"SKU not assigned",e))}onSearch(e){this.searchFilter.text=e,this.hasClickRowCount=!1,this.getProducts()}onClearChannelFilter(){this.searchFilter.ChannelID=r.g.GuidEMpty}onScanAll(){let e=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).subscribe(n=>{this.searchFilter.Async?this.toastrService.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"}):(this.initPageLoader(r.g.GuidEMpty),this.productService.successToastrScanAllProduct(n,e,!this.searchFilter.UpdatedProduct)),this.searchFilter.ChannelID=r.g.GuidEMpty})}openScanDialog(){let e=JSON.parse(JSON.stringify(this.searchFilter));e.ChannelID=r.g.GuidEMpty,this.dialog.open(_.j,{data:{filter:e,channelOptions:this.channelOptions},width:"40%"}).afterClosed().pipe((0,m.h)(o=>r.g.IsNotEmpty(o))).subscribe(o=>{this.searchFilter.ChannelID=o.ChannelID,this.searchFilter.UpdatedProduct=o.UpdatedProduct,this.searchFilter.ScanFull=o.ScanFull,this.searchFilter.Async=o.Async,this.onScanAll()})}onDownloadAllProduct(e){let n;n="ALL"==e?this.products:this.productService.selectedProduct(this.products),n.length>0&&this.productService.downloadMultipleProduct(n).subscribe({next:()=>{this.getProducts()}})}onSelectProduct(e,n){this.products[n].selected=e}onDownloadProduct(e){confirm(`Are you sure you want to Retrieve product ${e?.Name} from ${e?.Channel.Name} to POS?`)&&this.productService.downloadProduct(e).subscribe({next:()=>{this.getProducts()}})}onScanChannel(e){let n=JSON.parse(JSON.stringify(e));delete n.Channel,this.productService.scanCompareToPos([n]).subscribe(o=>{o.Status?(this.initPageLoader(r.g.GuidEMpty),this.toastrService.success(`product ${e.Name} have been successfully scanned and synchronized with POS`,"Success")):this.toastrService.error(`Product ${e.Name} is not existed in POS`,"Error")})}onShowVariantDetail(e){let n=this.products[e].Variant;n.length>0&&this.dialog.open(q,{data:{title:this.products[e].Name,variants:n},width:"30%"})}getRowCount(){let e={ChannelID:this.searchFilter.ChannelID,text:this.searchFilter.text,HaveSku:parseInt(this.searchFilter.HaveSku)};this.http.post("/api/product/GetProductChannelNotPOSRowCount",e).subscribe(n=>{this.hasClickRowCount=!0,this.rowCount=n.Count})}onNextPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber+1,this.getProducts()}onPreviousPage(){this.searchFilter.PageNumber=this.searchFilter.PageNumber-1,this.getProducts()}getChannelLogo(e){return r.g.getChannelLogoByTypeId(e)}}j.\u0275fac=function(e){return new(e||j)(t.Y36(D.O),t.Y36(u.uw),t.Y36(J.M),t.Y36(B._W),t.Y36(h.gz))},j.\u0275cmp=t.Xpm({type:j,selectors:[["app-not-in-pos"]],decls:27,vars:11,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",""],["name","haveSKU",1,"form-control","h-100","pt-3","rounded",3,"ngModel","ngModelChange"],[1,"me-5",3,"value"],[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,"showRedirectIcon","title","image","imageForZoom","code","description","downloadButton","channels","showCheckBox","scanButton","onCheckBoxChange","onDescEvent","onDownload","onScan"],[1,"row"],[1,"col-12"],[3,"filter","totaldata","paginationTotal","hasClicked","total","next","previous"]],template:function(e,n){1&e&&(t.TgZ(0,"mainpanel",0),t.NdJ("onSubmit",function(a){return n.onSearch(a)}),t.TgZ(1,"actions"),t.YNc(2,Et,3,0,"button",1),t.YNc(3,Rt,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(a){return n.searchFilter.ChannelID=a})("clear",function(){return n.onClearChannelFilter()}),t.YNc(11,Qt,3,2,"ng-template",6),t.qZA()(),t.TgZ(12,"div")(13,"h6"),t._uU(14,"SKU Assigned"),t.qZA(),t.TgZ(15,"mat-radio-group",7),t.NdJ("ngModelChange",function(a){return n.searchFilter.HaveSku=a}),t.TgZ(16,"mat-radio-button",8),t._uU(17," All "),t.qZA(),t.TgZ(18,"mat-radio-button",8),t._uU(19," Yes "),t.qZA(),t.TgZ(20,"mat-radio-button",8),t._uU(21," No "),t.qZA()()()()()(),t.TgZ(22,"content")(23,"div",9)(24,"div",10),t.YNc(25,Vt,2,13,"div",11),t.qZA(),t.YNc(26,$t,3,4,"div",12),t.qZA()()()),2&e&&(t.xp6(2),t.Q6J("ngIf",!n.productService.hasSelection(n.products)),t.xp6(1),t.Q6J("ngIf",n.productService.hasSelection(n.products)),t.xp6(7),t.Q6J("clearable",!0)("items",n.channelOptions)("ngModel",n.searchFilter.ChannelID),t.xp6(5),t.Q6J("ngModel",n.searchFilter.HaveSku),t.xp6(1),t.Q6J("value",0),t.xp6(2),t.Q6J("value",1),t.xp6(2),t.Q6J("value",2),t.xp6(5),t.Q6J("ngForOf",n.products),t.xp6(1),t.Q6J("ngIf",(null==n.products?null:n.products.length)>0))},dependencies:[p.sg,p.O5,b.JJ,b.On,L.p,w.w9,w.ir,et.VQ,et.U0,V.y,X.Y],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media (min-width: 1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}.navbar-toggler[_ngcontent-%COMP%]:focus{box-shadow:none!important}.itemTitle[_ngcontent-%COMP%]{cursor:pointer}"]});var it=l(5631);function Kt(i,e){if(1&i&&(t.TgZ(0,"span",9),t._UZ(1,"img",10),t.qZA(),t._uU(2)),2&i){const n=e.item,o=t.oxw();t.xp6(1),t.Q6J("src",o.getChannelLogo(n.TypeID),t.LSH),t.xp6(1),t.hij(" ",n.Name," ")}}function Gt(i,e){if(1&i&&(t.TgZ(0,"div",12),t._UZ(1,"app-duplicate-product-card",13),t.qZA()),2&i){const n=e.$implicit;t.xp6(1),t.Q6J("imageForZoom",n.ImageUrl)("title",n.Name)("code",n.Code)("image",n.ThumbnailURL)("channels",n.Channel)}}function Ht(i,e){if(1&i&&(t.ynx(0),t.YNc(1,Gt,2,5,"div",11),t.BQk()),2&i){const n=t.oxw();t.xp6(1),t.Q6J("ngForOf",n.products)}}function qt(i,e){1&i&&(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 jt(i,e){if(1&i){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 a=t.oxw();return t.KtG(a.onNextPage())})("previous",function(){t.CHM(n);const a=t.oxw();return t.KtG(a.onPrevPage())})("total",function(){t.CHM(n);const a=t.oxw();return t.KtG(a.getRowCount())}),t.qZA()()(),t.BQk()}if(2&i){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)}}class z{constructor(e,n){this.httpService=e,this.productService=n,this.searchFilter=new x.k,this.products=[],this.hasClickedRowCount=!1,this.getPageLoader()}getPageLoader(){this.productService.loader().subscribe(e=>{this.searchFilter=e.Filter,this.searchFilter.PageSize=e.Filter.RowCount,this.channelOptions=e.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(n=>{this.products=n.Data})}onSearch(e){this.searchFilter.text=e,this.hasClickedRowCount=!1,this.getProducts()}onClearFilter(){this.searchFilter.ChannelID=r.g.GuidEMpty}getChannelLogo(e){return r.g.getChannelLogoByTypeId(e)}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(n=>{this.hasClickedRowCount=!0,this.rowCount=n.Total})}}z.\u0275fac=function(e){return new(e||z)(t.Y36(D.O),t.Y36(J.M))},z.\u0275cmp=t.Xpm({type:z,selectors:[["app-duplicate-sku"]],decls:15,vars:6,consts:[["headerTitle","Multiple Listed SKU","textButton"," Search","description","SKU(s) which is listed more than one time (one to many)",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,"imageForZoom","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(e,n){if(1&e&&(t.TgZ(0,"mainpanel",0),t.NdJ("onSubmit",function(a){return n.onSearch(a)}),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(a){return n.searchFilter.ChannelID=a})("clear",function(){return n.onClearFilter()}),t.YNc(7,Kt,3,2,"ng-template",3),t.qZA()()()(),t.TgZ(8,"content")(9,"div",4)(10,"div",5),t.YNc(11,Ht,2,1,"ng-container",6),t.YNc(12,qt,9,0,"ng-template",null,7,t.W1O),t.qZA(),t.YNc(14,jt,4,4,"ng-container",8),t.qZA()()()),2&e){const o=t.MAs(13);t.xp6(6),t.Q6J("clearable",!0)("items",n.channelOptions)("ngModel",n.searchFilter.ChannelID),t.xp6(5),t.Q6J("ngIf",(null==n.products?null:n.products.length)>0)("ngIfElse",o),t.xp6(3),t.Q6J("ngIf",(null==n.products?null:n.products.length)>0)}},dependencies:[p.sg,p.O5,b.JJ,b.On,L.p,w.w9,w.ir,it._,V.y]});var zt=l(8739);const Wt=[{component:f,path:"",children:[{path:"",redirectTo:"sold-in-channel",pathMatch:"full"},{path:"in-pos",component:$,canActivate:[G.a],data:{title:"Products in POS"}},{path:"sold-in-channel",component:K,canActivate:[G.a],data:{title:"Products Sold in Channel"}},{path:"not-in-channel",component:H,canActivate:[G.a],data:{title:"Products not in Channel"}},{path:"not-in-pos",component:j,canActivate:[G.a],data:{title:"Products not in POS"}},{path:"duplicate-sku",component:z,canActivate:[G.a],data:{title:"Duplicate Sku in Channel"}}]}];class E{}E.\u0275fac=function(e){return new(e||E)},E.\u0275mod=t.oAB({type:E}),E.\u0275inj=t.cJS({imports:[p.ez,b.u5,L.R,F.AV,w.A0,zt.TU,et.Fk,I.Z,it._,V.y,X.Y,h.Bz.forChild(Wt)]})},9425:(ot,N,l)=>{l.d(N,{b:()=>T});var p=l(1135),t=l(7579),I=l(2722),h=l(9300),R=l(4351),f=l(4004),x=l(4482),_=l(5403),u=l(8421),r=l(4671),g=l(5032),S=l(3269),F=l(5026),Y=l(8505),tt=l(4782),W=l(4650),nt=l(1318);class T{constructor(d){this.http=d,this.pagination$=new p.X(null),this.destroy$=new t.x,this.data$=this.paginationFunction()}onNextPage(d){d.PageNumber+=1,this.pagination$.next(d)}setPageNumberFooter(d){this.footerPageNumber=d.PageNumber}setPaginationButtonState(d,C){this.disableNextButton=0==C||!(C<d.RowCount*d.PageNumber)}resetToFirstPage(d){d.PageNumber=1,this.pagination$.next(d),this.hideCount=!0,this.goToLastPage=!1}getAllData(d,C){d.RowCount=C,this.pagination$.next(d),this.goToLastPage=!0}destroy(){this.destroy$.next(!0),this.destroy$.complete(),this.pagination$=null,this.pagination$=new p.X(null),this.data$=this.paginationFunction()}paginationFunction(){return this.pagination$.pipe((0,I.R)(this.destroy$),(0,h.h)(d=>null!=d),(0,R.b)(d=>this.http.post(`/API/${this.fetchDataEndpoint}`,JSON.stringify(d)).pipe((0,f.U)(C=>C.Data))),function Q(...y){const d=(0,S.jO)(y);return(0,x.e)((C,P)=>{const m=y.length,O=new Array(m);let Z=y.map(()=>!1),A=!1;for(let v=0;v<m;v++)(0,u.Xf)(y[v]).subscribe((0,_.x)(P,U=>{O[v]=U,!A&&!Z[v]&&(Z[v]=!0,(A=Z.every(r.y))&&(Z=null))},g.Z));C.subscribe((0,_.x)(P,v=>{if(A){const U=[v,...O];P.next(d?d(...U):U)}}))})}(this.pagination$),(0,F.R)((d,C)=>{const[P,m]=d,[O]=C;return 1==m.PageNumber?[O,m]:[P.concat(O),m]}),(0,Y.b)(([d,C])=>{this.setPageNumberFooter(C),this.setPaginationButtonState(C,d.length)}),(0,f.U)(([d])=>d),(0,tt.d)())}}T.\u0275fac=function(d){return new(d||T)(W.LFG(nt.O))},T.\u0275prov=W.Yz7({token:T,factory:T.\u0275fac,providedIn:"root"})}}]);
|