marketplacepos 3.4.0 → 3.4.2

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 (76) hide show
  1. package/Marketplace/{chunk-5DS4AFTV.js → chunk-2PR23CRN.js} +1 -1
  2. package/Marketplace/{chunk-IJIIMLQ7.js → chunk-3FA5VSAY.js} +1 -1
  3. package/Marketplace/{chunk-TT7NBZMD.js → chunk-45BCCCD5.js} +1 -1
  4. package/Marketplace/{chunk-3TM7EKQZ.js → chunk-4FIQ677Y.js} +1 -1
  5. package/Marketplace/{chunk-MORUNYG3.js → chunk-4ZIFLVEZ.js} +1 -1
  6. package/Marketplace/{chunk-TNVZKPJP.js → chunk-5LIHLHZ2.js} +1 -1
  7. package/Marketplace/{chunk-SKA4KCAB.js → chunk-6H6S75XM.js} +1 -1
  8. package/Marketplace/{chunk-NZBQKND7.js → chunk-7O2LUPOW.js} +1 -1
  9. package/Marketplace/{chunk-MRWTB7OG.js → chunk-ANO5F2BV.js} +1 -1
  10. package/Marketplace/{chunk-ECB4VT3U.js → chunk-APSB364O.js} +1 -1
  11. package/Marketplace/{chunk-TMUAQXEK.js → chunk-BJCKTMTZ.js} +1 -1
  12. package/Marketplace/{chunk-VRSV5O5R.js → chunk-CAF3EESF.js} +1 -1
  13. package/Marketplace/{chunk-PJQTGT4K.js → chunk-CB54UHPH.js} +1 -1
  14. package/Marketplace/{chunk-KX7WACSK.js → chunk-CLLCMDP4.js} +1 -1
  15. package/Marketplace/{chunk-LKSBRXCX.js → chunk-CNK2ETMZ.js} +1 -1
  16. package/Marketplace/{chunk-UNZLFKB2.js → chunk-CVIYGYJG.js} +1 -1
  17. package/Marketplace/{chunk-4O5EV6W4.js → chunk-DANZQU6U.js} +1 -1
  18. package/Marketplace/{chunk-2KQ4WEPD.js → chunk-DH7A3MMY.js} +1 -1
  19. package/Marketplace/{chunk-WBI4ZM2X.js → chunk-EBAG6BIX.js} +1 -1
  20. package/Marketplace/{chunk-5JZJC54P.js → chunk-EGVKBYT5.js} +1 -1
  21. package/Marketplace/{chunk-3ICHEZSE.js → chunk-EIQQEQMI.js} +1 -1
  22. package/Marketplace/{chunk-RFTG6MKX.js → chunk-ENUKURHL.js} +1 -1
  23. package/Marketplace/{chunk-67YIEWYV.js → chunk-FJAD3LVA.js} +1 -1
  24. package/Marketplace/chunk-FWUAZZDI.js +1 -0
  25. package/Marketplace/{chunk-HWOBJ4Z3.js → chunk-GPNYP6CI.js} +1 -1
  26. package/Marketplace/{chunk-DBEZLCZM.js → chunk-H5BAFHZZ.js} +1 -1
  27. package/Marketplace/{chunk-7Y73MGEU.js → chunk-HIQEVY5J.js} +1 -1
  28. package/Marketplace/{chunk-SWQXA73A.js → chunk-HMATF4RH.js} +1 -1
  29. package/Marketplace/{chunk-Z2ABDS6L.js → chunk-HO6I7ZN6.js} +1 -1
  30. package/Marketplace/{chunk-YQXKX6O7.js → chunk-I5WJTOZD.js} +1 -1
  31. package/Marketplace/{chunk-5DVM7TJ7.js → chunk-IKBHUDBF.js} +1 -1
  32. package/Marketplace/{chunk-VTFOZMLI.js → chunk-JD4NX6LL.js} +1 -1
  33. package/Marketplace/{chunk-S65ISV4X.js → chunk-JDAC3DI7.js} +1 -1
  34. package/Marketplace/chunk-JIRDXTRJ.js +1 -0
  35. package/Marketplace/{chunk-TBY7FO23.js → chunk-KHQYY4CP.js} +1 -1
  36. package/Marketplace/{chunk-QKVTZKIC.js → chunk-KS42UW22.js} +1 -1
  37. package/Marketplace/{chunk-VIJ5HUKS.js → chunk-LC5NUVMA.js} +1 -1
  38. package/Marketplace/{chunk-YQEEQRFM.js → chunk-LHYUY4OW.js} +1 -1
  39. package/Marketplace/{chunk-BELWZRNY.js → chunk-LUN7S6P4.js} +1 -1
  40. package/Marketplace/{chunk-TJRQ2WWD.js → chunk-MPXURNR4.js} +1 -1
  41. package/Marketplace/{chunk-T6XRWLCZ.js → chunk-NLUIK3SD.js} +1 -1
  42. package/Marketplace/{chunk-QK2PM3OO.js → chunk-NQ5YXCPF.js} +1 -1
  43. package/Marketplace/{chunk-PQGHN52M.js → chunk-OGA3XTQE.js} +1 -1
  44. package/Marketplace/{chunk-Q7FH7Z7R.js → chunk-OHLIZGJ7.js} +1 -1
  45. package/Marketplace/{chunk-YWVMHX45.js → chunk-PASXSTSS.js} +1 -1
  46. package/Marketplace/{chunk-7RCRNZNI.js → chunk-Q27U6EXR.js} +1 -1
  47. package/Marketplace/{chunk-GD6CRVOV.js → chunk-QA6BHZKW.js} +1 -1
  48. package/Marketplace/{chunk-B4RPQGTA.js → chunk-QXKJ6AH2.js} +1 -1
  49. package/Marketplace/{chunk-O3V3GTIM.js → chunk-QZHSCJJ5.js} +1 -1
  50. package/Marketplace/{chunk-H7KLY4IB.js → chunk-RUG3NZNS.js} +1 -1
  51. package/Marketplace/{chunk-MA4ZKUP6.js → chunk-TEIBLAW7.js} +2 -2
  52. package/Marketplace/{chunk-XWIBRKIY.js → chunk-TFM4P7KH.js} +1 -1
  53. package/Marketplace/{chunk-WYMCYQCR.js → chunk-TKW6MA5X.js} +1 -1
  54. package/Marketplace/{chunk-TQ6UUVH3.js → chunk-TZO7ICWB.js} +1 -1
  55. package/Marketplace/{chunk-AIZ2SLGZ.js → chunk-VJLQRARA.js} +1 -1
  56. package/Marketplace/{chunk-BYDOIRDD.js → chunk-VLWVI7LT.js} +1 -1
  57. package/Marketplace/{chunk-45IJGKR3.js → chunk-WAE5XPQ6.js} +1 -1
  58. package/Marketplace/{chunk-FWCMOK42.js → chunk-WGNBD2TG.js} +1 -1
  59. package/Marketplace/{chunk-GFW452UY.js → chunk-WL3GCHJ5.js} +1 -1
  60. package/Marketplace/{chunk-I4V2RPID.js → chunk-WT7HH4UV.js} +1 -1
  61. package/Marketplace/{chunk-G5D7W2T3.js → chunk-X6OLODND.js} +1 -1
  62. package/Marketplace/{chunk-GMALFTAY.js → chunk-XG47KOUR.js} +1 -1
  63. package/Marketplace/{chunk-GIFWICGN.js → chunk-XNEL4SD6.js} +1 -1
  64. package/Marketplace/{chunk-2OB3TW2H.js → chunk-Y4RCGXQK.js} +1 -1
  65. package/Marketplace/index.html +2 -2
  66. package/Marketplace/{main-B2AQI7UJ.js → main-MTBOIFWC.js} +1 -1
  67. package/package.json +1 -1
  68. package/Marketplace/chunk-CS64SQAA.js +0 -1
  69. package/Marketplace/chunk-ISBEY2N5.js +0 -1
  70. /package/Marketplace/{chunk-7DXQ5BDE.js → chunk-4YO3BZ5L.js} +0 -0
  71. /package/Marketplace/{chunk-LJ6J4EIT.js → chunk-7G5B67SI.js} +0 -0
  72. /package/Marketplace/{chunk-KEKROO5B.js → chunk-DILTMQOY.js} +0 -0
  73. /package/Marketplace/{chunk-N76YHCQ6.js → chunk-HPDCVTZM.js} +0 -0
  74. /package/Marketplace/{chunk-CWG6UUW5.js → chunk-SZQIM5RM.js} +0 -0
  75. /package/Marketplace/{polyfills-KQQO3SZT.js → polyfills-WRDNL3NI.js} +0 -0
  76. /package/Marketplace/{styles-WZSIIWL7.css → styles-JRURH5LL.css} +0 -0
