1 2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="fdc731a2-5344-5785-8c79-75386938a6c0")}catch(e){}}(); 3import{a as E}from"./chunk-KQPQIBMS.js";import{a as I}from"./chunk-T6IYJCLX.js";import{a as P,b as B}from"./chunk-UTNRAM6W.js";import{d as R,e as O}from"./chunk-IMTAQMXS.js";import"./chunk-ARR5M7IV.js";import"./chunk-ZF3QYAGN.js";import"./chunk-F2HDYDWD.js";import{j as x}from"./chunk-LIDM2KI2.js";import{f as k,h as T,i as _}from"./chunk-5PARRNOJ.js";import"./chunk-FTXV4EPS.js";import"./chunk-OYBT55HV.js";import"./chunk-5SRAZNDV.js";import{h as M}from"./chunk-ZIDTLRQU.js";import"./chunk-JA2FAXLK.js";import{Eb as s,Fb as a,Gb as m,Lb as b,R as f,Wa as i,Wb as p,Xb as S,Yb as C,aa as o,f as g,gb as u,hd as w,lb as y,pc as l,qc as c,tb as d,z as h,zb as v}from"./chunk-VYESIVUL.js";import"./chunk-SE5JAREP.js";function F(t,z){t&1&&(m(0,"p-message",4),l(1,"transloco")),t&2&&d("text",c(1,1,"spark.error.retryFailed"))}var Z=(()=>{class t{router=o(x);tenantService=o(M);brandContext=o(I);onboardingService=o(E);transloco=o(k);destroy$=new g;isRetrying=!1;retryFailed=!1;cooldownSeconds=0;cooldownTimer=null;get buttonLabel(){return this.isRetrying?this.transloco.translate("spark.error.checking"):this.cooldownSeconds>0?this.transloco.translate("spark.error.retryCooldown",{seconds:this.cooldownSeconds}):this.transloco.translate("spark.error.tryAgain")}ngOnInit(){h(15e3).pipe(f(this.destroy$)).subscribe(()=>{!this.isRetrying&&this.cooldownSeconds===0&&this.doRetry()})}retry(){this.isRetrying||this.cooldownSeconds>0||this.doRetry()}doRetry(){this.isRetrying=!0,this.retryFailed=!1,this.onboardingService.clearStatusCache(),this.onboardingService.getOnboardingStatus().subscribe({next:n=>{this.isRetrying=!1;let r=this.tenantService.currentTenant(),e=this.brandContext.brandId();n.completed?this.router.navigate(["/t",r,"b",e,"spark","home"]):this.router.navigate(["/t",r,"b",e,"spark","onboarding"])},error:()=>{this.isRetrying=!1,this.retryFailed=!0,this.startCooldown(5)}})}startCooldown(n){this.cooldownSeconds=n,this.cooldownTimer&&clearInterval(this.cooldownTimer),this.cooldownTimer=setInterval(()=>{this.cooldownSeconds--,this.cooldownSeconds<=0&&(clearInterval(this.cooldownTimer),this.cooldownTimer=null)},1e3)}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete(),this.cooldownTimer&&clearInterval(this.cooldownTimer)}static \u0275fac=function(r){return new(r||t)};static \u0275cmp=u({type:t,selectors:[["app-spark-error"]],decls:11,vars:10,consts:[[1,"error-container"],[1,"error-icon"],[1,"pi","pi-exclamation-triangle"],[1,"error-text"],["severity","error",1,"retry-message",3,"text"],["icon","pi pi-refresh",3,"onClick","label","loading","disabled"]],template:function(r,e){r&1&&(s(0,"div",0)(1,"div",1),m(2,"i",2),a(),s(3,"h2"),p(4),l(5,"transloco"),a(),s(6,"p",3),p(7),l(8,"transloco"),a(),y(9,F,2,3,"p-message",4),s(10,"p-button",5),b("onClick",function(){return e.retry()}),a()()),r&2&&(i(4),S(c(5,6,"spark.error.title")),i(3),C(" ",c(8,8,"spark.error.body")," "),i(2),v(e.retryFailed?9:-1),i(),d("label",e.buttonLabel)("loading",e.isRetrying)("disabled",e.cooldownSeconds>0))},dependencies:[w,O,R,B,P,_,T],styles:[".error-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:4rem 2rem;min-height:60vh}.error-icon[_ngcontent-%COMP%]{font-size:3rem;color:var(--p-orange-500);margin-bottom:1.5rem}.error-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:inherit}h2[_ngcontent-%COMP%]{font-size:1.5rem;font-weight:600;color:var(--p-text-color);margin:0 0 .75rem}.error-text[_ngcontent-%COMP%]{font-size:1rem;color:var(--p-text-muted-color);max-width:400px;line-height:1.6;margin:0 0 2rem}.retry-message[_ngcontent-%COMP%]{margin-bottom:1.5rem}"]})}return t})();export{Z as SparkErrorComponent}; 4 5//# debugId=fdc731a2-5344-5785-8c79-75386938a6c0
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.