1import{Fa as P}from"./chunk-3H2GI3MM.js";import{$c as b,Dd as C,Ha as p,Jb as s,Jd as T,Mc as g,Qa as l,Va as d,Xc as y,_c as w,bd as x,ia as c,na as n,oc as f,pc as u,qc as v,tc as h,zb as m}from"./chunk-N4XFLIUN.js";var i=(()=>{class t{constructor(){this.toasts=p([]),this.#t=0,this.#e=p(!1)}#t;addToast(o,e){this.toasts.update(r=>[...r,{message:o,type:e,id:++this.#t}])}removeToast(o){this.toasts.update(e=>e.filter(r=>r.id!==o))}#e;onOffline(){this.#e.set(!0),this.addToast("You are currently offline. Please check your internet connection","error")}onOnline(){this.#e()&&this.addToast("You are back online","info"),this.#e.set(!1)}static{this.\u0275fac=function(e){return new(e||t)}}static{this.\u0275prov=c({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();function z(){return[i]}var _=(()=>{class t{constructor(){this.toast=T.required({alias:"data"}),this.#t=n(l),this.#e=n(m),this.#o=n(i),this.#r=n(d)}get type(){return this.toast().type}#t;#e;#o;#r;ngAfterViewInit(){if(P(this.#r))try{this.#t.nativeElement.showPopover(),setTimeout(()=>{this.#t.nativeElement.hidePopover(),setTimeout(()=>{this.#o.removeToast(this.toast().id)},500)},3500)}catch(o){console.error(o),this.#e.addClass(this.#t.nativeElement,"popover-open"),setTimeout(()=>{this.#e.removeClass(this.#t.nativeElement,"popover-open"),this.#o.removeToast(this.toast().id)},3500)}}static{this.\u0275fac=function(e){return new(e||t)}}static{this.\u0275cmp=s({type:t,selectors:[["app-toast"]],hostAttrs:["popover","manual"],hostVars:2,hostBindings:function(e,r){e&2&&w(r.type)},inputs:{toast:[1,"data","toast"]},decls:1,vars:1,template:function(e,r){e&1&&b(0),e&2&&x("",r.toast().message,` 2`)},styles:[`@layer properties;[_nghost-%COMP%]{position:fixed;inset:unset;right:1rem;bottom:1rem;transition-behavior:allow-discrete;padding:calc(var(--spacing, .25rem) * 1);padding-inline:calc(var(--spacing, .25rem) * 2);transition-property:opacity,transform,bottom;transition-timing-function:var(--tw-ease, var(--default-transition-timing-function, cubic-bezier(.4, 0, .2, 1)));transition-duration:var(--tw-duration, var(--default-transition-duration, .15s));--tw-duration: .5s;transition-duration:.5s;--tw-ease: var(--ease-bouncy, cubic-bezier(.2, 1.3, .7, 1));transition-timing-function:var(--ease-bouncy, cubic-bezier(.2, 1.3, .7, 1));--tw-translate-x: calc(var(--spacing, .25rem) * 4);translate:var(--tw-translate-x) var(--tw-translate-y);opacity:0%}.info[_nghost-%COMP%]{background-color:var(--color-blue, #87b9ff);color:var(--color-black, #000)}.success[_nghost-%COMP%]{background-color:var(--color-green-700, oklch(52.7% .154 150.069));color:var(--color-white, #fff)}.error[_nghost-%COMP%]{background-color:var(--color-red-dark, #d82500);color:var(--color-white, #fff)}.popover-open[_nghost-%COMP%], [_nghost-%COMP%]:popover-open{--tw-translate-x: calc(var(--spacing, .25rem) * 0);translate:var(--tw-translate-x) var(--tw-translate-y);opacity:100%}@starting-style{[_nghost-%COMP%]:popover-open{--tw-translate-x: calc(var(--spacing, .25rem) * 4);translate:var(--tw-translate-x) var(--tw-translate-y);opacity:0%}}@property --tw-duration{syntax: "*"; inherits: false;}@property --tw-ease{syntax: "*"; inherits: false;}@property --tw-translate-x{syntax: "*"; inherits: false; initial-value: 0;}@property --tw-translate-y{syntax: "*"; inherits: false; initial-value: 0;}@property --tw-translate-z{syntax: "*"; inherits: false; initial-value: 0;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*[_ngcontent-%COMP%], [_ngcontent-%COMP%]:before, [_ngcontent-%COMP%]:after, [_ngcontent-%COMP%]::backdrop{--tw-duration: initial;--tw-ease: initial;--tw-translate-x: 0;--tw-translate-y: 0;--tw-translate-z: 0}}} 3 4`]})}}return t})();var O=(t,a)=>(a==null?null:a.id)||t;function k(t,a){if(t&1&&h(0,"app-toast",1),t&2){let o=a.$implicit,e=a.$index,r=g();y("bottom",-3*(e+1-r.toasts().length)+1+"rem"),v("data",o)}}var q=(()=>{class t{constructor(){this.toastService=n(i),this.toasts=C(this.toastService.toasts)}static{this.\u0275fac=function(e){return new(e||t)}}static{this.\u0275cmp=s({type:t,selectors:[["app-toast-popovers"]],decls:2,vars:0,consts:[[3,"data","bottom"],[3,"data"]],template:function(e,r){e&1&&f(0,k,1,3,"app-toast",0,O),e&2&&u(r.toasts())},dependencies:[_],encapsulation:2,changeDetection:0})}}return t})();export{i as a,z as b,_ as c,q as d}; 5//# sourceMappingURL=chunk-2NOWVYCO.js.map
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.