dealpos 12.29.2 → 12.30.0
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-27EDH6R6.js +1 -0
- package/POS/{chunk-ZSXWYSAT.js → chunk-2EKIH5VU.js} +1 -1
- package/POS/{chunk-YD7IOGM6.js → chunk-2JHNC6GU.js} +1 -1
- package/POS/{chunk-ISC26JEO.js → chunk-2WDMQAIW.js} +1 -1
- package/POS/{chunk-TQBRZB4O.js → chunk-37OTH4A3.js} +1 -1
- package/POS/{chunk-55CZYP2J.js → chunk-3DYOX6H6.js} +1 -1
- package/POS/{chunk-GIWLENGE.js → chunk-3VGRLNKL.js} +1 -1
- package/POS/{chunk-S5IJV4H7.js → chunk-3XETAX4H.js} +1 -1
- package/POS/{chunk-S5ACJPP2.js → chunk-3YAOMDUV.js} +1 -1
- package/POS/{chunk-4365DNB5.js → chunk-4EQSQK3N.js} +1 -1
- package/POS/{chunk-D22GK4MI.js → chunk-573X4GCK.js} +1 -1
- package/POS/{chunk-B7XIYJUP.js → chunk-57HFR4LL.js} +1 -1
- package/POS/{chunk-R25CTWSF.js → chunk-5FD254R5.js} +1 -1
- package/POS/chunk-5NKA2KMX.js +1 -0
- package/POS/{chunk-66YNKDHE.js → chunk-5WXFNHTU.js} +1 -1
- package/POS/{chunk-WLZJWKWU.js → chunk-6JAROHYG.js} +1 -1
- package/POS/{chunk-SGIYSGN5.js → chunk-6OKZLLR6.js} +1 -1
- package/POS/{chunk-JZFYVSSB.js → chunk-6Y2VIV6T.js} +1 -1
- package/POS/{chunk-RSNZABVZ.js → chunk-76XVRKGX.js} +1 -1
- package/POS/{chunk-45TLCGK6.js → chunk-7DBAF2ID.js} +1 -1
- package/POS/chunk-7HZBERFW.js +1 -0
- package/POS/{chunk-OZLE4IDP.js → chunk-7SZX5FFT.js} +1 -1
- package/POS/{chunk-WW4ZOUIT.js → chunk-BCCLPNBY.js} +1 -1
- package/POS/{chunk-7ENWW6HH.js → chunk-BER6NWXX.js} +1 -1
- package/POS/{chunk-PUUGDK33.js → chunk-BTPCLHW3.js} +1 -1
- package/POS/{chunk-HKA45HIF.js → chunk-CHYOCIQV.js} +1 -1
- package/POS/chunk-CJEJVTVH.js +1 -0
- package/POS/{chunk-VA42NRZT.js → chunk-CPDXQ3WX.js} +1 -1
- package/POS/{chunk-IN7OP5JC.js → chunk-CWMBVQ2T.js} +1 -1
- package/POS/{chunk-263KT7ES.js → chunk-D2DGH46C.js} +1 -1
- package/POS/{chunk-O6LOJRRY.js → chunk-DZSOR2XA.js} +1 -1
- package/POS/{chunk-X7RCKCZE.js → chunk-E3Q7P32F.js} +1 -1
- package/POS/{chunk-22LB2ZMN.js → chunk-E5PWXNBU.js} +1 -1
- package/POS/chunk-EDKYMPSM.js +1 -0
- package/POS/{chunk-XEGAX53U.js → chunk-EUK3KBIU.js} +1 -1
- package/POS/{chunk-F7RGTOIW.js → chunk-F4C5JGCF.js} +1 -1
- package/POS/{chunk-PELXYTPK.js → chunk-FAC2KQTE.js} +1 -1
- package/POS/{chunk-AV3OQO7U.js → chunk-FB5RJXOS.js} +1 -1
- package/POS/{chunk-KDAFBSAK.js → chunk-FFED3POW.js} +1 -1
- package/POS/{chunk-YTS7CBKA.js → chunk-FIRMDSPQ.js} +1 -1
- package/POS/{chunk-GOWDDMIH.js → chunk-FMCBRFL4.js} +1 -1
- package/POS/{chunk-7E7JH5IE.js → chunk-G362AAZE.js} +1 -1
- package/POS/chunk-G3G3NTJ3.js +1 -0
- package/POS/{chunk-C3MJCEWW.js → chunk-GCMXXXWD.js} +1 -1
- package/POS/chunk-GIR75V56.js +3 -0
- package/POS/{chunk-3P7PS7PI.js → chunk-GLOA54EK.js} +1 -1
- package/POS/{chunk-U33HDIB2.js → chunk-GMFUSNOS.js} +1 -1
- package/POS/{chunk-5ZZHGLWX.js → chunk-GNLHDFU2.js} +3 -3
- package/POS/{chunk-NT77G4Y2.js → chunk-GT4CI5AG.js} +1 -1
- package/POS/{chunk-24IXJ44W.js → chunk-GXH7RLHM.js} +2 -2
- package/POS/{chunk-GD7B5QWF.js → chunk-GXOFHR6E.js} +1 -1
- package/POS/{chunk-JE7FITUT.js → chunk-H2ILOGMV.js} +8 -8
- package/POS/chunk-H4LIW25M.js +1 -0
- package/POS/{chunk-EZYLGNR7.js → chunk-HNKJTR7J.js} +1 -1
- package/POS/{chunk-CK2OI7JX.js → chunk-HRB5GN6Q.js} +1 -1
- package/POS/{chunk-XWFP7VLU.js → chunk-HS3R2RXN.js} +1 -1
- package/POS/{chunk-67ANF4RV.js → chunk-IEE7QKW7.js} +1 -1
- package/POS/{chunk-6SEDATQE.js → chunk-IIT3DAP2.js} +1 -1
- package/POS/{chunk-F2KS2BHY.js → chunk-IUPOAIMP.js} +1 -1
- package/POS/{chunk-KTYS4KLO.js → chunk-IXEMYEDJ.js} +7 -7
- package/POS/{chunk-HM4XYUVX.js → chunk-IYZZ3SYQ.js} +1 -1
- package/POS/{chunk-SZFNR4S3.js → chunk-IZHXMIM2.js} +1 -1
- package/POS/{chunk-MO3V4SDV.js → chunk-JD3YK4IQ.js} +1 -1
- package/POS/{chunk-T6YIGQMI.js → chunk-JDWU3VQM.js} +1 -1
- package/POS/chunk-JG36UV7L.js +1 -0
- package/POS/{chunk-KESBHCVP.js → chunk-JIZGZHC4.js} +1 -1
- package/POS/{chunk-L6P7LRVD.js → chunk-K3DH77CZ.js} +1 -1
- package/POS/{chunk-FF4WINIS.js → chunk-K4CSWKP3.js} +1 -1
- package/POS/{chunk-UGRUVL2D.js → chunk-K4Y6YXYQ.js} +1 -1
- package/POS/{chunk-TEFPNV2N.js → chunk-KATRF5TO.js} +1 -1
- package/POS/{chunk-HLY5D6PF.js → chunk-KCGAA57I.js} +1 -1
- package/POS/{chunk-5K3YAXCM.js → chunk-KXZGKP56.js} +1 -1
- package/POS/{chunk-HOMABJAJ.js → chunk-L3C3BTMO.js} +1 -1
- package/POS/{chunk-7TS5RT2W.js → chunk-L3EWPPTB.js} +1 -1
- package/POS/{chunk-MSPU7EHO.js → chunk-L3EYRBMD.js} +11 -12
- package/POS/{chunk-P6C6Y63O.js → chunk-LCTAPREN.js} +1 -1
- package/POS/{chunk-KZWQL2PB.js → chunk-LEKXB6ES.js} +1 -1
- package/POS/{chunk-EX7YX62B.js → chunk-LM2QAKDH.js} +1 -1
- package/POS/{chunk-ACORZ4UW.js → chunk-MF3YDNUA.js} +1 -1
- package/POS/{chunk-E4CSFD5T.js → chunk-MJ3LA6PU.js} +1 -1
- package/POS/{chunk-7UAI6Y7J.js → chunk-MLIANCM3.js} +1 -1
- package/POS/{chunk-L4HJSHF4.js → chunk-MODUSJ3F.js} +1 -1
- package/POS/{chunk-EGRQHXVQ.js → chunk-MVEFQPE2.js} +1 -1
- package/POS/chunk-MX5KWIHX.js +1 -0
- package/POS/{chunk-PLPZ7DDJ.js → chunk-MYKOQUQV.js} +1 -1
- package/POS/{chunk-SDO5RGRH.js → chunk-NJVROC5J.js} +1 -1
- package/POS/{chunk-AIXGISVS.js → chunk-NP5UREQV.js} +1 -1
- package/POS/{chunk-ZTPN3E46.js → chunk-NTYFOEFT.js} +2 -2
- package/POS/chunk-OLPRG7PO.js +3 -0
- package/POS/{chunk-LN7Z2WED.js → chunk-OQ6GK7YE.js} +1 -1
- package/POS/{chunk-HRXCLUDP.js → chunk-OSKQXMK5.js} +1 -1
- package/POS/{chunk-6QU7JP2W.js → chunk-OSKZVBWU.js} +1 -1
- package/POS/chunk-OV6A56AA.js +1 -0
- package/POS/{chunk-Q7AYQDD6.js → chunk-OVSZQKPP.js} +1 -1
- package/POS/chunk-OYTWFRUI.js +1 -0
- package/POS/{chunk-LBNEDKUK.js → chunk-OYYMTGGQ.js} +1 -1
- package/POS/{chunk-PVOILNE3.js → chunk-P422CQAJ.js} +1 -1
- package/POS/{chunk-PTHRJE44.js → chunk-PQ3AM4YT.js} +1 -1
- package/POS/chunk-PSFKQ6TV.js +3 -0
- package/POS/{chunk-TVPFRMSF.js → chunk-QCFX67UL.js} +1 -1
- package/POS/{chunk-VLVH6PJY.js → chunk-QFJKMBOM.js} +1 -1
- package/POS/{chunk-MNVPZRVW.js → chunk-QIUY3K3Q.js} +1 -1
- package/POS/{chunk-BKC4DIEX.js → chunk-QVA5GJFZ.js} +1 -1
- package/POS/{chunk-37VEIC36.js → chunk-QYR764CP.js} +1 -1
- package/POS/{chunk-P43KUVBD.js → chunk-RCFZOSBY.js} +1 -1
- package/POS/{chunk-VCMHRZMG.js → chunk-RDQ6GUSE.js} +1 -1
- package/POS/{chunk-Z2HT6AUZ.js → chunk-RH5G6DPR.js} +1 -1
- package/POS/{chunk-Z5XTXGSV.js → chunk-RI3AYHZ3.js} +1 -1
- package/POS/chunk-RQT7TG57.js +1 -0
- package/POS/chunk-S35HZJFI.js +2 -0
- package/POS/chunk-SBU36HM3.js +1 -0
- package/POS/{chunk-QBEQ2XDS.js → chunk-SEJI3ALN.js} +1 -1
- package/POS/{chunk-3XRIHVKE.js → chunk-SGA6NR3O.js} +1 -1
- package/POS/{chunk-PALL5YI2.js → chunk-SLVGV447.js} +1 -1
- package/POS/{chunk-TVAGSEWI.js → chunk-SO4CIAWC.js} +1 -1
- package/POS/{chunk-66NNVSJG.js → chunk-T4AJLD6K.js} +1 -1
- package/POS/{chunk-U5JP3DJE.js → chunk-TIRQ7AB2.js} +1 -1
- package/POS/{chunk-XLHDAZIS.js → chunk-TPCA62ZM.js} +1 -1
- package/POS/chunk-TPTQRRZP.js +8 -0
- package/POS/{chunk-C2VHQP6W.js → chunk-U7TUXTX2.js} +1 -1
- package/POS/{chunk-X7UJKZR7.js → chunk-UFI3T7Y4.js} +1 -1
- package/POS/chunk-UILVAASF.js +1 -0
- package/POS/{chunk-5NVISO2I.js → chunk-UKLS6KWZ.js} +1 -1
- package/POS/{chunk-STYHXM6R.js → chunk-VF3TXZVK.js} +1 -1
- package/POS/{chunk-ZTC7Q6DO.js → chunk-VKJV6YH4.js} +1 -1
- package/POS/{chunk-HDDKPQTP.js → chunk-VMEEIWRO.js} +1 -1
- package/POS/{chunk-MKJ6A3FQ.js → chunk-VQA35AG2.js} +3 -4
- package/POS/{chunk-HML5QAAT.js → chunk-VQIRN5P3.js} +1 -1
- package/POS/{chunk-4E6YCIJB.js → chunk-VQUN6F64.js} +1 -1
- package/POS/{chunk-WRYLC2BC.js → chunk-VRKXSEEB.js} +1 -1
- package/POS/{chunk-XCWZEEJW.js → chunk-VSPRPROM.js} +1 -1
- package/POS/{chunk-H2BVVQXT.js → chunk-VUKAYYG7.js} +1 -1
- package/POS/{chunk-W5MZLLWT.js → chunk-WGG2B3NV.js} +1 -1
- package/POS/{chunk-RFD6P6P2.js → chunk-WGPXEEMZ.js} +1 -1
- package/POS/chunk-WJGA332C.js +2 -0
- package/POS/{chunk-J5FDUGRC.js → chunk-WMHQHMUC.js} +1 -1
- package/POS/{chunk-AOGNXZL5.js → chunk-X4ZJCPDN.js} +1 -1
- package/POS/{chunk-QOEHV6JD.js → chunk-XBV6NLLP.js} +1 -1
- package/POS/{chunk-HW4WW7HY.js → chunk-XCNX64BF.js} +1 -1
- package/POS/{chunk-POQSUST3.js → chunk-XL7JTH2P.js} +1 -1
- package/POS/{chunk-DBBWKBDG.js → chunk-XSZRP4GV.js} +1 -1
- package/POS/{chunk-4TMFPBG2.js → chunk-XTWKNX7Z.js} +1 -1
- package/POS/{chunk-Z7ZBRWD4.js → chunk-XUZSEBMT.js} +1 -1
- package/POS/{chunk-HCQQA6DB.js → chunk-YBG3XOY4.js} +1 -1
- package/POS/chunk-YD77GPO6.js +1 -0
- package/POS/{chunk-AVZ5RUD2.js → chunk-YI2MZNMM.js} +1 -1
- package/POS/chunk-YJ6UZUML.js +1 -0
- package/POS/chunk-YPXBN3NN.js +1 -0
- package/POS/{chunk-PCTP5GQ2.js → chunk-YRHH6VTW.js} +5 -5
- package/POS/{chunk-NNIVRQP3.js → chunk-YUS23A4H.js} +1 -1
- package/POS/{chunk-RRT76HIF.js → chunk-Z25IKUSX.js} +1 -1
- package/POS/{chunk-SP5J5SJ2.js → chunk-ZHG2NY2S.js} +1 -1
- package/POS/{chunk-TCBQGTX2.js → chunk-ZOCQCPCK.js} +1 -1
- package/POS/{chunk-6QGYIZXS.js → chunk-ZR3CKLGS.js} +1 -1
- package/POS/{chunk-ICOC364M.js → chunk-ZYW56AAF.js} +1 -1
- package/POS/{chunk-BARBVJBZ.js → chunk-ZYWCWW2Y.js} +1 -1
- package/POS/{chunk-Q42BSGTW.js → chunk-ZZ4UF2ZH.js} +1 -1
- package/POS/index.html +2 -2
- package/POS/{main-2OK7LSXW.js → main-RV3WCOZM.js} +1 -1
- package/package.json +1 -1
- package/POS/chunk-2TOR3BSU.js +0 -1
- package/POS/chunk-AFWUJNR4.js +0 -1
- package/POS/chunk-BN6XL5RD.js +0 -1
- package/POS/chunk-C3BUASSM.js +0 -1
- package/POS/chunk-EBVWPTFE.js +0 -2
- package/POS/chunk-EDXZR27X.js +0 -1
- package/POS/chunk-ETQ4LSQD.js +0 -2
- package/POS/chunk-EZ2JCGB6.js +0 -3
- package/POS/chunk-FAWMFPMY.js +0 -1
- package/POS/chunk-G3JQS2ZT.js +0 -1
- package/POS/chunk-JT6NZ5CO.js +0 -3
- package/POS/chunk-KIXLBBZU.js +0 -1
- package/POS/chunk-LL6HJXHG.js +0 -1
- package/POS/chunk-NH5VQLEA.js +0 -1
- package/POS/chunk-OAMY6V43.js +0 -3
- package/POS/chunk-PNROS7QK.js +0 -1
- package/POS/chunk-Q6PUSS3L.js +0 -1
- package/POS/chunk-WVRVBENC.js +0 -1
- package/POS/chunk-YPRKIVFC.js +0 -1
- package/POS/chunk-Z4KPBECG.js +0 -1
- package/POS/chunk-ZPY3AHKC.js +0 -8
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as un}from"./chunk-WMHQHMUC.js";import{a as dn}from"./chunk-6OKZLLR6.js";import{a as Jt,b as Yt}from"./chunk-EDKYMPSM.js";import{a as $t,b as Gt}from"./chunk-2EKIH5VU.js";import"./chunk-Z25IKUSX.js";import{c as Wt}from"./chunk-YI2MZNMM.js";import{a as Ht}from"./chunk-TK5H65DN.js";import{a as Ce}from"./chunk-ETCKY72J.js";import{a as Zt,b as en,c as tn,d as Ye,e as nn}from"./chunk-7HZBERFW.js";import"./chunk-MVEFQPE2.js";import"./chunk-MYKOQUQV.js";import{a as Ze,b as sn,f as mn,g as pn}from"./chunk-LEKXB6ES.js";import{a as cn}from"./chunk-YPXBN3NN.js";import{a as an,b as ln}from"./chunk-76XVRKGX.js";import{a as Xe}from"./chunk-X4ZJCPDN.js";import{a as ze,b as Ke}from"./chunk-JIZGZHC4.js";import"./chunk-IUPOAIMP.js";import{a as B,b as W}from"./chunk-5FD254R5.js";import{c as Xt,d as Je}from"./chunk-7SZX5FFT.js";import{d as rn}from"./chunk-JG36UV7L.js";import"./chunk-57HFR4LL.js";import{a as zt,b as Kt}from"./chunk-RDQ6GUSE.js";import"./chunk-XCNX64BF.js";import"./chunk-NJVROC5J.js";import"./chunk-VMEEIWRO.js";import{a as de,b as ue}from"./chunk-CWMBVQ2T.js";import{a as Vt,b as Nt,d as Ft,e as Rt}from"./chunk-IIT3DAP2.js";import"./chunk-QYR764CP.js";import{d as Ge,e as He}from"./chunk-CHYOCIQV.js";import"./chunk-FIRMDSPQ.js";import{i as Ut,j as jt,k as Lt}from"./chunk-FFED3POW.js";import{a as kt}from"./chunk-K4Y6YXYQ.js";import{a as be,b as fe,c as ge,d as _e}from"./chunk-SGA6NR3O.js";import{a as Se}from"./chunk-KAVMLWQD.js";import{oa as At,ua as We,va as $e,wa as me,xa as pe,ya as re,za as Bt}from"./chunk-F4C5JGCF.js";import{B as oe,C as Te,a as qe,c as ne,h as Y,l as we,n as ie,q as Tt,r as Oe}from"./chunk-LM2QAKDH.js";import"./chunk-XBV6NLLP.js";import{a as on}from"./chunk-NP5UREQV.js";import"./chunk-2WDMQAIW.js";import{b as se}from"./chunk-HS3R2RXN.js";import{f as Qt,l as qt}from"./chunk-BFKKHUHL.js";import"./chunk-SO4CIAWC.js";import{a as C}from"./chunk-TQZMOLDX.js";import{a as Z}from"./chunk-IZHXMIM2.js";import"./chunk-7DBAF2ID.js";import{$ as k,Bc as le,C as O,Ca as R,Cb as rt,Cd as Pt,Dc as ce,Ec as q,Hb as Mt,I as vt,Ib as Dt,Ja as Be,Jb as Et,Jc as Ee,Ka as Ue,M as ht,Ma as St,Mb as K,Nb as c,Nc as te,Oa as l,Ob as U,Pa as z,Pb as b,Q as xt,Qb as Ve,Qc as w,S as Re,Tb as $,Ub as G,Vb as H,W as ee,Wb as De,Xa as bt,Xb as E,Yb as je,Za as N,Zb as Q,bb as M,c as _t,da as A,db as s,eb as It,ec as v,fc as h,gc as at,ha as u,kc as ae,la as yt,ma as D,n as Ct,ob as r,pb as a,qb as x,r as ye,rb as y,sa as g,sb as S,ta as _,ub as F,uc as J,ud as wt,wd as Ot,xb as p,xd as Le,zb as m,zd as Qe}from"./chunk-VQUN6F64.js";import{a as V,b as Fe}from"./chunk-O3DEWASH.js";var et=class{AppConfigJSON;Currencies;CustomerPOTypes;Entities;Payments;Taxes;SalesPOTypes;EstimateOptions;Data};var Pe=class{CurrencyID;CustomerID;Date;Discount;DiscountAmount;EntityID;ID;Note;Number;SalesID;TaxTypeID;TypeID;constructor(){this.CustomerID=C.GuidEmpty,this.EntityID=C.GuidEmpty,this.ID=C.GuidEmpty,this.TaxTypeID=C.GuidEmpty,this.Discount=0,this.DiscountAmount=0,this.Date=new Date().toDateString()}};var ve=class{Email;Key;Mobile;Name;Phone;Value};var tt=class{ID;Index;Symbol;Name;ExchangeRate;ConversionSuggestion;ExchangeRateDate;ExchangeRateDateDisplay};var nt=class{ID;Name;DueDays;BlockDays;Description;PrintTemplateID;AccountID};var it=class{DeliveryID;InvoiceID;InvoiceNumber;Message;OrderID;PaymentStateID;PaymentStateLabel;PrintMode;Success};var j=function(i){return i[i.NEW=0]="NEW",i[i.EDIT=1]="EDIT",i[i.RETURN=2]="RETURN",i[i.COMPLETE=3]="COMPLETE",i}(j||{});var T=(()=>{class i{estimateState=un({loadForm:new et,outlet:{Name:"",ID:C.GuidEmpty},order:new Pe,cartItems:[],customer:new ve,tax:new Ht,currency:new tt,tag:new nt,discount:{discountAmount:0,discount:0},state:j.NEW,complete:new it});loadForm=this.estimateState.select(e=>Object.freeze(e.loadForm()));order=this.estimateState.select(e=>Object.freeze(e.order()));outlet=this.estimateState.select(e=>Object.freeze(e.outlet()));cartItems=this.estimateState.select(e=>Object.freeze(e.cartItems()));customer=this.estimateState.select(e=>Object.freeze(e.customer()));tax=this.estimateState.select(e=>Object.freeze(e.tax()));currency=this.estimateState.select(e=>Object.freeze(e.currency()));tag=this.estimateState.select(e=>Object.freeze(e.tag()));discount=this.estimateState.select(e=>Object.freeze(e.discount()));state=this.estimateState.select(e=>Object.freeze(e.state()));complete=this.estimateState.select(e=>Object.freeze(e.complete()));updateLoadForm(e){this.estimateState.update("loadForm",e)}updateOutlet(e){this.estimateState.update("outlet",e)}updateOrder(e){this.estimateState.update("order",e)}updateCartItems(e){this.estimateState.update("cartItems",e)}updateCustomer(e){this.estimateState.update("customer",e)}updateTax(e){this.estimateState.update("tax",e)}updateCurrency(e){this.estimateState.update("currency",e)}updateTag(e){this.estimateState.update("tag",e)}updateDiscount(e){this.estimateState.update("discount",e)}updateState(e){this.estimateState.update("state",e)}updateComplete(e){this.estimateState.update("complete",e)}static \u0275fac=function(t){return new(t||i)};static \u0275prov=A({token:i,factory:i.\u0275fac})}return i})();var he=class{ID;Name;Code;Cost;ThumbnailUrl;CouponDiscount;Discount;DiscountAmount;EntityID;Expense;InventoryTypeID;LoyaltyPoint;Note;PromotionGift;Quantity;UnitQuantity;SalesID;VariantID;VariantUnitQuantity;isMaxInventory;UOM;UOMName;UnitCost;UnitPrice;TypeID;Storage;Taxable;Price;Serial;get Total(){return this.Price*(this.Quantity*this.UnitQuantity)*((100-this.Discount)/100)}get getItemAfterDiscount(){let f=this.getDiscPercentagePerItem();return this.DiscountAmount<f?f-this.DiscountAmount:0}getDiscPercentagePerItem(){let f=this.UnitPrice;return this.Discount>0&&(f=(100-this.Discount)/100*this.UnitPrice),f}};var ke=(()=>{class i{constructor(){}generateCartItem(e){let t=new he;return t.Name=e.Name,t.ThumbnailUrl=e.ThumbnailUrl,t.Price=e.UnitPrice,t.UnitPrice=e.UnitPrice,t.UnitCost=e.UnitCost,t.UnitQuantity=e.UnitQuantity,t.Quantity=1,t.Code=e.Code,t.TypeID=e.TypeID,t.Discount=0,t.VariantUnitQuantity=e.VariantUnitQuantity,t.Storage=e.Storage,t.UOM=e.UOM,t.UOMName=e.UOMName,t.VariantID=e.ID,t.Taxable=e.Taxable,t.InventoryTypeID=e.TypeID,t}generateCartItemOnEdit(e){let t=new he;return t.ID=e.ID,t.Name=e.Variant?.Name,t.ThumbnailUrl=e.Variant?.ThumbnailUrl,t.Price=e.Price,t.UnitPrice=e.Price,t.UnitCost=e.Cost,t.UnitQuantity=e.Variant?.UnitQuantity,t.Quantity=e.Quantity,t.Code=e.Variant?.Code,t.TypeID=e.Variant?.TypeID,t.Discount=e.Discount,t.VariantUnitQuantity=e.Variant?.VariantUnitQuantity,t.Storage=e.Variant?.Storage,t.UOM=e.Variant?.UOM,t.UOMName=e.Variant?.UOMName,t.VariantID=e.VariantID,t.Taxable=e.Taxable,t.Note=e.Note,t.Serial=e.Serial,e.InventoryTypeID=e.Variant?.TypeID,t}static \u0275fac=function(t){return new(t||i)};static \u0275prov=A({token:i,factory:i.\u0275fac})}return i})();var lt=(()=>{class i{httpService=u(Z);storeService=u(T);factoryService=u(ke);activatedRoute=u(wt);getLoadForm$=this.activatedRoute.queryParams.pipe(ee(e=>this.httpService.post("/API/estimate/LoadForm",e)),k(e=>this.storeService.updateLoadForm(e)),k(e=>{C.IsNotEmpty(e.Data)?this.onEditOrder(e):(this.initDefaultCurrency(),this.initTag(),this.initTax())}),B());constructor(){this.getLoadForm$.subscribe()}onEditOrder(e){let t=e.Data,n=this.findTaxById(t.Order.TaxTypeID),o=this.findCurrencyById(t.Order.CurrencyID),d=this.findOutletById(t.Order.EntityID),I=this.findTagById(t.Order.TypeID),X=this.getCartItemsOnEdit(e);this.storeService.updateState(j.EDIT),this.storeService.updateOrder(t.Order),this.storeService.updateCartItems(X),this.storeService.updateCustomer({Key:t.Order.CustomerID,Value:t.ContactName}),this.storeService.updateTax(n),this.storeService.updateCurrency(o),this.storeService.updateOutlet(d),this.storeService.updateDiscount({discount:t.Order.Discount,discountAmount:t.Order.DiscountAmount}),this.storeService.updateTag(I)}getCartItemsOnEdit(e){return e.Data.Items.map(o=>this.factoryService.generateCartItemOnEdit(o))}initDefaultCurrency(){let e=this.storeService.loadForm()?.AppConfigJSON?.CoreDefaults?.CurrencyID,t=this.storeService.loadForm()?.Currencies.find(n=>n.ID===e);this.storeService.updateCurrency(t)}initTag(){let e=this.storeService.loadForm()?.CustomerPOTypes;this.storeService.updateTag(e[0])}initTax(){let e=this.storeService.loadForm()?.Taxes;this.storeService.updateTax(e[0])}findTaxById(e){return(this.storeService.loadForm()?.Taxes).find(o=>o.ID===e)}findCurrencyById(e){return(this.storeService.loadForm()?.Currencies).find(o=>o.ID===e)}findOutletById(e){return(this.storeService.loadForm()?.Entities).find(o=>o.ID===e)}findTagById(e){return(this.storeService.loadForm()?.CustomerPOTypes).find(o=>o.ID===e)}static \u0275fac=function(t){return new(t||i)};static \u0275prov=A({token:i,factory:i.\u0275fac})}return i})();var ct=(()=>{class i{storeService=u(T);isOpenDialog$=W(this.storeService.loadForm).pipe(O(e=>C.IsNotEmpty(e.Entities)),ye(()=>{let e=!1,t=this.storeService.state(),n=this.storeService.outlet();return(t==j.NEW||t==j.EDIT)&&(e=C.IsEmpty(n.ID)),e}));updateOutlet(e){this.storeService.updateOutlet(e)}static \u0275fac=function(t){return new(t||i)};static \u0275prov=A({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var Ie=(()=>{class i{storeService=u(T);httpService=u(Z);router=u(Ot);dialog=u(re);orderNumber$=W(this.storeService.outlet).pipe(O(e=>C.IsNotEmpty(e.ID)),ee(e=>{if(this.storeService.state()==j.NEW)return this.httpService.post(Se.EstimateGenerateNumber,{ID:e.ID}).pipe(ye(t=>t.Number));{let t=this.storeService.order().Number;return Ct(t)}}),k(e=>{this.storeService.state()==j.NEW&&this.updateOrderNumber(e)}),B());updateTagOrder$=W(this.storeService.tag).pipe(k(e=>{let t=V({},this.storeService.order());t.TypeID=e.ID,this.storeService.updateOrder(t)}),B());updateCurrencyOrder$=W(this.storeService.currency).pipe(k(e=>{let t=V({},this.storeService.order());t.CurrencyID=e.ID,this.storeService.updateOrder(t)}),B());updateTaxOrder$=W(this.storeService.tax).pipe(k(e=>{let t=V({},this.storeService.order());t.TaxTypeID=e.ID,this.storeService.updateOrder(t)}),B());updateDiscountOrder$=W(this.storeService.discount).pipe(k(e=>{let t=V({},this.storeService.order());t.Discount=e.discount,t.DiscountAmount=e.discountAmount,this.storeService.updateOrder(t)}),B());updateCustomerOrder$=W(this.storeService.customer).pipe(k(e=>{let t=V({},this.storeService.order());t.CustomerID=e.Key,this.storeService.updateOrder(t)}),B());updateEntityId$=W(this.storeService.outlet).pipe(O(e=>C.IsNotEmpty(e.ID)),k(e=>{let t=V({},this.storeService.order());t.EntityID=e.ID,this.storeService.updateOrder(t)}),B());constructor(){this.updateTagOrder$.subscribe(),this.updateCurrencyOrder$.subscribe(),this.updateTaxOrder$.subscribe(),this.updateDiscountOrder$.subscribe(),this.updateCustomerOrder$.subscribe(),this.updateEntityId$.subscribe()}newOrder(){let e=this.storeService.loadForm(),t=this.getDefaultCurrency(),n=this.storeService.outlet();this.storeService.updateOrder(new Pe),this.storeService.updateCartItems([]),this.storeService.updateCustomer(new ve),this.storeService.updateTax(V({},e.Taxes[0])),this.storeService.updateCurrency(V({},t)),this.storeService.updateTag(V({},e.CustomerPOTypes[0])),this.storeService.updateDiscount({discountAmount:0,discount:0}),this.storeService.updateOutlet(V({},n)),this.router.navigate([],{queryParams:{}}),this.storeService.updateState(j.NEW)}getDefaultCurrency(){let e=this.storeService.loadForm()?.AppConfigJSON?.CoreDefaults?.CurrencyID;return this.storeService.loadForm()?.Currencies.find(n=>n.ID===e)}updateOrderNumber(e){C.IsNotEmpty(e)&&this.storeService.order().Number!==e&&this.storeService.updateOrder(Fe(V({},this.storeService.order()),{Number:e}))}updateOrderDate(e){C.IsNotEmpty(e)&&this.storeService.order().Date!==e&&this.storeService.updateOrder(Fe(V({},this.storeService.order()),{Date:e}))}updateSalesPersonId(e){let t=V({},this.storeService.order());t.SalesID=e,this.storeService.updateOrder(t)}static \u0275fac=function(t){return new(t||i)};static \u0275prov=A({token:i,factory:i.\u0275fac})}return i})();var st=(()=>{class i{storeService=u(T);httpService=u(Z);quickkeys$=W(this.storeService.outlet).pipe(O(e=>C.IsNotEmpty(e.ID)),ht((e,t)=>e.ID===t.ID),ee(e=>this.httpService.post("/API/catalog/product/GetQuickKey",JSON.stringify(e.ID))),Re(1));static \u0275fac=function(t){return new(t||i)};static \u0275prov=A({token:i,factory:i.\u0275fac})}return i})();var fn=i=>({"qtyBtn-disabled":i}),gn=(()=>{class i{disabled=!1;decimalPlaces=4;max=1e15;min=-1e15;quantity;constructor(){}ngOnInit(){}incrementQty(){this.quantity<this.max&&(this.quantity++,this.onChange(this.quantity))}decrementQty(){this.quantity>this.min&&(this.quantity--,this.onChange(this.quantity))}quantityChange(){this.onChange(this.quantity)}onChange=e=>{};onTouched=()=>{};writeValue(e){C.IsEmpty(e)?this.quantity=0:this.quantity=e}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=D({type:i,selectors:[["POS-input-quantity"]],inputs:{disabled:"disabled",decimalPlaces:"decimalPlaces",max:"max",min:"min"},standalone:!0,features:[De([{provide:qe,multi:!0,useExisting:i}]),E],decls:6,vars:11,consts:[[1,"input-group"],["type","button","id","button-addon1",1,"btn","btn-outline-secondary","fw-bold","rounded-0","fs-2","border-end-0","py-4","qty-input","d-flex","align-items-center","qty_btn","justify-content-center",3,"click","ngClass","disabled"],["id","txtCartQuantity","type","text","autoNum","",1,"form-control","input-numpad","qty-input","text-center",3,"ngModelChange","ngModel","disabled","decimalPlaces"],["type","button","id","button-addon2",1,"btn","btn-outline-secondary","fw-bold","rounded-0","fs-5","border-start-0","py-4","qty-input","d-flex","align-items-center","qty_btn","justify-content-center",3,"click","ngClass","disabled"]],template:function(t,n){t&1&&(r(0,"div",0)(1,"button",1),p("click",function(){return n.decrementQty()}),c(2,"-"),a(),r(3,"input",2),H("ngModelChange",function(d){return G(n.quantity,d)||(n.quantity=d),d}),p("ngModelChange",function(){return n.quantityChange()}),a(),r(4,"button",3),p("click",function(){return n.incrementQty()}),c(5,"+"),a()()),t&2&&(l(),s("ngClass",Q(7,fn,n.disabled))("disabled",n.disabled),l(2),$("ngModel",n.quantity),s("disabled",n.disabled)("decimalPlaces",n.decimalPlaces),l(),s("ngClass",Q(9,fn,n.disabled))("disabled",n.disabled))},dependencies:[w,le,oe,ne,Y,ie,ue,de],styles:[".qtyBtn-disabled[_ngcontent-%COMP%]{background-color:#e9ecef;color:#000!important}button.qty_btn[_ngcontent-%COMP%]{background:#eee;border:1px solid #ddd;width:36px}.qty-input[_ngcontent-%COMP%]{height:36px!important}"]})}return i})();var ut=i=>({selected:i}),Tn=()=>["/menu/Products/Catalog/Variants/Info"],Pn=i=>({ID:i});function kn(i,f){if(i&1){let e=F();y(0),r(1,"a",10),p("click",function(){g(e);let n=m();return _(n.tabState="PRODUCT")}),c(2," Product "),a(),S()}if(i&2){let e=m();l(),s("ngClass",Q(1,ut,e.tabState=="PRODUCT"))}}function An(i,f){if(i&1){let e=F();y(0),r(1,"a",11),p("click",function(){g(e);let n=m();return _(n.tabState="SERIAL")}),c(2," Serial "),a(),S()}if(i&2){let e=m();l(),s("ngClass",Q(1,ut,e.tabState=="SERIAL"))}}function Vn(i,f){if(i&1&&(y(0),r(1,"div",12)(2,"div",21),x(3,"POS-variant-autocomplete",22),a()(),S()),i&2){let e=m(2);l(3),s("formControl",e.variantSearchCtrl)}}function Nn(i,f){if(i&1&&(r(0,"span"),c(1),a()),i&2){let e=m(2);l(),b("(",e.cartItem().UOMName,")")}}function Fn(i,f){if(i&1){let e=F();y(0),M(1,Vn,4,1,"ng-container",8),r(2,"div",12)(3,"div",13)(4,"h6"),c(5," Qty "),M(6,Nn,2,1,"span",8),a(),r(7,"POS-input-quantity",14,0),H("ngModelChange",function(n){g(e);let o=m();return G(o.cartItem().Quantity,n)||(o.cartItem().Quantity=n),_(n)}),a()(),r(9,"div",15)(10,"h6"),c(11,"Discount (%)"),a(),r(12,"input",16),H("ngModelChange",function(n){g(e);let o=m();return G(o.cartItem().Discount,n)||(o.cartItem().Discount=n),_(n)}),a()(),r(13,"div",15)(14,"h6"),c(15,"Price"),a(),r(16,"input",17,1),H("ngModelChange",function(n){g(e);let o=m();return G(o.cartItem().Price,n)||(o.cartItem().Price=n),_(n)}),a()()(),r(18,"div",18)(19,"div",19)(20,"POS-tinymce-editor",20),H("valueChange",function(n){g(e);let o=m();return G(o.cartItem().Note,n)||(o.cartItem().Note=n),_(n)}),a()()(),S()}if(i&2){let e=m();l(),s("ngIf",e.isEditState()==!1),l(5),s("ngIf",e.cartItem().UOMName),l(),$("ngModel",e.cartItem().Quantity),s("decimalPlaces",e.isSerialItem?0:4),l(5),$("ngModel",e.cartItem().Discount),l(4),$("ngModel",e.cartItem().Price),l(4),$("value",e.cartItem().Note)}}function Rn(i,f){i&1&&(y(0),x(1,"i",41),r(2,"h6"),c(3,"No Image"),a(),S())}function Bn(i,f){if(i&1&&x(0,"img",42),i&2){let e=m(2);s("src",e.cartItem().ThumbnailUrl,Ue)}}function Un(i,f){if(i&1&&(y(0),r(1,"tr")(2,"td",43),c(3),v(4,"number"),a(),r(5,"td",43),c(6),v(7,"number"),a(),r(8,"td",43),c(9),v(10,"number"),a()(),S()),i&2){let e=f.ngIf;l(3),b(" ",h(4,3,e==null?null:e.OnHand)," "),l(3),b(" ",h(7,5,e==null?null:e.Allocated)," "),l(3),b(" ",h(10,7,(e==null?null:e.OnHand)-(e==null?null:e.Allocated))," ")}}function jn(i,f){if(i&1){let e=F();r(0,"tr")(1,"th",38),c(2,"Cost"),a(),r(3,"td",44)(4,"input",45),H("ngModelChange",function(n){g(e);let o=m(2);return G(o.cartItem().UnitCost,n)||(o.cartItem().UnitCost=n),_(n)}),a()()()}if(i&2){let e,t=m(2);l(4),$("ngModel",t.cartItem().UnitCost),s("readonly",!(!((e=t.appConfig())==null||e.ModuleSell==null)&&e.ModuleSell.Cost.Enabled))}}function Ln(i,f){if(i&1&&(r(0,"tr")(1,"th",38),c(2,"Content"),a(),r(3,"td",39)(4,"div",46),c(5),v(6,"number"),a()()()),i&2){let e,t=m(2);l(5),Ve(" ",(e=t.cartItem())==null?null:e.VariantUnitQuantity," (@",h(6,2,t.cartItem().Price/((e=t.cartItem())==null?null:e.VariantUnitQuantity)),")")}}function Qn(i,f){if(i&1&&(r(0,"div",36)(1,"table",47)(2,"thead")(3,"tr")(4,"th",48),c(5,"Storage Location"),a()()(),r(6,"tbody")(7,"tr")(8,"td"),c(9),a()()()()()),i&2){let e=m(2);l(9),b(" ",e.cartItem().Storage," ")}}function qn(i,f){if(i&1&&(y(0),r(1,"div",23)(2,"div",24)(3,"a",25),M(4,Rn,4,0,"ng-container",26)(5,Bn,1,1,"ng-template",null,2,ae),a()(),r(7,"div",27)(8,"div",28)(9,"div",19)(10,"div",29),x(11,"i",30),r(12,"div",31),c(13,"Inventory"),a()(),r(14,"table",32)(15,"thead")(16,"tr")(17,"th",33),c(18,"On Hand"),a(),r(19,"th",33),c(20,"Allocated"),a(),r(21,"th",34),c(22,"Available"),a()()(),r(23,"tbody"),M(24,Un,11,9,"ng-container",8),v(25,"async"),a()()()(),r(26,"div",35)(27,"div",36)(28,"table",37)(29,"thead"),M(30,jn,5,2,"tr",8),r(31,"tr")(32,"th",38),c(33,"Price"),a(),r(34,"td",39),c(35),v(36,"number"),a()(),M(37,Ln,7,4,"tr",8),a()()(),M(38,Qn,10,1,"div",40),a()()(),S()),i&2){let e,t,n,o,d,I,X=K(6),L=m();l(3),s("routerLink",je(13,Tn))("queryParams",Q(14,Pn,(e=L.cartItem())==null?null:e.ID)),l(),s("ngIf",((t=L.cartItem())==null?null:t.ThumbnailUrl)==null)("ngIfElse",X),l(20),s("ngIf",h(25,9,L.variantInventory$)),l(6),s("ngIf",((n=L.appConfig())==null||n.ModuleSell==null?null:n.ModuleSell.Cost.Visible)&&L.roleService.product.Cost),l(5),b(" ",h(36,11,(o=L.cartItem())==null?null:o.Price)," "),l(2),s("ngIf",((d=L.cartItem())==null?null:d.VariantUnitQuantity)>1),l(),s("ngIf",((I=L.appConfig())==null||I.ModuleSell==null||I.ModuleSell.Grid==null?null:I.ModuleSell.Grid.StorageVisible)&&((I=L.cartItem())==null?null:I.Storage))}}function Wn(i,f){if(i&1){let e=F();y(0),r(1,"app-item-serial",49),p("cartItemChange",function(n){g(e);let o=m();return _(o.onSerialChanges(n))}),a(),S()}if(i&2){let e=m();l(),s("entityId",e.storeService.outlet().ID)("cartItem",e.cartItem())}}var ft=(()=>{class i{data;dialogRef;storeService=u(T);cartItemService=u(Me);roleService=u(se);modalConfig=new fe;tabState="CART";cartItem;appConfig=N(this.storeService.loadForm()?.AppConfigJSON);isSerialItem=N(!1);variantInventory$;isEditState=N(!1);showProductTab=N(!1);variantSearchCtrl=new we;getItemFromSearch$=this.variantSearchCtrl.valueChanges.pipe(O(e=>C.IsNotEmpty(e)),ee(e=>{if(e.type==="ID")return this.cartItemService.getItemByVariantId(e.str);if(e.type==="Code")return this.cartItemService.getItemByVariantByCode(e.str)}),k(e=>{this.cartItem.set(e),this.initModalTitle(),this.initProductTab(),this.initIsSerialItem(),this.initVariantInventory()}),B());constructor(e,t){this.data=e,this.dialogRef=t,this.cartItem=N(e),this.initVariantInventory(),this.initIsSerialItem(),this.initModalConfig(),this.initDialogState()}ngOnInit(){this.isEditState()||this.getItemFromSearch$.subscribe()}initDialogState(){this.isEditState.set(C.IsNotEmpty(this.cartItem().VariantID)),this.initProductTab()}initVariantInventory(){this.variantInventory$=this.cartItemService.getVariantInventory(this.cartItem().VariantID).pipe(Re(1))}initProductTab(){this.showProductTab.set(C.IsNotEmpty(this.cartItem().VariantID))}initIsSerialItem(){this.isSerialItem.set(this.cartItem().TypeID==Qt.Serialized)}initModalConfig(){this.initModalTitle(),this.modalConfig.customWidth="680px",this.modalConfig.noPadding=!0,this.modalConfig.bodyScrollable=!0}initModalTitle(){this.modalConfig.title=this.cartItem()?.Name??"Add Variant"}onSerialChanges(e){this.cartItem.set(e)}onCancel(){this.dialogRef.close()}onSave(){this.dialogRef.close(this.cartItem())}static \u0275fac=function(t){return new(t||i)(z(pe),z(me))};static \u0275cmp=D({type:i,selectors:[["app-dialog-item"]],standalone:!0,features:[E],decls:13,vars:9,consts:[["quantity",""],["price",""],["SHOW_IMAGE",""],[3,"onOk","onCancel","onClose","config"],[1,"mb-5"],[1,"container","w-100","h-100","mt-8"],[1,"row","border-bottom","mx-5"],["data-cy","input_sell",1,"btn","btn-link",3,"click","ngClass"],[4,"ngIf"],[1,"mx-8"],["data-cy","product",1,"btn","btn-link",3,"click","ngClass"],["data-cy","serial",1,"btn","btn-link",3,"click","ngClass"],[1,"row","mt-8"],[1,"col-auto","pe-0",2,"width","145px"],[3,"ngModelChange","ngModel","decimalPlaces"],[1,"col-auto","pe-0"],["type","text","percentage","","autoNum","",1,"form-control","input-cart",2,"width","100px",3,"ngModelChange","ngModel"],["id","inputPrice","type","text","autoNum","",1,"form-control","input-cart",2,"width","112px",3,"ngModelChange","ngModel"],[1,"row","my-6"],[1,"col-12"],["height","220px",3,"valueChange","value"],[1,"col-12","px-0"],[3,"formControl"],[1,"row","my-8"],[1,"col-sm-4","d-flex","justify-content-center","flex-column","align-items-center","text-body-secondary"],["target","_blank",2,"color","inherit",3,"routerLink","queryParams"],[4,"ngIf","ngIfElse"],[1,"col-sm-8","inventory"],[1,"row","mb-8"],[1,"d-flex"],["aria-hidden","true",1,"fa-archive","fa-solid","fa-1x","pt-3","pe-2"],[2,"font-size","15px","font-family","'Roboto Slab'"],[1,"table","table-bordered","text-center","inventory-table"],[1,"table-light","py-6","border-end",2,"text-transform","none"],[1,"table-light","py-6",2,"text-transform","none"],[1,"row"],[1,"col-6"],[1,"table","table-bordered",2,"width","171px"],[1,"table-light",2,"text-transform","none"],[1,"pe-6","text-end"],["class","col-6",4,"ngIf"],["aria-hidden","true",1,"fa-solid","fa-image","fa-5x"],[1,"border","rounded",3,"src"],[1,"py-6"],[1,"p-0"],["type","text","autoNum","",1,"form-control","border-0","bg-white","text-end",3,"ngModelChange","ngModel","readonly"],["ngClass","ms-3"],[1,"table","table-bordered","text-center"],[1,"table-light"],[3,"cartItemChange","entityId","cartItem"]],template:function(t,n){t&1&&(r(0,"modal-material",3),p("onOk",function(){return n.onSave()})("onCancel",function(){return n.onCancel()})("onClose",function(){return n.onCancel()}),r(1,"content",4)(2,"div",5)(3,"div",6)(4,"div")(5,"a",7),p("click",function(){return n.tabState="CART"}),c(6," Cart "),a(),M(7,kn,3,3,"ng-container",8)(8,An,3,3,"ng-container",8),a()(),r(9,"div",9),M(10,Fn,21,7,"ng-container",8)(11,qn,39,16,"ng-container",8)(12,Wn,2,2,"ng-container",8),a()()()()),t&2&&(s("config",n.modalConfig),l(5),s("ngClass",Q(7,ut,n.tabState=="CART")),l(2),s("ngIf",n.showProductTab()),l(),s("ngIf",n.isSerialItem()),l(2),s("ngIf",n.tabState=="CART"),l(),s("ngIf",n.tabState=="PRODUCT"),l(),s("ngIf",n.tabState=="SERIAL"))},dependencies:[w,le,q,Ee,te,_e,ge,rn,oe,ne,Y,ie,ue,de,Kt,zt,Qe,Le,Ze,Te,Oe,Yt,Jt,gn],styles:[".bg-light-gray[_ngcontent-%COMP%]{background-color:var(--bs-light-gray);--bs-bg-opacity: .15 !important}.bg-gradient-danger[_ngcontent-%COMP%]{background:repeating-linear-gradient(-60deg,#f8d7da,#f8d7da 15px,#f5c6cb 15px 30px)!important}.bg-gradient-success[_ngcontent-%COMP%]{background:repeating-linear-gradient(-60deg,#beeebb,#beeebb 15px,#afeba8 15px 30px)!important}.bg-gradient-warning[_ngcontent-%COMP%]{background:repeating-linear-gradient(-60deg,#fcf3cf,#fcf3cf 15px,#f9e79f 15px 30px)!important}.bg-light-orange[_ngcontent-%COMP%]{background-color:var(--bs-light-orange);--bs-bg-opacity: .15 !important}.text-danger[_ngcontent-%COMP%]{color:#fb404b!important}.text-dark[_ngcontent-%COMP%]{color:#5e5e5e!important}.text-success[_ngcontent-%COMP%]{color:#87cb16!important}.text-black[_ngcontent-%COMP%]{color:#000!important}.text-white[_ngcontent-%COMP%]{color:var(--bs-white)!important}.btn-light-blue[_ngcontent-%COMP%]{color:#212529;background-color:#dfeffc!important;border-color:#dfeffc}.btn-light-blue[_ngcontent-%COMP%]:hover{color:#212529;background-color:#bcdef9;border-color:#b0d8f8}.btn-light-blue[_ngcontent-%COMP%]:focus, .btn-light-blue.focus[_ngcontent-%COMP%]{color:#212529;background-color:#bcdef9;border-color:#b0d8f8;box-shadow:0 0 0 .2rem #c3d1dc80}.btn-light-blue.disabled[_ngcontent-%COMP%], .btn-light-blue[_ngcontent-%COMP%]:disabled{color:#212529;background-color:#dfeffc;border-color:#dfeffc}.btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled):active, .btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled).active, .show[_ngcontent-%COMP%] > .btn-light-blue.dropdown-toggle[_ngcontent-%COMP%]{color:#212529;background-color:#b0d8f8;border-color:#a5d2f7}.btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled):active:focus, .btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled).active:focus, .show[_ngcontent-%COMP%] > .btn-light-blue.dropdown-toggle[_ngcontent-%COMP%]:focus{box-shadow:0 0 0 .2rem #c3d1dc80}.inventory-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%], .inventory-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{line-height:6px!important}.btn-link[_ngcontent-%COMP%]{padding-top:0;color:#868686;padding-bottom:8px;border-radius:unset;font-family:Roboto Slab,serif}.btn-link.selected[_ngcontent-%COMP%]{color:#3b3b3b;border-bottom:4px solid #07a519}.input-cart[_ngcontent-%COMP%]{height:36px!important}"]})}return i})();var _n=(()=>{class i{data;dialogRef;modalConfig;constructor(e,t){this.data=e,this.dialogRef=t,this.modalConfig=new fe,this.modalConfig.title=e.title,this.modalConfig.headerType=e.headerType}onOk(){this.dialogRef.close(!0)}onClose(){this.dialogRef.close(!1)}static \u0275fac=function(t){return new(t||i)(z(pe),z(me))};static \u0275cmp=D({type:i,selectors:[["app-confirmation-modal"]],standalone:!0,features:[E],decls:4,vars:2,consts:[[3,"onClose","onCancel","onOk","config"],[1,"container-fluid","modal-info"],[3,"innerHTML"]],template:function(t,n){t&1&&(r(0,"modal-material",0),p("onClose",function(){return n.onClose()})("onCancel",function(){return n.onClose()})("onOk",function(){return n.onOk()}),r(1,"content")(2,"div",1),x(3,"div",2),a()()()),t&2&&(s("config",n.modalConfig),l(3),s("innerHTML",n.data==null?null:n.data.message,Be))},dependencies:[Bt,w,_e,ge],styles:[".modal-info[_ngcontent-%COMP%] .empty-state-img[_ngcontent-%COMP%]{width:100px}.modal-info[_ngcontent-%COMP%] .img-1x[_ngcontent-%COMP%]{width:12rem}.modal-info[_ngcontent-%COMP%] .img-2x[_ngcontent-%COMP%]{width:10rem}.modal-info[_ngcontent-%COMP%] .img-3x[_ngcontent-%COMP%]{width:8rem}"]})}return i})();var Me=(()=>{class i{httpService=u(Z);storeService=u(T);factoryService=u(ke);dialog=u(re);variantSearchCtrl=new we;viewContainerRef=u(bt);cartItemEvent=new _t;cartItems$=this.cartItemEvent.pipe(xt((e,t)=>{let n=[];switch(t.action){case"ADD":n=this.addNewItem(e,t);break;case"UPDATE":n=this.updateItems(e,t);break;case"REMOVE":n=e.filter((o,d)=>t.index!==d);break;case"CLEAR":n=[];break;case"PURCHASE":n=this.updateItems(e,t);break;case"RETURN":n=this.updateItems(e,t);break;case"DROP":n=t.items;break}return this.storeService.updateCartItems(n),n},this.storeService.cartItems()));addCartItemBySearch$=this.variantSearchCtrl.valueChanges.pipe(O(e=>C.IsNotEmpty(e)),k(e=>{e.type==="ID"?this.addItemByVariantId(e.str):e.type==="Code"&&this.addItemByVariantCode(e.str)}),B());constructor(){this.addCartItemBySearch$.subscribe()}onOpenAddDialog(){this.dialog.open(ft,{data:new he,viewContainerRef:this.viewContainerRef}).afterClosed().pipe(O(e=>C.IsNotEmpty(e))).subscribe(e=>{this.cartItemEvent.next({item:e,action:"ADD",newRow:!0})})}onOpenEditDialog(e){this.dialog.open(ft,{data:V({},e.cartItem),viewContainerRef:this.viewContainerRef}).afterClosed().pipe(O(t=>C.IsNotEmpty(t))).subscribe(t=>{this.cartItemEvent.next({item:t,action:"UPDATE",index:e.index})})}onSelectQuickkeyItem(e){this.addItemByVariantId(e)}addNewItem(e,t){let n=[],o=e.find(d=>d.VariantID===t.item?.VariantID);return o?t.newRow?n=[...e,t.item]:(o.Quantity+=1,n=[...e]):n=[...e,t.item],n}updateItems(e,t){return e.map((o,d)=>d===t.index?qt(he,t.item):o)}onDropItems(e){this.cartItemEvent.next({action:"DROP",items:e})}addItemByVariantId(e){this.getItemByVariantId(e).pipe(k(t=>{this.cartItemEvent.next({item:t,action:"ADD",newRow:!1})})).subscribe()}addItemByVariantCode(e){this.getItemByVariantByCode(e).pipe(k(t=>{this.cartItemEvent.next({item:t,action:"ADD",newRow:!1})})).subscribe()}removeCartItem(e){this.cartItemEvent.next({action:"REMOVE",index:e.index})}updateCartItem(e){this.cartItemEvent.next({action:"UPDATE",item:e.cartItem,index:e.index})}clearCart(){this.dialog.open(_n,{data:{title:"Clear Order Items",message:"<h3>Are you sure you want to clear all order items?</h3>",headerType:be.Warning}}).afterClosed().pipe(O(e=>e)).subscribe(()=>{this.cartItemEvent.next({action:"CLEAR"})})}onPurchaseItem(e){this.cartItemEvent.next({action:"PURCHASE",item:e.cartItem,index:e.index})}onReturnItem(e){this.cartItemEvent.next({action:"RETURN",item:e.cartItem,index:e.index})}getItemByVariantId(e){let t={entityID:this.storeService.outlet().ID,id:e};return this.httpService.post(Se.GetVariantByID,t).pipe(ye(n=>this.factoryService.generateCartItem(n)))}getItemByVariantByCode(e){let t={Promotion:!0,entityID:this.storeService.outlet().ID,code:e};return this.httpService.post(Se.GetVariantByCode,t).pipe(ye(n=>this.factoryService.generateCartItem(n)))}getVariantInventory(e){let t={entityID:this.storeService.outlet().ID,variantID:e};return this.httpService.post("/API/catalog/variant/GetInventoryByVariantID",t)}static \u0275fac=function(t){return new(t||i)};static \u0275prov=A({token:i,factory:i.\u0275fac})}return i})();function $n(i,f){if(i&1&&(r(0,"td",29),c(1),a()),i&2){let e=m().index;l(),b("",e+1,".")}}function Gn(i,f){if(i&1&&(y(0),r(1,"div",30),x(2,"img",31),a(),S()),i&2){let e=m().$implicit;l(2),s("src",e.ThumbnailUrl,Ue)}}function Hn(i,f){i&1&&(r(0,"div",32),x(1,"i",33),a())}function zn(i,f){if(i&1&&(y(0),r(1,"span",24),c(2),v(3,"number"),a(),S()),i&2){let e=m().$implicit;l(2),U(at(3,1,e.Quantity,"1.0-4"))}}function Kn(i,f){if(i&1&&(y(0),r(1,"span",34),c(2,"x"),a(),r(3,"div",35)(4,"span",36),c(5),v(6,"number"),a()(),S()),i&2){let e=m().$implicit;l(5),U(h(6,1,e.UnitQuantity))}}function Jn(i,f){if(i&1&&(y(0),r(1,"span",37),c(2),v(3,"number"),a(),S()),i&2){let e=m().$implicit;l(2),b("@",h(3,1,e.VariantUnitQuantity),"")}}function Yn(i,f){if(i&1&&(y(0),r(1,"small",38),c(2),a(),S()),i&2){let e=m().$implicit;l(2),U(e.UOM?e==null?null:e.UOMName:"")}}function Xn(i,f){if(i&1&&(y(0),r(1,"div",39),c(2),v(3,"number"),a(),S()),i&2){let e=m().$implicit;l(2),b(" ",at(3,1,e.Price,"1.0-4")," ")}}function Zn(i,f){if(i&1){let e=F();y(0),r(1,"tr",9),p("contextmenu",function(n){let o=g(e),d=o.$implicit,I=o.index,X=m(2);return _(X.onContextMenu(n,d,I))}),M(2,$n,2,1,"td",10),r(3,"td",11),p("click",function(){let n=g(e),o=n.$implicit,d=n.index,I=m(2);return _(I.onEdit(o,d))}),r(4,"div",12),M(5,Gn,3,1,"ng-container",3)(6,Hn,2,0,"ng-template",null,2,ae),r(8,"div",13)(9,"div"),c(10),a(),r(11,"span",14),c(12),a(),r(13,"div"),x(14,"app-serial-note",15),a(),x(15,"small",16),a()()(),r(16,"td",17),p("click",function(){let n=g(e),o=n.$implicit,d=n.index,I=m(2);return _(I.onEdit(o,d))}),r(17,"div",18)(18,"div",19),M(19,zn,4,4,"ng-container",20)(20,Kn,7,3,"ng-container",20)(21,Jn,4,3,"ng-container",20)(22,Yn,3,1,"ng-container",20),a()()(),r(23,"td",21),p("click",function(){let n=g(e),o=n.$implicit,d=n.index,I=m(2);return _(I.onEdit(o,d))}),M(24,Xn,4,4,"ng-container",20),a(),r(25,"td",21),p("click",function(){let n=g(e),o=n.$implicit,d=n.index,I=m(2);return _(I.onEdit(o,d))}),r(26,"div",22),c(27),v(28,"number"),a()(),r(29,"td",23),p("click",function(){let n=g(e),o=n.$implicit,d=n.index,I=m(2);return _(I.onEdit(o,d))}),r(30,"div",18)(31,"div",24),c(32),v(33,"number"),a()()(),r(34,"td",25)(35,"div",26)(36,"span",27),p("click",function(){let n=g(e),o=n.$implicit,d=n.index,I=m(2);return _(I.onRemove(o,d))}),x(37,"i",28),a()()()(),S()}if(i&2){let e=f.$implicit,t=K(7),n=m(2);l(2),s("ngIf",n.appConfig==null?null:n.appConfig.ModuleSell.Grid.RowNumberVisible),l(3),s("ngIf",e.ThumbnailUrl)("ngIfElse",t),l(5),U(e.Name),l(2),U(e.Code),l(2),s("serials",e==null?null:e.Serial),l(),s("innerHtml",e.Note,Be),l(4),s("ngIf",e.Quantity!==1&&e.Quantity!==0||e.UnitQuantity>1||e.VariantUnitQuantity>1),l(),s("ngIf",e.UnitQuantity>1),l(),s("ngIf",e.VariantUnitQuantity>1),l(),s("ngIf",e.UOM&&(n.appConfig==null||n.appConfig.ModuleSell==null?null:n.appConfig.ModuleSell.Grid.UOMVisible)),l(2),s("ngIf",e.Price!==e.Total),l(3),b(" ",e.Discount?h(28,14,e.Discount*-1)+"%":""," "),l(5),U(n.roleService.product!=null&&n.roleService.product.Price?h(33,16,e.Total):" - ")}}function ei(i,f){if(i&1){let e=F();y(0),r(1,"table",6)(2,"tbody",7),p("cdkDropListDropped",function(n){g(e);let o=m();return _(o.onDrop(n))}),M(3,Zn,38,18,"ng-container",8),a()(),S()}if(i&2){let e=m();l(3),s("ngForOf",e.cartItems)}}function ti(i,f){i&1&&(r(0,"div",40)(1,"div",41)(2,"div",42)(3,"div",43)(4,"div",44),x(5,"i",45),a(),r(6,"div",46)(7,"span"),c(8,"Empty Cart"),a(),x(9,"br"),r(10,"span"),c(11,"Add products to the cart"),a(),x(12,"br"),r(13,"span"),c(14,"or scan barcode"),a()()()()()())}function ni(i,f){if(i&1){let e=F();r(0,"button",47),p("click",function(){let n=g(e).item,o=m();return _(o.onReverse(n,!0))}),c(1,"Return"),a(),r(2,"button",47),p("click",function(){let n=g(e).item,o=m();return _(o.onReverse(n,!1))}),c(3,"Purchase"),a()}}var Cn=(()=>{class i{roleService=u(se);appConfig;cartItems=[];set _cartItems(e){e&&(this.cartItems=[...e])}onRemoveEvent=new R;onEditEvent=new R;onDropItems=new R;onReturnEvent=new R;onPurchaseEvent=new R;contextMenu;contextMenuPosition={x:"0px",y:"0px"};onContextMenu(e,t,n){e.preventDefault(),this.contextMenuPosition.x=e.clientX+"px",this.contextMenuPosition.y=e.clientY+"px",t.Index=n,this.contextMenu.menuData={item:t},this.contextMenu.openMenu()}onDrop(e){Vt(this.cartItems,e.previousIndex,e.currentIndex),this.onDropItems.emit(this.cartItems)}onEdit(e,t){this.onEditEvent.emit({cartItem:e,index:t})}onRemove(e,t){this.onRemoveEvent.emit({cartItem:e,index:t})}onReverse(e,t){let n=e.Index;t?(e.Quantity>0&&(e.Quantity=e.Quantity*-1),this.onReturnEvent.emit({cartItem:e,index:n})):(e.Quantity<0&&(e.Quantity=e.Quantity*-1),this.onPurchaseEvent.emit({cartItem:e,index:n}))}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=D({type:i,selectors:[["POS-cart-display"]],viewQuery:function(t,n){if(t&1&&Mt(Ye,7),t&2){let o;Dt(o=Et())&&(n.contextMenu=o.first)}},inputs:{appConfig:"appConfig",_cartItems:[yt.None,"cartItems","_cartItems"]},outputs:{onRemoveEvent:"onRemove",onEditEvent:"onEdit",onDropItems:"onDropItems",onReturnEvent:"onReturn",onPurchaseEvent:"onPurchase"},standalone:!0,features:[E],decls:7,vars:7,consts:[["EMPTY_CART",""],["contextMenu","matMenu"],["NO_IMAGE",""],[4,"ngIf","ngIfElse"],[2,"visibility","hidden","position","fixed",3,"matMenuTriggerFor"],["matMenuContent",""],[1,"table","table-borderless"],["cdkDropList","",3,"cdkDropListDropped"],[4,"ngFor","ngForOf"],["cdkDrag","",1,"border-bottom",3,"contextmenu"],["style","width: 10px;",4,"ngIf"],[1,"pe-0",2,"width","50%",3,"click"],[1,"d-flex","align-items-center"],[1,"d-block","ms-4",2,"line-height","18px"],[1,"fw-normal","fs-6","text-muted"],[3,"serials"],["title","Note",1,"special-TinyMCE","m-0","fst-italic","d-block",3,"innerHtml"],[1,"px-0","text-end",2,"width","15%",3,"click"],[1,"d-flex","align-items-center","justify-content-end"],[1,"d-flex","text-end","fw-normal","align-items-center",2,"line-height","20px"],[4,"ngIf"],[3,"click"],[1,"fw-normal","fs-5","text-danger"],[1,"pe-0",3,"click"],[1,"fs-5"],[1,"mt-6","ps-0"],[1,"d-flex","justify-content-end","align-items-center"],["role","button","title","Delete Item",1,"fs-3","cursor-pointer",3,"click"],[1,"fa","fa-trash","text-danger","fs-4"],[2,"width","10px"],[1,"ratio","ratio-1x1",2,"width","55px"],[1,"item-image",3,"src"],[1,"item-image","d-flex","justify-content-center","align-items-center","text-center","fs-1"],[1,"fa-solid","fa-image",2,"color","#b4b4b4c2"],[1,"fs-6","me-1","ms-1"],[1,"d-flex","algin-items-center"],["title","Unit Quantity",1,"fs-5","me-1"],["title","Variant Unit Quantity",1,"fs-5"],["title","UOM",1,"ps-1","fs-5"],[1,"fs-5","text-end"],[1,"row","g-0","h-100"],[1,"col-12"],[1,"d-flex","justify-content-center","align-items-center","h-100"],[1,"row"],[1,"col-12","d-flex","justify-content-center"],[1,"fa-regular","fa-cart-arrow-up","text-secondary",2,"font-size","110px"],[1,"col-12","justify-content-center","text-center","mt-5","empty-cart-description","text-secondary","headings-font-family"],["mat-menu-item","",3,"click"]],template:function(t,n){if(t&1&&(M(0,ei,4,1,"ng-container",3)(1,ti,15,0,"ng-template",null,0,ae),x(3,"div",4),r(4,"mat-menu",null,1),M(6,ni,4,0,"ng-template",5),a()),t&2){let o=K(2),d=K(5);s("ngIf",n.cartItems.length>0)("ngIfElse",o),l(3),It("left",n.contextMenuPosition.x)("top",n.contextMenuPosition.y),s("matMenuTriggerFor",d)}},dependencies:[w,ce,q,te,Rt,Ft,Nt,mn,on,nn,tn,Zt,en,Ye],styles:[".item-image[_ngcontent-%COMP%]{height:50px;width:56px;display:block;border:solid 1px #dddddd;border-radius:5px;object-fit:contain}.example-menu[_ngcontent-%COMP%]{display:inline-flex;flex-direction:column;min-width:180px;max-width:280px;background-color:#fff;padding:6px 0}.example-menu-item[_ngcontent-%COMP%]{background-color:transparent;cursor:pointer;border:none;-webkit-user-select:none;user-select:none;min-width:64px;line-height:36px;padding:0 16px;display:flex;align-items:center;flex-direction:row;flex:1}.example-menu-item[_ngcontent-%COMP%]:hover{background-color:#f5f5f5}.example-menu-item[_ngcontent-%COMP%]:active{background-color:#dcdcdc}.table[_ngcontent-%COMP%] > [_ngcontent-%COMP%]:not(caption) > *[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{padding:12px 10px} .cdk-menu.cdk-menu-group.example-menu{box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.empty-cart-description[_ngcontent-%COMP%]{font-size:14px;font-weight:500;color:#c7c7c7}"]})}return i})();function ri(i,f){if(i&1&&(r(0,"mat-option",6),c(1),a()),i&2){let e=f.$implicit;s("value",e),l(),b(" ",e.Value," ")}}var vn=(()=>{class i{httpService=u(Z);customerCtrl=new we;customerFiltered$=this.customerCtrl.valueChanges.pipe(O(e=>typeof e=="string"&&e.length>=3),vt(300),ee(e=>this.getCustomerSuggestion(e)));customerSelected$=this.customerCtrl.valueChanges.pipe(O(e=>typeof e!="string"),k(e=>{this.onChange(e)}));createNewCustomer=new R;constructor(){this.customerSelected$.pipe(B()).subscribe()}getCustomerSuggestion(e){return this.httpService.post("/API/AC/GetCustomerSuggestion",{count:100,prefix:e})}displayFn(e){return e?.Value}onCreateCustomer(){this.createNewCustomer.emit()}onChange=e=>{};onTouched=()=>{};writeValue(e){this.customerCtrl.patchValue(e,{onlySelf:!0,emitEvent:!1})}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=D({type:i,selectors:[["POS-customer-autocomplete"]],outputs:{createNewCustomer:"onCreateNewCustomer"},standalone:!0,features:[De([{provide:qe,multi:!0,useExisting:i}]),E],decls:7,vars:6,consts:[["auto","matAutocomplete"],[1,"d-flex","align-items-center","position-relative"],["matTooltipPosition","above","matTooltip","New Customer","role","button",1,"fa-light","fa-user-plus","position-absolute","cursor-pointer",2,"font-size","12px",3,"click"],["type","text","placeholder","Assign Customer",3,"formControl","matAutocomplete"],[3,"displayWith"],[3,"value",4,"ngFor","ngForOf"],[3,"value"]],template:function(t,n){if(t&1){let o=F();r(0,"div",1)(1,"i",2),p("click",function(){return g(o),_(n.onCreateCustomer())}),a(),x(2,"input",3),r(3,"mat-autocomplete",4,0),M(5,ri,2,2,"mat-option",5),v(6,"async"),a()()}if(t&2){let o=K(4);l(2),s("formControl",n.customerCtrl)("matAutocomplete",o),l(),s("displayWith",n.displayFn),l(2),s("ngForOf",h(6,4,n.customerFiltered$))}},dependencies:[w,ce,Ee,Lt,Ut,At,jt,Te,ne,Y,Oe,$e,We,Je],styles:["input[_ngcontent-%COMP%]{width:100%;height:38px!important;border-radius:.375rem;border:1px solid #ced4da;padding-left:32px}input[_ngcontent-%COMP%]::placeholder{color:#ced4da}i[_ngcontent-%COMP%]{font-size:16px;top:12px;left:11px}"]})}return i})();var gt=(()=>{class i{storeService=u(T);dialog=u(re);createNewCustomer(){this.dialog.open(Xt,{data:{options:this.storeService.loadForm()?.EstimateOptions,config:this.storeService.loadForm()?.AppConfigJSON?.ModuleContact,type:"customer",title:"New Customer Form"}}).afterClosed().pipe(O(e=>C.IsNotEmpty(e))).subscribe(e=>{let t=new ve;t.Key=e.CustomerID,t.Value=e.ContactName,this.storeService.updateCustomer(t)})}onSelectCustomer(e){this.storeService.updateCustomer(e)}static \u0275fac=function(t){return new(t||i)};static \u0275prov=A({token:i,factory:i.\u0275fac})}return i})();var hn=(()=>{class i{clickEvent=new R;onClick(){this.clickEvent.emit()}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=D({type:i,selectors:[["app-note-button"]],outputs:{clickEvent:"onClickEvent"},standalone:!0,features:[E],decls:2,vars:0,consts:[["type","button",1,"btn","btn-gray","w-100","fs-3","px-0","py-6","headings-font-family",3,"click"],[1,"fa-regular","fa-note-sticky","fa-xl"]],template:function(t,n){t&1&&(r(0,"button",0),p("click",function(){return n.onClick()}),x(1,"i",1),a())},dependencies:[w],styles:[".btn-gray[_ngcontent-%COMP%]{border:1px solid #d6d6d6;color:#545454!important;background:linear-gradient(to bottom,#fff,#eee)}"]})}return i})();function ai(i,f){if(i&1&&(r(0,"div"),c(1),v(2,"number"),a()),i&2){let e=m();l(),b(" ",h(2,1,e.totalAmount)," ")}}function li(i,f){i&1&&c(0," - ")}var xn=(()=>{class i{payEvent=new R;totalItems=0;totalAmount=0;rolePrice=!0;constructor(){}ngOnInit(){}onPay(){this.payEvent.emit()}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=D({type:i,selectors:[["app-pay-button"]],inputs:{totalItems:"totalItems",totalAmount:"totalAmount",rolePrice:"rolePrice"},outputs:{payEvent:"onPayEvent"},standalone:!0,features:[E],decls:11,vars:5,consts:[["HIDDENCOST",""],["type","button",1,"btn","btn-success","fs-1","py-4","w-100",3,"click"],[1,"d-flex","align-items-center","justify-content-between"],[1,"fs-6"],[4,"ngIf","ngIfElse"]],template:function(t,n){if(t&1){let o=F();r(0,"button",1),p("click",function(){return g(o),_(n.onPay())}),r(1,"div",2)(2,"div")(3,"span"),c(4,"Pay"),a(),r(5,"small",3),c(6),v(7,"number"),a()(),M(8,ai,3,3,"div",4)(9,li,1,0,"ng-template",null,0,ae),a()()}if(t&2){let o=K(10);l(6),b(" (",h(7,3,n.totalItems)," Items) "),l(2),s("ngIf",n.rolePrice)("ngIfElse",o)}},dependencies:[w,q,te],styles:["button[_ngcontent-%COMP%]{border-right:.1px solid #fff;margin-left:-1px;border-top-left-radius:0;border-bottom-left-radius:0;position:relative;flex:1 1 auto;border-left:.1px solid #fff}"]})}return i})();var yn=(()=>{class i{clickEvent=new R;onClick(){this.clickEvent.emit()}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=D({type:i,selectors:[["app-discount-button"]],outputs:{clickEvent:"onClickEvent"},standalone:!0,features:[E],decls:2,vars:0,consts:[["type","button","matTooltip","Discount / Tax","matTooltipPosition","above",1,"btn","btn-success","fs-5",3,"click"],[1,"fa-light","fa-percent"]],template:function(t,n){t&1&&(r(0,"button",0),p("click",function(){return n.onClick()}),x(1,"i",1),a())},dependencies:[w,$e,We],styles:["button[_ngcontent-%COMP%]{border-right:.1px solid #fff;border-top-right-radius:0;border-bottom-right-radius:0;position:relative;flex:1 1 auto}"]})}return i})();var ot=(()=>{class i{store=u(T);toastr=u(Pt);dialog=u(re);updateState$=W(this.store.complete).pipe(O(e=>e.Success),k(()=>this.store.updateState(j.COMPLETE)),B());constructor(){this.updateState$.subscribe()}onPay(){if(this.validatePayOrder()==!1)return;let e={Items:this.store.cartItems(),Order:V({},this.store.order())};this.dialog.open(dn,{data:{transactionData:e,api:Se.SubmitEstimate}}).afterClosed().pipe(O(t=>C.IsNotEmpty(t))).subscribe(t=>{this.store.updateComplete(t)})}validatePayOrder(){let e=!0;return C.IsEmpty(this.store.outlet().ID)&&(this.toastr.error("Please select outlet before proceeding..",be.Error),e=!1),C.IsEmpty(this.store.customer().Key)&&(this.toastr.warning("Please select a customer!",be.Warning),e=!1),this.store.cartItems().length==0&&(this.toastr.error("You must have at least one item.",be.Error),e=!1),C.IsEmpty(this.store.order().Number)&&(this.toastr.error("Number cannot be empty.",be.Error),e=!1),e}static \u0275fac=function(t){return new(t||i)};static \u0275prov=A({token:i,factory:i.\u0275fac})}return i})();var Sn=(()=>{class i{dialogRef;modalConfig=new fe;discountAmount=N(0);discount=N(0);tax;discounts=N([0,0,0]);currency;taxes=N([]);constructor(e,t){this.dialogRef=t,this.discountAmount.set(e.discountAmount),this.discount.set(e.discount),this.tax=N(e.tax),this.currency=N(e.currency),this.taxes.set(e.taxes),this.initModalConfig()}initModalConfig(){this.modalConfig.title="Discount and Tax",this.modalConfig.customWidth="400px"}onClose(){this.dialogRef.close()}onSave(){this.dialogRef.close({discountAmount:this.discountAmount(),discount:this.discount(),tax:this.tax()})}onSelectTax(e){this.tax.set(e)}onDiscountCalculatorChange(e,t){let n=this.discounts();n[t]=e,this.discounts.set(n),this.calculateDiscountCalculator()}calculateDiscountCalculator(){let e=this.discounts(),t=100;e.forEach(o=>{o&&o>0&&(t=t*(100-o)/100)});let n=100-t;this.discount.set(n)}static \u0275fac=function(t){return new(t||i)(z(pe),z(me))};static \u0275cmp=D({type:i,selectors:[["app-dialog-discount"]],standalone:!0,features:[E],decls:48,vars:10,consts:[[3,"keydown.F2","onOk","onCancel","onClose","config"],[1,"container"],["matTooltipPosition","above","matTooltip","Discount","tabTitle","Discount"],[1,"row","d-flex","align-items-center","justify-content-start"],[1,"col-3"],[1,"fw-bold","d-block"],[1,"col-9"],["type","text","data-cy","discount1","autoNum","","percentage","","decimalPlaces","2",1,"form-control","d-inline-block",2,"width","100px",3,"ngModelChange","ngModel"],[1,"ms-1"],[1,"row","d-flex","align-items-center","justify-content-start","mt-6"],["type","text","data-cy","discountamount","autoNum","",1,"form-control","d-inline-block",2,"width","100px",3,"ngModelChange","ngModel"],["matTooltipPosition","above","matTooltip","Tax","tabTitle","Tax"],["bindLabel","Label","appendTo","body","bindValue","ID","placeholder","Tax","data-cy","Tax",2,"width","150px",3,"change","clearable","ngModel","items"],["matTooltipPosition","above","matTooltip","Calculation","tabTitle","Calculator"],[1,"row","mt-6","g-0","d-flex","align-items-center","justify-content-start"],[1,"col-4"],[1,"col-8","ps-4"],["type","text","data-cy","discountCal1","autoNum","","percentage","",1,"form-control","d-inline-block",2,"width","47px",3,"ngModelChange","ngModel"],[1,"mx-2"],["type","text","data-cy","discountCal2","autoNum","","percentage","",1,"form-control","d-inline-block",2,"width","47px",3,"ngModelChange","ngModel"],["type","text","data-cy","discountCal3","autoNum","","percentage","",1,"form-control","d-inline-block",2,"width","47px",3,"ngModelChange","ngModel"]],template:function(t,n){if(t&1&&(r(0,"modal-material",0),p("keydown.F2",function(){return n.onSave()})("onOk",function(){return n.onSave()})("onCancel",function(){return n.onClose()})("onClose",function(){return n.onClose()}),r(1,"content")(2,"div",1)(3,"custom-tabs"),y(4),r(5,"tab",2)(6,"div",3)(7,"div",4)(8,"label",5),c(9,"Discount %"),a()(),r(10,"div",6)(11,"input",7),H("ngModelChange",function(d){return G(n.discount,d)||(n.discount=d),d}),a(),r(12,"span",8),c(13,"%"),a()()(),r(14,"div",9)(15,"div",4)(16,"label",5),c(17),a()(),r(18,"div",6)(19,"input",10),H("ngModelChange",function(d){return G(n.discountAmount,d)||(n.discountAmount=d),d}),a()()()(),S(),y(20),r(21,"tab",11)(22,"div",3)(23,"div",4)(24,"label",5),c(25,"Tax"),a()(),r(26,"div",6)(27,"ng-select",12),p("change",function(d){return n.onSelectTax(d)}),a()()()(),S(),y(28),r(29,"tab",13)(30,"div",14)(31,"div",15)(32,"label",5),c(33,"Discount Calculator"),a()(),r(34,"div",16)(35,"input",17),p("ngModelChange",function(d){return n.onDiscountCalculatorChange(d,0)}),a(),r(36,"span"),c(37," %"),a(),r(38,"span",18),c(39,"+"),a(),r(40,"input",19),p("ngModelChange",function(d){return n.onDiscountCalculatorChange(d,1)}),a(),r(41,"span"),c(42," %"),a(),r(43,"span",18),c(44,"+"),a(),r(45,"input",20),p("ngModelChange",function(d){return n.onDiscountCalculatorChange(d,2)}),a(),r(46,"span"),c(47," %"),a()()()(),S(),a()()()()),t&2){let o;s("config",n.modalConfig),l(11),$("ngModel",n.discount),l(6),b("Discount ",(o=n.currency())==null?null:o.Symbol,""),l(2),$("ngModel",n.discountAmount),l(8),s("clearable",!1)("ngModel",n.tax().ID)("items",n.taxes()),l(8),s("ngModel",n.discounts[0]),l(5),s("ngModel",n.discounts[1]),l(5),s("ngModel",n.discounts[2])}},dependencies:[w,_e,ge,Xe,Ke,ze,oe,ne,Y,ie,He,Ge,ue,de]})}return i})();var Ae=(()=>{class i{storeService=u(T);totalItems=J(()=>this.storeService.cartItems().reduce((n,o)=>n+o.Quantity,0));totalItemsAmount=J(()=>this.storeService.cartItems().reduce((n,o)=>n+o.Total,0));taxAmount=J(()=>{let e=this.storeService.tax(),t=0;return e.Rate>0&&(e.CalculationTypeID==Ce.Include?t=this.calculateTaxInclude(e):t=this.calculateTaxAdd(e)),t});totalAmount=J(()=>{let e=this.storeService.tax(),t=this.storeService.order().DiscountAmount,n=this.storeService.order().Discount,o=this.totalItemsAmount(),d=this.calculatePercentagDisc(n,o),I=o-t-d;return e.CalculationTypeID==Ce.Add&&(I=I+this.taxAmount()),I});discountPercentageAmount=J(()=>{let e=this.storeService.order().Discount,t=this.totalItemsAmount();return this.calculatePercentagDisc(e,t)});calculateTaxInclude(e){let t=this.grossTotalTaxable();return e.Rate/(100+e.Rate)*t}calculateTaxAdd(e){let t=this.grossTotalTaxable();return e.Rate/100*t}grossTotalTaxable(){let e=this.taxableItems(),t=this.calculateTaxableItemsPrice(),n=this.storeService.discount();if(e.length!==0){let o=this.calculateDiscountTaxableItem();t=t*(100-n.discount)/100,t=t-o}return t}calculateDiscountTaxableItem(){let e=this.taxableItems(),t=this.totalItemsAmount(),n=this.storeService.discount().discountAmount,o=0,d=0,I=0,X=0;for(let L of e)o=L.getItemAfterDiscount/t,d=o*n,X=d*L.Quantity,I+=X;return I}calculatePercentagDisc(e,t){return e/100*t}calculateTaxableItemsPrice(){return this.taxableItems().filter(n=>n.Taxable).reduce((n,o)=>n+o.Total,0)}taxableItems(){return this.storeService.cartItems().filter(t=>t.Taxable)}static \u0275fac=function(t){return new(t||i)};static \u0275prov=A({token:i,factory:i.\u0275fac})}return i})();var pi=i=>({selected:i});function di(i,f){if(i&1){let e=F();r(0,"div",12)(1,"span",13),c(2,"@"),a(),r(3,"input",14),H("ngModelChange",function(n){g(e);let o=m();return G(o.currency().ExchangeRate,n)||(o.currency().ExchangeRate=n),_(n)}),a()()}if(i&2){let e=m();l(3),$("ngModel",e.currency().ExchangeRate)}}function ui(i,f){if(i&1){let e=F();r(0,"div",15)(1,"label",16)(2,"input",17),p("ngModelChange",function(){let n=g(e).$implicit,o=m();return _(o.onChangeTag(n.ID))}),a(),c(3),a()()}if(i&2){let e,t=f.$implicit,n=f.index,o=m();l(),rt("for","potype-"+n),s("ngClass",Q(5,pi,((e=o.tag())==null?null:e.ID)==t.ID)),l(),rt("id","potype-"+n),s("ngModel",o.tag().ID),l(),b(" ",t.Name," ")}}var bn=(()=>{class i{dialogRef;modalConfig=new fe;currencies=N([]);tags=N([]);tag;currency;defaultCurrencyId;constructor(e,t){this.dialogRef=t,this.initModalConfig(),this.currencies.set(e.currencies),this.tags.set(e.tags),this.tag=N(e.tag),this.currency=N(e.currency),this.defaultCurrencyId=N(e.defaultCurrencyId)}initModalConfig(){this.modalConfig.title="Order Note",this.modalConfig.customWidth="700px"}onChangeCurrency(e){let t=this.currencies()?.find(n=>n.ID===e);this.currency.set(t)}onChangeTag(e){let t=this.tags()?.find(n=>n.ID===e);this.tag.set(t)}onClose(){this.dialogRef.close()}onSave(){this.dialogRef.close({currency:this.currency(),tag:this.tag()})}static \u0275fac=function(t){return new(t||i)(z(pe),z(me))};static \u0275cmp=D({type:i,selectors:[["app-dialog-note"]],standalone:!0,features:[E],decls:16,vars:6,consts:[[3,"keydown.F2","onOk","onCancel","onClose","config"],[1,"container"],["matTooltipPosition","above","matTooltip","Currency","tabTitle","Currency"],[1,"row","d-flex","align-items-center","justify-content-start","mt-6"],[1,"row","ms-4"],[1,"ps-0","col-sm-4"],["bindLabel","Name","bindValue","ID","placeholder","Currency","appendTo","body",3,"ngModelChange","items","clearable","ngModel"],["class","col-sm-4 d-flex",4,"ngIf"],["matTooltipPosition","above","matTooltip","Tag","tabTitle","Tag"],[1,"row"],[1,"col-12"],["class","rad-btn",4,"ngFor","ngForOf"],[1,"col-sm-4","d-flex"],[1,"pt-4"],["type","text","autoNum","",1,"border","border-light",3,"ngModelChange","ngModel"],[1,"rad-btn"],[3,"for","ngClass"],["type","radio",3,"ngModelChange","ngModel","id"]],template:function(t,n){if(t&1&&(r(0,"modal-material",0),p("keydown.F2",function(){return n.onSave()})("onOk",function(){return n.onSave()})("onCancel",function(){return n.onClose()})("onClose",function(){return n.onClose()}),r(1,"content")(2,"div",1)(3,"custom-tabs"),y(4),r(5,"tab",2)(6,"div",3)(7,"div",4)(8,"div",5)(9,"ng-select",6),p("ngModelChange",function(d){return n.onChangeCurrency(d)}),a()(),M(10,di,4,1,"div",7),a()()(),S(),y(11),r(12,"tab",8)(13,"div",9)(14,"div",10),M(15,ui,4,7,"div",11),a()()(),S(),a()()()()),t&2){let o;s("config",n.modalConfig),l(9),s("items",n.currencies())("clearable",!1)("ngModel",n.currency().ID),l(),s("ngIf",((o=n.currency())==null?null:o.ID)!=n.defaultCurrencyId()),l(5),s("ngForOf",n.tags())}},dependencies:[w,le,ce,q,_e,ge,Xe,Ke,ze,oe,ne,Tt,Y,ie,He,Ge,ue,de],styles:[".bg-light-gray[_ngcontent-%COMP%]{background-color:var(--bs-light-gray);--bs-bg-opacity: .15 !important}.bg-gradient-danger[_ngcontent-%COMP%]{background:repeating-linear-gradient(-60deg,#f8d7da,#f8d7da 15px,#f5c6cb 15px 30px)!important}.bg-gradient-success[_ngcontent-%COMP%]{background:repeating-linear-gradient(-60deg,#beeebb,#beeebb 15px,#afeba8 15px 30px)!important}.bg-gradient-warning[_ngcontent-%COMP%]{background:repeating-linear-gradient(-60deg,#fcf3cf,#fcf3cf 15px,#f9e79f 15px 30px)!important}.bg-light-orange[_ngcontent-%COMP%]{background-color:var(--bs-light-orange);--bs-bg-opacity: .15 !important}.text-danger[_ngcontent-%COMP%]{color:#fb404b!important}.text-dark[_ngcontent-%COMP%]{color:#5e5e5e!important}.text-success[_ngcontent-%COMP%]{color:#87cb16!important}.text-black[_ngcontent-%COMP%]{color:#000!important}.text-white[_ngcontent-%COMP%]{color:var(--bs-white)!important}.btn-light-blue[_ngcontent-%COMP%]{color:#212529;background-color:#dfeffc!important;border-color:#dfeffc}.btn-light-blue[_ngcontent-%COMP%]:hover{color:#212529;background-color:#bcdef9;border-color:#b0d8f8}.btn-light-blue[_ngcontent-%COMP%]:focus, .btn-light-blue.focus[_ngcontent-%COMP%]{color:#212529;background-color:#bcdef9;border-color:#b0d8f8;box-shadow:0 0 0 .2rem #c3d1dc80}.btn-light-blue.disabled[_ngcontent-%COMP%], .btn-light-blue[_ngcontent-%COMP%]:disabled{color:#212529;background-color:#dfeffc;border-color:#dfeffc}.btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled):active, .btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled).active, .show[_ngcontent-%COMP%] > .btn-light-blue.dropdown-toggle[_ngcontent-%COMP%]{color:#212529;background-color:#b0d8f8;border-color:#a5d2f7}.btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled):active:focus, .btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled).active:focus, .show[_ngcontent-%COMP%] > .btn-light-blue.dropdown-toggle[_ngcontent-%COMP%]:focus{box-shadow:0 0 0 .2rem #c3d1dc80}.rad-btn[_ngcontent-%COMP%]{position:relative;display:inline-block}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #dddddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label.selected[_ngcontent-%COMP%]{background:#dcdcdc;border:1px solid #dcdcdc}"]})}return i})();var In=(()=>{class i{onClickEvent=new R;constructor(){}ngOnInit(){}onClick(){this.onClickEvent.emit()}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=D({type:i,selectors:[["app-clear-button"]],outputs:{onClickEvent:"onClickEvent"},standalone:!0,features:[E],decls:3,vars:0,consts:[["type","button",1,"btn","btn-gray","w-100","fs-3","px-0","py-6","headings-font-family",3,"click"]],template:function(t,n){t&1&&(r(0,"button",0),p("click",function(){return n.onClick()}),r(1,"span"),c(2,"Clear"),a()())},styles:[".btn-gray[_ngcontent-%COMP%]{border:1px solid #d6d6d6;color:#545454!important;background:linear-gradient(to bottom,#fff,#eee)}"]})}return i})();function fi(i,f){if(i&1&&(y(0),r(1,"tr")(2,"th",12),c(3,"Amount"),a(),r(4,"td",13),c(5),v(6,"number"),a()(),S()),i&2){let e=m();l(5),U(h(6,1,e.calculationService==null?null:e.calculationService.totalItemsAmount()))}}function gi(i,f){if(i&1&&(r(0,"tr")(1,"th",12),c(2),a(),r(3,"td",14),c(4),v(5,"number"),a()()),i&2){let e=m(2);l(2),b("Discount ",e.storeService==null?null:e.storeService.discount().discount,"%"),l(2),b(" ",h(5,2,e.calculationService.discountPercentageAmount()*-1),"")}}function _i(i,f){if(i&1&&(r(0,"tr")(1,"th",12),c(2),a(),r(3,"td",14),c(4),v(5,"number"),a()()),i&2){let e,t,n=m(2);l(2),b("Discount ",(e=n.storeService.currency())==null?null:e.Symbol,""),l(2),b(" ",h(5,2,((t=n.storeService.discount())==null?null:t.discountAmount)*-1),"")}}function Ci(i,f){if(i&1&&(r(0,"tr")(1,"th",12),c(2),a(),r(3,"td",13),c(4),v(5,"number"),a()()),i&2){let e,t=m(2);l(2),U((e=t.storeService.tax())==null?null:e.Label),l(2),U(h(5,2,t.calculationService.taxAmount()))}}function vi(i,f){if(i&1&&(y(0),M(1,gi,6,4,"tr",3)(2,_i,6,4,"tr",3)(3,Ci,6,4,"tr",3),S()),i&2){let e,t,n=m();l(),s("ngIf",n.storeService.discount().discount!=0),l(),s("ngIf",((e=n.storeService.discount())==null?null:e.discountAmount)!=0),l(),s("ngIf",((t=n.storeService.tax())==null?null:t.Rate)!=0)}}var Mn=(()=>{class i{storeService=u(T);orderService=u(Ie);roleService=u(se);payService=u(ot);calculationService=u(Ae);cartService=u(Me);dialog=u(re);taxCalculationType=Ce;isShowAmount=J(()=>this.storeService?.tax()?.CalculationTypeID==Ce.Add&&this.storeService?.tax()?.Rate||this.storeService.discount()?.discount!=0||this.storeService.discount()?.discountAmount!=0);onOpenDialogNote(){this.dialog.open(bn,{data:{tags:this.storeService.loadForm().CustomerPOTypes,currencies:this.storeService.loadForm().Currencies,currency:this.storeService.currency(),tag:this.storeService.tag(),defaultCurrencyId:this.storeService.loadForm()?.AppConfigJSON?.CoreDefaults?.CurrencyID}}).afterClosed().pipe(O(e=>C.IsNotEmpty(e))).subscribe(e=>{this.storeService.updateCurrency(e.currency),this.storeService.updateTag(e.tag)})}onOpenDialogDiscount(){this.dialog.open(Sn,{data:{discountAmount:this.storeService.order().DiscountAmount,discount:this.storeService.order().Discount,tax:this.storeService.tax(),currency:this.storeService.currency(),taxes:this.storeService.loadForm().Taxes}}).afterClosed().pipe(O(e=>C.IsNotEmpty(e))).subscribe(e=>{this.storeService.updateDiscount({discountAmount:e.discountAmount,discount:e.discount}),this.storeService.updateTax(e.tax)})}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=D({type:i,selectors:[["POS-cart-action"]],standalone:!0,features:[E],decls:13,vars:5,consts:[[1,"row","g-0","px-5","justify-content-end"],[1,"col-6",2,"padding-right","15px"],[1,"table","table-borderless"],[4,"ngIf"],[1,"row","g-0","pb-6","px-5"],[1,"col-5","d-flex","justify-content-between","pe-5",2,"column-gap","12px"],[2,"flex-grow","1",3,"onClickEvent"],[2,"flex-grow","3",3,"onClickEvent"],[1,"col-7"],[1,"btn-group","w-100"],[1,"d-inline-flex",3,"onClickEvent"],[1,"d-inline-flex","w-100",3,"onPayEvent","rolePrice","totalItems","totalAmount"],[1,"text-start"],[1,"text-end","fs-5"],[1,"text-end","fs-5","text-danger"]],template:function(t,n){t&1&&(r(0,"div",0)(1,"div",1)(2,"table",2),M(3,fi,7,3,"ng-container",3)(4,vi,4,3,"ng-container",3),a()()(),r(5,"div",4)(6,"div",5)(7,"app-note-button",6),p("onClickEvent",function(){return n.onOpenDialogNote()}),a(),r(8,"app-clear-button",7),p("onClickEvent",function(){return n.cartService.clearCart()}),a()(),r(9,"div",8)(10,"div",9)(11,"app-discount-button",10),p("onClickEvent",function(){return n.onOpenDialogDiscount()}),a(),r(12,"app-pay-button",11),p("onPayEvent",function(){return n.payService.onPay()}),a()()()()),t&2&&(l(3),s("ngIf",n.isShowAmount()),l(),s("ngIf",n.calculationService.totalItems()>0),l(8),s("rolePrice",n.roleService.product.Price)("totalItems",n.calculationService.totalItems())("totalAmount",n.calculationService.totalAmount()))},dependencies:[w,q,te,yn,hn,xn,In]})}return i})();var Dn=i=>({ID:i}),hi=()=>["/menu/Orders/Orders/Estimate/Info"],xi=i=>({"border-top":i});function yi(i,f){if(i&1&&(y(0),r(1,"div",28)(2,"div",29),c(3),a(),r(4,"div",29),c(5),v(6,"number"),a()(),S()),i&2){let e=f.$implicit;l(3),U(e.Name),l(2),b("",h(6,2,e.Total)," ")}}function Si(i,f){if(i&1&&(y(0),r(1,"div",30)(2,"div",31),c(3),a(),r(4,"div",31),c(5),v(6,"number"),a()(),S()),i&2){let e,t=m();l(3),b("Amount: ",(e=t.storeService.currency())==null?null:e.Symbol,""),l(2),U(h(6,2,t.calculationService.totalItemsAmount()))}}function bi(i,f){if(i&1&&(r(0,"div",32)(1,"div",31),c(2),v(3,"number"),a(),r(4,"div",33),c(5),v(6,"number"),a()()),i&2){let e,t=m();l(2),Ve("","Discount "+h(3,3,(e=t.storeService.discount())==null?null:e.discount)+" %",": ",(e=t.storeService.currency())==null?null:e.Symbol,""),l(3),U(h(6,5,t.calculationService.discountPercentageAmount()*-1))}}function Ii(i,f){if(i&1&&(r(0,"div",32)(1,"div",31),c(2),a(),r(3,"div",33),c(4),v(5,"number"),a()()),i&2){let e,t,n=m();l(2),b("Discount: ",(e=n.storeService.currency())==null?null:e.Symbol,""),l(2),b("",h(5,2,((t=n.storeService.discount())==null?null:t.discountAmount)*-1)," ")}}function Mi(i,f){if(i&1&&(r(0,"div",32)(1,"div",31),c(2),a(),r(3,"div",31),c(4),v(5,"number"),a()()),i&2){let e,t=m();l(2),Ve("",(e=t.storeService.tax())==null?null:e.Label,": ",(e=t.storeService.currency())==null?null:e.Symbol,""),l(2),U(h(5,3,t.calculationService.taxAmount()))}}var En=(()=>{class i{orderService=u(Ie);calculationService=u(Ae);storeService=u(T);isShowAmount=J(()=>this.storeService?.tax()?.CalculationTypeID==Ce.Add&&this.storeService?.tax()?.Rate||this.storeService.discount()?.discount!=0||this.storeService.discount()?.discountAmount!=0);handleF8(){this.orderService.newOrder()}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=D({type:i,selectors:[["POS-complete"]],hostBindings:function(t,n){t&1&&p("keydown.F8",function(d){return n.handleF8(d)},!1,St)},standalone:!0,features:[E],decls:40,vars:21,consts:[[1,"pt-7",2,"border-bottom","1px solid rgba(0, 0, 0, 0.1)"],[1,"ps-7","fw-normal","pb-9"],[1,"order-complete"],[1,"container-fluid","pt-8"],[1,"row"],[1,"col-8"],[1,"card"],[1,"card-header",2,"padding-bottom","15px"],[1,"fw-normal",2,"font-size","32px"],[1,"fa-solid","fa-check","me-3"],[1,"card-body"],[1,"row",2,"height","115px"],[1,"col","text-center","my-auto"],[1,"btn","btn-success","w-50",2,"font-size","20px",3,"click"],[1,"card-footer"],[1,"d-flex","justify-content-between","my-6"],["target","_blank","routerLink","/print/Estimate",1,"btn","bg-light-gray","btn-secondary",3,"queryParams"],[1,"fa-solid","fa-print","me-2"],[1,"col-4"],[1,"card-header","bg-light-gray",2,"padding-bottom","15px"],[1,"fst-italic"],["target","_blank",3,"routerLink","queryParams"],[1,"card-body","py-4"],[4,"ngFor","ngForOf"],[4,"ngIf"],["class","row justify-content-end pb-2",4,"ngIf"],[1,"row","justify-content-end","pt-4",3,"ngClass"],[1,"col-4","text-end","h5"],[1,"row","justify-content-between","border-bottom","py-2"],[1,"col","text-end"],[1,"row","justify-content-end","mt-2","pb-2"],[1,"col-4","text-end"],[1,"row","justify-content-end","pb-2"],[1,"col-4","text-end","text-danger"]],template:function(t,n){if(t&1&&(r(0,"div",0)(1,"h1",1),c(2,"Estimate"),a()(),r(3,"section",2)(4,"div",3)(5,"div",4)(6,"div",5)(7,"div",6)(8,"div",7)(9,"h1",8),x(10,"i",9),c(11,"Order Complete "),a()(),r(12,"div",10)(13,"div",11)(14,"div",12)(15,"a",13),p("click",function(){return n.orderService.newOrder()}),c(16,"New Order (F8)"),a()()()(),r(17,"div",14)(18,"div",15)(19,"a",16),x(20,"i",17),c(21,"Print Receipt"),a()()()()(),r(22,"div",18)(23,"div",6)(24,"div",19)(25,"h3",20)(26,"a",21),c(27),a()()(),r(28,"div",22),M(29,yi,7,4,"ng-container",23)(30,Si,7,4,"ng-container",24)(31,bi,7,7,"div",25)(32,Ii,6,4,"div",25)(33,Mi,6,5,"div",25),r(34,"div",26)(35,"div",27),c(36),a(),r(37,"div",27),c(38),v(39,"number"),a()()()()()()()()),t&2){let o,d,I,X,L;l(19),s("queryParams",Q(14,Dn,n.storeService.complete().OrderID)),l(7),s("routerLink",je(16,hi))("queryParams",Q(17,Dn,n.storeService.complete().OrderID)),l(),b("Estimate #",(o=n.storeService.complete())==null?null:o.InvoiceNumber,""),l(2),s("ngForOf",n.storeService.cartItems()),l(),s("ngIf",n.isShowAmount()),l(),s("ngIf",((d=n.storeService.discount())==null?null:d.discount)>0),l(),s("ngIf",((I=n.storeService.discount())==null?null:I.discountAmount)>0),l(),s("ngIf",((X=n.storeService.tax())==null?null:X.Rate)>0),l(),s("ngClass",Q(19,xi,n.isShowAmount())),l(2),b("Total: ",(L=n.storeService.currency())==null?null:L.Symbol,""),l(2),U(h(39,12,n.calculationService.totalAmount()))}},dependencies:[w,le,ce,q,te,Qe,Le,Wt],styles:[".order-complete[_ngcontent-%COMP%] .card[_ngcontent-%COMP%] .card-header[_ngcontent-%COMP%]{border-bottom:1px solid rgba(0,0,0,.125);padding-bottom:.9375rem}.order-complete[_ngcontent-%COMP%] .card[_ngcontent-%COMP%] .card-header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{font-size:2rem}.order-complete[_ngcontent-%COMP%] .card[_ngcontent-%COMP%] .card-body[_ngcontent-%COMP%] .container[_ngcontent-%COMP%]{max-width:500px;margin-top:30px;margin-bottom:30px}"]})}return i})();var wn=(()=>{class i{addItem=new R;constructor(){}ngOnInit(){}onAddItem(){this.addItem.emit()}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=D({type:i,selectors:[["POS-more-action"]],outputs:{addItem:"onAddItem"},standalone:!0,features:[E],decls:14,vars:0,consts:[["id","moreMenu","data-bs-toggle","dropdown",1,"d-flex","align-items-center","cursor-pointer"],[1,"me-2"],[1,"fa-solid","fa-caret-down","fa-lg"],[1,"fs-6","headings-font-family","pb-1"],[1,"h-100","d-flex","align-items-center","justify-content-between"],["aria-labelledby","moreMenu",1,"dropdown-menu","more-actions"],[1,"d-flex"],[1,"dropdown-header","text-dark","col"],[1,"h5","mb-4"],[1,"dropdown-divider","m-0"],[1,"cursor-pointer",3,"click"],["icon","fa-circle-plus fa-solid","label","Add New"]],template:function(t,n){t&1&&(r(0,"span",0)(1,"span",1),x(2,"i",2),a(),r(3,"span",3),c(4,"More Actions"),a()(),r(5,"div",4)(6,"div",5)(7,"div",6)(8,"div",7)(9,"div",8),c(10,"Item"),a(),x(11,"div",9),r(12,"li",10),p("click",function(){return n.onAddItem()}),x(13,"POS-dropdown-item-more-action",11),a()()()()())},dependencies:[w,pn]})}return i})();function Di(i,f){i&1&&(y(0),x(1,"POS-complete"),S())}function Ei(i,f){if(i&1){let e=F();r(0,"div",3)(1,"div",4)(2,"div",5)(3,"div",6)(4,"div",7)(5,"POS-select-outlet-form",8),v(6,"async"),p("ngModelChange",function(n){g(e);let o=m();return _(o.outletService.updateOutlet(n))}),a()(),r(7,"POS-invoice-number-form",9),v(8,"async"),p("ngModelChange",function(n){g(e);let o=m();return _(o.orderService.updateOrderNumber(n))}),a(),r(9,"POS-invoice-date",10),p("ngModelChange",function(n){g(e);let o=m();return _(o.orderService.updateOrderDate(n))}),a()()(),r(10,"div",11)(11,"div",12)(12,"div",13)(13,"POS-more-action",14),p("onAddItem",function(){g(e);let n=m();return _(n.cartItemService.onOpenAddDialog())}),a()(),r(14,"div",15)(15,"ng-select-infinite",16,1),p("selectedChange",function(n){g(e);let o=m();return _(o.orderService.updateSalesPersonId(n))}),a()()()()(),r(17,"div",17)(18,"div",18)(19,"POS-quick-key",19),v(20,"async"),p("onSelectVariant",function(n){g(e);let o=m();return _(o.cartItemService.onSelectQuickkeyItem(n))}),a()(),r(21,"div",20)(22,"div",21)(23,"div",22),x(24,"POS-variant-autocomplete",23),a(),r(25,"div",15)(26,"POS-customer-autocomplete",24),p("onCreateNewCustomer",function(){g(e);let n=m();return _(n.customerService.createNewCustomer())})("ngModelChange",function(n){g(e);let o=m();return _(o.customerService.onSelectCustomer(n))}),a()()(),r(27,"POS-cart-display",25),v(28,"async"),p("onRemove",function(n){g(e);let o=m();return _(o.cartItemService.removeCartItem(n))})("onEdit",function(n){g(e);let o=m();return _(o.cartItemService.onOpenEditDialog(n))})("onDropItems",function(n){g(e);let o=m();return _(o.cartItemService.onDropItems(n))})("onPurchase",function(n){g(e);let o=m();return _(o.cartItemService.onPurchaseItem(n))})("onReturn",function(n){g(e);let o=m();return _(o.cartItemService.onReturnItem(n))}),a(),x(29,"POS-cart-action"),a()()()}if(i&2){let e,t=m();l(5),s("ngModel",t.storeService.outlet())("outlets",t.storeService.loadForm().Entities)("isOpenAfterLoad",h(6,15,t.outletService.isOpenDialog$)),l(2),s("ngModel",h(8,17,t.orderService.orderNumber$)),l(2),s("ngModel",t.storeService.order().Date),l(6),s("clearable",!0)("optionTitle",!0)("items",t.storeService.loadForm().SalesPOTypes)("selected",t.storeService.order().SalesID),l(4),s("quickKey",h(20,19,t.quickkeyService.quickkeys$))("outletID",t.storeService.outlet().ID),l(5),s("formControl",t.cartItemService.variantSearchCtrl),l(2),s("ngModel",t.storeService.customer()),l(),s("cartItems",h(28,21,t.cartItemService.cartItems$))("appConfig",(e=t.storeService.loadForm())==null?null:e.AppConfigJSON)}}var os=(()=>{class i{loadFormService=u(lt);storeService=u(T);role=u(se);outletService=u(ct);orderService=u(Ie);quickkeyService=u(st);cartItemService=u(Me);customerService=u(gt);intercomService=u(kt);isCompleteOrder=J(()=>this.storeService.state()==j.COMPLETE);constructor(){this.intercomService.hideLauncher()}ngOnDestroy(){this.intercomService.showLauncher()}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=D({type:i,selectors:[["POS-estimate-v2"]],standalone:!0,features:[De([T,lt,ct,Ie,st,Me,gt,ot,Ae,ke]),E],decls:3,vars:2,consts:[["NOT_COMPLETE",""],["ngSelectInfinite",""],[4,"ngIf","ngIfElse"],[1,"container-fluid"],[1,"row","header","border-bottom"],[1,"col-5","border-end"],[1,"left-toolbar-container","h-100","d-flex","align-items-center","justify-content-between"],[1,"d-flex"],[3,"ngModelChange","ngModel","outlets","isOpenAfterLoad"],["transactionType","Sales Order",3,"ngModelChange","ngModel"],[3,"ngModelChange","ngModel"],[1,"col-7","d-flex","align-items-center"],[1,"row","flex-grow-1"],[1,"col-lg-7","col-5","d-flex","align-items-center"],[3,"onAddItem"],[1,"col-5","ps-0"],["bindValue","ID","bindLabel","Name","placeholder","Assign Sales Person",1,"sales-person","select-max-width",3,"selectedChange","clearable","optionTitle","items","selected"],[1,"row","content"],[1,"col-5","border-end","pt-1"],[3,"onSelectVariant","quickKey","outletID"],[1,"col-7","pt-5","px-0","d-flex","flex-column"],[1,"row","w-100","ms-0"],[1,"col-7","px-0"],[3,"formControl"],[3,"onCreateNewCustomer","ngModelChange","ngModel"],[1,"cart-display",3,"onRemove","onEdit","onDropItems","onPurchase","onReturn","cartItems","appConfig"]],template:function(t,n){if(t&1&&M(0,Di,2,0,"ng-container",2)(1,Ei,30,23,"ng-template",null,0,ae),t&2){let o=K(2);s("ngIf",n.isCompleteOrder())("ngIfElse",o)}},dependencies:[w,q,Ee,an,Te,Y,Oe,ln,oe,ie,cn,Gt,$t,sn,Cn,vn,Je,Ze,Mn,En,wn],styles:["ng-select-infinite.sales-person.select-max-width>ng-select{padding-right:10px;height:38px} ng-select-infinite.sales-person.select-max-width>.ng-select.ng-select-single .ng-select-container{font-size:.75rem;border:.5px solid #d7d7d7;padding-right:6px} ng-select-infinite.sales-person.select-max-width>.ng-select.ng-select-single .ng-select-container>.ng-arrow-wrapper{width:12px;padding-bottom:2px} ng-select-infinite.sales-person.select-max-width>.ng-select.ng-select-single .ng-select-container>.ng-value-container{padding-left:6px} ng-select-infinite.sales-person.select-max-width>.ng-select.ng-select-single .ng-select-container{min-height:38px!important;height:38px!important;border:none} ng-select-infinite.sales-person.select-max-width.offline>.ng-select.ng-select-single .ng-select-container{background:repeating-linear-gradient(-60deg,#f8d7da,#f8d7da 15px,#f5c6cb 15px 30px)!important} ng-select-infinite.sales-person.select-max-width>.ng-select.ng-select-single .ng-select-container .ng-input{padding-left:5px!important} ng-select-infinite.sales-person.select-max-width>.ng-select.ng-select-single .ng-select-container .ng-input>input{padding-top:5px} ng-select-infinite.sales-person.select-max-width>.ng-select.ng-select-single>ng-dropdown-panel.ng-dropdown-panel{font-size:.75rem;width:95%!important} ng-select-infinite.sales-person.select-max-width>.ng-select.ng-select-focused .ng-select-container{box-shadow:none!important;border-color:transparent!important}.left-toolbar-container[_ngcontent-%COMP%]{position:relative}.left-toolbar-container[_ngcontent-%COMP%] POS-invoice-number-form[_ngcontent-%COMP%]{position:absolute;top:34px;left:28px}.header[_ngcontent-%COMP%]{min-height:60px}.content[_ngcontent-%COMP%]{min-height:calc(100vh - 60px)}.supplier-more-menu[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center}.cart-display[_ngcontent-%COMP%]{flex-grow:1;height:0px;overflow-y:auto}input[_ngcontent-%COMP%]{width:100%;height:38px!important;border:0;border-bottom:1px solid #ced4da;padding-left:32px}input[_ngcontent-%COMP%]::placeholder{color:#ced4da}i[_ngcontent-%COMP%]{font-size:16px;top:10.6px;left:13px}.change[_ngcontent-%COMP%] .burger-lines[_ngcontent-%COMP%]{transition:.4s}.change[_ngcontent-%COMP%] .burger-lines[_ngcontent-%COMP%]:nth-child(1){-webkit-transform:rotate(-45deg) translate(-8px,4px);transform:rotate(-45deg) translate(-8px,4px)}.change[_ngcontent-%COMP%] .burger-lines[_ngcontent-%COMP%]:nth-child(2){opacity:0}.change[_ngcontent-%COMP%] .burger-lines[_ngcontent-%COMP%]:nth-child(3){-webkit-transform:rotate(45deg) translate(-5px,0px);transform:rotate(45deg) translate(-5px)}.mobile-button[_ngcontent-%COMP%]{display:none}@media (max-width: 990px){.mobile-button[_ngcontent-%COMP%]{display:block}}.navbar-toggler[_ngcontent-%COMP%]:focus{box-shadow:none!important}.more-actions[_ngcontent-%COMP%] div.d-flex[_ngcontent-%COMP%]{width:30rem}"]})}return i})();export{os as EstimateV2Component};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as U,d as k,e as q}from"./chunk-
|
|
1
|
+
import{a as U,d as k,e as q}from"./chunk-CHYOCIQV.js";import{B as j,h as v,n as Q}from"./chunk-LM2QAKDH.js";import{a as F}from"./chunk-TQZMOLDX.js";import{C as _,Ca as s,Hb as E,I as g,Ib as O,Jb as D,M as b,Nb as z,Oa as y,Ob as B,Qc as $,Z as S,bb as V,c as f,db as p,ea as C,eb as T,ma as w,na as I,ob as u,pb as h,r as m,sa as o,ta as a,ub as L,xb as N,zb as M}from"./chunk-VQUN6F64.js";var d=class{_dataBuffer;_bufferSize;_data;_loading;_input$=new f;_destroy$=new f;constructor(){this._loading=!1,this._bufferSize=50,this.data=[]}onSearch(){this._input$.pipe(g(200),b(),m(e=>(e&&(e=e.toLowerCase()),this.filterData(e))),_(e=>e!==void 0),S(this._destroy$)).subscribe(e=>{this._dataBuffer=e.slice(0,this._bufferSize)})}onClear(){this._dataBuffer=this._data.slice(0,this._bufferSize)}filterData(e){let t=-1,n;return this._data.filter(r=>(n=JSON.stringify(r).toLowerCase(),t=n.indexOf(e),t!==-1||e==null))}get input$(){return this._input$}get bufferData(){return this._dataBuffer}get loading(){return this._loading}set data(e){this._data=e||[],this._dataBuffer=this._data.slice(0,this._bufferSize),this.onSearch()}initSelectedValue(e,t){if(F.IsNotEmpty(e)){let n=this._data.filter(i=>i[t].toString().toLowerCase().indexOf(e)!==-1);this._dataBuffer=n.slice(0,this._bufferSize)}}set bufferSize(e){this._bufferSize=e}onScrollToEnd(){this.fetchMore()}fetchMore(){let e=this._dataBuffer.length,t=this._data.slice(e,this._bufferSize+e);this._loading=!0,setTimeout(()=>{this._loading=!1,this._dataBuffer=this._dataBuffer.concat(t)},200)}destroy(){this._destroy$.next(!0),this._destroy$.complete()}};var P=["selectId"];function R(l,e){if(l&1&&(u(0,"span",3),z(1),h()),l&2){let t=e.item,n=M();p("title",t[n.bindLabel]),y(),B(t[n.bindLabel])}}var se=(()=>{class l{placeholder;bindValue;bindLabel;width="100%";clearable=!0;parent="body";disabled=!1;optionTitle=!1;ngSelectElement;set items(t){this.ngSelectInfiniteScroll.data=t,this.ngSelectInfiniteScroll.initSelectedValue(this.selected,this.bindValue)}_selected;get selected(){return this._selected}set selected(t){this._selected=t,this.ngSelectInfiniteScroll.initSelectedValue(this.selected,this.bindValue)}selectedChange;selectedLabel;onOpen;ngSelectInfiniteScroll;constructor(){this.ngSelectInfiniteScroll=new d,this.selectedChange=new s,this.selectedLabel=new s,this.onOpen=new s}onOpenSelect(){this.onOpen.emit()}onSelectChange(t){t?(this.selectedChange.emit(t[this.bindValue]),this.selectedLabel.emit(t[this.bindLabel])):(this.selectedChange.emit(null),this.selectedLabel.emit(null))}static \u0275fac=function(n){return new(n||l)};static \u0275cmp=w({type:l,selectors:[["ng-select-infinite"]],viewQuery:function(n,i){if(n&1&&E(P,7),n&2){let r;O(r=D())&&(i.ngSelectElement=r.first)}},inputs:{placeholder:"placeholder",bindValue:"bindValue",bindLabel:"bindLabel",width:"width",clearable:"clearable",parent:"parent",disabled:"disabled",optionTitle:"optionTitle",items:"items",selected:"selected"},outputs:{selectedChange:"selectedChange",selectedLabel:"selectedLabel",onOpen:"onOpen"},decls:3,vars:12,consts:[["selectId",""],[3,"clear","scrollToEnd","open","change","appendTo","disabled","virtualScroll","typeahead","items","bindLabel","bindValue","placeholder","ngModel","clearable"],["ng-option-tmp",""],[3,"title"]],template:function(n,i){if(n&1){let r=L();u(0,"ng-select",1,0),N("clear",function(){return o(r),a(i.ngSelectInfiniteScroll.onClear())})("scrollToEnd",function(){return o(r),a(i.ngSelectInfiniteScroll.onScrollToEnd())})("open",function(){return o(r),a(i.onOpenSelect())})("change",function(J){return o(r),a(i.onSelectChange(J))}),V(2,R,2,2,"ng-template",2),h()}n&2&&(T("width",i.width),p("appendTo",i.parent)("disabled",i.disabled)("virtualScroll",!0)("typeahead",i.ngSelectInfiniteScroll.input$)("items",i.ngSelectInfiniteScroll.bufferData)("bindLabel",i.bindLabel)("bindValue",i.bindValue)("placeholder",i.placeholder)("ngModel",i.selected)("clearable",i.clearable))},dependencies:[k,U,v,Q]})}return l})(),de=(()=>{class l{static \u0275fac=function(n){return new(n||l)};static \u0275mod=I({type:l});static \u0275inj=C({imports:[$,q,j]})}return l})();export{se as a,de as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as i}from"./chunk-
|
|
1
|
+
import{b as i}from"./chunk-GT4CI5AG.js";var s=class extends i{httpService;nextPageDisabled=!1;extendData=!1;goToLast=!1;listTotal;infiniteList;originalData;constructor(t,a,e,r,g,h,n){super(t,a,e,r,g,h,n),this.httpService=a}StoreRowsCountAPIResult(t,a=!1){this.httpService.post("/api/"+t,JSON.stringify(this.pageData.Filter)).subscribe(e=>{this.listTotal=e.Count,this.pageData.HideStoreApiCount=!0,a&&(this.pageData.Filter.RowCount=this.listTotal,this.goToLast=!0,this.pageData.Filter.PageNumber=1,this.getListData())})}NextPage(t){this.pageData.Filter.PageNumber=this.pageData.Filter.PageNumber||1,this.pageData.Filter.PageNumber+=1,this.extendData=t,this.getListData()}postInit(t){this.extendData?(this.infiniteList=this.infiniteList.concat(t.Data),this.postExtendData(t),this.extendData=!1):(this.infiniteList=t.Data,this.assignAggregate(t)),this.nextPageDisabled=!(t.Data.length<this.pageData.Filter.RowCount),this.originalData=t.Data,this.menuData.H=this.data.PageTitle||this.menuData.H,this.afterPostInit(t)}afterPostInit(t){}preSearchFromPageOne(){this.goToLast=!1}postExtendData(t){}assignAggregate(t){}};export{s as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{k as w,m as P}from"./chunk-BFKKHUHL.js";import{a as v}from"./chunk-TQZMOLDX.js";import{a as b}from"./chunk-
|
|
1
|
+
import{k as w,m as P}from"./chunk-BFKKHUHL.js";import{a as v}from"./chunk-TQZMOLDX.js";import{a as b}from"./chunk-IZHXMIM2.js";import{a as r,b as C}from"./chunk-7DBAF2ID.js";import{C as p,Cd as O,F as i,G as f,W as n,da as S,ga as u,m as y,n as c,o as a,r as l}from"./chunk-VQUN6F64.js";var d=class{configUsingLocal;productUsingLocal;orderUsingLocal;constructor(m=!1,e=!1,t=!1){this.configUsingLocal=m,this.productUsingLocal=e,this.orderUsingLocal=t}get usingLocal(){return this.configUsingLocal||this.productUsingLocal||this.orderUsingLocal}};var h=(()=>{class s{static emptyDate="Please fill invoice date";static emptyNumber="Please fill invoice number";static emptyOrderNumber="Number is Required";static failGetMenu="Fail to get pos menu";static failToGetRetur="Fail to get retur";static failGetLocalPosStorage="Fail to get setting and option from local storage, Please re-cache your data while online!";static failGetVariant='"Error getting variant with {0} {1}" - {2}';static failGetLocalVariant="Fail to get variant from local storage, Please re-cache your data while online!";static emptyBarcodeFormat='No product with barcode "{0}"';static emptyCustomerFormat='No customer with code "{0}"';static failGetSalesOrder="Fail to get sales order";static failBin="Fail to bin transaction";static failGetCustomer="Fail to get customer's data";static failCreateCustomer="Fail to create customer";static noRoleContact="You have no right to create new customer";static submitLocally="Connection unavailable ~ offline! Order stored locally";static offlineMode="There is no internet connection, it is now in offline mode";static OfflineOrderNotSupport="Offline order is not Supported!";static failOrderConnectionTimeOut="Connection timeout! Please try uploading your order again!";static failDeletePark="Fail to delete park";static emptyAccessRegister="You do not have access to any Register";static failGenerateNewNumber="Fail to generate new number";static emptyPayment="There is no active payment method.";static failOpenRegister="Fail to open register";static failGetLocalOutletInfo="Fail to get outlet information from local storage, Please re-cache your data while online!";static failTrySubmit=`[Error submitting order]
|
|
2
2
|
{0}`;static failTryCreateCustomer=`"[Error creating customer]
|
|
3
3
|
"{0}`;static createCustomerOffline="Create customer is not supported when the connection offline";static emptyCustomer="Please select customer!";static emptySalesPerson="Please select sales person!";static emptySalesType="Please select sales type!";static failCreateNewVariant="Fail to create new variant";static requiredDefaultCategory="[WARNING] - POS / Quick Create Product requires Default Category";static emptyVariant="Item is undefined, please re-type";static emptyPOItem="You must have at least one item";static emptyEntity="Please select entity before proceeding..";static failGetRetrieve="Fail to get retrieve";static failTryPark=`[Error submitting park]
|
|
4
4
|
{0}`;static failTryGetPark=`[Error during get park]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as k,c,f as N,l as i,m as W,n as Z}from"./chunk-RFD6P6P2.js";import{$a as x,Ba as y,Fa as E,Na as b,Pa as l,Qc as A,Ra as w,Rc as P,Va as I,Wa as H,Xa as D,Xb as z,ab as S,cb as C,ea as f,hb as B,la as s,ma as g,na as v,oa as m,ob as M,pb as V,qb as F,ra as O,sc as d,tc as a,ua as T,wa as L,xb as R}from"./chunk-4E6YCIJB.js";import{a as p}from"./chunk-O3DEWASH.js";var tt=(()=>{class n{platformId;el;zone;config;renderer;viewContainer;tooltipPosition;tooltipEvent="hover";appendTo;positionStyle;tooltipStyleClass;tooltipZIndex;escape=!0;showDelay;hideDelay;life;positionTop;positionLeft;autoHide=!0;fitContent=!0;hideOnEscape=!0;content;get disabled(){return this._disabled}set disabled(t){this._disabled=t,this.deactivate()}tooltipOptions;_tooltipOptions={tooltipLabel:null,tooltipPosition:"right",tooltipEvent:"hover",appendTo:"body",positionStyle:null,tooltipStyleClass:null,tooltipZIndex:"auto",escape:!0,disabled:null,showDelay:null,hideDelay:null,positionTop:null,positionLeft:null,life:null,autoHide:!0,hideOnEscape:!0,id:k()+"_tooltip"};_disabled;container;styleClass;tooltipText;showTimeout;hideTimeout;active;mouseEnterListener;mouseLeaveListener;containerMouseleaveListener;clickListener;focusListener;blurListener;scrollHandler;resizeListener;constructor(t,e,o,r,h,u){this.platformId=t,this.el=e,this.zone=o,this.config=r,this.renderer=h,this.viewContainer=u}ngAfterViewInit(){P(this.platformId)&&this.zone.runOutsideAngular(()=>{let t=this.getOption("tooltipEvent");if((t==="hover"||t==="both")&&(this.mouseEnterListener=this.onMouseEnter.bind(this),this.mouseLeaveListener=this.onMouseLeave.bind(this),this.clickListener=this.onInputClick.bind(this),this.el.nativeElement.addEventListener("mouseenter",this.mouseEnterListener),this.el.nativeElement.addEventListener("click",this.clickListener),this.el.nativeElement.addEventListener("mouseleave",this.mouseLeaveListener)),t==="focus"||t==="both"){this.focusListener=this.onFocus.bind(this),this.blurListener=this.onBlur.bind(this);let e=this.el.nativeElement.querySelector(".p-component");e||(e=this.getTarget(this.el.nativeElement)),e.addEventListener("focus",this.focusListener),e.addEventListener("blur",this.blurListener)}})}ngOnChanges(t){t.tooltipPosition&&this.setOption({tooltipPosition:t.tooltipPosition.currentValue}),t.tooltipEvent&&this.setOption({tooltipEvent:t.tooltipEvent.currentValue}),t.appendTo&&this.setOption({appendTo:t.appendTo.currentValue}),t.positionStyle&&this.setOption({positionStyle:t.positionStyle.currentValue}),t.tooltipStyleClass&&this.setOption({tooltipStyleClass:t.tooltipStyleClass.currentValue}),t.tooltipZIndex&&this.setOption({tooltipZIndex:t.tooltipZIndex.currentValue}),t.escape&&this.setOption({escape:t.escape.currentValue}),t.showDelay&&this.setOption({showDelay:t.showDelay.currentValue}),t.hideDelay&&this.setOption({hideDelay:t.hideDelay.currentValue}),t.life&&this.setOption({life:t.life.currentValue}),t.positionTop&&this.setOption({positionTop:t.positionTop.currentValue}),t.positionLeft&&this.setOption({positionLeft:t.positionLeft.currentValue}),t.disabled&&this.setOption({disabled:t.disabled.currentValue}),t.content&&(this.setOption({tooltipLabel:t.content.currentValue}),this.active&&(t.content.currentValue?this.container&&this.container.offsetParent?(this.updateText(),this.align()):this.show():this.hide())),t.autoHide&&this.setOption({autoHide:t.autoHide.currentValue}),t.id&&this.setOption({id:t.id.currentValue}),t.tooltipOptions&&(this._tooltipOptions=p(p({},this._tooltipOptions),t.tooltipOptions.currentValue),this.deactivate(),this.active&&(this.getOption("tooltipLabel")?this.container&&this.container.offsetParent?(this.updateText(),this.align()):this.show():this.hide()))}isAutoHide(){return this.getOption("autoHide")}onMouseEnter(t){!this.container&&!this.showTimeout&&this.activate()}onMouseLeave(t){this.isAutoHide()?this.deactivate():!(i.hasClass(t.relatedTarget,"p-tooltip")||i.hasClass(t.relatedTarget,"p-tooltip-text")||i.hasClass(t.relatedTarget,"p-tooltip-arrow"))&&this.deactivate()}onFocus(t){this.activate()}onBlur(t){this.deactivate()}onInputClick(t){this.deactivate()}onPressEscape(){this.hideOnEscape&&this.deactivate()}activate(){if(this.active=!0,this.clearHideTimeout(),this.getOption("showDelay")?this.showTimeout=setTimeout(()=>{this.show()},this.getOption("showDelay")):this.show(),this.getOption("life")){let t=this.getOption("showDelay")?this.getOption("life")+this.getOption("showDelay"):this.getOption("life");this.hideTimeout=setTimeout(()=>{this.hide()},t)}}deactivate(){this.active=!1,this.clearShowTimeout(),this.getOption("hideDelay")?(this.clearHideTimeout(),this.hideTimeout=setTimeout(()=>{this.hide()},this.getOption("hideDelay"))):this.hide()}create(){this.container&&(this.clearHideTimeout(),this.remove()),this.container=document.createElement("div"),this.container.setAttribute("id",this.getOption("id")),this.container.setAttribute("role","tooltip");let t=document.createElement("div");t.className="p-tooltip-arrow",this.container.appendChild(t),this.tooltipText=document.createElement("div"),this.tooltipText.className="p-tooltip-text",this.updateText(),this.getOption("positionStyle")&&(this.container.style.position=this.getOption("positionStyle")),this.container.appendChild(this.tooltipText),this.getOption("appendTo")==="body"?document.body.appendChild(this.container):this.getOption("appendTo")==="target"?i.appendChild(this.container,this.el.nativeElement):i.appendChild(this.container,this.getOption("appendTo")),this.container.style.display="inline-block",this.fitContent&&(this.container.style.width="fit-content"),this.isAutoHide()?this.container.style.pointerEvents="none":(this.container.style.pointerEvents="unset",this.bindContainerMouseleaveListener())}bindContainerMouseleaveListener(){if(!this.containerMouseleaveListener){let t=this.container??this.container.nativeElement;this.containerMouseleaveListener=this.renderer.listen(t,"mouseleave",e=>{this.deactivate()})}}unbindContainerMouseleaveListener(){this.containerMouseleaveListener&&(this.bindContainerMouseleaveListener(),this.containerMouseleaveListener=null)}show(){if(!this.getOption("tooltipLabel")||this.getOption("disabled"))return;this.create(),this.el.nativeElement.closest("p-dialog")?setTimeout(()=>{this.container&&this.align()},100):this.align(),i.fadeIn(this.container,250),this.getOption("tooltipZIndex")==="auto"?c.set("tooltip",this.container,this.config.zIndex.tooltip):this.container.style.zIndex=this.getOption("tooltipZIndex"),this.bindDocumentResizeListener(),this.bindScrollListener()}hide(){this.getOption("tooltipZIndex")==="auto"&&c.clear(this.container),this.remove()}updateText(){let t=this.getOption("tooltipLabel");if(t instanceof w){let e=this.viewContainer.createEmbeddedView(t);e.detectChanges(),e.rootNodes.forEach(o=>this.tooltipText.appendChild(o))}else this.getOption("escape")?(this.tooltipText.innerHTML="",this.tooltipText.appendChild(document.createTextNode(t))):this.tooltipText.innerHTML=t}align(){switch(this.getOption("tooltipPosition")){case"top":this.alignTop(),this.isOutOfBounds()&&(this.alignBottom(),this.isOutOfBounds()&&(this.alignRight(),this.isOutOfBounds()&&this.alignLeft()));break;case"bottom":this.alignBottom(),this.isOutOfBounds()&&(this.alignTop(),this.isOutOfBounds()&&(this.alignRight(),this.isOutOfBounds()&&this.alignLeft()));break;case"left":this.alignLeft(),this.isOutOfBounds()&&(this.alignRight(),this.isOutOfBounds()&&(this.alignTop(),this.isOutOfBounds()&&this.alignBottom()));break;case"right":this.alignRight(),this.isOutOfBounds()&&(this.alignLeft(),this.isOutOfBounds()&&(this.alignTop(),this.isOutOfBounds()&&this.alignBottom()));break}}getHostOffset(){if(this.getOption("appendTo")==="body"||this.getOption("appendTo")==="target"){let t=this.el.nativeElement.getBoundingClientRect(),e=t.left+i.getWindowScrollLeft(),o=t.top+i.getWindowScrollTop();return{left:e,top:o}}else return{left:0,top:0}}alignRight(){this.preAlign("right");let t=this.activeElement,e=this.getHostOffset(),o=e.left+i.getOuterWidth(t),r=e.top+(i.getOuterHeight(t)-i.getOuterHeight(this.container))/2;this.container.style.left=o+this.getOption("positionLeft")+"px",this.container.style.top=r+this.getOption("positionTop")+"px"}get activeElement(){return this.el.nativeElement.nodeName.includes("P-")?i.findSingle(this.el.nativeElement,".p-component"):this.el.nativeElement}alignLeft(){this.preAlign("left");let t=this.getHostOffset(),e=t.left-i.getOuterWidth(this.container),o=t.top+(i.getOuterHeight(this.el.nativeElement)-i.getOuterHeight(this.container))/2;this.container.style.left=e+this.getOption("positionLeft")+"px",this.container.style.top=o+this.getOption("positionTop")+"px"}alignTop(){this.preAlign("top");let t=this.getHostOffset(),e=t.left+(i.getOuterWidth(this.el.nativeElement)-i.getOuterWidth(this.container))/2,o=t.top-i.getOuterHeight(this.container);this.container.style.left=e+this.getOption("positionLeft")+"px",this.container.style.top=o+this.getOption("positionTop")+"px"}alignBottom(){this.preAlign("bottom");let t=this.getHostOffset(),e=t.left+(i.getOuterWidth(this.el.nativeElement)-i.getOuterWidth(this.container))/2,o=t.top+i.getOuterHeight(this.el.nativeElement);this.container.style.left=e+this.getOption("positionLeft")+"px",this.container.style.top=o+this.getOption("positionTop")+"px"}setOption(t){this._tooltipOptions=p(p({},this._tooltipOptions),t)}getOption(t){return this._tooltipOptions[t]}getTarget(t){return i.hasClass(t,"p-inputwrapper")?i.findSingle(t,"input"):t}preAlign(t){this.container.style.left="-999px",this.container.style.top="-999px";let e="p-tooltip p-component p-tooltip-"+t;this.container.className=this.getOption("tooltipStyleClass")?e+" "+this.getOption("tooltipStyleClass"):e}isOutOfBounds(){let t=this.container.getBoundingClientRect(),e=t.top,o=t.left,r=i.getOuterWidth(this.container),h=i.getOuterHeight(this.container),u=i.getViewport();return o+r>u.width||o<0||e<0||e+h>u.height}onWindowResize(t){this.hide()}bindDocumentResizeListener(){this.zone.runOutsideAngular(()=>{this.resizeListener=this.onWindowResize.bind(this),window.addEventListener("resize",this.resizeListener)})}unbindDocumentResizeListener(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)}bindScrollListener(){this.scrollHandler||(this.scrollHandler=new W(this.el.nativeElement,()=>{this.container&&this.hide()})),this.scrollHandler.bindScrollListener()}unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()}unbindEvents(){let t=this.getOption("tooltipEvent");if((t==="hover"||t==="both")&&(this.el.nativeElement.removeEventListener("mouseenter",this.mouseEnterListener),this.el.nativeElement.removeEventListener("mouseleave",this.mouseLeaveListener),this.el.nativeElement.removeEventListener("click",this.clickListener)),t==="focus"||t==="both"){let e=this.el.nativeElement.querySelector(".p-component");e||(e=this.getTarget(this.el.nativeElement)),e.removeEventListener("focus",this.focusListener),e.removeEventListener("blur",this.blurListener)}this.unbindDocumentResizeListener()}remove(){this.container&&this.container.parentElement&&(this.getOption("appendTo")==="body"?document.body.removeChild(this.container):this.getOption("appendTo")==="target"?this.el.nativeElement.removeChild(this.container):i.removeChild(this.container,this.getOption("appendTo"))),this.unbindDocumentResizeListener(),this.unbindScrollListener(),this.unbindContainerMouseleaveListener(),this.clearTimeouts(),this.container=null,this.scrollHandler=null}clearShowTimeout(){this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=null)}clearHideTimeout(){this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=null)}clearTimeouts(){this.clearShowTimeout(),this.clearHideTimeout()}ngOnDestroy(){this.unbindEvents(),this.container&&c.clear(this.container),this.remove(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null)}static \u0275fac=function(e){return new(e||n)(l(E),l(y),l(H),l(N),l(I),l(D))};static \u0275dir=m({type:n,selectors:[["","pTooltip",""]],hostAttrs:[1,"p-element"],hostBindings:function(e,o){e&1&&R("keydown.escape",function(h){return o.onPressEscape(h)},!1,b)},inputs:{tooltipPosition:"tooltipPosition",tooltipEvent:"tooltipEvent",appendTo:"appendTo",positionStyle:"positionStyle",tooltipStyleClass:"tooltipStyleClass",tooltipZIndex:"tooltipZIndex",escape:[s.HasDecoratorInputTransform,"escape","escape",d],showDelay:[s.HasDecoratorInputTransform,"showDelay","showDelay",a],hideDelay:[s.HasDecoratorInputTransform,"hideDelay","hideDelay",a],life:[s.HasDecoratorInputTransform,"life","life",a],positionTop:[s.HasDecoratorInputTransform,"positionTop","positionTop",a],positionLeft:[s.HasDecoratorInputTransform,"positionLeft","positionLeft",a],autoHide:[s.HasDecoratorInputTransform,"autoHide","autoHide",d],fitContent:[s.HasDecoratorInputTransform,"fitContent","fitContent",d],hideOnEscape:[s.HasDecoratorInputTransform,"hideOnEscape","hideOnEscape",d],content:[s.None,"pTooltip","content"],disabled:[s.None,"tooltipDisabled","disabled"],tooltipOptions:"tooltipOptions"},features:[S,O]})}return n})(),et=(()=>{class n{static \u0275fac=function(e){return new(e||n)};static \u0275mod=v({type:n});static \u0275inj=f({imports:[A]})}return n})();var st=(()=>{class n extends Z{static \u0275fac=(()=>{let t;return function(o){return(t||(t=L(n)))(o||n)}})();static \u0275cmp=g({type:n,selectors:[["AngleRightIcon"]],standalone:!0,features:[x,z],decls:2,vars:5,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M5.25 11.1728C5.14929 11.1694 5.05033 11.1455 4.9592 11.1025C4.86806 11.0595 4.78666 10.9984 4.72 10.9228C4.57955 10.7822 4.50066 10.5916 4.50066 10.3928C4.50066 10.1941 4.57955 10.0035 4.72 9.86283L7.72 6.86283L4.72 3.86283C4.66067 3.71882 4.64765 3.55991 4.68275 3.40816C4.71785 3.25642 4.79932 3.11936 4.91585 3.01602C5.03238 2.91268 5.17819 2.84819 5.33305 2.83149C5.4879 2.81479 5.64411 2.84671 5.78 2.92283L9.28 6.42283C9.42045 6.56346 9.49934 6.75408 9.49934 6.95283C9.49934 7.15158 9.42045 7.34221 9.28 7.48283L5.78 10.9228C5.71333 10.9984 5.63193 11.0595 5.5408 11.1025C5.44966 11.1455 5.35071 11.1694 5.25 11.1728Z","fill","currentColor"]],template:function(e,o){e&1&&(T(),M(0,"svg",0),F(1,"path",1),V()),e&2&&(B(o.getClassNames()),C("aria-label",o.ariaLabel)("aria-hidden",o.ariaHidden)("role",o.role))},encapsulation:2})}return n})();export{tt as a,et as b,st as c};
|
|
1
|
+
import{b as k,c,f as N,l as i,m as W,n as Z}from"./chunk-WGPXEEMZ.js";import{$a as x,Ba as y,Fa as E,Na as b,Pa as l,Qc as A,Ra as w,Rc as P,Va as I,Wa as H,Xa as D,Xb as z,ab as S,cb as C,ea as f,hb as B,la as s,ma as g,na as v,oa as m,ob as M,pb as V,qb as F,ra as O,sc as d,tc as a,ua as T,wa as L,xb as R}from"./chunk-VQUN6F64.js";import{a as p}from"./chunk-O3DEWASH.js";var tt=(()=>{class n{platformId;el;zone;config;renderer;viewContainer;tooltipPosition;tooltipEvent="hover";appendTo;positionStyle;tooltipStyleClass;tooltipZIndex;escape=!0;showDelay;hideDelay;life;positionTop;positionLeft;autoHide=!0;fitContent=!0;hideOnEscape=!0;content;get disabled(){return this._disabled}set disabled(t){this._disabled=t,this.deactivate()}tooltipOptions;_tooltipOptions={tooltipLabel:null,tooltipPosition:"right",tooltipEvent:"hover",appendTo:"body",positionStyle:null,tooltipStyleClass:null,tooltipZIndex:"auto",escape:!0,disabled:null,showDelay:null,hideDelay:null,positionTop:null,positionLeft:null,life:null,autoHide:!0,hideOnEscape:!0,id:k()+"_tooltip"};_disabled;container;styleClass;tooltipText;showTimeout;hideTimeout;active;mouseEnterListener;mouseLeaveListener;containerMouseleaveListener;clickListener;focusListener;blurListener;scrollHandler;resizeListener;constructor(t,e,o,r,h,u){this.platformId=t,this.el=e,this.zone=o,this.config=r,this.renderer=h,this.viewContainer=u}ngAfterViewInit(){P(this.platformId)&&this.zone.runOutsideAngular(()=>{let t=this.getOption("tooltipEvent");if((t==="hover"||t==="both")&&(this.mouseEnterListener=this.onMouseEnter.bind(this),this.mouseLeaveListener=this.onMouseLeave.bind(this),this.clickListener=this.onInputClick.bind(this),this.el.nativeElement.addEventListener("mouseenter",this.mouseEnterListener),this.el.nativeElement.addEventListener("click",this.clickListener),this.el.nativeElement.addEventListener("mouseleave",this.mouseLeaveListener)),t==="focus"||t==="both"){this.focusListener=this.onFocus.bind(this),this.blurListener=this.onBlur.bind(this);let e=this.el.nativeElement.querySelector(".p-component");e||(e=this.getTarget(this.el.nativeElement)),e.addEventListener("focus",this.focusListener),e.addEventListener("blur",this.blurListener)}})}ngOnChanges(t){t.tooltipPosition&&this.setOption({tooltipPosition:t.tooltipPosition.currentValue}),t.tooltipEvent&&this.setOption({tooltipEvent:t.tooltipEvent.currentValue}),t.appendTo&&this.setOption({appendTo:t.appendTo.currentValue}),t.positionStyle&&this.setOption({positionStyle:t.positionStyle.currentValue}),t.tooltipStyleClass&&this.setOption({tooltipStyleClass:t.tooltipStyleClass.currentValue}),t.tooltipZIndex&&this.setOption({tooltipZIndex:t.tooltipZIndex.currentValue}),t.escape&&this.setOption({escape:t.escape.currentValue}),t.showDelay&&this.setOption({showDelay:t.showDelay.currentValue}),t.hideDelay&&this.setOption({hideDelay:t.hideDelay.currentValue}),t.life&&this.setOption({life:t.life.currentValue}),t.positionTop&&this.setOption({positionTop:t.positionTop.currentValue}),t.positionLeft&&this.setOption({positionLeft:t.positionLeft.currentValue}),t.disabled&&this.setOption({disabled:t.disabled.currentValue}),t.content&&(this.setOption({tooltipLabel:t.content.currentValue}),this.active&&(t.content.currentValue?this.container&&this.container.offsetParent?(this.updateText(),this.align()):this.show():this.hide())),t.autoHide&&this.setOption({autoHide:t.autoHide.currentValue}),t.id&&this.setOption({id:t.id.currentValue}),t.tooltipOptions&&(this._tooltipOptions=p(p({},this._tooltipOptions),t.tooltipOptions.currentValue),this.deactivate(),this.active&&(this.getOption("tooltipLabel")?this.container&&this.container.offsetParent?(this.updateText(),this.align()):this.show():this.hide()))}isAutoHide(){return this.getOption("autoHide")}onMouseEnter(t){!this.container&&!this.showTimeout&&this.activate()}onMouseLeave(t){this.isAutoHide()?this.deactivate():!(i.hasClass(t.relatedTarget,"p-tooltip")||i.hasClass(t.relatedTarget,"p-tooltip-text")||i.hasClass(t.relatedTarget,"p-tooltip-arrow"))&&this.deactivate()}onFocus(t){this.activate()}onBlur(t){this.deactivate()}onInputClick(t){this.deactivate()}onPressEscape(){this.hideOnEscape&&this.deactivate()}activate(){if(this.active=!0,this.clearHideTimeout(),this.getOption("showDelay")?this.showTimeout=setTimeout(()=>{this.show()},this.getOption("showDelay")):this.show(),this.getOption("life")){let t=this.getOption("showDelay")?this.getOption("life")+this.getOption("showDelay"):this.getOption("life");this.hideTimeout=setTimeout(()=>{this.hide()},t)}}deactivate(){this.active=!1,this.clearShowTimeout(),this.getOption("hideDelay")?(this.clearHideTimeout(),this.hideTimeout=setTimeout(()=>{this.hide()},this.getOption("hideDelay"))):this.hide()}create(){this.container&&(this.clearHideTimeout(),this.remove()),this.container=document.createElement("div"),this.container.setAttribute("id",this.getOption("id")),this.container.setAttribute("role","tooltip");let t=document.createElement("div");t.className="p-tooltip-arrow",this.container.appendChild(t),this.tooltipText=document.createElement("div"),this.tooltipText.className="p-tooltip-text",this.updateText(),this.getOption("positionStyle")&&(this.container.style.position=this.getOption("positionStyle")),this.container.appendChild(this.tooltipText),this.getOption("appendTo")==="body"?document.body.appendChild(this.container):this.getOption("appendTo")==="target"?i.appendChild(this.container,this.el.nativeElement):i.appendChild(this.container,this.getOption("appendTo")),this.container.style.display="inline-block",this.fitContent&&(this.container.style.width="fit-content"),this.isAutoHide()?this.container.style.pointerEvents="none":(this.container.style.pointerEvents="unset",this.bindContainerMouseleaveListener())}bindContainerMouseleaveListener(){if(!this.containerMouseleaveListener){let t=this.container??this.container.nativeElement;this.containerMouseleaveListener=this.renderer.listen(t,"mouseleave",e=>{this.deactivate()})}}unbindContainerMouseleaveListener(){this.containerMouseleaveListener&&(this.bindContainerMouseleaveListener(),this.containerMouseleaveListener=null)}show(){if(!this.getOption("tooltipLabel")||this.getOption("disabled"))return;this.create(),this.el.nativeElement.closest("p-dialog")?setTimeout(()=>{this.container&&this.align()},100):this.align(),i.fadeIn(this.container,250),this.getOption("tooltipZIndex")==="auto"?c.set("tooltip",this.container,this.config.zIndex.tooltip):this.container.style.zIndex=this.getOption("tooltipZIndex"),this.bindDocumentResizeListener(),this.bindScrollListener()}hide(){this.getOption("tooltipZIndex")==="auto"&&c.clear(this.container),this.remove()}updateText(){let t=this.getOption("tooltipLabel");if(t instanceof w){let e=this.viewContainer.createEmbeddedView(t);e.detectChanges(),e.rootNodes.forEach(o=>this.tooltipText.appendChild(o))}else this.getOption("escape")?(this.tooltipText.innerHTML="",this.tooltipText.appendChild(document.createTextNode(t))):this.tooltipText.innerHTML=t}align(){switch(this.getOption("tooltipPosition")){case"top":this.alignTop(),this.isOutOfBounds()&&(this.alignBottom(),this.isOutOfBounds()&&(this.alignRight(),this.isOutOfBounds()&&this.alignLeft()));break;case"bottom":this.alignBottom(),this.isOutOfBounds()&&(this.alignTop(),this.isOutOfBounds()&&(this.alignRight(),this.isOutOfBounds()&&this.alignLeft()));break;case"left":this.alignLeft(),this.isOutOfBounds()&&(this.alignRight(),this.isOutOfBounds()&&(this.alignTop(),this.isOutOfBounds()&&this.alignBottom()));break;case"right":this.alignRight(),this.isOutOfBounds()&&(this.alignLeft(),this.isOutOfBounds()&&(this.alignTop(),this.isOutOfBounds()&&this.alignBottom()));break}}getHostOffset(){if(this.getOption("appendTo")==="body"||this.getOption("appendTo")==="target"){let t=this.el.nativeElement.getBoundingClientRect(),e=t.left+i.getWindowScrollLeft(),o=t.top+i.getWindowScrollTop();return{left:e,top:o}}else return{left:0,top:0}}alignRight(){this.preAlign("right");let t=this.activeElement,e=this.getHostOffset(),o=e.left+i.getOuterWidth(t),r=e.top+(i.getOuterHeight(t)-i.getOuterHeight(this.container))/2;this.container.style.left=o+this.getOption("positionLeft")+"px",this.container.style.top=r+this.getOption("positionTop")+"px"}get activeElement(){return this.el.nativeElement.nodeName.includes("P-")?i.findSingle(this.el.nativeElement,".p-component"):this.el.nativeElement}alignLeft(){this.preAlign("left");let t=this.getHostOffset(),e=t.left-i.getOuterWidth(this.container),o=t.top+(i.getOuterHeight(this.el.nativeElement)-i.getOuterHeight(this.container))/2;this.container.style.left=e+this.getOption("positionLeft")+"px",this.container.style.top=o+this.getOption("positionTop")+"px"}alignTop(){this.preAlign("top");let t=this.getHostOffset(),e=t.left+(i.getOuterWidth(this.el.nativeElement)-i.getOuterWidth(this.container))/2,o=t.top-i.getOuterHeight(this.container);this.container.style.left=e+this.getOption("positionLeft")+"px",this.container.style.top=o+this.getOption("positionTop")+"px"}alignBottom(){this.preAlign("bottom");let t=this.getHostOffset(),e=t.left+(i.getOuterWidth(this.el.nativeElement)-i.getOuterWidth(this.container))/2,o=t.top+i.getOuterHeight(this.el.nativeElement);this.container.style.left=e+this.getOption("positionLeft")+"px",this.container.style.top=o+this.getOption("positionTop")+"px"}setOption(t){this._tooltipOptions=p(p({},this._tooltipOptions),t)}getOption(t){return this._tooltipOptions[t]}getTarget(t){return i.hasClass(t,"p-inputwrapper")?i.findSingle(t,"input"):t}preAlign(t){this.container.style.left="-999px",this.container.style.top="-999px";let e="p-tooltip p-component p-tooltip-"+t;this.container.className=this.getOption("tooltipStyleClass")?e+" "+this.getOption("tooltipStyleClass"):e}isOutOfBounds(){let t=this.container.getBoundingClientRect(),e=t.top,o=t.left,r=i.getOuterWidth(this.container),h=i.getOuterHeight(this.container),u=i.getViewport();return o+r>u.width||o<0||e<0||e+h>u.height}onWindowResize(t){this.hide()}bindDocumentResizeListener(){this.zone.runOutsideAngular(()=>{this.resizeListener=this.onWindowResize.bind(this),window.addEventListener("resize",this.resizeListener)})}unbindDocumentResizeListener(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)}bindScrollListener(){this.scrollHandler||(this.scrollHandler=new W(this.el.nativeElement,()=>{this.container&&this.hide()})),this.scrollHandler.bindScrollListener()}unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()}unbindEvents(){let t=this.getOption("tooltipEvent");if((t==="hover"||t==="both")&&(this.el.nativeElement.removeEventListener("mouseenter",this.mouseEnterListener),this.el.nativeElement.removeEventListener("mouseleave",this.mouseLeaveListener),this.el.nativeElement.removeEventListener("click",this.clickListener)),t==="focus"||t==="both"){let e=this.el.nativeElement.querySelector(".p-component");e||(e=this.getTarget(this.el.nativeElement)),e.removeEventListener("focus",this.focusListener),e.removeEventListener("blur",this.blurListener)}this.unbindDocumentResizeListener()}remove(){this.container&&this.container.parentElement&&(this.getOption("appendTo")==="body"?document.body.removeChild(this.container):this.getOption("appendTo")==="target"?this.el.nativeElement.removeChild(this.container):i.removeChild(this.container,this.getOption("appendTo"))),this.unbindDocumentResizeListener(),this.unbindScrollListener(),this.unbindContainerMouseleaveListener(),this.clearTimeouts(),this.container=null,this.scrollHandler=null}clearShowTimeout(){this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=null)}clearHideTimeout(){this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=null)}clearTimeouts(){this.clearShowTimeout(),this.clearHideTimeout()}ngOnDestroy(){this.unbindEvents(),this.container&&c.clear(this.container),this.remove(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null)}static \u0275fac=function(e){return new(e||n)(l(E),l(y),l(H),l(N),l(I),l(D))};static \u0275dir=m({type:n,selectors:[["","pTooltip",""]],hostAttrs:[1,"p-element"],hostBindings:function(e,o){e&1&&R("keydown.escape",function(h){return o.onPressEscape(h)},!1,b)},inputs:{tooltipPosition:"tooltipPosition",tooltipEvent:"tooltipEvent",appendTo:"appendTo",positionStyle:"positionStyle",tooltipStyleClass:"tooltipStyleClass",tooltipZIndex:"tooltipZIndex",escape:[s.HasDecoratorInputTransform,"escape","escape",d],showDelay:[s.HasDecoratorInputTransform,"showDelay","showDelay",a],hideDelay:[s.HasDecoratorInputTransform,"hideDelay","hideDelay",a],life:[s.HasDecoratorInputTransform,"life","life",a],positionTop:[s.HasDecoratorInputTransform,"positionTop","positionTop",a],positionLeft:[s.HasDecoratorInputTransform,"positionLeft","positionLeft",a],autoHide:[s.HasDecoratorInputTransform,"autoHide","autoHide",d],fitContent:[s.HasDecoratorInputTransform,"fitContent","fitContent",d],hideOnEscape:[s.HasDecoratorInputTransform,"hideOnEscape","hideOnEscape",d],content:[s.None,"pTooltip","content"],disabled:[s.None,"tooltipDisabled","disabled"],tooltipOptions:"tooltipOptions"},features:[S,O]})}return n})(),et=(()=>{class n{static \u0275fac=function(e){return new(e||n)};static \u0275mod=v({type:n});static \u0275inj=f({imports:[A]})}return n})();var st=(()=>{class n extends Z{static \u0275fac=(()=>{let t;return function(o){return(t||(t=L(n)))(o||n)}})();static \u0275cmp=g({type:n,selectors:[["AngleRightIcon"]],standalone:!0,features:[x,z],decls:2,vars:5,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M5.25 11.1728C5.14929 11.1694 5.05033 11.1455 4.9592 11.1025C4.86806 11.0595 4.78666 10.9984 4.72 10.9228C4.57955 10.7822 4.50066 10.5916 4.50066 10.3928C4.50066 10.1941 4.57955 10.0035 4.72 9.86283L7.72 6.86283L4.72 3.86283C4.66067 3.71882 4.64765 3.55991 4.68275 3.40816C4.71785 3.25642 4.79932 3.11936 4.91585 3.01602C5.03238 2.91268 5.17819 2.84819 5.33305 2.83149C5.4879 2.81479 5.64411 2.84671 5.78 2.92283L9.28 6.42283C9.42045 6.56346 9.49934 6.75408 9.49934 6.95283C9.49934 7.15158 9.42045 7.34221 9.28 7.48283L5.78 10.9228C5.71333 10.9984 5.63193 11.0595 5.5408 11.1025C5.44966 11.1455 5.35071 11.1694 5.25 11.1728Z","fill","currentColor"]],template:function(e,o){e&1&&(T(),M(0,"svg",0),F(1,"path",1),V()),e&2&&(B(o.getClassNames()),C("aria-label",o.ariaLabel)("aria-hidden",o.ariaHidden)("role",o.role))},encapsulation:2})}return n})();export{tt as a,et as b,st as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{L as P,V as w,W as _}from"./chunk-
|
|
1
|
+
import{L as P,V as w,W as _}from"./chunk-F4C5JGCF.js";import{Ba as d,Bc as x,Ic as C,Nb as b,Oa as r,Pa as i,Pb as v,_b as y,bb as m,db as s,la as a,ma as c,oa as l,ob as f,pb as h,tb as g,xb as u}from"./chunk-VQUN6F64.js";var R=(o,p)=>({"tooltip-container-bottom":o,"tooltip-container-top":p});function B(o,p){o&1&&g(0)}var O=(()=>{class o{text;position;content;static \u0275fac=function(t){return new(t||o)};static \u0275cmp=c({type:o,selectors:[["POS-tooltip"]],inputs:{text:"text",position:"position",content:"content"},decls:3,vars:6,consts:[[3,"ngClass"],[4,"ngTemplateOutlet"]],template:function(t,n){t&1&&(f(0,"div",0),b(1),m(2,B,1,0,"ng-container",1),h()),t&2&&(s("ngClass",y(3,R,n.position=="top"||!n.position,n.position=="bottom")),r(),v(" ",n.text," "),r(),s("ngTemplateOutlet",n.content))},dependencies:[x,C],styles:['.tooltip-container-top[_ngcontent-%COMP%]{box-shadow:0 0 5px #0003;margin:.7rem 1rem 1rem;min-width:50px;max-width:400px;background:#fff;border:1px solid #ccc;pointer-events:none;position:relative;min-height:1rem;padding:.5rem;border-radius:4px}.tooltip-container-top[_ngcontent-%COMP%]:after, .tooltip-container-top[_ngcontent-%COMP%]:before{content:"";display:block;position:absolute;bottom:100%;width:0;height:0;border-style:solid}.tooltip-container-top[_ngcontent-%COMP%]:after{left:calc(49% + 2px);border-color:transparent transparent #fff transparent;border-width:6px}.tooltip-container-top[_ngcontent-%COMP%]:before{left:49%;border-color:transparent transparent #ccc transparent;border-width:8px}.tooltip-container-bottom[_ngcontent-%COMP%]{box-shadow:0 0 5px #0003;margin:.7rem 1rem 1rem;min-width:50px;max-width:400px;background:#fff;border:1px solid #ccc;pointer-events:none;position:relative;min-height:1rem;padding:.5rem;border-radius:4px}.tooltip-container-bottom[_ngcontent-%COMP%]:after, .tooltip-container-bottom[_ngcontent-%COMP%]:before{content:"";display:block;position:absolute;bottom:100%;width:0;height:0;border-style:solid}.tooltip-container-bottom[_ngcontent-%COMP%]:after{left:calc(40% + 2px);border-color:#fff transparent transparent transparent;border-width:6px;top:100%}.tooltip-container-bottom[_ngcontent-%COMP%]:before{left:40%;border-color:#ccc transparent transparent transparent;border-width:8px;top:100%}']})}return o})();var X=(()=>{class o{overlayPositionBuilder;elementRef;overlay;content;position;overlayRef;constructor(e,t,n){this.overlayPositionBuilder=e,this.elementRef=t,this.overlay=n}ngOnInit(){let e=this.initPosition(),t=this.overlayPositionBuilder.flexibleConnectedTo(this.elementRef).withPositions([e]);this.overlayRef=this.overlay.create({positionStrategy:t})}initPosition(){let e={originX:"center",originY:"bottom",overlayX:"center",overlayY:"top"};switch(this.position){case"top":e={originX:"center",originY:"top",overlayX:"center",overlayY:"bottom"};break}return e}show(){if(this.content){this.overlayRef.detach();let e=new P(O),t=this.overlayRef.attach(e);typeof this.content=="string"?t.instance.text=this.content:t.instance.content=this.content,t.instance.position=this.position}}hide(){this.overlayRef.detach()}static \u0275fac=function(t){return new(t||o)(i(w),i(d),i(_))};static \u0275dir=l({type:o,selectors:[["","customTooltip",""]],hostBindings:function(t,n){t&1&&u("mouseenter",function(){return n.show()})("mouseleave",function(){return n.hide()})},inputs:{content:[a.None,"customTooltip","content"],position:"position"}})}return o})();export{X as a};
|