marketplacepos 5.43.1 → 5.43.3
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/3rdpartylicenses.txt +106 -106
- package/Marketplace/{chunk-XQGRC7V2.js → chunk-2EOAYJGX.js} +1 -1
- package/Marketplace/{chunk-A4F37V57.js → chunk-2IDDYNBR.js} +1 -1
- package/Marketplace/{chunk-NPG45B2D.js → chunk-2YTIJJIP.js} +1 -1
- package/Marketplace/{chunk-USRA2YIW.js → chunk-32WYK3BN.js} +1 -1
- package/Marketplace/{chunk-SXLKJLAE.js → chunk-3BT5DR3X.js} +1 -1
- package/Marketplace/chunk-3KLLGMOI.js +1 -0
- package/Marketplace/{chunk-SIYMMMKQ.js → chunk-3LRWABHB.js} +1 -1
- package/Marketplace/{chunk-YPVYJUXS.js → chunk-3NMM37H7.js} +1 -1
- package/Marketplace/chunk-3R5ZQMUB.js +1 -0
- package/Marketplace/chunk-3YSU3BT5.js +1 -0
- package/Marketplace/chunk-4MB4MXQH.js +1 -0
- package/Marketplace/chunk-52XDZALN.js +1 -0
- package/Marketplace/chunk-53FB4P3K.js +2 -0
- package/Marketplace/{chunk-SYENQYR7.js → chunk-5JVEEL2T.js} +1 -1
- package/Marketplace/{chunk-4CTORK4F.js → chunk-5KS4WK6H.js} +1 -1
- package/Marketplace/{chunk-OKAPL3YZ.js → chunk-5OHRA4AS.js} +1 -1
- package/Marketplace/chunk-5P35Z5AH.js +1 -0
- package/Marketplace/chunk-63FUL7BY.js +1 -0
- package/Marketplace/chunk-66MLRB2J.js +5 -0
- package/Marketplace/{chunk-KQQCKHF3.js → chunk-67N4UGA5.js} +1 -1
- package/Marketplace/{chunk-ZR5IXNXB.js → chunk-6FY74YFQ.js} +1 -1
- package/Marketplace/chunk-6NIAY25W.js +1 -0
- package/Marketplace/chunk-6QYD6NIJ.js +1 -0
- package/Marketplace/{chunk-A2YNWIX6.js → chunk-6W6DKFRE.js} +1 -1
- package/Marketplace/{chunk-4PZ5Q3HI.js → chunk-722SRHLY.js} +1 -1
- package/Marketplace/{chunk-WHZ44BAL.js → chunk-74IXJYWO.js} +1 -1
- package/Marketplace/chunk-7B5X52SQ.js +1 -0
- package/Marketplace/chunk-7H4VD3CX.js +1 -0
- package/Marketplace/{chunk-NB4T45CV.js → chunk-7NCRIMVP.js} +1 -1
- package/Marketplace/{chunk-M5IQRAHV.js → chunk-7SVF5UPT.js} +1 -1
- package/Marketplace/{chunk-55OI2SUF.js → chunk-7UHCDGAA.js} +1 -1
- package/Marketplace/{chunk-LSXUXG54.js → chunk-7ZXNQAAU.js} +1 -1
- package/Marketplace/{chunk-SLQA5QBT.js → chunk-A4BNLR77.js} +1 -1
- package/Marketplace/chunk-AEOSNAHH.js +1 -0
- package/Marketplace/chunk-AQTXFEBA.js +1 -0
- package/Marketplace/{chunk-MZI5AYCE.js → chunk-ATZ475FN.js} +1 -1
- package/Marketplace/{chunk-LR4UZ2OS.js → chunk-AYPY47VM.js} +1 -1
- package/Marketplace/{chunk-2SXRC4IG.js → chunk-B5VBBEEN.js} +1 -1
- package/Marketplace/{chunk-OZ77CAJD.js → chunk-B73M3AMU.js} +1 -1
- package/Marketplace/{chunk-JS55A2RS.js → chunk-B7KTCPKC.js} +3 -3
- package/Marketplace/{chunk-6MPSYC77.js → chunk-BFU7VKO3.js} +1 -1
- package/Marketplace/{chunk-HV6V6JHY.js → chunk-C4XFI4J7.js} +1 -1
- package/Marketplace/{chunk-4VFVMBPQ.js → chunk-CAAQIBRF.js} +1 -1
- package/Marketplace/{chunk-UPYS4A4M.js → chunk-CIIO2CJ6.js} +1 -1
- package/Marketplace/chunk-CKKAJ5VE.js +1 -0
- package/Marketplace/{chunk-6X2OBNJQ.js → chunk-CLER2MX6.js} +1 -1
- package/Marketplace/{chunk-HPYTL6TX.js → chunk-CMTBBXR5.js} +1 -1
- package/Marketplace/{chunk-ZN47D2EO.js → chunk-CNMMW5LL.js} +1 -1
- package/Marketplace/{chunk-JRWFZQ5K.js → chunk-CROPN4YC.js} +1 -1
- package/Marketplace/chunk-CSBEB66Y.js +1 -0
- package/Marketplace/chunk-D7NF5HTE.js +1 -0
- package/Marketplace/{chunk-JOBWFOGC.js → chunk-DDV4X5WD.js} +1 -1
- package/Marketplace/{chunk-FWG4H3QG.js → chunk-DRHWRRQV.js} +1 -1
- package/Marketplace/{chunk-HTQJCQ32.js → chunk-DYWTLXMP.js} +1 -1
- package/Marketplace/{chunk-WGXUKTYP.js → chunk-E3ROEHBW.js} +1 -1
- package/Marketplace/{chunk-5QAURMZF.js → chunk-E6XWD6WX.js} +1 -1
- package/Marketplace/{chunk-VRI3CYGG.js → chunk-ECRWEMEV.js} +1 -1
- package/Marketplace/{chunk-5XI7HWS5.js → chunk-EH6HWI3G.js} +1 -1
- package/Marketplace/{chunk-UJZ3KSBV.js → chunk-EK4VKN7N.js} +1 -1
- package/Marketplace/{chunk-E2CS7ZMC.js → chunk-EPVCMYCI.js} +1 -1
- package/Marketplace/chunk-ERLW7T36.js +1 -0
- package/Marketplace/{chunk-IYHPRFB5.js → chunk-FNEDIIIS.js} +1 -1
- package/Marketplace/chunk-FQQ3RU7S.js +1 -0
- package/Marketplace/chunk-G47XGOST.js +1 -0
- package/Marketplace/{chunk-JTOYNS32.js → chunk-G6X5CZ34.js} +1 -1
- package/Marketplace/{chunk-FBZW4Y3J.js → chunk-GSZJGR7K.js} +1 -1
- package/Marketplace/{chunk-O6U5QCHJ.js → chunk-H3IVI3LN.js} +1 -1
- package/Marketplace/{chunk-LHD7CYML.js → chunk-H3J5OAIG.js} +1 -1
- package/Marketplace/{chunk-OMDX33L2.js → chunk-H4OBICY5.js} +2 -2
- package/Marketplace/chunk-HI5JCHWS.js +1 -0
- package/Marketplace/{chunk-JT4Y2ID4.js → chunk-HXSHMC5O.js} +1 -1
- package/Marketplace/{chunk-TNKPTRB3.js → chunk-HYJVHRMN.js} +1 -1
- package/Marketplace/chunk-I66B4PT4.js +1 -0
- package/Marketplace/{chunk-JV4MMNGD.js → chunk-IA6KOBDJ.js} +1 -1
- package/Marketplace/chunk-IHPLJL2D.js +1 -0
- package/Marketplace/{chunk-2TZBEYNY.js → chunk-IL5JIRWJ.js} +1 -1
- package/Marketplace/{chunk-RFGNZCTV.js → chunk-IOOIEOGD.js} +1 -1
- package/Marketplace/{chunk-MQXPOHBV.js → chunk-J2KWRDVH.js} +1 -1
- package/Marketplace/{chunk-6LH7FSOW.js → chunk-JDIBETL5.js} +1 -1
- package/Marketplace/{chunk-5PVFITW6.js → chunk-JHEGROJF.js} +1 -1
- package/Marketplace/{chunk-ZAVDOMSW.js → chunk-JILE74BG.js} +1 -1
- package/Marketplace/{chunk-XXKHKD6T.js → chunk-JVOLT3NH.js} +1 -1
- package/Marketplace/{chunk-4M63ID5T.js → chunk-JXSBFTQM.js} +1 -1
- package/Marketplace/{chunk-SZECT5VQ.js → chunk-K2GYNGBL.js} +1 -1
- package/Marketplace/{chunk-XEMNZHW6.js → chunk-L7K5HOBY.js} +1 -1
- package/Marketplace/{chunk-25OT4I3W.js → chunk-LA6B2JGP.js} +1 -1
- package/Marketplace/chunk-LRT6Q4SU.js +1 -0
- package/Marketplace/{chunk-AVEGIEYT.js → chunk-LZCEM2PC.js} +1 -1
- package/Marketplace/{chunk-MTUIRWOB.js → chunk-M2FCTYGU.js} +1 -1
- package/Marketplace/{chunk-R76V3PTN.js → chunk-M5JQ7BGW.js} +1 -1
- package/Marketplace/{chunk-PO7JVKK3.js → chunk-M5XGP4SG.js} +1 -1
- package/Marketplace/chunk-M7NOQDVW.js +1 -0
- package/Marketplace/{chunk-KX5AWR75.js → chunk-M7NQID2Z.js} +1 -1
- package/Marketplace/{chunk-ZIOAOUAM.js → chunk-MHCAI6KP.js} +1 -1
- package/Marketplace/{chunk-AUO2UUO7.js → chunk-MPNBRDLS.js} +1 -1
- package/Marketplace/chunk-NJBQPECN.js +2 -0
- package/Marketplace/{chunk-ZNDU44GH.js → chunk-NS46QSCM.js} +1 -1
- package/Marketplace/{chunk-6J745ID2.js → chunk-NWQKGPCM.js} +2 -2
- package/Marketplace/{chunk-KWQS4KX7.js → chunk-OAOQONOA.js} +1 -1
- package/Marketplace/{chunk-AGRVVEIR.js → chunk-OC2FBL33.js} +1 -1
- package/Marketplace/{chunk-NZA4BEER.js → chunk-OLOIQI4D.js} +1 -1
- package/Marketplace/{chunk-KXS76PRS.js → chunk-PAEIUO2F.js} +1 -1
- package/Marketplace/{chunk-6IFZ2TO6.js → chunk-PFB7XEYZ.js} +1 -1
- package/Marketplace/{chunk-IKPRRD5D.js → chunk-PFIBU2IX.js} +1 -1
- package/Marketplace/chunk-PSPROJXC.js +3 -0
- package/Marketplace/{chunk-OL5RQ7K4.js → chunk-QEISWAZ3.js} +1 -1
- package/Marketplace/{chunk-33IXC6UG.js → chunk-QWHPQWPM.js} +1 -1
- package/Marketplace/{chunk-GZXQUJKX.js → chunk-RECNBAEB.js} +1 -1
- package/Marketplace/{chunk-GPC4DECX.js → chunk-RMCAWPWK.js} +1 -1
- package/Marketplace/{chunk-L53DCJFT.js → chunk-RQQSAPSO.js} +1 -1
- package/Marketplace/{chunk-UEWZXE4O.js → chunk-RZU7PSKG.js} +1 -1
- package/Marketplace/{chunk-NTW6FBP5.js → chunk-SB7NWPDS.js} +1 -1
- package/Marketplace/{chunk-F4GMWHYJ.js → chunk-SM3P57SO.js} +1 -1
- package/Marketplace/{chunk-ALKC77XL.js → chunk-SN4AOGQK.js} +1 -1
- package/Marketplace/{chunk-BQTUAYGY.js → chunk-SRVGUGY2.js} +1 -1
- package/Marketplace/{chunk-UJYSVGLV.js → chunk-SWQXSJ7O.js} +1 -1
- package/Marketplace/{chunk-SH7KN2AS.js → chunk-SYUFPF3D.js} +1 -1
- package/Marketplace/chunk-T72JRKMQ.js +5 -0
- package/Marketplace/{chunk-3D323DES.js → chunk-TD7KVTAY.js} +1 -1
- package/Marketplace/{chunk-7HYMSL6P.js → chunk-UAOM4KRX.js} +1 -1
- package/Marketplace/{chunk-GOS4RIF2.js → chunk-UDIDZKN6.js} +1 -1
- package/Marketplace/{chunk-UF4FKEE7.js → chunk-UEPQYAWE.js} +1 -1
- package/Marketplace/{chunk-CPJFWVUP.js → chunk-UWIHXA2S.js} +1 -1
- package/Marketplace/{chunk-2BUABOHG.js → chunk-V5BKQSAT.js} +1 -1
- package/Marketplace/{chunk-ZBVPUFFS.js → chunk-V6CA3EUG.js} +1 -1
- package/Marketplace/{chunk-KYIY3VQ6.js → chunk-VIMB2VWB.js} +1 -1
- package/Marketplace/{chunk-OJWFYXZX.js → chunk-VKMFDXJJ.js} +1 -1
- package/Marketplace/chunk-VP4W3SEJ.js +1 -0
- package/Marketplace/chunk-VTSYSZDA.js +1 -0
- package/Marketplace/{chunk-5EQNOCXP.js → chunk-WPW3D4MQ.js} +1 -1
- package/Marketplace/{chunk-LWSRD5LF.js → chunk-WUHNNJ2C.js} +1 -1
- package/Marketplace/chunk-WVAEHKDB.js +1 -0
- package/Marketplace/{chunk-NRCXYGO3.js → chunk-WW22F76D.js} +1 -1
- package/Marketplace/chunk-X4C6LACX.js +1 -0
- package/Marketplace/chunk-XB4AKFM3.js +1 -0
- package/Marketplace/{chunk-CGJ37FLZ.js → chunk-XOBNVRDL.js} +1 -1
- package/Marketplace/{chunk-GHBGGQNM.js → chunk-XUL4LU4R.js} +1 -1
- package/Marketplace/chunk-YB65PX7S.js +1 -0
- package/Marketplace/{chunk-HFKKITEW.js → chunk-YCH6HHU3.js} +1 -1
- package/Marketplace/{chunk-O55KM5KY.js → chunk-YHKEECJR.js} +1 -1
- package/Marketplace/chunk-YMAIO6KK.js +15 -0
- package/Marketplace/{chunk-WHRDK5NL.js → chunk-YMMOJKVP.js} +1 -1
- package/Marketplace/{chunk-CINZW7MA.js → chunk-YUCD4HRB.js} +1 -1
- package/Marketplace/{chunk-UMY6NG57.js → chunk-YZKPQRLO.js} +1 -1
- package/Marketplace/chunk-ZHZMT7GZ.js +1 -0
- package/Marketplace/index.html +3 -3
- package/Marketplace/main-2UGBVB65.js +1 -0
- package/package.json +1 -1
- package/Marketplace/chunk-222IBZU6.js +0 -1
- package/Marketplace/chunk-235G2DSM.js +0 -1
- package/Marketplace/chunk-2DJWDXTZ.js +0 -4
- package/Marketplace/chunk-2TL43SUD.js +0 -1
- package/Marketplace/chunk-2ZTDLZVZ.js +0 -1
- package/Marketplace/chunk-3K33MNZY.js +0 -1
- package/Marketplace/chunk-74L5LOR4.js +0 -1
- package/Marketplace/chunk-ALSWTSZR.js +0 -1
- package/Marketplace/chunk-B37XDXUI.js +0 -1
- package/Marketplace/chunk-BJWQKM5G.js +0 -1
- package/Marketplace/chunk-CQ6GTQW6.js +0 -1
- package/Marketplace/chunk-CSSG7NAJ.js +0 -1
- package/Marketplace/chunk-CVFPPKTF.js +0 -1
- package/Marketplace/chunk-DJILLV4M.js +0 -1
- package/Marketplace/chunk-E7X3E2GE.js +0 -2
- package/Marketplace/chunk-EL2TGTHA.js +0 -1
- package/Marketplace/chunk-FN6AYDMI.js +0 -1
- package/Marketplace/chunk-G4OF4YLE.js +0 -2
- package/Marketplace/chunk-ILQQ6R7K.js +0 -15
- package/Marketplace/chunk-IMO7KDT2.js +0 -1
- package/Marketplace/chunk-JSA73LJT.js +0 -1
- package/Marketplace/chunk-JX5NLHUQ.js +0 -2
- package/Marketplace/chunk-LPK5TPBQ.js +0 -1
- package/Marketplace/chunk-MC3GSUIF.js +0 -1
- package/Marketplace/chunk-NOO3VUTK.js +0 -1
- package/Marketplace/chunk-NXC2W6VA.js +0 -1
- package/Marketplace/chunk-OUEMCONQ.js +0 -5
- package/Marketplace/chunk-QQ3TCYLJ.js +0 -1
- package/Marketplace/chunk-R4IYKVKK.js +0 -1
- package/Marketplace/chunk-R62F5NWC.js +0 -1
- package/Marketplace/chunk-RBRIJGT2.js +0 -3
- package/Marketplace/chunk-SMCI6XBO.js +0 -1
- package/Marketplace/chunk-WCU6IR2R.js +0 -1
- package/Marketplace/chunk-XND52RIU.js +0 -1
- package/Marketplace/chunk-Y5IPCXWN.js +0 -1
- package/Marketplace/chunk-YA7OZNAF.js +0 -1
- package/Marketplace/main-HEFRSFSR.js +0 -1
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{a as T}from"./chunk-Z3ITXK3D.js";import{a as Qe}from"./chunk-ACIMXBIC.js";import{a as Ke,b as me,c as ze,d as Ve,e as Se,f as qe,g as ve,h as Ge,i as G,j as Ae,k as y}from"./chunk-TGMCGROM.js";import{a as Ye}from"./chunk-V3NCYRCF.js";import{b as ge,c as ee}from"./chunk-PW42BQIY.js";import{a as Xe}from"./chunk-SWQXSJ7O.js";import{a as Je}from"./chunk-AEOSNAHH.js";import{e as te}from"./chunk-JXSBFTQM.js";import{b as Ze}from"./chunk-ATZ475FN.js";import{G as We,n as $e,o as Ue,p as He}from"./chunk-M2FCTYGU.js";import{F as Oe,G as Me,Hb as U,La as L,O as ue,Ra as fe,T as Ne,Wa as $,Z as de,aa as x,ba as he,c as g,dd as Fe,ea as V,ed as Le,f as Y,id as q,j as xe,ja as k,k as Re,ka as B,ma as b,n as K,o as Q,oa as h,p as R,pa as F,q as z,qa as Be,ua as pe,v as D,w as je}from"./chunk-B7KTCPKC.js";import{a as le,i as I}from"./chunk-66YHNWRR.js";var et={production:!0,version:"5.43.3",firebaseConfig:{apiKey:"AIzaSyDnnitFXpM8TglWKNpzu4ChgF98n25Rgvw",authDomain:"auth.dealpos.com",projectId:"devops-signin",storageBucket:"devops-signin.appspot.com",messagingSenderId:"412465165194",appId:"1:412465165194:web:03d806f6b6ab6f8b460e73",measurementId:"G-MNDBRJ5XZD"},news:"https://changelog.dealpos.app/umbraco/delivery/api/v2/content?fetch=children:omni&sort=sortOrder:asc"};var wt="firebase",kt="11.10.0";G(wt,kt,"app");var H=new Fe("ANGULARFIRE2_VERSION");var tt=(r,s)=>{let e=s?[s]:Ge(),t=[];return e.forEach(n=>{n.container.getProvider(r).instances.forEach(i=>{t.includes(i)||t.push(i)})}),t},we=function(r){return r[r.SILENT=0]="SILENT",r[r.WARN=1]="WARN",r[r.VERBOSE=2]="VERBOSE",r}(we||{}),Pr=q()&&typeof Zone<"u"?we.WARN:we.SILENT;var re=class{zone;delegate;constructor(s,e=Re){this.zone=s,this.delegate=e}now(){return this.delegate.now()}schedule(s,e,t){let n=this.zone,o=function(i){n?n.runGuarded(()=>{s.apply(this,[i])}):s.apply(this,[i])};return this.delegate.schedule(o,e,t)}},ke=(()=>{class r{outsideAngular;insideAngular;constructor(){let e=F(L);this.outsideAngular=e.runOutsideAngular(()=>new re(typeof Zone>"u"?void 0:Zone.current)),this.insideAngular=e.run(()=>new re(typeof Zone>"u"?void 0:Zone.current,xe))}static \u0275fac=function(t){return new(t||r)};static \u0275prov=k({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();var It=new Map,bt={activated:!1,tokenObservers:[]},Tt={initialized:!1,enabled:!1};function C(r){return It.get(r)||Object.assign({},bt)}function it(){return Tt}var yt="https://content-firebaseappcheck.googleapis.com/v1";var Ct="exchangeDebugToken",rt={OFFSET_DURATION:5*60*1e3,RETRIAL_MIN_WAIT:30*1e3,RETRIAL_MAX_WAIT:16*60*1e3},Lr=24*60*60*1e3;var be=class{constructor(s,e,t,n,o){if(this.operation=s,this.retryPolicy=e,this.getWaitDuration=t,this.lowerBound=n,this.upperBound=o,this.pending=null,this.nextErrorWaitInterval=n,n>o)throw new Error("Proactive refresh lower bound greater than upper bound!")}start(){this.nextErrorWaitInterval=this.lowerBound,this.process(!0).catch(()=>{})}stop(){this.pending&&(this.pending.reject("cancelled"),this.pending=null)}isRunning(){return!!this.pending}process(s){return I(this,null,function*(){this.stop();try{this.pending=new me,this.pending.promise.catch(e=>{}),yield Pt(this.getNextRun(s)),this.pending.resolve(),yield this.pending.promise,this.pending=new me,this.pending.promise.catch(e=>{}),yield this.operation(),this.pending.resolve(),yield this.pending.promise,this.process(!0).catch(()=>{})}catch(e){this.retryPolicy(e)?this.process(!1).catch(()=>{}):this.stop()}})}getNextRun(s){if(s)return this.nextErrorWaitInterval=this.lowerBound,this.getWaitDuration();{let e=this.nextErrorWaitInterval;return this.nextErrorWaitInterval*=2,this.nextErrorWaitInterval>this.upperBound&&(this.nextErrorWaitInterval=this.upperBound),e}}};function Pt(r){return new Promise(s=>{setTimeout(s,r)})}var Dt={"already-initialized":"You have already called initializeAppCheck() for FirebaseApp {$appName} with different options. To avoid this error, call initializeAppCheck() with the same options as when it was originally called. This will return the already initialized instance.","use-before-activation":"App Check is being used before initializeAppCheck() is called for FirebaseApp {$appName}. Call initializeAppCheck() before instantiating other Firebase services.","fetch-network-error":"Fetch failed to connect to a network. Check Internet connection. Original error: {$originalErrorMessage}.","fetch-parse-error":"Fetch client could not parse response. Original error: {$originalErrorMessage}.","fetch-status-error":"Fetch server returned an HTTP error status. HTTP status: {$httpStatus}.","storage-open":"Error thrown when opening storage. Original error: {$originalErrorMessage}.","storage-get":"Error thrown when reading from storage. Original error: {$originalErrorMessage}.","storage-set":"Error thrown when writing to storage. Original error: {$originalErrorMessage}.","recaptcha-error":"ReCAPTCHA error.","initial-throttle":"{$httpStatus} error. Attempts allowed again after {$time}",throttled:"Requests throttled due to previous {$httpStatus} error. Attempts allowed again after {$time}"},j=new Ve("appCheck","AppCheck",Dt);function st(r){if(!C(r).activated)throw j.create("use-before-activation",{appName:r.name})}function at(t,n){return I(this,arguments,function*({url:r,body:s},e){let o={"Content-Type":"application/json"},i=e.getImmediate({optional:!0});if(i){let f=yield i.getHeartbeatsHeader();f&&(o["X-Firebase-Client"]=f)}let a={method:"POST",body:JSON.stringify(s),headers:o},l;try{l=yield fetch(r,a)}catch(f){throw j.create("fetch-network-error",{originalErrorMessage:f?.message})}if(l.status!==200)throw j.create("fetch-status-error",{httpStatus:l.status});let c;try{c=yield l.json()}catch(f){throw j.create("fetch-parse-error",{originalErrorMessage:f?.message})}let d=c.ttl.match(/^([\d.]+)(s)$/);if(!d||!d[2]||isNaN(Number(d[1])))throw j.create("fetch-parse-error",{originalErrorMessage:`ttl field (timeToLive) is not in standard Protobuf Duration format: ${c.ttl}`});let u=Number(d[1])*1e3,p=Date.now();return{token:c.token,expireTimeMillis:p+u,issuedAtTimeMillis:p}})}function ct(r,s){let{projectId:e,appId:t,apiKey:n}=r.options;return{url:`${yt}/projects/${e}/apps/${t}:${Ct}?key=${n}`,body:{debug_token:s}}}var _t="firebase-app-check-database",xt=1,Te="firebase-app-check-store";var ne=null;function Rt(){return ne||(ne=new Promise((r,s)=>{try{let e=indexedDB.open(_t,xt);e.onsuccess=t=>{r(t.target.result)},e.onerror=t=>{var n;s(j.create("storage-open",{originalErrorMessage:(n=t.target.error)===null||n===void 0?void 0:n.message}))},e.onupgradeneeded=t=>{let n=t.target.result;switch(t.oldVersion){case 0:n.createObjectStore(Te,{keyPath:"compositeKey"})}}}catch(e){s(j.create("storage-open",{originalErrorMessage:e?.message}))}}),ne)}function jt(r,s){return Ot(Mt(r),s)}function Ot(r,s){return I(this,null,function*(){let t=(yield Rt()).transaction(Te,"readwrite"),o=t.objectStore(Te).put({compositeKey:r,value:s});return new Promise((i,a)=>{o.onsuccess=l=>{i()},t.onerror=l=>{var c;a(j.create("storage-set",{originalErrorMessage:(c=l.target.error)===null||c===void 0?void 0:c.message}))}})})}function Mt(r){return`${r.options.appId}-${r.name}`}var Z=new qe("@firebase/app-check");function Ee(r,s){return ze()?jt(r,s).catch(e=>{Z.warn(`Failed to write token to IndexedDB. Error: ${e}`)}):Promise.resolve()}function lt(){return it().enabled}function ut(){return I(this,null,function*(){let r=it();if(r.enabled&&r.token)return r.token.promise;throw Error(`
|
|
2
|
+
Can't get debug token in production mode.
|
|
3
|
+
`)})}var Nt={error:"UNKNOWN_ERROR"};function Bt(r){return Ke.encodeString(JSON.stringify(r),!1)}function ye(r,s=!1,e=!1){return I(this,null,function*(){let t=r.app;st(t);let n=C(t),o=n.token,i;if(o&&!J(o)&&(n.token=void 0,o=void 0),!o){let c=yield n.cachedTokenPromise;c&&(J(c)?o=c:yield Ee(t,void 0))}if(!s&&o&&J(o))return{token:o.token};let a=!1;if(lt())try{n.exchangeTokenPromise||(n.exchangeTokenPromise=at(ct(t,yield ut()),r.heartbeatServiceProvider).finally(()=>{n.exchangeTokenPromise=void 0}),a=!0);let c=yield n.exchangeTokenPromise;return yield Ee(t,c),n.token=c,{token:c.token}}catch(c){return c.code==="appCheck/throttled"||c.code==="appCheck/initial-throttle"?Z.warn(c.message):e&&Z.error(c),Ie(c)}try{n.exchangeTokenPromise||(n.exchangeTokenPromise=n.provider.getToken().finally(()=>{n.exchangeTokenPromise=void 0}),a=!0),o=yield C(t).exchangeTokenPromise}catch(c){c.code==="appCheck/throttled"||c.code==="appCheck/initial-throttle"?Z.warn(c.message):e&&Z.error(c),i=c}let l;return o?i?J(o)?l={token:o.token,internalError:i}:l=Ie(i):(l={token:o.token},n.token=o,yield Ee(t,o)):l=Ie(i),a&&Ut(t,l),l})}function Ft(r){return I(this,null,function*(){let s=r.app;st(s);let{provider:e}=C(s);if(lt()){let t=yield ut(),{token:n}=yield at(ct(s,t),r.heartbeatServiceProvider);return{token:n}}else{let{token:t}=yield e.getToken();return{token:t}}})}function Lt(r,s,e,t){let{app:n}=r,o=C(n),i={next:e,error:t,type:s};if(o.tokenObservers=[...o.tokenObservers,i],o.token&&J(o.token)){let a=o.token;Promise.resolve().then(()=>{e({token:a.token}),nt(r)}).catch(()=>{})}o.cachedTokenPromise.then(()=>nt(r))}function dt(r,s){let e=C(r),t=e.tokenObservers.filter(n=>n.next!==s);t.length===0&&e.tokenRefresher&&e.tokenRefresher.isRunning()&&e.tokenRefresher.stop(),e.tokenObservers=t}function nt(r){let{app:s}=r,e=C(s),t=e.tokenRefresher;t||(t=$t(r),e.tokenRefresher=t),!t.isRunning()&&e.isTokenAutoRefreshEnabled&&t.start()}function $t(r){let{app:s}=r;return new be(()=>I(null,null,function*(){let e=C(s),t;if(e.token?t=yield ye(r,!0):t=yield ye(r),t.error)throw t.error;if(t.internalError)throw t.internalError}),()=>!0,()=>{let e=C(s);if(e.token){let t=e.token.issuedAtTimeMillis+(e.token.expireTimeMillis-e.token.issuedAtTimeMillis)*.5+3e5,n=e.token.expireTimeMillis-5*60*1e3;return t=Math.min(t,n),Math.max(0,t-Date.now())}else return 0},rt.RETRIAL_MIN_WAIT,rt.RETRIAL_MAX_WAIT)}function Ut(r,s){let e=C(r).tokenObservers;for(let t of e)try{t.type==="EXTERNAL"&&s.error!=null?t.error(s.error):t.next(s)}catch{}}function J(r){return r.expireTimeMillis-Date.now()>0}function Ie(r){return{token:Bt(Nt),error:r}}var Ce=class{constructor(s,e){this.app=s,this.heartbeatServiceProvider=e}_delete(){let{tokenObservers:s}=C(this.app);for(let e of s)dt(this.app,e.next);return Promise.resolve()}};function Ht(r,s){return new Ce(r,s)}function Wt(r){return{getToken:s=>ye(r,s),getLimitedUseToken:()=>Ft(r),addTokenListener:s=>Lt(r,"INTERNAL",s),removeTokenListener:s=>dt(r.app,s)}}var Kt="@firebase/app-check",zt="0.10.1";var Vt="app-check",ot="app-check-internal";function qt(){ve(new Se(Vt,r=>{let s=r.getProvider("app").getImmediate(),e=r.getProvider("heartbeat");return Ht(s,e)},"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((r,s,e)=>{r.getProvider(ot).initialize()})),ve(new Se(ot,r=>{let s=r.getProvider("app-check").getImmediate();return Wt(s)},"PUBLIC").setInstantiationMode("EXPLICIT")),G(Kt,zt)}qt();var Gt="app-check";var oe=class{constructor(){return tt(Gt)}};var Zt=["localhost","0.0.0.0","127.0.0.1"],en=typeof window<"u"&&Zt.includes(window.location.hostname);var Xt="firebase",Yt="11.10.0";y.registerVersion(Xt,Yt,"app-compat");var Qt=["ngOnDestroy"],pt=(r,s,e,t={})=>new Proxy(r,{get:(n,o)=>e.runOutsideAngular(()=>{if(r[o])return t?.spy?.get&&t.spy.get(o,r[o]),r[o];if(Qt.indexOf(o)>-1)return()=>{};let i=s.toPromise().then(a=>{let l=a?.[o];return typeof l=="function"?l.bind(a):l?.then?l.then(c=>e.run(()=>c)):e.run(()=>l)});return new Proxy(()=>{},{get:(a,l)=>i[l],apply:(a,l,c)=>i.then(d=>{let u=d?.(...c);return t?.spy?.apply&&t.spy.apply(o,c,u),u})})})});var ie=class{constructor(s){return s}},se=new b("angularfire2.app.options"),ae=new b("angularfire2.app.name");function Pe(r,s,e){let t=typeof e=="string"&&e||"[DEFAULT]",n=typeof e=="object"&&e||{};n.name=n.name||t;let i=y.apps.filter(a=>a&&a.name===n.name)[0]||s.runOutsideAngular(()=>y.initializeApp(r,n));try{if(JSON.stringify(r)!==JSON.stringify(i.options)){let a=!!module.hot;er("error",`${i.name} Firebase App already initialized with different options${a?", you may need to reload as Firebase is not HMR aware.":"."}`)}}catch{}return new ie(i)}var er=(r,...s)=>{q()&&typeof console<"u"&&console[r](...s)},tr={provide:ie,useFactory:Pe,deps:[se,L,[new Be,ae]]},Go=(()=>{class r{static initializeApp(e,t){return{ngModule:r,providers:[{provide:se,useValue:e},{provide:ae,useValue:t}]}}constructor(e){y.registerVersion("angularfire",H.full,"core"),y.registerVersion("angularfire",H.full,"app-compat"),y.registerVersion("angular",Le.full,e.toString())}static \u0275fac=function(t){return new(t||r)(h($))};static \u0275mod=U({type:r});static \u0275inj=B({providers:[tr]})}return r})();function ft(r,s,e,t,n){let[,o,i]=globalThis.\u0275AngularfireInstanceCache.find(a=>a[0]===r)||[];if(o)return rr(n,i)||(ht("error",`${s} was already initialized on the ${e} Firebase App with different settings.${nr?" You may need to reload as Firebase is not HMR aware.":""}`),ht("warn",{is:n,was:i})),o;{let a=t();return globalThis.\u0275AngularfireInstanceCache.push([r,a,n]),a}}function rr(r,s){try{return r.toString()===s.toString()}catch{return r===s}}var nr=typeof module<"u"&&!!module.hot,ht=(r,...s)=>{q()&&typeof console<"u"&&console[r](...s)};globalThis.\u0275AngularfireInstanceCache||=[];var or=new b("angularfire2.auth.use-emulator"),ir=new b("angularfire2.auth.settings"),sr=new b("angularfire2.auth.tenant-id"),ar=new b("angularfire2.auth.langugage-code"),cr=new b("angularfire2.auth.use-device-language"),lr=new b("angularfire.auth.persistence"),ur=(r,s,e,t,n,o,i,a)=>ft(`${r.name}.auth`,"AngularFireAuth",r.name,()=>{let l=s.runOutsideAngular(()=>r.auth());if(e&&l.useEmulator(...e),t&&(l.tenantId=t),l.languageCode=n,o&&l.useDeviceLanguage(),i)for(let[c,d]of Object.entries(i))l.settings[c]=d;return a&&l.setPersistence(a),l},[e,t,n,o,i,a]),De=(()=>{class r{injector=F(pe);authState;idToken;user;idTokenResult;credential;constructor(e,t,n,o,i,a,l,c,d,u,p,f){let W=new Y,O=z(void 0).pipe(K(i.outsideAngular),x(()=>o.runOutsideAngular(()=>import("./chunk-GCECFUOP.js"))),D(()=>Pe(e,o,t)),D(P=>ur(P,o,a,c,d,u,l,p)),de({bufferSize:1,refCount:!1}));if(He(n))this.authState=this.user=this.idToken=this.idTokenResult=this.credential=z(null);else{O.pipe(Ne()).subscribe();let P=O.pipe(x(S=>S.getRedirectResult().then(_=>_,()=>null)),Ze(this.injector),de({bufferSize:1,refCount:!1})),X=O.pipe(x(S=>new g(_=>({unsubscribe:o.runOutsideAngular(()=>S.onAuthStateChanged(M=>_.next(M),M=>_.error(M),()=>_.complete()))})))),ce=O.pipe(x(S=>new g(_=>({unsubscribe:o.runOutsideAngular(()=>S.onIdTokenChanged(M=>_.next(M),M=>_.error(M),()=>_.complete()))}))));this.authState=P.pipe(he(X),Q(i.outsideAngular),K(i.insideAngular)),this.user=P.pipe(he(ce),Q(i.outsideAngular),K(i.insideAngular)),this.idToken=this.user.pipe(x(S=>S?R(S.getIdToken()):z(null))),this.idTokenResult=this.user.pipe(x(S=>S?R(S.getIdTokenResult()):z(null))),this.credential=Oe(P,W,this.authState.pipe(Me(S=>!S))).pipe(D(S=>S?.user?S:null),Q(i.outsideAngular),K(i.insideAngular))}return pt(this,O,o,{spy:{apply:(P,X,ce)=>{(P.startsWith("signIn")||P.startsWith("createUser"))&&ce.then(S=>W.next(S))}}})}static \u0275fac=function(t){return new(t||r)(h(se),h(ae,8),h($),h(L),h(ke),h(or,8),h(ir,8),h(sr,8),h(ar,8),h(cr,8),h(lr,8),h(oe,8))};static \u0275prov=k({token:r,factory:r.\u0275fac,providedIn:"any"})}return r})(),ui=(()=>{class r{constructor(){y.registerVersion("angularfire",H.full,"auth-compat")}static \u0275fac=function(t){return new(t||r)};static \u0275mod=U({type:r});static \u0275inj=B({providers:[De]})}return r})();function m(r,s,e,t){return new Promise((n,o)=>{r||o("IndexedDB not available");let i=r.open(s,e),a;i.onsuccess=l=>{a=i.result,n(a)},i.onerror=l=>{o(`IndexedDB error: ${i.error}`)},typeof t=="function"&&(i.onupgradeneeded=l=>{t(l,a)})})}function gt(r,s,e,t,n){if(!r)return;let o=r.open(s,e);o.onupgradeneeded=i=>{let a=i.target.result;t.forEach(c=>{if(!a.objectStoreNames.contains(c.store)){let d=a.createObjectStore(c.store,c.storeConfig);c.storeSchema.forEach(u=>{d.createIndex(u.name,u.keypath,u.options)})}});let l=n&&n();l&&Object.keys(l).map(c=>parseInt(c,10)).filter(c=>c>i.oldVersion).sort((c,d)=>c-d).forEach(c=>{l[c](a,o.transaction)}),a.close()},o.onsuccess=i=>{i.target.result.close()}}function hr(r,s,e){if(!r||!s||!e)throw Error('Params: "dbName", "version", "storeName" are mandatory.');return new g(t=>{try{let n=s+1,o=indexedDB.open(r,n);o.onupgradeneeded=i=>{let a=i.target.result;a.deleteObjectStore(e),a.close(),console.log("onupgradeneeded"),t.next(!0),t.complete()},o.onerror=i=>t.error(i)}catch(n){t.error(n)}})}function pr(r,s){return r.objectStoreNames.contains(s)}function E(r,s,e){r||e("You need to use the openDatabase function to create a database before you query it!"),pr(r,s)||e(`objectStore does not exists: ${s}`)}function A(r,s){let e=r.transaction(s.storeName,s.dbMode);return e.onerror=s.error,e.onabort=s.abort,e}function w(r,s,e,t){return{storeName:s,dbMode:r,error:n=>{e(n)},abort:n=>{e(n)}}}var v=function(r){return r.readonly="readonly",r.readwrite="readwrite",r}(v||{}),mt=new b(null),_e=(()=>{class r{constructor(e,t){if(this.dbConfig=e,this.platformId=t,!e.name)throw new Error("NgxIndexedDB: Please, provide the dbName in the configuration");if(!e.version)throw new Error("NgxIndexedDB: Please, provide the db version in the configuration");this.isBrowser=Ue(this.platformId),this.isBrowser&&(this.indexedDB=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB,gt(this.indexedDB,e.name,e.version,e.objectStoresMeta,e.migrationFactory),m(this.indexedDB,e.name).then(n=>{n.version!==e.version&&(this.dbConfig.version=n.version)}))}createObjectStore(e,t){let n=[e];gt(this.indexedDB,this.dbConfig.name,++this.dbConfig.version,n,t)}add(e,t,n){return new g(o=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(i=>{let l=A(i,w(v.readwrite,e,d=>o.error(d))).objectStore(e),c=n?l.add(t,n):l.add(t);c.onsuccess=d=>I(this,null,function*(){let u=d.target.result,p=l.get(u);p.onsuccess=f=>{o.next(f.target.result),o.complete()}})}).catch(i=>o.error(i))})}bulkAdd(e,t){let n=new Promise((o,i)=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(a=>{let c=A(a,w(v.readwrite,e,o,i)).objectStore(e),d=t.map(u=>new Promise((p,f)=>{let W=u.key;delete u.key;let O=W?c.add(u,W):c.add(u);O.onsuccess=P=>{let X=P.target.result;p(X)}}));o(Promise.all(d))}).catch(a=>i(a))});return R(n)}bulkDelete(e,t){let n=t.map(o=>new Promise((i,a)=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(l=>{let c=A(l,w(v.readwrite,e,a,i));c.objectStore(e).delete(o),c.oncomplete=()=>{this.getAll(e).pipe(ue(1)).subscribe(u=>{i(u)})}}).catch(l=>a(l))}));return R(Promise.all(n))}getByKey(e,t){return new g(n=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(o=>{let l=A(o,w(v.readonly,e,n.error)).objectStore(e).get(t);l.onsuccess=c=>{n.next(c.target.result),n.complete()},l.onerror=c=>{n.error(c)}}).catch(o=>n.error(o))})}bulkGet(e,t){let n=t.map(o=>this.getByKey(e,o));return new g(o=>{je(n).subscribe(i=>{o.next(i),o.complete()})})}getByID(e,t){return new g(n=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(o=>{E(o,e,c=>n.error(c));let l=A(o,w(v.readonly,e,n.error,n.next)).objectStore(e).get(t);l.onsuccess=c=>{n.next(c.target.result)}}).catch(o=>n.error(o))})}getByIndex(e,t,n){return new g(o=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(i=>{E(i,e,u=>o.error(u));let d=A(i,w(v.readonly,e,o.error)).objectStore(e).index(t).get(n);d.onsuccess=u=>{o.next(u.target.result),o.complete()}}).catch(i=>o.error(i))})}getAll(e){return new g(t=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(n=>{E(n,e,l=>t.error(l));let a=A(n,w(v.readonly,e,t.error,t.next)).objectStore(e).getAll();a.onerror=l=>{t.error(l)},a.onsuccess=({target:{result:l}})=>{t.next(l),t.complete()}}).catch(n=>t.error(n))})}update(e,t){return new g(n=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(o=>{E(o,e,c=>n.error(c));let a=A(o,w(v.readwrite,e,c=>n.error(c))).objectStore(e),l=a.put(t);l.onsuccess=c=>I(this,null,function*(){let d=c.target.result,u=a.get(d);u.onsuccess=p=>{n.next(p.target.result),n.complete()}})}).catch(o=>n.error(o))})}delete(e,t){return new g(n=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(o=>{E(o,e,l=>n.error(l));let i=A(o,w(v.readwrite,e,l=>n.error(l)));i.objectStore(e).delete(t),i.oncomplete=()=>{this.getAll(e).pipe(ue(1)).subscribe(l=>{n.next(l),n.complete()})}}).catch(o=>n.error(o))})}deleteByKey(e,t){return new g(n=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(o=>{E(o,e,l=>n.error(l));let i=A(o,w(v.readwrite,e,l=>n.error(l))),a=i.objectStore(e);i.oncomplete=()=>{n.next(!0),n.complete()},a.delete(t)}).catch(o=>n.error(o))})}clear(e){return new g(t=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(n=>{E(n,e,a=>t.error(a));let o=A(n,w(v.readwrite,e,a=>t.error(a)));o.objectStore(e).clear(),o.oncomplete=()=>{t.next(!0),t.complete()}}).catch(n=>t.error(n))})}deleteDatabase(){return new g(e=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(t=>I(this,null,function*(){yield t.close();let n=this.indexedDB.deleteDatabase(this.dbConfig.name);n.onsuccess=()=>{e.next(!0),e.complete()},n.onerror=o=>e.error(o),n.onblocked=()=>{throw new Error("Unable to delete database because it's blocked")}})).catch(t=>e.error(t))})}openCursor(e,t){return new g(n=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(o=>{E(o,e,c=>n.error(c));let a=A(o,w(v.readonly,e,n.error)).objectStore(e),l=t===void 0?a.openCursor():a.openCursor(t);l.onsuccess=c=>{n.next(c),n.complete()}}).catch(o=>n.error(o))})}openCursorByIndex(e,t,n,o=v.readonly){let i=new Y;return m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(a=>{E(a,e,p=>{i.error(p)});let u=A(a,w(o,e,p=>{i.error(p)},()=>{i.next()})).objectStore(e).index(t).openCursor(n);u.onsuccess=p=>{i.next(p)}}).catch(a=>i.error(a)),i}getAllByIndex(e,t,n){let o=[];return new g(i=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(a=>{E(a,e,p=>i.error(p));let u=A(a,w(v.readonly,e,i.error)).objectStore(e).index(t).openCursor(n);u.onsuccess=p=>{let f=p.target.result;f?(o.push(f.value),f.continue()):(i.next(o),i.complete())}}).catch(a=>i.error(a))})}getAllKeysByIndex(e,t,n){let o=[];return new g(i=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(a=>{E(a,e,p=>i.error(p));let u=A(a,w(v.readonly,e,i.error)).objectStore(e).index(t).openKeyCursor(n);u.onsuccess=p=>{let f=p.target.result;f?(o.push({primaryKey:f.primaryKey,key:f.key}),f.continue()):(i.next(o),i.complete())}}).catch(a=>i.error(a))})}count(e,t){return new g(n=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(o=>{E(o,e,c=>n.error(c));let l=A(o,w(v.readonly,e,n.error)).objectStore(e).count(t);l.onerror=c=>n.error(c),l.onsuccess=c=>{n.next(c.target.result),n.complete()}}).catch(o=>n.error(o))})}countByIndex(e,t,n){return new g(o=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(i=>{E(i,e,u=>o.error(u));let d=A(i,w(v.readonly,e,o.error)).objectStore(e).index(t).count(n);d.onerror=u=>o.error(u),d.onsuccess=u=>{o.next(u.target.result),o.complete()}}).catch(i=>o.error(i))})}deleteObjectStore(e){return hr(this.dbConfig.name,++this.dbConfig.version,e)}}return r.\u0275fac=function(e){return new(e||r)(h(mt),h($))},r.\u0275prov=k({token:r,factory:r.\u0275fac}),r})(),vi=(()=>{class r{static forRoot(e){return{ngModule:r,providers:[_e,{provide:mt,useValue:e}]}}}return r.\u0275fac=function(e){return new(e||r)},r.\u0275mod=U({type:r}),r.\u0275inj=B({imports:[[$e]]}),r})();var St=(()=>{class r{constructor(e){this.db=e,this.DATABASE="Categories"}saveCategoriesByChannelType(e,t){let n=this.getKey(t);return this.db.add(this.DATABASE,e,n).pipe(D(o=>e))}getCategoriesByChannelType(e){let t=this.getKey(e);return this.db.getByKey(this.DATABASE,t)}getKey(e){let t="";switch(e){case ge.Lazada:t="Lazada";break;case ge.Tokopedia:t="Tokopedia";break}return t}clearDatabase(){this.db.clear(this.DATABASE)}getHostName(){let e=localStorage.getItem("Authorization");return this.hostName=JSON.parse(e)?.Host,this.hostName}static{this.\u0275fac=function(t){return new(t||r)(h(_e))}}static{this.\u0275prov=k({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var vt=(()=>{class r{inititalizeIntercom(){let e=this.getFromLocalStorage();e?.Enabled&&window.Intercom("boot",{app_id:"xv1oomgl",name:e.Name,email:e.Email,created_at:e.Created,user_hash:e.Hash})}shutdown(){this.getFromLocalStorage()?.Enabled&&(window.Intercom("shutdown"),this.clearStorage())}clearStorage(){localStorage.removeItem("Intercom")}updateLocalStorage(e){let t={Enabled:!0};e&&(t=le(le({},t),e)),localStorage.setItem("Intercom",JSON.stringify(t))}getFromLocalStorage(){let e=localStorage.getItem("Intercom");return JSON.parse(e)}hideLauncher(){let e=this.getFromLocalStorage();e?.Enabled&&(window.Intercom("update",{app_id:"xv1oomgl",hide_default_launcher:!0}),e.hide_default_launcher=!0,this.updateLocalStorage(e))}showLauncher(){let e=this.getFromLocalStorage();e?.Enabled&&(window.Intercom("update",{app_id:"xv1oomgl",hide_default_launcher:!1}),e.hide_default_launcher=!1,this.updateLocalStorage(e))}isHideLauncher(){let e=this.getFromLocalStorage();return ee.IsEmpty(e?.hide_default_launcher)?!1:e?.hide_default_launcher}static{this.\u0275fac=function(t){return new(t||r)}}static{this.\u0275prov=k({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var At=(()=>{class r{constructor(){this.httpService=F(te),this.currentUser=fe(null),this.tokenValue=fe(null)}refreshToken(){return this.httpService.get(Ye.RefreshToken).pipe(V(e=>{this.updateTokenInLocalStorage(e)}))}updateTokenInLocalStorage(e){this.saveUserToLocalStorage(e),this.saveChannelsToLocalStorage(e.Channels)}saveUserToLocalStorage(e){let t=JSON.stringify(e);localStorage.setItem(T.USER,t)}getUser(){if(this.currentUser())return this.currentUser();{let e=localStorage.getItem(T.USER);return this.currentUser.set(e?JSON.parse(e):null),this.currentUser()}}getTokenValue(){let e=this.getUser();if(!this.tokenValue()){let t=Qe.parseJwt(e?.Token.access_token);this.tokenValue.set(t)}return this.tokenValue()}saveChannelsToLocalStorage(e){let t=JSON.stringify(e);localStorage.setItem(T.CHANNELS,t)}getChannels(){let e=localStorage.getItem(T.CHANNELS);return e?JSON.parse(e):[]}clearStorage(){localStorage.removeItem(T.USER),localStorage.removeItem(T.CHANNELS),this.currentUser.set(null),this.tokenValue.set(null)}static{this.\u0275fac=function(t){return new(t||r)}}static{this.\u0275prov=k({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var $i=(()=>{class r{constructor(e,t,n,o,i,a,l,c){this.httpService=e,this.tokenDecodeService=t,this.afAuth=n,this.ngxPermission=o,this.localDataService=i,this.router=a,this.intercomService=l,this.tokenService=c}login(e){return this.httpService.post("/api/token/Login",e).pipe(V(t=>{this.setLocalStorage(t,e.Host,e.Username),this.loadPermissions()}))}getNews(){return this.httpService.get(et.news).pipe(D(e=>e?.items?.map(t=>t?.properties)))}loginWithGoogle(e,t){e.preventDefault();let n=new Ae;return n.setCustomParameters({prompt:"select_account"}),R(this.afAuth.signInWithPopup(n)).pipe(D(o=>o.credential),D(o=>o.idToken),x(o=>this.httpService.post("/api/token/LoginWithSocialProvider",JSON.stringify({IDToken:o,Host:t}))),V(o=>{this.setLocalStorage(o,t,null),this.loadPermissions()}))}setLocalStorage(e,t,n){this.tokenService.updateTokenInLocalStorage(e),localStorage.setItem(T.AUTHORIZATION,JSON.stringify({Host:t,username:n})),this.intercomService.updateLocalStorage(e.IntercomWidget),this.intercomService.inititalizeIntercom()}loadPermissions(){this.ngxPermission.loadPermissions([]);let e=localStorage.getItem(T.USER);if(ee.IsNotEmpty(e)){let t=this.tokenDecodeService.GetRoles();this.ngxPermission.loadPermissions(t)}}getChannels(){return this.tokenService.getChannels()}logout(){this.clearLocalStorage(),this.ngxPermission.flushPermissions()}isActiveToken(){let e=this.tokenService.getUser(),t=new Date;if(e!=null){let n=new Date(e.Token.expiredAt);return t<n?!0:(this.clearLocalStorage(),!1)}else return!1}getDomain(){if(!this.domain){let e=localStorage.getItem(T.AUTHORIZATION);this.domain="https://"+JSON.parse(e).Host}return this.domain}clearLocalStorage(){this.domain=null,this.tokenService.clearStorage(),this.intercomService.shutdown(),this.localDataService.clearDatabase(),this.router.navigate([""])}static{this.\u0275fac=function(t){return new(t||r)(h(te),h(Je),h(De),h(Xe),h(St),h(We),h(vt),h(At))}}static{this.\u0275prov=k({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();export{et as a,Go as b,ui as c,vi as d,St as e,vt as f,At as g,$i as h};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{h as u}from"./chunk-PSPROJXC.js";import{a as p}from"./chunk-SWQXSJ7O.js";import{b as l}from"./chunk-JXSBFTQM.js";import{G as c}from"./chunk-M2FCTYGU.js";import{ja as a,oa as t}from"./chunk-B7KTCPKC.js";var S=(()=>{class e{constructor(o,i,r,s){this.toastr=o,this.authService=i,this.router=r,this.permissionService=s}canActivate(o,i){let r=JSON.parse(window.localStorage.getItem("user")),s=new Date,n=!1;if(r!=null){let h=new Date(r?.Token?.expiredAt);s<h?n=!0:(this.authService.logout(),this.onTokenExpired())}else this.router.navigate([""]),this.onTokenExpired();return n}onTokenExpired(){this.toastr.error("Your session has expired. Please login again.","Session Expired")}static{this.\u0275fac=function(i){return new(i||e)(t(l),t(u),t(c),t(p))}}static{this.\u0275prov=a({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();export{S as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as ae,e as re}from"./chunk-4M63ID5T.js";import{b as ie,c as le}from"./chunk-PW42BQIY.js";import{b as M,c as W,i as me,j as _,k as S}from"./chunk-6X2OBNJQ.js";import{c as T,e as K,h as R,i as Z,j as x,l as N,m as k,n as $,p as ee,r as te,v as ne,x as oe}from"./chunk-CSSG7NAJ.js";import{d as F,f as Q,g as X}from"./chunk-MTUIRWOB.js";import{Fc as A,Gb as y,Gc as r,Hc as P,Ic as Y,Kc as b,Lc as w,Mb as f,Mc as D,Sc as U,Tc as J,Yb as p,dc as h,ic as i,jc as l,kc as V,oc as I,pb as z,rb as a,tc as v,uc as L,xb as C,ya as c,za as g}from"./chunk-JS55A2RS.js";function pe(t,u){if(t&1&&(i(0,"tr")(1,"td")(2,"a",11),V(3,"img",12),i(4,"span"),r(5),l()()(),i(6,"td"),r(7),l(),i(8,"td"),r(9),l()()),t&2){let n=u.$implicit;a(2),p("href","/menu/channel/marketplace/view?ID="+n.Key.ID,z),a(),p("src",n.Logo,z),a(2),P(n.Key.Name),a(2),P(n.Value.Out),a(2),P(n.Value.Tg)}}var We=(()=>{class t{constructor(n,o){this.dialogRef=n,this.data=o,this.generateChannelName(),this.channels=this.setChannelLogo(o.channels)}ngOnInit(){this.modalConfig=new _,this.modalConfig.title="Channel - New Order Configuration is not Unique!",this.modalConfig.headerType=me.Warning,this.modalConfig.hideOk=!0,this.modalConfig.cancelText="Close",this.modalConfig.customWidth="500px",this.modalConfig.bodyScrollable=!0,this.modalConfig.hideClose=!0}setChannelLogo(n){return n.map(o=>(o.Logo=le.getChannelLogoByTypeId(o.Key.TypeID),o))}generateChannelName(){this.channelNames="";let n=this.data.channels;n.forEach((o,e)=>{this.channelNames+=`${o.Key} ${e!=n.length-1?" + ":""}`})}onClose(){this.dialogRef.close()}static{this.\u0275fac=function(o){return new(o||t)(C(M),C(W))}}static{this.\u0275cmp=y({type:t,selectors:[["app-modal-channel-warning"]],standalone:!1,decls:24,vars:2,consts:[[3,"onCancel","onClose","config"],["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&&(i(0,"modal-material",0),v("onCancel",function(){return e.onClose()})("onClose",function(){return e.onClose()}),i(1,"div",1)(2,"div",2)(3,"div",3)(4,"p",4),r(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. "),l(),i(6,"h5",5),r(7,"Your duplicate Channels are"),l(),i(8,"table",6)(9,"thead")(10,"tr",7)(11,"th"),r(12,"Channel"),l(),i(13,"th"),r(14,"Outlet"),l(),i(15,"th"),r(16,"Tag"),l()()(),i(17,"tbody"),f(18,pe,10,5,"tr",8),l()(),i(19,"p",9),r(20," Please refer to this "),i(21,"a",10),r(22,"article"),l(),r(23," for more information "),l()()()()()),o&2&&(p("config",e.modalConfig),a(18),p("ngForOf",e.channels))},dependencies:[Q,S],encapsulation:2})}}return t})();var Ke=(()=>{class t{constructor(n,o,e){this.dialogRef=n,this.httpService=o,this.toastr=e,this.modalConfig=new _,this.modalConfig.title="Write Off Reason"}onSubmit(){let n={Name:this.reason};this.subscription=this.httpService.post("/api/channel/AddWriteoffOption",n).subscribe(o=>{this.toastr.success(o.Message,"Success"),this.dialogRef.close(n)})}onClose(){this.dialogRef.close(!1)}ngOnDestroy(){this.subscription.unsubscribe()}static{this.\u0275fac=function(o){return new(o||t)(C(M),C(re),C(ae))}}static{this.\u0275cmp=y({type:t,selectors:[["app-dialog-writeOff-reason"]],standalone:!1,decls:7,vars:3,consts:[["name","ngModel"],[3,"onClose","onCancel","onOk","dynamicValidated","config"],["content",""],[1,"form-label-group"],["type","text","id","writeOffReason","placeholder","Write Off Reason","name","writeOffReason",1,"form-control",3,"ngModelChange","ngModel"],["for","shopid"]],template:function(o,e){if(o&1){let m=I();i(0,"modal-material",1),v("onClose",function(){return c(m),g(e.onClose())})("onCancel",function(){return c(m),g(e.onClose())})("onOk",function(){return c(m),g(e.onSubmit())}),i(1,"div",2)(2,"div",3)(3,"input",4,0),D("ngModelChange",function(s){return c(m),w(e.reason,s)||(e.reason=s),g(s)}),l(),i(5,"label",5),r(6,"Reason"),l()()()()}o&2&&(p("dynamicValidated",e.reason)("config",e.modalConfig),a(3),b("ngModel",e.reason))},dependencies:[T,R,k,S],styles:[".mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}"]})}}return t})();var ue=t=>({invalid:t});function fe(t,u){t&1&&(i(0,"small"),r(1," URL is required "),l())}function ce(t,u){if(t&1&&(i(0,"div",13),f(1,fe,2,0,"small",14),l()),t&2){L();let n=A(10);a(),p("ngIf",n.errors.required)}}function ge(t,u){t&1&&(i(0,"small"),r(1," Email is required "),l())}function Ce(t,u){t&1&&(i(0,"small"),r(1," Email is not valid "),l())}function he(t,u){if(t&1&&(i(0,"div",13),f(1,ge,2,0,"small",14)(2,Ce,2,0,"small",14),l()),t&2){L();let n=A(16);a(),p("ngIf",n.errors.required),a(),p("ngIf",n.errors.pattern)}}var Be=(()=>{class t{constructor(n){this.dialogRef=n}ngOnInit(){this.formData={URL:"",Email:""},this.initModalConfig()}initModalConfig(){this.modalConfig=new _,this.modalConfig.title="Fill data for Customer Support"}onSubmit(n){n!="Enter"&&this.dialogRef.close(this.formData)}onClose(){this.dialogRef.close()}static{this.\u0275fac=function(o){return new(o||t)(C(M))}}static{this.\u0275cmp=y({type:t,selectors:[["app-contact-support"]],standalone:!1,decls:18,vars:9,consts:[["url","ngModel"],["email","ngModel"],[3,"onClose","onCancel","onOk","dynamicValidated","config"],["content",""],[1,"mx-4"],["for","customerURL"],[1,"input-group","mb-2"],[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","title","customerURL",1,"form-control","border-start-0","customerUrl",3,"ngModelChange","ngModel"],["class","text-danger",4,"ngIf"],["for","customerEmail"],["required","","type","text","id","customerEmail","name","customerEmail","title","customerEmail","pattern","\\b[\\w\\.-]+@[\\w\\.-]+\\.\\w{2,4}\\b",1,"form-control",3,"ngModelChange","ngModel"],[1,"text-danger"],[4,"ngIf"]],template:function(o,e){if(o&1){let m=I();i(0,"modal-material",2),v("onClose",function(){return c(m),g(e.onClose())})("onCancel",function(){return c(m),g(e.onClose())})("onOk",function(s){return c(m),g(e.onSubmit(s))}),i(1,"div",3)(2,"div",4)(3,"label",5),r(4,"Tokopedia URL"),l(),i(5,"div",6)(6,"div",7)(7,"span",8),r(8,"https://tokopedia.com/"),l()(),i(9,"input",9,0),D("ngModelChange",function(s){return c(m),w(e.formData.URL,s)||(e.formData.URL=s),g(s)}),l()(),f(11,ce,2,1,"div",10),i(12,"label",11),r(13,"Requester's Email"),l(),i(14,"div",6)(15,"input",12,1),D("ngModelChange",function(s){return c(m),w(e.formData.Email,s)||(e.formData.Email=s),g(s)}),l()(),f(17,he,3,2,"div",10),l()()()}if(o&2){let m=A(10),d=A(16);p("dynamicValidated",!m.invalid&&!d.invalid)("config",e.modalConfig),a(7),p("ngClass",U(7,ue,m.invalid&&(m.dirty||m.touched))),a(2),b("ngModel",e.formData.URL),a(2),p("ngIf",m.invalid&&(m.dirty||m.touched)),a(4),b("ngModel",e.formData.Email),a(2),p("ngIf",d.invalid&&(d.dirty||d.touched))}},dependencies:[F,X,T,R,ne,oe,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}"]})}}return t})();var Je=(()=>{class t{constructor(n,o){this.dialogRef=n,this.data=o}ngOnInit(){this.initModalConfig()}initModalConfig(){this.modalConfig=new _,this.modalConfig.title=this.data?.title,this.modalConfig.okText="SAVE"}onSubmit(){this.dialogRef.close(this.shopID)}onClose(){this.dialogRef.close()}static{this.\u0275fac=function(o){return new(o||t)(C(M),C(W))}}static{this.\u0275cmp=y({type:t,selectors:[["app-modal-dialog-tokopedia"]],standalone:!1,decls:7,vars:3,consts:[["name","ngModel"],[3,"onClose","onCancel","onOk","dynamicValidated","config"],["content",""],[1,"form-label-group"],["type","text","id","shopid","placeholder","Shop ID","name","ShopID","data-toggle","tooltip","title","Channel Name",1,"form-control",3,"ngModelChange","ngModel"],["for","shopid"]],template:function(o,e){if(o&1){let m=I();i(0,"modal-material",1),v("onClose",function(){return c(m),g(e.onClose())})("onCancel",function(){return c(m),g(e.onClose())})("onOk",function(){return c(m),g(e.onSubmit())}),i(1,"div",2)(2,"div",3)(3,"input",4,0),D("ngModelChange",function(s){return c(m),w(e.shopID,s)||(e.shopID=s),g(s)}),l(),i(5,"label",5),r(6,"Shop ID"),l()()()()}o&2&&(p("dynamicValidated",e.shopID)("config",e.modalConfig),a(3),b("ngModel",e.shopID))},dependencies:[T,R,k,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}"]})}}return t})();var _e=t=>({"input-group":t}),ye=(t,u)=>({"is-invalid":t,"input-shopify rounded-start":u}),se=t=>({"is-invalid":t});function ve(t,u){t&1&&(i(0,"label",3),r(1,"Shopify URL"),l())}function Me(t,u){t&1&&(i(0,"label",3),r(1,"URL"),l())}function Se(t,u){t&1&&(i(0,"span",6),r(1,"myshopify.com"),l())}function Te(t,u){if(t&1&&(i(0,"div"),r(1),l()),t&2){let n=L(2);a(),Y("",n.data==null?null:n.data.title," url is required")}}function Re(t,u){if(t&1&&(i(0,"div",7),f(1,Te,2,1,"div"),l()),t&2){let n,o=L();a(),h(!(o.formGroup==null||(n=o.formGroup.get("URL"))==null)&&n.getError("required")?1:-1)}}function be(t,u){t&1&&r(0," API Key ")}function we(t,u){t&1&&r(0," Consumer Key ")}function De(t,u){t&1&&(r(0," ("),i(1,"a",11),r(2,"help center article"),l(),r(3,") "))}function Ee(t,u){t&1&&(i(0,"div",7),r(1,"API Key is required"),l())}function Oe(t,u){t&1&&r(0," Admin API Access Token ")}function Ge(t,u){t&1&&r(0," Consumer Secret ")}function Ve(t,u){t&1&&(i(0,"div",7),r(1,"Consumer Secret is required"),l())}var et=(()=>{class t{constructor(n,o){this.dialogRef=n,this.data=o,this.modalConfig=new _,this.urlCtrl=new N(null),this.channelType=ie}ngOnInit(){this.initModalConfig(),this.initFormGroup()}initFormGroup(){let n=[K.required];this.formGroup=new x({URL:new N(null,n),ConsumerKey:new N(null,[K.required]),ConsumerSecret:new N(null,[K.required])})}initModalConfig(){this.modalConfig=new _,this.modalConfig.title=this.data.title,this.modalConfig.okText="SAVE"}onClose(){this.dialogRef.close()}onSubmit(){this.formGroup.markAllAsTouched();let n=this.formGroup?.get("URL")?.getError("pattern"),o=this.formGroup?.get("ConsumerKey")?.valid,e=this.formGroup?.get("ConsumerSecret")?.valid;if(this.formGroup?.valid||n&&o&&e){let d=this.formGroup.value;d=this.trimShopifyUrl(d),this.dialogRef.close(d)}}trimShopifyUrl(n){if(this.data?.channelType==this.channelType.Shopify){let o=n.URL?.trim()||"";o=o.replace(/^https?:\/\//,""),o.includes(".myshopify.com")||(o=`${o}.myshopify.com`),n.URL=o}return n}static{this.\u0275fac=function(o){return new(o||t)(C(M),C(W))}}static{this.\u0275cmp=y({type:t,selectors:[["app-modal-register-channel"]],standalone:!1,decls:23,vars:27,consts:[[3,"onClose","onCancel","onOk","config"],["content",""],[3,"formGroup"],["for","shopid",1,"form-label","fw-bold","mb-2"],[1,"mb-8","has-validation",3,"ngClass"],["type","text","id","shopid","name","URL","title","URL","formControlName","URL",1,"form-control","form-input","rounded",3,"placeholder","ngClass"],["id","basic-addon2",1,"input-group-text","rounded-end","form-input","text-secondary"],[1,"invalid-feedback"],[1,"mb-8","has-validation"],["type","text","id","ConsumerKey","name","ConsumerKey","title","ConsumerKey","formControlName","ConsumerKey",1,"form-control","rounded","form-input",3,"placeholder","ngClass"],["type","text","id","ConsumerSecret","name","ConsumerSecret","title","ConsumerSecret","formControlName","ConsumerSecret",1,"form-control","rounded","form-input",3,"placeholder","ngClass"],["target","_blank","href","https://support.dealpos.com/en/articles/9525716-shopify-authorization-at-dealpos-apps",1,"button","text-primary","fw-bold"]],template:function(o,e){if(o&1&&(i(0,"modal-material",0),v("onClose",function(){return e.onClose()})("onCancel",function(){return e.onClose()})("onOk",function(){return e.onSubmit()}),i(1,"div",1)(2,"form",2),f(3,ve,2,0,"label",3),i(4,"div",4),f(5,Me,2,0,"label",3),V(6,"input",5),f(7,Se,2,0,"span",6)(8,Re,2,1,"div",7),l(),i(9,"div",8)(10,"label",3)(11,"span"),f(12,be,1,0)(13,we,1,0),l(),f(14,De,4,0),l(),V(15,"input",9),f(16,Ee,2,0,"div",7),l(),i(17,"div",8)(18,"label",3),f(19,Oe,1,0)(20,Ge,1,0),l(),V(21,"input",10),f(22,Ve,2,0,"div",7),l()()()()),o&2){let m,d,s,E,O,G;p("config",e.modalConfig),a(2),p("formGroup",e.formGroup),a(),h((e.data==null?null:e.data.channelType)==e.channelType.Shopify?3:-1),a(),p("ngClass",U(18,_e,(e.data==null?null:e.data.channelType)==e.channelType.Shopify)),a(),h((e.data==null?null:e.data.channelType)!=e.channelType.Shopify?5:-1),a(),p("placeholder",(e.data==null?null:e.data.channelType)==e.channelType.Shopify?"[ex: brand.myshopify.com]":"https://mydomain.com/")("ngClass",J(20,ye,(e.formGroup==null||(m=e.formGroup.get("URL"))==null?null:m.invalid)&&((e.formGroup==null||(m=e.formGroup.get("URL"))==null?null:m.dirty)||(e.formGroup==null||(m=e.formGroup.get("URL"))==null?null:m.touched)),(e.data==null?null:e.data.channelType)==e.channelType.Shopify)),a(),h((e.data==null?null:e.data.channelType)==e.channelType.Shopify?7:-1),a(),h(!(e.formGroup==null||(d=e.formGroup.get("URL"))==null)&&d.invalid&&(!(e.formGroup==null||(d=e.formGroup.get("URL"))==null)&&d.dirty||!(e.formGroup==null||(d=e.formGroup.get("URL"))==null)&&d.touched)?8:-1),a(4),h((e.data==null?null:e.data.channelType)==e.channelType.Shopify?12:13),a(2),h((e.data==null?null:e.data.channelType)==e.channelType.Shopify?14:-1),a(),p("placeholder",(e.data==null?null:e.data.channelType)==e.channelType.Shopify?"[Create an app and copy the API Key]":"[Create an app and copy the Consumer Key]")("ngClass",U(23,se,(e.formGroup==null||(s=e.formGroup.get("ConsumerKey"))==null?null:s.invalid)&&((e.formGroup==null||(s=e.formGroup.get("ConsumerKey"))==null?null:s.dirty)||(e.formGroup==null||(s=e.formGroup.get("ConsumerKey"))==null?null:s.touched)))),a(),h(!(e.formGroup==null||(E=e.formGroup.get("ConsumerKey"))==null)&&E.getError("required")&&(!(e.formGroup==null||(E=e.formGroup.get("ConsumerKey"))==null)&&E.dirty||!(e.formGroup==null||(E=e.formGroup.get("ConsumerKey"))==null)&&E.touched)?16:-1),a(3),h((e.data==null?null:e.data.channelType)==e.channelType.Shopify?19:20),a(2),p("placeholder",(e.data==null?null:e.data.channelType)==e.channelType.Shopify?"[shpat***************************]":"cs_***************")("ngClass",U(25,se,(e.formGroup==null||(O=e.formGroup.get("ConsumerSecret"))==null?null:O.invalid)&&((e.formGroup==null||(O=e.formGroup.get("ConsumerSecret"))==null?null:O.dirty)||(e.formGroup==null||(O=e.formGroup.get("ConsumerSecret"))==null?null:O.touched)))),a(),h(!(e.formGroup==null||(G=e.formGroup.get("ConsumerSecret"))==null)&&G.getError("required")&&(!(e.formGroup==null||(G=e.formGroup.get("ConsumerSecret"))==null)&&G.dirty||!(e.formGroup==null||(G=e.formGroup.get("ConsumerSecret"))==null)&&G.touched)?22:-1)}},dependencies:[F,$,T,R,Z,S,ee,te],styles:[".input-shopify[_ngcontent-%COMP%]{border-top-right-radius:0!important;border-bottom-right-radius:0!important}.form-input[_ngcontent-%COMP%]{min-height:3.625rem}"]})}}return t})();export{We as a,Ke as b,Be as c,Je as d,et as e};
|
|
1
|
+
import{b as ie,c as le}from"./chunk-PW42BQIY.js";import{b as ae,e as re}from"./chunk-JXSBFTQM.js";import{b as M,c as W,i as me,j as _,k as S}from"./chunk-CLER2MX6.js";import{c as T,e as K,h as R,i as Z,j as x,l as N,m as k,n as $,q as ee,s as te,w as ne,y as oe}from"./chunk-6QYD6NIJ.js";import{d as F,f as Q,g as X}from"./chunk-M2FCTYGU.js";import{Fc as A,Gb as y,Gc as r,Hc as P,Ic as Y,Kc as b,Lc as w,Mb as f,Mc as D,Sc as U,Tc as J,Yb as p,dc as h,ic as i,jc as l,kc as V,oc as I,pb as z,rb as a,tc as v,uc as L,xb as C,ya as c,za as g}from"./chunk-B7KTCPKC.js";function pe(t,u){if(t&1&&(i(0,"tr")(1,"td")(2,"a",11),V(3,"img",12),i(4,"span"),r(5),l()()(),i(6,"td"),r(7),l(),i(8,"td"),r(9),l()()),t&2){let n=u.$implicit;a(2),p("href","/menu/channel/marketplace/view?ID="+n.Key.ID,z),a(),p("src",n.Logo,z),a(2),P(n.Key.Name),a(2),P(n.Value.Out),a(2),P(n.Value.Tg)}}var We=(()=>{class t{constructor(n,o){this.dialogRef=n,this.data=o,this.generateChannelName(),this.channels=this.setChannelLogo(o.channels)}ngOnInit(){this.modalConfig=new _,this.modalConfig.title="Channel - New Order Configuration is not Unique!",this.modalConfig.headerType=me.Warning,this.modalConfig.hideOk=!0,this.modalConfig.cancelText="Close",this.modalConfig.customWidth="500px",this.modalConfig.bodyScrollable=!0,this.modalConfig.hideClose=!0}setChannelLogo(n){return n.map(o=>(o.Logo=le.getChannelLogoByTypeId(o.Key.TypeID),o))}generateChannelName(){this.channelNames="";let n=this.data.channels;n.forEach((o,e)=>{this.channelNames+=`${o.Key} ${e!=n.length-1?" + ":""}`})}onClose(){this.dialogRef.close()}static{this.\u0275fac=function(o){return new(o||t)(C(M),C(W))}}static{this.\u0275cmp=y({type:t,selectors:[["app-modal-channel-warning"]],standalone:!1,decls:24,vars:2,consts:[[3,"onCancel","onClose","config"],["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&&(i(0,"modal-material",0),v("onCancel",function(){return e.onClose()})("onClose",function(){return e.onClose()}),i(1,"div",1)(2,"div",2)(3,"div",3)(4,"p",4),r(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. "),l(),i(6,"h5",5),r(7,"Your duplicate Channels are"),l(),i(8,"table",6)(9,"thead")(10,"tr",7)(11,"th"),r(12,"Channel"),l(),i(13,"th"),r(14,"Outlet"),l(),i(15,"th"),r(16,"Tag"),l()()(),i(17,"tbody"),f(18,pe,10,5,"tr",8),l()(),i(19,"p",9),r(20," Please refer to this "),i(21,"a",10),r(22,"article"),l(),r(23," for more information "),l()()()()()),o&2&&(p("config",e.modalConfig),a(18),p("ngForOf",e.channels))},dependencies:[Q,S],encapsulation:2})}}return t})();var Ke=(()=>{class t{constructor(n,o,e){this.dialogRef=n,this.httpService=o,this.toastr=e,this.modalConfig=new _,this.modalConfig.title="Write Off Reason"}onSubmit(){let n={Name:this.reason};this.subscription=this.httpService.post("/api/channel/AddWriteoffOption",n).subscribe(o=>{this.toastr.success(o.Message,"Success"),this.dialogRef.close(n)})}onClose(){this.dialogRef.close(!1)}ngOnDestroy(){this.subscription.unsubscribe()}static{this.\u0275fac=function(o){return new(o||t)(C(M),C(re),C(ae))}}static{this.\u0275cmp=y({type:t,selectors:[["app-dialog-writeOff-reason"]],standalone:!1,decls:7,vars:3,consts:[["name","ngModel"],[3,"onClose","onCancel","onOk","dynamicValidated","config"],["content",""],[1,"form-label-group"],["type","text","id","writeOffReason","placeholder","Write Off Reason","name","writeOffReason",1,"form-control",3,"ngModelChange","ngModel"],["for","shopid"]],template:function(o,e){if(o&1){let m=I();i(0,"modal-material",1),v("onClose",function(){return c(m),g(e.onClose())})("onCancel",function(){return c(m),g(e.onClose())})("onOk",function(){return c(m),g(e.onSubmit())}),i(1,"div",2)(2,"div",3)(3,"input",4,0),D("ngModelChange",function(s){return c(m),w(e.reason,s)||(e.reason=s),g(s)}),l(),i(5,"label",5),r(6,"Reason"),l()()()()}o&2&&(p("dynamicValidated",e.reason)("config",e.modalConfig),a(3),b("ngModel",e.reason))},dependencies:[T,R,k,S],styles:[".mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}"]})}}return t})();var ue=t=>({invalid:t});function fe(t,u){t&1&&(i(0,"small"),r(1," URL is required "),l())}function ce(t,u){if(t&1&&(i(0,"div",13),f(1,fe,2,0,"small",14),l()),t&2){L();let n=A(10);a(),p("ngIf",n.errors.required)}}function ge(t,u){t&1&&(i(0,"small"),r(1," Email is required "),l())}function Ce(t,u){t&1&&(i(0,"small"),r(1," Email is not valid "),l())}function he(t,u){if(t&1&&(i(0,"div",13),f(1,ge,2,0,"small",14)(2,Ce,2,0,"small",14),l()),t&2){L();let n=A(16);a(),p("ngIf",n.errors.required),a(),p("ngIf",n.errors.pattern)}}var Be=(()=>{class t{constructor(n){this.dialogRef=n}ngOnInit(){this.formData={URL:"",Email:""},this.initModalConfig()}initModalConfig(){this.modalConfig=new _,this.modalConfig.title="Fill data for Customer Support"}onSubmit(n){n!="Enter"&&this.dialogRef.close(this.formData)}onClose(){this.dialogRef.close()}static{this.\u0275fac=function(o){return new(o||t)(C(M))}}static{this.\u0275cmp=y({type:t,selectors:[["app-contact-support"]],standalone:!1,decls:18,vars:9,consts:[["url","ngModel"],["email","ngModel"],[3,"onClose","onCancel","onOk","dynamicValidated","config"],["content",""],[1,"mx-4"],["for","customerURL"],[1,"input-group","mb-2"],[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","title","customerURL",1,"form-control","border-start-0","customerUrl",3,"ngModelChange","ngModel"],["class","text-danger",4,"ngIf"],["for","customerEmail"],["required","","type","text","id","customerEmail","name","customerEmail","title","customerEmail","pattern","\\b[\\w\\.-]+@[\\w\\.-]+\\.\\w{2,4}\\b",1,"form-control",3,"ngModelChange","ngModel"],[1,"text-danger"],[4,"ngIf"]],template:function(o,e){if(o&1){let m=I();i(0,"modal-material",2),v("onClose",function(){return c(m),g(e.onClose())})("onCancel",function(){return c(m),g(e.onClose())})("onOk",function(s){return c(m),g(e.onSubmit(s))}),i(1,"div",3)(2,"div",4)(3,"label",5),r(4,"Tokopedia URL"),l(),i(5,"div",6)(6,"div",7)(7,"span",8),r(8,"https://tokopedia.com/"),l()(),i(9,"input",9,0),D("ngModelChange",function(s){return c(m),w(e.formData.URL,s)||(e.formData.URL=s),g(s)}),l()(),f(11,ce,2,1,"div",10),i(12,"label",11),r(13,"Requester's Email"),l(),i(14,"div",6)(15,"input",12,1),D("ngModelChange",function(s){return c(m),w(e.formData.Email,s)||(e.formData.Email=s),g(s)}),l()(),f(17,he,3,2,"div",10),l()()()}if(o&2){let m=A(10),d=A(16);p("dynamicValidated",!m.invalid&&!d.invalid)("config",e.modalConfig),a(7),p("ngClass",U(7,ue,m.invalid&&(m.dirty||m.touched))),a(2),b("ngModel",e.formData.URL),a(2),p("ngIf",m.invalid&&(m.dirty||m.touched)),a(4),b("ngModel",e.formData.Email),a(2),p("ngIf",d.invalid&&(d.dirty||d.touched))}},dependencies:[F,X,T,R,ne,oe,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}"]})}}return t})();var Je=(()=>{class t{constructor(n,o){this.dialogRef=n,this.data=o}ngOnInit(){this.initModalConfig()}initModalConfig(){this.modalConfig=new _,this.modalConfig.title=this.data?.title,this.modalConfig.okText="SAVE"}onSubmit(){this.dialogRef.close(this.shopID)}onClose(){this.dialogRef.close()}static{this.\u0275fac=function(o){return new(o||t)(C(M),C(W))}}static{this.\u0275cmp=y({type:t,selectors:[["app-modal-dialog-tokopedia"]],standalone:!1,decls:7,vars:3,consts:[["name","ngModel"],[3,"onClose","onCancel","onOk","dynamicValidated","config"],["content",""],[1,"form-label-group"],["type","text","id","shopid","placeholder","Shop ID","name","ShopID","data-toggle","tooltip","title","Channel Name",1,"form-control",3,"ngModelChange","ngModel"],["for","shopid"]],template:function(o,e){if(o&1){let m=I();i(0,"modal-material",1),v("onClose",function(){return c(m),g(e.onClose())})("onCancel",function(){return c(m),g(e.onClose())})("onOk",function(){return c(m),g(e.onSubmit())}),i(1,"div",2)(2,"div",3)(3,"input",4,0),D("ngModelChange",function(s){return c(m),w(e.shopID,s)||(e.shopID=s),g(s)}),l(),i(5,"label",5),r(6,"Shop ID"),l()()()()}o&2&&(p("dynamicValidated",e.shopID)("config",e.modalConfig),a(3),b("ngModel",e.shopID))},dependencies:[T,R,k,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}"]})}}return t})();var _e=t=>({"input-group":t}),ye=(t,u)=>({"is-invalid":t,"input-shopify rounded-start":u}),se=t=>({"is-invalid":t});function ve(t,u){t&1&&(i(0,"label",3),r(1,"Shopify URL"),l())}function Me(t,u){t&1&&(i(0,"label",3),r(1,"URL"),l())}function Se(t,u){t&1&&(i(0,"span",6),r(1,"myshopify.com"),l())}function Te(t,u){if(t&1&&(i(0,"div"),r(1),l()),t&2){let n=L(2);a(),Y("",n.data==null?null:n.data.title," url is required")}}function Re(t,u){if(t&1&&(i(0,"div",7),f(1,Te,2,1,"div"),l()),t&2){let n,o=L();a(),h(!(o.formGroup==null||(n=o.formGroup.get("URL"))==null)&&n.getError("required")?1:-1)}}function be(t,u){t&1&&r(0," API Key ")}function we(t,u){t&1&&r(0," Consumer Key ")}function De(t,u){t&1&&(r(0," ("),i(1,"a",11),r(2,"help center article"),l(),r(3,") "))}function Ee(t,u){t&1&&(i(0,"div",7),r(1,"API Key is required"),l())}function Oe(t,u){t&1&&r(0," Admin API Access Token ")}function Ge(t,u){t&1&&r(0," Consumer Secret ")}function Ve(t,u){t&1&&(i(0,"div",7),r(1,"Consumer Secret is required"),l())}var et=(()=>{class t{constructor(n,o){this.dialogRef=n,this.data=o,this.modalConfig=new _,this.urlCtrl=new N(null),this.channelType=ie}ngOnInit(){this.initModalConfig(),this.initFormGroup()}initFormGroup(){let n=[K.required];this.formGroup=new x({URL:new N(null,n),ConsumerKey:new N(null,[K.required]),ConsumerSecret:new N(null,[K.required])})}initModalConfig(){this.modalConfig=new _,this.modalConfig.title=this.data.title,this.modalConfig.okText="SAVE"}onClose(){this.dialogRef.close()}onSubmit(){this.formGroup.markAllAsTouched();let n=this.formGroup?.get("URL")?.getError("pattern"),o=this.formGroup?.get("ConsumerKey")?.valid,e=this.formGroup?.get("ConsumerSecret")?.valid;if(this.formGroup?.valid||n&&o&&e){let d=this.formGroup.value;d=this.trimShopifyUrl(d),this.dialogRef.close(d)}}trimShopifyUrl(n){if(this.data?.channelType==this.channelType.Shopify){let o=n.URL?.trim()||"";o=o.replace(/^https?:\/\//,""),o.includes(".myshopify.com")||(o=`${o}.myshopify.com`),n.URL=o}return n}static{this.\u0275fac=function(o){return new(o||t)(C(M),C(W))}}static{this.\u0275cmp=y({type:t,selectors:[["app-modal-register-channel"]],standalone:!1,decls:23,vars:27,consts:[[3,"onClose","onCancel","onOk","config"],["content",""],[3,"formGroup"],["for","shopid",1,"form-label","fw-bold","mb-2"],[1,"mb-8","has-validation",3,"ngClass"],["type","text","id","shopid","name","URL","title","URL","formControlName","URL",1,"form-control","form-input","rounded",3,"placeholder","ngClass"],["id","basic-addon2",1,"input-group-text","rounded-end","form-input","text-secondary"],[1,"invalid-feedback"],[1,"mb-8","has-validation"],["type","text","id","ConsumerKey","name","ConsumerKey","title","ConsumerKey","formControlName","ConsumerKey",1,"form-control","rounded","form-input",3,"placeholder","ngClass"],["type","text","id","ConsumerSecret","name","ConsumerSecret","title","ConsumerSecret","formControlName","ConsumerSecret",1,"form-control","rounded","form-input",3,"placeholder","ngClass"],["target","_blank","href","https://support.dealpos.com/en/articles/9525716-shopify-authorization-at-dealpos-apps",1,"button","text-primary","fw-bold"]],template:function(o,e){if(o&1&&(i(0,"modal-material",0),v("onClose",function(){return e.onClose()})("onCancel",function(){return e.onClose()})("onOk",function(){return e.onSubmit()}),i(1,"div",1)(2,"form",2),f(3,ve,2,0,"label",3),i(4,"div",4),f(5,Me,2,0,"label",3),V(6,"input",5),f(7,Se,2,0,"span",6)(8,Re,2,1,"div",7),l(),i(9,"div",8)(10,"label",3)(11,"span"),f(12,be,1,0)(13,we,1,0),l(),f(14,De,4,0),l(),V(15,"input",9),f(16,Ee,2,0,"div",7),l(),i(17,"div",8)(18,"label",3),f(19,Oe,1,0)(20,Ge,1,0),l(),V(21,"input",10),f(22,Ve,2,0,"div",7),l()()()()),o&2){let m,d,s,E,O,G;p("config",e.modalConfig),a(2),p("formGroup",e.formGroup),a(),h((e.data==null?null:e.data.channelType)==e.channelType.Shopify?3:-1),a(),p("ngClass",U(18,_e,(e.data==null?null:e.data.channelType)==e.channelType.Shopify)),a(),h((e.data==null?null:e.data.channelType)!=e.channelType.Shopify?5:-1),a(),p("placeholder",(e.data==null?null:e.data.channelType)==e.channelType.Shopify?"[ex: brand.myshopify.com]":"https://mydomain.com/")("ngClass",J(20,ye,(e.formGroup==null||(m=e.formGroup.get("URL"))==null?null:m.invalid)&&((e.formGroup==null||(m=e.formGroup.get("URL"))==null?null:m.dirty)||(e.formGroup==null||(m=e.formGroup.get("URL"))==null?null:m.touched)),(e.data==null?null:e.data.channelType)==e.channelType.Shopify)),a(),h((e.data==null?null:e.data.channelType)==e.channelType.Shopify?7:-1),a(),h(!(e.formGroup==null||(d=e.formGroup.get("URL"))==null)&&d.invalid&&(!(e.formGroup==null||(d=e.formGroup.get("URL"))==null)&&d.dirty||!(e.formGroup==null||(d=e.formGroup.get("URL"))==null)&&d.touched)?8:-1),a(4),h((e.data==null?null:e.data.channelType)==e.channelType.Shopify?12:13),a(2),h((e.data==null?null:e.data.channelType)==e.channelType.Shopify?14:-1),a(),p("placeholder",(e.data==null?null:e.data.channelType)==e.channelType.Shopify?"[Create an app and copy the API Key]":"[Create an app and copy the Consumer Key]")("ngClass",U(23,se,(e.formGroup==null||(s=e.formGroup.get("ConsumerKey"))==null?null:s.invalid)&&((e.formGroup==null||(s=e.formGroup.get("ConsumerKey"))==null?null:s.dirty)||(e.formGroup==null||(s=e.formGroup.get("ConsumerKey"))==null?null:s.touched)))),a(),h(!(e.formGroup==null||(E=e.formGroup.get("ConsumerKey"))==null)&&E.getError("required")&&(!(e.formGroup==null||(E=e.formGroup.get("ConsumerKey"))==null)&&E.dirty||!(e.formGroup==null||(E=e.formGroup.get("ConsumerKey"))==null)&&E.touched)?16:-1),a(3),h((e.data==null?null:e.data.channelType)==e.channelType.Shopify?19:20),a(2),p("placeholder",(e.data==null?null:e.data.channelType)==e.channelType.Shopify?"[shpat***************************]":"cs_***************")("ngClass",U(25,se,(e.formGroup==null||(O=e.formGroup.get("ConsumerSecret"))==null?null:O.invalid)&&((e.formGroup==null||(O=e.formGroup.get("ConsumerSecret"))==null?null:O.dirty)||(e.formGroup==null||(O=e.formGroup.get("ConsumerSecret"))==null?null:O.touched)))),a(),h(!(e.formGroup==null||(G=e.formGroup.get("ConsumerSecret"))==null)&&G.getError("required")&&(!(e.formGroup==null||(G=e.formGroup.get("ConsumerSecret"))==null)&&G.dirty||!(e.formGroup==null||(G=e.formGroup.get("ConsumerSecret"))==null)&&G.touched)?22:-1)}},dependencies:[F,$,T,R,Z,S,ee,te],styles:[".input-shopify[_ngcontent-%COMP%]{border-top-right-radius:0!important;border-bottom-right-radius:0!important}.form-input[_ngcontent-%COMP%]{min-height:3.625rem}"]})}}return t})();export{We as a,Ke as b,Be as c,Je as d,et as e};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as p}from"./chunk-
|
|
1
|
+
import{a as p}from"./chunk-SM3P57SO.js";import{Aa as a,Ca as o,Gb as r,Kb as s,Xb as l,ac as C,ic as c,jc as m,kc as d}from"./chunk-B7KTCPKC.js";var u=(()=>{class t extends p{static \u0275fac=(()=>{let i;return function(e){return(i||(i=o(t)))(e||t)}})();static \u0275cmp=r({type:t,selectors:[["CheckIcon"]],features:[s],decls:2,vars:5,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M4.86199 11.5948C4.78717 11.5923 4.71366 11.5745 4.64596 11.5426C4.57826 11.5107 4.51779 11.4652 4.46827 11.4091L0.753985 7.69483C0.683167 7.64891 0.623706 7.58751 0.580092 7.51525C0.536478 7.44299 0.509851 7.36177 0.502221 7.27771C0.49459 7.19366 0.506156 7.10897 0.536046 7.03004C0.565935 6.95111 0.613367 6.88 0.674759 6.82208C0.736151 6.76416 0.8099 6.72095 0.890436 6.69571C0.970973 6.67046 1.05619 6.66385 1.13966 6.67635C1.22313 6.68886 1.30266 6.72017 1.37226 6.76792C1.44186 6.81567 1.4997 6.8786 1.54141 6.95197L4.86199 10.2503L12.6397 2.49483C12.7444 2.42694 12.8689 2.39617 12.9932 2.40745C13.1174 2.41873 13.2343 2.47141 13.3251 2.55705C13.4159 2.64268 13.4753 2.75632 13.4938 2.87973C13.5123 3.00315 13.4888 3.1292 13.4271 3.23768L5.2557 11.4091C5.20618 11.4652 5.14571 11.5107 5.07801 11.5426C5.01031 11.5745 4.9368 11.5923 4.86199 11.5948Z","fill","currentColor"]],template:function(n,e){n&1&&(a(),c(0,"svg",0),d(1,"path",1),m()),n&2&&(C(e.getClassNames()),l("aria-label",e.ariaLabel)("aria-hidden",e.ariaHidden)("role",e.role))},encapsulation:2})}return t})();export{u as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as At}from"./chunk-SIYMMMKQ.js";import{a as Nt}from"./chunk-WHZ44BAL.js";import{b as Ft}from"./chunk-UPYS4A4M.js";import{a as Lt}from"./chunk-PO7JVKK3.js";import{b as Vt}from"./chunk-LHD7CYML.js";import{a as Gt}from"./chunk-MQXPOHBV.js";import{a as Dt}from"./chunk-2ZTDLZVZ.js";import{d as Ot}from"./chunk-SXLKJLAE.js";import{e as I}from"./chunk-4M63ID5T.js";import{a as Et}from"./chunk-HPYTL6TX.js";import{b as Ct,c as St,h as It,j as Rt,k as Bt}from"./chunk-6X2OBNJQ.js";import{a as ht,c as ft,h as vt,m as _t,z as yt}from"./chunk-CSSG7NAJ.js";import{c as kt}from"./chunk-UJYSVGLV.js";import{s as Tt}from"./chunk-HFKKITEW.js";import{E as wt,M as U,k as xt,m as Mt,v as j}from"./chunk-OZ77CAJD.js";import{j as pt,m as mt,n as bt}from"./chunk-MTUIRWOB.js";import{$c as C,Ac as it,Bc as F,Cc as L,Fa as Y,Fc as rt,Gb as y,Gc as u,Hb as tt,Hc as lt,Ib as et,Jc as st,Ka as _,Kc as dt,Lc as gt,Mb as k,Mc as ct,Pa as Z,Qc as ut,Ra as p,Xa as K,Xb as x,Yb as m,Z as W,_b as V,ad as S,dc as M,ea as Q,ia as X,ic as l,ja as $,jc as s,jd as P,ka as q,kc as b,ma as D,oa as J,oc as w,od as d,pa as r,rb as g,tc as c,uc as T,v as O,vc as ot,wc as at,xb as N,ya as f,za as v,zc as nt}from"./chunk-JS55A2RS.js";import{a as G,b as A}from"./chunk-66YHNWRR.js";var z=function(n){return n[n.CSV=0]="CSV",n[n.XLSX=1]="XLSX",n}(z||{}),jt=(()=>{class n{constructor(t){this.http=t}exportCSV(t,o){let e=A(G({},o),{Export:!0,FormatType:z.CSV});this.downloadFile(t,e)}exportCSVIds(t,o){this.downloadFile(t,o)}exportXlsx(t,o){let e=A(G({},o),{FormatType:z.XLSX});this.downloadFile(t,e)}downloadFile(t,o){this.http.postFile(`/api/${t}`,o).subscribe(e=>{let a=window.URL.createObjectURL(e.file),i=document.createElement("a");i.download=this.getFilenameFromContentDisposition(e.title),i.href=a,i.click(),URL.revokeObjectURL(a),i.remove()})}getFilenameFromContentDisposition(t){let e=/filename[^;=\n]*=((['"]).*?\2|[^;\n]*)/.exec(t);return e!=null&&e[1]?e[1].replace(/['"]/g,""):""}exportJSON(t,o,e){this.http.post(`/api/${t}`,e).subscribe(a=>{var i=JSON.stringify(a,null," ");this.downloadJSON(i,o+".json")})}downloadJSON(t,o){var e=new Blob([t],{type:"data:application/json;charset=utf-8"}),a=document.createElement("a");a.setAttribute("href",window.URL.createObjectURL(e)),a.setAttribute("download",o),document.body.appendChild(a),a.click(),document.body.removeChild(a)}static{this.\u0275fac=function(o){return new(o||n)(J(I))}}static{this.\u0275prov=$({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var Wt=["button"],Qt=["*"];function Xt(n,E){if(n&1&&(l(0,"div",2),b(1,"mat-pseudo-checkbox",6),s()),n&2){let t=T();g(),m("disabled",t.disabled)}}var Ut=new D("MAT_BUTTON_TOGGLE_DEFAULT_OPTIONS",{providedIn:"root",factory:$t});function $t(){return{hideSingleSelectionIndicator:!1,hideMultipleSelectionIndicator:!1,disabledInteractive:!1}}var zt=new D("MatButtonToggleGroup"),qt={provide:ht,useExisting:X(()=>H),multi:!0},R=class{source;value;constructor(E,t){this.source=E,this.value=t}},H=(()=>{class n{_changeDetector=r(P);_dir=r(wt,{optional:!0});_multiple=!1;_disabled=!1;_disabledInteractive=!1;_selectionModel;_rawValue;_controlValueAccessorChangeFn=()=>{};_onTouched=()=>{};_buttonToggles;appearance;get name(){return this._name}set name(t){this._name=t,this._markButtonsForCheck()}_name=r(j).getId("mat-button-toggle-group-");vertical;get value(){let t=this._selectionModel?this._selectionModel.selected:[];return this.multiple?t.map(o=>o.value):t[0]?t[0].value:void 0}set value(t){this._setSelectionByValue(t),this.valueChange.emit(this.value)}valueChange=new _;get selected(){let t=this._selectionModel?this._selectionModel.selected:[];return this.multiple?t:t[0]||null}get multiple(){return this._multiple}set multiple(t){this._multiple=t,this._markButtonsForCheck()}get disabled(){return this._disabled}set disabled(t){this._disabled=t,this._markButtonsForCheck()}get disabledInteractive(){return this._disabledInteractive}set disabledInteractive(t){this._disabledInteractive=t,this._markButtonsForCheck()}get dir(){return this._dir&&this._dir.value==="rtl"?"rtl":"ltr"}change=new _;get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(t){this._hideSingleSelectionIndicator=t,this._markButtonsForCheck()}_hideSingleSelectionIndicator;get hideMultipleSelectionIndicator(){return this._hideMultipleSelectionIndicator}set hideMultipleSelectionIndicator(t){this._hideMultipleSelectionIndicator=t,this._markButtonsForCheck()}_hideMultipleSelectionIndicator;constructor(){let t=r(Ut,{optional:!0});this.appearance=t&&t.appearance?t.appearance:"standard",this.hideSingleSelectionIndicator=t?.hideSingleSelectionIndicator??!1,this.hideMultipleSelectionIndicator=t?.hideMultipleSelectionIndicator??!1}ngOnInit(){this._selectionModel=new At(this.multiple,void 0,!1)}ngAfterContentInit(){this._selectionModel.select(...this._buttonToggles.filter(t=>t.checked)),this.multiple||this._initializeTabIndex()}writeValue(t){this.value=t,this._changeDetector.markForCheck()}registerOnChange(t){this._controlValueAccessorChangeFn=t}registerOnTouched(t){this._onTouched=t}setDisabledState(t){this.disabled=t}_keydown(t){if(this.multiple||this.disabled)return;let e=t.target.id,a=this._buttonToggles.toArray().findIndex(h=>h.buttonId===e),i=null;switch(t.keyCode){case 32:case 13:i=this._buttonToggles.get(a)||null;break;case 38:i=this._getNextButton(a,-1);break;case 37:i=this._getNextButton(a,this.dir==="ltr"?-1:1);break;case 40:i=this._getNextButton(a,1);break;case 39:i=this._getNextButton(a,this.dir==="ltr"?1:-1);break;default:return}i&&(t.preventDefault(),i._onButtonClick(),i.focus())}_emitChangeEvent(t){let o=new R(t,this.value);this._rawValue=o.value,this._controlValueAccessorChangeFn(o.value),this.change.emit(o)}_syncButtonToggle(t,o,e=!1,a=!1){!this.multiple&&this.selected&&!t.checked&&(this.selected.checked=!1),this._selectionModel?o?this._selectionModel.select(t):this._selectionModel.deselect(t):a=!0,a?Promise.resolve().then(()=>this._updateModelValue(t,e)):this._updateModelValue(t,e)}_isSelected(t){return this._selectionModel&&this._selectionModel.isSelected(t)}_isPrechecked(t){return typeof this._rawValue>"u"?!1:this.multiple&&Array.isArray(this._rawValue)?this._rawValue.some(o=>t.value!=null&&o===t.value):t.value===this._rawValue}_initializeTabIndex(){if(this._buttonToggles.forEach(t=>{t.tabIndex=-1}),this.selected)this.selected.tabIndex=0;else for(let t=0;t<this._buttonToggles.length;t++){let o=this._buttonToggles.get(t);if(!o.disabled){o.tabIndex=0;break}}this._markButtonsForCheck()}_getNextButton(t,o){let e=this._buttonToggles;for(let a=1;a<=e.length;a++){let i=(t+o*a+e.length)%e.length,h=e.get(i);if(h&&!h.disabled)return h}return null}_setSelectionByValue(t){if(this._rawValue=t,!this._buttonToggles)return;let o=this._buttonToggles.toArray();if(this.multiple&&t?(Array.isArray(t),this._clearSelection(),t.forEach(e=>this._selectValue(e,o))):(this._clearSelection(),this._selectValue(t,o)),!this.multiple&&o.every(e=>e.tabIndex===-1)){for(let e of o)if(!e.disabled){e.tabIndex=0;break}}}_clearSelection(){this._selectionModel.clear(),this._buttonToggles.forEach(t=>{t.checked=!1,this.multiple||(t.tabIndex=-1)})}_selectValue(t,o){for(let e of o)if(e.value===t){e.checked=!0,this._selectionModel.select(e),this.multiple||(e.tabIndex=0);break}}_updateModelValue(t,o){o&&this._emitChangeEvent(t),this.valueChange.emit(this.value)}_markButtonsForCheck(){this._buttonToggles?.forEach(t=>t._markForCheck())}static \u0275fac=function(o){return new(o||n)};static \u0275dir=et({type:n,selectors:[["mat-button-toggle-group"]],contentQueries:function(o,e,a){if(o&1&&nt(a,B,5),o&2){let i;F(i=L())&&(e._buttonToggles=i)}},hostAttrs:[1,"mat-button-toggle-group"],hostVars:6,hostBindings:function(o,e){o&1&&c("keydown",function(i){return e._keydown(i)}),o&2&&(x("role",e.multiple?"group":"radiogroup")("aria-disabled",e.disabled),V("mat-button-toggle-vertical",e.vertical)("mat-button-toggle-group-appearance-standard",e.appearance==="standard"))},inputs:{appearance:"appearance",name:"name",vertical:[2,"vertical","vertical",d],value:"value",multiple:[2,"multiple","multiple",d],disabled:[2,"disabled","disabled",d],disabledInteractive:[2,"disabledInteractive","disabledInteractive",d],hideSingleSelectionIndicator:[2,"hideSingleSelectionIndicator","hideSingleSelectionIndicator",d],hideMultipleSelectionIndicator:[2,"hideMultipleSelectionIndicator","hideMultipleSelectionIndicator",d]},outputs:{valueChange:"valueChange",change:"change"},exportAs:["matButtonToggleGroup"],features:[ut([qt,{provide:zt,useExisting:n}])]})}return n})(),B=(()=>{class n{_changeDetectorRef=r(P);_elementRef=r(Z);_focusMonitor=r(xt);_idGenerator=r(j);_animationMode=r(K,{optional:!0});_checked=!1;ariaLabel;ariaLabelledby=null;_buttonElement;buttonToggleGroup;get buttonId(){return`${this.id}-button`}id;name;value;get tabIndex(){return this._tabIndex}set tabIndex(t){t!==this._tabIndex&&(this._tabIndex=t,this._markForCheck())}_tabIndex;disableRipple;get appearance(){return this.buttonToggleGroup?this.buttonToggleGroup.appearance:this._appearance}set appearance(t){this._appearance=t}_appearance;get checked(){return this.buttonToggleGroup?this.buttonToggleGroup._isSelected(this):this._checked}set checked(t){t!==this._checked&&(this._checked=t,this.buttonToggleGroup&&this.buttonToggleGroup._syncButtonToggle(this,this._checked),this._changeDetectorRef.markForCheck())}get disabled(){return this._disabled||this.buttonToggleGroup&&this.buttonToggleGroup.disabled}set disabled(t){this._disabled=t}_disabled=!1;get disabledInteractive(){return this._disabledInteractive||this.buttonToggleGroup!==null&&this.buttonToggleGroup.disabledInteractive}set disabledInteractive(t){this._disabledInteractive=t}_disabledInteractive;change=new _;constructor(){r(Mt).load(Et);let t=r(zt,{optional:!0}),o=r(new Y("tabindex"),{optional:!0})||"",e=r(Ut,{optional:!0});this._tabIndex=parseInt(o)||0,this.buttonToggleGroup=t,this.appearance=e&&e.appearance?e.appearance:"standard",this.disabledInteractive=e?.disabledInteractive??!1}ngOnInit(){let t=this.buttonToggleGroup;this.id=this.id||this._idGenerator.getId("mat-button-toggle-"),t&&(t._isPrechecked(this)?this.checked=!0:t._isSelected(this)!==this._checked&&t._syncButtonToggle(this,this._checked))}ngAfterViewInit(){this._animationMode!=="NoopAnimations"&&this._elementRef.nativeElement.classList.add("mat-button-toggle-animations-enabled"),this._focusMonitor.monitor(this._elementRef,!0)}ngOnDestroy(){let t=this.buttonToggleGroup;this._focusMonitor.stopMonitoring(this._elementRef),t&&t._isSelected(this)&&t._syncButtonToggle(this,!1,!1,!0)}focus(t){this._buttonElement.nativeElement.focus(t)}_onButtonClick(){if(this.disabled)return;let t=this.isSingleSelector()?!0:!this._checked;if(t!==this._checked&&(this._checked=t,this.buttonToggleGroup&&(this.buttonToggleGroup._syncButtonToggle(this,this._checked,!0),this.buttonToggleGroup._onTouched())),this.isSingleSelector()){let o=this.buttonToggleGroup._buttonToggles.find(e=>e.tabIndex===0);o&&(o.tabIndex=-1),this.tabIndex=0}this.change.emit(new R(this,this.value))}_markForCheck(){this._changeDetectorRef.markForCheck()}_getButtonName(){return this.isSingleSelector()?this.buttonToggleGroup.name:this.name||null}isSingleSelector(){return this.buttonToggleGroup&&!this.buttonToggleGroup.multiple}static \u0275fac=function(o){return new(o||n)};static \u0275cmp=y({type:n,selectors:[["mat-button-toggle"]],viewQuery:function(o,e){if(o&1&&it(Wt,5),o&2){let a;F(a=L())&&(e._buttonElement=a.first)}},hostAttrs:["role","presentation",1,"mat-button-toggle"],hostVars:14,hostBindings:function(o,e){o&1&&c("focus",function(){return e.focus()}),o&2&&(x("aria-label",null)("aria-labelledby",null)("id",e.id)("name",null),V("mat-button-toggle-standalone",!e.buttonToggleGroup)("mat-button-toggle-checked",e.checked)("mat-button-toggle-disabled",e.disabled)("mat-button-toggle-disabled-interactive",e.disabledInteractive)("mat-button-toggle-appearance-standard",e.appearance==="standard"))},inputs:{ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],id:"id",name:"name",value:"value",tabIndex:"tabIndex",disableRipple:[2,"disableRipple","disableRipple",d],appearance:"appearance",checked:[2,"checked","checked",d],disabled:[2,"disabled","disabled",d],disabledInteractive:[2,"disabledInteractive","disabledInteractive",d]},outputs:{change:"change"},exportAs:["matButtonToggle"],ngContentSelectors:Qt,decls:7,vars:13,consts:[["button",""],["type","button",1,"mat-button-toggle-button","mat-focus-indicator",3,"click","id","disabled"],[1,"mat-button-toggle-checkbox-wrapper"],[1,"mat-button-toggle-label-content"],[1,"mat-button-toggle-focus-overlay"],["matRipple","",1,"mat-button-toggle-ripple",3,"matRippleTrigger","matRippleDisabled"],["state","checked","aria-hidden","true","appearance","minimal",3,"disabled"]],template:function(o,e){if(o&1){let a=w();ot(),l(0,"button",1,0),c("click",function(){return f(a),v(e._onButtonClick())}),k(2,Xt,2,1,"div",2),l(3,"span",3),at(4),s()(),b(5,"span",4)(6,"span",5)}if(o&2){let a=rt(1);m("id",e.buttonId)("disabled",e.disabled&&!e.disabledInteractive||null),x("role",e.isSingleSelector()?"radio":"button")("tabindex",e.disabled&&!e.disabledInteractive?-1:e.tabIndex)("aria-pressed",e.isSingleSelector()?null:e.checked)("aria-checked",e.isSingleSelector()?e.checked:null)("name",e._getButtonName())("aria-label",e.ariaLabel)("aria-labelledby",e.ariaLabelledby)("aria-disabled",e.disabled&&e.disabledInteractive?"true":null),g(2),M(e.buttonToggleGroup&&(!e.buttonToggleGroup.multiple&&!e.buttonToggleGroup.hideSingleSelectionIndicator||e.buttonToggleGroup.multiple&&!e.buttonToggleGroup.hideMultipleSelectionIndicator)?2:-1),g(4),m("matRippleTrigger",a)("matRippleDisabled",e.disableRipple||e.disabled)}},dependencies:[Ot,Nt],styles:[`.mat-button-toggle-standalone,.mat-button-toggle-group{position:relative;display:inline-flex;flex-direction:row;white-space:nowrap;overflow:hidden;-webkit-tap-highlight-color:rgba(0,0,0,0);transform:translateZ(0);border-radius:var(--mat-legacy-button-toggle-shape)}.mat-button-toggle-standalone:not([class*=mat-elevation-z]),.mat-button-toggle-group:not([class*=mat-elevation-z]){box-shadow:0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12)}@media(forced-colors: active){.mat-button-toggle-standalone,.mat-button-toggle-group{outline:solid 1px}}.mat-button-toggle-standalone.mat-button-toggle-appearance-standard,.mat-button-toggle-group-appearance-standard{border-radius:var(--mat-standard-button-toggle-shape, var(--mat-sys-corner-extra-large));border:solid 1px var(--mat-standard-button-toggle-divider-color, var(--mat-sys-outline))}.mat-button-toggle-standalone.mat-button-toggle-appearance-standard .mat-pseudo-checkbox,.mat-button-toggle-group-appearance-standard .mat-pseudo-checkbox{--mat-minimal-pseudo-checkbox-selected-checkmark-color: var(--mat-standard-button-toggle-selected-state-text-color, var(--mat-sys-on-secondary-container))}.mat-button-toggle-standalone.mat-button-toggle-appearance-standard:not([class*=mat-elevation-z]),.mat-button-toggle-group-appearance-standard:not([class*=mat-elevation-z]){box-shadow:none}@media(forced-colors: active){.mat-button-toggle-standalone.mat-button-toggle-appearance-standard,.mat-button-toggle-group-appearance-standard{outline:0}}.mat-button-toggle-vertical{flex-direction:column}.mat-button-toggle-vertical .mat-button-toggle-label-content{display:block}.mat-button-toggle{white-space:nowrap;position:relative;color:var(--mat-legacy-button-toggle-text-color);font-family:var(--mat-legacy-button-toggle-label-text-font);font-size:var(--mat-legacy-button-toggle-label-text-size);line-height:var(--mat-legacy-button-toggle-label-text-line-height);font-weight:var(--mat-legacy-button-toggle-label-text-weight);letter-spacing:var(--mat-legacy-button-toggle-label-text-tracking);--mat-minimal-pseudo-checkbox-selected-checkmark-color: var(--mat-legacy-button-toggle-selected-state-text-color)}.mat-button-toggle.cdk-keyboard-focused .mat-button-toggle-focus-overlay{opacity:var(--mat-legacy-button-toggle-focus-state-layer-opacity)}.mat-button-toggle .mat-icon svg{vertical-align:top}.mat-button-toggle-checkbox-wrapper{display:inline-block;justify-content:flex-start;align-items:center;width:0;height:18px;line-height:18px;overflow:hidden;box-sizing:border-box;position:absolute;top:50%;left:16px;transform:translate3d(0, -50%, 0)}[dir=rtl] .mat-button-toggle-checkbox-wrapper{left:auto;right:16px}.mat-button-toggle-appearance-standard .mat-button-toggle-checkbox-wrapper{left:12px}[dir=rtl] .mat-button-toggle-appearance-standard .mat-button-toggle-checkbox-wrapper{left:auto;right:12px}.mat-button-toggle-checked .mat-button-toggle-checkbox-wrapper{width:18px}.mat-button-toggle-animations-enabled .mat-button-toggle-checkbox-wrapper{transition:width 150ms 45ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-button-toggle-vertical .mat-button-toggle-checkbox-wrapper{transition:none}.mat-button-toggle-checked{color:var(--mat-legacy-button-toggle-selected-state-text-color);background-color:var(--mat-legacy-button-toggle-selected-state-background-color)}.mat-button-toggle-disabled{pointer-events:none;color:var(--mat-legacy-button-toggle-disabled-state-text-color);background-color:var(--mat-legacy-button-toggle-disabled-state-background-color);--mat-minimal-pseudo-checkbox-disabled-selected-checkmark-color: var(--mat-legacy-button-toggle-disabled-state-text-color)}.mat-button-toggle-disabled.mat-button-toggle-checked{background-color:var(--mat-legacy-button-toggle-disabled-selected-state-background-color)}.mat-button-toggle-disabled-interactive{pointer-events:auto}.mat-button-toggle-appearance-standard{color:var(--mat-standard-button-toggle-text-color, var(--mat-sys-on-surface));background-color:var(--mat-standard-button-toggle-background-color, transparent);font-family:var(--mat-standard-button-toggle-label-text-font, var(--mat-sys-label-large-font));font-size:var(--mat-standard-button-toggle-label-text-size, var(--mat-sys-label-large-size));line-height:var(--mat-standard-button-toggle-label-text-line-height, var(--mat-sys-label-large-line-height));font-weight:var(--mat-standard-button-toggle-label-text-weight, var(--mat-sys-label-large-weight));letter-spacing:var(--mat-standard-button-toggle-label-text-tracking, var(--mat-sys-label-large-tracking))}.mat-button-toggle-group-appearance-standard .mat-button-toggle-appearance-standard+.mat-button-toggle-appearance-standard{border-left:solid 1px var(--mat-standard-button-toggle-divider-color, var(--mat-sys-outline))}[dir=rtl] .mat-button-toggle-group-appearance-standard .mat-button-toggle-appearance-standard+.mat-button-toggle-appearance-standard{border-left:none;border-right:solid 1px var(--mat-standard-button-toggle-divider-color, var(--mat-sys-outline))}.mat-button-toggle-group-appearance-standard.mat-button-toggle-vertical .mat-button-toggle-appearance-standard+.mat-button-toggle-appearance-standard{border-left:none;border-right:none;border-top:solid 1px var(--mat-standard-button-toggle-divider-color, var(--mat-sys-outline))}.mat-button-toggle-appearance-standard.mat-button-toggle-checked{color:var(--mat-standard-button-toggle-selected-state-text-color, var(--mat-sys-on-secondary-container));background-color:var(--mat-standard-button-toggle-selected-state-background-color, var(--mat-sys-secondary-container))}.mat-button-toggle-appearance-standard.mat-button-toggle-disabled{color:var(--mat-standard-button-toggle-disabled-state-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));background-color:var(--mat-standard-button-toggle-disabled-state-background-color, transparent)}.mat-button-toggle-appearance-standard.mat-button-toggle-disabled .mat-pseudo-checkbox{--mat-minimal-pseudo-checkbox-disabled-selected-checkmark-color: var(--mat-standard-button-toggle-disabled-selected-state-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-button-toggle-appearance-standard.mat-button-toggle-disabled.mat-button-toggle-checked{color:var(--mat-standard-button-toggle-disabled-selected-state-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));background-color:var(--mat-standard-button-toggle-disabled-selected-state-background-color, color-mix(in srgb, var(--mat-sys-on-surface) 12%, transparent))}.mat-button-toggle-appearance-standard .mat-button-toggle-focus-overlay{background-color:var(--mat-standard-button-toggle-state-layer-color, var(--mat-sys-on-surface))}.mat-button-toggle-appearance-standard:hover .mat-button-toggle-focus-overlay{opacity:var(--mat-standard-button-toggle-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-button-toggle-appearance-standard.cdk-keyboard-focused .mat-button-toggle-focus-overlay{opacity:var(--mat-standard-button-toggle-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}@media(hover: none){.mat-button-toggle-appearance-standard:hover .mat-button-toggle-focus-overlay{display:none}}.mat-button-toggle-label-content{-webkit-user-select:none;user-select:none;display:inline-block;padding:0 16px;line-height:var(--mat-legacy-button-toggle-height);position:relative}.mat-button-toggle-appearance-standard .mat-button-toggle-label-content{padding:0 12px;line-height:var(--mat-standard-button-toggle-height, 40px)}.mat-button-toggle-label-content>*{vertical-align:middle}.mat-button-toggle-focus-overlay{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:inherit;pointer-events:none;opacity:0;background-color:var(--mat-legacy-button-toggle-state-layer-color)}@media(forced-colors: active){.mat-button-toggle-checked .mat-button-toggle-focus-overlay{border-bottom:solid 500px;opacity:.5;height:0}.mat-button-toggle-checked:hover .mat-button-toggle-focus-overlay{opacity:.6}.mat-button-toggle-checked.mat-button-toggle-appearance-standard .mat-button-toggle-focus-overlay{border-bottom:solid 500px}}.mat-button-toggle .mat-button-toggle-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-button-toggle-button{border:0;background:none;color:inherit;padding:0;margin:0;font:inherit;outline:none;width:100%;cursor:pointer}.mat-button-toggle-animations-enabled .mat-button-toggle-button{transition:padding 150ms 45ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-button-toggle-vertical .mat-button-toggle-button{transition:none}.mat-button-toggle-disabled .mat-button-toggle-button{cursor:default}.mat-button-toggle-button::-moz-focus-inner{border:0}.mat-button-toggle-checked .mat-button-toggle-button:has(.mat-button-toggle-checkbox-wrapper){padding-left:30px}[dir=rtl] .mat-button-toggle-checked .mat-button-toggle-button:has(.mat-button-toggle-checkbox-wrapper){padding-left:0;padding-right:30px}.mat-button-toggle-standalone.mat-button-toggle-appearance-standard{--mat-focus-indicator-border-radius:var(--mat-standard-button-toggle-shape, var(--mat-sys-corner-extra-large))}.mat-button-toggle-group-appearance-standard:not(.mat-button-toggle-vertical) .mat-button-toggle:last-of-type .mat-button-toggle-button::before{border-top-right-radius:var(--mat-standard-button-toggle-shape, var(--mat-sys-corner-extra-large));border-bottom-right-radius:var(--mat-standard-button-toggle-shape, var(--mat-sys-corner-extra-large))}.mat-button-toggle-group-appearance-standard:not(.mat-button-toggle-vertical) .mat-button-toggle:first-of-type .mat-button-toggle-button::before{border-top-left-radius:var(--mat-standard-button-toggle-shape, var(--mat-sys-corner-extra-large));border-bottom-left-radius:var(--mat-standard-button-toggle-shape, var(--mat-sys-corner-extra-large))}.mat-button-toggle-group-appearance-standard.mat-button-toggle-vertical .mat-button-toggle:last-of-type .mat-button-toggle-button::before{border-bottom-right-radius:var(--mat-standard-button-toggle-shape, var(--mat-sys-corner-extra-large));border-bottom-left-radius:var(--mat-standard-button-toggle-shape, var(--mat-sys-corner-extra-large))}.mat-button-toggle-group-appearance-standard.mat-button-toggle-vertical .mat-button-toggle:first-of-type .mat-button-toggle-button::before{border-top-right-radius:var(--mat-standard-button-toggle-shape, var(--mat-sys-corner-extra-large));border-top-left-radius:var(--mat-standard-button-toggle-shape, var(--mat-sys-corner-extra-large))}
|
|
1
|
+
import{b as At}from"./chunk-3LRWABHB.js";import{a as Nt}from"./chunk-74IXJYWO.js";import{a as Dt}from"./chunk-G47XGOST.js";import{a as Lt}from"./chunk-M5XGP4SG.js";import{b as Ft}from"./chunk-CIIO2CJ6.js";import{b as Vt}from"./chunk-H3J5OAIG.js";import{d as Ot}from"./chunk-3BT5DR3X.js";import{a as Gt}from"./chunk-J2KWRDVH.js";import{a as Et}from"./chunk-CMTBBXR5.js";import{c as kt}from"./chunk-SWQXSJ7O.js";import{e as I}from"./chunk-JXSBFTQM.js";import{b as Ct,c as St,h as It,j as Rt,k as Bt}from"./chunk-CLER2MX6.js";import{A as yt,a as ht,c as ft,h as vt,m as _t}from"./chunk-6QYD6NIJ.js";import{s as Tt}from"./chunk-YCH6HHU3.js";import{E as wt,M as U,k as xt,m as Mt,v as j}from"./chunk-B73M3AMU.js";import{j as pt,m as mt,n as bt}from"./chunk-M2FCTYGU.js";import{$c as C,Ac as it,Bc as F,Cc as L,Fa as Y,Fc as rt,Gb as y,Gc as u,Hb as tt,Hc as lt,Ib as et,Jc as st,Ka as _,Kc as dt,Lc as gt,Mb as k,Mc as ct,Pa as Z,Qc as ut,Ra as p,Xa as K,Xb as x,Yb as m,Z as W,_b as V,ad as S,dc as M,ea as Q,ia as X,ic as l,ja as $,jc as s,jd as P,ka as q,kc as b,ma as D,oa as J,oc as w,od as d,pa as r,rb as g,tc as c,uc as T,v as O,vc as ot,wc as at,xb as N,ya as f,za as v,zc as nt}from"./chunk-B7KTCPKC.js";import{a as G,b as A}from"./chunk-66YHNWRR.js";var z=function(n){return n[n.CSV=0]="CSV",n[n.XLSX=1]="XLSX",n}(z||{}),jt=(()=>{class n{constructor(t){this.http=t}exportCSV(t,o){let e=A(G({},o),{Export:!0,FormatType:z.CSV});this.downloadFile(t,e)}exportCSVIds(t,o){this.downloadFile(t,o)}exportXlsx(t,o){let e=A(G({},o),{FormatType:z.XLSX});this.downloadFile(t,e)}downloadFile(t,o){this.http.postFile(`/api/${t}`,o).subscribe(e=>{let a=window.URL.createObjectURL(e.file),i=document.createElement("a");i.download=this.getFilenameFromContentDisposition(e.title),i.href=a,i.click(),URL.revokeObjectURL(a),i.remove()})}getFilenameFromContentDisposition(t){let e=/filename[^;=\n]*=((['"]).*?\2|[^;\n]*)/.exec(t);return e!=null&&e[1]?e[1].replace(/['"]/g,""):""}exportJSON(t,o,e){this.http.post(`/api/${t}`,e).subscribe(a=>{var i=JSON.stringify(a,null," ");this.downloadJSON(i,o+".json")})}downloadJSON(t,o){var e=new Blob([t],{type:"data:application/json;charset=utf-8"}),a=document.createElement("a");a.setAttribute("href",window.URL.createObjectURL(e)),a.setAttribute("download",o),document.body.appendChild(a),a.click(),document.body.removeChild(a)}static{this.\u0275fac=function(o){return new(o||n)(J(I))}}static{this.\u0275prov=$({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var Wt=["button"],Qt=["*"];function Xt(n,E){if(n&1&&(l(0,"div",2),b(1,"mat-pseudo-checkbox",6),s()),n&2){let t=T();g(),m("disabled",t.disabled)}}var Ut=new D("MAT_BUTTON_TOGGLE_DEFAULT_OPTIONS",{providedIn:"root",factory:$t});function $t(){return{hideSingleSelectionIndicator:!1,hideMultipleSelectionIndicator:!1,disabledInteractive:!1}}var zt=new D("MatButtonToggleGroup"),qt={provide:ht,useExisting:X(()=>H),multi:!0},R=class{source;value;constructor(E,t){this.source=E,this.value=t}},H=(()=>{class n{_changeDetector=r(P);_dir=r(wt,{optional:!0});_multiple=!1;_disabled=!1;_disabledInteractive=!1;_selectionModel;_rawValue;_controlValueAccessorChangeFn=()=>{};_onTouched=()=>{};_buttonToggles;appearance;get name(){return this._name}set name(t){this._name=t,this._markButtonsForCheck()}_name=r(j).getId("mat-button-toggle-group-");vertical;get value(){let t=this._selectionModel?this._selectionModel.selected:[];return this.multiple?t.map(o=>o.value):t[0]?t[0].value:void 0}set value(t){this._setSelectionByValue(t),this.valueChange.emit(this.value)}valueChange=new _;get selected(){let t=this._selectionModel?this._selectionModel.selected:[];return this.multiple?t:t[0]||null}get multiple(){return this._multiple}set multiple(t){this._multiple=t,this._markButtonsForCheck()}get disabled(){return this._disabled}set disabled(t){this._disabled=t,this._markButtonsForCheck()}get disabledInteractive(){return this._disabledInteractive}set disabledInteractive(t){this._disabledInteractive=t,this._markButtonsForCheck()}get dir(){return this._dir&&this._dir.value==="rtl"?"rtl":"ltr"}change=new _;get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(t){this._hideSingleSelectionIndicator=t,this._markButtonsForCheck()}_hideSingleSelectionIndicator;get hideMultipleSelectionIndicator(){return this._hideMultipleSelectionIndicator}set hideMultipleSelectionIndicator(t){this._hideMultipleSelectionIndicator=t,this._markButtonsForCheck()}_hideMultipleSelectionIndicator;constructor(){let t=r(Ut,{optional:!0});this.appearance=t&&t.appearance?t.appearance:"standard",this.hideSingleSelectionIndicator=t?.hideSingleSelectionIndicator??!1,this.hideMultipleSelectionIndicator=t?.hideMultipleSelectionIndicator??!1}ngOnInit(){this._selectionModel=new At(this.multiple,void 0,!1)}ngAfterContentInit(){this._selectionModel.select(...this._buttonToggles.filter(t=>t.checked)),this.multiple||this._initializeTabIndex()}writeValue(t){this.value=t,this._changeDetector.markForCheck()}registerOnChange(t){this._controlValueAccessorChangeFn=t}registerOnTouched(t){this._onTouched=t}setDisabledState(t){this.disabled=t}_keydown(t){if(this.multiple||this.disabled)return;let e=t.target.id,a=this._buttonToggles.toArray().findIndex(h=>h.buttonId===e),i=null;switch(t.keyCode){case 32:case 13:i=this._buttonToggles.get(a)||null;break;case 38:i=this._getNextButton(a,-1);break;case 37:i=this._getNextButton(a,this.dir==="ltr"?-1:1);break;case 40:i=this._getNextButton(a,1);break;case 39:i=this._getNextButton(a,this.dir==="ltr"?1:-1);break;default:return}i&&(t.preventDefault(),i._onButtonClick(),i.focus())}_emitChangeEvent(t){let o=new R(t,this.value);this._rawValue=o.value,this._controlValueAccessorChangeFn(o.value),this.change.emit(o)}_syncButtonToggle(t,o,e=!1,a=!1){!this.multiple&&this.selected&&!t.checked&&(this.selected.checked=!1),this._selectionModel?o?this._selectionModel.select(t):this._selectionModel.deselect(t):a=!0,a?Promise.resolve().then(()=>this._updateModelValue(t,e)):this._updateModelValue(t,e)}_isSelected(t){return this._selectionModel&&this._selectionModel.isSelected(t)}_isPrechecked(t){return typeof this._rawValue>"u"?!1:this.multiple&&Array.isArray(this._rawValue)?this._rawValue.some(o=>t.value!=null&&o===t.value):t.value===this._rawValue}_initializeTabIndex(){if(this._buttonToggles.forEach(t=>{t.tabIndex=-1}),this.selected)this.selected.tabIndex=0;else for(let t=0;t<this._buttonToggles.length;t++){let o=this._buttonToggles.get(t);if(!o.disabled){o.tabIndex=0;break}}this._markButtonsForCheck()}_getNextButton(t,o){let e=this._buttonToggles;for(let a=1;a<=e.length;a++){let i=(t+o*a+e.length)%e.length,h=e.get(i);if(h&&!h.disabled)return h}return null}_setSelectionByValue(t){if(this._rawValue=t,!this._buttonToggles)return;let o=this._buttonToggles.toArray();if(this.multiple&&t?(Array.isArray(t),this._clearSelection(),t.forEach(e=>this._selectValue(e,o))):(this._clearSelection(),this._selectValue(t,o)),!this.multiple&&o.every(e=>e.tabIndex===-1)){for(let e of o)if(!e.disabled){e.tabIndex=0;break}}}_clearSelection(){this._selectionModel.clear(),this._buttonToggles.forEach(t=>{t.checked=!1,this.multiple||(t.tabIndex=-1)})}_selectValue(t,o){for(let e of o)if(e.value===t){e.checked=!0,this._selectionModel.select(e),this.multiple||(e.tabIndex=0);break}}_updateModelValue(t,o){o&&this._emitChangeEvent(t),this.valueChange.emit(this.value)}_markButtonsForCheck(){this._buttonToggles?.forEach(t=>t._markForCheck())}static \u0275fac=function(o){return new(o||n)};static \u0275dir=et({type:n,selectors:[["mat-button-toggle-group"]],contentQueries:function(o,e,a){if(o&1&&nt(a,B,5),o&2){let i;F(i=L())&&(e._buttonToggles=i)}},hostAttrs:[1,"mat-button-toggle-group"],hostVars:6,hostBindings:function(o,e){o&1&&c("keydown",function(i){return e._keydown(i)}),o&2&&(x("role",e.multiple?"group":"radiogroup")("aria-disabled",e.disabled),V("mat-button-toggle-vertical",e.vertical)("mat-button-toggle-group-appearance-standard",e.appearance==="standard"))},inputs:{appearance:"appearance",name:"name",vertical:[2,"vertical","vertical",d],value:"value",multiple:[2,"multiple","multiple",d],disabled:[2,"disabled","disabled",d],disabledInteractive:[2,"disabledInteractive","disabledInteractive",d],hideSingleSelectionIndicator:[2,"hideSingleSelectionIndicator","hideSingleSelectionIndicator",d],hideMultipleSelectionIndicator:[2,"hideMultipleSelectionIndicator","hideMultipleSelectionIndicator",d]},outputs:{valueChange:"valueChange",change:"change"},exportAs:["matButtonToggleGroup"],features:[ut([qt,{provide:zt,useExisting:n}])]})}return n})(),B=(()=>{class n{_changeDetectorRef=r(P);_elementRef=r(Z);_focusMonitor=r(xt);_idGenerator=r(j);_animationMode=r(K,{optional:!0});_checked=!1;ariaLabel;ariaLabelledby=null;_buttonElement;buttonToggleGroup;get buttonId(){return`${this.id}-button`}id;name;value;get tabIndex(){return this._tabIndex}set tabIndex(t){t!==this._tabIndex&&(this._tabIndex=t,this._markForCheck())}_tabIndex;disableRipple;get appearance(){return this.buttonToggleGroup?this.buttonToggleGroup.appearance:this._appearance}set appearance(t){this._appearance=t}_appearance;get checked(){return this.buttonToggleGroup?this.buttonToggleGroup._isSelected(this):this._checked}set checked(t){t!==this._checked&&(this._checked=t,this.buttonToggleGroup&&this.buttonToggleGroup._syncButtonToggle(this,this._checked),this._changeDetectorRef.markForCheck())}get disabled(){return this._disabled||this.buttonToggleGroup&&this.buttonToggleGroup.disabled}set disabled(t){this._disabled=t}_disabled=!1;get disabledInteractive(){return this._disabledInteractive||this.buttonToggleGroup!==null&&this.buttonToggleGroup.disabledInteractive}set disabledInteractive(t){this._disabledInteractive=t}_disabledInteractive;change=new _;constructor(){r(Mt).load(Et);let t=r(zt,{optional:!0}),o=r(new Y("tabindex"),{optional:!0})||"",e=r(Ut,{optional:!0});this._tabIndex=parseInt(o)||0,this.buttonToggleGroup=t,this.appearance=e&&e.appearance?e.appearance:"standard",this.disabledInteractive=e?.disabledInteractive??!1}ngOnInit(){let t=this.buttonToggleGroup;this.id=this.id||this._idGenerator.getId("mat-button-toggle-"),t&&(t._isPrechecked(this)?this.checked=!0:t._isSelected(this)!==this._checked&&t._syncButtonToggle(this,this._checked))}ngAfterViewInit(){this._animationMode!=="NoopAnimations"&&this._elementRef.nativeElement.classList.add("mat-button-toggle-animations-enabled"),this._focusMonitor.monitor(this._elementRef,!0)}ngOnDestroy(){let t=this.buttonToggleGroup;this._focusMonitor.stopMonitoring(this._elementRef),t&&t._isSelected(this)&&t._syncButtonToggle(this,!1,!1,!0)}focus(t){this._buttonElement.nativeElement.focus(t)}_onButtonClick(){if(this.disabled)return;let t=this.isSingleSelector()?!0:!this._checked;if(t!==this._checked&&(this._checked=t,this.buttonToggleGroup&&(this.buttonToggleGroup._syncButtonToggle(this,this._checked,!0),this.buttonToggleGroup._onTouched())),this.isSingleSelector()){let o=this.buttonToggleGroup._buttonToggles.find(e=>e.tabIndex===0);o&&(o.tabIndex=-1),this.tabIndex=0}this.change.emit(new R(this,this.value))}_markForCheck(){this._changeDetectorRef.markForCheck()}_getButtonName(){return this.isSingleSelector()?this.buttonToggleGroup.name:this.name||null}isSingleSelector(){return this.buttonToggleGroup&&!this.buttonToggleGroup.multiple}static \u0275fac=function(o){return new(o||n)};static \u0275cmp=y({type:n,selectors:[["mat-button-toggle"]],viewQuery:function(o,e){if(o&1&&it(Wt,5),o&2){let a;F(a=L())&&(e._buttonElement=a.first)}},hostAttrs:["role","presentation",1,"mat-button-toggle"],hostVars:14,hostBindings:function(o,e){o&1&&c("focus",function(){return e.focus()}),o&2&&(x("aria-label",null)("aria-labelledby",null)("id",e.id)("name",null),V("mat-button-toggle-standalone",!e.buttonToggleGroup)("mat-button-toggle-checked",e.checked)("mat-button-toggle-disabled",e.disabled)("mat-button-toggle-disabled-interactive",e.disabledInteractive)("mat-button-toggle-appearance-standard",e.appearance==="standard"))},inputs:{ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],id:"id",name:"name",value:"value",tabIndex:"tabIndex",disableRipple:[2,"disableRipple","disableRipple",d],appearance:"appearance",checked:[2,"checked","checked",d],disabled:[2,"disabled","disabled",d],disabledInteractive:[2,"disabledInteractive","disabledInteractive",d]},outputs:{change:"change"},exportAs:["matButtonToggle"],ngContentSelectors:Qt,decls:7,vars:13,consts:[["button",""],["type","button",1,"mat-button-toggle-button","mat-focus-indicator",3,"click","id","disabled"],[1,"mat-button-toggle-checkbox-wrapper"],[1,"mat-button-toggle-label-content"],[1,"mat-button-toggle-focus-overlay"],["matRipple","",1,"mat-button-toggle-ripple",3,"matRippleTrigger","matRippleDisabled"],["state","checked","aria-hidden","true","appearance","minimal",3,"disabled"]],template:function(o,e){if(o&1){let a=w();ot(),l(0,"button",1,0),c("click",function(){return f(a),v(e._onButtonClick())}),k(2,Xt,2,1,"div",2),l(3,"span",3),at(4),s()(),b(5,"span",4)(6,"span",5)}if(o&2){let a=rt(1);m("id",e.buttonId)("disabled",e.disabled&&!e.disabledInteractive||null),x("role",e.isSingleSelector()?"radio":"button")("tabindex",e.disabled&&!e.disabledInteractive?-1:e.tabIndex)("aria-pressed",e.isSingleSelector()?null:e.checked)("aria-checked",e.isSingleSelector()?e.checked:null)("name",e._getButtonName())("aria-label",e.ariaLabel)("aria-labelledby",e.ariaLabelledby)("aria-disabled",e.disabled&&e.disabledInteractive?"true":null),g(2),M(e.buttonToggleGroup&&(!e.buttonToggleGroup.multiple&&!e.buttonToggleGroup.hideSingleSelectionIndicator||e.buttonToggleGroup.multiple&&!e.buttonToggleGroup.hideMultipleSelectionIndicator)?2:-1),g(4),m("matRippleTrigger",a)("matRippleDisabled",e.disableRipple||e.disabled)}},dependencies:[Ot,Nt],styles:[`.mat-button-toggle-standalone,.mat-button-toggle-group{position:relative;display:inline-flex;flex-direction:row;white-space:nowrap;overflow:hidden;-webkit-tap-highlight-color:rgba(0,0,0,0);transform:translateZ(0);border-radius:var(--mat-legacy-button-toggle-shape)}.mat-button-toggle-standalone:not([class*=mat-elevation-z]),.mat-button-toggle-group:not([class*=mat-elevation-z]){box-shadow:0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12)}@media(forced-colors: active){.mat-button-toggle-standalone,.mat-button-toggle-group{outline:solid 1px}}.mat-button-toggle-standalone.mat-button-toggle-appearance-standard,.mat-button-toggle-group-appearance-standard{border-radius:var(--mat-standard-button-toggle-shape, var(--mat-sys-corner-extra-large));border:solid 1px var(--mat-standard-button-toggle-divider-color, var(--mat-sys-outline))}.mat-button-toggle-standalone.mat-button-toggle-appearance-standard .mat-pseudo-checkbox,.mat-button-toggle-group-appearance-standard .mat-pseudo-checkbox{--mat-minimal-pseudo-checkbox-selected-checkmark-color: var(--mat-standard-button-toggle-selected-state-text-color, var(--mat-sys-on-secondary-container))}.mat-button-toggle-standalone.mat-button-toggle-appearance-standard:not([class*=mat-elevation-z]),.mat-button-toggle-group-appearance-standard:not([class*=mat-elevation-z]){box-shadow:none}@media(forced-colors: active){.mat-button-toggle-standalone.mat-button-toggle-appearance-standard,.mat-button-toggle-group-appearance-standard{outline:0}}.mat-button-toggle-vertical{flex-direction:column}.mat-button-toggle-vertical .mat-button-toggle-label-content{display:block}.mat-button-toggle{white-space:nowrap;position:relative;color:var(--mat-legacy-button-toggle-text-color);font-family:var(--mat-legacy-button-toggle-label-text-font);font-size:var(--mat-legacy-button-toggle-label-text-size);line-height:var(--mat-legacy-button-toggle-label-text-line-height);font-weight:var(--mat-legacy-button-toggle-label-text-weight);letter-spacing:var(--mat-legacy-button-toggle-label-text-tracking);--mat-minimal-pseudo-checkbox-selected-checkmark-color: var(--mat-legacy-button-toggle-selected-state-text-color)}.mat-button-toggle.cdk-keyboard-focused .mat-button-toggle-focus-overlay{opacity:var(--mat-legacy-button-toggle-focus-state-layer-opacity)}.mat-button-toggle .mat-icon svg{vertical-align:top}.mat-button-toggle-checkbox-wrapper{display:inline-block;justify-content:flex-start;align-items:center;width:0;height:18px;line-height:18px;overflow:hidden;box-sizing:border-box;position:absolute;top:50%;left:16px;transform:translate3d(0, -50%, 0)}[dir=rtl] .mat-button-toggle-checkbox-wrapper{left:auto;right:16px}.mat-button-toggle-appearance-standard .mat-button-toggle-checkbox-wrapper{left:12px}[dir=rtl] .mat-button-toggle-appearance-standard .mat-button-toggle-checkbox-wrapper{left:auto;right:12px}.mat-button-toggle-checked .mat-button-toggle-checkbox-wrapper{width:18px}.mat-button-toggle-animations-enabled .mat-button-toggle-checkbox-wrapper{transition:width 150ms 45ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-button-toggle-vertical .mat-button-toggle-checkbox-wrapper{transition:none}.mat-button-toggle-checked{color:var(--mat-legacy-button-toggle-selected-state-text-color);background-color:var(--mat-legacy-button-toggle-selected-state-background-color)}.mat-button-toggle-disabled{pointer-events:none;color:var(--mat-legacy-button-toggle-disabled-state-text-color);background-color:var(--mat-legacy-button-toggle-disabled-state-background-color);--mat-minimal-pseudo-checkbox-disabled-selected-checkmark-color: var(--mat-legacy-button-toggle-disabled-state-text-color)}.mat-button-toggle-disabled.mat-button-toggle-checked{background-color:var(--mat-legacy-button-toggle-disabled-selected-state-background-color)}.mat-button-toggle-disabled-interactive{pointer-events:auto}.mat-button-toggle-appearance-standard{color:var(--mat-standard-button-toggle-text-color, var(--mat-sys-on-surface));background-color:var(--mat-standard-button-toggle-background-color, transparent);font-family:var(--mat-standard-button-toggle-label-text-font, var(--mat-sys-label-large-font));font-size:var(--mat-standard-button-toggle-label-text-size, var(--mat-sys-label-large-size));line-height:var(--mat-standard-button-toggle-label-text-line-height, var(--mat-sys-label-large-line-height));font-weight:var(--mat-standard-button-toggle-label-text-weight, var(--mat-sys-label-large-weight));letter-spacing:var(--mat-standard-button-toggle-label-text-tracking, var(--mat-sys-label-large-tracking))}.mat-button-toggle-group-appearance-standard .mat-button-toggle-appearance-standard+.mat-button-toggle-appearance-standard{border-left:solid 1px var(--mat-standard-button-toggle-divider-color, var(--mat-sys-outline))}[dir=rtl] .mat-button-toggle-group-appearance-standard .mat-button-toggle-appearance-standard+.mat-button-toggle-appearance-standard{border-left:none;border-right:solid 1px var(--mat-standard-button-toggle-divider-color, var(--mat-sys-outline))}.mat-button-toggle-group-appearance-standard.mat-button-toggle-vertical .mat-button-toggle-appearance-standard+.mat-button-toggle-appearance-standard{border-left:none;border-right:none;border-top:solid 1px var(--mat-standard-button-toggle-divider-color, var(--mat-sys-outline))}.mat-button-toggle-appearance-standard.mat-button-toggle-checked{color:var(--mat-standard-button-toggle-selected-state-text-color, var(--mat-sys-on-secondary-container));background-color:var(--mat-standard-button-toggle-selected-state-background-color, var(--mat-sys-secondary-container))}.mat-button-toggle-appearance-standard.mat-button-toggle-disabled{color:var(--mat-standard-button-toggle-disabled-state-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));background-color:var(--mat-standard-button-toggle-disabled-state-background-color, transparent)}.mat-button-toggle-appearance-standard.mat-button-toggle-disabled .mat-pseudo-checkbox{--mat-minimal-pseudo-checkbox-disabled-selected-checkmark-color: var(--mat-standard-button-toggle-disabled-selected-state-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-button-toggle-appearance-standard.mat-button-toggle-disabled.mat-button-toggle-checked{color:var(--mat-standard-button-toggle-disabled-selected-state-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));background-color:var(--mat-standard-button-toggle-disabled-selected-state-background-color, color-mix(in srgb, var(--mat-sys-on-surface) 12%, transparent))}.mat-button-toggle-appearance-standard .mat-button-toggle-focus-overlay{background-color:var(--mat-standard-button-toggle-state-layer-color, var(--mat-sys-on-surface))}.mat-button-toggle-appearance-standard:hover .mat-button-toggle-focus-overlay{opacity:var(--mat-standard-button-toggle-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-button-toggle-appearance-standard.cdk-keyboard-focused .mat-button-toggle-focus-overlay{opacity:var(--mat-standard-button-toggle-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}@media(hover: none){.mat-button-toggle-appearance-standard:hover .mat-button-toggle-focus-overlay{display:none}}.mat-button-toggle-label-content{-webkit-user-select:none;user-select:none;display:inline-block;padding:0 16px;line-height:var(--mat-legacy-button-toggle-height);position:relative}.mat-button-toggle-appearance-standard .mat-button-toggle-label-content{padding:0 12px;line-height:var(--mat-standard-button-toggle-height, 40px)}.mat-button-toggle-label-content>*{vertical-align:middle}.mat-button-toggle-focus-overlay{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:inherit;pointer-events:none;opacity:0;background-color:var(--mat-legacy-button-toggle-state-layer-color)}@media(forced-colors: active){.mat-button-toggle-checked .mat-button-toggle-focus-overlay{border-bottom:solid 500px;opacity:.5;height:0}.mat-button-toggle-checked:hover .mat-button-toggle-focus-overlay{opacity:.6}.mat-button-toggle-checked.mat-button-toggle-appearance-standard .mat-button-toggle-focus-overlay{border-bottom:solid 500px}}.mat-button-toggle .mat-button-toggle-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-button-toggle-button{border:0;background:none;color:inherit;padding:0;margin:0;font:inherit;outline:none;width:100%;cursor:pointer}.mat-button-toggle-animations-enabled .mat-button-toggle-button{transition:padding 150ms 45ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-button-toggle-vertical .mat-button-toggle-button{transition:none}.mat-button-toggle-disabled .mat-button-toggle-button{cursor:default}.mat-button-toggle-button::-moz-focus-inner{border:0}.mat-button-toggle-checked .mat-button-toggle-button:has(.mat-button-toggle-checkbox-wrapper){padding-left:30px}[dir=rtl] .mat-button-toggle-checked .mat-button-toggle-button:has(.mat-button-toggle-checkbox-wrapper){padding-left:0;padding-right:30px}.mat-button-toggle-standalone.mat-button-toggle-appearance-standard{--mat-focus-indicator-border-radius:var(--mat-standard-button-toggle-shape, var(--mat-sys-corner-extra-large))}.mat-button-toggle-group-appearance-standard:not(.mat-button-toggle-vertical) .mat-button-toggle:last-of-type .mat-button-toggle-button::before{border-top-right-radius:var(--mat-standard-button-toggle-shape, var(--mat-sys-corner-extra-large));border-bottom-right-radius:var(--mat-standard-button-toggle-shape, var(--mat-sys-corner-extra-large))}.mat-button-toggle-group-appearance-standard:not(.mat-button-toggle-vertical) .mat-button-toggle:first-of-type .mat-button-toggle-button::before{border-top-left-radius:var(--mat-standard-button-toggle-shape, var(--mat-sys-corner-extra-large));border-bottom-left-radius:var(--mat-standard-button-toggle-shape, var(--mat-sys-corner-extra-large))}.mat-button-toggle-group-appearance-standard.mat-button-toggle-vertical .mat-button-toggle:last-of-type .mat-button-toggle-button::before{border-bottom-right-radius:var(--mat-standard-button-toggle-shape, var(--mat-sys-corner-extra-large));border-bottom-left-radius:var(--mat-standard-button-toggle-shape, var(--mat-sys-corner-extra-large))}.mat-button-toggle-group-appearance-standard.mat-button-toggle-vertical .mat-button-toggle:first-of-type .mat-button-toggle-button::before{border-top-right-radius:var(--mat-standard-button-toggle-shape, var(--mat-sys-corner-extra-large));border-top-left-radius:var(--mat-standard-button-toggle-shape, var(--mat-sys-corner-extra-large))}
|
|
2
2
|
`],encapsulation:2,changeDetection:0})}return n})(),Ht=(()=>{class n{static \u0275fac=function(o){return new(o||n)};static \u0275mod=tt({type:n});static \u0275inj=q({imports:[U,Dt,B,U]})}return n})();function Yt(n,E){if(n&1){let t=w();l(0,"i",18),c("click",function(){f(t);let e=T();return v(e.getTotalRowCount())}),s()}}var $e=(()=>{class n{constructor(t,o){this.dialogRef=t,this.item=o,this.exportService=r(jt),this.httpService=r(I),this.displayedMinRangeRow=p(1),this.displayedMaxRangeRow=p(1e4),this.pageNumber=p(1),this.rowCount=p(1e4),this.isShowTotalRowCount=p(!1),this.filter=p({}),this.filter.set(this.item.filterExport)}ngOnInit(){this.initModalConfig()}getTotalRowCount(){this.totalRowCount$=this.httpService.post(`/api/${this.item.getRowCountApi}`,this.item.filterExport).pipe(O(t=>t.Total!=null?t.Total:t.Count||0),Q(t=>{this.isShowTotalRowCount.set(!0),t<this.displayedMaxRangeRow()&&this.setMinMaxRangeDisplayedRow(t)}),O(t=>Math.floor(t/this.rowCount())+(t%this.rowCount()>0?1:0)),W(1))}initModalConfig(){this.modalConfig=new Rt,this.modalConfig.title=`${this.item?.title}`,this.modalConfig.customWidth="450px",this.modalConfig.hideCancel=!0}onSubmit(){this.filter.update(t=>(t.RowCount=this.rowCount(),t.PageNumber=this.pageNumber(),t)),this.exportService.exportCSV(this.item.exportApi,this.filter()),this.dialogRef.close()}onClose(){this.dialogRef.close()}onPageNumberChange(t){this.pageNumber.set(t),this.setDisplayedMinMaxRangeRow()}setMinMaxRangeDisplayedRow(t){for(;this.displayedMaxRangeRow()>t&&this.pageNumber()>1;)this.pageNumber.update(o=>(o-=1,o)),this.setDisplayedMinMaxRangeRow();this.displayedMaxRangeRow.set(t)}setDisplayedMinMaxRangeRow(){let t=this.pageNumber()*this.rowCount()-this.rowCount()+1;this.displayedMinRangeRow.set(t),this.displayedMaxRangeRow.set(this.pageNumber()*this.rowCount())}static{this.\u0275fac=function(o){return new(o||n)(N(Ct),N(St))}}static{this.\u0275cmp=y({type:n,selectors:[["app-modal-export"]],decls:30,vars:13,consts:[[3,"onClose","onCancel","onOk","config"],["content",""],[1,"container-fluid"],[1,"row"],[1,"col-3","fw-bold",2,"display","flex","align-items","center"],[1,"col-9"],["value","CSV",3,"checked"],[1,"fa-solid","fa-file-csv","me-3","mb-1"],[1,"row","mt-8"],[1,"col-3","d-flex","align-items-center","fw-bold"],[1,"col-auto","d-flex","align-items-center"],["type","text","autoNum","","name","pageNumber","id","pageNumber",1,"form-control","text-center",2,"width","50px",3,"ngModelChange","ngModel"],[1,"ms-3"],[1,"fa-solid","fa-circle-question","mx-3"],[1,"fw-bold"],[1,"col-12","mt-8"],[1,"p-5",2,"background-color","#add8e6","border-radius","4px"],[1,"fa-solid","fa-circle-exclamation","mx-3"],[1,"fa-solid","fa-circle-question","mx-3",3,"click"]],template:function(o,e){o&1&&(l(0,"modal-material",0),c("onClose",function(){return e.onClose()})("onCancel",function(){return e.onClose()})("onOk",function(){return e.onSubmit()}),l(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),u(5," Format "),s(),l(6,"div",5)(7,"mat-button-toggle-group")(8,"mat-button-toggle",6),b(9,"i",7),u(10,"CSV "),s()()()(),l(11,"div",8)(12,"div",9),u(13,"Page"),s(),l(14,"div",10)(15,"input",11),ct("ngModelChange",function(i){return gt(e.item.pageNumber,i)||(e.item.pageNumber=i),i}),c("ngModelChange",function(i){return e.onPageNumberChange(i)}),s(),l(16,"span",12),u(17,"of "),k(18,Yt,1,0,"i",13),l(19,"span",14),u(20),C(21,"async"),s(),u(22," page(s)"),s()()(),l(23,"div",3)(24,"div",15)(25,"div",16),b(26,"i",17),u(27),C(28,"number"),C(29,"number"),s()()()()()()),o&2&&(m("config",e.modalConfig),g(8),m("checked",!0),g(7),dt("ngModel",e.item.pageNumber),g(3),M(e.isShowTotalRowCount()==!1?18:-1),g(2),lt(S(21,7,e.totalRowCount$)),g(7),st(" Exporting data from ",S(28,9,e.displayedMinRangeRow())," - ",S(29,11,e.displayedMaxRangeRow())," "))},dependencies:[bt,pt,mt,yt,ft,vt,_t,Ft,It,Gt,Vt,Lt,Bt,kt,Tt,Ht,H,B],encapsulation:2})}}return n})();export{jt as a,$e as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as A,b as F,d as U,e as W}from"./chunk-
|
|
1
|
+
import{h as k}from"./chunk-PSPROJXC.js";import{a as A,b as F,d as U,e as W}from"./chunk-5JVEEL2T.js";import{A as L,a as D,h as V,m as I}from"./chunk-6QYD6NIJ.js";import{n as E}from"./chunk-M2FCTYGU.js";import{Gb as M,Gc as p,Ic as f,Kc as O,Lc as T,Mb as u,Mc as N,Oa as d,Qc as w,Yb as s,dc as y,ic as a,jc as o,kc as h,oc as x,pa as S,pb as g,rb as r,tc as C,uc as _,ya as v,za as b}from"./chunk-B7KTCPKC.js";function z(t,m){if(t&1&&(a(0,"span",3),h(1,"img",4),o(),a(2,"span"),p(3),o()),t&2){let e=m.item;r(),s("src",e==null?null:e.Img,g),r(2),f(" ",e.Name," ")}}function P(t,m){if(t&1){let e=x();a(0,"span",6),C("click",function(){v(e);let n=_(),c=n.item,l=n.clear;return b(l(c))}),p(1,"x"),o()}}function j(t,m){if(t&1&&(a(0,"span",3),h(1,"img",4),o(),a(2,"span"),p(3),o(),u(4,P,2,0,"span",5)),t&2){let e=m.item,i=_();r(),s("src",e==null?null:e.Img,g),r(2),f(" ",e.Name," "),r(),y(i.clearable()?4:-1)}}var Y=(()=>{class t{constructor(){this.authService=S(k),this.multiple=d(!1),this.clearable=d(!0),this.options=this.authService.getChannels(),this.onChange=e=>{}}onChannelChange(e){this.onChange(e)}writeValue(e){this.selectedChannels=e}registerOnChange(e){this.onChange=e}registerOnTouched(e){}setDisabledState(e){}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=M({type:t,selectors:[["channel-select-options"]],inputs:{multiple:[1,"multiple"],clearable:[1,"clearable"]},features:[w([{provide:D,multi:!0,useExisting:t}])],decls:3,vars:4,consts:[["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel","appendTo","body",1,"center-text",3,"ngModelChange","clearable","items","ngModel","multiple"],["ng-option-tmp",""],["ng-label-tmp",""],[1,"me-2"],[2,"width","18px",3,"src"],["aria-hidden","true",1,"ng-value-icon","right"],["aria-hidden","true",1,"ng-value-icon","right",3,"click"]],template:function(i,n){i&1&&(a(0,"ng-select",0),N("ngModelChange",function(l){return T(n.selectedChannels,l)||(n.selectedChannels=l),l}),C("ngModelChange",function(l){return n.onChannelChange(l)}),u(1,z,4,2,"ng-template",1)(2,j,5,3,"ng-template",2),o()),i&2&&(s("clearable",n.clearable())("items",n.options),O("ngModel",n.selectedChannels),s("multiple",n.multiple()))},dependencies:[E,W,U,A,F,L,V,I],encapsulation:2})}}return t})();export{Y as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as f}from"./chunk-PW42BQIY.js";import{b as E,c as I,j as K,k as T}from"./chunk-
|
|
1
|
+
import{c as f}from"./chunk-PW42BQIY.js";import{b as E,c as I,j as K,k as T}from"./chunk-CLER2MX6.js";import{r as x}from"./chunk-YCH6HHU3.js";import{d as V}from"./chunk-M2FCTYGU.js";import{Gb as b,Gc as m,Hc as h,Ra as _,Sc as S,Yb as p,ec as O,gc as v,hc as P,ic as o,jc as l,rb as d,tc as y,xb as g}from"./chunk-B7KTCPKC.js";var N=i=>({"bg-gradient-warning":i});function D(i,U){if(i&1&&(o(0,"tr",5)(1,"td"),m(2),l(),o(3,"td",6),m(4),l()()),i&2){let t=U.$implicit;p("matTooltip",t.duplicateMessage),d(2),h(t==null?null:t.Name),d(),p("ngClass",S(4,N,t.isDuplicate)),d(),h(t!=null&&t.ChannelVariationSKU?t==null?null:t.ChannelVariationSKU:"Not Assigned")}}var z=(()=>{class i{constructor(t,e){this.data=t,this.dialogRef=e,this.variants=_([])}ngOnInit(){this.initModalConfig(),this.initVariants()}initVariants(){let t=this.data?.variants,e={},a=[],C=t.filter(n=>f.IsEmpty(n.ChannelVariationSKU));t.filter(n=>f.IsNotEmpty(n.ChannelVariationSKU)).forEach((n,r,M)=>{e[n.ChannelVariationSKU]=M.filter(s=>s.ChannelVariationSKU===n.ChannelVariationSKU)}),Object.keys(e).forEach(n=>{e[n].length>1&&(e[n]=e[n].map((r,M,s)=>{let u=`SKU ${r.ChannelVariationSKU} is duplicated with variant`;return s.forEach((c,k)=>{c.Name!==r.Name&&(u+=` ${s.length>2?c.Name+(k!==s.length-1?",":""):c.Name}`)}),r.duplicateMessage=u,r.isDuplicate=!0,r})),a.push(...e[n])}),a.push(...C),this.variants.set(a)}initModalConfig(){this.modalConfig=new K,this.modalConfig.title=this.data?.title,this.modalConfig.hideOk=!0,this.modalConfig.hideCancel=!0,this.modalConfig.bodyScrollable=!0}static{this.\u0275fac=function(e){return new(e||i)(g(I),g(E))}}static{this.\u0275cmp=b({type:i,selectors:[["app-modal-variants"]],standalone:!1,decls:12,vars:1,consts:[[3,"onCancel","config"],["content",""],[1,"table"],[1,"sticky-top-thead","variant-modal"],[1,"sticky-top"],["matTooltipPosition","above",3,"matTooltip"],[3,"ngClass"]],template:function(e,a){e&1&&(o(0,"modal-material",0),y("onCancel",function(){return a.dialogRef.close()}),o(1,"div",1)(2,"table",2)(3,"thead",3)(4,"tr")(5,"th",4),m(6,"Variant"),l(),o(7,"th",4),m(8,"SKU"),l()()(),o(9,"tbody"),v(10,D,5,6,"tr",5,O),l()()()()),e&2&&(p("config",a.modalConfig),d(10),P(a.variants()))},dependencies:[V,x,T],styles:[".mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}.sticky-top-thead[_ngcontent-%COMP%] th.sticky-top[_ngcontent-%COMP%]{top:0}.table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] tr.sticky-top[_ngcontent-%COMP%]{border:none!important;border-bottom:1px solid!important}table[_ngcontent-%COMP%] > thead[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%]{border-top:none!important;border-left:none!important;border-right:none!important}.table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{background-color:#f6f6f6!important}.sticky-top-thead.variant-modal[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:last-child:after{border-right:0px!important}.sticky-top-thead.variant-modal[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:first-child:before{border-left:0px!important}.sticky-top-thead.variant-modal[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:before{border-top:0px}"]})}}return i})();export{z as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as p}from"./chunk-
|
|
1
|
+
import{a as p}from"./chunk-SM3P57SO.js";import{a as M}from"./chunk-OZ7LWNOK.js";import{a as y}from"./chunk-ECRWEMEV.js";import{a as I,o as w}from"./chunk-M2FCTYGU.js";import{Aa as r,Ca as n,Gb as u,Hb as g,Ib as F,Kb as s,Pa as h,Wa as v,Xb as c,ac as f,ic as l,jc as m,ka as C,kc as d,od as D,pa as a}from"./chunk-B7KTCPKC.js";var S=(()=>{class e extends y{autofocus=!1;_autofocus=!1;focused=!1;platformId=a(v);document=a(I);host=a(h);ngAfterContentChecked(){this.autofocus===!1?this.host.nativeElement.removeAttribute("autofocus"):this.host.nativeElement.setAttribute("autofocus",!0),this.focused||this.autoFocus()}ngAfterViewChecked(){this.focused||this.autoFocus()}autoFocus(){w(this.platformId)&&this._autofocus&&setTimeout(()=>{let t=M.getFocusableElements(this.host?.nativeElement);t.length===0&&this.host.nativeElement.focus(),t.length>0&&t[0].focus(),this.focused=!0})}static \u0275fac=(()=>{let t;return function(o){return(t||(t=n(e)))(o||e)}})();static \u0275dir=F({type:e,selectors:[["","pAutoFocus",""]],inputs:{autofocus:[2,"autofocus","autofocus",D],_autofocus:[0,"pAutoFocus","_autofocus"]},features:[s]})}return e})(),j=(()=>{class e{static \u0275fac=function(i){return new(i||e)};static \u0275mod=g({type:e});static \u0275inj=C({})}return e})();var _=(()=>{class e extends p{static \u0275fac=(()=>{let t;return function(o){return(t||(t=n(e)))(o||e)}})();static \u0275cmp=u({type:e,selectors:[["ChevronDownIcon"]],features:[s],decls:2,vars:5,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M7.01744 10.398C6.91269 10.3985 6.8089 10.378 6.71215 10.3379C6.61541 10.2977 6.52766 10.2386 6.45405 10.1641L1.13907 4.84913C1.03306 4.69404 0.985221 4.5065 1.00399 4.31958C1.02276 4.13266 1.10693 3.95838 1.24166 3.82747C1.37639 3.69655 1.55301 3.61742 1.74039 3.60402C1.92777 3.59062 2.11386 3.64382 2.26584 3.75424L7.01744 8.47394L11.769 3.75424C11.9189 3.65709 12.097 3.61306 12.2748 3.62921C12.4527 3.64535 12.6199 3.72073 12.7498 3.84328C12.8797 3.96582 12.9647 4.12842 12.9912 4.30502C13.0177 4.48162 12.9841 4.662 12.8958 4.81724L7.58083 10.1322C7.50996 10.2125 7.42344 10.2775 7.32656 10.3232C7.22968 10.3689 7.12449 10.3944 7.01744 10.398Z","fill","currentColor"]],template:function(i,o){i&1&&(r(),l(0,"svg",0),d(1,"path",1),m()),i&2&&(f(o.getClassNames()),c("aria-label",o.ariaLabel)("aria-hidden",o.ariaHidden)("role",o.role))},encapsulation:2})}return e})();var O=(()=>{class e extends p{static \u0275fac=(()=>{let t;return function(o){return(t||(t=n(e)))(o||e)}})();static \u0275cmp=u({type:e,selectors:[["TimesIcon"]],features:[s],decls:2,vars:5,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M8.01186 7.00933L12.27 2.75116C12.341 2.68501 12.398 2.60524 12.4375 2.51661C12.4769 2.42798 12.4982 2.3323 12.4999 2.23529C12.5016 2.13827 12.4838 2.0419 12.4474 1.95194C12.4111 1.86197 12.357 1.78024 12.2884 1.71163C12.2198 1.64302 12.138 1.58893 12.0481 1.55259C11.9581 1.51625 11.8617 1.4984 11.7647 1.50011C11.6677 1.50182 11.572 1.52306 11.4834 1.56255C11.3948 1.60204 11.315 1.65898 11.2488 1.72997L6.99067 5.98814L2.7325 1.72997C2.59553 1.60234 2.41437 1.53286 2.22718 1.53616C2.03999 1.53946 1.8614 1.61529 1.72901 1.74767C1.59663 1.88006 1.5208 2.05865 1.5175 2.24584C1.5142 2.43303 1.58368 2.61419 1.71131 2.75116L5.96948 7.00933L1.71131 11.2675C1.576 11.403 1.5 11.5866 1.5 11.7781C1.5 11.9696 1.576 12.1532 1.71131 12.2887C1.84679 12.424 2.03043 12.5 2.2219 12.5C2.41338 12.5 2.59702 12.424 2.7325 12.2887L6.99067 8.03052L11.2488 12.2887C11.3843 12.424 11.568 12.5 11.7594 12.5C11.9509 12.5 12.1346 12.424 12.27 12.2887C12.4053 12.1532 12.4813 11.9696 12.4813 11.7781C12.4813 11.5866 12.4053 11.403 12.27 11.2675L8.01186 7.00933Z","fill","currentColor"]],template:function(i,o){i&1&&(r(),l(0,"svg",0),d(1,"path",1),m()),i&2&&(f(o.getClassNames()),c("aria-label",o.ariaLabel)("aria-hidden",o.ariaHidden)("role",o.role))},encapsulation:2})}return e})();export{S as a,j as b,_ as c,O as d};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as u}from"./chunk-
|
|
1
|
+
import{a as u}from"./chunk-ECRWEMEV.js";import{M as d,ba as m}from"./chunk-LZCEM2PC.js";import{Ca as o,Gb as s,Kb as r,Qc as p,ja as a,od as f,vc as c,wc as l}from"./chunk-B7KTCPKC.js";var g=["*"],b=`
|
|
2
2
|
.p-icon {
|
|
3
3
|
display: inline-block;
|
|
4
4
|
vertical-align: baseline;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as E}from"./chunk-
|
|
1
|
+
import{a as E}from"./chunk-SM3P57SO.js";import{a as B}from"./chunk-ECRWEMEV.js";import{M as k,Y as z,ba as D}from"./chunk-LZCEM2PC.js";import{m as F}from"./chunk-6QYD6NIJ.js";import{Aa as x,Ca as l,Gb as v,Hb as b,Ib as C,Kb as a,Qc as w,Xb as u,Yb as $,_b as y,ac as I,ic as d,ja as f,jc as s,ka as g,kc as c,od as M,pa as m,rb as p,tc as S,xb as h}from"./chunk-B7KTCPKC.js";var L=(()=>{class t extends E{pathId;ngOnInit(){this.pathId="url(#"+z()+")"}static \u0275fac=(()=>{let n;return function(e){return(n||(n=l(t)))(e||t)}})();static \u0275cmp=v({type:t,selectors:[["SpinnerIcon"]],features:[a],decls:6,vars:7,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M6.99701 14C5.85441 13.999 4.72939 13.7186 3.72012 13.1832C2.71084 12.6478 1.84795 11.8737 1.20673 10.9284C0.565504 9.98305 0.165424 8.89526 0.041387 7.75989C-0.0826496 6.62453 0.073125 5.47607 0.495122 4.4147C0.917119 3.35333 1.59252 2.4113 2.46241 1.67077C3.33229 0.930247 4.37024 0.413729 5.4857 0.166275C6.60117 -0.0811796 7.76026 -0.0520535 8.86188 0.251112C9.9635 0.554278 10.9742 1.12227 11.8057 1.90555C11.915 2.01493 11.9764 2.16319 11.9764 2.31778C11.9764 2.47236 11.915 2.62062 11.8057 2.73C11.7521 2.78503 11.688 2.82877 11.6171 2.85864C11.5463 2.8885 11.4702 2.90389 11.3933 2.90389C11.3165 2.90389 11.2404 2.8885 11.1695 2.85864C11.0987 2.82877 11.0346 2.78503 10.9809 2.73C9.9998 1.81273 8.73246 1.26138 7.39226 1.16876C6.05206 1.07615 4.72086 1.44794 3.62279 2.22152C2.52471 2.99511 1.72683 4.12325 1.36345 5.41602C1.00008 6.70879 1.09342 8.08723 1.62775 9.31926C2.16209 10.5513 3.10478 11.5617 4.29713 12.1803C5.48947 12.7989 6.85865 12.988 8.17414 12.7157C9.48963 12.4435 10.6711 11.7264 11.5196 10.6854C12.3681 9.64432 12.8319 8.34282 12.8328 7C12.8328 6.84529 12.8943 6.69692 13.0038 6.58752C13.1132 6.47812 13.2616 6.41667 13.4164 6.41667C13.5712 6.41667 13.7196 6.47812 13.8291 6.58752C13.9385 6.69692 14 6.84529 14 7C14 8.85651 13.2622 10.637 11.9489 11.9497C10.6356 13.2625 8.85432 14 6.99701 14Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(i,e){i&1&&(x(),d(0,"svg",0)(1,"g"),c(2,"path",1),s(),d(3,"defs")(4,"clipPath",2),c(5,"rect",3),s()()()),i&2&&(I(e.getClassNames()),u("aria-label",e.ariaLabel)("aria-hidden",e.ariaHidden)("role",e.role),p(),u("clip-path",e.pathId),p(3),$("id",e.pathId))},encapsulation:2})}return t})();var V=({dt:t})=>`
|
|
2
2
|
.p-inputtext {
|
|
3
3
|
font-family: inherit;
|
|
4
4
|
font-feature-settings: inherit;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as j,b as q}from"./chunk-
|
|
1
|
+
import{a as j,b as q}from"./chunk-OC2FBL33.js";import{a as V}from"./chunk-5KS4WK6H.js";import{ia as $}from"./chunk-LZCEM2PC.js";import{b as s,c as a}from"./chunk-PW42BQIY.js";import{A as D,a as I,h as R,m as A}from"./chunk-6QYD6NIJ.js";import{a as F}from"./chunk-ATZ475FN.js";import{r as U,s as W}from"./chunk-YCH6HHU3.js";import{j as O,n as z}from"./chunk-M2FCTYGU.js";import{$c as E,Ga as _,Gb as w,Gc as y,Ic as M,Ka as T,Kc as v,Lc as L,Mb as g,Mc as P,Oa as h,Qc as B,Ra as c,Yb as d,Z as b,ad as x,dc as k,ia as S,ic as u,jc as r,pa as m,rb as p,tc as f,uc as N,v as C}from"./chunk-B7KTCPKC.js";function J(n,G){if(n&1&&(u(0,"div",4),y(1),r()),n&2){let e=N();p(),M(" ",e.selectedCategoryLabel()," ")}}function K(n,G){n&1&&(u(0,"label",3),y(1,"Channel"),r())}var he=(()=>{class n{constructor(){this.multiwarehousTreeService=m(V),this.destroyRef=m(_),this.selectedCategoryLabel=c("Select a Channel"),this.disabled=c(!1),this.selectedNode=c(null),this.multiple=h(!1),this.floatingLabel=h(!1),this.onChannelChange=new T,this.channels$=this.multiwarehousTreeService.getChannelTree$().pipe(C(e=>e.map(t=>{t.children=t.children.map(i=>(i.icon="fa-solid fa-warehouse",i));let o=this.getChannelType(t.typeid);return t.icon=`custom-icon-${o}`,t.expandedIcon=null,t.collapsedIcon=null,t.styleClass=`custom-icon-${o}`,t.logo=a.getChannelLogoByTypeId(t.typeId),t})),b(1)),this.htmlBody=document.querySelector("body"),this.onChange=e=>{},this.onTouched=()=>{}}getChannelType(e){switch(e){case s.Tokopedia:return"tokopedia";case s.Shopee:return"shopee";case s.Lazada:return"lazada";case s.Shopify:return"shopify";case s.WooCommerce:return"woocommerce";case s.Tiktok:return"tiktok";case s.Plugo:return"plugo"}}initSelectedNode(e){this.channels$.pipe(F(this.destroyRef)).subscribe(t=>{if(this.multiple()){let o=[];for(let i of e){let l=a.searchByIdWithParentDFS(t,i),H=Object.assign({},l);o.push(H)}this.selectedNode.set(o),this.emitMultipleNodes()}else{let o=a.searchByIdWithParentDFS(t,e),i=Object.assign({},o);this.selectedNode.set(i),this.emitSingleNode(i)}})}onNodeSelect(e){let t=Object.assign({},e.node);this.multiple()?this.emitMultipleNodes():this.emitSingleNode(t)}emitMultipleNodes(){let e=Object.assign([],this.selectedNode()),t=e.map(o=>o.id);this.onChange(t),this.onChannelChange.emit(e),this.generateLabel()}emitSingleNode(e){this.onChange(e.id),this.onChannelChange.emit(e),this.generateLabel()}onNodeUnSelect(e){if(this.multiple()){let t=e.node;this.selectedNode.update(o=>o.filter(i=>i.id!==t.id)),this.emitMultipleNodes(),this.generateLabel()}}generateLabel(){let e="Select a Channel";if(this.multiple()){e="";for(let t of this.selectedNode())e+=a.getLabelPathTree(t)+", ";this.selectedCategoryLabel.set(e)}else{let t=this.selectedNode();t?(e=a.getLabelPathTree(t),this.selectedCategoryLabel.set(e)):this.selectedCategoryLabel.set(e)}}onClear(){this.onChange(null)}onClick(){let e=this.getBodyTop(),t=document.querySelector(".p-overlay.p-component"),o=e+t.getBoundingClientRect().top,i=t.getAttribute("style")||"";t.setAttribute("style",`${i} top: ${o+e}px;`)}getBodyTop(){return this.htmlBody.getBoundingClientRect().top*-1}writeValue(e){a.IsNotEmpty(e)&&this.initSelectedNode(e)}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this.disabled.set(e)}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=w({type:n,selectors:[["multiwarehouse-tree-select"]],inputs:{multiple:[1,"multiple"],floatingLabel:[1,"floatingLabel"]},outputs:{onChannelChange:"onChannelChange"},features:[B([{provide:I,useExisting:S(()=>n),multi:!0}])],decls:5,vars:9,consts:[["matTooltipPosition","above",1,"p-float-label",3,"matTooltip"],["appendTo","body","containerStyleClass","w-100","id","selectChannel",1,"multiwarehouse-select",3,"click","onNodeSelect","ngModelChange","onClear","onNodeUnselect","filter","filterInputAutoFocus","options","ngModel","selectionMode"],["pTemplate","value","type","default"],["for","selectChannel"],["matTooltipPosition","above"]],template:function(t,o){t&1&&(u(0,"span",0)(1,"p-treeSelect",1),E(2,"async"),f("click",function(){return o.onClick()})("onNodeSelect",function(l){return o.onNodeSelect(l)}),P("ngModelChange",function(l){return L(o.selectedNode,l)||(o.selectedNode=l),l}),f("onClear",function(){return o.onClear()})("onNodeUnselect",function(l){return o.onNodeUnSelect(l)}),g(3,J,2,1,"ng-template",2),r(),g(4,K,2,0,"label",3),r()),t&2&&(d("matTooltip",o.selectedCategoryLabel()),p(),d("filter",!0)("filterInputAutoFocus",!0)("options",x(2,7,o.channels$)),v("ngModel",o.selectedNode),d("selectionMode",o.multiple()?"multiple":"single"),p(3),k(o.floatingLabel()?4:-1))},dependencies:[z,O,q,j,$,D,R,A,W,U],styles:["[_nghost-%COMP%] .p-treeselect{width:100%;display:inline-flex;border:1px solid #ced4da;font-size:.875rem!important} .p-element .p-icon-wrapper{width:14px} .p-float-label .multiwarehouse-select.p-treeselect{padding:7px!important;min-height:.6rem!important} .custom-icon-tokopedia.p-tree-node-icon, .custom-icon-shopee.p-tree-node-icon, .custom-icon-woocommerce.p-tree-node-icon, .custom-icon-lazada.p-tree-node-icon, .custom-icon-tiktok.p-tree-node-icon, .custom-icon-shopify.p-tree-node-icon, .custom-icon-plugo.p-tree-node-icon{background-size:contain;background-repeat:no-repeat;width:20px;height:20px;display:inline-block} .custom-icon-tokopedia.p-tree-node-icon{background-image:url(https://res.cloudinary.com/pos/image/upload/v1598262221/icons/marketplace_icons/tokopedia.png)} .custom-icon-woocommerce.p-tree-node-icon{background-image:url(https://res.cloudinary.com/pos/image/upload/w_50/v1632447439/icons/WooCommerce/woocommerce-icon.webp)} .custom-icon-shopee.p-tree-node-icon{background-image:url(https://res.cloudinary.com/pos/image/upload/v1598262220/icons/marketplace_icons/shopee.png)} .custom-icon-tiktok.p-tree-node-icon{background-image:url(https://res.cloudinary.com/pos/image/upload/w_30/v1645761611/icons/Marketplace%20logo/tiktok.png)} .custom-icon-lazada.p-tree-node-icon{background-image:url(https://res.cloudinary.com/pos/image/upload/v1680681836/icons/marketplace_icons/Lazadanew.png)} .custom-icon-shopify.p-tree-node-icon{background-image:url(https://res.cloudinary.com/pos/image/upload/v1707987435/icons/marketplace_icons/shopify.png)} .custom-icon-plugo.p-tree-node-icon{background-image:url(https://res.cloudinary.com/pos/image/upload/v1739236419/icons/marketplace_icons/plugo.ico)} .custom-icon-shopee .fa-warehouse.p-tree-node-icon, .custom-icon-tiktok .fa-warehouse.p-tree-node-icon, .custom-icon-tokopedia .fa-warehouse.p-tree-node-icon, .custom-icon-lazada .fa-warehouse.p-tree-node-icon, .custom-icon-shopify .fa-warehouse.p-tree-node-icon, .custom-icon-woocommerce .fa-warehouse.p-tree-node-icon, .custom-icon-plugo .fa-warehouse.p-tree-node-icon{background-image:none!important;display:inline-block!important}"]})}}return n})();export{he as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{G as Z}from"./chunk-MTUIRWOB.js";import{B as b,F as I,Hb as q,Ib as Q,J as M,Ka as C,O as H,R as G,T as P,_ as z,aa as F,ea as j,g as l,ja as m,jd as X,ka as L,ma as v,oa as u,p as d,pa as f,q as a,tb as J,v as y,x as g,xa as K,y as w,zb as Y}from"./chunk-JS55A2RS.js";import{a as c,b as x}from"./chunk-66YHNWRR.js";var O={REMOVE:"remove",SHOW:"show"},ee=(()=>{class t{constructor(){this.strategiesSource=new l({}),this.strategies$=this.strategiesSource.asObservable()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=m({token:t,factory:t.\u0275fac})}}return t})(),N=new v("USE_CONFIGURATION_STORE"),k=(()=>{class t{constructor(e=!1,i){this.isolate=e,this.configurationStore=i,this.strategiesSource=this.isolate?new l({}):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===O.SHOW||e===O.REMOVE}static{this.\u0275fac=function(i){return new(i||t)(u(N),u(ee))}}static{this.\u0275prov=m({token:t,factory:t.\u0275fac})}}return t})();function h(t){return typeof t=="function"}function V(t){if(Object.prototype.toString.call(t)!=="[object Object]")return!1;{let W=Object.getPrototypeOf(t);return W===null||W===Object.prototype}}function ie(t){return!!t&&typeof t=="string"}function A(t){return typeof t=="boolean"}function te(t){return Object.prototype.toString.call(t)==="[object Promise]"}function E(t){return Array.isArray(t)?t.length>0:!!t}function T(t){return ie(t)?[t]:t}var se=(()=>{class t{constructor(){this.permissionsSource=new l({}),this.permissions$=this.permissionsSource.asObservable()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=m({token:t,factory:t.\u0275fac})}}return t})(),B=new v("USE_PERMISSIONS_STORE"),S=(()=>{class t{constructor(e=!1,i){this.isolate=e,this.permissionsStore=i,this.permissionsSource=this.isolate?new l({}):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=T(e),this.hasArrayPermission(e))}loadPermissions(e,i){let s=e.reduce((n,r)=>this.reducePermission(n,r,i),{});this.permissionsSource.next(s)}addPermission(e,i){if(Array.isArray(e)){let s=e.reduce((n,r)=>this.reducePermission(n,r,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=c({},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&&h(s)?x(c({},e),{[i]:{name:i,validationFunction:s}}):x(c({},e),{[i]:{name:i}})}hasArrayPermission(e){let i=e.map(s=>{if(this.hasPermissionValidationFunction(s)){let n=this.permissionsSource.value[s].validationFunction,r=c({},this.permissionsSource.value);return a(null).pipe(y(()=>n(s,r)),F(o=>A(o)?a(o):o),M(()=>a(!1)))}return a(!!this.permissionsSource.value[s])});return d(i).pipe(w(),P(s=>s!==!1,!1),y(s=>s!==!1)).toPromise().then(s=>s)}hasPermissionValidationFunction(e){return!!this.permissionsSource.value[e]&&!!this.permissionsSource.value[e].validationFunction&&h(this.permissionsSource.value[e].validationFunction)}static{this.\u0275fac=function(i){return new(i||t)(u(B),u(se))}}static{this.\u0275prov=m({token:t,factory:t.\u0275fac})}}return t})(),R=class{constructor(){this.rolesSource=new l({}),this.roles$=this.rolesSource.asObservable()}},$=new v("USE_ROLES_STORE"),D=(()=>{class t{constructor(e=!1,i,s){this.isolate=e,this.rolesStore=i,this.permissionsService=s,this.rolesSource=this.isolate?new l({}):this.rolesStore.rolesSource,this.roles$=this.rolesSource.asObservable()}addRole(e,i){let s=x(c({},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=c({},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=T(e),Promise.all([this.hasRoleKey(e),this.hasRolePermission(this.rolesSource.value,e)]).then(([s,n])=>s||n))}hasRoleKey(e){let i=e.map(s=>{if(!!this.rolesSource.value[s]&&!!this.rolesSource.value[s].validationFunction&&h(this.rolesSource.value[s].validationFunction)&&!te(this.rolesSource.value[s].validationFunction)){let r=this.rolesSource.value[s].validationFunction,o=c({},this.rolesSource.value);return a(null).pipe(y(()=>r(s,o)),F(p=>A(p)?a(p):p),M(()=>a(!1)))}return a(!1)});return d(i).pipe(w(),P(s=>s!==!1,!1),y(s=>s!==!1)).toPromise().then(s=>s)}hasRolePermission(e,i){return d(i).pipe(g(s=>e[s]&&Array.isArray(e[s].validationFunction)?d(e[s].validationFunction).pipe(g(n=>this.permissionsService.hasPermission(n)),G(n=>n===!0)):a(!1)),P(s=>s===!0,!1)).toPromise()}static{this.\u0275fac=function(i){return new(i||t)(u($),u(R),u(S))}}static{this.\u0275prov=m({token:t,factory:t.\u0275fac})}}return t})(),Pe=(()=>{class t{constructor(){this.permissionsAuthorized=new C,this.permissionsUnauthorized=new C,this.firstMergeUnusedRun=1,this.permissionsService=f(S),this.configurationService=f(k),this.rolesService=f(D),this.viewContainer=f(Y),this.changeDetector=f(X),this.templateRef=f(J)}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;I(this.permissionsService.permissions$,this.rolesService.roles$).pipe(z(this.firstMergeUnusedRun),H(1)).subscribe(()=>{if(E(this.ngxPermissionsExcept)){this.validateExceptAndOnlyPermissions();return}if(E(this.ngxPermissionsOnly)){this.validateOnlyPermissions();return}this.handleAuthorisedPermission(this.getAuthorisedTemplates())})}}ngOnDestroy(){this.initPermissionSubscription&&this.initPermissionSubscription.unsubscribe()}validateExceptOnlyPermissions(){return I(this.permissionsService.permissions$,this.rolesService.roles$).pipe(z(this.firstMergeUnusedRun)).subscribe(()=>{if(E(this.ngxPermissionsExcept)){this.validateExceptAndOnlyPermissions();return}if(E(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(!(A(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(!(A(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(h(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===O.SHOW){this.showTemplateBlockInView(this.templateRef);return}if(e===O.REMOVE){this.viewContainer.clear();return}let i=this.configurationService.getStrategy(e);this.showTemplateBlockInView(this.templateRef),i(this.templateRef)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=Q({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"},standalone:!1,features:[K]})}}return t})(),re="default";var _=(()=>{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:{},n=this.transformPermission(s,e,i);return this.isParameterAvailable(n.except)?this.passingExceptPermissionsValidation(n,e,i):this.isParameterAvailable(n.only)?this.passingOnlyPermissionsValidation(n,e,i):!0}transformPermission(e,i,s){let n=h(e.only)?e.only(i,s):T(e.only),r=h(e.except)?e.except(i,s):T(e.except),o=e.redirectTo;return{only:n,except:r,redirectTo:o}}isParameterAvailable(e){return!!e&&e.length>0}passingExceptPermissionsValidation(e,i,s){if(e.redirectTo&&(h(e.redirectTo)||V(e.redirectTo)&&!this.isRedirectionWithParameters(e.redirectTo))){let n="";return d(e.except).pipe(g(r=>b([this.permissionsService.hasPermission(r),this.rolesService.hasOnlyRoles(r)]).pipe(j(o=>{o.every(U=>U===!1)||(n=r)}))),P(r=>r.some(o=>o===!0),!1),g(r=>n?(this.handleRedirectOfFailedPermission(e,n,i,s),a(!1)):!r&&e.only?this.onlyRedirectCheck(e,i,s):a(!r))).toPromise()}return Promise.all([this.permissionsService.hasPermission(e.except),this.rolesService.hasOnlyRoles(e.except)]).then(([n,r])=>n||r?(e.redirectTo&&this.redirectToAnotherRoute(e.redirectTo,i,s),!1):e.only?this.checkOnlyPermissions(e,i,s):!0)}redirectToAnotherRoute(e,i,s,n){let r=h(e)?e(n,i,s):e;if(this.isRedirectionWithParameters(r)){r.navigationCommands=this.transformNavigationCommands(r.navigationCommands,i,s),r.navigationExtras=this.transformNavigationExtras(r.navigationExtras,i,s),this.router.navigate(r.navigationCommands,r.navigationExtras);return}Array.isArray(r)?this.router.navigate(r):this.router.navigate([r])}isRedirectionWithParameters(e){return V(e)&&(!!e.navigationCommands||!!e.navigationExtras)}transformNavigationCommands(e,i,s){return h(e)?e(i,s):e}transformNavigationExtras(e,i,s){return h(e)?e(i,s):e}onlyRedirectCheck(e,i,s){let n="";return d(e.only).pipe(g(r=>b([this.permissionsService.hasPermission(r),this.rolesService.hasOnlyRoles(r)]).pipe(j(o=>{o.every(U=>U===!1)&&(n=r)}))),P(r=>h(e.redirectTo)?r.some(o=>o===!0):r.every(o=>o===!1),!1),g(r=>h(e.redirectTo)?r?a(!0):(this.handleRedirectOfFailedPermission(e,n,i,s),a(!1)):(n&&this.handleRedirectOfFailedPermission(e,n,i,s),a(!r)))).toPromise()}handleRedirectOfFailedPermission(e,i,s,n){this.isFailedPermissionPropertyOfRedirectTo(e,i)?this.redirectToAnotherRoute(e.redirectTo[i],s,n,i):h(e.redirectTo)?this.redirectToAnotherRoute(e.redirectTo,s,n,i):this.redirectToAnotherRoute(e.redirectTo[re],s,n,i)}isFailedPermissionPropertyOfRedirectTo(e,i){return!!e.redirectTo&&e.redirectTo[i]}checkOnlyPermissions(e,i,s){let n=c({},e);return Promise.all([this.permissionsService.hasPermission(n.only),this.rolesService.hasOnlyRoles(n.only)]).then(([r,o])=>r||o?!0:(n.redirectTo&&this.redirectToAnotherRoute(n.redirectTo,i,s),!1))}passingOnlyPermissionsValidation(e,i,s){return h(e.redirectTo)||V(e.redirectTo)&&!this.isRedirectionWithParameters(e.redirectTo)?this.onlyRedirectCheck(e,i,s):this.checkOnlyPermissions(e,i,s)}static{this.\u0275fac=function(i){return new(i||t)(u(S),u(D),u(Z))}}static{this.\u0275prov=m({token:t,factory:t.\u0275fac})}}return t})();var pe=(()=>{class t{static forRoot(e={}){return{ngModule:t,providers:[se,R,ee,S,_,D,k,{provide:B,useValue:e.permissionsIsolate},{provide:$,useValue:e.rolesIsolate},{provide:N,useValue:e.configurationIsolate}]}}static forChild(e={}){return{ngModule:t,providers:[{provide:B,useValue:e.permissionsIsolate},{provide:$,useValue:e.rolesIsolate},{provide:N,useValue:e.configurationIsolate},k,S,D,_]}}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275mod=q({type:t})}static{this.\u0275inj=L({})}}return t})();export{S as a,Pe as b,pe as c};
|
|
1
|
+
import{G as Z}from"./chunk-M2FCTYGU.js";import{B as b,F as I,Hb as q,Ib as Q,J as M,Ka as C,O as H,R as G,T as P,_ as z,aa as F,ea as j,g as l,ja as m,jd as X,ka as L,ma as v,oa as u,p as d,pa as f,q as a,tb as J,v as y,x as g,xa as K,y as w,zb as Y}from"./chunk-B7KTCPKC.js";import{a as c,b as x}from"./chunk-66YHNWRR.js";var O={REMOVE:"remove",SHOW:"show"},ee=(()=>{class t{constructor(){this.strategiesSource=new l({}),this.strategies$=this.strategiesSource.asObservable()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=m({token:t,factory:t.\u0275fac})}}return t})(),N=new v("USE_CONFIGURATION_STORE"),k=(()=>{class t{constructor(e=!1,i){this.isolate=e,this.configurationStore=i,this.strategiesSource=this.isolate?new l({}):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===O.SHOW||e===O.REMOVE}static{this.\u0275fac=function(i){return new(i||t)(u(N),u(ee))}}static{this.\u0275prov=m({token:t,factory:t.\u0275fac})}}return t})();function h(t){return typeof t=="function"}function V(t){if(Object.prototype.toString.call(t)!=="[object Object]")return!1;{let W=Object.getPrototypeOf(t);return W===null||W===Object.prototype}}function ie(t){return!!t&&typeof t=="string"}function A(t){return typeof t=="boolean"}function te(t){return Object.prototype.toString.call(t)==="[object Promise]"}function E(t){return Array.isArray(t)?t.length>0:!!t}function T(t){return ie(t)?[t]:t}var se=(()=>{class t{constructor(){this.permissionsSource=new l({}),this.permissions$=this.permissionsSource.asObservable()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=m({token:t,factory:t.\u0275fac})}}return t})(),B=new v("USE_PERMISSIONS_STORE"),S=(()=>{class t{constructor(e=!1,i){this.isolate=e,this.permissionsStore=i,this.permissionsSource=this.isolate?new l({}):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=T(e),this.hasArrayPermission(e))}loadPermissions(e,i){let s=e.reduce((n,r)=>this.reducePermission(n,r,i),{});this.permissionsSource.next(s)}addPermission(e,i){if(Array.isArray(e)){let s=e.reduce((n,r)=>this.reducePermission(n,r,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=c({},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&&h(s)?x(c({},e),{[i]:{name:i,validationFunction:s}}):x(c({},e),{[i]:{name:i}})}hasArrayPermission(e){let i=e.map(s=>{if(this.hasPermissionValidationFunction(s)){let n=this.permissionsSource.value[s].validationFunction,r=c({},this.permissionsSource.value);return a(null).pipe(y(()=>n(s,r)),F(o=>A(o)?a(o):o),M(()=>a(!1)))}return a(!!this.permissionsSource.value[s])});return d(i).pipe(w(),P(s=>s!==!1,!1),y(s=>s!==!1)).toPromise().then(s=>s)}hasPermissionValidationFunction(e){return!!this.permissionsSource.value[e]&&!!this.permissionsSource.value[e].validationFunction&&h(this.permissionsSource.value[e].validationFunction)}static{this.\u0275fac=function(i){return new(i||t)(u(B),u(se))}}static{this.\u0275prov=m({token:t,factory:t.\u0275fac})}}return t})(),R=class{constructor(){this.rolesSource=new l({}),this.roles$=this.rolesSource.asObservable()}},$=new v("USE_ROLES_STORE"),D=(()=>{class t{constructor(e=!1,i,s){this.isolate=e,this.rolesStore=i,this.permissionsService=s,this.rolesSource=this.isolate?new l({}):this.rolesStore.rolesSource,this.roles$=this.rolesSource.asObservable()}addRole(e,i){let s=x(c({},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=c({},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=T(e),Promise.all([this.hasRoleKey(e),this.hasRolePermission(this.rolesSource.value,e)]).then(([s,n])=>s||n))}hasRoleKey(e){let i=e.map(s=>{if(!!this.rolesSource.value[s]&&!!this.rolesSource.value[s].validationFunction&&h(this.rolesSource.value[s].validationFunction)&&!te(this.rolesSource.value[s].validationFunction)){let r=this.rolesSource.value[s].validationFunction,o=c({},this.rolesSource.value);return a(null).pipe(y(()=>r(s,o)),F(p=>A(p)?a(p):p),M(()=>a(!1)))}return a(!1)});return d(i).pipe(w(),P(s=>s!==!1,!1),y(s=>s!==!1)).toPromise().then(s=>s)}hasRolePermission(e,i){return d(i).pipe(g(s=>e[s]&&Array.isArray(e[s].validationFunction)?d(e[s].validationFunction).pipe(g(n=>this.permissionsService.hasPermission(n)),G(n=>n===!0)):a(!1)),P(s=>s===!0,!1)).toPromise()}static{this.\u0275fac=function(i){return new(i||t)(u($),u(R),u(S))}}static{this.\u0275prov=m({token:t,factory:t.\u0275fac})}}return t})(),Pe=(()=>{class t{constructor(){this.permissionsAuthorized=new C,this.permissionsUnauthorized=new C,this.firstMergeUnusedRun=1,this.permissionsService=f(S),this.configurationService=f(k),this.rolesService=f(D),this.viewContainer=f(Y),this.changeDetector=f(X),this.templateRef=f(J)}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;I(this.permissionsService.permissions$,this.rolesService.roles$).pipe(z(this.firstMergeUnusedRun),H(1)).subscribe(()=>{if(E(this.ngxPermissionsExcept)){this.validateExceptAndOnlyPermissions();return}if(E(this.ngxPermissionsOnly)){this.validateOnlyPermissions();return}this.handleAuthorisedPermission(this.getAuthorisedTemplates())})}}ngOnDestroy(){this.initPermissionSubscription&&this.initPermissionSubscription.unsubscribe()}validateExceptOnlyPermissions(){return I(this.permissionsService.permissions$,this.rolesService.roles$).pipe(z(this.firstMergeUnusedRun)).subscribe(()=>{if(E(this.ngxPermissionsExcept)){this.validateExceptAndOnlyPermissions();return}if(E(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(!(A(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(!(A(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(h(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===O.SHOW){this.showTemplateBlockInView(this.templateRef);return}if(e===O.REMOVE){this.viewContainer.clear();return}let i=this.configurationService.getStrategy(e);this.showTemplateBlockInView(this.templateRef),i(this.templateRef)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=Q({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"},standalone:!1,features:[K]})}}return t})(),re="default";var _=(()=>{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:{},n=this.transformPermission(s,e,i);return this.isParameterAvailable(n.except)?this.passingExceptPermissionsValidation(n,e,i):this.isParameterAvailable(n.only)?this.passingOnlyPermissionsValidation(n,e,i):!0}transformPermission(e,i,s){let n=h(e.only)?e.only(i,s):T(e.only),r=h(e.except)?e.except(i,s):T(e.except),o=e.redirectTo;return{only:n,except:r,redirectTo:o}}isParameterAvailable(e){return!!e&&e.length>0}passingExceptPermissionsValidation(e,i,s){if(e.redirectTo&&(h(e.redirectTo)||V(e.redirectTo)&&!this.isRedirectionWithParameters(e.redirectTo))){let n="";return d(e.except).pipe(g(r=>b([this.permissionsService.hasPermission(r),this.rolesService.hasOnlyRoles(r)]).pipe(j(o=>{o.every(U=>U===!1)||(n=r)}))),P(r=>r.some(o=>o===!0),!1),g(r=>n?(this.handleRedirectOfFailedPermission(e,n,i,s),a(!1)):!r&&e.only?this.onlyRedirectCheck(e,i,s):a(!r))).toPromise()}return Promise.all([this.permissionsService.hasPermission(e.except),this.rolesService.hasOnlyRoles(e.except)]).then(([n,r])=>n||r?(e.redirectTo&&this.redirectToAnotherRoute(e.redirectTo,i,s),!1):e.only?this.checkOnlyPermissions(e,i,s):!0)}redirectToAnotherRoute(e,i,s,n){let r=h(e)?e(n,i,s):e;if(this.isRedirectionWithParameters(r)){r.navigationCommands=this.transformNavigationCommands(r.navigationCommands,i,s),r.navigationExtras=this.transformNavigationExtras(r.navigationExtras,i,s),this.router.navigate(r.navigationCommands,r.navigationExtras);return}Array.isArray(r)?this.router.navigate(r):this.router.navigate([r])}isRedirectionWithParameters(e){return V(e)&&(!!e.navigationCommands||!!e.navigationExtras)}transformNavigationCommands(e,i,s){return h(e)?e(i,s):e}transformNavigationExtras(e,i,s){return h(e)?e(i,s):e}onlyRedirectCheck(e,i,s){let n="";return d(e.only).pipe(g(r=>b([this.permissionsService.hasPermission(r),this.rolesService.hasOnlyRoles(r)]).pipe(j(o=>{o.every(U=>U===!1)&&(n=r)}))),P(r=>h(e.redirectTo)?r.some(o=>o===!0):r.every(o=>o===!1),!1),g(r=>h(e.redirectTo)?r?a(!0):(this.handleRedirectOfFailedPermission(e,n,i,s),a(!1)):(n&&this.handleRedirectOfFailedPermission(e,n,i,s),a(!r)))).toPromise()}handleRedirectOfFailedPermission(e,i,s,n){this.isFailedPermissionPropertyOfRedirectTo(e,i)?this.redirectToAnotherRoute(e.redirectTo[i],s,n,i):h(e.redirectTo)?this.redirectToAnotherRoute(e.redirectTo,s,n,i):this.redirectToAnotherRoute(e.redirectTo[re],s,n,i)}isFailedPermissionPropertyOfRedirectTo(e,i){return!!e.redirectTo&&e.redirectTo[i]}checkOnlyPermissions(e,i,s){let n=c({},e);return Promise.all([this.permissionsService.hasPermission(n.only),this.rolesService.hasOnlyRoles(n.only)]).then(([r,o])=>r||o?!0:(n.redirectTo&&this.redirectToAnotherRoute(n.redirectTo,i,s),!1))}passingOnlyPermissionsValidation(e,i,s){return h(e.redirectTo)||V(e.redirectTo)&&!this.isRedirectionWithParameters(e.redirectTo)?this.onlyRedirectCheck(e,i,s):this.checkOnlyPermissions(e,i,s)}static{this.\u0275fac=function(i){return new(i||t)(u(S),u(D),u(Z))}}static{this.\u0275prov=m({token:t,factory:t.\u0275fac})}}return t})();var pe=(()=>{class t{static forRoot(e={}){return{ngModule:t,providers:[se,R,ee,S,_,D,k,{provide:B,useValue:e.permissionsIsolate},{provide:$,useValue:e.rolesIsolate},{provide:N,useValue:e.configurationIsolate}]}}static forChild(e={}){return{ngModule:t,providers:[{provide:B,useValue:e.permissionsIsolate},{provide:$,useValue:e.rolesIsolate},{provide:N,useValue:e.configurationIsolate},k,S,D,_]}}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275mod=q({type:t})}static{this.\u0275inj=L({})}}return t})();export{S as a,Pe as b,pe as c};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as mt}from"./chunk-PW42BQIY.js";import{ja as dt}from"./chunk-
|
|
1
|
+
import{c as mt}from"./chunk-PW42BQIY.js";import{ja as dt}from"./chunk-B7KTCPKC.js";import{a as We,b as ut,i as at}from"./chunk-66YHNWRR.js";function L(){}var Ge=e=>e;function pt(e,t){for(let n in t)e[n]=t[n];return e}function Mt(e){return e()}function Y(e){e.forEach(Mt)}function Ye(e){return typeof e=="function"}function oe(e,t){return e!=e?t==t:e!==t}function Ot(e){return Object.keys(e).length===0}function Rt(e,...t){if(e==null)return L;let n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}function me(e,t,n){e.$$.on_destroy.push(Rt(t,n))}function Ce(e){return e&&Ye(e.destroy)?e.destroy:L}var Qe=()=>globalThis.performance.now(),xe=e=>requestAnimationFrame(e),he=new Set;function Et(e){he.forEach(t=>{t.c(e)||(he.delete(t),t.f())}),he.size!==0&&xe(Et)}function et(e){let t;return he.size===0&&xe(Et),{promise:new Promise(n=>{he.add(t={c:e,f:n})}),abort(){he.delete(t)}}}function ge(e,t){e.appendChild(t)}function P(e,t,n){e.insertBefore(t,n||null)}function S(e){e.parentNode.removeChild(e)}function C(e){return document.createElement(e)}function At(e){return document.createTextNode(e)}function Ee(){return At("")}function N(e,t,n,i){return e.addEventListener(t,n,i),()=>e.removeEventListener(t,n,i)}function I(e,t,n){n==null?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function E(e,t,n,i){n===null?e.style.removeProperty(t):e.style.setProperty(t,n)}function R(e,t,n){e.classList[n?"add":"remove"](t)}function Nt(e,t,n=!1){let i=document.createEvent("CustomEvent");return i.initCustomEvent(e,n,!1,t),i}var pe,tt=0,Ze={};function $t(e,t,n,i,o,r,s,c=0){let l=16.666/i,f=`{
|
|
2
2
|
`;for(let a=0;a<=1;a+=l){let p=t+(n-t)*r(a);f+=a*100+`%{${s(p,1-p)}}
|
|
3
3
|
`}let d=f+`100% {${s(n,1-n)}}
|
|
4
4
|
}`,u=`_bp_${Math.round(Math.random()*1e9)}_${c}`;if(!Ze[u]){if(!pe){let a=C("style");document.head.appendChild(a),pe=a.sheet}Ze[u]=!0,pe.insertRule(`@keyframes ${u} ${d}`,pe.cssRules.length)}let h=e.style.animation||"";return e.style.animation=`${h?`${h}, `:""}${u} ${i}ms linear ${o}ms 1 both`,tt+=1,u}function qe(e,t){e.style.animation=(e.style.animation||"").split(", ").filter(t?n=>n.indexOf(t)<0:n=>n.indexOf("_bp")===-1).join(", "),t&&!--tt&&Yt()}function Yt(){xe(()=>{if(tt)return;let e=pe.cssRules.length;for(;e--;)pe.deleteRule(e);Ze={}})}var nt;function Ie(e){nt=e}var ze=[],ht=[],Oe=[],gt=[],Xt=Promise.resolve(),je=!1;function Wt(){je||(je=!0,Xt.then(Ct))}function ee(e){Oe.push(e)}var Fe=new Set,Le=0;function Ct(){let e=nt;do{for(;Le<ze.length;){let t=ze[Le];Le++,Ie(t),Ft(t.$$)}for(Ie(null),ze.length=0,Le=0;ht.length;)ht.pop()();for(let t=0;t<Oe.length;t+=1){let n=Oe[t];Fe.has(n)||(Fe.add(n),n())}Oe.length=0}while(ze.length);for(;gt.length;)gt.pop()();je=!1,Fe.clear(),Ie(e)}function Ft(e){if(e.fragment!==null){e.update(),Y(e.before_update);let t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(ee)}}var Te;function Dt(){return Te||(Te=Promise.resolve(),Te.then(()=>{Te=null})),Te}function Ae(e,t,n){e.dispatchEvent(Nt(`${t?"intro":"outro"}${n}`))}var Re=new Set,U;function te(){U={r:0,c:[],p:U}}function ne(){U.r||Y(U.c),U=U.p}function v(e,t){e&&e.i&&(Re.delete(e),e.i(t))}function $(e,t,n,i){if(e&&e.o){if(Re.has(e))return;Re.add(e),U.c.push(()=>{Re.delete(e),i&&(n&&e.d(1),i())}),e.o(t)}}var Pt={duration:0};function St(e,t,n){let i=t(e,n),o=!1,r,s,c=0;function l(){r&&qe(e,r)}function f(){let{delay:u=0,duration:h=300,easing:a=Ge,tick:p=L,css:g}=i||Pt;g&&(r=$t(e,0,1,h,u,a,g,c++)),p(0,1);let k=Qe()+u,H=k+h;s&&s.abort(),o=!0,ee(()=>Ae(e,!0,"start")),s=et(X=>{if(o){if(X>=H)return p(1,0),Ae(e,!0,"end"),l(),o=!1;if(X>=k){let y=a((X-k)/h);p(y,1-y)}}return o})}let d=!1;return{start(){d||(d=!0,qe(e),Ye(i)?(i=i(),Dt().then(f)):f())},invalidate(){d=!1},end(){o&&(l(),o=!1)}}}function _e(e,t,n){let i=t(e,n),o=!0,r,s=U;s.r+=1;function c(){let{delay:l=0,duration:f=300,easing:d=Ge,tick:u=L,css:h}=i||Pt;h&&(r=$t(e,1,0,f,l,d,h));let a=Qe()+l,p=a+f;ee(()=>Ae(e,!1,"start")),et(g=>{if(o){if(g>=p)return u(0,1),Ae(e,!1,"end"),--s.r||Y(s.c),!1;if(g>=a){let k=d((g-a)/f);u(1-k,k)}}return o})}return Ye(i)?Dt().then(()=>{i=i(),c()}):c(),{end(l){l&&i.tick&&i.tick(1,0),o&&(r&&qe(e,r),o=!1)}}}function ke(e){e&&e.c()}function re(e,t,n,i){let{fragment:o,on_mount:r,on_destroy:s,after_update:c}=e.$$;o&&o.m(t,n),i||ee(()=>{let l=r.map(Mt).filter(Ye);s?s.push(...l):Y(l),e.$$.on_mount=[]}),c.forEach(ee)}function se(e,t){let n=e.$$;n.fragment!==null&&(Y(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function Bt(e,t){e.$$.dirty[0]===-1&&(ze.push(e),Wt(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function De(e,t,n,i,o,r,s,c=[-1]){let l=nt;Ie(e);let f=e.$$={fragment:null,ctx:null,props:r,update:L,not_equal:o,bound:{},on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(l?l.$$.context:[])),callbacks:{},dirty:c,skip_bound:!1,root:t.target||l.$$.root};s&&s(f.root);let d=!1;f.ctx=n?n(e,t.props||{},(u,h,...a)=>{let p=a.length?a[0]:h;return f.ctx&&o(f.ctx[u],f.ctx[u]=p)&&(!f.skip_bound&&f.bound[u]&&f.bound[u](p),d&&Bt(e,u)),h}):[],f.update(),d=!0,Y(f.before_update),f.fragment=i?i(f.ctx):!1,t.target&&(f.fragment&&f.fragment.c(),re(e,t.target,t.anchor,t.customElement),Ct()),Ie(l)}var ie=class{$destroy(){se(this,1),this.$destroy=L}$on(t,n){let i=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return i.push(n),()=>{let o=i.indexOf(n);o!==-1&&i.splice(o,1)}}$set(t){this.$$set&&!Ot(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}};function it(e){let t=e-1;return t*t*t+1}function V(e,{delay:t=0,duration:n=400,easing:i=it,x:o=0,y:r=0,opacity:s=0}={}){let c=getComputedStyle(e),l=+c.opacity,f=c.transform==="none"?"":c.transform,d=l*(1-s);return{delay:t,duration:n,easing:i,css:(u,h)=>`
|