marketplacepos 3.11.3 → 3.11.4
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/{chunk-GPQQ6FGZ.js → chunk-3LQ5TKLD.js} +1 -1
- package/Marketplace/{chunk-26JYE3EW.js → chunk-3PX6SSDC.js} +1 -1
- package/Marketplace/{chunk-YJL4YLVW.js → chunk-5LCXVQBT.js} +1 -1
- package/Marketplace/{chunk-STVMEPEK.js → chunk-5SE72MGC.js} +1 -1
- package/Marketplace/{chunk-5IPUSVZQ.js → chunk-5ZUWMFL5.js} +1 -1
- package/Marketplace/chunk-6HBK3C7G.js +1 -0
- package/Marketplace/{chunk-Z7L5UJPR.js → chunk-6WGRXHNE.js} +1 -1
- package/Marketplace/{chunk-EMOFGOQE.js → chunk-C45X4NQK.js} +1 -1
- package/Marketplace/{chunk-BGR4ZABV.js → chunk-D72PMDHY.js} +1 -1
- package/Marketplace/{chunk-4CIVIS2I.js → chunk-DEH6NGKQ.js} +1 -1
- package/Marketplace/{chunk-QQVJ77MJ.js → chunk-G5LCLRIW.js} +1 -1
- package/Marketplace/{chunk-SH3VBTMG.js → chunk-GSSZWMCP.js} +1 -1
- package/Marketplace/{chunk-WYTSEICB.js → chunk-IPGAIBF6.js} +1 -1
- package/Marketplace/{chunk-JI4WVOEH.js → chunk-JPAJ6YR6.js} +1 -1
- package/Marketplace/{chunk-UFSKJNHN.js → chunk-KUVW5SH2.js} +1 -1
- package/Marketplace/{chunk-FMQAUTQV.js → chunk-KYJA5TD4.js} +1 -1
- package/Marketplace/{chunk-4IQIUVVU.js → chunk-L4DP3Q4W.js} +1 -1
- package/Marketplace/{chunk-DVDUQ5BZ.js → chunk-MK34PW5S.js} +1 -1
- package/Marketplace/{chunk-BG5B4X23.js → chunk-MSAVOLLA.js} +1 -1
- package/Marketplace/{chunk-XH32N2LH.js → chunk-MSGMWJHN.js} +1 -1
- package/Marketplace/{chunk-6EMD4N72.js → chunk-OHTJCLX7.js} +1 -1
- package/Marketplace/{chunk-ZHDV3I2T.js → chunk-PZJCL4YS.js} +1 -1
- package/Marketplace/{chunk-MBRVLUA3.js → chunk-QK22WK2Q.js} +1 -1
- package/Marketplace/{chunk-UETPNACD.js → chunk-SQDLJ6C7.js} +1 -1
- package/Marketplace/{chunk-NHGAULCC.js → chunk-SRYGE2HW.js} +1 -1
- package/Marketplace/{chunk-K4BSJ4Z6.js → chunk-TCC7PQV3.js} +1 -1
- package/Marketplace/{chunk-VD2J6EF2.js → chunk-VK32VX4W.js} +1 -1
- package/Marketplace/{chunk-RKYODJUS.js → chunk-VO5VAOZH.js} +1 -1
- package/Marketplace/{chunk-HTJWR537.js → chunk-WQ7LUTQ2.js} +1 -1
- package/Marketplace/{chunk-UHRIJRKZ.js → chunk-XDNW2F3I.js} +1 -1
- package/Marketplace/{chunk-HWRAMHXZ.js → chunk-XOYXFFE6.js} +1 -1
- package/Marketplace/{chunk-54I7BFLJ.js → chunk-YZ67XPSX.js} +1 -1
- package/Marketplace/{chunk-WIUP23L2.js → chunk-ZIW2YTBP.js} +1 -1
- package/Marketplace/{chunk-O4MUVGWL.js → chunk-ZKBLXGXT.js} +1 -1
- package/Marketplace/index.html +2 -2
- package/Marketplace/{main-7ZEC4JUC.js → main-RSHB3ATI.js} +1 -1
- package/package.json +1 -1
- package/Marketplace/chunk-6MICMEJV.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as O}from"./chunk-
|
|
1
|
+
import{r as O}from"./chunk-ZKBLXGXT.js";import{e as M,f as P}from"./chunk-6F6NSBIF.js";import{Ab as u,Cb as _,Ia as n,Ub as C,Wa as a,Ya as o,Yc as S,Zc as E,_c as N,aa as v,fb as s,gb as m,ha as g,ia as x,ib as p,jb as c,kc as b,lc as y,qb as l,sc as I,tb as f,zb as T}from"./chunk-6DRNAUKE.js";function D(e,t){if(e&1&&(p(0),s(1,"a",6),u(2),m(),c()),e&2){let i=l().$implicit;n(),f("routerLink",i.Url),o("title",i.Description?i.Description:""),n(),_(" ",i.Title," ")}}function F(e,t){if(e&1&&(s(0,"li",4),a(1,D,3,3,"ng-container",5),m()),e&2){let i=t.$implicit;n(),o("ngxPermissionsOnly",i.Permissions)}}function L(e,t){if(e&1&&(p(0),a(1,F,2,1,"li",3),c()),e&2){let i=l();n(),o("ngForOf",i.Tabs)}}function R(e,t){if(e&1&&(s(0,"li",4)(1,"a",6),u(2),m()()),e&2){let i=t.$implicit;n(),f("routerLink",i.Url),o("title",i.Description?i.Description:""),n(),_(" ",i.Title," ")}}function w(e,t){if(e&1&&a(0,R,3,3,"li",3),e&2){let i=l();o("ngForOf",i.Tabs)}}var H=(()=>{let t=class t{constructor(){this.usePermissions=!1}};t.\u0275fac=function(r){return new(r||t)},t.\u0275cmp=g({type:t,selectors:[["nav-tab"]],inputs:{Tabs:"Tabs",usePermissions:"usePermissions"},decls:4,vars:2,consts:[["NOT_USE_PERMISSIONS",""],[1,"nav","navbar-nav","navbar-left","nav-tab-arrow"],[4,"ngIf","ngIfElse"],["routerLinkActive","active","class","nav-item me-6",4,"ngFor","ngForOf"],["routerLinkActive","active",1,"nav-item","me-6"],[4,"ngxPermissionsOnly"],[1,"nav-link","nav-link-arrow","mb-0",3,"routerLink","title"]],template:function(r,k){if(r&1&&(s(0,"ul",1),a(1,L,2,1,"ng-container",2)(2,w,1,1,"ng-template",null,0,C),m()),r&2){let h=T(3);n(),o("ngIf",k.usePermissions)("ngIfElse",h)}},dependencies:[b,y,S,E,M]});let e=t;return e})(),J=(()=>{let t=class t{};t.\u0275fac=function(r){return new(r||t)},t.\u0275mod=x({type:t}),t.\u0275inj=v({imports:[I,N,O,P.forChild()]});let e=t;return e})();export{H as a,J as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as G}from"./chunk-
|
|
1
|
+
import{b as G}from"./chunk-GSSZWMCP.js";import{a as J}from"./chunk-NSM4JDXS.js";import"./chunk-XDNW2F3I.js";import{a as V,b as $}from"./chunk-DEH6NGKQ.js";import"./chunk-5ZUWMFL5.js";import"./chunk-TDHJ34QP.js";import"./chunk-INNTQ5YN.js";import"./chunk-DT3B54LD.js";import"./chunk-K3G6FMDF.js";import{C as z,D as j}from"./chunk-ZKBLXGXT.js";import"./chunk-6B64VOO7.js";import{c as N,h as O,k as H,u as q}from"./chunk-SP6QPE3M.js";import{$a as b,Ab as a,Cb as y,Eb as f,Fb as _,Gb as v,Ia as r,Ib as w,Ja as M,Jb as F,Kb as E,Q as I,Rb as d,Sb as g,Tb as C,Wa as P,Ya as u,Yc as W,_c as k,fb as n,gb as i,ha as L,kc as A,ob as S,oc as T,pc as B,q as h,rc as R,sc as D}from"./chunk-6DRNAUKE.js";import"./chunk-GRMIXZTT.js";var K=()=>["/menu/log/inventory-async/detail"],Q=l=>({ID:l});function U(l,s){if(l&1&&(n(0,"tr")(1,"td")(2,"a",14),a(3),d(4,"date"),i()(),n(5,"td"),a(6),d(7,"number"),i(),n(8,"td")(9,"span",15),a(10),i()()()),l&2){let t=s.$implicit;r(2),u("routerLink",F(13,K))("queryParams",E(14,Q,t._id)),r(),y(" ",C(4,7,t==null?null:t._source["@timestamp"],"dd MMM yyyy HH:mm:ss")," "),r(3),y(" ",C(7,10,t.DurationInSecond,"1.1-1")," s "),r(3),b((t==null||t._source==null||t._source.log==null?null:t._source.log.respCode)===200||(t==null||t._source==null||t._source.log==null?null:t._source.log.respCode)===202?"bg-success":"bg-warning"),r(),y(" ",t==null||t._source==null||t._source.log==null?null:t._source.log.respCode," ")}}var me=(()=>{let s=class s{constructor(p){this.inventoryAsyncServiceLog=p,this.filters={PageNumber:1,RowCount:100,From:null,To:null,StatusCode:""}}ngOnInit(){this.initInventoryLog()}initInventoryLog(){let p=this.inventoryAsyncServiceLog.getInventoryAsyncLog(this.filters).pipe(I(1));this.inventoryLog$=p.pipe(h(m=>m?.hits)),this.totalPagination$=p.pipe(h(m=>m?.total.value))}onPaginationChange(p){this.filters.PageNumber=p.pageIndex+1,this.initInventoryLog()}onSubmitFilter(){this.initInventoryLog()}};s.\u0275fac=function(m){return new(m||s)(M(J))},s.\u0275cmp=L({type:s,selectors:[["app-inventory-async-log"]],standalone:!0,features:[w],decls:33,vars:16,consts:[["headerTitle","Async Inventory",3,"onSubmit","hideSearchBox"],["container",""],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"mt-5"],["type","text","name","StatusCode",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col"],[1,"table-responsive"],[1,"table","table-hover"],[1,"table-light"],[4,"ngFor","ngForOf"],[3,"page","length","pageSize","pageIndex"],[3,"routerLink","queryParams"],[1,"text-white","p-2","rounded","response-desc"]],template:function(m,e){m&1&&(n(0,"mainpanel",0),S("onSubmit",function(){return e.onSubmitFilter()}),n(1,"filters")(2,"div",1)(3,"div")(4,"label"),a(5,"From/To"),i(),n(6,"datepicker",2),v("dateChange",function(o){return _(e.filters.From,o)||(e.filters.From=o),o}),i(),n(7,"datepicker",3),v("dateChange",function(o){return _(e.filters.To,o)||(e.filters.To=o),o}),i()(),n(8,"div",4)(9,"label"),a(10,"Response Code"),i(),n(11,"input",5),v("ngModelChange",function(o){return _(e.filters.StatusCode,o)||(e.filters.StatusCode=o),o}),i()()()(),n(12,"content")(13,"div",6)(14,"div",7)(15,"div",8)(16,"div",9)(17,"table",10)(18,"thead")(19,"tr",11)(20,"th"),a(21,"Created"),i(),n(22,"th"),a(23,"Duration"),i(),n(24,"th"),a(25,"Response code"),i()()(),n(26,"tbody"),P(27,U,11,16,"tr",12),d(28,"async"),i()(),n(29,"mat-paginator",13),d(30,"async"),d(31,"async"),d(32,"async"),S("page",function(o){return e.onPaginationChange(o)}),i()()()()()()()),m&2&&(u("hideSearchBox",!0),r(6),f("date",e.filters.From),r(),f("date",e.filters.To),r(4),f("ngModel",e.filters.StatusCode),r(16),u("ngForOf",g(28,8,e.inventoryLog$)),r(2),u("length",g(30,10,e.totalPagination$))("pageSize",e.filters.RowCount>g(31,12,e.totalPagination$)?g(32,14,e.totalPagination$):e.filters.RowCount)("pageIndex",(e.filters==null?null:e.filters.PageNumber)==0?0:(e.filters==null?null:e.filters.PageNumber)-1))},dependencies:[q,N,O,H,D,A,T,R,B,j,z,$,V,G,k,W]});let l=s;return l})();export{me as InventoryAsyncLogComponent};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as N,b as De,c as ke,d as re,e as se}from"./chunk-WYTSEICB.js";import{a as Ve}from"./chunk-HTJWR537.js";import"./chunk-BMZAGAK3.js";import{a as Fe,b as Ne}from"./chunk-N4S3Q3EC.js";import"./chunk-662E5VTA.js";import{a as le}from"./chunk-KBYAFLE5.js";import{a as oe}from"./chunk-U5YOE633.js";import"./chunk-INNTQ5YN.js";import{a as Me,b as Ee}from"./chunk-NHGAULCC.js";import{a as Pe}from"./chunk-MYMGWQRE.js";import"./chunk-DT3B54LD.js";import{a as Se,b as ve,d as ye,e as be}from"./chunk-AL67KXJV.js";import{a as ce}from"./chunk-GPQQ6FGZ.js";import{g as te}from"./chunk-6EMD4N72.js";import{b as K,e as Y}from"./chunk-K3G6FMDF.js";import"./chunk-JM3LERUP.js";import{B as we,C as ae,D as Te,q as ne,r as Ie,u as ie}from"./chunk-O4MUVGWL.js";import"./chunk-6B64VOO7.js";import{b as fe,c as Z,h as q,k as X,m as ee,u as xe}from"./chunk-SP6QPE3M.js";import{c as F}from"./chunk-6F6NSBIF.js";import{Ab as m,B as O,Bb as D,Cb as w,Db as _e,Eb as T,Fb as M,Gb as E,Ha as R,Ia as r,Ja as y,Kb as $,Rb as g,Sb as f,Tb as j,Ub as A,Wa as u,Wc as Ce,X as B,Ya as c,_c as J,aa as W,fb as l,gb as s,ha as k,hb as x,ia as U,ib as b,ic as ue,jb as I,kc as ge,lb as v,lc as z,ob as S,oc as Q,pa as d,pc as he,q as me,qa as _,qb as p,rc as H,sc as G,tb as de,zb as L}from"./chunk-6DRNAUKE.js";import"./chunk-GRMIXZTT.js";var Re=(()=>{let o=class o{constructor(){this.inventoryTabs=[{Title:"Single Channel Comparison",Url:"/menu/inventory/bychannel"},{Title:"Multi Channel Comparison",Url:"/menu/inventory/pos"}]}};o.\u0275fac=function(e){return new(e||o)},o.\u0275cmp=k({type:o,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,a){e&1&&(l(0,"nav",0)(1,"div",1)(2,"div"),x(3,"nav-tab",2),s()()(),x(4,"router-outlet")),e&2&&(r(3),c("Tabs",a.inventoryTabs))},dependencies:[Ce,Me]});let i=o;return i})();function Ze(i,o){if(i&1){let t=v();l(0,"button",21),S("click",function(){d(t);let e=p().ngIf,a=p(2);return _(a.onUpdateItems(e))}),x(1,"i",22),m(2," Update "),s()}}function qe(i,o){if(i&1&&(l(0,"actions")(1,"div",19),u(2,Ze,3,0,"button",20),s()()),i&2){let t=o.ngIf,n=p(2);r(2),c("ngIf",n.productService.hasSelectionVariant(t))}}function Xe(i,o){if(i&1){let t=v();l(0,"app-table",23),S("onToggle",function(e){d(t);let a=p(2);return _(a.onShowDifferenceStock(e))})("onSubmit",function(e){let a=d(t).ngIf,h=p(2);return _(h.updateStockByVariant(e,a))}),s()}if(i&2){let t=o.ngIf,n=p(2);c("data",t)("channel",n.channelOptions)("showProductToggle",!0)("filter",n.searchFilter)}}function et(i,o){if(i&1){let t=v();l(0,"span",24),S("click",function(){d(t);let e=p(2);return _(e.getRowCount())}),l(1,"i",25),m(2,"?"),s()()}}function tt(i,o){if(i&1&&(l(0,"span"),m(1),g(2,"number"),s()),i&2){let t=o.ngIf;r(),D(f(2,1,t))}}function nt(i,o){if(i&1){let t=v();l(0,"a",26),S("click",function(){d(t);let e=p(2);return _(e.nextPage())}),x(1,"i",27),m(2," Next"),s()}}function it(i,o){if(i&1){let t=v();l(0,"a",28),S("click",function(){d(t);let e=p(2);return _(e.getAllData())}),x(1,"i",29),m(2," Last"),s()}}function at(i,o){if(i&1){let t=v();l(0,"mainpanel",1),S("onSubmit",function(e){d(t);let a=p();return _(a.onSearch(e))}),u(1,qe,3,1,"actions",2),g(2,"async"),l(3,"filters")(4,"div")(5,"label",3),m(6,"PageNumber"),s(),l(7,"input",4),E("ngModelChange",function(e){d(t);let a=p();return M(a.searchFilter.PageNumber,e)||(a.searchFilter.PageNumber=e),_(e)}),s()(),l(8,"div",5)(9,"label",6),m(10,"Page Size"),s(),l(11,"input",7),E("ngModelChange",function(e){d(t);let a=p();return M(a.searchFilter.RowCount,e)||(a.searchFilter.RowCount=e),_(e)}),s()()(),l(12,"content")(13,"div",8)(14,"div",9)(15,"div",10),u(16,Xe,1,4,"app-table",11),g(17,"async"),b(18),l(19,"div",12)(20,"div",13)(21,"div",14),m(22),g(23,"async"),g(24,"number"),u(25,et,3,0,"span",15)(26,tt,3,3,"span",2),g(27,"async"),m(28),s()(),l(29,"div",16),u(30,nt,3,0,"a",17)(31,it,3,0,"a",18),s()(),I(),s()()()()()}if(i&2){let t,n=p();c("pageData",n.pageData)("hideSearchBox",!1)("textButton","Search"),r(),c("ngIf",f(2,13,n.paginationService.data$)),r(6),T("ngModel",n.searchFilter.PageNumber),r(4),T("ngModel",n.searchFilter.RowCount),r(5),c("ngIf",f(17,15,n.paginationService.data$)),r(6),w(" Showing 1 - ",f(24,19,(t=f(23,17,n.paginationService.data$))==null?null:t.length)," of "),r(3),c("ngIf",n.paginationService.hideCount),r(),c("ngIf",f(27,21,!n.paginationService.hideCount&&n.allDataCount$)),r(2),w(" records ~ ",n.paginationService.footerPageNumber," Page "),r(2),c("ngIf",n.paginationService.disableNextButton&&!n.paginationService.goToLastPage),r(),c("ngIf",n.paginationService.disableNextButton&&!n.paginationService.goToLastPage)}}var Be=(()=>{let o=class o{constructor(n,e,a,h,C,P){this.http=n,this.toastr=e,this.dialog=a,this.paginationService=h,this.productService=C,this.authService=P,this.loaderEndpoint="InventoryLoader/GetMultipleInventoryComparison",this.dataEndpoint="Inventory/GetMultipleChannelComparison",this.allDataCountEndpoint="Inventory/GetMultipleChannelComparisonRowCount",this.filterTypeOptions=[{Key:1,Value:"All"},{Key:3,Value:"Difference"}],this.pageData={Title:"Inventory",Nav:[{Title:"Inventory Cache",Url:"/menu/inventory/pos",Active:!0},{Title:"Inventory Realtime",Url:"/menu/inventory/realtime",Active:!1}]},this.channelOptions=this.authService.getChannels()}ngOnInit(){this.initPageLoader()}initPageLoader(){this.paginationService.fetchDataEndpoint=this.dataEndpoint,this.loader$=this.http.post(`/API/${this.loaderEndpoint}`,{}).pipe(B(n=>{n.Filter={PageNumber:n.Filter.PageNumber,filterModel:N.ALL,RowCount:n.Filter.PageSize,HiddenIPOSInventory:n.Filter.HiddenIPOSInventory},this.searchFilter=n.Filter,this.paginationService.reloadPagination(this.searchFilter)}))}onSearch(n){this.searchFilter.text=n,this.paginationService.reloadPagination(this.searchFilter)}updateStock(n,e){let a=this.productService.selectedVariantProduct(n);if(a.length>0){let C=a.map(V=>({ID:V.ID,Code:V.Code,Inventory:V.Inventory}));var h=e.filter(V=>V.selected).map(V=>V.ID);let P={ListChannelID:h,List:C};this.http.post("/api/Inventory/UpdateChannel",P).subscribe(V=>{this.paginationService.reloadPagination(this.searchFilter),this.toastr.success("Successfully updated "+P.List.length+" variants in "+P.ListChannelID.length+" channels","Success")})}}updateStockByVariant(n,e){let a={ID:n.ChannelID,ChannelItemID:n.ChannelItemID,ChannelVariantID:n.ChannelVariationID,NewQuantity:parseFloat(n.Inventory),VariantID:n.ID,SKU:n.Sku};this.http.post("/api/Inventory/UpdateQuantityByItem",a).subscribe(h=>{let C=this.productService.findChannelById(a.ID,this.channelOptions);this.toastr.success("Successfully updated "+n.ItemName+"("+n.VarName+") inventory in "+C.Name+" to "+a.NewQuantity,"Success")})}onShowDifferenceStock(n){n?this.searchFilter.filterModel=N.DIFFERENCE:this.searchFilter.filterModel=N.ALL,this.paginationService.reloadPagination(this.searchFilter)}onUpdateItems(n){let e=this.productService.selectedVariantProduct(n);this.dialog.open(Ve,{data:{selectedItems:e,channels:JSON.parse(JSON.stringify(this.channelOptions))},width:"600px"}).afterClosed().pipe(O(a=>F.IsNotEmpty(a))).subscribe(a=>{this.updateStock(n,a)})}getRowCount(){this.paginationService.hideCount=!1;let n={text:this.searchFilter.text};this.allDataCount$=this.http.post(`/API/${this.allDataCountEndpoint}`,n)}nextPage(){this.paginationService.onNextPage(this.searchFilter)}getAllData(){this.http.post(`/API/${this.allDataCountEndpoint}`,{}).subscribe({next:n=>{this.searchFilter.PageNumber=1,this.paginationService.getAllData(this.searchFilter,n)}})}ngOnDestroy(){this.paginationService.destroy()}};o.\u0275fac=function(e){return new(e||o)(y(Y),y(K),y(ie),y(le),y(oe),y(te))},o.\u0275cmp=k({type:o,selectors:[["app-multi-channel-comparison"]],decls:2,vars:3,consts:[["headerTitle","Inventory Comparison",3,"pageData","hideSearchBox","textButton","onSubmit",4,"ngIf"],["headerTitle","Inventory Comparison",3,"onSubmit","pageData","hideSearchBox","textButton"],[4,"ngIf"],["for","PageNumber",1,"fw-bold"],["type","number","id","PageNumber","placeholder","PageNumber","name","PageNumber","data-toggle","tooltip","matTooltip","Page Number",1,"form-control","mt-2",3,"ngModelChange","ngModel"],[1,"mt-5"],["for","RowCount",1,"fw-bold"],["type","number","id","RowCount","placeholder","Page Size","name","RowCount","data-toggle","tooltip","matTooltip","Page Size",1,"form-control","mt-2",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],["table","inventory",3,"data","channel","showProductToggle","filter","onToggle","onSubmit",4,"ngIf"],[1,"d-flex","justify-content-between","mt-5"],[1,"me-auto","d-sm-block","collapse","mt-3"],[1,"font-weight-bold","font-italic","hidden-xxs"],["style","cursor: pointer",3,"click",4,"ngIf"],[1,"btn-group"],["role","button","class","btn btn-outline-secondary btn-sm text-primary","title","Load more for 20 products",3,"click",4,"ngIf"],["role","button","class","btn btn-outline-secondary btn-sm text-primary border-start-0","title","Load all products",3,"click",4,"ngIf"],[1,"d-flex"],["type","button","class","btn btn-success shadow-sm rounded me-3",3,"click",4,"ngIf"],["type","button",1,"btn","btn-success","shadow-sm","rounded","me-3",3,"click"],[1,"fas","fa-chevron-circle-up"],["table","inventory",3,"onToggle","onSubmit","data","channel","showProductToggle","filter"],[2,"cursor","pointer",3,"click"],["title","Retreive rows count",1,"border","p-3"],["role","button","title","Load more for 20 products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-arrow-right"],["role","button","title","Load all products",1,"btn","btn-outline-secondary","btn-sm","text-primary","border-start-0",3,"click"],[1,"fas","fa-share"]],template:function(e,a){e&1&&(u(0,at,32,23,"mainpanel",0),g(1,"async")),e&2&&c("ngIf",f(1,1,a.loader$))},dependencies:[z,Z,ee,q,X,ae,re,ne,Q,H],styles:[".no-bullet[_ngcontent-%COMP%]{list-style-type:none}"]});let i=o;return i})();var ot=i=>({"text-decoration-line-through":i}),lt=i=>({"ms-10":i}),rt=i=>({"bg-gradient-warning":i});function st(i,o){if(i&1){let t=v();l(0,"button",43),S("click",function(){d(t);let e=p().ngIf,a=p(2);return _(a.updateStock(e))}),x(1,"i",44),m(2," Update"),s()}}function pt(i,o){if(i&1&&(l(0,"div"),u(1,st,3,0,"button",42),s()),i&2){let t=o.ngIf,n=p(2);r(),c("ngIf",n.productService.hasSelectionVariant(t))}}function ct(i,o){if(i&1&&(l(0,"span",45),x(1,"img",46),s(),m(2)),i&2){let t=o.item;r(),c("src",t==null?null:t.Img,R),r(),w(" ",t.Name," ")}}function mt(i,o){i&1&&(l(0,"div",47)(1,"span"),m(2," showing only different stock, please press next to populate more data "),s()())}function dt(i,o){if(i&1){let t=v();l(0,"th")(1,"input",48),E("ngModelChange",function(e){d(t);let a=p(2);return M(a.checkboxState,e)||(a.checkboxState=e),_(e)}),S("ngModelChange",function(){let e=d(t).ngIf,a=p(2);return _(a.onCheckboxStateChange(e))}),s()()}if(i&2){let t=p(2);r(),T("ngModel",t.checkboxState)}}function _t(i,o){i&1&&(b(0),l(1,"th",49),m(2," Reserved "),s(),I())}function ut(i,o){if(i&1){let t=v();b(0),l(1,"input",62),E("ngModelChange",function(e){d(t);let a=p(3).$implicit;return M(a.selected,e)||(a.selected=e),_(e)}),S("ngModelChange",function(){d(t);let e=p(3).$implicit,a=p(2);return _(a.onCheckboxStateProduct(e))}),s(),I()}if(i&2){let t=p(3).$implicit;r(),T("ngModel",t.selected)}}function gt(i,o){if(i&1){let t=v();b(0),l(1,"img",63),S("click",function(e){d(t);let a=p(3).$implicit,h=p(2);return _(h.onZoomImage(e,a==null?null:a.ImageUrl))}),s(),I()}if(i&2){let t=p(3).$implicit;r(),de("src",t==null?null:t.ThumbnailUrl,R)}}function ht(i,o){i&1&&x(0,"img",64)}function Ct(i,o){if(i&1&&(b(0),x(1,"br"),l(2,"div",65),x(3,"i",66),l(4,"small"),m(5),s()(),I()),i&2){let t=p(3).$implicit;r(5),w("(",t==null?null:t.Category,")")}}function ft(i,o){if(i&1&&(b(0),l(1,"td",59)(2,"div",17),u(3,ut,2,1,"ng-container",7),l(4,"div",53),u(5,gt,2,1,"ng-container",55)(6,ht,1,0,"ng-template",null,2,A),s()()(),l(8,"td",60)(9,"span",61),m(10),s(),u(11,Ct,6,1,"ng-container",7),s(),I()),i&2){let t=L(7),n=p(2).$implicit,e=p(2);r(),c("rowSpan",n==null?null:n.Variants.length),r(2),c("ngIf",n.Variants.length>1),r(),c("ngClass",$(8,lt,n.Variants.length<=1)),r(),c("ngIf",n==null?null:n.ThumbnailUrl)("ngIfElse",t),r(3),c("rowSpan",n==null?null:n.Variants.length),r(2),D(n==null?null:n.Name),r(),c("ngIf",n.CategoryID!==null&&n.CategoryID!=e.guidEmpty)}}function xt(i,o){if(i&1){let t=v();b(0),l(1,"input",48),E("ngModelChange",function(e){d(t);let a=p(2).$implicit;return M(a.selected,e)||(a.selected=e),_(e)}),s(),I()}if(i&2){let t=p(2).$implicit;r(),T("ngModel",t.selected)}}function St(i,o){if(i&1&&(b(0),u(1,xt,2,1,"ng-container",7),I()),i&2){let t=p().$implicit;r(),c("ngIf",(t==null?null:t.Inventory)<=1e5)}}function vt(i,o){if(i&1){let t=v();l(0,"input",48),E("ngModelChange",function(e){d(t);let a=p(2).$implicit;return M(a.selected,e)||(a.selected=e),_(e)}),s()}if(i&2){let t=p(2).$implicit;T("ngModel",t.selected)}}function yt(i,o){if(i&1&&u(0,vt,1,1,"input",67),i&2){let t=p().$implicit;c("ngIf",(t==null?null:t.Inventory)>=0)}}function bt(i,o){i&1&&(l(0,"div",68),m(1,"Not Found"),s())}function It(i,o){if(i&1&&(l(0,"div")(1,"span",69),m(2),g(3,"number"),s(),m(4," => "),l(5,"span",70),m(6),g(7,"number"),s()()),i&2){let t=p().$implicit;r(2),w(" ",f(3,2,t==null||t.I==null?null:t.I.Available),""),r(4),D(f(7,4,t==null?null:t.Inventory))}}function wt(i,o){if(i&1&&(l(0,"div"),m(1),g(2,"number"),s()),i&2){let t=p().$implicit;r(),w(" ",f(2,1,t==null?null:t.Inventory)," ")}}function Tt(i,o){if(i&1&&(b(0),l(1,"div",71)(2,"a",72),x(3,"i",73),s()(),I()),i&2){let t=p().$implicit,n=p(3);r(2),c("href",n.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(t==null?null:t.ID),R)}}function Mt(i,o){if(i&1){let t=v();l(0,"td",74)(1,"div",52)(2,"div")(3,"span",75),S("click",function(){d(t);let e=p().$implicit,a=p(),h=a.$implicit,C=a.ngForOf,P=p(2);return _(P.openTableDialog(h,e,C))}),m(4),g(5,"number"),s()(),l(6,"div",71)(7,"a",72),x(8,"i",73),s()(),l(9,"div",71)(10,"span",76),S("click",function(){d(t);let e=p().$implicit,a=p(3);return _(a.refreshInventory(e==null||e.Channel[0]==null?null:e.Channel[0].ChannelItemID,e==null||e.Channel[0]==null?null:e.Channel[0].ChannelVariationID,e==null||e.Channel[0]==null?null:e.Channel[0].ChannelID,e==null?null:e.ID))}),x(11,"i",77),s()()()()}if(i&2){let t=p().$implicit;c("ngClass",$(5,rt,(t==null?null:t.Inventory)!=(t==null||t.Channel[0]==null?null:t.Channel[0].Inventory))),r(4),w(" ",f(5,3,t==null||t.Channel[0]==null?null:t.Channel[0].Inventory)," "),r(3),c("href",t==null||t.Channel[0]==null?null:t.Channel[0].Url,R)}}function Et(i,o){if(i&1&&(b(0),l(1,"span",79),m(2),g(3,"number"),s(),I()),i&2){let t=p(2).$implicit;r(2),w(" (",f(3,1,t==null||t.Channel[0]==null?null:t.Channel[0].InventoryReserved),") ")}}function Pt(i,o){i&1&&m(0," - ")}function Vt(i,o){if(i&1&&(b(0),l(1,"td",78),u(2,Et,4,3,"ng-container",55)(3,Pt,1,0,"ng-template",null,3,A),s(),I()),i&2){let t=L(4),n=p().$implicit;r(2),c("ngIf",n==null||n.Channel[0]==null?null:n.Channel[0].InventoryReserved)("ngIfElse",t)}}function Dt(i,o){i&1&&(b(0),m(1," - "),I())}function Ft(i,o){if(i&1&&(l(0,"span",80),g(1,"date"),m(2),g(3,"date"),s()),i&2){let t=p().$implicit;c("matTooltip",j(1,2,t==null||t.Channel[0]==null?null:t.Channel[0].LastInventorySync,"dd MMMM yyyy HH:mm:ss")),r(2),w(" ",j(3,5,t==null||t.Channel[0]==null?null:t.Channel[0].LastInventorySync,"dd MMM yy HH:mm")," ")}}function Nt(i,o){if(i&1&&(l(0,"tr"),u(1,ft,12,10,"ng-container",7),l(2,"td",50),m(3),s(),l(4,"td",51)(5,"div",52)(6,"span",53),m(7),s()()(),l(8,"td",54),u(9,St,2,1,"ng-container",55)(10,yt,1,1,"ng-template",null,0,A),s(),l(12,"td")(13,"div",52),u(14,bt,2,0,"div",56)(15,It,8,6,"div",7)(16,wt,3,3,"div",7)(17,Tt,4,1,"ng-container",7),s()(),u(18,Mt,12,7,"td",57)(19,Vt,5,2,"ng-container",7),l(20,"td",58),u(21,Dt,2,0,"ng-container",55)(22,Ft,4,8,"ng-template",null,1,A),s()()),i&2){let t=o.$implicit,n=o.index,e=L(11),a=L(23),h=p(3);r(),c("ngIf",n==0),r(2),D(t==null?null:t.Model),r(),c("matTooltip",t.isDiscontinued?h.discontinuedVariantMsg:""),r(2),c("ngClass",$(15,ot,t.isDiscontinued)),r(),D(t==null?null:t.Code),r(2),c("ngIf",(t==null?null:t.Channel[0].TypeID)==1)("ngIfElse",e),r(5),c("ngIf",(t==null?null:t.I)==null),r(),c("ngIf",(t==null?null:t.I)!=null&&(t==null?null:t.Inventory)!=(t==null||t.I==null?null:t.I.Available)),r(),c("ngIf",(t==null?null:t.I)!=null&&(t==null?null:t.Inventory)==(t==null||t.I==null?null:t.I.Available)),r(),c("ngIf",(t==null?null:t.I)!=null),r(),c("ngIf",t==null?null:t.Channel),r(),c("ngIf",h.isShowReservedColumn),r(2),c("ngIf",(t==null||t.Channel[0]==null?null:t.Channel[0].LastInventorySync)==h.minDate)("ngIfElse",a)}}function kt(i,o){if(i&1&&(l(0,"tbody"),u(1,Nt,24,17,"tr",36),s()),i&2){let t=o.$implicit;r(),c("ngForOf",t.Variants)}}function Rt(i,o){if(i&1){let t=v();l(0,"span",81),S("click",function(){d(t);let e=p(2);return _(e.getRowCount())}),l(1,"i",82),m(2,"?"),s()()}}function Bt(i,o){if(i&1&&(l(0,"span"),m(1),g(2,"number"),s()),i&2){let t=o.ngIf;r(),D(f(2,1,t==null?null:t.Total))}}function Lt(i,o){if(i&1){let t=v();l(0,"a",86),S("click",function(){d(t);let e=p(3);return _(e.onNextPage())}),x(1,"i",87),m(2," Next"),s()}}function At(i,o){if(i&1){let t=v();l(0,"a",88),S("click",function(){d(t);let e=p(3);return _(e.onLastPage())}),x(1,"i",89),m(2," Last"),s()}}function Ot(i,o){if(i&1&&(l(0,"div",83),u(1,Lt,3,0,"a",84)(2,At,3,0,"a",85),s()),i&2){let t=p(2);r(),c("ngIf",t.paginationService.disableNextButton&&!t.paginationService.goToLastPage),r(),c("ngIf",t.paginationService.disableNextButton&&!t.paginationService.goToLastPage)}}function Wt(i,o){if(i&1){let t=v();l(0,"mainpanel",5),S("onSubmit",function(e){d(t);let a=p();return _(a.onSearch(e))}),l(1,"actions")(2,"div",6),u(3,pt,2,1,"div",7),g(4,"async"),s()(),l(5,"filters")(6,"div")(7,"label",8),m(8,"Channel"),s(),l(9,"ng-select",9),E("ngModelChange",function(e){d(t);let a=p();return M(a.searchFilter.ChannelID,e)||(a.searchFilter.ChannelID=e),_(e)}),u(10,ct,3,2,"ng-template",10),s()(),l(11,"div",11)(12,"label",12),m(13,"PageNumber"),s(),l(14,"input",13),E("ngModelChange",function(e){d(t);let a=p();return M(a.searchFilter.PageNumber,e)||(a.searchFilter.PageNumber=e),_(e)}),s()(),l(15,"div",11)(16,"label",14),m(17,"Page Size"),s(),l(18,"input",15),E("ngModelChange",function(e){d(t);let a=p();return M(a.searchFilter.RowCount,e)||(a.searchFilter.RowCount=e),_(e)}),s()(),l(19,"div",11)(20,"label",16),m(21,"Quantity From - To"),s(),l(22,"div",17)(23,"input",18),E("ngModelChange",function(e){d(t);let a=p();return M(a.searchFilter.QuantityFrom,e)||(a.searchFilter.QuantityFrom=e),_(e)}),s(),m(24," - "),l(25,"input",19),E("ngModelChange",function(e){d(t);let a=p();return M(a.searchFilter.QuantityTo,e)||(a.searchFilter.QuantityTo=e),_(e)}),s()()()(),l(26,"content")(27,"div",20)(28,"div",21)(29,"div",22),u(30,mt,3,0,"div",23),l(31,"table",24)(32,"thead",25)(33,"tr")(34,"th",26),m(35,"Product "),x(36,"br"),l(37,"mat-slide-toggle",27),S("toggleChange",function(){d(t);let e=p();return e.showDifferenceStock=!e.showDifferenceStock,_(e.onShowDifferenceStock())}),l(38,"small",16),m(39,"FILTER DIFFERENT INVENTORY"),s()()(),l(40,"th",28),m(41,"Variant"),s(),l(42,"th",29),m(43,"SKU"),s(),u(44,dt,2,1,"th",7),g(45,"async"),l(46,"th",30),m(47,"POS"),s(),l(48,"th",31)(49,"div",32),S("click",function(){d(t);let e=p();return _(e.openModalFilter())}),x(50,"img",33),l(51,"span",34),m(52),g(53,"stringLimit"),s()()(),u(54,_t,3,0,"ng-container",7),l(55,"th",35),m(56,"Last Sync"),s()()(),u(57,kt,2,1,"tbody",36),g(58,"async"),s(),l(59,"div",37)(60,"div",38)(61,"div",39),m(62),g(63,"async"),g(64,"number"),u(65,Rt,3,0,"span",40)(66,Bt,3,3,"span",7),g(67,"async"),m(68),s()(),u(69,Ot,3,2,"div",41),g(70,"async"),s()()()()()()}if(i&2){let t,n,e=p();c("headerTitle","Inventory Comparison")("pageData",e.pageData)("hideSearchBox",!1),r(3),c("ngIf",f(4,24,e.paginationService.data$)),r(6),c("clearable",!1)("items",e.channelOptions),T("ngModel",e.searchFilter.ChannelID),r(5),T("ngModel",e.searchFilter.PageNumber),r(4),T("ngModel",e.searchFilter.RowCount),r(5),T("ngModel",e.searchFilter.QuantityFrom),r(2),T("ngModel",e.searchFilter.QuantityTo),r(5),c("ngIf",(e.searchFilter==null?null:e.searchFilter.filterModel)==3),r(14),c("ngIf",f(45,26,e.paginationService.data$)),r(5),c("matTooltip",(e.selectedChannel==null||e.selectedChannel.Name==null?null:e.selectedChannel.Name.length)>13?e.selectedChannel==null?null:e.selectedChannel.Name:""),r(),c("src",e.selectedChannel==null?null:e.selectedChannel.Img,R),r(2),_e(" ",j(53,28,e.selectedChannel==null?null:e.selectedChannel.Name,13),"",(e.selectedChannel==null||e.selectedChannel.Name==null?null:e.selectedChannel.Name.length)>13?"...":""," "),r(2),c("ngIf",e.isShowReservedColumn),r(3),c("ngForOf",f(58,31,e.products$)),r(5),w(" Showing 1 - ",f(64,35,(t=f(63,33,e.paginationService.data$))==null?null:t.length)," of "),r(3),c("ngIf",e.paginationService.hideCount),r(),c("ngIf",f(67,37,!e.paginationService.hideCount&&e.rowCount$)),r(2),w(" records ~ ",e.paginationService.footerPageNumber," Page "),r(),c("ngIf",((n=f(70,39,e.paginationService.data$))==null?null:n.length)>0)}}var Le=(()=>{let o=class o{constructor(n,e,a,h,C,P,V,Oe,We){this.http=n,this.toastr=e,this.dialog=a,this.paginationService=h,this.productService=C,this.authService=P,this.biggerPictureService=V,this.inventoryService=Oe,this.mainPanelService=We,this.checkboxState=!1,this.showDifferenceStock=!1,this.loaderApi="/api/InventoryLoader/Load",this.rowCountApi="/api/Inventory/GetInventoryByChannelRowCount",this.minDate=F.MinDate,this.isShowReservedColumn=!0,this.discontinuedVariantMsg="This Variant is discontinued from POS, you must Non Active manually at the seller center so that it is not sold again on the channel.",this.guidEmpty=F.GuidEMpty,this.Options=[{Key:1,Value:"All"},{Key:3,Value:"Difference"}],this.pageData={Title:"Inventory Realtime",Nav:[{Title:"Inventory Cache",Url:"/menu/inventory",Active:!1},{Title:"Inventory Realtime",Url:"/menu/inventory/realtime",Active:!0}]}}ngOnInit(){this.channelOptions=this.authService.getChannels(),this.hostName=this.authService.getDomain(),this.initPageLoader(),this.products$=this.paginationService.data$.pipe(me(n=>(n=n.map(e=>(e.Variants&&(e.Variants=e.Variants.map(a=>(a.isDiscontinued=e.Discontinued=="Yes",a))),e)),n)),B(n=>{this.checkShowReservedColumn(n)}))}checkShowReservedColumn(n){let e=0,a;n.forEach(h=>{a=h.Variants.find(C=>F.IsNotEmpty(C?.Channel[0]?.InventoryReserved)),a&&(e+=1)}),this.isShowReservedColumn=e>0}initPageLoader(){this.paginationService.fetchDataEndpoint="Inventory/GetSingleChannelComparison",this.loader$=this.http.post(this.loaderApi,{}).pipe(B(n=>{this.searchFilter={RowCount:n.Filter.PageSize,filterModel:1,PageNumber:1,ChannelID:n.Filter.ChannelID},this.initSelectedChannel(),this.paginationService.reloadPagination(this.searchFilter),n.Filter.IsMarketplaceAppActive||this.toastr.warning(`Automatic inventory sync disabled.
|
|
1
|
+
import{a as N,b as De,c as ke,d as re,e as se}from"./chunk-IPGAIBF6.js";import{a as Ve}from"./chunk-WQ7LUTQ2.js";import"./chunk-BMZAGAK3.js";import{a as Fe,b as Ne}from"./chunk-N4S3Q3EC.js";import"./chunk-662E5VTA.js";import{a as le}from"./chunk-KBYAFLE5.js";import{a as oe}from"./chunk-U5YOE633.js";import"./chunk-INNTQ5YN.js";import{a as Me,b as Ee}from"./chunk-SRYGE2HW.js";import{a as Pe}from"./chunk-MYMGWQRE.js";import"./chunk-DT3B54LD.js";import{a as Se,b as ve,d as ye,e as be}from"./chunk-AL67KXJV.js";import{a as ce}from"./chunk-3LQ5TKLD.js";import{g as te}from"./chunk-OHTJCLX7.js";import{b as K,e as Y}from"./chunk-K3G6FMDF.js";import"./chunk-JM3LERUP.js";import{B as we,C as ae,D as Te,q as ne,r as Ie,u as ie}from"./chunk-ZKBLXGXT.js";import"./chunk-6B64VOO7.js";import{b as fe,c as Z,h as q,k as X,m as ee,u as xe}from"./chunk-SP6QPE3M.js";import{c as F}from"./chunk-6F6NSBIF.js";import{Ab as m,B as O,Bb as D,Cb as w,Db as _e,Eb as T,Fb as M,Gb as E,Ha as R,Ia as r,Ja as y,Kb as $,Rb as g,Sb as f,Tb as j,Ub as A,Wa as u,Wc as Ce,X as B,Ya as c,_c as J,aa as W,fb as l,gb as s,ha as k,hb as x,ia as U,ib as b,ic as ue,jb as I,kc as ge,lb as v,lc as z,ob as S,oc as Q,pa as d,pc as he,q as me,qa as _,qb as p,rc as H,sc as G,tb as de,zb as L}from"./chunk-6DRNAUKE.js";import"./chunk-GRMIXZTT.js";var Re=(()=>{let o=class o{constructor(){this.inventoryTabs=[{Title:"Single Channel Comparison",Url:"/menu/inventory/bychannel"},{Title:"Multi Channel Comparison",Url:"/menu/inventory/pos"}]}};o.\u0275fac=function(e){return new(e||o)},o.\u0275cmp=k({type:o,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,a){e&1&&(l(0,"nav",0)(1,"div",1)(2,"div"),x(3,"nav-tab",2),s()()(),x(4,"router-outlet")),e&2&&(r(3),c("Tabs",a.inventoryTabs))},dependencies:[Ce,Me]});let i=o;return i})();function Ze(i,o){if(i&1){let t=v();l(0,"button",21),S("click",function(){d(t);let e=p().ngIf,a=p(2);return _(a.onUpdateItems(e))}),x(1,"i",22),m(2," Update "),s()}}function qe(i,o){if(i&1&&(l(0,"actions")(1,"div",19),u(2,Ze,3,0,"button",20),s()()),i&2){let t=o.ngIf,n=p(2);r(2),c("ngIf",n.productService.hasSelectionVariant(t))}}function Xe(i,o){if(i&1){let t=v();l(0,"app-table",23),S("onToggle",function(e){d(t);let a=p(2);return _(a.onShowDifferenceStock(e))})("onSubmit",function(e){let a=d(t).ngIf,h=p(2);return _(h.updateStockByVariant(e,a))}),s()}if(i&2){let t=o.ngIf,n=p(2);c("data",t)("channel",n.channelOptions)("showProductToggle",!0)("filter",n.searchFilter)}}function et(i,o){if(i&1){let t=v();l(0,"span",24),S("click",function(){d(t);let e=p(2);return _(e.getRowCount())}),l(1,"i",25),m(2,"?"),s()()}}function tt(i,o){if(i&1&&(l(0,"span"),m(1),g(2,"number"),s()),i&2){let t=o.ngIf;r(),D(f(2,1,t))}}function nt(i,o){if(i&1){let t=v();l(0,"a",26),S("click",function(){d(t);let e=p(2);return _(e.nextPage())}),x(1,"i",27),m(2," Next"),s()}}function it(i,o){if(i&1){let t=v();l(0,"a",28),S("click",function(){d(t);let e=p(2);return _(e.getAllData())}),x(1,"i",29),m(2," Last"),s()}}function at(i,o){if(i&1){let t=v();l(0,"mainpanel",1),S("onSubmit",function(e){d(t);let a=p();return _(a.onSearch(e))}),u(1,qe,3,1,"actions",2),g(2,"async"),l(3,"filters")(4,"div")(5,"label",3),m(6,"PageNumber"),s(),l(7,"input",4),E("ngModelChange",function(e){d(t);let a=p();return M(a.searchFilter.PageNumber,e)||(a.searchFilter.PageNumber=e),_(e)}),s()(),l(8,"div",5)(9,"label",6),m(10,"Page Size"),s(),l(11,"input",7),E("ngModelChange",function(e){d(t);let a=p();return M(a.searchFilter.RowCount,e)||(a.searchFilter.RowCount=e),_(e)}),s()()(),l(12,"content")(13,"div",8)(14,"div",9)(15,"div",10),u(16,Xe,1,4,"app-table",11),g(17,"async"),b(18),l(19,"div",12)(20,"div",13)(21,"div",14),m(22),g(23,"async"),g(24,"number"),u(25,et,3,0,"span",15)(26,tt,3,3,"span",2),g(27,"async"),m(28),s()(),l(29,"div",16),u(30,nt,3,0,"a",17)(31,it,3,0,"a",18),s()(),I(),s()()()()()}if(i&2){let t,n=p();c("pageData",n.pageData)("hideSearchBox",!1)("textButton","Search"),r(),c("ngIf",f(2,13,n.paginationService.data$)),r(6),T("ngModel",n.searchFilter.PageNumber),r(4),T("ngModel",n.searchFilter.RowCount),r(5),c("ngIf",f(17,15,n.paginationService.data$)),r(6),w(" Showing 1 - ",f(24,19,(t=f(23,17,n.paginationService.data$))==null?null:t.length)," of "),r(3),c("ngIf",n.paginationService.hideCount),r(),c("ngIf",f(27,21,!n.paginationService.hideCount&&n.allDataCount$)),r(2),w(" records ~ ",n.paginationService.footerPageNumber," Page "),r(2),c("ngIf",n.paginationService.disableNextButton&&!n.paginationService.goToLastPage),r(),c("ngIf",n.paginationService.disableNextButton&&!n.paginationService.goToLastPage)}}var Be=(()=>{let o=class o{constructor(n,e,a,h,C,P){this.http=n,this.toastr=e,this.dialog=a,this.paginationService=h,this.productService=C,this.authService=P,this.loaderEndpoint="InventoryLoader/GetMultipleInventoryComparison",this.dataEndpoint="Inventory/GetMultipleChannelComparison",this.allDataCountEndpoint="Inventory/GetMultipleChannelComparisonRowCount",this.filterTypeOptions=[{Key:1,Value:"All"},{Key:3,Value:"Difference"}],this.pageData={Title:"Inventory",Nav:[{Title:"Inventory Cache",Url:"/menu/inventory/pos",Active:!0},{Title:"Inventory Realtime",Url:"/menu/inventory/realtime",Active:!1}]},this.channelOptions=this.authService.getChannels()}ngOnInit(){this.initPageLoader()}initPageLoader(){this.paginationService.fetchDataEndpoint=this.dataEndpoint,this.loader$=this.http.post(`/API/${this.loaderEndpoint}`,{}).pipe(B(n=>{n.Filter={PageNumber:n.Filter.PageNumber,filterModel:N.ALL,RowCount:n.Filter.PageSize,HiddenIPOSInventory:n.Filter.HiddenIPOSInventory},this.searchFilter=n.Filter,this.paginationService.reloadPagination(this.searchFilter)}))}onSearch(n){this.searchFilter.text=n,this.paginationService.reloadPagination(this.searchFilter)}updateStock(n,e){let a=this.productService.selectedVariantProduct(n);if(a.length>0){let C=a.map(V=>({ID:V.ID,Code:V.Code,Inventory:V.Inventory}));var h=e.filter(V=>V.selected).map(V=>V.ID);let P={ListChannelID:h,List:C};this.http.post("/api/Inventory/UpdateChannel",P).subscribe(V=>{this.paginationService.reloadPagination(this.searchFilter),this.toastr.success("Successfully updated "+P.List.length+" variants in "+P.ListChannelID.length+" channels","Success")})}}updateStockByVariant(n,e){let a={ID:n.ChannelID,ChannelItemID:n.ChannelItemID,ChannelVariantID:n.ChannelVariationID,NewQuantity:parseFloat(n.Inventory),VariantID:n.ID,SKU:n.Sku};this.http.post("/api/Inventory/UpdateQuantityByItem",a).subscribe(h=>{let C=this.productService.findChannelById(a.ID,this.channelOptions);this.toastr.success("Successfully updated "+n.ItemName+"("+n.VarName+") inventory in "+C.Name+" to "+a.NewQuantity,"Success")})}onShowDifferenceStock(n){n?this.searchFilter.filterModel=N.DIFFERENCE:this.searchFilter.filterModel=N.ALL,this.paginationService.reloadPagination(this.searchFilter)}onUpdateItems(n){let e=this.productService.selectedVariantProduct(n);this.dialog.open(Ve,{data:{selectedItems:e,channels:JSON.parse(JSON.stringify(this.channelOptions))},width:"600px"}).afterClosed().pipe(O(a=>F.IsNotEmpty(a))).subscribe(a=>{this.updateStock(n,a)})}getRowCount(){this.paginationService.hideCount=!1;let n={text:this.searchFilter.text};this.allDataCount$=this.http.post(`/API/${this.allDataCountEndpoint}`,n)}nextPage(){this.paginationService.onNextPage(this.searchFilter)}getAllData(){this.http.post(`/API/${this.allDataCountEndpoint}`,{}).subscribe({next:n=>{this.searchFilter.PageNumber=1,this.paginationService.getAllData(this.searchFilter,n)}})}ngOnDestroy(){this.paginationService.destroy()}};o.\u0275fac=function(e){return new(e||o)(y(Y),y(K),y(ie),y(le),y(oe),y(te))},o.\u0275cmp=k({type:o,selectors:[["app-multi-channel-comparison"]],decls:2,vars:3,consts:[["headerTitle","Inventory Comparison",3,"pageData","hideSearchBox","textButton","onSubmit",4,"ngIf"],["headerTitle","Inventory Comparison",3,"onSubmit","pageData","hideSearchBox","textButton"],[4,"ngIf"],["for","PageNumber",1,"fw-bold"],["type","number","id","PageNumber","placeholder","PageNumber","name","PageNumber","data-toggle","tooltip","matTooltip","Page Number",1,"form-control","mt-2",3,"ngModelChange","ngModel"],[1,"mt-5"],["for","RowCount",1,"fw-bold"],["type","number","id","RowCount","placeholder","Page Size","name","RowCount","data-toggle","tooltip","matTooltip","Page Size",1,"form-control","mt-2",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],["table","inventory",3,"data","channel","showProductToggle","filter","onToggle","onSubmit",4,"ngIf"],[1,"d-flex","justify-content-between","mt-5"],[1,"me-auto","d-sm-block","collapse","mt-3"],[1,"font-weight-bold","font-italic","hidden-xxs"],["style","cursor: pointer",3,"click",4,"ngIf"],[1,"btn-group"],["role","button","class","btn btn-outline-secondary btn-sm text-primary","title","Load more for 20 products",3,"click",4,"ngIf"],["role","button","class","btn btn-outline-secondary btn-sm text-primary border-start-0","title","Load all products",3,"click",4,"ngIf"],[1,"d-flex"],["type","button","class","btn btn-success shadow-sm rounded me-3",3,"click",4,"ngIf"],["type","button",1,"btn","btn-success","shadow-sm","rounded","me-3",3,"click"],[1,"fas","fa-chevron-circle-up"],["table","inventory",3,"onToggle","onSubmit","data","channel","showProductToggle","filter"],[2,"cursor","pointer",3,"click"],["title","Retreive rows count",1,"border","p-3"],["role","button","title","Load more for 20 products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-arrow-right"],["role","button","title","Load all products",1,"btn","btn-outline-secondary","btn-sm","text-primary","border-start-0",3,"click"],[1,"fas","fa-share"]],template:function(e,a){e&1&&(u(0,at,32,23,"mainpanel",0),g(1,"async")),e&2&&c("ngIf",f(1,1,a.loader$))},dependencies:[z,Z,ee,q,X,ae,re,ne,Q,H],styles:[".no-bullet[_ngcontent-%COMP%]{list-style-type:none}"]});let i=o;return i})();var ot=i=>({"text-decoration-line-through":i}),lt=i=>({"ms-10":i}),rt=i=>({"bg-gradient-warning":i});function st(i,o){if(i&1){let t=v();l(0,"button",43),S("click",function(){d(t);let e=p().ngIf,a=p(2);return _(a.updateStock(e))}),x(1,"i",44),m(2," Update"),s()}}function pt(i,o){if(i&1&&(l(0,"div"),u(1,st,3,0,"button",42),s()),i&2){let t=o.ngIf,n=p(2);r(),c("ngIf",n.productService.hasSelectionVariant(t))}}function ct(i,o){if(i&1&&(l(0,"span",45),x(1,"img",46),s(),m(2)),i&2){let t=o.item;r(),c("src",t==null?null:t.Img,R),r(),w(" ",t.Name," ")}}function mt(i,o){i&1&&(l(0,"div",47)(1,"span"),m(2," showing only different stock, please press next to populate more data "),s()())}function dt(i,o){if(i&1){let t=v();l(0,"th")(1,"input",48),E("ngModelChange",function(e){d(t);let a=p(2);return M(a.checkboxState,e)||(a.checkboxState=e),_(e)}),S("ngModelChange",function(){let e=d(t).ngIf,a=p(2);return _(a.onCheckboxStateChange(e))}),s()()}if(i&2){let t=p(2);r(),T("ngModel",t.checkboxState)}}function _t(i,o){i&1&&(b(0),l(1,"th",49),m(2," Reserved "),s(),I())}function ut(i,o){if(i&1){let t=v();b(0),l(1,"input",62),E("ngModelChange",function(e){d(t);let a=p(3).$implicit;return M(a.selected,e)||(a.selected=e),_(e)}),S("ngModelChange",function(){d(t);let e=p(3).$implicit,a=p(2);return _(a.onCheckboxStateProduct(e))}),s(),I()}if(i&2){let t=p(3).$implicit;r(),T("ngModel",t.selected)}}function gt(i,o){if(i&1){let t=v();b(0),l(1,"img",63),S("click",function(e){d(t);let a=p(3).$implicit,h=p(2);return _(h.onZoomImage(e,a==null?null:a.ImageUrl))}),s(),I()}if(i&2){let t=p(3).$implicit;r(),de("src",t==null?null:t.ThumbnailUrl,R)}}function ht(i,o){i&1&&x(0,"img",64)}function Ct(i,o){if(i&1&&(b(0),x(1,"br"),l(2,"div",65),x(3,"i",66),l(4,"small"),m(5),s()(),I()),i&2){let t=p(3).$implicit;r(5),w("(",t==null?null:t.Category,")")}}function ft(i,o){if(i&1&&(b(0),l(1,"td",59)(2,"div",17),u(3,ut,2,1,"ng-container",7),l(4,"div",53),u(5,gt,2,1,"ng-container",55)(6,ht,1,0,"ng-template",null,2,A),s()()(),l(8,"td",60)(9,"span",61),m(10),s(),u(11,Ct,6,1,"ng-container",7),s(),I()),i&2){let t=L(7),n=p(2).$implicit,e=p(2);r(),c("rowSpan",n==null?null:n.Variants.length),r(2),c("ngIf",n.Variants.length>1),r(),c("ngClass",$(8,lt,n.Variants.length<=1)),r(),c("ngIf",n==null?null:n.ThumbnailUrl)("ngIfElse",t),r(3),c("rowSpan",n==null?null:n.Variants.length),r(2),D(n==null?null:n.Name),r(),c("ngIf",n.CategoryID!==null&&n.CategoryID!=e.guidEmpty)}}function xt(i,o){if(i&1){let t=v();b(0),l(1,"input",48),E("ngModelChange",function(e){d(t);let a=p(2).$implicit;return M(a.selected,e)||(a.selected=e),_(e)}),s(),I()}if(i&2){let t=p(2).$implicit;r(),T("ngModel",t.selected)}}function St(i,o){if(i&1&&(b(0),u(1,xt,2,1,"ng-container",7),I()),i&2){let t=p().$implicit;r(),c("ngIf",(t==null?null:t.Inventory)<=1e5)}}function vt(i,o){if(i&1){let t=v();l(0,"input",48),E("ngModelChange",function(e){d(t);let a=p(2).$implicit;return M(a.selected,e)||(a.selected=e),_(e)}),s()}if(i&2){let t=p(2).$implicit;T("ngModel",t.selected)}}function yt(i,o){if(i&1&&u(0,vt,1,1,"input",67),i&2){let t=p().$implicit;c("ngIf",(t==null?null:t.Inventory)>=0)}}function bt(i,o){i&1&&(l(0,"div",68),m(1,"Not Found"),s())}function It(i,o){if(i&1&&(l(0,"div")(1,"span",69),m(2),g(3,"number"),s(),m(4," => "),l(5,"span",70),m(6),g(7,"number"),s()()),i&2){let t=p().$implicit;r(2),w(" ",f(3,2,t==null||t.I==null?null:t.I.Available),""),r(4),D(f(7,4,t==null?null:t.Inventory))}}function wt(i,o){if(i&1&&(l(0,"div"),m(1),g(2,"number"),s()),i&2){let t=p().$implicit;r(),w(" ",f(2,1,t==null?null:t.Inventory)," ")}}function Tt(i,o){if(i&1&&(b(0),l(1,"div",71)(2,"a",72),x(3,"i",73),s()(),I()),i&2){let t=p().$implicit,n=p(3);r(2),c("href",n.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(t==null?null:t.ID),R)}}function Mt(i,o){if(i&1){let t=v();l(0,"td",74)(1,"div",52)(2,"div")(3,"span",75),S("click",function(){d(t);let e=p().$implicit,a=p(),h=a.$implicit,C=a.ngForOf,P=p(2);return _(P.openTableDialog(h,e,C))}),m(4),g(5,"number"),s()(),l(6,"div",71)(7,"a",72),x(8,"i",73),s()(),l(9,"div",71)(10,"span",76),S("click",function(){d(t);let e=p().$implicit,a=p(3);return _(a.refreshInventory(e==null||e.Channel[0]==null?null:e.Channel[0].ChannelItemID,e==null||e.Channel[0]==null?null:e.Channel[0].ChannelVariationID,e==null||e.Channel[0]==null?null:e.Channel[0].ChannelID,e==null?null:e.ID))}),x(11,"i",77),s()()()()}if(i&2){let t=p().$implicit;c("ngClass",$(5,rt,(t==null?null:t.Inventory)!=(t==null||t.Channel[0]==null?null:t.Channel[0].Inventory))),r(4),w(" ",f(5,3,t==null||t.Channel[0]==null?null:t.Channel[0].Inventory)," "),r(3),c("href",t==null||t.Channel[0]==null?null:t.Channel[0].Url,R)}}function Et(i,o){if(i&1&&(b(0),l(1,"span",79),m(2),g(3,"number"),s(),I()),i&2){let t=p(2).$implicit;r(2),w(" (",f(3,1,t==null||t.Channel[0]==null?null:t.Channel[0].InventoryReserved),") ")}}function Pt(i,o){i&1&&m(0," - ")}function Vt(i,o){if(i&1&&(b(0),l(1,"td",78),u(2,Et,4,3,"ng-container",55)(3,Pt,1,0,"ng-template",null,3,A),s(),I()),i&2){let t=L(4),n=p().$implicit;r(2),c("ngIf",n==null||n.Channel[0]==null?null:n.Channel[0].InventoryReserved)("ngIfElse",t)}}function Dt(i,o){i&1&&(b(0),m(1," - "),I())}function Ft(i,o){if(i&1&&(l(0,"span",80),g(1,"date"),m(2),g(3,"date"),s()),i&2){let t=p().$implicit;c("matTooltip",j(1,2,t==null||t.Channel[0]==null?null:t.Channel[0].LastInventorySync,"dd MMMM yyyy HH:mm:ss")),r(2),w(" ",j(3,5,t==null||t.Channel[0]==null?null:t.Channel[0].LastInventorySync,"dd MMM yy HH:mm")," ")}}function Nt(i,o){if(i&1&&(l(0,"tr"),u(1,ft,12,10,"ng-container",7),l(2,"td",50),m(3),s(),l(4,"td",51)(5,"div",52)(6,"span",53),m(7),s()()(),l(8,"td",54),u(9,St,2,1,"ng-container",55)(10,yt,1,1,"ng-template",null,0,A),s(),l(12,"td")(13,"div",52),u(14,bt,2,0,"div",56)(15,It,8,6,"div",7)(16,wt,3,3,"div",7)(17,Tt,4,1,"ng-container",7),s()(),u(18,Mt,12,7,"td",57)(19,Vt,5,2,"ng-container",7),l(20,"td",58),u(21,Dt,2,0,"ng-container",55)(22,Ft,4,8,"ng-template",null,1,A),s()()),i&2){let t=o.$implicit,n=o.index,e=L(11),a=L(23),h=p(3);r(),c("ngIf",n==0),r(2),D(t==null?null:t.Model),r(),c("matTooltip",t.isDiscontinued?h.discontinuedVariantMsg:""),r(2),c("ngClass",$(15,ot,t.isDiscontinued)),r(),D(t==null?null:t.Code),r(2),c("ngIf",(t==null?null:t.Channel[0].TypeID)==1)("ngIfElse",e),r(5),c("ngIf",(t==null?null:t.I)==null),r(),c("ngIf",(t==null?null:t.I)!=null&&(t==null?null:t.Inventory)!=(t==null||t.I==null?null:t.I.Available)),r(),c("ngIf",(t==null?null:t.I)!=null&&(t==null?null:t.Inventory)==(t==null||t.I==null?null:t.I.Available)),r(),c("ngIf",(t==null?null:t.I)!=null),r(),c("ngIf",t==null?null:t.Channel),r(),c("ngIf",h.isShowReservedColumn),r(2),c("ngIf",(t==null||t.Channel[0]==null?null:t.Channel[0].LastInventorySync)==h.minDate)("ngIfElse",a)}}function kt(i,o){if(i&1&&(l(0,"tbody"),u(1,Nt,24,17,"tr",36),s()),i&2){let t=o.$implicit;r(),c("ngForOf",t.Variants)}}function Rt(i,o){if(i&1){let t=v();l(0,"span",81),S("click",function(){d(t);let e=p(2);return _(e.getRowCount())}),l(1,"i",82),m(2,"?"),s()()}}function Bt(i,o){if(i&1&&(l(0,"span"),m(1),g(2,"number"),s()),i&2){let t=o.ngIf;r(),D(f(2,1,t==null?null:t.Total))}}function Lt(i,o){if(i&1){let t=v();l(0,"a",86),S("click",function(){d(t);let e=p(3);return _(e.onNextPage())}),x(1,"i",87),m(2," Next"),s()}}function At(i,o){if(i&1){let t=v();l(0,"a",88),S("click",function(){d(t);let e=p(3);return _(e.onLastPage())}),x(1,"i",89),m(2," Last"),s()}}function Ot(i,o){if(i&1&&(l(0,"div",83),u(1,Lt,3,0,"a",84)(2,At,3,0,"a",85),s()),i&2){let t=p(2);r(),c("ngIf",t.paginationService.disableNextButton&&!t.paginationService.goToLastPage),r(),c("ngIf",t.paginationService.disableNextButton&&!t.paginationService.goToLastPage)}}function Wt(i,o){if(i&1){let t=v();l(0,"mainpanel",5),S("onSubmit",function(e){d(t);let a=p();return _(a.onSearch(e))}),l(1,"actions")(2,"div",6),u(3,pt,2,1,"div",7),g(4,"async"),s()(),l(5,"filters")(6,"div")(7,"label",8),m(8,"Channel"),s(),l(9,"ng-select",9),E("ngModelChange",function(e){d(t);let a=p();return M(a.searchFilter.ChannelID,e)||(a.searchFilter.ChannelID=e),_(e)}),u(10,ct,3,2,"ng-template",10),s()(),l(11,"div",11)(12,"label",12),m(13,"PageNumber"),s(),l(14,"input",13),E("ngModelChange",function(e){d(t);let a=p();return M(a.searchFilter.PageNumber,e)||(a.searchFilter.PageNumber=e),_(e)}),s()(),l(15,"div",11)(16,"label",14),m(17,"Page Size"),s(),l(18,"input",15),E("ngModelChange",function(e){d(t);let a=p();return M(a.searchFilter.RowCount,e)||(a.searchFilter.RowCount=e),_(e)}),s()(),l(19,"div",11)(20,"label",16),m(21,"Quantity From - To"),s(),l(22,"div",17)(23,"input",18),E("ngModelChange",function(e){d(t);let a=p();return M(a.searchFilter.QuantityFrom,e)||(a.searchFilter.QuantityFrom=e),_(e)}),s(),m(24," - "),l(25,"input",19),E("ngModelChange",function(e){d(t);let a=p();return M(a.searchFilter.QuantityTo,e)||(a.searchFilter.QuantityTo=e),_(e)}),s()()()(),l(26,"content")(27,"div",20)(28,"div",21)(29,"div",22),u(30,mt,3,0,"div",23),l(31,"table",24)(32,"thead",25)(33,"tr")(34,"th",26),m(35,"Product "),x(36,"br"),l(37,"mat-slide-toggle",27),S("toggleChange",function(){d(t);let e=p();return e.showDifferenceStock=!e.showDifferenceStock,_(e.onShowDifferenceStock())}),l(38,"small",16),m(39,"FILTER DIFFERENT INVENTORY"),s()()(),l(40,"th",28),m(41,"Variant"),s(),l(42,"th",29),m(43,"SKU"),s(),u(44,dt,2,1,"th",7),g(45,"async"),l(46,"th",30),m(47,"POS"),s(),l(48,"th",31)(49,"div",32),S("click",function(){d(t);let e=p();return _(e.openModalFilter())}),x(50,"img",33),l(51,"span",34),m(52),g(53,"stringLimit"),s()()(),u(54,_t,3,0,"ng-container",7),l(55,"th",35),m(56,"Last Sync"),s()()(),u(57,kt,2,1,"tbody",36),g(58,"async"),s(),l(59,"div",37)(60,"div",38)(61,"div",39),m(62),g(63,"async"),g(64,"number"),u(65,Rt,3,0,"span",40)(66,Bt,3,3,"span",7),g(67,"async"),m(68),s()(),u(69,Ot,3,2,"div",41),g(70,"async"),s()()()()()()}if(i&2){let t,n,e=p();c("headerTitle","Inventory Comparison")("pageData",e.pageData)("hideSearchBox",!1),r(3),c("ngIf",f(4,24,e.paginationService.data$)),r(6),c("clearable",!1)("items",e.channelOptions),T("ngModel",e.searchFilter.ChannelID),r(5),T("ngModel",e.searchFilter.PageNumber),r(4),T("ngModel",e.searchFilter.RowCount),r(5),T("ngModel",e.searchFilter.QuantityFrom),r(2),T("ngModel",e.searchFilter.QuantityTo),r(5),c("ngIf",(e.searchFilter==null?null:e.searchFilter.filterModel)==3),r(14),c("ngIf",f(45,26,e.paginationService.data$)),r(5),c("matTooltip",(e.selectedChannel==null||e.selectedChannel.Name==null?null:e.selectedChannel.Name.length)>13?e.selectedChannel==null?null:e.selectedChannel.Name:""),r(),c("src",e.selectedChannel==null?null:e.selectedChannel.Img,R),r(2),_e(" ",j(53,28,e.selectedChannel==null?null:e.selectedChannel.Name,13),"",(e.selectedChannel==null||e.selectedChannel.Name==null?null:e.selectedChannel.Name.length)>13?"...":""," "),r(2),c("ngIf",e.isShowReservedColumn),r(3),c("ngForOf",f(58,31,e.products$)),r(5),w(" Showing 1 - ",f(64,35,(t=f(63,33,e.paginationService.data$))==null?null:t.length)," of "),r(3),c("ngIf",e.paginationService.hideCount),r(),c("ngIf",f(67,37,!e.paginationService.hideCount&&e.rowCount$)),r(2),w(" records ~ ",e.paginationService.footerPageNumber," Page "),r(),c("ngIf",((n=f(70,39,e.paginationService.data$))==null?null:n.length)>0)}}var Le=(()=>{let o=class o{constructor(n,e,a,h,C,P,V,Oe,We){this.http=n,this.toastr=e,this.dialog=a,this.paginationService=h,this.productService=C,this.authService=P,this.biggerPictureService=V,this.inventoryService=Oe,this.mainPanelService=We,this.checkboxState=!1,this.showDifferenceStock=!1,this.loaderApi="/api/InventoryLoader/Load",this.rowCountApi="/api/Inventory/GetInventoryByChannelRowCount",this.minDate=F.MinDate,this.isShowReservedColumn=!0,this.discontinuedVariantMsg="This Variant is discontinued from POS, you must Non Active manually at the seller center so that it is not sold again on the channel.",this.guidEmpty=F.GuidEMpty,this.Options=[{Key:1,Value:"All"},{Key:3,Value:"Difference"}],this.pageData={Title:"Inventory Realtime",Nav:[{Title:"Inventory Cache",Url:"/menu/inventory",Active:!1},{Title:"Inventory Realtime",Url:"/menu/inventory/realtime",Active:!0}]}}ngOnInit(){this.channelOptions=this.authService.getChannels(),this.hostName=this.authService.getDomain(),this.initPageLoader(),this.products$=this.paginationService.data$.pipe(me(n=>(n=n.map(e=>(e.Variants&&(e.Variants=e.Variants.map(a=>(a.isDiscontinued=e.Discontinued=="Yes",a))),e)),n)),B(n=>{this.checkShowReservedColumn(n)}))}checkShowReservedColumn(n){let e=0,a;n.forEach(h=>{a=h.Variants.find(C=>F.IsNotEmpty(C?.Channel[0]?.InventoryReserved)),a&&(e+=1)}),this.isShowReservedColumn=e>0}initPageLoader(){this.paginationService.fetchDataEndpoint="Inventory/GetSingleChannelComparison",this.loader$=this.http.post(this.loaderApi,{}).pipe(B(n=>{this.searchFilter={RowCount:n.Filter.PageSize,filterModel:1,PageNumber:1,ChannelID:n.Filter.ChannelID},this.initSelectedChannel(),this.paginationService.reloadPagination(this.searchFilter),n.Filter.IsMarketplaceAppActive||this.toastr.warning(`Automatic inventory sync disabled.
|
|
2
2
|
Please enable Dealpos X Marketplace Apps integration in POS Configuration`,"Warning")}))}initSelectedChannel(){this.selectedChannel=this.channelOptions.find(n=>n.ID==this.searchFilter.ChannelID)}onSearch(n){this.searchFilter.text=n,this.paginationService.reloadPagination(this.searchFilter),this.initSelectedChannel()}openModalFilter(){this.mainPanelService.openModalFilter()}updateStock(n){let e=this.productService.selectedVariantProduct(n);if(e.length>0){let a=e.map(C=>({ID:C.ID,Code:C.Code,Inventory:C.Inventory})),h={ListChannelID:[this.searchFilter.ChannelID],List:a};this.http.post("/api/Inventory/UpdateChannel",h).subscribe(C=>{this.searchFilter.PageNumber=1,this.paginationService.reloadPagination(this.searchFilter),this.checkboxState=!1,this.handlingUpdateStock(C)})}}handlingUpdateStock(n){if(n[0]?.StatusProduct){let e=n[0].StatusProduct.Fail_list,a=n[0].StatusProduct.Success_list;this.inventoryService.showToastrUpdateInventory("Stock",a,e)}else this.toastr.error(n[0]?.Exception,"Error")}refreshInventory(n,e,a,h){let C={ChannelItemID:n,ChannelVariationID:e,ChannelID:a,VariantID:h};this.http.post("/api/Inventory/RefreshInventoryChannel",C).subscribe(P=>{this.toastr.success("Successfully updated","Success"),this.paginationService.reloadPagination(this.searchFilter)})}onCheckboxStateProduct(n){n.Variants=n.Variants.map(e=>(e.Inventory>=0&&(e.selected=n.selected),e))}onCheckboxStateChange(n){n=n.map(e=>(e.Variants=e.Variants.map(a=>(a.selected=this.checkboxState,a)),e))}openTableDialog(n,e,a){this.dialog.open(De,{data:{Name:n.Name,Variant:e,ChannelID:e?.Channel[0].ChannelID,Table:"inventory",ChannelItemID:n.ChannelItemID}}).afterClosed().pipe(O(C=>F.IsNotEmpty(C))).subscribe(C=>{this.updateItemAfterDialog(C,a)})}updateItemAfterDialog(n,e){let a={ID:n.ChannelID,ChannelItemID:n.ChannelItemID,ChannelVariantID:n.ChannelVariationID,NewQuantity:parseFloat(n.Inventory),VariantID:n.ID,SKU:n.Sku};this.http.post("/api/Inventory/UpdateQuantityByItem",a).subscribe(h=>{this.searchFilter.PageNumber=1,this.paginationService.reloadPagination(this.searchFilter),this.handlingUpdateStock([h])})}onShowDifferenceStock(){this.showDifferenceStock?this.searchFilter.filterModel=N.DIFFERENCE:this.searchFilter.filterModel=N.ALL,this.paginationService.reloadPagination(this.searchFilter)}onNextPage(){this.paginationService.onNextPage(this.searchFilter)}getRowCount(){let n={ChannelID:this.searchFilter.ChannelID,PageNumber:1,text:this.searchFilter.text};this.paginationService.hideCount=!1,this.rowCount$=this.http.post(`${this.rowCountApi}`,n)}onLastPage(){let n={ChannelID:this.searchFilter.ChannelID,PageNumber:1};this.http.post(`${this.rowCountApi}`,n).subscribe({next:e=>{this.searchFilter.PageNumber=1,this.paginationService.getAllData(this.searchFilter,e.Total)}})}onZoomImage(n,e){this.biggerPictureService.openBiggerPicture(n,e)}ngOnDestroy(){this.paginationService.destroy()}};o.\u0275fac=function(e){return new(e||o)(y(Y),y(K),y(ie),y(le),y(oe),y(te),y(Pe),y(se),y(we))},o.\u0275cmp=k({type:o,selectors:[["app-single-channel-comparison"]],decls:2,vars:3,consts:[["OTHER_CHANNEL",""],["SYNCDATE",""],["elsePic",""],["EMPTY_RESERVED",""],["textButton","Search",3,"headerTitle","pageData","hideSearchBox","onSubmit",4,"ngIf"],["textButton","Search",3,"onSubmit","headerTitle","pageData","hideSearchBox"],[1,"d-flex"],[4,"ngIf"],["for","ng-select",1,"fw-bold"],["id","ng-select","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel","appendTo","body",1,"center-text","mt-3",3,"ngModelChange","clearable","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],["for","PageNumber",1,"fw-bold"],["type","number","id","PageNumber","placeholder","PageNumber","name","PageNumber","data-toggle","tooltip","matTooltip","Page Number",1,"mat-mdc-tooltip-trigger","form-control","ng-pristine","ng-valid","ng-touched","mt-3",3,"ngModelChange","ngModel"],["for","RowCount",1,"fw-bold"],["type","number","id","RowCount","placeholder","Page Size","name","RowCount","data-toggle","tooltip","matTooltip","Page Size",1,"mat-mdc-tooltip-trigger","form-control","ng-pristine","ng-valid","ng-touched","mt-3",3,"ngModelChange","ngModel"],[1,"fw-bold"],[1,"d-flex","align-items-center","justify-content-start"],["type","number","name","QuantityFrom",1,"w-25","me-2","mt-3","form-control",3,"ngModelChange","ngModel"],["type","number","name","QuantityTo",1,"w-25","ms-2","form-control","mt-2",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],["class","alert alert-warning d-flex justify-content-between text-dark","role","alert",4,"ngIf"],[1,"table","border-bottom"],[1,"thead-light","sticky-top-thead"],["scope","col","colspan","2",1,"text-center","ps-12",2,"width","25%"],[3,"toggleChange"],["scope","col",1,"text-start"],["scope","col",1,"text-end",2,"width","10%"],["scope","col",1,"text-end","w-10",2,"width","8%"],[1,"text-end",2,"width","150px"],["role","button","matTooltipPosition","above",1,"d-inline-block",3,"click","matTooltip"],[2,"width","16px",3,"src"],[1,"ms-1"],[1,"text-center",2,"width","145px"],[4,"ngFor","ngForOf"],[1,"d-flex","justify-content-between","mt-5"],[1,"me-auto","d-sm-block","collapse","mt-3"],[1,"font-weight-bold","font-italic","hidden-xxs"],["style","cursor: pointer",3,"click",4,"ngIf"],["class","btn-group",4,"ngIf"],["class","btn btn-success",3,"click",4,"ngIf"],[1,"btn","btn-success",3,"click"],[1,"fas","fa-chevron-circle-up"],[1,"me-2"],[2,"width","18px",3,"src"],["role","alert",1,"alert","alert-warning","d-flex","justify-content-between","text-dark"],["type","checkbox",3,"ngModelChange","ngModel"],["matTooltip","Reserved Stock","matTooltipPosition","above",1,"text-end",2,"width","80px"],[1,"text-start"],["matTooltipPosition","above",1,"text-end",3,"matTooltip"],[1,"d-flex","align-items-center","justify-content-end"],[3,"ngClass"],[1,"align-middle"],[4,"ngIf","ngIfElse"],["class","text-danger","matTooltip","This product is no longer available in POS","matTooltipPosition","above",4,"ngIf"],["class","text-end",3,"ngClass",4,"ngIf"],[1,"text-center"],[1,"text-start",2,"width","0%",3,"rowSpan"],[1,"text-start",3,"rowSpan"],[1,"item-name","mb-0"],["type","checkbox",1,"me-3",3,"ngModelChange","ngModel"],[1,"border","rounded","w-img","cursor-pointer",2,"margin-left","20px",3,"click","src"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded","w-img",2,"margin-left","20px"],[1,"d-flex","align-items-center"],["title","Category",1,"fa-solid","fa-tags","me-2",2,"opacity","60%"],["type","checkbox",3,"ngModel","ngModelChange",4,"ngIf"],["matTooltip","This product is no longer available in POS","matTooltipPosition","above",1,"text-danger"],["title","Allocated"],["title","Inventory below minimum inventory"],[1,"ms-3"],["target","_blank",3,"href"],[1,"fas","fa-lg","fa-external-link-alt","external-link-custom"],[1,"text-end",3,"ngClass"],[1,"cursor",3,"click"],["matTooltip","Refresh stock according to seller center",1,"pl-5","cursor-pointer",2,"color","var(--bs-link-color)",3,"click"],[1,"fas","fa-sync","fa-lg","external-link-custom"],[1,"text-end"],[1,"text-danger"],["matTooltipShowDelay","500",3,"matTooltip"],[2,"cursor","pointer",3,"click"],["title","Retreive rows count",1,"border","p-3"],[1,"btn-group"],["role","button","class","btn btn-outline-secondary btn-sm text-primary","title","Load more for 20 products",3,"click",4,"ngIf"],["role","button","class","btn btn-outline-secondary btn-sm text-primary border-start-0","title","Load all products",3,"click",4,"ngIf"],["role","button","title","Load more for 20 products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-arrow-right"],["role","button","title","Load all products",1,"btn","btn-outline-secondary","btn-sm","text-primary","border-start-0",3,"click"],[1,"fas","fa-share"]],template:function(e,a){e&1&&(u(0,Wt,71,41,"mainpanel",4),g(1,"async")),e&2&&c("ngIf",f(1,1,a.loader$))},dependencies:[ue,ge,z,Z,ee,fe,q,X,ye,Se,ve,Fe,ae,ne,Q,H,he,ke],styles:[".w-10[_ngcontent-%COMP%]{width:10%}.w-img[_ngcontent-%COMP%]{width:40px;height:40px}.item-name[_ngcontent-%COMP%]{margin-bottom:-14px!important;font-size:larger}input[type=checkbox][_ngcontent-%COMP%]{width:15px;height:15px}"]});let i=o;return i})();var Ut=[{path:"",component:Re,children:[{path:"",redirectTo:"bychannel",pathMatch:"full"},{path:"pos",component:Be,canActivate:[ce],data:{title:"Inventory Comparison"}},{path:"bychannel",component:Le,canActivate:[ce],data:{title:"Inventory Comparison"}}]}],Ae=(()=>{let o=class o{};o.\u0275fac=function(e){return new(e||o)},o.\u0275mod=U({type:o}),o.\u0275inj=W({imports:[G,J.forChild(Ut)]});let i=o;return i})();var Rn=(()=>{let o=class o{};o.\u0275fac=function(e){return new(e||o)},o.\u0275mod=U({type:o}),o.\u0275inj=W({providers:[se],imports:[G,Ae,J,Ee,xe,be,Ne,Te,re,Ie]});let i=o;return i})();export{Rn as InventoryModule};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as b}from"./chunk-BD2QQPDK.js";import{a as h,b as P}from"./chunk-
|
|
1
|
+
import{a as b}from"./chunk-BD2QQPDK.js";import{a as h,b as P}from"./chunk-5LCXVQBT.js";import{a as C}from"./chunk-PZOGC5DT.js";import{c as M}from"./chunk-G5LCLRIW.js";import{b as O}from"./chunk-DEH6NGKQ.js";import"./chunk-5ZUWMFL5.js";import"./chunk-TDHJ34QP.js";import"./chunk-MYMGWQRE.js";import"./chunk-DT3B54LD.js";import{e as s}from"./chunk-AL67KXJV.js";import{a as p}from"./chunk-3LQ5TKLD.js";import"./chunk-OHTJCLX7.js";import"./chunk-K3G6FMDF.js";import"./chunk-JM3LERUP.js";import{D as u,r as f}from"./chunk-ZKBLXGXT.js";import"./chunk-6B64VOO7.js";import{u as g}from"./chunk-SP6QPE3M.js";import"./chunk-6F6NSBIF.js";import{Wc as l,_c as m,aa as e,ha as d,hb as c,ia as r,sc as i}from"./chunk-6DRNAUKE.js";import"./chunk-GRMIXZTT.js";var _=(()=>{let t=class t{};t.\u0275fac=function(n){return new(n||t)},t.\u0275cmp=d({type:t,selectors:[["app-products"]],decls:1,vars:0,template:function(n,v){n&1&&c(0,"router-outlet")},dependencies:[l],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media (min-width: 1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}.navbar-toggler[_ngcontent-%COMP%]:focus{box-shadow:none!important}"]});let o=t;return o})();var y=[{path:"",component:_,children:[{path:"",redirectTo:"status",pathMatch:"full"},{path:"status",loadChildren:()=>import("./chunk-L4DP3Q4W.js").then(o=>o.StatusModule),canActivate:[p]},{path:"download",loadChildren:()=>import("./chunk-C45X4NQK.js").then(o=>o.DownloadModule),canActivate:[p]}]}],w=(()=>{let t=class t{};t.\u0275fac=function(n){return new(n||t)},t.\u0275mod=r({type:t}),t.\u0275inj=e({imports:[i,m.forChild(y)]});let o=t;return o})();var W=(()=>{let t=class t{};t.\u0275fac=function(n){return new(n||t)},t.\u0275mod=r({type:t}),t.\u0275inj=e({imports:[i,g,m,w,f,u,s,O,C,M,h,P,b]});let o=t;return o})();export{W as ProductModule};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as F}from"./chunk-BMZAGAK3.js";import{A as D,s as x,t as U,z as b}from"./chunk-
|
|
1
|
+
import{a as F}from"./chunk-BMZAGAK3.js";import{A as D,s as x,t as U,z as b}from"./chunk-ZKBLXGXT.js";import{h as k,k as T}from"./chunk-SP6QPE3M.js";import{Ab as y,Bb as v,Eb as O,Fb as w,Gb as I,Ha as h,Ia as s,Ja as d,Wa as C,Ya as m,fb as l,gb as c,ha as p,hb as _,kc as S,lb as u,ob as M,pa as g,qa as f}from"./chunk-6DRNAUKE.js";function P(i,n){if(i&1){let a=u();l(0,"li")(1,"mat-checkbox",5),I("ngModelChange",function(e){let t=g(a).$implicit;return w(t.selected,e)||(t.selected=e),f(e)}),l(2,"div",6),_(3,"img",7),l(4,"h5",8),y(5),c()()()()}if(i&2){let a=n.$implicit;s(),O("ngModel",a.selected),s(2),m("src",a.Img,h),s(2),v(a.Name)}}var z=(()=>{let n=class n{constructor(o,e){this.data=o,this.dialogRef=e,this.selectedItems=this.data.selectedItems,this.channels=this.data.channels}ngOnInit(){this.initModalConfig()}initModalConfig(){this.modalConfig=new b,this.modalConfig.title="Updating Inventory"}onOk(){this.dialogRef.close(this.channels)}onClose(){this.dialogRef.close()}getSelectedChannel(){return this.channels.filter(o=>o.selected)}};n.\u0275fac=function(e){return new(e||n)(d(U),d(x))},n.\u0275cmp=p({type:n,selectors:[["app-modal-update-channels"]],decls:5,vars:3,consts:[[3,"onOk","onClose","onCancel","dynamicValidated","config"],["content",""],[2,"overflow-y","auto","max-height","28rem"],[1,"no-bullet"],[4,"ngFor","ngForOf"],[3,"ngModelChange","ngModel"],[1,"d-flex","align-items-center"],[1,"channelLogo-md",3,"src"],[1,"fw-light","ms-2","my-auto"]],template:function(e,t){if(e&1&&(l(0,"modal-material",0),M("onOk",function(){return t.onOk()})("onClose",function(){return t.onClose()})("onCancel",function(){return t.onClose()}),l(1,"div",1)(2,"div",2)(3,"ul",3),C(4,P,6,3,"li",4),c()()()()),e&2){let r;m("dynamicValidated",((r=t.getSelectedChannel())==null?null:r.length)>0)("config",t.modalConfig),s(4),m("ngForOf",t.channels)}},dependencies:[S,k,T,F,D],styles:[".no-bullet[_ngcontent-%COMP%]{list-style-type:none}mat-form-field[_ngcontent-%COMP%]{width:100%;height:100%}.mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}.vertical-radio[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:15px 0}"]});let i=n;return i})();export{z as a};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{a as ut,b as pt,c as Jt}from"./chunk-TDHJ34QP.js";import{a as ea}from"./chunk-INNTQ5YN.js";import{d as Zt,e as ht}from"./chunk-DT3B54LD.js";import{f as Kt,g as lt,h as Qt,i as ct,j as qt,k as Wt,l as $t,m as be,p as Gt}from"./chunk-O4MUVGWL.js";import{C as ot,D as zt,E as J,I as Ut,J as Xt,L as _,M as P,O as $e,f as Lt,g as Z,h as Bt,j as We,m as jt,x as Ht}from"./chunk-6B64VOO7.js";import{a as ze,d as Ke,e as ve,f as Yt,g as Nt,j as Qe,n as qe}from"./chunk-SP6QPE3M.js";import{$ as te,$a as rt,A as ce,Ab as D,B as kt,Bb as N,Cb as ie,Eb as Be,Fb as je,Gb as He,Hb as q,Hc as nt,I as Me,Ia as h,Ib as M,Ic as ge,Ja as o,Ka as Et,La as Ft,Lc as W,Mc as st,Nc as dt,Oc as fe,Qa as at,Ra as it,S as Ie,Ua as X,Va as ue,Wa as K,Xa as b,Ya as v,Za as Te,_ as Se,_a as T,a as x,aa as Mt,ac as L,ba as Ve,bb as pe,bc as B,c as H,ca as Ee,cb as Oe,da as he,db as Pe,ea as Fe,eb as Ye,fa as xe,fb as c,ga as F,gb as u,gc as Tt,ha as y,hb as Q,ia as It,ic as Ot,ja as R,lb as me,mb as Ne,n as ke,nb as xt,oa as z,ob as g,pa as C,pb as Rt,qa as A,qb as m,ra as et,rb as _e,sa as St,sb as ae,sc as Pt,ta as tt,ua as Vt,va as Re,vb as Le,wb as O,xb as w,ya as Y,yb as k,za as p}from"./chunk-6DRNAUKE.js";var ya=["mat-calendar-body",""];function Ca(n,i){if(n&1&&(c(0,"tr",0)(1,"td",3),D(2),u()()),n&2){let d=m();h(),Te("padding-top",d._cellPadding)("padding-bottom",d._cellPadding),b("colspan",d.numCols),h(),ie(" ",d.label," ")}}function Aa(n,i){if(n&1&&(c(0,"td",3),D(1),u()),n&2){let d=m(2);Te("padding-top",d._cellPadding)("padding-bottom",d._cellPadding),b("colspan",d._firstRowOffset),h(),ie(" ",d._firstRowOffset>=d.labelMinRequiredCells?d.label:""," ")}}function wa(n,i){if(n&1){let d=me();c(0,"td",6)(1,"button",7),g("click",function(a){let t=C(d).$implicit,r=m(2);return A(r._cellClicked(t,a))})("focus",function(a){let t=C(d).$implicit,r=m(2);return A(r._emitActiveDateChange(t,a))}),c(2,"span",8),D(3),u(),Q(4,"span",9),u()()}if(n&2){let d=i.$implicit,e=i.$index,a=m().$index,t=m();Te("width",t._cellWidth)("padding-top",t._cellPadding)("padding-bottom",t._cellPadding),b("data-mat-row",a)("data-mat-col",e),h(),T("mat-calendar-body-disabled",!d.enabled)("mat-calendar-body-active",t._isActiveCell(a,e))("mat-calendar-body-range-start",t._isRangeStart(d.compareValue))("mat-calendar-body-range-end",t._isRangeEnd(d.compareValue))("mat-calendar-body-in-range",t._isInRange(d.compareValue))("mat-calendar-body-comparison-bridge-start",t._isComparisonBridgeStart(d.compareValue,a,e))("mat-calendar-body-comparison-bridge-end",t._isComparisonBridgeEnd(d.compareValue,a,e))("mat-calendar-body-comparison-start",t._isComparisonStart(d.compareValue))("mat-calendar-body-comparison-end",t._isComparisonEnd(d.compareValue))("mat-calendar-body-in-comparison-range",t._isInComparisonRange(d.compareValue))("mat-calendar-body-preview-start",t._isPreviewStart(d.compareValue))("mat-calendar-body-preview-end",t._isPreviewEnd(d.compareValue))("mat-calendar-body-in-preview",t._isInPreview(d.compareValue)),v("ngClass",d.cssClasses)("tabindex",t._isActiveCell(a,e)?0:-1),b("aria-label",d.ariaLabel)("aria-disabled",!d.enabled||null)("aria-pressed",t._isSelected(d.compareValue))("aria-current",t.todayValue===d.compareValue?"date":null)("aria-describedby",t._getDescribedby(d.compareValue)),h(),T("mat-calendar-body-selected",t._isSelected(d.compareValue))("mat-calendar-body-comparison-identical",t._isComparisonIdentical(d.compareValue))("mat-calendar-body-today",t.todayValue===d.compareValue),h(),ie(" ",d.displayValue," ")}}function ka(n,i){if(n&1&&(c(0,"tr",1),K(1,Aa,2,6,"td",4),Pe(2,wa,5,48,"td",5,Oe),u()),n&2){let d=i.$implicit,e=i.$index,a=m();h(),pe(1,e===0&&a._firstRowOffset?1:-1),h(),Ye(d)}}function Ma(n,i){if(n&1&&(c(0,"th",2)(1,"span",6),D(2),u(),c(3,"span",3),D(4),u()()),n&2){let d=i.$implicit;h(2),N(d.long),h(2),N(d.narrow)}}var la=["*"];function Ia(n,i){}function Sa(n,i){if(n&1){let d=me();c(0,"mat-month-view",2),He("activeDateChange",function(a){C(d);let t=m();return je(t.activeDate,a)||(t.activeDate=a),A(a)}),g("_userSelection",function(a){C(d);let t=m();return A(t._dateSelected(a))})("dragStarted",function(a){C(d);let t=m();return A(t._dragStarted(a))})("dragEnded",function(a){C(d);let t=m();return A(t._dragEnded(a))}),u()}if(n&2){let d=m();Be("activeDate",d.activeDate),v("selected",d.selected)("dateFilter",d.dateFilter)("maxDate",d.maxDate)("minDate",d.minDate)("dateClass",d.dateClass)("comparisonStart",d.comparisonStart)("comparisonEnd",d.comparisonEnd)("startDateAccessibleName",d.startDateAccessibleName)("endDateAccessibleName",d.endDateAccessibleName)("activeDrag",d._activeDrag)}}function Va(n,i){if(n&1){let d=me();c(0,"mat-year-view",3),He("activeDateChange",function(a){C(d);let t=m();return je(t.activeDate,a)||(t.activeDate=a),A(a)}),g("monthSelected",function(a){C(d);let t=m();return A(t._monthSelectedInYearView(a))})("selectedChange",function(a){C(d);let t=m();return A(t._goToDateInView(a,"month"))}),u()}if(n&2){let d=m();Be("activeDate",d.activeDate),v("selected",d.selected)("dateFilter",d.dateFilter)("maxDate",d.maxDate)("minDate",d.minDate)("dateClass",d.dateClass)}}function Ea(n,i){if(n&1){let d=me();c(0,"mat-multi-year-view",4),He("activeDateChange",function(a){C(d);let t=m();return je(t.activeDate,a)||(t.activeDate=a),A(a)}),g("yearSelected",function(a){C(d);let t=m();return A(t._yearSelectedInMultiYearView(a))})("selectedChange",function(a){C(d);let t=m();return A(t._goToDateInView(a,"year"))}),u()}if(n&2){let d=m();Be("activeDate",d.activeDate),v("selected",d.selected)("dateFilter",d.dateFilter)("maxDate",d.maxDate)("minDate",d.minDate)("dateClass",d.dateClass)}}function Fa(n,i){}var xa=["button"],Ra=[[["","matDatepickerToggleIcon",""]]],Ta=["[matDatepickerToggleIcon]"];function Oa(n,i){n&1&&(et(),c(0,"svg",2),Q(1,"path",3),u())}var Pa=[[["input","matStartDate",""]],[["input","matEndDate",""]]],Ya=["input[matStartDate]","input[matEndDate]"];function Na(n,i){n&1&&(c(0,"div",0),ae(1),u())}var we=(()=>{let i=class i{constructor(){this.changes=new H,this.calendarLabel="Calendar",this.openCalendarLabel="Open calendar",this.closeCalendarLabel="Close calendar",this.prevMonthLabel="Previous month",this.nextMonthLabel="Next month",this.prevYearLabel="Previous year",this.nextYearLabel="Next year",this.prevMultiYearLabel="Previous 24 years",this.nextMultiYearLabel="Next 24 years",this.switchToMonthViewLabel="Choose date",this.switchToMultiYearViewLabel="Choose month and year",this.startDateLabel="Start date",this.endDateLabel="End date"}formatYearRange(e,a){return`${e} \u2013 ${a}`}formatYearRangeLabel(e,a){return`${e} to ${a}`}};i.\u0275fac=function(a){return new(a||i)},i.\u0275prov=te({token:i,factory:i.\u0275fac,providedIn:"root"});let n=i;return n})(),Ce=class{constructor(i,d,e,a,t={},r=i,s){this.value=i,this.displayValue=d,this.ariaLabel=e,this.enabled=a,this.cssClasses=t,this.compareValue=r,this.rawValue=s}},La=1,ta=We({passive:!1,capture:!0}),$=We({passive:!0,capture:!0}),Ge=We({passive:!0}),de=(()=>{let i=class i{ngAfterViewChecked(){this._focusActiveCellAfterViewChecked&&(this._focusActiveCell(),this._focusActiveCellAfterViewChecked=!1)}constructor(e,a){this._elementRef=e,this._ngZone=a,this._platform=he(Bt),this._focusActiveCellAfterViewChecked=!1,this.numCols=7,this.activeCell=0,this.isRange=!1,this.cellAspectRatio=1,this.previewStart=null,this.previewEnd=null,this.selectedValueChange=new p,this.previewChange=new p,this.activeDateChange=new p,this.dragStarted=new p,this.dragEnded=new p,this._didDragSinceMouseDown=!1,this._enterHandler=t=>{if(this._skipNextFocus&&t.type==="focus"){this._skipNextFocus=!1;return}if(t.target&&this.isRange){let r=this._getCellFromElement(t.target);r&&this._ngZone.run(()=>this.previewChange.emit({value:r.enabled?r:null,event:t}))}},this._touchmoveHandler=t=>{if(!this.isRange)return;let r=aa(t),s=r?this._getCellFromElement(r):null;r!==t.target&&(this._didDragSinceMouseDown=!0),_t(t.target)&&t.preventDefault(),this._ngZone.run(()=>this.previewChange.emit({value:s?.enabled?s:null,event:t}))},this._leaveHandler=t=>{this.previewEnd!==null&&this.isRange&&(t.type!=="blur"&&(this._didDragSinceMouseDown=!0),t.target&&this._getCellFromElement(t.target)&&!(t.relatedTarget&&this._getCellFromElement(t.relatedTarget))&&this._ngZone.run(()=>this.previewChange.emit({value:null,event:t})))},this._mousedownHandler=t=>{if(!this.isRange)return;this._didDragSinceMouseDown=!1;let r=t.target&&this._getCellFromElement(t.target);!r||!this._isInRange(r.compareValue)||this._ngZone.run(()=>{this.dragStarted.emit({value:r.rawValue,event:t})})},this._mouseupHandler=t=>{if(!this.isRange)return;let r=_t(t.target);if(!r){this._ngZone.run(()=>{this.dragEnded.emit({value:null,event:t})});return}r.closest(".mat-calendar-body")===this._elementRef.nativeElement&&this._ngZone.run(()=>{let s=this._getCellFromElement(r);this.dragEnded.emit({value:s?.rawValue??null,event:t})})},this._touchendHandler=t=>{let r=aa(t);r&&this._mouseupHandler({target:r})},this._id=`mat-calendar-body-${La++}`,this._startDateLabelId=`${this._id}-start-date`,this._endDateLabelId=`${this._id}-end-date`,a.runOutsideAngular(()=>{let t=e.nativeElement;t.addEventListener("touchmove",this._touchmoveHandler,ta),t.addEventListener("mouseenter",this._enterHandler,$),t.addEventListener("focus",this._enterHandler,$),t.addEventListener("mouseleave",this._leaveHandler,$),t.addEventListener("blur",this._leaveHandler,$),t.addEventListener("mousedown",this._mousedownHandler,Ge),t.addEventListener("touchstart",this._mousedownHandler,Ge),this._platform.isBrowser&&(window.addEventListener("mouseup",this._mouseupHandler),window.addEventListener("touchend",this._touchendHandler))})}_cellClicked(e,a){this._didDragSinceMouseDown||e.enabled&&this.selectedValueChange.emit({value:e.value,event:a})}_emitActiveDateChange(e,a){e.enabled&&this.activeDateChange.emit({value:e.value,event:a})}_isSelected(e){return this.startValue===e||this.endValue===e}ngOnChanges(e){let a=e.numCols,{rows:t,numCols:r}=this;(e.rows||a)&&(this._firstRowOffset=t&&t.length&&t[0].length?r-t[0].length:0),(e.cellAspectRatio||a||!this._cellPadding)&&(this._cellPadding=`${50*this.cellAspectRatio/r}%`),(a||!this._cellWidth)&&(this._cellWidth=`${100/r}%`)}ngOnDestroy(){let e=this._elementRef.nativeElement;e.removeEventListener("touchmove",this._touchmoveHandler,ta),e.removeEventListener("mouseenter",this._enterHandler,$),e.removeEventListener("focus",this._enterHandler,$),e.removeEventListener("mouseleave",this._leaveHandler,$),e.removeEventListener("blur",this._leaveHandler,$),e.removeEventListener("mousedown",this._mousedownHandler,Ge),e.removeEventListener("touchstart",this._mousedownHandler,Ge),this._platform.isBrowser&&(window.removeEventListener("mouseup",this._mouseupHandler),window.removeEventListener("touchend",this._touchendHandler))}_isActiveCell(e,a){let t=e*this.numCols+a;return e&&(t-=this._firstRowOffset),t==this.activeCell}_focusActiveCell(e=!0){this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.pipe(Me(1)).subscribe(()=>{setTimeout(()=>{let a=this._elementRef.nativeElement.querySelector(".mat-calendar-body-active");a&&(e||(this._skipNextFocus=!0),a.focus())})})})}_scheduleFocusActiveCellAfterViewChecked(){this._focusActiveCellAfterViewChecked=!0}_isRangeStart(e){return gt(e,this.startValue,this.endValue)}_isRangeEnd(e){return ft(e,this.startValue,this.endValue)}_isInRange(e){return vt(e,this.startValue,this.endValue,this.isRange)}_isComparisonStart(e){return gt(e,this.comparisonStart,this.comparisonEnd)}_isComparisonBridgeStart(e,a,t){if(!this._isComparisonStart(e)||this._isRangeStart(e)||!this._isInRange(e))return!1;let r=this.rows[a][t-1];if(!r){let s=this.rows[a-1];r=s&&s[s.length-1]}return r&&!this._isRangeEnd(r.compareValue)}_isComparisonBridgeEnd(e,a,t){if(!this._isComparisonEnd(e)||this._isRangeEnd(e)||!this._isInRange(e))return!1;let r=this.rows[a][t+1];if(!r){let s=this.rows[a+1];r=s&&s[0]}return r&&!this._isRangeStart(r.compareValue)}_isComparisonEnd(e){return ft(e,this.comparisonStart,this.comparisonEnd)}_isInComparisonRange(e){return vt(e,this.comparisonStart,this.comparisonEnd,this.isRange)}_isComparisonIdentical(e){return this.comparisonStart===this.comparisonEnd&&e===this.comparisonStart}_isPreviewStart(e){return gt(e,this.previewStart,this.previewEnd)}_isPreviewEnd(e){return ft(e,this.previewStart,this.previewEnd)}_isInPreview(e){return vt(e,this.previewStart,this.previewEnd,this.isRange)}_getDescribedby(e){return this.isRange?this.startValue===e&&this.endValue===e?`${this._startDateLabelId} ${this._endDateLabelId}`:this.startValue===e?this._startDateLabelId:this.endValue===e?this._endDateLabelId:null:null}_getCellFromElement(e){let a=_t(e);if(a){let t=a.getAttribute("data-mat-row"),r=a.getAttribute("data-mat-col");if(t&&r)return this.rows[parseInt(t)][parseInt(r)]}return null}};i.\u0275fac=function(a){return new(a||i)(o(Y),o(at))},i.\u0275cmp=y({type:i,selectors:[["","mat-calendar-body",""]],hostAttrs:[1,"mat-calendar-body"],inputs:{label:"label",rows:"rows",todayValue:"todayValue",startValue:"startValue",endValue:"endValue",labelMinRequiredCells:"labelMinRequiredCells",numCols:"numCols",activeCell:"activeCell",isRange:"isRange",cellAspectRatio:"cellAspectRatio",comparisonStart:"comparisonStart",comparisonEnd:"comparisonEnd",previewStart:"previewStart",previewEnd:"previewEnd",startDateAccessibleName:"startDateAccessibleName",endDateAccessibleName:"endDateAccessibleName"},outputs:{selectedValueChange:"selectedValueChange",previewChange:"previewChange",activeDateChange:"activeDateChange",dragStarted:"dragStarted",dragEnded:"dragEnded"},exportAs:["matCalendarBody"],standalone:!0,features:[z,M],attrs:ya,decls:7,vars:5,consts:[["aria-hidden","true"],["role","row"],[1,"mat-calendar-body-hidden-label",3,"id"],[1,"mat-calendar-body-label"],[1,"mat-calendar-body-label",3,"paddingTop","paddingBottom"],["role","gridcell",1,"mat-calendar-body-cell-container",3,"width","paddingTop","paddingBottom"],["role","gridcell",1,"mat-calendar-body-cell-container"],["type","button",1,"mat-calendar-body-cell",3,"click","focus","ngClass","tabindex"],[1,"mat-calendar-body-cell-content","mat-focus-indicator"],["aria-hidden","true",1,"mat-calendar-body-cell-preview"]],template:function(a,t){a&1&&(K(0,Ca,3,6,"tr",0),Pe(1,ka,4,1,"tr",1,Oe),c(3,"label",2),D(4),u(),c(5,"label",2),D(6),u()),a&2&&(pe(0,t._firstRowOffset<t.labelMinRequiredCells?0:-1),h(),Ye(t.rows),h(2),v("id",t._startDateLabelId),h(),ie(" ",t.startDateAccessibleName,`
|
|
1
|
+
import{a as ut,b as pt,c as Jt}from"./chunk-TDHJ34QP.js";import{a as ea}from"./chunk-INNTQ5YN.js";import{d as Zt,e as ht}from"./chunk-DT3B54LD.js";import{f as Kt,g as lt,h as Qt,i as ct,j as qt,k as Wt,l as $t,m as be,p as Gt}from"./chunk-ZKBLXGXT.js";import{C as ot,D as zt,E as J,I as Ut,J as Xt,L as _,M as P,O as $e,f as Lt,g as Z,h as Bt,j as We,m as jt,x as Ht}from"./chunk-6B64VOO7.js";import{a as ze,d as Ke,e as ve,f as Yt,g as Nt,j as Qe,n as qe}from"./chunk-SP6QPE3M.js";import{$ as te,$a as rt,A as ce,Ab as D,B as kt,Bb as N,Cb as ie,Eb as Be,Fb as je,Gb as He,Hb as q,Hc as nt,I as Me,Ia as h,Ib as M,Ic as ge,Ja as o,Ka as Et,La as Ft,Lc as W,Mc as st,Nc as dt,Oc as fe,Qa as at,Ra as it,S as Ie,Ua as X,Va as ue,Wa as K,Xa as b,Ya as v,Za as Te,_ as Se,_a as T,a as x,aa as Mt,ac as L,ba as Ve,bb as pe,bc as B,c as H,ca as Ee,cb as Oe,da as he,db as Pe,ea as Fe,eb as Ye,fa as xe,fb as c,ga as F,gb as u,gc as Tt,ha as y,hb as Q,ia as It,ic as Ot,ja as R,lb as me,mb as Ne,n as ke,nb as xt,oa as z,ob as g,pa as C,pb as Rt,qa as A,qb as m,ra as et,rb as _e,sa as St,sb as ae,sc as Pt,ta as tt,ua as Vt,va as Re,vb as Le,wb as O,xb as w,ya as Y,yb as k,za as p}from"./chunk-6DRNAUKE.js";var ya=["mat-calendar-body",""];function Ca(n,i){if(n&1&&(c(0,"tr",0)(1,"td",3),D(2),u()()),n&2){let d=m();h(),Te("padding-top",d._cellPadding)("padding-bottom",d._cellPadding),b("colspan",d.numCols),h(),ie(" ",d.label," ")}}function Aa(n,i){if(n&1&&(c(0,"td",3),D(1),u()),n&2){let d=m(2);Te("padding-top",d._cellPadding)("padding-bottom",d._cellPadding),b("colspan",d._firstRowOffset),h(),ie(" ",d._firstRowOffset>=d.labelMinRequiredCells?d.label:""," ")}}function wa(n,i){if(n&1){let d=me();c(0,"td",6)(1,"button",7),g("click",function(a){let t=C(d).$implicit,r=m(2);return A(r._cellClicked(t,a))})("focus",function(a){let t=C(d).$implicit,r=m(2);return A(r._emitActiveDateChange(t,a))}),c(2,"span",8),D(3),u(),Q(4,"span",9),u()()}if(n&2){let d=i.$implicit,e=i.$index,a=m().$index,t=m();Te("width",t._cellWidth)("padding-top",t._cellPadding)("padding-bottom",t._cellPadding),b("data-mat-row",a)("data-mat-col",e),h(),T("mat-calendar-body-disabled",!d.enabled)("mat-calendar-body-active",t._isActiveCell(a,e))("mat-calendar-body-range-start",t._isRangeStart(d.compareValue))("mat-calendar-body-range-end",t._isRangeEnd(d.compareValue))("mat-calendar-body-in-range",t._isInRange(d.compareValue))("mat-calendar-body-comparison-bridge-start",t._isComparisonBridgeStart(d.compareValue,a,e))("mat-calendar-body-comparison-bridge-end",t._isComparisonBridgeEnd(d.compareValue,a,e))("mat-calendar-body-comparison-start",t._isComparisonStart(d.compareValue))("mat-calendar-body-comparison-end",t._isComparisonEnd(d.compareValue))("mat-calendar-body-in-comparison-range",t._isInComparisonRange(d.compareValue))("mat-calendar-body-preview-start",t._isPreviewStart(d.compareValue))("mat-calendar-body-preview-end",t._isPreviewEnd(d.compareValue))("mat-calendar-body-in-preview",t._isInPreview(d.compareValue)),v("ngClass",d.cssClasses)("tabindex",t._isActiveCell(a,e)?0:-1),b("aria-label",d.ariaLabel)("aria-disabled",!d.enabled||null)("aria-pressed",t._isSelected(d.compareValue))("aria-current",t.todayValue===d.compareValue?"date":null)("aria-describedby",t._getDescribedby(d.compareValue)),h(),T("mat-calendar-body-selected",t._isSelected(d.compareValue))("mat-calendar-body-comparison-identical",t._isComparisonIdentical(d.compareValue))("mat-calendar-body-today",t.todayValue===d.compareValue),h(),ie(" ",d.displayValue," ")}}function ka(n,i){if(n&1&&(c(0,"tr",1),K(1,Aa,2,6,"td",4),Pe(2,wa,5,48,"td",5,Oe),u()),n&2){let d=i.$implicit,e=i.$index,a=m();h(),pe(1,e===0&&a._firstRowOffset?1:-1),h(),Ye(d)}}function Ma(n,i){if(n&1&&(c(0,"th",2)(1,"span",6),D(2),u(),c(3,"span",3),D(4),u()()),n&2){let d=i.$implicit;h(2),N(d.long),h(2),N(d.narrow)}}var la=["*"];function Ia(n,i){}function Sa(n,i){if(n&1){let d=me();c(0,"mat-month-view",2),He("activeDateChange",function(a){C(d);let t=m();return je(t.activeDate,a)||(t.activeDate=a),A(a)}),g("_userSelection",function(a){C(d);let t=m();return A(t._dateSelected(a))})("dragStarted",function(a){C(d);let t=m();return A(t._dragStarted(a))})("dragEnded",function(a){C(d);let t=m();return A(t._dragEnded(a))}),u()}if(n&2){let d=m();Be("activeDate",d.activeDate),v("selected",d.selected)("dateFilter",d.dateFilter)("maxDate",d.maxDate)("minDate",d.minDate)("dateClass",d.dateClass)("comparisonStart",d.comparisonStart)("comparisonEnd",d.comparisonEnd)("startDateAccessibleName",d.startDateAccessibleName)("endDateAccessibleName",d.endDateAccessibleName)("activeDrag",d._activeDrag)}}function Va(n,i){if(n&1){let d=me();c(0,"mat-year-view",3),He("activeDateChange",function(a){C(d);let t=m();return je(t.activeDate,a)||(t.activeDate=a),A(a)}),g("monthSelected",function(a){C(d);let t=m();return A(t._monthSelectedInYearView(a))})("selectedChange",function(a){C(d);let t=m();return A(t._goToDateInView(a,"month"))}),u()}if(n&2){let d=m();Be("activeDate",d.activeDate),v("selected",d.selected)("dateFilter",d.dateFilter)("maxDate",d.maxDate)("minDate",d.minDate)("dateClass",d.dateClass)}}function Ea(n,i){if(n&1){let d=me();c(0,"mat-multi-year-view",4),He("activeDateChange",function(a){C(d);let t=m();return je(t.activeDate,a)||(t.activeDate=a),A(a)}),g("yearSelected",function(a){C(d);let t=m();return A(t._yearSelectedInMultiYearView(a))})("selectedChange",function(a){C(d);let t=m();return A(t._goToDateInView(a,"year"))}),u()}if(n&2){let d=m();Be("activeDate",d.activeDate),v("selected",d.selected)("dateFilter",d.dateFilter)("maxDate",d.maxDate)("minDate",d.minDate)("dateClass",d.dateClass)}}function Fa(n,i){}var xa=["button"],Ra=[[["","matDatepickerToggleIcon",""]]],Ta=["[matDatepickerToggleIcon]"];function Oa(n,i){n&1&&(et(),c(0,"svg",2),Q(1,"path",3),u())}var Pa=[[["input","matStartDate",""]],[["input","matEndDate",""]]],Ya=["input[matStartDate]","input[matEndDate]"];function Na(n,i){n&1&&(c(0,"div",0),ae(1),u())}var we=(()=>{let i=class i{constructor(){this.changes=new H,this.calendarLabel="Calendar",this.openCalendarLabel="Open calendar",this.closeCalendarLabel="Close calendar",this.prevMonthLabel="Previous month",this.nextMonthLabel="Next month",this.prevYearLabel="Previous year",this.nextYearLabel="Next year",this.prevMultiYearLabel="Previous 24 years",this.nextMultiYearLabel="Next 24 years",this.switchToMonthViewLabel="Choose date",this.switchToMultiYearViewLabel="Choose month and year",this.startDateLabel="Start date",this.endDateLabel="End date"}formatYearRange(e,a){return`${e} \u2013 ${a}`}formatYearRangeLabel(e,a){return`${e} to ${a}`}};i.\u0275fac=function(a){return new(a||i)},i.\u0275prov=te({token:i,factory:i.\u0275fac,providedIn:"root"});let n=i;return n})(),Ce=class{constructor(i,d,e,a,t={},r=i,s){this.value=i,this.displayValue=d,this.ariaLabel=e,this.enabled=a,this.cssClasses=t,this.compareValue=r,this.rawValue=s}},La=1,ta=We({passive:!1,capture:!0}),$=We({passive:!0,capture:!0}),Ge=We({passive:!0}),de=(()=>{let i=class i{ngAfterViewChecked(){this._focusActiveCellAfterViewChecked&&(this._focusActiveCell(),this._focusActiveCellAfterViewChecked=!1)}constructor(e,a){this._elementRef=e,this._ngZone=a,this._platform=he(Bt),this._focusActiveCellAfterViewChecked=!1,this.numCols=7,this.activeCell=0,this.isRange=!1,this.cellAspectRatio=1,this.previewStart=null,this.previewEnd=null,this.selectedValueChange=new p,this.previewChange=new p,this.activeDateChange=new p,this.dragStarted=new p,this.dragEnded=new p,this._didDragSinceMouseDown=!1,this._enterHandler=t=>{if(this._skipNextFocus&&t.type==="focus"){this._skipNextFocus=!1;return}if(t.target&&this.isRange){let r=this._getCellFromElement(t.target);r&&this._ngZone.run(()=>this.previewChange.emit({value:r.enabled?r:null,event:t}))}},this._touchmoveHandler=t=>{if(!this.isRange)return;let r=aa(t),s=r?this._getCellFromElement(r):null;r!==t.target&&(this._didDragSinceMouseDown=!0),_t(t.target)&&t.preventDefault(),this._ngZone.run(()=>this.previewChange.emit({value:s?.enabled?s:null,event:t}))},this._leaveHandler=t=>{this.previewEnd!==null&&this.isRange&&(t.type!=="blur"&&(this._didDragSinceMouseDown=!0),t.target&&this._getCellFromElement(t.target)&&!(t.relatedTarget&&this._getCellFromElement(t.relatedTarget))&&this._ngZone.run(()=>this.previewChange.emit({value:null,event:t})))},this._mousedownHandler=t=>{if(!this.isRange)return;this._didDragSinceMouseDown=!1;let r=t.target&&this._getCellFromElement(t.target);!r||!this._isInRange(r.compareValue)||this._ngZone.run(()=>{this.dragStarted.emit({value:r.rawValue,event:t})})},this._mouseupHandler=t=>{if(!this.isRange)return;let r=_t(t.target);if(!r){this._ngZone.run(()=>{this.dragEnded.emit({value:null,event:t})});return}r.closest(".mat-calendar-body")===this._elementRef.nativeElement&&this._ngZone.run(()=>{let s=this._getCellFromElement(r);this.dragEnded.emit({value:s?.rawValue??null,event:t})})},this._touchendHandler=t=>{let r=aa(t);r&&this._mouseupHandler({target:r})},this._id=`mat-calendar-body-${La++}`,this._startDateLabelId=`${this._id}-start-date`,this._endDateLabelId=`${this._id}-end-date`,a.runOutsideAngular(()=>{let t=e.nativeElement;t.addEventListener("touchmove",this._touchmoveHandler,ta),t.addEventListener("mouseenter",this._enterHandler,$),t.addEventListener("focus",this._enterHandler,$),t.addEventListener("mouseleave",this._leaveHandler,$),t.addEventListener("blur",this._leaveHandler,$),t.addEventListener("mousedown",this._mousedownHandler,Ge),t.addEventListener("touchstart",this._mousedownHandler,Ge),this._platform.isBrowser&&(window.addEventListener("mouseup",this._mouseupHandler),window.addEventListener("touchend",this._touchendHandler))})}_cellClicked(e,a){this._didDragSinceMouseDown||e.enabled&&this.selectedValueChange.emit({value:e.value,event:a})}_emitActiveDateChange(e,a){e.enabled&&this.activeDateChange.emit({value:e.value,event:a})}_isSelected(e){return this.startValue===e||this.endValue===e}ngOnChanges(e){let a=e.numCols,{rows:t,numCols:r}=this;(e.rows||a)&&(this._firstRowOffset=t&&t.length&&t[0].length?r-t[0].length:0),(e.cellAspectRatio||a||!this._cellPadding)&&(this._cellPadding=`${50*this.cellAspectRatio/r}%`),(a||!this._cellWidth)&&(this._cellWidth=`${100/r}%`)}ngOnDestroy(){let e=this._elementRef.nativeElement;e.removeEventListener("touchmove",this._touchmoveHandler,ta),e.removeEventListener("mouseenter",this._enterHandler,$),e.removeEventListener("focus",this._enterHandler,$),e.removeEventListener("mouseleave",this._leaveHandler,$),e.removeEventListener("blur",this._leaveHandler,$),e.removeEventListener("mousedown",this._mousedownHandler,Ge),e.removeEventListener("touchstart",this._mousedownHandler,Ge),this._platform.isBrowser&&(window.removeEventListener("mouseup",this._mouseupHandler),window.removeEventListener("touchend",this._touchendHandler))}_isActiveCell(e,a){let t=e*this.numCols+a;return e&&(t-=this._firstRowOffset),t==this.activeCell}_focusActiveCell(e=!0){this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.pipe(Me(1)).subscribe(()=>{setTimeout(()=>{let a=this._elementRef.nativeElement.querySelector(".mat-calendar-body-active");a&&(e||(this._skipNextFocus=!0),a.focus())})})})}_scheduleFocusActiveCellAfterViewChecked(){this._focusActiveCellAfterViewChecked=!0}_isRangeStart(e){return gt(e,this.startValue,this.endValue)}_isRangeEnd(e){return ft(e,this.startValue,this.endValue)}_isInRange(e){return vt(e,this.startValue,this.endValue,this.isRange)}_isComparisonStart(e){return gt(e,this.comparisonStart,this.comparisonEnd)}_isComparisonBridgeStart(e,a,t){if(!this._isComparisonStart(e)||this._isRangeStart(e)||!this._isInRange(e))return!1;let r=this.rows[a][t-1];if(!r){let s=this.rows[a-1];r=s&&s[s.length-1]}return r&&!this._isRangeEnd(r.compareValue)}_isComparisonBridgeEnd(e,a,t){if(!this._isComparisonEnd(e)||this._isRangeEnd(e)||!this._isInRange(e))return!1;let r=this.rows[a][t+1];if(!r){let s=this.rows[a+1];r=s&&s[0]}return r&&!this._isRangeStart(r.compareValue)}_isComparisonEnd(e){return ft(e,this.comparisonStart,this.comparisonEnd)}_isInComparisonRange(e){return vt(e,this.comparisonStart,this.comparisonEnd,this.isRange)}_isComparisonIdentical(e){return this.comparisonStart===this.comparisonEnd&&e===this.comparisonStart}_isPreviewStart(e){return gt(e,this.previewStart,this.previewEnd)}_isPreviewEnd(e){return ft(e,this.previewStart,this.previewEnd)}_isInPreview(e){return vt(e,this.previewStart,this.previewEnd,this.isRange)}_getDescribedby(e){return this.isRange?this.startValue===e&&this.endValue===e?`${this._startDateLabelId} ${this._endDateLabelId}`:this.startValue===e?this._startDateLabelId:this.endValue===e?this._endDateLabelId:null:null}_getCellFromElement(e){let a=_t(e);if(a){let t=a.getAttribute("data-mat-row"),r=a.getAttribute("data-mat-col");if(t&&r)return this.rows[parseInt(t)][parseInt(r)]}return null}};i.\u0275fac=function(a){return new(a||i)(o(Y),o(at))},i.\u0275cmp=y({type:i,selectors:[["","mat-calendar-body",""]],hostAttrs:[1,"mat-calendar-body"],inputs:{label:"label",rows:"rows",todayValue:"todayValue",startValue:"startValue",endValue:"endValue",labelMinRequiredCells:"labelMinRequiredCells",numCols:"numCols",activeCell:"activeCell",isRange:"isRange",cellAspectRatio:"cellAspectRatio",comparisonStart:"comparisonStart",comparisonEnd:"comparisonEnd",previewStart:"previewStart",previewEnd:"previewEnd",startDateAccessibleName:"startDateAccessibleName",endDateAccessibleName:"endDateAccessibleName"},outputs:{selectedValueChange:"selectedValueChange",previewChange:"previewChange",activeDateChange:"activeDateChange",dragStarted:"dragStarted",dragEnded:"dragEnded"},exportAs:["matCalendarBody"],standalone:!0,features:[z,M],attrs:ya,decls:7,vars:5,consts:[["aria-hidden","true"],["role","row"],[1,"mat-calendar-body-hidden-label",3,"id"],[1,"mat-calendar-body-label"],[1,"mat-calendar-body-label",3,"paddingTop","paddingBottom"],["role","gridcell",1,"mat-calendar-body-cell-container",3,"width","paddingTop","paddingBottom"],["role","gridcell",1,"mat-calendar-body-cell-container"],["type","button",1,"mat-calendar-body-cell",3,"click","focus","ngClass","tabindex"],[1,"mat-calendar-body-cell-content","mat-focus-indicator"],["aria-hidden","true",1,"mat-calendar-body-cell-preview"]],template:function(a,t){a&1&&(K(0,Ca,3,6,"tr",0),Pe(1,ka,4,1,"tr",1,Oe),c(3,"label",2),D(4),u(),c(5,"label",2),D(6),u()),a&2&&(pe(0,t._firstRowOffset<t.labelMinRequiredCells?0:-1),h(),Ye(t.rows),h(2),v("id",t._startDateLabelId),h(),ie(" ",t.startDateAccessibleName,`
|
|
2
2
|
`),h(),v("id",t._endDateLabelId),h(),ie(" ",t.endDateAccessibleName,`
|
|
3
3
|
`))},dependencies:[Ot],styles:['.mat-calendar-body{min-width:224px}.mat-calendar-body-today:not(.mat-calendar-body-selected):not(.mat-calendar-body-comparison-identical){border-color:var(--mat-datepicker-calendar-date-today-outline-color)}.mat-calendar-body-label{height:0;line-height:0;text-align:start;padding-left:4.7142857143%;padding-right:4.7142857143%;font-size:var(--mat-datepicker-calendar-body-label-text-size);font-weight:var(--mat-datepicker-calendar-body-label-text-weight);color:var(--mat-datepicker-calendar-body-label-text-color)}.mat-calendar-body-hidden-label{display:none}.mat-calendar-body-cell-container{position:relative;height:0;line-height:0}.mat-calendar-body-cell{-webkit-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:rgba(0,0,0,0);position:absolute;top:0;left:0;width:100%;height:100%;background:none;text-align:center;outline:none;font-family:inherit;margin:0}.mat-calendar-body-cell::-moz-focus-inner{border:0}.mat-calendar-body-cell::before,.mat-calendar-body-cell::after,.mat-calendar-body-cell-preview{content:"";position:absolute;top:5%;left:0;z-index:0;box-sizing:border-box;display:block;height:90%;width:100%}.mat-calendar-body-range-start:not(.mat-calendar-body-in-comparison-range)::before,.mat-calendar-body-range-start::after,.mat-calendar-body-comparison-start:not(.mat-calendar-body-comparison-bridge-start)::before,.mat-calendar-body-comparison-start::after,.mat-calendar-body-preview-start .mat-calendar-body-cell-preview{left:5%;width:95%;border-top-left-radius:999px;border-bottom-left-radius:999px}[dir=rtl] .mat-calendar-body-range-start:not(.mat-calendar-body-in-comparison-range)::before,[dir=rtl] .mat-calendar-body-range-start::after,[dir=rtl] .mat-calendar-body-comparison-start:not(.mat-calendar-body-comparison-bridge-start)::before,[dir=rtl] .mat-calendar-body-comparison-start::after,[dir=rtl] .mat-calendar-body-preview-start .mat-calendar-body-cell-preview{left:0;border-radius:0;border-top-right-radius:999px;border-bottom-right-radius:999px}.mat-calendar-body-range-end:not(.mat-calendar-body-in-comparison-range)::before,.mat-calendar-body-range-end::after,.mat-calendar-body-comparison-end:not(.mat-calendar-body-comparison-bridge-end)::before,.mat-calendar-body-comparison-end::after,.mat-calendar-body-preview-end .mat-calendar-body-cell-preview{width:95%;border-top-right-radius:999px;border-bottom-right-radius:999px}[dir=rtl] .mat-calendar-body-range-end:not(.mat-calendar-body-in-comparison-range)::before,[dir=rtl] .mat-calendar-body-range-end::after,[dir=rtl] .mat-calendar-body-comparison-end:not(.mat-calendar-body-comparison-bridge-end)::before,[dir=rtl] .mat-calendar-body-comparison-end::after,[dir=rtl] .mat-calendar-body-preview-end .mat-calendar-body-cell-preview{left:5%;border-radius:0;border-top-left-radius:999px;border-bottom-left-radius:999px}[dir=rtl] .mat-calendar-body-comparison-bridge-start.mat-calendar-body-range-end::after,[dir=rtl] .mat-calendar-body-comparison-bridge-end.mat-calendar-body-range-start::after{width:95%;border-top-right-radius:999px;border-bottom-right-radius:999px}.mat-calendar-body-comparison-start.mat-calendar-body-range-end::after,[dir=rtl] .mat-calendar-body-comparison-start.mat-calendar-body-range-end::after,.mat-calendar-body-comparison-end.mat-calendar-body-range-start::after,[dir=rtl] .mat-calendar-body-comparison-end.mat-calendar-body-range-start::after{width:90%}.mat-calendar-body-in-preview{color:var(--mat-datepicker-calendar-date-preview-state-outline-color)}.mat-calendar-body-in-preview .mat-calendar-body-cell-preview{border-top:dashed 1px;border-bottom:dashed 1px}.mat-calendar-body-preview-start .mat-calendar-body-cell-preview{border-left:dashed 1px}[dir=rtl] .mat-calendar-body-preview-start .mat-calendar-body-cell-preview{border-left:0;border-right:dashed 1px}.mat-calendar-body-preview-end .mat-calendar-body-cell-preview{border-right:dashed 1px}[dir=rtl] .mat-calendar-body-preview-end .mat-calendar-body-cell-preview{border-right:0;border-left:dashed 1px}.mat-calendar-body-disabled{cursor:default}.mat-calendar-body-disabled>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected):not(.mat-calendar-body-comparison-identical){color:var(--mat-datepicker-calendar-date-disabled-state-text-color)}.mat-calendar-body-disabled>.mat-calendar-body-today:not(.mat-calendar-body-selected):not(.mat-calendar-body-comparison-identical){border-color:var(--mat-datepicker-calendar-date-today-disabled-state-outline-color)}.cdk-high-contrast-active .mat-calendar-body-disabled{opacity:.5}.mat-calendar-body-cell-content{top:5%;left:5%;z-index:1;display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:90%;height:90%;line-height:1;border-width:1px;border-style:solid;border-radius:999px;color:var(--mat-datepicker-calendar-date-text-color);border-color:var(--mat-datepicker-calendar-date-outline-color)}.mat-calendar-body-cell-content.mat-focus-indicator{position:absolute}.cdk-high-contrast-active .mat-calendar-body-cell-content{border:none}.cdk-keyboard-focused .mat-calendar-body-active>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected):not(.mat-calendar-body-comparison-identical),.cdk-program-focused .mat-calendar-body-active>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected):not(.mat-calendar-body-comparison-identical){background-color:var(--mat-datepicker-calendar-date-focus-state-background-color)}@media(hover: hover){.mat-calendar-body-cell:not(.mat-calendar-body-disabled):hover>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected):not(.mat-calendar-body-comparison-identical){background-color:var(--mat-datepicker-calendar-date-hover-state-background-color)}}.mat-calendar-body-selected{background-color:var(--mat-datepicker-calendar-date-selected-state-background-color);color:var(--mat-datepicker-calendar-date-selected-state-text-color)}.mat-calendar-body-disabled>.mat-calendar-body-selected{background-color:var(--mat-datepicker-calendar-date-selected-disabled-state-background-color)}.mat-calendar-body-selected.mat-calendar-body-today{box-shadow:inset 0 0 0 1px var(--mat-datepicker-calendar-date-today-selected-state-outline-color)}.mat-calendar-body-in-range::before{background:var(--mat-datepicker-calendar-date-in-range-state-background-color)}.mat-calendar-body-comparison-identical,.mat-calendar-body-in-comparison-range::before{background:var(--mat-datepicker-calendar-date-in-comparison-range-state-background-color)}.mat-calendar-body-comparison-identical,.mat-calendar-body-in-comparison-range::before{background:var(--mat-datepicker-calendar-date-in-comparison-range-state-background-color)}.mat-calendar-body-comparison-bridge-start::before,[dir=rtl] .mat-calendar-body-comparison-bridge-end::before{background:linear-gradient(to right, var(--mat-datepicker-calendar-date-in-range-state-background-color) 50%, var(--mat-datepicker-calendar-date-in-comparison-range-state-background-color) 50%)}.mat-calendar-body-comparison-bridge-end::before,[dir=rtl] .mat-calendar-body-comparison-bridge-start::before{background:linear-gradient(to left, var(--mat-datepicker-calendar-date-in-range-state-background-color) 50%, var(--mat-datepicker-calendar-date-in-comparison-range-state-background-color) 50%)}.mat-calendar-body-in-range>.mat-calendar-body-comparison-identical,.mat-calendar-body-in-comparison-range.mat-calendar-body-in-range::after{background:var(--mat-datepicker-calendar-date-in-overlap-range-state-background-color)}.mat-calendar-body-comparison-identical.mat-calendar-body-selected,.mat-calendar-body-in-comparison-range>.mat-calendar-body-selected{background:var(--mat-datepicker-calendar-date-in-overlap-range-selected-state-background-color)}.cdk-high-contrast-active .mat-datepicker-popup:not(:empty),.cdk-high-contrast-active .mat-calendar-body-cell:not(.mat-calendar-body-in-range) .mat-calendar-body-selected{outline:solid 1px}.cdk-high-contrast-active .mat-calendar-body-today{outline:dotted 1px}.cdk-high-contrast-active .mat-calendar-body-cell::before,.cdk-high-contrast-active .mat-calendar-body-cell::after,.cdk-high-contrast-active .mat-calendar-body-selected{background:none}.cdk-high-contrast-active .mat-calendar-body-in-range::before,.cdk-high-contrast-active .mat-calendar-body-comparison-bridge-start::before,.cdk-high-contrast-active .mat-calendar-body-comparison-bridge-end::before{border-top:solid 1px;border-bottom:solid 1px}.cdk-high-contrast-active .mat-calendar-body-range-start::before{border-left:solid 1px}[dir=rtl] .cdk-high-contrast-active .mat-calendar-body-range-start::before{border-left:0;border-right:solid 1px}.cdk-high-contrast-active .mat-calendar-body-range-end::before{border-right:solid 1px}[dir=rtl] .cdk-high-contrast-active .mat-calendar-body-range-end::before{border-right:0;border-left:solid 1px}.cdk-high-contrast-active .mat-calendar-body-in-comparison-range::before{border-top:dashed 1px;border-bottom:dashed 1px}.cdk-high-contrast-active .mat-calendar-body-comparison-start::before{border-left:dashed 1px}[dir=rtl] .cdk-high-contrast-active .mat-calendar-body-comparison-start::before{border-left:0;border-right:dashed 1px}.cdk-high-contrast-active .mat-calendar-body-comparison-end::before{border-right:dashed 1px}[dir=rtl] .cdk-high-contrast-active .mat-calendar-body-comparison-end::before{border-right:0;border-left:dashed 1px}'],encapsulation:2,changeDetection:0});let n=i;return n})();function mt(n){return n?.nodeName==="TD"}function _t(n){let i;return mt(n)?i=n:mt(n.parentNode)?i=n.parentNode:mt(n.parentNode?.parentNode)&&(i=n.parentNode.parentNode),i?.getAttribute("data-mat-row")!=null?i:null}function gt(n,i,d){return d!==null&&i!==d&&n<d&&n===i}function ft(n,i,d){return i!==null&&i!==d&&n>=i&&n===d}function vt(n,i,d,e){return e&&i!==null&&d!==null&&i!==d&&n>=i&&n<=d}function aa(n){let i=n.changedTouches[0];return document.elementFromPoint(i.clientX,i.clientY)}var f=class{constructor(i,d){this.start=i,this.end=d}},G=(()=>{let i=class i{constructor(e,a){this.selection=e,this._adapter=a,this._selectionChanged=new H,this.selectionChanged=this._selectionChanged,this.selection=e}updateSelection(e,a){let t=this.selection;this.selection=e,this._selectionChanged.next({selection:e,source:a,oldValue:t})}ngOnDestroy(){this._selectionChanged.complete()}_isValidDateInstance(e){return this._adapter.isDateInstance(e)&&this._adapter.isValid(e)}};i.\u0275fac=function(a){Et()},i.\u0275prov=te({token:i,factory:i.\u0275fac});let n=i;return n})(),Ba=(()=>{let i=class i extends G{constructor(e){super(null,e)}add(e){super.updateSelection(e,this)}isValid(){return this.selection!=null&&this._isValidDateInstance(this.selection)}isComplete(){return this.selection!=null}clone(){let e=new i(this._adapter);return e.updateSelection(this.selection,this),e}};i.\u0275fac=function(a){return new(a||i)(Ee(_))},i.\u0275prov=te({token:i,factory:i.\u0275fac});let n=i;return n})(),ja=(()=>{let i=class i extends G{constructor(e){super(new f(null,null),e)}add(e){let{start:a,end:t}=this.selection;a==null?a=e:t==null?t=e:(a=e,t=null),super.updateSelection(new f(a,t),this)}isValid(){let{start:e,end:a}=this.selection;return e==null&&a==null?!0:e!=null&&a!=null?this._isValidDateInstance(e)&&this._isValidDateInstance(a)&&this._adapter.compareDate(e,a)<=0:(e==null||this._isValidDateInstance(e))&&(a==null||this._isValidDateInstance(a))}isComplete(){return this.selection.start!=null&&this.selection.end!=null}clone(){let e=new i(this._adapter);return e.updateSelection(this.selection,this),e}};i.\u0275fac=function(a){return new(a||i)(Ee(_))},i.\u0275prov=te({token:i,factory:i.\u0275fac});let n=i;return n})();function Ha(n,i){return n||new Ba(i)}var ca={provide:G,deps:[[new Fe,new xe,G],_],useFactory:Ha};function za(n,i){return n||new ja(i)}var Ka={provide:G,deps:[[new Fe,new xe,G],_],useFactory:za},Ue=new Ve("MAT_DATE_RANGE_SELECTION_STRATEGY"),Qa=(()=>{let i=class i{constructor(e){this._dateAdapter=e}selectionFinished(e,a){let{start:t,end:r}=a;return t==null?t=e:r==null&&e&&this._dateAdapter.compareDate(e,t)>=0?r=e:(t=e,r=null),new f(t,r)}createPreview(e,a){let t=null,r=null;return a.start&&!a.end&&e&&(t=a.start,r=e),new f(t,r)}createDrag(e,a,t){let r=a.start,s=a.end;if(!r||!s)return null;let l=this._dateAdapter,S=l.compareDate(r,s)!==0,V=l.getYear(t)-l.getYear(e),j=l.getMonth(t)-l.getMonth(e),E=l.getDate(t)-l.getDate(e);return S&&l.sameDate(e,a.start)?(r=t,l.compareDate(t,s)>0&&(s=l.addCalendarYears(s,V),s=l.addCalendarMonths(s,j),s=l.addCalendarDays(s,E))):S&&l.sameDate(e,a.end)?(s=t,l.compareDate(t,r)<0&&(r=l.addCalendarYears(r,V),r=l.addCalendarMonths(r,j),r=l.addCalendarDays(r,E))):(r=l.addCalendarYears(r,V),r=l.addCalendarMonths(r,j),r=l.addCalendarDays(r,E),s=l.addCalendarYears(s,V),s=l.addCalendarMonths(s,j),s=l.addCalendarDays(s,E)),new f(r,s)}};i.\u0275fac=function(a){return new(a||i)(Ee(_))},i.\u0275prov=te({token:i,factory:i.\u0275fac});let n=i;return n})();function qa(n,i){return n||new Qa(i)}var Wa={provide:Ue,deps:[[new Fe,new xe,Ue],_],useFactory:qa},bt=7,ia=(()=>{let i=class i{get activeDate(){return this._activeDate}set activeDate(e){let a=this._activeDate,t=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e))||this._dateAdapter.today();this._activeDate=this._dateAdapter.clampDate(t,this.minDate,this.maxDate),this._hasSameMonthAndYear(a,this._activeDate)||this._init()}get selected(){return this._selected}set selected(e){e instanceof f?this._selected=e:this._selected=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e)),this._setRanges(this._selected)}get minDate(){return this._minDate}set minDate(e){this._minDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e))}get maxDate(){return this._maxDate}set maxDate(e){this._maxDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e))}constructor(e,a,t,r,s){this._changeDetectorRef=e,this._dateFormats=a,this._dateAdapter=t,this._dir=r,this._rangeStrategy=s,this._rerenderSubscription=x.EMPTY,this.activeDrag=null,this.selectedChange=new p,this._userSelection=new p,this.dragStarted=new p,this.dragEnded=new p,this.activeDateChange=new p,this._activeDate=this._dateAdapter.today()}ngAfterContentInit(){this._rerenderSubscription=this._dateAdapter.localeChanges.pipe(Ie(null)).subscribe(()=>this._init())}ngOnChanges(e){let a=e.comparisonStart||e.comparisonEnd;a&&!a.firstChange&&this._setRanges(this.selected),e.activeDrag&&!this.activeDrag&&this._clearPreview()}ngOnDestroy(){this._rerenderSubscription.unsubscribe()}_dateSelected(e){let a=e.value,t=this._getDateFromDayOfMonth(a),r,s;this._selected instanceof f?(r=this._getDateInCurrentMonth(this._selected.start),s=this._getDateInCurrentMonth(this._selected.end)):r=s=this._getDateInCurrentMonth(this._selected),(r!==a||s!==a)&&this.selectedChange.emit(t),this._userSelection.emit({value:t,event:e.event}),this._clearPreview(),this._changeDetectorRef.markForCheck()}_updateActiveDate(e){let a=e.value,t=this._activeDate;this.activeDate=this._getDateFromDayOfMonth(a),this._dateAdapter.compareDate(t,this.activeDate)&&this.activeDateChange.emit(this._activeDate)}_handleCalendarBodyKeydown(e){let a=this._activeDate,t=this._isRtl();switch(e.keyCode){case 37:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,t?1:-1);break;case 39:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,t?-1:1);break;case 38:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,-7);break;case 40:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,7);break;case 36:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,1-this._dateAdapter.getDate(this._activeDate));break;case 35:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,this._dateAdapter.getNumDaysInMonth(this._activeDate)-this._dateAdapter.getDate(this._activeDate));break;case 33:this.activeDate=e.altKey?this._dateAdapter.addCalendarYears(this._activeDate,-1):this._dateAdapter.addCalendarMonths(this._activeDate,-1);break;case 34:this.activeDate=e.altKey?this._dateAdapter.addCalendarYears(this._activeDate,1):this._dateAdapter.addCalendarMonths(this._activeDate,1);break;case 13:case 32:this._selectionKeyPressed=!0,this._canSelect(this._activeDate)&&e.preventDefault();return;case 27:this._previewEnd!=null&&!Z(e)&&(this._clearPreview(),this.activeDrag?this.dragEnded.emit({value:null,event:e}):(this.selectedChange.emit(null),this._userSelection.emit({value:null,event:e})),e.preventDefault(),e.stopPropagation());return;default:return}this._dateAdapter.compareDate(a,this.activeDate)&&(this.activeDateChange.emit(this.activeDate),this._focusActiveCellAfterViewChecked()),e.preventDefault()}_handleCalendarBodyKeyup(e){(e.keyCode===32||e.keyCode===13)&&(this._selectionKeyPressed&&this._canSelect(this._activeDate)&&this._dateSelected({value:this._dateAdapter.getDate(this._activeDate),event:e}),this._selectionKeyPressed=!1)}_init(){this._setRanges(this.selected),this._todayDate=this._getCellCompareValue(this._dateAdapter.today()),this._monthLabel=this._dateFormats.display.monthLabel?this._dateAdapter.format(this.activeDate,this._dateFormats.display.monthLabel):this._dateAdapter.getMonthNames("short")[this._dateAdapter.getMonth(this.activeDate)].toLocaleUpperCase();let e=this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),this._dateAdapter.getMonth(this.activeDate),1);this._firstWeekOffset=(bt+this._dateAdapter.getDayOfWeek(e)-this._dateAdapter.getFirstDayOfWeek())%bt,this._initWeekdays(),this._createWeekCells(),this._changeDetectorRef.markForCheck()}_focusActiveCell(e){this._matCalendarBody._focusActiveCell(e)}_focusActiveCellAfterViewChecked(){this._matCalendarBody._scheduleFocusActiveCellAfterViewChecked()}_previewChanged({event:e,value:a}){if(this._rangeStrategy){let t=a?a.rawValue:null,r=this._rangeStrategy.createPreview(t,this.selected,e);if(this._previewStart=this._getCellCompareValue(r.start),this._previewEnd=this._getCellCompareValue(r.end),this.activeDrag&&t){let s=this._rangeStrategy.createDrag?.(this.activeDrag.value,this.selected,t,e);s&&(this._previewStart=this._getCellCompareValue(s.start),this._previewEnd=this._getCellCompareValue(s.end))}this._changeDetectorRef.detectChanges()}}_dragEnded(e){if(this.activeDrag)if(e.value){let a=this._rangeStrategy?.createDrag?.(this.activeDrag.value,this.selected,e.value,e.event);this.dragEnded.emit({value:a??null,event:e.event})}else this.dragEnded.emit({value:null,event:e.event})}_getDateFromDayOfMonth(e){return this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),this._dateAdapter.getMonth(this.activeDate),e)}_initWeekdays(){let e=this._dateAdapter.getFirstDayOfWeek(),a=this._dateAdapter.getDayOfWeekNames("narrow"),r=this._dateAdapter.getDayOfWeekNames("long").map((s,l)=>({long:s,narrow:a[l]}));this._weekdays=r.slice(e).concat(r.slice(0,e))}_createWeekCells(){let e=this._dateAdapter.getNumDaysInMonth(this.activeDate),a=this._dateAdapter.getDateNames();this._weeks=[[]];for(let t=0,r=this._firstWeekOffset;t<e;t++,r++){r==bt&&(this._weeks.push([]),r=0);let s=this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),this._dateAdapter.getMonth(this.activeDate),t+1),l=this._shouldEnableDate(s),S=this._dateAdapter.format(s,this._dateFormats.display.dateA11yLabel),V=this.dateClass?this.dateClass(s,"month"):void 0;this._weeks[this._weeks.length-1].push(new Ce(t+1,a[t],S,l,V,this._getCellCompareValue(s),s))}}_shouldEnableDate(e){return!!e&&(!this.minDate||this._dateAdapter.compareDate(e,this.minDate)>=0)&&(!this.maxDate||this._dateAdapter.compareDate(e,this.maxDate)<=0)&&(!this.dateFilter||this.dateFilter(e))}_getDateInCurrentMonth(e){return e&&this._hasSameMonthAndYear(e,this.activeDate)?this._dateAdapter.getDate(e):null}_hasSameMonthAndYear(e,a){return!!(e&&a&&this._dateAdapter.getMonth(e)==this._dateAdapter.getMonth(a)&&this._dateAdapter.getYear(e)==this._dateAdapter.getYear(a))}_getCellCompareValue(e){if(e){let a=this._dateAdapter.getYear(e),t=this._dateAdapter.getMonth(e),r=this._dateAdapter.getDate(e);return new Date(a,t,r).getTime()}return null}_isRtl(){return this._dir&&this._dir.value==="rtl"}_setRanges(e){e instanceof f?(this._rangeStart=this._getCellCompareValue(e.start),this._rangeEnd=this._getCellCompareValue(e.end),this._isRange=!0):(this._rangeStart=this._rangeEnd=this._getCellCompareValue(e),this._isRange=!1),this._comparisonRangeStart=this._getCellCompareValue(this.comparisonStart),this._comparisonRangeEnd=this._getCellCompareValue(this.comparisonEnd)}_canSelect(e){return!this.dateFilter||this.dateFilter(e)}_clearPreview(){this._previewStart=this._previewEnd=null}};i.\u0275fac=function(a){return new(a||i)(o(L),o(P,8),o(_,8),o(J,8),o(Ue,8))},i.\u0275cmp=y({type:i,selectors:[["mat-month-view"]],viewQuery:function(a,t){if(a&1&&O(de,5),a&2){let r;w(r=k())&&(t._matCalendarBody=r.first)}},inputs:{activeDate:"activeDate",selected:"selected",minDate:"minDate",maxDate:"maxDate",dateFilter:"dateFilter",dateClass:"dateClass",comparisonStart:"comparisonStart",comparisonEnd:"comparisonEnd",startDateAccessibleName:"startDateAccessibleName",endDateAccessibleName:"endDateAccessibleName",activeDrag:"activeDrag"},outputs:{selectedChange:"selectedChange",_userSelection:"_userSelection",dragStarted:"dragStarted",dragEnded:"dragEnded",activeDateChange:"activeDateChange"},exportAs:["matMonthView"],standalone:!0,features:[z,M],decls:8,vars:14,consts:[["role","grid",1,"mat-calendar-table"],[1,"mat-calendar-table-header"],["scope","col"],["aria-hidden","true"],["colspan","7",1,"mat-calendar-table-header-divider"],["mat-calendar-body","",3,"selectedValueChange","activeDateChange","previewChange","dragStarted","dragEnded","keyup","keydown","label","rows","todayValue","startValue","endValue","comparisonStart","comparisonEnd","previewStart","previewEnd","isRange","labelMinRequiredCells","activeCell","startDateAccessibleName","endDateAccessibleName"],[1,"cdk-visually-hidden"]],template:function(a,t){a&1&&(c(0,"table",0)(1,"thead",1)(2,"tr"),Pe(3,Ma,5,2,"th",2,Oe),u(),c(5,"tr",3),Q(6,"th",4),u()(),c(7,"tbody",5),g("selectedValueChange",function(s){return t._dateSelected(s)})("activeDateChange",function(s){return t._updateActiveDate(s)})("previewChange",function(s){return t._previewChanged(s)})("dragStarted",function(s){return t.dragStarted.emit(s)})("dragEnded",function(s){return t._dragEnded(s)})("keyup",function(s){return t._handleCalendarBodyKeyup(s)})("keydown",function(s){return t._handleCalendarBodyKeydown(s)}),u()()),a&2&&(h(3),Ye(t._weekdays),h(4),v("label",t._monthLabel)("rows",t._weeks)("todayValue",t._todayDate)("startValue",t._rangeStart)("endValue",t._rangeEnd)("comparisonStart",t._comparisonRangeStart)("comparisonEnd",t._comparisonRangeEnd)("previewStart",t._previewStart)("previewEnd",t._previewEnd)("isRange",t._isRange)("labelMinRequiredCells",3)("activeCell",t._dateAdapter.getDate(t.activeDate)-1)("startDateAccessibleName",t.startDateAccessibleName)("endDateAccessibleName",t.endDateAccessibleName))},dependencies:[de],encapsulation:2,changeDetection:0});let n=i;return n})(),I=24,Dt=4,ra=(()=>{let i=class i{get activeDate(){return this._activeDate}set activeDate(e){let a=this._activeDate,t=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e))||this._dateAdapter.today();this._activeDate=this._dateAdapter.clampDate(t,this.minDate,this.maxDate),ha(this._dateAdapter,a,this._activeDate,this.minDate,this.maxDate)||this._init()}get selected(){return this._selected}set selected(e){e instanceof f?this._selected=e:this._selected=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e)),this._setSelectedYear(e)}get minDate(){return this._minDate}set minDate(e){this._minDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e))}get maxDate(){return this._maxDate}set maxDate(e){this._maxDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e))}constructor(e,a,t){this._changeDetectorRef=e,this._dateAdapter=a,this._dir=t,this._rerenderSubscription=x.EMPTY,this.selectedChange=new p,this.yearSelected=new p,this.activeDateChange=new p,this._dateAdapter,this._activeDate=this._dateAdapter.today()}ngAfterContentInit(){this._rerenderSubscription=this._dateAdapter.localeChanges.pipe(Ie(null)).subscribe(()=>this._init())}ngOnDestroy(){this._rerenderSubscription.unsubscribe()}_init(){this._todayYear=this._dateAdapter.getYear(this._dateAdapter.today());let a=this._dateAdapter.getYear(this._activeDate)-De(this._dateAdapter,this.activeDate,this.minDate,this.maxDate);this._years=[];for(let t=0,r=[];t<I;t++)r.push(a+t),r.length==Dt&&(this._years.push(r.map(s=>this._createCellForYear(s))),r=[]);this._changeDetectorRef.markForCheck()}_yearSelected(e){let a=e.value,t=this._dateAdapter.createDate(a,0,1),r=this._getDateFromYear(a);this.yearSelected.emit(t),this.selectedChange.emit(r)}_updateActiveDate(e){let a=e.value,t=this._activeDate;this.activeDate=this._getDateFromYear(a),this._dateAdapter.compareDate(t,this.activeDate)&&this.activeDateChange.emit(this.activeDate)}_handleCalendarBodyKeydown(e){let a=this._activeDate,t=this._isRtl();switch(e.keyCode){case 37:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,t?1:-1);break;case 39:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,t?-1:1);break;case 38:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,-Dt);break;case 40:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,Dt);break;case 36:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,-De(this._dateAdapter,this.activeDate,this.minDate,this.maxDate));break;case 35:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,I-De(this._dateAdapter,this.activeDate,this.minDate,this.maxDate)-1);break;case 33:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,e.altKey?-I*10:-I);break;case 34:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,e.altKey?I*10:I);break;case 13:case 32:this._selectionKeyPressed=!0;break;default:return}this._dateAdapter.compareDate(a,this.activeDate)&&this.activeDateChange.emit(this.activeDate),this._focusActiveCellAfterViewChecked(),e.preventDefault()}_handleCalendarBodyKeyup(e){(e.keyCode===32||e.keyCode===13)&&(this._selectionKeyPressed&&this._yearSelected({value:this._dateAdapter.getYear(this._activeDate),event:e}),this._selectionKeyPressed=!1)}_getActiveCell(){return De(this._dateAdapter,this.activeDate,this.minDate,this.maxDate)}_focusActiveCell(){this._matCalendarBody._focusActiveCell()}_focusActiveCellAfterViewChecked(){this._matCalendarBody._scheduleFocusActiveCellAfterViewChecked()}_getDateFromYear(e){let a=this._dateAdapter.getMonth(this.activeDate),t=this._dateAdapter.getNumDaysInMonth(this._dateAdapter.createDate(e,a,1));return this._dateAdapter.createDate(e,a,Math.min(this._dateAdapter.getDate(this.activeDate),t))}_createCellForYear(e){let a=this._dateAdapter.createDate(e,0,1),t=this._dateAdapter.getYearName(a),r=this.dateClass?this.dateClass(a,"multi-year"):void 0;return new Ce(e,t,t,this._shouldEnableYear(e),r)}_shouldEnableYear(e){if(e==null||this.maxDate&&e>this._dateAdapter.getYear(this.maxDate)||this.minDate&&e<this._dateAdapter.getYear(this.minDate))return!1;if(!this.dateFilter)return!0;let a=this._dateAdapter.createDate(e,0,1);for(let t=a;this._dateAdapter.getYear(t)==e;t=this._dateAdapter.addCalendarDays(t,1))if(this.dateFilter(t))return!0;return!1}_isRtl(){return this._dir&&this._dir.value==="rtl"}_setSelectedYear(e){if(this._selectedYear=null,e instanceof f){let a=e.start||e.end;a&&(this._selectedYear=this._dateAdapter.getYear(a))}else e&&(this._selectedYear=this._dateAdapter.getYear(e))}};i.\u0275fac=function(a){return new(a||i)(o(L),o(_,8),o(J,8))},i.\u0275cmp=y({type:i,selectors:[["mat-multi-year-view"]],viewQuery:function(a,t){if(a&1&&O(de,5),a&2){let r;w(r=k())&&(t._matCalendarBody=r.first)}},inputs:{activeDate:"activeDate",selected:"selected",minDate:"minDate",maxDate:"maxDate",dateFilter:"dateFilter",dateClass:"dateClass"},outputs:{selectedChange:"selectedChange",yearSelected:"yearSelected",activeDateChange:"activeDateChange"},exportAs:["matMultiYearView"],standalone:!0,features:[M],decls:5,vars:7,consts:[["role","grid",1,"mat-calendar-table"],["aria-hidden","true",1,"mat-calendar-table-header"],["colspan","4",1,"mat-calendar-table-header-divider"],["mat-calendar-body","",3,"selectedValueChange","activeDateChange","keyup","keydown","rows","todayValue","startValue","endValue","numCols","cellAspectRatio","activeCell"]],template:function(a,t){a&1&&(c(0,"table",0)(1,"thead",1)(2,"tr"),Q(3,"th",2),u()(),c(4,"tbody",3),g("selectedValueChange",function(s){return t._yearSelected(s)})("activeDateChange",function(s){return t._updateActiveDate(s)})("keyup",function(s){return t._handleCalendarBodyKeyup(s)})("keydown",function(s){return t._handleCalendarBodyKeydown(s)}),u()()),a&2&&(h(4),v("rows",t._years)("todayValue",t._todayYear)("startValue",t._selectedYear)("endValue",t._selectedYear)("numCols",4)("cellAspectRatio",4/7)("activeCell",t._getActiveCell()))},dependencies:[de],encapsulation:2,changeDetection:0});let n=i;return n})();function ha(n,i,d,e,a){let t=n.getYear(i),r=n.getYear(d),s=ua(n,e,a);return Math.floor((t-s)/I)===Math.floor((r-s)/I)}function De(n,i,d,e){let a=n.getYear(i);return $a(a-ua(n,d,e),I)}function ua(n,i,d){let e=0;return d?e=n.getYear(d)-I+1:i&&(e=n.getYear(i)),e}function $a(n,i){return(n%i+i)%i}var na=(()=>{let i=class i{get activeDate(){return this._activeDate}set activeDate(e){let a=this._activeDate,t=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e))||this._dateAdapter.today();this._activeDate=this._dateAdapter.clampDate(t,this.minDate,this.maxDate),this._dateAdapter.getYear(a)!==this._dateAdapter.getYear(this._activeDate)&&this._init()}get selected(){return this._selected}set selected(e){e instanceof f?this._selected=e:this._selected=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e)),this._setSelectedMonth(e)}get minDate(){return this._minDate}set minDate(e){this._minDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e))}get maxDate(){return this._maxDate}set maxDate(e){this._maxDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e))}constructor(e,a,t,r){this._changeDetectorRef=e,this._dateFormats=a,this._dateAdapter=t,this._dir=r,this._rerenderSubscription=x.EMPTY,this.selectedChange=new p,this.monthSelected=new p,this.activeDateChange=new p,this._activeDate=this._dateAdapter.today()}ngAfterContentInit(){this._rerenderSubscription=this._dateAdapter.localeChanges.pipe(Ie(null)).subscribe(()=>this._init())}ngOnDestroy(){this._rerenderSubscription.unsubscribe()}_monthSelected(e){let a=e.value,t=this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),a,1);this.monthSelected.emit(t);let r=this._getDateFromMonth(a);this.selectedChange.emit(r)}_updateActiveDate(e){let a=e.value,t=this._activeDate;this.activeDate=this._getDateFromMonth(a),this._dateAdapter.compareDate(t,this.activeDate)&&this.activeDateChange.emit(this.activeDate)}_handleCalendarBodyKeydown(e){let a=this._activeDate,t=this._isRtl();switch(e.keyCode){case 37:this.activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,t?1:-1);break;case 39:this.activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,t?-1:1);break;case 38:this.activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,-4);break;case 40:this.activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,4);break;case 36:this.activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,-this._dateAdapter.getMonth(this._activeDate));break;case 35:this.activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,11-this._dateAdapter.getMonth(this._activeDate));break;case 33:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,e.altKey?-10:-1);break;case 34:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,e.altKey?10:1);break;case 13:case 32:this._selectionKeyPressed=!0;break;default:return}this._dateAdapter.compareDate(a,this.activeDate)&&(this.activeDateChange.emit(this.activeDate),this._focusActiveCellAfterViewChecked()),e.preventDefault()}_handleCalendarBodyKeyup(e){(e.keyCode===32||e.keyCode===13)&&(this._selectionKeyPressed&&this._monthSelected({value:this._dateAdapter.getMonth(this._activeDate),event:e}),this._selectionKeyPressed=!1)}_init(){this._setSelectedMonth(this.selected),this._todayMonth=this._getMonthInCurrentYear(this._dateAdapter.today()),this._yearLabel=this._dateAdapter.getYearName(this.activeDate);let e=this._dateAdapter.getMonthNames("short");this._months=[[0,1,2,3],[4,5,6,7],[8,9,10,11]].map(a=>a.map(t=>this._createCellForMonth(t,e[t]))),this._changeDetectorRef.markForCheck()}_focusActiveCell(){this._matCalendarBody._focusActiveCell()}_focusActiveCellAfterViewChecked(){this._matCalendarBody._scheduleFocusActiveCellAfterViewChecked()}_getMonthInCurrentYear(e){return e&&this._dateAdapter.getYear(e)==this._dateAdapter.getYear(this.activeDate)?this._dateAdapter.getMonth(e):null}_getDateFromMonth(e){let a=this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),e,1),t=this._dateAdapter.getNumDaysInMonth(a);return this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),e,Math.min(this._dateAdapter.getDate(this.activeDate),t))}_createCellForMonth(e,a){let t=this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),e,1),r=this._dateAdapter.format(t,this._dateFormats.display.monthYearA11yLabel),s=this.dateClass?this.dateClass(t,"year"):void 0;return new Ce(e,a.toLocaleUpperCase(),r,this._shouldEnableMonth(e),s)}_shouldEnableMonth(e){let a=this._dateAdapter.getYear(this.activeDate);if(e==null||this._isYearAndMonthAfterMaxDate(a,e)||this._isYearAndMonthBeforeMinDate(a,e))return!1;if(!this.dateFilter)return!0;let t=this._dateAdapter.createDate(a,e,1);for(let r=t;this._dateAdapter.getMonth(r)==e;r=this._dateAdapter.addCalendarDays(r,1))if(this.dateFilter(r))return!0;return!1}_isYearAndMonthAfterMaxDate(e,a){if(this.maxDate){let t=this._dateAdapter.getYear(this.maxDate),r=this._dateAdapter.getMonth(this.maxDate);return e>t||e===t&&a>r}return!1}_isYearAndMonthBeforeMinDate(e,a){if(this.minDate){let t=this._dateAdapter.getYear(this.minDate),r=this._dateAdapter.getMonth(this.minDate);return e<t||e===t&&a<r}return!1}_isRtl(){return this._dir&&this._dir.value==="rtl"}_setSelectedMonth(e){e instanceof f?this._selectedMonth=this._getMonthInCurrentYear(e.start)||this._getMonthInCurrentYear(e.end):this._selectedMonth=this._getMonthInCurrentYear(e)}};i.\u0275fac=function(a){return new(a||i)(o(L),o(P,8),o(_,8),o(J,8))},i.\u0275cmp=y({type:i,selectors:[["mat-year-view"]],viewQuery:function(a,t){if(a&1&&O(de,5),a&2){let r;w(r=k())&&(t._matCalendarBody=r.first)}},inputs:{activeDate:"activeDate",selected:"selected",minDate:"minDate",maxDate:"maxDate",dateFilter:"dateFilter",dateClass:"dateClass"},outputs:{selectedChange:"selectedChange",monthSelected:"monthSelected",activeDateChange:"activeDateChange"},exportAs:["matYearView"],standalone:!0,features:[M],decls:5,vars:9,consts:[["role","grid",1,"mat-calendar-table"],["aria-hidden","true",1,"mat-calendar-table-header"],["colspan","4",1,"mat-calendar-table-header-divider"],["mat-calendar-body","",3,"selectedValueChange","activeDateChange","keyup","keydown","label","rows","todayValue","startValue","endValue","labelMinRequiredCells","numCols","cellAspectRatio","activeCell"]],template:function(a,t){a&1&&(c(0,"table",0)(1,"thead",1)(2,"tr"),Q(3,"th",2),u()(),c(4,"tbody",3),g("selectedValueChange",function(s){return t._monthSelected(s)})("activeDateChange",function(s){return t._updateActiveDate(s)})("keyup",function(s){return t._handleCalendarBodyKeyup(s)})("keydown",function(s){return t._handleCalendarBodyKeydown(s)}),u()()),a&2&&(h(4),v("label",t._yearLabel)("rows",t._months)("todayValue",t._todayMonth)("startValue",t._selectedMonth)("endValue",t._selectedMonth)("labelMinRequiredCells",2)("numCols",4)("cellAspectRatio",4/7)("activeCell",t._dateAdapter.getMonth(t.activeDate)))},dependencies:[de],encapsulation:2,changeDetection:0});let n=i;return n})(),Ga=1,pa=(()=>{let i=class i{constructor(e,a,t,r,s){this._intl=e,this.calendar=a,this._dateAdapter=t,this._dateFormats=r,this._id=`mat-calendar-header-${Ga++}`,this._periodButtonLabelId=`${this._id}-period-label`,this.calendar.stateChanges.subscribe(()=>s.markForCheck())}get periodButtonText(){return this.calendar.currentView=="month"?this._dateAdapter.format(this.calendar.activeDate,this._dateFormats.display.monthYearLabel).toLocaleUpperCase():this.calendar.currentView=="year"?this._dateAdapter.getYearName(this.calendar.activeDate):this._intl.formatYearRange(...this._formatMinAndMaxYearLabels())}get periodButtonDescription(){return this.calendar.currentView=="month"?this._dateAdapter.format(this.calendar.activeDate,this._dateFormats.display.monthYearLabel).toLocaleUpperCase():this.calendar.currentView=="year"?this._dateAdapter.getYearName(this.calendar.activeDate):this._intl.formatYearRangeLabel(...this._formatMinAndMaxYearLabels())}get periodButtonLabel(){return this.calendar.currentView=="month"?this._intl.switchToMultiYearViewLabel:this._intl.switchToMonthViewLabel}get prevButtonLabel(){return{month:this._intl.prevMonthLabel,year:this._intl.prevYearLabel,"multi-year":this._intl.prevMultiYearLabel}[this.calendar.currentView]}get nextButtonLabel(){return{month:this._intl.nextMonthLabel,year:this._intl.nextYearLabel,"multi-year":this._intl.nextMultiYearLabel}[this.calendar.currentView]}currentPeriodClicked(){this.calendar.currentView=this.calendar.currentView=="month"?"multi-year":"month"}previousClicked(){this.calendar.activeDate=this.calendar.currentView=="month"?this._dateAdapter.addCalendarMonths(this.calendar.activeDate,-1):this._dateAdapter.addCalendarYears(this.calendar.activeDate,this.calendar.currentView=="year"?-1:-I)}nextClicked(){this.calendar.activeDate=this.calendar.currentView=="month"?this._dateAdapter.addCalendarMonths(this.calendar.activeDate,1):this._dateAdapter.addCalendarYears(this.calendar.activeDate,this.calendar.currentView=="year"?1:I)}previousEnabled(){return this.calendar.minDate?!this.calendar.minDate||!this._isSameView(this.calendar.activeDate,this.calendar.minDate):!0}nextEnabled(){return!this.calendar.maxDate||!this._isSameView(this.calendar.activeDate,this.calendar.maxDate)}_isSameView(e,a){return this.calendar.currentView=="month"?this._dateAdapter.getYear(e)==this._dateAdapter.getYear(a)&&this._dateAdapter.getMonth(e)==this._dateAdapter.getMonth(a):this.calendar.currentView=="year"?this._dateAdapter.getYear(e)==this._dateAdapter.getYear(a):ha(this._dateAdapter,e,a,this.calendar.minDate,this.calendar.maxDate)}_formatMinAndMaxYearLabels(){let a=this._dateAdapter.getYear(this.calendar.activeDate)-De(this._dateAdapter,this.calendar.activeDate,this.calendar.minDate,this.calendar.maxDate),t=a+I-1,r=this._dateAdapter.getYearName(this._dateAdapter.createDate(a,0,1)),s=this._dateAdapter.getYearName(this._dateAdapter.createDate(t,0,1));return[r,s]}};i.\u0275fac=function(a){return new(a||i)(o(we),o(Se(()=>yt)),o(_,8),o(P,8),o(L))},i.\u0275cmp=y({type:i,selectors:[["mat-calendar-header"]],exportAs:["matCalendarHeader"],standalone:!0,features:[M],ngContentSelectors:la,decls:13,vars:11,consts:[[1,"mat-calendar-header"],[1,"mat-calendar-controls"],[1,"cdk-visually-hidden",3,"id"],["mat-button","","type","button","aria-live","polite",1,"mat-calendar-period-button",3,"click"],["aria-hidden","true"],["viewBox","0 0 10 5","focusable","false","aria-hidden","true",1,"mat-calendar-arrow"],["points","0,0 5,5 10,0"],[1,"mat-calendar-spacer"],["mat-icon-button","","type","button",1,"mat-calendar-previous-button",3,"click","disabled"],["mat-icon-button","","type","button",1,"mat-calendar-next-button",3,"click","disabled"]],template:function(a,t){a&1&&(_e(),c(0,"div",0)(1,"div",1)(2,"label",2),D(3),u(),c(4,"button",3),g("click",function(){return t.currentPeriodClicked()}),c(5,"span",4),D(6),u(),et(),c(7,"svg",5),Q(8,"polygon",6),u()(),St(),Q(9,"div",7),ae(10),c(11,"button",8),g("click",function(){return t.previousClicked()}),u(),c(12,"button",9),g("click",function(){return t.nextClicked()}),u()()()),a&2&&(h(2),v("id",t._periodButtonLabelId),h(),N(t.periodButtonDescription),h(),b("aria-label",t.periodButtonLabel)("aria-describedby",t._periodButtonLabelId),h(2),N(t.periodButtonText),h(),T("mat-calendar-invert",t.calendar.currentView!=="month"),h(4),v("disabled",!t.previousEnabled()),b("aria-label",t.prevButtonLabel),h(),v("disabled",!t.nextEnabled()),b("aria-label",t.nextButtonLabel))},dependencies:[ut,pt],encapsulation:2,changeDetection:0});let n=i;return n})(),yt=(()=>{let i=class i{get startAt(){return this._startAt}set startAt(e){this._startAt=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e))}get selected(){return this._selected}set selected(e){e instanceof f?this._selected=e:this._selected=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e))}get minDate(){return this._minDate}set minDate(e){this._minDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e))}get maxDate(){return this._maxDate}set maxDate(e){this._maxDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e))}get activeDate(){return this._clampedActiveDate}set activeDate(e){this._clampedActiveDate=this._dateAdapter.clampDate(e,this.minDate,this.maxDate),this.stateChanges.next(),this._changeDetectorRef.markForCheck()}get currentView(){return this._currentView}set currentView(e){let a=this._currentView!==e?e:null;this._currentView=e,this._moveFocusOnNextTick=!0,this._changeDetectorRef.markForCheck(),a&&this.viewChanged.emit(a)}constructor(e,a,t,r){this._dateAdapter=a,this._dateFormats=t,this._changeDetectorRef=r,this._moveFocusOnNextTick=!1,this.startView="month",this.selectedChange=new p,this.yearSelected=new p,this.monthSelected=new p,this.viewChanged=new p(!0),this._userSelection=new p,this._userDragDrop=new p,this._activeDrag=null,this.stateChanges=new H,this._intlChanges=e.changes.subscribe(()=>{r.markForCheck(),this.stateChanges.next()})}ngAfterContentInit(){this._calendarHeaderPortal=new lt(this.headerComponent||pa),this.activeDate=this.startAt||this._dateAdapter.today(),this._currentView=this.startView}ngAfterViewChecked(){this._moveFocusOnNextTick&&(this._moveFocusOnNextTick=!1,this.focusActiveCell())}ngOnDestroy(){this._intlChanges.unsubscribe(),this.stateChanges.complete()}ngOnChanges(e){let a=e.minDate&&!this._dateAdapter.sameDate(e.minDate.previousValue,e.minDate.currentValue)?e.minDate:void 0,t=e.maxDate&&!this._dateAdapter.sameDate(e.maxDate.previousValue,e.maxDate.currentValue)?e.maxDate:void 0,r=a||t||e.dateFilter;if(r&&!r.firstChange){let s=this._getCurrentViewComponent();s&&(this._changeDetectorRef.detectChanges(),s._init())}this.stateChanges.next()}focusActiveCell(){this._getCurrentViewComponent()._focusActiveCell(!1)}updateTodaysDate(){this._getCurrentViewComponent()._init()}_dateSelected(e){let a=e.value;(this.selected instanceof f||a&&!this._dateAdapter.sameDate(a,this.selected))&&this.selectedChange.emit(a),this._userSelection.emit(e)}_yearSelectedInMultiYearView(e){this.yearSelected.emit(e)}_monthSelectedInYearView(e){this.monthSelected.emit(e)}_goToDateInView(e,a){this.activeDate=e,this.currentView=a}_dragStarted(e){this._activeDrag=e}_dragEnded(e){this._activeDrag&&(e.value&&this._userDragDrop.emit(e),this._activeDrag=null)}_getCurrentViewComponent(){return this.monthView||this.yearView||this.multiYearView}};i.\u0275fac=function(a){return new(a||i)(o(we),o(_,8),o(P,8),o(L))},i.\u0275cmp=y({type:i,selectors:[["mat-calendar"]],viewQuery:function(a,t){if(a&1&&(O(ia,5),O(na,5),O(ra,5)),a&2){let r;w(r=k())&&(t.monthView=r.first),w(r=k())&&(t.yearView=r.first),w(r=k())&&(t.multiYearView=r.first)}},hostAttrs:[1,"mat-calendar"],inputs:{headerComponent:"headerComponent",startAt:"startAt",startView:"startView",selected:"selected",minDate:"minDate",maxDate:"maxDate",dateFilter:"dateFilter",dateClass:"dateClass",comparisonStart:"comparisonStart",comparisonEnd:"comparisonEnd",startDateAccessibleName:"startDateAccessibleName",endDateAccessibleName:"endDateAccessibleName"},outputs:{selectedChange:"selectedChange",yearSelected:"yearSelected",monthSelected:"monthSelected",viewChanged:"viewChanged",_userSelection:"_userSelection",_userDragDrop:"_userDragDrop"},exportAs:["matCalendar"],standalone:!0,features:[q([ca]),z,M],decls:5,vars:2,consts:[[3,"cdkPortalOutlet"],["cdkMonitorSubtreeFocus","","tabindex","-1",1,"mat-calendar-content"],[3,"activeDateChange","_userSelection","dragStarted","dragEnded","activeDate","selected","dateFilter","maxDate","minDate","dateClass","comparisonStart","comparisonEnd","startDateAccessibleName","endDateAccessibleName","activeDrag"],[3,"activeDateChange","monthSelected","selectedChange","activeDate","selected","dateFilter","maxDate","minDate","dateClass"],[3,"activeDateChange","yearSelected","selectedChange","activeDate","selected","dateFilter","maxDate","minDate","dateClass"]],template:function(a,t){if(a&1&&(K(0,Ia,0,0,"ng-template",0),c(1,"div",1),K(2,Sa,1,11)(3,Va,1,6)(4,Ea,1,6),u()),a&2){let r;v("cdkPortalOutlet",t._calendarHeaderPortal),h(2),pe(2,(r=t.currentView)==="month"?2:r==="year"?3:r==="multi-year"?4:-1)}},dependencies:[ct,ot,ia,na,ra],styles:['.mat-calendar{display:block;font-family:var(--mat-datepicker-calendar-text-font);font-size:var(--mat-datepicker-calendar-text-size)}.mat-calendar-header{padding:8px 8px 0 8px}.mat-calendar-content{padding:0 8px 8px 8px;outline:none}.mat-calendar-controls{display:flex;align-items:center;margin:5% calc(4.7142857143% - 16px)}.mat-calendar-spacer{flex:1 1 auto}.mat-calendar-period-button{min-width:0;margin:0 8px;font-size:var(--mat-datepicker-calendar-period-button-text-size);font-weight:var(--mat-datepicker-calendar-period-button-text-weight);--mdc-text-button-label-text-color:var(--mat-datepicker-calendar-period-button-text-color)}.mat-calendar-arrow{display:inline-block;width:10px;height:5px;margin:0 0 0 5px;vertical-align:middle;fill:var(--mat-datepicker-calendar-period-button-icon-color)}.mat-calendar-arrow.mat-calendar-invert{transform:rotate(180deg)}[dir=rtl] .mat-calendar-arrow{margin:0 5px 0 0}.cdk-high-contrast-active .mat-calendar-arrow{fill:CanvasText}.mat-calendar-previous-button,.mat-calendar-next-button{position:relative}.mat-datepicker-content .mat-calendar-previous-button:not(.mat-mdc-button-disabled),.mat-datepicker-content .mat-calendar-next-button:not(.mat-mdc-button-disabled){color:var(--mat-datepicker-calendar-navigation-button-icon-color)}.mat-calendar-previous-button::after,.mat-calendar-next-button::after{top:0;left:0;right:0;bottom:0;position:absolute;content:"";margin:15.5px;border:0 solid currentColor;border-top-width:2px}[dir=rtl] .mat-calendar-previous-button,[dir=rtl] .mat-calendar-next-button{transform:rotate(180deg)}.mat-calendar-previous-button::after{border-left-width:2px;transform:translateX(2px) rotate(-45deg)}.mat-calendar-next-button::after{border-right-width:2px;transform:translateX(-2px) rotate(45deg)}.mat-calendar-table{border-spacing:0;border-collapse:collapse;width:100%}.mat-calendar-table-header th{text-align:center;padding:0 0 8px 0;color:var(--mat-datepicker-calendar-header-text-color);font-size:var(--mat-datepicker-calendar-header-text-size);font-weight:var(--mat-datepicker-calendar-header-text-weight)}.mat-calendar-table-header-divider{position:relative;height:1px}.mat-calendar-table-header-divider::after{content:"";position:absolute;top:0;left:-8px;right:-8px;height:1px;background:var(--mat-datepicker-calendar-header-divider-color)}.mat-calendar-body-cell-content::before{margin:calc(calc(var(--mat-focus-indicator-border-width, 3px) + 3px)*-1)}.mat-calendar-body-cell:focus .mat-focus-indicator::before{content:""}'],encapsulation:2,changeDetection:0});let n=i;return n})(),sa={transformPanel:nt("transformPanel",[fe("void => enter-dropdown",ge("120ms cubic-bezier(0, 0, 0.2, 1)",dt([W({opacity:0,transform:"scale(1, 0.8)"}),W({opacity:1,transform:"scale(1, 1)"})]))),fe("void => enter-dialog",ge("150ms cubic-bezier(0, 0, 0.2, 1)",dt([W({opacity:0,transform:"scale(0.7)"}),W({transform:"none",opacity:1})]))),fe("* => void",ge("100ms linear",W({opacity:0})))]),fadeInCalendar:nt("fadeInCalendar",[st("void",W({opacity:0})),st("enter",W({opacity:1})),fe("void => *",ge("120ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)"))])},Ua=0,ma=new Ve("mat-datepicker-scroll-strategy",{providedIn:"root",factory:()=>{let n=he(be);return()=>n.scrollStrategies.reposition()}});function Xa(n){return()=>n.scrollStrategies.reposition()}var Za={provide:ma,deps:[be],useFactory:Xa},_a=(()=>{let i=class i{constructor(e,a,t,r,s,l){this._elementRef=e,this._changeDetectorRef=a,this._globalModel=t,this._dateAdapter=r,this._rangeSelectionStrategy=s,this._subscriptions=new x,this._animationDone=new H,this._isAnimating=!1,this._actionsPortal=null,this._closeButtonText=l.closeCalendarLabel}ngOnInit(){this._animationState=this.datepicker.touchUi?"enter-dialog":"enter-dropdown"}ngAfterViewInit(){this._subscriptions.add(this.datepicker.stateChanges.subscribe(()=>{this._changeDetectorRef.markForCheck()})),this._calendar.focusActiveCell()}ngOnDestroy(){this._subscriptions.unsubscribe(),this._animationDone.complete()}_handleUserSelection(e){let a=this._model.selection,t=e.value,r=a instanceof f;if(r&&this._rangeSelectionStrategy){let s=this._rangeSelectionStrategy.selectionFinished(t,a,e.event);this._model.updateSelection(s,this)}else t&&(r||!this._dateAdapter.sameDate(t,a))&&this._model.add(t);(!this._model||this._model.isComplete())&&!this._actionsPortal&&this.datepicker.close()}_handleUserDragDrop(e){this._model.updateSelection(e.value,this)}_startExitAnimation(){this._animationState="void",this._changeDetectorRef.markForCheck()}_handleAnimationEvent(e){this._isAnimating=e.phaseName==="start",this._isAnimating||this._animationDone.next()}_getSelected(){return this._model.selection}_applyPendingSelection(){this._model!==this._globalModel&&this._globalModel.updateSelection(this._model.selection,this)}_assignActions(e,a){this._model=e?this._globalModel.clone():this._globalModel,this._actionsPortal=e,a&&this._changeDetectorRef.detectChanges()}};i.\u0275fac=function(a){return new(a||i)(o(Y),o(L),o(G),o(_),o(Ue,8),o(we))},i.\u0275cmp=y({type:i,selectors:[["mat-datepicker-content"]],viewQuery:function(a,t){if(a&1&&O(yt,5),a&2){let r;w(r=k())&&(t._calendar=r.first)}},hostAttrs:[1,"mat-datepicker-content"],hostVars:5,hostBindings:function(a,t){a&1&&Rt("@transformPanel.start",function(s){return t._handleAnimationEvent(s)})("@transformPanel.done",function(s){return t._handleAnimationEvent(s)}),a&2&&(xt("@transformPanel",t._animationState),rt(t.color?"mat-"+t.color:""),T("mat-datepicker-content-touch",t.datepicker.touchUi))},inputs:{color:"color"},exportAs:["matDatepickerContent"],standalone:!0,features:[M],decls:5,vars:27,consts:[["cdkTrapFocus","","role","dialog",1,"mat-datepicker-content-container"],[3,"yearSelected","monthSelected","viewChanged","_userSelection","_userDragDrop","id","startAt","startView","minDate","maxDate","dateFilter","headerComponent","selected","dateClass","comparisonStart","comparisonEnd","startDateAccessibleName","endDateAccessibleName"],[3,"cdkPortalOutlet"],["type","button","mat-raised-button","",1,"mat-datepicker-close-button",3,"focus","blur","click","color"]],template:function(a,t){if(a&1&&(c(0,"div",0)(1,"mat-calendar",1),g("yearSelected",function(s){return t.datepicker._selectYear(s)})("monthSelected",function(s){return t.datepicker._selectMonth(s)})("viewChanged",function(s){return t.datepicker._viewChanged(s)})("_userSelection",function(s){return t._handleUserSelection(s)})("_userDragDrop",function(s){return t._handleUserDragDrop(s)}),u(),K(2,Fa,0,0,"ng-template",2),c(3,"button",3),g("focus",function(){return t._closeButtonFocused=!0})("blur",function(){return t._closeButtonFocused=!1})("click",function(){return t.datepicker.close()}),D(4),u()()),a&2){let r;T("mat-datepicker-content-container-with-custom-header",t.datepicker.calendarHeaderComponent)("mat-datepicker-content-container-with-actions",t._actionsPortal),b("aria-modal",!0)("aria-labelledby",(r=t._dialogLabelId)!==null&&r!==void 0?r:void 0),h(),rt(t.datepicker.panelClass),v("id",t.datepicker.id)("startAt",t.datepicker.startAt)("startView",t.datepicker.startView)("minDate",t.datepicker._getMinDate())("maxDate",t.datepicker._getMaxDate())("dateFilter",t.datepicker._getDateFilter())("headerComponent",t.datepicker.calendarHeaderComponent)("selected",t._getSelected())("dateClass",t.datepicker.dateClass)("comparisonStart",t.comparisonStart)("comparisonEnd",t.comparisonEnd)("@fadeInCalendar","enter")("startDateAccessibleName",t.startDateAccessibleName)("endDateAccessibleName",t.endDateAccessibleName),h(),v("cdkPortalOutlet",t._actionsPortal),h(),T("cdk-visually-hidden",!t._closeButtonFocused),v("color",t.color||"primary"),h(),N(t._closeButtonText)}},dependencies:[Ht,yt,ct,ut],styles:[".mat-datepicker-content{display:block;border-radius:4px;background-color:var(--mat-datepicker-calendar-container-background-color);color:var(--mat-datepicker-calendar-container-text-color);box-shadow:var(--mat-datepicker-calendar-container-elevation-shadow);border-radius:var(--mat-datepicker-calendar-container-shape)}.mat-datepicker-content .mat-calendar{width:296px;height:354px}.mat-datepicker-content .mat-datepicker-content-container-with-custom-header .mat-calendar{height:auto}.mat-datepicker-content .mat-datepicker-close-button{position:absolute;top:100%;left:0;margin-top:8px}.ng-animating .mat-datepicker-content .mat-datepicker-close-button{display:none}.mat-datepicker-content-container{display:flex;flex-direction:column;justify-content:space-between}.mat-datepicker-content-touch{display:block;max-height:80vh;box-shadow:var(--mat-datepicker-calendar-container-touch-elevation-shadow);border-radius:var(--mat-datepicker-calendar-container-touch-shape);position:relative;overflow:visible}.mat-datepicker-content-touch .mat-datepicker-content-container{min-height:312px;max-height:788px;min-width:250px;max-width:750px}.mat-datepicker-content-touch .mat-calendar{width:100%;height:auto}@media all and (orientation: landscape){.mat-datepicker-content-touch .mat-datepicker-content-container{width:64vh;height:80vh}}@media all and (orientation: portrait){.mat-datepicker-content-touch .mat-datepicker-content-container{width:80vw;height:100vw}.mat-datepicker-content-touch .mat-datepicker-content-container-with-actions{height:115vw}}"],encapsulation:2,data:{animation:[sa.transformPanel,sa.fadeInCalendar]},changeDetection:0});let n=i;return n})(),ee=(()=>{let i=class i{get startAt(){return this._startAt||(this.datepickerInput?this.datepickerInput.getStartValue():null)}set startAt(e){this._startAt=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e))}get color(){return this._color||(this.datepickerInput?this.datepickerInput.getThemePalette():void 0)}set color(e){this._color=e}get disabled(){return this._disabled===void 0&&this.datepickerInput?this.datepickerInput.disabled:!!this._disabled}set disabled(e){e!==this._disabled&&(this._disabled=e,this.stateChanges.next(void 0))}get panelClass(){return this._panelClass}set panelClass(e){this._panelClass=Lt(e)}get opened(){return this._opened}set opened(e){e?this.open():this.close()}_getMinDate(){return this.datepickerInput&&this.datepickerInput.min}_getMaxDate(){return this.datepickerInput&&this.datepickerInput.max}_getDateFilter(){return this.datepickerInput&&this.datepickerInput.dateFilter}constructor(e,a,t,r,s,l,S){this._overlay=e,this._ngZone=a,this._viewContainerRef=t,this._dateAdapter=s,this._dir=l,this._model=S,this._inputStateChanges=x.EMPTY,this._document=he(Tt),this.startView="month",this.touchUi=!1,this.xPosition="start",this.yPosition="below",this.restoreFocus=!0,this.yearSelected=new p,this.monthSelected=new p,this.viewChanged=new p(!0),this.openedStream=new p,this.closedStream=new p,this._opened=!1,this.id=`mat-datepicker-${Ua++}`,this._focusedElementBeforeOpen=null,this._backdropHarnessClass=`${this.id}-backdrop`,this.stateChanges=new H,this._dateAdapter,this._scrollStrategy=r}ngOnChanges(e){let a=e.xPosition||e.yPosition;if(a&&!a.firstChange&&this._overlayRef){let t=this._overlayRef.getConfig().positionStrategy;t instanceof $t&&(this._setConnectedPositions(t),this.opened&&this._overlayRef.updatePosition())}this.stateChanges.next(void 0)}ngOnDestroy(){this._destroyOverlay(),this.close(),this._inputStateChanges.unsubscribe(),this.stateChanges.complete()}select(e){this._model.add(e)}_selectYear(e){this.yearSelected.emit(e)}_selectMonth(e){this.monthSelected.emit(e)}_viewChanged(e){this.viewChanged.emit(e)}registerInput(e){return this.datepickerInput,this._inputStateChanges.unsubscribe(),this.datepickerInput=e,this._inputStateChanges=e.stateChanges.subscribe(()=>this.stateChanges.next(void 0)),this._model}registerActions(e){this._actionsPortal,this._actionsPortal=e,this._componentRef?.instance._assignActions(e,!0)}removeActions(e){e===this._actionsPortal&&(this._actionsPortal=null,this._componentRef?.instance._assignActions(null,!0))}open(){this._opened||this.disabled||this._componentRef?.instance._isAnimating||(this.datepickerInput,this._focusedElementBeforeOpen=jt(),this._openOverlay(),this._opened=!0,this.openedStream.emit())}close(){if(!this._opened||this._componentRef?.instance._isAnimating)return;let e=this.restoreFocus&&this._focusedElementBeforeOpen&&typeof this._focusedElementBeforeOpen.focus=="function",a=()=>{this._opened&&(this._opened=!1,this.closedStream.emit())};if(this._componentRef){let{instance:t,location:r}=this._componentRef;t._startExitAnimation(),t._animationDone.pipe(Me(1)).subscribe(()=>{let s=this._document.activeElement;e&&(!s||s===this._document.activeElement||r.nativeElement.contains(s))&&this._focusedElementBeforeOpen.focus(),this._focusedElementBeforeOpen=null,this._destroyOverlay()})}e?setTimeout(a):a()}_applyPendingSelection(){this._componentRef?.instance?._applyPendingSelection()}_forwardContentValues(e){e.datepicker=this,e.color=this.color,e._dialogLabelId=this.datepickerInput.getOverlayLabelId(),e._assignActions(this._actionsPortal,!1)}_openOverlay(){this._destroyOverlay();let e=this.touchUi,a=new lt(_a,this._viewContainerRef),t=this._overlayRef=this._overlay.create(new Wt({positionStrategy:e?this._getDialogStrategy():this._getDropdownStrategy(),hasBackdrop:!0,backdropClass:[e?"cdk-overlay-dark-backdrop":"mat-overlay-transparent-backdrop",this._backdropHarnessClass],direction:this._dir,scrollStrategy:e?this._overlay.scrollStrategies.block():this._scrollStrategy(),panelClass:`mat-datepicker-${e?"dialog":"popup"}`}));this._getCloseStream(t).subscribe(r=>{r&&r.preventDefault(),this.close()}),t.keydownEvents().subscribe(r=>{let s=r.keyCode;(s===38||s===40||s===37||s===39||s===33||s===34)&&r.preventDefault()}),this._componentRef=t.attach(a),this._forwardContentValues(this._componentRef.instance),e||this._ngZone.onStable.pipe(Me(1)).subscribe(()=>t.updatePosition())}_destroyOverlay(){this._overlayRef&&(this._overlayRef.dispose(),this._overlayRef=this._componentRef=null)}_getDialogStrategy(){return this._overlay.position().global().centerHorizontally().centerVertically()}_getDropdownStrategy(){let e=this._overlay.position().flexibleConnectedTo(this.datepickerInput.getConnectedOverlayOrigin()).withTransformOriginOn(".mat-datepicker-content").withFlexibleDimensions(!1).withViewportMargin(8).withLockedPosition();return this._setConnectedPositions(e)}_setConnectedPositions(e){let a=this.xPosition==="end"?"end":"start",t=a==="start"?"end":"start",r=this.yPosition==="above"?"bottom":"top",s=r==="top"?"bottom":"top";return e.withPositions([{originX:a,originY:s,overlayX:a,overlayY:r},{originX:a,originY:r,overlayX:a,overlayY:s},{originX:t,originY:s,overlayX:t,overlayY:r},{originX:t,originY:r,overlayX:t,overlayY:s}])}_getCloseStream(e){let a=["ctrlKey","shiftKey","metaKey"];return ce(e.backdropClick(),e.detachments(),e.keydownEvents().pipe(kt(t=>t.keyCode===27&&!Z(t)||this.datepickerInput&&Z(t,"altKey")&&t.keyCode===38&&a.every(r=>!Z(t,r)))))}};i.\u0275fac=function(a){return new(a||i)(o(be),o(at),o(it),o(ma),o(_,8),o(J,8),o(G))},i.\u0275dir=R({type:i,inputs:{calendarHeaderComponent:"calendarHeaderComponent",startAt:"startAt",startView:"startView",color:"color",touchUi:[F.HasDecoratorInputTransform,"touchUi","touchUi",B],disabled:[F.HasDecoratorInputTransform,"disabled","disabled",B],xPosition:"xPosition",yPosition:"yPosition",restoreFocus:[F.HasDecoratorInputTransform,"restoreFocus","restoreFocus",B],dateClass:"dateClass",panelClass:"panelClass",opened:[F.HasDecoratorInputTransform,"opened","opened",B]},outputs:{yearSelected:"yearSelected",monthSelected:"monthSelected",viewChanged:"viewChanged",openedStream:"opened",closedStream:"closed"},features:[ue,z]});let n=i;return n})(),Qi=(()=>{let i=class i extends ee{};i.\u0275fac=(()=>{let e;return function(t){return(e||(e=tt(i)))(t||i)}})(),i.\u0275cmp=y({type:i,selectors:[["mat-datepicker"]],exportAs:["matDatepicker"],standalone:!0,features:[q([ca,{provide:ee,useExisting:i}]),X,M],decls:0,vars:0,template:function(a,t){},encapsulation:2,changeDetection:0});let n=i;return n})(),re=class{constructor(i,d){this.target=i,this.targetElement=d,this.value=this.target.value}},ga=(()=>{let i=class i{get value(){return this._model?this._getValueFromModel(this._model.selection):this._pendingValue}set value(e){this._assignValueProgrammatically(e)}get disabled(){return!!this._disabled||this._parentDisabled()}set disabled(e){let a=e,t=this._elementRef.nativeElement;this._disabled!==a&&(this._disabled=a,this.stateChanges.next(void 0)),a&&this._isInitialized&&t.blur&&t.blur()}_getValidators(){return[this._parseValidator,this._minValidator,this._maxValidator,this._filterValidator]}_registerModel(e){this._model=e,this._valueChangesSubscription.unsubscribe(),this._pendingValue&&this._assignValue(this._pendingValue),this._valueChangesSubscription=this._model.selectionChanged.subscribe(a=>{if(this._shouldHandleChangeEvent(a)){let t=this._getValueFromModel(a.selection);this._lastValueValid=this._isValidValue(t),this._cvaOnChange(t),this._onTouched(),this._formatValue(t),this.dateInput.emit(new re(this,this._elementRef.nativeElement)),this.dateChange.emit(new re(this,this._elementRef.nativeElement))}})}constructor(e,a,t){this._elementRef=e,this._dateAdapter=a,this._dateFormats=t,this.dateChange=new p,this.dateInput=new p,this.stateChanges=new H,this._onTouched=()=>{},this._validatorOnChange=()=>{},this._cvaOnChange=()=>{},this._valueChangesSubscription=x.EMPTY,this._localeSubscription=x.EMPTY,this._parseValidator=()=>this._lastValueValid?null:{matDatepickerParse:{text:this._elementRef.nativeElement.value}},this._filterValidator=r=>{let s=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(r.value));return!s||this._matchesFilter(s)?null:{matDatepickerFilter:!0}},this._minValidator=r=>{let s=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(r.value)),l=this._getMinDate();return!l||!s||this._dateAdapter.compareDate(l,s)<=0?null:{matDatepickerMin:{min:l,actual:s}}},this._maxValidator=r=>{let s=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(r.value)),l=this._getMaxDate();return!l||!s||this._dateAdapter.compareDate(l,s)>=0?null:{matDatepickerMax:{max:l,actual:s}}},this._lastValueValid=!1,this._localeSubscription=a.localeChanges.subscribe(()=>{this._assignValueProgrammatically(this.value)})}ngAfterViewInit(){this._isInitialized=!0}ngOnChanges(e){fa(e,this._dateAdapter)&&this.stateChanges.next(void 0)}ngOnDestroy(){this._valueChangesSubscription.unsubscribe(),this._localeSubscription.unsubscribe(),this.stateChanges.complete()}registerOnValidatorChange(e){this._validatorOnChange=e}validate(e){return this._validator?this._validator(e):null}writeValue(e){this._assignValueProgrammatically(e)}registerOnChange(e){this._cvaOnChange=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this.disabled=e}_onKeydown(e){let a=["ctrlKey","shiftKey","metaKey"];Z(e,"altKey")&&e.keyCode===40&&a.every(r=>!Z(e,r))&&!this._elementRef.nativeElement.readOnly&&(this._openPopup(),e.preventDefault())}_onInput(e){let a=this._lastValueValid,t=this._dateAdapter.parse(e,this._dateFormats.parse.dateInput);this._lastValueValid=this._isValidValue(t),t=this._dateAdapter.getValidDateOrNull(t);let r=!this._dateAdapter.sameDate(t,this.value);!t||r?this._cvaOnChange(t):(e&&!this.value&&this._cvaOnChange(t),a!==this._lastValueValid&&this._validatorOnChange()),r&&(this._assignValue(t),this.dateInput.emit(new re(this,this._elementRef.nativeElement)))}_onChange(){this.dateChange.emit(new re(this,this._elementRef.nativeElement))}_onBlur(){this.value&&this._formatValue(this.value),this._onTouched()}_formatValue(e){this._elementRef.nativeElement.value=e!=null?this._dateAdapter.format(e,this._dateFormats.display.dateInput):""}_assignValue(e){this._model?(this._assignValueToModel(e),this._pendingValue=null):this._pendingValue=e}_isValidValue(e){return!e||this._dateAdapter.isValid(e)}_parentDisabled(){return!1}_assignValueProgrammatically(e){e=this._dateAdapter.deserialize(e),this._lastValueValid=this._isValidValue(e),e=this._dateAdapter.getValidDateOrNull(e),this._assignValue(e),this._formatValue(e)}_matchesFilter(e){let a=this._getDateFilter();return!a||a(e)}};i.\u0275fac=function(a){return new(a||i)(o(Y),o(_,8),o(P,8))},i.\u0275dir=R({type:i,inputs:{value:"value",disabled:[F.HasDecoratorInputTransform,"disabled","disabled",B]},outputs:{dateChange:"dateChange",dateInput:"dateInput"},standalone:!0,features:[ue,z]});let n=i;return n})();function fa(n,i){let d=Object.keys(n);for(let e of d){let{previousValue:a,currentValue:t}=n[e];if(i.isDateInstance(a)&&i.isDateInstance(t)){if(!i.sameDate(a,t))return!0}else return!0}return!1}var Ja={provide:ze,useExisting:Se(()=>va),multi:!0},ei={provide:Ke,useExisting:Se(()=>va),multi:!0},va=(()=>{let i=class i extends ga{set matDatepicker(e){e&&(this._datepicker=e,this._closedSubscription=e.closedStream.subscribe(()=>this._onTouched()),this._registerModel(e.registerInput(this)))}get min(){return this._min}set min(e){let a=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e));this._dateAdapter.sameDate(a,this._min)||(this._min=a,this._validatorOnChange())}get max(){return this._max}set max(e){let a=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e));this._dateAdapter.sameDate(a,this._max)||(this._max=a,this._validatorOnChange())}get dateFilter(){return this._dateFilter}set dateFilter(e){let a=this._matchesFilter(this.value);this._dateFilter=e,this._matchesFilter(this.value)!==a&&this._validatorOnChange()}constructor(e,a,t,r){super(e,a,t),this._formField=r,this._closedSubscription=x.EMPTY,this._validator=ve.compose(super._getValidators())}getConnectedOverlayOrigin(){return this._formField?this._formField.getConnectedOverlayOrigin():this._elementRef}getOverlayLabelId(){return this._formField?this._formField.getLabelId():this._elementRef.nativeElement.getAttribute("aria-labelledby")}getThemePalette(){return this._formField?this._formField.color:void 0}getStartValue(){return this.value}ngOnDestroy(){super.ngOnDestroy(),this._closedSubscription.unsubscribe()}_openPopup(){this._datepicker&&this._datepicker.open()}_getValueFromModel(e){return e}_assignValueToModel(e){this._model&&this._model.updateSelection(e,this)}_getMinDate(){return this._min}_getMaxDate(){return this._max}_getDateFilter(){return this._dateFilter}_shouldHandleChangeEvent(e){return e.source!==this}};i.\u0275fac=function(a){return new(a||i)(o(Y),o(_,8),o(P,8),o(ht,8))},i.\u0275dir=R({type:i,selectors:[["input","matDatepicker",""]],hostAttrs:[1,"mat-datepicker-input"],hostVars:6,hostBindings:function(a,t){a&1&&g("input",function(s){return t._onInput(s.target.value)})("change",function(){return t._onChange()})("blur",function(){return t._onBlur()})("keydown",function(s){return t._onKeydown(s)}),a&2&&(Ne("disabled",t.disabled),b("aria-haspopup",t._datepicker?"dialog":null)("aria-owns",(t._datepicker==null?null:t._datepicker.opened)&&t._datepicker.id||null)("min",t.min?t._dateAdapter.toIso8601(t.min):null)("max",t.max?t._dateAdapter.toIso8601(t.max):null)("data-mat-calendar",t._datepicker?t._datepicker.id:null))},inputs:{matDatepicker:"matDatepicker",min:"min",max:"max",dateFilter:[F.None,"matDatepickerFilter","dateFilter"]},exportAs:["matDatepickerInput"],standalone:!0,features:[q([Ja,ei,{provide:ea,useExisting:i}]),X]});let n=i;return n})(),ti=(()=>{let i=class i{};i.\u0275fac=function(a){return new(a||i)},i.\u0275dir=R({type:i,selectors:[["","matDatepickerToggleIcon",""]],standalone:!0});let n=i;return n})(),ai=(()=>{let i=class i{get disabled(){return this._disabled===void 0&&this.datepicker?this.datepicker.disabled:!!this._disabled}set disabled(e){this._disabled=e}constructor(e,a,t){this._intl=e,this._changeDetectorRef=a,this._stateChanges=x.EMPTY;let r=Number(t);this.tabIndex=r||r===0?r:null}ngOnChanges(e){e.datepicker&&this._watchStateChanges()}ngOnDestroy(){this._stateChanges.unsubscribe()}ngAfterContentInit(){this._watchStateChanges()}_open(e){this.datepicker&&!this.disabled&&(this.datepicker.open(),e.stopPropagation())}_watchStateChanges(){let e=this.datepicker?this.datepicker.stateChanges:ke(),a=this.datepicker&&this.datepicker.datepickerInput?this.datepicker.datepickerInput.stateChanges:ke(),t=this.datepicker?ce(this.datepicker.openedStream,this.datepicker.closedStream):ke();this._stateChanges.unsubscribe(),this._stateChanges=ce(this._intl.changes,e,a,t).subscribe(()=>this._changeDetectorRef.markForCheck())}};i.\u0275fac=function(a){return new(a||i)(o(we),o(L),Vt("tabindex"))},i.\u0275cmp=y({type:i,selectors:[["mat-datepicker-toggle"]],contentQueries:function(a,t,r){if(a&1&&Le(r,ti,5),a&2){let s;w(s=k())&&(t._customIcon=s.first)}},viewQuery:function(a,t){if(a&1&&O(xa,5),a&2){let r;w(r=k())&&(t._button=r.first)}},hostAttrs:[1,"mat-datepicker-toggle"],hostVars:8,hostBindings:function(a,t){a&1&&g("click",function(s){return t._open(s)}),a&2&&(b("tabindex",null)("data-mat-calendar",t.datepicker?t.datepicker.id:null),T("mat-datepicker-toggle-active",t.datepicker&&t.datepicker.opened)("mat-accent",t.datepicker&&t.datepicker.color==="accent")("mat-warn",t.datepicker&&t.datepicker.color==="warn"))},inputs:{datepicker:[F.None,"for","datepicker"],tabIndex:"tabIndex",ariaLabel:[F.None,"aria-label","ariaLabel"],disabled:[F.HasDecoratorInputTransform,"disabled","disabled",B],disableRipple:"disableRipple"},exportAs:["matDatepickerToggle"],standalone:!0,features:[ue,z,M],ngContentSelectors:Ta,decls:4,vars:6,consts:[["button",""],["mat-icon-button","","type","button",3,"disabled","disableRipple"],["viewBox","0 0 24 24","width","24px","height","24px","fill","currentColor","focusable","false","aria-hidden","true",1,"mat-datepicker-toggle-default-icon"],["d","M19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11zM7 10h5v5H7z"]],template:function(a,t){a&1&&(_e(Ra),c(0,"button",1,0),K(2,Oa,2,0,":svg:svg",2),ae(3),u()),a&2&&(v("disabled",t.disabled)("disableRipple",t.disableRipple),b("aria-haspopup",t.datepicker?"dialog":null)("aria-label",t.ariaLabel||t._intl.openCalendarLabel)("tabindex",t.disabled?-1:t.tabIndex),h(2),pe(2,t._customIcon?-1:2))},dependencies:[pt],styles:[".mat-datepicker-toggle{pointer-events:auto;color:var(--mat-datepicker-toggle-icon-color)}.mat-datepicker-toggle-active{color:var(--mat-datepicker-toggle-active-state-icon-color)}.cdk-high-contrast-active .mat-datepicker-toggle-default-icon{color:CanvasText}"],encapsulation:2,changeDetection:0});let n=i;return n})();function ii(n){return Ct(n,!0)}function da(n){return n.nodeType===Node.ELEMENT_NODE}function ri(n){return n.nodeName==="INPUT"}function ni(n){return n.nodeName==="TEXTAREA"}function Ct(n,i){if(da(n)&&i){let e=(n.getAttribute?.("aria-labelledby")?.split(/\s+/g)||[]).reduce((a,t)=>{let r=document.getElementById(t);return r&&a.push(r),a},[]);if(e.length)return e.map(a=>Ct(a,!1)).join(" ")}if(da(n)){let d=n.getAttribute("aria-label")?.trim();if(d)return d}if(ri(n)||ni(n)){if(n.labels?.length)return Array.from(n.labels).map(a=>Ct(a,!1)).join(" ");let d=n.getAttribute("placeholder")?.trim();if(d)return d;let e=n.getAttribute("title")?.trim();if(e)return e}return(n.textContent||"").replace(/\s+/g," ").trim()}var Je=new Ve("MAT_DATE_RANGE_INPUT_PARENT"),ba=(()=>{let i=class i extends ga{get errorStateMatcher(){return this._errorStateTracker.matcher}set errorStateMatcher(e){this._errorStateTracker.matcher=e}get errorState(){return this._errorStateTracker.errorState}set errorState(e){this._errorStateTracker.errorState=e}constructor(e,a,t,r,s,l,S,V){super(a,S,V),this._rangeInput=e,this._elementRef=a,this._defaultErrorStateMatcher=t,this._injector=r,this._parentForm=s,this._parentFormGroup=l,this._dir=he(J,{optional:!0}),this._errorStateTracker=new Xt(this._defaultErrorStateMatcher,null,this._parentFormGroup,this._parentForm,this.stateChanges)}ngOnInit(){let e=this._injector.get(Nt,null,{optional:!0,self:!0});e&&(this.ngControl=e,this._errorStateTracker.ngControl=e)}ngDoCheck(){this.ngControl&&this.updateErrorState()}isEmpty(){return this._elementRef.nativeElement.value.length===0}_getPlaceholder(){return this._elementRef.nativeElement.placeholder}focus(){this._elementRef.nativeElement.focus()}getMirrorValue(){let e=this._elementRef.nativeElement,a=e.value;return a.length>0?a:e.placeholder}updateErrorState(){this._errorStateTracker.updateErrorState()}_onInput(e){super._onInput(e),this._rangeInput._handleChildValueChange()}_openPopup(){this._rangeInput._openDatepicker()}_getMinDate(){return this._rangeInput.min}_getMaxDate(){return this._rangeInput.max}_getDateFilter(){return this._rangeInput.dateFilter}_parentDisabled(){return this._rangeInput._groupDisabled}_shouldHandleChangeEvent({source:e}){return e!==this._rangeInput._startInput&&e!==this._rangeInput._endInput}_assignValueProgrammatically(e){super._assignValueProgrammatically(e),(this===this._rangeInput._startInput?this._rangeInput._endInput:this._rangeInput._startInput)?._validatorOnChange()}_getAccessibleName(){return ii(this._elementRef.nativeElement)}};i.\u0275fac=function(a){return new(a||i)(o(Je),o(Y),o($e),o(Re),o(Qe,8),o(qe,8),o(_,8),o(P,8))},i.\u0275dir=R({type:i,inputs:{errorStateMatcher:"errorStateMatcher"},standalone:!0,features:[X]});let n=i;return n})(),si=(()=>{let i=class i extends ba{constructor(e,a,t,r,s,l,S,V){super(e,a,t,r,s,l,S,V),this._startValidator=j=>{let E=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(j.value)),U=this._model?this._model.selection.end:null;return!E||!U||this._dateAdapter.compareDate(E,U)<=0?null:{matStartDateInvalid:{end:U,actual:E}}},this._validator=ve.compose([...super._getValidators(),this._startValidator])}_getValueFromModel(e){return e.start}_shouldHandleChangeEvent(e){return super._shouldHandleChangeEvent(e)?e.oldValue?.start?!e.selection.start||!!this._dateAdapter.compareDate(e.oldValue.start,e.selection.start):!!e.selection.start:!1}_assignValueToModel(e){if(this._model){let a=new f(e,this._model.selection.end);this._model.updateSelection(a,this)}}_formatValue(e){super._formatValue(e),this._rangeInput._handleChildValueChange()}_onKeydown(e){let a=this._rangeInput._endInput,t=this._elementRef.nativeElement,r=this._dir?.value!=="rtl";(e.keyCode===39&&r||e.keyCode===37&&!r)&&t.selectionStart===t.value.length&&t.selectionEnd===t.value.length?(e.preventDefault(),a._elementRef.nativeElement.setSelectionRange(0,0),a.focus()):super._onKeydown(e)}};i.\u0275fac=function(a){return new(a||i)(o(Je),o(Y),o($e),o(Re),o(Qe,8),o(qe,8),o(_,8),o(P,8))},i.\u0275dir=R({type:i,selectors:[["input","matStartDate",""]],hostAttrs:["type","text",1,"mat-start-date","mat-date-range-input-inner"],hostVars:5,hostBindings:function(a,t){a&1&&g("input",function(s){return t._onInput(s.target.value)})("change",function(){return t._onChange()})("keydown",function(s){return t._onKeydown(s)})("blur",function(){return t._onBlur()}),a&2&&(Ne("disabled",t.disabled),b("aria-haspopup",t._rangeInput.rangePicker?"dialog":null)("aria-owns",(t._rangeInput.rangePicker==null?null:t._rangeInput.rangePicker.opened)&&t._rangeInput.rangePicker.id||null)("min",t._getMinDate()?t._dateAdapter.toIso8601(t._getMinDate()):null)("max",t._getMaxDate()?t._dateAdapter.toIso8601(t._getMaxDate()):null))},outputs:{dateChange:"dateChange",dateInput:"dateInput"},standalone:!0,features:[q([{provide:ze,useExisting:i,multi:!0},{provide:Ke,useExisting:i,multi:!0}]),X]});let n=i;return n})(),di=(()=>{let i=class i extends ba{constructor(e,a,t,r,s,l,S,V){super(e,a,t,r,s,l,S,V),this._endValidator=j=>{let E=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(j.value)),U=this._model?this._model.selection.start:null;return!E||!U||this._dateAdapter.compareDate(E,U)>=0?null:{matEndDateInvalid:{start:U,actual:E}}},this._validator=ve.compose([...super._getValidators(),this._endValidator])}_getValueFromModel(e){return e.end}_shouldHandleChangeEvent(e){return super._shouldHandleChangeEvent(e)?e.oldValue?.end?!e.selection.end||!!this._dateAdapter.compareDate(e.oldValue.end,e.selection.end):!!e.selection.end:!1}_assignValueToModel(e){if(this._model){let a=new f(this._model.selection.start,e);this._model.updateSelection(a,this)}}_moveCaretToEndOfStartInput(){let e=this._rangeInput._startInput._elementRef.nativeElement,a=e.value;a.length>0&&e.setSelectionRange(a.length,a.length),e.focus()}_onKeydown(e){let a=this._elementRef.nativeElement,t=this._dir?.value!=="rtl";e.keyCode===8&&!a.value?this._moveCaretToEndOfStartInput():(e.keyCode===37&&t||e.keyCode===39&&!t)&&a.selectionStart===0&&a.selectionEnd===0?(e.preventDefault(),this._moveCaretToEndOfStartInput()):super._onKeydown(e)}};i.\u0275fac=function(a){return new(a||i)(o(Je),o(Y),o($e),o(Re),o(Qe,8),o(qe,8),o(_,8),o(P,8))},i.\u0275dir=R({type:i,selectors:[["input","matEndDate",""]],hostAttrs:["type","text",1,"mat-end-date","mat-date-range-input-inner"],hostVars:5,hostBindings:function(a,t){a&1&&g("input",function(s){return t._onInput(s.target.value)})("change",function(){return t._onChange()})("keydown",function(s){return t._onKeydown(s)})("blur",function(){return t._onBlur()}),a&2&&(Ne("disabled",t.disabled),b("aria-haspopup",t._rangeInput.rangePicker?"dialog":null)("aria-owns",(t._rangeInput.rangePicker==null?null:t._rangeInput.rangePicker.opened)&&t._rangeInput.rangePicker.id||null)("min",t._getMinDate()?t._dateAdapter.toIso8601(t._getMinDate()):null)("max",t._getMaxDate()?t._dateAdapter.toIso8601(t._getMaxDate()):null))},outputs:{dateChange:"dateChange",dateInput:"dateInput"},standalone:!0,features:[q([{provide:ze,useExisting:i,multi:!0},{provide:Ke,useExisting:i,multi:!0}]),X]});let n=i;return n})(),oi=0,qi=(()=>{let i=class i{get value(){return this._model?this._model.selection:null}get shouldLabelFloat(){return this.focused||!this.empty}get placeholder(){let e=this._startInput?._getPlaceholder()||"",a=this._endInput?._getPlaceholder()||"";return e||a?`${e} ${this.separator} ${a}`:""}get rangePicker(){return this._rangePicker}set rangePicker(e){e&&(this._model=e.registerInput(this),this._rangePicker=e,this._closedSubscription.unsubscribe(),this._closedSubscription=e.closedStream.subscribe(()=>{this._startInput?._onTouched(),this._endInput?._onTouched()}),this._registerModel(this._model))}get required(){return this._required??(this._isTargetRequired(this)||this._isTargetRequired(this._startInput)||this._isTargetRequired(this._endInput))??!1}set required(e){this._required=e}get dateFilter(){return this._dateFilter}set dateFilter(e){let a=this._startInput,t=this._endInput,r=a&&a._matchesFilter(a.value),s=t&&t._matchesFilter(a.value);this._dateFilter=e,a&&a._matchesFilter(a.value)!==r&&a._validatorOnChange(),t&&t._matchesFilter(t.value)!==s&&t._validatorOnChange()}get min(){return this._min}set min(e){let a=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e));this._dateAdapter.sameDate(a,this._min)||(this._min=a,this._revalidate())}get max(){return this._max}set max(e){let a=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e));this._dateAdapter.sameDate(a,this._max)||(this._max=a,this._revalidate())}get disabled(){return this._startInput&&this._endInput?this._startInput.disabled&&this._endInput.disabled:this._groupDisabled}set disabled(e){e!==this._groupDisabled&&(this._groupDisabled=e,this.stateChanges.next(void 0))}get errorState(){return this._startInput&&this._endInput?this._startInput.errorState||this._endInput.errorState:!1}get empty(){let e=this._startInput?this._startInput.isEmpty():!1,a=this._endInput?this._endInput.isEmpty():!1;return e&&a}constructor(e,a,t,r,s){this._changeDetectorRef=e,this._elementRef=a,this._dateAdapter=r,this._formField=s,this._closedSubscription=x.EMPTY,this.id=`mat-date-range-input-${oi++}`,this.focused=!1,this.controlType="mat-date-range-input",this._groupDisabled=!1,this._ariaDescribedBy=null,this.separator="\u2013",this.comparisonStart=null,this.comparisonEnd=null,this.stateChanges=new H,this.disableAutomaticLabeling=!0,s?._elementRef.nativeElement.classList.contains("mat-mdc-form-field")&&a.nativeElement.classList.add("mat-mdc-input-element","mat-mdc-form-field-input-control","mdc-text-field__input"),this.ngControl=t}setDescribedByIds(e){this._ariaDescribedBy=e.length?e.join(" "):null}onContainerClick(){!this.focused&&!this.disabled&&(!this._model||!this._model.selection.start?this._startInput.focus():this._endInput.focus())}ngAfterContentInit(){this._model&&this._registerModel(this._model),ce(this._startInput.stateChanges,this._endInput.stateChanges).subscribe(()=>{this.stateChanges.next(void 0)})}ngOnChanges(e){fa(e,this._dateAdapter)&&this.stateChanges.next(void 0)}ngOnDestroy(){this._closedSubscription.unsubscribe(),this.stateChanges.complete()}getStartValue(){return this.value?this.value.start:null}getThemePalette(){return this._formField?this._formField.color:void 0}getConnectedOverlayOrigin(){return this._formField?this._formField.getConnectedOverlayOrigin():this._elementRef}getOverlayLabelId(){return this._formField?this._formField.getLabelId():null}_getInputMirrorValue(e){let a=e==="start"?this._startInput:this._endInput;return a?a.getMirrorValue():""}_shouldHidePlaceholders(){return this._startInput?!this._startInput.isEmpty():!1}_handleChildValueChange(){this.stateChanges.next(void 0),this._changeDetectorRef.markForCheck()}_openDatepicker(){this._rangePicker&&this._rangePicker.open()}_shouldHideSeparator(){return(!this._formField||this._formField.getLabelId()&&!this._formField._shouldLabelFloat())&&this.empty}_getAriaLabelledby(){let e=this._formField;return e&&e._hasFloatingLabel()?e._labelId:null}_getStartDateAccessibleName(){return this._startInput._getAccessibleName()}_getEndDateAccessibleName(){return this._endInput._getAccessibleName()}_updateFocus(e){this.focused=e!==null,this.stateChanges.next()}_revalidate(){this._startInput&&this._startInput._validatorOnChange(),this._endInput&&this._endInput._validatorOnChange()}_registerModel(e){this._startInput&&this._startInput._registerModel(e),this._endInput&&this._endInput._registerModel(e)}_isTargetRequired(e){return e?.ngControl?.control?.hasValidator(ve.required)}};i.\u0275fac=function(a){return new(a||i)(o(L),o(Y),o(Yt,10),o(_,8),o(ht,8))},i.\u0275cmp=y({type:i,selectors:[["mat-date-range-input"]],contentQueries:function(a,t,r){if(a&1&&(Le(r,si,5),Le(r,di,5)),a&2){let s;w(s=k())&&(t._startInput=s.first),w(s=k())&&(t._endInput=s.first)}},hostAttrs:["role","group",1,"mat-date-range-input"],hostVars:8,hostBindings:function(a,t){a&2&&(b("id",t.id)("aria-labelledby",t._getAriaLabelledby())("aria-describedby",t._ariaDescribedBy)("data-mat-calendar",t.rangePicker?t.rangePicker.id:null),T("mat-date-range-input-hide-placeholders",t._shouldHidePlaceholders())("mat-date-range-input-required",t.required))},inputs:{rangePicker:"rangePicker",required:[F.HasDecoratorInputTransform,"required","required",B],dateFilter:"dateFilter",min:"min",max:"max",disabled:[F.HasDecoratorInputTransform,"disabled","disabled",B],separator:"separator",comparisonStart:"comparisonStart",comparisonEnd:"comparisonEnd"},exportAs:["matDateRangeInput"],standalone:!0,features:[q([{provide:Zt,useExisting:i},{provide:Je,useExisting:i}]),ue,z,M],ngContentSelectors:Ya,decls:11,vars:5,consts:[["cdkMonitorSubtreeFocus","",1,"mat-date-range-input-container",3,"cdkFocusChange"],[1,"mat-date-range-input-wrapper"],["aria-hidden","true",1,"mat-date-range-input-mirror"],[1,"mat-date-range-input-separator"],[1,"mat-date-range-input-wrapper","mat-date-range-input-end-wrapper"]],template:function(a,t){a&1&&(_e(Pa),c(0,"div",0),g("cdkFocusChange",function(s){return t._updateFocus(s)}),c(1,"div",1),ae(2),c(3,"span",2),D(4),u()(),c(5,"span",3),D(6),u(),c(7,"div",4),ae(8,1),c(9,"span",2),D(10),u()()()),a&2&&(h(4),N(t._getInputMirrorValue("start")),h(),T("mat-date-range-input-separator-hidden",t._shouldHideSeparator()),h(),N(t.separator),h(4),N(t._getInputMirrorValue("end")))},dependencies:[ot],styles:[".mat-date-range-input{display:block;width:100%}.mat-date-range-input-container{display:flex;align-items:center}.mat-date-range-input-separator{transition:opacity 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1);margin:0 4px;color:var(--mat-datepicker-range-input-separator-color)}.mat-form-field-disabled .mat-date-range-input-separator{color:var(--mat-datepicker-range-input-disabled-state-separator-color)}._mat-animation-noopable .mat-date-range-input-separator{transition:none}.mat-date-range-input-separator-hidden{-webkit-user-select:none;user-select:none;opacity:0;transition:none}.mat-date-range-input-wrapper{position:relative;overflow:hidden;max-width:calc(50% - 4px)}.mat-date-range-input-end-wrapper{flex-grow:1}.mat-date-range-input-inner{position:absolute;top:0;left:0;font:inherit;background:rgba(0,0,0,0);color:currentColor;border:none;outline:none;padding:0;margin:0;vertical-align:bottom;text-align:inherit;-webkit-appearance:none;width:100%;height:100%}.mat-date-range-input-inner:-moz-ui-invalid{box-shadow:none}.mat-date-range-input-inner::placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-date-range-input-inner::-moz-placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-date-range-input-inner::-webkit-input-placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-date-range-input-inner:-ms-input-placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-date-range-input-inner[disabled]{color:var(--mat-datepicker-range-input-disabled-state-text-color)}.mat-form-field-hide-placeholder .mat-date-range-input-inner::placeholder,.mat-date-range-input-hide-placeholders .mat-date-range-input-inner::placeholder{-webkit-user-select:none;user-select:none;color:rgba(0,0,0,0) !important;-webkit-text-fill-color:rgba(0,0,0,0);transition:none}.cdk-high-contrast-active .mat-form-field-hide-placeholder .mat-date-range-input-inner::placeholder,.cdk-high-contrast-active .mat-date-range-input-hide-placeholders .mat-date-range-input-inner::placeholder{opacity:0}.mat-form-field-hide-placeholder .mat-date-range-input-inner::-moz-placeholder,.mat-date-range-input-hide-placeholders .mat-date-range-input-inner::-moz-placeholder{-webkit-user-select:none;user-select:none;color:rgba(0,0,0,0) !important;-webkit-text-fill-color:rgba(0,0,0,0);transition:none}.cdk-high-contrast-active .mat-form-field-hide-placeholder .mat-date-range-input-inner::-moz-placeholder,.cdk-high-contrast-active .mat-date-range-input-hide-placeholders .mat-date-range-input-inner::-moz-placeholder{opacity:0}.mat-form-field-hide-placeholder .mat-date-range-input-inner::-webkit-input-placeholder,.mat-date-range-input-hide-placeholders .mat-date-range-input-inner::-webkit-input-placeholder{-webkit-user-select:none;user-select:none;color:rgba(0,0,0,0) !important;-webkit-text-fill-color:rgba(0,0,0,0);transition:none}.cdk-high-contrast-active .mat-form-field-hide-placeholder .mat-date-range-input-inner::-webkit-input-placeholder,.cdk-high-contrast-active .mat-date-range-input-hide-placeholders .mat-date-range-input-inner::-webkit-input-placeholder{opacity:0}.mat-form-field-hide-placeholder .mat-date-range-input-inner:-ms-input-placeholder,.mat-date-range-input-hide-placeholders .mat-date-range-input-inner:-ms-input-placeholder{-webkit-user-select:none;user-select:none;color:rgba(0,0,0,0) !important;-webkit-text-fill-color:rgba(0,0,0,0);transition:none}.cdk-high-contrast-active .mat-form-field-hide-placeholder .mat-date-range-input-inner:-ms-input-placeholder,.cdk-high-contrast-active .mat-date-range-input-hide-placeholders .mat-date-range-input-inner:-ms-input-placeholder{opacity:0}._mat-animation-noopable .mat-date-range-input-inner::placeholder{transition:none}._mat-animation-noopable .mat-date-range-input-inner::-moz-placeholder{transition:none}._mat-animation-noopable .mat-date-range-input-inner::-webkit-input-placeholder{transition:none}._mat-animation-noopable .mat-date-range-input-inner:-ms-input-placeholder{transition:none}.mat-date-range-input-mirror{-webkit-user-select:none;user-select:none;visibility:hidden;white-space:nowrap;display:inline-block;min-width:2px}.mat-mdc-form-field-type-mat-date-range-input .mat-mdc-form-field-infix{width:200px}"],encapsulation:2,changeDetection:0});let n=i;return n})(),Wi=(()=>{let i=class i extends ee{_forwardContentValues(e){super._forwardContentValues(e);let a=this.datepickerInput;a&&(e.comparisonStart=a.comparisonStart,e.comparisonEnd=a.comparisonEnd,e.startDateAccessibleName=a._getStartDateAccessibleName(),e.endDateAccessibleName=a._getEndDateAccessibleName())}};i.\u0275fac=(()=>{let e;return function(t){return(e||(e=tt(i)))(t||i)}})(),i.\u0275cmp=y({type:i,selectors:[["mat-date-range-picker"]],exportAs:["matDateRangePicker"],standalone:!0,features:[q([Ka,Wa,{provide:ee,useExisting:i}]),X,M],decls:0,vars:0,template:function(a,t){},encapsulation:2,changeDetection:0});let n=i;return n})(),$i=(()=>{let i=class i{constructor(e){this._datepicker=e}_applySelection(){this._datepicker._applyPendingSelection(),this._datepicker.close()}};i.\u0275fac=function(a){return new(a||i)(o(ee))},i.\u0275dir=R({type:i,selectors:[["","matDatepickerApply",""],["","matDateRangePickerApply",""]],hostBindings:function(a,t){a&1&&g("click",function(){return t._applySelection()})},standalone:!0});let n=i;return n})(),Gi=(()=>{let i=class i{constructor(e){this._datepicker=e}};i.\u0275fac=function(a){return new(a||i)(o(ee))},i.\u0275dir=R({type:i,selectors:[["","matDatepickerCancel",""],["","matDateRangePickerCancel",""]],hostBindings:function(a,t){a&1&&g("click",function(){return t._datepicker.close()})},standalone:!0});let n=i;return n})(),Ui=(()=>{let i=class i{constructor(e,a){this._datepicker=e,this._viewContainerRef=a}ngAfterViewInit(){this._portal=new Qt(this._template,this._viewContainerRef),this._datepicker.registerActions(this._portal)}ngOnDestroy(){this._datepicker.removeActions(this._portal),this._portal&&this._portal.isAttached&&this._portal?.detach()}};i.\u0275fac=function(a){return new(a||i)(o(ee),o(it))},i.\u0275cmp=y({type:i,selectors:[["mat-datepicker-actions"],["mat-date-range-picker-actions"]],viewQuery:function(a,t){if(a&1&&O(Ft,5),a&2){let r;w(r=k())&&(t._template=r.first)}},standalone:!0,features:[M],ngContentSelectors:la,decls:1,vars:0,consts:[[1,"mat-datepicker-actions"]],template:function(a,t){a&1&&(_e(),K(0,Na,2,0,"ng-template"))},styles:[".mat-datepicker-actions{display:flex;justify-content:flex-end;align-items:center;padding:0 8px 8px 8px}.mat-datepicker-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:8px}[dir=rtl] .mat-datepicker-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:0;margin-right:8px}"],encapsulation:2,changeDetection:0});let n=i;return n})(),Xi=(()=>{let i=class i{};i.\u0275fac=function(a){return new(a||i)},i.\u0275mod=It({type:i}),i.\u0275inj=Mt({providers:[we,Za],imports:[Pt,Jt,Gt,zt,qt,Ut,_a,ai,pa,Kt]});let n=i;return n})();export{Qi as a,va as b,ai as c,si as d,di as e,qi as f,Wi as g,$i as h,Gi as i,Ui as j,Xi as k};
|