marketplacepos 5.41.2 → 5.43.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.
Files changed (84) hide show
  1. package/Marketplace/chunk-24DT5FN2.js +1 -0
  2. package/Marketplace/chunk-2DJWDXTZ.js +4 -0
  3. package/Marketplace/{chunk-IARG7PLL.js → chunk-2EL3WEWS.js} +1 -1
  4. package/Marketplace/chunk-3Y6LJS2H.js +1 -0
  5. package/Marketplace/chunk-6BFXOKCB.js +1 -0
  6. package/Marketplace/chunk-6DZKFXDF.js +1 -0
  7. package/Marketplace/{chunk-H6WIS2HR.js → chunk-6LULIB2P.js} +1 -1
  8. package/Marketplace/chunk-6QGSDBR7.js +1 -0
  9. package/Marketplace/{chunk-XGYBJAFE.js → chunk-736E275F.js} +1 -1
  10. package/Marketplace/{chunk-MCJRJUAO.js → chunk-ABQG3LB5.js} +1 -1
  11. package/Marketplace/{chunk-6RSAOZUV.js → chunk-ARZ2S6YD.js} +1 -1
  12. package/Marketplace/{chunk-EL2JACEW.js → chunk-AVVPZ3NI.js} +1 -1
  13. package/Marketplace/{chunk-FUWROOE4.js → chunk-AZ2FLWCK.js} +3 -2
  14. package/Marketplace/chunk-BAYW2AHI.js +1 -0
  15. package/Marketplace/{chunk-4JG3ZRYP.js → chunk-BCM6WRZR.js} +1 -1
  16. package/Marketplace/{chunk-HPGFBOM4.js → chunk-CFC5CQ3V.js} +1 -1
  17. package/Marketplace/{chunk-Z3KD73SP.js → chunk-CLDURV35.js} +2 -2
  18. package/Marketplace/{chunk-REL734JM.js → chunk-CRZOIZUQ.js} +1 -1
  19. package/Marketplace/{chunk-TQIIWFRF.js → chunk-D66XCOBY.js} +1 -1
  20. package/Marketplace/{chunk-SD7M7HOB.js → chunk-DIUEZVRG.js} +1 -1
  21. package/Marketplace/{chunk-SRJREA2O.js → chunk-DLSU35PZ.js} +1 -1
  22. package/Marketplace/{chunk-DS4AAABV.js → chunk-DMW4DWIM.js} +1 -1
  23. package/Marketplace/chunk-ECN3QRMT.js +1 -0
  24. package/Marketplace/chunk-F4HFUSVI.js +1 -0
  25. package/Marketplace/chunk-G4OF4YLE.js +2 -0
  26. package/Marketplace/{chunk-BM4KX73T.js → chunk-GMGCY3OL.js} +1 -1
  27. package/Marketplace/{chunk-5JYR3YJW.js → chunk-I5IZPTXZ.js} +1 -1
  28. package/Marketplace/{chunk-6UEHSA6E.js → chunk-IR5OMZTZ.js} +1 -1
  29. package/Marketplace/{chunk-Q6V3IOGL.js → chunk-ITTTKW6F.js} +1 -1
  30. package/Marketplace/{chunk-CEQA4PTY.js → chunk-IUWXRFDI.js} +1 -1
  31. package/Marketplace/{chunk-PEA6KVUS.js → chunk-JRXB6762.js} +1 -1
  32. package/Marketplace/{chunk-5B4KSPFM.js → chunk-K654EZ3I.js} +1 -1
  33. package/Marketplace/{chunk-WTAJSWM2.js → chunk-KC3C62UO.js} +2 -2
  34. package/Marketplace/{chunk-RHRJXX4W.js → chunk-KR2UT3GA.js} +1 -1
  35. package/Marketplace/{chunk-P5FCWMYK.js → chunk-MKOJVMRR.js} +1 -1
  36. package/Marketplace/{chunk-MP43HA4R.js → chunk-MMT3VFZZ.js} +1 -1
  37. package/Marketplace/{chunk-4YOHPIVG.js → chunk-NB5XHM62.js} +1 -1
  38. package/Marketplace/chunk-O6U5QCHJ.js +1 -0
  39. package/Marketplace/chunk-OJWFYXZX.js +1 -0
  40. package/Marketplace/{chunk-FFAZ3Q3F.js → chunk-OTFACGUB.js} +1 -1
  41. package/Marketplace/{chunk-CMZW5QAE.js → chunk-PB2SJSML.js} +1 -1
  42. package/Marketplace/{chunk-C7QA2BEN.js → chunk-PZ4PSWYM.js} +1 -1
  43. package/Marketplace/{chunk-YP2IPJ2O.js → chunk-QACWANJT.js} +1 -1
  44. package/Marketplace/{chunk-EVLYO3HX.js → chunk-QUXUEWEF.js} +1 -1
  45. package/Marketplace/chunk-R22TUWCL.js +15 -0
  46. package/Marketplace/{chunk-ZLNGASME.js → chunk-RCRPQNNW.js} +1 -1
  47. package/Marketplace/chunk-SACERVTF.js +1 -0
  48. package/Marketplace/{chunk-DG32XLYI.js → chunk-SDKAJBVB.js} +1 -1
  49. package/Marketplace/chunk-SMCI6XBO.js +1 -0
  50. package/Marketplace/chunk-SNDG7727.js +1 -0
  51. package/Marketplace/{chunk-S3YMF63V.js → chunk-T2IGESWD.js} +1 -1
  52. package/Marketplace/{chunk-KOKHDU4I.js → chunk-T3Z5OMIZ.js} +1 -1
  53. package/Marketplace/chunk-TGN4NMQY.js +1 -0
  54. package/Marketplace/{chunk-PBGDP6XV.js → chunk-UBB6E4VL.js} +1 -1
  55. package/Marketplace/chunk-UDIAPGRB.js +1 -0
  56. package/Marketplace/chunk-UEWZXE4O.js +1 -0
  57. package/Marketplace/chunk-WXQDF2MX.js +1 -0
  58. package/Marketplace/chunk-X5DJBQUZ.js +1 -0
  59. package/Marketplace/{chunk-BBVWQJ7M.js → chunk-XENOOCI4.js} +1 -1
  60. package/Marketplace/{chunk-4DV4IT7R.js → chunk-YR3PNRLA.js} +1 -1
  61. package/Marketplace/{chunk-R5TTZPDX.js → chunk-ZDYYX736.js} +1 -1
  62. package/Marketplace/chunk-ZFDUVL4I.js +1 -0
  63. package/Marketplace/index.html +2 -2
  64. package/Marketplace/{main-SPNULRF2.js → main-OO7ZEZW4.js} +1 -1
  65. package/package.json +1 -1
  66. package/Marketplace/chunk-4HZR3O3W.js +0 -1
  67. package/Marketplace/chunk-5ZX2OVBB.js +0 -1
  68. package/Marketplace/chunk-6SBCWEJJ.js +0 -1
  69. package/Marketplace/chunk-7H5ILTTK.js +0 -1
  70. package/Marketplace/chunk-H4PA2O6O.js +0 -1
  71. package/Marketplace/chunk-IIMHYIRJ.js +0 -1
  72. package/Marketplace/chunk-K6YEZYU4.js +0 -5
  73. package/Marketplace/chunk-KJHSB4A2.js +0 -1
  74. package/Marketplace/chunk-KTIKLSOU.js +0 -1
  75. package/Marketplace/chunk-KTXS7IPU.js +0 -1
  76. package/Marketplace/chunk-LOPJ3O56.js +0 -1
  77. package/Marketplace/chunk-MGVYUYPC.js +0 -15
  78. package/Marketplace/chunk-T4K3CJ2R.js +0 -1
  79. package/Marketplace/chunk-TQ4ZLZ7C.js +0 -1
  80. package/Marketplace/chunk-UDQBFSOV.js +0 -1
  81. package/Marketplace/chunk-UYW53K3I.js +0 -1
  82. package/Marketplace/chunk-WX5S3HCU.js +0 -1
  83. package/Marketplace/chunk-ZGZ74AJR.js +0 -1
  84. package/Marketplace/chunk-ZIUDNFYT.js +0 -1
