marketplacepos 3.14.1 → 3.15.1
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 +61 -61
- package/Marketplace/chunk-2AMEIUWK.js +1 -0
- package/Marketplace/{chunk-2LGY3VGP.js → chunk-2L5RCILV.js} +1 -1
- package/Marketplace/chunk-2NRYBLX2.js +1 -0
- package/Marketplace/chunk-3I25MNEJ.js +6 -0
- package/Marketplace/chunk-3TNPJNQS.js +4 -0
- package/Marketplace/{chunk-HXDXTE2F.js → chunk-4BPLZVXV.js} +1 -1
- package/Marketplace/chunk-4HOIRUEO.js +1 -0
- package/Marketplace/{chunk-FZ7LVL4C.js → chunk-4URWFKAM.js} +1 -1
- package/Marketplace/{chunk-VOWLO2M7.js → chunk-572KOLLQ.js} +1 -1
- package/Marketplace/{chunk-IYV3772A.js → chunk-5B6FNQOB.js} +1 -1
- package/Marketplace/chunk-5BU6HQXL.js +1 -0
- package/Marketplace/chunk-5NDG3SUM.js +1 -0
- package/Marketplace/{chunk-2YXHLXID.js → chunk-6NFPCNPI.js} +1 -1
- package/Marketplace/{chunk-KWFES5F7.js → chunk-6NTRXLMW.js} +1 -1
- package/Marketplace/{chunk-WXUKZFAH.js → chunk-75FMUZX2.js} +1 -1
- package/Marketplace/chunk-AAFEUTPF.js +1 -0
- package/Marketplace/chunk-AMUX4WZH.js +2 -0
- package/Marketplace/{chunk-V4UFHWKE.js → chunk-AUMUHIAD.js} +1 -1
- package/Marketplace/{chunk-JDKWQEVP.js → chunk-B4SCNDB5.js} +1 -1
- package/Marketplace/{chunk-OQWLBQEH.js → chunk-BV6WKJBP.js} +1 -1
- package/Marketplace/{chunk-RMD2ZXUN.js → chunk-C62XLEFW.js} +1 -1
- package/Marketplace/chunk-CHPESC5O.js +1 -0
- package/Marketplace/{chunk-MVPTQRFO.js → chunk-CTKEWRX4.js} +1 -1
- package/Marketplace/{chunk-R7MYFLXJ.js → chunk-DSDMENCN.js} +2 -2
- package/Marketplace/{chunk-RXRML6X2.js → chunk-DTNJ6LRO.js} +1 -1
- package/Marketplace/{chunk-J47B3BJQ.js → chunk-E3LCGTRI.js} +1 -1
- package/Marketplace/{chunk-5WXM6HSA.js → chunk-EEOWKNSQ.js} +8 -8
- package/Marketplace/{chunk-FELGHSYN.js → chunk-G7GU37FJ.js} +1 -1
- package/Marketplace/chunk-GOR2LPT5.js +1 -0
- package/Marketplace/chunk-GP6U42SV.js +1 -0
- package/Marketplace/{chunk-EKCNJX26.js → chunk-GXHE2CDH.js} +1 -1
- package/Marketplace/chunk-HSFUKC7R.js +8 -0
- package/Marketplace/chunk-IAYFW5AU.js +1 -0
- package/Marketplace/chunk-IG2LDANH.js +1 -0
- package/Marketplace/{chunk-IPYNDMGQ.js → chunk-IJAO5VS5.js} +1 -1
- package/Marketplace/{chunk-Z3E6ZJZB.js → chunk-JQZFTRSI.js} +1 -1
- package/Marketplace/chunk-JSPMPN5T.js +22 -0
- package/Marketplace/chunk-K4IJAE56.js +1 -0
- package/Marketplace/{chunk-VQUUMT5F.js → chunk-KGSUB5OH.js} +1 -1
- package/Marketplace/{chunk-RZ7FKABW.js → chunk-M4JG6342.js} +1 -1
- package/Marketplace/{chunk-KCFS3M2K.js → chunk-N366YXEY.js} +1 -1
- package/Marketplace/chunk-NEQN5BMS.js +15 -0
- package/Marketplace/{chunk-JTJLVSTV.js → chunk-O5FN3DLG.js} +1 -1
- package/Marketplace/chunk-OCG3HG72.js +1 -0
- package/Marketplace/{chunk-YZ42FKNJ.js → chunk-ONKOEBKR.js} +1 -1
- package/Marketplace/{chunk-FGYTQIJ5.js → chunk-OR4XOUSV.js} +1 -1
- package/Marketplace/chunk-OXSGKWPW.js +1 -0
- package/Marketplace/{chunk-26HKN7YV.js → chunk-PUC6ODUE.js} +3 -3
- package/Marketplace/{chunk-KGINCJJU.js → chunk-PYCM3S43.js} +1 -1
- package/Marketplace/{chunk-KGNFBVTF.js → chunk-QITW54IW.js} +3 -3
- package/Marketplace/chunk-QKJFDGHL.js +1 -0
- package/Marketplace/chunk-QOA24ZLA.js +1 -0
- package/Marketplace/chunk-RER2OLD4.js +1 -0
- package/Marketplace/{chunk-PIIJRFHM.js → chunk-RKRJ4JOF.js} +1 -1
- package/Marketplace/chunk-RXDUUYMX.js +1 -0
- package/Marketplace/chunk-TLKDYQBN.js +1 -0
- package/Marketplace/{chunk-UHE3QQB5.js → chunk-TRGFX3AD.js} +1 -1
- package/Marketplace/chunk-UJL2GLHS.js +1 -0
- package/Marketplace/{chunk-4R22UO7N.js → chunk-UUNZHJ6W.js} +1 -1
- package/Marketplace/{chunk-YG3KQ63T.js → chunk-VHYFEAS2.js} +1 -1
- package/Marketplace/chunk-VUL363BT.js +2 -0
- package/Marketplace/chunk-VVKIT2K2.js +1 -0
- package/Marketplace/{chunk-CAXMTBHH.js → chunk-W5TR3NDM.js} +1 -1
- package/Marketplace/chunk-WDY3SIUY.js +1 -0
- package/Marketplace/{chunk-OY6H4LKT.js → chunk-WRS54BQ7.js} +3 -3
- package/Marketplace/{chunk-D7X76LHU.js → chunk-XNGU3O4O.js} +1 -1
- package/Marketplace/{chunk-S5GA4AVB.js → chunk-Y27IE54D.js} +1 -1
- package/Marketplace/{chunk-QZKWUCMY.js → chunk-ZG6JXFSY.js} +1 -1
- package/Marketplace/{chunk-MSVZKMTY.js → chunk-ZQLDSEY5.js} +1 -1
- package/Marketplace/index.html +55 -25
- package/Marketplace/main-XF2FUSJ6.js +1 -0
- package/Marketplace/{styles-BHJH7JG5.css → styles-K7GFOZYN.css} +1 -1
- package/package.json +1 -1
- package/Marketplace/chunk-3WGDHGSC.js +0 -36
- package/Marketplace/chunk-57XFPFTU.js +0 -1
- package/Marketplace/chunk-7OUOPJNV.js +0 -1
- package/Marketplace/chunk-B3LBEB32.js +0 -1
- package/Marketplace/chunk-C3YE27TZ.js +0 -8
- package/Marketplace/chunk-DSF55IXM.js +0 -1
- package/Marketplace/chunk-EJ5OYNY3.js +0 -1
- package/Marketplace/chunk-F63GNFZE.js +0 -1
- package/Marketplace/chunk-FTVIBNXQ.js +0 -1
- package/Marketplace/chunk-G6HY2OKZ.js +0 -1
- package/Marketplace/chunk-HIVRWPHI.js +0 -2
- package/Marketplace/chunk-HWUMVID7.js +0 -1
- package/Marketplace/chunk-JWI6NSSG.js +0 -1
- package/Marketplace/chunk-K7EHVRIN.js +0 -5
- package/Marketplace/chunk-L34D7YAZ.js +0 -1
- package/Marketplace/chunk-NCNHP5BH.js +0 -1
- package/Marketplace/chunk-QPRFFPO5.js +0 -1
- package/Marketplace/chunk-RX2NCNAM.js +0 -1
- package/Marketplace/chunk-UEZ3MCEP.js +0 -1
- package/Marketplace/chunk-V6L3NRY3.js +0 -1
- package/Marketplace/chunk-VOSKUYZN.js +0 -1
- package/Marketplace/chunk-ZWGSECG3.js +0 -2
- package/Marketplace/main-KVPKHKMN.js +0 -1
- /package/Marketplace/{chunk-IWVYX6KY.js → chunk-7KG3DC5J.js} +0 -0
- /package/Marketplace/{chunk-662E5VTA.js → chunk-BVIRHZTZ.js} +0 -0
- /package/Marketplace/{chunk-BSBYMQ7J.js → chunk-XHAXYWZ7.js} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
--------------------------------------------------------------------------------
|
|
3
|
-
Package: @angular/
|
|
3
|
+
Package: @angular/material
|
|
4
4
|
License: "MIT"
|
|
5
5
|
|
|
6
6
|
The MIT License
|
|
@@ -26,7 +26,12 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
|
26
26
|
THE SOFTWARE.
|
|
27
27
|
|
|
28
28
|
--------------------------------------------------------------------------------
|
|
29
|
-
Package: @
|
|
29
|
+
Package: @dealpos-npm/ng-dealpos-library
|
|
30
|
+
License: "ISC"
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
--------------------------------------------------------------------------------
|
|
34
|
+
Package: @angular/cdk
|
|
30
35
|
License: "MIT"
|
|
31
36
|
|
|
32
37
|
The MIT License
|
|
@@ -56,69 +61,11 @@ Package: @microsoft/signalr
|
|
|
56
61
|
License: "MIT"
|
|
57
62
|
|
|
58
63
|
|
|
59
|
-
--------------------------------------------------------------------------------
|
|
60
|
-
Package: @dealpos-npm/ng-dealpos-library
|
|
61
|
-
License: "ISC"
|
|
62
|
-
|
|
63
|
-
|
|
64
64
|
--------------------------------------------------------------------------------
|
|
65
65
|
Package: primeng
|
|
66
66
|
License: "MIT"
|
|
67
67
|
|
|
68
68
|
|
|
69
|
-
--------------------------------------------------------------------------------
|
|
70
|
-
Package: moment
|
|
71
|
-
License: "MIT"
|
|
72
|
-
|
|
73
|
-
Copyright (c) JS Foundation and other contributors
|
|
74
|
-
|
|
75
|
-
Permission is hereby granted, free of charge, to any person
|
|
76
|
-
obtaining a copy of this software and associated documentation
|
|
77
|
-
files (the "Software"), to deal in the Software without
|
|
78
|
-
restriction, including without limitation the rights to use,
|
|
79
|
-
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
80
|
-
copies of the Software, and to permit persons to whom the
|
|
81
|
-
Software is furnished to do so, subject to the following
|
|
82
|
-
conditions:
|
|
83
|
-
|
|
84
|
-
The above copyright notice and this permission notice shall be
|
|
85
|
-
included in all copies or substantial portions of the Software.
|
|
86
|
-
|
|
87
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
88
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
|
89
|
-
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
90
|
-
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
|
91
|
-
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
92
|
-
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
93
|
-
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
94
|
-
OTHER DEALINGS IN THE SOFTWARE.
|
|
95
|
-
|
|
96
|
-
--------------------------------------------------------------------------------
|
|
97
|
-
Package: @angular/material-moment-adapter
|
|
98
|
-
License: "MIT"
|
|
99
|
-
|
|
100
|
-
The MIT License
|
|
101
|
-
|
|
102
|
-
Copyright (c) 2024 Google LLC.
|
|
103
|
-
|
|
104
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
105
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
106
|
-
in the Software without restriction, including without limitation the rights
|
|
107
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
108
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
109
|
-
furnished to do so, subject to the following conditions:
|
|
110
|
-
|
|
111
|
-
The above copyright notice and this permission notice shall be included in
|
|
112
|
-
all copies or substantial portions of the Software.
|
|
113
|
-
|
|
114
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
115
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
116
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
117
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
118
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
119
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
120
|
-
THE SOFTWARE.
|
|
121
|
-
|
|
122
69
|
--------------------------------------------------------------------------------
|
|
123
70
|
Package: ng-http-loader
|
|
124
71
|
License: "MIT"
|
|
@@ -191,9 +138,57 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
|
191
138
|
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
192
139
|
|
|
193
140
|
--------------------------------------------------------------------------------
|
|
194
|
-
Package:
|
|
141
|
+
Package: moment
|
|
195
142
|
License: "MIT"
|
|
196
143
|
|
|
144
|
+
Copyright (c) JS Foundation and other contributors
|
|
145
|
+
|
|
146
|
+
Permission is hereby granted, free of charge, to any person
|
|
147
|
+
obtaining a copy of this software and associated documentation
|
|
148
|
+
files (the "Software"), to deal in the Software without
|
|
149
|
+
restriction, including without limitation the rights to use,
|
|
150
|
+
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
151
|
+
copies of the Software, and to permit persons to whom the
|
|
152
|
+
Software is furnished to do so, subject to the following
|
|
153
|
+
conditions:
|
|
154
|
+
|
|
155
|
+
The above copyright notice and this permission notice shall be
|
|
156
|
+
included in all copies or substantial portions of the Software.
|
|
157
|
+
|
|
158
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
159
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
|
160
|
+
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
161
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
|
162
|
+
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
163
|
+
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
164
|
+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
165
|
+
OTHER DEALINGS IN THE SOFTWARE.
|
|
166
|
+
|
|
167
|
+
--------------------------------------------------------------------------------
|
|
168
|
+
Package: @angular/material-moment-adapter
|
|
169
|
+
License: "MIT"
|
|
170
|
+
|
|
171
|
+
The MIT License
|
|
172
|
+
|
|
173
|
+
Copyright (c) 2024 Google LLC.
|
|
174
|
+
|
|
175
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
176
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
177
|
+
in the Software without restriction, including without limitation the rights
|
|
178
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
179
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
180
|
+
furnished to do so, subject to the following conditions:
|
|
181
|
+
|
|
182
|
+
The above copyright notice and this permission notice shall be included in
|
|
183
|
+
all copies or substantial portions of the Software.
|
|
184
|
+
|
|
185
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
186
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
187
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
188
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
189
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
190
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
191
|
+
THE SOFTWARE.
|
|
197
192
|
|
|
198
193
|
--------------------------------------------------------------------------------
|
|
199
194
|
Package: autonumeric
|
|
@@ -228,6 +223,11 @@ Package: bigger-picture
|
|
|
228
223
|
License: "MIT"
|
|
229
224
|
|
|
230
225
|
|
|
226
|
+
--------------------------------------------------------------------------------
|
|
227
|
+
Package: @ng-select/ng-select
|
|
228
|
+
License: "MIT"
|
|
229
|
+
|
|
230
|
+
|
|
231
231
|
--------------------------------------------------------------------------------
|
|
232
232
|
Package: firebase
|
|
233
233
|
License: "Apache-2.0"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{$ as P,A as z,E as F,I as H,L as G,La as Q,N as v,R as C,Sa as X,T as j,Wc as ee,X as V,aa as Y,ba as T,ca as d,d as f,da as S,ha as Z,ia as J,jc as _,m as p,n as h,na as q,q as E,s as y,t as I,w as M,za as $}from"./chunk-HSFUKC7R.js";import{a as g,b as A}from"./chunk-GNOSNGXM.js";var c=function(s){return s[s.Tokopedia=1]="Tokopedia",s[s.WooCommerce=2]="WooCommerce",s[s.None=3]="None",s[s.KalCare=4]="KalCare",s[s.Shopee=5]="Shopee",s[s.Tiktok=6]="Tiktok",s[s.Lazada=7]="Lazada",s[s.Shopify=8]="Shopify",s}(c||{});var u=function(s){return s.SHOOPE="https://res.cloudinary.com/pos/image/upload/v1598262220/icons/marketplace_icons/shopee.png",s.WOOCOMMERCE="https://res.cloudinary.com/pos/image/upload/w_50/v1632447439/icons/WooCommerce/woocommerce-icon.webp",s.TOKOPEDIA="https://res.cloudinary.com/pos/image/upload/v1598262221/icons/marketplace_icons/tokopedia.png",s.TIKTOK="https://res.cloudinary.com/pos/image/upload/w_30/v1645761611/icons/Marketplace%20logo/tiktok.png",s.LAZADA="https://res.cloudinary.com/pos/image/upload/v1680681836/icons/marketplace_icons/Lazadanew.png",s.KALCARE="https://res.cloudinary.com/pos/image/upload/v1654230268/icons/marketplace_icons/kalcare.png",s.SHOPIFY="https://res.cloudinary.com/pos/image/upload/v1707987435/icons/marketplace_icons/shopify.png",s}(u||{});var fe=(()=>{let r=class r{static IsNotEmpty(e){return e!=""&&e!=r.GuidEMpty&&e!=null&&e!=null}static IsEmpty(e){return e==""||e==null||e==null||e==r.GuidEMpty}static getChannelLogoByTypeId(e){let t;switch(e){case c.Tokopedia:t=u.TOKOPEDIA;break;case c.Shopee:t=u.SHOOPE;break;case c.WooCommerce:t=u.WOOCOMMERCE;break;case c.Lazada:t=u.LAZADA;break;case c.Tiktok:t=u.TIKTOK;break;case c.KalCare:t=u.KALCARE;break;case c.Shopify:t=u.SHOPIFY;break}return t}static getChannelLogoByName(e=""){e=e.toLowerCase();let t;switch(e){case"tokopedia":t=u.TOKOPEDIA;break;case"shoppe":t=u.SHOOPE;break;case"woocommerce":t=u.WOOCOMMERCE;break;case"tiktok":t=u.TIKTOK;break;case"lazada":t=u.LAZADA;break;case"kalCare":t=u.KALCARE;break}return t}static getChannelName(e){let t;switch(e){case c.Shopee:t="Shopee";break;case c.Tokopedia:t="Tokopedia";break;case c.Lazada:t="Lazada";break;case c.Tiktok:t="Tiktok";break;case c.WooCommerce:t="WooCommerce";break;case c.KalCare:t="WooCommerce";break}return t}static assignChannelLogo(e){return e=e.map(t=>(t.logo=this.getChannelLogoByTypeId(t.TypeID),t)),e}static getCssChannelColor(e){let t;switch(e){case c.Shopee:t="#ee4d2d";break;case c.Tokopedia:t="var(--G500,#03AC0E)";break;case c.Lazada:t="#FF00B2";break;case c.Tiktok:t="black";break;case c.WooCommerce:t="#674399";break;case c.KalCare:t="rgb(128, 188, 0)";break}return t}static getDaysDiff(e,t){var i=t.getTime()-e.getTime(),n=i/(1e3*60*60*24);return n}static addDays(e,t){let i=new Date(Number(e));return i.setDate(e.getDate()-t),i}static isValidDate(e){return e instanceof Date&&!isNaN(e)}static getImageInfo(e){return new Promise((t,i)=>{let n=new Image;n.src=e,n.decode().then(()=>{t({img:e,height:n.height,width:n.width})}).catch(()=>{i(new Error(`Image load error for ${e}`))})})}static formatTitleFromDate(e,t){let i=null,n=new Date(e),o=new Date(t);return n.getDate()!=o.getDate()&&(i="dd"),n.getMonth()!=o.getMonth()&&(i="dd MMM"),n.getFullYear()!=o.getFullYear()&&(i="dd MMM yyyy"),i}static openDownloadFile(e,t){var i=window.URL.createObjectURL(e),n=document.createElement("a");n.href=i,n.download=t,n.click()}static compare(e,t,i){return(e<t?-1:1)*(i?1:-1)}static isDateExpired(e){let t=new Date,i=!1;return e.getTime()<t.getTime()&&(i=!0),i}static getLabelPathTree(e){let t=[],i=e;for(;i;)t.unshift(i.label),i=i.parent;return t.join(" / ")}static getTimeDifference(e){let t=new Date(e),i=new Date,n=Math.abs(t.getTime()-i.getTime()),o=1e3,a=6e4,m=60*a,x=24*m,ne=Math.floor(n/x),oe=Math.floor(n%x/m),ae=Math.floor(n%m/a),ce=Math.floor(n%a/o);return{days:ne,hours:oe,minutes:ae,seconds:ce}}static convertToReadableDate(e){let{days:t,hours:i,minutes:n,seconds:o}=r.getTimeDifference(e),a="";return t>0&&i>0&&n>0&&(a=`${t} days, ${i} hours and ${n} minutes ago`),t>0&&i>0&&n==0&&(a=`${t} days and ${i} hours ago`),t>0&&i==0&&(a=`${t} days ago`),t==0&&i>0&&n>0&&(a=`${i} hours and ${n} minutes ago`),t==0&&i>0&&n==0&&(a=`${i} hours ago`),t==0&&i==0&&n>0&&(a=`${n} minutes ago`),t==0&&i==0&&n==0&&o>0&&(a=`${o} seconds ago`),a}};r.GuidEMpty="00000000-0000-0000-0000-000000000000",r.MinDate="0001-01-01T00:00:00";let s=r;return s})();var w={REMOVE:"remove",SHOW:"show"},ie=(()=>{let r=class r{constructor(){this.strategiesSource=new f({}),this.strategies$=this.strategiesSource.asObservable()}};r.\u0275fac=function(t){return new(t||r)},r.\u0275prov=P({token:r,factory:r.\u0275fac});let s=r;return s})(),W=new T("USE_CONFIGURATION_STORE"),K=(()=>{let r=class r{constructor(e=!1,t){this.isolate=e,this.configurationStore=t,this.strategiesSource=this.isolate?new f({}):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,t){this.strategiesSource.value[e]=t}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===w.SHOW||e===w.REMOVE}};r.\u0275fac=function(t){return new(t||r)(d(W),d(ie))},r.\u0275prov=P({token:r,factory:r.\u0275fac});let s=r;return s})();function l(s){return typeof s=="function"}function L(s){if(Object.prototype.toString.call(s)!=="[object Object]")return!1;{let r=Object.getPrototypeOf(s);return r===null||r===Object.prototype}}function se(s){return!!s&&typeof s=="string"}function R(s){return typeof s=="boolean"}function he(s){return Object.prototype.toString.call(s)==="[object Promise]"}function D(s){return Array.isArray(s)?s.length>0:!!s}function k(s){return se(s)?[s]:s}var re=(()=>{let r=class r{constructor(){this.permissionsSource=new f({}),this.permissions$=this.permissionsSource.asObservable()}};r.\u0275fac=function(t){return new(t||r)},r.\u0275prov=P({token:r,factory:r.\u0275fac});let s=r;return s})(),B=new T("USE_PERMISSIONS_STORE"),O=(()=>{let r=class r{constructor(e=!1,t){this.isolate=e,this.permissionsStore=t,this.permissionsSource=this.isolate?new f({}):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=k(e),this.hasArrayPermission(e))}loadPermissions(e,t){let i=e.reduce((n,o)=>this.reducePermission(n,o,t),{});this.permissionsSource.next(i)}addPermission(e,t){if(Array.isArray(e)){let i=e.reduce((n,o)=>this.reducePermission(n,o,t),this.permissionsSource.value);this.permissionsSource.next(i)}else{let i=this.reducePermission(this.permissionsSource.value,e,t);this.permissionsSource.next(i)}}removePermission(e){let t=g({},this.permissionsSource.value);delete t[e],this.permissionsSource.next(t)}getPermission(e){return this.permissionsSource.value[e]}getPermissions(){return this.permissionsSource.value}reducePermission(e,t,i){return i&&l(i)?A(g({},e),{[t]:{name:t,validationFunction:i}}):A(g({},e),{[t]:{name:t}})}hasArrayPermission(e){let t=e.map(i=>{if(this.hasPermissionValidationFunction(i)){let n=this.permissionsSource.value[i].validationFunction,o=g({},this.permissionsSource.value);return h(null).pipe(E(()=>n(i,o)),j(a=>R(a)?h(a):a),F(()=>h(!1)))}return h(!!this.permissionsSource.value[i])});return p(t).pipe(I(),v(i=>i!==!1,!1),E(i=>i!==!1)).toPromise().then(i=>i)}hasPermissionValidationFunction(e){return!!this.permissionsSource.value[e]&&!!this.permissionsSource.value[e].validationFunction&&l(this.permissionsSource.value[e].validationFunction)}};r.\u0275fac=function(t){return new(t||r)(d(B),d(re))},r.\u0275prov=P({token:r,factory:r.\u0275fac});let s=r;return s})(),b=class{constructor(){this.rolesSource=new f({}),this.roles$=this.rolesSource.asObservable()}},N=new T("USE_ROLES_STORE"),U=(()=>{let r=class r{constructor(e=!1,t,i){this.isolate=e,this.rolesStore=t,this.permissionsService=i,this.rolesSource=this.isolate?new f({}):this.rolesStore.rolesSource,this.roles$=this.rolesSource.asObservable()}addRole(e,t){let i=A(g({},this.rolesSource.value),{[e]:{name:e,validationFunction:t}});this.rolesSource.next(i)}addRoleWithPermissions(e,t){this.permissionsService.addPermission(t),this.addRole(e,t)}addRoles(e){Object.keys(e).forEach((t,i)=>{this.addRole(t,e[t])})}addRolesWithPermissions(e){Object.keys(e).forEach((t,i)=>{this.addRoleWithPermissions(t,e[t])})}flushRoles(){this.rolesSource.next({})}flushRolesAndPermissions(){this.flushRoles(),this.permissionsService.flushPermissions()}removeRole(e){let t=g({},this.rolesSource.value);delete t[e],this.rolesSource.next(t)}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=k(e),Promise.all([this.hasRoleKey(e),this.hasRolePermission(this.rolesSource.value,e)]).then(([i,n])=>i||n))}hasRoleKey(e){let t=e.map(i=>{if(!!this.rolesSource.value[i]&&!!this.rolesSource.value[i].validationFunction&&l(this.rolesSource.value[i].validationFunction)&&!he(this.rolesSource.value[i].validationFunction)){let o=this.rolesSource.value[i].validationFunction,a=g({},this.rolesSource.value);return h(null).pipe(E(()=>o(i,a)),j(m=>R(m)?h(m):m),F(()=>h(!1)))}return h(!1)});return p(t).pipe(I(),v(i=>i!==!1,!1),E(i=>i!==!1)).toPromise().then(i=>i)}hasRolePermission(e,t){return p(t).pipe(y(i=>e[i]&&Array.isArray(e[i].validationFunction)?p(e[i].validationFunction).pipe(y(n=>this.permissionsService.hasPermission(n)),G(n=>n===!0)):h(!1)),v(i=>i===!0,!1)).toPromise()}};r.\u0275fac=function(t){return new(t||r)(d(N),d(b),d(O))},r.\u0275prov=P({token:r,factory:r.\u0275fac});let s=r;return s})(),Re=(()=>{let r=class r{constructor(){this.permissionsAuthorized=new $,this.permissionsUnauthorized=new $,this.firstMergeUnusedRun=1,this.permissionsService=S(O),this.configurationService=S(K),this.rolesService=S(U),this.viewContainer=S(X),this.changeDetector=S(_),this.templateRef=S(Q)}ngOnInit(){this.viewContainer.clear(),this.initPermissionSubscription=this.validateExceptOnlyPermissions()}ngOnChanges(e){let t=e.ngxPermissionsOnly,i=e.ngxPermissionsExcept;if(t||i){if(t&&t.firstChange||i&&i.firstChange)return;z(this.permissionsService.permissions$,this.rolesService.roles$).pipe(C(this.firstMergeUnusedRun),H(1)).subscribe(()=>{if(D(this.ngxPermissionsExcept)){this.validateExceptAndOnlyPermissions();return}if(D(this.ngxPermissionsOnly)){this.validateOnlyPermissions();return}this.handleAuthorisedPermission(this.getAuthorisedTemplates())})}}ngOnDestroy(){this.initPermissionSubscription&&this.initPermissionSubscription.unsubscribe()}validateExceptOnlyPermissions(){return z(this.permissionsService.permissions$,this.rolesService.roles$).pipe(C(this.firstMergeUnusedRun)).subscribe(()=>{if(D(this.ngxPermissionsExcept)){this.validateExceptAndOnlyPermissions();return}if(D(this.ngxPermissionsOnly)){this.validateOnlyPermissions();return}this.handleAuthorisedPermission(this.getAuthorisedTemplates())})}validateExceptAndOnlyPermissions(){Promise.all([this.permissionsService.hasPermission(this.ngxPermissionsExcept),this.rolesService.hasOnlyRoles(this.ngxPermissionsExcept)]).then(([e,t])=>{if(e||t){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,t])=>{e||t?this.handleAuthorisedPermission(this.ngxPermissionsOnlyThen||this.ngxPermissionsThen||this.templateRef):this.handleUnauthorisedPermission(this.ngxPermissionsOnlyElse||this.ngxPermissionsElse)}).catch(()=>{this.handleUnauthorisedPermission(this.ngxPermissionsOnlyElse||this.ngxPermissionsElse)})}handleUnauthorisedPermission(e){if(!(R(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(!(R(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(se(e)){this.applyStrategy(e);return}if(l(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===w.SHOW){this.showTemplateBlockInView(this.templateRef);return}if(e===w.REMOVE){this.viewContainer.clear();return}let t=this.configurationService.getStrategy(e);this.showTemplateBlockInView(this.templateRef),t(this.templateRef)}};r.\u0275fac=function(t){return new(t||r)},r.\u0275dir=J({type:r,selectors:[["","ngxPermissionsOnly",""],["","ngxPermissionsExcept",""]],inputs:{ngxPermissionsOnly:"ngxPermissionsOnly",ngxPermissionsOnlyThen:"ngxPermissionsOnlyThen",ngxPermissionsOnlyElse:"ngxPermissionsOnlyElse",ngxPermissionsExcept:"ngxPermissionsExcept",ngxPermissionsExceptElse:"ngxPermissionsExceptElse",ngxPermissionsExceptThen:"ngxPermissionsExceptThen",ngxPermissionsThen:"ngxPermissionsThen",ngxPermissionsElse:"ngxPermissionsElse",ngxPermissionsOnlyAuthorisedStrategy:"ngxPermissionsOnlyAuthorisedStrategy",ngxPermissionsOnlyUnauthorisedStrategy:"ngxPermissionsOnlyUnauthorisedStrategy",ngxPermissionsExceptUnauthorisedStrategy:"ngxPermissionsExceptUnauthorisedStrategy",ngxPermissionsExceptAuthorisedStrategy:"ngxPermissionsExceptAuthorisedStrategy",ngxPermissionsUnauthorisedStrategy:"ngxPermissionsUnauthorisedStrategy",ngxPermissionsAuthorisedStrategy:"ngxPermissionsAuthorisedStrategy"},outputs:{permissionsAuthorized:"permissionsAuthorized",permissionsUnauthorized:"permissionsUnauthorized"},features:[q]});let s=r;return s})(),ue="default";var te=(()=>{let r=class r{constructor(e,t,i){this.permissionsService=e,this.rolesService=t,this.router=i}canActivate(e,t){return this.hasPermissions(e,t)}canActivateChild(e,t){return this.hasPermissions(e,t)}canLoad(e){return this.hasPermissions(e)}canMatch(e){return this.hasPermissions(e)}hasPermissions(e,t){let i=e&&e.data?e.data.permissions:{},n=this.transformPermission(i,e,t);return this.isParameterAvailable(n.except)?this.passingExceptPermissionsValidation(n,e,t):this.isParameterAvailable(n.only)?this.passingOnlyPermissionsValidation(n,e,t):!0}transformPermission(e,t,i){let n=l(e.only)?e.only(t,i):k(e.only),o=l(e.except)?e.except(t,i):k(e.except),a=e.redirectTo;return{only:n,except:o,redirectTo:a}}isParameterAvailable(e){return!!e&&e.length>0}passingExceptPermissionsValidation(e,t,i){if(e.redirectTo&&(l(e.redirectTo)||L(e.redirectTo)&&!this.isRedirectionWithParameters(e.redirectTo))){let n="";return p(e.except).pipe(y(o=>M([this.permissionsService.hasPermission(o),this.rolesService.hasOnlyRoles(o)]).pipe(V(a=>{a.every(x=>x===!1)||(n=o)}))),v(o=>o.some(a=>a===!0),!1),y(o=>n?(this.handleRedirectOfFailedPermission(e,n,t,i),h(!1)):!o&&e.only?this.onlyRedirectCheck(e,t,i):h(!o))).toPromise()}return Promise.all([this.permissionsService.hasPermission(e.except),this.rolesService.hasOnlyRoles(e.except)]).then(([n,o])=>n||o?(e.redirectTo&&this.redirectToAnotherRoute(e.redirectTo,t,i),!1):e.only?this.checkOnlyPermissions(e,t,i):!0)}redirectToAnotherRoute(e,t,i,n){let o=l(e)?e(n,t,i):e;if(this.isRedirectionWithParameters(o)){o.navigationCommands=this.transformNavigationCommands(o.navigationCommands,t,i),o.navigationExtras=this.transformNavigationExtras(o.navigationExtras,t,i),this.router.navigate(o.navigationCommands,o.navigationExtras);return}Array.isArray(o)?this.router.navigate(o):this.router.navigate([o])}isRedirectionWithParameters(e){return L(e)&&(!!e.navigationCommands||!!e.navigationExtras)}transformNavigationCommands(e,t,i){return l(e)?e(t,i):e}transformNavigationExtras(e,t,i){return l(e)?e(t,i):e}onlyRedirectCheck(e,t,i){let n="";return p(e.only).pipe(y(o=>M([this.permissionsService.hasPermission(o),this.rolesService.hasOnlyRoles(o)]).pipe(V(a=>{a.every(x=>x===!1)&&(n=o)}))),v(o=>l(e.redirectTo)?o.some(a=>a===!0):o.every(a=>a===!1),!1),y(o=>l(e.redirectTo)?o?h(!0):(this.handleRedirectOfFailedPermission(e,n,t,i),h(!1)):(n&&this.handleRedirectOfFailedPermission(e,n,t,i),h(!o)))).toPromise()}handleRedirectOfFailedPermission(e,t,i,n){this.isFailedPermissionPropertyOfRedirectTo(e,t)?this.redirectToAnotherRoute(e.redirectTo[t],i,n,t):l(e.redirectTo)?this.redirectToAnotherRoute(e.redirectTo,i,n,t):this.redirectToAnotherRoute(e.redirectTo[ue],i,n,t)}isFailedPermissionPropertyOfRedirectTo(e,t){return!!e.redirectTo&&e.redirectTo[t]}checkOnlyPermissions(e,t,i){let n=g({},e);return Promise.all([this.permissionsService.hasPermission(n.only),this.rolesService.hasOnlyRoles(n.only)]).then(([o,a])=>o||a?!0:(n.redirectTo&&this.redirectToAnotherRoute(n.redirectTo,t,i),!1))}passingOnlyPermissionsValidation(e,t,i){return l(e.redirectTo)||L(e.redirectTo)&&!this.isRedirectionWithParameters(e.redirectTo)?this.onlyRedirectCheck(e,t,i):this.checkOnlyPermissions(e,t,i)}};r.\u0275fac=function(t){return new(t||r)(d(O),d(U),d(ee))},r.\u0275prov=P({token:r,factory:r.\u0275fac});let s=r;return s})();var ke=(()=>{let r=class r{static forRoot(e={}){return{ngModule:r,providers:[re,b,ie,O,te,U,K,{provide:B,useValue:e.permissionsIsolate},{provide:N,useValue:e.rolesIsolate},{provide:W,useValue:e.configurationIsolate}]}}static forChild(e={}){return{ngModule:r,providers:[{provide:B,useValue:e.permissionsIsolate},{provide:N,useValue:e.rolesIsolate},{provide:W,useValue:e.configurationIsolate},K,O,U,te]}}};r.\u0275fac=function(t){return new(t||r)},r.\u0275mod=Z({type:r}),r.\u0275inj=Y({});let s=r;return s})();export{u as a,c as b,fe as c,O as d,Re as e,ke as f};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as W}from"./chunk-MVPTQRFO.js";import{D as K,K as G,S as X,T as Z,aa as ee}from"./chunk-EKCNJX26.js";import{a as J}from"./chunk-B3LBEB32.js";import{$a as h,Bb as Q,Cb as w,Cc as Y,Da as V,Db as p,Eb as f,Ia as m,Ja as d,Pb as H,Qb as $,Ra as L,Ya as R,_ as q,_a as C,aa as z,ba as g,bb as D,da as M,ga as O,ha as P,ia as x,ic as T,jc as c,kc as A,lb as s,mb as l,nb as E,oa as k,pa as y,rb as B,ta as S,ua as j,ub as b,xb as N,ya as _,yb as U,za as I}from"./chunk-C3YE27TZ.js";var de=["input"],ce=["formField"],ne=["*"],ie=0,v=class{constructor(o,re){this.source=o,this.value=re}},se={provide:J,useExisting:q(()=>me),multi:!0},te=new g("MatRadioGroup"),le=new g("mat-radio-default-options",{providedIn:"root",factory:ue});function ue(){return{color:"accent"}}var me=(()=>{let o=class o{get name(){return this._name}set name(e){this._name=e,this._updateRadioButtonNames()}get labelPosition(){return this._labelPosition}set labelPosition(e){this._labelPosition=e==="before"?"before":"after",this._markRadiosForCheck()}get value(){return this._value}set value(e){this._value!==e&&(this._value=e,this._updateSelectedRadioFromValue(),this._checkSelectedRadioButton())}_checkSelectedRadioButton(){this._selected&&!this._selected.checked&&(this._selected.checked=!0)}get selected(){return this._selected}set selected(e){this._selected=e,this.value=e?e.value:null,this._checkSelectedRadioButton()}get disabled(){return this._disabled}set disabled(e){this._disabled=e,this._markRadiosForCheck()}get required(){return this._required}set required(e){this._required=e,this._markRadiosForCheck()}constructor(e){this._changeDetector=e,this._value=null,this._name=`mat-radio-group-${ie++}`,this._selected=null,this._isInitialized=!1,this._labelPosition="after",this._disabled=!1,this._required=!1,this._controlValueAccessorChangeFn=()=>{},this.onTouched=()=>{},this.change=new I}ngAfterContentInit(){this._isInitialized=!0,this._buttonChanges=this._radios.changes.subscribe(()=>{this.selected&&!this._radios.find(e=>e===this.selected)&&(this._selected=null)})}ngOnDestroy(){this._buttonChanges?.unsubscribe()}_touch(){this.onTouched&&this.onTouched()}_updateRadioButtonNames(){this._radios&&this._radios.forEach(e=>{e.name=this.name,e._markForCheck()})}_updateSelectedRadioFromValue(){let e=this._selected!==null&&this._selected.value===this._value;this._radios&&!e&&(this._selected=null,this._radios.forEach(i=>{i.checked=this.value===i.value,i.checked&&(this._selected=i)}))}_emitChangeEvent(){this._isInitialized&&this.change.emit(new v(this._selected,this._value))}_markRadiosForCheck(){this._radios&&this._radios.forEach(e=>e._markForCheck())}writeValue(e){this.value=e,this._changeDetector.markForCheck()}registerOnChange(e){this._controlValueAccessorChangeFn=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this.disabled=e,this._changeDetector.markForCheck()}};o.\u0275fac=function(i){return new(i||o)(d(T))},o.\u0275dir=x({type:o,selectors:[["mat-radio-group"]],contentQueries:function(i,t,a){if(i&1&&Q(a,oe,5),i&2){let n;p(n=f())&&(t._radios=n)}},hostAttrs:["role","radiogroup",1,"mat-mdc-radio-group"],inputs:{color:"color",name:"name",labelPosition:"labelPosition",value:"value",selected:"selected",disabled:[2,"disabled","disabled",c],required:[2,"required","required",c]},outputs:{change:"change"},exportAs:["matRadioGroup"],standalone:!0,features:[H([se,{provide:te,useExisting:o}]),R]});let r=o;return r})(),oe=(()=>{let o=class o{get checked(){return this._checked}set checked(e){this._checked!==e&&(this._checked=e,e&&this.radioGroup&&this.radioGroup.value!==this.value?this.radioGroup.selected=this:!e&&this.radioGroup&&this.radioGroup.value===this.value&&(this.radioGroup.selected=null),e&&this._radioDispatcher.notify(this.id,this.name),this._changeDetector.markForCheck())}get value(){return this._value}set value(e){this._value!==e&&(this._value=e,this.radioGroup!==null&&(this.checked||(this.checked=this.radioGroup.value===e),this.checked&&(this.radioGroup.selected=this)))}get labelPosition(){return this._labelPosition||this.radioGroup&&this.radioGroup.labelPosition||"after"}set labelPosition(e){this._labelPosition=e}get disabled(){return this._disabled||this.radioGroup!==null&&this.radioGroup.disabled}set disabled(e){this._setDisabled(e)}get required(){return this._required||this.radioGroup&&this.radioGroup.required}set required(e){this._required=e}get color(){return this._color||this.radioGroup&&this.radioGroup.color||this._providerOverride&&this._providerOverride.color||"accent"}set color(e){this._color=e}get inputId(){return`${this.id||this._uniqueId}-input`}constructor(e,i,t,a,n,u,ae,F){this._elementRef=i,this._changeDetector=t,this._focusMonitor=a,this._radioDispatcher=n,this._providerOverride=ae,this._uniqueId=`mat-radio-${++ie}`,this.id=this._uniqueId,this.disableRipple=!1,this.tabIndex=0,this.change=new I,this._checked=!1,this._value=null,this._removeUniqueSelectionListener=()=>{},this._injector=M(j),this.radioGroup=e,this._noopAnimations=u==="NoopAnimations",F&&(this.tabIndex=A(F,0))}focus(e,i){i?this._focusMonitor.focusVia(this._inputElement,i,e):this._inputElement.nativeElement.focus(e)}_markForCheck(){this._changeDetector.markForCheck()}ngOnInit(){this.radioGroup&&(this.checked=this.radioGroup.value===this._value,this.checked&&(this.radioGroup.selected=this),this.name=this.radioGroup.name),this._removeUniqueSelectionListener=this._radioDispatcher.listen((e,i)=>{e!==this.id&&i===this.name&&(this.checked=!1)})}ngDoCheck(){this._updateTabIndex()}ngAfterViewInit(){this._updateTabIndex(),this._focusMonitor.monitor(this._elementRef,!0).subscribe(e=>{!e&&this.radioGroup&&this.radioGroup._touch()})}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef),this._removeUniqueSelectionListener()}_emitChangeEvent(){this.change.emit(new v(this,this._value))}_isRippleDisabled(){return this.disableRipple||this.disabled}_onInputClick(e){e.stopPropagation()}_onInputInteraction(e){if(e.stopPropagation(),!this.checked&&!this.disabled){let i=this.radioGroup&&this.value!==this.radioGroup.value;this.checked=!0,this._emitChangeEvent(),this.radioGroup&&(this.radioGroup._controlValueAccessorChangeFn(this.value),i&&this.radioGroup._emitChangeEvent())}}_onTouchTargetClick(e){this._onInputInteraction(e),this.disabled||this._inputElement.nativeElement.focus()}_setDisabled(e){this._disabled!==e&&(this._disabled=e,this._changeDetector.markForCheck())}_updateTabIndex(){let e=this.radioGroup,i;if(!e||!e.selected||this.disabled?i=this.tabIndex:i=e.selected===this?this.tabIndex:-1,i!==this._previousTabIndex){let t=this._inputElement?.nativeElement;t&&(t.setAttribute("tabindex",i+""),this._previousTabIndex=i,L(()=>{queueMicrotask(()=>{e&&e.selected&&e.selected!==this&&document.activeElement===t&&(e.selected?._inputElement.nativeElement.focus(),document.activeElement===t&&this._inputElement.nativeElement.blur())})},{injector:this._injector}))}}};o.\u0275fac=function(i){return new(i||o)(d(te,8),d(_),d(T),d(K),d(W),d(V,8),d(le,8),S("tabindex"))},o.\u0275cmp=O({type:o,selectors:[["mat-radio-button"]],viewQuery:function(i,t){if(i&1&&(w(de,5),w(ce,7,_)),i&2){let a;p(a=f())&&(t._inputElement=a.first),p(a=f())&&(t._rippleTrigger=a.first)}},hostAttrs:[1,"mat-mdc-radio-button"],hostVars:15,hostBindings:function(i,t){i&1&&b("focus",function(){return t._inputElement.nativeElement.focus()}),i&2&&(C("id",t.id)("tabindex",null)("aria-label",null)("aria-labelledby",null)("aria-describedby",null),D("mat-primary",t.color==="primary")("mat-accent",t.color==="accent")("mat-warn",t.color==="warn")("mat-mdc-radio-checked",t.checked)("_mat-animation-noopable",t._noopAnimations))},inputs:{id:"id",name:"name",ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],ariaDescribedby:[0,"aria-describedby","ariaDescribedby"],disableRipple:[2,"disableRipple","disableRipple",c],tabIndex:[2,"tabIndex","tabIndex",e=>e==null?0:A(e)],checked:[2,"checked","checked",c],value:"value",labelPosition:"labelPosition",disabled:[2,"disabled","disabled",c],required:[2,"required","required",c],color:"color"},outputs:{change:"change"},exportAs:["matRadioButton"],standalone:!0,features:[R,$],ngContentSelectors:ne,decls:13,vars:16,consts:[["formField",""],["input",""],["mat-internal-form-field","",3,"labelPosition"],[1,"mdc-radio"],[1,"mat-mdc-radio-touch-target",3,"click"],["type","radio",1,"mdc-radio__native-control",3,"change","id","checked","disabled","required"],[1,"mdc-radio__background"],[1,"mdc-radio__outer-circle"],[1,"mdc-radio__inner-circle"],["mat-ripple","",1,"mat-radio-ripple","mat-mdc-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleCentered"],[1,"mat-ripple-element","mat-radio-persistent-ripple"],[1,"mdc-label",3,"for"]],template:function(i,t){if(i&1){let a=B();N(),s(0,"div",2,0)(2,"div",3)(3,"div",4),b("click",function(u){return k(a),y(t._onTouchTargetClick(u))}),l(),s(4,"input",5,1),b("change",function(u){return k(a),y(t._onInputInteraction(u))}),l(),s(6,"div",6),E(7,"div",7)(8,"div",8),l(),s(9,"div",9),E(10,"div",10),l()(),s(11,"label",11),U(12),l()()}i&2&&(h("labelPosition",t.labelPosition),m(2),D("mdc-radio--disabled",t.disabled),m(2),h("id",t.inputId)("checked",t.checked)("disabled",t.disabled)("required",t.required),C("name",t.name)("value",t.value)("aria-label",t.ariaLabel)("aria-labelledby",t.ariaLabelledby)("aria-describedby",t.ariaDescribedby),m(5),h("matRippleTrigger",t._rippleTrigger.nativeElement)("matRippleDisabled",t._isRippleDisabled())("matRippleCentered",!0),m(2),h("for",t.inputId))},dependencies:[X,ee],styles:['.mat-mdc-radio-button{-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-radio-button .mdc-radio{display:inline-block;position:relative;flex:0 0 auto;box-sizing:content-box;width:20px;height:20px;cursor:pointer;will-change:opacity,transform,border-color,color;padding:calc((var(--mdc-radio-state-layer-size) - 20px)/2)}.mat-mdc-radio-button .mdc-radio:hover .mdc-radio__native-control:not([disabled]):not(:focus)~.mdc-radio__background::before{opacity:.04;transform:scale(1)}.mat-mdc-radio-button .mdc-radio:hover .mdc-radio__native-control:not([disabled])~.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-unselected-hover-icon-color)}.mat-mdc-radio-button .mdc-radio:hover .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button .mdc-radio:hover .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__inner-circle{border-color:var(--mdc-radio-selected-hover-icon-color)}.mat-mdc-radio-button .mdc-radio:active .mdc-radio__native-control:enabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-unselected-pressed-icon-color)}.mat-mdc-radio-button .mdc-radio:active .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button .mdc-radio:active .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__inner-circle{border-color:var(--mdc-radio-selected-pressed-icon-color)}.mat-mdc-radio-button .mdc-radio__background{display:inline-block;position:relative;box-sizing:border-box;width:20px;height:20px}.mat-mdc-radio-button .mdc-radio__background::before{position:absolute;transform:scale(0, 0);border-radius:50%;opacity:0;pointer-events:none;content:"";transition:opacity 90ms cubic-bezier(0.4, 0, 0.6, 1),transform 90ms cubic-bezier(0.4, 0, 0.6, 1);width:var(--mdc-radio-state-layer-size);height:var(--mdc-radio-state-layer-size);top:calc(-1*(var(--mdc-radio-state-layer-size) - 20px)/2);left:calc(-1*(var(--mdc-radio-state-layer-size) - 20px)/2)}.mat-mdc-radio-button .mdc-radio__outer-circle{position:absolute;top:0;left:0;box-sizing:border-box;width:100%;height:100%;border-width:2px;border-style:solid;border-radius:50%;transition:border-color 90ms cubic-bezier(0.4, 0, 0.6, 1)}.mat-mdc-radio-button .mdc-radio__inner-circle{position:absolute;top:0;left:0;box-sizing:border-box;width:100%;height:100%;transform:scale(0, 0);border-width:10px;border-style:solid;border-radius:50%;transition:transform 90ms cubic-bezier(0.4, 0, 0.6, 1),border-color 90ms cubic-bezier(0.4, 0, 0.6, 1)}.mat-mdc-radio-button .mdc-radio__native-control{position:absolute;margin:0;padding:0;opacity:0;top:0;right:0;left:0;cursor:inherit;z-index:1;width:var(--mdc-radio-state-layer-size);height:var(--mdc-radio-state-layer-size)}.mat-mdc-radio-button .mdc-radio__native-control:checked+.mdc-radio__background,.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background{transition:opacity 90ms cubic-bezier(0, 0, 0.2, 1),transform 90ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-radio-button .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__outer-circle{transition:border-color 90ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-radio-button .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__inner-circle{transition:transform 90ms cubic-bezier(0, 0, 0.2, 1),border-color 90ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-radio-button .mdc-radio__native-control:focus+.mdc-radio__background::before{transform:scale(1);opacity:.12;transition:opacity 90ms cubic-bezier(0, 0, 0.2, 1),transform 90ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-radio-button .mdc-radio__native-control:disabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-disabled-unselected-icon-color);opacity:var(--mdc-radio-disabled-unselected-icon-opacity)}.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background{cursor:default}.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-disabled-selected-icon-color);opacity:var(--mdc-radio-disabled-selected-icon-opacity)}.mat-mdc-radio-button .mdc-radio__native-control:enabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-unselected-icon-color)}.mat-mdc-radio-button .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__inner-circle{border-color:var(--mdc-radio-selected-icon-color)}.mat-mdc-radio-button .mdc-radio__native-control:enabled:focus:checked+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-radio-button .mdc-radio__native-control:enabled:focus:checked+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-selected-focus-icon-color)}.mat-mdc-radio-button .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__inner-circle{transform:scale(0.5);transition:transform 90ms cubic-bezier(0, 0, 0.2, 1),border-color 90ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-radio-button .mdc-radio--disabled{cursor:default;pointer-events:none}.mat-mdc-radio-button._mat-animation-noopable .mdc-radio__background::before,.mat-mdc-radio-button._mat-animation-noopable .mdc-radio__outer-circle,.mat-mdc-radio-button._mat-animation-noopable .mdc-radio__inner-circle{transition:none !important}.mat-mdc-radio-button .mdc-radio__background::before{background-color:var(--mat-radio-ripple-color)}.mat-mdc-radio-button.mat-mdc-radio-checked .mdc-radio__background::before{background-color:var(--mat-radio-checked-ripple-color)}.mat-mdc-radio-button.mat-mdc-radio-checked .mat-ripple-element{background-color:var(--mat-radio-checked-ripple-color)}.mat-mdc-radio-button .mat-internal-form-field{color:var(--mat-radio-label-text-color);font-family:var(--mat-radio-label-text-font);line-height:var(--mat-radio-label-text-line-height);font-size:var(--mat-radio-label-text-size);letter-spacing:var(--mat-radio-label-text-tracking);font-weight:var(--mat-radio-label-text-weight)}.mat-mdc-radio-button .mdc-radio--disabled+label{color:var(--mat-radio-disabled-label-color)}.mat-mdc-radio-button .mat-radio-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:50%}.mat-mdc-radio-button .mat-radio-ripple .mat-ripple-element{opacity:.14}.mat-mdc-radio-button .mat-radio-ripple::before{border-radius:50%}.mat-mdc-radio-button .mdc-radio .mdc-radio__native-control:focus:enabled:not(:checked)~.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-unselected-focus-icon-color, black)}.mat-mdc-radio-button.cdk-focused .mat-mdc-focus-indicator::before{content:""}.mat-mdc-radio-touch-target{position:absolute;top:50%;left:50%;height:48px;width:48px;transform:translate(-50%, -50%);display:var(--mat-radio-touch-target-display)}[dir=rtl] .mat-mdc-radio-touch-target{left:auto;right:50%;transform:translate(50%, -50%)}'],encapsulation:2,changeDetection:0});let r=o;return r})(),qe=(()=>{let o=class o{};o.\u0275fac=function(i){return new(i||o)},o.\u0275mod=P({type:o}),o.\u0275inj=z({imports:[G,Y,Z,oe,G]});let r=o;return r})();export{me as a,oe as b,qe as c};
|
|
1
|
+
import{b as W}from"./chunk-CTKEWRX4.js";import{D as K,K as G,S as X,T as Z,aa as ee}from"./chunk-GXHE2CDH.js";import{a as J}from"./chunk-QOA24ZLA.js";import{$a as h,Bb as Q,Cb as w,Da as V,Db as p,Dc as Y,Eb as f,Ia as m,Ja as d,Pb as H,Qb as $,Ra as L,Ya as R,_ as q,_a as C,aa as z,ba as g,bb as D,da as M,ga as O,ha as P,ia as x,jc as T,kc as c,lb as s,lc as A,mb as l,nb as E,oa as k,pa as y,rb as B,ta as S,ua as j,ub as b,xb as N,ya as _,yb as U,za as I}from"./chunk-HSFUKC7R.js";var de=["input"],ce=["formField"],ne=["*"],ie=0,v=class{constructor(o,re){this.source=o,this.value=re}},se={provide:J,useExisting:q(()=>me),multi:!0},te=new g("MatRadioGroup"),le=new g("mat-radio-default-options",{providedIn:"root",factory:ue});function ue(){return{color:"accent"}}var me=(()=>{let o=class o{get name(){return this._name}set name(e){this._name=e,this._updateRadioButtonNames()}get labelPosition(){return this._labelPosition}set labelPosition(e){this._labelPosition=e==="before"?"before":"after",this._markRadiosForCheck()}get value(){return this._value}set value(e){this._value!==e&&(this._value=e,this._updateSelectedRadioFromValue(),this._checkSelectedRadioButton())}_checkSelectedRadioButton(){this._selected&&!this._selected.checked&&(this._selected.checked=!0)}get selected(){return this._selected}set selected(e){this._selected=e,this.value=e?e.value:null,this._checkSelectedRadioButton()}get disabled(){return this._disabled}set disabled(e){this._disabled=e,this._markRadiosForCheck()}get required(){return this._required}set required(e){this._required=e,this._markRadiosForCheck()}constructor(e){this._changeDetector=e,this._value=null,this._name=`mat-radio-group-${ie++}`,this._selected=null,this._isInitialized=!1,this._labelPosition="after",this._disabled=!1,this._required=!1,this._controlValueAccessorChangeFn=()=>{},this.onTouched=()=>{},this.change=new I}ngAfterContentInit(){this._isInitialized=!0,this._buttonChanges=this._radios.changes.subscribe(()=>{this.selected&&!this._radios.find(e=>e===this.selected)&&(this._selected=null)})}ngOnDestroy(){this._buttonChanges?.unsubscribe()}_touch(){this.onTouched&&this.onTouched()}_updateRadioButtonNames(){this._radios&&this._radios.forEach(e=>{e.name=this.name,e._markForCheck()})}_updateSelectedRadioFromValue(){let e=this._selected!==null&&this._selected.value===this._value;this._radios&&!e&&(this._selected=null,this._radios.forEach(i=>{i.checked=this.value===i.value,i.checked&&(this._selected=i)}))}_emitChangeEvent(){this._isInitialized&&this.change.emit(new v(this._selected,this._value))}_markRadiosForCheck(){this._radios&&this._radios.forEach(e=>e._markForCheck())}writeValue(e){this.value=e,this._changeDetector.markForCheck()}registerOnChange(e){this._controlValueAccessorChangeFn=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this.disabled=e,this._changeDetector.markForCheck()}};o.\u0275fac=function(i){return new(i||o)(d(T))},o.\u0275dir=x({type:o,selectors:[["mat-radio-group"]],contentQueries:function(i,t,a){if(i&1&&Q(a,oe,5),i&2){let n;p(n=f())&&(t._radios=n)}},hostAttrs:["role","radiogroup",1,"mat-mdc-radio-group"],inputs:{color:"color",name:"name",labelPosition:"labelPosition",value:"value",selected:"selected",disabled:[2,"disabled","disabled",c],required:[2,"required","required",c]},outputs:{change:"change"},exportAs:["matRadioGroup"],standalone:!0,features:[H([se,{provide:te,useExisting:o}]),R]});let r=o;return r})(),oe=(()=>{let o=class o{get checked(){return this._checked}set checked(e){this._checked!==e&&(this._checked=e,e&&this.radioGroup&&this.radioGroup.value!==this.value?this.radioGroup.selected=this:!e&&this.radioGroup&&this.radioGroup.value===this.value&&(this.radioGroup.selected=null),e&&this._radioDispatcher.notify(this.id,this.name),this._changeDetector.markForCheck())}get value(){return this._value}set value(e){this._value!==e&&(this._value=e,this.radioGroup!==null&&(this.checked||(this.checked=this.radioGroup.value===e),this.checked&&(this.radioGroup.selected=this)))}get labelPosition(){return this._labelPosition||this.radioGroup&&this.radioGroup.labelPosition||"after"}set labelPosition(e){this._labelPosition=e}get disabled(){return this._disabled||this.radioGroup!==null&&this.radioGroup.disabled}set disabled(e){this._setDisabled(e)}get required(){return this._required||this.radioGroup&&this.radioGroup.required}set required(e){this._required=e}get color(){return this._color||this.radioGroup&&this.radioGroup.color||this._providerOverride&&this._providerOverride.color||"accent"}set color(e){this._color=e}get inputId(){return`${this.id||this._uniqueId}-input`}constructor(e,i,t,a,n,u,ae,F){this._elementRef=i,this._changeDetector=t,this._focusMonitor=a,this._radioDispatcher=n,this._providerOverride=ae,this._uniqueId=`mat-radio-${++ie}`,this.id=this._uniqueId,this.disableRipple=!1,this.tabIndex=0,this.change=new I,this._checked=!1,this._value=null,this._removeUniqueSelectionListener=()=>{},this._injector=M(j),this.radioGroup=e,this._noopAnimations=u==="NoopAnimations",F&&(this.tabIndex=A(F,0))}focus(e,i){i?this._focusMonitor.focusVia(this._inputElement,i,e):this._inputElement.nativeElement.focus(e)}_markForCheck(){this._changeDetector.markForCheck()}ngOnInit(){this.radioGroup&&(this.checked=this.radioGroup.value===this._value,this.checked&&(this.radioGroup.selected=this),this.name=this.radioGroup.name),this._removeUniqueSelectionListener=this._radioDispatcher.listen((e,i)=>{e!==this.id&&i===this.name&&(this.checked=!1)})}ngDoCheck(){this._updateTabIndex()}ngAfterViewInit(){this._updateTabIndex(),this._focusMonitor.monitor(this._elementRef,!0).subscribe(e=>{!e&&this.radioGroup&&this.radioGroup._touch()})}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef),this._removeUniqueSelectionListener()}_emitChangeEvent(){this.change.emit(new v(this,this._value))}_isRippleDisabled(){return this.disableRipple||this.disabled}_onInputClick(e){e.stopPropagation()}_onInputInteraction(e){if(e.stopPropagation(),!this.checked&&!this.disabled){let i=this.radioGroup&&this.value!==this.radioGroup.value;this.checked=!0,this._emitChangeEvent(),this.radioGroup&&(this.radioGroup._controlValueAccessorChangeFn(this.value),i&&this.radioGroup._emitChangeEvent())}}_onTouchTargetClick(e){this._onInputInteraction(e),this.disabled||this._inputElement.nativeElement.focus()}_setDisabled(e){this._disabled!==e&&(this._disabled=e,this._changeDetector.markForCheck())}_updateTabIndex(){let e=this.radioGroup,i;if(!e||!e.selected||this.disabled?i=this.tabIndex:i=e.selected===this?this.tabIndex:-1,i!==this._previousTabIndex){let t=this._inputElement?.nativeElement;t&&(t.setAttribute("tabindex",i+""),this._previousTabIndex=i,L(()=>{queueMicrotask(()=>{e&&e.selected&&e.selected!==this&&document.activeElement===t&&(e.selected?._inputElement.nativeElement.focus(),document.activeElement===t&&this._inputElement.nativeElement.blur())})},{injector:this._injector}))}}};o.\u0275fac=function(i){return new(i||o)(d(te,8),d(_),d(T),d(K),d(W),d(V,8),d(le,8),S("tabindex"))},o.\u0275cmp=O({type:o,selectors:[["mat-radio-button"]],viewQuery:function(i,t){if(i&1&&(w(de,5),w(ce,7,_)),i&2){let a;p(a=f())&&(t._inputElement=a.first),p(a=f())&&(t._rippleTrigger=a.first)}},hostAttrs:[1,"mat-mdc-radio-button"],hostVars:15,hostBindings:function(i,t){i&1&&b("focus",function(){return t._inputElement.nativeElement.focus()}),i&2&&(C("id",t.id)("tabindex",null)("aria-label",null)("aria-labelledby",null)("aria-describedby",null),D("mat-primary",t.color==="primary")("mat-accent",t.color==="accent")("mat-warn",t.color==="warn")("mat-mdc-radio-checked",t.checked)("_mat-animation-noopable",t._noopAnimations))},inputs:{id:"id",name:"name",ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],ariaDescribedby:[0,"aria-describedby","ariaDescribedby"],disableRipple:[2,"disableRipple","disableRipple",c],tabIndex:[2,"tabIndex","tabIndex",e=>e==null?0:A(e)],checked:[2,"checked","checked",c],value:"value",labelPosition:"labelPosition",disabled:[2,"disabled","disabled",c],required:[2,"required","required",c],color:"color"},outputs:{change:"change"},exportAs:["matRadioButton"],standalone:!0,features:[R,$],ngContentSelectors:ne,decls:13,vars:16,consts:[["formField",""],["input",""],["mat-internal-form-field","",3,"labelPosition"],[1,"mdc-radio"],[1,"mat-mdc-radio-touch-target",3,"click"],["type","radio",1,"mdc-radio__native-control",3,"change","id","checked","disabled","required"],[1,"mdc-radio__background"],[1,"mdc-radio__outer-circle"],[1,"mdc-radio__inner-circle"],["mat-ripple","",1,"mat-radio-ripple","mat-mdc-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleCentered"],[1,"mat-ripple-element","mat-radio-persistent-ripple"],[1,"mdc-label",3,"for"]],template:function(i,t){if(i&1){let a=B();N(),s(0,"div",2,0)(2,"div",3)(3,"div",4),b("click",function(u){return k(a),y(t._onTouchTargetClick(u))}),l(),s(4,"input",5,1),b("change",function(u){return k(a),y(t._onInputInteraction(u))}),l(),s(6,"div",6),E(7,"div",7)(8,"div",8),l(),s(9,"div",9),E(10,"div",10),l()(),s(11,"label",11),U(12),l()()}i&2&&(h("labelPosition",t.labelPosition),m(2),D("mdc-radio--disabled",t.disabled),m(2),h("id",t.inputId)("checked",t.checked)("disabled",t.disabled)("required",t.required),C("name",t.name)("value",t.value)("aria-label",t.ariaLabel)("aria-labelledby",t.ariaLabelledby)("aria-describedby",t.ariaDescribedby),m(5),h("matRippleTrigger",t._rippleTrigger.nativeElement)("matRippleDisabled",t._isRippleDisabled())("matRippleCentered",!0),m(2),h("for",t.inputId))},dependencies:[X,ee],styles:['.mat-mdc-radio-button{-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-radio-button .mdc-radio{display:inline-block;position:relative;flex:0 0 auto;box-sizing:content-box;width:20px;height:20px;cursor:pointer;will-change:opacity,transform,border-color,color;padding:calc((var(--mdc-radio-state-layer-size) - 20px)/2)}.mat-mdc-radio-button .mdc-radio:hover .mdc-radio__native-control:not([disabled]):not(:focus)~.mdc-radio__background::before{opacity:.04;transform:scale(1)}.mat-mdc-radio-button .mdc-radio:hover .mdc-radio__native-control:not([disabled])~.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-unselected-hover-icon-color)}.mat-mdc-radio-button .mdc-radio:hover .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button .mdc-radio:hover .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__inner-circle{border-color:var(--mdc-radio-selected-hover-icon-color)}.mat-mdc-radio-button .mdc-radio:active .mdc-radio__native-control:enabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-unselected-pressed-icon-color)}.mat-mdc-radio-button .mdc-radio:active .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button .mdc-radio:active .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__inner-circle{border-color:var(--mdc-radio-selected-pressed-icon-color)}.mat-mdc-radio-button .mdc-radio__background{display:inline-block;position:relative;box-sizing:border-box;width:20px;height:20px}.mat-mdc-radio-button .mdc-radio__background::before{position:absolute;transform:scale(0, 0);border-radius:50%;opacity:0;pointer-events:none;content:"";transition:opacity 90ms cubic-bezier(0.4, 0, 0.6, 1),transform 90ms cubic-bezier(0.4, 0, 0.6, 1);width:var(--mdc-radio-state-layer-size);height:var(--mdc-radio-state-layer-size);top:calc(-1*(var(--mdc-radio-state-layer-size) - 20px)/2);left:calc(-1*(var(--mdc-radio-state-layer-size) - 20px)/2)}.mat-mdc-radio-button .mdc-radio__outer-circle{position:absolute;top:0;left:0;box-sizing:border-box;width:100%;height:100%;border-width:2px;border-style:solid;border-radius:50%;transition:border-color 90ms cubic-bezier(0.4, 0, 0.6, 1)}.mat-mdc-radio-button .mdc-radio__inner-circle{position:absolute;top:0;left:0;box-sizing:border-box;width:100%;height:100%;transform:scale(0, 0);border-width:10px;border-style:solid;border-radius:50%;transition:transform 90ms cubic-bezier(0.4, 0, 0.6, 1),border-color 90ms cubic-bezier(0.4, 0, 0.6, 1)}.mat-mdc-radio-button .mdc-radio__native-control{position:absolute;margin:0;padding:0;opacity:0;top:0;right:0;left:0;cursor:inherit;z-index:1;width:var(--mdc-radio-state-layer-size);height:var(--mdc-radio-state-layer-size)}.mat-mdc-radio-button .mdc-radio__native-control:checked+.mdc-radio__background,.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background{transition:opacity 90ms cubic-bezier(0, 0, 0.2, 1),transform 90ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-radio-button .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__outer-circle{transition:border-color 90ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-radio-button .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__inner-circle{transition:transform 90ms cubic-bezier(0, 0, 0.2, 1),border-color 90ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-radio-button .mdc-radio__native-control:focus+.mdc-radio__background::before{transform:scale(1);opacity:.12;transition:opacity 90ms cubic-bezier(0, 0, 0.2, 1),transform 90ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-radio-button .mdc-radio__native-control:disabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-disabled-unselected-icon-color);opacity:var(--mdc-radio-disabled-unselected-icon-opacity)}.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background{cursor:default}.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-disabled-selected-icon-color);opacity:var(--mdc-radio-disabled-selected-icon-opacity)}.mat-mdc-radio-button .mdc-radio__native-control:enabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-unselected-icon-color)}.mat-mdc-radio-button .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__inner-circle{border-color:var(--mdc-radio-selected-icon-color)}.mat-mdc-radio-button .mdc-radio__native-control:enabled:focus:checked+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-radio-button .mdc-radio__native-control:enabled:focus:checked+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-selected-focus-icon-color)}.mat-mdc-radio-button .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__inner-circle{transform:scale(0.5);transition:transform 90ms cubic-bezier(0, 0, 0.2, 1),border-color 90ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-radio-button .mdc-radio--disabled{cursor:default;pointer-events:none}.mat-mdc-radio-button._mat-animation-noopable .mdc-radio__background::before,.mat-mdc-radio-button._mat-animation-noopable .mdc-radio__outer-circle,.mat-mdc-radio-button._mat-animation-noopable .mdc-radio__inner-circle{transition:none !important}.mat-mdc-radio-button .mdc-radio__background::before{background-color:var(--mat-radio-ripple-color)}.mat-mdc-radio-button.mat-mdc-radio-checked .mdc-radio__background::before{background-color:var(--mat-radio-checked-ripple-color)}.mat-mdc-radio-button.mat-mdc-radio-checked .mat-ripple-element{background-color:var(--mat-radio-checked-ripple-color)}.mat-mdc-radio-button .mat-internal-form-field{color:var(--mat-radio-label-text-color);font-family:var(--mat-radio-label-text-font);line-height:var(--mat-radio-label-text-line-height);font-size:var(--mat-radio-label-text-size);letter-spacing:var(--mat-radio-label-text-tracking);font-weight:var(--mat-radio-label-text-weight)}.mat-mdc-radio-button .mdc-radio--disabled+label{color:var(--mat-radio-disabled-label-color)}.mat-mdc-radio-button .mat-radio-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:50%}.mat-mdc-radio-button .mat-radio-ripple .mat-ripple-element{opacity:.14}.mat-mdc-radio-button .mat-radio-ripple::before{border-radius:50%}.mat-mdc-radio-button .mdc-radio .mdc-radio__native-control:focus:enabled:not(:checked)~.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-unselected-focus-icon-color, black)}.mat-mdc-radio-button.cdk-focused .mat-mdc-focus-indicator::before{content:""}.mat-mdc-radio-touch-target{position:absolute;top:50%;left:50%;height:48px;width:48px;transform:translate(-50%, -50%);display:var(--mat-radio-touch-target-display)}[dir=rtl] .mat-mdc-radio-touch-target{left:auto;right:50%;transform:translate(50%, -50%)}'],encapsulation:2,changeDetection:0});let r=o;return r})(),qe=(()=>{let o=class o{};o.\u0275fac=function(i){return new(i||o)},o.\u0275mod=P({type:o}),o.\u0275inj=z({imports:[G,Y,Z,oe,G]});let r=o;return r})();export{me as a,oe as b,qe as c};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as E}from"./chunk-EEOWKNSQ.js";import{g as j}from"./chunk-QITW54IW.js";import{b as S,e as d}from"./chunk-AAFEUTPF.js";import{b as a,c as g}from"./chunk-2AMEIUWK.js";import{$ as l,B as C,E as u,Ua as U,Wc as w,d as P,da as c,n,q as A,w as I}from"./chunk-HSFUKC7R.js";var R=(()=>{let r=class r{constructor(){this.httpService=c(d)}getAttributes(o,t){return this.httpService.get("api/product/shopee/GetAttributes",[{key:"ID",value:o},{key:"CategoryID",value:t}])}getCategories(o){return this.httpService.get("api/product/shopee/GetCategories",[{key:"ID",value:o}])}uploadProduct(o){return this.httpService.post("api/product/shopee/AddProduct",o).pipe(u(e=>n(null)))}generateAttribute(o){return o.map(t=>({attribute_id:t.attribute_id,attribute_value_list:t.attribute_value_list.map(e=>({value_id:e.value_id,original_value_name:e.original_value_name}))})),o}};r.\u0275fac=function(t){return new(t||r)},r.\u0275prov=l({token:r,factory:r.\u0275fac,providedIn:"root"});let i=r;return i})();var D=(()=>{let r=class r{constructor(){this.httpService=c(d)}getCategories(o){return this.httpService.get("api/product/tiktok/GetCategories",[{key:"ID",value:o}])}uploadProduct(o){return this.httpService.post("api/product/tiktok/AddProduct",o).pipe(u(e=>n(null)))}generateAttribute(o){let t;return o.map(e=>(e.type=="PRODUCT_PROPERTY"?t={id:e.id,name:e.name,type:e.type,values:e.values}:t={id:e.id,name:e.values[0].id,type:e.type},t))}};r.\u0275fac=function(t){return new(t||r)},r.\u0275prov=l({token:r,factory:r.\u0275fac,providedIn:"root"});let i=r;return i})();var H=(()=>{let r=class r{constructor(){this.httpService=c(d)}getAttributes(o,t){return this.httpService.get("api/product/lazada/GetAttributes",[{key:"ID",value:o},{key:"CategoryID",value:t}])}getCategories(o){return this.httpService.get("api/product/lazada/GetCategories",[{key:"ID",value:o}])}uploadProduct(o){return this.httpService.post("api/product/lazada/AddProduct",o).pipe(u(e=>n(null)))}};r.\u0275fac=function(t){return new(t||r)},r.\u0275prov=l({token:r,factory:r.\u0275fac,providedIn:"root"});let i=r;return i})();var T=(()=>{let r=class r{constructor(){this.httpService=c(d)}getAttributes(o,t){return this.httpService.get("api/product/woo/GetAttributes",[{key:"ID",value:o},{key:"CategoryID",value:t}])}getCategories(o){return this.httpService.get("api/product/woo/GetCategories",[{key:"ID",value:o}])}uploadProduct(o){return this.httpService.post("api/product/woo/AddProduct",o).pipe(u(e=>n(null)))}};r.\u0275fac=function(t){return new(t||r)},r.\u0275prov=l({token:r,factory:r.\u0275fac,providedIn:"root"});let i=r;return i})();var y=class{};var b=class{};var F=(()=>{let r=class r{constructor(){this.httpService=c(d)}getCategories(o){return this.httpService.get("api/product/tokopedia/GetCategories",[{key:"ID",value:o}])}uploadProduct(o){return this.httpService.post("api/product/tokopedia/AddProduct",o).pipe(u(e=>n(null)))}};r.\u0275fac=function(t){return new(t||r)},r.\u0275prov=l({token:r,factory:r.\u0275fac,providedIn:"root"});let i=r;return i})();var x=(()=>{let r=class r{constructor(){this.toastrService=c(S)}showToastrUploadMultiple(o){let t=[],e=[],s=this.getResponseList(o);if(o.filter(p=>g.IsNotEmpty(p)).forEach(p=>{typeof p?.Response=="string"?e=[...e,s.length>1?this.setHtmlli(p.Response):this.setHtmlli(p.Response,!1)]:(p?.Response?.Success_list.forEach(f=>{t=[...t,s.length>1?this.setHtmlli(`Product ${f.Name} was <b>successfully</b> uploaded to ${p.Channel}`):this.setHtmlli(`Product ${f.Name} was <b>successfully</b> uploaded to ${p.Channel}`,!1)]}),p?.Response.Fail_list.forEach(f=>{e=[...e,s.length>1?this.setHtmlli(f.Message):this.setHtmlli(f.Message,!1)]}))}),e.length>0&&t.length>0){let p=[...t,...e];this.toastrService.warning(this.concatMessage(p),"Warning!",{enableHtml:!0})}else t.length>0&&e.length==0?this.toastrService.success(this.concatMessage(t),"Success",{enableHtml:!0}):this.toastrService.error(this.concatMessage(e),"Error",{enableHtml:!0})}concatMessage(o=[]){let t="";return o.forEach(e=>{t+=e}),o.length>1?`<ol>${t}</ol>`:t}getResponseList(o){let t=[];return o.filter(e=>g.IsNotEmpty(e)).forEach(e=>{typeof e.Response=="string"?t=[...t,e.Response]:(e?.Response.Success_list.forEach(s=>{t=[...t,s.Name]}),e?.Response.Fail_list.forEach(s=>{t=[...t,s.Message]}))}),t}setHtmlli(o,t=!0){return t?`<li>${o}</li>`:o}};r.\u0275fac=function(t){return new(t||r)},r.\u0275prov=l({token:r,factory:r.\u0275fac,providedIn:"root"});let i=r;return i})();var M=(()=>{let r=class r{constructor(){this.httpService=c(d)}uploadProduct(o){return this.httpService.post("api/product/shopify/AddProduct",o).pipe(u(e=>n(null)))}};r.\u0275fac=function(t){return new(t||r)},r.\u0275prov=l({token:r,factory:r.\u0275fac,providedIn:"root"});let i=r;return i})();var zt=(()=>{let r=class r{constructor(){this.authService=c(j),this.productService=c(E),this.shoppeUploadService=c(R),this.tiktokUploadService=c(D),this.lazadaUploadService=c(H),this.tokopediaUploadService=c(F),this.wooUploadService=c(T),this.shopifyUploadService=c(M),this.toastrHandlingService=c(x),this.toastr=c(S),this.router=c(w),this._channels=this.authService.getChannels(),this._selectedProduct=new P(this.getStoredProducts()),this.selectedProduct$=this._selectedProduct.asObservable().pipe(C(o=>o&&o.length>0))}get channels(){return this._channels}getStoredProducts(){let o=localStorage.getItem("productsUpload");if(o){let t=JSON.parse(o);return t&&t.length>0?t:[]}else return[]}setSelectedProduct(o){localStorage.setItem("productsUpload",JSON.stringify(o)),this._selectedProduct.next(o)}clearSelectedProduct(){localStorage.removeItem("productsUpload"),this._selectedProduct.next([])}getUnselectedChannels(){let o=this._selectedProduct.getValue();return this.productService.filterUnselectedChannel(o,this.channels)}get channelProductUpload(){let o=this.getUnselectedChannels();return U(o.map(e=>{let s=new y;return s.id=e.ID,s.name=e.Name,s.type=e.TypeID,s.categoryId=null,s.attributes=[],s.selected=!1,s}))}onUploadProduct(o){let t=o.filter(e=>e.selected&&e.attributes.length>0&&e.type==a.Shopee||e.selected&&g.IsNotEmpty(e.categoryId)&&e.type!=a.Shopee);if(t.length>0){let e=this.generateDataForUpload(t);this.uploadProduct(e)}else this.toastr.warning("Please select a channel and category to upload the product.","Warning!")}uploadProduct(o){let t=this.generateObservableForUpload(o);I(t).pipe(A(e=>{let s=[];return e.forEach(p=>{s=[...s,...p]}),s})).subscribe({next:(e=[])=>{g.IsNotEmpty(e)&&this.toastrHandlingService.showToastrUploadMultiple(e),this.hasSuccessRes(e)&&this.onSuccessUpload()}})}hasSuccessRes(o){let t=!1;return o.forEach(e=>{e?.Response.Success_list?.length>0&&g.IsNotEmpty(e)&&(t=!0)}),t}onSuccessUpload(){this.router.navigate(["/menu/products/status/sold-in-channel"]),this.clearSelectedProduct()}generateObservableForUpload(o){let t=[],e=[],s=[],p=[],f=[],k=[];o.forEach(h=>{switch(h.ChannelType){case a.Shopee:e.push(h);break;case a.Tiktok:t.push(h);break;case a.Lazada:s.push(h);break;case a.Tokopedia:p.push(h);break;case a.WooCommerce:f.push(h);break;case a.Shopify:k.push(h);break}});let m=[];return[{type:a.Shopee,data:e},{type:a.Tiktok,data:t},{type:a.Lazada,data:s},{type:a.Tokopedia,data:p},{type:a.WooCommerce,data:f},{type:a.Shopify,data:k}].filter(h=>h.data.length>0).forEach(h=>{switch(h.type){case a.Shopee:m.push(this.shoppeUploadService.uploadProduct(e));break;case a.Tiktok:m.push(this.tiktokUploadService.uploadProduct(t));break;case a.Lazada:m.push(this.lazadaUploadService.uploadProduct(s));break;case a.Tokopedia:m.push(this.tokopediaUploadService.uploadProduct(p));break;case a.WooCommerce:m.push(this.wooUploadService.uploadProduct(f));break;case a.Shopify:m.push(this.shopifyUploadService.uploadProduct(k));break}}),m}generateDataForUpload(o){let t=[];return o.forEach(e=>{let s=new b;s.ChannelID=e.id,s.ChannelType=e.type,s.Products=this._selectedProduct.getValue(),e.type==a.Shopify?delete s.CategoryID:s.CategoryID=e.categoryId,e.type==a.WooCommerce||e.type==a.Shopify?s.Attribute=e.attributes[0]:s.Attributes=this.formatAttributes(e.type,e.attributes),t.push(s)}),t}formatAttributes(o,t){let e;switch(o){case a.Shopee:e=this.shoppeUploadService.generateAttribute(t);break;case a.Tiktok:e=this.tiktokUploadService.generateAttribute(t);break;case a.WooCommerce:e=this.tiktokUploadService.generateAttribute(t);break;case a.Tokopedia:e=t;break;case a.Shopify:e=t;break;default:e=[];break}return e}};r.\u0275fac=function(t){return new(t||r)},r.\u0275prov=l({token:r,factory:r.\u0275fac,providedIn:"root"});let i=r;return i})();export{R as a,D as b,H as c,F as d,T as e,zt as f};
|