dealpos 12.48.0 → 12.48.1
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/POS/{chunk-KEIUR636.js → chunk-2DYNW3AR.js} +1 -1
- package/POS/{chunk-FM5M6KKD.js → chunk-2R7GFCRY.js} +1 -1
- package/POS/{chunk-MQCS6OP3.js → chunk-32DOOMSK.js} +1 -1
- package/POS/{chunk-WADXCDY3.js → chunk-4AJHKN6M.js} +2 -2
- package/POS/{chunk-KZ6SQ4CB.js → chunk-4XM7FOW5.js} +1 -1
- package/POS/{chunk-ZUTMH3KG.js → chunk-5CABEYZ3.js} +1 -1
- package/POS/{chunk-4F3LHLWK.js → chunk-5F737N4B.js} +1 -1
- package/POS/{chunk-YMBCBIKQ.js → chunk-5P7SG7QZ.js} +1 -1
- package/POS/{chunk-IJTCLZTH.js → chunk-6CXQDOYK.js} +1 -1
- package/POS/{chunk-DFOUG3EW.js → chunk-6IDKOLED.js} +1 -1
- package/POS/{chunk-3DXOUCSE.js → chunk-6IU6ISMT.js} +1 -1
- package/POS/{chunk-2SAXRNY6.js → chunk-6L5FESEZ.js} +1 -1
- package/POS/{chunk-FII4J53E.js → chunk-6QALLOMS.js} +1 -1
- package/POS/{chunk-EIG5NXGP.js → chunk-A3QCZSLD.js} +1 -1
- package/POS/{chunk-SRKZ4OGF.js → chunk-ABYVYIJW.js} +1 -1
- package/POS/{chunk-EEEES4XJ.js → chunk-AJXOVI4O.js} +1 -1
- package/POS/{chunk-2E4BDCLJ.js → chunk-BL5M5TA2.js} +1 -1
- package/POS/{chunk-JOBMXOJI.js → chunk-BRHJRPCH.js} +1 -1
- package/POS/{chunk-RXCJBU4S.js → chunk-CGTOU6ZY.js} +1 -1
- package/POS/{chunk-JIIA6CGK.js → chunk-CIIM2E26.js} +1 -1
- package/POS/{chunk-LA6ZQ674.js → chunk-CSX7UPDG.js} +1 -1
- package/POS/{chunk-WYNJJ67A.js → chunk-DAAF6PZL.js} +1 -1
- package/POS/{chunk-5SQJOG54.js → chunk-EF4VU3B7.js} +1 -1
- package/POS/{chunk-WIORGHWW.js → chunk-EJGH24FN.js} +1 -1
- package/POS/{chunk-76T7A6QM.js → chunk-GJKMRESM.js} +1 -1
- package/POS/{chunk-PAL73Y6T.js → chunk-GMVILWAF.js} +1 -1
- package/POS/{chunk-3ZBRQR4A.js → chunk-GSD5GCWZ.js} +1 -1
- package/POS/{chunk-5TT2UPHY.js → chunk-GTTDYRRN.js} +1 -1
- package/POS/{chunk-3232K4UX.js → chunk-HIR6P7UU.js} +1 -1
- package/POS/{chunk-3LTWJH6K.js → chunk-HWQBQHVC.js} +1 -1
- package/POS/{chunk-KGQO2JLP.js → chunk-HZQEGVSV.js} +1 -1
- package/POS/{chunk-62ILPNJZ.js → chunk-IEPO73MR.js} +1 -1
- package/POS/chunk-IGNV3BF2.js +1 -0
- package/POS/{chunk-KB3BCJBT.js → chunk-IOSRU34V.js} +1 -1
- package/POS/{chunk-2T36VQZZ.js → chunk-ISD7MRHP.js} +1 -1
- package/POS/{chunk-D5FVLS2P.js → chunk-ITOUAWAY.js} +1 -1
- package/POS/{chunk-5APIHGMV.js → chunk-JMAGEAXH.js} +1 -1
- package/POS/{chunk-GPZZFNMV.js → chunk-JYBTMNT3.js} +1 -1
- package/POS/{chunk-2AAAHVLQ.js → chunk-K3NRCSQG.js} +1 -1
- package/POS/{chunk-O26QTUL5.js → chunk-LJABKWJG.js} +1 -1
- package/POS/{chunk-N6KYIBB3.js → chunk-LUL2H2YC.js} +1 -1
- package/POS/{chunk-G2V53TZJ.js → chunk-LUNYRSYV.js} +1 -1
- package/POS/{chunk-I66GOT4F.js → chunk-LWIL6PZQ.js} +1 -1
- package/POS/{chunk-SGF5K372.js → chunk-MDHDFCOL.js} +2 -2
- package/POS/{chunk-SOAACW2T.js → chunk-MIYDY3LF.js} +1 -1
- package/POS/{chunk-OURBCOQT.js → chunk-NARV5Q32.js} +1 -1
- package/POS/{chunk-BCZT4OWT.js → chunk-NUCIJ2YT.js} +1 -1
- package/POS/{chunk-SI5VX6DL.js → chunk-NYXC7CXU.js} +1 -1
- package/POS/{chunk-VB42XFQE.js → chunk-OANXUNBL.js} +1 -1
- package/POS/{chunk-LFKETE3S.js → chunk-OS7DTEAY.js} +1 -1
- package/POS/{chunk-IHGT3EKI.js → chunk-OU5LDD7X.js} +1 -1
- package/POS/{chunk-FT6MDBHV.js → chunk-PJURG5IP.js} +1 -1
- package/POS/{chunk-GDCKPOZU.js → chunk-PPVE5LYJ.js} +1 -1
- package/POS/{chunk-3I2IQ5LY.js → chunk-PSD7ZRKF.js} +1 -1
- package/POS/{chunk-A2VHUDCF.js → chunk-QGBLG6Z6.js} +1 -1
- package/POS/{chunk-3P2KZGED.js → chunk-QIMZNOQ3.js} +1 -1
- package/POS/{chunk-7HUYJCGE.js → chunk-R7BFVAW7.js} +1 -1
- package/POS/{chunk-KHRFBWIQ.js → chunk-R7Y7O2IK.js} +1 -1
- package/POS/{chunk-7NJRMDZT.js → chunk-RBEHCSJR.js} +1 -1
- package/POS/{chunk-A45ER2ZO.js → chunk-RD3GBXID.js} +1 -1
- package/POS/{chunk-YALGUTYF.js → chunk-RRZO5QGT.js} +1 -1
- package/POS/{chunk-OXJVW6W5.js → chunk-RUZSU4J2.js} +2 -2
- package/POS/{chunk-JTCEHSMJ.js → chunk-SDQUIA6U.js} +1 -1
- package/POS/{chunk-SON4FATF.js → chunk-SQTCMVTQ.js} +1 -1
- package/POS/{chunk-JDJ3GDBO.js → chunk-STKCQVMP.js} +1 -1
- package/POS/{chunk-G6XH64IJ.js → chunk-T6MR65WY.js} +1 -1
- package/POS/{chunk-5DZZMCA6.js → chunk-TQOG45CJ.js} +1 -1
- package/POS/{chunk-BHC6LWSE.js → chunk-UCBHLNSL.js} +1 -1
- package/POS/{chunk-EIUQME54.js → chunk-UVNIADSQ.js} +1 -1
- package/POS/{chunk-OOUYYAQZ.js → chunk-VJYHT5LO.js} +1 -1
- package/POS/chunk-VLGJ2F4Z.js +1 -0
- package/POS/{chunk-NXJYSOJH.js → chunk-VNCR47XD.js} +1 -1
- package/POS/{chunk-LYXOEF2Y.js → chunk-VR5OCLJ4.js} +1 -1
- package/POS/{chunk-NUZ6KMQ4.js → chunk-VYRUGBOP.js} +1 -1
- package/POS/{chunk-OLA47DFS.js → chunk-W3L2MEX3.js} +1 -1
- package/POS/{chunk-LCYV2T5U.js → chunk-WPJHH4VI.js} +1 -1
- package/POS/{chunk-JX54E6MR.js → chunk-WTTHNJEI.js} +1 -1
- package/POS/{chunk-XF6E7R56.js → chunk-X7ZI4TUH.js} +1 -1
- package/POS/{chunk-SWLHRRNM.js → chunk-XC2PEND3.js} +1 -1
- package/POS/{chunk-BLYLTEI4.js → chunk-XLOOEPTY.js} +1 -1
- package/POS/{chunk-WCD772IE.js → chunk-XUD555XW.js} +1 -1
- package/POS/{chunk-NN7CTSEO.js → chunk-XV5BAG4Y.js} +1 -1
- package/POS/{chunk-3MN5D4GB.js → chunk-XZSZKEON.js} +1 -1
- package/POS/{chunk-KUQSZP2G.js → chunk-Y7IEKRSV.js} +1 -1
- package/POS/{chunk-OSFOEX2F.js → chunk-ZFRRM773.js} +1 -1
- package/POS/{chunk-3UY6VESU.js → chunk-ZGWCFBXT.js} +2 -2
- package/POS/{chunk-4FWX3KTD.js → chunk-ZLMKFZSO.js} +1 -1
- package/POS/{chunk-XYDJQL7B.js → chunk-ZN2WGAUR.js} +1 -1
- package/POS/{chunk-367LXOBF.js → chunk-ZUTNZL5S.js} +1 -1
- package/POS/index.html +2 -2
- package/POS/{main-QUFXGFCW.js → main-SO2JJWKI.js} +2 -2
- package/package.json +1 -1
- package/POS/chunk-GF6UMOX5.js +0 -1
- package/POS/chunk-WR72HZZI.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as B,b as J}from"./chunk-CAS2O7CC.js";import{B as H,C as O,c as V,h as A,n as j}from"./chunk-DKFSWJLD.js";import{b as W}from"./chunk-
|
|
1
|
+
import{a as B,b as J}from"./chunk-CAS2O7CC.js";import{B as H,C as O,c as V,h as A,n as j}from"./chunk-DKFSWJLD.js";import{b as W}from"./chunk-XUD555XW.js";import{$b as S,Bb as d,Ca as C,Eb as x,Gb as l,Oc as k,Sa as a,Ta as h,Vb as m,Wb as y,Xb as D,Xc as E,Yb as P,_c as R,ac as T,bc as F,eb as c,ga as b,ib as s,na as N,nc as I,oa as w,oc as M,qb as v,ua as u,va as g,vb as o,wb as p,xb as f}from"./chunk-6LBESDNN.js";function z(t,i){if(t&1&&(o(0,"span"),m(1),p()),t&2){let e=l();a(),P(" Showing ",e.pageData.Filter.PageNumber*e.total-e.total+1," - ",e.pageData.Filter.PageNumber*e.total," ")}}function G(t,i){if(t&1&&(o(0,"span"),m(1),p()),t&2){let e=l();a(),P(" Showing ",e.pageData.Filter.RowCount*e.pageData.Filter.PageNumber-e.pageData.Filter.RowCount+1," - ",e.pageData.Filter.RowCount*e.pageData.Filter.PageNumber-e.pageData.Filter.RowCount+e.total," ")}}function K(t,i){if(t&1){let e=d();o(0,"span",9),x("click",function(){u(e);let r=l();return g(r.StoreRowsCountAPIResult())}),o(1,"i",10),m(2,"?"),p()()}}function Q(t,i){if(t&1&&(o(0,"span"),m(1),I(2,"number"),p()),t&2){let e=l();a(),y(M(2,1,e.listTotal))}}function U(t,i){if(t&1){let e=d();m(0," Page "),o(1,"input",11),x("keyup",function(r){u(e);let _=l();return g(_.onJumpToPage(r))}),F("ngModelChange",function(r){u(e);let _=l();return T(_.pageNumber,r)||(_.pageNumber=r),g(r)}),p()}if(t&2){let e=l();a(),S("ngModel",e.pageNumber)}}function X(t,i){if(t&1&&m(0),t&2){let e=l();D(" ",e.pageNumber," Page ")}}function Y(t,i){if(t&1){let e=d();o(0,"a",12),x("click",function(){u(e);let r=l();return g(r.onPreviousPage())}),f(1,"i",13),m(2," Previous"),p()}}function Z(t,i){if(t&1){let e=d();o(0,"a",12),x("click",function(){u(e);let r=l();return g(r.onNextPage())}),f(1,"i",14),m(2," Next"),p()}}var L=class t{constructor(i){this.httpService=i}editPageNumber=!0;pageData;total;api;jumpToPage=new C;previousPage=new C;nextPage=new C;pageNumber=1;showingNumber=this.pageNumber;listTotal=-1;onJumpToPage(i){i.key==="Enter"&&(this.pageData.Filter.PageNumber=this.pageNumber,this.showingNumber=this.pageNumber,this.jumpToPage.emit())}onPreviousPage(){this.pageData.Filter.PageNumber-=1,this.pageNumber=this.pageData.Filter.PageNumber,this.showingNumber=this.pageNumber,this.previousPage.emit()}onNextPage(){this.pageData.Filter.PageNumber+=1,this.pageNumber=this.pageData.Filter.PageNumber,this.showingNumber=this.pageNumber,this.nextPage.emit()}StoreRowsCountAPIResult(){this.httpService.post("/api/"+this.api,this.pageData.Filter).subscribe(i=>{this.listTotal=i.Count?i.Count:i,this.pageData.HideStoreApiCount=!0})}static \u0275fac=function(e){return new(e||t)(h(W))};static \u0275cmp=N({type:t,selectors:[["POS-complex-pagination"]],inputs:{editPageNumber:"editPageNumber",pageData:"pageData",total:"total",api:"api"},outputs:{jumpToPage:"jumpToPage",previousPage:"previousPage",nextPage:"nextPage"},decls:15,vars:7,consts:[[1,"d-flex","justify-content-between","mt-5"],[1,"me-auto","d-sm-block","collapse","mt-3"],[1,"fw-bold","fst-italic","hidden-xxs"],[4,"ngIf"],[1,"me-2"],["style","cursor: pointer",3,"click",4,"ngIf"],["type","text","autoNum","",1,"text-end",2,"width","45px",3,"ngModel"],[1,"btn-group"],["class","btn btn-outline-secondary btn-sm text-primary",3,"click",4,"ngIf"],[2,"cursor","pointer",3,"click"],[1,"border","p-3"],["type","text","autoNum","",1,"text-end",2,"width","45px",3,"keyup","ngModelChange","ngModel"],[1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fa-solid","fa-arrow-left"],[1,"fa-solid","fa-arrow-right"]],template:function(e,n){e&1&&(o(0,"div",0)(1,"div",1)(2,"div",2),c(3,z,2,2,"span",3)(4,G,2,2,"span",3),o(5,"span",4),m(6,"of"),p(),c(7,K,3,0,"span",5)(8,Q,3,3,"span",3),m(9," records ~ "),c(10,U,2,1,"input",6)(11,X,1,1),p()(),o(12,"div",7),c(13,Y,3,0,"a",8)(14,Z,3,0,"a",8),p()()),e&2&&(a(3),s("ngIf",n.pageData.Filter.RowCount==n.total),a(),s("ngIf",n.pageData.Filter.RowCount!=n.total),a(3),s("ngIf",!n.pageData.HideStoreApiCount),a(),s("ngIf",n.pageData.HideStoreApiCount),a(2),v(n.editPageNumber?10:11),a(3),s("ngIf",n.pageData.Filter.PageNumber!=1),a(),s("ngIf",n.total>=n.pageData.Filter.RowCount))},dependencies:[k,V,A,j,J,E]})},q=class t{static \u0275fac=function(e){return new(e||t)};static \u0275mod=w({type:t});static \u0275inj=b({imports:[R,H,O,B]})};export{L as a,q as b};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as Ti,b as Di,c as Pi,d as Oi}from"./chunk-5CTOJOAZ.js";import{a as mt}from"./chunk-AFXLB4GT.js";import{c as at,d as li}from"./chunk-
|
|
1
|
+
import{a as Ti,b as Di,c as Pi,d as Oi}from"./chunk-5CTOJOAZ.js";import{a as mt}from"./chunk-AFXLB4GT.js";import{c as at,d as li}from"./chunk-UVNIADSQ.js";import{b as Ii,c as Ei}from"./chunk-ZE7FLJTM.js";import{a as Mi,b as wi}from"./chunk-KK7D5OYB.js";import"./chunk-SUEPSJ4B.js";import{r as Ne,s as vi}from"./chunk-JYBTMNT3.js";import"./chunk-4FWO46RI.js";import{a as ot}from"./chunk-LUL2H2YC.js";import{a as Ci,b as yi}from"./chunk-2DYNW3AR.js";import{d as xi,e as Si}from"./chunk-TAJWS3UP.js";import{a as Oe}from"./chunk-ZN2WGAUR.js";import"./chunk-OS7DTEAY.js";import"./chunk-QAWRPM4P.js";import"./chunk-VWQIWSQM.js";import{a as si,b as ci}from"./chunk-CAS2O7CC.js";import"./chunk-2AGLEN5T.js";import{b as X,c as hi}from"./chunk-VYRUGBOP.js";import"./chunk-XV5BAG4Y.js";import{a as pi}from"./chunk-AMMWXK4B.js";import{m as gi,n as bi}from"./chunk-IOSRU34V.js";import"./chunk-CMGSDVHE.js";import{a as pe}from"./chunk-VNCR47XD.js";import"./chunk-HWQBQHVC.js";import{a as F,b as Y,c as K,d as rt}from"./chunk-CKLKKXKC.js";import{a as be,b as ri}from"./chunk-O3SQSNRU.js";import{B as fi,M as pt,T as _i,c as Q,d as re,e as le,m as lt,u as di,y as ui}from"./chunk-UVB2YZEK.js";import"./chunk-V34SAX5L.js";import{a as ni}from"./chunk-VR5OCLJ4.js";import"./chunk-UJBDZYC5.js";import{e as ke,f as mi}from"./chunk-NAHXOXMU.js";import"./chunk-BPSDM5LS.js";import{B as it,C as ai,c as z,h as A,i as Ee,k as Te,n as V,o as De,w as Pe,y as oi,z as tt}from"./chunk-DKFSWJLD.js";import"./chunk-STKCQVMP.js";import"./chunk-4QQHNZLJ.js";import{b as nt}from"./chunk-ZQBOTFEA.js";import{a as H}from"./chunk-C34GKBAP.js";import{a as He,b as T}from"./chunk-XUD555XW.js";import{$ as zt,$b as y,Bb as C,C as ce,Da as $e,Eb as x,Fa as qt,Fc as Jt,Gb as c,Hd as et,Ic as Xt,Jb as Le,Jd as Se,K as Zt,Kb as Qt,Kd as Ie,Lc as ei,Md as At,Na as P,Nc as $,Oa as xe,Oc as N,Od as j,Sa as r,Ta as u,Tc as ti,U as Ze,Ub as R,Vb as o,Vc as Z,Wb as _,Xb as v,Xc as ae,Y as te,Yb as Me,Zb as Ft,_c as Xe,ac as M,b as We,ba as ze,bc as w,c as jt,cb as oe,cc as Yt,d as Ue,dc as Kt,eb as d,ec as Ke,fa as _e,fc as U,ga as Ge,gc as Je,ia as ne,ib as m,ja as Gt,kb as Qe,lb as Ye,mb as ge,md as ii,n as Wt,na as I,nc as f,oa as qe,oc as S,pc as D,qb as $t,qc as we,r as se,tc as de,ua as g,v as Ut,va as b,vb as i,wb as t,xb as h,yb as B,zb as L}from"./chunk-6LBESDNN.js";import{a as Lt,b as Ht}from"./chunk-LHUGHE24.js";function Vt(n){if(n instanceof Int8Array||n instanceof Uint8Array||n instanceof Uint8ClampedArray)return new DataView(n.buffer,n.byteOffset,n.byteLength);if(n instanceof ArrayBuffer)return new DataView(n);throw new TypeError("Expected `data` to be an ArrayBuffer, Buffer, Int8Array, Uint8Array or Uint8ClampedArray")}var Li="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",Hi="0123456789ABCDEFGHIJKLMNOPQRSTUV",ji="0123456789ABCDEFGHJKMNPQRSTVWXYZ";function Rt(n,p,e){e=e||{};let a,l;switch(p){case"RFC3548":case"RFC4648":a=Li,l=!0;break;case"RFC4648-HEX":a=Hi,l=!0;break;case"Crockford":a=ji,l=!1;break;default:throw new Error("Unknown base32 variant: "+p)}let s=e.padding!==void 0?e.padding:l,E=Vt(n),q=0,O=0,fe="";for(let Be=0;Be<E.byteLength;Be++)for(O=O<<8|E.getUint8(Be),q+=8;q>=5;)fe+=a[O>>>q-5&31],q-=5;if(q>0&&(fe+=a[O<<5-q&31]),s)for(;fe.length%8!==0;)fe+="=";return fe}var st=class n{constructor(p){this.dialogRef=p}config;ngOnInit(){this.config=new Y,this.config.okText="Disable Two Factor Authentication",this.config.customWidth="500px",this.config.title="DIsabled Two Factor Authentication",this.config.headerType=F.Warning}onOk(){this.dialogRef.close(!0)}static \u0275fac=function(e){return new(e||n)(u(Q))};static \u0275cmp=I({type:n,selectors:[["POS-modal-confirmation-disabled"]],decls:5,vars:1,consts:[[3,"onOk","onCancel","onClose","config"],[1,"row","px-10","py-4"],[1,"font-weight-normal","h4","text-left","lh-base"]],template:function(e,a){e&1&&(i(0,"modal-material",0),x("onOk",function(){return a.onOk()})("onCancel",function(){return a.dialogRef.close()})("onClose",function(){return a.dialogRef.close()}),i(1,"content")(2,"div",1)(3,"p",2),o(4,"Are you sure you want to disable two factor authentication for your account? "),t()()()()),e&2&&m("config",a.config)},dependencies:[K]})};function Ui(n,p){if(n&1){let e=C();B(0),i(1,"div")(2,"div",3),o(3," Two Factor Authentication Status: "),i(4,"span",4),o(5,"Enabled"),t()()(),i(6,"div",5)(7,"button",6),x("click",function(){g(e);let l=c();return b(l.onDisableTotp())}),o(8,"Disable Two Factor Authentication"),t()(),L()}}function Zi(n,p){if(n&1){let e=C();i(0,"div",7)(1,"div",8)(2,"h4"),o(3,"Connect Your DealPOS account to an Authenticator Application"),t(),i(4,"p"),o(5,"Secure your login with One Time Password using an Authenticator Application!"),t()()(),i(6,"div",7)(7,"div",8)(8,"ol",9)(9,"li",10)(10,"h5"),o(11,"Download Authenticator application"),t(),i(12,"div",11)(13,"a",12),h(14,"img",13),o(15," Microsoft Authenticator "),t(),i(16,"a",14),h(17,"img",15),o(18," Google Authenticator "),t()()(),i(19,"li",16)(20,"h5"),o(21,"Scan the QR code below"),t(),i(22,"div",5),h(23,"qr-code",17),t()(),i(24,"li",16)(25,"h5"),o(26,"Validate your QR Code"),t(),i(27,"form",18),x("submit",function(){g(e);let l=c();return b(l.onValidate())}),i(28,"div")(29,"input",19),x("keypress",function(l){g(e);let s=c();return b(s.numberOnly(l))}),w("ngModelChange",function(l){g(e);let s=c();return M(s.validation2FA.ValidationCode,l)||(s.validation2FA.ValidationCode=l),b(l)}),t()(),i(30,"div",5)(31,"button",20),o(32,"Validate"),t()()()()()()()}if(n&2){let e=c();r(23),m("value",e.qrcodeContent)("size",265),r(6),y("ngModel",e.validation2FA.ValidationCode)}}var ct=class n{constructor(p,e,a,l){this.document=p;this.authenticatorService=e;this.toastrService=a;this.dialog=l;this.destroy$=new jt}qrcodeContent;validation2FA={SecretKey:null,ValidationCode:null,Enabled:!0};destroy$;totpEnabled;ngOnInit(){this.generateQrCodeContent()}generateQrCodeContent(){let p=this.getDomainName(),e=this.generateRandomSecret();this.validation2FA.SecretKey=e;var a=H.parseJwt(localStorage.getItem("Token"));let l=a.LID;this.qrcodeContent=`otpauth://totp/${l}?secret=${e}&issuer=${p}`}generateRandomSecret(){let p=H.Guid_NewGuid(),e=new TextEncoder().encode(p);return Rt(e,"RFC3548")}getDomainName(){return this.document.location.origin.replace(/^https?:\/\//,"")}onValidate(){this.validateOnVerfiyCode()&&this.authenticatorService.configure2FA(this.validation2FA).pipe(zt(this.destroy$)).subscribe(p=>{this.toastrService.success(p.Message,"TOTP Enabled"),this.totpEnabled=!0})}validateOnVerfiyCode(){let p=!0;return H.IsEmpty(this.validation2FA.ValidationCode)?(p=!1,this.toastrService.warning("You must enter a authentication code.","Warning")):(this.validation2FA.ValidationCode.length<6||this.validation2FA.ValidationCode.length>6)&&(p=!1,this.toastrService.warning("The authentication code must be six digits long.","Warning")),p}numberOnly(p){return H.numberOnly(p)}onDisableTotp(){this.dialog.open(st).afterClosed().pipe(ce(p=>H.IsNotEmpty(p)),te(()=>this.authenticatorService.disableTwoFactorAuthentication())).subscribe(p=>{this.toastrService.success(p.Message,"TOTP Disabled"),this.totpEnabled=!1})}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}static \u0275fac=function(e){return new(e||n)(u(Xt),u(ot),u(j),u(le))};static \u0275cmp=I({type:n,selectors:[["POS-setup-2FA"]],inputs:{totpEnabled:"totpEnabled"},decls:4,vars:2,consts:[["TOTP_ENABLED",""],[1,"container-fluid","mt-6"],[4,"ngIf","ngIfElse"],[1,"d-inline-block","fs-5"],[1,"text-success","fw-bold"],[1,"mt-6"],["type","button","type","submit",1,"btn","btn-sm","btn-danger",3,"click"],[1,"row"],[1,"col-12"],[1,"ps-7"],[1,"fw-bold"],[1,"d-flex","align-items-center","mt-6"],["href","https://play.google.com/store/apps/details?id=com.azure.authenticator","target","_blank",1,"link-dark","border","py-3","px-6","me-6","border-primary","border-2"],["src","https://res.cloudinary.com/pos/image/upload/v1666247461/POS/Images/Login/Microsoft_Authenticator.png",2,"width","35px"],["href","https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2","target","_blank",1,"link-dark","border","py-3","px-6","me-6","border-primary","border-2"],["src","https://res.cloudinary.com/pos/image/upload/v1666247460/POS/Images/Login/Google_Authenticator.png",2,"width","35px"],[1,"fw-bold","mt-6"],["errorCorrectionLevel","H",1,"qr2fa",3,"value","size"],[1,"mt-6",3,"submit"],["type","text","name","auth","placeholder","Enter six Digit Code",1,"form-control","rounded","totpCustomStyle","border","border-2","border-primary",3,"keypress","ngModelChange","ngModel"],["type","button","type","submit",1,"btn","btn-sm","btn-primary","py-3"]],template:function(e,a){if(e&1&&(i(0,"div",1),d(1,Ui,9,0,"ng-container",2)(2,Zi,33,3,"ng-template",null,0,de),t()),e&2){let l=R(3);r(),m("ngIf",a.totpEnabled)("ngIfElse",l)}},dependencies:[N,De,z,A,Ee,V,Te,Mi],styles:[`.totpCustomStyle{height:3.625rem;padding:.75rem!important;color:#343434;font-size:.875rem;border-radius:.25rem!important;width:370px}qr-code.qr2fa>canvas{border:2px solid rgb(51,122,183);padding:2px}
|
|
2
2
|
`],encapsulation:2})};var Bt=n=>({active:n}),ki=n=>({"ng-invalid ng-dirty":n}),qi=(n,p)=>({border:n,"border-danger":p}),$i=n=>({"border-top-0":n});function Qi(n,p){if(n&1){let e=C();i(0,"button",71),x("click",function(){g(e);let l=c(3);return b(l.validate())}),o(1," Submit "),t()}if(n&2){c(2);let e=R(36);m("disabled",e==null||e.form==null?null:e.form.invalid)}}function Yi(n,p){if(n&1&&(B(0),d(1,Qi,2,1,"button",70),L()),n&2){let e=c(2);r(),m("ngIf",e.roleService.users.View||e.roleService.profile.View)}}function Ki(n,p){n&1&&(i(0,"small",75),o(1,"*Email is required"),t())}function Ji(n,p){n&1&&(i(0,"small",75),o(1,"*Enter a valid email address"),t())}function Xi(n,p){if(n&1&&(B(0),d(1,Ki,2,0,"small",74)(2,Ji,2,0,"small",74),L()),n&2){c();let e=R(2);r(),m("ngIf",e.errors==null?null:e.errors.required),r(),m("ngIf",e.errors==null?null:e.errors.pattern)}}function en(n,p){if(n&1){let e=C();i(0,"div",25)(1,"input",72,4),w("ngModelChange",function(l){g(e);let s=c(2);return M(s.formData.Email,l)||(s.formData.Email=l),b(l)}),t(),i(3,"label",73),o(4,"Email"),t(),d(5,Xi,3,2,"ng-container",7),t()}if(n&2){let e=R(2),a=c(2);r(),ge(Je(5,qi,e.touched&&e.invalid,e.touched&&e.invalid)),y("ngModel",a.formData.Email),m("disabled",!(a.roleService.users.View||a.roleService.profile.View)),r(4),m("ngIf",e.touched)}}function tn(n,p){n&1&&(i(0,"small",75),o(1,"*Enter a valid email address"),t())}function nn(n,p){if(n&1&&(B(0),d(1,tn,2,0,"small",74),L()),n&2){c();let e=R(2);r(),m("ngIf",e.errors==null?null:e.errors.pattern)}}function on(n,p){if(n&1){let e=C();i(0,"div",25)(1,"input",76,4),w("ngModelChange",function(l){g(e);let s=c(2);return M(s.formData.Email,l)||(s.formData.Email=l),b(l)}),t(),i(3,"label",73),o(4,"Email"),t(),d(5,nn,2,1,"ng-container",7),t()}if(n&2){let e=R(2),a=c(2);r(),m("disabled",!(a.roleService.users.View||a.roleService.profile.View)),y("ngModel",a.formData.Email),r(4),m("ngIf",e.touched)}}function an(n,p){n&1&&(i(0,"i",39),o(1," Password is required. "),t())}function rn(n,p){n&1&&(i(0,"i",39),o(1," These passwords don't match."),t())}function ln(n,p){if(n&1&&(i(0,"ul",77)(1,"li",78),o(2),t()()),n&2){let e=p.$implicit;r(2),_(e)}}function pn(n,p){if(n&1&&(i(0,"tr")(1,"td"),o(2),t(),i(3,"td"),o(4),t(),i(5,"td"),o(6),t()()),n&2){let e=p.$implicit,a=p.index;r(2),_(a+1),r(2),_(e.Key),r(2),_(e.Value)}}function mn(n,p){if(n&1&&(i(0,"ul",77)(1,"li",78),o(2),t()()),n&2){let e=p.$implicit;r(2),_(e)}}function sn(n,p){if(n&1&&(i(0,"tr")(1,"td"),o(2),t(),i(3,"td"),o(4),t(),i(5,"td"),o(6),t()()),n&2){let e=p.$implicit,a=p.index;r(2),_(a+1),r(2),_(e.Key),r(2),_(e.Value)}}function cn(n,p){if(n&1&&(i(0,"div",81)(1,"div",82),o(2),t()()),n&2){let e=p.$implicit,a=p.index;r(),ge(U(3,$i,a/4>=1)),r(),v(" ",e.Model," ")}}function dn(n,p){if(n&1&&(i(0,"div",59)(1,"div",79),o(2),t(),i(3,"div",44)(4,"div",20),d(5,cn,3,5,"div",80),t()()()),n&2){let e=p.$implicit;r(2),v(" ",e.Name," "),r(3),m("ngForOf",e.ListRole)}}function un(n,p){if(n&1){let e=C();i(0,"button",85),x("click",function(){g(e);let l=c(3);return b(l.copyToClipboard())}),o(1," Copy to Clipboard "),t()}if(n&2){let e=c(3);m("matTooltip",e.tooltipText)("cdkCopyToClipboard",e.formData.ClientID)}}function fn(n,p){if(n&1){let e=C();i(0,"a",86),x("click",function(){g(e);let l=c(3);return b(l.preview("Profile/GenerateClientID"))}),o(1,"Generate"),t()}}function _n(n,p){if(n&1&&(i(0,"div",21)(1,"div",64),h(2,"input",65),t()()),n&2){let e=c(3);r(2),m("value",e.formData.ClientSecret)}}function gn(n,p){if(n&1){let e=C();i(0,"button",85),x("click",function(){g(e);let l=c(3);return b(l.copyToClipboard())}),o(1," Copy to Clipboard "),t()}if(n&2){let e=c(3);m("matTooltip",e.tooltipText)("cdkCopyToClipboard",e.formData.ClientSecret)}}function bn(n,p){if(n&1){let e=C();i(0,"a",86),x("click",function(){g(e);let l=c(3);return b(l.preview("Profile/GenerateClientSecret"))}),o(1,"Generate"),t()}}function hn(n,p){if(n&1&&(B(0),i(1,"div",61)(2,"h3"),o(3,"API Client ID"),t(),i(4,"small",83),o(5,"(developer.dealpos.com)"),t()(),i(6,"div",63)(7,"div",21)(8,"div",64),h(9,"input",65),t()(),i(10,"div",21)(11,"div",25),d(12,un,2,2,"button",66)(13,fn,2,0,"a",67),t()()(),i(14,"div",61)(15,"h3"),o(16,"API Client Secret"),t(),i(17,"small",83),o(18,"(developer.dealpos.com)"),t()(),i(19,"div",63),d(20,_n,3,1,"div",84),i(21,"div",21)(22,"div",25),d(23,gn,2,2,"button",66)(24,bn,2,0,"a",67),t()()(),L()),n&2){let e=c(2);r(9),m("value",e.formData.ClientID),r(3),m("ngIf",e.formData.ClientID),r(),m("ngIf",e.roleService.users.View||e.roleService.profile.View),r(7),m("ngIf",e.formData.ClientSecret),r(3),m("ngIf",e.formData.ClientSecret),r(),m("ngIf",e.roleService.users.View||e.roleService.profile.View)}}function xn(n,p){n&1&&(i(0,"div",87)(1,"h4"),o(2," You have no access to view this info, please contact your administrator to view this tab information "),t()())}function Sn(n,p){if(n&1){let e=C();i(0,"button",85),x("click",function(){g(e);let l=c(2);return b(l.copyToClipboard())}),o(1," Copy to Clipboard "),t()}if(n&2){let e=c(2);m("matTooltip",e.tooltipText)("cdkCopyToClipboard",e.formData.OTTUrl)}}function vn(n,p){if(n&1){let e=C();i(0,"a",86),x("click",function(){g(e);let l=c(2);return b(l.generateOTT("Profile/GenerateOneTimeToken"))}),o(1,"Generate"),t()}}function Cn(n,p){if(n&1){let e=C();i(0,"mainpanel-cmp",6)(1,"actions"),d(2,Yi,2,1,"ng-container",7),t(),i(3,"content")(4,"div",8)(5,"div")(6,"ul",9)(7,"li",10)(8,"a",11),x("click",function(){g(e);let l=c();return b(l.onSelectTab("GENERAL"))}),o(9,"General"),t()(),i(10,"li",10)(11,"a",12),x("click",function(){g(e);let l=c();return b(l.onSelectTab("SECURITY"))}),o(12,"Security"),t()(),i(13,"li",10)(14,"a",13),x("click",function(){g(e);let l=c();return b(l.onSelectTab("ROLES"))}),o(15,"Roles"),t()(),i(16,"li",10)(17,"a",14),x("click",function(){g(e);let l=c();return b(l.onSelectTab("API"))}),o(18,"Developer API"),t()(),i(19,"li",10)(20,"a",15),x("click",function(){g(e);let l=c();return b(l.onSelectTab("TOTP"))}),o(21,"TOTP"),t()(),i(22,"li",10)(23,"a",16),x("click",function(){g(e);let l=c();return b(l.onSelectTab("OTT"))}),o(24,"One Time Token"),t()()(),i(25,"div",17)(26,"div",18)(27,"div",19)(28,"div",20)(29,"div",21)(30,"div",22)(31,"div",23)(32,"h2"),o(33,"General Credential"),t()(),i(34,"div",24)(35,"form",null,0)(37,"div",25)(38,"input",26),w("ngModelChange",function(l){g(e);let s=c();return M(s.formData.FirstName,l)||(s.formData.FirstName=l),b(l)}),t(),i(39,"label",27),o(40,"First Name"),t()(),i(41,"div",25)(42,"input",28),w("ngModelChange",function(l){g(e);let s=c();return M(s.formData.LastName,l)||(s.formData.LastName=l),b(l)}),t(),i(43,"label",29),o(44,"Last Name"),t()(),i(45,"div",25)(46,"input",30),w("ngModelChange",function(l){g(e);let s=c();return M(s.formData.LoginID,l)||(s.formData.LoginID=l),b(l)}),t(),i(47,"label",31),o(48,"Username"),t()(),d(49,en,6,8,"div",32)(50,on,6,3,"div",32),t()()()(),i(51,"div",21)(52,"div",22)(53,"div",23)(54,"h2"),o(55,"Change Password"),t(),i(56,"small",33),o(57,"Leave blank if you do not want to change"),t()(),i(58,"div",24)(59,"div")(60,"p-floatLabel")(61,"p-password",34,1),w("ngModelChange",function(l){g(e);let s=c();return M(s.formData.NewPassword,l)||(s.formData.NewPassword=l),b(l)}),t(),i(63,"label",35),o(64,"Password"),t()(),d(65,an,2,0,"i",36),t(),i(66,"div",37)(67,"p-floatLabel")(68,"p-password",38,2),w("ngModelChange",function(l){g(e);let s=c();return M(s.formData.RePassword,l)||(s.formData.RePassword=l),b(l)}),t(),i(70,"label",35),o(71,"Re-Password"),t()(),d(72,rn,2,0,"i",39),t()()()()()()(),i(73,"div",40)(74,"div",41)(75,"div",42)(76,"h5",43),o(77,"Group"),t(),i(78,"i"),o(79,"Profile Groups"),t()(),i(80,"div",44)(81,"div",20),d(82,ln,3,1,"ul",45),t()()(),i(83,"div",46)(84,"div",47)(85,"h5",43),o(86,"Outlets"),t(),i(87,"i"),o(88,"Profile Outlets"),t()(),i(89,"div",44)(90,"div",20)(91,"div")(92,"table",48)(93,"thead",49)(94,"tr")(95,"th"),o(96,"No"),t(),i(97,"th"),o(98,"Outlet"),t(),i(99,"th"),o(100,"Access"),t()()(),i(101,"tbody"),d(102,pn,7,3,"tr",50),t()()()()()()(),i(103,"div",51)(104,"div",41)(105,"div",42)(106,"h5",43),o(107,"Group"),t(),i(108,"i"),o(109,"Profile Groups"),t()(),i(110,"div",44)(111,"div",20),d(112,mn,3,1,"ul",45),t()()(),i(113,"div",46)(114,"div",47)(115,"h5",43),o(116,"Outlets"),t(),i(117,"i"),o(118,"Profile Outlets"),t()(),i(119,"div",44)(120,"div",20)(121,"div")(122,"table",48)(123,"thead",49)(124,"tr")(125,"th"),o(126,"No"),t(),i(127,"th"),o(128,"Outlet"),t(),i(129,"th"),o(130,"Access"),t()()(),i(131,"tbody"),d(132,sn,7,3,"tr",50),t()()()()()()(),i(133,"div",52),d(134,dn,6,2,"div",53),t(),i(135,"div",54),d(136,hn,25,6,"ng-container",55)(137,xn,3,0,"ng-template",null,3,de),t(),i(139,"div",56),h(140,"POS-setup-2FA",57),t(),i(141,"div",58)(142,"div",59)(143,"div",60)(144,"div",61)(145,"h3"),o(146,"One Time Token"),t(),i(147,"small",62),o(148,"*Token will expire in 1 hour"),t()(),i(149,"div",63)(150,"div",21)(151,"div",64),h(152,"input",65),t()(),i(153,"div",21)(154,"div",25),d(155,Sn,2,2,"button",66)(156,vn,2,0,"a",67),t()(),i(157,"div",60)(158,"small",68),o(159," Please refer this "),i(160,"a",69),o(161,"article"),t(),o(162," for more information "),t()()()()()()()()()()()}if(n&2){let e=R(62),a=R(69),l=R(138),s=c();m("pageData",s.menuData)("hideSearchBox",!0)("hideSearchDropdown",!0),r(2),m("ngIf",s.activeTab=="GENERAL"),r(6),m("ngClass",U(38,Bt,s.activeTab=="GENERAL")),r(3),m("ngClass",U(40,Bt,s.activeTab=="SECURITY")),r(15),m("ngClass",U(42,Bt,s.activeTab=="GENERAL")),r(12),y("ngModel",s.formData.FirstName),m("disabled",!(s.roleService.users.View||s.roleService.profile.View)),r(4),y("ngModel",s.formData.LastName),m("disabled",!(s.roleService.users.View||s.roleService.profile.View)),r(4),y("ngModel",s.formData.LoginID),m("disabled",!(s.roleService.users.View||s.roleService.profile.View)),r(3),m("ngIf",s.data.EmailRequired),r(),m("ngIf",!s.data.EmailRequired),r(11),m("toggleMask",!0)("feedback",!1)("disabled",!(s.roleService.users.View||s.roleService.profile.View)),y("ngModel",s.formData.NewPassword),m("ngClass",U(44,ki,e.touched&&e.invalid)),r(4),m("ngIf",(e.touched||a.dirty)&&e.invalid),r(3),y("ngModel",s.formData.RePassword),m("toggleMask",!0)("feedback",!1)("disabled",!(s.roleService.users.View||s.roleService.profile.View))("ngClass",U(46,ki,s.formData.NewPassword!=s.formData.RePassword&&(a.touched||a.dirty))),r(4),$t(s.formData.NewPassword!=s.formData.RePassword&&(a.touched||a.dirty)?72:-1),r(10),m("ngForOf",s.data.Security.Groups),r(20),m("ngForOf",s.data.Security.Outlets),r(10),m("ngForOf",s.data.Security.Groups),r(20),m("ngForOf",s.data.Security.Outlets),r(2),m("ngForOf",s.data.Role),r(2),m("ngIf",s.roleService.developer.Api)("ngIfElse",l),r(4),m("totpEnabled",s.totpEnabled),r(12),m("value",s.formData.OneTimeToken),r(3),m("ngIf",s.formData.OneTimeToken),r(),m("ngIf",s.roleService.users.View||s.roleService.profile.View)}}var dt=class n extends mt{constructor(e,a,l,s,E,q,O){super(e,a,"Profile/MyProfileFormInitial",l);this.toastr=s;this.dialog=E;this.authenticatorService=q;this.roleService=O}tooltipText="Copy to Clipboard";totpEnabled;activeTab="GENERAL";postBindForm(e){this.totpEnabled=e?.Form?.TOTPEnabled,this.data.Form.OTTUrl=window.location.hostname+`?OTT=${e?.Form?.OneTimeToken}`}validate(){if(this.formData.NewPassword!=this.formData.RePassword){this.toastr.error("Password and re-enter password must be equal.",F.Error);return}this.onSubmit("Profile/SubmitProfile")}onSubmitSuccess(){this.toastr.success("Your profile is successfuly updated",F.Success)}preview(e){this.httpService.post(`/API/${e}`).subscribe({next:a=>{this.data.Form=a},error:a=>{this.toastr.error(a,F.Error)}})}copyToClipboard(){this.tooltipText="Token has been copied to clipboard",setTimeout(()=>{this.tooltipText="Copy to Clipboard"},2e3)}onSelectTab(e){this.activeTab=e}generateOTT(e){this.httpService.post(`/API/${e}`).subscribe({next:a=>{this.data.Form.OneTimeToken=a.OneTimeToken,this.data.Form.OTTUrl="https://"+window.location.hostname+`?OTT=${this.data.Form.OneTimeToken}`},error:a=>{this.toastr.error(a,F.Error)}})}static \u0275fac=function(a){return new(a||n)(u(pe),u(T),u(et),u(j),u(le),u(ot),u(nt))};static \u0275cmp=I({type:n,selectors:[["POS-my-profile"]],features:[oe],decls:1,vars:1,consts:[["validation","ngForm"],["password","ngModel"],["rePassword","ngModel"],["REQUIRED_ROLE_API",""],["email","ngModel"],[3,"pageData","hideSearchBox","hideSearchDropdown",4,"ngIf"],[3,"pageData","hideSearchBox","hideSearchDropdown"],[4,"ngIf"],[1,"container-fluid","mt-5"],["id","myTab","role","tablist",1,"nav","nav-tabs"],[1,"nav-item","cursor"],["id","general-tab","data-bs-toggle","tab","href","#general","role","tab","aria-controls","general","aria-selected","false",1,"nav-link","active",3,"click","ngClass"],["id","security-tab","data-bs-toggle","tab","href","#security","role","tab","aria-controls","profile","aria-selected","false",1,"nav-link",3,"click","ngClass"],["id","roles-tab","data-bs-toggle","tab","href","#roles","role","tab","aria-controls","contact","aria-selected","false",1,"nav-link",3,"click"],["id","developerApi-tab","data-bs-toggle","tab","href","#developerApi","role","tab","aria-controls","developerApi","aria-selected","false",1,"nav-link",3,"click"],["id","setupAuth-tab","data-bs-toggle","tab","href","#setupAuth","role","tab","aria-controls","setupAuth","aria-selected","false",1,"nav-link",3,"click"],["id","ott-tab","data-bs-toggle","tab","href","#ott","role","tab","aria-controls","ott","aria-selected","false",1,"nav-link",3,"click"],["id","myTabContent",1,"tab-content"],["id","general","role","tab",1,"tab-pane","fade","show","active","mt-0","pt-8","border","border-top-0",3,"ngClass"],[1,"container"],[1,"row"],[1,"col-sm-6"],[1,"card"],[1,"card-header"],[1,"card-body"],[1,"form-floating-outline"],["type","text","id","inputFirstName","name","firstName","placeholder","First Name",1,"form-control",3,"ngModelChange","ngModel","disabled"],["for","inputFirstName"],["type","text","id","inputLastName","name","lastName","placeholder","Last Name",1,"form-control",3,"ngModelChange","ngModel","disabled"],["for","inputLastName"],["type","text","id","inputName","name","userName","placeholder","Username",1,"form-control",3,"ngModelChange","ngModel","disabled"],["for","inputName"],["class","form-floating-outline",4,"ngIf"],[1,"text-body-secondary","h6"],["required","",1,"p-change-password",3,"ngModelChange","toggleMask","feedback","disabled","ngModel","ngClass"],["for","password"],["class","control-label text-danger",4,"ngIf"],[1,"mt-6"],[1,"p-change-password",3,"ngModelChange","ngModel","toggleMask","feedback","disabled","ngClass"],[1,"control-label","text-danger"],["id","security","role","tab",1,"tab-pane","fade","show","border","border-top-0","mt-0"],[1,"border-bottom","row","pt-8","ms-3","me-3"],[1,"col-sm-2","mt-3"],[1,"fw-bold"],[1,"col-sm-10"],["class","mb-4",4,"ngFor","ngForOf"],[1,"row","border-bottom","mt-10","ms-3"],[1,"col-sm-2"],[1,"table"],[1,"thead-light","sticky-top-thead"],[4,"ngFor","ngForOf"],["id","security","role","tabpanel",1,"tab-pane","panel","fade","border","border-top-0","mt-0"],["id","roles","role","tabpanel",1,"tab-pane","panel","fade","border","border-top-0","mt-0"],["class","row pt-8 ms-3 me-3",4,"ngFor","ngForOf"],["id","developerApi","role","tab",1,"tab-pane","fade","show","border","border-top-0","p-5","mt-0"],[4,"ngIf","ngIfElse"],["id","setupAuth","role","tab",1,"tab-pane","fade","show","p-5","mt-0","border","border-top-0"],[3,"totpEnabled"],["id","ott","role","tab",1,"tab-pane","fade","show","p-5","mt-0","border","border-top-0"],[1,"row","pt-8","ms-3","me-3"],[1,"col-12"],[1,"d-flex","align-items-center"],[1,"text-danger","ms-5"],[1,"row","d-flex","align-items-center"],[1,"form-floating-outline","bg-light-gray"],["type","text","name","api-client","readonly","",1,"form-control",3,"value"],["mat-raised-button","","matTooltipPosition","above","id","btnCopyToken","class","btn btn-secondary btn-sm me-5",3,"matTooltip","cdkCopyToClipboard","click",4,"ngIf"],["class","btn btn-success btn-sm","role","button",3,"click",4,"ngIf"],[1,"text-body-secondary","fst-italic","h6","ms-2"],["href","https://support.dealpos.com/en/articles/9890206-one-time-token","target","_blank"],["matTooltipPosition","above","matTooltip","Save","class","btn btn-success","role","button",3,"disabled","click",4,"ngIf"],["matTooltipPosition","above","matTooltip","Save","role","button",1,"btn","btn-success",3,"click","disabled"],["type","text","id","email","name","email","placeholder","Email","pattern","[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,4}$","required","",1,"form-control",3,"ngModelChange","ngModel","disabled"],["for","email"],["class","text-danger",4,"ngIf"],[1,"text-danger"],["id","email","type","Email","name","email","placeholder","Email","pattern","[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,4}$",1,"form-control",3,"ngModelChange","disabled","ngModel"],[1,"mb-4"],[2,"list-style","circle"],[1,"col-sm-2","border","fw-bold","p-3","text-center",2,"background-color","#f6f6f6"],["class","col-md-3 px-0",4,"ngFor","ngForOf"],[1,"col-md-3","px-0"],[1,"p-3","border","border-start-0"],[1,"text-body-secondary","h6","ms-2"],["class","col-sm-6",4,"ngIf"],["mat-raised-button","","matTooltipPosition","above","id","btnCopyToken",1,"btn","btn-secondary","btn-sm","me-5",3,"click","matTooltip","cdkCopyToClipboard"],["role","button",1,"btn","btn-success","btn-sm",3,"click"],[1,"d-flex","justify-content-center","align-items-center","p-12"]],template:function(a,l){a&1&&d(0,Cn,163,48,"mainpanel-cmp",5),a&2&&m("ngIf",l.data&&l.formData)},dependencies:[ei,$,N,De,z,A,Ee,Pe,tt,V,Te,X,be,Ii,Ti,Pi,ct],styles:["p-password.p-change-password>div.p-password.p-component.p-inputwrapper{width:100%!important} p-password.p-change-password>div.p-password.p-component.p-inputwrapper>input{width:100%!important;height:58px!important;padding-left:15px!important;border:1px solid #dee2e6} p-password.p-change-password>div.p-password.p-component.p-inputwrapper>eyeicon.p-element.p-icon-wrapper{margin-right:10px}"]})};var yn=()=>["/menu/Orders/Orders/Customer_Invoice/Info"],Mn=n=>({ID:n});function wn(n,p){n&1&&(i(0,"th",22),o(1," @@ Cost "),t())}function In(n,p){if(n&1&&(i(0,"span",39),o(1),f(2,"number"),t()),n&2){let e=c().$implicit;r(),_(" - Profit: "+S(2,1,e.Profit))}}function En(n,p){if(n&1&&(i(0,"small"),o(1),t()),n&2){let e=c(2).$implicit;r(),v("( ",e.Commissions[0].Quantity," unit )")}}function Tn(n,p){if(n&1&&(i(0,"i",52),o(1),d(2,En,2,1,"small",53),t()),n&2){let e=c().$implicit;r(),v("sold by ",e.Commissions[0].SalesName," "),r(),m("ngIf",e.Commissions[0].Quantity<e.Quantity)}}function Dn(n,p){if(n&1&&(i(0,"li")(1,"i"),o(2),t()()),n&2){let e=p.$implicit;r(2),v("( ",e.Quantity+" unit by "+e.SalesName," )")}}function Pn(n,p){if(n&1&&(i(0,"ul",54)(1,"li")(2,"i"),o(3,"sold by"),t()(),d(4,Dn,3,1,"li",19),t()),n&2){let e=c().$implicit;r(4),m("ngForOf",e.Commissions)}}function On(n,p){if(n&1&&(i(0,"th",55),o(1),f(2,"number"),t()),n&2){let e=c().$implicit;r(),_(S(2,1,e.UnitCost))}}function kn(n,p){if(n&1&&(i(0,"tr")(1,"th",40)(2,"div")(3,"span",41),o(4),t(),d(5,Tn,3,2,"i",42)(6,Pn,5,1,"ul",43),h(7,"span",44),f(8,"newlines"),t()(),i(9,"th",45),o(10),t(),i(11,"th",46),o(12),f(13,"number"),t(),i(14,"th",47),o(15),t(),d(16,On,3,3,"th",48),i(17,"th",49),o(18),f(19,"number"),t(),i(20,"th",50),o(21),t(),i(22,"th",51),o(23),f(24,"number"),t()()),n&2){let e=p.$implicit,a=c(3);r(4),_(e.Name),r(),m("ngIf",e.Commissions.length==1),r(),m("ngIf",e.Commissions.length>1),r(),m("innerHTML",S(8,11,e.Note),P),r(3),_(e.Code),r(2),_(S(13,13,e.Quantity)),r(3),_(e.UOMName),r(),m("ngIf",a.roleService.product.Cost),r(2),_(S(19,15,e.UnitPrice)),r(3),_(e.Discount==0?"":e.Discount+"%"),r(2),_(S(24,17,e.Total))}}function Nn(n,p){if(n&1&&(i(0,"tr")(1,"th",56),o(2,"\xA0"),t(),h(3,"th",57)(4,"th",58)(5,"th",59)(6,"th",16),i(7,"th",60),o(8),t(),i(9,"th",61),o(10),t(),i(11,"th",62),o(12),f(13,"number"),t()()),n&2){let e=p.$implicit;r(8),v("",e.Label," :"),r(2),_(e.CurrencySymbol),r(2),_(S(13,3,e.Amount))}}function Fn(n,p){if(n&1&&(i(0,"div")(1,"div",23)(2,"div",24)(3,"a",25),h(4,"span",26),f(5,"date"),h(6,"small",27),f(7,"date"),t(),i(8,"span"),o(9),f(10,"showIfNotNullOrEmptyString"),t(),h(11,"span",28),i(12,"strong",29),o(13),f(14,"sum"),f(15,"number"),i(16,"span"),o(17),f(18,"showIfNotNullOrEmptyString"),t()(),d(19,In,3,3,"span",30),i(20,"i",31),o(21),t(),i(22,"span",32),o(23),t(),i(24,"span",33),o(25),t()(),i(26,"div",34),h(27,"label",35),t()(),i(28,"table",36),h(29,"thead"),i(30,"tbody",37),d(31,kn,25,19,"tr",19),t()(),i(32,"table",38),d(33,Nn,14,5,"tr",19),t()()),n&2){let e=p.$implicit,a=c(2);r(3),m("routerLink",Ke(31,yn))("queryParams",U(32,Mn,e.ID)),r(),m("innerHTML",e.EntityName+" #"+e.Number+" - "+D(5,14,e.Date,"dd MMM yyyy"),P),r(2),m("innerHTML","("+D(7,17,e.Created,"HH:mm")+")",P),r(3),_(D(10,20,e.CustomerNameDisplay," - {0}")),r(4),v(" ","[Q: "+D(14,23,e.Items,"Quantity")+", T: "+S(15,26,e.Final)+"]"," "),r(4),_(D(18,28,e.SalesName," - Sales: {0}")),r(2),m("ngIf",a.roleService.report.Profit),r(2),_(e.DeliveryOutlet==null?"":": Delivered from "+e.DeliveryOutlet),r(2),_(e.PromotionCoupon==null?"":": "+e.PromotionCoupon),r(2),_(e.SONote==null?"":": "+e.SONote),r(2),m("innerHTML",e.PaymentStateLabel,P),r(4),m("ngForOf",e.Items),r(2),m("ngForOf",e.Aggregate)}}function An(n,p){if(n&1&&(i(0,"div")(1,"strong"),o(2,"Cost ("),h(3,"span",67),f(4,"number"),o(5,"%)"),t(),h(6,"span",65),f(7,"number"),t()),n&2){let e=c(3);r(3),m("innerHTML",S(4,2,e.data.Aggregate.CostRatio),P),r(3),m("innerHTML",S(7,4,e.data.Aggregate.Cost),P)}}function Vn(n,p){if(n&1&&(i(0,"div")(1,"strong")(2,"span"),o(3,"Profit"),t(),o(4," ("),h(5,"span",67),f(6,"number"),o(7,"%)"),t(),h(8,"span",65),f(9,"number"),t()),n&2){let e=c(3);r(5),m("innerHTML",S(6,2,e.data.Aggregate.ProfitRatio),P),r(3),m("innerHTML",S(9,4,e.data.Aggregate.Profit),P)}}function Rn(n,p){if(n&1&&(i(0,"div",63)(1,"div",64)(2,"div")(3,"strong"),o(4,"Tax Added"),t(),h(5,"span",65),f(6,"number"),t(),i(7,"div")(8,"strong"),o(9,"Sales with Tax"),t(),h(10,"span",65),f(11,"number"),t()(),i(12,"div",66)(13,"div")(14,"strong"),o(15,"Orders"),t(),h(16,"span",65),f(17,"number"),t(),i(18,"div")(19,"strong"),o(20,"Qty"),t(),h(21,"span",65),f(22,"number"),t()(),i(23,"div",66)(24,"div")(25,"strong"),o(26,"Gross Sales"),t(),h(27,"span",65),f(28,"number"),t(),i(29,"div")(30,"strong"),o(31,"Discount"),t(),h(32,"span",65),f(33,"number"),t(),i(34,"div")(35,"strong"),o(36,"Tax Incl."),t(),h(37,"span",65),f(38,"number"),t(),i(39,"div")(40,"strong"),o(41,"Net Sales"),t(),h(42,"span",65),f(43,"number"),t(),d(44,An,8,6,"div",53)(45,Vn,10,6,"div",53),t()()),n&2){let e=c(2);r(5),m("innerHTML",S(6,10,e.data.Aggregate.TaxAdd),P),r(5),m("innerHTML",S(11,12,e.data.Aggregate.SalesWithTax),P),r(6),m("innerHTML",S(17,14,e.data.Aggregate.Orders),P),r(5),m("innerHTML",S(22,16,e.data.Aggregate.ItemsQuantity),P),r(6),m("innerHTML",S(28,18,e.data.Aggregate.GrossItems),P),r(5),m("innerHTML",S(33,20,e.data.Aggregate.Discount),P),r(5),m("innerHTML",S(38,22,e.data.Aggregate.TaxInclude),P),r(5),m("innerHTML",S(43,24,e.data.Aggregate.SalesWithoutTax),P),r(2),m("ngIf",e.roleService.product.Cost),r(),m("ngIf",e.roleService.report.Profit)}}function Bn(n,p){if(n&1){let e=C();i(0,"mainpanel-cmp",1),x("onSubmit",function(){g(e);let l=c();return b(l.searchFromPageOne())}),i(1,"filters")(2,"div",2)(3,"div",3)(4,"div")(5,"h6"),o(6,"Type"),t(),i(7,"ng-select",4),w("ngModelChange",function(l){g(e);let s=c();return M(s.pageData.Filter.TypeID,l)||(s.pageData.Filter.TypeID=l),b(l)}),t()(),i(8,"div")(9,"h6"),o(10,"Customer"),t(),i(11,"autocompleteV2",5),x("onInputChange",function(l){g(e);let s=c();return b(s.resetCustomer(l))})("onSelect",function(l){g(e);let s=c();return b(s.onSelectCustomer(l))}),t()(),i(12,"div")(13,"h6"),o(14,"From"),t(),i(15,"datepicker",6),w("dateChange",function(l){g(e);let s=c();return M(s.pageData.Filter.From,l)||(s.pageData.Filter.From=l),b(l)}),t()(),i(16,"div")(17,"h6"),o(18,"To"),t(),i(19,"datepicker",7),w("dateChange",function(l){g(e);let s=c();return M(s.pageData.Filter.To,l)||(s.pageData.Filter.To=l),b(l)}),t()()()()(),i(20,"content")(21,"div",8)(22,"table",9)(23,"thead",10)(24,"tr")(25,"th",11),o(26," Name "),t(),i(27,"th",12),o(28," Code "),t(),i(29,"th",13),o(30," Qty "),t(),i(31,"th",14),o(32," UOM "),t(),d(33,wn,2,0,"th",15),i(34,"th",16),o(35," @@ Price "),t(),i(36,"th",17),o(37," % "),t(),i(38,"th",18),o(39," Total "),t()()()(),d(40,Fn,34,34,"div",19)(41,Rn,46,26,"div",20),i(42,"POS-complex-pagination",21),x("jumpToPage",function(){g(e);let l=c();return b(l.getListData())})("previousPage",function(){g(e);let l=c();return b(l.getListData())})("nextPage",function(){g(e);let l=c();return b(l.getListData())}),t()()()()}if(n&2){let e=c();m("pageData",e.menuData)("hideSearchBox",!0),r(7),m("items",e.pageData.Options.Types),y("ngModel",e.pageData.Filter.TypeID),r(8),y("date",e.pageData.Filter.From),r(4),y("date",e.pageData.Filter.To),r(14),m("ngIf",e.roleService.product.Cost),r(7),m("ngForOf",e.data.Data),r(),m("ngIf",e.data.Data&&e.data.Data.length>0),r(),m("total",e.data.Data?e.data.Data.length:0)("pageData",e.pageData)}}var ft=class n extends Oe{constructor(e,a,l){super(e,a,"Report/MySales","ReportLoader/MyActivity");this.roleService=l}onSelectCustomer(e){this.pageData.Filter.CustomerID=e}resetCustomer(e){e==""&&(this.pageData.Filter.CustomerID=null)}static \u0275fac=function(a){return new(a||n)(u(pe),u(T),u(nt))};static \u0275cmp=I({type:n,selectors:[["POS-my-sales"]],features:[oe],decls:1,vars:1,consts:[[3,"pageData","hideSearchBox","onSubmit",4,"ngIf"],[3,"onSubmit","pageData","hideSearchBox"],[1,"d-flex"],["container",""],["bindLabel","Name","bindValue","ID",3,"ngModelChange","items","ngModel"],["requestUrl","/API/AC/GetCustomerSuggestion",1,"w-100",3,"onInputChange","onSelect"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid","mt-5"],["id","tableGrid",1,"table"],[1,"thead-light","sticky-top-thead"],[2,"width","660px"],[2,"width","68px"],[1,"text-end",2,"width","30px"],[2,"width","50px"],["id","thCost","class","text-end","style","width: 80px",4,"ngIf"],[1,"text-end",2,"width","80px"],[1,"red",2,"width","30px"],[1,"text-end",2,"width","90px"],[4,"ngFor","ngForOf"],["class","clearfix mb-5 mt-5",4,"ngIf"],["api","Report/ReportDetailCount",3,"jumpToPage","previousPage","nextPage","total","pageData"],["id","thCost",1,"text-end",2,"width","80px"],[1,"d-lg-flex","mt-sm-0"],[1,"me-auto","d-sm-block","mt-8","mb-2"],[1,"h5","text-primary","fw-bold",3,"routerLink","queryParams"],["id","PONumber",1,"ms-4",3,"innerHTML"],[1,"fst-italic","fw-bold",3,"innerHTML"],[1,"d-block"],[1,"text-danger","ms-3"],["class","fw-bold",4,"ngIf"],["id","deliveryNote"],[1,"d-inline-block","fst-italic"],[1,"d-inline-block"],[1,"d-lg-block","mt-8","me-2","fw-bold","fst-italic"],[1,"status",3,"innerHTML"],[1,"w-100"],[1,"table","table-sm","table-bordered","table-striped"],[1,"table","table-sm","table-borderless","d-flex","justify-content-end","mt-3"],[1,"fw-bold"],[2,"width","726px"],[1,"fw-normal"],["class","text-warning inlineMarginLeft",4,"ngIf"],["class","list-inline text-warning inlineMarginLeft",4,"ngIf"],[1,"d-block","fw-normal","fst-italic",3,"innerHTML"],[1,"fw-normal",2,"width","75px"],[1,"fw-normal","text-end",2,"width","42px"],[1,"fst-italic","small",2,"width","52px"],["class","fw-normal text-end","style","width: 80px",4,"ngIf"],[1,"fw-normal","text-end",2,"width","92px"],[1,"fw-normal","text-end","text-danger",2,"width","30px"],[1,"fw-normal","text-end",2,"width","102px"],[1,"text-warning","inlineMarginLeft"],[4,"ngIf"],[1,"list-inline","text-warning","inlineMarginLeft"],[1,"fw-normal","text-end",2,"width","80px"],[2,"width","645px"],[2,"width","75px"],[2,"width","30px"],[2,"width","40px"],[1,"text-end",2,"width","130px"],[1,"fw-normal","text-end",2,"width","20px"],[1,"fw-normal","text-end","pe3",2,"width","60px"],[1,"clearfix","mb-5","mt-5"],[1,"zebra",2,"float","right"],[1,"text-end",3,"innerHTML"],[1,"zebra",2,"float","right","margin-right","20px"],[1,"Percentage",3,"innerHTML"]],template:function(a,l){a&1&&d(0,Bn,43,11,"mainpanel-cmp",0),a&2&&m("ngIf",l.data)},dependencies:[$,N,A,V,Ie,X,Ne,ke,Ci,gi,ae,Z,lt,di,ui]})};function Ln(n,p){n&1&&(i(0,"small",17),o(1,"*Enter a valid phone number"),t())}function Hn(n,p){if(n&1&&(B(0),d(1,Ln,2,0,"small",16),L()),n&2){c();let e=R(9);r(),m("ngIf",e.errors==null?null:e.errors.pattern)}}function jn(n,p){n&1&&(i(0,"small",17),o(1,"*Enter a valid email address"),t())}function Wn(n,p){if(n&1&&(B(0),d(1,jn,2,0,"small",16),L()),n&2){c();let e=R(16);r(),m("ngIf",e.errors==null?null:e.errors.pattern)}}var _t=class n{constructor(p,e,a,l,s){this.httpService=p;this.dialogRef=e;this.data=a;this.toastr=l;this.router=s;this.config.title="Subscribe Account Info",this.config.okText="I want to subscribe",this.config.cancelText="Cancel",this.config.customWidth="35vw"}config=new Y;onOk(p){if(p!=="Enter"){if(this.data.form.Qty==0){this.toastr.error("The number of outlets can't be empty",F.Error),this.dialogRef.close();return}this.httpService.post("/API/Subscription/SendSubscription",this.data.form).subscribe(e=>{this.toastr.success(e,F.Success),this.router.navigate(["/menu/Profile/Main/My_Subscription"]),this.dialogRef.close()})}}static \u0275fac=function(e){return new(e||n)(u(T),u(Q),u(re),u(j),u(Se))};static \u0275cmp=I({type:n,selectors:[["POS-modal-subscribe"]],decls:26,vars:7,consts:[["validation","ngForm"],["phoneCtrl","ngModel"],["emailCtrl","ngModel"],[3,"onOk","onCancel","onClose","dynamicValidated","config"],[1,"container"],[1,"row"],[1,"col-6"],[1,"form-floating-outline"],["type","text","id","inputPhone","placeholder","Phone","name","phone","pattern","[0-9]{0,15}","required","","matTooltipPosition","above","matTooltip","Your number will be saved to help our customer service quickly identify you in the future",1,"form-control",3,"ngModelChange","ngModel"],["for","inputPhone"],[4,"ngIf"],["type","text","id","inputEmail","placeholder","Email","name","email","pattern","[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,4}$","required","","matTooltipPosition","above","matTooltip","Your monthly recurring invoice will be sent to the email you specified above",1,"form-control",3,"ngModelChange","ngModel"],["for","inputEmail"],[1,"col-12"],["name","note","id","inputNote","placeholder","Note","rows","6",1,"form-control",3,"ngModelChange","ngModel"],["for","inputNote"],["class","text-danger",4,"ngIf"],[1,"text-danger"]],template:function(e,a){if(e&1){let l=C();i(0,"modal-material",3),x("onOk",function(E){return g(l),b(a.onOk(E))})("onCancel",function(){return g(l),b(a.dialogRef.close())})("onClose",function(){return g(l),b(a.dialogRef.close())}),i(1,"content")(2,"div",4)(3,"form",null,0)(5,"div",5)(6,"div",6)(7,"div",7)(8,"input",8,1),w("ngModelChange",function(E){return g(l),M(a.data.form.Phone,E)||(a.data.form.Phone=E),b(E)}),t(),i(10,"label",9),o(11,"Phone*"),t(),d(12,Hn,2,1,"ng-container",10),t()(),i(13,"div",6)(14,"div",7)(15,"input",11,2),w("ngModelChange",function(E){return g(l),M(a.data.form.Email,E)||(a.data.form.Email=E),b(E)}),t(),i(17,"label",12),o(18,"Email*"),t(),d(19,Wn,2,1,"ng-container",10),t()()(),i(20,"div",5)(21,"div",13)(22,"div",7)(23,"textarea",14),w("ngModelChange",function(E){return g(l),M(a.data.form.Note,E)||(a.data.form.Note=E),b(E)}),t(),i(24,"label",15),o(25,"Note"),t()()()()()()()()}if(e&2){let l=R(9),s=R(16);m("dynamicValidated",(l==null?null:l.valid)||(s==null?null:s.valid))("config",a.config),r(8),y("ngModel",a.data.form.Phone),r(4),m("ngIf",l.touched&&l.dirty),r(3),y("ngModel",a.data.form.Email),r(4),m("ngIf",s.touched&&s.dirty),r(4),y("ngModel",a.data.form.Note)}},dependencies:[N,De,z,A,Ee,Pe,tt,V,Te,K,be]})};function Un(n,p){if(n&1){let e=C();i(0,"div",23),x("click",function(){let l=g(e).$implicit,s=c(2);return b(s.onCycleChange(l.key))}),i(1,"div",24)(2,"span",25),o(3),t(),h(4,"div",26),t()()}if(n&2){let e=p.$implicit,a=c(2);ge(e.key==a.formData.Cycle?"active":""),r(3),_(e.dicount),r(),m("innerHTML",e.desc,P)}}function Zn(n,p){if(n&1){let e=C();i(0,"tr")(1,"th",27),o(2,"Register"),t(),i(3,"td"),o(4,":"),t(),i(5,"td")(6,"input",28),w("ngModelChange",function(l){g(e);let s=c(2);return M(s.formData.Register,l)||(s.formData.Register=l),b(l)}),x("ngModelChange",function(){g(e);let l=c(2);return b(l.onQtyRegisterChange())}),t(),i(7,"span"),o(8),f(9,"number"),t()()()}if(n&2){let e=c(2);r(6),m("preventNegative",!0),y("ngModel",e.formData.Register),r(2),v("/ ",S(9,3,e.data.Options.Register),"")}}function zn(n,p){if(n&1){let e=C();i(0,"div",7)(1,"div",29)(2,"div",9)(3,"h2",10),o(4,"Setup Fee "),t(),i(5,"small",11),o(6,"(One-time payment)"),t()()(),i(7,"div",30)(8,"table",31)(9,"tr")(10,"th"),o(11,"POS"),t(),i(12,"td"),o(13,"\xA0:"),t(),i(14,"td")(15,"label",32)(16,"radio-options",33),w("modelChange",function(l){g(e);let s=c(2);return M(s.data.Options.SetupFee,l)||(s.data.Options.SetupFee=l),b(l)}),x("modelChange",function(){g(e);let l=c(2);return b(l.calculateSetupFee())}),t()()()()()()()}if(n&2){let e=c(2);r(16),y("model",e.data.Options.SetupFee)}}function Gn(n,p){n&1&&(B(0),o(1,"s "),L())}function qn(n,p){if(n&1&&(i(0,"tr")(1,"td")(2,"strong"),o(3,"Additional Register"),t(),i(4,"p")(5,"small",40),o(6),t()()(),i(7,"td",36),o(8),t(),i(9,"td",37),h(10,"span",39),o(11),f(12,"number"),t(),i(13,"td",38),o(14),t(),i(15,"td",37),h(16,"span",39),o(17),f(18,"number"),t()()),n&2){let e=c(4);r(6),Me("",e.formData.Register," Register",e.formData.Register>1?"s":""," "),r(2),_(e.formData.Cycle),r(2),m("innerHTML",e.data.Options.Setup?"IDR ":"$ ",P),r(),_(S(12,8,e.data.Options.Register)),r(3),v(" ",e.formData.Discount>0?e.formData.Discount+"%":"-"," "),r(2),m("innerHTML",e.data.Options.Setup?"IDR ":"$ ",P),r(),_(S(18,10,e.registerFee))}}function $n(n,p){if(n&1&&(i(0,"tr")(1,"td")(2,"strong")(3,"span"),o(4,"POS"),t()(),i(5,"p")(6,"small",40),o(7," - Consultation "),h(8,"br"),o(9," - Training 2x "),h(10,"br"),o(11," - 1 Month Support Group"),t()()(),h(12,"td",36),i(13,"td",37)(14,"span"),o(15,"IDR "),t(),o(16),f(17,"number"),t(),h(18,"td",38),i(19,"td",37)(20,"span"),o(21,"IDR "),t(),o(22),f(23,"number"),t()()),n&2){let e=c(4);r(16),_(S(17,2,e.formData.Setup)),r(6),_(S(23,4,e.formData.Setup))}}function Qn(n,p){if(n&1&&(B(0),i(1,"tr")(2,"td")(3,"strong"),h(4,"span",39),t(),i(5,"p")(6,"small",40),o(7),d(8,Gn,2,0,"ng-container",17),t()()(),i(9,"td",36),o(10),t(),i(11,"td",37),h(12,"span",39),o(13),f(14,"number"),t(),i(15,"td",38),o(16),t(),i(17,"td",37),h(18,"span",39),o(19),f(20,"number"),t()(),d(21,qn,19,12,"tr",17)(22,$n,24,6,"tr",17),L()),n&2){let e=c(3);r(4),m("innerHTML",e.formData.Type==1?"Starter Subscription":"Standard Subscription",P),r(3),v(" ",e.formData.Qty," Outlet"),r(),m("ngIf",e.formData.Qty>1),r(2),_(e.formData.Cycle),r(2),m("innerHTML",e.data.Options.Setup?"IDR ":"$ ",P),r(),_(S(14,11,e.data.Options.Type)),r(3),v(" ",e.formData.Discount>0?e.formData.Discount+"%":"-"," "),r(2),m("innerHTML",e.data.Options.Setup?"IDR ":"$ ",P),r(),_(S(20,13,e.outletFee)),r(2),m("ngIf",e.formData.Register>0),r(),m("ngIf",e.data.Options.SetupFee)}}function Yn(n,p){if(n&1&&(i(0,"tr")(1,"th"),o(2,"Sub Total"),t(),i(3,"td",43),o(4,":"),t(),i(5,"td",37)(6,"strong"),h(7,"span",39),o(8),f(9,"number"),t()()()),n&2){let e=c(4);r(7),m("innerHTML",e.data.Options.Setup?"IDR ":"$ ",P),r(),_(S(9,2,e.subTotal))}}function Kn(n,p){if(n&1&&(i(0,"tr")(1,"th"),o(2,"Tax (11%)"),t(),i(3,"td",43),o(4,":"),t(),i(5,"td",37)(6,"strong"),h(7,"span",39),o(8),f(9,"number"),t()()()),n&2){let e=c(4);r(7),m("innerHTML",e.data.Options.Setup?"IDR ":"$ ",P),r(),_(S(9,2,e.subTotal*.11))}}function Jn(n,p){if(n&1&&(B(0),i(1,"div",41)(2,"table",42),d(3,Yn,10,4,"tr",17)(4,Kn,10,4,"tr",17),i(5,"tr")(6,"th"),o(7,"Total"),t(),i(8,"td",43),o(9,":"),t(),i(10,"td",37)(11,"strong"),h(12,"span",39),o(13),f(14,"number"),t()()()()(),L()),n&2){let e=c(3);r(3),m("ngIf",e.data.vatEnabled),r(),m("ngIf",e.data.vatEnabled),r(8),m("innerHTML",e.data.Options.Setup?"IDR ":"$ ",P),r(),v("",S(14,4,e.subTotal+(e.data.vatEnabled?e.subTotal*.11:0)),`
|
|
3
3
|
`)}}function Xn(n,p){if(n&1&&(i(0,"div",30)(1,"table",34)(2,"thead",35)(3,"tr")(4,"th"),o(5,"Product"),t(),i(6,"th",36),o(7,"Month"),t(),i(8,"th",37),o(9,"Price"),t(),i(10,"th",38),o(11,"Disc"),t(),i(12,"th",37),o(13,"Total"),t()()(),i(14,"tbody"),d(15,Qn,23,15,"ng-container",17),t()(),d(16,Jn,15,6,"ng-container",17),t()),n&2){let e=c(2);r(15),m("ngIf",(e.formData==null?null:e.formData.Qty)>0),r(),m("ngIf",(e.formData==null?null:e.formData.Qty)>0)}}function eo(n,p){n&1&&(i(0,"div",7)(1,"div",29)(2,"h2"),o(3,'Your payment currency is "IDR"'),t()(),i(4,"div",30)(5,"div",44)(6,"div",45)(7,"h2",46)(8,"button",47),o(9," I Want to pay in USD "),t()(),i(10,"div",48)(11,"div",49)(12,"ol",50)(13,"li",51),o(14," Go to setup menu"),t(),i(15,"li",51),o(16," Click tab currency"),t(),i(17,"li",51),o(18," Select the currency you want to make for payment"),t(),i(19,"li",51),o(20," Select Yes at primary currency box and click save"),t(),i(21,"li",52),o(22," Then you can check to my subscribe again "),t()(),i(23,"p",53),o(24,"For more detailed information, please check the following article: "),i(25,"a",54),o(26,"Added Currency Conversion"),t()()()()()()()())}function to(n,p){if(n&1){let e=C();i(0,"mainpanel-cmp",2)(1,"actions")(2,"button",3),x("click",function(){g(e);let l=c();return b(l.onOpenSubscribeDialog())}),o(3,"Subscribe Now"),t()(),i(4,"content")(5,"div",4)(6,"div",5)(7,"div",6)(8,"div",7)(9,"div",8)(10,"div",9)(11,"h2",10),o(12,"Subscribe "),t(),i(13,"small",11),o(14,"(Recurring)"),t()(),i(15,"a",12),x("click",function(){g(e);let l=c();return b(l.showRegister=!l.showRegister)}),o(16,"More"),t()(),i(17,"div",13)(18,"table",14)(19,"tr")(20,"th"),o(21,"Outlets"),t(),i(22,"td"),o(23,":"),t(),i(24,"td")(25,"input",15,0),w("ngModelChange",function(l){g(e);let s=c();return M(s.formData.Qty,l)||(s.formData.Qty=l),b(l)}),x("ngModelChange",function(){g(e);let l=c();return b(l.onQtyOutletChange())}),t(),i(27,"span"),o(28),f(29,"number"),t()()(),i(30,"tr")(31,"th"),o(32,"Cycle"),t(),i(33,"td"),o(34,":"),t(),i(35,"td"),d(36,Un,5,4,"div",16),t()(),d(37,Zn,10,5,"tr",17),t()()(),d(38,zn,17,1,"div",18),t(),i(39,"div",19)(40,"div",7)(41,"div",20),x("click",function(){g(e);let l=c();return b(l.invoice=!l.invoice)}),i(42,"h2",21),o(43,"Invoice Preview"),t()(),d(44,Xn,17,2,"div",22),t(),d(45,eo,27,0,"div",18),t()()()()()}if(n&2){let e=c();m("pageData",e.menuData)("hideSearchBox",!0)("hideSearchDropdown",!0)("hideMenu",!0),r(2),m("disabled",e.formData.Qty==0),r(23),m("preventNegative",!0),y("ngModel",e.formData.Qty),r(3),v("/ ",S(29,13,e.data.Type[0].amount),""),r(8),m("ngForOf",e.data.DiscountOptions),r(),m("ngIf",e.showRegister),r(),m("ngIf",e.data.Options.Setup),r(6),m("ngIf",e.invoice),r(),m("ngIf",e.data.Options.Setup)}}var gt=class n extends mt{constructor(e,a,l,s){super(e,a,"Subscription/MySubscriptionLoader",l);this.matDialog=s}showRegister=!1;invoice=!0;outletFee=0;registerFee=0;subTotal=0;postBindForm(e){this.calculate(),this.data.DiscountOptions=e.DiscountOptions}onOpenSubscribeDialog(){this.matDialog.open(_t,{data:{form:this.formData}})}onCycleChange(e){switch(this.formData.Cycle=e,e){case 3:this.formData.Discount=0;break;case 6:this.formData.Discount=10;break;case 12:this.formData.Discount=15;break}this.calculateregisterFee(),this.calculate()}onQtyOutletChange(){this.calculate()}calculate(){if(this.formData.Cycle>1){let e=this.data.Options.Type*this.formData.Qty*this.formData.Cycle;this.data.Discount=e*this.formData.Discount/100,this.outletFee=this.data.Options.Type*this.formData.Qty*this.formData.Cycle-this.data.Discount,this.subTotal=this.outletFee+this.registerFee}else this.outletFee=this.data.Options.Type*this.formData.Qty,this.subTotal=this.outletFee+this.registerFee,this.data.Discount=0;this.data.Options.SetupFee&&(this.subTotal=this.subTotal+this.formData.Setup)}calculateSetupFee(){this.data.Options.SetupFee?(this.formData.SetupFee=!0,this.subTotal=this.subTotal+this.formData.Setup):(this.formData.SetupFee=!1,this.subTotal=this.subTotal-this.formData.Setup)}onQtyRegisterChange(){this.calculateregisterFee(),this.calculate()}calculateregisterFee(){let e=this.data.Options.Register*this.formData.Cycle*this.formData.Register;if(this.formData.Discount>0){let a=e*this.formData.Discount/100;this.registerFee=e-a}else this.registerFee=e}static \u0275fac=function(a){return new(a||n)(u(pe),u(T),u(et),u(le))};static \u0275cmp=I({type:n,selectors:[["POS-choose-plan"]],features:[oe],decls:1,vars:1,consts:[["outletQty","ngModel"],[3,"pageData","hideSearchBox","hideSearchDropdown","hideMenu",4,"ngIf"],[3,"pageData","hideSearchBox","hideSearchDropdown","hideMenu"],[1,"btn","btn-success",3,"click","disabled"],[1,"container-fluid","bg-light-gray","pb-10"],[1,"row","pt-5"],[1,"col-md-5","m-0","pe-0","pt-0","pb-0"],[1,"card"],[1,"card-header","d-flex","justify-content-between"],[1,"me-auto","d-sm-block","mt-3"],[1,"d-inline"],[1,"text-body-secondary","h6"],["role","button",1,"btn","btn-outline-secondary",3,"click"],[1,"card-body",2,"padding-right","0.625rem"],[1,"table-sm"],["type","text","autoNum","",1,"form-control",2,"width","65px","display","inline-block",3,"ngModelChange","preventNegative","ngModel"],["class","card border-dark align-text-top d-inline-block me-1 mb-0",3,"class","click",4,"ngFor","ngForOf"],[4,"ngIf"],["class","card",4,"ngIf"],[1,"col-md-7"],[1,"card-header",3,"click"],[1,"title"],["class","card-body",4,"ngIf"],[1,"card","border-dark","align-text-top","d-inline-block","me-1","mb-0",3,"click"],[1,"card-body","text-center",2,"cursor","pointer","width","80px","padding","10px 5px"],[1,"fw-bold"],[1,"fw-normal","border-top","border-dark",3,"innerHTML"],["matTooltipPosition","above","matTooltip","Additional Register"],["type","text","autoNum","","maxlength","3",1,"form-control",2,"width","65px","display","inline-block",3,"ngModelChange","preventNegative","ngModel"],[1,"card-header"],[1,"card-body"],[1,"form-horizontal"],[1,"form-check","form-check-inline",2,"cursor","pointer","padding-top","8px"],["name","POS",3,"modelChange","model"],[1,"table","border-bottom"],[1,"thead-light","sticky-top-thead"],[1,"text-end",2,"min-width","65px"],[1,"text-end"],[1,"text-end",2,"min-width","85px"],[3,"innerHTML"],[2,"font-size","90% !important"],[1,"d-flex","justify-content-end"],[1,"table-sm","table-borderless","me-3"],[1,"sep"],["id","accordionExample",1,"accordion"],[1,"accordion-item"],["id","panelsStayOpen-headingTwo",1,"accordion-header"],["type","button","data-bs-toggle","collapse","data-bs-target","#panelsStayOpen-collapseTwo","aria-expanded","false","aria-controls","panelsStayOpen-collapseTwo",1,"accordion-button","collapsed"],["id","panelsStayOpen-collapseTwo","aria-labelledby","panelsStayOpen-headingTwo",1,"accordion-collapse","collapse"],[1,"accordion-body","pt-2"],[1,"list-group","list-group-numbered","mt-5","mb-3"],[1,"list-group-item","mb-3","border-top-0","border-start-0","border-end-0","border-bottom-1"],[1,"list-group-item","rounded-0","border-top-0","border-start-0","border-end-0","border-bottom-1"],[1,"ms-2","mt-6"],["href","https://support.dealpos.com/en/articles/8956190-how-to-create-new-currency","target","_blank"]],template:function(a,l){a&1&&d(0,to,46,15,"mainpanel-cmp",1),a&2&&m("ngIf",l.data&&l.formData)},dependencies:[$,N,z,A,oi,V,X,ci,xi,be,ae],styles:[".active[_ngcontent-%COMP%]{background-color:#fffed9}"]})};var bt=class n{constructor(p,e,a){this.dialogRef=p;this.data=e;this.router=a;this.config.title=this.data.title,this.config.okText="Yes",this.config.cancelText="No"}config=new Y;onOk(){this.router.navigate(["/menu/Profile/Main/My_Subscription/Choose_your_plan"]),this.dialogRef.close()}static \u0275fac=function(e){return new(e||n)(u(Q),u(re),u(Se))};static \u0275cmp=I({type:n,selectors:[["POS-modal-choose-plan"]],decls:6,vars:2,consts:[[3,"onOk","onCancel","onClose","config"],[1,"text-center",2,"width","440px"]],template:function(e,a){e&1&&(i(0,"modal-material",0),x("onOk",function(){return a.onOk()})("onCancel",function(){return a.dialogRef.close()})("onClose",function(){return a.dialogRef.close()}),i(1,"content")(2,"h4",1),o(3),i(4,"span"),o(5,"Do you want to Choose your Plan ?"),t()()()()),e&2&&(m("config",a.config),r(3),v(" ",a.data.body," "))},dependencies:[K]})};var ht=class n{constructor(p,e,a,l){this.httpService=p;this.dialogRef=e;this.data=a;this.toastr=l;this.config.title="Confim Adjusted Subscription"}message="";config=new Y;onOk(){let p={Message:this.message};this.message.trim().length==0?(this.toastr.error("The reason cannot be empty",F.Error),this.dialogRef.close()):this.httpService.post("/API/Subscription/Confirm",p).subscribe(e=>{this.toastr.success(e.Message,F.Success),this.dialogRef.close()})}static \u0275fac=function(e){return new(e||n)(u(T),u(Q),u(re),u(j))};static \u0275cmp=I({type:n,selectors:[["POS-modal-confirm-adjusted-plan"]],decls:8,vars:2,consts:[[3,"onOk","onCancel","onClose","config"],[1,"font-weight","h4","mb-5"],[1,"form-floating-outline"],["name","address","id","inputAddress","placeholder","Address","matTooltipPosition","above","matTooltip","Address","required","",1,"form-control",3,"ngModelChange","ngModel"],["for","inputAddress"]],template:function(e,a){e&1&&(i(0,"modal-material",0),x("onOk",function(){return a.onOk()})("onCancel",function(){return a.dialogRef.close()})("onClose",function(){return a.dialogRef.close()}),i(1,"content")(2,"p",1),o(3," Do you agree about billing adjusted? "),t(),i(4,"div",2)(5,"textarea",3),w("ngModelChange",function(s){return M(a.message,s)||(a.message=s),s}),t(),i(6,"label",4),o(7,"Reason"),t()()()()),e&2&&(m("config",a.config),r(5),y("ngModel",a.message))},dependencies:[z,A,Pe,V,K,be]})};var Ae=class n{constructor(p,e,a,l){this.httpService=p;this.dialogRef=e;this.data=a;this.toastr=l;this.config.title="Stop Subscription",this.config.customWidth="450px"}message="";config=new Y;onOk(){let p={Message:this.message};this.message.trim().length==0?(this.toastr.error("The reason cannot be empty",F.Error),this.dialogRef.close()):this.httpService.post("/API/Subscription/Close",p).subscribe(e=>{this.toastr.success(e.Message,F.Error),this.dialogRef.close()})}static \u0275fac=function(e){return new(e||n)(u(T),u(Q),u(re),u(j))};static \u0275cmp=I({type:n,selectors:[["POS-modal-stop-subscription"]],decls:6,vars:2,consts:[[3,"onOk","onCancel","onClose","config"],[1,"form-floating-outline"],["name","message",2,"width","100%","height","200px",3,"ngModelChange","ngModel"],["for","message"]],template:function(e,a){e&1&&(i(0,"modal-material",0),x("onOk",function(){return a.onOk()})("onCancel",function(){return a.dialogRef.close()})("onClose",function(){return a.dialogRef.close()}),i(1,"content")(2,"div",1)(3,"textarea",2),w("ngModelChange",function(s){return M(a.message,s)||(a.message=s),s}),t(),i(4,"label",3),o(5,"Reason"),t()()()()),e&2&&(m("config",a.config),r(3),y("ngModel",a.message))},dependencies:[z,A,V,K]})};var Ve=class n{apiUrl="https://app.midtrans.com/snap/snap.js";injected=!1;initScript(){return new We(p=>{let e;this.injected||(e=document.createElement("script"),e.src=this.apiUrl,e.async=!0,e.setAttribute("data-client-key",He.midtransClientKey),this.injected=!0,document.body.appendChild(e))})}static \u0275fac=function(e){return new(e||n)};static \u0275prov=_e({token:n,factory:n.\u0275fac,providedIn:"root"})};var io=()=>["/menu/Profile/Main/My_Subscription/Choose_your_plan"],no=(n,p)=>({"bg-warning":n,"bg-danger":p}),oo=n=>({"background-color":n}),ao=n=>({"bg-gradient-warning":n});function ro(n,p){n&1&&(i(0,"a",35),o(1,"Choose Your Plan"),t()),n&2&&m("routerLink",Ke(1,io))}function lo(n,p){if(n&1&&(i(0,"div",16),o(1),f(2,"date"),t()),n&2){let e=c(2);r(),v(" ",D(2,1,e.data.Zoho.Subscription.Since,"dd MMM yyyy")," ")}}function po(n,p){if(n&1&&(i(0,"div",36)(1,"div",37)(2,"h5",13),o(3," Subscription "),t(),i(4,"div",16),o(5),t()()()),n&2){let e=c(2);r(),ge(Je(3,no,e.data.Zoho.Subscription.SubscriptionState=="SellOnly"||e.data.Zoho.Subscription.SubscriptionState=="Overdue",e.data.Zoho.Subscription.SubscriptionState=="Suspended")),r(4),v(" ",e.data.Zoho.Subscription.SubscriptionState," ")}}function mo(n,p){if(n&1&&(i(0,"span",42),o(1),f(2,"number"),t()),n&2){let e=c(3);r(),v("",S(2,1,e.data.Zoho.Subscription.Discount)," %")}}function so(n,p){if(n&1&&(i(0,"span")(1,"del"),o(2),f(3,"number"),t(),h(4,"br"),t()),n&2){let e=c(3);r(2),_(S(3,1,e.data.Zoho.Subscription.TotalAmount))}}function co(n,p){if(n&1&&(i(0,"div",6)(1,"div",7)(2,"h2"),o(3,"Current Plan"),t()(),i(4,"div",28)(5,"table",29)(6,"thead",30)(7,"tr")(8,"th",38),o(9,"Usage"),t(),i(10,"th",38),o(11,"Frequency"),t(),i(12,"th",39),o(13,"Amount"),t()()(),i(14,"tbody")(15,"tr")(16,"td",40),o(17),h(18,"br"),o(19),f(20,"number"),i(21,"small"),o(22,"month"),t(),o(23,") "),t(),i(24,"td",40)(25,"span"),o(26),h(27,"br"),t(),d(28,mo,3,3,"span",41),t(),i(29,"td",40),d(30,so,5,3,"span",19),i(31,"span"),o(32),f(33,"number"),t()()()()()()()),n&2){let e=c(2);r(17),v(" ",e.data.Zoho.Subscription.OutletCount," Outlet"),r(2),v(" (",S(20,6,e.data.Zoho.Subscription.RecurringAmount)," / "),r(7),_(e.data.Zoho.Subscription.Frequency==12?"Yearly":e.data.Zoho.Subscription.Frequency==1?"Monthly":e.data.Zoho.Subscription.Frequency==3?"3 Months":"6 Months"),r(2),m("ngIf",e.data.Zoho.Subscription.Discount!=0),r(2),m("ngIf",e.data.Zoho.Subscription.Discount!=0),r(2),_(S(33,8,e.data.Zoho.Subscription.TotalAfterDiscount))}}function uo(n,p){if(n&1&&(i(0,"span",42),o(1),f(2,"number"),t()),n&2){let e=c(3);r(),v("",S(2,1,e.data.Zoho.Subscription.Discount)," %")}}function fo(n,p){if(n&1&&(i(0,"span")(1,"del"),o(2),f(3,"number"),t(),h(4,"br"),t()),n&2){let e=c(3);r(2),_(S(3,1,e.data.NextBilling.TotalAmount))}}function _o(n,p){if(n&1){let e=C();i(0,"div",6)(1,"div",7)(2,"div")(3,"h2"),o(4,"Adjusted Plan"),t()(),i(5,"div",43)(6,"button",44),x("click",function(){g(e);let l=c(2);return b(l.onOpenConfirmAdjustedModal())}),o(7," Confirm "),t()()(),i(8,"div",28)(9,"table",29)(10,"thead",30)(11,"tr")(12,"th",38),o(13,"Usage"),t(),i(14,"th",38),o(15,"Frequency"),t(),i(16,"th",39),o(17,"Amount"),t()()(),i(18,"tbody")(19,"tr")(20,"td",40),o(21),h(22,"br"),o(23),f(24,"number"),i(25,"small"),o(26,"month"),t(),o(27,") "),t(),i(28,"td",40)(29,"span"),o(30),h(31,"br"),t(),d(32,uo,3,3,"span",41),t(),i(33,"td",40),d(34,fo,5,3,"span",19),i(35,"span"),o(36),f(37,"number"),t()()()()()()()}if(n&2){let e=c(2);r(21),v(" ",e.data.NextBilling.Outlet," Outlet"),r(2),v(" (",S(24,6,e.data.NextBilling.RecurringAmount)," / "),r(7),_(e.data.Zoho.Subscription.Frequency==12?"Yearly":e.data.Zoho.Subscription.Frequency==3?"3 Monthly":"6 Months"),r(2),m("ngIf",e.data.Zoho.Subscription.Discount!=0),r(2),m("ngIf",e.data.Zoho.Subscription.Discount!=0),r(2),_(S(37,8,e.data.NextBilling.TotalAfterDiscount))}}function go(n,p){if(n&1&&(i(0,"tr")(1,"th",47),o(2,"Withholding Tax"),t(),i(3,"td"),o(4,":"),t(),i(5,"td"),o(6),t()()),n&2){let e=c(3);r(6),v(" ",e.data.Zoho.WHTPercentage," % ")}}function bo(n,p){if(n&1&&(i(0,"tr")(1,"th",47),o(2,"Document Link"),t(),i(3,"td"),o(4,":"),t(),i(5,"td")(6,"a",48),h(7,"i",49),o(8," Upload "),t()()()),n&2){let e=c(3);r(6),Le("href",e.data.Zoho.DocumentLink,xe)}}function ho(n,p){if(n&1&&(B(0),i(1,"div",6)(2,"div",7)(3,"h2"),h(4,"i",45),o(5,"Tax Information"),t()(),i(6,"div",9)(7,"table",46),d(8,go,7,1,"tr",19)(9,bo,9,1,"tr",19),t()()(),L()),n&2){let e=c(2);r(8),m("ngIf",e.data.Zoho.WHTPercentage>0),r(),m("ngIf",e.data.Zoho.DocumentLink)}}function xo(n,p){if(n&1){let e=C();i(0,"a",62),x("click",function(){g(e);let l=c(3);return b(l.payAllInvoice())}),h(1,"i",63),o(2),f(3,"Filter"),f(4,"sum"),f(5,"Filter"),f(6,"sum"),f(7,"number"),t()}if(n&2){let e=c(3);r(2),v(" Pay All ~ IDR ",S(7,15,D(4,5,we(3,1,e.data.Zoho.invoices,"overdue","status"),"total")+D(6,12,we(5,8,e.data.Zoho.invoices,"sent","status"),"total"))," ")}}function So(n,p){if(n&1&&(i(0,"p",68),o(1),f(2,"number"),t()),n&2){let e=c().$implicit;r(),v("(",S(2,1,e.balance)," due)")}}function vo(n,p){if(n&1&&(B(0),i(1,"a",69),h(2,"i",70),i(3,"span",71),o(4,"View"),t()(),L()),n&2){let e=c().$implicit;r(),Le("href",e.invoice_url,xe)}}function Co(n,p){if(n&1){let e=C();B(0),i(1,"button",72),x("click",function(){g(e);let l=c().$implicit,s=c(3);return b(s.paySingleInvoice(l))}),h(2,"i",63),i(3,"span",71),o(4,"Pay Now"),t()(),L()}if(n&2){let e=c().$implicit;r(),Qt("id","pay-button",e.invoice_number,"")}}function yo(n,p){if(n&1&&(i(0,"tr",64)(1,"td"),o(2),t(),i(3,"td"),o(4),f(5,"date"),t(),i(6,"td"),o(7),t(),i(8,"td",57),o(9),f(10,"number"),d(11,So,3,3,"p",65),t(),i(12,"td"),o(13),t(),i(14,"td",66),o(15),t(),i(16,"td",67),d(17,vo,5,1,"ng-container",19)(18,Co,5,2,"ng-container",19),t()()),n&2){let e=p.$implicit,a=p.index;Ye(U(16,oo,e.status=="overdue"?"#f2dede":"")),r(2),_(a+1+"."),r(2),_(D(5,11,e.date,"dd MMM yyyy")),r(3),_(e.invoice_number),r(2),v(" ",S(10,14,e.total)," "),r(2),m("ngIf",e.total!=e.balance&&e.balance>0),r(2),_(e.currency_code),r(2),_(e.status),r(2),m("ngIf",e.status!="draft"&&e.status!="void"),r(),m("ngIf",(e.status=="sent"||e.status=="overdue")&&e.currency_code=="IDR")}}function Mo(n,p){if(n&1&&(i(0,"div",6)(1,"div",7)(2,"div",50)(3,"h2",51),h(4,"i",52),o(5," Invoices"),t()(),d(6,xo,8,17,"a",53),t(),i(7,"div",28)(8,"table",54)(9,"thead",30)(10,"tr")(11,"th",31),o(12,"No"),t(),i(13,"th",55),o(14,"Date"),t(),i(15,"th",56),o(16,"Number"),t(),i(17,"th",57),o(18,"Amount"),t(),h(19,"th",58),i(20,"th",59),o(21,"Status"),t(),i(22,"th"),o(23,"Invoice"),t()()(),i(24,"tbody"),d(25,yo,19,18,"tr",60),t()(),i(26,"p",61),o(27," Please pay your biling directly inside our platform. We provide multiple methods ex: Credit Card/Bank Transfer/E-Money. "),t()()()),n&2){let e=c(2);r(6),m("ngIf",e.outstandingInvoiceCount>1&&e.data.Zoho.Subscription.Currency=="RP"),r(19),m("ngForOf",e.data.Zoho.invoices)}}function wo(n,p){if(n&1){let e=C();i(0,"button",73),x("click",function(){g(e);let l=c(2);return b(l.load())}),o(1," Load "),t()}}function Io(n,p){if(n&1&&(i(0,"tr",64)(1,"td"),o(2),t(),i(3,"td"),o(4),t(),i(5,"td",57),o(6),f(7,"number"),t(),i(8,"td",57),o(9),t(),i(10,"td",57),o(11),f(12,"date"),t(),i(13,"td",57),o(14),f(15,"date"),t()()),n&2){let e=p.$implicit,a=p.index;r(2),_(a+1+"."),r(2),_(e.Name),r(),ge(U(16,ao,e.OrdersCount<25)),r(),v(" ",S(7,8,e.OrdersCount),""),r(3),_(e.RegisterCount),r(2),_(D(12,10,e.MinDate,"dd MMM yyyy")),r(3),_(D(15,13,e.MaxDate,"dd MMM yyyy"))}}function Eo(n,p){if(n&1){let e=C();i(0,"mainpanel-cmp",1)(1,"actions"),d(2,ro,2,2,"a",2),t(),i(3,"content")(4,"div",3)(5,"div",4)(6,"div",5)(7,"div",6)(8,"div",7)(9,"h2"),h(10,"i",8),o(11," Account"),t()(),i(12,"div",9)(13,"div",10)(14,"div",11)(15,"div",12)(16,"h5",13),o(17," Since "),t(),d(18,lo,3,4,"div",14),t()(),i(19,"div",15)(20,"div",12)(21,"h5",13),o(22," Type "),t(),i(23,"div",16),o(24),t()()(),d(25,po,6,6,"div",17),t()()(),d(26,co,34,10,"div",18)(27,_o,38,10,"div",18)(28,ho,10,2,"ng-container",19),i(29,"div",6)(30,"div",7)(31,"h2"),h(32,"i",20),o(33," Close Store"),t()(),i(34,"div",9)(35,"div"),o(36," You can close your store to stop your billing. "),t(),i(37,"div",21)(38,"button",22),x("click",function(){g(e);let l=c();return b(l.onOpenCloseModal())}),o(39," Close "),t()()()()(),i(40,"div",23),d(41,Mo,28,2,"div",18),i(42,"div",6)(43,"div",24)(44,"h2"),h(45,"i",25),o(46," Outlets Usage "),i(47,"small",26),o(48),f(49,"date"),f(50,"date"),t()(),d(51,wo,2,0,"button",27),t(),i(52,"div",28)(53,"table",29)(54,"thead",30)(55,"tr")(56,"th",31),o(57,"No"),t(),i(58,"th"),o(59,"Outlet Name"),t(),i(60,"th",32),o(61,"Orders"),t(),i(62,"th",32),o(63,"Registers"),t(),i(64,"th",33),o(65,"Min Date"),t(),i(66,"th",33),o(67,"Max Date"),t()()(),i(68,"tbody"),d(69,Io,16,18,"tr",34),f(70,"sortBy"),t()()()()()()()()()}if(n&2){let e=c();m("pageData",e.menuData)("hideSearchBox",!0)("hideSearchDropdown",!0),r(2),m("ngIf",e.data.Account.Type=="Trial"),r(16),m("ngIf",e.data.Zoho.Subscription),r(6),v(" ",e.data.Account.Type," "),r(),m("ngIf",e.data.Zoho.CustomerID!=null),r(),m("ngIf",e.data.Zoho.Subscription!=null),r(),m("ngIf",e.data.Zoho.Subscription!=null&&e.data.NextBilling&&e.data.Billed>e.data.Zoho.Subscription.OutletCount),r(),m("ngIf",e.data.Zoho.WHTPercentage>0||e.data.Zoho.DocumentLink),r(13),m("ngIf",e.data.Zoho.invoices&&e.data.Zoho.invoices.length>0),r(7),Me("(",D(49,15,e.data.From,"dd MMM yyyy")," - ",D(50,18,e.data.To,"dd MMM yyyy"),")"),r(3),m("ngIf",e.data.Outlets.length==0),r(18),m("ngForOf",we(70,21,e.data.Outlets,"desc","OrdersCount"))}}var xt=class n extends pi{constructor(e,a,l,s,E,q){super(e);this.httpService=a;this.matDialog=l;this.midtrans=s;this.ngZone=E;this.toastr=q;this.data=null}modalTitle;modalBody;data;loadOutlet=!1;outstandingInvoiceCount=0;ngOnInit(){this.midtrans.initScript().subscribe(),this.menuData$.subscribe(()=>{this.getData()})}getData(){let e={LoadOutlet:this.loadOutlet};this.httpService.post("/API/Subscription/GetData",e).subscribe({next:a=>{this.data=a,H.IsEmpty(this.data.Outlets)&&(this.data.Outlets=[]),this.postInit(a)}})}postInit(e){e.Zoho.invoices=e.Zoho.invoices?e.Zoho.invoices:[],e.Zoho.code!=200&&(e.Zoho.code==401?this.modalTitle="Trial Customer":e.Zoho.code==400&&(this.modalTitle="your account customer"),e.Zoho.message==null?this.modalBody=e.Zoho.message:this.modalBody=e.Zoho.message,this.matDialog.open(bt,{data:{title:this.modalTitle,body:this.modalBody}})),e.Zoho.invoices.forEach(a=>{(a.status=="sent"||a.status=="overdue")&&this.outstandingInvoiceCount++})}showToaster(e){var a="Payment Successful!";e>1&&(a+=`
|
|
4
4
|
Please Log out and re-login if your account is currently suspended!`),this.toastr.success(a,F.Success)}payAllInvoice(){let e=0,a,l,s,E;this.data.Zoho.invoices.forEach(O=>{(O.status=="sent"||O.status=="overdue")&&(e+=O.total,l==null?(a=O.invoice_number,l=O.invoice_number.concat("$"+O.total+";"),s=O.invoice_id,E=O.invoice_id.concat("$"+O.total+";")):(a=a.concat("_"+O.invoice_number),l=l.concat(O.invoice_number.concat("$"+O.total+";")),s=s.concat(";"+O.invoice_id),E=E.concat(O.invoice_id.concat("$"+O.total)+";")))});let q={CustomerID:this.data.Zoho.invoices[0].customer_id,InvNumber:l,OrderID:a,GrossAmount:e,WHTPercentage:this.data.Zoho.WHTPercentage,VATEnabled:this.data.Zoho.VATEnabled,InvoiceID:E};this.httpService.post("/API/Subscription/GetSNAPTokenMultipleInvoice",q).subscribe(O=>{this.openSNAPDialog(O)})}paySingleInvoice(e){let a={InvNumber:e.invoice_number,GrossAmount:e.balance,WHTPercentage:this.data.Zoho.WHTPercentage,VATEnabled:this.data.Zoho.VATEnabled,InvoiceID:e.invoice_id,CustomerID:e.customer_id};this.httpService.post("/API/Subscription/GetSNAPToken",a).subscribe(l=>{this.openSNAPDialog(l)})}openSNAPDialog(e){let a=this.data.Account.SubscriptionStatus;snap.pay(e.token,{onSuccess:l=>{this.ngZone.run(()=>{this.showToaster(a),this.getData()})}})}onOpenCloseModal(){this.matDialog.open(Ae)}onOpenConfirmAdjustedModal(){this.matDialog.open(ht)}load(){this.loadOutlet=!0,this.getData()}static \u0275fac=function(a){return new(a||n)(u(pe),u(T),u(le),u(Ve),u($e),u(j))};static \u0275cmp=I({type:n,selectors:[["POS-my-subscription"]],features:[oe],decls:1,vars:1,consts:[[3,"pageData","hideSearchBox","hideSearchDropdown",4,"ngIf"],[3,"pageData","hideSearchBox","hideSearchDropdown"],["class","btn btn-success",3,"routerLink",4,"ngIf"],[1,"container-fluid","bg-light-gray"],[1,"row","pt-5","ms-3"],[1,"col-md-4"],[1,"card"],[1,"card-header","d-flex","justify-content-between"],[1,"fa-solid","fa-user"],[1,"card-body"],[1,"row"],[1,"col","pe-0","ps-3"],[1,"p-3","border","rounded","bg-light-gray","text-black"],[1,"fw-bold"],["class","mt-4 h6",4,"ngIf"],[1,"col","pe-3","ps-3"],[1,"mt-4","h6"],["class","col ps-0 pe-3",4,"ngIf"],["class","card",4,"ngIf"],[4,"ngIf"],[1,"fa-solid","fa-xmark-circle"],[1,"mt-4"],["type","button",1,"btn","btn-sm","btn-danger","py-2",3,"click"],[1,"col-md-8"],[1,"card-header","d-flex","justify-content-between","align-items-center"],[1,"fa","fa-location-dot"],[1,"text-body-secondary","h6"],["class","btn btn-outline-secondary",3,"click",4,"ngIf"],[1,"card-body","table-responsive"],[1,"table","mt-5"],[1,"thead-light","sticky-top-thead"],[2,"width","20px"],[1,"text-end",2,"width","100px"],[1,"text-end",2,"width","120px"],["class","border",4,"ngFor","ngForOf"],[1,"btn","btn-success",3,"routerLink"],[1,"col","ps-0","pe-3"],[1,"p-3","border","rounded","bg-success","text-white"],[1,"text-center"],[1,"text-center",2,"width","104px"],[1,"text-center","align-top"],["class","text-danger",4,"ngIf"],[1,"text-danger"],[1,"btn-group"],["type","button",1,"btn","btn-sm","btn-success","py-2",3,"click"],[1,"fa-solid","fa-file-circle-plus"],[1,"table-sm","table-borderless"],[2,"width","103px"],["target","_blank",1,"btn","btn-light","btn-sm",2,"height","32px",3,"href"],[1,"fa","fa-upload"],[1,"me-auto","d-sm-block"],[1,"d-inline"],[1,"fa-solid","fa-file-invoice"],["class","btn btn-success btn-sm","role","button","matTooltipPosition","above","matTooltip","Pay All",3,"click",4,"ngIf"],["id","tableGrid",1,"table","mt-5"],[2,"width","120px"],[2,"width","100px"],[1,"text-end"],[2,"width","60px"],[2,"width","80px"],["class","border",3,"style",4,"ngFor","ngForOf"],[1,"pt-3"],["role","button","matTooltipPosition","above","matTooltip","Pay All",1,"btn","btn-success","btn-sm",3,"click"],[1,"fa-lg","fa-solid","fa-arrows-rotate"],[1,"border"],["class","fst-italic text-warning",4,"ngIf"],[1,"text-uppercase"],[1,"d-flex","justify-content-between"],[1,"fst-italic","text-warning"],["target","_blank",3,"href"],[1,"fa-lg","fa-solid","fa-file-lines"],[1,"ms-3"],[2,"border-width","1px",3,"click","id"],[1,"btn","btn-outline-secondary",3,"click"]],template:function(a,l){a&1&&d(0,Eo,71,25,"mainpanel-cmp",0),a&2&&m("ngIf",l.data)},dependencies:[$,N,Ie,X,be,ae,Z,lt,fi,pt]})};function To(n,p){n&1&&(i(0,"div",13)(1,"h5",14),h(2,"i",15),o(3," You are not listening to any outlet. Please select one. "),t()())}function Do(n,p){if(n&1&&(i(0,"div",16)(1,"h5",14),h(2,"i",15),o(3),t()()),n&2){let e=c(2);r(3),v(" You are currently listening to ",e.selectedOutlet==null?null:e.selectedOutlet.Name,". ")}}function Po(n,p){if(n&1&&(i(0,"div",9)(1,"div",10),d(2,To,4,0,"div",11)(3,Do,4,1,"div",12),t()()),n&2){let e=c();r(2),m("ngIf",!e.selectedOutlet),r(),m("ngIf",e.selectedOutlet)}}var St=class n{constructor(p,e,a,l){this.signalrClientService=p;this.httpService=e;this.dialogRef=a;this.toastr=l;this.modalConfig=new Y,this.modalConfig.title="Subscribe Notification",this.modalConfig.customWidth="475px",this.initModalLoader(),this.touchOnSelectOption=!1}modalConfig;entities;outletID;selectedOutlet;initialOutlet;touchOnSelectOption;previousSelectedOutlet;initModalLoader(){this.httpService.post("/api/NotificationLoader/PushNotificationList").pipe(ce(p=>H.IsNotEmpty(p))).subscribe(p=>{this.entities=p.Options.Entities,H.IsNotEmpty(p.SubscribeOn)&&(this.outletID=p.SubscribeOn),this.initSelectedOutlet()})}initSelectedOutlet(){this.selectedOutlet=this.findOutletByID(this.outletID),this.previousSelectedOutlet=this.selectedOutlet,this.initialOutlet=this.selectedOutlet,this.checkValidateButtonOk()}checkValidateButtonOk(){this.modalConfig.validated=!0,H.IsEmpty(this.selectedOutlet)&&(this.modalConfig.validated=!1)}onSelectOutlet(p){this.previousSelectedOutlet=this.selectedOutlet,this.selectedOutlet=p,this.modalConfig.validated=!0}onOpenSelectOutlet(){this.touchOnSelectOption=!0}onCancel(){this.dialogRef.close()}onOk(){let p=this.initialOutlet?this.initialOutlet.ID:null;this.outletID!==p?H.IsNotEmpty(this.outletID)?this.subscribeToPushNotification(`Listening to ${this.selectedOutlet?.Name}`,"Push Notification Enabled"):this.unsubscribeToPushNotification():this.dialogRef.close()}unsubscribeToPushNotification(){this.subscribeToPushNotification(`You are no longer listening to ${this.previousSelectedOutlet?.Name}`,"Push Notification Disabled"),this.setLocalStorage(!0)}subscribeToPushNotification(p,e){let a=localStorage.getItem("PushNotificationID"),l={EntityID:this.outletID};this.httpService.post("/api/PushNotification/Subscribe",l).subscribe(s=>{this.signalrClientService.SubscribeGroup(this.outletID?this.outletID:"",a),this.setLocalStorage(),this.toastr.success(p,e),this.dialogRef.close()})}setLocalStorage(p=!1){p?localStorage.removeItem("NotificationOutletID"):localStorage.setItem("NotificationOutletID",this.outletID)}findOutletByID(p){return this.entities.find(a=>a.ID==p)}static \u0275fac=function(e){return new(e||n)(u(ni),u(T),u(Q),u(j))};static \u0275cmp=I({type:n,selectors:[["POS-modal-subscribe-notification"]],decls:11,vars:4,consts:[[3,"onOk","onCancel","onClose","config"],[1,"container"],["class","row",4,"ngIf"],[1,"row","mt-1"],[1,"col-md-2"],[1,"pt-10"],[1,"col-md-10"],[1,"form-floating-outline","selected"],["appendTo","body","bindLabel","Name","bindValue","ID","placeholder","Choose an Options","id","outlet",1,"productform",3,"open","clear","ngModelChange","change","items","ngModel"],[1,"row"],[1,"col-12"],["class","alert alert-danger",4,"ngIf"],["class","alert alert-success",4,"ngIf"],[1,"alert","alert-danger"],[1,"d-flex"],["aria-hidden","true",1,"fa-solid","fa-circle-info","me-3","mt-1"],[1,"alert","alert-success"]],template:function(e,a){e&1&&(i(0,"modal-material",0),x("onOk",function(){return a.onOk()})("onCancel",function(){return a.onCancel()})("onClose",function(){return a.onCancel()}),i(1,"content")(2,"div",1),d(3,Po,4,2,"div",2),i(4,"div",3)(5,"div",4)(6,"h5",5),o(7,"Outlet"),t()(),i(8,"div",6)(9,"div",7)(10,"ng-select",8),x("open",function(){return a.onOpenSelectOutlet()})("clear",function(){return a.onOpenSelectOutlet()}),w("ngModelChange",function(s){return M(a.outletID,s)||(a.outletID=s),s}),x("change",function(s){return a.onSelectOutlet(s)}),t()()()()()()()),e&2&&(m("config",a.modalConfig),r(3),m("ngIf",!a.touchOnSelectOption),r(7),m("items",a.entities),y("ngModel",a.outletID))},dependencies:[N,A,V,K,ke]})};var ko=n=>({ID:n});function No(n,p){if(n&1&&(i(0,"a",18),o(1),t()),n&2){let e=c().$implicit;m("routerLink","/menu"+e.URL)("queryParams",U(3,ko,e.ObjectID)),r(),v(" ",e.Body," ")}}function Fo(n,p){if(n&1&&(i(0,"a",19),o(1),t()),n&2){let e=c().$implicit;Le("href",e.URL,xe),r(),v(" ",e.Body," ")}}function Ao(n,p){if(n&1&&(i(0,"tr",15)(1,"td"),o(2),t(),i(3,"td")(4,"b"),o(5),t(),h(6,"br"),i(7,"span"),d(8,No,2,5,"a",16)(9,Fo,2,2,"a",17),t()(),i(10,"td"),o(11),f(12,"date"),t(),i(13,"td"),o(14),t()()),n&2){let e=p.$implicit;r(2),_(e.OutletName),r(3),_(e.Header),r(3),m("ngIf",e.ObjectIDType>0),r(),m("ngIf",e.ObjectIDType==0),r(2),_(D(12,6,e.Created,"dd MMM yyyy HH:mm")),r(3),_(e.TypeString)}}function Vo(n,p){if(n&1){let e=C();i(0,"mat-paginator",20),x("page",function(l){g(e);let s=c(2);return b(s.onPaginationChange(l))}),t()}if(n&2){let e=c(2);m("length",e.pagination.listTotal)("pageSize",e.pagination.pageSize)("pageIndex",e.pageData.Filter.PageNumber==0?0:e.pageData.Filter.PageNumber-1)}}function Ro(n,p){if(n&1){let e=C();i(0,"mainpanel-cmp",1),x("onSubmit",function(){g(e);let l=c();return b(l.searchFromPageOne())}),i(1,"actions")(2,"a",2),x("click",function(){g(e);let l=c();return b(l.openSubscribeModal())}),o(3,"Subscribe"),t()(),i(4,"filters")(5,"div",3)(6,"div",4)(7,"div")(8,"h6"),o(9,"Outlet"),t(),i(10,"ng-select",5),w("ngModelChange",function(l){g(e);let s=c();return M(s.pageData.Filter.ListIDs,l)||(s.pageData.Filter.ListIDs=l),b(l)}),t()(),i(11,"div")(12,"h6"),o(13,"From"),t(),i(14,"datepicker",6),w("dateChange",function(l){g(e);let s=c();return M(s.pageData.Filter.From,l)||(s.pageData.Filter.From=l),b(l)}),t()(),i(15,"div")(16,"h6"),o(17,"To"),t(),i(18,"datepicker",7),w("dateChange",function(l){g(e);let s=c();return M(s.pageData.Filter.To,l)||(s.pageData.Filter.To=l),b(l)}),t()()()()(),i(19,"content")(20,"div",8)(21,"table",9)(22,"thead",10)(23,"tr",11)(24,"th",12),o(25,"Outlet"),t(),i(26,"th"),o(27,"Message"),t(),i(28,"th"),o(29,"Created"),t(),i(30,"th"),o(31,"Type"),t()()(),i(32,"tbody"),d(33,Ao,15,9,"tr",13),t()(),i(34,"div"),d(35,Vo,1,3,"mat-paginator",14),t()()()()}if(n&2){let e=c();m("pageData",e.menuData)("hideSearchBox",!0),r(10),m("items",e.pageData.Options.Entities),y("ngModel",e.pageData.Filter.ListIDs),m("multiple",!0),r(4),y("date",e.pageData.Filter.From),r(4),y("date",e.pageData.Filter.To),r(15),m("ngForOf",e.data.Data),r(2),m("ngIf",e.pagination.listTotal>0)}}var vt=class n extends Oe{constructor(e,a,l){super(e,a,"v3/notification/WithTotalCount","NotificationLoader/PushNotificationList");this.dialog=l}preInitList(){let e=new Date;e.setHours(0,0,0,0);let a=new Date;a.setHours(23,59,59,59),this.pageData.Filter.From=e,this.pageData.Filter.To=a}openSubscribeModal(){this.dialog.open(St)}static \u0275fac=function(a){return new(a||n)(u(pe),u(T),u(le))};static \u0275cmp=I({type:n,selectors:[["POS-notification"]],features:[oe],decls:1,vars:1,consts:[[3,"pageData","hideSearchBox","onSubmit",4,"ngIf"],[3,"onSubmit","pageData","hideSearchBox"],["role","button",1,"btn","btn-success",3,"click"],[1,"d-flex"],["container",""],["bindLabel","Name","bindValue","ID",3,"ngModelChange","items","ngModel","multiple"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid","mt-5"],["id","tableGrid",1,"table","border-bottom"],[1,"thead-light","sticky-top-thead"],[1,"header"],[2,"width","200px"],["class","border-bottom",4,"ngFor","ngForOf"],[3,"length","pageSize","pageIndex","page",4,"ngIf"],[1,"border-bottom"],["target","_blank",3,"routerLink","queryParams",4,"ngIf"],["target","_blank",3,"href",4,"ngIf"],["target","_blank",3,"routerLink","queryParams"],["target","_blank",3,"href"],[3,"page","length","pageSize","pageIndex"]],template:function(a,l){a&1&&d(0,Ro,36,9,"mainpanel-cmp",0),a&2&&m("ngIf",l.data)},dependencies:[$,N,A,V,Ie,X,at,Ne,ke,Z]})};var me=class n{_loadSubscriptionData=new Ue(null);loadSubscriptionData$=this._loadSubscriptionData.asObservable();subscriptionData$;lastUnpaidInvoiceDate$;constructor(p){this.subscriptionData$=this.loadSubscriptionData$.pipe(te(()=>p.get("/API/Subscription/GetInitialData").pipe(ze(e=>{let a=0;e.Subscription?.SubscriptionState=="Overdue"?a=1:e.Subscription?.SubscriptionState=="Sell Only"?a=2:e.Subscription?.SubscriptionState=="Suspended"&&(a=3),H.IsNotEmpty(e.Subscription)&&(e.Subscription.SubscriptionStatus=a)}))),Ze(1)),this.lastUnpaidInvoiceDate$=this.subscriptionData$.pipe(se(e=>e.invoices.filter(a=>(a.status=="sent"||a.status=="overdue")&&a.currency_code=="IDR")),se(e=>e.length>0?e[0].date:"-"))}loadSubscriptionData(){this._loadSubscriptionData.next()}static \u0275fac=function(e){return new(e||n)(ne(T))};static \u0275prov=_e({token:n,factory:n.\u0275fac,providedIn:"root"})};var Re=class n{constructor(p,e){p.subscriptionData$.pipe(ce(l=>l.code!=200),te(()=>Wt(e.navigate(["/menu/Profile/Main/My_Subscription/Choose_your_plan"])))).subscribe()}static \u0275fac=function(e){return new(e||n)(ne(me),ne(Se))};static \u0275prov=_e({token:n,factory:n.\u0275fac,providedIn:"root"})};var Ce=class n{outlets$;from$;to$;_isLoadOutlet=new Ue(!1);isLoadOutlet$=this._isLoadOutlet.asObservable().pipe(ce(p=>p));showLoadButton$;constructor(p,e){let a=this.isLoadOutlet$.pipe(te(()=>p.post("/API/Subscription/GetUsage").pipe()),Ze(1));this.outlets$=a.pipe(se(l=>l.Outlets)),this.from$=a.pipe(se(l=>l.From)),this.to$=a.pipe(se(l=>l.To)),e.subscriptionData$.pipe(ce(l=>l.Subscription?.OutletCount<=He.outletMaximumSubscription),ze(()=>this.loadOutlet())).subscribe(),this.showLoadButton$=Ut(e.subscriptionData$.pipe(se(l=>l.Subscription?.OutletCount>He.outletMaximumSubscription),Zt(1)),a.pipe(se(()=>!1)))}loadOutlet(){this._isLoadOutlet.next(!0)}static \u0275fac=function(e){return new(e||n)(ne(T),ne(me))};static \u0275prov=_e({token:n,factory:n.\u0275fac,providedIn:"root"})};var yt=class n{constructor(p,e,a){this.http=p;this.ngZone=e;this.toastr=a}payInvoice(p,e,a,l){let s={InvNumber:p.invoice_number,GrossAmount:p.balance,WHTPercentage:e,VATEnabled:a,InvoiceID:p.invoice_id,CustomerID:p.customer_id};return this.http.post("/API/Subscription/GetSNAPToken",s).pipe(te(E=>this.openSNAPDialog(E,l)))}payAllInvoices(p,e,a,l){let s=0,E,q,O,fe;p.forEach(G=>{(G.status=="sent"||G.status=="overdue")&&(s+=G.total,q==null?(E=G.invoice_number,q=G.invoice_number.concat("$"+G.total+";"),O=G.invoice_id,fe=G.invoice_id.concat("$"+G.total+";")):(E=E.concat("_"+G.invoice_number),q=q.concat(G.invoice_number.concat("$"+G.total+";")),O=O.concat(";"+G.invoice_id),fe=fe.concat(G.invoice_id.concat("$"+G.total)+";")))});let Be={CustomerID:p[0].customer_id,InvNumber:q,OrderID:E,GrossAmount:s,WHTPercentage:e,VATEnabled:a,InvoiceID:fe};return this.http.post("/API/Subscription/GetSNAPTokenMultipleInvoice",Be).pipe(te(G=>this.openSNAPDialog(G,l)))}openSNAPDialog(p,e){let a=e;return new We(l=>{snap.pay(p.token,{onSuccess:()=>{this.ngZone.run(()=>{this.showToaster(a),l.next(),l.complete()})}})})}showToaster(p){let e="Payment Successful!";p>1&&(e+=`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as et,c as tt,d as it}from"./chunk-76T7A6QM.js";import{T as nt}from"./chunk-UVB2YZEK.js";import{A as pe,F as q,I as me,P as Ze,V as ge,Z as _e,_ as Xe,aa as G,da as Je,f as g,l as he,u as We}from"./chunk-V34SAX5L.js";import{a as $e}from"./chunk-DKFSWJLD.js";import{$ as h,$a as Ae,Aa as se,Ac as le,B as L,Bb as P,Bc as de,C as J,Ca as v,Cb as ae,D as Ce,Da as V,Dc as Le,Eb as m,Ga as z,Gb as d,J as xe,Kd as Ye,L as U,Md as Ge,N as Te,Nb as Be,Nc as Ue,Oa as re,Oc as Ve,Pb as He,Qb as qe,Sa as u,Ub as R,V as Se,Vb as b,W as Ee,Wb as A,X as O,Xb as Qe,Y as Oe,Za as Re,Zc as ze,_c as je,c as k,cb as F,cc as I,db as oe,dc as Ne,eb as _,ec as ce,fa as ee,fc as ue,ga as we,ha as x,hb as T,ib as l,ja as r,ka as te,kb as Ke,la as ie,ma as ne,na as De,nc as K,oa as Fe,pa as y,qc as B,t as Q,tc as H,u as N,ua as w,va as D,vb as c,w as X,wb as p,xb as S,y as E,ya as Pe,yb as j,zb as Y}from"./chunk-6LBESDNN.js";import{a as C,b as Ie}from"./chunk-LHUGHE24.js";var rt=()=>["/menu/Outlets/Master/Quick_Key_Templates/Form"],ht=t=>({ID:t}),pt=t=>({OutletID:t});function mt(t,s){if(t&1&&S(0,"img",23),t&2){let e=d(2).$implicit;l("src",e.ImageURLClient,re)}}function gt(t,s){if(t&1&&(j(0),c(1,"div",20)(2,"div",21),_(3,mt,1,1,"img",22),p()(),Y()),t&2){let e=d().$implicit;u(3),l("ngIf",e.ImageURLClient)}}function _t(t,s){if(t&1&&(c(0,"div",21)(1,"p",24)(2,"span"),b(3),K(4,"slice"),p()()()),t&2){let e=d().$implicit;u(3),A(B(4,1,e.Display,0,3))}}function ft(t,s){if(t&1){let e=P();c(0,"div",18)(1,"a",19),m("click",function(){let n=w(e).$implicit,o=d(4);return D(o.onSelectQuickKeyItem(n))}),_(2,gt,4,1,"ng-container",7)(3,_t,5,5,"ng-template",null,2,H),c(5,"small"),b(6),K(7,"slice"),p()()()}if(t&2){let e=s.$implicit,i=R(4);u(2),l("ngIf",e.ImageURLClient)("ngIfElse",i),u(4),A(B(7,3,e.Display,0,36))}}function kt(t,s){if(t&1&&(c(0,"mat-tab",11)(1,"div",12)(2,"div",13),_(3,ft,8,7,"div",14),c(4,"div",15)(5,"a",16),S(6,"i",17),p()()()()()),t&2){let e=s.$implicit,i=d(3);l("label",e.Name),u(3),l("ngForOf",e==null?null:e.Items),u(2),l("routerLink",ce(4,rt))("queryParams",ue(5,ht,i.quickKey.ID))}}function yt(t,s){if(t&1){let e=P();c(0,"mat-tab-group",9),m("selectedIndexChange",function(n){w(e);let o=d(2);return D(o.onChangeTab(n))}),_(1,kt,7,7,"mat-tab",10),p()}if(t&2){let e=d(2);l("disableRipple",!0)("selectedIndex",e.selectedTabIndex),u(),l("ngForOf",e.quickKey==null?null:e.quickKey.Groups)}}function bt(t,s){if(t&1&&S(0,"img",23),t&2){let e=d(2).$implicit;l("src",e.ImageURLClient,re)}}function Mt(t,s){if(t&1&&(j(0),c(1,"div",20)(2,"div",21),_(3,bt,1,1,"img",22),p()(),Y()),t&2){let e=d().$implicit;u(3),l("ngIf",e.ImageURLClient)}}function vt(t,s){if(t&1&&(c(0,"div",21)(1,"p",24)(2,"span"),b(3),K(4,"slice"),p()()()),t&2){let e=d().$implicit;u(3),A(B(4,1,e.Model,0,3))}}function It(t,s){if(t&1){let e=P();c(0,"div",18)(1,"a",19),m("click",function(){let n=w(e).$implicit,o=d(3);return D(o.onSelectVariant(n.ID))}),_(2,Mt,4,1,"ng-container",7)(3,vt,5,5,"ng-template",null,3,H),c(5,"small"),b(6),K(7,"slice"),p()()()}if(t&2){let e=s.$implicit,i=R(4);u(2),l("ngIf",e.ImageURLClient)("ngIfElse",i),u(4),A(B(7,3,e.Model,0,30))}}function Ct(t,s){if(t&1){let e=P();c(0,"div",25)(1,"div",26),m("click",function(){w(e);let n=d(2);return D(n.quickKeyState="QUICKKEY")}),S(2,"i",27),p(),c(3,"div",28)(4,"b"),b(5),p()()(),c(6,"div",12)(7,"div",13),_(8,It,8,7,"div",14),p()()}if(t&2){let e=d(2);u(5),Qe(" ",e.subQuickKeyPack.Display,""),u(3),l("ngForOf",e.subQuickKeyPack==null?null:e.subQuickKeyPack.Children)}}function xt(t,s){if(t&1&&(j(0),_(1,yt,2,3,"mat-tab-group",8)(2,Ct,9,2,"ng-template",null,1,H),Y()),t&2){let e=R(3),i=d();u(),l("ngIf",i.quickKeyState=="QUICKKEY")("ngIfElse",e)}}function Tt(t,s){if(t&1&&(c(0,"div",29)(1,"a",30)(2,"strong"),b(3,"QUICK KEYS UNCONFIGURED"),p(),S(4,"i",31),c(5,"span"),b(6,"Click here to setup your Quick keys"),p()()()),t&2){let e=d();u(),l("routerLink",ce(2,rt))("queryParams",ue(3,pt,e.outletID))}}var st=class t{quickKey;get outletID(){return this._outletID}set outletID(s){this._outletID=s,this._outletID&&(this.quickKeyState="QUICKKEY")}_outletID="";_onSelectVariant=new v;quickKeyState="QUICKKEY";subQuickKeyPack;selectedTabIndex=0;disabled=!1;onChange=s=>{};onTouched=()=>{};writeValue(s){}registerOnChange(s){this.onChange=s}registerOnTouched(s){this.onTouched=s}setDisabledState(s){this.disabled=s}onSelectQuickKeyItem(s){s.Children?s.Children.length==1?this.onSelectVariant(s.Children[0].ID):(this.quickKeyState="SUBQUICKKEY",this.subQuickKeyPack={Children:s.Children,Display:s.Display}):this.onSelectVariant(s.ItemID)}onSelectVariant(s){this.quickKeyState="QUICKKEY",this._onSelectVariant.emit(s),this.onChange(s)}onChangeTab(s){this.selectedTabIndex=s}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=De({type:t,selectors:[["POS-quick-key"]],inputs:{quickKey:"quickKey",outletID:"outletID"},outputs:{_onSelectVariant:"onSelectVariant"},standalone:!0,features:[I([{provide:$e,multi:!0,useExisting:t}]),Ne],decls:6,vars:2,consts:[["noQuickKey",""],["SUBQUICKEY",""],["BLANK_IMG",""],["BLANK_IMG_SUB",""],[1,"row","h-100"],[1,"col-12"],[1,"quick-key-tab","h-100","pt-4"],[4,"ngIf","ngIfElse"],["class","h-100 bgQuickkeyIllustration landscape",3,"disableRipple","selectedIndex","selectedIndexChange",4,"ngIf","ngIfElse"],[1,"h-100","bgQuickkeyIllustration","landscape",3,"selectedIndexChange","disableRipple","selectedIndex"],[3,"label",4,"ngFor","ngForOf"],[3,"label"],[1,"container","tabItems"],[1,"row","g-0"],["class","col-3 column px-6",4,"ngFor","ngForOf"],[1,"col-3","column","px-8","add","pt-8"],[3,"routerLink","queryParams"],["aria-hidden","true",1,"fa","fa-plus-circle","fa-5x","d-flex","align-items-center","justify-content-center","bg-white","h-100","text-primary"],[1,"col-3","column","px-6"],[3,"click"],[1,"img-box","d-flex","align-items-center"],[1,"ratio","ratio-1x1"],["class","full-screen-image",3,"src",4,"ngIf"],[1,"full-screen-image",3,"src"],[1,"fw-normal","fs-1","d-flex","align-items-center","justify-content-center"],[1,"row","g-0","border","align-items-center","subquicKey"],[1,"col-auto","border-end","py-5","px-7","cursor-pointer",3,"click"],["aria-hidden","true",1,"fa","fa-arrow-left"],[1,"col","text-center","fw-bold","text-uppercase","fs-5"],[1,"no-quick-key"],["id","LinkConfigureQuickkey","target","_blank",3,"routerLink","queryParams"],["aria-hidden","true",1,"fa-regular","fa-hand-pointer"]],template:function(e,i){if(e&1&&(c(0,"div",4)(1,"div",5)(2,"section",6),_(3,xt,4,2,"ng-container",7)(4,Tt,7,5,"ng-template",null,0,H),p()()()),e&2){let n=R(5);u(3),l("ngIf",i.quickKey&&i.quickKey.Groups)("ngIfElse",n)}},dependencies:[je,Ue,Ve,ze,Ge,Ye,nt,it,et,tt],styles:[".quick-key-tab{width:100%;position:relative;height:100%;max-height:calc(100vh - 60px)} .quick-key-tab .mat-mdc-tab-header-pagination{display:none!important} .quick-key-tab .mat-mdc-tab-header{border:none} .quick-key-tab .mdc-tab-indicator{display:none!important} .quick-key-tab .mat-mdc-tab-body-wrapper{width:102%} .quick-key-tab .mat-mdc-tab-labels{border-bottom:0px;display:flex;flex-wrap:wrap;border-radius:6px} .quick-key-tab .mat-mdc-tab-labels .mat-mdc-tab{color:#151515;opacity:1;height:38px;max-height:40px;white-space:normal!important;overflow:hidden;padding:0!important;min-width:25%!important;flex-basis:0;font-size:12px;font-weight:700;outline:none;text-transform:uppercase;background:#fff;display:flex} .quick-key-tab .mat-mdc-tab-labels .mat-mdc-tab .mdc-tab__content{white-space:normal!important;align-self:center;font-size:.875rem!important} .quick-key-tab .mat-mdc-tab-labels .mdc-tab--active{background:linear-gradient(to bottom,#fff,#eee);border-radius:6px;border:.5px solid #dadada} .quick-key-tab .mat-mdc-tab-labels .mdc-tab--active .mdc-tab__text-label{color:gray!important;font-weight:700} .quick-key-tab .mat-mdc-tab-labels .mat-mdc-tab:nth-child(n+5){flex-grow:0!important} .quick-key-tab .tabItems{padding:0} .quick-key-tab .tabItems .column{margin-top:15px;margin-bottom:10px;word-break:break-all} .quick-key-tab .tabItems .column>div{border:solid 1px #cfcfcf} .quick-key-tab .tabItems .column>a{text-align:center;display:block;cursor:pointer} .quick-key-tab .tabItems .column>a div.img-box{display:block;margin:0 auto;border-top-left-radius:5px;border-bottom-right-radius:5px;border:solid 1px #dddddd} .quick-key-tab .tabItems .column>a .full-screen-image{position:absolute;object-fit:contain} .quick-key-tab .tabItems .column>a p{display:block;margin:0 auto;background-color:#a6a6a6;border:solid 1px #999999;border-top-left-radius:5px;border-bottom-right-radius:5px;color:#fff} .quick-key-tab .tabItems .column>a small{font-size:11px;display:block;margin:5px 0 0} .quick-key-tab .tabItems .column .ion-icon{font-size:75px;margin:10px} .quick-key-tab .col-md-3.column.add{cursor:pointer} .quick-key-tab .col-md-3.column.add i{margin-top:10px} .quick-key-tab ::-webkit-scrollbar{width:3px} .quick-key-tab ::-webkit-scrollbar-track{box-shadow:inset 0 0 5px #bfd2da} .quick-key-tab ::-webkit-scrollbar-thumb{background:#c4c4c4;border-radius:10px} .quick-key-tab .subquicKey{background:linear-gradient(to bottom,#fff,#eee);color:gray;border-radius:6px} .quick-key-tab .no-quick-key{background-image:url(//res.cloudinary.com/pos/image/upload/w_500/POS/Images/Cashier/no-quick-key.png)!important;background-repeat:no-repeat;height:calc(100vh - 70px);background-size:contain}a#LinkConfigureQuickkey[_ngcontent-%COMP%]{background-color:#479ccf;padding:15px 25px;color:#fff;text-decoration:none;width:240px;display:block;opacity:.85;border-radius:6px}a#LinkConfigureQuickkey[_ngcontent-%COMP%]{position:absolute;top:200px;left:calc(50% - 120px)}a#LinkConfigureQuickkey[_ngcontent-%COMP%]:hover{opacity:.95}a#LinkConfigureQuickkey[_ngcontent-%COMP%] Strong[_ngcontent-%COMP%]{border-bottom:1px solid white;font-size:14px;margin:0 0 10px;padding:0 0 3px;display:block}a#LinkConfigureQuickkey[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{display:inline-block;height:35px;margin:0 10px 0 0;font-size:28px}a#LinkConfigureQuickkey[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:inline-block;font-size:14px;width:135px;vertical-align:top}"]})};var at=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=y({type:t,selectors:[["","cdkMenuGroup",""]],hostAttrs:["role","group",1,"cdk-menu-group"],exportAs:["cdkMenuGroup"],standalone:!0,features:[I([{provide:me,useClass:me}])]})}}return t})(),be=new x("cdk-menu"),M=function(t){return t[t.nextItem=0]="nextItem",t[t.previousItem=1]="previousItem",t[t.currentItem=2]="currentItem",t}(M||{}),f=new x("cdk-menu-stack"),wt={provide:f,deps:[[new ie,new ne,new te(f)]],useFactory:t=>t||new Me},Dt=t=>({provide:f,deps:[[new ie,new ne,new te(f)]],useFactory:s=>s||Me.inline(t)}),Ft=0,Me=(()=>{class t{constructor(){this.id=`${Ft++}`,this._elements=[],this._close=new k,this._empty=new k,this._hasFocus=new k,this.closed=this._close,this.hasFocus=this._hasFocus.pipe(O(!1),xe(0),Te()),this.emptied=this._empty,this._inlineMenuOrientation=null}static inline(e){let i=new t;return i._inlineMenuOrientation=e,i}push(e){this._elements.push(e)}close(e,i){let{focusNextOnEmpty:n,focusParentTrigger:o}=C({},i);if(this._elements.indexOf(e)>=0){let a;do a=this._elements.pop(),this._close.next({item:a,focusParentTrigger:o});while(a!==e);this.isEmpty()&&this._empty.next(n)}}closeSubMenuOf(e){let i=!1;if(this._elements.indexOf(e)>=0)for(i=this.peek()!==e;this.peek()!==e;)this._close.next({item:this._elements.pop()});return i}closeAll(e){let{focusNextOnEmpty:i,focusParentTrigger:n}=C({},e);if(!this.isEmpty()){for(;!this.isEmpty();){let o=this._elements.pop();o&&this._close.next({item:o,focusParentTrigger:n})}this._empty.next(i)}}isEmpty(){return!this._elements.length}length(){return this._elements.length}peek(){return this._elements[this._elements.length-1]}hasInlineMenu(){return this._inlineMenuOrientation!=null}inlineMenuOrientation(){return this._inlineMenuOrientation}setHasFocus(e){this._hasFocus.next(e)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=ee({token:t,factory:t.\u0275fac})}}return t})(),Z=new x("cdk-menu-trigger"),Pt=new x("cdk-menu-scroll-strategy",{providedIn:"root",factory:()=>{let t=r(G);return()=>t.scrollStrategies.reposition()}}),ct=(()=>{class t{constructor(){this.injector=r(se),this.viewContainerRef=r(Re),this.menuStack=r(f),this.menuScrollStrategy=r(Pt),this.opened=new v,this.closed=new v,this.overlayRef=null,this.destroyed=new k,this.stopOutsideClicksListener=L(this.closed,this.destroyed)}ngOnDestroy(){this._destroyOverlay(),this.destroyed.next(),this.destroyed.complete()}isOpen(){return!!this.overlayRef?.hasAttached()}registerChildMenu(e){this.childMenu=e}getMenuContentPortal(){let e=this.menuTemplateRef!==this._menuPortal?.templateRef;return this.menuTemplateRef&&(!this._menuPortal||e)&&(this._menuPortal=new Ze(this.menuTemplateRef,this.viewContainerRef,this.menuData,this._getChildMenuInjector())),this._menuPortal}isElementInsideMenuStack(e){for(let i=e;i;i=i?.parentElement??null)if(i.getAttribute("data-cdk-menu-stack-id")===this.menuStack.id)return!0;return!1}_destroyOverlay(){this.overlayRef&&(this.overlayRef.dispose(),this.overlayRef=null)}_getChildMenuInjector(){return this._childMenuInjector=this._childMenuInjector||se.create({providers:[{provide:Z,useValue:this},{provide:f,useValue:this.menuStack}],parent:this.injector}),this._childMenuInjector}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=y({type:t,hostVars:2,hostBindings:function(i,n){i&2&&T("aria-controls",n.childMenu==null?null:n.childMenu.id)("data-cdk-menu-stack-id",n.menuStack.id)},standalone:!0})}}return t})();var ve=new x("cdk-menu-aim");function ut(t,s){if(!s.isTrusted)return!1;let e=t.nativeElement,i=s.keyCode;return e.nodeName==="BUTTON"&&!e.disabled?i===13||i===32:e.nodeName==="A"?i===13:!1}var Rt=(()=>{class t extends ct{constructor(){super(),this._elementRef=r(z),this._overlay=r(G),this._ngZone=r(V),this._changeDetectorRef=r(le),this._inputModalityDetector=r(pe),this._directionality=r(q,{optional:!0}),this._parentMenu=r(be,{optional:!0}),this._menuAim=r(ve,{optional:!0}),this._setRole(),this._registerCloseHandler(),this._subscribeToMenuStackClosed(),this._subscribeToMouseEnter(),this._subscribeToMenuStackHasFocus(),this._setType()}toggle(){this.isOpen()?this.close():this.open()}open(){!this.isOpen()&&this.menuTemplateRef!=null&&(this.opened.next(),this.overlayRef=this.overlayRef||this._overlay.create(this._getOverlayConfig()),this.overlayRef.attach(this.getMenuContentPortal()),this._changeDetectorRef.markForCheck(),this._subscribeToOutsideClicks())}close(){this.isOpen()&&(this.closed.next(),this.overlayRef.detach(),this._changeDetectorRef.markForCheck()),this._closeSiblingTriggers()}getMenu(){return this.childMenu}_toggleOnKeydown(e){let i=this._parentMenu?.orientation==="vertical";switch(e.keyCode){case 32:case 13:!g(e)&&!ut(this._elementRef,e)&&(this.toggle(),this.childMenu?.focusFirstItem("keyboard"));break;case 39:g(e)||this._parentMenu&&i&&this._directionality?.value!=="rtl"&&(e.preventDefault(),this.open(),this.childMenu?.focusFirstItem("keyboard"));break;case 37:g(e)||this._parentMenu&&i&&this._directionality?.value==="rtl"&&(e.preventDefault(),this.open(),this.childMenu?.focusFirstItem("keyboard"));break;case 40:case 38:g(e)||i||(e.preventDefault(),this.open(),e.keyCode===40?this.childMenu?.focusFirstItem("keyboard"):this.childMenu?.focusLastItem("keyboard"));break}}_handleClick(){this.toggle(),this.childMenu?.focusFirstItem("mouse")}_setHasFocus(e){this._parentMenu||this.menuStack.setHasFocus(e)}_subscribeToMouseEnter(){this._ngZone.runOutsideAngular(()=>{E(this._elementRef.nativeElement,"mouseenter").pipe(J(()=>this._inputModalityDetector.mostRecentModality!=="touch"&&!this.menuStack.isEmpty()&&!this.isOpen()),h(this.destroyed)).subscribe(()=>{let e=()=>this._ngZone.run(()=>{this._closeSiblingTriggers(),this.open()});this._menuAim?this._menuAim.toggle(e):e()})})}_closeSiblingTriggers(){this._parentMenu?!this.menuStack.closeSubMenuOf(this._parentMenu)&&this.menuStack.peek()!==this._parentMenu&&this.menuStack.closeAll():this.menuStack.closeAll()}_getOverlayConfig(){return new ge({positionStrategy:this._getOverlayPositionStrategy(),scrollStrategy:this.menuScrollStrategy(),direction:this._directionality||void 0})}_getOverlayPositionStrategy(){return this._overlay.position().flexibleConnectedTo(this._elementRef).withLockedPosition().withGrowAfterOpen().withPositions(this._getOverlayPositions())}_getOverlayPositions(){return this.menuPosition??(!this._parentMenu||this._parentMenu.orientation==="horizontal"?_e:Xe)}_registerCloseHandler(){this._parentMenu||this.menuStack.closed.pipe(h(this.destroyed)).subscribe(({item:e})=>{e===this.childMenu&&this.close()})}_subscribeToOutsideClicks(){this.overlayRef&&this.overlayRef.outsidePointerEvents().pipe(h(this.stopOutsideClicksListener)).subscribe(e=>{let i=he(e),n=this._elementRef.nativeElement;i!==n&&!n.contains(i)&&(this.isElementInsideMenuStack(i)?this._closeSiblingTriggers():this.menuStack.closeAll())})}_subscribeToMenuStackHasFocus(){this._parentMenu||this.menuStack.hasFocus.pipe(h(this.destroyed)).subscribe(e=>{e||this.menuStack.closeAll()})}_subscribeToMenuStackClosed(){this._parentMenu||this.menuStack.closed.subscribe(({focusParentTrigger:e})=>{e&&!this.menuStack.length()&&this._elementRef.nativeElement.focus()})}_setRole(){this._parentMenu||this._elementRef.nativeElement.setAttribute("role","button")}_setType(){let e=this._elementRef.nativeElement;e.nodeName==="BUTTON"&&!e.getAttribute("type")&&e.setAttribute("type","button")}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=y({type:t,selectors:[["","cdkMenuTriggerFor",""]],hostAttrs:[1,"cdk-menu-trigger"],hostVars:2,hostBindings:function(i,n){i&1&&m("focusin",function(){return n._setHasFocus(!0)})("focusout",function(){return n._setHasFocus(!1)})("keydown",function(a){return n._toggleOnKeydown(a)})("click",function(){return n._handleClick()}),i&2&&T("aria-haspopup",n.menuTemplateRef?"menu":null)("aria-expanded",n.menuTemplateRef==null?null:n.isOpen())},inputs:{menuTemplateRef:[0,"cdkMenuTriggerFor","menuTemplateRef"],menuPosition:[0,"cdkMenuPosition","menuPosition"],menuData:[0,"cdkMenuTriggerData","menuData"]},outputs:{opened:"cdkMenuOpened",closed:"cdkMenuClosed"},exportAs:["cdkMenuTriggerFor"],standalone:!0,features:[I([{provide:Z,useExisting:t},wt]),F]})}}return t})(),At=(()=>{class t{get hasMenu(){return this._menuTrigger?.menuTemplateRef!=null}constructor(){this._dir=r(q,{optional:!0}),this._elementRef=r(z),this._ngZone=r(V),this._inputModalityDetector=r(pe),this._menuAim=r(ve,{optional:!0}),this._menuStack=r(f),this._parentMenu=r(be,{optional:!0}),this._menuTrigger=r(Rt,{optional:!0,self:!0}),this.disabled=!1,this.triggered=new v,this._tabindex=-1,this.closeOnSpacebarTrigger=!0,this.destroyed=new k,this._setupMouseEnter(),this._setType(),this._isStandaloneItem()&&(this._tabindex=0)}ngOnDestroy(){this.destroyed.next(),this.destroyed.complete()}focus(){this._elementRef.nativeElement.focus()}trigger(e){let{keepOpen:i}=C({},e);!this.disabled&&!this.hasMenu&&(this.triggered.next(),i||this._menuStack.closeAll({focusParentTrigger:!0}))}isMenuOpen(){return!!this._menuTrigger?.isOpen()}getMenu(){return this._menuTrigger?.getMenu()}getMenuTrigger(){return this._menuTrigger}getLabel(){return this.typeaheadLabel||this._elementRef.nativeElement.textContent?.trim()||""}_resetTabIndex(){this._isStandaloneItem()||(this._tabindex=-1)}_setTabIndex(e){this.disabled||(!e||!this._menuStack.isEmpty())&&(this._tabindex=0)}_onKeydown(e){switch(e.keyCode){case 32:case 13:!g(e)&&!ut(this._elementRef,e)&&this.trigger({keepOpen:e.keyCode===32&&!this.closeOnSpacebarTrigger});break;case 39:g(e)||this._parentMenu&&this._isParentVertical()&&(this._dir?.value!=="rtl"?this._forwardArrowPressed(e):this._backArrowPressed(e));break;case 37:g(e)||this._parentMenu&&this._isParentVertical()&&(this._dir?.value!=="rtl"?this._backArrowPressed(e):this._forwardArrowPressed(e));break}}_isStandaloneItem(){return!this._parentMenu}_backArrowPressed(e){let i=this._parentMenu;(this._menuStack.hasInlineMenu()||this._menuStack.length()>1)&&(e.preventDefault(),this._menuStack.close(i,{focusNextOnEmpty:this._menuStack.inlineMenuOrientation()==="horizontal"?M.previousItem:M.currentItem,focusParentTrigger:!0}))}_forwardArrowPressed(e){!this.hasMenu&&this._menuStack.inlineMenuOrientation()==="horizontal"&&(e.preventDefault(),this._menuStack.closeAll({focusNextOnEmpty:M.nextItem,focusParentTrigger:!0}))}_setupMouseEnter(){if(!this._isStandaloneItem()){let e=()=>this._ngZone.run(()=>this._menuStack.closeSubMenuOf(this._parentMenu));this._ngZone.runOutsideAngular(()=>E(this._elementRef.nativeElement,"mouseenter").pipe(J(()=>this._inputModalityDetector.mostRecentModality!=="touch"&&!this._menuStack.isEmpty()&&!this.hasMenu),h(this.destroyed)).subscribe(()=>{this._menuAim?this._menuAim.toggle(e):e()}))}}_isParentVertical(){return this._parentMenu?.orientation==="vertical"}_setType(){let e=this._elementRef.nativeElement;e.nodeName==="BUTTON"&&!e.getAttribute("type")&&e.setAttribute("type","button")}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=y({type:t,selectors:[["","cdkMenuItem",""]],hostAttrs:["role","menuitem",1,"cdk-menu-item"],hostVars:2,hostBindings:function(i,n){i&1&&m("blur",function(){return n._resetTabIndex()})("focus",function(){return n._setTabIndex()})("click",function(){return n.trigger()})("keydown",function(a){return n._onKeydown(a)}),i&2&&(ae("tabindex",n._tabindex),T("aria-disabled",n.disabled||null))},inputs:{disabled:[2,"cdkMenuItemDisabled","disabled",de],typeaheadLabel:[0,"cdkMenuitemTypeaheadLabel","typeaheadLabel"]},outputs:{triggered:"cdkMenuItemTriggered"},exportAs:["cdkMenuItem"],standalone:!0,features:[oe]})}}return t})(),fe=class{constructor(s){this._items=s,this.entered=this._getItemPointerEntries(),this.exited=this._getItemPointerExits(),this._destroyed=new k,this.entered.subscribe(e=>this.activeElement=e),this.exited.subscribe(()=>{this.previousElement=this.activeElement,this.activeElement=void 0})}destroy(){this._destroyed.next(),this._destroyed.complete()}_getItemPointerEntries(){return X(()=>this._items.changes.pipe(O(this._items),Q(s=>s.map(e=>E(e._elementRef.nativeElement,"mouseenter").pipe(U(e),h(this._items.changes)))),N()))}_getItemPointerExits(){return X(()=>this._items.changes.pipe(O(this._items),Q(s=>s.map(e=>E(e._elementRef.nativeElement,"mouseout").pipe(U(e),h(this._items.changes)))),N()))}},Kt=0,Bt=(()=>{class t extends at{constructor(){super(...arguments),this.nativeElement=r(z).nativeElement,this.ngZone=r(V),this.menuStack=r(f),this.menuAim=r(ve,{optional:!0,self:!0}),this.dir=r(q,{optional:!0}),this.id=`cdk-menu-${Kt++}`,this.orientation="vertical",this.isInline=!1,this.destroyed=new k,this._menuStackHasFocus=Ae(!1),this._tabIndexSignal=Le(()=>{let e=this._menuStackHasFocus()?-1:0;return this.isInline?e:null})}ngAfterContentInit(){this.isInline||this.menuStack.push(this),this._setKeyManager(),this._subscribeToMenuStackHasFocus(),this._subscribeToMenuOpen(),this._subscribeToMenuStackClosed(),this._setUpPointerTracker()}ngOnDestroy(){this.keyManager?.destroy(),this.destroyed.next(),this.destroyed.complete(),this.pointerTracker?.destroy()}focusFirstItem(e="program"){this.keyManager.setFocusOrigin(e),this.keyManager.setFirstItemActive()}focusLastItem(e="program"){this.keyManager.setFocusOrigin(e),this.keyManager.setLastItemActive()}_getTabIndex(){return this._tabIndexSignal()}closeOpenMenu(e,i){let{focusParentTrigger:n}=C({},i),o=this.keyManager,a=this.triggerItem;e===a?.getMenuTrigger()?.getMenu()&&(a?.getMenuTrigger()?.close(),n&&(a?o.setActiveItem(a):o.setFirstItemActive()))}_setKeyManager(){this.keyManager=new We(this.items).withWrap().withTypeAhead().withHomeAndEnd(),this.orientation==="horizontal"?this.keyManager.withHorizontalOrientation(this.dir?.value||"ltr"):this.keyManager.withVerticalOrientation()}_subscribeToMenuOpen(){let e=L(this.items.changes,this.destroyed);this.items.changes.pipe(O(this.items),Q(i=>i.filter(n=>n.hasMenu).map(n=>n.getMenuTrigger().opened.pipe(U(n),h(e)))),N(),Oe(i=>(this.triggerItem=i,i.getMenuTrigger().closed)),h(this.destroyed)).subscribe(()=>this.triggerItem=void 0)}_subscribeToMenuStackClosed(){this.menuStack.closed.pipe(h(this.destroyed)).subscribe(({item:e,focusParentTrigger:i})=>this.closeOpenMenu(e,{focusParentTrigger:i}))}_subscribeToMenuStackHasFocus(){this.isInline&&this.menuStack.hasFocus.pipe(h(this.destroyed)).subscribe(e=>{this._menuStackHasFocus.set(e)})}_setUpPointerTracker(){this.menuAim&&(this.ngZone.runOutsideAngular(()=>{this.pointerTracker=new fe(this.items)}),this.menuAim.initialize(this,this.pointerTracker))}static{this.\u0275fac=(()=>{let e;return function(n){return(e||(e=Pe(t)))(n||t)}})()}static{this.\u0275dir=y({type:t,contentQueries:function(i,n,o){if(i&1&&Be(o,At,5),i&2){let a;He(a=qe())&&(n.items=a)}},hostAttrs:["role","menu"],hostVars:4,hostBindings:function(i,n){i&1&&m("focus",function(){return n.focusFirstItem()})("focusin",function(){return n.menuStack.setHasFocus(!0)})("focusout",function(){return n.menuStack.setHasFocus(!1)}),i&2&&(ae("tabindex",n._getTabIndex())("id",n.id),T("aria-orientation",n.orientation)("data-cdk-menu-stack-id",n.menuStack.id))},inputs:{id:"id"},standalone:!0,features:[F]})}}return t})(),fi=(()=>{class t extends Bt{constructor(){super(),this._parentTrigger=r(Z,{optional:!0}),this.closed=new v,this.orientation="vertical",this.isInline=!this._parentTrigger,this.destroyed.subscribe(this.closed),this._parentTrigger?.registerChildMenu(this)}ngAfterContentInit(){super.ngAfterContentInit(),this._subscribeToMenuStackEmptied()}ngOnDestroy(){super.ngOnDestroy(),this.closed.complete()}_handleKeyEvent(e){let i=this.keyManager;switch(e.keyCode){case 37:case 39:g(e)||(e.preventDefault(),i.setFocusOrigin("keyboard"),i.onKeydown(e));break;case 27:g(e)||(e.preventDefault(),this.menuStack.close(this,{focusNextOnEmpty:M.currentItem,focusParentTrigger:!0}));break;case 9:g(e,"altKey","metaKey","ctrlKey")||this.menuStack.closeAll({focusParentTrigger:!0});break;default:i.onKeydown(e)}}_toggleMenuFocus(e){let i=this.keyManager;switch(e){case M.nextItem:i.setFocusOrigin("keyboard"),i.setNextItemActive();break;case M.previousItem:i.setFocusOrigin("keyboard"),i.setPreviousItemActive();break;case M.currentItem:i.activeItem&&(i.setFocusOrigin("keyboard"),i.setActiveItem(i.activeItem));break}}_subscribeToMenuStackEmptied(){this.menuStack.emptied.pipe(h(this.destroyed)).subscribe(e=>this._toggleMenuFocus(e))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=y({type:t,selectors:[["","cdkMenu",""]],hostAttrs:["role","menu",1,"cdk-menu"],hostVars:2,hostBindings:function(i,n){i&1&&m("keydown",function(a){return n._handleKeyEvent(a)}),i&2&&Ke("cdk-menu-inline",n.isInline)},outputs:{closed:"closed"},exportAs:["cdkMenu"],standalone:!0,features:[I([{provide:at,useExisting:t},{provide:be,useExisting:t},Dt("vertical")]),F]})}}return t})();var Ht=_e.map(t=>{let s=t.overlayX==="start"?2:-2,e=t.overlayY==="top"?2:-2;return Ie(C({},t),{offsetX:s,offsetY:e})}),qt=(()=>{class t{update(e){t._openContextMenuTrigger!==e&&(t._openContextMenuTrigger?.close(),t._openContextMenuTrigger=e)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=ee({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})(),ki=(()=>{class t extends ct{constructor(){super(),this._overlay=r(G),this._directionality=r(q,{optional:!0}),this._contextMenuTracker=r(qt),this._changeDetectorRef=r(le),this.disabled=!1,this._setMenuStackCloseListener()}open(e){this._open(null,e),this._changeDetectorRef.markForCheck()}close(){this.menuStack.closeAll()}_openOnContextMenu(e){this.disabled||(e.preventDefault(),e.stopPropagation(),this._contextMenuTracker.update(this),this._open(e,{x:e.clientX,y:e.clientY}),e.button===2?this.childMenu?.focusFirstItem("mouse"):e.button===0?this.childMenu?.focusFirstItem("keyboard"):this.childMenu?.focusFirstItem("program"))}_getOverlayConfig(e){return new ge({positionStrategy:this._getOverlayPositionStrategy(e),scrollStrategy:this.menuScrollStrategy(),direction:this._directionality||void 0})}_getOverlayPositionStrategy(e){return this._overlay.position().flexibleConnectedTo(e).withLockedPosition().withGrowAfterOpen().withPositions(this.menuPosition??Ht)}_setMenuStackCloseListener(){this.menuStack.closed.pipe(h(this.destroyed)).subscribe(({item:e})=>{e===this.childMenu&&this.isOpen()&&(this.closed.next(),this.overlayRef.detach())})}_subscribeToOutsideClicks(e){if(this.overlayRef){let i=this.overlayRef.outsidePointerEvents();if(e){let[n,o]=Ce(i,({type:a})=>a==="auxclick");i=L(o.pipe(Ee((a,lt)=>e.ctrlKey&<===0&&a.ctrlKey)),n.pipe(Se(1)))}i.pipe(h(this.stopOutsideClicksListener)).subscribe(n=>{this.isElementInsideMenuStack(he(n))||this.menuStack.closeAll()})}}_open(e,i){this.disabled||(this.isOpen()?(this.menuStack.closeSubMenuOf(this.childMenu),this.overlayRef.getConfig().positionStrategy.setOrigin(i),this.overlayRef.updatePosition()):(this.opened.next(),this.overlayRef?(this.overlayRef.getConfig().positionStrategy.setOrigin(i),this.overlayRef.updatePosition()):this.overlayRef=this._overlay.create(this._getOverlayConfig(i)),this.overlayRef.attach(this.getMenuContentPortal()),this._subscribeToOutsideClicks(e)))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=y({type:t,selectors:[["","cdkContextMenuTriggerFor",""]],hostVars:1,hostBindings:function(i,n){i&1&&m("contextmenu",function(a){return n._openOnContextMenu(a)}),i&2&&T("data-cdk-menu-stack-id",null)},inputs:{menuTemplateRef:[0,"cdkContextMenuTriggerFor","menuTemplateRef"],menuPosition:[0,"cdkContextMenuPosition","menuPosition"],menuData:[0,"cdkContextMenuTriggerData","menuData"],disabled:[2,"cdkContextMenuDisabled","disabled",de]},outputs:{opened:"cdkContextMenuOpened",closed:"cdkContextMenuClosed"},exportAs:["cdkContextMenuTriggerFor"],standalone:!0,features:[I([{provide:Z,useExisting:t},{provide:f,useClass:Me}]),oe,F]})}}return t})();var yi=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275mod=Fe({type:t})}static{this.\u0275inj=we({imports:[Je]})}}return t})();export{st as a,At as b,fi as c,ki as d,yi as e};
|
|
1
|
+
import{b as et,c as tt,d as it}from"./chunk-GJKMRESM.js";import{T as nt}from"./chunk-UVB2YZEK.js";import{A as pe,F as q,I as me,P as Ze,V as ge,Z as _e,_ as Xe,aa as G,da as Je,f as g,l as he,u as We}from"./chunk-V34SAX5L.js";import{a as $e}from"./chunk-DKFSWJLD.js";import{$ as h,$a as Ae,Aa as se,Ac as le,B as L,Bb as P,Bc as de,C as J,Ca as v,Cb as ae,D as Ce,Da as V,Dc as Le,Eb as m,Ga as z,Gb as d,J as xe,Kd as Ye,L as U,Md as Ge,N as Te,Nb as Be,Nc as Ue,Oa as re,Oc as Ve,Pb as He,Qb as qe,Sa as u,Ub as R,V as Se,Vb as b,W as Ee,Wb as A,X as O,Xb as Qe,Y as Oe,Za as Re,Zc as ze,_c as je,c as k,cb as F,cc as I,db as oe,dc as Ne,eb as _,ec as ce,fa as ee,fc as ue,ga as we,ha as x,hb as T,ib as l,ja as r,ka as te,kb as Ke,la as ie,ma as ne,na as De,nc as K,oa as Fe,pa as y,qc as B,t as Q,tc as H,u as N,ua as w,va as D,vb as c,w as X,wb as p,xb as S,y as E,ya as Pe,yb as j,zb as Y}from"./chunk-6LBESDNN.js";import{a as C,b as Ie}from"./chunk-LHUGHE24.js";var rt=()=>["/menu/Outlets/Master/Quick_Key_Templates/Form"],ht=t=>({ID:t}),pt=t=>({OutletID:t});function mt(t,s){if(t&1&&S(0,"img",23),t&2){let e=d(2).$implicit;l("src",e.ImageURLClient,re)}}function gt(t,s){if(t&1&&(j(0),c(1,"div",20)(2,"div",21),_(3,mt,1,1,"img",22),p()(),Y()),t&2){let e=d().$implicit;u(3),l("ngIf",e.ImageURLClient)}}function _t(t,s){if(t&1&&(c(0,"div",21)(1,"p",24)(2,"span"),b(3),K(4,"slice"),p()()()),t&2){let e=d().$implicit;u(3),A(B(4,1,e.Display,0,3))}}function ft(t,s){if(t&1){let e=P();c(0,"div",18)(1,"a",19),m("click",function(){let n=w(e).$implicit,o=d(4);return D(o.onSelectQuickKeyItem(n))}),_(2,gt,4,1,"ng-container",7)(3,_t,5,5,"ng-template",null,2,H),c(5,"small"),b(6),K(7,"slice"),p()()()}if(t&2){let e=s.$implicit,i=R(4);u(2),l("ngIf",e.ImageURLClient)("ngIfElse",i),u(4),A(B(7,3,e.Display,0,36))}}function kt(t,s){if(t&1&&(c(0,"mat-tab",11)(1,"div",12)(2,"div",13),_(3,ft,8,7,"div",14),c(4,"div",15)(5,"a",16),S(6,"i",17),p()()()()()),t&2){let e=s.$implicit,i=d(3);l("label",e.Name),u(3),l("ngForOf",e==null?null:e.Items),u(2),l("routerLink",ce(4,rt))("queryParams",ue(5,ht,i.quickKey.ID))}}function yt(t,s){if(t&1){let e=P();c(0,"mat-tab-group",9),m("selectedIndexChange",function(n){w(e);let o=d(2);return D(o.onChangeTab(n))}),_(1,kt,7,7,"mat-tab",10),p()}if(t&2){let e=d(2);l("disableRipple",!0)("selectedIndex",e.selectedTabIndex),u(),l("ngForOf",e.quickKey==null?null:e.quickKey.Groups)}}function bt(t,s){if(t&1&&S(0,"img",23),t&2){let e=d(2).$implicit;l("src",e.ImageURLClient,re)}}function Mt(t,s){if(t&1&&(j(0),c(1,"div",20)(2,"div",21),_(3,bt,1,1,"img",22),p()(),Y()),t&2){let e=d().$implicit;u(3),l("ngIf",e.ImageURLClient)}}function vt(t,s){if(t&1&&(c(0,"div",21)(1,"p",24)(2,"span"),b(3),K(4,"slice"),p()()()),t&2){let e=d().$implicit;u(3),A(B(4,1,e.Model,0,3))}}function It(t,s){if(t&1){let e=P();c(0,"div",18)(1,"a",19),m("click",function(){let n=w(e).$implicit,o=d(3);return D(o.onSelectVariant(n.ID))}),_(2,Mt,4,1,"ng-container",7)(3,vt,5,5,"ng-template",null,3,H),c(5,"small"),b(6),K(7,"slice"),p()()()}if(t&2){let e=s.$implicit,i=R(4);u(2),l("ngIf",e.ImageURLClient)("ngIfElse",i),u(4),A(B(7,3,e.Model,0,30))}}function Ct(t,s){if(t&1){let e=P();c(0,"div",25)(1,"div",26),m("click",function(){w(e);let n=d(2);return D(n.quickKeyState="QUICKKEY")}),S(2,"i",27),p(),c(3,"div",28)(4,"b"),b(5),p()()(),c(6,"div",12)(7,"div",13),_(8,It,8,7,"div",14),p()()}if(t&2){let e=d(2);u(5),Qe(" ",e.subQuickKeyPack.Display,""),u(3),l("ngForOf",e.subQuickKeyPack==null?null:e.subQuickKeyPack.Children)}}function xt(t,s){if(t&1&&(j(0),_(1,yt,2,3,"mat-tab-group",8)(2,Ct,9,2,"ng-template",null,1,H),Y()),t&2){let e=R(3),i=d();u(),l("ngIf",i.quickKeyState=="QUICKKEY")("ngIfElse",e)}}function Tt(t,s){if(t&1&&(c(0,"div",29)(1,"a",30)(2,"strong"),b(3,"QUICK KEYS UNCONFIGURED"),p(),S(4,"i",31),c(5,"span"),b(6,"Click here to setup your Quick keys"),p()()()),t&2){let e=d();u(),l("routerLink",ce(2,rt))("queryParams",ue(3,pt,e.outletID))}}var st=class t{quickKey;get outletID(){return this._outletID}set outletID(s){this._outletID=s,this._outletID&&(this.quickKeyState="QUICKKEY")}_outletID="";_onSelectVariant=new v;quickKeyState="QUICKKEY";subQuickKeyPack;selectedTabIndex=0;disabled=!1;onChange=s=>{};onTouched=()=>{};writeValue(s){}registerOnChange(s){this.onChange=s}registerOnTouched(s){this.onTouched=s}setDisabledState(s){this.disabled=s}onSelectQuickKeyItem(s){s.Children?s.Children.length==1?this.onSelectVariant(s.Children[0].ID):(this.quickKeyState="SUBQUICKKEY",this.subQuickKeyPack={Children:s.Children,Display:s.Display}):this.onSelectVariant(s.ItemID)}onSelectVariant(s){this.quickKeyState="QUICKKEY",this._onSelectVariant.emit(s),this.onChange(s)}onChangeTab(s){this.selectedTabIndex=s}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=De({type:t,selectors:[["POS-quick-key"]],inputs:{quickKey:"quickKey",outletID:"outletID"},outputs:{_onSelectVariant:"onSelectVariant"},standalone:!0,features:[I([{provide:$e,multi:!0,useExisting:t}]),Ne],decls:6,vars:2,consts:[["noQuickKey",""],["SUBQUICKEY",""],["BLANK_IMG",""],["BLANK_IMG_SUB",""],[1,"row","h-100"],[1,"col-12"],[1,"quick-key-tab","h-100","pt-4"],[4,"ngIf","ngIfElse"],["class","h-100 bgQuickkeyIllustration landscape",3,"disableRipple","selectedIndex","selectedIndexChange",4,"ngIf","ngIfElse"],[1,"h-100","bgQuickkeyIllustration","landscape",3,"selectedIndexChange","disableRipple","selectedIndex"],[3,"label",4,"ngFor","ngForOf"],[3,"label"],[1,"container","tabItems"],[1,"row","g-0"],["class","col-3 column px-6",4,"ngFor","ngForOf"],[1,"col-3","column","px-8","add","pt-8"],[3,"routerLink","queryParams"],["aria-hidden","true",1,"fa","fa-plus-circle","fa-5x","d-flex","align-items-center","justify-content-center","bg-white","h-100","text-primary"],[1,"col-3","column","px-6"],[3,"click"],[1,"img-box","d-flex","align-items-center"],[1,"ratio","ratio-1x1"],["class","full-screen-image",3,"src",4,"ngIf"],[1,"full-screen-image",3,"src"],[1,"fw-normal","fs-1","d-flex","align-items-center","justify-content-center"],[1,"row","g-0","border","align-items-center","subquicKey"],[1,"col-auto","border-end","py-5","px-7","cursor-pointer",3,"click"],["aria-hidden","true",1,"fa","fa-arrow-left"],[1,"col","text-center","fw-bold","text-uppercase","fs-5"],[1,"no-quick-key"],["id","LinkConfigureQuickkey","target","_blank",3,"routerLink","queryParams"],["aria-hidden","true",1,"fa-regular","fa-hand-pointer"]],template:function(e,i){if(e&1&&(c(0,"div",4)(1,"div",5)(2,"section",6),_(3,xt,4,2,"ng-container",7)(4,Tt,7,5,"ng-template",null,0,H),p()()()),e&2){let n=R(5);u(3),l("ngIf",i.quickKey&&i.quickKey.Groups)("ngIfElse",n)}},dependencies:[je,Ue,Ve,ze,Ge,Ye,nt,it,et,tt],styles:[".quick-key-tab{width:100%;position:relative;height:100%;max-height:calc(100vh - 60px)} .quick-key-tab .mat-mdc-tab-header-pagination{display:none!important} .quick-key-tab .mat-mdc-tab-header{border:none} .quick-key-tab .mdc-tab-indicator{display:none!important} .quick-key-tab .mat-mdc-tab-body-wrapper{width:102%} .quick-key-tab .mat-mdc-tab-labels{border-bottom:0px;display:flex;flex-wrap:wrap;border-radius:6px} .quick-key-tab .mat-mdc-tab-labels .mat-mdc-tab{color:#151515;opacity:1;height:38px;max-height:40px;white-space:normal!important;overflow:hidden;padding:0!important;min-width:25%!important;flex-basis:0;font-size:12px;font-weight:700;outline:none;text-transform:uppercase;background:#fff;display:flex} .quick-key-tab .mat-mdc-tab-labels .mat-mdc-tab .mdc-tab__content{white-space:normal!important;align-self:center;font-size:.875rem!important} .quick-key-tab .mat-mdc-tab-labels .mdc-tab--active{background:linear-gradient(to bottom,#fff,#eee);border-radius:6px;border:.5px solid #dadada} .quick-key-tab .mat-mdc-tab-labels .mdc-tab--active .mdc-tab__text-label{color:gray!important;font-weight:700} .quick-key-tab .mat-mdc-tab-labels .mat-mdc-tab:nth-child(n+5){flex-grow:0!important} .quick-key-tab .tabItems{padding:0} .quick-key-tab .tabItems .column{margin-top:15px;margin-bottom:10px;word-break:break-all} .quick-key-tab .tabItems .column>div{border:solid 1px #cfcfcf} .quick-key-tab .tabItems .column>a{text-align:center;display:block;cursor:pointer} .quick-key-tab .tabItems .column>a div.img-box{display:block;margin:0 auto;border-top-left-radius:5px;border-bottom-right-radius:5px;border:solid 1px #dddddd} .quick-key-tab .tabItems .column>a .full-screen-image{position:absolute;object-fit:contain} .quick-key-tab .tabItems .column>a p{display:block;margin:0 auto;background-color:#a6a6a6;border:solid 1px #999999;border-top-left-radius:5px;border-bottom-right-radius:5px;color:#fff} .quick-key-tab .tabItems .column>a small{font-size:11px;display:block;margin:5px 0 0} .quick-key-tab .tabItems .column .ion-icon{font-size:75px;margin:10px} .quick-key-tab .col-md-3.column.add{cursor:pointer} .quick-key-tab .col-md-3.column.add i{margin-top:10px} .quick-key-tab ::-webkit-scrollbar{width:3px} .quick-key-tab ::-webkit-scrollbar-track{box-shadow:inset 0 0 5px #bfd2da} .quick-key-tab ::-webkit-scrollbar-thumb{background:#c4c4c4;border-radius:10px} .quick-key-tab .subquicKey{background:linear-gradient(to bottom,#fff,#eee);color:gray;border-radius:6px} .quick-key-tab .no-quick-key{background-image:url(//res.cloudinary.com/pos/image/upload/w_500/POS/Images/Cashier/no-quick-key.png)!important;background-repeat:no-repeat;height:calc(100vh - 70px);background-size:contain}a#LinkConfigureQuickkey[_ngcontent-%COMP%]{background-color:#479ccf;padding:15px 25px;color:#fff;text-decoration:none;width:240px;display:block;opacity:.85;border-radius:6px}a#LinkConfigureQuickkey[_ngcontent-%COMP%]{position:absolute;top:200px;left:calc(50% - 120px)}a#LinkConfigureQuickkey[_ngcontent-%COMP%]:hover{opacity:.95}a#LinkConfigureQuickkey[_ngcontent-%COMP%] Strong[_ngcontent-%COMP%]{border-bottom:1px solid white;font-size:14px;margin:0 0 10px;padding:0 0 3px;display:block}a#LinkConfigureQuickkey[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{display:inline-block;height:35px;margin:0 10px 0 0;font-size:28px}a#LinkConfigureQuickkey[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:inline-block;font-size:14px;width:135px;vertical-align:top}"]})};var at=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=y({type:t,selectors:[["","cdkMenuGroup",""]],hostAttrs:["role","group",1,"cdk-menu-group"],exportAs:["cdkMenuGroup"],standalone:!0,features:[I([{provide:me,useClass:me}])]})}}return t})(),be=new x("cdk-menu"),M=function(t){return t[t.nextItem=0]="nextItem",t[t.previousItem=1]="previousItem",t[t.currentItem=2]="currentItem",t}(M||{}),f=new x("cdk-menu-stack"),wt={provide:f,deps:[[new ie,new ne,new te(f)]],useFactory:t=>t||new Me},Dt=t=>({provide:f,deps:[[new ie,new ne,new te(f)]],useFactory:s=>s||Me.inline(t)}),Ft=0,Me=(()=>{class t{constructor(){this.id=`${Ft++}`,this._elements=[],this._close=new k,this._empty=new k,this._hasFocus=new k,this.closed=this._close,this.hasFocus=this._hasFocus.pipe(O(!1),xe(0),Te()),this.emptied=this._empty,this._inlineMenuOrientation=null}static inline(e){let i=new t;return i._inlineMenuOrientation=e,i}push(e){this._elements.push(e)}close(e,i){let{focusNextOnEmpty:n,focusParentTrigger:o}=C({},i);if(this._elements.indexOf(e)>=0){let a;do a=this._elements.pop(),this._close.next({item:a,focusParentTrigger:o});while(a!==e);this.isEmpty()&&this._empty.next(n)}}closeSubMenuOf(e){let i=!1;if(this._elements.indexOf(e)>=0)for(i=this.peek()!==e;this.peek()!==e;)this._close.next({item:this._elements.pop()});return i}closeAll(e){let{focusNextOnEmpty:i,focusParentTrigger:n}=C({},e);if(!this.isEmpty()){for(;!this.isEmpty();){let o=this._elements.pop();o&&this._close.next({item:o,focusParentTrigger:n})}this._empty.next(i)}}isEmpty(){return!this._elements.length}length(){return this._elements.length}peek(){return this._elements[this._elements.length-1]}hasInlineMenu(){return this._inlineMenuOrientation!=null}inlineMenuOrientation(){return this._inlineMenuOrientation}setHasFocus(e){this._hasFocus.next(e)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=ee({token:t,factory:t.\u0275fac})}}return t})(),Z=new x("cdk-menu-trigger"),Pt=new x("cdk-menu-scroll-strategy",{providedIn:"root",factory:()=>{let t=r(G);return()=>t.scrollStrategies.reposition()}}),ct=(()=>{class t{constructor(){this.injector=r(se),this.viewContainerRef=r(Re),this.menuStack=r(f),this.menuScrollStrategy=r(Pt),this.opened=new v,this.closed=new v,this.overlayRef=null,this.destroyed=new k,this.stopOutsideClicksListener=L(this.closed,this.destroyed)}ngOnDestroy(){this._destroyOverlay(),this.destroyed.next(),this.destroyed.complete()}isOpen(){return!!this.overlayRef?.hasAttached()}registerChildMenu(e){this.childMenu=e}getMenuContentPortal(){let e=this.menuTemplateRef!==this._menuPortal?.templateRef;return this.menuTemplateRef&&(!this._menuPortal||e)&&(this._menuPortal=new Ze(this.menuTemplateRef,this.viewContainerRef,this.menuData,this._getChildMenuInjector())),this._menuPortal}isElementInsideMenuStack(e){for(let i=e;i;i=i?.parentElement??null)if(i.getAttribute("data-cdk-menu-stack-id")===this.menuStack.id)return!0;return!1}_destroyOverlay(){this.overlayRef&&(this.overlayRef.dispose(),this.overlayRef=null)}_getChildMenuInjector(){return this._childMenuInjector=this._childMenuInjector||se.create({providers:[{provide:Z,useValue:this},{provide:f,useValue:this.menuStack}],parent:this.injector}),this._childMenuInjector}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=y({type:t,hostVars:2,hostBindings:function(i,n){i&2&&T("aria-controls",n.childMenu==null?null:n.childMenu.id)("data-cdk-menu-stack-id",n.menuStack.id)},standalone:!0})}}return t})();var ve=new x("cdk-menu-aim");function ut(t,s){if(!s.isTrusted)return!1;let e=t.nativeElement,i=s.keyCode;return e.nodeName==="BUTTON"&&!e.disabled?i===13||i===32:e.nodeName==="A"?i===13:!1}var Rt=(()=>{class t extends ct{constructor(){super(),this._elementRef=r(z),this._overlay=r(G),this._ngZone=r(V),this._changeDetectorRef=r(le),this._inputModalityDetector=r(pe),this._directionality=r(q,{optional:!0}),this._parentMenu=r(be,{optional:!0}),this._menuAim=r(ve,{optional:!0}),this._setRole(),this._registerCloseHandler(),this._subscribeToMenuStackClosed(),this._subscribeToMouseEnter(),this._subscribeToMenuStackHasFocus(),this._setType()}toggle(){this.isOpen()?this.close():this.open()}open(){!this.isOpen()&&this.menuTemplateRef!=null&&(this.opened.next(),this.overlayRef=this.overlayRef||this._overlay.create(this._getOverlayConfig()),this.overlayRef.attach(this.getMenuContentPortal()),this._changeDetectorRef.markForCheck(),this._subscribeToOutsideClicks())}close(){this.isOpen()&&(this.closed.next(),this.overlayRef.detach(),this._changeDetectorRef.markForCheck()),this._closeSiblingTriggers()}getMenu(){return this.childMenu}_toggleOnKeydown(e){let i=this._parentMenu?.orientation==="vertical";switch(e.keyCode){case 32:case 13:!g(e)&&!ut(this._elementRef,e)&&(this.toggle(),this.childMenu?.focusFirstItem("keyboard"));break;case 39:g(e)||this._parentMenu&&i&&this._directionality?.value!=="rtl"&&(e.preventDefault(),this.open(),this.childMenu?.focusFirstItem("keyboard"));break;case 37:g(e)||this._parentMenu&&i&&this._directionality?.value==="rtl"&&(e.preventDefault(),this.open(),this.childMenu?.focusFirstItem("keyboard"));break;case 40:case 38:g(e)||i||(e.preventDefault(),this.open(),e.keyCode===40?this.childMenu?.focusFirstItem("keyboard"):this.childMenu?.focusLastItem("keyboard"));break}}_handleClick(){this.toggle(),this.childMenu?.focusFirstItem("mouse")}_setHasFocus(e){this._parentMenu||this.menuStack.setHasFocus(e)}_subscribeToMouseEnter(){this._ngZone.runOutsideAngular(()=>{E(this._elementRef.nativeElement,"mouseenter").pipe(J(()=>this._inputModalityDetector.mostRecentModality!=="touch"&&!this.menuStack.isEmpty()&&!this.isOpen()),h(this.destroyed)).subscribe(()=>{let e=()=>this._ngZone.run(()=>{this._closeSiblingTriggers(),this.open()});this._menuAim?this._menuAim.toggle(e):e()})})}_closeSiblingTriggers(){this._parentMenu?!this.menuStack.closeSubMenuOf(this._parentMenu)&&this.menuStack.peek()!==this._parentMenu&&this.menuStack.closeAll():this.menuStack.closeAll()}_getOverlayConfig(){return new ge({positionStrategy:this._getOverlayPositionStrategy(),scrollStrategy:this.menuScrollStrategy(),direction:this._directionality||void 0})}_getOverlayPositionStrategy(){return this._overlay.position().flexibleConnectedTo(this._elementRef).withLockedPosition().withGrowAfterOpen().withPositions(this._getOverlayPositions())}_getOverlayPositions(){return this.menuPosition??(!this._parentMenu||this._parentMenu.orientation==="horizontal"?_e:Xe)}_registerCloseHandler(){this._parentMenu||this.menuStack.closed.pipe(h(this.destroyed)).subscribe(({item:e})=>{e===this.childMenu&&this.close()})}_subscribeToOutsideClicks(){this.overlayRef&&this.overlayRef.outsidePointerEvents().pipe(h(this.stopOutsideClicksListener)).subscribe(e=>{let i=he(e),n=this._elementRef.nativeElement;i!==n&&!n.contains(i)&&(this.isElementInsideMenuStack(i)?this._closeSiblingTriggers():this.menuStack.closeAll())})}_subscribeToMenuStackHasFocus(){this._parentMenu||this.menuStack.hasFocus.pipe(h(this.destroyed)).subscribe(e=>{e||this.menuStack.closeAll()})}_subscribeToMenuStackClosed(){this._parentMenu||this.menuStack.closed.subscribe(({focusParentTrigger:e})=>{e&&!this.menuStack.length()&&this._elementRef.nativeElement.focus()})}_setRole(){this._parentMenu||this._elementRef.nativeElement.setAttribute("role","button")}_setType(){let e=this._elementRef.nativeElement;e.nodeName==="BUTTON"&&!e.getAttribute("type")&&e.setAttribute("type","button")}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=y({type:t,selectors:[["","cdkMenuTriggerFor",""]],hostAttrs:[1,"cdk-menu-trigger"],hostVars:2,hostBindings:function(i,n){i&1&&m("focusin",function(){return n._setHasFocus(!0)})("focusout",function(){return n._setHasFocus(!1)})("keydown",function(a){return n._toggleOnKeydown(a)})("click",function(){return n._handleClick()}),i&2&&T("aria-haspopup",n.menuTemplateRef?"menu":null)("aria-expanded",n.menuTemplateRef==null?null:n.isOpen())},inputs:{menuTemplateRef:[0,"cdkMenuTriggerFor","menuTemplateRef"],menuPosition:[0,"cdkMenuPosition","menuPosition"],menuData:[0,"cdkMenuTriggerData","menuData"]},outputs:{opened:"cdkMenuOpened",closed:"cdkMenuClosed"},exportAs:["cdkMenuTriggerFor"],standalone:!0,features:[I([{provide:Z,useExisting:t},wt]),F]})}}return t})(),At=(()=>{class t{get hasMenu(){return this._menuTrigger?.menuTemplateRef!=null}constructor(){this._dir=r(q,{optional:!0}),this._elementRef=r(z),this._ngZone=r(V),this._inputModalityDetector=r(pe),this._menuAim=r(ve,{optional:!0}),this._menuStack=r(f),this._parentMenu=r(be,{optional:!0}),this._menuTrigger=r(Rt,{optional:!0,self:!0}),this.disabled=!1,this.triggered=new v,this._tabindex=-1,this.closeOnSpacebarTrigger=!0,this.destroyed=new k,this._setupMouseEnter(),this._setType(),this._isStandaloneItem()&&(this._tabindex=0)}ngOnDestroy(){this.destroyed.next(),this.destroyed.complete()}focus(){this._elementRef.nativeElement.focus()}trigger(e){let{keepOpen:i}=C({},e);!this.disabled&&!this.hasMenu&&(this.triggered.next(),i||this._menuStack.closeAll({focusParentTrigger:!0}))}isMenuOpen(){return!!this._menuTrigger?.isOpen()}getMenu(){return this._menuTrigger?.getMenu()}getMenuTrigger(){return this._menuTrigger}getLabel(){return this.typeaheadLabel||this._elementRef.nativeElement.textContent?.trim()||""}_resetTabIndex(){this._isStandaloneItem()||(this._tabindex=-1)}_setTabIndex(e){this.disabled||(!e||!this._menuStack.isEmpty())&&(this._tabindex=0)}_onKeydown(e){switch(e.keyCode){case 32:case 13:!g(e)&&!ut(this._elementRef,e)&&this.trigger({keepOpen:e.keyCode===32&&!this.closeOnSpacebarTrigger});break;case 39:g(e)||this._parentMenu&&this._isParentVertical()&&(this._dir?.value!=="rtl"?this._forwardArrowPressed(e):this._backArrowPressed(e));break;case 37:g(e)||this._parentMenu&&this._isParentVertical()&&(this._dir?.value!=="rtl"?this._backArrowPressed(e):this._forwardArrowPressed(e));break}}_isStandaloneItem(){return!this._parentMenu}_backArrowPressed(e){let i=this._parentMenu;(this._menuStack.hasInlineMenu()||this._menuStack.length()>1)&&(e.preventDefault(),this._menuStack.close(i,{focusNextOnEmpty:this._menuStack.inlineMenuOrientation()==="horizontal"?M.previousItem:M.currentItem,focusParentTrigger:!0}))}_forwardArrowPressed(e){!this.hasMenu&&this._menuStack.inlineMenuOrientation()==="horizontal"&&(e.preventDefault(),this._menuStack.closeAll({focusNextOnEmpty:M.nextItem,focusParentTrigger:!0}))}_setupMouseEnter(){if(!this._isStandaloneItem()){let e=()=>this._ngZone.run(()=>this._menuStack.closeSubMenuOf(this._parentMenu));this._ngZone.runOutsideAngular(()=>E(this._elementRef.nativeElement,"mouseenter").pipe(J(()=>this._inputModalityDetector.mostRecentModality!=="touch"&&!this._menuStack.isEmpty()&&!this.hasMenu),h(this.destroyed)).subscribe(()=>{this._menuAim?this._menuAim.toggle(e):e()}))}}_isParentVertical(){return this._parentMenu?.orientation==="vertical"}_setType(){let e=this._elementRef.nativeElement;e.nodeName==="BUTTON"&&!e.getAttribute("type")&&e.setAttribute("type","button")}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=y({type:t,selectors:[["","cdkMenuItem",""]],hostAttrs:["role","menuitem",1,"cdk-menu-item"],hostVars:2,hostBindings:function(i,n){i&1&&m("blur",function(){return n._resetTabIndex()})("focus",function(){return n._setTabIndex()})("click",function(){return n.trigger()})("keydown",function(a){return n._onKeydown(a)}),i&2&&(ae("tabindex",n._tabindex),T("aria-disabled",n.disabled||null))},inputs:{disabled:[2,"cdkMenuItemDisabled","disabled",de],typeaheadLabel:[0,"cdkMenuitemTypeaheadLabel","typeaheadLabel"]},outputs:{triggered:"cdkMenuItemTriggered"},exportAs:["cdkMenuItem"],standalone:!0,features:[oe]})}}return t})(),fe=class{constructor(s){this._items=s,this.entered=this._getItemPointerEntries(),this.exited=this._getItemPointerExits(),this._destroyed=new k,this.entered.subscribe(e=>this.activeElement=e),this.exited.subscribe(()=>{this.previousElement=this.activeElement,this.activeElement=void 0})}destroy(){this._destroyed.next(),this._destroyed.complete()}_getItemPointerEntries(){return X(()=>this._items.changes.pipe(O(this._items),Q(s=>s.map(e=>E(e._elementRef.nativeElement,"mouseenter").pipe(U(e),h(this._items.changes)))),N()))}_getItemPointerExits(){return X(()=>this._items.changes.pipe(O(this._items),Q(s=>s.map(e=>E(e._elementRef.nativeElement,"mouseout").pipe(U(e),h(this._items.changes)))),N()))}},Kt=0,Bt=(()=>{class t extends at{constructor(){super(...arguments),this.nativeElement=r(z).nativeElement,this.ngZone=r(V),this.menuStack=r(f),this.menuAim=r(ve,{optional:!0,self:!0}),this.dir=r(q,{optional:!0}),this.id=`cdk-menu-${Kt++}`,this.orientation="vertical",this.isInline=!1,this.destroyed=new k,this._menuStackHasFocus=Ae(!1),this._tabIndexSignal=Le(()=>{let e=this._menuStackHasFocus()?-1:0;return this.isInline?e:null})}ngAfterContentInit(){this.isInline||this.menuStack.push(this),this._setKeyManager(),this._subscribeToMenuStackHasFocus(),this._subscribeToMenuOpen(),this._subscribeToMenuStackClosed(),this._setUpPointerTracker()}ngOnDestroy(){this.keyManager?.destroy(),this.destroyed.next(),this.destroyed.complete(),this.pointerTracker?.destroy()}focusFirstItem(e="program"){this.keyManager.setFocusOrigin(e),this.keyManager.setFirstItemActive()}focusLastItem(e="program"){this.keyManager.setFocusOrigin(e),this.keyManager.setLastItemActive()}_getTabIndex(){return this._tabIndexSignal()}closeOpenMenu(e,i){let{focusParentTrigger:n}=C({},i),o=this.keyManager,a=this.triggerItem;e===a?.getMenuTrigger()?.getMenu()&&(a?.getMenuTrigger()?.close(),n&&(a?o.setActiveItem(a):o.setFirstItemActive()))}_setKeyManager(){this.keyManager=new We(this.items).withWrap().withTypeAhead().withHomeAndEnd(),this.orientation==="horizontal"?this.keyManager.withHorizontalOrientation(this.dir?.value||"ltr"):this.keyManager.withVerticalOrientation()}_subscribeToMenuOpen(){let e=L(this.items.changes,this.destroyed);this.items.changes.pipe(O(this.items),Q(i=>i.filter(n=>n.hasMenu).map(n=>n.getMenuTrigger().opened.pipe(U(n),h(e)))),N(),Oe(i=>(this.triggerItem=i,i.getMenuTrigger().closed)),h(this.destroyed)).subscribe(()=>this.triggerItem=void 0)}_subscribeToMenuStackClosed(){this.menuStack.closed.pipe(h(this.destroyed)).subscribe(({item:e,focusParentTrigger:i})=>this.closeOpenMenu(e,{focusParentTrigger:i}))}_subscribeToMenuStackHasFocus(){this.isInline&&this.menuStack.hasFocus.pipe(h(this.destroyed)).subscribe(e=>{this._menuStackHasFocus.set(e)})}_setUpPointerTracker(){this.menuAim&&(this.ngZone.runOutsideAngular(()=>{this.pointerTracker=new fe(this.items)}),this.menuAim.initialize(this,this.pointerTracker))}static{this.\u0275fac=(()=>{let e;return function(n){return(e||(e=Pe(t)))(n||t)}})()}static{this.\u0275dir=y({type:t,contentQueries:function(i,n,o){if(i&1&&Be(o,At,5),i&2){let a;He(a=qe())&&(n.items=a)}},hostAttrs:["role","menu"],hostVars:4,hostBindings:function(i,n){i&1&&m("focus",function(){return n.focusFirstItem()})("focusin",function(){return n.menuStack.setHasFocus(!0)})("focusout",function(){return n.menuStack.setHasFocus(!1)}),i&2&&(ae("tabindex",n._getTabIndex())("id",n.id),T("aria-orientation",n.orientation)("data-cdk-menu-stack-id",n.menuStack.id))},inputs:{id:"id"},standalone:!0,features:[F]})}}return t})(),fi=(()=>{class t extends Bt{constructor(){super(),this._parentTrigger=r(Z,{optional:!0}),this.closed=new v,this.orientation="vertical",this.isInline=!this._parentTrigger,this.destroyed.subscribe(this.closed),this._parentTrigger?.registerChildMenu(this)}ngAfterContentInit(){super.ngAfterContentInit(),this._subscribeToMenuStackEmptied()}ngOnDestroy(){super.ngOnDestroy(),this.closed.complete()}_handleKeyEvent(e){let i=this.keyManager;switch(e.keyCode){case 37:case 39:g(e)||(e.preventDefault(),i.setFocusOrigin("keyboard"),i.onKeydown(e));break;case 27:g(e)||(e.preventDefault(),this.menuStack.close(this,{focusNextOnEmpty:M.currentItem,focusParentTrigger:!0}));break;case 9:g(e,"altKey","metaKey","ctrlKey")||this.menuStack.closeAll({focusParentTrigger:!0});break;default:i.onKeydown(e)}}_toggleMenuFocus(e){let i=this.keyManager;switch(e){case M.nextItem:i.setFocusOrigin("keyboard"),i.setNextItemActive();break;case M.previousItem:i.setFocusOrigin("keyboard"),i.setPreviousItemActive();break;case M.currentItem:i.activeItem&&(i.setFocusOrigin("keyboard"),i.setActiveItem(i.activeItem));break}}_subscribeToMenuStackEmptied(){this.menuStack.emptied.pipe(h(this.destroyed)).subscribe(e=>this._toggleMenuFocus(e))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=y({type:t,selectors:[["","cdkMenu",""]],hostAttrs:["role","menu",1,"cdk-menu"],hostVars:2,hostBindings:function(i,n){i&1&&m("keydown",function(a){return n._handleKeyEvent(a)}),i&2&&Ke("cdk-menu-inline",n.isInline)},outputs:{closed:"closed"},exportAs:["cdkMenu"],standalone:!0,features:[I([{provide:at,useExisting:t},{provide:be,useExisting:t},Dt("vertical")]),F]})}}return t})();var Ht=_e.map(t=>{let s=t.overlayX==="start"?2:-2,e=t.overlayY==="top"?2:-2;return Ie(C({},t),{offsetX:s,offsetY:e})}),qt=(()=>{class t{update(e){t._openContextMenuTrigger!==e&&(t._openContextMenuTrigger?.close(),t._openContextMenuTrigger=e)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=ee({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})(),ki=(()=>{class t extends ct{constructor(){super(),this._overlay=r(G),this._directionality=r(q,{optional:!0}),this._contextMenuTracker=r(qt),this._changeDetectorRef=r(le),this.disabled=!1,this._setMenuStackCloseListener()}open(e){this._open(null,e),this._changeDetectorRef.markForCheck()}close(){this.menuStack.closeAll()}_openOnContextMenu(e){this.disabled||(e.preventDefault(),e.stopPropagation(),this._contextMenuTracker.update(this),this._open(e,{x:e.clientX,y:e.clientY}),e.button===2?this.childMenu?.focusFirstItem("mouse"):e.button===0?this.childMenu?.focusFirstItem("keyboard"):this.childMenu?.focusFirstItem("program"))}_getOverlayConfig(e){return new ge({positionStrategy:this._getOverlayPositionStrategy(e),scrollStrategy:this.menuScrollStrategy(),direction:this._directionality||void 0})}_getOverlayPositionStrategy(e){return this._overlay.position().flexibleConnectedTo(e).withLockedPosition().withGrowAfterOpen().withPositions(this.menuPosition??Ht)}_setMenuStackCloseListener(){this.menuStack.closed.pipe(h(this.destroyed)).subscribe(({item:e})=>{e===this.childMenu&&this.isOpen()&&(this.closed.next(),this.overlayRef.detach())})}_subscribeToOutsideClicks(e){if(this.overlayRef){let i=this.overlayRef.outsidePointerEvents();if(e){let[n,o]=Ce(i,({type:a})=>a==="auxclick");i=L(o.pipe(Ee((a,lt)=>e.ctrlKey&<===0&&a.ctrlKey)),n.pipe(Se(1)))}i.pipe(h(this.stopOutsideClicksListener)).subscribe(n=>{this.isElementInsideMenuStack(he(n))||this.menuStack.closeAll()})}}_open(e,i){this.disabled||(this.isOpen()?(this.menuStack.closeSubMenuOf(this.childMenu),this.overlayRef.getConfig().positionStrategy.setOrigin(i),this.overlayRef.updatePosition()):(this.opened.next(),this.overlayRef?(this.overlayRef.getConfig().positionStrategy.setOrigin(i),this.overlayRef.updatePosition()):this.overlayRef=this._overlay.create(this._getOverlayConfig(i)),this.overlayRef.attach(this.getMenuContentPortal()),this._subscribeToOutsideClicks(e)))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=y({type:t,selectors:[["","cdkContextMenuTriggerFor",""]],hostVars:1,hostBindings:function(i,n){i&1&&m("contextmenu",function(a){return n._openOnContextMenu(a)}),i&2&&T("data-cdk-menu-stack-id",null)},inputs:{menuTemplateRef:[0,"cdkContextMenuTriggerFor","menuTemplateRef"],menuPosition:[0,"cdkContextMenuPosition","menuPosition"],menuData:[0,"cdkContextMenuTriggerData","menuData"],disabled:[2,"cdkContextMenuDisabled","disabled",de]},outputs:{opened:"cdkContextMenuOpened",closed:"cdkContextMenuClosed"},exportAs:["cdkContextMenuTriggerFor"],standalone:!0,features:[I([{provide:Z,useExisting:t},{provide:f,useClass:Me}]),oe,F]})}}return t})();var yi=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275mod=Fe({type:t})}static{this.\u0275inj=we({imports:[Je]})}}return t})();export{st as a,At as b,fi as c,ki as d,yi as e};
|