marketplacepos 5.43.2 → 5.43.4
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-DV6CR4ON.js → chunk-227LB3XT.js} +1 -1
- package/Marketplace/chunk-2CBZOVID.js +1 -0
- package/Marketplace/{chunk-EWP765EH.js → chunk-2EOAYJGX.js} +1 -1
- package/Marketplace/{chunk-F4H4L2MZ.js → chunk-2IDDYNBR.js} +1 -1
- package/Marketplace/{chunk-LS372KQR.js → chunk-2YTIJJIP.js} +1 -1
- package/Marketplace/{chunk-AG6WVG43.js → chunk-32WYK3BN.js} +1 -1
- package/Marketplace/{chunk-GFZNLP7T.js → chunk-3ASK736S.js} +1 -1
- package/Marketplace/{chunk-SXLKJLAE.js → chunk-3BT5DR3X.js} +1 -1
- package/Marketplace/{chunk-SIYMMMKQ.js → chunk-3LRWABHB.js} +1 -1
- package/Marketplace/{chunk-WBH4HJM5.js → chunk-3NMM37H7.js} +1 -1
- package/Marketplace/chunk-43XFDAKY.js +1 -0
- package/Marketplace/chunk-53FUEOBJ.js +1 -0
- package/Marketplace/chunk-5DODHGO5.js +1 -0
- package/Marketplace/{chunk-CNAOOCHA.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-AEMYBJSZ.js → chunk-5TIGE5UP.js} +8 -8
- package/Marketplace/{chunk-QG5FNL4B.js → chunk-64IHCPTX.js} +1 -1
- package/Marketplace/chunk-66MLRB2J.js +5 -0
- package/Marketplace/{chunk-N2NHN3VW.js → chunk-67N4UGA5.js} +1 -1
- package/Marketplace/{chunk-SLZOAGEK.js → chunk-6FY74YFQ.js} +1 -1
- package/Marketplace/{chunk-PAUX3XL6.js → chunk-6LN62T32.js} +1 -1
- package/Marketplace/{chunk-PLKN56KI.js → chunk-6QYD6NIJ.js} +1 -1
- package/Marketplace/{chunk-7YWCBMKG.js → chunk-6W6DKFRE.js} +1 -1
- package/Marketplace/{chunk-U5DJKOE4.js → chunk-722SRHLY.js} +1 -1
- package/Marketplace/{chunk-ODP5RBKW.js → chunk-74FAXIJ6.js} +1 -1
- package/Marketplace/{chunk-WHZ44BAL.js → chunk-74IXJYWO.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-NUGAU26U.js → chunk-7UWULSSK.js} +1 -1
- package/Marketplace/{chunk-X2RRI4VD.js → chunk-7ZXNQAAU.js} +1 -1
- package/Marketplace/{chunk-SLQA5QBT.js → chunk-A4BNLR77.js} +1 -1
- package/Marketplace/chunk-ADDTLV5D.js +2 -0
- 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-IUE63ICJ.js → chunk-BFU7VKO3.js} +1 -1
- package/Marketplace/chunk-BLXMX3JN.js +1 -0
- package/Marketplace/{chunk-F2Z5B5F7.js → chunk-BTHDOSGS.js} +1 -1
- package/Marketplace/{chunk-HV6V6JHY.js → chunk-C4XFI4J7.js} +1 -1
- package/Marketplace/{chunk-ZYOC4667.js → chunk-CATX24UZ.js} +1 -1
- package/Marketplace/{chunk-HSKNABGC.js → chunk-CIIO2CJ6.js} +1 -1
- package/Marketplace/{chunk-QUKSBWYY.js → chunk-CLER2MX6.js} +1 -1
- package/Marketplace/{chunk-HPYTL6TX.js → chunk-CMTBBXR5.js} +1 -1
- package/Marketplace/{chunk-JRWFZQ5K.js → chunk-CROPN4YC.js} +1 -1
- package/Marketplace/chunk-CSBEB66Y.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-O52OUAO2.js → chunk-DYWTLXMP.js} +1 -1
- package/Marketplace/{chunk-WGXUKTYP.js → chunk-E3ROEHBW.js} +1 -1
- package/Marketplace/{chunk-W2T2IE6B.js → chunk-E6XWD6WX.js} +1 -1
- package/Marketplace/{chunk-VRI3CYGG.js → chunk-ECRWEMEV.js} +1 -1
- package/Marketplace/{chunk-IUXKVT25.js → chunk-EH6HWI3G.js} +1 -1
- package/Marketplace/{chunk-GOH4NFHB.js → chunk-EK4VKN7N.js} +1 -1
- package/Marketplace/{chunk-E2CS7ZMC.js → chunk-EPVCMYCI.js} +1 -1
- package/Marketplace/{chunk-VB4FJ2II.js → chunk-FNEDIIIS.js} +1 -1
- package/Marketplace/chunk-FTGUKCA5.js +1 -0
- package/Marketplace/chunk-G47XGOST.js +1 -0
- package/Marketplace/{chunk-JTOYNS32.js → chunk-G6X5CZ34.js} +1 -1
- package/Marketplace/{chunk-ZWBIPCRI.js → chunk-GA7T6FWT.js} +1 -1
- package/Marketplace/{chunk-O7ADIUFO.js → chunk-GS3A2D4O.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-2IBGS5NP.js → chunk-H3J5OAIG.js} +1 -1
- package/Marketplace/{chunk-FQPTE3NE.js → chunk-H4OBICY5.js} +1 -1
- package/Marketplace/{chunk-TNKPTRB3.js → chunk-HYJVHRMN.js} +1 -1
- package/Marketplace/{chunk-JV4MMNGD.js → chunk-IA6KOBDJ.js} +1 -1
- package/Marketplace/chunk-IGXU4VAO.js +1 -0
- package/Marketplace/{chunk-2TZBEYNY.js → chunk-IL5JIRWJ.js} +1 -1
- package/Marketplace/chunk-IRK2APYZ.js +1 -0
- package/Marketplace/chunk-ISRFFTGW.js +1 -0
- package/Marketplace/{chunk-MQXPOHBV.js → chunk-J2KWRDVH.js} +1 -1
- package/Marketplace/{chunk-6LH7FSOW.js → chunk-JDIBETL5.js} +1 -1
- package/Marketplace/chunk-JFUCAI5X.js +1 -0
- package/Marketplace/{chunk-QNVCH6O7.js → chunk-JHEGROJF.js} +1 -1
- package/Marketplace/{chunk-CQP2B2TM.js → chunk-JILE74BG.js} +1 -1
- package/Marketplace/{chunk-EH44DQPL.js → chunk-JTIFX4RL.js} +2 -2
- package/Marketplace/chunk-JWARXDWM.js +1 -0
- package/Marketplace/{chunk-4M63ID5T.js → chunk-JXSBFTQM.js} +1 -1
- package/Marketplace/{chunk-SZECT5VQ.js → chunk-K2GYNGBL.js} +1 -1
- package/Marketplace/chunk-KDEVWOVI.js +1 -0
- package/Marketplace/{chunk-XEMNZHW6.js → chunk-L7K5HOBY.js} +1 -1
- package/Marketplace/{chunk-25OT4I3W.js → chunk-LA6B2JGP.js} +1 -1
- package/Marketplace/chunk-LUVP4A3V.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-TCR2MYFZ.js → chunk-M5JQ7BGW.js} +1 -1
- package/Marketplace/{chunk-4CWRB5AG.js → chunk-M5XGP4SG.js} +1 -1
- package/Marketplace/{chunk-KX5AWR75.js → chunk-M7NQID2Z.js} +1 -1
- package/Marketplace/{chunk-USOWXH7U.js → chunk-MHCAI6KP.js} +1 -1
- package/Marketplace/chunk-MQD5HJA6.js +5 -0
- package/Marketplace/{chunk-AQ6ECUX3.js → chunk-MQQD4OJO.js} +1 -1
- package/Marketplace/{chunk-ZNDU44GH.js → chunk-NS46QSCM.js} +1 -1
- package/Marketplace/{chunk-KWQS4KX7.js → chunk-OAOQONOA.js} +1 -1
- package/Marketplace/{chunk-UF26HAKV.js → chunk-OC2FBL33.js} +1 -1
- package/Marketplace/{chunk-RM6R233Y.js → chunk-OLOIQI4D.js} +1 -1
- package/Marketplace/{chunk-KPW2PAKY.js → chunk-ONLHWPKX.js} +1 -1
- package/Marketplace/chunk-ORD5Z4XI.js +1 -0
- package/Marketplace/{chunk-UO4C5CL2.js → chunk-P42VFND7.js} +1 -1
- package/Marketplace/{chunk-KXS76PRS.js → chunk-PAEIUO2F.js} +1 -1
- package/Marketplace/{chunk-AP4EF2UL.js → chunk-PFB7XEYZ.js} +1 -1
- package/Marketplace/{chunk-IKPRRD5D.js → chunk-PFIBU2IX.js} +1 -1
- package/Marketplace/{chunk-W74FHQHW.js → chunk-PP3PVKNQ.js} +1 -1
- package/Marketplace/{chunk-5C44SGF2.js → chunk-PVY6MYHG.js} +1 -1
- package/Marketplace/{chunk-37J5GG7B.js → chunk-Q2U3MMNW.js} +1 -1
- package/Marketplace/{chunk-BXOEDDVZ.js → chunk-Q6TBOHRA.js} +1 -1
- package/Marketplace/{chunk-Y4M43RCV.js → chunk-QWHPQWPM.js} +1 -1
- package/Marketplace/chunk-R4GAF5EA.js +1 -0
- package/Marketplace/{chunk-GZXQUJKX.js → chunk-RECNBAEB.js} +1 -1
- package/Marketplace/{chunk-YSRNSXDO.js → chunk-RMCAWPWK.js} +1 -1
- package/Marketplace/{chunk-ANNMHZZT.js → chunk-RZU7PSKG.js} +1 -1
- package/Marketplace/chunk-S2HNMEC2.js +1 -0
- package/Marketplace/chunk-S5SDX7ZG.js +3 -0
- package/Marketplace/{chunk-NTW6FBP5.js → chunk-SB7NWPDS.js} +1 -1
- package/Marketplace/{chunk-F4GMWHYJ.js → chunk-SM3P57SO.js} +1 -1
- package/Marketplace/{chunk-WLKXZBL7.js → chunk-SN4AOGQK.js} +1 -1
- package/Marketplace/{chunk-VHALYIP4.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-T6SBAKYS.js +1 -0
- package/Marketplace/{chunk-FIJNFHLO.js → chunk-UDIDZKN6.js} +1 -1
- package/Marketplace/{chunk-UF4FKEE7.js → chunk-UEPQYAWE.js} +1 -1
- package/Marketplace/{chunk-W2JHOFCS.js → chunk-UWIHXA2S.js} +1 -1
- package/Marketplace/{chunk-2BUABOHG.js → chunk-V5BKQSAT.js} +1 -1
- package/Marketplace/{chunk-KYIY3VQ6.js → chunk-VIMB2VWB.js} +1 -1
- package/Marketplace/{chunk-4OE3MMMX.js → chunk-VKMFDXJJ.js} +1 -1
- package/Marketplace/chunk-VYIEJVSJ.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-CYWMBHSL.js → chunk-WW22F76D.js} +1 -1
- package/Marketplace/{chunk-GHBGGQNM.js → chunk-XUL4LU4R.js} +1 -1
- package/Marketplace/chunk-Y2QG7YNG.js +2 -0
- package/Marketplace/chunk-YB65PX7S.js +1 -0
- package/Marketplace/{chunk-HFKKITEW.js → chunk-YCH6HHU3.js} +1 -1
- package/Marketplace/{chunk-CZTCB6IN.js → chunk-YHKEECJR.js} +1 -1
- package/Marketplace/{chunk-2N2I6BF2.js → chunk-YMMOJKVP.js} +1 -1
- package/Marketplace/{chunk-PFUTB4ID.js → chunk-YRFZDTXH.js} +1 -1
- package/Marketplace/{chunk-WDF2BOO6.js → chunk-YT3P3EBI.js} +1 -1
- package/Marketplace/{chunk-K2AEH6J2.js → chunk-YUCD4HRB.js} +1 -1
- package/Marketplace/{chunk-CZVDXGFV.js → chunk-YZKPQRLO.js} +1 -1
- package/Marketplace/chunk-ZHZMT7GZ.js +1 -0
- package/Marketplace/index.html +2 -2
- package/Marketplace/main-ZMGZIM3D.js +1 -0
- package/package.json +1 -1
- package/Marketplace/chunk-2OBP7IGO.js +0 -1
- package/Marketplace/chunk-2SCFZLQO.js +0 -1
- package/Marketplace/chunk-2YV6WOL3.js +0 -1
- package/Marketplace/chunk-2ZTDLZVZ.js +0 -1
- package/Marketplace/chunk-36RDOY5Y.js +0 -2
- package/Marketplace/chunk-3FHLYPLG.js +0 -5
- package/Marketplace/chunk-4K4ZKRRO.js +0 -1
- package/Marketplace/chunk-4MOAWEAS.js +0 -1
- package/Marketplace/chunk-6ZS2L5PN.js +0 -2
- package/Marketplace/chunk-AROCRZ77.js +0 -1
- package/Marketplace/chunk-CKPC5U5G.js +0 -1
- package/Marketplace/chunk-DJILLV4M.js +0 -1
- package/Marketplace/chunk-ETSGUVUY.js +0 -1
- package/Marketplace/chunk-GJBLRYGL.js +0 -1
- package/Marketplace/chunk-JBRMFKFP.js +0 -1
- package/Marketplace/chunk-KM7AK6CM.js +0 -1
- package/Marketplace/chunk-KSJM72K6.js +0 -2
- package/Marketplace/chunk-LUKM5MU6.js +0 -4
- package/Marketplace/chunk-OQZUWV6H.js +0 -1
- package/Marketplace/chunk-POYJI64B.js +0 -1
- package/Marketplace/chunk-R54A2XXE.js +0 -1
- package/Marketplace/chunk-SCDRAKE5.js +0 -1
- package/Marketplace/chunk-SJPCH5QW.js +0 -1
- package/Marketplace/chunk-SXWLDBET.js +0 -1
- package/Marketplace/chunk-TTKODGQ5.js +0 -3
- package/Marketplace/chunk-TV4AND7E.js +0 -1
- package/Marketplace/chunk-VHON4PKV.js +0 -1
- package/Marketplace/chunk-YXWPKMEG.js +0 -1
- package/Marketplace/main-2VAZARFN.js +0 -1
|
@@ -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-HSKNABGC.js";import{a as Lt}from"./chunk-4CWRB5AG.js";import{b as Vt}from"./chunk-2IBGS5NP.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-QUKSBWYY.js";import{A as yt,a as ht,c as ft,h as vt,m as _t}from"./chunk-PLKN56KI.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{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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as o}from"./chunk-227LB3XT.js";import{a as s,b as l}from"./chunk-HYJVHRMN.js";import"./chunk-S5SDX7ZG.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-TGMCGROM.js";import"./chunk-V3NCYRCF.js";import"./chunk-PW42BQIY.js";import"./chunk-SWQXSJ7O.js";import"./chunk-AEOSNAHH.js";import"./chunk-JXSBFTQM.js";import"./chunk-K5XRGNWG.js";import"./chunk-ATZ475FN.js";import"./chunk-YCH6HHU3.js";import"./chunk-B73M3AMU.js";import{F as c,J as d}from"./chunk-M2FCTYGU.js";import{Gb as a,Yb as i,ic as p,jc as m,kc as n,rb as r}from"./chunk-B7KTCPKC.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";var f=(()=>{class t{constructor(){this.tabs=[{Title:"Origin Order API",Url:"/menu/json-api/order-api"},{Title:"Origin Product API",Url:"/menu/json-api/product-api"},{Title:"Origin Escrow API",Url:"/menu/json-api/escrow-api"}]}static{this.\u0275fac=function(e){return new(e||t)}}static{this.\u0275cmp=a({type:t,selectors:[["app-json-api"]],decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(e,v){e&1&&(p(0,"nav",0)(1,"div",1)(2,"div"),n(3,"nav-tab",2),m()()(),n(4,"router-outlet")),e&2&&(r(3),i("Tabs",v.tabs))},dependencies:[l,s,d,c],encapsulation:2})}}return t})(),g=[{path:"",component:f,children:[{path:"",redirectTo:"order-api",pathMatch:"full"},{path:"order-api",loadComponent(){return import("./chunk-2CBZOVID.js").then(t=>t.OrderApiComponent)},canActivate:[o],data:{title:"Order API"}},{path:"product-api",loadComponent(){return import("./chunk-T6SBAKYS.js").then(t=>t.ProductApiComponent)},canActivate:[o],data:{title:"Product API"}},{path:"escrow-api",loadComponent(){return import("./chunk-JFUCAI5X.js").then(t=>t.EscrowApiComponent)},canActivate:[o],data:{title:"Escrow API"}}]}];export{f as JsonApiComponent,g as routes};
|
|
@@ -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.4",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{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)=>`
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as Y}from"./chunk-CATX24UZ.js";import"./chunk-S5SDX7ZG.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-TGMCGROM.js";import{a as H}from"./chunk-V3NCYRCF.js";import"./chunk-5JVEEL2T.js";import"./chunk-PW42BQIY.js";import"./chunk-SWQXSJ7O.js";import"./chunk-AEOSNAHH.js";import{e as F}from"./chunk-JXSBFTQM.js";import"./chunk-K5XRGNWG.js";import{m as J,n as G}from"./chunk-CLER2MX6.js";import{A as j,c as K,h as R,m as N,p as O}from"./chunk-6QYD6NIJ.js";import"./chunk-ATZ475FN.js";import"./chunk-YCH6HHU3.js";import"./chunk-B73M3AMU.js";import{g as T,j as W,l as D,n as U}from"./chunk-M2FCTYGU.js";import{$c as P,Gb as I,Gc as a,Hc as E,Kc as h,Lc as g,Mb as w,Mc as f,Nc as V,Oc as L,Pc as x,Ra as C,Yb as m,Z as b,ad as v,dc as k,ic as n,jc as i,kc as A,oc as _,pa as B,rb as d,tc as M,uc as u,ya as p,za as s}from"./chunk-B7KTCPKC.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";function q(o,S){if(o&1){let t=_();n(0,"input",30),f("ngModelChange",function(e){p(t);let r=u();return g(r.sku,e)||(r.sku=e),s(e)}),i()}if(o&2){let t=u();h("ngModel",t.sku)}}function z(o,S){if(o&1){let t=_();n(0,"input",31),f("ngModelChange",function(e){p(t);let r=u();return g(r.itemId,e)||(r.itemId=e),s(e)}),i()}if(o&2){let t=u();h("ngModel",t.itemId)}}function Q(o,S){if(o&1&&(n(0,"pre",28),a(1),P(2,"json"),i()),o&2){u();let t=x(35);d(),E(v(2,1,t))}}function X(o,S){o&1&&(n(0,"p",29),a(1," Your data will be shown here once it's available "),i())}var me=(()=>{class o{constructor(){this.httpService=B(F),this.selectedChannel=C(null),this.sku=C(null),this.itemId=C(null),this.searchBy="sku"}initProductLog(){let t={ChannelID:this.selectedChannel()};this.searchBy==="sku"?t.SKU=this.sku():t.ItemID=this.itemId(),this.productLog$=this.httpService.post(H.GetProductApiLog,t).pipe(b(1))}copyToClipboard(t){if(!t)return;let c=typeof t=="string"?t:JSON.stringify(t,null,2);navigator.clipboard.writeText(c),alert("Copied to clipboard!")}static{this.\u0275fac=function(c){return new(c||o)}}static{this.\u0275cmp=I({type:o,selectors:[["app-product-api"]],decls:50,vars:14,consts:[["headerTitle","Origin Product Api",3,"hideSearchBox","hideSearchDropdown"],[1,"btn","btn-success","btn-fill","me-3",3,"click"],[1,"fa","fa-search"],[1,"container-fluid","mt-8","px-10"],[1,"row"],[1,"col-7"],[1,"d-flex","align-items-center"],[1,"w-75"],[1,"mb-0","text-muted","fst-italic"],[1,"w-100"],[3,"ngModelChange","ngModel"],[1,"d-flex","align-items-center","mt-3"],[1,"mb-2"],[1,"form-check","form-check-inline"],["type","radio","name","searchBy","id","searchBySku",1,"form-check-input",3,"ngModelChange","ngModel","value"],["for","searchBySku",1,"form-check-label"],["type","radio","name","searchBy","id","searchByItemId",1,"form-check-input",3,"ngModelChange","ngModel","value"],["for","searchByItemId",1,"form-check-label"],["type","text","class","form-control","placeholder","Product Code / SKU",3,"ngModel","ngModelChange",4,"ngIf"],["type","text","class","form-control","placeholder","ItemID is Product id from seller center",3,"ngModel","ngModelChange",4,"ngIf"],[1,"row","mt-6"],[1,"col-12"],[1,"card"],[1,"card-header","d-flex","justify-content-between","align-items-center"],["type","button",1,"btn","btn-sm","btn-outline-primary",3,"click","disabled"],[1,"card-body"],[1,"col-sm-12"],[1,"form-group","position-relative"],["id","productLogText"],[1,"text-center","my-12","text-muted"],["type","text","placeholder","Product Code / SKU",1,"form-control",3,"ngModelChange","ngModel"],["type","text","placeholder","ItemID is Product id from seller center",1,"form-control",3,"ngModelChange","ngModel"]],template:function(c,e){if(c&1){let r=_();n(0,"mainpanel",0)(1,"actions")(2,"button",1),M("click",function(){return p(r),s(e.initProductLog())}),A(3,"i",2),a(4," Search "),i()(),n(5,"content")(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6)(10,"div",7)(11,"h6"),a(12,"Channel"),i(),n(13,"p",8),a(14," View logs related to Product API Detail "),i()(),n(15,"div",9)(16,"channel-select-options",10),f("ngModelChange",function(l){return p(r),g(e.selectedChannel,l)||(e.selectedChannel=l),s(l)}),i()()(),n(17,"div",11)(18,"div",7)(19,"h6"),a(20,"Product Code / SKU"),i(),n(21,"p",8),a(22," Product SKU or Code from Channel Product "),i()(),n(23,"div",9)(24,"div",12)(25,"div",13)(26,"input",14),f("ngModelChange",function(l){return p(r),g(e.searchBy,l)||(e.searchBy=l),s(l)}),i(),n(27,"label",15),a(28,"Search by SKU"),i()(),n(29,"div",13)(30,"input",16),f("ngModelChange",function(l){return p(r),g(e.searchBy,l)||(e.searchBy=l),s(l)}),i(),n(31,"label",17),a(32,"Search by ItemID"),i()()(),w(33,q,1,1,"input",18)(34,z,1,1,"input",19),i()()()(),V(35),P(36,"async"),n(37,"div",20)(38,"div",21)(39,"div",22)(40,"div",23)(41,"h5"),a(42,"Response"),i(),n(43,"button",24),M("click",function(){p(r);let l=x(35);return s(e.copyToClipboard(l))}),a(44," Copy "),i()(),n(45,"div",25)(46,"div",26)(47,"div",27),w(48,Q,3,3,"pre",28)(49,X,2,0,"p",29),i()()()()()()()()()}if(c&2){m("hideSearchBox",!0)("hideSearchDropdown",!0),d(16),h("ngModel",e.selectedChannel),d(10),h("ngModel",e.searchBy),m("value","sku"),d(4),h("ngModel",e.searchBy),m("value","itemid"),d(3),m("ngIf",e.searchBy==="sku"),d(),m("ngIf",e.searchBy==="itemid"),d();let r=L(v(36,11,e.productLog$));d(8),m("disabled",!r),d(5),k(r?48:49)}},dependencies:[U,T,W,D,j,K,O,R,N,G,J,Y],encapsulation:2})}}return o})();export{me as ProductApiComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as bt}from"./chunk-
|
|
1
|
+
import{a as bt}from"./chunk-M5XGP4SG.js";import{b as xt}from"./chunk-H3J5OAIG.js";import{a as Ct}from"./chunk-J2KWRDVH.js";import{a as rt}from"./chunk-5DIRXS7I.js";import{b as lt}from"./chunk-PW42BQIY.js";import{a as mt,c as ct}from"./chunk-SWQXSJ7O.js";import{e as st}from"./chunk-JXSBFTQM.js";import{b as ut,c as gt,h as ht,j as ft,k as _t}from"./chunk-CLER2MX6.js";import{A as at,c as it,h as nt,m as ot}from"./chunk-6QYD6NIJ.js";import{r as pt,s as dt}from"./chunk-YCH6HHU3.js";import{g as V,i as et,m as L,n as R}from"./chunk-M2FCTYGU.js";import{$c as I,Fc as S,G as U,Gb as M,Gc as m,Hc as w,Ic as k,Jb as K,K as G,Ka as D,Kc as X,Lc as Z,Mb as u,Mc as tt,Oa as h,Ra as _,X as z,Yb as g,Z as J,ad as y,ca as W,cd as $,dc as P,ea as O,f as j,fa as Y,g as A,ic as r,ja as H,jc as l,kc as B,lc as T,mc as v,nc as Q,oa as q,oc as f,rb as a,rd as N,tc as C,uc as s,v as b,xb as E,ya as p,za as d}from"./chunk-B7KTCPKC.js";function Tt(e,c){e&1&&Q(0)}function vt(e,c){if(e&1&&(T(0),u(1,Tt,1,0,"ng-container",5),v()),e&2){s(2);let t=S(4);a(),g("ngTemplateOutlet",t)}}function wt(e,c){if(e&1&&(r(0,"div",6)(1,"label"),m(2,"Editing Data"),l(),r(3,"div")(4,"span"),m(5),I(6,"number"),l()()()),e&2){let t=s(2);a(5),w(y(6,1,t.value))}}function It(e,c){if(e&1&&(T(0),u(1,vt,2,1,"ng-container",4)(2,wt,7,3,"ng-template",null,1,$),v()),e&2){let t=S(3),i=s();a(),g("ngIf",i.hasPriceEdit)("ngIfElse",t)}}function yt(e,c){if(e&1){let t=f();r(0,"div",7)(1,"input",8),tt("ngModelChange",function(n){p(t);let o=s();return Z(o.value,n)||(o.value=n),d(n)}),l(),r(2,"label",9),m(3),l()()}if(e&2){let t=s();a(),X("ngModel",t.value),g("max",t.maxEditInventory),a(2),w(t.item.Table)}}var Ht=(()=>{class e{constructor(t,i,n){this.dialogRef=t,this.item=i,this.permissionService=n,this.maxEditInventory=1e5,this.permissionService.hasPermission(rt.PriceUpdate).then(o=>this.hasPriceEdit=o)}ngOnInit(){this.selectedChannel=this.item.Variant.Channel.find(t=>t.ChannelID==this.item.ChannelID),this.selectedChannel.ID=this.item.Variant.ID,this.selectedChannel.Sku=this.item.Variant.Code,this.item.Table=="inventory"?(this.value=this.selectedChannel.Inventory,this.maxEditInventory=this.selectedChannel?.TypeID==lt.Tokopedia?1e5:null):this.item.Table=="price"&&(this.value=this.selectedChannel.Price,this.maxEditInventory=null),this.selectedChannel.ItemName=this.item.Name,this.selectedChannel.VarName=this.item.Variant.Model,this.initModalConfig()}initModalConfig(){let t=this.item.Table=="inventory"?"Update Inventory":"Update Price";this.modalConfig=new ft,this.modalConfig.title=`${t} ${this.item?.Name} in ${this.selectedChannel?.Title}`}onSubmit(){this.item.Table=="inventory"?this.selectedChannel.Inventory=this.value:this.item.Table=="price"&&(this.selectedChannel.Price=this.value),this.dialogRef.close(this.selectedChannel)}onClose(){this.dialogRef.close()}static{this.\u0275fac=function(i){return new(i||e)(E(ut),E(gt),E(mt))}}static{this.\u0275cmp=M({type:e,selectors:[["app-table-dialog"]],decls:5,vars:4,consts:[["INVENTORY",""],["DISABLED",""],[3,"onClose","onCancel","onOk","dynamicValidated","config"],["content",""],[4,"ngIf","ngIfElse"],[4,"ngTemplateOutlet"],["matTooltipPosition","above","matTooltip","Cannot edit Unit Price because you dont have access ProductEditor role",1,"info-label-group","mt-3",2,"background","#e9ecef","opacity","1"],[1,"form-label-group","mt-3"],["type","text","name","edit","autoNum","",1,"form-control",3,"ngModelChange","ngModel","max"],["for","edit",1,"text-capitalize"]],template:function(i,n){if(i&1){let o=f();r(0,"modal-material",2),C("onClose",function(){return p(o),d(n.onClose())})("onCancel",function(){return p(o),d(n.onClose())})("onOk",function(){return p(o),d(n.onSubmit())}),r(1,"div",3),u(2,It,4,2,"ng-container",4)(3,yt,4,3,"ng-template",null,0,$),l()()}if(i&2){let o=S(4);g("dynamicValidated",n.value)("config",n.modalConfig),a(2),g("ngIf",n.item.Table=="price")("ngIfElse",o)}},dependencies:[R,V,et,L,ht,Ct,xt,bt,_t,at,it,nt,ot,ct,dt,pt],styles:["mat-form-field[_ngcontent-%COMP%]{width:100%;height:100%}.mat-dialog-title[_ngcontent-%COMP%]{margin-left:1rem;margin-right:1rem}.mat-dialog-content[_ngcontent-%COMP%]{padding-left:.5rem;padding-right:.5rem;margin-left:.5rem;margin-right:.5rem}.font-lg[_ngcontent-%COMP%]{font-size:large}.font-lgr[_ngcontent-%COMP%]{font-size:larger}"]})}}return e})();var Kt=(()=>{class e{transform(t,i,n=0){if(!t)return t;let o=i?parseInt(i,10):10;return t.length>o?t.substring(n,o)+"...":t}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275pipe=K({name:"stringLimit",type:e,pure:!0})}}return e})();function Nt(e,c){if(e&1){let t=f();r(0,"span",6),C("click",function(){p(t);let n=s();return d(n.onGetRowCount())}),r(1,"i",7),m(2,"?"),l()()}}function Dt(e,c){if(e&1&&(T(0),r(1,"span"),m(2),I(3,"number"),l(),v()),e&2){let t=s();a(2),w(y(3,1,t.rowCount()))}}function Et(e,c){if(e&1){let t=f();r(0,"a",10),C("click",function(){p(t);let n=s(2);return d(n.onNextPage())}),B(1,"i",11),m(2," Next"),l()}}function Mt(e,c){if(e&1){let t=f();r(0,"a",12),C("click",function(){p(t);let n=s(2);return d(n.onLastPage())}),B(1,"i",13),m(2," Last"),l()}}function St(e,c){if(e&1&&(r(0,"div",5),u(1,Et,3,0,"a",8)(2,Mt,3,0,"a",9),l()),e&2){let t=s();a(),P(t.disableNextButton()&&!t.goToLastPage()?1:-1),a(),P(t.disableNextButton()&&!t.goToLastPage()?2:-1)}}var ie=(()=>{class e{constructor(){this.totalData=h(0),this.rowCount=h(),this.pageNumber=h(),this.disableNextButton=h(),this.goToLastPage=h(),this.hideCount=h(),this.nextPage=new D,this.lastPage=new D,this.getRowCount=new D}onNextPage(){this.nextPage.emit()}onLastPage(){this.lastPage.emit()}onGetRowCount(){this.getRowCount.emit()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=M({type:e,selectors:[["infinite-paginator"]],inputs:{totalData:[1,"totalData"],rowCount:[1,"rowCount"],pageNumber:[1,"pageNumber"],disableNextButton:[1,"disableNextButton"],goToLastPage:[1,"goToLastPage"],hideCount:[1,"hideCount"]},outputs:{nextPage:"onNextPage",lastPage:"onLastPage",getRowCount:"onGetRowCount"},decls:9,vars:7,consts:[[1,"d-flex","justify-content-between","mt-5"],[1,"me-auto","d-sm-block","collapse","mt-3"],[1,"font-weight-bold","font-italic","hidden-xxs"],[2,"cursor","pointer"],[4,"ngIf"],[1,"btn-group"],[2,"cursor","pointer",3,"click"],["title","Retreive rows count",1,"border","p-3"],["role","button","title","Load more for 20 products",1,"btn","btn-outline-secondary","btn-sm","text-primary"],["role","button","title","Load all products",1,"btn","btn-outline-secondary","btn-sm","text-primary","border-start-0"],["role","button","title","Load more for 20 products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-arrow-right"],["role","button","title","Load all products",1,"btn","btn-outline-secondary","btn-sm","text-primary","border-start-0",3,"click"],[1,"fas","fa-share"]],template:function(i,n){i&1&&(r(0,"div",0)(1,"div",1)(2,"div",2),m(3),I(4,"number"),u(5,Nt,3,0,"span",3)(6,Dt,4,3,"ng-container",4),m(7),l()(),u(8,St,3,2,"div",5),l()),i&2&&(a(3),k(" Showing 1 - ",y(4,5,n.totalData())," of "),a(2),P(n.hideCount()?5:-1),a(),g("ngIf",!n.hideCount()&&n.rowCount()),a(),k(" records ~ ",n.pageNumber()," Page "),a(),P(n.totalData()>0?8:-1))},dependencies:[R,V,L],encapsulation:2})}}return e})();var se=(()=>{class e{constructor(t){this.http=t,this.pagination$=new A(null),this._pageNumber=_(1),this.pageNumber=N(()=>this._pageNumber()),this._hideCount=_(!0),this.hideCount=N(()=>this._hideCount()),this._disableNextButton=_(!0),this.disableNextButton=N(()=>this._disableNextButton()),this._goToLastPage=_(!1),this.isLastPage=N(()=>this._goToLastPage()),this.totalData=_(0),this.destroy$=new j,this.data$=this.paginationFunction()}onNextPage(t){t.PageNumber+=1,this.pagination$.next(t)}setPageNumberFooter(t){this._pageNumber.set(t.PageNumber)}setPaginationButtonState(t,i){i==0?this._disableNextButton.set(!0):this._disableNextButton.set(!(i<t.RowCount*t.PageNumber))}reloadPagination(t){t.PageNumber=1,this.pagination$.next(t),this._hideCount.set(!0),this._goToLastPage.set(!1)}onLastPage(t={}){let i=JSON.parse(JSON.stringify(t));this.totalRowCount$=this.http.post(`/api/${this.fethRowCountEndpoint}`,i).pipe(b(n=>n.Total),O(n=>{this._hideCount.set(!1),i.RowCount=n,i.PageNumber=1,this.pagination$.next(i),this._goToLastPage.set(!0)}))}paginationFunction(){return this.pagination$.pipe(W(this.destroy$),U(t=>t!=null),G(t=>this.http.post(`/API/${this.fetchDataEndpoint}`,JSON.stringify(t)).pipe(b(i=>i.Data?i.Data:[]))),Y(this.pagination$),z((t,i)=>{let[n,o]=t,[x]=i;return o.PageNumber==1?[x,o]:[n.concat(x),o]}),O(([t,i])=>{this.setPageNumberFooter(i);let n=this.calculateProductLength(t);this.totalData.set(n),this.setPaginationButtonState(i,n)}),b(([t])=>t),J())}getRowCount(t){this._hideCount.set(!1),this.totalRowCount$=this.http.post(`/API/${this.fethRowCountEndpoint}`,t).pipe(b(i=>i.Total))}calculateProductLength(t=[]){return t.reduce((n,o)=>n+(o.Variants?.length?o.Variants?.length:0),0)}static{this.\u0275fac=function(i){return new(i||e)(q(st))}}static{this.\u0275prov=H({token:e,factory:e.\u0275fac})}}return e})();export{Ht as a,Kt as b,ie as c,se as d};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as y}from"./chunk-
|
|
1
|
+
import{a as y}from"./chunk-ECRWEMEV.js";import{ba as g,ja as o}from"./chunk-LZCEM2PC.js";import{n as m}from"./chunk-M2FCTYGU.js";import{Ca as i,Gb as s,Hb as b,Kb as c,Qc as v,_b as u,ja as p,ka as r,pa as f,vc as d,wc as h}from"./chunk-B7KTCPKC.js";var $=["*"],x=({dt:l})=>`
|
|
2
2
|
.p-floatlabel {
|
|
3
3
|
display: block;
|
|
4
4
|
position: relative;
|