1import{y as R}from"./chunk-66HRGNAO.js";import{Bb as c,D as E,F as O,Ga as x,Ha as A,O as k,P as m,Pa as P,S as M,X as f,Za as B,_a as T,cb as $,gb as F,k as S,ma as N,n as C,o as L,oa as a,p as z,ua as j,va as D,xa as W,y as g}from"./chunk-D2DANOQX.js";function J(){return typeof window<"u"?window.navigator:void 0}function K(n){return!!(n.parentElement&&n.parentElement.nodeName.toLowerCase()==="picture")}function d(n){return n.nodeName.toLowerCase()==="img"}function Z(n,e,t){return d(n)?t&&"srcset"in n?n.srcset=e:n.src=e:n.style.backgroundImage=`url('${e}')`,n}function y(n){return e=>{let t=e.parentElement.getElementsByTagName("source");for(let s=0;s<t.length;s++){let o=t[s].getAttribute(n);o&&("srcset"in t[s]?t[s].srcset=o:t[s].src=o)}}}var Q=y("defaultImage"),q=y("lazyLoad"),U=y("errorImage");function w(n){return(e,t,s)=>{d(e)&&K(e)&&n(e),t&&Z(e,t,s)}}var X=w(Q),_=w(q),ee=w(U),b=class{constructor(){this.navigator=J()}setPlatformId(e){this.platformId=e}onDestroy(e){}onAttributeChange(e){}},l={loaded:"ng-lazyloaded",loading:"ng-lazyloading",failed:"ng-failed-lazyloaded"};function V(n,e){n.className=n.className.replace(e,"")}function p(n,e){n.className.includes(e)||(n.className+=` ${e}`)}function te(n,e){return n.className&&n.className.includes(e)}var v=class extends b{setup(e){X(e.element,e.defaultImagePath,e.useSrcset),e.imagePath&&p(e.element,l.loading),te(e.element,l.loaded)&&V(e.element,l.loaded)}finally(e){p(e.element,l.loaded),V(e.element,l.loading)}loadImage(e){if(this.skipLazyLoading(e))return[e.imagePath];let{element:t,useSrcset:s,imagePath:o,decode:i}=e,r;return d(t)&&K(t)?(r=t.parentNode.cloneNode(!0).getElementsByTagName("img")[0],q(r),Z(r,o,s)):(r=new Image,d(t)&&t.referrerPolicy&&(r.referrerPolicy=t.referrerPolicy),d(t)&&t.sizes&&(r.sizes=t.sizes),s&&"srcset"in r?r.srcset=o:r.src=o),i&&r.decode?r.decode().then(()=>o):new Promise((u,H)=>{r.onload=()=>u(o),r.onerror=()=>H(null)})}setErrorImage(e,t){let{element:s,useSrcset:o,errorImagePath:i}=t;ee(s,i,o),p(s,l.failed)}setLoadedImage(e,t){let{element:s,useSrcset:o}=t;_(s,e,o)}isDisabled(){return R(this.platformId)&&!this.isBot()}skipLazyLoading(e){return this.isBot(e)}isBot(e){return this.navigator?.userAgent?/googlebot|bingbot|yandex|baiduspider|facebookexternalhit|twitterbot|rogerbot|linkedinbot|embedly|quora\ link\ preview|showyoubot|outbrain|pinterest\/0\.|pinterestbot|slackbot|vkShare|W3C_Validator|whatsapp|duckduckbot|prerender/i.test(this.navigator.userAgent):!1}},I=class extends v{constructor(){super(...arguments),this.observers=new WeakMap,this.intersectionSubject=ne
1w C,this.uniqKey={}}getObservable(e){if(this.skipLazyLoading(e))return g({isIntersecting:!0});if(e.customObservable)return e.customObservable;let t=e.scrollContainer||this.uniqKey,s={root:e.scrollContainer||null};e.offset&&(s.rootMargin=`${e.offset}px`);let o=this.observers.get(t);return o||(o=new IntersectionObserver(i=>this.loadingCallback(i),s),this.observers.set(t,o)),o.observe(e.element),S.create(i=>{let r=this.intersectionSubject.pipe(m(u=>u.target===e.element)).subscribe(i);return()=>{r.unsubscribe(),o.unobserve(e.element)}})}isVisible(e){return e.isIntersecting}loadingCallback(e){e.forEach(t=>this.intersectionSubject.next(t))}};function ne(n,e){return t=>t.pipe(a(s=>e.onStateChange.emit({reason:"observer-emit",data:s})),m(s=>n.isVisible(s,e)),f(1),a(()=>e.onStateChange.emit({reason:"start-loading"})),O(()=>n.loadImage(e)),a(()=>e.onStateChange.emit({reason:"mount-image"})),a(s=>n.setLoadedImage(s,e)),a(()=>e.onStateChange.emit({reason:"loading-succeeded"})),E(()=>!0),M(s=>(e.onStateChange.emit({reason:"loading-failed",data:s}),n.setErrorImage(s,e),g(!1))),a(()=>{e.onStateChange.emit({reason:"finally"}),n.finally(e)}))}var G=new W("LazyLoadImageHooks"),pe=(()=>{class n{constructor(t,s,o,i){this.onStateChange=new B,this.elementRef=t,this.ngZone=s,this.propertyChanges$=new z,this.hooks=i,this.hooks.setPlatformId(o),this.uid=Math.random().toString(36).substr(2,9)}ngOnChanges(){this.debug===!0&&!this.debugSubscription&&(this.debugSubscription=this.onStateChange.subscribe(t=>console.log(t))),this.propertyChanges$.next({element:this.elementRef.nativeElement,imagePath:this.lazyImage,defaultImagePath:this.defaultImage,errorImagePath:this.errorImage,useSrcset:this.useSrcset,offset:this.offset?this.offset|0:0,scrollContainer:this.scrollTarget,customObservable:this.customObservable,decode:this.decode,onStateChange:this.onStateChange,id:this.uid})}ngAfterContentInit(){if(this.hooks.isDisabled())return null;this.ngZone.runOutsideAngular(()=>{this.loadSubscription=this.propertyChanges$.pipe(a(t=>this.hooks.onAttributeChange(t)),a(t=>t.onStateChange.emit({reason:"setup"})),a(t=>this.hooks.setup(t)),N(t=>t.imagePath?this.hooks.getObservable(t).pipe(ne(this.hooks,t)):k())).subscribe({next:()=>null})})}ngOnDestroy(){this.propertyChanges$.pipe(f(1)).subscribe({next:t=>this.hooks.onDestroy(t)}).unsubscribe(),this.loadSubscription?.unsubscribe(),this.debugSubscription?.unsubscribe()}}return n.\u0275fac=function(t){return new(t||n)(c($),c(T),c(F),c(G))},n.\u0275dir=A({type:n,selectors:[["","lazyLoad",""]],inputs:{lazyImage:[0,"lazyLoad","lazyImage"],defaultImage:"defaultImage",errorImage:"errorImage",scrollTarget:"scrollTarget",customObservable:"customObservable",offset:"offset",useSrcset:"useSrcset",decode:"decode",debug:"debug"},outputs:{onStateChange:"onStateChange"},features:[P]}),n})(),be=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=x({type:n}),n.\u0275inj=D({providers:[{provide:G,useClass:I}]}),n})(),h=class n{constructor(e,t,s,o){this.left=e,this.top=t,this.right=s,this.bottom=o}static fromElement(e){let{left:t,top:s,right:o,bottom:i}=e.getBoundingClientRect();return t===0&&s===0&&o===0&&i===0?n.empty:new n(t,s,o,i)}static fromWindow(e){return new n(0,0,e.innerWidth,e.innerHeight)}inflate(e){this.left-=e,this.top-=e,this.right+=e,this.bottom+=e}intersectsWith(e){return e.left<this.right&&this.left<e.right&&e.top<this.bottom&&this.top<e.bottom}getIntersectionWith(e){let t=Math.max(this.left,e.left),s=Math.max(this.top,e.top),o=Math.min(this.right,e.right),i=Math.min(this.bottom,e.bottom);return o>=t&&i>=s?new n(t,s,o,i):n.empty}};h.empty=new h(0,0,0,0);var ye=(()=>{let e=class e{constructor(){this.windowSizeSubject=new L({width:window.innerWidth,height:window.innerHeight}),this.windowSize$=this.windowSizeSubject.asObservable()}onResize(){this.windowSizeSubject.next({width:window.innerWidth,height:window.innerHeight})}};e.\u0275fac=function(o){return new(o||e)},e.\u0275prov=j({token:e,factory:e.\u0275fac,providedIn:"root"});let n=e;return n})();export{pe as a,be as b,ye as c}; 2//# sourceMappingURL=chunk-GAV3FHCZ.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.