1import{b as w,d as $}from"./chunk-X2UZMNUO.js";import{a as U}from"./chunk-RMRZZ5JT.js";import{b as G}from"./chunk-ZTJ3X3WW.js";import{Da as x,e as P}from"./chunk-BECF3HO5.js";import{E as O,Hc as T,Ka as S,M as N,V as k,X as z,ca as o,da as M,fa as h,ha as n,ia as p,m,ma as R,mb as b,pb as F,q as a}from"./chunk-OHYQORNL.js";var c=function(t){return t.Local="local_strategy",t.Session="session_strategy",t.InMemory="in_memory_strategy",t}(c||{}),I=class{static isStorageAvailable(s){let e=!0;try{typeof s=="object"?(s.setItem("test-storage","foobar"),s.removeItem("test-storage")):e=!1}catch{e=!1}return e}};function C(){}var B="ngx-webstorage",Q="|",X=!1,u=(()=>{class t{static{this.prefix=B}static{this.separator=Q}static{this.isCaseSensitive=X}static normalize(e){return e=t.isCaseSensitive?e:e.toLowerCase(),`${t.prefix}${t.separator}${e}`}static isNormalizedKey(e){return e.indexOf(t.prefix+t.separator)===0}static setPrefix(e){t.prefix=e}static setSeparator(e){t.separator=e}static setCaseSensitive(e){t.isCaseSensitive=e}static consumeConfiguration(e){"prefix"in e&&this.setPrefix(e.prefix),"separator"in e&&this.setSeparator(e.separator),"caseSensitive"in e&&this.setCaseSensitive(e.caseSensitive)}}return t})(),l=class{constructor(s){this.strategy=s}retrieve(s){let e;return this.strategy.get(u.normalize(s)).subscribe(i=>e=typeof i>"u"?null:i),e}store(s,e){return this.strategy.set(u.normalize(s),e).subscribe(C),e}clear(s){s!==void 0?this.strategy.del(u.normalize(s)).subscribe(C):this.strategy.clear().subscribe(C)}getStrategyName(){return this.strategy.name}observe(s){return s=u.normalize(s),this.strategy.keyChanges.pipe(O(e=>e===null||e===s),z(()=>this.strategy.get(s)),N(),k({refCount:!0,bufferSize:1}))}};var D=(()=>{class t{constructor(){this.caches={}}get(e,i){return this.getCacheStore(e)[i]}set(e,i,r){this.getCacheStore(e)[i]=r}del(e,i){delete this.getCacheStore(e)[i]}clear(e){this.caches[e]={}}getCacheStore(e){return e in this.caches?this.caches[e]:this.caches[e]={}}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=o({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})(),V=new h("window_local_storage");function Y(){return typeof window<"u"?window.localStorage:null}var H={provide:V,useFactory:Y},W=new h("window_session_storage");function K(){return typeof window<"u"?window.sessionStorage:null}var _={provide:W,useFactory:K},v=class{constructor(s,e){this.storage=s,this.cache=e,this.keyChanges=new m}get isAvailable(){return this._isAvailable===void 0&&(this._isAvailable=I.isStorageAvailable(this.storage)),this._isAvailable}get(s){let e=this.cache.get(this.name,s);if(e!==void 0)return a(e);try{let i=this.storage.getItem(s);i!==null&&(e=JSON.parse(i),this.cache.set(this.name,s,e))}catch(i){console.warn(i)}return a(e)}set(s,e){let i=JSON.stringify(e);return this.storage.setItem(s,i),this.cache.set(this.name,s,e),this.keyChanges.next(s),a(e)}del(s){return this.storage.removeItem(s),this.cache.del(this.name,s),this.keyChanges.next(s),a(null)}clear(){return this.storage.clear(),this.cache.clear(this.name),this.keyChanges.next(null),a(null)}},j=class t extends v{static{this.strategyName=c.Local}constructor(s,e,i,r){super(s,e),this.storage=s,this.cache=e,this.platformId=i,this.zone=r,this.name=t.strategyName,x(this.platformId)&&this.listenExternalChanges()}listenExternalChanges(){window.addEventListener("storage",s=>this.zone.run(()=>{if(s.storageArea!==this.storage)return;let e=s.key;e!==null?this.cache.del(this.name,s.key):this.cache.clear(this.name),this.keyChanges.next(e)}))}static{this.\u0275fac=function(e){return new(e||t)(n(V),n(D),n(S),n(b))}}static{this.\u0275prov=o({token:t,factory:t.\u0275fac})}},L=class t extends v{static{this.strategyName=c.Session}constructor(s,e,i,r){super(s,e),this.storage=s,this.cache=e,this.platformId=i,this.zone=r,this.name=t.strategyName,x(this.platformId)&&this.listenExternalChanges()}listenExternalChanges(){window.addEventListener("storage",s=>this.zone.run(()=>{if(s.storageArea!==this.storage)return;let e=s.key;s.key!==null?this.cache.del(this.name,s.key):this.cache.clear(this.name),this.keyChanges.next(e)}))}static{this.\u0275fac=function(e){return new(e||t)(n(W),n(D),n(S),n(b))}}static{this.\u0275prov=o({token:t,factory:t.\u0275fac})}},A=class t{static{this.strategyName=c.InMemory}constructor(s){this.cache=s,this.keyChanges=new m,this.isAvailable=!0,this.name=t.strategyName}get(s){return a(this.cache.get(this.name,s))}set(s,e){return this.cache.set(this.name,s,e),this.keyChanges.next(s),a(e)}del(s){return this.cache.del(this.name,s),this.keyChanges.next(s),a(null)}clear(){return this.cache.clear(this.name),this.keyChanges.next(null),a(null)}static{this.\u0275fac=function(e){return new(e||t)(n(D))}}static{this.\u0275prov=o({token:t,factory:t.\u0275fac})}},y=new h("STORAGE_STRATEGIES"),ee=[{provide:y,useClass:A,multi:!0},{provide:y,useClass:j,multi:!0},{provide:y,useClass:L,multi:!0}];var Z="invalid_strategy",d=(()=>{class t{static{this.index={}}constructor(e){this.strategies=e,this.registration$=new m,e||(e=[]),this.strategies=e.reverse().map((i,r,g)=>i.name).map((i,r,g)=>g.indexOf(i)===r?r:null).filter(i=>i!==null).map(i=>e[i])}static get(e){if(!this.isStrategyRegistered(e))throw Error(Z);let i=this.index[e];return i.isAvailable||(i=this.index[c.InMemory]),i}static set(e,i){this.index[e]=i}static clear(e){e!==void 0?delete this.index[e]:this.index={}}static isStrategyRegistered(e){return e in this.index}static hasRegistredStrategies(){return Object.keys(this.index).length>0}getStrategy(e){return t.get(e)}
1indexStrategies(){this.strategies.forEach(e=>this.register(e.name,e))}indexStrategy(e,i=!1){if(t.isStrategyRegistered(e)&&!i)return t.get(e);let r=this.strategies.find(g=>g.name===e);if(!r)throw new Error(Z);return this.register(e,r,i),r}register(e,i,r=!1){(!t.isStrategyRegistered(e)||r)&&(t.set(e,i),this.registration$.next(e))}static{this.\u0275fac=function(i){return new(i||t)(n(y,8))}}static{this.\u0275prov=o({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})(),f=class extends l{};function te(t){let s=t.indexStrategy(c.Local);return new l(s)}var se={provide:f,useFactory:te,deps:[d]},E=class extends l{};function ie(t){let s=t.indexStrategy(c.Session);return new l(s)}var re={provide:E,useFactory:ie,deps:[d]};var ne=[se,re],J=new h("ngx_webstorage_config");function ae(t){return t.indexStrategies(),()=>d.index}var pe=(()=>{class t{constructor(e,i){i?u.consumeConfiguration(i):console.error("NgxWebstorage : Possible misconfiguration (The forRoot method usage is mandatory since the 3.0.0)")}static forRoot(e={}){return{ngModule:t,providers:[{provide:J,useValue:e},H,_,...ne,...ee,{provide:T,useFactory:ae,deps:[d],multi:!0}]}}static{this.\u0275fac=function(i){return new(i||t)(n(d),n(J,8))}}static{this.\u0275mod=R({type:t})}static{this.\u0275inj=M({})}}return t})();var Ae=(()=>{class t{constructor(e){this.document=e,this.localStorageService=p(f),this.translateService=p(G),this.eventManager=p(U),this.activeLang=F($)}change(e,i){this.activeLang.set(e),this.translateService.use(e),this.localStorageService.store("locale",e),i&&this.document.defaultView.window.location.reload()}getStoredLang(){return this.localStorageService.retrieve("locale")}getLangKeys(){return Object.keys(w).map(e=>w[e])}static{this.\u0275fac=function(i){return new(i||t)(n(P))}}static{this.\u0275prov=o({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();export{f as a,pe as b,Ae as c};
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.