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AMJA,gDAA+B,kBAA/BA,CAA+B,iBAA/BA,CAA+B,sBAA/BA,CAA+B,2BAA/BA,CAA+B,wBAA/BA,CAA+B,uBAA/BA,CAA+B,yBAA/BA,CAA+B,qBAA/BA,CAA+B,qBAA/BA,CAA+B,uBAA/BA,CAA+B,+BAmB7BA,6BAAgB,gCAAhBA,CAAgB,cAAhBA,CAAgB,2BAAhBA,CAAgB,2BAMFA,0CAA6B,cAC3BA,6BAIKA,+BAAkB,aAAlBA,CAAkB,aACtBA,6BAEQA,6BAAiB,0BAKNA,oCAMRA,8BAGAA,8BAEmBA,oCAAwB,2BAEpDA,kDAESA,oEA9F9BgH,KAAYiD,KAAEC,KAAUC,KAAEA,SAAgBC,IAAEA,4EAAcA,IAAEC,IAAeD,IAAEE,IAAcF,IAAEG,gBAAetJ,IAAsBuJ,8dAoHjIhD,CAAb,KCvIEiD,YAAa,CAACC,KACdvC,KAAM,CAAEwC,MAAO,CAAC,cAOX,IAAMC,GAAb,MAAM,MAAOA,kDAAoB,0BAApBA,gCAHDC,cAAsBxD,IACtBwD,QAECD,CAAb,KCHaE,GAAb,MAAM,MAAOA,kDAAa,0BAAbA,gCAJT9D,KACA4D,MAGSE,CAAb","names":["stripePromise","InvoiceStatus","ORIGIN","STRIPE_JS_URL","concat","V3_URL_REGEX","STRIPE_JS_URL_REGEX","EXISTING_SCRIPT_MESSAGE","isStripeJSURL","url","test","injectScript","params","queryString","advancedFraudSignals","script","document","createElement","src","headOrBody","head","body","Error","appendChild","stripePromise$1","onErrorListener","onLoadListener","initStripe","maybeStripe","args","startTime","stripe","apply","undefined","registerWrapper","_registerWrapper","name","version","loadCalled","getStripePromise","Promise","resolve","reject","window","Stripe","console","warn","scripts","querySelectorAll","i","length","findScript","_script$parentNode","removeEventListener","parentNode","removeChild","onLoad","onError","addEventListener","error","catch","then","StripePaymentService","constructor","urlProvider","httpClient","this","getStripeApiKey","get","ApiUrl","getStripeApiSecret","createPaymentIntent","invIds","of","forEach","id","index","location","href","i0","factory","PatientBillingService","fusionAuthService","router","patientInvoicesStore","patientIds","dataSource","SECURED_STORE","tokenRefresh","exchangeRefreshTokenForJWT","loadParams","routerService","loadUrl","postPayment","payment","post","StripePaymentComponent","stripeSettingsService","patientBillingService","EventEmitter","BehaviorSubject","openStripe","openSuccess","ngOnDestroy","$clientSecretSubscription","unsubscribe","$destroyed","next","ngOnChanges","changes","invoiceIds","currentValue","subscribe","ids","paymentIntent","_this","$invoices","invoices","initializeStripePayment","clientSecret","$loading","disabled","initialized","ngOnInit","pipe","take","apiKey","_this2","initializeStripe","options","appearance","_this3","generateTheme","elements","create","layout","defaultCollapsed","radios","spacedAccordionItems","mount","theme","localStorage","getItem","includes","variables","colorPrimary","_this4","_len","arguments","Array","_key","Date","now","loadStripe","betas","$InvoiceCode","map","invoice","invoiceNumber","join","$InvoiceAmount","balance","reduce","acc","curr","closeDrawer","closeEvent","emit","clear","makePayment","e","preventDefault","_this5","confirmPayment","confirmParams","return_url","redirect","messageContainer","querySelector","textContent","message","status","invoicesIds","value","totalPayment","amount","paymentId","isOnlinePayment","notify","selectors","ctx","CommonModule","i3","i4","DxButtonModule","DxLoadIndicatorModule","routes","path","component","PatientInvoicesComponent","fusionAuth","reportsService","pwaDetectorService","screenService","sanitizer","text","defaultFilter","statusHeaderFilter","patientsIds","Profile","data","patients","DataSource","store","selectionChanged","$SomethingSelected","selectedIds","getStatus","color","container","toUpperCase","bypassSecurityTrustHtml","printInvoice","dxDataGridComponent","instance","beginCustomLoading","generatePatientInvoices","blob","FileUtils","pay","$invoice","drawer","show","success","reload","refresh","hide","complete","DxDrawerComponent","DxDataGridComponent","i6","FlexModule","i7","i8","DxToolbarModule","DxDrawerModule","ResultsModule","styles","canActivate","FusionAuthGuard","roles","BillingRoutingModule","RouterModule","BillingModule"],"sourceRoot":"webpack:///","sources":["./node_modules/@stripe/stripe-js/dist/index.mjs","./src/app/modules/features/billing/models/invoice.status.ts","./src/app/modules/features/billing/services/stripe-payment.service.ts","./src/app/modules/features/billing/services/patient-billing.service.ts","./src/app/modules/features/billing/components/stripe-payment/stripe-payment.component.ts","./src/app/modules/features/billing/pages/patient-invoices/patient-invoices.component.ts","./src/app/modules/features/billing/billing-routing.module.ts","./src/app/modules/features/billing/billing.module.ts"],"sourcesContent":["var ORIGIN = 'https://js.stripe.com';\nvar STRIPE_JS_URL = \"\".concat(ORIGIN, \"/v3\");\nvar V3_URL_REGEX = /^https:\\/\\/js\\.stripe\\.com\\/v3\\/?(\\?.*)?$/;\nvar STRIPE_JS_URL_REGEX = /^https:\\/\\/js\\.stripe\\.com\\/(v3|[a-z]+)\\/stripe\\.js(\\?.*)?$/;\nvar EXISTING_SCRIPT_MESSAGE = 'loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used';\n\nvar isStripeJSURL = function isStripeJSURL(url) {\n return V3_URL_REGEX.test(url) || STRIPE_JS_URL_REGEX.test(url);\n};\n\nvar findScript = function findScript() {\n var scripts = document.querySelectorAll(\"script[src^=\\\"\".concat(ORIGIN, \"\\\"]\"));\n\n for (var i = 0; i < scripts.length; i++) {\n var script = scripts[i];\n\n if (!isStripeJSURL(script.src)) {\n continue;\n }\n\n return script;\n }\n\n return null;\n};\n\nvar injectScript = function injectScript(params) {\n var queryString = params && !params.advancedFraudSignals ? '?advancedFraudSignals=false' : '';\n var script = document.createElement('script');\n script.src = \"\".concat(STRIPE_JS_URL).concat(queryString);\n var headOrBody = document.head || document.body;\n\n if (!headOrBody) {\n throw new Error('Expected document.body not to be null. Stripe.js requires a
element.');\n }\n\n headOrBody.appendChild(script);\n return script;\n};\n\nvar registerWrapper = function registerWrapper(stripe, startTime) {\n if (!stripe || !stripe._registerWrapper) {\n return;\n }\n\n stripe._registerWrapper({\n name: 'stripe-js',\n version: \"5.7.0\",\n startTime: startTime\n });\n};\n\nvar stripePromise$1 = null;\nvar onErrorListener = null;\nvar onLoadListener = null;\n\nvar onError = function onError(reject) {\n return function () {\n reject(new Error('Failed to load Stripe.js'));\n };\n};\n\nvar onLoad = function onLoad(resolve, reject) {\n return function () {\n if (window.Stripe) {\n resolve(window.Stripe);\n } else {\n reject(new Error('Stripe.js not available'));\n }\n };\n};\n\nvar loadScript = function loadScript(params) {\n // Ensure that we only attempt to load Stripe.js at most once\n if (stripePromise$1 !== null) {\n return stripePromise$1;\n }\n\n stripePromise$1 = new Promise(function (resolve, reject) {\n if (typeof window === 'undefined' || typeof document === 'undefined') {\n // Resolve to null when imported server side. This makes the module\n // safe to import in an isomorphic code base.\n resolve(null);\n return;\n }\n\n if (window.Stripe && params) {\n console.warn(EXISTING_SCRIPT_MESSAGE);\n }\n\n if (window.Stripe) {\n resolve(window.Stripe);\n return;\n }\n\n try {\n var script = findScript();\n\n if (script && params) {\n console.warn(EXISTING_SCRIPT_MESSAGE);\n } else if (!script) {\n script = injectScript(params);\n } else if (script && onLoadListener !== null && onErrorListener !== null) {\n var _script$parentNode;\n\n // remove event listeners\n script.removeEventListener('load', onLoadListener);\n script.removeEventListener('error', onErrorListener); // if script exists, but we are reloading due to an error,\n // reload script to trigger 'load' event\n\n (_script$parentNode = script.parentNode) === null || _script$parentNode === void 0 ? void 0 : _script$parentNode.removeChild(script);\n script = injectScript(params);\n }\n\n onLoadListener = onLoad(resolve, reject);\n onErrorListener = onError(reject);\n script.addEventListener('load', onLoadListener);\n script.addEventListener('error', onErrorListener);\n } catch (error) {\n reject(error);\n return;\n }\n }); // Resets stripePromise on error\n\n return stripePromise$1[\"catch\"](function (error) {\n stripePromise$1 = null;\n return Promise.reject(error);\n });\n};\nvar initStripe = function initStripe(maybeStripe, args, startTime) {\n if (maybeStripe === null) {\n return null;\n }\n\n var stripe = maybeStripe.apply(undefined, args);\n registerWrapper(stripe, startTime);\n return stripe;\n}; // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\nvar stripePromise;\nvar loadCalled = false;\n\nvar getStripePromise = function getStripePromise() {\n if (stripePromise) {\n return stripePromise;\n }\n\n stripePromise = loadScript(null)[\"catch\"](function (error) {\n // clear cache on error\n stripePromise = null;\n return Promise.reject(error);\n });\n return stripePromise;\n}; // Execute our own script injection after a tick to give users time to do their\n// own script injection.\n\n\nPromise.resolve().then(function () {\n return getStripePromise();\n})[\"catch\"](function (error) {\n if (!loadCalled) {\n console.warn(error);\n }\n});\nvar loadStripe = function loadStripe() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n loadCalled = true;\n var startTime = Date.now(); // if previous attempts are unsuccessful, will re-load script\n\n return getStripePromise().then(function (maybeStripe) {\n return initStripe(maybeStripe, args, startTime);\n });\n};\n\nexport { loadStripe };\n","export enum InvoiceStatus {\r\n Open,\r\n Paid,\r\n PastDue,\r\n Voided,\r\n Rebilled,\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport {UrlProviderService} from \"../../../../shared/services/general\";\r\nimport {HttpClient} from \"@angular/common/http\";\r\nimport {CreatePaymentIntentResponse} from \"../models/stripe-checkout-session\";\r\nimport {Observable, of} from \"rxjs\";\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class StripePaymentService {\r\n\r\n constructor(private urlProvider: UrlProviderService, private httpClient: HttpClient) { }\r\n\r\n public getStripeApiKey() {\r\n return this.httpClient.getAll transactions are secure and encrypted
\r\nStripe integration is not available at the moment.
Please, contact the laboratory staff to proceed\r\n with the payment.