marketplacepos 3.7.0 → 3.7.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.
- package/Marketplace/{chunk-AIE4RSCM.js → chunk-27IVVEQ5.js} +1 -1
- package/Marketplace/{chunk-MNORCZ5U.js → chunk-2SYJDDTX.js} +1 -1
- package/Marketplace/{chunk-C675HTF2.js → chunk-37MHCWTD.js} +1 -1
- package/Marketplace/{chunk-FCRIZ226.js → chunk-3KV2JLZD.js} +1 -1
- package/Marketplace/{chunk-OHJBV2SP.js → chunk-4SAZAICQ.js} +1 -1
- package/Marketplace/{chunk-WHDLWSC7.js → chunk-4Z75AP5X.js} +1 -1
- package/Marketplace/chunk-5CBOZ77Z.js +1 -0
- package/Marketplace/{chunk-NUN457A7.js → chunk-6GVQC3OR.js} +1 -1
- package/Marketplace/{chunk-6UISEE6K.js → chunk-7QK5UPRO.js} +1 -1
- package/Marketplace/{chunk-TCVITRSB.js → chunk-AE6IHJSI.js} +1 -1
- package/Marketplace/{chunk-4ARMBRYZ.js → chunk-B2H2LMDP.js} +1 -1
- package/Marketplace/{chunk-OCQGU4XF.js → chunk-CBW7JGFJ.js} +1 -1
- package/Marketplace/{chunk-FAA5MCE6.js → chunk-CQJJCQOZ.js} +1 -1
- package/Marketplace/{chunk-3UHMSDZV.js → chunk-EJ4H3OFV.js} +1 -1
- package/Marketplace/{chunk-7Q467LQU.js → chunk-F2WJC5YO.js} +1 -1
- package/Marketplace/{chunk-SW4RH2OZ.js → chunk-F7PVCSNW.js} +1 -1
- package/Marketplace/chunk-FX4KZMXX.js +1 -0
- package/Marketplace/{chunk-YCOV6QF3.js → chunk-GSZGHECR.js} +1 -1
- package/Marketplace/{chunk-6JTRVIZI.js → chunk-GSZSRSYG.js} +1 -1
- package/Marketplace/{chunk-B56SMRKB.js → chunk-H65R6LYY.js} +1 -1
- package/Marketplace/{chunk-V6WGN4CJ.js → chunk-H65V337R.js} +1 -1
- package/Marketplace/{chunk-UF6UXQ4F.js → chunk-HD4CTBL2.js} +1 -1
- package/Marketplace/{chunk-PKV2MX2V.js → chunk-HIX2BUDB.js} +1 -1
- package/Marketplace/{chunk-PGQNQRSE.js → chunk-I66FBNYV.js} +1 -1
- package/Marketplace/{chunk-ABFPL6TA.js → chunk-IANWTXDM.js} +1 -1
- package/Marketplace/{chunk-UUWXBTMC.js → chunk-JEIL7GTU.js} +1 -1
- package/Marketplace/{chunk-D6U7F3FE.js → chunk-JGSLR6Q7.js} +1 -1
- package/Marketplace/{chunk-4ALKGSNS.js → chunk-JHT6TPR2.js} +1 -1
- package/Marketplace/{chunk-SNCK2FWA.js → chunk-JOI2R7DA.js} +1 -1
- package/Marketplace/{chunk-O5TGJGPX.js → chunk-KOEWWMXB.js} +1 -1
- package/Marketplace/{chunk-FJ6DK2PY.js → chunk-LPD77TVJ.js} +1 -1
- package/Marketplace/{chunk-T3S6OSUW.js → chunk-LQUPRVED.js} +1 -1
- package/Marketplace/{chunk-3UNDP7GV.js → chunk-LU4CQUNV.js} +1 -1
- package/Marketplace/{chunk-M6EV5O6B.js → chunk-LV7NKX2V.js} +1 -1
- package/Marketplace/{chunk-WJX6E5SF.js → chunk-MCTEEYBG.js} +1 -1
- package/Marketplace/{chunk-3CJHQAXO.js → chunk-MG7FPXZX.js} +1 -1
- package/Marketplace/{chunk-DWRODF4P.js → chunk-MQUFUG4I.js} +1 -1
- package/Marketplace/{chunk-VW7ZPKO3.js → chunk-N6VKSGEM.js} +1 -1
- package/Marketplace/{chunk-6JUG64XK.js → chunk-NE4U3Z2F.js} +1 -1
- package/Marketplace/{chunk-5X5XYEG7.js → chunk-NY3NDLUY.js} +1 -1
- package/Marketplace/{chunk-IMCK7CZA.js → chunk-ONRH4TTU.js} +1 -1
- package/Marketplace/{chunk-WO5J2KLB.js → chunk-P7MI7GDE.js} +1 -1
- package/Marketplace/{chunk-ZKEOQVK3.js → chunk-PL4TRYLK.js} +1 -1
- package/Marketplace/{chunk-PC3GKHB7.js → chunk-PSAPUCAJ.js} +1 -1
- package/Marketplace/{chunk-LW37VJAD.js → chunk-QHJPUEQJ.js} +1 -1
- package/Marketplace/{chunk-N3MNWSYS.js → chunk-QOBUHJEC.js} +1 -1
- package/Marketplace/{chunk-SRFXQR3O.js → chunk-QWKP6LGP.js} +1 -1
- package/Marketplace/{chunk-NLLDIBGQ.js → chunk-RNMZG2RU.js} +1 -1
- package/Marketplace/{chunk-QIPOMN5U.js → chunk-RQWHADXY.js} +1 -1
- package/Marketplace/{chunk-GMQAKOAO.js → chunk-T4IQWUBV.js} +1 -1
- package/Marketplace/{chunk-PEDSV4QH.js → chunk-T5BNV4KL.js} +1 -1
- package/Marketplace/{chunk-PT4HB4BE.js → chunk-ULZ3J3BD.js} +1 -1
- package/Marketplace/{chunk-BWB3YEE3.js → chunk-UUY6BTJU.js} +1 -1
- package/Marketplace/{chunk-XYLU3LCF.js → chunk-VM5LF2AQ.js} +1 -1
- package/Marketplace/{chunk-6P6N5MPR.js → chunk-VZO27DX6.js} +1 -1
- package/Marketplace/{chunk-ZXG2LRR7.js → chunk-W5LP6HWA.js} +1 -1
- package/Marketplace/{chunk-7H5NOLAT.js → chunk-WIPT5BVZ.js} +2 -2
- package/Marketplace/{chunk-7EHMM2RQ.js → chunk-ZA6GABVQ.js} +1 -1
- package/Marketplace/{chunk-RHSQYTCN.js → chunk-ZMMTX4YX.js} +1 -1
- package/Marketplace/{chunk-C4WLCPS5.js → chunk-ZSK75YJW.js} +1 -1
- package/Marketplace/index.html +2 -2
- package/Marketplace/{main-X7AMGDRI.js → main-AUAZAZGD.js} +1 -1
- package/Marketplace/{styles-QFHBM646.css → styles-DC4DACOA.css} +1 -1
- package/package.json +1 -1
- package/Marketplace/chunk-RJGQ3L4V.js +0 -1
- package/Marketplace/chunk-YMDCJACA.js +0 -1
- /package/Marketplace/{chunk-WAAT6CHK.js → chunk-5DL35YCG.js} +0 -0
- /package/Marketplace/{chunk-HET33HC6.js → chunk-FG5W5K4B.js} +0 -0
- /package/Marketplace/{chunk-BBHP36L3.js → chunk-QYP6WXYL.js} +0 -0
- /package/Marketplace/{chunk-DZ4C4BLL.js → chunk-VS4FYYKI.js} +0 -0
- /package/Marketplace/{polyfills-34NMXNBT.js → polyfills-FXABYPWM.js} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as Ne}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.
|
|
1
|
+
import{a as Ne}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.2/Marketplace/chunk-JGSLR6Q7.js";import{e as Be}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.2/Marketplace/chunk-MG7FPXZX.js";import{a as Le,b as le,c as $e,d as He,e as ue,f as We,g as de,h as Ke,i as q,j as he,k as I}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.2/Marketplace/chunk-VM5LF2AQ.js";import{a as Ue}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.2/Marketplace/chunk-ZSK75YJW.js";import{b as ce,c as z}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.2/Marketplace/chunk-QYP6WXYL.js";import{$ as E,A as Ce,B as Pe,I as oe,Ic as Fe,Ka as $,Mb as xe,N as De,Nb as Re,Q as ie,Rb as ae,T as _,U as se,X as U,aa as N,b as g,ba as y,c as X,ca as h,fa as F,fc as je,g as ye,gc as Oe,h as Ie,hc as Me,k as M,l as B,m as x,n as K,pa as _e,q as D,r as Te,ua as L}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.2/Marketplace/chunk-CQJJCQOZ.js";import{h as b}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.2/Marketplace/chunk-FG5W5K4B.js";var dt="firebase",ht="10.7.1";q(dt,ht,"app");var G=new xe("ANGULARFIRE2_VERSION");var pt=(r,i)=>{let t=i?[i]:Ke(),e=[];return t.forEach(n=>{n.container.getProvider(r).instances.forEach(s=>{e.includes(s)||e.push(s)})}),e},V=class{constructor(){return pt(ft)}},ft="app-check";function pe(){}var Y=class{zone;delegate;constructor(i,t=Ie){this.zone=i,this.delegate=t}now(){return this.delegate.now()}schedule(i,t,e){let n=this.zone,o=function(s){n.runGuarded(()=>{i.apply(this,[s])})};return this.delegate.schedule(o,t,e)}},fe=class{zone;task=null;constructor(i){this.zone=i}call(i,t){let e=this.unscheduleTask.bind(this);return this.task=this.zone.run(()=>Zone.current.scheduleMacroTask("firebaseZoneBlock",pe,{},pe,pe)),t.pipe(U({next:e,complete:e,error:e})).subscribe(i).add(e)}unscheduleTask(){setTimeout(()=>{this.task!=null&&this.task.state==="scheduled"&&(this.task.invoke(),this.task=null)},10)}},ze=(()=>{class r{ngZone;outsideAngular;insideAngular;constructor(t){this.ngZone=t,this.outsideAngular=t.runOutsideAngular(()=>new Y(Zone.current)),this.insideAngular=t.run(()=>new Y(Zone.current,ye)),globalThis.\u0275AngularFireScheduler||=this}static \u0275fac=function(e){return new(e||r)(h($))};static \u0275prov=E({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();function gt(){let r=globalThis.\u0275AngularFireScheduler;if(!r)throw new Error(`Either AngularFireModule has not been provided in your AppModule (this can be done manually or implictly using
|
|
2
2
|
provideFirebaseApp) or you're calling an AngularFire method outside of an NgModule (which is not supported).`);return r}function qe(r){return mt(gt())(r)}function mt(r){return function(t){return t=t.lift(new fe(r.ngZone)),t.pipe(B(r.outsideAngular),M(r.insideAngular))}}var wt="firebase",kt="10.7.1";I.registerVersion(wt,kt,"app-compat");var vt=["ngOnDestroy"],Ge=(r,i,t,e={})=>new Proxy(r,{get:(n,o)=>t.runOutsideAngular(()=>{if(r[o])return e?.spy?.get&&e.spy.get(o,r[o]),r[o];if(vt.indexOf(o)>-1)return()=>{};let s=i.toPromise().then(a=>{let c=a?.[o];return typeof c=="function"?c.bind(a):c?.then?c.then(l=>t.run(()=>l)):t.run(()=>c)});return new Proxy(()=>{},{get:(a,c)=>s[c],apply:(a,c,l)=>s.then(d=>{let u=d?.(...l);return e?.spy?.apply&&e.spy.apply(o,l,u),u})})})});var Q=class{constructor(i){return i}},ee=new y("angularfire2.app.options"),te=new y("angularfire2.app.name");function ge(r,i,t){let e=typeof t=="string"&&t||"[DEFAULT]",n=typeof t=="object"&&t||{};n.name=n.name||e;let s=I.apps.filter(a=>a&&a.name===n.name)[0]||i.runOutsideAngular(()=>I.initializeApp(r,n));try{if(JSON.stringify(r)!==JSON.stringify(s.options)){let a=!!module.hot;St("error",`${s.name} Firebase App already initialized with different options${a?", you may need to reload as Firebase is not HMR aware.":"."}`)}}catch{}return new Q(s)}var St=(r,...i)=>{ae()&&typeof console<"u"&&console[r](...i)},bt={provide:Q,useFactory:ge,deps:[ee,$,[new _e,te]]},Pn=(()=>{class r{static initializeApp(t,e){return{ngModule:r,providers:[{provide:ee,useValue:t},{provide:te,useValue:e}]}}constructor(t){I.registerVersion("angularfire",G.full,"core"),I.registerVersion("angularfire",G.full,"app-compat"),I.registerVersion("angular",Re.full,t.toString())}static \u0275fac=function(e){return new(e||r)(h(L))};static \u0275mod=F({type:r});static \u0275inj=N({providers:[bt]})}return r})();function Je(r,i,t,e,n){let[,o,s]=globalThis.\u0275AngularfireInstanceCache.find(a=>a[0]===r)||[];if(o)return Et(n,s)||(Ve("error",`${i} was already initialized on the ${t} Firebase App with different settings.${yt?" You may need to reload as Firebase is not HMR aware.":""}`),Ve("warn",{is:n,was:s})),o;{let a=e();return globalThis.\u0275AngularfireInstanceCache.push([r,a,n]),a}}function Et(r,i){try{return r.toString()===i.toString()}catch{return r===i}}var yt=typeof module<"u"&&!!module.hot,Ve=(r,...i)=>{ae()&&typeof console<"u"&&console[r](...i)};globalThis.\u0275AngularfireInstanceCache||=[];var It=new Map,Tt={activated:!1,tokenObservers:[]},Ct={initialized:!1,enabled:!1};function T(r){return It.get(r)||Object.assign({},Tt)}function et(){return Ct}var Pt="https://content-firebaseappcheck.googleapis.com/v1";var Dt="exchangeDebugToken",Ze={OFFSET_DURATION:5*60*1e3,RETRIAL_MIN_WAIT:30*1e3,RETRIAL_MAX_WAIT:16*60*1e3},Hn=24*60*60*1e3;var Ae=class{constructor(i,t,e,n,o){if(this.operation=i,this.retryPolicy=t,this.getWaitDuration=e,this.lowerBound=n,this.upperBound=o,this.pending=null,this.nextErrorWaitInterval=n,n>o)throw new Error("Proactive refresh lower bound greater than upper bound!")}start(){this.nextErrorWaitInterval=this.lowerBound,this.process(!0).catch(()=>{})}stop(){this.pending&&(this.pending.reject("cancelled"),this.pending=null)}isRunning(){return!!this.pending}process(i){return b(this,null,function*(){this.stop();try{this.pending=new le,this.pending.promise.catch(t=>{}),yield _t(this.getNextRun(i)),this.pending.resolve(),yield this.pending.promise,this.pending=new le,this.pending.promise.catch(t=>{}),yield this.operation(),this.pending.resolve(),yield this.pending.promise,this.process(!0).catch(()=>{})}catch(t){this.retryPolicy(t)?this.process(!1).catch(()=>{}):this.stop()}})}getNextRun(i){if(i)return this.nextErrorWaitInterval=this.lowerBound,this.getWaitDuration();{let t=this.nextErrorWaitInterval;return this.nextErrorWaitInterval*=2,this.nextErrorWaitInterval>this.upperBound&&(this.nextErrorWaitInterval=this.upperBound),t}}};function _t(r){return new Promise(i=>{setTimeout(i,r)})}var xt={"already-initialized":"You have already called initializeAppCheck() for FirebaseApp {$appName} with different options. To avoid this error, call initializeAppCheck() with the same options as when it was originally called. This will return the already initialized instance.","use-before-activation":"App Check is being used before initializeAppCheck() is called for FirebaseApp {$appName}. Call initializeAppCheck() before instantiating other Firebase services.","fetch-network-error":"Fetch failed to connect to a network. Check Internet connection. Original error: {$originalErrorMessage}.","fetch-parse-error":"Fetch client could not parse response. Original error: {$originalErrorMessage}.","fetch-status-error":"Fetch server returned an HTTP error status. HTTP status: {$httpStatus}.","storage-open":"Error thrown when opening storage. Original error: {$originalErrorMessage}.","storage-get":"Error thrown when reading from storage. Original error: {$originalErrorMessage}.","storage-set":"Error thrown when writing to storage. Original error: {$originalErrorMessage}.","recaptcha-error":"ReCAPTCHA error.",throttled:"Requests throttled due to {$httpStatus} error. Attempts allowed again after {$time}"},R=new He("appCheck","AppCheck",xt);function tt(r){if(!T(r).activated)throw R.create("use-before-activation",{appName:r.name})}function nt(e,n){return b(this,arguments,function*({url:r,body:i},t){let o={"Content-Type":"application/json"},s=t.getImmediate({optional:!0});if(s){let f=yield s.getHeartbeatsHeader();f&&(o["X-Firebase-Client"]=f)}let a={method:"POST",body:JSON.stringify(i),headers:o},c;try{c=yield fetch(r,a)}catch(f){throw R.create("fetch-network-error",{originalErrorMessage:f?.message})}if(c.status!==200)throw R.create("fetch-status-error",{httpStatus:c.status});let l;try{l=yield c.json()}catch(f){throw R.create("fetch-parse-error",{originalErrorMessage:f?.message})}let d=l.ttl.match(/^([\d.]+)(s)$/);if(!d||!d[2]||isNaN(Number(d[1])))throw R.create("fetch-parse-error",{originalErrorMessage:`ttl field (timeToLive) is not in standard Protobuf Duration format: ${l.ttl}`});let u=Number(d[1])*1e3,p=Date.now();return{token:l.token,expireTimeMillis:p+u,issuedAtTimeMillis:p}})}function rt(r,i){let{projectId:t,appId:e,apiKey:n}=r.options;return{url:`${Pt}/projects/${t}/apps/${e}:${Dt}?key=${n}`,body:{debug_token:i}}}var Rt="firebase-app-check-database",jt=1,we="firebase-app-check-store";var ne=null;function Ot(){return ne||(ne=new Promise((r,i)=>{try{let t=indexedDB.open(Rt,jt);t.onsuccess=e=>{r(e.target.result)},t.onerror=e=>{var n;i(R.create("storage-open",{originalErrorMessage:(n=e.target.error)===null||n===void 0?void 0:n.message}))},t.onupgradeneeded=e=>{let n=e.target.result;switch(e.oldVersion){case 0:n.createObjectStore(we,{keyPath:"compositeKey"})}}}catch(t){i(R.create("storage-open",{originalErrorMessage:t?.message}))}}),ne)}function Mt(r,i){return Bt(Nt(r),i)}function Bt(r,i){return b(this,null,function*(){let e=(yield Ot()).transaction(we,"readwrite"),o=e.objectStore(we).put({compositeKey:r,value:i});return new Promise((s,a)=>{o.onsuccess=c=>{s()},e.onerror=c=>{var l;a(R.create("storage-set",{originalErrorMessage:(l=c.target.error)===null||l===void 0?void 0:l.message}))}})})}function Nt(r){return`${r.options.appId}-${r.name}`}var ke=new We("@firebase/app-check");function me(r,i){return $e()?Mt(r,i).catch(t=>{ke.warn(`Failed to write token to IndexedDB. Error: ${t}`)}):Promise.resolve()}function ot(){return et().enabled}function it(){return b(this,null,function*(){let r=et();if(r.enabled&&r.token)return r.token.promise;throw Error(`
|
|
3
3
|
Can't get debug token in production mode.
|
|
4
|
-
`)})}var Ft={error:"UNKNOWN_ERROR"};function Lt(r){return Le.encodeString(JSON.stringify(r),!1)}function ve(r,i=!1){return b(this,null,function*(){let t=r.app;tt(t);let e=T(t),n=e.token,o;if(n&&!J(n)&&(e.token=void 0,n=void 0),!n){let c=yield e.cachedTokenPromise;c&&(J(c)?n=c:yield me(t,void 0))}if(!i&&n&&J(n))return{token:n.token};let s=!1;if(ot()){e.exchangeTokenPromise||(e.exchangeTokenPromise=nt(rt(t,yield it()),r.heartbeatServiceProvider).finally(()=>{e.exchangeTokenPromise=void 0}),s=!0);let c=yield e.exchangeTokenPromise;return yield me(t,c),e.token=c,{token:c.token}}try{e.exchangeTokenPromise||(e.exchangeTokenPromise=e.provider.getToken().finally(()=>{e.exchangeTokenPromise=void 0}),s=!0),n=yield T(t).exchangeTokenPromise}catch(c){c.code==="appCheck/throttled"?ke.warn(c.message):ke.error(c),o=c}let a;return n?o?J(n)?a={token:n.token,internalError:o}:a=Ye(o):(a={token:n.token},e.token=n,yield me(t,n)):a=Ye(o),s&&Kt(t,a),a})}function $t(r){return b(this,null,function*(){let i=r.app;tt(i);let{provider:t}=T(i);if(ot()){let e=yield it(),{token:n}=yield nt(rt(i,e),r.heartbeatServiceProvider);return{token:n}}else{let{token:e}=yield t.getToken();return{token:e}}})}function Ht(r,i,t,e){let{app:n}=r,o=T(n),s={next:t,error:e,type:i};if(o.tokenObservers=[...o.tokenObservers,s],o.token&&J(o.token)){let a=o.token;Promise.resolve().then(()=>{t({token:a.token}),Xe(r)}).catch(()=>{})}o.cachedTokenPromise.then(()=>Xe(r))}function st(r,i){let t=T(r),e=t.tokenObservers.filter(n=>n.next!==i);e.length===0&&t.tokenRefresher&&t.tokenRefresher.isRunning()&&t.tokenRefresher.stop(),t.tokenObservers=e}function Xe(r){let{app:i}=r,t=T(i),e=t.tokenRefresher;e||(e=Wt(r),t.tokenRefresher=e),!e.isRunning()&&t.isTokenAutoRefreshEnabled&&e.start()}function Wt(r){let{app:i}=r;return new Ae(()=>b(this,null,function*(){let t=T(i),e;if(t.token?e=yield ve(r,!0):e=yield ve(r),e.error)throw e.error;if(e.internalError)throw e.internalError}),()=>!0,()=>{let t=T(i);if(t.token){let e=t.token.issuedAtTimeMillis+(t.token.expireTimeMillis-t.token.issuedAtTimeMillis)*.5+3e5,n=t.token.expireTimeMillis-5*60*1e3;return e=Math.min(e,n),Math.max(0,e-Date.now())}else return 0},Ze.RETRIAL_MIN_WAIT,Ze.RETRIAL_MAX_WAIT)}function Kt(r,i){let t=T(r).tokenObservers;for(let e of t)try{e.type==="EXTERNAL"&&i.error!=null?e.error(i.error):e.next(i)}catch{}}function J(r){return r.expireTimeMillis-Date.now()>0}function Ye(r){return{token:Lt(Ft),error:r}}var Se=class{constructor(i,t){this.app=i,this.heartbeatServiceProvider=t}_delete(){let{tokenObservers:i}=T(this.app);for(let t of i)st(this.app,t.next);return Promise.resolve()}};function Ut(r,i){return new Se(r,i)}function zt(r){return{getToken:i=>ve(r,i),getLimitedUseToken:()=>$t(r),addTokenListener:i=>Ht(r,"INTERNAL",i),removeTokenListener:i=>st(r.app,i)}}var qt="@firebase/app-check",Vt="0.8.1";var Gt="app-check",Qe="app-check-internal";function Jt(){de(new ue(Gt,r=>{let i=r.getProvider("app").getImmediate(),t=r.getProvider("heartbeat");return Ut(i,t)},"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((r,i,t)=>{r.getProvider(Qe).initialize()})),de(new ue(Qe,r=>{let i=r.getProvider("app-check").getImmediate();return zt(i)},"PUBLIC").setInstantiationMode("EXPLICIT")),q(qt,Vt)}Jt();var Zt=["localhost","0.0.0.0","127.0.0.1"],Qn=typeof window<"u"&&Zt.includes(window.location.hostname);var Yt=new y("angularfire2.auth.use-emulator"),Qt=new y("angularfire2.auth.settings"),en=new y("angularfire2.auth.tenant-id"),tn=new y("angularfire2.auth.langugage-code"),nn=new y("angularfire2.auth.use-device-language"),rn=new y("angularfire.auth.persistence"),on=(r,i,t,e,n,o,s,a)=>Je(`${r.name}.auth`,"AngularFireAuth",r.name,()=>{let c=i.runOutsideAngular(()=>r.auth());if(t&&c.useEmulator(...t),e&&(c.tenantId=e),c.languageCode=n,o&&c.useDeviceLanguage(),s)for(let[l,d]of Object.entries(s))c.settings[l]=d;return a&&c.setPersistence(a),c},[t,e,n,o,s,a]),be=(()=>{class r{authState;idToken;user;idTokenResult;credential;constructor(t,e,n,o,s,a,c,l,d,u,p,f){let W=new X,j=K(void 0).pipe(M(s.outsideAngular),_(()=>o.runOutsideAngular(()=>import("https://cdn.jsdelivr.net/npm/marketplacepos@3.7.0/Marketplace/chunk-RJGQ3L4V.js"))),D(()=>ge(t,o,e)),D(C=>on(C,o,a,l,d,u,c,p)),ie({bufferSize:1,refCount:!1}));if(Me(n))this.authState=this.user=this.idToken=this.idTokenResult=this.credential=K(null);else{j.pipe(De()).subscribe();let C=j.pipe(_(A=>A.getRedirectResult().then(P=>P,()=>null)),qe,ie({bufferSize:1,refCount:!1})),Z=j.pipe(_(A=>new g(P=>({unsubscribe:o.runOutsideAngular(()=>A.onAuthStateChanged(O=>P.next(O),O=>P.error(O),()=>P.complete()))})))),re=j.pipe(_(A=>new g(P=>({unsubscribe:o.runOutsideAngular(()=>A.onIdTokenChanged(O=>P.next(O),O=>P.error(O),()=>P.complete()))}))));this.authState=C.pipe(se(Z),B(s.outsideAngular),M(s.insideAngular)),this.user=C.pipe(se(re),B(s.outsideAngular),M(s.insideAngular)),this.idToken=this.user.pipe(_(A=>A?x(A.getIdToken()):K(null))),this.idTokenResult=this.user.pipe(_(A=>A?x(A.getIdTokenResult()):K(null))),this.credential=Ce(C,W,this.authState.pipe(Pe(A=>!A))).pipe(D(A=>A?.user?A:null),B(s.outsideAngular),M(s.insideAngular))}return Ge(this,j,o,{spy:{apply:(C,Z,re)=>{(C.startsWith("signIn")||C.startsWith("createUser"))&&re.then(A=>W.next(A))}}})}static \u0275fac=function(e){return new(e||r)(h(ee),h(te,8),h(L),h($),h(ze),h(Yt,8),h(Qt,8),h(en,8),h(tn,8),h(nn,8),h(rn,8),h(V,8))};static \u0275prov=E({token:r,factory:r.\u0275fac,providedIn:"any"})}return r})(),gr=(()=>{class r{constructor(){I.registerVersion("angularfire",G.full,"auth-compat")}static \u0275fac=function(e){return new(e||r)};static \u0275mod=F({type:r});static \u0275inj=N({providers:[be]})}return r})();function m(r,i,t,e){return new Promise((n,o)=>{r||o("IndexedDB not available");let s=r.open(i,t),a;s.onsuccess=c=>{a=s.result,n(a)},s.onerror=c=>{o(`IndexedDB error: ${s.error}`)},typeof e=="function"&&(s.onupgradeneeded=c=>{e(c,a)})})}function at(r,i,t,e,n){if(!r)return;let o=r.open(i,t);o.onupgradeneeded=s=>{let a=s.target.result;e.forEach(l=>{if(!a.objectStoreNames.contains(l.store)){let d=a.createObjectStore(l.store,l.storeConfig);l.storeSchema.forEach(u=>{d.createIndex(u.name,u.keypath,u.options)})}});let c=n&&n();c&&Object.keys(c).map(l=>parseInt(l,10)).filter(l=>l>s.oldVersion).sort((l,d)=>l-d).forEach(l=>{c[l](a,o.transaction)}),a.close()},o.onsuccess=s=>{s.target.result.close()}}function an(r,i,t){if(!r||!i||!t)throw Error('Params: "dbName", "version", "storeName" are mandatory.');return new g(e=>{try{let n=i+1,o=indexedDB.open(r,n);o.onupgradeneeded=s=>{let a=s.target.result;a.deleteObjectStore(t),a.close(),console.log("onupgradeneeded"),e.next(!0),e.complete()},o.onerror=s=>e.error(s)}catch(n){e.error(n)}})}function cn(r,i){return r.objectStoreNames.contains(i)}function S(r,i,t){r||t("You need to use the openDatabase function to create a database before you query it!"),cn(r,i)||t(`objectStore does not exists: ${i}`)}function k(r,i){let t=r.transaction(i.storeName,i.dbMode);return t.onerror=i.error,t.onabort=i.abort,t}function v(r,i,t,e){return{storeName:i,dbMode:r,error:n=>{t(n)},abort:n=>{t(n)}}}var w=function(r){return r.readonly="readonly",r.readwrite="readwrite",r}(w||{}),ct=new y(null),Ee=(()=>{class r{constructor(t,e){if(this.dbConfig=t,this.platformId=e,!t.name)throw new Error("NgxIndexedDB: Please, provide the dbName in the configuration");if(!t.version)throw new Error("NgxIndexedDB: Please, provide the db version in the configuration");this.isBrowser=Oe(this.platformId),this.isBrowser&&(this.indexedDB=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB,at(this.indexedDB,t.name,t.version,t.objectStoresMeta,t.migrationFactory),m(this.indexedDB,t.name).then(n=>{n.version!==t.version&&(this.dbConfig.version=n.version)}))}createObjectStore(t,e){let n=[t];at(this.indexedDB,this.dbConfig.name,++this.dbConfig.version,n,e)}add(t,e,n){return new g(o=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(s=>{let c=k(s,v(w.readwrite,t,d=>o.error(d))).objectStore(t),l=n?c.add(e,n):c.add(e);l.onsuccess=d=>b(this,null,function*(){let u=d.target.result,p=c.get(u);p.onsuccess=f=>{o.next(f.target.result),o.complete()}})}).catch(s=>o.error(s))})}bulkAdd(t,e){let n=new Promise((o,s)=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(a=>{let l=k(a,v(w.readwrite,t,o,s)).objectStore(t),d=e.map(u=>new Promise((p,f)=>{let W=u.key;delete u.key;let j=W?l.add(u,W):l.add(u);j.onsuccess=C=>{let Z=C.target.result;p(Z)}}));o(Promise.all(d))}).catch(a=>s(a))});return x(n)}bulkDelete(t,e){let n=e.map(o=>new Promise((s,a)=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(c=>{let l=k(c,v(w.readwrite,t,a,s));l.objectStore(t).delete(o),l.oncomplete=()=>{this.getAll(t).pipe(oe(1)).subscribe(u=>{s(u)})}}).catch(c=>a(c))}));return x(Promise.all(n))}getByKey(t,e){return new g(n=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(o=>{let c=k(o,v(w.readonly,t,n.error)).objectStore(t).get(e);c.onsuccess=l=>{n.next(l.target.result),n.complete()},c.onerror=l=>{n.error(l)}}).catch(o=>n.error(o))})}bulkGet(t,e){let n=e.map(o=>this.getByKey(t,o));return new g(o=>{Te(n).subscribe(s=>{o.next(s),o.complete()})})}getByID(t,e){return new g(n=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(o=>{S(o,t,l=>n.error(l));let c=k(o,v(w.readonly,t,n.error,n.next)).objectStore(t).get(e);c.onsuccess=l=>{n.next(l.target.result)}}).catch(o=>n.error(o))})}getByIndex(t,e,n){return new g(o=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(s=>{S(s,t,u=>o.error(u));let d=k(s,v(w.readonly,t,o.error)).objectStore(t).index(e).get(n);d.onsuccess=u=>{o.next(u.target.result),o.complete()}}).catch(s=>o.error(s))})}getAll(t){return new g(e=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(n=>{S(n,t,c=>e.error(c));let a=k(n,v(w.readonly,t,e.error,e.next)).objectStore(t).getAll();a.onerror=c=>{e.error(c)},a.onsuccess=({target:{result:c}})=>{e.next(c),e.complete()}}).catch(n=>e.error(n))})}update(t,e){return new g(n=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(o=>{S(o,t,l=>n.error(l));let a=k(o,v(w.readwrite,t,l=>n.error(l))).objectStore(t),c=a.put(e);c.onsuccess=l=>b(this,null,function*(){let d=l.target.result,u=a.get(d);u.onsuccess=p=>{n.next(p.target.result),n.complete()}})}).catch(o=>n.error(o))})}delete(t,e){return new g(n=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(o=>{S(o,t,c=>n.error(c));let s=k(o,v(w.readwrite,t,c=>n.error(c)));s.objectStore(t).delete(e),s.oncomplete=()=>{this.getAll(t).pipe(oe(1)).subscribe(c=>{n.next(c),n.complete()})}}).catch(o=>n.error(o))})}deleteByKey(t,e){return new g(n=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(o=>{S(o,t,c=>n.error(c));let s=k(o,v(w.readwrite,t,c=>n.error(c))),a=s.objectStore(t);s.oncomplete=()=>{n.next(!0),n.complete()},a.delete(e)}).catch(o=>n.error(o))})}clear(t){return new g(e=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(n=>{S(n,t,a=>e.error(a));let o=k(n,v(w.readwrite,t,a=>e.error(a)));o.objectStore(t).clear(),o.oncomplete=()=>{e.next(!0),e.complete()}}).catch(n=>e.error(n))})}deleteDatabase(){return new g(t=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(e=>b(this,null,function*(){yield e.close();let n=this.indexedDB.deleteDatabase(this.dbConfig.name);n.onsuccess=()=>{t.next(!0),t.complete()},n.onerror=o=>t.error(o),n.onblocked=()=>{throw new Error("Unable to delete database because it's blocked")}})).catch(e=>t.error(e))})}openCursor(t,e){return new g(n=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(o=>{S(o,t,l=>n.error(l));let a=k(o,v(w.readonly,t,n.error)).objectStore(t),c=e===void 0?a.openCursor():a.openCursor(e);c.onsuccess=l=>{n.next(l),n.complete()}}).catch(o=>n.error(o))})}openCursorByIndex(t,e,n,o=w.readonly){let s=new X;return m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(a=>{S(a,t,p=>{s.error(p)});let u=k(a,v(o,t,p=>{s.error(p)},()=>{s.next()})).objectStore(t).index(e).openCursor(n);u.onsuccess=p=>{s.next(p)}}).catch(a=>s.error(a)),s}getAllByIndex(t,e,n){let o=[];return new g(s=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(a=>{S(a,t,p=>s.error(p));let u=k(a,v(w.readonly,t,s.error)).objectStore(t).index(e).openCursor(n);u.onsuccess=p=>{let f=p.target.result;f?(o.push(f.value),f.continue()):(s.next(o),s.complete())}}).catch(a=>s.error(a))})}getAllKeysByIndex(t,e,n){let o=[];return new g(s=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(a=>{S(a,t,p=>s.error(p));let u=k(a,v(w.readonly,t,s.error)).objectStore(t).index(e).openKeyCursor(n);u.onsuccess=p=>{let f=p.target.result;f?(o.push({primaryKey:f.primaryKey,key:f.key}),f.continue()):(s.next(o),s.complete())}}).catch(a=>s.error(a))})}count(t,e){return new g(n=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(o=>{S(o,t,l=>n.error(l));let c=k(o,v(w.readonly,t,n.error)).objectStore(t).count(e);c.onerror=l=>n.error(l),c.onsuccess=l=>{n.next(l.target.result),n.complete()}}).catch(o=>n.error(o))})}countByIndex(t,e,n){return new g(o=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(s=>{S(s,t,u=>o.error(u));let d=k(s,v(w.readonly,t,o.error)).objectStore(t).index(e).count(n);d.onerror=u=>o.error(u),d.onsuccess=u=>{o.next(u.target.result),o.complete()}}).catch(s=>o.error(s))})}deleteObjectStore(t){return an(this.dbConfig.name,++this.dbConfig.version,t)}}return r.\u0275fac=function(t){return new(t||r)(h(ct),h(L))},r.\u0275prov=E({token:r,factory:r.\u0275fac}),r})(),Er=(()=>{class r{static forRoot(t){return{ngModule:r,providers:[Ee,{provide:ct,useValue:t}]}}}return r.\u0275fac=function(t){return new(t||r)},r.\u0275mod=F({type:r}),r.\u0275inj=N({imports:[[je]]}),r})();var lt=(()=>{let i=class i{constructor(e){this.db=e,this.DATABASE="Categories"}saveCategoriesByChannelType(e,n){let o=this.getKey(n);return this.db.add(this.DATABASE,e,o).pipe(D(s=>e))}getCategoriesByChannelType(e){let n=this.getKey(e);return this.db.getByKey(this.DATABASE,n)}getKey(e){let n="";switch(e){case ce.Lazada:n="Lazada";break;case ce.Tokopedia:n="Tokopedia";break}return n}clearDatabase(){this.db.clear(this.DATABASE)}getHostName(){let e=localStorage.getItem("Authorization");return this.hostName=JSON.parse(e)?.Host,this.hostName}};i.\u0275fac=function(n){return new(n||i)(h(Ee))},i.\u0275prov=E({token:i,factory:i.\u0275fac,providedIn:"root"});let r=i;return r})();var ut=(()=>{let i=class i{constructor(){}inititalizeIntercom(){let e=this.getFromLocalStorage();e?.Enabled&&window.Intercom("boot",{app_id:"xv1oomgl",name:e.Name,email:e.Email,created_at:e.Created,user_hash:e.Hash})}shutdown(){this.getFromLocalStorage()?.Enabled&&(window.Intercom("shutdown"),this.clearStorage())}clearStorage(){localStorage.removeItem("Intercom")}updateLocalStorage(e){e&&(e.Enabled=!0),localStorage.setItem("Intercom",JSON.stringify(e))}getFromLocalStorage(){let e=localStorage.getItem("Intercom");return JSON.parse(e)}hideLauncher(){let e=this.getFromLocalStorage();e?.Enabled&&(window.Intercom("update",{app_id:"xv1oomgl",hide_default_launcher:!0}),e.hide_default_launcher=!0,this.updateLocalStorage(e))}showLauncher(){let e=this.getFromLocalStorage();e?.Enabled&&(window.Intercom("update",{app_id:"xv1oomgl",hide_default_launcher:!1}),e.hide_default_launcher=!1,this.updateLocalStorage(e))}isHideLauncher(){let e=this.getFromLocalStorage();return z.IsEmpty(e?.hide_default_launcher)?!1:e?.hide_default_launcher}};i.\u0275fac=function(n){return new(n||i)},i.\u0275prov=E({token:i,factory:i.\u0275fac,providedIn:"root"});let r=i;return r})();var Ai=(()=>{let i=class i{constructor(e,n,o,s,a,c,l){this.httpService=e,this.tokenDecodeService=n,this.afAuth=o,this.ngxPermission=s,this.localDataService=a,this.router=c,this.intercomService=l,this.channels=[]}login(e){return this.httpService.post("/api/token/Login",e).pipe(U(n=>{this.setLocalStorage(n,e.Host,e.Username),this.loadPermissions()}))}loginWithGoogle(e,n){e.preventDefault();let o=new he;return o.setCustomParameters({prompt:"select_account"}),x(this.afAuth.signInWithPopup(o)).pipe(D(s=>s.credential),D(s=>s.idToken),_(s=>this.httpService.post("/api/token/LoginWithSocialProvider",JSON.stringify({IDToken:s,Host:n}))),U(s=>{this.setLocalStorage(s,n,null),this.loadPermissions()}))}setLocalStorage(e,n,o){localStorage.setItem("user",JSON.stringify(e)),localStorage.setItem("Authorization",JSON.stringify({Host:n,username:o})),localStorage.setItem("channels",JSON.stringify(e.Channels)),this.intercomService.updateLocalStorage(e.IntercomWidget),this.intercomService.inititalizeIntercom()}loadPermissions(){this.ngxPermission.loadPermissions([]);let e=localStorage.getItem("user");if(z.IsNotEmpty(e)){let n=this.tokenDecodeService.GetRoles();this.ngxPermission.loadPermissions(n)}}getChannels(){let e=JSON.parse(JSON.stringify(this.channels));if(this.channels.length===0){let n=localStorage.getItem("channels");n?(this.channels=JSON.parse(n),e=JSON.parse(JSON.stringify(this.channels))):(this.channels=[],e=[])}return e=this.setChannelLogo(e),e}setChannelLogo(e){return e=e.map(n=>(n.logo=z.getChannelLogoByTypeId(n.TypeID),n)),e}logout(){this.clearLocalStorage(),this.ngxPermission.flushPermissions()}isActiveToken(){let e=JSON.parse(window.localStorage.getItem("user")),n=new Date;if(e!=null){let o=new Date(e.Token.expiredAt);return n<o?!0:(this.clearLocalStorage(),!1)}else return!1}getDomain(){if(!this.domain){let e=localStorage.getItem("Authorization");this.domain="https://"+JSON.parse(e).Host}return this.domain}clearLocalStorage(){this.domain=null,this.channels=[],localStorage.removeItem("channels"),localStorage.removeItem("user"),this.intercomService.shutdown(),this.localDataService.clearDatabase(),this.router.navigate([""])}};i.\u0275fac=function(n){return new(n||i)(h(Be),h(Ne),h(be),h(Ue),h(lt),h(Fe),h(ut))},i.\u0275prov=E({token:i,factory:i.\u0275fac,providedIn:"root"});let r=i;return r})();export{Pn as a,gr as b,Er as c,lt as d,Ai as e};
|
|
4
|
+
`)})}var Ft={error:"UNKNOWN_ERROR"};function Lt(r){return Le.encodeString(JSON.stringify(r),!1)}function ve(r,i=!1){return b(this,null,function*(){let t=r.app;tt(t);let e=T(t),n=e.token,o;if(n&&!J(n)&&(e.token=void 0,n=void 0),!n){let c=yield e.cachedTokenPromise;c&&(J(c)?n=c:yield me(t,void 0))}if(!i&&n&&J(n))return{token:n.token};let s=!1;if(ot()){e.exchangeTokenPromise||(e.exchangeTokenPromise=nt(rt(t,yield it()),r.heartbeatServiceProvider).finally(()=>{e.exchangeTokenPromise=void 0}),s=!0);let c=yield e.exchangeTokenPromise;return yield me(t,c),e.token=c,{token:c.token}}try{e.exchangeTokenPromise||(e.exchangeTokenPromise=e.provider.getToken().finally(()=>{e.exchangeTokenPromise=void 0}),s=!0),n=yield T(t).exchangeTokenPromise}catch(c){c.code==="appCheck/throttled"?ke.warn(c.message):ke.error(c),o=c}let a;return n?o?J(n)?a={token:n.token,internalError:o}:a=Ye(o):(a={token:n.token},e.token=n,yield me(t,n)):a=Ye(o),s&&Kt(t,a),a})}function $t(r){return b(this,null,function*(){let i=r.app;tt(i);let{provider:t}=T(i);if(ot()){let e=yield it(),{token:n}=yield nt(rt(i,e),r.heartbeatServiceProvider);return{token:n}}else{let{token:e}=yield t.getToken();return{token:e}}})}function Ht(r,i,t,e){let{app:n}=r,o=T(n),s={next:t,error:e,type:i};if(o.tokenObservers=[...o.tokenObservers,s],o.token&&J(o.token)){let a=o.token;Promise.resolve().then(()=>{t({token:a.token}),Xe(r)}).catch(()=>{})}o.cachedTokenPromise.then(()=>Xe(r))}function st(r,i){let t=T(r),e=t.tokenObservers.filter(n=>n.next!==i);e.length===0&&t.tokenRefresher&&t.tokenRefresher.isRunning()&&t.tokenRefresher.stop(),t.tokenObservers=e}function Xe(r){let{app:i}=r,t=T(i),e=t.tokenRefresher;e||(e=Wt(r),t.tokenRefresher=e),!e.isRunning()&&t.isTokenAutoRefreshEnabled&&e.start()}function Wt(r){let{app:i}=r;return new Ae(()=>b(this,null,function*(){let t=T(i),e;if(t.token?e=yield ve(r,!0):e=yield ve(r),e.error)throw e.error;if(e.internalError)throw e.internalError}),()=>!0,()=>{let t=T(i);if(t.token){let e=t.token.issuedAtTimeMillis+(t.token.expireTimeMillis-t.token.issuedAtTimeMillis)*.5+3e5,n=t.token.expireTimeMillis-5*60*1e3;return e=Math.min(e,n),Math.max(0,e-Date.now())}else return 0},Ze.RETRIAL_MIN_WAIT,Ze.RETRIAL_MAX_WAIT)}function Kt(r,i){let t=T(r).tokenObservers;for(let e of t)try{e.type==="EXTERNAL"&&i.error!=null?e.error(i.error):e.next(i)}catch{}}function J(r){return r.expireTimeMillis-Date.now()>0}function Ye(r){return{token:Lt(Ft),error:r}}var Se=class{constructor(i,t){this.app=i,this.heartbeatServiceProvider=t}_delete(){let{tokenObservers:i}=T(this.app);for(let t of i)st(this.app,t.next);return Promise.resolve()}};function Ut(r,i){return new Se(r,i)}function zt(r){return{getToken:i=>ve(r,i),getLimitedUseToken:()=>$t(r),addTokenListener:i=>Ht(r,"INTERNAL",i),removeTokenListener:i=>st(r.app,i)}}var qt="@firebase/app-check",Vt="0.8.1";var Gt="app-check",Qe="app-check-internal";function Jt(){de(new ue(Gt,r=>{let i=r.getProvider("app").getImmediate(),t=r.getProvider("heartbeat");return Ut(i,t)},"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((r,i,t)=>{r.getProvider(Qe).initialize()})),de(new ue(Qe,r=>{let i=r.getProvider("app-check").getImmediate();return zt(i)},"PUBLIC").setInstantiationMode("EXPLICIT")),q(qt,Vt)}Jt();var Zt=["localhost","0.0.0.0","127.0.0.1"],Qn=typeof window<"u"&&Zt.includes(window.location.hostname);var Yt=new y("angularfire2.auth.use-emulator"),Qt=new y("angularfire2.auth.settings"),en=new y("angularfire2.auth.tenant-id"),tn=new y("angularfire2.auth.langugage-code"),nn=new y("angularfire2.auth.use-device-language"),rn=new y("angularfire.auth.persistence"),on=(r,i,t,e,n,o,s,a)=>Je(`${r.name}.auth`,"AngularFireAuth",r.name,()=>{let c=i.runOutsideAngular(()=>r.auth());if(t&&c.useEmulator(...t),e&&(c.tenantId=e),c.languageCode=n,o&&c.useDeviceLanguage(),s)for(let[l,d]of Object.entries(s))c.settings[l]=d;return a&&c.setPersistence(a),c},[t,e,n,o,s,a]),be=(()=>{class r{authState;idToken;user;idTokenResult;credential;constructor(t,e,n,o,s,a,c,l,d,u,p,f){let W=new X,j=K(void 0).pipe(M(s.outsideAngular),_(()=>o.runOutsideAngular(()=>import("https://cdn.jsdelivr.net/npm/marketplacepos@3.7.2/Marketplace/chunk-5CBOZ77Z.js"))),D(()=>ge(t,o,e)),D(C=>on(C,o,a,l,d,u,c,p)),ie({bufferSize:1,refCount:!1}));if(Me(n))this.authState=this.user=this.idToken=this.idTokenResult=this.credential=K(null);else{j.pipe(De()).subscribe();let C=j.pipe(_(A=>A.getRedirectResult().then(P=>P,()=>null)),qe,ie({bufferSize:1,refCount:!1})),Z=j.pipe(_(A=>new g(P=>({unsubscribe:o.runOutsideAngular(()=>A.onAuthStateChanged(O=>P.next(O),O=>P.error(O),()=>P.complete()))})))),re=j.pipe(_(A=>new g(P=>({unsubscribe:o.runOutsideAngular(()=>A.onIdTokenChanged(O=>P.next(O),O=>P.error(O),()=>P.complete()))}))));this.authState=C.pipe(se(Z),B(s.outsideAngular),M(s.insideAngular)),this.user=C.pipe(se(re),B(s.outsideAngular),M(s.insideAngular)),this.idToken=this.user.pipe(_(A=>A?x(A.getIdToken()):K(null))),this.idTokenResult=this.user.pipe(_(A=>A?x(A.getIdTokenResult()):K(null))),this.credential=Ce(C,W,this.authState.pipe(Pe(A=>!A))).pipe(D(A=>A?.user?A:null),B(s.outsideAngular),M(s.insideAngular))}return Ge(this,j,o,{spy:{apply:(C,Z,re)=>{(C.startsWith("signIn")||C.startsWith("createUser"))&&re.then(A=>W.next(A))}}})}static \u0275fac=function(e){return new(e||r)(h(ee),h(te,8),h(L),h($),h(ze),h(Yt,8),h(Qt,8),h(en,8),h(tn,8),h(nn,8),h(rn,8),h(V,8))};static \u0275prov=E({token:r,factory:r.\u0275fac,providedIn:"any"})}return r})(),gr=(()=>{class r{constructor(){I.registerVersion("angularfire",G.full,"auth-compat")}static \u0275fac=function(e){return new(e||r)};static \u0275mod=F({type:r});static \u0275inj=N({providers:[be]})}return r})();function m(r,i,t,e){return new Promise((n,o)=>{r||o("IndexedDB not available");let s=r.open(i,t),a;s.onsuccess=c=>{a=s.result,n(a)},s.onerror=c=>{o(`IndexedDB error: ${s.error}`)},typeof e=="function"&&(s.onupgradeneeded=c=>{e(c,a)})})}function at(r,i,t,e,n){if(!r)return;let o=r.open(i,t);o.onupgradeneeded=s=>{let a=s.target.result;e.forEach(l=>{if(!a.objectStoreNames.contains(l.store)){let d=a.createObjectStore(l.store,l.storeConfig);l.storeSchema.forEach(u=>{d.createIndex(u.name,u.keypath,u.options)})}});let c=n&&n();c&&Object.keys(c).map(l=>parseInt(l,10)).filter(l=>l>s.oldVersion).sort((l,d)=>l-d).forEach(l=>{c[l](a,o.transaction)}),a.close()},o.onsuccess=s=>{s.target.result.close()}}function an(r,i,t){if(!r||!i||!t)throw Error('Params: "dbName", "version", "storeName" are mandatory.');return new g(e=>{try{let n=i+1,o=indexedDB.open(r,n);o.onupgradeneeded=s=>{let a=s.target.result;a.deleteObjectStore(t),a.close(),console.log("onupgradeneeded"),e.next(!0),e.complete()},o.onerror=s=>e.error(s)}catch(n){e.error(n)}})}function cn(r,i){return r.objectStoreNames.contains(i)}function S(r,i,t){r||t("You need to use the openDatabase function to create a database before you query it!"),cn(r,i)||t(`objectStore does not exists: ${i}`)}function k(r,i){let t=r.transaction(i.storeName,i.dbMode);return t.onerror=i.error,t.onabort=i.abort,t}function v(r,i,t,e){return{storeName:i,dbMode:r,error:n=>{t(n)},abort:n=>{t(n)}}}var w=function(r){return r.readonly="readonly",r.readwrite="readwrite",r}(w||{}),ct=new y(null),Ee=(()=>{class r{constructor(t,e){if(this.dbConfig=t,this.platformId=e,!t.name)throw new Error("NgxIndexedDB: Please, provide the dbName in the configuration");if(!t.version)throw new Error("NgxIndexedDB: Please, provide the db version in the configuration");this.isBrowser=Oe(this.platformId),this.isBrowser&&(this.indexedDB=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB,at(this.indexedDB,t.name,t.version,t.objectStoresMeta,t.migrationFactory),m(this.indexedDB,t.name).then(n=>{n.version!==t.version&&(this.dbConfig.version=n.version)}))}createObjectStore(t,e){let n=[t];at(this.indexedDB,this.dbConfig.name,++this.dbConfig.version,n,e)}add(t,e,n){return new g(o=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(s=>{let c=k(s,v(w.readwrite,t,d=>o.error(d))).objectStore(t),l=n?c.add(e,n):c.add(e);l.onsuccess=d=>b(this,null,function*(){let u=d.target.result,p=c.get(u);p.onsuccess=f=>{o.next(f.target.result),o.complete()}})}).catch(s=>o.error(s))})}bulkAdd(t,e){let n=new Promise((o,s)=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(a=>{let l=k(a,v(w.readwrite,t,o,s)).objectStore(t),d=e.map(u=>new Promise((p,f)=>{let W=u.key;delete u.key;let j=W?l.add(u,W):l.add(u);j.onsuccess=C=>{let Z=C.target.result;p(Z)}}));o(Promise.all(d))}).catch(a=>s(a))});return x(n)}bulkDelete(t,e){let n=e.map(o=>new Promise((s,a)=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(c=>{let l=k(c,v(w.readwrite,t,a,s));l.objectStore(t).delete(o),l.oncomplete=()=>{this.getAll(t).pipe(oe(1)).subscribe(u=>{s(u)})}}).catch(c=>a(c))}));return x(Promise.all(n))}getByKey(t,e){return new g(n=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(o=>{let c=k(o,v(w.readonly,t,n.error)).objectStore(t).get(e);c.onsuccess=l=>{n.next(l.target.result),n.complete()},c.onerror=l=>{n.error(l)}}).catch(o=>n.error(o))})}bulkGet(t,e){let n=e.map(o=>this.getByKey(t,o));return new g(o=>{Te(n).subscribe(s=>{o.next(s),o.complete()})})}getByID(t,e){return new g(n=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(o=>{S(o,t,l=>n.error(l));let c=k(o,v(w.readonly,t,n.error,n.next)).objectStore(t).get(e);c.onsuccess=l=>{n.next(l.target.result)}}).catch(o=>n.error(o))})}getByIndex(t,e,n){return new g(o=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(s=>{S(s,t,u=>o.error(u));let d=k(s,v(w.readonly,t,o.error)).objectStore(t).index(e).get(n);d.onsuccess=u=>{o.next(u.target.result),o.complete()}}).catch(s=>o.error(s))})}getAll(t){return new g(e=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(n=>{S(n,t,c=>e.error(c));let a=k(n,v(w.readonly,t,e.error,e.next)).objectStore(t).getAll();a.onerror=c=>{e.error(c)},a.onsuccess=({target:{result:c}})=>{e.next(c),e.complete()}}).catch(n=>e.error(n))})}update(t,e){return new g(n=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(o=>{S(o,t,l=>n.error(l));let a=k(o,v(w.readwrite,t,l=>n.error(l))).objectStore(t),c=a.put(e);c.onsuccess=l=>b(this,null,function*(){let d=l.target.result,u=a.get(d);u.onsuccess=p=>{n.next(p.target.result),n.complete()}})}).catch(o=>n.error(o))})}delete(t,e){return new g(n=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(o=>{S(o,t,c=>n.error(c));let s=k(o,v(w.readwrite,t,c=>n.error(c)));s.objectStore(t).delete(e),s.oncomplete=()=>{this.getAll(t).pipe(oe(1)).subscribe(c=>{n.next(c),n.complete()})}}).catch(o=>n.error(o))})}deleteByKey(t,e){return new g(n=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(o=>{S(o,t,c=>n.error(c));let s=k(o,v(w.readwrite,t,c=>n.error(c))),a=s.objectStore(t);s.oncomplete=()=>{n.next(!0),n.complete()},a.delete(e)}).catch(o=>n.error(o))})}clear(t){return new g(e=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(n=>{S(n,t,a=>e.error(a));let o=k(n,v(w.readwrite,t,a=>e.error(a)));o.objectStore(t).clear(),o.oncomplete=()=>{e.next(!0),e.complete()}}).catch(n=>e.error(n))})}deleteDatabase(){return new g(t=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(e=>b(this,null,function*(){yield e.close();let n=this.indexedDB.deleteDatabase(this.dbConfig.name);n.onsuccess=()=>{t.next(!0),t.complete()},n.onerror=o=>t.error(o),n.onblocked=()=>{throw new Error("Unable to delete database because it's blocked")}})).catch(e=>t.error(e))})}openCursor(t,e){return new g(n=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(o=>{S(o,t,l=>n.error(l));let a=k(o,v(w.readonly,t,n.error)).objectStore(t),c=e===void 0?a.openCursor():a.openCursor(e);c.onsuccess=l=>{n.next(l),n.complete()}}).catch(o=>n.error(o))})}openCursorByIndex(t,e,n,o=w.readonly){let s=new X;return m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(a=>{S(a,t,p=>{s.error(p)});let u=k(a,v(o,t,p=>{s.error(p)},()=>{s.next()})).objectStore(t).index(e).openCursor(n);u.onsuccess=p=>{s.next(p)}}).catch(a=>s.error(a)),s}getAllByIndex(t,e,n){let o=[];return new g(s=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(a=>{S(a,t,p=>s.error(p));let u=k(a,v(w.readonly,t,s.error)).objectStore(t).index(e).openCursor(n);u.onsuccess=p=>{let f=p.target.result;f?(o.push(f.value),f.continue()):(s.next(o),s.complete())}}).catch(a=>s.error(a))})}getAllKeysByIndex(t,e,n){let o=[];return new g(s=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(a=>{S(a,t,p=>s.error(p));let u=k(a,v(w.readonly,t,s.error)).objectStore(t).index(e).openKeyCursor(n);u.onsuccess=p=>{let f=p.target.result;f?(o.push({primaryKey:f.primaryKey,key:f.key}),f.continue()):(s.next(o),s.complete())}}).catch(a=>s.error(a))})}count(t,e){return new g(n=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(o=>{S(o,t,l=>n.error(l));let c=k(o,v(w.readonly,t,n.error)).objectStore(t).count(e);c.onerror=l=>n.error(l),c.onsuccess=l=>{n.next(l.target.result),n.complete()}}).catch(o=>n.error(o))})}countByIndex(t,e,n){return new g(o=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(s=>{S(s,t,u=>o.error(u));let d=k(s,v(w.readonly,t,o.error)).objectStore(t).index(e).count(n);d.onerror=u=>o.error(u),d.onsuccess=u=>{o.next(u.target.result),o.complete()}}).catch(s=>o.error(s))})}deleteObjectStore(t){return an(this.dbConfig.name,++this.dbConfig.version,t)}}return r.\u0275fac=function(t){return new(t||r)(h(ct),h(L))},r.\u0275prov=E({token:r,factory:r.\u0275fac}),r})(),Er=(()=>{class r{static forRoot(t){return{ngModule:r,providers:[Ee,{provide:ct,useValue:t}]}}}return r.\u0275fac=function(t){return new(t||r)},r.\u0275mod=F({type:r}),r.\u0275inj=N({imports:[[je]]}),r})();var lt=(()=>{let i=class i{constructor(e){this.db=e,this.DATABASE="Categories"}saveCategoriesByChannelType(e,n){let o=this.getKey(n);return this.db.add(this.DATABASE,e,o).pipe(D(s=>e))}getCategoriesByChannelType(e){let n=this.getKey(e);return this.db.getByKey(this.DATABASE,n)}getKey(e){let n="";switch(e){case ce.Lazada:n="Lazada";break;case ce.Tokopedia:n="Tokopedia";break}return n}clearDatabase(){this.db.clear(this.DATABASE)}getHostName(){let e=localStorage.getItem("Authorization");return this.hostName=JSON.parse(e)?.Host,this.hostName}};i.\u0275fac=function(n){return new(n||i)(h(Ee))},i.\u0275prov=E({token:i,factory:i.\u0275fac,providedIn:"root"});let r=i;return r})();var ut=(()=>{let i=class i{constructor(){}inititalizeIntercom(){let e=this.getFromLocalStorage();e?.Enabled&&window.Intercom("boot",{app_id:"xv1oomgl",name:e.Name,email:e.Email,created_at:e.Created,user_hash:e.Hash})}shutdown(){this.getFromLocalStorage()?.Enabled&&(window.Intercom("shutdown"),this.clearStorage())}clearStorage(){localStorage.removeItem("Intercom")}updateLocalStorage(e){e&&(e.Enabled=!0),localStorage.setItem("Intercom",JSON.stringify(e))}getFromLocalStorage(){let e=localStorage.getItem("Intercom");return JSON.parse(e)}hideLauncher(){let e=this.getFromLocalStorage();e?.Enabled&&(window.Intercom("update",{app_id:"xv1oomgl",hide_default_launcher:!0}),e.hide_default_launcher=!0,this.updateLocalStorage(e))}showLauncher(){let e=this.getFromLocalStorage();e?.Enabled&&(window.Intercom("update",{app_id:"xv1oomgl",hide_default_launcher:!1}),e.hide_default_launcher=!1,this.updateLocalStorage(e))}isHideLauncher(){let e=this.getFromLocalStorage();return z.IsEmpty(e?.hide_default_launcher)?!1:e?.hide_default_launcher}};i.\u0275fac=function(n){return new(n||i)},i.\u0275prov=E({token:i,factory:i.\u0275fac,providedIn:"root"});let r=i;return r})();var Ai=(()=>{let i=class i{constructor(e,n,o,s,a,c,l){this.httpService=e,this.tokenDecodeService=n,this.afAuth=o,this.ngxPermission=s,this.localDataService=a,this.router=c,this.intercomService=l,this.channels=[]}login(e){return this.httpService.post("/api/token/Login",e).pipe(U(n=>{this.setLocalStorage(n,e.Host,e.Username),this.loadPermissions()}))}loginWithGoogle(e,n){e.preventDefault();let o=new he;return o.setCustomParameters({prompt:"select_account"}),x(this.afAuth.signInWithPopup(o)).pipe(D(s=>s.credential),D(s=>s.idToken),_(s=>this.httpService.post("/api/token/LoginWithSocialProvider",JSON.stringify({IDToken:s,Host:n}))),U(s=>{this.setLocalStorage(s,n,null),this.loadPermissions()}))}setLocalStorage(e,n,o){localStorage.setItem("user",JSON.stringify(e)),localStorage.setItem("Authorization",JSON.stringify({Host:n,username:o})),localStorage.setItem("channels",JSON.stringify(e.Channels)),this.intercomService.updateLocalStorage(e.IntercomWidget),this.intercomService.inititalizeIntercom()}loadPermissions(){this.ngxPermission.loadPermissions([]);let e=localStorage.getItem("user");if(z.IsNotEmpty(e)){let n=this.tokenDecodeService.GetRoles();this.ngxPermission.loadPermissions(n)}}getChannels(){let e=JSON.parse(JSON.stringify(this.channels));if(this.channels.length===0){let n=localStorage.getItem("channels");n?(this.channels=JSON.parse(n),e=JSON.parse(JSON.stringify(this.channels))):(this.channels=[],e=[])}return e=this.setChannelLogo(e),e}setChannelLogo(e){return e=e.map(n=>(n.logo=z.getChannelLogoByTypeId(n.TypeID),n)),e}logout(){this.clearLocalStorage(),this.ngxPermission.flushPermissions()}isActiveToken(){let e=JSON.parse(window.localStorage.getItem("user")),n=new Date;if(e!=null){let o=new Date(e.Token.expiredAt);return n<o?!0:(this.clearLocalStorage(),!1)}else return!1}getDomain(){if(!this.domain){let e=localStorage.getItem("Authorization");this.domain="https://"+JSON.parse(e).Host}return this.domain}clearLocalStorage(){this.domain=null,this.channels=[],localStorage.removeItem("channels"),localStorage.removeItem("user"),this.intercomService.shutdown(),this.localDataService.clearDatabase(),this.router.navigate([""])}};i.\u0275fac=function(n){return new(n||i)(h(Be),h(Ne),h(be),h(Ue),h(lt),h(Fe),h(ut))},i.\u0275prov=E({token:i,factory:i.\u0275fac,providedIn:"root"});let r=i;return r})();export{Pn as a,gr as b,Er as c,lt as d,Ai as e};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as P,e as V}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.0/Marketplace/chunk-3CJHQAXO.js";import{A as _,s as h,t as O,y as q,z as f}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.0/Marketplace/chunk-ZXG2LRR7.js";import{c as M,h as v,k as S,r as j,t as K}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.0/Marketplace/chunk-ABFPL6TA.js";import{c as F}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.0/Marketplace/chunk-BBHP36L3.js";import{$a as k,Fa as s,Ga as g,Oa as d,Ua as y,Xb as W,Za as t,Zb as A,_a as i,_b as N,ea as C,hb as c,jb as x,ob as b,pb as m,qb as T,vb as L,wb as U,za as I}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.0/Marketplace/chunk-FAA5MCE6.js";function G(a,n){if(a&1&&(t(0,"tr")(1,"td")(2,"a",11),k(3,"img",12),t(4,"span"),m(5),i()()(),t(6,"td"),m(7),i(),t(8,"td"),m(9),i()()),a&2){let u=n.$implicit;s(2),d("href","/menu/channel/marketplace/view?ID="+u.Key.ID,I),s(1),d("src",u.Logo,I),s(2),T(u.Key.Name),s(2),T(u.Value.Out),s(2),T(u.Value.Tg)}}var oe=(()=>{let n=class n{constructor(l,o){this.dialogRef=l,this.data=o,this.generateChannelName(),this.channels=this.setChannelLogo(o.channels)}ngOnInit(){this.modalConfig=new f,this.modalConfig.title="Channel - New Order Configuration is not Unique!",this.modalConfig.headerType=q.Warning,this.modalConfig.hideOk=!0,this.modalConfig.cancelText="Close",this.modalConfig.customWidth="500px",this.modalConfig.hideClose=!0}setChannelLogo(l){return l.map(o=>(o.Logo=F.getChannelLogoByTypeId(o.Key.TypeID),o))}generateChannelName(){this.channelNames="";let l=this.data.channels;l.forEach((o,e)=>{this.channelNames+=`${o.Key} ${e!=l.length-1?" + ":""}`})}onClose(){this.dialogRef.close()}};n.\u0275fac=function(o){return new(o||n)(g(h),g(O))},n.\u0275cmp=C({type:n,selectors:[["app-modal-channel-warning"]],decls:24,vars:2,consts:[[3,"config","onCancel","onClose"],["content","",1,"pt-2","px-4"],[1,"row"],[1,"col-12"],[1,"lh-base","fs-5"],[1,"mb-4"],[1,"table","table-bordered"],[1,"table-light"],[4,"ngFor","ngForOf"],[1,"fs-5","mt-4"],["href","https://support.dealpos.com/en/articles/8281096-setup-multiple-channel-marketplace-to-one-warehouse-outlet","target","_blank"],["target","_blank",3,"href"],[1,"me-3",2,"width","24px",3,"src"]],template:function(o,e){o&1&&(t(0,"modal-material",0),c("onCancel",function(){return e.onClose()})("onClose",function(){return e.onClose()}),t(1,"div",1)(2,"div",2)(3,"div",3)(4,"p",4),m(5,"When your order configuration is not unique, your Dashboard Sales Report will be invalid. You can use either Outlet or Order Tag to differentiate Channel Order. "),i(),t(6,"h5",5),m(7,"Your duplicate Channels are"),i(),t(8,"table",6)(9,"thead")(10,"tr",7)(11,"th"),m(12,"Channel"),i(),t(13,"th"),m(14,"Outlet"),i(),t(15,"th"),m(16,"Tag"),i()()(),t(17,"tbody"),y(18,G,10,5,"tr",8),i()(),t(19,"p",9),m(20," Please refer to this "),t(21,"a",10),m(22,"article"),i(),m(23," for more information "),i()()()()()),o&2&&(d("config",e.modalConfig),s(18),d("ngForOf",e.channels))},dependencies:[A,_]});let a=n;return a})();var me=(()=>{let n=class n{constructor(l,o,e){this.dialogRef=l,this.httpService=o,this.toastr=e,this.modalConfig=new f,this.modalConfig.title="Write Off Reason"}onSubmit(){let l={Name:this.reason};this.subscription=this.httpService.post("/api/channel/AddWriteoffOption",l).subscribe(o=>{this.toastr.success(o.Message,"Success"),this.dialogRef.close(l)})}onClose(){this.dialogRef.close(!1)}ngOnDestroy(){this.subscription.unsubscribe()}};n.\u0275fac=function(o){return new(o||n)(g(h),g(V),g(P))},n.\u0275cmp=C({type:n,selectors:[["app-dialog-writeOff-reason"]],decls:7,vars:3,consts:[[3,"dynamicValidated","config","onClose","onCancel","onOk"],["content",""],[1,"form-label-group"],["type","text","id","writeOffReason","placeholder","Write Off Reason","name","writeOffReason",1,"form-control",3,"ngModel","ngModelChange"],["name","ngModel"],["for","shopid"]],template:function(o,e){o&1&&(t(0,"modal-material",0),c("onClose",function(){return e.onClose()})("onCancel",function(){return e.onClose()})("onOk",function(){return e.onSubmit()}),t(1,"div",1)(2,"div",2)(3,"input",3,4),c("ngModelChange",function(p){return e.reason=p}),i(),t(5,"label",5),m(6,"Reason"),i()()()()),o&2&&(d("dynamicValidated",e.reason)("config",e.modalConfig),s(3),d("ngModel",e.reason))},dependencies:[M,v,S,_],styles:[".mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}"]});let a=n;return a})();function $(a,n){a&1&&(t(0,"p"),m(1," URL is required "),i())}function H(a,n){if(a&1&&(t(0,"div",13),y(1,$,2,0,"p",14),i()),a&2){x();let u=b(10);s(1),d("ngIf",u.errors.required)}}function Y(a,n){a&1&&(t(0,"p"),m(1," Email is required "),i())}function B(a,n){a&1&&(t(0,"p"),m(1," Email is not valid "),i())}function J(a,n){if(a&1&&(t(0,"div",13),y(1,Y,2,0,"p",14)(2,B,2,0,"p",14),i()),a&2){x();let u=b(16);s(1),d("ngIf",u.errors.required),s(1),d("ngIf",u.errors.pattern)}}var Q=a=>({invalid:a}),X=()=>({updateOn:"blur"}),pe=(()=>{let n=class n{constructor(l){this.dialogRef=l}ngOnInit(){this.data={},this.initModalConfig()}initModalConfig(){this.modalConfig=new f,this.modalConfig.title="Fill data for Customer Support"}onSubmit(){this.dialogRef.close(this.data)}onClose(){this.dialogRef.close()}};n.\u0275fac=function(o){return new(o||n)(g(h))},n.\u0275cmp=C({type:n,selectors:[["app-contact-support"]],decls:18,vars:11,consts:[[3,"dynamicValidated","config","onClose","onCancel","onOk"],["content",""],[1,"mx-4"],["for","customerURL"],[1,"input-group","mb-5"],[1,"input-group-prepend"],["id","tokopediaUrl",1,"border-start-0","rounded-start","input-group-text","pointer-default","bg-light",2,"height","58px",3,"ngClass"],["required","","type","text","id","customerURL","name","customerURL","data-toggle","tooltip","title","customerURL",1,"form-control","border-start-0","customerUrl",3,"ngModel","ngModelChange"],["url","ngModel"],["class","text-danger",4,"ngIf"],["for","customerEmail"],["required","","type","text","id","customerEmail","name","customerEmail","data-toggle","tooltip","title","customerEmail","pattern","\\b[\\w\\.-]+@[\\w\\.-]+\\.\\w{2,4}\\b",1,"form-control",3,"ngModel","ngModelOptions","ngModelChange"],["email","ngModel"],[1,"text-danger"],[4,"ngIf"]],template:function(o,e){if(o&1&&(t(0,"modal-material",0),c("onClose",function(){return e.onClose()})("onCancel",function(){return e.onClose()})("onOk",function(){return e.onSubmit()}),t(1,"div",1)(2,"div",2)(3,"label",3),m(4,"Tokopedia URL"),i(),t(5,"div",4)(6,"div",5)(7,"span",6),m(8,"https://tokopedia.com/"),i()(),t(9,"input",7,8),c("ngModelChange",function(p){return e.data.URL=p}),i()(),y(11,H,2,1,"div",9),t(12,"label",10),m(13,"Requester's Email"),i(),t(14,"div",4)(15,"input",11,12),c("ngModelChange",function(p){return e.data.Email=p}),i()(),y(17,J,3,2,"div",9),i()()()),o&2){let r=b(10),p=b(16);d("dynamicValidated",!r.invalid&&!p.invalid)("config",e.modalConfig),s(7),d("ngClass",U(8,Q,r.invalid&&(r.dirty||r.touched))),s(2),d("ngModel",e.data.URL),s(2),d("ngIf",r.invalid&&(r.dirty||r.touched)),s(4),d("ngModel",e.data.Email)("ngModelOptions",L(10,X)),s(2),d("ngIf",p.invalid&&(p.dirty||p.touched))}},dependencies:[W,N,M,v,j,K,S,_],styles:["mat-form-field[_ngcontent-%COMP%]{width:100%;height:100%}.mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}.input-group[_ngcontent-%COMP%] > input[_ngcontent-%COMP%]{height:3.625rem;padding:.75rem;color:#343434;font-size:.875rem;border-radius:.25rem!important;border-color:#c8d3df}.input-group[_ngcontent-%COMP%] > input.ng-invalid.ng-touched[_ngcontent-%COMP%]{border-color:#fb404b}.input-group[_ngcontent-%COMP%] > input.customerUrl[_ngcontent-%COMP%]{border-top-left-radius:0!important;border-bottom-left-radius:0!important}.invalid[_ngcontent-%COMP%]{border-color:#fb404b}.pointer-default[_ngcontent-%COMP%]{cursor:default}"]});let a=n;return a})();var ue=(()=>{let n=class n{constructor(l,o){this.dialogRef=l,this.data=o}ngOnInit(){this.initModalConfig()}initModalConfig(){this.modalConfig=new f,this.modalConfig.title=this.data?.title,this.modalConfig.okText="SAVE"}onSubmit(){this.dialogRef.close(this.data)}onClose(){this.dialogRef.close()}};n.\u0275fac=function(o){return new(o||n)(g(h),g(O))},n.\u0275cmp=C({type:n,selectors:[["app-modal-dialog-tokopedia"]],decls:7,vars:3,consts:[[3,"dynamicValidated","config","onClose","onCancel","onOk"],["content",""],[1,"form-label-group"],["type","text","id","shopid","placeholder","Shop ID","name","ShopID","data-toggle","tooltip","title","Channel Name",1,"form-control",3,"ngModel","ngModelChange"],["name","ngModel"],["for","shopid"]],template:function(o,e){o&1&&(t(0,"modal-material",0),c("onClose",function(){return e.onClose()})("onCancel",function(){return e.onClose()})("onOk",function(){return e.onSubmit()}),t(1,"div",1)(2,"div",2)(3,"input",3,4),c("ngModelChange",function(p){return e.data.ShopID=p}),i(),t(5,"label",5),m(6,"Shop ID"),i()()()()),o&2&&(d("dynamicValidated",e.data.ShopID)("config",e.modalConfig),s(3),d("ngModel",e.data.ShopID))},dependencies:[M,v,S,_],styles:["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 a=n;return a})();var Me=(()=>{let n=class n{constructor(l,o){this.dialogRef=l,this.data=o,this.modalConfig=new f}ngOnInit(){this.initModalConfig()}initModalConfig(){this.modalConfig=new f,this.modalConfig.title="WooCommerce",this.modalConfig.okText="SAVE"}onSubmit(){this.data.TypeID=2,this.dialogRef.close(this.data)}onClose(){this.dialogRef.close()}};n.\u0275fac=function(o){return new(o||n)(g(h),g(O))},n.\u0275cmp=C({type:n,selectors:[["app-modal-dialog-woocommerce"]],decls:17,vars:5,consts:[[3,"dynamicValidated","config","onClose","onCancel","onOk"],["content",""],[1,"form-label-group"],["type","text","id","shopid","placeholder","Shop ID","name","URL","data-toggle","tooltip","title","URL",1,"form-control",3,"ngModel","ngModelChange"],["name","ngModel"],["for","shopid"],["type","text","id","ConsumerKey","placeholder","Consumer Key","name","ConsumerKey","data-toggle","tooltip","title","ConsumerKey",1,"form-control",3,"ngModel","ngModelChange"],["for","ConsumerKey"],["type","text","id","ConsumerSecret","placeholder","Consumer Secret","name","ConsumerSecret","data-toggle","tooltip","title","ConsumerSecret",1,"form-control",3,"ngModel","ngModelChange"],["for","ConsumerSecret"]],template:function(o,e){o&1&&(t(0,"modal-material",0),c("onClose",function(){return e.onClose()})("onCancel",function(){return e.onClose()})("onOk",function(){return e.onSubmit()}),t(1,"div",1)(2,"div",2)(3,"input",3,4),c("ngModelChange",function(p){return e.data.URL=p}),i(),t(5,"label",5),m(6,"URL"),i()(),t(7,"div",2)(8,"input",6,4),c("ngModelChange",function(p){return e.data.ConsumerKey=p}),i(),t(10,"label",7),m(11,"Consumer Key"),i()(),t(12,"div",2)(13,"input",8,4),c("ngModelChange",function(p){return e.data.ConsumerSecret=p}),i(),t(15,"label",9),m(16,"Consumer Secret"),i()()()()),o&2&&(d("dynamicValidated",e.data.ConsumerKey&&e.data.URL&&e.data.ConsumerSecret)("config",e.modalConfig),s(3),d("ngModel",e.data.URL),s(5),d("ngModel",e.data.ConsumerKey),s(5),d("ngModel",e.data.ConsumerSecret))},dependencies:[M,v,S,_],styles:["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 a=n;return a})();export{oe as a,me as b,pe as c,ue as d,Me as e};
|
|
1
|
+
import{b as P,e as V}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.2/Marketplace/chunk-MG7FPXZX.js";import{A as _,s as h,t as O,y as q,z as f}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.2/Marketplace/chunk-W5LP6HWA.js";import{c as M,h as v,k as S,r as j,t as K}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.2/Marketplace/chunk-IANWTXDM.js";import{c as F}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.2/Marketplace/chunk-QYP6WXYL.js";import{$a as k,Fa as s,Ga as g,Oa as d,Ua as y,Xb as W,Za as t,Zb as A,_a as i,_b as N,ea as C,hb as c,jb as x,ob as b,pb as m,qb as T,vb as L,wb as U,za as I}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.2/Marketplace/chunk-CQJJCQOZ.js";function G(a,n){if(a&1&&(t(0,"tr")(1,"td")(2,"a",11),k(3,"img",12),t(4,"span"),m(5),i()()(),t(6,"td"),m(7),i(),t(8,"td"),m(9),i()()),a&2){let u=n.$implicit;s(2),d("href","/menu/channel/marketplace/view?ID="+u.Key.ID,I),s(1),d("src",u.Logo,I),s(2),T(u.Key.Name),s(2),T(u.Value.Out),s(2),T(u.Value.Tg)}}var oe=(()=>{let n=class n{constructor(l,o){this.dialogRef=l,this.data=o,this.generateChannelName(),this.channels=this.setChannelLogo(o.channels)}ngOnInit(){this.modalConfig=new f,this.modalConfig.title="Channel - New Order Configuration is not Unique!",this.modalConfig.headerType=q.Warning,this.modalConfig.hideOk=!0,this.modalConfig.cancelText="Close",this.modalConfig.customWidth="500px",this.modalConfig.hideClose=!0}setChannelLogo(l){return l.map(o=>(o.Logo=F.getChannelLogoByTypeId(o.Key.TypeID),o))}generateChannelName(){this.channelNames="";let l=this.data.channels;l.forEach((o,e)=>{this.channelNames+=`${o.Key} ${e!=l.length-1?" + ":""}`})}onClose(){this.dialogRef.close()}};n.\u0275fac=function(o){return new(o||n)(g(h),g(O))},n.\u0275cmp=C({type:n,selectors:[["app-modal-channel-warning"]],decls:24,vars:2,consts:[[3,"config","onCancel","onClose"],["content","",1,"pt-2","px-4"],[1,"row"],[1,"col-12"],[1,"lh-base","fs-5"],[1,"mb-4"],[1,"table","table-bordered"],[1,"table-light"],[4,"ngFor","ngForOf"],[1,"fs-5","mt-4"],["href","https://support.dealpos.com/en/articles/8281096-setup-multiple-channel-marketplace-to-one-warehouse-outlet","target","_blank"],["target","_blank",3,"href"],[1,"me-3",2,"width","24px",3,"src"]],template:function(o,e){o&1&&(t(0,"modal-material",0),c("onCancel",function(){return e.onClose()})("onClose",function(){return e.onClose()}),t(1,"div",1)(2,"div",2)(3,"div",3)(4,"p",4),m(5,"When your order configuration is not unique, your Dashboard Sales Report will be invalid. You can use either Outlet or Order Tag to differentiate Channel Order. "),i(),t(6,"h5",5),m(7,"Your duplicate Channels are"),i(),t(8,"table",6)(9,"thead")(10,"tr",7)(11,"th"),m(12,"Channel"),i(),t(13,"th"),m(14,"Outlet"),i(),t(15,"th"),m(16,"Tag"),i()()(),t(17,"tbody"),y(18,G,10,5,"tr",8),i()(),t(19,"p",9),m(20," Please refer to this "),t(21,"a",10),m(22,"article"),i(),m(23," for more information "),i()()()()()),o&2&&(d("config",e.modalConfig),s(18),d("ngForOf",e.channels))},dependencies:[A,_]});let a=n;return a})();var me=(()=>{let n=class n{constructor(l,o,e){this.dialogRef=l,this.httpService=o,this.toastr=e,this.modalConfig=new f,this.modalConfig.title="Write Off Reason"}onSubmit(){let l={Name:this.reason};this.subscription=this.httpService.post("/api/channel/AddWriteoffOption",l).subscribe(o=>{this.toastr.success(o.Message,"Success"),this.dialogRef.close(l)})}onClose(){this.dialogRef.close(!1)}ngOnDestroy(){this.subscription.unsubscribe()}};n.\u0275fac=function(o){return new(o||n)(g(h),g(V),g(P))},n.\u0275cmp=C({type:n,selectors:[["app-dialog-writeOff-reason"]],decls:7,vars:3,consts:[[3,"dynamicValidated","config","onClose","onCancel","onOk"],["content",""],[1,"form-label-group"],["type","text","id","writeOffReason","placeholder","Write Off Reason","name","writeOffReason",1,"form-control",3,"ngModel","ngModelChange"],["name","ngModel"],["for","shopid"]],template:function(o,e){o&1&&(t(0,"modal-material",0),c("onClose",function(){return e.onClose()})("onCancel",function(){return e.onClose()})("onOk",function(){return e.onSubmit()}),t(1,"div",1)(2,"div",2)(3,"input",3,4),c("ngModelChange",function(p){return e.reason=p}),i(),t(5,"label",5),m(6,"Reason"),i()()()()),o&2&&(d("dynamicValidated",e.reason)("config",e.modalConfig),s(3),d("ngModel",e.reason))},dependencies:[M,v,S,_],styles:[".mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}"]});let a=n;return a})();function $(a,n){a&1&&(t(0,"p"),m(1," URL is required "),i())}function H(a,n){if(a&1&&(t(0,"div",13),y(1,$,2,0,"p",14),i()),a&2){x();let u=b(10);s(1),d("ngIf",u.errors.required)}}function Y(a,n){a&1&&(t(0,"p"),m(1," Email is required "),i())}function B(a,n){a&1&&(t(0,"p"),m(1," Email is not valid "),i())}function J(a,n){if(a&1&&(t(0,"div",13),y(1,Y,2,0,"p",14)(2,B,2,0,"p",14),i()),a&2){x();let u=b(16);s(1),d("ngIf",u.errors.required),s(1),d("ngIf",u.errors.pattern)}}var Q=a=>({invalid:a}),X=()=>({updateOn:"blur"}),pe=(()=>{let n=class n{constructor(l){this.dialogRef=l}ngOnInit(){this.data={},this.initModalConfig()}initModalConfig(){this.modalConfig=new f,this.modalConfig.title="Fill data for Customer Support"}onSubmit(){this.dialogRef.close(this.data)}onClose(){this.dialogRef.close()}};n.\u0275fac=function(o){return new(o||n)(g(h))},n.\u0275cmp=C({type:n,selectors:[["app-contact-support"]],decls:18,vars:11,consts:[[3,"dynamicValidated","config","onClose","onCancel","onOk"],["content",""],[1,"mx-4"],["for","customerURL"],[1,"input-group","mb-5"],[1,"input-group-prepend"],["id","tokopediaUrl",1,"border-start-0","rounded-start","input-group-text","pointer-default","bg-light",2,"height","58px",3,"ngClass"],["required","","type","text","id","customerURL","name","customerURL","data-toggle","tooltip","title","customerURL",1,"form-control","border-start-0","customerUrl",3,"ngModel","ngModelChange"],["url","ngModel"],["class","text-danger",4,"ngIf"],["for","customerEmail"],["required","","type","text","id","customerEmail","name","customerEmail","data-toggle","tooltip","title","customerEmail","pattern","\\b[\\w\\.-]+@[\\w\\.-]+\\.\\w{2,4}\\b",1,"form-control",3,"ngModel","ngModelOptions","ngModelChange"],["email","ngModel"],[1,"text-danger"],[4,"ngIf"]],template:function(o,e){if(o&1&&(t(0,"modal-material",0),c("onClose",function(){return e.onClose()})("onCancel",function(){return e.onClose()})("onOk",function(){return e.onSubmit()}),t(1,"div",1)(2,"div",2)(3,"label",3),m(4,"Tokopedia URL"),i(),t(5,"div",4)(6,"div",5)(7,"span",6),m(8,"https://tokopedia.com/"),i()(),t(9,"input",7,8),c("ngModelChange",function(p){return e.data.URL=p}),i()(),y(11,H,2,1,"div",9),t(12,"label",10),m(13,"Requester's Email"),i(),t(14,"div",4)(15,"input",11,12),c("ngModelChange",function(p){return e.data.Email=p}),i()(),y(17,J,3,2,"div",9),i()()()),o&2){let r=b(10),p=b(16);d("dynamicValidated",!r.invalid&&!p.invalid)("config",e.modalConfig),s(7),d("ngClass",U(8,Q,r.invalid&&(r.dirty||r.touched))),s(2),d("ngModel",e.data.URL),s(2),d("ngIf",r.invalid&&(r.dirty||r.touched)),s(4),d("ngModel",e.data.Email)("ngModelOptions",L(10,X)),s(2),d("ngIf",p.invalid&&(p.dirty||p.touched))}},dependencies:[W,N,M,v,j,K,S,_],styles:["mat-form-field[_ngcontent-%COMP%]{width:100%;height:100%}.mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}.input-group[_ngcontent-%COMP%] > input[_ngcontent-%COMP%]{height:3.625rem;padding:.75rem;color:#343434;font-size:.875rem;border-radius:.25rem!important;border-color:#c8d3df}.input-group[_ngcontent-%COMP%] > input.ng-invalid.ng-touched[_ngcontent-%COMP%]{border-color:#fb404b}.input-group[_ngcontent-%COMP%] > input.customerUrl[_ngcontent-%COMP%]{border-top-left-radius:0!important;border-bottom-left-radius:0!important}.invalid[_ngcontent-%COMP%]{border-color:#fb404b}.pointer-default[_ngcontent-%COMP%]{cursor:default}"]});let a=n;return a})();var ue=(()=>{let n=class n{constructor(l,o){this.dialogRef=l,this.data=o}ngOnInit(){this.initModalConfig()}initModalConfig(){this.modalConfig=new f,this.modalConfig.title=this.data?.title,this.modalConfig.okText="SAVE"}onSubmit(){this.dialogRef.close(this.data)}onClose(){this.dialogRef.close()}};n.\u0275fac=function(o){return new(o||n)(g(h),g(O))},n.\u0275cmp=C({type:n,selectors:[["app-modal-dialog-tokopedia"]],decls:7,vars:3,consts:[[3,"dynamicValidated","config","onClose","onCancel","onOk"],["content",""],[1,"form-label-group"],["type","text","id","shopid","placeholder","Shop ID","name","ShopID","data-toggle","tooltip","title","Channel Name",1,"form-control",3,"ngModel","ngModelChange"],["name","ngModel"],["for","shopid"]],template:function(o,e){o&1&&(t(0,"modal-material",0),c("onClose",function(){return e.onClose()})("onCancel",function(){return e.onClose()})("onOk",function(){return e.onSubmit()}),t(1,"div",1)(2,"div",2)(3,"input",3,4),c("ngModelChange",function(p){return e.data.ShopID=p}),i(),t(5,"label",5),m(6,"Shop ID"),i()()()()),o&2&&(d("dynamicValidated",e.data.ShopID)("config",e.modalConfig),s(3),d("ngModel",e.data.ShopID))},dependencies:[M,v,S,_],styles:["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 a=n;return a})();var Me=(()=>{let n=class n{constructor(l,o){this.dialogRef=l,this.data=o,this.modalConfig=new f}ngOnInit(){this.initModalConfig()}initModalConfig(){this.modalConfig=new f,this.modalConfig.title="WooCommerce",this.modalConfig.okText="SAVE"}onSubmit(){this.data.TypeID=2,this.dialogRef.close(this.data)}onClose(){this.dialogRef.close()}};n.\u0275fac=function(o){return new(o||n)(g(h),g(O))},n.\u0275cmp=C({type:n,selectors:[["app-modal-dialog-woocommerce"]],decls:17,vars:5,consts:[[3,"dynamicValidated","config","onClose","onCancel","onOk"],["content",""],[1,"form-label-group"],["type","text","id","shopid","placeholder","Shop ID","name","URL","data-toggle","tooltip","title","URL",1,"form-control",3,"ngModel","ngModelChange"],["name","ngModel"],["for","shopid"],["type","text","id","ConsumerKey","placeholder","Consumer Key","name","ConsumerKey","data-toggle","tooltip","title","ConsumerKey",1,"form-control",3,"ngModel","ngModelChange"],["for","ConsumerKey"],["type","text","id","ConsumerSecret","placeholder","Consumer Secret","name","ConsumerSecret","data-toggle","tooltip","title","ConsumerSecret",1,"form-control",3,"ngModel","ngModelChange"],["for","ConsumerSecret"]],template:function(o,e){o&1&&(t(0,"modal-material",0),c("onClose",function(){return e.onClose()})("onCancel",function(){return e.onClose()})("onOk",function(){return e.onSubmit()}),t(1,"div",1)(2,"div",2)(3,"input",3,4),c("ngModelChange",function(p){return e.data.URL=p}),i(),t(5,"label",5),m(6,"URL"),i()(),t(7,"div",2)(8,"input",6,4),c("ngModelChange",function(p){return e.data.ConsumerKey=p}),i(),t(10,"label",7),m(11,"Consumer Key"),i()(),t(12,"div",2)(13,"input",8,4),c("ngModelChange",function(p){return e.data.ConsumerSecret=p}),i(),t(15,"label",9),m(16,"Consumer Secret"),i()()()()),o&2&&(d("dynamicValidated",e.data.ConsumerKey&&e.data.URL&&e.data.ConsumerSecret)("config",e.modalConfig),s(3),d("ngModel",e.data.URL),s(5),d("ngModel",e.data.ConsumerKey),s(5),d("ngModel",e.data.ConsumerSecret))},dependencies:[M,v,S,_],styles:["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 a=n;return a})();export{oe as a,me as b,pe as c,ue as d,Me as e};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as B}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.
|
|
1
|
+
import{a as B}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.2/Marketplace/chunk-H65V337R.js";import{a as dt}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.2/Marketplace/chunk-VS4FYYKI.js";import{a as O}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.2/Marketplace/chunk-4SAZAICQ.js";import{e as lt}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.2/Marketplace/chunk-WIPT5BVZ.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.2/Marketplace/chunk-JGSLR6Q7.js";import{e as et}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.2/Marketplace/chunk-MG7FPXZX.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.2/Marketplace/chunk-VM5LF2AQ.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.2/Marketplace/chunk-ZSK75YJW.js";import{a as mt,c as ct,d as pt}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.2/Marketplace/chunk-NE4U3Z2F.js";import{B as k,C as st}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.2/Marketplace/chunk-W5LP6HWA.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.2/Marketplace/chunk-7QK5UPRO.js";import{h as nt,k as ot,u as at}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.2/Marketplace/chunk-IANWTXDM.js";import{c as rt}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.2/Marketplace/chunk-QYP6WXYL.js";import{$a as D,Cb as d,Db as _,Eb as S,Fa as m,Ga as v,Gc as it,Jc as R,Lb as Y,Lc as $,Oa as c,Q as j,T as z,Ua as u,V as q,Xb as Z,Za as r,Zb as tt,_a as o,_b as M,aa as I,ab as g,bb as h,bc as P,c as A,cc as w,db as G,ea as y,ec as L,fa as N,fc as F,hb as T,ja as b,jb as f,ka as E,mb as J,ob as K,pb as l,q as C,qb as s,rb as x,vb as Q,wb as W,xb as X,ya as U,za as H}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.2/Marketplace/chunk-CQJJCQOZ.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.2/Marketplace/chunk-FG5W5K4B.js";function It(t,e){if(t&1&&(r(0,"span",12),D(1,"img",13),o(),l(2)),t&2){let n=e.item;m(1),c("src",n.logo,H),m(1),x(" ",n.Name," ")}}function yt(t,e){if(t&1&&(g(0),l(1),d(2,"number"),r(3,"span"),l(4,"s"),o(),h()),t&2){let n=f().$implicit;m(1),x(" ",S(2,1,n.DurationInSecond,"1.1-1")," ")}}function Nt(t,e){t&1&&l(0," - ")}var bt=(t,e)=>({"bg-gradient-danger":t,"bg-gradient-warning":e}),Et=()=>["/menu/notification/detail"],Dt=t=>({ID:t});function Tt(t,e){if(t&1&&(g(0),r(1,"tr",14)(2,"td")(3,"a",15),D(4,"img",16),r(5,"span"),l(6),o()()(),r(7,"td")(8,"b"),l(9),o(),D(10,"div",17),o(),r(11,"td"),u(12,yt,5,4,"ng-container",18)(13,Nt,1,0,"ng-template",null,19,Y),o(),r(15,"td"),l(16),o(),r(17,"td"),l(18),d(19,"date"),o()(),h()),t&2){let n=e.$implicit,a=K(14);m(1),c("ngClass",X(14,bt,n.Status==1,n.Status==0)),m(2),c("routerLink",Q(17,Et))("queryParams",W(18,Dt,n.ID)),m(1),J("src",n.Img,H),m(2),s(n.Name),m(3),s(n.Label),m(1),c("innerHTML",n.Message,U),m(2),c("ngIf",n.DurationInSecond)("ngIfElse",a),m(4),s(n.StatusLabel),m(2),s(S(19,11,n.Created,"dd MMM yyyy HH:mm"))}}function Mt(t,e){if(t&1){let n=G();g(0),r(1,"div",4)(2,"div",20)(3,"app-custom-paginator",21),T("total",function(){b(n);let i=f(2);return E(i.getRowCount())})("next",function(){b(n);let i=f(2);return E(i.onNextPage())})("previous",function(){b(n);let i=f(2);return E(i.onPreviousPage())}),d(4,"async"),d(5,"async"),o()()(),h()}if(t&2){let n=f().ngIf,a=f();m(3),c("filter",a.filter)("totaldata",n==null?null:n.length)("paginationTotal",_(4,4,a.rowCount$))("hasClicked",_(5,6,a.rowCount$))}}function Pt(t,e){if(t&1&&(g(0),u(1,Mt,6,8,"ng-container",11),h()),t&2){let n=e.ngIf;m(1),c("ngIf",n.length>0)}}var ft=(()=>{let e=class e{constructor(a,i,p){this.http=a,this.notificationService=i,this.authService=p,this.filter=new dt,this.destroy$=new A,this.channelOptions=p.getChannels()}ngOnInit(){this.notificationService.clearNotification(),this.initPageLoader(),this.subscribeNotification()}subscribeNotification(){this.notificationService.getNotification().pipe(q(this.destroy$)).subscribe(a=>{a.length>0&&(this.getNotifications(),this.notificationService.clearNotification())})}initPageLoader(){this.http.post("/api/notification/Load",{}).subscribe(a=>{this.filter=a.Filter,this.filter.PageSize=this.filter.RowCount,this.getNotifications()})}onFilter(){this.rowCount$=null,this.getNotifications()}getNotifications(){let a={ChannelID:this.filter.ChannelID,RowCount:this.filter.PageSize,PageNumber:this.filter.PageNumber};this.notifications$=this.http.post("/api/notification/Get",a).pipe(C(i=>i.Data),C(i=>(i=this.setChannelLogoToNotifications(i),i=this.setTimeToSecond(i),i)),j(1))}setTimeToSecond(a){return a=a.map(i=>(i.DurationInSecond=parseInt(i.Duration)/1e3,i)),a}setChannelLogoToNotifications(a){return a=a.map(i=>(i.Img=rt.getChannelLogoByTypeId(i.TypeID),i)),a}onNextPage(){this.filter.PageNumber+=1,this.getNotifications()}onPreviousPage(){this.filter.PageNumber-=1,this.getNotifications()}getRowCount(){let a={ChannelID:this.filter.ChannelID};this.rowCount$=this.http.post("/api/notification/RowCount",a).pipe(C(i=>i.Count),j(1))}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}};e.\u0275fac=function(i){return new(i||e)(v(et),v(B),v(lt))},e.\u0275cmp=y({type:e,selectors:[["app-notification"]],decls:30,vars:9,consts:[["headerTitle","Notification","hideSearchBox","true",3,"onSubmit"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text","mt-2",3,"clearable","items","ngModel","ngModelChange"],["ng-option-tmp",""],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"table","table-hover"],[1,"sticky-top-thead"],[1,"table-light"],[4,"ngFor","ngForOf"],[4,"ngIf"],[1,"me-2"],["alt","",2,"width","18px",3,"src"],[3,"ngClass"],[3,"routerLink","queryParams"],["alt","",1,"channelLogo-md","me-4",3,"src"],[3,"innerHTML"],[4,"ngIf","ngIfElse"],["timeNotAvailable",""],[1,"col-12"],[3,"filter","totaldata","paginationTotal","hasClicked","total","next","previous"]],template:function(i,p){i&1&&(r(0,"mainpanel",0),T("onSubmit",function(){return p.onFilter()}),r(1,"filters")(2,"div")(3,"h6"),l(4,"Channel"),o(),r(5,"ng-select",1),T("ngModelChange",function(vt){return p.filter.ChannelID=vt}),u(6,It,3,2,"ng-template",2),o()()(),r(7,"content")(8,"div",3)(9,"div",4)(10,"div",5)(11,"div",6)(12,"table",7)(13,"thead",8)(14,"tr",9)(15,"th"),l(16,"Channel"),o(),r(17,"th"),l(18,"Process"),o(),r(19,"th"),l(20,"Duration"),o(),r(21,"th"),l(22,"Status"),o(),r(23,"th"),l(24,"Created"),o()()(),r(25,"tbody"),u(26,Tt,20,20,"ng-container",10),d(27,"async"),o()()()()(),u(28,Pt,2,1,"ng-container",11),d(29,"async"),o()()()),i&2&&(m(5),c("clearable",!0)("items",p.channelOptions)("ngModel",p.filter.ChannelID),m(21),c("ngForOf",_(27,5,p.notifications$)),m(2),c("ngIf",_(29,7,p.notifications$)))},dependencies:[Z,tt,M,ct,mt,nt,ot,k,R,O,P,L,w]});let t=e;return t})();function wt(t,e){if(t&1&&(r(0,"div",10)(1,"div",13)(2,"div",7)(3,"h5"),l(4,"Perflog"),o()(),r(5,"div",8)(6,"div",14)(7,"div",15)(8,"pre"),l(9),o()()()()()()),t&2){let n=f().ngIf;m(9),s(n.Perflog)}}function Lt(t,e){if(t&1&&(g(0),r(1,"div",17)(2,"div",13)(3,"div",7)(4,"h5"),l(5,"StackTrace"),o()(),r(6,"div",8)(7,"div",14)(8,"div",15)(9,"pre"),l(10),o()()()()()(),h()),t&2){let n=f().ngIf;m(10),s(n==null?null:n.StackTrace)}}function Ft(t,e){if(t&1&&(g(0),r(1,"mainpanel",1)(2,"actions")(3,"a",2),l(4,"Back"),o()(),r(5,"content")(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6)(10,"div",7)(11,"h5"),l(12,"General"),o()(),r(13,"div",8)(14,"div",9)(15,"div",10)(16,"div",11)(17,"label"),l(18,"Created Date"),o(),r(19,"div")(20,"span"),l(21),d(22,"date"),o()()()(),r(23,"div",10)(24,"div",11)(25,"label"),l(26,"Status"),o(),r(27,"div")(28,"span"),l(29),o()()()()(),r(30,"div",12)(31,"div",10)(32,"div",11)(33,"label"),l(34,"Duration"),o(),r(35,"div")(36,"span"),l(37),d(38,"number"),o()()()(),r(39,"div",10)(40,"div",11)(41,"label"),l(42,"Label"),o(),r(43,"div")(44,"span"),l(45),o()()()()()()()()(),r(46,"div",4)(47,"div",10)(48,"div",13)(49,"div",7)(50,"h5"),l(51,"Message"),o()(),r(52,"div",8)(53,"div",14)(54,"div",15)(55,"pre"),l(56),o()()()()()(),u(57,wt,10,1,"div",16)(58,Lt,11,1,"ng-container",0),o()()()(),h()),t&2){let n=e.ngIf;m(1),c("headerTitle","Notification "+n.Name)("hideSearchBox",!0)("hideSearchDropdown",!0),m(20),s(S(22,10,n.Created,"dd MMM yyyy HH:mm:ss")),m(8),s(n.StatusLabel),m(8),x("",S(38,13,n.DurationInSecond,"1.1-1")," s"),m(8),s(n.Label),m(11),s(n.Message),m(1),c("ngIf",n==null?null:n.Perflog),m(1),c("ngIf",n==null?null:n.StackTrace)}}var ut=(()=>{let e=class e{constructor(a,i){this.activatedRoute=a,this.notificationService=i}ngOnInit(){this.notification$=this.activatedRoute.queryParams.pipe(z(a=>{let i=a.ID;return this.notificationService.getNotificationDetail(i).pipe(C(p=>(p.DurationInSecond=parseInt(p.Duration)/1e3,p)))}))}};e.\u0275fac=function(i){return new(i||e)(v(it),v(B))},e.\u0275cmp=y({type:e,selectors:[["app-detail"]],decls:2,vars:3,consts:[[4,"ngIf"],[3,"headerTitle","hideSearchBox","hideSearchDropdown"],["role","button","routerLink","/menu/notification",1,"btn","btn-secondary","btn-fill","btn-lg","me-3"],[1,"container-fluid","mt-8"],[1,"row"],[1,"col-12"],[1,"card","mb-8"],[1,"card-header"],[1,"card-body"],[1,"row","mt-6"],[1,"col-sm-6"],[1,"info-label-group"],[1,"row","mt-4"],[1,"card"],[1,"col-sm-12","mt-2"],[1,"form-group"],["class","col-sm-6",4,"ngIf"],[1,"col-sm-12"]],template:function(i,p){i&1&&(u(0,Ft,59,16,"ng-container",0),d(1,"async")),i&2&&c("ngIf",_(1,1,p.notification$))},dependencies:[M,k,R,P,L,w]});let t=e;return t})();var Rt=[{path:"",component:ft},{path:"detail",component:ut}],gt=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275mod=N({type:e}),e.\u0275inj=I({imports:[F,$.forChild(Rt)]});let t=e;return t})();var me=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275mod=N({type:e}),e.\u0275inj=I({imports:[F,gt,pt,at,st,$,O]});let t=e;return t})();export{me as NotificationModule};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{$ as f,A as b,E as F,Gb as X,I as L,Ia as q,Ic as Z,Ja as V,L as G,N as y,R as M,T as j,Ta as Q,X as C,aa as K,ba as E,ca as c,d,da as p,fa as N,ga as J,ia as Y,m as g,n as h,q as S,s as m,t as I,w as z}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.0/Marketplace/chunk-FAA5MCE6.js";import{a as l,b as v}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.0/Marketplace/chunk-HET33HC6.js";var A={REMOVE:"remove",SHOW:"show"},ee=(()=>{let t=class t{constructor(){this.strategiesSource=new d({}),this.strategies$=this.strategiesSource.asObservable()}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=f({token:t,factory:t.\u0275fac});let r=t;return r})(),B=new E("USE_CONFIGURATION_STORE"),$=(()=>{let t=class t{constructor(e=!1,i){this.isolate=e,this.configurationStore=i,this.strategiesSource=this.isolate?new d({}):this.configurationStore.strategiesSource,this.strategies$=this.strategiesSource.asObservable(),this.onAuthorisedDefaultStrategy=this.isolate?void 0:this.configurationStore.onAuthorisedDefaultStrategy,this.onUnAuthorisedDefaultStrategy=this.isolate?void 0:this.configurationStore.onUnAuthorisedDefaultStrategy}setDefaultOnAuthorizedStrategy(e){this.isolate?this.onAuthorisedDefaultStrategy=this.getDefinedStrategy(e):(this.configurationStore.onAuthorisedDefaultStrategy=this.getDefinedStrategy(e),this.onAuthorisedDefaultStrategy=this.configurationStore.onAuthorisedDefaultStrategy)}setDefaultOnUnauthorizedStrategy(e){this.isolate?this.onUnAuthorisedDefaultStrategy=this.getDefinedStrategy(e):(this.configurationStore.onUnAuthorisedDefaultStrategy=this.getDefinedStrategy(e),this.onUnAuthorisedDefaultStrategy=this.configurationStore.onUnAuthorisedDefaultStrategy)}addPermissionStrategy(e,i){this.strategiesSource.value[e]=i}getStrategy(e){return this.strategiesSource.value[e]}getAllStrategies(){return this.strategiesSource.value}getDefinedStrategy(e){if(this.strategiesSource.value[e]||this.isPredefinedStrategy(e))return e;throw new Error(`No ' ${e} ' strategy is found please define one`)}isPredefinedStrategy(e){return e===A.SHOW||e===A.REMOVE}};t.\u0275fac=function(i){return new(i||t)(c(B),c(ee))},t.\u0275prov=f({token:t,factory:t.\u0275fac});let r=t;return r})();function u(r){return typeof r=="function"}function k(r){if(Object.prototype.toString.call(r)!=="[object Object]")return!1;{let t=Object.getPrototypeOf(r);return t===null||t===Object.prototype}}function ie(r){return!!r&&typeof r=="string"}function T(r){return typeof r=="boolean"}function te(r){return Object.prototype.toString.call(r)==="[object Promise]"}function O(r){return Array.isArray(r)?r.length>0:!!r}function R(r){return ie(r)?[r]:r}var se=(()=>{let t=class t{constructor(){this.permissionsSource=new d({}),this.permissions$=this.permissionsSource.asObservable()}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=f({token:t,factory:t.\u0275fac});let r=t;return r})(),W=new E("USE_PERMISSIONS_STORE"),x=(()=>{let t=class t{constructor(e=!1,i){this.isolate=e,this.permissionsStore=i,this.permissionsSource=this.isolate?new d({}):this.permissionsStore.permissionsSource,this.permissions$=this.permissionsSource.asObservable()}flushPermissions(){this.permissionsSource.next({})}hasPermission(e){return!e||Array.isArray(e)&&e.length===0?Promise.resolve(!0):(e=R(e),this.hasArrayPermission(e))}loadPermissions(e,i){let s=e.reduce((o,n)=>this.reducePermission(o,n,i),{});this.permissionsSource.next(s)}addPermission(e,i){if(Array.isArray(e)){let s=e.reduce((o,n)=>this.reducePermission(o,n,i),this.permissionsSource.value);this.permissionsSource.next(s)}else{let s=this.reducePermission(this.permissionsSource.value,e,i);this.permissionsSource.next(s)}}removePermission(e){let i=l({},this.permissionsSource.value);delete i[e],this.permissionsSource.next(i)}getPermission(e){return this.permissionsSource.value[e]}getPermissions(){return this.permissionsSource.value}reducePermission(e,i,s){return s&&u(s)?v(l({},e),{[i]:{name:i,validationFunction:s}}):v(l({},e),{[i]:{name:i}})}hasArrayPermission(e){let i=e.map(s=>{if(this.hasPermissionValidationFunction(s)){let o=this.permissionsSource.value[s].validationFunction,n=l({},this.permissionsSource.value);return h(null).pipe(S(()=>o(s,n)),j(a=>T(a)?h(a):a),F(()=>h(!1)))}return h(!!this.permissionsSource.value[s])});return g(i).pipe(I(),y(s=>s!==!1,!1),S(s=>s!==!1)).toPromise().then(s=>s)}hasPermissionValidationFunction(e){return!!this.permissionsSource.value[e]&&!!this.permissionsSource.value[e].validationFunction&&u(this.permissionsSource.value[e].validationFunction)}};t.\u0275fac=function(i){return new(i||t)(c(W),c(se))},t.\u0275prov=f({token:t,factory:t.\u0275fac});let r=t;return r})(),U=class{constructor(){this.rolesSource=new d({}),this.roles$=this.rolesSource.asObservable()}},H=new E("USE_ROLES_STORE"),D=(()=>{let t=class t{constructor(e=!1,i,s){this.isolate=e,this.rolesStore=i,this.permissionsService=s,this.rolesSource=this.isolate?new d({}):this.rolesStore.rolesSource,this.roles$=this.rolesSource.asObservable()}addRole(e,i){let s=v(l({},this.rolesSource.value),{[e]:{name:e,validationFunction:i}});this.rolesSource.next(s)}addRoleWithPermissions(e,i){this.permissionsService.addPermission(i),this.addRole(e,i)}addRoles(e){Object.keys(e).forEach((i,s)=>{this.addRole(i,e[i])})}addRolesWithPermissions(e){Object.keys(e).forEach((i,s)=>{this.addRoleWithPermissions(i,e[i])})}flushRoles(){this.rolesSource.next({})}flushRolesAndPermissions(){this.flushRoles(),this.permissionsService.flushPermissions()}removeRole(e){let i=l({},this.rolesSource.value);delete i[e],this.rolesSource.next(i)}getRoles(){return this.rolesSource.value}getRole(e){return this.rolesSource.value[e]}hasOnlyRoles(e){return!e||Array.isArray(e)&&e.length===0?Promise.resolve(!0):(e=R(e),Promise.all([this.hasRoleKey(e),this.hasRolePermission(this.rolesSource.value,e)]).then(([s,o])=>s||o))}hasRoleKey(e){let i=e.map(s=>{if(!!this.rolesSource.value[s]&&!!this.rolesSource.value[s].validationFunction&&u(this.rolesSource.value[s].validationFunction)&&!te(this.rolesSource.value[s].validationFunction)){let n=this.rolesSource.value[s].validationFunction,a=l({},this.rolesSource.value);return h(null).pipe(S(()=>n(s,a)),j(P=>T(P)?h(P):P),F(()=>h(!1)))}return h(!1)});return g(i).pipe(I(),y(s=>s!==!1,!1),S(s=>s!==!1)).toPromise().then(s=>s)}hasRolePermission(e,i){return g(i).pipe(m(s=>e[s]&&Array.isArray(e[s].validationFunction)?g(e[s].validationFunction).pipe(m(o=>this.permissionsService.hasPermission(o)),G(o=>o===!0)):h(!1)),y(s=>s===!0,!1)).toPromise()}};t.\u0275fac=function(i){return new(i||t)(c(H),c(U),c(x))},t.\u0275prov=f({token:t,factory:t.\u0275fac});let r=t;return r})(),pe=(()=>{let t=class t{constructor(){this.permissionsAuthorized=new V,this.permissionsUnauthorized=new V,this.firstMergeUnusedRun=1,this.permissionsService=p(x),this.configurationService=p($),this.rolesService=p(D),this.viewContainer=p(Q),this.changeDetector=p(q),this.templateRef=p(X)}ngOnInit(){this.viewContainer.clear(),this.initPermissionSubscription=this.validateExceptOnlyPermissions()}ngOnChanges(e){let i=e.ngxPermissionsOnly,s=e.ngxPermissionsExcept;if(i||s){if(i&&i.firstChange||s&&s.firstChange)return;b(this.permissionsService.permissions$,this.rolesService.roles$).pipe(M(this.firstMergeUnusedRun),L(1)).subscribe(()=>{if(O(this.ngxPermissionsExcept)){this.validateExceptAndOnlyPermissions();return}if(O(this.ngxPermissionsOnly)){this.validateOnlyPermissions();return}this.handleAuthorisedPermission(this.getAuthorisedTemplates())})}}ngOnDestroy(){this.initPermissionSubscription&&this.initPermissionSubscription.unsubscribe()}validateExceptOnlyPermissions(){return b(this.permissionsService.permissions$,this.rolesService.roles$).pipe(M(this.firstMergeUnusedRun)).subscribe(()=>{if(O(this.ngxPermissionsExcept)){this.validateExceptAndOnlyPermissions();return}if(O(this.ngxPermissionsOnly)){this.validateOnlyPermissions();return}this.handleAuthorisedPermission(this.getAuthorisedTemplates())})}validateExceptAndOnlyPermissions(){Promise.all([this.permissionsService.hasPermission(this.ngxPermissionsExcept),this.rolesService.hasOnlyRoles(this.ngxPermissionsExcept)]).then(([e,i])=>{if(e||i){this.handleUnauthorisedPermission(this.ngxPermissionsExceptElse||this.ngxPermissionsElse);return}if(this.ngxPermissionsOnly)throw!1;this.handleAuthorisedPermission(this.ngxPermissionsExceptThen||this.ngxPermissionsThen||this.templateRef)}).catch(()=>{this.ngxPermissionsOnly?this.validateOnlyPermissions():this.handleAuthorisedPermission(this.ngxPermissionsExceptThen||this.ngxPermissionsThen||this.templateRef)})}validateOnlyPermissions(){Promise.all([this.permissionsService.hasPermission(this.ngxPermissionsOnly),this.rolesService.hasOnlyRoles(this.ngxPermissionsOnly)]).then(([e,i])=>{e||i?this.handleAuthorisedPermission(this.ngxPermissionsOnlyThen||this.ngxPermissionsThen||this.templateRef):this.handleUnauthorisedPermission(this.ngxPermissionsOnlyElse||this.ngxPermissionsElse)}).catch(()=>{this.handleUnauthorisedPermission(this.ngxPermissionsOnlyElse||this.ngxPermissionsElse)})}handleUnauthorisedPermission(e){if(!(T(this.currentAuthorizedState)&&!this.currentAuthorizedState)){if(this.currentAuthorizedState=!1,this.permissionsUnauthorized.emit(),this.getUnAuthorizedStrategyInput()){this.applyStrategyAccordingToStrategyType(this.getUnAuthorizedStrategyInput());return}this.configurationService.onUnAuthorisedDefaultStrategy&&!this.elseBlockDefined()?this.applyStrategy(this.configurationService.onUnAuthorisedDefaultStrategy):this.showTemplateBlockInView(e)}}handleAuthorisedPermission(e){if(!(T(this.currentAuthorizedState)&&this.currentAuthorizedState)){if(this.currentAuthorizedState=!0,this.permissionsAuthorized.emit(),this.getAuthorizedStrategyInput()){this.applyStrategyAccordingToStrategyType(this.getAuthorizedStrategyInput());return}this.configurationService.onAuthorisedDefaultStrategy&&!this.thenBlockDefined()?this.applyStrategy(this.configurationService.onAuthorisedDefaultStrategy):this.showTemplateBlockInView(e)}}applyStrategyAccordingToStrategyType(e){if(ie(e)){this.applyStrategy(e);return}if(u(e)){this.showTemplateBlockInView(this.templateRef),e(this.templateRef);return}}showTemplateBlockInView(e){this.viewContainer.clear(),e&&(this.viewContainer.createEmbeddedView(e),this.changeDetector.markForCheck())}getAuthorisedTemplates(){return this.ngxPermissionsOnlyThen||this.ngxPermissionsExceptThen||this.ngxPermissionsThen||this.templateRef}elseBlockDefined(){return!!this.ngxPermissionsExceptElse||!!this.ngxPermissionsElse}thenBlockDefined(){return!!this.ngxPermissionsExceptThen||!!this.ngxPermissionsThen}getAuthorizedStrategyInput(){return this.ngxPermissionsOnlyAuthorisedStrategy||this.ngxPermissionsExceptAuthorisedStrategy||this.ngxPermissionsAuthorisedStrategy}getUnAuthorizedStrategyInput(){return this.ngxPermissionsOnlyUnauthorisedStrategy||this.ngxPermissionsExceptUnauthorisedStrategy||this.ngxPermissionsUnauthorisedStrategy}applyStrategy(e){if(e===A.SHOW){this.showTemplateBlockInView(this.templateRef);return}if(e===A.REMOVE){this.viewContainer.clear();return}let i=this.configurationService.getStrategy(e);this.showTemplateBlockInView(this.templateRef),i(this.templateRef)}};t.\u0275fac=function(i){return new(i||t)},t.\u0275dir=J({type:t,selectors:[["","ngxPermissionsOnly",""],["","ngxPermissionsExcept",""]],inputs:{ngxPermissionsOnly:"ngxPermissionsOnly",ngxPermissionsOnlyThen:"ngxPermissionsOnlyThen",ngxPermissionsOnlyElse:"ngxPermissionsOnlyElse",ngxPermissionsExcept:"ngxPermissionsExcept",ngxPermissionsExceptElse:"ngxPermissionsExceptElse",ngxPermissionsExceptThen:"ngxPermissionsExceptThen",ngxPermissionsThen:"ngxPermissionsThen",ngxPermissionsElse:"ngxPermissionsElse",ngxPermissionsOnlyAuthorisedStrategy:"ngxPermissionsOnlyAuthorisedStrategy",ngxPermissionsOnlyUnauthorisedStrategy:"ngxPermissionsOnlyUnauthorisedStrategy",ngxPermissionsExceptUnauthorisedStrategy:"ngxPermissionsExceptUnauthorisedStrategy",ngxPermissionsExceptAuthorisedStrategy:"ngxPermissionsExceptAuthorisedStrategy",ngxPermissionsUnauthorisedStrategy:"ngxPermissionsUnauthorisedStrategy",ngxPermissionsAuthorisedStrategy:"ngxPermissionsAuthorisedStrategy"},outputs:{permissionsAuthorized:"permissionsAuthorized",permissionsUnauthorized:"permissionsUnauthorized"},features:[Y]});let r=t;return r})(),re="default";var _=(()=>{let t=class t{constructor(e,i,s){this.permissionsService=e,this.rolesService=i,this.router=s}canActivate(e,i){return this.hasPermissions(e,i)}canActivateChild(e,i){return this.hasPermissions(e,i)}canLoad(e){return this.hasPermissions(e)}canMatch(e){return this.hasPermissions(e)}hasPermissions(e,i){let s=e&&e.data?e.data.permissions:{},o=this.transformPermission(s,e,i);return this.isParameterAvailable(o.except)?this.passingExceptPermissionsValidation(o,e,i):this.isParameterAvailable(o.only)?this.passingOnlyPermissionsValidation(o,e,i):!0}transformPermission(e,i,s){let o=u(e.only)?e.only(i,s):R(e.only),n=u(e.except)?e.except(i,s):R(e.except),a=e.redirectTo;return{only:o,except:n,redirectTo:a}}isParameterAvailable(e){return!!e&&e.length>0}passingExceptPermissionsValidation(e,i,s){if(e.redirectTo&&(u(e.redirectTo)||k(e.redirectTo)&&!this.isRedirectionWithParameters(e.redirectTo))){let o="";return g(e.except).pipe(m(n=>z([this.permissionsService.hasPermission(n),this.rolesService.hasOnlyRoles(n)]).pipe(C(a=>{a.every(w=>w===!1)||(o=n)}))),y(n=>n.some(a=>a===!0),!1),m(n=>o?(this.handleRedirectOfFailedPermission(e,o,i,s),h(!1)):!n&&e.only?this.onlyRedirectCheck(e,i,s):h(!n))).toPromise()}return Promise.all([this.permissionsService.hasPermission(e.except),this.rolesService.hasOnlyRoles(e.except)]).then(([o,n])=>o||n?(e.redirectTo&&this.redirectToAnotherRoute(e.redirectTo,i,s),!1):e.only?this.checkOnlyPermissions(e,i,s):!0)}redirectToAnotherRoute(e,i,s,o){let n=u(e)?e(o,i,s):e;if(this.isRedirectionWithParameters(n)){n.navigationCommands=this.transformNavigationCommands(n.navigationCommands,i,s),n.navigationExtras=this.transformNavigationExtras(n.navigationExtras,i,s),this.router.navigate(n.navigationCommands,n.navigationExtras);return}Array.isArray(n)?this.router.navigate(n):this.router.navigate([n])}isRedirectionWithParameters(e){return k(e)&&(!!e.navigationCommands||!!e.navigationExtras)}transformNavigationCommands(e,i,s){return u(e)?e(i,s):e}transformNavigationExtras(e,i,s){return u(e)?e(i,s):e}onlyRedirectCheck(e,i,s){let o="";return g(e.only).pipe(m(n=>z([this.permissionsService.hasPermission(n),this.rolesService.hasOnlyRoles(n)]).pipe(C(a=>{a.every(w=>w===!1)&&(o=n)}))),y(n=>u(e.redirectTo)?n.some(a=>a===!0):n.every(a=>a===!1),!1),m(n=>u(e.redirectTo)?n?h(!0):(this.handleRedirectOfFailedPermission(e,o,i,s),h(!1)):(o&&this.handleRedirectOfFailedPermission(e,o,i,s),h(!n)))).toPromise()}handleRedirectOfFailedPermission(e,i,s,o){this.isFailedPermissionPropertyOfRedirectTo(e,i)?this.redirectToAnotherRoute(e.redirectTo[i],s,o,i):u(e.redirectTo)?this.redirectToAnotherRoute(e.redirectTo,s,o,i):this.redirectToAnotherRoute(e.redirectTo[re],s,o,i)}isFailedPermissionPropertyOfRedirectTo(e,i){return!!e.redirectTo&&e.redirectTo[i]}checkOnlyPermissions(e,i,s){let o=l({},e);return Promise.all([this.permissionsService.hasPermission(o.only),this.rolesService.hasOnlyRoles(o.only)]).then(([n,a])=>n||a?!0:(o.redirectTo&&this.redirectToAnotherRoute(o.redirectTo,i,s),!1))}passingOnlyPermissionsValidation(e,i,s){return u(e.redirectTo)||k(e.redirectTo)&&!this.isRedirectionWithParameters(e.redirectTo)?this.onlyRedirectCheck(e,i,s):this.checkOnlyPermissions(e,i,s)}};t.\u0275fac=function(i){return new(i||t)(c(x),c(D),c(Z))},t.\u0275prov=f({token:t,factory:t.\u0275fac});let r=t;return r})();var ye=(()=>{let t=class t{static forRoot(e={}){return{ngModule:t,providers:[se,U,ee,x,_,D,$,{provide:W,useValue:e.permissionsIsolate},{provide:H,useValue:e.rolesIsolate},{provide:B,useValue:e.configurationIsolate}]}}static forChild(e={}){return{ngModule:t,providers:[{provide:W,useValue:e.permissionsIsolate},{provide:H,useValue:e.rolesIsolate},{provide:B,useValue:e.configurationIsolate},$,x,D,_]}}};t.\u0275fac=function(i){return new(i||t)},t.\u0275mod=N({type:t}),t.\u0275inj=K({});let r=t;return r})();export{x as a,pe as b,ye as c};
|
|
1
|
+
import{$ as f,A as b,E as F,Gb as X,I as L,Ia as q,Ic as Z,Ja as V,L as G,N as y,R as M,T as j,Ta as Q,X as C,aa as K,ba as E,ca as c,d,da as p,fa as N,ga as J,ia as Y,m as g,n as h,q as S,s as m,t as I,w as z}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.2/Marketplace/chunk-CQJJCQOZ.js";import{a as l,b as v}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.2/Marketplace/chunk-FG5W5K4B.js";var A={REMOVE:"remove",SHOW:"show"},ee=(()=>{let t=class t{constructor(){this.strategiesSource=new d({}),this.strategies$=this.strategiesSource.asObservable()}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=f({token:t,factory:t.\u0275fac});let r=t;return r})(),B=new E("USE_CONFIGURATION_STORE"),$=(()=>{let t=class t{constructor(e=!1,i){this.isolate=e,this.configurationStore=i,this.strategiesSource=this.isolate?new d({}):this.configurationStore.strategiesSource,this.strategies$=this.strategiesSource.asObservable(),this.onAuthorisedDefaultStrategy=this.isolate?void 0:this.configurationStore.onAuthorisedDefaultStrategy,this.onUnAuthorisedDefaultStrategy=this.isolate?void 0:this.configurationStore.onUnAuthorisedDefaultStrategy}setDefaultOnAuthorizedStrategy(e){this.isolate?this.onAuthorisedDefaultStrategy=this.getDefinedStrategy(e):(this.configurationStore.onAuthorisedDefaultStrategy=this.getDefinedStrategy(e),this.onAuthorisedDefaultStrategy=this.configurationStore.onAuthorisedDefaultStrategy)}setDefaultOnUnauthorizedStrategy(e){this.isolate?this.onUnAuthorisedDefaultStrategy=this.getDefinedStrategy(e):(this.configurationStore.onUnAuthorisedDefaultStrategy=this.getDefinedStrategy(e),this.onUnAuthorisedDefaultStrategy=this.configurationStore.onUnAuthorisedDefaultStrategy)}addPermissionStrategy(e,i){this.strategiesSource.value[e]=i}getStrategy(e){return this.strategiesSource.value[e]}getAllStrategies(){return this.strategiesSource.value}getDefinedStrategy(e){if(this.strategiesSource.value[e]||this.isPredefinedStrategy(e))return e;throw new Error(`No ' ${e} ' strategy is found please define one`)}isPredefinedStrategy(e){return e===A.SHOW||e===A.REMOVE}};t.\u0275fac=function(i){return new(i||t)(c(B),c(ee))},t.\u0275prov=f({token:t,factory:t.\u0275fac});let r=t;return r})();function u(r){return typeof r=="function"}function k(r){if(Object.prototype.toString.call(r)!=="[object Object]")return!1;{let t=Object.getPrototypeOf(r);return t===null||t===Object.prototype}}function ie(r){return!!r&&typeof r=="string"}function T(r){return typeof r=="boolean"}function te(r){return Object.prototype.toString.call(r)==="[object Promise]"}function O(r){return Array.isArray(r)?r.length>0:!!r}function R(r){return ie(r)?[r]:r}var se=(()=>{let t=class t{constructor(){this.permissionsSource=new d({}),this.permissions$=this.permissionsSource.asObservable()}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=f({token:t,factory:t.\u0275fac});let r=t;return r})(),W=new E("USE_PERMISSIONS_STORE"),x=(()=>{let t=class t{constructor(e=!1,i){this.isolate=e,this.permissionsStore=i,this.permissionsSource=this.isolate?new d({}):this.permissionsStore.permissionsSource,this.permissions$=this.permissionsSource.asObservable()}flushPermissions(){this.permissionsSource.next({})}hasPermission(e){return!e||Array.isArray(e)&&e.length===0?Promise.resolve(!0):(e=R(e),this.hasArrayPermission(e))}loadPermissions(e,i){let s=e.reduce((o,n)=>this.reducePermission(o,n,i),{});this.permissionsSource.next(s)}addPermission(e,i){if(Array.isArray(e)){let s=e.reduce((o,n)=>this.reducePermission(o,n,i),this.permissionsSource.value);this.permissionsSource.next(s)}else{let s=this.reducePermission(this.permissionsSource.value,e,i);this.permissionsSource.next(s)}}removePermission(e){let i=l({},this.permissionsSource.value);delete i[e],this.permissionsSource.next(i)}getPermission(e){return this.permissionsSource.value[e]}getPermissions(){return this.permissionsSource.value}reducePermission(e,i,s){return s&&u(s)?v(l({},e),{[i]:{name:i,validationFunction:s}}):v(l({},e),{[i]:{name:i}})}hasArrayPermission(e){let i=e.map(s=>{if(this.hasPermissionValidationFunction(s)){let o=this.permissionsSource.value[s].validationFunction,n=l({},this.permissionsSource.value);return h(null).pipe(S(()=>o(s,n)),j(a=>T(a)?h(a):a),F(()=>h(!1)))}return h(!!this.permissionsSource.value[s])});return g(i).pipe(I(),y(s=>s!==!1,!1),S(s=>s!==!1)).toPromise().then(s=>s)}hasPermissionValidationFunction(e){return!!this.permissionsSource.value[e]&&!!this.permissionsSource.value[e].validationFunction&&u(this.permissionsSource.value[e].validationFunction)}};t.\u0275fac=function(i){return new(i||t)(c(W),c(se))},t.\u0275prov=f({token:t,factory:t.\u0275fac});let r=t;return r})(),U=class{constructor(){this.rolesSource=new d({}),this.roles$=this.rolesSource.asObservable()}},H=new E("USE_ROLES_STORE"),D=(()=>{let t=class t{constructor(e=!1,i,s){this.isolate=e,this.rolesStore=i,this.permissionsService=s,this.rolesSource=this.isolate?new d({}):this.rolesStore.rolesSource,this.roles$=this.rolesSource.asObservable()}addRole(e,i){let s=v(l({},this.rolesSource.value),{[e]:{name:e,validationFunction:i}});this.rolesSource.next(s)}addRoleWithPermissions(e,i){this.permissionsService.addPermission(i),this.addRole(e,i)}addRoles(e){Object.keys(e).forEach((i,s)=>{this.addRole(i,e[i])})}addRolesWithPermissions(e){Object.keys(e).forEach((i,s)=>{this.addRoleWithPermissions(i,e[i])})}flushRoles(){this.rolesSource.next({})}flushRolesAndPermissions(){this.flushRoles(),this.permissionsService.flushPermissions()}removeRole(e){let i=l({},this.rolesSource.value);delete i[e],this.rolesSource.next(i)}getRoles(){return this.rolesSource.value}getRole(e){return this.rolesSource.value[e]}hasOnlyRoles(e){return!e||Array.isArray(e)&&e.length===0?Promise.resolve(!0):(e=R(e),Promise.all([this.hasRoleKey(e),this.hasRolePermission(this.rolesSource.value,e)]).then(([s,o])=>s||o))}hasRoleKey(e){let i=e.map(s=>{if(!!this.rolesSource.value[s]&&!!this.rolesSource.value[s].validationFunction&&u(this.rolesSource.value[s].validationFunction)&&!te(this.rolesSource.value[s].validationFunction)){let n=this.rolesSource.value[s].validationFunction,a=l({},this.rolesSource.value);return h(null).pipe(S(()=>n(s,a)),j(P=>T(P)?h(P):P),F(()=>h(!1)))}return h(!1)});return g(i).pipe(I(),y(s=>s!==!1,!1),S(s=>s!==!1)).toPromise().then(s=>s)}hasRolePermission(e,i){return g(i).pipe(m(s=>e[s]&&Array.isArray(e[s].validationFunction)?g(e[s].validationFunction).pipe(m(o=>this.permissionsService.hasPermission(o)),G(o=>o===!0)):h(!1)),y(s=>s===!0,!1)).toPromise()}};t.\u0275fac=function(i){return new(i||t)(c(H),c(U),c(x))},t.\u0275prov=f({token:t,factory:t.\u0275fac});let r=t;return r})(),pe=(()=>{let t=class t{constructor(){this.permissionsAuthorized=new V,this.permissionsUnauthorized=new V,this.firstMergeUnusedRun=1,this.permissionsService=p(x),this.configurationService=p($),this.rolesService=p(D),this.viewContainer=p(Q),this.changeDetector=p(q),this.templateRef=p(X)}ngOnInit(){this.viewContainer.clear(),this.initPermissionSubscription=this.validateExceptOnlyPermissions()}ngOnChanges(e){let i=e.ngxPermissionsOnly,s=e.ngxPermissionsExcept;if(i||s){if(i&&i.firstChange||s&&s.firstChange)return;b(this.permissionsService.permissions$,this.rolesService.roles$).pipe(M(this.firstMergeUnusedRun),L(1)).subscribe(()=>{if(O(this.ngxPermissionsExcept)){this.validateExceptAndOnlyPermissions();return}if(O(this.ngxPermissionsOnly)){this.validateOnlyPermissions();return}this.handleAuthorisedPermission(this.getAuthorisedTemplates())})}}ngOnDestroy(){this.initPermissionSubscription&&this.initPermissionSubscription.unsubscribe()}validateExceptOnlyPermissions(){return b(this.permissionsService.permissions$,this.rolesService.roles$).pipe(M(this.firstMergeUnusedRun)).subscribe(()=>{if(O(this.ngxPermissionsExcept)){this.validateExceptAndOnlyPermissions();return}if(O(this.ngxPermissionsOnly)){this.validateOnlyPermissions();return}this.handleAuthorisedPermission(this.getAuthorisedTemplates())})}validateExceptAndOnlyPermissions(){Promise.all([this.permissionsService.hasPermission(this.ngxPermissionsExcept),this.rolesService.hasOnlyRoles(this.ngxPermissionsExcept)]).then(([e,i])=>{if(e||i){this.handleUnauthorisedPermission(this.ngxPermissionsExceptElse||this.ngxPermissionsElse);return}if(this.ngxPermissionsOnly)throw!1;this.handleAuthorisedPermission(this.ngxPermissionsExceptThen||this.ngxPermissionsThen||this.templateRef)}).catch(()=>{this.ngxPermissionsOnly?this.validateOnlyPermissions():this.handleAuthorisedPermission(this.ngxPermissionsExceptThen||this.ngxPermissionsThen||this.templateRef)})}validateOnlyPermissions(){Promise.all([this.permissionsService.hasPermission(this.ngxPermissionsOnly),this.rolesService.hasOnlyRoles(this.ngxPermissionsOnly)]).then(([e,i])=>{e||i?this.handleAuthorisedPermission(this.ngxPermissionsOnlyThen||this.ngxPermissionsThen||this.templateRef):this.handleUnauthorisedPermission(this.ngxPermissionsOnlyElse||this.ngxPermissionsElse)}).catch(()=>{this.handleUnauthorisedPermission(this.ngxPermissionsOnlyElse||this.ngxPermissionsElse)})}handleUnauthorisedPermission(e){if(!(T(this.currentAuthorizedState)&&!this.currentAuthorizedState)){if(this.currentAuthorizedState=!1,this.permissionsUnauthorized.emit(),this.getUnAuthorizedStrategyInput()){this.applyStrategyAccordingToStrategyType(this.getUnAuthorizedStrategyInput());return}this.configurationService.onUnAuthorisedDefaultStrategy&&!this.elseBlockDefined()?this.applyStrategy(this.configurationService.onUnAuthorisedDefaultStrategy):this.showTemplateBlockInView(e)}}handleAuthorisedPermission(e){if(!(T(this.currentAuthorizedState)&&this.currentAuthorizedState)){if(this.currentAuthorizedState=!0,this.permissionsAuthorized.emit(),this.getAuthorizedStrategyInput()){this.applyStrategyAccordingToStrategyType(this.getAuthorizedStrategyInput());return}this.configurationService.onAuthorisedDefaultStrategy&&!this.thenBlockDefined()?this.applyStrategy(this.configurationService.onAuthorisedDefaultStrategy):this.showTemplateBlockInView(e)}}applyStrategyAccordingToStrategyType(e){if(ie(e)){this.applyStrategy(e);return}if(u(e)){this.showTemplateBlockInView(this.templateRef),e(this.templateRef);return}}showTemplateBlockInView(e){this.viewContainer.clear(),e&&(this.viewContainer.createEmbeddedView(e),this.changeDetector.markForCheck())}getAuthorisedTemplates(){return this.ngxPermissionsOnlyThen||this.ngxPermissionsExceptThen||this.ngxPermissionsThen||this.templateRef}elseBlockDefined(){return!!this.ngxPermissionsExceptElse||!!this.ngxPermissionsElse}thenBlockDefined(){return!!this.ngxPermissionsExceptThen||!!this.ngxPermissionsThen}getAuthorizedStrategyInput(){return this.ngxPermissionsOnlyAuthorisedStrategy||this.ngxPermissionsExceptAuthorisedStrategy||this.ngxPermissionsAuthorisedStrategy}getUnAuthorizedStrategyInput(){return this.ngxPermissionsOnlyUnauthorisedStrategy||this.ngxPermissionsExceptUnauthorisedStrategy||this.ngxPermissionsUnauthorisedStrategy}applyStrategy(e){if(e===A.SHOW){this.showTemplateBlockInView(this.templateRef);return}if(e===A.REMOVE){this.viewContainer.clear();return}let i=this.configurationService.getStrategy(e);this.showTemplateBlockInView(this.templateRef),i(this.templateRef)}};t.\u0275fac=function(i){return new(i||t)},t.\u0275dir=J({type:t,selectors:[["","ngxPermissionsOnly",""],["","ngxPermissionsExcept",""]],inputs:{ngxPermissionsOnly:"ngxPermissionsOnly",ngxPermissionsOnlyThen:"ngxPermissionsOnlyThen",ngxPermissionsOnlyElse:"ngxPermissionsOnlyElse",ngxPermissionsExcept:"ngxPermissionsExcept",ngxPermissionsExceptElse:"ngxPermissionsExceptElse",ngxPermissionsExceptThen:"ngxPermissionsExceptThen",ngxPermissionsThen:"ngxPermissionsThen",ngxPermissionsElse:"ngxPermissionsElse",ngxPermissionsOnlyAuthorisedStrategy:"ngxPermissionsOnlyAuthorisedStrategy",ngxPermissionsOnlyUnauthorisedStrategy:"ngxPermissionsOnlyUnauthorisedStrategy",ngxPermissionsExceptUnauthorisedStrategy:"ngxPermissionsExceptUnauthorisedStrategy",ngxPermissionsExceptAuthorisedStrategy:"ngxPermissionsExceptAuthorisedStrategy",ngxPermissionsUnauthorisedStrategy:"ngxPermissionsUnauthorisedStrategy",ngxPermissionsAuthorisedStrategy:"ngxPermissionsAuthorisedStrategy"},outputs:{permissionsAuthorized:"permissionsAuthorized",permissionsUnauthorized:"permissionsUnauthorized"},features:[Y]});let r=t;return r})(),re="default";var _=(()=>{let t=class t{constructor(e,i,s){this.permissionsService=e,this.rolesService=i,this.router=s}canActivate(e,i){return this.hasPermissions(e,i)}canActivateChild(e,i){return this.hasPermissions(e,i)}canLoad(e){return this.hasPermissions(e)}canMatch(e){return this.hasPermissions(e)}hasPermissions(e,i){let s=e&&e.data?e.data.permissions:{},o=this.transformPermission(s,e,i);return this.isParameterAvailable(o.except)?this.passingExceptPermissionsValidation(o,e,i):this.isParameterAvailable(o.only)?this.passingOnlyPermissionsValidation(o,e,i):!0}transformPermission(e,i,s){let o=u(e.only)?e.only(i,s):R(e.only),n=u(e.except)?e.except(i,s):R(e.except),a=e.redirectTo;return{only:o,except:n,redirectTo:a}}isParameterAvailable(e){return!!e&&e.length>0}passingExceptPermissionsValidation(e,i,s){if(e.redirectTo&&(u(e.redirectTo)||k(e.redirectTo)&&!this.isRedirectionWithParameters(e.redirectTo))){let o="";return g(e.except).pipe(m(n=>z([this.permissionsService.hasPermission(n),this.rolesService.hasOnlyRoles(n)]).pipe(C(a=>{a.every(w=>w===!1)||(o=n)}))),y(n=>n.some(a=>a===!0),!1),m(n=>o?(this.handleRedirectOfFailedPermission(e,o,i,s),h(!1)):!n&&e.only?this.onlyRedirectCheck(e,i,s):h(!n))).toPromise()}return Promise.all([this.permissionsService.hasPermission(e.except),this.rolesService.hasOnlyRoles(e.except)]).then(([o,n])=>o||n?(e.redirectTo&&this.redirectToAnotherRoute(e.redirectTo,i,s),!1):e.only?this.checkOnlyPermissions(e,i,s):!0)}redirectToAnotherRoute(e,i,s,o){let n=u(e)?e(o,i,s):e;if(this.isRedirectionWithParameters(n)){n.navigationCommands=this.transformNavigationCommands(n.navigationCommands,i,s),n.navigationExtras=this.transformNavigationExtras(n.navigationExtras,i,s),this.router.navigate(n.navigationCommands,n.navigationExtras);return}Array.isArray(n)?this.router.navigate(n):this.router.navigate([n])}isRedirectionWithParameters(e){return k(e)&&(!!e.navigationCommands||!!e.navigationExtras)}transformNavigationCommands(e,i,s){return u(e)?e(i,s):e}transformNavigationExtras(e,i,s){return u(e)?e(i,s):e}onlyRedirectCheck(e,i,s){let o="";return g(e.only).pipe(m(n=>z([this.permissionsService.hasPermission(n),this.rolesService.hasOnlyRoles(n)]).pipe(C(a=>{a.every(w=>w===!1)&&(o=n)}))),y(n=>u(e.redirectTo)?n.some(a=>a===!0):n.every(a=>a===!1),!1),m(n=>u(e.redirectTo)?n?h(!0):(this.handleRedirectOfFailedPermission(e,o,i,s),h(!1)):(o&&this.handleRedirectOfFailedPermission(e,o,i,s),h(!n)))).toPromise()}handleRedirectOfFailedPermission(e,i,s,o){this.isFailedPermissionPropertyOfRedirectTo(e,i)?this.redirectToAnotherRoute(e.redirectTo[i],s,o,i):u(e.redirectTo)?this.redirectToAnotherRoute(e.redirectTo,s,o,i):this.redirectToAnotherRoute(e.redirectTo[re],s,o,i)}isFailedPermissionPropertyOfRedirectTo(e,i){return!!e.redirectTo&&e.redirectTo[i]}checkOnlyPermissions(e,i,s){let o=l({},e);return Promise.all([this.permissionsService.hasPermission(o.only),this.rolesService.hasOnlyRoles(o.only)]).then(([n,a])=>n||a?!0:(o.redirectTo&&this.redirectToAnotherRoute(o.redirectTo,i,s),!1))}passingOnlyPermissionsValidation(e,i,s){return u(e.redirectTo)||k(e.redirectTo)&&!this.isRedirectionWithParameters(e.redirectTo)?this.onlyRedirectCheck(e,i,s):this.checkOnlyPermissions(e,i,s)}};t.\u0275fac=function(i){return new(i||t)(c(x),c(D),c(Z))},t.\u0275prov=f({token:t,factory:t.\u0275fac});let r=t;return r})();var ye=(()=>{let t=class t{static forRoot(e={}){return{ngModule:t,providers:[se,U,ee,x,_,D,$,{provide:W,useValue:e.permissionsIsolate},{provide:H,useValue:e.rolesIsolate},{provide:B,useValue:e.configurationIsolate}]}}static forChild(e={}){return{ngModule:t,providers:[{provide:W,useValue:e.permissionsIsolate},{provide:H,useValue:e.rolesIsolate},{provide:B,useValue:e.configurationIsolate},$,x,D,_]}}};t.\u0275fac=function(i){return new(i||t)},t.\u0275mod=N({type:t}),t.\u0275inj=K({});let r=t;return r})();export{x as a,pe as b,ye as c};
|
package/Marketplace/index.html
CHANGED
|
@@ -17,8 +17,8 @@
|
|
|
17
17
|
<script>
|
|
18
18
|
(function () { var w = window; var ic = w.Intercom; if (typeof ic === "function") { ic('reattach_activator'); ic('update', w.intercomSettings); } else { var d = document; var i = function () { i.c(arguments); }; i.q = []; i.c = function (args) { i.q.push(args); }; w.Intercom = i; var l = function () { var s = d.createElement('script'); s.type = 'text/javascript'; s.async = true; s.src = 'https://widget.intercom.io/widget/xv1oomgl'; var x = d.getElementsByTagName('script')[0]; x.parentNode.insertBefore(s, x); }; if (w.attachEvent) { w.attachEvent('onload', l); } else { w.addEventListener('load', l, false); } } })();
|
|
19
19
|
</script>
|
|
20
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/marketplacepos@3.7.
|
|
20
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/marketplacepos@3.7.2/Marketplace/styles-DC4DACOA.css"><link rel="modulepreload" href="https://cdn.jsdelivr.net/npm/marketplacepos@3.7.2/Marketplace/chunk-F7PVCSNW.js"><link rel="modulepreload" href="https://cdn.jsdelivr.net/npm/marketplacepos@3.7.2/Marketplace/chunk-WIPT5BVZ.js"><link rel="modulepreload" href="https://cdn.jsdelivr.net/npm/marketplacepos@3.7.2/Marketplace/chunk-JGSLR6Q7.js"><link rel="modulepreload" href="https://cdn.jsdelivr.net/npm/marketplacepos@3.7.2/Marketplace/chunk-MG7FPXZX.js"><link rel="modulepreload" href="https://cdn.jsdelivr.net/npm/marketplacepos@3.7.2/Marketplace/chunk-VM5LF2AQ.js"><link rel="modulepreload" href="https://cdn.jsdelivr.net/npm/marketplacepos@3.7.2/Marketplace/chunk-ZSK75YJW.js"><link rel="modulepreload" href="https://cdn.jsdelivr.net/npm/marketplacepos@3.7.2/Marketplace/chunk-T4IQWUBV.js"><link rel="modulepreload" href="https://cdn.jsdelivr.net/npm/marketplacepos@3.7.2/Marketplace/chunk-7QK5UPRO.js"><link rel="modulepreload" href="https://cdn.jsdelivr.net/npm/marketplacepos@3.7.2/Marketplace/chunk-QYP6WXYL.js"><link rel="modulepreload" href="https://cdn.jsdelivr.net/npm/marketplacepos@3.7.2/Marketplace/chunk-CQJJCQOZ.js"><link rel="modulepreload" href="https://cdn.jsdelivr.net/npm/marketplacepos@3.7.2/Marketplace/chunk-FG5W5K4B.js"></head>
|
|
21
21
|
<body>
|
|
22
22
|
<app-root></app-root>
|
|
23
|
-
<script src="https://cdn.jsdelivr.net/npm/marketplacepos@3.7.
|
|
23
|
+
<script src="https://cdn.jsdelivr.net/npm/marketplacepos@3.7.2/Marketplace/polyfills-FXABYPWM.js" type="module"></script><script src="https://cdn.jsdelivr.net/npm/marketplacepos@3.7.2/Marketplace/scripts-M46NWPTC.js" defer></script><script src="https://cdn.jsdelivr.net/npm/marketplacepos@3.7.2/Marketplace/main-AUAZAZGD.js" type="module"></script></body>
|
|
24
24
|
</html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as F}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.0/Marketplace/chunk-SW4RH2OZ.js";import{a as Ie,b as we,c as Fe,e as Be}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.0/Marketplace/chunk-7H5NOLAT.js";import{a as xe}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.0/Marketplace/chunk-D6U7F3FE.js";import{a as _e,b as ve,c as ye,d as Pe,e as Me}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.0/Marketplace/chunk-3CJHQAXO.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.0/Marketplace/chunk-XYLU3LCF.js";import{c as Te}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.0/Marketplace/chunk-C4WLCPS5.js";import{f as He}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.0/Marketplace/chunk-GMQAKOAO.js";import{p as Re}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.0/Marketplace/chunk-6UISEE6K.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.0/Marketplace/chunk-BBHP36L3.js";import{$ as P,$a as c,$b as pe,A as J,B as N,C as Z,Cb as se,Db as ae,Fa as i,Fc as Oe,G as E,Ga as f,Gc as Se,Hc as De,Ic as T,K,La as m,Lc as Y,M as Q,Na as $,Oa as a,Ob as ce,Pa as s,Qa as b,Ra as D,T as L,Ua as y,X as ee,Xb as le,Yb as de,Za as d,_a as p,_b as I,aa as _,bc as ue,ca as S,cb as oe,db as q,e as B,ea as g,fa as v,fc as ge,ga as te,hb as A,ja as j,jb as l,ka as U,kc as w,lc as me,na as k,nc as fe,oc as ke,pb as M,pc as be,q as R,qb as ie,rb as re,s as X,sc as Ce,tc as V,wb as x,wc as C,xc as he,y as H,ya as ne,yc as W,zc as G}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.0/Marketplace/chunk-FAA5MCE6.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.0/Marketplace/chunk-HET33HC6.js";function ze(e,o){e&1&&oe(0)}function Xe(e,o){if(e&1&&c(0,"sk-cube-grid",4),e&2){let t=l(2);a("backgroundColor",t.backgroundColor)}}function Je(e,o){if(e&1&&c(0,"sk-chasing-dots",4),e&2){let t=l(2);a("backgroundColor",t.backgroundColor)}}function Ze(e,o){if(e&1&&c(0,"sk-double-bounce",4),e&2){let t=l(2);a("backgroundColor",t.backgroundColor)}}function Ke(e,o){if(e&1&&c(0,"sk-rotating-plane",4),e&2){let t=l(2);a("backgroundColor",t.backgroundColor)}}function Qe(e,o){if(e&1&&c(0,"sk-spinner-pulse",4),e&2){let t=l(2);a("backgroundColor",t.backgroundColor)}}function et(e,o){if(e&1&&c(0,"sk-three-bounce",4),e&2){let t=l(2);a("backgroundColor",t.backgroundColor)}}function tt(e,o){if(e&1&&c(0,"sk-wandering-cubes",4),e&2){let t=l(2);a("backgroundColor",t.backgroundColor)}}function nt(e,o){if(e&1&&c(0,"sk-wave",4),e&2){let t=l(2);a("backgroundColor",t.backgroundColor)}}var ot=e=>({"background-color":e});function it(e,o){if(e&1&&(d(0,"div",1),y(1,ze,1,0,"ng-container",2)(2,Xe,1,1,"sk-cube-grid",3)(3,Je,1,1,"sk-chasing-dots",3)(4,Ze,1,1,"sk-double-bounce",3)(5,Ke,1,1,"sk-rotating-plane",3)(6,Qe,1,1,"sk-spinner-pulse",3)(7,et,1,1,"sk-three-bounce",3)(8,tt,1,1,"sk-wandering-cubes",3)(9,nt,1,1,"sk-wave",3),p()),e&2){let t=l();s("opacity",t.opacity),b("backdrop",t.backdrop),a("ngStyle",x(14,ot,t.backdrop?t.backdropBackgroundColor:"transparent")),i(1),a("ngComponentOutlet",t.entryComponent),i(1),a("ngIf",t.spinner===t.spinkit.skCubeGrid),i(1),a("ngIf",t.spinner===t.spinkit.skChasingDots),i(1),a("ngIf",t.spinner===t.spinkit.skDoubleBounce),i(1),a("ngIf",t.spinner===t.spinkit.skRotatingPlane),i(1),a("ngIf",t.spinner===t.spinkit.skSpinnerPulse),i(1),a("ngIf",t.spinner===t.spinkit.skThreeBounce),i(1),a("ngIf",t.spinner===t.spinkit.skWanderingCubes),i(1),a("ngIf",t.spinner===t.spinkit.skWave)}}var h=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275dir=te({type:e,inputs:{backgroundColor:"backgroundColor"}}),e})(),rt=(()=>{class e extends h{}return e.\u0275fac=(()=>{let o;return function(n){return(o||(o=k(e)))(n||e)}})(),e.\u0275cmp=g({type:e,selectors:[["sk-chasing-dots"]],features:[m],decls:3,vars:6,consts:[[1,"sk-chasing-dots"],[1,"sk-child","sk-dot1"],[1,"sk-child","sk-dot2"]],template:function(t,n){t&1&&(d(0,"div",0),c(1,"div",1)(2,"div",2),p()),t&2&&(b("colored",!n.backgroundColor),i(1),s("background-color",n.backgroundColor),i(1),s("background-color",n.backgroundColor))},styles:[".sk-chasing-dots[_ngcontent-%COMP%]{top:50%;margin:auto;width:40px;height:40px;position:relative;text-align:center;animation:_ngcontent-%COMP%_sk-chasingDotsRotate 2s infinite linear}.sk-chasing-dots[_ngcontent-%COMP%] .sk-child[_ngcontent-%COMP%]{width:60%;height:60%;display:inline-block;position:absolute;top:0;border-radius:100%;animation:_ngcontent-%COMP%_sk-chasingDotsBounce 2s infinite ease-in-out}.sk-chasing-dots[_ngcontent-%COMP%] .sk-dot2[_ngcontent-%COMP%]{top:auto;bottom:0;animation-delay:-1s}@keyframes _ngcontent-%COMP%_sk-chasingDotsRotate{to{transform:rotate(360deg)}}@keyframes _ngcontent-%COMP%_sk-chasingDotsBounce{0%,to{transform:scale(0)}50%{transform:scale(1)}}"]}),e})(),st=(()=>{class e extends h{}return e.\u0275fac=(()=>{let o;return function(n){return(o||(o=k(e)))(n||e)}})(),e.\u0275cmp=g({type:e,selectors:[["sk-cube-grid"]],features:[m],decls:10,vars:20,consts:[[1,"sk-cube-grid"],[1,"sk-cube","sk-cube1"],[1,"sk-cube","sk-cube2"],[1,"sk-cube","sk-cube3"],[1,"sk-cube","sk-cube4"],[1,"sk-cube","sk-cube5"],[1,"sk-cube","sk-cube6"],[1,"sk-cube","sk-cube7"],[1,"sk-cube","sk-cube8"],[1,"sk-cube","sk-cube9"]],template:function(t,n){t&1&&(d(0,"div",0),c(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"div",5)(6,"div",6)(7,"div",7)(8,"div",8)(9,"div",9),p()),t&2&&(b("colored",!n.backgroundColor),i(1),s("background-color",n.backgroundColor),i(1),s("background-color",n.backgroundColor),i(1),s("background-color",n.backgroundColor),i(1),s("background-color",n.backgroundColor),i(1),s("background-color",n.backgroundColor),i(1),s("background-color",n.backgroundColor),i(1),s("background-color",n.backgroundColor),i(1),s("background-color",n.backgroundColor),i(1),s("background-color",n.backgroundColor))},styles:[".sk-cube-grid[_ngcontent-%COMP%]{position:relative;top:50%;width:40px;height:40px;margin:auto}.sk-cube-grid[_ngcontent-%COMP%] .sk-cube[_ngcontent-%COMP%]{width:33.33%;height:33.33%;float:left;animation:_ngcontent-%COMP%_sk-cubeGridScaleDelay 1.3s infinite ease-in-out}.sk-cube-grid[_ngcontent-%COMP%] .sk-cube1[_ngcontent-%COMP%]{animation-delay:.2s}.sk-cube-grid[_ngcontent-%COMP%] .sk-cube2[_ngcontent-%COMP%]{animation-delay:.3s}.sk-cube-grid[_ngcontent-%COMP%] .sk-cube3[_ngcontent-%COMP%]{animation-delay:.4s}.sk-cube-grid[_ngcontent-%COMP%] .sk-cube4[_ngcontent-%COMP%]{animation-delay:.1s}.sk-cube-grid[_ngcontent-%COMP%] .sk-cube5[_ngcontent-%COMP%]{animation-delay:.2s}.sk-cube-grid[_ngcontent-%COMP%] .sk-cube6[_ngcontent-%COMP%]{animation-delay:.3s}.sk-cube-grid[_ngcontent-%COMP%] .sk-cube7[_ngcontent-%COMP%]{animation-delay:0s}.sk-cube-grid[_ngcontent-%COMP%] .sk-cube8[_ngcontent-%COMP%]{animation-delay:.1s}.sk-cube-grid[_ngcontent-%COMP%] .sk-cube9[_ngcontent-%COMP%]{animation-delay:.2s}@keyframes _ngcontent-%COMP%_sk-cubeGridScaleDelay{0%,70%,to{transform:scaleZ(1)}35%{transform:scale3D(0,0,1)}}"]}),e})(),at=(()=>{class e extends h{}return e.\u0275fac=(()=>{let o;return function(n){return(o||(o=k(e)))(n||e)}})(),e.\u0275cmp=g({type:e,selectors:[["sk-double-bounce"]],features:[m],decls:3,vars:6,consts:[[1,"sk-double-bounce"],[1,"sk-child","sk-double-bounce1"],[1,"sk-child","sk-double-bounce2"]],template:function(t,n){t&1&&(d(0,"div",0),c(1,"div",1)(2,"div",2),p()),t&2&&(b("colored",!n.backgroundColor),i(1),s("background-color",n.backgroundColor),i(1),s("background-color",n.backgroundColor))},styles:[".sk-double-bounce[_ngcontent-%COMP%]{top:50%;width:40px;height:40px;position:relative;margin:auto}.sk-double-bounce[_ngcontent-%COMP%] .sk-child[_ngcontent-%COMP%]{width:100%;height:100%;border-radius:50%;background-color:#333;opacity:.6;position:absolute;top:0;left:0;animation:_ngcontent-%COMP%_sk-doubleBounce 2s infinite ease-in-out}.sk-double-bounce[_ngcontent-%COMP%] .sk-double-bounce2[_ngcontent-%COMP%]{animation-delay:-1s}@keyframes _ngcontent-%COMP%_sk-doubleBounce{0%,to{transform:scale(0)}50%{transform:scale(1)}}"]}),e})(),ct=(()=>{class e extends h{}return e.\u0275fac=(()=>{let o;return function(n){return(o||(o=k(e)))(n||e)}})(),e.\u0275cmp=g({type:e,selectors:[["sk-rotating-plane"]],features:[m],decls:1,vars:2,consts:[[1,"sk-rotating-plane","colored-parent"]],template:function(t,n){t&1&&c(0,"div",0),t&2&&s("background-color",n.backgroundColor)},styles:[".sk-rotating-plane[_ngcontent-%COMP%]{position:relative;top:50%;width:40px;height:40px;margin:auto;animation:_ngcontent-%COMP%_sk-rotatePlane 1.2s infinite ease-in-out}@keyframes _ngcontent-%COMP%_sk-rotatePlane{0%{transform:perspective(120px) rotateX(0) rotateY(0)}50%{transform:perspective(120px) rotateX(-180.1deg) rotateY(0)}to{transform:perspective(120px) rotateX(-180deg) rotateY(-179.9deg)}}"]}),e})(),lt=(()=>{class e extends h{}return e.\u0275fac=(()=>{let o;return function(n){return(o||(o=k(e)))(n||e)}})(),e.\u0275cmp=g({type:e,selectors:[["sk-spinner-pulse"]],features:[m],decls:1,vars:2,consts:[[1,"sk-spinner","sk-spinner-pulse","colored-parent"]],template:function(t,n){t&1&&c(0,"div",0),t&2&&s("background-color",n.backgroundColor)},styles:[".sk-spinner-pulse[_ngcontent-%COMP%]{position:relative;top:50%;width:40px;height:40px;margin:auto;border-radius:100%;animation:_ngcontent-%COMP%_sk-pulseScaleOut 1s infinite ease-in-out}@keyframes _ngcontent-%COMP%_sk-pulseScaleOut{0%{transform:scale(0)}to{transform:scale(1);opacity:0}}"]}),e})(),dt=(()=>{class e extends h{}return e.\u0275fac=(()=>{let o;return function(n){return(o||(o=k(e)))(n||e)}})(),e.\u0275cmp=g({type:e,selectors:[["sk-three-bounce"]],features:[m],decls:4,vars:8,consts:[[1,"sk-three-bounce"],[1,"sk-child","sk-bounce1"],[1,"sk-child","sk-bounce2"],[1,"sk-child","sk-bounce3"]],template:function(t,n){t&1&&(d(0,"div",0),c(1,"div",1)(2,"div",2)(3,"div",3),p()),t&2&&(b("colored",!n.backgroundColor),i(1),s("background-color",n.backgroundColor),i(1),s("background-color",n.backgroundColor),i(1),s("background-color",n.backgroundColor))},styles:[".sk-three-bounce[_ngcontent-%COMP%]{top:50%;position:relative;margin:auto;width:80px;text-align:center}.sk-three-bounce[_ngcontent-%COMP%] .sk-child[_ngcontent-%COMP%]{width:20px;height:20px;border-radius:100%;display:inline-block;animation:_ngcontent-%COMP%_sk-three-bounce 1.4s ease-in-out 0s infinite both}.sk-three-bounce[_ngcontent-%COMP%] .sk-bounce1[_ngcontent-%COMP%]{animation-delay:-.32s}.sk-three-bounce[_ngcontent-%COMP%] .sk-bounce2[_ngcontent-%COMP%]{animation-delay:-.16s}@keyframes _ngcontent-%COMP%_sk-three-bounce{0%,80%,to{transform:scale(0)}40%{transform:scale(1)}}"]}),e})(),pt=(()=>{class e extends h{}return e.\u0275fac=(()=>{let o;return function(n){return(o||(o=k(e)))(n||e)}})(),e.\u0275cmp=g({type:e,selectors:[["sk-wandering-cubes"]],features:[m],decls:3,vars:6,consts:[[1,"sk-wandering-cubes"],[1,"sk-cube","sk-cube1"],[1,"sk-cube","sk-cube2"]],template:function(t,n){t&1&&(d(0,"div",0),c(1,"div",1)(2,"div",2),p()),t&2&&(b("colored",!n.backgroundColor),i(1),s("background-color",n.backgroundColor),i(1),s("background-color",n.backgroundColor))},styles:[".sk-wandering-cubes[_ngcontent-%COMP%]{top:50%;margin:auto;width:40px;height:40px;position:relative}.sk-wandering-cubes[_ngcontent-%COMP%] .sk-cube[_ngcontent-%COMP%]{width:10px;height:10px;position:absolute;top:0;left:0;animation:_ngcontent-%COMP%_sk-wanderingCube 1.8s ease-in-out -1.8s infinite both}.sk-wandering-cubes[_ngcontent-%COMP%] .sk-cube2[_ngcontent-%COMP%]{animation-delay:-.9s}@keyframes _ngcontent-%COMP%_sk-wanderingCube{0%{transform:rotate(0)}25%{transform:translate(30px) rotate(-90deg) scale(.5)}50%{transform:translate(30px) translateY(30px) rotate(-179deg)}50.1%{transform:translate(30px) translateY(30px) rotate(-180deg)}75%{transform:translate(0) translateY(30px) rotate(-270deg) scale(.5)}to{transform:rotate(-360deg)}}"]}),e})(),ut=(()=>{class e extends h{}return e.\u0275fac=(()=>{let o;return function(n){return(o||(o=k(e)))(n||e)}})(),e.\u0275cmp=g({type:e,selectors:[["sk-wave"]],features:[m],decls:6,vars:12,consts:[[1,"sk-wave"],[1,"sk-rect","sk-rect1"],[1,"sk-rect","sk-rect2"],[1,"sk-rect","sk-rect3"],[1,"sk-rect","sk-rect4"],[1,"sk-rect","sk-rect5"]],template:function(t,n){t&1&&(d(0,"div",0),c(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"div",5),p()),t&2&&(b("colored",!n.backgroundColor),i(1),s("background-color",n.backgroundColor),i(1),s("background-color",n.backgroundColor),i(1),s("background-color",n.backgroundColor),i(1),s("background-color",n.backgroundColor),i(1),s("background-color",n.backgroundColor))},styles:[".sk-wave[_ngcontent-%COMP%]{position:relative;top:50%;margin:auto;width:50px;height:40px;text-align:center;font-size:10px}.sk-wave[_ngcontent-%COMP%] .sk-rect[_ngcontent-%COMP%]{float:left;margin-right:1px;height:100%;width:6px;display:inline-block;animation:_ngcontent-%COMP%_sk-waveStretchDelay 1.2s infinite ease-in-out}.sk-wave[_ngcontent-%COMP%] .sk-rect1[_ngcontent-%COMP%]{animation-delay:-1.2s}.sk-wave[_ngcontent-%COMP%] .sk-rect2[_ngcontent-%COMP%]{animation-delay:-1.1s}.sk-wave[_ngcontent-%COMP%] .sk-rect3[_ngcontent-%COMP%]{animation-delay:-1s}.sk-wave[_ngcontent-%COMP%] .sk-rect4[_ngcontent-%COMP%]{animation-delay:-.9s}.sk-wave[_ngcontent-%COMP%] .sk-rect5[_ngcontent-%COMP%]{animation-delay:-.8s}@keyframes _ngcontent-%COMP%_sk-waveStretchDelay{0%,40%,to{transform:scaleY(.4)}20%{transform:scaleY(1)}}"]}),e})(),Ne={skChasingDots:"sk-chasing-dots",skCubeGrid:"sk-cube-grid",skDoubleBounce:"sk-double-bounce",skRotatingPlane:"sk-rotationg-plane",skSpinnerPulse:"sk-spinner-pulse",skThreeBounce:"sk-three-bounce",skWanderingCubes:"sk-wandering-cubes",skWave:"sk-wave"};var z=(()=>{class e{constructor(){this._pendingRequests=0,this._pendingRequestsStatus$=new B(1),this._filteredUrlPatterns=[],this._filteredMethods=[],this._filteredHeaders=[],this._forceByPass=!1}get pendingRequestsStatus$(){return this._pendingRequestsStatus$.asObservable()}get pendingRequests(){return this._pendingRequests}get filteredUrlPatterns(){return this._filteredUrlPatterns}set filteredMethods(t){this._filteredMethods=t}set filteredHeaders(t){this._filteredHeaders=t}set forceByPass(t){this._forceByPass=t}shouldBypassUrl(t){return this._filteredUrlPatterns.some(n=>n.test(t))}shouldBypassMethod(t){return this._filteredMethods.some(n=>n.toUpperCase()===t.method.toUpperCase())}shouldBypassHeader(t){return this._filteredHeaders.some(n=>t.headers.has(n))}shouldBypass(t){return this._forceByPass||this.shouldBypassUrl(t.urlWithParams)||this.shouldBypassMethod(t)||this.shouldBypassHeader(t)}intercept(t,n){let r=this.shouldBypass(t);return r||(this._pendingRequests++,this._pendingRequests===1&&this._pendingRequestsStatus$.next(!0)),n.handle(t).pipe(Q(()=>{r||(this._pendingRequests--,this._pendingRequests===0&&this._pendingRequestsStatus$.next(!1))}))}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=P({token:e,factory:e.\u0275fac,providedIn:"root"}),e})(),gt=[{provide:w,useExisting:z,multi:!0}],mt=(()=>{class e{constructor(t){this.pendingRequestsInterceptor=t,this._visibility$=new B(1)}get visibility$(){return this._visibility$.asObservable()}show(){this.pendingRequestsInterceptor.forceByPass=!0,this._visibility$.next(!0)}hide(){this._visibility$.next(!1),this.pendingRequestsInterceptor.forceByPass=!1}}return e.\u0275fac=function(t){return new(t||e)(S(z))},e.\u0275prov=P({token:e,factory:e.\u0275fac,providedIn:"root"}),e})(),Ee=(()=>{class e{constructor(t,n){this.pendingRequestsInterceptor=t,this.spinnerVisibility=n,this.spinkit=Ne,this.visibleUntil=Date.now(),this.backdrop=!0,this.debounceDelay=0,this.entryComponent=null,this.extraDuration=0,this.filteredHeaders=[],this.filteredMethods=[],this.filteredUrlPatterns=[],this.minDuration=0,this.opacity=".7",this.backdropBackgroundColor="#f1f1f1",this.spinner=Ne.skWave}ngOnInit(){this.initIsvisibleObservable(),this.nullifySpinnerIfEntryComponentIsDefined(),this.initFilters()}initIsvisibleObservable(){let[t,n]=Z(this.pendingRequestsInterceptor.pendingRequestsStatus$,r=>r);this.isVisible$=J(this.pendingRequestsInterceptor.pendingRequestsStatus$.pipe(L(()=>t.pipe(E(()=>H(this.debounceDelay))))),t.pipe(L(()=>n.pipe(E(()=>this.getVisibilityTimer$())))),this.spinnerVisibility.visibility$).pipe(K(),ee(r=>this.updateExpirationDelay(r)))}nullifySpinnerIfEntryComponentIsDefined(){this.entryComponent&&(this.spinner=null)}initFilters(){this.initFilteredUrlPatterns(),this.initFilteredMethods(),this.initFilteredHeaders()}initFilteredUrlPatterns(){this.filteredUrlPatterns.length&&this.filteredUrlPatterns.forEach(t=>this.pendingRequestsInterceptor.filteredUrlPatterns.push(new RegExp(t)))}initFilteredMethods(){this.pendingRequestsInterceptor.filteredMethods=this.filteredMethods}initFilteredHeaders(){this.pendingRequestsInterceptor.filteredHeaders=this.filteredHeaders}updateExpirationDelay(t){t&&(this.visibleUntil=Date.now()+this.minDuration)}getVisibilityTimer$(){return H(Math.max(this.extraDuration,this.visibleUntil-Date.now()))}}return e.\u0275fac=function(t){return new(t||e)(f(z),f(mt))},e.\u0275cmp=g({type:e,selectors:[["ng-http-loader"]],inputs:{backdrop:"backdrop",backgroundColor:"backgroundColor",debounceDelay:"debounceDelay",entryComponent:"entryComponent",extraDuration:"extraDuration",filteredHeaders:"filteredHeaders",filteredMethods:"filteredMethods",filteredUrlPatterns:"filteredUrlPatterns",minDuration:"minDuration",opacity:"opacity",backdropBackgroundColor:"backdropBackgroundColor",spinner:"spinner"},decls:2,vars:3,consts:[["id","spinner",3,"backdrop","opacity","ngStyle",4,"ngIf"],["id","spinner",3,"ngStyle"],[4,"ngComponentOutlet"],[3,"backgroundColor",4,"ngIf"],[3,"backgroundColor"]],template:function(t,n){t&1&&(y(0,it,10,16,"div",0),se(1,"async")),t&2&&a("ngIf",ae(1,1,n.isVisible$))},dependencies:[de,I,pe,st,rt,at,ct,lt,dt,pt,ut,ue],styles:["#spinner[_ngcontent-%COMP%]{top:50%;left:50%;transform:translate(-50%,-50%);position:fixed;z-index:9999}#spinner.backdrop[_ngcontent-%COMP%]{top:0;left:0;height:100%;width:100%;display:flex;align-items:center;justify-content:center;transform:none} .colored-parent, .colored>div{background-color:#333}"]}),e})(),Le=(()=>{class e{static forRoot(){return{ngModule:e,providers:[gt]}}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=v({type:e}),e.\u0275inj=_({imports:[ge]}),e})();var kt=[{path:"",loadChildren:()=>import("https://cdn.jsdelivr.net/npm/marketplacepos@3.7.0/Marketplace/chunk-M6EV5O6B.js").then(e=>e.LoginModule)},{path:"menu",loadChildren:()=>import("https://cdn.jsdelivr.net/npm/marketplacepos@3.7.0/Marketplace/chunk-OCQGU4XF.js").then(e=>e.MenuModule)},{path:"**",redirectTo:"",pathMatch:"full"}],je=(()=>{let o=class o{};o.\u0275fac=function(r){return new(r||o)},o.\u0275mod=v({type:o}),o.\u0275inj=_({imports:[Y.forRoot(kt,{}),Y]});let e=o;return e})();var Ue=(()=>{let o=class o{constructor(n,r,u){this._router=n,this.titleService=r,this.activatedRoute=u}ngOnInit(){this.overrideDateToJsonFunction(),this._router.events.pipe(N(n=>n instanceof Oe)).pipe(R(()=>this.activatedRoute),R(n=>{for(;n.firstChild;)n=n.firstChild;return n}),N(n=>n.outlet==="primary"),X(n=>n.data)).subscribe(n=>{let r=" | Marketplace";n.title=="Dealpos x Marketplace"&&(r=""),this.titleService.setTitle(n.title+r)})}overrideDateToJsonFunction(){Date.prototype.toJSON=function(){return this.getFullYear()+"-"+n(this.getMonth()+1)+"-"+n(this.getDate())+"T"+n(this.getHours())+":"+n(this.getMinutes())+":"+n(this.getSeconds())+".000"};function n(r){return r<10?"0"+r:r}}};o.\u0275fac=function(r){return new(r||o)(f(T),f(be),f(Se))},o.\u0275cmp=g({type:o,selectors:[["app-root"]],decls:2,vars:0,template:function(r,u){r&1&&c(0,"ng-http-loader")(1,"router-outlet")},dependencies:[De,Ee]});let e=o;return e})();var $e=(()=>{let o=class o{constructor(n){this._router=n}intercept(n,r){let u=JSON.parse(window.localStorage.getItem("user")),We=new Date;if(u!=null){let Ge=new Date(u.Token.expiredAt);We<Ge?n=n.clone({setHeaders:{"Content-Type":"application/json",Authorization:`Bearer ${u.Token.access_token}`}}):n=n.clone({setHeaders:{"Content-Type":"application/json"}})}else n=n.clone({setHeaders:{"Content-Type":"application/json"}});return r.handle(n)}};o.\u0275fac=function(r){return new(r||o)(S(T))},o.\u0275prov=P({token:o,factory:o.\u0275fac});let e=o;return e})();var ht=["custom-toast-component",""];function _t(e,o){if(e&1){let t=q();d(0,"a",10),A("click",function(){j(t);let r=l(2);return U(r.remove())}),M(1," x "),p()}}function vt(e,o){if(e&1&&(d(0,"div",6)(1,"div",7)(2,"div")(3,"h4"),M(4),p()()(),d(5,"div",8),y(6,_t,2,0,"a",9),p()()),e&2){let t=l();s("display",t.state.value==="inactive"?"none":""),i(2),D(t.options.titleClass),$("aria-label",t.title),i(2),ie(t.title),i(2),a("ngIf",t.options.closeButton)}}var qe=e=>({notitle:e});function yt(e,o){if(e&1&&c(0,"div",11),e&2){let t=l();D(t.options.messageClass),a("ngClass",x(4,qe,t.title==null))("innerHTML",t.message,ne)}}function Pt(e,o){if(e&1&&(d(0,"div",12),M(1),p()),e&2){let t=l();D(t.options.messageClass),a("ngClass",x(5,qe,t.title==null)),$("aria-label",t.message),i(1),re(" ",t.message," ")}}function Mt(e,o){if(e&1){let t=q();d(0,"a",10),A("click",function(){j(t);let r=l();return U(r.remove())}),M(1," x "),p()}}function xt(e,o){if(e&1&&(d(0,"div"),c(1,"div",13),p()),e&2){let t=l();i(1),s("width",t.width+"%")}}var Ae=(()=>{let o=class o extends ye{constructor(n,r){super(n,r),this.toastrService=n,this.toastPackage=r}ngOnInit(){}action(n){return n.stopPropagation(),this.toastPackage.triggerAction(),!1}};o.\u0275fac=function(r){return new(r||o)(f(ve),f(_e))},o.\u0275cmp=g({type:o,selectors:[["","custom-toast-component",""]],features:[m],attrs:ht,decls:6,vars:5,consts:[[1,"toast-case"],["class","row toast-header",3,"display",4,"ngIf"],["class","toast-body","role","alert","aria-live","polite",3,"ngClass","class","innerHTML",4,"ngIf"],["class","toast-body","role","alert","aria-live","polite",3,"ngClass","class",4,"ngIf"],["class","btn toast-close-button btn-sm ",3,"click",4,"ngIf"],[4,"ngIf"],[1,"row","toast-header"],[1,"col-9","g-0"],[1,"col-auto","mt-5","pe-0"],["class","btn toast-close-button btn-sm",3,"click",4,"ngIf"],[1,"btn","toast-close-button","btn-sm",3,"click"],["role","alert","aria-live","polite",1,"toast-body",3,"ngClass","innerHTML"],["role","alert","aria-live","polite",1,"toast-body",3,"ngClass"],[1,"toast-progress"]],template:function(r,u){r&1&&(d(0,"div",0),y(1,vt,7,7,"div",1)(2,yt,1,6,"div",2)(3,Pt,2,7,"div",3)(4,Mt,2,0,"a",4)(5,xt,2,2,"div",5),p()),r&2&&(i(1),a("ngIf",u.title),i(1),a("ngIf",u.message&&u.options.enableHtml),i(1),a("ngIf",u.message&&!u.options.enableHtml),i(1),a("ngIf",u.options.closeButton&&u.title==null),i(1),a("ngIf",u.options.progressBar))},dependencies:[le,I],styles:["[_nghost-%COMP%]{background-color:#fff;position:relative;overflow:hidden;margin:0 0 6px;width:300px;border-radius:3px;color:#141414;pointer-events:all;cursor:pointer}.toast-success[_nghost-%COMP%]{border:1.8px solid rgb(81,163,81)}.toast-info[_nghost-%COMP%]{border:1.8px solid rgb(47,150,180)}.toast-error[_nghost-%COMP%]{border:1.8px solid rgb(189,54,47)}.toast-warning[_nghost-%COMP%]{border:1.8px solid rgb(248,148,6)}.toast-case[_ngcontent-%COMP%]{margin-left:0}.toast-header[_ngcontent-%COMP%]{background-clip:padding-box;border-bottom:solid;border-width:1px;padding-bottom:0rem;padding-top:0rem;padding-right:0;margin-left:0}.toast-title[_ngcontent-%COMP%]{color:#000}.toast-body[_ngcontent-%COMP%]{padding-top:.6rem}.notitle[_ngcontent-%COMP%]{margin-bottom:-1rem}.toast-close-button-custom[_ngcontent-%COMP%]{right:.2em!important;top:-1.3em!important}.toast-close-button-notitle[_ngcontent-%COMP%]{right:.1em!important;top:-1.3em!important}"],data:{animation:[Ce("flyInOut",[he("inactive",C({opacity:0})),G("inactive => active",V("400ms ease-out",W([C({transform:"translate3d(100%, 0, 0) skewX(-30deg)",opacity:0}),C({transform:"skewX(20deg)",opacity:1}),C({transform:"skewX(-5deg)",opacity:1}),C({transform:"none",opacity:1})]))),G("active => removed",V("400ms ease-out",W([C({opacity:1}),C({transform:"translate3d(100%, 0, 0) skewX(30deg)",opacity:0})])))])]}});let e=o;return e})();var Ot={name:"MarketplaceDB",version:1,objectStoresMeta:[{store:"Categories",storeConfig:{keyPath:null,autoIncrement:!1},storeSchema:[]}]},Ve=(()=>{let o=class o{};o.\u0275fac=function(r){return new(r||o)},o.\u0275mod=v({type:o,bootstrap:[Ue]}),o.\u0275inj=_({providers:[{provide:w,useClass:$e,multi:!0},{provide:He,useValue:{subscriptSizing:"dynamic"}},Me,xe,{provide:ce,useFactory:n=>function(){n.loadPermissions()},deps:[Be],multi:!0}],imports:[ke,je,Re,Pe.forRoot({toastComponent:Ae,positionClass:"toast-bottom-right",closeButton:!0}),me,Fe.forRoot(Ot),Le.forRoot(),Ie.initializeApp(F.firebaseConfig),we,Te.forRoot()]});let e=o;return e})();F.production&&void 0;fe().bootstrapModule(Ve).catch(e=>console.error(e));
|
|
1
|
+
import{a as F}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.2/Marketplace/chunk-F7PVCSNW.js";import{a as Ie,b as we,c as Fe,e as Be}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.2/Marketplace/chunk-WIPT5BVZ.js";import{a as xe}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.2/Marketplace/chunk-JGSLR6Q7.js";import{a as _e,b as ve,c as ye,d as Pe,e as Me}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.2/Marketplace/chunk-MG7FPXZX.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.2/Marketplace/chunk-VM5LF2AQ.js";import{c as Te}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.2/Marketplace/chunk-ZSK75YJW.js";import{f as He}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.2/Marketplace/chunk-T4IQWUBV.js";import{p as Re}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.2/Marketplace/chunk-7QK5UPRO.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.2/Marketplace/chunk-QYP6WXYL.js";import{$ as P,$a as c,$b as pe,A as J,B as N,C as Z,Cb as se,Db as ae,Fa as i,Fc as Oe,G as E,Ga as f,Gc as Se,Hc as De,Ic as T,K,La as m,Lc as Y,M as Q,Na as $,Oa as a,Ob as ce,Pa as s,Qa as b,Ra as D,T as L,Ua as y,X as ee,Xb as le,Yb as de,Za as d,_a as p,_b as I,aa as _,bc as ue,ca as S,cb as oe,db as q,e as B,ea as g,fa as v,fc as ge,ga as te,hb as A,ja as j,jb as l,ka as U,kc as w,lc as me,na as k,nc as fe,oc as ke,pb as M,pc as be,q as R,qb as ie,rb as re,s as X,sc as Ce,tc as V,wb as x,wc as C,xc as he,y as H,ya as ne,yc as W,zc as G}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.2/Marketplace/chunk-CQJJCQOZ.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.2/Marketplace/chunk-FG5W5K4B.js";function ze(e,o){e&1&&oe(0)}function Xe(e,o){if(e&1&&c(0,"sk-cube-grid",4),e&2){let t=l(2);a("backgroundColor",t.backgroundColor)}}function Je(e,o){if(e&1&&c(0,"sk-chasing-dots",4),e&2){let t=l(2);a("backgroundColor",t.backgroundColor)}}function Ze(e,o){if(e&1&&c(0,"sk-double-bounce",4),e&2){let t=l(2);a("backgroundColor",t.backgroundColor)}}function Ke(e,o){if(e&1&&c(0,"sk-rotating-plane",4),e&2){let t=l(2);a("backgroundColor",t.backgroundColor)}}function Qe(e,o){if(e&1&&c(0,"sk-spinner-pulse",4),e&2){let t=l(2);a("backgroundColor",t.backgroundColor)}}function et(e,o){if(e&1&&c(0,"sk-three-bounce",4),e&2){let t=l(2);a("backgroundColor",t.backgroundColor)}}function tt(e,o){if(e&1&&c(0,"sk-wandering-cubes",4),e&2){let t=l(2);a("backgroundColor",t.backgroundColor)}}function nt(e,o){if(e&1&&c(0,"sk-wave",4),e&2){let t=l(2);a("backgroundColor",t.backgroundColor)}}var ot=e=>({"background-color":e});function it(e,o){if(e&1&&(d(0,"div",1),y(1,ze,1,0,"ng-container",2)(2,Xe,1,1,"sk-cube-grid",3)(3,Je,1,1,"sk-chasing-dots",3)(4,Ze,1,1,"sk-double-bounce",3)(5,Ke,1,1,"sk-rotating-plane",3)(6,Qe,1,1,"sk-spinner-pulse",3)(7,et,1,1,"sk-three-bounce",3)(8,tt,1,1,"sk-wandering-cubes",3)(9,nt,1,1,"sk-wave",3),p()),e&2){let t=l();s("opacity",t.opacity),b("backdrop",t.backdrop),a("ngStyle",x(14,ot,t.backdrop?t.backdropBackgroundColor:"transparent")),i(1),a("ngComponentOutlet",t.entryComponent),i(1),a("ngIf",t.spinner===t.spinkit.skCubeGrid),i(1),a("ngIf",t.spinner===t.spinkit.skChasingDots),i(1),a("ngIf",t.spinner===t.spinkit.skDoubleBounce),i(1),a("ngIf",t.spinner===t.spinkit.skRotatingPlane),i(1),a("ngIf",t.spinner===t.spinkit.skSpinnerPulse),i(1),a("ngIf",t.spinner===t.spinkit.skThreeBounce),i(1),a("ngIf",t.spinner===t.spinkit.skWanderingCubes),i(1),a("ngIf",t.spinner===t.spinkit.skWave)}}var h=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275dir=te({type:e,inputs:{backgroundColor:"backgroundColor"}}),e})(),rt=(()=>{class e extends h{}return e.\u0275fac=(()=>{let o;return function(n){return(o||(o=k(e)))(n||e)}})(),e.\u0275cmp=g({type:e,selectors:[["sk-chasing-dots"]],features:[m],decls:3,vars:6,consts:[[1,"sk-chasing-dots"],[1,"sk-child","sk-dot1"],[1,"sk-child","sk-dot2"]],template:function(t,n){t&1&&(d(0,"div",0),c(1,"div",1)(2,"div",2),p()),t&2&&(b("colored",!n.backgroundColor),i(1),s("background-color",n.backgroundColor),i(1),s("background-color",n.backgroundColor))},styles:[".sk-chasing-dots[_ngcontent-%COMP%]{top:50%;margin:auto;width:40px;height:40px;position:relative;text-align:center;animation:_ngcontent-%COMP%_sk-chasingDotsRotate 2s infinite linear}.sk-chasing-dots[_ngcontent-%COMP%] .sk-child[_ngcontent-%COMP%]{width:60%;height:60%;display:inline-block;position:absolute;top:0;border-radius:100%;animation:_ngcontent-%COMP%_sk-chasingDotsBounce 2s infinite ease-in-out}.sk-chasing-dots[_ngcontent-%COMP%] .sk-dot2[_ngcontent-%COMP%]{top:auto;bottom:0;animation-delay:-1s}@keyframes _ngcontent-%COMP%_sk-chasingDotsRotate{to{transform:rotate(360deg)}}@keyframes _ngcontent-%COMP%_sk-chasingDotsBounce{0%,to{transform:scale(0)}50%{transform:scale(1)}}"]}),e})(),st=(()=>{class e extends h{}return e.\u0275fac=(()=>{let o;return function(n){return(o||(o=k(e)))(n||e)}})(),e.\u0275cmp=g({type:e,selectors:[["sk-cube-grid"]],features:[m],decls:10,vars:20,consts:[[1,"sk-cube-grid"],[1,"sk-cube","sk-cube1"],[1,"sk-cube","sk-cube2"],[1,"sk-cube","sk-cube3"],[1,"sk-cube","sk-cube4"],[1,"sk-cube","sk-cube5"],[1,"sk-cube","sk-cube6"],[1,"sk-cube","sk-cube7"],[1,"sk-cube","sk-cube8"],[1,"sk-cube","sk-cube9"]],template:function(t,n){t&1&&(d(0,"div",0),c(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"div",5)(6,"div",6)(7,"div",7)(8,"div",8)(9,"div",9),p()),t&2&&(b("colored",!n.backgroundColor),i(1),s("background-color",n.backgroundColor),i(1),s("background-color",n.backgroundColor),i(1),s("background-color",n.backgroundColor),i(1),s("background-color",n.backgroundColor),i(1),s("background-color",n.backgroundColor),i(1),s("background-color",n.backgroundColor),i(1),s("background-color",n.backgroundColor),i(1),s("background-color",n.backgroundColor),i(1),s("background-color",n.backgroundColor))},styles:[".sk-cube-grid[_ngcontent-%COMP%]{position:relative;top:50%;width:40px;height:40px;margin:auto}.sk-cube-grid[_ngcontent-%COMP%] .sk-cube[_ngcontent-%COMP%]{width:33.33%;height:33.33%;float:left;animation:_ngcontent-%COMP%_sk-cubeGridScaleDelay 1.3s infinite ease-in-out}.sk-cube-grid[_ngcontent-%COMP%] .sk-cube1[_ngcontent-%COMP%]{animation-delay:.2s}.sk-cube-grid[_ngcontent-%COMP%] .sk-cube2[_ngcontent-%COMP%]{animation-delay:.3s}.sk-cube-grid[_ngcontent-%COMP%] .sk-cube3[_ngcontent-%COMP%]{animation-delay:.4s}.sk-cube-grid[_ngcontent-%COMP%] .sk-cube4[_ngcontent-%COMP%]{animation-delay:.1s}.sk-cube-grid[_ngcontent-%COMP%] .sk-cube5[_ngcontent-%COMP%]{animation-delay:.2s}.sk-cube-grid[_ngcontent-%COMP%] .sk-cube6[_ngcontent-%COMP%]{animation-delay:.3s}.sk-cube-grid[_ngcontent-%COMP%] .sk-cube7[_ngcontent-%COMP%]{animation-delay:0s}.sk-cube-grid[_ngcontent-%COMP%] .sk-cube8[_ngcontent-%COMP%]{animation-delay:.1s}.sk-cube-grid[_ngcontent-%COMP%] .sk-cube9[_ngcontent-%COMP%]{animation-delay:.2s}@keyframes _ngcontent-%COMP%_sk-cubeGridScaleDelay{0%,70%,to{transform:scaleZ(1)}35%{transform:scale3D(0,0,1)}}"]}),e})(),at=(()=>{class e extends h{}return e.\u0275fac=(()=>{let o;return function(n){return(o||(o=k(e)))(n||e)}})(),e.\u0275cmp=g({type:e,selectors:[["sk-double-bounce"]],features:[m],decls:3,vars:6,consts:[[1,"sk-double-bounce"],[1,"sk-child","sk-double-bounce1"],[1,"sk-child","sk-double-bounce2"]],template:function(t,n){t&1&&(d(0,"div",0),c(1,"div",1)(2,"div",2),p()),t&2&&(b("colored",!n.backgroundColor),i(1),s("background-color",n.backgroundColor),i(1),s("background-color",n.backgroundColor))},styles:[".sk-double-bounce[_ngcontent-%COMP%]{top:50%;width:40px;height:40px;position:relative;margin:auto}.sk-double-bounce[_ngcontent-%COMP%] .sk-child[_ngcontent-%COMP%]{width:100%;height:100%;border-radius:50%;background-color:#333;opacity:.6;position:absolute;top:0;left:0;animation:_ngcontent-%COMP%_sk-doubleBounce 2s infinite ease-in-out}.sk-double-bounce[_ngcontent-%COMP%] .sk-double-bounce2[_ngcontent-%COMP%]{animation-delay:-1s}@keyframes _ngcontent-%COMP%_sk-doubleBounce{0%,to{transform:scale(0)}50%{transform:scale(1)}}"]}),e})(),ct=(()=>{class e extends h{}return e.\u0275fac=(()=>{let o;return function(n){return(o||(o=k(e)))(n||e)}})(),e.\u0275cmp=g({type:e,selectors:[["sk-rotating-plane"]],features:[m],decls:1,vars:2,consts:[[1,"sk-rotating-plane","colored-parent"]],template:function(t,n){t&1&&c(0,"div",0),t&2&&s("background-color",n.backgroundColor)},styles:[".sk-rotating-plane[_ngcontent-%COMP%]{position:relative;top:50%;width:40px;height:40px;margin:auto;animation:_ngcontent-%COMP%_sk-rotatePlane 1.2s infinite ease-in-out}@keyframes _ngcontent-%COMP%_sk-rotatePlane{0%{transform:perspective(120px) rotateX(0) rotateY(0)}50%{transform:perspective(120px) rotateX(-180.1deg) rotateY(0)}to{transform:perspective(120px) rotateX(-180deg) rotateY(-179.9deg)}}"]}),e})(),lt=(()=>{class e extends h{}return e.\u0275fac=(()=>{let o;return function(n){return(o||(o=k(e)))(n||e)}})(),e.\u0275cmp=g({type:e,selectors:[["sk-spinner-pulse"]],features:[m],decls:1,vars:2,consts:[[1,"sk-spinner","sk-spinner-pulse","colored-parent"]],template:function(t,n){t&1&&c(0,"div",0),t&2&&s("background-color",n.backgroundColor)},styles:[".sk-spinner-pulse[_ngcontent-%COMP%]{position:relative;top:50%;width:40px;height:40px;margin:auto;border-radius:100%;animation:_ngcontent-%COMP%_sk-pulseScaleOut 1s infinite ease-in-out}@keyframes _ngcontent-%COMP%_sk-pulseScaleOut{0%{transform:scale(0)}to{transform:scale(1);opacity:0}}"]}),e})(),dt=(()=>{class e extends h{}return e.\u0275fac=(()=>{let o;return function(n){return(o||(o=k(e)))(n||e)}})(),e.\u0275cmp=g({type:e,selectors:[["sk-three-bounce"]],features:[m],decls:4,vars:8,consts:[[1,"sk-three-bounce"],[1,"sk-child","sk-bounce1"],[1,"sk-child","sk-bounce2"],[1,"sk-child","sk-bounce3"]],template:function(t,n){t&1&&(d(0,"div",0),c(1,"div",1)(2,"div",2)(3,"div",3),p()),t&2&&(b("colored",!n.backgroundColor),i(1),s("background-color",n.backgroundColor),i(1),s("background-color",n.backgroundColor),i(1),s("background-color",n.backgroundColor))},styles:[".sk-three-bounce[_ngcontent-%COMP%]{top:50%;position:relative;margin:auto;width:80px;text-align:center}.sk-three-bounce[_ngcontent-%COMP%] .sk-child[_ngcontent-%COMP%]{width:20px;height:20px;border-radius:100%;display:inline-block;animation:_ngcontent-%COMP%_sk-three-bounce 1.4s ease-in-out 0s infinite both}.sk-three-bounce[_ngcontent-%COMP%] .sk-bounce1[_ngcontent-%COMP%]{animation-delay:-.32s}.sk-three-bounce[_ngcontent-%COMP%] .sk-bounce2[_ngcontent-%COMP%]{animation-delay:-.16s}@keyframes _ngcontent-%COMP%_sk-three-bounce{0%,80%,to{transform:scale(0)}40%{transform:scale(1)}}"]}),e})(),pt=(()=>{class e extends h{}return e.\u0275fac=(()=>{let o;return function(n){return(o||(o=k(e)))(n||e)}})(),e.\u0275cmp=g({type:e,selectors:[["sk-wandering-cubes"]],features:[m],decls:3,vars:6,consts:[[1,"sk-wandering-cubes"],[1,"sk-cube","sk-cube1"],[1,"sk-cube","sk-cube2"]],template:function(t,n){t&1&&(d(0,"div",0),c(1,"div",1)(2,"div",2),p()),t&2&&(b("colored",!n.backgroundColor),i(1),s("background-color",n.backgroundColor),i(1),s("background-color",n.backgroundColor))},styles:[".sk-wandering-cubes[_ngcontent-%COMP%]{top:50%;margin:auto;width:40px;height:40px;position:relative}.sk-wandering-cubes[_ngcontent-%COMP%] .sk-cube[_ngcontent-%COMP%]{width:10px;height:10px;position:absolute;top:0;left:0;animation:_ngcontent-%COMP%_sk-wanderingCube 1.8s ease-in-out -1.8s infinite both}.sk-wandering-cubes[_ngcontent-%COMP%] .sk-cube2[_ngcontent-%COMP%]{animation-delay:-.9s}@keyframes _ngcontent-%COMP%_sk-wanderingCube{0%{transform:rotate(0)}25%{transform:translate(30px) rotate(-90deg) scale(.5)}50%{transform:translate(30px) translateY(30px) rotate(-179deg)}50.1%{transform:translate(30px) translateY(30px) rotate(-180deg)}75%{transform:translate(0) translateY(30px) rotate(-270deg) scale(.5)}to{transform:rotate(-360deg)}}"]}),e})(),ut=(()=>{class e extends h{}return e.\u0275fac=(()=>{let o;return function(n){return(o||(o=k(e)))(n||e)}})(),e.\u0275cmp=g({type:e,selectors:[["sk-wave"]],features:[m],decls:6,vars:12,consts:[[1,"sk-wave"],[1,"sk-rect","sk-rect1"],[1,"sk-rect","sk-rect2"],[1,"sk-rect","sk-rect3"],[1,"sk-rect","sk-rect4"],[1,"sk-rect","sk-rect5"]],template:function(t,n){t&1&&(d(0,"div",0),c(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"div",5),p()),t&2&&(b("colored",!n.backgroundColor),i(1),s("background-color",n.backgroundColor),i(1),s("background-color",n.backgroundColor),i(1),s("background-color",n.backgroundColor),i(1),s("background-color",n.backgroundColor),i(1),s("background-color",n.backgroundColor))},styles:[".sk-wave[_ngcontent-%COMP%]{position:relative;top:50%;margin:auto;width:50px;height:40px;text-align:center;font-size:10px}.sk-wave[_ngcontent-%COMP%] .sk-rect[_ngcontent-%COMP%]{float:left;margin-right:1px;height:100%;width:6px;display:inline-block;animation:_ngcontent-%COMP%_sk-waveStretchDelay 1.2s infinite ease-in-out}.sk-wave[_ngcontent-%COMP%] .sk-rect1[_ngcontent-%COMP%]{animation-delay:-1.2s}.sk-wave[_ngcontent-%COMP%] .sk-rect2[_ngcontent-%COMP%]{animation-delay:-1.1s}.sk-wave[_ngcontent-%COMP%] .sk-rect3[_ngcontent-%COMP%]{animation-delay:-1s}.sk-wave[_ngcontent-%COMP%] .sk-rect4[_ngcontent-%COMP%]{animation-delay:-.9s}.sk-wave[_ngcontent-%COMP%] .sk-rect5[_ngcontent-%COMP%]{animation-delay:-.8s}@keyframes _ngcontent-%COMP%_sk-waveStretchDelay{0%,40%,to{transform:scaleY(.4)}20%{transform:scaleY(1)}}"]}),e})(),Ne={skChasingDots:"sk-chasing-dots",skCubeGrid:"sk-cube-grid",skDoubleBounce:"sk-double-bounce",skRotatingPlane:"sk-rotationg-plane",skSpinnerPulse:"sk-spinner-pulse",skThreeBounce:"sk-three-bounce",skWanderingCubes:"sk-wandering-cubes",skWave:"sk-wave"};var z=(()=>{class e{constructor(){this._pendingRequests=0,this._pendingRequestsStatus$=new B(1),this._filteredUrlPatterns=[],this._filteredMethods=[],this._filteredHeaders=[],this._forceByPass=!1}get pendingRequestsStatus$(){return this._pendingRequestsStatus$.asObservable()}get pendingRequests(){return this._pendingRequests}get filteredUrlPatterns(){return this._filteredUrlPatterns}set filteredMethods(t){this._filteredMethods=t}set filteredHeaders(t){this._filteredHeaders=t}set forceByPass(t){this._forceByPass=t}shouldBypassUrl(t){return this._filteredUrlPatterns.some(n=>n.test(t))}shouldBypassMethod(t){return this._filteredMethods.some(n=>n.toUpperCase()===t.method.toUpperCase())}shouldBypassHeader(t){return this._filteredHeaders.some(n=>t.headers.has(n))}shouldBypass(t){return this._forceByPass||this.shouldBypassUrl(t.urlWithParams)||this.shouldBypassMethod(t)||this.shouldBypassHeader(t)}intercept(t,n){let r=this.shouldBypass(t);return r||(this._pendingRequests++,this._pendingRequests===1&&this._pendingRequestsStatus$.next(!0)),n.handle(t).pipe(Q(()=>{r||(this._pendingRequests--,this._pendingRequests===0&&this._pendingRequestsStatus$.next(!1))}))}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=P({token:e,factory:e.\u0275fac,providedIn:"root"}),e})(),gt=[{provide:w,useExisting:z,multi:!0}],mt=(()=>{class e{constructor(t){this.pendingRequestsInterceptor=t,this._visibility$=new B(1)}get visibility$(){return this._visibility$.asObservable()}show(){this.pendingRequestsInterceptor.forceByPass=!0,this._visibility$.next(!0)}hide(){this._visibility$.next(!1),this.pendingRequestsInterceptor.forceByPass=!1}}return e.\u0275fac=function(t){return new(t||e)(S(z))},e.\u0275prov=P({token:e,factory:e.\u0275fac,providedIn:"root"}),e})(),Ee=(()=>{class e{constructor(t,n){this.pendingRequestsInterceptor=t,this.spinnerVisibility=n,this.spinkit=Ne,this.visibleUntil=Date.now(),this.backdrop=!0,this.debounceDelay=0,this.entryComponent=null,this.extraDuration=0,this.filteredHeaders=[],this.filteredMethods=[],this.filteredUrlPatterns=[],this.minDuration=0,this.opacity=".7",this.backdropBackgroundColor="#f1f1f1",this.spinner=Ne.skWave}ngOnInit(){this.initIsvisibleObservable(),this.nullifySpinnerIfEntryComponentIsDefined(),this.initFilters()}initIsvisibleObservable(){let[t,n]=Z(this.pendingRequestsInterceptor.pendingRequestsStatus$,r=>r);this.isVisible$=J(this.pendingRequestsInterceptor.pendingRequestsStatus$.pipe(L(()=>t.pipe(E(()=>H(this.debounceDelay))))),t.pipe(L(()=>n.pipe(E(()=>this.getVisibilityTimer$())))),this.spinnerVisibility.visibility$).pipe(K(),ee(r=>this.updateExpirationDelay(r)))}nullifySpinnerIfEntryComponentIsDefined(){this.entryComponent&&(this.spinner=null)}initFilters(){this.initFilteredUrlPatterns(),this.initFilteredMethods(),this.initFilteredHeaders()}initFilteredUrlPatterns(){this.filteredUrlPatterns.length&&this.filteredUrlPatterns.forEach(t=>this.pendingRequestsInterceptor.filteredUrlPatterns.push(new RegExp(t)))}initFilteredMethods(){this.pendingRequestsInterceptor.filteredMethods=this.filteredMethods}initFilteredHeaders(){this.pendingRequestsInterceptor.filteredHeaders=this.filteredHeaders}updateExpirationDelay(t){t&&(this.visibleUntil=Date.now()+this.minDuration)}getVisibilityTimer$(){return H(Math.max(this.extraDuration,this.visibleUntil-Date.now()))}}return e.\u0275fac=function(t){return new(t||e)(f(z),f(mt))},e.\u0275cmp=g({type:e,selectors:[["ng-http-loader"]],inputs:{backdrop:"backdrop",backgroundColor:"backgroundColor",debounceDelay:"debounceDelay",entryComponent:"entryComponent",extraDuration:"extraDuration",filteredHeaders:"filteredHeaders",filteredMethods:"filteredMethods",filteredUrlPatterns:"filteredUrlPatterns",minDuration:"minDuration",opacity:"opacity",backdropBackgroundColor:"backdropBackgroundColor",spinner:"spinner"},decls:2,vars:3,consts:[["id","spinner",3,"backdrop","opacity","ngStyle",4,"ngIf"],["id","spinner",3,"ngStyle"],[4,"ngComponentOutlet"],[3,"backgroundColor",4,"ngIf"],[3,"backgroundColor"]],template:function(t,n){t&1&&(y(0,it,10,16,"div",0),se(1,"async")),t&2&&a("ngIf",ae(1,1,n.isVisible$))},dependencies:[de,I,pe,st,rt,at,ct,lt,dt,pt,ut,ue],styles:["#spinner[_ngcontent-%COMP%]{top:50%;left:50%;transform:translate(-50%,-50%);position:fixed;z-index:9999}#spinner.backdrop[_ngcontent-%COMP%]{top:0;left:0;height:100%;width:100%;display:flex;align-items:center;justify-content:center;transform:none} .colored-parent, .colored>div{background-color:#333}"]}),e})(),Le=(()=>{class e{static forRoot(){return{ngModule:e,providers:[gt]}}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=v({type:e}),e.\u0275inj=_({imports:[ge]}),e})();var kt=[{path:"",loadChildren:()=>import("https://cdn.jsdelivr.net/npm/marketplacepos@3.7.2/Marketplace/chunk-LV7NKX2V.js").then(e=>e.LoginModule)},{path:"menu",loadChildren:()=>import("https://cdn.jsdelivr.net/npm/marketplacepos@3.7.2/Marketplace/chunk-CBW7JGFJ.js").then(e=>e.MenuModule)},{path:"**",redirectTo:"",pathMatch:"full"}],je=(()=>{let o=class o{};o.\u0275fac=function(r){return new(r||o)},o.\u0275mod=v({type:o}),o.\u0275inj=_({imports:[Y.forRoot(kt,{}),Y]});let e=o;return e})();var Ue=(()=>{let o=class o{constructor(n,r,u){this._router=n,this.titleService=r,this.activatedRoute=u}ngOnInit(){this.overrideDateToJsonFunction(),this._router.events.pipe(N(n=>n instanceof Oe)).pipe(R(()=>this.activatedRoute),R(n=>{for(;n.firstChild;)n=n.firstChild;return n}),N(n=>n.outlet==="primary"),X(n=>n.data)).subscribe(n=>{let r=" | Marketplace";n.title=="Dealpos x Marketplace"&&(r=""),this.titleService.setTitle(n.title+r)})}overrideDateToJsonFunction(){Date.prototype.toJSON=function(){return this.getFullYear()+"-"+n(this.getMonth()+1)+"-"+n(this.getDate())+"T"+n(this.getHours())+":"+n(this.getMinutes())+":"+n(this.getSeconds())+".000"};function n(r){return r<10?"0"+r:r}}};o.\u0275fac=function(r){return new(r||o)(f(T),f(be),f(Se))},o.\u0275cmp=g({type:o,selectors:[["app-root"]],decls:2,vars:0,template:function(r,u){r&1&&c(0,"ng-http-loader")(1,"router-outlet")},dependencies:[De,Ee]});let e=o;return e})();var $e=(()=>{let o=class o{constructor(n){this._router=n}intercept(n,r){let u=JSON.parse(window.localStorage.getItem("user")),We=new Date;if(u!=null){let Ge=new Date(u.Token.expiredAt);We<Ge?n=n.clone({setHeaders:{"Content-Type":"application/json",Authorization:`Bearer ${u.Token.access_token}`}}):n=n.clone({setHeaders:{"Content-Type":"application/json"}})}else n=n.clone({setHeaders:{"Content-Type":"application/json"}});return r.handle(n)}};o.\u0275fac=function(r){return new(r||o)(S(T))},o.\u0275prov=P({token:o,factory:o.\u0275fac});let e=o;return e})();var ht=["custom-toast-component",""];function _t(e,o){if(e&1){let t=q();d(0,"a",10),A("click",function(){j(t);let r=l(2);return U(r.remove())}),M(1," x "),p()}}function vt(e,o){if(e&1&&(d(0,"div",6)(1,"div",7)(2,"div")(3,"h4"),M(4),p()()(),d(5,"div",8),y(6,_t,2,0,"a",9),p()()),e&2){let t=l();s("display",t.state.value==="inactive"?"none":""),i(2),D(t.options.titleClass),$("aria-label",t.title),i(2),ie(t.title),i(2),a("ngIf",t.options.closeButton)}}var qe=e=>({notitle:e});function yt(e,o){if(e&1&&c(0,"div",11),e&2){let t=l();D(t.options.messageClass),a("ngClass",x(4,qe,t.title==null))("innerHTML",t.message,ne)}}function Pt(e,o){if(e&1&&(d(0,"div",12),M(1),p()),e&2){let t=l();D(t.options.messageClass),a("ngClass",x(5,qe,t.title==null)),$("aria-label",t.message),i(1),re(" ",t.message," ")}}function Mt(e,o){if(e&1){let t=q();d(0,"a",10),A("click",function(){j(t);let r=l();return U(r.remove())}),M(1," x "),p()}}function xt(e,o){if(e&1&&(d(0,"div"),c(1,"div",13),p()),e&2){let t=l();i(1),s("width",t.width+"%")}}var Ae=(()=>{let o=class o extends ye{constructor(n,r){super(n,r),this.toastrService=n,this.toastPackage=r}ngOnInit(){}action(n){return n.stopPropagation(),this.toastPackage.triggerAction(),!1}};o.\u0275fac=function(r){return new(r||o)(f(ve),f(_e))},o.\u0275cmp=g({type:o,selectors:[["","custom-toast-component",""]],features:[m],attrs:ht,decls:6,vars:5,consts:[[1,"toast-case"],["class","row toast-header",3,"display",4,"ngIf"],["class","toast-body","role","alert","aria-live","polite",3,"ngClass","class","innerHTML",4,"ngIf"],["class","toast-body","role","alert","aria-live","polite",3,"ngClass","class",4,"ngIf"],["class","btn toast-close-button btn-sm ",3,"click",4,"ngIf"],[4,"ngIf"],[1,"row","toast-header"],[1,"col-9","g-0"],[1,"col-auto","mt-5","pe-0"],["class","btn toast-close-button btn-sm",3,"click",4,"ngIf"],[1,"btn","toast-close-button","btn-sm",3,"click"],["role","alert","aria-live","polite",1,"toast-body",3,"ngClass","innerHTML"],["role","alert","aria-live","polite",1,"toast-body",3,"ngClass"],[1,"toast-progress"]],template:function(r,u){r&1&&(d(0,"div",0),y(1,vt,7,7,"div",1)(2,yt,1,6,"div",2)(3,Pt,2,7,"div",3)(4,Mt,2,0,"a",4)(5,xt,2,2,"div",5),p()),r&2&&(i(1),a("ngIf",u.title),i(1),a("ngIf",u.message&&u.options.enableHtml),i(1),a("ngIf",u.message&&!u.options.enableHtml),i(1),a("ngIf",u.options.closeButton&&u.title==null),i(1),a("ngIf",u.options.progressBar))},dependencies:[le,I],styles:["[_nghost-%COMP%]{background-color:#fff;position:relative;overflow:hidden;margin:0 0 6px;width:300px;border-radius:3px;color:#141414;pointer-events:all;cursor:pointer}.toast-success[_nghost-%COMP%]{border:1.8px solid rgb(81,163,81)}.toast-info[_nghost-%COMP%]{border:1.8px solid rgb(47,150,180)}.toast-error[_nghost-%COMP%]{border:1.8px solid rgb(189,54,47)}.toast-warning[_nghost-%COMP%]{border:1.8px solid rgb(248,148,6)}.toast-case[_ngcontent-%COMP%]{margin-left:0}.toast-header[_ngcontent-%COMP%]{background-clip:padding-box;border-bottom:solid;border-width:1px;padding-bottom:0rem;padding-top:0rem;padding-right:0;margin-left:0}.toast-title[_ngcontent-%COMP%]{color:#000}.toast-body[_ngcontent-%COMP%]{padding-top:.6rem}.notitle[_ngcontent-%COMP%]{margin-bottom:-1rem}.toast-close-button-custom[_ngcontent-%COMP%]{right:.2em!important;top:-1.3em!important}.toast-close-button-notitle[_ngcontent-%COMP%]{right:.1em!important;top:-1.3em!important}"],data:{animation:[Ce("flyInOut",[he("inactive",C({opacity:0})),G("inactive => active",V("400ms ease-out",W([C({transform:"translate3d(100%, 0, 0) skewX(-30deg)",opacity:0}),C({transform:"skewX(20deg)",opacity:1}),C({transform:"skewX(-5deg)",opacity:1}),C({transform:"none",opacity:1})]))),G("active => removed",V("400ms ease-out",W([C({opacity:1}),C({transform:"translate3d(100%, 0, 0) skewX(30deg)",opacity:0})])))])]}});let e=o;return e})();var Ot={name:"MarketplaceDB",version:1,objectStoresMeta:[{store:"Categories",storeConfig:{keyPath:null,autoIncrement:!1},storeSchema:[]}]},Ve=(()=>{let o=class o{};o.\u0275fac=function(r){return new(r||o)},o.\u0275mod=v({type:o,bootstrap:[Ue]}),o.\u0275inj=_({providers:[{provide:w,useClass:$e,multi:!0},{provide:He,useValue:{subscriptSizing:"dynamic"}},Me,xe,{provide:ce,useFactory:n=>function(){n.loadPermissions()},deps:[Be],multi:!0}],imports:[ke,je,Re,Pe.forRoot({toastComponent:Ae,positionClass:"toast-bottom-right",closeButton:!0}),me,Fe.forRoot(Ot),Le.forRoot(),Ie.initializeApp(F.firebaseConfig),we,Te.forRoot()]});let e=o;return e})();F.production&&void 0;fe().bootstrapModule(Ve).catch(e=>console.error(e));
|