marketplacepos 3.9.2 → 3.9.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/{chunk-LSG32F4X.js → chunk-35SISJKC.js} +1 -1
- package/Marketplace/{chunk-WDVFAXEE.js → chunk-3KO3N6JP.js} +1 -1
- package/Marketplace/{chunk-2GEKKULX.js → chunk-3OMVIKHK.js} +1 -1
- package/Marketplace/{chunk-GIXQOMAF.js → chunk-44TEKK34.js} +1 -1
- package/Marketplace/chunk-4VWZIBEC.js +1 -0
- package/Marketplace/{chunk-XH2RYIXU.js → chunk-5F2YQ7XL.js} +1 -1
- package/Marketplace/{chunk-62YVBX6C.js → chunk-5K7YSLKL.js} +1 -1
- package/Marketplace/{chunk-PEROEQOW.js → chunk-5XEX4Z6N.js} +1 -1
- package/Marketplace/{chunk-YWSTU35G.js → chunk-5YDKDDXQ.js} +2 -2
- package/Marketplace/{chunk-QC2RB3LW.js → chunk-673XNROP.js} +1 -1
- package/Marketplace/{chunk-PTD6INQZ.js → chunk-6O46WM77.js} +1 -1
- package/Marketplace/{chunk-A4NDARMD.js → chunk-7F3GACIE.js} +1 -1
- package/Marketplace/{chunk-YMW3PRQO.js → chunk-7F4OMKVB.js} +1 -1
- package/Marketplace/{chunk-6GHDH7BV.js → chunk-AI77CZ3S.js} +1 -1
- package/Marketplace/{chunk-3MUKJETU.js → chunk-AOQBLGBU.js} +1 -1
- package/Marketplace/{chunk-USTIBZQZ.js → chunk-BFJBMKDS.js} +1 -1
- package/Marketplace/{chunk-DR77LMQ5.js → chunk-BPOHVA6C.js} +1 -1
- package/Marketplace/{chunk-42URWJWL.js → chunk-BZT72IIB.js} +1 -1
- package/Marketplace/{chunk-KPVSCTPE.js → chunk-CFWKH54E.js} +1 -1
- package/Marketplace/{chunk-MNQTYXTP.js → chunk-CXQFJUAW.js} +1 -1
- package/Marketplace/{chunk-6TL753XX.js → chunk-D4PUISDS.js} +1 -1
- package/Marketplace/{chunk-WGRN55OQ.js → chunk-DG2DUPHG.js} +1 -1
- package/Marketplace/{chunk-DAOVB2Q7.js → chunk-DOMXTGO5.js} +1 -1
- package/Marketplace/{chunk-MSDWP3Z5.js → chunk-DR4WIP6T.js} +1 -1
- package/Marketplace/chunk-EEKM3HHQ.js +1 -0
- package/Marketplace/{chunk-TTTBABPM.js → chunk-GVJVVJCU.js} +1 -1
- package/Marketplace/{chunk-UU4FCLSH.js → chunk-IIGTCNJI.js} +1 -1
- package/Marketplace/{chunk-NUQYRQUS.js → chunk-IL3R7THF.js} +1 -1
- package/Marketplace/{chunk-ZOAWBPA4.js → chunk-J7N5VFE6.js} +1 -1
- package/Marketplace/{chunk-HWGOH7QS.js → chunk-L72SNBKA.js} +1 -1
- package/Marketplace/{chunk-5MVSVVTZ.js → chunk-LFB6AUP4.js} +1 -1
- package/Marketplace/{chunk-P5FK7XH7.js → chunk-M7ZLTUVL.js} +1 -1
- package/Marketplace/{chunk-NDL2OQM7.js → chunk-MICIQBL4.js} +1 -1
- package/Marketplace/{chunk-AYOR2E3R.js → chunk-MUDZXRNT.js} +1 -1
- package/Marketplace/{chunk-5KWI6CNM.js → chunk-MWOXQU66.js} +1 -1
- package/Marketplace/{chunk-253CGPDL.js → chunk-NA7DMV7H.js} +1 -1
- package/Marketplace/{chunk-TH3YEBZM.js → chunk-NFHX3EWZ.js} +1 -1
- package/Marketplace/{chunk-LLITFBOE.js → chunk-O6PGRAJA.js} +1 -1
- package/Marketplace/{chunk-K2D3HYO3.js → chunk-OVSLUEIO.js} +1 -1
- package/Marketplace/{chunk-X7OCPOXW.js → chunk-QDC2JFGY.js} +1 -1
- package/Marketplace/{chunk-XBFPNQRE.js → chunk-QVEJEIWR.js} +1 -1
- package/Marketplace/{chunk-TEMOBJ6P.js → chunk-RISMLJLZ.js} +1 -1
- package/Marketplace/{chunk-CQDJKHRJ.js → chunk-SMF6UCR5.js} +1 -1
- package/Marketplace/{chunk-T726PSLZ.js → chunk-TVKWMJ24.js} +1 -1
- package/Marketplace/{chunk-HTEDNGSI.js → chunk-UYW3YL3H.js} +1 -1
- package/Marketplace/{chunk-MU6WSNWI.js → chunk-V74TRO5C.js} +1 -1
- package/Marketplace/{chunk-ZKFCU6QY.js → chunk-VTLJVEYF.js} +1 -1
- package/Marketplace/{chunk-3ADBD6TU.js → chunk-VVTMP7TD.js} +1 -1
- package/Marketplace/{chunk-OGZ4S2OZ.js → chunk-W2SKBEUZ.js} +1 -1
- package/Marketplace/{chunk-5G6F6KM6.js → chunk-W6HDGIZB.js} +1 -1
- package/Marketplace/{chunk-RB4PODHN.js → chunk-WHZLZBWD.js} +1 -1
- package/Marketplace/{chunk-OHUTMYI3.js → chunk-WMKNIYJG.js} +1 -1
- package/Marketplace/{chunk-JZNKYXRR.js → chunk-WTNHPIXD.js} +1 -1
- package/Marketplace/{chunk-NO7WERYV.js → chunk-XBCSTQJ3.js} +1 -1
- package/Marketplace/{chunk-7NUYZDNH.js → chunk-YAWRXDGC.js} +1 -1
- package/Marketplace/{chunk-7DWQVDUN.js → chunk-Z7PAAM54.js} +1 -1
- package/Marketplace/{chunk-WOVAE35N.js → chunk-ZIANW63Q.js} +1 -1
- package/Marketplace/{chunk-KES3BFYS.js → chunk-ZKY4MRMH.js} +1 -1
- package/Marketplace/{chunk-VK5MBCEQ.js → chunk-ZNIAYABL.js} +1 -1
- package/Marketplace/index.html +2 -2
- package/Marketplace/{main-A64TEOJA.js → main-5EL5X5GA.js} +1 -1
- package/Marketplace/{styles-XF7HDZPE.css → styles-HLURZDLQ.css} +1 -1
- package/package.json +1 -1
- package/Marketplace/chunk-JRVVHEWT.js +0 -1
- package/Marketplace/chunk-YJA6GNVB.js +0 -1
- /package/Marketplace/{chunk-CRNJ2Q5T.js → chunk-KOJSHFZJ.js} +0 -0
- /package/Marketplace/{chunk-PXXT4AMP.js → chunk-T2YIFX3Q.js} +0 -0
- /package/Marketplace/{chunk-FXU7TISG.js → chunk-WJGIBFHG.js} +0 -0
- /package/Marketplace/{chunk-3OPATVPE.js → chunk-Y4MB3DWC.js} +0 -0
- /package/Marketplace/{polyfills-JB4R6HHU.js → polyfills-25D6JJC3.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{$ as f,A as b,E as F,Hb as X,I as L,Ia as q,Ja as V,Jc as Z,L as G,N as y,R as M,T as j,Ta as Q,X as C,aa as K,ba as E,ca as c,d,da as p,fa as N,ga as J,ia as Y,m as g,n as h,q as S,s as m,t as I,w as z}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.2/Marketplace/chunk-WOVAE35N.js";import{a as l,b as v}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.2/Marketplace/chunk-CRNJ2Q5T.js";var A={REMOVE:"remove",SHOW:"show"},ee=(()=>{let t=class t{constructor(){this.strategiesSource=new d({}),this.strategies$=this.strategiesSource.asObservable()}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=f({token:t,factory:t.\u0275fac});let r=t;return r})(),B=new E("USE_CONFIGURATION_STORE"),$=(()=>{let t=class t{constructor(e=!1,i){this.isolate=e,this.configurationStore=i,this.strategiesSource=this.isolate?new d({}):this.configurationStore.strategiesSource,this.strategies$=this.strategiesSource.asObservable(),this.onAuthorisedDefaultStrategy=this.isolate?void 0:this.configurationStore.onAuthorisedDefaultStrategy,this.onUnAuthorisedDefaultStrategy=this.isolate?void 0:this.configurationStore.onUnAuthorisedDefaultStrategy}setDefaultOnAuthorizedStrategy(e){this.isolate?this.onAuthorisedDefaultStrategy=this.getDefinedStrategy(e):(this.configurationStore.onAuthorisedDefaultStrategy=this.getDefinedStrategy(e),this.onAuthorisedDefaultStrategy=this.configurationStore.onAuthorisedDefaultStrategy)}setDefaultOnUnauthorizedStrategy(e){this.isolate?this.onUnAuthorisedDefaultStrategy=this.getDefinedStrategy(e):(this.configurationStore.onUnAuthorisedDefaultStrategy=this.getDefinedStrategy(e),this.onUnAuthorisedDefaultStrategy=this.configurationStore.onUnAuthorisedDefaultStrategy)}addPermissionStrategy(e,i){this.strategiesSource.value[e]=i}getStrategy(e){return this.strategiesSource.value[e]}getAllStrategies(){return this.strategiesSource.value}getDefinedStrategy(e){if(this.strategiesSource.value[e]||this.isPredefinedStrategy(e))return e;throw new Error(`No ' ${e} ' strategy is found please define one`)}isPredefinedStrategy(e){return e===A.SHOW||e===A.REMOVE}};t.\u0275fac=function(i){return new(i||t)(c(B),c(ee))},t.\u0275prov=f({token:t,factory:t.\u0275fac});let r=t;return r})();function u(r){return typeof r=="function"}function k(r){if(Object.prototype.toString.call(r)!=="[object Object]")return!1;{let t=Object.getPrototypeOf(r);return t===null||t===Object.prototype}}function ie(r){return!!r&&typeof r=="string"}function T(r){return typeof r=="boolean"}function te(r){return Object.prototype.toString.call(r)==="[object Promise]"}function O(r){return Array.isArray(r)?r.length>0:!!r}function R(r){return ie(r)?[r]:r}var se=(()=>{let t=class t{constructor(){this.permissionsSource=new d({}),this.permissions$=this.permissionsSource.asObservable()}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=f({token:t,factory:t.\u0275fac});let r=t;return r})(),W=new E("USE_PERMISSIONS_STORE"),x=(()=>{let t=class t{constructor(e=!1,i){this.isolate=e,this.permissionsStore=i,this.permissionsSource=this.isolate?new d({}):this.permissionsStore.permissionsSource,this.permissions$=this.permissionsSource.asObservable()}flushPermissions(){this.permissionsSource.next({})}hasPermission(e){return!e||Array.isArray(e)&&e.length===0?Promise.resolve(!0):(e=R(e),this.hasArrayPermission(e))}loadPermissions(e,i){let s=e.reduce((o,n)=>this.reducePermission(o,n,i),{});this.permissionsSource.next(s)}addPermission(e,i){if(Array.isArray(e)){let s=e.reduce((o,n)=>this.reducePermission(o,n,i),this.permissionsSource.value);this.permissionsSource.next(s)}else{let s=this.reducePermission(this.permissionsSource.value,e,i);this.permissionsSource.next(s)}}removePermission(e){let i=l({},this.permissionsSource.value);delete i[e],this.permissionsSource.next(i)}getPermission(e){return this.permissionsSource.value[e]}getPermissions(){return this.permissionsSource.value}reducePermission(e,i,s){return s&&u(s)?v(l({},e),{[i]:{name:i,validationFunction:s}}):v(l({},e),{[i]:{name:i}})}hasArrayPermission(e){let i=e.map(s=>{if(this.hasPermissionValidationFunction(s)){let o=this.permissionsSource.value[s].validationFunction,n=l({},this.permissionsSource.value);return h(null).pipe(S(()=>o(s,n)),j(a=>T(a)?h(a):a),F(()=>h(!1)))}return h(!!this.permissionsSource.value[s])});return g(i).pipe(I(),y(s=>s!==!1,!1),S(s=>s!==!1)).toPromise().then(s=>s)}hasPermissionValidationFunction(e){return!!this.permissionsSource.value[e]&&!!this.permissionsSource.value[e].validationFunction&&u(this.permissionsSource.value[e].validationFunction)}};t.\u0275fac=function(i){return new(i||t)(c(W),c(se))},t.\u0275prov=f({token:t,factory:t.\u0275fac});let r=t;return r})(),U=class{constructor(){this.rolesSource=new d({}),this.roles$=this.rolesSource.asObservable()}},H=new E("USE_ROLES_STORE"),D=(()=>{let t=class t{constructor(e=!1,i,s){this.isolate=e,this.rolesStore=i,this.permissionsService=s,this.rolesSource=this.isolate?new d({}):this.rolesStore.rolesSource,this.roles$=this.rolesSource.asObservable()}addRole(e,i){let s=v(l({},this.rolesSource.value),{[e]:{name:e,validationFunction:i}});this.rolesSource.next(s)}addRoleWithPermissions(e,i){this.permissionsService.addPermission(i),this.addRole(e,i)}addRoles(e){Object.keys(e).forEach((i,s)=>{this.addRole(i,e[i])})}addRolesWithPermissions(e){Object.keys(e).forEach((i,s)=>{this.addRoleWithPermissions(i,e[i])})}flushRoles(){this.rolesSource.next({})}flushRolesAndPermissions(){this.flushRoles(),this.permissionsService.flushPermissions()}removeRole(e){let i=l({},this.rolesSource.value);delete i[e],this.rolesSource.next(i)}getRoles(){return this.rolesSource.value}getRole(e){return this.rolesSource.value[e]}hasOnlyRoles(e){return!e||Array.isArray(e)&&e.length===0?Promise.resolve(!0):(e=R(e),Promise.all([this.hasRoleKey(e),this.hasRolePermission(this.rolesSource.value,e)]).then(([s,o])=>s||o))}hasRoleKey(e){let i=e.map(s=>{if(!!this.rolesSource.value[s]&&!!this.rolesSource.value[s].validationFunction&&u(this.rolesSource.value[s].validationFunction)&&!te(this.rolesSource.value[s].validationFunction)){let n=this.rolesSource.value[s].validationFunction,a=l({},this.rolesSource.value);return h(null).pipe(S(()=>n(s,a)),j(P=>T(P)?h(P):P),F(()=>h(!1)))}return h(!1)});return g(i).pipe(I(),y(s=>s!==!1,!1),S(s=>s!==!1)).toPromise().then(s=>s)}hasRolePermission(e,i){return g(i).pipe(m(s=>e[s]&&Array.isArray(e[s].validationFunction)?g(e[s].validationFunction).pipe(m(o=>this.permissionsService.hasPermission(o)),G(o=>o===!0)):h(!1)),y(s=>s===!0,!1)).toPromise()}};t.\u0275fac=function(i){return new(i||t)(c(H),c(U),c(x))},t.\u0275prov=f({token:t,factory:t.\u0275fac});let r=t;return r})(),pe=(()=>{let t=class t{constructor(){this.permissionsAuthorized=new V,this.permissionsUnauthorized=new V,this.firstMergeUnusedRun=1,this.permissionsService=p(x),this.configurationService=p($),this.rolesService=p(D),this.viewContainer=p(Q),this.changeDetector=p(q),this.templateRef=p(X)}ngOnInit(){this.viewContainer.clear(),this.initPermissionSubscription=this.validateExceptOnlyPermissions()}ngOnChanges(e){let i=e.ngxPermissionsOnly,s=e.ngxPermissionsExcept;if(i||s){if(i&&i.firstChange||s&&s.firstChange)return;b(this.permissionsService.permissions$,this.rolesService.roles$).pipe(M(this.firstMergeUnusedRun),L(1)).subscribe(()=>{if(O(this.ngxPermissionsExcept)){this.validateExceptAndOnlyPermissions();return}if(O(this.ngxPermissionsOnly)){this.validateOnlyPermissions();return}this.handleAuthorisedPermission(this.getAuthorisedTemplates())})}}ngOnDestroy(){this.initPermissionSubscription&&this.initPermissionSubscription.unsubscribe()}validateExceptOnlyPermissions(){return b(this.permissionsService.permissions$,this.rolesService.roles$).pipe(M(this.firstMergeUnusedRun)).subscribe(()=>{if(O(this.ngxPermissionsExcept)){this.validateExceptAndOnlyPermissions();return}if(O(this.ngxPermissionsOnly)){this.validateOnlyPermissions();return}this.handleAuthorisedPermission(this.getAuthorisedTemplates())})}validateExceptAndOnlyPermissions(){Promise.all([this.permissionsService.hasPermission(this.ngxPermissionsExcept),this.rolesService.hasOnlyRoles(this.ngxPermissionsExcept)]).then(([e,i])=>{if(e||i){this.handleUnauthorisedPermission(this.ngxPermissionsExceptElse||this.ngxPermissionsElse);return}if(this.ngxPermissionsOnly)throw!1;this.handleAuthorisedPermission(this.ngxPermissionsExceptThen||this.ngxPermissionsThen||this.templateRef)}).catch(()=>{this.ngxPermissionsOnly?this.validateOnlyPermissions():this.handleAuthorisedPermission(this.ngxPermissionsExceptThen||this.ngxPermissionsThen||this.templateRef)})}validateOnlyPermissions(){Promise.all([this.permissionsService.hasPermission(this.ngxPermissionsOnly),this.rolesService.hasOnlyRoles(this.ngxPermissionsOnly)]).then(([e,i])=>{e||i?this.handleAuthorisedPermission(this.ngxPermissionsOnlyThen||this.ngxPermissionsThen||this.templateRef):this.handleUnauthorisedPermission(this.ngxPermissionsOnlyElse||this.ngxPermissionsElse)}).catch(()=>{this.handleUnauthorisedPermission(this.ngxPermissionsOnlyElse||this.ngxPermissionsElse)})}handleUnauthorisedPermission(e){if(!(T(this.currentAuthorizedState)&&!this.currentAuthorizedState)){if(this.currentAuthorizedState=!1,this.permissionsUnauthorized.emit(),this.getUnAuthorizedStrategyInput()){this.applyStrategyAccordingToStrategyType(this.getUnAuthorizedStrategyInput());return}this.configurationService.onUnAuthorisedDefaultStrategy&&!this.elseBlockDefined()?this.applyStrategy(this.configurationService.onUnAuthorisedDefaultStrategy):this.showTemplateBlockInView(e)}}handleAuthorisedPermission(e){if(!(T(this.currentAuthorizedState)&&this.currentAuthorizedState)){if(this.currentAuthorizedState=!0,this.permissionsAuthorized.emit(),this.getAuthorizedStrategyInput()){this.applyStrategyAccordingToStrategyType(this.getAuthorizedStrategyInput());return}this.configurationService.onAuthorisedDefaultStrategy&&!this.thenBlockDefined()?this.applyStrategy(this.configurationService.onAuthorisedDefaultStrategy):this.showTemplateBlockInView(e)}}applyStrategyAccordingToStrategyType(e){if(ie(e)){this.applyStrategy(e);return}if(u(e)){this.showTemplateBlockInView(this.templateRef),e(this.templateRef);return}}showTemplateBlockInView(e){this.viewContainer.clear(),e&&(this.viewContainer.createEmbeddedView(e),this.changeDetector.markForCheck())}getAuthorisedTemplates(){return this.ngxPermissionsOnlyThen||this.ngxPermissionsExceptThen||this.ngxPermissionsThen||this.templateRef}elseBlockDefined(){return!!this.ngxPermissionsExceptElse||!!this.ngxPermissionsElse}thenBlockDefined(){return!!this.ngxPermissionsExceptThen||!!this.ngxPermissionsThen}getAuthorizedStrategyInput(){return this.ngxPermissionsOnlyAuthorisedStrategy||this.ngxPermissionsExceptAuthorisedStrategy||this.ngxPermissionsAuthorisedStrategy}getUnAuthorizedStrategyInput(){return this.ngxPermissionsOnlyUnauthorisedStrategy||this.ngxPermissionsExceptUnauthorisedStrategy||this.ngxPermissionsUnauthorisedStrategy}applyStrategy(e){if(e===A.SHOW){this.showTemplateBlockInView(this.templateRef);return}if(e===A.REMOVE){this.viewContainer.clear();return}let i=this.configurationService.getStrategy(e);this.showTemplateBlockInView(this.templateRef),i(this.templateRef)}};t.\u0275fac=function(i){return new(i||t)},t.\u0275dir=J({type:t,selectors:[["","ngxPermissionsOnly",""],["","ngxPermissionsExcept",""]],inputs:{ngxPermissionsOnly:"ngxPermissionsOnly",ngxPermissionsOnlyThen:"ngxPermissionsOnlyThen",ngxPermissionsOnlyElse:"ngxPermissionsOnlyElse",ngxPermissionsExcept:"ngxPermissionsExcept",ngxPermissionsExceptElse:"ngxPermissionsExceptElse",ngxPermissionsExceptThen:"ngxPermissionsExceptThen",ngxPermissionsThen:"ngxPermissionsThen",ngxPermissionsElse:"ngxPermissionsElse",ngxPermissionsOnlyAuthorisedStrategy:"ngxPermissionsOnlyAuthorisedStrategy",ngxPermissionsOnlyUnauthorisedStrategy:"ngxPermissionsOnlyUnauthorisedStrategy",ngxPermissionsExceptUnauthorisedStrategy:"ngxPermissionsExceptUnauthorisedStrategy",ngxPermissionsExceptAuthorisedStrategy:"ngxPermissionsExceptAuthorisedStrategy",ngxPermissionsUnauthorisedStrategy:"ngxPermissionsUnauthorisedStrategy",ngxPermissionsAuthorisedStrategy:"ngxPermissionsAuthorisedStrategy"},outputs:{permissionsAuthorized:"permissionsAuthorized",permissionsUnauthorized:"permissionsUnauthorized"},features:[Y]});let r=t;return r})(),re="default";var _=(()=>{let t=class t{constructor(e,i,s){this.permissionsService=e,this.rolesService=i,this.router=s}canActivate(e,i){return this.hasPermissions(e,i)}canActivateChild(e,i){return this.hasPermissions(e,i)}canLoad(e){return this.hasPermissions(e)}canMatch(e){return this.hasPermissions(e)}hasPermissions(e,i){let s=e&&e.data?e.data.permissions:{},o=this.transformPermission(s,e,i);return this.isParameterAvailable(o.except)?this.passingExceptPermissionsValidation(o,e,i):this.isParameterAvailable(o.only)?this.passingOnlyPermissionsValidation(o,e,i):!0}transformPermission(e,i,s){let o=u(e.only)?e.only(i,s):R(e.only),n=u(e.except)?e.except(i,s):R(e.except),a=e.redirectTo;return{only:o,except:n,redirectTo:a}}isParameterAvailable(e){return!!e&&e.length>0}passingExceptPermissionsValidation(e,i,s){if(e.redirectTo&&(u(e.redirectTo)||k(e.redirectTo)&&!this.isRedirectionWithParameters(e.redirectTo))){let o="";return g(e.except).pipe(m(n=>z([this.permissionsService.hasPermission(n),this.rolesService.hasOnlyRoles(n)]).pipe(C(a=>{a.every(w=>w===!1)||(o=n)}))),y(n=>n.some(a=>a===!0),!1),m(n=>o?(this.handleRedirectOfFailedPermission(e,o,i,s),h(!1)):!n&&e.only?this.onlyRedirectCheck(e,i,s):h(!n))).toPromise()}return Promise.all([this.permissionsService.hasPermission(e.except),this.rolesService.hasOnlyRoles(e.except)]).then(([o,n])=>o||n?(e.redirectTo&&this.redirectToAnotherRoute(e.redirectTo,i,s),!1):e.only?this.checkOnlyPermissions(e,i,s):!0)}redirectToAnotherRoute(e,i,s,o){let n=u(e)?e(o,i,s):e;if(this.isRedirectionWithParameters(n)){n.navigationCommands=this.transformNavigationCommands(n.navigationCommands,i,s),n.navigationExtras=this.transformNavigationExtras(n.navigationExtras,i,s),this.router.navigate(n.navigationCommands,n.navigationExtras);return}Array.isArray(n)?this.router.navigate(n):this.router.navigate([n])}isRedirectionWithParameters(e){return k(e)&&(!!e.navigationCommands||!!e.navigationExtras)}transformNavigationCommands(e,i,s){return u(e)?e(i,s):e}transformNavigationExtras(e,i,s){return u(e)?e(i,s):e}onlyRedirectCheck(e,i,s){let o="";return g(e.only).pipe(m(n=>z([this.permissionsService.hasPermission(n),this.rolesService.hasOnlyRoles(n)]).pipe(C(a=>{a.every(w=>w===!1)&&(o=n)}))),y(n=>u(e.redirectTo)?n.some(a=>a===!0):n.every(a=>a===!1),!1),m(n=>u(e.redirectTo)?n?h(!0):(this.handleRedirectOfFailedPermission(e,o,i,s),h(!1)):(o&&this.handleRedirectOfFailedPermission(e,o,i,s),h(!n)))).toPromise()}handleRedirectOfFailedPermission(e,i,s,o){this.isFailedPermissionPropertyOfRedirectTo(e,i)?this.redirectToAnotherRoute(e.redirectTo[i],s,o,i):u(e.redirectTo)?this.redirectToAnotherRoute(e.redirectTo,s,o,i):this.redirectToAnotherRoute(e.redirectTo[re],s,o,i)}isFailedPermissionPropertyOfRedirectTo(e,i){return!!e.redirectTo&&e.redirectTo[i]}checkOnlyPermissions(e,i,s){let o=l({},e);return Promise.all([this.permissionsService.hasPermission(o.only),this.rolesService.hasOnlyRoles(o.only)]).then(([n,a])=>n||a?!0:(o.redirectTo&&this.redirectToAnotherRoute(o.redirectTo,i,s),!1))}passingOnlyPermissionsValidation(e,i,s){return u(e.redirectTo)||k(e.redirectTo)&&!this.isRedirectionWithParameters(e.redirectTo)?this.onlyRedirectCheck(e,i,s):this.checkOnlyPermissions(e,i,s)}};t.\u0275fac=function(i){return new(i||t)(c(x),c(D),c(Z))},t.\u0275prov=f({token:t,factory:t.\u0275fac});let r=t;return r})();var ye=(()=>{let t=class t{static forRoot(e={}){return{ngModule:t,providers:[se,U,ee,x,_,D,$,{provide:W,useValue:e.permissionsIsolate},{provide:H,useValue:e.rolesIsolate},{provide:B,useValue:e.configurationIsolate}]}}static forChild(e={}){return{ngModule:t,providers:[{provide:W,useValue:e.permissionsIsolate},{provide:H,useValue:e.rolesIsolate},{provide:B,useValue:e.configurationIsolate},$,x,D,_]}}};t.\u0275fac=function(i){return new(i||t)},t.\u0275mod=N({type:t}),t.\u0275inj=K({});let r=t;return r})();export{x as a,pe as b,ye as c};
|
|
1
|
+
import{$ as f,A as b,E as F,Hb as X,I as L,Ia as q,Ja as V,Jc as Z,L as G,N as y,R as M,T as j,Ta as Q,X as C,aa as K,ba as E,ca as c,d,da as p,fa as N,ga as J,ia as Y,m as g,n as h,q as S,s as m,t as I,w as z}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-ZIANW63Q.js";import{a as l,b as v}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-KOJSHFZJ.js";var A={REMOVE:"remove",SHOW:"show"},ee=(()=>{let t=class t{constructor(){this.strategiesSource=new d({}),this.strategies$=this.strategiesSource.asObservable()}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=f({token:t,factory:t.\u0275fac});let r=t;return r})(),B=new E("USE_CONFIGURATION_STORE"),$=(()=>{let t=class t{constructor(e=!1,i){this.isolate=e,this.configurationStore=i,this.strategiesSource=this.isolate?new d({}):this.configurationStore.strategiesSource,this.strategies$=this.strategiesSource.asObservable(),this.onAuthorisedDefaultStrategy=this.isolate?void 0:this.configurationStore.onAuthorisedDefaultStrategy,this.onUnAuthorisedDefaultStrategy=this.isolate?void 0:this.configurationStore.onUnAuthorisedDefaultStrategy}setDefaultOnAuthorizedStrategy(e){this.isolate?this.onAuthorisedDefaultStrategy=this.getDefinedStrategy(e):(this.configurationStore.onAuthorisedDefaultStrategy=this.getDefinedStrategy(e),this.onAuthorisedDefaultStrategy=this.configurationStore.onAuthorisedDefaultStrategy)}setDefaultOnUnauthorizedStrategy(e){this.isolate?this.onUnAuthorisedDefaultStrategy=this.getDefinedStrategy(e):(this.configurationStore.onUnAuthorisedDefaultStrategy=this.getDefinedStrategy(e),this.onUnAuthorisedDefaultStrategy=this.configurationStore.onUnAuthorisedDefaultStrategy)}addPermissionStrategy(e,i){this.strategiesSource.value[e]=i}getStrategy(e){return this.strategiesSource.value[e]}getAllStrategies(){return this.strategiesSource.value}getDefinedStrategy(e){if(this.strategiesSource.value[e]||this.isPredefinedStrategy(e))return e;throw new Error(`No ' ${e} ' strategy is found please define one`)}isPredefinedStrategy(e){return e===A.SHOW||e===A.REMOVE}};t.\u0275fac=function(i){return new(i||t)(c(B),c(ee))},t.\u0275prov=f({token:t,factory:t.\u0275fac});let r=t;return r})();function u(r){return typeof r=="function"}function k(r){if(Object.prototype.toString.call(r)!=="[object Object]")return!1;{let t=Object.getPrototypeOf(r);return t===null||t===Object.prototype}}function ie(r){return!!r&&typeof r=="string"}function T(r){return typeof r=="boolean"}function te(r){return Object.prototype.toString.call(r)==="[object Promise]"}function O(r){return Array.isArray(r)?r.length>0:!!r}function R(r){return ie(r)?[r]:r}var se=(()=>{let t=class t{constructor(){this.permissionsSource=new d({}),this.permissions$=this.permissionsSource.asObservable()}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=f({token:t,factory:t.\u0275fac});let r=t;return r})(),W=new E("USE_PERMISSIONS_STORE"),x=(()=>{let t=class t{constructor(e=!1,i){this.isolate=e,this.permissionsStore=i,this.permissionsSource=this.isolate?new d({}):this.permissionsStore.permissionsSource,this.permissions$=this.permissionsSource.asObservable()}flushPermissions(){this.permissionsSource.next({})}hasPermission(e){return!e||Array.isArray(e)&&e.length===0?Promise.resolve(!0):(e=R(e),this.hasArrayPermission(e))}loadPermissions(e,i){let s=e.reduce((o,n)=>this.reducePermission(o,n,i),{});this.permissionsSource.next(s)}addPermission(e,i){if(Array.isArray(e)){let s=e.reduce((o,n)=>this.reducePermission(o,n,i),this.permissionsSource.value);this.permissionsSource.next(s)}else{let s=this.reducePermission(this.permissionsSource.value,e,i);this.permissionsSource.next(s)}}removePermission(e){let i=l({},this.permissionsSource.value);delete i[e],this.permissionsSource.next(i)}getPermission(e){return this.permissionsSource.value[e]}getPermissions(){return this.permissionsSource.value}reducePermission(e,i,s){return s&&u(s)?v(l({},e),{[i]:{name:i,validationFunction:s}}):v(l({},e),{[i]:{name:i}})}hasArrayPermission(e){let i=e.map(s=>{if(this.hasPermissionValidationFunction(s)){let o=this.permissionsSource.value[s].validationFunction,n=l({},this.permissionsSource.value);return h(null).pipe(S(()=>o(s,n)),j(a=>T(a)?h(a):a),F(()=>h(!1)))}return h(!!this.permissionsSource.value[s])});return g(i).pipe(I(),y(s=>s!==!1,!1),S(s=>s!==!1)).toPromise().then(s=>s)}hasPermissionValidationFunction(e){return!!this.permissionsSource.value[e]&&!!this.permissionsSource.value[e].validationFunction&&u(this.permissionsSource.value[e].validationFunction)}};t.\u0275fac=function(i){return new(i||t)(c(W),c(se))},t.\u0275prov=f({token:t,factory:t.\u0275fac});let r=t;return r})(),U=class{constructor(){this.rolesSource=new d({}),this.roles$=this.rolesSource.asObservable()}},H=new E("USE_ROLES_STORE"),D=(()=>{let t=class t{constructor(e=!1,i,s){this.isolate=e,this.rolesStore=i,this.permissionsService=s,this.rolesSource=this.isolate?new d({}):this.rolesStore.rolesSource,this.roles$=this.rolesSource.asObservable()}addRole(e,i){let s=v(l({},this.rolesSource.value),{[e]:{name:e,validationFunction:i}});this.rolesSource.next(s)}addRoleWithPermissions(e,i){this.permissionsService.addPermission(i),this.addRole(e,i)}addRoles(e){Object.keys(e).forEach((i,s)=>{this.addRole(i,e[i])})}addRolesWithPermissions(e){Object.keys(e).forEach((i,s)=>{this.addRoleWithPermissions(i,e[i])})}flushRoles(){this.rolesSource.next({})}flushRolesAndPermissions(){this.flushRoles(),this.permissionsService.flushPermissions()}removeRole(e){let i=l({},this.rolesSource.value);delete i[e],this.rolesSource.next(i)}getRoles(){return this.rolesSource.value}getRole(e){return this.rolesSource.value[e]}hasOnlyRoles(e){return!e||Array.isArray(e)&&e.length===0?Promise.resolve(!0):(e=R(e),Promise.all([this.hasRoleKey(e),this.hasRolePermission(this.rolesSource.value,e)]).then(([s,o])=>s||o))}hasRoleKey(e){let i=e.map(s=>{if(!!this.rolesSource.value[s]&&!!this.rolesSource.value[s].validationFunction&&u(this.rolesSource.value[s].validationFunction)&&!te(this.rolesSource.value[s].validationFunction)){let n=this.rolesSource.value[s].validationFunction,a=l({},this.rolesSource.value);return h(null).pipe(S(()=>n(s,a)),j(P=>T(P)?h(P):P),F(()=>h(!1)))}return h(!1)});return g(i).pipe(I(),y(s=>s!==!1,!1),S(s=>s!==!1)).toPromise().then(s=>s)}hasRolePermission(e,i){return g(i).pipe(m(s=>e[s]&&Array.isArray(e[s].validationFunction)?g(e[s].validationFunction).pipe(m(o=>this.permissionsService.hasPermission(o)),G(o=>o===!0)):h(!1)),y(s=>s===!0,!1)).toPromise()}};t.\u0275fac=function(i){return new(i||t)(c(H),c(U),c(x))},t.\u0275prov=f({token:t,factory:t.\u0275fac});let r=t;return r})(),pe=(()=>{let t=class t{constructor(){this.permissionsAuthorized=new V,this.permissionsUnauthorized=new V,this.firstMergeUnusedRun=1,this.permissionsService=p(x),this.configurationService=p($),this.rolesService=p(D),this.viewContainer=p(Q),this.changeDetector=p(q),this.templateRef=p(X)}ngOnInit(){this.viewContainer.clear(),this.initPermissionSubscription=this.validateExceptOnlyPermissions()}ngOnChanges(e){let i=e.ngxPermissionsOnly,s=e.ngxPermissionsExcept;if(i||s){if(i&&i.firstChange||s&&s.firstChange)return;b(this.permissionsService.permissions$,this.rolesService.roles$).pipe(M(this.firstMergeUnusedRun),L(1)).subscribe(()=>{if(O(this.ngxPermissionsExcept)){this.validateExceptAndOnlyPermissions();return}if(O(this.ngxPermissionsOnly)){this.validateOnlyPermissions();return}this.handleAuthorisedPermission(this.getAuthorisedTemplates())})}}ngOnDestroy(){this.initPermissionSubscription&&this.initPermissionSubscription.unsubscribe()}validateExceptOnlyPermissions(){return b(this.permissionsService.permissions$,this.rolesService.roles$).pipe(M(this.firstMergeUnusedRun)).subscribe(()=>{if(O(this.ngxPermissionsExcept)){this.validateExceptAndOnlyPermissions();return}if(O(this.ngxPermissionsOnly)){this.validateOnlyPermissions();return}this.handleAuthorisedPermission(this.getAuthorisedTemplates())})}validateExceptAndOnlyPermissions(){Promise.all([this.permissionsService.hasPermission(this.ngxPermissionsExcept),this.rolesService.hasOnlyRoles(this.ngxPermissionsExcept)]).then(([e,i])=>{if(e||i){this.handleUnauthorisedPermission(this.ngxPermissionsExceptElse||this.ngxPermissionsElse);return}if(this.ngxPermissionsOnly)throw!1;this.handleAuthorisedPermission(this.ngxPermissionsExceptThen||this.ngxPermissionsThen||this.templateRef)}).catch(()=>{this.ngxPermissionsOnly?this.validateOnlyPermissions():this.handleAuthorisedPermission(this.ngxPermissionsExceptThen||this.ngxPermissionsThen||this.templateRef)})}validateOnlyPermissions(){Promise.all([this.permissionsService.hasPermission(this.ngxPermissionsOnly),this.rolesService.hasOnlyRoles(this.ngxPermissionsOnly)]).then(([e,i])=>{e||i?this.handleAuthorisedPermission(this.ngxPermissionsOnlyThen||this.ngxPermissionsThen||this.templateRef):this.handleUnauthorisedPermission(this.ngxPermissionsOnlyElse||this.ngxPermissionsElse)}).catch(()=>{this.handleUnauthorisedPermission(this.ngxPermissionsOnlyElse||this.ngxPermissionsElse)})}handleUnauthorisedPermission(e){if(!(T(this.currentAuthorizedState)&&!this.currentAuthorizedState)){if(this.currentAuthorizedState=!1,this.permissionsUnauthorized.emit(),this.getUnAuthorizedStrategyInput()){this.applyStrategyAccordingToStrategyType(this.getUnAuthorizedStrategyInput());return}this.configurationService.onUnAuthorisedDefaultStrategy&&!this.elseBlockDefined()?this.applyStrategy(this.configurationService.onUnAuthorisedDefaultStrategy):this.showTemplateBlockInView(e)}}handleAuthorisedPermission(e){if(!(T(this.currentAuthorizedState)&&this.currentAuthorizedState)){if(this.currentAuthorizedState=!0,this.permissionsAuthorized.emit(),this.getAuthorizedStrategyInput()){this.applyStrategyAccordingToStrategyType(this.getAuthorizedStrategyInput());return}this.configurationService.onAuthorisedDefaultStrategy&&!this.thenBlockDefined()?this.applyStrategy(this.configurationService.onAuthorisedDefaultStrategy):this.showTemplateBlockInView(e)}}applyStrategyAccordingToStrategyType(e){if(ie(e)){this.applyStrategy(e);return}if(u(e)){this.showTemplateBlockInView(this.templateRef),e(this.templateRef);return}}showTemplateBlockInView(e){this.viewContainer.clear(),e&&(this.viewContainer.createEmbeddedView(e),this.changeDetector.markForCheck())}getAuthorisedTemplates(){return this.ngxPermissionsOnlyThen||this.ngxPermissionsExceptThen||this.ngxPermissionsThen||this.templateRef}elseBlockDefined(){return!!this.ngxPermissionsExceptElse||!!this.ngxPermissionsElse}thenBlockDefined(){return!!this.ngxPermissionsExceptThen||!!this.ngxPermissionsThen}getAuthorizedStrategyInput(){return this.ngxPermissionsOnlyAuthorisedStrategy||this.ngxPermissionsExceptAuthorisedStrategy||this.ngxPermissionsAuthorisedStrategy}getUnAuthorizedStrategyInput(){return this.ngxPermissionsOnlyUnauthorisedStrategy||this.ngxPermissionsExceptUnauthorisedStrategy||this.ngxPermissionsUnauthorisedStrategy}applyStrategy(e){if(e===A.SHOW){this.showTemplateBlockInView(this.templateRef);return}if(e===A.REMOVE){this.viewContainer.clear();return}let i=this.configurationService.getStrategy(e);this.showTemplateBlockInView(this.templateRef),i(this.templateRef)}};t.\u0275fac=function(i){return new(i||t)},t.\u0275dir=J({type:t,selectors:[["","ngxPermissionsOnly",""],["","ngxPermissionsExcept",""]],inputs:{ngxPermissionsOnly:"ngxPermissionsOnly",ngxPermissionsOnlyThen:"ngxPermissionsOnlyThen",ngxPermissionsOnlyElse:"ngxPermissionsOnlyElse",ngxPermissionsExcept:"ngxPermissionsExcept",ngxPermissionsExceptElse:"ngxPermissionsExceptElse",ngxPermissionsExceptThen:"ngxPermissionsExceptThen",ngxPermissionsThen:"ngxPermissionsThen",ngxPermissionsElse:"ngxPermissionsElse",ngxPermissionsOnlyAuthorisedStrategy:"ngxPermissionsOnlyAuthorisedStrategy",ngxPermissionsOnlyUnauthorisedStrategy:"ngxPermissionsOnlyUnauthorisedStrategy",ngxPermissionsExceptUnauthorisedStrategy:"ngxPermissionsExceptUnauthorisedStrategy",ngxPermissionsExceptAuthorisedStrategy:"ngxPermissionsExceptAuthorisedStrategy",ngxPermissionsUnauthorisedStrategy:"ngxPermissionsUnauthorisedStrategy",ngxPermissionsAuthorisedStrategy:"ngxPermissionsAuthorisedStrategy"},outputs:{permissionsAuthorized:"permissionsAuthorized",permissionsUnauthorized:"permissionsUnauthorized"},features:[Y]});let r=t;return r})(),re="default";var _=(()=>{let t=class t{constructor(e,i,s){this.permissionsService=e,this.rolesService=i,this.router=s}canActivate(e,i){return this.hasPermissions(e,i)}canActivateChild(e,i){return this.hasPermissions(e,i)}canLoad(e){return this.hasPermissions(e)}canMatch(e){return this.hasPermissions(e)}hasPermissions(e,i){let s=e&&e.data?e.data.permissions:{},o=this.transformPermission(s,e,i);return this.isParameterAvailable(o.except)?this.passingExceptPermissionsValidation(o,e,i):this.isParameterAvailable(o.only)?this.passingOnlyPermissionsValidation(o,e,i):!0}transformPermission(e,i,s){let o=u(e.only)?e.only(i,s):R(e.only),n=u(e.except)?e.except(i,s):R(e.except),a=e.redirectTo;return{only:o,except:n,redirectTo:a}}isParameterAvailable(e){return!!e&&e.length>0}passingExceptPermissionsValidation(e,i,s){if(e.redirectTo&&(u(e.redirectTo)||k(e.redirectTo)&&!this.isRedirectionWithParameters(e.redirectTo))){let o="";return g(e.except).pipe(m(n=>z([this.permissionsService.hasPermission(n),this.rolesService.hasOnlyRoles(n)]).pipe(C(a=>{a.every(w=>w===!1)||(o=n)}))),y(n=>n.some(a=>a===!0),!1),m(n=>o?(this.handleRedirectOfFailedPermission(e,o,i,s),h(!1)):!n&&e.only?this.onlyRedirectCheck(e,i,s):h(!n))).toPromise()}return Promise.all([this.permissionsService.hasPermission(e.except),this.rolesService.hasOnlyRoles(e.except)]).then(([o,n])=>o||n?(e.redirectTo&&this.redirectToAnotherRoute(e.redirectTo,i,s),!1):e.only?this.checkOnlyPermissions(e,i,s):!0)}redirectToAnotherRoute(e,i,s,o){let n=u(e)?e(o,i,s):e;if(this.isRedirectionWithParameters(n)){n.navigationCommands=this.transformNavigationCommands(n.navigationCommands,i,s),n.navigationExtras=this.transformNavigationExtras(n.navigationExtras,i,s),this.router.navigate(n.navigationCommands,n.navigationExtras);return}Array.isArray(n)?this.router.navigate(n):this.router.navigate([n])}isRedirectionWithParameters(e){return k(e)&&(!!e.navigationCommands||!!e.navigationExtras)}transformNavigationCommands(e,i,s){return u(e)?e(i,s):e}transformNavigationExtras(e,i,s){return u(e)?e(i,s):e}onlyRedirectCheck(e,i,s){let o="";return g(e.only).pipe(m(n=>z([this.permissionsService.hasPermission(n),this.rolesService.hasOnlyRoles(n)]).pipe(C(a=>{a.every(w=>w===!1)&&(o=n)}))),y(n=>u(e.redirectTo)?n.some(a=>a===!0):n.every(a=>a===!1),!1),m(n=>u(e.redirectTo)?n?h(!0):(this.handleRedirectOfFailedPermission(e,o,i,s),h(!1)):(o&&this.handleRedirectOfFailedPermission(e,o,i,s),h(!n)))).toPromise()}handleRedirectOfFailedPermission(e,i,s,o){this.isFailedPermissionPropertyOfRedirectTo(e,i)?this.redirectToAnotherRoute(e.redirectTo[i],s,o,i):u(e.redirectTo)?this.redirectToAnotherRoute(e.redirectTo,s,o,i):this.redirectToAnotherRoute(e.redirectTo[re],s,o,i)}isFailedPermissionPropertyOfRedirectTo(e,i){return!!e.redirectTo&&e.redirectTo[i]}checkOnlyPermissions(e,i,s){let o=l({},e);return Promise.all([this.permissionsService.hasPermission(o.only),this.rolesService.hasOnlyRoles(o.only)]).then(([n,a])=>n||a?!0:(o.redirectTo&&this.redirectToAnotherRoute(o.redirectTo,i,s),!1))}passingOnlyPermissionsValidation(e,i,s){return u(e.redirectTo)||k(e.redirectTo)&&!this.isRedirectionWithParameters(e.redirectTo)?this.onlyRedirectCheck(e,i,s):this.checkOnlyPermissions(e,i,s)}};t.\u0275fac=function(i){return new(i||t)(c(x),c(D),c(Z))},t.\u0275prov=f({token:t,factory:t.\u0275fac});let r=t;return r})();var ye=(()=>{let t=class t{static forRoot(e={}){return{ngModule:t,providers:[se,U,ee,x,_,D,$,{provide:W,useValue:e.permissionsIsolate},{provide:H,useValue:e.rolesIsolate},{provide:B,useValue:e.configurationIsolate}]}}static forChild(e={}){return{ngModule:t,providers:[{provide:W,useValue:e.permissionsIsolate},{provide:H,useValue:e.rolesIsolate},{provide:B,useValue:e.configurationIsolate},$,x,D,_]}}};t.\u0275fac=function(i){return new(i||t)},t.\u0275mod=N({type:t}),t.\u0275inj=K({});let r=t;return r})();export{x as a,pe as b,ye as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as W}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.
|
|
1
|
+
import{a as W}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-J7N5VFE6.js";import{c as z,d as j,e as q,f as G,g as H,h as J,i as K,j as Q,k as U}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-5K7YSLKL.js";import{a as L,c as O}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-CXQFJUAW.js";import{c as N}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-7F3GACIE.js";import{b as P,g as V,h as x}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-NFHX3EWZ.js";import{Q as R,R as F,S as I,T as B}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-OVSLUEIO.js";import{u as A}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-VTLJVEYF.js";import{$a as w,$b as S,Fa as o,Ja as h,Oa as r,Ra as M,Ua as k,Za as p,_a as m,ab as v,bb as Y,db as _,ea as D,gc as b,hb as c,ja as u,jb as y,ka as f,ob as g,pb as C,tb as E,ub as T}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-ZIANW63Q.js";function Z(l,a){if(l&1){let X=_();v(0),p(1,"mat-date-range-picker-actions")(2,"button",8),C(3,"Cancel"),m(),p(4,"button",9),c("click",function(){u(X);let e=y();return f(e.onSelectDate())}),C(5,"Search"),m()(),Y()}}var $={parse:{dateInput:"DD MMM YYYY"},display:{dateInput:"DD MMM YYYY",monthYearLabel:"MMM YYYY",dateA11yLabel:"LL",monthYearA11yLabel:"MMMM YYYY"}},he=(()=>{let a=class a{constructor(){this.disabled=!1,this.widthClass="w-100",this.showButtonConfirm=!1,this.dateChange=new h}fromDateChange(t){let e=t?.toDate();this.from=e}toDateChange(t){if(t){let e=t.toDate();this.to=e,this.showButtonConfirm||this.emitDateChange()}}onOpenDatepicker(){console.log("open");let t=document.getElementById("dropdown-filter");if(t){var e=new bootstrap.Dropdown(t);e&&(e._config.autoClose="inside")}}onCloseDatepicker(){console.log("close");let t=document.getElementById("dropdown-filter");if(t){var e=new bootstrap.Dropdown(t);e&&(e._config.autoClose="outside")}}emitDateChange(){this.dateChange.emit({from:this.from,to:this.to})}onSelectDate(){this.emitDateChange()}};a.\u0275fac=function(e){return new(e||a)},a.\u0275cmp=D({type:a,selectors:[["app-datepicker-range"]],inputs:{placeholder:"placeholder",displayToggle:"displayToggle",date:"date",disabled:"disabled",minDate:"minDate",widthClass:"widthClass",showButtonConfirm:"showButtonConfirm",from:"from",to:"to"},outputs:{dateChange:"dateChange"},standalone:!0,features:[E([{provide:F,useClass:W,deps:[R]},{provide:I,useValue:$}]),T],decls:8,vars:8,consts:[["appearance","outline",1,"date-range"],["id","dates",3,"min","rangePicker"],["matStartDate","","placeholder","Start date",3,"value","dateChange","click"],["matEndDate","","placeholder","End date",3,"value","dateChange","click"],["matPrefix","",3,"for"],[3,"opened","closed"],["picker",""],[4,"ngIf"],["mat-button","","matDateRangePickerCancel",""],["mat-raised-button","","color","primary","matDateRangePickerApply","",3,"click"]],template:function(e,n){if(e&1){let d=_();p(0,"mat-form-field",0)(1,"mat-date-range-input",1)(2,"input",2),c("dateChange",function(i){return n.fromDateChange(i.value)})("click",function(){u(d);let i=g(6);return f(i.open())}),m(),p(3,"input",3),c("dateChange",function(i){return n.toDateChange(i.value)})("click",function(){u(d);let i=g(6);return f(i.open())}),m()(),w(4,"mat-datepicker-toggle",4),p(5,"mat-date-range-picker",5,6),c("opened",function(){return n.onOpenDatepicker()})("closed",function(){return n.onCloseDatepicker()}),k(7,Z,6,0,"ng-container",7),m()()}if(e&2){let d=g(6);M(n.widthClass),o(1),r("min",n.minDate)("rangePicker",d),o(1),r("value",n.from),o(1),r("value",n.to),o(1),r("for",d),o(3),r("ngIf",n.showButtonConfirm)}},dependencies:[b,S,B,U,z,G,j,q,H,Q,K,J,x,V,P,N,A,O,L],styles:["mat-form-field.date-range.mat-mdc-form-field-type-mat-date-range-input .mat-mdc-form-field-infix{padding-top:12px!important;padding-bottom:12px!important;min-height:45px!important;font-size:14px!important}"]});let l=a;return l})();export{he as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{b as S,e as C}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.
|
|
1
|
+
import{b as S,e as C}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-V74TRO5C.js";import{c as d}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-T2YIFX3Q.js";import{$ as f,E as c,X as o,ca as p,o as i}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-ZIANW63Q.js";var D=(()=>{let r=class r{constructor(e,t){this.httpService=e,this.toastrService=t}loader(e=d.GuidEMpty){return this.httpService.post("/api/product/Load",{ID:e})}LoadInPOS(e=d.GuidEMpty){return this.httpService.post("/api/product/LoadInPOS",{ID:e})}filterChannelByTypeId(e,t){return e.filter(n=>t.findIndex(a=>n.TypeID==a)!==-1)}getProductStatistic(){return this.httpService.post("/api/product/ProductStatistic",{})}getTotalProductLive(e){let t={ID:e};return this.httpService.post("/api/product/TotalProductLive",t)}clearCacheChannel(e){let t={ID:e};return this.httpService.post("/api/Channel/ClearCacheChannel",t)}uploadSingleProduct(e,t){let n={Channel:t,Products:e};return this.httpService.post("api/product/UploadMultipleChannel",n).pipe(o(a=>{this.showToastrSuccessUploadSingle(a,e[0])}),c(a=>(this.showToastErrorUploadSingle(a,e[0]),i(()=>new Error(a)))))}uploadMultipleProduct(e,t){let n={Channel:t,Products:e};return this.httpService.post("api/product/UploadMultipleProductAndMultipleChannel",n).pipe(o(a=>{this.showToastrUploadMultiple(a.Message)}),c(a=>(this.showToastrUploadMultiple(a.error?.Message),i(()=>new Error(a)))))}uploadNotInChannel(e,t){let n={Products:e,Channel:t};return this.httpService.post("/api/product/UploadProductNotInChannelToChannel",n).pipe(o(a=>{this.showToastrUploadMultiple(a)}),c(a=>(this.showToastrUploadMultiple(a.error?.Message),i(()=>new Error(a)))))}scanSingle(e,t){let n={ID:e,SKU:t};return this.httpService.post("/api/product/ScanSingle",n)}scanNotInChannel(e){let t={ID:e};return this.httpService.post("/api/product/ScanNotinChannel",t)}findAllSoldInChannel(e){return this.httpService.post("/api/product/GetSoldInChannel",e)}scanAll(e,t,n,a=!1){let s={ID:e,ScanFull:t,UpdatedProduct:n,Async:a};return this.httpService.post("/api/product/ScanOptimized",s)}scanCompareToPos(e){return this.httpService.post("/api/product/CompareMarketplaceToPOS",e)}getVariantCodesProduct(e){return e.Variants.map(n=>n.Code)}downloadMultipleProduct(e){let t=e.map(n=>({ChannelItemID:n.ChannelItemID,ChannelID:n.ChannelID}));return this.httpService.post("/api/product/DownloadMultipleProductFromChannel",t).pipe(o(n=>{this.toastrService.success(`${n.Count} products downloaded to POS`,"Download Complete")}))}downloadProduct(e){let t={ChannelItemID:e.ChannelItemID,ChannelID:e.ChannelID};return this.httpService.post("/api/product/DownloadProductFromChannel",t).pipe(o(()=>{this.toastrService.success("Product successfully downloaded to POS","Download Complete")}))}getVariantCodesProducts(e=[]){let t=[];return e.forEach(n=>{n.Variants.forEach(a=>{t=[...t,a.Code]})}),t}filterUnselectedChannel(e,t){let n=[];e.forEach(s=>{n=[...n,...s.Channel]});let a;if(!n||n.length==0)a=t;else{let s=[];a=t.filter(l=>(s=n.filter(u=>u.ChannelID==l.ID),s.length!==e.length))}return a}findChannelById(e,t){return t.find(n=>n.ID==e)}sortChannel(e=[]){return e.sort((t,n)=>t.TypeID<n.TypeID?1:t.TypeID===n.TypeID?0:-1)}hasSelection(e=[]){return this.selectedProduct(e).length>0}selectedProduct(e=[]){return e.filter(t=>t.selected)}hasSelectionVariant(e){return this.selectedVariantProduct(e).length>0}selectedVariantProduct(e){let t=[];return e.forEach(n=>{t=[...t,...n.Variants!=null?n.Variants.filter(a=>a.selected):""]}),t}getChannelProduct(e){let t=e.Variants,n=[];for(let a of t)if(a.Channel!=null)for(let s of a.Channel)n.filter(l=>l.ChannelID==s.ChannelID).length==0&&n.push(s);return this.sortChannel(n)}successToastrScanAllProduct(e,t,n){if(n){let a=e?.NotInPOS?.Product?e?.NotInPOS?.Product:0,s=e?.InChannel?.Product?e?.InChannel?.Product:0;this.toastrService.success(`
|
|
2
2
|
${a+s} found in ${t.Name} </br>
|
|
3
3
|
(${s} In POS + ${a} Not In Pos)
|
|
4
4
|
`,"Scan Complete!",{enableHtml:!0})}else{let a=e.InChannel?e.InChannel.Product:0;this.toastrService.success(`${a} product updates in ${t.Name} </br>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as tt,c as et}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.2/Marketplace/chunk-MNQTYXTP.js";import{a as W,b as X}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.2/Marketplace/chunk-PTD6INQZ.js";import{g as Q}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.2/Marketplace/chunk-TH3YEBZM.js";import{q as J,r as K}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.2/Marketplace/chunk-MSDWP3Z5.js";import{K as q,P as Y,_ as Z,a as O,b as v}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.2/Marketplace/chunk-K2D3HYO3.js";import{$ as w,$a as b,Fa as s,Ga as z,Ia as R,Ja as V,La as j,Na as m,Oa as d,Ua as _,Va as h,Wa as G,Xa as $,Ya as U,Za as r,_a as l,aa as k,ba as F,c as M,db as I,ea as B,fa as E,hb as u,ja as P,jb as g,ka as S,la as c,ma as C,pa as A,pb as f,qa as N,qb as H,rb as T}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.2/Marketplace/chunk-WOVAE35N.js";function it(a,n){if(a&1&&(r(0,"mat-option",18),f(1),l()),a&2){let e=n.$implicit;d("value",e),s(1),T(" ",e," ")}}function at(a,n){if(a&1){let e=I();r(0,"mat-form-field",16)(1,"mat-select",17),u("selectionChange",function(o){P(e);let i=g(2);return S(i._changePageSize(o.value))}),$(2,it,2,2,"mat-option",18,G),l()()}if(a&2){let e=g(2);d("appearance",e._formFieldAppearance)("color",e.color),s(1),d("value",e.pageSize)("disabled",e.disabled)("aria-labelledby",e._pageSizeLabelId)("panelClass",e.selectConfig.panelClass||"")("disableOptionCentering",e.selectConfig.disableOptionCentering),s(1),U(e._displayedPageSizeOptions)}}function nt(a,n){if(a&1&&(r(0,"div",19),f(1),l()),a&2){let e=g(2);s(1),H(e.pageSize)}}function ot(a,n){if(a&1&&(r(0,"div",12)(1,"div",13),f(2),l(),_(3,at,4,7,"mat-form-field",14)(4,nt,2,1,"div",15),l()),a&2){let e=g();s(1),m("id",e._pageSizeLabelId),s(1),T(" ",e._intl.itemsPerPageLabel," "),s(1),h(3,e._displayedPageSizeOptions.length>1?3:-1),s(1),h(4,e._displayedPageSizeOptions.length<=1?4:-1)}}function st(a,n){if(a&1){let e=I();r(0,"button",20),u("click",function(){P(e);let o=g();return S(o.firstPage())}),c(),r(1,"svg",7),b(2,"path",21),l()()}if(a&2){let e=g();d("matTooltip",e._intl.firstPageLabel)("matTooltipDisabled",e._previousButtonsDisabled())("matTooltipPosition","above")("disabled",e._previousButtonsDisabled()),m("aria-label",e._intl.firstPageLabel)}}function rt(a,n){if(a&1){let e=I();c(),C(),r(0,"button",22),u("click",function(){P(e);let o=g();return S(o.lastPage())}),c(),r(1,"svg",7),b(2,"path",23),l()()}if(a&2){let e=g();d("matTooltip",e._intl.lastPageLabel)("matTooltipDisabled",e._nextButtonsDisabled())("matTooltipPosition","above")("disabled",e._nextButtonsDisabled()),m("aria-label",e._intl.lastPageLabel)}}var y=(()=>{let n=class n{constructor(){this.changes=new M,this.itemsPerPageLabel="Items per page:",this.nextPageLabel="Next page",this.previousPageLabel="Previous page",this.firstPageLabel="First page",this.lastPageLabel="Last page",this.getRangeLabel=(t,o,i)=>{if(i==0||o==0)return`0 of ${i}`;i=Math.max(i,0);let p=t*o,x=p<i?Math.min(p+o,i):p+o;return`${p+1} \u2013 ${x} of ${i}`}}};n.\u0275fac=function(o){return new(o||n)},n.\u0275prov=w({token:n,factory:n.\u0275fac,providedIn:"root"});let a=n;return a})();function lt(a){return a||new y}var pt={provide:y,deps:[[new A,new N,y]],useFactory:lt},gt=50;var dt=new F("MAT_PAGINATOR_DEFAULT_OPTIONS"),ct=q(Y(class{})),mt=0,Bt=(()=>{let n=class n extends ct{get pageIndex(){return this._pageIndex}set pageIndex(t){this._pageIndex=Math.max(v(t),0),this._changeDetectorRef.markForCheck()}get length(){return this._length}set length(t){this._length=v(t),this._changeDetectorRef.markForCheck()}get pageSize(){return this._pageSize}set pageSize(t){this._pageSize=Math.max(v(t),0),this._updateDisplayedPageSizeOptions()}get pageSizeOptions(){return this._pageSizeOptions}set pageSizeOptions(t){this._pageSizeOptions=(t||[]).map(o=>v(o)),this._updateDisplayedPageSizeOptions()}get hidePageSize(){return this._hidePageSize}set hidePageSize(t){this._hidePageSize=O(t)}get showFirstLastButtons(){return this._showFirstLastButtons}set showFirstLastButtons(t){this._showFirstLastButtons=O(t)}constructor(t,o,i){if(super(),this._intl=t,this._changeDetectorRef=o,this._pageSizeLabelId=`mat-paginator-page-size-label-${mt++}`,this._pageIndex=0,this._length=0,this._pageSizeOptions=[],this._hidePageSize=!1,this._showFirstLastButtons=!1,this.selectConfig={},this.page=new V,this._intlChanges=t.changes.subscribe(()=>this._changeDetectorRef.markForCheck()),i){let{pageSize:p,pageSizeOptions:x,hidePageSize:D,showFirstLastButtons:L}=i;p!=null&&(this._pageSize=p),x!=null&&(this._pageSizeOptions=x),D!=null&&(this._hidePageSize=D),L!=null&&(this._showFirstLastButtons=L)}this._formFieldAppearance=i?.formFieldAppearance||"outline"}ngOnInit(){this._initialized=!0,this._updateDisplayedPageSizeOptions(),this._markInitialized()}ngOnDestroy(){this._intlChanges.unsubscribe()}nextPage(){if(!this.hasNextPage())return;let t=this.pageIndex;this.pageIndex=this.pageIndex+1,this._emitPageEvent(t)}previousPage(){if(!this.hasPreviousPage())return;let t=this.pageIndex;this.pageIndex=this.pageIndex-1,this._emitPageEvent(t)}firstPage(){if(!this.hasPreviousPage())return;let t=this.pageIndex;this.pageIndex=0,this._emitPageEvent(t)}lastPage(){if(!this.hasNextPage())return;let t=this.pageIndex;this.pageIndex=this.getNumberOfPages()-1,this._emitPageEvent(t)}hasPreviousPage(){return this.pageIndex>=1&&this.pageSize!=0}hasNextPage(){let t=this.getNumberOfPages()-1;return this.pageIndex<t&&this.pageSize!=0}getNumberOfPages(){return this.pageSize?Math.ceil(this.length/this.pageSize):0}_changePageSize(t){let o=this.pageIndex*this.pageSize,i=this.pageIndex;this.pageIndex=Math.floor(o/t)||0,this.pageSize=t,this._emitPageEvent(i)}_nextButtonsDisabled(){return this.disabled||!this.hasNextPage()}_previousButtonsDisabled(){return this.disabled||!this.hasPreviousPage()}_updateDisplayedPageSizeOptions(){this._initialized&&(this.pageSize||(this._pageSize=this.pageSizeOptions.length!=0?this.pageSizeOptions[0]:gt),this._displayedPageSizeOptions=this.pageSizeOptions.slice(),this._displayedPageSizeOptions.indexOf(this.pageSize)===-1&&this._displayedPageSizeOptions.push(this.pageSize),this._displayedPageSizeOptions.sort((t,o)=>t-o),this._changeDetectorRef.markForCheck())}_emitPageEvent(t){this.page.emit({previousPageIndex:t,pageIndex:this.pageIndex,pageSize:this.pageSize,length:this.length})}};n.\u0275fac=function(o){return new(o||n)(z(y),z(R),z(dt,8))},n.\u0275cmp=B({type:n,selectors:[["mat-paginator"]],hostAttrs:["role","group",1,"mat-mdc-paginator"],inputs:{disabled:"disabled",color:"color",pageIndex:"pageIndex",length:"length",pageSize:"pageSize",pageSizeOptions:"pageSizeOptions",hidePageSize:"hidePageSize",showFirstLastButtons:"showFirstLastButtons",selectConfig:"selectConfig"},outputs:{page:"page"},exportAs:["matPaginator"],features:[j],decls:14,vars:14,consts:[[1,"mat-mdc-paginator-outer-container"],[1,"mat-mdc-paginator-container"],["class","mat-mdc-paginator-page-size"],[1,"mat-mdc-paginator-range-actions"],["aria-live","polite",1,"mat-mdc-paginator-range-label"],["mat-icon-button","","type","button","class","mat-mdc-paginator-navigation-first",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled"],["mat-icon-button","","type","button",1,"mat-mdc-paginator-navigation-previous",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled","click"],["viewBox","0 0 24 24","focusable","false","aria-hidden","true",1,"mat-mdc-paginator-icon"],["d","M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"],["mat-icon-button","","type","button",1,"mat-mdc-paginator-navigation-next",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled","click"],["d","M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"],["mat-icon-button","","type","button","class","mat-mdc-paginator-navigation-last",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled"],[1,"mat-mdc-paginator-page-size"],[1,"mat-mdc-paginator-page-size-label"],["class","mat-mdc-paginator-page-size-select",3,"appearance","color"],["class","mat-mdc-paginator-page-size-value"],[1,"mat-mdc-paginator-page-size-select",3,"appearance","color"],["hideSingleSelectionIndicator","",3,"value","disabled","aria-labelledby","panelClass","disableOptionCentering","selectionChange"],[3,"value"],[1,"mat-mdc-paginator-page-size-value"],["mat-icon-button","","type","button",1,"mat-mdc-paginator-navigation-first",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled","click"],["d","M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z"],["mat-icon-button","","type","button",1,"mat-mdc-paginator-navigation-last",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled","click"],["d","M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z"]],template:function(o,i){o&1&&(r(0,"div",0)(1,"div",1),_(2,ot,5,4,"div",2),r(3,"div",3)(4,"div",4),f(5),l(),_(6,st,3,5,"button",5),r(7,"button",6),u("click",function(){return i.previousPage()}),c(),r(8,"svg",7),b(9,"path",8),l()(),C(),r(10,"button",9),u("click",function(){return i.nextPage()}),c(),r(11,"svg",7),b(12,"path",10),l()(),_(13,rt,3,5,"button",11),l()()()),o&2&&(s(2),h(2,i.hidePageSize?-1:2),s(3),T(" ",i._intl.getRangeLabel(i.pageIndex,i.pageSize,i.length)," "),s(1),h(6,i.showFirstLastButtons?6:-1),s(1),d("matTooltip",i._intl.previousPageLabel)("matTooltipDisabled",i._previousButtonsDisabled())("matTooltipPosition","above")("disabled",i._previousButtonsDisabled()),m("aria-label",i._intl.previousPageLabel),s(3),d("matTooltip",i._intl.nextPageLabel)("matTooltipDisabled",i._nextButtonsDisabled())("matTooltipPosition","above")("disabled",i._nextButtonsDisabled()),m("aria-label",i._intl.nextPageLabel),s(3),h(13,i.showFirstLastButtons?13:-1))},dependencies:[tt,Q,W,Z,J],styles:[".mat-mdc-paginator{display:block;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;color:var(--mat-paginator-container-text-color);background-color:var(--mat-paginator-container-background-color);font-family:var(--mat-paginator-container-text-font);line-height:var(--mat-paginator-container-text-line-height);font-size:var(--mat-paginator-container-text-size);font-weight:var(--mat-paginator-container-text-weight);letter-spacing:var(--mat-paginator-container-text-tracking)}.mat-mdc-paginator .mat-mdc-select-value{font-size:var(--mat-paginator-select-trigger-text-size)}.mat-mdc-paginator .mat-mdc-form-field-subscript-wrapper{display:none}.mat-mdc-paginator .mat-mdc-select{line-height:1.5}.mat-mdc-paginator-outer-container{display:flex}.mat-mdc-paginator-container{display:flex;align-items:center;justify-content:flex-end;padding:0 8px;flex-wrap:wrap-reverse;width:100%;min-height:var(--mat-paginator-container-size)}.mat-mdc-paginator-page-size{display:flex;align-items:baseline;margin-right:8px}[dir=rtl] .mat-mdc-paginator-page-size{margin-right:0;margin-left:8px}.mat-mdc-paginator-page-size-label{margin:0 4px}.mat-mdc-paginator-page-size-select{margin:0 4px;width:84px}.mat-mdc-paginator-range-label{margin:0 32px 0 24px}.mat-mdc-paginator-range-actions{display:flex;align-items:center}.mat-mdc-paginator-icon{display:inline-block;width:28px;fill:var(--mat-paginator-enabled-icon-color)}.mat-mdc-icon-button[disabled] .mat-mdc-paginator-icon{fill:var(--mat-paginator-disabled-icon-color)}[dir=rtl] .mat-mdc-paginator-icon{transform:rotate(180deg)}.cdk-high-contrast-active .mat-mdc-icon-button[disabled] .mat-mdc-paginator-icon,.cdk-high-contrast-active .mat-mdc-paginator-icon{fill:currentColor;fill:CanvasText}.cdk-high-contrast-active .mat-mdc-paginator-range-actions .mat-mdc-icon-button{outline:solid 1px}"],encapsulation:2,changeDetection:0});let a=n;return a})(),Et=(()=>{let n=class n{};n.\u0275fac=function(o){return new(o||n)},n.\u0275mod=E({type:n}),n.\u0275inj=k({providers:[pt],imports:[et,X,K]});let a=n;return a})();export{Bt as a,Et as b};
|
|
1
|
+
import{b as tt,c as et}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-CXQFJUAW.js";import{a as W,b as X}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-6O46WM77.js";import{g as Q}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-NFHX3EWZ.js";import{q as J,r as K}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-DR4WIP6T.js";import{K as q,P as Y,_ as Z,a as O,b as v}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-OVSLUEIO.js";import{$ as w,$a as b,Fa as s,Ga as z,Ia as R,Ja as V,La as j,Na as m,Oa as d,Ua as _,Va as h,Wa as G,Xa as $,Ya as U,Za as r,_a as l,aa as k,ba as F,c as M,db as I,ea as B,fa as E,hb as u,ja as P,jb as g,ka as S,la as c,ma as C,pa as A,pb as f,qa as N,qb as H,rb as T}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-ZIANW63Q.js";function it(a,n){if(a&1&&(r(0,"mat-option",18),f(1),l()),a&2){let e=n.$implicit;d("value",e),s(1),T(" ",e," ")}}function at(a,n){if(a&1){let e=I();r(0,"mat-form-field",16)(1,"mat-select",17),u("selectionChange",function(o){P(e);let i=g(2);return S(i._changePageSize(o.value))}),$(2,it,2,2,"mat-option",18,G),l()()}if(a&2){let e=g(2);d("appearance",e._formFieldAppearance)("color",e.color),s(1),d("value",e.pageSize)("disabled",e.disabled)("aria-labelledby",e._pageSizeLabelId)("panelClass",e.selectConfig.panelClass||"")("disableOptionCentering",e.selectConfig.disableOptionCentering),s(1),U(e._displayedPageSizeOptions)}}function nt(a,n){if(a&1&&(r(0,"div",19),f(1),l()),a&2){let e=g(2);s(1),H(e.pageSize)}}function ot(a,n){if(a&1&&(r(0,"div",12)(1,"div",13),f(2),l(),_(3,at,4,7,"mat-form-field",14)(4,nt,2,1,"div",15),l()),a&2){let e=g();s(1),m("id",e._pageSizeLabelId),s(1),T(" ",e._intl.itemsPerPageLabel," "),s(1),h(3,e._displayedPageSizeOptions.length>1?3:-1),s(1),h(4,e._displayedPageSizeOptions.length<=1?4:-1)}}function st(a,n){if(a&1){let e=I();r(0,"button",20),u("click",function(){P(e);let o=g();return S(o.firstPage())}),c(),r(1,"svg",7),b(2,"path",21),l()()}if(a&2){let e=g();d("matTooltip",e._intl.firstPageLabel)("matTooltipDisabled",e._previousButtonsDisabled())("matTooltipPosition","above")("disabled",e._previousButtonsDisabled()),m("aria-label",e._intl.firstPageLabel)}}function rt(a,n){if(a&1){let e=I();c(),C(),r(0,"button",22),u("click",function(){P(e);let o=g();return S(o.lastPage())}),c(),r(1,"svg",7),b(2,"path",23),l()()}if(a&2){let e=g();d("matTooltip",e._intl.lastPageLabel)("matTooltipDisabled",e._nextButtonsDisabled())("matTooltipPosition","above")("disabled",e._nextButtonsDisabled()),m("aria-label",e._intl.lastPageLabel)}}var y=(()=>{let n=class n{constructor(){this.changes=new M,this.itemsPerPageLabel="Items per page:",this.nextPageLabel="Next page",this.previousPageLabel="Previous page",this.firstPageLabel="First page",this.lastPageLabel="Last page",this.getRangeLabel=(t,o,i)=>{if(i==0||o==0)return`0 of ${i}`;i=Math.max(i,0);let p=t*o,x=p<i?Math.min(p+o,i):p+o;return`${p+1} \u2013 ${x} of ${i}`}}};n.\u0275fac=function(o){return new(o||n)},n.\u0275prov=w({token:n,factory:n.\u0275fac,providedIn:"root"});let a=n;return a})();function lt(a){return a||new y}var pt={provide:y,deps:[[new A,new N,y]],useFactory:lt},gt=50;var dt=new F("MAT_PAGINATOR_DEFAULT_OPTIONS"),ct=q(Y(class{})),mt=0,Bt=(()=>{let n=class n extends ct{get pageIndex(){return this._pageIndex}set pageIndex(t){this._pageIndex=Math.max(v(t),0),this._changeDetectorRef.markForCheck()}get length(){return this._length}set length(t){this._length=v(t),this._changeDetectorRef.markForCheck()}get pageSize(){return this._pageSize}set pageSize(t){this._pageSize=Math.max(v(t),0),this._updateDisplayedPageSizeOptions()}get pageSizeOptions(){return this._pageSizeOptions}set pageSizeOptions(t){this._pageSizeOptions=(t||[]).map(o=>v(o)),this._updateDisplayedPageSizeOptions()}get hidePageSize(){return this._hidePageSize}set hidePageSize(t){this._hidePageSize=O(t)}get showFirstLastButtons(){return this._showFirstLastButtons}set showFirstLastButtons(t){this._showFirstLastButtons=O(t)}constructor(t,o,i){if(super(),this._intl=t,this._changeDetectorRef=o,this._pageSizeLabelId=`mat-paginator-page-size-label-${mt++}`,this._pageIndex=0,this._length=0,this._pageSizeOptions=[],this._hidePageSize=!1,this._showFirstLastButtons=!1,this.selectConfig={},this.page=new V,this._intlChanges=t.changes.subscribe(()=>this._changeDetectorRef.markForCheck()),i){let{pageSize:p,pageSizeOptions:x,hidePageSize:D,showFirstLastButtons:L}=i;p!=null&&(this._pageSize=p),x!=null&&(this._pageSizeOptions=x),D!=null&&(this._hidePageSize=D),L!=null&&(this._showFirstLastButtons=L)}this._formFieldAppearance=i?.formFieldAppearance||"outline"}ngOnInit(){this._initialized=!0,this._updateDisplayedPageSizeOptions(),this._markInitialized()}ngOnDestroy(){this._intlChanges.unsubscribe()}nextPage(){if(!this.hasNextPage())return;let t=this.pageIndex;this.pageIndex=this.pageIndex+1,this._emitPageEvent(t)}previousPage(){if(!this.hasPreviousPage())return;let t=this.pageIndex;this.pageIndex=this.pageIndex-1,this._emitPageEvent(t)}firstPage(){if(!this.hasPreviousPage())return;let t=this.pageIndex;this.pageIndex=0,this._emitPageEvent(t)}lastPage(){if(!this.hasNextPage())return;let t=this.pageIndex;this.pageIndex=this.getNumberOfPages()-1,this._emitPageEvent(t)}hasPreviousPage(){return this.pageIndex>=1&&this.pageSize!=0}hasNextPage(){let t=this.getNumberOfPages()-1;return this.pageIndex<t&&this.pageSize!=0}getNumberOfPages(){return this.pageSize?Math.ceil(this.length/this.pageSize):0}_changePageSize(t){let o=this.pageIndex*this.pageSize,i=this.pageIndex;this.pageIndex=Math.floor(o/t)||0,this.pageSize=t,this._emitPageEvent(i)}_nextButtonsDisabled(){return this.disabled||!this.hasNextPage()}_previousButtonsDisabled(){return this.disabled||!this.hasPreviousPage()}_updateDisplayedPageSizeOptions(){this._initialized&&(this.pageSize||(this._pageSize=this.pageSizeOptions.length!=0?this.pageSizeOptions[0]:gt),this._displayedPageSizeOptions=this.pageSizeOptions.slice(),this._displayedPageSizeOptions.indexOf(this.pageSize)===-1&&this._displayedPageSizeOptions.push(this.pageSize),this._displayedPageSizeOptions.sort((t,o)=>t-o),this._changeDetectorRef.markForCheck())}_emitPageEvent(t){this.page.emit({previousPageIndex:t,pageIndex:this.pageIndex,pageSize:this.pageSize,length:this.length})}};n.\u0275fac=function(o){return new(o||n)(z(y),z(R),z(dt,8))},n.\u0275cmp=B({type:n,selectors:[["mat-paginator"]],hostAttrs:["role","group",1,"mat-mdc-paginator"],inputs:{disabled:"disabled",color:"color",pageIndex:"pageIndex",length:"length",pageSize:"pageSize",pageSizeOptions:"pageSizeOptions",hidePageSize:"hidePageSize",showFirstLastButtons:"showFirstLastButtons",selectConfig:"selectConfig"},outputs:{page:"page"},exportAs:["matPaginator"],features:[j],decls:14,vars:14,consts:[[1,"mat-mdc-paginator-outer-container"],[1,"mat-mdc-paginator-container"],["class","mat-mdc-paginator-page-size"],[1,"mat-mdc-paginator-range-actions"],["aria-live","polite",1,"mat-mdc-paginator-range-label"],["mat-icon-button","","type","button","class","mat-mdc-paginator-navigation-first",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled"],["mat-icon-button","","type","button",1,"mat-mdc-paginator-navigation-previous",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled","click"],["viewBox","0 0 24 24","focusable","false","aria-hidden","true",1,"mat-mdc-paginator-icon"],["d","M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"],["mat-icon-button","","type","button",1,"mat-mdc-paginator-navigation-next",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled","click"],["d","M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"],["mat-icon-button","","type","button","class","mat-mdc-paginator-navigation-last",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled"],[1,"mat-mdc-paginator-page-size"],[1,"mat-mdc-paginator-page-size-label"],["class","mat-mdc-paginator-page-size-select",3,"appearance","color"],["class","mat-mdc-paginator-page-size-value"],[1,"mat-mdc-paginator-page-size-select",3,"appearance","color"],["hideSingleSelectionIndicator","",3,"value","disabled","aria-labelledby","panelClass","disableOptionCentering","selectionChange"],[3,"value"],[1,"mat-mdc-paginator-page-size-value"],["mat-icon-button","","type","button",1,"mat-mdc-paginator-navigation-first",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled","click"],["d","M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z"],["mat-icon-button","","type","button",1,"mat-mdc-paginator-navigation-last",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled","click"],["d","M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z"]],template:function(o,i){o&1&&(r(0,"div",0)(1,"div",1),_(2,ot,5,4,"div",2),r(3,"div",3)(4,"div",4),f(5),l(),_(6,st,3,5,"button",5),r(7,"button",6),u("click",function(){return i.previousPage()}),c(),r(8,"svg",7),b(9,"path",8),l()(),C(),r(10,"button",9),u("click",function(){return i.nextPage()}),c(),r(11,"svg",7),b(12,"path",10),l()(),_(13,rt,3,5,"button",11),l()()()),o&2&&(s(2),h(2,i.hidePageSize?-1:2),s(3),T(" ",i._intl.getRangeLabel(i.pageIndex,i.pageSize,i.length)," "),s(1),h(6,i.showFirstLastButtons?6:-1),s(1),d("matTooltip",i._intl.previousPageLabel)("matTooltipDisabled",i._previousButtonsDisabled())("matTooltipPosition","above")("disabled",i._previousButtonsDisabled()),m("aria-label",i._intl.previousPageLabel),s(3),d("matTooltip",i._intl.nextPageLabel)("matTooltipDisabled",i._nextButtonsDisabled())("matTooltipPosition","above")("disabled",i._nextButtonsDisabled()),m("aria-label",i._intl.nextPageLabel),s(3),h(13,i.showFirstLastButtons?13:-1))},dependencies:[tt,Q,W,Z,J],styles:[".mat-mdc-paginator{display:block;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;color:var(--mat-paginator-container-text-color);background-color:var(--mat-paginator-container-background-color);font-family:var(--mat-paginator-container-text-font);line-height:var(--mat-paginator-container-text-line-height);font-size:var(--mat-paginator-container-text-size);font-weight:var(--mat-paginator-container-text-weight);letter-spacing:var(--mat-paginator-container-text-tracking)}.mat-mdc-paginator .mat-mdc-select-value{font-size:var(--mat-paginator-select-trigger-text-size)}.mat-mdc-paginator .mat-mdc-form-field-subscript-wrapper{display:none}.mat-mdc-paginator .mat-mdc-select{line-height:1.5}.mat-mdc-paginator-outer-container{display:flex}.mat-mdc-paginator-container{display:flex;align-items:center;justify-content:flex-end;padding:0 8px;flex-wrap:wrap-reverse;width:100%;min-height:var(--mat-paginator-container-size)}.mat-mdc-paginator-page-size{display:flex;align-items:baseline;margin-right:8px}[dir=rtl] .mat-mdc-paginator-page-size{margin-right:0;margin-left:8px}.mat-mdc-paginator-page-size-label{margin:0 4px}.mat-mdc-paginator-page-size-select{margin:0 4px;width:84px}.mat-mdc-paginator-range-label{margin:0 32px 0 24px}.mat-mdc-paginator-range-actions{display:flex;align-items:center}.mat-mdc-paginator-icon{display:inline-block;width:28px;fill:var(--mat-paginator-enabled-icon-color)}.mat-mdc-icon-button[disabled] .mat-mdc-paginator-icon{fill:var(--mat-paginator-disabled-icon-color)}[dir=rtl] .mat-mdc-paginator-icon{transform:rotate(180deg)}.cdk-high-contrast-active .mat-mdc-icon-button[disabled] .mat-mdc-paginator-icon,.cdk-high-contrast-active .mat-mdc-paginator-icon{fill:currentColor;fill:CanvasText}.cdk-high-contrast-active .mat-mdc-paginator-range-actions .mat-mdc-icon-button{outline:solid 1px}"],encapsulation:2,changeDetection:0});let a=n;return a})(),Et=(()=>{let n=class n{};n.\u0275fac=function(o){return new(o||n)},n.\u0275mod=E({type:n}),n.\u0275inj=k({providers:[pt],imports:[et,X,K]});let a=n;return a})();export{Bt as a,Et as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as B}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.
|
|
1
|
+
import{a as B}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-3OMVIKHK.js";import{a as dt}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-Y4MB3DWC.js";import{a as O}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-44TEKK34.js";import{f as lt}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-5YDKDDXQ.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-D4PUISDS.js";import{e as et}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-V74TRO5C.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-AOQBLGBU.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-WMKNIYJG.js";import{a as mt,c as ct,d as pt}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-3KO3N6JP.js";import{B as k,C as st}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-DR4WIP6T.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-OVSLUEIO.js";import{h as nt,k as ot,u as at}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-VTLJVEYF.js";import{c as rt}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-T2YIFX3Q.js";import{$a as D,$b as M,Db as d,Eb as _,Fa as m,Fb as S,Ga as v,Hc as it,Kc as R,Mb as Y,Mc as $,Oa as c,Q as j,T as z,Ua as u,V as q,Yb as Z,Za as r,_a as o,_b as tt,aa as I,ab as g,bb as h,c as A,cc as P,db as G,dc as w,ea as y,fa as N,fc as L,gc as F,hb as T,ja as b,jb as f,ka as E,mb as J,ob as K,pb as l,q as C,qb as s,rb as x,vb as Q,wb as W,xb as X,ya as U,za as H}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-ZIANW63Q.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-KOJSHFZJ.js";function It(t,e){if(t&1&&(r(0,"span",12),D(1,"img",13),o(),l(2)),t&2){let n=e.item;m(1),c("src",n.logo,H),m(1),x(" ",n.Name," ")}}function yt(t,e){if(t&1&&(g(0),l(1),d(2,"number"),r(3,"span"),l(4,"s"),o(),h()),t&2){let n=f().$implicit;m(1),x(" ",S(2,1,n.DurationInSecond,"1.1-1")," ")}}function Nt(t,e){t&1&&l(0," - ")}var bt=(t,e)=>({"bg-gradient-danger":t,"bg-gradient-warning":e}),Et=()=>["/menu/notification/detail"],Dt=t=>({ID:t});function Tt(t,e){if(t&1&&(g(0),r(1,"tr",14)(2,"td")(3,"a",15),D(4,"img",16),r(5,"span"),l(6),o()()(),r(7,"td")(8,"b"),l(9),o(),D(10,"div",17),o(),r(11,"td"),u(12,yt,5,4,"ng-container",18)(13,Nt,1,0,"ng-template",null,19,Y),o(),r(15,"td"),l(16),o(),r(17,"td"),l(18),d(19,"date"),o()(),h()),t&2){let n=e.$implicit,a=K(14);m(1),c("ngClass",X(14,bt,n.Status==1,n.Status==0)),m(2),c("routerLink",Q(17,Et))("queryParams",W(18,Dt,n.ID)),m(1),J("src",n.Img,H),m(2),s(n.Name),m(3),s(n.Label),m(1),c("innerHTML",n.Message,U),m(2),c("ngIf",n.DurationInSecond)("ngIfElse",a),m(4),s(n.StatusLabel),m(2),s(S(19,11,n.Created,"dd MMM yyyy HH:mm"))}}function Mt(t,e){if(t&1){let n=G();g(0),r(1,"div",4)(2,"div",20)(3,"app-custom-paginator",21),T("total",function(){b(n);let i=f(2);return E(i.getRowCount())})("next",function(){b(n);let i=f(2);return E(i.onNextPage())})("previous",function(){b(n);let i=f(2);return E(i.onPreviousPage())}),d(4,"async"),d(5,"async"),o()()(),h()}if(t&2){let n=f().ngIf,a=f();m(3),c("filter",a.filter)("totaldata",n==null?null:n.length)("paginationTotal",_(4,4,a.rowCount$))("hasClicked",_(5,6,a.rowCount$))}}function Pt(t,e){if(t&1&&(g(0),u(1,Mt,6,8,"ng-container",11),h()),t&2){let n=e.ngIf;m(1),c("ngIf",n.length>0)}}var ft=(()=>{let e=class e{constructor(a,i,p){this.http=a,this.notificationService=i,this.authService=p,this.filter=new dt,this.destroy$=new A,this.channelOptions=p.getChannels()}ngOnInit(){this.notificationService.clearNotification(),this.initPageLoader(),this.subscribeNotification()}subscribeNotification(){this.notificationService.getNotification().pipe(q(this.destroy$)).subscribe(a=>{a.length>0&&(this.getNotifications(),this.notificationService.clearNotification())})}initPageLoader(){this.http.post("/api/notification/Load",{}).subscribe(a=>{this.filter=a.Filter,this.filter.PageSize=this.filter.RowCount,this.getNotifications()})}onFilter(){this.rowCount$=null,this.getNotifications()}getNotifications(){let a={ChannelID:this.filter.ChannelID,RowCount:this.filter.PageSize,PageNumber:this.filter.PageNumber};this.notifications$=this.http.post("/api/notification/Get",a).pipe(C(i=>i.Data),C(i=>(i=this.setChannelLogoToNotifications(i),i=this.setTimeToSecond(i),i)),j(1))}setTimeToSecond(a){return a=a.map(i=>(i.DurationInSecond=parseInt(i.Duration)/1e3,i)),a}setChannelLogoToNotifications(a){return a=a.map(i=>(i.Img=rt.getChannelLogoByTypeId(i.TypeID),i)),a}onNextPage(){this.filter.PageNumber+=1,this.getNotifications()}onPreviousPage(){this.filter.PageNumber-=1,this.getNotifications()}getRowCount(){let a={ChannelID:this.filter.ChannelID};this.rowCount$=this.http.post("/api/notification/RowCount",a).pipe(C(i=>i.Count),j(1))}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}};e.\u0275fac=function(i){return new(i||e)(v(et),v(B),v(lt))},e.\u0275cmp=y({type:e,selectors:[["app-notification"]],decls:30,vars:9,consts:[["headerTitle","Notification","hideSearchBox","true",3,"onSubmit"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text","mt-2",3,"clearable","items","ngModel","ngModelChange"],["ng-option-tmp",""],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"table","table-hover"],[1,"sticky-top-thead"],[1,"table-light"],[4,"ngFor","ngForOf"],[4,"ngIf"],[1,"me-2"],["alt","",2,"width","18px",3,"src"],[3,"ngClass"],[3,"routerLink","queryParams"],["alt","",1,"channelLogo-md","me-4",3,"src"],[3,"innerHTML"],[4,"ngIf","ngIfElse"],["timeNotAvailable",""],[1,"col-12"],[3,"filter","totaldata","paginationTotal","hasClicked","total","next","previous"]],template:function(i,p){i&1&&(r(0,"mainpanel",0),T("onSubmit",function(){return p.onFilter()}),r(1,"filters")(2,"div")(3,"h6"),l(4,"Channel"),o(),r(5,"ng-select",1),T("ngModelChange",function(vt){return p.filter.ChannelID=vt}),u(6,It,3,2,"ng-template",2),o()()(),r(7,"content")(8,"div",3)(9,"div",4)(10,"div",5)(11,"div",6)(12,"table",7)(13,"thead",8)(14,"tr",9)(15,"th"),l(16,"Channel"),o(),r(17,"th"),l(18,"Process"),o(),r(19,"th"),l(20,"Duration"),o(),r(21,"th"),l(22,"Status"),o(),r(23,"th"),l(24,"Created"),o()()(),r(25,"tbody"),u(26,Tt,20,20,"ng-container",10),d(27,"async"),o()()()()(),u(28,Pt,2,1,"ng-container",11),d(29,"async"),o()()()),i&2&&(m(5),c("clearable",!0)("items",p.channelOptions)("ngModel",p.filter.ChannelID),m(21),c("ngForOf",_(27,5,p.notifications$)),m(2),c("ngIf",_(29,7,p.notifications$)))},dependencies:[Z,tt,M,ct,mt,nt,ot,k,R,O,P,L,w]});let t=e;return t})();function wt(t,e){if(t&1&&(r(0,"div",10)(1,"div",13)(2,"div",7)(3,"h5"),l(4,"Perflog"),o()(),r(5,"div",8)(6,"div",14)(7,"div",15)(8,"pre"),l(9),o()()()()()()),t&2){let n=f().ngIf;m(9),s(n.Perflog)}}function Lt(t,e){if(t&1&&(g(0),r(1,"div",17)(2,"div",13)(3,"div",7)(4,"h5"),l(5,"StackTrace"),o()(),r(6,"div",8)(7,"div",14)(8,"div",15)(9,"pre"),l(10),o()()()()()(),h()),t&2){let n=f().ngIf;m(10),s(n==null?null:n.StackTrace)}}function Ft(t,e){if(t&1&&(g(0),r(1,"mainpanel",1)(2,"actions")(3,"a",2),l(4,"Back"),o()(),r(5,"content")(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6)(10,"div",7)(11,"h5"),l(12,"General"),o()(),r(13,"div",8)(14,"div",9)(15,"div",10)(16,"div",11)(17,"label"),l(18,"Created Date"),o(),r(19,"div")(20,"span"),l(21),d(22,"date"),o()()()(),r(23,"div",10)(24,"div",11)(25,"label"),l(26,"Status"),o(),r(27,"div")(28,"span"),l(29),o()()()()(),r(30,"div",12)(31,"div",10)(32,"div",11)(33,"label"),l(34,"Duration"),o(),r(35,"div")(36,"span"),l(37),d(38,"number"),o()()()(),r(39,"div",10)(40,"div",11)(41,"label"),l(42,"Label"),o(),r(43,"div")(44,"span"),l(45),o()()()()()()()()(),r(46,"div",4)(47,"div",10)(48,"div",13)(49,"div",7)(50,"h5"),l(51,"Message"),o()(),r(52,"div",8)(53,"div",14)(54,"div",15)(55,"pre"),l(56),o()()()()()(),u(57,wt,10,1,"div",16)(58,Lt,11,1,"ng-container",0),o()()()(),h()),t&2){let n=e.ngIf;m(1),c("headerTitle","Notification "+n.Name)("hideSearchBox",!0)("hideSearchDropdown",!0),m(20),s(S(22,10,n.Created,"dd MMM yyyy HH:mm:ss")),m(8),s(n.StatusLabel),m(8),x("",S(38,13,n.DurationInSecond,"1.1-1")," s"),m(8),s(n.Label),m(11),s(n.Message),m(1),c("ngIf",n==null?null:n.Perflog),m(1),c("ngIf",n==null?null:n.StackTrace)}}var ut=(()=>{let e=class e{constructor(a,i){this.activatedRoute=a,this.notificationService=i}ngOnInit(){this.notification$=this.activatedRoute.queryParams.pipe(z(a=>{let i=a.ID;return this.notificationService.getNotificationDetail(i).pipe(C(p=>(p.DurationInSecond=parseInt(p.Duration)/1e3,p)))}))}};e.\u0275fac=function(i){return new(i||e)(v(it),v(B))},e.\u0275cmp=y({type:e,selectors:[["app-detail"]],decls:2,vars:3,consts:[[4,"ngIf"],[3,"headerTitle","hideSearchBox","hideSearchDropdown"],["role","button","routerLink","/menu/notification",1,"btn","btn-secondary","btn-fill","btn-lg","me-3"],[1,"container-fluid","mt-8"],[1,"row"],[1,"col-12"],[1,"card","mb-8"],[1,"card-header"],[1,"card-body"],[1,"row","mt-6"],[1,"col-sm-6"],[1,"info-label-group"],[1,"row","mt-4"],[1,"card"],[1,"col-sm-12","mt-2"],[1,"form-group"],["class","col-sm-6",4,"ngIf"],[1,"col-sm-12"]],template:function(i,p){i&1&&(u(0,Ft,59,16,"ng-container",0),d(1,"async")),i&2&&c("ngIf",_(1,1,p.notification$))},dependencies:[M,k,R,P,L,w]});let t=e;return t})();var Rt=[{path:"",component:ft},{path:"detail",component:ut}],gt=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275mod=N({type:e}),e.\u0275inj=I({imports:[F,$.forChild(Rt)]});let t=e;return t})();var me=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275mod=N({type:e}),e.\u0275inj=I({imports:[F,gt,pt,at,st,$,O]});let t=e;return t})();export{me as NotificationModule};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as D,b as ee,j as Cd,k as Oo,l as Ed,m as Id}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.
|
|
1
|
+
import{a as D,b as ee,j as Cd,k as Oo,l as Ed,m as Id}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-KOJSHFZJ.js";function M(t){return typeof t=="function"}function da(t){return M(t?.lift)}function b(t){return e=>{if(da(e))return e.lift(function(r){try{return t(r,this)}catch(n){this.error(n)}});throw new TypeError("Unable to lift unknown Observable type")}}function jt(t){let r=t(n=>{Error.call(n),n.stack=new Error().stack});return r.prototype=Object.create(Error.prototype),r.prototype.constructor=r,r}var Po=jt(t=>function(r){t(this),this.message=r?`${r.length} errors occurred during unsubscription:
|
|
2
2
|
${r.map((n,o)=>`${o+1}) ${n.toString()}`).join(`
|
|
3
3
|
`)}`:"",this.name="UnsubscriptionError",this.errors=r});function tn(t,e){if(t){let r=t.indexOf(e);0<=r&&t.splice(r,1)}}var Q=class t{constructor(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}unsubscribe(){let e;if(!this.closed){this.closed=!0;let{_parentage:r}=this;if(r)if(this._parentage=null,Array.isArray(r))for(let i of r)i.remove(this);else r.remove(this);let{initialTeardown:n}=this;if(M(n))try{n()}catch(i){e=i instanceof Po?i.errors:[i]}let{_finalizers:o}=this;if(o){this._finalizers=null;for(let i of o)try{bd(i)}catch(s){e=e??[],s instanceof Po?e=[...e,...s.errors]:e.push(s)}}if(e)throw new Po(e)}}add(e){var r;if(e&&e!==this)if(this.closed)bd(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=(r=this._finalizers)!==null&&r!==void 0?r:[]).push(e)}}_hasParent(e){let{_parentage:r}=this;return r===e||Array.isArray(r)&&r.includes(e)}_addParent(e){let{_parentage:r}=this;this._parentage=Array.isArray(r)?(r.push(e),r):r?[r,e]:e}_removeParent(e){let{_parentage:r}=this;r===e?this._parentage=null:Array.isArray(r)&&tn(r,e)}remove(e){let{_finalizers:r}=this;r&&tn(r,e),e instanceof t&&e._removeParent(this)}};Q.EMPTY=(()=>{let t=new Q;return t.closed=!0,t})();var fa=Q.EMPTY;function Fo(t){return t instanceof Q||t&&"closed"in t&&M(t.remove)&&M(t.add)&&M(t.unsubscribe)}function bd(t){M(t)?t():t.unsubscribe()}var Be={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1};var Tn={setTimeout(t,e,...r){let{delegate:n}=Tn;return n?.setTimeout?n.setTimeout(t,e,...r):setTimeout(t,e,...r)},clearTimeout(t){let{delegate:e}=Tn;return(e?.clearTimeout||clearTimeout)(t)},delegate:void 0};function ko(t){Tn.setTimeout(()=>{let{onUnhandledError:e}=Be;if(e)e(t);else throw t})}function He(){}var Md=(()=>ha("C",void 0,void 0))();function Sd(t){return ha("E",void 0,t)}function Td(t){return ha("N",t,void 0)}function ha(t,e,r){return{kind:t,value:e,error:r}}var nn=null;function xn(t){if(Be.useDeprecatedSynchronousErrorHandling){let e=!nn;if(e&&(nn={errorThrown:!1,error:null}),t(),e){let{errorThrown:r,error:n}=nn;if(nn=null,r)throw n}}else t()}function xd(t){Be.useDeprecatedSynchronousErrorHandling&&nn&&(nn.errorThrown=!0,nn.error=t)}var rn=class extends Q{constructor(e){super(),this.isStopped=!1,e?(this.destination=e,Fo(e)&&e.add(this)):this.destination=Dv}static create(e,r,n){return new yt(e,r,n)}next(e){this.isStopped?ga(Td(e),this):this._next(e)}error(e){this.isStopped?ga(Sd(e),this):(this.isStopped=!0,this._error(e))}complete(){this.isStopped?ga(Md,this):(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe(),this.destination=null)}_next(e){this.destination.next(e)}_error(e){try{this.destination.error(e)}finally{this.unsubscribe()}}_complete(){try{this.destination.complete()}finally{this.unsubscribe()}}},vv=Function.prototype.bind;function pa(t,e){return vv.call(t,e)}var ma=class{constructor(e){this.partialObserver=e}next(e){let{partialObserver:r}=this;if(r.next)try{r.next(e)}catch(n){Lo(n)}}error(e){let{partialObserver:r}=this;if(r.error)try{r.error(e)}catch(n){Lo(n)}else Lo(e)}complete(){let{partialObserver:e}=this;if(e.complete)try{e.complete()}catch(r){Lo(r)}}},yt=class extends rn{constructor(e,r,n){super();let o;if(M(e)||!e)o={next:e??void 0,error:r??void 0,complete:n??void 0};else{let i;this&&Be.useDeprecatedNextContext?(i=Object.create(e),i.unsubscribe=()=>this.unsubscribe(),o={next:e.next&&pa(e.next,i),error:e.error&&pa(e.error,i),complete:e.complete&&pa(e.complete,i)}):o=e}this.destination=new ma(o)}};function Lo(t){Be.useDeprecatedSynchronousErrorHandling?xd(t):ko(t)}function yv(t){throw t}function ga(t,e){let{onStoppedNotification:r}=Be;r&&Tn.setTimeout(()=>r(t,e))}var Dv={closed:!0,next:He,error:yv,complete:He};function I(t,e,r,n,o){return new va(t,e,r,n,o)}var va=class extends rn{constructor(e,r,n,o,i,s){super(e),this.onFinalize=i,this.shouldUnsubscribe=s,this._next=r?function(a){try{r(a)}catch(u){e.error(u)}}:super._next,this._error=o?function(a){try{o(a)}catch(u){e.error(u)}finally{this.unsubscribe()}}:super._error,this._complete=n?function(){try{n()}catch(a){e.error(a)}finally{this.unsubscribe()}}:super._complete}unsubscribe(){var e;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){let{closed:r}=this;super.unsubscribe(),!r&&((e=this.onFinalize)===null||e===void 0||e.call(this))}}};function O(t,e){return b((r,n)=>{let o=0;r.subscribe(I(n,i=>{n.next(t.call(e,i,o++))}))})}var _n=(()=>typeof Symbol=="function"&&Symbol.observable||"@@observable")();function le(t){return t}function ya(...t){return Da(t)}function Da(t){return t.length===0?le:t.length===1?t[0]:function(r){return t.reduce((n,o)=>o(n),r)}}var k=(()=>{class t{constructor(r){r&&(this._subscribe=r)}lift(r){let n=new t;return n.source=this,n.operator=r,n}subscribe(r,n,o){let i=Cv(r)?r:new yt(r,n,o);return xn(()=>{let{operator:s,source:a}=this;i.add(s?s.call(i,a):a?this._subscribe(i):this._trySubscribe(i))}),i}_trySubscribe(r){try{return this._subscribe(r)}catch(n){r.error(n)}}forEach(r,n){return n=_d(n),new n((o,i)=>{let s=new yt({next:a=>{try{r(a)}catch(u){i(u),s.unsubscribe()}},error:i,complete:o});this.subscribe(s)})}_subscribe(r){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(r)}[_n](){return this}pipe(...r){return Da(r)(this)}toPromise(r){return r=_d(r),new r((n,o)=>{let i;this.subscribe(s=>i=s,s=>o(s),()=>n(i))})}}return t.create=e=>new t(e),t})();function _d(t){var e;return(e=t??Be.Promise)!==null&&e!==void 0?e:Promise}function wv(t){return t&&M(t.next)&&M(t.error)&&M(t.complete)}function Cv(t){return t&&t instanceof rn||wv(t)&&Fo(t)}var Ad=jt(t=>function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});var ae=(()=>{class t extends k{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(r){let n=new jo(this,this);return n.operator=r,n}_throwIfClosed(){if(this.closed)throw new Ad}next(r){xn(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(let n of this.currentObservers)n.next(r)}})}error(r){xn(()=>{if(this._throwIfClosed(),!this.isStopped){this.hasError=this.isStopped=!0,this.thrownError=r;let{observers:n}=this;for(;n.length;)n.shift().error(r)}})}complete(){xn(()=>{if(this._throwIfClosed(),!this.isStopped){this.isStopped=!0;let{observers:r}=this;for(;r.length;)r.shift().complete()}})}unsubscribe(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null}get observed(){var r;return((r=this.observers)===null||r===void 0?void 0:r.length)>0}_trySubscribe(r){return this._throwIfClosed(),super._trySubscribe(r)}_subscribe(r){return this._throwIfClosed(),this._checkFinalizedStatuses(r),this._innerSubscribe(r)}_innerSubscribe(r){let{hasError:n,isStopped:o,observers:i}=this;return n||o?fa:(this.currentObservers=null,i.push(r),new Q(()=>{this.currentObservers=null,tn(i,r)}))}_checkFinalizedStatuses(r){let{hasError:n,thrownError:o,isStopped:i}=this;n?r.error(o):i&&r.complete()}asObservable(){let r=new k;return r.source=this,r}}return t.create=(e,r)=>new jo(e,r),t})(),jo=class extends ae{constructor(e,r){super(),this.destination=e,this.source=r}next(e){var r,n;(n=(r=this.destination)===null||r===void 0?void 0:r.next)===null||n===void 0||n.call(r,e)}error(e){var r,n;(n=(r=this.destination)===null||r===void 0?void 0:r.error)===null||n===void 0||n.call(r,e)}complete(){var e,r;(r=(e=this.destination)===null||e===void 0?void 0:e.complete)===null||r===void 0||r.call(e)}_subscribe(e){var r,n;return(n=(r=this.source)===null||r===void 0?void 0:r.subscribe(e))!==null&&n!==void 0?n:fa}};var Ir={now(){return(Ir.delegate||Date).now()},delegate:void 0};var br=class extends ae{constructor(e=1/0,r=1/0,n=Ir){super(),this._bufferSize=e,this._windowTime=r,this._timestampProvider=n,this._buffer=[],this._infiniteTimeWindow=!0,this._infiniteTimeWindow=r===1/0,this._bufferSize=Math.max(1,e),this._windowTime=Math.max(1,r)}next(e){let{isStopped:r,_buffer:n,_infiniteTimeWindow:o,_timestampProvider:i,_windowTime:s}=this;r||(n.push(e),!o&&n.push(i.now()+s)),this._trimBuffer(),super.next(e)}_subscribe(e){this._throwIfClosed(),this._trimBuffer();let r=this._innerSubscribe(e),{_infiniteTimeWindow:n,_buffer:o}=this,i=o.slice();for(let s=0;s<i.length&&!e.closed;s+=n?1:2)e.next(i[s]);return this._checkFinalizedStatuses(e),r}_trimBuffer(){let{_bufferSize:e,_timestampProvider:r,_buffer:n,_infiniteTimeWindow:o}=this,i=(o?1:2)*e;if(e<1/0&&i<n.length&&n.splice(0,n.length-i),!o){let s=r.now(),a=0;for(let u=1;u<n.length&&n[u]<=s;u+=2)a=u;a&&n.splice(0,a+1)}}};var An=t=>t&&typeof t.length=="number"&&typeof t!="function";function Vo(t){return M(t?.then)}function $o(t){return M(t[_n])}function Uo(t){return Symbol.asyncIterator&&M(t?.[Symbol.asyncIterator])}function Bo(t){return new TypeError(`You provided ${t!==null&&typeof t=="object"?"an invalid object":`'${t}'`} where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}function Ev(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var Ho=Ev();function zo(t){return M(t?.[Ho])}function Wo(t){return Ed(this,arguments,function*(){let r=t.getReader();try{for(;;){let{value:n,done:o}=yield Oo(r.read());if(o)return yield Oo(void 0);yield yield Oo(n)}}finally{r.releaseLock()}})}function Go(t){return M(t?.getReader)}function P(t){if(t instanceof k)return t;if(t!=null){if($o(t))return Iv(t);if(An(t))return bv(t);if(Vo(t))return Mv(t);if(Uo(t))return Nd(t);if(zo(t))return Sv(t);if(Go(t))return Tv(t)}throw Bo(t)}function Iv(t){return new k(e=>{let r=t[_n]();if(M(r.subscribe))return r.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function bv(t){return new k(e=>{for(let r=0;r<t.length&&!e.closed;r++)e.next(t[r]);e.complete()})}function Mv(t){return new k(e=>{t.then(r=>{e.closed||(e.next(r),e.complete())},r=>e.error(r)).then(null,ko)})}function Sv(t){return new k(e=>{for(let r of t)if(e.next(r),e.closed)return;e.complete()})}function Nd(t){return new k(e=>{xv(t,e).catch(r=>e.error(r))})}function Tv(t){return Nd(Wo(t))}function xv(t,e){var r,n,o,i;return Cd(this,void 0,void 0,function*(){try{for(r=Id(t);n=yield r.next(),!n.done;){let s=n.value;if(e.next(s),e.closed)return}}catch(s){o={error:s}}finally{try{n&&!n.done&&(i=r.return)&&(yield i.call(r))}finally{if(o)throw o.error}}e.complete()})}function Ca(t={}){let{connector:e=()=>new ae,resetOnError:r=!0,resetOnComplete:n=!0,resetOnRefCountZero:o=!0}=t;return i=>{let s,a,u,c=0,l=!1,d=!1,f=()=>{a?.unsubscribe(),a=void 0},h=()=>{f(),s=u=void 0,l=d=!1},p=()=>{let S=s;h(),S?.unsubscribe()};return b((S,C)=>{c++,!d&&!l&&f();let m=u=u??e();C.add(()=>{c--,c===0&&!d&&!l&&(a=wa(p,o))}),m.subscribe(C),!s&&c>0&&(s=new yt({next:j=>m.next(j),error:j=>{d=!0,f(),a=wa(h,r,j),m.error(j)},complete:()=>{l=!0,f(),a=wa(h,n),m.complete()}}),P(S).subscribe(s))})(i)}}function wa(t,e,...r){if(e===!0){t();return}if(e===!1)return;let n=new yt({next:()=>{n.unsubscribe(),t()}});return P(e(...r)).subscribe(n)}function Rd(t,e,r){let n,o=!1;return t&&typeof t=="object"?{bufferSize:n=1/0,windowTime:e=1/0,refCount:o=!1,scheduler:r}=t:n=t??1/0,Ca({connector:()=>new br(n,e,r),resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:o})}function Nn(){return b((t,e)=>{let r=null;t._refCount++;let n=I(e,void 0,void 0,void 0,()=>{if(!t||t._refCount<=0||0<--t._refCount){r=null;return}let o=t._connection,i=r;r=null,o&&(!i||o===i)&&o.unsubscribe(),e.unsubscribe()});t.subscribe(n),n.closed||(r=t.connect())})}var Rn=class extends k{constructor(e,r){super(),this.source=e,this.subjectFactory=r,this._subject=null,this._refCount=0,this._connection=null,da(e)&&(this.lift=e.lift)}_subscribe(e){return this.getSubject().subscribe(e)}getSubject(){let e=this._subject;return(!e||e.isStopped)&&(this._subject=this.subjectFactory()),this._subject}_teardown(){this._refCount=0;let{_connection:e}=this;this._subject=this._connection=null,e?.unsubscribe()}connect(){let e=this._connection;if(!e){e=this._connection=new Q;let r=this.getSubject();e.add(this.source.subscribe(I(r,void 0,()=>{this._teardown(),r.complete()},n=>{this._teardown(),r.error(n)},()=>this._teardown()))),e.closed&&(this._connection=null,e=Q.EMPTY)}return e}refCount(){return Nn()(this)}};var On={schedule(t){let e=requestAnimationFrame,r=cancelAnimationFrame,{delegate:n}=On;n&&(e=n.requestAnimationFrame,r=n.cancelAnimationFrame);let o=e(i=>{r=void 0,t(i)});return new Q(()=>r?.(o))},requestAnimationFrame(...t){let{delegate:e}=On;return(e?.requestAnimationFrame||requestAnimationFrame)(...t)},cancelAnimationFrame(...t){let{delegate:e}=On;return(e?.cancelAnimationFrame||cancelAnimationFrame)(...t)},delegate:void 0};var de=class extends ae{constructor(e){super(),this._value=e}get value(){return this.getValue()}_subscribe(e){let r=super._subscribe(e);return!r.closed&&e.next(this._value),r}getValue(){let{hasError:e,thrownError:r,_value:n}=this;if(e)throw r;return this._throwIfClosed(),n}next(e){super.next(this._value=e)}};var qo=class extends Q{constructor(e,r){super()}schedule(e,r=0){return this}};var Mr={setInterval(t,e,...r){let{delegate:n}=Mr;return n?.setInterval?n.setInterval(t,e,...r):setInterval(t,e,...r)},clearInterval(t){let{delegate:e}=Mr;return(e?.clearInterval||clearInterval)(t)},delegate:void 0};var Ke=class extends qo{constructor(e,r){super(e,r),this.scheduler=e,this.work=r,this.pending=!1}schedule(e,r=0){var n;if(this.closed)return this;this.state=e;let o=this.id,i=this.scheduler;return o!=null&&(this.id=this.recycleAsyncId(i,o,r)),this.pending=!0,this.delay=r,this.id=(n=this.id)!==null&&n!==void 0?n:this.requestAsyncId(i,this.id,r),this}requestAsyncId(e,r,n=0){return Mr.setInterval(e.flush.bind(e,this),n)}recycleAsyncId(e,r,n=0){if(n!=null&&this.delay===n&&this.pending===!1)return r;r!=null&&Mr.clearInterval(r)}execute(e,r){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;let n=this._execute(e,r);if(n)return n;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(e,r){let n=!1,o;try{this.work(e)}catch(i){n=!0,o=i||new Error("Scheduled action threw falsy error")}if(n)return this.unsubscribe(),o}unsubscribe(){if(!this.closed){let{id:e,scheduler:r}=this,{actions:n}=r;this.work=this.state=this.scheduler=null,this.pending=!1,tn(n,this),e!=null&&(this.id=this.recycleAsyncId(r,e,null)),this.delay=null,super.unsubscribe()}}};var _v=1,Ea,Ia={};function Od(t){return t in Ia?(delete Ia[t],!0):!1}var Pd={setImmediate(t){let e=_v++;return Ia[e]=!0,Ea||(Ea=Promise.resolve()),Ea.then(()=>Od(e)&&t()),e},clearImmediate(t){Od(t)}};var{setImmediate:Av,clearImmediate:Nv}=Pd,Sr={setImmediate(...t){let{delegate:e}=Sr;return(e?.setImmediate||Av)(...t)},clearImmediate(t){let{delegate:e}=Sr;return(e?.clearImmediate||Nv)(t)},delegate:void 0};var Zo=class extends Ke{constructor(e,r){super(e,r),this.scheduler=e,this.work=r}requestAsyncId(e,r,n=0){return n!==null&&n>0?super.requestAsyncId(e,r,n):(e.actions.push(this),e._scheduled||(e._scheduled=Sr.setImmediate(e.flush.bind(e,void 0))))}recycleAsyncId(e,r,n=0){var o;if(n!=null?n>0:this.delay>0)return super.recycleAsyncId(e,r,n);let{actions:i}=e;r!=null&&((o=i[i.length-1])===null||o===void 0?void 0:o.id)!==r&&(Sr.clearImmediate(r),e._scheduled===r&&(e._scheduled=void 0))}};var Pn=class t{constructor(e,r=t.now){this.schedulerActionCtor=e,this.now=r}schedule(e,r=0,n){return new this.schedulerActionCtor(this,e).schedule(n,r)}};Pn.now=Ir.now;var Je=class extends Pn{constructor(e,r=Pn.now){super(e,r),this.actions=[],this._active=!1}flush(e){let{actions:r}=this;if(this._active){r.push(e);return}let n;this._active=!0;do if(n=e.execute(e.state,e.delay))break;while(e=r.shift());if(this._active=!1,n){for(;e=r.shift();)e.unsubscribe();throw n}}};var Yo=class extends Je{flush(e){this._active=!0;let r=this._scheduled;this._scheduled=void 0;let{actions:n}=this,o;e=e||n.shift();do if(o=e.execute(e.state,e.delay))break;while((e=n[0])&&e.id===r&&n.shift());if(this._active=!1,o){for(;(e=n[0])&&e.id===r&&n.shift();)e.unsubscribe();throw o}}};var Rv=new Yo(Zo);var Xe=new Je(Ke),ba=Xe;var Qo=class extends Ke{constructor(e,r){super(e,r),this.scheduler=e,this.work=r}schedule(e,r=0){return r>0?super.schedule(e,r):(this.delay=r,this.state=e,this.scheduler.flush(this),this)}execute(e,r){return r>0||this.closed?super.execute(e,r):this._execute(e,r)}requestAsyncId(e,r,n=0){return n!=null&&n>0||n==null&&this.delay>0?super.requestAsyncId(e,r,n):(e.flush(this),0)}};var Ko=class extends Je{};var Ov=new Ko(Qo);var Jo=class extends Ke{constructor(e,r){super(e,r),this.scheduler=e,this.work=r}requestAsyncId(e,r,n=0){return n!==null&&n>0?super.requestAsyncId(e,r,n):(e.actions.push(this),e._scheduled||(e._scheduled=On.requestAnimationFrame(()=>e.flush(void 0))))}recycleAsyncId(e,r,n=0){var o;if(n!=null?n>0:this.delay>0)return super.recycleAsyncId(e,r,n);let{actions:i}=e;r!=null&&((o=i[i.length-1])===null||o===void 0?void 0:o.id)!==r&&(On.cancelAnimationFrame(r),e._scheduled=void 0)}};var Xo=class extends Je{flush(e){this._active=!0;let r=this._scheduled;this._scheduled=void 0;let{actions:n}=this,o;e=e||n.shift();do if(o=e.execute(e.state,e.delay))break;while((e=n[0])&&e.id===r&&n.shift());if(this._active=!1,o){for(;(e=n[0])&&e.id===r&&n.shift();)e.unsubscribe();throw o}}};var Pv=new Xo(Jo);var Ie=new k(t=>t.complete());function ei(t){return t&&M(t.schedule)}function Ma(t){return t[t.length-1]}function Fn(t){return M(Ma(t))?t.pop():void 0}function et(t){return ei(Ma(t))?t.pop():void 0}function Fd(t,e){return typeof Ma(t)=="number"?t.pop():e}function pe(t,e,r,n=0,o=!1){let i=e.schedule(function(){r(),o?t.add(this.schedule(null,n)):this.unsubscribe()},n);if(t.add(i),!o)return i}function Tr(t,e=0){return b((r,n)=>{r.subscribe(I(n,o=>pe(n,t,()=>n.next(o),e),()=>pe(n,t,()=>n.complete(),e),o=>pe(n,t,()=>n.error(o),e)))})}function xr(t,e=0){return b((r,n)=>{n.add(t.schedule(()=>r.subscribe(n),e))})}function kd(t,e){return P(t).pipe(xr(e),Tr(e))}function Ld(t,e){return P(t).pipe(xr(e),Tr(e))}function jd(t,e){return new k(r=>{let n=0;return e.schedule(function(){n===t.length?r.complete():(r.next(t[n++]),r.closed||this.schedule())})})}function Vd(t,e){return new k(r=>{let n;return pe(r,e,()=>{n=t[Ho](),pe(r,e,()=>{let o,i;try{({value:o,done:i}=n.next())}catch(s){r.error(s);return}i?r.complete():r.next(o)},0,!0)}),()=>M(n?.return)&&n.return()})}function ti(t,e){if(!t)throw new Error("Iterable cannot be null");return new k(r=>{pe(r,e,()=>{let n=t[Symbol.asyncIterator]();pe(r,e,()=>{n.next().then(o=>{o.done?r.complete():r.next(o.value)})},0,!0)})})}function $d(t,e){return ti(Wo(t),e)}function Ud(t,e){if(t!=null){if($o(t))return kd(t,e);if(An(t))return jd(t,e);if(Vo(t))return Ld(t,e);if(Uo(t))return ti(t,e);if(zo(t))return Vd(t,e);if(Go(t))return $d(t,e)}throw Bo(t)}function G(t,e){return e?Ud(t,e):P(t)}function x(...t){let e=et(t);return G(t,e)}function kn(t,e){let r=M(t)?t:()=>t,n=o=>o.error(r());return new k(e?o=>e.schedule(n,0,o):n)}function Sa(t){return!!t&&(t instanceof k||M(t.lift)&&M(t.subscribe))}var Dt=jt(t=>function(){t(this),this.name="EmptyError",this.message="no elements in sequence"});function ni(t){return t instanceof Date&&!isNaN(t)}var Fv=jt(t=>function(r=null){t(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=r});function kv(t,e){let{first:r,each:n,with:o=Lv,scheduler:i=e??Xe,meta:s=null}=ni(t)?{first:t}:typeof t=="number"?{each:t}:t;if(r==null&&n==null)throw new TypeError("No timeout provided.");return b((a,u)=>{let c,l,d=null,f=0,h=p=>{l=pe(u,i,()=>{try{c.unsubscribe(),P(o({meta:s,lastValue:d,seen:f})).subscribe(u)}catch(S){u.error(S)}},p)};c=a.subscribe(I(u,p=>{l?.unsubscribe(),f++,u.next(d=p),n>0&&h(n)},void 0,void 0,()=>{l?.closed||l?.unsubscribe(),d=null})),!f&&h(r!=null?typeof r=="number"?r:+r-i.now():n)})}function Lv(t){throw new Fv(t)}var{isArray:jv}=Array;function Vv(t,e){return jv(e)?t(...e):t(e)}function Ln(t){return O(e=>Vv(t,e))}var{isArray:$v}=Array,{getPrototypeOf:Uv,prototype:Bv,keys:Hv}=Object;function ri(t){if(t.length===1){let e=t[0];if($v(e))return{args:e,keys:null};if(zv(e)){let r=Hv(e);return{args:r.map(n=>e[n]),keys:r}}}return{args:t,keys:null}}function zv(t){return t&&typeof t=="object"&&Uv(t)===Bv}function oi(t,e){return t.reduce((r,n,o)=>(r[n]=e[o],r),{})}function _r(...t){let e=et(t),r=Fn(t),{args:n,keys:o}=ri(t);if(n.length===0)return G([],e);let i=new k(Wv(n,e,o?s=>oi(o,s):le));return r?i.pipe(Ln(r)):i}function Wv(t,e,r=le){return n=>{Bd(e,()=>{let{length:o}=t,i=new Array(o),s=o,a=o;for(let u=0;u<o;u++)Bd(e,()=>{let c=G(t[u],e),l=!1;c.subscribe(I(n,d=>{i[u]=d,l||(l=!0,a--),a||n.next(r(i.slice()))},()=>{--s||n.complete()}))},n)},n)}}function Bd(t,e,r){t?pe(r,t,e):e()}function Hd(t,e,r,n,o,i,s,a){let u=[],c=0,l=0,d=!1,f=()=>{d&&!u.length&&!c&&e.complete()},h=S=>c<n?p(S):u.push(S),p=S=>{i&&e.next(S),c++;let C=!1;P(r(S,l++)).subscribe(I(e,m=>{o?.(m),i?h(m):e.next(m)},()=>{C=!0},void 0,()=>{if(C)try{for(c--;u.length&&c<n;){let m=u.shift();s?pe(e,s,()=>p(m)):p(m)}f()}catch(m){e.error(m)}}))};return t.subscribe(I(e,h,()=>{d=!0,f()})),()=>{a?.()}}function K(t,e,r=1/0){return M(e)?K((n,o)=>O((i,s)=>e(n,i,o,s))(P(t(n,o))),r):(typeof e=="number"&&(r=e),b((n,o)=>Hd(n,o,t,r)))}function tt(t=1/0){return K(le,t)}function zd(){return tt(1)}function jn(...t){return zd()(G(t,et(t)))}function ii(t){return new k(e=>{P(t()).subscribe(e)})}function Gv(...t){let e=Fn(t),{args:r,keys:n}=ri(t),o=new k(i=>{let{length:s}=r;if(!s){i.complete();return}let a=new Array(s),u=s,c=s;for(let l=0;l<s;l++){let d=!1;P(r[l]).subscribe(I(i,f=>{d||(d=!0,c--),a[l]=f},()=>u--,void 0,()=>{(!u||!d)&&(c||i.next(n?oi(n,a):a),i.complete())}))}});return e?o.pipe(Ln(e)):o}var qv=["addListener","removeListener"],Zv=["addEventListener","removeEventListener"],Yv=["on","off"];function Ta(t,e,r,n){if(M(r)&&(n=r,r=void 0),n)return Ta(t,e,r).pipe(Ln(n));let[o,i]=Jv(t)?Zv.map(s=>a=>t[s](e,a,r)):Qv(t)?qv.map(Wd(t,e)):Kv(t)?Yv.map(Wd(t,e)):[];if(!o&&An(t))return K(s=>Ta(s,e,r))(P(t));if(!o)throw new TypeError("Invalid event target");return new k(s=>{let a=(...u)=>s.next(1<u.length?u:u[0]);return o(a),()=>i(a)})}function Wd(t,e){return r=>n=>t[r](e,n)}function Qv(t){return M(t.addListener)&&M(t.removeListener)}function Kv(t){return M(t.on)&&M(t.off)}function Jv(t){return M(t.addEventListener)&&M(t.removeEventListener)}function Ar(t=0,e,r=ba){let n=-1;return e!=null&&(ei(e)?r=e:n=e),new k(o=>{let i=ni(t)?+t-r.now():t;i<0&&(i=0);let s=0;return r.schedule(function(){o.closed||(o.next(s++),0<=n?this.schedule(void 0,n):o.complete())},i)})}function Xv(t=0,e=Xe){return t<0&&(t=0),Ar(t,t,e)}function ey(...t){let e=et(t),r=Fd(t,1/0),n=t;return n.length?n.length===1?P(n[0]):tt(r)(G(n,e)):Ie}function Gd(t,e){return(r,n)=>!t.call(e,r,n)}function te(t,e){return b((r,n)=>{let o=0;r.subscribe(I(n,i=>t.call(e,i,o++)&&n.next(i)))})}function ty(t,e,r){return[te(e,r)(P(t)),te(Gd(e,r))(P(t))]}function qd(t){return b((e,r)=>{let n=!1,o=null,i=null,s=!1,a=()=>{if(i?.unsubscribe(),i=null,n){n=!1;let c=o;o=null,r.next(c)}s&&r.complete()},u=()=>{i=null,s&&r.complete()};e.subscribe(I(r,c=>{n=!0,o=c,i||P(t(c)).subscribe(i=I(r,a,u))},()=>{s=!0,(!n||!i||i.closed)&&r.complete()}))})}function ny(t,e=Xe){return qd(()=>Ar(t,e))}function wt(t){return b((e,r)=>{let n=null,o=!1,i;n=e.subscribe(I(r,void 0,void 0,s=>{i=P(t(s,wt(t)(e))),n?(n.unsubscribe(),n=null,i.subscribe(r)):o=!0})),o&&(n.unsubscribe(),n=null,i.subscribe(r))})}function Zd(t,e,r,n,o){return(i,s)=>{let a=r,u=e,c=0;i.subscribe(I(s,l=>{let d=c++;u=a?t(u,l,d):(a=!0,l),n&&s.next(u)},o&&(()=>{a&&s.next(u),s.complete()})))}}function nt(t,e){return M(e)?K(t,e,1):K(t,1)}function ry(t){return b((e,r)=>{let n=!1,o=null,i=null,s=()=>{if(i?.unsubscribe(),i=null,n){n=!1;let a=o;o=null,r.next(a)}};e.subscribe(I(r,a=>{i?.unsubscribe(),n=!0,o=a,i=I(r,s,He),P(t(a)).subscribe(i)},()=>{s(),r.complete()},void 0,()=>{o=i=null}))})}function oy(t,e=Xe){return b((r,n)=>{let o=null,i=null,s=null,a=()=>{if(o){o.unsubscribe(),o=null;let c=i;i=null,n.next(c)}};function u(){let c=s+t,l=e.now();if(l<c){o=this.schedule(void 0,c-l),n.add(o);return}a()}r.subscribe(I(n,c=>{i=c,s=e.now(),o||(o=e.schedule(u,t),n.add(o))},()=>{a(),n.complete()},void 0,()=>{i=o=null}))})}function Vt(t){return b((e,r)=>{let n=!1;e.subscribe(I(r,o=>{n=!0,r.next(o)},()=>{n||r.next(t),r.complete()}))})}function Ct(t){return t<=0?()=>Ie:b((e,r)=>{let n=0;e.subscribe(I(r,o=>{++n<=t&&(r.next(o),t<=n&&r.complete())}))})}function iy(){return b((t,e)=>{t.subscribe(I(e,He))})}function xa(t){return O(()=>t)}function sy(t,e=le){return t=t??ay,b((r,n)=>{let o,i=!0;r.subscribe(I(n,s=>{let a=e(s);(i||!t(o,a))&&(i=!1,o=a,n.next(s))}))})}function ay(t,e){return t===e}function si(t=uy){return b((e,r)=>{let n=!1;e.subscribe(I(r,o=>{n=!0,r.next(o)},()=>n?r.complete():r.error(t())))})}function uy(){return new Dt}function cy(t,e){return b((r,n)=>{let o=0;r.subscribe(I(n,i=>{t.call(e,i,o++,r)||(n.next(!1),n.complete())},()=>{n.next(!0),n.complete()}))})}function $t(t){return b((e,r)=>{try{e.subscribe(r)}finally{r.add(t)}})}function rt(t,e){let r=arguments.length>=2;return n=>n.pipe(t?te((o,i)=>t(o,i,n)):le,Ct(1),r?Vt(e):si(()=>new Dt))}function Vn(t){return t<=0?()=>Ie:b((e,r)=>{let n=[];e.subscribe(I(r,o=>{n.push(o),t<n.length&&n.shift()},()=>{for(let o of n)r.next(o);r.complete()},void 0,()=>{n=null}))})}function _a(t,e){let r=arguments.length>=2;return n=>n.pipe(t?te((o,i)=>t(o,i,n)):le,Vn(1),r?Vt(e):si(()=>new Dt))}function ai(t,e){return b(Zd(t,e,arguments.length>=2,!0))}function ly(t){return te((e,r)=>t<=r)}function Aa(...t){let e=et(t);return b((r,n)=>{(e?jn(t,r,e):jn(t,r)).subscribe(n)})}function ue(t,e){return b((r,n)=>{let o=null,i=0,s=!1,a=()=>s&&!o&&n.complete();r.subscribe(I(n,u=>{o?.unsubscribe();let c=0,l=i++;P(t(u,l)).subscribe(o=I(n,d=>n.next(e?e(u,d,l,c++):d),()=>{o=null,a()}))},()=>{s=!0,a()}))})}function dy(t,e){return M(e)?ue(()=>t,e):ue(()=>t)}function ui(t){return b((e,r)=>{P(t).subscribe(I(r,()=>r.complete(),He)),!r.closed&&e.subscribe(r)})}function fy(t,e=!1){return b((r,n)=>{let o=0;r.subscribe(I(n,i=>{let s=t(i,o++);(s||e)&&n.next(i),!s&&n.complete()}))})}function ne(t,e,r){let n=M(t)||e||r?{next:t,error:e,complete:r}:t;return n?b((o,i)=>{var s;(s=n.subscribe)===null||s===void 0||s.call(n);let a=!0;o.subscribe(I(i,u=>{var c;(c=n.next)===null||c===void 0||c.call(n,u),i.next(u)},()=>{var u;a=!1,(u=n.complete)===null||u===void 0||u.call(n),i.complete()},u=>{var c;a=!1,(c=n.error)===null||c===void 0||c.call(n,u),i.error(u)},()=>{var u,c;a&&((u=n.unsubscribe)===null||u===void 0||u.call(n)),(c=n.finalize)===null||c===void 0||c.call(n)}))}):le}function hy(...t){let e=Fn(t);return b((r,n)=>{let o=t.length,i=new Array(o),s=t.map(()=>!1),a=!1;for(let u=0;u<o;u++)P(t[u]).subscribe(I(n,c=>{i[u]=c,!a&&!s[u]&&(s[u]=!0,(a=s.every(le))&&(s=null))},He));r.subscribe(I(n,u=>{if(a){let c=[u,...i];n.next(e?e(...c):c)}}))})}var Yd=null;var Na=1;function se(t){let e=Yd;return Yd=t,e}var Qd={version:0,lastCleanEpoch:0,dirty:!1,producerNode:void 0,producerLastReadVersion:void 0,producerIndexOfThis:void 0,nextProducerIndex:0,liveConsumerNode:void 0,liveConsumerIndexOfThis:void 0,consumerAllowSignalWrites:!1,consumerIsAlwaysLive:!1,producerMustRecompute:()=>!1,producerRecomputeValue:()=>{},consumerMarkedDirty:()=>{},consumerOnSignalRead:()=>{}};function py(t){if(!(Pa(t)&&!t.dirty)&&!(!t.dirty&&t.lastCleanEpoch===Na)){if(!t.producerMustRecompute(t)&&!Ra(t)){t.dirty=!1,t.lastCleanEpoch=Na;return}t.producerRecomputeValue(t),t.dirty=!1,t.lastCleanEpoch=Na}}function Kd(t){return t&&(t.nextProducerIndex=0),se(t)}function Jd(t,e){if(se(e),!(!t||t.producerNode===void 0||t.producerIndexOfThis===void 0||t.producerLastReadVersion===void 0)){if(Pa(t))for(let r=t.nextProducerIndex;r<t.producerNode.length;r++)Oa(t.producerNode[r],t.producerIndexOfThis[r]);for(;t.producerNode.length>t.nextProducerIndex;)t.producerNode.pop(),t.producerLastReadVersion.pop(),t.producerIndexOfThis.pop()}}function Ra(t){ci(t);for(let e=0;e<t.producerNode.length;e++){let r=t.producerNode[e],n=t.producerLastReadVersion[e];if(n!==r.version||(py(r),n!==r.version))return!0}return!1}function Xd(t){if(ci(t),Pa(t))for(let e=0;e<t.producerNode.length;e++)Oa(t.producerNode[e],t.producerIndexOfThis[e]);t.producerNode.length=t.producerLastReadVersion.length=t.producerIndexOfThis.length=0,t.liveConsumerNode&&(t.liveConsumerNode.length=t.liveConsumerIndexOfThis.length=0)}function Oa(t,e){if(gy(t),ci(t),t.liveConsumerNode.length===1)for(let n=0;n<t.producerNode.length;n++)Oa(t.producerNode[n],t.producerIndexOfThis[n]);let r=t.liveConsumerNode.length-1;if(t.liveConsumerNode[e]=t.liveConsumerNode[r],t.liveConsumerIndexOfThis[e]=t.liveConsumerIndexOfThis[r],t.liveConsumerNode.length--,t.liveConsumerIndexOfThis.length--,e<t.liveConsumerNode.length){let n=t.liveConsumerIndexOfThis[e],o=t.liveConsumerNode[e];ci(o),o.producerIndexOfThis[n]=e}}function Pa(t){return t.consumerIsAlwaysLive||(t?.liveConsumerNode?.length??0)>0}function ci(t){t.producerNode??=[],t.producerIndexOfThis??=[],t.producerLastReadVersion??=[]}function gy(t){t.liveConsumerNode??=[],t.liveConsumerIndexOfThis??=[]}function my(){throw new Error}var vy=my;function ef(t){vy=t}function z(t){for(let e in t)if(t[e]===z)return e;throw Error("Could not find renamed property on target object.")}function li(t,e){for(let r in e)e.hasOwnProperty(r)&&!t.hasOwnProperty(r)&&(t[r]=e[r])}function ge(t){if(typeof t=="string")return t;if(Array.isArray(t))return"["+t.map(ge).join(", ")+"]";if(t==null)return""+t;if(t.overriddenName)return`${t.overriddenName}`;if(t.name)return`${t.name}`;let e=t.toString();if(e==null)return""+e;let r=e.indexOf(`
|
|
4
4
|
`);return r===-1?e:e.substring(0,r)}function Ka(t,e){return t==null||t===""?e===null?"":e:e==null||e===""?t:t+" "+e}var yy=z({__forward_ref__:z});function zf(t){return t.__forward_ref__=zf,t.toString=function(){return ge(this())},t}function we(t){return Wf(t)?t():t}function Wf(t){return typeof t=="function"&&t.hasOwnProperty(yy)&&t.__forward_ref__===zf}function Gf(t){return t&&!!t.\u0275providers}var qf="https://g.co/ng/security#xss",v=class extends Error{constructor(e,r){super(Wi(e,r)),this.code=e}};function Wi(t,e){return`${`NG0${Math.abs(t)}`}${e?": "+e:""}`}var Dy=z({\u0275cmp:z}),wy=z({\u0275dir:z}),Cy=z({\u0275pipe:z}),Ey=z({\u0275mod:z}),bi=z({\u0275fac:z}),Nr=z({__NG_ELEMENT_ID__:z}),tf=z({__NG_ENV_ID__:z});function an(t){return typeof t=="string"?t:t==null?"":String(t)}function Iy(t){return typeof t=="function"?t.name||t.toString():typeof t=="object"&&t!=null&&typeof t.type=="function"?t.type.name||t.type.toString():an(t)}function by(t,e){let r=e?`. Dependency path: ${e.join(" > ")} > ${t}`:"";throw new v(-200,`Circular dependency in DI detected for ${t}${r}`)}function cc(t,e){let r=e?` in ${e}`:"";throw new v(-201,!1)}function My(t,e){t==null&&Sy(e,t,null,"!=")}function Sy(t,e,r,n){throw new Error(`ASSERTION ERROR: ${t}`+(n==null?"":` [Expected=> ${r} ${n} ${e} <=Actual]`))}function w(t){return{token:t.token,providedIn:t.providedIn||null,factory:t.factory,value:void 0}}function St(t){return{providers:t.providers||[],imports:t.imports||[]}}function Gi(t){return nf(t,Yf)||nf(t,Qf)}function Zf(t){return Gi(t)!==null}function nf(t,e){return t.hasOwnProperty(e)?t[e]:null}function Ty(t){let e=t&&(t[Yf]||t[Qf]);return e||null}function rf(t){return t&&(t.hasOwnProperty(of)||t.hasOwnProperty(xy))?t[of]:null}var Yf=z({\u0275prov:z}),of=z({\u0275inj:z}),Qf=z({ngInjectableDef:z}),xy=z({ngInjectorDef:z}),F=function(t){return t[t.Default=0]="Default",t[t.Host=1]="Host",t[t.Self=2]="Self",t[t.SkipSelf=4]="SkipSelf",t[t.Optional=8]="Optional",t}(F||{}),Ja;function Kf(){return Ja}function be(t){let e=Ja;return Ja=t,e}function Jf(t,e,r){let n=Gi(t);if(n&&n.providedIn=="root")return n.value===void 0?n.value=n.factory():n.value;if(r&F.Optional)return null;if(e!==void 0)return e;cc(ge(t),"Injector")}var X=globalThis;var E=class{constructor(e,r){this._desc=e,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,typeof r=="number"?this.__NG_ELEMENT_ID__=r:r!==void 0&&(this.\u0275prov=w({token:this,providedIn:r.providedIn||"root",factory:r.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}};var _y={},Or=_y,Xa="__NG_DI_FLAG__",Mi="ngTempTokenPath",Ay="ngTokenPath",Ny=/\n/gm,Ry="\u0275",sf="__source",zn;function Oy(){return zn}function Ut(t){let e=zn;return zn=t,e}function Py(t,e=F.Default){if(zn===void 0)throw new v(-203,!1);return zn===null?Jf(t,void 0,e):zn.get(t,e&F.Optional?null:void 0,e)}function y(t,e=F.Default){return(Kf()||Py)(we(t),e)}function g(t,e=F.Default){return y(t,qi(e))}function qi(t){return typeof t>"u"||typeof t=="number"?t:0|(t.optional&&8)|(t.host&&1)|(t.self&&2)|(t.skipSelf&&4)}function eu(t){let e=[];for(let r=0;r<t.length;r++){let n=we(t[r]);if(Array.isArray(n)){if(n.length===0)throw new v(900,!1);let o,i=F.Default;for(let s=0;s<n.length;s++){let a=n[s],u=Fy(a);typeof u=="number"?u===-1?o=a.token:i|=u:o=a}e.push(y(o,i))}else e.push(y(n))}return e}function Xf(t,e){return t[Xa]=e,t.prototype[Xa]=e,t}function Fy(t){return t[Xa]}function ky(t,e,r,n){let o=t[Mi];throw e[sf]&&o.unshift(e[sf]),t.message=Ly(`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{J as w,L as q,a as Y}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.2/Marketplace/chunk-K2D3HYO3.js";import{$ as M,Ba as j,E as A,Ea as I,Ga as d,I as T,La as z,M as b,Na as H,P as L,Qa as k,Wb as F,X as v,a as y,aa as x,ba as E,ca as g,da as O,ea as P,fa as D,kb as W,kc as B,lb as $,n as f,o as R,oa as U,q as u,rc as V,w as N,xa as m}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.2/Marketplace/chunk-WOVAE35N.js";var tt=["*"],S;function et(){if(S===void 0&&(S=null,typeof window<"u")){let r=window;r.trustedTypes!==void 0&&(S=r.trustedTypes.createPolicy("angular#components",{createHTML:s=>s}))}return S}function _(r){return et()?.createHTML(r)||r}function G(r){return Error(`Unable to find icon with the name "${r}"`)}function nt(){return Error("Could not find HttpClient provider for use with Angular Material icons. Please include the HttpClientModule from @angular/common/http in your app imports.")}function J(r){return Error(`The URL provided to MatIconRegistry was not trusted as a resource URL via Angular's DomSanitizer. Attempted URL was "${r}".`)}function K(r){return Error(`The literal provided to MatIconRegistry was not trusted as safe HTML by Angular's DomSanitizer. Attempted literal was "${r}".`)}var a=class{constructor(s,Z,t){this.url=s,this.svgText=Z,this.options=t}},it=(()=>{let s=class s{constructor(t,e,n,i){this._httpClient=t,this._sanitizer=e,this._errorHandler=i,this._svgIconConfigs=new Map,this._iconSetConfigs=new Map,this._cachedIconsByUrl=new Map,this._inProgressUrlFetches=new Map,this._fontCssClassesByAlias=new Map,this._resolvers=[],this._defaultFontSetClass=["material-icons","mat-ligature-font"],this._document=n}addSvgIcon(t,e,n){return this.addSvgIconInNamespace("",t,e,n)}addSvgIconLiteral(t,e,n){return this.addSvgIconLiteralInNamespace("",t,e,n)}addSvgIconInNamespace(t,e,n,i){return this._addSvgIconConfig(t,e,new a(n,null,i))}addSvgIconResolver(t){return this._resolvers.push(t),this}addSvgIconLiteralInNamespace(t,e,n,i){let o=this._sanitizer.sanitize(m.HTML,n);if(!o)throw K(n);let c=_(o);return this._addSvgIconConfig(t,e,new a("",c,i))}addSvgIconSet(t,e){return this.addSvgIconSetInNamespace("",t,e)}addSvgIconSetLiteral(t,e){return this.addSvgIconSetLiteralInNamespace("",t,e)}addSvgIconSetInNamespace(t,e,n){return this._addSvgIconSetConfig(t,new a(e,null,n))}addSvgIconSetLiteralInNamespace(t,e,n){let i=this._sanitizer.sanitize(m.HTML,e);if(!i)throw K(e);let o=_(i);return this._addSvgIconSetConfig(t,new a("",o,n))}registerFontClassAlias(t,e=t){return this._fontCssClassesByAlias.set(t,e),this}classNameForFontAlias(t){return this._fontCssClassesByAlias.get(t)||t}setDefaultFontSetClass(...t){return this._defaultFontSetClass=t,this}getDefaultFontSetClass(){return this._defaultFontSetClass}getSvgIconFromUrl(t){let e=this._sanitizer.sanitize(m.RESOURCE_URL,t);if(!e)throw J(t);let n=this._cachedIconsByUrl.get(e);return n?f(C(n)):this._loadSvgIconFromConfig(new a(t,null)).pipe(v(i=>this._cachedIconsByUrl.set(e,i)),u(i=>C(i)))}getNamedSvgIcon(t,e=""){let n=Q(e,t),i=this._svgIconConfigs.get(n);if(i)return this._getSvgFromConfig(i);if(i=this._getIconConfigFromResolvers(e,t),i)return this._svgIconConfigs.set(n,i),this._getSvgFromConfig(i);let o=this._iconSetConfigs.get(e);return o?this._getSvgFromIconSetConfigs(t,o):R(G(n))}ngOnDestroy(){this._resolvers=[],this._svgIconConfigs.clear(),this._iconSetConfigs.clear(),this._cachedIconsByUrl.clear()}_getSvgFromConfig(t){return t.svgText?f(C(this._svgElementFromConfig(t))):this._loadSvgIconFromConfig(t).pipe(u(e=>C(e)))}_getSvgFromIconSetConfigs(t,e){let n=this._extractIconWithNameFromAnySet(t,e);if(n)return f(n);let i=e.filter(o=>!o.svgText).map(o=>this._loadSvgIconSetFromConfig(o).pipe(A(c=>{let h=`Loading icon set URL: ${this._sanitizer.sanitize(m.RESOURCE_URL,o.url)} failed: ${c.message}`;return this._errorHandler.handleError(new Error(h)),f(null)})));return N(i).pipe(u(()=>{let o=this._extractIconWithNameFromAnySet(t,e);if(!o)throw G(t);return o}))}_extractIconWithNameFromAnySet(t,e){for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.svgText&&i.svgText.toString().indexOf(t)>-1){let o=this._svgElementFromConfig(i),c=this._extractSvgIconFromSet(o,t,i.options);if(c)return c}}return null}_loadSvgIconFromConfig(t){return this._fetchIcon(t).pipe(v(e=>t.svgText=e),u(()=>this._svgElementFromConfig(t)))}_loadSvgIconSetFromConfig(t){return t.svgText?f(null):this._fetchIcon(t).pipe(v(e=>t.svgText=e))}_extractSvgIconFromSet(t,e,n){let i=t.querySelector(`[id="${e}"]`);if(!i)return null;let o=i.cloneNode(!0);if(o.removeAttribute("id"),o.nodeName.toLowerCase()==="svg")return this._setSvgAttributes(o,n);if(o.nodeName.toLowerCase()==="symbol")return this._setSvgAttributes(this._toSvgElement(o),n);let c=this._svgElementFromString(_("<svg></svg>"));return c.appendChild(o),this._setSvgAttributes(c,n)}_svgElementFromString(t){let e=this._document.createElement("DIV");e.innerHTML=t;let n=e.querySelector("svg");if(!n)throw Error("<svg> tag not found");return n}_toSvgElement(t){let e=this._svgElementFromString(_("<svg></svg>")),n=t.attributes;for(let i=0;i<n.length;i++){let{name:o,value:c}=n[i];o!=="id"&&e.setAttribute(o,c)}for(let i=0;i<t.childNodes.length;i++)t.childNodes[i].nodeType===this._document.ELEMENT_NODE&&e.appendChild(t.childNodes[i].cloneNode(!0));return e}_setSvgAttributes(t,e){return t.setAttribute("fit",""),t.setAttribute("height","100%"),t.setAttribute("width","100%"),t.setAttribute("preserveAspectRatio","xMidYMid meet"),t.setAttribute("focusable","false"),e&&e.viewBox&&t.setAttribute("viewBox",e.viewBox),t}_fetchIcon(t){let{url:e,options:n}=t,i=n?.withCredentials??!1;if(!this._httpClient)throw nt();if(e==null)throw Error(`Cannot fetch icon from URL "${e}".`);let o=this._sanitizer.sanitize(m.RESOURCE_URL,e);if(!o)throw J(e);let c=this._inProgressUrlFetches.get(o);if(c)return c;let l=this._httpClient.get(o,{responseType:"text",withCredentials:i}).pipe(u(h=>_(h)),b(()=>this._inProgressUrlFetches.delete(o)),L());return this._inProgressUrlFetches.set(o,l),l}_addSvgIconConfig(t,e,n){return this._svgIconConfigs.set(Q(t,e),n),this}_addSvgIconSetConfig(t,e){let n=this._iconSetConfigs.get(t);return n?n.push(e):this._iconSetConfigs.set(t,[e]),this}_svgElementFromConfig(t){if(!t.svgElement){let e=this._svgElementFromString(t.svgText);this._setSvgAttributes(e,t.options),t.svgElement=e}return t.svgElement}_getIconConfigFromResolvers(t,e){for(let n=0;n<this._resolvers.length;n++){let i=this._resolvers[n](e,t);if(i)return ot(i)?new a(i.url,null,i.options):new a(i,null)}}};s.\u0275fac=function(e){return new(e||s)(g(B,8),g(V),g(F,8),g(I))},s.\u0275prov=M({token:s,factory:s.\u0275fac,providedIn:"root"});let r=s;return r})();function C(r){return r.cloneNode(!0)}function Q(r,s){return r+":"+s}function ot(r){return!!(r.url&&r.options)}var rt=q(class{constructor(r){this._elementRef=r}}),st=new E("MAT_ICON_DEFAULT_OPTIONS"),ct=new E("mat-icon-location",{providedIn:"root",factory:at});function at(){let r=O(F),s=r?r.location:null;return{getPathname:()=>s?s.pathname+s.search:""}}var X=["clip-path","color-profile","src","cursor","fill","filter","marker","marker-start","marker-mid","marker-end","mask","stroke"],lt=X.map(r=>`[${r}]`).join(", "),ht=/^url\(['"]?#(.*?)['"]?\)$/,bt=(()=>{let s=class s extends rt{get inline(){return this._inline}set inline(t){this._inline=Y(t)}get svgIcon(){return this._svgIcon}set svgIcon(t){t!==this._svgIcon&&(t?this._updateSvgIcon(t):this._svgIcon&&this._clearSvgElement(),this._svgIcon=t)}get fontSet(){return this._fontSet}set fontSet(t){let e=this._cleanupFontValue(t);e!==this._fontSet&&(this._fontSet=e,this._updateFontIconClasses())}get fontIcon(){return this._fontIcon}set fontIcon(t){let e=this._cleanupFontValue(t);e!==this._fontIcon&&(this._fontIcon=e,this._updateFontIconClasses())}constructor(t,e,n,i,o,c){super(t),this._iconRegistry=e,this._location=i,this._errorHandler=o,this._inline=!1,this._previousFontSetClass=[],this._currentIconFetch=y.EMPTY,c&&(c.color&&(this.color=this.defaultColor=c.color),c.fontSet&&(this.fontSet=c.fontSet)),n||t.nativeElement.setAttribute("aria-hidden","true")}_splitIconName(t){if(!t)return["",""];let e=t.split(":");switch(e.length){case 1:return["",e[0]];case 2:return e;default:throw Error(`Invalid icon name: "${t}"`)}}ngOnInit(){this._updateFontIconClasses()}ngAfterViewChecked(){let t=this._elementsWithExternalReferences;if(t&&t.size){let e=this._location.getPathname();e!==this._previousPath&&(this._previousPath=e,this._prependPathToReferences(e))}}ngOnDestroy(){this._currentIconFetch.unsubscribe(),this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear()}_usingFontIcon(){return!this.svgIcon}_setSvgElement(t){this._clearSvgElement();let e=this._location.getPathname();this._previousPath=e,this._cacheChildrenWithExternalReferences(t),this._prependPathToReferences(e),this._elementRef.nativeElement.appendChild(t)}_clearSvgElement(){let t=this._elementRef.nativeElement,e=t.childNodes.length;for(this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear();e--;){let n=t.childNodes[e];(n.nodeType!==1||n.nodeName.toLowerCase()==="svg")&&n.remove()}}_updateFontIconClasses(){if(!this._usingFontIcon())return;let t=this._elementRef.nativeElement,e=(this.fontSet?this._iconRegistry.classNameForFontAlias(this.fontSet).split(/ +/):this._iconRegistry.getDefaultFontSetClass()).filter(n=>n.length>0);this._previousFontSetClass.forEach(n=>t.classList.remove(n)),e.forEach(n=>t.classList.add(n)),this._previousFontSetClass=e,this.fontIcon!==this._previousFontIconClass&&!e.includes("mat-ligature-font")&&(this._previousFontIconClass&&t.classList.remove(this._previousFontIconClass),this.fontIcon&&t.classList.add(this.fontIcon),this._previousFontIconClass=this.fontIcon)}_cleanupFontValue(t){return typeof t=="string"?t.trim().split(" ")[0]:t}_prependPathToReferences(t){let e=this._elementsWithExternalReferences;e&&e.forEach((n,i)=>{n.forEach(o=>{i.setAttribute(o.name,`url('${t}#${o.value}')`)})})}_cacheChildrenWithExternalReferences(t){let e=t.querySelectorAll(lt),n=this._elementsWithExternalReferences=this._elementsWithExternalReferences||new Map;for(let i=0;i<e.length;i++)X.forEach(o=>{let c=e[i],l=c.getAttribute(o),h=l?l.match(ht):null;if(h){let p=n.get(c);p||(p=[],n.set(c,p)),p.push({name:o,value:h[1]})}})}_updateSvgIcon(t){if(this._svgNamespace=null,this._svgName=null,this._currentIconFetch.unsubscribe(),t){let[e,n]=this._splitIconName(t);e&&(this._svgNamespace=e),n&&(this._svgName=n),this._currentIconFetch=this._iconRegistry.getNamedSvgIcon(n,e).pipe(T(1)).subscribe(i=>this._setSvgElement(i),i=>{let o=`Error retrieving icon ${e}:${n}! ${i.message}`;this._errorHandler.handleError(new Error(o))})}}};s.\u0275fac=function(e){return new(e||s)(d(j),d(it),U("aria-hidden"),d(ct),d(I),d(st,8))},s.\u0275cmp=P({type:s,selectors:[["mat-icon"]],hostAttrs:["role","img",1,"mat-icon","notranslate"],hostVars:8,hostBindings:function(e,n){e&2&&(H("data-mat-icon-type",n._usingFontIcon()?"font":"svg")("data-mat-icon-name",n._svgName||n.fontIcon)("data-mat-icon-namespace",n._svgNamespace||n.fontSet)("fontIcon",n._usingFontIcon()?n.fontIcon:null),k("mat-icon-inline",n.inline)("mat-icon-no-color",n.color!=="primary"&&n.color!=="accent"&&n.color!=="warn"))},inputs:{color:"color",inline:"inline",svgIcon:"svgIcon",fontSet:"fontSet",fontIcon:"fontIcon"},exportAs:["matIcon"],features:[z],ngContentSelectors:tt,decls:1,vars:0,template:function(e,n){e&1&&(W(),$(0))},styles:["mat-icon,mat-icon.mat-primary,mat-icon.mat-accent,mat-icon.mat-warn{color:var(--mat-icon-color)}.mat-icon{-webkit-user-select:none;user-select:none;background-repeat:no-repeat;display:inline-block;fill:currentColor;height:24px;width:24px;overflow:hidden}.mat-icon.mat-icon-inline{font-size:inherit;height:inherit;line-height:inherit;width:inherit}.mat-icon.mat-ligature-font[fontIcon]::before{content:attr(fontIcon)}[dir=rtl] .mat-icon-rtl-mirror{transform:scale(-1, 1)}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon{display:block}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button .mat-icon{margin:auto}"],encapsulation:2,changeDetection:0});let r=s;return r})(),Lt=(()=>{let s=class s{};s.\u0275fac=function(e){return new(e||s)},s.\u0275mod=D({type:s}),s.\u0275inj=x({imports:[w,w]});let r=s;return r})();export{bt as a,Lt as b};
|
|
1
|
+
import{J as w,L as q,a as Y}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-OVSLUEIO.js";import{$ as M,Ba as j,E as A,Ea as I,Ga as d,I as T,La as z,M as b,Na as H,P as L,Qa as k,Wb as F,X as v,a as y,aa as x,ba as E,ca as g,da as O,ea as P,fa as D,kb as W,kc as B,lb as $,n as f,o as R,oa as U,q as u,rc as V,w as N,xa as m}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-ZIANW63Q.js";var tt=["*"],S;function et(){if(S===void 0&&(S=null,typeof window<"u")){let r=window;r.trustedTypes!==void 0&&(S=r.trustedTypes.createPolicy("angular#components",{createHTML:s=>s}))}return S}function _(r){return et()?.createHTML(r)||r}function G(r){return Error(`Unable to find icon with the name "${r}"`)}function nt(){return Error("Could not find HttpClient provider for use with Angular Material icons. Please include the HttpClientModule from @angular/common/http in your app imports.")}function J(r){return Error(`The URL provided to MatIconRegistry was not trusted as a resource URL via Angular's DomSanitizer. Attempted URL was "${r}".`)}function K(r){return Error(`The literal provided to MatIconRegistry was not trusted as safe HTML by Angular's DomSanitizer. Attempted literal was "${r}".`)}var a=class{constructor(s,Z,t){this.url=s,this.svgText=Z,this.options=t}},it=(()=>{let s=class s{constructor(t,e,n,i){this._httpClient=t,this._sanitizer=e,this._errorHandler=i,this._svgIconConfigs=new Map,this._iconSetConfigs=new Map,this._cachedIconsByUrl=new Map,this._inProgressUrlFetches=new Map,this._fontCssClassesByAlias=new Map,this._resolvers=[],this._defaultFontSetClass=["material-icons","mat-ligature-font"],this._document=n}addSvgIcon(t,e,n){return this.addSvgIconInNamespace("",t,e,n)}addSvgIconLiteral(t,e,n){return this.addSvgIconLiteralInNamespace("",t,e,n)}addSvgIconInNamespace(t,e,n,i){return this._addSvgIconConfig(t,e,new a(n,null,i))}addSvgIconResolver(t){return this._resolvers.push(t),this}addSvgIconLiteralInNamespace(t,e,n,i){let o=this._sanitizer.sanitize(m.HTML,n);if(!o)throw K(n);let c=_(o);return this._addSvgIconConfig(t,e,new a("",c,i))}addSvgIconSet(t,e){return this.addSvgIconSetInNamespace("",t,e)}addSvgIconSetLiteral(t,e){return this.addSvgIconSetLiteralInNamespace("",t,e)}addSvgIconSetInNamespace(t,e,n){return this._addSvgIconSetConfig(t,new a(e,null,n))}addSvgIconSetLiteralInNamespace(t,e,n){let i=this._sanitizer.sanitize(m.HTML,e);if(!i)throw K(e);let o=_(i);return this._addSvgIconSetConfig(t,new a("",o,n))}registerFontClassAlias(t,e=t){return this._fontCssClassesByAlias.set(t,e),this}classNameForFontAlias(t){return this._fontCssClassesByAlias.get(t)||t}setDefaultFontSetClass(...t){return this._defaultFontSetClass=t,this}getDefaultFontSetClass(){return this._defaultFontSetClass}getSvgIconFromUrl(t){let e=this._sanitizer.sanitize(m.RESOURCE_URL,t);if(!e)throw J(t);let n=this._cachedIconsByUrl.get(e);return n?f(C(n)):this._loadSvgIconFromConfig(new a(t,null)).pipe(v(i=>this._cachedIconsByUrl.set(e,i)),u(i=>C(i)))}getNamedSvgIcon(t,e=""){let n=Q(e,t),i=this._svgIconConfigs.get(n);if(i)return this._getSvgFromConfig(i);if(i=this._getIconConfigFromResolvers(e,t),i)return this._svgIconConfigs.set(n,i),this._getSvgFromConfig(i);let o=this._iconSetConfigs.get(e);return o?this._getSvgFromIconSetConfigs(t,o):R(G(n))}ngOnDestroy(){this._resolvers=[],this._svgIconConfigs.clear(),this._iconSetConfigs.clear(),this._cachedIconsByUrl.clear()}_getSvgFromConfig(t){return t.svgText?f(C(this._svgElementFromConfig(t))):this._loadSvgIconFromConfig(t).pipe(u(e=>C(e)))}_getSvgFromIconSetConfigs(t,e){let n=this._extractIconWithNameFromAnySet(t,e);if(n)return f(n);let i=e.filter(o=>!o.svgText).map(o=>this._loadSvgIconSetFromConfig(o).pipe(A(c=>{let h=`Loading icon set URL: ${this._sanitizer.sanitize(m.RESOURCE_URL,o.url)} failed: ${c.message}`;return this._errorHandler.handleError(new Error(h)),f(null)})));return N(i).pipe(u(()=>{let o=this._extractIconWithNameFromAnySet(t,e);if(!o)throw G(t);return o}))}_extractIconWithNameFromAnySet(t,e){for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.svgText&&i.svgText.toString().indexOf(t)>-1){let o=this._svgElementFromConfig(i),c=this._extractSvgIconFromSet(o,t,i.options);if(c)return c}}return null}_loadSvgIconFromConfig(t){return this._fetchIcon(t).pipe(v(e=>t.svgText=e),u(()=>this._svgElementFromConfig(t)))}_loadSvgIconSetFromConfig(t){return t.svgText?f(null):this._fetchIcon(t).pipe(v(e=>t.svgText=e))}_extractSvgIconFromSet(t,e,n){let i=t.querySelector(`[id="${e}"]`);if(!i)return null;let o=i.cloneNode(!0);if(o.removeAttribute("id"),o.nodeName.toLowerCase()==="svg")return this._setSvgAttributes(o,n);if(o.nodeName.toLowerCase()==="symbol")return this._setSvgAttributes(this._toSvgElement(o),n);let c=this._svgElementFromString(_("<svg></svg>"));return c.appendChild(o),this._setSvgAttributes(c,n)}_svgElementFromString(t){let e=this._document.createElement("DIV");e.innerHTML=t;let n=e.querySelector("svg");if(!n)throw Error("<svg> tag not found");return n}_toSvgElement(t){let e=this._svgElementFromString(_("<svg></svg>")),n=t.attributes;for(let i=0;i<n.length;i++){let{name:o,value:c}=n[i];o!=="id"&&e.setAttribute(o,c)}for(let i=0;i<t.childNodes.length;i++)t.childNodes[i].nodeType===this._document.ELEMENT_NODE&&e.appendChild(t.childNodes[i].cloneNode(!0));return e}_setSvgAttributes(t,e){return t.setAttribute("fit",""),t.setAttribute("height","100%"),t.setAttribute("width","100%"),t.setAttribute("preserveAspectRatio","xMidYMid meet"),t.setAttribute("focusable","false"),e&&e.viewBox&&t.setAttribute("viewBox",e.viewBox),t}_fetchIcon(t){let{url:e,options:n}=t,i=n?.withCredentials??!1;if(!this._httpClient)throw nt();if(e==null)throw Error(`Cannot fetch icon from URL "${e}".`);let o=this._sanitizer.sanitize(m.RESOURCE_URL,e);if(!o)throw J(e);let c=this._inProgressUrlFetches.get(o);if(c)return c;let l=this._httpClient.get(o,{responseType:"text",withCredentials:i}).pipe(u(h=>_(h)),b(()=>this._inProgressUrlFetches.delete(o)),L());return this._inProgressUrlFetches.set(o,l),l}_addSvgIconConfig(t,e,n){return this._svgIconConfigs.set(Q(t,e),n),this}_addSvgIconSetConfig(t,e){let n=this._iconSetConfigs.get(t);return n?n.push(e):this._iconSetConfigs.set(t,[e]),this}_svgElementFromConfig(t){if(!t.svgElement){let e=this._svgElementFromString(t.svgText);this._setSvgAttributes(e,t.options),t.svgElement=e}return t.svgElement}_getIconConfigFromResolvers(t,e){for(let n=0;n<this._resolvers.length;n++){let i=this._resolvers[n](e,t);if(i)return ot(i)?new a(i.url,null,i.options):new a(i,null)}}};s.\u0275fac=function(e){return new(e||s)(g(B,8),g(V),g(F,8),g(I))},s.\u0275prov=M({token:s,factory:s.\u0275fac,providedIn:"root"});let r=s;return r})();function C(r){return r.cloneNode(!0)}function Q(r,s){return r+":"+s}function ot(r){return!!(r.url&&r.options)}var rt=q(class{constructor(r){this._elementRef=r}}),st=new E("MAT_ICON_DEFAULT_OPTIONS"),ct=new E("mat-icon-location",{providedIn:"root",factory:at});function at(){let r=O(F),s=r?r.location:null;return{getPathname:()=>s?s.pathname+s.search:""}}var X=["clip-path","color-profile","src","cursor","fill","filter","marker","marker-start","marker-mid","marker-end","mask","stroke"],lt=X.map(r=>`[${r}]`).join(", "),ht=/^url\(['"]?#(.*?)['"]?\)$/,bt=(()=>{let s=class s extends rt{get inline(){return this._inline}set inline(t){this._inline=Y(t)}get svgIcon(){return this._svgIcon}set svgIcon(t){t!==this._svgIcon&&(t?this._updateSvgIcon(t):this._svgIcon&&this._clearSvgElement(),this._svgIcon=t)}get fontSet(){return this._fontSet}set fontSet(t){let e=this._cleanupFontValue(t);e!==this._fontSet&&(this._fontSet=e,this._updateFontIconClasses())}get fontIcon(){return this._fontIcon}set fontIcon(t){let e=this._cleanupFontValue(t);e!==this._fontIcon&&(this._fontIcon=e,this._updateFontIconClasses())}constructor(t,e,n,i,o,c){super(t),this._iconRegistry=e,this._location=i,this._errorHandler=o,this._inline=!1,this._previousFontSetClass=[],this._currentIconFetch=y.EMPTY,c&&(c.color&&(this.color=this.defaultColor=c.color),c.fontSet&&(this.fontSet=c.fontSet)),n||t.nativeElement.setAttribute("aria-hidden","true")}_splitIconName(t){if(!t)return["",""];let e=t.split(":");switch(e.length){case 1:return["",e[0]];case 2:return e;default:throw Error(`Invalid icon name: "${t}"`)}}ngOnInit(){this._updateFontIconClasses()}ngAfterViewChecked(){let t=this._elementsWithExternalReferences;if(t&&t.size){let e=this._location.getPathname();e!==this._previousPath&&(this._previousPath=e,this._prependPathToReferences(e))}}ngOnDestroy(){this._currentIconFetch.unsubscribe(),this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear()}_usingFontIcon(){return!this.svgIcon}_setSvgElement(t){this._clearSvgElement();let e=this._location.getPathname();this._previousPath=e,this._cacheChildrenWithExternalReferences(t),this._prependPathToReferences(e),this._elementRef.nativeElement.appendChild(t)}_clearSvgElement(){let t=this._elementRef.nativeElement,e=t.childNodes.length;for(this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear();e--;){let n=t.childNodes[e];(n.nodeType!==1||n.nodeName.toLowerCase()==="svg")&&n.remove()}}_updateFontIconClasses(){if(!this._usingFontIcon())return;let t=this._elementRef.nativeElement,e=(this.fontSet?this._iconRegistry.classNameForFontAlias(this.fontSet).split(/ +/):this._iconRegistry.getDefaultFontSetClass()).filter(n=>n.length>0);this._previousFontSetClass.forEach(n=>t.classList.remove(n)),e.forEach(n=>t.classList.add(n)),this._previousFontSetClass=e,this.fontIcon!==this._previousFontIconClass&&!e.includes("mat-ligature-font")&&(this._previousFontIconClass&&t.classList.remove(this._previousFontIconClass),this.fontIcon&&t.classList.add(this.fontIcon),this._previousFontIconClass=this.fontIcon)}_cleanupFontValue(t){return typeof t=="string"?t.trim().split(" ")[0]:t}_prependPathToReferences(t){let e=this._elementsWithExternalReferences;e&&e.forEach((n,i)=>{n.forEach(o=>{i.setAttribute(o.name,`url('${t}#${o.value}')`)})})}_cacheChildrenWithExternalReferences(t){let e=t.querySelectorAll(lt),n=this._elementsWithExternalReferences=this._elementsWithExternalReferences||new Map;for(let i=0;i<e.length;i++)X.forEach(o=>{let c=e[i],l=c.getAttribute(o),h=l?l.match(ht):null;if(h){let p=n.get(c);p||(p=[],n.set(c,p)),p.push({name:o,value:h[1]})}})}_updateSvgIcon(t){if(this._svgNamespace=null,this._svgName=null,this._currentIconFetch.unsubscribe(),t){let[e,n]=this._splitIconName(t);e&&(this._svgNamespace=e),n&&(this._svgName=n),this._currentIconFetch=this._iconRegistry.getNamedSvgIcon(n,e).pipe(T(1)).subscribe(i=>this._setSvgElement(i),i=>{let o=`Error retrieving icon ${e}:${n}! ${i.message}`;this._errorHandler.handleError(new Error(o))})}}};s.\u0275fac=function(e){return new(e||s)(d(j),d(it),U("aria-hidden"),d(ct),d(I),d(st,8))},s.\u0275cmp=P({type:s,selectors:[["mat-icon"]],hostAttrs:["role","img",1,"mat-icon","notranslate"],hostVars:8,hostBindings:function(e,n){e&2&&(H("data-mat-icon-type",n._usingFontIcon()?"font":"svg")("data-mat-icon-name",n._svgName||n.fontIcon)("data-mat-icon-namespace",n._svgNamespace||n.fontSet)("fontIcon",n._usingFontIcon()?n.fontIcon:null),k("mat-icon-inline",n.inline)("mat-icon-no-color",n.color!=="primary"&&n.color!=="accent"&&n.color!=="warn"))},inputs:{color:"color",inline:"inline",svgIcon:"svgIcon",fontSet:"fontSet",fontIcon:"fontIcon"},exportAs:["matIcon"],features:[z],ngContentSelectors:tt,decls:1,vars:0,template:function(e,n){e&1&&(W(),$(0))},styles:["mat-icon,mat-icon.mat-primary,mat-icon.mat-accent,mat-icon.mat-warn{color:var(--mat-icon-color)}.mat-icon{-webkit-user-select:none;user-select:none;background-repeat:no-repeat;display:inline-block;fill:currentColor;height:24px;width:24px;overflow:hidden}.mat-icon.mat-icon-inline{font-size:inherit;height:inherit;line-height:inherit;width:inherit}.mat-icon.mat-ligature-font[fontIcon]::before{content:attr(fontIcon)}[dir=rtl] .mat-icon-rtl-mirror{transform:scale(-1, 1)}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon{display:block}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button .mat-icon{margin:auto}"],encapsulation:2,changeDetection:0});let r=s;return r})(),Lt=(()=>{let s=class s{};s.\u0275fac=function(e){return new(e||s)},s.\u0275mod=D({type:s}),s.\u0275inj=x({imports:[w,w]});let r=s;return r})();export{bt as a,Lt as b};
|