import{c as Re}from"./chunk-2G3AB74T.js";import{D as oe,Da as de,Ea as le,Ia as v,Jd as M,K as ie,La as c,Na as p,Oa as a,Pa as T,Rd as j,Sa as A,Sd as k,Td as he,Za as _,Zb as ye,a as f,b as R,bc as D,cb as I,ha as se,ib as fe,kb as pe,l as m,mb as E,o as te,p as F,q as ne,qa as ce,sa as ue,t as re,za as ae}from"./chunk-V6BPA3D7.js";function We(e){e||(I(We),e=a(E));let r=new m(t=>e.onDestroy(t.next.bind(t)));return t=>t.pipe(ae(r))}function Je(e,r){!r?.injector&&I(Je);let t=r?.injector??a(pe),n=new ne(1),o=he(()=>{let i;try{i=e()}catch(s){k(()=>n.error(s));return}k(()=>n.next(i))},{injector:t,manualCleanup:!0});return t.get(E).onDestroy(()=>{o.destroy(),n.complete()}),n.asObservable()}function U(e,r){let t=!r?.manualCleanup;t&&!r?.injector&&I(U);let n=t?r?.injector?.get(E)??a(E):null,o;r?.requireSync?o=D({kind:0}):o=D({kind:1,value:r?.initialValue});let i=e.subscribe({next:s=>o.set({kind:1,value:s}),error:s=>{if(r?.rejectErrors)throw s;o.set({kind:2,error:s})}});return n?.onDestroy(i.unsubscribe.bind(i)),j(()=>{let s=o();switch(s.kind){case 1:return s.value;case 2:throw s.error;case 0:throw new le(601,"`toSignal()` called with `requireSync` but `Observable` did not emit synchronously.")}})}var V={};function Xe(e,r){if(V[e]=(V[e]||0)+1,typeof r=="function")return N(e,(...n)=>R(f({},r(...n)),{type:e}));switch(r?r._as:"empty"){case"empty":return N(e,()=>({type:e}));case"props":return N(e,n=>R(f({},n),{type:e}));default:throw new Error("Unexpected config.")}}function et(){return{_as:"props",_p:void 0}}function N(e,r){return Object.defineProperty(r,"type",{value:e,writable:!1})}function L(e){return e.charAt(0).toUpperCase()+e.substring(1)}function tt(e){return e.charAt(0).toLowerCase()+e.substring(1)}function mn(e){let{source:r,events:t}=e;return Object.keys(t).reduce((n,o)=>R(f({},n),{[nt(o)]:Xe(rt(r,o),t[o])}),{})}function vn(){return et()}function nt(e){return e.trim().split(" ").map((r,t)=>t===0?tt(r):L(r)).join("")}function rt(e,r){return`[${e}] ${r}`}var De="@ngrx/store/init",g=(()=>{class e extends F{constructor(){super({type:De})}next(t){if(typeof t=="function")throw new TypeError(`
        Dispatch expected an object, instead it received a function.
        If you're using the createAction function, make sure to invoke the function
        before dispatching the action. For example, someAction should be someAction().`);if(typeof t>"u")throw new TypeError("Actions must be objects");if(typeof t.type>"u")throw new TypeError("Actions must have a type property");super.next(t)}complete(){}ngOnDestroy(){super.complete()}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=v({token:e,factory:e.\u0275fac})}}return e})(),ot=[g],Me=new c("@ngrx/store Internal Root Guard"),me=new c("@ngrx/store Internal Initial State"),G=new c("@ngrx/store Initial State"),ke=new c("@ngrx/store Reducer Factory"),ve=new c("@ngrx/store Internal Reducer Factory Provider"),Ue=new c("@ngrx/store Initial Reducers"),P=new c("@ngrx/store Internal Initial Reducers"),ge=new c("@ngrx/store Store Features"),Ee=new c("@ngrx/store Internal Store Reducers"),z=new c("@ngrx/store Internal Feature Reducers"),be=new c("@ngrx/store Internal Feature Configs"),Ne=new c("@ngrx/store Internal Store Features"),Se=new c("@ngrx/store Internal Feature Reducers Token"),Pe=new c("@ngrx/store Feature Reducers"),Fe=new c("@ngrx/store User Provided Meta Reducers"),w=new c("@ngrx/store Meta Reducers"),Ie=new c("@ngrx/store Internal Resolved Meta Reducers"),je=new c("@ngrx/store User Runtime Checks Config"),we=new c("@ngrx/store Internal User Runtime Checks Config"),b=new c("@ngrx/store Internal Runtime Checks"),Z=new c("@ngrx/store Check if Action types are unique"),$=new c("@ngrx/store Root Store Provider"),xe=new c("@ngrx/store Feature State Provider");function H(e,r={}){let t=Object.keys(e),n={};for(let i=0;i<t.length;i++){let s=t[i];typeof e[s]=="function"&&(n[s]=e[s])}let o=Object.keys(n);return function(s,d){s=s===void 0?r:s;let l=!1,y={};for(let u=0;u<o.length;u++){let h=o[u],Qe=n[h],X=s[h],ee=Qe(X,d);y[h]=ee,l=l||ee!==X}return l?y:s}}function it(e,r){return Object.keys(e).filter(t=>t!==r).reduce((t,n)=>Object.assign(t,{[n]:e[n]}),{})}function ze(...e){return function(r){if(e.length===0)return r;let t=e[e.length-1];return e.slice(0,-1).reduceRight((o,i)=>i(o),t(r))}}function Ve(e,r){return Array.isArray(r)&&r.length>0&&(e=ze.apply(null,[...r,e])),(t,n)=>{let o=e(t);return(i,s)=>(i=i===void 0?n:i,o(i,s))}}function st(e){let r=Array.isArray(e)&&e.length>0?ze(...e):t=>t;return(t,n)=>(t=r(t),(o,i)=>(o=o===void 0?n:o,t(o,i)))}var S=class extends m{},x=class extends g{},ct="@ngrx/store/update-reducers",C=(()=>{class e extends F{get currentReducers(){return this.reducers}constructor(t,n,o,i){super(i(o,n)),this.dispatcher=t,this.initialState=n,this.reducers=o,this.reducerFactory=i}addFeature(t){this.addFeatures([t])}addFeatures(t){let n=t.reduce((o,{reducers:i,reducerFactory:s,metaReducers:d,initialState:l,key:y})=>{let u=typeof i=="function"?st(d)(i,l):Ve(s,d)(i,l);return o[y]=u,o},{});this.addReducers(n)}removeFeature(t){this.removeFeatures([t])}removeFeatures(t){this.removeReducers(t.map(n=>n.key))}addReducer(t,n){this.addReducers({[t]:n})}addReducers(t){this.reducers=f(f({},this.reducers),t),this.updateReducers(Object.keys(t))}removeReducer(t){this.removeReducers([t])}removeReducers(t){t.forEach(n=>{this.reducers=it(this.reducers,n)}),this.updateReducers(t)}updateReducers(t){this.next(this.reducerFactory(this.reducers,this.initialState)),this.dispatcher.next({type:ct,features:t})}ngOnDestroy(){this.complete()}static{this.\u0275fac=function(n){return new(n||e)(p(x),p(G),p(Ue),p(ke))}}static{this.\u0275prov=v({token:e,factory:e.\u0275fac})}}return e})(),ut=[C,{provide:S,useExisting:C},{provide:x,useExisting:g}],Y=(()=>{class e extends te{ngOnDestroy(){this.complete()}static{this.\u0275fac=(()=>{let t;return function(o){return(t||(t=fe(e)))(o||e)}})()}static{this.\u0275prov=v({token:e,factory:e.\u0275fac})}}return e})(),at=[Y],O=class extends m{},Ce=(()=>{class e extends F{static{this.INIT=De}constructor(t,n,o,i){super(i);let d=t.pipe(oe(re)).pipe(de(n)),l={state:i},y=d.pipe(ue(dt,l));this.stateSubscription=y.subscribe(({state:u,action:h})=>{this.next(u),o.next(h)}),this.state=U(this,{manualCleanup:!0,requireSync:!0})}ngOnDestroy(){this.stateSubscription.unsubscribe(),this.complete()}static{this.\u0275fac=function(n){return new(n||e)(p(g),p(S),p(Y),p(G))}}static{this.\u0275prov=v({token:e,factory:e.\u0275fac})}}return e})();function dt(e={state:void 0},[r,t]){let{state:n}=e;return{state:t(n,r),action:r}}var lt=[Ce,{provide:O,useExisting:Ce}],Q=(()=>{class e extends m{constructor(t,n,o){super(),this.actionsObserver=n,this.reducerManager=o,this.source=t,this.state=t.state}select(t,...n){return pt.call(null,t,...n)(this)}selectSignal(t,n){return j(()=>t(this.state()),n)}lift(t){let n=new e(this,this.actionsObserver,this.reducerManager);return n.operator=t,n}dispatch(t){this.actionsObserver.next(t)}next(t){this.actionsObserver.next(t)}error(t){this.actionsObserver.error(t)}complete(){this.actionsObserver.complete()}addReducer(t,n){this.reducerManager.addReducer(t,n)}removeReducer(t){this.reducerManager.removeReducer(t)}static{this.\u0275fac=function(n){return new(n||e)(p(O),p(g),p(C))}}static{this.\u0275prov=v({token:e,factory:e.\u0275fac})}}return e})(),ft=[Q];function pt(e,r,...t){return function(o){let i;if(typeof e=="string"){let s=[r,...t].filter(Boolean);i=o.pipe(ce(e,...s))}else if(typeof e=="function")i=o.pipe(ie(s=>e(s,r)));else throw new TypeError(`Unexpected type '${typeof e}' in select operator, expected 'string' or 'function'`);return i.pipe(se())}}var W="https://ngrx.io/guide/store/configuration/runtime-checks";function Oe(e){return e===void 0}function Te(e){return e===null}function $e(e){return Array.isArray(e)}function yt(e){return typeof e=="string"}function ht(e){return typeof e=="boolean"}function Rt(e){return typeof e=="number"}function qe(e){return typeof e=="object"&&e!==null}function mt(e){return qe(e)&&!$e(e)}function Be(e){if(!mt(e))return!1;let r=Object.getPrototypeOf(e);return r===Object.prototype||r===null}function q(e){return typeof e=="function"}function vt(e){return q(e)&&e.hasOwnProperty("\u0275cmp")}function gt(e,r){return Object.prototype.hasOwnProperty.call(e,r)}var Et=!1;function bt(){return Et}function Ae(e,r){return e===r}function St(e,r,t){for(let n=0;n<e.length;n++)if(!t(e[n],r[n]))return!0;return!1}function Ke(e,r=Ae,t=Ae){let n=null,o=null,i;function s(){n=null,o=null}function d(u=void 0){i={result:u}}function l(){i=void 0}function y(){if(i!==void 0)return i.result;if(!n)return o=e.apply(null,arguments),n=arguments,o;if(!St(arguments,n,r))return o;let u=e.apply(null,arguments);return n=arguments,t(o,u)?o:(o=u,u)}return{memoized:y,reset:s,setResult:d,clearResult:l}}function Le(...e){return It(Ke)(...e)}function Ft(e,r,t,n){if(t===void 0){let i=r.map(s=>s(e));return n.memoized.apply(null,i)}let o=r.map(i=>i(e,t));return n.memoized.apply(null,[...o,t])}function It(e,r={stateFn:Ft}){return function(...t){let n=t;if(Array.isArray(n[0])){let[u,...h]=n;n=[...u,...h]}else n.length===1&&wt(n[0])&&(n=xt(n[0]));let o=n.slice(0,n.length-1),i=n[n.length-1],s=o.filter(u=>u.release&&typeof u.release=="function"),d=e(function(...u){return i.apply(null,u)}),l=Ke(function(u,h){return r.stateFn.apply(null,[u,o,h,d])});function y(){l.reset(),d.reset(),s.forEach(u=>u.release())}return Object.assign(l.memoized,{release:y,projector:d.memoized,setResult:l.setResult,clearResult:l.clearResult})}}function jt(e){return Le(r=>{let t=r[e];return!bt()&&M()&&!(e in r)&&console.warn(`@ngrx/store: The feature name "${e}" does not exist in the state, therefore createFeatureSelector cannot access it.  Be sure it is imported in a loaded module using StoreModule.forRoot('${e}', ...) or StoreModule.forFeature('${e}', ...).  If the default state is intended to be undefined, as is the case with router state, this development-only warning message can be ignored.`),t},r=>r)}function wt(e){return!!e&&typeof e=="object"&&Object.values(e).every(r=>typeof r=="function")}function xt(e){let r=Object.values(e),t=Object.keys(e),n=(...o)=>t.reduce((i,s,d)=>R(f({},i),{[s]:o[d]}),{});return[...r,n]}function gn(e){let{name:r,reducer:t,extraSelectors:n}=e,o=jt(r),i=Ct(o,t),s=f({[`select${L(r)}State`]:o},i),d=n?n(s):{};return f(f({name:r,reducer:t},s),d)}function Ct(e,r){let t=Ot(r);return(Be(t)?Object.keys(t):[]).reduce((o,i)=>R(f({},o),{[`select${L(i)}`]:Le(e,s=>s?.[i])}),{})}function Ot(e){return e(void 0,{type:"@ngrx/feature/init"})}function Tt(e){return e instanceof c?a(e):e}function At(e,r){return r.map((t,n)=>{if(e[n]instanceof c){let o=a(e[n]);return{key:t.key,reducerFactory:o.reducerFactory?o.reducerFactory:H,metaReducers:o.metaReducers?o.metaReducers:[],initialState:o.initialState}}return t})}function _t(e){return e.map(r=>r instanceof c?a(r):r)}function Ge(e){return typeof e=="function"?e():e}function Dt(e,r){return e.concat(r)}function Mt(){if(a(Q,{optional:!0,skipSelf:!0}))throw new TypeError("The root Store has been provided more than once. Feature modules should provide feature states instead.");return"guarded"}function kt(e,r){return function(t,n){let o=r.action(n)?B(n):n,i=e(t,o);return r.state()?B(i):i}}function B(e){Object.freeze(e);let r=q(e);return Object.getOwnPropertyNames(e).forEach(t=>{if(!t.startsWith("\u0275")&&gt(e,t)&&(!r||t!=="caller"&&t!=="callee"&&t!=="arguments")){let n=e[t];(qe(n)||q(n))&&!Object.isFrozen(n)&&B(n)}}),e}function Ut(e,r){return function(t,n){if(r.action(n)){let i=K(n);_e(i,"action")}let o=e(t,n);if(r.state()){let i=K(o);_e(i,"state")}return o}}function K(e,r=[]){return(Oe(e)||Te(e))&&r.length===0?{path:["root"],value:e}:Object.keys(e).reduce((n,o)=>{if(n)return n;let i=e[o];return vt(i)?n:Oe(i)||Te(i)||Rt(i)||ht(i)||yt(i)||$e(i)?!1:Be(i)?K(i,[...r,o]):{path:[...r,o],value:i}},!1)}function _e(e,r){if(e===!1)return;let t=e.path.join("."),n=new Error(`Detected unserializable ${r} at "${t}". ${W}#strict${r}serializability`);throw n.value=e.value,n.unserializablePath=t,n}function Nt(e,r){return function(t,n){if(r.action(n)&&!ye.isInAngularZone())throw new Error(`Action '${n.type}' running outside NgZone. ${W}#strictactionwithinngzone`);return e(t,n)}}function Pt(e){return M()?f({strictStateSerializability:!1,strictActionSerializability:!1,strictStateImmutability:!0,strictActionImmutability:!0,strictActionWithinNgZone:!1,strictActionTypeUniqueness:!1},e):{strictStateSerializability:!1,strictActionSerializability:!1,strictStateImmutability:!1,strictActionImmutability:!1,strictActionWithinNgZone:!1,strictActionTypeUniqueness:!1}}function zt({strictActionSerializability:e,strictStateSerializability:r}){return t=>e||r?Ut(t,{action:n=>e&&!J(n),state:()=>r}):t}function Vt({strictActionImmutability:e,strictStateImmutability:r}){return t=>e||r?kt(t,{action:n=>e&&!J(n),state:()=>r}):t}function J(e){return e.type.startsWith("@ngrx")}function $t({strictActionWithinNgZone:e}){return r=>e?Nt(r,{action:t=>e&&!J(t)}):r}function qt(e){return[{provide:we,useValue:e},{provide:je,useFactory:Bt,deps:[we]},{provide:b,deps:[je],useFactory:Pt},{provide:w,multi:!0,deps:[b],useFactory:Vt},{provide:w,multi:!0,deps:[b],useFactory:zt},{provide:w,multi:!0,deps:[b],useFactory:$t}]}function Ze(){return[{provide:Z,multi:!0,deps:[b],useFactory:Kt}]}function Bt(e){return e}function Kt(e){if(!e.strictActionTypeUniqueness)return;let r=Object.entries(V).filter(([,t])=>t>1).map(([t])=>t);if(r.length)throw new Error(`Action types are registered more than once, ${r.map(t=>`"${t}"`).join(", ")}. ${W}#strictactiontypeuniqueness`)}function En(e,r,t={}){return _([...Qt(e,r,t),Yt])}function Lt(e={},r={}){return[{provide:Me,useFactory:Mt},{provide:me,useValue:r.initialState},{provide:G,useFactory:Ge,deps:[me]},{provide:P,useValue:e},{provide:Ee,useExisting:e instanceof c?e:P},{provide:Ue,deps:[P,[new T(Ee)]],useFactory:Tt},{provide:Fe,useValue:r.metaReducers?r.metaReducers:[]},{provide:Ie,deps:[w,Fe],useFactory:Dt},{provide:ve,useValue:r.reducerFactory?r.reducerFactory:H},{provide:ke,deps:[ve,Ie],useFactory:Ve},ot,ut,at,lt,ft,qt(r.runtimeChecks),Ze()]}function Gt(){a(g),a(S),a(Y),a(Q),a(Me,{optional:!0}),a(Z,{optional:!0})}var Zt=[{provide:$,useFactory:Gt},{provide:A,multi:!0,useFactory(){return()=>a($)}}];function bn(e,r){return _([...Lt(e,r),Zt])}function Ht(){a($);let e=a(Ne),r=a(Pe),t=a(C);a(Z,{optional:!0});let n=e.map((o,i)=>{let d=r.shift()[i];return R(f({},o),{reducers:d,initialState:Ge(o.initialState)})});t.addFeatures(n)}var Yt=[{provide:xe,useFactory:Ht},{provide:A,multi:!0,useFactory(){return()=>a(xe)}}];function Qt(e,r,t={}){return[{provide:be,multi:!0,useValue:e instanceof Object?{}:t},{provide:ge,multi:!0,useValue:{key:e instanceof Object?e.name:e,reducerFactory:!(t instanceof c)&&t.reducerFactory?t.reducerFactory:H,metaReducers:!(t instanceof c)&&t.metaReducers?t.metaReducers:[],initialState:!(t instanceof c)&&t.initialState?t.initialState:void 0}},{provide:Ne,deps:[be,ge],useFactory:At},{provide:z,multi:!0,useValue:e instanceof Object?e.reducer:r},{provide:Se,multi:!0,useExisting:r instanceof c?r:z},{provide:Pe,multi:!0,deps:[z,[new T(Se)]],useFactory:_t},Ze()]}function Sn(...e){let r=e.pop(),t=e.map(n=>n.type);return{reducer:r,types:t}}function Fn(e,...r){let t=new Map;for(let n of r)for(let o of n.types){let i=t.get(o);if(i){let s=(d,l)=>n.reducer(i(d,l),l);t.set(o,s)}else t.set(o,n.reducer)}return function(n=e,o){let i=t.get(o.type);return i?i(n,o):n}}var He=function(e){return e.initial="initial",e.loading="loading",e.success="success",e.error="error",e}(He||{});function wn(){return{status:He.initial}}var Wt="B2B",Jt="B2C",Ye={b2b:Wt,b2c:Jt};var Xt=e=>e===Ye.b2c;var An=()=>Xt(Re.getChannel());export{We as a,Je as b,U as c,Xe as d,et as e,mn as f,vn as g,De as h,g as i,G as j,b as k,$ as l,xe as m,S as n,x as o,ct as p,Y as q,O as r,Q as s,pt as t,bt as u,Le as v,jt as w,gn as x,En as y,bn as z,Sn as A,Fn as B,An as C,He as D,wn as E};