@@ -1,3 +1,3 @@
1
- import{a as T}from"./chunk-Z3ITXK3D.js";import{a as Ye}from"./chunk-ACIMXBIC.js";import{a as Ke,b as me,c as ze,d as Ve,e as Se,f as qe,g as ve,h as Ge,i as G,j as we,k as y}from"./chunk-TGMCGROM.js";import{a as Xe}from"./chunk-CMZW5QAE.js";import{e as te}from"./chunk-4M63ID5T.js";import{b as ge,c as ee}from"./chunk-PW42BQIY.js";import{b as Je}from"./chunk-MZI5AYCE.js";import{a as Ze}from"./chunk-UJYSVGLV.js";import{G as We,n as Ue,o as $e,p as He}from"./chunk-MTUIRWOB.js";import{F as Oe,G as Ne,Hb as $,La as L,O as ue,Ra as fe,T as Me,Wa as U,Z as de,aa as x,ba as he,c as g,dd as Fe,ea as V,ed as Le,f as Y,id as q,j as xe,ja as A,k as Re,ka as B,ma as E,n as K,o as Q,oa as h,p as R,pa as F,q as z,qa as Be,ua as pe,v as D,w as je}from"./chunk-JS55A2RS.js";import{a as le,i as I}from"./chunk-66YHNWRR.js";var Qe={production:!0,version:"5.41.2",firebaseConfig:{apiKey:"AIzaSyDnnitFXpM8TglWKNpzu4ChgF98n25Rgvw",authDomain:"auth.dealpos.com",projectId:"devops-signin",storageBucket:"devops-signin.appspot.com",messagingSenderId:"412465165194",appId:"1:412465165194:web:03d806f6b6ab6f8b460e73",measurementId:"G-MNDBRJ5XZD"},news:"https://changelog.dealpos.app/umbraco/delivery/api/v2/content?fetch=children:omni&sort=sortOrder:asc"};var kt="firebase",At="11.10.0";G(kt,At,"app");var H=new Fe("ANGULARFIRE2_VERSION");var et=(r,s)=>{let e=s?[s]:Ge(),t=[];return e.forEach(n=>{n.container.getProvider(r).instances.forEach(i=>{t.includes(i)||t.push(i)})}),t},ke=function(r){return r[r.SILENT=0]="SILENT",r[r.WARN=1]="WARN",r[r.VERBOSE=2]="VERBOSE",r}(ke||{}),Dr=q()&&typeof Zone<"u"?ke.WARN:ke.SILENT;var re=class{zone;delegate;constructor(s,e=Re){this.zone=s,this.delegate=e}now(){return this.delegate.now()}schedule(s,e,t){let n=this.zone,o=function(i){n?n.runGuarded(()=>{s.apply(this,[i])}):s.apply(this,[i])};return this.delegate.schedule(o,e,t)}},Ae=(()=>{class r{outsideAngular;insideAngular;constructor(){let e=F(L);this.outsideAngular=e.runOutsideAngular(()=>new re(typeof Zone>"u"?void 0:Zone.current)),this.insideAngular=e.run(()=>new re(typeof Zone>"u"?void 0:Zone.current,xe))}static \u0275fac=function(t){return new(t||r)};static \u0275prov=A({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();var It=new Map,Et={activated:!1,tokenObservers:[]},Tt={initialized:!1,enabled:!1};function C(r){return It.get(r)||Object.assign({},Et)}function ot(){return Tt}var yt="https://content-firebaseappcheck.googleapis.com/v1";var Ct="exchangeDebugToken",tt={OFFSET_DURATION:5*60*1e3,RETRIAL_MIN_WAIT:30*1e3,RETRIAL_MAX_WAIT:16*60*1e3},Ur=24*60*60*1e3;var Ee=class{constructor(s,e,t,n,o){if(this.operation=s,this.retryPolicy=e,this.getWaitDuration=t,this.lowerBound=n,this.upperBound=o,this.pending=null,this.nextErrorWaitInterval=n,n>o)throw new Error("Proactive refresh lower bound greater than upper bound!")}start(){this.nextErrorWaitInterval=this.lowerBound,this.process(!0).catch(()=>{})}stop(){this.pending&&(this.pending.reject("cancelled"),this.pending=null)}isRunning(){return!!this.pending}process(s){return I(this,null,function*(){this.stop();try{this.pending=new me,this.pending.promise.catch(e=>{}),yield Pt(this.getNextRun(s)),this.pending.resolve(),yield this.pending.promise,this.pending=new me,this.pending.promise.catch(e=>{}),yield this.operation(),this.pending.resolve(),yield this.pending.promise,this.process(!0).catch(()=>{})}catch(e){this.retryPolicy(e)?this.process(!1).catch(()=>{}):this.stop()}})}getNextRun(s){if(s)return this.nextErrorWaitInterval=this.lowerBound,this.getWaitDuration();{let e=this.nextErrorWaitInterval;return this.nextErrorWaitInterval*=2,this.nextErrorWaitInterval>this.upperBound&&(this.nextErrorWaitInterval=this.upperBound),e}}};function Pt(r){return new Promise(s=>{setTimeout(s,r)})}var Dt={"already-initialized":"You have already called initializeAppCheck() for FirebaseApp {$appName} with different options. To avoid this error, call initializeAppCheck() with the same options as when it was originally called. This will return the already initialized instance.","use-before-activation":"App Check is being used before initializeAppCheck() is called for FirebaseApp {$appName}. Call initializeAppCheck() before instantiating other Firebase services.","fetch-network-error":"Fetch failed to connect to a network. Check Internet connection. Original error: {$originalErrorMessage}.","fetch-parse-error":"Fetch client could not parse response. Original error: {$originalErrorMessage}.","fetch-status-error":"Fetch server returned an HTTP error status. HTTP status: {$httpStatus}.","storage-open":"Error thrown when opening storage. Original error: {$originalErrorMessage}.","storage-get":"Error thrown when reading from storage. Original error: {$originalErrorMessage}.","storage-set":"Error thrown when writing to storage. Original error: {$originalErrorMessage}.","recaptcha-error":"ReCAPTCHA error.","initial-throttle":"{$httpStatus} error. Attempts allowed again after {$time}",throttled:"Requests throttled due to previous {$httpStatus} error. Attempts allowed again after {$time}"},O=new Ve("appCheck","AppCheck",Dt);function it(r){if(!C(r).activated)throw O.create("use-before-activation",{appName:r.name})}function st(t,n){return I(this,arguments,function*({url:r,body:s},e){let o={"Content-Type":"application/json"},i=e.getImmediate({optional:!0});if(i){let f=yield i.getHeartbeatsHeader();f&&(o["X-Firebase-Client"]=f)}let a={method:"POST",body:JSON.stringify(s),headers:o},l;try{l=yield fetch(r,a)}catch(f){throw O.create("fetch-network-error",{originalErrorMessage:f?.message})}if(l.status!==200)throw O.create("fetch-status-error",{httpStatus:l.status});let c;try{c=yield l.json()}catch(f){throw O.create("fetch-parse-error",{originalErrorMessage:f?.message})}let d=c.ttl.match(/^([\d.]+)(s)$/);if(!d||!d[2]||isNaN(Number(d[1])))throw O.create("fetch-parse-error",{originalErrorMessage:`ttl field (timeToLive) is not in standard Protobuf Duration format: ${c.ttl}`});let u=Number(d[1])*1e3,p=Date.now();return{token:c.token,expireTimeMillis:p+u,issuedAtTimeMillis:p}})}function at(r,s){let{projectId:e,appId:t,apiKey:n}=r.options;return{url:`${yt}/projects/${e}/apps/${t}:${Ct}?key=${n}`,body:{debug_token:s}}}var _t="firebase-app-check-database",xt=1,Te="firebase-app-check-store";var ne=null;function Rt(){return ne||(ne=new Promise((r,s)=>{try{let e=indexedDB.open(_t,xt);e.onsuccess=t=>{r(t.target.result)},e.onerror=t=>{var n;s(O.create("storage-open",{originalErrorMessage:(n=t.target.error)===null||n===void 0?void 0:n.message}))},e.onupgradeneeded=t=>{let n=t.target.result;switch(t.oldVersion){case 0:n.createObjectStore(Te,{keyPath:"compositeKey"})}}}catch(e){s(O.create("storage-open",{originalErrorMessage:e?.message}))}}),ne)}function jt(r,s){return Ot(Nt(r),s)}function Ot(r,s){return I(this,null,function*(){let t=(yield Rt()).transaction(Te,"readwrite"),o=t.objectStore(Te).put({compositeKey:r,value:s});return new Promise((i,a)=>{o.onsuccess=l=>{i()},t.onerror=l=>{var c;a(O.create("storage-set",{originalErrorMessage:(c=l.target.error)===null||c===void 0?void 0:c.message}))}})})}function Nt(r){return`${r.options.appId}-${r.name}`}var J=new qe("@firebase/app-check");function be(r,s){return ze()?jt(r,s).catch(e=>{J.warn(`Failed to write token to IndexedDB. Error: ${e}`)}):Promise.resolve()}function ct(){return ot().enabled}function lt(){return I(this,null,function*(){let r=ot();if(r.enabled&&r.token)return r.token.promise;throw Error(`
1
+ import{a as T}from"./chunk-Z3ITXK3D.js";import{a as Ye}from"./chunk-ACIMXBIC.js";import{a as Ke,b as me,c as ze,d as Ve,e as Se,f as qe,g as ve,h as Ge,i as G,j as we,k as y}from"./chunk-TGMCGROM.js";import{a as Xe}from"./chunk-PB2SJSML.js";import{e as te}from"./chunk-4M63ID5T.js";import{b as ge,c as ee}from"./chunk-PW42BQIY.js";import{b as Je}from"./chunk-MZI5AYCE.js";import{a as Ze}from"./chunk-UJYSVGLV.js";import{G as We,n as Ue,o as $e,p as He}from"./chunk-MTUIRWOB.js";import{F as Oe,G as Ne,Hb as $,La as L,O as ue,Ra as fe,T as Me,Wa as U,Z as de,aa as x,ba as he,c as g,dd as Fe,ea as V,ed as Le,f as Y,id as q,j as xe,ja as A,k as Re,ka as B,ma as E,n as K,o as Q,oa as h,p as R,pa as F,q as z,qa as Be,ua as pe,v as D,w as je}from"./chunk-JS55A2RS.js";import{a as le,i as I}from"./chunk-66YHNWRR.js";var Qe={production:!0,version:"5.43.0",firebaseConfig:{apiKey:"AIzaSyDnnitFXpM8TglWKNpzu4ChgF98n25Rgvw",authDomain:"auth.dealpos.com",projectId:"devops-signin",storageBucket:"devops-signin.appspot.com",messagingSenderId:"412465165194",appId:"1:412465165194:web:03d806f6b6ab6f8b460e73",measurementId:"G-MNDBRJ5XZD"},news:"https://changelog.dealpos.app/umbraco/delivery/api/v2/content?fetch=children:omni&sort=sortOrder:asc"};var kt="firebase",At="11.10.0";G(kt,At,"app");var H=new Fe("ANGULARFIRE2_VERSION");var et=(r,s)=>{let e=s?[s]:Ge(),t=[];return e.forEach(n=>{n.container.getProvider(r).instances.forEach(i=>{t.includes(i)||t.push(i)})}),t},ke=function(r){return r[r.SILENT=0]="SILENT",r[r.WARN=1]="WARN",r[r.VERBOSE=2]="VERBOSE",r}(ke||{}),Dr=q()&&typeof Zone<"u"?ke.WARN:ke.SILENT;var re=class{zone;delegate;constructor(s,e=Re){this.zone=s,this.delegate=e}now(){return this.delegate.now()}schedule(s,e,t){let n=this.zone,o=function(i){n?n.runGuarded(()=>{s.apply(this,[i])}):s.apply(this,[i])};return this.delegate.schedule(o,e,t)}},Ae=(()=>{class r{outsideAngular;insideAngular;constructor(){let e=F(L);this.outsideAngular=e.runOutsideAngular(()=>new re(typeof Zone>"u"?void 0:Zone.current)),this.insideAngular=e.run(()=>new re(typeof Zone>"u"?void 0:Zone.current,xe))}static \u0275fac=function(t){return new(t||r)};static \u0275prov=A({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();var It=new Map,Et={activated:!1,tokenObservers:[]},Tt={initialized:!1,enabled:!1};function C(r){return It.get(r)||Object.assign({},Et)}function ot(){return Tt}var yt="https://content-firebaseappcheck.googleapis.com/v1";var Ct="exchangeDebugToken",tt={OFFSET_DURATION:5*60*1e3,RETRIAL_MIN_WAIT:30*1e3,RETRIAL_MAX_WAIT:16*60*1e3},Ur=24*60*60*1e3;var Ee=class{constructor(s,e,t,n,o){if(this.operation=s,this.retryPolicy=e,this.getWaitDuration=t,this.lowerBound=n,this.upperBound=o,this.pending=null,this.nextErrorWaitInterval=n,n>o)throw new Error("Proactive refresh lower bound greater than upper bound!")}start(){this.nextErrorWaitInterval=this.lowerBound,this.process(!0).catch(()=>{})}stop(){this.pending&&(this.pending.reject("cancelled"),this.pending=null)}isRunning(){return!!this.pending}process(s){return I(this,null,function*(){this.stop();try{this.pending=new me,this.pending.promise.catch(e=>{}),yield Pt(this.getNextRun(s)),this.pending.resolve(),yield this.pending.promise,this.pending=new me,this.pending.promise.catch(e=>{}),yield this.operation(),this.pending.resolve(),yield this.pending.promise,this.process(!0).catch(()=>{})}catch(e){this.retryPolicy(e)?this.process(!1).catch(()=>{}):this.stop()}})}getNextRun(s){if(s)return this.nextErrorWaitInterval=this.lowerBound,this.getWaitDuration();{let e=this.nextErrorWaitInterval;return this.nextErrorWaitInterval*=2,this.nextErrorWaitInterval>this.upperBound&&(this.nextErrorWaitInterval=this.upperBound),e}}};function Pt(r){return new Promise(s=>{setTimeout(s,r)})}var Dt={"already-initialized":"You have already called initializeAppCheck() for FirebaseApp {$appName} with different options. To avoid this error, call initializeAppCheck() with the same options as when it was originally called. This will return the already initialized instance.","use-before-activation":"App Check is being used before initializeAppCheck() is called for FirebaseApp {$appName}. Call initializeAppCheck() before instantiating other Firebase services.","fetch-network-error":"Fetch failed to connect to a network. Check Internet connection. Original error: {$originalErrorMessage}.","fetch-parse-error":"Fetch client could not parse response. Original error: {$originalErrorMessage}.","fetch-status-error":"Fetch server returned an HTTP error status. HTTP status: {$httpStatus}.","storage-open":"Error thrown when opening storage. Original error: {$originalErrorMessage}.","storage-get":"Error thrown when reading from storage. Original error: {$originalErrorMessage}.","storage-set":"Error thrown when writing to storage. Original error: {$originalErrorMessage}.","recaptcha-error":"ReCAPTCHA error.","initial-throttle":"{$httpStatus} error. Attempts allowed again after {$time}",throttled:"Requests throttled due to previous {$httpStatus} error. Attempts allowed again after {$time}"},O=new Ve("appCheck","AppCheck",Dt);function it(r){if(!C(r).activated)throw O.create("use-before-activation",{appName:r.name})}function st(t,n){return I(this,arguments,function*({url:r,body:s},e){let o={"Content-Type":"application/json"},i=e.getImmediate({optional:!0});if(i){let f=yield i.getHeartbeatsHeader();f&&(o["X-Firebase-Client"]=f)}let a={method:"POST",body:JSON.stringify(s),headers:o},l;try{l=yield fetch(r,a)}catch(f){throw O.create("fetch-network-error",{originalErrorMessage:f?.message})}if(l.status!==200)throw O.create("fetch-status-error",{httpStatus:l.status});let c;try{c=yield l.json()}catch(f){throw O.create("fetch-parse-error",{originalErrorMessage:f?.message})}let d=c.ttl.match(/^([\d.]+)(s)$/);if(!d||!d[2]||isNaN(Number(d[1])))throw O.create("fetch-parse-error",{originalErrorMessage:`ttl field (timeToLive) is not in standard Protobuf Duration format: ${c.ttl}`});let u=Number(d[1])*1e3,p=Date.now();return{token:c.token,expireTimeMillis:p+u,issuedAtTimeMillis:p}})}function at(r,s){let{projectId:e,appId:t,apiKey:n}=r.options;return{url:`${yt}/projects/${e}/apps/${t}:${Ct}?key=${n}`,body:{debug_token:s}}}var _t="firebase-app-check-database",xt=1,Te="firebase-app-check-store";var ne=null;function Rt(){return ne||(ne=new Promise((r,s)=>{try{let e=indexedDB.open(_t,xt);e.onsuccess=t=>{r(t.target.result)},e.onerror=t=>{var n;s(O.create("storage-open",{originalErrorMessage:(n=t.target.error)===null||n===void 0?void 0:n.message}))},e.onupgradeneeded=t=>{let n=t.target.result;switch(t.oldVersion){case 0:n.createObjectStore(Te,{keyPath:"compositeKey"})}}}catch(e){s(O.create("storage-open",{originalErrorMessage:e?.message}))}}),ne)}function jt(r,s){return Ot(Nt(r),s)}function Ot(r,s){return I(this,null,function*(){let t=(yield Rt()).transaction(Te,"readwrite"),o=t.objectStore(Te).put({compositeKey:r,value:s});return new Promise((i,a)=>{o.onsuccess=l=>{i()},t.onerror=l=>{var c;a(O.create("storage-set",{originalErrorMessage:(c=l.target.error)===null||c===void 0?void 0:c.message}))}})})}function Nt(r){return`${r.options.appId}-${r.name}`}var J=new qe("@firebase/app-check");function be(r,s){return ze()?jt(r,s).catch(e=>{J.warn(`Failed to write token to IndexedDB. Error: ${e}`)}):Promise.resolve()}function ct(){return ot().enabled}function lt(){return I(this,null,function*(){let r=ot();if(r.enabled&&r.token)return r.token.promise;throw Error(`
2
2
  Can't get debug token in production mode.
3
3
  `)})}var Mt={error:"UNKNOWN_ERROR"};function Bt(r){return Ke.encodeString(JSON.stringify(r),!1)}function ye(r,s=!1,e=!1){return I(this,null,function*(){let t=r.app;it(t);let n=C(t),o=n.token,i;if(o&&!Z(o)&&(n.token=void 0,o=void 0),!o){let c=yield n.cachedTokenPromise;c&&(Z(c)?o=c:yield be(t,void 0))}if(!s&&o&&Z(o))return{token:o.token};let a=!1;if(ct())try{n.exchangeTokenPromise||(n.exchangeTokenPromise=st(at(t,yield lt()),r.heartbeatServiceProvider).finally(()=>{n.exchangeTokenPromise=void 0}),a=!0);let c=yield n.exchangeTokenPromise;return yield be(t,c),n.token=c,{token:c.token}}catch(c){return c.code==="appCheck/throttled"||c.code==="appCheck/initial-throttle"?J.warn(c.message):e&&J.error(c),Ie(c)}try{n.exchangeTokenPromise||(n.exchangeTokenPromise=n.provider.getToken().finally(()=>{n.exchangeTokenPromise=void 0}),a=!0),o=yield C(t).exchangeTokenPromise}catch(c){c.code==="appCheck/throttled"||c.code==="appCheck/initial-throttle"?J.warn(c.message):e&&J.error(c),i=c}let l;return o?i?Z(o)?l={token:o.token,internalError:i}:l=Ie(i):(l={token:o.token},n.token=o,yield be(t,o)):l=Ie(i),a&&$t(t,l),l})}function Ft(r){return I(this,null,function*(){let s=r.app;it(s);let{provider:e}=C(s);if(ct()){let t=yield lt(),{token:n}=yield st(at(s,t),r.heartbeatServiceProvider);return{token:n}}else{let{token:t}=yield e.getToken();return{token:t}}})}function Lt(r,s,e,t){let{app:n}=r,o=C(n),i={next:e,error:t,type:s};if(o.tokenObservers=[...o.tokenObservers,i],o.token&&Z(o.token)){let a=o.token;Promise.resolve().then(()=>{e({token:a.token}),rt(r)}).catch(()=>{})}o.cachedTokenPromise.then(()=>rt(r))}function ut(r,s){let e=C(r),t=e.tokenObservers.filter(n=>n.next!==s);t.length===0&&e.tokenRefresher&&e.tokenRefresher.isRunning()&&e.tokenRefresher.stop(),e.tokenObservers=t}function rt(r){let{app:s}=r,e=C(s),t=e.tokenRefresher;t||(t=Ut(r),e.tokenRefresher=t),!t.isRunning()&&e.isTokenAutoRefreshEnabled&&t.start()}function Ut(r){let{app:s}=r;return new Ee(()=>I(null,null,function*(){let e=C(s),t;if(e.token?t=yield ye(r,!0):t=yield ye(r),t.error)throw t.error;if(t.internalError)throw t.internalError}),()=>!0,()=>{let e=C(s);if(e.token){let t=e.token.issuedAtTimeMillis+(e.token.expireTimeMillis-e.token.issuedAtTimeMillis)*.5+3e5,n=e.token.expireTimeMillis-5*60*1e3;return t=Math.min(t,n),Math.max(0,t-Date.now())}else return 0},tt.RETRIAL_MIN_WAIT,tt.RETRIAL_MAX_WAIT)}function $t(r,s){let e=C(r).tokenObservers;for(let t of e)try{t.type==="EXTERNAL"&&s.error!=null?t.error(s.error):t.next(s)}catch{}}function Z(r){return r.expireTimeMillis-Date.now()>0}function Ie(r){return{token:Bt(Mt),error:r}}var Ce=class{constructor(s,e){this.app=s,this.heartbeatServiceProvider=e}_delete(){let{tokenObservers:s}=C(this.app);for(let e of s)ut(this.app,e.next);return Promise.resolve()}};function Ht(r,s){return new Ce(r,s)}function Wt(r){return{getToken:s=>ye(r,s),getLimitedUseToken:()=>Ft(r),addTokenListener:s=>Lt(r,"INTERNAL",s),removeTokenListener:s=>ut(r.app,s)}}var Kt="@firebase/app-check",zt="0.10.1";var Vt="app-check",nt="app-check-internal";function qt(){ve(new Se(Vt,r=>{let s=r.getProvider("app").getImmediate(),e=r.getProvider("heartbeat");return Ht(s,e)},"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((r,s,e)=>{r.getProvider(nt).initialize()})),ve(new Se(nt,r=>{let s=r.getProvider("app-check").getImmediate();return Wt(s)},"PUBLIC").setInstantiationMode("EXPLICIT")),G(Kt,zt)}qt();var Gt="app-check";var oe=class{constructor(){return et(Gt)}};var Jt=["localhost","0.0.0.0","127.0.0.1"],tn=typeof window<"u"&&Jt.includes(window.location.hostname);var dt=(()=>{class r{constructor(){}getParseToken(){let e=JSON.parse(window.localStorage.getItem("user"));return this.ParseToken(e.Token.access_token)}GetRoles(){let t=this.getParseToken()["http://schemas.microsoft.com/ws/2008/06/identity/claims/role"];return typeof t=="string"&&(t=[t]),t||[]}ParseToken(e){try{let n=e.split(".")[0].replace("-","+").replace("_","/"),o=JSON.parse(window.atob(n)),a=e.split(".")[1].replace("-","+").replace("_","/"),l=JSON.parse(window.atob(a));return l.header=o,l}catch{return!1}}static{this.\u0275fac=function(t){return new(t||r)}}static{this.\u0275prov=A({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var Yt="firebase",Qt="11.10.0";y.registerVersion(Yt,Qt,"app-compat");var er=["ngOnDestroy"],pt=(r,s,e,t={})=>new Proxy(r,{get:(n,o)=>e.runOutsideAngular(()=>{if(r[o])return t?.spy?.get&&t.spy.get(o,r[o]),r[o];if(er.indexOf(o)>-1)return()=>{};let i=s.toPromise().then(a=>{let l=a?.[o];return typeof l=="function"?l.bind(a):l?.then?l.then(c=>e.run(()=>c)):e.run(()=>l)});return new Proxy(()=>{},{get:(a,l)=>i[l],apply:(a,l,c)=>i.then(d=>{let u=d?.(...c);return t?.spy?.apply&&t.spy.apply(o,c,u),u})})})});var ie=class{constructor(s){return s}},se=new E("angularfire2.app.options"),ae=new E("angularfire2.app.name");function Pe(r,s,e){let t=typeof e=="string"&&e||"[DEFAULT]",n=typeof e=="object"&&e||{};n.name=n.name||t;let i=y.apps.filter(a=>a&&a.name===n.name)[0]||s.runOutsideAngular(()=>y.initializeApp(r,n));try{if(JSON.stringify(r)!==JSON.stringify(i.options)){let a=!!module.hot;tr("error",`${i.name} Firebase App already initialized with different options${a?", you may need to reload as Firebase is not HMR aware.":"."}`)}}catch{}return new ie(i)}var tr=(r,...s)=>{q()&&typeof console<"u"&&console[r](...s)},rr={provide:ie,useFactory:Pe,deps:[se,L,[new Be,ae]]},Jo=(()=>{class r{static initializeApp(e,t){return{ngModule:r,providers:[{provide:se,useValue:e},{provide:ae,useValue:t}]}}constructor(e){y.registerVersion("angularfire",H.full,"core"),y.registerVersion("angularfire",H.full,"app-compat"),y.registerVersion("angular",Le.full,e.toString())}static \u0275fac=function(t){return new(t||r)(h(U))};static \u0275mod=$({type:r});static \u0275inj=B({providers:[rr]})}return r})();function ft(r,s,e,t,n){let[,o,i]=globalThis.\u0275AngularfireInstanceCache.find(a=>a[0]===r)||[];if(o)return nr(n,i)||(ht("error",`${s} was already initialized on the ${e} Firebase App with different settings.${or?" You may need to reload as Firebase is not HMR aware.":""}`),ht("warn",{is:n,was:i})),o;{let a=t();return globalThis.\u0275AngularfireInstanceCache.push([r,a,n]),a}}function nr(r,s){try{return r.toString()===s.toString()}catch{return r===s}}var or=typeof module<"u"&&!!module.hot,ht=(r,...s)=>{q()&&typeof console<"u"&&console[r](...s)};globalThis.\u0275AngularfireInstanceCache||=[];var ir=new E("angularfire2.auth.use-emulator"),sr=new E("angularfire2.auth.settings"),ar=new E("angularfire2.auth.tenant-id"),cr=new E("angularfire2.auth.langugage-code"),lr=new E("angularfire2.auth.use-device-language"),ur=new E("angularfire.auth.persistence"),dr=(r,s,e,t,n,o,i,a)=>ft(`${r.name}.auth`,"AngularFireAuth",r.name,()=>{let l=s.runOutsideAngular(()=>r.auth());if(e&&l.useEmulator(...e),t&&(l.tenantId=t),l.languageCode=n,o&&l.useDeviceLanguage(),i)for(let[c,d]of Object.entries(i))l.settings[c]=d;return a&&l.setPersistence(a),l},[e,t,n,o,i,a]),De=(()=>{class r{injector=F(pe);authState;idToken;user;idTokenResult;credential;constructor(e,t,n,o,i,a,l,c,d,u,p,f){let W=new Y,N=z(void 0).pipe(K(i.outsideAngular),x(()=>o.runOutsideAngular(()=>import("./chunk-GCECFUOP.js"))),D(()=>Pe(e,o,t)),D(P=>dr(P,o,a,c,d,u,l,p)),de({bufferSize:1,refCount:!1}));if(He(n))this.authState=this.user=this.idToken=this.idTokenResult=this.credential=z(null);else{N.pipe(Me()).subscribe();let P=N.pipe(x(S=>S.getRedirectResult().then(_=>_,()=>null)),Je(this.injector),de({bufferSize:1,refCount:!1})),X=N.pipe(x(S=>new g(_=>({unsubscribe:o.runOutsideAngular(()=>S.onAuthStateChanged(M=>_.next(M),M=>_.error(M),()=>_.complete()))})))),ce=N.pipe(x(S=>new g(_=>({unsubscribe:o.runOutsideAngular(()=>S.onIdTokenChanged(M=>_.next(M),M=>_.error(M),()=>_.complete()))}))));this.authState=P.pipe(he(X),Q(i.outsideAngular),K(i.insideAngular)),this.user=P.pipe(he(ce),Q(i.outsideAngular),K(i.insideAngular)),this.idToken=this.user.pipe(x(S=>S?R(S.getIdToken()):z(null))),this.idTokenResult=this.user.pipe(x(S=>S?R(S.getIdTokenResult()):z(null))),this.credential=Oe(P,W,this.authState.pipe(Ne(S=>!S))).pipe(D(S=>S?.user?S:null),Q(i.outsideAngular),K(i.insideAngular))}return pt(this,N,o,{spy:{apply:(P,X,ce)=>{(P.startsWith("signIn")||P.startsWith("createUser"))&&ce.then(S=>W.next(S))}}})}static \u0275fac=function(t){return new(t||r)(h(se),h(ae,8),h(U),h(L),h(Ae),h(ir,8),h(sr,8),h(ar,8),h(cr,8),h(lr,8),h(ur,8),h(oe,8))};static \u0275prov=A({token:r,factory:r.\u0275fac,providedIn:"any"})}return r})(),di=(()=>{class r{constructor(){y.registerVersion("angularfire",H.full,"auth-compat")}static \u0275fac=function(t){return new(t||r)};static \u0275mod=$({type:r});static \u0275inj=B({providers:[De]})}return r})();function m(r,s,e,t){return new Promise((n,o)=>{r||o("IndexedDB not available");let i=r.open(s,e),a;i.onsuccess=l=>{a=i.result,n(a)},i.onerror=l=>{o(`IndexedDB error: ${i.error}`)},typeof t=="function"&&(i.onupgradeneeded=l=>{t(l,a)})})}function gt(r,s,e,t,n){if(!r)return;let o=r.open(s,e);o.onupgradeneeded=i=>{let a=i.target.result;t.forEach(c=>{if(!a.objectStoreNames.contains(c.store)){let d=a.createObjectStore(c.store,c.storeConfig);c.storeSchema.forEach(u=>{d.createIndex(u.name,u.keypath,u.options)})}});let l=n&&n();l&&Object.keys(l).map(c=>parseInt(c,10)).filter(c=>c>i.oldVersion).sort((c,d)=>c-d).forEach(c=>{l[c](a,o.transaction)}),a.close()},o.onsuccess=i=>{i.target.result.close()}}function pr(r,s,e){if(!r||!s||!e)throw Error('Params: "dbName", "version", "storeName" are mandatory.');return new g(t=>{try{let n=s+1,o=indexedDB.open(r,n);o.onupgradeneeded=i=>{let a=i.target.result;a.deleteObjectStore(e),a.close(),console.log("onupgradeneeded"),t.next(!0),t.complete()},o.onerror=i=>t.error(i)}catch(n){t.error(n)}})}function fr(r,s){return r.objectStoreNames.contains(s)}function b(r,s,e){r||e("You need to use the openDatabase function to create a database before you query it!"),fr(r,s)||e(`objectStore does not exists: ${s}`)}function w(r,s){let e=r.transaction(s.storeName,s.dbMode);return e.onerror=s.error,e.onabort=s.abort,e}function k(r,s,e,t){return{storeName:s,dbMode:r,error:n=>{e(n)},abort:n=>{e(n)}}}var v=function(r){return r.readonly="readonly",r.readwrite="readwrite",r}(v||{}),mt=new E(null),_e=(()=>{class r{constructor(e,t){if(this.dbConfig=e,this.platformId=t,!e.name)throw new Error("NgxIndexedDB: Please, provide the dbName in the configuration");if(!e.version)throw new Error("NgxIndexedDB: Please, provide the db version in the configuration");this.isBrowser=$e(this.platformId),this.isBrowser&&(this.indexedDB=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB,gt(this.indexedDB,e.name,e.version,e.objectStoresMeta,e.migrationFactory),m(this.indexedDB,e.name).then(n=>{n.version!==e.version&&(this.dbConfig.version=n.version)}))}createObjectStore(e,t){let n=[e];gt(this.indexedDB,this.dbConfig.name,++this.dbConfig.version,n,t)}add(e,t,n){return new g(o=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(i=>{let l=w(i,k(v.readwrite,e,d=>o.error(d))).objectStore(e),c=n?l.add(t,n):l.add(t);c.onsuccess=d=>I(this,null,function*(){let u=d.target.result,p=l.get(u);p.onsuccess=f=>{o.next(f.target.result),o.complete()}})}).catch(i=>o.error(i))})}bulkAdd(e,t){let n=new Promise((o,i)=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(a=>{let c=w(a,k(v.readwrite,e,o,i)).objectStore(e),d=t.map(u=>new Promise((p,f)=>{let W=u.key;delete u.key;let N=W?c.add(u,W):c.add(u);N.onsuccess=P=>{let X=P.target.result;p(X)}}));o(Promise.all(d))}).catch(a=>i(a))});return R(n)}bulkDelete(e,t){let n=t.map(o=>new Promise((i,a)=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(l=>{let c=w(l,k(v.readwrite,e,a,i));c.objectStore(e).delete(o),c.oncomplete=()=>{this.getAll(e).pipe(ue(1)).subscribe(u=>{i(u)})}}).catch(l=>a(l))}));return R(Promise.all(n))}getByKey(e,t){return new g(n=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(o=>{let l=w(o,k(v.readonly,e,n.error)).objectStore(e).get(t);l.onsuccess=c=>{n.next(c.target.result),n.complete()},l.onerror=c=>{n.error(c)}}).catch(o=>n.error(o))})}bulkGet(e,t){let n=t.map(o=>this.getByKey(e,o));return new g(o=>{je(n).subscribe(i=>{o.next(i),o.complete()})})}getByID(e,t){return new g(n=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(o=>{b(o,e,c=>n.error(c));let l=w(o,k(v.readonly,e,n.error,n.next)).objectStore(e).get(t);l.onsuccess=c=>{n.next(c.target.result)}}).catch(o=>n.error(o))})}getByIndex(e,t,n){return new g(o=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(i=>{b(i,e,u=>o.error(u));let d=w(i,k(v.readonly,e,o.error)).objectStore(e).index(t).get(n);d.onsuccess=u=>{o.next(u.target.result),o.complete()}}).catch(i=>o.error(i))})}getAll(e){return new g(t=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(n=>{b(n,e,l=>t.error(l));let a=w(n,k(v.readonly,e,t.error,t.next)).objectStore(e).getAll();a.onerror=l=>{t.error(l)},a.onsuccess=({target:{result:l}})=>{t.next(l),t.complete()}}).catch(n=>t.error(n))})}update(e,t){return new g(n=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(o=>{b(o,e,c=>n.error(c));let a=w(o,k(v.readwrite,e,c=>n.error(c))).objectStore(e),l=a.put(t);l.onsuccess=c=>I(this,null,function*(){let d=c.target.result,u=a.get(d);u.onsuccess=p=>{n.next(p.target.result),n.complete()}})}).catch(o=>n.error(o))})}delete(e,t){return new g(n=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(o=>{b(o,e,l=>n.error(l));let i=w(o,k(v.readwrite,e,l=>n.error(l)));i.objectStore(e).delete(t),i.oncomplete=()=>{this.getAll(e).pipe(ue(1)).subscribe(l=>{n.next(l),n.complete()})}}).catch(o=>n.error(o))})}deleteByKey(e,t){return new g(n=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(o=>{b(o,e,l=>n.error(l));let i=w(o,k(v.readwrite,e,l=>n.error(l))),a=i.objectStore(e);i.oncomplete=()=>{n.next(!0),n.complete()},a.delete(t)}).catch(o=>n.error(o))})}clear(e){return new g(t=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(n=>{b(n,e,a=>t.error(a));let o=w(n,k(v.readwrite,e,a=>t.error(a)));o.objectStore(e).clear(),o.oncomplete=()=>{t.next(!0),t.complete()}}).catch(n=>t.error(n))})}deleteDatabase(){return new g(e=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(t=>I(this,null,function*(){yield t.close();let n=this.indexedDB.deleteDatabase(this.dbConfig.name);n.onsuccess=()=>{e.next(!0),e.complete()},n.onerror=o=>e.error(o),n.onblocked=()=>{throw new Error("Unable to delete database because it's blocked")}})).catch(t=>e.error(t))})}openCursor(e,t){return new g(n=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(o=>{b(o,e,c=>n.error(c));let a=w(o,k(v.readonly,e,n.error)).objectStore(e),l=t===void 0?a.openCursor():a.openCursor(t);l.onsuccess=c=>{n.next(c),n.complete()}}).catch(o=>n.error(o))})}openCursorByIndex(e,t,n,o=v.readonly){let i=new Y;return m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(a=>{b(a,e,p=>{i.error(p)});let u=w(a,k(o,e,p=>{i.error(p)},()=>{i.next()})).objectStore(e).index(t).openCursor(n);u.onsuccess=p=>{i.next(p)}}).catch(a=>i.error(a)),i}getAllByIndex(e,t,n){let o=[];return new g(i=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(a=>{b(a,e,p=>i.error(p));let u=w(a,k(v.readonly,e,i.error)).objectStore(e).index(t).openCursor(n);u.onsuccess=p=>{let f=p.target.result;f?(o.push(f.value),f.continue()):(i.next(o),i.complete())}}).catch(a=>i.error(a))})}getAllKeysByIndex(e,t,n){let o=[];return new g(i=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(a=>{b(a,e,p=>i.error(p));let u=w(a,k(v.readonly,e,i.error)).objectStore(e).index(t).openKeyCursor(n);u.onsuccess=p=>{let f=p.target.result;f?(o.push({primaryKey:f.primaryKey,key:f.key}),f.continue()):(i.next(o),i.complete())}}).catch(a=>i.error(a))})}count(e,t){return new g(n=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(o=>{b(o,e,c=>n.error(c));let l=w(o,k(v.readonly,e,n.error)).objectStore(e).count(t);l.onerror=c=>n.error(c),l.onsuccess=c=>{n.next(c.target.result),n.complete()}}).catch(o=>n.error(o))})}countByIndex(e,t,n){return new g(o=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(i=>{b(i,e,u=>o.error(u));let d=w(i,k(v.readonly,e,o.error)).objectStore(e).index(t).count(n);d.onerror=u=>o.error(u),d.onsuccess=u=>{o.next(u.target.result),o.complete()}}).catch(i=>o.error(i))})}deleteObjectStore(e){return pr(this.dbConfig.name,++this.dbConfig.version,e)}}return r.\u0275fac=function(e){return new(e||r)(h(mt),h(U))},r.\u0275prov=A({token:r,factory:r.\u0275fac}),r})(),wi=(()=>{class r{static forRoot(e){return{ngModule:r,providers:[_e,{provide:mt,useValue:e}]}}}return r.\u0275fac=function(e){return new(e||r)},r.\u0275mod=$({type:r}),r.\u0275inj=B({imports:[[Ue]]}),r})();var St=(()=>{class r{constructor(e){this.db=e,this.DATABASE="Categories"}saveCategoriesByChannelType(e,t){let n=this.getKey(t);return this.db.add(this.DATABASE,e,n).pipe(D(o=>e))}getCategoriesByChannelType(e){let t=this.getKey(e);return this.db.getByKey(this.DATABASE,t)}getKey(e){let t="";switch(e){case ge.Lazada:t="Lazada";break;case ge.Tokopedia:t="Tokopedia";break}return t}clearDatabase(){this.db.clear(this.DATABASE)}getHostName(){let e=localStorage.getItem("Authorization");return this.hostName=JSON.parse(e)?.Host,this.hostName}static{this.\u0275fac=function(t){return new(t||r)(h(_e))}}static{this.\u0275prov=A({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var vt=(()=>{class r{inititalizeIntercom(){let e=this.getFromLocalStorage();e?.Enabled&&window.Intercom("boot",{app_id:"xv1oomgl",name:e.Name,email:e.Email,created_at:e.Created,user_hash:e.Hash})}shutdown(){this.getFromLocalStorage()?.Enabled&&(window.Intercom("shutdown"),this.clearStorage())}clearStorage(){localStorage.removeItem("Intercom")}updateLocalStorage(e){let t={Enabled:!0};e&&(t=le(le({},t),e)),localStorage.setItem("Intercom",JSON.stringify(t))}getFromLocalStorage(){let e=localStorage.getItem("Intercom");return JSON.parse(e)}hideLauncher(){let e=this.getFromLocalStorage();e?.Enabled&&(window.Intercom("update",{app_id:"xv1oomgl",hide_default_launcher:!0}),e.hide_default_launcher=!0,this.updateLocalStorage(e))}showLauncher(){let e=this.getFromLocalStorage();e?.Enabled&&(window.Intercom("update",{app_id:"xv1oomgl",hide_default_launcher:!1}),e.hide_default_launcher=!1,this.updateLocalStorage(e))}isHideLauncher(){let e=this.getFromLocalStorage();return ee.IsEmpty(e?.hide_default_launcher)?!1:e?.hide_default_launcher}static{this.\u0275fac=function(t){return new(t||r)}}static{this.\u0275prov=A({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var wt=(()=>{class r{constructor(){this.httpService=F(te),this.currentUser=fe(null),this.tokenValue=fe(null)}refreshToken(){return this.httpService.get(Xe.RefreshToken).pipe(V(e=>{this.updateTokenInLocalStorage(e)}))}updateTokenInLocalStorage(e){this.saveUserToLocalStorage(e),this.saveChannelsToLocalStorage(e.Channels)}saveUserToLocalStorage(e){let t=JSON.stringify(e);localStorage.setItem(T.USER,t)}getUser(){if(this.currentUser())return this.currentUser();{let e=localStorage.getItem(T.USER);return this.currentUser.set(e?JSON.parse(e):null),this.currentUser()}}getTokenValue(){let e=this.getUser();if(!this.tokenValue()){let t=Ye.parseJwt(e?.Token.access_token);this.tokenValue.set(t)}return this.tokenValue()}saveChannelsToLocalStorage(e){let t=JSON.stringify(e);localStorage.setItem(T.CHANNELS,t)}getChannels(){let e=localStorage.getItem(T.CHANNELS);return e?JSON.parse(e):[]}clearStorage(){localStorage.removeItem(T.USER),localStorage.removeItem(T.CHANNELS),this.currentUser.set(null),this.tokenValue.set(null)}static{this.\u0275fac=function(t){return new(t||r)}}static{this.\u0275prov=A({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var Ui=(()=>{class r{constructor(e,t,n,o,i,a,l,c){this.httpService=e,this.tokenDecodeService=t,this.afAuth=n,this.ngxPermission=o,this.localDataService=i,this.router=a,this.intercomService=l,this.tokenService=c}login(e){return this.httpService.post("/api/token/Login",e).pipe(V(t=>{this.setLocalStorage(t,e.Host,e.Username),this.loadPermissions()}))}getNews(){return this.httpService.get(Qe.news).pipe(D(e=>e?.items?.map(t=>t?.properties)))}loginWithGoogle(e,t){e.preventDefault();let n=new we;return n.setCustomParameters({prompt:"select_account"}),R(this.afAuth.signInWithPopup(n)).pipe(D(o=>o.credential),D(o=>o.idToken),x(o=>this.httpService.post("/api/token/LoginWithSocialProvider",JSON.stringify({IDToken:o,Host:t}))),V(o=>{this.setLocalStorage(o,t,null),this.loadPermissions()}))}setLocalStorage(e,t,n){this.tokenService.updateTokenInLocalStorage(e),localStorage.setItem(T.AUTHORIZATION,JSON.stringify({Host:t,username:n})),this.intercomService.updateLocalStorage(e.IntercomWidget),this.intercomService.inititalizeIntercom()}loadPermissions(){this.ngxPermission.loadPermissions([]);let e=localStorage.getItem(T.USER);if(ee.IsNotEmpty(e)){let t=this.tokenDecodeService.GetRoles();this.ngxPermission.loadPermissions(t)}}getChannels(){return this.tokenService.getChannels()}logout(){this.clearLocalStorage(),this.ngxPermission.flushPermissions()}isActiveToken(){let e=this.tokenService.getUser(),t=new Date;if(e!=null){let n=new Date(e.Token.expiredAt);return t<n?!0:(this.clearLocalStorage(),!1)}else return!1}getDomain(){if(!this.domain){let e=localStorage.getItem(T.AUTHORIZATION);this.domain="https://"+JSON.parse(e).Host}return this.domain}clearLocalStorage(){this.domain=null,this.tokenService.clearStorage(),this.intercomService.shutdown(),this.localDataService.clearDatabase(),this.router.navigate([""])}static{this.\u0275fac=function(t){return new(t||r)(h(te),h(dt),h(De),h(Ze),h(St),h(We),h(vt),h(wt))}}static{this.\u0275prov=A({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();export{Qe as a,dt as b,Jo as c,di as d,wi as e,St as f,vt as g,wt as h,Ui as i};
@@ -1 +1 @@
1
- import{a as C}from"./chunk-4CTORK4F.js";import{a as r}from"./chunk-5JYR3YJW.js";import"./chunk-C7QA2BEN.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-TGMCGROM.js";import"./chunk-CMZW5QAE.js";import"./chunk-4M63ID5T.js";import"./chunk-K5XRGNWG.js";import{a as h,b as y}from"./chunk-TNKPTRB3.js";import"./chunk-PW42BQIY.js";import"./chunk-MZI5AYCE.js";import"./chunk-UJYSVGLV.js";import"./chunk-HFKKITEW.js";import"./chunk-OZ77CAJD.js";import{F as v,J as o,n}from"./chunk-MTUIRWOB.js";import{Gb as l,Hb as s,Qc as f,Yb as u,ic as c,jc as d,ka as m,kc as i,rb as p}from"./chunk-JS55A2RS.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";var M=(()=>{class e{constructor(){this.inventoryTabs=[{Title:"Single Channel Comparison",Url:"/menu/inventory/bychannel"},{Title:"Multi Channel Comparison",Url:"/menu/inventory/pos"},{Title:"Different Inventory",Url:"/menu/inventory/channel_summary"}]}static{this.\u0275fac=function(t){return new(t||e)}}static{this.\u0275cmp=l({type:e,selectors:[["app-inventory"]],features:[f([C])],decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(t,b){t&1&&(c(0,"nav",0)(1,"div",1)(2,"div"),i(3,"nav-tab",2),d()()(),i(4,"router-outlet")),t&2&&(p(3),u("Tabs",b.inventoryTabs))},dependencies:[n,y,h,o,v],encapsulation:2})}}return e})();var g=[{path:"",component:M,children:[{path:"",redirectTo:"bychannel",pathMatch:"full"},{path:"pos",loadComponent(){return import("./chunk-6UEHSA6E.js").then(e=>e.MultiChannelComparison)},canActivate:[r],data:{title:"Inventory Comparison"}},{path:"bychannel",loadComponent(){return import("./chunk-H6WIS2HR.js").then(e=>e.SingleChannelComparisonComponent)},canActivate:[r],data:{title:"Inventory Comparison"}},{path:"channel_summary",loadComponent(){return import("./chunk-R5TTZPDX.js").then(e=>e.ChannelSummaryComponent)},canActivate:[r],data:{title:"Different Inventory"}}]}],E=(()=>{class e{static{this.\u0275fac=function(t){return new(t||e)}}static{this.\u0275mod=s({type:e})}static{this.\u0275inj=m({imports:[n,o.forChild(g)]})}}return e})();export{E as InventoryRoutingModule};
1
+ import{a as C}from"./chunk-4CTORK4F.js";import{a as r}from"./chunk-I5IZPTXZ.js";import"./chunk-PZ4PSWYM.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-TGMCGROM.js";import"./chunk-PB2SJSML.js";import"./chunk-4M63ID5T.js";import"./chunk-K5XRGNWG.js";import{a as h,b as y}from"./chunk-TNKPTRB3.js";import"./chunk-PW42BQIY.js";import"./chunk-MZI5AYCE.js";import"./chunk-UJYSVGLV.js";import"./chunk-HFKKITEW.js";import"./chunk-OZ77CAJD.js";import{F as v,J as o,n}from"./chunk-MTUIRWOB.js";import{Gb as l,Hb as s,Qc as f,Yb as u,ic as c,jc as d,ka as m,kc as i,rb as p}from"./chunk-JS55A2RS.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";var M=(()=>{class e{constructor(){this.inventoryTabs=[{Title:"Single Channel Comparison",Url:"/menu/inventory/bychannel"},{Title:"Multi Channel Comparison",Url:"/menu/inventory/pos"},{Title:"Different Inventory",Url:"/menu/inventory/channel_summary"}]}static{this.\u0275fac=function(t){return new(t||e)}}static{this.\u0275cmp=l({type:e,selectors:[["app-inventory"]],features:[f([C])],decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(t,b){t&1&&(c(0,"nav",0)(1,"div",1)(2,"div"),i(3,"nav-tab",2),d()()(),i(4,"router-outlet")),t&2&&(p(3),u("Tabs",b.inventoryTabs))},dependencies:[n,y,h,o,v],encapsulation:2})}}return e})();var g=[{path:"",component:M,children:[{path:"",redirectTo:"bychannel",pathMatch:"full"},{path:"pos",loadComponent(){return import("./chunk-IR5OMZTZ.js").then(e=>e.MultiChannelComparison)},canActivate:[r],data:{title:"Inventory Comparison"}},{path:"bychannel",loadComponent(){return import("./chunk-6LULIB2P.js").then(e=>e.SingleChannelComparisonComponent)},canActivate:[r],data:{title:"Inventory Comparison"}},{path:"channel_summary",loadComponent(){return import("./chunk-ZDYYX736.js").then(e=>e.ChannelSummaryComponent)},canActivate:[r],data:{title:"Different Inventory"}}]}],E=(()=>{class e{static{this.\u0275fac=function(t){return new(t||e)}}static{this.\u0275mod=s({type:e})}static{this.\u0275inj=m({imports:[n,o.forChild(g)]})}}return e})();export{E as InventoryRoutingModule};
@@ -1 +1 @@
1
- import{a as Te,b as be}from"./chunk-GOS4RIF2.js";import{a as Ce,b as fe}from"./chunk-UPYS4A4M.js";import{b as xe}from"./chunk-LHD7CYML.js";import{a as he}from"./chunk-SH7KN2AS.js";import{a as ue}from"./chunk-MQXPOHBV.js";import{a as F}from"./chunk-5DIRXS7I.js";import{i as pe}from"./chunk-C7QA2BEN.js";import{c as ae}from"./chunk-PW42BQIY.js";import{d as de,h as ge}from"./chunk-6X2OBNJQ.js";import{b as ne,h as ie,m as oe,z as re}from"./chunk-CSSG7NAJ.js";import{a as le,b as ce,c as _e}from"./chunk-UJYSVGLV.js";import{r as se,s as me}from"./chunk-HFKKITEW.js";import{d as Y,f as G,g as J,i as Q,m as ee,n as te}from"./chunk-MTUIRWOB.js";import{$c as $,Fc as b,Gb as Z,Gc as m,Hc as O,Ic as y,Ka as R,Kc as k,Lc as D,Mb as s,Mc as N,Oa as j,Ra as B,Sc as T,Tc as K,Yb as p,ad as W,bd as X,ca as A,cd as w,dc as S,ec as E,f as z,gc as M,hc as V,ic as c,jc as _,kc as I,lc as x,mc as h,nc as L,oc as C,pa as H,pb as v,rb as a,tc as f,uc as o,xb as P,xc as q,ya as d,za as g}from"./chunk-JS55A2RS.js";var U=t=>[t],ve=t=>({"text-decoration-line-through":t}),Se=t=>({"text-danger":t}),Ie=(t,l)=>({"bg-gradient-warning":t,"cell-hover pointer":l});function we(t,l){if(t&1){let e=C();c(0,"mat-slide-toggle",13),f("toggleChange",function(){d(e);let n=o();return n.toggleStatus=!n.toggleStatus,g(n.onToggle())}),c(1,"small",14),m(2),_()()}if(t&2){let e=o();a(2),y(" ",e.productToggleTitle?e.productToggleTitle:"FILTER DIFFERENT INVENTORY"," ")}}function Fe(t,l){if(t&1){let e=C();c(0,"th")(1,"input",16),N("ngModelChange",function(n){d(e);let r=o(2);return D(r.checkboxState,n)||(r.checkboxState=n),g(n)}),f("ngModelChange",function(){d(e);let n=o(2);return g(n.onCheckboxStateChange())}),_()()}if(t&2){let e=o(2);a(),k("ngModel",e.checkboxState)}}function Pe(t,l){if(t&1&&(s(0,Fe,2,1,"ng-template",15),c(1,"th",11),m(2,"POS"),_()),t&2){let e=o();p("ngxPermissionsOnly",T(1,U,e.rolePriceEdit))}}function Ee(t,l){if(t&1&&(x(0),c(1,"th",17)(2,"div",18)(3,"div",19),I(4,"img",20),c(5,"div",21),m(6),$(7,"stringLimit"),_()()()(),h()),t&2){let e=l.$implicit;a(3),p("matTooltip",(e.Name==null?null:e.Name.length)>20?e.Name:""),a(),p("src",e==null?null:e.Img,v),a(2),y(" ",X(7,3,e.Name,20)," ")}}function Me(t,l){t&1&&L(0)}function Ve(t,l){if(t&1&&s(0,Me,1,0,"ng-container",33),t&2){o(2);let e=b(7);p("ngTemplateOutlet",e)}}function Oe(t,l){if(t&1&&(x(0),s(1,Ve,1,1,"ng-template",15),h()),t&2){let e=o(4);a(),p("ngxPermissionsOnly",T(1,U,e.roleInventoryUpdate))}}function ke(t,l){t&1&&L(0)}function De(t,l){if(t&1&&s(0,ke,1,0,"ng-container",33),t&2){o(2);let e=b(7);p("ngTemplateOutlet",e)}}function Ne(t,l){if(t&1&&s(0,De,1,1,"ng-template",15),t&2){let e=o(4);p("ngxPermissionsOnly",T(1,U,e.rolePriceEdit))}}function $e(t,l){if(t&1){let e=C();x(0),c(1,"div")(2,"input",34),N("ngModelChange",function(n){d(e);let r=o(4).$implicit;return D(r.selected,n)||(r.selected=n),g(n)}),f("ngModelChange",function(){d(e);let n=o(4).$implicit,r=o();return g(r.onCheckboxStateProduct(n.ID))}),_()(),h()}if(t&2){let e=o(4).$implicit;a(2),k("ngModel",e.selected),p("disabled",!(e!=null&&e.Category))}}function Ue(t,l){if(t&1&&s(0,$e,3,2,"ng-container",22),t&2){let e=o(3).$implicit;p("ngIf",(e==null||e.Variants==null?null:e.Variants.length)>1)}}function Re(t,l){if(t&1){let e=C();x(0),c(1,"img",35),f("click",function(n){d(e);let r=o(3).$implicit,u=o();return g(u.onZoomImage(n,r==null?null:r.ImageUrl))}),_(),h()}if(t&2){let e=o(3).$implicit;a(),q("src",e==null?null:e.ThumbnailUrl,v)}}function je(t,l){t&1&&I(0,"img",36)}function Be(t,l){if(t&1&&(x(0),c(1,"td",28)(2,"div",29),s(3,Oe,2,3,"ng-container",30)(4,Ne,1,3,"ng-template",null,0,w)(6,Ue,1,1,"ng-template",null,1,w),c(8,"div"),s(9,Re,2,1,"ng-container",30)(10,je,1,0,"ng-template",null,2,w),_()()(),c(12,"td",31)(13,"div"),m(14),_(),c(15,"small",32),m(16),_()(),h()),t&2){let e=b(5),i=b(11),n=o(2).$implicit,r=o();a(),p("rowSpan",n==null?null:n.Variants.length),a(2),p("ngIf",r.table=="inventory")("ngIfElse",e),a(6),p("ngIf",n==null?null:n.ThumbnailUrl)("ngIfElse",i),a(3),p("rowSpan",n==null?null:n.Variants.length),a(2),O(n==null?null:n.Name),a(),p("ngClass",T(9,Se,!(n!=null&&n.Category))),a(),y("(",n!=null&&n.Category?n==null?null:n.Category:"Not Found In POS",")")}}function Le(t,l){if(t&1&&(c(0,"a",27),I(1,"i",37),_()),t&2){let e=o().$implicit,i=o(2);p("href",i.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(e==null?null:e.ID),v)}}function We(t,l){if(t&1){let e=C();c(0,"input",40),N("ngModelChange",function(n){d(e);let r=o(3).$implicit;return D(r.selected,n)||(r.selected=n),g(n)}),_()}if(t&2){let e=o(3).$implicit,i=o().$implicit;k("ngModel",e.selected),p("disabled",!(i!=null&&i.Category))}}function ze(t,l){if(t&1&&(c(0,"td",38),s(1,We,1,2,"input",39),_()),t&2){let e=o(2).$implicit,i=o(2);a(),p("ngIf",i.printPOS(e)>=0||i.table=="price")}}function Ae(t,l){if(t&1&&(s(0,ze,2,1,"ng-template",15),c(1,"td",24),m(2),$(3,"number"),_()),t&2){let e=o().$implicit,i=o(2);p("ngxPermissionsOnly",T(4,U,i.rolePriceEdit)),a(2),O(W(3,2,i.printPOS(e)))}}function He(t,l){if(t&1){let e=C();x(0),c(1,"td",41),f("click",function(){d(e);let n=o().$implicit,r=o().$implicit,u=o().$implicit,ye=o();return g(ye.onUpdateData(u.Name,r,n.ID,u.ChannelItemID))}),c(2,"div",42)(3,"div",43),m(4),$(5,"number"),_(),c(6,"a",44),f("click",function(n){return d(e),g(n==null?null:n.stopPropagation())}),I(7,"i",37),_()()(),h()}if(t&2){let e=l.$implicit,i=o(2).$implicit,n=o(2);a(),p("ngClass",K(5,Ie,n.printPOS(i)!=n.printItem(e)&&n.hiddenIPOSInventory()==!1,n.hasPriceEdit()&&n.table=="price"||n.hasInventoryEdit()&&n.table=="inventory")),a(3),y(" ",W(5,3,n.printItem(e))," "),a(2),p("href",e.Url,v)}}function Ze(t,l){t&1&&(c(0,"td",45)(1,"div",42)(2,"span"),m(3,"X"),_()()())}function qe(t,l){if(t&1&&s(0,He,8,8,"ng-container",30)(1,Ze,4,0,"ng-template",null,3,w),t&2){let e=l.$implicit,i=b(2),n=o().$implicit,r=o(2);p("ngIf",r.getItemFromChannel(n,e))("ngIfElse",i)}}function Ke(t,l){if(t&1&&(c(0,"tr"),s(1,Be,17,11,"ng-container",22),c(2,"td",23),m(3),_(),c(4,"td",24)(5,"div",25)(6,"div",26),m(7),_(),c(8,"div",21),s(9,Le,2,1,"a",27),_()()(),s(10,Ae,4,6),M(11,qe,3,2,null,null,E),_()),t&2){let e=l.$implicit,i=l.$index,n=o().$implicit,r=o();a(),p("ngIf",i==0),a(2),O(e==null?null:e.Model),a(2),p("matTooltip",e.Discontinued?r.discontinuedVariantMsg:""),a(),p("ngClass",T(7,ve,e.Discontinued)),a(),y(" ",e.Code," "),a(2),S(n.Category?9:-1),a(),S(r.hiddenIPOSInventory()==!1?10:-1),a(),V(r.channel)}}function Xe(t,l){if(t&1&&(c(0,"tbody"),M(1,Ke,13,9,"tr",null,E),_()),t&2){let e=l.$implicit;a(),V(e.Variants)}}var yt=(()=>{class t{constructor(e,i,n){this.dialog=e,this.biggerPictureService=i,this.authService=n,this.permissionsService=H(le),this.showProductToggle=!1,this.multiwarehouse=j(!1),this.hiddenIPOSInventory=j(!1),this.toggleStatus=!1,this.checkboxState=!1,this.rolePriceEdit=F.PriceUpdate,this.roleInventoryUpdate=F.InventoryUpdate,this.hasPriceEdit=B(!1),this.hasInventoryEdit=B(!1),this.discontinuedVariantMsg="This Variant is discontinued from POS, you must Non Active manually at the seller center so that it is not sold again on the channel.",this.onSubmit=new R,this.destroy$=new z,this.toggle=new R,this.hostName=this.authService.getDomain()}ngOnInit(){this.initRoles(),this.table=="inventory"?this.stockHeader="Stock":this.table=="price"&&(this.stockHeader="Price")}initRoles(){this.permissionsService.hasPermission(F.InventoryUpdate).then(e=>this.hasInventoryEdit.set(e)),this.permissionsService.hasPermission(F.PriceUpdate).then(e=>this.hasPriceEdit.set(e))}onCheckboxStateProduct(e){let i=this.data.filter(n=>n.ID==e);i.length>0&&(i=i.map(n=>(n.Variants=n.Variants.map(r=>(r.selected=n.selected,r)),n)))}onCheckboxStateChange(){this.data=this.data.map(e=>(e.Variants=e.Variants.map(i=>(i.selected=this.checkboxState,i)),e))}getItemFromChannel(e,i){return e.Channel.find(r=>ae.IsNotEmpty(i.LocationID)?r.LocationID==i.LocationID:r.ChannelID==i.ID)}printItem(e){if(this.table=="inventory")return e.Inventory;if(this.table=="price")return e.Price}onUpdateData(e,i,n,r){this.hasPriceEdit()&&this.table=="price"&&this.onOpenDialogUpdate(e,i,n,r),this.hasInventoryEdit()&&this.table=="inventory"&&this.onOpenDialogUpdate(e,i,n,r)}onOpenDialogUpdate(e,i,n,r){this.dialog.open(Te,{data:{Name:e,Variant:i,ChannelID:n,Table:this.table,ChannelItemID:r}}).afterClosed().pipe(A(this.destroy$)).subscribe(u=>{u!=null&&this.onSubmit.emit(u)})}printPOS(e){return this.table=="inventory"?e.Inventory?e.Inventory:0:this.table=="price"?e.UnitPrice:null}onToggle(){this.toggle.emit(this.toggleStatus)}onZoomImage(e,i){this.biggerPictureService.openBiggerPicture(e,i)}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}static{this.\u0275fac=function(i){return new(i||t)(P(de),P(he),P(pe))}}static{this.\u0275cmp=Z({type:t,selectors:[["app-table"]],inputs:{data:"data",table:"table",channel:"channel",showProductToggle:"showProductToggle",productToggleTitle:"productToggleTitle",multiwarehouse:[1,"multiwarehouse"],hiddenIPOSInventory:[1,"hiddenIPOSInventory"]},outputs:{onSubmit:"onSubmit",toggle:"onToggle"},decls:17,vars:3,consts:[["PRICE",""],["checkbox_update",""],["elsePic",""],["elseCol",""],[1,"table-responsive"],[1,"table"],[1,"thead-light","sticky-top-thead"],["scope","col","colspan","2",1,"text-center","w-25"],[1,"w-100"],[2,"width","200px"],["scope","col",1,"text-start","w-20"],["scope","col",1,"text-end","w-10"],[4,"ngFor","ngForOf"],[2,"width","200px",3,"toggleChange"],[1,"fw-bold"],[3,"ngxPermissionsOnly"],["type","checkbox",3,"ngModelChange","ngModel"],["scope","col"],[1,"w-100","d-flex","align-items-center","justify-content-center"],["matTooltipPosition","above",1,"d-flex","align-items-center","justify-content-center",2,"width","180px",3,"matTooltip"],[2,"width","16px","height","16px",3,"src"],[1,"ms-2"],[4,"ngIf"],[1,"text-start"],[1,"text-end"],["matTooltipPosition","above",1,"d-flex","align-items-center","justify-content-end",3,"matTooltip"],[3,"ngClass"],["target","_blank",3,"href"],[1,"text-center",3,"rowSpan"],[1,"d-flex","align-items-center","justify-content-end"],[4,"ngIf","ngIfElse"],[1,"text-start",2,"padding-left","0px",3,"rowSpan"],[1,"mt-1",3,"ngClass"],[4,"ngTemplateOutlet"],["type","checkbox",1,"me-3",3,"ngModelChange","ngModel","disabled"],[1,"border","rounded","w-img","cursor-pointer",3,"click","src"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded","w-img"],[1,"fas","fa-solid","fa-arrow-up-right-from-square","external-link-custom"],[1,"align-middle"],["type","checkbox",3,"ngModel","disabled","ngModelChange",4,"ngIf"],["type","checkbox",3,"ngModelChange","ngModel","disabled"],[1,"p-0",3,"click","ngClass"],[1,"d-flex","align-items-center","justify-content-center"],[1,"me-2","mt-1"],["target","_blank",3,"click","href"],[1,"table-white","text-center",2,"color","red"]],template:function(i,n){i&1&&(c(0,"div",4)(1,"table",5)(2,"thead",6)(3,"tr")(4,"th",7)(5,"div",8)(6,"div"),m(7,"Product"),_(),s(8,we,3,1,"mat-slide-toggle",9),_()(),c(9,"th",10),m(10,"Variant"),_(),c(11,"th",11),m(12,"SKU"),_(),s(13,Pe,3,3)(14,Ee,8,6,"ng-container",12),_()(),M(15,Xe,3,0,"tbody",null,E),_()()),i&2&&(a(8),S(n.showProductToggle?8:-1),a(5),S(n.hiddenIPOSInventory()==!1?13:-1),a(),p("ngForOf",n.channel),a(),V(n.data))},dependencies:[te,Y,G,J,Q,ee,re,ne,ie,oe,fe,Ce,ge,ue,xe,_e,ce,me,se,be],styles:[".w-10[_ngcontent-%COMP%]{width:10%}.w-20[_ngcontent-%COMP%]{width:20%}.w-img[_ngcontent-%COMP%]{width:40px;height:40px}.item-name[_ngcontent-%COMP%]{margin-bottom:-14px!important;font-size:larger}.cell-hover[_ngcontent-%COMP%]:hover{background-color:#c9c9c9!important}.text-wrapping[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;width:88px}.cell-hover[_ngcontent-%COMP%]{width:400px!important}"]})}}return t})();export{yt as a};
1
+ import{a as Te,b as be}from"./chunk-GOS4RIF2.js";import{a as Ce,b as fe}from"./chunk-UPYS4A4M.js";import{b as xe}from"./chunk-LHD7CYML.js";import{a as he}from"./chunk-SH7KN2AS.js";import{a as ue}from"./chunk-MQXPOHBV.js";import{a as F}from"./chunk-5DIRXS7I.js";import{i as pe}from"./chunk-PZ4PSWYM.js";import{c as ae}from"./chunk-PW42BQIY.js";import{d as de,h as ge}from"./chunk-6X2OBNJQ.js";import{b as ne,h as ie,m as oe,z as re}from"./chunk-CSSG7NAJ.js";import{a as le,b as ce,c as _e}from"./chunk-UJYSVGLV.js";import{r as se,s as me}from"./chunk-HFKKITEW.js";import{d as Y,f as G,g as J,i as Q,m as ee,n as te}from"./chunk-MTUIRWOB.js";import{$c as $,Fc as b,Gb as Z,Gc as m,Hc as O,Ic as y,Ka as R,Kc as k,Lc as D,Mb as s,Mc as N,Oa as j,Ra as B,Sc as T,Tc as K,Yb as p,ad as W,bd as X,ca as A,cd as w,dc as S,ec as E,f as z,gc as M,hc as V,ic as c,jc as _,kc as I,lc as x,mc as h,nc as L,oc as C,pa as H,pb as v,rb as a,tc as f,uc as o,xb as P,xc as q,ya as d,za as g}from"./chunk-JS55A2RS.js";var U=t=>[t],ve=t=>({"text-decoration-line-through":t}),Se=t=>({"text-danger":t}),Ie=(t,l)=>({"bg-gradient-warning":t,"cell-hover pointer":l});function we(t,l){if(t&1){let e=C();c(0,"mat-slide-toggle",13),f("toggleChange",function(){d(e);let n=o();return n.toggleStatus=!n.toggleStatus,g(n.onToggle())}),c(1,"small",14),m(2),_()()}if(t&2){let e=o();a(2),y(" ",e.productToggleTitle?e.productToggleTitle:"FILTER DIFFERENT INVENTORY"," ")}}function Fe(t,l){if(t&1){let e=C();c(0,"th")(1,"input",16),N("ngModelChange",function(n){d(e);let r=o(2);return D(r.checkboxState,n)||(r.checkboxState=n),g(n)}),f("ngModelChange",function(){d(e);let n=o(2);return g(n.onCheckboxStateChange())}),_()()}if(t&2){let e=o(2);a(),k("ngModel",e.checkboxState)}}function Pe(t,l){if(t&1&&(s(0,Fe,2,1,"ng-template",15),c(1,"th",11),m(2,"POS"),_()),t&2){let e=o();p("ngxPermissionsOnly",T(1,U,e.rolePriceEdit))}}function Ee(t,l){if(t&1&&(x(0),c(1,"th",17)(2,"div",18)(3,"div",19),I(4,"img",20),c(5,"div",21),m(6),$(7,"stringLimit"),_()()()(),h()),t&2){let e=l.$implicit;a(3),p("matTooltip",(e.Name==null?null:e.Name.length)>20?e.Name:""),a(),p("src",e==null?null:e.Img,v),a(2),y(" ",X(7,3,e.Name,20)," ")}}function Me(t,l){t&1&&L(0)}function Ve(t,l){if(t&1&&s(0,Me,1,0,"ng-container",33),t&2){o(2);let e=b(7);p("ngTemplateOutlet",e)}}function Oe(t,l){if(t&1&&(x(0),s(1,Ve,1,1,"ng-template",15),h()),t&2){let e=o(4);a(),p("ngxPermissionsOnly",T(1,U,e.roleInventoryUpdate))}}function ke(t,l){t&1&&L(0)}function De(t,l){if(t&1&&s(0,ke,1,0,"ng-container",33),t&2){o(2);let e=b(7);p("ngTemplateOutlet",e)}}function Ne(t,l){if(t&1&&s(0,De,1,1,"ng-template",15),t&2){let e=o(4);p("ngxPermissionsOnly",T(1,U,e.rolePriceEdit))}}function $e(t,l){if(t&1){let e=C();x(0),c(1,"div")(2,"input",34),N("ngModelChange",function(n){d(e);let r=o(4).$implicit;return D(r.selected,n)||(r.selected=n),g(n)}),f("ngModelChange",function(){d(e);let n=o(4).$implicit,r=o();return g(r.onCheckboxStateProduct(n.ID))}),_()(),h()}if(t&2){let e=o(4).$implicit;a(2),k("ngModel",e.selected),p("disabled",!(e!=null&&e.Category))}}function Ue(t,l){if(t&1&&s(0,$e,3,2,"ng-container",22),t&2){let e=o(3).$implicit;p("ngIf",(e==null||e.Variants==null?null:e.Variants.length)>1)}}function Re(t,l){if(t&1){let e=C();x(0),c(1,"img",35),f("click",function(n){d(e);let r=o(3).$implicit,u=o();return g(u.onZoomImage(n,r==null?null:r.ImageUrl))}),_(),h()}if(t&2){let e=o(3).$implicit;a(),q("src",e==null?null:e.ThumbnailUrl,v)}}function je(t,l){t&1&&I(0,"img",36)}function Be(t,l){if(t&1&&(x(0),c(1,"td",28)(2,"div",29),s(3,Oe,2,3,"ng-container",30)(4,Ne,1,3,"ng-template",null,0,w)(6,Ue,1,1,"ng-template",null,1,w),c(8,"div"),s(9,Re,2,1,"ng-container",30)(10,je,1,0,"ng-template",null,2,w),_()()(),c(12,"td",31)(13,"div"),m(14),_(),c(15,"small",32),m(16),_()(),h()),t&2){let e=b(5),i=b(11),n=o(2).$implicit,r=o();a(),p("rowSpan",n==null?null:n.Variants.length),a(2),p("ngIf",r.table=="inventory")("ngIfElse",e),a(6),p("ngIf",n==null?null:n.ThumbnailUrl)("ngIfElse",i),a(3),p("rowSpan",n==null?null:n.Variants.length),a(2),O(n==null?null:n.Name),a(),p("ngClass",T(9,Se,!(n!=null&&n.Category))),a(),y("(",n!=null&&n.Category?n==null?null:n.Category:"Not Found In POS",")")}}function Le(t,l){if(t&1&&(c(0,"a",27),I(1,"i",37),_()),t&2){let e=o().$implicit,i=o(2);p("href",i.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(e==null?null:e.ID),v)}}function We(t,l){if(t&1){let e=C();c(0,"input",40),N("ngModelChange",function(n){d(e);let r=o(3).$implicit;return D(r.selected,n)||(r.selected=n),g(n)}),_()}if(t&2){let e=o(3).$implicit,i=o().$implicit;k("ngModel",e.selected),p("disabled",!(i!=null&&i.Category))}}function ze(t,l){if(t&1&&(c(0,"td",38),s(1,We,1,2,"input",39),_()),t&2){let e=o(2).$implicit,i=o(2);a(),p("ngIf",i.printPOS(e)>=0||i.table=="price")}}function Ae(t,l){if(t&1&&(s(0,ze,2,1,"ng-template",15),c(1,"td",24),m(2),$(3,"number"),_()),t&2){let e=o().$implicit,i=o(2);p("ngxPermissionsOnly",T(4,U,i.rolePriceEdit)),a(2),O(W(3,2,i.printPOS(e)))}}function He(t,l){if(t&1){let e=C();x(0),c(1,"td",41),f("click",function(){d(e);let n=o().$implicit,r=o().$implicit,u=o().$implicit,ye=o();return g(ye.onUpdateData(u.Name,r,n.ID,u.ChannelItemID))}),c(2,"div",42)(3,"div",43),m(4),$(5,"number"),_(),c(6,"a",44),f("click",function(n){return d(e),g(n==null?null:n.stopPropagation())}),I(7,"i",37),_()()(),h()}if(t&2){let e=l.$implicit,i=o(2).$implicit,n=o(2);a(),p("ngClass",K(5,Ie,n.printPOS(i)!=n.printItem(e)&&n.hiddenIPOSInventory()==!1,n.hasPriceEdit()&&n.table=="price"||n.hasInventoryEdit()&&n.table=="inventory")),a(3),y(" ",W(5,3,n.printItem(e))," "),a(2),p("href",e.Url,v)}}function Ze(t,l){t&1&&(c(0,"td",45)(1,"div",42)(2,"span"),m(3,"X"),_()()())}function qe(t,l){if(t&1&&s(0,He,8,8,"ng-container",30)(1,Ze,4,0,"ng-template",null,3,w),t&2){let e=l.$implicit,i=b(2),n=o().$implicit,r=o(2);p("ngIf",r.getItemFromChannel(n,e))("ngIfElse",i)}}function Ke(t,l){if(t&1&&(c(0,"tr"),s(1,Be,17,11,"ng-container",22),c(2,"td",23),m(3),_(),c(4,"td",24)(5,"div",25)(6,"div",26),m(7),_(),c(8,"div",21),s(9,Le,2,1,"a",27),_()()(),s(10,Ae,4,6),M(11,qe,3,2,null,null,E),_()),t&2){let e=l.$implicit,i=l.$index,n=o().$implicit,r=o();a(),p("ngIf",i==0),a(2),O(e==null?null:e.Model),a(2),p("matTooltip",e.Discontinued?r.discontinuedVariantMsg:""),a(),p("ngClass",T(7,ve,e.Discontinued)),a(),y(" ",e.Code," "),a(2),S(n.Category?9:-1),a(),S(r.hiddenIPOSInventory()==!1?10:-1),a(),V(r.channel)}}function Xe(t,l){if(t&1&&(c(0,"tbody"),M(1,Ke,13,9,"tr",null,E),_()),t&2){let e=l.$implicit;a(),V(e.Variants)}}var yt=(()=>{class t{constructor(e,i,n){this.dialog=e,this.biggerPictureService=i,this.authService=n,this.permissionsService=H(le),this.showProductToggle=!1,this.multiwarehouse=j(!1),this.hiddenIPOSInventory=j(!1),this.toggleStatus=!1,this.checkboxState=!1,this.rolePriceEdit=F.PriceUpdate,this.roleInventoryUpdate=F.InventoryUpdate,this.hasPriceEdit=B(!1),this.hasInventoryEdit=B(!1),this.discontinuedVariantMsg="This Variant is discontinued from POS, you must Non Active manually at the seller center so that it is not sold again on the channel.",this.onSubmit=new R,this.destroy$=new z,this.toggle=new R,this.hostName=this.authService.getDomain()}ngOnInit(){this.initRoles(),this.table=="inventory"?this.stockHeader="Stock":this.table=="price"&&(this.stockHeader="Price")}initRoles(){this.permissionsService.hasPermission(F.InventoryUpdate).then(e=>this.hasInventoryEdit.set(e)),this.permissionsService.hasPermission(F.PriceUpdate).then(e=>this.hasPriceEdit.set(e))}onCheckboxStateProduct(e){let i=this.data.filter(n=>n.ID==e);i.length>0&&(i=i.map(n=>(n.Variants=n.Variants.map(r=>(r.selected=n.selected,r)),n)))}onCheckboxStateChange(){this.data=this.data.map(e=>(e.Variants=e.Variants.map(i=>(i.selected=this.checkboxState,i)),e))}getItemFromChannel(e,i){return e.Channel.find(r=>ae.IsNotEmpty(i.LocationID)?r.LocationID==i.LocationID:r.ChannelID==i.ID)}printItem(e){if(this.table=="inventory")return e.Inventory;if(this.table=="price")return e.Price}onUpdateData(e,i,n,r){this.hasPriceEdit()&&this.table=="price"&&this.onOpenDialogUpdate(e,i,n,r),this.hasInventoryEdit()&&this.table=="inventory"&&this.onOpenDialogUpdate(e,i,n,r)}onOpenDialogUpdate(e,i,n,r){this.dialog.open(Te,{data:{Name:e,Variant:i,ChannelID:n,Table:this.table,ChannelItemID:r}}).afterClosed().pipe(A(this.destroy$)).subscribe(u=>{u!=null&&this.onSubmit.emit(u)})}printPOS(e){return this.table=="inventory"?e.Inventory?e.Inventory:0:this.table=="price"?e.UnitPrice:null}onToggle(){this.toggle.emit(this.toggleStatus)}onZoomImage(e,i){this.biggerPictureService.openBiggerPicture(e,i)}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}static{this.\u0275fac=function(i){return new(i||t)(P(de),P(he),P(pe))}}static{this.\u0275cmp=Z({type:t,selectors:[["app-table"]],inputs:{data:"data",table:"table",channel:"channel",showProductToggle:"showProductToggle",productToggleTitle:"productToggleTitle",multiwarehouse:[1,"multiwarehouse"],hiddenIPOSInventory:[1,"hiddenIPOSInventory"]},outputs:{onSubmit:"onSubmit",toggle:"onToggle"},decls:17,vars:3,consts:[["PRICE",""],["checkbox_update",""],["elsePic",""],["elseCol",""],[1,"table-responsive"],[1,"table"],[1,"thead-light","sticky-top-thead"],["scope","col","colspan","2",1,"text-center","w-25"],[1,"w-100"],[2,"width","200px"],["scope","col",1,"text-start","w-20"],["scope","col",1,"text-end","w-10"],[4,"ngFor","ngForOf"],[2,"width","200px",3,"toggleChange"],[1,"fw-bold"],[3,"ngxPermissionsOnly"],["type","checkbox",3,"ngModelChange","ngModel"],["scope","col"],[1,"w-100","d-flex","align-items-center","justify-content-center"],["matTooltipPosition","above",1,"d-flex","align-items-center","justify-content-center",2,"width","180px",3,"matTooltip"],[2,"width","16px","height","16px",3,"src"],[1,"ms-2"],[4,"ngIf"],[1,"text-start"],[1,"text-end"],["matTooltipPosition","above",1,"d-flex","align-items-center","justify-content-end",3,"matTooltip"],[3,"ngClass"],["target","_blank",3,"href"],[1,"text-center",3,"rowSpan"],[1,"d-flex","align-items-center","justify-content-end"],[4,"ngIf","ngIfElse"],[1,"text-start",2,"padding-left","0px",3,"rowSpan"],[1,"mt-1",3,"ngClass"],[4,"ngTemplateOutlet"],["type","checkbox",1,"me-3",3,"ngModelChange","ngModel","disabled"],[1,"border","rounded","w-img","cursor-pointer",3,"click","src"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded","w-img"],[1,"fas","fa-solid","fa-arrow-up-right-from-square","external-link-custom"],[1,"align-middle"],["type","checkbox",3,"ngModel","disabled","ngModelChange",4,"ngIf"],["type","checkbox",3,"ngModelChange","ngModel","disabled"],[1,"p-0",3,"click","ngClass"],[1,"d-flex","align-items-center","justify-content-center"],[1,"me-2","mt-1"],["target","_blank",3,"click","href"],[1,"table-white","text-center",2,"color","red"]],template:function(i,n){i&1&&(c(0,"div",4)(1,"table",5)(2,"thead",6)(3,"tr")(4,"th",7)(5,"div",8)(6,"div"),m(7,"Product"),_(),s(8,we,3,1,"mat-slide-toggle",9),_()(),c(9,"th",10),m(10,"Variant"),_(),c(11,"th",11),m(12,"SKU"),_(),s(13,Pe,3,3)(14,Ee,8,6,"ng-container",12),_()(),M(15,Xe,3,0,"tbody",null,E),_()()),i&2&&(a(8),S(n.showProductToggle?8:-1),a(5),S(n.hiddenIPOSInventory()==!1?13:-1),a(),p("ngForOf",n.channel),a(),V(n.data))},dependencies:[te,Y,G,J,Q,ee,re,ne,ie,oe,fe,Ce,ge,ue,xe,_e,ce,me,se,be],styles:[".w-10[_ngcontent-%COMP%]{width:10%}.w-20[_ngcontent-%COMP%]{width:20%}.w-img[_ngcontent-%COMP%]{width:40px;height:40px}.item-name[_ngcontent-%COMP%]{margin-bottom:-14px!important;font-size:larger}.cell-hover[_ngcontent-%COMP%]:hover{background-color:#c9c9c9!important}.text-wrapping[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;width:88px}.cell-hover[_ngcontent-%COMP%]{width:400px!important}"]})}}return t})();export{yt as a};