@@ -1 +1 @@
1
- import{$ as q,I as B,_ as I,aa as M,b as g,ba as v,c as y,dc as P,ea as k,ec as E,m,r as C,ta as O}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.0/Marketplace/chunk-FWCMOK42.js";import{h as b}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.0/Marketplace/chunk-N76YHCQ6.js";function f(a,u,e,o){return new Promise((t,r)=>{a||r("IndexedDB not available");let n=a.open(u,e),i;n.onsuccess=c=>{i=n.result,t(i)},n.onerror=c=>{r(`IndexedDB error: ${n.error}`)},typeof o=="function"&&(n.onupgradeneeded=c=>{o(c,i)})})}function A(a,u,e,o,t){if(!a)return;let r=a.open(u,e);r.onupgradeneeded=n=>{let i=n.target.result;o.forEach(s=>{if(!i.objectStoreNames.contains(s.store)){let h=i.createObjectStore(s.store,s.storeConfig);s.storeSchema.forEach(d=>{h.createIndex(d.name,d.keypath,d.options)})}});let c=t&&t();c&&Object.keys(c).map(s=>parseInt(s,10)).filter(s=>s>n.oldVersion).sort((s,h)=>s-h).forEach(s=>{c[s](i,r.transaction)}),i.close()},r.onsuccess=n=>{n.target.result.close()}}function R(a,u,e){if(!a||!u||!e)throw Error('Params: "dbName", "version", "storeName" are mandatory.');return new g(o=>{try{let t=u+1,r=indexedDB.open(a,t);r.onupgradeneeded=n=>{let i=n.target.result;i.deleteObjectStore(e),i.close(),console.log("onupgradeneeded"),o.next(!0),o.complete()},r.onerror=n=>o.error(n)}catch(t){o.error(t)}})}function V(a,u){return a.objectStoreNames.contains(u)}function S(a,u,e){a||e("You need to use the openDatabase function to create a database before you query it!"),V(a,u)||e(`objectStore does not exists: ${u}`)}function p(a,u){let e=a.transaction(u.storeName,u.dbMode);return e.onerror=u.error,e.onabort=u.abort,e}function j(a,u,e,o){return{storeName:u,dbMode:a,error:t=>{e(t)},abort:t=>{e(t)}}}var x=function(a){return a.readonly="readonly",a.readwrite="readwrite",a}(x||{}),K=new M(null),_=(()=>{class a{constructor(e,o){if(this.dbConfig=e,this.platformId=o,!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,A(this.indexedDB,e.name,e.version,e.objectStoresMeta,e.migrationFactory),f(this.indexedDB,e.name).then(t=>{t.version!==e.version&&(this.dbConfig.version=t.version)}))}createObjectStore(e,o){let t=[e];A(this.indexedDB,this.dbConfig.name,++this.dbConfig.version,t,o)}add(e,o,t){return new g(r=>{f(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(n=>{let c=p(n,j(x.readwrite,e,h=>r.error(h))).objectStore(e),s=t?c.add(o,t):c.add(o);s.onsuccess=h=>b(this,null,function*(){let d=h.target.result,l=c.get(d);l.onsuccess=w=>{r.next(w.target.result),r.complete()}})}).catch(n=>r.error(n))})}bulkAdd(e,o){let t=new Promise((r,n)=>{f(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(i=>{let s=p(i,j(x.readwrite,e,r,n)).objectStore(e),h=o.map(d=>new Promise((l,w)=>{let D=d.key;delete d.key;let $=D?s.add(d,D):s.add(d);$.onsuccess=T=>{let F=T.target.result;l(F)}}));r(Promise.all(h))}).catch(i=>n(i))});return m(t)}bulkDelete(e,o){let t=o.map(r=>new Promise((n,i)=>{f(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(c=>{let s=p(c,j(x.readwrite,e,i,n));s.objectStore(e).delete(r),s.oncomplete=()=>{this.getAll(e).pipe(B(1)).subscribe(d=>{n(d)})}}).catch(c=>i(c))}));return m(Promise.all(t))}getByKey(e,o){return new g(t=>{f(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(r=>{let c=p(r,j(x.readonly,e,t.error)).objectStore(e).get(o);c.onsuccess=s=>{t.next(s.target.result),t.complete()},c.onerror=s=>{t.error(s)}}).catch(r=>t.error(r))})}bulkGet(e,o){let t=o.map(r=>this.getByKey(e,r));return new g(r=>{C(t).subscribe(n=>{r.next(n),r.complete()})})}getByID(e,o){return new g(t=>{f(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(r=>{S(r,e,s=>t.error(s));let c=p(r,j(x.readonly,e,t.error,t.next)).objectStore(e).get(o);c.onsuccess=s=>{t.next(s.target.result)}}).catch(r=>t.error(r))})}getByIndex(e,o,t){return new g(r=>{f(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(n=>{S(n,e,d=>r.error(d));let h=p(n,j(x.readonly,e,r.error)).objectStore(e).index(o).get(t);h.onsuccess=d=>{r.next(d.target.result),r.complete()}}).catch(n=>r.error(n))})}getAll(e){return new g(o=>{f(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(t=>{S(t,e,c=>o.error(c));let i=p(t,j(x.readonly,e,o.error,o.next)).objectStore(e).getAll();i.onerror=c=>{o.error(c)},i.onsuccess=({target:{result:c}})=>{o.next(c),o.complete()}}).catch(t=>o.error(t))})}update(e,o){return new g(t=>{f(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(r=>{S(r,e,s=>t.error(s));let i=p(r,j(x.readwrite,e,s=>t.error(s))).objectStore(e),c=i.put(o);c.onsuccess=s=>b(this,null,function*(){let h=s.target.result,d=i.get(h);d.onsuccess=l=>{t.next(l.target.result),t.complete()}})}).catch(r=>t.error(r))})}delete(e,o){return new g(t=>{f(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(r=>{S(r,e,c=>t.error(c));let n=p(r,j(x.readwrite,e,c=>t.error(c)));n.objectStore(e).delete(o),n.oncomplete=()=>{this.getAll(e).pipe(B(1)).subscribe(c=>{t.next(c),t.complete()})}}).catch(r=>t.error(r))})}deleteByKey(e,o){return new g(t=>{f(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(r=>{S(r,e,c=>t.error(c));let n=p(r,j(x.readwrite,e,c=>t.error(c))),i=n.objectStore(e);n.oncomplete=()=>{t.next(!0),t.complete()},i.delete(o)}).catch(r=>t.error(r))})}clear(e){return new g(o=>{f(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(t=>{S(t,e,i=>o.error(i));let r=p(t,j(x.readwrite,e,i=>o.error(i)));r.objectStore(e).clear(),r.oncomplete=()=>{o.next(!0),o.complete()}}).catch(t=>o.error(t))})}deleteDatabase(){return new g(e=>{f(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(o=>b(this,null,function*(){yield o.close();let t=this.indexedDB.deleteDatabase(this.dbConfig.name);t.onsuccess=()=>{e.next(!0),e.complete()},t.onerror=r=>e.error(r),t.onblocked=()=>{throw new Error("Unable to delete database because it's blocked")}})).catch(o=>e.error(o))})}openCursor(e,o){return new g(t=>{f(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(r=>{S(r,e,s=>t.error(s));let i=p(r,j(x.readonly,e,t.error)).objectStore(e),c=o===void 0?i.openCursor():i.openCursor(o);c.onsuccess=s=>{t.next(s),t.complete()}}).catch(r=>t.error(r))})}openCursorByIndex(e,o,t,r=x.readonly){let n=new y;return f(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(i=>{S(i,e,l=>{n.error(l)});let d=p(i,j(r,e,l=>{n.error(l)},()=>{n.next()})).objectStore(e).index(o).openCursor(t);d.onsuccess=l=>{n.next(l)}}).catch(i=>n.error(i)),n}getAllByIndex(e,o,t){let r=[];return new g(n=>{f(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(i=>{S(i,e,l=>n.error(l));let d=p(i,j(x.readonly,e,n.error)).objectStore(e).index(o).openCursor(t);d.onsuccess=l=>{let w=l.target.result;w?(r.push(w.value),w.continue()):(n.next(r),n.complete())}}).catch(i=>n.error(i))})}getAllKeysByIndex(e,o,t){let r=[];return new g(n=>{f(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(i=>{S(i,e,l=>n.error(l));let d=p(i,j(x.readonly,e,n.error)).objectStore(e).index(o).openKeyCursor(t);d.onsuccess=l=>{let w=l.target.result;w?(r.push({primaryKey:w.primaryKey,key:w.key}),w.continue()):(n.next(r),n.complete())}}).catch(i=>n.error(i))})}count(e,o){return new g(t=>{f(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(r=>{S(r,e,s=>t.error(s));let c=p(r,j(x.readonly,e,t.error)).objectStore(e).count(o);c.onerror=s=>t.error(s),c.onsuccess=s=>{t.next(s.target.result),t.complete()}}).catch(r=>t.error(r))})}countByIndex(e,o,t){return new g(r=>{f(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(n=>{S(n,e,d=>r.error(d));let h=p(n,j(x.readonly,e,r.error)).objectStore(e).index(o).count(t);h.onerror=d=>r.error(d),h.onsuccess=d=>{r.next(d.target.result),r.complete()}}).catch(n=>r.error(n))})}deleteObjectStore(e){return R(this.dbConfig.name,++this.dbConfig.version,e)}}return a.\u0275fac=function(e){return new(e||a)(v(K),v(O))},a.\u0275prov=I({token:a,factory:a.\u0275fac}),a})(),W=(()=>{class a{static forRoot(e){return{ngModule:a,providers:[_,{provide:K,useValue:e}]}}}return a.\u0275fac=function(e){return new(e||a)},a.\u0275mod=k({type:a}),a.\u0275inj=q({imports:[[P]]}),a})();export{_ as a,W as b};
1
+ import{$ as q,I as B,_ as I,aa as M,b as g,ba as v,c as y,dc as P,ea as k,ec as E,m,r as C,ta as O}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.2/Marketplace/chunk-WGNBD2TG.js";import{h as b}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.2/Marketplace/chunk-HPDCVTZM.js";function f(a,u,e,o){return new Promise((t,r)=>{a||r("IndexedDB not available");let n=a.open(u,e),i;n.onsuccess=c=>{i=n.result,t(i)},n.onerror=c=>{r(`IndexedDB error: ${n.error}`)},typeof o=="function"&&(n.onupgradeneeded=c=>{o(c,i)})})}function A(a,u,e,o,t){if(!a)return;let r=a.open(u,e);r.onupgradeneeded=n=>{let i=n.target.result;o.forEach(s=>{if(!i.objectStoreNames.contains(s.store)){let h=i.createObjectStore(s.store,s.storeConfig);s.storeSchema.forEach(d=>{h.createIndex(d.name,d.keypath,d.options)})}});let c=t&&t();c&&Object.keys(c).map(s=>parseInt(s,10)).filter(s=>s>n.oldVersion).sort((s,h)=>s-h).forEach(s=>{c[s](i,r.transaction)}),i.close()},r.onsuccess=n=>{n.target.result.close()}}function R(a,u,e){if(!a||!u||!e)throw Error('Params: "dbName", "version", "storeName" are mandatory.');return new g(o=>{try{let t=u+1,r=indexedDB.open(a,t);r.onupgradeneeded=n=>{let i=n.target.result;i.deleteObjectStore(e),i.close(),console.log("onupgradeneeded"),o.next(!0),o.complete()},r.onerror=n=>o.error(n)}catch(t){o.error(t)}})}function V(a,u){return a.objectStoreNames.contains(u)}function S(a,u,e){a||e("You need to use the openDatabase function to create a database before you query it!"),V(a,u)||e(`objectStore does not exists: ${u}`)}function p(a,u){let e=a.transaction(u.storeName,u.dbMode);return e.onerror=u.error,e.onabort=u.abort,e}function j(a,u,e,o){return{storeName:u,dbMode:a,error:t=>{e(t)},abort:t=>{e(t)}}}var x=function(a){return a.readonly="readonly",a.readwrite="readwrite",a}(x||{}),K=new M(null),_=(()=>{class a{constructor(e,o){if(this.dbConfig=e,this.platformId=o,!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,A(this.indexedDB,e.name,e.version,e.objectStoresMeta,e.migrationFactory),f(this.indexedDB,e.name).then(t=>{t.version!==e.version&&(this.dbConfig.version=t.version)}))}createObjectStore(e,o){let t=[e];A(this.indexedDB,this.dbConfig.name,++this.dbConfig.version,t,o)}add(e,o,t){return new g(r=>{f(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(n=>{let c=p(n,j(x.readwrite,e,h=>r.error(h))).objectStore(e),s=t?c.add(o,t):c.add(o);s.onsuccess=h=>b(this,null,function*(){let d=h.target.result,l=c.get(d);l.onsuccess=w=>{r.next(w.target.result),r.complete()}})}).catch(n=>r.error(n))})}bulkAdd(e,o){let t=new Promise((r,n)=>{f(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(i=>{let s=p(i,j(x.readwrite,e,r,n)).objectStore(e),h=o.map(d=>new Promise((l,w)=>{let D=d.key;delete d.key;let $=D?s.add(d,D):s.add(d);$.onsuccess=T=>{let F=T.target.result;l(F)}}));r(Promise.all(h))}).catch(i=>n(i))});return m(t)}bulkDelete(e,o){let t=o.map(r=>new Promise((n,i)=>{f(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(c=>{let s=p(c,j(x.readwrite,e,i,n));s.objectStore(e).delete(r),s.oncomplete=()=>{this.getAll(e).pipe(B(1)).subscribe(d=>{n(d)})}}).catch(c=>i(c))}));return m(Promise.all(t))}getByKey(e,o){return new g(t=>{f(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(r=>{let c=p(r,j(x.readonly,e,t.error)).objectStore(e).get(o);c.onsuccess=s=>{t.next(s.target.result),t.complete()},c.onerror=s=>{t.error(s)}}).catch(r=>t.error(r))})}bulkGet(e,o){let t=o.map(r=>this.getByKey(e,r));return new g(r=>{C(t).subscribe(n=>{r.next(n),r.complete()})})}getByID(e,o){return new g(t=>{f(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(r=>{S(r,e,s=>t.error(s));let c=p(r,j(x.readonly,e,t.error,t.next)).objectStore(e).get(o);c.onsuccess=s=>{t.next(s.target.result)}}).catch(r=>t.error(r))})}getByIndex(e,o,t){return new g(r=>{f(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(n=>{S(n,e,d=>r.error(d));let h=p(n,j(x.readonly,e,r.error)).objectStore(e).index(o).get(t);h.onsuccess=d=>{r.next(d.target.result),r.complete()}}).catch(n=>r.error(n))})}getAll(e){return new g(o=>{f(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(t=>{S(t,e,c=>o.error(c));let i=p(t,j(x.readonly,e,o.error,o.next)).objectStore(e).getAll();i.onerror=c=>{o.error(c)},i.onsuccess=({target:{result:c}})=>{o.next(c),o.complete()}}).catch(t=>o.error(t))})}update(e,o){return new g(t=>{f(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(r=>{S(r,e,s=>t.error(s));let i=p(r,j(x.readwrite,e,s=>t.error(s))).objectStore(e),c=i.put(o);c.onsuccess=s=>b(this,null,function*(){let h=s.target.result,d=i.get(h);d.onsuccess=l=>{t.next(l.target.result),t.complete()}})}).catch(r=>t.error(r))})}delete(e,o){return new g(t=>{f(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(r=>{S(r,e,c=>t.error(c));let n=p(r,j(x.readwrite,e,c=>t.error(c)));n.objectStore(e).delete(o),n.oncomplete=()=>{this.getAll(e).pipe(B(1)).subscribe(c=>{t.next(c),t.complete()})}}).catch(r=>t.error(r))})}deleteByKey(e,o){return new g(t=>{f(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(r=>{S(r,e,c=>t.error(c));let n=p(r,j(x.readwrite,e,c=>t.error(c))),i=n.objectStore(e);n.oncomplete=()=>{t.next(!0),t.complete()},i.delete(o)}).catch(r=>t.error(r))})}clear(e){return new g(o=>{f(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(t=>{S(t,e,i=>o.error(i));let r=p(t,j(x.readwrite,e,i=>o.error(i)));r.objectStore(e).clear(),r.oncomplete=()=>{o.next(!0),o.complete()}}).catch(t=>o.error(t))})}deleteDatabase(){return new g(e=>{f(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(o=>b(this,null,function*(){yield o.close();let t=this.indexedDB.deleteDatabase(this.dbConfig.name);t.onsuccess=()=>{e.next(!0),e.complete()},t.onerror=r=>e.error(r),t.onblocked=()=>{throw new Error("Unable to delete database because it's blocked")}})).catch(o=>e.error(o))})}openCursor(e,o){return new g(t=>{f(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(r=>{S(r,e,s=>t.error(s));let i=p(r,j(x.readonly,e,t.error)).objectStore(e),c=o===void 0?i.openCursor():i.openCursor(o);c.onsuccess=s=>{t.next(s),t.complete()}}).catch(r=>t.error(r))})}openCursorByIndex(e,o,t,r=x.readonly){let n=new y;return f(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(i=>{S(i,e,l=>{n.error(l)});let d=p(i,j(r,e,l=>{n.error(l)},()=>{n.next()})).objectStore(e).index(o).openCursor(t);d.onsuccess=l=>{n.next(l)}}).catch(i=>n.error(i)),n}getAllByIndex(e,o,t){let r=[];return new g(n=>{f(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(i=>{S(i,e,l=>n.error(l));let d=p(i,j(x.readonly,e,n.error)).objectStore(e).index(o).openCursor(t);d.onsuccess=l=>{let w=l.target.result;w?(r.push(w.value),w.continue()):(n.next(r),n.complete())}}).catch(i=>n.error(i))})}getAllKeysByIndex(e,o,t){let r=[];return new g(n=>{f(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(i=>{S(i,e,l=>n.error(l));let d=p(i,j(x.readonly,e,n.error)).objectStore(e).index(o).openKeyCursor(t);d.onsuccess=l=>{let w=l.target.result;w?(r.push({primaryKey:w.primaryKey,key:w.key}),w.continue()):(n.next(r),n.complete())}}).catch(i=>n.error(i))})}count(e,o){return new g(t=>{f(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(r=>{S(r,e,s=>t.error(s));let c=p(r,j(x.readonly,e,t.error)).objectStore(e).count(o);c.onerror=s=>t.error(s),c.onsuccess=s=>{t.next(s.target.result),t.complete()}}).catch(r=>t.error(r))})}countByIndex(e,o,t){return new g(r=>{f(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(n=>{S(n,e,d=>r.error(d));let h=p(n,j(x.readonly,e,r.error)).objectStore(e).index(o).count(t);h.onerror=d=>r.error(d),h.onsuccess=d=>{r.next(d.target.result),r.complete()}}).catch(n=>r.error(n))})}deleteObjectStore(e){return R(this.dbConfig.name,++this.dbConfig.version,e)}}return a.\u0275fac=function(e){return new(e||a)(v(K),v(O))},a.\u0275prov=I({token:a,factory:a.\u0275fac}),a})(),W=(()=>{class a{static forRoot(e){return{ngModule:a,providers:[_,{provide:K,useValue:e}]}}}return a.\u0275fac=function(e){return new(e||a)},a.\u0275mod=k({type:a}),a.\u0275inj=q({imports:[[P]]}),a})();export{_ as a,W as b};
@@ -1 +1 @@
1
- import{$ as lt,$a as G,E as rt,Ea as a,Fa as C,Ja as L,Ma as O,Na as r,Nb as R,Oa as D,Qa as v,Ta as A,Tb as J,Ya as p,Yb as Y,Za as g,_ as I,_a as M,aa as ct,ab as $,b as nt,ba as f,c as _,ca as w,cb as U,da as P,ea as ut,eb as mt,gb as H,hc as ft,ia as V,ib as u,j as ot,ja as z,ob as T,oc as vt,p as at,qa as ht,qb as b,qc as gt,ra as E,rc as K,tb as q,uc as N,vc as j,wa as dt,xa as Z,xc as Q,za as pt}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.0/Marketplace/chunk-FWCMOK42.js";import{a as d,b as y}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.0/Marketplace/chunk-N76YHCQ6.js";var Tt=["toast-component",""];function xt(s,n){if(s&1){let e=U();p(0,"button",5),H("click",function(){V(e);let i=u();return z(i.remove())}),p(1,"span",6),T(2,"\xD7"),g()()}}function Ot(s,n){if(s&1&&(G(0),T(1),$()),s&2){let e=u(2);a(1),b("[",e.duplicatesCount+1,"]")}}function Dt(s,n){if(s&1&&(p(0,"div"),T(1),A(2,Ot,2,1,"ng-container",4),g()),s&2){let e=u();v(e.options.titleClass),O("aria-label",e.title),a(1),b(" ",e.title," "),a(1),r("ngIf",e.duplicatesCount)}}function At(s,n){if(s&1&&M(0,"div",7),s&2){let e=u();v(e.options.messageClass),r("innerHTML",e.message,Z)}}function Mt(s,n){if(s&1&&(p(0,"div",8),T(1),g()),s&2){let e=u();v(e.options.messageClass),O("aria-label",e.message),a(1),b(" ",e.message," ")}}function Ht(s,n){if(s&1&&(p(0,"div"),M(1,"div",9),g()),s&2){let e=u();a(1),D("width",e.width+"%")}}function Et(s,n){if(s&1){let e=U();p(0,"button",5),H("click",function(){V(e);let i=u();return z(i.remove())}),p(1,"span",6),T(2,"\xD7"),g()()}}function Rt(s,n){if(s&1&&(G(0),T(1),$()),s&2){let e=u(2);a(1),b("[",e.duplicatesCount+1,"]")}}function Nt(s,n){if(s&1&&(p(0,"div"),T(1),A(2,Rt,2,1,"ng-container",4),g()),s&2){let e=u();v(e.options.titleClass),O("aria-label",e.title),a(1),b(" ",e.title," "),a(1),r("ngIf",e.duplicatesCount)}}function jt(s,n){if(s&1&&M(0,"div",7),s&2){let e=u();v(e.options.messageClass),r("innerHTML",e.message,Z)}}function St(s,n){if(s&1&&(p(0,"div",8),T(1),g()),s&2){let e=u();v(e.options.messageClass),O("aria-label",e.message),a(1),b(" ",e.message," ")}}function Bt(s,n){if(s&1&&(p(0,"div"),M(1,"div",9),g()),s&2){let e=u();a(1),D("width",e.width+"%")}}var W=class{_attachedHost;component;viewContainerRef;injector;constructor(n,e){this.component=n,this.injector=e}attach(n,e){return this._attachedHost=n,n.attach(this,e)}detach(){let n=this._attachedHost;if(n)return this._attachedHost=void 0,n.detach()}get isAttached(){return this._attachedHost!=null}setAttachedHost(n){this._attachedHost=n}},X=class{_attachedPortal;_disposeFn;attach(n,e){return this._attachedPortal=n,this.attachComponentPortal(n,e)}detach(){this._attachedPortal&&this._attachedPortal.setAttachedHost(),this._attachedPortal=void 0,this._disposeFn&&(this._disposeFn(),this._disposeFn=void 0)}setDisposeFn(n){this._disposeFn=n}},tt=class{_overlayRef;componentInstance;duplicatesCount=0;_afterClosed=new _;_activate=new _;_manualClose=new _;_resetTimeout=new _;_countDuplicate=new _;constructor(n){this._overlayRef=n}manualClose(){this._manualClose.next(),this._manualClose.complete()}manualClosed(){return this._manualClose.asObservable()}timeoutReset(){return this._resetTimeout.asObservable()}countDuplicate(){return this._countDuplicate.asObservable()}close(){this._overlayRef.detach(),this._afterClosed.next(),this._manualClose.next(),this._afterClosed.complete(),this._manualClose.complete(),this._activate.complete(),this._resetTimeout.complete(),this._countDuplicate.complete()}afterClosed(){return this._afterClosed.asObservable()}isInactive(){return this._activate.isStopped}activate(){this._activate.next(),this._activate.complete()}afterActivate(){return this._activate.asObservable()}onDuplicate(n,e){n&&this._resetTimeout.next(),e&&this._countDuplicate.next(++this.duplicatesCount)}},x=class{toastId;config;message;title;toastType;toastRef;_onTap=new _;_onAction=new _;constructor(n,e,t,i,o,h){this.toastId=n,this.config=e,this.message=t,this.title=i,this.toastType=o,this.toastRef=h,this.toastRef.afterClosed().subscribe(()=>{this._onAction.complete(),this._onTap.complete()})}triggerTap(){this._onTap.next(),this.config.tapToDismiss&&this._onTap.complete()}onTap(){return this._onTap.asObservable()}triggerAction(n){this._onAction.next(n)}onAction(){return this._onAction.asObservable()}},_t={maxOpened:0,autoDismiss:!1,newestOnTop:!0,preventDuplicates:!1,countDuplicates:!1,resetTimeoutOnDuplicate:!1,includeTitleDuplicates:!1,iconClasses:{error:"toast-error",info:"toast-info",success:"toast-success",warning:"toast-warning"},closeButton:!1,disableTimeOut:!1,timeOut:5e3,extendedTimeOut:1e3,enableHtml:!1,progressBar:!1,toastClass:"ngx-toastr",positionClass:"toast-top-right",titleClass:"toast-title",messageClass:"toast-message",easing:"ease-in",easeTime:300,tapToDismiss:!0,onActivateTick:!1,progressAnimation:"decreasing"},Ct=new ct("ToastConfig"),et=class extends X{_hostDomElement;_componentFactoryResolver;_appRef;constructor(n,e,t){super(),this._hostDomElement=n,this._componentFactoryResolver=e,this._appRef=t}attachComponentPortal(n,e){let t=this._componentFactoryResolver.resolveComponentFactory(n.component),i;return i=t.create(n.injector),this._appRef.attachView(i.hostView),this.setDisposeFn(()=>{this._appRef.detachView(i.hostView),i.destroy()}),e?this._hostDomElement.insertBefore(this._getComponentRootNode(i),this._hostDomElement.firstChild):this._hostDomElement.appendChild(this._getComponentRootNode(i)),i}_getComponentRootNode(n){return n.hostView.rootNodes[0]}},Ft=(()=>{class s{_document=w(J);_containerElement;ngOnDestroy(){this._containerElement&&this._containerElement.parentNode&&this._containerElement.parentNode.removeChild(this._containerElement)}getContainerElement(){return this._containerElement||this._createContainer(),this._containerElement}_createContainer(){let e=this._document.createElement("div");e.classList.add("overlay-container"),e.setAttribute("aria-live","polite"),this._document.body.appendChild(e),this._containerElement=e}static \u0275fac=function(t){return new(t||s)};static \u0275prov=I({token:s,factory:s.\u0275fac,providedIn:"root"})}return s})(),it=class{_portalHost;constructor(n){this._portalHost=n}attach(n,e=!0){return this._portalHost.attach(n,e)}detach(){return this._portalHost.detach()}},kt=(()=>{class s{_overlayContainer=w(Ft);_componentFactoryResolver=w(pt);_appRef=w(R);_document=w(J);_paneElements=new Map;create(e,t){return this._createOverlayRef(this.getPaneElement(e,t))}getPaneElement(e="",t){return this._paneElements.get(t)||this._paneElements.set(t,{}),this._paneElements.get(t)[e]||(this._paneElements.get(t)[e]=this._createPaneElement(e,t)),this._paneElements.get(t)[e]}_createPaneElement(e,t){let i=this._document.createElement("div");return i.id="toast-container",i.classList.add(e),i.classList.add("toast-container"),t?t.getContainerElement().appendChild(i):this._overlayContainer.getContainerElement().appendChild(i),i}_createPortalHost(e){return new et(e,this._componentFactoryResolver,this._appRef)}_createOverlayRef(e){return new it(this._createPortalHost(e))}static \u0275fac=function(t){return new(t||s)};static \u0275prov=I({token:s,factory:s.\u0275fac,providedIn:"root"})}return s})(),S=(()=>{class s{overlay;_injector;sanitizer;ngZone;toastrConfig;currentlyActive=0;toasts=[];overlayContainer;previousToastMessage;index=0;constructor(e,t,i,o,h){this.overlay=t,this._injector=i,this.sanitizer=o,this.ngZone=h,this.toastrConfig=d(d({},e.default),e.config),e.config.iconClasses&&(this.toastrConfig.iconClasses=d(d({},e.default.iconClasses),e.config.iconClasses))}show(e,t,i={},o=""){return this._preBuildNotification(o,e,t,this.applyConfig(i))}success(e,t,i={}){let o=this.toastrConfig.iconClasses.success||"";return this._preBuildNotification(o,e,t,this.applyConfig(i))}error(e,t,i={}){let o=this.toastrConfig.iconClasses.error||"";return this._preBuildNotification(o,e,t,this.applyConfig(i))}info(e,t,i={}){let o=this.toastrConfig.iconClasses.info||"";return this._preBuildNotification(o,e,t,this.applyConfig(i))}warning(e,t,i={}){let o=this.toastrConfig.iconClasses.warning||"";return this._preBuildNotification(o,e,t,this.applyConfig(i))}clear(e){for(let t of this.toasts)if(e!==void 0){if(t.toastId===e){t.toastRef.manualClose();return}}else t.toastRef.manualClose()}remove(e){let t=this._findToast(e);if(!t||(t.activeToast.toastRef.close(),this.toasts.splice(t.index,1),this.currentlyActive=this.currentlyActive-1,!this.toastrConfig.maxOpened||!this.toasts.length))return!1;if(this.currentlyActive<this.toastrConfig.maxOpened&&this.toasts[this.currentlyActive]){let i=this.toasts[this.currentlyActive].toastRef;i.isInactive()||(this.currentlyActive=this.currentlyActive+1,i.activate())}return!0}findDuplicate(e="",t="",i,o){let{includeTitleDuplicates:h}=this.toastrConfig;for(let l of this.toasts){let c=h&&l.title===e;if((!h||c)&&l.message===t)return l.toastRef.onDuplicate(i,o),l}return null}applyConfig(e={}){return d(d({},this.toastrConfig),e)}_findToast(e){for(let t=0;t<this.toasts.length;t++)if(this.toasts[t].toastId===e)return{index:t,activeToast:this.toasts[t]};return null}_preBuildNotification(e,t,i,o){return o.onActivateTick?this.ngZone.run(()=>this._buildNotification(e,t,i,o)):this._buildNotification(e,t,i,o)}_buildNotification(e,t,i,o){if(!o.toastComponent)throw new Error("toastComponent required");let h=this.findDuplicate(i,t,this.toastrConfig.resetTimeoutOnDuplicate&&o.timeOut>0,this.toastrConfig.countDuplicates);if((this.toastrConfig.includeTitleDuplicates&&i||t)&&this.toastrConfig.preventDuplicates&&h!==null)return h;this.previousToastMessage=t;let l=!1;this.toastrConfig.maxOpened&&this.currentlyActive>=this.toastrConfig.maxOpened&&(l=!0,this.toastrConfig.autoDismiss&&this.clear(this.toasts[0].toastId));let c=this.overlay.create(o.positionClass,this.overlayContainer);this.index=this.index+1;let B=t;t&&o.enableHtml&&(B=this.sanitizer.sanitize(dt.HTML,t));let m=new tt(c),F=new x(this.index,o,B,i,e,m),bt=[{provide:x,useValue:F}],yt=E.create({providers:bt,parent:this._injector}),It=new W(o.toastComponent,yt),st=c.attach(It,o.newestOnTop);m.componentInstance=st.instance;let k={toastId:this.index,title:i||"",message:t||"",toastRef:m,onShown:m.afterActivate(),onHidden:m.afterClosed(),onTap:F.onTap(),onAction:F.onAction(),portal:st};return l||(this.currentlyActive=this.currentlyActive+1,setTimeout(()=>{k.toastRef.activate()})),this.toasts.push(k),k}static \u0275fac=function(t){return new(t||s)(f(Ct),f(kt),f(E),f(vt),f(L))};static \u0275prov=I({token:s,factory:s.\u0275fac,providedIn:"root"})}return s})(),Pt=(()=>{class s{toastrService;toastPackage;ngZone;message;title;options;duplicatesCount;originalTimeout;width=-1;toastClasses="";state;get displayStyle(){if(this.state.value==="inactive")return"none"}timeout;intervalId;hideTime;sub;sub1;sub2;sub3;constructor(e,t,i){this.toastrService=e,this.toastPackage=t,this.ngZone=i,this.message=t.message,this.title=t.title,this.options=t.config,this.originalTimeout=t.config.timeOut,this.toastClasses=`${t.toastType} ${t.config.toastClass}`,this.sub=t.toastRef.afterActivate().subscribe(()=>{this.activateToast()}),this.sub1=t.toastRef.manualClosed().subscribe(()=>{this.remove()}),this.sub2=t.toastRef.timeoutReset().subscribe(()=>{this.resetTimeout()}),this.sub3=t.toastRef.countDuplicate().subscribe(o=>{this.duplicatesCount=o}),this.state={value:"inactive",params:{easeTime:this.toastPackage.config.easeTime,easing:"ease-in"}}}ngOnDestroy(){this.sub.unsubscribe(),this.sub1.unsubscribe(),this.sub2.unsubscribe(),this.sub3.unsubscribe(),clearInterval(this.intervalId),clearTimeout(this.timeout)}activateToast(){this.state=y(d({},this.state),{value:"active"}),!(this.options.disableTimeOut===!0||this.options.disableTimeOut==="timeOut")&&this.options.timeOut&&(this.outsideTimeout(()=>this.remove(),this.options.timeOut),this.hideTime=new Date().getTime()+this.options.timeOut,this.options.progressBar&&this.outsideInterval(()=>this.updateProgress(),10))}updateProgress(){if(this.width===0||this.width===100||!this.options.timeOut)return;let e=new Date().getTime(),t=this.hideTime-e;this.width=t/this.options.timeOut*100,this.options.progressAnimation==="increasing"&&(this.width=100-this.width),this.width<=0&&(this.width=0),this.width>=100&&(this.width=100)}resetTimeout(){clearTimeout(this.timeout),clearInterval(this.intervalId),this.state=y(d({},this.state),{value:"active"}),this.outsideTimeout(()=>this.remove(),this.originalTimeout),this.options.timeOut=this.originalTimeout,this.hideTime=new Date().getTime()+(this.options.timeOut||0),this.width=-1,this.options.progressBar&&this.outsideInterval(()=>this.updateProgress(),10)}remove(){this.state.value!=="removed"&&(clearTimeout(this.timeout),this.state=y(d({},this.state),{value:"removed"}),this.outsideTimeout(()=>this.toastrService.remove(this.toastPackage.toastId),+this.toastPackage.config.easeTime))}tapToast(){this.state.value!=="removed"&&(this.toastPackage.triggerTap(),this.options.tapToDismiss&&this.remove())}stickAround(){this.state.value!=="removed"&&this.options.disableTimeOut!=="extendedTimeOut"&&(clearTimeout(this.timeout),this.options.timeOut=0,this.hideTime=0,clearInterval(this.intervalId),this.width=0)}delayedHideToast(){this.options.disableTimeOut===!0||this.options.disableTimeOut==="extendedTimeOut"||this.options.extendedTimeOut===0||this.state.value==="removed"||(this.outsideTimeout(()=>this.remove(),this.options.extendedTimeOut),this.options.timeOut=this.options.extendedTimeOut,this.hideTime=new Date().getTime()+(this.options.timeOut||0),this.width=-1,this.options.progressBar&&this.outsideInterval(()=>this.updateProgress(),10))}outsideTimeout(e,t){this.ngZone?this.ngZone.runOutsideAngular(()=>this.timeout=setTimeout(()=>this.runInsideAngular(e),t)):this.timeout=setTimeout(()=>e(),t)}outsideInterval(e,t){this.ngZone?this.ngZone.runOutsideAngular(()=>this.intervalId=setInterval(()=>this.runInsideAngular(e),t)):this.intervalId=setInterval(()=>e(),t)}runInsideAngular(e){this.ngZone?this.ngZone.run(()=>e()):e()}static \u0275fac=function(t){return new(t||s)(C(S),C(x),C(L))};static \u0275cmp=P({type:s,selectors:[["","toast-component",""]],hostVars:5,hostBindings:function(t,i){t&1&&H("click",function(){return i.tapToast()})("mouseenter",function(){return i.stickAround()})("mouseleave",function(){return i.delayedHideToast()}),t&2&&(mt("@flyInOut",i.state),v(i.toastClasses),D("display",i.displayStyle))},standalone:!0,features:[q],attrs:Tt,decls:5,vars:5,consts:[["type","button","class","toast-close-button","aria-label","Close",3,"click",4,"ngIf"],[3,"class",4,"ngIf"],["role","alert",3,"class","innerHTML",4,"ngIf"],["role","alert",3,"class",4,"ngIf"],[4,"ngIf"],["type","button","aria-label","Close",1,"toast-close-button",3,"click"],["aria-hidden","true"],["role","alert",3,"innerHTML"],["role","alert"],[1,"toast-progress"]],template:function(t,i){t&1&&A(0,xt,3,0,"button",0)(1,Dt,3,5,"div",1)(2,At,1,3,"div",2)(3,Mt,2,4,"div",3)(4,Ht,2,2,"div",4),t&2&&(r("ngIf",i.options.closeButton),a(1),r("ngIf",i.title),a(1),r("ngIf",i.message&&i.options.enableHtml),a(1),r("ngIf",i.message&&!i.options.enableHtml),a(1),r("ngIf",i.options.progressBar))},dependencies:[Y],encapsulation:2,data:{animation:[gt("flyInOut",[j("inactive",N({opacity:0})),j("active",N({opacity:1})),j("removed",N({opacity:0})),Q("inactive => active",K("{{ easeTime }}ms {{ easing }}")),Q("active => removed",K("{{ easeTime }}ms {{ easing }}"))])]}})}return s})(),Vt=y(d({},_t),{toastComponent:Pt}),zt=(s={})=>ht([{provide:Ct,useValue:{default:Vt,config:s}}]),ne=(()=>{class s{static forRoot(e={}){return{ngModule:s,providers:[zt(e)]}}static \u0275fac=function(t){return new(t||s)};static \u0275mod=ut({type:s});static \u0275inj=lt({})}return s})();var Zt=(()=>{class s{toastrService;toastPackage;appRef;message;title;options;duplicatesCount;originalTimeout;width=-1;toastClasses="";get displayStyle(){return this.state==="inactive"?"none":null}state="inactive";timeout;intervalId;hideTime;sub;sub1;sub2;sub3;constructor(e,t,i){this.toastrService=e,this.toastPackage=t,this.appRef=i,this.message=t.message,this.title=t.title,this.options=t.config,this.originalTimeout=t.config.timeOut,this.toastClasses=`${t.toastType} ${t.config.toastClass}`,this.sub=t.toastRef.afterActivate().subscribe(()=>{this.activateToast()}),this.sub1=t.toastRef.manualClosed().subscribe(()=>{this.remove()}),this.sub2=t.toastRef.timeoutReset().subscribe(()=>{this.resetTimeout()}),this.sub3=t.toastRef.countDuplicate().subscribe(o=>{this.duplicatesCount=o})}ngOnDestroy(){this.sub.unsubscribe(),this.sub1.unsubscribe(),this.sub2.unsubscribe(),this.sub3.unsubscribe(),clearInterval(this.intervalId),clearTimeout(this.timeout)}activateToast(){this.state="active",!(this.options.disableTimeOut===!0||this.options.disableTimeOut==="timeOut")&&this.options.timeOut&&(this.timeout=setTimeout(()=>{this.remove()},this.options.timeOut),this.hideTime=new Date().getTime()+this.options.timeOut,this.options.progressBar&&(this.intervalId=setInterval(()=>this.updateProgress(),10))),this.options.onActivateTick&&this.appRef.tick()}updateProgress(){if(this.width===0||this.width===100||!this.options.timeOut)return;let e=new Date().getTime(),t=this.hideTime-e;this.width=t/this.options.timeOut*100,this.options.progressAnimation==="increasing"&&(this.width=100-this.width),this.width<=0&&(this.width=0),this.width>=100&&(this.width=100)}resetTimeout(){clearTimeout(this.timeout),clearInterval(this.intervalId),this.state="active",this.options.timeOut=this.originalTimeout,this.timeout=setTimeout(()=>this.remove(),this.originalTimeout),this.hideTime=new Date().getTime()+(this.originalTimeout||0),this.width=-1,this.options.progressBar&&(this.intervalId=setInterval(()=>this.updateProgress(),10))}remove(){this.state!=="removed"&&(clearTimeout(this.timeout),this.state="removed",this.timeout=setTimeout(()=>this.toastrService.remove(this.toastPackage.toastId)))}tapToast(){this.state!=="removed"&&(this.toastPackage.triggerTap(),this.options.tapToDismiss&&this.remove())}stickAround(){this.state!=="removed"&&(clearTimeout(this.timeout),this.options.timeOut=0,this.hideTime=0,clearInterval(this.intervalId),this.width=0)}delayedHideToast(){this.options.disableTimeOut===!0||this.options.disableTimeOut==="extendedTimeOut"||this.options.extendedTimeOut===0||this.state==="removed"||(this.timeout=setTimeout(()=>this.remove(),this.options.extendedTimeOut),this.options.timeOut=this.options.extendedTimeOut,this.hideTime=new Date().getTime()+(this.options.timeOut||0),this.width=-1,this.options.progressBar&&(this.intervalId=setInterval(()=>this.updateProgress(),10)))}static \u0275fac=function(t){return new(t||s)(C(S),C(x),C(R))};static \u0275cmp=P({type:s,selectors:[["","toast-component",""]],hostVars:4,hostBindings:function(t,i){t&1&&H("click",function(){return i.tapToast()})("mouseenter",function(){return i.stickAround()})("mouseleave",function(){return i.delayedHideToast()}),t&2&&(v(i.toastClasses),D("display",i.displayStyle))},standalone:!0,features:[q],attrs:Tt,decls:5,vars:5,consts:[["type","button","class","toast-close-button","aria-label","Close",3,"click",4,"ngIf"],[3,"class",4,"ngIf"],["role","alert",3,"class","innerHTML",4,"ngIf"],["role","alert",3,"class",4,"ngIf"],[4,"ngIf"],["type","button","aria-label","Close",1,"toast-close-button",3,"click"],["aria-hidden","true"],["role","alert",3,"innerHTML"],["role","alert"],[1,"toast-progress"]],template:function(t,i){t&1&&A(0,Et,3,0,"button",0)(1,Nt,3,5,"div",1)(2,jt,1,3,"div",2)(3,St,2,4,"div",3)(4,Bt,2,2,"div",4),t&2&&(r("ngIf",i.options.closeButton),a(1),r("ngIf",i.title),a(1),r("ngIf",i.message&&i.options.enableHtml),a(1),r("ngIf",i.message&&!i.options.enableHtml),a(1),r("ngIf",i.options.progressBar))},dependencies:[Y],encapsulation:2})}return s})(),oe=y(d({},_t),{toastComponent:Zt});var ue=(()=>{let n=class n{constructor(t,i){this.http=t,this.toastr=i}get(t){return this.http.get(t).pipe(rt(i=>{let o=this.errorMessageHandling(i);return this.toastr.error(o.message!=""?o.message:"An unknown error has occured!",o.header),ot}))}post(t,i,o={},h=1e5){return new nt(l=>{this.http.post(t,i,o).pipe(at(h)).subscribe({next:c=>{l.next(c),l.complete()},error:c=>{if(c.status==200)l.next(c.error.text),l.complete();else{if(!this.unauthorizedErrorHandling(c)&&!Array.isArray(c?.error?.Message)){let m=this.errorMessageHandling(c);this.toastr.error(m.message!=""?m.message:"An unknown error has occured!",m.header,{enableHtml:!0})}l.error(c)}}})})}unauthorizedErrorHandling(t){let i=!1;return t.status==401&&(localStorage.getItem("Token")?window.location.href="/A/Unauthorized/Main/Unauthorized":window.location.href="/",i=!0),i}errorMessageHandling(t){let i="API Error",o="Exception Message";return t.error?(i="API Error - "+t.status,t.error.Message&&(t.error.Message.indexOf("Message")!=-1?o=JSON.parse(t.error.Message).Message:o=t.error.Message)):t.message&&(i="API Error - "+t.name,o=t.message),{header:i,message:o}}};n.\u0275fac=function(i){return new(i||n)(f(ft),f(S))},n.\u0275prov=I({token:n,factory:n.\u0275fac,providedIn:"root"});let s=n;return s})();export{x as a,S as b,Pt as c,ne as d,ue as e};
1
+ import{$ as lt,$a as G,E as rt,Ea as a,Fa as C,Ja as L,Ma as O,Na as r,Nb as R,Oa as D,Qa as v,Ta as A,Tb as J,Ya as p,Yb as Y,Za as g,_ as I,_a as M,aa as ct,ab as $,b as nt,ba as f,c as _,ca as w,cb as U,da as P,ea as ut,eb as mt,gb as H,hc as ft,ia as V,ib as u,j as ot,ja as z,ob as T,oc as vt,p as at,qa as ht,qb as b,qc as gt,ra as E,rc as K,tb as q,uc as N,vc as j,wa as dt,xa as Z,xc as Q,za as pt}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.2/Marketplace/chunk-WGNBD2TG.js";import{a as d,b as y}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.2/Marketplace/chunk-HPDCVTZM.js";var Tt=["toast-component",""];function xt(s,n){if(s&1){let e=U();p(0,"button",5),H("click",function(){V(e);let i=u();return z(i.remove())}),p(1,"span",6),T(2,"\xD7"),g()()}}function Ot(s,n){if(s&1&&(G(0),T(1),$()),s&2){let e=u(2);a(1),b("[",e.duplicatesCount+1,"]")}}function Dt(s,n){if(s&1&&(p(0,"div"),T(1),A(2,Ot,2,1,"ng-container",4),g()),s&2){let e=u();v(e.options.titleClass),O("aria-label",e.title),a(1),b(" ",e.title," "),a(1),r("ngIf",e.duplicatesCount)}}function At(s,n){if(s&1&&M(0,"div",7),s&2){let e=u();v(e.options.messageClass),r("innerHTML",e.message,Z)}}function Mt(s,n){if(s&1&&(p(0,"div",8),T(1),g()),s&2){let e=u();v(e.options.messageClass),O("aria-label",e.message),a(1),b(" ",e.message," ")}}function Ht(s,n){if(s&1&&(p(0,"div"),M(1,"div",9),g()),s&2){let e=u();a(1),D("width",e.width+"%")}}function Et(s,n){if(s&1){let e=U();p(0,"button",5),H("click",function(){V(e);let i=u();return z(i.remove())}),p(1,"span",6),T(2,"\xD7"),g()()}}function Rt(s,n){if(s&1&&(G(0),T(1),$()),s&2){let e=u(2);a(1),b("[",e.duplicatesCount+1,"]")}}function Nt(s,n){if(s&1&&(p(0,"div"),T(1),A(2,Rt,2,1,"ng-container",4),g()),s&2){let e=u();v(e.options.titleClass),O("aria-label",e.title),a(1),b(" ",e.title," "),a(1),r("ngIf",e.duplicatesCount)}}function jt(s,n){if(s&1&&M(0,"div",7),s&2){let e=u();v(e.options.messageClass),r("innerHTML",e.message,Z)}}function St(s,n){if(s&1&&(p(0,"div",8),T(1),g()),s&2){let e=u();v(e.options.messageClass),O("aria-label",e.message),a(1),b(" ",e.message," ")}}function Bt(s,n){if(s&1&&(p(0,"div"),M(1,"div",9),g()),s&2){let e=u();a(1),D("width",e.width+"%")}}var W=class{_attachedHost;component;viewContainerRef;injector;constructor(n,e){this.component=n,this.injector=e}attach(n,e){return this._attachedHost=n,n.attach(this,e)}detach(){let n=this._attachedHost;if(n)return this._attachedHost=void 0,n.detach()}get isAttached(){return this._attachedHost!=null}setAttachedHost(n){this._attachedHost=n}},X=class{_attachedPortal;_disposeFn;attach(n,e){return this._attachedPortal=n,this.attachComponentPortal(n,e)}detach(){this._attachedPortal&&this._attachedPortal.setAttachedHost(),this._attachedPortal=void 0,this._disposeFn&&(this._disposeFn(),this._disposeFn=void 0)}setDisposeFn(n){this._disposeFn=n}},tt=class{_overlayRef;componentInstance;duplicatesCount=0;_afterClosed=new _;_activate=new _;_manualClose=new _;_resetTimeout=new _;_countDuplicate=new _;constructor(n){this._overlayRef=n}manualClose(){this._manualClose.next(),this._manualClose.complete()}manualClosed(){return this._manualClose.asObservable()}timeoutReset(){return this._resetTimeout.asObservable()}countDuplicate(){return this._countDuplicate.asObservable()}close(){this._overlayRef.detach(),this._afterClosed.next(),this._manualClose.next(),this._afterClosed.complete(),this._manualClose.complete(),this._activate.complete(),this._resetTimeout.complete(),this._countDuplicate.complete()}afterClosed(){return this._afterClosed.asObservable()}isInactive(){return this._activate.isStopped}activate(){this._activate.next(),this._activate.complete()}afterActivate(){return this._activate.asObservable()}onDuplicate(n,e){n&&this._resetTimeout.next(),e&&this._countDuplicate.next(++this.duplicatesCount)}},x=class{toastId;config;message;title;toastType;toastRef;_onTap=new _;_onAction=new _;constructor(n,e,t,i,o,h){this.toastId=n,this.config=e,this.message=t,this.title=i,this.toastType=o,this.toastRef=h,this.toastRef.afterClosed().subscribe(()=>{this._onAction.complete(),this._onTap.complete()})}triggerTap(){this._onTap.next(),this.config.tapToDismiss&&this._onTap.complete()}onTap(){return this._onTap.asObservable()}triggerAction(n){this._onAction.next(n)}onAction(){return this._onAction.asObservable()}},_t={maxOpened:0,autoDismiss:!1,newestOnTop:!0,preventDuplicates:!1,countDuplicates:!1,resetTimeoutOnDuplicate:!1,includeTitleDuplicates:!1,iconClasses:{error:"toast-error",info:"toast-info",success:"toast-success",warning:"toast-warning"},closeButton:!1,disableTimeOut:!1,timeOut:5e3,extendedTimeOut:1e3,enableHtml:!1,progressBar:!1,toastClass:"ngx-toastr",positionClass:"toast-top-right",titleClass:"toast-title",messageClass:"toast-message",easing:"ease-in",easeTime:300,tapToDismiss:!0,onActivateTick:!1,progressAnimation:"decreasing"},Ct=new ct("ToastConfig"),et=class extends X{_hostDomElement;_componentFactoryResolver;_appRef;constructor(n,e,t){super(),this._hostDomElement=n,this._componentFactoryResolver=e,this._appRef=t}attachComponentPortal(n,e){let t=this._componentFactoryResolver.resolveComponentFactory(n.component),i;return i=t.create(n.injector),this._appRef.attachView(i.hostView),this.setDisposeFn(()=>{this._appRef.detachView(i.hostView),i.destroy()}),e?this._hostDomElement.insertBefore(this._getComponentRootNode(i),this._hostDomElement.firstChild):this._hostDomElement.appendChild(this._getComponentRootNode(i)),i}_getComponentRootNode(n){return n.hostView.rootNodes[0]}},Ft=(()=>{class s{_document=w(J);_containerElement;ngOnDestroy(){this._containerElement&&this._containerElement.parentNode&&this._containerElement.parentNode.removeChild(this._containerElement)}getContainerElement(){return this._containerElement||this._createContainer(),this._containerElement}_createContainer(){let e=this._document.createElement("div");e.classList.add("overlay-container"),e.setAttribute("aria-live","polite"),this._document.body.appendChild(e),this._containerElement=e}static \u0275fac=function(t){return new(t||s)};static \u0275prov=I({token:s,factory:s.\u0275fac,providedIn:"root"})}return s})(),it=class{_portalHost;constructor(n){this._portalHost=n}attach(n,e=!0){return this._portalHost.attach(n,e)}detach(){return this._portalHost.detach()}},kt=(()=>{class s{_overlayContainer=w(Ft);_componentFactoryResolver=w(pt);_appRef=w(R);_document=w(J);_paneElements=new Map;create(e,t){return this._createOverlayRef(this.getPaneElement(e,t))}getPaneElement(e="",t){return this._paneElements.get(t)||this._paneElements.set(t,{}),this._paneElements.get(t)[e]||(this._paneElements.get(t)[e]=this._createPaneElement(e,t)),this._paneElements.get(t)[e]}_createPaneElement(e,t){let i=this._document.createElement("div");return i.id="toast-container",i.classList.add(e),i.classList.add("toast-container"),t?t.getContainerElement().appendChild(i):this._overlayContainer.getContainerElement().appendChild(i),i}_createPortalHost(e){return new et(e,this._componentFactoryResolver,this._appRef)}_createOverlayRef(e){return new it(this._createPortalHost(e))}static \u0275fac=function(t){return new(t||s)};static \u0275prov=I({token:s,factory:s.\u0275fac,providedIn:"root"})}return s})(),S=(()=>{class s{overlay;_injector;sanitizer;ngZone;toastrConfig;currentlyActive=0;toasts=[];overlayContainer;previousToastMessage;index=0;constructor(e,t,i,o,h){this.overlay=t,this._injector=i,this.sanitizer=o,this.ngZone=h,this.toastrConfig=d(d({},e.default),e.config),e.config.iconClasses&&(this.toastrConfig.iconClasses=d(d({},e.default.iconClasses),e.config.iconClasses))}show(e,t,i={},o=""){return this._preBuildNotification(o,e,t,this.applyConfig(i))}success(e,t,i={}){let o=this.toastrConfig.iconClasses.success||"";return this._preBuildNotification(o,e,t,this.applyConfig(i))}error(e,t,i={}){let o=this.toastrConfig.iconClasses.error||"";return this._preBuildNotification(o,e,t,this.applyConfig(i))}info(e,t,i={}){let o=this.toastrConfig.iconClasses.info||"";return this._preBuildNotification(o,e,t,this.applyConfig(i))}warning(e,t,i={}){let o=this.toastrConfig.iconClasses.warning||"";return this._preBuildNotification(o,e,t,this.applyConfig(i))}clear(e){for(let t of this.toasts)if(e!==void 0){if(t.toastId===e){t.toastRef.manualClose();return}}else t.toastRef.manualClose()}remove(e){let t=this._findToast(e);if(!t||(t.activeToast.toastRef.close(),this.toasts.splice(t.index,1),this.currentlyActive=this.currentlyActive-1,!this.toastrConfig.maxOpened||!this.toasts.length))return!1;if(this.currentlyActive<this.toastrConfig.maxOpened&&this.toasts[this.currentlyActive]){let i=this.toasts[this.currentlyActive].toastRef;i.isInactive()||(this.currentlyActive=this.currentlyActive+1,i.activate())}return!0}findDuplicate(e="",t="",i,o){let{includeTitleDuplicates:h}=this.toastrConfig;for(let l of this.toasts){let c=h&&l.title===e;if((!h||c)&&l.message===t)return l.toastRef.onDuplicate(i,o),l}return null}applyConfig(e={}){return d(d({},this.toastrConfig),e)}_findToast(e){for(let t=0;t<this.toasts.length;t++)if(this.toasts[t].toastId===e)return{index:t,activeToast:this.toasts[t]};return null}_preBuildNotification(e,t,i,o){return o.onActivateTick?this.ngZone.run(()=>this._buildNotification(e,t,i,o)):this._buildNotification(e,t,i,o)}_buildNotification(e,t,i,o){if(!o.toastComponent)throw new Error("toastComponent required");let h=this.findDuplicate(i,t,this.toastrConfig.resetTimeoutOnDuplicate&&o.timeOut>0,this.toastrConfig.countDuplicates);if((this.toastrConfig.includeTitleDuplicates&&i||t)&&this.toastrConfig.preventDuplicates&&h!==null)return h;this.previousToastMessage=t;let l=!1;this.toastrConfig.maxOpened&&this.currentlyActive>=this.toastrConfig.maxOpened&&(l=!0,this.toastrConfig.autoDismiss&&this.clear(this.toasts[0].toastId));let c=this.overlay.create(o.positionClass,this.overlayContainer);this.index=this.index+1;let B=t;t&&o.enableHtml&&(B=this.sanitizer.sanitize(dt.HTML,t));let m=new tt(c),F=new x(this.index,o,B,i,e,m),bt=[{provide:x,useValue:F}],yt=E.create({providers:bt,parent:this._injector}),It=new W(o.toastComponent,yt),st=c.attach(It,o.newestOnTop);m.componentInstance=st.instance;let k={toastId:this.index,title:i||"",message:t||"",toastRef:m,onShown:m.afterActivate(),onHidden:m.afterClosed(),onTap:F.onTap(),onAction:F.onAction(),portal:st};return l||(this.currentlyActive=this.currentlyActive+1,setTimeout(()=>{k.toastRef.activate()})),this.toasts.push(k),k}static \u0275fac=function(t){return new(t||s)(f(Ct),f(kt),f(E),f(vt),f(L))};static \u0275prov=I({token:s,factory:s.\u0275fac,providedIn:"root"})}return s})(),Pt=(()=>{class s{toastrService;toastPackage;ngZone;message;title;options;duplicatesCount;originalTimeout;width=-1;toastClasses="";state;get displayStyle(){if(this.state.value==="inactive")return"none"}timeout;intervalId;hideTime;sub;sub1;sub2;sub3;constructor(e,t,i){this.toastrService=e,this.toastPackage=t,this.ngZone=i,this.message=t.message,this.title=t.title,this.options=t.config,this.originalTimeout=t.config.timeOut,this.toastClasses=`${t.toastType} ${t.config.toastClass}`,this.sub=t.toastRef.afterActivate().subscribe(()=>{this.activateToast()}),this.sub1=t.toastRef.manualClosed().subscribe(()=>{this.remove()}),this.sub2=t.toastRef.timeoutReset().subscribe(()=>{this.resetTimeout()}),this.sub3=t.toastRef.countDuplicate().subscribe(o=>{this.duplicatesCount=o}),this.state={value:"inactive",params:{easeTime:this.toastPackage.config.easeTime,easing:"ease-in"}}}ngOnDestroy(){this.sub.unsubscribe(),this.sub1.unsubscribe(),this.sub2.unsubscribe(),this.sub3.unsubscribe(),clearInterval(this.intervalId),clearTimeout(this.timeout)}activateToast(){this.state=y(d({},this.state),{value:"active"}),!(this.options.disableTimeOut===!0||this.options.disableTimeOut==="timeOut")&&this.options.timeOut&&(this.outsideTimeout(()=>this.remove(),this.options.timeOut),this.hideTime=new Date().getTime()+this.options.timeOut,this.options.progressBar&&this.outsideInterval(()=>this.updateProgress(),10))}updateProgress(){if(this.width===0||this.width===100||!this.options.timeOut)return;let e=new Date().getTime(),t=this.hideTime-e;this.width=t/this.options.timeOut*100,this.options.progressAnimation==="increasing"&&(this.width=100-this.width),this.width<=0&&(this.width=0),this.width>=100&&(this.width=100)}resetTimeout(){clearTimeout(this.timeout),clearInterval(this.intervalId),this.state=y(d({},this.state),{value:"active"}),this.outsideTimeout(()=>this.remove(),this.originalTimeout),this.options.timeOut=this.originalTimeout,this.hideTime=new Date().getTime()+(this.options.timeOut||0),this.width=-1,this.options.progressBar&&this.outsideInterval(()=>this.updateProgress(),10)}remove(){this.state.value!=="removed"&&(clearTimeout(this.timeout),this.state=y(d({},this.state),{value:"removed"}),this.outsideTimeout(()=>this.toastrService.remove(this.toastPackage.toastId),+this.toastPackage.config.easeTime))}tapToast(){this.state.value!=="removed"&&(this.toastPackage.triggerTap(),this.options.tapToDismiss&&this.remove())}stickAround(){this.state.value!=="removed"&&this.options.disableTimeOut!=="extendedTimeOut"&&(clearTimeout(this.timeout),this.options.timeOut=0,this.hideTime=0,clearInterval(this.intervalId),this.width=0)}delayedHideToast(){this.options.disableTimeOut===!0||this.options.disableTimeOut==="extendedTimeOut"||this.options.extendedTimeOut===0||this.state.value==="removed"||(this.outsideTimeout(()=>this.remove(),this.options.extendedTimeOut),this.options.timeOut=this.options.extendedTimeOut,this.hideTime=new Date().getTime()+(this.options.timeOut||0),this.width=-1,this.options.progressBar&&this.outsideInterval(()=>this.updateProgress(),10))}outsideTimeout(e,t){this.ngZone?this.ngZone.runOutsideAngular(()=>this.timeout=setTimeout(()=>this.runInsideAngular(e),t)):this.timeout=setTimeout(()=>e(),t)}outsideInterval(e,t){this.ngZone?this.ngZone.runOutsideAngular(()=>this.intervalId=setInterval(()=>this.runInsideAngular(e),t)):this.intervalId=setInterval(()=>e(),t)}runInsideAngular(e){this.ngZone?this.ngZone.run(()=>e()):e()}static \u0275fac=function(t){return new(t||s)(C(S),C(x),C(L))};static \u0275cmp=P({type:s,selectors:[["","toast-component",""]],hostVars:5,hostBindings:function(t,i){t&1&&H("click",function(){return i.tapToast()})("mouseenter",function(){return i.stickAround()})("mouseleave",function(){return i.delayedHideToast()}),t&2&&(mt("@flyInOut",i.state),v(i.toastClasses),D("display",i.displayStyle))},standalone:!0,features:[q],attrs:Tt,decls:5,vars:5,consts:[["type","button","class","toast-close-button","aria-label","Close",3,"click",4,"ngIf"],[3,"class",4,"ngIf"],["role","alert",3,"class","innerHTML",4,"ngIf"],["role","alert",3,"class",4,"ngIf"],[4,"ngIf"],["type","button","aria-label","Close",1,"toast-close-button",3,"click"],["aria-hidden","true"],["role","alert",3,"innerHTML"],["role","alert"],[1,"toast-progress"]],template:function(t,i){t&1&&A(0,xt,3,0,"button",0)(1,Dt,3,5,"div",1)(2,At,1,3,"div",2)(3,Mt,2,4,"div",3)(4,Ht,2,2,"div",4),t&2&&(r("ngIf",i.options.closeButton),a(1),r("ngIf",i.title),a(1),r("ngIf",i.message&&i.options.enableHtml),a(1),r("ngIf",i.message&&!i.options.enableHtml),a(1),r("ngIf",i.options.progressBar))},dependencies:[Y],encapsulation:2,data:{animation:[gt("flyInOut",[j("inactive",N({opacity:0})),j("active",N({opacity:1})),j("removed",N({opacity:0})),Q("inactive => active",K("{{ easeTime }}ms {{ easing }}")),Q("active => removed",K("{{ easeTime }}ms {{ easing }}"))])]}})}return s})(),Vt=y(d({},_t),{toastComponent:Pt}),zt=(s={})=>ht([{provide:Ct,useValue:{default:Vt,config:s}}]),ne=(()=>{class s{static forRoot(e={}){return{ngModule:s,providers:[zt(e)]}}static \u0275fac=function(t){return new(t||s)};static \u0275mod=ut({type:s});static \u0275inj=lt({})}return s})();var Zt=(()=>{class s{toastrService;toastPackage;appRef;message;title;options;duplicatesCount;originalTimeout;width=-1;toastClasses="";get displayStyle(){return this.state==="inactive"?"none":null}state="inactive";timeout;intervalId;hideTime;sub;sub1;sub2;sub3;constructor(e,t,i){this.toastrService=e,this.toastPackage=t,this.appRef=i,this.message=t.message,this.title=t.title,this.options=t.config,this.originalTimeout=t.config.timeOut,this.toastClasses=`${t.toastType} ${t.config.toastClass}`,this.sub=t.toastRef.afterActivate().subscribe(()=>{this.activateToast()}),this.sub1=t.toastRef.manualClosed().subscribe(()=>{this.remove()}),this.sub2=t.toastRef.timeoutReset().subscribe(()=>{this.resetTimeout()}),this.sub3=t.toastRef.countDuplicate().subscribe(o=>{this.duplicatesCount=o})}ngOnDestroy(){this.sub.unsubscribe(),this.sub1.unsubscribe(),this.sub2.unsubscribe(),this.sub3.unsubscribe(),clearInterval(this.intervalId),clearTimeout(this.timeout)}activateToast(){this.state="active",!(this.options.disableTimeOut===!0||this.options.disableTimeOut==="timeOut")&&this.options.timeOut&&(this.timeout=setTimeout(()=>{this.remove()},this.options.timeOut),this.hideTime=new Date().getTime()+this.options.timeOut,this.options.progressBar&&(this.intervalId=setInterval(()=>this.updateProgress(),10))),this.options.onActivateTick&&this.appRef.tick()}updateProgress(){if(this.width===0||this.width===100||!this.options.timeOut)return;let e=new Date().getTime(),t=this.hideTime-e;this.width=t/this.options.timeOut*100,this.options.progressAnimation==="increasing"&&(this.width=100-this.width),this.width<=0&&(this.width=0),this.width>=100&&(this.width=100)}resetTimeout(){clearTimeout(this.timeout),clearInterval(this.intervalId),this.state="active",this.options.timeOut=this.originalTimeout,this.timeout=setTimeout(()=>this.remove(),this.originalTimeout),this.hideTime=new Date().getTime()+(this.originalTimeout||0),this.width=-1,this.options.progressBar&&(this.intervalId=setInterval(()=>this.updateProgress(),10))}remove(){this.state!=="removed"&&(clearTimeout(this.timeout),this.state="removed",this.timeout=setTimeout(()=>this.toastrService.remove(this.toastPackage.toastId)))}tapToast(){this.state!=="removed"&&(this.toastPackage.triggerTap(),this.options.tapToDismiss&&this.remove())}stickAround(){this.state!=="removed"&&(clearTimeout(this.timeout),this.options.timeOut=0,this.hideTime=0,clearInterval(this.intervalId),this.width=0)}delayedHideToast(){this.options.disableTimeOut===!0||this.options.disableTimeOut==="extendedTimeOut"||this.options.extendedTimeOut===0||this.state==="removed"||(this.timeout=setTimeout(()=>this.remove(),this.options.extendedTimeOut),this.options.timeOut=this.options.extendedTimeOut,this.hideTime=new Date().getTime()+(this.options.timeOut||0),this.width=-1,this.options.progressBar&&(this.intervalId=setInterval(()=>this.updateProgress(),10)))}static \u0275fac=function(t){return new(t||s)(C(S),C(x),C(R))};static \u0275cmp=P({type:s,selectors:[["","toast-component",""]],hostVars:4,hostBindings:function(t,i){t&1&&H("click",function(){return i.tapToast()})("mouseenter",function(){return i.stickAround()})("mouseleave",function(){return i.delayedHideToast()}),t&2&&(v(i.toastClasses),D("display",i.displayStyle))},standalone:!0,features:[q],attrs:Tt,decls:5,vars:5,consts:[["type","button","class","toast-close-button","aria-label","Close",3,"click",4,"ngIf"],[3,"class",4,"ngIf"],["role","alert",3,"class","innerHTML",4,"ngIf"],["role","alert",3,"class",4,"ngIf"],[4,"ngIf"],["type","button","aria-label","Close",1,"toast-close-button",3,"click"],["aria-hidden","true"],["role","alert",3,"innerHTML"],["role","alert"],[1,"toast-progress"]],template:function(t,i){t&1&&A(0,Et,3,0,"button",0)(1,Nt,3,5,"div",1)(2,jt,1,3,"div",2)(3,St,2,4,"div",3)(4,Bt,2,2,"div",4),t&2&&(r("ngIf",i.options.closeButton),a(1),r("ngIf",i.title),a(1),r("ngIf",i.message&&i.options.enableHtml),a(1),r("ngIf",i.message&&!i.options.enableHtml),a(1),r("ngIf",i.options.progressBar))},dependencies:[Y],encapsulation:2})}return s})(),oe=y(d({},_t),{toastComponent:Zt});var ue=(()=>{let n=class n{constructor(t,i){this.http=t,this.toastr=i}get(t){return this.http.get(t).pipe(rt(i=>{let o=this.errorMessageHandling(i);return this.toastr.error(o.message!=""?o.message:"An unknown error has occured!",o.header),ot}))}post(t,i,o={},h=1e5){return new nt(l=>{this.http.post(t,i,o).pipe(at(h)).subscribe({next:c=>{l.next(c),l.complete()},error:c=>{if(c.status==200)l.next(c.error.text),l.complete();else{if(!this.unauthorizedErrorHandling(c)&&!Array.isArray(c?.error?.Message)){let m=this.errorMessageHandling(c);this.toastr.error(m.message!=""?m.message:"An unknown error has occured!",m.header,{enableHtml:!0})}l.error(c)}}})})}unauthorizedErrorHandling(t){let i=!1;return t.status==401&&(localStorage.getItem("Token")?window.location.href="/A/Unauthorized/Main/Unauthorized":window.location.href="/",i=!0),i}errorMessageHandling(t){let i="API Error",o="Exception Message";return t.error?(i="API Error - "+t.status,t.error.Message&&(t.error.Message.indexOf("Message")!=-1?o=JSON.parse(t.error.Message).Message:o=t.error.Message)):t.message&&(i="API Error - "+t.name,o=t.message),{header:i,message:o}}};n.\u0275fac=function(i){return new(i||n)(f(ft),f(S))},n.\u0275prov=I({token:n,factory:n.\u0275fac,providedIn:"root"});let s=n;return s})();export{x as a,S as b,Pt as c,ne as d,ue as e};
@@ -1 +1 @@
1
- import{C as B,J as k,W as U,X as Q}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.0/Marketplace/chunk-LKSBRXCX.js";import{a as X}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.0/Marketplace/chunk-PQGHN52M.js";import{$ as u,Aa as L,Ea as m,Fa as o,Fb as q,Gb as N,Ha as T,Ia as g,Ib as V,La as z,Ma as w,Na as b,Pa as p,Qa as A,Qb as n,Rb as G,Ta as M,Ua as x,Y as y,Ya as s,Za as r,_a as l,aa as I,da as C,db as S,ea as f,gb as v,jb as F,ka as D,kb as j,na as E,nb as O,sb as P,ua as R}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.0/Marketplace/chunk-FWCMOK42.js";var Z=["switch"];function J(d,c){d&1&&(s(0,"div",12),D(),s(1,"svg",13),l(2,"path",14),r(),s(3,"svg",15),l(4,"path",16),r()())}var K=["*"],W=new I("mat-slide-toggle-default-options",{providedIn:"root",factory:()=>({disableToggleValue:!1,hideIcon:!1})}),ee={provide:X,useExisting:y(()=>ce),multi:!0},_=class{constructor(c,H){this.source=c,this.checked=H}},te=0,ce=(()=>{let c=class c{_createChangeEvent(t){return new _(this,t)}get buttonId(){return`${this.id||this._uniqueId}-button`}focus(){this._switchElement.nativeElement.focus()}get checked(){return this._checked}set checked(t){this._checked=t,this._changeDetectorRef.markForCheck()}get inputId(){return`${this.id||this._uniqueId}-input`}constructor(t,i,e,a,h,Y){this._elementRef=t,this._focusMonitor=i,this._changeDetectorRef=e,this.defaults=h,this._onChange=ie=>{},this._onTouched=()=>{},this._checked=!1,this.name=null,this.labelPosition="after",this.ariaLabel=null,this.ariaLabelledby=null,this.disabled=!1,this.disableRipple=!1,this.tabIndex=0,this.change=new g,this.toggleChange=new g,this.tabIndex=parseInt(a)||0,this.color=h.color||"accent",this._noopAnimations=Y==="NoopAnimations",this.id=this._uniqueId=`mat-mdc-slide-toggle-${++te}`,this.hideIcon=h.hideIcon??!1,this._labelId=this._uniqueId+"-label"}ngAfterContentInit(){this._focusMonitor.monitor(this._elementRef,!0).subscribe(t=>{t==="keyboard"||t==="program"?(this._focused=!0,this._changeDetectorRef.markForCheck()):t||Promise.resolve().then(()=>{this._focused=!1,this._onTouched(),this._changeDetectorRef.markForCheck()})})}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef)}writeValue(t){this.checked=!!t}registerOnChange(t){this._onChange=t}registerOnTouched(t){this._onTouched=t}setDisabledState(t){this.disabled=t,this._changeDetectorRef.markForCheck()}toggle(){this.checked=!this.checked,this._onChange(this.checked)}_emitChangeEvent(){this._onChange(this.checked),this.change.emit(this._createChangeEvent(this.checked))}_handleClick(){this.toggleChange.emit(),this.defaults.disableToggleValue||(this.checked=!this.checked,this._onChange(this.checked),this.change.emit(new _(this,this.checked)))}_getAriaLabelledBy(){return this.ariaLabelledby?this.ariaLabelledby:this.ariaLabel?null:this._labelId}};c.\u0275fac=function(i){return new(i||c)(o(L),o(B),o(T),E("tabindex"),o(W),o(R,8))},c.\u0275cmp=C({type:c,selectors:[["mat-slide-toggle"]],viewQuery:function(i,e){if(i&1&&N(Z,5),i&2){let a;q(a=V())&&(e._switchElement=a.first)}},hostAttrs:[1,"mat-mdc-slide-toggle"],hostVars:13,hostBindings:function(i,e){i&2&&(S("id",e.id),w("tabindex",null)("aria-label",null)("name",null)("aria-labelledby",null),A(e.color?"mat-"+e.color:""),p("mat-mdc-slide-toggle-focused",e._focused)("mat-mdc-slide-toggle-checked",e.checked)("_mat-animation-noopable",e._noopAnimations))},inputs:{disabled:["disabled","disabled",n],disableRipple:["disableRipple","disableRipple",n],color:"color",tabIndex:["tabIndex","tabIndex",t=>t==null?0:G(t)],name:"name",id:"id",labelPosition:"labelPosition",ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],ariaDescribedby:["aria-describedby","ariaDescribedby"],required:["required","required",n],checked:["checked","checked",n],hideIcon:["hideIcon","hideIcon",n]},outputs:{change:"change",toggleChange:"toggleChange"},exportAs:["matSlideToggle"],features:[P([ee]),z],ngContentSelectors:K,decls:13,vars:25,consts:[[1,"mdc-form-field"],["role","switch","type","button",1,"mdc-switch",3,"tabIndex","disabled","click"],["switch",""],[1,"mdc-switch__track"],[1,"mdc-switch__handle-track"],[1,"mdc-switch__handle"],[1,"mdc-switch__shadow"],[1,"mdc-elevation-overlay"],[1,"mdc-switch__ripple"],["mat-ripple","",1,"mat-mdc-slide-toggle-ripple","mat-mdc-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleCentered"],["class","mdc-switch__icons"],[1,"mdc-label",3,"for","click"],[1,"mdc-switch__icons"],["viewBox","0 0 24 24","aria-hidden","true",1,"mdc-switch__icon","mdc-switch__icon--on"],["d","M19.69,5.23L8.96,15.96l-4.23-4.23L2.96,13.5l6,6L21.46,7L19.69,5.23z"],["viewBox","0 0 24 24","aria-hidden","true",1,"mdc-switch__icon","mdc-switch__icon--off"],["d","M20 13H4v-2h16v2z"]],template:function(i,e){if(i&1&&(F(),s(0,"div",0)(1,"button",1,2),v("click",function(){return e._handleClick()}),l(3,"div",3),s(4,"div",4)(5,"div",5)(6,"div",6),l(7,"div",7),r(),s(8,"div",8),l(9,"div",9),r(),M(10,J,5,0,"div",10),r()()(),s(11,"label",11),v("click",function(h){return h.stopPropagation()}),j(12),r()()),i&2){let a=O(2);p("mdc-form-field--align-end",e.labelPosition=="before"),m(1),p("mdc-switch--selected",e.checked)("mdc-switch--unselected",!e.checked)("mdc-switch--checked",e.checked)("mdc-switch--disabled",e.disabled),b("tabIndex",e.disabled?-1:e.tabIndex)("disabled",e.disabled),w("id",e.buttonId)("name",e.name)("aria-label",e.ariaLabel)("aria-labelledby",e._getAriaLabelledBy())("aria-describedby",e.ariaDescribedby)("aria-required",e.required||null)("aria-checked",e.checked),m(8),b("matRippleTrigger",a)("matRippleDisabled",e.disableRipple||e.disabled)("matRippleCentered",!0),m(1),x(10,e.hideIcon?-1:10),m(1),b("for",e.buttonId),w("id",e._labelId)}},dependencies:[U],styles:['.mdc-form-field{display:inline-flex;align-items:center;vertical-align:middle}.mdc-form-field[hidden]{display:none}.mdc-form-field>label{margin-left:0;margin-right:auto;padding-left:4px;padding-right:0;order:0}[dir=rtl] .mdc-form-field>label,.mdc-form-field>label[dir=rtl]{margin-left:auto;margin-right:0}[dir=rtl] .mdc-form-field>label,.mdc-form-field>label[dir=rtl]{padding-left:0;padding-right:4px}.mdc-form-field--nowrap>label{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.mdc-form-field--align-end>label{margin-left:auto;margin-right:0;padding-left:0;padding-right:4px;order:-1}[dir=rtl] .mdc-form-field--align-end>label,.mdc-form-field--align-end>label[dir=rtl]{margin-left:0;margin-right:auto}[dir=rtl] .mdc-form-field--align-end>label,.mdc-form-field--align-end>label[dir=rtl]{padding-left:4px;padding-right:0}.mdc-form-field--space-between{justify-content:space-between}.mdc-form-field--space-between>label{margin:0}[dir=rtl] .mdc-form-field--space-between>label,.mdc-form-field--space-between>label[dir=rtl]{margin:0}.mdc-elevation-overlay{position:absolute;border-radius:inherit;pointer-events:none;opacity:var(--mdc-elevation-overlay-opacity);transition:opacity 280ms cubic-bezier(0.4, 0, 0.2, 1);background-color:var(--mdc-elevation-overlay-color)}.mdc-switch{align-items:center;background:none;border:none;cursor:pointer;display:inline-flex;flex-shrink:0;margin:0;outline:none;overflow:visible;padding:0;position:relative}.mdc-switch[hidden]{display:none}.mdc-switch:disabled{cursor:default;pointer-events:none}.mdc-switch__track{overflow:hidden;position:relative;width:100%}.mdc-switch__track::before,.mdc-switch__track::after{border:1px solid rgba(0,0,0,0);border-radius:inherit;box-sizing:border-box;content:"";height:100%;left:0;position:absolute;width:100%}@media screen and (forced-colors: active){.mdc-switch__track::before,.mdc-switch__track::after{border-color:currentColor}}.mdc-switch__track::before{transition:transform 75ms 0ms cubic-bezier(0, 0, 0.2, 1);transform:translateX(0)}.mdc-switch__track::after{transition:transform 75ms 0ms cubic-bezier(0.4, 0, 0.6, 1);transform:translateX(-100%)}[dir=rtl] .mdc-switch__track::after,.mdc-switch__track[dir=rtl]::after{transform:translateX(100%)}.mdc-switch--selected .mdc-switch__track::before{transition:transform 75ms 0ms cubic-bezier(0.4, 0, 0.6, 1);transform:translateX(100%)}[dir=rtl] .mdc-switch--selected .mdc-switch__track::before,.mdc-switch--selected .mdc-switch__track[dir=rtl]::before{transform:translateX(-100%)}.mdc-switch--selected .mdc-switch__track::after{transition:transform 75ms 0ms cubic-bezier(0, 0, 0.2, 1);transform:translateX(0)}.mdc-switch__handle-track{height:100%;pointer-events:none;position:absolute;top:0;transition:transform 75ms 0ms cubic-bezier(0.4, 0, 0.2, 1);left:0;right:auto;transform:translateX(0)}[dir=rtl] .mdc-switch__handle-track,.mdc-switch__handle-track[dir=rtl]{left:auto;right:0}.mdc-switch--selected .mdc-switch__handle-track{transform:translateX(100%)}[dir=rtl] .mdc-switch--selected .mdc-switch__handle-track,.mdc-switch--selected .mdc-switch__handle-track[dir=rtl]{transform:translateX(-100%)}.mdc-switch__handle{display:flex;pointer-events:auto;position:absolute;top:50%;transform:translateY(-50%);left:0;right:auto}[dir=rtl] .mdc-switch__handle,.mdc-switch__handle[dir=rtl]{left:auto;right:0}.mdc-switch__handle::before,.mdc-switch__handle::after{border:1px solid rgba(0,0,0,0);border-radius:inherit;box-sizing:border-box;content:"";width:100%;height:100%;left:0;position:absolute;top:0;transition:background-color 75ms 0ms cubic-bezier(0.4, 0, 0.2, 1),border-color 75ms 0ms cubic-bezier(0.4, 0, 0.2, 1);z-index:-1}@media screen and (forced-colors: active){.mdc-switch__handle::before,.mdc-switch__handle::after{border-color:currentColor}}.mdc-switch__shadow{border-radius:inherit;bottom:0;left:0;position:absolute;right:0;top:0}.mdc-elevation-overlay{bottom:0;left:0;right:0;top:0}.mdc-switch__ripple{left:50%;position:absolute;top:50%;transform:translate(-50%, -50%);z-index:-1}.mdc-switch:disabled .mdc-switch__ripple{display:none}.mdc-switch__icons{height:100%;position:relative;width:100%;z-index:1}.mdc-switch__icon{bottom:0;left:0;margin:auto;position:absolute;right:0;top:0;opacity:0;transition:opacity 30ms 0ms cubic-bezier(0.4, 0, 1, 1)}.mdc-switch--selected .mdc-switch__icon--on,.mdc-switch--unselected .mdc-switch__icon--off{opacity:1;transition:opacity 45ms 30ms cubic-bezier(0, 0, 0.2, 1)}.mdc-switch{width:var(--mdc-switch-track-width)}.mdc-switch.mdc-switch--selected:enabled .mdc-switch__handle::after{background:var(--mdc-switch-selected-handle-color)}.mdc-switch.mdc-switch--selected:enabled:hover:not(:focus):not(:active) .mdc-switch__handle::after{background:var(--mdc-switch-selected-hover-handle-color)}.mdc-switch.mdc-switch--selected:enabled:focus:not(:active) .mdc-switch__handle::after{background:var(--mdc-switch-selected-focus-handle-color)}.mdc-switch.mdc-switch--selected:enabled:active .mdc-switch__handle::after{background:var(--mdc-switch-selected-pressed-handle-color)}.mdc-switch.mdc-switch--selected:disabled .mdc-switch__handle::after{background:var(--mdc-switch-disabled-selected-handle-color)}.mdc-switch.mdc-switch--unselected:enabled .mdc-switch__handle::after{background:var(--mdc-switch-unselected-handle-color)}.mdc-switch.mdc-switch--unselected:enabled:hover:not(:focus):not(:active) .mdc-switch__handle::after{background:var(--mdc-switch-unselected-hover-handle-color)}.mdc-switch.mdc-switch--unselected:enabled:focus:not(:active) .mdc-switch__handle::after{background:var(--mdc-switch-unselected-focus-handle-color)}.mdc-switch.mdc-switch--unselected:enabled:active .mdc-switch__handle::after{background:var(--mdc-switch-unselected-pressed-handle-color)}.mdc-switch.mdc-switch--unselected:disabled .mdc-switch__handle::after{background:var(--mdc-switch-disabled-unselected-handle-color)}.mdc-switch .mdc-switch__handle::before{background:var(--mdc-switch-handle-surface-color)}.mdc-switch:enabled .mdc-switch__shadow{box-shadow:var(--mdc-switch-handle-elevation)}.mdc-switch:disabled .mdc-switch__shadow{box-shadow:var(--mdc-switch-disabled-handle-elevation)}.mdc-switch .mdc-switch__focus-ring-wrapper,.mdc-switch .mdc-switch__handle{height:var(--mdc-switch-handle-height)}.mdc-switch:disabled .mdc-switch__handle::after{opacity:var(--mdc-switch-disabled-handle-opacity)}.mdc-switch .mdc-switch__handle{border-radius:var(--mdc-switch-handle-shape)}.mdc-switch .mdc-switch__handle{width:var(--mdc-switch-handle-width)}.mdc-switch .mdc-switch__handle-track{width:calc(100% - var(--mdc-switch-handle-width))}.mdc-switch.mdc-switch--selected:enabled .mdc-switch__icon{fill:var(--mdc-switch-selected-icon-color)}.mdc-switch.mdc-switch--selected:disabled .mdc-switch__icon{fill:var(--mdc-switch-disabled-selected-icon-color)}.mdc-switch.mdc-switch--unselected:enabled .mdc-switch__icon{fill:var(--mdc-switch-unselected-icon-color)}.mdc-switch.mdc-switch--unselected:disabled .mdc-switch__icon{fill:var(--mdc-switch-disabled-unselected-icon-color)}.mdc-switch.mdc-switch--selected:disabled .mdc-switch__icons{opacity:var(--mdc-switch-disabled-selected-icon-opacity)}.mdc-switch.mdc-switch--unselected:disabled .mdc-switch__icons{opacity:var(--mdc-switch-disabled-unselected-icon-opacity)}.mdc-switch.mdc-switch--selected .mdc-switch__icon{width:var(--mdc-switch-selected-icon-size);height:var(--mdc-switch-selected-icon-size)}.mdc-switch.mdc-switch--unselected .mdc-switch__icon{width:var(--mdc-switch-unselected-icon-size);height:var(--mdc-switch-unselected-icon-size)}.mdc-switch.mdc-switch--selected:enabled:hover:not(:focus) .mdc-switch__ripple::before,.mdc-switch.mdc-switch--selected:enabled:hover:not(:focus) .mdc-switch__ripple::after{background-color:var(--mdc-switch-selected-hover-state-layer-color)}.mdc-switch.mdc-switch--selected:enabled:focus .mdc-switch__ripple::before,.mdc-switch.mdc-switch--selected:enabled:focus .mdc-switch__ripple::after{background-color:var(--mdc-switch-selected-focus-state-layer-color)}.mdc-switch.mdc-switch--selected:enabled:active .mdc-switch__ripple::before,.mdc-switch.mdc-switch--selected:enabled:active .mdc-switch__ripple::after{background-color:var(--mdc-switch-selected-pressed-state-layer-color)}.mdc-switch.mdc-switch--unselected:enabled:hover:not(:focus) .mdc-switch__ripple::before,.mdc-switch.mdc-switch--unselected:enabled:hover:not(:focus) .mdc-switch__ripple::after{background-color:var(--mdc-switch-unselected-hover-state-layer-color)}.mdc-switch.mdc-switch--unselected:enabled:focus .mdc-switch__ripple::before,.mdc-switch.mdc-switch--unselected:enabled:focus .mdc-switch__ripple::after{background-color:var(--mdc-switch-unselected-focus-state-layer-color)}.mdc-switch.mdc-switch--unselected:enabled:active .mdc-switch__ripple::before,.mdc-switch.mdc-switch--unselected:enabled:active .mdc-switch__ripple::after{background-color:var(--mdc-switch-unselected-pressed-state-layer-color)}.mdc-switch.mdc-switch--selected:enabled:hover:not(:focus):hover .mdc-switch__ripple::before,.mdc-switch.mdc-switch--selected:enabled:hover:not(:focus).mdc-ripple-surface--hover .mdc-switch__ripple::before{opacity:var(--mdc-switch-selected-hover-state-layer-opacity)}.mdc-switch.mdc-switch--selected:enabled:focus.mdc-ripple-upgraded--background-focused .mdc-switch__ripple::before,.mdc-switch.mdc-switch--selected:enabled:focus:not(.mdc-ripple-upgraded):focus .mdc-switch__ripple::before{transition-duration:75ms;opacity:var(--mdc-switch-selected-focus-state-layer-opacity)}.mdc-switch.mdc-switch--selected:enabled:active:not(.mdc-ripple-upgraded) .mdc-switch__ripple::after{transition:opacity 150ms linear}.mdc-switch.mdc-switch--selected:enabled:active:not(.mdc-ripple-upgraded):active .mdc-switch__ripple::after{transition-duration:75ms;opacity:var(--mdc-switch-selected-pressed-state-layer-opacity)}.mdc-switch.mdc-switch--selected:enabled:active.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-switch-selected-pressed-state-layer-opacity)}.mdc-switch.mdc-switch--unselected:enabled:hover:not(:focus):hover .mdc-switch__ripple::before,.mdc-switch.mdc-switch--unselected:enabled:hover:not(:focus).mdc-ripple-surface--hover .mdc-switch__ripple::before{opacity:var(--mdc-switch-unselected-hover-state-layer-opacity)}.mdc-switch.mdc-switch--unselected:enabled:focus.mdc-ripple-upgraded--background-focused .mdc-switch__ripple::before,.mdc-switch.mdc-switch--unselected:enabled:focus:not(.mdc-ripple-upgraded):focus .mdc-switch__ripple::before{transition-duration:75ms;opacity:var(--mdc-switch-unselected-focus-state-layer-opacity)}.mdc-switch.mdc-switch--unselected:enabled:active:not(.mdc-ripple-upgraded) .mdc-switch__ripple::after{transition:opacity 150ms linear}.mdc-switch.mdc-switch--unselected:enabled:active:not(.mdc-ripple-upgraded):active .mdc-switch__ripple::after{transition-duration:75ms;opacity:var(--mdc-switch-unselected-pressed-state-layer-opacity)}.mdc-switch.mdc-switch--unselected:enabled:active.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-switch-unselected-pressed-state-layer-opacity)}.mdc-switch .mdc-switch__ripple{height:var(--mdc-switch-state-layer-size);width:var(--mdc-switch-state-layer-size)}.mdc-switch .mdc-switch__track{height:var(--mdc-switch-track-height)}.mdc-switch:disabled .mdc-switch__track{opacity:var(--mdc-switch-disabled-track-opacity)}.mdc-switch:enabled .mdc-switch__track::after{background:var(--mdc-switch-selected-track-color)}.mdc-switch:enabled:hover:not(:focus):not(:active) .mdc-switch__track::after{background:var(--mdc-switch-selected-hover-track-color)}.mdc-switch:enabled:focus:not(:active) .mdc-switch__track::after{background:var(--mdc-switch-selected-focus-track-color)}.mdc-switch:enabled:active .mdc-switch__track::after{background:var(--mdc-switch-selected-pressed-track-color)}.mdc-switch:disabled .mdc-switch__track::after{background:var(--mdc-switch-disabled-selected-track-color)}.mdc-switch:enabled .mdc-switch__track::before{background:var(--mdc-switch-unselected-track-color)}.mdc-switch:enabled:hover:not(:focus):not(:active) .mdc-switch__track::before{background:var(--mdc-switch-unselected-hover-track-color)}.mdc-switch:enabled:focus:not(:active) .mdc-switch__track::before{background:var(--mdc-switch-unselected-focus-track-color)}.mdc-switch:enabled:active .mdc-switch__track::before{background:var(--mdc-switch-unselected-pressed-track-color)}.mdc-switch:disabled .mdc-switch__track::before{background:var(--mdc-switch-disabled-unselected-track-color)}.mdc-switch .mdc-switch__track{border-radius:var(--mdc-switch-track-shape)}.mdc-switch:enabled .mdc-switch__shadow{box-shadow:var(--mdc-switch-handle-elevation-shadow)}.mdc-switch:disabled .mdc-switch__shadow{box-shadow:var(--mdc-switch-disabled-handle-elevation-shadow)}.mat-mdc-slide-toggle .mdc-label{font-family:var(--mat-slide-toggle-label-text-font);font-size:var(--mat-slide-toggle-label-text-size);letter-spacing:var(--mat-slide-toggle-label-text-tracking);line-height:var(--mat-slide-toggle-label-text-line-height);font-weight:var(--mat-slide-toggle-label-text-weight)}.mat-mdc-slide-toggle{display:inline-block;-webkit-tap-highlight-color:rgba(0,0,0,0);outline:0}.mat-mdc-slide-toggle .mat-mdc-slide-toggle-ripple,.mat-mdc-slide-toggle .mdc-switch__ripple::after{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:50%;pointer-events:none}.mat-mdc-slide-toggle .mat-mdc-slide-toggle-ripple:not(:empty),.mat-mdc-slide-toggle .mdc-switch__ripple::after:not(:empty){transform:translateZ(0)}.mat-mdc-slide-toggle .mdc-switch__ripple::after{content:"";opacity:0}.mat-mdc-slide-toggle .mdc-switch:hover .mdc-switch__ripple::after{opacity:.04;transition:opacity 75ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-slide-toggle.mat-mdc-slide-toggle-focused .mdc-switch .mdc-switch__ripple::after{opacity:.12}.mat-mdc-slide-toggle.mat-mdc-slide-toggle-focused .mat-mdc-focus-indicator::before{content:""}.mat-mdc-slide-toggle .mat-ripple-element{opacity:.12}.mat-mdc-slide-toggle .mat-mdc-focus-indicator::before{border-radius:50%}.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__handle-track,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-elevation-overlay,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__icon,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__handle::before,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__handle::after,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__track::before,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__track::after{transition:none}.mat-mdc-slide-toggle .mdc-switch:enabled+.mdc-label{cursor:pointer}'],encapsulation:2,changeDetection:0});let d=c;return d})();var $=(()=>{let c=class c{};c.\u0275fac=function(i){return new(i||c)},c.\u0275mod=f({type:c}),c.\u0275inj=u({});let d=c;return d})(),Re=(()=>{let c=class c{};c.\u0275fac=function(i){return new(i||c)},c.\u0275mod=f({type:c}),c.\u0275inj=u({imports:[$,k,Q,$,k]});let d=c;return d})();export{ce as a,Re as b};
1
+ import{C as B,J as k,W as U,X as Q}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.2/Marketplace/chunk-CNK2ETMZ.js";import{a as X}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.2/Marketplace/chunk-OGA3XTQE.js";import{$ as u,Aa as L,Ea as m,Fa as o,Fb as q,Gb as N,Ha as T,Ia as g,Ib as V,La as z,Ma as w,Na as b,Pa as p,Qa as A,Qb as n,Rb as G,Ta as M,Ua as x,Y as y,Ya as s,Za as r,_a as l,aa as I,da as C,db as S,ea as f,gb as v,jb as F,ka as D,kb as j,na as E,nb as O,sb as P,ua as R}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.2/Marketplace/chunk-WGNBD2TG.js";var Z=["switch"];function J(d,c){d&1&&(s(0,"div",12),D(),s(1,"svg",13),l(2,"path",14),r(),s(3,"svg",15),l(4,"path",16),r()())}var K=["*"],W=new I("mat-slide-toggle-default-options",{providedIn:"root",factory:()=>({disableToggleValue:!1,hideIcon:!1})}),ee={provide:X,useExisting:y(()=>ce),multi:!0},_=class{constructor(c,H){this.source=c,this.checked=H}},te=0,ce=(()=>{let c=class c{_createChangeEvent(t){return new _(this,t)}get buttonId(){return`${this.id||this._uniqueId}-button`}focus(){this._switchElement.nativeElement.focus()}get checked(){return this._checked}set checked(t){this._checked=t,this._changeDetectorRef.markForCheck()}get inputId(){return`${this.id||this._uniqueId}-input`}constructor(t,i,e,a,h,Y){this._elementRef=t,this._focusMonitor=i,this._changeDetectorRef=e,this.defaults=h,this._onChange=ie=>{},this._onTouched=()=>{},this._checked=!1,this.name=null,this.labelPosition="after",this.ariaLabel=null,this.ariaLabelledby=null,this.disabled=!1,this.disableRipple=!1,this.tabIndex=0,this.change=new g,this.toggleChange=new g,this.tabIndex=parseInt(a)||0,this.color=h.color||"accent",this._noopAnimations=Y==="NoopAnimations",this.id=this._uniqueId=`mat-mdc-slide-toggle-${++te}`,this.hideIcon=h.hideIcon??!1,this._labelId=this._uniqueId+"-label"}ngAfterContentInit(){this._focusMonitor.monitor(this._elementRef,!0).subscribe(t=>{t==="keyboard"||t==="program"?(this._focused=!0,this._changeDetectorRef.markForCheck()):t||Promise.resolve().then(()=>{this._focused=!1,this._onTouched(),this._changeDetectorRef.markForCheck()})})}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef)}writeValue(t){this.checked=!!t}registerOnChange(t){this._onChange=t}registerOnTouched(t){this._onTouched=t}setDisabledState(t){this.disabled=t,this._changeDetectorRef.markForCheck()}toggle(){this.checked=!this.checked,this._onChange(this.checked)}_emitChangeEvent(){this._onChange(this.checked),this.change.emit(this._createChangeEvent(this.checked))}_handleClick(){this.toggleChange.emit(),this.defaults.disableToggleValue||(this.checked=!this.checked,this._onChange(this.checked),this.change.emit(new _(this,this.checked)))}_getAriaLabelledBy(){return this.ariaLabelledby?this.ariaLabelledby:this.ariaLabel?null:this._labelId}};c.\u0275fac=function(i){return new(i||c)(o(L),o(B),o(T),E("tabindex"),o(W),o(R,8))},c.\u0275cmp=C({type:c,selectors:[["mat-slide-toggle"]],viewQuery:function(i,e){if(i&1&&N(Z,5),i&2){let a;q(a=V())&&(e._switchElement=a.first)}},hostAttrs:[1,"mat-mdc-slide-toggle"],hostVars:13,hostBindings:function(i,e){i&2&&(S("id",e.id),w("tabindex",null)("aria-label",null)("name",null)("aria-labelledby",null),A(e.color?"mat-"+e.color:""),p("mat-mdc-slide-toggle-focused",e._focused)("mat-mdc-slide-toggle-checked",e.checked)("_mat-animation-noopable",e._noopAnimations))},inputs:{disabled:["disabled","disabled",n],disableRipple:["disableRipple","disableRipple",n],color:"color",tabIndex:["tabIndex","tabIndex",t=>t==null?0:G(t)],name:"name",id:"id",labelPosition:"labelPosition",ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],ariaDescribedby:["aria-describedby","ariaDescribedby"],required:["required","required",n],checked:["checked","checked",n],hideIcon:["hideIcon","hideIcon",n]},outputs:{change:"change",toggleChange:"toggleChange"},exportAs:["matSlideToggle"],features:[P([ee]),z],ngContentSelectors:K,decls:13,vars:25,consts:[[1,"mdc-form-field"],["role","switch","type","button",1,"mdc-switch",3,"tabIndex","disabled","click"],["switch",""],[1,"mdc-switch__track"],[1,"mdc-switch__handle-track"],[1,"mdc-switch__handle"],[1,"mdc-switch__shadow"],[1,"mdc-elevation-overlay"],[1,"mdc-switch__ripple"],["mat-ripple","",1,"mat-mdc-slide-toggle-ripple","mat-mdc-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleCentered"],["class","mdc-switch__icons"],[1,"mdc-label",3,"for","click"],[1,"mdc-switch__icons"],["viewBox","0 0 24 24","aria-hidden","true",1,"mdc-switch__icon","mdc-switch__icon--on"],["d","M19.69,5.23L8.96,15.96l-4.23-4.23L2.96,13.5l6,6L21.46,7L19.69,5.23z"],["viewBox","0 0 24 24","aria-hidden","true",1,"mdc-switch__icon","mdc-switch__icon--off"],["d","M20 13H4v-2h16v2z"]],template:function(i,e){if(i&1&&(F(),s(0,"div",0)(1,"button",1,2),v("click",function(){return e._handleClick()}),l(3,"div",3),s(4,"div",4)(5,"div",5)(6,"div",6),l(7,"div",7),r(),s(8,"div",8),l(9,"div",9),r(),M(10,J,5,0,"div",10),r()()(),s(11,"label",11),v("click",function(h){return h.stopPropagation()}),j(12),r()()),i&2){let a=O(2);p("mdc-form-field--align-end",e.labelPosition=="before"),m(1),p("mdc-switch--selected",e.checked)("mdc-switch--unselected",!e.checked)("mdc-switch--checked",e.checked)("mdc-switch--disabled",e.disabled),b("tabIndex",e.disabled?-1:e.tabIndex)("disabled",e.disabled),w("id",e.buttonId)("name",e.name)("aria-label",e.ariaLabel)("aria-labelledby",e._getAriaLabelledBy())("aria-describedby",e.ariaDescribedby)("aria-required",e.required||null)("aria-checked",e.checked),m(8),b("matRippleTrigger",a)("matRippleDisabled",e.disableRipple||e.disabled)("matRippleCentered",!0),m(1),x(10,e.hideIcon?-1:10),m(1),b("for",e.buttonId),w("id",e._labelId)}},dependencies:[U],styles:['.mdc-form-field{display:inline-flex;align-items:center;vertical-align:middle}.mdc-form-field[hidden]{display:none}.mdc-form-field>label{margin-left:0;margin-right:auto;padding-left:4px;padding-right:0;order:0}[dir=rtl] .mdc-form-field>label,.mdc-form-field>label[dir=rtl]{margin-left:auto;margin-right:0}[dir=rtl] .mdc-form-field>label,.mdc-form-field>label[dir=rtl]{padding-left:0;padding-right:4px}.mdc-form-field--nowrap>label{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.mdc-form-field--align-end>label{margin-left:auto;margin-right:0;padding-left:0;padding-right:4px;order:-1}[dir=rtl] .mdc-form-field--align-end>label,.mdc-form-field--align-end>label[dir=rtl]{margin-left:0;margin-right:auto}[dir=rtl] .mdc-form-field--align-end>label,.mdc-form-field--align-end>label[dir=rtl]{padding-left:4px;padding-right:0}.mdc-form-field--space-between{justify-content:space-between}.mdc-form-field--space-between>label{margin:0}[dir=rtl] .mdc-form-field--space-between>label,.mdc-form-field--space-between>label[dir=rtl]{margin:0}.mdc-elevation-overlay{position:absolute;border-radius:inherit;pointer-events:none;opacity:var(--mdc-elevation-overlay-opacity);transition:opacity 280ms cubic-bezier(0.4, 0, 0.2, 1);background-color:var(--mdc-elevation-overlay-color)}.mdc-switch{align-items:center;background:none;border:none;cursor:pointer;display:inline-flex;flex-shrink:0;margin:0;outline:none;overflow:visible;padding:0;position:relative}.mdc-switch[hidden]{display:none}.mdc-switch:disabled{cursor:default;pointer-events:none}.mdc-switch__track{overflow:hidden;position:relative;width:100%}.mdc-switch__track::before,.mdc-switch__track::after{border:1px solid rgba(0,0,0,0);border-radius:inherit;box-sizing:border-box;content:"";height:100%;left:0;position:absolute;width:100%}@media screen and (forced-colors: active){.mdc-switch__track::before,.mdc-switch__track::after{border-color:currentColor}}.mdc-switch__track::before{transition:transform 75ms 0ms cubic-bezier(0, 0, 0.2, 1);transform:translateX(0)}.mdc-switch__track::after{transition:transform 75ms 0ms cubic-bezier(0.4, 0, 0.6, 1);transform:translateX(-100%)}[dir=rtl] .mdc-switch__track::after,.mdc-switch__track[dir=rtl]::after{transform:translateX(100%)}.mdc-switch--selected .mdc-switch__track::before{transition:transform 75ms 0ms cubic-bezier(0.4, 0, 0.6, 1);transform:translateX(100%)}[dir=rtl] .mdc-switch--selected .mdc-switch__track::before,.mdc-switch--selected .mdc-switch__track[dir=rtl]::before{transform:translateX(-100%)}.mdc-switch--selected .mdc-switch__track::after{transition:transform 75ms 0ms cubic-bezier(0, 0, 0.2, 1);transform:translateX(0)}.mdc-switch__handle-track{height:100%;pointer-events:none;position:absolute;top:0;transition:transform 75ms 0ms cubic-bezier(0.4, 0, 0.2, 1);left:0;right:auto;transform:translateX(0)}[dir=rtl] .mdc-switch__handle-track,.mdc-switch__handle-track[dir=rtl]{left:auto;right:0}.mdc-switch--selected .mdc-switch__handle-track{transform:translateX(100%)}[dir=rtl] .mdc-switch--selected .mdc-switch__handle-track,.mdc-switch--selected .mdc-switch__handle-track[dir=rtl]{transform:translateX(-100%)}.mdc-switch__handle{display:flex;pointer-events:auto;position:absolute;top:50%;transform:translateY(-50%);left:0;right:auto}[dir=rtl] .mdc-switch__handle,.mdc-switch__handle[dir=rtl]{left:auto;right:0}.mdc-switch__handle::before,.mdc-switch__handle::after{border:1px solid rgba(0,0,0,0);border-radius:inherit;box-sizing:border-box;content:"";width:100%;height:100%;left:0;position:absolute;top:0;transition:background-color 75ms 0ms cubic-bezier(0.4, 0, 0.2, 1),border-color 75ms 0ms cubic-bezier(0.4, 0, 0.2, 1);z-index:-1}@media screen and (forced-colors: active){.mdc-switch__handle::before,.mdc-switch__handle::after{border-color:currentColor}}.mdc-switch__shadow{border-radius:inherit;bottom:0;left:0;position:absolute;right:0;top:0}.mdc-elevation-overlay{bottom:0;left:0;right:0;top:0}.mdc-switch__ripple{left:50%;position:absolute;top:50%;transform:translate(-50%, -50%);z-index:-1}.mdc-switch:disabled .mdc-switch__ripple{display:none}.mdc-switch__icons{height:100%;position:relative;width:100%;z-index:1}.mdc-switch__icon{bottom:0;left:0;margin:auto;position:absolute;right:0;top:0;opacity:0;transition:opacity 30ms 0ms cubic-bezier(0.4, 0, 1, 1)}.mdc-switch--selected .mdc-switch__icon--on,.mdc-switch--unselected .mdc-switch__icon--off{opacity:1;transition:opacity 45ms 30ms cubic-bezier(0, 0, 0.2, 1)}.mdc-switch{width:var(--mdc-switch-track-width)}.mdc-switch.mdc-switch--selected:enabled .mdc-switch__handle::after{background:var(--mdc-switch-selected-handle-color)}.mdc-switch.mdc-switch--selected:enabled:hover:not(:focus):not(:active) .mdc-switch__handle::after{background:var(--mdc-switch-selected-hover-handle-color)}.mdc-switch.mdc-switch--selected:enabled:focus:not(:active) .mdc-switch__handle::after{background:var(--mdc-switch-selected-focus-handle-color)}.mdc-switch.mdc-switch--selected:enabled:active .mdc-switch__handle::after{background:var(--mdc-switch-selected-pressed-handle-color)}.mdc-switch.mdc-switch--selected:disabled .mdc-switch__handle::after{background:var(--mdc-switch-disabled-selected-handle-color)}.mdc-switch.mdc-switch--unselected:enabled .mdc-switch__handle::after{background:var(--mdc-switch-unselected-handle-color)}.mdc-switch.mdc-switch--unselected:enabled:hover:not(:focus):not(:active) .mdc-switch__handle::after{background:var(--mdc-switch-unselected-hover-handle-color)}.mdc-switch.mdc-switch--unselected:enabled:focus:not(:active) .mdc-switch__handle::after{background:var(--mdc-switch-unselected-focus-handle-color)}.mdc-switch.mdc-switch--unselected:enabled:active .mdc-switch__handle::after{background:var(--mdc-switch-unselected-pressed-handle-color)}.mdc-switch.mdc-switch--unselected:disabled .mdc-switch__handle::after{background:var(--mdc-switch-disabled-unselected-handle-color)}.mdc-switch .mdc-switch__handle::before{background:var(--mdc-switch-handle-surface-color)}.mdc-switch:enabled .mdc-switch__shadow{box-shadow:var(--mdc-switch-handle-elevation)}.mdc-switch:disabled .mdc-switch__shadow{box-shadow:var(--mdc-switch-disabled-handle-elevation)}.mdc-switch .mdc-switch__focus-ring-wrapper,.mdc-switch .mdc-switch__handle{height:var(--mdc-switch-handle-height)}.mdc-switch:disabled .mdc-switch__handle::after{opacity:var(--mdc-switch-disabled-handle-opacity)}.mdc-switch .mdc-switch__handle{border-radius:var(--mdc-switch-handle-shape)}.mdc-switch .mdc-switch__handle{width:var(--mdc-switch-handle-width)}.mdc-switch .mdc-switch__handle-track{width:calc(100% - var(--mdc-switch-handle-width))}.mdc-switch.mdc-switch--selected:enabled .mdc-switch__icon{fill:var(--mdc-switch-selected-icon-color)}.mdc-switch.mdc-switch--selected:disabled .mdc-switch__icon{fill:var(--mdc-switch-disabled-selected-icon-color)}.mdc-switch.mdc-switch--unselected:enabled .mdc-switch__icon{fill:var(--mdc-switch-unselected-icon-color)}.mdc-switch.mdc-switch--unselected:disabled .mdc-switch__icon{fill:var(--mdc-switch-disabled-unselected-icon-color)}.mdc-switch.mdc-switch--selected:disabled .mdc-switch__icons{opacity:var(--mdc-switch-disabled-selected-icon-opacity)}.mdc-switch.mdc-switch--unselected:disabled .mdc-switch__icons{opacity:var(--mdc-switch-disabled-unselected-icon-opacity)}.mdc-switch.mdc-switch--selected .mdc-switch__icon{width:var(--mdc-switch-selected-icon-size);height:var(--mdc-switch-selected-icon-size)}.mdc-switch.mdc-switch--unselected .mdc-switch__icon{width:var(--mdc-switch-unselected-icon-size);height:var(--mdc-switch-unselected-icon-size)}.mdc-switch.mdc-switch--selected:enabled:hover:not(:focus) .mdc-switch__ripple::before,.mdc-switch.mdc-switch--selected:enabled:hover:not(:focus) .mdc-switch__ripple::after{background-color:var(--mdc-switch-selected-hover-state-layer-color)}.mdc-switch.mdc-switch--selected:enabled:focus .mdc-switch__ripple::before,.mdc-switch.mdc-switch--selected:enabled:focus .mdc-switch__ripple::after{background-color:var(--mdc-switch-selected-focus-state-layer-color)}.mdc-switch.mdc-switch--selected:enabled:active .mdc-switch__ripple::before,.mdc-switch.mdc-switch--selected:enabled:active .mdc-switch__ripple::after{background-color:var(--mdc-switch-selected-pressed-state-layer-color)}.mdc-switch.mdc-switch--unselected:enabled:hover:not(:focus) .mdc-switch__ripple::before,.mdc-switch.mdc-switch--unselected:enabled:hover:not(:focus) .mdc-switch__ripple::after{background-color:var(--mdc-switch-unselected-hover-state-layer-color)}.mdc-switch.mdc-switch--unselected:enabled:focus .mdc-switch__ripple::before,.mdc-switch.mdc-switch--unselected:enabled:focus .mdc-switch__ripple::after{background-color:var(--mdc-switch-unselected-focus-state-layer-color)}.mdc-switch.mdc-switch--unselected:enabled:active .mdc-switch__ripple::before,.mdc-switch.mdc-switch--unselected:enabled:active .mdc-switch__ripple::after{background-color:var(--mdc-switch-unselected-pressed-state-layer-color)}.mdc-switch.mdc-switch--selected:enabled:hover:not(:focus):hover .mdc-switch__ripple::before,.mdc-switch.mdc-switch--selected:enabled:hover:not(:focus).mdc-ripple-surface--hover .mdc-switch__ripple::before{opacity:var(--mdc-switch-selected-hover-state-layer-opacity)}.mdc-switch.mdc-switch--selected:enabled:focus.mdc-ripple-upgraded--background-focused .mdc-switch__ripple::before,.mdc-switch.mdc-switch--selected:enabled:focus:not(.mdc-ripple-upgraded):focus .mdc-switch__ripple::before{transition-duration:75ms;opacity:var(--mdc-switch-selected-focus-state-layer-opacity)}.mdc-switch.mdc-switch--selected:enabled:active:not(.mdc-ripple-upgraded) .mdc-switch__ripple::after{transition:opacity 150ms linear}.mdc-switch.mdc-switch--selected:enabled:active:not(.mdc-ripple-upgraded):active .mdc-switch__ripple::after{transition-duration:75ms;opacity:var(--mdc-switch-selected-pressed-state-layer-opacity)}.mdc-switch.mdc-switch--selected:enabled:active.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-switch-selected-pressed-state-layer-opacity)}.mdc-switch.mdc-switch--unselected:enabled:hover:not(:focus):hover .mdc-switch__ripple::before,.mdc-switch.mdc-switch--unselected:enabled:hover:not(:focus).mdc-ripple-surface--hover .mdc-switch__ripple::before{opacity:var(--mdc-switch-unselected-hover-state-layer-opacity)}.mdc-switch.mdc-switch--unselected:enabled:focus.mdc-ripple-upgraded--background-focused .mdc-switch__ripple::before,.mdc-switch.mdc-switch--unselected:enabled:focus:not(.mdc-ripple-upgraded):focus .mdc-switch__ripple::before{transition-duration:75ms;opacity:var(--mdc-switch-unselected-focus-state-layer-opacity)}.mdc-switch.mdc-switch--unselected:enabled:active:not(.mdc-ripple-upgraded) .mdc-switch__ripple::after{transition:opacity 150ms linear}.mdc-switch.mdc-switch--unselected:enabled:active:not(.mdc-ripple-upgraded):active .mdc-switch__ripple::after{transition-duration:75ms;opacity:var(--mdc-switch-unselected-pressed-state-layer-opacity)}.mdc-switch.mdc-switch--unselected:enabled:active.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-switch-unselected-pressed-state-layer-opacity)}.mdc-switch .mdc-switch__ripple{height:var(--mdc-switch-state-layer-size);width:var(--mdc-switch-state-layer-size)}.mdc-switch .mdc-switch__track{height:var(--mdc-switch-track-height)}.mdc-switch:disabled .mdc-switch__track{opacity:var(--mdc-switch-disabled-track-opacity)}.mdc-switch:enabled .mdc-switch__track::after{background:var(--mdc-switch-selected-track-color)}.mdc-switch:enabled:hover:not(:focus):not(:active) .mdc-switch__track::after{background:var(--mdc-switch-selected-hover-track-color)}.mdc-switch:enabled:focus:not(:active) .mdc-switch__track::after{background:var(--mdc-switch-selected-focus-track-color)}.mdc-switch:enabled:active .mdc-switch__track::after{background:var(--mdc-switch-selected-pressed-track-color)}.mdc-switch:disabled .mdc-switch__track::after{background:var(--mdc-switch-disabled-selected-track-color)}.mdc-switch:enabled .mdc-switch__track::before{background:var(--mdc-switch-unselected-track-color)}.mdc-switch:enabled:hover:not(:focus):not(:active) .mdc-switch__track::before{background:var(--mdc-switch-unselected-hover-track-color)}.mdc-switch:enabled:focus:not(:active) .mdc-switch__track::before{background:var(--mdc-switch-unselected-focus-track-color)}.mdc-switch:enabled:active .mdc-switch__track::before{background:var(--mdc-switch-unselected-pressed-track-color)}.mdc-switch:disabled .mdc-switch__track::before{background:var(--mdc-switch-disabled-unselected-track-color)}.mdc-switch .mdc-switch__track{border-radius:var(--mdc-switch-track-shape)}.mdc-switch:enabled .mdc-switch__shadow{box-shadow:var(--mdc-switch-handle-elevation-shadow)}.mdc-switch:disabled .mdc-switch__shadow{box-shadow:var(--mdc-switch-disabled-handle-elevation-shadow)}.mat-mdc-slide-toggle .mdc-label{font-family:var(--mat-slide-toggle-label-text-font);font-size:var(--mat-slide-toggle-label-text-size);letter-spacing:var(--mat-slide-toggle-label-text-tracking);line-height:var(--mat-slide-toggle-label-text-line-height);font-weight:var(--mat-slide-toggle-label-text-weight)}.mat-mdc-slide-toggle{display:inline-block;-webkit-tap-highlight-color:rgba(0,0,0,0);outline:0}.mat-mdc-slide-toggle .mat-mdc-slide-toggle-ripple,.mat-mdc-slide-toggle .mdc-switch__ripple::after{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:50%;pointer-events:none}.mat-mdc-slide-toggle .mat-mdc-slide-toggle-ripple:not(:empty),.mat-mdc-slide-toggle .mdc-switch__ripple::after:not(:empty){transform:translateZ(0)}.mat-mdc-slide-toggle .mdc-switch__ripple::after{content:"";opacity:0}.mat-mdc-slide-toggle .mdc-switch:hover .mdc-switch__ripple::after{opacity:.04;transition:opacity 75ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-slide-toggle.mat-mdc-slide-toggle-focused .mdc-switch .mdc-switch__ripple::after{opacity:.12}.mat-mdc-slide-toggle.mat-mdc-slide-toggle-focused .mat-mdc-focus-indicator::before{content:""}.mat-mdc-slide-toggle .mat-ripple-element{opacity:.12}.mat-mdc-slide-toggle .mat-mdc-focus-indicator::before{border-radius:50%}.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__handle-track,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-elevation-overlay,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__icon,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__handle::before,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__handle::after,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__track::before,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__track::after{transition:none}.mat-mdc-slide-toggle .mdc-switch:enabled+.mdc-label{cursor:pointer}'],encapsulation:2,changeDetection:0});let d=c;return d})();var $=(()=>{let c=class c{};c.\u0275fac=function(i){return new(i||c)},c.\u0275mod=f({type:c}),c.\u0275inj=u({});let d=c;return d})(),Re=(()=>{let c=class c{};c.\u0275fac=function(i){return new(i||c)},c.\u0275mod=f({type:c}),c.\u0275inj=u({imports:[$,k,Q,$,k]});let d=c;return d})();export{ce as a,Re as b};
@@ -1 +1 @@
1
- import{a as A}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.0/Marketplace/chunk-SKA4KCAB.js";import{a as R}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.0/Marketplace/chunk-LJ6J4EIT.js";import{b as v,c as y}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.0/Marketplace/chunk-TT7NBZMD.js";import{a as M,b as O}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.0/Marketplace/chunk-HWOBJ4Z3.js";import{b,c as x}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.0/Marketplace/chunk-YQEEQRFM.js";import{h as _,k as u}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.0/Marketplace/chunk-PQGHN52M.js";import{c as N}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.0/Marketplace/chunk-CWG6UUW5.js";import{Ea as r,Fa as d,Na as a,Ta as C,Xb as g,Ya as s,Za as c,_a as k,cb as D,da as h,gb as p,ia as I,ja as T,ob as f,pb as w,qb as F,ya as S}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.0/Marketplace/chunk-FWCMOK42.js";function $(i,n){if(i&1){let m=D();s(0,"li")(1,"mat-checkbox",4),p("ngModelChange",function(e){let l=I(m).$implicit;return T(l.selected=e)}),s(2,"div",5)(3,"h5",6),f(4),c()()()()}if(i&2){let m=n.$implicit;r(1),a("ngModel",m.selected),r(3),w(m.Name)}}var q=(()=>{let n=class n{constructor(o,e){this.data=o,this.dialogRef=e,this.selectedItems=this.data.selectedItems,this.channels=this.data.channels}ngOnInit(){this.initModalConfig()}initModalConfig(){this.modalConfig=new v,this.modalConfig.title="Updating Inventory"}onOk(){this.dialogRef.close(this.channels)}onClose(){this.dialogRef.close()}getSelectedChannel(){return this.channels.filter(o=>o.selected)}};n.\u0275fac=function(e){return new(e||n)(d(O),d(M))},n.\u0275cmp=h({type:n,selectors:[["app-modal-update-channels"]],decls:5,vars:3,consts:[[3,"dynamicValidated","config","onOk","onClose","onCancel"],["content",""],[1,"no-bullet"],[4,"ngFor","ngForOf"],[3,"ngModel","ngModelChange"],[1,"d-flex"],[1,"fw-light","me-2","my-auto"]],template:function(e,t){if(e&1&&(s(0,"modal-material",0),p("onOk",function(){return t.onOk()})("onClose",function(){return t.onClose()})("onCancel",function(){return t.onClose()}),s(1,"div",1)(2,"div")(3,"ul",2),C(4,$,5,2,"li",3),c()()()()),e&2){let l;a("dynamicValidated",((l=t.getSelectedChannel())==null?null:l.length)>0)("config",t.modalConfig),r(4),a("ngForOf",t.channels)}},dependencies:[g,_,u,A,y],styles:[".no-bullet[_ngcontent-%COMP%]{list-style-type:none}mat-form-field[_ngcontent-%COMP%]{width:100%;height:100%}.mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}.vertical-radio[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:15px 0}"]});let i=n;return i})();function G(i,n){if(i&1&&(s(0,"ng-option",4),k(1,"img",5),f(2),c()),i&2){let m=n.$implicit;a("value",m.ID),r(1),a("src",m.Img,S),r(1),F("",m.Name," ")}}var Z=(()=>{let n=class n{constructor(o,e){this.data=o,this.dialogRef=e,this.channelOptions=o.channelOptions,this.channel=o.selectedChannel?o.selectedChannel:new R}ngOnInit(){this.initModalConfig()}initModalConfig(){this.modalConfig=new v,this.modalConfig.title="Choose Channel",this.modalConfig.customWidth="350px",this.modalConfig.okText="SAVE"}onSelectChannel(o){let e=this.channelOptions.find(t=>t.ID==o);this.channel=e,this.channel&&(this.channel.logo=N.getChannelLogoByTypeId(e.TypeID))}onClose(){this.dialogRef.close()}onOk(){this.dialogRef.close(this.channel)}};n.\u0275fac=function(e){return new(e||n)(d(O),d(M))},n.\u0275cmp=h({type:n,selectors:[["app-modal-choose-channel"]],decls:4,vars:4,consts:[[3,"config","onClose","onCancel","onOk"],["content",""],["appendTo","body",3,"clearable","ngModel","ngModelChange"],[3,"value",4,"ngFor","ngForOf"],[3,"value"],[2,"width","18px","margin-right","10px",3,"src"]],template:function(e,t){e&1&&(s(0,"modal-material",0),p("onClose",function(){return t.onClose()})("onCancel",function(){return t.onClose()})("onOk",function(){return t.onOk()}),s(1,"div",1)(2,"ng-select",2),p("ngModelChange",function(U){return t.onSelectChannel(U)}),C(3,G,3,3,"ng-option",3),c()()()),e&2&&(a("config",t.modalConfig),r(2),a("clearable",!1)("ngModel",t.channel.ID),r(1),a("ngForOf",t.channelOptions))},dependencies:[g,_,u,y,x,b]});let i=n;return i})();export{q as a,Z as b};
1
+ import{a as A}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.2/Marketplace/chunk-6H6S75XM.js";import{a as R}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.2/Marketplace/chunk-7G5B67SI.js";import{b as v,c as y}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.2/Marketplace/chunk-45BCCCD5.js";import{a as M,b as O}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.2/Marketplace/chunk-GPNYP6CI.js";import{b,c as x}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.2/Marketplace/chunk-LHYUY4OW.js";import{h as _,k as u}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.2/Marketplace/chunk-OGA3XTQE.js";import{c as N}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.2/Marketplace/chunk-SZQIM5RM.js";import{Ea as r,Fa as d,Na as a,Ta as C,Xb as g,Ya as s,Za as c,_a as k,cb as D,da as h,gb as p,ia as I,ja as T,ob as f,pb as w,qb as F,ya as S}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.4.2/Marketplace/chunk-WGNBD2TG.js";function $(i,n){if(i&1){let m=D();s(0,"li")(1,"mat-checkbox",4),p("ngModelChange",function(e){let l=I(m).$implicit;return T(l.selected=e)}),s(2,"div",5)(3,"h5",6),f(4),c()()()()}if(i&2){let m=n.$implicit;r(1),a("ngModel",m.selected),r(3),w(m.Name)}}var q=(()=>{let n=class n{constructor(o,e){this.data=o,this.dialogRef=e,this.selectedItems=this.data.selectedItems,this.channels=this.data.channels}ngOnInit(){this.initModalConfig()}initModalConfig(){this.modalConfig=new v,this.modalConfig.title="Updating Inventory"}onOk(){this.dialogRef.close(this.channels)}onClose(){this.dialogRef.close()}getSelectedChannel(){return this.channels.filter(o=>o.selected)}};n.\u0275fac=function(e){return new(e||n)(d(O),d(M))},n.\u0275cmp=h({type:n,selectors:[["app-modal-update-channels"]],decls:5,vars:3,consts:[[3,"dynamicValidated","config","onOk","onClose","onCancel"],["content",""],[1,"no-bullet"],[4,"ngFor","ngForOf"],[3,"ngModel","ngModelChange"],[1,"d-flex"],[1,"fw-light","me-2","my-auto"]],template:function(e,t){if(e&1&&(s(0,"modal-material",0),p("onOk",function(){return t.onOk()})("onClose",function(){return t.onClose()})("onCancel",function(){return t.onClose()}),s(1,"div",1)(2,"div")(3,"ul",2),C(4,$,5,2,"li",3),c()()()()),e&2){let l;a("dynamicValidated",((l=t.getSelectedChannel())==null?null:l.length)>0)("config",t.modalConfig),r(4),a("ngForOf",t.channels)}},dependencies:[g,_,u,A,y],styles:[".no-bullet[_ngcontent-%COMP%]{list-style-type:none}mat-form-field[_ngcontent-%COMP%]{width:100%;height:100%}.mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}.vertical-radio[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:15px 0}"]});let i=n;return i})();function G(i,n){if(i&1&&(s(0,"ng-option",4),k(1,"img",5),f(2),c()),i&2){let m=n.$implicit;a("value",m.ID),r(1),a("src",m.Img,S),r(1),F("",m.Name," ")}}var Z=(()=>{let n=class n{constructor(o,e){this.data=o,this.dialogRef=e,this.channelOptions=o.channelOptions,this.channel=o.selectedChannel?o.selectedChannel:new R}ngOnInit(){this.initModalConfig()}initModalConfig(){this.modalConfig=new v,this.modalConfig.title="Choose Channel",this.modalConfig.customWidth="350px",this.modalConfig.okText="SAVE"}onSelectChannel(o){let e=this.channelOptions.find(t=>t.ID==o);this.channel=e,this.channel&&(this.channel.logo=N.getChannelLogoByTypeId(e.TypeID))}onClose(){this.dialogRef.close()}onOk(){this.dialogRef.close(this.channel)}};n.\u0275fac=function(e){return new(e||n)(d(O),d(M))},n.\u0275cmp=h({type:n,selectors:[["app-modal-choose-channel"]],decls:4,vars:4,consts:[[3,"config","onClose","onCancel","onOk"],["content",""],["appendTo","body",3,"clearable","ngModel","ngModelChange"],[3,"value",4,"ngFor","ngForOf"],[3,"value"],[2,"width","18px","margin-right","10px",3,"src"]],template:function(e,t){e&1&&(s(0,"modal-material",0),p("onClose",function(){return t.onClose()})("onCancel",function(){return t.onClose()})("onOk",function(){return t.onOk()}),s(1,"div",1)(2,"ng-select",2),p("ngModelChange",function(U){return t.onSelectChannel(U)}),C(3,G,3,3,"ng-option",3),c()()()),e&2&&(a("config",t.modalConfig),r(2),a("clearable",!1)("ngModel",t.channel.ID),r(1),a("ngForOf",t.channelOptions))},dependencies:[g,_,u,y,x,b]});let i=n;return i})();export{q as a,Z as b};