@platform-mesh/portal-ui-lib 0.44.1 → 0.44.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -77,7 +77,7 @@ class _i{headers;normalizedNames=new Map;lazyInit;lazyUpdate=null;constructor(t)
|
|
|
77
77
|
* @license Angular v21.1.4
|
|
78
78
|
* (c) 2010-2026 Google LLC. https://angular.dev/
|
|
79
79
|
* License: MIT
|
|
80
|
-
*/globalThis.$localize=C0;const ar=globalThis.Luigi;let mo=(()=>{class e{setConfig(n){return ar.setConfig(n)}get config(){return ar.getConfig()}getConfigValue(n){return ar.getConfigValue(n)}unloadConfig(){return ar.unload()}sendCustomMessage(n){return ar.sendCustomMessage(n)}configChanged(n){ar.configChanged(n)}customMessages(){return ar.customMessages()}navigation(){return ar.navigation()}resetLuigi(){ar.reset()}clearNavigationCache(){ar.clearNavigationCache&&ar.clearNavigationCache()}showAlert(n){return ar.showAlert(n)}ux(){return ar.ux()}theming(){return ar.theming()}i18n(){return ar.i18n()}globalSearch(){return ar.globalSearch()}getGlobalContext(){return ar.getGlobalContext()}getWcExtendedContext(){return document.querySelector(".wcContainer")?.querySelector("[lui_web_component]")?.extendedContext?.context}getWcModalExtendedContext(){return document.querySelector(".iframeModalCtn")?.querySelector("[lui_web_component]")?.extendedContext?.context}setGlobalContext(n,r=!1){ar.setGlobalContext(n,r)}setInGlobalContext(n,r=!1){ar.setGlobalContext({...this.getGlobalContext(),...n},r)}routing(){return ar.routing()}setFeatureToggle(n){ar.featureToggles().setFeatureToggle(n)}unsetFeatureToggle(n){ar.featureToggles().unsetFeatureToggle(n)}unsetAllFeatureToggles(){ar.featureToggles().getActiveFeatureToggleList().forEach(n=>{this.unsetFeatureToggle(n)})}setFeatureToggles(n){if(n)for(const r of Object.keys(n))n[r]&&this.setFeatureToggle(r)}isFeatureToggleActive(n){return ar.featureToggles().getActiveFeatureToggleList().includes(n)}getActiveFeatureToggleList(){return ar.featureToggles().getActiveFeatureToggleList()}setAuthData(n){ar.auth().store.setAuthData(n),ar.auth().store.setNewlyAuthorized()}removeAuthData(){ar.auth().store.removeAuthData()}getAuthData(){return ar.auth().store.getAuthData()}setCurrentLocale(n){ar.i18n().setCurrentLocale(n)}static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275prov=Fe({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})(),ru=(()=>{class e{constructor(){this.http=pe(kl)}getEnvConfig(){var n=this;return(0,K.A)(function*(){return n.envConfigCache||(yield $h(n.http.get("/rest/envconfig").pipe(Xc(r=>n.envConfigCache=r)))),n.envConfigCache})()}static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275prov=Fe({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})(),Ba=(()=>{class e{constructor(){this.envConfigService=pe(ru),this.luigiCoreService=pe(mo),this.fallbackLanguage="en",this.translationTable={},this.currentLanguage=""}afterInit(){this.currentLanguage=this.luigiCoreService.i18n().getCurrentLocale(),this.luigiCoreService.i18n().addCurrentLocaleChangeListener(n=>{this.currentLanguage=n})}getTranslation(n,r,o){let i=this.getInternalTranslation(n,r,o);return i||(i=this.findTranslation(n,this.translationTable,this.fallbackLanguage,r)),i||n}getTranslationAsync(n,r,o){var i=this;return(0,K.A)(function*(){return new Promise(s=>{let a=i.getInternalTranslation(n,r,o);a?s(a||n):i.translationTable&&!i.translationTable[i.fallbackLanguage]?i.fetchTranslationFile(i.fallbackLanguage).then(()=>{a=i.findTranslation(n,i.translationTable,i.fallbackLanguage,r),s(a||n)}):(a=i.findTranslation(n,i.translationTable,i.fallbackLanguage,r),s(a||n))})})()}findTranslation(n,r,o,i){if(r[o]){const s="object"==typeof r[o][n]?r[o][n].join("<br>"):r[o][n];return i?this.findInterpolations(s,i):s}}findInterpolations(n,r){if(n)return Object.keys(r).forEach(o=>{n=n.replace(new RegExp("{"+o+"}","gi"),r[o])}),n}addTranslationFile(n,r){r&&n&&(this.translationTable[n]=r)}fetchTranslationFile(n){var r=this;return(0,K.A)(function*(){return new Promise(o=>{fetch(`/assets/translation-files/${n}.json`).then(i=>i.json()).then(i=>{r.addTranslationFile(n,i),o(!0)}).catch(i=>{console.error("Error:",i),r.addTranslationFile(n,{}),o(!1)})})})()}getInternalTranslation(n,r,o){return n?(this.currentLanguage=o||this.currentLanguage||this.luigiCoreService.i18n().getCurrentLocale(),this.findTranslation(n,this.translationTable,this.currentLanguage,r)):""}getValidLanguages(){var n=this;return(0,K.A)(function*(){const r=[{value:"en",label:"USERSETTINGSDIALOG_LANGUAGE_EN"}];try{const{developmentInstance:o}=yield n.envConfigService.getEnvConfig();o&&r.push({value:"de",label:"USERSETTINGSDIALOG_LANGUAGE_DE"})}finally{return r}})()}static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275prov=Fe({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var ou=function(e){return e.LAST_NAVIGATION_URL="openmfp.navigation.lastUrl",e.USER_SETTINGS="openmfp.settings.userSettings",e.LOCAL_DEVELOPMENT_SETTINGS="openmfp.settings.localDevelopmentSettings",e.FEATURE_TOGGLE_SETTINGS="openmfp.settings.featureToggleSettings",e.DEVELOPMENT_MODE_CONFIG="dev-mode-settings",e}(ou||{});(0,K.A)(function*(t){return t.frame_userAccount&&t.frame_userAccount.language?(delete t.frame_userAccount.name,delete t.frame_userAccount.email):delete t.frame_userAccount,new Promise((n,r)=>{try{localStorage.setItem(ou.USER_SETTINGS,JSON.stringify(t)),n(t)}catch(o){console.error("Error storing user settings",o),r({closeDialog:!0,message:"Could not write userSettings to storage..."})}})}),document.body.classList.add("ui5-content-density-compact");let Ex=(()=>{class e{constructor(){this.luigiCoreService=pe(mo)}getGatewayUrl(n,r=!1){const o=n.portalContext.crdGatewayApiUrl,i=this.extractKcpPath(o);return o?.replace(i,this.resolveKcpPath(n,r))}updateCrdGatewayUrlWithEntityPath(n){const r=this.luigiCoreService.getGlobalContext().portalContext.crdGatewayApiUrl,o=this.extractKcpPath(r);this.luigiCoreService.getGlobalContext().portalContext.crdGatewayApiUrl=r.replace(o,n)}resolveKcpPath(n,r=!1){let i=this.extractKcpPath(n.portalContext.crdGatewayApiUrl);if(n.kcpPath&&(i=n.kcpPath),r){const s=i.lastIndexOf(":");-1!==s&&(i=i.slice(0,s))}return i}extractKcpPath(n){return n.match(new RegExp("(root:orgs[^/]*)"))?.[1]||""}static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275prov=Fe({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();const Ul=new Ot(e=>e.complete());function Cs(e,t){return e.definitions.find(n=>"OperationDefinition"===n.kind&&!!n.name)?.name.value??t}function E0(e,t){if(!e)throw new Error(t)}function Y8(e){return I0(e,[])}function I0(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return function jie(e,t){if(null===e)return"null";if(t.includes(e))return"[Circular]";const n=[...t,e];if(function Gie(e){return"function"==typeof e.toJSON}(e)){const r=e.toJSON();if(r!==e)return"string"==typeof r?r:I0(r,n)}else if(Array.isArray(e))return function qie(e,t){if(0===e.length)return"[]";if(t.length>2)return"[Array]";const n=Math.min(10,e.length),r=e.length-n,o=[];for(let i=0;i<n;++i)o.push(I0(e[i],t));return 1===r?o.push("... 1 more item"):r>1&&o.push(`... ${r} more items`),"["+o.join(", ")+"]"}(e,n);return function $ie(e,t){const n=Object.entries(e);return 0===n.length?"{}":t.length>2?"["+function Wie(e){const t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if("Object"===t&&"function"==typeof e.constructor){const n=e.constructor.name;if("string"==typeof n&&""!==n)return n}return t}(e)+"]":"{ "+n.map(([o,i])=>o+": "+I0(i,t)).join(", ")+" }"}(e,n)}(e,t);default:return String(e)}}class Zie{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 Sx{constructor(t,n,r,o,i,s){this.kind=t,this.start=n,this.end=r,this.line=o,this.column=i,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 Ax={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:[],FloatValue:[],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","locations"],SchemaExtension:["directives","operationTypes"],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"]},Yie=new Set(Object.keys(Ax));function wx(e){const t=e?.kind;return"string"==typeof t&&Yie.has(t)}var na=function(e){return e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription",e}(na||{}),wt=function(e){return 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.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",e}(wt||{});const Vl=Object.freeze({});function ra(e,t,n=Ax){const r=new Map;for(const ie of Object.values(wt))r.set(ie,K8(t,ie));let o,u,d,i=Array.isArray(e),s=[e],a=-1,l=[],c=e;const f=[],C=[];do{a++;const ie=a===s.length,he=ie&&0!==l.length;if(ie){if(u=0===C.length?void 0:f[f.length-1],c=d,d=C.pop(),he)if(i){c=c.slice();let st=0;for(const[St,jt]of l){const wn=St-st;null===jt?(c.splice(wn,1),st++):c[wn]=jt}}else{c={...c};for(const[st,St]of l)c[st]=St}a=o.index,s=o.keys,l=o.edits,i=o.inArray,o=o.prev}else if(d){if(u=i?a:s[a],c=d[u],null==c)continue;f.push(u)}let qe;if(!Array.isArray(c)){var P,G;wx(c)||E0(!1,`Invalid AST Node: ${Y8(c)}.`);const st=ie?null===(P=r.get(c.kind))||void 0===P?void 0:P.leave:null===(G=r.get(c.kind))||void 0===G?void 0:G.enter;if(qe=st?.call(t,c,u,d,f,C),qe===Vl)break;if(!1===qe){if(!ie){f.pop();continue}}else if(void 0!==qe&&(l.push([u,qe]),!ie)){if(!wx(qe)){f.pop();continue}c=qe}}var W;void 0===qe&&he&&l.push([u,c]),ie?f.pop():(o={inArray:i,index:a,keys:s,edits:l,prev:o},i=Array.isArray(c),s=i?c:null!==(W=n[c.kind])&&void 0!==W?W:[],a=-1,l=[],d&&C.push(d),d=c)}while(void 0!==o);return 0!==l.length?l[l.length-1][1]:e}function K8(e,t){const n=e[t];return"object"==typeof n?n:"function"==typeof n?{enter:n,leave:void 0}:{enter:e.enter,leave:e.leave}}function Ld(e){try{return e()}catch{}}const X8=Ld(()=>globalThis)||Ld(()=>window)||Ld(()=>self)||Ld(()=>global)||Ld(function(){return Ld.constructor("return this")()}),Q8="4.1.4",Dx=new Map;function Lx(e){const t=Dx.get(e)||1;return Dx.set(e,t+1),`${e}:${t}:${Math.random().toString(36).slice(2)}`}const Mx="Invariant Violation";class J8 extends Error{constructor(t=Mx){super(t),this.name=Mx,Object.setPrototypeOf(this,J8.prototype)}}const S0=["debug","log","warn","error","silent"];let e3=S0.indexOf("silent");function Rt(e,...t){if(!e)throw rs(...t)}function A0(e){return function(t,...n){if(S0.indexOf(e)>=e3){const r=console[e]||console.log;if("number"==typeof t){const o=t;(t=kx(o))||(t=Rx(o,n),n=[])}r(t,...n)}}}function rs(e,...t){return new J8(kx(e,t)||Rx(e,t))}Rt.debug=A0("debug"),Rt.log=A0("log"),Rt.warn=A0("warn"),Rt.error=A0("error");const Nx=Symbol.for("ApolloErrorMessageHandler_"+Q8);function t3(e){if("string"==typeof e)return e;try{return function xx(e,t=0){const n=Lx("stringifyForDisplay");return JSON.stringify(e,(r,o)=>void 0===o?n:o,t).split(JSON.stringify(n)).join("<undefined>")}(e,2).slice(0,1e3)}catch{return"<non-serializable>"}}function kx(e,t=[]){if(e)return X8[Nx]&&X8[Nx](e,t.map(t3))}function Rx(e,t=[]){if(e)return"string"==typeof e?t.reduce((n,r)=>n.replace(/%[sdfo]/,t3(r)),e):`An error occurred! For more details, see the full error text at https://go.apollo.dev/c/err#${encodeURIComponent(JSON.stringify({version:Q8,message:e,args:t.map(t3)}))}`}const Fa={...X8[Symbol.for("apollo.cacheSize")]},Xie=()=>Object.create(null),{forEach:Qie,slice:Ox}=Array.prototype,{hasOwnProperty:Jie}=Object.prototype;class oa{constructor(t=!0,n=Xie){this.weakness=t,this.makeData=n}lookup(){return this.lookupArray(arguments)}lookupArray(t){let n=this;return Qie.call(t,r=>n=n.getChildTrie(r)),Jie.call(n,"data")?n.data:n.data=this.makeData(Ox.call(t))}peek(){return this.peekArray(arguments)}peekArray(t){let n=this;for(let r=0,o=t.length;n&&r<o;++r){const i=n.mapFor(t[r],!1);n=i&&i.get(t[r])}return n&&n.data}remove(){return this.removeArray(arguments)}removeArray(t){let n;if(t.length){const r=t[0],o=this.mapFor(r,!1),i=o&&o.get(r);i&&(n=i.removeArray(Ox.call(t,1)),!i.data&&!i.weak&&(!i.strong||!i.strong.size)&&o.delete(r))}else n=this.data,delete this.data;return n}getChildTrie(t){const n=this.mapFor(t,!0);let r=n.get(t);return r||n.set(t,r=new oa(this.weakness,this.makeData)),r}mapFor(t,n){return this.weakness&&function ese(e){switch(typeof e){case"object":if(null===e)break;case"function":return!0}return!1}(t)?this.weak||(n?this.weak=new WeakMap:void 0):this.strong||(n?this.strong=new Map:void 0)}}function n3(){}const tse=n3,nse=typeof WeakRef<"u"?WeakRef:function(e){return{deref:()=>e}},rse=typeof WeakMap<"u"?WeakMap:Map,ose=typeof FinalizationRegistry<"u"?FinalizationRegistry:function(){return{register:n3,unregister:n3}};class w0{constructor(t=1/0,n=tse){this.max=t,this.dispose=n,this.map=new rse,this.newest=null,this.oldest=null,this.unfinalizedNodes=new Set,this.finalizationScheduled=!1,this.size=0,this.finalize=()=>{const r=this.unfinalizedNodes.values();for(let o=0;o<10024;o++){const i=r.next().value;if(!i)break;this.unfinalizedNodes.delete(i);const s=i.key;delete i.key,i.keyRef=new nse(s),this.registry.register(s,i,i)}this.unfinalizedNodes.size>0?queueMicrotask(this.finalize):this.finalizationScheduled=!1},this.registry=new ose(this.deleteNode.bind(this))}has(t){return this.map.has(t)}get(t){const n=this.getNode(t);return n&&n.value}getNode(t){const n=this.map.get(t);if(n&&n!==this.newest){const{older:r,newer:o}=n;o&&(o.older=r),r&&(r.newer=o),n.older=this.newest,n.older.newer=n,n.newer=null,this.newest=n,n===this.oldest&&(this.oldest=o)}return n}set(t,n){let r=this.getNode(t);return r?r.value=n:(r={key:t,value:n,newer:null,older:this.newest},this.newest&&(this.newest.newer=r),this.newest=r,this.oldest=this.oldest||r,this.scheduleFinalization(r),this.map.set(t,r),this.size++,r.value)}clean(){for(;this.oldest&&this.size>this.max;)this.deleteNode(this.oldest)}deleteNode(t){t===this.newest&&(this.newest=t.older),t===this.oldest&&(this.oldest=t.newer),t.newer&&(t.newer.older=t.older),t.older&&(t.older.newer=t.newer),this.size--;const n=t.key||t.keyRef&&t.keyRef.deref();this.dispose(t.value,n),t.keyRef?this.registry.unregister(t):this.unfinalizedNodes.delete(t),n&&this.map.delete(n)}delete(t){const n=this.map.get(t);return!!n&&(this.deleteNode(n),!0)}scheduleFinalization(t){this.unfinalizedNodes.add(t),this.finalizationScheduled||(this.finalizationScheduled=!0,queueMicrotask(this.finalize))}}function sse(){}class r3{constructor(t=1/0,n=sse){this.max=t,this.dispose=n,this.map=new Map,this.newest=null,this.oldest=null}has(t){return this.map.has(t)}get(t){const n=this.getNode(t);return n&&n.value}get size(){return this.map.size}getNode(t){const n=this.map.get(t);if(n&&n!==this.newest){const{older:r,newer:o}=n;o&&(o.older=r),r&&(r.newer=o),n.older=this.newest,n.older.newer=n,n.newer=null,this.newest=n,n===this.oldest&&(this.oldest=o)}return n}set(t,n){let r=this.getNode(t);return r?r.value=n:(r={key:t,value:n,newer:null,older:this.newest},this.newest&&(this.newest.newer=r),this.newest=r,this.oldest=this.oldest||r,this.map.set(t,r),r.value)}clean(){for(;this.oldest&&this.map.size>this.max;)this.delete(this.oldest.key)}delete(t){const n=this.map.get(t);return!!n&&(n===this.newest&&(this.newest=n.older),n===this.oldest&&(this.oldest=n.newer),n.newer&&(n.newer.older=n.older),n.older&&(n.older.newer=n.newer),this.map.delete(t),this.dispose(n.value,t),!0)}}const o3=new WeakSet;function Px(e){e.size<=(e.max||-1)||o3.has(e)||(o3.add(e),setTimeout(()=>{e.clean(),o3.delete(e)},100))}const i3=function(e,t){const n=new w0(e,t);return n.set=function(r,o){const i=w0.prototype.set.call(this,r,o);return Px(this),i},n},ase=function(e,t){const n=new r3(e,t);return n.set=function(r,o){const i=r3.prototype.set.call(this,r,o);return Px(this),i},n};function Bx(e,{max:t,makeCacheKey:n=r=>r}){const r=new oa(!0),o=new i3(t);return(...i)=>{const s=r.lookupArray(n(i)),a=o.get(s);if(a){if(a.error)throw a.error;return a.result}const l=o.set(s,{});try{return l.result=e(...i)}catch(c){throw l.error=c,c}}}const zl=Bx((e,t)=>{Rt(e&&"Document"===e.kind,1);const n=e.definitions.filter(r=>"OperationDefinition"===r.kind);t&&Rt(1==n.length&&n[0].operation===t,4,t,t,n[0].operation),ra(e,{Field(r,o,i,s){if(r.alias&&("__typename"===r.alias.value||r.alias.value.startsWith("__ac_"))&&r.alias.value!==r.name.value){let a=e,l=[];for(const c of s)a=a[c],a.kind===wt.FIELD&&l.push(a.alias?.value||a.name.value);throw l.splice(-1,1,r.name.value),rs(5,r.alias.value,l.join("."),n[0].operation,Cs(e,"(anonymous)"))}}})},{max:Fa.checkDocument||2e3});function Ha(e){return zl(e),e.definitions.filter(t=>"OperationDefinition"===t.kind)[0]}class hi{static empty(){return new hi(()=>Ul)}static from(t){if(0===t.length)return hi.empty();const[n,...r]=t;return n.concat(...r)}static split(t,n,r=new hi((o,i)=>i(o))){const o=new hi((i,s)=>t(i)?n.request(i,s):r.request(i,s));return Object.assign(o,{left:n,right:r})}static execute(t,n,r){return t.request(function lse(e,{client:t}){const n={query:e.query,variables:e.variables||{},extensions:e.extensions||{},operationName:Cs(e.query),operationType:Ha(e.query).operation};let r={...e.context};const i=()=>Object.freeze({...r});return Object.defineProperty(n,"setContext",{enumerable:!1,value:s=>{r="function"==typeof s?{...r,...s(i())}:{...r,...s}}}),Object.defineProperty(n,"getContext",{enumerable:!1,value:i}),Object.defineProperty(n,"client",{enumerable:!1,value:t}),n}(n,r),()=>Ul)}static concat(...t){return hi.from(t)}constructor(t){t&&(this.request=t)}split(t,n,r){return this.concat(hi.split(t,n,r))}concat(...t){return 0===t.length?this:t.reduce(this.combine.bind(this),this)}combine(t,n){const r=new hi((o,i)=>t.request(o,s=>n.request(s,i)));return Object.assign(r,{left:t,right:n})}request(t,n){throw rs(65)}left;right}const cse=hi.split,{toString:Fx,hasOwnProperty:use}=Object.prototype,Hx=Function.prototype.toString,s3=new Map;function $r(e,t){try{return a3(e,t)}finally{s3.clear()}}function a3(e,t){if(e===t)return!0;const n=Fx.call(e);if(n!==Fx.call(t))return!1;switch(n){case"[object Array]":if(e.length!==t.length)return!1;case"[object Object]":{if(Vx(e,t))return!0;const o=Ux(e),i=Ux(t),s=o.length;if(s!==i.length)return!1;for(let a=0;a<s;++a)if(!use.call(t,o[a]))return!1;for(let a=0;a<s;++a){const l=o[a];if(!a3(e[l],t[l]))return!1}return!0}case"[object Error]":return e.name===t.name&&e.message===t.message;case"[object Number]":if(e!=e)return t!=t;case"[object Boolean]":case"[object Date]":return+e==+t;case"[object RegExp]":case"[object String]":return e==`${t}`;case"[object Map]":case"[object Set]":{if(e.size!==t.size)return!1;if(Vx(e,t))return!0;const o=e.entries(),i="[object Map]"===n;for(;;){const s=o.next();if(s.done)break;const[a,l]=s.value;if(!t.has(a)||i&&!a3(l,t.get(a)))return!1}return!0}case"[object Uint16Array]":case"[object Uint8Array]":case"[object Uint32Array]":case"[object Int32Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object ArrayBuffer]":e=new Uint8Array(e),t=new Uint8Array(t);case"[object DataView]":{let o=e.byteLength;if(o===t.byteLength)for(;o--&&e[o]===t[o];);return-1===o}case"[object AsyncFunction]":case"[object GeneratorFunction]":case"[object AsyncGeneratorFunction]":case"[object Function]":{const o=Hx.call(e);return o===Hx.call(t)&&!function hse(e,t){const n=e.length-t.length;return n>=0&&e.indexOf(t,n)===n}(o,_se)}}return!1}function Ux(e){return Object.keys(e).filter(dse,e)}function dse(e){return void 0!==this[e]}const _se="{ [native code] }";function Vx(e,t){let n=s3.get(e);if(n){if(n.has(t))return!0}else s3.set(e,n=new Set);return n.add(t),!1}let Yo=null;const zx={};let fse=1;function jx(e){try{return e()}catch{}}const l3="@wry/context:Slot",Gx=jx(()=>globalThis)||jx(()=>global)||Object.create(null),D0=Gx[l3]||Array[l3]||function(e){try{Object.defineProperty(Gx,l3,{value:e,enumerable:!1,writable:!1,configurable:!0})}finally{return e}}(class{constructor(){this.id=["slot",fse++,Date.now(),Math.random().toString(36).slice(2)].join(":")}hasValue(){for(let t=Yo;t;t=t.parent)if(this.id in t.slots){const n=t.slots[this.id];if(n===zx)break;return t!==Yo&&(Yo.slots[this.id]=n),!0}return Yo&&(Yo.slots[this.id]=zx),!1}getValue(){if(this.hasValue())return Yo.slots[this.id]}withValue(t,n,r,o){const s=Yo;Yo={parent:s,slots:{__proto__:null,[this.id]:t}};try{return n.apply(o,r)}finally{Yo=s}}static bind(t){const n=Yo;return function(){const r=Yo;try{return Yo=n,t.apply(this,arguments)}finally{Yo=r}}}static noContext(t,n,r){if(!Yo)return t.apply(r,n);{const o=Yo;try{return Yo=null,t.apply(r,n)}finally{Yo=o}}}}),sf=new D0,{hasOwnProperty:vse}=Object.prototype,u3=Array.from||function(e){const t=[];return e.forEach(n=>t.push(n)),t};function L0(e){const{unsubscribe:t}=e;"function"==typeof t&&(e.unsubscribe=void 0,t())}const af=[];function xd(e,t){if(!e)throw new Error(t||"assertion failure")}function qx(e,t){const n=e.length;return n>0&&n===t.length&&e[n-1]===t[n-1]}function Wx(e){switch(e.length){case 0:throw new Error("unknown value");case 1:return e[0];case 2:throw e[1]}}function Zx(e){return e.slice(0)}let yse=(()=>{class e{constructor(n){this.fn=n,this.parents=new Set,this.childValues=new Map,this.dirtyChildren=null,this.dirty=!0,this.recomputing=!1,this.value=[],this.deps=null,++e.count}peek(){if(1===this.value.length&&!jl(this))return Yx(this),this.value[0]}recompute(n){return xd(!this.recomputing,"already recomputing"),Yx(this),jl(this)?function bse(e,t){return tM(e),sf.withValue(e,Tse,[e,t]),function Ise(e,t){if("function"==typeof e.subscribe)try{L0(e),e.unsubscribe=e.subscribe.apply(null,t)}catch{return e.setDirty(),!1}return!0}(e,t)&&function Ese(e){e.dirty=!1,!jl(e)&&Xx(e)}(e),Wx(e.value)}(this,n):Wx(this.value)}setDirty(){this.dirty||(this.dirty=!0,Kx(this),L0(this))}dispose(){this.setDirty(),tM(this),d3(this,(n,r)=>{n.setDirty(),nM(n,this)})}forget(){this.dispose()}dependOn(n){n.add(this),this.deps||(this.deps=af.pop()||new Set),this.deps.add(n)}forgetDeps(){this.deps&&(u3(this.deps).forEach(n=>n.delete(this)),this.deps.clear(),af.push(this.deps),this.deps=null)}}return e.count=0,e})();function Yx(e){const t=sf.getValue();if(t)return e.parents.add(t),t.childValues.has(e)||t.childValues.set(e,[]),jl(e)?Qx(t,e):Jx(t,e),t}function Tse(e,t){e.recomputing=!0;const{normalizeResult:n}=e;let r;n&&1===e.value.length&&(r=Zx(e.value)),e.value.length=0;try{if(e.value[0]=e.fn.apply(null,t),n&&r&&!qx(r,e.value))try{e.value[0]=n(e.value[0],r[0])}catch{}}catch(o){e.value[1]=o}e.recomputing=!1}function jl(e){return e.dirty||!(!e.dirtyChildren||!e.dirtyChildren.size)}function Kx(e){d3(e,Qx)}function Xx(e){d3(e,Jx)}function d3(e,t){const n=e.parents.size;if(n){const r=u3(e.parents);for(let o=0;o<n;++o)t(r[o],e)}}function Qx(e,t){xd(e.childValues.has(t)),xd(jl(t));const n=!jl(e);if(e.dirtyChildren){if(e.dirtyChildren.has(t))return}else e.dirtyChildren=af.pop()||new Set;e.dirtyChildren.add(t),n&&Kx(e)}function Jx(e,t){xd(e.childValues.has(t)),xd(!jl(t));const n=e.childValues.get(t);0===n.length?e.childValues.set(t,Zx(t.value)):qx(n,t.value)||e.setDirty(),eM(e,t),!jl(e)&&Xx(e)}function eM(e,t){const n=e.dirtyChildren;n&&(n.delete(t),0===n.size&&(af.length<100&&af.push(n),e.dirtyChildren=null))}function tM(e){e.childValues.size>0&&e.childValues.forEach((t,n)=>{nM(e,n)}),e.forgetDeps(),xd(null===e.dirtyChildren)}function nM(e,t){t.parents.delete(e),e.childValues.delete(t),eM(e,t)}const Sse={setDirty:!0,dispose:!0,forget:!0};function rM(e){const t=new Map,n=e&&e.subscribe;function r(o){const i=sf.getValue();if(i){let s=t.get(o);s||t.set(o,s=new Set),i.dependOn(s),"function"==typeof n&&(L0(s),s.unsubscribe=n(o))}}return r.dirty=function(i,s){const a=t.get(i);if(a){const l=s&&vse.call(Sse,s)?s:"setDirty";u3(a).forEach(c=>c[l]()),t.delete(i),L0(a)}},r}let oM;function iM(...e){return(oM||(oM=new oa("function"==typeof WeakMap))).lookupArray(e)}const _3=new Set;function lf(e,{max:t=Math.pow(2,16),keyArgs:n,makeCacheKey:r=iM,normalizeResult:o,subscribe:i,cache:s=r3}=Object.create(null)){const a="function"==typeof s?new s(t,f=>f.dispose()):s,l=function(){const f=r.apply(null,n?n.apply(null,arguments):arguments);if(void 0===f)return e.apply(null,arguments);let C=a.get(f);C||(a.set(f,C=new yse(e)),C.normalizeResult=o,C.subscribe=i,C.forget=()=>a.delete(f));const P=C.recompute(Array.prototype.slice.call(arguments));return a.set(f,C),_3.add(a),sf.hasValue()||(_3.forEach(G=>G.clean()),_3.clear()),P};function c(f){const C=f&&a.get(f);C&&C.setDirty()}function u(f){const C=f&&a.get(f);if(C)return C.peek()}function d(f){return!!f&&a.delete(f)}return Object.defineProperty(l,"size",{get:()=>a.size,configurable:!1,enumerable:!1}),Object.freeze(l.options={max:t,keyArgs:n,makeCacheKey:r,normalizeResult:o,subscribe:i,cache:a}),l.dirtyKey=c,l.dirty=function(){c(r.apply(null,arguments))},l.peekKey=u,l.peek=function(){return u(r.apply(null,arguments))},l.forgetKey=d,l.forget=function(){return d(r.apply(null,arguments))},l.makeCacheKey=r,l.getKey=n?function(){return r.apply(null,n.apply(null,arguments))}:r,Object.freeze(l)}function Ase(e){return e}class Ua{transform;cached;resultCache=new WeakSet;getCacheKey(t){return[t]}static identity(){return new Ua(Ase,{cache:!1})}static split(t,n,r=Ua.identity()){return Object.assign(new Ua(o=>(t(o)?n:r).transformDocument(o),{cache:!1}),{left:n,right:r})}constructor(t,n={}){this.transform=t,n.getCacheKey&&(this.getCacheKey=n.getCacheKey),this.cached=!1!==n.cache,this.resetCache()}resetCache(){if(this.cached){const t=new oa;this.performWork=lf(Ua.prototype.performWork.bind(this),{makeCacheKey:n=>{const r=this.getCacheKey(n);if(r)return Rt(Array.isArray(r),20),t.lookupArray(r)},max:Fa["documentTransform.cache"],cache:w0})}}performWork(t){return zl(t),this.transform(t)}transformDocument(t){if(this.resultCache.has(t))return t;const n=this.performWork(t);return this.resultCache.add(n),n}concat(t){return Object.assign(new Ua(n=>t.transformDocument(this.transformDocument(n)),{cache:!1}),{left:this,right:t})}left;right}const sM={kind:wt.FIELD,name:{kind:wt.NAME,value:"__typename"}},h3=Object.assign(function(e){return ra(e,{SelectionSet:{enter(t,n,r){if(r&&r.kind===wt.OPERATION_DEFINITION)return;const{selections:o}=t;return o&&!o.some(a=>a.kind===wt.FIELD&&("__typename"===a.name.value||0===a.name.value.lastIndexOf("__",0)))?r.kind===wt.FIELD&&r.directives&&r.directives.some(a=>"export"===a.name.value)?void 0:{...t,selections:[...o,sM]}:void 0}}})},{added:e=>e===sM}),Va=Object.assign(function(t){return JSON.stringify(t,Nse)},{reset(){Md=new ase(Fa.canonicalStringify||1e3)}});let Md;function Nse(e,t){if(t&&"object"==typeof t){const n=Object.getPrototypeOf(t);if(n===Object.prototype||null===n){const r=Object.keys(t);if(r.every(kse))return t;const o=JSON.stringify(r);let i=Md.get(o);if(!i){r.sort();const a=JSON.stringify(r);i=Md.get(a)||r,Md.set(o,i),Md.set(a,i)}const s=Object.create(n);return i.forEach(a=>{s[a]=t[a]}),s}}return t}function kse(e,t,n){return 0===t||n[t-1]<=e}function m3(e){return 9===e||32===e}function cf(e){return e>=48&&e<=57}function uM(e){return e>=97&&e<=122||e>=65&&e<=90}function dM(e){return uM(e)||95===e}function Rse(e){return uM(e)||cf(e)||95===e}function Ose(e){var t;let n=Number.MAX_SAFE_INTEGER,r=null,o=-1;for(let s=0;s<e.length;++s){var i;const a=e[s],l=Pse(a);l!==a.length&&(r=null!==(i=r)&&void 0!==i?i:s,o=s,0!==s&&l<n&&(n=l))}return e.map((s,a)=>0===a?s:s.slice(n)).slice(null!==(t=r)&&void 0!==t?t:0,o+1)}function Pse(e){let t=0;for(;t<e.length&&m3(e.charCodeAt(t));)++t;return t}Va.reset();const Hse=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function Use(e){return Vse[e.charCodeAt(0)]}const Vse=["\\u0000","\\u0001","\\u0002","\\u0003","\\u0004","\\u0005","\\u0006","\\u0007","\\b","\\t","\\n","\\u000B","\\f","\\r","\\u000E","\\u000F","\\u0010","\\u0011","\\u0012","\\u0013","\\u0014","\\u0015","\\u0016","\\u0017","\\u0018","\\u0019","\\u001A","\\u001B","\\u001C","\\u001D","\\u001E","\\u001F","","",'\\"',"","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\\\","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\u007F","\\u0080","\\u0081","\\u0082","\\u0083","\\u0084","\\u0085","\\u0086","\\u0087","\\u0088","\\u0089","\\u008A","\\u008B","\\u008C","\\u008D","\\u008E","\\u008F","\\u0090","\\u0091","\\u0092","\\u0093","\\u0094","\\u0095","\\u0096","\\u0097","\\u0098","\\u0099","\\u009A","\\u009B","\\u009C","\\u009D","\\u009E","\\u009F"];function x0(e){return ra(e,jse)}const jse={Name:{leave:e=>e.value},Variable:{leave:e=>"$"+e.name},Document:{leave:e=>zt(e.definitions,"\n\n")},OperationDefinition:{leave(e){const t=v3(e.variableDefinitions)?Tn("(\n",zt(e.variableDefinitions,"\n"),"\n)"):Tn("(",zt(e.variableDefinitions,", "),")"),n=Tn("",e.description,"\n")+zt([e.operation,zt([e.name,t]),zt(e.directives," ")]," ");return("query"===n?"":n+" ")+e.selectionSet}},VariableDefinition:{leave:({variable:e,type:t,defaultValue:n,directives:r,description:o})=>Tn("",o,"\n")+e+": "+t+Tn(" = ",n)+Tn(" ",zt(r," "))},SelectionSet:{leave:({selections:e})=>Os(e)},Field:{leave({alias:e,name:t,arguments:n,directives:r,selectionSet:o}){const i=Tn("",e,": ")+t;let s=i+Tn("(",zt(n,", "),")");return s.length>80&&(s=i+Tn("(\n",M0(zt(n,"\n")),"\n)")),zt([s,zt(r," "),o]," ")}},Argument:{leave:({name:e,value:t})=>e+": "+t},FragmentSpread:{leave:({name:e,directives:t})=>"..."+e+Tn(" ",zt(t," "))},InlineFragment:{leave:({typeCondition:e,directives:t,selectionSet:n})=>zt(["...",Tn("on ",e),zt(t," "),n]," ")},FragmentDefinition:{leave:({name:e,typeCondition:t,variableDefinitions:n,directives:r,selectionSet:o,description:i})=>Tn("",i,"\n")+`fragment ${e}${Tn("(",zt(n,", "),")")} on ${t} ${Tn("",zt(r," ")," ")}`+o},IntValue:{leave:({value:e})=>e},FloatValue:{leave:({value:e})=>e},StringValue:{leave:({value:e,block:t})=>t?function Bse(e,t){const n=e.replace(/"""/g,'\\"""'),r=n.split(/\r\n|[\n\r]/g),o=1===r.length,i=r.length>1&&r.slice(1).every(C=>0===C.length||m3(C.charCodeAt(0))),s=n.endsWith('\\"""'),a=e.endsWith('"')&&!s,l=e.endsWith("\\"),c=a||l,u=!(null!=t&&t.minimize)&&(!o||e.length>70||c||i||s);let d="";const f=o&&m3(e.charCodeAt(0));return(u&&!f||i)&&(d+="\n"),d+=n,(u||c)&&(d+="\n"),'"""'+d+'"""'}(e):function Fse(e){return`"${e.replace(Hse,Use)}"`}(e)},BooleanValue:{leave:({value:e})=>e?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:e})=>e},ListValue:{leave:({values:e})=>"["+zt(e,", ")+"]"},ObjectValue:{leave:({fields:e})=>"{"+zt(e,", ")+"}"},ObjectField:{leave:({name:e,value:t})=>e+": "+t},Directive:{leave:({name:e,arguments:t})=>"@"+e+Tn("(",zt(t,", "),")")},NamedType:{leave:({name:e})=>e},ListType:{leave:({type:e})=>"["+e+"]"},NonNullType:{leave:({type:e})=>e+"!"},SchemaDefinition:{leave:({description:e,directives:t,operationTypes:n})=>Tn("",e,"\n")+zt(["schema",zt(t," "),Os(n)]," ")},OperationTypeDefinition:{leave:({operation:e,type:t})=>e+": "+t},ScalarTypeDefinition:{leave:({description:e,name:t,directives:n})=>Tn("",e,"\n")+zt(["scalar",t,zt(n," ")]," ")},ObjectTypeDefinition:{leave:({description:e,name:t,interfaces:n,directives:r,fields:o})=>Tn("",e,"\n")+zt(["type",t,Tn("implements ",zt(n," & ")),zt(r," "),Os(o)]," ")},FieldDefinition:{leave:({description:e,name:t,arguments:n,type:r,directives:o})=>Tn("",e,"\n")+t+(v3(n)?Tn("(\n",M0(zt(n,"\n")),"\n)"):Tn("(",zt(n,", "),")"))+": "+r+Tn(" ",zt(o," "))},InputValueDefinition:{leave:({description:e,name:t,type:n,defaultValue:r,directives:o})=>Tn("",e,"\n")+zt([t+": "+n,Tn("= ",r),zt(o," ")]," ")},InterfaceTypeDefinition:{leave:({description:e,name:t,interfaces:n,directives:r,fields:o})=>Tn("",e,"\n")+zt(["interface",t,Tn("implements ",zt(n," & ")),zt(r," "),Os(o)]," ")},UnionTypeDefinition:{leave:({description:e,name:t,directives:n,types:r})=>Tn("",e,"\n")+zt(["union",t,zt(n," "),Tn("= ",zt(r," | "))]," ")},EnumTypeDefinition:{leave:({description:e,name:t,directives:n,values:r})=>Tn("",e,"\n")+zt(["enum",t,zt(n," "),Os(r)]," ")},EnumValueDefinition:{leave:({description:e,name:t,directives:n})=>Tn("",e,"\n")+zt([t,zt(n," ")]," ")},InputObjectTypeDefinition:{leave:({description:e,name:t,directives:n,fields:r})=>Tn("",e,"\n")+zt(["input",t,zt(n," "),Os(r)]," ")},DirectiveDefinition:{leave:({description:e,name:t,arguments:n,repeatable:r,locations:o})=>Tn("",e,"\n")+"directive @"+t+(v3(n)?Tn("(\n",M0(zt(n,"\n")),"\n)"):Tn("(",zt(n,", "),")"))+(r?" repeatable":"")+" on "+zt(o," | ")},SchemaExtension:{leave:({directives:e,operationTypes:t})=>zt(["extend schema",zt(e," "),Os(t)]," ")},ScalarTypeExtension:{leave:({name:e,directives:t})=>zt(["extend scalar",e,zt(t," ")]," ")},ObjectTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>zt(["extend type",e,Tn("implements ",zt(t," & ")),zt(n," "),Os(r)]," ")},InterfaceTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>zt(["extend interface",e,Tn("implements ",zt(t," & ")),zt(n," "),Os(r)]," ")},UnionTypeExtension:{leave:({name:e,directives:t,types:n})=>zt(["extend union",e,zt(t," "),Tn("= ",zt(n," | "))]," ")},EnumTypeExtension:{leave:({name:e,directives:t,values:n})=>zt(["extend enum",e,zt(t," "),Os(n)]," ")},InputObjectTypeExtension:{leave:({name:e,directives:t,fields:n})=>zt(["extend input",e,zt(t," "),Os(n)]," ")},TypeCoordinate:{leave:({name:e})=>e},MemberCoordinate:{leave:({name:e,memberName:t})=>zt([e,Tn(".",t)])},ArgumentCoordinate:{leave:({name:e,fieldName:t,argumentName:n})=>zt([e,Tn(".",t),Tn("(",n,":)")])},DirectiveCoordinate:{leave:({name:e})=>zt(["@",e])},DirectiveArgumentCoordinate:{leave:({name:e,argumentName:t})=>zt(["@",e,Tn("(",t,":)")])}};function zt(e,t=""){var n;return null!==(n=e?.filter(r=>r).join(t))&&void 0!==n?n:""}function Os(e){return Tn("{\n",M0(zt(e,"\n")),"\n}")}function Tn(e,t,n=""){return null!=t&&""!==t?e+t+n:""}function M0(e){return Tn(" ",e.replace(/\n/g,"\n "))}function v3(e){var t;return null!==(t=e?.some(n=>n.includes("\n")))&&void 0!==t&&t}let uf;const df=Object.assign(e=>{let t=uf.get(e);return t||(t=x0(e),uf.set(e,t)),t},{reset(){uf=new i3(Fa.print||2e3)}});function lr(e){return!(!e||"object"!=typeof e||"string"!=typeof e.__ref)}df.reset();const y3={now:()=>(y3.delegate||Date).now(),delegate:void 0};class b3 extends Rn{constructor(t=1/0,n=1/0,r=y3){super(),this._bufferSize=t,this._windowTime=n,this._timestampProvider=r,this._buffer=[],this._infiniteTimeWindow=!0,this._infiniteTimeWindow=n===1/0,this._bufferSize=Math.max(1,t),this._windowTime=Math.max(1,n)}next(t){const{isStopped:n,_buffer:r,_infiniteTimeWindow:o,_timestampProvider:i,_windowTime:s}=this;n||(r.push(t),!o&&r.push(i.now()+s)),this._trimBuffer(),super.next(t)}_subscribe(t){this._throwIfClosed(),this._trimBuffer();const n=this._innerSubscribe(t),{_infiniteTimeWindow:r,_buffer:o}=this,i=o.slice();for(let s=0;s<i.length&&!t.closed;s+=r?1:2)t.next(i[s]);return this._checkFinalizedStatuses(t),n}_trimBuffer(){const{_bufferSize:t,_timestampProvider:n,_buffer:r,_infiniteTimeWindow:o}=this,i=(o?1:2)*t;if(t<1/0&&i<r.length&&r.splice(0,r.length-i),!o){const s=n.now();let a=0;for(let l=1;l<r.length&&r[l]<=s;l+=2)a=l;a&&r.splice(0,a+1)}}}function _f(e={}){const{connector:t=()=>new Rn,resetOnError:n=!0,resetOnComplete:r=!0,resetOnRefCountZero:o=!0}=e;return i=>{let s,a,l,c=0,u=!1,d=!1;const f=()=>{a?.unsubscribe(),a=void 0},C=()=>{f(),s=l=void 0,u=d=!1},P=()=>{const G=s;C(),G?.unsubscribe()};return Ri((G,W)=>{c++,!d&&!u&&f();const ie=l=l??t();W.add(()=>{c--,0===c&&!d&&!u&&(a=T3(P,o))}),ie.subscribe(W),!s&&c>0&&(s=new hr({next:he=>ie.next(he),error:he=>{d=!0,f(),a=T3(C,n,he),ie.error(he)},complete:()=>{u=!0,f(),a=T3(C,r),ie.complete()}}),vs(G).subscribe(s))})(i)}}function T3(e,t,...n){if(!0===t)return void e();if(!1===t)return;const r=new hr({next:()=>{r.unsubscribe(),e()}});return vs(t(...n)).subscribe(r)}function N0(e,t,n){let r,o=!1;return e&&"object"==typeof e?({bufferSize:r=1/0,windowTime:t=1/0,refCount:o=!1,scheduler:n}=e):r=e??1/0,_f({connector:()=>new b3(r,t,n),resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:o})}function Zse(e,t){return e===t}class Yse extends J{constructor(t,n){super()}schedule(t,n=0){return this}}const k0={setInterval(e,t,...n){const{delegate:r}=k0;return r?.setInterval?r.setInterval(e,t,...n):setInterval(e,t,...n)},clearInterval(e){const{delegate:t}=k0;return(t?.clearInterval||clearInterval)(e)},delegate:void 0};class _M extends Yse{constructor(t,n){super(t,n),this.scheduler=t,this.work=n,this.pending=!1}schedule(t,n=0){var r;if(this.closed)return this;this.state=t;const o=this.id,i=this.scheduler;return null!=o&&(this.id=this.recycleAsyncId(i,o,n)),this.pending=!0,this.delay=n,this.id=null!==(r=this.id)&&void 0!==r?r:this.requestAsyncId(i,this.id,n),this}requestAsyncId(t,n,r=0){return k0.setInterval(t.flush.bind(t,this),r)}recycleAsyncId(t,n,r=0){if(null!=r&&this.delay===r&&!1===this.pending)return n;null!=n&&k0.clearInterval(n)}execute(t,n){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;const r=this._execute(t,n);if(r)return r;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(t,n){let o,r=!1;try{this.work(t)}catch(i){r=!0,o=i||new Error("Scheduled action threw falsy error")}if(r)return this.unsubscribe(),o}unsubscribe(){if(!this.closed){const{id:t,scheduler:n}=this,{actions:r}=n;this.work=this.state=this.scheduler=null,this.pending=!1,X(r,this),null!=t&&(this.id=this.recycleAsyncId(n,t,null)),this.delay=null,super.unsubscribe()}}}class hf{constructor(t,n=hf.now){this.schedulerActionCtor=t,this.now=n}schedule(t,n=0,r){return new this.schedulerActionCtor(this,t).schedule(r,n)}}hf.now=y3.now;class hM extends hf{constructor(t,n=hf.now){super(t,n),this.actions=[],this._active=!1}flush(t){const{actions:n}=this;if(this._active)return void n.push(t);let r;this._active=!0;do{if(r=t.execute(t.state,t.delay))break}while(t=n.shift());if(this._active=!1,r){for(;t=n.shift();)t.unsubscribe();throw r}}}const Kse=new hM(_M);const pM=Bx(function(t,n,r){return function Jse(e,t){let n,r;function o(i){return i!==n&&(n=i,r=t(n)),r}return Object.assign(e.pipe(ur(o),N0({bufferSize:1,refCount:!0})),{getCurrentResult:()=>o(e.getCurrentResult())})}(t,r)},{max:1,makeCacheKey:e=>e.slice(0,2)});function ff(e=[]){const t={};return e.forEach(n=>{t[n.name.value]=n}),t}function pf(e){return e.definitions.filter(t=>"FragmentDefinition"===t.kind)}function R0(e,t){switch(e.kind){case"InlineFragment":return e;case"FragmentSpread":{const n=e.name.value;if("function"==typeof t)return t(n);const r=t&&t[n];return Rt(r,9,n),r||null}default:return null}}function E3(e){let t;zl(e);for(let n of e.definitions){if("OperationDefinition"===n.kind)return n;"FragmentDefinition"===n.kind&&!t&&(t=n)}if(t)return t;throw rs(12)}function gf(e){return"Field"===e.kind}function iu(e){return e.alias?e.alias.value:e.name.value}function O0({directives:e},t){return!e||!e.length||function nae(e){const t=[];return e&&e.length&&e.forEach(n=>{if(!function tae({name:{value:e}}){return"skip"===e||"include"===e}(n))return;const r=n.arguments,o=n.name.value;Rt(r&&1===r.length,16,o);const i=r[0];Rt(i.name&&"if"===i.name.value,17,o);const s=i.value;Rt(s&&("Variable"===s.kind||"BooleanValue"===s.kind),18,o),t.push({directive:n,ifArgument:i})}),t}(e).every(({directive:n,ifArgument:r})=>{let o=!1;return"Variable"===r.value.kind?(o=t&&t[r.value.name.value],Rt(void 0!==o,15,n.name.value)):o=r.value.value,"skip"===n.name.value?!o:o})}function gM(e,{data:t,...n},{data:r,...o},i){return $r(n,o)&&P0(E3(e).selectionSet,t,r,{fragmentMap:ff(pf(e)),variables:i})}function P0(e,t,n,r){if(t===n)return!0;const o=new Set;return e.selections.every(i=>{if(o.has(i)||(o.add(i),!O0(i,r.variables))||mM(i))return!0;if(gf(i)){const s=iu(i),a=t&&t[s],l=n&&n[s],c=i.selectionSet;if(!c)return $r(a,l);const u=Array.isArray(a),d=Array.isArray(l);if(u!==d)return!1;if(u&&d){const f=a.length;if(l.length!==f)return!1;for(let C=0;C<f;++C)if(!P0(c,a[C],l[C],r))return!1;return!0}return P0(c,a,l,r)}{const s=R0(i,r.fragmentMap);if(s)return!!mM(s)||P0(s.selectionSet,t,n,r)}})}function mM(e){return!!e.directives&&e.directives.some(rae)}function rae(e){return"nonreactive"===e.name.value}function oae(e,t){let n=t;const r=[];return e.definitions.forEach(i=>{if("OperationDefinition"===i.kind)throw rs(10,i.operation,i.name?` named '${i.name.value}'`:"");"FragmentDefinition"===i.kind&&r.push(i)}),typeof n>"u"&&(Rt(1===r.length,11,r.length),n=r[0].name.value),{...e,definitions:[{kind:"OperationDefinition",operation:"query",selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:n}}]}},...e.definitions]}}function iae(...e){return iM.bind(null,...e)}class vM{assumeImmutableResults=!1;lookupFragment(t){return null}batch(t){let r;return this.performTransaction(()=>r=t.update(this),"string"==typeof t.optimistic?t.optimistic:!1===t.optimistic?null:void 0),r}recordOptimisticTransaction(t,n){this.performTransaction(t,n)}transformDocument(t){return t}transformForLink(t){return t}identify(t){}gc(){return[]}modify(t){return!1}readQuery(t,n=!!t.optimistic){return this.read({...t,rootId:t.id||"ROOT_QUERY",optimistic:n})}fragmentWatches=new oa(!0);watchFragment(t){const{fragment:n,fragmentName:r,from:o}=t,i=this.getFragmentDoc(n,r),a=(Array.isArray(o)?o:[o]).map(C=>null==C?C:this.toCacheId(C));if(!Array.isArray(o)){const C=this.watchSingleFragment(a[0],i,t);return null===o?C:pM(C,Symbol.for("apollo.transform.individualResult"),P=>({...P,data:P.data??{}}))}let l;function c(C){const P=C.reduce((G,W,ie)=>(G.data.push(W.data),G.complete&&=W.complete,G.dataState=G.complete?"complete":"partial",W.missing&&(G.missing||={},G.missing[ie]=W.missing),G),{data:[],dataState:"complete",complete:!0});return $r(l,P)||(l=P),l}if(0===a.length)return aae;let u=!1;const d=a.map(C=>this.watchSingleFragment(C,i,t)),f=function eae(e){return 0===e.length?Ul:new Ot(t=>{const{length:n}=e,r=new Array(n),o=new Map;e.forEach((l,c)=>{o.has(l)||o.set(l,new Set),o.get(l).add(c)});let a,i=o.size,s=o.size;o.forEach((l,c)=>{let u=!1;const d=c.subscribe({next:f=>{l.forEach(C=>r[C]=f),u||(u=!0,s--),s||(a||=new Set(e.filter(C=>C.dirty)),a.delete(c),a.size||(t.next(r.slice()),a=void 0))},complete:()=>{i--,i||t.complete()},error:t.error.bind(t)});t.add(d)})})}(d).pipe(ur(c),Xc({subscribe:()=>u=!0,unsubscribe:()=>u=!1}),N0({bufferSize:1,refCount:!0}));return Object.assign(f,{getCurrentResult:()=>u&&l?l:c(d.map(P=>P.getCurrentResult()))})}onAfterBroadcast=t=>t();watchSingleFragment(t,n,r){if(null===t)return sae;const{optimistic:o=!0,variables:i}=r,s=[n,Va({id:t,optimistic:o,variables:i})],a=this.fragmentWatches.lookupArray(s);if(!a.observable){let c,u=function(f){const C=f.result;return(!c||!gM(n,{data:c.data},{data:C},r.variables))&&(c={data:C,dataState:f.complete?"complete":"partial",complete:f.complete},f.missing&&(c.missing=f.missing.missing)),c},l=!1;const d=new Ot(f=>{l=!0;const C=this.watch({variables:i,returnPartialData:!0,id:t,query:n,optimistic:o,immediate:!0,callback:P=>{d.dirty=!0,this.onAfterBroadcast(()=>{f.next(u(P)),d.dirty=!1})}});return()=>{l=!1,C(),this.fragmentWatches.removeArray(s)}}).pipe(function Wse(e,t=xt){return e=e??Zse,Ri((n,r)=>{let o,i=!0;n.subscribe(Zi(r,s=>{const a=t(s);(i||!e(o,a))&&(i=!1,o=a,r.next(s))}))})}(),_f({connector:()=>new b3(1),resetOnRefCountZero:()=>function Qse(e=0,t,n=Kse){let r=-1;return null!=t&&(Ew(t)?n=t:r=t),new Ot(o=>{let i=function Xse(e){return e instanceof Date&&!isNaN(e)}(e)?+e-n.now():e;i<0&&(i=0);let s=0;return n.schedule(function(){o.closed||(o.next(s++),0<=r?this.schedule(void 0,r):o.complete())},i)})}(0)}));a.observable=Object.assign(d,{dirty:!1,getCurrentResult:()=>l&&c?c:u(this.diff({id:t,query:n,returnPartialData:!0,optimistic:o,variables:i}))})}return a.observable}getFragmentDoc=lf(oae,{max:Fa["cache.fragmentQueryDocuments"]||1e3,cache:w0,makeCacheKey:iae(this)});readFragment(t,n=!!t.optimistic){const r=void 0!==t.from?this.toCacheId(t.from):t.id;return this.read({...t,query:this.getFragmentDoc(t.fragment,t.fragmentName),rootId:r,optimistic:n})}writeQuery({id:t,data:n,...r}){return this.write(Object.assign(r,{dataId:t||"ROOT_QUERY",result:n}))}writeFragment({data:t,fragment:n,fragmentName:r,...o}){const i=void 0!==o.from?this.toCacheId(o.from):o.id;return this.write(Object.assign(o,{query:this.getFragmentDoc(n,r),dataId:i,result:t}))}updateQuery(t,n){return this.batch({update(r){const o=r.readQuery(t),i=n(o);return null==i?o:(r.writeQuery({...t,data:i}),i)}})}updateFragment(t,n){return this.batch({update(r){const o=r.readFragment(t),i=n(o);return null==i?o:(r.writeFragment({...t,data:i}),i)}})}toCacheId(t){return"string"==typeof t?t:this.identify(t)}}const CM=Object.freeze({data:null,dataState:"complete",complete:!0}),sae=Object.assign(new Ot(e=>{e.next(CM)}),{dirty:!1,getCurrentResult:()=>CM}),yM=Object.freeze({data:[],dataState:"complete",complete:!0}),aae=Object.assign(new Ot(e=>{e.next(yM)}),{getCurrentResult:()=>yM});function fi(e){return null!==e&&"object"==typeof e}const{hasOwnProperty:lae}=Object.prototype,cae=function(e,t,n){return this.merge(e[n],t[n])},bM=e=>isNaN(+e)?{}:[];class Nd{options;reconciler;constructor(t={}){this.options=t,this.reconciler=t.reconciler||cae}merge(t,n,r={}){const o=r.atPath;if(o?.length){const[i,...s]=o;void 0===t&&(t=bM(i));let a=t[i];void 0===a&&s.length&&(a=bM(s[0]));const l=this.merge(a,n,{...r,atPath:s});return a!==l&&((t=this.shallowCopyForMerge(t))[i]=l),t}return Array.isArray(t)&&Array.isArray(n)&&"truncate"===this.options.arrayMerge&&t.length>n.length&&(t=t.slice(0,n.length),this.pastCopies.add(t)),fi(n)&&fi(t)?(Object.keys(n).forEach(i=>{if(lae.call(t,i)){const s=t[i];if(n[i]!==s){const a=this.reconciler(t,n,i);a!==s&&((t=this.shallowCopyForMerge(t))[i]=a)}}else(t=this.shallowCopyForMerge(t))[i]=n[i]}),t):n}isObject=fi;pastCopies=new Set;shallowCopyForMerge(t){return fi(t)&&(this.pastCopies.has(t)||(t=Array.isArray(t)?t.slice(0):{__proto__:Object.getPrototypeOf(t),...t},this.pastCopies.add(t))),t}}function kd(e){return{__ref:String(e)}}function su(...e){const t={};return e.forEach(n=>{n&&Reflect.ownKeys(n).forEach(r=>{const o=n[r];void 0!==o&&(t[r]=o)})}),t}const vo=Array.isArray,{hasOwnProperty:jo}=Object.prototype;function TM({__typename:e,id:t,_id:n},r){if("string"==typeof e&&(r&&(r.keyObject=null!=t?{id:t}:null!=n?{_id:n}:void 0),null==t&&null!=n&&(t=n),null!=t))return`${e}:${"number"==typeof t||"string"==typeof t?t:JSON.stringify(t)}`}const _ae={dataIdFromObject:TM,resultCaching:!0},EM=/^[_a-z][_0-9a-z]*/i;function $l(e){const t=e.match(EM);return t?t[0]:e}function I3(e,t,n){return!!fi(t)&&(vo(t)?t.every(r=>I3(e,r,n)):e.selections.every(r=>{if(gf(r)&&O0(r,n)){const o=iu(r);return jo.call(t,o)&&(!r.selectionSet||I3(r.selectionSet,t[o],n))}return!0}))}function Rd(e){return fi(e)&&!lr(e)&&!vo(e)}function IM(e,t){const n=ff(pf(e));return{fragmentMap:n,lookupFragment(r){let o=n[r];return!o&&t&&(o=t.lookup(r)),o||null}}}const F0={},S3=()=>F0,SM={};class H0{policies;group;data={};constructor(t,n){this.policies=t,this.group=n}toObject(){return{...this.data}}has(t){return void 0!==this.lookup(t,!0)}get(t,n){if(this.group.depend(t,n),jo.call(this.data,t)){const r=this.data[t];if(r&&jo.call(r,n))return r[n]}return"__typename"===n&&jo.call(this.policies.rootTypenamesById,t)?this.policies.rootTypenamesById[t]:this instanceof ia?this.parent.get(t,n):void 0}lookup(t,n){return n&&this.group.depend(t,"__exists"),jo.call(this.data,t)?this.data[t]:this instanceof ia?this.parent.lookup(t,n):this.policies.rootTypenamesById[t]?{}:void 0}merge(t,n){let r;lr(t)&&(t=t.__ref),lr(n)&&(n=n.__ref);const o="string"==typeof t?this.lookup(r=t):t,i="string"==typeof n?this.lookup(r=n):n;if(!i)return;Rt("string"==typeof r,99);const s=new Nd({reconciler:vae}).merge(o,i);if(this.data[r]=s,s!==o&&(delete this.refs[r],this.group.caching)){const a={};o||(a.__exists=1),Object.keys(i).forEach(l=>{if(!o||o[l]!==s[l]){a[l]=1;const c=$l(l);c!==l&&!this.policies.hasKeyArgs(s.__typename,c)&&(a[c]=1),void 0===s[l]&&!(this instanceof ia)&&delete s[l]}}),a.__typename&&!(o&&o.__typename)&&this.policies.rootTypenamesById[r]===s.__typename&&delete a.__typename,Object.keys(a).forEach(l=>this.group.dirty(r,l))}}modify(t,n,r){const o=this.lookup(t);if(o){const i={};let s=!1,a=!0;const l={DELETE:F0,INVALIDATE:SM,isReference:lr,toReference:this.toReference,canRead:this.canRead,readField:(c,u)=>this.policies.readField("string"==typeof c?{fieldName:c,from:u||kd(t)}:c,{store:this})};if(Object.keys(o).forEach(c=>{const u=$l(c);let d=o[c];if(void 0===d)return;const f="function"==typeof n?n:n[c]||(r?void 0:n[u]);if(f){let C=f===S3?F0:f(d,{...l,fieldName:u,storeFieldName:c,storage:this.getStorage(t,c)});if(C===SM)this.group.dirty(t,c);else if(C===F0&&(C=void 0),C!==d&&(i[c]=C,s=!0,d=C,false)){const P=G=>{if(void 0===this.lookup(G.__ref))return!0};if(lr(C))P(C);else if(Array.isArray(C)){let W,G=!1;for(const ie of C){if(lr(ie)){if(G=!0,P(ie))break}else if("object"==typeof ie&&ie){const[he]=this.policies.identify(ie);he&&(W=ie)}if(G&&void 0!==W)break}}}}void 0!==d&&(a=!1)}),s)return this.merge(t,i),a&&(this instanceof ia?this.data[t]=void 0:delete this.data[t],this.group.dirty(t,"__exists")),!0}return!1}delete(t,n,r){const o=this.lookup(t);if(o){const i=this.getFieldValue(o,"__typename"),s=n&&r?this.policies.getStoreFieldName({typename:i,fieldName:n,args:r}):n;return this.modify(t,s?{[s]:S3}:S3,!!r)}return!1}evict(t,n){let r=!1;return t.id&&(jo.call(this.data,t.id)&&(r=this.delete(t.id,t.fieldName,t.args)),this instanceof ia&&this!==n&&(r=this.parent.evict(t,n)||r),(t.fieldName||r)&&this.group.dirty(t.id,t.fieldName||"__exists")),r}clear(){this.replace(null)}extract(){const t=this.toObject(),n=[];return this.getRootIdSet().forEach(r=>{jo.call(this.policies.rootTypenamesById,r)||n.push(r)}),n.length&&(t.__META={extraRootIds:n.sort()}),t}replace(t){if(Object.keys(this.data).forEach(n=>{t&&jo.call(t,n)||this.delete(n)}),t){const{__META:n,...r}=t;Object.keys(r).forEach(o=>{this.merge(o,r[o])}),n&&n.extraRootIds.forEach(this.retain,this)}}rootIds={};retain(t){return this.rootIds[t]=(this.rootIds[t]||0)+1}release(t){if(this.rootIds[t]>0){const n=--this.rootIds[t];return n||delete this.rootIds[t],n}return 0}getRootIdSet(t=new Set){return Object.keys(this.rootIds).forEach(t.add,t),this instanceof ia?this.parent.getRootIdSet(t):Object.keys(this.policies.rootTypenamesById).forEach(t.add,t),t}gc(){const t=this.getRootIdSet(),n=this.toObject();t.forEach(o=>{jo.call(n,o)&&(Object.keys(this.findChildRefIds(o)).forEach(t.add,t),delete n[o])});const r=Object.keys(n);if(r.length){let o=this;for(;o instanceof ia;)o=o.parent;r.forEach(i=>o.delete(i))}return r}refs={};findChildRefIds(t){if(!jo.call(this.refs,t)){const n=this.refs[t]={},r=this.data[t];if(!r)return n;const o=new Set([r]);o.forEach(i=>{lr(i)&&(n[i.__ref]=!0),fi(i)&&Object.keys(i).forEach(s=>{const a=i[s];fi(a)&&o.add(a)})})}return this.refs[t]}makeCacheKey(){return this.group.keyMaker.lookupArray(arguments)}getFieldValue=(t,n)=>lr(t)?this.get(t.__ref,n):t&&t[n];canRead=t=>lr(t)?this.has(t.__ref):"object"==typeof t;toReference=(t,n)=>{if("string"==typeof t)return kd(t);if(lr(t))return t;const[r]=this.policies.identify(t);if(r){const o=kd(r);return n&&this.merge(r,t),o}};get supportsResultCaching(){return this.group.caching}}class AM{caching;parent;d=null;keyMaker;constructor(t,n=null){this.caching=t,this.parent=n,this.resetCaching()}resetCaching(){this.d=this.caching?rM():null,this.keyMaker=new oa}depend(t,n){if(this.d){this.d(A3(t,n));const r=$l(n);r!==n&&this.d(A3(t,r)),this.parent&&this.parent.depend(t,n)}}dirty(t,n){this.d&&this.d.dirty(A3(t,n),"__exists"===n?"forget":"setDirty")}}function A3(e,t){return t+"#"+e}function wM(e,t){mf(e)&&e.group.depend(t,"__exists")}H0.Root=class gae extends H0{constructor({policies:t,resultCaching:n=!0,seed:r}){super(t,new AM(n)),r&&this.replace(r)}stump=new mae(this);addLayer(t,n){return this.stump.addLayer(t,n)}removeLayer(){return this}storageTrie=new oa;getStorage(){return this.storageTrie.lookupArray(arguments)}};class ia extends H0{id;parent;replay;group;constructor(t,n,r,o){super(n.policies,o),this.id=t,this.parent=n,this.replay=r,this.group=o,r(this)}addLayer(t,n){return new ia(t,this,n,this.group)}removeLayer(t){const n=this.parent.removeLayer(t);return t===this.id?(this.group.caching&&Object.keys(this.data).forEach(r=>{const o=this.data[r],i=n.lookup(r);i?o?o!==i&&Object.keys(o).forEach(s=>{$r(o[s],i[s])||this.group.dirty(r,s)}):(this.group.dirty(r,"__exists"),Object.keys(i).forEach(s=>{this.group.dirty(r,s)})):this.delete(r)}),n):n===this.parent?this:n.addLayer(this.id,this.replay)}toObject(){return{...this.parent.toObject(),...this.data}}findChildRefIds(t){const n=this.parent.findChildRefIds(t);return jo.call(this.data,t)?{...n,...super.findChildRefIds(t)}:n}getStorage(...t){let n=this.parent;for(;n.parent;)n=n.parent;return n.getStorage(...t)}}class mae extends ia{constructor(t){super("EntityStore.Stump",t,()=>{},new AM(t.group.caching,t.group))}removeLayer(){return this}merge(t,n){return this.parent.merge(t,n)}}function vae(e,t,n){const r=e[n],o=t[n];return $r(r,o)?r:o}function mf(e){return!(!e||!e.supportsResultCaching)}const w3=new D0;function Cae(e){const t=e.directives?.find(({name:r})=>"unmask"===r.value);if(!t)return"mask";const n=t.arguments?.find(({name:r})=>"mode"===r.value);return n&&"value"in n.value&&"migrate"===n.value.value?"migrate":"unmask"}const DM=Symbol.for("apollo.result.extensions"),ql=Symbol.for("apollo.result.streamInfo"),yae=Symbol.for("apollo.observableQuery.variablesUnknown");function Od(e,t,n,r){if(n.kind===wt.INT||n.kind===wt.FLOAT)e[t.value]=Number(n.value);else if(n.kind===wt.BOOLEAN||n.kind===wt.STRING)e[t.value]=n.value;else if(n.kind===wt.OBJECT){const o={};n.fields.map(i=>Od(o,i.name,i.value,r)),e[t.value]=o}else if(n.kind===wt.VARIABLE)e[t.value]=(r||{})[n.name.value];else if(n.kind===wt.LIST)e[t.value]=n.values.map(o=>{const i={};return Od(i,t,o,r),i[t.value]});else if(n.kind===wt.ENUM)e[t.value]=n.value;else{if(n.kind!==wt.NULL)throw rs(19,t.value,n.kind);e[t.value]=null}}function D3(e,t){if(e.arguments&&e.arguments.length){const n={};return e.arguments.forEach(({name:r,value:o})=>Od(n,r,o,t)),n}return null}const bae=["connection","include","skip","client","rest","export","nonreactive","stream"];let vf=Va;const LM=Object.assign(function(e,t,n){if(t&&n&&n.connection&&n.connection.key){if(n.connection.filter&&n.connection.filter.length>0){const o=n.connection.filter?n.connection.filter:[];o.sort();const i={};o.forEach(a=>{i[a]=t[a]});const s=vf(i);if("{}"!==s)return`${n.connection.key}(${s})`}return n.connection.key}let r=e;if(t){const o=vf(t);"{}"!==o&&(r+=`(${o})`)}return n&&Object.keys(n).forEach(o=>{-1===bae.indexOf(o)&&(n[o]&&Object.keys(n[o]).length?r+=`@${o}(${vf(n[o])})`:r+=`@${o}`)}),r},{setStringify(e){const t=vf;return vf=e,t}});function L3(e){return Array.isArray(e)&&e.length>0}const xM={};function x3(e){const t=JSON.stringify(e);return xM[t]||(xM[t]={})}function MM(e){const t=x3(e);return t.keyFieldsFn||(t.keyFieldsFn=(n,r)=>{const o=(s,a)=>r.readField(a,s),i=r.keyObject=M3(e,s=>{let a=Pd(r.storeObject,s,o);return void 0===a&&n!==r.storeObject&&jo.call(n,s[0])&&(a=Pd(n,s,RM)),Rt(void 0!==a,102,s.join("."),n),a});return`${r.typename}:${JSON.stringify(i)}`})}function NM(e){const t=x3(e);return t.keyArgsFn||(t.keyArgsFn=(n,{field:r,variables:o,fieldName:i})=>{const s=M3(e,l=>{const c=l[0],u=c.charAt(0);if("@"!==u){if("$"===u){const d=c.slice(1);if(o&&jo.call(o,d)){const f=l.slice(0);return f[0]=d,Pd(o,f)}return}if(n)return Pd(n,l)}else if(r&&L3(r.directives)){const d=c.slice(1),f=r.directives.find(P=>P.name.value===d),C=f&&D3(f,o);return C&&Pd(C,l.slice(1))}}),a=JSON.stringify(s);return(n||"{}"!==a)&&(i+=":"+a),i})}function M3(e,t){const n=new Nd;return kM(e).reduce((r,o)=>{let i=t(o);if(void 0!==i){for(let s=o.length-1;s>=0;--s)i={[o[s]]:i};r=n.merge(r,i)}return r},{})}function kM(e){const t=x3(e);if(!t.paths){const n=t.paths=[],r=[];e.forEach((o,i)=>{vo(o)?(kM(o).forEach(s=>n.push(r.concat(s))),r.length=0):(r.push(o),vo(e[i+1])||(n.push(r.slice(0)),r.length=0))})}return t.paths}function RM(e,t){return e[t]}function Pd(e,t,n){return n=n||RM,OM(t.reduce(function r(o,i){return vo(o)?o.map(s=>r(s,i)):o&&n(o,i)},e))}function OM(e){return fi(e)?vo(e)?e.map(OM):M3(Object.keys(e).sort(),t=>Pd(e,t)):e}const PM=new D0,BM=new WeakMap;function Cf(e){let t=BM.get(e);return t||BM.set(e,t={vars:new Set,dep:rM()}),t}function FM(e){Cf(e).vars.forEach(t=>t.forgetCache(e))}function Iae(e){const t=new Set,n=new Set,r=function(i){if(arguments.length>0){if(e!==i){e=i,t.forEach(a=>{Cf(a).dep.dirty(r),function Sae(e){e.broadcastWatches&&e.broadcastWatches()}(a)});const s=Array.from(n);n.clear(),s.forEach(a=>a(e))}}else{const s=PM.getValue();s&&(o(s),Cf(s).dep(r))}return e};r.onNextChange=i=>(n.add(i),()=>{n.delete(i)});const o=r.attachCache=i=>(t.add(i),Cf(i).vars.add(r),r);return r.forgetCache=i=>t.delete(i),r}function N3(e){return void 0!==e.args?e.args:e.field?D3(e.field,e.variables):null}const Aae=()=>{},HM=(e,t)=>t.fieldName,UM=(e,t,{mergeObjects:n})=>n(e,t),VM=(e,t)=>t,wae=(e,t,{streamFieldInfo:n,existingData:r})=>{if(!e&&!r)return t;const o=[],i=e??r,s=n?.isLastChunk?t.length:Math.max(i.length,t.length);for(let a=0;a<s;a++)o[a]=void 0===t[a]?i[a]:t[a];return o};class Dae{config;typePolicies={};toBeAdded={};supertypeMap=new Map;fuzzySubtypes=new Map;cache;rootIdsByTypename={};rootTypenamesById={};usingPossibleTypes=!1;constructor(t){this.config=t,this.config={dataIdFromObject:TM,...t},this.cache=this.config.cache,this.setRootTypename("Query"),this.setRootTypename("Mutation"),this.setRootTypename("Subscription"),t.possibleTypes&&this.addPossibleTypes(t.possibleTypes),t.typePolicies&&this.addTypePolicies(t.typePolicies)}identify(t,n){const r=this,o=n&&(n.typename||n.storeObject?.__typename)||t.__typename;if(o===this.rootTypenamesById.ROOT_QUERY)return["ROOT_QUERY"];const i=n&&n.storeObject||t,s={...n,typename:o,storeObject:i,readField:n&&n.readField||((...u)=>{const d=k3(u,i);return r.readField(d,{store:r.cache.data,variables:d.variables})})};let a;const l=o&&this.getTypePolicy(o);let c=l&&l.keyFn||this.config.dataIdFromObject;return w3.withValue(!0,()=>{for(;c;){const u=c({...t,...i},s);if(!vo(u)){a=u;break}c=MM(u)}}),a=a?String(a):void 0,s.keyObject?[a,s.keyObject]:[a]}addTypePolicies(t){Object.keys(t).forEach(n=>{const{queryType:r,mutationType:o,subscriptionType:i,...s}=t[n];r&&this.setRootTypename("Query",n),o&&this.setRootTypename("Mutation",n),i&&this.setRootTypename("Subscription",n),jo.call(this.toBeAdded,n)?this.toBeAdded[n].push(s):this.toBeAdded[n]=[s]})}updateTypePolicy(t,n,r){const o=this.getTypePolicy(t),{keyFields:i,fields:s}=n;function a(l,c){l.merge="function"==typeof c?c:!0===c?UM:!1===c?VM:l.merge}a(o,n.merge),o.keyFn=!1===i?Aae:vo(i)?MM(i):"function"==typeof i?i:o.keyFn,s&&Object.keys(s).forEach(l=>{let c=r[l];(!c||c?.typename!==t)&&(c=r[l]={typename:t});const u=s[l];if("function"==typeof u)c.read=u;else{const{keyArgs:d,read:f,merge:C}=u;c.keyFn=!1===d?HM:vo(d)?NM(d):"function"==typeof d?d:c.keyFn,"function"==typeof f&&(c.read=f),a(c,C)}c.read&&c.merge&&(c.keyFn=c.keyFn||HM)})}setRootTypename(t,n=t){const r="ROOT_"+t.toUpperCase(),o=this.rootTypenamesById[r];n!==o&&(Rt(!o||o===t,103,t),o&&delete this.rootIdsByTypename[o],this.rootIdsByTypename[n]=r,this.rootTypenamesById[r]=n)}addPossibleTypes(t){this.usingPossibleTypes=!0,Object.keys(t).forEach(n=>{this.getSupertypeSet(n,!0),t[n].forEach(r=>{this.getSupertypeSet(r,!0).add(n);const o=r.match(EM);(!o||o[0]!==r)&&this.fuzzySubtypes.set(r,new RegExp(r))})})}getTypePolicy(t){if(!jo.call(this.typePolicies,t)){const r=this.typePolicies[t]={};r.fields={};let o=this.supertypeMap.get(t);!o&&this.fuzzySubtypes.size&&(o=this.getSupertypeSet(t,!0),this.fuzzySubtypes.forEach((i,s)=>{if(i.test(t)){const a=this.supertypeMap.get(s);a&&a.forEach(l=>o.add(l))}})),o&&o.size&&o.forEach(i=>{const{fields:s,...a}=this.getTypePolicy(i);Object.assign(r,a),Object.assign(r.fields,s)})}const n=this.toBeAdded[t];return n&&n.length&&n.splice(0).forEach(r=>{this.updateTypePolicy(t,r,this.typePolicies[t].fields)}),this.typePolicies[t]}getFieldPolicy(t,n){if(t)return this.getTypePolicy(t).fields[n]}getSupertypeSet(t,n){let r=this.supertypeMap.get(t);return!r&&n&&this.supertypeMap.set(t,r=new Set),r}fragmentMatches(t,n,r,o){if(!t.typeCondition)return!0;if(!n)return!1;const i=t.typeCondition.name.value;if(n===i)return!0;if(this.usingPossibleTypes&&this.supertypeMap.has(i)){const s=this.getSupertypeSet(n,!0),a=[s],l=d=>{const f=this.getSupertypeSet(d,!1);f&&f.size&&a.indexOf(f)<0&&a.push(f)};let c=!(!r||!this.fuzzySubtypes.size),u=!1;for(let d=0;d<a.length;++d){const f=a[d];if(f.has(i))return s.has(i)||s.add(i),!0;f.forEach(l),c&&d===a.length-1&&I3(t.selectionSet,r,o)&&(c=!1,u=!0,this.fuzzySubtypes.forEach((C,P)=>{const G=n.match(C);G&&G[0]===n&&l(P)}))}}return!1}hasKeyArgs(t,n){const r=this.getFieldPolicy(t,n);return!(!r||!r.keyFn)}getStoreFieldName(t){const{typename:n,fieldName:r}=t,o=this.getFieldPolicy(n,r);let i,s=o&&o.keyFn;if(s&&n){const a={typename:n,fieldName:r,field:t.field||null,variables:t.variables},l=N3(t);for(;s;){const c=s(l,a);if(!vo(c)){i=c||r;break}s=NM(c)}}return void 0===i&&(i=t.field?function Tae(e,t){let n=null;e.directives&&(n={},e.directives.forEach(o=>{n[o.name.value]={},o.arguments&&o.arguments.forEach(({name:i,value:s})=>Od(n[o.name.value],i,s,t))}));let r=null;return e.arguments&&e.arguments.length&&(r={},e.arguments.forEach(({name:o,value:i})=>Od(r,o,i,t))),LM(e.name.value,r,n)}(t.field,t.variables):LM(r,N3(t))),!1===i?r:r===$l(i)?i:r+":"+i}readField(t,n){const r=t.from;if(!r||!t.field&&!t.fieldName)return;if(void 0===t.typename){const u=n.store.getFieldValue(r,"__typename");u&&(t.typename=u)}const i=this.getStoreFieldName(t),s=$l(i),a=n.store.getFieldValue(r,i),l=this.getFieldPolicy(t.typename,s),c=l&&l.read;if(c){const u=zM(this,r,t,n,n.store.getStorage(lr(r)?r.__ref:r,i));return PM.withValue(this.cache,c,[a,u])}return a}getReadFunction(t,n){const r=this.getFieldPolicy(t,n);return r&&r.read}getMergeFunction(t,n,r){let o=this.getFieldPolicy(t,n),i=o&&o.merge;return!i&&r&&(o=this.getTypePolicy(r),i=o&&o.merge),i}runMergeFunction(t,n,{field:r,typename:o,merge:i,path:s},a,l){const c=t;if(i===UM)return jM(a.store)(t,n);if(i===VM)return n;a.overwrite&&(t=void 0);const u=a.extensions?.[ql]?.deref()?.peekArray(s);if(u){const{current:f,previous:C}=u;if(C&&$r(C.incoming,n)&&$r(C.streamFieldInfo,f))return C.result}const d=i(t,n,function Lae(e,t,n,r,o,i){const s={...zM(e,t,n,r,o),extensions:r.extensions,existingData:i},a=r.extensions;if(a&&ql in a){const{[ql]:l,...c}=a,u=l?.deref()?.peekArray(n.path);u&&(s.streamFieldInfo=u.current),s.extensions=0===Object.keys(c).length?void 0:c}return s}(this,void 0,{typename:o,fieldName:r.name.value,field:r,variables:a.variables,path:s},a,l||{},c));return u&&(u.previous={incoming:n,streamFieldInfo:u.current,result:d}),d}}function zM(e,t,n,r,o){const i=e.getStoreFieldName(n),s=$l(i),a=n.variables||r.variables,{toReference:l,canRead:c}=r.store;return{args:N3(n),field:n.field||null,fieldName:s,storeFieldName:i,variables:a,isReference:lr,toReference:l,storage:o,cache:e.cache,canRead:c,readField:(...u)=>e.readField(k3(u,t,a),r),mergeObjects:jM(r.store)}}function k3(e,t,n){const{0:r,1:o,length:i}=e;let s;return"string"==typeof r?s={fieldName:r,from:i>1?o:t}:(s={...r},jo.call(s,"from")||(s.from=t)),void 0===s.variables&&(s.variables=n),s}function jM(e){return function(n,r){if(vo(n)||vo(r))throw rs(106);if(fi(n)&&fi(r)){const o=e.getFieldValue(n,"__typename"),i=e.getFieldValue(r,"__typename");if(o&&i&&o!==i)return r;if(lr(n)&&Rd(r))return e.merge(n.__ref,r),n;if(Rd(n)&&lr(r))return e.merge(n,r.__ref),r;if(Rd(n)&&Rd(r))return{...n,...r}}return r}}function R3(e){const t={},n=e&&e.variableDefinitions;return n&&n.length&&n.forEach(r=>{r.defaultValue&&Od(t,r.variable.name,r.defaultValue)}),t}function GM(e){const t=Ha(e);return Rt(t&&"query"===t.operation,13),t}function xae(e){let t=e[0]||{};const n=e.length;if(n>1){const r=new Nd;for(let o=1;o<n;++o)t=r.merge(t,e[o])}return t}class O3 extends Error{message;path;query;variables;constructor(t,n,r,o){if(super(t),this.message=t,this.path=n,this.query=r,this.variables=o,this.name="MissingFieldError",Array.isArray(this.path)){this.missing=this.message;for(let i=this.path.length-1;i>=0;--i)this.missing={[this.path[i]]:this.missing}}else this.missing=this.path;this.__proto__=O3.prototype}missing}function $M(e){return[e.selectionSet,e.objectOrReference,e.context]}class Mae{executeSelectionSet;executeSubSelectedArray;config;knownResults=new WeakMap;constructor(t){this.config=t,this.executeSelectionSet=lf(n=>{const r=$M(n);return this.executeSelectionSet.peek(...r)||(wM(n.context.store,n.enclosingRef.__ref),this.execSelectionSetImpl(n))},{max:Fa["inMemoryCache.executeSelectionSet"]||5e4,keyArgs:$M,makeCacheKey(n,r,o){if(mf(o.store))return o.store.makeCacheKey(n,lr(r)?r.__ref:r,o.varString)}}),this.executeSubSelectedArray=lf(n=>(wM(n.context.store,n.enclosingRef.__ref),this.execSubSelectedArrayImpl(n)),{max:Fa["inMemoryCache.executeSubSelectedArray"]||1e4,makeCacheKey({field:n,array:r,context:o}){if(mf(o.store))return o.store.makeCacheKey(n,r,o.varString)}})}diffQueryAgainstStore({store:t,query:n,rootId:r="ROOT_QUERY",variables:o,returnPartialData:i=!0}){const s=this.config.cache.policies;o={...R3(GM(n)),...o};const a=kd(r),l=this.executeSelectionSet({selectionSet:E3(n).selectionSet,objectOrReference:a,enclosingRef:a,context:{store:t,query:n,policies:s,variables:o,varString:Va(o),...IM(n,this.config.fragments)}});let c;l.missing&&(c=new O3(function Nae(e){try{JSON.stringify(e,(t,n)=>{if("string"==typeof n)throw n;return n})}catch(t){return t}}(l.missing),l.missing,n,o));const u=!c,{result:d}=l;return{result:u?d:i?0===Object.keys(d).length?null:d:null,complete:u,missing:c}}isFresh(t,n,r,o){if(mf(o.store)&&this.knownResults.get(t)===r){const i=this.executeSelectionSet.peek(r,n,o);if(i&&t===i.result)return!0}return!1}execSelectionSetImpl({selectionSet:t,objectOrReference:n,enclosingRef:r,context:o}){if(lr(n)&&!o.policies.rootTypenamesById[n.__ref]&&!o.store.has(n.__ref))return{result:{},missing:`Dangling reference to missing ${n.__ref} object`};const{variables:i,policies:s,store:a}=o,l=a.getFieldValue(n,"__typename"),c=[];let u;const d=new Nd;function f(ie,he){return ie.missing&&(u=d.merge(u,{[he]:ie.missing})),ie.result}"string"==typeof l&&!s.rootIdsByTypename[l]&&c.push({__typename:l});const C=new Set(t.selections);C.forEach(ie=>{if(O0(ie,i))if(gf(ie)){let he=s.readField({fieldName:ie.name.value,field:ie,variables:o.variables,from:n},o);const qe=iu(ie);void 0===he?h3.added(ie)||(u=d.merge(u,{[qe]:`Can't find field '${ie.name.value}' on ${lr(n)?n.__ref+" object":"object "+JSON.stringify(n,null,2)}`})):vo(he)?he.length>0&&(he=f(this.executeSubSelectedArray({field:ie,array:he,enclosingRef:r,context:o}),qe)):ie.selectionSet&&null!=he&&(he=f(this.executeSelectionSet({selectionSet:ie.selectionSet,objectOrReference:he,enclosingRef:lr(he)?he:r,context:o}),qe)),void 0!==he&&c.push({[qe]:he})}else{const he=R0(ie,o.lookupFragment);if(!he&&ie.kind===wt.FRAGMENT_SPREAD)throw rs(107,ie.name.value);he&&s.fragmentMatches(he,l)&&he.selectionSet.selections.forEach(C.add,C)}});const W={result:xae(c),missing:u};return W.result&&this.knownResults.set(W.result,t),W}execSubSelectedArrayImpl({field:t,array:n,enclosingRef:r,context:o}){let i,s=new Nd;function a(l,c){return l.missing&&(i=s.merge(i,{[c]:l.missing})),l.result}return t.selectionSet&&(n=n.filter(l=>void 0===l||o.store.canRead(l))),{result:n=n.map((l,c)=>null===l?null:vo(l)?a(this.executeSubSelectedArray({field:t,array:l,enclosingRef:r,context:o}),c):t.selectionSet?a(this.executeSelectionSet({selectionSet:t.selectionSet,objectOrReference:l,enclosingRef:lr(l)?l:r,context:o}),c):l),missing:i}}}function Bd(e,t,n){const r=new Set(e),o=r.size;return ra(t,{Directive(i){if(r.delete(i.name.value)&&(!n||!r.size))return Vl}}),n?!r.size:r.size<o}function B3(e,t,n){const r=`${t}${n}`;let o=e.flavors.get(r);return o||e.flavors.set(r,o=e.clientOnly===t&&e.deferred===n?e:{...e,clientOnly:t,deferred:n}),o}class Pae{cache;reader;fragments;constructor(t,n,r){this.cache=t,this.reader=n,this.fragments=r}writeToStore(t,{query:n,result:r,dataId:o,variables:i,overwrite:s,extensions:a}){const l=Ha(n),c=function pae(){return new Nd}();i={...R3(l),...i};const u={store:t,written:{},merge:(f,C)=>c.merge(f,C),variables:i,varString:Va(i),...IM(n,this.fragments),overwrite:!!s,incomingById:new Map,clientOnly:!1,deferred:!1,flavors:new Map,extensions:a},d=this.processSelectionSet({result:r||{},dataId:o,selectionSet:l.selectionSet,mergeTree:{map:new Map},context:u,path:[]});if(!lr(d))throw rs(109,r);return u.incomingById.forEach(({storeObject:f,mergeTree:C},G)=>{const W=kd(G);if(C&&C.map.size){const ie=this.applyMerges(C,W,f,u);if(lr(ie))return;f=ie}t.merge(G,f)}),t.retain(d.__ref),d}processSelectionSet({dataId:t,result:n,selectionSet:r,context:o,mergeTree:i,path:s}){const{policies:a}=this.cache;let l={};const c=t&&a.rootTypenamesById[t]||H3(n,r,o.fragmentMap)||t&&o.store.get(t,"__typename");"string"==typeof c&&(l.__typename=c);const u=(...f)=>{const C=k3(f,l,o.variables);if(lr(C.from)){const P=o.incomingById.get(C.from.__ref);if(P){const G=a.readField({...C,from:P.storeObject},o);if(void 0!==G)return G}}return a.readField(C,o)},d=new Set;this.flattenFields(r,n,o,c).forEach((f,C)=>{const P=iu(C),G=n[P],W=[...s,C.name.value];if(d.add(C),void 0!==G){const ie=a.getStoreFieldName({typename:c,fieldName:C.name.value,field:C,variables:f.variables}),he=WM(i,ie);let st,qe=this.processFieldValue(G,C,C.selectionSet?B3(f,!1,!1):f,he,W);C.selectionSet&&(lr(qe)||Rd(qe))&&(st=u("__typename",qe));const St=a.getMergeFunction(c,C.name.value,st);St?he.info={field:C,typename:c,merge:St,path:W}:Bd(["stream"],C)&&Array.isArray(qe)&&f.extensions?.[ql]?he.info={field:C,typename:c,merge:wae,path:W}:ZM(i,ie),l=f.merge(l,{[ie]:qe})}});try{const[f,C]=a.identify(n,{typename:c,selectionSet:r,fragmentMap:o.fragmentMap,storeObject:l,readField:u});t=t||f,C&&(l=o.merge(l,C))}catch(f){if(!t)throw f}if("string"==typeof t){const f=kd(t),C=o.written[t]||(o.written[t]=[]);if(C.indexOf(r)>=0||(C.push(r),this.reader&&this.reader.isFresh(n,f,r,o)))return f;const P=o.incomingById.get(t);return P?(P.storeObject=o.merge(P.storeObject,l),P.mergeTree=F3(P.mergeTree,i),d.forEach(G=>P.fieldNodeSet.add(G))):o.incomingById.set(t,{storeObject:l,mergeTree:U0(i)?void 0:i,fieldNodeSet:d}),f}return l}processFieldValue(t,n,r,o,i){return n.selectionSet&&null!==t?vo(t)?t.map((s,a)=>{const l=this.processFieldValue(s,n,r,WM(o,a),[...i,a]);return ZM(o,a),l}):this.processSelectionSet({result:t,selectionSet:n.selectionSet,context:r,mergeTree:o,path:i}):t}flattenFields(t,n,r,o=H3(n,t,r.fragmentMap)){const i=new Map,{policies:s}=this.cache,a=new oa(!1);return function l(c,u){const d=a.lookup(c,u.clientOnly,u.deferred);d.visited||(d.visited=!0,c.selections.forEach(f=>{if(!O0(f,r.variables))return;let{clientOnly:C,deferred:P}=u;if(!(C&&P)&&L3(f.directives)&&f.directives.forEach(G=>{const W=G.name.value;if("client"===W&&(C=!0),"defer"===W){const ie=D3(G,r.variables);(!ie||!1!==ie.if)&&(P=!0)}}),gf(f)){const G=i.get(f);G&&(C=C&&G.clientOnly,P=P&&G.deferred),i.set(f,B3(r,C,P))}else{const G=R0(f,r.lookupFragment);if(!G&&f.kind===wt.FRAGMENT_SPREAD)throw rs(111,f.name.value);G&&s.fragmentMatches(G,o,n,r.variables)&&l(G.selectionSet,B3(r,C,P))}}))}(t,r),i}applyMerges(t,n,r,o,i){if(t.map.size&&!lr(r)){const s=vo(r)||!lr(n)&&!Rd(n)?void 0:n,a=r;let l;s&&!i&&(i=[lr(s)?s.__ref:s]);const c=(u,d)=>vo(u)?"number"==typeof d?u[d]:void 0:o.store.getFieldValue(u,String(d));t.map.forEach((u,d)=>{const f=c(s,d),C=c(a,d);if(void 0===C)return;i&&i.push(d);const P=this.applyMerges(u,f,C,o,i);P!==C&&(l=l||new Map,l.set(d,P)),i&&Rt(i.pop()===d)}),l&&(r=vo(a)?a.slice(0):{...a},l.forEach((u,d)=>{r[d]=u}))}return t.info?this.cache.policies.runMergeFunction(n,r,t.info,o,i&&o.store.getStorage(...i)):r}}const qM=[];function WM({map:e},t){return e.has(t)||e.set(t,qM.pop()||{map:new Map}),e.get(t)}function F3(e,t){if(e===t||!t||U0(t))return e;if(!e||U0(e))return t;const n=e.info&&t.info?{...e.info,...t.info}:e.info||t.info,r=e.map.size&&t.map.size,i={info:n,map:r?new Map:e.map.size?e.map:t.map};if(r){const s=new Set(t.map.keys());e.map.forEach((a,l)=>{i.map.set(l,F3(a,t.map.get(l))),s.delete(l)}),s.forEach(a=>{i.map.set(a,F3(t.map.get(a),e.map.get(a)))})}return i}function U0(e){return!e||!(e.info||e.map.size)}function ZM({map:e},t){const n=e.get(t);n&&U0(n)&&(qM.push(n),e.delete(t))}function H3(e,t,n){let r;for(const o of t.selections)if(gf(o)){if("__typename"===o.name.value)return e[iu(o)]}else r?r.push(o):r=[o];if("string"==typeof e.__typename)return e.__typename;if(r)for(const o of r){const i=H3(e,R0(o,n).selectionSet,n);if("string"==typeof i)return i}}class KM extends vM{data;optimisticData;config;watches=new Set;storeReader;storeWriter;addTypenameTransform=new Ua(h3);maybeBroadcastWatch;assumeImmutableResults=!0;policies;makeVar=Iae;constructor(t={}){super(),this.config=function hae(e){return su(_ae,e)}(t),this.policies=new Dae({cache:this,dataIdFromObject:this.config.dataIdFromObject,possibleTypes:this.config.possibleTypes,typePolicies:this.config.typePolicies}),this.init()}init(){const t=this.data=new H0.Root({policies:this.policies,resultCaching:this.config.resultCaching});this.optimisticData=t.stump,this.resetResultCache()}resetResultCache(){const{fragments:t}=this.config;this.addTypenameTransform.resetCache(),t?.resetCaches(),this.storeWriter=new Pae(this,this.storeReader=new Mae({cache:this,fragments:t}),t),this.maybeBroadcastWatch=lf((n,r)=>this.broadcastWatch(n,r),{max:Fa["inMemoryCache.maybeBroadcastWatch"]||5e3,makeCacheKey:n=>{const r=n.optimistic?this.optimisticData:this.data;if(mf(r)){const{optimistic:o,id:i,variables:s}=n;return r.makeCacheKey(n.query,n.callback,Va({optimistic:o,id:i,variables:s}))}}}),new Set([this.data.group,this.optimisticData.group]).forEach(n=>n.resetCaching())}restore(t){return this.init(),t&&this.data.replace(t),this}extract(t=!1){return(t?this.optimisticData:this.data).extract()}read(t){const{returnPartialData:n=!1}=t;return this.storeReader.diffQueryAgainstStore({...t,store:t.optimistic?this.optimisticData:this.data,config:this.config,returnPartialData:n}).result}write(t){try{return++this.txCount,this.storeWriter.writeToStore(this.data,t)}finally{! --this.txCount&&!1!==t.broadcast&&this.broadcastWatches()}}modify(t){if(jo.call(t,"id")&&!t.id)return!1;const n=t.optimistic?this.optimisticData:this.data;try{return++this.txCount,n.modify(t.id||"ROOT_QUERY",t.fields,!1)}finally{! --this.txCount&&!1!==t.broadcast&&this.broadcastWatches()}}diff(t){return this.storeReader.diffQueryAgainstStore({...t,store:t.optimistic?this.optimisticData:this.data,rootId:t.id||"ROOT_QUERY",config:this.config})}watch(t){return this.watches.size||function Eae(e){Cf(e).vars.forEach(t=>t.attachCache(e))}(this),this.watches.add(t),t.immediate&&this.maybeBroadcastWatch(t),()=>{this.watches.delete(t)&&!this.watches.size&&FM(this),this.maybeBroadcastWatch.forget(t)}}gc(t){Va.reset(),df.reset();const n=this.optimisticData.gc();return t&&!this.txCount&&t.resetResultCache&&this.resetResultCache(),n}retain(t,n){return(n?this.optimisticData:this.data).retain(t)}release(t,n){return(n?this.optimisticData:this.data).release(t)}identify(t){if(lr(t))return t.__ref;try{return this.policies.identify(t)[0]}catch(n){}}evict(t){if(!t.id){if(jo.call(t,"id"))return!1;t={...t,id:"ROOT_QUERY"}}try{return++this.txCount,this.optimisticData.evict(t,this.data)}finally{! --this.txCount&&!1!==t.broadcast&&this.broadcastWatches()}}reset(t){return this.init(),Va.reset(),t&&t.discardWatches?(this.watches.forEach(n=>this.maybeBroadcastWatch.forget(n)),this.watches.clear(),FM(this)):this.broadcastWatches(),Promise.resolve()}removeOptimistic(t){const n=this.optimisticData.removeLayer(t);n!==this.optimisticData&&(this.optimisticData=n,this.broadcastWatches())}txCount=0;batch(t){const{update:n,optimistic:r=!0,removeOptimistic:o,onWatchUpdated:i}=t;let s;const a=c=>{const{data:u,optimisticData:d}=this;++this.txCount,c&&(this.data=this.optimisticData=c);try{return s=n(this)}finally{--this.txCount,this.data=u,this.optimisticData=d}},l=new Set;return i&&!this.txCount&&this.broadcastWatches({...t,onWatchUpdated:c=>(l.add(c),!1)}),"string"==typeof r?this.optimisticData=this.optimisticData.addLayer(r,a):!1===r?a(this.data):a(),"string"==typeof o&&(this.optimisticData=this.optimisticData.removeLayer(o)),i&&l.size?(this.broadcastWatches({...t,onWatchUpdated(c,u){const d=i.call(this,c,u);return!1!==d&&l.delete(c),d}}),l.size&&l.forEach(c=>this.maybeBroadcastWatch.dirty(c))):this.broadcastWatches(t),s}performTransaction(t,n){return this.batch({update:t,optimistic:n||null!==n})}transformDocument(t){return this.addTypenameTransform.transformDocument(this.addFragmentsToDocument(t))}fragmentMatches(t,n){return this.policies.fragmentMatches(t,n)}lookupFragment(t){return this.config.fragments?.lookup(t)||null}resolvesClientField(t,n){return!!this.policies.getReadFunction(t,n)}broadcastWatches(t){if(!this.txCount){const n=this.onAfterBroadcast,r=new Set;this.onAfterBroadcast=o=>{r.add(o)};try{this.watches.forEach(o=>this.maybeBroadcastWatch(o,t)),r.forEach(o=>o())}finally{this.onAfterBroadcast=n}}}addFragmentsToDocument(t){const{fragments:n}=this.config;return n?n.transform(t):t}broadcastWatch(t,n){const{lastDiff:r}=t,o=this.diff(t);n&&(t.optimistic&&"string"==typeof n.optimistic&&(o.fromOptimisticTransaction=!0),n.onWatchUpdated&&!1===n.onWatchUpdated.call(this,t,o,r))||(!r||!$r(r.result,o.result))&&t.callback(t.lastDiff=o,r)}}class XM extends hi{constructor(t){super((n,r)=>{const{...o}=n;return Object.defineProperty(o,"client",{enumerable:!1,value:n.client}),new Ot(i=>{let s=!1;return Promise.resolve(o).then(a=>t(n.getContext(),a)).then(n.setContext).then(()=>{s||r(n).subscribe(i)}).catch(i.error.bind(i)),()=>{s=!0}})})}}class Fae{isIncrementalResult(t){return!1}prepareRequest(t){return Rt(!Bd(["defer","stream"],t.query),67),t}extractErrors(){}startRequest=void 0}const U3=hi.execute;function V3(e,t){return su(e,t,t.variables&&{variables:su({...e&&e.variables,...t.variables})})}function Hae(e){return ra(e,{FragmentSpread(t){if(!t.directives?.some(({name:n})=>"unmask"===n.value))return null}})}function Wl(e,t){const n=Ke(e)?e:()=>e,r=o=>o.error(n());return new Ot(t?o=>t.schedule(r,0,o):r)}function za(e){return Ri((t,n)=>{let i,r=null,o=!1;r=t.subscribe(Zi(n,void 0,void 0,s=>{i=vs(e(s,za(e)(t))),r?(r.unsubscribe(),r=null,i.subscribe(n)):o=!0})),o&&(r.unsubscribe(),r=null,i.subscribe(n))})}class ja{constructor(t,n,r){this.kind=t,this.value=n,this.error=r,this.hasValue="N"===t}observe(t){return function Vae(e,t){var n,r,o;const{kind:i,value:s,error:a}=e;if("string"!=typeof i)throw new TypeError('Invalid notification, missing "kind"');"N"===i?null===(n=t.next)||void 0===n||n.call(t,s):"E"===i?null===(r=t.error)||void 0===r||r.call(t,a):null===(o=t.complete)||void 0===o||o.call(t)}(this,t)}do(t,n,r){const{kind:o,value:i,error:s}=this;return"N"===o?t?.(i):"E"===o?n?.(s):r?.()}accept(t,n,r){var o;return Ke(null===(o=t)||void 0===o?void 0:o.next)?this.observe(t):this.do(t,n,r)}toObservable(){const{kind:t,value:n,error:r}=this,o="N"===t?Ks(n):"E"===t?Wl(()=>r):"C"===t?Ul:0;if(!o)throw new TypeError(`Unexpected notification kind ${t}`);return o}static createNext(t){return new ja("N",t)}static createError(t){return new ja("E",void 0,t)}static createComplete(){return ja.completeNotification}}function QM(e=1/0){return Ll(xt,e)}function yf(...e){return function jae(){return QM(1)}()(Ys(e,O2(e)))}function z3(e,t){return"object"==typeof e&&null!==e&&e[Symbol.for("apollo.error")]===t}function j3(e){Object.defineProperty(e,Symbol.for("apollo.error"),{value:e.name,enumerable:!1,writable:!1,configurable:!1})}function JM(e){return e.filter(t=>t).map(t=>t.message||"Error message not found.").join("\n")}ja.completeNotification=new ja("C");let bf=(()=>{class e extends Error{static is(n){return z3(n,"CombinedGraphQLErrors")}static formatMessage=JM;errors;data;extensions;constructor(n,r=n.errors||[]){super(e.formatMessage(r,{result:n,defaultFormatMessage:JM})),this.errors=r,this.data=n.data,this.extensions=n.extensions,this.name="CombinedGraphQLErrors",j3(this),Object.setPrototypeOf(this,e.prototype)}}return e})();function eN(e){return e.map(t=>t.message||"Error message not found.").join("\n")}let Gae=(()=>{class e extends Error{static is(n){return z3(n,"CombinedProtocolErrors")}static formatMessage=eN;errors;constructor(n){super(e.formatMessage(n,{defaultFormatMessage:eN})),this.name="CombinedProtocolErrors",this.errors=n,j3(this),Object.setPrototypeOf(this,e.prototype)}}return e})();class G3 extends Error{static is(t){return z3(t,"UnconventionalError")}constructor(t){super("An error of unexpected shape occurred.",{cause:t}),this.name="UnconventionalError",j3(this),Object.setPrototypeOf(this,G3.prototype)}}const $3=Symbol(),tN=new WeakSet;function nN(e,t,n){return w3.withValue(!0,()=>{const r=Tf(e,t,n,!1);return Object.isFrozen(e),r})}function Tf(e,t,n,r,o){const{knownChanged:i}=n,s=function Yae(e,t){if(t.has(e))return t.get(e);const n=Array.isArray(e)?[]:{};return t.set(e,n),n}(e,n.mutableTargets);if(Array.isArray(e)){for(const[a,l]of Array.from(e.entries())){if(null===l){s[a]=null;continue}const c=Tf(l,t,n,r,void 0);i.has(c)&&i.add(s),s[a]=c}return i.has(s)?s:e}for(const a of t.selections){let l;if(r&&i.add(s),a.kind===wt.FIELD){const c=iu(a),u=a.selectionSet;if(l=s[c]||e[c],void 0===l)continue;if(u&&null!==l){const d=Tf(e[c],u,n,r,void 0);i.has(d)&&(l=d)}s[c]=l}if(a.kind===wt.INLINE_FRAGMENT&&(!a.typeCondition||n.cache.fragmentMatches(a,e.__typename))&&(l=Tf(e,a.selectionSet,n,r,o)),a.kind===wt.FRAGMENT_SPREAD){const c=a.name.value,u=n.fragmentMap[c]||(n.fragmentMap[c]=n.cache.lookupFragment(c));Rt(u,39,c);const d=Cae(a);"mask"!==d&&(l=Tf(e,u.selectionSet,n,"migrate"===d,o))}i.has(l)&&i.add(s)}return"__typename"in e&&!("__typename"in s)&&(s.__typename=e.__typename),Object.keys(s).length!==Object.keys(e).length&&i.add(s),i.has(s)?s:e}function rN(e){return 7===e||8===e}function V0(e){return!rN(e)}function Fd(e){return!!e.errors?.length}function q3(e,t=()=>{}){return n=>new Ot(r=>{let o=t();return n.subscribe({next(i){let s;try{s=e(i,o)}catch(a){r.error(a)}void 0!==s&&r.next(s)},error(i){r.error(i)},complete(){r.complete()}})})}function Ef(e){const t={data:e.data};return e.error&&(t.error=e.error),t}function Jae(e){let t=!1;return ra(e,{Directive:{enter(n){if("client"===n.name.value&&n.arguments&&(t=n.arguments.some(r=>"always"===r.name.value&&"BooleanValue"===r.value.kind&&!0===r.value.value),t))return Vl}}}),t}function ele(e,t){zl(t);const n=oN(""),r=oN(""),o=W=>{for(let he,ie=0;ie<W.length&&(he=W[ie]);++ie)if(!vo(he)){if(he.kind===wt.OPERATION_DEFINITION)return n(he.name&&he.name.value);if(he.kind===wt.FRAGMENT_DEFINITION)return r(he.name.value)}return Rt.error(14),null};let i=0;for(let W=t.definitions.length-1;W>=0;--W)t.definitions[W].kind===wt.OPERATION_DEFINITION&&++i;const s=function tle(e){const t=new Map,n=new Map;return e.forEach(r=>{r&&(r.name?t.set(r.name,r):r.test&&n.set(r.test,r))}),r=>{let o=t.get(r.name.value);return!o&&n.size&&n.forEach((i,s)=>{s(r)&&(o=i)}),o}}(e),a=W=>L3(W)&&W.map(s).some(ie=>ie&&ie.remove),l=new Map;let c=!1;const u={enter(W){if(a(W.directives))return c=!0,null}},d=ra(t,{Field:u,InlineFragment:u,VariableDefinition:{enter:()=>!1},Variable:{enter(W,ie,he,qe,st){const St=o(st);St&&St.variables.add(W.name.value)}},FragmentSpread:{enter(W,ie,he,qe,st){if(a(W.directives))return c=!0,null;const St=o(st);St&&St.fragmentSpreads.add(W.name.value)}},FragmentDefinition:{enter(W,ie,he,qe){l.set(JSON.stringify(qe),W)},leave:(W,ie,he,qe)=>W===l.get(JSON.stringify(qe))?W:i>0&&W.selectionSet.selections.every(St=>St.kind===wt.FIELD&&"__typename"===St.name.value)?(r(W.name.value).removed=!0,c=!0,null):void 0},Directive:{leave(W){if(s(W))return c=!0,null}}});if(!c)return t;const f=W=>(W.transitiveVars||(W.transitiveVars=new Set(W.variables),W.removed||W.fragmentSpreads.forEach(ie=>{f(r(ie)).transitiveVars.forEach(he=>{W.transitiveVars.add(he)})})),W),C=new Set;d.definitions.forEach(W=>{W.kind===wt.OPERATION_DEFINITION?f(n(W.name&&W.name.value)).fragmentSpreads.forEach(ie=>{C.add(ie)}):W.kind===wt.FRAGMENT_DEFINITION&&0===i&&!r(W.name.value).removed&&C.add(W.name.value)}),C.forEach(W=>{f(r(W)).fragmentSpreads.forEach(ie=>{C.add(ie)})});const G={enter(W){if((W=>!(C.has(W)&&!r(W).removed))(W.name.value))return null}};return function nle(e){return iN(Ha(e)||function fM(e){Rt("Document"===e.kind,6),Rt(e.definitions.length<=1,7);const t=e.definitions[0];return Rt("FragmentDefinition"===t.kind,8),t}(e),ff(pf(e)))?null:e}(ra(d,{FragmentSpread:G,FragmentDefinition:G,OperationDefinition:{leave(W){if(W.variableDefinitions){const ie=f(n(W.name&&W.name.value)).transitiveVars;if(ie.size<W.variableDefinitions.length)return{...W,variableDefinitions:W.variableDefinitions.filter(he=>ie.has(he.variable.name.value))}}}}}))}function oN(e){const t=new Map;return function(r=e){let o=t.get(r);return o||t.set(r,o={variables:new Set,fragmentSpreads:new Set}),o}}function iN(e,t){return!e||e.selectionSet.selections.every(n=>n.kind===wt.FRAGMENT_SPREAD&&iN(t[n.name.value],t))}var bn=function(e){return e[e.loading=1]="loading",e[e.setVariables=2]="setVariables",e[e.fetchMore=3]="fetchMore",e[e.refetch=4]="refetch",e[e.poll=6]="poll",e[e.ready=7]="ready",e[e.error=8]="error",e[e.streaming=9]="streaming",e}(bn||{});function sN(e){return e.catch(()=>{}),e}const{assign:aN}=Object,Hd={loading:!0,networkStatus:bn.loading,data:void 0,dataState:"empty",partial:!0},W3={loading:!1,networkStatus:bn.ready,data:void 0,dataState:"empty",partial:!0};class Z3{options;queryName;variablesUnknown=!1;_lastWrite;get query(){return this.lastQuery}get variables(){return this.options.variables}unsubscribeFromCache;input;subject;isTornDown;queryManager;subscriptions=new Set;waitForNetworkResult;lastQuery;linkSubscription;pollingInfo;get networkStatus(){return this.subject.getValue().result.networkStatus}get cache(){return this.queryManager.cache}constructor({queryManager:t,options:n,transformedQuery:r=t.transform(n.query)}){this.queryManager=t,this.waitForNetworkResult="network-only"===n.fetchPolicy,this.isTornDown=!1,this.subscribeToMore=this.subscribeToMore.bind(this),this.maskResult=this.maskResult.bind(this);const{watchQuery:{fetchPolicy:o="cache-first"}={}}=t.defaultOptions,{fetchPolicy:i=o,initialFetchPolicy:s=("standby"===i?o:i)}=n;n[yae]&&(Rt("standby"===i,80),this.variablesUnknown=!0),this.lastQuery=r,this.options={...n,initialFetchPolicy:s,fetchPolicy:i,variables:this.getVariablesWithDefaults(n.variables)},this.initializeObservablesQueue(),this["@@observable"]=()=>this,Symbol.observable&&(this[Symbol.observable]=()=>this);const a=Ha(this.query);this.queryName=a&&a.name&&a.name.value}initializeObservablesQueue(){this.subject=new Dn({query:this.query,variables:this.variables,result:Hd,meta:{}});const t=this.subject.pipe(Xc({subscribe:()=>{this.subject.observed||(this.reobserve(),setTimeout(()=>this.updatePolling()))},unsubscribe:()=>{this.subject.observed||this.tearDownQuery()}}),q3(({query:n,variables:r,result:o,meta:i},s)=>{const{shouldEmit:a}=i;if(o===Hd&&(s.previous=void 0,s.previousVariables=void 0),"standby"===this.options.fetchPolicy||2===a)return;if(1===a)return u();const{previous:l,previousVariables:c}=s;if(l){const d=this.queryManager.getDocumentInfo(n),f=this.queryManager.dataMasking;if((f||d.hasNonreactiveDirective?gM(f?d.nonReactiveQuery:n,l,o,r):$r(l,o))&&$r(c,r))return}if(3!==a||this.options.notifyOnNetworkStatusChange&&!$r(l,o))return u();function u(){return s.previous=o,s.previousVariables=r,o}},()=>({})));this.pipe=t.pipe.bind(t),this.subscribe=t.subscribe.bind(t),this.input=new Rn,this.input.complete=()=>{},this.input.pipe(this.operator).subscribe(this.subject)}subscribe;pipe;[Symbol.observable];"@@observable";getCacheDiff({optimistic:t=!0}={}){return this.cache.diff({query:this.query,variables:this.variables,returnPartialData:!0,optimistic:t})}getInitialResult(t){let n=t||this.options.fetchPolicy;this.queryManager.prioritizeCacheValues&&("network-only"===n||"cache-and-network"===n)&&(n="cache-first");const r=()=>{const o=this.getCacheDiff(),i=this.options.returnPartialData||o.complete?o.result??void 0:void 0;return this.maskResult({data:i,dataState:o.complete?"complete":void 0===i?"empty":"partial",loading:!o.complete,networkStatus:o.complete?bn.ready:bn.loading,partial:!o.complete})};switch(n){case"cache-only":return{...r(),loading:!1,networkStatus:bn.ready};case"cache-first":return r();case"cache-and-network":return{...r(),loading:!0,networkStatus:bn.loading};case"standby":return W3;default:return Hd}}resubscribeCache(){const{variables:t,fetchPolicy:n}=this.options,r=this.query,o="standby"===n||"no-cache"===n||this.waitForNetworkResult,i=!If({query:r,variables:t},this.unsubscribeFromCache)&&!this.waitForNetworkResult;if((o||i)&&this.unsubscribeFromCache?.(),o||!i)return;const s={query:r,variables:t,optimistic:!0,watcher:this,callback:l=>{const c=this.queryManager.getDocumentInfo(r);if((c.hasClientExports||c.hasForcedResolvers)&&(s.lastDiff=void 0),s.lastOwnDiff===l)return;const{result:u}=this.subject.getValue();!l.complete&&(u.error||u===Hd||u===W3)||$r(u.data,l.result)||this.scheduleNotify()}},a=this.cache.watch(s);this.unsubscribeFromCache=Object.assign(()=>{this.unsubscribeFromCache=void 0,a()},{query:r,variables:t})}stableLastResult;getCurrentResult(){const{result:t}=this.subject.getValue();let n=t.networkStatus===bn.error||this.hasObservers()||"no-cache"===this.options.fetchPolicy?t:this.getInitialResult();return n===Hd&&(n=this.getInitialResult()),$r(this.stableLastResult,n)||(this.stableLastResult=n),this.stableLastResult}refetch(t){const{fetchPolicy:n}=this.options,r={pollInterval:0};return r.fetchPolicy="no-cache"===n?"no-cache":"network-only",t&&!$r(this.variables,t)&&(r.variables=this.options.variables=this.getVariablesWithDefaults({...this.variables,...t})),this._lastWrite=void 0,this._reobserve(r,{newNetworkStatus:bn.refetch})}fetchMore({query:t,variables:n,context:r,errorPolicy:o,updateQuery:i}){Rt("cache-only"!==this.options.fetchPolicy,82,Cs(this.query,"(anonymous)"));const s={...su(this.options,{errorPolicy:"none"},{query:t,context:r,errorPolicy:o}),variables:t?n:{...this.variables,...n},fetchPolicy:"no-cache",notifyOnNetworkStatusChange:this.options.notifyOnNetworkStatusChange};s.query=this.transformDocument(s.query),this.lastQuery=t?this.transformDocument(this.options.query):s.query;let a=!1;const l="no-cache"!==this.options.fetchPolicy;l||Rt(i,83);const{finalize:c,pushNotification:u}=this.pushOperation(bn.fetchMore);u({source:"newNetworkStatus",kind:"N",value:{}},{shouldEmit:3});const{promise:d,operator:f}=lN(),{observable:C}=this.queryManager.fetchObservableWithInfo(s,{networkStatus:bn.fetchMore,exposeExtensions:!0}),P=C.pipe(f,_8(G=>"N"===G.kind&&"network"===G.source)).subscribe({next:G=>{a=!1;const W=G.value,ie=W[DM];if(rN(G.value.networkStatus)&&c(),l){const he=this.getCacheDiff();this.cache.batch({update:qe=>{i?qe.updateQuery({query:this.query,variables:this.variables,returnPartialData:!0,optimistic:!1,extensions:ie},st=>i(st,{fetchMoreResult:W.data,variables:s.variables})):qe.writeQuery({query:s.query,variables:s.variables,data:W.data,extensions:ie})},onWatchUpdated:(qe,st)=>{if(qe.watcher===this&&!$r(st.result,he.result)){a=!0;const St=this.getCurrentResult();V0(W.networkStatus)&&u({kind:"N",source:"network",value:{...St,networkStatus:W.networkStatus===bn.error?bn.ready:W.networkStatus,loading:!1,data:st.result,dataState:"streaming"===W.dataState?"streaming":"complete"}})}}})}else{const he=this.getCurrentResult(),qe=i(he.data,{fetchMoreResult:W.data,variables:s.variables});u({kind:"N",value:{...he,networkStatus:bn.ready,loading:!1,data:qe,dataState:"streaming"===he.dataState?"streaming":"complete"},source:"network"})}}});return sN(d.then(G=>Ef(this.maskResult(G))).finally(()=>{if(P.unsubscribe(),c(),l&&!a){const G=this.getCurrentResult();"streaming"===G.dataState?u({kind:"N",source:"network",value:{...G,dataState:"complete",networkStatus:bn.ready}}):u({kind:"N",source:"newNetworkStatus",value:{}},{shouldEmit:1})}}))}subscribeToMore(t){const n=this.queryManager.startGraphQLSubscription({query:t.document,variables:t.variables,context:t.context}).subscribe({next:r=>{const{updateQuery:o,onError:i}=t,{error:s}=r;s?i?i(s):Rt.error(84,s):o&&this.updateQuery((a,l)=>o(a,{subscriptionData:r,...l}))}});return this.subscriptions.add(n),()=>{this.subscriptions.delete(n)&&n.unsubscribe()}}applyOptions(t){const n=su(this.options,t||{});aN(this.options,n),this.updatePolling()}setVariables(t){var n=this;return(0,K.A)(function*(){return t=n.getVariablesWithDefaults(t),$r(n.variables,t)||(n.options.variables=t,!n.hasObservers())?Ef(n.getCurrentResult()):n._reobserve({fetchPolicy:n.options.initialFetchPolicy,variables:t},{newNetworkStatus:bn.setVariables})})()}updateQuery(t){const{queryManager:n}=this,{result:r,complete:o}=this.getCacheDiff({optimistic:!1}),i=t(r,{variables:this.variables,complete:!!o,previousData:r});i&&(this.cache.writeQuery({query:this.options.query,data:i,variables:this.variables}),n.broadcastQueries())}startPolling(t){this.options.pollInterval=t,this.updatePolling()}stopPolling(){this.options.pollInterval=0,this.updatePolling()}applyNextFetchPolicy(t,n){if(n.nextFetchPolicy){const{fetchPolicy:r="cache-first",initialFetchPolicy:o=r}=n;"standby"===r||(n.fetchPolicy="function"==typeof n.nextFetchPolicy?n.nextFetchPolicy.call(n,r,{reason:t,options:n,observable:this,initialFetchPolicy:o}):"variables-changed"===t?o:n.nextFetchPolicy)}return n.fetchPolicy}fetch(t,n,r,o){const i=this.options.fetchPolicy;t.context??={};let s=!1,{observable:c,fromLink:u}=this.queryManager.fetchObservableWithInfo(t,{networkStatus:n,query:r,onCacheHit:()=>{s=!0},fetchQueryOperator:W=>new Ot(ie=>{try{return W.subscribe({next(he){s=!0,ie.next(he)},error:he=>ie.error(he),complete:()=>ie.complete()})}finally{s||(C.override=n,this.input.next({kind:"N",source:"newNetworkStatus",value:{resetError:!0},query:d,variables:f,meta:{shouldEmit:3,fetchPolicy:i}}))}}),observableQuery:this});const{query:d,variables:f}=this,C={abort:()=>{G.unsubscribe()},query:d,variables:f};this.activeOperations.add(C);let P=n==bn.refetch||n==bn.setVariables;c=c.pipe(o,_f());const G=c.pipe(Xc({next:W=>{"newNetworkStatus"===W.source||"N"===W.kind&&W.value.loading?C.override=n:delete C.override},finalize:()=>this.activeOperations.delete(C)})).subscribe({next:W=>{const ie={};P&&"N"===W.kind&&"loading"in W.value&&!W.value.loading&&(P=!1,ie.shouldEmit=1),this.input.next({...W,query:d,variables:f,meta:ie})}});return{fromLink:u,subscription:G,observable:c}}didWarnCacheOnlyPolling=!1;updatePolling(){if(this.queryManager.ssrMode)return;const{pollingInfo:t,options:{fetchPolicy:n,pollInterval:r}}=this;if(!r||!this.hasObservers()||"cache-only"===n)return void this.cancelPolling();if(t?.interval===r)return;(t||(this.pollingInfo={})).interval=r;const i=()=>{this.pollingInfo&&(V0(this.networkStatus)||this.options.skipPollAttempt?.()?s():this._reobserve({fetchPolicy:"no-cache"===this.options.initialFetchPolicy?"no-cache":"network-only"},{newNetworkStatus:bn.poll}).then(s,s))},s=()=>{const a=this.pollingInfo;a&&(clearTimeout(a.timeout),a.timeout=setTimeout(i,a.interval))};s()}cancelPolling(){this.pollingInfo&&(clearTimeout(this.pollingInfo.timeout),delete this.pollingInfo)}reobserve(t){return this._reobserve(t)}_reobserve(t,n){this.isTornDown=!1;let{newNetworkStatus:r}=n||{};this.queryManager.obsQueries.add(this);const o=r===bn.refetch||r===bn.poll,i=this.variables,s=this.options.fetchPolicy,a=su(this.options,t||{});this.variablesUnknown&&="standby"===a.fetchPolicy;const l=o?a:aN(this.options,a),c=this.transformDocument(l.query);this.lastQuery=c,t&&"variables"in t&&(l.variables=this.getVariablesWithDefaults(t.variables)),o||(this.updatePolling(),t&&t.variables&&!$r(t.variables,i)&&"standby"!==l.fetchPolicy&&(l.fetchPolicy===s||"function"==typeof l.nextFetchPolicy)&&(this.applyNextFetchPolicy("variables-changed",l),void 0===r&&(r=bn.setVariables))),r||(r=bn.loading,this.networkStatus!==bn.loading&&t?.variables&&!$r(t.variables,i)&&(r=bn.setVariables),"standby"===l.fetchPolicy&&(r=bn.ready)),"standby"===l.fetchPolicy&&this.cancelPolling(),this.resubscribeCache();const{promise:d,operator:f}=lN("standby"===l.fetchPolicy?{data:void 0}:void 0),{subscription:C,observable:P,fromLink:G}=this.fetch(l,r,c,f);!o&&(G||!this.linkSubscription)&&(this.linkSubscription&&this.linkSubscription.unsubscribe(),this.linkSubscription=C);const W=Object.assign(sN(d.then(ie=>Ef(this.maskResult(ie))).finally(()=>{!this.hasObservers()&&0===this.activeOperations.size&&this.tearDownQuery()})),{retain:()=>{const ie=P.subscribe({}),he=()=>ie.unsubscribe();return d.then(he,he),W}});return W}hasObservers(){return this.subject.observed}stop(){this.subject.complete(),this.initializeObservablesQueue(),this.tearDownQuery()}tearDownQuery(){this.isTornDown||(this.resetNotifications(),this.unsubscribeFromCache?.(),this.linkSubscription&&(this.linkSubscription.unsubscribe(),delete this.linkSubscription),this.stopPolling(),this.subscriptions.forEach(t=>t.unsubscribe()),this.subscriptions.clear(),this.queryManager.obsQueries.delete(this),this.isTornDown=!0,this.abortActiveOperations(),this._lastWrite=void 0)}transformDocument(t){return this.queryManager.transform(t)}maskResult(t){const n=this.queryManager.maskOperation({document:this.query,data:t.data,fetchPolicy:this.options.fetchPolicy,cause:this});return n===t.data?t:{...t,data:n}}dirty=!1;notifyTimeout;resetNotifications(){this.notifyTimeout&&(clearTimeout(this.notifyTimeout),this.notifyTimeout=void 0),this.dirty=!1}scheduleNotify(){this.dirty||(this.dirty=!0,this.notifyTimeout||(this.notifyTimeout=setTimeout(()=>this.notify(!0),0)))}notify(t=!1){if(!t){const r=this.queryManager.getDocumentInfo(this.query);if(r.hasClientExports||r.hasForcedResolvers)return}const{dirty:n}=this;if(this.resetNotifications(),n&&("cache-only"===this.options.fetchPolicy||"cache-and-network"===this.options.fetchPolicy||!this.activeOperations.size)){const r=this.getCacheDiff();$r(r.result,this.getCacheDiff({optimistic:!1}).result)?this.reobserveCacheFirst():this.input.next({kind:"N",value:{data:r.result,dataState:r.complete?"complete":r.result?"partial":"empty",networkStatus:bn.ready,loading:!1,error:void 0,partial:!r.complete},source:"cache",query:this.query,variables:this.variables,meta:{}})}}activeOperations=new Set;pushOperation(t){let n=!1;const{query:r,variables:o}=this,i=()=>{this.activeOperations.delete(s)},s={override:t,abort:()=>{n=!0,i()},query:r,variables:o};return this.activeOperations.add(s),{finalize:i,pushNotification:(a,l)=>{n||this.input.next({...a,query:r,variables:o,meta:{...l}})}}}calculateNetworkStatus(t){return t===bn.streaming?t:Array.from(this.activeOperations.values()).reverse().find(r=>If(r,this)&&void 0!==r.override)?.override??t}abortActiveOperations(){this.activeOperations.forEach(t=>t.abort())}reset(){const t="cache-only"===this.options.fetchPolicy;this.setResult(t?W3:Hd,{shouldEmit:t?1:2}),this.abortActiveOperations()}setResult(t,n){this.input.next({source:"setResult",kind:"N",value:t,query:this.query,variables:this.variables,meta:{...n}})}operator=q3(t=>{const{query:n,variables:r,meta:o}=t;if("setResult"===t.source)return{query:n,variables:r,result:t.value,meta:o};if("C"===t.kind||!If(t,this))return;let i;const s=this.subject.getValue();if("cache"===t.source){if(i=t.value,i.networkStatus===bn.ready&&i.partial&&(!this.options.returnPartialData||s.result.networkStatus===bn.error)&&"cache-only"!==this.options.fetchPolicy)return}else if("network"===t.source)this.waitForNetworkResult&&(this.waitForNetworkResult=!1,this.resubscribeCache()),i="E"===t.kind?{...If(s,t)?s.result:{data:void 0,dataState:"empty",partial:!0},error:t.error,networkStatus:bn.error,loading:!1}:t.value,"E"===t.kind&&"streaming"===i.dataState&&(i.dataState="complete"),i.error&&(o.shouldEmit=1);else if("newNetworkStatus"===t.source){const a=If(s,t)?s.result:this.getInitialResult(o.fetchPolicy),{resetError:l}=t.value,c=l?void 0:a.error,u=c?bn.error:bn.ready;i={...a,error:c,networkStatus:u}}return Rt(i),i.error||delete i.error,i.networkStatus=this.calculateNetworkStatus(i.networkStatus),i.loading=V0(i.networkStatus),i=this.maskResult(i),{query:n,variables:r,result:i,meta:o}});reobserveCacheFirst(){const{fetchPolicy:t,nextFetchPolicy:n}=this.options;"cache-and-network"===t||"network-only"===t?this.reobserve({fetchPolicy:"cache-first",nextFetchPolicy(r,o){return this.nextFetchPolicy=n,"function"==typeof this.nextFetchPolicy?this.nextFetchPolicy(r,o):t}}):this.reobserve()}getVariablesWithDefaults(t){return this.queryManager.getVariables(this.query,t)}}function If(e,t){return!!(e&&t&&e.query===t.query&&$r(e.variables,t.variables))}function lN(e){let n,r,t=e;return{promise:new Promise((s,a)=>{n=s,r=a}),operator:Xc({next(s){if("E"===s.kind)return r(s.error);"N"===s.kind&&"newNetworkStatus"!==s.source&&!s.value.loading&&(t=s.value)},finalize:()=>{if(t)n(t);else{const s="The operation was aborted.",a="AbortError";r(typeof DOMException<"u"?new DOMException(s,a):Object.assign(new Error(s),{name:a}))}}})}}const cN={},Ud=new WeakMap;function Y3(e,t){const n=e[t];"function"==typeof n&&(e[t]=function(){return Ud.set(e,(Ud.get(e)+1)%1e15),n.apply(this,arguments)})}const uN=new WeakMap;class K3{lastRequestId=1;cache;queryManager;id;observableQuery;incremental;constructor(t,n){const r=this.cache=t.cache,o=(uN.get(t)||0)+1;uN.set(t,o),this.id=o+"",this.observableQuery=n,this.queryManager=t,Ud.has(r)||(Ud.set(r,0),Y3(r,"evict"),Y3(r,"modify"),Y3(r,"reset"))}_lastWrite;get lastWrite(){return(this.observableQuery||this)._lastWrite}set lastWrite(t){(this.observableQuery||this)._lastWrite=t}resetLastWrite(){this.lastWrite=void 0}shouldWrite(t,n){const{lastWrite:r}=this;return!(r&&r.dmCount===Ud.get(this.cache)&&$r(n,r.variables)&&$r(t.data,r.result.data)&&t.extensions?.[ql]===r.result.extensions?.[ql])}get hasNext(){return!!this.incremental&&this.incremental.hasNext}maybeHandleIncrementalResult(t,n,r){const{incrementalHandler:o}=this.queryManager;return o.isIncrementalResult(n)?(this.incremental||=o.startRequest({query:r}),this.incremental.handle(t,n)):n}markQueryResult(t,{document:n,variables:r,errorPolicy:o,cacheWriteBehavior:i}){const s={query:n,variables:r,returnPartialData:!0,optimistic:!0};this.observableQuery?.resetNotifications();const a=0===i,l=a?void 0:this.cache.diff(s);let c=this.maybeHandleIncrementalResult(l?.result,t,n);return a||(X3(c,o)?this.cache.batch({onWatchUpdated:(u,d)=>{u.watcher===this.observableQuery&&(u.lastOwnDiff=d)},update:u=>{if(this.shouldWrite(c,r))u.writeQuery({query:n,data:c.data,variables:r,overwrite:1===i,extensions:c.extensions}),this.lastWrite={result:c,variables:r,dmCount:Ud.get(this.cache)};else if(l&&l.complete)return void(c={...c,data:l.result});const d=u.diff(s);d.complete&&(c={...c,data:d.result})}}):this.lastWrite=void 0),c}markMutationResult(t,n,r=this.cache){const o=[],i=0===n.cacheWriteBehavior;let s=this.maybeHandleIncrementalResult(i?void 0:r.diff({id:"ROOT_MUTATION",query:this.queryManager.getDocumentInfo(n.document).asQuery,variables:n.variables,optimistic:!1,returnPartialData:!0}).result,t,n.document);if("ignore"===n.errorPolicy&&(s={...s,errors:[]}),Fd(s)&&"none"===n.errorPolicy)return Promise.resolve(s);const a=()=>({...s,dataState:this.hasNext?"streaming":"complete"});if(!i&&X3(s,n.errorPolicy)){o.push({result:s.data,dataId:"ROOT_MUTATION",query:n.document,variables:n.variables,extensions:s.extensions});const{updateQueries:c}=n;c&&this.queryManager.getObservableQueries("all").forEach(u=>{const d=u&&u.queryName;if(!d||!Object.hasOwnProperty.call(c,d))return;const f=c[d],{query:C,variables:P}=u,{result:G,complete:W}=u.getCacheDiff({optimistic:!1});if(W&&G){const ie=f(G,{mutationResult:a(),queryName:C&&Cs(C)||void 0,queryVariables:P});ie&&o.push({result:ie,dataId:"ROOT_QUERY",query:C,variables:P})}})}let l=n.refetchQueries;if("function"==typeof l&&(l=l(a())),o.length>0||(l||"").length>0||n.update||n.onQueryUpdated||n.removeOptimistic){const c=[];if(this.queryManager.refetchQueries({updateCache:u=>{i||o.forEach(f=>u.write(f));const{update:d}=n;if(d){if(!i){const f=u.diff({id:"ROOT_MUTATION",query:this.queryManager.getDocumentInfo(n.document).asQuery,variables:n.variables,optimistic:!1,returnPartialData:!0});f.complete&&(s={...s,data:f.result})}this.hasNext||d(u,s,{context:n.context,variables:n.variables})}!i&&!n.keepRootFields&&!this.hasNext&&u.modify({id:"ROOT_MUTATION",fields:(f,{fieldName:C,DELETE:P})=>"__typename"===C?f:P})},include:l,optimistic:!1,removeOptimistic:n.removeOptimistic,onQueryUpdated:n.onQueryUpdated||null}).forEach(u=>c.push(u)),n.awaitRefetchQueries||n.onQueryUpdated)return Promise.all(c).then(()=>s)}return Promise.resolve(s)}markMutationOptimistic(t,n){const r="function"==typeof t?t(n.variables,{IGNORE:cN}):t;return r!==cN&&(this.cache.recordOptimisticTransaction(o=>{try{this.markMutationResult({data:r},n,o)}catch(i){Rt.error(i)}},this.id),!0)}markSubscriptionResult(t,{document:n,variables:r,errorPolicy:o,cacheWriteBehavior:i}){0!==i&&(X3(t,o)&&this.cache.write({query:n,result:t.data,dataId:"ROOT_SUBSCRIPTION",variables:r,extensions:t.extensions}),this.queryManager.broadcastQueries())}}function X3(e,t="none"){const n="ignore"===t||"all"===t;let r=!Fd(e);return!r&&n&&e.data&&(r=!0),r}class sle{defaultOptions;client;clientOptions;assumeImmutableResults;documentTransform;ssrMode;defaultContext;dataMasking;incrementalHandler;localState;queryDeduplication;prioritizeCacheValues=!1;onBroadcast;mutationStore;obsQueries=new Set;fetchCancelFns=new Map;constructor(t){const n=new Ua(o=>this.cache.transformDocument(o),{cache:!1});this.client=t.client,this.defaultOptions=t.defaultOptions,this.queryDeduplication=t.queryDeduplication,this.clientOptions=t.clientOptions,this.ssrMode=t.ssrMode,this.assumeImmutableResults=t.assumeImmutableResults,this.dataMasking=t.dataMasking,this.localState=t.localState,this.incrementalHandler=t.incrementalHandler;const r=t.documentTransform;this.documentTransform=r?n.concat(r).concat(n):n,this.defaultContext=t.defaultContext||{},(this.onBroadcast=t.onBroadcast)&&(this.mutationStore={})}get link(){return this.client.link}get cache(){return this.client.cache}stop(){this.obsQueries.forEach(t=>t.stop()),this.cancelPendingFetches(rs(87))}cancelPendingFetches(t){this.fetchCancelFns.forEach(n=>n(t)),this.fetchCancelFns.clear()}mutate(t){var n=this;return(0,K.A)(function*({mutation:r,variables:o,optimisticResponse:i,updateQueries:s,refetchQueries:a=[],awaitRefetchQueries:l=!1,update:c,onQueryUpdated:u,fetchPolicy:d,errorPolicy:f,keepRootFields:C,context:P}){const G=new K3(n);r=n.cache.transformForLink(n.transform(r));const{hasClientExports:W}=n.getDocumentInfo(r);o=n.getVariables(r,o),W&&(o=yield n.localState.getExportedVariables({client:n.client,document:r,variables:o,context:P}));const ie=n.mutationStore&&(n.mutationStore[G.id]={mutation:r,variables:o,loading:!0,error:null}),he=i&&G.markMutationOptimistic(i,{document:r,variables:o,cacheWriteBehavior:"no-cache"===d?0:2,errorPolicy:f,context:P,updateQueries:s,update:c,keepRootFields:C});return n.broadcastQueries(),new Promise((qe,st)=>{const St={};return n.getObservableFromLink(r,{...P,optimisticResponse:he?i:void 0},o,d,{},!1).observable.pipe(dN(),Ll(jt=>{const wn={...jt};return Ys(G.markMutationResult(wn,{document:r,variables:o,cacheWriteBehavior:"no-cache"===d?0:2,errorPolicy:f,context:P,update:c,updateQueries:s,awaitRefetchQueries:l,refetchQueries:a,removeOptimistic:he?G.id:void 0,onQueryUpdated:u,keepRootFields:C}))})).pipe(ur(jt=>{if(Fd(jt)&&"none"===f)throw new bf(Q3(jt));return ie&&(ie.loading=!1,ie.error=null),jt})).subscribe({next:jt=>{if(n.broadcastQueries(),!G.hasNext){const wn={data:n.maskOperation({document:r,data:jt.data,fetchPolicy:d,cause:St})};Fd(jt)&&(wn.error=new bf(jt)),Object.keys(jt.extensions||{}).length&&(wn.extensions=jt.extensions),qe(wn)}},error:jt=>(ie&&(ie.loading=!1,ie.error=jt),he&&n.cache.removeOptimistic(G.id),n.broadcastQueries(),"ignore"===f?qe({data:void 0}):"all"===f?qe({data:void 0,error:jt}):void st(jt))})})}).apply(this,arguments)}fetchQuery(t,n){var r=this;return zl(t.query,na.QUERY),(0,K.A)(function*(){return $h(r.fetchObservableWithInfo(t,{networkStatus:n}).observable.pipe(q3(o=>{switch(o.kind){case"E":throw o.error;case"N":if("newNetworkStatus"!==o.source)return Ef(o.value)}})),{defaultValue:{data:void 0}})})()}transform(t){return this.documentTransform.transformDocument(t)}transformCache=new i3(Fa["queryManager.getDocumentInfo"]||2e3);getDocumentInfo(t){const{transformCache:n}=this;if(!n.has(t)){const o=Ha(t),i={hasClientExports:Bd(["client","export"],t,!0),hasForcedResolvers:Jae(t),hasNonreactiveDirective:Bd(["nonreactive"],t),hasIncrementalDirective:Bd(["defer"],t),nonReactiveQuery:lle(t),clientQuery:Bd(["client"],t)?t:null,serverQuery:ele([{name:"client",remove:!0},{name:"connection"},{name:"nonreactive"},{name:"unmask"}],t),operationType:o?.operation,defaultVars:R3(o),asQuery:{...t,definitions:t.definitions.map(s=>"OperationDefinition"===s.kind&&"query"!==s.operation?{...s,operation:"query"}:s)}};n.set(t,i)}const r=n.get(t);if(r.violation)throw r.violation;return r}getVariables(t,n){const r=this.getDocumentInfo(t).defaultVars,o=Object.entries(n??{}).map(([i,s])=>[i,void 0===s?r[i]:s]);return{...r,...Object.fromEntries(o)}}watchQuery(t){zl(t.query,na.QUERY);const n=this.transform(t.query);return typeof(t={...t,variables:this.getVariables(n,t.variables)}).notifyOnNetworkStatusChange>"u"&&(t.notifyOnNetworkStatusChange=!0),new Z3({queryManager:this,options:t,transformedQuery:n})}query(t){const n=this.transform(t.query);return this.fetchQuery({...t,query:n}).then(r=>({...r,data:this.maskOperation({document:n,data:r?.data,fetchPolicy:t.fetchPolicy})}))}requestIdCounter=1;generateRequestId(){return this.requestIdCounter++}clearStore(t={discardWatches:!0}){return this.cancelPendingFetches(rs(89)),this.obsQueries.forEach(n=>{n.reset()}),this.mutationStore&&(this.mutationStore={}),this.cache.reset(t)}getObservableQueries(t="active"){const n=new Set,r=new Map,o=new Map,i=new Set;return Array.isArray(t)&&t.forEach(s=>{if("string"==typeof s)r.set(s,s),o.set(s,!1);else if(function rle(e){return fi(e)&&"Document"===e.kind&&Array.isArray(e.definitions)}(s)){const a=df(this.transform(s));r.set(a,Cs(s)),o.set(a,!1)}else fi(s)&&s.query&&i.add(s)}),this.obsQueries.forEach(s=>{const a=df(this.transform(s.options.query));if("all"===t)return void n.add(s);const{queryName:l,options:{fetchPolicy:c}}=s;"active"===t&&"standby"===c||("active"===t||l&&o.has(l)||a&&o.has(a))&&(n.add(s),l&&o.set(l,!0),a&&o.set(a,!0))}),i.size&&i.forEach(s=>{const a=new Z3({queryManager:this,options:{...s,fetchPolicy:"network-only"}});n.add(a)}),n}refetchObservableQueries(t=!1){const n=[];return this.getObservableQueries(t?"all":"active").forEach(r=>{const{fetchPolicy:o}=r.options;(t||"standby"!==o)&&"cache-only"!==o&&n.push(r.refetch())}),this.broadcastQueries(),Promise.all(n)}startGraphQLSubscription(t){let{query:n,variables:r}=t;const{fetchPolicy:o="cache-first",errorPolicy:i="none",context:s={},extensions:a={}}=t;let l;zl(n,na.SUBSCRIPTION),n=this.transform(n),r=this.getVariables(n,r);const c=(this.getDocumentInfo(n).hasClientExports?Ys(this.localState.getExportedVariables({client:this.client,document:n,variables:r,context:s})):Ks(r)).pipe(Ll(u=>{const{observable:d,restart:f}=this.getObservableFromLink(n,s,u,o,a),C=new K3(this);return l=f,d.pipe(ur(P=>{C.markSubscriptionResult(P,{document:n,variables:u,errorPolicy:i,cacheWriteBehavior:"no-cache"===o?0:2});const G={data:P.data??void 0};return Fd(P)?G.error=new bf(P):function qae(e){return"extensions"in e&&Gae.is(e.extensions[$3])}(P)&&(G.error=P.extensions[$3],delete P.extensions[$3]),P.extensions&&Object.keys(P.extensions).length&&(G.extensions=P.extensions),G.error&&"none"===i&&(G.data=void 0),"ignore"===i&&delete G.error,G}),za(P=>Ks("ignore"===i?{data:void 0}:{data:void 0,error:P})),_8(P=>!(!P.data&&!P.error)))}));return Object.assign(c,{restart:()=>l?.()})}broadcastQueries(){this.onBroadcast&&this.onBroadcast(),this.obsQueries.forEach(t=>t.notify())}inFlightLinkObservables=new oa(!1);getObservableFromLink(t,n,r,o,i,s=n?.queryDeduplication??this.queryDeduplication){let a={};const{serverQuery:l,clientQuery:c,operationType:u,hasIncrementalDirective:d}=this.getDocumentInfo(t),f=Cs(t),C={client:this.client};if(l){const{inFlightLinkObservables:P,link:G}=this;try{let ie=function(he){return new Ot(qe=>{function st(){return he.subscribe({next:qe.next.bind(qe),complete:qe.complete.bind(qe),error:qe.error.bind(qe)})}let St=st();return a.restart||=()=>{St.unsubscribe(),St=st()},()=>{St.unsubscribe(),a.restart=void 0}})};const W=this.incrementalHandler.prepareRequest({query:l,variables:r,context:{...this.defaultContext,...n,queryDeduplication:s},extensions:i});if(n=W.context,s){const he=df(l),qe=Va(r);a=P.lookup(he,qe),a.observable||(a.observable=U3(G,W,C).pipe(ie,d8(()=>{P.peek(he,qe)===a&&P.remove(he,qe)}),u===na.SUBSCRIPTION?_f():N0({refCount:!0})))}else a.observable=U3(G,W,C).pipe(ie)}catch(W){a.observable=Wl(()=>W)}}else a.observable=Ks({data:{}});if(c){const{operation:P}=Ha(t);Rt(!d,94,P[0].toUpperCase()+P.slice(1),f??"(anonymous)"),a.observable=a.observable.pipe(Ll(G=>Ys(this.localState.execute({client:this.client,document:c,remoteResult:G,context:n,variables:r,fetchPolicy:o}))))}return{restart:()=>a.restart?.(),observable:a.observable.pipe(za(P=>{throw P=function Wae(e){return function $ae(e){return null!==e&&"object"==typeof e&&"string"==typeof e.message&&"string"==typeof e.name&&("string"==typeof e.stack||typeof e.stack>"u")}(e)?e:"string"==typeof e?new Error(e,{cause:e}):new G3(e)}(P),function Zae(e){tN.add(e)}(P),P}))}}getResultsFromLink(t,{queryInfo:n,cacheWriteBehavior:r,observableQuery:o,exposeExtensions:i}){const s=n.lastRequestId=this.generateRequestId(),{errorPolicy:a}=t,l=this.cache.transformForLink(t.query);return this.getObservableFromLink(l,t.context,t.variables,t.fetchPolicy).observable.pipe(ur(c=>{const u=n.markQueryResult(c,{...t,document:l,cacheWriteBehavior:r}),d=Fd(u);if(d&&"none"===a)throw n.resetLastWrite(),o?.resetNotifications(),new bf(Q3(u));const f={data:u.data,...n.hasNext?{loading:!0,networkStatus:bn.streaming,dataState:"streaming",partial:!0}:{dataState:u.data?"complete":"empty",loading:!1,networkStatus:bn.ready,partial:!u.data}};return i&&"extensions"in u&&(f[DM]=u.extensions),d&&("none"===a&&(f.data=void 0,f.dataState="empty"),"ignore"!==a&&(f.error=new bf(Q3(u)),"streaming"!==f.dataState&&(f.networkStatus=bn.error))),f}),za(c=>{if(s>=n.lastRequestId&&"none"===a)throw n.resetLastWrite(),o?.resetNotifications(),c;const u={data:void 0,dataState:"empty",loading:!1,networkStatus:bn.ready,partial:!0};return"ignore"!==a&&(u.error=c,u.networkStatus=bn.error),Ks(u)}))}fetchObservableWithInfo(t,{networkStatus:n=bn.loading,query:r=t.query,fetchQueryOperator:o=l=>l,onCacheHit:i=()=>{},observableQuery:s,exposeExtensions:a}){const l=this.getVariables(r,t.variables),c=this.defaultOptions.watchQuery;let{fetchPolicy:u=c&&c.fetchPolicy||"cache-first",errorPolicy:d=c&&c.errorPolicy||"none",returnPartialData:f=!1,notifyOnNetworkStatusChange:C=!0,context:P={}}=t;this.prioritizeCacheValues&&("network-only"===u||"cache-and-network"===u)&&(u="cache-first");const G=Object.assign({},t,{query:r,variables:l,fetchPolicy:u,errorPolicy:d,returnPartialData:f,notifyOnNetworkStatusChange:C,context:P}),W=new K3(this,s),ie=jt=>{G.variables=jt;const Jt=this.fetchQueryByPolicy(G,{queryInfo:W,cacheWriteBehavior:"no-cache"===u?0:n===bn.refetch&&"merge"!==G.refetchWritePolicy?1:2,onCacheHit:i,observableQuery:s,exposeExtensions:a});return Jt.observable=Jt.observable.pipe(o),"standby"!==G.fetchPolicy&&s?.applyNextFetchPolicy("after-fetch",t),Jt},he=()=>{this.fetchCancelFns.delete(W.id)};this.fetchCancelFns.set(W.id,jt=>{qe.next({kind:"E",error:jt,source:"network"})});const qe=new Rn;let st,St;if(this.getDocumentInfo(G.query).hasClientExports)st=Ys(this.localState.getExportedVariables({client:this.client,document:G.query,variables:G.variables,context:G.context})).pipe(Ll(jt=>ie(jt).observable)),St=!0;else{const jt=ie(G.variables);St=jt.fromLink,st=jt.observable}return{observable:new Ot(jt=>{jt.add(he),st.subscribe(jt),qe.subscribe(jt)}).pipe(_f()),fromLink:St}}refetchQueries({updateCache:t,include:n,optimistic:r=!1,removeOptimistic:o=(r?Lx("refetchQueries"):void 0),onQueryUpdated:i}){const s=new Map;n&&this.getObservableQueries(n).forEach(l=>{if("cache-only"===l.options.fetchPolicy||l.variablesUnknown)return;const c=l.getCurrentResult();s.set(l,{oq:l,lastDiff:{result:c?.data,complete:!c?.partial}})});const a=new Map;if(t){const l=new Set;this.cache.batch({update:t,optimistic:r&&o||!1,removeOptimistic:o,onWatchUpdated(c,u,d){const f=c.watcher;if(f instanceof Z3&&!l.has(f)){if(l.add(f),i){s.delete(f);let C=i(f,u,d);return!0===C&&(C=f.refetch().retain()),!1!==C&&a.set(f,C),C}null!==i&&"cache-only"!==f.options.fetchPolicy&&s.set(f,{oq:f,lastDiff:d,diff:u})}}})}return s.size&&s.forEach(({oq:l,lastDiff:c,diff:u})=>{let d;i&&(u||(u=l.getCacheDiff()),d=i(l,u,c)),(!i||!0===d)&&(d=l.refetch().retain()),!1!==d&&a.set(l,d)}),o&&this.cache.removeOptimistic(o),a}noCacheWarningsByCause=new WeakSet;maskOperation(t){const{document:n,data:r}=t;return this.dataMasking?function Xae(e,t,n){const r=Ha(t);return Rt(r,43),null==e?e:nN(e,r.selectionSet,{operationType:r.operation,operationName:r.name?.value,fragmentMap:ff(pf(t)),cache:n,mutableTargets:new WeakMap,knownChanged:new WeakSet})}(r,n,this.cache):r}maskFragment(t){const{data:n,fragment:r,fragmentName:o}=t;return this.dataMasking?function Qae(e,t,n,r){const o=t.definitions.filter(s=>s.kind===wt.FRAGMENT_DEFINITION);typeof r>"u"&&(Rt(1===o.length,41,o.length),r=o[0].name.value);const i=o.find(s=>s.name.value===r);return Rt(!!i,42,r),null==e||$r(e,{})?e:nN(e,i.selectionSet,{operationType:"fragment",operationName:i.name.value,fragmentMap:ff(pf(t)),cache:n,mutableTargets:new WeakMap,knownChanged:new WeakSet})}(n,r,this.cache,o):n}fetchQueryByPolicy({query:t,variables:n,fetchPolicy:r,errorPolicy:o,returnPartialData:i,context:s},{cacheWriteBehavior:a,onCacheHit:l,queryInfo:c,observableQuery:u,exposeExtensions:d}){const f=()=>this.cache.diff({query:t,variables:n,returnPartialData:!0,optimistic:!0}),C=(G,W)=>{const ie=G.result,he=st=>(!G.complete&&!i&&(st=void 0),{data:st,dataState:G.complete?"complete":st?"partial":"empty",loading:V0(W),networkStatus:W,partial:!G.complete});return(G.complete||i)&&this.getDocumentInfo(t).hasForcedResolvers?(l(),Ys(this.localState.execute({client:this.client,document:t,remoteResult:ie?{data:ie}:void 0,context:s,variables:n,onlyRunForcedResolvers:!0,returnPartialData:!0,fetchPolicy:r}).then(st=>({kind:"N",value:he(st.data||void 0),source:"cache"})))):Ks({kind:"N",value:he("none"===o&&W===bn.refetch&&G.missing?void 0:ie||void 0),source:"cache"})},P=()=>this.getResultsFromLink({query:t,variables:n,context:s,fetchPolicy:r,errorPolicy:o},{cacheWriteBehavior:a,queryInfo:c,observableQuery:u,exposeExtensions:d}).pipe(dN(),function zae(){return Ri((e,t)=>{e.subscribe(Zi(t,n=>{t.next(ja.createNext(n))},()=>{t.next(ja.createComplete()),t.complete()},n=>{t.next(ja.createError(n)),t.complete()}))})}(),ur(G=>({...G,source:"network"})));switch(r){default:case"cache-first":{const G=f();return G.complete?{fromLink:!1,observable:C(G,bn.ready)}:i?{fromLink:!0,observable:yf(C(G,bn.loading),P())}:{fromLink:!0,observable:P()}}case"cache-and-network":{const G=f();return G.complete||i?{fromLink:!0,observable:yf(C(G,bn.loading),P())}:{fromLink:!0,observable:P()}}case"cache-only":return{fromLink:!1,observable:yf(C(f(),bn.ready))};case"network-only":case"no-cache":return{fromLink:!0,observable:P()};case"standby":return{fromLink:!1,observable:Ul}}}}function dN(){let e=!1;return Xc({next(){e=!0},complete(){Rt(e,98)}})}function lle(e){return ra(e,{FragmentSpread:t=>{if(!t.directives?.some(n=>"unmask"===n.name.value))return{...t,directives:[...t.directives||[],{kind:wt.DIRECTIVE,name:{kind:wt.NAME,value:"nonreactive"}}]}}})}function Q3(e){if(null==e.extensions?.[ql])return e;const{extensions:{[ql]:t,...n},...r}=e;return Object.keys(n).length>0&&(r.extensions=n),r}class J3{link;cache;disableNetworkFetches;set prioritizeCacheValues(t){this.queryManager.prioritizeCacheValues=t}get prioritizeCacheValues(){return this.queryManager.prioritizeCacheValues}version;queryDeduplication;defaultOptions;devtoolsConfig;queryManager;devToolsHookCb;resetStoreCallbacks=[];clearStoreCallbacks=[];constructor(t){const{cache:n,documentTransform:r,ssrMode:o=!1,ssrForceFetchDelay:i=0,queryDeduplication:s=!0,defaultOptions:a,defaultContext:l,assumeImmutableResults:c=n.assumeImmutableResults,localState:u,devtools:d,dataMasking:f,link:C,incrementalHandler:P=new Fae,experiments:G=[]}=t;this.link=C,this.cache=n,this.queryDeduplication=s,this.defaultOptions=a||{},this.devtoolsConfig={...d,enabled:d?.enabled??false},this.watchQuery=this.watchQuery.bind(this),this.query=this.query.bind(this),this.mutate=this.mutate.bind(this),this.watchFragment=this.watchFragment.bind(this),this.resetStore=this.resetStore.bind(this),this.reFetchObservableQueries=this.refetchObservableQueries=this.refetchObservableQueries.bind(this),this.version=Q8,this.queryManager=new sle({client:this,defaultOptions:this.defaultOptions,defaultContext:l,documentTransform:r,queryDeduplication:s,ssrMode:o,dataMasking:!!f,clientOptions:t,incrementalHandler:P,assumeImmutableResults:c,onBroadcast:this.devtoolsConfig.enabled?()=>{this.devToolsHookCb&&this.devToolsHookCb()}:void 0,localState:u}),this.prioritizeCacheValues=o||i>0,i&&setTimeout(()=>{this.prioritizeCacheValues=!1},i),this.devtoolsConfig.enabled&&this.connectToDevTools(),G.forEach(W=>W.call(this,t))}connectToDevTools(){if(typeof window>"u")return;const t=window,n=Symbol.for("apollo.devtools");(t[n]=t[n]||[]).push(this),t.__APOLLO_CLIENT__=this}get documentTransform(){return this.queryManager.documentTransform}get localState(){return this.queryManager.localState}set localState(t){this.queryManager.localState=t}stop(){this.queryManager.stop()}watchQuery(t){return this.defaultOptions.watchQuery&&(t=V3(this.defaultOptions.watchQuery,t)),this.queryManager.watchQuery(t)}query(t){return this.defaultOptions.query&&(t=V3(this.defaultOptions.query,t)),this.queryManager.query(t)}mutate(t){const n=V3(su({fetchPolicy:"network-only",errorPolicy:"none"},this.defaultOptions.mutate),t);return zl(n.mutation,na.MUTATION),this.queryManager.mutate(n)}subscribe(t){const n={},r=this.queryManager.startGraphQLSubscription(t),o=r.pipe(ur(i=>({...i,data:this.queryManager.maskOperation({document:t.query,data:i.data,fetchPolicy:t.fetchPolicy,cause:n})})));return Object.assign(o,{restart:r.restart})}readQuery(t,n=!1){return this.cache.readQuery({...t,query:this.transform(t.query)},n)}watchFragment(t){const n=this.queryManager.dataMasking;return this.cache.watchFragment({...t,fragment:this.transform(t.fragment,n)})}readFragment(t,n=!1){return this.cache.readFragment({...t,fragment:this.transform(t.fragment)},n)}writeQuery(t){const n=this.cache.writeQuery(t);return!1!==t.broadcast&&this.queryManager.broadcastQueries(),n}writeFragment(t){const n=this.cache.writeFragment(t);return!1!==t.broadcast&&this.queryManager.broadcastQueries(),n}__actionHookForDevTools(t){this.devToolsHookCb=t}__requestRaw(t){return U3(this.link,t,{client:this})}resetStore(){return Promise.resolve().then(()=>this.queryManager.clearStore({discardWatches:!1})).then(()=>Promise.all(this.resetStoreCallbacks.map(t=>t()))).then(()=>this.refetchObservableQueries())}clearStore(){return Promise.resolve().then(()=>this.queryManager.clearStore({discardWatches:!0})).then(()=>Promise.all(this.clearStoreCallbacks.map(t=>t())))}onResetStore(t){return this.resetStoreCallbacks.push(t),()=>{this.resetStoreCallbacks=this.resetStoreCallbacks.filter(n=>n!==t)}}onClearStore(t){return this.clearStoreCallbacks.push(t),()=>{this.clearStoreCallbacks=this.clearStoreCallbacks.filter(n=>n!==t)}}reFetchObservableQueries;refetchObservableQueries(t){return this.queryManager.refetchObservableQueries(t)}refetchQueries(t){const n=this.queryManager.refetchQueries(t),r=[],o=[];n.forEach((s,a)=>{r.push(a),o.push(s)});const i=Promise.all(o);return i.queries=r,i.results=o,i.catch(s=>{}),i}getObservableQueries(t="active"){return this.queryManager.getObservableQueries(t)}extract(t){return this.cache.extract(t)}restore(t){return this.cache.restore(t)}setLink(t){this.link=t}get defaultContext(){return this.queryManager.defaultContext}maskedFragmentTransform=new Ua(Hae);transform(t,n=!1){const r=this.queryManager.transform(t);return n?this.maskedFragmentTransform.transformDocument(r):r}}function ule(e,t){if(!e)throw new Error(t??"Unexpected invariant triggered.")}const dle=/\r\n|[\n\r]/g;function e4(e,t){let n=0,r=1;for(const o of e.body.matchAll(dle)){if("number"==typeof o.index||ule(!1),o.index>=t)break;n=o.index+o[0].length,r+=1}return{line:r,column:t+1-n}}function _le(e){return hN(e.source,e4(e.source,e.start))}function hN(e,t){const n=e.locationOffset.column-1,r="".padStart(n)+e.body,o=t.line-1,s=t.line+(e.locationOffset.line-1),l=t.column+(1===t.line?n:0),c=`${e.name}:${s}:${l}\n`,u=r.split(/\r\n|[\n\r]/g),d=u[o];if(d.length>120){const f=Math.floor(l/80),C=l%80,P=[];for(let G=0;G<d.length;G+=80)P.push(d.slice(G,G+80));return c+fN([[`${s} |`,P[0]],...P.slice(1,f+1).map(G=>["|",G]),["|","^".padStart(C)],["|",P[f+1]]])}return c+fN([[s-1+" |",u[o-1]],[`${s} |`,d],["|","^".padStart(l)],[`${s+1} |`,u[o+1]]])}function fN(e){const t=e.filter(([r,o])=>void 0!==o),n=Math.max(...t.map(([r])=>r.length));return t.map(([r,o])=>r.padStart(n)+(o?" "+o:"")).join("\n")}class t4 extends Error{constructor(t,...n){var r,o,i;const{nodes:s,source:a,positions:l,path:c,originalError:u,extensions:d}=function hle(e){const t=e[0];return null==t||"kind"in t||"length"in t?{nodes:t,source:e[1],positions:e[2],path:e[3],originalError:e[4],extensions:e[5]}:t}(n);super(t),this.name="GraphQLError",this.path=c??void 0,this.originalError=u??void 0,this.nodes=pN(Array.isArray(s)?s:s?[s]:void 0);const f=pN(null===(r=this.nodes)||void 0===r?void 0:r.map(P=>P.loc).filter(P=>null!=P));this.source=a??(null==f||null===(o=f[0])||void 0===o?void 0:o.source),this.positions=l??f?.map(P=>P.start),this.locations=l&&a?l.map(P=>e4(a,P)):f?.map(P=>e4(P.source,P.start));const C=function cle(e){return"object"==typeof e&&null!==e}(u?.extensions)?u?.extensions:void 0;this.extensions=null!==(i=d??C)&&void 0!==i?i: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}}),null!=u&&u.stack?Object.defineProperty(this,"stack",{value:u.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,t4):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+="\n\n"+_le(n.loc));else if(this.source&&this.locations)for(const n of this.locations)t+="\n\n"+hN(this.source,n);return t}toJSON(){const t={message:this.message};return null!=this.locations&&(t.locations=this.locations),null!=this.path&&(t.path=this.path),null!=this.extensions&&Object.keys(this.extensions).length>0&&(t.extensions=this.extensions),t}}function pN(e){return void 0===e||0===e.length?void 0:e}function ko(e,t,n){return new t4(`Syntax Error: ${n}`,{source:e,positions:[t]})}var gN=function(e){return 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}(gN||{}),rt=function(e){return 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",e}(rt||{});class fle{constructor(t){const n=new Sx(rt.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!==rt.EOF)do{if(t.next)t=t.next;else{const n=gle(this,t.end);t.next=n,n.prev=t,t=n}}while(t.kind===rt.COMMENT);return t}}function Vd(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function z0(e,t){return mN(e.charCodeAt(t))&&vN(e.charCodeAt(t+1))}function mN(e){return e>=55296&&e<=56319}function vN(e){return e>=56320&&e<=57343}function au(e,t){const n=e.source.body.codePointAt(t);if(void 0===n)return rt.EOF;if(n>=32&&n<=126){const r=String.fromCodePoint(n);return'"'===r?"'\"'":`"${r}"`}return"U+"+n.toString(16).toUpperCase().padStart(4,"0")}function So(e,t,n,r,o){return new Sx(t,n,r,e.line,1+n-e.lineStart,o)}function gle(e,t){const n=e.source.body,r=n.length;let o=t;for(;o<r;){const i=n.charCodeAt(o);switch(i){case 65279:case 9:case 32:case 44:++o;continue;case 10:++o,++e.line,e.lineStart=o;continue;case 13:10===n.charCodeAt(o+1)?o+=2:++o,++e.line,e.lineStart=o;continue;case 35:return mle(e,o);case 33:return So(e,rt.BANG,o,o+1);case 36:return So(e,rt.DOLLAR,o,o+1);case 38:return So(e,rt.AMP,o,o+1);case 40:return So(e,rt.PAREN_L,o,o+1);case 41:return So(e,rt.PAREN_R,o,o+1);case 46:if(46===n.charCodeAt(o+1)&&46===n.charCodeAt(o+2))return So(e,rt.SPREAD,o,o+3);break;case 58:return So(e,rt.COLON,o,o+1);case 61:return So(e,rt.EQUALS,o,o+1);case 64:return So(e,rt.AT,o,o+1);case 91:return So(e,rt.BRACKET_L,o,o+1);case 93:return So(e,rt.BRACKET_R,o,o+1);case 123:return So(e,rt.BRACE_L,o,o+1);case 124:return So(e,rt.PIPE,o,o+1);case 125:return So(e,rt.BRACE_R,o,o+1);case 34:return 34===n.charCodeAt(o+1)&&34===n.charCodeAt(o+2)?Ele(e,o):Cle(e,o)}if(cf(i)||45===i)return vle(e,o,i);if(dM(i))return Ile(e,o);throw ko(e.source,o,39===i?"Unexpected single quote character ('), did you mean to use a double quote (\")?":Vd(i)||z0(n,o)?`Unexpected character: ${au(e,o)}.`:`Invalid character: ${au(e,o)}.`)}return So(e,rt.EOF,r,r)}function mle(e,t){const n=e.source.body,r=n.length;let o=t+1;for(;o<r;){const i=n.charCodeAt(o);if(10===i||13===i)break;if(Vd(i))++o;else{if(!z0(n,o))break;o+=2}}return So(e,rt.COMMENT,t,o,n.slice(t+1,o))}function vle(e,t,n){const r=e.source.body;let o=t,i=n,s=!1;if(45===i&&(i=r.charCodeAt(++o)),48===i){if(i=r.charCodeAt(++o),cf(i))throw ko(e.source,o,`Invalid number, unexpected digit after 0: ${au(e,o)}.`)}else o=n4(e,o,i),i=r.charCodeAt(o);if(46===i&&(s=!0,i=r.charCodeAt(++o),o=n4(e,o,i),i=r.charCodeAt(o)),(69===i||101===i)&&(s=!0,i=r.charCodeAt(++o),(43===i||45===i)&&(i=r.charCodeAt(++o)),o=n4(e,o,i),i=r.charCodeAt(o)),46===i||dM(i))throw ko(e.source,o,`Invalid number, expected digit but got: ${au(e,o)}.`);return So(e,s?rt.FLOAT:rt.INT,t,o,r.slice(t,o))}function n4(e,t,n){if(!cf(n))throw ko(e.source,t,`Invalid number, expected digit but got: ${au(e,t)}.`);const r=e.source.body;let o=t+1;for(;cf(r.charCodeAt(o));)++o;return o}function Cle(e,t){const n=e.source.body,r=n.length;let o=t+1,i=o,s="";for(;o<r;){const a=n.charCodeAt(o);if(34===a)return s+=n.slice(i,o),So(e,rt.STRING,t,o+1,s);if(92===a){s+=n.slice(i,o);const l=117===n.charCodeAt(o+1)?123===n.charCodeAt(o+2)?yle(e,o):ble(e,o):Tle(e,o);s+=l.value,o+=l.size,i=o;continue}if(10===a||13===a)break;if(Vd(a))++o;else{if(!z0(n,o))throw ko(e.source,o,`Invalid character within String: ${au(e,o)}.`);o+=2}}throw ko(e.source,o,"Unterminated string.")}function yle(e,t){const n=e.source.body;let r=0,o=3;for(;o<12;){const i=n.charCodeAt(t+o++);if(125===i){if(o<5||!Vd(r))break;return{value:String.fromCodePoint(r),size:o}}if(r=r<<4|Sf(i),r<0)break}throw ko(e.source,t,`Invalid Unicode escape sequence: "${n.slice(t,t+o)}".`)}function ble(e,t){const n=e.source.body,r=CN(n,t+2);if(Vd(r))return{value:String.fromCodePoint(r),size:6};if(mN(r)&&92===n.charCodeAt(t+6)&&117===n.charCodeAt(t+7)){const o=CN(n,t+8);if(vN(o))return{value:String.fromCodePoint(r,o),size:12}}throw ko(e.source,t,`Invalid Unicode escape sequence: "${n.slice(t,t+6)}".`)}function CN(e,t){return Sf(e.charCodeAt(t))<<12|Sf(e.charCodeAt(t+1))<<8|Sf(e.charCodeAt(t+2))<<4|Sf(e.charCodeAt(t+3))}function Sf(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function Tle(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:"\n",size:2};case 114:return{value:"\r",size:2};case 116:return{value:"\t",size:2}}throw ko(e.source,t,`Invalid character escape sequence: "${n.slice(t,t+2)}".`)}function Ele(e,t){const n=e.source.body,r=n.length;let o=e.lineStart,i=t+3,s=i,a="";const l=[];for(;i<r;){const c=n.charCodeAt(i);if(34===c&&34===n.charCodeAt(i+1)&&34===n.charCodeAt(i+2)){a+=n.slice(s,i),l.push(a);const u=So(e,rt.BLOCK_STRING,t,i+3,Ose(l).join("\n"));return e.line+=l.length-1,e.lineStart=o,u}if(92!==c||34!==n.charCodeAt(i+1)||34!==n.charCodeAt(i+2)||34!==n.charCodeAt(i+3))if(10!==c&&13!==c)if(Vd(c))++i;else{if(!z0(n,i))throw ko(e.source,i,`Invalid character within String: ${au(e,i)}.`);i+=2}else a+=n.slice(s,i),l.push(a),13===c&&10===n.charCodeAt(i+1)?i+=2:++i,a="",s=i,o=i;else a+=n.slice(s,i),s=i+1,i+=4}throw ko(e.source,i,"Unterminated string.")}function Ile(e,t){const n=e.source.body,r=n.length;let o=t+1;for(;o<r&&Rse(n.charCodeAt(o));)++o;return So(e,rt.NAME,t,o,n.slice(t,o))}const Sle=globalThis.process?function(t,n){return t instanceof n}:function(t,n){if(t instanceof n)return!0;if("object"==typeof t&&null!==t){var r;const o=n.prototype[Symbol.toStringTag];if(o===(Symbol.toStringTag in t?t[Symbol.toStringTag]:null===(r=t.constructor)||void 0===r?void 0:r.name)){const s=Y8(t);throw new Error(`Cannot use ${o} "${s}" from another module or realm.\n\nEnsure that there is only one instance of "graphql" in the node_modules\ndirectory. If different versions of "graphql" are the dependencies of other\nrelied on modules, use "resolutions" to ensure only one version is installed.\n\nhttps://yarnpkg.com/en/docs/selective-version-resolutions\n\nDuplicate "graphql" modules cannot be used at the same time since different\nversions may have different capabilities and behavior. The data from one\nversion used in the function from another could produce confusing and\nspurious results.`)}}return!1};class yN{constructor(t,n="GraphQL request",r={line:1,column:1}){"string"==typeof t||E0(!1,`Body must be a string. Received: ${Y8(t)}.`),this.body=t,this.name=n,this.locationOffset=r,this.locationOffset.line>0||E0(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||E0(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}}class Af{constructor(t,n={}){const{lexer:r,...o}=n;if(r)this._lexer=r;else{const i=function Ale(e){return Sle(e,yN)}(t)?t:new yN(t);this._lexer=new fle(i)}this._options=o,this._tokenCounter=0}get tokenCount(){return this._tokenCounter}parseName(){const t=this.expectToken(rt.NAME);return this.node(t,{kind:wt.NAME,value:t.value})}parseDocument(){return this.node(this._lexer.token,{kind:wt.DOCUMENT,definitions:this.many(rt.SOF,this.parseDefinition,rt.EOF)})}parseDefinition(){if(this.peek(rt.BRACE_L))return this.parseOperationDefinition();const t=this.peekDescription(),n=t?this._lexer.lookahead():this._lexer.token;if(t&&n.kind===rt.BRACE_L)throw ko(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are not supported on shorthand queries.");if(n.kind===rt.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 ko(this._lexer.source,this._lexer.token.start,"Unexpected description, only GraphQL definitions support descriptions.");if("extend"===n.value)return this.parseTypeSystemExtension()}throw this.unexpected(n)}parseOperationDefinition(){const t=this._lexer.token;if(this.peek(rt.BRACE_L))return this.node(t,{kind:wt.OPERATION_DEFINITION,operation:na.QUERY,description:void 0,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});const n=this.parseDescription(),r=this.parseOperationType();let o;return this.peek(rt.NAME)&&(o=this.parseName()),this.node(t,{kind:wt.OPERATION_DEFINITION,operation:r,description:n,name:o,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){const t=this.expectToken(rt.NAME);switch(t.value){case"query":return na.QUERY;case"mutation":return na.MUTATION;case"subscription":return na.SUBSCRIPTION}throw this.unexpected(t)}parseVariableDefinitions(){return this.optionalMany(rt.PAREN_L,this.parseVariableDefinition,rt.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:wt.VARIABLE_DEFINITION,description:this.parseDescription(),variable:this.parseVariable(),type:(this.expectToken(rt.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(rt.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){const t=this._lexer.token;return this.expectToken(rt.DOLLAR),this.node(t,{kind:wt.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:wt.SELECTION_SET,selections:this.many(rt.BRACE_L,this.parseSelection,rt.BRACE_R)})}parseSelection(){return this.peek(rt.SPREAD)?this.parseFragment():this.parseField()}parseField(){const t=this._lexer.token,n=this.parseName();let r,o;return this.expectOptionalToken(rt.COLON)?(r=n,o=this.parseName()):o=n,this.node(t,{kind:wt.FIELD,alias:r,name:o,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(rt.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(t){return this.optionalMany(rt.PAREN_L,t?this.parseConstArgument:this.parseArgument,rt.PAREN_R)}parseArgument(t=!1){const n=this._lexer.token,r=this.parseName();return this.expectToken(rt.COLON),this.node(n,{kind:wt.ARGUMENT,name:r,value:this.parseValueLiteral(t)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){const t=this._lexer.token;this.expectToken(rt.SPREAD);const n=this.expectOptionalKeyword("on");return!n&&this.peek(rt.NAME)?this.node(t,{kind:wt.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(t,{kind:wt.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.node(t,!0===this._options.allowLegacyFragmentVariables?{kind:wt.FRAGMENT_DEFINITION,description:n,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}:{kind:wt.FRAGMENT_DEFINITION,description:n,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if("on"===this._lexer.token.value)throw this.unexpected();return this.parseName()}parseValueLiteral(t){const n=this._lexer.token;switch(n.kind){case rt.BRACKET_L:return this.parseList(t);case rt.BRACE_L:return this.parseObject(t);case rt.INT:return this.advanceLexer(),this.node(n,{kind:wt.INT,value:n.value});case rt.FLOAT:return this.advanceLexer(),this.node(n,{kind:wt.FLOAT,value:n.value});case rt.STRING:case rt.BLOCK_STRING:return this.parseStringLiteral();case rt.NAME:switch(this.advanceLexer(),n.value){case"true":return this.node(n,{kind:wt.BOOLEAN,value:!0});case"false":return this.node(n,{kind:wt.BOOLEAN,value:!1});case"null":return this.node(n,{kind:wt.NULL});default:return this.node(n,{kind:wt.ENUM,value:n.value})}case rt.DOLLAR:if(t){if(this.expectToken(rt.DOLLAR),this._lexer.token.kind===rt.NAME)throw ko(this._lexer.source,n.start,`Unexpected variable "$${this._lexer.token.value}" in constant value.`);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:wt.STRING,value:t.value,block:t.kind===rt.BLOCK_STRING})}parseList(t){return this.node(this._lexer.token,{kind:wt.LIST,values:this.any(rt.BRACKET_L,()=>this.parseValueLiteral(t),rt.BRACKET_R)})}parseObject(t){return this.node(this._lexer.token,{kind:wt.OBJECT,fields:this.any(rt.BRACE_L,()=>this.parseObjectField(t),rt.BRACE_R)})}parseObjectField(t){const n=this._lexer.token,r=this.parseName();return this.expectToken(rt.COLON),this.node(n,{kind:wt.OBJECT_FIELD,name:r,value:this.parseValueLiteral(t)})}parseDirectives(t){const n=[];for(;this.peek(rt.AT);)n.push(this.parseDirective(t));return n}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(t){const n=this._lexer.token;return this.expectToken(rt.AT),this.node(n,{kind:wt.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(t)})}parseTypeReference(){const t=this._lexer.token;let n;if(this.expectOptionalToken(rt.BRACKET_L)){const r=this.parseTypeReference();this.expectToken(rt.BRACKET_R),n=this.node(t,{kind:wt.LIST_TYPE,type:r})}else n=this.parseNamedType();return this.expectOptionalToken(rt.BANG)?this.node(t,{kind:wt.NON_NULL_TYPE,type:n}):n}parseNamedType(){return this.node(this._lexer.token,{kind:wt.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(rt.STRING)||this.peek(rt.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(),o=this.many(rt.BRACE_L,this.parseOperationTypeDefinition,rt.BRACE_R);return this.node(t,{kind:wt.SCHEMA_DEFINITION,description:n,directives:r,operationTypes:o})}parseOperationTypeDefinition(){const t=this._lexer.token,n=this.parseOperationType();this.expectToken(rt.COLON);const r=this.parseNamedType();return this.node(t,{kind:wt.OPERATION_TYPE_DEFINITION,operation:n,type:r})}parseScalarTypeDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("scalar");const r=this.parseName(),o=this.parseConstDirectives();return this.node(t,{kind:wt.SCALAR_TYPE_DEFINITION,description:n,name:r,directives:o})}parseObjectTypeDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("type");const r=this.parseName(),o=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),s=this.parseFieldsDefinition();return this.node(t,{kind:wt.OBJECT_TYPE_DEFINITION,description:n,name:r,interfaces:o,directives:i,fields:s})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(rt.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(rt.BRACE_L,this.parseFieldDefinition,rt.BRACE_R)}parseFieldDefinition(){const t=this._lexer.token,n=this.parseDescription(),r=this.parseName(),o=this.parseArgumentDefs();this.expectToken(rt.COLON);const i=this.parseTypeReference(),s=this.parseConstDirectives();return this.node(t,{kind:wt.FIELD_DEFINITION,description:n,name:r,arguments:o,type:i,directives:s})}parseArgumentDefs(){return this.optionalMany(rt.PAREN_L,this.parseInputValueDef,rt.PAREN_R)}parseInputValueDef(){const t=this._lexer.token,n=this.parseDescription(),r=this.parseName();this.expectToken(rt.COLON);const o=this.parseTypeReference();let i;this.expectOptionalToken(rt.EQUALS)&&(i=this.parseConstValueLiteral());const s=this.parseConstDirectives();return this.node(t,{kind:wt.INPUT_VALUE_DEFINITION,description:n,name:r,type:o,defaultValue:i,directives:s})}parseInterfaceTypeDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("interface");const r=this.parseName(),o=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),s=this.parseFieldsDefinition();return this.node(t,{kind:wt.INTERFACE_TYPE_DEFINITION,description:n,name:r,interfaces:o,directives:i,fields:s})}parseUnionTypeDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("union");const r=this.parseName(),o=this.parseConstDirectives(),i=this.parseUnionMemberTypes();return this.node(t,{kind:wt.UNION_TYPE_DEFINITION,description:n,name:r,directives:o,types:i})}parseUnionMemberTypes(){return this.expectOptionalToken(rt.EQUALS)?this.delimitedMany(rt.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("enum");const r=this.parseName(),o=this.parseConstDirectives(),i=this.parseEnumValuesDefinition();return this.node(t,{kind:wt.ENUM_TYPE_DEFINITION,description:n,name:r,directives:o,values:i})}parseEnumValuesDefinition(){return this.optionalMany(rt.BRACE_L,this.parseEnumValueDefinition,rt.BRACE_R)}parseEnumValueDefinition(){const t=this._lexer.token,n=this.parseDescription(),r=this.parseEnumValueName(),o=this.parseConstDirectives();return this.node(t,{kind:wt.ENUM_VALUE_DEFINITION,description:n,name:r,directives:o})}parseEnumValueName(){if("true"===this._lexer.token.value||"false"===this._lexer.token.value||"null"===this._lexer.token.value)throw ko(this._lexer.source,this._lexer.token.start,`${j0(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(),o=this.parseConstDirectives(),i=this.parseInputFieldsDefinition();return this.node(t,{kind:wt.INPUT_OBJECT_TYPE_DEFINITION,description:n,name:r,directives:o,fields:i})}parseInputFieldsDefinition(){return this.optionalMany(rt.BRACE_L,this.parseInputValueDef,rt.BRACE_R)}parseTypeSystemExtension(){const t=this._lexer.lookahead();if(t.kind===rt.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()}throw this.unexpected(t)}parseSchemaExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");const n=this.parseConstDirectives(),r=this.optionalMany(rt.BRACE_L,this.parseOperationTypeDefinition,rt.BRACE_R);if(0===n.length&&0===r.length)throw this.unexpected();return this.node(t,{kind:wt.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(0===r.length)throw this.unexpected();return this.node(t,{kind:wt.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(),o=this.parseConstDirectives(),i=this.parseFieldsDefinition();if(0===r.length&&0===o.length&&0===i.length)throw this.unexpected();return this.node(t,{kind:wt.OBJECT_TYPE_EXTENSION,name:n,interfaces:r,directives:o,fields:i})}parseInterfaceTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");const n=this.parseName(),r=this.parseImplementsInterfaces(),o=this.parseConstDirectives(),i=this.parseFieldsDefinition();if(0===r.length&&0===o.length&&0===i.length)throw this.unexpected();return this.node(t,{kind:wt.INTERFACE_TYPE_EXTENSION,name:n,interfaces:r,directives:o,fields:i})}parseUnionTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");const n=this.parseName(),r=this.parseConstDirectives(),o=this.parseUnionMemberTypes();if(0===r.length&&0===o.length)throw this.unexpected();return this.node(t,{kind:wt.UNION_TYPE_EXTENSION,name:n,directives:r,types:o})}parseEnumTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");const n=this.parseName(),r=this.parseConstDirectives(),o=this.parseEnumValuesDefinition();if(0===r.length&&0===o.length)throw this.unexpected();return this.node(t,{kind:wt.ENUM_TYPE_EXTENSION,name:n,directives:r,values:o})}parseInputObjectTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");const n=this.parseName(),r=this.parseConstDirectives(),o=this.parseInputFieldsDefinition();if(0===r.length&&0===o.length)throw this.unexpected();return this.node(t,{kind:wt.INPUT_OBJECT_TYPE_EXTENSION,name:n,directives:r,fields:o})}parseDirectiveDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("directive"),this.expectToken(rt.AT);const r=this.parseName(),o=this.parseArgumentDefs(),i=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");const s=this.parseDirectiveLocations();return this.node(t,{kind:wt.DIRECTIVE_DEFINITION,description:n,name:r,arguments:o,repeatable:i,locations:s})}parseDirectiveLocations(){return this.delimitedMany(rt.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){const t=this._lexer.token,n=this.parseName();if(Object.prototype.hasOwnProperty.call(gN,n.value))return n;throw this.unexpected(t)}parseSchemaCoordinate(){const t=this._lexer.token,n=this.expectOptionalToken(rt.AT),r=this.parseName();let o,i;return!n&&this.expectOptionalToken(rt.DOT)&&(o=this.parseName()),(n||o)&&this.expectOptionalToken(rt.PAREN_L)&&(i=this.parseName(),this.expectToken(rt.COLON),this.expectToken(rt.PAREN_R)),this.node(t,n?i?{kind:wt.DIRECTIVE_ARGUMENT_COORDINATE,name:r,argumentName:i}:{kind:wt.DIRECTIVE_COORDINATE,name:r}:o?i?{kind:wt.ARGUMENT_COORDINATE,name:r,fieldName:o,argumentName:i}:{kind:wt.MEMBER_COORDINATE,name:r,memberName:o}:{kind:wt.TYPE_COORDINATE,name:r})}node(t,n){return!0!==this._options.noLocation&&(n.loc=new Zie(t,this._lexer.lastToken,this._lexer.source)),n}peek(t){return this._lexer.token.kind===t}expectToken(t){const n=this._lexer.token;if(n.kind===t)return this.advanceLexer(),n;throw ko(this._lexer.source,n.start,`Expected ${bN(t)}, found ${j0(n)}.`)}expectOptionalToken(t){return this._lexer.token.kind===t&&(this.advanceLexer(),!0)}expectKeyword(t){const n=this._lexer.token;if(n.kind!==rt.NAME||n.value!==t)throw ko(this._lexer.source,n.start,`Expected "${t}", found ${j0(n)}.`);this.advanceLexer()}expectOptionalKeyword(t){const n=this._lexer.token;return n.kind===rt.NAME&&n.value===t&&(this.advanceLexer(),!0)}unexpected(t){const n=t??this._lexer.token;return ko(this._lexer.source,n.start,`Unexpected ${j0(n)}.`)}any(t,n,r){this.expectToken(t);const o=[];for(;!this.expectOptionalToken(r);)o.push(n.call(this));return o}optionalMany(t,n,r){if(this.expectOptionalToken(t)){const o=[];do{o.push(n.call(this))}while(!this.expectOptionalToken(r));return o}return[]}many(t,n,r){this.expectToken(t);const o=[];do{o.push(n.call(this))}while(!this.expectOptionalToken(r));return o}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!==rt.EOF&&(++this._tokenCounter,void 0!==t&&this._tokenCounter>t))throw ko(this._lexer.source,n.start,`Document contains more that ${t} tokens. Parsing aborted.`)}}function j0(e){const t=e.value;return bN(e.kind)+(null!=t?` "${t}"`:"")}function bN(e){return function ple(e){return e===rt.BANG||e===rt.DOLLAR||e===rt.AMP||e===rt.PAREN_L||e===rt.PAREN_R||e===rt.DOT||e===rt.SPREAD||e===rt.COLON||e===rt.EQUALS||e===rt.AT||e===rt.BRACKET_L||e===rt.BRACKET_R||e===rt.BRACE_L||e===rt.PIPE||e===rt.BRACE_R}(e)?`"${e}"`:e}var G0=new Map,r4=new Map,TN=!0,$0=!1;function EN(e){return e.replace(/[\s,]+/g," ").trim()}function Rle(e){var t=EN(e);if(!G0.has(t)){var n=function xle(e,t){const n=new Af(e,t),r=n.parseDocument();return Object.defineProperty(r,"tokenCount",{enumerable:!1,value:n.tokenCount}),r}(e,{experimentalFragmentVariables:$0,allowLegacyFragmentVariables:$0});if(!n||"Document"!==n.kind)throw new Error("Not a valid GraphQL document.");G0.set(t,function kle(e){var t=new Set(e.definitions);t.forEach(function(r){r.loc&&delete r.loc,Object.keys(r).forEach(function(o){var i=r[o];i&&"object"==typeof i&&t.add(i)})});var n=e.loc;return n&&(delete n.startToken,delete n.endToken),e}(function Nle(e){var t=new Set,n=[];return e.definitions.forEach(function(r){if("FragmentDefinition"===r.kind){var o=r.name.value,i=function Mle(e){return EN(e.source.body.substring(e.start,e.end))}(r.loc),s=r4.get(o);s&&!s.has(i)?TN&&console.warn("Warning: fragment with name "+o+" already exists.\ngraphql-tag enforces all fragment names across your application to be unique; read more about\nthis in the docs: http://dev.apollodata.com/core/fragments.html#unique-names"):s||r4.set(o,s=new Set),s.add(i),t.has(i)||(t.add(i),n.push(r))}else n.push(r)}),Mh(Mh({},e),{definitions:n})}(n)))}return G0.get(t)}function zd(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];"string"==typeof e&&(e=[e]);var r=e[0];return t.forEach(function(o,i){r+=o&&"Document"===o.kind?o.loc.source.body:o,r+=e[i+1]}),Rle(r)}var wf_gql=zd,wf_resetCaches=function Ole(){G0.clear(),r4.clear()},wf_disableFragmentWarnings=function Ple(){TN=!1},wf_enableExperimentalFragmentVariables=function Ble(){$0=!0},wf_disableExperimentalFragmentVariables=function Fle(){$0=!1};(function(e){e.gql=wf_gql,e.resetCaches=wf_resetCaches,e.disableFragmentWarnings=wf_disableFragmentWarnings,e.enableExperimentalFragmentVariables=wf_enableExperimentalFragmentVariables,e.disableExperimentalFragmentVariables=wf_disableExperimentalFragmentVariables})(zd||(zd={})),zd.default=zd;const Vle=new class Ule extends hM{}(class Hle extends _M{constructor(t,n){super(t,n),this.scheduler=t,this.work=n}schedule(t,n=0){return n>0?super.schedule(t,n):(this.delay=n,this.state=t,this.scheduler.flush(this),this)}execute(t,n){return n>0||this.closed?super.execute(t,n):this._execute(t,n)}requestAsyncId(t,n,r=0){return null!=r&&r>0||null==r&&this.delay>0?super.requestAsyncId(t,n,r):(t.flush(this),0)}});function SN(e){return new Ot(t=>(e().then(n=>{t.closed||(t.next(n),t.complete())},n=>{t.closed||t.error(n)}),()=>t.unsubscribe()))}class Gle{zone;constructor(t){this.zone=t}now=Date.now;schedule(t,n=0,r){return this.zone.run(()=>Vle.schedule(t,n,r))}}function o4(e,t){return e.pipe(B7(new Gle(t)))}class $le{obsQuery;valueChanges;constructor(t,n){this.obsQuery=t,this.valueChanges=o4(Ys(this.obsQuery),n)}get options(){return this.obsQuery.options}get variables(){return this.obsQuery.variables}getCurrentResult(){return this.obsQuery.getCurrentResult()}refetch(t){return this.obsQuery.refetch(t)}fetchMore(t){return this.obsQuery.fetchMore(t)}subscribeToMore(t){return this.obsQuery.subscribeToMore(t)}updateQuery(t){return this.obsQuery.updateQuery(t)}stopPolling(){return this.obsQuery.stopPolling()}startPolling(t){return this.obsQuery.startPolling(t)}setVariables(t){return this.obsQuery.setVariables(t)}reobserve(t){return this.obsQuery.reobserve(t)}}const i4=new ut("APOLLO_FLAGS"),AN=new ut("APOLLO_OPTIONS"),wN=new ut("APOLLO_NAMED_OPTIONS");class DN{ngZone;flags;_client;useMutationLoading;constructor(t,n,r){this.ngZone=t,this.flags=n,this._client=r,this.useMutationLoading=n?.useMutationLoading??!1}watchQuery(t){return new $le(this.ensureClient().watchQuery({...t}),this.ngZone)}query(t){return SN(()=>this.ensureClient().query({...t}))}mutate(t){return function jle(e,t){return t?e.pipe(ur(n=>({...n,loading:!1})),function zle(...e){const t=O2(e);return Ri((n,r)=>{(t?yf(e,n,t):yf(e,n)).subscribe(r)})}({data:void 0,loading:!0})):e.pipe(ur(n=>({...n,loading:!1})))}(SN(()=>this.ensureClient().mutate({...t})),t.useMutationLoading??this.useMutationLoading)}watchFragment(t){const{useZone:n,...r}=t,o=this.ensureClient().watchFragment({...r});return!0!==n?o:o4(o,this.ngZone)}subscribe(t){const{useZone:n,...r}=t,o=this.ensureClient().subscribe({...r});return!0!==n?o:o4(o,this.ngZone)}get client(){return this.ensureClient()}set client(t){if(this._client)throw new Error("Client has been already defined");this._client=t}ensureClient(){return this.checkInstance(),this._client}checkInstance(){if(this._client)return!0;throw new Error("Client has not been defined yet")}}let s4=(()=>{class e extends DN{map=new Map;constructor(n,r,o,i){if(super(n,i),r&&this.createDefault(r),o&&"object"==typeof o)for(let s in o)o.hasOwnProperty(s)&&this.create(o[s],s)}create(n,r){a4(r)?this.createNamed(r,n):this.createDefault(n)}default(){return this}use(n){return a4(n)?this.map.get(n):this.default()}createDefault(n){if(this._client)throw new Error("Apollo has been already created.");this.client=this.ngZone.runOutsideAngular(()=>new J3(n))}createNamed(n,r){if(this.map.has(n))throw new Error(`Client ${n} has been already created`);this.map.set(n,new DN(this.ngZone,this.flags,this.ngZone.runOutsideAngular(()=>new J3(r))))}removeClient(n){a4(n)?this.map.delete(n):this._client=void 0}static \u0275fac=function(r){return new(r||e)($t(mr),$t(AN,8),$t(wN,8),$t(i4,8))};static \u0275prov=Fe({token:e,factory:e.\u0275fac})}return e})();function a4(e){return!!e&&"default"!==e}const l4=zd,q0=(e,t)=>e&&t?[...e.keys()].reduce((n,r)=>n.set(r,e.get(r)),t):t||e;const c4={batchInterval:10,batchMax:10,uri:"graphql",method:"POST",withCredentials:!1,includeQuery:!0,includeExtensions:!1,useMultipart:!1};function Ga(e,t,n){return function W0(...e){return e.find(t=>typeof t<"u")}(e[n],t[n],c4[n])}class Zle extends hi{httpClient;options;requester;print=x0;constructor(t,n){super(),this.httpClient=t,this.options=n,this.options.operationPrinter&&(this.print=this.options.operationPrinter),this.requester=r=>new Ot(o=>{const i=r.getContext();let s=Ga(i,this.options,"method");const a=Ga(i,this.options,"includeQuery"),l=Ga(i,this.options,"includeExtensions"),c=Ga(i,this.options,"uri"),u=Ga(i,this.options,"withCredentials"),d=Ga(i,this.options,"useMultipart"),f=!0===this.options.useGETForQueries,C=q0(i.httpContext,q0(this.options.httpContext,new h8)),P=r.query.definitions.some(he=>"OperationDefinition"===he.kind&&"query"===he.operation);f&&P&&(s="GET");const G={method:s,url:"function"==typeof c?c(r):c,body:{operationName:r.operationName,variables:r.variables},options:{withCredentials:u,useMultipart:d,headers:this.options.headers,context:C}};l&&(G.body.extensions=r.extensions),a&&(G.body.query=this.print(r.query));const W=function MN(e){let t=e.headers&&e.headers instanceof _i?e.headers:new _i(e.headers);if(e.clientAwareness){const{name:n,version:r}=e.clientAwareness;n&&!t.has("apollographql-client-name")&&(t=t.set("apollographql-client-name",n)),r&&!t.has("apollographql-client-version")&&(t=t.set("apollographql-client-version",r))}return t}(i);G.options.headers=((e,t)=>e&&t?t.keys().reduce((r,o)=>r.set(o,t.getAll(o)),e):t||e)(G.options.headers,W);const ie=((e,t,n)=>{const r=-1!==["POST","PUT","PATCH"].indexOf(e.method.toUpperCase()),i=e.body.length;let a,s=e.options&&e.options.useMultipart;if(s){if(i)return new Ot(c=>c.error(new Error("File upload is not available when combined with Batching")));if(!r)return new Ot(c=>c.error(new Error("File upload is not available when GET is used")));if(!n)return new Ot(c=>c.error(new Error('To use File upload you need to pass "extractFiles" function from "extract-files" library to HttpLink\'s options')));a=n(e.body),s=!!a.files.size}let l={};if(i){if(!r)return new Ot(c=>c.error(new Error("Batching is not available for GET requests")));l={body:e.body}}else l=r?{body:s?a.clone:e.body}:{params:Object.keys(e.body).reduce((d,f)=>{const C=e.body[f];return d[f]=-1!==["variables","extensions"].indexOf(f.toLowerCase())?JSON.stringify(C):C,d},{})};if(s&&r){const c=new FormData;c.append("operations",JSON.stringify(l.body));const u={},d=a.files;let f=0;d.forEach(C=>{u[++f]=C}),c.append("map",JSON.stringify(u)),f=0,d.forEach((C,P)=>{c.append(++f+"",P,P.name)}),l.body=c}return t.request(e.method,e.url,{observe:"response",responseType:"json",reportProgress:!1,...l,...e.options})})(G,this.httpClient,this.options.extractFiles).subscribe({next:he=>{r.setContext({response:he}),o.next(he.body)},error:he=>o.error(he),complete:()=>o.complete()});return()=>{ie.closed||ie.unsubscribe()}})}request(t){return this.requester(t)}}let Yle=(()=>{class e{httpClient;constructor(n){this.httpClient=n}create(n){return new Zle(this.httpClient,n)}static \u0275fac=function(r){return new(r||e)($t(kl))};static \u0275prov=Fe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function NN(e,t){this.v=e,this.k=t}function u4(e){return new NN(e,0)}function d4(e){return function(){return new Df(e.apply(this,arguments))}}function Df(e){var t,n;function r(i,s){try{var a=e[i](s),l=a.value,c=l instanceof NN;Promise.resolve(c?l.v:l).then(function(u){if(c){var d="return"===i?"return":"next";if(!l.k||u.done)return r(d,u);u=e[d](u).value}o(a.done?"return":"normal",u)},function(u){r("throw",u)})}catch(u){o("throw",u)}}function o(i,s){switch(i){case"return":t.resolve({value:s,done:!0});break;case"throw":t.reject(s);break;default:t.resolve({value:s,done:!1})}(t=t.next)?r(t.key,t.arg):n=null}this._invoke=function(i,s){return new Promise(function(a,l){var c={key:i,arg:s,resolve:a,reject:l,next:null};n?n=n.next=c:(t=n=c,r(i,s))})},"function"!=typeof e.return&&(this.return=void 0)}function _4(e){var t,n,r,o=2;for(typeof Symbol<"u"&&(n=Symbol.asyncIterator,r=Symbol.iterator);o--;){if(n&&null!=(t=e[n]))return t.call(e);if(r&&null!=(t=e[r]))return new Z0(t.call(e));n="@@asyncIterator",r="@@iterator"}throw new TypeError("Object is not async iterable")}function Z0(e){function t(n){if(Object(n)!==n)return Promise.reject(new TypeError(n+" is not an object."));var r=n.done;return Promise.resolve(n.value).then(function(o){return{value:o,done:r}})}return(Z0=function(r){this.s=r,this.n=r.next}).prototype={s:null,n:null,next:function(){return t(this.n.apply(this.s,arguments))},return:function(r){var o=this.s.return;return void 0===o?Promise.resolve({value:r,done:!0}):t(o.apply(this.s,arguments))},throw:function(r){var o=this.s.return;return void 0===o?Promise.reject(r):t(o.apply(this.s,arguments))}},new Z0(e)}function Qle(e){if("next"!==e&&"complete"!==e)throw new Error(`Invalid stream event "${e}"`);return e}function Jle(e,t){if(t)try{t=JSON.parse(t)}catch{throw new Error("Invalid stream data")}if("next"===e&&!t)throw new Error('Stream data must be an object for "next" events');return t||null}Df.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},Df.prototype.next=function(e){return this._invoke("next",e)},Df.prototype.throw=function(e){return this._invoke("throw",e)},Df.prototype.return=function(e){return this._invoke("return",e)};var jd=function(e){return e[e.NewLine=10]="NewLine",e[e.CarriageReturn=13]="CarriageReturn",e[e.Space=32]="Space",e[e.Colon=58]="Colon",e}(jd||{});class ys extends Error{constructor(t){let n,r;!function rce(e){return function tce(e){return"object"==typeof e&&null!==e}(e)&&"boolean"==typeof e.ok&&"number"==typeof e.status&&"string"==typeof e.statusText}(t)?n=t instanceof Error?t.message:String(t):(r=t,n="Server responded with "+t.status+": "+t.statusText),super(n),this.name=this.constructor.name,this.response=r}}function kN(e){return h4.apply(this,arguments)}function h4(){return h4=(0,K.A)(function*(e){const{signal:t,url:n,credentials:r,headers:o,body:i,referrer:s,referrerPolicy:a,fetchFn:l,onMessage:c}=e,u={},d={};let f;try{f=yield l(n,{signal:t,method:i?"POST":"GET",credentials:r,referrer:s,referrerPolicy:a,headers:{...o,accept:"text/event-stream"},body:i})}catch(G){throw new ys(G)}if(!f.ok)throw new ys(f);if(!f.body)throw new Error("Missing response body");let P,C=null;return(0,K.A)(function*(){var G;try{const St=function ece(){let e,t,n,r=!1,o={event:"",data:""},i=[];const s=new TextDecoder;return function(l){if(void 0===e)e=l,t=0,n=-1;else{const d=new Uint8Array(e.length+l.length);d.set(e),d.set(l,e.length),e=d}const c=e.length;let u=0;for(;t<c;){r&&(e[t]===jd.NewLine&&(u=++t),r=!1);let d=-1;for(;t<c&&-1===d;++t)switch(e[t]){case jd.Colon:-1===n&&(n=t-u);break;case jd.CarriageReturn:r=!0;case jd.NewLine:d=t}if(-1===d)break;if(u===d){if(o.event||o.data){if(!o.event)throw new Error("Missing message event");const f=Qle(o.event),C=Jle(f,o.data);i.push({event:f,data:C}),o={event:"",data:""}}}else if(n>0){const f=e.subarray(u,d),C=s.decode(f.subarray(0,n)),G=s.decode(f.subarray(n+(f[n+1]===jd.Space?2:1)));switch(C){case"event":o.event=G;break;case"data":o.data=o.data?o.data+"\n"+G:G}}u=t,n=-1}if(u===c){e=void 0;const d=[...i];return i=[],d}0!==u&&(e=e.subarray(u),t-=u)}}();var he,W=!1,ie=!1;try{for(var st,qe=_4(function oce(e){return"function"==typeof Object(e)[Symbol.asyncIterator]?e:d4(function*(){const t=e.getReader();let n;do{n=yield u4(t.read()),void 0!==n.value&&(yield n.value)}while(!n.done)})()}(f.body));W=!(st=yield qe.next()).done;W=!1){const jt=st.value;{if("string"==typeof jt)throw C=new Error(`Unexpected string chunk "${jt}"`);let wn;try{wn=St(jt)}catch(Jt){throw C=Jt}if(!wn)continue;for(const Jt of wn){try{c?.(Jt)}catch(Ln){throw C=Ln}const zn=Jt.data&&"id"in Jt.data?Jt.data.id:"";switch(zn in d||(d[zn]=[]),Jt.event){case"next":d[zn].push(zn?Jt.data.payload:Jt.data);break;case"complete":d[zn].push("complete");break;default:throw C=new Error(`Unexpected message event "${Jt.event}"`)}null===(G=u[zn])||void 0===G||G.proceed()}}}}catch(jt){ie=!0,he=jt}finally{try{W&&null!=qe.return&&(yield qe.return())}finally{if(ie)throw he}}if(Object.keys(u).length)throw new Error("Connection closed while having active streams")}catch(St){C=!C&&Object.keys(u).length?new ys(St):St,P?.(C)}finally{Object.values(u).forEach(({proceed:St})=>St())}})(),{url:n,headers:o,waitForThrow:()=>new Promise((G,W)=>{if(C)return W(C);P=W}),getResults:G=>d4(function*(){var W;const{signal:ie,operationId:he=""}=G??{};try{for(;;){for(;null!==(W=d[he])&&void 0!==W&&W.length;){const qe=d[he].shift();if("complete"===qe)return;yield qe}if(C)throw C;if(ie?.aborted)throw new Error("Getting results aborted by the client");yield u4(new Promise(qe=>{const st=()=>{ie?.removeEventListener("abort",st),delete u[he],qe()};ie?.addEventListener("abort",st),u[he]={proceed:st}}))}}finally{delete d[he]}})()}}),h4.apply(this,arguments)}class ice extends hi{constructor(t){super(),this.client=function nce(e){const{singleConnection:t=!1,lazy:n=!0,lazyCloseTimeout:r=0,onNonLazyError:o=console.error,generateID:i=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,zn=>{const Ln=16*Math.random()|0;return("x"==zn?Ln:3&Ln|8).toString(16)})},retryAttempts:s=5,retry:a=function(){var Jt=(0,K.A)(function*(Ln){let Qn=1e3;for(let wi=0;wi<Ln;wi++)Qn*=2;yield new Promise(wi=>setTimeout(wi,Qn+Math.floor(2700*Math.random()+300)))});return function zn(Ln){return Jt.apply(this,arguments)}}(),credentials:l="same-origin",referrer:c,referrerPolicy:u,onMessage:d,on:f}=e,C=e.fetchFn||fetch,P=e.abortControllerImpl||AbortController,G=(()=>{let Jt=!1;const zn=[];return{get disposed(){return Jt},onDispose:Ln=>Jt?(setTimeout(()=>Ln(),0),()=>{}):(zn.push(Ln),()=>{zn.splice(zn.indexOf(Ln),1)}),dispose(){if(!Jt){Jt=!0;for(const Ln of[...zn])Ln()}}}})();let W,ie,he=0,qe=null,st=0;function St(){return jt.apply(this,arguments)}function jt(){return(jt=(0,K.A)(function*(){try{if(G.disposed)throw new Error("Client has been disposed");return yield ie??(ie=(0,K.A)(function*(){var Jt,zn,Ln;if(qe){if(yield a(st),W.signal.aborted)throw new Error("Connection aborted by the client");st++}null===(Jt=f?.connecting)||void 0===Jt||Jt.call(f,!!qe),W=new P;const Qn=G.onDispose(()=>W.abort());W.signal.addEventListener("abort",()=>{Qn(),ie=void 0});const wi=e,Co="function"==typeof wi.url?yield wi.url(void 0):wi.url;if(W.signal.aborted)throw new Error("Connection aborted by the client");const Lo="function"==typeof wi.headers?yield wi.headers(void 0):null!==(zn=wi.headers)&&void 0!==zn?zn:{};if(W.signal.aborted)throw new Error("Connection aborted by the client");let Ro;try{Ro=yield C(Co,{signal:W.signal,method:"PUT",credentials:l,referrer:c,referrerPolicy:u,headers:Lo})}catch(Ts){throw new ys(Ts)}if(201!==Ro.status)throw new ys(Ro);const ua=yield Ro.text();Lo["x-graphql-event-stream-token"]=ua;const Ya=yield kN({signal:W.signal,headers:Lo,credentials:l,referrer:c,referrerPolicy:u,url:Co,fetchFn:C,onMessage:Ts=>{var da;null===(da=f?.message)||void 0===da||da.call(f,Ts),d?.(Ts)}});return null===(Ln=f?.connected)||void 0===Ln||Ln.call(f,!!qe),Ya.waitForThrow().catch(()=>ie=void 0),Ya})())}catch(Jt){throw ie=void 0,Jt}})).apply(this,arguments)}function wn(Jt,zn,Ln){if(!t){const Co=new P,Lo=G.onDispose(()=>{Lo(),Co.abort()});return(0,K.A)(function*(){var Ro,ua,Ya,Ts,da;let Di=null,du=0;for(;;)try{if(Di){if(yield a(du),Co.signal.aborted)throw new Error("Connection aborted by the client");du++}null===(Ro=f?.connecting)||void 0===Ro||Ro.call(f,!!Di),null===(ua=Ln?.connecting)||void 0===ua||ua.call(Ln,!!Di);const as=e,hpe="function"==typeof as.url?yield as.url(Jt):as.url;if(Co.signal.aborted)throw new Error("Connection aborted by the client");const fpe="function"==typeof as.headers?yield as.headers(Jt):null!==(Ya=as.headers)&&void 0!==Ya?Ya:{};if(Co.signal.aborted)throw new Error("Connection aborted by the client");const{getResults:ppe}=yield kN({signal:Co.signal,headers:{...fpe,"content-type":"application/json; charset=utf-8"},credentials:l,referrer:c,referrerPolicy:u,url:hpe,body:JSON.stringify(Jt),fetchFn:C,onMessage:hu=>{var $4,q4;null===($4=f?.message)||void 0===$4||$4.call(f,hu),null===(q4=Ln?.message)||void 0===q4||q4.call(Ln,hu),d?.(hu)}});null===(Ts=f?.connected)||void 0===Ts||Ts.call(f,!!Di),null===(da=Ln?.connected)||void 0===da||da.call(Ln,!!Di);var _a,Uf=!1,Xd=!1;try{for(var _u,Jl=_4(ppe());Uf=!(_u=yield Jl.next()).done;Uf=!1)Di=null,du=0,zn.next(_u.value)}catch(hu){Xd=!0,_a=hu}finally{try{Uf&&null!=Jl.return&&(yield Jl.return())}finally{if(Xd)throw _a}}return Co.abort()}catch(as){if(Co.signal.aborted)return;if(!(as instanceof ys)||!s||du>=s)throw as;Di=as}})().then(()=>zn.complete()).catch(Ro=>zn.error(Ro)),()=>Co.abort()}he++;const Qn=new P,wi=G.onDispose(()=>{wi(),Qn.abort()});return(0,K.A)(function*(){const Co=i();Jt={...Jt,extensions:{...Jt.extensions,operationId:Co}};let Lo=null;for(;;){Lo=null;try{const{url:Di,headers:du,getResults:Uf}=yield St();let Xd;try{Xd=yield C(Di,{signal:Qn.signal,method:"POST",credentials:l,referrer:c,referrerPolicy:u,headers:{...du,"content-type":"application/json; charset=utf-8"},body:JSON.stringify(Jt)})}catch(_a){throw new ys(_a)}if(202!==Xd.status)throw new ys(Xd);Lo=function(){var _a=(0,K.A)(function*(){let Jl;try{const _u=new P,as=G.onDispose(()=>{as(),_u.abort()});Jl=yield C(Di+"?operationId="+Co,{signal:_u.signal,method:"DELETE",credentials:l,referrer:c,referrerPolicy:u,headers:du})}catch(_u){throw new ys(_u)}if(200!==Jl.status)throw new ys(Jl)});return function(){return _a.apply(this,arguments)}}();var Ya,Ro=!1,ua=!1;try{for(var da,Ts=_4(Uf({signal:Qn.signal,operationId:Co}));Ro=!(da=yield Ts.next()).done;Ro=!1)qe=null,st=0,zn.next(da.value)}catch(_a){ua=!0,Ya=_a}finally{try{Ro&&null!=Ts.return&&(yield Ts.return())}finally{if(ua)throw Ya}}return Lo=null,Qn.abort()}catch(Di){if(Qn.signal.aborted)return yield Lo?.();if(!(Di instanceof ys)||(n&&(ie=void 0),!s||st>=s))throw Qn.abort(),Di;qe=Di}finally{Qn.signal.aborted&&0===--he&&(isFinite(r)&&r>0?setTimeout(()=>{he||W.abort()},r):W.abort())}}})().then(()=>zn.complete()).catch(Co=>zn.error(Co)),()=>Qn.abort()}return t&&!n&&(0,K.A)(function*(){for(he++;;)try{const{waitForThrow:Jt}=yield St();yield Jt()}catch(Jt){if(G.disposed)return;if(!(Jt instanceof ys)||(ie=void 0,!s||st>=s))return o?.(Jt);qe=Jt}})(),{subscribe:wn,iterate(Jt,zn){const Ln=[],Qn={done:!1,error:null,resolve:()=>{}},wi=wn(Jt,{next(Lo){Ln.push(Lo),Qn.resolve()},error(Lo){Qn.done=!0,Qn.error=Lo,Qn.resolve()},complete(){Qn.done=!0,Qn.resolve()}},zn),Co=(Lo=d4(function*(){for(;;){for(Ln.length||(yield u4(new Promise(ua=>Qn.resolve=ua)));Ln.length;)yield Ln.shift();if(Qn.error)throw Qn.error;if(Qn.done)return}}),function Ro(){return Lo.apply(this,arguments)})();var Lo;return Co.throw=function(){var Lo=(0,K.A)(function*(Ro){return Qn.done||(Qn.done=!0,Qn.error=Ro,Qn.resolve()),{done:!0,value:void 0}});return function(Ro){return Lo.apply(this,arguments)}}(),Co.return=(0,K.A)(function*(){return wi(),{done:!0,value:void 0}}),Co},dispose(){G.dispose()}}}(t)}request(t){return new Ot(n=>this.client.subscribe({...t,query:x0(t.query)},{next:n.next.bind(n),complete:n.complete.bind(n),error:n.error.bind(n)}))}}const sce={run:e=>e(),runOutsideAngular:e=>e()};let RN=(()=>{class e{constructor(){this.httpLink=pe(Yle),this.gatewayService=pe(Ex),this.apollo=(n,r=!1)=>new s4(sce,this.createApolloOptions(n,r))}createApolloOptions(n,r=!1){const o=new XM(l=>{const c=l.headers instanceof _i?l.headers:new _i(l.headers??{});return{...l,uri:()=>this.gatewayService.getGatewayUrl(n,r),headers:c.set("Authorization",`Bearer ${n.token}`).set("Accept","charset=utf-8")}}),i=cse(({query:l})=>{const c=E3(l);return"OperationDefinition"===c.kind&&"subscription"===c.operation},new ice({url:()=>this.gatewayService.getGatewayUrl(n,r),headers:()=>({Authorization:`Bearer ${n.token}`})}),this.httpLink.create({}));return{link:hi.from([o,i]),cache:new KM}}static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275prov=Fe({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var Gd=_t(7184);let Y0=(()=>{class e{constructor(){this.apolloFactory=pe(RN),this.luigiCoreService=pe(mo)}read(n,r,o,i,s=!0){const a=O(i),l=this.getNamespace(i);let c=this.resolveReadQuery(r,o,n,a?l:void 0);return c=this.parseGQLQuery(c),this.apolloFactory.apollo(i,s).query({query:c,variables:{name:n,...a&&{namespace:l}}}).pipe(ur(u=>E(u.data,N(r,"."))))}resolveReadQuery(n,r,o,i){if(r instanceof Array){const{entity:s,version:a,apiGroup:l}=n,c=[{operation:s,variables:{name:{value:o,type:"String!"},...i&&{namespace:{value:i,type:"String"}}},fields:r}],u=this.calcQueryOptions(c,[{operation:l},{operation:a}]);return Gd.P(u).query}return r}list(n,r,o,i=!1,s){const l={...O(o)&&{namespace:{type:"String",value:this.getNamespace(o)}},...s?.limit&&{limit:{type:"Int",value:s?.limit}},...s?.continue&&{continue:{type:"String",value:s?.continue}}},c=o.resourceDefinition;return c?r instanceof Array?this.listWithFields(c,r,o,i,l):this.listWithRawQuery(n,r,o,i,l):Wl(()=>new Error("Resource definition is required"))}getResourceReadyStatus(n,r){const o=r.resourceDefinition?.readyCondition;return!o||D(n,o)}listWithFields(n,r,o,i,s){const{apiGroup:a,entityCollection:l,version:c}=n,d=this.calcQueryOptions([{operation:l,variables:s,fields:["resourceVersion","remainingItemCount","continue",{items:r}]}],[{operation:a},{operation:c}]),f=Gd.P(d),C=this.parseGQLQuery(f.query);return this.apolloFactory.apollo(o,i).query({query:C,variables:f.variables}).pipe(ur(P=>{const G=E(P.data,N({apiGroup:a,version:c,entity:l},"."));if(!G)throw new Error("Resource list result not found");return G}),ur(P=>{const G=P.items.map(W=>({...W,ready:this.getResourceReadyStatus(W,o)})).map(W=>({...W,isAvailable:this.isAvailable(W),accessibleName:this.getAccessibleName(W)}));return{...P,items:G}}))}isAvailable(n){return!!n.ready&&!n.metadata?.deletionTimestamp}getAccessibleName(n){return n.metadata?.deletionTimestamp?"Resource is pending deletion":n.ready?void 0:"Resource is not ready"}listWithRawQuery(n,r,o,i,s){const a=this.parseGQLQuery(r);return this.apolloFactory.apollo(o,i).query({query:a,variables:this.normalizeGqlBuilderVariables(s)}).pipe(ur(l=>E(l.data,n)??[]),za(l=>(this.alertErrors(l),console.error("Error executing GraphQL query.",l),Wl(()=>l))))}resourceChangeSubscription(n,r,o,i,s){const l={...O(o)&&{namespace:{type:"String",value:this.getNamespace(o)}}},c=n.toLowerCase(),u=Gd.gP({operation:c,fields:["type",{object:r}],variables:{...l,resourceVersion:{type:"String",value:i}}}),d=this.parseGQLQuery(u.query);return this.apolloFactory.apollo(o,s).subscribe({query:d,variables:u.variables}).pipe(ur(f=>{const C=E(f.data,c);return C&&(C.object.ready=this.getResourceReadyStatus(C.object,o),C.object.isAvailable=this.isAvailable(C.object),C.object.accessibleName=this.getAccessibleName(C.object)),C}))}alertErrors(n){this.luigiCoreService.showAlert({text:n.message,type:"error"})}delete(n,r,o,i=!1){const s=O(o),{apiGroup:a,entity:l,version:c}=r,u=[{operation:`delete${l}`,variables:{name:{type:"String!",value:n.metadata.name},...s&&{namespace:{type:"String",value:this.getNamespace(o)}}},fields:[]}],d=this.calcQueryOptions(u,[{operation:a},{operation:c}]),f=Gd.gO(d),C=this.parseGQLQuery(f.query);return this.apolloFactory.apollo(o,i).mutate({mutation:C,variables:f.variables}).pipe(za(P=>(this.alertErrors(P),console.error("Error executing GraphQL query.",P),Wl(()=>P))))}create(n,r,o){const i=O(o),{apiGroup:s,entity:a,version:l}=r,c=this.getNamespace(o),u=[{operation:`create${a}`,variables:{...i&&{namespace:{type:"String",value:c}},object:{type:`${a}Input!`,value:n}},fields:["__typename"]}],d=this.calcQueryOptions(u,[{operation:s},{operation:l}]),f=Gd.gO(d),C=this.parseGQLQuery(f.query);return this.apolloFactory.apollo(o).mutate({mutation:C,fetchPolicy:"no-cache",variables:f.variables}).pipe(za(P=>(this.alertErrors(P),console.error("Error executing GraphQL query.",P),Wl(()=>P))))}update(n,r,o,i=!1,s=["__typename"]){const a=O(o),{apiGroup:l,entity:c,version:u}=r,d=this.getNamespace(o),f=$(n),C=[{operation:`update${c}`,variables:{...a&&{namespace:{type:"String",value:d}},name:{type:"String!",value:n.metadata.name},object:{type:`${c}Input!`,value:f}},fields:s}],P=this.calcQueryOptions(C,[{operation:l},{operation:u}]),G=Gd.gO(P),W=this.parseGQLQuery(G.query);return this.apolloFactory.apollo(o,i).mutate({mutation:W,fetchPolicy:"no-cache",variables:G.variables}).pipe(ur(ie=>E(ie.data,N({apiGroup:l,entity:`update${c}`,version:u},"."))),za(ie=>(this.alertErrors(ie),console.error("Error executing GraphQL query.",ie),Wl(()=>ie))))}getNamespace(n,r){if(n.namespaceId)return n.namespaceId;if(r?.metadata?.namespace)return r.metadata.namespace;const o=this.luigiCoreService.routing().getSearchParams().namespace;return o?"-all-"===o?void 0:o:void 0}normalizeGqlBuilderVariables(n){return Object.fromEntries(Object.entries(n).map(([r,o])=>[r,o.value]))}calcQueryOptions(n,r){const o=r.filter(a=>!!a?.operation);if(0===o.length){const a=n.pop();if(a&&a.operation&&a.fields)return a;throw new Error("At least one wrapper or inner fields is required")}let i=n,s=o.pop();return o.forEach(a=>{i=[{operation:s.operation,fields:n,variables:s.variables}],s=a}),{operation:s.operation,fields:i,variables:s.variables}}parseGQLQuery(n){try{return l4`
|
|
80
|
+
*/globalThis.$localize=C0;const ar=globalThis.Luigi;let mo=(()=>{class e{setConfig(n){return ar.setConfig(n)}get config(){return ar.getConfig()}getConfigValue(n){return ar.getConfigValue(n)}unloadConfig(){return ar.unload()}sendCustomMessage(n){return ar.sendCustomMessage(n)}configChanged(n){ar.configChanged(n)}customMessages(){return ar.customMessages()}navigation(){return ar.navigation()}resetLuigi(){ar.reset()}clearNavigationCache(){ar.clearNavigationCache&&ar.clearNavigationCache()}showAlert(n){return ar.showAlert(n)}ux(){return ar.ux()}theming(){return ar.theming()}i18n(){return ar.i18n()}globalSearch(){return ar.globalSearch()}getGlobalContext(){return ar.getGlobalContext()}getWcExtendedContext(){return document.querySelector(".wcContainer")?.querySelector("[lui_web_component]")?.extendedContext?.context}getWcModalExtendedContext(){return document.querySelector(".iframeModalCtn")?.querySelector("[lui_web_component]")?.extendedContext?.context}setGlobalContext(n,r=!1){ar.setGlobalContext(n,r)}setInGlobalContext(n,r=!1){ar.setGlobalContext({...this.getGlobalContext(),...n},r)}routing(){return ar.routing()}setFeatureToggle(n){ar.featureToggles().setFeatureToggle(n)}unsetFeatureToggle(n){ar.featureToggles().unsetFeatureToggle(n)}unsetAllFeatureToggles(){ar.featureToggles().getActiveFeatureToggleList().forEach(n=>{this.unsetFeatureToggle(n)})}setFeatureToggles(n){if(n)for(const r of Object.keys(n))n[r]&&this.setFeatureToggle(r)}isFeatureToggleActive(n){return ar.featureToggles().getActiveFeatureToggleList().includes(n)}getActiveFeatureToggleList(){return ar.featureToggles().getActiveFeatureToggleList()}setAuthData(n){ar.auth().store.setAuthData(n),ar.auth().store.setNewlyAuthorized()}removeAuthData(){ar.auth().store.removeAuthData()}getAuthData(){return ar.auth().store.getAuthData()}setCurrentLocale(n){ar.i18n().setCurrentLocale(n)}static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275prov=Fe({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})(),ru=(()=>{class e{constructor(){this.http=pe(kl)}getEnvConfig(){var n=this;return(0,K.A)(function*(){return n.envConfigCache||(yield $h(n.http.get("/rest/envconfig").pipe(Xc(r=>n.envConfigCache=r)))),n.envConfigCache})()}static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275prov=Fe({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})(),Ba=(()=>{class e{constructor(){this.envConfigService=pe(ru),this.luigiCoreService=pe(mo),this.fallbackLanguage="en",this.translationTable={},this.currentLanguage=""}afterInit(){this.currentLanguage=this.luigiCoreService.i18n().getCurrentLocale(),this.luigiCoreService.i18n().addCurrentLocaleChangeListener(n=>{this.currentLanguage=n})}getTranslation(n,r,o){let i=this.getInternalTranslation(n,r,o);return i||(i=this.findTranslation(n,this.translationTable,this.fallbackLanguage,r)),i||n}getTranslationAsync(n,r,o){var i=this;return(0,K.A)(function*(){return new Promise(s=>{let a=i.getInternalTranslation(n,r,o);a?s(a||n):i.translationTable&&!i.translationTable[i.fallbackLanguage]?i.fetchTranslationFile(i.fallbackLanguage).then(()=>{a=i.findTranslation(n,i.translationTable,i.fallbackLanguage,r),s(a||n)}):(a=i.findTranslation(n,i.translationTable,i.fallbackLanguage,r),s(a||n))})})()}findTranslation(n,r,o,i){if(r[o]){const s="object"==typeof r[o][n]?r[o][n].join("<br>"):r[o][n];return i?this.findInterpolations(s,i):s}}findInterpolations(n,r){if(n)return Object.keys(r).forEach(o=>{n=n.replace(new RegExp("{"+o+"}","gi"),r[o])}),n}addTranslationFile(n,r){r&&n&&(this.translationTable[n]=r)}fetchTranslationFile(n){var r=this;return(0,K.A)(function*(){return new Promise(o=>{fetch(`/assets/translation-files/${n}.json`).then(i=>i.json()).then(i=>{r.addTranslationFile(n,i),o(!0)}).catch(i=>{console.error("Error:",i),r.addTranslationFile(n,{}),o(!1)})})})()}getInternalTranslation(n,r,o){return n?(this.currentLanguage=o||this.currentLanguage||this.luigiCoreService.i18n().getCurrentLocale(),this.findTranslation(n,this.translationTable,this.currentLanguage,r)):""}getValidLanguages(){var n=this;return(0,K.A)(function*(){const r=[{value:"en",label:"USERSETTINGSDIALOG_LANGUAGE_EN"}];try{const{developmentInstance:o}=yield n.envConfigService.getEnvConfig();o&&r.push({value:"de",label:"USERSETTINGSDIALOG_LANGUAGE_DE"})}finally{return r}})()}static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275prov=Fe({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var ou=function(e){return e.LAST_NAVIGATION_URL="openmfp.navigation.lastUrl",e.USER_SETTINGS="openmfp.settings.userSettings",e.LOCAL_DEVELOPMENT_SETTINGS="openmfp.settings.localDevelopmentSettings",e.FEATURE_TOGGLE_SETTINGS="openmfp.settings.featureToggleSettings",e.DEVELOPMENT_MODE_CONFIG="dev-mode-settings",e}(ou||{});(0,K.A)(function*(t){return t.frame_userAccount&&t.frame_userAccount.language?(delete t.frame_userAccount.name,delete t.frame_userAccount.email):delete t.frame_userAccount,new Promise((n,r)=>{try{localStorage.setItem(ou.USER_SETTINGS,JSON.stringify(t)),n(t)}catch(o){console.error("Error storing user settings",o),r({closeDialog:!0,message:"Could not write userSettings to storage..."})}})}),document.body.classList.add("ui5-content-density-compact");let Ex=(()=>{class e{constructor(){this.luigiCoreService=pe(mo)}getGatewayUrl(n,r=!1){const o=n.portalContext.crdGatewayApiUrl,i=this.extractKcpPath(o);return o?.replace(i,this.resolveKcpPath(n,r))}updateCrdGatewayUrlWithEntityPath(n){const r=this.luigiCoreService.getGlobalContext().portalContext.crdGatewayApiUrl,o=this.extractKcpPath(r);this.luigiCoreService.getGlobalContext().portalContext.crdGatewayApiUrl=r.replace(o,n)}resolveKcpPath(n,r=!1){let i=this.extractKcpPath(n.portalContext.crdGatewayApiUrl);if(n.kcpPath&&(i=n.kcpPath),r){const s=i.lastIndexOf(":");-1!==s&&(i=i.slice(0,s))}return i}extractKcpPath(n){return n.match(new RegExp("(root:orgs[^/]*)"))?.[1]||""}static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275prov=Fe({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();const Ul=new Ot(e=>e.complete());function Cs(e,t){return e.definitions.find(n=>"OperationDefinition"===n.kind&&!!n.name)?.name.value??t}function E0(e,t){if(!e)throw new Error(t)}function Y8(e){return I0(e,[])}function I0(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return function jie(e,t){if(null===e)return"null";if(t.includes(e))return"[Circular]";const n=[...t,e];if(function Gie(e){return"function"==typeof e.toJSON}(e)){const r=e.toJSON();if(r!==e)return"string"==typeof r?r:I0(r,n)}else if(Array.isArray(e))return function qie(e,t){if(0===e.length)return"[]";if(t.length>2)return"[Array]";const n=Math.min(10,e.length),r=e.length-n,o=[];for(let i=0;i<n;++i)o.push(I0(e[i],t));return 1===r?o.push("... 1 more item"):r>1&&o.push(`... ${r} more items`),"["+o.join(", ")+"]"}(e,n);return function $ie(e,t){const n=Object.entries(e);return 0===n.length?"{}":t.length>2?"["+function Wie(e){const t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if("Object"===t&&"function"==typeof e.constructor){const n=e.constructor.name;if("string"==typeof n&&""!==n)return n}return t}(e)+"]":"{ "+n.map(([o,i])=>o+": "+I0(i,t)).join(", ")+" }"}(e,n)}(e,t);default:return String(e)}}class Zie{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 Sx{constructor(t,n,r,o,i,s){this.kind=t,this.start=n,this.end=r,this.line=o,this.column=i,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 Ax={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:[],FloatValue:[],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","locations"],SchemaExtension:["directives","operationTypes"],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"]},Yie=new Set(Object.keys(Ax));function wx(e){const t=e?.kind;return"string"==typeof t&&Yie.has(t)}var na=function(e){return e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription",e}(na||{}),wt=function(e){return 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.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",e}(wt||{});const Vl=Object.freeze({});function ra(e,t,n=Ax){const r=new Map;for(const ie of Object.values(wt))r.set(ie,K8(t,ie));let o,u,d,i=Array.isArray(e),s=[e],a=-1,l=[],c=e;const f=[],C=[];do{a++;const ie=a===s.length,he=ie&&0!==l.length;if(ie){if(u=0===C.length?void 0:f[f.length-1],c=d,d=C.pop(),he)if(i){c=c.slice();let st=0;for(const[St,jt]of l){const wn=St-st;null===jt?(c.splice(wn,1),st++):c[wn]=jt}}else{c={...c};for(const[st,St]of l)c[st]=St}a=o.index,s=o.keys,l=o.edits,i=o.inArray,o=o.prev}else if(d){if(u=i?a:s[a],c=d[u],null==c)continue;f.push(u)}let qe;if(!Array.isArray(c)){var P,G;wx(c)||E0(!1,`Invalid AST Node: ${Y8(c)}.`);const st=ie?null===(P=r.get(c.kind))||void 0===P?void 0:P.leave:null===(G=r.get(c.kind))||void 0===G?void 0:G.enter;if(qe=st?.call(t,c,u,d,f,C),qe===Vl)break;if(!1===qe){if(!ie){f.pop();continue}}else if(void 0!==qe&&(l.push([u,qe]),!ie)){if(!wx(qe)){f.pop();continue}c=qe}}var W;void 0===qe&&he&&l.push([u,c]),ie?f.pop():(o={inArray:i,index:a,keys:s,edits:l,prev:o},i=Array.isArray(c),s=i?c:null!==(W=n[c.kind])&&void 0!==W?W:[],a=-1,l=[],d&&C.push(d),d=c)}while(void 0!==o);return 0!==l.length?l[l.length-1][1]:e}function K8(e,t){const n=e[t];return"object"==typeof n?n:"function"==typeof n?{enter:n,leave:void 0}:{enter:e.enter,leave:e.leave}}function Ld(e){try{return e()}catch{}}const X8=Ld(()=>globalThis)||Ld(()=>window)||Ld(()=>self)||Ld(()=>global)||Ld(function(){return Ld.constructor("return this")()}),Q8="4.1.4",Dx=new Map;function Lx(e){const t=Dx.get(e)||1;return Dx.set(e,t+1),`${e}:${t}:${Math.random().toString(36).slice(2)}`}const Mx="Invariant Violation";class J8 extends Error{constructor(t=Mx){super(t),this.name=Mx,Object.setPrototypeOf(this,J8.prototype)}}const S0=["debug","log","warn","error","silent"];let e3=S0.indexOf("silent");function Rt(e,...t){if(!e)throw rs(...t)}function A0(e){return function(t,...n){if(S0.indexOf(e)>=e3){const r=console[e]||console.log;if("number"==typeof t){const o=t;(t=kx(o))||(t=Rx(o,n),n=[])}r(t,...n)}}}function rs(e,...t){return new J8(kx(e,t)||Rx(e,t))}Rt.debug=A0("debug"),Rt.log=A0("log"),Rt.warn=A0("warn"),Rt.error=A0("error");const Nx=Symbol.for("ApolloErrorMessageHandler_"+Q8);function t3(e){if("string"==typeof e)return e;try{return function xx(e,t=0){const n=Lx("stringifyForDisplay");return JSON.stringify(e,(r,o)=>void 0===o?n:o,t).split(JSON.stringify(n)).join("<undefined>")}(e,2).slice(0,1e3)}catch{return"<non-serializable>"}}function kx(e,t=[]){if(e)return X8[Nx]&&X8[Nx](e,t.map(t3))}function Rx(e,t=[]){if(e)return"string"==typeof e?t.reduce((n,r)=>n.replace(/%[sdfo]/,t3(r)),e):`An error occurred! For more details, see the full error text at https://go.apollo.dev/c/err#${encodeURIComponent(JSON.stringify({version:Q8,message:e,args:t.map(t3)}))}`}const Fa={...X8[Symbol.for("apollo.cacheSize")]},Xie=()=>Object.create(null),{forEach:Qie,slice:Ox}=Array.prototype,{hasOwnProperty:Jie}=Object.prototype;class oa{constructor(t=!0,n=Xie){this.weakness=t,this.makeData=n}lookup(){return this.lookupArray(arguments)}lookupArray(t){let n=this;return Qie.call(t,r=>n=n.getChildTrie(r)),Jie.call(n,"data")?n.data:n.data=this.makeData(Ox.call(t))}peek(){return this.peekArray(arguments)}peekArray(t){let n=this;for(let r=0,o=t.length;n&&r<o;++r){const i=n.mapFor(t[r],!1);n=i&&i.get(t[r])}return n&&n.data}remove(){return this.removeArray(arguments)}removeArray(t){let n;if(t.length){const r=t[0],o=this.mapFor(r,!1),i=o&&o.get(r);i&&(n=i.removeArray(Ox.call(t,1)),!i.data&&!i.weak&&(!i.strong||!i.strong.size)&&o.delete(r))}else n=this.data,delete this.data;return n}getChildTrie(t){const n=this.mapFor(t,!0);let r=n.get(t);return r||n.set(t,r=new oa(this.weakness,this.makeData)),r}mapFor(t,n){return this.weakness&&function ese(e){switch(typeof e){case"object":if(null===e)break;case"function":return!0}return!1}(t)?this.weak||(n?this.weak=new WeakMap:void 0):this.strong||(n?this.strong=new Map:void 0)}}function n3(){}const tse=n3,nse=typeof WeakRef<"u"?WeakRef:function(e){return{deref:()=>e}},rse=typeof WeakMap<"u"?WeakMap:Map,ose=typeof FinalizationRegistry<"u"?FinalizationRegistry:function(){return{register:n3,unregister:n3}};class w0{constructor(t=1/0,n=tse){this.max=t,this.dispose=n,this.map=new rse,this.newest=null,this.oldest=null,this.unfinalizedNodes=new Set,this.finalizationScheduled=!1,this.size=0,this.finalize=()=>{const r=this.unfinalizedNodes.values();for(let o=0;o<10024;o++){const i=r.next().value;if(!i)break;this.unfinalizedNodes.delete(i);const s=i.key;delete i.key,i.keyRef=new nse(s),this.registry.register(s,i,i)}this.unfinalizedNodes.size>0?queueMicrotask(this.finalize):this.finalizationScheduled=!1},this.registry=new ose(this.deleteNode.bind(this))}has(t){return this.map.has(t)}get(t){const n=this.getNode(t);return n&&n.value}getNode(t){const n=this.map.get(t);if(n&&n!==this.newest){const{older:r,newer:o}=n;o&&(o.older=r),r&&(r.newer=o),n.older=this.newest,n.older.newer=n,n.newer=null,this.newest=n,n===this.oldest&&(this.oldest=o)}return n}set(t,n){let r=this.getNode(t);return r?r.value=n:(r={key:t,value:n,newer:null,older:this.newest},this.newest&&(this.newest.newer=r),this.newest=r,this.oldest=this.oldest||r,this.scheduleFinalization(r),this.map.set(t,r),this.size++,r.value)}clean(){for(;this.oldest&&this.size>this.max;)this.deleteNode(this.oldest)}deleteNode(t){t===this.newest&&(this.newest=t.older),t===this.oldest&&(this.oldest=t.newer),t.newer&&(t.newer.older=t.older),t.older&&(t.older.newer=t.newer),this.size--;const n=t.key||t.keyRef&&t.keyRef.deref();this.dispose(t.value,n),t.keyRef?this.registry.unregister(t):this.unfinalizedNodes.delete(t),n&&this.map.delete(n)}delete(t){const n=this.map.get(t);return!!n&&(this.deleteNode(n),!0)}scheduleFinalization(t){this.unfinalizedNodes.add(t),this.finalizationScheduled||(this.finalizationScheduled=!0,queueMicrotask(this.finalize))}}function sse(){}class r3{constructor(t=1/0,n=sse){this.max=t,this.dispose=n,this.map=new Map,this.newest=null,this.oldest=null}has(t){return this.map.has(t)}get(t){const n=this.getNode(t);return n&&n.value}get size(){return this.map.size}getNode(t){const n=this.map.get(t);if(n&&n!==this.newest){const{older:r,newer:o}=n;o&&(o.older=r),r&&(r.newer=o),n.older=this.newest,n.older.newer=n,n.newer=null,this.newest=n,n===this.oldest&&(this.oldest=o)}return n}set(t,n){let r=this.getNode(t);return r?r.value=n:(r={key:t,value:n,newer:null,older:this.newest},this.newest&&(this.newest.newer=r),this.newest=r,this.oldest=this.oldest||r,this.map.set(t,r),r.value)}clean(){for(;this.oldest&&this.map.size>this.max;)this.delete(this.oldest.key)}delete(t){const n=this.map.get(t);return!!n&&(n===this.newest&&(this.newest=n.older),n===this.oldest&&(this.oldest=n.newer),n.newer&&(n.newer.older=n.older),n.older&&(n.older.newer=n.newer),this.map.delete(t),this.dispose(n.value,t),!0)}}const o3=new WeakSet;function Px(e){e.size<=(e.max||-1)||o3.has(e)||(o3.add(e),setTimeout(()=>{e.clean(),o3.delete(e)},100))}const i3=function(e,t){const n=new w0(e,t);return n.set=function(r,o){const i=w0.prototype.set.call(this,r,o);return Px(this),i},n},ase=function(e,t){const n=new r3(e,t);return n.set=function(r,o){const i=r3.prototype.set.call(this,r,o);return Px(this),i},n};function Bx(e,{max:t,makeCacheKey:n=r=>r}){const r=new oa(!0),o=new i3(t);return(...i)=>{const s=r.lookupArray(n(i)),a=o.get(s);if(a){if(a.error)throw a.error;return a.result}const l=o.set(s,{});try{return l.result=e(...i)}catch(c){throw l.error=c,c}}}const zl=Bx((e,t)=>{Rt(e&&"Document"===e.kind,1);const n=e.definitions.filter(r=>"OperationDefinition"===r.kind);t&&Rt(1==n.length&&n[0].operation===t,4,t,t,n[0].operation),ra(e,{Field(r,o,i,s){if(r.alias&&("__typename"===r.alias.value||r.alias.value.startsWith("__ac_"))&&r.alias.value!==r.name.value){let a=e,l=[];for(const c of s)a=a[c],a.kind===wt.FIELD&&l.push(a.alias?.value||a.name.value);throw l.splice(-1,1,r.name.value),rs(5,r.alias.value,l.join("."),n[0].operation,Cs(e,"(anonymous)"))}}})},{max:Fa.checkDocument||2e3});function Ha(e){return zl(e),e.definitions.filter(t=>"OperationDefinition"===t.kind)[0]}class hi{static empty(){return new hi(()=>Ul)}static from(t){if(0===t.length)return hi.empty();const[n,...r]=t;return n.concat(...r)}static split(t,n,r=new hi((o,i)=>i(o))){const o=new hi((i,s)=>t(i)?n.request(i,s):r.request(i,s));return Object.assign(o,{left:n,right:r})}static execute(t,n,r){return t.request(function lse(e,{client:t}){const n={query:e.query,variables:e.variables||{},extensions:e.extensions||{},operationName:Cs(e.query),operationType:Ha(e.query).operation};let r={...e.context};const i=()=>Object.freeze({...r});return Object.defineProperty(n,"setContext",{enumerable:!1,value:s=>{r="function"==typeof s?{...r,...s(i())}:{...r,...s}}}),Object.defineProperty(n,"getContext",{enumerable:!1,value:i}),Object.defineProperty(n,"client",{enumerable:!1,value:t}),n}(n,r),()=>Ul)}static concat(...t){return hi.from(t)}constructor(t){t&&(this.request=t)}split(t,n,r){return this.concat(hi.split(t,n,r))}concat(...t){return 0===t.length?this:t.reduce(this.combine.bind(this),this)}combine(t,n){const r=new hi((o,i)=>t.request(o,s=>n.request(s,i)));return Object.assign(r,{left:t,right:n})}request(t,n){throw rs(65)}left;right}const cse=hi.split,{toString:Fx,hasOwnProperty:use}=Object.prototype,Hx=Function.prototype.toString,s3=new Map;function $r(e,t){try{return a3(e,t)}finally{s3.clear()}}function a3(e,t){if(e===t)return!0;const n=Fx.call(e);if(n!==Fx.call(t))return!1;switch(n){case"[object Array]":if(e.length!==t.length)return!1;case"[object Object]":{if(Vx(e,t))return!0;const o=Ux(e),i=Ux(t),s=o.length;if(s!==i.length)return!1;for(let a=0;a<s;++a)if(!use.call(t,o[a]))return!1;for(let a=0;a<s;++a){const l=o[a];if(!a3(e[l],t[l]))return!1}return!0}case"[object Error]":return e.name===t.name&&e.message===t.message;case"[object Number]":if(e!=e)return t!=t;case"[object Boolean]":case"[object Date]":return+e==+t;case"[object RegExp]":case"[object String]":return e==`${t}`;case"[object Map]":case"[object Set]":{if(e.size!==t.size)return!1;if(Vx(e,t))return!0;const o=e.entries(),i="[object Map]"===n;for(;;){const s=o.next();if(s.done)break;const[a,l]=s.value;if(!t.has(a)||i&&!a3(l,t.get(a)))return!1}return!0}case"[object Uint16Array]":case"[object Uint8Array]":case"[object Uint32Array]":case"[object Int32Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object ArrayBuffer]":e=new Uint8Array(e),t=new Uint8Array(t);case"[object DataView]":{let o=e.byteLength;if(o===t.byteLength)for(;o--&&e[o]===t[o];);return-1===o}case"[object AsyncFunction]":case"[object GeneratorFunction]":case"[object AsyncGeneratorFunction]":case"[object Function]":{const o=Hx.call(e);return o===Hx.call(t)&&!function hse(e,t){const n=e.length-t.length;return n>=0&&e.indexOf(t,n)===n}(o,_se)}}return!1}function Ux(e){return Object.keys(e).filter(dse,e)}function dse(e){return void 0!==this[e]}const _se="{ [native code] }";function Vx(e,t){let n=s3.get(e);if(n){if(n.has(t))return!0}else s3.set(e,n=new Set);return n.add(t),!1}let Yo=null;const zx={};let fse=1;function jx(e){try{return e()}catch{}}const l3="@wry/context:Slot",Gx=jx(()=>globalThis)||jx(()=>global)||Object.create(null),D0=Gx[l3]||Array[l3]||function(e){try{Object.defineProperty(Gx,l3,{value:e,enumerable:!1,writable:!1,configurable:!0})}finally{return e}}(class{constructor(){this.id=["slot",fse++,Date.now(),Math.random().toString(36).slice(2)].join(":")}hasValue(){for(let t=Yo;t;t=t.parent)if(this.id in t.slots){const n=t.slots[this.id];if(n===zx)break;return t!==Yo&&(Yo.slots[this.id]=n),!0}return Yo&&(Yo.slots[this.id]=zx),!1}getValue(){if(this.hasValue())return Yo.slots[this.id]}withValue(t,n,r,o){const s=Yo;Yo={parent:s,slots:{__proto__:null,[this.id]:t}};try{return n.apply(o,r)}finally{Yo=s}}static bind(t){const n=Yo;return function(){const r=Yo;try{return Yo=n,t.apply(this,arguments)}finally{Yo=r}}}static noContext(t,n,r){if(!Yo)return t.apply(r,n);{const o=Yo;try{return Yo=null,t.apply(r,n)}finally{Yo=o}}}}),sf=new D0,{hasOwnProperty:vse}=Object.prototype,u3=Array.from||function(e){const t=[];return e.forEach(n=>t.push(n)),t};function L0(e){const{unsubscribe:t}=e;"function"==typeof t&&(e.unsubscribe=void 0,t())}const af=[];function xd(e,t){if(!e)throw new Error(t||"assertion failure")}function qx(e,t){const n=e.length;return n>0&&n===t.length&&e[n-1]===t[n-1]}function Wx(e){switch(e.length){case 0:throw new Error("unknown value");case 1:return e[0];case 2:throw e[1]}}function Zx(e){return e.slice(0)}let yse=(()=>{class e{constructor(n){this.fn=n,this.parents=new Set,this.childValues=new Map,this.dirtyChildren=null,this.dirty=!0,this.recomputing=!1,this.value=[],this.deps=null,++e.count}peek(){if(1===this.value.length&&!jl(this))return Yx(this),this.value[0]}recompute(n){return xd(!this.recomputing,"already recomputing"),Yx(this),jl(this)?function bse(e,t){return tM(e),sf.withValue(e,Tse,[e,t]),function Ise(e,t){if("function"==typeof e.subscribe)try{L0(e),e.unsubscribe=e.subscribe.apply(null,t)}catch{return e.setDirty(),!1}return!0}(e,t)&&function Ese(e){e.dirty=!1,!jl(e)&&Xx(e)}(e),Wx(e.value)}(this,n):Wx(this.value)}setDirty(){this.dirty||(this.dirty=!0,Kx(this),L0(this))}dispose(){this.setDirty(),tM(this),d3(this,(n,r)=>{n.setDirty(),nM(n,this)})}forget(){this.dispose()}dependOn(n){n.add(this),this.deps||(this.deps=af.pop()||new Set),this.deps.add(n)}forgetDeps(){this.deps&&(u3(this.deps).forEach(n=>n.delete(this)),this.deps.clear(),af.push(this.deps),this.deps=null)}}return e.count=0,e})();function Yx(e){const t=sf.getValue();if(t)return e.parents.add(t),t.childValues.has(e)||t.childValues.set(e,[]),jl(e)?Qx(t,e):Jx(t,e),t}function Tse(e,t){e.recomputing=!0;const{normalizeResult:n}=e;let r;n&&1===e.value.length&&(r=Zx(e.value)),e.value.length=0;try{if(e.value[0]=e.fn.apply(null,t),n&&r&&!qx(r,e.value))try{e.value[0]=n(e.value[0],r[0])}catch{}}catch(o){e.value[1]=o}e.recomputing=!1}function jl(e){return e.dirty||!(!e.dirtyChildren||!e.dirtyChildren.size)}function Kx(e){d3(e,Qx)}function Xx(e){d3(e,Jx)}function d3(e,t){const n=e.parents.size;if(n){const r=u3(e.parents);for(let o=0;o<n;++o)t(r[o],e)}}function Qx(e,t){xd(e.childValues.has(t)),xd(jl(t));const n=!jl(e);if(e.dirtyChildren){if(e.dirtyChildren.has(t))return}else e.dirtyChildren=af.pop()||new Set;e.dirtyChildren.add(t),n&&Kx(e)}function Jx(e,t){xd(e.childValues.has(t)),xd(!jl(t));const n=e.childValues.get(t);0===n.length?e.childValues.set(t,Zx(t.value)):qx(n,t.value)||e.setDirty(),eM(e,t),!jl(e)&&Xx(e)}function eM(e,t){const n=e.dirtyChildren;n&&(n.delete(t),0===n.size&&(af.length<100&&af.push(n),e.dirtyChildren=null))}function tM(e){e.childValues.size>0&&e.childValues.forEach((t,n)=>{nM(e,n)}),e.forgetDeps(),xd(null===e.dirtyChildren)}function nM(e,t){t.parents.delete(e),e.childValues.delete(t),eM(e,t)}const Sse={setDirty:!0,dispose:!0,forget:!0};function rM(e){const t=new Map,n=e&&e.subscribe;function r(o){const i=sf.getValue();if(i){let s=t.get(o);s||t.set(o,s=new Set),i.dependOn(s),"function"==typeof n&&(L0(s),s.unsubscribe=n(o))}}return r.dirty=function(i,s){const a=t.get(i);if(a){const l=s&&vse.call(Sse,s)?s:"setDirty";u3(a).forEach(c=>c[l]()),t.delete(i),L0(a)}},r}let oM;function iM(...e){return(oM||(oM=new oa("function"==typeof WeakMap))).lookupArray(e)}const _3=new Set;function lf(e,{max:t=Math.pow(2,16),keyArgs:n,makeCacheKey:r=iM,normalizeResult:o,subscribe:i,cache:s=r3}=Object.create(null)){const a="function"==typeof s?new s(t,f=>f.dispose()):s,l=function(){const f=r.apply(null,n?n.apply(null,arguments):arguments);if(void 0===f)return e.apply(null,arguments);let C=a.get(f);C||(a.set(f,C=new yse(e)),C.normalizeResult=o,C.subscribe=i,C.forget=()=>a.delete(f));const P=C.recompute(Array.prototype.slice.call(arguments));return a.set(f,C),_3.add(a),sf.hasValue()||(_3.forEach(G=>G.clean()),_3.clear()),P};function c(f){const C=f&&a.get(f);C&&C.setDirty()}function u(f){const C=f&&a.get(f);if(C)return C.peek()}function d(f){return!!f&&a.delete(f)}return Object.defineProperty(l,"size",{get:()=>a.size,configurable:!1,enumerable:!1}),Object.freeze(l.options={max:t,keyArgs:n,makeCacheKey:r,normalizeResult:o,subscribe:i,cache:a}),l.dirtyKey=c,l.dirty=function(){c(r.apply(null,arguments))},l.peekKey=u,l.peek=function(){return u(r.apply(null,arguments))},l.forgetKey=d,l.forget=function(){return d(r.apply(null,arguments))},l.makeCacheKey=r,l.getKey=n?function(){return r.apply(null,n.apply(null,arguments))}:r,Object.freeze(l)}function Ase(e){return e}class Ua{transform;cached;resultCache=new WeakSet;getCacheKey(t){return[t]}static identity(){return new Ua(Ase,{cache:!1})}static split(t,n,r=Ua.identity()){return Object.assign(new Ua(o=>(t(o)?n:r).transformDocument(o),{cache:!1}),{left:n,right:r})}constructor(t,n={}){this.transform=t,n.getCacheKey&&(this.getCacheKey=n.getCacheKey),this.cached=!1!==n.cache,this.resetCache()}resetCache(){if(this.cached){const t=new oa;this.performWork=lf(Ua.prototype.performWork.bind(this),{makeCacheKey:n=>{const r=this.getCacheKey(n);if(r)return Rt(Array.isArray(r),20),t.lookupArray(r)},max:Fa["documentTransform.cache"],cache:w0})}}performWork(t){return zl(t),this.transform(t)}transformDocument(t){if(this.resultCache.has(t))return t;const n=this.performWork(t);return this.resultCache.add(n),n}concat(t){return Object.assign(new Ua(n=>t.transformDocument(this.transformDocument(n)),{cache:!1}),{left:this,right:t})}left;right}const sM={kind:wt.FIELD,name:{kind:wt.NAME,value:"__typename"}},h3=Object.assign(function(e){return ra(e,{SelectionSet:{enter(t,n,r){if(r&&r.kind===wt.OPERATION_DEFINITION)return;const{selections:o}=t;return o&&!o.some(a=>a.kind===wt.FIELD&&("__typename"===a.name.value||0===a.name.value.lastIndexOf("__",0)))?r.kind===wt.FIELD&&r.directives&&r.directives.some(a=>"export"===a.name.value)?void 0:{...t,selections:[...o,sM]}:void 0}}})},{added:e=>e===sM}),Va=Object.assign(function(t){return JSON.stringify(t,Nse)},{reset(){Md=new ase(Fa.canonicalStringify||1e3)}});let Md;function Nse(e,t){if(t&&"object"==typeof t){const n=Object.getPrototypeOf(t);if(n===Object.prototype||null===n){const r=Object.keys(t);if(r.every(kse))return t;const o=JSON.stringify(r);let i=Md.get(o);if(!i){r.sort();const a=JSON.stringify(r);i=Md.get(a)||r,Md.set(o,i),Md.set(a,i)}const s=Object.create(n);return i.forEach(a=>{s[a]=t[a]}),s}}return t}function kse(e,t,n){return 0===t||n[t-1]<=e}function m3(e){return 9===e||32===e}function cf(e){return e>=48&&e<=57}function uM(e){return e>=97&&e<=122||e>=65&&e<=90}function dM(e){return uM(e)||95===e}function Rse(e){return uM(e)||cf(e)||95===e}function Ose(e){var t;let n=Number.MAX_SAFE_INTEGER,r=null,o=-1;for(let s=0;s<e.length;++s){var i;const a=e[s],l=Pse(a);l!==a.length&&(r=null!==(i=r)&&void 0!==i?i:s,o=s,0!==s&&l<n&&(n=l))}return e.map((s,a)=>0===a?s:s.slice(n)).slice(null!==(t=r)&&void 0!==t?t:0,o+1)}function Pse(e){let t=0;for(;t<e.length&&m3(e.charCodeAt(t));)++t;return t}Va.reset();const Hse=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function Use(e){return Vse[e.charCodeAt(0)]}const Vse=["\\u0000","\\u0001","\\u0002","\\u0003","\\u0004","\\u0005","\\u0006","\\u0007","\\b","\\t","\\n","\\u000B","\\f","\\r","\\u000E","\\u000F","\\u0010","\\u0011","\\u0012","\\u0013","\\u0014","\\u0015","\\u0016","\\u0017","\\u0018","\\u0019","\\u001A","\\u001B","\\u001C","\\u001D","\\u001E","\\u001F","","",'\\"',"","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\\\","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\u007F","\\u0080","\\u0081","\\u0082","\\u0083","\\u0084","\\u0085","\\u0086","\\u0087","\\u0088","\\u0089","\\u008A","\\u008B","\\u008C","\\u008D","\\u008E","\\u008F","\\u0090","\\u0091","\\u0092","\\u0093","\\u0094","\\u0095","\\u0096","\\u0097","\\u0098","\\u0099","\\u009A","\\u009B","\\u009C","\\u009D","\\u009E","\\u009F"];function x0(e){return ra(e,jse)}const jse={Name:{leave:e=>e.value},Variable:{leave:e=>"$"+e.name},Document:{leave:e=>zt(e.definitions,"\n\n")},OperationDefinition:{leave(e){const t=v3(e.variableDefinitions)?Tn("(\n",zt(e.variableDefinitions,"\n"),"\n)"):Tn("(",zt(e.variableDefinitions,", "),")"),n=Tn("",e.description,"\n")+zt([e.operation,zt([e.name,t]),zt(e.directives," ")]," ");return("query"===n?"":n+" ")+e.selectionSet}},VariableDefinition:{leave:({variable:e,type:t,defaultValue:n,directives:r,description:o})=>Tn("",o,"\n")+e+": "+t+Tn(" = ",n)+Tn(" ",zt(r," "))},SelectionSet:{leave:({selections:e})=>Os(e)},Field:{leave({alias:e,name:t,arguments:n,directives:r,selectionSet:o}){const i=Tn("",e,": ")+t;let s=i+Tn("(",zt(n,", "),")");return s.length>80&&(s=i+Tn("(\n",M0(zt(n,"\n")),"\n)")),zt([s,zt(r," "),o]," ")}},Argument:{leave:({name:e,value:t})=>e+": "+t},FragmentSpread:{leave:({name:e,directives:t})=>"..."+e+Tn(" ",zt(t," "))},InlineFragment:{leave:({typeCondition:e,directives:t,selectionSet:n})=>zt(["...",Tn("on ",e),zt(t," "),n]," ")},FragmentDefinition:{leave:({name:e,typeCondition:t,variableDefinitions:n,directives:r,selectionSet:o,description:i})=>Tn("",i,"\n")+`fragment ${e}${Tn("(",zt(n,", "),")")} on ${t} ${Tn("",zt(r," ")," ")}`+o},IntValue:{leave:({value:e})=>e},FloatValue:{leave:({value:e})=>e},StringValue:{leave:({value:e,block:t})=>t?function Bse(e,t){const n=e.replace(/"""/g,'\\"""'),r=n.split(/\r\n|[\n\r]/g),o=1===r.length,i=r.length>1&&r.slice(1).every(C=>0===C.length||m3(C.charCodeAt(0))),s=n.endsWith('\\"""'),a=e.endsWith('"')&&!s,l=e.endsWith("\\"),c=a||l,u=!(null!=t&&t.minimize)&&(!o||e.length>70||c||i||s);let d="";const f=o&&m3(e.charCodeAt(0));return(u&&!f||i)&&(d+="\n"),d+=n,(u||c)&&(d+="\n"),'"""'+d+'"""'}(e):function Fse(e){return`"${e.replace(Hse,Use)}"`}(e)},BooleanValue:{leave:({value:e})=>e?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:e})=>e},ListValue:{leave:({values:e})=>"["+zt(e,", ")+"]"},ObjectValue:{leave:({fields:e})=>"{"+zt(e,", ")+"}"},ObjectField:{leave:({name:e,value:t})=>e+": "+t},Directive:{leave:({name:e,arguments:t})=>"@"+e+Tn("(",zt(t,", "),")")},NamedType:{leave:({name:e})=>e},ListType:{leave:({type:e})=>"["+e+"]"},NonNullType:{leave:({type:e})=>e+"!"},SchemaDefinition:{leave:({description:e,directives:t,operationTypes:n})=>Tn("",e,"\n")+zt(["schema",zt(t," "),Os(n)]," ")},OperationTypeDefinition:{leave:({operation:e,type:t})=>e+": "+t},ScalarTypeDefinition:{leave:({description:e,name:t,directives:n})=>Tn("",e,"\n")+zt(["scalar",t,zt(n," ")]," ")},ObjectTypeDefinition:{leave:({description:e,name:t,interfaces:n,directives:r,fields:o})=>Tn("",e,"\n")+zt(["type",t,Tn("implements ",zt(n," & ")),zt(r," "),Os(o)]," ")},FieldDefinition:{leave:({description:e,name:t,arguments:n,type:r,directives:o})=>Tn("",e,"\n")+t+(v3(n)?Tn("(\n",M0(zt(n,"\n")),"\n)"):Tn("(",zt(n,", "),")"))+": "+r+Tn(" ",zt(o," "))},InputValueDefinition:{leave:({description:e,name:t,type:n,defaultValue:r,directives:o})=>Tn("",e,"\n")+zt([t+": "+n,Tn("= ",r),zt(o," ")]," ")},InterfaceTypeDefinition:{leave:({description:e,name:t,interfaces:n,directives:r,fields:o})=>Tn("",e,"\n")+zt(["interface",t,Tn("implements ",zt(n," & ")),zt(r," "),Os(o)]," ")},UnionTypeDefinition:{leave:({description:e,name:t,directives:n,types:r})=>Tn("",e,"\n")+zt(["union",t,zt(n," "),Tn("= ",zt(r," | "))]," ")},EnumTypeDefinition:{leave:({description:e,name:t,directives:n,values:r})=>Tn("",e,"\n")+zt(["enum",t,zt(n," "),Os(r)]," ")},EnumValueDefinition:{leave:({description:e,name:t,directives:n})=>Tn("",e,"\n")+zt([t,zt(n," ")]," ")},InputObjectTypeDefinition:{leave:({description:e,name:t,directives:n,fields:r})=>Tn("",e,"\n")+zt(["input",t,zt(n," "),Os(r)]," ")},DirectiveDefinition:{leave:({description:e,name:t,arguments:n,repeatable:r,locations:o})=>Tn("",e,"\n")+"directive @"+t+(v3(n)?Tn("(\n",M0(zt(n,"\n")),"\n)"):Tn("(",zt(n,", "),")"))+(r?" repeatable":"")+" on "+zt(o," | ")},SchemaExtension:{leave:({directives:e,operationTypes:t})=>zt(["extend schema",zt(e," "),Os(t)]," ")},ScalarTypeExtension:{leave:({name:e,directives:t})=>zt(["extend scalar",e,zt(t," ")]," ")},ObjectTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>zt(["extend type",e,Tn("implements ",zt(t," & ")),zt(n," "),Os(r)]," ")},InterfaceTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>zt(["extend interface",e,Tn("implements ",zt(t," & ")),zt(n," "),Os(r)]," ")},UnionTypeExtension:{leave:({name:e,directives:t,types:n})=>zt(["extend union",e,zt(t," "),Tn("= ",zt(n," | "))]," ")},EnumTypeExtension:{leave:({name:e,directives:t,values:n})=>zt(["extend enum",e,zt(t," "),Os(n)]," ")},InputObjectTypeExtension:{leave:({name:e,directives:t,fields:n})=>zt(["extend input",e,zt(t," "),Os(n)]," ")},TypeCoordinate:{leave:({name:e})=>e},MemberCoordinate:{leave:({name:e,memberName:t})=>zt([e,Tn(".",t)])},ArgumentCoordinate:{leave:({name:e,fieldName:t,argumentName:n})=>zt([e,Tn(".",t),Tn("(",n,":)")])},DirectiveCoordinate:{leave:({name:e})=>zt(["@",e])},DirectiveArgumentCoordinate:{leave:({name:e,argumentName:t})=>zt(["@",e,Tn("(",t,":)")])}};function zt(e,t=""){var n;return null!==(n=e?.filter(r=>r).join(t))&&void 0!==n?n:""}function Os(e){return Tn("{\n",M0(zt(e,"\n")),"\n}")}function Tn(e,t,n=""){return null!=t&&""!==t?e+t+n:""}function M0(e){return Tn(" ",e.replace(/\n/g,"\n "))}function v3(e){var t;return null!==(t=e?.some(n=>n.includes("\n")))&&void 0!==t&&t}let uf;const df=Object.assign(e=>{let t=uf.get(e);return t||(t=x0(e),uf.set(e,t)),t},{reset(){uf=new i3(Fa.print||2e3)}});function lr(e){return!(!e||"object"!=typeof e||"string"!=typeof e.__ref)}df.reset();const y3={now:()=>(y3.delegate||Date).now(),delegate:void 0};class b3 extends Rn{constructor(t=1/0,n=1/0,r=y3){super(),this._bufferSize=t,this._windowTime=n,this._timestampProvider=r,this._buffer=[],this._infiniteTimeWindow=!0,this._infiniteTimeWindow=n===1/0,this._bufferSize=Math.max(1,t),this._windowTime=Math.max(1,n)}next(t){const{isStopped:n,_buffer:r,_infiniteTimeWindow:o,_timestampProvider:i,_windowTime:s}=this;n||(r.push(t),!o&&r.push(i.now()+s)),this._trimBuffer(),super.next(t)}_subscribe(t){this._throwIfClosed(),this._trimBuffer();const n=this._innerSubscribe(t),{_infiniteTimeWindow:r,_buffer:o}=this,i=o.slice();for(let s=0;s<i.length&&!t.closed;s+=r?1:2)t.next(i[s]);return this._checkFinalizedStatuses(t),n}_trimBuffer(){const{_bufferSize:t,_timestampProvider:n,_buffer:r,_infiniteTimeWindow:o}=this,i=(o?1:2)*t;if(t<1/0&&i<r.length&&r.splice(0,r.length-i),!o){const s=n.now();let a=0;for(let l=1;l<r.length&&r[l]<=s;l+=2)a=l;a&&r.splice(0,a+1)}}}function _f(e={}){const{connector:t=()=>new Rn,resetOnError:n=!0,resetOnComplete:r=!0,resetOnRefCountZero:o=!0}=e;return i=>{let s,a,l,c=0,u=!1,d=!1;const f=()=>{a?.unsubscribe(),a=void 0},C=()=>{f(),s=l=void 0,u=d=!1},P=()=>{const G=s;C(),G?.unsubscribe()};return Ri((G,W)=>{c++,!d&&!u&&f();const ie=l=l??t();W.add(()=>{c--,0===c&&!d&&!u&&(a=T3(P,o))}),ie.subscribe(W),!s&&c>0&&(s=new hr({next:he=>ie.next(he),error:he=>{d=!0,f(),a=T3(C,n,he),ie.error(he)},complete:()=>{u=!0,f(),a=T3(C,r),ie.complete()}}),vs(G).subscribe(s))})(i)}}function T3(e,t,...n){if(!0===t)return void e();if(!1===t)return;const r=new hr({next:()=>{r.unsubscribe(),e()}});return vs(t(...n)).subscribe(r)}function N0(e,t,n){let r,o=!1;return e&&"object"==typeof e?({bufferSize:r=1/0,windowTime:t=1/0,refCount:o=!1,scheduler:n}=e):r=e??1/0,_f({connector:()=>new b3(r,t,n),resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:o})}function Zse(e,t){return e===t}class Yse extends J{constructor(t,n){super()}schedule(t,n=0){return this}}const k0={setInterval(e,t,...n){const{delegate:r}=k0;return r?.setInterval?r.setInterval(e,t,...n):setInterval(e,t,...n)},clearInterval(e){const{delegate:t}=k0;return(t?.clearInterval||clearInterval)(e)},delegate:void 0};class _M extends Yse{constructor(t,n){super(t,n),this.scheduler=t,this.work=n,this.pending=!1}schedule(t,n=0){var r;if(this.closed)return this;this.state=t;const o=this.id,i=this.scheduler;return null!=o&&(this.id=this.recycleAsyncId(i,o,n)),this.pending=!0,this.delay=n,this.id=null!==(r=this.id)&&void 0!==r?r:this.requestAsyncId(i,this.id,n),this}requestAsyncId(t,n,r=0){return k0.setInterval(t.flush.bind(t,this),r)}recycleAsyncId(t,n,r=0){if(null!=r&&this.delay===r&&!1===this.pending)return n;null!=n&&k0.clearInterval(n)}execute(t,n){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;const r=this._execute(t,n);if(r)return r;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(t,n){let o,r=!1;try{this.work(t)}catch(i){r=!0,o=i||new Error("Scheduled action threw falsy error")}if(r)return this.unsubscribe(),o}unsubscribe(){if(!this.closed){const{id:t,scheduler:n}=this,{actions:r}=n;this.work=this.state=this.scheduler=null,this.pending=!1,X(r,this),null!=t&&(this.id=this.recycleAsyncId(n,t,null)),this.delay=null,super.unsubscribe()}}}class hf{constructor(t,n=hf.now){this.schedulerActionCtor=t,this.now=n}schedule(t,n=0,r){return new this.schedulerActionCtor(this,t).schedule(r,n)}}hf.now=y3.now;class hM extends hf{constructor(t,n=hf.now){super(t,n),this.actions=[],this._active=!1}flush(t){const{actions:n}=this;if(this._active)return void n.push(t);let r;this._active=!0;do{if(r=t.execute(t.state,t.delay))break}while(t=n.shift());if(this._active=!1,r){for(;t=n.shift();)t.unsubscribe();throw r}}}const Kse=new hM(_M);const pM=Bx(function(t,n,r){return function Jse(e,t){let n,r;function o(i){return i!==n&&(n=i,r=t(n)),r}return Object.assign(e.pipe(ur(o),N0({bufferSize:1,refCount:!0})),{getCurrentResult:()=>o(e.getCurrentResult())})}(t,r)},{max:1,makeCacheKey:e=>e.slice(0,2)});function ff(e=[]){const t={};return e.forEach(n=>{t[n.name.value]=n}),t}function pf(e){return e.definitions.filter(t=>"FragmentDefinition"===t.kind)}function R0(e,t){switch(e.kind){case"InlineFragment":return e;case"FragmentSpread":{const n=e.name.value;if("function"==typeof t)return t(n);const r=t&&t[n];return Rt(r,9,n),r||null}default:return null}}function E3(e){let t;zl(e);for(let n of e.definitions){if("OperationDefinition"===n.kind)return n;"FragmentDefinition"===n.kind&&!t&&(t=n)}if(t)return t;throw rs(12)}function gf(e){return"Field"===e.kind}function iu(e){return e.alias?e.alias.value:e.name.value}function O0({directives:e},t){return!e||!e.length||function nae(e){const t=[];return e&&e.length&&e.forEach(n=>{if(!function tae({name:{value:e}}){return"skip"===e||"include"===e}(n))return;const r=n.arguments,o=n.name.value;Rt(r&&1===r.length,16,o);const i=r[0];Rt(i.name&&"if"===i.name.value,17,o);const s=i.value;Rt(s&&("Variable"===s.kind||"BooleanValue"===s.kind),18,o),t.push({directive:n,ifArgument:i})}),t}(e).every(({directive:n,ifArgument:r})=>{let o=!1;return"Variable"===r.value.kind?(o=t&&t[r.value.name.value],Rt(void 0!==o,15,n.name.value)):o=r.value.value,"skip"===n.name.value?!o:o})}function gM(e,{data:t,...n},{data:r,...o},i){return $r(n,o)&&P0(E3(e).selectionSet,t,r,{fragmentMap:ff(pf(e)),variables:i})}function P0(e,t,n,r){if(t===n)return!0;const o=new Set;return e.selections.every(i=>{if(o.has(i)||(o.add(i),!O0(i,r.variables))||mM(i))return!0;if(gf(i)){const s=iu(i),a=t&&t[s],l=n&&n[s],c=i.selectionSet;if(!c)return $r(a,l);const u=Array.isArray(a),d=Array.isArray(l);if(u!==d)return!1;if(u&&d){const f=a.length;if(l.length!==f)return!1;for(let C=0;C<f;++C)if(!P0(c,a[C],l[C],r))return!1;return!0}return P0(c,a,l,r)}{const s=R0(i,r.fragmentMap);if(s)return!!mM(s)||P0(s.selectionSet,t,n,r)}})}function mM(e){return!!e.directives&&e.directives.some(rae)}function rae(e){return"nonreactive"===e.name.value}function oae(e,t){let n=t;const r=[];return e.definitions.forEach(i=>{if("OperationDefinition"===i.kind)throw rs(10,i.operation,i.name?` named '${i.name.value}'`:"");"FragmentDefinition"===i.kind&&r.push(i)}),typeof n>"u"&&(Rt(1===r.length,11,r.length),n=r[0].name.value),{...e,definitions:[{kind:"OperationDefinition",operation:"query",selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:n}}]}},...e.definitions]}}function iae(...e){return iM.bind(null,...e)}class vM{assumeImmutableResults=!1;lookupFragment(t){return null}batch(t){let r;return this.performTransaction(()=>r=t.update(this),"string"==typeof t.optimistic?t.optimistic:!1===t.optimistic?null:void 0),r}recordOptimisticTransaction(t,n){this.performTransaction(t,n)}transformDocument(t){return t}transformForLink(t){return t}identify(t){}gc(){return[]}modify(t){return!1}readQuery(t,n=!!t.optimistic){return this.read({...t,rootId:t.id||"ROOT_QUERY",optimistic:n})}fragmentWatches=new oa(!0);watchFragment(t){const{fragment:n,fragmentName:r,from:o}=t,i=this.getFragmentDoc(n,r),a=(Array.isArray(o)?o:[o]).map(C=>null==C?C:this.toCacheId(C));if(!Array.isArray(o)){const C=this.watchSingleFragment(a[0],i,t);return null===o?C:pM(C,Symbol.for("apollo.transform.individualResult"),P=>({...P,data:P.data??{}}))}let l;function c(C){const P=C.reduce((G,W,ie)=>(G.data.push(W.data),G.complete&&=W.complete,G.dataState=G.complete?"complete":"partial",W.missing&&(G.missing||={},G.missing[ie]=W.missing),G),{data:[],dataState:"complete",complete:!0});return $r(l,P)||(l=P),l}if(0===a.length)return aae;let u=!1;const d=a.map(C=>this.watchSingleFragment(C,i,t)),f=function eae(e){return 0===e.length?Ul:new Ot(t=>{const{length:n}=e,r=new Array(n),o=new Map;e.forEach((l,c)=>{o.has(l)||o.set(l,new Set),o.get(l).add(c)});let a,i=o.size,s=o.size;o.forEach((l,c)=>{let u=!1;const d=c.subscribe({next:f=>{l.forEach(C=>r[C]=f),u||(u=!0,s--),s||(a||=new Set(e.filter(C=>C.dirty)),a.delete(c),a.size||(t.next(r.slice()),a=void 0))},complete:()=>{i--,i||t.complete()},error:t.error.bind(t)});t.add(d)})})}(d).pipe(ur(c),Xc({subscribe:()=>u=!0,unsubscribe:()=>u=!1}),N0({bufferSize:1,refCount:!0}));return Object.assign(f,{getCurrentResult:()=>u&&l?l:c(d.map(P=>P.getCurrentResult()))})}onAfterBroadcast=t=>t();watchSingleFragment(t,n,r){if(null===t)return sae;const{optimistic:o=!0,variables:i}=r,s=[n,Va({id:t,optimistic:o,variables:i})],a=this.fragmentWatches.lookupArray(s);if(!a.observable){let c,u=function(f){const C=f.result;return(!c||!gM(n,{data:c.data},{data:C},r.variables))&&(c={data:C,dataState:f.complete?"complete":"partial",complete:f.complete},f.missing&&(c.missing=f.missing.missing)),c},l=!1;const d=new Ot(f=>{l=!0;const C=this.watch({variables:i,returnPartialData:!0,id:t,query:n,optimistic:o,immediate:!0,callback:P=>{d.dirty=!0,this.onAfterBroadcast(()=>{f.next(u(P)),d.dirty=!1})}});return()=>{l=!1,C(),this.fragmentWatches.removeArray(s)}}).pipe(function Wse(e,t=xt){return e=e??Zse,Ri((n,r)=>{let o,i=!0;n.subscribe(Zi(r,s=>{const a=t(s);(i||!e(o,a))&&(i=!1,o=a,r.next(s))}))})}(),_f({connector:()=>new b3(1),resetOnRefCountZero:()=>function Qse(e=0,t,n=Kse){let r=-1;return null!=t&&(Ew(t)?n=t:r=t),new Ot(o=>{let i=function Xse(e){return e instanceof Date&&!isNaN(e)}(e)?+e-n.now():e;i<0&&(i=0);let s=0;return n.schedule(function(){o.closed||(o.next(s++),0<=r?this.schedule(void 0,r):o.complete())},i)})}(0)}));a.observable=Object.assign(d,{dirty:!1,getCurrentResult:()=>l&&c?c:u(this.diff({id:t,query:n,returnPartialData:!0,optimistic:o,variables:i}))})}return a.observable}getFragmentDoc=lf(oae,{max:Fa["cache.fragmentQueryDocuments"]||1e3,cache:w0,makeCacheKey:iae(this)});readFragment(t,n=!!t.optimistic){const r=void 0!==t.from?this.toCacheId(t.from):t.id;return this.read({...t,query:this.getFragmentDoc(t.fragment,t.fragmentName),rootId:r,optimistic:n})}writeQuery({id:t,data:n,...r}){return this.write(Object.assign(r,{dataId:t||"ROOT_QUERY",result:n}))}writeFragment({data:t,fragment:n,fragmentName:r,...o}){const i=void 0!==o.from?this.toCacheId(o.from):o.id;return this.write(Object.assign(o,{query:this.getFragmentDoc(n,r),dataId:i,result:t}))}updateQuery(t,n){return this.batch({update(r){const o=r.readQuery(t),i=n(o);return null==i?o:(r.writeQuery({...t,data:i}),i)}})}updateFragment(t,n){return this.batch({update(r){const o=r.readFragment(t),i=n(o);return null==i?o:(r.writeFragment({...t,data:i}),i)}})}toCacheId(t){return"string"==typeof t?t:this.identify(t)}}const CM=Object.freeze({data:null,dataState:"complete",complete:!0}),sae=Object.assign(new Ot(e=>{e.next(CM)}),{dirty:!1,getCurrentResult:()=>CM}),yM=Object.freeze({data:[],dataState:"complete",complete:!0}),aae=Object.assign(new Ot(e=>{e.next(yM)}),{getCurrentResult:()=>yM});function fi(e){return null!==e&&"object"==typeof e}const{hasOwnProperty:lae}=Object.prototype,cae=function(e,t,n){return this.merge(e[n],t[n])},bM=e=>isNaN(+e)?{}:[];class Nd{options;reconciler;constructor(t={}){this.options=t,this.reconciler=t.reconciler||cae}merge(t,n,r={}){const o=r.atPath;if(o?.length){const[i,...s]=o;void 0===t&&(t=bM(i));let a=t[i];void 0===a&&s.length&&(a=bM(s[0]));const l=this.merge(a,n,{...r,atPath:s});return a!==l&&((t=this.shallowCopyForMerge(t))[i]=l),t}return Array.isArray(t)&&Array.isArray(n)&&"truncate"===this.options.arrayMerge&&t.length>n.length&&(t=t.slice(0,n.length),this.pastCopies.add(t)),fi(n)&&fi(t)?(Object.keys(n).forEach(i=>{if(lae.call(t,i)){const s=t[i];if(n[i]!==s){const a=this.reconciler(t,n,i);a!==s&&((t=this.shallowCopyForMerge(t))[i]=a)}}else(t=this.shallowCopyForMerge(t))[i]=n[i]}),t):n}isObject=fi;pastCopies=new Set;shallowCopyForMerge(t){return fi(t)&&(this.pastCopies.has(t)||(t=Array.isArray(t)?t.slice(0):{__proto__:Object.getPrototypeOf(t),...t},this.pastCopies.add(t))),t}}function kd(e){return{__ref:String(e)}}function su(...e){const t={};return e.forEach(n=>{n&&Reflect.ownKeys(n).forEach(r=>{const o=n[r];void 0!==o&&(t[r]=o)})}),t}const vo=Array.isArray,{hasOwnProperty:jo}=Object.prototype;function TM({__typename:e,id:t,_id:n},r){if("string"==typeof e&&(r&&(r.keyObject=null!=t?{id:t}:null!=n?{_id:n}:void 0),null==t&&null!=n&&(t=n),null!=t))return`${e}:${"number"==typeof t||"string"==typeof t?t:JSON.stringify(t)}`}const _ae={dataIdFromObject:TM,resultCaching:!0},EM=/^[_a-z][_0-9a-z]*/i;function $l(e){const t=e.match(EM);return t?t[0]:e}function I3(e,t,n){return!!fi(t)&&(vo(t)?t.every(r=>I3(e,r,n)):e.selections.every(r=>{if(gf(r)&&O0(r,n)){const o=iu(r);return jo.call(t,o)&&(!r.selectionSet||I3(r.selectionSet,t[o],n))}return!0}))}function Rd(e){return fi(e)&&!lr(e)&&!vo(e)}function IM(e,t){const n=ff(pf(e));return{fragmentMap:n,lookupFragment(r){let o=n[r];return!o&&t&&(o=t.lookup(r)),o||null}}}const F0={},S3=()=>F0,SM={};class H0{policies;group;data={};constructor(t,n){this.policies=t,this.group=n}toObject(){return{...this.data}}has(t){return void 0!==this.lookup(t,!0)}get(t,n){if(this.group.depend(t,n),jo.call(this.data,t)){const r=this.data[t];if(r&&jo.call(r,n))return r[n]}return"__typename"===n&&jo.call(this.policies.rootTypenamesById,t)?this.policies.rootTypenamesById[t]:this instanceof ia?this.parent.get(t,n):void 0}lookup(t,n){return n&&this.group.depend(t,"__exists"),jo.call(this.data,t)?this.data[t]:this instanceof ia?this.parent.lookup(t,n):this.policies.rootTypenamesById[t]?{}:void 0}merge(t,n){let r;lr(t)&&(t=t.__ref),lr(n)&&(n=n.__ref);const o="string"==typeof t?this.lookup(r=t):t,i="string"==typeof n?this.lookup(r=n):n;if(!i)return;Rt("string"==typeof r,99);const s=new Nd({reconciler:vae}).merge(o,i);if(this.data[r]=s,s!==o&&(delete this.refs[r],this.group.caching)){const a={};o||(a.__exists=1),Object.keys(i).forEach(l=>{if(!o||o[l]!==s[l]){a[l]=1;const c=$l(l);c!==l&&!this.policies.hasKeyArgs(s.__typename,c)&&(a[c]=1),void 0===s[l]&&!(this instanceof ia)&&delete s[l]}}),a.__typename&&!(o&&o.__typename)&&this.policies.rootTypenamesById[r]===s.__typename&&delete a.__typename,Object.keys(a).forEach(l=>this.group.dirty(r,l))}}modify(t,n,r){const o=this.lookup(t);if(o){const i={};let s=!1,a=!0;const l={DELETE:F0,INVALIDATE:SM,isReference:lr,toReference:this.toReference,canRead:this.canRead,readField:(c,u)=>this.policies.readField("string"==typeof c?{fieldName:c,from:u||kd(t)}:c,{store:this})};if(Object.keys(o).forEach(c=>{const u=$l(c);let d=o[c];if(void 0===d)return;const f="function"==typeof n?n:n[c]||(r?void 0:n[u]);if(f){let C=f===S3?F0:f(d,{...l,fieldName:u,storeFieldName:c,storage:this.getStorage(t,c)});if(C===SM)this.group.dirty(t,c);else if(C===F0&&(C=void 0),C!==d&&(i[c]=C,s=!0,d=C,false)){const P=G=>{if(void 0===this.lookup(G.__ref))return!0};if(lr(C))P(C);else if(Array.isArray(C)){let W,G=!1;for(const ie of C){if(lr(ie)){if(G=!0,P(ie))break}else if("object"==typeof ie&&ie){const[he]=this.policies.identify(ie);he&&(W=ie)}if(G&&void 0!==W)break}}}}void 0!==d&&(a=!1)}),s)return this.merge(t,i),a&&(this instanceof ia?this.data[t]=void 0:delete this.data[t],this.group.dirty(t,"__exists")),!0}return!1}delete(t,n,r){const o=this.lookup(t);if(o){const i=this.getFieldValue(o,"__typename"),s=n&&r?this.policies.getStoreFieldName({typename:i,fieldName:n,args:r}):n;return this.modify(t,s?{[s]:S3}:S3,!!r)}return!1}evict(t,n){let r=!1;return t.id&&(jo.call(this.data,t.id)&&(r=this.delete(t.id,t.fieldName,t.args)),this instanceof ia&&this!==n&&(r=this.parent.evict(t,n)||r),(t.fieldName||r)&&this.group.dirty(t.id,t.fieldName||"__exists")),r}clear(){this.replace(null)}extract(){const t=this.toObject(),n=[];return this.getRootIdSet().forEach(r=>{jo.call(this.policies.rootTypenamesById,r)||n.push(r)}),n.length&&(t.__META={extraRootIds:n.sort()}),t}replace(t){if(Object.keys(this.data).forEach(n=>{t&&jo.call(t,n)||this.delete(n)}),t){const{__META:n,...r}=t;Object.keys(r).forEach(o=>{this.merge(o,r[o])}),n&&n.extraRootIds.forEach(this.retain,this)}}rootIds={};retain(t){return this.rootIds[t]=(this.rootIds[t]||0)+1}release(t){if(this.rootIds[t]>0){const n=--this.rootIds[t];return n||delete this.rootIds[t],n}return 0}getRootIdSet(t=new Set){return Object.keys(this.rootIds).forEach(t.add,t),this instanceof ia?this.parent.getRootIdSet(t):Object.keys(this.policies.rootTypenamesById).forEach(t.add,t),t}gc(){const t=this.getRootIdSet(),n=this.toObject();t.forEach(o=>{jo.call(n,o)&&(Object.keys(this.findChildRefIds(o)).forEach(t.add,t),delete n[o])});const r=Object.keys(n);if(r.length){let o=this;for(;o instanceof ia;)o=o.parent;r.forEach(i=>o.delete(i))}return r}refs={};findChildRefIds(t){if(!jo.call(this.refs,t)){const n=this.refs[t]={},r=this.data[t];if(!r)return n;const o=new Set([r]);o.forEach(i=>{lr(i)&&(n[i.__ref]=!0),fi(i)&&Object.keys(i).forEach(s=>{const a=i[s];fi(a)&&o.add(a)})})}return this.refs[t]}makeCacheKey(){return this.group.keyMaker.lookupArray(arguments)}getFieldValue=(t,n)=>lr(t)?this.get(t.__ref,n):t&&t[n];canRead=t=>lr(t)?this.has(t.__ref):"object"==typeof t;toReference=(t,n)=>{if("string"==typeof t)return kd(t);if(lr(t))return t;const[r]=this.policies.identify(t);if(r){const o=kd(r);return n&&this.merge(r,t),o}};get supportsResultCaching(){return this.group.caching}}class AM{caching;parent;d=null;keyMaker;constructor(t,n=null){this.caching=t,this.parent=n,this.resetCaching()}resetCaching(){this.d=this.caching?rM():null,this.keyMaker=new oa}depend(t,n){if(this.d){this.d(A3(t,n));const r=$l(n);r!==n&&this.d(A3(t,r)),this.parent&&this.parent.depend(t,n)}}dirty(t,n){this.d&&this.d.dirty(A3(t,n),"__exists"===n?"forget":"setDirty")}}function A3(e,t){return t+"#"+e}function wM(e,t){mf(e)&&e.group.depend(t,"__exists")}H0.Root=class gae extends H0{constructor({policies:t,resultCaching:n=!0,seed:r}){super(t,new AM(n)),r&&this.replace(r)}stump=new mae(this);addLayer(t,n){return this.stump.addLayer(t,n)}removeLayer(){return this}storageTrie=new oa;getStorage(){return this.storageTrie.lookupArray(arguments)}};class ia extends H0{id;parent;replay;group;constructor(t,n,r,o){super(n.policies,o),this.id=t,this.parent=n,this.replay=r,this.group=o,r(this)}addLayer(t,n){return new ia(t,this,n,this.group)}removeLayer(t){const n=this.parent.removeLayer(t);return t===this.id?(this.group.caching&&Object.keys(this.data).forEach(r=>{const o=this.data[r],i=n.lookup(r);i?o?o!==i&&Object.keys(o).forEach(s=>{$r(o[s],i[s])||this.group.dirty(r,s)}):(this.group.dirty(r,"__exists"),Object.keys(i).forEach(s=>{this.group.dirty(r,s)})):this.delete(r)}),n):n===this.parent?this:n.addLayer(this.id,this.replay)}toObject(){return{...this.parent.toObject(),...this.data}}findChildRefIds(t){const n=this.parent.findChildRefIds(t);return jo.call(this.data,t)?{...n,...super.findChildRefIds(t)}:n}getStorage(...t){let n=this.parent;for(;n.parent;)n=n.parent;return n.getStorage(...t)}}class mae extends ia{constructor(t){super("EntityStore.Stump",t,()=>{},new AM(t.group.caching,t.group))}removeLayer(){return this}merge(t,n){return this.parent.merge(t,n)}}function vae(e,t,n){const r=e[n],o=t[n];return $r(r,o)?r:o}function mf(e){return!(!e||!e.supportsResultCaching)}const w3=new D0;function Cae(e){const t=e.directives?.find(({name:r})=>"unmask"===r.value);if(!t)return"mask";const n=t.arguments?.find(({name:r})=>"mode"===r.value);return n&&"value"in n.value&&"migrate"===n.value.value?"migrate":"unmask"}const DM=Symbol.for("apollo.result.extensions"),ql=Symbol.for("apollo.result.streamInfo"),yae=Symbol.for("apollo.observableQuery.variablesUnknown");function Od(e,t,n,r){if(n.kind===wt.INT||n.kind===wt.FLOAT)e[t.value]=Number(n.value);else if(n.kind===wt.BOOLEAN||n.kind===wt.STRING)e[t.value]=n.value;else if(n.kind===wt.OBJECT){const o={};n.fields.map(i=>Od(o,i.name,i.value,r)),e[t.value]=o}else if(n.kind===wt.VARIABLE)e[t.value]=(r||{})[n.name.value];else if(n.kind===wt.LIST)e[t.value]=n.values.map(o=>{const i={};return Od(i,t,o,r),i[t.value]});else if(n.kind===wt.ENUM)e[t.value]=n.value;else{if(n.kind!==wt.NULL)throw rs(19,t.value,n.kind);e[t.value]=null}}function D3(e,t){if(e.arguments&&e.arguments.length){const n={};return e.arguments.forEach(({name:r,value:o})=>Od(n,r,o,t)),n}return null}const bae=["connection","include","skip","client","rest","export","nonreactive","stream"];let vf=Va;const LM=Object.assign(function(e,t,n){if(t&&n&&n.connection&&n.connection.key){if(n.connection.filter&&n.connection.filter.length>0){const o=n.connection.filter?n.connection.filter:[];o.sort();const i={};o.forEach(a=>{i[a]=t[a]});const s=vf(i);if("{}"!==s)return`${n.connection.key}(${s})`}return n.connection.key}let r=e;if(t){const o=vf(t);"{}"!==o&&(r+=`(${o})`)}return n&&Object.keys(n).forEach(o=>{-1===bae.indexOf(o)&&(n[o]&&Object.keys(n[o]).length?r+=`@${o}(${vf(n[o])})`:r+=`@${o}`)}),r},{setStringify(e){const t=vf;return vf=e,t}});function L3(e){return Array.isArray(e)&&e.length>0}const xM={};function x3(e){const t=JSON.stringify(e);return xM[t]||(xM[t]={})}function MM(e){const t=x3(e);return t.keyFieldsFn||(t.keyFieldsFn=(n,r)=>{const o=(s,a)=>r.readField(a,s),i=r.keyObject=M3(e,s=>{let a=Pd(r.storeObject,s,o);return void 0===a&&n!==r.storeObject&&jo.call(n,s[0])&&(a=Pd(n,s,RM)),Rt(void 0!==a,102,s.join("."),n),a});return`${r.typename}:${JSON.stringify(i)}`})}function NM(e){const t=x3(e);return t.keyArgsFn||(t.keyArgsFn=(n,{field:r,variables:o,fieldName:i})=>{const s=M3(e,l=>{const c=l[0],u=c.charAt(0);if("@"!==u){if("$"===u){const d=c.slice(1);if(o&&jo.call(o,d)){const f=l.slice(0);return f[0]=d,Pd(o,f)}return}if(n)return Pd(n,l)}else if(r&&L3(r.directives)){const d=c.slice(1),f=r.directives.find(P=>P.name.value===d),C=f&&D3(f,o);return C&&Pd(C,l.slice(1))}}),a=JSON.stringify(s);return(n||"{}"!==a)&&(i+=":"+a),i})}function M3(e,t){const n=new Nd;return kM(e).reduce((r,o)=>{let i=t(o);if(void 0!==i){for(let s=o.length-1;s>=0;--s)i={[o[s]]:i};r=n.merge(r,i)}return r},{})}function kM(e){const t=x3(e);if(!t.paths){const n=t.paths=[],r=[];e.forEach((o,i)=>{vo(o)?(kM(o).forEach(s=>n.push(r.concat(s))),r.length=0):(r.push(o),vo(e[i+1])||(n.push(r.slice(0)),r.length=0))})}return t.paths}function RM(e,t){return e[t]}function Pd(e,t,n){return n=n||RM,OM(t.reduce(function r(o,i){return vo(o)?o.map(s=>r(s,i)):o&&n(o,i)},e))}function OM(e){return fi(e)?vo(e)?e.map(OM):M3(Object.keys(e).sort(),t=>Pd(e,t)):e}const PM=new D0,BM=new WeakMap;function Cf(e){let t=BM.get(e);return t||BM.set(e,t={vars:new Set,dep:rM()}),t}function FM(e){Cf(e).vars.forEach(t=>t.forgetCache(e))}function Iae(e){const t=new Set,n=new Set,r=function(i){if(arguments.length>0){if(e!==i){e=i,t.forEach(a=>{Cf(a).dep.dirty(r),function Sae(e){e.broadcastWatches&&e.broadcastWatches()}(a)});const s=Array.from(n);n.clear(),s.forEach(a=>a(e))}}else{const s=PM.getValue();s&&(o(s),Cf(s).dep(r))}return e};r.onNextChange=i=>(n.add(i),()=>{n.delete(i)});const o=r.attachCache=i=>(t.add(i),Cf(i).vars.add(r),r);return r.forgetCache=i=>t.delete(i),r}function N3(e){return void 0!==e.args?e.args:e.field?D3(e.field,e.variables):null}const Aae=()=>{},HM=(e,t)=>t.fieldName,UM=(e,t,{mergeObjects:n})=>n(e,t),VM=(e,t)=>t,wae=(e,t,{streamFieldInfo:n,existingData:r})=>{if(!e&&!r)return t;const o=[],i=e??r,s=n?.isLastChunk?t.length:Math.max(i.length,t.length);for(let a=0;a<s;a++)o[a]=void 0===t[a]?i[a]:t[a];return o};class Dae{config;typePolicies={};toBeAdded={};supertypeMap=new Map;fuzzySubtypes=new Map;cache;rootIdsByTypename={};rootTypenamesById={};usingPossibleTypes=!1;constructor(t){this.config=t,this.config={dataIdFromObject:TM,...t},this.cache=this.config.cache,this.setRootTypename("Query"),this.setRootTypename("Mutation"),this.setRootTypename("Subscription"),t.possibleTypes&&this.addPossibleTypes(t.possibleTypes),t.typePolicies&&this.addTypePolicies(t.typePolicies)}identify(t,n){const r=this,o=n&&(n.typename||n.storeObject?.__typename)||t.__typename;if(o===this.rootTypenamesById.ROOT_QUERY)return["ROOT_QUERY"];const i=n&&n.storeObject||t,s={...n,typename:o,storeObject:i,readField:n&&n.readField||((...u)=>{const d=k3(u,i);return r.readField(d,{store:r.cache.data,variables:d.variables})})};let a;const l=o&&this.getTypePolicy(o);let c=l&&l.keyFn||this.config.dataIdFromObject;return w3.withValue(!0,()=>{for(;c;){const u=c({...t,...i},s);if(!vo(u)){a=u;break}c=MM(u)}}),a=a?String(a):void 0,s.keyObject?[a,s.keyObject]:[a]}addTypePolicies(t){Object.keys(t).forEach(n=>{const{queryType:r,mutationType:o,subscriptionType:i,...s}=t[n];r&&this.setRootTypename("Query",n),o&&this.setRootTypename("Mutation",n),i&&this.setRootTypename("Subscription",n),jo.call(this.toBeAdded,n)?this.toBeAdded[n].push(s):this.toBeAdded[n]=[s]})}updateTypePolicy(t,n,r){const o=this.getTypePolicy(t),{keyFields:i,fields:s}=n;function a(l,c){l.merge="function"==typeof c?c:!0===c?UM:!1===c?VM:l.merge}a(o,n.merge),o.keyFn=!1===i?Aae:vo(i)?MM(i):"function"==typeof i?i:o.keyFn,s&&Object.keys(s).forEach(l=>{let c=r[l];(!c||c?.typename!==t)&&(c=r[l]={typename:t});const u=s[l];if("function"==typeof u)c.read=u;else{const{keyArgs:d,read:f,merge:C}=u;c.keyFn=!1===d?HM:vo(d)?NM(d):"function"==typeof d?d:c.keyFn,"function"==typeof f&&(c.read=f),a(c,C)}c.read&&c.merge&&(c.keyFn=c.keyFn||HM)})}setRootTypename(t,n=t){const r="ROOT_"+t.toUpperCase(),o=this.rootTypenamesById[r];n!==o&&(Rt(!o||o===t,103,t),o&&delete this.rootIdsByTypename[o],this.rootIdsByTypename[n]=r,this.rootTypenamesById[r]=n)}addPossibleTypes(t){this.usingPossibleTypes=!0,Object.keys(t).forEach(n=>{this.getSupertypeSet(n,!0),t[n].forEach(r=>{this.getSupertypeSet(r,!0).add(n);const o=r.match(EM);(!o||o[0]!==r)&&this.fuzzySubtypes.set(r,new RegExp(r))})})}getTypePolicy(t){if(!jo.call(this.typePolicies,t)){const r=this.typePolicies[t]={};r.fields={};let o=this.supertypeMap.get(t);!o&&this.fuzzySubtypes.size&&(o=this.getSupertypeSet(t,!0),this.fuzzySubtypes.forEach((i,s)=>{if(i.test(t)){const a=this.supertypeMap.get(s);a&&a.forEach(l=>o.add(l))}})),o&&o.size&&o.forEach(i=>{const{fields:s,...a}=this.getTypePolicy(i);Object.assign(r,a),Object.assign(r.fields,s)})}const n=this.toBeAdded[t];return n&&n.length&&n.splice(0).forEach(r=>{this.updateTypePolicy(t,r,this.typePolicies[t].fields)}),this.typePolicies[t]}getFieldPolicy(t,n){if(t)return this.getTypePolicy(t).fields[n]}getSupertypeSet(t,n){let r=this.supertypeMap.get(t);return!r&&n&&this.supertypeMap.set(t,r=new Set),r}fragmentMatches(t,n,r,o){if(!t.typeCondition)return!0;if(!n)return!1;const i=t.typeCondition.name.value;if(n===i)return!0;if(this.usingPossibleTypes&&this.supertypeMap.has(i)){const s=this.getSupertypeSet(n,!0),a=[s],l=d=>{const f=this.getSupertypeSet(d,!1);f&&f.size&&a.indexOf(f)<0&&a.push(f)};let c=!(!r||!this.fuzzySubtypes.size),u=!1;for(let d=0;d<a.length;++d){const f=a[d];if(f.has(i))return s.has(i)||s.add(i),!0;f.forEach(l),c&&d===a.length-1&&I3(t.selectionSet,r,o)&&(c=!1,u=!0,this.fuzzySubtypes.forEach((C,P)=>{const G=n.match(C);G&&G[0]===n&&l(P)}))}}return!1}hasKeyArgs(t,n){const r=this.getFieldPolicy(t,n);return!(!r||!r.keyFn)}getStoreFieldName(t){const{typename:n,fieldName:r}=t,o=this.getFieldPolicy(n,r);let i,s=o&&o.keyFn;if(s&&n){const a={typename:n,fieldName:r,field:t.field||null,variables:t.variables},l=N3(t);for(;s;){const c=s(l,a);if(!vo(c)){i=c||r;break}s=NM(c)}}return void 0===i&&(i=t.field?function Tae(e,t){let n=null;e.directives&&(n={},e.directives.forEach(o=>{n[o.name.value]={},o.arguments&&o.arguments.forEach(({name:i,value:s})=>Od(n[o.name.value],i,s,t))}));let r=null;return e.arguments&&e.arguments.length&&(r={},e.arguments.forEach(({name:o,value:i})=>Od(r,o,i,t))),LM(e.name.value,r,n)}(t.field,t.variables):LM(r,N3(t))),!1===i?r:r===$l(i)?i:r+":"+i}readField(t,n){const r=t.from;if(!r||!t.field&&!t.fieldName)return;if(void 0===t.typename){const u=n.store.getFieldValue(r,"__typename");u&&(t.typename=u)}const i=this.getStoreFieldName(t),s=$l(i),a=n.store.getFieldValue(r,i),l=this.getFieldPolicy(t.typename,s),c=l&&l.read;if(c){const u=zM(this,r,t,n,n.store.getStorage(lr(r)?r.__ref:r,i));return PM.withValue(this.cache,c,[a,u])}return a}getReadFunction(t,n){const r=this.getFieldPolicy(t,n);return r&&r.read}getMergeFunction(t,n,r){let o=this.getFieldPolicy(t,n),i=o&&o.merge;return!i&&r&&(o=this.getTypePolicy(r),i=o&&o.merge),i}runMergeFunction(t,n,{field:r,typename:o,merge:i,path:s},a,l){const c=t;if(i===UM)return jM(a.store)(t,n);if(i===VM)return n;a.overwrite&&(t=void 0);const u=a.extensions?.[ql]?.deref()?.peekArray(s);if(u){const{current:f,previous:C}=u;if(C&&$r(C.incoming,n)&&$r(C.streamFieldInfo,f))return C.result}const d=i(t,n,function Lae(e,t,n,r,o,i){const s={...zM(e,t,n,r,o),extensions:r.extensions,existingData:i},a=r.extensions;if(a&&ql in a){const{[ql]:l,...c}=a,u=l?.deref()?.peekArray(n.path);u&&(s.streamFieldInfo=u.current),s.extensions=0===Object.keys(c).length?void 0:c}return s}(this,void 0,{typename:o,fieldName:r.name.value,field:r,variables:a.variables,path:s},a,l||{},c));return u&&(u.previous={incoming:n,streamFieldInfo:u.current,result:d}),d}}function zM(e,t,n,r,o){const i=e.getStoreFieldName(n),s=$l(i),a=n.variables||r.variables,{toReference:l,canRead:c}=r.store;return{args:N3(n),field:n.field||null,fieldName:s,storeFieldName:i,variables:a,isReference:lr,toReference:l,storage:o,cache:e.cache,canRead:c,readField:(...u)=>e.readField(k3(u,t,a),r),mergeObjects:jM(r.store)}}function k3(e,t,n){const{0:r,1:o,length:i}=e;let s;return"string"==typeof r?s={fieldName:r,from:i>1?o:t}:(s={...r},jo.call(s,"from")||(s.from=t)),void 0===s.variables&&(s.variables=n),s}function jM(e){return function(n,r){if(vo(n)||vo(r))throw rs(106);if(fi(n)&&fi(r)){const o=e.getFieldValue(n,"__typename"),i=e.getFieldValue(r,"__typename");if(o&&i&&o!==i)return r;if(lr(n)&&Rd(r))return e.merge(n.__ref,r),n;if(Rd(n)&&lr(r))return e.merge(n,r.__ref),r;if(Rd(n)&&Rd(r))return{...n,...r}}return r}}function R3(e){const t={},n=e&&e.variableDefinitions;return n&&n.length&&n.forEach(r=>{r.defaultValue&&Od(t,r.variable.name,r.defaultValue)}),t}function GM(e){const t=Ha(e);return Rt(t&&"query"===t.operation,13),t}function xae(e){let t=e[0]||{};const n=e.length;if(n>1){const r=new Nd;for(let o=1;o<n;++o)t=r.merge(t,e[o])}return t}class O3 extends Error{message;path;query;variables;constructor(t,n,r,o){if(super(t),this.message=t,this.path=n,this.query=r,this.variables=o,this.name="MissingFieldError",Array.isArray(this.path)){this.missing=this.message;for(let i=this.path.length-1;i>=0;--i)this.missing={[this.path[i]]:this.missing}}else this.missing=this.path;this.__proto__=O3.prototype}missing}function $M(e){return[e.selectionSet,e.objectOrReference,e.context]}class Mae{executeSelectionSet;executeSubSelectedArray;config;knownResults=new WeakMap;constructor(t){this.config=t,this.executeSelectionSet=lf(n=>{const r=$M(n);return this.executeSelectionSet.peek(...r)||(wM(n.context.store,n.enclosingRef.__ref),this.execSelectionSetImpl(n))},{max:Fa["inMemoryCache.executeSelectionSet"]||5e4,keyArgs:$M,makeCacheKey(n,r,o){if(mf(o.store))return o.store.makeCacheKey(n,lr(r)?r.__ref:r,o.varString)}}),this.executeSubSelectedArray=lf(n=>(wM(n.context.store,n.enclosingRef.__ref),this.execSubSelectedArrayImpl(n)),{max:Fa["inMemoryCache.executeSubSelectedArray"]||1e4,makeCacheKey({field:n,array:r,context:o}){if(mf(o.store))return o.store.makeCacheKey(n,r,o.varString)}})}diffQueryAgainstStore({store:t,query:n,rootId:r="ROOT_QUERY",variables:o,returnPartialData:i=!0}){const s=this.config.cache.policies;o={...R3(GM(n)),...o};const a=kd(r),l=this.executeSelectionSet({selectionSet:E3(n).selectionSet,objectOrReference:a,enclosingRef:a,context:{store:t,query:n,policies:s,variables:o,varString:Va(o),...IM(n,this.config.fragments)}});let c;l.missing&&(c=new O3(function Nae(e){try{JSON.stringify(e,(t,n)=>{if("string"==typeof n)throw n;return n})}catch(t){return t}}(l.missing),l.missing,n,o));const u=!c,{result:d}=l;return{result:u?d:i?0===Object.keys(d).length?null:d:null,complete:u,missing:c}}isFresh(t,n,r,o){if(mf(o.store)&&this.knownResults.get(t)===r){const i=this.executeSelectionSet.peek(r,n,o);if(i&&t===i.result)return!0}return!1}execSelectionSetImpl({selectionSet:t,objectOrReference:n,enclosingRef:r,context:o}){if(lr(n)&&!o.policies.rootTypenamesById[n.__ref]&&!o.store.has(n.__ref))return{result:{},missing:`Dangling reference to missing ${n.__ref} object`};const{variables:i,policies:s,store:a}=o,l=a.getFieldValue(n,"__typename"),c=[];let u;const d=new Nd;function f(ie,he){return ie.missing&&(u=d.merge(u,{[he]:ie.missing})),ie.result}"string"==typeof l&&!s.rootIdsByTypename[l]&&c.push({__typename:l});const C=new Set(t.selections);C.forEach(ie=>{if(O0(ie,i))if(gf(ie)){let he=s.readField({fieldName:ie.name.value,field:ie,variables:o.variables,from:n},o);const qe=iu(ie);void 0===he?h3.added(ie)||(u=d.merge(u,{[qe]:`Can't find field '${ie.name.value}' on ${lr(n)?n.__ref+" object":"object "+JSON.stringify(n,null,2)}`})):vo(he)?he.length>0&&(he=f(this.executeSubSelectedArray({field:ie,array:he,enclosingRef:r,context:o}),qe)):ie.selectionSet&&null!=he&&(he=f(this.executeSelectionSet({selectionSet:ie.selectionSet,objectOrReference:he,enclosingRef:lr(he)?he:r,context:o}),qe)),void 0!==he&&c.push({[qe]:he})}else{const he=R0(ie,o.lookupFragment);if(!he&&ie.kind===wt.FRAGMENT_SPREAD)throw rs(107,ie.name.value);he&&s.fragmentMatches(he,l)&&he.selectionSet.selections.forEach(C.add,C)}});const W={result:xae(c),missing:u};return W.result&&this.knownResults.set(W.result,t),W}execSubSelectedArrayImpl({field:t,array:n,enclosingRef:r,context:o}){let i,s=new Nd;function a(l,c){return l.missing&&(i=s.merge(i,{[c]:l.missing})),l.result}return t.selectionSet&&(n=n.filter(l=>void 0===l||o.store.canRead(l))),{result:n=n.map((l,c)=>null===l?null:vo(l)?a(this.executeSubSelectedArray({field:t,array:l,enclosingRef:r,context:o}),c):t.selectionSet?a(this.executeSelectionSet({selectionSet:t.selectionSet,objectOrReference:l,enclosingRef:lr(l)?l:r,context:o}),c):l),missing:i}}}function Bd(e,t,n){const r=new Set(e),o=r.size;return ra(t,{Directive(i){if(r.delete(i.name.value)&&(!n||!r.size))return Vl}}),n?!r.size:r.size<o}function B3(e,t,n){const r=`${t}${n}`;let o=e.flavors.get(r);return o||e.flavors.set(r,o=e.clientOnly===t&&e.deferred===n?e:{...e,clientOnly:t,deferred:n}),o}class Pae{cache;reader;fragments;constructor(t,n,r){this.cache=t,this.reader=n,this.fragments=r}writeToStore(t,{query:n,result:r,dataId:o,variables:i,overwrite:s,extensions:a}){const l=Ha(n),c=function pae(){return new Nd}();i={...R3(l),...i};const u={store:t,written:{},merge:(f,C)=>c.merge(f,C),variables:i,varString:Va(i),...IM(n,this.fragments),overwrite:!!s,incomingById:new Map,clientOnly:!1,deferred:!1,flavors:new Map,extensions:a},d=this.processSelectionSet({result:r||{},dataId:o,selectionSet:l.selectionSet,mergeTree:{map:new Map},context:u,path:[]});if(!lr(d))throw rs(109,r);return u.incomingById.forEach(({storeObject:f,mergeTree:C},G)=>{const W=kd(G);if(C&&C.map.size){const ie=this.applyMerges(C,W,f,u);if(lr(ie))return;f=ie}t.merge(G,f)}),t.retain(d.__ref),d}processSelectionSet({dataId:t,result:n,selectionSet:r,context:o,mergeTree:i,path:s}){const{policies:a}=this.cache;let l={};const c=t&&a.rootTypenamesById[t]||H3(n,r,o.fragmentMap)||t&&o.store.get(t,"__typename");"string"==typeof c&&(l.__typename=c);const u=(...f)=>{const C=k3(f,l,o.variables);if(lr(C.from)){const P=o.incomingById.get(C.from.__ref);if(P){const G=a.readField({...C,from:P.storeObject},o);if(void 0!==G)return G}}return a.readField(C,o)},d=new Set;this.flattenFields(r,n,o,c).forEach((f,C)=>{const P=iu(C),G=n[P],W=[...s,C.name.value];if(d.add(C),void 0!==G){const ie=a.getStoreFieldName({typename:c,fieldName:C.name.value,field:C,variables:f.variables}),he=WM(i,ie);let st,qe=this.processFieldValue(G,C,C.selectionSet?B3(f,!1,!1):f,he,W);C.selectionSet&&(lr(qe)||Rd(qe))&&(st=u("__typename",qe));const St=a.getMergeFunction(c,C.name.value,st);St?he.info={field:C,typename:c,merge:St,path:W}:Bd(["stream"],C)&&Array.isArray(qe)&&f.extensions?.[ql]?he.info={field:C,typename:c,merge:wae,path:W}:ZM(i,ie),l=f.merge(l,{[ie]:qe})}});try{const[f,C]=a.identify(n,{typename:c,selectionSet:r,fragmentMap:o.fragmentMap,storeObject:l,readField:u});t=t||f,C&&(l=o.merge(l,C))}catch(f){if(!t)throw f}if("string"==typeof t){const f=kd(t),C=o.written[t]||(o.written[t]=[]);if(C.indexOf(r)>=0||(C.push(r),this.reader&&this.reader.isFresh(n,f,r,o)))return f;const P=o.incomingById.get(t);return P?(P.storeObject=o.merge(P.storeObject,l),P.mergeTree=F3(P.mergeTree,i),d.forEach(G=>P.fieldNodeSet.add(G))):o.incomingById.set(t,{storeObject:l,mergeTree:U0(i)?void 0:i,fieldNodeSet:d}),f}return l}processFieldValue(t,n,r,o,i){return n.selectionSet&&null!==t?vo(t)?t.map((s,a)=>{const l=this.processFieldValue(s,n,r,WM(o,a),[...i,a]);return ZM(o,a),l}):this.processSelectionSet({result:t,selectionSet:n.selectionSet,context:r,mergeTree:o,path:i}):t}flattenFields(t,n,r,o=H3(n,t,r.fragmentMap)){const i=new Map,{policies:s}=this.cache,a=new oa(!1);return function l(c,u){const d=a.lookup(c,u.clientOnly,u.deferred);d.visited||(d.visited=!0,c.selections.forEach(f=>{if(!O0(f,r.variables))return;let{clientOnly:C,deferred:P}=u;if(!(C&&P)&&L3(f.directives)&&f.directives.forEach(G=>{const W=G.name.value;if("client"===W&&(C=!0),"defer"===W){const ie=D3(G,r.variables);(!ie||!1!==ie.if)&&(P=!0)}}),gf(f)){const G=i.get(f);G&&(C=C&&G.clientOnly,P=P&&G.deferred),i.set(f,B3(r,C,P))}else{const G=R0(f,r.lookupFragment);if(!G&&f.kind===wt.FRAGMENT_SPREAD)throw rs(111,f.name.value);G&&s.fragmentMatches(G,o,n,r.variables)&&l(G.selectionSet,B3(r,C,P))}}))}(t,r),i}applyMerges(t,n,r,o,i){if(t.map.size&&!lr(r)){const s=vo(r)||!lr(n)&&!Rd(n)?void 0:n,a=r;let l;s&&!i&&(i=[lr(s)?s.__ref:s]);const c=(u,d)=>vo(u)?"number"==typeof d?u[d]:void 0:o.store.getFieldValue(u,String(d));t.map.forEach((u,d)=>{const f=c(s,d),C=c(a,d);if(void 0===C)return;i&&i.push(d);const P=this.applyMerges(u,f,C,o,i);P!==C&&(l=l||new Map,l.set(d,P)),i&&Rt(i.pop()===d)}),l&&(r=vo(a)?a.slice(0):{...a},l.forEach((u,d)=>{r[d]=u}))}return t.info?this.cache.policies.runMergeFunction(n,r,t.info,o,i&&o.store.getStorage(...i)):r}}const qM=[];function WM({map:e},t){return e.has(t)||e.set(t,qM.pop()||{map:new Map}),e.get(t)}function F3(e,t){if(e===t||!t||U0(t))return e;if(!e||U0(e))return t;const n=e.info&&t.info?{...e.info,...t.info}:e.info||t.info,r=e.map.size&&t.map.size,i={info:n,map:r?new Map:e.map.size?e.map:t.map};if(r){const s=new Set(t.map.keys());e.map.forEach((a,l)=>{i.map.set(l,F3(a,t.map.get(l))),s.delete(l)}),s.forEach(a=>{i.map.set(a,F3(t.map.get(a),e.map.get(a)))})}return i}function U0(e){return!e||!(e.info||e.map.size)}function ZM({map:e},t){const n=e.get(t);n&&U0(n)&&(qM.push(n),e.delete(t))}function H3(e,t,n){let r;for(const o of t.selections)if(gf(o)){if("__typename"===o.name.value)return e[iu(o)]}else r?r.push(o):r=[o];if("string"==typeof e.__typename)return e.__typename;if(r)for(const o of r){const i=H3(e,R0(o,n).selectionSet,n);if("string"==typeof i)return i}}class KM extends vM{data;optimisticData;config;watches=new Set;storeReader;storeWriter;addTypenameTransform=new Ua(h3);maybeBroadcastWatch;assumeImmutableResults=!0;policies;makeVar=Iae;constructor(t={}){super(),this.config=function hae(e){return su(_ae,e)}(t),this.policies=new Dae({cache:this,dataIdFromObject:this.config.dataIdFromObject,possibleTypes:this.config.possibleTypes,typePolicies:this.config.typePolicies}),this.init()}init(){const t=this.data=new H0.Root({policies:this.policies,resultCaching:this.config.resultCaching});this.optimisticData=t.stump,this.resetResultCache()}resetResultCache(){const{fragments:t}=this.config;this.addTypenameTransform.resetCache(),t?.resetCaches(),this.storeWriter=new Pae(this,this.storeReader=new Mae({cache:this,fragments:t}),t),this.maybeBroadcastWatch=lf((n,r)=>this.broadcastWatch(n,r),{max:Fa["inMemoryCache.maybeBroadcastWatch"]||5e3,makeCacheKey:n=>{const r=n.optimistic?this.optimisticData:this.data;if(mf(r)){const{optimistic:o,id:i,variables:s}=n;return r.makeCacheKey(n.query,n.callback,Va({optimistic:o,id:i,variables:s}))}}}),new Set([this.data.group,this.optimisticData.group]).forEach(n=>n.resetCaching())}restore(t){return this.init(),t&&this.data.replace(t),this}extract(t=!1){return(t?this.optimisticData:this.data).extract()}read(t){const{returnPartialData:n=!1}=t;return this.storeReader.diffQueryAgainstStore({...t,store:t.optimistic?this.optimisticData:this.data,config:this.config,returnPartialData:n}).result}write(t){try{return++this.txCount,this.storeWriter.writeToStore(this.data,t)}finally{! --this.txCount&&!1!==t.broadcast&&this.broadcastWatches()}}modify(t){if(jo.call(t,"id")&&!t.id)return!1;const n=t.optimistic?this.optimisticData:this.data;try{return++this.txCount,n.modify(t.id||"ROOT_QUERY",t.fields,!1)}finally{! --this.txCount&&!1!==t.broadcast&&this.broadcastWatches()}}diff(t){return this.storeReader.diffQueryAgainstStore({...t,store:t.optimistic?this.optimisticData:this.data,rootId:t.id||"ROOT_QUERY",config:this.config})}watch(t){return this.watches.size||function Eae(e){Cf(e).vars.forEach(t=>t.attachCache(e))}(this),this.watches.add(t),t.immediate&&this.maybeBroadcastWatch(t),()=>{this.watches.delete(t)&&!this.watches.size&&FM(this),this.maybeBroadcastWatch.forget(t)}}gc(t){Va.reset(),df.reset();const n=this.optimisticData.gc();return t&&!this.txCount&&t.resetResultCache&&this.resetResultCache(),n}retain(t,n){return(n?this.optimisticData:this.data).retain(t)}release(t,n){return(n?this.optimisticData:this.data).release(t)}identify(t){if(lr(t))return t.__ref;try{return this.policies.identify(t)[0]}catch(n){}}evict(t){if(!t.id){if(jo.call(t,"id"))return!1;t={...t,id:"ROOT_QUERY"}}try{return++this.txCount,this.optimisticData.evict(t,this.data)}finally{! --this.txCount&&!1!==t.broadcast&&this.broadcastWatches()}}reset(t){return this.init(),Va.reset(),t&&t.discardWatches?(this.watches.forEach(n=>this.maybeBroadcastWatch.forget(n)),this.watches.clear(),FM(this)):this.broadcastWatches(),Promise.resolve()}removeOptimistic(t){const n=this.optimisticData.removeLayer(t);n!==this.optimisticData&&(this.optimisticData=n,this.broadcastWatches())}txCount=0;batch(t){const{update:n,optimistic:r=!0,removeOptimistic:o,onWatchUpdated:i}=t;let s;const a=c=>{const{data:u,optimisticData:d}=this;++this.txCount,c&&(this.data=this.optimisticData=c);try{return s=n(this)}finally{--this.txCount,this.data=u,this.optimisticData=d}},l=new Set;return i&&!this.txCount&&this.broadcastWatches({...t,onWatchUpdated:c=>(l.add(c),!1)}),"string"==typeof r?this.optimisticData=this.optimisticData.addLayer(r,a):!1===r?a(this.data):a(),"string"==typeof o&&(this.optimisticData=this.optimisticData.removeLayer(o)),i&&l.size?(this.broadcastWatches({...t,onWatchUpdated(c,u){const d=i.call(this,c,u);return!1!==d&&l.delete(c),d}}),l.size&&l.forEach(c=>this.maybeBroadcastWatch.dirty(c))):this.broadcastWatches(t),s}performTransaction(t,n){return this.batch({update:t,optimistic:n||null!==n})}transformDocument(t){return this.addTypenameTransform.transformDocument(this.addFragmentsToDocument(t))}fragmentMatches(t,n){return this.policies.fragmentMatches(t,n)}lookupFragment(t){return this.config.fragments?.lookup(t)||null}resolvesClientField(t,n){return!!this.policies.getReadFunction(t,n)}broadcastWatches(t){if(!this.txCount){const n=this.onAfterBroadcast,r=new Set;this.onAfterBroadcast=o=>{r.add(o)};try{this.watches.forEach(o=>this.maybeBroadcastWatch(o,t)),r.forEach(o=>o())}finally{this.onAfterBroadcast=n}}}addFragmentsToDocument(t){const{fragments:n}=this.config;return n?n.transform(t):t}broadcastWatch(t,n){const{lastDiff:r}=t,o=this.diff(t);n&&(t.optimistic&&"string"==typeof n.optimistic&&(o.fromOptimisticTransaction=!0),n.onWatchUpdated&&!1===n.onWatchUpdated.call(this,t,o,r))||(!r||!$r(r.result,o.result))&&t.callback(t.lastDiff=o,r)}}class XM extends hi{constructor(t){super((n,r)=>{const{...o}=n;return Object.defineProperty(o,"client",{enumerable:!1,value:n.client}),new Ot(i=>{let s=!1;return Promise.resolve(o).then(a=>t(n.getContext(),a)).then(n.setContext).then(()=>{s||r(n).subscribe(i)}).catch(i.error.bind(i)),()=>{s=!0}})})}}class Fae{isIncrementalResult(t){return!1}prepareRequest(t){return Rt(!Bd(["defer","stream"],t.query),67),t}extractErrors(){}startRequest=void 0}const U3=hi.execute;function V3(e,t){return su(e,t,t.variables&&{variables:su({...e&&e.variables,...t.variables})})}function Hae(e){return ra(e,{FragmentSpread(t){if(!t.directives?.some(({name:n})=>"unmask"===n.value))return null}})}function Wl(e,t){const n=Ke(e)?e:()=>e,r=o=>o.error(n());return new Ot(t?o=>t.schedule(r,0,o):r)}function za(e){return Ri((t,n)=>{let i,r=null,o=!1;r=t.subscribe(Zi(n,void 0,void 0,s=>{i=vs(e(s,za(e)(t))),r?(r.unsubscribe(),r=null,i.subscribe(n)):o=!0})),o&&(r.unsubscribe(),r=null,i.subscribe(n))})}class ja{constructor(t,n,r){this.kind=t,this.value=n,this.error=r,this.hasValue="N"===t}observe(t){return function Vae(e,t){var n,r,o;const{kind:i,value:s,error:a}=e;if("string"!=typeof i)throw new TypeError('Invalid notification, missing "kind"');"N"===i?null===(n=t.next)||void 0===n||n.call(t,s):"E"===i?null===(r=t.error)||void 0===r||r.call(t,a):null===(o=t.complete)||void 0===o||o.call(t)}(this,t)}do(t,n,r){const{kind:o,value:i,error:s}=this;return"N"===o?t?.(i):"E"===o?n?.(s):r?.()}accept(t,n,r){var o;return Ke(null===(o=t)||void 0===o?void 0:o.next)?this.observe(t):this.do(t,n,r)}toObservable(){const{kind:t,value:n,error:r}=this,o="N"===t?Ks(n):"E"===t?Wl(()=>r):"C"===t?Ul:0;if(!o)throw new TypeError(`Unexpected notification kind ${t}`);return o}static createNext(t){return new ja("N",t)}static createError(t){return new ja("E",void 0,t)}static createComplete(){return ja.completeNotification}}function QM(e=1/0){return Ll(xt,e)}function yf(...e){return function jae(){return QM(1)}()(Ys(e,O2(e)))}function z3(e,t){return"object"==typeof e&&null!==e&&e[Symbol.for("apollo.error")]===t}function j3(e){Object.defineProperty(e,Symbol.for("apollo.error"),{value:e.name,enumerable:!1,writable:!1,configurable:!1})}function JM(e){return e.filter(t=>t).map(t=>t.message||"Error message not found.").join("\n")}ja.completeNotification=new ja("C");let bf=(()=>{class e extends Error{static is(n){return z3(n,"CombinedGraphQLErrors")}static formatMessage=JM;errors;data;extensions;constructor(n,r=n.errors||[]){super(e.formatMessage(r,{result:n,defaultFormatMessage:JM})),this.errors=r,this.data=n.data,this.extensions=n.extensions,this.name="CombinedGraphQLErrors",j3(this),Object.setPrototypeOf(this,e.prototype)}}return e})();function eN(e){return e.map(t=>t.message||"Error message not found.").join("\n")}let Gae=(()=>{class e extends Error{static is(n){return z3(n,"CombinedProtocolErrors")}static formatMessage=eN;errors;constructor(n){super(e.formatMessage(n,{defaultFormatMessage:eN})),this.name="CombinedProtocolErrors",this.errors=n,j3(this),Object.setPrototypeOf(this,e.prototype)}}return e})();class G3 extends Error{static is(t){return z3(t,"UnconventionalError")}constructor(t){super("An error of unexpected shape occurred.",{cause:t}),this.name="UnconventionalError",j3(this),Object.setPrototypeOf(this,G3.prototype)}}const $3=Symbol(),tN=new WeakSet;function nN(e,t,n){return w3.withValue(!0,()=>{const r=Tf(e,t,n,!1);return Object.isFrozen(e),r})}function Tf(e,t,n,r,o){const{knownChanged:i}=n,s=function Yae(e,t){if(t.has(e))return t.get(e);const n=Array.isArray(e)?[]:{};return t.set(e,n),n}(e,n.mutableTargets);if(Array.isArray(e)){for(const[a,l]of Array.from(e.entries())){if(null===l){s[a]=null;continue}const c=Tf(l,t,n,r,void 0);i.has(c)&&i.add(s),s[a]=c}return i.has(s)?s:e}for(const a of t.selections){let l;if(r&&i.add(s),a.kind===wt.FIELD){const c=iu(a),u=a.selectionSet;if(l=s[c]||e[c],void 0===l)continue;if(u&&null!==l){const d=Tf(e[c],u,n,r,void 0);i.has(d)&&(l=d)}s[c]=l}if(a.kind===wt.INLINE_FRAGMENT&&(!a.typeCondition||n.cache.fragmentMatches(a,e.__typename))&&(l=Tf(e,a.selectionSet,n,r,o)),a.kind===wt.FRAGMENT_SPREAD){const c=a.name.value,u=n.fragmentMap[c]||(n.fragmentMap[c]=n.cache.lookupFragment(c));Rt(u,39,c);const d=Cae(a);"mask"!==d&&(l=Tf(e,u.selectionSet,n,"migrate"===d,o))}i.has(l)&&i.add(s)}return"__typename"in e&&!("__typename"in s)&&(s.__typename=e.__typename),Object.keys(s).length!==Object.keys(e).length&&i.add(s),i.has(s)?s:e}function rN(e){return 7===e||8===e}function V0(e){return!rN(e)}function Fd(e){return!!e.errors?.length}function q3(e,t=()=>{}){return n=>new Ot(r=>{let o=t();return n.subscribe({next(i){let s;try{s=e(i,o)}catch(a){r.error(a)}void 0!==s&&r.next(s)},error(i){r.error(i)},complete(){r.complete()}})})}function Ef(e){const t={data:e.data};return e.error&&(t.error=e.error),t}function Jae(e){let t=!1;return ra(e,{Directive:{enter(n){if("client"===n.name.value&&n.arguments&&(t=n.arguments.some(r=>"always"===r.name.value&&"BooleanValue"===r.value.kind&&!0===r.value.value),t))return Vl}}}),t}function ele(e,t){zl(t);const n=oN(""),r=oN(""),o=W=>{for(let he,ie=0;ie<W.length&&(he=W[ie]);++ie)if(!vo(he)){if(he.kind===wt.OPERATION_DEFINITION)return n(he.name&&he.name.value);if(he.kind===wt.FRAGMENT_DEFINITION)return r(he.name.value)}return Rt.error(14),null};let i=0;for(let W=t.definitions.length-1;W>=0;--W)t.definitions[W].kind===wt.OPERATION_DEFINITION&&++i;const s=function tle(e){const t=new Map,n=new Map;return e.forEach(r=>{r&&(r.name?t.set(r.name,r):r.test&&n.set(r.test,r))}),r=>{let o=t.get(r.name.value);return!o&&n.size&&n.forEach((i,s)=>{s(r)&&(o=i)}),o}}(e),a=W=>L3(W)&&W.map(s).some(ie=>ie&&ie.remove),l=new Map;let c=!1;const u={enter(W){if(a(W.directives))return c=!0,null}},d=ra(t,{Field:u,InlineFragment:u,VariableDefinition:{enter:()=>!1},Variable:{enter(W,ie,he,qe,st){const St=o(st);St&&St.variables.add(W.name.value)}},FragmentSpread:{enter(W,ie,he,qe,st){if(a(W.directives))return c=!0,null;const St=o(st);St&&St.fragmentSpreads.add(W.name.value)}},FragmentDefinition:{enter(W,ie,he,qe){l.set(JSON.stringify(qe),W)},leave:(W,ie,he,qe)=>W===l.get(JSON.stringify(qe))?W:i>0&&W.selectionSet.selections.every(St=>St.kind===wt.FIELD&&"__typename"===St.name.value)?(r(W.name.value).removed=!0,c=!0,null):void 0},Directive:{leave(W){if(s(W))return c=!0,null}}});if(!c)return t;const f=W=>(W.transitiveVars||(W.transitiveVars=new Set(W.variables),W.removed||W.fragmentSpreads.forEach(ie=>{f(r(ie)).transitiveVars.forEach(he=>{W.transitiveVars.add(he)})})),W),C=new Set;d.definitions.forEach(W=>{W.kind===wt.OPERATION_DEFINITION?f(n(W.name&&W.name.value)).fragmentSpreads.forEach(ie=>{C.add(ie)}):W.kind===wt.FRAGMENT_DEFINITION&&0===i&&!r(W.name.value).removed&&C.add(W.name.value)}),C.forEach(W=>{f(r(W)).fragmentSpreads.forEach(ie=>{C.add(ie)})});const G={enter(W){if((W=>!(C.has(W)&&!r(W).removed))(W.name.value))return null}};return function nle(e){return iN(Ha(e)||function fM(e){Rt("Document"===e.kind,6),Rt(e.definitions.length<=1,7);const t=e.definitions[0];return Rt("FragmentDefinition"===t.kind,8),t}(e),ff(pf(e)))?null:e}(ra(d,{FragmentSpread:G,FragmentDefinition:G,OperationDefinition:{leave(W){if(W.variableDefinitions){const ie=f(n(W.name&&W.name.value)).transitiveVars;if(ie.size<W.variableDefinitions.length)return{...W,variableDefinitions:W.variableDefinitions.filter(he=>ie.has(he.variable.name.value))}}}}}))}function oN(e){const t=new Map;return function(r=e){let o=t.get(r);return o||t.set(r,o={variables:new Set,fragmentSpreads:new Set}),o}}function iN(e,t){return!e||e.selectionSet.selections.every(n=>n.kind===wt.FRAGMENT_SPREAD&&iN(t[n.name.value],t))}var bn=function(e){return e[e.loading=1]="loading",e[e.setVariables=2]="setVariables",e[e.fetchMore=3]="fetchMore",e[e.refetch=4]="refetch",e[e.poll=6]="poll",e[e.ready=7]="ready",e[e.error=8]="error",e[e.streaming=9]="streaming",e}(bn||{});function sN(e){return e.catch(()=>{}),e}const{assign:aN}=Object,Hd={loading:!0,networkStatus:bn.loading,data:void 0,dataState:"empty",partial:!0},W3={loading:!1,networkStatus:bn.ready,data:void 0,dataState:"empty",partial:!0};class Z3{options;queryName;variablesUnknown=!1;_lastWrite;get query(){return this.lastQuery}get variables(){return this.options.variables}unsubscribeFromCache;input;subject;isTornDown;queryManager;subscriptions=new Set;waitForNetworkResult;lastQuery;linkSubscription;pollingInfo;get networkStatus(){return this.subject.getValue().result.networkStatus}get cache(){return this.queryManager.cache}constructor({queryManager:t,options:n,transformedQuery:r=t.transform(n.query)}){this.queryManager=t,this.waitForNetworkResult="network-only"===n.fetchPolicy,this.isTornDown=!1,this.subscribeToMore=this.subscribeToMore.bind(this),this.maskResult=this.maskResult.bind(this);const{watchQuery:{fetchPolicy:o="cache-first"}={}}=t.defaultOptions,{fetchPolicy:i=o,initialFetchPolicy:s=("standby"===i?o:i)}=n;n[yae]&&(Rt("standby"===i,80),this.variablesUnknown=!0),this.lastQuery=r,this.options={...n,initialFetchPolicy:s,fetchPolicy:i,variables:this.getVariablesWithDefaults(n.variables)},this.initializeObservablesQueue(),this["@@observable"]=()=>this,Symbol.observable&&(this[Symbol.observable]=()=>this);const a=Ha(this.query);this.queryName=a&&a.name&&a.name.value}initializeObservablesQueue(){this.subject=new Dn({query:this.query,variables:this.variables,result:Hd,meta:{}});const t=this.subject.pipe(Xc({subscribe:()=>{this.subject.observed||(this.reobserve(),setTimeout(()=>this.updatePolling()))},unsubscribe:()=>{this.subject.observed||this.tearDownQuery()}}),q3(({query:n,variables:r,result:o,meta:i},s)=>{const{shouldEmit:a}=i;if(o===Hd&&(s.previous=void 0,s.previousVariables=void 0),"standby"===this.options.fetchPolicy||2===a)return;if(1===a)return u();const{previous:l,previousVariables:c}=s;if(l){const d=this.queryManager.getDocumentInfo(n),f=this.queryManager.dataMasking;if((f||d.hasNonreactiveDirective?gM(f?d.nonReactiveQuery:n,l,o,r):$r(l,o))&&$r(c,r))return}if(3!==a||this.options.notifyOnNetworkStatusChange&&!$r(l,o))return u();function u(){return s.previous=o,s.previousVariables=r,o}},()=>({})));this.pipe=t.pipe.bind(t),this.subscribe=t.subscribe.bind(t),this.input=new Rn,this.input.complete=()=>{},this.input.pipe(this.operator).subscribe(this.subject)}subscribe;pipe;[Symbol.observable];"@@observable";getCacheDiff({optimistic:t=!0}={}){return this.cache.diff({query:this.query,variables:this.variables,returnPartialData:!0,optimistic:t})}getInitialResult(t){let n=t||this.options.fetchPolicy;this.queryManager.prioritizeCacheValues&&("network-only"===n||"cache-and-network"===n)&&(n="cache-first");const r=()=>{const o=this.getCacheDiff(),i=this.options.returnPartialData||o.complete?o.result??void 0:void 0;return this.maskResult({data:i,dataState:o.complete?"complete":void 0===i?"empty":"partial",loading:!o.complete,networkStatus:o.complete?bn.ready:bn.loading,partial:!o.complete})};switch(n){case"cache-only":return{...r(),loading:!1,networkStatus:bn.ready};case"cache-first":return r();case"cache-and-network":return{...r(),loading:!0,networkStatus:bn.loading};case"standby":return W3;default:return Hd}}resubscribeCache(){const{variables:t,fetchPolicy:n}=this.options,r=this.query,o="standby"===n||"no-cache"===n||this.waitForNetworkResult,i=!If({query:r,variables:t},this.unsubscribeFromCache)&&!this.waitForNetworkResult;if((o||i)&&this.unsubscribeFromCache?.(),o||!i)return;const s={query:r,variables:t,optimistic:!0,watcher:this,callback:l=>{const c=this.queryManager.getDocumentInfo(r);if((c.hasClientExports||c.hasForcedResolvers)&&(s.lastDiff=void 0),s.lastOwnDiff===l)return;const{result:u}=this.subject.getValue();!l.complete&&(u.error||u===Hd||u===W3)||$r(u.data,l.result)||this.scheduleNotify()}},a=this.cache.watch(s);this.unsubscribeFromCache=Object.assign(()=>{this.unsubscribeFromCache=void 0,a()},{query:r,variables:t})}stableLastResult;getCurrentResult(){const{result:t}=this.subject.getValue();let n=t.networkStatus===bn.error||this.hasObservers()||"no-cache"===this.options.fetchPolicy?t:this.getInitialResult();return n===Hd&&(n=this.getInitialResult()),$r(this.stableLastResult,n)||(this.stableLastResult=n),this.stableLastResult}refetch(t){const{fetchPolicy:n}=this.options,r={pollInterval:0};return r.fetchPolicy="no-cache"===n?"no-cache":"network-only",t&&!$r(this.variables,t)&&(r.variables=this.options.variables=this.getVariablesWithDefaults({...this.variables,...t})),this._lastWrite=void 0,this._reobserve(r,{newNetworkStatus:bn.refetch})}fetchMore({query:t,variables:n,context:r,errorPolicy:o,updateQuery:i}){Rt("cache-only"!==this.options.fetchPolicy,82,Cs(this.query,"(anonymous)"));const s={...su(this.options,{errorPolicy:"none"},{query:t,context:r,errorPolicy:o}),variables:t?n:{...this.variables,...n},fetchPolicy:"no-cache",notifyOnNetworkStatusChange:this.options.notifyOnNetworkStatusChange};s.query=this.transformDocument(s.query),this.lastQuery=t?this.transformDocument(this.options.query):s.query;let a=!1;const l="no-cache"!==this.options.fetchPolicy;l||Rt(i,83);const{finalize:c,pushNotification:u}=this.pushOperation(bn.fetchMore);u({source:"newNetworkStatus",kind:"N",value:{}},{shouldEmit:3});const{promise:d,operator:f}=lN(),{observable:C}=this.queryManager.fetchObservableWithInfo(s,{networkStatus:bn.fetchMore,exposeExtensions:!0}),P=C.pipe(f,_8(G=>"N"===G.kind&&"network"===G.source)).subscribe({next:G=>{a=!1;const W=G.value,ie=W[DM];if(rN(G.value.networkStatus)&&c(),l){const he=this.getCacheDiff();this.cache.batch({update:qe=>{i?qe.updateQuery({query:this.query,variables:this.variables,returnPartialData:!0,optimistic:!1,extensions:ie},st=>i(st,{fetchMoreResult:W.data,variables:s.variables})):qe.writeQuery({query:s.query,variables:s.variables,data:W.data,extensions:ie})},onWatchUpdated:(qe,st)=>{if(qe.watcher===this&&!$r(st.result,he.result)){a=!0;const St=this.getCurrentResult();V0(W.networkStatus)&&u({kind:"N",source:"network",value:{...St,networkStatus:W.networkStatus===bn.error?bn.ready:W.networkStatus,loading:!1,data:st.result,dataState:"streaming"===W.dataState?"streaming":"complete"}})}}})}else{const he=this.getCurrentResult(),qe=i(he.data,{fetchMoreResult:W.data,variables:s.variables});u({kind:"N",value:{...he,networkStatus:bn.ready,loading:!1,data:qe,dataState:"streaming"===he.dataState?"streaming":"complete"},source:"network"})}}});return sN(d.then(G=>Ef(this.maskResult(G))).finally(()=>{if(P.unsubscribe(),c(),l&&!a){const G=this.getCurrentResult();"streaming"===G.dataState?u({kind:"N",source:"network",value:{...G,dataState:"complete",networkStatus:bn.ready}}):u({kind:"N",source:"newNetworkStatus",value:{}},{shouldEmit:1})}}))}subscribeToMore(t){const n=this.queryManager.startGraphQLSubscription({query:t.document,variables:t.variables,context:t.context}).subscribe({next:r=>{const{updateQuery:o,onError:i}=t,{error:s}=r;s?i?i(s):Rt.error(84,s):o&&this.updateQuery((a,l)=>o(a,{subscriptionData:r,...l}))}});return this.subscriptions.add(n),()=>{this.subscriptions.delete(n)&&n.unsubscribe()}}applyOptions(t){const n=su(this.options,t||{});aN(this.options,n),this.updatePolling()}setVariables(t){var n=this;return(0,K.A)(function*(){return t=n.getVariablesWithDefaults(t),$r(n.variables,t)||(n.options.variables=t,!n.hasObservers())?Ef(n.getCurrentResult()):n._reobserve({fetchPolicy:n.options.initialFetchPolicy,variables:t},{newNetworkStatus:bn.setVariables})})()}updateQuery(t){const{queryManager:n}=this,{result:r,complete:o}=this.getCacheDiff({optimistic:!1}),i=t(r,{variables:this.variables,complete:!!o,previousData:r});i&&(this.cache.writeQuery({query:this.options.query,data:i,variables:this.variables}),n.broadcastQueries())}startPolling(t){this.options.pollInterval=t,this.updatePolling()}stopPolling(){this.options.pollInterval=0,this.updatePolling()}applyNextFetchPolicy(t,n){if(n.nextFetchPolicy){const{fetchPolicy:r="cache-first",initialFetchPolicy:o=r}=n;"standby"===r||(n.fetchPolicy="function"==typeof n.nextFetchPolicy?n.nextFetchPolicy.call(n,r,{reason:t,options:n,observable:this,initialFetchPolicy:o}):"variables-changed"===t?o:n.nextFetchPolicy)}return n.fetchPolicy}fetch(t,n,r,o){const i=this.options.fetchPolicy;t.context??={};let s=!1,{observable:c,fromLink:u}=this.queryManager.fetchObservableWithInfo(t,{networkStatus:n,query:r,onCacheHit:()=>{s=!0},fetchQueryOperator:W=>new Ot(ie=>{try{return W.subscribe({next(he){s=!0,ie.next(he)},error:he=>ie.error(he),complete:()=>ie.complete()})}finally{s||(C.override=n,this.input.next({kind:"N",source:"newNetworkStatus",value:{resetError:!0},query:d,variables:f,meta:{shouldEmit:3,fetchPolicy:i}}))}}),observableQuery:this});const{query:d,variables:f}=this,C={abort:()=>{G.unsubscribe()},query:d,variables:f};this.activeOperations.add(C);let P=n==bn.refetch||n==bn.setVariables;c=c.pipe(o,_f());const G=c.pipe(Xc({next:W=>{"newNetworkStatus"===W.source||"N"===W.kind&&W.value.loading?C.override=n:delete C.override},finalize:()=>this.activeOperations.delete(C)})).subscribe({next:W=>{const ie={};P&&"N"===W.kind&&"loading"in W.value&&!W.value.loading&&(P=!1,ie.shouldEmit=1),this.input.next({...W,query:d,variables:f,meta:ie})}});return{fromLink:u,subscription:G,observable:c}}didWarnCacheOnlyPolling=!1;updatePolling(){if(this.queryManager.ssrMode)return;const{pollingInfo:t,options:{fetchPolicy:n,pollInterval:r}}=this;if(!r||!this.hasObservers()||"cache-only"===n)return void this.cancelPolling();if(t?.interval===r)return;(t||(this.pollingInfo={})).interval=r;const i=()=>{this.pollingInfo&&(V0(this.networkStatus)||this.options.skipPollAttempt?.()?s():this._reobserve({fetchPolicy:"no-cache"===this.options.initialFetchPolicy?"no-cache":"network-only"},{newNetworkStatus:bn.poll}).then(s,s))},s=()=>{const a=this.pollingInfo;a&&(clearTimeout(a.timeout),a.timeout=setTimeout(i,a.interval))};s()}cancelPolling(){this.pollingInfo&&(clearTimeout(this.pollingInfo.timeout),delete this.pollingInfo)}reobserve(t){return this._reobserve(t)}_reobserve(t,n){this.isTornDown=!1;let{newNetworkStatus:r}=n||{};this.queryManager.obsQueries.add(this);const o=r===bn.refetch||r===bn.poll,i=this.variables,s=this.options.fetchPolicy,a=su(this.options,t||{});this.variablesUnknown&&="standby"===a.fetchPolicy;const l=o?a:aN(this.options,a),c=this.transformDocument(l.query);this.lastQuery=c,t&&"variables"in t&&(l.variables=this.getVariablesWithDefaults(t.variables)),o||(this.updatePolling(),t&&t.variables&&!$r(t.variables,i)&&"standby"!==l.fetchPolicy&&(l.fetchPolicy===s||"function"==typeof l.nextFetchPolicy)&&(this.applyNextFetchPolicy("variables-changed",l),void 0===r&&(r=bn.setVariables))),r||(r=bn.loading,this.networkStatus!==bn.loading&&t?.variables&&!$r(t.variables,i)&&(r=bn.setVariables),"standby"===l.fetchPolicy&&(r=bn.ready)),"standby"===l.fetchPolicy&&this.cancelPolling(),this.resubscribeCache();const{promise:d,operator:f}=lN("standby"===l.fetchPolicy?{data:void 0}:void 0),{subscription:C,observable:P,fromLink:G}=this.fetch(l,r,c,f);!o&&(G||!this.linkSubscription)&&(this.linkSubscription&&this.linkSubscription.unsubscribe(),this.linkSubscription=C);const W=Object.assign(sN(d.then(ie=>Ef(this.maskResult(ie))).finally(()=>{!this.hasObservers()&&0===this.activeOperations.size&&this.tearDownQuery()})),{retain:()=>{const ie=P.subscribe({}),he=()=>ie.unsubscribe();return d.then(he,he),W}});return W}hasObservers(){return this.subject.observed}stop(){this.subject.complete(),this.initializeObservablesQueue(),this.tearDownQuery()}tearDownQuery(){this.isTornDown||(this.resetNotifications(),this.unsubscribeFromCache?.(),this.linkSubscription&&(this.linkSubscription.unsubscribe(),delete this.linkSubscription),this.stopPolling(),this.subscriptions.forEach(t=>t.unsubscribe()),this.subscriptions.clear(),this.queryManager.obsQueries.delete(this),this.isTornDown=!0,this.abortActiveOperations(),this._lastWrite=void 0)}transformDocument(t){return this.queryManager.transform(t)}maskResult(t){const n=this.queryManager.maskOperation({document:this.query,data:t.data,fetchPolicy:this.options.fetchPolicy,cause:this});return n===t.data?t:{...t,data:n}}dirty=!1;notifyTimeout;resetNotifications(){this.notifyTimeout&&(clearTimeout(this.notifyTimeout),this.notifyTimeout=void 0),this.dirty=!1}scheduleNotify(){this.dirty||(this.dirty=!0,this.notifyTimeout||(this.notifyTimeout=setTimeout(()=>this.notify(!0),0)))}notify(t=!1){if(!t){const r=this.queryManager.getDocumentInfo(this.query);if(r.hasClientExports||r.hasForcedResolvers)return}const{dirty:n}=this;if(this.resetNotifications(),n&&("cache-only"===this.options.fetchPolicy||"cache-and-network"===this.options.fetchPolicy||!this.activeOperations.size)){const r=this.getCacheDiff();$r(r.result,this.getCacheDiff({optimistic:!1}).result)?this.reobserveCacheFirst():this.input.next({kind:"N",value:{data:r.result,dataState:r.complete?"complete":r.result?"partial":"empty",networkStatus:bn.ready,loading:!1,error:void 0,partial:!r.complete},source:"cache",query:this.query,variables:this.variables,meta:{}})}}activeOperations=new Set;pushOperation(t){let n=!1;const{query:r,variables:o}=this,i=()=>{this.activeOperations.delete(s)},s={override:t,abort:()=>{n=!0,i()},query:r,variables:o};return this.activeOperations.add(s),{finalize:i,pushNotification:(a,l)=>{n||this.input.next({...a,query:r,variables:o,meta:{...l}})}}}calculateNetworkStatus(t){return t===bn.streaming?t:Array.from(this.activeOperations.values()).reverse().find(r=>If(r,this)&&void 0!==r.override)?.override??t}abortActiveOperations(){this.activeOperations.forEach(t=>t.abort())}reset(){const t="cache-only"===this.options.fetchPolicy;this.setResult(t?W3:Hd,{shouldEmit:t?1:2}),this.abortActiveOperations()}setResult(t,n){this.input.next({source:"setResult",kind:"N",value:t,query:this.query,variables:this.variables,meta:{...n}})}operator=q3(t=>{const{query:n,variables:r,meta:o}=t;if("setResult"===t.source)return{query:n,variables:r,result:t.value,meta:o};if("C"===t.kind||!If(t,this))return;let i;const s=this.subject.getValue();if("cache"===t.source){if(i=t.value,i.networkStatus===bn.ready&&i.partial&&(!this.options.returnPartialData||s.result.networkStatus===bn.error)&&"cache-only"!==this.options.fetchPolicy)return}else if("network"===t.source)this.waitForNetworkResult&&(this.waitForNetworkResult=!1,this.resubscribeCache()),i="E"===t.kind?{...If(s,t)?s.result:{data:void 0,dataState:"empty",partial:!0},error:t.error,networkStatus:bn.error,loading:!1}:t.value,"E"===t.kind&&"streaming"===i.dataState&&(i.dataState="complete"),i.error&&(o.shouldEmit=1);else if("newNetworkStatus"===t.source){const a=If(s,t)?s.result:this.getInitialResult(o.fetchPolicy),{resetError:l}=t.value,c=l?void 0:a.error,u=c?bn.error:bn.ready;i={...a,error:c,networkStatus:u}}return Rt(i),i.error||delete i.error,i.networkStatus=this.calculateNetworkStatus(i.networkStatus),i.loading=V0(i.networkStatus),i=this.maskResult(i),{query:n,variables:r,result:i,meta:o}});reobserveCacheFirst(){const{fetchPolicy:t,nextFetchPolicy:n}=this.options;"cache-and-network"===t||"network-only"===t?this.reobserve({fetchPolicy:"cache-first",nextFetchPolicy(r,o){return this.nextFetchPolicy=n,"function"==typeof this.nextFetchPolicy?this.nextFetchPolicy(r,o):t}}):this.reobserve()}getVariablesWithDefaults(t){return this.queryManager.getVariables(this.query,t)}}function If(e,t){return!!(e&&t&&e.query===t.query&&$r(e.variables,t.variables))}function lN(e){let n,r,t=e;return{promise:new Promise((s,a)=>{n=s,r=a}),operator:Xc({next(s){if("E"===s.kind)return r(s.error);"N"===s.kind&&"newNetworkStatus"!==s.source&&!s.value.loading&&(t=s.value)},finalize:()=>{if(t)n(t);else{const s="The operation was aborted.",a="AbortError";r(typeof DOMException<"u"?new DOMException(s,a):Object.assign(new Error(s),{name:a}))}}})}}const cN={},Ud=new WeakMap;function Y3(e,t){const n=e[t];"function"==typeof n&&(e[t]=function(){return Ud.set(e,(Ud.get(e)+1)%1e15),n.apply(this,arguments)})}const uN=new WeakMap;class K3{lastRequestId=1;cache;queryManager;id;observableQuery;incremental;constructor(t,n){const r=this.cache=t.cache,o=(uN.get(t)||0)+1;uN.set(t,o),this.id=o+"",this.observableQuery=n,this.queryManager=t,Ud.has(r)||(Ud.set(r,0),Y3(r,"evict"),Y3(r,"modify"),Y3(r,"reset"))}_lastWrite;get lastWrite(){return(this.observableQuery||this)._lastWrite}set lastWrite(t){(this.observableQuery||this)._lastWrite=t}resetLastWrite(){this.lastWrite=void 0}shouldWrite(t,n){const{lastWrite:r}=this;return!(r&&r.dmCount===Ud.get(this.cache)&&$r(n,r.variables)&&$r(t.data,r.result.data)&&t.extensions?.[ql]===r.result.extensions?.[ql])}get hasNext(){return!!this.incremental&&this.incremental.hasNext}maybeHandleIncrementalResult(t,n,r){const{incrementalHandler:o}=this.queryManager;return o.isIncrementalResult(n)?(this.incremental||=o.startRequest({query:r}),this.incremental.handle(t,n)):n}markQueryResult(t,{document:n,variables:r,errorPolicy:o,cacheWriteBehavior:i}){const s={query:n,variables:r,returnPartialData:!0,optimistic:!0};this.observableQuery?.resetNotifications();const a=0===i,l=a?void 0:this.cache.diff(s);let c=this.maybeHandleIncrementalResult(l?.result,t,n);return a||(X3(c,o)?this.cache.batch({onWatchUpdated:(u,d)=>{u.watcher===this.observableQuery&&(u.lastOwnDiff=d)},update:u=>{if(this.shouldWrite(c,r))u.writeQuery({query:n,data:c.data,variables:r,overwrite:1===i,extensions:c.extensions}),this.lastWrite={result:c,variables:r,dmCount:Ud.get(this.cache)};else if(l&&l.complete)return void(c={...c,data:l.result});const d=u.diff(s);d.complete&&(c={...c,data:d.result})}}):this.lastWrite=void 0),c}markMutationResult(t,n,r=this.cache){const o=[],i=0===n.cacheWriteBehavior;let s=this.maybeHandleIncrementalResult(i?void 0:r.diff({id:"ROOT_MUTATION",query:this.queryManager.getDocumentInfo(n.document).asQuery,variables:n.variables,optimistic:!1,returnPartialData:!0}).result,t,n.document);if("ignore"===n.errorPolicy&&(s={...s,errors:[]}),Fd(s)&&"none"===n.errorPolicy)return Promise.resolve(s);const a=()=>({...s,dataState:this.hasNext?"streaming":"complete"});if(!i&&X3(s,n.errorPolicy)){o.push({result:s.data,dataId:"ROOT_MUTATION",query:n.document,variables:n.variables,extensions:s.extensions});const{updateQueries:c}=n;c&&this.queryManager.getObservableQueries("all").forEach(u=>{const d=u&&u.queryName;if(!d||!Object.hasOwnProperty.call(c,d))return;const f=c[d],{query:C,variables:P}=u,{result:G,complete:W}=u.getCacheDiff({optimistic:!1});if(W&&G){const ie=f(G,{mutationResult:a(),queryName:C&&Cs(C)||void 0,queryVariables:P});ie&&o.push({result:ie,dataId:"ROOT_QUERY",query:C,variables:P})}})}let l=n.refetchQueries;if("function"==typeof l&&(l=l(a())),o.length>0||(l||"").length>0||n.update||n.onQueryUpdated||n.removeOptimistic){const c=[];if(this.queryManager.refetchQueries({updateCache:u=>{i||o.forEach(f=>u.write(f));const{update:d}=n;if(d){if(!i){const f=u.diff({id:"ROOT_MUTATION",query:this.queryManager.getDocumentInfo(n.document).asQuery,variables:n.variables,optimistic:!1,returnPartialData:!0});f.complete&&(s={...s,data:f.result})}this.hasNext||d(u,s,{context:n.context,variables:n.variables})}!i&&!n.keepRootFields&&!this.hasNext&&u.modify({id:"ROOT_MUTATION",fields:(f,{fieldName:C,DELETE:P})=>"__typename"===C?f:P})},include:l,optimistic:!1,removeOptimistic:n.removeOptimistic,onQueryUpdated:n.onQueryUpdated||null}).forEach(u=>c.push(u)),n.awaitRefetchQueries||n.onQueryUpdated)return Promise.all(c).then(()=>s)}return Promise.resolve(s)}markMutationOptimistic(t,n){const r="function"==typeof t?t(n.variables,{IGNORE:cN}):t;return r!==cN&&(this.cache.recordOptimisticTransaction(o=>{try{this.markMutationResult({data:r},n,o)}catch(i){Rt.error(i)}},this.id),!0)}markSubscriptionResult(t,{document:n,variables:r,errorPolicy:o,cacheWriteBehavior:i}){0!==i&&(X3(t,o)&&this.cache.write({query:n,result:t.data,dataId:"ROOT_SUBSCRIPTION",variables:r,extensions:t.extensions}),this.queryManager.broadcastQueries())}}function X3(e,t="none"){const n="ignore"===t||"all"===t;let r=!Fd(e);return!r&&n&&e.data&&(r=!0),r}class sle{defaultOptions;client;clientOptions;assumeImmutableResults;documentTransform;ssrMode;defaultContext;dataMasking;incrementalHandler;localState;queryDeduplication;prioritizeCacheValues=!1;onBroadcast;mutationStore;obsQueries=new Set;fetchCancelFns=new Map;constructor(t){const n=new Ua(o=>this.cache.transformDocument(o),{cache:!1});this.client=t.client,this.defaultOptions=t.defaultOptions,this.queryDeduplication=t.queryDeduplication,this.clientOptions=t.clientOptions,this.ssrMode=t.ssrMode,this.assumeImmutableResults=t.assumeImmutableResults,this.dataMasking=t.dataMasking,this.localState=t.localState,this.incrementalHandler=t.incrementalHandler;const r=t.documentTransform;this.documentTransform=r?n.concat(r).concat(n):n,this.defaultContext=t.defaultContext||{},(this.onBroadcast=t.onBroadcast)&&(this.mutationStore={})}get link(){return this.client.link}get cache(){return this.client.cache}stop(){this.obsQueries.forEach(t=>t.stop()),this.cancelPendingFetches(rs(87))}cancelPendingFetches(t){this.fetchCancelFns.forEach(n=>n(t)),this.fetchCancelFns.clear()}mutate(t){var n=this;return(0,K.A)(function*({mutation:r,variables:o,optimisticResponse:i,updateQueries:s,refetchQueries:a=[],awaitRefetchQueries:l=!1,update:c,onQueryUpdated:u,fetchPolicy:d,errorPolicy:f,keepRootFields:C,context:P}){const G=new K3(n);r=n.cache.transformForLink(n.transform(r));const{hasClientExports:W}=n.getDocumentInfo(r);o=n.getVariables(r,o),W&&(o=yield n.localState.getExportedVariables({client:n.client,document:r,variables:o,context:P}));const ie=n.mutationStore&&(n.mutationStore[G.id]={mutation:r,variables:o,loading:!0,error:null}),he=i&&G.markMutationOptimistic(i,{document:r,variables:o,cacheWriteBehavior:"no-cache"===d?0:2,errorPolicy:f,context:P,updateQueries:s,update:c,keepRootFields:C});return n.broadcastQueries(),new Promise((qe,st)=>{const St={};return n.getObservableFromLink(r,{...P,optimisticResponse:he?i:void 0},o,d,{},!1).observable.pipe(dN(),Ll(jt=>{const wn={...jt};return Ys(G.markMutationResult(wn,{document:r,variables:o,cacheWriteBehavior:"no-cache"===d?0:2,errorPolicy:f,context:P,update:c,updateQueries:s,awaitRefetchQueries:l,refetchQueries:a,removeOptimistic:he?G.id:void 0,onQueryUpdated:u,keepRootFields:C}))})).pipe(ur(jt=>{if(Fd(jt)&&"none"===f)throw new bf(Q3(jt));return ie&&(ie.loading=!1,ie.error=null),jt})).subscribe({next:jt=>{if(n.broadcastQueries(),!G.hasNext){const wn={data:n.maskOperation({document:r,data:jt.data,fetchPolicy:d,cause:St})};Fd(jt)&&(wn.error=new bf(jt)),Object.keys(jt.extensions||{}).length&&(wn.extensions=jt.extensions),qe(wn)}},error:jt=>(ie&&(ie.loading=!1,ie.error=jt),he&&n.cache.removeOptimistic(G.id),n.broadcastQueries(),"ignore"===f?qe({data:void 0}):"all"===f?qe({data:void 0,error:jt}):void st(jt))})})}).apply(this,arguments)}fetchQuery(t,n){var r=this;return zl(t.query,na.QUERY),(0,K.A)(function*(){return $h(r.fetchObservableWithInfo(t,{networkStatus:n}).observable.pipe(q3(o=>{switch(o.kind){case"E":throw o.error;case"N":if("newNetworkStatus"!==o.source)return Ef(o.value)}})),{defaultValue:{data:void 0}})})()}transform(t){return this.documentTransform.transformDocument(t)}transformCache=new i3(Fa["queryManager.getDocumentInfo"]||2e3);getDocumentInfo(t){const{transformCache:n}=this;if(!n.has(t)){const o=Ha(t),i={hasClientExports:Bd(["client","export"],t,!0),hasForcedResolvers:Jae(t),hasNonreactiveDirective:Bd(["nonreactive"],t),hasIncrementalDirective:Bd(["defer"],t),nonReactiveQuery:lle(t),clientQuery:Bd(["client"],t)?t:null,serverQuery:ele([{name:"client",remove:!0},{name:"connection"},{name:"nonreactive"},{name:"unmask"}],t),operationType:o?.operation,defaultVars:R3(o),asQuery:{...t,definitions:t.definitions.map(s=>"OperationDefinition"===s.kind&&"query"!==s.operation?{...s,operation:"query"}:s)}};n.set(t,i)}const r=n.get(t);if(r.violation)throw r.violation;return r}getVariables(t,n){const r=this.getDocumentInfo(t).defaultVars,o=Object.entries(n??{}).map(([i,s])=>[i,void 0===s?r[i]:s]);return{...r,...Object.fromEntries(o)}}watchQuery(t){zl(t.query,na.QUERY);const n=this.transform(t.query);return typeof(t={...t,variables:this.getVariables(n,t.variables)}).notifyOnNetworkStatusChange>"u"&&(t.notifyOnNetworkStatusChange=!0),new Z3({queryManager:this,options:t,transformedQuery:n})}query(t){const n=this.transform(t.query);return this.fetchQuery({...t,query:n}).then(r=>({...r,data:this.maskOperation({document:n,data:r?.data,fetchPolicy:t.fetchPolicy})}))}requestIdCounter=1;generateRequestId(){return this.requestIdCounter++}clearStore(t={discardWatches:!0}){return this.cancelPendingFetches(rs(89)),this.obsQueries.forEach(n=>{n.reset()}),this.mutationStore&&(this.mutationStore={}),this.cache.reset(t)}getObservableQueries(t="active"){const n=new Set,r=new Map,o=new Map,i=new Set;return Array.isArray(t)&&t.forEach(s=>{if("string"==typeof s)r.set(s,s),o.set(s,!1);else if(function rle(e){return fi(e)&&"Document"===e.kind&&Array.isArray(e.definitions)}(s)){const a=df(this.transform(s));r.set(a,Cs(s)),o.set(a,!1)}else fi(s)&&s.query&&i.add(s)}),this.obsQueries.forEach(s=>{const a=df(this.transform(s.options.query));if("all"===t)return void n.add(s);const{queryName:l,options:{fetchPolicy:c}}=s;"active"===t&&"standby"===c||("active"===t||l&&o.has(l)||a&&o.has(a))&&(n.add(s),l&&o.set(l,!0),a&&o.set(a,!0))}),i.size&&i.forEach(s=>{const a=new Z3({queryManager:this,options:{...s,fetchPolicy:"network-only"}});n.add(a)}),n}refetchObservableQueries(t=!1){const n=[];return this.getObservableQueries(t?"all":"active").forEach(r=>{const{fetchPolicy:o}=r.options;(t||"standby"!==o)&&"cache-only"!==o&&n.push(r.refetch())}),this.broadcastQueries(),Promise.all(n)}startGraphQLSubscription(t){let{query:n,variables:r}=t;const{fetchPolicy:o="cache-first",errorPolicy:i="none",context:s={},extensions:a={}}=t;let l;zl(n,na.SUBSCRIPTION),n=this.transform(n),r=this.getVariables(n,r);const c=(this.getDocumentInfo(n).hasClientExports?Ys(this.localState.getExportedVariables({client:this.client,document:n,variables:r,context:s})):Ks(r)).pipe(Ll(u=>{const{observable:d,restart:f}=this.getObservableFromLink(n,s,u,o,a),C=new K3(this);return l=f,d.pipe(ur(P=>{C.markSubscriptionResult(P,{document:n,variables:u,errorPolicy:i,cacheWriteBehavior:"no-cache"===o?0:2});const G={data:P.data??void 0};return Fd(P)?G.error=new bf(P):function qae(e){return"extensions"in e&&Gae.is(e.extensions[$3])}(P)&&(G.error=P.extensions[$3],delete P.extensions[$3]),P.extensions&&Object.keys(P.extensions).length&&(G.extensions=P.extensions),G.error&&"none"===i&&(G.data=void 0),"ignore"===i&&delete G.error,G}),za(P=>Ks("ignore"===i?{data:void 0}:{data:void 0,error:P})),_8(P=>!(!P.data&&!P.error)))}));return Object.assign(c,{restart:()=>l?.()})}broadcastQueries(){this.onBroadcast&&this.onBroadcast(),this.obsQueries.forEach(t=>t.notify())}inFlightLinkObservables=new oa(!1);getObservableFromLink(t,n,r,o,i,s=n?.queryDeduplication??this.queryDeduplication){let a={};const{serverQuery:l,clientQuery:c,operationType:u,hasIncrementalDirective:d}=this.getDocumentInfo(t),f=Cs(t),C={client:this.client};if(l){const{inFlightLinkObservables:P,link:G}=this;try{let ie=function(he){return new Ot(qe=>{function st(){return he.subscribe({next:qe.next.bind(qe),complete:qe.complete.bind(qe),error:qe.error.bind(qe)})}let St=st();return a.restart||=()=>{St.unsubscribe(),St=st()},()=>{St.unsubscribe(),a.restart=void 0}})};const W=this.incrementalHandler.prepareRequest({query:l,variables:r,context:{...this.defaultContext,...n,queryDeduplication:s},extensions:i});if(n=W.context,s){const he=df(l),qe=Va(r);a=P.lookup(he,qe),a.observable||(a.observable=U3(G,W,C).pipe(ie,d8(()=>{P.peek(he,qe)===a&&P.remove(he,qe)}),u===na.SUBSCRIPTION?_f():N0({refCount:!0})))}else a.observable=U3(G,W,C).pipe(ie)}catch(W){a.observable=Wl(()=>W)}}else a.observable=Ks({data:{}});if(c){const{operation:P}=Ha(t);Rt(!d,94,P[0].toUpperCase()+P.slice(1),f??"(anonymous)"),a.observable=a.observable.pipe(Ll(G=>Ys(this.localState.execute({client:this.client,document:c,remoteResult:G,context:n,variables:r,fetchPolicy:o}))))}return{restart:()=>a.restart?.(),observable:a.observable.pipe(za(P=>{throw P=function Wae(e){return function $ae(e){return null!==e&&"object"==typeof e&&"string"==typeof e.message&&"string"==typeof e.name&&("string"==typeof e.stack||typeof e.stack>"u")}(e)?e:"string"==typeof e?new Error(e,{cause:e}):new G3(e)}(P),function Zae(e){tN.add(e)}(P),P}))}}getResultsFromLink(t,{queryInfo:n,cacheWriteBehavior:r,observableQuery:o,exposeExtensions:i}){const s=n.lastRequestId=this.generateRequestId(),{errorPolicy:a}=t,l=this.cache.transformForLink(t.query);return this.getObservableFromLink(l,t.context,t.variables,t.fetchPolicy).observable.pipe(ur(c=>{const u=n.markQueryResult(c,{...t,document:l,cacheWriteBehavior:r}),d=Fd(u);if(d&&"none"===a)throw n.resetLastWrite(),o?.resetNotifications(),new bf(Q3(u));const f={data:u.data,...n.hasNext?{loading:!0,networkStatus:bn.streaming,dataState:"streaming",partial:!0}:{dataState:u.data?"complete":"empty",loading:!1,networkStatus:bn.ready,partial:!u.data}};return i&&"extensions"in u&&(f[DM]=u.extensions),d&&("none"===a&&(f.data=void 0,f.dataState="empty"),"ignore"!==a&&(f.error=new bf(Q3(u)),"streaming"!==f.dataState&&(f.networkStatus=bn.error))),f}),za(c=>{if(s>=n.lastRequestId&&"none"===a)throw n.resetLastWrite(),o?.resetNotifications(),c;const u={data:void 0,dataState:"empty",loading:!1,networkStatus:bn.ready,partial:!0};return"ignore"!==a&&(u.error=c,u.networkStatus=bn.error),Ks(u)}))}fetchObservableWithInfo(t,{networkStatus:n=bn.loading,query:r=t.query,fetchQueryOperator:o=l=>l,onCacheHit:i=()=>{},observableQuery:s,exposeExtensions:a}){const l=this.getVariables(r,t.variables),c=this.defaultOptions.watchQuery;let{fetchPolicy:u=c&&c.fetchPolicy||"cache-first",errorPolicy:d=c&&c.errorPolicy||"none",returnPartialData:f=!1,notifyOnNetworkStatusChange:C=!0,context:P={}}=t;this.prioritizeCacheValues&&("network-only"===u||"cache-and-network"===u)&&(u="cache-first");const G=Object.assign({},t,{query:r,variables:l,fetchPolicy:u,errorPolicy:d,returnPartialData:f,notifyOnNetworkStatusChange:C,context:P}),W=new K3(this,s),ie=jt=>{G.variables=jt;const Jt=this.fetchQueryByPolicy(G,{queryInfo:W,cacheWriteBehavior:"no-cache"===u?0:n===bn.refetch&&"merge"!==G.refetchWritePolicy?1:2,onCacheHit:i,observableQuery:s,exposeExtensions:a});return Jt.observable=Jt.observable.pipe(o),"standby"!==G.fetchPolicy&&s?.applyNextFetchPolicy("after-fetch",t),Jt},he=()=>{this.fetchCancelFns.delete(W.id)};this.fetchCancelFns.set(W.id,jt=>{qe.next({kind:"E",error:jt,source:"network"})});const qe=new Rn;let st,St;if(this.getDocumentInfo(G.query).hasClientExports)st=Ys(this.localState.getExportedVariables({client:this.client,document:G.query,variables:G.variables,context:G.context})).pipe(Ll(jt=>ie(jt).observable)),St=!0;else{const jt=ie(G.variables);St=jt.fromLink,st=jt.observable}return{observable:new Ot(jt=>{jt.add(he),st.subscribe(jt),qe.subscribe(jt)}).pipe(_f()),fromLink:St}}refetchQueries({updateCache:t,include:n,optimistic:r=!1,removeOptimistic:o=(r?Lx("refetchQueries"):void 0),onQueryUpdated:i}){const s=new Map;n&&this.getObservableQueries(n).forEach(l=>{if("cache-only"===l.options.fetchPolicy||l.variablesUnknown)return;const c=l.getCurrentResult();s.set(l,{oq:l,lastDiff:{result:c?.data,complete:!c?.partial}})});const a=new Map;if(t){const l=new Set;this.cache.batch({update:t,optimistic:r&&o||!1,removeOptimistic:o,onWatchUpdated(c,u,d){const f=c.watcher;if(f instanceof Z3&&!l.has(f)){if(l.add(f),i){s.delete(f);let C=i(f,u,d);return!0===C&&(C=f.refetch().retain()),!1!==C&&a.set(f,C),C}null!==i&&"cache-only"!==f.options.fetchPolicy&&s.set(f,{oq:f,lastDiff:d,diff:u})}}})}return s.size&&s.forEach(({oq:l,lastDiff:c,diff:u})=>{let d;i&&(u||(u=l.getCacheDiff()),d=i(l,u,c)),(!i||!0===d)&&(d=l.refetch().retain()),!1!==d&&a.set(l,d)}),o&&this.cache.removeOptimistic(o),a}noCacheWarningsByCause=new WeakSet;maskOperation(t){const{document:n,data:r}=t;return this.dataMasking?function Xae(e,t,n){const r=Ha(t);return Rt(r,43),null==e?e:nN(e,r.selectionSet,{operationType:r.operation,operationName:r.name?.value,fragmentMap:ff(pf(t)),cache:n,mutableTargets:new WeakMap,knownChanged:new WeakSet})}(r,n,this.cache):r}maskFragment(t){const{data:n,fragment:r,fragmentName:o}=t;return this.dataMasking?function Qae(e,t,n,r){const o=t.definitions.filter(s=>s.kind===wt.FRAGMENT_DEFINITION);typeof r>"u"&&(Rt(1===o.length,41,o.length),r=o[0].name.value);const i=o.find(s=>s.name.value===r);return Rt(!!i,42,r),null==e||$r(e,{})?e:nN(e,i.selectionSet,{operationType:"fragment",operationName:i.name.value,fragmentMap:ff(pf(t)),cache:n,mutableTargets:new WeakMap,knownChanged:new WeakSet})}(n,r,this.cache,o):n}fetchQueryByPolicy({query:t,variables:n,fetchPolicy:r,errorPolicy:o,returnPartialData:i,context:s},{cacheWriteBehavior:a,onCacheHit:l,queryInfo:c,observableQuery:u,exposeExtensions:d}){const f=()=>this.cache.diff({query:t,variables:n,returnPartialData:!0,optimistic:!0}),C=(G,W)=>{const ie=G.result,he=st=>(!G.complete&&!i&&(st=void 0),{data:st,dataState:G.complete?"complete":st?"partial":"empty",loading:V0(W),networkStatus:W,partial:!G.complete});return(G.complete||i)&&this.getDocumentInfo(t).hasForcedResolvers?(l(),Ys(this.localState.execute({client:this.client,document:t,remoteResult:ie?{data:ie}:void 0,context:s,variables:n,onlyRunForcedResolvers:!0,returnPartialData:!0,fetchPolicy:r}).then(st=>({kind:"N",value:he(st.data||void 0),source:"cache"})))):Ks({kind:"N",value:he("none"===o&&W===bn.refetch&&G.missing?void 0:ie||void 0),source:"cache"})},P=()=>this.getResultsFromLink({query:t,variables:n,context:s,fetchPolicy:r,errorPolicy:o},{cacheWriteBehavior:a,queryInfo:c,observableQuery:u,exposeExtensions:d}).pipe(dN(),function zae(){return Ri((e,t)=>{e.subscribe(Zi(t,n=>{t.next(ja.createNext(n))},()=>{t.next(ja.createComplete()),t.complete()},n=>{t.next(ja.createError(n)),t.complete()}))})}(),ur(G=>({...G,source:"network"})));switch(r){default:case"cache-first":{const G=f();return G.complete?{fromLink:!1,observable:C(G,bn.ready)}:i?{fromLink:!0,observable:yf(C(G,bn.loading),P())}:{fromLink:!0,observable:P()}}case"cache-and-network":{const G=f();return G.complete||i?{fromLink:!0,observable:yf(C(G,bn.loading),P())}:{fromLink:!0,observable:P()}}case"cache-only":return{fromLink:!1,observable:yf(C(f(),bn.ready))};case"network-only":case"no-cache":return{fromLink:!0,observable:P()};case"standby":return{fromLink:!1,observable:Ul}}}}function dN(){let e=!1;return Xc({next(){e=!0},complete(){Rt(e,98)}})}function lle(e){return ra(e,{FragmentSpread:t=>{if(!t.directives?.some(n=>"unmask"===n.name.value))return{...t,directives:[...t.directives||[],{kind:wt.DIRECTIVE,name:{kind:wt.NAME,value:"nonreactive"}}]}}})}function Q3(e){if(null==e.extensions?.[ql])return e;const{extensions:{[ql]:t,...n},...r}=e;return Object.keys(n).length>0&&(r.extensions=n),r}class J3{link;cache;disableNetworkFetches;set prioritizeCacheValues(t){this.queryManager.prioritizeCacheValues=t}get prioritizeCacheValues(){return this.queryManager.prioritizeCacheValues}version;queryDeduplication;defaultOptions;devtoolsConfig;queryManager;devToolsHookCb;resetStoreCallbacks=[];clearStoreCallbacks=[];constructor(t){const{cache:n,documentTransform:r,ssrMode:o=!1,ssrForceFetchDelay:i=0,queryDeduplication:s=!0,defaultOptions:a,defaultContext:l,assumeImmutableResults:c=n.assumeImmutableResults,localState:u,devtools:d,dataMasking:f,link:C,incrementalHandler:P=new Fae,experiments:G=[]}=t;this.link=C,this.cache=n,this.queryDeduplication=s,this.defaultOptions=a||{},this.devtoolsConfig={...d,enabled:d?.enabled??false},this.watchQuery=this.watchQuery.bind(this),this.query=this.query.bind(this),this.mutate=this.mutate.bind(this),this.watchFragment=this.watchFragment.bind(this),this.resetStore=this.resetStore.bind(this),this.reFetchObservableQueries=this.refetchObservableQueries=this.refetchObservableQueries.bind(this),this.version=Q8,this.queryManager=new sle({client:this,defaultOptions:this.defaultOptions,defaultContext:l,documentTransform:r,queryDeduplication:s,ssrMode:o,dataMasking:!!f,clientOptions:t,incrementalHandler:P,assumeImmutableResults:c,onBroadcast:this.devtoolsConfig.enabled?()=>{this.devToolsHookCb&&this.devToolsHookCb()}:void 0,localState:u}),this.prioritizeCacheValues=o||i>0,i&&setTimeout(()=>{this.prioritizeCacheValues=!1},i),this.devtoolsConfig.enabled&&this.connectToDevTools(),G.forEach(W=>W.call(this,t))}connectToDevTools(){if(typeof window>"u")return;const t=window,n=Symbol.for("apollo.devtools");(t[n]=t[n]||[]).push(this),t.__APOLLO_CLIENT__=this}get documentTransform(){return this.queryManager.documentTransform}get localState(){return this.queryManager.localState}set localState(t){this.queryManager.localState=t}stop(){this.queryManager.stop()}watchQuery(t){return this.defaultOptions.watchQuery&&(t=V3(this.defaultOptions.watchQuery,t)),this.queryManager.watchQuery(t)}query(t){return this.defaultOptions.query&&(t=V3(this.defaultOptions.query,t)),this.queryManager.query(t)}mutate(t){const n=V3(su({fetchPolicy:"network-only",errorPolicy:"none"},this.defaultOptions.mutate),t);return zl(n.mutation,na.MUTATION),this.queryManager.mutate(n)}subscribe(t){const n={},r=this.queryManager.startGraphQLSubscription(t),o=r.pipe(ur(i=>({...i,data:this.queryManager.maskOperation({document:t.query,data:i.data,fetchPolicy:t.fetchPolicy,cause:n})})));return Object.assign(o,{restart:r.restart})}readQuery(t,n=!1){return this.cache.readQuery({...t,query:this.transform(t.query)},n)}watchFragment(t){const n=this.queryManager.dataMasking;return this.cache.watchFragment({...t,fragment:this.transform(t.fragment,n)})}readFragment(t,n=!1){return this.cache.readFragment({...t,fragment:this.transform(t.fragment)},n)}writeQuery(t){const n=this.cache.writeQuery(t);return!1!==t.broadcast&&this.queryManager.broadcastQueries(),n}writeFragment(t){const n=this.cache.writeFragment(t);return!1!==t.broadcast&&this.queryManager.broadcastQueries(),n}__actionHookForDevTools(t){this.devToolsHookCb=t}__requestRaw(t){return U3(this.link,t,{client:this})}resetStore(){return Promise.resolve().then(()=>this.queryManager.clearStore({discardWatches:!1})).then(()=>Promise.all(this.resetStoreCallbacks.map(t=>t()))).then(()=>this.refetchObservableQueries())}clearStore(){return Promise.resolve().then(()=>this.queryManager.clearStore({discardWatches:!0})).then(()=>Promise.all(this.clearStoreCallbacks.map(t=>t())))}onResetStore(t){return this.resetStoreCallbacks.push(t),()=>{this.resetStoreCallbacks=this.resetStoreCallbacks.filter(n=>n!==t)}}onClearStore(t){return this.clearStoreCallbacks.push(t),()=>{this.clearStoreCallbacks=this.clearStoreCallbacks.filter(n=>n!==t)}}reFetchObservableQueries;refetchObservableQueries(t){return this.queryManager.refetchObservableQueries(t)}refetchQueries(t){const n=this.queryManager.refetchQueries(t),r=[],o=[];n.forEach((s,a)=>{r.push(a),o.push(s)});const i=Promise.all(o);return i.queries=r,i.results=o,i.catch(s=>{}),i}getObservableQueries(t="active"){return this.queryManager.getObservableQueries(t)}extract(t){return this.cache.extract(t)}restore(t){return this.cache.restore(t)}setLink(t){this.link=t}get defaultContext(){return this.queryManager.defaultContext}maskedFragmentTransform=new Ua(Hae);transform(t,n=!1){const r=this.queryManager.transform(t);return n?this.maskedFragmentTransform.transformDocument(r):r}}function ule(e,t){if(!e)throw new Error(t??"Unexpected invariant triggered.")}const dle=/\r\n|[\n\r]/g;function e4(e,t){let n=0,r=1;for(const o of e.body.matchAll(dle)){if("number"==typeof o.index||ule(!1),o.index>=t)break;n=o.index+o[0].length,r+=1}return{line:r,column:t+1-n}}function _le(e){return hN(e.source,e4(e.source,e.start))}function hN(e,t){const n=e.locationOffset.column-1,r="".padStart(n)+e.body,o=t.line-1,s=t.line+(e.locationOffset.line-1),l=t.column+(1===t.line?n:0),c=`${e.name}:${s}:${l}\n`,u=r.split(/\r\n|[\n\r]/g),d=u[o];if(d.length>120){const f=Math.floor(l/80),C=l%80,P=[];for(let G=0;G<d.length;G+=80)P.push(d.slice(G,G+80));return c+fN([[`${s} |`,P[0]],...P.slice(1,f+1).map(G=>["|",G]),["|","^".padStart(C)],["|",P[f+1]]])}return c+fN([[s-1+" |",u[o-1]],[`${s} |`,d],["|","^".padStart(l)],[`${s+1} |`,u[o+1]]])}function fN(e){const t=e.filter(([r,o])=>void 0!==o),n=Math.max(...t.map(([r])=>r.length));return t.map(([r,o])=>r.padStart(n)+(o?" "+o:"")).join("\n")}class t4 extends Error{constructor(t,...n){var r,o,i;const{nodes:s,source:a,positions:l,path:c,originalError:u,extensions:d}=function hle(e){const t=e[0];return null==t||"kind"in t||"length"in t?{nodes:t,source:e[1],positions:e[2],path:e[3],originalError:e[4],extensions:e[5]}:t}(n);super(t),this.name="GraphQLError",this.path=c??void 0,this.originalError=u??void 0,this.nodes=pN(Array.isArray(s)?s:s?[s]:void 0);const f=pN(null===(r=this.nodes)||void 0===r?void 0:r.map(P=>P.loc).filter(P=>null!=P));this.source=a??(null==f||null===(o=f[0])||void 0===o?void 0:o.source),this.positions=l??f?.map(P=>P.start),this.locations=l&&a?l.map(P=>e4(a,P)):f?.map(P=>e4(P.source,P.start));const C=function cle(e){return"object"==typeof e&&null!==e}(u?.extensions)?u?.extensions:void 0;this.extensions=null!==(i=d??C)&&void 0!==i?i: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}}),null!=u&&u.stack?Object.defineProperty(this,"stack",{value:u.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,t4):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+="\n\n"+_le(n.loc));else if(this.source&&this.locations)for(const n of this.locations)t+="\n\n"+hN(this.source,n);return t}toJSON(){const t={message:this.message};return null!=this.locations&&(t.locations=this.locations),null!=this.path&&(t.path=this.path),null!=this.extensions&&Object.keys(this.extensions).length>0&&(t.extensions=this.extensions),t}}function pN(e){return void 0===e||0===e.length?void 0:e}function ko(e,t,n){return new t4(`Syntax Error: ${n}`,{source:e,positions:[t]})}var gN=function(e){return 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}(gN||{}),rt=function(e){return 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",e}(rt||{});class fle{constructor(t){const n=new Sx(rt.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!==rt.EOF)do{if(t.next)t=t.next;else{const n=gle(this,t.end);t.next=n,n.prev=t,t=n}}while(t.kind===rt.COMMENT);return t}}function Vd(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function z0(e,t){return mN(e.charCodeAt(t))&&vN(e.charCodeAt(t+1))}function mN(e){return e>=55296&&e<=56319}function vN(e){return e>=56320&&e<=57343}function au(e,t){const n=e.source.body.codePointAt(t);if(void 0===n)return rt.EOF;if(n>=32&&n<=126){const r=String.fromCodePoint(n);return'"'===r?"'\"'":`"${r}"`}return"U+"+n.toString(16).toUpperCase().padStart(4,"0")}function So(e,t,n,r,o){return new Sx(t,n,r,e.line,1+n-e.lineStart,o)}function gle(e,t){const n=e.source.body,r=n.length;let o=t;for(;o<r;){const i=n.charCodeAt(o);switch(i){case 65279:case 9:case 32:case 44:++o;continue;case 10:++o,++e.line,e.lineStart=o;continue;case 13:10===n.charCodeAt(o+1)?o+=2:++o,++e.line,e.lineStart=o;continue;case 35:return mle(e,o);case 33:return So(e,rt.BANG,o,o+1);case 36:return So(e,rt.DOLLAR,o,o+1);case 38:return So(e,rt.AMP,o,o+1);case 40:return So(e,rt.PAREN_L,o,o+1);case 41:return So(e,rt.PAREN_R,o,o+1);case 46:if(46===n.charCodeAt(o+1)&&46===n.charCodeAt(o+2))return So(e,rt.SPREAD,o,o+3);break;case 58:return So(e,rt.COLON,o,o+1);case 61:return So(e,rt.EQUALS,o,o+1);case 64:return So(e,rt.AT,o,o+1);case 91:return So(e,rt.BRACKET_L,o,o+1);case 93:return So(e,rt.BRACKET_R,o,o+1);case 123:return So(e,rt.BRACE_L,o,o+1);case 124:return So(e,rt.PIPE,o,o+1);case 125:return So(e,rt.BRACE_R,o,o+1);case 34:return 34===n.charCodeAt(o+1)&&34===n.charCodeAt(o+2)?Ele(e,o):Cle(e,o)}if(cf(i)||45===i)return vle(e,o,i);if(dM(i))return Ile(e,o);throw ko(e.source,o,39===i?"Unexpected single quote character ('), did you mean to use a double quote (\")?":Vd(i)||z0(n,o)?`Unexpected character: ${au(e,o)}.`:`Invalid character: ${au(e,o)}.`)}return So(e,rt.EOF,r,r)}function mle(e,t){const n=e.source.body,r=n.length;let o=t+1;for(;o<r;){const i=n.charCodeAt(o);if(10===i||13===i)break;if(Vd(i))++o;else{if(!z0(n,o))break;o+=2}}return So(e,rt.COMMENT,t,o,n.slice(t+1,o))}function vle(e,t,n){const r=e.source.body;let o=t,i=n,s=!1;if(45===i&&(i=r.charCodeAt(++o)),48===i){if(i=r.charCodeAt(++o),cf(i))throw ko(e.source,o,`Invalid number, unexpected digit after 0: ${au(e,o)}.`)}else o=n4(e,o,i),i=r.charCodeAt(o);if(46===i&&(s=!0,i=r.charCodeAt(++o),o=n4(e,o,i),i=r.charCodeAt(o)),(69===i||101===i)&&(s=!0,i=r.charCodeAt(++o),(43===i||45===i)&&(i=r.charCodeAt(++o)),o=n4(e,o,i),i=r.charCodeAt(o)),46===i||dM(i))throw ko(e.source,o,`Invalid number, expected digit but got: ${au(e,o)}.`);return So(e,s?rt.FLOAT:rt.INT,t,o,r.slice(t,o))}function n4(e,t,n){if(!cf(n))throw ko(e.source,t,`Invalid number, expected digit but got: ${au(e,t)}.`);const r=e.source.body;let o=t+1;for(;cf(r.charCodeAt(o));)++o;return o}function Cle(e,t){const n=e.source.body,r=n.length;let o=t+1,i=o,s="";for(;o<r;){const a=n.charCodeAt(o);if(34===a)return s+=n.slice(i,o),So(e,rt.STRING,t,o+1,s);if(92===a){s+=n.slice(i,o);const l=117===n.charCodeAt(o+1)?123===n.charCodeAt(o+2)?yle(e,o):ble(e,o):Tle(e,o);s+=l.value,o+=l.size,i=o;continue}if(10===a||13===a)break;if(Vd(a))++o;else{if(!z0(n,o))throw ko(e.source,o,`Invalid character within String: ${au(e,o)}.`);o+=2}}throw ko(e.source,o,"Unterminated string.")}function yle(e,t){const n=e.source.body;let r=0,o=3;for(;o<12;){const i=n.charCodeAt(t+o++);if(125===i){if(o<5||!Vd(r))break;return{value:String.fromCodePoint(r),size:o}}if(r=r<<4|Sf(i),r<0)break}throw ko(e.source,t,`Invalid Unicode escape sequence: "${n.slice(t,t+o)}".`)}function ble(e,t){const n=e.source.body,r=CN(n,t+2);if(Vd(r))return{value:String.fromCodePoint(r),size:6};if(mN(r)&&92===n.charCodeAt(t+6)&&117===n.charCodeAt(t+7)){const o=CN(n,t+8);if(vN(o))return{value:String.fromCodePoint(r,o),size:12}}throw ko(e.source,t,`Invalid Unicode escape sequence: "${n.slice(t,t+6)}".`)}function CN(e,t){return Sf(e.charCodeAt(t))<<12|Sf(e.charCodeAt(t+1))<<8|Sf(e.charCodeAt(t+2))<<4|Sf(e.charCodeAt(t+3))}function Sf(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function Tle(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:"\n",size:2};case 114:return{value:"\r",size:2};case 116:return{value:"\t",size:2}}throw ko(e.source,t,`Invalid character escape sequence: "${n.slice(t,t+2)}".`)}function Ele(e,t){const n=e.source.body,r=n.length;let o=e.lineStart,i=t+3,s=i,a="";const l=[];for(;i<r;){const c=n.charCodeAt(i);if(34===c&&34===n.charCodeAt(i+1)&&34===n.charCodeAt(i+2)){a+=n.slice(s,i),l.push(a);const u=So(e,rt.BLOCK_STRING,t,i+3,Ose(l).join("\n"));return e.line+=l.length-1,e.lineStart=o,u}if(92!==c||34!==n.charCodeAt(i+1)||34!==n.charCodeAt(i+2)||34!==n.charCodeAt(i+3))if(10!==c&&13!==c)if(Vd(c))++i;else{if(!z0(n,i))throw ko(e.source,i,`Invalid character within String: ${au(e,i)}.`);i+=2}else a+=n.slice(s,i),l.push(a),13===c&&10===n.charCodeAt(i+1)?i+=2:++i,a="",s=i,o=i;else a+=n.slice(s,i),s=i+1,i+=4}throw ko(e.source,i,"Unterminated string.")}function Ile(e,t){const n=e.source.body,r=n.length;let o=t+1;for(;o<r&&Rse(n.charCodeAt(o));)++o;return So(e,rt.NAME,t,o,n.slice(t,o))}const Sle=globalThis.process?function(t,n){return t instanceof n}:function(t,n){if(t instanceof n)return!0;if("object"==typeof t&&null!==t){var r;const o=n.prototype[Symbol.toStringTag];if(o===(Symbol.toStringTag in t?t[Symbol.toStringTag]:null===(r=t.constructor)||void 0===r?void 0:r.name)){const s=Y8(t);throw new Error(`Cannot use ${o} "${s}" from another module or realm.\n\nEnsure that there is only one instance of "graphql" in the node_modules\ndirectory. If different versions of "graphql" are the dependencies of other\nrelied on modules, use "resolutions" to ensure only one version is installed.\n\nhttps://yarnpkg.com/en/docs/selective-version-resolutions\n\nDuplicate "graphql" modules cannot be used at the same time since different\nversions may have different capabilities and behavior. The data from one\nversion used in the function from another could produce confusing and\nspurious results.`)}}return!1};class yN{constructor(t,n="GraphQL request",r={line:1,column:1}){"string"==typeof t||E0(!1,`Body must be a string. Received: ${Y8(t)}.`),this.body=t,this.name=n,this.locationOffset=r,this.locationOffset.line>0||E0(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||E0(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}}class Af{constructor(t,n={}){const{lexer:r,...o}=n;if(r)this._lexer=r;else{const i=function Ale(e){return Sle(e,yN)}(t)?t:new yN(t);this._lexer=new fle(i)}this._options=o,this._tokenCounter=0}get tokenCount(){return this._tokenCounter}parseName(){const t=this.expectToken(rt.NAME);return this.node(t,{kind:wt.NAME,value:t.value})}parseDocument(){return this.node(this._lexer.token,{kind:wt.DOCUMENT,definitions:this.many(rt.SOF,this.parseDefinition,rt.EOF)})}parseDefinition(){if(this.peek(rt.BRACE_L))return this.parseOperationDefinition();const t=this.peekDescription(),n=t?this._lexer.lookahead():this._lexer.token;if(t&&n.kind===rt.BRACE_L)throw ko(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are not supported on shorthand queries.");if(n.kind===rt.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 ko(this._lexer.source,this._lexer.token.start,"Unexpected description, only GraphQL definitions support descriptions.");if("extend"===n.value)return this.parseTypeSystemExtension()}throw this.unexpected(n)}parseOperationDefinition(){const t=this._lexer.token;if(this.peek(rt.BRACE_L))return this.node(t,{kind:wt.OPERATION_DEFINITION,operation:na.QUERY,description:void 0,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});const n=this.parseDescription(),r=this.parseOperationType();let o;return this.peek(rt.NAME)&&(o=this.parseName()),this.node(t,{kind:wt.OPERATION_DEFINITION,operation:r,description:n,name:o,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){const t=this.expectToken(rt.NAME);switch(t.value){case"query":return na.QUERY;case"mutation":return na.MUTATION;case"subscription":return na.SUBSCRIPTION}throw this.unexpected(t)}parseVariableDefinitions(){return this.optionalMany(rt.PAREN_L,this.parseVariableDefinition,rt.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:wt.VARIABLE_DEFINITION,description:this.parseDescription(),variable:this.parseVariable(),type:(this.expectToken(rt.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(rt.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){const t=this._lexer.token;return this.expectToken(rt.DOLLAR),this.node(t,{kind:wt.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:wt.SELECTION_SET,selections:this.many(rt.BRACE_L,this.parseSelection,rt.BRACE_R)})}parseSelection(){return this.peek(rt.SPREAD)?this.parseFragment():this.parseField()}parseField(){const t=this._lexer.token,n=this.parseName();let r,o;return this.expectOptionalToken(rt.COLON)?(r=n,o=this.parseName()):o=n,this.node(t,{kind:wt.FIELD,alias:r,name:o,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(rt.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(t){return this.optionalMany(rt.PAREN_L,t?this.parseConstArgument:this.parseArgument,rt.PAREN_R)}parseArgument(t=!1){const n=this._lexer.token,r=this.parseName();return this.expectToken(rt.COLON),this.node(n,{kind:wt.ARGUMENT,name:r,value:this.parseValueLiteral(t)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){const t=this._lexer.token;this.expectToken(rt.SPREAD);const n=this.expectOptionalKeyword("on");return!n&&this.peek(rt.NAME)?this.node(t,{kind:wt.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(t,{kind:wt.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.node(t,!0===this._options.allowLegacyFragmentVariables?{kind:wt.FRAGMENT_DEFINITION,description:n,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}:{kind:wt.FRAGMENT_DEFINITION,description:n,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if("on"===this._lexer.token.value)throw this.unexpected();return this.parseName()}parseValueLiteral(t){const n=this._lexer.token;switch(n.kind){case rt.BRACKET_L:return this.parseList(t);case rt.BRACE_L:return this.parseObject(t);case rt.INT:return this.advanceLexer(),this.node(n,{kind:wt.INT,value:n.value});case rt.FLOAT:return this.advanceLexer(),this.node(n,{kind:wt.FLOAT,value:n.value});case rt.STRING:case rt.BLOCK_STRING:return this.parseStringLiteral();case rt.NAME:switch(this.advanceLexer(),n.value){case"true":return this.node(n,{kind:wt.BOOLEAN,value:!0});case"false":return this.node(n,{kind:wt.BOOLEAN,value:!1});case"null":return this.node(n,{kind:wt.NULL});default:return this.node(n,{kind:wt.ENUM,value:n.value})}case rt.DOLLAR:if(t){if(this.expectToken(rt.DOLLAR),this._lexer.token.kind===rt.NAME)throw ko(this._lexer.source,n.start,`Unexpected variable "$${this._lexer.token.value}" in constant value.`);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:wt.STRING,value:t.value,block:t.kind===rt.BLOCK_STRING})}parseList(t){return this.node(this._lexer.token,{kind:wt.LIST,values:this.any(rt.BRACKET_L,()=>this.parseValueLiteral(t),rt.BRACKET_R)})}parseObject(t){return this.node(this._lexer.token,{kind:wt.OBJECT,fields:this.any(rt.BRACE_L,()=>this.parseObjectField(t),rt.BRACE_R)})}parseObjectField(t){const n=this._lexer.token,r=this.parseName();return this.expectToken(rt.COLON),this.node(n,{kind:wt.OBJECT_FIELD,name:r,value:this.parseValueLiteral(t)})}parseDirectives(t){const n=[];for(;this.peek(rt.AT);)n.push(this.parseDirective(t));return n}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(t){const n=this._lexer.token;return this.expectToken(rt.AT),this.node(n,{kind:wt.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(t)})}parseTypeReference(){const t=this._lexer.token;let n;if(this.expectOptionalToken(rt.BRACKET_L)){const r=this.parseTypeReference();this.expectToken(rt.BRACKET_R),n=this.node(t,{kind:wt.LIST_TYPE,type:r})}else n=this.parseNamedType();return this.expectOptionalToken(rt.BANG)?this.node(t,{kind:wt.NON_NULL_TYPE,type:n}):n}parseNamedType(){return this.node(this._lexer.token,{kind:wt.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(rt.STRING)||this.peek(rt.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(),o=this.many(rt.BRACE_L,this.parseOperationTypeDefinition,rt.BRACE_R);return this.node(t,{kind:wt.SCHEMA_DEFINITION,description:n,directives:r,operationTypes:o})}parseOperationTypeDefinition(){const t=this._lexer.token,n=this.parseOperationType();this.expectToken(rt.COLON);const r=this.parseNamedType();return this.node(t,{kind:wt.OPERATION_TYPE_DEFINITION,operation:n,type:r})}parseScalarTypeDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("scalar");const r=this.parseName(),o=this.parseConstDirectives();return this.node(t,{kind:wt.SCALAR_TYPE_DEFINITION,description:n,name:r,directives:o})}parseObjectTypeDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("type");const r=this.parseName(),o=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),s=this.parseFieldsDefinition();return this.node(t,{kind:wt.OBJECT_TYPE_DEFINITION,description:n,name:r,interfaces:o,directives:i,fields:s})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(rt.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(rt.BRACE_L,this.parseFieldDefinition,rt.BRACE_R)}parseFieldDefinition(){const t=this._lexer.token,n=this.parseDescription(),r=this.parseName(),o=this.parseArgumentDefs();this.expectToken(rt.COLON);const i=this.parseTypeReference(),s=this.parseConstDirectives();return this.node(t,{kind:wt.FIELD_DEFINITION,description:n,name:r,arguments:o,type:i,directives:s})}parseArgumentDefs(){return this.optionalMany(rt.PAREN_L,this.parseInputValueDef,rt.PAREN_R)}parseInputValueDef(){const t=this._lexer.token,n=this.parseDescription(),r=this.parseName();this.expectToken(rt.COLON);const o=this.parseTypeReference();let i;this.expectOptionalToken(rt.EQUALS)&&(i=this.parseConstValueLiteral());const s=this.parseConstDirectives();return this.node(t,{kind:wt.INPUT_VALUE_DEFINITION,description:n,name:r,type:o,defaultValue:i,directives:s})}parseInterfaceTypeDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("interface");const r=this.parseName(),o=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),s=this.parseFieldsDefinition();return this.node(t,{kind:wt.INTERFACE_TYPE_DEFINITION,description:n,name:r,interfaces:o,directives:i,fields:s})}parseUnionTypeDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("union");const r=this.parseName(),o=this.parseConstDirectives(),i=this.parseUnionMemberTypes();return this.node(t,{kind:wt.UNION_TYPE_DEFINITION,description:n,name:r,directives:o,types:i})}parseUnionMemberTypes(){return this.expectOptionalToken(rt.EQUALS)?this.delimitedMany(rt.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("enum");const r=this.parseName(),o=this.parseConstDirectives(),i=this.parseEnumValuesDefinition();return this.node(t,{kind:wt.ENUM_TYPE_DEFINITION,description:n,name:r,directives:o,values:i})}parseEnumValuesDefinition(){return this.optionalMany(rt.BRACE_L,this.parseEnumValueDefinition,rt.BRACE_R)}parseEnumValueDefinition(){const t=this._lexer.token,n=this.parseDescription(),r=this.parseEnumValueName(),o=this.parseConstDirectives();return this.node(t,{kind:wt.ENUM_VALUE_DEFINITION,description:n,name:r,directives:o})}parseEnumValueName(){if("true"===this._lexer.token.value||"false"===this._lexer.token.value||"null"===this._lexer.token.value)throw ko(this._lexer.source,this._lexer.token.start,`${j0(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(),o=this.parseConstDirectives(),i=this.parseInputFieldsDefinition();return this.node(t,{kind:wt.INPUT_OBJECT_TYPE_DEFINITION,description:n,name:r,directives:o,fields:i})}parseInputFieldsDefinition(){return this.optionalMany(rt.BRACE_L,this.parseInputValueDef,rt.BRACE_R)}parseTypeSystemExtension(){const t=this._lexer.lookahead();if(t.kind===rt.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()}throw this.unexpected(t)}parseSchemaExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");const n=this.parseConstDirectives(),r=this.optionalMany(rt.BRACE_L,this.parseOperationTypeDefinition,rt.BRACE_R);if(0===n.length&&0===r.length)throw this.unexpected();return this.node(t,{kind:wt.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(0===r.length)throw this.unexpected();return this.node(t,{kind:wt.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(),o=this.parseConstDirectives(),i=this.parseFieldsDefinition();if(0===r.length&&0===o.length&&0===i.length)throw this.unexpected();return this.node(t,{kind:wt.OBJECT_TYPE_EXTENSION,name:n,interfaces:r,directives:o,fields:i})}parseInterfaceTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");const n=this.parseName(),r=this.parseImplementsInterfaces(),o=this.parseConstDirectives(),i=this.parseFieldsDefinition();if(0===r.length&&0===o.length&&0===i.length)throw this.unexpected();return this.node(t,{kind:wt.INTERFACE_TYPE_EXTENSION,name:n,interfaces:r,directives:o,fields:i})}parseUnionTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");const n=this.parseName(),r=this.parseConstDirectives(),o=this.parseUnionMemberTypes();if(0===r.length&&0===o.length)throw this.unexpected();return this.node(t,{kind:wt.UNION_TYPE_EXTENSION,name:n,directives:r,types:o})}parseEnumTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");const n=this.parseName(),r=this.parseConstDirectives(),o=this.parseEnumValuesDefinition();if(0===r.length&&0===o.length)throw this.unexpected();return this.node(t,{kind:wt.ENUM_TYPE_EXTENSION,name:n,directives:r,values:o})}parseInputObjectTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");const n=this.parseName(),r=this.parseConstDirectives(),o=this.parseInputFieldsDefinition();if(0===r.length&&0===o.length)throw this.unexpected();return this.node(t,{kind:wt.INPUT_OBJECT_TYPE_EXTENSION,name:n,directives:r,fields:o})}parseDirectiveDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("directive"),this.expectToken(rt.AT);const r=this.parseName(),o=this.parseArgumentDefs(),i=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");const s=this.parseDirectiveLocations();return this.node(t,{kind:wt.DIRECTIVE_DEFINITION,description:n,name:r,arguments:o,repeatable:i,locations:s})}parseDirectiveLocations(){return this.delimitedMany(rt.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){const t=this._lexer.token,n=this.parseName();if(Object.prototype.hasOwnProperty.call(gN,n.value))return n;throw this.unexpected(t)}parseSchemaCoordinate(){const t=this._lexer.token,n=this.expectOptionalToken(rt.AT),r=this.parseName();let o,i;return!n&&this.expectOptionalToken(rt.DOT)&&(o=this.parseName()),(n||o)&&this.expectOptionalToken(rt.PAREN_L)&&(i=this.parseName(),this.expectToken(rt.COLON),this.expectToken(rt.PAREN_R)),this.node(t,n?i?{kind:wt.DIRECTIVE_ARGUMENT_COORDINATE,name:r,argumentName:i}:{kind:wt.DIRECTIVE_COORDINATE,name:r}:o?i?{kind:wt.ARGUMENT_COORDINATE,name:r,fieldName:o,argumentName:i}:{kind:wt.MEMBER_COORDINATE,name:r,memberName:o}:{kind:wt.TYPE_COORDINATE,name:r})}node(t,n){return!0!==this._options.noLocation&&(n.loc=new Zie(t,this._lexer.lastToken,this._lexer.source)),n}peek(t){return this._lexer.token.kind===t}expectToken(t){const n=this._lexer.token;if(n.kind===t)return this.advanceLexer(),n;throw ko(this._lexer.source,n.start,`Expected ${bN(t)}, found ${j0(n)}.`)}expectOptionalToken(t){return this._lexer.token.kind===t&&(this.advanceLexer(),!0)}expectKeyword(t){const n=this._lexer.token;if(n.kind!==rt.NAME||n.value!==t)throw ko(this._lexer.source,n.start,`Expected "${t}", found ${j0(n)}.`);this.advanceLexer()}expectOptionalKeyword(t){const n=this._lexer.token;return n.kind===rt.NAME&&n.value===t&&(this.advanceLexer(),!0)}unexpected(t){const n=t??this._lexer.token;return ko(this._lexer.source,n.start,`Unexpected ${j0(n)}.`)}any(t,n,r){this.expectToken(t);const o=[];for(;!this.expectOptionalToken(r);)o.push(n.call(this));return o}optionalMany(t,n,r){if(this.expectOptionalToken(t)){const o=[];do{o.push(n.call(this))}while(!this.expectOptionalToken(r));return o}return[]}many(t,n,r){this.expectToken(t);const o=[];do{o.push(n.call(this))}while(!this.expectOptionalToken(r));return o}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!==rt.EOF&&(++this._tokenCounter,void 0!==t&&this._tokenCounter>t))throw ko(this._lexer.source,n.start,`Document contains more that ${t} tokens. Parsing aborted.`)}}function j0(e){const t=e.value;return bN(e.kind)+(null!=t?` "${t}"`:"")}function bN(e){return function ple(e){return e===rt.BANG||e===rt.DOLLAR||e===rt.AMP||e===rt.PAREN_L||e===rt.PAREN_R||e===rt.DOT||e===rt.SPREAD||e===rt.COLON||e===rt.EQUALS||e===rt.AT||e===rt.BRACKET_L||e===rt.BRACKET_R||e===rt.BRACE_L||e===rt.PIPE||e===rt.BRACE_R}(e)?`"${e}"`:e}var G0=new Map,r4=new Map,TN=!0,$0=!1;function EN(e){return e.replace(/[\s,]+/g," ").trim()}function Rle(e){var t=EN(e);if(!G0.has(t)){var n=function xle(e,t){const n=new Af(e,t),r=n.parseDocument();return Object.defineProperty(r,"tokenCount",{enumerable:!1,value:n.tokenCount}),r}(e,{experimentalFragmentVariables:$0,allowLegacyFragmentVariables:$0});if(!n||"Document"!==n.kind)throw new Error("Not a valid GraphQL document.");G0.set(t,function kle(e){var t=new Set(e.definitions);t.forEach(function(r){r.loc&&delete r.loc,Object.keys(r).forEach(function(o){var i=r[o];i&&"object"==typeof i&&t.add(i)})});var n=e.loc;return n&&(delete n.startToken,delete n.endToken),e}(function Nle(e){var t=new Set,n=[];return e.definitions.forEach(function(r){if("FragmentDefinition"===r.kind){var o=r.name.value,i=function Mle(e){return EN(e.source.body.substring(e.start,e.end))}(r.loc),s=r4.get(o);s&&!s.has(i)?TN&&console.warn("Warning: fragment with name "+o+" already exists.\ngraphql-tag enforces all fragment names across your application to be unique; read more about\nthis in the docs: http://dev.apollodata.com/core/fragments.html#unique-names"):s||r4.set(o,s=new Set),s.add(i),t.has(i)||(t.add(i),n.push(r))}else n.push(r)}),Mh(Mh({},e),{definitions:n})}(n)))}return G0.get(t)}function zd(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];"string"==typeof e&&(e=[e]);var r=e[0];return t.forEach(function(o,i){r+=o&&"Document"===o.kind?o.loc.source.body:o,r+=e[i+1]}),Rle(r)}var wf_gql=zd,wf_resetCaches=function Ole(){G0.clear(),r4.clear()},wf_disableFragmentWarnings=function Ple(){TN=!1},wf_enableExperimentalFragmentVariables=function Ble(){$0=!0},wf_disableExperimentalFragmentVariables=function Fle(){$0=!1};(function(e){e.gql=wf_gql,e.resetCaches=wf_resetCaches,e.disableFragmentWarnings=wf_disableFragmentWarnings,e.enableExperimentalFragmentVariables=wf_enableExperimentalFragmentVariables,e.disableExperimentalFragmentVariables=wf_disableExperimentalFragmentVariables})(zd||(zd={})),zd.default=zd;const Vle=new class Ule extends hM{}(class Hle extends _M{constructor(t,n){super(t,n),this.scheduler=t,this.work=n}schedule(t,n=0){return n>0?super.schedule(t,n):(this.delay=n,this.state=t,this.scheduler.flush(this),this)}execute(t,n){return n>0||this.closed?super.execute(t,n):this._execute(t,n)}requestAsyncId(t,n,r=0){return null!=r&&r>0||null==r&&this.delay>0?super.requestAsyncId(t,n,r):(t.flush(this),0)}});function SN(e){return new Ot(t=>(e().then(n=>{t.closed||(t.next(n),t.complete())},n=>{t.closed||t.error(n)}),()=>t.unsubscribe()))}class Gle{zone;constructor(t){this.zone=t}now=Date.now;schedule(t,n=0,r){return this.zone.run(()=>Vle.schedule(t,n,r))}}function o4(e,t){return e.pipe(B7(new Gle(t)))}class $le{obsQuery;valueChanges;constructor(t,n){this.obsQuery=t,this.valueChanges=o4(Ys(this.obsQuery),n)}get options(){return this.obsQuery.options}get variables(){return this.obsQuery.variables}getCurrentResult(){return this.obsQuery.getCurrentResult()}refetch(t){return this.obsQuery.refetch(t)}fetchMore(t){return this.obsQuery.fetchMore(t)}subscribeToMore(t){return this.obsQuery.subscribeToMore(t)}updateQuery(t){return this.obsQuery.updateQuery(t)}stopPolling(){return this.obsQuery.stopPolling()}startPolling(t){return this.obsQuery.startPolling(t)}setVariables(t){return this.obsQuery.setVariables(t)}reobserve(t){return this.obsQuery.reobserve(t)}}const i4=new ut("APOLLO_FLAGS"),AN=new ut("APOLLO_OPTIONS"),wN=new ut("APOLLO_NAMED_OPTIONS");class DN{ngZone;flags;_client;useMutationLoading;constructor(t,n,r){this.ngZone=t,this.flags=n,this._client=r,this.useMutationLoading=n?.useMutationLoading??!1}watchQuery(t){return new $le(this.ensureClient().watchQuery({...t}),this.ngZone)}query(t){return SN(()=>this.ensureClient().query({...t}))}mutate(t){return function jle(e,t){return t?e.pipe(ur(n=>({...n,loading:!1})),function zle(...e){const t=O2(e);return Ri((n,r)=>{(t?yf(e,n,t):yf(e,n)).subscribe(r)})}({data:void 0,loading:!0})):e.pipe(ur(n=>({...n,loading:!1})))}(SN(()=>this.ensureClient().mutate({...t})),t.useMutationLoading??this.useMutationLoading)}watchFragment(t){const{useZone:n,...r}=t,o=this.ensureClient().watchFragment({...r});return!0!==n?o:o4(o,this.ngZone)}subscribe(t){const{useZone:n,...r}=t,o=this.ensureClient().subscribe({...r});return!0!==n?o:o4(o,this.ngZone)}get client(){return this.ensureClient()}set client(t){if(this._client)throw new Error("Client has been already defined");this._client=t}ensureClient(){return this.checkInstance(),this._client}checkInstance(){if(this._client)return!0;throw new Error("Client has not been defined yet")}}let s4=(()=>{class e extends DN{map=new Map;constructor(n,r,o,i){if(super(n,i),r&&this.createDefault(r),o&&"object"==typeof o)for(let s in o)o.hasOwnProperty(s)&&this.create(o[s],s)}create(n,r){a4(r)?this.createNamed(r,n):this.createDefault(n)}default(){return this}use(n){return a4(n)?this.map.get(n):this.default()}createDefault(n){if(this._client)throw new Error("Apollo has been already created.");this.client=this.ngZone.runOutsideAngular(()=>new J3(n))}createNamed(n,r){if(this.map.has(n))throw new Error(`Client ${n} has been already created`);this.map.set(n,new DN(this.ngZone,this.flags,this.ngZone.runOutsideAngular(()=>new J3(r))))}removeClient(n){a4(n)?this.map.delete(n):this._client=void 0}static \u0275fac=function(r){return new(r||e)($t(mr),$t(AN,8),$t(wN,8),$t(i4,8))};static \u0275prov=Fe({token:e,factory:e.\u0275fac})}return e})();function a4(e){return!!e&&"default"!==e}const l4=zd,q0=(e,t)=>e&&t?[...e.keys()].reduce((n,r)=>n.set(r,e.get(r)),t):t||e;const c4={batchInterval:10,batchMax:10,uri:"graphql",method:"POST",withCredentials:!1,includeQuery:!0,includeExtensions:!1,useMultipart:!1};function Ga(e,t,n){return function W0(...e){return e.find(t=>typeof t<"u")}(e[n],t[n],c4[n])}class Zle extends hi{httpClient;options;requester;print=x0;constructor(t,n){super(),this.httpClient=t,this.options=n,this.options.operationPrinter&&(this.print=this.options.operationPrinter),this.requester=r=>new Ot(o=>{const i=r.getContext();let s=Ga(i,this.options,"method");const a=Ga(i,this.options,"includeQuery"),l=Ga(i,this.options,"includeExtensions"),c=Ga(i,this.options,"uri"),u=Ga(i,this.options,"withCredentials"),d=Ga(i,this.options,"useMultipart"),f=!0===this.options.useGETForQueries,C=q0(i.httpContext,q0(this.options.httpContext,new h8)),P=r.query.definitions.some(he=>"OperationDefinition"===he.kind&&"query"===he.operation);f&&P&&(s="GET");const G={method:s,url:"function"==typeof c?c(r):c,body:{operationName:r.operationName,variables:r.variables},options:{withCredentials:u,useMultipart:d,headers:this.options.headers,context:C}};l&&(G.body.extensions=r.extensions),a&&(G.body.query=this.print(r.query));const W=function MN(e){let t=e.headers&&e.headers instanceof _i?e.headers:new _i(e.headers);if(e.clientAwareness){const{name:n,version:r}=e.clientAwareness;n&&!t.has("apollographql-client-name")&&(t=t.set("apollographql-client-name",n)),r&&!t.has("apollographql-client-version")&&(t=t.set("apollographql-client-version",r))}return t}(i);G.options.headers=((e,t)=>e&&t?t.keys().reduce((r,o)=>r.set(o,t.getAll(o)),e):t||e)(G.options.headers,W);const ie=((e,t,n)=>{const r=-1!==["POST","PUT","PATCH"].indexOf(e.method.toUpperCase()),i=e.body.length;let a,s=e.options&&e.options.useMultipart;if(s){if(i)return new Ot(c=>c.error(new Error("File upload is not available when combined with Batching")));if(!r)return new Ot(c=>c.error(new Error("File upload is not available when GET is used")));if(!n)return new Ot(c=>c.error(new Error('To use File upload you need to pass "extractFiles" function from "extract-files" library to HttpLink\'s options')));a=n(e.body),s=!!a.files.size}let l={};if(i){if(!r)return new Ot(c=>c.error(new Error("Batching is not available for GET requests")));l={body:e.body}}else l=r?{body:s?a.clone:e.body}:{params:Object.keys(e.body).reduce((d,f)=>{const C=e.body[f];return d[f]=-1!==["variables","extensions"].indexOf(f.toLowerCase())?JSON.stringify(C):C,d},{})};if(s&&r){const c=new FormData;c.append("operations",JSON.stringify(l.body));const u={},d=a.files;let f=0;d.forEach(C=>{u[++f]=C}),c.append("map",JSON.stringify(u)),f=0,d.forEach((C,P)=>{c.append(++f+"",P,P.name)}),l.body=c}return t.request(e.method,e.url,{observe:"response",responseType:"json",reportProgress:!1,...l,...e.options})})(G,this.httpClient,this.options.extractFiles).subscribe({next:he=>{r.setContext({response:he}),o.next(he.body)},error:he=>o.error(he),complete:()=>o.complete()});return()=>{ie.closed||ie.unsubscribe()}})}request(t){return this.requester(t)}}let Yle=(()=>{class e{httpClient;constructor(n){this.httpClient=n}create(n){return new Zle(this.httpClient,n)}static \u0275fac=function(r){return new(r||e)($t(kl))};static \u0275prov=Fe({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function NN(e,t){this.v=e,this.k=t}function u4(e){return new NN(e,0)}function d4(e){return function(){return new Df(e.apply(this,arguments))}}function Df(e){var t,n;function r(i,s){try{var a=e[i](s),l=a.value,c=l instanceof NN;Promise.resolve(c?l.v:l).then(function(u){if(c){var d="return"===i?"return":"next";if(!l.k||u.done)return r(d,u);u=e[d](u).value}o(a.done?"return":"normal",u)},function(u){r("throw",u)})}catch(u){o("throw",u)}}function o(i,s){switch(i){case"return":t.resolve({value:s,done:!0});break;case"throw":t.reject(s);break;default:t.resolve({value:s,done:!1})}(t=t.next)?r(t.key,t.arg):n=null}this._invoke=function(i,s){return new Promise(function(a,l){var c={key:i,arg:s,resolve:a,reject:l,next:null};n?n=n.next=c:(t=n=c,r(i,s))})},"function"!=typeof e.return&&(this.return=void 0)}function _4(e){var t,n,r,o=2;for(typeof Symbol<"u"&&(n=Symbol.asyncIterator,r=Symbol.iterator);o--;){if(n&&null!=(t=e[n]))return t.call(e);if(r&&null!=(t=e[r]))return new Z0(t.call(e));n="@@asyncIterator",r="@@iterator"}throw new TypeError("Object is not async iterable")}function Z0(e){function t(n){if(Object(n)!==n)return Promise.reject(new TypeError(n+" is not an object."));var r=n.done;return Promise.resolve(n.value).then(function(o){return{value:o,done:r}})}return(Z0=function(r){this.s=r,this.n=r.next}).prototype={s:null,n:null,next:function(){return t(this.n.apply(this.s,arguments))},return:function(r){var o=this.s.return;return void 0===o?Promise.resolve({value:r,done:!0}):t(o.apply(this.s,arguments))},throw:function(r){var o=this.s.return;return void 0===o?Promise.reject(r):t(o.apply(this.s,arguments))}},new Z0(e)}function Qle(e){if("next"!==e&&"complete"!==e)throw new Error(`Invalid stream event "${e}"`);return e}function Jle(e,t){if(t)try{t=JSON.parse(t)}catch{throw new Error("Invalid stream data")}if("next"===e&&!t)throw new Error('Stream data must be an object for "next" events');return t||null}Df.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},Df.prototype.next=function(e){return this._invoke("next",e)},Df.prototype.throw=function(e){return this._invoke("throw",e)},Df.prototype.return=function(e){return this._invoke("return",e)};var jd=function(e){return e[e.NewLine=10]="NewLine",e[e.CarriageReturn=13]="CarriageReturn",e[e.Space=32]="Space",e[e.Colon=58]="Colon",e}(jd||{});class ys extends Error{constructor(t){let n,r;!function rce(e){return function tce(e){return"object"==typeof e&&null!==e}(e)&&"boolean"==typeof e.ok&&"number"==typeof e.status&&"string"==typeof e.statusText}(t)?n=t instanceof Error?t.message:String(t):(r=t,n="Server responded with "+t.status+": "+t.statusText),super(n),this.name=this.constructor.name,this.response=r}}function kN(e){return h4.apply(this,arguments)}function h4(){return h4=(0,K.A)(function*(e){const{signal:t,url:n,credentials:r,headers:o,body:i,referrer:s,referrerPolicy:a,fetchFn:l,onMessage:c}=e,u={},d={};let f;try{f=yield l(n,{signal:t,method:i?"POST":"GET",credentials:r,referrer:s,referrerPolicy:a,headers:{...o,accept:"text/event-stream"},body:i})}catch(G){throw new ys(G)}if(!f.ok)throw new ys(f);if(!f.body)throw new Error("Missing response body");let P,C=null;return(0,K.A)(function*(){var G;try{const St=function ece(){let e,t,n,r=!1,o={event:"",data:""},i=[];const s=new TextDecoder;return function(l){if(void 0===e)e=l,t=0,n=-1;else{const d=new Uint8Array(e.length+l.length);d.set(e),d.set(l,e.length),e=d}const c=e.length;let u=0;for(;t<c;){r&&(e[t]===jd.NewLine&&(u=++t),r=!1);let d=-1;for(;t<c&&-1===d;++t)switch(e[t]){case jd.Colon:-1===n&&(n=t-u);break;case jd.CarriageReturn:r=!0;case jd.NewLine:d=t}if(-1===d)break;if(u===d){if(o.event||o.data){if(!o.event)throw new Error("Missing message event");const f=Qle(o.event),C=Jle(f,o.data);i.push({event:f,data:C}),o={event:"",data:""}}}else if(n>0){const f=e.subarray(u,d),C=s.decode(f.subarray(0,n)),G=s.decode(f.subarray(n+(f[n+1]===jd.Space?2:1)));switch(C){case"event":o.event=G;break;case"data":o.data=o.data?o.data+"\n"+G:G}}u=t,n=-1}if(u===c){e=void 0;const d=[...i];return i=[],d}0!==u&&(e=e.subarray(u),t-=u)}}();var he,W=!1,ie=!1;try{for(var st,qe=_4(function oce(e){return"function"==typeof Object(e)[Symbol.asyncIterator]?e:d4(function*(){const t=e.getReader();let n;do{n=yield u4(t.read()),void 0!==n.value&&(yield n.value)}while(!n.done)})()}(f.body));W=!(st=yield qe.next()).done;W=!1){const jt=st.value;{if("string"==typeof jt)throw C=new Error(`Unexpected string chunk "${jt}"`);let wn;try{wn=St(jt)}catch(Jt){throw C=Jt}if(!wn)continue;for(const Jt of wn){try{c?.(Jt)}catch(Ln){throw C=Ln}const zn=Jt.data&&"id"in Jt.data?Jt.data.id:"";switch(zn in d||(d[zn]=[]),Jt.event){case"next":d[zn].push(zn?Jt.data.payload:Jt.data);break;case"complete":d[zn].push("complete");break;default:throw C=new Error(`Unexpected message event "${Jt.event}"`)}null===(G=u[zn])||void 0===G||G.proceed()}}}}catch(jt){ie=!0,he=jt}finally{try{W&&null!=qe.return&&(yield qe.return())}finally{if(ie)throw he}}if(Object.keys(u).length)throw new Error("Connection closed while having active streams")}catch(St){C=!C&&Object.keys(u).length?new ys(St):St,P?.(C)}finally{Object.values(u).forEach(({proceed:St})=>St())}})(),{url:n,headers:o,waitForThrow:()=>new Promise((G,W)=>{if(C)return W(C);P=W}),getResults:G=>d4(function*(){var W;const{signal:ie,operationId:he=""}=G??{};try{for(;;){for(;null!==(W=d[he])&&void 0!==W&&W.length;){const qe=d[he].shift();if("complete"===qe)return;yield qe}if(C)throw C;if(ie?.aborted)throw new Error("Getting results aborted by the client");yield u4(new Promise(qe=>{const st=()=>{ie?.removeEventListener("abort",st),delete u[he],qe()};ie?.addEventListener("abort",st),u[he]={proceed:st}}))}}finally{delete d[he]}})()}}),h4.apply(this,arguments)}class ice extends hi{constructor(t){super(),this.client=function nce(e){const{singleConnection:t=!1,lazy:n=!0,lazyCloseTimeout:r=0,onNonLazyError:o=console.error,generateID:i=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,zn=>{const Ln=16*Math.random()|0;return("x"==zn?Ln:3&Ln|8).toString(16)})},retryAttempts:s=5,retry:a=function(){var Jt=(0,K.A)(function*(Ln){let Qn=1e3;for(let wi=0;wi<Ln;wi++)Qn*=2;yield new Promise(wi=>setTimeout(wi,Qn+Math.floor(2700*Math.random()+300)))});return function zn(Ln){return Jt.apply(this,arguments)}}(),credentials:l="same-origin",referrer:c,referrerPolicy:u,onMessage:d,on:f}=e,C=e.fetchFn||fetch,P=e.abortControllerImpl||AbortController,G=(()=>{let Jt=!1;const zn=[];return{get disposed(){return Jt},onDispose:Ln=>Jt?(setTimeout(()=>Ln(),0),()=>{}):(zn.push(Ln),()=>{zn.splice(zn.indexOf(Ln),1)}),dispose(){if(!Jt){Jt=!0;for(const Ln of[...zn])Ln()}}}})();let W,ie,he=0,qe=null,st=0;function St(){return jt.apply(this,arguments)}function jt(){return(jt=(0,K.A)(function*(){try{if(G.disposed)throw new Error("Client has been disposed");return yield ie??(ie=(0,K.A)(function*(){var Jt,zn,Ln;if(qe){if(yield a(st),W.signal.aborted)throw new Error("Connection aborted by the client");st++}null===(Jt=f?.connecting)||void 0===Jt||Jt.call(f,!!qe),W=new P;const Qn=G.onDispose(()=>W.abort());W.signal.addEventListener("abort",()=>{Qn(),ie=void 0});const wi=e,Co="function"==typeof wi.url?yield wi.url(void 0):wi.url;if(W.signal.aborted)throw new Error("Connection aborted by the client");const Lo="function"==typeof wi.headers?yield wi.headers(void 0):null!==(zn=wi.headers)&&void 0!==zn?zn:{};if(W.signal.aborted)throw new Error("Connection aborted by the client");let Ro;try{Ro=yield C(Co,{signal:W.signal,method:"PUT",credentials:l,referrer:c,referrerPolicy:u,headers:Lo})}catch(Ts){throw new ys(Ts)}if(201!==Ro.status)throw new ys(Ro);const ua=yield Ro.text();Lo["x-graphql-event-stream-token"]=ua;const Ya=yield kN({signal:W.signal,headers:Lo,credentials:l,referrer:c,referrerPolicy:u,url:Co,fetchFn:C,onMessage:Ts=>{var da;null===(da=f?.message)||void 0===da||da.call(f,Ts),d?.(Ts)}});return null===(Ln=f?.connected)||void 0===Ln||Ln.call(f,!!qe),Ya.waitForThrow().catch(()=>ie=void 0),Ya})())}catch(Jt){throw ie=void 0,Jt}})).apply(this,arguments)}function wn(Jt,zn,Ln){if(!t){const Co=new P,Lo=G.onDispose(()=>{Lo(),Co.abort()});return(0,K.A)(function*(){var Ro,ua,Ya,Ts,da;let Di=null,du=0;for(;;)try{if(Di){if(yield a(du),Co.signal.aborted)throw new Error("Connection aborted by the client");du++}null===(Ro=f?.connecting)||void 0===Ro||Ro.call(f,!!Di),null===(ua=Ln?.connecting)||void 0===ua||ua.call(Ln,!!Di);const as=e,hpe="function"==typeof as.url?yield as.url(Jt):as.url;if(Co.signal.aborted)throw new Error("Connection aborted by the client");const fpe="function"==typeof as.headers?yield as.headers(Jt):null!==(Ya=as.headers)&&void 0!==Ya?Ya:{};if(Co.signal.aborted)throw new Error("Connection aborted by the client");const{getResults:ppe}=yield kN({signal:Co.signal,headers:{...fpe,"content-type":"application/json; charset=utf-8"},credentials:l,referrer:c,referrerPolicy:u,url:hpe,body:JSON.stringify(Jt),fetchFn:C,onMessage:hu=>{var $4,q4;null===($4=f?.message)||void 0===$4||$4.call(f,hu),null===(q4=Ln?.message)||void 0===q4||q4.call(Ln,hu),d?.(hu)}});null===(Ts=f?.connected)||void 0===Ts||Ts.call(f,!!Di),null===(da=Ln?.connected)||void 0===da||da.call(Ln,!!Di);var _a,Uf=!1,Xd=!1;try{for(var _u,Jl=_4(ppe());Uf=!(_u=yield Jl.next()).done;Uf=!1)Di=null,du=0,zn.next(_u.value)}catch(hu){Xd=!0,_a=hu}finally{try{Uf&&null!=Jl.return&&(yield Jl.return())}finally{if(Xd)throw _a}}return Co.abort()}catch(as){if(Co.signal.aborted)return;if(!(as instanceof ys)||!s||du>=s)throw as;Di=as}})().then(()=>zn.complete()).catch(Ro=>zn.error(Ro)),()=>Co.abort()}he++;const Qn=new P,wi=G.onDispose(()=>{wi(),Qn.abort()});return(0,K.A)(function*(){const Co=i();Jt={...Jt,extensions:{...Jt.extensions,operationId:Co}};let Lo=null;for(;;){Lo=null;try{const{url:Di,headers:du,getResults:Uf}=yield St();let Xd;try{Xd=yield C(Di,{signal:Qn.signal,method:"POST",credentials:l,referrer:c,referrerPolicy:u,headers:{...du,"content-type":"application/json; charset=utf-8"},body:JSON.stringify(Jt)})}catch(_a){throw new ys(_a)}if(202!==Xd.status)throw new ys(Xd);Lo=function(){var _a=(0,K.A)(function*(){let Jl;try{const _u=new P,as=G.onDispose(()=>{as(),_u.abort()});Jl=yield C(Di+"?operationId="+Co,{signal:_u.signal,method:"DELETE",credentials:l,referrer:c,referrerPolicy:u,headers:du})}catch(_u){throw new ys(_u)}if(200!==Jl.status)throw new ys(Jl)});return function(){return _a.apply(this,arguments)}}();var Ya,Ro=!1,ua=!1;try{for(var da,Ts=_4(Uf({signal:Qn.signal,operationId:Co}));Ro=!(da=yield Ts.next()).done;Ro=!1)qe=null,st=0,zn.next(da.value)}catch(_a){ua=!0,Ya=_a}finally{try{Ro&&null!=Ts.return&&(yield Ts.return())}finally{if(ua)throw Ya}}return Lo=null,Qn.abort()}catch(Di){if(Qn.signal.aborted)return yield Lo?.();if(!(Di instanceof ys)||(n&&(ie=void 0),!s||st>=s))throw Qn.abort(),Di;qe=Di}finally{Qn.signal.aborted&&0===--he&&(isFinite(r)&&r>0?setTimeout(()=>{he||W.abort()},r):W.abort())}}})().then(()=>zn.complete()).catch(Co=>zn.error(Co)),()=>Qn.abort()}return t&&!n&&(0,K.A)(function*(){for(he++;;)try{const{waitForThrow:Jt}=yield St();yield Jt()}catch(Jt){if(G.disposed)return;if(!(Jt instanceof ys)||(ie=void 0,!s||st>=s))return o?.(Jt);qe=Jt}})(),{subscribe:wn,iterate(Jt,zn){const Ln=[],Qn={done:!1,error:null,resolve:()=>{}},wi=wn(Jt,{next(Lo){Ln.push(Lo),Qn.resolve()},error(Lo){Qn.done=!0,Qn.error=Lo,Qn.resolve()},complete(){Qn.done=!0,Qn.resolve()}},zn),Co=(Lo=d4(function*(){for(;;){for(Ln.length||(yield u4(new Promise(ua=>Qn.resolve=ua)));Ln.length;)yield Ln.shift();if(Qn.error)throw Qn.error;if(Qn.done)return}}),function Ro(){return Lo.apply(this,arguments)})();var Lo;return Co.throw=function(){var Lo=(0,K.A)(function*(Ro){return Qn.done||(Qn.done=!0,Qn.error=Ro,Qn.resolve()),{done:!0,value:void 0}});return function(Ro){return Lo.apply(this,arguments)}}(),Co.return=(0,K.A)(function*(){return wi(),{done:!0,value:void 0}}),Co},dispose(){G.dispose()}}}(t)}request(t){return new Ot(n=>this.client.subscribe({...t,query:x0(t.query)},{next:n.next.bind(n),complete:n.complete.bind(n),error:n.error.bind(n)}))}}const sce={run:e=>e(),runOutsideAngular:e=>e()};let RN=(()=>{class e{constructor(){this.httpLink=pe(Yle),this.gatewayService=pe(Ex),this.apollo=(n,r=!1)=>new s4(sce,this.createApolloOptions(n,r))}createApolloOptions(n,r=!1){const o=new XM(l=>{const c=l.headers instanceof _i?l.headers:new _i(l.headers??{});return{...l,uri:()=>this.gatewayService.getGatewayUrl(n,r),headers:c.set("Authorization",`Bearer ${n.token}`).set("Accept","charset=utf-8")}}),i=cse(({query:l})=>{const c=E3(l);return"OperationDefinition"===c.kind&&"subscription"===c.operation},new ice({url:()=>this.gatewayService.getGatewayUrl(n,r),headers:()=>({Authorization:`Bearer ${n.token}`})}),this.httpLink.create({}));return{link:hi.from([o,i]),cache:new KM}}static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275prov=Fe({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var Gd=_t(7184);let Y0=(()=>{class e{constructor(){this.apolloFactory=pe(RN),this.luigiCoreService=pe(mo)}read(n,r,o,i,s=!0){const a=O(i),l=this.getNamespace(i);let c=this.resolveReadQuery(r,o,n,a?l:void 0);return c=this.parseGQLQuery(c),this.apolloFactory.apollo(i,s).query({query:c,variables:{name:n,...a&&{namespace:l}}}).pipe(ur(u=>E(u.data,N(r,"."))))}resolveReadQuery(n,r,o,i){if(r instanceof Array){const{entity:s,version:a,apiGroup:l}=n,c=[{operation:s,variables:{name:{value:o,type:"String!"},...i&&{namespace:{value:i,type:"String"}}},fields:r}],u=this.calcQueryOptions(c,[{operation:l},{operation:a}]);return Gd.P(u).query}return r}list(n,r,o,i=!1,s){const l={...O(o)&&{namespace:{type:"String",value:this.getNamespace(o)}},...s?.limit&&{limit:{type:"Int",value:s?.limit}},...s?.continue&&{continue:{type:"String",value:s?.continue}}},c=o.resourceDefinition;return c?r instanceof Array?this.listWithFields(c,r,o,i,l):this.listWithRawQuery(n,r,o,i,l):Wl(()=>new Error("Resource definition is required"))}getResourceReadyStatus(n,r){const o=r.resourceDefinition?.readyCondition;return!o||D(n,o)}listWithFields(n,r,o,i,s){const{apiGroup:a,entityCollection:l,version:c}=n,d=this.calcQueryOptions([{operation:l,variables:s,fields:["resourceVersion","remainingItemCount","continue",{items:r}]}],[{operation:a},{operation:c}]),f=Gd.P(d),C=this.parseGQLQuery(f.query);return this.apolloFactory.apollo(o,i).query({query:C,variables:f.variables}).pipe(ur(P=>{const G=E(P.data,N({apiGroup:a,version:c,entity:l},"."));if(!G)throw new Error("Resource list result not found");return G}),ur(P=>{const G=P.items.map(W=>({...W,ready:this.getResourceReadyStatus(W,o)})).map(W=>({...W,isAvailable:this.isAvailable(W),accessibleName:this.getAccessibleName(W)}));return{...P,items:G}}))}isAvailable(n){return!!n.ready&&!n.metadata?.deletionTimestamp}getAccessibleName(n){return n.metadata?.deletionTimestamp?"Resource is pending deletion":n.ready?void 0:"Resource is not ready"}listWithRawQuery(n,r,o,i,s){const a=this.parseGQLQuery(r);return this.apolloFactory.apollo(o,i).query({query:a,variables:this.normalizeGqlBuilderVariables(s)}).pipe(ur(l=>E(l.data,n)??[]),za(l=>(this.alertErrors(l),console.error("Error executing GraphQL query.",l),Wl(()=>l))))}resourceChangeSubscription(n,r,o,i,s){const l={...O(o)&&{namespace:{type:"String",value:this.getNamespace(o)}}},c=n.toLowerCase(),u=Gd.gP({operation:c,fields:["type",{object:r}],variables:{...l,resourceVersion:{type:"String",value:i}}}),d=this.parseGQLQuery(u.query);return this.apolloFactory.apollo(o,s).subscribe({query:d,variables:u.variables}).pipe(ur(f=>{const C=E(f.data,c);return C&&(C.object.ready=this.getResourceReadyStatus(C.object,o),C.object.isAvailable=this.isAvailable(C.object),C.object.accessibleName=this.getAccessibleName(C.object)),C}))}alertErrors(n){this.luigiCoreService.showAlert({text:n.message,type:"error"})}delete(n,r,o,i=!1){const s=O(o),{apiGroup:a,entity:l,version:c}=r,u=[{operation:`delete${l}`,variables:{name:{type:"String!",value:n.metadata.name},...s&&{namespace:{type:"String",value:this.getNamespace(o)}}},fields:[]}],d=this.calcQueryOptions(u,[{operation:a},{operation:c}]),f=Gd.gO(d),C=this.parseGQLQuery(f.query);return this.apolloFactory.apollo(o,i).mutate({mutation:C,variables:f.variables}).pipe(za(P=>(this.alertErrors(P),console.error("Error executing GraphQL query.",P),Wl(()=>P))))}create(n,r,o){const i=O(o),{apiGroup:s,entity:a,version:l}=r,c=this.getNamespace(o,n),u=[{operation:`create${a}`,variables:{...i&&{namespace:{type:"String",value:c}},object:{type:`${a}Input!`,value:n}},fields:["__typename"]}],d=this.calcQueryOptions(u,[{operation:s},{operation:l}]),f=Gd.gO(d),C=this.parseGQLQuery(f.query);return this.apolloFactory.apollo(o).mutate({mutation:C,fetchPolicy:"no-cache",variables:f.variables}).pipe(za(P=>(this.alertErrors(P),console.error("Error executing GraphQL query.",P),Wl(()=>P))))}update(n,r,o,i=!1,s=["__typename"]){const a=O(o),{apiGroup:l,entity:c,version:u}=r,d=this.getNamespace(o),f=$(n),C=[{operation:`update${c}`,variables:{...a&&{namespace:{type:"String",value:d}},name:{type:"String!",value:n.metadata.name},object:{type:`${c}Input!`,value:f}},fields:s}],P=this.calcQueryOptions(C,[{operation:l},{operation:u}]),G=Gd.gO(P),W=this.parseGQLQuery(G.query);return this.apolloFactory.apollo(o,i).mutate({mutation:W,fetchPolicy:"no-cache",variables:G.variables}).pipe(ur(ie=>E(ie.data,N({apiGroup:l,entity:`update${c}`,version:u},"."))),za(ie=>(this.alertErrors(ie),console.error("Error executing GraphQL query.",ie),Wl(()=>ie))))}getNamespace(n,r){if(n.namespaceId)return n.namespaceId;if(r?.metadata?.namespace)return r.metadata.namespace;const o=this.luigiCoreService.routing().getSearchParams().namespace;return o?"-all-"===o?void 0:o:void 0}normalizeGqlBuilderVariables(n){return Object.fromEntries(Object.entries(n).map(([r,o])=>[r,o.value]))}calcQueryOptions(n,r){const o=r.filter(a=>!!a?.operation);if(0===o.length){const a=n.pop();if(a&&a.operation&&a.fields)return a;throw new Error("At least one wrapper or inner fields is required")}let i=n,s=o.pop();return o.forEach(a=>{i=[{operation:s.operation,fields:n,variables:s.variables}],s=a}),{operation:s.operation,fields:i,variables:s.variables}}parseGQLQuery(n){try{return l4`
|
|
81
81
|
${n}
|
|
82
82
|
`}catch(r){throw this.luigiCoreService.showAlert({text:`Could not parse gql query: <br/><br/> ${n} <br/><br/> ${r.message}`,type:"error"}),r}}static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275prov=Fe({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();const ace=l4`
|
|
83
83
|
{
|