PageSourceSearch

https://portals.noloco.io/assets/project-wd5IloI0.js

js noloco.io collected 2026-09-25 18:39:24 UTC 95,947 bytes, 25 lines download raw bytes

1import{dJ as Lt,dK as Ln,a8 as Se,dL as ht,dM as on,dN as nt,w as M,g as Y,dO as Mt,dP as Mn,dQ as it,V as jn,as as Un,aW as jt,U as Ut}from"./Icon-Ime4wSjK.js";import{g as Vn}from"./_commonjsHelpers-CxYHiaSM.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"967abcd"},e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[new e.Error().stack]=(function(n){for(var r=1;r<arguments.length;r++){var i=arguments[r];if(i!=null)for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])}return n})({},e._sentryModuleMetadata[new e.Error().stack],{"_sentryBundlerPluginAppKey:noloco-ui":!0});var t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="8e31f4a7-ae23-4664-9108-ad1a41dabbd2",e._sentryDebugIdIdentifier="sentry-dbid-8e31f4a7-ae23-4664-9108-ad1a41dabbd2")}catch{}})();function A(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var Bn=typeof Symbol=="function"&&Symbol.observable||"@@observable",Vt=Bn,rt=()=>Math.random().toString(36).substring(7).split("").join("."),Gn={INIT:`@@redux/INIT${rt()}`,REPLACE:`@@redux/REPLACE${rt()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${rt()}`},Ne=Gn;function Nt(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function cn(e,t,n){if(typeof e!="function")throw new Error(A(2));if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(A(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(A(1));return n(cn)(e,t)}let r=e,i=t,a=new Map,s=a,o=0,c=!1;function d(){s===a&&(s=new Map,a.forEach((T,S)=>{s.set(S,T)}))}function l(){if(c)throw new Error(A(3));return i}function f(T){if(typeof T!="function")throw new Error(A(4));if(c)throw new Error(A(5));let S=!0;d();const v=o++;return s.set(v,T),function(){if(S){if(c)throw new Error(A(6));S=!1,d(),s.delete(v),a=null}}}function p(T){if(!Nt(T))throw new Error(A(7));if(typeof T.type>"u")throw new Error(A(8));if(typeof T.type!="string")throw new Error(A(17));if(c)throw new Error(A(9));try{c=!0,i=r(i,T)}finally{c=!1}
1return(a=s).forEach(v=>{v()}),T}function E(T){if(typeof T!="function")throw new Error(A(10));r=T,p({type:Ne.REPLACE})}function m(){const T=f;return{subscribe(S){if(typeof S!="object"||S===null)throw new Error(A(11));function v(){const x=S;x.next&&x.next(l())}return v(),{unsubscribe:T(v)}},[Vt](){return this}}}return p({type:Ne.INIT}),{dispatch:p,subscribe:f,getState:l,replaceReducer:E,[Vt]:m}}function $n(e){Object.keys(e).forEach(t=>{const n=e[t];if(typeof n(void 0,{type:Ne.INIT})>"u")throw new Error(A(12));if(typeof n(void 0,{type:Ne.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(A(13))})}function zn(e){const t=Object.keys(e),n={};for(let a=0;a<t.length;a++){const s=t[a];typeof e[s]=="function"&&(n[s]=e[s])}const r=Object.keys(n);let i;try{$n(n)}catch(a){i=a}return function(s={},o){if(i)throw i;let c=!1;const d={};for(let l=0;l<r.length;l++){const f=r[l],p=n[f],E=s[f],m=p(E,o);if(typeof m>"u")throw o&&o.type,new Error(A(14));d[f]=m,c=c||m!==E}return c=c||r.length!==Object.keys(s).length,c?d:s}}function Bt(e,t){return function(...n){return t(e.apply(this,n))}}function Ir(e,t){if(typeof e=="function")return Bt(e,t);if(typeof e!="object"||e===null)throw new Error(A(16));const n={};for(const r in e){const i=e[r];typeof i=="function"&&(n[r]=Bt(i,t))}return n}function Ce(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function Jn(...e){return t=>(n,r)=>{const i=t(n,r);let a=()=>{throw new Error(A(15))};const s={getState:i.getState,dispatch:(c,...d)=>a(c,...d)},o=e.map(c=>c(s));return a=Ce(...o)(i.dispatch),{...i,dispatch:a}}}function Wn(e){return Nt(e)&&"type"in e&&typeof e.type=="string"}var ln=Symbol.for("immer-nothing"),Gt=Symbol.for("immer-draftable"),R=Symbol.for("immer-state");function U(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var ie=Object.getPrototypeOf;function X(e){return!!e&&!!e[R]}function J(e){return e?un(e)||Array.isArray(e)||!!e[Gt]||!!e.constructor?.[Gt]||ke(e)||Re(e):!1}var Yn=Object.prototype.constructor.toString();function un(e){if(!e||typeof e!="object")return!1;const t=ie(e);if(t===null)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===Yn}function Oe(e,t){De(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function De(e){const t=e[R];return t?t.type_:Array.isArray(e)?1:ke(e)?2:Re(e)?3:0}function pt(e,t){return De(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function dn(e,t,n){const r=De(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function Hn(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function ke(e){return e instanceof Map}function Re(e){return e instanceof Set}function q(e){return e.copy_||e.base_}function yt(e,t){if(ke(e))return new Map(e);if(Re(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=un(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[R];let i=Reflect.ownKeys(r);for(let a=0;a<i.length;a++){const s=i[a],o=r[s];o.writable===!1&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(r[s]={configurable:!0,writable:!0,enumerable:o.enumerable,value:e[s]})}return Object.create(ie(e),r)}else{const r=ie(e);if(r!==null&&n)return{...e};const i=Object.create(r);return Object.assign(i,e)}}function Ct(e,t=!1){return Fe(e)||X(e)||!J(e)||(De(e)>1&&(e.set=e.add=e.clear=e.delete=Kn),Object.freeze(e),t&&Object.entries(e).forEach(([n,r])=>Ct(r,!0))),e}function Kn(){U(2)}function Fe(e){return Object.isFrozen(e)}var qn={};function Q(e){const t=qn[e];return t||U(0,e),t}var pe;function fn(){return pe}function Xn(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function $t(e,t){t&&(Q("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function vt(e){gt(e),e.drafts_.forEach(Qn),e.drafts_=null}function gt(e){e===pe&&(pe=e.parent_)}function zt(e){return pe=Xn(pe,e)}function Qn(e){const t=e[R];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Jt(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[R].modified_&&(vt(t),U(4)),J(e)&&(e=be(t,e),t.parent_||Ae(t,e)),t.patches_&&Q("Patches").generateReplacementPatches_(n[R].base_,e,t.patches_,t.inversePatches_)):e=be(t,n,[]),vt(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==ln?e:void 0}function be(e,t,n){if(Fe(t))return t;const r=t[R];if(!r)return Oe(t,(i,a)=>Wt(e,r,t,i,a,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return Ae(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const i=r.copy_;let a=i,s=!1;r.type_===3&&(a=new Set(i),i.clear(),s=!0),Oe(a,(o,c)=>Wt(e,r,i,o,c,n,s)),Ae(e,i,!1),n&&e.patches_&&Q("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}
1function Wt(e,t,n,r,i,a,s){if(X(i)){const o=a&&t&&t.type_!==3&&!pt(t.assigned_,r)?a.concat(r):void 0,c=be(e,i,o);if(dn(n,r,c),X(c))e.canAutoFreeze_=!1;else return}else s&&n.add(i);if(J(i)&&!Fe(i)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;be(e,i),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&Ae(e,i)}}function Ae(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Ct(t,n)}function Zn(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:fn(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=r,a=Ot;n&&(i=[r],a=ye);const{revoke:s,proxy:o}=Proxy.revocable(i,a);return r.draft_=o,r.revoke_=s,o}var Ot={get(e,t){if(t===R)return e;const n=q(e);if(!pt(n,t))return ei(e,n,t);const r=n[t];return e.finalized_||!J(r)?r:r===at(e.base_,t)?(st(e),e.copy_[t]=Et(r,e)):r},has(e,t){return t in q(e)},ownKeys(e){return Reflect.ownKeys(q(e))},set(e,t,n){const r=hn(q(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const i=at(q(e),t),a=i?.[R];if(a&&a.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(Hn(n,i)&&(n!==void 0||pt(e.base_,t)))return!0;st(e),mt(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return at(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,st(e),mt(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=q(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){U(11)},getPrototypeOf(e){return ie(e.base_)},setPrototypeOf(){U(12)}},ye={};Oe(Ot,(e,t)=>{ye[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});ye.deleteProperty=function(e,t){return ye.set.call(this,e,t,void 0)};ye.set=function(e,t,n){return Ot.set.call(this,e[0],t,n,e[0])};function at(e,t){const n=e[R];return(n?q(n):e)[t]}function ei(e,t,n){const r=hn(t,n);return r?"value"in r?r.value:r.get?.call(e.draft_):void 0}function hn(e,t){if(!(t in e))return;let n=ie(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=ie(n)}}function mt(e){e.modified_||(e.modified_=!0,e.parent_&&mt(e.parent_))}function st(e){e.copy_||(e.copy_=yt(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var ti=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const a=n;n=t;const s=this;return function(c=a,...d){return s.produce(c,l=>n.call(this,l,...d))}}typeof n!="function"&&U(6),r!==void 0&&typeof r!="function"&&U(7);let i;if(J(t)){const a=zt(this),s=Et(t,void 0);let o=!0;try{i=n(s),o=!1}finally{o?vt(a):gt(a)}return $t(a,r),Jt(i,a)}else if(!t||typeof t!="object"){if(i=n(t),i===void 0&&(i=t),i===ln&&(i=void 0),this.autoFreeze_&&Ct(i,!0),r){const a=[],s=[];Q("Patches").generateReplacementPatches_(t,i,a,s),r(a,s)}return i}else U(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(s,...o)=>this.produceWithPatches(s,c=>t(c,...o));let r,i;return[this.produce(t,n,(s,o)=>{r=s,i=o}),r,i]},typeof e?.autoFreeze=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof e?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){J(e)||U(8),X(e)&&(e=ni(e));const t=zt(this),n=Et(e,void 0);return n[R].isManual_=!0,gt(t),n}finishDraft(e,t){const n=e&&e[R];(!n||!n.isManual_)&&U(9);const{scope_:r}=n;return $t(r,t),Jt(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const i=t[n];if(i.path.length===0&&i.op==="replace"){e=i.value;break}}n>-1&&(t=t.slice(n+1));const r=Q("Patches").applyPatches_;return X(e)?r(e,t):this.produce(e,i=>r(i,t))}};function Et(e,t){const n=ke(e)?Q("MapSet").proxyMap_(e,t):Re(e)?Q("MapSet").proxySet_(e,t):Zn(e,t);return(t?t.scope_:fn()).drafts_.push(n),n}function ni(e){return X(e)||U(10,e),pn(e)}function pn(e){if(!J(e)||Fe(e))return e;const t=e[R];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=yt(e,t.scope_.immer_.useStrictShallowCopy_)}else n=yt(e,!0);return Oe(n,(r,i)=>{dn(n,r,pn(i))}),t&&(t.finalized_=!1),n}var F=new ti,yn=F.produce;F.produceWithPatches.bind(F);var ii=F.setAutoFreeze.bind(F);F.setUseStrictShallowCopy.bind(F);F.applyPatches.bind(F);var Sr=F.createDraft.bind(F),Nr=F.finishDraft.bind(F);function vn(e){return({dispatch:n,getState:r})=>i=>a=>typeof a=="function"?a(n,r,e):i(a)}var ri=vn(),ai=vn,si=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Ce:Ce.apply(null,arguments)};function Yt(e,t){function n(...r){if(t){let i=t(...r);if(!i)throw new Error(z(0));return{type:e,payload:i.payload,..."meta"in i&&{meta:i.meta},..."error"in i&&{error:i.error}}}return{type:e,payload:r[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=r=>Wn(r)&&r.type===e,n}var gn=class fe extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,fe.prototype)}static get[Symbol.species](){return fe}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new fe(...t[0].concat(this)):new fe(...t.concat(this))}};function Ht(e){return J(e)?yn(e,()=>{}):e}function Kt(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}function oi(e){return typeof e=="boolean"}var ci=()=>function(t){const{thunk:n=!0,immutableCheck:r=!0,serializableCheck:i=!0,actionCreatorCheck:a=!0}=t??{};let s=new gn;return n&&(oi(n)?s.push(ri):s.push(ai(n.extraArgument))),s},li="RTK_autoBatch",qt=e=>t=>{setTimeout(t,e)},ui=(e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let i=!0,a=!1,s=!1;const o=new Set,c=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:qt(10):e.type==="callback"?e.queueNotification:qt(e.timeout),d=()=>{s=!1,a&&(a=!1,o.forEach(l=>l()))};return Object.assign({},r,{subscribe(l){const f=()=>
1i&&l(),p=r.subscribe(f);return o.add(l),()=>{p(),o.delete(l)}},dispatch(l){try{return i=!l?.meta?.[li],a=!i,a&&(s||(s=!0,c(d))),r.dispatch(l)}finally{i=!0}}})},di=e=>function(n){const{autoBatch:r=!0}=n??{};let i=new gn(e);return r&&i.push(ui(typeof r=="object"?r:void 0)),i};function Cr(e){const t=ci(),{reducer:n=void 0,middleware:r,devTools:i=!0,preloadedState:a=void 0,enhancers:s=void 0}=e||{};let o;if(typeof n=="function")o=n;else if(Nt(n))o=zn(n);else throw new Error(z(1));let c;typeof r=="function"?c=r(t):c=t();let d=Ce;i&&(d=si({trace:!1,...typeof i=="object"&&i}));const l=Jn(...c),f=di(l);let p=typeof s=="function"?s(f):f();const E=d(...p);return cn(o,a,E)}function mn(e){const t={},n=[];let r;const i={addCase(a,s){const o=typeof a=="string"?a:a.type;if(!o)throw new Error(z(28));if(o in t)throw new Error(z(29));return t[o]=s,i},addMatcher(a,s){return n.push({matcher:a,reducer:s}),i},addDefaultCase(a){return r=a,i}};return e(i),[t,n,r]}function fi(e){return typeof e=="function"}function hi(e,t){let[n,r,i]=mn(t),a;if(fi(e))a=()=>Ht(e());else{const o=Ht(e);a=()=>o}function s(o=a(),c){let d=[n[c.type],...r.filter(({matcher:l})=>l(c)).map(({reducer:l})=>l)];return d.filter(l=>!!l).length===0&&(d=[i]),d.reduce((l,f)=>{if(f)if(X(l)){const E=f(l,c);return E===void 0?l:E}else{if(J(l))return yn(l,p=>f(p,c));{const p=f(l,c);if(p===void 0){if(l===null)return l;throw Error("A case reducer on a non-draftable value must not return undefined")}return p}}return l},o)}return s.getInitialState=a,s}var pi=Symbol.for("rtk-slice-createasyncthunk");function yi(e,t){return`${e}/${t}`}function vi({creators:e}={}){const t=e?.asyncThunk?.[pi];return function(r){const{name:i,reducerPath:a=i}=r;if(!i)throw new Error(z(11));const s=(typeof r.reducers=="function"?r.reducers(Ei()):r.reducers)||{},o=Object.keys(s),c={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},d={addCase(v,_){const x=typeof v=="string"?v:v.type;if(!x)throw new Error(z(12));if(x in c.sliceCaseReducersByType)throw new Error(z(13));return c.sliceCaseReducersByType[x]=_,d},addMatcher(v,_){return c.sliceMatchers.push({matcher:v,reducer:_}),d},exposeAction(v,_){return c.actionCreators[v]=_,d},exposeCaseReducer(v,_){return c.sliceCaseReducersByName[v]=_,d}};o.forEach(v=>{const _=s[v],x={reducerName:v,type:yi(i,v),createNotation:typeof r.reducers=="function"};Ti(_)?Ii(x,_,d,t):_i(x,_,d)});function l(){const[v={},_=[],x=void 0]=typeof r.extraReducers=="function"?mn(r.extraReducers):[r.extraReducers],w={...v,...c.sliceCaseReducersByType};return hi(r.initialState,I=>{for(let g in w)I.addCase(g,w[g]);for(let g of c.sliceMatchers)I.addMatcher(g.matcher,g.reducer);for(let g of _)I.addMatcher(g.matcher,g.reducer);x&&I.addDefaultCase(x)})}const f=v=>v,p=new Map;let E;function m(v,_){return E||(E=l()),E(v,_)}function N(){return E||(E=l()),E.getInitialState()}function T(v,_=!1){function x(I){let g=I[v];return typeof g>"u"&&_&&(g=N()),g}function w(I=f){const g=Kt(p,_,()=>new WeakMap);return Kt(g,I,()=>{const ae={};for(const[se,me]of Object.entries(r.selectors??{}))ae[se]=gi(me,I,N,_);return ae})}return{reducerPath:v,getSelectors:w,get selectors(){return w(x)},selectSlice:x}}
vendor: 1,291 bytes, line 1
1const S={name:i,reducer:m,actions:c.actionCreators,caseReducers:c.sliceCaseReducersByName,getInitialState:N,...T(a),injectInto(v,{reducerPath:_,...x}={}){const w=_??a;return v.inject({reducerPath:w,reducer:m},x),{...S,...T(w,!0)}}};return S}}function gi(e,t,n,r){function i(a,...s){let o=t(a);return typeof o>"u"&&r&&(o=n()),e(o,...s)}return i.unwrapped=e,i}var mi=vi();function Ei(){function e(t,n){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...n}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...n){return t(...n)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,n){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:n}},asyncThunk:e}}function _i({type:e,reducerName:t,createNotation:n},r,i){let a,s;if("reducer"in r){if(n&&!xi(r))throw new Error(z(17));a=r.reducer,s=r.prepare}else a=r;i.addCase(e,a).exposeCaseReducer(t,a).exposeAction(t,s?Yt(e,s):Yt(e))}function Ti(e){return e._reducerDefinitionType==="asyncThunk"}function xi(e){return e._reducerDefinitionType==="reducerWithPrepare"}function Ii({type:e,reducerName:t},n,r,i){if(!i)throw new Error(z(18));const{payloadCreator:a,fulfilled:s,pending:o,rejected:c,settled:d,options:l}=n,f=i(e,a,l);r.exposeAction(t,f),s&&r.addCase(f.fulfilled,s),o&&r.addCase(f.pen
1ding,o),c&&r.addCase(f.rejected,c),d&&r.addMatcher(f.settled,d),r.exposeCaseReducer(t,{fulfilled:s||Ee,pending:o||Ee,rejected:c||Ee,settled:d||Ee})}function Ee(){}function z(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}function ot(e,t){if(!!!e)throw new Error(t)}function Si(e){return typeof e=="object"&&e!==null}function Ni(e,t){if(!!!e)throw new Error("Unexpected invariant triggered.")}const Ci=/\r\n|[\n\r]/g;function _t(e,t){let n=0,r=1;for(const i of e.body.matchAll(Ci)){if(typeof i.index=="number"||Ni(!1),i.index>=t)break;n=i.index+i[0].length,r+=1}return{line:r,column:t+1-n}}function Oi(e){return En(e.source,_t(e.source,e.start))}function En(e,t){const n=e.locationOffset.column-1,r="".padStart(n)+e.body,i=t.line-1,a=e.locationOffset.line-1,s=t.line+a,o=t.line===1?n:0,c=t.column+o,d=`${e.name}:${s}:${c}
2`,l=r.split(/\r\n|[\n\r]/g),f=l[i];if(f.length>120){const p=Math.floor(c/80),E=c%80,m=[];for(let N=0;N<f.length;N+=80)m.push(f.slice(N,N+80));return d+Xt([[`${s} |`,m[0]],...m.slice(1,p+1).map(N=>["|",N]),["|","^".padStart(E)],["|",m[p+1]]])}return d+Xt([[`${s-1} |`,l[i-1]],[`${s} |`,f],["|","^".padStart(c)],[`${s+1} |`,l[i+1]]])}function Xt(e){const t=e.filter(([r,i])=>i!==void 0),n=Math.max(...t.map(([r])=>r.length));return t.map(([r,i])=>r.padStart(n)+(i?" "+i:"")).join(`
3`)}function bi(e){const t=e[0];return t==null||"kind"in t||"length"in t?{nodes:t,source:e[1],positions:e[2],path:e[3],originalError:e[4],extensions:e[5]}:t}class bt extends Error{constructor(t,...n){var r,i,a;const{nodes:s,source:o,positions:c,path:d,originalError:l,extensions:f}=bi(n);super(t),this.name="GraphQLError",this.path=d??void 0,this.originalError=l??void 0,this.nodes=Qt(Array.isArray(s)?s:s?[s]:void 0);const p=Qt((r=this.nodes)===null||r===void 0?void 0:r.map(m=>m.loc).filter(m=>m!=null));this.source=o??(p==null||(i=p[0])===null||i===void 0?void 0:i.source),this.positions=c??p?.map(m=>m.start),this.locations=c&&o?c.map(m=>_t(o,m)):p?.map(m=>_t(m.source,m.start));const E=Si(l?.extensions)?l?.extensions:void 0;this.extensions=(a=f??E)!==null&&a!==void 0?a:Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),l!=null&&l.stack?Object.defineProperty(this,"stack",{value:l.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,bt):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let t=this.message;if(this.nodes)for(const n of this.nodes)n.loc&&(t+=`
4
5`+Oi(n.loc));else if(this.source&&this.locations)for(const n of this.locations)t+=`
6
7`+En(this.source,n);return t}toJSON(){const t={message:this.message};return this.locations!=null&&(t.locations=this.locations),this.path!=null&&(t.path=this.path),this.extensions!=null&&Object.keys(this.extensions).length>0&&(t.extensions=this.extensions),t}}function Qt(e){return e===void 0||e.length===0?void 0:e}function b(e,t,n){return new bt(`Syntax Error: ${n}`,{source:e,positions:[t]})}class Ai{constructor(t,n,r){this.start=t.start,this.end=n.end,this.startToken=t,this.endToken=n,this.source=r}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}}class _n{constructor(t,n,r,i,a,s){this.kind=t,this.start=n,this.end=r,this.line=i,this.column=a,this.value=s,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}}const wi={Name:[],Document:["definitions"],OperationDefinition:["description","name","variableDefinitions","directives","selectionSet"],VariableDefinition:["description","variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["description","name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],Float
vendor: 4,597 bytes, line 7
7Value:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","directives","locations"],SchemaExtension:["directives","operationTypes"],DirectiveExtension:["name","directives"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"],TypeCoordinate:["name"],MemberCoordinate:["name","memberName"],ArgumentCoordinate:["name","fieldName","argumentName"],DirectiveCoordinate:["name"],DirectiveArgumentCoordinate:["name","argumentName"]},Di=new Set(Object.keys(wi));function Or(e){const t=e?.kind;return typeof t=="string"&&Di.has(t)}var ne;(function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"})(ne||(ne={}));var Tt;(function(e){e.QUERY="QUERY",e.MUTATION="MUTATION",e.SUBSCRIPTION="SUBSCRIPTION",e.FIELD="FIELD",e.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",e.FRAGMENT_SPREAD="FRAGMENT_SPREAD",e.INLINE_FRAGMENT="INLINE_FRAGMENT",e.VARIABLE_DEFINITION="VARIABLE_DEFINITION",e.SCHEMA="SCHEMA",e.SCALAR="SCALAR",e.OBJECT="OBJECT",e.FIELD_DEFINITION="FIELD_DEFINITION",e.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",e.INTERFACE="INTERFACE",e.UNION="UNION",e.ENUM="ENUM",e.ENUM_VALUE="ENUM_VALUE",e.INPUT_OBJECT="INPUT_OBJECT",e.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION",e.DIRECTIVE_DEFINITION="DIRECTIVE_DEFINITION"})(Tt||(Tt={}));var h;(function(e){e.NAME="Name",e.DOCUMENT="Document",e.OPERATION_DEFINITION="OperationDefinition",e.VARIABLE_DEFINITION="VariableDefinition",e.SELECTION_SET="SelectionSet",e.FIELD="Field",e.ARGUMENT="Argument",e.FRAGMENT_SPREAD="FragmentSpread",e.INLINE_FRAGMENT="InlineFragment",e.FRAGMENT_DEFINITION="FragmentDefinition",e.VARIABLE="Variable",e.INT="IntValue",e.FLOAT="FloatValue",e.STRING="StringValue",e.BOOLEAN="BooleanValue",e.NULL="NullValue",e.ENUM="EnumValue",e.LIST="ListValue",e.OBJECT="ObjectValue",e.OBJECT_FIELD="ObjectField",e.DIRECTIVE="Directive",e.NAMED_TYPE="NamedType",e.LIST_TYPE="ListType",e.NON_NULL_TYPE="NonNullType",e.SCHEMA_DEFINITION="SchemaDefinition",e.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",e.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",e.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",e.FIELD_DEFINITION="FieldDefinition",e.INPUT_VALUE_DEFINITION="InputValueDefinition",e.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",e.UNION_TYPE_DEFINITION="UnionTypeDefinition",e.ENUM_TYPE_DEFINITION="EnumTypeDefinition",e.ENUM_VALUE_DEFINITION="EnumValueDefinition",e.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",e.DIRECTIVE_DEFINITION="DirectiveDefinition",e.SCHEMA_EXTENSION="SchemaExtension",e.DIRECTIVE_EXTENSION="DirectiveExtension",e.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",e.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",e.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",e.UNION_TYPE_EXTENSION="UnionTypeExtension",e.ENUM_TYPE_EXTENSION="EnumTypeExtension",e.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension",e.TYPE_COORDINATE="TypeCoordinate",e.MEMBER_COORDINATE="MemberCoordinate",e.ARGUMENT_COORDINATE="ArgumentCoordinate",e.DIRECTIVE_COORDINATE="DirectiveCoordinate",e.DIRECTIVE_ARGUMENT_COORDINATE="DirectiveArgumentCoordinate"})(h||(h={}));function xt(e){return e===9||e===32}function ve(e){return e>=48&&e<=57}function Tn(e){return e>=97&&e<=122||e>=65&&e<=90}function xn(e){return Tn(e)||e===95}function ki(e){return Tn(e)||ve(e)||e===95}function Ri(e){var t;let n=Number.MAX_SAFE_INTEGER,r=null,i=-1;for(let s=0;s<e.length;++s){var a;const o=e[s],c=Fi(o);
vendor: 9,399 bytes, lines 7-22
7c!==o.length&&(r=(a=r)!==null&&a!==void 0?a:s,i=s,s!==0&&c<n&&(n=c))}return e.map((s,o)=>o===0?s:s.slice(n)).slice((t=r)!==null&&t!==void 0?t:0,i+1)}function Fi(e){let t=0;for(;t<e.length&&xt(e.charCodeAt(t));)++t;return t}function br(e,t){const n=e.replace(/"""/g,'\\"""'),r=n.split(/\r\n|[\n\r]/g),i=r.length===1,a=r.length>1&&r.slice(1).every(E=>E.length===0||xt(E.charCodeAt(0))),s=n.endsWith('\\"""'),o=e.endsWith('"')&&!s,c=e.endsWith("\\"),d=o||c,l=!i||e.length>70||d||a||s;let f="";const p=i&&xt(e.charCodeAt(0));return(l&&!p||a)&&(f+=`
8`),f+=n,(l||d)&&(f+=`
9`),'"""'+f+'"""'}var u;(function(e){e.SOF="<SOF>",e.EOF="<EOF>",e.BANG="!",e.DOLLAR="$",e.AMP="&",e.PAREN_L="(",e.PAREN_R=")",e.DOT=".",e.SPREAD="...",e.COLON=":",e.EQUALS="=",e.AT="@",e.BRACKET_L="[",e.BRACKET_R="]",e.BRACE_L="{",e.PIPE="|",e.BRACE_R="}",e.NAME="Name",e.INT="Int",e.FLOAT="Float",e.STRING="String",e.BLOCK_STRING="BlockString",e.COMMENT="Comment"})(u||(u={}));class Pi{constructor(t){const n=new _n(u.SOF,0,0,0,0);this.source=t,this.lastToken=n,this.token=n,this.line=1,this.lineStart=0}get[Symbol.toStringTag](){return"Lexer"}advance(){return this.lastToken=this.token,this.token=this.lookahead()}lookahead(){let t=this.token;if(t.kind!==u.EOF)do if(t.next)t=t.next;else{const n=Mi(this,t.end);t.next=n,n.prev=t,t=n}while(t.kind===u.COMMENT);return t}}function Li(e){return e===u.BANG||e===u.DOLLAR||e===u.AMP||e===u.PAREN_L||e===u.PAREN_R||e===u.DOT||e===u.SPREAD||e===u.COLON||e===u.EQUALS||e===u.AT||e===u.BRACKET_L||e===u.BRACKET_R||e===u.BRACE_L||e===u.PIPE||e===u.BRACE_R}function re(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function Pe(e,t){return In(e.charCodeAt(t))&&Sn(e.charCodeAt(t+1))}function In(e){return e>=55296&&e<=56319}function Sn(e){return e>=56320&&e<=57343}function Z(e,t){const n=e.source.body.codePointAt(t);if(n===void 0)return u.EOF;if(n>=32&&n<=126){const r=String.fromCodePoint(n);return r==='"'?`'"'`:`"${r}"`}return"U+"+n.toString(16).toUpperCase().padStart(4,"0")}function O(e,t,n,r,i){const a=e.line,s=1+n-e.lineStart;return new _n(t,n,r,a,s,i)}function Mi(e,t){const n=e.source.body,r=n.length;let i=t;for(;i<r;){const a=n.charCodeAt(i);switch(a){case 65279:case 9:case 32:case 44:++i;continue;case 10:++i,++e.line,e.lineStart=i;continue;case 13:n.charCodeAt(i+1)===10?i+=2:++i,++e.line,e.lineStart=i;continue;case 35:return ji(e,i);case 33:return O(e,u.BANG,i,i+1);case 36:return O(e,u.DOLLAR,i,i+1);case 38:return O(e,u.AMP,i,i+1);case 40:return O(e,u.PAREN_L,i,i+1);case 41:return O(e,u.PAREN_R,i,i+1);case 46:if(n.charCodeAt(i+1)===46&&n.charCodeAt(i+2)===46)return O(e,u.SPREAD,i,i+3);break;case 58:return O(e,u.COLON,i,i+1);case 61:return O(e,u.EQUALS,i,i+1);case 64:return O(e,u.AT,i,i+1);case 91:return O(e,u.BRACKET_L,i,i+1);case 93:return O(e,u.BRACKET_R,i,i+1);case 123:return O(e,u.BRACE_L,i,i+1);case 124:return O(e,u.PIPE,i,i+1);case 125:return O(e,u.BRACE_R,i,i+1);case 34:return n.charCodeAt(i+1)===34&&n.charCodeAt(i+2)===34?zi(e,i):Vi(e,i)}if(ve(a)||a===45)return Ui(e,i,a);if(xn(a))return Ji(e,i);throw b(e.source,i,a===39?`Unexpected single quote character ('), did you mean to use a double quote (")?`:re(a)||Pe(n,i)?`Unexpected character: ${Z(e,i)}.`:`Invalid character: ${Z(e,i)}.`)}return O(e,u.EOF,r,r)}function ji(e,t){const n=e.source.body,r=n.length;let i=t+1;for(;i<r;){const a=n.charCodeAt(i);if(a===10||a===13)break;if(re(a))++i;else if(Pe(n,i))i+=2;else break}return O(e,u.COMMENT,t,i,n.slice(t+1,i))}function Ui(e,t,n){const r=e.source.body;let i=t,a=n,s=!1;if(a===45&&(a=r.charCodeAt(++i)),a===48){if(a=r.charCodeAt(++i),ve(a))throw b(e.source,i,`Invalid number, unexpected digit after 0: ${Z(e,i)}.`)}else i=ct(e,i,a),a=r.charCodeAt(i);if(a===46&&(s=!0,a=r.charCodeAt(++i),i=ct(e,i,a),a=r.charCodeAt(i)),(a===69||a===101)&&(s=!0,a=r.charCodeAt(++i),(a===43||a===45)&&(a=r.charCodeAt(++i)),i=ct(e,i,a),a=r.charCodeAt(i)),a===46||xn(a))throw b(e.source,i,`Invalid number, expected digit but got: ${Z(e,i)}.`);return O(e,s?u.FLOAT:u.INT,t,i,r.slice(t,i))}function ct(e,t,n){if(!ve(n))throw b(e.source,t,`Invalid number, expected digit but got: ${Z(e,t)}.`);const r=e.source.body;let i=t+1;for(;ve(r.charCodeAt(i));)++i;return i}function Vi(e,t){const n=e.source.body,r=n.length;let i=t+1,a=i,s="";for(;i<r;){const o=n.charCodeAt(i);if(o===34)return s+=n.slice(a,i),O(e,u.STRING,t,i+1,s);if(o===92){s+=n.slice(a,i);const c=n.charCodeAt(i+1)===117?n.charCodeAt(i+2)===123?Bi(e,i):Gi(e,i):$i(e,i);s+=c.value,i+=c.size,a=i;continue}if(o===10||o===13)break;if(re(o))++i;else if(Pe(n,i))i+=2;else throw b(e.source,i,`Invalid character within String: ${Z(e,i)}.`)}throw b(e.source,i,"Unterminated string.")}function Bi(e,t){const n=e.source.body;let r=0,i=3;for(;i<12;){const a=n.charCodeAt(t+i++);if(a===125){if(i<5||!re(r))break;return{value:String.fromCodePoint(r),size:i}}if(r=r<<4|he(a),r<0)break}throw b(e.source,t,`Invalid Unicode escape sequence: "${n.slice(t,t+i)}".`)}function Gi(e,t){const n=e.source.body,r=Zt(n,t+2);if(re(r))return{value:String.fromCodePoint(r),size:6};if(In(r)&&n.charCodeAt(t+6)===92&&n.charCodeAt(t+7)===117){const i=Zt(n,t+8);if(Sn(i))return{value:String.fromCodePoint(r,i),size:12}}throw b(e.source,t,`Invalid Unicode escape sequence: "${n.slice(t,t+6)}".`)}function Zt(e,t){return he(e.charCodeAt(t))<<12|he(e.charCodeAt(t+1))<<8|he(e.charCodeAt(t+2))<<4|he(e.charCodeAt(t+3))}function he(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function $i(e,t){const n=e.source.body;switch(n.charCodeAt(t+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:`
10`,size:2};case 114:return{value:"\r",size:2};case 116:return{value:"	",size:2}}throw b(e.source,t,`Invalid character escape sequence: "${n.slice(t,t+2)}".`)}function zi(e,t){const n=e.source.body,r=n.length;let i=e.lineStart,a=t+3,s=a,o="";const c=[];for(;a<r;){const d=n.charCodeAt(a);if(d===34&&n.charCodeAt(a+1)===34&&n.charCodeAt(a+2)===34){o+=n.slice(s,a),c.push(o);const l=O(e,u.BLOCK_STRING,t,a+3,Ri(c).join(`
11`));return e.line+=c.length-1,e.lineStart=i,l}if(d===92&&n.charCodeAt(a+1)===34&&n.charCodeAt(a+2)===34&&n.charCodeAt(a+3)===34){o+=n.slice(s,a),s=a+1,a+=4;continue}if(d===10||d===13){o+=n.slice(s,a),c.push(o),d===13&&n.charCodeAt(a+1)===10?a+=2:++a,o="",s=a,i=a;continue}if(re(d))++a;else if(Pe(n,a))a+=2;else throw b(e.source,a,`Invalid character within String: ${Z(e,a)}.`)}throw b(e.source,a,"Unterminated string.")}function Ji(e,t){const n=e.source.body,r=n.length;let i=t+1;for(;i<r;){const a=n.charCodeAt(i);if(ki(a))++i;else break}return O(e,u.NAME,t,i,n.slice(t,i))}const Wi=10,Nn=2;function Cn(e){return Le(e,[])}function Le(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return Yi(e,t);default:return String(e)}}function Yi(e,t){if(e===null)return"null";if(t.includes(e))return"[Circular]";const n=[...t,e];if(Hi(e)){const r=e.toJSON();if(r!==e)return typeof r=="string"?r:Le(r,n)}else if(Array.isArray(e))return qi(e,n);return Ki(e,n)}function Hi(e){return typeof e.toJSON=="function"}function Ki(e,t){const n=Object.entries(e);return n.length===0?"{}":t.length>Nn?"["+Xi(e)+"]":"{ "+n.map(([i,a])=>i+": "+Le(a,t)).join(", ")+" }"}function qi(e,t){if(e.length===0)return"[]";if(t.length>Nn)return"[Array]";const n=Math.min(Wi,e.length),r=e.length-n,i=[];for(let a=0;a<n;++a)i.push(Le(e[a],t));return r===1?i.push("... 1 more item"):r>1&&i.push(`... ${r} more items`),"["+i.join(", ")+"]"}function Xi(e){const t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if(t==="Object"&&typeof e.constructor=="function"){const n=e.constructor.name;if(typeof n=="string"&&n!=="")return n}return t}const Qi=globalThis.process&&!0,Zi=Qi?function(t,n){return t instanceof n}:function(t,n){if(t instanceof n)return!0;if(typeof t=="object"&&t!==null){var r;const i=n.prototype[Symbol.toStringTag],a=Symbol.toStringTag in t?t[Symbol.toStringTag]:(r=t.constructor)===null||r===void 0?void 0:r.name;if(i===a){const s=Cn(t);throw new Error(`Cannot use ${i} "${s}" from another module or realm.
12
13Ensure that there is only one instance of "graphql" in the node_modules
14directory. If different versions of "graphql" are the dependencies of other
15relied on modules, use "resolutions" to ensure only one version is installed.
16
17https://yarnpkg.com/en/docs/selective-version-resolutions
18
19Duplicate "graphql" modules cannot be used at the same time since different
20versions may have different capabilities and behavior. The data from one
21version used in the function from another could produce confusing and
22spurious results.`)}}return!1};class On{constructor(t,n="GraphQL request",r={line:1,column:1}){typeof t=="string"||ot(!1,`Body must be a string. Received: ${Cn(t)}.`),this.body=t,this.name=n,this.locationOffset=r,this.locationOffset.line>0||ot(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||ot(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}}function er(e){return Zi(e,On)}function tr(e,t){const n=new nr(e,t),r=n.parseDocument();return Object.defineProperty(r,"tokenCount",{enumerable:!1,value:n.tokenCount}),r}class nr{constructor(t,n={}){const{lexer:r,...i}=n;
vendor: 16,384 bytes, line 22
22if(r)this._lexer=r;else{const a=er(t)?t:new On(t);this._lexer=new Pi(a)}this._options=i,this._tokenCounter=0}get tokenCount(){return this._tokenCounter}parseName(){const t=this.expectToken(u.NAME);return this.node(t,{kind:h.NAME,value:t.value})}parseDocument(){return this.node(this._lexer.token,{kind:h.DOCUMENT,definitions:this.many(u.SOF,this.parseDefinition,u.EOF)})}parseDefinition(){if(this.peek(u.BRACE_L))return this.parseOperationDefinition();const t=this.peekDescription(),n=t?this._lexer.lookahead():this._lexer.token;if(t&&n.kind===u.BRACE_L)throw b(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are not supported on shorthand queries.");if(n.kind===u.NAME){switch(n.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}switch(n.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition()}if(t)throw b(this._lexer.source,this._lexer.token.start,"Unexpected description, only GraphQL definitions support descriptions.");if(n.value==="extend")return this.parseTypeSystemExtension()}throw this.unexpected(n)}parseOperationDefinition(){const t=this._lexer.token;if(this.peek(u.BRACE_L))return this.node(t,{kind:h.OPERATION_DEFINITION,operation:ne.QUERY,description:void 0,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});const n=this.parseDescription(),r=this.parseOperationType();let i;return this.peek(u.NAME)&&(i=this.parseName()),this.node(t,{kind:h.OPERATION_DEFINITION,operation:r,description:n,name:i,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){const t=this.expectToken(u.NAME);switch(t.value){case"query":return ne.QUERY;case"mutation":return ne.MUTATION;case"subscription":return ne.SUBSCRIPTION}throw this.unexpected(t)}parseVariableDefinitions(){return this.optionalMany(u.PAREN_L,this.parseVariableDefinition,u.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:h.VARIABLE_DEFINITION,description:this.parseDescription(),variable:this.parseVariable(),type:(this.expectToken(u.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(u.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){const t=this._lexer.token;return this.expectToken(u.DOLLAR),this.node(t,{kind:h.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:h.SELECTION_SET,selections:this.many(u.BRACE_L,this.parseSelection,u.BRACE_R)})}parseSelection(){return this.peek(u.SPREAD)?this.parseFragment():this.parseField()}parseField(){const t=this._lexer.token,n=this.parseName();let r,i;return this.expectOptionalToken(u.COLON)?(r=n,i=this.parseName()):i=n,this.node(t,{kind:h.FIELD,alias:r,name:i,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(u.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(t){const n=t?this.parseConstArgument:this.parseArgument;return this.optionalMany(u.PAREN_L,n,u.PAREN_R)}parseArgument(t=!1){const n=this._lexer.token,r=this.parseName();return this.expectToken(u.COLON),this.node(n,{kind:h.ARGUMENT,name:r,value:this.parseValueLiteral(t)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){const t=this._lexer.token;this.expectToken(u.SPREAD);const n=this.expectOptionalKeyword("on");return!n&&this.peek(u.NAME)?this.node(t,{kind:h.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(t,{kind:h.INLINE_FRAGMENT,typeCondition:n?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){const t=this._lexer.token,n=this.parseDescription();return this.expectKeyword("fragment"),this._options.allowLegacyFragmentVariables===!0?this.node(t,{kind:h.FRAGMENT_DEFINITION,description:n,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(t,{kind:h.FRAGMENT_DEFINITION,description:n,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if(this._lexer.token.value==="on")throw this.unexpected();return this.parseName()}parseValueLiteral(t){const n=this._lexer.token;switch(n.kind){case u.BRACKET_L:return this.parseList(t);case u.BRACE_L:return this.parseObject(t);case u.INT:return this.advanceLexer(),this.node(n,{kind:h.INT,value:n.value});case u.FLOAT:return this.advanceLexer(),this.node(n,{kind:h.FLOAT,value:n.value});case u.STRING:case u.BLOCK_STRING:return this.parseStringLiteral();case u.NAME:switch(this.advanceLexer(),n.value){case"true":return this.node(n,{kind:h.BOOLEAN,value:!0});case"false":return this.node(n,{kind:h.BOOLEAN,value:!1});case"null":return this.node(n,{kind:h.NULL});default:return this.node(n,{kind:h.ENUM,value:n.value})}case u.DOLLAR:if(t)if(this.expectToken(u.DOLLAR),this._lexer.token.kind===u.NAME){const r=this._lexer.token.value;throw b(this._lexer.source,n.start,`Unexpected variable "$${r}" in constant value.`)}else throw this.unexpected(n);return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){const t=this._lexer.token;return this.advanceLexer(),this.node(t,{kind:h.STRING,value:t.value,block:t.kind===u.BLOCK_STRING})}parseList(t){const n=()=>this.parseValueLiteral(t);return this.node(this._lexer.token,{kind:h.LIST,values:this.any(u.BRACKET_L,n,u.BRACKET_R)})}parseObject(t){const n=()=>this.parseObjectField(t);return this.node(this._lexer.token,{kind:h.OBJECT,fields:this.any(u.BRACE_L,n,u.BRACE_R)})}parseObjectField(t){const n=this._lexer.token,r=this.parseName();return this.expectToken(u.COLON),this.node(n,{kind:h.OBJECT_FIELD,name:r,value:this.parseValueLiteral(t)})}parseDirectives(t){const n=[];for(;this.peek(u.AT);)n.push(this.parseDirective(t));return n}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(t){const n=this._lexer.token;return this.expectToken(u.AT),this.node(n,{kind:h.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(t)})}parseTypeReference(){const t=this._lexer.token;let n;if(this.expectOptionalToken(u.BRACKET_L)){const r=this.parseTypeReference();this.expectToken(u.BRACKET_R),n=this.node(t,{kind:h.LIST_TYPE,type:r})}else n=this.parseNamedType();return this.expectOptionalToken(u.BANG)?this.node(t,{kind:h.NON_NULL_TYPE,type:n}):n}parseNamedType(){return this.node(this._lexer.token,{kind:h.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(u.STRING)||this.peek(u.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("schema");const r=this.parseConstDirectives(),i=this.many(u.BRACE_L,this.parseOperationTypeDefinition,u.BRACE_R);return this.node(t,{kind:h.SCHEMA_DEFINITION,description:n,directives:r,operationTypes:i})}parseOperationTypeDefinition(){const t=this._lexer.token,n=this.parseOperationType();this.expectToken(u.COLON);const r=this.parseNamedType();return this.node(t,{kind:h.OPERATION_TYPE_DEFINITION,operation:n,type:r})}parseScalarTypeDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("scalar");const r=this.parseName(),i=this.parseConstDirectives();return this.node(t,{kind:h.SCALAR_TYPE_DEFINITION,description:n,name:r,directives:i})}parseObjectTypeDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("type");const r=this.parseName(),i=this.parseImplementsInterfaces(),a=this.parseConstDirectives(),s=this.parseFieldsDefinition();return this.node(t,{kind:h.OBJECT_TYPE_DEFINITION,description:n,name:r,interfaces:i,directives:a,fields:s})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(u.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(u.BRACE_L,this.parseFieldDefinition,u.BRACE_R)}parseFieldDefinition(){const t=this._lexer.token,n=this.parseDescription(),r=this.parseName(),i=this.parseArgumentDefs();this.expectToken(u.COLON);const a=this.parseTypeReference(),s=this.parseConstDirectives();return this.node(t,{kind:h.FIELD_DEFINITION,description:n,name:r,arguments:i,type:a,directives:s})}parseArgumentDefs(){return this.optionalMany(u.PAREN_L,this.parseInputValueDef,u.PAREN_R)}parseInputValueDef(){const t=this._lexer.token,n=this.parseDescription(),r=this.parseName();this.expectToken(u.COLON);const i=this.parseTypeReference();let a;this.expectOptionalToken(u.EQUALS)&&(a=this.parseConstValueLiteral());const s=this.parseConstDirectives();return this.node(t,{kind:h.INPUT_VALUE_DEFINITION,description:n,name:r,type:i,defaultValue:a,directives:s})}parseInterfaceTypeDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("interface");const r=this.parseName(),i=this.parseImplementsInterfaces(),a=this.parseConstDirectives(),s=this.parseFieldsDefinition();return this.node(t,{kind:h.INTERFACE_TYPE_DEFINITION,description:n,name:r,interfaces:i,directives:a,fields:s})}parseUnionTypeDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("union");const r=this.parseName(),i=this.parseConstDirectives(),a=this.parseUnionMemberTypes();return this.node(t,{kind:h.UNION_TYPE_DEFINITION,description:n,name:r,directives:i,types:a})}parseUnionMemberTypes(){return this.expectOptionalToken(u.EQUALS)?this.delimitedMany(u.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("enum");const r=this.parseName(),i=this.parseConstDirectives(),a=this.parseEnumValuesDefinition();return this.node(t,{kind:h.ENUM_TYPE_DEFINITION,description:n,name:r,directives:i,values:a})}parseEnumValuesDefinition(){return this.optionalMany(u.BRACE_L,this.parseEnumValueDefinition,u.BRACE_R)}parseEnumValueDefinition(){const t=this._lexer.token,n=this.parseDescription(),r=this.parseEnumValueName(),i=this.parseConstDirectives();return this.node(t,{kind:h.ENUM_VALUE_DEFINITION,description:n,name:r,directives:i})}parseEnumValueName(){if(this._lexer.token.value==="true"||this._lexer.token.value==="false"||this._lexer.token.value==="null")throw b(this._lexer.source,this._lexer.token.start,`${_e(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("input");const r=this.parseName(),i=this.parseConstDirectives(),a=this.parseInputFieldsDefinition();return this.node(t,{kind:h.INPUT_OBJECT_TYPE_DEFINITION,description:n,name:r,directives:i,fields:a})}parseInputFieldsDefinition(){return this.optionalMany(u.BRACE_L,this.parseInputValueDef,u.BRACE_R)}parseTypeSystemExtension(){const t=this._lexer.lookahead();if(t.kind===u.NAME)switch(t.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension();case"directive":if(this._options.experimentalDirectivesOnDirectiveDefinitions)return this.parseDirectiveDefinitionExtension();break}throw this.unexpected(t)}parseSchemaExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");const n=this.parseConstDirectives(),r=this.optionalMany(u.BRACE_L,this.parseOperationTypeDefinition,u.BRACE_R);if(n.length===0&&r.length===0)throw this.unexpected();return this.node(t,{kind:h.SCHEMA_EXTENSION,directives:n,operationTypes:r})}parseScalarTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");const n=this.parseName(),r=this.parseConstDirectives();if(r.length===0)throw this.unexpected();return this.node(t,{kind:h.SCALAR_TYPE_EXTENSION,name:n,directives:r})}parseObjectTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");const n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),a=this.parseFieldsDefinition();if(r.length===0&&i.length===0&&a.length===0)throw this.unexpected();return this.node(t,{kind:h.OBJECT_TYPE_EXTENSION,name:n,interfaces:r,directives:i,fields:a})}parseInterfaceTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");const n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),a=this.parseFieldsDefinition();if(r.length===0&&i.length===0&&a.length===0)throw this.unexpected();return this.node(t,{kind:h.INTERFACE_TYPE_EXTENSION,name:n,interfaces:r,directives:i,fields:a})}parseUnionTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");const n=this.parseName(),r=this.parseConstDirectives(),i=this.parseUnionMemberTypes();if(r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:h.UNION_TYPE_EXTENSION,name:n,directives:r,types:i})}parseEnumTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");const n=this.parseName(),r=this.parseConstDirectives(),i=this.parseEnumValuesDefinition();if(r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:h.ENUM_TYPE_EXTENSION,name:n,directives:r,values:i})}parseInputObjectTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");const n=this.parseName(),r=this.parseConstDirectives(),i=this.parseInputFieldsDefinition();if(r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:h.INPUT_OBJECT_TYPE_EXTENSION,name:n,directives:r,fields:i})}parseDirectiveDefinitionExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("directive"),this.expectToken(u.AT);const n=this.parseName(),r=this.parseConstDirectives();if(r.length===0)throw this.unexpected();return this.node(t,{kind:h.DIRECTIVE_EXTENSION,name:n,directives:r})}parseDirectiveDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("directive"),this.expectToken(u.AT);const r=this.parseName(),i=this.parseArgumentDefs(),a=this._options.experimentalDirectivesOnDirectiveDefinitions?this.parseConstDirectives():[],s=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");const o=this.parseDirectiveLocations();return this.node(t,{kind:h.DIRECTIVE_DEFINITION,description:n,name:r,arguments:i,directives:a,repeatable:s,locations:o})}parseDirectiveLocations(){return this.delimitedMany(u.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){const t=this._lexer.token,n=this.parseName();if(Object.prototype.hasOwnProperty.call(Tt,n.value))return n;throw this.unexpected(t)}parseSchemaCoordinate(){const t=this._lexer.token,n=this.expectOptionalToken(u.AT),r=this.parseName();let i;!n&&this.expectOptionalToken(u.DOT)&&(i=this.parseName());let a;return(n||i)&&this.expectOptionalToken(u.PAREN_L)&&(a=this.parseName(),this.expectToken(u.COLON),this.expectToken(u.PAREN_R)),n?a?this.node(t,{kind:h.DIRECTIVE_ARGUMENT_COORDINATE,name:r,argumentName:a}):this.node(t,{kind:h.DIRECTIVE_COORDINATE,name:r}):i?a?this.node(t,{kind:h.ARGUMENT_COORDINATE,name:r,fieldName:i,argumentName:a}):this.node(t,{kind:h.MEMBER_COORDINATE,name:r,memberName:i}):this.node(t,{kind:h.TYPE_COORDINATE,name:r})}node(t,n){return this._options.noLocation!==!0&&(n.loc=new Ai(t,this._lexer.lastToken,this._lexer.source)),n}peek(t){return this._lexer.token.kind===t}expectToken(t){const n=this._lexer.toke
22n;if(n.kind===t)return this.advanceLexer(),n;throw b(this._lexer.source,n.start,`Expected ${bn(t)}, found ${_e(n)}.`)}expectOptionalToken(t){return this._lexer.token.kind===t?(this.advanceLexer(),!0):!1}expectKeyword(t){const n=this._lexer.token;if(n.kind===u.NAME&&n.value===t)this.advanceLexer();else throw b(this._lexer.source,n.start,`Expected "${t}", found ${_e(n)}.`)}expectOptionalKeyword(t){const n=this._lexer.token;return n.kind===u.NAME&&n.value===t?(this.advanceLexer(),!0):!1}unexpected(t){const n=t??this._lexer.token;return b(this._lexer.source,n.start,`Unexpected ${_e(n)}.`)}any(t,n,r){this.expectToken(t);const i=[];for(;!this.expectOptionalToken(r);)i.push(n.call(this));return i}optionalMany(t,n,r){if(this.expectOptionalToken(t)){const i=[];do i.push(n.call(this));while(!this.expectOptionalToken(r));return i}return[]}many(t,n,r){this.expectToken(t);const i=[];do i.push(n.call(this));while(!this.expectOptionalToken(r));return i}delimitedMany(t,n){this.expectOptionalToken(t);const r=[];do r.push(n.call(this));while(this.expectOptionalToken(t));return r}advanceLexer(){const{maxTokens:t}=this._options,n=this._lexer.advance();if(n.kind!==u.EOF&&(++this._tokenCounter,t!==void 0&&this._tokenCounter>t))throw b(this._lexer.source,n.start,`Document contains more that ${t} tokens. Parsing aborted.`)}}function _e(e){const t=e.value;return bn(e.kind)+(t!=null?` "${t}"`:"")}function bn(e){return Li(e)?`"${e}"`:e}var Ie=new Map,It=new Map,An=!0,we=!1;function wn(e){return e.replace(/[\s,]+/g," ").trim()}function ir(e){return wn(e.source.body.substring(e.start,e.end))}function rr(e){var t=new Set,n=[];return e.definitions.forEach(function(r){if(r.kind==="FragmentDefinition"){var i=r.name.value,a=ir(r.loc),s=It.get(i);s&&!s.has(a)?An&&console.warn("Warning: fragment with name "+i+` already exists.
23graphql-tag enforces all fragment names across your application to be unique; read more about
24this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):s||It.set(i,s=new Set),s.add(a),t.has(a)||(t.add(a),n.push(r))}else n.push(r)}),Lt(Lt({},e),{definitions:n})}function ar(e){var t=new Set(e.definitions);t.forEach(function(r){r.loc&&delete r.loc,Object.keys(r).forEach(function(i){var a=r[i];a&&typeof a=="object"&&t.add(a)})});var n=e.loc;return n&&(delete n.startToken,delete n.endToken),e}function sr(e){var t=wn(e);if(!Ie.has(t)){var n=tr(e,{experimentalFragmentVariables:we,allowLegacyFragmentVariables:we});if(!n||n.kind!=="Document")throw new Error("Not a valid GraphQL document.");Ie.set(t,ar(rr(n)))}return Ie.get(t)}function ge(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];typeof e=="string"&&(e=[e]);var r=e[0];return t.forEach(function(i,a){i&&i.kind==="Document"?r+=i.loc.source.body:r+=i,r+=e[a+1]}),sr(r)}function or(){Ie.clear(),It.clear()}function cr(){An=!1}function lr(){we=!0}function ur(){we=!1}var ue={gql:ge,resetCaches:or,disableFragmentWarnings:cr,enableExperimentalFragmentVariables:lr,disableExperimentalFragmentVariables:ur};(function(e){e.gql=ue.gql,e.resetCaches=ue.resetCaches,e.disableFragmentWarnings=ue.disableFragmentWarnings,e.enableExperimentalFragmentVariables=ue.enableExperimentalFragmentVariables,e.disableExperimentalFragmentVariables=ue.disableExperimentalFragmentVariables})(ge||(ge={}));ge.default=ge;var Me={REACT_APP_STRIPE_PK:"pk_live_51IBkMZFuSJNgcRASsoOcQ5ArZvjB3P0o5B8y8nsaclBbSXoUVwIOxd0FExJJcmZtPTyTrmC48LhwTCgGrHoQ1LzM00MjW126yl",REACT_APP_FLAGSMITH_ENV_ID:"CiDM4vtpCmuB7hZKULwcFb",REACT_APP_ENVIRONMENT:"production"};const Ar=Me.REACT_APP_PLAYGROUND==="true",Dn=Me.REACT_APP_ENVIRONMENT,wr=Dn,Dr=Dn==="production",kr=Me.REACT_APP_STRIPE_PK,Rr=Me.REACT_APP_FLAGSMITH_ENV_ID;var dr={getItemSync:function(e){try{return localStorage.getItem(e)||null}catch{return null}},getItem:function(e,t){var n=this;return new Promise((function(r,i){try{var a=n.getItemSync(e);t?.(null,a),r(a)}catch(s){t&&t(s,null),i(s)}}))},setItem:function(e,t,n){return new Promise((function(r,i){try{localStorage.setItem(e,t),n&&n(null,t),r(t)}catch(a){n&&n(a,null),i(a)}}))}},y=function(){return y=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},y.apply(this,arguments)};
24function en(e,t,n,r){return new(n||(n=Promise))((function(i,a){function s(d){try{c(r.next(d))}catch(l){a(l)}}function o(d){try{c(r.throw(d))}catch(l){a(l)}}function c(d){var l;d.done?i(d.value):(l=d.value,l instanceof n?l:new n((function(f){f(l)}))).then(s,o)}c((r=r.apply(e,[])).next())}))}function tn(e,t){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function o(c){return function(d){return(function(l){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&l[0]?r.return:l[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,l[1])).done)return i;switch(r=0,i&&(l=[2&l[0],i.value]),l[0]){case 0:case 1:i=l;break;case 4:return s.label++,{value:l[1],done:!1};case 5:s.label++,r=l[1],l=[0];continue;case 7:l=s.ops.pop(),s.trys.pop();continue;default:if(i=s.trys,!((i=i.length>0&&i[i.length-1])||l[0]!==6&&l[0]!==2)){s=0;continue}if(l[0]===3&&(!i||l[1]>i[0]&&l[1]<i[3])){s.label=l[1];break}if(l[0]===6&&s.label<i[1]){s.label=i[1],i=l;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(l);break}i[2]&&s.ops.pop(),s.trys.pop();continue}l=t.call(e,s)}catch(f){l=[6,f],r=0}finally{n=i=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}
24)([c,d])}}}function fr(e,t,n){for(var r,i=0,a=t.length;i<a;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}var kn=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t=="object"&&typeof n=="object"){if(t.constructor!==n.constructor)return!1;var r,i,a;if(Array.isArray(t)){if((r=t.length)!=n.length)return!1;for(i=r;i--!=0;)if(!e(t[i],n[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((r=(a=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(i=r;i--!=0;)if(!Object.prototype.hasOwnProperty.call(n,a[i]))return!1;for(i=r;i--!=0;){var s=a[i];if(!e(t[s],n[s]))return!1}return!0}return t!=t&&n!=n};function j(e,t){var n=Object.keys(t||{}).filter((function(r){var i=e?.[r],a=t?.[r];return!kn(i,a)}));return Object.keys(e||{}).filter((function(r){Object.keys(t||{}).includes(r)||n.push(r)})),Object.keys(n).length?n:null}var G,de;function lt(e,t,n){var r="shortString",i=!0;typeof n=="number"&&(r="javaDouble",i=!1),e[r]=e[r]||{},e[r][t]=i?n+"":n}function St(e){return!!e&&typeof e=="object"&&e.value!==void 0}function Rn(e){return Object.fromEntries(Object.entries(e).map((function(t){var n=t[0],r=t[1];return[n,St(r)?r:{value:r}]})))}function ut(e){return y(y({},e),{identity:e.identity?y(y({},e.identity),{traits:Rn(e.identity.traits||{})}):void 0})}(function(e){e.NONE="NONE",e.DEFAULT_FLAGS="DEFAULT_FLAGS",e.CACHE="CACHE",e.SERVER="SERVER"})(G||(G={}));var dt,k=null,Te="FLAGSMITH_EVENT",nn="https://edge.api.flagsmith.com/api/v1/",hr=(function(){function e(t){var n=this;this._trigger=null,this._triggerLoadingState=null,this.timestamp=null,this.isLoading=!1,this.eventSource=null,this.getFlags=function(){var r=n,i=r.api,a=r.evaluationContext;n.log("Get Flags"),n.isLoading=!0,n.loadingState.isFetching||n.setLoadingState(y(y({},n.loadingState),{isFetching:!0}));var s="".concat(n.getContext().identity),o=function(c){var d,l,f,p;if(c&&s==="".concat(n.getContext().identity)){var E=c.flags,m=c.traits,N=c.identifier;n.isLoading=!1;var T={},S={};m=m||[],(E=E||[]).forEach((function(g){T[g.feature.name.toLowerCase().replace(/ /g,"_")]={id:g.feature.id,enabled:g.enabled,value:g.feature_state_value}})),m.forEach((function(g){S[g.trait_key.toLowerCase().replace(/ /g,"_")]={transient:g.transient,value:g.trait_value}})),n.oldFlags=y({},n.flags);var v=j(n.oldFlags,T),_=j((d=n.evaluationContext.identity)===null||d===void 0?void 0:d.traits,S);if((N||Object.keys(S).length)&&(n.evaluationContext.identity=y(y({},n.evaluationContext.identity),{traits:S}),N&&(n.evaluationContext.identity.identifier=N,n.identity=N)),n.flags=T,n.updateStorage(),n._onChange(n.oldFlags,{isFromServer:!0,flagsChanged:v,traitsChanged:_},n._loadedState(null,G.SERVER)),n.datadogRum)try{if(n.datadogRum.trackTraits){var x={};Object.keys(((l=n.evaluationContext.identity)===null||l===void 0?void 0:l.traits)||{}).map((function(g){x["flagsmith_trait_"+g]=n.getTrait(g)}));var w=y(y(y({},n.datadogRum.client.getUser()),{id:n.datadogRum.client.getUser().id||((f=n.evaluationContext.identity)===null||f===void 0?void 0:f.identifier)}),x);n.log("Setting Datadog user",w),n.datadogRum.client.setUser(w)}}catch(g){console.error(g)}if(n.dtrum)try{var I={javaDouble:{},date:{},shortString:{},javaLongOrObject:{}};Object.keys(n.flags).map((function(g){lt(I,"flagsmith_value_"+g,n.getValue(g,{skipAnalytics:!0})),lt(I,"flagsmith_enabled_"+g,n.hasFeature(g,{skipAnalytics:!0}))})),Object.keys(((p=n.evaluationContext.identity)===null||p===void 0?void 0:p.traits)||{}).map((function(g){lt(I,"flagsmith_trait_"+g,n.getTrait(g))})),n.log("Sending javaLongOrObject traits to dynatrace",I.javaLongOrObject),n.log("Sending date traits to dynatrace",I.date),n.log("Sending shortString traits to dynatrace",I.shortString),n.log("Sending javaDouble to dynatrace",I.javaDouble),n.dtrum.sendSessionProperties(I.javaLongOrObject,I.date,I.shortString,I.javaDouble)}catch(g){console.error(g)}}};return a.identity?Promise.all([a.identity.traits&&Object.keys(a.identity.traits).length||!a.identity.identifier?n.getJSON(i+"identities/","POST",JSON.stringify({identifier:a.identity.identifier,transient:a.identity.transient,traits:Object.entries(a.identity.traits).map((function(c){var d=c[0],l=c[1];
24return{trait_key:d,trait_value:l?.value,transient:l?.transient}})).filter((function(c){return c.trait_value!==void 0||(n.log("Warning - attempted to set an undefined trait value for key",c.trait_key),!1)}))})):n.getJSON(i+"identities/?identifier="+encodeURIComponent(a.identity.identifier)+(a.identity.transient?"&transient=true":""))]).then((function(c){return n.evaluationContext.identity=y(y({},n.evaluationContext.identity),{traits:{}}),o(c?.[0])})).catch((function(c){var d=c.message,l=new Error(d);return Promise.reject(l)})):n.getJSON(i+"flags/").then((function(c){return o({flags:c,traits:void 0})}))},this.analyticsFlags=function(){var r=n.api;if(n.evaluationEvent&&n.evaluationContext.environment&&n.evaluationEvent[n.evaluationContext.environment.apiKey])return n.evaluationEvent&&Object.getOwnPropertyNames(n.evaluationEvent).length!==0&&Object.getOwnPropertyNames(n.evaluationEvent[n.evaluationContext.environment.apiKey]).length!==0?n.getJSON(r+"analytics/flags/","POST",JSON.stringify(n.evaluationEvent[n.evaluationContext.environment.apiKey])).then((function(i){if(n.evaluationContext.environment){var a=n.getState();n.evaluationEvent||(n.evaluationEvent={}),n.evaluationEvent[n.evaluationContext.environment.apiKey]={},n.setState(y(y({},a),{evaluationEvent:n.evaluationEvent})),n.updateEventStorage()}})).catch((function(i){n.log("Exception fetching evaluationEvent",i)})):void 0},this.datadogRum=null,this.loadingState={isLoading:!0,isFetching:!0,error:null,source:G.NONE},this.canUseStorage=!1,this.analyticsInterval=null,this.api=null,this.cacheFlags=!1,this.enableAnalytics=!1,this.enableLogs=!1,this.evaluationContext={},this.evaluationEvent=null,this.flags=null,this.getFlagInterval=null,this.headers=null,this.identity=null,this.initialised=!1,this.oldFlags=null,this.onChange=null,this.onError=null,this.ticks=null,this.timer=null,this.dtrum=null,this.sentryClient=null,this.withTraits=null,this.cacheOptions={ttl:0,skipAPI:!1,loadStale:!1,storageKey:void 0},this.getValue=function(r,i,a){var s=n.flags&&n.flags[r.toLowerCase().replace(/ /g,"_")],o=null;if(s&&(o=s.value),i?.skipAnalytics||a||n.evaluateFlag(r,"VALUE"),o===null&&i?.fallback!==void 0)return i.fallback;if(i?.json)try{return o===null?(n.log("Tried to parse null flag as JSON: "+r),null):JSON.parse(o)}catch{return i.fallback}return o},this.getTrait=function(r){var i,a;return((i=n.evaluationContext.identity)===null||i===void 0?void 0:i.traits)&&((a=n.evaluationContext.identity.traits[r.toLowerCase().replace(/ /g,"_")])===null||a===void 0?void 0:a.value)},this.getAllTraits=function(){var r;return Object.fromEntries(Object.entries(((r=n.evaluationContext.identity)===null||r===void 0?void 0:r.traits)||{}).map((function(i){var a=i[0],s=i[1];return[a,s?.value]})))},this.setContext=function(r){var i,a,s=ut(r);return n.evaluationContext=y(y({},s),{environment:s.environment||n.evaluationContext.environment}),n.identity=(a=(i=n.getContext())===null||i===void 0?void 0:i.identity)===null||a===void 0?void 0:a.identifier,n.initialised?n.getFlags():Promise.resolve()},this.getContext=function(){return n.evaluationContext},this.updateContext=function(r){return n.setContext(y(y({},n.getContext()),r))},this.setTrait=function(r,i){var a;if(n.api)return n.setContext(y(y({},n.evaluationContext),{identity:y(y({},n.evaluationContext.identity),{traits:y(y({},(a=n.evaluationContext.identity)===null||a===void 0?void 0:a.traits),Rn(Object.fromEntries([[r,i]])))})}))},this.setTraits=function(r){var i;if(n.api)return n.setContext(y(y({},n.evaluationContext),{identity:y(y({},n.evaluationContext.identity),{traits:y(y({},(i=n.evaluationContext.identity)===null||i===void 0?void 0:i.traits),Object.fromEntries(Object.entries(r).map((function(a){var s=a[0],o=a[1];return[s,St(o)?o:{value:o}]}))))})}));console.error("Attempted to setTraits a user before calling flagsmith.init. Call flagsmith.init first, if you wish to prevent it sending a request for flags, call init with preventFetch:true.")},this.hasFeature=function(r,i){var a,s,o=typeof i=="object",c=n.flags&&n.flags[r.toLowerCase().replace(/ /g,"_")],d=!1;if(!c&&o&&i.fallback!==void 0?d=i?.fallback:c&&c.enabled&&(d=!0),(o&&!i.skipAnalytics||!i)&&n.evaluateFlag(r,"ENABLED"),n.sentryClient)try{(s=(a=n.sentryClient.getIntegrationByName("FeatureFlags"))===null||a===void 0?void 0:a.addFeatureFlag)===null||s===void 0||s.call(a,r,d)}catch(l){console.error(l)}return d}
24,this.getStorageKey=function(){var r,i;return((r=n.cacheOptions)===null||r===void 0?void 0:r.storageKey)||"FLAGSMITH_DB_"+((i=n.evaluationContext.environment)===null||i===void 0?void 0:i.apiKey)},this.getJSON=function(r,i,a){var s,o,c,d=n.headers,l={method:i||"GET",body:a,cache:"no-cache",headers:{}};n.evaluationContext.environment&&(l.headers["X-Environment-Key"]=n.evaluationContext.environment.apiKey),i&&i!=="GET"&&(l.headers["Content-Type"]="application/json; charset=utf-8"),!((s=n.applicationMetadata)===null||s===void 0)&&s.name&&(l.headers["Flagsmith-Application-Name"]=n.applicationMetadata.name),!((o=n.applicationMetadata)===null||o===void 0)&&o.version&&(l.headers["Flagsmith-Application-Version"]=n.applicationMetadata.version),d&&Object.assign(l.headers,d),de||console.error("Flagsmith: fetch is undefined, please specify a fetch implementation into flagsmith.init to support SSR.");var f="".concat((c=n.evaluationContext.identity)===null||c===void 0?void 0:c.identifier);return de(r,l).then((function(p){var E,m,N="".concat((E=n.evaluationContext.identity)===null||E===void 0?void 0:E.identifier);if(f===N){var T=(m=p.headers)===null||m===void 0?void 0:m.get("x-flagsmith-document-updated-at");
24if(T)try{var S=parseFloat(T);if(isNaN(S))return Promise.reject("Failed to parse x-flagsmith-document-updated-at");n.timestamp=S}catch(v){n.log(v,"Failed to parse x-flagsmith-document-updated-at",T)}return n.log("Fetch response: "+p.status+" "+(i||"GET")+0+r),p.text().then((function(v){var _=v;try{_=JSON.parse(v)}catch{}return!_&&p.status&&(_="API Response: ".concat(p.status)),p.status&&p.status>=200&&p.status<300?_:Promise.reject(new Error(_))}))}n.log("Received response with identity mismatch, ignoring response. Requested: ".concat(f,", Current: ").concat(N))}))},this.evaluateFlag=function(r,i){if(n.datadogRum&&(n.datadogRum.client.addFeatureFlagEvaluation?i==="VALUE"?n.datadogRum.client.addFeatureFlagEvaluation("flagsmith_value_"+r,n.getValue(r,{},!0)):n.datadogRum.client.addFeatureFlagEvaluation("flagsmith_enabled_"+r,n.hasFeature(r,!0)):console.error("Flagsmith: Your datadog RUM client does not support the function addFeatureFlagEvaluation, please update it.")),n.enableAnalytics){if(!n.evaluationEvent||!n.evaluationContext.environment)return;n.evaluationEvent[n.evaluationContext.environment.apiKey]||(n.evaluationEvent[n.evaluationContext.environment.apiKey]={}),n.evaluationEvent[n.evaluationContext.environment.apiKey][r]===void 0&&(n.evaluationEvent[n.evaluationContext.environment.apiKey][r]=0),n.evaluationEvent[n.evaluationContext.environment.apiKey][r]+=1}n.updateEventStorage()},this._onChange=function(r,i,a){var s,o;n.setLoadingState(a),(s=n.onChange)===null||s===void 0||s.call(n,r,i,n.loadingState),(o=n._trigger)===null||o===void 0||o.call(n)},de=t.fetch?t.fetch:typeof fetch<"u"?fetch:global==null?void 0:global.fetch,this.canUseStorage=typeof window<"u"||!!t.browserlessStorage,this.applicationMetadata=t.applicationMetadata,this.log("Constructing flagsmith instance "+t),t.eventSource&&(dt=t.eventSource),t.AsyncStorage&&(k=t.AsyncStorage)}return e.prototype.init=function(t){var n,r,i;return en(this,void 0,void 0,(function(){var a,s,o,c,d,l,f,p,E,m,N,T,S,v,_,x,w,I,g,ae,se,me,je,oe,wt,Ue,Dt,ce,Ve,kt,Be,le,ee,Rt,D=this;return tn(this,(function(L){switch(L.label){case 0:a=ut(t.evaluationContext||this.evaluationContext),L.label=1;case 1:if(L.trys.push([1,13,,14]),s=t.AsyncStorage,o=t._trigger,c=t._triggerLoadingState,d=t.angularHttpClient,l=t.api,f=l===void 0?nn:l,p=t.applicationMetadata,E=t.cacheFlags,m=t.cacheOptions,N=t.datadogRum,T=t.defaultFlags,S=t.enableAnalytics,v=t.enableDynatrace,_=t.enableLogs,x=t.environmentID,w=t.eventSourceUrl,I=w===void 0?"https://realtime.flagsmith.com/":w,g=t.fetch,ae=t.headers,se=t.identity,me=t.onChange,je=t.onError,oe=t.preventFetch,wt=t.realtime,Ue=t.sentryClient,Dt=t.state,ce=t.traits,a.environment=x?{apiKey:x}:a.environment,!a.environment||!a.environment.apiKey)throw new Error("Please provide `evaluationContext.environment` with non-empty `apiKey`");if(a.identity=se||ce?{identifier:se,traits:ce?Object.fromEntries(Object.entries(ce).map((function(P){return[P[0],{value:P[1]}]}))):{}}:a.identity,this.evaluationContext=a,this.api=(Ge=f).endsWith("/")?Ge:Ge+"/",this.headers=ae,this.getFlagInterval=null,this.analyticsInterval=null,this.onChange=me,Ve="Wrong Flagsmith Configuration: preventFetch is true and no defaulFlags provided",this._trigger=o||this._trigger,this._triggerLoadingState=c||this._triggerLoadingState,this.onError=function(P){D.setLoadingState(y(y({},D.loadingState),{isFetching:!1,isLoading:!1,error:P})),je?.(P)},this.enableLogs=_||!1,this.cacheOptions=m?{skipAPI:!!m.skipAPI,ttl:m.ttl||0,storageKey:m.storageKey,loadStale:!!m.loadStale}:this.cacheOptions,!this.cacheOptions.ttl&&this.cacheOptions.skipAPI&&console.warn("Flagsmith: you have set a cache ttl of 0 and are skipping API calls, this means the API will not be hit unless you clear local storage."),g&&(de=g),this.enableAnalytics=S||!1,this.flags=Object.assign({},T)||{},this.datadogRum=N||null,this.initialised=!0,this.ticks=1e4,this.timer=this.enableLogs?new Date().valueOf():null,this.cacheFlags=k!==void 0&&!!E,this.applicationMetadata=p,Te="FLAGSMITH_EVENT_"+a.environment.apiKey,s&&(k=s),wt&&typeof window<"u"&&this.setupRealtime(I,a.environment.apiKey),Object.keys(this.flags).length&&(this.loadingState=y(y({},this.loadingState),{isLoading:!1,source:G.DEFAULT_FLAGS})),this.setState(Dt),this.log("Initialising with properties",t,this),v&&(typeof dtrum>"u"?console.error("You have attempted to enable dynatrace but dtrum is undefined, please check you have the Dynatrace RUM JavaScript API installed."):this.dtrum=dtrum),Ue&&(this.sentryClient=Ue),d&&(de=(function(P){return function(V,B){var H=B.headers,C=B.method,te=B.body;return new Promise((function(K){switch(C){case"GET":return P.get(V,{headers:H}).subscribe((function($){K({ok:!0,text:function(){return Promise.resolve($)}})}));case"POST":case"PUT":return P.post(V,te,{headers:H}).subscribe((function($){K({ok:!0,text:function(){return Promise.resolve($)}})}))}}))}})(d)),k&&this.canUseStorage&&k.getItem(Te).then((function(P){try{D.evaluationEvent=JSON.parse(P)||{}}catch{D.evaluationEvent={}}D.analyticsInterval=setInterval(D.analyticsFlags,D.ticks)})),this.enableAnalytics&&(this.analyticsInterval&&clearInterval(this.analyticsInterval),k&&this.canUseStorage&&k.getItem(Te,(function(P,V){if(V&&D.evaluationContext.environment){var B=JSON.parse(V);if(B[D.evaluationContext.environment.apiKey]){var H=D.getState();D.log("Retrieved events from cache",V),D.setState(y(y({},H),{evaluationEvent:B[D.evaluationContext.environment.apiKey]}))}}}))),!E)return[3,9];if(!k||!this.canUseStorage)return[3,8];kt=function(P,V){return en(D,void 0,void 0,(function(){var B,H,C,te,K,$,$e,Ft,ze,Je,We,Ye,He,Ke,qe,Xe,Qe,Ze,et,Pt=this;return tn(this,(function(W){switch(W.label){case 0:if(!V)return[3,7];B=null,H=null,W.label=1;case 1:return W.trys.push([1,5,,6]),C=JSON.parse(V),te=!1,K=!1,C&&C.api===this.api&&((Je=(ze=C.evaluationContext)===null||ze===void 0?void 0:ze.environment)===null||Je===void 0?void 0:Je.apiKey)===((We=this.evaluationContext.environment)===null||We===void 0?void 0:We.apiKey)&&($=!0,this.evaluationContext.identity&&((He=(Ye=C.evaluationContext)===null||Ye===void 0?void 0:Ye.identity)===null||He===void 0?void 0:He.identifier)!==this.evaluationContext.identity.identifier&&(this.log("Ignoring cache, identity has changed from "+((qe=(Ke=C.evaluationContext)===null||Ke===void 0?void 0:Ke.identity)===null||qe===void 0?void 0:qe.identifier)+" to "+this.evaluationContext.identity.identifier),$=!1),this.cacheOptions.ttl&&(!C.ts||new Date().valueOf()-C.ts>this.cacheOptions.ttl)&&(C.ts&&!this.cacheOptions.loadStale?(this.log("Ignoring cache, timestamp is too old ts:"+C.ts+" ttl: "+this.cacheOptions.ttl+" time elapsed since cache: "+(new Date().valueOf()-C.ts)+"ms"),$=!1):C.ts&&this.cacheOptions.loadStale&&(this.log("Loading stale cache, timestamp ts:"+C.ts+" ttl: "+this.cacheOptions.ttl+" time elapsed since cache: "+(new Date().valueOf()-C.ts)+"ms"),K=!0,$=!0)),$&&(te=!0,B=j(this.flags,C.flags),this.setState(y(y({},C),{evaluationContext:ut(y(y({},C.evaluationContext),{identity:!((Xe=C.evaluationContext)===null||Xe===void 0)&&Xe.identity?y(y({},(Qe=C.evaluationContext)===null||Qe===void 0?void 0:Qe.identity),{traits:y({},ce||{})}):void 0}))}
24)),this.log("Retrieved flags from cache",C))),te?($e=!oe&&(!this.cacheOptions.skipAPI||K),this._onChange(null,{isFromServer:!1,flagsChanged:B,traitsChanged:H},this._loadedState(null,G.CACHE,$e)),this.oldFlags=this.flags,this.cacheOptions.skipAPI&&te&&!K&&this.log("Skipping API, using cache"),$e&&this.getFlags().catch((function(Pn){var tt;(tt=Pt.onError)===null||tt===void 0||tt.call(Pt,Pn)})),[3,4]):[3,2];case 2:return oe?[3,4]:[4,this.getFlags()];case 3:W.sent(),W.label=4;case 4:return[3,6];case 5:return Ft=W.sent(),this.log("Exception fetching cached logs",Ft),[3,6];case 6:return[3,10];case 7:return oe?[3,9]:[4,this.getFlags()];case 8:return W.sent(),[3,10];case 9:if(T)this._onChange(null,{isFromServer:!1,flagsChanged:j({},this.flags),traitsChanged:j({},(Ze=this.evaluationContext.identity)===null||Ze===void 0?void 0:Ze.traits)},this._loadedState(null,G.DEFAULT_FLAGS));else{if(!this.flags)throw new Error(Ve);this._onChange(null,{isFromServer:!1,flagsChanged:j({},this.flags),traitsChanged:j({},(et=this.evaluationContext.identity)===null||et===void 0?void 0:et.traits)},this._loadedState(null,G.DEFAULT_FLAGS))}W.label=10;case 10:return[2]}}
24))}))},L.label=2;case 2:return L.trys.push([2,7,,8]),k.getItemSync?(Be=k.getItemSync(this.getStorageKey()),[3,5]):[3,3];case 3:return[4,k.getItem(this.getStorageKey())];case 4:Be=L.sent(),L.label=5;case 5:return[4,kt(null,Be)];case 6:case 7:return L.sent(),[3,8];case 8:return[3,12];case 9:return oe?[3,11]:[4,this.getFlags()];case 10:return L.sent(),[3,12];case 11:if(T)this._onChange(null,{isFromServer:!1,flagsChanged:j({},T),traitsChanged:j({},(n=a.identity)===null||n===void 0?void 0:n.traits)},this._loadedState(null,G.DEFAULT_FLAGS));else if(this.flags&&(le=null,Object.keys(this.flags).length===0&&(le=Ve),this._onChange(null,{isFromServer:!1,flagsChanged:j({},this.flags),traitsChanged:j({},(r=a.identity)===null||r===void 0?void 0:r.traits)},this._loadedState(le,G.DEFAULT_FLAGS)),le))throw new Error(le);L.label=12;case 12:return[3,14];case 13:throw ee=L.sent(),this.log("Error during initialisation ",ee),Rt=ee instanceof Error?ee:new Error("".concat(ee)),(i=this.onError)===null||i===void 0||i.call(this,Rt),ee;case 14:return[2]}var Ge}))}))},e.prototype.getAllFlags=function(){return this.flags},e.prototype.identify=function(t,n,r){return this.identity=t,this.evaluationContext.identity={identifier:t,transient:r,traits:this.evaluationContext.identity&&this.evaluationContext.identity.identifier==t?this.evaluationContext.identity.traits:{}},this.evaluationContext.identity.identifier=t,this.log("Identify: "+this.evaluationContext.identity.identifier),n&&(this.evaluationContext.identity.traits=Object.fromEntries(Object.entries(n).map((function(i){var a=i[0],s=i[1];return[a,St(s)?s:{value:s}]})))),this.initialised?this.getFlags():Promise.resolve()},e.prototype.getState=function(){return{api:this.api,flags:this.flags,ts:this.ts,evaluationContext:this.evaluationContext,identity:this.identity,evaluationEvent:this.evaluationEvent}},e.prototype.setState=function(t){var n,r;t&&(this.initialised=!0,this.api=t.api||this.api||nn,this.flags=t.flags||this.flags,this.evaluationContext=t.evaluationContext||this.evaluationContext,this.evaluationEvent=t.evaluationEvent||this.evaluationEvent,this.identity=(r=(n=this.getContext())===null||n===void 0?void 0:n.identity)===null||r===void 0?void 0:r.identifier,this.log("setState called",this))},e.prototype.logout=function(){return this.identity=null,this.evaluationContext.identity=null,this.initialised?this.getFlags():Promise.resolve()},e.prototype.startListening=function(t){t===void 0&&(t=1e3),this.getFlagInterval&&clearInterval(this.getFlagInterval),this.getFlagInterval=setInterval(this.getFlags,t)},e.prototype.stopListening=function(){this.getFlagInterval&&(clearInterval(this.getFlagInterval),this.getFlagInterval=null)},e.prototype._loadedState=function(t,n,r){return t===void 0&&(t=null),r===void 0&&(r=!1),{error:t,isFetching:r,isLoading:!1,source:n}},e.prototype.log=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];this.enableLogs&&console.log.apply(this,fr(["FLAGSMITH:",new Date().valueOf()-(this.timer||0),"ms"],t))},e.prototype.updateStorage=function(){if(this.cacheFlags){this.ts=new Date().valueOf();var t=JSON.stringify(this.getState());this.log("Setting storage",t),k.setItem(this.getStorageKey(),t)}},e.prototype.updateEventStorage=function(){if(this.enableAnalytics){var t=JSON.stringify(this.getState().evaluationEvent);k.setItem(Te,t).catch((function(n){return console.error("Flagsmith: Error setting item in async storage",n)}))}},e.prototype.setLoadingState=function(t){var n;kn(t,this.loadingState)||(this.loadingState=y({},t),this.log("Loading state changed",t),(n=this._triggerLoadingState)===null||n===void 0||n.call(this))},e.prototype.setupRealtime=function(t,n){var r=this,i=t+"sse/environments/"+n+"/stream";dt?this.eventSource||(this.log("Creating event source with url "+i),this.eventSource=new dt(i),this.eventSource.addEventListener("environment_updated",(function(a){var s;try{s=JSON.parse(a.data).updated_at}catch(o){r.log("Could not parse sse event",o)}s?!r.timestamp||s>r.timestamp?r.isLoading?r.log("updated_at is new, but flags are loading",a.data,r.timestamp):(r.log("updated_at is new, fetching flags",a.data,r.timestamp),r.getFlags()):r.log("updated_at is outdated, skipping get flags",a.data,r.timestamp):r.log("No updated_at received, fetching flags",a)}))):this.log("Error, EventSource is undefined")},e})();function pr(e){var t=e.fetch,n=e.AsyncStorage,r=e.eventSource;return new hr({fetch:t,AsyncStorage:n,eventSource:r})}var xe,yr=(xe=function(e,t){return xe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},xe(e,t)},function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}
24xe(e,t),e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}),rn=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},an=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r,i,a=n.call(e),s=[];try{for(;(t===void 0||t-- >0)&&!(r=a.next()).done;)s.push(r.value)}catch(o){i={error:o}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return s},ft=function(e,t,n){if(arguments.length===2)for(var r,i=0,a=t.length;i<a;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))},vr=(function(e){function t(){return e.call(this,`EventSource not available.
25Consider loading an EventSource polyfill and making it available globally as EventSource, or passing one in as eventSourceClass to the ReconnectingEventSource constructor.`)||this}return yr(t,e),t})(Error),gr=(function(){function e(t,n){var r=this;if(this.CONNECTING=0,this.OPEN=1,this.CLOSED=2,this._configuration=n!=null?Object.assign({},n):void 0,this.withCredentials=!1,this._eventSource=null,this._lastEventId=null,this._timer=null,this._listeners={open:[],error:[],message:[]},this.url=t.toString(),this.readyState=this.CONNECTING,this.max_retry_time=3e3,this.eventSourceClass=globalThis.FlagsmithEventSource,this._configuration!=null&&(this._configuration.lastEventId&&(this._lastEventId=this._configuration.lastEventId,delete this._configuration.lastEventId),this._configuration.max_retry_time&&(this.max_retry_time=this._configuration.max_retry_time,delete this._configuration.max_retry_time),this._configuration.eventSourceClass&&(this.eventSourceClass=this._configuration.eventSourceClass,delete this._configuration.eventSourceClass)),this.eventSourceClass==null||typeof this.eventSourceClass!="function")throw new vr;this._onevent_wrapped=function(i){r._onevent(i)},this._start()}return e.prototype.dispatchEvent=function(t){throw new Error("Method not implemented.")},e.prototype._start=function(){var t,n,r=this,i=this.url;this._lastEventId&&(i.indexOf("?")===-1?i+="?":i+="&",i+="lastEventId="+encodeURIComponent(this._lastEventId)),this._eventSource=new this.eventSourceClass(i,this._configuration),this._eventSource.onopen=function(c){r._onopen(c)},this._eventSource.onerror=function(c){r._onerror(c)},this._eventSource.onmessage=function(c){r.onmessage(c)};try{for(var a=rn(Object.keys(this._listeners)),s=a.next();!s.done;s=a.next()){var o=s.value;this._eventSource.addEventListener(o,this._onevent_wrapped)}}catch(c){t={error:c}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}},e.prototype._onopen=function(t){this.readyState===0&&(this.readyState=1,this.onopen(t))},e.prototype._onerror=function(t){var n=this;if(this.readyState===1&&(this.readyState=0,this.onerror(t)),this._eventSource){this._eventSource.close(),this._eventSource=null;var r=Math.round(this.max_retry_time*Math.random());this._timer=setTimeout((function(){return n._start()}),r)}},e.prototype._onevent=function(t){var n,r;t&&t.lastEventId&&(this._lastEventId=t.lastEventId);var i=this._listeners[t.type];if(i!=null)try{for(var a=rn(ft([],an(i),!1)),s=a.next();!s.done;s=a.next())s.value.call(this,t)}catch(o){n={error:o}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}t.type==="message"&&this.onmessage(t)},e.prototype.onopen=function(t){},e.prototype.onerror=function(t){},e.prototype.onmessage=function(t){},e.prototype.close=function(){this._timer&&(clearTimeout(this._timer),this._timer=null),this._eventSource&&(this._eventSource.close(),this._eventSource=null),this.readyState=2},e.prototype.addEventListener=function(t,n,r){this._listeners[t]==null&&(this._listeners[t]=[],this._eventSource!=null&&this._eventSource.addEventListener(t,this._onevent_wrapped));var i=this._listeners[t];i.includes(n)||(this._listeners[t]=ft(ft([],an(i),!1),[n],!1))},e.prototype.removeEventListener=function(t,n,r){var i=this._listeners[t];this._listeners[t]=i.filter((function(a){return a!==n}))},e})();globalThis.FlagsmithEventSource=typeof EventSource<"u"?EventSource:null;var mr=function(e,t){return t=t||{},new Promise((function(n,r){var i=new XMLHttpRequest,a=[],s=[],o={},c=function(){return{ok:(i.status/100|0)==2,statusText:i.statusText,status:i.status,url:i.responseURL,text:function(){return Promise.resolve(i.responseText)},json:function(){return Promise.resolve(i.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([i.response]))},clone:c,headers:{keys:function(){return a},entries:function(){return s},get:function(l){return o[l.toLowerCase()]},has:function(l){return l.toLowerCase()in o}}}};for(var d in i.open(t.method||"get",e,!0),i.onload=function(){i.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,(function(l,f,p){a.push(f=f.toLowerCase()),s.push([f,p]),o[f]=o[f]?o[f]+","+p:p})),n(c())},i.onerror=r,i.withCredentials=t.credentials=="include",t.headers)i.setRequestHeader(d,t.headers[d]);i.send(t.body||null)}))},Er=pr({AsyncStorage:dr,fetch:mr,eventSource:gr});typeof window<"u"&&(window.flagsmith=Er);var _r=Ln();const sn=Vn(_r),Fn=(e,t,n)=>{const r=e.data?.dataTypes.findIndex(({id:a})=>a===t),i=r!==void 0?e.data?.dataTypes[r].fields.findIndex(({id:a})=>a===n.id):void 0;if(e.data&&r!==void 0&&i!==void 0){const a=e.data.dataTypes[r].fields[i];e.data.dataTypes[r].fields[i]=n;const s=n.relationship&&n.type!==Se,o=a.relationship&&a.type!==Se;
25if(o&&(!s||a.type!==n.type)){const c=e.data.dataTypes.findIndex(d=>d.apiName===a.type);c!==-1&&(e.data.dataTypes[c].fields=new ht(e.data.dataTypes[c].fields.filter(({relatedField:d})=>d?.id!==a.id)))}if(s){const c=e.data?.dataTypes.find(({name:l})=>l===n.type);if(!c)return;const d=on(n,e.data.dataTypes[r],c);if(o&&a.type===n.type){const l=c.fields.findIndex(f=>f.relatedField&&f.relatedField.id===n.id);l&&(c.fields[l]=d)}else c.fields.push(d)}n.lookupValueFields&&n.lookupValueFields.map(({dataField:c,dataTypeId:d})=>Fn(e,d,c))}};ii(!1);const At=mi({name:"project",initialState:{data:null,undoStack:[],redoStack:[],draftDataTypes:void 0},reducers:{addMedia:(e,{payload:t})=>{e.data={...e.data,media:[...e.data?.media??[],t]}},redo:e=>{const t=jt(e.redoStack);if(t){const n=Y(e.data,t.path);e.undoStack.push({...t,value:n}),e.redoStack=Ut(e.redoStack)}},undo:e=>{const t=jt(e.undoStack);if(t){const n=Y(e.data,t.path);e.redoStack.push({...t,value:n}),e.undoStack=Ut(e.undoStack)}},updateProject:(e,{payload:{value:t,path:n,skipHistory:r}})=>{if(Un(n)==="elements"&&!r){const i=Y(e.data,n);e.undoStack.push({path:n,value:i}),e.redoStack=[]}sn(e.data,n,t)},updateProjectStatus:(e,{payload:t})=>{e.data&&(e.data.live=t)},updateProjectAllowPublicAccess:(e,{payload:t})=>{e.data&&(e.data.allowPublicAccess=t)},updateProjectIntegration:(e,{payload:{value:t,integration:n}})=>{sn(e.data,["integrations",n],t)},setProject:(e,{payload:t})=>{e.data={...t,dataTypes:nt(t.dataTypes)}},updateSource:(e,{payload:t})=>{e.data?.dataTypes?.filter(({source:r})=>r.id===t.id)?.forEach(r=>{const i=e.data?.dataTypes.findIndex(({id:a})=>a===r.id);if(i!==void 0&&i>=0){const a=M("source.display",t.display,r);e.data=M(["dataTypes",i],a,e.data)}})},setHasUnpublishedChanges:(e,{payload:t})=>{e.data&&(e.data.hasUnpublishedChanges=t)},setUnpublishedChangesBreakdown:(e,{payload:t})=>{e.data&&(e.data.unpublishedChangesBreakdown=t)},incrementPublishedVersion:e=>{e.data&&(e.data.publishedVersion=(e.data.publishedVersion??0)+1)},setPublishedVersion:(e,{payload:t})=>{e.data&&(e.data.publishedVersion=t)},addDataField:(e,{payload:{dataTypeName:t,dataField:n}})=>{const r=e.data?.dataTypes.findIndex(({name:i})=>i===t);if(e.data&&r!==void 0&&(e.data.dataTypes[r].fields.push(n),n.relationship&&n.type!==Se)){const i=e.data?.dataTypes.find(({name:a})=>a===n.type);if(i){const a=on(n,e.data.dataTypes[r],i),s=e.data?.dataTypes.findIndex(({name:o})=>o===i.name);e.data.dataTypes[s].fields.push(a)}}},removeDataField:(e,{payload:{dataTypeId:t,dataField:n}})=>{const r=e.data?.dataTypes.findIndex(({id:i})=>i===t);if(e.data&&r!==void 0){if(e.data.dataTypes[r].fields=new ht(e.data.dataTypes[r].fields.filter(({id:a})=>a!==n.id)),!n.relationship||n.type===Se)return;const i=e.data.dataTypes.findIndex(a=>a.apiName===n.type);i&&(e.data.dataTypes[i].fields=new ht(e.data.dataTypes[i].fields.filter(({relatedField:a})=>a?.id!==n.id)))}},updateDataField:(e,{payload:{dataTypeId:t,dataField:n}})=>{Fn(e,t,n)},updateDataFieldOptions:(e,{payload:{dataTypeId:t,dataFieldId:n,options:r}})=>{const i=e.data?.dataTypes.findIndex(({id:s})=>s===t),a=i!==void 0?e.data?.dataTypes[i].fields.findIndex(({id:s})=>s===n):void 0;e.data&&i!==void 0&&a!==void 0&&(e.data.dataTypes[i].fields[a].options=r)},setPermissionsEnabled:(e,{payload:{dataTypeId:t,permissionsEnabled:n}})=>{const r=e.data?.dataTypes.findIndex(({id:i})=>i===t);e.data&&r!==void 0&&(e.data=M(["dataTypes",r,"permissionsEnabled"],n,e.data))},setPermissionRules:(e,{payload:{dataTypeId:t,permissions:n}})=>{const r=e.data?.dataTypes.findIndex(({id:i})=>i===t);if(e.data&&r!==void 0){const i=e.data.dataTypes[r];i.permissions=new it(n,i.name)}},setPermissionRule:(e,{payload:{dataTypeId:t,permission:n}})=>{const r=e.data?.dataTypes.findIndex(({id:a})=>a===t),i=r&&e.data?.dataTypes[r]?.permissions?.findIndex(({id:a})=>a===n.id);if(e.data&&r!==void 0&&i!==void 0){const a=e.data.dataTypes[r];a.permissions=new it(M(i,n,[...a.permissions]),a.name)}},removeDataSource:(e,{payload:{dataSource:t}})=>{e.data?.dataTypes.filter(({source:r})=>r.id===t.id&&r.type===t.type)?.forEach(r=>At.caseReducers.removeDataType(e,{payload:{dataType:r}}))},removeDataType:(e,{payload:{dataType:t}})=>{if(!e.data)return e;const n=e.data.dataTypes.findIndex(r=>
25r.id===t.id);n!==-1&&e.data.dataTypes.splice(n,1),e.data.dataTypes.forEach((r,i)=>{const a=[];r.fields.forEach((s,o)=>{r.fields[o].type===t.name&&a.push(o)}),a.sort((s,o)=>o-s),a.forEach(s=>{e.data?.dataTypes[i].fields.splice(s,1)})}),e.data.elements=e.data.elements.filter(r=>!(r.type===jn&&Y(r,"props.dataList.dataType")===t.name))},removePermissionRule:(e,{payload:{dataTypeId:t,permissionId:n}})=>{const r=e.data?.dataTypes.findIndex(({id:i})=>i===t);if(e.data&&r!==void 0){const i=e.data.dataTypes[r];i.permissions=new it([...i.permissions].filter(a=>a.id!==n),i.name)}},addDataType:(e,{payload:t})=>{e.data&&e.data.dataTypes.every(({id:n})=>t.id!==n)&&e.data.dataTypes.push(Mn.formatDataType(t))},addDataTypes:(e,{payload:t})=>{if(e.data){const n=e.data.dataTypes.map(({id:r})=>r);e.data.dataTypes.push(...t.filter(({id:r})=>!n.includes(r)).map(Mt.formatDataType))}},addProjectUsers:(e,{payload:t})=>{if(e.data&&e.data.users){const n=new Set(e.data.users.map(i=>i.user?.email)),r=t.filter(i=>!n.has(i.user?.email));e.data.users.push(...r)}},updateDataType:(e,{payload:t})=>{e.data&&e.data.dataTypes.replaceEntry(Mt.formatDataType(t))},updateDataTypeName:(e,{payload:{id:t,display:n,description:r}})=>{const i=e.data?.dataTypes.findIndex(({id:a})=>a===t);i!==void 0&&i>=0&&e.data&&(e.data.dataTypes[i].display=n,e.data.dataTypes[i].description=r)},addWorkflow:(e,{payload:{dataTypeName:t,workflow:n}})=>{const r=e.data?.dataTypes.findIndex(({name:i})=>i===t);if(e.data&&r!==void 0){const i=["dataTypes",r,"workflows"],a=Y(e.data,i,[]);e.data=M(i,[...a,n],e.data),e.data=M(["workflows",n.workflow.id,"actions"],[],e.data)}},changeWorkflow:(e,{payload:{dataTypeName:t,workflow:n}})=>{const r=e.data?.dataTypes.findIndex(({name:i})=>i===t);if(e.data&&r!==void 0){const i=["dataTypes",r,"workflows"],s=Y(e.data,i,[]).findIndex(({id:o})=>o===n.id);s!==void 0&&(e.data=M([...i,String(s)],n,e.data))}},cloneWorkflow:(e,{payload:{dataTypeName:t,workflow:n,actions:r}})=>{const i=e.data?.dataTypes.findIndex(({name:a})=>a===t);if(e.data&&i!==void 0){const a=["dataTypes",i,"workflows"],s=Y(e.data,a,[]);e.data=M(a,[...s,n],e.data),e.data=M(["workflows",String(n.workflow.id),"actions"],r,e.data)}},removeWorkflow:(e,{payload:{dataTypeName:t,id:n}})=>{const r=e.data?.dataTypes.findIndex(({name:i})=>i===t);if(e.data&&r!==void 0){const i=["dataTypes",r,"workflows"],s=Y(e.data,i,[]).filter(o=>o.id!==n);e.data=M(i,s,e.data)}},addGoogleSignInClient:(e,{payload:t})=>{e.data&&e.data.integrations&&(e.data.integrations.google=t)},addDomain:(e,{payload:t})=>{e.data&&(e.data.domains=[...e.data.domains??[],t])},editAlias:(e,{payload:t})=>{e.data&&(e.data.alias=t)},removeDomain:(e,{payload:t})=>{e.data&&e.data.domains&&(e.data.domains=e.data.domains.filter(n=>n.id!==t))},updateDomain:(e,{payload:t})=>{const n=(e.data?.domains??[]).findIndex(({id:r})=>r===t.id);e.data&&n!==void 0&&e.data.domains&&(e.data.domains=M([n],t,e.data.domains))},updateSmtp:(e,{payload:t})=>{e.data&&e.data.integrations&&(e.data.integrations.smtp=t)},setDataTypes:(e,{payload:t})=>{e.data&&(e.data.dataTypes=nt(t))},setDraftDataTypes:(e,{payload:t})=>{e.draftDataTypes=nt(t)},swapDraftDataTypes:e=>{e.data&&e.draftDataTypes&&(e.data.dataTypes=e.draftDataTypes,e.draftDataTypes=void 0)},setIntegrations:(e,{payload:t})=>{e.data&&(e.data.integrations=t)}}}),{addDataField:Fr,addDataType:Pr,addDataTypes:Lr,addDomain:Mr,addGoogleSignInClient:jr,addMedia:Ur,addProjectUsers:Vr,addWorkflow:Br,changeWorkflow:Gr,cloneWorkflow:$r,editAlias:zr,incrementPublishedVersion:Jr,redo:Wr,removeDataField:Yr,removeDataSource:Hr,removeDataType:Kr,removeDomain:qr,removePermissionRule:Xr,removeWorkflow:Qr,setDataTypes:Zr,setDraftDataTypes:ea,setHasUnpublishedChanges:ta,setUnpublishedChangesBreakdown:na,setIntegrations:ia,setPermissionRule:ra,setPermissionRules:aa,setPermissionsEnabled:sa,setProject:oa,setPublishedVersion:ca,swapDraftDataTypes:la,undo:ua,updateDataField:da,updateDataFieldOptions:fa,updateDataType:ha,updateDataTypeName:pa,updateDomain:ya,updateProject:va,updateProjectAllowPublicAccess:ga,updateProjectIntegration:ma,updateProjectStatus:Ea,updateSmtp:_a,updateSource:Ta}=At.actions,xa=At.reducer;export{Lr as A,ha as B,la as C,Sr as D,wr as E,Rr as F,Nr as G,X as H,Dr as I,yn as J,h as K,kr as L,Ta as M,zn as N,xa as O,Cr as P,wi as Q,On as S,Cn as a,Ir as b,mi as c,ot as d,Gr as e,$r as f,ge as g,Ar as h,Or as i,ur as j,cr as k,lr as l,or as m,sn as n,ta as o,br as p,na as q,Qr as r,oa as s,va as t,Ea as u,Ur as v,Er as w,ia as x,Pr as y,Kr as z};

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.