1!function(){function e(e){return function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||a(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function t(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function n(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?t(Object(r),!0).forEach(function(t){i(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):t(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var i,r,a=[],o=!0,s=!1;try{for(n=n.call(e);!(o=(i=n.next()).done)&&(a.push(i.value),!t||a.length!==t);o=!0);}catch(c){s=!0,r=c}finally{try{o||null==n.return||n.return()}finally{if(s)throw r}}return a}(e,t)||a(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,t){if(e){if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function l(e,t,n){return t&&c(e.prototype,t),n&&c(e,n),e}(self.webpackChunkcuba=self.webpackChunkcuba||[]).push([["main"],{98255:function(e){function t(e){return Promise.resolve().then(function(){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t})}t.keys=function(){return[]},t.resolve=t,t.id=98255,e.exports=t},27624:function(e,t,n){"use strict";n.d(t,{b:function(){return r}});var i=n(35366),r=function(){var e=function(){function e(t){s(this,e),this._el=t}return l(e,[{key:"onKeyDown",value:function(e){var t,n,i;if(8!=e.keyCode){if(null!=e&&e.srcElement&&(null===(t=e.srcElement)||void 0===t?void 0:t.maxLength)===(null===(n=e.srcElement)||void 0===n||null===(i=n.value)||void 0===i?void 0:i.length)){e.preventDefault();for(var r=e.srcElement.nextElementSibling;;){if(!r)return;if(r.type===e.srcElement.type)return void r.focus();r=r.nextElementSibling}}}else(null==e?void 0:e.srcElement)&&(e.srcElement.value="",this.handlePreviousFocusCustom(null==e?void 0:e.srcElement))}},{key:"handlePreviousFocusCustom",value:function(e){var t=(null==e?void 0:e.previousElementSibling)||(null==e?void 0:e.previousSibling);t&&"function"==typeof(null==t?void 0:t.focus)&&t.focus()}}]),e}();return e.\u0275fac=function(t){return new(t||e)(i.Y36(i.SBq))},e.\u0275dir=i.lG2({type:e,selectors:[["","autoFocusMaxLength",""]],hostBindings:function(e,t){1&e&&i.NdJ("keyup",function(e){return t.onKeyDown(e)})}}),e}()},89749:function(e,t,n){"use strict";n.d(t,{M:function(){return r}});var i=n(35366),r=function(){var e=function(){function e(){s(this,e)}return l(e,[{key:"updateUrl",value:function(){this.src=this.default}},{key:"load",value:function(){this.className="image-loaded"}}]),e}();return e.\u0275fac=function(t){return new(t||e)},e.\u0275dir=i.lG2({type:e,selectors:[["img","default",""]],hostVars:3,hostBindings:function(e,t){1&e&&i.NdJ("error",function(){return t.updateUrl()})("load",function(){return t.load()}),2&e&&(i.Ikx("src",t.src,i.LSH),i.Tol(t.className))},inputs:{src:"src",default:"default"}}),e}()},32309:function(e,t,n){"use strict";n.d(t,{p:function(){return a}});var i=n(35366),r=n(31041),a=function(){var e=function(){function e(t,n){s(this,e),this._el=t,this.control=n,this.allowNegative=!1,this.allowZero=!0,this.allowDecimal=!1,this.inputIntegerOnly=!1}return l(e,[{key:"onKeyDown",value:function(e){var t=this._el.nativeElement.value;this.inputIntegerOnly||(this._el.nativeElement.value=this.allowZero?Math.abs(t)<0?null:t.replace(this.allowDecimal?/[^0-9,.]*/g:/[^0-9]*/g,""):Math.abs(t)<=0?null:t.replace(this.allowNegative?/[^0-9-]*/g:this.allowDecimal?/[^0-9,.]*/g:/[^0-9]*/g,""),this.allowDecimal&&(this._el.nativeElement.value.match(/\./g)||[]).length>1&&(this._el.nativeElement.value=parseFloat(this._el.nativeElement.value).toString()),"NaN"==this._el.nativeElement.value&&(this._el.nativeElement.value=""),t!==this._el.nativeElement.value&&e.stopPropagation(),this.control.control.setValue(this._el.nativeElement.value),this._el.nativeElement.focus())}}]),e}();return e.\u0275fac=function(t){return new(t||e)(i.Y36(i.SBq),i.Y36(r.a5))},e.\u0275dir=i.lG2({type:e,selectors:[["input","numbersOnly",""]],hostBindings:function(e,t){1&e&&i.NdJ("input",function(e){return t.onKeyDown(e)})},inputs:{allowNegative:"allowNegative",allowZero:"allowZero",allowDecimal:"allowDecimal",inputIntegerOnly:"inputIntegerOnly"}}),e}()},67136:function(e,t,n){"use strict";function i(){if("undefined"==typeof window||!window.location)return!1;var e=String(window.location.hostname||"").toLowerCase();return"localhost"===e||"127.0.0.1"===e||"[::1]"===e||"::1"===e}function r(e){var t="string"==typeof e?e:String((null==e?void 0:e.message)||e||"");return/NetworkError|network error|interrupted connection|unreachable host|network-request-failed/i.test(t)||/Load failed/i.test(t)||/Failed to fetch/i.test(t)||/importScripts/i.test(t)}function a(e){var t="string"==typeof e?e:String((null==e?void 0:e.message)||e||"");
1return/postEvent/i.test(t)||/Method not found/i.test(t)}function o(e){var t="string"==typeof e?e:String((null==e?void 0:e.message)||e||"");return/disableWebkitEnterFullscreen/i.test(t)}function s(e){var t="string"==typeof e?e:String((null==e?void 0:e.message)||e||"");return/Java object is gone/i.test(t)||/sendDataToNative/i.test(t)}function c(e){var t="string"==typeof e?e:String((null==e?void 0:e.message)||(null==e?void 0:e.stack)||e||""),n=/Java object is gone|sendDataToNative|sendBeforeUnloadMessage|postEvent|disableWebkitEnterFullscreen|Method not found|Extension context invalidated|Receiving end does not exist|webkit\.messageHandlers|WebViewJavascriptBridge|NotReadableError|The I\/O read operation failed|I\/O read operation failed/i.test(t),i=/iabjs:\/\/|chrome-extension:\/\/|moz-extension:\/\/|safari-extension:\/\/|safari-web-extension:\/\/|ms-browser-extension:\/\/|android_asset|applewebdata:\/\//i.test(t);return n||i}function l(e){var t,n,i,r;if(!e)return!1;var a=null!==(t=null!==(n=null==e?void 0:e.status)&&void 0!==n?n:null==e||null===(i=e.rejection)||void 0===i?void 0:i.status)&&void 0!==t?t:null==e||null===(r=e.ngOriginalError)||void 0===r?void 0:r.status;if(0===a||502===a||503===a||504===a||429===a)return!0;var o="string"==typeof e?e:String((null==e?void 0:e.message)||(null==e?void 0:e.stack)||(null==e?void 0:e.reason)||(null==e?void 0:e.code)||e||"");return/network error|interrupted connection|unreachable host|network-request-failed|NetworkError|Load failed|Failed to fetch|importScripts|connection was lost|connection appears to be offline|ERR_INTERNET_DISCONNECTED|ERR_CONNECTION_|ERR_NAME_NOT_RESOLVED|ERR_NETWORK_CHANGED|ERR_ABORTED|ERR_EMPTY_RESPONSE|:\s*0 Unknown Error|blocked by CORS policy/i.test(o)||c(e)}n.d(t,{xl:function(){return i},Y$:function(){return r},_m:function(){return a},mI:function(){return o},Op:function(){return s},U$:function(){return c},VA:function(){return l}})},50243:function(e,t,n){"use strict";n.d(t,{aQ:function(){return f},L6:function(){return x},QI:function(){return y},A8:function(){return w},bP:function(){return p},tk:function(){return O},fB:function(){return I},U$:function(){return C.U$},Op:function(){return C.Op},xl:function(){return C.xl},Pw:function(){return C.VA},Y$:function(){return C.Y$},Fd:function(){return _},IX:function(){return A}});var i=n(42693),r=n(32041),a=n(90343),o=n(51816),c=n(99597),u=n(35366),d=n(98109),p=function(){var e=function(){function e(t){s(this,e),this._authSer=t,this.cache=new Map}return l(e,[{key:"intercept",value:function(e,t){var n,s=this;if(e.clone({headers:e.headers.append("ngsw-bypass","true")}),/\.(svg|cur|jpg|jpeg|png|apng|webp|avif|gif|otf|ttf|woff|woff2|pdf)$/i.test(e.url)||(e=e.clone({setHeaders:{"ngsw-bypass":"true"}})),e.url.indexOf("getstaticpageproducts")>-1||e.url.indexOf("getstaticpageproductimages")>-1)return t.handle(e);var l=this._authSer.currentUserValue,u=null==l?void 0:l.token;if(null!==(n=this._authSer)&&void 0!==n&&n.appDeveloperValue,e.url.indexOf("sandbox_api-v1")>-1)return l&&null!=l&&l.token&&(e=e.clone({setHeaders:{accesstoken:"".concat(null==l?void 0:l.token)}})),t.handle(e);if(l&&u){var d=u;e.headers.get("accesstoken")||(e=e.clone({setHeaders:{Authorization:"".concat(d)}}))}if(e.url.includes("containers/api-business/download")){var p=this.cache.get(e.url);return p?(0,r.of)(p.clone()):t.handle(e).pipe((0,a.b)(function(t){t instanceof i.Zn&&(s.cache.set(e.url,t.clone()),s._authSer.bussCache.next(s.cache))}),(0,o.K)(function(e){throw e}),(0,c.x)(function(){}))}return t.handle(e)}}]),e}();return e.\u0275fac=function(t){return new(t||e)(u.LFG(d.$h))},e.\u0275prov=u.Yz7({token:e,factory:e.\u0275fac}),e}(),v=n(16304),h=n(89647),g=n(54391),m=n(34115),f=function(){var e=function(){function e(t,n,i){s(this,e),this.authenticationService=t,this.router=n,this.toastr=i}return l(e,[{key:"intercept",value:function(e,t){var n,s=this,c=null==t?void 0:t.handle(e);return c?c.pipe((0,a.b)((n=(0,v.Z)(regeneratorRuntime.mark(function t(n){var r,a,o,c;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!(n instanceof i.Zn&&null!=n&&null!==(r=n.body)&&void 0!==r&&r.error)){t.next=22;break}if(401!==(c=n.body.error).statusCode&&499!==c.statusCode){t.next=15;break}if(t.t0=s.authenticationService.isSessExpInProg.getValue(),t.t0){t.next=13;break}if(null!=e&&null!==(a=e.url)&&void 0!==a&&a.includes("users/login")||null!=e&&null!==(o=e.url)&&void 0!==o&&o.includes("odooips/proxyCheck")||s.authenticationService.isSessExpInProg.next(!0),!s.authenticationService.currentUserValue){t.next=11;break}return t.next=9,s.authenticationService.clearUserDataNavLogin();case 9:t.next=13;break;case 11:return t.next=13,s.authenticationService.navLogin();case 13:t.next=22;break;case 15:if(403!=c.statusCode){t.next=19;break}s.toastr.error("Bad Request"),t.next=22;break;case 19:if(404!==c.status&&400!==c.status){t.next=21;break}return t.abrupt("return",(0,h._)(c));case 21:499==c.status&&s.router.navigate(["/maintenance"]);case 22:case"end":return t.stop()}},t)})),function(e){return n.apply(this,arguments)})),(0,o.K)(function(e){return(0,h._)(e)})):(0,r.of)({})}}]),e}();return e.\u0275fac=function(t){return new(t||e)(u.LFG(d.$h),u.LFG
1(g.F0),u.LFG(m.o))},e.\u0275prov=u.Yz7({token:e,factory:e.\u0275fac}),e}();function _(e){return function(t){var n=t.controls[e];if(!n.errors&&n.value)return 0===(n.value||"").trim().length?void n.setErrors({badValue:!0}):void n.setErrors(null)}}function y(e){return function(t){return t.value&&isFinite(parseFloat(t.value))?parseFloat(t.value)>e?null:{greaterThan:!0}:null}}var S=n(14951),b=n(71178),w=function(){var e=function(){function e(t,n,i,r){s(this,e),this._authSer=t,this.spinnerSadad=n,this.router=i,this.injector=r,this.cache=new Map,this.skipErrorAPIList=["containers/fetchDocumentOcr","api/log-request","odooips/proxyCheck","users/login","banks/findOne","containers/api-businesslogo/download","userbusinesses/genGatewayCredentials","userbusinesses/toggleGatewayMode","/merchantshopifies/","assets/i18n","firebase/events"],this.spinnerNames=["appCompLoader","editprodloader","createprodloader","otpLoader","docLoader","headerspinner","otpLoader"],this.lastNetworkToastAt=0,this.currLang=localStorage.getItem("selectedLang")}return l(e,[{key:"intercept",value:function(e,t){var n=this,i=e.body;this.currLang=localStorage.getItem("selectedLang");var s=null==t?void 0:t.handle(e);return s?null!=e&&e.url?s.pipe((0,a.b)(function(e){}),(0,o.K)(function(t){var r,a,o,s,c=n.injector.get(d.$P),l=n.swallowUnhandledNetworkError(t,c);if(l)return l;var u="",p=!1,v=!0;if(v=n.isShowToastError(t,i,v,e),t){var g,m,f,_=(null==t||null===(g=t.error)||void 0===g?void 0:g.error)||t;401===(null==_?void 0:_.statusCode)||401===(null==_?void 0:_.status)||401===(null==t?void 0:t.status)||499===(null==_?void 0:_.statusCode)||499===(null==t?void 0:t.status)?n._authSer.isSessExpInProg.getValue()||(null!=t&&null!==(m=t.url)&&void 0!==m&&m.includes("users/login")||null!=t&&null!==(f=t.url)&&void 0!==f&&f.includes("odooips/proxyCheck")||n._authSer.isSessExpInProg.next(!0),n._authSer.currentUserValue?n._authSer.clearUserDataNavLogin():n._authSer.navLogin(),u="4xx - ".concat(_.statusCode),!0,p=!0):403==_.statusCode?(v&&c.disTransErrMsg("Bad Request"),u="4xx - ".concat(_.statusCode),!0,p=!0):404===(null==_?void 0:_.status)||400===(null==_?void 0:_.status)?(u="4xx - ".concat(_.status),!0,p=!0):499==(null==t?void 0:t.status)?(u="4xx - ".concat(t.status),!0,n.router.navigate(["/maintenance"]),p=!0):((null==_?void 0:_.statusCode)||(null==_?void 0:_.status))>=400&&((null==_?void 0:_.statusCode)||(null==_?void 0:_.status))<500?(u="4xx - ".concat(null==_?void 0:_.statusCode),!0,p=!0):((null==_?void 0:_.statusCode)||(null==_?void 0:_.status))>=500?(u="5xx - ".concat(null==_?void 0:_.statusCode),p=!0):(u="xxx - ".concat((null==_?void 0:_.statusCode)||"xxx"),p=!0)}if(p){var y,b,w,I,T,E,k,A,C,x,P;u||(u="5xx - gatewayTimeoutErrLog");var O="Error!",N=null==c?void 0:c.handleServiceUnavailableError(t);if(N)O=N;else if(null!=c&&c.checkNetConnErr(t))O="INTERNET_CONNECTIVITY_ERROR";else if("application/json"==(null==t||null===(y=t.error)||void 0===y?void 0:y.type)&&"function"==typeof(null==t||null===(b=t.error)||void 0===b?void 0:b.text)){var U,L=v;v=!1,null==t||null===(U=t.error)||void 0===U||U.text().then(function(e){try{var i,r=JSON.parse(e),a=(null==r||null===(i=r.error)||void 0===i?void 0:i.message)||(null==r?void 0:r.message);a&&L&&c.disDynmcTransErrMsg({resErrMsg:a,position:n.getErrToastrPosition(t)})}catch(o){}})}else O=("ar"===n.currLang?(null==t||null===(w=t.error)||void 0===w||null===(I=w.error)||void 0===I?void 0:I.message_ar)||(null==t||null===(T=t.error)||void 0===T?void 0:T.message_ar)||(null==t?void 0:t.message)||(null==t||null===(E=t.error)||void 0===E||null===(k=E.error)||void 0===k?void 0:k.message)||(null==t||null===(A=t.error)||void 0===A?void 0:A.message)||(null==t?void 0:t.message):(null==t||null===(C=t.error)||void 0===C||null===(x=C.error)||void 0===x?void 0:x.message)||(null==t||null===(P=t.error)||void 0===P?void 0:P.message)||(null==t?void 0:t.message))||"Error!";n.hideAllLoaders(v);var R=n.getLogData(i,t);if(null!=t&&t.status||0==(null==t?void 0:t.status)||null!=t&&t.message){var M,D,Z=(null==t?void 0:t.url)||"";JSON.stringify(i).includes('"name":"notificationreceivers"')||null!=t&&null!==(M=t.url)&&void 0!==M&&M.includes("/notificationreceivers")?Z="notificationreceivers":v&&c.disDynmcTransErrMsg({resErrMsg:O,position:n.getErrToastrPosition(t)}),(null==t||null===(D=t.url)||void 0===D?void 0:D.includes("api/log-request"))||(null==c?void 0:c.checkNetConnErr(t))||n._authSer.writeErrorLog(R,u,Z).then(function(e){})}else v&&c.disDynmcTransErrMsg({resErrMsg:O,position:n.getErrToastrPosition(t)})}else n.hideAllLoaders(v);return 401===(null==t?void 0:t.status)||401===(null==t||null===(r=t.error)||void 0===r||null===(a=r.error)||void 0===a?void 0:a.statusCode)||401===(null==t||null===(o=t.error)||void 0===o||null===(s=o.error)||void 0===s?void 0:s.status)?S.E:(0,h._)(function(){return t})}),(0,c.x)(function(){})):s:(0,r.of)({})}},{key:"swallowUnhandledNetworkError",value:function(e,t){var n,i;if(0!==(null==e?void 0:e.status))return null;this.hideAllLoaders(!0);var r=(null==e?void 0:e.error)instanceof ProgressEvent&&"abort"===e.error.type,a=(null==e||null===(n=e.url)||void 0===n?void 0:n.includes("api/log-request"))||(null==e||null===(i=e.url)||void 0===i?void 0:i.includes("assets/i18n"));return r||a||this.showNetworkUnreachableToast(t,e),S.E}},{key:"showNetworkUnreachableToast",value:function(e,t){var n=Date.now();if(!(n-this.lastNetworkToastAt<8e3)){this.lastNetworkToastAt=n;var i="UNABLE_TO_CONNECT_SERVER_NETWORK_VPN";null!=e&&e.checkNetConnErr(t)&&(i="INTERNET_CONNECTIVITY_ERROR"),e.disDynmcTransErrMsg({resErrMsg:i,duration:6e3,position:""})}}},{key:"isShowToastError",value:function(e,t,n,i){var r;return this.skipErrorAPIList.some(function(t){var n;return null==e||null===(n=e.url)||void 0===n?void 0:n.includes(t)})&&(n=!1,null!=e&&null!==(r=e.url)&&void 0!==r&&r.includes("users/login")&&!(null!=t&&t.signinForSignup)&&(n=!0)),i.url.endsWith("/withdrawalrequests")&&"post"==i.method.toLowerCase()&&"e0001"==e.error.error.error_code&&(n=!1),n}},{key:"isErrorLogAllowed",value:function(){return!1}},{key:"getErrToastrPosition",value:function(e){try{return new URL(null==e?void 0:e.url).pathname.endsWith("/reporthistories")?"end":""}catch(t){return""}}},{key:"hideAllLoaders",value:function(e){var t=this;
1e&&(this.spinnerSadad.hide(),this.spinnerNames.forEach(function(e){t.spinnerSadad.hide(e)}))}},{key:"getLogData",value:function(e,t){var n=JSON.stringify(e);return["users/login","users/resetPwd","users/createSubMerchant"].some(function(e){var n;return null==t||null===(n=t.url)||void 0===n?void 0:n.includes(e)})&&(n=""),{requestBody:n,errResponse:JSON.stringify(t)}}}]),e}();return e.\u0275fac=function(t){return new(t||e)(u.LFG(d.$h),u.LFG(b.t2),u.LFG(g.F0),u.LFG(u.zs3))},e.\u0275prov=u.Yz7({token:e,factory:e.\u0275fac}),e}();function I(e){return function(t){var n=t.value;return n&&n&&n<e?{minlimit:!0}:null}}var T=n(22805),E=null;function k(){return E||(E=T.PhoneNumberUtil.getInstance()),E}function A(e){return function(t){var n=null==t?void 0:t.value;if(null==n||""===String(n).trim())return null;try{var i=k().parse(String(n),e);return k().isValidNumberForRegion(i,e)?null:{invalidPhone:!0}}catch(r){return{invalidPhone:!0}}}}n(54616);var C=n(67136),x=function(){var e=function(){function e(){s(this,e)}return l(e,[{key:"handleError",value:function(e){if(this.isChunkOrSyntaxLoadErrorVal(e)||this.isPostEventBridgeErrorVal(e)||this.isDisableWebkitEnterFullscreenErrorVal(e)||this.isJavaObjectGoneErrorVal(e)||(0,C.U$)(e)||(0,C.VA)(e)){if(this.isChunkOrSyntaxLoadErrorVal(e)){console.warn("ChunkLoadError detected due to new deployment asset hashes. Reloading page...");var t=sessionStorage.getItem("chunk_error_reload"),n=Date.now();if(!t||n-parseInt(t,10)>1e4)return sessionStorage.setItem("chunk_error_reload",n.toString()),void window.location.reload()}}else console.error("Unhandled Application Error:",e)}},{key:"isChunkOrSyntaxLoadErrorVal",value:function(e){var t=(null==e?void 0:e.message)||(null==e?void 0:e.toString())||"";return/Loading chunk [\d]+ failed|Failed to fetch dynamically imported module|Importing a module script failed|Unexpected token/i.test(t)}},{key:"isPostEventBridgeErrorVal",value:function(e){var t=(null==e?void 0:e.message)||(null==e?void 0:e.toString())||"";return/postEvent/i.test(t)||/Method not found/i.test(t)}},{key:"isDisableWebkitEnterFullscreenErrorVal",value:function(e){var t=(null==e?void 0:e.message)||(null==e?void 0:e.toString())||"";return/disableWebkitEnterFullscreen/i.test(t)}},{key:"isJavaObjectGoneErrorVal",value:function(e){var t=(null==e?void 0:e.message)||(null==e?void 0:e.toString())||"";return/Java object is gone/i.test(t)||/sendDataToNative/i.test(t)}}]),e}();return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=u.Yz7({token:e,factory:e.\u0275fac}),e}(),P={"E-100":{code:"E-100",i18nKey:"OTP_VERIFICATION_FAILED_TRY_AGAIN"},"E-101":{code:"E-101",i18nKey:"OTP_VERIFICATION_FAILED_TRY_AGAIN"},"E-102":{code:"E-102",i18nKey:"OTP_VERIFICATION_FAILED_TRY_AGAIN"},"E-103":{code:"E-103",i18nKey:"OTP_VERIFICATION_FAILED_TRY_AGAIN"}};function O(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.errCodeVal,i=void 0===n?"E-100":n,r=t.customBaseKeyVal,a=void 0===r?"":r,o=t.translateServiceParamVal,s=void 0===o?null:o,c=a||(null===(e=(null==P?void 0:P[i])||(null==P?void 0:P["E-100"]))||void 0===e?void 0:e.i18nKey)||"OTP_VERIFICATION_FAILED_TRY_AGAIN";if(null!=s&&s.instant)try{var l=s.instant(c);if(l&&l!==c)return"".concat(l," (Code: ").concat(i,")")}catch(u){}return"".concat(c," (Code: ").concat(i,")")}},54616:function(e,t,n){"use strict";n.d(t,{sz:function(){return a},_H:function(){return o},dq:function(){return c},ml:function(){return l},i4:function(){return u},Y:function(){return d}});var i=n(29609);function a(){var e=new Intl.DateTimeFormat("en-CA",{timeZone:"Asia/Qatar",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1}).formatToParts(new Date),t=function(t){var n,i;return null!==(n=null===(i=e.find(function(e){return e.type===t}))||void 0===i?void 0:i.value)&&void 0!==n?n:""},n=t("year"),i=t("month"),r=t("day"),a=t("hour");"24"===a&&(a="00");var o="".concat(n,"-").concat(i,"-").concat(r),s="".concat(a,":").concat(t("minute"),":").concat(t("second"));return{date:o,time:s,dateTime:"".concat(o," ").concat(s)}}function o(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"YYYY-MM-DD";return!!e&&i(e,t).format("YYYY-MM-DD")===a().date}function s(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"YYYY-MM-DD",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"23:59:59";if(!e)return"";var r=i(e,t).format("YYYY-MM-DD");return o(r,"YYYY-MM-DD")?"".concat(r," ").concat(a().time):"".concat(r," ").concat(n)}function c(e){var t=r(e.split("/"),2),n=t[0],i=t[1],a=(void 0===i?"":i)||n;return e.includes(":")?{startDateTime:n.trim(),endDateTime:a.trim()}:{startDateTime:"".concat(n," 00:00:00"),endDateTime:s(a)}}function l(){return"00:00:00-".concat(a().time)}function u(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"00:00:00",t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return"".concat(e,"-").concat(t?a().time:"23:59:59")}function d(e,t){return new Date("03/21/1989 ".concat(e)).getTime()<=new Date("03/21/1989 ".concat(t)).getTime()?e:t}},25160:function(e,t,i){"use strict";function r(e){return!0===e||1===e||"string"==typeof e&&["1","true","yes"].includes(e.trim().toLowerCase())}function a(e){return 1===(null==e?void 0:e.shipping_and_delivery_enable_disable)}function o(e){return!!e&&r(void 0!==e.admin_shipping_allowed?e.admin_shipping_allowed:e.is_shipping_enabled)}function s(e){return"/dashboard/".concat("pos"===e?"pos":"online-payment","-default")}function c(e){return r(null==e?void 0:e.global_allow_delivery_promotion)}function l(e){return r(null==e?void 0:e.global_allow_international)}function u(e){var t;return r(null==e||null===(t=e.delivery_promotion)||void 0===t?void 0:t.enabled)}function d(e){var t=Number(null==e?void 0:e.shipping_rate);return!Number.isNaN(t)&&t>0}function p(e,t,n){return null===function(e,t,n){return n?function(e,t){var n=null==e?void 0:e.global_allowed_methods;return!(null==n||!n.length)&&n.includes(t)}(e,t)?o(e)?a(e)?null:"merchant_off":"admin_locked":"global_method":"permission"}(e,t,n)}function v(e,t,n){return p(e,t,n)}function h(e,t,n){return!!(t&&p(e,"invoice",t)&&c(e)&&u(e)&&n)}function g(e,t,n){return!!(p(e,"invoice",t)&&n&&d(e))}function m(e,t,n,i){return!!(g(e,t,n)&&h(e,t,n)&&i)}function f(e,t,n,i){return!!(p(e,n,t)&&i&&d(e))}function _(e,t,n){return p(e,t,n)}function y(e){return!a(e)||!c(e)}function S(e){return!a(e)||!l(e)}function b(e){var t=n({},e);return t.isShipping=!1,delete t.pickup_source_address_loc_id,delete t.package_weight,delete t.product_type,t}function w(e,t,i,r){var a=n({},e),o=!!a.isShipping,s=!(null==r||!r.preserveExistingShipping),c=!(null==r||!r.preserveExistingDeliveryPromotion);if(!p(t,"invoice",i)&&!s){var l=b(a);return l.isDeliveryPromotion=!1,l}var u=h(t,i,o);return u||c?c&&!u||(a.isDeliveryPromotion=!(!o||!a.isDeliveryPromotion)):a.isDeliveryPromotion=!1,o||s?a:b(a)}function I(e,t,n,i){return!(!h(e,t,n)||!i)}function T(e,t,n,i){return{showSection:p(e,"invoice",t),showDeliveryPromotion:h(e,t,n),showDeliveryPromotionPolicy:I(e,t,n,i),showInvoiceShippingCost:g(e,t,n),isPromotionAppliedToTotal:m(e,t,n,i)}}function E(e,t,i){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],a=n({},e);return(p(t,"store_link",i)||r)&&a.isShipping?a:b(a)}function k(e,t,n,i,r){return!!r&&!p(t,n,i)&&(function(e,t){var n,i,r,a,o;
1null!==(n=e.get("isShipping"))&&void 0!==n&&n.setValue(!1,{emitEvent:!1}),null!==(i=e.get("pickup_source_address_loc_id"))&&void 0!==i&&i.setValue(null,{emitEvent:!1}),null!==(r=e.get("package_weight"))&&void 0!==r&&r.setValue("",{emitEvent:!1}),null!==(a=e.get("product_type"))&&void 0!==a&&a.setValue(null,{emitEvent:!1}),"invoice"===t&&(null===(o=e.get("isDeliveryPromotion"))||void 0===o||o.setValue(!1,{emitEvent:!1}))}(e,n),!0)}function A(e,t,n){var i,o,s=r(null==e?void 0:e.isShipping),l=r(null==e?void 0:e.isDeliveryPromotion),d=function(e){if(!e)return null;if("string"==typeof e)try{var t=JSON.parse(e);return t&&"object"==typeof t?t:null}catch(n){return null}return"object"==typeof e?e:null}(null==e?void 0:e.shipping_settings_snapshot);return d?(i=t&&r(d.shipping_enabled),(o=t&&r(d.delivery_promotion_enabled)&&s)&&[1,2].includes(null==e?void 0:e.invoicestatusId)&&(o=a(n)&&c(n)&&u(n))):(i=t&&s,o=t&&l),{showShippingRow:i,showPromotionRow:o,showShippingDetails:i&&s,storedShipping:s,storedPromotion:l}}i.d(t,{wt:function(){return r},Ti:function(){return o},yR:function(){return s},sm:function(){return c},r:function(){return l},_O:function(){return p},vg:function(){return v},W2:function(){return f},AU:function(){return _},yu:function(){return y},g3:function(){return S},WZ:function(){return w},Rr:function(){return T},Rt:function(){return E},_k:function(){return k},LL:function(){return A}})},7491:function(e,t,n){"use strict";n.d(t,{ql:function(){return h},Ex:function(){return _},r2:function(){return g},A:function(){return y},IR:function(){return f},Uw:function(){return r},AS:function(){return S},Kd:function(){return w},EO:function(){return p},aC:function(){return m},yG:function(){return T}});var i=n(35366),r=function(){var e=function(){function e(){s(this,e)}return l(e,[{key:"transform",value:function(e,t){if(!e||"string"!=typeof e)return"";var n=6;t&&"number"==typeof t&&(n=t);var i="*".repeat(n);return e.length<=n?i:i+e.substring(e.length-n)}}]),e}();return e.\u0275fac=function(t){return new(t||e)},e.\u0275pipe=i.Yjl({name:"hideChar",type:e,pure:!0}),e}(),a=n(97425),o=n(82391),c=n(42693),u=function(){var e=function(){function e(t){s(this,e),this.http=t}return l(e,[{key:"get",value:function(e){var t=this;return new o.y(function(n){var i=null;return t.http.get(e,{responseType:"blob"}).subscribe(function(e){i=URL.createObjectURL(e),n.next(i)},function(e){n.error(e)}),function(){i&&(URL.revokeObjectURL(i),i=null)}})}}]),e}();return e.\u0275fac=function(t){return new(t||e)(i.LFG(c.eN))},e.\u0275prov=i.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e}(),d=n(99624),p=function(){var e=function(){function e(t,n,i){s(this,e),this._ref=t,this.urlHelperService=n,this.sanitizer=i,this._latestValue=null,this._latestReturnedValue=null,this._subscription=null,this._obj=null,this._result=new a.X(null),this.result=this._result.asObservable(),this._internalSubscription=null}return l(e,[{key:"ngOnDestroy",value:function(){this._subscription&&this._dispose()}},{key:"transform",value:function(e){var t=this.internalTransform(e);return this.asyncTrasnform(t)}},{key:"internalTransform",value:function(e){var t=this;return e?(this.previousUrl!==e&&(this.previousUrl=e,this._internalSubscription=this.urlHelperService.get(e).subscribe(function(e){var n=t.sanitizer.bypassSecurityTrustUrl(e);t._result.next(n)},function(e){})),this.result):this.result}},{key:"asyncTrasnform",value:function(e){return this._obj?e!==this._obj?(this._dispose(),this.asyncTrasnform(e)):this._latestValue===this._latestReturnedValue?this._latestReturnedValue:(this._latestReturnedValue=this._latestValue,i.qW0.wrap(this._latestValue)):(e&&this._subscribe(e),this._latestReturnedValue=this._latestValue,this._latestValue)}},{key:"_subscribe",value:function(e){var t=this;this._obj=e,this._subscription=e.subscribe({next:function(n){return t._updateLatestValue(e,n)},error:function(e){throw e}})}},{key:"_dispose",value:function(){this._subscription.unsubscribe(),this._internalSubscription&&this._internalSubscription.unsubscribe(),this._internalSubscription=null,this._latestValue=null,this._latestReturnedValue=null,this._subscription=null,this._obj=null}},{key:"_updateLatestValue",value:function(e,t){e===this._obj&&(this._latestValue=t,this._ref.markForCheck())}}]),e}();return e.\u0275fac=function(t){return new(t||e)(i.Y36(i.sBO,16),i.Y36(u,16),i.Y36(d.H7,16))},e.\u0275pipe=i.Yjl({name:"secure",type:e,pure:!1}),e}(),v=n(61116),h=function(){var e=function(){function e(){s(this,e)}return l(e,[{key:"transform",value:function(e,t,n){return 0===e?t&&"z_dec"==t?"0.00":"0":e?"".concat(e=Number.isInteger(e)?(0,v.uf)(e,"ar"):(0,v.uf)(e,"ar","1.2-2")):n?"":"0"}}]),e}();return e.\u0275fac=function(t){return new(t||e)}
1,e.\u0275pipe=i.Yjl({name:"formatAmount",type:e,pure:!0}),e}(),g=function(){var e=function(){function e(){s(this,e)}return l(e,[{key:"transform",value:function(e,t,n){return e?e=e.includes("T")&&e.includes("Z")?(0,v.p6)(e,"d MMM y, H:mm:ss","en","+000"):(0,v.p6)(e,t&&"date_only"==t?n||"d MMM y":"d MMM y, H:mm:ss","en"):"NA"}}]),e}();return e.\u0275fac=function(t){return new(t||e)},e.\u0275pipe=i.Yjl({name:"formatDate",type:e,pure:!0}),e}(),m=function(){var e=function(){function e(){s(this,e)}return l(e,[{key:"transform",value:function(e,t){return 0===e?0:e||"NA"}}]),e}();return e.\u0275fac=function(t){return new(t||e)},e.\u0275pipe=i.Yjl({name:"zeroValue",type:e,pure:!0}),e}(),f=function(){var e=function(){function e(){s(this,e)}return l(e,[{key:"transform",value:function(e,t){if(e){if("master"==e&&(e+=" Card"),e.includes(",")){var n=[];return e.split(",").forEach(function(e){var t=(e=e.toLowerCase()).substr(0,1).toUpperCase()+e.substr(1);"Mastercard"==t&&(t="Master Card"),n.push(t)}),n.join().replace(",",", ")}return e}return"NA"}}]),e}();return e.\u0275fac=function(t){return new(t||e)},e.\u0275pipe=i.Yjl({name:"formatPayMethod",type:e,pure:!0}),e}(),_=function(){var e=function(){function e(){s(this,e)}return l(e,[{key:"transform",value:function(e,t){return e?("debit"!=e&&"credit"!=e&&"DEBIT"!=e&&"CREDIT"!=e||(e+=" Card"),e.includes(",")?e.replace(",",", "):e):"NA"}}]),e}();return e.\u0275fac=function(t){return new(t||e)},e.\u0275pipe=i.Yjl({name:"formatCardType",type:e,pure:!0}),e}(),y=function(){var e=function(){function e(){s(this,e)}return l(e,[{key:"transform",value:function(e,t){return e&&"wpos-3 x"===(null==e?void 0:e.toLowerCase())?"WPOS-3":e}}]),e}();return e.\u0275fac=function(t){return new(t||e)},e.\u0275pipe=i.Yjl({name:"formatDeviceType",type:e,pure:!0}),e}(),S=function(){var e=function(){function e(){s(this,e)}return l(e,[{key:"transform",value:function(e,t,n){return"string"!=typeof e||void 0===t||void 0===n?e:e.replaceAll(t,n)}}]),e}();return e.\u0275fac=function(t){return new(t||e)},e.\u0275pipe=i.Yjl({name:"replace",type:e,pure:!0}),e}(),b=n(35379),w=function(){var e=function(){function e(){s(this,e)}return l(e,[{key:"transform",value:function(e,t,n,i){if("tmode"==i)return[3,4,5].includes(null==t?void 0:t.id)?n:null==t?void 0:t.name;if("pmeth"==i){var r=b.kO;return"SADAD PAY"==n?"assets/images/pos-panel/payment-methods/sadad-pay.svg":"APPLE PAY"==n?"assets/images/pos-panel/payment-methods/apple-pay.svg":"GOOGLE PAY"==n?"assets/images/pos-panel/payment-methods/google-pay.svg":this.getSdSerPayLogoPath(n,r)}}},{key:"getSdSerPayLogoPath",value:function(e,t){var n,i,r=(null==t||null===(n=t[e])||void 0===n?void 0:n.svg)||(null!=e&&e.toUpperCase?null==t||null===(i=t[null==e?void 0:e.toUpperCase()])||void 0===i?void 0:i.svg:void 0);return r?"assets/images/pos-panel/payment-method/".concat(r,".svg"):""}}]),e}();return e.\u0275fac=function(t){return new(t||e)},e.\u0275pipe=i.Yjl({name:"sdSerTraxMode",type:e,pure:!0}),e}(),I=n(60649),T=function(){var e=function(){function e(t){s(this,e),this.translate=t}return l(e,[{key:"transform",value:function(e,t){var n;if(!e||"string"!=typeof e||null==e||null===(n=e.trim)||void 0===n||!n.call(e))return e||"";var i="";try{var r,a;i=(null===(r=this.translate)||void 0===r||null===(a=r.instant)||void 0===a?void 0:a.call(r,"".concat(e)))||e}catch(o){i=e}return"string"==typeof i&&(i=i.replace("dynamic_field_a",t)),i}}]),e}();return e.\u0275fac=function(t){return new(t||e)(i.Y36(I.sK,16))},e.\u0275pipe=i.Yjl({name:"tooltipDynTrans",type:e,pure:!1}),e}()},17188:function(e,t,n){"use strict";n.d(t,{B:function(){return u}});var i=n(35366),r=n(529),a=n(91681),o=n(42693),c=n(52105),u=function(){var e=function(){function e(t,n){s(this,e),this.http=t,this._authService=n,this.profileUpdate=new i.vpe,this.containerMap={banks:"api-banks",businessDoc:"api-business",privacyDoc:"privacy-policy"}}return l(e,[{key:"getBankDetails",value:function(e){return this.http.get("".concat(this._authService.updSNAEnvURL("v5"),"userbanks?filter[where][userId]=").concat(e,"&filter[include]=bank"))}}
1,{key:"getBankTransactionDetails",value:function(e,t){var n={name:"withdrawalrequests",method:"GET"};return n.data="filter[where][userId]=".concat(1===this._authService.currentUserValue.roleId?this._authService.currentUserValue.id:this._authService.currentUserValue.mainMerchantId,"&filter[where][userbankId]=").concat(e,"&filter[skip]=0&filter[limit]=10"),this.http.get("".concat(this._authService.updSNAEnvURL("v6")).concat(n.name,"?").concat(n.data))}},{key:"createBank",value:function(e){var t={name:"userbanks",method:"POST"};return t.data=e,this.http.post("".concat(this._authService.updSNAEnvURL("v5")).concat(t.name),t.data)}},{key:"deleteBank",value:function(e){var t={};return t.name="userbanks/".concat(e),t.method="DELETE",this.http.delete("".concat(this._authService.updSNAEnvURL("v5")).concat(t.name))}},{key:"uploadAuthorizationLetter",value:function(e){var t=e.name.lastIndexOf("."),n=new FormData;return n.append("file",e,e.name.slice(0,t).replaceAll(".","_")+e.name.slice(t,e.name.length)),this.http.post("".concat(this._authService.updSNAEnvURL("v6"),"upload_image/api-banks"),n)}},{key:"getBusinessDetail",value:function(e){var t={name:"userbusinesses",method:"GET"};return t.data="filter[where][userId]=".concat(e,"&filter[include]=businessmedia&filter[include]=businesstypes"),this.http.get("".concat(this._authService.updSNAEnvURL("v5")).concat(t.name,"?").concat(t.data))}},{key:"editBusinessInfo",value:function(e,t){var n=this;return this.http.patch("".concat(this._authService.updSNAEnvURL("v5"),"userbusinesses/").concat(t),e).pipe((0,a.U)(function(e){return n.profileUpdate.emit(),n._authService.getVerifications(),e}))}},{key:"addBusinessInfo",value:function(e){var t=this,n={name:"userbusinesses",method:"POST",data:e};return this.http.post("".concat(this._authService.updSNAEnvURL("v5")).concat(n.name),n.data).pipe((0,a.U)(function(e){return t.profileUpdate.emit(),e}))}},{key:"uploadBusinessFiles",value:function(e){var t=e.name.lastIndexOf("."),n=new FormData;return n.append("file",e,e.name.slice(0,t).replaceAll(".","_")+e.name.slice(t,e.name.length)),this.http.post("".concat(this._authService.updSNAEnvURL("v6"),"upload_image/api-business"),n)}},{key:"uploadBusinessLogo",value:function(e,t){var n=new FormData,i=t.lastIndexOf(".");return n.append("file",e,t.slice(0,i).replaceAll(".","_")+t.slice(i,t.length)),this.http.post("".concat(this._authService.updSNAEnvURL("v6"),"upload_image/api-businesslogo"),n)}},{key:"sendOtpForPersonalDetails",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._authService.currentUserValue.cellnumber,t={name:"userbusinesses/sendotp",method:"POST",data:{newCellnumber:e}};return this.http.post("".concat(this._authService.updSNAEnvURL("v5")).concat(t.name),t.data)}},{key:"getNotificationDetails",value:function(e){return this.http.get("".concat(this._authService.updSNAEnvURL("v6"),"/usermetapreferences?filter[where][userId]=").concat(e))}},{key:"updateNotification",value:function(e,t){return this.http.post("".concat(this._authService.updSNAEnvURL("v6"),"/usermetapreferences/update?where[userId]=").concat(t),e)}},{key:"changePrimaryBank",value:function(e,t){var n={};return n.name="userbanks/".concat(e),n.method="PATCH",n.data={primary:t},this.http.patch("".concat(this._authService.updSNAEnvURL("v5")).concat(n.name),n.data)}},{key:"download",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return 1===t?this.http.get("".concat(this._authService.updSNAEnvURL("v5"),"containers/api-banks/download/").concat(e),{observe:"response",responseType:"blob"}).pipe((0,a.U)(function(e){return new Blob([null==e?void 0:e.body])})):this.http.get("".concat(this._authService.updSNAEnvURL("v5"),"containers/api-business/download/").concat(e),{observe:"response",responseType:"blob"}).pipe((0,a.U)(function(e){return new Blob([null==e?void 0:e.body])}))}},{key:"downloadOpen",value:function(e){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";this.requestUrl="".concat(this._authService.updSNAEnvURL("v5"),"containers/api-business/download/").concat(e);var n="application/pdf";return t&&"pdf"!=t&&(n="image/".concat(t)),this.http.get(this.requestUrl,{responseType:"blob",observe:"response"}).pipe((0,a.U)(function(e){return new Blob([null==e?void 0:e.body],{type:n})}))}},{key:"getBankId",value:function(e){var t={method:"GET",name:"banks"};return t.data="filter[where][ibannumber]=".concat(e),this.http.get("".concat(this._authService.updSNAEnvURL("v5")).concat(t.name,"?").concat(t.data))}}
1,{key:"reverificationOfBankDetails",value:function(e,t){var n={};return n.name="userbanks/".concat(t),n.method="PATCH",n.data=e,this.http.patch("".concat(this._authService.updSNAEnvURL("v5")).concat(n.name),n.data)}},{key:"getImage",value:function(e){return this.http.get(e,{responseType:"blob"})}},{key:"getEncrypetedCode",value:function(e){var t={};return t.id=e,this.http.post("".concat(r.N.encryptUrl),JSON.stringify(t))}},{key:"getEncrypetedCodeNormal",value:function(e){var t={};return t.id=e,this.http.post("".concat(r.N.encryptUrlNormal),JSON.stringify(t))}},{key:"getCounter",value:function(){return this.http.get("".concat(this._authService.updSNAEnvURL("v5"),"users/myAccountCounters"))}},{key:"getImageConfidence",value:function(e){var t=new FormData;return t.append("file",e,e.name),this.http.post("".concat(r.N.ocrAPIUrl,"api/containers/fetchImageConfidence"),t)}},{key:"getDocumentOCR",value:function(e,t){var n=(new o.WM).set("type",t.toString()),i=new FormData;return i.append("file",e,e.name),this.http.post("".concat(r.N.ocrAPIUrl,"api/containers/fetchDocumentOcr"),i,{headers:n})}},{key:"getFraudDetection",value:function(e){var t=new FormData;return t.append("file",e,e.name),this.http.post("".concat(r.N.ocrAPIUrl,"api/containers/identityDocumentProofing"),t)}},{key:"getBankLogo",value:function(e){var t={name:"banks/findOne",method:"GET"};return t.data="filter[where][ibannumber]=".concat(e),this.http.get("".concat(this._authService.updSNAEnvURL("v5")).concat(t.name,"?").concat(t.data))}},{key:"upateBusinessProfile",value:function(e){var t=this;return this.http.patch("".concat(r.N.apiUrlv7,"userbusinesses/update_profile"),e).pipe((0,a.U)(function(e){return t.profileUpdate.emit(),t._authService.getVerifications(),e}))}},{key:"callAcceptPrivacyPolicy",value:function(e){var t={name:"users/privacy-policy/accept"};return t.data=e,this.http.put("".concat(r.N.apiUrlv7).concat(t.name),t.data)}},{key:"downloadContainerFile",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return this.http.get("".concat(r.N.apiUrlv7,"containers/").concat(this.containerMap[t],"/download/").concat(e),{observe:"response",responseType:"blob"}).pipe((0,a.U)(function(e){return new Blob([null==e?void 0:e.body])}))}}]),e}();return e.\u0275fac=function(t){return new(t||e)(i.LFG(o.eN),i.LFG(c.$))},e.\u0275prov=i.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e}()},52105:function(e,t,n){"use strict";n.d(t,{$:function(){return I}});var i=n(16304),r=n(35366),a=n(97425),o=n(49234),c=n(32041),u=n(9153),d=n(91681),p=n(69056),v=n(69568),h=n(51816),g=l(function e(){s(this,e)}),m=n(529),f=n(65595),_=n(63908),y=n(50243),S=n(42693),b=n(34115),w=n(54391),I=function(){var e=function(){function e(t,n,i,o){s(this,e),this.http=t,this._toster=n,this.injector=i,this.router=o,this.onBankVerificationFailed=new r.vpe,this.onBussinessVerificatonFailed=new r.vpe,this.vpnCheckCall=new r.vpe,this.vpnEventEmitter=new r.vpe,this.docExpiryNotiEveEmit=new r.vpe,this.isVpnProxy=new a.X(!1),this.bussCache=new a.X(new Map),this.sideBarEventEmiter=new r.vpe,this.isSessExpInProg=new a.X(!1),this.currIpAdd="",this.currentUserSubject=new a.X(this.getData("currentUser")),this.currentUser=this.currentUserSubject.asObservable(),this.appDeveloperSubject=new a.X(this.getData("tempData")),this.appDeveloper=this.appDeveloperSubject.asObservable(),this.LoginUserSubject=new a.X(this.getData("loginUser")),this.LoginUser=this.LoginUserSubject.asObservable()}return l(e,[{key:"bussCacheValue",get:function(){return this.bussCache.value}},{key:"currentUserValue",get:function(){return this.currentUserSubject.value}},{key:"loginUserValue",get:function(){return this.LoginUserSubject.value}},{key:"appDeveloperValue",get:function(){return this.appDeveloperSubject.value}},{key:"getLoginPayloadDataObj",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return 1==n?{signinForSignup:!0}:{cellnumber:e,password:t,signinForSignup:n||!1}}},{key:"login",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];1==i&&(localStorage.removeItem("currentUser"),this.currentUserSubject.next(null),this.currentUserSubject.complete());
1var r={name:"users/login",method:"POST",data:this.getLoginPayloadDataObj(t,n,i)};return this.http.post("".concat(m.N.apiUrlv7).concat(r.name),r.data).pipe((0,d.U)(function(t){if(t&&t.id){var n=new g;if(n.token=t.id,1==i){var r=e.getData("tempData");r?(r.appDevToken=t.id,localStorage.setItem("tempData",e.encrypt(JSON.stringify(r))),e.appDeveloperSubject.next(t.id)):(localStorage.setItem("tempData",e.encrypt(JSON.stringify({appDevToken:t.id}))),e.appDeveloperSubject.next(t.id))}e.currentUserSubject.next(n)}return t},(0,p.q)(1)))}},{key:"clearUserData",value:function(){var e=this;return(0,i.Z)(regeneratorRuntime.mark(function t(){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise(function(t,n){e.currentUserSubject.next(null),localStorage.removeItem("currentUser"),t()}));case 1:case"end":return t.stop()}},t)}))()}},{key:"clearLoginUserData",value:function(){var e=this;return(0,i.Z)(regeneratorRuntime.mark(function t(){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise(function(t,n){e.LoginUserSubject.next(null),localStorage.removeItem("loginUser"),t()}));case 1:case"end":return t.stop()}},t)}))()}},{key:"clearUserDataNavLogin",value:function(){var e=this;return(0,i.Z)(regeneratorRuntime.mark(function t(){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise(function(t,n){e.resetAuthUserSession(),setTimeout(function(){e.router.navigate(["/auth/login"])},450),t()}));case 1:case"end":return t.stop()}},t)}))()}},{key:"resetAuthUserSession",value:function(){localStorage.removeItem("currentUser"),this.currentUserSubject.next(null),localStorage.removeItem("loginUser"),this.LoginUserSubject.next(null),localStorage.removeItem("sadad_dyn_session_key"),sessionStorage.removeItem("sadad_dyn_session_key")}},{key:"navLogin",value:function(){var e=this;return(0,i.Z)(regeneratorRuntime.mark(function t(){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:setTimeout(function(){e.router.navigate(["/auth/login"])},450);case 1:case"end":return t.stop()}},t)}))()}},{key:"findOne",value:function(e){var t=this;return this.http.post("".concat(m.N.fastifyUrlv6),JSON.stringify({name:"users/findOne",method:"GET",data:"filter[where][cellnumber]=".concat(e),decrypt:!0,apiVer:"v7"})).pipe((0,d.U)(function(e){var n;return!e||null!=e&&e.error?e:t.safeDecryptFastifyData(null==e?void 0:e.data,null===(n=t.loginUserValue)||void 0===n?void 0:n.fastifyEncryptionKey)},(0,p.q)(1)))}},{key:"verifyOtp",value:function(e,t){var n=this,i={name:"usermetaauths/verify",method:"POST",data:{otp:e,userId:t},f_encrypt:!0,apiVer:"v6"};return i=this.updSNAEnvData(i,"v6"),this.http.post("".concat(m.N.fastifyUrlv6),JSON.stringify(i)).pipe((0,d.U)(function(e){var t,i,r;return null!==(t=e)&&void 0!==t&&t.error?null===(i=e)||void 0===i?void 0:i.error:e=n.safeDecryptFastifyData(null===(r=e)||void 0===r?void 0:r.data)}))}},{key:"saveAuthCurrentUser",value:function(e){var t=this;return(0,i.Z)(regeneratorRuntime.mark(function n(){var i,r,s;return regeneratorRuntime.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(e){n.next=2;break}return n.abrupt("return");case 2:return t.safeSetVerifiedUserFlagStateVal(e,!0),localStorage.removeItem("currentUser"),(r=e)&&(r.token=null===(i=t.currentUserSubject.getValue())||void 0===i?void 0:i.token),t.currentUserSubject.next(null),t.currentUserSubject.complete(),t.setDataWthoutPromise("currentUser",r),n.t0=a.X,n.next=11,t.getData("currentUser");case 11:return n.t1=n.sent,t.currentUserSubject=new n.t0(n.t1),t.currentUser=t.currentUserSubject.asObservable(),t.currentUserSubject.next(r),t.logFirebaseLoginEvent(r),s=(0,o.H)(5e3),n.next=19,t.getMetaPrefData();case 19:n.sent.pipe((0,v.R)(s)).subscribe(function(e){t.safeAssignUserMetaPrefFieldsVal(t.currentUserValue,e),t.currentUserValue&&(t.setData("currentUser",t.currentUserValue),t.currentUserSubject.next(t.currentUserValue))});case 20:case"end":return n.stop()}},n)}))()}},{key:"logFirebaseLoginEvent",value:function(e){try{var t;null===(t=this.injector.get(_.$))||void 0===t||t.logPanelEvent("Login_event","LoginComponent",{Sada
1dId:(1==(null==e?void 0:e.roleId)?null==e?void 0:e.SadadId:(null==e?void 0:e.mainMerchantSadadId)||(null==e?void 0:e.SadadId))||void 0})}catch(n){console.error("logFirebaseLoginEvent error in AuthenticationService:",n)}}},{key:"getMetaPrefData",value:function(){var e=this;return(0,i.Z)(regeneratorRuntime.mark(function t(){var n,i;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return i="filter[where][userId]=".concat(null===(n=e.currentUserValue)||void 0===n?void 0:n.id,"&filter[fields][previouslogindatetime]=true&filter[fields][isallowedtomangeprivatepublicaccess]=true&filter[fields][isallowedtoaddsubmerchant]=true"),t.abrupt("return",e.http.get("".concat(e.updSNAEnvURL("v6"),"usermetapreferences?").concat(i)));case 2:case"end":return t.stop()}},t)}))()}},{key:"getMetaPrefData_Direct",value:function(){var e,t="filter[where][userId]=".concat(null===(e=this.currentUserValue)||void 0===e?void 0:e.id,"&filter[fields][previouslogindatetime]=true&filter[fields][isallowedtomangeprivatepublicaccess]=true&filter[fields][isallowedtoaddsubmerchant]=true");return this.http.get("".concat(this.updSNAEnvURL("v6"),"usermetapreferences?").concat(t))}},{key:"setData",value:function(e,t){var n=this;return Promise.resolve().then(function(){localStorage.setItem(e,n.encrypt(JSON.stringify(t)))})}},{key:"setDataWthoutPromise",value:function(e,t){localStorage.setItem(e,this.encrypt(JSON.stringify(t)))}},{key:"getData",value:function(e){var t=localStorage.getItem(e);if(t)try{var n=this.decrypt(t);if(n)return JSON.parse(n)}catch(i){return null}return null}},{key:"decrypt",value:function(e){if(!e)return"";try{var t,n=this.getDynamicLocalStorageSessionKey();return(null===(t=f.AES.decrypt(e,n))||void 0===t?void 0:t.toString(f.enc.Utf8))||""}catch(i){return""}}},{key:"encrypt",value:function(e){var t,n=this.getDynamicLocalStorageSessionKey();return null===(t=f.AES.encrypt(e,n))||void 0===t?void 0:t.toString()}},{key:"logout",value:function(){var e=this;return this.http.post("".concat(this.updSNAEnvURL("v5"),"users/logout"),{}).pipe((0,d.U)(function(t){return localStorage.removeItem("currentUser"),e.currentUserSubject.next(null),localStorage.removeItem("loginUser"),e.LoginUserSubject.next(null),e._toster.dismissAllAlert(),e.router.navigate(["/auth/login"],{replaceUrl:!0}),t||{}}),(0,h.K)(function(e){return(0,c.of)(e||{})}))}},{key:"restPasswordRequest",value:function(e){var t={name:"users/reset",method:"POST",data:e};return this.http.post("".concat(m.N.apiUrlv7).concat(t.name),t.data)}},{key:"resetPasswordVerifyOtp",value:function(e){var t=this,n={name:"users/verifyResetPassword",method:"POST",data:e};return this.http.post("".concat(m.N.apiUrlv7).concat(n.name),n.data).pipe((0,d.U)(function(e){if(null!=e&&e.error)return e;var n=new g;return n.token=null==e?void 0:e.accessToken,t.currentUserSubject.next(n),e}))}},{key:"resetPasswordNew",value:function(e){var t=this,n={name:"users/resetPwd",method:"POST",data:e};return this.http.post("".concat(m.N.apiUrlv7).concat(n.name),n.data).pipe((0,d.U)(function(e){return e&&!(null!=e&&e.error)&&t.currentUserSubject.next(null),e}))}},{key:"resndOTP",value:function(e){var t="type=".concat(e);return this.http.get("".concat(this.updSNAEnvURL("v5"),"usermetaauths/resendotp?").concat(t))}},{key:"getBalance",value:function(){var e=this;return(0,i.Z)(regeneratorRuntime.mark(function t(){var n,r;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.currentUserValue,r={name:"usermetapersonals",method:"GET",apiVer:"v6"},t.abrupt("return",(r.data="filter[where][userId]=".concat(1===e.currentUserValue.roleId?e.currentUserValue.id:e.currentUserValue.mainMerchantId),e.http.get("".concat(e.updSNAEnvURL("v6")).concat(r.name,"?").concat(r.data)).subscribe(function(){var t=(0,i.Z)(regeneratorRuntime.mark(function t(i){var r,a;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(null==i||!i.error){t.next=4;break}e._toster.error((null==i||null===(r=i.error)||void 0===r?void 0:r.message)||"Error!"),t.next=8;break;case 4:return n.fund=null==i||null===(a=i[0])||void 0===a?void 0:a.totalavailablefunds,e.currentUserSubject.next(n),t.next=8,e.setData("currentUser",n);case 8:case"end":return t.stop()}},t)}));return function(e){return t.apply(this,arguments)}}())));case 3:case"end":return t.stop()}},t)}))()}},{key:"getIPAddress",value:function(){var e=this;return(0,i.Z)(regeneratorRuntime.mark(function t(){var n;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e.getIpAddress_fastifypatch();case 3:return n=t.sent,t.abrupt("return","preprod"==m.N.envType?{ip:"2402:a00:4
104:1bf1:74e5:4e3c:7bfc:d2f5"}:{ip:n});case 7:t.prev=7,t.t0=t.catch(0),console.log("getIPAddress e:",t.t0);case 10:case"end":return t.stop()}},t,null,[[0,7]])}))()}},{key:"getIpAddress_fastifypatch",value:function(){var e=this;return(0,i.Z)(regeneratorRuntime.mark(function t(){var n,i,r,a,o,s,c,l,u,d;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n="".concat(m.N.fastifyDomain,"/api/ip-request"),i={key1:Date.now()},r={method:"POST",headers:{"ngsw-bypass":"true"},body:JSON.stringify(i)},t.prev=1,t.next=4,fetch(n,r);case 4:if(!(a=t.sent).ok){t.next=10;break}return t.next=8,a.text();case 8:return l=t.sent,t.abrupt("return",(l=JSON.parse(l),null!==(o=l)&&void 0!==o&&o.ip&&(e.currIpAdd=null===(s=l)||void 0===s?void 0:s.ip),null===(c=l)||void 0===c?void 0:c.ip));case 10:return u="",t.prev=11,t.next=14,a.text();case 14:u=t.sent,u=JSON.parse(u),t.next=21;break;case 18:t.prev=18,t.t0=t.catch(11),console.log("ip get err res else json parse error.",t.t0);case 21:return d={status:null==a?void 0:a.status,statusText:null==a?void 0:a.statusText,headers:JSON.stringify(a.headers),body:JSON.stringify(a.body),url:JSON.stringify(a.url),res:u},t.abrupt("return",(504==(null==a?void 0:a.status)?(console.log("call api to store error log of 504 Gateway Timeout : ",a.status),console.log("Gateway Timeout Request Body:",d),e.writeErrorLog(J
1SON.stringify(d),"gatewayTimeoutErrLog-IPAddElse",n).then(function(e){console.log("writeErrorLog entry done successfully!")})):e.writeErrorLog(JSON.stringify(d),"getIpAddressErrLog-IPAddElse",n).then(function(e){console.log("writeErrorLog entry done successfully!")}),"error"));case 25:return t.prev=25,t.t1=t.catch(1),t.abrupt("return",(null!==t.t1&&void 0!==t.t1&&t.t1.message&&t.t1.message.includes("Request failed with status: 504")?(console.log("call api to store error log of 504 Gateway Timeout : ",null===t.t1||void 0===t.t1?void 0:t.t1.message),console.log("Gateway Timeout Request Body:",t.t1.toString()),e.writeErrorLog(t.t1.toString(),"gatewayTimeoutErrLog-IPAddCatch",n).then(function(e){console.log("writeErrorLog entry done successfully!")})):(console.error("Error:",t.t1),e.writeErrorLog(t.t1.toString(),"getIpAddressErrLog-IPAddCatch",n).then(function(e){console.log("writeErrorLog entry done successfully!")})),"error"));case 28:case"end":return t.stop()}},t,null,[[1,25],[11,18]])}))()}},{key:"callVPNProxy",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this;return(0,i.Z)(regeneratorRuntime.mark(function i(){var r,a,o;return regeneratorRuntime.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return r={},a=localStorage.getItem("currUserMob"),r.name=t&&a?"odooips/proxyCheck?ipaddress=".concat(e,"&currUserMobValue=").concat(a):"odooips/proxyCheck?ipaddress=".concat(e),r.method="GET",r.data="",i.next=5,(0,u.n)(n.http.get("".concat(m.N.apiUrlv7).concat(r.name)));case 5:return o=i.sent,i.abrupt("return",(("error"==(null==o?void 0:o.status)||null!=o&&o.error)&&n.writeErrorLog(J
1SON.stringify(o),"proxyCheckErrLog",r.name).then(function(e){console.log("writeErrorLog entry done successfully!")}),o.clientIP=e,o));case 7:case"end":return i.stop()}},i)}))()}},{key:"getVerifications",value:function(){var e=this;return(0,i.Z)(regeneratorRuntime.mark(function t(){var n;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:null!=(n=e.currentUserValue)&&n.userbankstatusId?(n.bankVerified=n.userbankstatusId,1!=n.bankVerified&&e.onBankVerificationFailed.emit(!0),e.currentUserSubject.next(n)):(n.bankVerified=6,e.currentUserSubject.next(n),e.onBankVerificationFailed.emit(!0)),null!=n&&n.userbusinessstatusId?(n.businessVerified=n.userbusinessstatusId,[1,3,4,6].includes(n.userbusinessstatusId)?!1!==(null==n?void 0:n.isVerifiedUser)&&e.safeSetVerifiedUserFlagStateVal(n,!0):e.safeSetVerifiedUserFlagStateVal(n,!1),e.setData("currentUser",n),e.currentUserSubject.next(n),1!==n.userbusinessstatusId&&e.onBussinessVerificatonFailed.emit("true"),!1!==(null==n?void 0:n.isVerifiedUser)&&e.safeSetVerifiedUserFlagStateVal(n,!0)):(e.onBussinessVerificatonFailed.emit("true"),e.safeSetVerifiedUserFlagStateVal(n,!1));case 2:case"end":return t.stop()}},t)}))()}},{key:"findByEmail",value:function(e){var t="where[email]=".concat(e,"&where[agreement]=true ");return this.http.get("".concat(this.updSNAEnvURL("v6"),"users/count?").concat(t)).pipe((0,d.U)(function(e){return e},(0,p.q)(1)))}},{key:"findByPhone",value:function(e){var t="where[cellnumber]=".concat(e,"&where[agreement]=true ");return this.http.get("".concat(this.updSNAEnvURL("v6"),"users/count?").concat(t)).pipe((0,d.U)(function(e){return e},(0,p.q)(1)))}},{key:"findByCRNumber",value:function(e){var t="userbusinesses/checkCrNumber?merchantregisterationnumber=".concat(e);return this.http.get("".concat(this.updSNAEnvURL("v5")).concat(t)).pipe((0,d.U)(function(e){return e},(0,p.q)(1)))}},{key:"getProductList",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"created",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"DESC",i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return this.encryptUrl({token:m.N.staticAPIToken,merchantid:e,isdisplayinpanel:1,order:[t+" "+n]},i)}},{key:"encryptUrl",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n={text:e};return t&&(n.skipVPNCheck=t),this.http.post("".concat(m.N.encryptUrlNormal),n).pipe((0,d.U)(function(e){return e.key}))}},{key:"encryptData",value:function(e){return this.http.post("".concat(m.N.apiUrlv7,"products/getstaticpageproducts"),{data:e,skipVPNCheck:"1"}).pipe((0,d.U)(function(e){return e}))}},{key:"createEncryptedText",value:function(e){return this.http.post("".concat(m.N.encryptUrl),e)}},{key:"updateCurrentUser",value:function(e,t){var n=this;return(0,i.Z)(regeneratorRuntime.mark(function i(){var r;return regeneratorRuntime.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return(r=n.currentUserValue)[e]=t,n.currentUserSubject.next(r),n.currentUserSubject.complete(),i.next=6,n.setData("currentUser",r);case 6:case"end":return i.stop()}},i)}))()}},{key:"updateLoginUser",value:function(e,t){var n=this;return(0,i.Z)(regeneratorRuntime.mark(function i(){var r;return regeneratorRuntime.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:if(void 0===t){i.next=7;break}return(r=n.loginUserValue||{})[e]=t,n.LoginUserSubject.next(r),n.LoginUserSubject.complete(),i.next=7,n.setData("loginUser",r);case 7:case"end":return i.stop()}},i)}))()}},{key:"changeCurrentUser",value:function(e){var t=this;return(0,i.Z)(regeneratorRuntime.mark(function n(){var r,a,s;return regeneratorRuntime.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return null!=(r=e)&&r.parentmerchantId&&(r.isSwitchChild=!0),t.currentUserSubject.next(r),t.currentUserSubject.complete(),n.next=6,t.setData("currentUser",r);case 6:a=(0,o.H)(5e3),t.getMetaPrefData_Direct().pipe((0,v.R)(a)
1).subscribe({next:function(e){var n;null!=e&&e.error?t._toster.error(null==e||null===(n=e.error)||void 0===n?void 0:n.message):(t.safeAssignUserMetaPrefFieldsVal(r,e),r&&(t.currentUserSubject.next(r),t.currentUserSubject.complete(),t.setDataWthoutPromise("currentUser",r)),window.location.href="/dashboard/pos-default")},error:(s=(0,i.Z)(regeneratorRuntime.mark(function e(n){var i,r,a;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:t._toster.error((null==n||null===(i=n.error)||void 0===i||null===(r=i.error)||void 0===r?void 0:r.message)||(null==n||null===(a=n.error)||void 0===a?void 0:a.message));case 1:case"end":return e.stop()}},e)})),function(e){return s.apply(this,arguments)})}),t.getVerifications();case 8:case"end":return n.stop()}},n)}))()}},{key:"writeErrorLog",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=this;return(0,i.Z)(regeneratorRuntime.mark(function i(){return regeneratorRuntime.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,r.safeWriteErrorLogCustom(e,t,n);case 2:return i.abrupt("return",i.sent);case 3:case"end":return i.stop()}},i)}))()}},{key:"safeWriteErrorLogCustom",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=this;return(0,i.Z)(regeneratorRuntime.mark(function i(){var a,o,s;return regeneratorRuntime.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return i.prev=0,o=localStorage.getItem("currUserMob"),s={type:"".concat(t),url:"".concat(n),merId:"".concat((null===(a=r.currentUserValue)||void 0===a?void 0:a.SadadId)||o||""),logData:e,ipAdd:r.currIpAdd},i.next=5,(0,u.n)(r.http.post("".concat(m.N.logFastifyUrl),JSON.stringify(s)).pipe((0,h.K)(function(){return(0,c.of)(null)})));case 5:return i.abrupt("return",i.sent);case 8:return i.prev=8,i.t0=i.catch(0),i.abrupt("return",null);case 11:case"end":return i.stop()}},i,null,[[0,8]])}))()}},{key:"safeAssignUserMetaPrefFieldsVal",value:function(e,t){if(e&&t){var n=Array.isArray(t)?t[0]:t;n&&(null!=n&&n.previouslogindatetime&&(e.previouslogindatetime=null==n?void 0:n.previouslogindatetime),void 0!==(null==n?void 0:n.isallowedtomangeprivatepublicaccess)&&(e.isallowedtomangeprivatepublicaccess=null==n?void 0:n.isallowedtomangeprivatepublicaccess),void 0!==(null==n?void 0:n.isallowedtoaddsubmerchant)&&(e.isallowedtoaddsubmerchant=null==n?void 0:n.isallowedtoaddsubmerchant))}}},{key:"updSNAEnvURL",value:function(e){var t,n="def-".concat(e);return t=m.N.apiUrlv7,n="".concat(n," + ").concat(t),t}},{key:"updSNAEnvData",value:function(e,t){var n="def-".concat(t);return e.apiVer="v7",n="".concat(n," + ").concat(e),e}},{key:"getMultiTabDynamicSessionKeyVal",value:function(){var e,t,n,i;return null!==(e=localStorage)&&void 0!==e&&e.removeItem("sadad_dyn_session_key"),null!==(t=sessionStorage)&&void 0!==t&&t.removeItem("sadad_dyn_session_key"),btoa((null===(n=window)||void 0===n||null===(i=n.location)||void 0===i?void 0:i.host)+"_sadad_dyn_key")}},{key:"getDynamicLocalStorageSessionKey",value:function(){return this.getMultiTabDynamicSessionKeyVal()}},{key:"isAuthLoginPagePathCheck",value:function(){var e,t,n,i,r,a=(null===(e=window)||void 0===e||null===(t=e.location)||void 0===t?void 0:t.pathname)||"",o=(null===(n=window)||void 0===n||null===(i=n.location)||void 0===i?void 0:i.href)||"",s=(null===(r=this.router)||void 0===r?void 0:r.url)||"";return(null==a?void 0:a.includes("/auth/login"))||"/auth"===a||"/"===a||(null==o?void 0:o.includes("/auth/login"))||(null==s?void 0:s.includes("/auth/login"))||"/auth"===s||"/"===s}},{key:"checkAndRedirectLoggedInUserSession",value:function(){var e=this.getData("currentUser");if(e&&(null!=e&&e.isVerifiedUser||null!=e&&e.SadadId||null!=e&&e.cellnumber||null!=e&&e.id&&null!=e&&e.roleId)&&this.isAuthLoginPagePathCheck()){var t,n;this.currentUserSubject.next(e);var i=(null===(t=localStorage)||void 0===t?void 0:t.getItem("serType"))||"pos";return null!==(n=this.router)&&void 0!==n&&n.navigate(["/dashboard/".concat(i,"-default")]),!0}return!1}},{key:"checkAlreadyLoggedInBeforeSubmit",value:function(){var e=this.getData("currentUser");if(e&&(null!=e&&e.isVerifiedUser||null!=e&&e.SadadId||null!=e&&e.cellnumber||null!=e&&e.id&&null!=e&&e.roleId)){var t,n;this.currentUserSubject.next(e);var i=(null===(t=localStorage)||void 0===t?void 0:t.getItem("serType"))||"pos";return null!==(n=this.router)&&void 0!==n&&n.navigate(["/dashboard/".concat(i,"-default")]),!0}return!1}},{key:"getFastifyPayloadEncryptionKey",value:function(){var e;return null===(e=this.loginUserValue)||void 0===e?void 0:e.fastifyEncryptionKey}},{key:"postFeatureFlag",value:function(e){return this.http.post("".concat(m.N.apiUrlv7,"feature-flags"),{flag:e})}},{key:"getFeatureFlag",value:function(e){var t;return t=Array.isArray(e)?e.map(function(e){return"flag=".concat(e)}).join("&"):"flag=".concat(e),this.http.get("".concat(m.N.apiUrlv7,"feature-flags?").concat(t))}},{key:"getUserProfile",value:function(){return this.http.get("".concat(m.N.apiUrlv7,"users/get_profile"))}},{key:"safeDecryptFastifyData",value:function(e,t){if(!e)return e;var n=t||this.getFastifyPayloadEncryptionKey(),i=null;try{var r;i=null===(r=this.injector)||void 0===r?void 0:r.get(_.$)}catch(s){}if(!n)return this.handleDecryptFailError({errCodeVal:"E-101",commonHelperServiceVal:i});try{var a,o=null===(a=f.AES.decrypt(e,n))||void 0===a?void 0:a.toString(f.enc.Utf8);return o?JSON.parse(o):this.handleDecryptFailError({errCodeVal:"E-102",commonHelperServiceVal:i})}catch(c){return this.handleDecryptFailError({errCodeVal:"E-103",commonHelperServiceVal:i,logErrVal:c})}}},{key:"handleDecryptFailError",value:function(e){var t=e.errCodeVal,n=e.commonHelperServiceVal,i=e.logErrVal,r=void 0===i?null:i,a=(0,y.tk)({errCodeVal:t});return r?console.error("safeDecryptFastifyData error:",r,a):console.warn("safeDecryptFastifyData:",a),n&&n.disTransErrMsg(a),{statusCode:400,errCode:t,message:a,error:{message:a,statusCode:400,errCode:t}}}},{key:"safeSetVerifiedUserFlagStateVal",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return e&&"object"==typeof e&&(e.isVerifiedUser=t),e}}]),e}();return e.\u0275fac=function(t){return new(t||e)(r.LFG(S.eN),r.LFG(b.o),r.LFG(r.zs3),r.LFG(w.F0))},e.\u0275prov=r.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e}()},63908:function(e,t,i){"use strict";i.d(t,{$:function(){return I}});var a=i(16304),o=i(35366),c=i(42693),u=i(529),d=i(91681),p=i(51816),v=i(32041),h=i(29609),g=i(35379),m=i(82051),f=i(52105),_=i(34115),y=i(60649),S=i(54391),b=i(17444),w=i(99624),I=function(){var e=function(){function e(t,n,i,r,a,c,l){var u=this;s(this,e),this._authService=t,this.toastr=n,this.http=i,this.translate=r,this.router=a,this._snackBar=c,this.sanitizer=l,this.onInstanceRTLSelection=new o.vpe,this.ipRegex=/^(?:(?:^|(?<=\s))(?:[0-9]{1,3}\.){3}[0-9]{1,3}
1|(?:(?:(?:[0-9a-fA-F]){1,4}:){7}(?:[0-9a-fA-F]){1,4}))(?=$|(?=\s))/,this.baseURL=window.location.origin,this.getTranslate(),this.translate.onLangChange.subscribe(function(e){u.getTranslate()})}return l(e,[{key:"getTranslate",value:function(){var e=this;this.translate.get(["ERROR","SUCCESS","OK","FILE_TOO_LARGE_MAX_SIZE"]).subscribe(function(t){e.language_text=t})}},{key:"disTransErrMsg",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=(t.okmsg,t.duration),i=void 0===n?3e3:n,r=t.position,a=void 0===r?"":r,o=this.handleServiceUnavailableError(e);if(o?e=o:this.checkNetConnErr(e)&&(e="INTERNET_CONNECTIVITY_ERROR"),e){var s=this.getSafeInstantTranslationKeyVal(e);this.toastr.error(s||"".concat(this.getLangTextSafeCustom("ERROR","ERROR","\u062e\u0637\u0623"),"!"),this.getLangTextSafeCustom("OK","OK","\u062d\u0633\u0646\u0627\u064b"),i,a)}else this.toastr.error(e||"".concat(this.getLangTextSafeCustom("ERROR","ERROR","\u062e\u0637\u0623"),"!"),this.getLangTextSafeCustom("OK","OK","\u062d\u0633\u0646\u0627\u064b"),i,a)}},{key:"disTransSuccMsg",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"OK",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:3e3,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},a=this.getSafeInstantTranslationKeyVal(t)||"OK";if(e){var o=this.getSafeInstantTranslationKeyVal(e,r||{});this.toastr.success(o||"".concat(this.getLangTextSafeCustom("SUCCESS","SUCCESS","\u0646\u0627\u062c\u062d\u0629"),"!"),this.getLangTextSafeCustom("OK","OK","\u062d\u0633\u0646\u0627\u064b"),n,i)}else this.toastr.success(e||"".concat(this.getLangTextSafeCustom("SUCCESS","SUCCESS","\u0646\u0627\u062c\u062d\u0629"),"!"),a,n,i)}},{key:"disDynmcTransSuccMsg",value:function(e){var t=e.resSuccMsg,n=e.okmsg,i=void 0===n?"OK":n,r=e.duration,a=void 0===r?3e3:r,o=e.dynText,s=void 0===o?null:o,c=e.actType,l=void 0===c?"":c,u=e.position,d=void 0===u?"":u,p=this.getSafeInstantTranslationKeyVal(i)||"OK";if(t){var v;v=s?this.getSafeInstantTranslationKeyVal(t,s):this.getSafeInstantTranslationKeyVal(t),this.toastr.success(v||"".concat(this.getLangTextSafeCustom("SUCCESS","SUCCESS","\u0646\u0627\u062c\u062d\u0629"),"!"),p,a,l,d)}else this.toastr.success(t||"".concat(this.getLangTextSafeCustom("SUCCESS","SUCCESS","\u0646\u0627\u062c\u062d\u0629"),"!"),p,a,l,d)}},{key:"disDynmcTransErrMsg",value:function(e){var t=e.resErrMsg,n=(e.okmsg,e.duration),i=void 0===n?3e3:n,a=e.dynText,o=void 0===a?null:a,s=e.position,c=void 0===s?"":s,l=this.handleServiceUnavailableError(t);if(l?t=l:this.checkNetConnErr(t)&&(t="INTERNET_CONNECTIVITY_ERROR"),t){var u=this.getSafeInstantTranslationKeyVal(t);if(o&&u)for(var d=0,p=Object.entries(o);d<p.length;d++){var v=r(p[d],2),h=v[0],g=v[1];u=u.replace(h,"".concat(null!=g?g:""))}this.toastr.error(u||"".concat(this.getLangTextSafeCustom("ERROR","ERROR","\u062e\u0637\u0623"),"!"),this.getLangTextSafeCustom("OK","OK","\u062d\u0633\u0646\u0627\u064b"),i,c)}else this.toastr.error(t||"".concat(this.getLangTextSafeCustom("ERROR","ERROR","\u062e\u0637\u0623"),"!"),this.getLangTextSafeCustom("OK","OK","\u062d\u0633\u0646\u0627\u064b"),i,c)}},{key:"disTransAPIErrMsg",value:function(e){var t,n,i,r,a,o,s=this.getCurrLang(),c=(null==e||null===(t=e.error)||void 0===t?void 0:t.message)||(null==e||null===(n=e.error)||void 0===n||null===(i=n.error)||void 0===i?void 0:i.message)||(null==e?void 0:e.message),l=(null==e||null===(r=e.error)||void 0===r?void 0:r.arabicMessage)||(null==e||null===(a=e.error)||void 0===a||null===(o=a.error)||void 0===o?void 0:o.arabicMessage)||(null==e?void 0:e.arabicMessage);"ar"==s&&l?this.toastr.error(l,this.getLangTextSafeCustom("OK","OK","\u062d\u0633\u0646\u0627\u064b")):this.disTransErrMsg(c)}},{key:"createFastifyPostData",value:function(e){var t={};if(-1!==e.indexOf("?")){var n=[],i=e.split("?")[0];t.name=i;var r=e.split("?")[1].replace(/filter/g,"");r&&r.split("&").forEach(function(e){return n.push({key:e.split("=")[0],value:e.split("=")[1]})}),t.filters=n}return t}},{key:"setCustomerDetails",value:function(e){var t,n,i,r,a,o,s,c,l="",u="",d="";return e.senderId&&(null===(t=e.senderId)||void 0===t?void 0:t.id)===this._authService.currentUserValue.id?c=e.receiverId:e.receiverId&&(null===(n=e.receiverId)||void 0===n?void 0:n.id)===this._authService.currentUserValue.id&&(c=e.senderId),c?(l=(null===(i=c)||void 0===i?void 0:i.name)||"",u=(null===(r=c)||void 0===r?void 0:r.cellnumber)||"",d=(null===(a=c)||void 0===a?void 0:a.email)||""):(u=(null===(o=e.guestuser)||void 0===o?void 0:o.cellnumber)||"",d=(null===(s=e.guestuser)||void 0===s?void 0:s.email)||"",l="guest"),e.customerName=l,e.customerMob=u,e.customerEmail=d,e}},{key:"setCustomerDetailsPayments",value:function(e){var t,n,i,r,a,o,s,c,l,u,d,p="",v="",h="",g=this._authService.currentUserValue;return e.senderId&&(null===(t=e.senderId)||void 0===t?void 0:t.id)===(1==g.roleId?g.id:g.mainMerchantId)?d=e.receiverId:e.receiverId&&(null===(n=e.receiverId)||void 0===n?void 0:n.id)===(1==g.roleId?g.id:g.mainMerchantId)&&(d=e.senderId),null!=e&&e.invoice?(p=(null==e||null===(i=e.invoice)||void 0===i?void 0:i.clientname)||"",v=(null==e||null===(r=e.invoice)||void 0===r?void 0:r.cellno)||"",h=(null==e||null===(a=e.invoice)||void 0===a?void 0:a.emailaddress)||""):d?(p=(null===(o=d)||void 0===o?void 0:o.name)||"",v=(null===(s=d)||void 0===s?void 0:s.cellnumber)||"",h=(null===(c=d)||void 0===c?void 0:c.email)||""):(p="guest",v=(null===(l=e.guestuser)||void 0===l?void 0:l.cellnumber)||"",h=(null===(u=e.guestuser)||void 0===u?void 0:u.email)||""),e.customerName=p,e.customerMob=v,e.customerEmail=h,e}},{key:"setCustomerDetailsPayments_backup",value:function(e){var t,n,i,r,a,o,s,c,l,u,d,p="",v="",h="";return e.senderId&&(null===(t=e.senderId)||void 0===t?void 0:t.id)===this._authService.currentUserValue.id?d=e.receiverId:e.receiverId&&(null===(n=e.receiverId)||void 0===n?void 0:n.id)===this._authService.currentUserValue.id&&(d=e.senderId),d?(p=(null===(i=d)||void 0===i?void 0:i.name)||"",v=(null===(r=d)||void 0===r?void 0:r.cellnumber)||"",h=(null===(a=d)||void 0===a?void 0:a.email)||""):null!=e&&e.invoice?(p=(null==e||null===(o=e.invoice)||void 0===o?void 0:o.clientname)||"",v=(null==e||null===(s=e.invoice)||void 0===s?void 0:s.cellno
1)||"",h=(null==e||null===(c=e.invoice)||void 0===c?void 0:c.emailaddress)||""):(p="guest",v=(null===(l=e.guestuser)||void 0===l?void 0:l.cellnumber)||"",h=(null===(u=e.guestuser)||void 0===u?void 0:u.email)||""),e.customerName=p,e.customerMob=v,e.customerEmail=h,e}},{key:"setPayMethodLogo",value:function(e){var t=e.nativeElement.querySelectorAll(".payMethodSelect .ng-option-label"),n=["Visa","Master Card","AMEX","JCB","UPI","Sadad Pay","Apple Pay","Google Pay","Token","Himyan"],i=["\u0641\u064a\u0632\u0627","\u0645\u0627\u0633\u062a\u0631\u0643\u0627\u0631\u062f","\u0627\u0645\u0631\u064a\u0643\u0627\u0646 \u0627\u0643\u0633\u0628\u0631\u0633","JCB","UPI","\u0645\u062d\u0641\u0638\u0629 \u0633\u062f\u0627\u062f","\u0627\u0628\u0644 \u0628\u0627\u064a","\u062c\u0648\u062c\u0644 \u0628\u0627\u064a","\u0631\u0645\u0632","\u0647\u0645\u064a\u0627\u0646"];t.forEach(function(e){var t=e.innerText;if(i.includes(t)){var r=i.indexOf(t);-1!=r&&(t=n[r])}var a=20,o=50;"visa"==(t=t.toLowerCase().replace(" ","-"))?a=13:"upi"==t?a=16:"amex"==t?a=26:"apple-pay"==t?a=14:"himyan"==t&&(o=53),e.innerHTML='<img width="'.concat(o,'" height="').concat(a,'" src="assets/images/pos-panel/payment-methods/').concat(t,'.svg"> ').concat(e.innerHTML)})}},{key:"getLimits",value:function(e){var t={name:"usercommissions/userMinMaxSetting",method:"POST",data:{userId:"".concat(1===this._authService.currentUserValue.roleId?this._authService.currentUserValue.id:this._authService.currentUserValue.mainMerchantId),id:e}};return this.http.post("".concat(this._authService.updSNAEnvURL("v5")).concat(t.name),t.data).pipe((0,d.U)(function(e){return null!=e.value?e.value:"0"}))}},{key:"isInYearRange",value:function(e){var t=new Date(e.split("/")[0]),n=new Date(e.split("/")[1]),i=Math.abs(n.getTime()-t.getTime());return!(Math.ceil(i/864e5)>365)}},{key:"convertDateParaToFilterdata",value:function(e,t){var n,i,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"YYYY-MM-DD",a=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return"today"==e?(n=h().startOf("day").format(r),t.date=n+"/"):"yesterday"==e?(n=h().subtract(1,"days").startOf("day").format(r),t.date=n+"/"):"week"==e?(n=h().subtract(6,"days").startOf("day").format(r),i=h().endOf("day").format(r),t.date=n+"/"+i):"month"==e?(n=h().subtract(1,"month").startOf("day").format(r),i=h().endOf("day").format(r),t.date=n+"/"+i):"year"==e?(n=h().subtract(1,"year").startOf("day").format(r),i=h().endOf("day").format(r),t.date=n+"/"+i):"6_month"==e?(n=h().subtract(6,"months").startOf("day").format(r),i=h().endOf("day").format(r),t.date=n+"/"+i):(e.includes("/")&&(n=e.split("/")[0],i=e.split("/")[1],a&&(n=h(n).format(r),i&&(i=h(i).format(r)))),t.date=e),[t,n,i]}},{key:"decodeHtmlEntity",value:function(e){return(new DOMParser).parseFromString(e,"text/html").documentElement.textContent}},{key:"formatBytes",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;if(0===e)return"0 Bytes";var n=t<0?0:t,i=Math.floor(Math.log(e)/Math.log(1024));return parseFloat((e/Math.pow(1024,i)).toFixed(n))+" "+["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"][i]}},{key:"checkPDFValidation",value:function(e){var t=e.name.split(".")[e.name.split(".").length-1];if(["application/pdf"].includes(e.type)&&"pdf"==t.toLowerCase()){if(!(e.size>26214400))return!0;this.disTransErrMsg("PDF_TOO_LARGE_MAX_26MB")}else this.disTransErrMsg("JPED_JPG_PNG_ALLOWED");return!1}},{key:"checkPDFImageValidation",value:function(e){var t,n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"JPEG_JPG_PNG_PDF_ALLOWED",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"all",a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:30485760,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:30,s=e.name.split(".")[e.name.split(".").length-1];if("img"==r?(t=["image/jpg","image/jpeg","image/png","image/JPG","image/JPEG"],n=["jpeg","png","jpg"]):"pdf"==r?(t=["application/pdf"],n=["pdf"]):(t=["image/jpg","image/jpeg","image/png","image/JPG","image/JPEG","application/pdf"],n=["pdf","jpeg","png","jpg"]),t.includes(e.type)&&n.includes(s)){if(!(e.size>a))return!0;this.disTransErrMsg(this.language_text.FILE_TOO_LARGE_MAX_SIZE.replace("dynamic_field_a",o))}else this.disTransErrMsg(i);return!1}},{key:"getNgSelectItemsTrans",value:function(e,t){return this.safeGetNgSelectItemsTransCustom(e,t)}},{key:"safeGetNgSelectItemsTransCustom",value:function(e,t){if(!e||!Array.isArray(e))return Array.isArray(e)?JSON.parse(JSON.stringify(e)):[];if(!t||"object"!=typeof t)return JSON.parse(JSON.stringify(e));try{var n=JSON.parse(JSON.stringify(e));
1return n.forEach(function(e){var n=null==e?void 0:e.code;e&&n&&"string"==typeof n&&(null==t?void 0:t[n])&&(e.label=null==t?void 0:t[n])}),n}catch(i){return Array.isArray(e)?e:[]}}},{key:"bankMapLogo",value:function(e){switch(e){case"QNBA":return"assets/images/bank/qnb.png";case"ABQQ":return"assets/images/bank/ahlibank.png";case"KLJI":return"assets/images/bank/akcb.png";case"CBQA":return"assets/images/bank/cbq-bank.png";case"DOHB":return"assets/images/bank/doha-bank.png";case"MAFR":return"assets/images/bank/mar.png";case"QISB":return"assets/images/bank/qib.png";case"QIIB":return"assets/images/bank/qiib.png";case"UNIL":return"assets/images/bank/unil.jpeg";case"IBOQ":return"assets/images/bank/QISB.jpeg";case"BRWA":return"assets/images/bank/BRWA.png";case"MSHQ":return"assets/images/bank/MSHQ.png";case"BBME":return"assets/images/bank/HSBCQA.png";case"BSIR":return"assets/images/bank/BSIR.png";case"ARAB":return"assets/images/bank/BADEA.png";default:return""}}},{key:"getCurrLang",value:function(){var e=this.translate.getDefaultLang(),t=localStorage.getItem("selectedLang");return["en","ar"].includes(t)||localStorage.setItem("selectedLang",e),localStorage.getItem("selectedLang")?e=localStorage.getItem("selectedLang"):(localStorage.setItem("selectedLang",e),e=this.translate.getDefaultLang()),this.translate.setDefaultLang(e),e}},{key:"getMerchantUserNameList",value:function(){return this.http.get("".concat(this._authService.updSNAEnvURL("v5"),"users/getsubuserNames"))}},{key:"isDateExpired",value:function(e,t){var n=h(),i=h(e,t);return console.log("[isDateExpired] now dtobj :",n,i),n>i}},{key:"getFileBlob",value:function(e){return this.http.get("".concat(e),{observe:"response",responseType:"blob"}).pipe((0,d.U)(function(e){return new Blob([e.body])}))}},{key:"logFirebaseEvent",value:function(e,t){console.log("logFirebaseEvent call:",e,t),this.trackGa4CustomEvent(e,t),console.log("logFirebaseEvent done:",e,t)}},{key:"trackGa4CustomEvent",value:function(e,t,i){try{var r,a;"undefined"!=typeof window&&(null===(r=window)||void 0===r?void 0:r.gtag)&&(null===(a=window)||void 0===a||a.gtag("event",e,n({component:t},i||{})))}catch(o){}}},{key:"logPanelEvent",value:function(e,t,n){var i=(u.N.apiUrlv7||"").replace(/\/?$/,"/");this.http.post("".concat(i,"firebase/events"),{event_name:e,component:t,params:n||{}}).pipe((0,p.K)(function(e){return(0,v.of)(null)})).subscribe()}},{key:"convertRelativeUriToFile",value:function(e,t,n){return(0,a.Z)(regeneratorRuntime.mark(function i(){var r,a;return regeneratorRuntime.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return n=n||"image/".concat(e.split(".")[e.split(".").length-1]),i.next=3,fetch(e);case 3:return r=i.sent,i.next=6,r.arrayBuffer();case 6:return a=i.sent,i.abrupt("return",new File([a],t,{type:n}));case 8:case"end":return i.stop()}},i)}))()}},{key:"getDiffDays",value:function(e){var t=h(e).startOf("day"),n=h().startOf("day");return t.diff(n,"days")}},{key:"redirectToRoute",value:function(e){this.router.navigateByUrl(e)}},{key:"checkOneYearValidation",value:function(e){var t=r(e.split("/"),2),n=t[0],i=t[1],a=!1;if(i){var o=new Date(n),s=new Date(i),c=new Date(o);c.setFullYear(c.getFullYear()+1),s>c&&(this.disTransErrMsg("DATE_RANGE_NOT_MORE_THAN_YEAR"),a=!0)}return a}},{key:"getMonthRange",value:function(e){var t=new Date,n=new Date;n.setDate(n.getDate()-e);var i=function(e){return"".concat(e.getFullYear(),"-").concat(String(e.getMonth()+1).padStart(2,"0"),"-").concat(String(e.getDate()).padStart(2,"0"))};return"".concat(i(n),"/").concat(i(t))}},{key:"updateDownRprtIds",value:function(e){var t,n,i,r,a,o,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];console.log("updateDownRprtIds start:",null===(t=this._authService)||void 0===t||null===(n=t.loginUserValue)||void 0===n?void 0:n.downRprtIds);var c=(null===(i=this._authService)||void 0===i||null===(r=i.loginUserValue)||void 0===r?void 0:r.downRprtIds)||[];"add"===e?s.forEach(function(e){e&&!c.includes(e)&&c.push(e)}):"remove"===e?s.length>0&&(c=c.filter(function(e){return!s.includes(e)})):"removeAll"===e&&(c=[]),this._authService.updateLoginUser("downRprtIds",c),console.log("updateDownRprtIds end:",null===(a=this._authService)||void 0===a||null===(o=a.loginUserValue)||void 0===o?void 0:o.downRprtIds)}},{key:"updateReqDeliveryPollIds",value:function(e){var t,n,i,r,a,o,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];console.log("updateReqDeliveryPollIds start:",null===(t=this._authService)||void 0===t||null===(n=t.loginUserValue)||void 0===n?void 0:n.reqDeliveryPollIds);var c=(null===(i=this._authService)||void 0===i||null===(r=i.loginUserValue)||void 0===r?void 0:r.reqDeliveryPollIds)||[];
1"add"===e?s.forEach(function(e){e&&!c.includes(e)&&c.push(e)}):"remove"===e?s.length>0&&(c=c.filter(function(e){return!s.includes(e)})):"removeAll"===e&&(c=[]),this._authService.updateLoginUser("reqDeliveryPollIds",c),console.log("updateReqDeliveryPollIds end:",null===(a=this._authService)||void 0===a||null===(o=a.loginUserValue)||void 0===o?void 0:o.reqDeliveryPollIds)}},{key:"updateDownStmtIds",value:function(e){var t,n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=(null===(t=this._authService)||void 0===t||null===(n=t.loginUserValue)||void 0===n?void 0:n.downStmtIds)||[];"add"===e?i.forEach(function(e){e&&!r.includes(e)&&r.push(e)}):"remove"===e?i.length>0&&(r=r.filter(function(e){return!i.includes(e)})):"removeAll"===e&&(r=[]),this._authService.updateLoginUser("downStmtIds",r)}},{key:"detectFileType",value:function(e){return e.length<4?"unknown":37===e[0]&&80===e[1]&&68===e[2]&&70===e[3]?"pdf":137===e[0]&&80===e[1]&&78===e[2]&&71===e[3]?"png":80===e[0]&&75===e[1]?"xlsx":"csv"}},{key:"getFileTypeFromBlob",value:function(e){var t=this;return(0,a.Z)(regeneratorRuntime.mark(function n(){var i,r;return regeneratorRuntime.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,e.arrayBuffer();case 2:return i=n.sent,r=new Uint8Array(i),n.abrupt("return",t.detectFileType(r));case 5:case"end":return n.stop()}},n)}))()}},{key:"toNumberOrNull",value:function(e){if(null==e)return null;if("string"==typeof e){var t=e.trim();if(!t)return null;var n=Number(t);return Number.isFinite(n)?n:null}return"number"==typeof e&&Number.isFinite(e)?e:null}},{key:"getRedirectURL",value:function(e,t){return"".concat(g.He[e].replace("VALUE_1",t))}},{key:"addBrowserInfo",value:function(e){var t=navigator.userAgent,i="Web Panel, ".concat(navigator.platform);return e instanceof FormData?(e.append("browser_info",t),e.append("device_name",i),e):n(n({},e),{},{browser_info:t,device_name:i})}},{key:"saveFile",value:function(e){var t=e.filePath,n=e.blobRes,i=e.clean,r=void 0!==i&&i,a=t.split("/").pop()||"";r&&(a=a.replace(/^\d+_/,"").replace(/_\d+$/,"").replace(/\.[^/.]+$/,"")),a=a.replace(/\.[^/.]+$/,"");var o=t.split(".").pop()||"";(0,m.saveAs)(n,"".concat(a,".").concat(o))}},{key:"getLangTextSafeCustom",value:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(null!==(t=this.language_text)&&void 0!==t&&t[e])return this.language_text[e];if("ar"===this.getCurrLang()){if(i)return i;if("OK"===e)return"\u062d\u0633\u0646\u0627\u064b";if("ERROR"===e)return"\u062e\u0637\u0623";if("SUCCESS"===e)return"\u0646\u0627\u062c\u062d\u0629"}return n||("OK"===e?"OK":"ERROR"===e?"ERROR":"SUCCESS"===e?"SUCCESS":e||"")}},{key:"createFileObjectUrl",value:function(e){var t=e.blob,n=e.sanitize,i=void 0!==n&&n,r=URL.createObjectURL(t);return i?this.sanitizer.bypassSecurityTrustResourceUrl(r):r}},{key:"getSafeInstantTranslationKeyVal",value:function(e,t){var n;if(!e||"string"!=typeof e||null==e||null===(n=e.trim)||void 0===n||!n.call(e))return"string"==typeof e?e:"";try{var i,r;return this.getTranslatedMessageWithCodeSuffix(e,t)||(null===(i=this.translate)||void 0===i||null===(r=i.instant)||void 0===r?void 0:r.call(i,e,t||{}))||e}catch(a){return e}}},{key:"getTranslatedMessageWithCodeSuffix",value:function(e,t){var n=e.match(/\s*\(Code:\s*([A-Z0-9-]+)\)/i);if(n){var i,r,a=e.replace(/\s*\(Code:\s*[A-Z0-9-]+\)/i,"").trim(),o=n[0];return"".concat((null===(i=this.translate)||void 0===i||null===(r=i.instant)||void 0===r?void 0:r.call(i,a,t||{}))||a).concat(o)}return null}},{key:"toggleRowAndChevron",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"up-chevron.png",i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"down-chevron.png";try{var r,a,o,s,c;null!=e&&null!==(r=e.target)&&void 0!==r&&null!==(a=r.parentElement)&&void 0!==a&&null!==(o=a.parentElement)&&void 0!==o&&null!==(s=o.parentElement)&&void 0!==s&&null!==(c=s.nextSibling)&&void 0!==c&&c.classList&&e.target.parentElement.parentElement.parentElement.nextSibling.classList.toggle("d-none"),(null==t?void 0:t.src)&&(t.src=-1===t.src.indexOf(i)?t.src.replace(n,i):t.src.replace(i,n))}catch(l){}}},{key:"checkNetConnErr",value:function(e){var t,n;return"undefined"!=typeof window&&!1===(null===(t=window)||void 0===t||null===(n=t.navigator)||void 0===n?void 0:n.onLine)||0===(null==e?void 0:e.status)||0==(null==e?void 0:e.status)||"HttpErrorResponse"===(null==e?void 0:e.name)&&(0===(null==e?void 0:e.status)||"Unknown Error"===(null==e?void 0:e.statusText))}},{key:"handleServiceUnavailableError",value:function(e){var t,n,i,r,a,o,s,c,l,u,d,p,v;if(!e)return null;var h="string"==typeof e?e:(null==e||null===(t=e.error)||void 0===t?void 0:t.message)||(null==e?void 0:e.error)||(null==e?void 0:e.message)||"",g=null==e?void 0:e.error,m=503===(null==e?void 0:e.status)||502===(null==e?void 0:e.status)||504===(null==e?void 0:e.status)||503===(null==e||null===(n=e.error)||void 0===n?void 0:n.status)||503===(null==e||null===(i=e.error)||void 0===i?void 0:i.statusCode),f="string"==typeof g&&((null==g||null===(r=g.includes)||void 0===r?void 0:r.call(g,"503 Service Temporarily Unavailable"))||(null==g||null===(a=g.includes)||void 0===a?void 0:a.call(g,"503 Service"))||(null==g||null===(o=g.includes)||void 0===o?void 0:o.call(g,"<html>"))||(null==g||null===(s=g.includes)||void 0===s?void 0:s.call(g,"<head>"))),_="string"==typeof h&&((null==h||null===(c=h.includes)||void 0===c?void 0:c.call(h,"503 Service Temporarily Unavailable"))||(null==h||null===(l=h.includes)||void 0===l?void 0:l.call(h,"503 Service"))||(null==h||null===(u=h.includes)||void 0===u?void 0:u.call(h,"Service Temporarily Unavailable"))||(null==h||null===(d=h.includes)||void 0===d?void 0:d.call(h,"Http failure response"))&&(null==h||null===(p=h.includes)||void 0===p?void 0:p.call(h,"503"))||(null==h||null===(v=h.includes)||void 0===v?void 0:v.call(h,"<html>")));return m||f||_?"SERVICE_TEMPORARILY_UNAVAILABLE":null}},{key:"generateIdempotencyKey",value:function(){var e,t,n,i;return"".concat((null===(e=this._authService)||void 0===e||null===(t=e.currentUserValue)||void 0===t?void 0:t.SadadId)||(null===(n=this._authService)||void 0===n||null===(i=n.currentUserValue)||void 0===i?void 0:i.id),"-").concat(Date.now(),"-").concat("xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))}},{key:"buildHttpHeaderOptions",value:function(e){var t={};if(e){var n=new c.WM,i=!1;Object.keys(e).forEach(function(t){e[t]&&(n=n.set(t,e[t]),i=!0)}),i&&(t.headers=n)}return t}},{key:"handleDownloadReceiptError",value:function(e){var t=this;return(0,a.Z)(regeneratorRuntime.mark(function n(){var i,r,a,o,s,c,l,u,d,p,v,h;return regeneratorRuntime.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(o="",n.prev=1,null==e||!e.error||"function"!=typeof(null==e||null===(s=e.error)||void 0===s?void 0:s.text)){n.next=9;break}return n.next=5,null==e||null===(l=e.error)||void 0===l?void 0:l.text();case 5:(u=n.sent)&&!u.trim().startsWith("<")&&(p=JSON.parse(u),o=(null==p||null===(d=p.error)||void 0===d?void 0:d.message)||(null==p?void 0:p.message)||""),n.next=10;break;case 9:"string"!=typeof(null==e?void 0:e.error)||null!=e&&null!==(c=e.error)&&void 0!==c&&c.trim().startsWith("<")||(h=JSON.parse(null==e?void 0:e.error),o=(null==h||null===(v=h.error)||void 0===v?void 0:v.message)||(null==h?void 0:h.message)||"");case 10:n.next=14;break;case 12:n.prev=12,n.t0=n.catch(1);case 14:o||(o=(null==e||null===(i=e.error)||void 0===i||null===(r=i.error)||void 0===r?void 0:r.message)||(null==e||null===(a=e.error)||void 0===a?void 0:a.message)||(null==e?void 0:e.message)||"INTERNAL_SERVER_ERROR"),t.disTransErrMsg(o);case 15:case"end":return n.stop()}},n,null,[[1,12]])}))()}}]),e}();return e.\u0275fac=function(t){return new(t||e)(o.LFG(f.$),o.LFG(_.o),o.LFG(c.eN),o.LFG(y.sK),o.LFG(S.F0),o.LFG(b.ux),o.LFG(w.H7))},e.\u0275prov=o.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e}()},73006:function(e,t,n){"use strict";n.d(t,{q:function(){return r}});var i=n(35366),r=function(){var e=function(){function e(){s(this,e)}return l(e,[{key:"patternValidator",value:function(){return function(e){return e.value?new RegExp("^[\u0621-\u064a-A-Za-z0-9&()_/. ]*$").test(e.value)?null:{invali
1dChars:!0}:null}}},{key:"MatchPassword",value:function(e,t){return function(n){var i=n.controls[e],r=n.controls[t];return i&&r?r.errors&&!r.errors.passwordMismatch?null:void r.setErrors(i.value!==r.value?{passwordMismatch:!0}:null):null}}},{key:"userNameValidator",value:function(e){var t=this;return new Promise(function(n){setTimeout(function(){t.validateUserName(e.value)?n({userNameNotAvailable:!0}):n(null)},1e3)})}},{key:"validateUserName",value:function(e){return["ankit","admin","user","superuser"].indexOf(e)>-1}}]),e}();return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=i.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e}()},98109:function(e,t,n){"use strict";n.d(t,{BR:function(){return E.B},$h:function(){return i.$},yS:function(){return q},p4:function(){return F},$P:function(){return r.$},qy:function(){return M.q},sp:function(){return d},Nc:function(){return Y},r6:function(){return f},q:function(){return S.q},oZ:function(){return Z},X5:function(){return V},gq:function(){return R},O0:function(){return b.O},Ce:function(){return T},Yx:function(){return _.Y},M5:function(){return I},rM:function(){return U},kg:function(){return G},Ay:function(){return j},RC:function(){return k.R},KP:function(){return y.K},Nk:function(){return B},br:function(){return J},xh:function(){return L}});var i=n(52105),r=n(63908),a=n(529),o=n(29609),c=n(35366),u=n(42693),d=function(){var e=function(){function e(t,n){s(this,e),this.http=t,this._authService=n,this.getId()}return l(e,[{key:"getId",value:function(){var e,t;return this.id=null===(e=this._authService)||void 0===e||null===(t=e.currentUserValue)||void 0===t?void 0:t.id,this.id}},{key:"getDashboardData",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.getId(),"/"==e&&(e="");var i={},r=a.N.apiUrl;if(i.name="transactions/allTxnCounters","allTxnCounters"==t?(i.name="transactions/allTxnCounters",r=a.N.apiUrlv7):"sourceWiseCounters"==t?(i.name="transactions/sourceWiseCounters",r=a.N.apiUrlv7):"splineChart"==t?(i.name="transactions/fetchTxnByCountByAmount",r=a.N.apiUrlv7):"barChart"==t?n?(i.name="terminals/terminalBatchBarChart",r=this._authService.updSNAEnvURL("v5")):(i.name="transactions/fetchTypeWiseAmount",r=a.N.apiUrlv7):"pieChart"==t?(i.name="transactions/cardTypePieChart",r=a.N.apiUrlv7):"payMethodChart"==t&&(i.name="transactions/paymentMethodChart",r=a.N.apiUrlv7),i.method="GET",e)if(e.includes("/")){var o=e.split("/");i.data=""!=o[1]?'filter[date]=custom&filter[between]=["'.concat(o[0],' 00:00:00", "').concat(o[1],' 23:59:59"]'):'filter[date]=custom&filter[between]=["'.concat(o[0],' 00:00:00", "').concat(o[0],' 23:59:59"]')}else i.data="filter[date]=".concat(e);else i.data="".concat(e);return n&&(i.data="barChart"!=t?"".concat(i.data,"&isPosTransaction=true"):i.data.replaceAll("date","datefilter")),this.http.get("".concat(r).concat(i.name,"?").concat(i.data))}},{key:"getPOSTerminalLocations",value:function(){return this.getId(),this.http.get("".concat(this._authService.updSNAEnvURL("v5"),"terminals/mapLocation"))}},{key:"getDateFormat",value:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"chart",i=" - ",r="D MMM'YY";return"batchreport"==n&&(r="DD MMM YYYY"),"batchsummryLabel"==n&&(r="DD-MM-YYYY",i=" to "),"today"==e?t=o().startOf("day").format(r):"yesterday"==e?t=o().subtract(1,"days").startOf("day").format(r):"week"==e?t=o().subtract(6,"days").startOf("day").format(r)+i+o().endOf("day").format(r):"month"==e?t=o().subtract(1,"month").startOf("day").format(r)+i+o().endOf("day").format(r):"6_month"==e?t=o().subtract(6,"months").startOf("day").format(r)+i+o().endOf("day").format(r):"year"==e?t=o().subtract(1,"year").startOf("day").format(r)+i+o().endOf("day").format(r):e.includes("/")&&(t=o(e.split("/")[0],"YYYY-MM-DD").format(r),e.split("/")[1]&&(t=t+i+o(e.split("/")[1],"YYYY-MM-DD").format(r))),t}}]),e}();return e.\u0275fac=function(t){return new(t||e)(c.LFG(u.eN),c.LFG(i.$))},e.\u0275prov=c.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e}();n(17884);var p=n(16304),v=n(9153),h=n(69056),g=n(32041),m=n(51816),f=function(){var e=function(){function e(t,n){s(this,e),this.http=t,this._authService=n}return l(e,[{key:"getMerchantHeaderDetails",value:function(){var e;this.getId();var t=null===(e=this._authService)||void 0===e?void 0:e.currentUserValue;return{sadadMerchantId:null==t?void 0:t.SadadId,sadadMainMerchantId:null==t?void 0:t.mainMerchantSadadId,merchantName:1==(null==t?void 0:t.roleId)?null==t?void 0:t.name:null==t?void 0:t.username,roleId:null==t?void 0:t.roleId}}},{key:"getPartnerPinNumber",value:function(){var e,t,n=this;this.getId();var i="filter[where][userId]=".concat(null===(e=this._authService)||void 0===e||null===(t=e.currentUserValue)||void 0===t?void 0:t.id,"&filter[fields][servicepin]=true");return this.http.get("".concat(this._authService.updSNAEnvURL("v5"),"usermetaauths?").concat(i)).pipe((0,m.K)(function(e){return n.handleSafeServicePinError_Header(e)}))}},{key:"getServicePin",value:function(){var e=this;return(0,p.Z)(regeneratorRuntime.mark(function t(){var n,i,r;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e.getId(),r="filter[where][userId]=".concat(null===(n=e._authService)||void 0===n||null===(i=n.currentUserValue)||void 0===i?void 0:i.id,"&filter[fields][servicepin]=true"),t.next=4,(0,v.n)(e.http.get("".concat(e._authService.updSNAEnvURL("v5"),"usermetaauths?").concat(r)).pipe((0,h.q)(1),(0,m.K)(function(t){return e.handleSafeServicePinError_Header(t)})));case 4:return t.abrupt("return",t.sent);case 5:case"end":return t.stop()}},t)}))()}},{key:"getPartnerLastLogin",value:function(){var e,t;this.getId();var n="filter[where][userId]=".concat(null===(e=this._authService)||void 0===e||null===(t=e.currentUserValue)||void 0===t?void 0:t.id,"&filter[fields][previouslogindatetime]=true&filter[fields][isallowedtomangeprivatepublicaccess]=true");return this.http.get("".concat(this._authService.updSNAEnvURL("v6"),"usermetapreferences?").concat(n))}},{key:"getId",value:function(){}},{key:"handleSafeServicePinError_Header",value:function(e){return(0,g.of)({error:e,statusCode:(null==e?void 0:e.status)||(null==e?void 0:e.statusCode)||403})}}]),e}();return e.\u0275fac=function(t){return new(t||e)(c.LFG(u.eN),c.LFG(i.$))},e.\u0275prov=c.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e}(),_=n(58858),y=n(27463),S=n(59642),b=n(6707),w=n(91681),I=function(){var e=function(){function e(t,n){s(this,e),this.http=t,this._authService=n}return l(e,[{key:"uploadImage",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=new FormData,i=t||e.name,r=i.lastIndexOf(".");return n.append("file",e,i.slice(0,r).replaceAll(".","_")+i.slice(r,i.length)),this.http.post("".concat(this._authService.updSNAEnvURL("v6"),"upload_image/api-product"),n).pipe((0,w.U)(function(e){return e}),(0,m.K)(function(e){return(0,g.of)(e)}))}},{key:"addProject",value:function(e){var t={name:"products",method:"POST"};return t.data=e,e.image&&(t.data.productmedia=[{name:e.image}]),delete e.image,t.data.merchantId=[14,16].includes(this._authService.currentUserValue.roleId)?this._authService.currentUserValue.mainMerchantId:this._authService.currentUserValue.id,t.data.createdby=[14,16].includes(this._authService.currentUserValue.roleId)?this._authService.currentUserValue.id:this._authService.currentUserValue.mainMerchantId,this.http.post("".concat(a.N.apiUrlv7).concat(t.name),t.data)}},{key:"editProductInfo",value:function(e,t){var n={};return n.name="products/".concat(t),n.method="PATCH",n.data=e,this.http.patch("".concat(a.N.apiUrlv7).concat(n.name),n.data)}},{key:"getProductListUpdated_",value:function(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"",o=arguments.length>6?arguments[6]:void 0,s="created DESC",c={},l='{"merchantId":'.concat(1===this._authService.currentUserValue.roleId?this._authService.currentUserValue.id:this._authService.currentUserValue.mainMerchantId,'},{"isRecurringProduct":"0"}'),u="";if(r&&""!=r)if("today"==r||"yesterday"==r||"week"==r||"month"==r||"year"==r)u=',"date":"'.concat(r,'"');else{var d=r.split("/");""!=d[1]?(e="".concat(d[0]," 00:00:00"),t="".concat(d[1]," 23:59:59")):(e="".concat(d[0]," 00:00:00"),t="".concat(d[0]," 23:59:59")),u=',"date":"custom", "between":["'.concat(e,'", "').concat(t,'"]')}o.prodName&&(l="".concat(l,',{"name":"').concat(o.prodName.trim(),'"}')),2==o.prodAmount.length&&(l="".concat(l,',{"price":{"between":[').concat(o.prodAmount[0],",").concat(o.prodAmount[1],"]}}")),o.inStock&&(l="".concat(l,',{"or":[{"totalavailablequantity":{"gt":"0"}},{"isUnlimited":true}]}')),o.outOfStock&&(l="".concat(l,',{"totalavailablequantity":{"lt":"1"}},{"isUnlimited":"0"}')),-1!=o.merUser&&null!=o.merUser&&(l="".concat(l,',{"createdby":"').concat(o.merUser,'"}')),-1!=o.shippingEnabledType&&null!=o.shippingEnabledType&&(l="".concat(l,',{"isShipping":"').concat(o.shippingEnabledType,'"}')),o.sortByDate&&(s="created DESC"),o.sortByPrice&&(s="price DESC"),o.sortByAvQty&&(s="totalavailablequantity DESC"),o.sortProdView&&(s="viewcount DESC"),o.sortName&&(s="name DESC");var p='"and":['.concat(l,"]");return c.name="products",c.method="GET",c.data='filter={"where":{'.concat(p,'},"skip": ').concat(i,',"limit": ').concat(n,',"order": ["').concat(s,'"],"include":"productmedia"').concat(u,"}"),this.http.get("".concat(a.N.apiUrlv7).concat(c.name,"?").concat(c.data))}},{key:"getDataCount_",value:function(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1?arguments[1]:void 0,r={},o='{"merchantId":'.concat(1===this._authService.currentUserValue.roleId?this._authService.currentUserValue.id:this._authService.currentUserValue.mainMerchantId,'},{"isRecurringProduct":"0"}'),s="";if(n&&""!=n)if("today"==n||"yesterday"==n||"week"==n||"month"==n||"year"==n)s=',"date":"'.concat(n,'"');else{var c=n.split("/");""!=c[1]?(e="".concat(c[0]," 00:00:00"),t="".concat(c[1]," 23:59:59")):(e="".concat(c[0]," 00:00:00"),t="".concat(c[0]," 23:59:59")),s=',"date":"custom", "between":["'.concat(e,'", "').concat(t,'"]')}i.prodName&&(o="".concat(o,',{"name":"').concat(i.prodName.trim(),'"}')),2==i.prodAmount.length&&(o="".concat(o,',{"price":{"between":[').concat(i.prodAmount[0],",").concat(i.prodAmount[1],"]}}")),i.inStock&&(o="".concat(o,',{"or":[{"totalavailablequantity":{"gt":"0"}},{"isUnlimited":true}]}')),i.outOfStock&&(o="".concat(o,',{"totalavailablequantity":{"lt":"1"}},{"isUnlimited":"0"}')),-1!=i.merUser&&null!=i.merUser&&(o="".concat(o,',{"createdby" : ').concat(i.merUser,"}")),-1!=i.shippingEnabledType&&null!=i.shippingEnabledType&&(o="".concat(o,',{"isShipping" : ').concat(i.shippingEnabledType,"}"));var l='"and":['.concat(o,"]");return r.name="products/count",r.method="GET",r.data="where={".concat(l).concat(s,"}"),this.http.get("".concat(a.N.apiUrlv7).concat(r.name,"?").concat(r.data))}},{key:"getCount",value:function(){var e=arguments.length>
13&&void 0!==arguments[3]?arguments[3]:"",t={name:"products/counts",method:"GET"};if(t.name+="?where[price][between][0]=0&where[price][between][1]=20000",e&&""!=e)if("today"==e||"yesterday"==e||"week"==e||"month"==e||"year"==e)t.name="".concat(t.name,"&where[date]=").concat(e);else{var n=e.split("/");t.name=""!=n[1]?"".concat(t.name,'&where[date]=custom&where[between]=["').concat(n[0],' 00:00:00", "').concat(n[1],' 23:59:59"]'):"".concat(t.name,'&where[date]=custom&where[between]=["').concat(n[0],' 00:00:00", "').concat(n[0],' 23:59:59"]')}return this.http.get("".concat(a.N.apiUrlv7).concat(t.name))}},{key:"deleteProduct",value:function(e){var t={};return t.name="products/".concat(e),t.method="DELETE",this.http.delete("".concat(this._authService.updSNAEnvURL("v5")).concat(t.name))}},{key:"editProduct",value:function(e,t){var n={};return n.name="products/".concat(t),n.method="PATCH",n.data=e,this.http.patch("".concat(this._authService.updSNAEnvURL("v5")).concat(n.name),n.data)}},{key:"exportProductsXLS",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=this._authService.updSNAEnvURL("v5")+"products/xlsxexport?filter[include]=productmedia";return e.prodAmount&&2==e.prodAmount.length&&(n+="&filter[where][price][lte]=".concat(e.prodAmount[1],"&filter[where][price][gte]=").concat(e.prodAmount[0])),e.sortByDate&&(n+="&filter[order]=created DESC"),t&&(n+="&filter[where][id]=".concat(t)),this.http.get("".concat(n),{observe:"response",responseType:"blob"}).pipe((0,w.U)(function(e){return new Blob([e.body])}))}},{key:"exportProductsCSV",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=this._authService.updSNAEnvURL("v5")+"products/xlsxexport?filter[include]=productmedia";return e.prodAmount&&2==e.prodAmount.length&&(n+="&filter[where][price][lte]=".concat(e.prodAmount[1],"&filter[where][price][gte]=").concat(e.prodAmount[0])),e.sortByDate&&(n+="&filter[order]=created DESC"),t&&(n+="&filter[where][id]=".concat(t)),this.http.get("".concat(n),{observe:"response",responseType:"blob"}).pipe((0,w.U)(function(e){return new Blob([e.body])}))}},{key:"exportProductsPDF",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=this._authService.updSNAEnvURL("v5")+"products/pdfexport?filter[include]=productmedia";return e.prodAmount&&2==e.prodAmount.length&&(n+="&filter[where][price][lte]=".concat(e.prodAmount[1],"&filter[where][price][gte]=").concat(e.prodAmount[0])),e.sortByDate&&(n+="&filter[order]=created DESC"),t&&(n+="&filter[where][id]=".concat(t)),this.http.get("".concat(n),{observe:"response",responseType:"blob"}).pipe((0,w.U)(function(e){return new Blob([e.body])}))}}]),e}();return e.\u0275fac=function(t){return new(t||e)(c.LFG(u.eN),c.LFG(i.$))},e.\u0275prov=c.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e}(),T=function(){var e=function(){function e(t,n){s(this,e),this.http=t,this._authService=n,this.OBProductId=new c.vpe,this.OBOrderId=new c.vpe}return l(e,[{key:"changeOrderStatus",value:function(e){var t={};return t.name="orders/".concat(e),t.method="PATCH",t.data={orderstatusId:2},this.http.patch("".concat(this._authService.updSNAEnvURL("v5")).concat(t.name),t.data)}},{key:"getAllOrderList",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"",a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"",o=arguments.length>7&&void 0!==arguments[7]?arguments[7]:-1,s=arguments.length>8&&void 0!==arguments[8]?arguments[8]:"",c=arguments.length>9&&void 0!==arguments[9]?arguments[9]:"",l={name:"orders",method:"GET",data:""},u=null===(e=this._authService)||void 0===e?void 0:e.currentUserValue;if(l.name+=14===(null==u?void 0:u.roleId)||16===(null==u?void 0:u.roleId)?"?filter[where][vendorId]=".concat(null==u?void 0:u.mainMerchantId):"?filter[where][vendorId]=".concat(null==u?void 0:u.id),i&&""!=i)if("today"==i||"yesterday"==i||"week"==i||"month"==i||"year"==i)l.name="".concat(l.name,"&filter[where][dateFilter]=").concat(i);else{var d=i.split("/");l.name=""!=d[1]?"".concat(l.name,'&filter[where][dateFilter]=custom&filter[where][between]=["').concat(d[0],' 00:00:00", "').concat(d[1],' 23:59:59"]'):"".concat(l.name,'&filter[where][dateFilter]=custom&filter[where][between]=["').concat(d[0],' 00:00:00", "').concat(d[0],' 23:59:59"]')}return r&&(l.name="".concat(l.name,"&filter[where][transactionNumber]=").concat(r)),a&&(l.name="".concat(l.name,"&filter[where][orderno][like]=%").concat(a,"%")),o&&-1!=o&&(l.name="".concat(l.name,"&filter[where][orderstatusId]=").concat(o)),s&&(l.name="".concat(l.name,"&filter[where][buyerName]=").concat(s)),c&&(l.name="".concat(l.name,"&filter[where][productname]=").concat(c)),l.name="".concat(l.name,"&filter[include][0]=transaction&filter[include][1]=customerId&filter[include][2]=orderstatus&filter[skip]=").concat(t,"&filter[limit]=").concat(n,"&filter[order]=created DESC"),this.http.get("".concat(this._authService.updSNAEnvURL("v5")).concat(l.name))}},{key:"getDataCount",value:function(){var e,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:-1,a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"",o=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"",s={},c=null===(e=this._authService)||void 0===e?void 0:e.currentUserValue;if(s.name="orders/count?where[vendorId]=".concat(1===(null==c?void 0:c.roleId)?null==c?void 0:c.id:null==c?void 0:c.mainMerchantId),s.method="GET",s.data="",t&&""!=t)if("today"==t||"yesterday"==t||"week"==t||"month"==t||"year"==t)s.name="".concat(s.name,"&[where][dateFilter]=").concat(t);else{var l=t.split("/");s.name=""!=l[1]?"".concat(s.name,'&[where][dateFilter]=custom&[where][between]=["').concat(l[0],' 00:00:00", "').concat(l[1],' 23:59:59"]'):"".concat(s.name,'&[where][dateFilter]=custom&[where][between]=["').concat(l[0],' 00:00:00", "').concat(l[0],' 23:59:59"]')}return n&&(s.name="".concat(s.name,"&[where][transactionNumber]=").concat(n)),i&&(s.name="".concat(s.name,"&[where][orderno][like]=%").concat(i,"%")),r&&-1!=r&&(s.name="".concat(s.name,"&[where][orderstatusId]=").concat(r)),a&&(s.name="".concat(s.name,"&[where][buyerName]=").concat(a)),o&&(s.name="".concat(s.name,"&[where][productname]=").concat(o)),this.http.get("".concat(this._authService.updSNAEnvURL("v5")).concat(s.name))}},{key:"getTypeCount",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n={name:"orders/counts",method:"GET",data:""},i=null===(e=this._authService)||void 0===e?void 0:e.currentUserValue;if(n.name+=14===(null==i?void 0:i.roleId)||16===(null==i?void 0:i.roleId)?"?where[vendorId]=".concat(null==i?void 0:i.mainMerchantId):"?where[vendorId]=".concat(null==i?void 0:i.id),t&&""!=t)if("today"==t||"yesterday"==t||"week"==t||"month"==t||"year"==t)n.name="".concat(n.name,"&where[dateFilter]=").concat(t);else{var r=t.split("/");n.name=""!=r[1]?"".concat(n.name,'&where[dateFilter]=custom&where[between]=["').concat(r[0],' 00:00:00", "').concat(r[1],' 23:59:59"]'):"".concat(n.name,'&where[dateFilter]=custom&where[between]=["').concat(r[0],' 00:00:00", "').concat(r[0],' 23:59:59"]')}return this.http.get("".concat(this._authService.updSNAEnvURL("v5")).concat(n.name))}},{key:"setOBProductId",value:function(e){this.OBProductId.emit(e)}},{key:"setObOrderId",value:function(e){this.OBOrderId.emit(e)}}]),e}();return e.\u0275fac=function(t){return new(t||e)(c.LFG(u.eN),c.LFG(i.$))},e.\u0275prov=c.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e}(),E=n(17188),k=n(35637),A=n(97425),C=n(89666),x=n(54616),P=n(82051),O=n(34115),N=n(60649),U=function(){var e=function(){function e(t,n,i,r,a){var o=this;s(this,e),this.http=t,this._authService=n,this._commonHelperService=i,this._snackbarService=r,this.translate=a,this.id=0,this.MAP_REPORT_TYPE_ID={settlement:6,store_order:5,transaction:3,invoice:1,subscription:-1,terminal:8,device:-1,pos_transaction:9},this.MAP_REPORT_ID_TYPE={1:{code:"INV_PAYMENTS_DETAILS",label:"Invoice Payments Details"},3:{code:"TRAX_DETAILS",label:"Transactions Details"},5:{code:"STORE_ORDERS_DETAILS",label:"Store Orders Details"},6:{code:"SETTLEMENT_DETAILS",label:"Settlement Details"},8:{code:"POS_TERMINAL_DETAILS",label:"POS Terminals Details"},9:{code:"POS_TRAX_DETAILS",label:"POS Transactions Details"}},this.MAP_REPORTFORMAT_ID={pdf:1,xlsx:2,csv:3},this.dupKafkaReportSubj=new A.X(null),this.dupKafkaReport$=this.dupKafkaReportSubj.asObservable(),this.statementPollSubj=new C.x,this.statementPoll$=this.statementPollSubj.asObservable(),this.reportToastDisplayTime=5e3,this.MAP_REPORT_API={settlement:"reporthistories/settlementReports",store_order:"reporthistories/orderReports",transaction:"reporthistories/transactionDetail
1sReport",invoice:"reporthistories/invoiceReports",subscription:"reporthistories/subscriptionDetailsReports",terminal:"reporthistories/posTerminalSummaryReport",device:"reporthistories/posDeviceSummaryReport",pos_transaction:"reporthistories/posTransactionDetailReport"},this.apiV7URLs=["reporthistories/settlementReports","reporthistories/orderReports","reporthistories/transactionDetailsReport","reporthistories/invoiceReports","reporthistories/subscriptionDetailsReports","reporthistories/posTransactionDetailReport","reporthistories/posTerminalSummaryReport"],this.getRoleId(),this.getMerEmail(),this.getTranslate(),this.translate.onLangChange.subscribe(function(e){o.getTranslate()})}return l(e,[{key:"getTranslate",value:function(){var e=this;this.translate.get(["POS_TRAX_DETAILS","POS_TERMINAL_DETAILS","TRAX_DETAILS","INV_PAYMENTS_DETAILS","SETTLEMENT_DETAILS","STORE_ORDERS_DETAILS"]).subscribe(function(t){e.language_text=t})}},{key:"getReportTransName",value:function(e){var t;return(null===(t=this.language_text)||void 0===t?void 0:t[e])||e}},{key:"getId",value:function(){var e,t;return this.id=null===(e=this._authService)||void 0===e||null===(t=e.currentUserValue)||void 0===t?void 0:t.id,this.id}},{key:"getRoleId",value:function(){var e,t;return this.roleId=null===(e=this._authService)||void 0===e||null===(t=e.currentUserValue)||void 0===t?void 0:t.roleId,this.roleId}},{key:"getMerEmail",value:function(){var e,t;return this.merEmail=null===(e=this._authService)||void 0===e||null===(t=e.currentUserValue)||void 0===t?void 0:t.email,this.merEmail}},{key:"getReportListing",value:function(e){var t=e.skip,n=void 0===t?0:t,i=e.limit,r=void 0===i?5:i,o=e.reportType,s=void 0===o?"":o,c=e.date,l=void 0===c?"":c,u=e.wRequestStatus,d=void 0===u?-1:u,p=e.payoutStatus,v=void 0===p?-1:p,h=e.transactionId,g=void 0===h?"":h,m=e.orderNumber,f=void 0===m?"":m,_=e.buyerName,y=void 0===_?"":_,S=e.productItemName,b=void 0===S?"":S,w=e.orderStatus,I=void 0===w?-1:w,T=e.terminalId,E=void 0===T?"":T,k=e.authNumber,A=void 0===k?"":k,C=e.cusEmailId,P=void 0===C?"":C,O=e.cusName,N=void 0===O?"":O,U=e.rrn,L=void 0===U?"":U,R=e.traxStatus,M=void 0===R?-1:R,D=e.quickSelect,Z=void 0===D?-1:D,q=e.traxType,V=void 0===q?"":q,F=e.traxSource,Y=void 0===F?"":F,j=e.integSource,H=void 0===j?-1:j,J=e.paymentMethod,B=void 0===J?"":J,W=e.cardType,G=void 0===W?"":W,Q=e.authStatus,K=void 0===Q?-1:Q,$=e.traxId,z=void 0===$?"":$,X=e.invoiceNumber,ee=void 0===X?"":X,te=e.status,ne=void 0===te?-1:te,ie=e.invCreatedSource,re=void 0===ie?-1:ie,ae=e.cusMob,oe=void 0===ae?"":ae,se=e.terminalLocation,ce=void 0===se?"":se,le=e.disStatus,ue=void 0===le?-1:le,de=e.deviceStatus,pe=void 0===de?-1:de,ve=e.deviceType,he=void 0===ve?-1:ve,ge=e.refundStatus,me=void 0===ge?-1:ge,fe=e.cardEntry,_e=void 0===fe?-1:fe,ye=e.bankID,Se=void 0===ye?-1:ye,be=e.subscriptionId,we=void 0===be?"":be,Ie=e.subscriberName,Te=void 0===Ie?"":Ie,Ee=e.subscriptionPaidStatus,ke=void 0===Ee?"":Ee,Ae=e.subsFrequency,Ce=void 0===Ae?-1:Ae,xe=e.terminalStatus,Pe=void 0===xe?-1:xe,Oe=e.deviceId,Ne=void 0===Oe?"":Oe,Ue=e.deviceDeviceType,Le=void 0===Ue?"":Ue,Re=e.merUser,Me=void 0===Re?-1:Re,De=e.integType,Ze=void 0===De?-1:De,qe=e.terminalName,Ve=void 0===qe?"":qe,Fe=e.devSerialNumber,Ye=void 0===Fe?"":Fe,je=e.deviceModal,He=void 0===je?"":je,Je=e.liveDeviceStatus,Be=void 0===Je?"":Je,We=e.mulTerminal,Ge=void 0===We?"":We,Qe=e.batchNumber,Ke=void 0===Qe?"":Qe,$e=e.withType,ze=void 0===$e?"":$e,Xe=a.N.apiUrl;this.getId(),this.getRoleId();var et={};if(et.name="".concat(this.MAP_REPORT_API[s]),this.apiV7URLs.includes(et.name)&&(Xe=this._authService.updSNAEnvURL("v5")),et.method="GET",et.data="filter[skip]=".concat(n,"&filter[limit]=").concat(r,"&filter[order]=created DESC"),""!=l){l.split("/");var tt=(0,x.dq)(l),nt=tt.startDateTime,it=tt.endDateTime;et.data="".concat(et.data,"&filter[where][created][between][0]=").concat(nt,"&filter[where][created][between][1]=").concat(it)}return"settlement"==s?et.data=this.setSettDetailFilter(et.data,d,v,Se,Me,ze):"store_order"==s?et.data=this.setOrderDetailFilter(et.data,g,f,y,b,I):"transaction"==s?et.data=this.setTraxDetailFilter(et.data,g,E,A,P,N,L,M,Z,V,Y,H,B,G,K,Ze,Ke):"invoice"==s?et.data=this.setInvoiceDetailFilter(et.data,z,ee,ne,re,N,oe,P,Me):"subscription"==s?et.data=this.setSubscriptionDetailFilter(et.data,z,we,Te,ke,Ce):"terminal"==s?et.data=this.setTerminalDetailFilter(et.data,E,Ve,ce,Pe,G,B,He,Be,Ye):"device"==s?et.data=this.setDeviceDetailFilter(et.data,Ne,E,Le,pe,G,B):"pos_transaction"==s&&(et.data=this.setPOSTransactionDetailFilter(et.data,g,E,ce,L,M,ue,pe,he,me,B,G,_e,V,Ge,Ke)),this.http.get("".concat(Xe).concat(et.name,"?").concat(et.data))}},{key:"downloadReport",value:function(e){var t=e.reportType,n=void 0===t?"":t,i=e.reportFormat,r=void 0===i?"csv":i,o=e.date,s=void 0===o?"":o,c=e.wRequestStatus,l=void 0===c?-1:c,u=e.payoutStatus,d=void 0===u?-1:u,p=e.transactionId,v=void 0===p?"":p,h=e.orderNumber,g=void 0===h?"":h,m=e.buyerName,f=void 0===m?"":m,_=e.productItemName,y=void 0===_?"":_,S=e.orderStatus,b=void 0===S?-1:S,I=e.terminalId,T=void 0===I?"":I,E=e.authNumber,k=void 0===E?"":E,A=e.cusEmailId,C=void 0===A?"":A,P=e.cusName,O=void 0===P?"":P,N=e.rrn,U=void 0===N?"":N,L=e.traxStatus,R=void 0===L?-1:L,M=e.quickSelect,D=void 0===M?-1:M,Z=e.traxType,q=void 0===Z?"":Z,V=e.traxSource,F=void 0===V?"":V,Y=e.integSource,j=void 0===Y?-1:Y,H=e.paymentMethod,J=void 0===H?"":H,B=e.cardType,W=void 0===B?"":B,G=e.authStatus,Q=void 0===G?-1:G,K=e.traxId,$=void 0===K?"":K,z=e.invoiceNumber,X=void 0===z?"":z,ee=e.status,te=void 0===ee?-1:ee,ne=e.invCreatedSource,ie=void 0===ne?-1:ne,re=e.cusMob,ae=void 0===re?"":re,oe=e.terminalLocation,se=void 0===oe?"":oe,ce=e.disStatus,le=void 0===ce?-1:ce,ue=e.deviceStatus,de=void 0===ue?-1:ue,pe=e.deviceType,ve=void 0===pe?-1:pe,he=e.refundStatus,ge=void 0===he?-1:he,me=e.cardEntry,fe=void 0===me?-1:me,_e=e.bankID,ye=void 0===_e?-1:_e,Se=e.subscriptionId,be=void 0===Se?"":Se,we=e.subscriberName,Ie=void 0===we?"":we,Te=e.subscriptionPaidStatus,Ee=void 0===Te?"":Te,ke=e.subsFrequency,Ae=void 0===ke?-1:ke,Ce=e.terminalStatus,xe=void 0===Ce?-1:Ce,Pe=e.deviceId,Oe=void 0===Pe?"":Pe,Ne=e.deviceDeviceType,Ue=void 0===Ne?"":Ne,Le=e.merUser,Re=void 0===Le?-1:Le,Me=e.integType,De=void 0===Me?-1:Me,Ze=e.terminalName,qe=void 0===Ze?"":Ze,Ve=e.devSerialNumber,Fe=void 0===Ve?"":Ve,Ye=e.deviceModal,je=void 0===Ye?"":Ye,He=e.liveDeviceStatus,Je=void 0===He?"":He,Be=e.mulTerminal,We=void 0===Be?"":Be,Ge=e.batchNumber,Qe=void 0===Ge?"":Ge,Ke=e.withType,$e=void 0===Ke?"":Ke;this.getId();var ze="".concat(a.N.apiUrl).concat(this.MAP_REPORT_API[n]);if(""!=s){s.split("/");var Xe=(0,x.dq)(s),et=Xe.startDateTime,tt=Xe.endDateTime;ze="".concat(ze,"?filter[where][created][between][0]=").concat(et,"&filter[where][created][between][1]=").concat(tt)}return ze="".concat(ze,"&filter[order]=created DESC"),r&&(ze="".concat(ze,"csv"==r?"&isCsv=true":"pdf"==r?"&isPdf=true":"&isExcel=true")),"settlement"==n?ze=this.setSettDetailFilter(ze,l,d,ye,Re,$e):"store_order"==n?ze=this.setOrderDetailFilter(ze,v,g,f,y,b):"transaction"==n?ze=this.setTraxDetailFilter(ze,v,T,k,C,O,U,R,D,q,F,j,J,W,Q,De,Qe):"invoice"==n?ze=this.setInvoiceDetailFilter(ze,$,X,te,ie,O,ae,C,Re):"subscription"==n?ze=this.setSubscriptionDetailFilter(ze,$,be,Ie,Ee,Ae):"terminal"==n?ze=this.setTerminalDetailFilter(ze,T,qe,se,xe,W,J,je,Je,Fe):"device"==n?ze=this.setDeviceDetailFilter(ze,Oe,T,Ue,de,W,J):"pos_transaction"==n&&(ze=this.setPOSTransactionDetailFilter(ze,v,T,se,U,R,le,de,ve,ge,J,W,fe,q,We,Qe)),this.http.get(ze,{observe:"response",responseType:"blob"}).pipe((0,w.U)(function(e){return new Blob([e.body])}))}},{key:"sendReport",value:function(e){var t=e.reportType,n=void 0===t?"":t,i=e.reportFormat,r=void 0===i?"csv":i,o=e.date,s=void 0===o?"":o,c=e.wRequestStatus,l=void 0===c?-1:c,u=e.payoutStatus,d=void 0===u?-1:u,p=e.transactionId,v=void 0===p?"":p,h=e.orderNumber,g=void 0===h?"":h,m=e.buyerName,f=void 0===m?"":m,_=e.productItemName,y=void 0===_?"":_,S=e.orderStatus,b=void 0===S?-1:S,w=e.terminalId,I=void 0===w?"":w,T=e.authNumber,E=void 0===T?"":T,k=e.cusEmailId,A=void 0===k?"":k,C=e.cusName,P=void 0===C?"":C,O=e.rrn,N=void 0===O?"":O,U=e.traxStatus,L=void 0===U?-1:U,R=e.quickSelect,M=void 0===R?-1:R,D=e.traxType,Z=void 0===D?"":D,q=e.traxSource,V=void 0===q?"":q,F=e.integSource,Y=void 0===F?-1:F,j=e.paymentMethod,H=void 0===j?"":j,J=e.cardType,B=void 0===J?"":J,W=e.authStatus,G=void 0===W?-1:W,Q=e.traxId,K=void 0===Q?"":Q,$=e.invoiceNumber,z=void 0===$?"":$,X=e.status,ee=void 0===X?-1:X,te=e.invCreatedSource,ne=void 0===te?-1:te,ie=e.cusMob,re=void 0===ie?"":ie,ae=e.terminalLocation,oe=void 0===ae?"":ae,se=e.disStatus,ce=void 0===se?-1:se,le=e.deviceStatus,ue=void 0===le?-1:le,de=e.deviceType,pe=void 0===de?-1:de,ve=e.refundStatus,he=void 0===ve?-1:ve,ge=e.cardEntry,me=void 0===ge?-1:ge,fe=e.bankID,_e=void 0===fe?-1:fe,ye=e.subscriptionId,Se=void 0===ye?"":ye,be=e.subscriberName,we=void 0===be?"":be,Ie=e.subscriptionPaidStatus,Te=void 0===Ie?"":Ie,Ee=e.subsFrequency,ke=void 0===Ee?-1:Ee,Ae=e.terminalStatus,Ce=void 0===Ae?-1:Ae,xe=e.deviceId,Pe=void 0===xe?"":xe,Oe=e.deviceDeviceType,Ne=void 0===Oe?"":Oe,Ue=e.merUser,Le=void 0===Ue?-1:Ue,Re=e.integType,Me=void 0===Re?-1:Re,De=e.terminalName,Ze=void 0===De?"":De,qe=e.devSerialNumber,Ve=void 0===qe?"":qe,Fe=e.deviceModal,Ye=void 0===Fe?"":Fe,je=e.liveDeviceStatus,He=void 0===je?"":je,Je=e.mulTerminal,Be=void 0===Je?"":Je,We=e.batchNumber,Ge=void 0===We?"":We,Qe=e.withType,Ke=void 0===Qe?"":Qe;this.getId();var $e={};
1if($e.name="".concat(this.MAP_REPORT_API[n]),$e.method="GET",""!=s){s.split("/");var ze=(0,x.dq)(s),Xe=ze.startDateTime,et=ze.endDateTime;$e.data="filter[where][created][between][0]=".concat(Xe,"&filter[where][created][between][1]=").concat(et)}return $e.data="".concat($e.data,"&filter[order]=created DESC"),r&&($e.data="".concat($e.data,"csv"==r?"&isCsv=true":"pdf"==r?"&isPdf=true":"&isExcel=true")),"settlement"==n?$e.data=this.setSettDetailFilter($e.data,l,d,_e,Le,Ke):"store_order"==n?$e.data=this.setOrderDetailFilter($e.data,v,g,f,y,b):"transaction"==n?$e.data=this.setTraxDetailFilter($e.data,v,I,E,A,P,N,L,M,Z,V,Y,H,B,G,Me,Ge):"invoice"==n?$e.data=this.setInvoiceDetailFilter($e.data,K,z,ee,ne,P,re,A,Le):"subscription"==n?$e.data=this.setSubscriptionDetailFilter($e.data,K,Se,we,Te,ke):"terminal"==n?$e.data=this.setTerminalDetailFilter($e.data,I,Ze,oe,Ce,B,H,Ye,He,Ve):"device"==n?$e.data=this.setDeviceDetailFilter($e.data,Pe,I,Ne,ue,B,H):"pos_transaction"==n&&($e.data=this.setPOSTransactionDetailFilter($e.data,v,I,oe,N,L,ce,ue,pe,he,H,B,me,Z,Be,Ge)),$e.data="".concat($e.data,"&isEmail=true"),this.http.get("".concat(a.N.apiUrl).concat($e.name,"?").concat($e.data))}},{key:"setSettDetailFilterKafka",value:function(e,t,n,i,r,a){var o={where:{}};return-1!==t&&(o.where.withdrawalrequeststatusId=1===t?{inq:[t,5]}:{inq:[t]}),-1!==n&&(o.where.payoutstatus=n),-1!==i&&(o.where.userbankId=i),-1!==r&&(o.where.createdby=r),""!==a&&(o.where.withdrawaltype=a),console.log("setSettDetailFilterKafka filters:",o),o}},{key:"setSettDetailFilter",value:function(e,t,n,i,r,a){return-1!=t&&(e=1==t?"".concat(e,"&filter[where][withdrawalrequeststatusId][inq][0]=").concat(t,"&filter[where][withdrawalrequeststatusId][inq][1]=5"):"".concat(e,"&filter[where][withdrawalrequeststatusId][inq][0]=").concat(t)),-1!=n&&(e="".concat(e,"&filter[where][payoutstatus]=").concat(n)),-1!=i&&(e="".concat(e,"&filter[where][userbankId]=").concat(i)),-1!=r&&(e="".concat(e,"&filter[where][createdby]=").concat(r)),""!=a&&(e="".concat(e,"&filter[where][withdrawaltype]=").concat(a)),e}},{key:"setOrderDetailFilterKafka",value:function(e,t,n,i,r,a){var o={where:{}};return""!==t&&(o.where.transactionId=t),""!==n&&(o.where.orderno={like:"%".concat(n,"%")}),""!==i&&(o.where.buyername=i),""!==r&&(o.where.productname=r),-1!==a&&(o.where.orderstatusId=a),console.log("setOrderDetailFilterKafka filters:",o),o}},{key:"setOrderDetailFilter",value:function(e,t,n,i,r,a){return""!=t&&(e="".concat(e,"&filter[where][transactionId]=").concat(t)),""!=n&&(e="".concat(e,"&filter[where][orderno][like]=%").concat(n,"%")),""!=i&&(e="".concat(e,"&filter[where][buyername]=").concat(i)),""!=r&&(e="".concat(e,"&filter[where][productname]=").concat(r)),-1!=a&&(e="".concat(e,"&filter[where][orderstatusId]=").concat(a)),e}},{key:"setTraxDetailFilterKafka",value:function(e,t,n,i,r,a,o,s,c,l,u,d,p,v,h,g,m){var f={where:{}};return f.where.transferType="receive",""!==i&&(f.where.authNumber=i),""!==v&&(f.where.cardtype=v),""!==p&&("HIMYAN"===p?f.where.cardtype=p:f.where.paymentmethod=p),""!==o&&(f.where.rrn=o),""!==t&&(f.where.invoicenumber={like:"%".concat(t,"%")}),-1!==s&&(l&&s?"dispute"===l?f.where.disputestatusId=s:("refund"===l||"payments"===l)&&(f.where.transactionstatusId=s):f.where.transactionstatusId=s,l=""),""!==l&&(f.where.transactionType=l),""!==u&&(f.where.transactionSource=u),""!==a&&(f.where.customerName=a),-1!==g&&(f.where.transactionentityId=g),""!==m&&(f.where.batch_id=m),console.log("setTraxDetailFilterKafkafilters:",f),f}},{key:"setTraxDetailFilter",value:function(e,t,n,i,r,a,o,s,c,l,u,d,p,v,h,g,m){return e="".concat(e,"&[filter][where][transferType]=receive"),""!=i&&(e="".concat(e,"&filter[where][authNumber]=").concat(i)),""!=v&&(e="".concat(e,"&filter[where][cardtype]=").concat(v)),""!=p&&(e="HIMYAN"==p?"".concat(e,"&filter[where][cardtype]=").concat(p):"".concat(e,"&filter[where][paymentmethod]=").concat(p)),""!=o&&(e="".concat(e,"&filter[where][rrn]=").concat(o)),""!=t&&(e="".concat(e,"&filter[where][invoicenumber][like]=%").concat(t,"%")),-1!=s&&(l&&s?"dispute"==l?e="".concat(e,"&filter[where][disputestatusId]=").concat(s):("refund"==l||"payments"==l)&&(e="".concat(e,"&filter[where][transactionstatusId]=").concat(s)):e="".concat(e,"&filter[where][transactionstatusId]=").concat(s),l=""),""!=l&&(e="".concat(e,"&filter[where][transactionType]=").concat(l)),""!=u&&(e="".concat(e,"&filter[where][transactionSource]=").concat(u)),""!=a&&(e="".concat(e,"&filter[where][customerName]=").concat(a)),-1!=g&&(e="".concat(e,"&filter[where][transactionentityId]=").concat(g)),""!=m&&(e="".concat(e,"&filter[where][batch_id]=").concat(m)),e}},{key:"setInvoiceDetailFilterKafka",value:function(e,t,n,i,r,a,o,s,c){var l={where:{}};return""!==t&&(l.where.transactionId=t),""!==n&&(l.where.invoiceno={like:"%".concat(n,"%")}),-1!==i&&(l.where.invoicestatusId=i),-1!==r&&(l.where.sourceofinvoice=r),""!==a&&(l.where.clientname={like:"%".concat(a,"%")}),""!==o&&(l.where.cellno={like:"%".concat(o,"%")}),""!==s&&(l.where.emailaddress={like:"%".concat(s,"%")}),-1!==c&&(l.where.createdby=c),console.log("setInvoiceDetailFilterKafka filters:",l),l}},{key:"setInvoiceDetailFilter",value:function(e,t,n,i,r,a,o,s,c){return""!=t&&(e="".concat(e,"&filter[where][transactionId]=").concat(t)),""!=n&&(e="".concat(e,"&filter[where][invoiceno][like]=%").concat(n,"%")),-1!=i&&(e="".concat(e,"&filter[where][invoicestatusId]=").concat(i)),-1!=r&&(e="".concat(e,"&filter[where][sourceofinvoice]=").concat(r)),""!=a&&(e="".concat(e,"&filter[where][clientname][like]=%").concat(a,"%")),""!=o&&(e="".concat(e,"&filter[where][cellno][like]=%").concat(o,"%")),""!=s&&(e="".concat(e,"&filter[where][emailaddress][like]=%").concat(s,"%")),-1!=c&&(e="".concat(e,"&filter[where][createdby]=").concat(c)),e}},{key:"setSubscriptionDetailFilterKafka",value:function(e,t,n,i,r,a){var o={where:{}};return""!==t&&(o.where.transactionId=t),""!==n&&(o.where.subscriptionno={like:"%".concat(n,"%")}),""!==i&&(o.where.subscriberName=i),""!==r&&(o.where.subscriptionPaidStatus=r),-1!==a&&(o.where.subscriptionFrequency=a),console.log("setSubscriptionDetailFilterKafka filters:",o),o}},{key:"setSubscriptionDetailFilter",value:function(e,t,n,i,r,a){return""!=t&&(e="".concat(e,"&filter[where][transactionId]=").concat(t)),""!=n&&(e="".concat(e,"&filter[where][subscriptionno][like]=%").concat(n,"%")),""!=i&&(e="".concat(e,"&filter[where][subscriberName]=").concat(i)),""!=r&&(e="".concat(e,"&filter[where][subscriptionPaidStatus]=").concat(r)),-1!=a&&(e="".concat(e,"&filter[where][subscriptionFrequency]=").concat(a)),e}},{key:"setTerminalDetailFilterKafka",value:function(e,t,n,i,r,a,o,s,c,l){var u={where:{}};return""!==t&&(u.where.terminalId={like:"%".concat(t,"%")}),""!==n&&(u.where.terminalName=n),""!==i&&(u.where.location=i),-1!==r&&(u.where.is_active=r),""!==a&&(u.where.card_type=a),""!==o&&(u.where.payment_method=o),""!==s&&(u.where.deviceType=s),""!==c&&(u.where.is_online=c),""!==l&&(u.where.deviceSerialNo=l),console.log("setTerminalDetailFilterKafka filters:",u),u}},{key:"setTerminalDetailFilter",value:function(e,t,n,i,r,a,o,s,c,l){return""!=t&&(e="".concat(e,"&filter[where][terminalId][like]=%").concat(t,"%")),""!=n&&(e="".concat(e,"&filter[where][terminalName]=").concat(n)),""!=i&&(e="".concat(e,"&filter[where][location]=").concat(i)),-1!=r&&(e="".concat(e,"&filter[where][is_active]=").concat(r)),""!=a&&(e="".concat(e,"&filter[where][card_type]=").concat(a)),""!=o&&(e="".concat(e,"&filter[where][payment_method]=").concat(o)),""!=s&&(e="".concat(e,"&filter[where][deviceType]=").concat(s)),""!=c&&(e="".concat(e,"&filter[where][is_online]=").concat(c)),""!=l&&(e="".concat(e,"&filter[where][deviceSerialNo]=").concat(l)),e}},{key:"setDeviceDetailFilterKafka",value:function(e,t,n,i,r,a,o){var s={where:{}};return""!==t&&(s.where.deviceId={like:"%".concat(t,"%")}),""!==n&&(s.where.terminalId=n),""!==i&&(s.where.devicetype=i),-1!==r&&(s.where.terminalStatus=r),""!==a&&(s.where.card_type=a),""!==o&&(s.where.payment_method=o),console.log("setDeviceDetailFilterKafka filters:",s),s}},{key:"setDeviceDetailFilter",value:function(e,t,n,i,r,a,o){return""!=t&&(e="".concat(e,"&filter[where][deviceId][like]=%").concat(t,"%")),""!=n&&(e="".concat(e,"&filter[where][terminalId]=").concat(n)),""!=i&&(e="".concat(e,"&filter[where][devicetype]=").concat(i)),-1!=r&&(e="".concat(e,"&filter[where][terminalStatus]=").concat(r)),""!=a&&(e="".concat(e,"&filter[where][card_type]=").concat(a)),""!=o&&(e="".concat(e,"&filter[where][payment_method]=").concat(o)),e}},{key:"setPOSTransactionDetailFilterKafka",value:function(e,t,n,i,r,a,o,s,c,l,u,d,p,v,h,g,m){var f={where:{}};if(""!==t&&(f.where.invoicenumber={like:"%".concat(t,"%")}),""!==n&&(f.where.tid={like:"%".concat(n,"%")}),""!==i&&(f.where.terminalLocation=i),""!==r&&(f.where.rrn={like:"%".concat(r,"%")}),-1!==a&&(f.where.transactionstatus=a),-1!==o&&(f.where.disputestatusId=o),-1!==s&&(f.where.devicestatus=s),-1!==c&&(f.where.devicetypeId=c),-1!==l&&(f.where.refundstatusId=l),""!==u&&(f.where.network=u),""!==d&&("wallet"===d?f.where.transactionmodeId=6:f.where.card_payment_type=d),""!==p&&(f.where.card_type=p),""!==v&&(f.where.transaction_type=v),""!==h){var _=h.split(",");f.where.tid={inq:_}}return""!==g&&(f.where.batch_id=g),-1!==m&&(f.where.is_tip_included=m),console.log("setPOSTransactionDetailFilterKafka filters:",f),f}},{key:"setPOSTransactionDetailFilter",value:function(e,t,n,i,r,a,o,s,c,l,u,d,p,v,h,g){return""!=t&&(e="".concat(e,"&filter[where][invoicenumber][like]=%").concat(t,"%")),""!=n&&(e="".concat(e,"&filter[where][tid][like]=%").concat(n,"%")),""!=i&&(e="".concat(e,"&filter[where][terminalLocation]=").concat(i)),""!=r&&(e="".concat(e,"&filter[where][rrn][like]=%").concat(r,"%")),-1!=a&&(e="".concat(e,"&filter[where][transactionstatus]=").concat(a)),-1!=o&&(e="".concat(e,"&filter[where][disputestatusId]=").concat(o)),-1!=s&&(e="".concat(e,"&filter[where][devicestatus]=").concat(s)),-1!=c&&(e="".concat(e,"&filter[where][devicetypeId]=").concat(c)),-1!=l&&(e="".concat(e,"&filter[where][refundstatusId]=").concat(l)),""!=u&&(e="".concat(e,"&filter[where][network]=").concat(u)),""!=d&&(e="wallet"==d?"".concat(e,"&filter[where][transactionmodeId]=6"):"".concat(e,"&filter[where][card_payment_type]=").concat(d)),""!=p&&(e="".concat(e,"&filter[where][card_type]=").concat(p)),""!=v&&(e="".concat(e,"&filter[where][transaction_type]=").concat(v)),""!=h&&h.split(",").forEach(function(t,n){e="".concat(e,"&filter[where][tid][inq][").concat(n,"]=").concat(t)}),""!=g&&(e="".concat(e,"&filter[where][batch_id]=").concat(g)),e}},{key:"getDownloadHisListing",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:-1,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:-1,a=arguments.length>5&&void 0!==arguments[5]&&arguments[5];this.getId(),"/"==n&&(n="");var o={name:"reporthistories",method:"GET"};if(o.data="filter[include][0]=user&filter[include][1]=reporttype&filter[include][2]=createdby&filter[skip]=".concat(e,"&filter[limit]=").concat(t,"&filter[where][ispos]=").concat(a,"&filter[order]=created DESC"),n){var s=n.split("/");o.data=""!=s[1]?"".concat(o.data,"&filter[where][created][between][0]=").concat(s[0]," 00:00:00&filter[where][created][between][1]=").concat(s[1]," 23:59:59"):"".concat(o.data,"&filter[where][created][between][0]=").concat(s[0]," 00:00:00&filter[where][created][between][1]=").concat(s[0]," 23:59:59")}return-1!=i&&(o.data="".concat(o.data,"&filter[where][createdby]=").concat(i)),-1!=r&&(o.data="".concat(o.data,"&filter[where][reporttypeId]=").concat(r)),this.http.get("".concat(this._authService.updSNAEnvURL("v5")).concat(o.name,"?").concat(o.data))}},{key:"getDownloadHisCount",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:-1,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:-1,a=arguments.length>5&&void 0!==arguments[5]&&arguments[5];this.getId(),"/"==n&&(n="");var o={name:"reporthistories/count",method:"GET"};if(o.data="where[ispos]=".concat(a),n){var s=n.split("/");o.data=""!=s[1]?"".concat(o.data,"&where[created][between][0]=").concat(s[0]," 00:00:00&where[created][between][1]=").concat(s[1]," 23:59:59"):"".concat(o.data,"&where[created][between][0]=").concat(s[0]," 00:00:00&where[created][between][1]=").concat(s[0]," 23:59:59")}return-1!=i&&(o.data="".concat(o.data,"&where[createdby]=").concat(i)),-1!=r&&(o.data="".concat(o.data,"&where[reporttypeId]=").concat(r)),this.http.get("".concat(this._authService.updSNAEnvURL("v5")).concat(o.name,"?").concat(o.data))}},{key:"getReportDateFormat",value:function(e){var t;if(e.includes("/")){var n=e.split("/")[0].split(" ")[0],i=e.split("/")[1]?e.split("/")[1].split(" ")[0]:"";t=o(n,"YYYY-MM-DD").format("DD MMM YYYY"),i&&(t=t+" - "+o(i,"YYYY-MM-DD").format("DD MMM YYYY"))}return t}},{key:"sendRprtDownloadKafkaReq",value:function(e){var t=e.reportType,n=void 0===t?"":t,i=e.reportFormat,r=void 0===i?"csv":i,o=e.date,s=void 0===o?"":o,c=e.wRequestStatus,l=void 0===c?-1:c,u=e.payoutStatus,d=void 0===u?-1:u,p=e.transactionId,v=void 0===p?"":p,h=e.orderNumber,g=void 0===h?"":h,m=e.buyerName,f=void 0===m?"":m,_=e.productItemName,y=void 0===_?"":_,S=e.orderStatus,b=void 0===S?-1:S,w=e.terminalId,I=void 0===w?"":w,T=e.authNumber,E=void 0===T?"":T,k=e.cusEmailId,A=void 0===k?"":k,C=e.cusName,P=void 0===C?"":C,O=e.rrn,N=void 0===O?"":O,U=e.traxStatus,L=void 0===U?-1:U,R=e.quickSelect,M=void 0===R?-1:R,D=e.traxType,Z=void 0===D?"":D,q=e.traxSource,V=void 0===q?"":q,F=e.integSource,Y=void 0===F?-1:F,j=e.paymentMethod,H=void 0===j?"":j,J=e.cardType,B=void 0===J?"":J,W=e.authStatus,G=void 0===W?-1:W,Q=e.traxId,K=void 0===Q?"":Q,$=e.invoiceNumber,z=void 0===$?"":$,X=e.status,ee=void 0===X?-1:X,te=e.invCreatedSource,ne=void 0===te?-1:te,ie=e.cusMob,re=void 0===ie?"":ie,ae=e.terminalLocation,oe=void 0===ae?"":ae,se=e.disStatus,ce=void 0===se?-1:se,le=e.deviceStatus,ue=void 0===le?-1:le,de=e.deviceType,pe=void 0===de?-1:de,ve=e.refundStatus,he=void 0===ve?-1:ve,ge=e.cardEntry,me=void 0===ge?-1:ge,fe=e.bankID,_e=void 0===fe?-1:fe,ye=e.subscriptionId,Se=void 0===ye?"":ye,be=e.subscriberName,we=void 0===be?"":be,Ie=e.subscriptionPaidStatus,Te=void 0===Ie?"":Ie,Ee=e.subsFrequency,ke=void 0===Ee?-1:Ee,Ae=e.terminalStatus,Ce=void 0===Ae?-1:Ae,xe=e.deviceId,Pe=void 0===xe?"":xe,Oe=e.deviceDeviceType,Ne=void 0===Oe?"":Oe,Ue=e.merUser,Le=void 0===Ue?-1:Ue,Re=e.integType,Me=void 0===Re?-1:Re,De=e.terminalName,Ze=void 0===De?"":De,qe=e.devSerialNumber,Ve=void 0===qe?"":qe,Fe=e.deviceModal,Ye=void 0===Fe?"":Fe,je=e.liveDeviceStatus,He=void 0===je?"":je,Je=e.mulTerminal,Be=void 0===Je?"":Je,We=e.batchNumber,Ge=void 0===We?"":We,Qe=e.withType,Ke=void 0===Qe?"":Qe,$e=e.tipEnabledType,ze=void 0===$e?-1:$e,Xe=e.KafkaDeliveryOpt,et=void 0===Xe?2:Xe;this.getId();var tt,nt={report_type:this.MAP_REPORT_TYPE_ID[n],delivery_option:et,format:this.MAP_REPORTFORMAT_ID[r],device_type:2,date_filter:"custom",date_from:"",date_to:""},it="".concat(a.N.apiUrl).concat(this.MAP_REPORT_API[n]);if(""!=s){s.split("/");var rt=(0,x.dq)(s),at=rt.startDateTime,ot=rt.endDateTime;nt.date_from=at,nt.date_to=ot,it="".concat(it,"?filter[where][created][between][0]=").concat(at,"&filter[where][created][between][1]=").concat(ot)}it="".concat(it,"&filter[order]=created DESC"),r&&(it="".concat(it,"csv"==r?"&isCsv=true":"pdf"==r?"&isPdf=true":"&isExcel=true")),"settlement"==n?tt=this.setSettDetailFilterKafka(it,l,d,_e,Le,Ke):"store_order"==n?tt=this.setOrderDetailFilterKafka(it,v,g,f,y,b):"transaction"==n?tt=this.setTraxDetailFilterKafka(it,v,I,E,A,P,N,L,M,Z,V,Y,H,B,G,Me,Ge):"invoice"==n?tt=this.setInvoiceDetailFilterKafka(it,K,z,ee,ne,P,re,A,Le):"subscription"==n?tt=this.setSubscriptionDetailFilterKafka(it,K,Se,we,Te,ke):"terminal"==n?tt=this.setTerminalDetailFilterKafka(it,I,Ze,oe,Ce,B,H,Ye,He,Ve):"device"==n?tt=this.setDeviceDetailFilterKafka(it,Pe,I,Ne,ue,B,H):"pos_transaction"==n&&(tt=this.setPOSTransactionDetailFilterKafka(it,v,I,oe,N,L,ce,ue,pe,he,H,B,me,Z,Be,Ge,ze)),nt.filters=tt,console.log("params.filters",nt.filters);var st={name:"reporthistories",method:"POST"};return st.data=nt,this.http.post("".concat(a.N.apiUrlv7).concat(st.name),st.data)}},{key:"getDownReqStatus",value:function(){var e=arguments.lengt
1h>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n="".concat(a.N.apiUrlv7,"reporthistories/bulkPollStatus"),i=[];if(null!=e&&e.length){var r=Array.isArray(e)?e.join(","):e;i.push("request_ids=".concat(r))}if(null!=t&&t.length){var o=Array.isArray(t)?t.join(","):t;i.push("statement_request_ids=".concat(o))}return i.length>0&&(n="".concat(n,"?").concat(i.join("&"))),this.http.get(n)}},{key:"downloadKafkaReport",value:function(e){var t={};return t.name="reporthistories/downloadLink/".concat(e),t.method="GET",this.http.get("".concat(a.N.apiUrlv7).concat(t.name),{observe:"response",responseType:"blob"}).pipe((0,w.U)(function(e){return new Blob([e.body])}))}},{key:"openDupKafReportModal",value:function(e){this.dupKafkaReportSubj.next(e)}},{key:"clearDupKafkaReport",value:function(){this.dupKafkaReportSubj.next(null)}},{key:"getKafkaReportName",value:function(e,t){var n=this;return(0,p.Z)(regeneratorRuntime.mark(function i(){var r,a,o,s;return regeneratorRuntime.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return a=null===(r=n.MAP_REPORT_ID_TYPE[t])||void 0===r?void 0:r.label,i.next=3,n._commonHelperService.getFileTypeFromBlob(e);case 3:return o=i.sent,s="".concat(a," Report ").concat(Date.now(),".").concat(o),i.abrupt("return",((0,P.saveAs)(e,s),console.log("getKafkaReportName:",s),s));case 6:case"end":return i.stop()}},i)}))()}},{key:"handleReportBulkPoll",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(null!=e&&e.count){var n,i=[],r=0;if(e.data.forEach(function(e){null==e||!e.report_request_id||2!==(null==e?void 0:e.status)&&3!==(null==e?void 0:e.status)||(null==i?void 0:i.length)||(i.push(null==e?void 0:e.report_request_id),n=e,2===(null==e?void 0:e.status)?r++:3===(null==e?void 0:e.status)&&0)}),null!=i&&i.length){var a,o,s,c;this._snackbarService.triggerNotificationVisibility(!1,!0);var l="",u="";1===(null==i?void 0:i.length)&&(l=1===r?1==(null===(a=n)||void 0===a?void 0:a.delivery_option)?"REPORT_READY":"REPORT_SENT_EMAIL":1==(null===(o=n)||void 0===o?void 0:o.delivery_option)?"REPORT_GENERATION_FAILED":"REPORT_EMAIL_FAILED",u=1===r?"VIEW_DOWN":"OK"),this._commonHelperService.disDynmcTransSuccMsg({resSuccMsg:l,okmsg:u,duration:this.reportToastDisplayTime,dynText:{reportName:this.getReportTransName(null===(s=this.MAP_REPORT_ID_TYPE[null===(c=n)||void 0===c?void 0:c.report_type])||void 0===s?void 0:s.code),email:this.getMerEmail()},actType:"reportDown",position:"end"}),t&&this._commonHelperService.updateDownRprtIds("remove",i)}}console.log("callDownReptIdsPolling res:",e)}},{key:"getMonthName",value:function(e){var t=Number(e||0)-1;if(t>=0&&t<12){var n=new Date(2e3,t,1);try{return new Intl.DateTimeFormat("en",{month:"long"}).format(n)}catch(i){return["January","February","March","April","May","June","July","August","September","October","November","December"][t]}}return""}},{key:"handleStatementBulkPoll",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(null!=e&&e.statement&&e.statement.length>0){var i=[];e.statement.forEach(function(e){if(null!=e&&e.statement_request_id&&("completed"===(null==e?void 0:e.status_label)||"failed"===(null==e?void 0:e.status_label)||"empty"===(null==e?void 0:e.status_label)))if(i.push(null==e?void 0:e.statement_request_id),"completed"===(null==e?void 0:e.status_label)){var n=t.getMonthName(null==e?void 0:e.month),r=null!=e&&e.year?String(e.year):"";t._commonHelperService.disDynmcTransSuccMsg({resSuccMsg:"YOUR_STATEMENT_READY_TO_DOWNLOAD",okmsg:"VIEW_DOWN",duration:t.reportToastDisplayTime,dynText:{month:n,year:r},actType:"balStatementDown"})}else t._commonHelperService.disTransErrMsg((null==e?void 0:e.message)||t.translate.instant("STATEMENT_GENERATION_FAILED_TRY_AGAIN"))}),n&&i.length>0&&this._commonHelperService.updateDownStmtIds("remove",i),this.statementPollSubj.next(e)}}},{key:"getReportDownloadHistory",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:-1,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:-1,o=arguments.length>5&&void 0!==arguments[5]&&arguments[5];this.getId(),"/"==n&&(n="");var s={name:"reporthistories/list",method:"GET"};if(s.data="filter[offset]=".concat(e,"&filter[limit]=").concat(t),n){var c=n.split("/");s.data=""!=c[1]?"".concat(s.data,"&filter[where][requested_at][gte]=").concat(c[0]," 00:00:00&filter[where][requested_at][lte]=").concat(c[1]," 23:59:59"):"".concat(s.data,"&filter[where][requested_at][gte]=").concat(c[0]," 00:00:00&filter[where][requested_at][lte]=").concat(c[0]," 23:59:59")}return-1!=i&&(s.data="".concat(s.data,"&filter[merchant_id]=").concat(i)),s.data=-1!=r?"".concat(s.data,"&filter[where][report_type]=").concat(r):"".concat(s.data,o?"&filter[where][report_type]=6,8,9":"&filter[where][report_type]=1,3,5,6"),this.http.get("".concat(a.N.apiUrlv7).concat(s.name,"?").concat(s.data))}}
1,{key:"resendReportEmail",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t={name:"reporthistories/resendReportEmail",method:"POST"};return t.data={request_id:e},this.http.post("".concat(a.N.apiUrlv7).concat(t.name),t.data)}}]),e}();return e.\u0275fac=function(t){return new(t||e)(c.LFG(u.eN),c.LFG(i.$),c.LFG(r.$),c.LFG(O.o),c.LFG(N.sK))},e.\u0275prov=c.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e}(),L=function(){var e=function(){function e(t,n){s(this,e),this.http=t,this._authService=n}return l(e,[{key:"setIds",value:function(){}},{key:"createUser",value:function(e){var t,n;this.setIds(),e.mainMerchantId=null===(t=this._authService)||void 0===t||null===(n=t.currentUserValue)||void 0===n?void 0:n.id,e.agreement=1;var i={name:"users/createsubuser",method:"POST"};return i.data=e,this.http.post("".concat(this._authService.updSNAEnvURL("v6")).concat(i.name),i.data)}},{key:"getUserList",value:function(){return this.http.get("".concat(this._authService.updSNAEnvURL("v6"),"users/getsubusers"))}},{key:"editUser",value:function(e,t){e.id=t,this.setIds();var n={name:"users/editsubuser",method:"POST"};return n.data=e,this.http.post("".concat(this._authService.updSNAEnvURL("v6")).concat(n.name),n.data)}},{key:"toggleUser",value:function(e){var t={name:"usermetaauths/blocksubuser",method:"POST"};return t.data=e,this.http.post("".concat(this._authService.updSNAEnvURL("v5")).concat(t.name),t.data)}},{key:"updateReminderDays",value:function(e,t){this.setIds();var n={};return n.name="usermetapreferences/".concat(t),n.method="PATCH",n.data=e,this.http.patch("".concat(this._authService.updSNAEnvURL("v5")).concat(n.name),n.data)}},{key:"updatePayment",value:function(e,t){this.setIds();var n={};return n.name="usermetapreferences/".concat(t),n.method="PATCH",n.data=e,this.http.patch("".concat(this._authService.updSNAEnvURL("v5")).concat(n.name),n.data)}},{key:"getNotificationDetails",value:function(){var e,t;this.setIds();var n={name:"usermetapreferences",method:"GET",apiVer:"v6"};return n.data="filter[where][userId]=".concat(null===(e=this._authService)||void 0===e||null===(t=e.currentUserValue)||void 0===t?void 0:t.id),this.http.get("".concat(this._authService.updSNAEnvURL("v6")).concat(n.name,"?").concat(n.data))}},{key:"deleteSubUser",value:function(e){var t={};return t.name="users/deletesubuser/".concat(e),t.method="DELETE",t.apiVer="v6",this.http.delete("".concat(this._authService.updSNAEnvURL("v6")).concat(t.name))}}]),e}();return e.\u0275fac=function(t){return new(t||e)(c.LFG(u.eN),c.LFG(i.$))},e.\u0275prov=c.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e}(),R=function(){var e=function(){function e(t,n,i){s(this,e),this.http=t,this._authService=n,this._snackbarService=i,this.shipOrdersRefreshSubject=new C.x,this.shipOrdersRefresh$=this.shipOrdersRefreshSubject.asObservable(),this.getId()}return l(e,[{key:"getId",value:function(){var e,t;return this.id=null===(e=this._authService)||void 0===e||null===(t=e.currentUserValue)||void 0===t?void 0:t.id,this.id}},{key:"refreshHoverList",value:function(){this._snackbarService.triggerNotificationVisibility(!1,!0)}},{key:"requestShipOrdersRefresh",value:function(){this.shipOrdersRefreshSubject.next()}},{key:"subscribe",value:function(e){this.getId();var t={name:"usermetaauths/subscribe",method:"POST"};return t.data=e,this.http.post("".concat(this._authService.updSNAEnvURL("v5")).concat(t.name),t.data)}},{key:"getNotifications",value:function(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1;this.getId();var o=null===(e=this._authService)||void 0===e||null===(t=e.currentUserValue)||void 0===t?void 0:t.id;if(!o)return(0,g.of)(null);var s={name:"notificationreceivers",method:"GET"};return s.data="filter[where][notificationreceiverId]=".concat(o,"&filter[include]=notification&filter[order]=created DESC&filter[skip]=").concat(n,"&filter[limit]=").concat(i),-1!=r&&(s.data="".concat(s.data,"&filter[where][notificationentityId]=").concat(r)),this.http.get("".concat(a.N.apiUrlv7).concat(s.name,"?").concat(s.data)).pipe((0,m.K)(function(){return(0,g.of)(null)}))}},{key:"markSingleNotificationAsRead",value:function(e){this.getId();var t={};return t.name="notificationreceivers/".concat(e),t.method="PATCH",t.data={isread:1},this.http.patch("".concat(a.N.apiUrlv7).concat(t.name),t.data)}},{key:"markAllNotificationAsRead",value:function(){var e,t;this.getId();var n=null===(e=this._authService)||void 0===e||null===(t=e.currentUserValue)||void 0===t?void 0:t.id;if(!n)return(0,g.of)(null);var i={};return i.name="notificationreceivers/update?where[notificationreceiverId]=".concat(n,"&where[isread]=0"),i.method="POST",i.data={isread:1},this.http.post("".concat(a.N.apiUrlv7).concat(i.name),i.data)}}]),e}();return e.\u0275fac=function(t){return new(t||e)(c.LFG(u.eN),c.LFG(i.$),c.LFG(O.o))},e.\u0275prov=c.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e}(),M=n(73006),D=n(54391),Z=function(){var e=function(){function e(t,n){s(this,e),this._auth=t,this.router=n}
1return l(e,[{key:"checkAndRedirectResolverLoggedInUser",value:function(){var e,t,n;return null!==(e=this._auth)&&void 0!==e&&e.checkAndRedirectLoggedInUserSession()?(null===(t=this._auth)||void 0===t?void 0:t.currentUserValue)||(null===(n=this._auth)||void 0===n?void 0:n.getData("currentUser")):null}},{key:"resolve",value:function(){var e,t,n=this.checkAndRedirectResolverLoggedInUser();return n&&"/auth/signup"!==window.location.pathname?(0,g.of)(n):null!==(e=this._auth)&&void 0!==e&&e.currentUserValue&&"/auth/signup"!==window.location.pathname?(0,g.of)(null===(t=this._auth)||void 0===t?void 0:t.currentUserValue):this.executeLoginResolverStreamCustom()}},{key:"executeLoginResolverStreamCustom",value:function(){var e,t=this;return this._auth&&"function"==typeof(null===(e=this._auth)||void 0===e?void 0:e.login)?this._auth.login("","",!0).pipe((0,h.q)(1),(0,w.U)(function(e){var n,i;return null!==(n=t._auth)&&void 0!==n&&null!==(i=n.isSessExpInProg)&&void 0!==i&&i.next(!1),e}),(0,m.K)(function(e){return(0,g.of)({error:!0,data:null})})):(0,g.of)({error:!0,data:null})}}]),e}();return e.\u0275fac=function(t){return new(t||e)(c.LFG(i.$),c.LFG(D.F0))},e.\u0275prov=c.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e}(),q=function(){var e=function(){function e(t,n,i){s(this,e),this.http=t,this._authService=n,this._commonHelperService=i,this.getId()}return l(e,[{key:"getId",value:function(){var e,t;return this.id=null===(e=this._authService)||void 0===e||null===(t=e.currentUserValue)||void 0===t?void 0:t.id,this.id}},{key:"getCounters",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";this.getId();var r={name:"statements/balanceCounters",method:"GET",apiVer:"v6"};if(e&&""!=e)if("today"==e||"yesterday"==e||"week"==e||"month"==e||"year"==e)r.name="".concat(r.name,"?filter[date]=").concat(e);else{var a=e.split("/");r.name=""!=a[1]?"".concat(r.name,'?filter[date]=custom&filter[between]=["').concat(a[0],' 00:00:00", "').concat(a[1],' 23:59:59"]'):"".concat(r.name,'?filter[date]=custom&filter[between]=["').concat(a[0],' 00:00:00", "').concat(a[0],' 23:59:59"]')}return t&&(r.name="".concat(r.name,"&filter[txnSource]=").concat(encodeURIComponent(t))),n&&(r.name="".concat(r.name,"1"==n?"&filter[paymentIn]=true":"&filter[paymentOut]=true")),i&&(r.name="".concat(r.name,"&filter[transactionId]=").concat(i)),this.http.get("".concat(this._authService.updSNAEnvURL("v6")).concat(r.name))}},{key:"getCurrentMonthCounters",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";this.getId();var r={name:"statements/currentMonthBalanceCounters",method:"GET",apiVer:"v7"};if(e&&""!=e)if("today"==e||"yesterday"==e||"week"==e||"month"==e||"year"==e)r.name="".concat(r.name,"?filter[date]=").concat(e);else{var o=e.split("/");r.name=""!=o[1]?"".concat(r.name,'?filter[date]=custom&filter[between]=["').concat(o[0],' 00:00:00", "').concat(o[1],' 23:59:59"]'):"".concat(r.name,'?filter[date]=custom&filter[between]=["').concat(o[0],' 00:00:00", "').concat(o[0],' 23:59:59"]')}return t&&(r.name="".concat(r.name,"&filter[txnSource]=").concat(encodeURIComponent(t))),n&&(r.name="".concat(r.name,"1"==n?"&filter[paymentIn]=true":"&filter[paymentOut]=true")),i&&(r.name="".concat(r.name,"&filter[transactionId]=").concat(i)),this.http.get("".concat(a.N.apiUrlv7).concat(r.name))}},{key:"getAllBalStatementsList",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"",o={};if(o.name="statements/balanceStatement?filter[skip]=".concat(e,"&filter[limit]=").concat(t),o.method="GET",o.apiVer="v6",o.data="",n&&""!=n)if("today"==n||"yesterday"==n||"week"==n||"month"==n||"year"==n)o.name="".concat(o.name,"&filter[date]=").concat(n);else{var s=n.split("/");o.name=""!=s[1]?"".concat(o.name,'&filter[date]=custom&filter[between]=["').concat(s[0],' 00:00:00", "').concat(s[1],' 23:59:59"]'):"".concat(o.name,'&filter[date]=custom&filter[between]=["').concat(s[0],' 00:00:00", "').concat(s[0],' 23:59:59"]')}i&&(o.name="".concat(o.name,"&filter[txnSource]=").concat(encodeURIComponent(i))),r&&(o.name="".concat(o.name,"1"==r?"&filter[paymentIn]=true":"&filter[paymentOut]=true")),a&&(o.name="".concat(o.name,"&filter[transactionId]=").concat(a));var c=(new Date).toISOString();return o.timestamp="".concat(c),this.http.get("".concat(this._authService.updSNAEnvURL("v6")).c
1oncat(o.name))}},{key:"getCurrentMonthBalStatementsList",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"",s={};if(s.name="statements/currentMonthBalanceStatement?filter[skip]=".concat(e,"&filter[limit]=").concat(t),s.method="GET",s.apiVer="v7",s.data="",n&&""!=n)if("today"==n||"yesterday"==n||"week"==n||"month"==n||"year"==n)s.name="".concat(s.name,"&filter[date]=").concat(n);else{var c=n.split("/");s.name=""!=c[1]?"".concat(s.name,'&filter[date]=custom&filter[between]=["').concat(c[0],' 00:00:00", "').concat(c[1],' 23:59:59"]'):"".concat(s.name,'&filter[date]=custom&filter[between]=["').concat(c[0],' 00:00:00", "').concat(c[0],' 23:59:59"]')}i&&(s.name="".concat(s.name,"&filter[txnSource]=").concat(i)),r&&(s.name="".concat(s.name,"1"==r?"&filter[paymentIn]=true":"&filter[paymentOut]=true")),o&&(s.name="".concat(s.name,"&filter[transactionId]=").concat(o));var l=(new Date).toISOString();return s.timestamp="".concat(l),this.http.get("".concat(a.N.apiUrlv7).concat(s.name))}},{key:"requestStatement",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.http.post("".concat(a.N.apiUrlv7,"statements/statementRequests"),e)}},{key:"pollStatementRequests",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return this.http.get("".concat(a.N.apiUrlv7,"statements/statementRequests/poll?request_ids=").concat(e.join(",")))}},{key:"getStatementArchive",value:function(e){return this.http.get("".concat(a.N.apiUrlv7,"statements/statementRequests/archive?year=").concat(e))}},{key:"downloadStatementFile",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"excel",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return this.http.get("".concat(a.N.apiUrlv7,"statements/statementRequests/download/").concat(e,"?format=").concat(n),{observe:"response",responseType:"blob"}).pipe((0,w.U)(function(e){var r=e.headers.get("content-disposition")||"",a="pdf"===n?"pdf":"xlsx";return{blob:new Blob([e.body]),filename:t.getDownloadFilename(r,i||"statement.".concat(a))}}))}},{key:"getDownloadFilename",value:function(e,t){var n=/filename\*=UTF-8''([^;]+)/i.exec(e);if(n&&n[1])return decodeURIComponent(n[1].replace(/"/g,""));var i=/filename="?([^"]+)"?/i.exec(e);return i&&i[1]?i[1].replace(/;$/,""):t}},{key:"exportProductsPDF",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",a=this._authService.updSNAEnvURL("v6")+"statements/balanceStatement?filter[".concat(i,"]=true");if(e&&""!=e)if("today"==e||"yesterday"==e||"week"==e||"month"==e||"year"==e)a="".concat(a,"&filter[date]=").concat(e);else{var o=e.split("/");a=""!=o[1]?"".concat(a,'&filter[date]=custom&filter[between]=["').concat(o[0],' 00:00:00", "').concat(o[1],' 23:59:59"]'):"".concat(a,'&filter[date]=custom&filter[between]=["').concat(o[0],' 00:00:00", "').concat(o[0],' 23:59:59"]')}return t&&(a="".concat(a,"&filter[txnSource]=").concat(encodeURIComponent(t))),n&&(a="".concat(a,"1"==n?"&filter[paymentIn]=true":"&filter[paymentOut]=true")),r&&(a="".concat(a,"&filter[transactionId]=").concat(r)),this.http.get("".concat(a),{observe:"response",responseType:"blob"}).pipe((0,w.U)(function(e){return new Blob([e.body])}))}},{key:"buildStatementDownloadName",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"excel",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i="pdf"===t?"pdf":"xlsx",r=["January","February","March","April","May","June","July","August","September","October","November","December"],a=new Date,o=Number((null==e?void 0:e.month)||a.getMonth()+1),s=Number(null!=e&&e.isCurrent?a.getFullYear():n||a.getFullYear()),c=r[Math.max(0,Math.min(11,o-1))]||r[a.getMonth()];return this.generateAccountStatementFileName(c,s,i)}},{key:"downloadAndSaveStatement",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"excel",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,a="";i&&(null==i?void 0:i.file_name)&&(a=null==i?void 0:i.file_name,a="".concat(a,".").concat("pdf"===n?"pdf":"xlsx"));var o=a||this.buildStatementDownloadName(i,n,r);return this.downloadStatementFile(e,n,o).pipe((0,w.U)(function(e){return null!=e&&e.blob&&(0,P.saveAs)(e.blob,a||e.filename||o),t._commonHelperService.disDynmcTransSuccMsg({resSuccMsg:"STATEMENT_READY_TO_DOWNLOAD"}),e}))}},{key:"generateAccountStatementFileName",value:function(e,t,n){var i;return"AcctStatement_".concat((null==e?void 0:e.substring(0,3))||"").concat((null===(i=String(t||""))||void 0===i?void 0:i.slice(-2))||"","_").concat(Date.now(),".").concat(n)}}]),e}();return e.\u0275fac=function(t){return new(t||e)(c.LFG(u.eN),c.LFG(i.$),c.LFG(r.$))},e.\u0275prov=c.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e}(),V=function(){var e=function(){function e(t,n){s(this,e),this.http=t,this._authService=n}return l(e,[{key:"getId",value:function(){var e,t;return this.id=null===(e=this._authService)||void 0===e||null===(t=e.currentUserValue)||void 0===t?void 0:t.id,this.id}},{key:"getMerchantSetting",value:function(){return this.getId(),this.http.get("".concat(this._authService.updSNAEnvURL("v5"),"settings?filter[where][key][inq][0]=allowed_countries&filter[where][key][inq][1]=geofencing&filter[where][key][inq][2]=proxy_checker&filter[fields][0]=key&filter[fields][1]=value"))}},{key:"getSubMerchantsListing",value:function(){return this.getId(),this.http.get("".concat(this._authService.updSNAEnvURL("v5"),"users/submerchantList"))}},{key:"getCountryFromLatLong",value:function(e,t){var n,i,r;return this.http.get("".concat(a.N.googleMapAPIURL,"/json?latlng=").concat(e,",").concat(t,"&result_type=country&key=").concat(null===(n=this._authService)||void 0===n||null===(i=n.currentUserValue)||void 0===i||null===(r=i.clientConfig)||void 0===r?void 0:r.googleMapAPIKey))}},{key:"sendOtp",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n="";"unlink_merchant"==e?n="usermetaauths/resendotp?type=unlinkmerchantotp":"link_merchant"==e?n="usermetaauths/resendotp?type=linkmerchantotp&linkMerchantSadadId=".concat(t.merSadadId):"create_merchant"==e&&(n="usermetaauths/resendotp?type=createsubmerchantotp");var i=n;return this.http.get("".concat(this._authService.updSNAEnvURL("v5")).concat(i))}},{key:"unlinkMerchant",value:function(e){var t={name:"users/unlinkChildMerchant",method:"POST",data:e};return this.http.post("".concat(this._authService.updSNAEnvURL("v5")).concat(t.name),t.data)}},{key:"linkMerchant",value:function(e){this.getId();var t={name:"usermetaauths/verify",method:"POST",data:{linkmerchantotp:e.otp,userId:this.id,SadadId:e.merSadadId}};return this.http.post("".concat(this._authService.updSNAEnvURL("v5")).concat(t.name),t.data)}},{key:"uploadSignature",value:function(e){var t=e.name.lastIndexOf("."),n=new FormData;return n.append("file",e,e.name.slice(0,t).replaceAll(".","_")+e.name.slice(t,e.name.length)),this.http.post("".concat(this._authService.updSNAEnvURL("v6"),"upload_image/api-signature"),n)}},{key:"createMerchant",value:function(e){this.getId();var t={name:"users/createSubMerchant",method:"POST",data:e};return this.http.post("".concat(this._authService.updSNAEnvURL("v5")).concat(t.name),t.data)}},{key:"switchToChildMerchant",value:function(e){this.getId();var t={name:"users/switchChildMerchant",method:"POST",data:{SadadId:e}};return this.http.post("".concat(this._authService.updSNAEnvURL("v5")).concat(t.name),t.data)}},{key:"setMerchantAsDefault",value:function(e){var t={name:"users/markSubmerchantDefault",method:"POST",data:e};return this.http.post("".concat(this._authService.updSNAEnvURL("v5")).concat(t.name),t.data)}}]),e}();return e.\u0275fac=function(t){return new(t||e)(c.LFG(u.eN),c.LFG(i.$))},e.\u0275prov=c.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e}(),F=function(){var e=function(){function e(t,n){s(this,e),this.http=t,this._authService=n,this.getId()}return l(e,[{key:"getId",value:function(){var e,t;return this.id=null===(e=this._authService)||void 0===e||null===(t=e.currentUserValue)||void 0===t?void 0:t.id,this.id}},{key:"getBatchSummaryListing",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";this.getId(),"/"==n&&(n="");var i={name:"terminals/terminalBatchSummary",method:"GET"};if(i.data="filter[skip]=".concat(e,"&filter[limit]=").concat(t,"&filter[count]=true"),n)if(n.includes("/")){var r=n.split("/");i.data=""!=r[1]?n.includes(":")?"".concat(i.data,'&filter[date]=custom&filter[between]=["').concat(r[0],'", "').concat(r[1],'"]'):"".concat(i.data,'&filter[date]=custom&filter[between]=["').concat(r[0],' 00:00:00", "').concat(r[1],' 23:59:59"]'):"".concat(i.data,'&filter[date]=custom&filter[between]=["').concat(r[0],' 00:00:00", "').concat(r[0],' 23:59:59"]')}else i.data="".concat(i.data,"&filter[date]=").concat(n);return this.http.get("".concat(this._authService.updSNAEnvURL("v5")).concat(i.name,"?").concat(i.data))}},{key:"downloadSendReport",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";this.getId();var i="".concat(this._authService.updSNAEnvURL("v5"));if(i="".concat(i,"reporthistories/terminalBatch?filter[order]=created DESC&isExcel=true"),"email"==e&&(i="".concat(i,"&filter[isEmail]=true")),"/"==t&&(t=""),t)if(t.includes("/")){var r=t.split("/");i=""!=r[1]?t.includes(":")?"".concat(i,'&filter[date]=custom&filter[between]=["').concat(r[0],'", "').concat(r[1],'"]'):"".concat(i,'&filter[date]=custom&filter[between]=["').concat(r[0],' 00:00:00", "').concat(r[1],' 23:59:59"]'):"".concat(i,'&filter[date]=custom&filter[between]=["').concat(r[0],' 00:00:00", "').concat(r[0],' 23:59:59"]')}else i="".concat(i,"&filter[date]=").concat(t);return n&&(i="".concat(i,"&filter[terminalId]=").concat(n)),this.http.get(i,{observe:"response",responseType:"blob"}).pipe((0,w.U)(function(e){return new Blob([e.body])}))}}]),e}();return e.\u0275fac=function(t){return new(t||e)(c.LFG(u.eN),c.LFG(i.$))},e.\u0275prov=c.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e}(),Y=function(){var e=function(){function e(t){s(this,e),this._paymentServiceTypeServices=t}return l(e,[{key:"resolve",value:function(){var e,t;"online-payment"!=(null===(e=this._paymentServiceTypeServices)||void 0===e||null===(t=e.paymentService)||void 0===t?void 0:t.value)&&this._paymentServiceTypeServices.changeServiceType("online-payment")}}]),e}();return e.\u0275fac=function(t){return new(t||e)(c.LFG(_.Y))},e.\u0275prov=c.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e}(),j=function(){var e=function(){function e(t,n){s(this,e),this.http=t,this._authenticationService=n,this.mapSdSerLogoIdUrl={}}return l(e,[{key:"getId",value:function(){}},{key:"getAPIUrl",value:function(){return a.N.apiUrlv6}},{key:"getSadadServices",value:function(){return this.http.get("".concat(a.N.apiUrlv6,"sadadservices/listing?filter[order]=id%20ASC&filter[where][type]=1&filter[include][0][service_details]=frequency_details&filter[include][1][service_purchase_details]=purchase_frequency_details&filter[order]=is_most_purchased%20DESC&filter[where][status]=1"))}},{key:"getSadadSerSubscriptions",value:function(){return this.http.get("".concat(this.getAPIUrl(),"sadadservices/purchasedlist?filter[skip]=0&filter[limit]=10000&filter[order]=id%20DESC&filter[include][0]=sadad_services&f
1ilter[include][1]=billing_cycle&filter[include][2]=transactionmode"))}},{key:"getBillingInvoices",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:-1,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"",s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"",c=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"en",l={};if(l.name="sadadservices/invoicelist?filter[skip]=".concat(e,"&filter[limit]=").concat(t,"&filter[order]=id%20DESC"),""!=n){var u=n.split("/");l.name=""!=u[1]?"".concat(l.name,"&filter[start_date]=").concat(u[0],"&filter[end_date]=").concat(u[1]):"".concat(l.name,"&filter[start_date]=").concat(u[0],"&filter[end_date]=").concat(u[0])}return-1!=i&&(l.name="".concat(l.name,"&where[invoicestatusId]=").concat(i)),""!=r&&(l.name="ar"==c?"".concat(l.name,"&filter[service_name_ar]=").concat(r):"".concat(l.name,"&filter[service_name]=").concat(r)),""!=o&&(l.name="".concat(l.name,"&where[invoiceno]=").concat(o)),""!=s&&(l.name="".concat(l.name,"&filter[order_number]=").concat(s)),this.http.get("".concat(a.N.apiUrlv6).concat(l.name))}},{key:"downloadBillingInvoice",value:function(e,t){return this.http.get("".concat(a.N.apiUrlv6,"sadadservices/singleInvoicePdfExport?filter[where][language]=").concat(t,"&filter[where][invoiceno]=").concat(e),{observe:"response",responseType:"blob"}).pipe((0,w.U)(function(e){return new Blob([e.body])}))}},{key:"exportProductsPDF",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"",o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"en",s=this.getAPIUrl()+"sadadservices/exports?exp
1orts[".concat(a,"]=1&filter[order]=id%20DESC");if(""!=e){var c=e.split("/");s=""!=c[1]?"".concat(s,"&filter[start_date]=").concat(c[0],"&filter[end_date]=").concat(c[1]):"".concat(s,"&filter[start_date]=").concat(c[0],"&filter[end_date]=").concat(c[0])}return-1!=t&&(s="".concat(s,"&where[invoicestatusId]=").concat(t)),""!=n&&(s="ar"==o?"".concat(s,"&filter[service_name_ar]=").concat(n):"".concat(s,"&filter[service_name]=").concat(n)),""!=i&&(s="".concat(s,"&where[invoiceno]=").concat(i)),""!=r&&(s="".concat(s,"&filter[order_number]=").concat(r)),this.http.get("".concat(s),{observe:"response",responseType:"blob"}).pipe((0,w.U)(function(e){return new Blob([e.body])}))}},{key:"purchaseServiceAPI",value:function(e){var t={};return t.data=e,t.name="sadadservices/purchaseservice",this.http.post("".concat(a.N.apiUrlv6).concat(t.name),t.data)}},{key:"getTraxInfoAPI",value:function(e){var t={name:"sadadservices/purchaseservicecallback"};return t.data={transaction_id:e},this.http.post("".concat(this.getAPIUrl()).concat(t.name),t.data)}},{key:"cancelSdSerSubsAPI",value:function(e){var t={};return t.data=e,t.name="sadadservices/cancelservice",this.http.patch("".concat(a.N.apiUrlv6).concat(t.name),t.data)}},{key:"getTermsCond",value:function(){return this.http.get("".concat(a.N.apiUrlv6,"sadadservices/termsconditions"))}},{key:"getSdSerLogo",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";this.getId();var t="".concat(this._authenticationService.updSNAEnvURL("v5"),"containers/api-businesslogo/download/").concat(e);try{return this.http.get(t,{observe:"response",responseType:"blob"}).pipe((0,w.U)(function(e){return new Blob([e.body])}))}catch(n){console.log("Logo download errro : "+n)}}}]),e}();return e.\u0275fac=function(t){return new(t||e)(c.LFG(u.eN),c.LFG(i.$))},e.\u0275prov=c.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e}(),H=n(71178),J=function(){var e=function(){function e(t){s(this,e),this.spinner=t,this.spinnerCount=0}return l(e,[{key:"showSpinner",value:function(){this.spinnerCount++,1===this.spinnerCount&&this.spinner.show()}},{key:"hideSpinner",value:function(){this.spinnerCount>0&&(this.spinnerCount--,0===this.spinnerCount&&this.spinner.hide())}},{key:"resetSpinner",value:function(){this.spinnerCount=0}}]),e}();return e.\u0275fac=function(t){return new(t||e)(c.LFG(H.t2))},e.\u0275prov=c.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e}(),B=function(){var e=function(){function e(t,n){s(this,e),this.http=t,this._authenticationService=n,this.orderCountsSubject=new A.X({pendingCount:0,totalCount:0}),this.orderCounts$=this.orderCountsSubject.asObservable(),this.shipSettingsSubject=new A.X(null),this.shipSettings$=this.shipSettingsSubject.asObservable()}return l(e,[{key:"getId",value:function(){}},{key:"getShippingSettings",value:function(e){var t=this;return this.http.get("".concat(a.N.apiUrlv7,"shipping_delivery/settings").concat(e?"?type=".concat(e):"")).pipe((0,w.U)(function(e){return null!=e&&e.data&&t.setShipSettings(e.data),e}))}},{key:"getShippingTnC",value:function(){return this.http.get("".concat(a.N.apiUrlv7,"shipping_delivery/get-terms-and-conditions"))}},{key:"submitShippingTnC",value:function(e){var t={};return t.data=e,t.name="shipping_delivery/accept-terms-and-conditions",this.http.post("".concat(a.N.apiUrlv7).concat(t.name),t.data)}},{key:"updateShippingSettings",value:function(e){var t={};return t.data=e,t.name="shipping_delivery/settings",this.http.post("".concat(a.N.apiUrlv7).concat(t.name),t.data)}},{key:"setShipSettings",value:function(e){this.shipSettingsSubject.next(e)}},{key:"getShipSettingsSnapshot",value:function(){return this.shipSettingsSubject.value}},{key:"getInternationalRates",value:function(){return this.http.get("".concat(a.N.apiUrlv7,"shipping_delivery/international_rates?filter[skip]=0&filter[limit]=1000"))}},{key:"getPickupLocations",value:function(){return this.http.get("".concat(a.N.apiUrlv7,"shipping_delivery/pickup-sources?filter[skip]=0&filter[limit]=1000"))}},{key:"getShippingZones",value:function(){return this.http.get("".concat(a.N.apiUrlv7,"shipping_delivery/zones"))}},{key:"createPickupLocation",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i={};i.data=e,i.name=t?"shipping_delivery/pickup-sources/".concat(n):"shipping_delivery/pickup-sources";var r="".concat(a.N.apiUrlv7).concat(i.name);return t?this.http.patch(r,i.data):this.http.post(r,i.data)}},{key:"updatePickupLocation",value:function(e,t){var n={};return n.name="shipping_delivery/pickup-sources/".concat(e),this.http.patch("".concat(a.N.apiUrlv7).concat(n.name),n.data)}},{key:"deletePickupLocation",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n={},i="shipping_delivery/pickup-sources/".concat(e);return t&&(i="".concat(i,"?set_default_loc_id=").concat(t)),n.name=i,this.http.delete("".concat(a.N.apiUrlv7).concat(n.name),n.data)}},{key:"setDefaultPickupLocation",value:function(e){var t={};return t.data=e,t.name="shipping_delivery/pickup-sources/set-default",this.http.post("".concat(a.N.apiUrlv7).concat(t.name),t.data)}},{key:"getShippingOrders",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"",s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"",c=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"",l=arguments.length>8&&void 0!==arguments[8]?arguments[8]:-1,u=arguments.length>9&&void 0!==arguments[9]?arguments[9]:-1,d=arguments.length>10&&void 0!==arguments[10]?arguments[10]:-1,p=arguments.length>11&&void 0!==arguments[11]?arguments[11]:-1,v=arguments.length>12&&void 0!==arguments[12]?arguments[12]:"",h=arguments.length>13&&void 0!==arguments[13]?arguments[13]:"",g={};return g.name=h?"shipping_delivery/order-listing?filter[skip]=0&filter[limit]=1000000":"shipping_delivery/order-listing?filter[skip]=".concat(e,"&filter[limit]=").concat(t),this.appendOrderListingDateFilter(g,n),""!=i&&(g.
1name="".concat(g.name,"&filter[where][shipping_number]=").concat(encodeURIComponent(i))),""!=v&&(g.name="".concat(g.name,"&filter[where][transaction_number]=").concat(encodeURIComponent(v))),""!=r&&(g.name="".concat(g.name,"&filter[where][customer_name]=").concat(r)),""!=o&&(g.name="".concat(g.name,"&filter[where][customer_mobile]=").concat(o)),""!=s&&(g.name="".concat(g.name,"&filter[where][tracking_id]=").concat(s)),""!=c&&(g.name="".concat(g.name,"&filter[where][product_type]=").concat(c)),-1!=l&&(g.name="".concat(g.name,"&filter[where][delivery_status]=").concat(l)),-1!=u&&(g.name="".concat(g.name,"&filter[where][is_domestic]=").concat(u)),-1!=d&&(g.name="".concat(g.name,"&filter[where][transaction_source]=").concat(d)),-1!==p&&null!==p&&(g.name="".concat(g.name,"&filter[where][is_delivery_promotion_applied]=").concat(!0===p?1:0)),h&&(g.name="".concat(g.name,"&").concat(h,"=true")),h?this.http.get("".concat(a.N.apiUrlv7).concat(g.name),{observe:"response",responseType:"blob"}).pipe((0,w.U)(function(e){return new Blob([e.body])})):this.http.get("".concat(a.N.apiUrlv7).concat(g.name))}},{key:"getShippingOrdersCounts",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t={name:"shipping_delivery/order-listing/kpis"};return this.appendOrderListingDateFilter(t,e,!0),this.http.get("".concat(a.N.apiUrlv7).concat(t.name))}},{key:"appendOrderListingDateFilter",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(t){var i=n&&!e.name.includes("?")?"?":"&";if("today"!=t&&"yesterday"!=t&&"week"!=t&&"month"!=t&&"year"!=t){var r=t.split("/");e.name=""!=r[1]?"".concat(e.name).concat(i,'filter[date]=custom&filter[between]=["').concat(r[0],' 00:00:00", "').concat(r[1],' 23:59:59"]'):"".concat(e.name).concat(i,'filter[date]=custom&filter[between]=["').concat(r[0],' 00:00:00", "').concat(r[0],' 23:59:59"]')}else e.name="".concat(e.name).concat(i,"filter[date]=").concat(t)}}},{key:"getShippingPendingOrderCount",value:function(){return this.http.get("".concat(a.N.apiUrlv7,"shipping_delivery/ready-for-pickup/pending-count"))}},{key:"getShipTrackingByOrder",value:function(e){var t={};return t.name="shipping_delivery/shipment-history?shipment_id=".concat(e),this.http.get("".concat(a.N.apiUrlv7).concat(t.name))}},{key:"exportOrderReceipt",value:function(e){var t="".concat(a.N.apiUrlv7,"shipping_delivery/delivery-addresses-export?shipping_number=").concat(e);try{return this.http.get(t,{observe:"response",responseType:"blob"}).pipe((0,w.U)(function(e){return new Blob([e.body])}))}catch(n){console.log("export pdf : "+n)}}},{key:"exportDeliveryLabel",value:function(e){var t="".concat(a.N.apiUrlv7,"shipping_delivery/delivery-label-pdf?shipping_number=").concat(encodeURIComponent(e));return this.http.get(t,{observe:"response",responseType:"blob"}).pipe((0,w.U)(function(e){return new Blob([e.body],{type:"application/pdf"})}))}},{key:"setReadyForPickup",value:function(e){var t={};return t.data=e,t.name="shipping_delivery/ready-for-pickup",this.http.patch("".concat(a.N.apiUrlv7).concat(t.name),t.data)}},{key:"cancelShippingOrderAPI",value:function(e){var t={};return t.data=e,t.name="transactions/cancleShippingOrder",this.http.post("".concat(a.N.apiUrlv7).concat(t.name),t.data)}},{key:"calculateShipping",value:function(e,t){var n={};return n.name="shipping_delivery/shipping/calculate?weight=".concat(e,"&country_code=").concat(t),this.http.get("".concat(a.N.apiUrlv7).concat(n.name))}},{key:"updateOrderCounts",value:function(e){var t=this.orderCountsSubject.value||{};this.orderCountsSubject.next({pendingCount:void 0!==(null==e?void 0:e.pendingCount)?e.pendingCount:t.pendingCount,totalCount:void 0!==(null==e?void 0:e.totalCount)?e.totalCount:t.totalCount})}},{key:"getProductTypes",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n={};return n.name="shipping_delivery/hs_codes?filter[skip]=".concat(e,"&filter[limit]=10&filter[order]=description ASC"),t&&(n.name="".concat(n.name,"&search=").concat(t)),this.http.get("".concat(a.N.apiUrlv7).concat(n.name))}},{key:"callValidateBalance",value:function(e){var t={};return t.data=e,t.name="shipping_delivery/request-delivery/validate-balance",this.http.post("".concat(a.N.apiUrlv7).concat(t.name),t.data)}},{key:"getUniqueKeyReqDelivery",value:function(){var e,t;return"req-delivery-".concat(null===(e=this._authenticationService)||void 0===e||null===(t=e.currentUserValue)||void 0===t?void 0:t.SadadId,"-").concat(Date.now())}},{key:"callReqDeliverySubmit",value:function(e){var t={};return t.data=e,t.name="shipping_delivery/request-delivery/submit",this.http.post("".concat(a.N.apiUrlv7).concat(t.name),t.data)}},{key:"callReqDeliveryPollStatus",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t="".concat(a.N.apiUrlv7,"shipping_delivery/request-delivery/poll-status");return null!=e&&e.length&&(t="".concat(t,"?request_ids=").concat(Array.isArray(e)?e.join(","):e)),this.http.get(t)}},{key:"callReqDeliveryCancel",value:function(e){var t={};return t.data=e,t.name="shipping_delivery/request-delivery/cancel",this.http.post("".concat(a.N.apiUrlv7).concat(t.name),t.data)}}]),e}();return e.\u0275fac=function(t){return new(t||e)(c.LFG(u.eN),c.LFG(i.$))},e.\u0275prov=c.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e}(),W=n(59938),G=function(){var e=function(){function e(t,n,i,r,a){s(this,e),this._authService=t,this._commonHelperService=n,this._notificationService=i,this._shippingService=r,this.router=a,this.toastDisplayTime=5e3,this.suppressTerminalToastIds=new Set}return l(e,[{key:"startAfterModal",value:function(e){var t,n=((null==e?void 0:e.transaction_id)||"").toString().trim();n&&(null===(t=this._authService)||void 0===t?void 0:t.currentUserValue)&&(this.suppressTerminalToastIds.delete(n),this._commonHelperService.updateReqDeliveryPollIds("add",[n]))}},{key:"noteSubmitTerminal",value:function(e){var t=((null==e?void 0:e.transaction_id)||"").toString().trim();t&&(this.suppressTerminalToastIds.add(t),this._commonHelperService.updateReqDeliveryPollIds("remove",[t])),this._notificationService.refreshHoverList()}},{key:"pollIfNeeded",value:function(){var e,t,n,i,r=this;if(null!==(e=this._authService)&&void 0!==e&&e.currentUserValue&&null!==(t=this._authService)&&void 0!==t&&t.loginUserValue){var a=(null===(n=this._authService)||void 0===n||null===(i=n.loginUserValue)||void 0===i?void 0:i.reqDeliveryPollIds)||[];(null==a?void 0:a.length)&&this._shippingService.callReqDeliveryPollStatus(a).subscribe({next:function(e){var t;(null===(t=r._authService)||void 0===t?void 0:t.currentUserValue)&&r.handleBulkPoll(e)},error:function(){}})}}},{key:"handleBulkPoll",value:function(e){var t,n=this;if(null!==(t=this._authService)&&void 0!==t&&t.currentUserValue){var i=Array.isArray(null==e?void 0:e.data)?e.data:[],r=[];
1i.forEach(function(e){var t=((null==e?void 0:e.transaction_id)||"").toString(),i=((null==e?void 0:e.status)||"").toString();if(t&&i&&"pending"!==i)if("success"===i){if(r.push(t),n.suppressTerminalToastIds.has(t))return void n.suppressTerminalToastIds.delete(t);n.showConfirmedToast(),n.afterPollTerminal()}else if("retry_available"===i||"failed"===i){if(r.push(t),n.suppressTerminalToastIds.has(t))return void n.suppressTerminalToastIds.delete(t);var a=n._commonHelperService.getSafeInstantTranslationKeyVal("REQ_DELIVERY_ORDER_NOT_PLACED");n._commonHelperService.toastr.error(a||"REQ_DELIVERY_ORDER_NOT_PLACED","",n.toastDisplayTime,"end"),n.afterPollTerminal()}else if("failed_refunded"===i){if(r.push(t),n.suppressTerminalToastIds.has(t))return void n.suppressTerminalToastIds.delete(t);var o=n._commonHelperService.getSafeInstantTranslationKeyVal("REQ_DELIVERY_ORDER_NOT_PLACED");n._commonHelperService.toastr.error(o||"REQ_DELIVERY_ORDER_NOT_PLACED","",n.toastDisplayTime,"end"),n.afterPollTerminal()}}),r.length&&this._commonHelperService.updateReqDeliveryPollIds("remove",r)}}},{key:"afterPollTerminal",value:function(){this._notificationService.refreshHoverList(),this.isOnShippingPage()&&this._notificationService.requestShipOrdersRefresh()}},{key:"isOnShippingPage",value:function(){var e;return((null===(e=this.router)||void 0===e?void 0:e.url)||"").toString().includes("/merchantpanel/shipping")}},{key:"showConfirmedToast",value:function(){var e,t,n,i,r,a=this;if(null!==(e=this._authService)&&void 0!==e&&e.currentUserValue){var o=this._commonHelperService.getSafeInstantTranslationKeyVal("REQ_DELIVERY_ORDER_CONFIRMED"),s=this._commonHelperService.getSafeInstantTranslationKeyVal("VIEW_DETAILS")||"VIEW_DETAILS";null===(t=this._commonHelperService.toastr.success(o||"REQ_DELIVERY_ORDER_CONFIRMED",s,this.toastDisplayTime,"","end"))||void 0===t||null===(n=t.onAction)||void 0===n||null===(i=n.call(t))||void 0===i||null===(r=i.subscribe)||void 0===r||r.call(i,function(){var e;(null===(e=a._authService)||void 0===e?void 0:e.currentUserValue)&&(a.isOnShippingPage()?a._notificationService.requestShipOrdersRefresh():a.router.navigateByUrl((0,W.o)("")))})}}}]),e}();return e.\u0275fac=function(t){return new(t||e)(c.LFG(i.$),c.LFG(r.$),c.LFG(R),c.LFG(B),c.LFG(D.F0))},e.\u0275prov=c.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e}()},59642:function(e,t,n){"use strict";n.d(t,{q:function(){return p}});var i=n(529),r=n(91681),a=n(29609),o=n(35366),c=n(42693),u=n(52105),d=n(15940),p=function(){var e=function(){function e(t,n,i){s(this,e),this.http=t,this._authService=n,this._dateFormater=i,this.getId()}return l(e,[{key:"getId",value:function(){}},{key:"createInvoice",value:function(e){var t,n,r,a,o,s,c,l,u,d,p={};return p.data=e,p.name="invoices",p.method="POST",1===(null===(t=this._authService)||void 0===t||null===(n=t.currentUserValue)||void 0===n?void 0:n.roleId)?(p.data.invoicesenderId=(null===(r=this._authService)||void 0===r||null===(a=r.currentUserValue)||void 0===a?void 0:a.id)||0,p.data.createdby=(null===(o=this._authService)||void 0===o||null===(s=o.currentUserValue)||void 0===s?void 0:s.id)||0):(p.data.invoicesenderId=(null===(c=this._authService)||void 0===c||null===(l=c.currentUserValue)||void 0===l?void 0:l.mainMerchantId)||0,p.data.createdby=(null===(u=this._authService)||void 0===u||null===(d=u.currentUserValue)||void 0===d?void 0:d.id)||0),this.http.post("".concat(i.N.apiUrlv7).concat(p.name),p.data)}},{key:"getInvoiceList",value:function(){var e,t,n,r,a,o,s,c,l=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10,u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,d=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"month",p=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",v=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",h=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"",g=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"",m=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"",f=arguments.length>8&&void 0!==arguments[8]?arguments[8]:"",_=arguments.length>9&&void 0!==arguments[9]?arguments[9]:"-1",y=arguments.length>10&&void 0!==arguments[10]?arguments[10]:"-1",S=arguments.length>11&&void 0!==arguments[11]?arguments[11]:"",b=arguments.length>12&&void 0!==arguments[12]?arguments[12]:"",w=arguments.length>13&&void 0!==arguments[13]?arguments[13]:-1,I=arguments.length>14&&void 0!==arguments[14]?arguments[14]:-1,T=arguments.length>15&&void 0!==arguments[15]?arguments[15]:"",E={name:"invoices/optimizeInvoicesList",method:"GET"};if(E.data=1===(null===(e=this._authService)||void 0===e||null===(t=e.currentUserValue)||void 0===t?void 0:t.roleId)?"filter[where][invoicesenderId]=".concat((null===(n=this._authService)||void 0===n||null===(r=n.currentUserValue)||void 0===r?void 0:r.id)||0):(null!==(a=this._authService)&&void 0!==a&&null!==(o=a.currentUserValue)&&void 0!==o&&o.roleId,"filter[where][invoicesenderId]=".concat((null===(s=this._authService)||void 0===s||null===(c=s.currentUserValue)||void 0===c?void 0:c.mainMerchantId)||0)),""!=d)if("today"==d||"yesterday"==d||"week"==d||"month"==d||"year"==d)E.data="".concat(E.data,"&filter[where][datefilter]=").concat(d);else{var k=d.split("/");E.data=""!=k[1]?"".concat(E.data,'&filter[where][datefilter]=custom&filter[where][between]=["').concat(k[0],' 00:00:00", "').concat(k[1],' 23:59:59"]'):"".concat(E.data,'&filter[where][datefilter]=custom&filter[where][between]=["').concat(k[0],' 00:00:00", "').concat(k[0],' 23:59:59"]')}if(v&&(E.data="".concat(E.data,"&filter[where][transactionId]=").concat(v)),h&&(E.data="".concat(E.data,"&filter[where][invoiceno][like]=%").concat(h,"%")),""!=S&&(E.data="".concat(E.data,"&filter[where][description]=").concat(S)),""!=b&&(E.data="".concat(E.data,"&filter[where][description]=").concat(b)),"-1"!=p)switch(p){case"1":E.data="".concat(E.data,"&filter[where][invoicestatusId]=1");break;case"2":E.data="".concat(E.data,"&filter[where][invoicestatusId]=2");break;case"3":E.data="".concat(E.data,"&filter[where][invoicestatusId]=3");break;case"4":E.data="".concat(E.data,"&filter[where][invoicestatusId]=4");break;case"5":E.data="".concat(E.data,"&filter[where][invoicestatusId]=5")}return g&&(E.data=g.includes(" ")?"".concat(E.data,"&filter[where][clientname]=").concat(g):"".concat(E.data,"&filter[where][clientname][like]=%").concat(g,"%")),m&&(E.data="".concat(E.data,"&filter[where][emailaddress][like]=%").concat(m,"%")),f&&(E.data="".concat(E.data,"&filter[where][cellno][like]=%").concat(f,"%")),"-1"!=_&&(E.data="".concat(E.data,"&filter[where][sourceofinvoice]=").concat(_)),"-1"!=y&&null!=y&&(E.data="".concat(E.data,"&filter[where][is_terminal_invoice]=").concat(y)),-1!=w&&(E.data="".concat(E.data,"&filter[where][createdby]=").concat(w)),-1!=I&&null!=I&&(E.data="".concat(E.data,"&filter[where][isShipping]=").concat(I
1)),T&&(E.data="".concat(E.data,"&filter[where][terminal_id]=").concat(T)),E.data="".concat(E.data,"&filter[include][0]=invoicedetails&filter[include][1]=invoicesenderId&filter[include][2]=invoicestatus&filter[include][3]=invoicereceiverId&filter[include][4]=user&filter[where][isrentalplaninvoice]=0&filter[where][recurring_freq]=none&filter[where][subsinvoiceId]=0"),E.data="".concat(E.data,"&filter[order]=created DESC&filter[skip]=").concat(u,"&filter[limit]=").concat(l),this.http.get("".concat(i.N.apiUrlv7).concat(E.name,"?").concat(E.data))}},{key:"getCount",value:function(){var e,t,n,r,a,o,s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"month",c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",u=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",d=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",p=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"",v=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"",h=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"",g=arguments.length>8&&void 0!==arguments[8]?arguments[8]:"-1",m=arguments.length>9&&void 0!==arguments[9]?arguments[9]:"",f=arguments.length>10&&void 0!==arguments[10]?arguments[10]:"",_=arguments.length>11&&void 0!==arguments[11]?arguments[11]:"",y={name:"invoices/counts",method:"GET",apiVer:"v6"};if(y.data=1===(null===(e=this._authService)||void 0===e||null===(t=e.currentUserValue)||void 0===t?void 0:t.roleId)?"where[invoicesenderId]=".concat((null===(n=this._authService)||void 0===n||null===(r=n.currentUserValue)||void 0===r?void 0:r.id)||0):"where[invoicesenderId]=".concat((null===(a=this._authService)||void 0===a||null===(o=a.currentUserValue)||void 0===o?void 0:o.mainMerchantId)||0),y.data="".concat(y.data,"&where[isrentalplaninvoice]=0&where[recurring_freq]=none&where[subsinvoiceId]=0"),""!=s)if("today"==s||"yesterday"==s||"week"==s||"month"==s||"year"==s)y.data="".concat(y.data,"&where[datefilter]=").concat(s);else{var S=s.split("/");y.data=""!=S[1]?"".concat(y.data,'&where[datefilter]=custom&where[between]=["').concat(S[0],' 00:00:00", "').concat(S[1],' 23:59:59"]'):"".concat(y.data,'&where[datefilter]=custom&where[between]=["').concat(S[0],' 00:00:00", "').concat(S[0],' 23:59:59"]')}if(l&&(y.data="".concat(y.data,"&where[transactionId]=").concat(l)),u&&(y.data="".concat(y.data,"&where[invoiceno][like]=%").concat(u,"%")),"-1"!=c)switch(c){case"1":y.data="".concat(y.data,"&where[invoicestatusId]=1");break;case"2":y.data="".concat(y.data,"&where[invoicestatusId]=2");break;case"3":y.data="".concat(y.data,"&where[invoicestatusId]=3");break;case"4":y.data="".concat(y.data,"&where[invoicestatusId]=4");break;case"5":y.data="".concat(y.data,"&where[invoicestatusId]=5")}d&&(y.data=d.includes(" ")?"".concat(y.data,"&where[clientname]=").concat(d):"".concat(y.data,"&where[clientname][like]=%").concat(d,"%")),p&&(y.data="".concat(y.data,"&where[emailaddress][like]=%").concat(p,"%")),v&&(y.data="".concat(y.data,"&where[cellno][like]=%").concat(v,"%")),h&&"-1"!=h&&(y.data="".concat(y.data,"&where[sourceofinvoice]=").concat(h)),"-1"!=g&&null!=g&&(y.data="".concat(y.data,"&where[is_terminal_invoice]=").concat(g)),""!=m&&(y.data="".concat(y.data,"&where[description]=").concat(m)),""!=f&&(y.data="".concat(y.data,"&where[description]=").concat(f)),_&&(y.data="".concat(y.data,"&where[terminal_id]=").concat(_));var b=(new Date).toISOString();return y.timestamp="".concat(b),this.http.get("".concat(i.N.apiUrlv7).concat(y.name,"?").concat(y.data))}},{key:"searchName",value:function(e){var t,n,i,r,a,o,s;s=1===(null===(t=this._authService)||void 0===t||null===(n=t.currentUserValue)||void 0===n?void 0:n.roleId)?(null===(i=this._authService)||void 0===i||null===(r=i.currentUserValue)||void 0===r?void 0:r.id)||0:(null===(a=this._authService)||void 0===a||null===(o=a.currentUserValue)||void 0===o?void 0:o.mainMerchantId)||0;var c={name:"invoices",method:"GET"};return c.data="filter[where][invoicesenderId]=".concat(s,"&filter[where][cellno]=").concat(e,"&filter[skip]=0&filter[limit]=1&filter[fields][clientname]=true"),this.http.get("".concat(this._authService.updSNAEnvURL("v5")).concat(c.name,"?").concat(c.data))}},{key:"productSearch",value:function(e){var t,n,r,a,o,s,c,l,u={name:"products",method:"GET"};return u.data=1==(null===(t=this._authService)||void 0===t||null===(n=t.currentUserValue)||void 0===n?void 0:n.roleId)?["filter[include]=productmedia","filter[where][merchantId]=".concat((null===(r=this._authService)||void 0===r||null===(a=r.currentUserValue)||void 0===a?void 0:a.id)||0),'filter[where][price][gte]="1.0"&filter[where][isRecurringProduct]=0']:["f
1ilter[include]=productmedia","filter[where][merchantId]=".concat((null===(o=this._authService)||void 0===o||null===(s=o.currentUserValue)||void 0===s?void 0:s.mainMerchantId)||0),"filter[where][createdby]=".concat((null===(c=this._authService)||void 0===c||null===(l=c.currentUserValue)||void 0===l?void 0:l.mainMerchantId)||0),'filter[where][price][gte]="1.0"&filter[where][isRecurringProduct]=0'],e.length>0&&u.data.push("filter[where][name][like]=%".concat(e,"%")),u.data=u.data.join("&"),this.http.get("".concat(i.N.apiUrlv7).concat(u.name,"?").concat(u.data))}},{key:"getInvoice",value:function(e){var t={};return t.name="invoices/".concat(e),t.method="GET",t.apiVer="v6",t.data="filter[include][0]=invoicedetails&filter[include][1]=invoicesenderId&filter[include][2]=invoicereceiverId&filter[where][isrentalplaninvoice]=0&filter[where][usermetadetailsid]=0&filter[where][subsinvoiceId]=0",this.http.get("".concat(i.N.apiUrlv7).concat(t.name,"?").concat(t.data))}},{key:"isInternational",value:function(){var e,t,n,i,a,o,s={name:"usermetapreferences",method:"GET",apiVer:"v6"};return s.data="filter[where][userId]=".concat(1===(null===(e=this._authService)||void 0===e||null===(t=e.currentUserValue)||void 0===t?void 0:t.roleId)?(null===(n=this._authService)||void 0===n||null===(i=n.currentUserValue)||void 0===i?void 0:i.id)||0:(null===(a=this._authService)||void 0===a||null===(o=a.currentUserValue)||void 0===o?void 0:o.mainMerchantId)||0),this.http.get("".concat(this._authService.updSNAEnvURL("v6")).concat(s.name,"?").concat(s.data)).pipe((0,r.U)(function(e){return!(!e.length||!e[0].isInternational)}))}},{key:"editInvoice",value:function(e,t){var n={};return n.name="invoices/".concat(t),n.method="PATCH",n.data=e,this.http.patch("".concat(i.N.apiUrlv7).concat(n.name),n.data)}},{key:"deleteInvoice",value:function(e){var t={};return t.name="invoices/".concat(e),t.method="DELETE",this.http.delete("".concat(this._authService.updSNAEnvURL("v5")).concat(t.name))}},{key:"invoiceShare",value:function(e){var t={name:"invoices/shareInvoice",method:"POST"};return t.data=e,this.http.post("".concat(this._authService.updSNAEnvURL("v5")).concat(t.name),t.data)}},{key:"exportSingleInvoice",value:function(e,t){return this.http.get("".concat(this._authService.updSNAEnvURL("v5"),"invoices/singleInvoicePdfExport?filter[where][language]=").concat(t,"&&filter[where][isDownloadZip]=false&filter[where][invoiceno]=").concat(e),{observe:"response",responseType:"blob"}).pipe((0,r.U)(function(e){return new Blob([e.body])}))}},{key:"sendNotification",value:function(e){var t={};return t.name="invoices/".concat(e,"/remind"),t.method="GET",this.http.get("".concat(this._authService.updSNAEnvURL("v5")).concat(t.name))}},{key:"getDueDate",value:function(){var e=a();e.add(7,"days");var t={year:e.year(),month:e.month()+1,day:e.date()};return this._dateFormater.format(t)}}]),e}();return e.\u0275fac=function(t){return new(t||e)(o.LFG(c.eN),o.LFG(u.$),o.LFG(d.NG))},e.\u0275prov=o.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e}()},6707:function(e,t,n){"use strict";n.d(t,{O:function(){return p}});var i=n(35366),r=n(529),a=n(91681);function o(e){var t=e.filterAndArrayData,n=e.transactionId,i=void 0===n?"":n,r=e.transactionActId,a=void 0===r?"":r,o=e.disputeTransactionId,s=void 0===o?"":o,c=e.disputeId,l=void 0===c?"":c,u=e.disputeRRN,d=void 0===u?"":u,p=e.transaction_date,v=void 0===p?"":p,h=e.traxAmount,g=void 0===h?"":h,m=e.traxStatusId,f=void 0===m?-1:m,_=e.disStatusId,y=void 0===_?-1:_,S=e.paymentMethod,b=void 0===S?"":S,w=e.cType,I=void 0===w?-1:w,T=e.traxSource,E=void 0===T?-1:T,k=e.disType,A=void 0===k?-1:k,C=e.terminalId,x=void 0===C?"":C,P=e.cardEntryMethod,O=void 0===P?"":P,N=e.cardNumber,U=void 0===N?"":N,L=e.POScType,R=void 0===L?"":L,M=e.traxType,D=void 0===M?"":M,Z=e.posRefActTraxId,q=void 0===Z?"":Z,V=e.andRRN,F=void 0===V?"":V,Y=e.deviceSerialNumber,j=void 0===Y?"":Y,H=e.OPRefActTraxId,J=void 0===H?"":H,B=e.mulTerminal,W=void 0===B?"":B,G=e.batchNumber,Q=void 0===G?"":G,K=e.tipEnabledType,$=void 0===K?-1:K,z=e.shippingEnabledType,X=void 0===z?-1:z,ee=e.custTraxRef,te=void 0===ee?"":ee,ne=e.custPaidAmt,ie=void 0===ne?"":ne;return""!=v&&(t=function(e,t){var n=t.split("/");return""!=n[1]?"".concat(e,',{"created":{"between":["').concat(n[0],' 00:00:00","').concat(n[1],' 23:59:59"]}}'):"".concat(e,',{"created":{"between":["').concat(n[0],' 00:00:00","').concat(n[0],' 23:59:59"]}}')}(t,v)),""!=a&&(t="".concat(t,',{"invoicenumber":"').concat(a.trim(),'"}')),""!=i&&(t="".concat(t,',{"invoicenumber":"').concat(i.trim(),'"}
1')),""!=s&&(t="".concat(t,',{"transactionId":"').concat(s.trim(),'"}')),""!=l&&(t="".concat(t,',{"disputeId":"').concat(l.trim(),'"}')),""!=g&&(t="".concat(t,',{"amount":"').concat(g,'"}')),-1!=f&&(t="".concat(t,',{"transactionstatusId":"').concat(f,'"}')),-1!=y&&(t="".concat(t,',{"disputestatusId":"').concat(y,'"}')),""!=b&&(t="".concat(t,',{"cardtype":"').concat(b.trim(),'"}')),-1!=I&&(t=3==I?"".concat(t,',{"transactionmodeId": { "inq": [3,4,5] }}'):"".concat(t,',{"transactionmodeId":"').concat(I,'"}')),-1!=E&&(t=79==E?"".concat(t,',{"transactionentityId": { "inq": [7,9] }}'):"".concat(t,',{"transactionentityId":"').concat(E,'"}')),-1!=A&&(t="".concat(t,',{"disputetypeId":"').concat(A,'"}')),""!=d&&(t="".concat(t,',{"rrn":"').concat(d.trim(),'"}')),""!=x&&(t="".concat(t,',{"terminalId":"').concat(x.trim(),'"}')),""!=O&&(t="".concat(t,',{"cardEntry":"').concat(O.trim(),'"}')),""!=U&&(t="".concat(t,',{"card_Number":"').concat(U.trim(),'"}')),""!=R&&(t="wallet"==R?"".concat(t,',{"transactionmodeId":"6"}'):"".concat(t,',{"card_type":"').concat(R.trim(),'"}')),""!=D&&(t="".concat(t,',{"transaction_type":"').concat(D.trim(),'"}')),""!=q&&(t="".concat(t,',{"actualTxnId":"').concat(q.trim(),'"}')),""!=J&&(t="".concat(t,',{"actualTxnId":"').concat(J.trim(),'"}')),""!=F&&(t="".concat(t,',{"rrn":"').concat(F.trim(),'"}')),""!=j&&(t="".concat(t,',{"deviceSerialNo":"').concat(j.trim(),'"}')),""!=W&&(t="".concat(t,',{"terminalId":"').concat(W.trim(),'"}')),""!=Q&&(t="".concat(t,',{"batch_id":"').concat(Q.trim(),'"}')),-1!=$&&(t="".concat(t,',{"is_tip_included":"').concat($,'"}')),-1!=X&&(t="".concat(t,',{"isShipping":"').concat(X,'"}')),""!=te&&(t="".concat(t,',{"parentTransactionNumber":"').concat(te,'"}')),""!=ie&&(t="".concat(t,',{"customerPaidAmount":"').concat(ie,'"}')),t}function c(e){var t=e.filterWhereData,n=e.authNumber,i=void 0===n?"":n,r=e.cusName,a=void 0===r?"":r,o=e.cusEmailId,s=void 0===o?"":o,c=e.cusMob,l=void 0===c?"":c,u=e.rrn,d=void 0===u?"":u;return""!=i&&(t="".concat(t,',"authorizationnumber":"').concat(i.trim(),'"')),""!=a&&(t="".concat(t,',"name":"').concat(a.trim(),'"')),""!=s&&(t="".concat(t,',"email":"').concat(s.trim(),'"')),""!=l&&(t="".concat(t,',"cellnumber":"').concat(l.trim(),'"')),""!=d&&(t="".concat(t,',"transactionrrnnumber":"').concat(d.trim(),'"')),t}var u=n(42693),d=n(52105),p=function(){var e=function(){function e(t,n){s(this,e),this.http=t,this._authService=n,this.paymentId=new i.vpe,this.refundID=new i.vpe,this.disputeID=new i.vpe,this.isOninitGetDataPayment=!0,this.isOninitGetDataRefund=!0,this.isOninitGetDataDispute=!0,this.isOninitGetDataPOSRENTAL=!0,this.getId()}return l(e,[{key:"getId",value:function(){}},{key:"getPaymentListing",value:function(e){var t,n,i,a,s,l,u,d,p,v,h,g,m=e.skip,f=void 0===m?0:m,_=e.limit,y=void 0===_?5:_,S=e.transaction_date,b=void 0===S?"":S,w=e.transactionId,I=void 0===w?"":w,T=e.authNumber,E=void 0===T?"":T,k=e.traxAmount,A=void 0===k?"":k,C=e.traxStatusId,x=void 0===C?-1:C,P=e.cusName,O=void 0===P?"":P,N=e.cusEmailId,U=void 0===N?"":N,L=e.cusMob,R=void 0===L?"":L,M=e.rrn,D=void 0===M?"":M,Z=e.deviceSerialNumber,q=void 0===Z?"":Z,V=e.andRRN,F=void 0===V?"":V,Y=e.paymentMethod,j=void 0===Y?"":Y,H=e.cType,J=void 0===H?-1:H,B=e.traxSource,W=void 0===B?-1:B,G=e.terminalId,Q=void 0===G?"":G,K=e.cardEntryMethod,$=void 0===K?"":K,z=e.cardNumber,X=void 0===z?"":z,ee=e.POScType,te=void 0===ee?"":ee,ne=e.traxType,ie=void 0===ne?"":ne,re=e.mulTerminal,ae=void 0===re?"":re,oe=e.isPos,se=void 0!==oe&&oe,ce=e.batchNumber,le=void 0===ce?"":ce,ue=e.tipEnabledType,de=void 0===ue?-1:ue,pe=e.shippingEnabledType,ve=void 0===pe?-1:pe,he=e.custTraxRef,ge=void 0===he?"":he,me=e.custPaidAmt,fe=void 0===me?"":me;this.getId();var _e={},ye='{"or":['.concat(se?'{"senderId":'.concat(1===(null===(t=this._authService)||void 0===t||null===(n=t.currentUserValue)||void 0===n?void 0:n.roleId)?null===(i=this._authService)||void 0===i||null===(a=i.currentUserValue)||void 0===a?void 0:a.id:null===(s=this._authService)||void 0===s||null===(l=s.currentUserValue)||void 0===l?void 0:l.mainMerchantId,"},"):"",'{"receiverId":').concat(1===(null===(u=this._authService)||void 0===u||null===(d=u.currentUserValue)||void 0===d?void 0:d.roleId)?null===(p=this._authService)||void 0===p||null===(v=p.currentUserValue)||void 0===v?void 0:v.id:null===(h=this._authService)||void 0===h||null===(g=h.currentUserValue)||void 0===g?void 0:g.mainMerchantId,"}]}");se?(ye="".concat(ye,', {"transactionentityId": { "eq": [17] }}'),_e.includeData='{"relation":"senderId"},{"relation":"receiverId"},{"relation":"guestuser"},{"relation":"transactionentity"},{"relation":"transactionmode"},{"relation":"transactionstatus"},{"relation":"dispute"},{"relation":"postransaction","scope":{"include":{"relation":"terminal","scope":{"include":{"relation":"posdevice"}}}}}'):(ye="".concat(ye,',{"transactionentityId":{"inq": [1,2,3,5,6,7,8,9,12]}}'),_e.includeData='"senderId", "receiverId", "guestuser", "transactionentity", "transactionmode", "transactionstatus", "postransaction", "dis
1pute"'),-1==x&&(ye="".concat(ye,',{"transactionstatusId":{"inq":[1,2,3,6]}}')),ye=o({filterAndArrayData:ye,transactionId:I,transaction_date:b,traxAmount:A,traxStatusId:x,paymentMethod:j,cType:J,traxSource:W,cardEntryMethod:$,terminalId:Q,cardNumber:X,POScType:te,traxType:ie,andRRN:F,deviceSerialNumber:q,mulTerminal:ae,batchNumber:le,tipEnabledType:de,shippingEnabledType:ve,custTraxRef:ge,custPaidAmt:fe});var Se='"and":['.concat(ye,"]");return Se=c({filterWhereData:Se,authNumber:E,cusName:O,cusEmailId:U,cusMob:R,rrn:D}),_e.name="transactions/optimizeTransactionsList",_e.method="GET",_e.data='filter={"where":{'.concat(Se,'},"skip": ').concat(f,',"limit": ').concat(y,',"order": "created DESC","include": [').concat(_e.includeData,"]}"),this.http.get("".concat(r.N.apiUrlv7).concat(_e.name,"?").concat(_e.data))}},{key:"exportPaymentPdf",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.getId();var n="".concat(r.N.apiUrlv7,"transactions/downloadReceipt?transactionId=").concat(e);n="".concat(n,t?"&isPOS=true":"&isPOS=false");try{return this.http.get(n,{observe:"response",responseType:"blob"}).pipe((0,a.U)(function(e){return new Blob([e.body])}))}catch(i){console.log("export pdf : "+i)}}},{key:"getRefundListing",value:function(e){var t,n,i,a,s,l,u,d,p,v,h,g,m=e.skip,f=void 0===m?0:m,_=e.limit,y=void 0===_?5:_,S=e.transaction_date,b=void 0===S?"":S,w=e.transactionActId,I=void 0===w?"":w,T=e.transactionId,E=void 0===T?"":T,k=e.traxAmount,A=void 0===k?"":k,C=e.traxStatusId,x=void 0===C?-1:C,P=e.cusName,O=void 0===P?"":P,N=e.cusEmailId,U=void 0===N?"":N,L=e.cusMob,R=void 0===L?"":L,M=e.rrn,D=void 0===M?"":M,Z=e.paymentMethod,q=void 0===Z?"":Z,V=e.cType,F=void 0===V?-1:V,Y=e.terminalId,j=void 0===Y?"":Y,H=e.POScType,J=void 0===H?"":H,B=e.cardEntryMethod,W=void 0===B?"":B,G=e.posRefActTraxId,Q=void 0===G?"":G,K=e.andRRN,$=void 0===K?"":K,z=e.OPRefActTraxId,X=void 0===z?"":z,ee=e.mulTerminal,te=void 0===ee?"":ee,ne=e.isPos,ie=void 0!==ne&≠this.getId();var re={},ae='{"or":[{"senderId":'.concat(1===(null===(t=this._authService)||void 0===t||null===(n=t.currentUserValue)||void 0===n?void 0:n.roleId)?null===(i=this._authService)||void 0===i||null===(a=i.currentUserValue)||void 0===a?void 0:a.id:null===(s=this._authService)||void 0===s||null===(l=s.currentUserValue)||void 0===l?void 0:l.mainMerchantId,"}").concat(ie?',{"receiverId":'.concat(1===(null===(u=this._authService)||void 0===u||null===(d=u.currentUserValue)||void 0===d?void 0:d.roleId)?null===(p=this._authService)||void 0===p||null===(v=p.currentUserValue)||void 0===v?void 0:v.id:null===(h=this._authService)||void 0===h||null===(g=h.currentUserValue)||void 0===g?void 0:g.mainMerchantId,"}"):"","]}");ie?(ae="".concat(ae,', {"transactionentityId": 17 }, {"is_reversed":true}'),re.includeData='{"relation":"senderId"},{"relation":"receiverId"},{"relation":"guestuser"},{"relation":"transactionentity"},{"relation":"transactionmode"},{"relation":"transactionstatus"},{"relation":"dispute"},{"relation":"postransaction","scope":{"include":{"relation":"terminal","scope":{"include":{"relation":"posdevice"}}}}}'):(I||(ae="".concat(ae,',{"transactionentityId":{"neq":[17]}},{"transactionstatusId":{"inq":[4,5,7]}}')),re.includeData='"senderId", "receiverId", "guestuser", "transactionentity", "transactionmode", "transactionstatus", "dispute"'),ae=o({filterAndArrayData:ae,transactionId:E,transactionActId:I,transaction_date:b,traxAmount:A,traxStatusId:x,paymentMethod:q,cType:F,terminalId:j,cardEntryMethod:W,POScType:J,posRefActTraxId:Q,andRRN:$,OPRefActTraxId:X,mulTerminal:te});var oe='"and":['.concat(ae,"]");return oe=c({filterWhereData:oe,cusName:O,cusEmailId:U,cusMob:R,rrn:D}),re.name="transactions/optimizeTransactionsList",re.method="GET",re.data='filter={"where":{'.concat(oe,'},"skip": ').concat(f,',"limit": ').concat(y,',"order": "created DESC","include": [').concat(re.includeData,"]}"),this.http.get("".concat(r.N.apiUrlv7).concat(re.name,"?").concat(re.data))}},{key:"getDisputeListing",value:function(e){var t,n,i,r,a,s,l,u,d,p,v,h,g=e.skip,m=void 0===g?0:g,f=e.limit,_=void 0===f?5:f,y=e.transaction_date,S=void 0===y?""
1:y,b=e.disputeTransactionId,w=void 0===b?"":b,I=e.disputeId,T=void 0===I?"":I,E=e.terminalId,k=void 0===E?"":E,A=e.disStatusId,C=void 0===A?-1:A,x=e.traxStatusId,P=void 0===x?-1:x,O=e.cusName,N=void 0===O?"":O,U=e.cusEmailId,L=void 0===U?"":U,R=e.cusMob,M=void 0===R?"":R,D=e.disputeRRN,Z=void 0===D?"":D,q=e.rrn,V=void 0===q?"":q,F=e.disType,Y=void 0===F?-1:F,j=e.mulTerminal,H=void 0===j?"":j,J=e.isPos,B=void 0!==J&&J;this.getId();var W={},G='{"or":['.concat(B?'{"senderId":'.concat(1===(null===(t=this._authService)||void 0===t||null===(n=t.currentUserValue)||void 0===n?void 0:n.roleId)?null===(i=this._authService)||void 0===i||null===(r=i.currentUserValue)||void 0===r?void 0:r.id:null===(a=this._authService)||void 0===a||null===(s=a.currentUserValue)||void 0===s?void 0:s.mainMerchantId,"},"):"",'{"receiverId":').concat(1===(null===(l=this._authService)||void 0===l||null===(u=l.currentUserValue)||void 0===u?void 0:u.roleId)?null===(d=this._authService)||void 0===d||null===(p=d.currentUserValue)||void 0===p?void 0:p.id:null===(v=this._authService)||void 0===v||null===(h=v.currentUserValue)||void 0===h?void 0:h.mainMerchantId,"}]}");B?(G="".concat(G,', {"isPOS":true}'),W.includeData='["senderId","receiverId","transaction"],"include":[{"relation":"disputestatus","fields":["name"]},{"relation":"disputetype","fields":["name"]},{"relation":"senderId"},{"relation":"receiverId"},{"relation":"transaction","scope":{"include":{"relation":"postransaction","scope":{"include":{"relation":"terminal","scope":{"include":{"relation":"posdevice"}}}}}}}]'):(W.includeData='["senderId","receiverId","transaction", "disputestatus", "disputetype"]',G="".concat(G,', {"isPOS":false}')),G=o({filterAndArrayData:G,transaction_date:S,disputeTransactionId:w,disputeId:T,terminalId:k,disStatusId:C,traxStatusId:P,disType:Y,disputeRRN:Z,mulTerminal:H});var Q='"and":['.concat(G,"]");return Q=c({filterWhereData:Q,cusName:N,cusEmailId:L,cusMob:M,rrn:V}),W.name="disputes",W.method="GET",W.data='filter={"where":{'.concat(Q,'},"skip":"').concat(m,'","limit":"').concat(_,'","order":"created DESC","include":').concat(W.includeData,"}"),this.http.get("".concat(this._authService.updSNAEnvURL("v5")).concat(W.name,"?").concat(W.data))}},{key:"getDisputeCount",value:function(e){var t,n,i,r,a,s,l,u,d,p,v,h,g=e.transaction_date,m=void 0===g?"":g,f=e.disputeTransactionId,_=void 0===f?"":f,y=e.disputeId,S=void 0===y?"":y,b=e.terminalId,w=void 0===b?"":b,I=e.disStatusId,T=void 0===I?-1:I,E=e.traxStatusId,k=void 0===E?-1:E,A=e.cusName,C=void 0===A?"":A,x=e.cusEmailId,P=void 0===x?"":x,O=e.cusMob,N=void 0===O?"":O,U=e.rrn,L=void 0===U?"":U,R=e.disputeRRN,M=void 0===R?"":R,D=e.disType,Z=void 0===D?-1:D,q=e.mulTerminal,V=void 0===q?"":q,F=e.isPos,Y=void 0!==F&&F;this.getId();var j={},H='{"or":['.concat(Y?'{"senderId":'.concat(1===(null===(t=this._authService)||void 0===t||null===(n=t.currentUserValue)||void 0===n?void 0:n.roleId)?null===(i=this._authService)||void 0===i||null===(r=i.currentUserValue)||void 0===r?void 0:r.id:null===(a=this._authService)||void 0===a||null===(s=a.currentUserValue)||void 0===s?void 0:s.mainMerchantId,"},"):"",'{"receiverId":').concat(1===(null===(l=this._authService)||void 0===l||null===(u=l.currentUserValue)||void 0===u?void 0:u.roleId)?null===(d=this._authService)||void 0===d||null===(p=d.currentUserValue)||void 0===p?void 0:p.id:null===(v=this._authService)||void 0===v||null===(h=v.currentUserValue)||void 0===h?void 0:h.mainMerchantId,"}]}");H=o({filterAndArrayData:H="".concat(H,Y?', {"isPOS":true}':', {"isPOS":false}'),transaction_date:m,disputeTransactionId:_,disputeId:S,terminalId:w,disStatusId:T,traxStatusId:k,disType:Z,disputeRRN:M,mulTerminal:V});var J='"and":['.concat(H,"]");return J=c({filterWhereData:J,cusName:C,cusEmailId:P,cusMob:N,rrn:L}),j.name="disputes/count",j.method="GET",j.data="where={ ".concat(J," }"),this.http.get("".concat(this._authService.updSNAEnvURL("v5")).concat(j.name,"?").concat(j.data))}},{key:"traxRefundRequest",value:function(e,t,n,i,r){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null;this.getId();var s={};
1s.name=3==e?"transactions/sadadRefund":"transactions/debitCreditRefundRequest",s.method="POST";var c={};return c.transactionnumber=t,c.transaction_note=i,r&&(c.isPartialRefund=!0,c.amount=n),c.created=a,c.transactionentityId=o,s.data=c,this.http.post("".concat(this._authService.updSNAEnvURL("v5")).concat(s.name),s.data)}},{key:"setPaymentId",value:function(e){this.paymentId.emit(e)}},{key:"setRefundId",value:function(e){this.refundID.emit(e)}},{key:"setDisputeId",value:function(e){this.disputeID.emit(e)}},{key:"getPaymentListingTestEnv",value:function(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5,a=arguments.length>2?arguments[2]:void 0,o=arguments.length>3?arguments[3]:void 0,s=arguments.length>5?arguments[5]:void 0,c="filter[limit]=".concat(i,"&filter[skip]=").concat(n,"&filter[include][0]=guestuser&filter[include][1]=transactionentity&filter[where][receiverId]=").concat(o,"&filter[order]=created DESC");if(a){var l=a.split("/");c+=""!=l[1]?'&filter[where][dateFilter]=custom&filter[where][between]=["'.concat(l[0],' 00:00:00", "').concat(l[1],' 23:59:59"]'):'&filter[where][dateFilter]=custom&filter[where][between]=["'.concat(l[0],' 00:00:00", "').concat(l[0],' 23:59:59"]')}s.transactionId&&(c+="&filter[where][invoicenumber][like]=%".concat(s.transactionId,"%")),s.transactionAmount&&(c+="&filter[where][amount]=".concat(s.transactionAmount)),c+=s.traxStatusId&&s.traxStatusId>0?"&filter[where][transactionstatusId]=".concat(s.traxStatusId):"&filter[where][transactionstatusId][inq][0]=3&filter[where][transactionstatusId][inq][1]=1&filter[where][transactionstatusId][inq][2]=2",s.paymentMethod&&(c+="&filter[where][payment_method]=".concat(s.paymentMethod.toLowerCase())),s.cType&&s.cType>0&&(c+=3==s.cType?"&filter[where][transactionmodeId][inq][0]=3&filter[where][transactionmodeId][inq][1]=4&filter[where][transactionmodeId][inq][2]=5":"&filter[where][transactionmodeId]=".concat(s.cType));var d={name:"transactions/sandboxTxn",method:"GET"};d.data=c;var p=(new u.WM).set("accesstoken",null===(e=this._authService)||void 0===e||null===(t=e.currentUserValue)||void 0===t?void 0:t.token);return this.http.get("".concat(r.N.sandboxUrl).concat(d.name,"?").concat(d.data),{headers:p})}},{key:"getRefundListingTestEnv",value:function(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5,a=arguments.length>2?arguments[2]:void 0,o=arguments.length>3?arguments[3]:void 0,s=arguments.length>5?arguments[5]:void 0,c="";if(c="filter[limit]=".concat(i,"&filter[skip]=").concat(n,"&filter[include][0]=guestuser&filter[include][1]=transactionmode&filter[where][senderId]=").concat(o,"&filter[order]=created DESC"),a){var l=a.split("/");c+=""!=l[1]?'&filter[where][dateFilter]=custom&filter[where][between]=["'.concat(l[0],' 00:00:00", "').concat(l[1],' 23:59:59"]'):'&filter[where][dateFilter]=custom&filter[where][between]=["'.concat(l[0],' 00:00:00", "').concat(l[0],' 23:59:59"]')}s.refundId&&(c+="&filter[where][invoicenumber][like]=%".concat(s.refundId,"%")),s.refundAmount&&(c+="&filter[where][amount]=".concat(s.refundAmount)),c+=s.reStatus&&s.reStatus>0?"&filter[where][transactionstatusId]=".concat(s.reStatus):"&filter[where][transactionstatusId][inq][0]=4&filter[where][transactionstatusId][inq][1]=5",s.paymentMethod&&(c+="&filter[where][payment_method]=".concat(s.paymentMethod.toLowerCase())),s.cType&&s.cType>0&&(c+="&filter[where][transactionmodeId]=".concat(s.cType));var d={name:"transactions/sandboxTxn",method:"GET"};d.data=c;var p=(new u.WM).set("accesstoken",null===(e=this._authService)||void 0===e||null===(t=e.currentUserValue)||void 0===t?void 0:t.token);return this.http.get("".concat(r.N.sandboxUrl).concat(d.name,"?").concat(d.data),{headers:p})}},{key:"getRefundTestEnv",value:function(e){var t,n,i={name:"transactions/debitCreditRefundRequest",method:"POST"};i.data={transactionnumber:e};var a=(new u.WM).set("accesstoken",null===(t=this._authService)||void 0===t||null===(n=t.currentUserValue)||void 0===n?void 0:n.token);return this.http.post("".concat(r.N.sandboxUrl).concat(i.name),i.data,{headers:a})}},{key:"getRefundCountTest",value:function(e){var t,n,i,a,s,l,u,d,p,v,h,g,m=e.transaction_date,f=void 0===m?"":m,_=e.transactionId,y=void 0===_?"":_,S=e.transactionActId,b=void 0===S?""
1:S,w=e.traxAmount,I=void 0===w?"":w,T=e.traxStatusId,E=void 0===T?-1:T,k=e.cusName,A=void 0===k?"":k,C=e.cusEmailId,x=void 0===C?"":C,P=e.cusMob,O=void 0===P?"":P,N=e.rrn,U=void 0===N?"":N,L=e.paymentMethod,R=void 0===L?"":L,M=e.cType,D=void 0===M?-1:M,Z=e.terminalId,q=void 0===Z?"":Z,V=e.POScType,F=void 0===V?"":V,Y=e.cardEntryMethod,j=void 0===Y?"":Y,H=e.isPos,J=void 0!==H&&H;this.getId();var B={},W='{ "or": \n [ \n { "senderId": '.concat(1===(null===(t=this._authService)||void 0===t||null===(n=t.currentUserValue)||void 0===n?void 0:n.roleId)?null===(i=this._authService)||void 0===i||null===(a=i.currentUserValue)||void 0===a?void 0:a.id:null===(s=this._authService)||void 0===s||null===(l=s.currentUserValue)||void 0===l?void 0:l.mainMerchantId,'}, \n { "receiverId": ').concat(1===(null===(u=this._authService)||void 0===u||null===(d=u.currentUserValue)||void 0===d?void 0:d.roleId)?null===(p=this._authService)||void 0===p||null===(v=p.currentUserValue)||void 0===v?void 0:v.id:null===(h=this._authService)||void 0===h||null===(g=h.currentUserValue)||void 0===g?void 0:g.mainMerchantId,"} \n ] \n }");J?W="".concat(W,', {"transactionentityId": 17 }, {"is_reversed":true}'):b||(W="".concat(W,',\n {"transactionentityId": { "neq": [ 17 ]}},\n { "transactionstatusId": { "inq": [4,5,7] } }')),W=o({filterAndArrayData:W,transactionId:y,transactionActId:b,transaction_date:f,traxAmount:I,traxStatusId:E,paymentMethod:R,cType:D,terminalId:q,cardEntryMethod:j,POScType:F});var G='"and": [ \n '.concat(W,"\n ]");return G=c({filterWhereData:G,cusName:A,cusEmailId:x,cusMob:O,rrn:U}),B.name="transactions/count",B.method="GET",B.data="where={ ".concat(G," }"),this.http.get("".concat(r.N.apiUrlv7).concat(B.name,"?").concat(B.data))}},{key:"traxRefundRequestTest",value:function(e,t,n,i,a){var o,s;this.getId();var c={},l={};l.transactionnumber=t,l.transaction_note=i,a&&(l.isPartialRefund=!0,l.amount=n),c.name=3==e?"transactions/sadadRefund":"transactions/debitCreditRefundRequest",c.method="POST",c.data=l;var d=(new u.WM).set("accesstoken",null===(o=this._authService)||void 0===o||null===(s=o.currentUserValue)||void 0===s?void 0:s.token);return this.http.post("".concat(r.N.sandboxUrl).concat(c.name),c.data,{headers:d})}},{key:"getPOSRentals",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:-1,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"",o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"",s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"",c=arguments.length>8&&void 0!==arguments[8]?arguments[8]:"",l=arguments.length>9&&void 0!==arguments[9]?arguments[9]:"";this.getId(),"/"==n&&(n="");var u={name:"invoices/getPOSRentalInvoice",method:"GET"};if(u.data="filter[skip]=".concat(e,"&filter[limit]=").concat(t,"&filter[order]=created DESC"),n)if(n.includes("/")){var d=n.split("/");u.data=""!=d[1]?"".concat(u.data,"&filter[where][date]=custom&filter[where][between][0]=").concat(d[0]," 00:00:00&filter[where][between][1]=").concat(d[1]," 23:59:59"):"".concat(u.data,"&filter[where][date]=custom&filter[where][between][0]=").concat(d[0]," 00:00:00&filter[where][between][1]=").concat(d[0]," 23:59:59")}else u.data="".concat(u.data,"&filter[created]=").concat(n);return-1!=i&&(u.data="".concat(u.data,"&filter[where][invoicestatusId]=").concat(i)),r&&(u.data="".concat(u.data,"&filter[where][invoiceno][like]=%").concat(r.trim(),"%")),a&&(u.data="".concat(u.data,"&filter[where][grossamount]=").concat(a)),o&&(u.data="".concat(u.data,"&filter[where][rentalAmount]=").concat(o)),s&&(u.data="".concat(u.data,"&filter[where][deviceSerialNo]=").concat(s.trim())),c&&(u.data="".concat(u.data,"&filter[where][terminalId]=").concat(c.trim())),l&&(u.data="".concat(u.data,"&filter[where][terminalId]=[").concat(l.trim(),"]")),this.http.get("".concat(this._authService.updSNAEnvURL("v5")).concat(u.name,"?").concat(u.data))}},{key:"getAllTerminalListing",value:function(){return this.getId(),this.http.get("".concat(this._authService.updSNAEnvURL("v5"),"terminals?filter[skip]=0&filter[limit]=100000&filter[order][0]=is_active DESC&filter[order][1]=is_online ASC&filter[include]=posdevice"))}},{key:"checkTransactionExpansion",value:function(e,t,n,i){var r;return!!i&&(null!==(r=n&&!Array.isArray(n)&&Array.isArray(n.rows)?n.rows:n)&&void 0!==r&&r.some(function(e){return(null==e?void 0:e.invoicenumber)===i||(null==e?void 0:e.invoiceno)===i})?(null==e?void 0:e.invoicenumber)===i||(null==e?void 0:e.invoiceno)===i:0===t)}}]),e}();return e.\u0275fac=function(t){return new(t||e)(i.LFG(u.eN),i.LFG(d.$))},e.\u0275prov=i.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e}()},58858:function(e,t,n){"use strict";n.d(t,{Y:function(){return a}});var i=n(97425),r=n(35366),a=function(){var e=function(){function e(){s(this,e),this.serviceType="online-payment",this.environmentType="live",localStorage.getItem("traxEnvType")?this.environmentType=localStorage.getItem("traxEnvType"):localStorage.setItem("traxEnvType",this.environmentType),localStorage.getItem("serType")?this.serviceType=localStorage.getItem("serType"):localStorage.setItem("serType",this.serviceType),this.paymentService=new i.X(this.serviceType),this.environmentService=new i.X(this.environmentType)}return l(e,[{key:"changeServiceType",value:function(e){this.serviceType=e,localStorage.setItem("serType",e),this.paymentService.next(e)}},{key:"changeEnvironmentType",value:function(e){this.environmentType=e,localStorage.setItem("traxEnvType",e),this.environmentService.next(e)}}]),e}();return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=r.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e}()},35637:function(e,t,n){"use strict";n.d(t,{R:function(){return o}});var i=n(35366),r=n(42693),a=n(52105),o=function(){var e=function(){function e(t,n){s(this,e),this.http=t,this._authService=n}return l(e,[{key:"getWebhookSetting",value:function(){var e,t,n,i,r,a;this.getId();var o="filter[where][userId]=".concat(1===(null===(e=this._authService)||void 0===e||null===(t=e.currentUserValue)||void 0===t?void 0:t.roleId)?null===(n=this._authService)||void 0===n||null===(i=n.currentUserValue)||void 0===i?void 0:i.id:null===(r=this._authService)||void 0===r||null===(a=r.currentUserValue)||void 0===a?void 0:a.mainMerchantId,"&filter[fields][0]=webhook&filter[fields][1]=webhookAlert
1Email&filter[fields][2]=webhookURL&filter[fields][4]=id");return this.http.get("".concat(this._authService.updSNAEnvURL("v6"),"usermetapreferences?").concat(o))}},{key:"errorTesting",value:function(){return this.http.get("http://localhost:3001/api/error-test")}},{key:"SetWebhookSetting",value:function(e,t){this.getId();var n={};return n.name="usermetapreferences/".concat(t),n.method="PATCH",n.data=e,this.http.patch("".concat(this._authService.updSNAEnvURL("v5")).concat(n.name),n.data)}},{key:"getLiveTestSetting",value:function(){return this.getId(),this.http.get("".concat(this._authService.updSNAEnvURL("v5"),"userbusinesses/getGatewayCred"))}},{key:"genKeySaveWeb",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"key",i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"";this.getId();var a={name:"userbusinesses/genGatewayCredentials",method:"POST"},o={};return o[t]=e,"key"==n?o.isGenerate=!0:o[r]=i,a.data=o,this.http.post("".concat(this._authService.updSNAEnvURL("v5")).concat(a.name),a.data)}},{key:"ToogleKeyModes",value:function(e,t){var n={name:"userbusinesses/toggleGatewayMode",method:"PATCH"};return n.data="test"==t?{isTestEnabled:"".concat(e)}:{isLiveEnabled:"".concat(e)},this.http.patch("".concat(this._authService.updSNAEnvURL("v5")).concat(n.name),n.data)}},{key:"getNotificationSetting",value:function(){var e,t,n="filter[where][userId]=".concat(null===(e=this._authService)||void 0===e||null===(t=e.currentUserValue)||void 0===t?void 0:t.id,"&filter[fields][0]=id&filter[fields][1]=isEmailNotificationEnabled&filter[fields][2]=isSMSNotificationEnabled&filter[fields][3]=transactionMailingList&filter[fields][4]=transactionPush&filter[fields][5]=settlementMailingList&filter[fields][6]=settlementPush&filter[fields][7]=refundMailingList&filter[fields][8]=refundPush&filter[fields][9]=disputeMailingList&filter[fields][10]=disputePush&filter[fields][11]=supportMailingList&filter[fields][12]=supportPush&filter[fields][13]=isArabic&filter[fields][14]=receiveotpvia&filter[fields][15]=userId&filter[fields][16]=shareInvoiceVia");return this.http.get("".concat(this._authService.updSNAEnvURL("v6"),"usermetapreferences?").concat(n))}},{key:"patchNotificationSettings",value:function(e,t){var n={name:"usermetapreferences/".concat(t),method:"PATCH",data:e};return this.http.patch("".concat(this._authService.updSNAEnvURL("v5")).concat(n.name),n.data)}},{key:"getCustomizeCheckoutSettings",value:function(){var e,t,n,i,r,a;this.getId();var o="filter[where][userId]=".concat(1===(null===(e=this._authService)||void 0===e||null===(t=e.currentUserValue)||void 0===t?void 0:t.roleId)?null===(n=this._authService)||void 0===n||null===(i=n.currentUserValue)||void 0===i?void 0:i.id:null===(r=this._authService)||void 0===r||null===(a=r.currentUserValue)||void 0===a?void 0:a.mainMerchantId);return this.http.get("".concat(this._authService.updSNAEnvURL("v5"),"userthemes?").concat(o))}},{key:"postCustomizeCheckoutSettings",value:function(e){this.getId();var t={name:"userthemes",method:"POST"};return t.data=e,this.http.post("".concat(this._authService.updSNAEnvURL("v5")).concat(t.name),t.data)}},{key:"patchCustomizeCheckoutSettings",value:function(e,t){this.getId();var n={};return n.name="userthemes/".concat(t),n.method="PATCH",n.data=e,this.http.patch("".concat(this._authService.updSNAEnvURL("v5")).concat(n.name),n.data)}},{key:"getLogoIdName",value:function(){var e,t,n,i,r,a;this.getId();var o="filter[where][userId]=".concat(1===(null===(e=this._authService)||void 0===e||null===(t=e.currentUserValue)||void 0===t?void 0:t.roleId)?null===(n=this._authService)||void 0===n||null===(i=n.currentUserValue)||void 0===i?void 0:i.id:null===(r=this._authService)||void 0===r||null===(a=r.currentUserValue)||void 0===a?void 0:a.mainMerchantId,"&filter[fields]=logo&filter[fields]=id");return this.http.get("".concat(this._authService.updSNAEnvURL("v5"),"userbusinesses?").concat(o))}},{key:"uploadCompanyLogo",value:function(e,t){var n=new FormData;return n.append("file",e,t),this.http.post("".concat(this._authService.updSNAEnvURL("v6"),"upload_image/api-businesslogo"),n)}},{key:"changeLogoName",value:function(e,t){this.getId();var n={};return n.name="userbusinesses/".concat(t),n.method="PATCH",n.data=e,this.http.patch("".concat(this._authService.updSNAEnvURL("v5")).concat(n.name),n.data)}},{key:"getCustCheckoutAdminSettingFromService",value:function(){this.getId();var e="filter[where][userId]=".concat(1===this._authService.currentUserValue.roleId?this._authService.currentUserValue.id:this._authService.currentUserValue.mainMerchantId,"&filter[fields][1]=isallowedtochangetheme");return this.http.get("".concat(this._authService.updSNAEnvURL("v6"),"usermetapreferences?").concat(e))}},{key:"getId",value:function(){}},{key:"getPOSWebhookSetting",value:function(){this.getId();var e="filter[where][userId]=".concat(1===this._authService.currentUserValue.roleId?this._authService.currentUserValue.id:this._authService.currentUserValue.mainMerchantId,"&filter[fields][0]=pos_webhook&filter[fields][1]=pos_webhookAlert
1Email&filter[fields][2]=pos_webhookURL&filter[fields][4]=id&filter[fields][5]=userId");return this.http.get("".concat(this._authService.updSNAEnvURL("v6"),"usermetapreferences?").concat(e))}},{key:"SetPOSWebhookSetting",value:function(e,t){this.getId();var n={};return n.name="usermetapreferences/".concat(t),n.method="PATCH",n.data=e,this.http.patch("".concat(this._authService.updSNAEnvURL("v5")).concat(n.name),n.data)}}]),e}();return e.\u0275fac=function(t){return new(t||e)(i.LFG(r.eN),i.LFG(a.$))},e.\u0275prov=i.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e}()},27463:function(e,t,n){"use strict";n.d(t,{K:function(){return d}});var i=n(35366),r=n(529),a=n(91681),o=n(42693),c=n(52105),u=n(63908),d=function(){var e=function(){function e(t,n,r){s(this,e),this.http=t,this._authService=n,this._commonHelperService=r,this.payOut=new i.vpe,this.withID=new i.vpe,this.isOninitGetDataWithdrawal=!0,this.isOninitGetDataPayout=!0,this.getId()}return l(e,[{key:"getId",value:function(){}},{key:"getWithdrawalRequestsListing",value:function(){var e,t,n,i,r,a,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5,c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",u=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",d=arguments.length>5&&void 0!==arguments[5]?arguments[5]:-1,p=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"",v=arguments.length>7&&void 0!==arguments[7]?arguments[7]:-1,h=arguments.length>8&&void 0!==arguments[8]?arguments[8]:-1;this.getId();var g={name:"withdrawalrequests",method:"GET"};if(g.data="filter[include][0][userbank]=bank&filter[include][1][payout]=payoutstatus&filter[include][2]=withdrawalrequeststatus&filter[include][3]=user&filter[include][4]=createdby&filter[where][userId]=".concat(1===(null===(e=this._authService)||void 0===e||null===(t=e.currentUserValue)||void 0===t?void 0:t.roleId)?null===(n=this._authService)||void 0===n||null===(i=n.currentUserValue)||void 0===i?void 0:i.id:null===(r=this._authService)||void 0===r||null===(a=r.currentUserValue)||void 0===a?void 0:a.mainMerchantId,"&filter[order]=created DESC&filter[skip]=").concat(o,"&filter[limit]=").concat(s),""!=c){var m=c.split("/");g.data=""!=m[1]?"".concat(g.data,"&filter[where][created][between][0]=").concat(m[0]," 00:00:00&filter[where][created][between][1]=").concat(m[1]," 23:59:59"):"".concat(g.data,"&filter[where][created][between][0]=").concat(m[0]," 00:00:00&filter[where][created][between][1]=").concat(m[0]," 23:59:59")}return""!=l&&(g.data="".concat(g.data,"&filter[where][amount]=").concat(l)),""!=u&&(g.data="".concat(g.data,"&filter[where][withdrawnumber]=").concat(u)),-1!=d&&(g.data=1==d?"".concat(g.data,"&filter[where][withdrawalrequeststatusId][inq][0]=").concat(d,"&filter[where][withdrawalrequeststatusId][inq][1]=5"):"".concat(g.data,"&filter[where][withdrawalrequeststatusId][inq][0]=").concat(d)),-1!=v&&(g.data+="&filter[where][createdby]=".concat(v)),p&&(g.data+="&filter[where][withdrawaltype]=".concat(p)),-1!=h&&(g.data+="&filter[where][is_express]=".concat(h)),this.http.get("".concat(this._authService.updSNAEnvURL("v6")).concat(g.name,"?").concat(g.data))}},{key:"getBankList",value:function(){var e,t,n,i,r,a;this.getId();var o={name:"userbanks",method:"GET"};return o.data="filter[where][userId]=".concat(1===(null===(e=this._authService)||void 0===e||null===(t=e.currentUserValue)||void 0===t?void 0:t.roleId)?null===(n=this._authService)||void 0===n||null===(i=n.currentUserValue)||void 0===i?void 0:i.id:null===(r=this._authService)||void 0===r||null===(a=r.currentUserValue)||void 0===a?void 0:a.mainMerchantId,"&filter[include]=bank"),this.http.get("".concat(this._authService.updSNAEnvURL("v5")).concat(o.name,"?").concat(o.data))}},{key:"getPayOutListing",value:function(){var e,t,n,i,r,a,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5,c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",u=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",d=arguments.length>5&&void 0!==arguments[5]?arguments[5]:-1,p=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"",v=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"";this.getId();var h={name:"payouts",method:"GET"};if(h.data="filter[where][userId]=".concat(1===(null===(e=this._authService)||void 0===e||null===(t=e.currentUserValue)||void 0===t?void 0:t.roleId)?null===(n=this._authService)||void 0===n||null===(i=n.currentUserValue)||void 0===i?void 0:i.id:null===(r=this._authService)||void 0===r||null===(a=r.currentUserValue)||void 0===a?void 0:a.mainMerchantId),""!=c){var g=c.split("/");h.data=""!=g[1]?"".concat(h.data,"&filter[where][payoutDateTime][between][0]=").concat(g[0]," 00:00:00&filter[where][payoutDateTime][between][1]=").concat(g[1]," 23:59:59"):"".concat(h.data,"&filter[where][payoutDateTime][between][0]=").concat(g[0]," 00:00:00&filter[where][payoutDateTime][between][1]=").concat(g[0]," 23:59:59")}return""!=l&&(h.data="".concat(h.data,"&filter[where][payoutAmount]=").concat(l)),""!=u&&(h.data="".concat(h.data,"&filter[where][payoutId]=").concat(u)),h.data=-1!=d?"".concat(h.data,"&filter[where][payoutstatusId]=").concat(d):"".concat(h.data,"&filter[where][payoutstatusId][inq][0]=3&filter[where][payoutstatusId][inq][1]=4"),""!=p&&(h.data="".concat(h.data,"&filter[where][userbankId]=").concat(p)),""!=v&&(h.data="".concat(h.data,"&filter[where][bankreferenceno][like]=%").concat(v,"%")),h.data="".concat(h.data,"&filter[include][0][withdrawalrequest][userbank]=bank&filter[include][1]=payoutstatus&filter[order]=payoutDateTime DESC&filter[skip]=").concat(o,"&filter[limit]=").concat(s),this.http.get("".concat(this._authService.updSNAEnvURL("v5")).concat(h.name,"?").concat(h.data))}},{key:"getPayOutCount",value:function(){var e,t,n,i,r,a,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:-1,u=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",d=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"";this.getId();var p={name:"payouts/count",method:"GET"};if(p.data="where[userId]=".concat(1===(null===(e=this._authService)||void 0===e||null===(t=e.currentUserValue)||void 0===t?void 0:t.roleId)?null===(n=this._authService)||void 0===n||null===(i=n.currentUserValue)||void 0===i?void 0:i.id:null===(r=this._authService)||void 0===r||null===(a=r.currentUserValue)||void 0===a?void 0:a.mainMerchantId),""!=o){var v=o.split("/");p.data=""!=v[1]?"".concat(p.data,"&where[created][between][0]=").concat(v[0]," 00:00:00&where[created][between][1]=").concat(v[1]," 23:59:59"):"".concat(p.data,"&where[created][between][0]=").concat(v[0]," 00:00:00&where[created][between][1]=").concat(v[0]," 23:59:59")}return""!=s&&(p.data="".concat(p.data,"&where[payoutAmount]=").concat(s)),""!=c&&(p.data="".concat(p.data,"&where[payoutId]=").concat(c)),p.data=-1!=l?"".concat(p.data,"&where[payoutstatusId]=").concat(l):"".concat(p.data,"&where[payoutstatusId][inq][0]=3&where[payoutstatusId][inq][1]=4"),""!=u&&(p.data="".concat(p.data,"&where[userbankId]=").concat(u)),""!=d&&(p.data="".concat(p.data,"&filter[where][bankreferenceno][like]=%").concat(d,"%")),this.http.get("".concat(this._authService.updSNAEnvURL("v5")).concat(p.name,"?").concat(p.data))}},{key:"getAvailableFund",value:function(){var e,t,n,i,r,a;this.getId();var o={name:"usermetapersonals",method:"GET",apiVer:"v6"};return o.data="filter[where][userId]=".concat(1===(null===(e=this._authService)||void 0===e||null===(t=e.currentUserValue)||void 0===t?void 0:t.roleId)?null===(n=this._authService)||void 0===n||null===(i=n.currentUserValue)||void 0===i?void 0:i.id:null===(r=this._authService)||void 0===r||null===(a=r.currentUserValue)||void 0===a?void 0:a.mainMerchantId),this.http.get("".concat(this._authService.updSNAEnvURL("v6")).c
1oncat(o.name,"?").concat(o.data))}},{key:"createWithdrawRequest",value:function(e,t,n){var i,r,a,o,s,c,l,u,d=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;this.getId();var p={name:"withdrawalrequests",method:"POST"},v={};return v.amount=e,v.request_note="Withdraw request from partner panel",v.createdby=null===(i=this._authService)||void 0===i||null===(r=i.currentUserValue)||void 0===r?void 0:r.id,v.userId=1==(null===(a=this._authService)||void 0===a||null===(o=a.currentUserValue)||void 0===o?void 0:o.roleId)?null===(s=this._authService)||void 0===s||null===(c=s.currentUserValue)||void 0===c?void 0:c.id:null===(l=this._authService)||void 0===l||null===(u=l.currentUserValue)||void 0===u?void 0:u.mainMerchantId,v.userbankId=t,v.is_express=d,p.data=v,this.http.post("".concat(this._authService.updSNAEnvURL("v6")).concat(p.name),p.data,this.getIdempotencyHeaderOptions(n))}},{key:"getIdempotencyHeaderOptions",value:function(e){var t;return null===(t=this._commonHelperService)||void 0===t?void 0:t.buildHttpHeaderOptions(e?{"Idempotency-Key":e}:null)}},{key:"deleteWithdrawal",value:function(e,t){var n={};return n.name="withdrawalrequests/".concat(e),n.method="PATCH",n.data=t,this.http.patch("".concat(this._authService.updSNAEnvURL("v6")).concat(n.name),n.data)}},{key:"setPayOutId",value:function(e){this.payOut.emit(e)}},{key:"setWithId",value:function(e){this.withID.emit(e)}},{key:"configureAutoWithdraw",value:function(e){var t={name:"usermetapersonals/auto-withdrawal",method:"PATCH",apiVer:"v6"};return t.data={frequency:e},this.http.patch("".concat(this._authService.updSNAEnvURL("v6")).concat(t.name),t.data)}},{key:"agreeWithTC",value:function(){return this.http.patch("".concat(this._authService.updSNAEnvURL("v5"),"usermetapersonals/agreeAutoWithdrawalTC"),"")}},{key:"getDefaultWithdrawalGeneralAdminSetting_Service",value:function(){return this.getId(),this.http.get("".concat(this._authService.updSNAEnvURL("v5"),"settings?filter[where][key]=is_default_auto_settlement_enabled"))}},{key:"getDefaultWithdrawalMerchantAdminSetting_Service",value:function(){var e,t,n,i,r,a;this.getId();var o={data:""};return o.name="usermetapreferences?filter[where][userId]=".concat(1===(null===(e=this._authService)||void 0===e||null===(t=e.currentUserValue)||void 0===t?void 0:t.roleId)?null===(n=this._authService)||void 0===n||null===(i=n.currentUserValue)||void 0===i?void 0:i.id:null===(r=this._authService)||void 0===r||null===(a=r.currentUserValue)||void 0===a?void 0:a.mainMerchantId),o.method="GET",o.apiVer="v6",this.http.get("".concat(this._authService.updSNAEnvURL("v6")).concat(o.name))}},{key:"getSettlementBatchListing",value:function(){var e,t,n,i,r,a,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",u={};if(u.name="transactions/merchantTransactionBatch?filter[merchant_id]=".concat(1===(null===(e=this._authService)||void 0===e||null===(t=e.currentUserValue)||void 0===t?void 0:t.roleId)?null===(n=this._authService)||void 0===n||null===(i=n.currentUserValue)||void 0===i?void 0:i.id:null===(r=this._authService)||void 0===r||null===(a=r.currentUserValue)||void 0===a?void 0:a.mainMerchantId,"&filter[batch_status]=1&filter[skip]=").concat(o,"&filter[limit]=").concat(s),u.method="GET",u.data="",""!=c){var d=c.split("/");u.name=""!=d[1]?"".concat(u.name,"&filter[batch_createdat][0]=").concat(d[0]," 00:00:00&filter[batch_createdat][1]=").concat(d[1]," 23:59:59"):"".concat(u.name,"&filter[batch_createdat][0]=").concat(d[0]," 00:00:00&filter[batch_createdat][1]=").concat(d[0]," 23:59:59")}return l&&(u.name="".concat(u.name,"&filter[batch_id]=").concat(l)),this.http.get("".concat(this._authService.updSNAEnvURL("v5")).concat(u.name))}},{key:"downloadReport",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.getId();
1var n="".concat(r.N.apiUrl,"reporthistories/transactionDetailsReport");return(t&&"POS"==t||e.startsWith("PB")||e.startsWith("SPOS")||e.startsWith("POS"))&&(n="".concat(r.N.apiUrl,"reporthistories/posTransactionDetailReport")),n="".concat(n,"?filter[where][batch_id]=").concat(e,"&filter[where][isBatch]=1"),n="".concat(n,"&isExcel=true"),this.http.get(n,{observe:"response",responseType:"blob"}).pipe((0,a.U)(function(e){return new Blob([e.body])}))}},{key:"sendReport",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.getId();var n={method:"GET",name:"reporthistories/transactionDetailsReport"};return(t&&"POS"==t||e.startsWith("PB")||e.startsWith("SPOS")||e.startsWith("POS"))&&(n.name="reporthistories/posTransactionDetailReport"),n.name="".concat(n.name,"?filter[where][batch_id]=").concat(e,"&filter[where][isBatch]=1&isExcel=true&isEmail=true"),n.data="",this.http.get("".concat(r.N.apiUrl).concat(n.name))}}]),e}();return e.\u0275fac=function(t){return new(t||e)(i.LFG(o.eN),i.LFG(c.$),i.LFG(u.$))},e.\u0275prov=i.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e}()},17884:function(e,t,n){"use strict";n.d(t,{z:function(){return o}});var i=n(35366),r=n(42693),a=n(52105),o=function(){var e=function(){function e(t,n){s(this,e),this.http=t,this._authService=n,this.getId()}return l(e,[{key:"getId",value:function(){var e,t;return this.id=null===(e=this._authService)||void 0===e||null===(t=e.currentUserValue)||void 0===t?void 0:t.id,this.id}},{key:"getTerminalListing",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"",o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"",s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"",c=arguments.length>8&&void 0!==arguments[8]?arguments[8]:"",l=arguments.length>9&&void 0!==arguments[9]?arguments[9]:"",u=arguments.length>10&&void 0!==arguments[10]?arguments[10]:"",d=arguments.length>11&&void 0!==arguments[11]?arguments[11]:"";this.getId(),"/"==n&&(n="");var p={name:"terminals",method:"GET"};if(p.data="filter[skip]=".concat(e,"&filter[limit]=").concat(t,"&filter[order][0]=is_active DESC&filter[order][1]=is_online DESC&filter[include][1]=rentalPlan&filter[include][2]=rentalDetail&filter[include][3]=posdevice&filter[include][4][terminaldevicehistory]=devicetype"),n)if(n.includes("/")){var v=n.split("/");p.data=""!=v[1]?"".concat(p.data,"&filter[where][activated][between][0]=").concat(v[0]," 00:00:00&filter[where][activated][between][1]=").concat(v[1]," 23:59:59"):"".concat(p.data,"&filter[where][activated][between][0]=").concat(v[0]," 00:00:00&filter[where][activated][between][1]=").concat(v[0]," 23:59:59")}else p.data="".concat(p.data,"&filter[activated]=").concat(n);return i&&(p.data="".concat(p.data,"&filter[where][terminalId]=").concat(i)),r&&(p.data="".concat(p.data,"&filter[where][name]=").concat(r)),c&&(p.data=c.includes(" ")?"".concat(p.data,"&filter[where][location]=").concat(c):"".concat(p.data,"&filter[where][location][like]=%").concat(c,"%")),l&&(p.data="".concat(p.data,"&filter[where][deviceSerialNo]=").concat(l)),a&&(p.data="".concat(p.data,"&filter[where][is_active]=").concat(a)),o&&(p.data="".concat(p.data,"&filter[where][payment_method]=").concat(o)),s&&(p.data="".concat(p.data,"&filter[where][card_type]=").concat(s)),u&&(p.data="".concat(p.data,"&filter[where][devicetypeId]=").concat(u)),d&&(p.data="".concat(p.data,"&filter[where][is_online]=").concat(d)),this.http.get("".concat(this._authService.updSNAEnvURL("v5")).concat(p.name,"?").concat(p.data))}},{key:"getTerminalCount",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"",o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"",s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"",c=arguments.length>8&&void 0!==arguments[8]?arguments[8]:"",l=arguments.length>9&&void 0!==arguments[9]?arguments[9]:"",u=arguments.length>10&&void 0!==arguments[10]?arguments[10]:"",d=arguments.length>11&&void 0!==arguments[11]?arguments[11]:"";this.getId(),"/"==n&&(n="");var p={name:"terminals/count",method:"GET",data:""};if(n)if(n.includes("/")){var v=n.split("/");p.data=""!=v[1]?"".concat(p.data,"where[activated][between][0]=").concat(v[0]," 00:00:00&where[activated][between][1]=").concat(v[1]," 23:59:59"):"".concat(p.data,"where[activated][between][0]=").concat(v[0]," 00:00:00&where[activated][between][1]=").concat(v[0]," 23:59:59")}else p.data="".concat(p.data,"filter[activated]=").concat(n);i&&(p.data="".concat(p.data,"&where[terminalId]=").concat(i)),r&&(p.data="".concat(p.data,"&where[name]=").concat(r)),c&&(p.data=c.includes(" ")?"".concat(p.data,"&where[location]=").concat(c):"".concat(p.data,"&where[location][like]=%").concat(c,"%")),l&&(p.data="".concat(p.data,"&where[deviceSerialNo]=").concat(l)),a&&(p.data="".concat(p.data,"&where[is_active]=").concat(a)),o&&(p.data="".concat(p.data,"&where[payment_method]=").concat(o)),s&&(p.data="".concat(p.data,"&where[card_type]=").concat(s)),u&&(p.data="".concat(p.data,"&where[devicetypeId]=").concat(u)),d&&(p.data="".concat(p.data,"&where[is_online]=").concat(d));var h=this.formatTerminalCountQueryPath(null==p?void 0:p.name,null==p?void 0:p.data);return this.http.get("".concat(this._authService.updSNAEnvURL("v5")).concat(h))}},{key:"editTerminalName",value:function(e,t){var n={};return n.name="terminals/".concat(t),n.method="PATCH",n.data={name:e},this.http.patch("".concat(this._authService.updSNAEnvURL("v5")).concat(n.name),n.data)}},{key:"formatTerminalCountQueryPath",value:function(e,t){var n=null==t?void 0:t.trim();return n?(n.startsWith("&")&&(n=n.substring(1)),"".concat(e,"?").concat(n)):e}}]),e}();return e.\u0275fac=function(t){return new(t||e)(i.LFG(r.eN),i.LFG(a.$))},e.\u0275prov=i.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e}()},38582:function(t,n,i){"use strict";i.d(n,{b9:function(){return Zi},pA:function(){return Di}});
1var r=i(99624),a=i(35366),o=i(54391),c=i(23298),u=i(60649),d=i(42693),p=i(26136),v=i(75425),h=i(16304),g=i(31041),m=i(90273),f=i(529),_=i(15940),y=i(69568),S=i(69056),b=i(89666),w=i(56916),I=(i(9781),i(50243)),T=i(98109),E=i(71178),k=i(8500),A=i(22106),C=i(48436),x=i(61116),P=i(33398),O=["dataPrivacyPolicyModal"],N=["pdfContainer"];function U(e,t){if(1&e){var n=a.EpF();a.TgZ(0,"a",18),a.NdJ("click",function(){return a.CHM(n),a.oxw(2).onPolicyDownloadPreview()}),a._UZ(1,"img",19),a.qZA()}}var L=function(e){return{minorDate:e}};function R(e,t){if(1&e&&(a.TgZ(0,"div",20),a.TgZ(1,"p"),a._uU(2),a.ALo(3,"translate"),a.ALo(4,"date"),a.qZA(),a.qZA()),2&e){var n=a.oxw(2);a.xp6(2),a.Oqu(a.xi3(3,1,"PRIVACY_POLICY_ACCEPT_DEADLINE_DYNAMIC",a.VKq(7,L,a.xi3(4,4,null==n.policyDataObj?null:n.policyDataObj.force_update_date,"dd MMM''yy"))))}}function M(e,t){if(1&e){var n=a.EpF();a.TgZ(0,"button",21),a.NdJ("click",function(){return a.CHM(n),a.oxw(2).onPolicyLater()}),a._uU(1),a.ALo(2,"translate"),a.qZA()}2&e&&(a.xp6(1),a.Oqu(a.lcZ(2,1,"MAYBE_LATER")))}function D(e,t){if(1&e){var n=a.EpF();a.TgZ(0,"div",1),a.TgZ(1,"div",2),a.TgZ(2,"div",3),a.TgZ(3,"h6",4),a._uU(4),a.ALo(5,"translate"),a.qZA(),a.TgZ(6,"p",5),a._uU(7),a.ALo(8,"translate"),a._uU(9),a.qZA(),a.qZA(),a.TgZ(10,"div",6),a.YNc(11,U,2,0,"a",7),a.TgZ(12,"a",8),a._UZ(13,"img",9),a.qZA(),a.qZA(),a.qZA(),a.TgZ(14,"div",10),a.TgZ(15,"div",11),a.TgZ(16,"div",12),a.TgZ(17,"pdf-viewer",13),a.NdJ("pageRendered",function(e){return a.CHM(n),a.oxw().onPageRendered(e)})("pagesLoaded",function(e){return a.CHM(n),a.oxw().onPagesLoaded(e)}),a.qZA(),a.qZA(),a.YNc(18,R,5,9,"div",14),a.qZA(),a.qZA(),a.TgZ(19,"div",15),a.YNc(20,M,3,3,"button",16),a.TgZ(21,"button",17),a.NdJ("click",function(){return a.CHM(n),a.oxw().onAcceptTerms()}),a._uU(22),a.ALo(23,"translate"),a.qZA(),a.qZA(),a.qZA()}if(2&e){var i=a.oxw();a.xp6(4),a.Oqu(a.lcZ(5,21,"PRIVACY_POLICY_UPDATE")),a.xp6(3),a.hij(" ",a.lcZ(8,23,"VER_NUMBER")," : "),a.xp6(2),a.hij(" ",null==i.policyDataObj?null:i.policyDataObj.version_code," "),a.xp6(2),a.Q6J("ngIf",null==i.policyDataObj?null:i.policyDataObj.all_privacy_url),a.xp6(1),a.Q6J("href",null==i.policyDataObj?null:i.policyDataObj.site_url,a.LSH),a.xp6(5),a.Q6J("src",i.privacyPreviewUrl)("rotation",0)("original-size",!1)("show-all",!0)("fit-to-page",!1)("zoom",1)("zoom-scale","page-width")("stick-to-page",!1)("render-text",!0)("external-link-target","_blank")("autoresize",!0)("show-borders",!1),a.xp6(1),a.Q6J("ngIf",i.isMinor),a.xp6(2),a.Q6J("ngIf",i.isMinor),a.xp6(1),a.Q6J("disabled",i.isAcceptDisabled),a.xp6(1),a.Oqu(a.lcZ(23,25,"ACCEPT_TERMS"))}}var Z=function(){var e=function(){function e(t,n,i,r,o){s(this,e),this.modalService=t,this._authenticationService=n,this._commonHelperService=i,this._spinnerControlService=r,this._accountService=o,this._distroyed$=new b.x,this.isAcceptDisabled=!0,this.totalPages=0,this.renderedPages=new Set,this.currentPage=0,this.policyAction=new a.vpe}return l(e,[{key:"ngOnInit",value:function(){var e=this;setTimeout(function(){e.isAcceptDisabled=!1},3e4)}},{key:"ngAfterViewInit",value:function(){var e,t,n,i,r,a=this;this.policyDataObj=null===(e=this._authenticationService)||void 0===e||null===(t=e.loginUserValue)||void 0===t?void 0:t.privacyUpdateObj,this.isMinor="minor"==(null===(n=this.policyDataObj)||void 0===n||null===(i=n.changes_type)||void 0===i?void 0:i.toLowerCase())&&!(null!==(r=this.policyDataObj)&&void 0!==r&&r.force_update_today),this.openDataPrivacyPolicy(),this.onPolicyDownloadPreview(!0),setTimeout(function(){var e=document.querySelector(".ng2-pdf-viewer-container");e?e.addEventListener("scroll",function(){e.scrollTop+e.clientHeight>=e.scrollHeight-5&&(console.log("\u2705 Reached bottom (REAL scroll)"),a.isAcceptDisabled=!1)}):console.log("\u274c inner container not found")},1e3)}},{key:"onScroll",value:function(e){var t=e.target;t.scrollHeight-t.scrollTop<=t.clientHeight+5&&(this.isAcceptDisabled=!1)}},{key:"onPageRendered",value:function(e){this.currentPage=e.pageNumber}},{key:"onPagesLoaded",value:function(e){this.totalPages=e.pagesCount}},{key:"openDataPrivacyPolicy",value:function(){console.log("openD
1ataPrivacyPolicy:",this.policyDataObj),this.modalService.open(this.dataPrivacyPolicyModalTempRef,{centered:!0,size:"sm",backdrop:"static",windowClass:"modal-cattwo"})}},{key:"onPolicyDownloadPreview",value:function(){var e,t,n=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i=this;this._spinnerControlService.showSpinner(),this._accountService.downloadContainerFile(n?this.policyDataObj.current_changes_privacy_url:this.policyDataObj.all_privacy_url,"privacyDoc").pipe((0,y.R)(this._distroyed$)).subscribe({next:(t=(0,h.Z)(regeneratorRuntime.mark(function e(t){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:n?(i.privacyPreviewUrl=i._commonHelperService.createFileObjectUrl({blob:t,sanitize:!1}),console.log("onPolicyDownloadPreview this.privacyPreviewUrl:",i.privacyPreviewUrl)):i._commonHelperService.saveFile({filePath:i.policyDataObj.all_privacy_url,blobRes:t}),i._spinnerControlService.hideSpinner();case 1:case"end":return e.stop()}},e)})),function(e){return t.apply(this,arguments)}),error:(e=(0,h.Z)(regeneratorRuntime.mark(function e(t){var n,r,a;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.t1=JSON,e.next=3,t.error.text();case 3:if(e.t2=e.sent,e.t3=n=e.t1.parse.call(e.t1,e.t2),e.t0=null===e.t3,e.t0){e.next=8;break}e.t0=void 0===n;case 8:if(!e.t0){e.next=12;break}e.t4=void 0,e.next=13;break;case 12:e.t4=null===(r=n.error)||void 0===r?void 0:r.message;
1case 13:a=e.t4,i._spinnerControlService.hideSpinner(),i._commonHelperService.disTransErrMsg(a);case 15:case"end":return e.stop()}},e)})),function(t){return e.apply(this,arguments)})})}},{key:"onPolicyLater",value:function(){this.modalService.dismissAll(),this.policyAction.emit("later")}},{key:"onAcceptTerms",value:function(){var e,t=this,n=this;this._spinnerControlService.showSpinner();var i,r={is_accepted:!0,privacy_policy_version_id:null===(e=this.policyDataObj)||void 0===e?void 0:e.privacy_policy_version_id};r=this._commonHelperService.addBrowserInfo(r),this._accountService.callAcceptPrivacyPolicy(r).pipe((0,y.R)(this._distroyed$)).subscribe({next:function(e){var n;e.error?t._commonHelperService.disTransErrMsg(null==e||null===(n=e.error)||void 0===n?void 0:n.message):(t.modalService.dismissAll(),t.policyAction.emit("accepted"))},error:(i=(0,h.Z)(regeneratorRuntime.mark(function e(t){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:n._spinnerControlService.hideSpinner();case 1:case"end":return e.stop()}},e)})),function(e){return i.apply(this,arguments)}),complete:function(){}})}},{key:"ngOnDestroy",value:function(){this.modalService.dismissAll(),this._spinnerControlService.resetSpinner(),this._distroyed$.next(null),this._distroyed$.complete()}}]),e}();return e.\u0275fac=function(t){return new(t||e)(a.Y36(_.FF),a.Y36(T.$h),a.Y36(T.$P),a.Y36(T.br),a.Y36(T.BR))},e.\u0275cmp=a.Xpm({type:e,selectors:[["app-privacy-policy"]],viewQuery:function(e,t){var n;(1&e&&(a.Gf(O,5),a.Gf(N,5)),2&e)&&(a.iGM(n=a.CRH())&&(t.dataPrivacyPolicyModalTempRef=n.first),a.iGM(n=a.CRH())&&(t.pdfContainer=n.first))},outputs:{policyAction:"policyAction"},features:[a._Bn([_.NM,_.FF])],decls:2,vars:0,consts:[["dataPrivacyPolicyModal",""],[1,"data-privacy-wrap"],[1,"cattwo-header","d-flex","justify-content-between"],[1,"privacy-policy-title"],[1,"pp-main-title","text-left"],[1,"version-number"],[1,"data-p-action"],["href","javascript:void(0)",3,"click",4,"ngIf"],["target","_blank","rel","noopener noreferrer",3,"href"],["src","../../../../../assets/images/pos-panel/invoice-icon/eye.svg"],[1,"modal-body","p-0"],[1,"cate-popup-body","px-0"],[1,"cate-inner-title"],[2,"width","100%","height","600px",3,"src","rotation","original-size","show-all","fit-to-page","zoom","zoom-scale","stick-to-page","render-text","external-link-target","autoresize","show-borders","pageRendered","pagesLoaded"],["class","privacy-notes",4,"ngIf"],[1,"withdbutton-group"],["class","btn outline-btn","type","button",3,"click",4,"ngIf"],["type","button",1,"btn","confirm-btn",3,"disabled","click"],["href","javascript:void(0)",3,"click"],["src","../../../../../assets/images/pos-panel/invoice-icon/download_batch.svg"],[1,"privacy-notes"],["type","button",1,"btn","outline-btn",3,"click"]],template:function(e,t){1&e&&a.YNc(0,D,24,27,"ng-template",null,0,a.W1O)},directives:[x.O5,P.rQ],pipes:[u.X$,x.uU],styles:[".data-privacy-wrap[_ngcontent-%COMP%] .data-p-action[_ngcontent-%COMP%]{display:flex;grid-gap:8px;gap:8px}.data-privacy-wrap[_ngcontent-%COMP%] .data-p-action[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{display:inline-block;height:22px;width:22px;outline:0}.data-privacy-wrap[_ngcontent-%COMP%] .withdbutton-group[_ngcontent-%COMP%]{display:flex;align-items:center;grid-gap:10px;gap:10px}.data-privacy-wrap[_ngcontent-%COMP%] .withdbutton-group[_ngcontent-%COMP%] .confirm-btn[_ngcontent-%COMP%], .data-privacy-wrap[_ngcontent-%COMP%] .withdbutton-group[_ngcontent-%COMP%] .outline-btn[_ngcontent-%COMP%]{width:100%!important;max-width:100%!important}.data-privacy-wrap[_ngcontent-%COMP%] .privacy-notes[_ngcontent-%COMP%]{padding:10px;background:#fff5eb;position:absolute;width:100%;bottom:0}.data-privacy-wrap[_ngcontent-%COMP%] .privacy-notes[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font-family:Open Sans,sans-serif;font-style:normal;font-weight:700;font-size:14px;line-height:20px;text-align:center;letter-spacing:-.005em;color:#b46b26;margin-bottom:0}.data-privacy-wrap[_ngcontent-%COMP%] .pp-main-title[_ngcontent-%COMP%]{margin-bottom:5px!important}.data-privacy-wrap[_ngcontent-%COMP%] .version-number[_ngcontent-%COMP%]{color:#324c6a} .ng2-pdf-viewer-container::-webkit-scrollbar-track{box-shadow:inset 0 0 6px #f8fafc;-webkit-box-shadow:inset 0 0 6px #f8fafc} .ng2-pdf-viewer-container::-webkit-scrollbar, .ng2-pdf-viewer-container::-webkit-scrollbar-thumb{background-color:#b8bfca;width:6px;border-radius:26px} .ng2-pdf-viewer-container::-webkit-scrollbar-thumb{background-color:#97a2b1} .modal-cattwo .modal-dialog{max-width:650px;position:relative}"]}),e}(),q=i(32309),V=i(27624),F=i(77972),Y=i(94720),j=["otp1"],H=["eleLoginEmail"],J=["doc_expiry_notification"];function B(e,t){if(1&e){var n=a.EpF();a.TgZ(0,"app-privacy-policy",18),a.NdJ("policyAction",function(e){return a.CHM(n),a.oxw().handlePolicyAction(e)}),a.qZA()}}function W(e,t){if(1&e){var n=a.EpF();a.ynx(0),a.TgZ(1,"a",19),a._UZ(2,"img",20),a.qZA(),a.TgZ(3,"a",21),a.NdJ("click",function(){return a.CHM(n),a.oxw().changeLangSettings("ar")}),a._UZ(4,"img",22),a.qZA(),a.BQk()}}function G(e,t){if(1&e){var n=a.EpF();a.ynx(0),a.TgZ(1,"a",19),a._UZ(2,"img",23),a.qZA(),a.TgZ(3,"a",21),a.NdJ("click",function(){return a.CHM(n),a.oxw().changeLangSettings("en")}),a._UZ(4,"img",24),a.qZA(),a.BQk()}}function Q(e,t){1&e&&(a.TgZ(0,"a"),a._UZ(1,"img",38),a.qZA())}function K(e,t){1&e&&(a.TgZ(0,"a"),a._UZ(1,"img",39),a.qZA())}function $(e,t){1&e&&(a.TgZ(0,"span",40),a._uU(1),a.ALo(2,"translate"),a.qZA()),2&e&&(a.xp6(1),a.Oqu(a.lcZ(2,1,"PROVIDE_VALID_PHONE_PASSWORD")))}function z(e,t){1&e&&(a.TgZ(0,"span",40),a._uU(1),a.ALo(2,"translate"),a.qZA()),2&e&&(a.xp6(1),a.Oqu(a.lcZ(2,1,"PLS_PRO
1VIDE_VALID_OTP")))}function X(e,t){1&e&&(a.TgZ(0,"span",40),a._uU(1),a.ALo(2,"translate"),a.qZA()),2&e&&(a.xp6(1),a.Oqu(a.lcZ(2,1,"NOT_REG_AS_PARTNER_USER_CONTACT_ADMIN")))}function ee(e,t){if(1&e&&(a.TgZ(0,"span",40),a._uU(1),a.ALo(2,"translate"),a.qZA()),2&e){var n=a.oxw(2);a.xp6(1),a.Oqu(a.lcZ(2,1,n.errorMessage))}}var te=function(){return["/auth/reset-pass"]};function ne(e,t){if(1&e){var n=a.EpF();a.TgZ(0,"div"),a.TgZ(1,"div",25),a._UZ(2,"img",26),a.TgZ(3,"input",27,28),a.NdJ("keyup.enter",function(){return a.CHM(n),a.oxw().handleLogin()}),a.ALo(5,"translate"),a.qZA(),a.qZA(),a.TgZ(6,"div",29),a._UZ(7,"img",30),a.TgZ(8,"input",31,32),a.NdJ("keyup.enter",function(){return a.CHM(n),a.oxw().handleLogin()}),a.ALo(10,"translate"),a.qZA(),a.TgZ(11,"span",33),a.NdJ("click",function(){a.CHM(n);var e=a.MAs(9);return a.oxw().togglePasswordOne(e)}),a.YNc(12,Q,2,0,"a",8),a.YNc(13,K,2,0,"a",8),a.qZA(),a.qZA(),a.YNc(14,$,3,3,"span",34),a.YNc(15,z,3,3,"span",34),a.YNc(16,X,3,3,"span",34),a.YNc(17,ee,3,3,"span",34),a.TgZ(18,"div",35),a.TgZ(19,"a",36),a._uU(20),a.ALo(21,"translate"),a.qZA(),a.TgZ(22,"button",37),a.NdJ("click",function(){return a.CHM(n),a.oxw().handleLogin()}),a.TgZ(23,"span"),a._uU(24),a.ALo(25,"translate"),a.qZA(),a.qZA(),a.qZA(),a.qZA()}if(2&e){var i=a.oxw();a.xp6(3),a.s9C("placeholder",a.lcZ(5,16,"MOB_NUM")),a.xp6(5),a.s9C("placeholder",a.lcZ(10,18,"PASSWORD")),a.xp6(3),a.ekj("div-disabled",i.isVPNDisabled),a.xp6(1),a.Q6J("ngIf",i._showPassword1),a.xp6(1),a.Q6J("ngIf",!i._showPassword1),a.xp6(1),a.Q6J("ngIf",1==i.error),a.xp6(1),a.Q6J("ngIf",2==i.error),a.xp6(1),a.Q6J("ngIf",3==i.error),a.xp6(1),a.Q6J("ngIf",4==i.error),a.xp6(2),a.ekj("div-disabled",i.isVPNDisabled),a.Q6J("routerLink",a.DdM(24,te)),a.xp6(1),a.Oqu(a.lcZ(21,20,"FORGOT_PASSWORD")),a.xp6(2),a.Q6J("disabled",i.submit||i.isVPNDisabled),a.xp6(2),a.Oqu(a.lcZ(25,22,"LOGIN"))}}function ie(e,t){if(1&e){var n=a.EpF();a.TgZ(0,"p",56),a.NdJ("click",function(){return a.CHM(n),a.oxw(2).resendOTP(1)}),a._uU(1),a.ALo(2,"translate"),a.qZA()}2&e&&(a.xp6(1),a.hij(" ",a.lcZ(2,1,"RESEND_OTP"),""))}function re(e,t){if(1&e&&(a.TgZ(0,"p",57),a.TgZ(1,"span",58),a._uU(2),a.ALo(3,"translate"),a.ALo(4,"translate"),a.qZA(),a.qZA()),2&e){var n=a.oxw(2);a.xp6(2),a.lnq("",a.lcZ(3,3,"OTP_VALID_UPTO")," ",n.time," ",a.lcZ(4,5,"SECONDS"),"")}}function ae(e,t){if(1&e){var n=a.EpF();a.TgZ(0,"div",41),a.TgZ(1,"h5",42),a._uU(2),a.ALo(3,"translate"),a.qZA(),a.TgZ(4,"p",43),a._uU(5),a.ALo(6,"translate"),a.ALo(7,"translate"),a.qZA(),a.TgZ(8,"div",44),a.TgZ(9,"input",45,46),a.NdJ("keypress",function(){return a.CHM(n),a.oxw().otpError=0}),a.qZA(),a.TgZ(11,"input",47),a.NdJ("keypress",function(){return a.CHM(n),a.oxw().otpError=0}),a.qZA(),a.TgZ(12,"input",48),a.NdJ("keypress",function(){return a.CHM(n),a.oxw().otpError=0}),a.qZA(),a.TgZ(13,"input",49),a.NdJ("keypress",function(){return a.CHM(n),a.oxw().otpError=0}),a.qZA(),a.TgZ(14,"input",50),a.NdJ("keypress",function(){return a.CHM(n),a.oxw().otpError=0}),a.qZA(),a.TgZ(15,"input",51),a.NdJ("keypress",function(){return a.CHM(n),a.oxw().otpError=0})("keyup",function(){return a.CHM(n),a.oxw().handleOTPauth()}),a.qZA(),a.qZA(),a.TgZ(16,"div"),a.YNc(17,ie,3,3,"p",52),a.YNc(18,re,5,7,"p",53),a.qZA(),a.TgZ(19,"p",54),a._uU(20),a.ALo(21,"translate"),a.TgZ(22,"a",55),a.NdJ("click",function(){return a.CHM(n),a.oxw().goBack()}),a._uU(23),a.ALo(24,"translate"),a.qZA(),a.qZA(),a.qZA()}if(2&e){var i=a.oxw();a.xp6(2),a.Oqu(a.lcZ(3,8,"LOGIN_WITH_MOB_NUM")),a.xp6(3),a.lnq("",a.lcZ(6,10,"SEND_OTP_TO_YOUR_NUM")," ",i.dummyNo," ",a.lcZ(7,12,"ENTER_OTP_IN_SPACE_TO_CONFIRM_IDENTITY"),""),a.xp6(12),a.Q6J("ngIf",!i.loginPage&&!i.showContDown),a.xp6(1),a.Q6J("ngIf",!i.loginPage&&i.showContDown),a.xp6(2),a.hij("",a.lcZ(21,14,"DO_YOU_WANT_TO")," "),a.xp6(3),a.hij(" ",a.lcZ(24,16,"BACK_TO_LOGIN")," ")}}function oe(e,t){if(1&e&&(a.ynx(0),a._uU(1),a.BQk()),2&e){var n=a.oxw(2);a.xp6(1),a.hij(" ",n.loginResponse.promtDocMessageAr," ")}}function se(e,t){if(1&e&&a._uU(0),2&e){var n=a.oxw(2);a.hij(" ",n.loginResponse.promtDocMessageEn," ")}}var ce=function(){return["/merchantpanel/myaccounts"]};function le(e,t){if(1&e&&(a.TgZ(0,"div",59),a.TgZ(1,"h6"),a._uU(2),a.ALo(3,"translate"),a.qZA(),a.TgZ(4,"button",60),a.NdJ("click",function(){return t.$implicit.close(0)}),a._UZ(5,"img",61),a.qZA(),a.qZA(),a.TgZ(6,"div",62),a.TgZ(7,"div",63),a.TgZ(8,"div",64),a._UZ(9,"img",65),a.qZA(),a.TgZ(10,"div",66),a.TgZ(11,"p",67),a.YNc(12,oe,2,1,"ng-container",68),a.YNc(13,se,1,1,"ng-template",null,69,a.W1O),a.qZA(),a.qZA(),a.qZA(),a.TgZ(15,"div",70),a.TgZ(16,"a",71),a.TgZ(17,"button",72),a.NdJ("click",function(){return t.$implicit.close(0)}),a._uU(18),a.ALo(19,"translate"),a.qZA(),a.qZA(),a.TgZ(20,"button",73),a.NdJ("click",function(){return t.$implicit.close(0)}),a._uU(21),a.ALo(22,"translate"),a.qZA(),a.qZA(),a.qZA()),2&e){var n=a.MAs(14),i=a.oxw();a.xp6(2),a.Oqu(a.lcZ(3,6,"Attention")),a.xp6(10),a.Q6J("ngIf","ar"==i.currLang)("ngIfElse",n),a.xp6(4),a.Q6J("routerLink",a.DdM(12,ce)),a.xp6(2),a.hij(" ",a.lcZ(19,8,"UPDATE")," "),a.xp6(3),a.hij(" ",a.lcZ(22,10,"CANCEL"),"")}}var ue=function(){var e=function(){function e(t,n,i,r,a,o,c,l,u,d,p){var v=this;s(this,e),this.fb=t,this._authenticationService=n,this.router=i,this._commonHelperService=r,this._paymentServiceTypeServices=a,this.spinnerSadad=o,this.translate=c,this.layout=l,this._permissionService=u,this.modalService=d,this._reportService=p,this.isVPNDisabled=!1,this.timerConfig={leftTime:60,format:"'OTP Valid Up To' \uff1as"},this.show=!1,this._showPassword1=!1,this.loginPage=!0,this.submit=!1,this.showContDown=!0,this.ishandOTPCall=!1,this.isVPNproxy=!1,this.error=0,this.time=60,this.currLang="",this.allowDocExpiryPrompt=!1,this._distroyed$=new b.x,this.isShowPrivacyPolicy=!1,this.isVPNDisabled=!0,this._authenticationService.vpnCheckCall.emit("1"),this._authenticationService.isVpnProxy.subscribe(function(e){v.isVPNproxy=v.loginPage=e});var h=localStorage.getItem("selectedLang");h?(this.currLang=h,this.translate.use(h),this.setLangSettings(h)):(this.currLang=f.N.defaultLang,this.translate.use(f.N.defaultLang),localStorage.setItem("selectedLang",f.N.defaultLang),this.setLangSettings(f.N.defaultLang)),this._authenticationService.currentUserValue&&this._authenticationService.currentUserValue.id&&this.router.navigate(["/dashboard/".concat(this._paymentServiceTypeServices.serviceType,"-default")]),this.checkFocus
1Redirect(),this.loginForm=this.fb.group({email:["",[g.kI.required]],password:["",g.kI.required],otp1:["",[g.kI.required]],otp2:["",[g.kI.required]],otp3:["",[g.kI.required]],otp4:["",[g.kI.required]],otp5:["",[g.kI.required]],otp6:["",[g.kI.required]]}),this.loginForm.disable(),this._authenticationService.vpnEventEmitter.pipe((0,y.R)(this._distroyed$)).subscribe(function(e){"appEnaLoginFormEvent"==e&&v.enableLoginForm()})}return l(e,[{key:"checkFocusRedirect",value:function(){var e=this;this.checkAndRedirectLoggedInUserSession(),this.windowFocusEventListenerRef=function(){var t;e.loginPage&&(null===(t=e._authenticationService)||void 0===t?void 0:t.isAuthLoginPagePathCheck())&&e.checkAndRedirectLoggedInUserSession()},this.windowStorageEventListenerRef=function(t){"currentUser"===(null==t?void 0:t.key)&&(null==t?void 0:t.newValue)&&e.loginPage&&e.checkAndRedirectLoggedInUserSession()},window.addEventListener("focus",this.windowFocusEventListenerRef),window.addEventListener("storage",this.windowStorageEventListenerRef)}},{key:"ngOnInit",value:function(){this.loginPage=!0,this.spinnerSadad.hide(),this.currYear=(new Date).getFullYear(),this.allowDocExpiryPrompt=this._permissionService.hasFuncPermission("login","DOC_EXPIRY_PROMPT")}},{key:"ngAfterViewInit",value:function(){var e=this;setTimeout(function(){var t,n;null===(t=e.eleLoginEmail)||void 0===t||null===(n=t.nativeElement)||void 0===n||n.focus()},0),this._authenticationService.vpnEventEmitter.emit("vpnInitEvent"),this.checkAndRedirectLoggedInUserSession()}},{key:"checkAndRedirectLoggedInUserSession",value:function(){var e;return null===(e=this._authenticationService)||void 0===e?void 0:e.checkAndRedirectLoggedInUserSession()}},{key:"checkAlreadyLoggedInBeforeSubmit",value:function(){var e,t;return!(null===(e=this._authenticationService)||void 0===e||!e.checkAlreadyLoggedInBeforeSubmit()||(null!==(t=this.spinnerSadad)&&void 0!==t&&t.hide(),0))}},{key:"openDocExpirtyNotificationModal",value:function(e){this.modalService.hasOpenModals()||this.modalService.open(e,{windowClass:"modal-cattwo",backdrop:"static",size:"md",centered:!0}).result.then(function(e){},function(e){})}},{key:"changeLangSettings",value:function(e){this._authenticationService.vpnCheckCall.emit("1"),this.currLang=e,this.translate.use(e),this.layout.changeLayoutType("en"==e?"ltr":"rtl"),localStorage.setItem("selectedLang",e)}},{key:"setLangSettings",value:function(e){this.layout.changeLayoutType("en"==e?"ltr":"rtl")}},{key:"goBack",value:function(){var e=this;return(0,h.Z)(regeneratorRuntime.mark(function t(){var n,i;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e._authenticationService.vpnCheckCall.emit("1"),e.error=0,e.loginPage=!0,null!==(n=e.otp1)&&void 0!==n&&null!==(i=n.nativeElement)&&void 0!==i&&i.blur(),setTimeout(function(){var t,n;null===(t=e.eleLoginEmail)||void 0===t||null===(n=t.nativeElement)||void 0===n||n.focus()},0),e.submit=!1,t.next=8,e._authenticationService.clearUserData();case 8:e.loginForm.controls.email.reset(),e.loginForm.controls.password.reset(),e._authenticationService.login("","",!0).subscribe(function(t){e.formReset()});case 11:case"end":return t.stop()}},t)}))()}},{key:"formReset",value:function(){this.error=0,this.loginForm.reset({email:"",password:"",otp1:"",otp2:"",otp3:"",otp4:"",otp5:"",otp6:""},{emitEvent:!1})}},{key:"togglePasswordOne",value:function(e){this._showPassword1=!this._showPassword1,e.setAttribute("type",this._showPassword1?"text":"password")}},{key:"editNumber",value:function(e){for(var t="X",n=0;n<e.length-3;n++)t+="X";return e.charAt(0)+t+e.charAt(e.length-1)}},{key:"handleOTPauth",value:function(){var e=this;if(this.checkAlreadyLoggedInBeforeSubmit())this.ishandOTPCall=!1;else if(this._authenticationService.vpnCheckCall.emit("otpauth"),0==this.ishandOTPCall)if(this.ishandOTPCall=!0,this.loginForm.controls.otp1.value&&this.loginForm.controls.otp2.value&&this.loginForm.controls.otp3.value&&this.loginForm.controls.otp4.value&&this.loginForm.controls.otp5.value&&this.loginForm.controls.otp6.value){this.error=0;var t=this.loginForm.controls.otp1.value+this.loginForm.controls.otp2.value+this.loginForm.controls.otp3.value+this.loginForm.controls.otp4.value+this.loginForm.controls.otp5.value+this.loginForm.controls.otp6.value;if(t.length<6)return void(this.ishandOTPCall=!1);this.loginForm.controls.otp1.setErrors({invalid:!1}),this.spinnerSadad.show(),this._authenticationService.verifyOtp(t,this._userId).subscribe(function(t){var n,i,r,a,o,s;e.handleOTPauthResult=t;var c=(null==t?void 0:t.statusCode)||(null==t||null===(n=t.error)||void 0===n?void 0:n.statusCode);if(c||null!=t&&t.error){var l;if([400,429].includes(c)||null!=t&&t.error)return e.error=2,e.spinnerSadad.hide(),e._commonHelperService.disTransErrMsg((null==t?void 0:t.message)||(null==t||null===(l=t.error)||void 0===l?void 0:l.message)||"Error!"),void(e.ishandOTPCall=!1);if([401].includes(c))return void e.handleOTPAuthError(t)}else null===(i=e._authenticationService)||void 0===i||null===(r=i.loginUserValue)||void 0===r||!r.privacyUpdateObj||null!==(a=e._authenticationService)&&void 0!==a&&null!==(o=a.loginUserValue)&&void 0!==o&&null!==(s=o.privacyUpdateObj)&&void 0!==s&&s.is_accepted?e.handleOTPSuccRes(t):(e.isShowPrivacyPolicy=!0,e.openPrivacyPolicyPopup(t))},function(t){e.handleOTPAuthError(t)})}else this.ishandOTPCall=!1}},{key:"handleOTPAuthError",value:function(e){var t,n,i,r,a,o,s,c,l,u;this.spinnerSadad.hide(),this.error=2,this.ishandOTPCall=!1;var d=this.formatUserFriendlyErrMsg(("ar"===this.currLang?(null==e?void 0:e.message_ar)||(null==e||null===(t=e.error)||void 0===t?void 0:t.message_ar)||(null==e||null===(n=e.error)||void 0===n||null===(i=n.error)||void 0===i?void 0:i.message_ar)||(null==e?void 0:e.message)||(null==e||null===(r=e.error)||void 0===r?void 0:r.message):(null==e?void 0:e.message)||(null==e||null===(a=e.error)||void 0===a?void 0:a.message)||(null==e||null===(o=e.error)||void 0===o||null===(s=o.error)||void 0===s?void 0:s.message))||"Error!");this._commonHelperService.disTransErrMsg(d);var p=(null==e?void 0:e.statusCode)||(null==e||null===(c=e.error)||void 0===c?void 0:c.statusCode)||(null==e||null===(l=e.error)||void 0===l||null===(u=l.error)||void 0===u?void 0:u.statusCode)||(null==e?void 0:e.status);401!==p&&499!==p||this.goBack()}},{key:"handleOTPauthSuccess",value:function(e){var t=this;this.processDynamicFirebaseUserAuth(e),null!=e&&e.cellnumber,setTimeout(function(){var e,n,i,r,a,o;null!==(e=t._authenticationService)&&void 0!==e&&e.currentUserValue?(1!=(null===(n=t._authenticationService)||void 0===n||null===(i=n.currentUserValue)||void 0===i?void 0:i.roleId)&&16!=(null===(r=t._authenticationService)||void 0===r||null===(a=r.currentUserValue)||void 0===a?void 0:a.roleId)||t._authenticationService.getVerifications(),t.router.navigate(["/dashboard/".concat(t._paymentServiceTypeServices.serviceType,"-default")]),t.spinnerSadad.hide(),t.ishandOTPCall=!1,t.loginResponse&&(null===(o=t.loginResponse)||void 0===o?void 0:o.isDocExpired)&&(t.allowDocExpiryPrompt=t._permissionService.hasFuncPermission("login","DOC_EXPIRY_PROMPT"),t.allowDocExpiryPrompt&&t._authenticationService.docExpiryNotiEveEmit.pipe((0,S.q)(1)).subscribe(function(e){t.openDocExpirtyNotificationModal(t.doc_expiry_notification)}))):t.spinnerSadad.hide(),setTimeout(function(){t.displayReadyToDownloadReport()},2e3)},2e3),this.ishandOTPCall=!1,this.submit=!1}},{key:"handleOTPSuccRes",value:function(e){var t;e?(this.spinnerSadad.show(),this._authenticationService.saveAuthCurrentUser(e),this.handleOTPauthSuccess(e)):null===(t=this.spinnerSadad)||void 0===t||t.hide()}},{key:"openPrivacyPolicyPopup",value:function(e){this.modalService.dismissAll(),this.spinnerSadad.hide()}},{key:"handlePolicyAction",value:function(e){console.log("Privacy policy action:",e),this.isShowPrivacyPolicy=!1,this.handleOTPSuccRes(this.handleOTPauthResult)}},{key:"displayReadyToDownloadReport",value:function(){var e,t=this;this._reportService.getDownReqStatus().pipe((0,y.R)(this._distroyed$)).subscribe({next:function(e){var n,i,r;null!=e&&e.error?t._commonHelperService.disTransErrMsg(null==e||null===(n=e.error)||void 0===n?void 0:n.message):(t._reportService.handleReportBulkPoll(e,!1),t._reportService.handleStatementBulkPoll(e,!1),null!=e&&e.report_request_ids&&null!=e&&null!==(i=e.report_request_ids)&&void 0!==i&&i.length&&(console.log("displayReadyToDownloadReport:",null==e?void 0:e.report_request_ids),t._commonHelperService.updateDownRprtIds("add",null==e?void 0:e.report_request_ids)),(null==e?void 0:e.statement_request_ids)&&(null==e||null===(r=e.statement_request_ids)||void 0===r?void 0:r.length)&&(console.log("displayReadyToDownloadStatement:",null==e?void 0:e.statement_request_ids),t._commonHelperService.updateDownStmtIds("add",null==e?void 0:e.statement_request_ids)))},error:(e=(0,h.Z)(regeneratorRuntime.mark(function e(t){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}},e)})),function(t){return e.apply(this,arguments)})})}},{key:"handleLogin",value:function(){var e=this;if(!this.checkAlreadyLoggedInBeforeSubmit()){var t;if(this._authenticationService.vpnCheckCall.emit("1"),localStorage.setItem("currUserMob",this.loginForm.controls.email.value),this.spinnerSadad.show(),this.showContDown=!0,this.error=0,this.loginForm.controls.email.errors||this.loginForm.controls.password.errors)return this.error=1,void this.spinnerSadad.hide();this.submit=!0,null!==(t=this._authenticationService.currentUserValue)&&void 0!==t&&t.id?(localStorage.setItem("currUserMob",this.loginForm.controls.email.value),this.processUserLogin()):this._authenticationService.login("","",!0).subscribe(function(t){var n,i;null!=t&&t.error?(e.spinnerSadad.hide(),e._commonHelperService.disTransErrMsg(null!=t&&null!==(n=t.error)&&void 0!==n&&n.message?null==t||null===(i=t.error)||void 0===i?void 0:i.message:null==t?void 0:t.error)):e.processUserLogin()},function(t){var n,i,r;e.submit=!1,e.enableLoginForm(),e._commonHelperService.disTransErrMsg((null==t||null===(n=t.error)||void 0===n||null===(i=n.error)||void 0===i?void 0:i.message)||(null==t||null===(r=t.error)||void 0===r?void 0:r.message)||(null==t?void 0:t.message)),e.spinnerSadad.hide()})}}},{key:"callFindOne",value:function(){this.processUserLogin()}},{key:"processUserLogin",value:function(){var e=this;this._authenticationService.login(this.loginForm.controls.email.value,this.loginForm.controls.password.value,!1).subscribe(function(t){var n,i,r,a,o,s,c,l;if(null!=t&&t.error)return 404==(null==t||null===(n=t.error)||void 0===n?void 0:n.statusCode)?(e.error=3,void e.spinnerSadad.hide()):499==(null==t||null===(i=t.error)||void 0===i?void 0:i.statusCode)?(e._commonHelperService.disTransErrMsg(null==t||null===(r=t.error)||void 0===r?void 0:r.message),e.submit=!1,void e.spinnerSadad.hide()):429==(null==t||null===(a=t.error)||void 0===a?void 0:a.statusCode)?(e.spinnerSadad.hide(),e._commonHelperService.disTransErrMsg("Too many attempts"==(null==t||null===(o=t.error)||void 0===o?void 0:o.message)?"REACHED_MAX_LOGIN_TRY_AFTER_30_SEC_OR_RESET_PWD":null==t||null===(s=t.error)||void 0===s?void 0:s.message),void(e.submit=!1)):(e.error=1,e.submit=!1,void e.spinnerSadad.hide());if(null!=t&&t.blocked&&(null==t||!t.requestfordeleteaccount))return e.errorMessage="User is seems to be deactivated.",e.error=4,e.submit=!1,void e.spinnerSadad.hide();if(null!=t&&t.blockedByAdmin)return e.errorMessage="Access permission is denied by admin.",e.error=4,e.submit=!1,void e.spinnerSadad.hide();if("basic"==(null==t?void 0:t.type))return e.errorMessage="You don't have sufficiant permissions to access Merchant Panel",e.error=4,e.submit=!1,void e.spinnerSadad.hide();if(1!==(null==t?void 0:t.roleId)&&16!==(null==t?void 0:t.roleId)&&17!==(null==t?void 0:t.roleId)&&14!==(null==t?void 0:t.roleId))return e.submit=!1,null!=t&&t.error&&null!=t&&null!==(c=t.error)&&void 0!==c&&c.message?e._commonHelperService.disTransErrMsg(null==t||null===(l=t.error)||void 0===l?void 0:l.message):e.error=1,void e.spinnerSadad.hide();var u=e._permissionService.getAllowedServiceType(null==t?void 0:t.roleId);e._paymentServiceTypeServices.changeServiceType(u),e.dummyNo=e.editNumber(e.loginForm.controls.email.value),e.startTimer(),e._userId=null==t?void 0:t.userId,e.loginPage=!1,e.isVPNproxy=!1,e.eleLoginEmail&&e.eleLoginEmail.nativeElement.blur(),setTimeout(function(){e.otp1&&e.otp1.nativeElement.focus()},0),e.submit=!1,e.spinnerSadad.hide(),e.loginResponse=t,e.setLoginUserData(t),localStorage.setItem("currUserMob",e.loginForm.controls.email.value)},function(t){e.handleLoginErrMsg(t)})}},{key:"handleLoginErrMsg",value:function(e){var t,n=(null==e||null===(t=e.error)||void 0===t?void 0:t.error)||(null==e?void 0:e.error)||e;if(n){if(404==(null==n?void 0:n.statusCode))this.error=3,this.spinnerSadad.hide();else if(403==(null==n?void 0:n.statusCode)&&"e043"==(null==n?void 0:n.error_code))this.handleAccountClosedErr(n);else if(499==(null==n?void 0:n.statusCode)){var i="ar"==this.currLang&&(null==n?void 0:n.message_ar)||(null==n?void 0:n.message);this._commonHelperService.disTransErrMsg(i),this.error=4,this.errorMessage=i,this.submit=!1,this.spinnerSadad.hide()}else 429==(null==n?void 0:n.statusCode)?(this.spinnerSadad.hide(),this._commonHelperService.disTransErrMsg("Too many attempts"==(null==n?void 0:n.message)?"REACHED_MAX_LOGIN_TRY_AFTER_30_SEC_OR_RESET_PWD":null==n?void 0:n.message),this.submit=!1):(this.error=1,this.submit=!1);this.spinnerSadad.hide()}}},{key:"handleAccountClosedErr",value:function(e){this._commonHelperService.disTransErrMsg("ACCT_CLOSED_NO_ACCESSED"),this.error=4,this.errorMessage="ACCT_CLOSED_NO_ACCESSED",this.submit=!1,this.spinnerSadad.hide()}},{key:"setLoginUserData",value:function(e){this._authenticationService.setDataWthoutPromise("loginUser",{}),this._authenticationService.updateLoginUser("password",this.loginForm.controls.password.value),this._authenticationService.updateLoginUser("isSubmerchantEnabled",e.isSubmerchantEnabled),this._authenticationService.updateLoginUser("maxqty",null!=e&&e.maxqty&&parseInt(null==e?void 0:e.maxqty)?parseInt(null==e?void 0:e.maxqty):999999999999999),this._authenticationService.updateLoginUser("isSNAMerchant",(null==e?void 0:e.sna_merchant_prod)||!1),this._authenticationService.updateLoginUser("registered_date",null==e?void 0:e.registered_date),this._authenticationService.updateLoginUser("privacyUpdateObj",(null==e?void 0:e.privacy_update)||null),this._authenticationService.updateLoginUser("dynamicDateRange",this.updateDynamicDateRangeUser(e)),this._authenticationService.updateLoginUser("blocked",null==e?void 0:e.blocked),this._authenticationService.updateLoginUser("requestfordeleteaccount",null==e?void 0:e.requestfordeleteaccount),this._authenticationService.updateLoginUser("blockedByAdmin",null==e?void 0:e.blockedByAdmin),this._authenticationService.updateLoginUser("type",null==e?void 0:e.type),this._authenticationService.updateLoginUser("roleId",null==e?void 0:e.roleId),this._authenticationService.updateLoginUser("posactivated",null==e?void 0:e.posactivated),this._authenticationService.updateLoginUser("isSubUserPublicAccess",null==e?void 0:e.isSubUserPublicAccess),this._authenticationService.updateLoginUser("fastifyEncryptionKey",null==e?void 0:e.fastifyEncryptionKey),this._authenticationService.updateLoginUser("has_invoice_terminal",null==e?void 0:e.has_invoice_terminal)}},{key:"updateDynamicDateRangeUser",value:function(e){var t=null==e?void 0:e.filter_start_date;if(!t){var n=new Date;n.setFullYear(n.getFullYear()-1),t="".concat(n.getFullYear(),"-").concat(String(n.getMonth()+1).padStart(2,"0"),"-").concat(String(n.getDate()).padStart(2,"0"))}return t}},{key:"resendOTP",value:function(){this.loginForm.controls.otp1.reset(),this.loginForm.controls.otp2.reset(),this.loginForm.controls.otp3.reset(),this.loginForm.controls.otp4.reset(),this.loginForm.controls.otp5.reset(),this.loginForm.controls.otp6.reset(),this._authenticationService.resndOTP("login").subscribe(function(e){},function(e){}),this.showContDown=!0,this.startTimer()}},{key:"startTimer",value:function(){var e=this;this.time=60,this.subsc=(0,m.F)(1e3).subscribe(function(t){e.time=e.time-1,e.time<0&&(e.showContDown=!1,e.subsc.unsubscribe())})}},{key:"enableLoginForm",value:function(){this.loginForm&&(this.loginForm.enabl
1e(),this.isVPNDisabled=!1)}},{key:"ngOnDestroy",value:function(){this.loginPage=!1,this.windowFocusEventListenerRef&&window.removeEventListener("focus",this.windowFocusEventListenerRef),this.windowStorageEventListenerRef&&window.removeEventListener("storage",this.windowStorageEventListenerRef),this.modalService.dismissAll(),this._distroyed$.next(null),this._distroyed$.complete(),this.subsc&&this.subsc.unsubscribe()}},{key:"formatUserFriendlyErrMsg",value:function(e){var t="string"==typeof e?e:String((null==e?void 0:e.message)||e||"");return!t||/words|undefined|null|JSON|TypeError|SyntaxError|Http failure/i.test(t)?(0,I.tk)({errCodeVal:"E-100"}):t}},{key:"processDynamicFirebaseUserAuth",value:function(e){try{var t,n,i,r,a,o,s,c,l,u,d,p,v,h=(null==e?void 0:e.SadadId)||(null==e?void 0:e.sadadId)||(null==e?void 0:e.id)||(null===(t=this.loginResponse)||void 0===t?void 0:t.SadadId)||(null===(n=this.loginResponse)||void 0===n?void 0:n.sadadId)||(null===(i=this._authenticationService)||void 0===i||null===(r=i.currentUserValue)||void 0===r?void 0:r.SadadId),g=(null==e?void 0:e.firebaseConfig)||(null==e||null===(a=e.clientConfig)||void 0===a?void 0:a.firebaseconfig)||(null==e||null===(o=e.clientConfig)||void 0===o?void 0:o.firebaseConfig)||(null===(s=this.loginResponse)||void 0===s?void 0:s.firebaseConfig)||(null===(c=this.loginResponse)||void 0===c||null===(l=c.clientConfig)||void 0===l?void 0:l.firebaseconfig)||(null===(u=this.loginResponse)||void 0===u||null===(d=u.clientConfig)||void 0===d?void 0:d.firebaseConfig)||(null===(p=this._authenticationService)||void 0===p||null===(v=p.currentUserValue)||void 0===v?void 0:v.firebaseConfig);if(!h||!g)return;var m="".concat(h,"@sadadmp.qa");w&&!w.apps.length&&w.initializeApp(g);var f=w.auth();f&&f.fetchSignInMethodsForEmail(m).then(function(e){e&&(null==e?void 0:e.length)>0?f.signInWithEmailAndPassword(m,"sadadqa"):f.createUserWithEmailAndPassword(m,"sadadqa")}).catch(function(e){console.error("processDynamicFirebaseUserAuth auth error:",(null==e?void 0:e.message)||e)})}catch(_){console.error("processDynamicFirebaseUserAuth exception:",(null==_?void 0:_.message)||_)}}}]),e}();return e.\u0275fac=function(t){return new(t||e)(a.Y36(g.qu),a.Y36(T.$h),a.Y36(o.F0),a.Y36(T.$P),a.Y36(T.Yx),a.Y36(E.t2),a.Y36(u.sK),a.Y36(k.P),a.Y36(A.$),a.Y36(_.FF),a.Y36(T.rM))},e.\u0275cmp=a.Xpm({type:e,selectors:[["app-login"]],viewQuery:function(e,t){var n;(1&e&&(a.Gf(j,5),a.Gf(H,5),a.Gf(J,5)),2&e)&&(a.iGM(n=a.CRH())&&(t.otp1=n.first),a.iGM(n=a.CRH())&&(t.eleLoginEmail=n.first),a.iGM(n=a.CRH())&&(t.doc_expiry_notification=n.first))},features:[a._Bn([_.NM,_.FF])],decls:31,vars:16,consts:[["bdColor","rgba(0, 0, 0, 0.8)","size","medium","color","#fff","type","ball-circus",3,"fullScreen"],[1,"d-none"],[3,"policyAction",4,"ngIf"],[1,"container-fluid"],[1,"row"],[1,"col-12","p-0"],[1,"login-card"],[1,"login-lang-selection"],[4,"ngIf"],[1,"logo"],["src","assets/images/logo/sadad-login-logo.svg","alt","looginpage",1,"img-fluid","for-light"],[1,"login-main","mb-3"],[1,"theme-form",3,"formGroup"],["class","otp",4,"ngIf"],[1,"language-s-wrapper"],[1,"mt-4","d-flex","align-items-center","justify-content-center","position-relative"],[1,"text-center","text-white","lgn-copyright","mb-0"],["doc_expiry_notification",""],[3,"policyAction"],["href","javascript:void(0);",1,""],["src","assets/images/language-selection/en-active.svg","alt","looginpage",1,"img-fluid"],["href","javascript:void(0);",1,"",3,"click"],["src","assets/images/language-selection/ar-inactive.svg","alt","looginpage",1,"img-fluid"],["src","assets/images/language-selection/ar-active.svg","alt","looginpage",1,"img-fluid"],["src","assets/images/language-selection/en-inactive.svg","alt","looginpage",1,"img-fluid"],[1,"form-group","mb-4"],["src","assets/images/login/user.svg","alt","",1,"img-fluid","login-icon"],["type"," ","required","","numbersOnly","","formControlName","email",1,"form-control","no-autofill-bkg",3,"placeholder","keyup.enter"],["eleLoginEmail",""],[1,"form-group","mb-2"],["src","assets/images/login/password.svg","alt","",1,"img-fluid","login-icon"],["type","password","formControlName","password","required","",1,"form-control","no-autofill-bkg","pr-5",3,"placeholder","keyup.enter"],["pass",""],[3,"click"],["class","text-white mb-3 d-block text-left lgn-err",4,"ngIf"],[1,"form-group","mb-0","pt-3"],[1,"link","d-block","text-right","mb-4","mt-4",3,"routerLink"],["type","button",1,"btn","btn-primary","btn-block","login-btn",3,"disabled","click"],["src","assets/images/login/open_eye.svg","alt","",1,"img-fluid","eye-icon"],["src","assets/images/login/closeeye.svg","alt","",1,"img-fluid","eye-icon"],[1,"text-white","mb-3","d-block","text-left","lgn-err"],[1,"otp"],[1,"text-center","text-white","mb-2","font-weight-bold"],[1,"text-center","text-white"],["dir","ltr",1,"form-group","mb-4"],["type","text","numbersOnly","","autoF
1ocusMaxLength","","maxlength","1","size","1","formControlName","otp1","name","otp1","autocomplete","off",1,"form-control",3,"keypress"],["otp1",""],["type","text","numbersOnly","","autoFocusMaxLength","","maxlength","1","size","1","formControlName","otp2","name","otp2","autocomplete","nope",1,"form-control",3,"keypress"],["type","text","numbersOnly","","autoFocusMaxLength","","maxlength","1","size","1","formControlName","otp3","name","otp3","autocomplete","nope",1,"form-control",3,"keypress"],["type","text","numbersOnly","","autoFocusMaxLength","","maxlength","1","size","1","formControlName","otp4","name","otp4","autocomplete","nope",1,"form-control",3,"keypress"],["type","text","numbersOnly","","autoFocusMaxLength","","maxlength","1","size","1","formControlName","otp5","name","otp5","autocomplete","nope",1,"form-control",3,"keypress"],["type","text","numbersOnly","","autoFocusMaxLength","","maxlength","1","size","1","formControlName","otp6","name","otp6","autocomplete","nope",1,"form-control","lastpiner",3,"keypress","keyup"],["class","resend-otp text-white font-weight-bold text-center m-0 cursor mb-0 pointer",3,"click",4,"ngIf"],["class","resend-otp text-center mt-1","style","margin-top:.50rem",4,"ngIf"],[1,"mt-4","mb-0"],[1,"ml-2","text-white","pointer",3,"click"],[1,"resend-otp","text-white","font-weight-bold","text-center","m-0","cursor","mb-0","pointer",3,"click"],[1,"resend-otp","text-center","mt-1",2,"margin-top",".50rem"],["id","time"],[1,"cattwo-header"],["type","button","aria-label","Close",1,"cattwo-close",3,"click"],["src","assets/images/pos-panel/popup-close.svg"],[1,"modal-body","p-0"],[1,"cate-popup-body"],[1,"exclamation_icon"],["src","assets/images/login/exclamation_mark.svg","alt","exclamation_mark",1,"img-fluid"],[1,"cattwo-content"],[1,"text-center","mb-0"],[4,"ngIf","ngIfElse"],["docExpElBlk",""],[1,"withdbutton-group"],[3,"routerLink"],["type","button",1,"btn","outline-btn","cancel","mr-3",3,"click"],["type","button",1,"btn","confirm-btn",3,"click"]],template:function(e,t){1&e&&(a.TgZ(0,"ngx-spinner",0),a._UZ(1,"app-sadad-loader"),a.qZA(),a.ynx(2,1),a.YNc(3,B,1,0,"app-privacy-policy",2),a.BQk(),a.TgZ(4,"div",3),a.TgZ(5,"div",4),a.TgZ(6,"div",5),a.TgZ(7,"div",6),a.TgZ(8,"div",7),a.YNc(9,W,5,0,"ng-container",8),a.YNc(10,G,5,0,"ng-container",8),a.qZA(),a.TgZ(11,"div"),a.TgZ(12,"div"),a.TgZ(13,"a",9),a._UZ(14,"img",10),a.qZA(),a.qZA(),a.TgZ(15,"div",11),a.TgZ(16,"h4"),a._uU(17),a.ALo(18,"translate"),a.qZA(),a.TgZ(19,"form",12),a.YNc(20,ne,26,25,"div",8),a.YNc(21,ae,25,18,"div",13),a.qZA(),a.qZA(),a.TgZ(22,"div",14),a.TgZ(23,"div",15),a.TgZ(24,"div"),a.TgZ(25,"p",16),a.TgZ(26,"em"),a._uU(27),a.ALo(28,"translate"),a.qZA(),a.qZA(),a.qZA(),a.qZA(),a.qZA(),a.qZA(),a.qZA(),a.qZA(),a.qZA(),a.qZA(),a.YNc(29,le,23,13,"ng-template",null,17,a.W1O)),2&e&&(a.Q6J("fullScreen",!0),a.xp6(3),a.Q6J("ngIf",t.isShowPrivacyPolicy),a.xp6(5),a.ekj("div-disabled",t.isVPNDisabled),a.xp6(1),a.Q6J("ngIf","en"==t.currLang),a.xp6(1),a.Q6J("ngIf","ar"==t.currLang),a.xp6(7),a.hij(" ",a.lcZ(18,12,"MERCHANT_PANEL")," "),a.xp6(2),a.Q6J("formGroup",t.loginForm),a.xp6(1),a.Q6J("ngIf",t.loginPage),a.xp6(1),a.Q6J("ngIf",!t.loginPage),a.xp6(6),a.AsE("",a.lcZ(28,14,"COPYRIGHT")," SADAD @",t.currYear,""))},directives:[E.Ro,C.T,x.O5,g._Y,g.JL,g.sg,Z,q.p,g.Fj,g.Q7,g.JJ,g.u,F.mh,o.yS,Y.Lv,V.b,g.nD],pipes:[u.X$],styles:['.loader--text[_ngcontent-%COMP%]{top:200%;left:0;right:0;margin:auto}.loader--text[_ngcontent-%COMP%]:after{content:"Loading";font-weight:700;-webkit-animation-name:loading-text;animation-name:loading-text;-webkit-animation-duration:3s;animation-duration:3s;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite}.pointer[_ngcontent-%COMP%]{cursor:pointer}.exclamation_icon[_ngcontent-%COMP%]{height:64px;width:64px;margin:auto auto 30px}.exclamation_icon[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:100%;width:100%}@-webkit-keyframes loader{15%{transform:translateX(0)}45%{transform:translateX(230px)}65%{transform:translateX(230px)}95%{transform:translateX(0)}}@keyframes loader{15%{transform:translateX(0)}45%{transform:translateX(230px)}65%{transform:translateX(230px)}95%{transform:translateX(0)}}@-webkit-keyframes loading-text{0%{content:"Loading"}25%{content:"Loading."}50%{content:"Loading.."}75%{content:"Loading..."}}@keyframes loading-text{0%{content:"Loading"}25%{content:"Loading."}50%{content:"Loading.."}75%{content:"Loading..."}}.login-card[_ngcontent-%COMP%] .login-main[_ngcontent-%COMP%] .theme-form[_ngcontent-%COMP%]{position:relative}.login-card[_ngcontent-%COMP%] .login-main[_ngcontent-%COMP%] .theme-form[_ngcontent-%COMP%] .otp[_ngcontent-%COMP%] .form-group[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center}.login-card[_ngcontent-%COMP%] .login-main[_ngcontent-%COMP%] .theme-form[_ngcontent-%COMP%] .otp[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{border-radius:6px;padding:7px;height:43px;text-align:center;margin:5px}.login-card[_ngcontent-%COMP%] .login-main[_ngcontent-%COMP%] .theme-form[_ngcontent-%COMP%] .lgn-err[_ngcontent-%COMP%]{position:absolute}input[_ngcontent-%COMP%]::-ms-clear, input[_ngcontent-%COMP%]::-ms-reveal{display:none}']}),e}(),de=i(94544),pe=i(99713),ve=(0,pe.X$)("fadeInAnimation",[(0,pe.eR)("* => *",[(0,pe.oB)({position:"relative"}),(0,pe.IO)(":enter, :leave",[(0,pe.oB)({position:"absolute",top:0,left:0,width:"100%"})]),(0,pe.IO)(":enter",[(0,pe.oB)({opacity:"0"})],{optional:!0}),(0,pe.IO)(":leave",(0,pe.pV)(),{optional:!0}),(0,pe.ru)([(0,pe.IO)(":leave",[(0,pe.jt)(".2s ease-in-out",(0,pe.oB)({opacity:"0"}))],{optional:!0}),(0,pe.IO)(":enter",[(0,pe.jt)(".2s ease-in-out",(0,pe.oB)({opacity:"1"}))],{delay:300,optional:!0})]),(0,pe.IO)(":enter",(0,pe.pV)(),{optional:!0})])]),he=i(54803),ge=i(77818),me=function(){var e=function(){function e(t,n,i){s(this,e),this._auth=t,this._commonHelperService=n,this._header=i,this._distroyed$=new b.x}return l(e,[{key:"ngOnInit",value:function(){this.getMerchantHeaderDetails(),this.initLastLoginDateDetails()}},{key:"getLastLogin",value:function(){var e,t=this.resolveUserLastLoginDateVal(null===(e=this._auth)||void 0===e?void 0:e.currentUserValue);t&&(this.lastLoggedIn=t)}},{key:"getMerchantHeaderDetails",value:function(){var e=this._header.getMerchantHeaderDetails();this.merchantName=e.merchantName,this.roleName=1==e.roleId?"MERCHANT_ADMIN_USER":14==e.roleId?"SALES_SUB_USER":16==e.roleId?"FINANCE_SUB_USER":17==e.roleId?"API_SUB_USER":""}},{key:"signOut",value:function(){this._auth.logout().pipe((0,y.R)(this._distroyed$)).subscribe(function(e){})}},{key:"resolveUserLastLoginDateVal",value:function(e){return(null==e?void 0:e.modified)||(null==e?void 0:e.previouslogindatetime)||""}},{key:"initLastLoginDateDetails",value:function(){var e,t,n,i=this;this.lastLoggedIn=this.resolveUserLastLoginDateVal(null===(e=this._auth)||void 0===e?void 0:e.currentUserValue),this.getLastLogin(),null===(t=this._auth)||void 0===t||null===(n=t.currentUser)||void 0===n||n.pipe((0,y.R)(this._distroyed$)).subscribe(function(e){var t=i.resolveUserLastLoginDateVal(e);t&&(i.lastLoggedIn=t)})}},{key:"ngOnDestroy",value:function(){this._distroyed$.next(null),this._distroyed$.complete()}}]),e}();return e.\u0275fac=function(t){return new(t||e)(a.Y36(T.$h),a.Y36(T.$P),a.Y36(T.r6))},e.\u0275cmp=a.Xpm({type:e,selectors:[["app-my-account"]],decls:11,vars:4,consts:[[1,"media","profile-media","custom-header"],[1,"avatars"],[1,"avatar"],["src","assets/images/pos-panel/header/user.svg","alt","#",1,"img-40","rounded-circle"],[1,"profile-dropdown","on
1hover-show-div","sadad-profile","p-3"],[1,"puser-content"],[1,"mb-2"],[1,"mb-0"]],template:function(e,t){1&e&&(a.TgZ(0,"div",0),a.TgZ(1,"div",1),a.TgZ(2,"div",2),a._UZ(3,"img",3),a.qZA(),a.qZA(),a.qZA(),a.TgZ(4,"ul",4),a.TgZ(5,"div",5),a.TgZ(6,"span",6),a._uU(7),a.qZA(),a.TgZ(8,"p",7),a._uU(9),a.ALo(10,"translate"),a.qZA(),a.qZA(),a.qZA()),2&e&&(a.xp6(7),a.Oqu(t.merchantName),a.xp6(2),a.Oqu(a.lcZ(10,2,t.roleName)))},pipes:[u.X$],styles:[".custom-header[_ngcontent-%COMP%] .avatars[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%] .status[_ngcontent-%COMP%]{background-color:#e06f85;height:12px;width:12px;top:1px;right:-2px;border:0}.custom-header[_ngcontent-%COMP%] .media-body[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-size:16px;font-weight:700!important;color:#324c6a}@media screen and (max-width:1440px){.custom-header[_ngcontent-%COMP%] .media-body[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-size:14px}}.custom-header[_ngcontent-%COMP%] .media-body[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font-size:12px;font-weight:600!important;color:#324c6a!important}@media screen and (max-width:1440px){.custom-header[_ngcontent-%COMP%] .media-body[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font-size:13px}}.sadad-profile[_ngcontent-%COMP%] .s-profile-list[_ngcontent-%COMP%] .s-profile-name[_ngcontent-%COMP%] h6[_ngcontent-%COMP%]{font-size:13px;color:#324c6a;margin-bottom:0;margin-top:5px;font-weight:600}.puser-content[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-size:15px;font-weight:700;color:#324c6a}.puser-content[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:#324c6a}"]}),e}(),fe=i(14391),_e=i(89749),ye=i(82051),Se=i(59938),be=i(34115),we=i(7491),Ie=["scrollContainer"];function Te(e,t){if(1&e){var n=a.EpF();a.TgZ(0,"button",19),a.NdJ("click",function(){a.CHM(n);var e=a.oxw().$implicit;return a.oxw().onReportKafkaDownload(e)}),a._uU(1),a.ALo(2,"translate"),a.qZA()}2&e&&(a.xp6(1),a.hij(" ",a.lcZ(2,1,"Download Report")," "))}function Ee(e,t){if(1&e){var n=a.EpF();a.TgZ(0,"div",20),a.TgZ(1,"button",19),a.NdJ("click",function(){a.CHM(n);var e=a.oxw().$implicit;return a.oxw().onReqDeliveryNotifDownload(e)}),a._uU(2),a.ALo(3,"translate"),a.qZA(),a.TgZ(4,"button",19),a.NdJ("click",function(){a.CHM(n);var e=a.oxw().$implicit;return a.oxw().onReqDeliveryNotifView(e)}),a._uU(5),a.ALo(6,"translate"),a.qZA(),a.qZA()}2&e&&(a.xp6(2),a.hij(" ",a.lcZ(3,2,"DOWNLOAD_LABEL")," "),a.xp6(3),a.hij(" ",a.lcZ(6,4,"VIEW")," "))}function ke(e,t){1&e&&a.GkF(0)}function Ae(e,t){1&e&&a.GkF(0)}function Ce(e,t){if(1&e){var n=a.EpF();a.TgZ(0,"div",20),a.TgZ(1,"button",21),a.NdJ("click",function(){a.CHM(n);var e=a.oxw().$implicit;return a.oxw().onReportKafkaDownload(e,"excel")}),a.TgZ(2,"span",22),a.YNc(3,ke,1,0,"ng-container",23),a.qZA(),a._uU(4," Excel "),a.qZA(),a.TgZ(5,"button",24),a.NdJ("click",function(){a.CHM(n);var e=a.oxw().$implicit;return a.oxw().onReportKafkaDownload(e,"pdf")}),a.TgZ(6,"span",22),a.YNc(7,Ae,1,0,"ng-container",23),a.qZA(),a._uU(8," PDF "),a.qZA(),a.qZA()}if(2&e){a.oxw(2);var i=a.MAs(17),r=a.MAs(19);a.xp6(3),a.Q6J("ngTemplateOutlet",i),a.xp6(4),a.Q6J("ngTemplateOutlet",r)}}var xe=function(e){return{"unread-notif":e}};function Pe(e,t){if(1&e){var n=a.EpF();a.ynx(0),a.TgZ(1,"div",15),a.NdJ("click",function(){var e=a.CHM(n).$implicit;return a.oxw().markAsRead(e)}),a.TgZ(2,"h6"),a._uU(3),a.qZA(),a.TgZ(4,"span",16),a._uU(5),a.ALo(6,"formatDate"),a.qZA(),a.YNc(7,Te,3,3,"button",17),a.YNc(8,Ee,7,6,"div",18),a.YNc(9,Ce,9,2,"div",18),a.qZA(),a.BQk()}if(2&e){var i=t.$implicit,r=a.oxw();a.xp6(1),a.Q6J("ngClass",a.VKq(8,xe,!(null!=i&&i.isread))),a.xp6(2),a.Oqu(null==i||null==i.notification?null:i.notification.textmessage),a.xp6(2),a.Oqu(a.lcZ(6,6,null==i?null:i.created)),a.xp6(2),a.Q6J("ngIf",101==(null==i||null==i.notification?null:i.notification.entity_id)&&(null==i?null:i.action_id)),a.xp6(1),a.Q6J("ngIf",r.isReqDeliveryPanelNotif(i)&&r.isReqDeliveryNotifDownloadable(i)),a.xp6(1),a.Q6J("ngIf",102==(null==i||null==i.notification?null:i.notification.entity_id)&&(null==i?null:i.action_id))}}function Oe(e,t){1&e&&a.GkF(0)}function Ne(e,t){if(1&e&&(a.ynx(0),a.TgZ(1,"div",25),a.TgZ(2,"div",26),a.TgZ(3,"div",27),a.TgZ(4,"span"),a.YNc(5,Oe,1,0,"ng-container",23),a.qZA(),a.qZA(),a.TgZ(6,"div",28),a._uU(7),a.ALo(8,"translate"),a.qZA(),a.qZA(),a.qZA(),a.BQk()),2&e){a.oxw();var n=a.MAs(15);a.xp6(5),a.Q6J("ngTemplateOutlet",n),a.xp6(2),a.Oqu(a.lcZ(8,2,"NO_NOTIF_FOUND"))}}var Ue=function(){return["/merchantpanel/notifications"]};function Le(e,t){1&e&&(a.TgZ(0,"button",29),a._uU(1),a.ALo(2,"translate"),a.qZA()),2&e&&(a.Q6J("routerLink",a.DdM(4,Ue)),a.xp6(1),a.hij(" ",a.lcZ(2,2,"ALL_NOTIFICATIONS")," "))}function Re(e,t){1&e&&(a.O4$(),a.TgZ(0,"svg",30),a._UZ(1,"path",31),a._UZ(2,"path",32),a.qZA())}function Me(e,t){1&e&&(a.O4$(),a.TgZ(0,"svg",33),a._UZ(1,"path",34),a.qZA())}function De(e,t){1&e&&(a.O4$(),a.TgZ(0,"svg",33),a._UZ(1,"path",35),a.qZA())}var Ze=function(e){return{show:e}},qe=function(){var e=function(){function e(t,n,i,r,a,o,c,l,u){s(this,e),this._notificationService=t,this._commonHelperService=n,this._snackbarService=i,this.el=r,this._reportService=a,this._spinCtrlServ=o,this._balStatementService=c,this._shippingService=l,this.router=u,this._distroyed$=new b.x,this.openNotification=!1,this.limit=5,this.skip=0,this.showLoader=!1,this.showDropdown=!1}return l(e,[{key:"ngOnInit",value:function(){var e=this;this.getNotifications(),this.subscription=(0,m.F)(12e4).pipe((0,y.R)(this._distroyed$)).subscribe(function(){e.getNotifications(!0)}),this._snackbarService.showNotification$.pipe((0,y.R)(this._distroyed$)).subscribe(function(t){var n=t.isVisible,i=t.isApiCall;console.log("notification ts file showNotification:",n),n?e.getNotifications(!0,n):i&&e.getNotifications(!0)})}},{key:"onClickOutside",value:function(e){!this.el.nativeElement.contains(e.target)&&this.showDropdown&&(this.showDropdown=!1)}},{key:"scrollToTop",value:function(){this.scrollContainer&&(this.scrollContainer.nativeElement.scrollTop=0)}},{key:"toggleNotification",value:function(){this.showDropdown=!this.showDropdown}},{key:"getNotifications",value:function(){var e=this,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];t&&this._spinCtrlServ.showSpinner(),this._notificationService.getNotifications(this.skip,this.limit).pipe((0,y.R)(this._distroyed$)).subscribe(function(n){var i;null!=n&&n.error?e._commonHelperService.disTransErrMsg(null==n||null===(i=n.error)||void 0===i?void 0:i.message):n&&(e.notifications=n),e.showLoader=!1,t&&(e.showDropdown=!0,e._spinCtrlServ.hideSpinner()),setTimeout(function(){e.scrollToTop()})},function(){e.showLoader=!1,t&&e._spinCtrlServ.hideSpinner()})}},{key:"onScrollDown",value:function(e){this.showLoader=!0,this.limit=this.limit+this.limit,this.getNotifications(),console.log("onScrollDown called")}},{key:"markAsRead",value:function(e){var t=this;console.log("mark as read called!"),0==e.isread&&(e.isread=!0,this._notificationService.markSingleNotificationAsRead(null==e?void 0:e.id).pipe((0,y.R)(this._distroyed$)).subscribe(function(e){var n;(null==e?void 0:e.error)&&t._commonHelperService.disTransErrMsg(null==e||null===(n=e.error)||void 0===n?void 0:n.message)}))}},{key:"onReportKafkaDownload",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=this;return(0,h.Z)(regeneratorRuntime.mark(function i(){var r,a,o;return regeneratorRuntime.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:console.log("Notification component onReportKafkaDownload start :",e),102!=(null==e||null===(r=e.notification)||void 0===r?void 0:r.entity_id)?(n._spinCtrlServ.showSpinner(),n._reportService.downloadKafkaReport(null==e?void 0:e.action_id).pipe((0,y.R)(n._distroyed$)).subscribe({next:(o=(0,h.Z)(regeneratorRuntime.mark(function t(i){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,n._reportService.getKafkaReportName(i,null==e?void 0:e.report_type);case 2:n._spinCtrlServ.hideSpinner(),n._commonHelperService.logFirebaseEvent("RPT_KAFKA_DW_NOTIFICATION","NotificationComponent");case 4:case"end":return t.stop()}},t)})),function(e){return o.apply(this,arguments)}),error:(a=(0,h.Z)(regeneratorRuntime.mark(function e(t){var i,r,a;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.t1=JSON,e.next=3,t.error.text();case 3:if(e.t2=e.sent,e.t3=i=e.t1.parse.call(e.t1,e.t2),e.t0=null===e.t3,e.t0){e.next=8;break}e.t0=void 0===i;case 8:if(!e.t0){e.next=12;break}e.t4=void 0,e.next=13;break;case 12:e.t4=null===(r=i.error)||void 0===r?void 0:r.message;case 13:a=e.t4,n._spinCtrlServ.hideSpinner(),n._commonHelperService.disTransErrMsg(a);case 15:case"end":return e.stop()}},e)})),function(e){return a.apply(this,arguments)})})):n.downloadStatementFromNotification(e,t);case 1:case"end":return i.stop()}},i)}))()}},{key:"downloadStatementFromNotification",value:function(e,t){var n=this;this._spinCtrlServ.showSpinner(),this._balStatementService.downloadAndSaveStatement
1(null==e?void 0:e.action_id,t,e).pipe((0,y.R)(this._distroyed$)).subscribe({next:function(e){n._spinCtrlServ.hideSpinner(),n._commonHelperService.logFirebaseEvent("BAL_STMT_DW_NOTIFICATION","AllNotificationComponent")},error:function(e){var t,i,r;n._spinCtrlServ.hideSpinner(),n._commonHelperService.disTransErrMsg((null==e||null===(t=e.error)||void 0===t||null===(i=t.error)||void 0===i?void 0:i.message)||(null==e||null===(r=e.error)||void 0===r?void 0:r.message)||"Statement file is not ready to download.")}})}},{key:"isReqDeliveryPanelNotif",value:function(e){var t,n=((null==e?void 0:e.action_id)||"").toString().trim();return 14===Number(null==e||null===(t=e.notification)||void 0===t?void 0:t.notificationentityId)&&!!n}},{key:"isReqDeliveryNotifDownloadable",value:function(e){return((null==e?void 0:e.action_id)||"").toString().trim().toUpperCase().startsWith("SA")}},{key:"onReqDeliveryNotifDownload",value:function(e){var t=this,n=((null==e?void 0:e.action_id)||"").toString().trim();n&&(this._spinCtrlServ.showSpinner(),this._shippingService.exportDeliveryLabel(n).pipe((0,y.R)(this._distroyed$)).subscribe({next:function(e){(0,ye.saveAs)(e,"Label-".concat(n,".pdf")),t._spinCtrlServ.hideSpinner()},error:function(){t._spinCtrlServ.hideSpinner()}}))}},{key:"onReqDeliveryNotifView",value:function(e){var t=((null==e?void 0:e.action_id)||"").toString().trim();t.toUpperCase().startsWith("SA")&&this.router.navigateByUrl((0,Se.o)("",{shipId:t||void 0}))}},{key:"ngOnDestroy",value:function(){this.subscription.unsubscribe(),this._distroyed$.next(null),this._distroyed$.complete()}}]),e}();return e.\u0275fac=function(t){return new(t||e)(a.Y36(T.gq),a.Y36(T.$P),a.Y36(be.o),a.Y36(a.SBq),a.Y36(T.rM),a.Y36(T.br),a.Y36(T.yS),a.Y36(T.Nk),a.Y36(o.F0))},e.\u0275cmp=a.Xpm({type:e,selectors:[["app-notification"]],viewQuery:function(e,t){var n;(1&e&&a.Gf(Ie,5),2&e)&&(a.iGM(n=a.CRH())&&(t.scrollContainer=n.first))},hostBindings:function(e,t){1&e&&a.NdJ("click",function(e){return t.onClickOutside(e)},!1,a.evT)},decls:20,vars:9,consts:[[1,"notification-box","custom-header"],[1,"avatars"],[1,"avatar"],["src","assets/images/pos-panel/header/bell.svg","alt","#",1,"img-40","rounded-circle"],[1,"status","status-40"],[1,"notification-dropdown","onhover-show-div",3,"ngClass"],[1,"notification-title"],[1,"custom-scrollbar"],["scrollContainer",""],[4,"ngFor","ngForOf"],[4,"ngIf"],["class","notification-title",3,"routerLink",4,"ngIf"],["noNotificationIcon",""],["excelIcon",""],["pdfIcon",""],[1,"notification-box",3,"ngClass","click"],["dir","ltr"],["type","button","class","btn download-report-btn",3,"click",4,"ngIf"],["class","report-download-buttons",4,"ngIf"],["type","button",1,"btn","download-report-btn",3,"click"],[1,"report-download-buttons"],["type","button",1,"btn","excel-btn",3,"click"],[1,"icon"],[4,"ngTemplateOutlet"],["type","button",1,"btn","pdf-btn",3,"click"],[1,"no-record-notification"],[1,"text-center","no-record-found"],[1,"text-center"],[1,"no-record-txt"],[1,"notification-title",3,"routerLink"],["width","48","height","48","viewBox","0 0 48 48","fill","none","xmlns","http://www.w3.org/2000/svg"],["fill-rule","evenodd","clip-rule","evenodd","d","M35.5878 16.078C36.5706 17.7881 37.1551 19.6069 37.249 21.5437C37.3243 23.0924 37.2211 24.6495 37.2942 26.1985C37.3479 27.33 37.4924 28.4685 37.7219 29.5779C37.9094 30.4831 38.4582 31.2068 39.2835 31.7168C40.795 32.6507 41.2869 33.8459 40.8434 35.3757C40.4012 36.8999 39.024 37.9777 37.4316 37.9897C34.9101 38.0082 32.3887 37.9963 29.8675 37.997C29.6736 37.997 29.4801 37.997 29.3036 37.997C28.2363 40.7069 26.6948 41.9015 24.3563 41.8615C22.2198 41.8251 20.6055 40.4887 19.7332 37.9981C17.7542 37.9981 15.7568 37.989 13.7601 38.0128C13.5595 38.0156 13.3257 38.1848 13.1679 38.3382C12.0816 39.3944 11.013 40.4687 9.93514 41.534C9.38635 42.0763 8.89053 42.1435 8.4611 41.7449C8.02567 41.341 8.07864 40.7696 8.62426 40.2284C18.7808 30.1503 28.9387 20.0742 39.0988 9.99918C39.625 9.47723 40.1674 9.42819 40.582 9.83979C40.9889 10.244 40.9306 10.7877 40.4072 11.3072C38.811 12.8923 37.2098 14.4732 35.5878 16.078ZM34.3299 17.6837C28.1 23.8571 21.8761 30.0245 15.6932 36.1523C15.6784 36.1509 15.7822 36.1646 15.8867 36.1646C22.9734 36.1656 30.06 36.167 37.147 36.1604C37.4242 36.16 37.7187 36.1222 37.9755 36.0252C38.6115 35.7852 38.9936 35.3063 39.1112 34.6401C39.215 34.0495 38.9314 33.6403 38.4342 33.3611C36.6014 32.3295 35.7775 30.6505 35.6147 28.68C35.4476 26.6658 35.4653 24.6358 35.4321 22.6121C35.4031 20.8449 35.0977 19.1497 34.3299 17.6837ZM21.7903 38.0128C22.111 39.2395 23.4374 40.1342 24.6748 40.0288C25.8476 39.9282 27.2267 38.9624 27.1698 38.0128C25.3942 38.0128 23.6172 38.0128 21.7903 38.0128Z","fill","#7E0E45"],["fill-rule","evenodd","clip-rule","evenodd","d","M13.6308 24.4537C13.4179 26.2871 13.4596 28.1553 13.1304 29.9681C12.8663 31.4201 11.9728 32.5365 10.6693 33.3149C9.72573 33.8785 9.63179 34.7476 10.3674 35.5855C10.5094 35.747 10.758 35.9159 10.7576 36.0809C10.7576 36.4371 10.7421 36.9444 10.5207 37.109C10.2671 37.2975 9.66781 37.3451 9.41884 37.1717C7.85263 36.0812 7.29889 33.2802 9.23979 32.0895C11.1581 30.9132 11.6144 29.167 11.7044 27.1979C11.7768 25.6055 11.7309 24.007 11.7302 22.4107C11.7284 16.8949 15.0999 12.2022 20.3749 10.4269C20.8591 10.264 21.0395 10.0741 21.0551 9.54098C21.1112 7.64971 22.319 6.28598 24.0667 6.03271C25.6675 5.80081 27.2821 6.82299 27.7956 8.42632C27.9121 8.78994 27.9863 9.18998 27.9658 9.56726C27.939 10.064 28.1668 10.2237 28.5987 10.3628C30.2952 10.91 31.7911 11.8099 33.1006 13.0125C33.7024 13.5649 33.7924 14.0683 33.3697 14.5135C32.9456 14.9594 32.4529 14.9209 31.8409 14.3632C26.0486 9.08769 16.8155 11.674 14.2559 18.5826C13.5493 20.4904 13.544 22.4657 13.6308 24.4537C13.6863 24.46 13.5754 24.4474 13.6308 24.4537ZM26.0436 9.734C26.1853 8.9749 25.8946 8.44349 25.2815 8.08128C24.7027 7.73938 24.1151 7.78983 23.5811 8.17901C23.0549 8.56294 22.8222 9.07823 22.9815 9.73365C24.0074 9.734 24.9959 9.734 26.0436 9.734Z","fill","#7E0E45"],["width","13","height","13","viewBox","0 0 13 13","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M7.58333 1.08334V3.25C7.58333 3.53732 7.69747 3.81287 7.90063 4.01604C8.1038 4.2192 8.37935 4.33334 8.66667 4.33334H10.8333M4.33333 7.04167H5.41667M7.58333 7.04167H8.66667M4.33333 9.20834H5.41667M7.58333 9.20834H8.66667M8.125 1.08334H3.25C2.96268 1.08334 2.68713 1.19747 2.48397 1.40064C2.2808 1.6038 2.16667 1.87935 2.16667 2.16667V10.8333C2.16667 11.1207 2.2808 11.3962 2.48397 11.5994C2.68713 11.8025 2.96268 11.9167 3.25 11.9167H9.75C10.0373 11.9167 10.3129 11.8025 10.516 11.5994C10.7192 11.3962 10.8333 11.1207 10.8333 10.8333V3.79167L8.125 1.08334Z","stroke","#00A63E","stroke-width","1.08333","stroke-linecap","round","stroke-linejoin","round"],["d","M7.58333 1.08334V3.25C7.58333 3.53732 7.69747 3.81287 7.90064 4.01604C8.1038 4.2192 8.37935 4.33334 8.66667 4.33334H10.8333M5.41667 4.875H4.33333M8.66667 7.04167H4.33333M8.66667 9.20834H4.33333M8.125 1.08334H3.25C2.96268 1.08334 2.68713 1.19747 2.48397 1.40064C2.2808 1.6038 2.16667 1.87935 2.16667 2.16667V10.8333C2.16667 11.1207 2.2808 11.3962 2.48397 11.5994C2.68713 11.8025 2.96268 11.9167 3.25 11.9167H9.75C10.0373 11.9167 10.3129 11.8025 10.516 11.5994C10.7192 11.3962 10.8333 11.1207 10.8333 10.8333V3.79167L8.125 1.08334Z","stroke","#FB2C36","stroke-width","1.08333","stroke-linecap","round","stroke-linejoin","round"]],template:function(e,t){1&e&&(a.TgZ(0,"div",0),a.TgZ(1,"div",1),a.TgZ(2,"div",2),a._UZ(3,"img",3),a._UZ(4,"div",4),a.qZA(),a.qZA(),a.qZA(),a.TgZ(5,"ul",5),a.TgZ(6,"h5",6),a._uU(7),a.ALo(8,"translate"),a.qZA(),a.TgZ(9,"li",7,8),a.YNc(11,Pe,10,10,"ng-container",9),a.YNc(12,Ne,9,4,"ng-container",10),a.qZA(),a.YNc(13,Le,3,5,"button",11),a.qZA(),a.YNc(14,Re,3,0,"ng-template",null,12,a.W1O),a.YNc(16,Me,2,0,"ng-template",null,13,a.W1O),a.YNc(18,De,2,0,"ng-template",null,14,a.W1O)),2&e&&(a.xp6(5),a.Q6J("ngClass",a.VKq(7,Ze,t.showDropdown)),a.xp6(2),a.Oqu(a.lcZ(8,5,"NOTIFICATION")),a.xp6(4),a.Q6J("ngForOf",t.n
1otifications),a.xp6(1),a.Q6J("ngIf",t.notifications&&0==(null==t.notifications?null:t.notifications.length)),a.xp6(1),a.Q6J("ngIf",(null==t.notifications?null:t.notifications.length)>0))},directives:[x.mk,x.sg,x.O5,x.tP,o.rH],pipes:[u.X$,we.r2],styles:[".custom-header[_ngcontent-%COMP%] .avatars[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%] .status[_ngcontent-%COMP%]{background-color:#e06f85;height:18px;width:18px;top:0;color:#fff!important;padding-top:2px;font-size:9px;right:3px;border:0;text-align:center}.custom-header[_ngcontent-%COMP%] .media-body[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-size:16px;font-weight:700!important;color:#324c6a}.custom-header[_ngcontent-%COMP%] .media-body[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font-size:12px;font-weight:600!important;color:#324c6a!important}.search-results[_ngcontent-%COMP%]{height:21rem;overflow:scroll}.no-record-notification[_ngcontent-%COMP%]:hover{background-color:transparent}.no-record-notification[_ngcontent-%COMP%] .no-record-found[_ngcontent-%COMP%]{display:flex;flex-direction:column;position:absolute;left:50%;transform:translate(-50%,-50%);top:50%;margin-top:0}.no-record-notification[_ngcontent-%COMP%] .no-record-found[_ngcontent-%COMP%] span[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{height:100%;width:auto}.no-record-notification[_ngcontent-%COMP%] .no-record-found[_ngcontent-%COMP%] .no-record-txt[_ngcontent-%COMP%]{font-size:14px} .s-notification-wrapper .notification-switch{flex-basis:85px} .page-wrapper .page-header .header-wrapper .nav-right .notification-dropdown button{padding:8px 16px!important} .notification-box .download-report-btn{padding:8px 16px!important;height:36px;border:1px solid #8e1b3e!important;border-radius:10px!important;font-family:Open Sans,sans-serif;font-style:normal;font-weight:400;font-size:12px;line-height:20px;letter-spacing:-.005em;color:#8e1b3e;width:-webkit-max-content!important;width:-moz-max-content!important;width:max-content!important;display:block;margin-top:15px}.report-download-buttons[_ngcontent-%COMP%]{grid-gap:16px;gap:16px;display:flex;align-items:center;grid-gap:10px;gap:10px}.report-download-buttons[_ngcontent-%COMP%] .excel-btn[_ngcontent-%COMP%], .report-download-buttons[_ngcontent-%COMP%] .pdf-btn[_ngcontent-%COMP%]{padding:8px 16px!important;height:36px;border:1px solid #4a5565!important;border-radius:10px!important;font-family:Open Sans,sans-serif;font-style:normal;font-weight:400;font-size:12px;line-height:20px;letter-spacing:-.005em;color:#4a5565;width:-webkit-max-content!important;width:-moz-max-content!important;width:max-content!important;display:flex;align-items:center;margin-top:15px}"]}),e}(),Ve=["mobHeaderMenu"];function Fe(e,t){if(1&e&&(a.TgZ(0,"span"),a._uU(1),a.qZA()),2&e){var n=a.oxw();a.xp6(1),a.hij("",n.sadadMerchantId," ")}}function Ye(e,t){if(1&e&&(a.TgZ(0,"span"),a._uU(1),a.qZA()),2&e){var n=a.oxw();a.xp6(1),a.hij("",n.sadadMainMerchantId," ")}}function je(e,t){if(1&e){var n=a.EpF();a.TgZ(0,"div",37),a.TgZ(1,"div",38),a.TgZ(2,"div",39),a.TgZ(3,"ng-select",40),a.NdJ("ngModelChange",function(e){return a.CHM(n),a.oxw().pType=e})("change",function(e){return a.CHM(n),a.oxw().changeServiceType(e)}),a.ALo(4,"translate"),a.qZA(),a.qZA(),a.qZA(),a.qZA()}if(2&e){var i=a.oxw();a.xp6(3),a.s9C("placeholder",a.lcZ(4,5,"ONLINE_PAYMENT")),a.Q6J("items",i.projectType)("searchable",!1)("clearable",!1)("ngModel",i.pType)}}function He(e,t){1&e&&(a.TgZ(0,"li",58),a.TgZ(1,"p"),a._uU(2),a.ALo(3,"translate"),a.qZA(),a.qZA()),2&e&&(a.xp6(2),a.Oqu(a.lcZ(3,1,"Switch to another Account")))}function Je(e,t){1&e&&a._UZ(0,"img",71)}function Be(e,t){1&e&&a._UZ(0,"img",72)}var We=function(e){return{"primary-merchant-text":e}};function Ge(e,t){if(1&e&&(a.TgZ(0,"a",73),a.TgZ(1,"p",74),a._uU(2,"Primary"),a.qZA(),a.qZA()),2&e){var n=a.oxw().$implicit;a.Q6J("ngClass",a.VKq(1,We,!(null!=n&&n.parentmerchantId)))}}function Qe(e,t){1&e&&a._UZ(0,"img",75)}function Ke(e,t){1&e&&a._UZ(0,"img",76)}var $e=function(){return[2,3]},ze=function(e){return{"primary-merchant-favourite":e}};function Xe(e,t){if(1&e){var n=a.EpF();a.ynx(0),a.TgZ(1,"div",61),a.NdJ("click",function(e){var t=a.CHM(n).$implicit;return a.oxw(4).switchToMerchant(e,null==t?null:t.SadadId)}),a.TgZ(2,"div",49),a.TgZ(3,"div",62),a._UZ(4,"img",51),a.ALo(5,"secure"),a.TgZ(6,"span",63),a.YNc(7,Je,1,0,"img",64),a.YNc(8,Be,1,0,"img",65),a.qZA(),a.qZA(),a.TgZ(9,"div",66),a.TgZ(10,"h6"),a._uU(11),a.qZA(),a.TgZ(12,"span"),a._uU(13),a.ALo(14,"translate"),a.qZA(),a.YNc(15,Ge,3,3,"a",67),a.TgZ(16,"a",68),a.NdJ("click",function(e){var t=a.CHM(n).$implicit;return a.oxw(4).setDefaultMerchant(e,null==t?null:t.SadadId),e.stopPropagation()}),a.ALo(17,"translate"),a.YNc(18,Qe,1,0,"img",69),a.YNc(19,Ke,1,0,"img",70),a.qZA(),a.qZA(),a.qZA(),a.qZA(),a.BQk()}
1if(2&e){var i=t.$implicit,r=a.oxw(4);a.xp6(4),a.Q6J("src",a.lcZ(5,12,i.profilepic),a.LSH),a.xp6(3),a.Q6J("ngIf",!(null!=i&&i.parentmerchantId)),a.xp6(1),a.Q6J("ngIf",a.DdM(18,$e).includes(null==i?null:i.userbusinessstatusId)),a.xp6(3),a.Oqu(null==i?null:i.name),a.xp6(2),a.AsE("",a.lcZ(14,14,"SADAD ID")," : ",null==i?null:i.SadadId,""),a.xp6(2),a.Q6J("ngIf",!(null!=i&&i.parentmerchantId)),a.xp6(1),a.s9C("ngbTooltip",a.lcZ(17,16,"Set as Default")),a.Q6J("ngClass",a.VKq(19,ze,!(null!=i&&i.parentmerchantId)))("placement","ar"==r.currLang?"right":"left"),a.xp6(2),a.Q6J("ngIf",!(null!=i&&i.submerchantDefault)),a.xp6(1),a.Q6J("ngIf",null==i?null:i.submerchantDefault)}}function et(e,t){if(1&e&&(a.TgZ(0,"li",59),a.YNc(1,Xe,20,21,"ng-container",60),a.qZA()),2&e){var n=a.oxw(3);a.xp6(1),a.Q6J("ngForOf",n.merchants)}}function tt(e,t){if(1&e&&(a.ynx(0),a.TgZ(1,"li",46),a.TgZ(2,"div",47),a._uU(3),a.ALo(4,"translate"),a.qZA(),a.TgZ(5,"div",48),a.TgZ(6,"div",49),a.TgZ(7,"div",50),a._UZ(8,"img",51),a.ALo(9,"secure"),a.qZA(),a.TgZ(10,"div",52),a.TgZ(11,"h6"),a._uU(12),a.qZA(),a.TgZ(13,"span"),a._uU(14),a.ALo(15,"translate"),a.qZA(),a.qZA(),a.qZA(),a.TgZ(16,"div",53),a.TgZ(17,"a",54),a._UZ(18,"img",55),a.qZA(),a.qZA(),a.qZA(),a.qZA(),a.YNc(19,He,4,3,"li",56),a.YNc(20,et,2,1,"li",57),a.BQk()),2&e){var n=a.oxw(2);a.xp6(3),a.hij(" ",a.lcZ(4,7,"Default")," "),a.xp6(5),a.Q6J("src",a.lcZ(9,9,n.defaultMerchant.profilepic),a.LSH),a.xp6(4),a.Oqu(null==n.defaultMerchant?null:n.defaultMerchant.name),a.xp6(2),a.AsE("",a.lcZ(15,11,"SADAD ID")," : ",null==n.defaultMerchant?null:n.defaultMerchant.SadadId,""),a.xp6(5),a.Q6J("ngIf",n.merchants&&n.allowManageMerchants),a.xp6(1),a.Q6J("ngIf",n.merchants&&n.allowManageMerchants)}}function nt(e,t){1&e&&(a.TgZ(0,"li"),a._uU(1),a.ALo(2,"translate"),a.qZA()),2&e&&(a.xp6(1),a.hij(" ",a.lcZ(2,1,"NO_REC_FOUND")," "))}function it(e,t){if(1&e&&a.YNc(0,nt,3,3,"li",15),2&e){var n=a.oxw(2);a.Q6J("ngIf",0==n.merchants.length)}}function rt(e,t){if(1&e&&(a.TgZ(0,"li",41),a.TgZ(1,"a",26),a._UZ(2,"img",42),a.qZA(),a.TgZ(3,"ul",43),a.YNc(4,tt,21,13,"ng-container",44),a.YNc(5,it,1,1,"ng-template",null,45,a.W1O),a.qZA(),a.qZA()),2&e){var n=a.MAs(6),i=a.oxw();a.xp6(4),a.Q6J("ngIf",i.defaultMerchant)("ngIfElse",n)}}var at=function(e){return{"live-terminal-main":e}},ot=function(){return["/merchantpanel/pos-terminal-maps"]};function st(e,t){if(1&e&&(a.TgZ(0,"li",77),a.TgZ(1,"div",78),a._UZ(2,"img",79),a.qZA(),a.TgZ(3,"p",80),a._uU(4),a.ALo(5,"translate"),a.qZA(),a.TgZ(6,"a",81),a._UZ(7,"img",82),a.qZA(),a.qZA()),2&e){var n=a.oxw();a.Q6J("ngClass",a.VKq(5,at,!n.allowTransfer&&n.showServiceTypeSelection)),a.xp6(4),a.Oqu(a.lcZ(5,3,"LIVE_TERMINAL")),a.xp6(2),a.Q6J("routerLink",a.DdM(7,ot))}}function ct(e,t){1&e&&a._UZ(0,"img",83)}function lt(e,t){1&e&&a._UZ(0,"img",84)}function ut(e,t){1&e&&(a.TgZ(0,"li",85),a._UZ(1,"app-notification"),a.qZA())}var dt=function(){var e=function(){function e(t,n,i,r,a,o,c,l,u,d,p,v,h){var g=this;s(this,e),this.layout=t,this.modalService=n,this.navServices=i,this._router=r,this._paymentServiceTypeServices=a,this._authService=o,this._header=c,this.permissionService=l,this.translate=u,this._commonHelperService=d,this._merchantManagementService=p,this.spinnerSadad=v,this.document=h,this.pinNumber="123456",this.maskedPinNumber="",this.dark="dark-only"==this.layout.config.settings.layout_version,this.isProdEnv=f.N.production,this.isLocalEnv=f.N.local,this.projectType=[{value:"online-payment",label:"Online Payment",code:"ONLINE_PAYMENT"},{value:"pos",label:"POS",code:"POS"}],this.disable=!1,this.hidePinNumber=!0,this.pTypeCode="ONLINE_PAYMENT",this.pType="Online Payment",this.serviceType="online-payment",this._distroyed$=new b.x,this.showServiceTypeSelection=!1,this.showTerminalMaps=!1,this.allowNotifi=!1,this.showRtl=!1,this.parentMerchant={},this.allowManageMerchants=!1,this.currLang="ar",this.isMobHead=!1,this.selectedLang=this.translate.getDefaultLang(),this.getTranslate(),this.translate.onLangChange.subscribe(function(e){g.getTranslate(),g.currLang=e.lang}),this.currLang=this.translate.getDefaultLang()}return l(e,[{key:"ngOnInit",value:function(){var e,t=this;this._paymentServiceTypeServices.paymentService.subscribe(function(e){t.serviceType=e,t.pTypeCode="online-payment"==t.serviceType?"ONLINE_PAYMENT":"POS",t.getTranslate()}),this.elem=document.documentElement,"pos"===this._paymentServiceTypeServices.serviceType&&(this.pType="POS",this.pTypeCode="POS",this.getTranslate()),"online-payment"===this._paymentServiceTypeServices.serviceType&&(this.pType="Online Payment",this.pTypeCode="ONLINE_PAYMENT",this.getTranslate()),this._authService.getBalance(),this.getPinNumber(),this.getMerchantHeaderDetails(),this.showServiceTypeSelection=this.permissionService.hasRoutePermission("service_type_change"),this.showTerminalMaps=this.permissionService.hasRoutePermission("pos-terminal-maps"),this.allowNotifi=this.permissionService.hasFuncPermission("header","NOTIFICATIONS"),this.allowManageMerchants=this.permissionService.hasFuncPermission("header","MANAGE_MERCHANTS");var n=this.translate.getDefaultLang(),i=localStorage.getItem("selectedLang");["en","ar"].includes(i)||localStorage.setItem("selectedLang",n),localStorage.getItem("selectedLang")?n=localStorage.getItem("selectedLang"):(localStorage.setItem("selectedLang",n),n=this.translate.getDefaultLang()),this.translate.setDefaultLang(n),this.setLangSettings("ar"==n?"en":"ar"),this.allowManageMerchants&&this.get
1SubMerchants(),this.userInfo=null===(e=this._authService)||void 0===e?void 0:e.currentUserValue,this.initLastLoginDateDetails()}},{key:"ngAfterViewInit",value:function(){window.location.href.includes("/auth/login")||this._authService.vpnEventEmitter.emit("vpnInitEvent")}},{key:"handleScroll",value:function(){var e=window.pageYOffset;this.isMobHead=e>=this.elementPosition}},{key:"getLastLogin",value:function(){var e,t=this.resolveUserLastLoginDateVal(null===(e=this._authService)||void 0===e?void 0:e.currentUserValue);t&&(this.lastLoggedIn=t)}},{key:"getTranslate",value:function(){var e=this;this.translate.get(["ONLINE_PAYMENT","POS"]).subscribe(function(t){e.language_text=t;var n=[{value:"online-payment",label:"Online Payment",code:"ONLINE_PAYMENT"},{value:"pos",label:"POS",code:"POS"}];n[0].label=t[n[0].code],n[1].label=t[n[1].code],e.projectType=n,e.pType=t[e.pTypeCode]})}},{key:"getPinNumber",value:function(){var e=this;this._header.getPartnerPinNumber().pipe((0,y.R)(this._distroyed$)).subscribe({next:function(t){var n,i;null!=t&&t.error||(e.pinNumber=null==t||null===(n=t[0])||void 0===n?void 0:n.servicepin),!e.maskedPinNumber&&e.pinNumber&&Array((null===(i=e.pinNumber)||void 0===i?void 0:i.length)||0).fill(0).map(function(t,n){return e.maskedPinNumber+="\u2022"})},error:function(e){}})}},{key:"getMerchantHeaderDetails",value:function(){var e=this._header.getMerchantHeaderDetails();this.sadadMerchantId=e.sadadMerchantId,this.sadadMainMerchantId=e.sadadMainMerchantId,this.merchantName=e.merchantName,this.roleId=e.roleId}},{key:"sidebarToggle",value:function(){this.navServices.collapseSidebar=!this.navServices.collapseSidebar,this.navServices.megaMenu=!1,this.navServices.levelMenu=!1}},{key:"togglePasswordOne",value:function(e){this.hidePinNumber=!this.hidePinNumber}},{key:"changeServiceType",value:function(e){var t,n;this._router.navigate(17==(null===(t=this._authService)||void 0===t||null===(n=t.currentUserValue)||void 0===n?void 0:n.roleId)&&"pos"==(null==e?void 0:e.value)?["/merchantpanel/pos-settings"]:["dashboard","".concat(e.value,"-default")],{queryParams:{highMenu:"1"}}),this._paymentServiceTypeServices.changeServiceType(e.value)}},{key:"changeLang",value:function(){this.setLangSettings(this.selectedLang),this.translate.use(this.selectedLang),localStorage.setItem("selectedLang",this.selectedLang)}},{key:"setLangSettings",value:function(e){"en"==e?(this.selectedLang="ar",this.layout.changeLayoutType("rtl")):(this.selectedLang="en",this.layout.changeLayoutType("ltr"))}},{key:"openTransferOTP",value:function(e){this.modalService.open(e,{centered:!0,size:"md"})}},{key:"signOut",value:function(){this._authService.logout().pipe((0,y.R)(this._distroyed$)).subscribe(function(e){})}},{key:"getSubMerchants",value:function(){var e,t=this,n=this;this.defaultMerchant=null,this.subMerchants=[],this.merchants=[],this._merchantManagementService.getSubMerchantsListing().pipe((0,y.R)(this._distroyed$)).subscribe({next:function(e){var n;null!=e&&e.error?t._commonHelperService.disTransErrMsg(null==e||null===(n=e.error)||void 0===n?void 0:n.message):(null==e?void 0:e.length)&&(t.merchants=e,e.map(function(e,n){var i;e.profilepic=null!=e&&e.profilepic?"".concat(t._authService.updSNAEnvURL("v5"),"containers/api-businesslogo/download/").concat(e.profilepic):"assets/images/placeholder/sadad_rounded_logo.png",e.userbusinessstatusId=e.userbusinesses&&e.userbusinesses.length?null===(i=e.userbusinesses[0])||void 0===i?void 0:i.userbusinessstatusId:2}
1),t.merchants.forEach(function(e){(null==e?void 0:e.submerchantDefault)&&(t.defaultMerchant=e)}),t.defaultMerchant||t.merchants.forEach(function(e){(null==e?void 0:e.parentmerchantId)||2==(null==e?void 0:e.linkmerchantverificationstatusId)||(t.defaultMerchant=e)}),t.merchants=t.merchants.filter(function(e){return 2!=(null==e?void 0:e.linkmerchantverificationstatusId)}))},error:(e=(0,h.Z)(regeneratorRuntime.mark(function e(t){var i,r,a;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:n._commonHelperService.disTransErrMsg((null==t||null===(i=t.error)||void 0===i||null===(r=i.error)||void 0===r?void 0:r.message)||(null==t||null===(a=t.error)||void 0===a?void 0:a.message));case 1:case"end":return e.stop()}},e)})),function(t){return e.apply(this,arguments)})})}},{key:"switchToMerchant",value:function(e,t){var n=this;return(0,h.Z)(regeneratorRuntime.mark(function e(){var i;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:n.spinnerSadad.show("headerspinner"),n._merchantManagementService.switchToChildMerchant(t).pipe((0,y.R)(n._distroyed$)).subscribe({next:function(e){var t;null!=e&&e.error?(n.spinnerSadad.hide("headerspinner"),n._commonHelperService.disTransErrMsg(null==e||null===(t=e.error)||void 0===t?void 0:t.message)):(console.log(e),(null==e?void 0:e.userInfo)&&(null==e?void 0:e.id)&&(e.userInfo.token=null==e?void 0:e.id,n.getProfile(e.userInfo)))},error:(i=(0,h.Z)(regeneratorRuntime.mark(function e(t){var i,r,a;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:n.spinnerSadad.hide("headerspinner"),n._commonHelperService.disTransErrMsg((null==t||null===(i=t.error)||void 0===i||null===(r=i.error)||void 0===r?void 0:r.message)||(null==t||null===(a=t.error)||void 0===a?void 0:a.message));case 1:case"end":return e.stop()}},e)})),function(e){return i.apply(this,arguments)})});case 1:case"end":return e.stop()}},e)}))()}},{key:"getProfile",value:function(e){var t=this;return(0,h.Z)(regeneratorRuntime.mark(function n(){var i;return regeneratorRuntime.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:t.spinnerSadad.show("headerspinner"),t._authService.getUserProfile().pipe((0,y.R)(t._distroyed$)).subscribe({next:function(n){var i;null!=n&&n.error?(t.spinnerSadad.hide("headerspinner"),t._commonHelperService.disTransErrMsg(null==n||null===(i=n.error)||void 0===i?void 0:i.message)):(null!=n&&n.clientConfig&&(e.clientConfig=null==n?void 0:n.clientConfig),e&&(t._authService.changeCurrentUser(e),t.spinnerSadad.hide("headerspinner")))},error:(i=(0,h.Z)(regeneratorRuntime.mark(function e(n){var i,r,a;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:t.spinnerSadad.hide("headerspinner"),t._commonHelperService.disTransErrMsg((null==n||null===(i=n.error)||void 0===i||null===(r=i.error)||void 0===r?void 0:r.message)||(null==n||null===(a=n.error)||void 0===a?void 0:a.message));case 1:case"end":return e.stop()}},e)})),function(e){return i.apply(this,arguments)})});case 1:case"end":return n.stop()}},n)}))()}},{key:"isAllowToSwitchMerchants",value:function(){var e,t,n,i;return!(null==this||null===(e=this.userInfo)||void 0===e||!e.isSwitchChild)||!(null==this||null===(t=this.userInfo)||void 0===t||!t.isallowedtoaddsubmerchant)||!(null===(n=this._authService)||void 0===n||null===(i=n.loginUserValue)||void 0===i||!i.isSubmerchantEnabled)}},{key:"setDefaultMerchant",value:function(e,t){var n,i=this,r=this;this.spinnerSadad.show("headerspinner"),this._merchantManagementService.setMerchantAsDefault({SadadId:t,submerchantDefault:1}).pipe((0,y.R)(this._distroyed$)).subscribe({next:function(e){var t;null!=e&&e.error?(i.spinnerSadad.hide("headerspinner"),i._commonHelperService.disTransErrMsg(null==e||null===(t=e.error)||void 0===t?void 0:t.message)):(i.spinnerSadad.hide("headerspinner"),i._commonHelperService.disTransSuccMsg("Merchant has been set as default."),i.getSubMerchants())},error:(n=(0,h.Z)(regeneratorRuntime.mark(function e(t){var n,i,a;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:r.spinnerSadad.hide("headerspinner"),r._commonHelperService.disTransErrMsg((null==t||null===(n=t.error)||void 0===n||null===(i=n.error)||void 0===i?void 0:i.message)||(null==t||null===(a=t.error)||void 0===a?void 0:a.message));case 1:case"end":return e.stop()}},e)})),function(e){return n.apply(this,arguments)})})}},{key:"resolveUserLastLoginDateVal",value:function(e){return(null==e?void 0:e.modified)||(null==e?void 0:e.previouslogindatetime)||""}},{key:"initLastLoginDateDetails",value:function(){var e,t,n,i=this;this.lastLoggedIn=this.resolveUserLastLoginDateVal(null===(e=this._authService)||void 0===e?void 0:e.currentUserValue),this.getLastLogin(),null===(t=this._authService)||void 0===t||null===(n=t.currentUser)||void 0===n||n.pipe((0,y.R)(this._distroyed$)).subscribe(function(e){var t=i.resolveUserLastLoginDateVal(e);t&&(i.lastLoggedIn=t)})}},{key:"ngOnDestroy",value:function(){this._distroyed$.next(null),this._distroyed$.complete()}}]),e}();return e.\u0275fac=function(t){return new(t||e)(a.Y36(k.P),a.Y36(_.FF),a.Y36(he.t),a.Y36(o.F0),a.Y36(T.Yx),a.Y36(T.$h),a.Y36(T.r6),a.Y36(A.$),a.Y36(u.sK),a.Y36(T.$P),a.Y36(T.X5),a.Y36(E.t2),a.Y36(x.K0))},e.\u0275cmp=a.Xpm({type:e,selectors:[["app-header"]],viewQuery:function(e,t){var n;(1&e&&a.Gf(Ve,5),2&e)&&(a.iGM(n=a.CRH())&&(t.mobHeaderEle=n.first))},hostBindings:function(e,t){1&e&&a.NdJ("scroll",function(e){return t.handleScroll(e)},!1,a.Jf7)},decls:77,vars:47,consts:[["bdColor","rgba(0, 0, 0, 0.8)","size","medium","color","#fff","type","ball-circus","name","headerspinner",3,"fullScreen"],[1,"page-header","n-main-header"],[1,"header-wrapper","subuser-header-wrap","row","m-0"],[1,"hmerchant-name-wrapper","w-100"],[1,"d-flex","align-items-center","justify-content-between","w-100"],[1,"headermerchat_name"],[1,"header_last_login"],[1,"mb-0"],["dir","ltr"],[1,"header-logo-wrapper"],[1,"toggle-sidebar",3,"click"],[1,"status_toggle","middle",3,"icon"],[1,"left-header","col","horizontal-wrapper","pl-0","desk-view-left-header"],[1,"marchant_details"],[1,"d-flex","align-items-center"],[4,"ngIf"],[1,"hiddenicon",3,"click"],[3,"hidden"],["data-feather","eye"],["data-feather","eye-off"],["class","pos-selection col-2",4,"ngIf"],[1,"nav-right","n-nav-menu","col-5","pull-right","right-header","p-0","header-menu"],[1,"nav-menus"],["class","nav-menu-items profile-nav onhover-dropdown merchant-switch mr-5",4,"ngIf"],["class","nav-menu-items",3,"ngClass",4,"ngIf"],[1,"nav-menu-items",3,"click"],["href","javascript:void(0)",1,"text-dark"],["class","img-fluid","src","assets/images/pos-panel/header/ar-language.svg","alt","",4,"ngIf"],["class","img-fluid","src","assets/images/pos-panel/header/en-language.svg","alt","",4,"ngIf"],["class","nav-menu-items onhover-dropdown d-none d-sm-block d-md-block",4,"ngIf"],[1,"profile-nav","onhover-dropdown","p-0","nav-menu-items","cursor-pointer","d-mobile-none"],[1,"nav-menu-items","ml-5","mr-0","signout-wrapper"],["href","javascript:void(0)","tooltipClass","mycustom-tooltip",1,"text-dark",3,"ngbTooltip","placement","click"],["src","assets/images/pos-panel/header/logout.svg","alt","",1,"img-fluid"],[1,"mob-view-left-header"],["mobHeaderMenu",""],[1,"left-header","col","horizontal-wrapper","pl-0"],[1,"pos-selection","col-2"],[1,"header-dropdown"],[1,"c-filter-dropdown","n-h-custom-dropdown"],[1,"js-example-placeholder-multiple",3,"items","searchable","placeholder","clearable","ngModel","ngModelChange","change"],[1,"nav-menu-items","profile-nav","onhover-dropdown","merchant-switch","mr-5"],["src","assets/images/pos-panel/header/merchant-transfer.svg","alt","",1,"img-fluid"],[1,"merchant-profile","onhover-show-div","d-block"],[4,"ngIf","ngIfElse"],["mmelseBlock",""],[1,"merchant-main"],[1,"def-merchant-title"],[1,"d-flex","align-items-center","justify-content-between","login-merchant"],[1,"d-flex","align-center","w-100"],[1,"merchant-avatar","mr-2"],["default","assets/images/placeholder/sadad_rounded_logo.png",1,"merchant-profile-pic",3,"src"],[1,"merchant-details"],[1,"merchant-favourite"],["href","#"],["src","assets/images/pos-panel/merchant-favourite.svg"],["class","another-ac-title",4,"ngIf"],["class","merchant-list-box",4,"ngIf"],[1,"another-ac-title"],[1,"merchant-list-box"],[4,"ngFor","ngForOf"],[1,"d-flex","align-items-center","justify-content-between","merchant-inner-list",3,"click"],[1,"merchant-avatar","mr-2","position-relative"],[1,"merchant-status"],["src","assets/images/pos-panel/primary-status.svg",4,"ngIf"],["src","assets/images/pos-panel/red-status.svg",4,"ngIf"],[1,"merchant-list-details","position-relative"],["href","javascript:void(0)","class","merchant-list-favourite",3,"ngClass",4,"ngIf"],["href","javascript:void(0)","tooltipClass","mycustom-tooltip",1,"merchant-list-favourite",3,"ngbTooltip","ngClass","placement","click"],["src","assets/images/pos-panel/outline-star.svg",4,"ngIf"],["src","assets/images/pos-panel/filled-star.svg",4,"ngIf"],["src","assets/images/pos-panel/primary-status.svg"],["src","assets/images/pos-panel/red-status.svg"],["href","javascript:void(0)",1,"merchant-list-favourite",3,"ngClass"],[1,"merchant-primary-text","mb-0","merchant-primary-text"],["src","assets/images/pos-panel/outline-star.svg"],["src","assets/images/pos-panel/filled-star.svg"],[1,"nav-menu-items",3,"ngClass"],[1,"live-trml-anmtr"],["src","assets/images/pos-panel/live-trmnl.gif"],[1,"live-trmnl"],[1,"text-dark",3,"routerLink"],["tooltipClass","my-custom-class","src","assets/images/pos-panel/header/map-icon.png","alt","",1,"img-fluid"],["src","assets/images/pos-panel/header/ar-language.svg","alt","",1,"img-fluid"],["src","assets/images/pos-panel/header/en-language.svg","alt","",1,"img-fluid"],[1,"nav-menu-items","onhover-dropdown","d-none","d-sm-block","d-md-block"]],template:function(e,t){1&e&&(a.TgZ(0,"ngx-spinner",0),a._UZ(1,"app-sadad-loader"),a.qZA(),a.TgZ(2,"div",1),a.TgZ(3,"div",2),a.TgZ(4,"div",3),a.TgZ(5,"div",4),a.TgZ(6,"div",5),a.TgZ(7,"h6"),a._uU(8),a.qZA(),a.qZA(),a.TgZ(9,"div",6),a.TgZ(10,"p",7),a._uU(11),a.ALo(12,"translate"),a.TgZ(13,"span",8),a._uU(14),a.ALo(15,"formatDate"),a.qZA(),a.qZA(),a.qZA(),a.qZA(),a.qZA(),a.TgZ(16,"div",9),a.TgZ(17,"div",10),a.NdJ("click",function(){return t.sidebarToggle()}),a._UZ(18,"app-feather-icons",11),a.qZA(),a.qZA(),a.TgZ(19,"div",12),a.TgZ(20,"div",13),a.TgZ(21,"div",14),a.TgZ(22,"div"),a.TgZ(23,"p",7),a._uU(24),a.ALo(25,"translate"),a.YNc(26,Fe,2,1,"span",15),a.YNc(27,Ye,2,1,"span",15),a.qZA(),a.TgZ(28,"p",7),a._uU(29),a.ALo(30,"translate"),a.TgZ(31,"span",16),a.NdJ("click",function(e){return t.togglePasswordOne(e)}),a.TgZ(32,"span",17),a._uU(33),a._UZ(34,"i",18),a.qZA(),a.TgZ(35,"span",17),a._uU(36),a._UZ(37,"i",19),a.qZA(),a.qZA(),a.qZA(),a.qZA(),a.qZA(),a.qZA(),a.qZA(),a.YNc(38,je,5,7,"div",20),a.TgZ(39,"div",21),a.TgZ(40,"ul",22),a.YNc(41,rt,7,2,"li",23),a.YNc(42,st,8,8,"li",24),a.TgZ(43,"li",25),a.NdJ("click",function(){return t.changeLang()}),a.TgZ(44,"a",26),a.YNc(45,ct,1,0,"img",27),a.YNc(46,lt,1,0,"img",28),a.qZA(),a.qZA(),a.YNc(47,ut,2,0,"li",29),a.TgZ(48,"li",30),a._UZ(49,"app-my-account"),a.qZA(),a.TgZ(50,"li",31),a.TgZ(51,"a",32),a.NdJ("click",function(){return t.signOut()}),a.ALo(52,"translate"),a._UZ(53,"img",33),a.qZA(),a.qZA(),a.qZA(),a.qZA(),a.qZA(),a.TgZ(54,"div",34,35),a.TgZ(56,"div",36),a.TgZ(57,"div",13),a.TgZ(58,"h6"),a._uU(59),a.qZA(),a.TgZ(60,"div",14),a.TgZ(61,"div"),a.TgZ(62,"p",7),a._uU(63),a.ALo(64,"translate"),a.TgZ(65,"span"),a._uU(66),a.qZA(),a.qZA(),a.TgZ(67,"p",7),a._uU(68),a.ALo(69,"translate"),a.TgZ(70,"span",16),a.NdJ("click",function(e){return t.togglePasswordOne(e)}),a.TgZ(71,"span",17),a._uU(72),a._UZ(73,"i",18),a.qZA(),a.TgZ(74,"span",17),a._uU(75),a._UZ(76,"i",19),a.qZA(),a.qZA(),a.qZA(),a.qZA(),a.qZA(),a.qZA(),a.qZA(),a.qZA(),a.qZA()),2&e&&(a.Q6J("fullScreen",!0),a.xp6(2),a.ekj("close_icon",t.navServices.collapseSidebar),a.xp6(6),a.Oqu(t.merchantName),a.xp6(3),a.hij("",a.lcZ(12,33,"Last Login Date"),": "),a.xp6(3),a.Oqu(a.lcZ(15,35,t.lastLoggedIn)),a.xp6(4),a.Q6J("icon","align-center"),a.xp6(6),a.hij(" ",a.lcZ(25,37,"SADAD_MER_ID"),": "),a.xp6(2),a.Q6J("ngIf",1==t.roleId),a.xp6(1),a.Q6J("ngIf",1!=t.roleId),a.xp6(2),a.hij(" ",a.lcZ(30,39,"SPRT_PIN_NUM"),": "),a.xp6(3),a.Q6J("hidden",t.hidePinNumber),a.xp6(1),a.hij("",t.pinNumber," "),a.xp6(2),a.Q6J("hidden",!t.hidePinNumber),a.xp6(1),a.hij("",t.maskedPinNumber," "),a.xp6(2),a.Q6J("ngIf",t.showServiceTypeSelection),a.xp6(3),a.Q6J("ngIf",t.isAllowToSwitchMerchants()&&(null==t.merchants?null:t.merchants.length)>1),a.xp6(1),a.Q6J("ngIf","pos"==t.serviceType&&t.showTerminalMaps),a.xp6(3),a.Q6J("ngIf","en"==t.selectedLang),a.xp6(1),a.Q6J("ngIf","ar"==t.selectedLang),a.xp6(1),a.Q6J("ngIf",t.allowNotifi),a.xp6(4),a.s9C("ngbTooltip",a.lcZ(52,41,"Signout")),a.Q6J("placement","top auto"),a.xp6(3),a.ekj("mob-header",t.isMobHead),a.xp6(5),a.Oqu(t.merchantName),a.xp6(4),a.hij(" ",a.lcZ(64,43,"SADAD_MER_ID"),": "),a.xp6(3),a.hij("",t.sadadMerchantId," "),a.xp6(2),a.hij(" ",a.lcZ(69,45,"SPRT_PIN_NUM"),": "),a.xp6(3),a.Q6J("hidden",t.hidePinNumber),a.xp6(1),a.hij("",t.pinNumber," "),a.xp6(2),a.Q6J("hidden",!t.hidePinNumber),a.xp6(1),a.hij("",t.maskedPinNumber," "))},directives:[E.Ro,C.T,ge.A,x.O5,me,_._L,fe.w9,g.JJ,g.On,F.mh,_e.M,x.sg,x.mk,o.yS,qe],pipes:[u.X$,we.r2,we.EO],styles:[".mob-header[_ngcontent-%COMP%]{position:fixed;top:0;overflow:hidden;z-index:10;display:none}.headermerchat_name[_ngcontent-%COMP%] h6[_ngcontent-%COMP%]{color:#324c6a;font-size:20px;line-height:30px;font-weight:700;margin-bottom:0}.header_last_login[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:#324c6a;font-size:11px;line-height:30px;font-weight:400}.marchant_details[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:#324c6a;font-weight:500;font-size:18px;letter-spacing:normal}.marchant_details[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:#96273b;font-weight:400}.marchant_details[_ngcontent-%COMP%] .header-hidden-btn[_ngcontent-%COMP%]{background:#7e0e45;border-radius:22px;padding:8px 15px;color:#fff;margin-right:10px;font-size:12px}.login-merchant[_ngcontent-%COMP%]{margin-bottom:15px;padding-bottom:15px;border-bottom:1px solid hsla(0,0%,44%,.24)}
1.login-merchant[_ngcontent-%COMP%] .merchant-avatar[_ngcontent-%COMP%]{height:36px;width:36px;position:relative;display:block;background-color:#fff;border-radius:50%}.login-merchant[_ngcontent-%COMP%] .merchant-avatar[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{border-radius:50%;height:100%;width:100%;position:absolute;left:0;top:0}.login-merchant[_ngcontent-%COMP%] .merchant-details[_ngcontent-%COMP%] h6[_ngcontent-%COMP%]{color:#121212;font-size:15px;font-weight:700;margin-bottom:0;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;max-width:200px}.login-merchant[_ngcontent-%COMP%] .merchant-details[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{margin-bottom:0;color:#7e0e45;font-weight:600;line-height:19px;font-size:12px;letter-spacing:.17px}.login-merchant[_ngcontent-%COMP%] .merchant-favourite[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{display:inline!important}.another-ac-title[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:#000!important;margin-bottom:0;padding-bottom:22px;font-size:12px!important;font-weight:500!important;line-height:14px}.merchant-list-box[_ngcontent-%COMP%]{height:450px;overflow:auto}.merchant-list-box[_ngcontent-%COMP%] .merchant-inner-list[_ngcontent-%COMP%]{border:1px solid #e0dbda;border-radius:12px;padding:7px 13px;margin-bottom:7px;cursor:pointer}.merchant-list-box[_ngcontent-%COMP%] .merchant-inner-list[_ngcontent-%COMP%] .merchant-list-details[_ngcontent-%COMP%]{width:100%}.merchant-list-box[_ngcontent-%COMP%] .merchant-inner-list[_ngcontent-%COMP%] .merchant-list-details[_ngcontent-%COMP%] h6[_ngcontent-%COMP%]{margin-bottom:0;color:#000;font-weight:600;line-height:17px;font-size:14px}.merchant-list-box[_ngcontent-%COMP%] .merchant-inner-list[_ngcontent-%COMP%] .merchant-list-details[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:#000;font-size:12px;font-weight:600;line-height:15px;margin-bottom:0;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;width:calc(100% - 10px);opacity:.5}.merchant-list-box[_ngcontent-%COMP%] .merchant-inner-list[_ngcontent-%COMP%] .merchant-list-details[_ngcontent-%COMP%] .merchant-list-favourite[_ngcontent-%COMP%]{position:absolute;right:0;display:inline-block;height:auto;width:auto;line-height:20px}.merchant-list-box[_ngcontent-%COMP%] .merchant-inner-list[_ngcontent-%COMP%] .merchant-list-details[_ngcontent-%COMP%] .merchant-list-favourite[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:100%;width:140%}.merchant-list-box[_ngcontent-%COMP%] .merchant-inner-list[_ngcontent-%COMP%] .merchant-list-details[_ngcontent-%COMP%] .merchant-list-favourite[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:#000!important;font-size:10px!important;font-weight:400;letter-spacing:.14px;line-height:22px}.merchant-status[_ngcontent-%COMP%]{position:absolute;bottom:-2px;right:2px}.def-merchant-title[_ngcontent-%COMP%]{color:#7e0e45;font-weight:700;margin-bottom:10px}.merchant-switch[_ngcontent-%COMP%]:hover{box-shadow:0 3px 6px rgba(126,0,0,.5);border-radius:50%}[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:#7e0e45;border:3px solid transparent;background-clip:content-box;border-radius:17px}[_ngcontent-%COMP%]::-webkit-scrollbar{background:transparent;width:13px!important;height:13px!important}.header-menu[_ngcontent-%COMP%] .nav-menu-items[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:#324c6a;height:40px;width:40px;display:flex;justify-content:center;border-radius:50px;text-align:center;align-items:center}.header-menu[_ngcontent-%COMP%] .status[_ngcontent-%COMP%]{background-color:#e06f85;height:12px;width:12px;top:1px;right:0;border:0;border-radius:50%;position:absolute;z-index:1}.header-menu[_ngcontent-%COMP%] .nav-menus[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{padding:0;margin-right:10px}.pos-selection[_ngcontent-%COMP%]{position:absolute;left:50%;transform:translate(-50%,23%)}@media screen and (max-width:991px){.pos-selection[_ngcontent-%COMP%]{transform:translate(-50%)}}.pos-selection[_ngcontent-%COMP%] .header-dropdown[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{position:absolute;top:50%;right:60px;z-index:111;transform:translateY(-50%)}.pos-selection[_ngcontent-%COMP%] .header-dropdown[_ngcontent-%COMP%] span[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:24px}.pos-selection[_ngcontent-%COMP%] .header-dropdown[_ngcontent-%COMP%] select[_ngcontent-%COMP%]::-ms-expand{display:none}.pos-selection[_ngcontent-%COMP%] .header-dropdown[_ngcontent-%COMP%] .custom-select[_ngcontent-%COMP%]{width:calc(100% - 60px);outline:0;box-shadow:0 3px 6px #00000029;border:1px solid #66788f6b;border-radius:27px;height:40px;color:#324c6a;font-size:13px;margin:0;font-weight:700;padding:.375rem 25px .375rem 20px;background:#fff!important;-moz-appearance:none;-webkit-appearance:none;appearance:none}.live-trmnl[_ngcontent-%COMP%], .my-custom-class[_ngcontent-%COMP%]{white-space:nowrap}.live-trmnl[_ngcontent-%COMP%]{color:#cd0d52;font-size:11px;text-align:center;font-weight:700;position:absolute;top:-20px;left:-26px}.header-transfer[_ngcontent-%COMP%] .transfer-btn[_ngcontent-%COMP%]{font-size:14px;background-color:#7e0e45!important;color:#fff;font-weight:400;border-radius:50px;padding:7px 15px;display:inline-block;border-color:rgba(115,102,255,.1)!important}.header-transfer[_ngcontent-%COMP%] .transfer-btn[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{margin-right:10px}.header-transfer[_ngcontent-%COMP%] .transfer-btn[_ngcontent-%COMP%]:hover{background-color:#b43070!important;transition:.6s;color:#fff!important}.header-transfer[_ngcontent-%COMP%] .transfer-btn[_ngcontent-%COMP%]:active{background:#b43070!important;background:linear-gradient(90deg,#b43070,#e863a3 28%,#e863a3 66%,#b43070)!important;color:#fff!important}.t-available-balance[_ngcontent-%COMP%] h5[_ngcontent-%COMP%]{font-size:18px;color:#324c6a;font-weight:600}.transaction-wrapper[_ngcontent-%COMP%] .create-u-input[_ngcontent-%COMP%]{height:48px!important}.otptransfer-form[_ngcontent-%COMP%] h6[_ngcontent-%COMP%]{font-size:16px;color:#7e0e45}.otptransfer-form[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font-size:14px}.otptransfer-form[_ngcontent-%COMP%] .form-group[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center}.otptransfer-form[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{border-radius:6px;padding:7px;height:43px;text-align:center;margin:5px;box-shadow:none;outline:0}.otptransfer-form[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:focus{box-shadow:none;outline:0;border-color:#ced4da}.otptransfer-form[_ngcontent-%COMP%] .otp-transaction-input[_ngcontent-%COMP%]{width:75%;margin:0 auto}.otptransfer-form[_ngcontent-%COMP%] h5[_ngcontent-%COMP%]{color:#7e0e45;font-size:14px}.d-mobile-none[_ngcontent-%COMP%]{display:block}@media screen and (max-width:576px){.header-wrapper.subuser-header-wrap[_ngcontent-%COMP%]{height:66px!important}.hmerchant-name-wrapper[_ngcontent-%COMP%]{display:none}.d-mobile-none[_ngcontent-%COMP%]{display:none!important}}@media screen and (max-width:375px){.pos-selection[_ngcontent-%COMP%]{left:-5%!important}}.merchant-profile-pic[_ngcontent-%COMP%]{width:36px;height:36px;border-radius:50%}.merchant-profile-pic[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:100%;width:100%;border-radius:50%;-o-object-fit:inherit;object-fit:inherit}.merchant-primary-text[_ngcontent-%COMP%]{margin-left:-75px}.primary-merchant-text[_ngcontent-%COMP%]{right:10px!important}@media screen and (min-width:280px) and (max-width:320px){.pos-selection[_ngcontent-%COMP%]{left:-21%!important}.pos-selection[_ngcontent-%COMP%] .c-filter-dropdown[_ngcontent-%COMP%]{width:90px}}",".my-custom-class[_ngcontent-%COMP%]{white-space:nowrap}"]}),e}(),pt=i(25160),vt=i(58858);function ht(e,t){if(1&e&&(a.TgZ(0,"div"),a.TgZ(1,"h6",32),a._uU(2),a.ALo(3,"translate"),a.qZA(),a.TgZ(4,"p",33),a._uU(5),a.ALo(6,"translate"),a.qZA(),a.qZA()),2&e){var n=a.oxw().$implicit;a.xp6(2),a.Oqu(a.lcZ(3,2,n.headTitle1)),a.xp6(3),a.Oqu(a.lcZ(6,4,n.headTitle2))}}function gt(e,t){if(1&e&&(a.TgZ(0,"label"),a._uU(1),a.qZA()),2&e){var n=a.oxw().$implicit;
1a.Gre("badge badge-",n.badgeType,""),a.xp6(1),a.Oqu(n.badgeValue)}}function mt(e,t){1&e&&a._UZ(0,"img",53)}function ft(e,t){1&e&&a._UZ(0,"img",54)}function _t(e,t){1&e&&a._UZ(0,"img",55)}function yt(e,t){1&e&&a._UZ(0,"img",56)}function St(e,t){1&e&&a._UZ(0,"img",57)}function bt(e,t){1&e&&a._UZ(0,"img",58)}function wt(e,t){1&e&&a._UZ(0,"img",59)}function It(e,t){1&e&&a._UZ(0,"img",60)}function Tt(e,t){1&e&&a._UZ(0,"img",61)}function Et(e,t){1&e&&a._UZ(0,"img",62)}function kt(e,t){1&e&&a._UZ(0,"img",63)}function At(e,t){1&e&&a._UZ(0,"img",63)}function Ct(e,t){1&e&&a._UZ(0,"img",64)}function xt(e,t){1&e&&a._UZ(0,"img",65)}function Pt(e,t){1&e&&a._UZ(0,"img",66)}function Ot(e,t){1&e&&a._UZ(0,"img",67)}function Nt(e,t){1&e&&a._UZ(0,"img",68)}function Ut(e,t){1&e&&a._UZ(0,"img",69)}function Lt(e,t){if(1&e&&a._UZ(0,"i"),2&e){var n=a.oxw(2).$implicit;a.Gre("fa fa-angle-",n.active?"down":"right"," pull-right")}}var Rt=function(e){return{active:e}};function Mt(e,t){if(1&e){var n=a.EpF();a.TgZ(0,"a",34),a.NdJ("click",function(){a.CHM(n);var e=a.oxw().$implicit;return a.oxw().toggletNavActive(e)}),a.YNc(1,mt,1,0,"img",35),a.YNc(2,ft,1,0,"img",36),a.YNc(3,_t,1,0,"img",37),a.YNc(4,yt,1,0,"img",38),a.YNc(5,St,1,0,"img",39),a.YNc(6,bt,1,0,"img",40),a.YNc(7,wt,1,0,"img",41),a.YNc(8,It,1,0,"img",42),a.YNc(9,Tt,1,0,"img",43),a.YNc(10,Et,1,0,"img",44),a.YNc(11,kt,1,0,"img",45),a.YNc(12,At,1,0,"img",45),a.YNc(13,Ct,1,0,"img",46),a.YNc(14,xt,1,0,"img",47),a.YNc(15,Pt,1,0,"img",48),a.YNc(16,Ot,1,0,"img",49),a.YNc(17,Nt,1,0,"img",50),a.YNc(18,Ut,1,0,"img",51),a.TgZ(19,"span"),a._uU(20),a.ALo(21,"translate"),a.qZA(),a.TgZ(22,"div",52),a.YNc(23,Lt,1,3,"i",26),a.qZA(),a.qZA()}if(2&e){var i=a.oxw().$implicit,r=a.oxw();a.ekj("link-nav",!i.children),a.Q6J("ngClass",a.VKq(25,Rt,i.active)),a.xp6(1),a.Q6J("ngIf","Transactions"==i.title),a.xp6(1),a.Q6J("ngIf","Settlement"==i.title),a.xp6(1),a.Q6J("ngIf","Balance Statement"==i.title),a.xp6(1),a.Q6J("ngIf","Invoices"==i.title),a.xp6(1),a.Q6J("ngIf","Sadad Services"==i.title),a.xp6(1),a.Q6J("ngIf","Basicstore"==i.title),a.xp6(1),a.Q6J("ngIf","Subscriptions"==i.title),a.xp6(1),a.Q6J("ngIf","Terminals"==i.title),a.xp6(1),a.Q6J("ngIf","Devices"==i.title),a.xp6(1),a.Q6J("ngIf","Reports"==i.title),a.xp6(1),a.Q6J("ngIf","Payment Gateway"==i.title),a.xp6(1),a.Q6J("ngIf","Settings"==i.title),a.xp6(1),a.Q6J("ngIf","SadadVas"==i.title),a.xp6(1),a.Q6J("ngIf","Manage Users"==i.title),a.xp6(1),a.Q6J("ngIf","Manage Merchants"==i.title&&(null==r.userInfo?null:r.userInfo.isallowedtoaddsubmerchant)),a.xp6(1),a.Q6J("ngIf","Batch Summary"==i.title),a.xp6(1),a.Q6J("ngIf","My Account"==i.title),a.xp6(1),a.Q6J("ngIf","Shipping"==i.title),a.xp6(2),a.Oqu(a.lcZ(21,23,i.title)),a.xp6(3),a.Q6J("ngIf",i.children)}}function Dt(e,t){if(1&e){var n=a.EpF();a.TgZ(0,"div",93),a.NdJ("click",function(e){a.CHM(n);var t=a.oxw(2).$implicit;return a.oxw().newBadgeClick(e,t)}),a._uU(1),a.ALo(2,"translate"),a.qZA()}2&e&&(a.xp6(1),a.Oqu(a.lcZ(2,1,"NEW")))}function Zt(e,t){if(1&e&&(a.TgZ(0,"span",94),a._uU(1),a.qZA()),2&e){a.oxw();var n=a.MAs(27),i=a.oxw(2);a.Q6J("ngbTooltip",n)("placement","ar"==i.currLang?"left":"right"),a.xp6(1),a.Oqu(i.pendOrdrCount)}}function qt(e,t){if(1&e&&(a.TgZ(0,"div",95),a._uU(1),a.ALo(2,"translate"),a.qZA(),a.TgZ(3,"div",96),a._uU(4),a.ALo(5,"translate"),a.qZA()),2&e){var n=a.oxw(3);a.xp6(1),a.AsE("",n.pendOrdrCount," ",a.lcZ(2,3,"ORDER_PENDING"),""),a.xp6(3),a.Oqu(a.lcZ(5,5,"ORDERS_REQUIRE_ACTION"))}}function Vt(e,t){if(1&e&&a._UZ(0,"i"),2&e){var n=a.oxw(2).$implicit;a.Gre("fa fa-angle-",n.active?"down":"right"," pull-right")}}var Ft=function(e){return[e]},Yt=function(e,t){return{active:e,"div-disabled":t}},jt=function(e){return{"d-none":e}},Ht=function(e){return{"shipping-menu":e}};function Jt(e,t){if(1&e){var n=a.EpF();a.TgZ(0,"a",70),a.NdJ("click",function(e){a.CHM(n);var t=a.oxw().$implicit;return a.oxw().menuChange(e,t)}),a.TgZ(1,"img",71),a.NdJ("load",function(){return a.CHM(n),a.oxw(2).onImageLoaded("homeIL")}),a.qZA(),a.TgZ(2,"img",72),a.NdJ("load",function(){return a.CHM(n),a.oxw(2).onImageLoaded("traxIL")}),a.qZA(),a.TgZ(3,"img",73),a.NdJ("load",function(){return a.CHM(n),a.oxw(2).onImageLoaded("settIL")}),a.qZA(),a.TgZ(4,"img",74),a.NdJ("load",function(){return a.CHM(n),a.oxw(2).onImageLoaded("balStaIL")}),a.qZA(),a.TgZ(5,"img",75),a.NdJ("load",function(){return a.CHM(n),a.oxw(2).onImageLoaded("invIL")}),a.qZA(),a.TgZ(6,"img",76),a.NdJ("load",function(){return a.CHM(n),a.oxw(2).onImageLoaded("sdSerIL")}),a.qZA(),a.TgZ(7,"img",77),a.NdJ("load",function(){return a.CHM(n),a.oxw(2).onImageLoaded("bsIL")}),a.qZA(),a.TgZ(8,"img",78),a.NdJ("load",function(){return a.CHM(n),a.oxw(2).onImageLoaded("subIL")}),a.qZA(),a.TgZ(9,"img",79),a.NdJ("load",function(){return a.CHM(n),a.oxw(2).onImageLoaded("mawIL")}),a.qZA(),a.TgZ(10,"img",80),a.NdJ("load",function(){return a.CHM(n),a.oxw(2).onImageLoaded("terIL")}),a.qZA(),a.TgZ(11,"img",81),a.NdJ("load",function(){return a.CHM(n),a.oxw(2).onImageLoaded("devIL")}),a.qZA(),a.TgZ(12,"img",82),a.NdJ("load",function(){return a.CHM(n),a.oxw(2).onImageLoaded("repIL")}),a.qZA(),a.TgZ(13,"img",83),a.NdJ("load",function(){return a.CHM(n),a.oxw(2).onImageLoaded("pgIL")}),a.qZA(),a.TgZ(14,"img",83),a.NdJ("load",function(){return a.CHM(n),a.oxw(2).onImageLoaded("settiIL")}),a.qZA(),a.TgZ(15,"img",84),a.NdJ("load",function(){return a.CHM(n),a.oxw(2).onImageLoaded("svgsIL")}),a.qZA(),a.TgZ(16,"img",85),a.NdJ("load",function(){return a.CHM(n),a.oxw(2).onImageLoaded("manUsrIL")}),a.qZA(),a.TgZ(17,"img",86),a.NdJ("load",function(){return a.CHM(n),a.oxw(2).onImageLoaded("manMerIL")}),a.qZA(),a.TgZ(18,"img",87),a.NdJ("load",function(){return a.CHM(n),a.oxw(2).onImageLoaded("batSmryIL")}),a.qZA(),a.TgZ(19,"img",88),a.NdJ("load",function(){return a.CHM(n),a.oxw(2).onImageLoaded("myacIL")}),a.qZA(),a.TgZ(20,"img",89),a.NdJ("load",function(){return a.CHM(n),a.oxw(2).onImageLoaded("shipIL")}),a.qZA(),a.YNc(21,Dt,3,3,"div",90),a.TgZ(22,"span",24),a._uU(23),a.ALo(24,"translate"),a.YNc(25,Zt,2,3,"span",91),a.qZA(),a.YNc(26,qt,6,7,"ng-template",null,92,a.W1O),a.TgZ(28,"div",52),a.YNc(29,Vt,1,3,"i",26),a.qZA(),a.qZA()}if(2&e){var i=a.oxw().$implicit,r=a.oxw();a.ekj("link-nav",!i.children),a.Q6J("routerLink",i.type?a.VKq(52,Ft,i.path):null)("queryParams",r.getMenuQueryParams(i))("ngClass",a.WLB(54,Yt,i.active,r.isShippingMenuDisabled(i))),a.xp6(1),a.Q6J("ngClass",a.VKq(57,jt,"Home"!=i.title))("src",r.homeIL?r.homeSvg:r.loadSvg,a.LSH),a.xp6(1),a.Q6J("ngClass",a.VKq(59,jt,"Transactions"!=i.title))("src",r.traxIL?r.traxSvg:r.loadSvg,a.LSH),a.xp6(1),a.Q6J("ngClass",a.VKq(61,jt,"Settlement"!=i.title))("src",r.settIL?r.settSvg:r.loadSvg,a.LSH),a.xp6(1),a.Q6J("ngClass",a.VKq(63,jt,"Balance Statement"!=i.title))("src",r.settIL?r.balStatSvg:r.loadSvg,a.LSH),a.xp6(1),a.Q6J("ngClass",a.VKq(65,jt,"Invoices"!=i.title))("src",r.invIL?r.invSvg:r.loadSvg,a.LSH),a.xp6(1),a.Q6J("ngClass",a.VKq(67,jt,"Sadad Services"!=i.title))("src",r.sdSerIL?r.sdSerSvg:r.loadSvg,a.LSH),a.xp6(1),a.Q6J("ngClass",a.VKq(69,jt,"Basicstore"!=i.title))("src",r.bsIL?r.bsSvg:r.loadSvg,a.LSH),a.xp6(1),a.Q6J("ngClass",a.VKq(71,jt,"Subscriptions"!=i.title))("src",r.subIL?r.subSvg:r.loadSvg,a.LSH),a.xp6(1),a.Q6J("ngClass",a.VKq(73,jt,"Mawaid"!=i.title))("src",r.mawIL?r.mawSvg:r.loadSvg,a.LSH),a.xp6(1),a.Q6J("ngClass",a.VKq(75,jt,"Terminals"!=i.title))("src",r.terIL?r.terSvg:r.loadSvg,a.LSH),a.xp6(1),a.Q6J("ngClass",a.VKq(77,jt,"Devices"!=i.title))("src",r.devIL?r.devSvg:r.loadSvg,a.LSH),a.xp6(1),a.Q6J("ngClass",a.VKq(79,jt,"Reports"!=i.title))("src",r.repIL?r.repSvg:r.loadSvg,a.LSH),a.xp6(1),a.Q6J("ngClass",a.VKq(81,jt,"Payment Gateway"!=i.title))("src",r.pgIL?r.pgSvg:r.loadSvg,a.LSH),a.xp6(1),a.Q6J("ngClass",a.VKq(83,jt,"Settings"!=i.title))("src",r.settiIL?r.settiSvg:r.loadSvg,a.LSH),a.xp6(1),a.Q6J("ngClass",a.VKq(85,jt,"SadadVas"!=i.title))("src",r.svgsIL?r.svasSvg:r.loadSvg,a.LSH),a.xp6(1),a.Q6J("ngClass",a.VKq(87,jt,"Manage Users"!=i.title))("src",r.manUsrIL?r.manUsrSvg:r.loadSvg,a.LSH),a.xp6(1),a.Q6J("ngClass",a.VKq(89,jt,"Manage Merchants"!=i.title))("src",r.manMerIL?r.manMerSvg:r.loadSvg,a.LSH),a.xp6(1),a.Q6J("ngClass",a.VKq(91,jt,"Batch Summary"!=i.title))("src",r.batSmr
1yIL?r.batSmrySvg:r.loadSvg,a.LSH),a.xp6(1),a.Q6J("ngClass",a.VKq(93,jt,"My Account"!=i.title))("src",r.myacIL?r.myAccSvg:r.loadSvg,a.LSH),a.xp6(1),a.Q6J("ngClass",a.VKq(95,jt,"Shipping"!=i.title))("src",r.shipIL?r.shipSvg:r.loadSvg,a.LSH),a.xp6(1),a.Q6J("ngIf",r.isNewBadgeVisible(i)),a.xp6(1),a.Q6J("ngClass",a.VKq(97,Ht,"Shipping"===i.title)),a.xp6(1),a.hij("",a.lcZ(24,50,i.title)," "),a.xp6(2),a.Q6J("ngIf","Shipping"===i.title&&r.pendOrdrCount&&r.adminShippingAllowed),a.xp6(4),a.Q6J("ngIf",i.children)}}function Bt(e,t){if(1&e&&a._UZ(0,"i"),2&e){var n=a.oxw(2).$implicit;a.Gre("fa fa-angle-",n.active?"down":"right"," pull-right")}}function Wt(e,t){if(1&e&&(a.TgZ(0,"a",97),a._UZ(1,"app-feather-icons",12),a.TgZ(2,"span"),a._uU(3),a.ALo(4,"translate"),a.qZA(),a.TgZ(5,"div",52),a.YNc(6,Bt,1,3,"i",26),a.qZA(),a.qZA()),2&e){var n=a.oxw().$implicit;a.ekj("link-nav",!n.children),a.s9C("href",n.type?n.path:null,a.LSH),a.Q6J("ngClass",a.VKq(9,Rt,n.active)),a.xp6(1),a.Q6J("icon",n.icon),a.xp6(2),a.Oqu(a.lcZ(4,7,n.title)),a.xp6(3),a.Q6J("ngIf",n.children)}}function Gt(e,t){if(1&e&&a._UZ(0,"i"),2&e){var n=a.oxw(2).$implicit;a.Gre("fa fa-angle-",n.active?"down":"right"," pull-right")}}function Qt(e,t){if(1&e&&(a.TgZ(0,"a",98),a._UZ(1,"app-feather-icons",12),a.TgZ(2,"span"),a._uU(3),a.qZA(),a.TgZ(4,"div",52),a.YNc(5,Gt,1,3,"i",26),a.qZA(),a.qZA()),2&e){var n=a.oxw().$implicit;a.ekj("link-nav",!n.children),a.s9C("href",n.type?n.path:null,a.LSH),a.Q6J("ngClass",a.VKq(7,Rt,n.active)),a.xp6(1),a.Q6J("icon",n.icon),a.xp6(2),a.Oqu(n.title),a.xp6(2),a.Q6J("ngIf",n.children)}}function Kt(e,t){if(1&e&&a._UZ(0,"i"),2&e){var n=a.oxw(2).$implicit;a.Gre("fa fa-angle-",n.active?"down":"right"," pull-right")}}function $t(e,t){if(1&e){var n=a.EpF();a.TgZ(0,"a",106),a.NdJ("click",function(){a.CHM(n);var e=a.oxw().$implicit;return a.oxw(3).toggletNavActive(e)}),a.TgZ(1,"span"),a._uU(2),a.ALo(3,"translate"),a.qZA(),a.TgZ(4,"div",52),a.YNc(5,Kt,1,3,"i",26),a.qZA(),a.qZA()}if(2&e){var i=a.oxw().$implicit;a.xp6(2),a.hij(" ",a.lcZ(3,2,i.title),""),a.xp6(3),a.Q6J("ngIf",i.children)}}function zt(e,t){1&e&&a._UZ(0,"i",109)}var Xt=function(){return{exact:!0}};function en(e,t){if(1&e&&(a.TgZ(0,"a",107),a.TgZ(1,"span"),a._uU(2),a.ALo(3,"translate"),a.qZA(),a.YNc(4,zt,1,0,"i",108),a.qZA()),2&e){var n=a.oxw().$implicit;a.Q6J("routerLink",n.type?a.VKq(6,Ft,n.path):null)("routerLinkActiveOptions",a.DdM(8,Xt)),a.xp6(2),a.Oqu(a.lcZ(3,4,n.title)),a.xp6(2),a.Q6J("ngIf",n.children)}}function tn(e,t){1&e&&a._UZ(0,"i",109)}function nn(e,t){if(1&e&&(a.TgZ(0,"a",110),a.TgZ(1,"span"),a._uU(2),a.ALo(3,"translate"),a.qZA(),a.YNc(4,tn,1,0,"i",108),a.qZA()),2&e){var n=a.oxw().$implicit;a.s9C("href",n.type?n.path:null,a.LSH),a.Q6J("routerLinkActiveOptions",a.DdM(6,Xt)),a.xp6(2),a.Oqu(a.lcZ(3,4,n.title)),a.xp6(2),a.Q6J("ngIf",n.children)}}function rn(e,t){1&e&&a._UZ(0,"i",109)}function an(e,t){if(1&e&&(a.TgZ(0,"a",111),a.TgZ(1,"span"),a._uU(2),a.ALo(3,"translate"),a.qZA(),a.YNc(4,rn,1,0,"i",108),a.qZA()),2&e){var n=a.oxw().$implicit;a.s9C("href",n.type?n.path:null,a.LSH),a.xp6(2),a.Oqu(a.lcZ(3,3,n.title)),a.xp6(2),a.Q6J("ngIf",n.children)}}function on(e,t){if(1&e&&(a.TgZ(0,"a",116),a.TgZ(1,"span"),a._uU(2),a.ALo(3,"translate"),a.qZA(),a.qZA()),2&e){var n=a.oxw().$implicit;a.Q6J("routerLink",n.type?a.VKq(5,Ft,n.path):null)("routerLinkActiveOptions",a.DdM(7,Xt)),a.xp6(2),a.hij(" ",a.lcZ(3,3,n.title),"")}}function sn(e,t){if(1&e&&(a.TgZ(0,"a",117),a.TgZ(1,"span"),a._uU(2),a.ALo(3,"translate"),a.qZA(),a.qZA()),2&e){var n=a.oxw().$implicit;a.s9C("href",n.type?n.path:null,a.LSH),a.Q6J("routerLinkActiveOptions",a.DdM(5,Xt)),a.xp6(2),a.Oqu(a.lcZ(3,3,n.title))}}function cn(e,t){if(1&e&&(a.TgZ(0,"a",118),a.TgZ(1,"span"),a._uU(2),a.ALo(3,"translate"),a.qZA(),a.qZA()),2&e){var n=a.oxw().$implicit;a.s9C("href",n.type?n.path:null,a.LSH),a.xp6(2),a.Oqu(a.lcZ(3,2,n.title))}}function ln(e,t){if(1&e&&(a.TgZ(0,"li",24),a.YNc(1,on,4,8,"a",113),a.YNc(2,sn,4,6,"a",114),a.YNc(3,cn,4,4,"a",115),a.qZA()),2&e){var n=t.$implicit;a.Q6J("ngClass",a.VKq(4,Rt,n.active)),a.xp6(1),a.Q6J("ngIf","link"===n.type),a.xp6(1),a.Q6J("ngIf","extLink"===n.type),a.xp6(1),a.Q6J("ngIf","extTabLink"===n.type)}}var un=function(e,t){return{"menu-open":e,"menu-close":t}};function dn(e,t){if(1&e&&(a.TgZ(0,"ul",112),a.YNc(1,ln,4,6,"li",100),a.qZA()),2&e){var n=a.oxw().$implicit;a.Udp("display",n.active?"block":"none"),a.Q6J("ngClass",a.VKq(5,Rt,n.active))("ngClass",a.WLB(7,un,n.active,!n.active)),a.xp6(1),a.Q6J("ngForOf",n.children)}}function pn(e,t){if(1&e&&(a.TgZ(0,"li",24),a.YNc(1,$t,6,4,"a",101),a.YNc(2,en,5,9,"a",102),a.YNc(3,nn,5,7,"a",103),a.YNc(4,an,5,5,"a",104),a.YNc(5,dn,2,10,"ul",105),a.qZA()),2&e){var n=t.$implicit;a.Q6J("ngClass",a.VKq(6,Rt,n.active)),a.xp6(1),a.Q6J("ngIf","sub"===n.type),a.xp6(1),a.Q6J("ngIf","link"===n.type),a.xp6(1),a.Q6J("ngIf","extLink"===n.type),a.xp6(1),a.Q6J("ngIf","extTabLink"===n.type),a.xp6(1),a.Q6J("ngIf",n.children)}}function vn(e,t){if(1&e&&(a.TgZ(0,"ul",99),a.YNc(1,pn,6,8,"li",100),a.qZA()),2&e){var n=a.oxw().$implicit;a.Udp("display",n.active?"block":"none"),a.Q6J("ngClass",a.VKq(5,Rt,n.active))("ngClass",a.WLB(7,un,n.active,!n.active)),a.xp6(1),a.Q6J("ngForOf",n.children)}}function hn(e,t){if(1&e&&(a.TgZ(0,"li",24),a.YNc(1,ht,7,6,"div",25),a.YNc(2,gt,2,4,"label",26),a.YNc(3,Mt,24,27,"a",27),a.YNc(4,Jt,3
10,99,"a",28),a.YNc(5,Wt,7,11,"a",29),a.YNc(6,Qt,6,9,"a",30),a.YNc(7,vn,2,10,"ul",31),a.qZA()),2&e){var n=t.$implicit,i=a.oxw();a.Tol(n.headTitle1?"sidebar-main-title":"sidebar-list"),a.Q6J("ngClass",a.VKq(10,Rt,n.active)),a.xp6(1),a.Q6J("ngIf",n.headTitle1),a.xp6(1),a.Q6J("ngIf",n.badgeType&&n.badgeValue),a.xp6(1),a.Q6J("ngIf","sub"===n.type),a.xp6(1),a.Q6J("ngIf","link"===n.type&&(n.serviceType==i.serviceType||"common"==n.serviceType)),a.xp6(1),a.Q6J("ngIf","extLink"===n.type),a.xp6(1),a.Q6J("ngIf","extTabLink"===n.type),a.xp6(1),a.Q6J("ngIf",n.children)}}var gn=function(e){return{marginLeft:e}},mn=function(){var e=function(){function e(t,n,i,r,a,c,l,u,d,p){var v=this;s(this,e),this.router=t,this.navServices=n,this._paymentServiceTypeService=i,this.layout=r,this.permissionService=a,this._authenticationService=c,this._shippingService=l,this._commonHelperService=u,this._spinCtrlServ=d,this.translate=p,this.serviceType="online-payment",this.isProdEnv=f.N.production,this.margin=0,this.width=window.innerWidth,this.leftArrowNone=!0,this.rightArrowNone=!1,this.ImageLoading=!1,this.homeIL=!1,this.traxIL=!1,this.settIL=!1,this.balStaIL=!1,this.invIL=!1,this.sdSerIL=!1,this.bsIL=!1,this.subIL=!1,this.mawIL=!1,this.terIL=!1,this.devIL=!1,this.repIL=!1,this.pgIL=!1,this.settiIL=!1,this.svgsIL=!1,this.manUsrIL=!1,this.manMerIL=!1,this.batSmryIL=!1,this.myacIL=!1,this.shipIL=!1,this.manUsrSvg="assets/images/pos-panel/sidebar/manage-users.svg",this.manMerSvg="assets/images/pos-panel/sidebar/manage-merchants.svg",this.batSmrySvg="assets/images/pos-panel/sidebar/batch-summary.svg",this.myAccSvg="assets/images/pos-panel/sidebar/myaccounts.svg",this.homeSvg="assets/images/pos-panel/sidebar/home.svg",this.traxSvg="assets/images/pos-panel/sidebar/transactions.svg",this.settSvg="assets/images/pos-panel/sidebar/settlement.svg",this.balStatSvg="assets/images/pos-panel/sidebar/balance-statement.svg",this.invSvg="assets/images/pos-panel/sidebar/invoice.svg",this.sdSerSvg="assets/images/pos-panel/sidebar/sdservices.svg",this.bsSvg="assets/images/pos-panel/sidebar/basicstore.svg",this.subSvg="assets/images/pos-panel/sidebar/subscription.svg",this.mawSvg="assets/images/pos-panel/sidebar/mawaid.svg",this.terSvg="assets/images/pos-panel/sidebar/terminal.svg",this.devSvg="assets/images/pos-panel/sidebar/devices.svg",this.repSvg="assets/images/pos-panel/sidebar/reports.svg",this.pgSvg="assets/images/pos-panel/sidebar/settings.svg",this.settiSvg="assets/images/pos-panel/sidebar/settings.svg",this.svasSvg="assets/images/pos-panel/sidebar/sadadvas.svg",this.loadSvg="assets/images/pos-panel/sidebar/menu-loader-icon.svg",this.shipSvg="assets/images/pos-panel/sidebar/shipping.svg",this._distroyed$=new b.x,this.selectedLang="",this.adminShippingAllowed=!1,this.featureFlagsCount={balance_statement_click:0,shipping_click:0},this.newBadgeConfigs=[{title:"Balance Statement",flag:"balance_statement_click"},{title:"Shipping",flag:"shipping_click"}],this.isFeatureFlagsLoaded=!1,this.translate.onLangChange.subscribe(function(e){v.currLang=e.lang,v.getTranslate()}),this.navServices.items.subscribe(function(e){var t=[];e.forEach(function(e){var n,i,r=!0;"Manage Merchants"==e.title&&(r=null===(n=v._authenticationService)||void 0===n||null===(i=n.currentUserValue)||void 0===i?void 0:i.isallowedtoaddsubmerchant),r&&v.permissionService.hasMenuPermission(e.title)&&t.push(e)}),v.menuItems=e,v.menuItems=t,v.router.events.subscribe(function(t){t instanceof o.m2&&e.filter(function(e){if(t.url=t.url.replace("?highMenu=1",""),e.path===t.url&&v.setNavActive(e),!e.children)return!1;e.children.filter(function(e){if(e.path===t.url&&v.setNavActive(e),!e.children)return!1;e.children.filter(function(e){e.path===t.url&&v.setNavActive(e)})})})})}),this.orderCountsSubscription=this._shippingService.orderCounts$.subscribe(function(e){v.pendOrdrCount=(null==e?void 0:e.pendingCount)||0,v.totalOrdrCount=(null==e?void 0:e.totalCount)||0}
1),this.getFeatureFlags(["balance_statement_click","shipping_click"])}return l(e,[{key:"getTranslate",value:function(){var e,t;this.selectedLang=(null===(e=this.translate)||void 0===e?void 0:e.currentLang)||(null===(t=this.translate)||void 0===t?void 0:t.defaultLang)}},{key:"ngOnInit",value:function(){var e=this;this._paymentServiceTypeService.paymentService.subscribe(function(t){e.serviceType=t,"online-payment"==e.serviceType&&e.loadShippingPendingOrderCount()}),this.userInfo=this._authenticationService.currentUserValue,this.refreshAdminShippingAllowed()}},{key:"refreshAdminShippingAllowed",value:function(){var e,t=this.adminShippingAllowed;if(this.adminShippingAllowed=(0,pt.wt)(null===(e=this._authenticationService.currentUserValue)||void 0===e?void 0:e.is_shipping_enabled),!this.adminShippingAllowed)return this.pendOrdrCount=0,void(this.totalOrdrCount=0);t||"online-payment"!=this.serviceType||this.loadShippingPendingOrderCount()}},{key:"isShippingMenuDisabled",value:function(e){return"Shipping"===(null==e?void 0:e.title)&&!this.adminShippingAllowed}},{key:"ngAfterViewInit",value:function(){var e=this;setTimeout(function(){var t=document.querySelector(".sidebar-list .active img:not(.d-none)");e.safeUpdateActiveSidebarIconVal(t)},100)}},{key:"onResize",value:function(e){this.width=e.target.innerWidth-500}},{key:"onImageLoaded",value:function(e,t){this[e]=!0}},{key:"sidebarToggle",value:function(){this.navServices.collapseSidebar=!this.navServices.collapseSidebar,this._authenticationService.sideBarEventEmiter.emit(this.navServices.collapseSidebar)}},{key:"setNavActive",value:function(e){this.menuItems.filter(function(t){t!==e&&(t.active=!1),t.children&&t.children.includes(e)&&(t.active=!0),t.children&&t.children.filter(function(n){n.children&&n.children.includes(e)&&(t.active=!0,n.active=!0)})})}},{key:"toggletNavActive",value:function(e){var t=this;e.active||this.menuItems.forEach(function(n){if(t.menuItems.includes(e)&&(n.active=!1),!n.children)return!1;n.children.forEach(function(t){n.children.includes(e)&&(t.active=!1)})}),e.active=!e.active,this.handleFeatureFlagClick(e)}},{key:"scrollToLeft",value:function(){this.margin>=-this.width?(this.margin=0,this.leftArrowNone=!0,this.rightArrowNone=!1):(this.margin+=this.width,this.rightArrowNone=!1)}},{key:"scrollToRight",value:function(){this.margin<=-3051?(this.margin=-3464,this.leftArrowNone=!1,this.rightArrowNone=!0):(this.margin+=-this.width,this.leftArrowNone=!1)}},{key:"safeUpdateActiveSidebarIconVal",value:function(e){if(null!=e&&e.src&&null!=e&&e.alt){var t=null==e?void 0:e.alt;e.src.includes("".concat(t,"-active"))||(e.src=e.src.replace(t,"".concat(t,"-active")))}}},{key:"safeResetInactiveSidebarIconsVal",value:function(e){null==e||e.forEach(function(e){(null==e?void 0:e.src)&&(null==e?void 0:e.alt)&&(e.src=e.src.replace("".concat(null==e?void 0:e.alt,"-active"),null==e?void 0:e.alt))})}},{key:"menuChange",value:function(e,t){var n,i=document.querySelectorAll("a.sidebar-item img");this.safeResetInactiveSidebarIconsVal(i);var r=null==e||null===(n=e.currentTarget)||void 0===n?void 0:n.querySelector("img:not(.d-none)");if(null!=r&&r.src&&null!=r&&r.alt){var a=null==r?void 0:r.alt;r.src=r.src.replace(a,a+"-active")}t&&this.handleFeatureFlagClick(t)}},{key:"loadShippingPendingOrderCount",value:function(){var e,t=this,n=this;this.adminShippingAllowed&&(this._spinCtrlServ.showSpinner(),this._shippingService.getShippingPendingOrderCount().pipe((0,y.R)(this._distroyed$)).subscribe({next:function(e){var n,i,r;null!=e&&e.error?t._commonHelperService.disTransErrMsg(null==e||null===(n=e.error)||void 0===n?void 0:n.message):t._shippingService.updateOrderCounts({pendingCount:null==e||null===(i=e.data)||void 0===i?void 0:i.pending_ready_for_pickup_count,totalCount:null==e||null===(r=e.data)||void 0===r?void 0:r.total_order_count}),t._spinCtrlServ.hideSpinner()},error:(e=(0,h.Z)(regeneratorRuntime.mark(function e(t){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:n._spinCtrlServ.hideSpinner();case 1:case"end":return e.stop()}},e)})),function(t){return e.apply(this,arguments)})}))}},{key:"getMenuQueryParams",value:function(e){return"Shipping"===(null==e?void 0:e.title)&&this.totalOrdrCount?{tab:"orders"}:null}},{key:"getFeatureFlagKey",value:function(e){var t;return(null===(t=this.newBadgeConfigs.find(function(t){return(null==t?void 0:t.t
1itle)===e}))||void 0===t?void 0:t.flag)||null}},{key:"shouldShowNewBadge",value:function(e){var t;if(!e)return!1;var n=this.getFeatureFlagKey(null==e?void 0:e.title);if(!n)return!1;var i=null===(t=this.featureFlagsCount)||void 0===t?void 0:t[n];return void 0!==i&&i<=4}},{key:"handleFeatureFlagClick",value:function(e){if(e&&this.shouldShowNewBadge(e)){var t=this.getFeatureFlagKey(null==e?void 0:e.title);t&&this.postFeatureFlag(t)}}},{key:"getFeatureFlags",value:function(e){var t=this;this._authenticationService.getFeatureFlag(e).pipe((0,y.R)(this._distroyed$)).subscribe({next:function(e){t.handleFeatureFlagsResponse(e)},error:function(e){}})}},{key:"postFeatureFlag",value:function(e){var t=this;this._authenticationService.postFeatureFlag(e).pipe((0,y.R)(this._distroyed$)).subscribe({next:function(n){console.log("postFeatureFlag success response:",n),t.getFeatureFlags([e])},error:function(e){console.error("postFeatureFlag error response:",e)}})}},{key:"newBadgeClick",value:function(e,t){e.stopPropagation(),e.preventDefault();var n=this.getFeatureFlagKey(null==t?void 0:t.title);n&&(console.log("newBadgeClick triggered for flag:",n),this.postFeatureFlag(n))}},{key:"handleFeatureFlagsResponse",value:function(e){var t,n;e&&(this.featureFlagsCount={balance_statement_click:void 0!==(null==e?void 0:e.balance_statement_click)?null==e?void 0:e.balance_statement_click:null===(t=this.featureFlagsCount)||void 0===t?void 0:t.balance_statement_click,shipping_click:void 0!==(null==e?void 0:e.shipping_click)?null==e?void 0:e.shipping_click:null===(n=this.featureFlagsCount)||void 0===n?void 0:n.shipping_click},this.isFeatureFlagsLoaded=!0)}},{key:"isNewBadgeVisible",value:function(e){return!!e&&this.isFeatureFlagsLoaded&&this.shouldShowNewBadge(e)}},{key:"ngOnDestroy",value:function(){this.orderCountsSubscription&&this.orderCountsSubscription.unsubscribe(),this._distroyed$.next(null),this._distroyed$.complete()}}]),e}();return e.\u0275fac=function(t){return new(t||e)(a.Y36(o.F0),a.Y36(he.t),a.Y36(vt.Y),a.Y36(k.P),a.Y36(A.$),a.Y36(T.$h),a.Y36(T.Nk),a.Y36(T.$P),a.Y36(T.br),a.Y36(u.sK))},e.\u0275cmp=a.Xpm({type:e,selectors:[["app-sidebar"]],hostBindings:function(e,t){1&e&&a.NdJ("resize",function(e){return t.onResize(e)},!1,a.Jf7)},decls:29,vars:10,consts:[[1,"logo-wrapper","text-center"],["routerLink","/",1,"sidebar-logo"],["src","assets/images/logo/sadad-login-logo.svg","alt","",1,"img-fluid","for-light"],[1,"back-btn",3,"click"],[1,"fa","fa-angle-left"],[1,"toggle-sidebar"],[1,"open-side-btn",3,"click"],[1,"icon-angle-left"],[1,"logo-icon-wrapper","text-center"],["href","javascript:void(0)",1,"sidebar-logo-close"],[1,"sidebar-main"],["id","left-arrow",1,"left-arrow",3,"click"],[3,"icon"],["id","sidebar-menu",3,"ngStyle"],[1,"sidebar-links","custom-scrollbar"],[1,"back-btn"],["href","javascript:void(0)"],["src","assets/images/logo/logo-icon.png","alt","",1,"img-fluid"],[1,"mobile-back","text-right",3,"click"],["aria-hidden","true",1,"fa","fa-angle-right","pl-2"],[3,"class","ngClass",4,"ngFor","ngForOf"],["id","right-arrow",1,"right-arrow",3,"click"],[1,"close-toggle-sidebar"],[1,"close-side-btn",3,"click"],[3,"ngClass"],[4,"ngIf"],[3,"class",4,"ngIf"],["href","javascript:void(0)","class","sidebar-link sidebar-title",3,"link-nav","ngClass","click",4,"ngIf"],["routerLinkActive","active","class","sidebar-link sidebar-title sidebar-item",3,"routerLink","queryParams","link-nav","ngClass","click",4,"ngIf"],["class","sidebar-link sidebar-title",3,"href","link-nav","ngClass",4,"ngIf"],["target","_blank","class","sidebar-link sidebar-title",3,"href","link-nav","ngClass",4,"ngIf"],["class","sidebar-submenu",3,"ngClass","display",4,"ngIf"],[1,"lan-1"],[1,"lan-2"],["href","javascript:void(0)",1,"sidebar-link","sidebar-title",3,"ngClass","click"],["src","assets/images/pos-panel/sidebar/transactions.svg","alt","",4,"ngIf"],["src","assets/images/pos-panel/sidebar/settlement.svg","alt","",4,"ngIf"],["src","assets/images/pos-panel/sidebar/balance-statement.svg","alt","",4,"ngIf"],["src","assets/images/pos-panel/sidebar/invoice.svg","alt","",4,"ngIf"],["src","assets/images/pos-panel/sidebar/sdservices.svg","alt","",4,"ngIf"],["src","assets/images/pos-panel/sidebar/basicstore.svg","alt","",4,"ngIf"],["src","assets/images/pos-panel/sidebar/subscription.svg","alt","",4,"ngIf"],["src","assets/images/pos-panel/sidebar/terminal.svg","alt","",4,"ngIf"],["src","assets/images/pos-panel/sidebar/devices.svg","alt","",4,"ngIf"],["src","assets/images/pos-panel/sidebar/reports.svg","alt","",4,"ngIf"],["src","assets/images/pos-panel/sidebar/settings.svg","alt","",4,"ngIf"],["src","assets/images/pos-panel/sidebar/sadadvas.svg","alt","",4,"ngIf"],["src","assets/images/pos-panel/sidebar/manage-users.svg","alt","",4,"ngIf"],["src","assets/images/pos-panel/sidebar/manage-merchants.svg","alt","",4,"ngIf"],["src","assets/images/pos-panel/sidebar/batch-summary.svg","alt","",4,"ngIf"],["src","assets/images/pos-panel/sidebar/myaccounts.svg","alt","",4,"ngIf"],["src","assets/images/pos-panel/sidebar/shipping.svg","alt","",4,"ngIf"],[1,"according-menu"],["src","assets/images/pos-panel/sidebar/transactions.svg","alt",""],["src","assets/images/pos-panel/sidebar/settlement.svg","alt",""],["src","assets/images/pos-panel/sidebar/balance-statement.svg","alt",""],["src","assets/images/pos-panel/sidebar/invoice.svg","alt",""],["src","assets/images/pos-panel/sidebar/sdservices.svg","alt",""],["src","assets/images/pos-panel/sidebar/basicstore.svg","alt",""],["src","assets/images/pos-panel/sidebar/subscription.svg","alt",""],["src","assets/images/pos-panel/sidebar/terminal.svg","alt",""],["src","assets/images/pos-panel/sidebar/devices.svg","alt",""],["src","assets/images/pos-panel/sidebar/reports.svg","alt",""],["src","assets/images/pos-panel/sidebar/settings.svg","alt",""],["src","assets/images/pos-panel/sidebar/sadadvas.svg","alt",""],["src","assets/images/pos-panel/sidebar/manage-users.svg","alt",""],["src","assets/images/pos-panel/sidebar/manage-merchants.svg","alt",""],["src","assets/images/pos-panel/sidebar/batch-summary.svg","alt",""],["src","assets/images/pos-panel/sidebar/myaccounts.svg","alt",""],["src","assets/images/pos-panel/sidebar/shipping.svg","alt",""],["routerLinkActive","active",1,"sidebar-link","sidebar-title","sidebar-item",3,"routerLink","queryParams","ngClass","click"],["src","assets/images/pos-panel/sidebar/menu-loader-icon.svg","alt","home",3,"ngClass","src","load"],["src","assets/images/pos-panel/sidebar/menu-loader-icon.svg","alt","transactions",3,"ngClass","src","load"],["src","assets/images/pos-panel/sidebar/menu-loader-icon.svg","alt","settlement",3,"ngClass","src","load"],["src","assets/images/pos-panel/sidebar/menu-loader-icon.svg","alt","balance-statement",3,"ngClass","src","load"],["src","assets/images/pos-panel/sidebar/menu-loader-icon.svg","alt","invoice",3,"ngClass","src","load"],["src","assets/images/pos-panel/sidebar/menu-loader-icon.svg","alt","sdservices",3,"ngClass","src","load"],["src","assets/images/pos-panel/sidebar/menu-loader-icon.svg","alt","basicstore",3,"ngClass","src","load"],["src","assets/images/pos-panel/sidebar/menu-loader-icon.svg","alt","subscription",3,"ngClass","src","load"],["src","assets/images/pos-panel/sidebar/menu-loader-icon.svg","alt","mawaid",3,"ngClass","src","load"],["src","assets/images/pos-panel/sidebar/menu-loader-icon.svg","alt","terminal",3,"ngClass","src","load"],["src","assets/images/pos-panel/sidebar/menu-loader-icon.svg","alt","devices",3,"ngClass","src","load"],["src","assets/images/pos-panel/sidebar/menu-loader-icon.svg","alt","reports",3,"ngClass","src","load"],["src","assets/images/pos-panel/sidebar/menu-loader-icon.svg","alt","settings",3,"ngClass","src","load"],["src","assets/images/pos-panel/sidebar/menu-loader-icon.svg","alt","sadadvas",3,"ngClass","src","load"],["src","assets/images/pos-panel/sidebar/menu-loader-icon.svg","alt","manage-users",3,"ngClass","src","load"],["src","assets/images/pos-panel/sidebar/menu-loader-icon.svg","alt","manage-merchants",3,"ngClass","src","load"],["src","assets/images/pos-panel/sidebar/menu-loader-icon.svg","alt","batch-summary",3,"ngClass","src","load"],["src","assets/images/pos-panel/sidebar/menu-loader-icon.svg","alt","myaccounts",3,"ngClass","src","load"],["src","assets/images/pos-panel/sidebar/menu-loader-icon.svg","alt","shipping",3,"ngClass","src","load"],["class","new-badge badge badge-primary",3,"click",4,"ngIf"],["class","shipping-pending-count","tooltipClass","mycustom-tooltip","container","body",3,"ngbTooltip","placement",4,"ngIf"],["shippingTooltip",""],[1,"new-badge","badge","badge-primary",3,"click"],["tooltipClass","mycustom-tooltip","container","body",1,"shipping-pending-count",3,"ngbTooltip","placement"],[1,"tooltip-title"],[1,"tooltip-desc"],[1,"sidebar-link","sidebar-title",3,"href","ngClass"],["target","_blank",1,"sidebar-link","sidebar-title",3,"href","ngClass"],[1,"sidebar-submenu",3,"ngClass"],[3,"ngClass",4,"ngFor","ngForOf"],["class","submenu-title","href","javascript:void(0)",3,"click",4,"ngIf"],["class","submenu-title","routerLinkActive","active",3,"routerLink","routerLinkActiveOptions",4,"ngIf"],["class","submenu-title","routerLinkActive","active",3,"href","routerLinkActiveOptions",4,"ngIf"],["class","submenu-title","target","_blank",3,"href",4,"ngIf"],["class","nav-sub-childmenu submenu-content",3,"ngClass","display",4,"ngIf"],["href","javascript:void(0)",1,"submenu-title",3,"click"],["routerLinkActive","active",1,"submenu-title",3,"routerLink","routerLinkActiveOptions"],["class","fa fa-angle-down pull-right",4,"ngIf"],[1,"fa","fa-angle-down","pull-right"],["routerLinkActive","active",1,"submenu-title",3,"href","routerLinkActiveOptions"],["target","_blank",1,"submenu-title",3,"href"],[1,"nav-sub-childmenu","submenu-content",3,"ngClass"],["routerLinkActive","active",3,"routerLink","routerLinkActiveOptions",4,"ngIf"],["routerLinkActive","active",3,"href","routerLinkActiveOptions",4,"ngIf"],["target","_blank",3,"href",4,"ngIf"],["routerLinkActive","active",3,"routerLink","routerLinkActiveOptions"],["routerLinkActive","active",3,"href","routerLinkActiveOptions"],["target","_blank",3,"href"]],template:function(e,t){1&e&&(a.TgZ(0,"div",0),a.TgZ(1,"a",1),a._UZ(2,"img",2),a.qZA(),a.TgZ(3,"div",3),a.NdJ("click",function(){return t.sidebarToggle()}),a._UZ(4,"i",4),a.qZA(),a.TgZ(5,"div",5),a.TgZ(6,"a",6),a.NdJ("click",function(){return t.sidebarToggle()}),a._UZ(7,"i",7),a.qZA(),a.qZA(),a.qZA(),a.TgZ(8,"div",8),a.TgZ(9,"a",9),a._UZ(10,"img",2),a.qZA(),a.qZA(),a.TgZ(11,"nav",10),a.TgZ(12,"div",11),a.NdJ("click",function(){return t.scrollToLeft()}),a._UZ(13,"app-feather-icons",12),a.qZA(),a.TgZ(14,"div",13),a.TgZ(15,"ul",14),a.TgZ(16,"li",15),a.TgZ(17,"a",16),a._UZ(18,"img",17),a.qZA(),a.TgZ(19,"div",18),a.NdJ("click",function(){return t.sidebarToggle()}),a.TgZ(20,"span"),a._uU(21,"Back"),a.qZA(),a._UZ(22,"i",19),a.qZA(),a.qZA(),a.YNc(23,hn,8,12,"li",20),a.qZA(),a.qZA(),a.TgZ(24,"div",21),a.NdJ("click",function(){return t.scrollToRight()}),a._UZ(25,"app-feather-icons",12),a.qZA(),a.TgZ(26,"div",22),a.TgZ(27,"a",23),a.NdJ("click",function(){return t.sidebarToggle()}),a._UZ(28,"i",7),a.qZA(),a.qZA(),a.qZA()),2&e&&(a.xp6(12),a.ekj("d-none",t.leftArrowNone),a.xp6(1),a.Q6J("icon","arrow-left"),a.xp6(1),a.Q6J("ngStyle",a.VKq(8,gn,t.margin+"px")),a.xp6(9),a.Q6J("ngForOf",t.menuItems),a.xp6(1),a.ekj("d-none",t.rightArrowNone),a.xp6(1),a.Q6J("icon","arrow-right"))},directives:[o.yS,ge.A,x.PC,x.sg,x.mk,x.O5,o.Od,_._L],pipes:[u.X$],styles:[".sidebar-logo{height:92px;width:92px;border:3px solid #fff;border-radius:50%;display:flex;justify-content:center;align-items:center;margin:0 auto}.sidebar-logo img{height:50px}.sidebar-logo-close{height:62px;width:62px;border:3px solid #fff;border-radius:50%;display:flex;justify-content:center;align-items:center;margin:0 auto}.sidebar-logo-close img{height:30px}.open-side-btn{height:120px;width:20px;background:transparent linear-gradient(180deg,#fff,#d9dfeb) 0 0;border-radius:32px 0 0 32px;color:#600337;display:flex;justify-content:center;align-items:center;top:50%;transform:translateY(-50%);position:relative}.open-side-btn:hover{color:#600337}.close-side-btn{background-color:#7e0e45;height:120px;width:20px;border-radius:0 32px 32px 0;color:#600337;display:none;justify-content:center;align-items:center;top:50%;transform:translateY(-50%);position:relative}.close-side-btn i{color:#fff;transform:rotate(180deg)}.page-wrapper.compact-wrapper .page-body-wrapper div.sidebar-wrapper.close_icon .close-side-btn{display:flex}.sidebar-list .active span{font-weight:600}.shipping-menu{display:inline-flex;align-items:center;grid-gap:8px;gap:8px}.shipping-pending-count{display:inline-flex;align-items:center;justify-content:center;min-width:22px;height:22px;padding:0 6px;border-radius:50px;background-color:#ffc828;color:#8e1b3e;font-family:Open Sans,sans-serif;font-size:11px;font-weight:700;line-height:1;flex-shrink:0;cursor:default;direction:ltr;unicode-bidi:-webkit-isolate;unicode-bidi:-moz-isolate;unicode-bidi:isolate}.tooltip-title{font-weight:600}.tooltip-desc,.tooltip-title{font-family:Open Sans,sans-serif;font-style:normal;font-size:12px;line-height:18px;letter-spacing:-.01em;color:#324c6a}.tooltip-desc{font-weight:400}.new-badge.badge.badge-primary{background-color:#fff!important;color:#7e0e45;
1top:50%!important;right:-40px!important;left:auto;transform:translateY(-50%)}.page-wrapper.compact-wrapper .page-body-wrapper div.sidebar-wrapper.close_icon:hover .badge.new-badge{opacity:0;display:none}html[dir=rtl] .page-wrapper.compact-wrapper .page-body-wrapper .sidebar-wrapper .sidebar-main .sidebar-links>li .badge.new-badge{right:auto!important;left:0!important}"],encapsulation:2}),e}(),fn=function(){var e=function(){function e(t,n,i){var r=this;s(this,e),this.route=t,this.navServices=n,this.layout=i,this.route.queryParams.subscribe(function(e){r.layout.config.settings.layout=e.layout?e.layout:r.layout.config.settings.layout})}return l(e,[{key:"ngAfterViewInit",value:function(){setTimeout(function(){de.replace()})}},{key:"getRouterOutletState",value:function(e){return e.isActivated?e.activatedRoute:""}},{key:"layoutClass",get:function(){switch(this.layout.config.settings.layout){case"Dubai":return"compact-wrapper";case"London":return"only-body";case"Seoul":return"compact-wrapper modern-type";case"LosAngeles":return this.navServices.horizontal?"horizontal-wrapper material-type":"compact-wrapper material-type";case"Paris":return"compact-wrapper dark-sidebar";case"Tokyo":return"compact-sidebar";case"Madrid":return"compact-wrapper color-sidebar";case"Moscow":return"compact-sidebar compact-small";case"NewYork":return"compact-wrapper box-layout";case"Singapore":return this.navServices.horizontal?"horizontal-wrapper enterprice-type":"compact-wrapper enterprice-type";case"Rome":return"compact-sidebar compact-small material-icon";case"Barcelona":return this.navServices.horizontal?"horizontal-wrapper enterprice-type advance-layout":"compact-wrapper enterprice-type advance-layout"}}},{key:"ngOnInit",value:function(){}}]),e}();return e.\u0275fac=function(t){return new(t||e)(a.Y36(o.gz),a.Y36(he.t),a.Y36(k.P))},e.\u0275cmp=a.Xpm({type:e,selectors:[["app-content"]],decls:11,vars:8,consts:[[3,"ngClass"],["id","canvas-bookmark",1,"page-wrapper",3,"ngClass"],[1,"normal-res-view"],[1,"page-body-wrapper"],[1,"sidebar-wrapper"],[1,"page-body","p-0"],["o","outlet"],[1,"bg-overlay1"]],template:function(e,t){if(1&e&&(a.TgZ(0,"div",0),a.TgZ(1,"div",1),a._UZ(2,"app-header",2),a.TgZ(3,"div",3),a.TgZ(4,"div",4),a._UZ(5,"app-sidebar"),a.qZA(),a.TgZ(6,"div",5),a.TgZ(7,"main"),a._UZ(8,"router-outlet",null,6),a.qZA(),a.qZA(),a.qZA(),a.qZA(),a.qZA(),a._UZ(10,"div",7)),2&e){var n=a.MAs(9);a.Tol(t.layout.config.settings.layout_version),a.Q6J("ngClass",t.layout.config.settings.layout_type),a.xp6(1),a.Q6J("ngClass",t.layoutClass),a.xp6(3),a.ekj("close_icon",t.navServices.collapseSidebar),a.uIk("sidebar-layout",t.layout.config.settings.sidebar_type),a.xp6(3),a.Q6J("@fadeInAnimation",t.getRouterOutletState(n))}},directives:[x.mk,dt,mn,o.lC],styles:[""],data:{animation:[ve]}}),e}(),_n=i(28627),yn=i(15119);function Sn(e,t){if(1&e){var n=a.EpF();a.TgZ(0,"button",22),a.NdJ("click",function(){return a.CHM(n),a.oxw().markAllAsRead()}),a._uU(1),a.ALo(2,"translate"),a.qZA()}2&e&&(a.xp6(1),a.hij(" ",a.lcZ(2,1,"MARK_ALL_AS_READ")," "))}function bn(e,t){if(1&e){var n=a.EpF();a.TgZ(0,"button",28),a.NdJ("click",function(){a.CHM(n);var e=a.oxw().$implicit;return a.oxw().onReportKafkaDownload(e)}),a._uU(1),a.ALo(2,"translate"),a.qZA()}2&e&&(a.xp6(1),a.hij(" ",a.lcZ(2,1,"Download Report")," "))}function wn(e,t){if(1&e){var n=a.EpF();a.TgZ(0,"div",29),a.TgZ(1,"button",28),a.NdJ("click",function(){a.CHM(n);var e=a.oxw().$implicit;return a.oxw().onReqDeliveryNotifDownload(e)}),a._uU(2),a.ALo(3,"translate"),a.qZA(),a.TgZ(4,"button",28),a.NdJ("click",function(){a.CHM(n);var e=a.oxw().$implicit;return a.oxw().onReqDeliveryNotifView(e)}),a._uU(5),a.ALo(6,"translate"),a.qZA(),a.qZA()}2&e&&(a.xp6(2),a.hij(" ",a.lcZ(3,2,"DOWNLOAD_LABEL")," "),a.xp6(3),a.hij(" ",a.lcZ(6,4,"VIEW")," "))}function In(e,t){1&e&&a.GkF(0)}function Tn(e,t){1&e&&a.GkF(0)}function En(e,t){if(1&e){var n=a.EpF();a.TgZ(0,"div",29),a.TgZ(1,"button",30),a.NdJ("click",function(){a.CHM(n);var e=a.oxw().$implicit;return a.oxw().onReportKafkaDownload(e,"excel")}),a.TgZ(2,"span",31),a.YNc(3,In,1,0,"ng-container",32),a.qZA(),a._uU(4," Excel "),a.qZA(),a.TgZ(5,"button",33),a.NdJ("click",function(){a.CHM(n);var e=a.oxw().$implicit;return a.oxw().onReportKafkaDownload(e,"pdf")}),a.TgZ(6,"span",31),a.YNc(7,Tn,1,0,"ng-container",32),a.qZA(),a._uU(8," PDF "),a.qZA(),a.qZA()}if(2&e){a.oxw(2);var i=a.MAs(26),r=a.MAs(28);a.xp6(3),a.Q6J("ngTemplateOutlet",i),a.xp6(4),a.Q6J("ngTemplateOutlet",r)}}var kn=function(e){return{"unread-notif":e}};function An(e,t){if(1&e){var n=a.EpF();a.ynx(0),a.TgZ(1,"div",23),a.NdJ("click",function(){var e=a.CHM(n).$implicit;return a.oxw().markAsRead(e)}),a.TgZ(2,"div",24),a._uU(3),a.qZA(),a.YNc(4,bn,3,3,"button",25),a.YNc(5,wn,7,6,"div",26),a.YNc(6,En,9,2,"div",26),a.TgZ(7,"div",27),a._uU(8),a.ALo(9,"formatDate"),a.qZA(),a.qZA(),a.BQk()}
1if(2&e){var i=t.$implicit,r=a.oxw();a.xp6(1),a.Q6J("ngClass",a.VKq(8,kn,!(null!=i&&i.isread))),a.xp6(2),a.hij(" ",null==i||null==i.notification?null:i.notification.textmessage," "),a.xp6(1),a.Q6J("ngIf",101==(null==i||null==i.notification?null:i.notification.entity_id)&&(null==i?null:i.action_id)),a.xp6(1),a.Q6J("ngIf",r.isReqDeliveryPanelNotif(i)&&r.isReqDeliveryNotifDownloadable(i)),a.xp6(1),a.Q6J("ngIf",102==(null==i||null==i.notification?null:i.notification.entity_id)&&(null==i?null:i.action_id)),a.xp6(2),a.hij(" ",a.lcZ(9,6,null==i?null:i.created)," ")}}function Cn(e,t){1&e&&a.GkF(0)}function xn(e,t){if(1&e&&(a.ynx(0),a.TgZ(1,"div",34),a.TgZ(2,"div",35),a.TgZ(3,"div",36),a.TgZ(4,"span"),a.YNc(5,Cn,1,0,"ng-container",32),a.qZA(),a.qZA(),a.TgZ(6,"div",37),a._uU(7),a.ALo(8,"translate"),a.qZA(),a.qZA(),a.qZA(),a.BQk()),2&e){a.oxw();var n=a.MAs(24);a.xp6(5),a.Q6J("ngTemplateOutlet",n),a.xp6(2),a.Oqu(a.lcZ(8,2,"NO_NOTIF_FOUND"))}}function Pn(e,t){1&e&&(a.TgZ(0,"div",38),a._UZ(1,"app-sadad-loader"),a.qZA())}function On(e,t){1&e&&(a.O4$(),a.TgZ(0,"svg",39),a._UZ(1,"path",40),a._UZ(2,"path",41),a.qZA())}function Nn(e,t){1&e&&(a.O4$(),a.TgZ(0,"svg",42),a._UZ(1,"path",43),a.qZA())}function Un(e,t){1&e&&(a.O4$(),a.TgZ(0,"svg",42),a._UZ(1,"path",44),a.qZA())}var Ln=function(){var t=function(){function t(e,n,i,r,a,o,c,l){var u=this;s(this,t),this._notificationService=e,this._commonHelperService=n,this.spinnerSadad=i,this._reportService=r,this._balStatementService=a,this._shippingService=o,this.router=c,this.translate=l,this.limit=30,this.skip=0,this.showLoader=!1,this._distroyed$=new b.x,this.notiTypes=[{value:"-1",label:"All",code:"ALL"},{value:"1",label:"Invoices",code:"Invoices"},{value:"2",label:"Transactions",code:"Transactions"},{value:"6",label:"Settlements",code:"SETTLEMENTS"},{value:"8",label:"Reports",code:"Reports"},{value:"7",label:"Orders",code:"ORDERS"},{value:"4",label:"Bank Accounts",code:"BANK_ACCOUNTS"},{value:"5",label:"Business Updates",code:"BUSINESS_UPDATES"}],this.notiType="-1",this.getTranslate(),this.translate.onLangChange.pipe((0,y.R)(this._distroyed$)).subscribe(function(e){u.getTranslate()})}return l(t,[{key:"ngOnInit",value:function(){this.spinnerSadad.show(),this.getNotifications()}},{key:"getTranslate",value:function(){var e=this;this.translate.get(["Invoices","Transactions","SETTLEMENTS","Reports","ORDERS","BANK_ACCOUNTS","BUSINESS_UPDATES","ALL"]).pipe((0,y.R)(this._distroyed$)).subscribe(function(t){e.language_text=t,e.notiTypes=e._commonHelperService.getNgSelectItemsTrans(e.notiTypes,e.language_text)})}},{key:"getNotifications",value:function(){var t=this,n=arguments.length>0&&void 0!==arguments[0]&&arguments[0];n&&(this.spinnerSadad.show(),this.skip=0),this._notificationService.getNotifications(this.skip,this.limit,this.notiType).pipe((0,y.R)(this._distroyed$)).subscribe({next:function(i){var r,a;null!=i&&i.error?(t.spinnerSadad.hide(),t._commonHelperService.disTransErrMsg(null==i||null===(r=i.error)||void 0===r?void 0:r.message)):(t.notifications&&!n?Array.isArray(i)&&(a=t.notifications).push.apply(a,e(i)):t.notifications=Array.isArray(i)?i:[],t.spinnerSadad.hide()),t.showLoader=!1},error:function(e){t.spinnerSadad.hide(),t.showLoader=!1}})}},{key:"onNotiTypeChange",value:function(e){this.getNotifications(!0)}},{key:"onScrollDown",value:function(e){this.showLoader=!0,this.skip=this.skip+this.limit,this.getNotifications()}},{key:"markAsRead",value:function(e){var t=this;console.log("mark as read called!"),0==e.isread&&(e.isread=!0,this._notificationService.markSingleNotificationAsRead(null==e?void 0:e.id).pipe((0,y.R)(this._distroyed$)).subscribe(function(e){var n;(null==e?void 0:e.error)&&t._commonHelperService.disTransErrMsg(null==e||null===(n=e.error)||void 0===n?void 0:n.message)}))}},{key:"markAllAsRead",value:function(){var e=this;this.spinnerSadad.show(),this._notificationService.markAllNotificationAsRead().pipe((0,y.R)(this._distroyed$)).subscribe(function(t){var n;null!=t&&t.error?(e.spinnerSadad.hide(),e._commonHelperService.disTransErrMsg(null==t||null===(n=t.error)||void 0===n?void 0:n.message)):(e.ski
1p=0,e.notifications=[],e.getNotifications())})}},{key:"onReportKafkaDownload",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=this;return(0,h.Z)(regeneratorRuntime.mark(function i(){var r,a,o;return regeneratorRuntime.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:console.log("Notification component onReportKafkaDownload start :",e),102!=(null==e||null===(r=e.notification)||void 0===r?void 0:r.entity_id)?(n.spinnerSadad.show(),n._reportService.downloadKafkaReport(null==e?void 0:e.action_id).pipe((0,y.R)(n._distroyed$)).subscribe({next:(o=(0,h.Z)(regeneratorRuntime.mark(function t(i){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,n._reportService.getKafkaReportName(i,null==e?void 0:e.report_type);case 2:n.spinnerSadad.hide(),n._commonHelperService.logFirebaseEvent("RPT_KAFKA_DW_NOTIFICATION","AllNotificationComponent");case 4:case"end":return t.stop()}},t)})),function(e){return o.apply(this,arguments)}),error:(a=(0,h.Z)(regeneratorRuntime.mark(function e(t){var i,r,a;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.t1=JSON,e.next=3,t.error.text();case 3:if(e.t2=e.sent,e.t3=i=e.t1.parse.call(e.t1,e.t2),e.t0=null===e.t3,e.t0){e.next=8;break}e.t0=void 0===i;case 8:if(!e.t0){e.next=12;break}e.t4=void 0,e.next=13;break;case 12:e.t4=null===(r=i.error)||void 0===r?void 0:r.message;case 13:a=e.t4,n.spinnerSadad.hide(),n._commonHelperService.disTransErrMsg(a);case 15:case"end":return e.stop()}},e)})),function(e){return a.apply(this,arguments)})})):n.downloadStatementFromNotification(e,t);case 1:case"end":return i.stop()}},i)}))()}},{key:"downloadStatementFromNotification",value:function(e,t){var n=this;this.spinnerSadad.show(),this._balStatementService.downloadAndSaveStatement(null==e?void 0:e.action_id,t,e).pipe((0,y.R)(this._distroyed$)).subscribe({next:function(e){n.spinnerSadad.hide(),n._commonHelperService.logFirebaseEvent("BAL_STMT_DW_NOTIFICATION","AllNotificationComponent")},error:function(e){var t,i,r;n.spinnerSadad.hide(),n._commonHelperService.disTransErrMsg((null==e||null===(t=e.error)||void 0===t||null===(i=t.error)||void 0===i?void 0:i.message)||(null==e||null===(r=e.error)||void 0===r?void 0:r.message)||"Statement file is not ready to download.")}})}},{key:"isReqDeliveryPanelNotif",value:function(e){var t,n=((null==e?void 0:e.action_id)||"").toString().trim();return 14===Number(null==e||null===(t=e.notification)||void 0===t?void 0:t.notificationentityId)&&!!n}},{key:"isReqDeliveryNotifDownloadable",value:function(e){return((null==e?void 0:e.action_id)||"").toString().trim().toUpperCase().startsWith("SA")}},{key:"onReqDeliveryNotifDownload",value:function(e){var t=this,n=((null==e?void 0:e.action_id)||"").toString().trim();n&&(this.spinnerSadad.show(),this._shippingService.exportDeliveryLabel(n).pipe((0,y.R)(this._distroyed$)).subscribe({next:function(e){(0,ye.saveAs)(e,"Label-".concat(n,".pdf")),t.spinnerSadad.hide()},error:function(){t.spinnerSadad.hide()}}))}},{key:"onReqDeliveryNotifView",value:function(e){var t=((null==e?void 0:e.action_id)||"").toString().trim();t.toUpperCase().startsWith("SA")&&this.router.navigateByUrl((0,Se.o)("",{shipId:t||void 0}))}},{key:"ngOnDestroy",value:function(){this._distroyed$.next(null),this._distroyed$.complete()}}]),t}();return t.\u0275fac=function(e){return new(e||t)(a.Y36(T.gq),a.Y36(T.$P),a.Y36(E.t2),a.Y36(T.rM),a.Y36(T.yS),a.Y36(T.Nk),a.Y36(o.F0),a.Y36(u.sK))},t.\u0275cmp=a.Xpm({type:t,selectors:[["app-all-notifications"]],decls:29,vars:16,consts:[["bdColor","rgba(0, 0, 0, 0.8)","size","medium","color","#fff","type","ball-circus",3,"fullScreen"],[1,"top-header-tab","settlement-wrap","n-notification-main"],["_ngcontent-ngc-c306","",1,"sticky-header","close_taskbar"],["_ngcontent-ngc-c306",""],[1,"container-fluid","p-20","pt-0","pb-0"],[1,"tab-content","tab-pane","all-notif-mob-view"],[1,"col-12","mb-4","p-0"],[1,"card","pr-1","pt-1","pb-1"],[1,"d-flex","justify-content-between","align-items-center"],[1,"col-xl-2","col-lg-6","col-md-3","col-sm-12","mb-4"],[1,"c-filter-dropdown"],["bindLabel","label","bindValue","value",1,"js-example-placeholder-multiple",3,"items","searchable","placeholder","clearable","ngModel","ngModelChange","change"],[1,"col-xl-3","col-lg-6","col-md-4","col-sm-12","mb-4"],[1,"read-unrd-lbl"],["type","button","class","btn mark-all-btn",3,"click",4,"ngIf"],["infinite-scroll","",1,"card-body","all-notif-bg","custom-scrollbar",3,"scrollWindow","scrolled"],[4,"ngFor","ngForOf"],[4,"ngIf"],["class","notf-load",4,"ngIf"],["noNotificationIcon",""],["excelIcon",""],["pdfIcon",""],["type","button",1,"btn","mark-all-btn",3,"click"],[1,"unread-notif",3,"ngClass","click"],[1,"n
1otif-content"],["type","button","class","btn download-report-btn",3,"click",4,"ngIf"],["class","report-download-buttons",4,"ngIf"],["dir","ltr",1,"notif-tm"],["type","button",1,"btn","download-report-btn",3,"click"],[1,"report-download-buttons"],["type","button",1,"btn","excel-btn",3,"click"],[1,"icon"],[4,"ngTemplateOutlet"],["type","button",1,"btn","pdf-btn",3,"click"],[1,"no-record-notification"],[1,"text-center","no-record-found"],[1,"text-center"],[1,"no-record-txt"],[1,"notf-load"],["width","80","height","80","viewBox","0 0 80 80","fill","none","xmlns","http://www.w3.org/2000/svg"],["fill-rule","evenodd","clip-rule","evenodd","d","M63.0116 23.7158C65.007 27.2311 66.1937 30.9697 66.3844 34.951C66.5371 38.1344 66.3278 41.335 66.4762 44.5192C66.5852 46.845 66.8784 49.1852 67.3445 51.4656C67.7252 53.3263 68.8394 54.8139 70.515 55.8623C73.5838 57.782 74.5825 60.2389 73.682 63.3834C72.7843 66.5164 69.988 68.732 66.7551 68.7565C61.6357 68.7947 56.5164 68.7702 51.3977 68.7716C51.0041 68.7716 50.6112 68.7716 50.2527 68.7716C48.0859 74.3421 44.9562 76.7975 40.2082 76.7154C35.8704 76.6405 32.593 73.8935 30.822 68.7738C26.804 68.7738 22.7486 68.7551 18.6947 68.804C18.2875 68.8098 17.8128 69.1576 17.4923 69.473C15.2868 71.644 13.1172 73.8524 10.9289 76.0421C9.81472 77.1568 8.80805 77.295 7.93618 76.4756C7.05212 75.6454 7.15967 74.4709 8.26743 73.3584C28.8883 52.6422 49.512 31.9303 70.14 11.2205C71.2084 10.1476 72.3097 10.0468 73.1514 10.8929C73.9774 11.7239 73.8591 12.8414 72.7965 13.9092C69.5557 17.1675 66.3048 20.4172 63.0116 23.7158ZM60.4577 27.0166C47.8091 39.7063 35.1728 52.3837 22.6196 64.9798C22.5895 64.9769 22.8003 65.005 23.0125 65.005C37.4005 65.0071 51.7885 65.01 66.1772 64.9963C66.74 64.9956 67.338 64.9179 67.8593 64.7184C69.1506 64.2252 69.9264 63.2408 70.1651 61.8713C70.3759 60.6572 69.8002 59.8162 68.7906 59.2423C65.0694 57.1217 63.3967 53.6705 63.0661 49.6201C62.727 45.4797 62.7628 41.307 62.6954 37.1472C62.6367 33.5144 62.0164 30.03 60.4577 27.0166ZM34.9985 68.804C35.6496 71.3257 38.3426 73.1647 40.855 72.948C43.2361 72.7414 46.036 70.7561 45.9206 68.804C42.3155 68.804 38.7076 68.804 34.9985 68.804Z","fill","#7E0E45"],["fill-rule","evenodd","clip-rule","evenodd","d","M18.4323 40.9325C18 44.7013 18.0846 48.5414 17.4163 52.2678C16.88 55.2524 15.066 57.5473 12.4196 59.1473C10.5037 60.3058 10.313 62.0923 11.8065 63.8147C12.0948 64.1467 12.5995 64.4937 12.5988 64.8329C12.5988 65.5652 12.5673 66.6078 12.1177 66.9463C11.6029 67.3337 10.3862 67.4316 9.88068 67.0752C6.70079 64.8336 5.57654 59.076 9.51716 56.6285C13.4119 54.2105 14.3383 50.621 14.5211 46.5735C14.6681 43.3001 14.5749 40.0144 14.5734 36.7331C14.5698 25.395 21.415 15.749 32.1248 12.0997C33.1078 11.7649 33.4742 11.3746 33.5058 10.2787C33.6198 6.39106 36.0719 3.58785 39.6203 3.06725C42.8705 2.59056 46.1486 4.69171 47.1911 7.98744C47.4277 8.73487 47.5783 9.55718 47.5367 10.3327C47.4822 11.3537 47.9446 11.6821 48.8215 11.968C52.266 13.0927 55.3032 14.9425 57.9618 17.4145C59.1836 18.5501 59.3664 19.5848 58.5082 20.5C57.6471 21.4166 56.6468 21.3374 55.4043 20.1911C43.6441 9.34692 24.8982 14.6632 19.7014 28.8643C18.2667 32.7857 18.2559 36.8462 18.4323 40.9325C18.5449 40.9455 18.3197 40.9196 18.4323 40.9325ZM43.6341 10.6754C43.9216 9.11506 43.3315 8.02273 42.0868 7.27818C40.9116 6.5754 39.7185 6.67909 38.6344 7.47908C37.5661 8.26827 37.0936 9.32748 37.417 10.6747C39.4998 10.6754 41.5067 10.6754 43.6341 10.6754Z","fill","#7E0E45"],["width","13","height","13","viewBox","0 0 13 13","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M7.58333 1.08334V3.25C7.58333 3.53732 7.69747 3.81287 7.90063 4.01604C8.1038 4.2192 8.37935 4.33334 8.66667 4.33334H10.8333M4.33333 7.04167H5.41667M7.58333 7.04167H8.66667M4.33333 9.20834H5.41667M7.58333 9.20834H8.66667M8.125 1.08334H3.25C2.96268 1.08334 2.68713 1.19747 2.48397 1.40064C2.2808 1.6038 2.16667 1.87935 2.16667 2.16667V10.8333C2.16667 11.1207 2.2808 11.3962 2.48397 11.5994C2.68713 11.8025 2.96268 11.9167 3.25 11.9167H9.75C10.0373 11.9167 10.3129 11.8025 10.516 11.5994C10.7192 11.3962 10.8333 11.1207 10.8333 10.8333V3.79167L8.125 1.08334Z","stroke","#00A63E","stroke-width","1.08333","stroke-linecap","round","stroke-linejoin","round"],["d","M7.58333 1.08334V3.25C7.58333 3.53732 7.69747 3.81287 7.90064 4.01604C8.1038 4.2192 8.37935 4.33334 8.66667 4.33334H10.8333M5.41667 4.875H4.33333M8.66667 7.04167H4.33333M8.66667 9.20834H4.33333M8.125 1.08334H3.25C2.96268 1.08334 2.68713 1.19747 2.48397 1.40064C2.2808 1.6038 2.16667 1.87935 2.16667 2.16667V10.8333C2.16667 11.1207 2.2808 11.3962 2.48397 11.5994C2.68713 11.8025 2.96268 11.9167 3.25 11.9167H9.75C10.0373 11.9167 10.3129 11.8025 10.516 11.5994C10.7192 11.3962 10.8333 11.1207 10.8333 10.8333V3.79167L8.125 1.08334Z","stroke","#FB2C36","stroke-width","1.08333","stroke-linecap","round","stroke-linejoin","round"]],template:function(e,t){1&e&&(a.TgZ(0,"ngx-spinner",0),a._UZ(1,"app-sadad-loader"),a.qZA(),a.TgZ(2,"div",1),a.TgZ(3,"div",2),a.TgZ(4,"h5",3),a._uU(5),a.ALo(6,"translate"),a.qZA(),a.qZA(),a.TgZ(7,"div",4),a.TgZ(8,"div",5),a.TgZ(9,"div",6),a.TgZ(10,"div",7),a.TgZ(11,"div",8),a.TgZ(12,"div",9),a.TgZ(13,"div",10),a.TgZ(14,"ng-select",11),a.NdJ("ngModelChange",function(e){return t.notiType=e})("change",function(e){return t.onNotiTypeChange(e)}
1),a.ALo(15,"translate"),a.qZA(),a.qZA(),a.qZA(),a.TgZ(16,"div",12),a.TgZ(17,"div",13),a.YNc(18,Sn,3,3,"button",14),a.qZA(),a.qZA(),a.qZA(),a.TgZ(19,"div",15),a.NdJ("scrolled",function(e){return t.onScrollDown(e)}),a.YNc(20,An,10,10,"ng-container",16),a.YNc(21,xn,9,4,"ng-container",17),a.qZA(),a.YNc(22,Pn,2,0,"div",18),a.qZA(),a.qZA(),a.qZA(),a.qZA(),a.qZA(),a.YNc(23,On,3,0,"ng-template",null,19,a.W1O),a.YNc(25,Nn,2,0,"ng-template",null,20,a.W1O),a.YNc(27,Un,2,0,"ng-template",null,21,a.W1O)),2&e&&(a.Q6J("fullScreen",!0),a.xp6(5),a.hij(" ",a.lcZ(6,12,"NOTIFICATIONS")," "),a.xp6(9),a.s9C("placeholder",a.lcZ(15,14,"ALL")),a.Q6J("items",t.notiTypes)("searchable",!1)("clearable",!1)("ngModel",t.notiType),a.xp6(4),a.Q6J("ngIf",(null==t.notifications?null:t.notifications.length)>0),a.xp6(1),a.Q6J("scrollWindow",!1),a.xp6(1),a.Q6J("ngForOf",t.notifications),a.xp6(1),a.Q6J("ngIf",t.notifications&&0==(null==t.notifications?null:t.notifications.length)),a.xp6(1),a.Q6J("ngIf",t.showLoader))},directives:[E.Ro,C.T,fe.w9,g.JJ,g.On,F.mh,x.O5,yn.R,x.sg,x.mk,x.tP],pipes:[u.X$,we.r2],styles:[".page-wrapper[_ngcontent-%COMP%] .page-header[_ngcontent-%COMP%] .header-wrapper[_ngcontent-%COMP%] .nav-right[_ngcontent-%COMP%] .notification-dropdown[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{padding:8px 16px!important}.all-notif-bg[_ngcontent-%COMP%] .download-report-btn[_ngcontent-%COMP%]{height:36px;border:1px solid #8e1b3e!important;border-radius:10px!important;font-family:Open Sans,sans-serif;font-style:normal;font-weight:400;font-size:12px;line-height:20px;letter-spacing:-.005em;color:#8e1b3e;display:flex;margin-top:0;align-items:center;justify-content:center;flex:none} html[dir=rtl] .notif-content{text-align:right!important}.no-record-notification[_ngcontent-%COMP%]:hover{background-color:transparent}.no-record-notification[_ngcontent-%COMP%] .no-record-found[_ngcontent-%COMP%]{display:flex;flex-direction:column;position:absolute;left:50%;transform:translate(-50%,-50%);top:50%;margin-top:0}.read-unrd-lbl[_ngcontent-%COMP%]{right:16px}.read-unrd-lbl[_ngcontent-%COMP%] .mark-all-btn[_ngcontent-%COMP%]{font-size:13px;color:#fff;font-weight:600;background-color:#7e0e45;padding:12px 30px;border-radius:24px;cursor:pointer;margin-top:10px!important}.report-download-buttons[_ngcontent-%COMP%]{display:flex;align-items:center;grid-gap:10px;gap:10px}.report-download-buttons[_ngcontent-%COMP%] .excel-btn[_ngcontent-%COMP%], .report-download-buttons[_ngcontent-%COMP%] .pdf-btn[_ngcontent-%COMP%]{padding:8px 16px!important;height:36px;border:1px solid #4a5565!important;border-radius:10px!important;font-family:Open Sans,sans-serif;font-style:normal;font-weight:400;font-size:12px;line-height:20px;letter-spacing:-.005em;color:#4a5565;width:-webkit-max-content!important;width:-moz-max-content!important;width:max-content!important;display:flex;align-items:center;margin-top:15px;grid-gap:5px;gap:5px}.report-download-buttons[_ngcontent-%COMP%] .excel-btn[_ngcontent-%COMP%] span[_ngcontent-%COMP%], .report-download-buttons[_ngcontent-%COMP%] .pdf-btn[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:inline-flex}"]}),t}(),Rn=i(14324),Mn=i(49234),Dn=i(90066),Zn=["AgmMap"];function qn(e,t){1&e&&(a.TgZ(0,"strong"),a._uU(1),a.ALo(2,"translate"),a.qZA()),2&e&&(a.xp6(1),a.Oqu(a.lcZ(2,1,"ONLINE")))}function Vn(e,t){1&e&&(a.TgZ(0,"strong"),a._uU(1),a.ALo(2,"translate"),a.qZA()),2&e&&(a.xp6(1),a.Oqu(a.lcZ(2,1,"OFFLINE")))}var Fn=function(){return{width:60,height:70}},Yn=function(e,t){return{url:e,scaledSize:t}};function jn(e,t){if(1&e){var n=a.EpF();a.TgZ(0,"agm-marker",13),a.NdJ("markerClick",function(){a.CHM(n);var e=a.MAs(2);return a.oxw().clickedMarker(e)}),a.TgZ(1,"agm-info-window",null,14),a.TgZ(3,"strong"),a._uU(4),a.qZA(),a._UZ(5,"br"),a.YNc(6,qn,3,3,"strong",15),a.YNc(7,Vn,3,3,"strong",15),a.qZA(),a.qZA()}if(2&e){var i=t.$implicit;a.Q6J("latitude",i.latitude)("longitude",i.longitude)("iconUrl",a.WLB(10,Yn,i.markerIcon,a.DdM(9,Fn)))("agmFitBounds",!0)("draggable",!1)("agmFitBounds",!0),a.xp6(4),a.Oqu(i.name),a.xp6(2),a.Q6J("ngIf",i.is_online),a.xp6(1),a.Q6J("ngIf",!i.is_online)}}var Hn,Jn=[{path:"dashboard/online-payment-default",loadChildren:function(){return Promise.all([i.e("default-src_app_components_bonus-ui_base_base_module_ts-src_app_components_bonus-ui_base_date-9da172"),i.e("default-node_modules_ng-apexcharts___ivy_ngcc___fesm2015_ng-apexcharts_js-node_modules_ng2-ch-5742f9"),i.e("src_app_components_opdashboard_opdashboard_module_ts")]).then(i.bind(i,88364)).then(function(e){return e.OpdashboardModule})},canActivate:[_n.n],data:{preload:!0},resolve:{dataList:T.Nc}},{path:"dashboard/pos-default",loadChildren:function(){return Promise.all([i.e("default-src_app_components_bonus-ui_base_base_module_ts-src_app_components_bonus-ui_base_date-9da172"),i.e("default-node_modules_ng-apexcharts___ivy_ngcc___fesm2015_ng-apexcharts_js-node_modules_ng2-ch-5742f9"),i.e("src_app_components_posdashboard_posdashboard_module_ts")]).then(i.bind(i,73443)).then(function(e){return e.PosdashboardModule})},canActivate:[_n.n],data:{preload:!0}},{path:"merchantpanel/settlement",loadChildren:function(){return Promise.all([i.e("default-src_app_components_bonus-ui_base_base_module_ts-src_app_components_bonus-ui_base_date-9da172"),i.e("src_app_components_settlement_settlement_module_ts")]).then(i.bind(i,14438)).then(function(e){return e.SettlementModule})},canActivate:[_n.n],data:{preload:!0,delay:2e3}},{path:"merchantpanel/invoice",loadChildren:function(){return Promise.all([i.e("default-src_app_components_bonus-ui_base_base_module_ts-src_app_components_bonus-ui_base_date-9da172"),i.e("default-src_app__directives_input-no-leading-space_ts-src_app__directives_one-decimal-only_di-15f3ba"),i.e("src_app_components_invoice_invoice_module_ts")]).then(i.bind(i,34482)).then(function(e){return e.InvoiceModule})},canActivate:[_n.n],data:{preload:!0,delay:2e3}},{path:"merchantpanel/sadad-services",loadChildren:function(){return Promise.all([i.e("default-src_app_components_bonus-ui_base_base_module_ts-src_app_components_bonus-ui_base_date-9da172"),i.e("src_app_components_sadadservices_sadadservices_module_ts")]).then(i.bind(i,39168)).then(function(e){return e.SadadservicesModule})},canActivate:[_n.n]},{path:"merchantpanel/online-payment-transactions",loadChildren:function(){return Promise.all([i.e("default-src_app_components_bonus-ui_base_base_module_ts-src_app_components_bonus-ui_base_date-9da172"),i.e("default-node_modules_angular_material___ivy_ngcc___fesm2015_slide-toggle_js"),i.e("common"),i.e("src_app_components_optransactions_optransactions_module_ts")]).then(i.bind(i,11055)).then(function(e){return e.OPtransactionsModule})},canActivate:[_n.n],data:{preload:!0,delay:3e3}},{path:"merchantpanel/pos-transactions",loadChildren:function(){return Promise.all([i.e("default-src_app_components_bonus-ui_base_base_module_ts-src_app_components_bonus-ui_base_date-9da172"),i.e("common"),i.e("src_app_components_postransactions_postransactions_module_ts")]).then(i.bind(i,15385)).then(function(e){return e.POStransactionsModule})},canActivate:[_n.n],data:{preload:!0,delay:3e3}},{path:"merchantpanel/pos-batch-summary",loadChildren:function(){return Promise.all([i.e("default-src_app_components_bonus-ui_base_base_module_ts-src_app_components_bonus-ui_base_date-9da172"),i.e("src_app_components_batchsummary_batchsummary_module_ts")]).then(i.bind(i,69968)).then(function(e){return e.BatchsummaryMo
1dule})},canActivate:[_n.n],data:{preload:!0,delay:3e3}},{path:"merchantpanel/balance-statement",loadChildren:function(){return Promise.all([i.e("common"),i.e("src_app_components_balancestatement_balancestatement_module_ts")]).then(i.bind(i,22811)).then(function(e){return e.BalancestatementModule})},canActivate:[_n.n],data:{preload:!0,delay:3e3}},{path:"merchantpanel/online-payment-settings",loadChildren:function(){return Promise.all([i.e("default-node_modules_angular_material___ivy_ngcc___fesm2015_slide-toggle_js"),i.e("src_app_components_opsettings_opsettings_module_ts")]).then(i.bind(i,4288)).then(function(e){return e.OPsettingsModule})},canActivate:[_n.n],data:{preload:!0,delay:3e3},resolve:{dataList:T.Nc}},{path:"merchantpanel/basicstore",loadChildren:function(){return Promise.all([i.e("default-src_app_components_bonus-ui_base_base_module_ts-src_app_components_bonus-ui_base_date-9da172"),i.e("src_app_components_basicstore_basicstore_module_ts")]).then(i.bind(i,88718)).then(function(e){return e.BasicstoreModule})},canActivate:[_n.n],data:{preload:!0,delay:3e3}},{path:"merchantpanel/online-payment-reports",loadChildren:function(){return Promise.all([i.e("default-src_app_components_bonus-ui_base_base_module_ts-src_app_components_bonus-ui_base_date-9da172"),i.e("default-src_app_components_opreports_opreports_module_ts")]).then(i.bind(i,89203)).then(function(e){return e.OPReportsModule})},canActivate:[_n.n],data:{preload:!0,delay:3e3}},{path:"merchantpanel/myaccounts",loadChildren:function(){return Promise.all([i.e("default-node_modules_angular-file___ivy_ngcc___fesm2015_angular-file_js-src_app__directives_i-154fd4"),i.e("src_app_components_myaccount_myaccount_module_ts")]).then(i.bind(i,34599)).then(function(e){return e.MyAccountModule})},canActivate:[_n.n],data:{preload:!0,delay:4e3}},{path:"merchantpanel/pos-settings",loadChildren:function(){return Promise.all([i.e("default-node_modules_angular_material___ivy_ngcc___fesm2015_slide-toggle_js"),i.e("src_app_components_possettings_possettings_module_ts")]).then(i.bind(i,79326)).then(function(e){return e.POSsettingsModule})},canActivate:[_n.n],data:{preload:!0,delay:3e3}},{path:"merchantpanel/pos-reports",loadChildren:function(){return Promise.all([i.e("default-src_app_components_bonus-ui_base_base_module_ts-src_app_components_bonus-ui_base_date-9da172"),i.e("default-src_app_components_opreports_opreports_module_ts"),i.e("common"),i.e("src_app_components_posreports_posreports_module_ts")]).then(i.bind(i,72122)).then(function(e){return e.POSreportsModule})},canActivate:[_n.n],data:{preload:!0,delay:3e3}},{path:"merchantpanel/pos-terminals",loadChildren:function(){return Promise.all([i.e("default-src_app_components_bonus-ui_base_base_module_ts-src_app_components_bonus-ui_base_date-9da172"),i.e("src_app_components_terminal_terminal_module_ts")]).then(i.bind(i,96926)).then(function(e){return e.TerminalModule})},canActivate:[_n.n],data:{preload:!0,delay:2e3}},{path:"merchantpanel/sadadvas",loadChildren:function(){return i.e("src_app_components_sadadvas_sadadvas_module_ts").then(i.bind(i,97230)).then(function(e){return e.SadadvasModule})},canActivate:[_n.n]},{path:"merchantpanel/manage-users",loadChildren:function(){return Promise.all([i.e("default-src_app_components_bonus-ui_base_base_module_ts-src_app_components_bonus-ui_base_date-9da172"),i.e("default-node_modules_angular_material___ivy_ngcc___fesm2015_slide-toggle_js"),i.e("src_app_components_manageusers_manageusers_module_ts")]).then(i.bind(i,4235)).then(function(e){return e.ManageusersModule})},canActivate:[_n.n],data:{preload:!0,delay:3e3}},{path:"merchantpanel/manage-merchants",loadChildren:function(){return Promise.all([i.e("default-node_modules_angular-file___ivy_ngcc___fesm2015_angular-file_js-src_app__directives_i-154fd4"),i.e("src_app_components_managemerchants_managemerchants_module_ts")]).then(i.bind(i,94699)).then(function(e){return e.ManagemerchantsModule})},canActivate:[_n.n],data:{preload:!0,delay:3e3}},{path:"merchantpanel/notifications",component:Ln,data:{preload:!0}},{path:"merchantpanel/pos-terminal-maps",component:(Hn=function(){function e(t,n,i){var r=this;s(this,e),this._dashboard=t,this.spinnerSadad=n,this._commonHelperService=i,this._distroyed$=new b.x,this.lat_m2=25.2842534,this.lng_m2=51.3719078,this.zoom_m2=10,this.previous_info_window=null,this.infoWindowOpened=null,this.markers=[],this.refreshInterval$=(0,Mn.H)(0,12e4).pipe((0,y.R)(this._distroyed$),(0,Rn.w)(function(){return r.getTerminalLocations()})),this._commonHelperService.logFirebaseEvent("POS_TerminalsMap","TerminalMapComponent")}return l(e,[{key:"ngOnInit",value:function(){this.spinnerSadad.show(),this.getTerminalLocations(),this.refreshInterval$.pipe((0,y.R)(this._distroyed$)).subscribe()}},{key:"ngAfterViewInit",value:function(){}},{key:"setZoom",value:function(){setTimeout(function(){},500)}},{key:"getTerminalLocations",value:function(){var e=this;return this._dashboard.getPOSTerminalLocations().pipe((0,y.R)(this._distroyed$)).subscribe(function(t){var n;if(t.error)e._commonHelperService.disTransErrMsg(null==t||null===(n=t.error)||void 0===n?void 0:n.message),e.spinnerSadad.hide();else if(t.length){var i=0,r=0;t.map(function(t){t.latitude&&t.longitude&&(t.markerIcon=t.is_online?"assets/images/google-map/terminal-marker-active.svg":"assets/images/google-map/terminal-marker-inactive.svg",e.markers.push(t),i+=t.latitude,r+=t.longitude)}),e.lat_m2=i/t.length,e.lng_m2=r/t.length,e.setZoom()}e.spinnerSadad.hide(),e.markers.length||e._commonHelperService.disTransErrMsg("No Terminals found!")}),""}},{key:"clickedMarker",value:function(e){null==this.previous_info_window?this.previous_info_window=e:(this.infoWindowOpened=e,this.previous_info_window.close()),this.previous_info_window=e}},{key:"mapClicked",value:function(e){null!=this.previous_info_window&&this.previous_info_window.close()}},{key:"ngOnDestroy",value:function(){this._distroyed$.next(null),this._distroyed$.complete()}}]),e}(),Hn.\u0275fac=function(e){return new(e||Hn)(a.Y36(T.sp),a.Y36(E.t2),a.Y36(T.$P))},Hn.\u0275cmp=a.Xpm({type:Hn,selectors:[["app-terminal-map"]],viewQuery:function(e,t){var n;1&e&&a.Gf(Zn,5),2&e&&a.iGM(n=a.CRH())&&(t.agmMap=n.first)},decls:17,vars:12,consts:[["bdColor","rgba(0, 0, 0, 0.8)","size","medium","color","#fff","type","ball-circus",3,"fullScreen"],[1,"top-header-tab","settlement-wrap","trml-loc-box"],[1,"sticky-header","close_taskbar"],[1,"tab-content","cust-map-padng"],[1,"container-fluid","p-20"],[1,"col-12","p-0","mb-4"],[1,"card","h-100"],[1,"card-body","cust-map-frm-bg"],[1,"custom-map"],[1,"map-js-height"],[3,"longitude","latitude","fitBounds","disableDefaultUI","zoomControl","zoom","maxZoom","mapClick"],["AgmMap",""],[3,"latitude","longitude","iconUrl","label","agmFitBounds","draggable","markerClick",4,"ngFor","ngForOf"],[3,"latitude","longitude","iconUrl","label","agmFitBounds","draggable","markerClick"],["infoWindow",""],[4,"ngIf"]],template:function(e,t){1&e&&(a.TgZ(0,"ngx-spinner",0),a._UZ(1,"app-sadad-loader"),a.qZA(),a.TgZ(2,"div",1),a.TgZ(3,"div",2),a.TgZ(4,"h5"),a._uU(5),a.ALo(6,"translate"),a.qZA(),a.qZA(),a.TgZ(7,"div",3),a.TgZ(8,"div",4),a.TgZ(9,"div",5),a.TgZ(10,"div",6),a.TgZ(11,"div",7),a.TgZ(12,"div",8),a.TgZ(13,"div",9),a.TgZ(14,"agm-map",10,11),a.NdJ("mapClick",function(e){return t.mapClicked(e)}),a.YNc(16,jn,8,13,"agm-marker",12),a.qZA(),a.qZA(),a.qZA(),a.qZA(),a.qZA(),a.qZA(),a.qZA(),a.qZA(),a.qZA()),2&e&&(a.Q6J("fullScreen",!0),a.xp6(5),a.Oqu(a.lcZ(6,10,"Live Terminals locations in Qatar")),a.xp6(9),a.Q6J("longitude",t.lng_m2)("latitude",t.lat_m2)("fitBounds",t.markers.length>1)("disableDefaultUI",!1)("zoomControl",!0)("zoom",t.zoom_m2)("maxZoom",18),a.xp6(2),a.Q6J("ngForOf",t.markers))},directives:[E.Ro,C.T,Dn.SA,x.sg,Dn.pt,Dn.NC,Dn.d,x.O5],pipes:[u.X$],styles:[""]}),Hn),canActivate:[_n.n],data:{preload:!0}},{path:"merchantpanel/shipping",loadChildren:function(){return Promise.all([i.e("default-src_app_components_bonus-ui_base_base_module_ts-src_app_components_bonus-ui_base_date-9da172"),i.e("default-src_app__directives_input-no-leading-space_ts-src_app__directives_one-decimal-only_di-15f3ba"),i.e("common"),i.e("src_app_components_shipping_shipping_module_ts")]).then(i.bind(i,88712)).then(function(e){return e.ShippingModule})},canActivate:[_n.n],data:{preload:!0,delay:3e3}}],Bn=i(52105);function Wn(e,t){if(1&e&&(a.TgZ(0,"p",4),a._uU(1),a.qZA()),2&e){var n=a.oxw();a.xp6(1),a.Oqu(n.msg)}
1}var Gn=function(){var e=function(){function e(){s(this,e),this.passwordStrength=new a.vpe,this.msg="",this.colors=["darkred","orangered","orange","yellowgreen"]}return l(e,[{key:"ngOnChanges",value:function(t){var n=t.passwordToVerify.currentValue;if(this.setBarColors(4,"#DDD"),n){var i=this.getColor(e.checkStrength(n));this.setBarColors(i.idx,i.col);var r=e.checkStrength(n);switch(this.passwordStrength.emit(40===r),i.idx){case 1:this.msg="Poor";break;case 2:this.msg="Not Good";break;case 3:this.msg="Average";break;case 4:this.msg="Good"}}else this.msg=""}},{key:"getColor",value:function(e){var t;return{idx:(t=e<=10?0:e<=20?1:e<=30?2:e<=40?3:4)+1,col:this.colors[t]}}},{key:"setBarColors",value:function(e,t){for(var n=0;n<e;n++)this["bar"+n]=t}}],[{key:"checkStrength",value:function(e){for(var t=0,n=0,i=0,r=[/[a-z]+/.test(e),/[A-Z]+/.test(e),/[0-9]+/.test(e),/[$-/:-?{-~!"^_@`\[\]]/g.test(e)];i<r.length;i++){n+=!0===r[i]?1:0}return t+=2*e.length+(e.length>=10?1:0),t+=10*n,t=e.length<=8?Math.min(t,10):t,t=1===n?Math.min(t,10):t,t=2===n?Math.min(t,20):t,t=3===n?Math.min(t,30):t,t=4===n?Math.min(t,40):t}}]),e}();return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=a.Xpm({type:e,selectors:[["strength-checker"]],inputs:{passwordToVerify:"passwordToVerify",barLabel:"barLabel"},outputs:{passwordStrength:"passwordStrength"},features:[a.TTD],decls:9,vars:10,consts:[[1,"strength"],[1,"strengthBar"],[1,"point"],["class","alert alert-info",4,"ngIf"],[1,"alert","alert-info"]],template:function(e,t){1&e&&(a.TgZ(0,"div",0),a._uU(1),a.TgZ(2,"ul",1),a._UZ(3,"li",2),a._UZ(4,"li",2),a._UZ(5,"li",2),a._UZ(6,"li",2),a.qZA(),a._UZ(7,"br"),a.YNc(8,Wn,2,1,"p",3),a.qZA()),2&e&&(a.xp6(1),a.hij("",t.barLabel,"\xa0 "),a.xp6(2),a.Udp("background",t.bar0),a.xp6(1),a.Udp("background",t.bar1),a.xp6(1),a.Udp("background",t.bar2),a.xp6(1),a.Udp("background",t.bar3),a.xp6(2),a.Q6J("ngIf",t.msg))},directives:[x.O5],styles:[".strengthBar[_ngcontent-%COMP%]{display:inline;list-style:none;margin:0;padding:0;vertical-align:2px}.point[_ngcontent-%COMP%]:last-of-type{margin:0!important}.point[_ngcontent-%COMP%]{background:#ddd;border-radius:2px;display:inline-block;height:5px;margin-right:3px;width:62px}","@media screen and (max-width:576px){.point[_ngcontent-%COMP%]{Width:50px}}"]}),e}(),Qn=["otp1"],Kn=["eleLoginEmail"],$n=["pass_one"];function zn(e,t){if(1&e){var n=a.EpF();a.ynx(0),a.TgZ(1,"a",15),a._UZ(2,"img",16),a.qZA(),a.TgZ(3,"a",17),a.NdJ("click",function(){return a.CHM(n),a.oxw().changeLangSettings("ar")}),a._UZ(4,"img",18),a.qZA(),a.BQk()}}function Xn(e,t){if(1&e){var n=a.EpF();a.ynx(0),a.TgZ(1,"a",15),a._UZ(2,"img",19),a.qZA(),a.TgZ(3,"a",17),a.NdJ("click",function(){return a.CHM(n),a.oxw().changeLangSettings("en")}),a._UZ(4,"img",20),a.qZA(),a.BQk()}}function ei(e,t){if(1&e&&(a.TgZ(0,"span",30),a._uU(1),a.ALo(2,"translate"),a.qZA()),2&e){var n=a.oxw(2);a.xp6(1),a.Oqu(a.lcZ(2,1,n.errorMessage))}}function ti(e,t){if(1&e){var n=a.EpF();a.TgZ(0,"div"),a.TgZ(1,"h5",21),a._uU(2),a.ALo(3,"translate"),a.qZA(),a.TgZ(4,"div",22),a._UZ(5,"img",23),a.TgZ(6,"input",24,25),a.NdJ("keyup.enter",function(){return a.CHM(n),a.oxw().resetPasswordOTPSend()}),a.ALo(8,"translate"),a.qZA(),a.qZA(),a.YNc(9,ei,3,3,"span",26),a.TgZ(10,"button",27),a.NdJ("click",function(){return a.CHM(n),a.oxw().resetPasswordOTPSend()}),a.TgZ(11,"span"),a._uU(12),a.ALo(13,"translate"),a.qZA(),a.qZA(),a.TgZ(14,"p",28),a._uU(15),a.ALo(16,"translate"),a.TgZ(17,"a",29),a._uU(18),a.ALo(19,"translate"),a.qZA(),a.qZA(),a.qZA()}if(2&e){var i=a.oxw();a.xp6(2),a.hij(" ",a.lcZ(3,7,"RESET_PASSWORD")," "),a.xp6(4),a.s9C("placeholder",a.lcZ(8,9,"ENTER_MOB_NUM")),a.xp6(3),a.Q6J("ngIf",i.errorFlag),a.xp6(3),a.hij(" ",a.lcZ(13,11,"CONTINUE")," "),a.xp6(3),a.hij(" ",a.lcZ(16,13,"ALREADY_HAVE_PWD")," "),a.xp6(2),a.Q6J("routerLink","/auth/login"),a.xp6(1),a.hij(" ",a.lcZ(19,15,"LOGIN")," ")}}function ni(e,t){if(1&e){var n=a.EpF();a.TgZ(0,"p",45),a.NdJ("click",function(){return a.CHM(n),a.oxw(2).resendOTP()}),a._uU(1),a.ALo(2,"translate"),a.qZA()}2&e&&(a.xp6(1),a.hij(" ",a.lcZ(2,1,"RESEND_OTP")," "))}function ii(e,t){if(1&e&&(a.TgZ(0,"p",46),a.TgZ(1,"span",47),a._uU(2),a.ALo(3,"translate"),a.ALo(4,"translate"),a.qZA(),a.qZA()),2&e){var n=a.oxw(2);a.xp6(2),a.lnq(" ",a.lcZ(3,3,"OTP_VALID_UPTO")," ",n.time," ",a.lcZ(4,5,"SECONDS")," ")}}function ri(e,t){if(1&e){var n=a.EpF();a.TgZ(0,"div"),a.TgZ(1,"div",31),a.TgZ(2,"h5",32),a._uU(3),a.ALo(4,"translate"),a._UZ(5,"br"),a._uU(6),a.ALo(7,"translate"),a.qZA(),a.TgZ(8,"p",33),a._uU(9),a.ALo(10,"translate"),a.ALo(11,"translate"),a.qZA(),a.TgZ(12,"div",34),a.TgZ(13,"input",35,36),a.NdJ("keypress",function(){return a.CHM(n),a.oxw().otpError=0})("keyup",function(){return a.CHM(n),a.oxw().handleOTPauth()}),a.qZA(),a.TgZ(15,"input",37),a.NdJ("keypress",function(){return a.CHM(n),a.oxw().otpError=0})("keyup",function(){return a.CHM(n),a.oxw().handleOTPauth()}),a.qZA(),a.TgZ(16,"input",38),a.NdJ("keypress",function(){return a.CHM(n),a.oxw().otpError=0})("keyup",function(){return a.CHM(n),a.oxw().handleOTPauth()}),a.qZA(),a.TgZ(17,"input",39),a.NdJ("keypress",function(){return a.CHM(n),a.oxw().otpError=0})("keyup",function(){return a.CHM(n),a.oxw().handleOTPauth()}),a.qZA(),a.TgZ(18,"input",40),a.NdJ("keypress",function(){return a.CHM(n),a.oxw().otpError=0})("keyup",function(){return a.CHM(n),a.oxw().handleOTPauth()}),a.qZA(),a.TgZ(19,"input",41),a.NdJ("keypress",function(){return a.CHM(n),a.oxw().otpError=0})("keyup",function(){return a.CHM(n),a.oxw().handleOTPauth()}),a.qZA(),a.qZA(),a.TgZ(20,"div"),a.YNc(21,ni,3,3,"p",42),a.YNc(22,ii,5,7,"p",43),a.qZA(),a.TgZ(23,"p",28),a._uU(24),a.ALo(25,"translate"),a.TgZ(26,"a",44),a._uU(27),a.ALo(28,"translate"),a.qZA(),a.qZA(),a.qZA(),a.qZA()}if(2&e){var i=a.oxw();a.xp6(3),a.hij(" ",a.lcZ(4,10,"RESET_PASSWORD"),""),a.xp6(3),a.hij(" ",a.lcZ(7,12,"ENTER_OTP")," "),a.xp6(3),a.lnq(" ",a.lcZ(10,14,"SEND_OTP_TO_YOUR_NUM")," ",i.dummyNo," ",a.lcZ(11,16,"ENTER_OTP_IN_SPACE_TO_CONFIRM_IDENTITY")," "),a.xp6(12),a.Q6J("ngIf",!i.showContDown),a.xp6(1),a.Q6J("ngIf",i.showContDown),a.xp6(2),a.hij(" ",a.lcZ(25,18,"DO_WANT_TO_GO")," "),a.xp6(2),a.Q6J("routerLink","/auth/login"),a.xp6(1),a.hij(" ",a.lcZ(28,20,"BACK_TO_LOGIN")," ")}}function ai(e,t){1&e&&(a.TgZ(0,"a"),a._UZ(1,"img",66),a.qZA())}function oi(e,t){1&e&&(a.TgZ(0,"a"),a._UZ(1,"img",67),a.qZA())}function si(e,t){1&e&&(a.TgZ(0,"a"),a._UZ(1,"img",66),a.qZA())}function ci(e,t){1&e&&(a.TgZ(0,"a"),a._UZ(1,"img",67),a.qZA())}function li(e,t){if(1&e&&(a.TgZ(0,"span",68),a._uU(1),a.ALo(2,"translate"),a.qZA()),2&e){var n=a.oxw(2);a.xp6(1),a.hij(" ",a.lcZ(2,1,n.errorMessage),"")}}function ui(e,t){if(1&e){var n=a.EpF();a.TgZ(0,"div",48),a._UZ(1,"app-feather-icons"),a.TgZ(2,"div",49),a.TgZ(3,"h5",50),a._uU(4),a.ALo(5,"translate"),a.qZA(),a.qZA(),a.TgZ(6,"div",51),a.TgZ(7,"label",52),a._uU(8),a.ALo(9,"translate"),a.qZA(),a._UZ(10,"img",53),a.TgZ(11,"div",54),a.TgZ(12,"span",55),a.NdJ("click",function(){a.CHM(n);var e=a.MAs(16);return a.oxw().togglePasswordOne(e,"_showPassword1")}),a.YNc(13,ai,2,0,"a",7),a.YNc(14,oi,2,0,"a",7),a.qZA(),a.qZA(),a._UZ(15,"input",56,57),a.ALo(17,"translate"),a.TgZ(18,"strength-checker",58),a.NdJ("passwordStrength",function(e){return a.CHM(n),a.oxw().handleCounterEvent(e)}),a.qZA(),a.qZA(),a.TgZ(19,"div",51),a.TgZ(20,"label",52),a._uU(21),a.ALo(22,"translate"),a.qZA(),a._UZ(23,"img",59),a.TgZ(24,"div",60),a.TgZ(25,"span",55),a.NdJ("click",function(){a.CHM(n);var e=a.MAs(29);return a.oxw().togglePasswordOne(e,"_showPassword2")}),a.YNc(26,si,2,0,"a",7),a.YNc(27,ci,2,0,"a",7),a.qZA(),a.qZA(),a._UZ(28,"input",61,62),a.ALo(30,"translate"),a.qZA(),a.YNc(31,li,3,3,"span",63),a.TgZ(32,"div",64),a.TgZ(33,"button",65),a.NdJ("click",function(){return a.CHM(n),a.oxw().sendrequest()}),a._uU(34),a.ALo(35,"translate"),a.qZA(),a.qZA(),a.qZA()}if(2&e){var i=a.oxw();a.xp6(4),a.Oqu(a.lcZ(5,13,"RESET_YOUR_PWD")),a.xp6(4),a.hij(" ",a.lcZ(9,15,"NEW_PASSWORD")," "),a.xp6(5),a.Q6J("ngIf",i._showPassword1),a.xp6(1),a.Q6J("ngIf",!i._showPassword1),a.xp6(1),a.s9C("placeholder",a.lcZ(17,17,"ENTER_NEW_PWD")),a.xp6(3),a.Q6J("passwordToVerify",i.forgetForm.value.password),a.xp6(3),a.Oqu(a.lcZ(22,19,"RETYPE_PWD")),a.xp6(5),a.Q6J("ngIf",i._showPassword2),a.xp6(1),a.Q6J("ngIf",!i._showPassword2),a.xp6(1),a.s9C("placeholder",a.lcZ(30,21,"ENTER_CONFIRM_PWD")),a.xp6(3),a.Q6J("ngIf",i.errorFlag),a.xp6(2),a.Q6J("disabled",i.submited),a.xp6(1),a.hij(" ",a.lcZ(35,23,"DONE")," ")}}var di,pi=function(){var e=function(){function e(t,n,i,r,a,o,c,l){s(this,e),this.fb=t,this._authenticationService=n,this.changeDetector=i,this.router=r,this.spinnerSadad=a,this.translate=o,this.layout=c,this._commonHelperService=l,this.show=!1,this.stage=0,this.errorFlag=!1,this.errorMessage="",this.showContDown=!0,this.submited=!1,this._showPassword1=!1,this._showPassword2=!1,this.time=60,this.currLang="";var u=localStorage.getItem("selectedLang");u?(this.currLang=u,this.translate.use(u),this.setLangSettings(u)):(this.currLang=f.N.defaultLang,this.translate.use(f.N.defaultLang),localStorage.setItem("selectedLang",f.N.defaultLang),this.setLangSettings(f.N.defaultLang))}return l(e,[{key:"ngOnInit",value:function(){var e,t=this;this.forgetForm=this.fb.group({phone:["",[g.kI.required]],password:["",g.kI.required],password2:["",g.kI.required],otp1:["",[g.kI.required]],otp2:["",[g.kI.required]],otp3:["",[g.kI.required]],otp4:["",[g.kI.required]],otp5:["",[g.kI.required]],otp6:["",[g.kI.required]]}),null!==(e=this._authenticationService.currentUserValue)&&void 0!==e&&e.id?this.router.navigate(["/dashboard/online-payment-default"]):this._authenticationService.login("","",!0).subscribe(function(e){}),this.errorFlag=!1,this.errorMessage="",this.forgetForm.controls.phone.valueChanges.subscribe(function(e){t.errorFlag=!1,t.errorMessage=""}),this.forgetForm.controls.password.valueChanges.subscribe(function(e){var n,i;t.r.password.value&&(null!==(n=t.forgetForm.controls.password)&&void 0!==n&&null!==(i=n.errors)&&void 0!==i&&i.pattern?(t.errorFlag=!0,t.errorMessage="FORGET_PASSWORD_LENGTH_REQ_CHAR_VALIDATION"):(t.errorFlag=!1,t.errorMessage="")),!t.errorMessage&&t.r.password.value&&t.r.password2.value&&(t.r.password.value!=t.r.password2.value?(t.errorFlag=!0,t.errorMessage="NEW_PWD_RETYPE_PWD_MUST_MATCH"):(t.errorFlag=!1,t.errorMessage="")),t.r.password.value||t.r.password2.value||(t.errorFlag=!1,t.errorMessage="")}
1),this.forgetForm.controls.password2.valueChanges.subscribe(function(e){var n,i,r,a,o,s;t.r.password2.value&&(null!==(n=t.forgetForm.controls.password2)&&void 0!==n&&null!==(i=n.errors)&&void 0!==i&&i.pattern||null!==(r=t.forgetForm.controls.password)&&void 0!==r&&null!==(a=r.errors)&&void 0!==a&&a.pattern?(t.errorFlag=!0,t.errorMessage="FORGET_PASSWORD_LENGTH_REQ_CHAR_VALIDATION"):(t.errorFlag=!1,t.errorMessage="")),t.r.password.value&&t.r.password2.value&&!(null!==(o=t.forgetForm.controls.password)&&void 0!==o&&null!==(s=o.errors)&&void 0!==s&&s.pattern)&&(t.r.password.value!=t.r.password2.value?(t.errorFlag=!0,t.errorMessage="NEW_PWD_RETYPE_PWD_MUST_MATCH"):(t.errorFlag=!1,t.errorMessage="")),t.r.password.value||t.r.password2.value||(t.errorFlag=!1,t.errorMessage="")})}},{key:"ngAfterViewInit",value:function(){var e=this;setTimeout(function(){var t,n;null===(t=e.eleLoginEmail)||void 0===t||null===(n=t.nativeElement)||void 0===n||n.focus()},0),this._authenticationService.vpnEventEmitter.emit("vpnInitEvent")}},{key:"setLangSettings",value:function(e){"en"==e?(this.layout.changeLayoutType("ltr"),console.log("forget pwd changeLayoutType: ltr")):(this.layout.changeLayoutType("rtl"),console.log("forget pwd changeLayoutType: rtl"))}},{key:"changeLangSettings",value:function(e){this.currLang=e,this.translate.use(e),this.layout.changeLayoutType("en"==e?"ltr":"rtl"),localStorage.setItem("selectedLang",e)}},{key:"r",get:function(){return this.forgetForm.controls}},{key:"startTimer",value:function(){var e=this;this.time=60,this.subsc=(0,m.F)(1e3).subscribe(function(t){e.time=e.time-1,e.time<0&&(e.showContDown=!1,e.subsc.unsubscribe())})}},{key:"resendOTP",value:function(){var e=this;this.errorMessage="",this.forgetForm.controls.otp1.reset(),this.forgetForm.controls.otp2.reset(),this.forgetForm.controls.otp3.reset(),this.forgetForm.controls.otp4.reset(),this.forgetForm.controls.otp5.reset(),this.forgetForm.controls.otp6.reset(),this._authenticationService.restPasswordRequest({cellnumber:this.r.phone.value}).subscribe(function(t){var n;(null==t?void 0:t.error)&&e._commonHelperService.disTransErrMsg(null==t||null===(n=t.error)||void 0===n?void 0:n.message)}),this.showContDown=!0,this.startTimer()}},{key:"showPassword",value:function(){this.show=!this.show}},{key:"sendrequest",value:function(){var e=this;if(!this.forgetForm.controls.password.errors&&!this.forgetForm.controls.password2.errors){if(this.r.password.value!=this.r.password2.value)return this.errorFlag=!0,void(this.errorMessage="NEW_PWD_RETYPE_PWD_MUST_MATCH");this.submited=!0,this._authenticationService.resetPasswordNew({newPassword:this.r.password.value}).subscribe(function(t){var n;t&&"success"===t.result?(e._commonHelperService.disTransSuccMsg("PWD_CHANGED_SUCC_PLS_LOGIN"),e.router.navigate(["/auth/login"])):(e.errorFlag=!0,e.errorMessage=(null===(n=t.error)||void 0===n?void 0:n.message)||"PWD_RESET_FAILED"),e.submited=!1},function(t){var n,i,r;e.errorFlag=!0,e.submited=!1,e._commonHelperService.disTransErrMsg((null==t||null===(n=t.error)||void 0===n||null===(i=n.error)||void 0===i?void 0:i.message)||(null==t||null===(r=t.error)||void 0===r?void 0:r.message)||(null==t?void 0:t.message))})}}},{key:"handleOTPauth",value:function(){var e=this;if(this.r.otp1.value&&this.r.otp2.value&&this.r.otp3.value&&this.r.otp4.value&&this.r.otp5.value&&this.r.otp6.value){var t={cellnumber:this.r.phone.value,forgotpasswordotp:this.r.otp1.value+this.r.otp2.value+this.r.otp3.value+this.r.otp4.value+this.r.otp5.value+this.r.otp6.value};if(t.forgotpasswordotp.length<6)return this.errorFlag=!0,void(this.errorMessage="Please enter a valid OTP");this.submited=!0,this.spinnerSadad.show(),this._authenticationService.resetPasswordVerifyOtp(t).subscribe(function(t){var n,i,r,a;e.spinnerSadad.hide(),t.error?(e.errorFlag=!0,e.errorMessage=null!==(n=t.error)&&void 0!==n&&n.message?null===(i=t.error)||void 0===i?void 0:i.message:"Please enter a valid OTP",e._commonHelperService.disTransErrMsg(e.errorMessage)):(e.stage=2,null!==(r=e.otp1)&&void 0!==r&&null!==(a=r.nativeElement)&&void 0!==a&&a.blur(),e.changeDetector.detectChanges(),setTimeout(function(){var t,n;null===(t=e.pass_one)||void 0===t||null===(n=t.nativeElement)||void 0===n||n.focus()},0),e.errorFlag=!1,e.errorMessage=""),e.submited=!1},function(t){var n,i,r;e._commonHelperService.disTransErrMsg((null==t||null===(n=t.error)||void 0===n||null===(i=n.error)||void 0===i?void 0:i.message)||(null==t||null===(r=t.error)||void 0===r?void 0:r.message)||(null==t?void 0:t.message))})}}},{key:"resetPasswordOTPSend",value:function(){var e=this;if(this._authenticationService.vpnCheckCall.emit("1"),this.spinnerSadad.show(),this.forgetForm.controls.phone.invalid)return this.errorFlag=!0,this.errorMessage="INVALID_PHONE_NUM",void this.spinnerSadad.hide();var t=this.forgetForm.controls.phone.value;t.length>=8&&t.length<=10?(this.submited=!0,this._authenticationService.restPasswordRequest({cellnumber:this.r.phone.value}).subscribe(function(t){var n,i,r,a;if(!e.handleResetPasswordErrorResponse(t))return 1!==(null==t?void 0:t.roleId)&&16!==(null==t?void 0:t.roleId)&&17!==(null==t?void 0:t.roleId)&&14!==(null==t?void 0:t.roleId)?(e.errorFlag=!0,e.submited=!1,null!=t&&t.error&&null!=t&&null!==(n=t.error)&&void 0!==n&&n.message?e._commonHelperService.disTransErrMsg(null==t||null===(i=t.error)||void 0===i?void 0:i.message):e.errorMessage="PLS_ENTER_CORRECT_MER_PHONE_MUM",void e.spinnerSadad.hide()):(e.errorFlag=!1,e.errorMessage="",e.dummyNo=e.editNumber(e.forgetForm.controls.phone.value),e.stage=1,null!==(r=e.eleLoginEmail)&&void 0!==r&&null!==(a=r.nativeElement)&&void 0!==a&&a.blur(),e.changeDetector.detectChanges(),setTimeout(function(){var t,n;null===(t=e.otp1)||void 0===t||null===(n=t.nativeElement)||void 0===n||n.focus()},0),e.changeDetector.detectChanges(),e.startTimer(),e.showContDown=!0,e.submited=!1,void e.spinnerSadad.hide())},function(t){var n;e.handleResetPasswordErrorResponse((null==t||null===(n=t.error)||void 0===n?void 0:n.error)||(null==t?void 0:t.error)||t)||(e.errorFlag=!0,e.submited=!1,e.errorMessage="PLS_ENTER_CORRECT_MER_PHONE_MUM",e.spinnerSadad.hide())})):(this.errorFlag=!0,this.errorMessage="INVALID_PHONE_NUM",this.spinnerSadad.hide())}},{key:"editNumber",value:function(e){for(var t="X",n=0;n<e.length-3;n++)t+="X";return e.charAt(0)+t+e.charAt(e.length-1)}},{key:"handleCounterEvent",value:function(e){"done"==e.action&&(this.showContDown=!1)}},{key:"togglePasswordOne",value:function(e,t){this[t]=!this[t],e.setAttribute("type",this[t]?"text":"password")}},{key:"handleResetPasswordErrorResponse",value:function(e){var t,n,i;return null!=e&&e.error?499==(null==e||null===(t=e.error)||void 0===t?void 0:t.statusCode)?(this._commonHelperService.disTransErrMsg(null==e||null===(n=e.error)||void 0===n?void 0:n.message),this.submited=!1,this.spinnerSadad.hide(),!0):(this.submited=!1,this.spinnerSadad.hide(),this._commonHelperService.disTransErrMsg(null==e||null===(i=e.error)||void 0===i?void 0:i.message),!0):null!=e&&e.blocked?(this.errorFlag=!0,this.errorMessage="USER_DEACTIVATED",this.submited=!1,this.spinnerSadad.hide(),!0):null!=e&&e.blockedByAdmin?(this.errorFlag=!0,this.errorMessage="ACCESS_PERMI_DENIED_BY_ADMIN",this.submited=!1,this.spinnerSadad.hide(),!0):"basic"==(null==e?void 0:e.type)&&(this.errorFlag=!0,this.errorMessage="DONT_HAVE_SUFF_PERMISSION_TO_ACCESS_MER_PANEL",this.submited=!1,this.spinnerSadad.hide(),!0)}},{key:"ngOnDestroy",value:function(){var e;null===(e=this.subsc)||void 0===e||e.unsubscribe()}}]),e}();return e.\u0275fac=function(t){return new(t||e)(a.Y36(g.qu),a.Y36(Bn.$),a.Y36(a.s
1BO),a.Y36(o.F0),a.Y36(E.t2),a.Y36(u.sK),a.Y36(k.P),a.Y36(T.$P))},e.\u0275cmp=a.Xpm({type:e,selectors:[["app-forget-password"]],viewQuery:function(e,t){var n;(1&e&&(a.Gf(Qn,5),a.Gf(Kn,5),a.Gf($n,5)),2&e)&&(a.iGM(n=a.CRH())&&(t.otp1=n.first),a.iGM(n=a.CRH())&&(t.eleLoginEmail=n.first),a.iGM(n=a.CRH())&&(t.pass_one=n.first))},decls:22,vars:7,consts:[["bdColor","rgba(0, 0, 0, 0.8)","size","medium","color","#fff","type","ball-circus",3,"fullScreen"],[1,"page-wrapper"],[1,"container-fluid"],[1,"row"],[1,"col-12","p-0"],[1,"login-card"],[1,"login-lang-selection"],[4,"ngIf"],[1,"logo"],["src","assets/images/logo/sadad-login-logo.svg","alt","looginpage",1,"img-fluid","for-light"],[1,"login-main"],[1,"theme-form","text-center",3,"formGroup"],["class","new-psw-box",4,"ngIf"],[1,"language-s-wrapper"],[1,"mt-5","d-flex","align-items-center","justify-content-center","position-relative"],["href","javascript:void(0);",1,""],["src","assets/images/language-selection/en-active.svg","alt","looginpage",1,"img-fluid"],["href","javascript:void(0);",1,"",3,"click"],["src","assets/images/language-selection/ar-inactive.svg","alt","looginpage",1,"img-fluid"],["src","assets/images/language-selection/ar-active.svg","alt","looginpage",1,"img-fluid"],["src","assets/images/language-selection/en-inactive.svg","alt","looginpage",1,"img-fluid"],[1,"text-center","text-white","mb-4"],[1,"form-group","mb-2"],["src","assets/images/login/user.svg","alt","",1,"img-fluid","login-icon"],["type","text","required","","numbersOnly","","formControlName","phone",1,"form-control","no-autofill-bkg",3,"placeholder","keyup.enter"],["eleLoginEmail",""],["class","text-white mb-3 d-block text-left",4,"ngIf"],["type","button",1,"btn","btn-primary","btn-block","login-btn","mt-4",3,"click"],[1,"mt-4","mb-0"],[1,"ml-2","text-white",3,"routerLink"],[1,"text-white","mb-3","d-block","text-left"],[1,"otp"],[1,"text-center","text-white","mb-2","font-weight-bold"],[1,"text-center","text-white"],["dir","ltr",1,"form-group","mb-3"],["type","text","numbersOnly","","autoF
1ocusMaxLength","","maxlength","1","size","1","formControlName","otp1","name","otp1","autocomplete","off",1,"form-control",3,"keypress","keyup"],["otp1",""],["type","text","numbersOnly","","autoFocusMaxLength","","maxlength","1","size","1","formControlName","otp2","name","otp2","autocomplete","nope",1,"form-control",3,"keypress","keyup"],["type","text","numbersOnly","","autoFocusMaxLength","","maxlength","1","size","1","formControlName","otp3","name","otp3","autocomplete","nope",1,"form-control",3,"keypress","keyup"],["type","text","numbersOnly","","autoFocusMaxLength","","maxlength","1","size","1","formControlName","otp4","name","otp4","autocomplete","nope",1,"form-control",3,"keypress","keyup"],["type","text","numbersOnly","","autoFocusMaxLength","","maxlength","1","size","1","formControlName","otp5","name","otp5","autocomplete","nope",1,"form-control",3,"keypress","keyup"],["type","text","numbersOnly","","autoFocusMaxLength","","maxlength","1","size","1","formControlName","otp6","name","otp6","autocomplete","nope",1,"form-control","lastpiner",3,"keypress","keyup"],["class","resend-otp text-white font-weight-bold text-center m-0 cursor mb-0 pointer",3,"click",4,"ngIf"],["class","resend-otp text-center mt-1","style","margin-top: 0.5rem",4,"ngIf"],[1,"ml-2","text-white","pointer",3,"routerLink"],[1,"resend-otp","text-white","font-weight-bold","text-center","m-0","cursor","mb-0","pointer",3,"click"],[1,"resend-otp","text-center","mt-1",2,"margin-top","0.5rem"],["id","time"],[1,"new-psw-box"],[2,"text-align","center"],[1,"text-white","mb-3"],[1,"form-group"],[1,"col-form-label","text-white"],["src","assets/images/login/password.svg","alt","",1,"img-fluid","login-icon"],[1,"rtypr-psw-icon"],[3,"click"],["formControlName","password","type","password","name","login[password]","required","","pattern","(?=.*\\d)(?=.*[a-z])(?=.*[A-Z])((?=.*\\W)|(?=.*_))^[^ ]{8,}",1,"form-control",3,"placeholder"],["pass_one",""],["barLabel","",3,"passwordToVerify","passwordStrength"],["src","assets/images/login/password.svg","alt","",1,"img-fluid","retyp-login-icon","login-icon"],[1,"rtypr-psw-icon","rtypr-psw-icon2"],["formControlName","password2","type","password","pattern","(?=.*\\d)(?=.*[a-z])(?=.*[A-Z])((?=.*\\W)|(?=.*_))^[^ ]{8,}","name","login[password]","required","",1,"form-control",3,"placeholder"],["pass_two",""],["class","new-error-text mb-3 d-block text-left",4,"ngIf"],[1,"form-group","mb-0"],[1,"btn","btn-primary","btn-block","login-btn","mt-4",3,"disabled","click"],["src","assets/images/login/open_eye.svg","alt","",1,"img-fluid","eye-icon"],["src","assets/images/login/closeeye.svg","alt","",1,"img-fluid","eye-icon"],[1,"new-error-text","mb-3","d-block","text-left"]],template:function(e,t){1&e&&(a.TgZ(0,"ngx-spinner",0),a._UZ(1,"app-sadad-loader"),a.qZA(),a._UZ(2,"app-feather-icons"),a.TgZ(3,"div",1),a.TgZ(4,"div",2),a.TgZ(5,"div",3),a.TgZ(6,"div",4),a.TgZ(7,"div",5),a.TgZ(8,"div",6),a.YNc(9,zn,5,0,"ng-container",7),a.YNc(10,Xn,5,0,"ng-container",7),a.qZA(),a.TgZ(11,"div"),a.TgZ(12,"div"),a.TgZ(13,"a",8),a._UZ(14,"img",9),a.qZA(),a.qZA(),a.TgZ(15,"div",10),a.TgZ(16,"form",11),a.YNc(17,ti,20,17,"div",7),a.YNc(18,ri,29,22,"div",7),a.YNc(19,ui,36,25,"div",12),a.qZA(),a.qZA(),a.TgZ(20,"div",13),a._UZ(21,"div",14),a.qZA(),a.qZA(),a.qZA(),a.qZA(),a.qZA(),a.qZA(),a.qZA()),2&e&&(a.Q6J("fullScreen",!0),a.xp6(9),a.Q6J("ngIf","en"==t.currLang),a.xp6(1),a.Q6J("ngIf","ar"==t.currLang),a.xp6(6),a.Q6J("formGroup",t.forgetForm),a.xp6(1),a.Q6J("ngIf",0==t.stage),a.xp6(1),a.Q6J("ngIf",1==t.stage),a.xp6(1),a.Q6J("ngIf",2==t.stage))},directives:[E.Ro,C.T,ge.A,x.O5,g._Y,g.JL,g.sg,q.p,g.Fj,g.Q7,g.JJ,g.u,F.mh,o.yS,Y.Lv,V.b,g.nD,g.c5,Gn],pipes:[u.X$],styles:[".login-card[_ngcontent-%COMP%] .login-main[_ngcontent-%COMP%] .theme-form[_ngcontent-%COMP%]{position:relative}.login-card[_ngcontent-%COMP%] .login-main[_ngcontent-%COMP%] .theme-form[_ngcontent-%COMP%] .lgn-err[_ngcontent-%COMP%]{position:absolute;width:100%;top:-35px}.login-card[_ngcontent-%COMP%] .pointer[_ngcontent-%COMP%]{cursor:pointer}.login-card[_ngcontent-%COMP%] .login-main[_ngcontent-%COMP%] .theme-form[_ngcontent-%COMP%] .otp[_ngcontent-%COMP%] .form-group[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center}.login-card[_ngcontent-%COMP%] .login-main[_ngcontent-%COMP%] .theme-form[_ngcontent-%COMP%] .otp[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{border-radius:6px;padding:7px;height:43px;text-align:center;margin:5px}.new-psw-box[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{font-size:16px;font-weight:400;text-align:left;width:100%;padding-left:25px}@media screen and (max-width:576px){.new-psw-box[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{padding-left:17px;font-size:14px}}.new-psw-box[_ngcontent-%COMP%] .form-group[_ngcontent-%COMP%] .login-icon[_ngcontent-%COMP%]{top:56%!important}@media screen and (max-width:576px){.new-psw-box[_ngcontent-%COMP%] .form-group[_ngcontent-%COMP%] .login-icon[_ngcontent-%COMP%]{left:12px}}.new-psw-box[_ngcontent-%COMP%] .form-group[_ngcontent-%COMP%] .retyp-login-icon[_ngcontent-%COMP%]{top:69%!important}.new-error-text[_ngcontent-%COMP%]{color:#fee999}"]}),e}(),vi=function(){var e=function(){function e(t,n,i){s(this,e),this.router=t,this.authenticationService=n,this._header=i}return l(e,[{key:"canActivate",value:function(e,t){var n=this;return this.authenticationService.currentUserValue?this._header.getServicePin().then(function(e){var i,r;return 401!==(null==e||null===(i=e.error)||void 0===i?void 0:i.statusCode)&&499!==(null==e||null===(r=e.error)||void 0===r?void 0:r.statusCode)||(n.router.navigate(["/auth/login"],{queryParams:{returnUrl:t.url}}),!1)}).catch(function(e){var t,n,i=(null==e||null===(t=e.error)||void 0===t||null===(n=t.error)||void 0===n?void 0:n.statusCode)||(null==e?void 0:e.statusCode);
1return 401!==i&&499!==i}):(this.router.navigate(["/auth/login"],{queryParams:{returnUrl:t.url}}),!1)}}]),e}();return e.\u0275fac=function(t){return new(t||e)(a.LFG(o.F0),a.LFG(T.$h),a.LFG(T.r6))},e.\u0275prov=a.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e}(),hi=[{path:"",redirectTo:"dashboard/online-payment-default",pathMatch:"full"},{path:"auth/login",component:ue,resolve:{dataList:T.oZ}},{path:"auth/reset-pass",component:pi},{path:"",component:fn,children:Jn,canActivate:[vi]},{path:"",component:(di=l(function e(){s(this,e)}),di.\u0275fac=function(e){return new(e||di)},di.\u0275cmp=a.Xpm({type:di,selectors:[["app-blank-layout"]],decls:1,vars:0,template:function(e,t){1&e&&a._UZ(0,"router-outlet")},directives:[o.lC],encapsulation:2}),di),children:[{path:"c59b/:id",loadChildren:function(){return i.e("src_app_components_apps_e-commerce_e-commerce_module_ts").then(i.bind(i,39674)).then(function(e){return e.ECommerceModule})},data:{preload:!0,delay:2e3}}]},{path:"**",redirectTo:"dashboard/online-payment-default"}],gi=function(){var e=l(function e(){s(this,e)});return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=a.oAB({type:e}),e.\u0275inj=a.cJS({imports:[[[o.Bz.forRoot(hi,{anchorScrolling:"enabled",scrollPositionRestoration:"enabled",relativeLinkResolution:"legacy",onSameUrlNavigation:"reload"})]],o.Bz]}),e}(),mi=i(52320),fi=i(32375),_i=i(58868),yi=i(80260),Si=function(e){return{display:e}},bi=function(){var e=function(){function e(t){s(this,e),this.viewScroller=t,this.show=!1}return l(e,[{key:"ngOnInit",value:function(){}},{key:"onWindowScroll",value:function(){var e=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0;this.show=e>600}},{key:"tapToTop",value:function(){this.viewScroller.scrollToPosition([0,0])}}]),e}();return e.\u0275fac=function(t){return new(t||e)(a.Y36(x.EM))},e.\u0275cmp=a.Xpm({type:e,selectors:[["app-tap-to-top"]],hostBindings:function(e,t){1&e&&a.NdJ("scroll",function(){return t.onWindowScroll()},!1,a.Jf7)},decls:2,vars:4,consts:[[1,"tap-top",3,"ngStyle","click"],[3,"icon"]],template:function(e,t){1&e&&(a.TgZ(0,"div",0),a.NdJ("click",function(){return t.tapToTop()}),a._UZ(1,"app-feather-icons",1),a.qZA()),2&e&&(a.Q6J("ngStyle",a.VKq(2,Si,t.show?"block":"none")),a.xp6(1),a.Q6J("icon","chevrons-up"))},directives:[x.PC,ge.A],styles:[""]}),e}(),wi=["vpn_error_alert"],Ii=function(){return["/auth/login"]};function Ti(e,t){if(1&e){var n=a.EpF();a.TgZ(0,"div",4),a.TgZ(1,"h6"),a._uU(2),a.ALo(3,"translate"),a.qZA(),a.qZA(),a.TgZ(4,"div",5),a.TgZ(5,"div",6),a.TgZ(6,"div",7),a._UZ(7,"img",8),a.qZA(),a.TgZ(8,"div",9),a.TgZ(9,"p",10),a._uU(10),a.ALo(11,"translate"),a._UZ(12,"br"),a._uU(13),a.ALo(14,"translate"),a.qZA(),a.qZA(),a.qZA(),a.TgZ(15,"div",11),a.TgZ(16,"a",12),a.TgZ(17,"button",13),a.NdJ("click",function(){return a.CHM(n),a.oxw().closeVPNRetry()}),a._uU(18),a.ALo(19,"translate"),a.qZA(),a.qZA(),a.qZA(),a.qZA()}2&e&&(a.xp6(2),a.Oqu(a.lcZ(3,5,"Attention")),a.xp6(8),a.hij(" ",a.lcZ(11,7,"VPN_CONN_DETECTED"),"! "),a.xp6(3),a.hij(" ",a.lcZ(14,9,"VPN_POPUP_ALERT_MSG"),". "),a.xp6(3),a.Q6J("routerLink",a.DdM(13,Ii)),a.xp6(2),a.hij(" ",a.lcZ(19,11,"CLOSE_VPN_RETRY")," "))}var Ei=function(){var e=function(){function e(t,n,i,r,a,o,c,l,u,d,p,v,h,g){s(this,e),this.platformId=t,this._layoutService=n,this._paymentServiceTypeService=i,this.modalService=a,this._authSer=o,this.router=c,this.cookieService=l,this.spinnerSadad=u,this._commonHelperService=d,this._reportService=p,this._reqDeliveryPollService=v,this._snackbarService=h,this._swUpdate=g,this.testedIPs={},this._distroyed$=new b.x,this.isVPNInitEventCall=!1,this.cachemoduletesting="",this.hasPendingSwUpdate=!1,(0,x.NF)(this.platformId)&&r.addLangs(["en","de","es","fr","pt","cn","ae"]);var m=r.getDefaultLang(),f=localStorage.getItem("selectedLang");["en","ar"].includes(f)||localStorage.setItem("selectedLang",m),localStorage.getItem("selectedLang")?m=localStorage.getItem("selectedLang"):(localStorage.setItem("selectedLang",m),m=r.getDefaultLang()),r.setDefaultLang(m),r.use(m),this._layoutService.selectedLang=m,this.getCookie("testedIPsCk")&&(this.testedIPs=JSON.parse(this.getCookie("testedIPsCk"))),this.callDownReptIdsPolling()}return l(e,[{key:"ngOnInit",value:function(){this.changeServiceType(),this.initAutoSwUpdateCheck(),this.initGa4RouteTracking(),window.addEventListener("pageshow",function(e){e.persisted?(console.log("This page was restored from the bfcache."),window.location.reload()):console.log("This page was loaded normally.")}),this.startReprtIdsStatusPolling()}},{key:"changeServiceType",value:function(){var e=this;this.router.events.pipe((0,_i.h)(function(e){return e instanceof o.OD}),(0,y.R)(this._distroyed$)).subscribe(function(t){var n,i,r,a,o=(null==t?void 0:t.url)||"";o.includes("pos-transactions")||o.includes("pos-reports")||o.includes("pos-settings")||o.includes("pos-default")?"pos"!==(null===(n=e._paymentServiceTypeService)||void 0===n?void 0:n.serviceType)&&(null===(i=e._paymentServiceTypeService)||void 0===i||i.changeServiceType("pos")):(o.includes("online-payment-transactions")||o.includes("online-payment-reports")||o.includes("online-payment-settings")||o.includes("online-payment-default"))&&"online-payment"!==(null===(r=e._paymentServiceTypeService)||void 0===r?void 0:r.serviceType)&&(null===(a=e._paymentServiceTypeService)||void 0===a||a.changeServiceType("online-payment"))})}},{key:"ngAfterViewInit",value:function(){var e=this;this._authSer.vpnEventEmitter.pipe((0,y.R)(this._distroyed$)).subscribe(function(t){e.isVPNInitEventCall||"vpnInitEvent"!=t||(e.isVPNInitEventCall=!0,e.callVPNAPIs("",!0),e.intervalId=setInterval(function(){e.callVPNAPIs("interval")},1e4),e._authSer.vpnCheckCall.pipe((0,y.R)(e._distroyed$)).subscribe(function(t){t&&("reset-pwd"==t?e.callVPNAPIs(t,!0):e.callVPNAPIs(t))}))}),this.cachemoduletesting="testing",this.router.events.pipe((0,_i.h)(function(e){return e instanceof o.m2})).subscribe(function(e){(e.url.includes("curDateSel")||e.url.includes("highMenu"))&&setTimeout(function(){document.querySelectorAll("a.sidebar-item img").forEach(function(e){(null==e?void 0:e.src)&&(null==e?void 0:e.alt)&&(e.src=e.src.replace(e.alt+"-active",e.alt))});var e=document.querySelector(".sidebar-list .active img:not(.d-none)");(null==e?void 0:e.src)&&(null==e?void 0:e.alt)&&(e.src=e.src.replace(e.alt,e.alt+"-active"))},100)})}},{key:"callVPNAPIs",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.testedIPs=this.getCookie("testedIPsCk")?JSON.parse(this.getCookie("testedIPsCk")):{},document.getElementsByClassName("vpnerror-popup-main").length||(!window.location.href.includes("/auth/login")&&!window.location.href.includes("/auth/reset-pass")&&window.location.pathname.replace("/","")||this.modReff||n&&this.spinnerSadad.show("appCompLoader"),this._authSer.getIPAddress().then(function(i){if(null!=i&&i.ip&&"undefined"!=(null==i?void 0:i.ip)&&"null"!=(null==i?void 0:i.ip)&&"error"!=(null==i?void 0:i.ip))if(Object.keys(e.testedIPs).includes(null==i?void 0:i.ip)){var r=JSON.stringify(i)+"-- VPN found from cookie";"yes"==e.testedIPs[i.ip]?window.location.href.includes("/auth/login")?"otpauth"==t?e._authSer.logout().pipe((0,y.R)(e._distroyed$)).subscribe(function(t){e.router.navigate(["/auth/login"]),e._authSer.writeErrorLog(r,"vpnErrLog").then(function(e){}),setTimeout(function(){e.openVpnErrorAlert(e.vpnErrorAlert),e.enableLoginForm()},2e3)}):(e.openVpnErrorAlert(e.vpnErrorAlert),e._authSer.writeErrorLog(r,"vpnErrLog").then(function(e){}),e._authSer.isVpnProxy.next(!0),e.enableLoginForm()):e._authSer.logout().pipe((0,y.R)(e._distroyed$)).subscribe(function(t){e.router.navigate(["/auth/login"]),e._authSer.writeErrorLog(r,"vpnErrLog").then(function(e){}),e._authSer.isVpnProxy.next(!0),setTimeout(function(){e.openVpnErrorAlert(e.vpnErrorAlert),e.enableLoginForm()},2e3)}):(n&&e.spinnerSadad.hide("appCompLoader"),e.enableLoginForm())}else e._authSer.callVPNProxy(null==i?void 0:i.ip,!0).then(function(t){var i,r,a,o,s,c=t.clientIP;"string"==typeof t.result&&"string"==typeof(t=JSON.parse(t.result))&&(t=JSON.parse(t.replaceAll("'",'"'))),"ok"==(null===(i=t)||void 0===i?void 0:i.status)?"yes"==(null===(r=t[c])||void 0===r?void 0:r.proxy)||"yes"==(null===(a=t[c])||void 0===a?void 0:a.vpn)?(e.testedIPs[c]="yes",e.
1setCookie("testedIPsCk",JSON.stringify(e.testedIPs)),e._authSer.logout().pipe((0,y.R)(e._distroyed$)).subscribe(function(n){window.location.href.includes("/auth/login")||e.router.navigate(["/auth/login"]),e._authSer.writeErrorLog(t,"vpnErrLog").then(function(e){}),e._authSer.isVpnProxy.next(!0),setTimeout(function(){e.openVpnErrorAlert(e.vpnErrorAlert),e.enableLoginForm()},2e3)})):(e.enableLoginForm(),n&&e.spinnerSadad.hide("appCompLoader"),e.testedIPs[c]="no",e.setCookie("testedIPsCk",JSON.stringify(e.testedIPs))):(("error"==(null===(o=t)||void 0===o?void 0:o.status)||null!==(s=t)&&void 0!==s&&s.error)&&e.spinnerSadad.hide("appCompLoader"),e.enableLoginForm())}).catch(function(t){e.spinnerSadad.hide("appCompLoader"),e.enableLoginForm(),e.testedIPs[i.ip]="no",e.setCookie("testedIPsCk",JSON.stringify(e.testedIPs),new Date((new Date).getTime()+9e4))});else"error"!=(null==i?void 0:i.ip)?(e.spinnerSadad.hide("appCompLoader"),e.enableLoginForm(),e._authSer.writeErrorLog("Invalid ip found from fastify - ".concat(null==i?void 0:i.ip),"vpnErrLog","api/ip-request").then(function(e){console.log("writeErrorLog entry done successfully!")})):(e.spinnerSadad.hide("appCompLoader"),e.enableLoginForm())}).catch(function(t){e.spinnerSadad.hide("appCompLoader"),e.enableLoginForm()}))}},{key:"enableLoginForm",value:function(){window.location.href.includes("/auth/login")&&this._authSer.vpnEventEmitter.emit("appEnaLoginFormEvent")}},{key:"openVpnErrorAlert",value:function(e){this.spinnerSadad.hide("appCompLoader"),this.modalService.hasOpenModals()||(this.modReff=this.modalService.open(e,{windowClass:"modal-cattwo",keyboard:!1,backdrop:"static",size:"md",centered:!0}),this.modReff.result.then(function(e){},function(e){}))}},{key:"closeVPNRetry",value:function(){this.modalService.dismissAll(),this.spinnerSadad.show("appCompLoader")}},{key:"setCookie",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=n||(new Date).setDate((new Date).getDate()+1);this.cookieService.set(e,t,i,"/","",!0,"Strict")}},{key:"getCookie",value:function(e){return this.cookieService.get(e)}},{key:"startReprtIdsStatusPolling",value:function(){var e=this;this.pollingRprtIdsIntervalId=setInterval(function(){e.callDownReptIdsPolling()},this._reportService.reportToastDisplayTime)}},{key:"callDownReptIdsPolling",value:function(){var e,t,n,i,r,a,o=this,s=null===(e=this._authSer)||void 0===e||null===(t=e.loginUserValue)||void 0===t?void 0:t.downRprtIds,c=null===(n=this._authSer)||void 0===n||null===(i=n.loginUserValue)||void 0===i?void 0:i.downStmtIds,l=s&&(null==s?void 0:s.length),u=c&&(null==c?void 0:c.length);(l||u)&&null!==(r=this._authSer)&&void 0!==r&&r.currentUserValue&&this._reportService.getDownReqStatus(s,c).pipe((0,y.R)(this._distroyed$)).subscribe({next:function(e){var t;null!=e&&e.error?o._commonHelperService.disTransErrMsg(null==e||null===(t=e.error)||void 0===t?void 0:t.message):(l&&o._reportService.handleReportBulkPoll(e,!0),u&&o._reportService.handleStatementBulkPoll(e,!0))},error:(a=(0,h.Z)(regeneratorRuntime.mark(function e(t){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}},e)})),function(e){return a.apply(this,arguments)})}),this._reqDeliveryPollService.pollIfNeeded()}},{key:"initAutoSwUpdateCheck",value:function(){var e,t,n=this;(null===(e=this._swUpdate)||void 0===e?void 0:e.isEnabled)&&(this._swUpdate.available.pipe((0,y.R)(this._distroyed$)).subscribe(function(){console.log("New app version available via Service Worker. Updating and reloading..."),n._swUpdate.activateUpdate().then(function(){window.location.reload()})}),null!==(t=this._swUpdate.unrecoverable)&&void 0!==t&&t.pipe((0,y.R)(this._distroyed$)).subscribe(function(e){console.warn("Service worker in unrecoverable state:",e.reason),window.location.reload()}),(0,m.F)(3e5).pipe((0,y.R)(this._distroyed$)).subscribe(function(){n._swUpdate.checkForUpdate().catch(function(e){return console.error("Error checking for SW update:",e)})}),"undefined"!=typeof document&&document.addEventListener("visibilitychange",function(){"visible"===document.visibilityState&&n._swUpdate.checkForUpdate().catch(function(e){return console.error("Error checking for SW update on tab focus:",e)})}),this._swUpdate.checkForUpdate().catch(function(e){return console.error("Initial SW update check error:",e)}))}},{key:"initGa4RouteTracking",value:function(){try{var e,t,n;null===(e=this.router)||void 0===e||null===(t=e.events)||void 0===t||null===(n=t.pipe((0,_i.h)(function(e){return e instanceof o.m2}),(0,y.R)(this._distroyed$)))||void 0===n||n.subscribe(function(e){var t,n,i;"undefined"!=typeof window&&(null===(t=window)||void 0===t?void 0:t.gtag)&&(null===(n=window)||void 0===n||n.gtag("event","page_view",{page_path:(null==e?void 0:e.urlAfterRedirects)||
1(null==e?void 0:e.url),page_title:"undefined"!=typeof document?null===(i=document)||void 0===i?void 0:i.title:""}))})}catch(i){}}},{key:"ngOnDestroy",value:function(){console.log("app destroy...."),this.modalService.dismissAll(),this.intervalId&&(clearInterval(this.intervalId),this.intervalId=null),this._distroyed$.next(null),this._distroyed$.complete(),this.pollingRprtIdsIntervalId&&clearInterval(this.pollingRprtIdsIntervalId)}}]),e}();return e.\u0275fac=function(t){return new(t||e)(a.Y36(a.Lbi),a.Y36(k.P),a.Y36(vt.Y),a.Y36(u.sK),a.Y36(_.FF),a.Y36(T.$h),a.Y36(o.F0),a.Y36(fi.N),a.Y36(E.t2),a.Y36(T.$P),a.Y36(T.rM),a.Y36(T.kg),a.Y36(be.o),a.Y36(yi.yO))},e.\u0275cmp=a.Xpm({type:e,selectors:[["app-root"]],viewQuery:function(e,t){var n;(1&e&&a.Gf(wi,5),2&e)&&(a.iGM(n=a.CRH())&&(t.vpnErrorAlert=n.first))},features:[a._Bn([_.NM,_.FF])],decls:8,vars:1,consts:[["name","appCompLoader","bdColor","rgba(0, 0, 0, 0.8)","size","medium","color","#fff","type","ball-circus",3,"fullScreen"],[1,"d-none"],["src","assets/images/pos-panel/sidebar/menu-loader-icon.svg"],["vpn_error_alert",""],[1,"cattwo-header"],[1,"modal-body","p-0"],[1,"cate-popup-body"],[1,"exclamation_icon"],["src","assets/images/login/exclamation_mark.svg","alt","exclamation_mark",1,"img-fluid"],[1,"cattwo-content"],[1,"text-center","mb-0"],[1,"withdbutton-group"],[1,"close-vpn-btn",3,"routerLink"],["type","button",1,"btn","outline-btn","cancel",3,"click"]],template:function(e,t){1&e&&(a._UZ(0,"app-tap-to-top"),a._UZ(1,"router-outlet"),a.TgZ(2,"ngx-spinner",0),a._UZ(3,"app-sadad-loader"),a.qZA(),a.TgZ(4,"div",1),a._UZ(5,"img",2),a.qZA(),a.YNc(6,Ti,20,14,"ng-template",null,3,a.W1O)),2&e&&(a.xp6(2),a.Q6J("fullScreen",!0))},directives:[bi,o.lC,E.Ro,C.T,o.yS],pipes:[u.X$],styles:[".exclamation_icon[_ngcontent-%COMP%]{height:64px;width:64px;margin:auto auto 30px}.exclamation_icon[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:100%;width:100%} .modal-cattwo .withdbutton-group>a:focus{outline:0} .modal-cattwo .withdbutton-group .close-vpn-btn .outline-btn{width:210px;max-width:220px}"]}),e}(),ki=i(17444),Ai=i(37986),Ci=i.n(Ai),xi=i(82249),Pi=i.n(xi),Oi=i(32041),Ni=i(91681),Ui=i(51816),Li=i(65595),Ri=function(){function e(t){s(this,e),this.http=t}return l(e,[{key:"getTranslation",value:function(e){var t=this;return this.http.get("./assets/i18n/".concat(e,".enc?v=").concat(f.N.panelVersion),{responseType:"text"}).pipe((0,Ni.U)(function(e){return t.handleDecryptionProcessSadadI18n(e)}),(0,Ui.K)(function(e){return t.handleFallbackErrorSadadI18n(e)}))}},{key:"handleDecryptionProcessSadadI18n",value:function(e){try{var t;if(!e)return{};var n=null===(t=Li.AES.decrypt(e,f.N.i18nKey||""))||void 0===t?void 0:t.toString(Li.enc.Utf8);return n?JSON.parse(n):{}}catch(i){return{}}}},{key:"handleFallbackErrorSadadI18n",value:function(e){return(0,Oi.of)({})}}]),e}();function Mi(e){return new Ri(e)}function Di(e){return new Ri(e)}(0,x.qS)(Ci()),(0,x.qS)(Pi());var Zi=function(){var e,t=l(function e(){s(this,e)});return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=a.oAB({type:t,bootstrap:[Ei]}),t.\u0275inj=a.cJS({providers:[{provide:a.qLn,useClass:I.L6},{provide:d.TP,useClass:I.bP,multi:!0},{provide:d.TP,useClass:I.aQ,multi:!0},{provide:d.TP,useClass:I.A8,multi:!0},{provide:a.soG,useValue:"ar"},{provide:a.soG,useValue:"en"},fi.N,vi,_n.n,{provide:a.qLn,useValue:(e=c.v$({showDialog:!1}),{handleError:function(t){var n,i,r,a,o,s,c,l,u,p,v;if(null!==(n=I.xl)&&void 0!==n&&n())null===(i=(r=console).error)||void 0===i||i.call(r,t);else if(!function(e){var t,n,i=null!==(t=null!==(n=null==e?void 0:e.rejection)&&void 0!==n?n:null==e?void 0:e.ngOriginalError)&&void 0!==t?t:e;if(i instanceof d.UA&&(0===(null==i?void 0:i.status)||503===(null==i?void 0:i.status)||502===(null==i?void 0:i.status)||504===(null==i?void 0:i.status)||429===(null==i?void 0:i.status)))return!0;var r,a,o,s,c,l,u,p,v,h,g=String((null==i?void 0:i.message)||(null==e?void 0:e.message)||"");return/:\s*0 Unknown Error/.test(g)||/blocked by CORS policy/i.test(g)||(0,I.Y$)(g)||(v=null!==(a=null!==(o=null==(r=i)?void 0:r.status)&&void 0!==o?o:null==r||null===(s=r.error)||void 0===s?void 0:s.status)&&void 0!==a?a:null==r?void 0:r.statusCode,h=String((null==r?void 0:r.message)||(null==r||null===(c=r.error)||void 0===c?void 0:c.message)||(null==r?void 0:r.statusText)||""),503===v||502===v||504===v||429===v||(null==h||null===(l=h.includes)||void 0===l?void 0:l.call(h,"503"))||(null==h||null===(u=h.includes)||void 0===u?void 0:u.call(h,"429"))||(null==h||null===(p=h.includes)||void 0===p?void 0:p.call(h,"Service Temporarily Unavailable")))||(0,I.Op)(g)||(0,I.U$)(g)||(0,I.Pw)(i)||(0,I.Pw)(e)}(t)){var h=null!==(a=null!==(o=null==t?void 0:t.rejection)&&void 0!==o?o:null==t?void 0:t.ngOriginalError)&&void 0!==a?a:t;(h instanceof d.UA||null!==(s=h)&&void 0!==s&&s.headers&&null!==(c=h)&&void 0!==c&&c.status)&&(h=new Error("HTTP ".concat(null===(l=h)||void 0===l?void 0:l.status," Failure (").concat(null===(u=h)||void 0===u?void 0:u.url,"): ").concat((null===(p=h)||void 0===p?void 0:p.message)||(null===(v=h)||void 0===v?void 0:v.statusText)))),e.handleError(h)}}})},{provide:c.aN,deps:[o.F0]},{provide:a.ip1,useFactory:function(){return function(){}},deps:[c.aN],multi:!0}],imports:[[r.b2,p.PW,v.m,gi,d.JF,fe.A0,ki.ZX,mi.Rh.forRoot(),u.aw.forRoot({loader:{provide:u.Zw,useFactory:Mi,deps:[d.eN]},defaultLanguage:f.N.defaultLang}),yi.Wr.register("ngsw-worker.js",{enabled:f.N.production,registrationStrategy:"registerWhenStable:30000"}),E.ef,P.xC]]}),t}()},77818:function(e,t,n){"use strict";n.d(t,{A:function(){return a}});var i=n(94544),r=n(35366),a=function(){var e=function(){function e(){s(this,e)}return l(e,[{key:"ngOnInit",value:function(){setTimeout(function(){i.replace()})}}]),e}();return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=r.Xpm({type:e,selectors:[["app-feather-icons"]],inputs:{icon:"icon"},decls:1,vars:1,template:function(e,t){1&e&&r._UZ(0,"i"),2&e&&r.uIk("data-feather",t.icon)},styles:[""]}),e}()},48436:function(e,t,n){"use strict";n.d(t,{T:function(){return r}});var i=n(35366),r=function(){var e=function(){function e(){s(this,e)}return l(e,[{key:"ngOnInit",value:function(){}}]),e}();return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=i.Xpm({type:e,selectors:[["app-sadad-loader"]],decls:8,vars:0,consts:[["version","1.1","id","L3","xmlns","http://www.w3.org/2000/svg",0,"xmlns","xlink","http://www.w3.org/1999/xlink","x","0px","y","0px","viewBox","0 0 100 100","enable-background","new 0 0 0 0",0,"xml","space","preserve",1,"iu"],["fill","none","stroke","#F2C6CA","stroke-width","4","cx","50","cy","50","r","44",2,"opacity","1"],["fill","#F2C6CA","stroke","#F2C6CA","stroke-width","3","cx","8","cy","54","r","6"],["attributeName","transform","dur","2s","type","rotate","from","0","to","360","repeatCount","indefinite"],["xmlns","http://www.w3.org/2000/svg","width","50","height","50","viewBox","0 0 45.59 55",1,"sadad"],["transform","translate(-1096.134 -842.5)"],["d","M287.773,285.983q-5.992,4.047-5.991,11.82A15.362,15.362,0,0,0,283,304a14.037,14.037,0,0,0,3.117,4.615,19.836,19.836,0,0,0,4.776,3.28,35.133,35.133,0,0,0,5.506,2.266q2.083.641,4.7,1.283l.224-3.692,12.806,8.469-13.736,6.856.27-4.463a31.354,31.354,0,0,1-5.523-.763,29.571,29.571,0,0,1-5.263-1.618q-1.781-.809-4.453-2.347l-5.02,11.98q.162.081,2.065,1.254a41.033,41.033,0,0,0,4.047,2.187,31.621,31.621,0,0,0,6.518,1.943,41.4,41.4,0,0,0,4.451.688h9.348a31.719,31.719,0,0,0,6.32-1.376,18.456,18.456,0,0,0,8.3-5.547,14.141,14.141,0,0,0,3.4-9.592,14.624,14.624,0,0,0-.89-5.143,16.815,16.815,0,0,0-2.105-4.047,13.485,13.485,0,0,0-3.36-3.117,34.439,34.439,0,0,0-3.846-2.308,28.821,28.821,0,0,0-4.331-1.659q-2.632-.809-4.048-1.174c-.642-.165-1.43-.35-2.358-.553l-.125,4.289-13.068-8.058,13.515-7.288-.147,5.061a36.212,36.212,0,0,1,6.8,1.084,21.911,21.911,0,0,1,6.761,2.672l5.181-11.9a39.27,39.27,0,0,0-20.32-5.344q-8.744,0-14.734,4.049","transform","translate(816.372 561.066)","fill","#F2C6CA"],["d","M306.862,336.434h-9.4l-.025,0a42.087,42.087,0,0,1-4.5-.7,32.218,32.218,0,0,1-6.627-1.98,41.729,41.729,0,0,1-4.1-2.214c-1.243-.765-1.925-1.18-2.027-1.233l-.418-.209.182-.431,5.239-12.5.491.283c1.76,1.013,3.244,1.8,4.41,2.325a29.233,29.233,0,0,0,5.169,1.586,31.012,31.012,0,0,0,5.436.75l.5.026-.249,4.1,12.186-6.083-11.361-7.514-.208,3.425-.582-.143c-1.758-.431-3.35-.865-4.732-1.29a35.809,35.809,0,0,1-5.584-2.3,20.417,20.417,0,0,1-4.9-3.365,14.6,14.6,0,0,1-3.23-4.777,15.928,15.928,0,0,1-1.255-6.392c0-5.335,2.09-9.451,6.211-12.234a23.057,23.057,0,0,1,6.826-3.1,30.975,30.975,0,0,1,8.188-1.03,42.625,42.625,0,0,1,10.834,1.353,38.447,38.447,0,0,1,9.741,4.061l.381.225-5.6,12.859-.5-.338a21.55,21.55,0,0,0-6.6-2.6,35.882,35.882,0,0,0-6.7-1.07l-.486-.028.136-4.682-11.991,6.465,11.594,7.149.117-4.026.589.129c.936.205,1.735.393,2.376.558.944.242,2.275.628,4.07,1.18a29.445,29.445,0,0,1,4.407,1.69,35.092,35.
1092,0,0,1,3.9,2.341,14.045,14.045,0,0,1,3.482,3.235,17.385,17.385,0,0,1,2.17,4.167,15.19,15.19,0,0,1,.921,5.318,14.688,14.688,0,0,1-3.522,9.919,19.03,19.03,0,0,1-8.519,5.694,32.366,32.366,0,0,1-6.42,1.4Zm-9.351-1H306.8A31.35,31.35,0,0,0,313,334.083a18.043,18.043,0,0,0,8.077-5.4,13.716,13.716,0,0,0,3.278-9.264,14.193,14.193,0,0,0-.858-4.968,16.394,16.394,0,0,0-2.04-3.926,13.058,13.058,0,0,0-3.237-3,34.1,34.1,0,0,0-3.789-2.274,28.471,28.471,0,0,0-4.254-1.629c-1.78-.547-3.1-.929-4.025-1.167-.491-.126-1.078-.266-1.752-.418l-.133,4.549-14.543-8.967,15.04-8.11-.158,5.444a37.435,37.435,0,0,1,6.405,1.067,24.4,24.4,0,0,1,6.413,2.421l4.77-10.956a39.019,39.019,0,0,0-19.684-5.053c-5.7,0-10.564,1.333-14.454,3.963-3.83,2.586-5.771,6.424-5.771,11.406a14.937,14.937,0,0,0,1.173,5.993,13.605,13.605,0,0,0,3,4.453,19.424,19.424,0,0,0,4.656,3.2,34.809,34.809,0,0,0,5.426,2.234c1.21.373,2.585.752,4.095,1.131l.24-3.957,14.251,9.425-15.285,7.63.292-4.827a31.772,31.772,0,0,1-5.107-.746,30.15,30.15,0,0,1-5.356-1.65c-1.084-.493-2.429-1.194-4-2.088l-4.632,11.055c.291.176.8.485,1.7,1.039a40.726,40.726,0,0,0,4,2.161,31.313,31.313,0,0,0,6.408,1.906A41.079,41.079,0,0,0,297.511,335.434Z","transform","translate(816.372 561.066)","fill","rgba(0,0,0,0)"]],template:function(e,t){1&e&&(i.O4$(),i.TgZ(0,"svg",0),i._UZ(1,"circle",1),i.TgZ(2,"circle",2),i._UZ(3,"animateTransform",3),i.qZA(),i.qZA(),i.TgZ(4,"svg",4),i.TgZ(5,"g",5),i._UZ(6,"path",6),i._UZ(7,"path",7),i.qZA(),i.qZA())},styles:["@import url(https://fonts.googleapis.com/css?family=Comfortaa:400,700,300);svg[_ngcontent-%COMP%]{width:100px;height:100px;margin:20px;display:inline-block}.sadad[_ngcontent-%COMP%]{width:50px;height:50px;margin-left:-95px;position:absolute;top:23px}"]}),e}()},35379:function(e,t,n){"use strict";n.d(t,{SV:function(){return i},kp:function(){return r},E1:function(){return a},PC:function(){return o},cV:function(){return s},NI:function(){return c},RV:function(){return l},LM:function(){return u},_w:function(){return d},HA:function(){return p},iA:function(){return v},M9:function(){return h},kO:function(){return g},Tl:function(){return m},He:function(){return f},nZ:function(){return _},AN:function(){return y}});var i={1:"INVOICE",2:"SUBSCRIPTION",3:"ADD_FUNDS",4:"WITHDRAWAL",5:"WALLET_TRANSFER",6:"STORE_LINK",7:"PG_API",8:"QR_TRANSFER",9:"PG_API",10:"AJAX_TRAX",11:"SUBSCRIPTION",12:"MAWAID",13:"REWARD",14:"REWARD_ADD_FUNDS",15:"PARTNER_REWARD",16:"MANUAL_SERVICE_CHARGE",17:"POS_TRAX",23:"SHIPPING_SERVICE_DELIVERY",24:"SHIPPING_SERVICE_PROMOTION"}
1,r={"Shipping Service - Delivery":"SHIPPING_SERVICE_DELIVERY","Shipping Service - Promotion":"SHIPPING_SERVICE_PROMOTION","Shipping Service - RTS":"SHIP_SERVICE_RTS","SHIPPING DELIVERY":"SHIPPING_SERVICE_DELIVERY","SHIPPING PROMOTION":"SHIPPING_SERVICE_PROMOTION","SHIPPING RTS":"SHIP_SERVICE_RTS"},a={1:"Credit Card",2:"Debit Card",3:"Sadad Wallet"},o={REFUND:"REFUNDED",PENDING:"REQUESTED",REJECTED:"REJECTED"},s={REFUND:"REFUNDED",PENDING:"REQUESTED",REJECTED:"REJECTED"},c={1:"In-progress",2:"Failed",3:"Success",4:"Refunded",5:"Pending",6:"OnHold",7:"Rejected"},l={1:"INPROGRESS",2:"FAILED",3:"SUCCESS",4:"REFUNDED",5:"REQUESTED",6:"ONHOLD",7:"REJECTED"},u=[{value:"VISA",label:"Visa",code:"VISA"},{value:"MASTERCARD",label:"Master Card",code:"MASTERCARD"},{value:"HIMYAN",label:"Himyan",code:"HIMYAN"},{value:"AMERICAN EXPRESS",label:"AMEX",code:"AMEX"},{value:"JCB",label:"JCB",code:"JCB"},{value:"UPI",label:"UPI",code:"UPI"},{value:"SADAD PAY",label:"Sadad Pay",code:"SADAD_PAY"},{value:"APPLE PAY",label:"Apple Pay",code:"APPLE_PAY"},{value:"GOOGLE PAY",label:"Google Pay",code:"GOOGLE_PAY"}],d=[{value:"VISA",label:"Visa",code:"VISA"},{value:"MASTERCARD",label:"Master Card",code:"MASTERCARD"},{value:"HIMYAN",label:"Himyan",code:"HIMYAN"},{value:"AMERICAN EXPRESS",label:"AMEX",code:"AMEX"},{value:"SADAD PAY",label:"Sadad Pay",code:"SADAD_PAY"},{value:"APPLE PAY",label:"Apple Pay",code:"APPLE_PAY"},{value:"GOOGLE PAY",label:"Google Pay",code:"GOOGLE_PAY"}],p=[{value:"VISA",label:"Visa",code:"VISA"},{value:"MASTERCARD",label:"Master Card",code:"MASTERCARD"},{value:"Sadad Pay",label:"Sadad Pay",code:"SADAD_PAY"},{value:"Google Pay",label:"Google Pay",code:"GOOGLE_PAY"},{value:"Apple Pay",label:"Apple Pay",code:"APPLE_PAY"}],v=[{value:"visa",label:"Visa",code:"VISA"},{value:"master",label:"Master Card",code:"MASTERCARD"},{value:"amex",label:"AMEX",code:"AMEX"},{value:"jcb",label:"JCB",code:"JCB"},{value:"upi",label:"UPI",code:"UPI"}],h=[{value:"VISA",label:"Visa",code:"VISA"},{value:"MASTERCARD",label:"Master Card",code:"MASTERCARD"},{value:"naps",label:"NAPS",code:"NAPS"},{value:"HIMYAN",label:"Himyan",code:"HIMYAN"},{value:"TOKEN",label:"Token",code:"Token"},{value:"AMERICAN EXPRESS",label:"AMEX",code:"AMEX"},{value:"JCB",label:"JCB",code:"JCB"},{value:"UPI",label:"UPI",code:"UPI"}],g={VISA:{class:"visa",svg:"visa"},MASTERCARD:{class:"mc",svg:"mastercard"},"AMERICAN EXPRESS":{class:"amex",svg:"amex"},UPI:{class:"samsungpay",svg:"upi"},JCB:{class:"jcb",svg:"jcb"},"APPLE PAY":{class:"applepay",svg:"apple_pay"},"GOOGLE PAY":{class:"gpay",svg:"google-pay"},"SADAD PAY":{class:"sadadpay",svg:"sadadpay"},NAPS:{class:"naps",svg:"naps"},TOKEN:{class:"token",svg:"token"},HIMYAN:{class:"samsungpay",svg:"himyan"}},m=30,f={"op-live-payments":"merchantpanel/online-payment-transactions?tab=tab1&id=VALUE_1&isTest=live"},_=/[A-Za-z0-9 ]/,y=/^[A-Za-z ]*$/},59938:function(e,t,n){"use strict";n.d(t,{go:function(){return i},Xn:function(){return r},P3:function(){return a},o:function(){return s},i7:function(){return c}});var i="Shipping Service - Delivery",r="Shipping Service - Promotion",a="Shipping Service - RTS";function o(e){return encodeURIComponent(e)}function s(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=["".concat(e,"/merchantpanel/shipping")],i=["tab=".concat(o(t.tab||"orders"))];return t.shipId&&i.push("shipId=".concat(o(t.shipId))),t.transactionId&&i.push("transactionId=".concat(o(t.transactionId))),n.push("?".concat(i.join("&"))),n.join("")}function c(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=["".concat(e,"/merchantpanel/online-payment-transactions")],i=["tab=".concat(o(t.tab||"tab1")),"isTest=".concat(o(t.isTest||"live"))];return t.id&&i.push("id=".concat(o(t.id))),n.push("?".concat(i.join("&"))),n.join("")}},28627:function(e,t,n){"use strict";n.d(t,{n:function(){return u}});var i=n(25160),r=n(35366),a=n(54391),o=n(22106),c=n(98109),u=function(){var e=function(){function e(t,n,i,r){s(this,e),this.router=t,this.permissionService=n,this._authSer=i,this._paymentServiceTypeService=r}return l(e,[{key:"canActivate",value:function(e,t){var n,r,a,o,s,c,l,u,d="/dashboard/pos-default",p=d,v=this._authSer.currentUserValue;return!!this.isUserAuthenticated(v)&&(u=this.permissionService.hasRoutePermission(null!=e&&e.url[1]?e.url[1].path:e.url[0].path),p=1!=(null==v?void 0:v.roleId)&&null!=v&&v.isSubUserPublicAccess?{14:d,16:d,17:d}[null==v?void 0:v.roleId]:{14:d,16:"/merchantpanel/invoice",17:"/merchantpanel/online-payment-settings"}[null==v?void 0:v.roleId],u||this.router.navigate([p]),"manage-merchants"!=(null==e||null===(n=e.url[1])||void 0===n?void 0:n.path)||null!==(r=this._authSer)&&void 0!==r&&null!==(a=r.currentUserValue)&&void 0!==a&&a.isallowedtoaddsubmerchant||(console.log("path:",null==e||null===(o=e.url[1])||void 0===o?void 0:o.path),this.router.navigate(["/dashboard/pos-default"])),"shipping"==(null==e||null===(s=e.url[1])||void 0===s?void 0:s.path)?!!u&&((0,i.wt)(null===(c=this._authSer)||void 0===c||null===(l=c.currentUserValue)||void 0===l?void 0:l.is_shipping_enabled)?u:(this.router.navigate([(0,i.yR)(this._paymentServiceTypeService.serviceType)]),!1)):u)}},{key:"isUserAuthenticated",value:function(e){return!(!e||null==e||!e.roleId)||
1(this.router.navigate(["/auth/login"]),!1)}}]),e}();return e.\u0275fac=function(t){return new(t||e)(r.LFG(a.F0),r.LFG(o.$),r.LFG(c.$h),r.LFG(c.Yx))},e.\u0275prov=r.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e}()},8500:function(e,t,n){"use strict";n.d(t,{P:function(){return r}});var i=n(35366),r=function(){var e=function(){function e(){s(this,e),this.config={settings:{layout:"Dubai",layout_type:"rtl",layout_version:"light-only",sidebar_type:"default-sidebar"},color:{primary_color:"#7366ff",secondary_color:"#f73164"}},this.selectedLang="",this.setRTLsettings(this.config.settings.layout_type),document.documentElement.style.setProperty("--theme-deafult",this.config.color.primary_color),document.documentElement.style.setProperty("--theme-secondary",this.config.color.secondary_color)}return l(e,[{key:"changeLayoutType",value:function(e){this.config.settings.layout_type=e,this.setRTLsettings(e)}},{key:"setRTLsettings",value:function(e){document.getElementsByTagName("html")[0].setAttribute("dir",this.config.settings.layout_type)}},{key:"getLayoutType",value:function(){var e,t;return(null===(e=this.config)||void 0===e||null===(t=e.settings)||void 0===t?void 0:t.layout_type)||""}}]),e}();return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=i.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e}()},54803:function(e,t,n){"use strict";n.d(t,{t:function(){return h}});var i=n(89666),r=n(97425),a=n(65960),o=n(5057),c=n(69568),u=n(529),d=n(35366),p=n(54391),v=n(58858),h=function(){var e=function(){function e(t,n){var l=this;s(this,e),this.router=t,this._paymentServiceTypeService=n,this.serviceType=this._paymentServiceTypeService.serviceType,this.unsubscriber=new i.x,this.screenWidth=new r.X(window.innerWidth),this.isProdEnv=u.N.production,this.isLocalEnv=u.N.local,this.search=!1,this.language=!1,this.megaMenu=!1,this.levelMenu=!1,this.megaMenuColapse=window.innerWidth<1199,this.collapseSidebar=window.innerWidth<991,this.horizontal=!(window.innerWidth<991),this.fullScreen=!1,this.MENUITEMS=[{path:"/dashboard/".concat(this.serviceType,"-default"),title:"Home",icon:"home",type:"link",serviceType:"common"},{path:"/merchantpanel/".concat(this.serviceType,"-transactions"),title:"Transactions",icon:"bell",type:"link",serviceType:"common"},{path:"/merchantpanel/settlement",title:"Settlement",icon:"bell",type:"link",serviceType:"common"},{path:"/merchantpanel/balance-statement",title:"Balance Statement",icon:"bell",type:"link",serviceType:"common"},{path:"/merchantpanel/invoice",title:"Invoices",icon:"bell",type:"link",serviceType:"online-payment"},{path:"/merchantpanel/".concat(this.serviceType,"-settings"),title:"Payment Gateway",icon:"bell",type:"link",serviceType:"online-payment"},{path:"/merchantpanel/".concat(this.serviceType,"-terminals"),title:"Terminals",icon:"bell",type:"link",serviceType:"pos"},{path:"/merchantpanel/pos-batch-summary",title:"Batch Summary",icon:"bell",type:"link",serviceType:"pos"},{path:"/merchantpanel/".concat(this.serviceType,"-reports"),title:"Reports",icon:"bell",type:"link",serviceType:"common"},{path:"/merchantpanel/sadad-services",title:"Sadad Services",icon:"bell",type:"link",serviceType:"online-payment"},{path:"/merchantpanel/".concat(this.serviceType,"-settings"),title:"Settings",icon:"bell",type:"link",serviceType:"pos"},{path:"/merchantpanel/shipping",title:"Shipping",icon:"bell",type:"link",serviceType:"online-payment"},{path:"/merchantpanel/manage-users",title:"Manage Users",icon:"bell",type:"link",serviceType:"common"},{path:"/merchantpanel/manage-merchants",title:"Manage Merchants",icon:"bell",type:"link",serviceType:"common"},{path:"/merchantpanel/myaccounts",title:"My Account",icon:"bell",type:"link",serviceType:"common"}],this.items=new r.X(this.MENUITEMS),this.setScreenWidth(window.innerWidth),(0,a.R)(window,"resize").pipe((0,o.b)(1e3),(0,c.R)(this.unsubscriber)).subscribe(function(e){l.setScreenWidth(e.target.innerWidth),e.target.innerWidth<991&&(l.collapseSidebar=!0,l.megaMenu=!1,l.levelMenu=!1),e.target.innerWidth<1199&&(l.megaMenuColapse=!0)}),window.innerWidth<991&&this.router.events.subscribe(function(e){l.collapseSidebar=!0,l.megaMenu=!1,l.levelMenu=!1}),this._paymentServiceTypeService.paymentService.subscribe(function(e){l.serviceType=e,l.items.next(l.getMENUITEMS(l.serviceType))})}return l(e,[{key:"ngOnInit",value:function(){this.isProdEnv||(this.MENUITEMS=this.MENUITEMS.concat([{path:"/merchantpanel/subscription",title:"Subscriptions",icon:"bell",type:"link",serviceType:"online-payment"},{path:"/merchantpanel/mawaid",title:"Mawaid",icon:"bell",type:"link",serviceType:"online-payment"}]))}},{key:"ngOnDestroy",value:function(){this.unsubscriber.next(null),this.unsubscriber.complete()}},{key:"setScreenWidth",value:function(e){this.screenWidth.next(e)}},{key:"getMENUITEMS",value:function(e){return this.MENUITEMS=[{path:"/dashboard/".concat(e,"-default"),title:"Home",icon:"home",type:"link",serviceType:"common"},{path:"/merchantpanel/".concat(this.serviceType,"-transactions"),title:"Transactions",icon:"bell",type:"link",serviceType:"common"},{path:"/merchantpanel/settlement",title:"Settlement",icon:"bell",type:"link",serviceType:"common"},{path:"/merchantpanel/balance-statement",title:"Balance Statement",icon:"bell",type:"link",serviceType:"common"},{path:"/merchantpanel/invoice",title:"Invoices",icon:"bell",type:"link",serviceType:"online-payment"},{path:"/merchantpanel/".concat(this.serviceType,"-settings"),title:"Payment Gateway",icon:"bell",type:"link",serviceType:"online-payment"},{path:"/merchantpanel/basicstore",title:"Basicstore",icon:"bell",type:"link",serviceType:"online-payment"},{path:"/merchantpanel/".concat(this.serviceType,"-terminals"),title:"Terminals",icon:"bell",type:"link",serviceType:"pos"},{path:"/merchantpanel/pos-batch-summary",title:"Batch Summary",icon:"bell",type:"link",serviceType:"pos"},{path:"/merchantpanel/".concat(this.serviceType,"-reports"),title:"Reports",icon:"bell",type:"link",serviceType:"common"},{path:"/merchantpanel/".concat(this.serviceType,"-settings"),title:"Settings",icon:"bell",type:"link",serviceType:"pos"},{path:"/merchantpanel/shipping",title:"Shipping",icon:"bell",type:"link",serviceType:"online-payment"},{path:"/merchantpanel/sadad-services",title:"Sadad Services",icon:"bell",type:"link",serviceType:"online-payment"},{path:"/merchantpanel/sadadvas",title:"SadadVas",icon:"bell",type:"link",serviceType:"online-payment"},{path:"/merchantpanel/manage-users",title:"Manage Users",icon:"bell",type:"link",serviceType:"common"},{path:"/merchantpanel/manage-merchants",title:"Manage Merchants",icon:"bell",type:"link",serviceType:"common"},{path:"/merchantpanel/myaccounts",title:"My Account",icon:"bell",type:"link",serviceType:"common"}],this.isProdEnv||(this.MENUITEMS.splice(7,0,{path:"/merchantpanel/subscription",title:"Subscriptions",icon:"bell",type:"link",serviceType:"online-payment"}),this.MENUITEMS.splice(8,0,{path:"/merchantpanel/mawaid",title:"Mawaid",icon:"bell",type:"link",serviceType:"online-payment"})),this.MENUITEMS}}]),e}();return e.\u0275fac=function(t){return new(t||e)(d.LFG(p.F0),d.LFG(v.Y))},e.\u0275prov=d.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e}()},22106:function(e,t,n){"use strict";n.d(t,{$:function(){return o}});var i=n(529),r=n(35366),a=n(98109),o=function(){var e=function(){function e(t,n){var r=this;s(this,e),this.authenticationService=t,this._paymentServiceTypeService=n,this.allowedMerchantsOPSdSer=i.N.sdSerUsersMerIds,this.permissions={API_SUB_USER:{"online-payment-default":["VIEW","PAY_COUNT"],"online-payment-transactions":["VIEW","PRODUCT_REFUND","SANDBOX_REFUND","DISPUTE"],"pos-transactions":["VIEW"],"online-payment-settings":["VIEW","EDIT","CONFIGURE_API","CA_LIVE","WEBHOOK"],"show-environment-change":["EDIT"],header:["NOTIFICATIONS"],service_type_change:["EDIT"],"pos-settings":["VIEW"]},API_SUB_USER_PROD_PUB:{"online-payment-default":["VIEW"],"online-payment-transactions":["VIEW","SANDBOX_REFUND"],"online-payment-settings":["VIEW","EDIT","CONFIGURE_API","CA_LIVE","WEBHOOK","CUSTOMIZE_CHECKOUT"],"show-environment-change":["EDIT"],service_type_change:["EDIT"],"pos-settings":["VIEW"]},API_SUB_USER_PROD_PRI:{"online-payment-settings":["VIEW","EDIT","CONFIGURE_API","WEBHOOK"],service_type_change:["EDIT"],"pos-settings":["VIEW"]},API_SUB_USER_DEV_PUB:{"online-payment-default":["VIEW"],"online-payment-transactions":["VIEW","SANDBOX_REFUND"],"online-payment-settings":["VIEW","EDIT","CONFIGURE_API","CA_LIVE","WEBHOOK","CUSTOMIZE_CHECKOUT"],"show-environment-change":["EDIT"],service_type_change:["EDIT"],"pos-settings":["VIEW"]},API_SUB_USER_DEV_PRI:{"online-payment-settings":["VIEW","EDIT","CONFIGURE_API","WEBHOOK"],service_type_change:["EDIT"],"pos-settings":["VIEW"]},API_SUB_USER_PROD:{"pos-transactions":["VIEW"],"online-payment-settings":["VIEW","EDIT","CONFIGURE_API","CA_LIVE","WEBHOOK"],"show-environment-change":["EDIT"],header:["NOTIFICATIONS"],service_type_change:["EDIT"],"pos-settings":["VIEW"]},FINANCE_SUB_USER:{"online-payment-default":["VIEW","EXPORT_DATA","PAY_COUNT"],"pos-default":["VIEW"],invoice:["VIEW"],basicstore:["VIEW","PRODUCT_CREATE","ECOMM_LINK","EXPORT","DELETE_PRODUCT","MARK_AS_DELIVERED","EDIT_PROD","SHOWHIDE_PROD"],settlement:["VIEW","CANCEL_REQUEST","SETT_BATCH"],"online-payment-transactions":["VIEW","PRODUCT_DOWNLOAD","PRODUCT_REFUND","SANDBOX_REFUND","DISPUTE"],"pos-transactions":["VIEW"],subscription:["VIEW","PLAN_CREATE","PLAN_EDIT","PLAN_EXPORT","PLAN_ACT_INACT"],"pos-terminals":["VIEW"],"pos-devices":["VIEW"],"online-payment-reports":["VIEW","DOWNLOAD_HISTORY"],"pos-reports":["VIEW","DOWNLOAD_HISTORY"],service_type_change:["EDIT"],"pos-terminal-maps":["VIEW"],mawaid:["VIEW"],header:["NOTIFICATIONS"],"pos-batch-summary":["full"]},FINANCE_SUB_USER_DEV_PUB:{"online-payment-default":["VIEW","EXPORT_DATA","PAY_COUNT","LIVE_TRAX_BAL"],"pos-default":["VIEW","LIVE_TRAX_BAL"],invoice:["VIEW"],basicstore:["VIEW","PRODUCT_CREATE","ECOMM_LINK","EXPORT","DELETE_PRODUCT","MARK_AS_DELIVERED","EDIT_PROD","SHOWHIDE_PROD"],settlement:["VIEW","CANCEL_REQUEST","WITHDRAW_FUNDS","SETT_BATCH"],"online-payment-transactions":["VIEW","PRODUCT_DOWNLOAD","PRODUCT_REFUND","DISPUTE"],"pos-transactions":["VIEW","POS_RENTAL"],subscription:["VIEW","PLAN_EXPORT"],"pos-terminals":["VIEW"],"pos-devices":["VIEW"],"online-payment-reports":["VIEW","DOWNLOAD_HISTORY","SUB_USR_FILTER"],"pos-reports":["VIEW","DOWNLOAD_HISTORY","SUB_USR_FILTER"],myaccounts:["VIEW","UPLOAD_BUSINESS_DOC","BANK_DETAIL","BI_MSGS","BI_INFO","BI_PROFILE_PIC","BI_QRCODE"],service_type_change:["EDIT"],"pos-terminal-maps":["VIEW"],header:["NOTIFICATIONS"],"balance-statement":["VIEW"],"pos-batch-summary":["full"]},FINANCE_SUB_USER_DEV_PRI:{"online-payment-default":["VIEW","EXPORT_DATA","PAY_COUNT","LIVE_TRAX_BAL"],"online-payment-transactions":["VIEW","PRODUCT_DOWNLOAD","DISPUTE"],settlement:["VIEW","SETT_BATCH"],"balance-statement":["VIEW"],invoice:["VIEW"],basicstore:["VIEW","PRODUCT_CREATE","ECOMM_LINK","EXPORT","DELETE_PRODUCT","MARK_AS_DELIVERED","EDIT_PROD","SHOWHIDE_PROD"],subscription:["VIEW","PLAN_EXPORT"],"online-payment-reports":["VIEW","DOWNLOAD_HISTORY"],myaccounts:["BI_QRCODE"],service_type_change:["EDIT"],"pos-default":["VIEW","LIVE_TRAX_BAL"],"pos-terminal-maps":["VIEW"],"pos-transactions":["VIEW","POS_RENTAL"],"pos-terminals":["VIEW"],"pos-devices":["VIEW"],"pos-reports":["VIEW","DOWNLOAD_HISTORY"],"pos-batch-summary":["full"],header:["NOTIFICATIONS"]},FINANCE_SUB_USER_PROD_PUB:{"online-payment-default":["VIEW","EXPORT_DATA","PAY_COUNT","LIVE_TRAX_BAL"],"pos-default":["VIEW","LIVE_TRAX_BAL"],invoice:["VIEW"],basicstore:["VIEW","PRODUCT_CREATE","ECOMM_LINK","EXPORT","DELETE_PRODUCT","MARK_AS_DELIVERED","EDIT_PROD","SHOWHIDE_PROD"],settlement:["VIEW","CANCEL_REQUEST","WITHDRAW_FUNDS","SETT_BATCH"],"online-payment-transactions":["VIEW","PRODUCT_DOWNLOAD","PRODUCT_REFUND","DISPUTE"],"pos-transactions":["VIEW","POS_RENTAL"],subscription:["VIEW","PLAN_EXPORT"],"pos-terminals":["VIEW"],"pos-devices":["VIEW"],"online-payment-reports":["VIEW","DOWNLOAD_HISTORY","SUB_USR_FILTER"],"pos-reports":["VIEW","DOWNLOAD_HISTORY","SUB_USR_FILTER"],myaccounts:["VIEW","UPLOAD_BUSINESS_DOC","BANK_DETAIL","BI_MSGS","BI_INFO","BI_PROFILE_PIC","BI_QRCODE"],service_type_change:["EDIT"],"pos-terminal-maps":["VIEW"],header:["NOTIFICATIONS"],"balance-statement":["VIEW"],"pos-batch-summary":["full"]},FINANCE_SUB_USER_PROD_PRI:{"online-payment-default":["VIEW","EXPORT_DATA","PAY_COUNT","LIVE_TRAX_BAL"],"online-payment-transactions":["VIEW","PRODUCT_DOWNLOAD","DISPUTE"],settlement:["VIEW","SETT_BATCH"],"balance-statement":["VIEW"],invoice:["VIEW"],basicstore:["VIEW","PRODUCT_CREATE","ECOMM_LINK","EXPORT","DELETE_PRODUCT","MARK_AS_DELIVERED","EDIT_PROD","SHOWHIDE_PROD"],subscription:["VIEW","PLAN_EXPORT"],"online-payment-reports":["VIEW","DOWNLOAD_HISTORY"],myaccounts:["BI_QRCODE"],service_type_change:["EDIT"],"pos-default":["VIEW","LIVE_TRAX_BAL"],"pos-terminal-maps":["VIEW"],"pos-transactions":["VIEW","POS_RENTAL"],"pos-terminals":["VIEW"],"pos-devices":["VIEW"],"pos-reports":["VIEW","DOWNLOAD_HISTORY"],"pos-batch-summary":["full"],header:["NOTIFICATIONS"]},SALES_SUB_USER:{"online-payment-default":["VIEW","PAY_COUNT"],"pos-default":["VIEW"],invoice:["VIEW"],basicstore:["VIEW","PRODUCT_CREATE","ECOMM_LINK","EXPORT"],"online-payment-transactions":["VIEW","DISPUTE","SANDBOX_REFUND"],"pos-transactions":["VIEW"],subscription:["VIEW","PLAN_CREATE","PLAN_EDIT","PLAN_EXPORT","PLAN_ACT_INACT"],"pos-terminals":["VIEW"],"pos-devices":["VIEW"],service_type_change:["EDIT"],"pos-terminal-maps":["VIEW"],mawaid:["VIEW"],header:["NOTIFICATIONS"]},SALES_SUB_USER_DEV_PUB:{"online-payment-default":["VIEW"],invoice:["VIEW"],basicstore:["VIEW","PRODUCT_CREATE","ECOMM_LINK","EXPORT","DELETE_PRODUCT","EDIT_PROD","SHOWHIDE_PROD","MARK_AS_DELIVERED"],"online-payment-transactions":["VIEW","PRODUCT_DOWNLOAD"],"pos-transactions":["VIEW"],subscription:["VIEW","PLAN_CREATE","PLAN_EDIT","PLAN_DELETE","PLAN_EXPORT","PLAN_ACT_INACT"],"pos-terminal-maps":["VIEW"],myaccounts:["BI_QRCODE"]},SALES_SUB_USER_DEV_PRI:{"online-payment-default":["VIEW"],invoice:["VIEW"],basicstore:["VIEW","PRODUCT_CREATE","ECOMM_LINK","EXPORT","DELETE_PRODUCT","EDIT_PROD","SHOWHIDE_PROD","MARK_AS_DELIVERED"],"online-payment-transactions":["VIEW","PRODUCT_DOWNLOAD"],"pos-transactions":["VIEW"],subscription:["VIEW","PLAN_CREATE","PLAN_EDIT","PLAN_DELETE","PLAN_EXPORT","PLAN_ACT_INACT"],"pos-terminal-maps":["VIEW"],myaccounts:["BI_QRCODE"]},SALES_SUB_USER_PROD_PUB:{"online-payment-default":["VIEW"],invoice:["VIEW"],basicstore:["VIEW","PRODUCT_CREATE","ECOMM_LINK","EXPORT","DELETE_PRODUCT","EDIT_PROD","SHOWHIDE_PROD","MARK_AS_DELIVERED"],"online-payment-transactions":["VIEW","PRODUCT_DOWNLOAD"],"pos-transactions":["VIEW"],subscription:["VIEW","PLAN_CREATE","PLAN_EDIT","PLAN_DELETE","PLAN_EXPORT","PLAN_ACT_INACT"],"pos-terminal-maps":["VIEW"],myaccounts:["BI_QRCODE"]},SALES_SUB_USER_PROD_PRI:{"online-payment-default":["VIEW"],invoice:["VIEW"],basicstore:["VIEW","PRODUCT_CREATE","ECOMM_LINK","EXPORT","DELETE_PRODUCT","EDIT_PROD","SHOWHIDE_PROD","MARK_AS_DELIVERED"],"online-payment-transactions":["VIEW","PRODUCT_DOWNLOAD"],"pos-transactions":["VIEW"],subscription:["VIEW","PLAN_CREATE","PLAN_EDIT","PLAN_DELETE","PLAN_EXPORT","PLAN_ACT_INACT"],"pos-terminal-maps":["VIEW"],myaccounts:["BI_QRCODE"]},SALES_SUB_USER_PROD:{"pos-default":["VIEW"],invoice:["VIEW"],basicstore:["VIEW","PRODUCT_CREATE","ECOMM_LINK","EXPORT"],"pos-transactions":["VIEW"],subscription:["VIEW","PLAN_CREATE","PLAN_EDIT","PLAN_EXPORT","PLAN_ACT_INACT"],"pos-terminals":["VIEW"],"pos-devices":["VIEW"],service_type_change:["EDIT"],"pos-terminal-maps":["VIEW"],mawaid:["VIEW"],header:["NOTIFICATIONS"]},MERCHANT_ADMIN_USER:{"online-payment-default":["VIEW","EXPORT_DATA","COMPARE_SALES","PAY_
1COUNT","LIVE_TRAX_BAL"],"pos-default":["VIEW","LIVE_TRAX_BAL"],invoice:["VIEW","DELETE","SHIPPING"],basicstore:["VIEW","PRODUCT_CREATE","ECOMM_LINK","EXPORT","DELETE_PRODUCT","MARK_AS_DELIVERED","EDIT_PROD","SHOWHIDE_PROD","SHIPPING"],settlement:["VIEW","CANCEL_REQUEST","WITHDRAW_FUNDS","SETT_BATCH"],"balance-statement":["VIEW"],"online-payment-transactions":["VIEW","PRODUCT_DOWNLOAD","PRODUCT_REFUND","SANDBOX_REFUND","SANDBOX_TRAX","DISPUTE"],"pos-transactions":["VIEW","POS_RENTAL"],subscription:["VIEW","PLAN_CREATE","PLAN_EDIT","PLAN_DELETE","PLAN_EXPORT","PLAN_ACT_INACT"],"pos-terminals":["VIEW","EDIT"],"pos-devices":["VIEW"],"online-payment-reports":["VIEW","DOWNLOAD_HISTORY","SEND_EMAIL","SUB_USR_FILTER"],"pos-reports":["VIEW","DOWNLOAD_HISTORY","SEND_EMAIL","SUB_USR_FILTER"],myaccounts:["VIEW","EDIT","UPLOAD_BUSINESS_DOC","BANK_DETAIL","BI_MSGS","BI_INFO","BI_PROFILE_PIC","BI_QRCODE"],"pos-settings":["VIEW"],"online-payment-settings":["VIEW","EDIT","CONFIGURE_API","CA_LIVE","NOTIFICATIONS","WEBHOOK","CUSTOMIZE_CHECKOUT","MANAGE_USERS","ADVANCED_SETTINGS"],"manage-users":["VIEW","EDIT"],"manage-merchants":["VIEW","EDIT"],service_type_change:["EDIT"],"show-environment-change":["EDIT"],"pos-terminal-maps":["VIEW"],mawaid:["VIEW"],header:["TRANSFER","NOTIFICATIONS","MANAGE_MERCHANTS"],"show-transfer":["EDIT"],"subuser-filter":["full"],"pos-batch-summary":["full"],login:["DOC_EXPIRY_PROMPT"],"sadad-services":["full"],shipping:["full"]}},this._paymentServiceTypeService.paymentService.subscribe(function(e){r.serviceType=e})}return l(e,[{key:"hasRoutePermission",value:function(e){var t,n=this.getValidUserRoleId();if(!n)return!1;var i=this.getUser(n);return!!(i&&null!==(t=this.permissions)&&void 0!==t&&t[i]&&e in this.permissions[i])}},{key:"setSdSerPermiUserWise",value:function(){var e,t,n=null===(e=this.authenticationService)||void 0===e||null===(t=e.currentUserValue)||void 0===t?void 0:t.SadadId;n&&this.allowedMerchantsOPSdSer.includes(n)?this.permissions.MERCHANT_ADMIN_USER["sadad-services"]=["full"]:delete this.permissions.MERCHANT_ADMIN_USER["sadad-services"]}},{key:"hasMenuPermission",value:function(e){var t,n=this.getValidUserRoleId();if(!n)return!1;var i=this.getUser(n);return!!(i&&null!==(t=this.permissions)&&void 0!==t&&t[i]&&this.getPath(e)in this.permissions[i])}},{key:"hasFuncPermission",value:function(e,t){var n,i=this.getValidUserRoleId();if(!i)return!1;var r=this.getUser(i);return!!(r&&null!==(n=this.permissions)&&void 0!==n&&n[r]&&this.permissions[r][e]&&this.permissions[r][e].includes(t))}},{key:"getUser",value:function(e){if(i.N.production)if(1!=this.authenticationService.currentUserValue.roleId&&this.authenticationService.currentUserValue.isSubUserPublicAccess)switch(e){case 1:return"MERCHANT_ADMIN_USER";case 17:return"API_SUB_USER_PROD_PUB";case 16:return"FINANCE_SUB_USER_PROD_PUB";case 14:return"SALES_SUB_USER_PROD_PUB";default:return 0}else switch(e){case 1:return"MERCHANT_ADMIN_USER";case 17:return"API_SUB_USER_PROD_PRI";case 16:return"FINANCE_SUB_USER_PROD_PRI";case 14:return"SALES_SUB_USER_PROD_PRI";default:return 0}else if(1!=this.authenticationService.currentUserValue.roleId&&this.authenticationService.currentUserValue.isSubUserPublicAccess)switch(e){case 1:return"MERCHANT_ADMIN_USER";case 17:return"API_SUB_USER_DEV_PUB";case 16:return"FINANCE_SUB_USER_DEV_PUB";case 14:return"SALES_SUB_USER_DEV_PUB";default:return 0}else switch(e){case 1:return"MERCHANT_ADMIN_USER";case 17:return"API_SUB_USER_DEV_PRI";case 16:return"FINANCE_SUB_USER_DEV_PRI";case 14:return"SALES_SUB_USER_DEV_PRI";default:return 0}}},{key:"getAllowedServiceType",value:function(e){if(1!=this.authenticationService.currentUserValue.roleId&&this.authenticationService.currentUserValue.isSubUserPublicAccess)switch(e){case 1:return"pos";case 17:return"online-payment";case 16:return"pos";case 14:default:return"online-payment"}else switch(e){case 1:return"pos";case 17:case 16:case 14:default:return"online-payment"}}},{key:"getPath",value:function(e){switch(e){case"Home":return"pos"==this.serviceType?"pos-default":"online-payment-default";case"Transactions":return"pos"==this.serviceType?"pos-transactions":"online-payment-transactions";
1case"Settlement":return"settlement";case"Balance Statement":return"balance-statement";case"Invoices":return"invoice";case"Sadad Services":return"sadad-services";case"Manage Users":return"manage-users";case"Manage Merchants":return"manage-merchants";case"Basicstore":return"basicstore";case"Subscriptions":return"subscription";case"Terminals":return"pos-terminals";case"Devices":return"pos-devices";case"Reports":return"pos"==this.serviceType?"pos-reports":"online-payment-reports";case"Settings":return"pos-settings";case"Payment Gateway":return"online-payment-settings";case"SadadVas":return"sadadvas";case"My Account":return"myaccounts";case"Mawaid":return"mawaid";case"Batch Summary":return"pos-batch-summary";case"Shipping":return"shipping"}}},{key:"getMenu",value:function(e){switch(e){case"online-payment-default":case"pos-default":return"Home";case"online-payment-transactions":case"pos-transactions":return"Transactions";case"settlement":return"Settlement";case"balance-statement":return"Balance Statement";case"invoice":return"Invoices";case"sadad-services":return"Sadad Services";case"manage-users":return"Manage Users";case"manage-merchants":return"Manage Merchants";case"basicstore":return"Basicstore";case"subscription":return"Subscriptions";case"pos-terminals":return"Terminals";case"pos-devices":return"Devices";case"online-payment-reports":case"pos-reports":return"Reports";case"pos-settings":return"Settings";case"online-payment-settings":return"Payment Gateway";case"sadadvas":return"SadadVas";case"myaccounts":return"My Account";case"mawaid":return"Mawaid";case"pos-batch-summary":return"Batch Summary";case"shipping":return"Shipping"}}},{key:"hasSubMenuPermission",value:function(e,t){var n,i=this.getPath(e),r=this.getValidUserRoleId();if(!r)return!1;var a=this.getUser(r);return!!(a&&null!==(n=this.permissions)&&void 0!==n&&n[a]&&this.permissions[a][i]&&this.permissions[a][i].includes(t))}},{key:"getValidUserRoleId",value:function(){var e,t;return null===(e=this.authenticationService)||void 0===e||null===(t=e.currentUserValue)||void 0===t?void 0:t.roleId}}]),e}();return e.\u0275fac=function(t){return new(t||e)(r.LFG(a.$h),r.LFG(a.Yx))},e.\u0275prov=r.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e}()},34115:function(t,n,i){"use strict";i.d(n,{o:function(){return u}});var r=i(97425),a=i(35366),o=i(17444),c=i(8500),u=function(){var t=function(){function t(e,n){s(this,t),this._snackBar=e,this._layoutService=n,this.showNotificationSubject=ne
1w r.X({isVisible:!1,isApiCall:!1}),this.showNotification$=this.showNotificationSubject.asObservable()}return l(t,[{key:"error",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"OK",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:3e3,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",r=this.buildSnackBarConfig(["snackbar-error"],n,i);return this._snackBar.open(e,t,r)}},{key:"success",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"OK",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:3e3,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",o=this.buildSnackBarConfig(["snackbar-success"],i,a),s=this._snackBar.open(e,n,o);return"reportDown"!=r&&"balStatementDown"!=r||(s.onAction().subscribe(function(){console.log("success ok alert called....",n),t.triggerNotificationVisibility(!0,!1)}),s.afterDismissed().subscribe(function(e){console.log("Snackbar dismissed, reason:",e),!1===e.dismissedByAction?(console.log("Snackbar closed automatically"),t.triggerNotificationVisibility(!1,!0)):console.log("Snackbar closed by action")})),s}},{key:"triggerNotificationVisibility",value:function(e,t){this.showNotificationSubject.next({isVisible:e,isApiCall:t})}},{key:"dismissAllAlert",value:function(){this._snackBar.dismiss(),this.triggerNotificationVisibility(!1,!1)}},{key:"buildSnackBarConfig",value:function(t,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=e(t),a={panelClass:r,duration:n,verticalPosition:"top"};i&&(a.horizontalPosition=i,r.push("position-offset-snackbar"));var o=this._layoutService.getLayoutType();return o&&(a.direction=o),a}}]),t}();return t.\u0275fac=function(e){return new(e||t)(a.LFG(o.ux),a.LFG(c.P))},t.\u0275prov=a.Yz7({token:t,factory:t.\u0275fac,providedIn:"root"}),t}()},75425:function(e,t,n){"use strict";n.d(t,{J:function(){return T},m:function(){return E}});var i=n(61116),r=n(54391),a=n(31041),o=n(15940),c=n(60649),u=n(8500),d=n(54803),p=n(34115),v=n(14391),h=n(77972),g=n(15119),m=n(72142),f=n(77579),_=n(81073),y=n(71178),S=n(90066),b=n(29937),w=n(98109),I=n(35366);function T(e){var t,n;return{apiKey:(null==e||null===(t=e.currentUserValue)||void 0===t||null===(n=t.clientConfig)||void 0===n?void 0:n.googleMapAPIKey)||""}}var E=function(){var e=l(function e(){s(this,e)});return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=I.oAB({type:e}),e.\u0275inj=I.cJS({providers:[d.t,u.P,p.o,{provide:S.hF,useFactory:T,deps:[w.$h]}],imports:[[i.ez,r.Bz,a.u5,a.UX,o.IJ,c.aw,v.A0,h.J7,g.X,_.QG,f.Q,m.K.withConfig({debug:!0}),S.su.forRoot(),y.ef,b.ZQ.forRoot()],o.IJ,a.u5,a.UX,c.aw,_.QG,h.J7,g.X,f.Q,m.K,v.A0,y.ef]}),e}()},529:function(e,t,n){"use strict";n.d(t,{N:function(){return i}});var i={production:!0,local:!1,apiUrl:"https://fastjs.sadad.qa/api-v5/",apiUrl_bk:"https://fastpy-v7-v2.sadad.qa/api-v7/",apiUrlv6:"https://fastpy.sadad.qa/api-v6/",apiUrlv6_bk:"https://fastpy-v7-v2.sadad.qa/api-v7/",apiUrlv7:"https://fastpy-v7-v2.sadad.qa/api-v7/",fastifyDomain:"https://secureapi-v2.sadad.qa",fastifyUrl:"https://secureapi-v2.sadad.qa/api/data-request",encryptUrl:"https://secureapi-v2.sadad.qa/api/qr-request",encryptUrlNormal:"https://secureapi-v2.sadad.qa/api/encrypt-request",sandboxFastifyUrl:"https://secureapi-v2.sadad.qa/api/sandbox-request",logFastifyUrl:"https://secureapi-v2.sadad.qa/api/log-request",locale:"IST",phone_length:10,phone_match_digit:[3,5,7,6,9,8],copy_url:"https://d.sadad.qa/",sandboxUrl:"https://sandbox3.sadadqa.com/sandbox_api-v1/",staticAPIToken:"S4hbkbXbxTsdwfn00oEw3TdrHUe6VmIeZ941vRczNGSzbI6u3EdpmCWDA0uF",emommerceUrl:"https://e.sadad.qa/",downloadUrl:"https://e.sadad.qa/",defaultLang:"en",i18nKey:"8fDdsw#535xEDDDD!pQ7@vN2$zR6",ocrAPIUrl:"https://gapi.sadadqatar.com/",createMerchantAllowedCountries:"QA",googleMapAPIURL:"https://maps.googleapis.com/maps/api/geocode",fastifyUrlv6:"https://secureapi-v2.sadad.qa/api/data-request",envType:"prod",sdSerUsersMerIds:["9288463","7782182","6647430","6361998"],panelVersion:"5.7.5",sentryDsn:"https://[email protected]/56"}},75809:function(e,t,n){"use strict";var i=n(99624),r=n(35366),a=n(23298),o=n(47620),s=n(38582),c=n(67136),l=n(529);l.N.sentryDsn&&!(0,c.xl)()&&a.S1({dsn:l.N.sentryDsn,environment:l.N.envType||"development",integrations:[new o.gE({tracingOrigins:["localhost",/^https:\/\/.*\.sadadqa\.com/,/^https:\/\/.*\.sadad\.qa/],routingInstrumentation:a.$q})],tracesSampleRate:1,ignoreErrors:[/Http failure response for .*:\s*0 Unknown Error/,/blocked by CORS policy/i,/NetworkError/i,/Load failed/i,/Failed to fetch/i,/importScripts/i,/postEvent/i,/Method not found
1/i,/disableWebkitEnterFullscreen/i,/Java object is gone/i,/sendDataToNative/i,/sendBeforeUnloadMessage/i,/iabjs:\/\//i,/Extension context invalidated/i,/chrome-extension:\/\//i,/moz-extension:\/\//i,/safari-extension:\/\//i,/A network error \(such as timeout, interrupted connection or unreachable host\)/i,/interrupted connection/i,/unreachable host/i,/network-request-failed/i,/ERR_INTERNET_DISCONNECTED/i,/ERR_CONNECTION_/i,/NotReadableError/i,/The I\/O read operation failed/i,/Cannot set properties of undefined \(setting 'isVerifiedUser'\)/i],beforeSend:function(e,t){return(0,c.xl)()||function(e,t){var n,i,r,a=null==t?void 0:t.originalException;if(a&&"object"==typeof a&&0===(null==a?void 0:a.status))return!0;var o=(null==e||null===(n=e.exception)||void 0===n||null===(i=n.values)||void 0===i||null===(r=i[0])||void 0===r?void 0:r.value)||(null==e?void 0:e.message)||"";return/:\s*0 Unknown Error/i.test(o)||/blocked by CORS policy/i.test(o)||(0,c.Y$)(o)||(0,c._m)(o)||(0,c.mI)(o)||(0,c.Op)(o)||(0,c.U$)(o)||(0,c.VA)(a)||(0,c.VA)(o)}(e,t)?null:e}}),l.N.production&&(0,r.G48)(),i.q6().bootstrapModule(s.b9).catch(function(e){return console.error(e)})},46700:function(e,t,n){var i={"./af":90776,"./af.js":90776,"./ar":67634,"./ar-dz":42758,"./ar-dz.js":42758,"./ar-kw":64980,"./ar-kw.js":64980,"./ar-ly":9602,"./ar-ly.js":9602,"./ar-ma":52500,"./ar-ma.js":52500,"./ar-sa":36909,"./ar-sa.js":36909,"./ar-tn":92735,"./ar-tn.js":92735,"./ar.js":67634,"./az":27798,"./az.js":27798,"./be":29949,"./be.js":29949,"./bg":44590,"./bg.js":44590,"./bm":15938,"./bm.js":15938,"./bn":60595,"./bn-bd":51942,"./bn-bd.js":51942,"./bn.js":60595,"./bo":4756,"./bo.js":4756,"./br":17277,"./br.js":17277,"./bs":4166,"./bs.js":4166,"./ca":13943,"./ca.js":13943,"./cs":53474,"./cs.js":53474,"./cv":92218,"./cv.js":92218,"./cy":21061,"./cy.js":21061,"./da":82743,"./da.js":82743,"./de":31899,"./de-at":28580,"./de-at.js":28580,"./de-ch":3264,"./de-ch.js":3264,"./de.js":31899,"./dv":98784,"./dv.js":98784,"./el":54654,"./el.js":54654,"./en-au":56277,"./en-au.js":56277,"./en-ca":76896,"./en-ca.js":76896,"./en-gb":71609,"./en-gb.js":71609,"./en-ie":24557,"./en-ie.js":24557,"./en-il":15836,"./en-il.js":15836,"./en-in":30262,"./en-in.js":30262,"./en-nz":43586,"./en-nz.js":43586,"./en-sg":38965,"./en-sg.js":38965,"./eo":62777,"./eo.js":62777,"./es":63357,"./es-do":3128,"./es-do.js":3128,"./es-mx":69179,"./es-mx.js":69179,"./es-us":83256,"./es-us.js":83256,"./es.js":63357,"./et":2654,"./et.js":2654,"./eu":57287,"./eu.js":57287,"./fa":73875,"./fa.js":73875,"./fi":73431,"./fi.js":73431,"./fil":39606,"./fil.js":39606,"./fo":41781,"./fo.js":41781,"./fr":61717,"./fr-ca":11539,"./fr-ca.js":11539,"./fr-ch":19847,"./fr-ch.js":19847,"./fr.js":61717,"./fy":42250,"./fy.js":42250,"./ga":47665,"./ga.js":47665,"./gd":85214,"./gd.js":85214,"./gl":36154,"./gl.js":36154,"./gom-deva":68222,"./gom-deva.js":68222,"./gom-latn":18518,"./gom-latn.js":18518,"./gu":89221,"./gu.js":89221,"./he":64743,"./he.js":64743,"./hi":77339,"./hi.js":77339,"./hr":13224,"./hr.js":13224,"./hu":50856,"./hu.js":50856,"./hy-am":76855,"./hy-am.js":76855,"./id":2190,"./id.js":2190,"./is":53887,"./is.js":53887,"./it":19270,"./it-ch":85890,"./it-ch.js":85890,"./it.js":19270,"./ja":46595,"./ja.js":46595,"./jv":93081,"./jv.js":93081,"./ka":27477,"./ka.js":27477,"./kk":13978,"./kk.js":13978,"./km":19205,"./km.js":19205,"./kn":60025,"./kn.js":60025,"./ko":50427,"./ko.js":50427,"./ku":79089,"./ku.js":79089,"./ky":19314,"./ky.js":19314,"./lb":23136,"./lb.js":23136,"./lo":29115,"./lo.js":29115,"./lt":27087,"./lt.js":27087,"./lv":95683,"./lv.js":95683,"./me":79454,"./me.js":79454,"./mi":35507,"./mi.js":35507,"./mk":98466,"./mk.js":98466,"./ml":82933,"./ml.js":82933,"./mn":19477,"./mn.js":19477,"./mr":43597,"./mr.js":43597,"./ms":85529,"./ms-my":99965,"./ms-my.js":99965,"./ms.js":85529,"./mt":30259,"./mt.js":30259,"./my":88061,"./my.js":88061,"./nb":72618,"./nb.js":72618,"./ne":28452,"./ne.js":28452,"./nl":1885,"./nl-be":60413,"./nl-be.js":60413,"./nl.js":1885,"./nn":45107,"./nn.js":45107,"./oc-lnc":71763,"./oc-lnc.js":71763,"./pa-in":702,"./pa-in.js":702,"./pl":31711,"./pl.js":31711,"./pt":10594,"./pt-br":58238,"./pt-br.js":58238,"./pt.js":10594,"./ro":74681,"./ro.js":74681,"./ru":16201,"./ru.js":16201,"./sd":62912,"./sd.js":62912,"./se":6002,"./se.js":6002,"./si":67942,"./si.js":67942,"./sk":25577,"./sk.js":25577,"./sl":41775,"./sl.js":41775,"./sq":36823,"./sq.js":36823,"./sr":59038,"./sr-cyrl":83848,"./sr-cyrl.js":83848,"./sr.js":59038,"./ss":96173,"./ss.js":96173,"./sv":5788,"./sv.js":5788,"./sw":76882,"./sw.js":76882,"./ta":82678,"./ta.js":82678,"./te":82797,"./te.js":82797,"./tet":52447,"./tet.js":52447,"./tg":31335,"./tg.js":31335,"./th":68667,"./th.js":68667,"./tk":9222,"./tk.js":9222,"./tl-ph":99914,"./tl-ph.js":99914,"./tlh":71389,"./tlh.js":71389,"./tr":3578,"./tr.js":3578,"./tzl":36969,"./tzl.js":36969,"./tzm":76509,"./tzm-latn":690,"./tzm-latn.js":690,"./tzm.js":76509,"./ug-cn":20055,"./ug-cn.js":20055,"./uk":22452,"./uk.js":22452,"./ur":91151,"./ur.js":91151,"./uz":31555,"./uz-latn":46547,"./uz-latn.js":46547,"./uz.js":31555,"./vi":16541,"./vi.js":16541,"./x-pseudo":42401,"./x-pseudo.js":42401,"./yo":2341,"./yo.js":2341,"./zh-cn":80619,"./zh-cn.js":80619,"./zh-hk":67058,"./zh-hk.js":67058,"./zh-mo":89141,"./zh-mo.js":89141,"./zh-tw":22782,"./zh-tw.js":22782};function r(e){var t=a(e);return n(t)}function a(e){if(!n.o(i,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return i[e]}r.keys=function(){return Object.keys(i)},r.resolve=a,e.exports=r,r.id=46700},14601:function(){},32767:function(){},28251:function(){},57677:function(){},1543:function(){},87324:function(){}},function(e){"use strict";e.O(0,["vendor"],function(){return e(e.s=75809)}),e.O()}])}();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.