PageSourceSearch

https://espace-client.sfr.fr/multi/chunk-GCLWOLQT.js

js sfr.fr collected 2026-09-24 08:36:47 UTC 147,374 bytes, 59 lines download raw bytes

1import{A as Ri,B as Mi,D as Qe,G as Be,I as Gt,J as gt,K as Li,_ as Pi,a as d,b as O,c as B,d as pt,e as ee,f as Bt,g as Ut,h as wi,i as mt,j as Or,k as Ii,l as ye,m as ke,n as Fi,o as Ci,ob as Vi,p as te,q as dt,r as zt,u as Sr,v as Wt,w as _i,x as Ai,z as yt}from"./chunk-XDQKWMTK.js";var ji=class r{window=Li(Vi);getApiUrl(){return this.window.location.origin+"/multi-family-ws-rest"}getOffresUrl(){let e=this.window.location.origin;return e.includes("cms")||e.includes("futpsw")?"https://cms.sfr.fr/offre-mobile":e.includes("pfv")?"https://www.pfv.sfr.fr/offre-mobile":"https://www.sfr.fr/offre-mobile"}static \u0275fac=function(t){return new(t||r)};static \u0275prov=Be({token:r,factory:r.\u0275fac,providedIn:"root"})};var Qi=class r{userDataSubject=new Ut({selectedLine:{}});constructor(){}getUserData(){return this.userDataSubject}setUserData(e){this.userDataSubject.next(e)}static \u0275fac=function(t){return new(t||r)};static \u0275prov=Be({token:r,factory:r.\u0275fac,providedIn:"root"})};function Ue(r,e){if(!!!r)throw new Error(e)}function Bi(r){return typeof r=="object"&&r!==null}function Ui(r,e){if(!!!r)throw new Error(e??"Unexpected invariant triggered.")}var As=/\r\n|[\n\r]/g;function ze(r,e){let t=0,i=1;for(let n of r.body.matchAll(As)){if(typeof n.index=="number"||Ui(!1),n.index>=e)break;t=n.index+n[0].length,i+=1}return{line:i,column:e+1-t}}function Tr(r){return $t(r.source,ze(r.source,r.start))}function $t(r,e){let t=r.locationOffset.column-1,i="".padStart(t)+r.body,n=e.line-1,s=r.locationOffset.line-1,o=e.line+s,a=e.line===1?t:0,c=e.column+a,l=`${r.name}:${o}:${c}
2`,h=i.split(/\r\n|[\n\r]/g),u=h[n];if(u.length>120){let f=Math.floor(c/80),m=c%80,p=[];for(let x=0;x<u.length;x+=80)p.push(u.slice(x,x+80));return l+zi([[`${o} |`,p[0]],...p.slice(1,f+1).map(x=>["|",x]),["|","^".padStart(m)],["|",p[f+1]]])}return l+zi([[`${o-1} |`,h[n-1]],[`${o} |`,u],["|","^".padStart(c)],[`${o+1} |`,h[n+1]]])}function zi(r){let e=r.filter(([i,n])=>n!==void 0),t=Math.max(...e.map(([i])=>i.length));return e.map(([i,n])=>i.padStart(t)+(n?" "+n:"")).join(`
3`)}function Rs(r){let e=r[0];return e==null||"kind"in e||"length"in e?{nodes:e,source:r[1],positions:r[2],path:r[3],originalError:r[4],extensions:r[5]}:e}var Kt=class r extends Error{constructor(e,...t){var i,n,s;let{nodes:o,source:a,positions:c,path:l,originalError:h,extensions:u}=Rs(t);super(e),this.name="GraphQLError",this.path=l??void 0,this.originalError=h??void 0,this.nodes=Wi(Array.isArray(o)?o:o?[o]:void 0);let f=Wi((i=this.nodes)===null||i===void 0?void 0:i.map(p=>p.loc).filter(p=>p!=null));this.source=a??(f==null||(n=f[0])===null||n===void 0?void 0:n.source),this.positions=c??f?.map(p=>p.start),this.locations=c&&a?c.map(p=>ze(a,p)):f?.map(p=>ze(p.source,p.start));let m=Bi(h?.extensions)?h?.extensions:void 0;this.extensions=(s=u??m)!==null&&s!==void 0?s: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}}),h!=null&&h.stack?Object.defineProperty(this,"stack",{value:h.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,r):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let e=this.message;if(this.nodes)for(let t of this.nodes)t.loc&&(e+=`
4
5`+Tr(t.loc));else if(this.source&&this.locations)for(let t of this.locations)e+=`
6
7`+$t(this.source,t);return e}toJSON(){let e={message:this.message};return this.locations!=null&&(e.locations=this.locations),this.path!=null&&(e.path=this.path),this.extensions!=null&&Object.keys(this.extensions).length>0&&(e.extensions=this.extensions),e}};function Wi(r){return r===void 0||r.length===0?void 0:r}function P(r,e,t){return new Kt(`Syntax Error: ${t}`,{source:r,positions:[e]})}var We=class{constructor(e,t,i){this.start=e.start,this.end=t.end,this.startToken=e,this.endToken=t,this.source=i}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}},De=class{constructor(e,t,i,n,s,o){this.kind=e,this.start=t,this.end=i,this.line=n,this.column=s,this.value=o,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}}},kr={Name:[],Document:["definitions"],OperationDefinition:["description","name","variableDefinitions","directives","selectionSet"],VariableDefinition:["description","variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["description","name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],Float
7Value:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","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"]},Ms=new Set(Object.keys(kr));function Dr(r){let e=r?.kind;return typeof e=="string"&&Ms.has(e)}var G=(function(r){return r.QUERY="query",r.MUTATION="mutation",r.SUBSCRIPTION="subscription",r})(G||{});var Ht=(function(r){return r.QUERY="QUERY",r.MUTATION="MUTATION",r.SUBSCRIPTION="SUBSCRIPTION",r.FIELD="FIELD",r.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",r.FRAGMENT_SPREAD="FRAGMENT_SPREAD",r.INLINE_FRAGMENT="INLINE_FRAGMENT",r.VARIABLE_DEFINITION="VARIABLE_DEFINITION",r.SCHEMA="SCHEMA",r.SCALAR="SCALAR",r.OBJECT="OBJECT",r.FIELD_DEFINITION="FIELD_DEFINITION",r.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",r.INTERFACE="INTERFACE",r.UNION="UNION",r.ENUM="ENUM",r.ENUM_VALUE="ENUM_VALUE",r.INPUT_OBJECT="INPUT_OBJECT",r.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION",r})(Ht||{});var b=(function(r){return r.NAME="Name",r.DOCUMENT="Document",r.OPERATION_DEFINITION="OperationDefinition",r.VARIABLE_DEFINITION="VariableDefinition",r.SELECTION_SET="SelectionSet",r.FIELD="Field",r.ARGUMENT="Argument",r.FRAGMENT_SPREAD="FragmentSpread",r.INLINE_FRAGMENT="InlineFragment",r.FRAGMENT_DEFINITION="FragmentDefinition",r.VARIABLE="Variable",r.INT="IntValue",r.FLOAT="FloatValue",r.STRING="StringValue",r.BOOLEAN="BooleanValue",r.NULL="NullValue",r.ENUM="EnumValue",r.LIST="ListValue",r.OBJECT="ObjectValue",r.OBJECT_FIELD="ObjectField",r.DIRECTIVE="Directive",r.NAMED_TYPE="NamedType",r.LIST_TYPE="ListType",r.NON_NULL_TYPE="NonNullType",r.SCHEMA_DEFINITION="SchemaDefinition",r.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",r.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",r.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",r.FIELD_DEFINITION="FieldDefinition",r.INPUT_VALUE_DEFINITION="InputValueDefinition",r.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",r.UNION_TYPE_DEFINITION="UnionTypeDefinition",r.ENUM_TYPE_DEFINITION="EnumTypeDefinition",r.ENUM_VALUE_DEFINITION="EnumValueDefinition",r.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",r.DIRECTIVE_DEFINITION="DirectiveDefinition",r.SCHEMA_EXTENSION="SchemaExtension",r.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",r.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",r.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",r.UNION_TYPE_EXTENSION="UnionTypeExtension",r.ENUM_TYPE_EXTENSION="EnumTypeExtension",r.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension",r.TYPE_COORDINATE="TypeCoordinate",r.MEMBER_COORDINATE="MemberCoordinate",r.ARGUMENT_COORDINATE="ArgumentCoordinate",r.DIRECTIVE_COORDINATE="DirectiveCoordinate",r.DIRECTIVE_ARGUMENT_COORDINATE="DirectiveArgumentCoordinate",r})(b||{});function Yt(r){return r===9||r===32}function Ge(r){return r>=48&&r<=57}function Gi(r){return r>=97&&r<=122||r>=65&&r<=90}function Nr(r){return Gi(r)||r===95}function $i(r){return Gi(r)||Ge(r)||r===95}function Ki(r){var e;let t=Number.MAX_SAFE_INTEGER,i=null,n=-1;for(let o=0;o<r.length;++o){var s;let a=r[o],c=Ls(a);c!==a.length&&(i=(s=i)!==null&&s!==void 0?s:o,n=o,o!==0&&c<t&&(t=c))}return r.map((o,a)=>a===0?o:o.slice(t)).slice((e=i)!==null&&e!==void 0?e:0,n+1)}function Ls(r){let e=0;for(;e<r.length&&Yt(r.charCodeAt(e));)++e;return e}function Hi(r,e){let t=r.replace(/"""/g,'\\"""'),i=t.split(/\r\n|[\n\r]/g),n=i.length===1,s=i.length>1&&i.slice(1).every(m=>m.length===0||Yt(m.charCodeAt(0))),o=t.endsWith('\\"""'),a=r.endsWith('"')&&!o,c=r.endsWith("\\"),l=a||c,h=!(e!=null&&e.minimize)&&(!n||r.length>70||l||s||o),u="",f=n&&Yt(r.charCodeAt(0));
7return(h&&!f||s)&&(u+=`
8`),u+=t,(h||l)&&(u+=`
9`),'"""'+u+'"""'}var y=(function(r){return r.SOF="<SOF>",r.EOF="<EOF>",r.BANG="!",r.DOLLAR="$",r.AMP="&",r.PAREN_L="(",r.PAREN_R=")",r.DOT=".",r.SPREAD="...",r.COLON=":",r.EQUALS="=",r.AT="@",r.BRACKET_L="[",r.BRACKET_R="]",r.BRACE_L="{",r.PIPE="|",r.BRACE_R="}",r.NAME="Name",r.INT="Int",r.FLOAT="Float",r.STRING="String",r.BLOCK_STRING="BlockString",r.COMMENT="Comment",r})(y||{});var vt=class{constructor(e){let t=new De(y.SOF,0,0,0,0);this.source=e,this.lastToken=t,this.token=t,this.line=1,this.lineStart=0}get[Symbol.toStringTag](){return"Lexer"}advance(){return this.lastToken=this.token,this.token=this.lookahead()}lookahead(){let e=this.token;if(e.kind!==y.EOF)do if(e.next)e=e.next;else{let t=Ps(this,e.end);e.next=t,t.prev=e,e=t}while(e.kind===y.COMMENT);return e}};function Ji(r){return r===y.BANG||r===y.DOLLAR||r===y.AMP||r===y.PAREN_L||r===y.PAREN_R||r===y.DOT||r===y.SPREAD||r===y.COLON||r===y.EQUALS||r===y.AT||r===y.BRACKET_L||r===y.BRACKET_R||r===y.BRACE_L||r===y.PIPE||r===y.BRACE_R}function $e(r){return r>=0&&r<=55295||r>=57344&&r<=1114111}function Jt(r,e){return Xi(r.charCodeAt(e))&&Zi(r.charCodeAt(e+1))}function Xi(r){return r>=55296&&r<=56319}function Zi(r){return r>=56320&&r<=57343}function Ne(r,e){let t=r.source.body.codePointAt(e);if(t===void 0)return y.EOF;if(t>=32&&t<=126){let i=String.fromCodePoint(t);return i==='"'?`'"'`:`"${i}"`}return"U+"+t.toString(16).toUpperCase().padStart(4,"0")}function V(r,e,t,i,n){let s=r.line,o=1+t-r.lineStart;return new De(e,t,i,s,o,n)}function Ps(r,e){let t=r.source.body,i=t.length,n=e;for(;n<i;){let s=t.charCodeAt(n);switch(s){case 65279:case 9:case 32:case 44:++n;continue;case 10:++n,++r.line,r.lineStart=n;continue;case 13:t.charCodeAt(n+1)===10?n+=2:++n,++r.line,r.lineStart=n;continue;case 35:return Vs(r,n);case 33:return V(r,y.BANG,n,n+1);case 36:return V(r,y.DOLLAR,n,n+1);case 38:return V(r,y.AMP,n,n+1);case 40:return V(r,y.PAREN_L,n,n+1);case 41:return V(r,y.PAREN_R,n,n+1);case 46:if(t.charCodeAt(n+1)===46&&t.charCodeAt(n+2)===46)return V(r,y.SPREAD,n,n+3);break;case 58:return V(r,y.COLON,n,n+1);case 61:return V(r,y.EQUALS,n,n+1);case 64:return V(r,y.AT,n,n+1);case 91:return V(r,y.BRACKET_L,n,n+1);case 93:return V(r,y.BRACKET_R,n,n+1);case 123:return V(r,y.BRACE_L,n,n+1);case 124:return V(r,y.PIPE,n,n+1);case 125:return V(r,y.BRACE_R,n,n+1);case 34:return t.charCodeAt(n+1)===34&&t.charCodeAt(n+2)===34?zs(r,n):qs(r,n)}if(Ge(s)||s===45)return js(r,n,s);if(Nr(s))return Ws(r,n);throw P(r.source,n,s===39?`Unexpected single quote character ('), did you mean to use a double quote (")?`:$e(s)||Jt(t,n)?`Unexpected character: ${Ne(r,n)}.`:`Invalid character: ${Ne(r,n)}.`)}return V(r,y.EOF,i,i)}function Vs(r,e){let t=r.source.body,i=t.length,n=e+1;for(;n<i;){let s=t.charCodeAt(n);if(s===10||s===13)break;if($e(s))++n;else if(Jt(t,n))n+=2;else break}return V(r,y.COMMENT,e,n,t.slice(e+1,n))}function js(r,e,t){let i=r.source.body,n=e,s=t,o=!1;if(s===45&&(s=i.charCodeAt(++n)),s===48){if(s=i.charCodeAt(++n),Ge(s))throw P(r.source,n,`Invalid number, unexpected digit after 0: ${Ne(r,n)}.`)}else n=wr(r,n,s),s=i.charCodeAt(n);if(s===46&&(o=!0,s=i.charCodeAt(++n),n=wr(r,n,s),s=i.charCodeAt(n)),(s===69||s===101)&&(o=!0,s=i.charCodeAt(++n),(s===43||s===45)&&(s=i.charCodeAt(++n)),n=wr(r,n,s),s=i.charCodeAt(n)),s===46||Nr(s))throw P(r.source,n,`Invalid number, expected digit but got: ${Ne(r,n)}.`);return V(r,o?y.FLOAT:y.INT,e,n,i.slice(e,n))}function wr(r,e,t){if(!Ge(t))throw P(r.source,e,`Invalid number, expected digit but got: ${Ne(r,e)}.`);let i=r.source.body,n=e+1;for(;Ge(i.charCodeAt(n));)++n;return n}function qs(r,e){let t=r.source.body,i=t.length,n=e+1,s=n,o="";for(;n<i;){let a=t.charCodeAt(n);if(a===34)return o+=t.slice(s,n),V(r,y.STRING,e,n+1,o);if(a===92){o+=t.slice(s,n);let c=t.charCodeAt(n+1)===117?t.charCodeAt(n+2)===123?Qs(r,n):Bs(r,n):Us(r,n);o+=c.value,n+=c.size,s=n;continue}if(a===10||a===13)break;if($e(a))++n;else if(Jt(t,n))n+=2;else throw P(r.source,n,`Invalid character within String: ${Ne(r,n)}.`)}throw P(r.source,n,"Unterminated string.")}function Qs(r,e){let t=r.source.body,i=0,n=3;for(;n<12;){let s=t.charCodeAt(e+n++);if(s===125){if(n<5||!$e(i))break;return{value:String.fromCodePoint(i),size:n}}if(i=i<<4|bt(s),i<0)break}throw P(r.source,e,`Invalid Unicode escape sequence: "${t.slice(e,e+n)}".`)}function Bs(r,e){let t=r.source.body,i=Yi(t,e+2);if($e(i))return{value:String.fromCodePoint(i),size:6};if(Xi(i)&&t.charCodeAt(e+6)===92&&t.charCodeAt(e+7)===117){let n=Yi(t,e+8);if(Zi(n))return{value:String.fromCodePoint(i,n),size:12}}throw P(r.source,e,`Invalid Unicode escape sequence: "${t.slice(e,e+6)}".`)}function Yi(r,e){return bt(r.charCodeAt(e))<<12|bt(r.charCodeAt(e+1))<<8|bt(r.charCodeAt(e+2))<<4|bt(r.charCodeAt(e+3))}function bt(r){return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:-1}function Us(r,e){let t=r.source.body;switch(t.charCodeAt(e+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:`
10`,size:2};case 114:return{value:"\r",size:2};case 116:return{value:"	",size:2}}throw P(r.source,e,`Invalid character escape sequence: "${t.slice(e,e+2)}".`)}function zs(r,e){let t=r.source.body,i=t.length,n=r.lineStart,s=e+3,o=s,a="",c=[];for(;s<i;){let l=t.charCodeAt(s);if(l===34&&t.charCodeAt(s+1)===34&&t.charCodeAt(s+2)===34){a+=t.slice(o,s),c.push(a);let h=V(r,y.BLOCK_STRING,e,s+3,Ki(c).join(`
11`));return r.line+=c.length-1,r.lineStart=n,h}if(l===92&&t.charCodeAt(s+1)===34&&t.charCodeAt(s+2)===34&&t.charCodeAt(s+3)===34){a+=t.slice(o,s),o=s+1,s+=4;continue}if(l===10||l===13){a+=t.slice(o,s),c.push(a),l===13&&t.charCodeAt(s+1)===10?s+=2:++s,a="",o=s,n=s;continue}if($e(l))++s;else if(Jt(t,s))s+=2;else throw P(r.source,s,`Invalid character within String: ${Ne(r,s)}.`)}throw P(r.source,s,"Unterminated string.")}function Ws(r,e){let t=r.source.body,i=t.length,n=e+1;for(;n<i;){let s=t.charCodeAt(n);if($i(s))++n;else break}return V(r,y.NAME,e,n,t.slice(e,n))}function Ke(r){return Xt(r,[])}function Xt(r,e){switch(typeof r){case"string":return JSON.stringify(r);case"function":return r.name?`[function ${r.name}]`:"[function]";case"object":return Gs(r,e);default:return String(r)}}function Gs(r,e){if(r===null)return"null";if(e.includes(r))return"[Circular]";let t=[...e,r];if($s(r)){let i=r.toJSON();if(i!==r)return typeof i=="string"?i:Xt(i,t)}else if(Array.isArray(r))return Hs(r,t);return Ks(r,t)}function $s(r){return typeof r.toJSON=="function"}function Ks(r,e){let t=Object.entries(r);return t.length===0?"{}":e.length>2?"["+Ys(r)+"]":"{ "+t.map(([n,s])=>n+": "+Xt(s,e)).join(", ")+" }"}function Hs(r,e){if(r.length===0)return"[]";if(e.length>2)return"[Array]";let t=Math.min(10,r.length),i=r.length-t,n=[];for(let s=0;s<t;++s)n.push(Xt(r[s],e));return i===1?n.push("... 1 more item"):i>1&&n.push(`... ${i} more items`),"["+n.join(", ")+"]"}function Ys(r){let e=Object.prototype.toString.call(r).replace(/^\[object /,"").replace(/]$/,"");
11if(e==="Object"&&typeof r.constructor=="function"){let t=r.constructor.name;if(typeof t=="string"&&t!=="")return t}return e}var Js=globalThis.process&&!0,en=Js?function(e,t){return e instanceof t}:function(e,t){if(e instanceof t)return!0;if(typeof e=="object"&&e!==null){var i;let n=t.prototype[Symbol.toStringTag],s=Symbol.toStringTag in e?e[Symbol.toStringTag]:(i=e.constructor)===null||i===void 0?void 0:i.name;if(n===s){let o=Ke(e);throw new Error(`Cannot use ${n} "${o}" from another module or realm.
12
13Ensure that there is only one instance of "graphql" in the node_modules
14directory. If different versions of "graphql" are the dependencies of other
15relied on modules, use "resolutions" to ensure only one version is installed.
16
17https://yarnpkg.com/en/docs/selective-version-resolutions
18
19Duplicate "graphql" modules cannot be used at the same time since different
20versions may have different capabilities and behavior. The data from one
21version used in the function from another could produce confusing and
22spurious results.`)}}return!1};var He=class{constructor(e,t="GraphQL request",i={line:1,column:1}){typeof e=="string"||Ue(!1,`Body must be a string. Received: ${Ke(e)}.`),this.body=e,this.name=t,this.locationOffset=i,this.locationOffset.line>0||Ue(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||Ue(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}};function tn(r){return en(r,He)}function er(r,e){let t=new Ir(r,e),i=t.parseDocument();return Object.defineProperty(i,"tokenCount",{enumerable:!1,value:t.tokenCount}),i}var Ir=class{constructor(e,t={}){let s=t,{lexer:i}=s,n=B(s,["lexer"]);if(i)this._lexer=i;else{let o=tn(e)?e:new He(e);this._lexer=new vt(o)}this._options=n,this._tokenCounter=0}get tokenCount(){return this._tokenCounter}parseName(){let e=this.expectToken(y.NAME);return this.node(e,{kind:b.NAME,value:e.value})}parseDocument(){return this.node(this._lexer.token,{kind:b.DOCUMENT,definitions:this.many(y.SOF,this.parseDefinition,y.EOF)})}parseDefinition(){if(this.peek(y.BRACE_L))return this.parseOperationDefinition();let e=this.peekDescription(),t=e?this._lexer.lookahead():this._lexer.token;if(e&&t.kind===y.BRACE_L)throw P(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are not supported on shorthand queries.");if(t.kind===y.NAME){switch(t.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(t.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition()}if(e)throw P(this._lexer.source,this._lexer.token.start,"Unexpected description, only GraphQL definitions support descriptions.");switch(t.value){case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(t)}parseOperationDefinition(){let e=this._lexer.token;if(this.peek(y.BRACE_L))return this.node(e,{kind:b.OPERATION_DEFINITION,operation:G.QUERY,description:void 0,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});let t=this.parseDescription(),i=this.parseOperationType(),n;return this.peek(y.NAME)&&(n=this.parseName()),this.node(e,{kind:b.OPERATION_DEFINITION,operation:i,description:t,name:n,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){let e=this.expectToken(y.NAME);switch(e.value){case"query":return G.QUERY;case"mutation":return G.MUTATION;case"subscription":return G.SUBSCRIPTION}throw this.unexpected(e)}parseVariableDefinitions(){return this.optionalMany(y.PAREN_L,this.parseVariableDefinition,y.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:b.VARIABLE_DEFINITION,description:this.parseDescription(),variable:this.parseVariable(),type:(this.expectToken(y.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(y.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){let e=this._lexer.token;return this.expectToken(y.DOLLAR),this.node(e,{kind:b.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:b.SELECTION_SET,selections:this.many(y.BRACE_L,this.parseSelection,y.BRACE_R)})}parseSelection(){return this.peek(y.SPREAD)?this.parseFragment():this.parseField()}parseField(){let e=this._lexer.token,t=this.parseName(),i,n;return this.expectOptionalToken(y.COLON)?(i=t,n=this.parseName()):n=t,this.node(e,{kind:b.FIELD,alias:i,name:n,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(y.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(e){let t=e?this.parseConstArgument:this.parseArgument;return this.optionalMany(y.PAREN_L,t,y.PAREN_R)}parseArgument(e=!1){let t=this._lexer.token,i=this.parseName();return this.expectToken(y.COLON),this.node(t,{kind:b.ARGUMENT,name:i,value:this.parseValueLiteral(e)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){let e=this._lexer.token;this.expectToken(y.SPREAD);let t=this.expectOptionalKeyword("on");return!t&&this.peek(y.NAME)?this.node(e,{kind:b.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(e,{kind:b.INLINE_FRAGMENT,typeCondition:t?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){let e=this._lexer.token,t=this.parseDescription();return this.expectKeyword("fragment"),this._options.allowLegacyFragmentVariables===!0?this.node(e,{kind:b.FRAGMENT_DEFINITION,description:t,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(e,{kind:b.FRAGMENT_DEFINITION,description:t,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if(this._lexer.token.value==="on")throw this.unexpected();return this.parseName()}parseValueLiteral(e){let t=this._lexer.token;switch(t.kind){case y.BRACKET_L:return this.parseList(e);case y.BRACE_L:return this.parseObject(e);case y.INT:return this.advanceLexer(),this.node(t,{kind:b.INT,value:t.value});case y.FLOAT:return this.advanceLexer(),this.node(t,{kind:b.FLOAT,value:t.value});case y.STRING:case y.BLOCK_STRING:return this.parseStringLiteral();case y.NAME:switch(this.advanceLexer(),t.value){case"true":return this.node(t,{kind:b.BOOLEAN,value:!0});case"false":return this.node(t,{kind:b.BOOLEAN,value:!1});case"null":return this.node(t,{kind:b.NULL});default:return this.node(t,{kind:b.ENUM,value:t.value})}case y.DOLLAR:if(e)if(this.expectToken(y.DOLLAR),this._lexer.token.kind===y.NAME){let i=this._lexer.token.value;throw P(this._lexer.source,t.start,`Unexpected variable "$${i}" in constant value.`)}else throw this.unexpected(t);return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){let e=this._lexer.token;return this.advanceLexer(),this.node(e,{kind:b.STRING,value:e.value,block:e.kind===y.BLOCK_STRING})}parseList(e){let t=()=>this.parseValueLiteral(e);return this.node(this._lexer.token,{kind:b.LIST,values:this.any(y.BRACKET_L,t,y.BRACKET_R)})}parseObject(e){let t=()=>this.parseObjectField(e);return this.node(this._lexer.token,{kind:b.OBJECT,fields:this.any(y.BRACE_L,t,y.BRACE_R)})}parseObjectField(e){let t=this._lexer.token,i=this.parseName();return this.expectToken(y.COLON),this.node(t,{kind:b.OBJECT_FIELD,name:i,value:this.parseValueLiteral(e)})}parseDirectives(e){let t=[];for(;this.peek(y.AT);)t.push(this.parseDirective(e));return t}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(e){let t=this._lexer.token;return this.expectToken(y.AT),this.node(t,{kind:b.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(e)})}parseTypeReference(){let e=this._lexer.token,t;if(this.expectOptionalToken(y.BRACKET_L)){let i=this.parseTypeReference();this.expectToken(y.BRACKET_R),t=this.node(e,{kind:b.LIST_TYPE,type:i})}else t=this.parseNamedType();return this.expectOptionalToken(y.BANG)?this.node(e,{kind:b.NON_NULL_TYPE,type:t}):t}parseNamedType(){return this.node(this._lexer.token,{kind:b.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(y.STRING)||this.peek(y.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword("schema");let i=this.parseConstDirectives(),n=this.many(y.BRACE_L,this.parseOperationTypeDefinition,y.BRACE_R);return this.node(e,{kind:b.SCHEMA_DEFINITION,description:t,directives:i,operationTypes:n})}parseOperationTypeDefinition(){let e=this._lexer.token,t=this.parseOperationType();this.expectToken(y.COLON);let i=this.parseNamedType();return this.node(e,{kind:b.OPERATION_TYPE_DEFINITION,operation:t,type:i})}parseScalarTypeDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword("scalar");let i=this.parseName(),n=this.parseConstDirectives();return this.node(e,{kind:b.SCALAR_TYPE_DEFINITION,description:t,name:i,directives:n})}parseObjectTypeDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword("type");let i=this.parseName(),n=this.parseImplementsInterfaces(),s=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(e,{kind:b.OBJECT_TYPE_DEFINITION,description:t,name:i,interfaces:n,directives:s,fields:o})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(y.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(y.BRACE_L,this.parseFieldDefinition,y.BRACE_R)}parseFieldDefinition(){let e=this._lexer.token,t=this.parseDescription(),i=this.parseName(),n=this.parseArgumentDefs();this.expectToken(y.COLON);let s=this.parseTypeReference(),o=this.parseConstDirectives();return this.node(e,{kind:b.FIELD_DEFINITION,description:t,name:i,arguments:n,type:s,directives:o})}parseArgumentDefs(){return this.optionalMany(y.PAREN_L,this.parseInputValueDef,y.PAREN_R)}parseInputValueDef(){let e=this._lexer.token,t=this.parseDescription(),i=this.parseName();this.expectToken(y.COLON);let n=this.parseTypeReference(),s;this.expectOptionalToken(y.EQUALS)&&(s=this.parseConstValueLiteral());let o=this.parseConstDirectives();return this.node(e,{kind:b.INPUT_VALUE_DEFINITION,description:t,name:i,type:n,defaultValue:s,directives:o})}parseInterfaceTypeDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword("interface");let i=this.parseName(),n=this.parseImplementsInterfaces(),s=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(e,{kind:b.INTERFACE_TYPE_DEFINITION,description:t,name:i,interfaces:n,directives:s,fields:o})}parseUnionTypeDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword("union");let i=this.parseName(),n=this.parseConstDirectives(),s=this.parseUnionMemberTypes();return this.node(e,{kind:b.UNION_TYPE_DEFINITION,description:t,name:i,directives:n,types:s})}parseUnionMemberTypes(){return this.expectOptionalToken(y.EQUALS)?this.delimitedMany(y.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword("enum");let i=this.parseName(),n=this.parseConstDirectives(),s=this.parseEnumValuesDefinition();return this.node(e,{kind:b.ENUM_TYPE_DEFINITION,description:t,name:i,directives:n,values:s})}parseEnumValuesDefinition(){return this.optionalMany(y.BRACE_L,this.parseEnumValueDefinition,y.BRACE_R)}parseEnumValueDefinition(){let e=this._lexer.token,t=this.parseDescription(),i=this.parseEnumValueName(),n=this.parseConstDirectives();return this.node(e,{kind:b.ENUM_VALUE_DEFINITION,description:t,name:i,directives:n})}parseEnumValueName(){if(this._lexer.token.value==="true"||this._lexer.token.value==="false"||this._lexer.token.value==="null")throw P(this._lexer.source,this._lexer.token.start,`${Zt(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword("input");let i=this.parseName(),n=this.parseConstDirectives(),s=this.parseInputFieldsDefinition();return this.node(e,{kind:b.INPUT_OBJECT_TYPE_DEFINITION,description:t,name:i,directives:n,fields:s})}parseInputFieldsDefinition(){return this.optionalMany(y.BRACE_L,this.parseInputValueDef,y.BRACE_R)}parseTypeSystemExtension(){let e=this._lexer.lookahead();if(e.kind===y.NAME)switch(e.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(e)}parseSchemaExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");let t=this.parseConstDirectives(),i=this.optionalMany(y.BRACE_L,this.parseOperationTypeDefinition,y.BRACE_R);if(t.length===0&&i.length===0)throw this.unexpected();return this.node(e,{kind:b.SCHEMA_EXTENSION,directives:t,operationTypes:i})}parseScalarTypeExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");let t=this.parseName(),i=this.parseConstDirectives();if(i.length===0)throw this.unexpected();return this.node(e,{kind:b.SCALAR_TYPE_EXTENSION,name:t,directives:i})}parseObjectTypeExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");let t=this.parseName(),i=this.parseImplementsInterfaces(),n=this.parseConstDirectives(),s=this.parseFieldsDefinition();if(i.length===0&&n.length===0&&s.length===0)throw this.unexpected();return this.node(e,{kind:b.OBJECT_TYPE_EXTENSION,name:t,interfaces:i,directives:n,fields:s})}parseInterfaceTypeExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");let t=this.parseName(),i=this.parseImplementsInterfaces(),n=this.parseConstDirectives(),s=this.parseFieldsDefinition();if(i.length===0&&n.length===0&&s.length===0)throw this.unexpected();return this.node(e,{kind:b.INTERFACE_TYPE_EXTENSION,name:t,interfaces:i,directives:n,fields:s})}parseUnionTypeExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");let t=this.parseName(),i=this.parseConstDirectives(),n=this.parseUnionMemberTypes();if(i.length===0&&n.length===0)throw this.unexpected();return this.node(e,{kind:b.UNION_TYPE_EXTENSION,name:t,directives:i,types:n})}parseEnumTypeExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");let t=this.parseName(),i=this.parseConstDirectives(),n=this.parseEnumValuesDefinition();if(i.length===0&&n.length===0)throw this.unexpected();return this.node(e,{kind:b.ENUM_TYPE_EXTENSION,name:t,directives:i,values:n})}parseInputObjectTypeExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");let t=this.parseName(),i=this.parseConstDirectives(),n=this.parseInputFieldsDefinition();if(i.length===0&&n.length===0)throw this.unexpected();return this.node(e,{kind:b.INPUT_OBJECT_TYPE_EXTENSION,name:t,directives:i,fields:n})}parseDirectiveDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword("directive"),this.expectToken(y.AT);let i=this.parseName(),n=this.parseArgumentDefs(),s=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");let o=this.parseDirectiveLocations();return this.node(e,{kind:b.DIRECTIVE_DEFINITION,description:t,name:i,arguments:n,repeatable:s,locations:o})}parseDirectiveLocations(){
22return this.delimitedMany(y.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){let e=this._lexer.token,t=this.parseName();if(Object.prototype.hasOwnProperty.call(Ht,t.value))return t;throw this.unexpected(e)}parseSchemaCoordinate(){let e=this._lexer.token,t=this.expectOptionalToken(y.AT),i=this.parseName(),n;!t&&this.expectOptionalToken(y.DOT)&&(n=this.parseName());let s;return(t||n)&&this.expectOptionalToken(y.PAREN_L)&&(s=this.parseName(),this.expectToken(y.COLON),this.expectToken(y.PAREN_R)),t?s?this.node(e,{kind:b.DIRECTIVE_ARGUMENT_COORDINATE,name:i,argumentName:s}):this.node(e,{kind:b.DIRECTIVE_COORDINATE,name:i}):n?s?this.node(e,{kind:b.ARGUMENT_COORDINATE,name:i,fieldName:n,argumentName:s}):this.node(e,{kind:b.MEMBER_COORDINATE,name:i,memberName:n}):this.node(e,{kind:b.TYPE_COORDINATE,name:i})}node(e,t){return this._options.noLocation!==!0&&(t.loc=new We(e,this._lexer.lastToken,this._lexer.source)),t}peek(e){return this._lexer.token.kind===e}expectToken(e){let t=this._lexer.token;if(t.kind===e)return this.advanceLexer(),t;throw P(this._lexer.source,t.start,`Expected ${rn(e)}, found ${Zt(t)}.`)}expectOptionalToken(e){return this._lexer.token.kind===e?(this.advanceLexer(),!0):!1}expectKeyword(e){let t=this._lexer.token;if(t.kind===y.NAME&&t.value===e)this.advanceLexer();else throw P(this._lexer.source,t.start,`Expected "${e}", found ${Zt(t)}.`)}expectOptionalKeyword(e){let t=this._lexer.token;return t.kind===y.NAME&&t.value===e?(this.advanceLexer(),!0):!1}unexpected(e){let t=e??this._lexer.token;return P(this._lexer.source,t.start,`Unexpected ${Zt(t)}.`)}any(e,t,i){this.expectToken(e);let n=[];for(;!this.expectOptionalToken(i);)n.push(t.call(this));return n}optionalMany(e,t,i){if(this.expectOptionalToken(e)){let n=[];do n.push(t.call(this));while(!this.expectOptionalToken(i));return n}return[]}many(e,t,i){this.expectToken(e);let n=[];do n.push(t.call(this));while(!this.expectOptionalToken(i));return n}delimitedMany(e,t){this.expectOptionalToken(e);let i=[];do i.push(t.call(this));while(this.expectOptionalToken(e));return i}advanceLexer(){let{maxTokens:e}=this._options,t=this._lexer.advance();if(t.kind!==y.EOF&&(++this._tokenCounter,e!==void 0&&this._tokenCounter>e))throw P(this._lexer.source,t.start,`Document contains more that ${e} tokens. Parsing aborted.`)}};function Zt(r){let e=r.value;return rn(r.kind)+(e!=null?` "${e}"`:"")}function rn(r){return Ji(r)?`"${r}"`:r}function nn(r){return`"${r.replace(Xs,Zs)}"`}var Xs=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function Zs(r){return eo[r.charCodeAt(0)]}var eo=["\\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"];var ue=Object.freeze({});function j(r,e,t=kr){let i=new Map;for(let E of Object.values(b))i.set(E,Fr(e,E));let n,s=Array.isArray(r),o=[r],a=-1,c=[],l=r,h,u,f=[],m=[];do{a++;let E=a===o.length,S=E&&c.length!==0;if(E){if(h=m.length===0?void 0:f[f.length-1],l=u,u=m.pop(),S)if(s){l=l.slice();let A=0;for(let[N,Z]of c){let qe=N-A;Z===null?(l.splice(qe,1),A++):l[qe]=Z}}else{l=d({},l);for(let[A,N]of c)l[A]=N}a=n.index,o=n.keys,c=n.edits,s=n.inArray,n=n.prev}else if(u){if(h=s?a:o[a],l=u[h],l==null)continue;f.push(h)}let D;if(!Array.isArray(l)){var p,x;Dr(l)||Ue(!1,`Invalid AST Node: ${Ke(l)}.`);let A=E?(p=i.get(l.kind))===null||p===void 0?void 0:p.leave:(x=i.get(l.kind))===null||x===void 0?void 0:x.enter;if(D=A?.call(e,l,h,u,f,m),D===ue)break;
22if(D===!1){if(!E){f.pop();continue}}else if(D!==void 0&&(c.push([h,D]),!E))if(Dr(D))l=D;else{f.pop();continue}}if(D===void 0&&S&&c.push([h,l]),E)f.pop();else{var g;n={inArray:s,index:a,keys:o,edits:c,prev:n},s=Array.isArray(l),o=s?l:(g=t[l.kind])!==null&&g!==void 0?g:[],a=-1,c=[],u&&m.push(u),u=l}}while(n!==void 0);return c.length!==0?c[c.length-1][1]:r}function Fr(r,e){let t=r[e];return typeof t=="object"?t:typeof t=="function"?{enter:t,leave:void 0}:{enter:r.enter,leave:r.leave}}function rr(r){return j(r,ro)}var to=80,ro={Name:{leave:r=>r.value},Variable:{leave:r=>"$"+r.name},Document:{leave:r=>T(r.definitions,`
23
24`)},OperationDefinition:{leave(r){let e=Cr(r.variableDefinitions)?w(`(
25`,T(r.variableDefinitions,`
26`),`
27)`):w("(",T(r.variableDefinitions,", "),")"),t=w("",r.description,`
28`)+T([r.operation,T([r.name,e]),T(r.directives," ")]," ");return(t==="query"?"":t+" ")+r.selectionSet}},VariableDefinition:{leave:({variable:r,type:e,defaultValue:t,directives:i,description:n})=>w("",n,`
29`)+r+": "+e+w(" = ",t)+w(" ",T(i," "))},SelectionSet:{leave:({selections:r})=>re(r)},Field:{leave({alias:r,name:e,arguments:t,directives:i,selectionSet:n}){let s=w("",r,": ")+e,o=s+w("(",T(t,", "),")");return o.length>to&&(o=s+w(`(
30`,tr(T(t,`
31`)),`
32)`)),T([o,T(i," "),n]," ")}},Argument:{leave:({name:r,value:e})=>r+": "+e},FragmentSpread:{leave:({name:r,directives:e})=>"..."+r+w(" ",T(e," "))},InlineFragment:{leave:({typeCondition:r,directives:e,selectionSet:t})=>T(["...",w("on ",r),T(e," "),t]," ")},FragmentDefinition:{leave:({name:r,typeCondition:e,variableDefinitions:t,directives:i,selectionSet:n,description:s})=>w("",s,`
33`)+`fragment ${r}${w("(",T(t,", "),")")} on ${e} ${w("",T(i," ")," ")}`+n},IntValue:{leave:({value:r})=>r},FloatValue:{leave:({value:r})=>r},StringValue:{leave:({value:r,block:e})=>e?Hi(r):nn(r)},BooleanValue:{leave:({value:r})=>r?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:r})=>r},ListValue:{leave:({values:r})=>"["+T(r,", ")+"]"},ObjectValue:{leave:({fields:r})=>"{"+T(r,", ")+"}"},ObjectField:{leave:({name:r,value:e})=>r+": "+e},Directive:{leave:({name:r,arguments:e})=>"@"+r+w("(",T(e,", "),")")},NamedType:{leave:({name:r})=>r},ListType:{leave:({type:r})=>"["+r+"]"},NonNullType:{leave:({type:r})=>r+"!"},SchemaDefinition:{leave:({description:r,directives:e,operationTypes:t})=>w("",r,`
34`)+T(["schema",T(e," "),re(t)]," ")},OperationTypeDefinition:{leave:({operation:r,type:e})=>r+": "+e},ScalarTypeDefinition:{leave:({description:r,name:e,directives:t})=>w("",r,`
35`)+T(["scalar",e,T(t," ")]," ")},ObjectTypeDefinition:{leave:({description:r,name:e,interfaces:t,directives:i,fields:n})=>w("",r,`
36`)+T(["type",e,w("implements ",T(t," & ")),T(i," "),re(n)]," ")},FieldDefinition:{leave:({description:r,name:e,arguments:t,type:i,directives:n})=>w("",r,`
37`)+e+(Cr(t)?w(`(
38`,tr(T(t,`
39`)),`
40)`):w("(",T(t,", "),")"))+": "+i+w(" ",T(n," "))},InputValueDefinition:{leave:({description:r,name:e,type:t,defaultValue:i,directives:n})=>w("",r,`
41`)+T([e+": "+t,w("= ",i),T(n," ")]," ")},InterfaceTypeDefinition:{leave:({description:r,name:e,interfaces:t,directives:i,fields:n})=>w("",r,`
42`)+T(["interface",e,w("implements ",T(t," & ")),T(i," "),re(n)]," ")},UnionTypeDefinition:{leave:({description:r,name:e,directives:t,types:i})=>w("",r,`
43`)+T(["union",e,T(t," "),w("= ",T(i," | "))]," ")},EnumTypeDefinition:{leave:({description:r,name:e,directives:t,values:i})=>w("",r,`
44`)+T(["enum",e,T(t," "),re(i)]," ")},EnumValueDefinition:{leave:({description:r,name:e,directives:t})=>w("",r,`
45`)+T([e,T(t," ")]," ")},InputObjectTypeDefinition:{leave:({description:r,name:e,directives:t,fields:i})=>w("",r,`
46`)+T(["input",e,T(t," "),re(i)]," ")},DirectiveDefinition:{leave:({description:r,name:e,arguments:t,repeatable:i,locations:n})=>w("",r,`
47`)+"directive @"+e+(Cr(t)?w(`(
48`,tr(T(t,`
49`)),`
50)`):w("(",T(t,", "),")"))+(i?" repeatable":"")+" on "+T(n," | ")},SchemaExtension:{leave:({directives:r,operationTypes:e})=>
50T(["extend schema",T(r," "),re(e)]," ")},ScalarTypeExtension:{leave:({name:r,directives:e})=>T(["extend scalar",r,T(e," ")]," ")},ObjectTypeExtension:{leave:({name:r,interfaces:e,directives:t,fields:i})=>T(["extend type",r,w("implements ",T(e," & ")),T(t," "),re(i)]," ")},InterfaceTypeExtension:{leave:({name:r,interfaces:e,directives:t,fields:i})=>T(["extend interface",r,w("implements ",T(e," & ")),T(t," "),re(i)]," ")},UnionTypeExtension:{leave:({name:r,directives:e,types:t})=>T(["extend union",r,T(e," "),w("= ",T(t," | "))]," ")},EnumTypeExtension:{leave:({name:r,directives:e,values:t})=>T(["extend enum",r,T(e," "),re(t)]," ")},InputObjectTypeExtension:{leave:({name:r,directives:e,fields:t})=>T(["extend input",r,T(e," "),re(t)]," ")},TypeCoordinate:{leave:({name:r})=>r},MemberCoordinate:{leave:({name:r,memberName:e})=>T([r,w(".",e)])},ArgumentCoordinate:{leave:({name:r,fieldName:e,argumentName:t})=>T([r,w(".",e),w("(",t,":)")])},DirectiveCoordinate:{leave:({name:r})=>T(["@",r])},DirectiveArgumentCoordinate:{leave:({name:r,argumentName:e})=>T(["@",r,w("(",e,":)")])}};function T(r,e=""){var t;return(t=r?.filter(i=>i).join(e))!==null&&t!==void 0?t:""}function re(r){return w(`{
51`,tr(T(r,`
52`)),`
53}`)}function w(r,e,t=""){return e!=null&&e!==""?r+e+t:""}function tr(r){return w("  ",r.replace(/\n/g,`
54  `))}function Cr(r){var e;return(e=r?.some(t=>t.includes(`
55`)))!==null&&e!==void 0?e:!1}function we(r){try{return r()}catch{}}var Ye=we(()=>globalThis)||we(()=>window)||we(()=>self)||we(()=>global)||we(function(){return we.constructor("return this")()});var Et="4.0.9";var sn=new Map;function xt(r){let e=sn.get(r)||1;return sn.set(r,e+1),`${r}:${e}:${Math.random().toString(36).slice(2)}`}function Ot(r,e=0){let t=xt("stringifyForDisplay");return JSON.stringify(r,(i,n)=>n===void 0?t:n,e).split(JSON.stringify(t)).join("<undefined>")}var on="Invariant Violation",_r=class r extends Error{constructor(e=on){super(e),this.name=on,Object.setPrototypeOf(this,r.prototype)}},cn=["debug","log","warn","error","silent"],lo=cn.indexOf("silent");function v(r,...e){if(!r)throw M(...e)}function ir(r){return function(e,...t){if(cn.indexOf(r)>=lo){let i=console[r]||console.log;if(typeof e=="number"){let n=e;e=ln(n),e||(e=un(n,t),t=[])}i(e,...t)}}}v.debug=ir("debug");v.log=ir("log");v.warn=ir("warn");v.error=ir("error");function M(r,...e){return new _r(ln(r,e)||un(r,e))}var an=Symbol.for("ApolloErrorMessageHandler_"+Et);function Ar(r){if(typeof r=="string")return r;try{return Ot(r,2).slice(0,1e3)}catch{return"<non-serializable>"}}function ln(r,e=[]){if(r)return Ye[an]&&Ye[an](r,e.map(Ar))}function un(r,e=[]){if(r)return typeof r=="string"?e.reduce((t,i)=>t.replace(/%[sdfo]/,Ar(i)),r):`An error occurred! For more details, see the full error text at https://go.apollo.dev/c/err#${encodeURIComponent(JSON.stringify({version:Et,message:r,args:e.map(Ar)}))}`}function fe(r,e,t,i){if(t.kind===b.INT||t.kind===b.FLOAT)r[e.value]=Number(t.value);else if(t.kind===b.BOOLEAN||t.kind===b.STRING)r[e.value]=t.value;else if(t.kind===b.OBJECT){let n={};t.fields.map(s=>fe(n,s.name,s.value,i)),r[e.value]=n}else if(t.kind===b.VARIABLE){let n=(i||{})[t.name.value];r[e.value]=n}else if(t.kind===b.LIST)r[e.value]=t.values.map(n=>{let s={};return fe(s,e,n,i),s[e.value]});else if(t.kind===b.ENUM)r[e.value]=t.value;else if(t.kind===b.NULL)r[e.value]=null;else throw M(19,e.value,t.kind)}function Ie(r,e){if(r.arguments&&r.arguments.length){let t={};return r.arguments.forEach(({name:i,value:n})=>fe(t,i,n,e)),t}return null}function uo(){}var ge=class{constructor(e=1/0,t=uo){this.max=e,this.dispose=t,this.map=new Map,this.newest=null,this.oldest=null}has(e){return this.map.has(e)}get(e){let t=this.getNode(e);return t&&t.value}get size(){return this.map.size}getNode(e){let t=this.map.get(e);if(t&&t!==this.newest){let{older:i,newer:n}=t;n&&(n.older=i),i&&(i.newer=n),t.older=this.newest,t.older.newer=t,t.newer=null,this.newest=t,t===this.oldest&&(this.oldest=n)}return t}set(e,t){let i=this.getNode(e);return i?i.value=t:(i={key:e,value:t,newer:null,older:this.newest},this.newest&&(this.newest.newer=i),this.newest=i,this.oldest=this.oldest||i,this.map.set(e,i),i.value)}clean(){for(;this.oldest&&this.map.size>this.max;)this.delete(this.oldest.key)}delete(e){let t=this.map.get(e);return 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.map.delete(e),this.dispose(t.value,e),!0):!1}};function Rr(){}var fo=Rr,ho=typeof WeakRef<"u"?WeakRef:function(r){return{deref:()=>r}},po=typeof WeakMap<"u"?WeakMap:Map,mo=typeof FinalizationRegistry<"u"?FinalizationRegistry:function(){return{register:Rr,unregister:Rr}},yo=10024,J=class{constructor(e=1/0,t=fo){this.max=e,this.dispose=t,this.map=new po,this.newest=null,this.oldest=null,this.unfinalizedNodes=new Set,this.finalizationScheduled=!1,this.size=0,this.finalize=()=>{let i=this.unfinalizedNodes.values();for(let n=0;n<yo;n++){let s=i.next().value;if(!s)break;this.unfinalizedNodes.delete(s);let o=s.key;delete s.key,s.keyRef=new ho(o),this.registry.register(o,s,s)}this.unfinalizedNodes.size>0?queueMicrotask(this.finalize):this.finalizationScheduled=!1},this.registry=new mo(this.deleteNode.bind(this))}has(e){return this.map.has(e)}get(e){let t=this.getNode(e);return t&&t.value}getNode(e){let t=this.map.get(e);if(t&&t!==this.newest){let{older:i,newer:n}=t;n&&(n.older=i),i&&(i.newer=n),t.older=this.newest,t.older.newer=t,t.newer=null,this.newest=t,t===this.oldest&&(this.oldest=n)}return t}set(e,t){let i=this.getNode(e);return i?i.value=t:(i={key:e,value:t,newer:null,older:this.newest},this.newest&&(this.newest.newer=i),this.newest=i,this.oldest=this.oldest||i,this.scheduleFinalization(i),this.map.set(e,i),this.size++,i.value)}clean(){for(;this.oldest&&this.size>this.max;)this.deleteNode(this.oldest)}deleteNode(e){e===this.newest&&(this.newest=e.older),e===this.oldest&&(this.oldest=e.newer),e.newer&&(e.newer.older=e.older),e.older&&(e.older.newer=e.newer),this.size--;let t=e.key||e.keyRef&&e.keyRef.deref();this.dispose(e.value,t),e.keyRef?this.registry.unregister(e):this.unfinalizedNodes.delete(e),t&&this.map.delete(t)}delete(e){let t=this.map.get(e);return t?(this.deleteNode(t),!0):!1}scheduleFinalization(e){this.unfinalizedNodes.add(e),this.finalizationScheduled||(this.finalizationScheduled=!0,queueMicrotask(this.finalize))}};var go=()=>Object.create(null),{forEach:bo,slice:fn}=Array.prototype,{hasOwnProperty:vo}
55=Object.prototype,H=class r{constructor(e=!0,t=go){this.weakness=e,this.makeData=t}lookup(){return this.lookupArray(arguments)}lookupArray(e){let t=this;return bo.call(e,i=>t=t.getChildTrie(i)),vo.call(t,"data")?t.data:t.data=this.makeData(fn.call(e))}peek(){return this.peekArray(arguments)}peekArray(e){let t=this;for(let i=0,n=e.length;t&&i<n;++i){let s=t.mapFor(e[i],!1);t=s&&s.get(e[i])}return t&&t.data}remove(){return this.removeArray(arguments)}removeArray(e){let t;if(e.length){let i=e[0],n=this.mapFor(i,!1),s=n&&n.get(i);s&&(t=s.removeArray(fn.call(e,1)),!s.data&&!s.weak&&!(s.strong&&s.strong.size)&&n.delete(i))}else t=this.data,delete this.data;return t}getChildTrie(e){let t=this.mapFor(e,!0),i=t.get(e);return i||t.set(e,i=new r(this.weakness,this.makeData)),i}mapFor(e,t){return this.weakness&&Eo(e)?this.weak||(t?this.weak=new WeakMap:void 0):this.strong||(t?this.strong=new Map:void 0)}};function Eo(r){switch(typeof r){case"object":if(r===null)break;case"function":return!0}return!1}var U=null,hn={},xo=1,Oo=()=>class{constructor(){this.id=["slot",xo++,Date.now(),Math.random().toString(36).slice(2)].join(":")}hasValue(){for(let e=U;e;e=e.parent)if(this.id in e.slots){let t=e.slots[this.id];if(t===hn)break;return e!==U&&(U.slots[this.id]=t),!0}return U&&(U.slots[this.id]=hn),!1}getValue(){if(this.hasValue())return U.slots[this.id]}withValue(e,t,i,n){let s={__proto__:null,[this.id]:e},o=U;U={parent:o,slots:s};try{return t.apply(n,i)}finally{U=o}}static bind(e){let t=U;return function(){let i=U;try{return U=t,e.apply(this,arguments)}finally{U=i}}}static noContext(e,t,i){if(U){let n=U;try{return U=null,e.apply(i,t)}finally{U=n}}else return e.apply(i,t)}};function pn(r){try{return r()}catch{}}var Mr="@wry/context:Slot",So=pn(()=>globalThis)||pn(()=>global)||Object.create(null),mn=So,he=mn[Mr]||Array[Mr]||(function(r){try{Object.defineProperty(mn,Mr,{value:r,enumerable:!1,writable:!1,configurable:!0})}finally{return r}})(Oo());var{bind:dn,noContext:yn}=he;var Fe=new he;var{hasOwnProperty:gn}=Object.prototype,St=Array.from||function(r){let e=[];return r.forEach(t=>e.push(t)),e};function Je(r){let{unsubscribe:e}=r;typeof e=="function"&&(r.unsubscribe=void 0,e())}var Tt=[],Do=100;function Xe(r,e){if(!r)throw new Error(e||"assertion failure")}function vn(r,e){let t=r.length;return t>0&&t===e.length&&r[t-1]===e[t-1]}function En(r){switch(r.length){case 0:throw new Error("unknown value");case 1:return r[0];case 2:throw r[1]}}function xn(r){return r.slice(0)}var On=(()=>{class r{constructor(t){this.fn=t,this.parents=new Set,this.childValues=new Map,this.dirtyChildren=null,this.dirty=!0,this.recomputing=!1,this.value=[],this.deps=null,++r.count}peek(){if(this.value.length===1&&!be(this))return bn(this),this.value[0]}recompute(t){return Xe(!this.recomputing,"already recomputing"),bn(this),be(this)?No(this,t):En(this.value)}setDirty(){this.dirty||(this.dirty=!0,Sn(this),Je(this))}dispose(){this.setDirty(),wn(this),Lr(this,(t,i)=>{t.setDirty(),In(t,this)})}forget(){this.dispose()}dependOn(t){t.add(this),this.deps||(this.deps=Tt.pop()||new Set),this.deps.add(t)}forgetDeps(){this.deps&&(St(this.deps).forEach(t=>t.delete(this)),this.deps.clear(),Tt.push(this.deps),this.deps=null)}}return r.count=0,r})();function bn(r){let e=Fe.getValue();if(e)return r.parents.add(e),e.childValues.has(r)||e.childValues.set(r,[]),be(r)?kn(e,r):Dn(e,r),e}function No(r,e){return wn(r),Fe.withValue(r,wo,[r,e]),Fo(r,e)&&Io(r),En(r.value)}function wo(r,e){r.recomputing=!0;let{normalizeResult:t}=r,i;t&&r.value.length===1&&(i=xn(r.value)),r.value.length=0;try{if(r.value[0]=r.fn.apply(null,e),t&&i&&!vn(i,r.value))try{r.value[0]=t(r.value[0],i[0])}catch{}}catch(n){r.value[1]=n}r.recomputing=!1}function be(r){return r.dirty||!!(r.dirtyChildren&&r.dirtyChildren.size)}function Io(r){r.dirty=!1,!be(r)&&Tn(r)}function Sn(r){Lr(r,kn)}function Tn(r){Lr(r,Dn)}function Lr(r,e){let t=r.parents.size;if(t){let i=St(r.parents);for(let n=0;n<t;++n)e(i[n],r)}}function kn(r,e){Xe(r.childValues.has(e)),Xe(be(e));let t=!be(r);if(!r.dirtyChildren)r.dirtyChildren=Tt.pop()||new Set;else if(r.dirtyChildren.has(e))return;r.dirtyChildren.add(e),t&&Sn(r)}function Dn(r,e){Xe(r.childValues.has(e)),Xe(!be(e));let t=r.childValues.get(e);t.length===0?r.childValues.set(e,xn(e.value)):vn(t,e.value)||r.setDirty(),Nn(r,e),!be(r)&&Tn(r)}function Nn(r,e){let t=r.dirtyChildren;t&&(t.delete(e),t.size===0&&(Tt.length<Do&&Tt.push(t),r.dirtyChildren=null))}function wn(r){r.childValues.size>
550&&r.childValues.forEach((e,t)=>{In(r,t)}),r.forgetDeps(),Xe(r.dirtyChildren===null)}function In(r,e){e.parents.delete(r),r.childValues.delete(e),Nn(r,e)}function Fo(r,e){if(typeof r.subscribe=="function")try{Je(r),r.unsubscribe=r.subscribe.apply(null,e)}catch{return r.setDirty(),!1}return!0}var Co={setDirty:!0,dispose:!0,forget:!0};function kt(r){let e=new Map,t=r&&r.subscribe;function i(n){let s=Fe.getValue();if(s){let o=e.get(n);o||e.set(n,o=new Set),s.dependOn(o),typeof t=="function"&&(Je(o),o.unsubscribe=t(n))}}return i.dirty=function(s,o){let a=e.get(s);if(a){let c=o&&gn.call(Co,o)?o:"setDirty";St(a).forEach(l=>l[c]()),e.delete(s),Je(a)}},i}var Fn;function _o(...r){return(Fn||(Fn=new H(typeof WeakMap=="function"))).lookupArray(r)}var Pr=new Set;function ie(r,{max:e=Math.pow(2,16),keyArgs:t,makeCacheKey:i=_o,normalizeResult:n,subscribe:s,cache:o=ge}=Object.create(null)){let a=typeof o=="function"?new o(e,f=>f.dispose()):o,c=function(){let f=i.apply(null,t?t.apply(null,arguments):arguments);if(f===void 0)return r.apply(null,arguments);let m=a.get(f);m||(a.set(f,m=new On(r)),m.normalizeResult=n,m.subscribe=s,m.forget=()=>a.delete(f));let p=m.recompute(Array.prototype.slice.call(arguments));return a.set(f,m),Pr.add(a),Fe.hasValue()||(Pr.forEach(x=>x.clean()),Pr.clear()),p};Object.defineProperty(c,"size",{get:()=>a.size,configurable:!1,enumerable:!1}),Object.freeze(c.options={max:e,keyArgs:t,makeCacheKey:i,normalizeResult:n,subscribe:s,cache:a});function l(f){let m=f&&a.get(f);m&&m.setDirty()}c.dirtyKey=l,c.dirty=function(){l(i.apply(null,arguments))};function h(f){let m=f&&a.get(f);if(m)return m.peek()}c.peekKey=h,c.peek=function(){return h(i.apply(null,arguments))};function u(f){return f?a.delete(f):!1}return c.forgetKey=u,c.forget=function(){return u(i.apply(null,arguments))},c.makeCacheKey=i,c.getKey=t?function(){return i.apply(null,t.apply(null,arguments))}:i,Object.freeze(c)}var Ao=Symbol.for("apollo.cacheSize"),q=d({},Ye[Ao]);function Q(r,e){return r.definitions.find(t=>t.kind==="OperationDefinition"&&!!t.name)?.name.value??e}var $=ie((r,e)=>{v(r&&r.kind==="Document",1);let t=r.definitions.filter(i=>i.kind==="OperationDefinition");!1,e&&v(t.length==1&&t[0].operation===e,4,e,e,t[0].operation),j(r,{Field(i,n,s,o){if(i.alias&&(i.alias.value==="__typename"||i.alias.value.startsWith("__ac_"))&&i.alias.value!==i.name.value){let a=r,c=[];for(let l of o)a=a[l],a.kind===b.FIELD&&c.push(a.alias?.value||a.name.value);throw c.splice(-1,1,i.name.value),M(5,i.alias.value,c.join("."),t[0].operation,Q(r,"(anonymous)"))}}})},{max:q.checkDocument||2e3,cache:J});var{toString:Ro}=Object.prototype;function jr(r){return Vr(r)}function Vr(r,e){switch(Ro.call(r)){case"[object Array]":{if(e=e||new Map,e.has(r))return e.get(r);let t=r.slice(0);return e.set(r,t),t.forEach(function(i,n){t[n]=Vr(i,e)}),t}case"[object Object]":{if(e=e||new Map,e.has(r))return e.get(r);let t=Object.create(Object.getPrototypeOf(r));return e.set(r,t),Object.keys(r).forEach(i=>{t[i]=Vr(r[i],e)}),t}default:return r}}function X(...r){let e={};return r.forEach(t=>{t&&Object.keys(t).forEach(i=>{let n=t[i];n!==void 0&&(e[i]=n)})}),e}function ne(r=[]){let e={};return r.forEach(t=>{e[t.name.value]=t}),e}function R(r){return r!==null&&typeof r=="object"}var{hasOwnProperty:Mo}=Object.prototype,Lo=function(r,e,t){return this.merge(r[t],e[t])},K=class{reconciler;constructor(e=Lo){this.reconciler=e}merge(e,t,...i){return R(t)&&R(e)?(Object.keys(t).forEach(n=>{if(Mo.call(e,n)){let s=e[n];if(t[n]!==s){let o=this.reconciler(e,t,n,...i);o!==s&&(e=this.shallowCopyForMerge(e),e[n]=o)}}else e=this.shallowCopyForMerge(e),e[n]=t[n]}),e):t}isObject=R;pastCopies=new Set;shallowCopyForMerge(e){return R(e)&&(this.pastCopies.has(e)||(Array.isArray(e)?e=e.slice(0):e=d({__proto__:Object.getPrototypeOf(e)},e),this.pastCopies.add(e))),e}};function Ce(r){let e={},t=r&&r.variableDefinitions;return t&&t.length&&t.forEach(i=>{i.defaultValue&&fe(e,i.variable.name,i.defaultValue)}),e}function ve(r,e){switch(r.kind){case"InlineFragment":return r;case"FragmentSpread":{let t=r.name.value;if(typeof e=="function")return e(t);let i=e&&e[t];return v(i,9,t),i||null}default:return null}}function qr(r,e){let t=e,i=[];return r.definitions.forEach(s=>{if(s.kind==="OperationDefinition")throw M(10,s.operation,s.name?` named '${s.name.value}'`:"");s.kind==="FragmentDefinition"&&i.push(s)}),typeof t>"u"&&(v(i.length===1,11,i.length),t=i[0].name.value),O(d({},r),{definitions:[{kind:"OperationDefinition",operation:"query",selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:t}}]}},...r.definitions]})}function Dt(r){v(r.kind==="Document",6),v(r.definitions.length<=1,7);let e=r.definitions[0];return v(e.kind==="FragmentDefinition",8),e}function se(r){return r.definitions.filter(e=>e.kind==="FragmentDefinition")}function Ze(r){$(r);let e;for(let t of r.definitions){if(t.kind==="OperationDefinition")return t;t.kind==="FragmentDefinition"&&!e&&(e=t)}if(e)return e;throw M(12)}function z(r){return $(r),r.definitions.filter(e=>e.kind==="OperationDefinition")[0]}function Nt(r){let e=z(r);return v(e&&e.operation==="query",13),e}var Qr=new WeakSet;function Cn(r){r.size<=(r.max||-1)||Qr.has(r)||(Qr.add(r),setTimeout(()=>{r.clean(),Qr.delete(r)},100))}var wt=function(r,e){let t=new J(r,e);return t.set=function(i,n){let s=J.prototype.set.call(this,i,n);return Cn(this),s},t},Br=function(r,e){let t=new ge(r,e);return t.set=function(i,n){let s=ge.prototype.set.call(this,i,n);return Cn(this),s},t};var Po={};function It(r,e){Po[r]=e}var W=Object.assign(function(e){return JSON.stringify(e,Vo)},{reset(){et=new Br(q.canonicalStringify||1e3)}});!1;var et;W.reset();function Vo(r,e){if(e&&typeof e=="object"){let t=Object.getPrototypeOf(e);if(t===Object.prototype||t===null){let i=Object.keys(e);if(i.every(jo))return e;let n=JSON.stringify(i),s=et.get(n);if(!s){i.sort();let a=JSON.stringify(i);s=et.get(a)||i,et.set(n,s),et.set(a,s)}let o=Object.create(t);
55return s.forEach(a=>{o[a]=e[a]}),o}}return e}function jo(r,e,t){return e===0||t[e-1]<=r}var qo=["connection","include","skip","client","rest","export","nonreactive"],Ft=W,Ct=Object.assign(function(r,e,t){if(e&&t&&t.connection&&t.connection.key){if(t.connection.filter&&t.connection.filter.length>0){let n=t.connection.filter?t.connection.filter:[];n.sort();let s={};n.forEach(a=>{s[a]=e[a]});let o=Ft(s);if(o!=="{}")return`${t.connection.key}(${o})`}return t.connection.key}let i=r;if(e){let n=Ft(e);n!=="{}"&&(i+=`(${n})`)}return t&&Object.keys(t).forEach(n=>{qo.indexOf(n)===-1&&(t[n]&&Object.keys(t[n]).length?i+=`@${n}(${Ft(t[n])})`:i+=`@${n}`)}),i},{setStringify(r){let e=Ft;return Ft=r,e}});function pe(r){return!!r.errors?.length}function Ee(r,e,t){let i=new Set(r),n=i.size;return j(e,{Directive(s){if(i.delete(s.name.value)&&(!t||!i.size))return ue}}),t?!i.size:i.size<n}function Ur(r){let e=!1;return j(r,{Directive:{enter(t){if(t.name.value==="client"&&t.arguments&&(e=t.arguments.some(i=>i.name.value==="always"&&i.value.kind==="BooleanValue"&&i.value.value===!0),e))return ue}}}),e}var C=Array.isArray;function zr(r){return R(r)&&r.kind==="Document"&&Array.isArray(r.definitions)}function ae(r){return r.kind==="Field"}function _e(r){return Array.isArray(r)&&r.length>0}function ce(r){return{__ref:String(r)}}function _n(r){let e=new Set([r]);return e.forEach(t=>{R(t)&&Qo(t)===t&&Object.getOwnPropertyNames(t).forEach(i=>{R(t[i])&&e.add(t[i])})}),r}function Qo(r){if(!1)try{Object.freeze(r)}catch(e){if(e instanceof TypeError)return null;throw e}return r}function xe(r){return!1,r}function Wr(r){let e=r[0]||{},t=r.length;if(t>1){let i=new K;for(let n=1;n<t;++n)e=i.merge(e,r[n])}return e}function _t(r,e){return X(r,e,e.variables&&{variables:X(d(d({},r&&r.variables),e.variables))})}function Gr(r){return r.catch(()=>{}),r}function $r(r,e){$(e);let t=An(""),i=An(""),n=g=>{for(let E=0,S;E<g.length&&(S=g[E]);++E)if(!C(S)){if(S.kind===b.OPERATION_DEFINITION)return t(S.name&&S.name.value);if(S.kind===b.FRAGMENT_DEFINITION)return i(S.name.value)}return v.error(14),null},s=0;for(let g=e.definitions.length-1;g>=0;--g)e.definitions[g].kind===b.OPERATION_DEFINITION&&++s;let o=Bo(r),a=g=>_e(g)&&g.map(o).some(E=>E&&E.remove),c=new Map,l=!1,h={enter(g){if(a(g.directives))return l=!0,null}},u=j(e,{Field:h,InlineFragment:h,VariableDefinition:{enter(){return!1}},Variable:{enter(g,E,S,D,A){let N=n(A);N&&N.variables.add(g.name.value)}},FragmentSpread:{enter(g,E,S,D,A){if(a(g.directives))return l=!0,null;let N=n(A);N&&N.fragmentSpreads.add(g.name.value)}},FragmentDefinition:{enter(g,E,S,D){c.set(JSON.stringify(D),g)},leave(g,E,S,D){let A=c.get(JSON.stringify(D));if(g===A)return g;if(s>0&&g.selectionSet.selections.every(N=>N.kind===b.FIELD&&N.name.value==="__typename"))return i(g.name.value).removed=!0,l=!0,null}},Directive:{leave(g){if(o(g))return l=!0,null}}});if(!l)return e;let f=g=>(g.transitiveVars||(g.transitiveVars=new Set(g.variables),g.removed||g.fragmentSpreads.forEach(E=>{f(i(E)).transitiveVars.forEach(S=>{g.transitiveVars.add(S)})})),g),m=new Set;u.definitions.forEach(g=>{g.kind===b.OPERATION_DEFINITION?f(t(g.name&&g.name.value)).fragmentSpreads.forEach(E=>{m.add(E)}):g.kind===b.FRAGMENT_DEFINITION&&s===0&&!i(g.name.value).removed&&m.add(g.name.value)}),m.forEach(g=>{f(i(g)).fragmentSpreads.forEach(E=>{m.add(E)})});let p=g=>!!(!m.has(g)||i(g).removed),x={enter(g){if(p(g.name.value))return null}};return Uo(j(u,{FragmentSpread:x,FragmentDefinition:x,OperationDefinition:{leave(g){if(g.variableDefinitions){let E=f(t(g.
55name&&g.name.value)).transitiveVars;if(E.size<g.variableDefinitions.length)return O(d({},g),{variableDefinitions:g.variableDefinitions.filter(S=>E.has(S.variable.name.value))})}}}}))}function An(r){let e=new Map;return function(i=r){let n=e.get(i);return n||e.set(i,n={variables:new Set,fragmentSpreads:new Set}),n}}function Bo(r){let e=new Map,t=new Map;return r.forEach(i=>{i&&(i.name?e.set(i.name,i):i.test&&t.set(i.test,i))}),i=>{let n=e.get(i.name.value);return!n&&t.size&&t.forEach((s,o)=>{o(i)&&(n=s)}),n}}function Rn(r,e){return!r||r.selectionSet.selections.every(t=>t.kind===b.FRAGMENT_SPREAD&&Rn(e[t.name.value],e))}function Uo(r){return Rn(z(r)||Dt(r),ne(se(r)))?null:r}function Kr(r){return j(r,{FragmentSpread(e){if(!e.directives?.some(({name:t})=>t.value==="unmask"))return null}})}function Y(r){return r.alias?r.alias.value:r.name.value}function me({directives:r},e){return!r||!r.length?!0:Wo(r).every(({directive:t,ifArgument:i})=>{let n=!1;return i.value.kind==="Variable"?(n=e&&e[i.value.name.value],v(n!==void 0,15,t.name.value)):n=i.value.value,t.name.value==="skip"?!n:n})}function zo({name:{value:r}}){return r==="skip"||r==="include"}function Wo(r){let e=[];return r&&r.length&&r.forEach(t=>{if(!zo(t))return;let i=t.arguments,n=t.name.value;v(i&&i.length===1,16,n);let s=i[0];v(s.name&&s.name.value==="if",17,n);let o=s.value;v(o&&(o.kind==="Variable"||o.kind==="BooleanValue"),18,n),e.push({directive:t,ifArgument:s})}),e}function Hr(r,e){let t=null;r.directives&&(t={},r.directives.forEach(n=>{t[n.name.value]={},n.arguments&&n.arguments.forEach(({name:s,value:o})=>fe(t[n.name.value],s,o,e))}));let i=null;return r.arguments&&r.arguments.length&&(i={},r.arguments.forEach(({name:n,value:s})=>fe(i,n,s,e))),Ct(r.name.value,i,t)}function Ae(r){let e={data:r.data};return r.error&&(e.error=r.error),e}function tt(r,e=()=>{}){return t=>new ee(i=>{let n=e();return t.subscribe({next(s){let o;try{o=r(s,n)}catch(a){i.error(a)}o!==void 0&&i.next(o)},error(s){i.error(s)},complete(){i.complete()}})})}var{toString:Mn,hasOwnProperty:Go}=Object.prototype,Ln=Function.prototype.toString,Yr=new Map;function _(r,e){try{return Jr(r,e)}finally{Yr.clear()}}function Jr(r,e){if(r===e)return!0;let t=Mn.call(r),i=Mn.call(e);if(t!==i)return!1;switch(t){case"[object Array]":if(r.length!==e.length)return!1;case"[object Object]":{if(Vn(r,e))return!0;let n=Pn(r),s=Pn(e),o=n.length;if(o!==s.length)return!1;for(let a=0;a<o;++a)if(!Go.call(e,n[a]))return!1;for(let a=0;a<o;++a){let c=n[a];if(!Jr(r[c],e[c]))return!1}return!0}case"[object Error]":return r.name===e.name&&r.message===e.message;case"[object Number]":if(r!==r)return e!==e;case"[object Boolean]":case"[object Date]":return+r==+e;case"[object RegExp]":case"[object String]":return r==`${e}`;case"[object Map]":case"[object Set]":{if(r.size!==e.size)return!1;if(Vn(r,e))return!0;let n=r.entries(),s=t==="[object Map]";for(;;){let o=n.next();if(o.done)break;let[a,c]=o.value;if(!e.has(a)||s&&!Jr(c,e.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]":r=new Uint8Array(r),e=new Uint8Array(e);case"[object DataView]":{let n=r.byteLength;if(n===e.byteLength)for(;n--&&r[n]===e[n];);return n===-1}case"[object AsyncFunction]":case"[object GeneratorFunction]":case"[object AsyncGeneratorFunction]":case"[object Function]":{let n=Ln.call(r);return n!==Ln.call(e)?!1:!Ho(n,Ko)}}return!1}function Pn(r){return Object.keys(r).filter($o,r)}function $o(r){return this[r]!==void 0}var Ko="{ [native code] }";function Ho(r,e){let t=r.length-e.length;return t>=0&&r.indexOf(e,t)===t}function Vn(r,e){let t=Yr.get(r);if(t){if(t.has(e))return!0}else Yr.set(r,t=new Set);return t.add(e),!1}function At(r,o,c,s){var a=o,{data:e}=a,t=B(a,["data"]);var l=c,{data:i}=l,n=B(l,["data"]);return _(t,n)&&nr(Ze(r).selectionSet,e,i,{fragmentMap:ne(se(r)),variables:s})}function nr(r,e,t,i){if(e===t)return!0;let n=new Set;return r.selections.every(s=>{if(n.has(s)||(n.add(s),!me(s,i.variables))||jn(s))return!0;
55if(ae(s)){let o=Y(s),a=e&&e[o],c=t&&t[o],l=s.selectionSet;if(!l)return _(a,c);let h=Array.isArray(a),u=Array.isArray(c);if(h!==u)return!1;if(h&&u){let f=a.length;if(c.length!==f)return!1;for(let m=0;m<f;++m)if(!nr(l,a[m],c[m],i))return!1;return!0}return nr(l,a,c,i)}else{let o=ve(s,i.fragmentMap);if(o)return jn(o)?!0:nr(o.selectionSet,e,t,i)}})}function jn(r){return!!r.directives&&r.directives.some(Yo)}function Yo(r){return r.name.value==="nonreactive"}function Xr(){throw new Error("only supported in development mode")}var qn=Xr,Qn=Xr,Bn=Xr;var Rt=class{isIncrementalResult(e){return!1}prepareRequest(e){return v(!Ee(["defer"],e.query),64),e}extractErrors(){}startRequest=void 0};function Zr(r,{client:e}){let t={query:r.query,variables:r.variables||{},extensions:r.extensions||{},operationName:Q(r.query),operationType:z(r.query).operation},i=d({},r.context),n=o=>{typeof o=="function"?i=d(d({},i),o(s())):i=d(d({},i),o)},s=()=>Object.freeze(d({},i));return Object.defineProperty(t,"setContext",{enumerable:!1,value:n}),Object.defineProperty(t,"getContext",{enumerable:!1,value:s}),Object.defineProperty(t,"client",{enumerable:!1,value:e}),t}var rt=class r{static empty(){return new r(()=>mt)}static from(e){if(e.length===0)return r.empty();let[t,...i]=e;return t.concat(...i)}static split(e,t,i=new r((n,s)=>s(n))){let n=new r((s,o)=>{let a=e(s);return!1,a?t.request(s,o):i.request(s,o)});return Object.assign(n,{left:t,right:i})}static execute(e,t,i){return e.request(Zr(t,i),()=>(!1,mt))}static concat(...e){return r.from(e)}constructor(e){e&&(this.request=e)}split(e,t,i){return this.concat(r.split(e,t,i))}concat(...e){return e.length===0?this:e.reduce(this.combine.bind(this),this)}combine(e,t){let i=new r((n,s)=>e.request(n,o=>t.request(o,s)));return Object.assign(i,{left:e,right:t})}request(e,t){throw M(63)}left;right};var Re=rt.execute;function Jo(r){return r}var de=class r{transform;cached;resultCache=new WeakSet;getCacheKey(e){return[e]}static identity(){return new r(Jo,{cache:!1})}static split(e,t,i=r.identity()){return Object.assign(new r(n=>(e(n)?t:i).transformDocument(n),{cache:!1}),{left:t,right:i})}constructor(e,t={}){this.transform=e,t.getCacheKey&&(this.getCacheKey=t.getCacheKey),this.cached=t.cache!==!1,this.resetCache()}resetCache(){if(this.cached){let e=new H;this.performWork=ie(r.prototype.performWork.bind(this),{makeCacheKey:t=>{let i=this.getCacheKey(t);if(i)return v(Array.isArray(i),20),e.lookupArray(i)},max:q["documentTransform.cache"],cache:J})}}performWork(e){return $(e),this.transform(e)}transformDocument(e){if(this.resultCache.has(e))return e;let t=this.performWork(e);return this.resultCache.add(t),t}concat(e){return Object.assign(new r(t=>e.transformDocument(this.transformDocument(t)),{cache:!1}),{left:this,right:e})}left;right};var Mt,Oe=Object.assign(r=>{let e=Mt.get(r);return e||(e=rr(r),Mt.set(r,e)),e},{reset(){Mt=new wt(q.print||2e3)}});Oe.reset();!1;function F(r){return!!(r&&typeof r=="object"&&typeof r.__ref=="string")}var Un={kind:b.FIELD,name:{kind:b.NAME,value:"__typename"}},Me=Object.assign(function(r){return j(r,{SelectionSet:{enter(e,t,i){if(i&&i.kind===b.OPERATION_DEFINITION)return;let{selections:n}=e;if(!n||n.some(a=>a.kind===b.FIELD&&(a.name.value==="__typename"||a.name.value.lastIndexOf("__",0)===0)))return;let o=i;if(!(o.kind===b.FIELD&&o.directives&&o.directives.some(a=>a.name.value==="export")))return O(d({},e),{selections:[...n,Un]})}}})},{added(r){return r===Un}});function zn(r){return r===7||r===8}function it(r){return!zn(r)}var nt=class{assumeImmutableResults=!1;lookupFragment(e){return null}batch(e){let t=typeof e.optimistic=="string"?e.optimistic:e.optimistic===!1?null:void 0,i;return this.performTransaction(()=>i=e.update(this),t),i}recordOptimisticTransaction(e,t){this.performTransaction(e,t)}transformDocument(e){return e}transformForLink(e){return e}identify(e){}gc(){return[]}modify(e){return!1}readQuery(e,t=!!e.optimistic){return this.read(O(d({},e),{rootId:e.id||"ROOT_QUERY",optimistic:t}))}watchFragment(e){let u=e,{fragment:t,fragmentName:i,from:n,optimistic:s=!0}=u,o=B(u,["fragment","fragmentName","from","optimistic"]),a=this.getFragmentDoc(t,i),c=typeof n>"u"||typeof n=="string"?n:this.identify(n);if(!1){let f=i||Dt(t).name.value;c||!1}let l=O(d({},o),{returnPartialData:!0,id:c,query:a,optimistic:s}),h;return new ee(f=>this.watch(O(d({},l),{immediate:!0,callback:m=>{let p=m.result;if(p===null&&(p={}),h&&At(a,{data:h.result},{data:p},e.variables))return;let x={data:p,dataState:m.complete?"complete":"partial",complete:!!m.complete};m.missing&&(x.missing=m.missing.missing),h=O(d({},m),{result:p}),f.next(x)}})))}getFragmentDoc=ie(qr,{max:q["cache.fragmentQueryDocuments"]||1e3,cache:J});
55readFragment(e,t=!!e.optimistic){return this.read(O(d({},e),{query:this.getFragmentDoc(e.fragment,e.fragmentName),rootId:e.id,optimistic:t}))}writeQuery(n){var s=n,{id:e,data:t}=s,i=B(s,["id","data"]);return this.write(Object.assign(i,{dataId:e||"ROOT_QUERY",result:t}))}writeFragment(o){var a=o,{id:e,data:t,fragment:i,fragmentName:n}=a,s=B(a,["id","data","fragment","fragmentName"]);return this.write(Object.assign(s,{query:this.getFragmentDoc(i,n),dataId:e,result:t}))}updateQuery(e,t){return this.batch({update(i){let n=i.readQuery(e),s=t(n);return s==null?n:(i.writeQuery(O(d({},e),{data:s})),s)}})}updateFragment(e,t){return this.batch({update(i){let n=i.readFragment(e),s=t(n);return s==null?n:(i.writeFragment(O(d({},e),{data:s})),s)}})}};!1;var Lt=class r extends Error{message;path;query;variables;constructor(e,t,i,n){if(super(e),this.message=e,this.path=t,this.query=i,this.variables=n,this.name="MissingFieldError",Array.isArray(this.path)){this.missing=this.message;for(let s=this.path.length-1;s>=0;--s)this.missing={[this.path[s]]:this.missing}}else this.missing=this.path;this.__proto__=r.prototype}missing};var{hasOwnProperty:L}=Object.prototype;function or({__typename:r,id:e,_id:t},i){if(typeof r=="string"&&(i&&(i.keyObject=e!=null?{id:e}:t!=null?{_id:t}:void 0),e==null&&t!=null&&(e=t),e!=null))return`${r}:${typeof e=="number"||typeof e=="string"?e:JSON.stringify(e)}`}var Xo={dataIdFromObject:or,resultCaching:!0};function Wn(r){return X(Xo,r)}function Gn(r,e){return F(e)?r.get(e.__ref,"__typename"):e&&e.__typename}var ei=/^[_a-z][_0-9a-z]*/i;function oe(r){let e=r.match(ei);return e?e[0]:r}function sr(r,e,t){return R(e)?C(e)?e.every(i=>sr(r,i,t)):r.selections.every(i=>{if(ae(i)&&me(i,t)){let n=Y(i);return L.call(e,n)&&(!i.selectionSet||sr(i.selectionSet,e[n],t))}return!0}):!1}function Se(r){return R(r)&&!F(r)&&!C(r)}function $n(){return new K}function ar(r,e){let t=ne(se(r));return{fragmentMap:t,lookupFragment(i){let n=t[i];return!n&&e&&(n=e.lookup(i)),n||null}}}var cr={},ti=()=>cr,Kn={},Le=class{policies;group;data={};constructor(e,t){this.policies=e,this.group=t}toObject(){return d({},this.data)}has(e){return this.lookup(e,!0)!==void 0}get(e,t){if(this.group.depend(e,t),L.call(this.data,e)){let i=this.data[e];if(i&&L.call(i,t))return i[t]}if(t==="__typename"&&L.call(this.policies.rootTypenamesById,e))return this.policies.rootTypenamesById[e];if(this instanceof le)return this.parent.get(e,t)}lookup(e,t){if(t&&this.group.depend(e,"__exists"),L.call(this.data,e))return this.data[e];if(this instanceof le)return this.parent.lookup(e,t);if(this.policies.rootTypenamesById[e])return{}}merge(e,t){let i;F(e)&&(e=e.__ref),F(t)&&(t=t.__ref);let n=typeof e=="string"?this.lookup(i=e):e,s=typeof t=="string"?this.lookup(i=t):t;if(!s)return;v(typeof i=="string",95);let o=new K(Zo).merge(n,s);if(this.data[i]=o,o!==n&&(delete this.refs[i],this.group.caching)){let a={};n||(a.__exists=1),Object.keys(s).forEach(c=>{if(!n||n[c]!==o[c]){a[c]=1;let l=oe(c);l!==c&&!this.policies.hasKeyArgs(o.__typename,l)&&(a[l]=1),o[c]===void 0&&!(this instanceof le)&&delete o[c]}}),a.__typename&&!(n&&n.__typename)&&this.policies.rootTypenamesById[i]===o.__typename&&delete a.__typename,Object.keys(a).forEach(c=>this.group.dirty(i,c))}}modify(e,t,i){let n=this.lookup(e);if(n){let s={},o=!1,a=!0,c={DELETE:cr,INVALIDATE:Kn,isReference:F,toReference:this.toReference,canRead:this.canRead,readField:(l,h)=>this.policies.readField(typeof l=="string"?{fieldName:l,from:h||ce(e)}:l,{store:this})};if(Object.keys(n).forEach(l=>{let h=oe(l),u=n[l];if(u===void 0)return;let f=typeof t=="function"?t:t[l]||(i?void 0:t[h]);if(f){let m=f===ti?cr:f(xe(u),O(d({},c),{fieldName:h,storeFieldName:l,storage:this.getStorage(e,l)}));if(m===Kn)this.group.dirty(e,l);else if(m===cr&&(m=void 0),m!==u&&(s[l]=m,o=!0,u=m,!1)){let p=x=>{if(this.lookup(x.__ref)===void 0)return!1,!0};if(F(m))p(m);else if(Array.isArray(m)){let x=!1,g;for(let E of m){if(F(E)){if(x=!0,p(E))break}else if(typeof E=="object"&&E){let[S]=this.policies.identify(E);S&&(g=E)}if(x&&g!==void 0){!1;break}}}}}u!==void 0&&(a=!1)}
55),o)return this.merge(e,s),a&&(this instanceof le?this.data[e]=void 0:delete this.data[e],this.group.dirty(e,"__exists")),!0}return!1}delete(e,t,i){let n=this.lookup(e);if(n){let s=this.getFieldValue(n,"__typename"),o=t&&i?this.policies.getStoreFieldName({typename:s,fieldName:t,args:i}):t;return this.modify(e,o?{[o]:ti}:ti,!!i)}return!1}evict(e,t){let i=!1;return e.id&&(L.call(this.data,e.id)&&(i=this.delete(e.id,e.fieldName,e.args)),this instanceof le&&this!==t&&(i=this.parent.evict(e,t)||i),(e.fieldName||i)&&this.group.dirty(e.id,e.fieldName||"__exists")),i}clear(){this.replace(null)}extract(){let e=this.toObject(),t=[];return this.getRootIdSet().forEach(i=>{L.call(this.policies.rootTypenamesById,i)||t.push(i)}),t.length&&(e.__META={extraRootIds:t.sort()}),e}replace(e){if(Object.keys(this.data).forEach(i=>{e&&L.call(e,i)||this.delete(i)}),e){let t=e,{__META:i}=t,n=B(t,["__META"]);Object.keys(n).forEach(s=>{this.merge(s,n[s])}),i&&i.extraRootIds.forEach(this.retain,this)}}rootIds={};retain(e){return this.rootIds[e]=(this.rootIds[e]||0)+1}release(e){if(this.rootIds[e]>0){let t=--this.rootIds[e];return t||delete this.rootIds[e],t}return 0}getRootIdSet(e=new Set){return Object.keys(this.rootIds).forEach(e.add,e),this instanceof le?this.parent.getRootIdSet(e):Object.keys(this.policies.rootTypenamesById).forEach(e.add,e),e}gc(){let e=this.getRootIdSet(),t=this.toObject();e.forEach(n=>{L.call(t,n)&&(Object.keys(this.findChildRefIds(n)).forEach(e.add,e),delete t[n])});let i=Object.keys(t);if(i.length){let n=this;for(;n instanceof le;)n=n.parent;
55i.forEach(s=>n.delete(s))}return i}refs={};findChildRefIds(e){if(!L.call(this.refs,e)){let t=this.refs[e]={},i=this.data[e];if(!i)return t;let n=new Set([i]);n.forEach(s=>{F(s)&&(t[s.__ref]=!0),R(s)&&Object.keys(s).forEach(o=>{let a=s[o];R(a)&&n.add(a)})})}return this.refs[e]}makeCacheKey(){return this.group.keyMaker.lookupArray(arguments)}getFieldValue=(e,t)=>xe(F(e)?this.get(e.__ref,t):e&&e[t]);canRead=e=>F(e)?this.has(e.__ref):typeof e=="object";toReference=(e,t)=>{if(typeof e=="string")return ce(e);if(F(e))return e;let[i]=this.policies.identify(e);if(i){let n=ce(i);return t&&this.merge(i,e),n}};get supportsResultCaching(){return this.group.caching}},lr=class{caching;parent;d=null;keyMaker;constructor(e,t=null){this.caching=e,this.parent=t,this.resetCaching()}resetCaching(){this.d=this.caching?kt():null,this.keyMaker=new H}depend(e,t){if(this.d){this.d(ri(e,t));let i=oe(t);i!==t&&this.d(ri(e,i)),this.parent&&this.parent.depend(e,t)}}dirty(e,t){this.d&&this.d.dirty(ri(e,t),t==="__exists"?"forget":"setDirty")}};function ri(r,e){return e+"#"+r}function si(r,e){Pe(r)&&r.group.depend(e,"__exists")}var ii=class extends Le{constructor({policies:e,resultCaching:t=!0,seed:i}){super(e,new lr(t)),i&&this.replace(i)}stump=new ni(this);addLayer(e,t){return this.stump.addLayer(e,t)}removeLayer(){return this}storageTrie=new H;getStorage(){return this.storageTrie.lookupArray(arguments)}};Le.Root=ii;var le=class r extends Le{id;parent;replay;group;constructor(e,t,i,n){super(t.policies,n),this.id=e,this.parent=t,this.replay=i,this.group=n,i(this)}addLayer(e,t){return new r(e,this,t,this.group)}removeLayer(e){let t=this.parent.removeLayer(e);return e===this.id?(this.group.caching&&Object.keys(this.data).forEach(i=>{let n=this.data[i],s=t.lookup(i);s?n?n!==s&&Object.keys(n).forEach(o=>{_(n[o],s[o])||this.group.dirty(i,o)}):(this.group.dirty(i,"__exists"),Object.keys(s).forEach(o=>{this.group.dirty(i,o)})):this.delete(i)}),t):t===this.parent?this:t.addLayer(this.id,this.replay)}toObject(){return d(d({},this.parent.toObject()),this.data)}findChildRefIds(e){let t=this.parent.findChildRefIds(e);return L.call(this.data,e)?d(d({},t),super.findChildRefIds(e)):t}getStorage(...e){let t=this.parent;for(;t.parent;)t=t.parent;return t.getStorage(...e)}},ni=class extends le{constructor(e){super("EntityStore.Stump",e,()=>{},new lr(e.group.caching,e.group))}removeLayer(){return this}merge(e,t){return this.parent.merge(e,t)}};function Zo(r,e,t){let i=r[t],n=e[t];return _(i,n)?i:n}function Pe(r){return!!(r&&r.supportsResultCaching)}var st=new he;function Hn(r){let e=r.directives?.find(({name:i})=>i.value==="unmask");if(!e)return"mask";let t=e.arguments?.find(({name:i})=>i.value==="mode");return!1,t&&"value"in t.value&&t.value.value==="migrate"?"migrate":"unmask"}function ur(r,e,t){return st.withValue(!0,()=>{let i=Pt(r,e,t,!1);return Object.isFrozen(r)&&xe(i),i})}function ea(r,e){if(e.has(r))return e.get(r);let t=Array.isArray(r)?[]:{};return e.set(r,t),t}function Pt(r,e,t,i,n){let{knownChanged:s}=t,o=ea(r,t.mutableTargets);if(Array.isArray(r)){for(let[a,c]of Array.from(r.entries())){if(c===null){o[a]=null;continue}let l=Pt(c,e,t,i,void 0);s.has(l)&&s.add(o),o[a]=l}return s.has(o)?o:r}for(let a of e.selections){let c;if(i&&s.add(o),a.kind===b.FIELD){let l=Y(a),h=a.selectionSet;if(c=o[l]||r[l],c===void 0)continue;if(h&&c!==null){let u=Pt(r[l],h,t,i,void 0);s.has(u)&&(c=u)}o[l]=c,!1}if(a.kind===b.INLINE_FRAGMENT&&(!a.typeCondition||t.cache.fragmentMatches(a,r.__typename))&&(c=Pt(r,a.selectionSet,t,i,n)),a.kind===b.FRAGMENT_SPREAD){let l=a.name.value,h=t.fragmentMap[l]||(t.fragmentMap[l]=t.cache.lookupFragment(l));v(h,39,l);let u=Hn(a);u!=="mask"&&(c=Pt(r,h.selectionSet,t,u==="migrate",n))}s.has(c)&&s.add(o)}return"__typename"in r&&!("__typename"in o)&&(o.__typename=r.__typename),Object.keys(o).length!==Object.keys(r).length&&s.add(o),s.has(o)?o:r}function ta(r,e,t,i,n){let s=()=>(st.getValue()||(!1,s=()=>e),e);return{get(){return s()},set(o){s=()=>o},enumerable:!0,configurable:!0}}function oi(r,e,t,i){let n=e.definitions.filter(o=>o.kind===b.FRAGMENT_DEFINITION);typeof i>"u"&&(v(n.length===1,41,n.length),i=n[0].name.value);let s=n.find(o=>o.name.value===i);return v(!!s,42,i),r==null||_(r,{})?r:ur(r,s.selectionSet,{operationType:"fragment",operationName:s.name.value,fragmentMap:ne(se(e)),cache:t,mutableTargets:new WeakMap,knownChanged:new WeakSet})}function ai(r,e,t){let i=z(e);return v(i,43),r==null?r:ur(r,i.selectionSet,{operationType:i.operation,operationName:i.name?.value,fragmentMap:ne(se(e)),cache:t,mutableTargets:new WeakMap,knownChanged:new WeakSet})}var Yn={};function ci(r){let e=JSON.stringify(r);return Yn[e]||(Yn[e]={})}function li(r){let e=ci(r);return e.keyFieldsFn||(e.keyFieldsFn=(t,i)=>{let n=(o,a)=>i.readField(a,o),s=i.keyObject=fi(r,o=>
55{let a=ot(i.storeObject,o,n);return a===void 0&&t!==i.storeObject&&L.call(t,o[0])&&(a=ot(t,o,Xn)),v(a!==void 0,98,o.join("."),t),a});return`${i.typename}:${JSON.stringify(s)}`})}function ui(r){let e=ci(r);return e.keyArgsFn||(e.keyArgsFn=(t,{field:i,variables:n,fieldName:s})=>{let o=fi(r,c=>{let l=c[0],h=l.charAt(0);if(h==="@"){if(i&&_e(i.directives)){let u=l.slice(1),f=i.directives.find(p=>p.name.value===u),m=f&&Ie(f,n);return m&&ot(m,c.slice(1))}return}if(h==="$"){let u=l.slice(1);if(n&&L.call(n,u)){let f=c.slice(0);return f[0]=u,ot(n,f)}return}if(t)return ot(t,c)}),a=JSON.stringify(o);return(t||a!=="{}")&&(s+=":"+a),s})}function fi(r,e){let t=new K;return Jn(r).reduce((i,n)=>{let s=e(n);if(s!==void 0){for(let o=n.length-1;o>=0;--o)s={[n[o]]:s};i=t.merge(i,s)}return i},{})}function Jn(r){let e=ci(r);if(!e.paths){let t=e.paths=[],i=[];r.forEach((n,s)=>{C(n)?(Jn(n).forEach(o=>t.push(i.concat(o))),i.length=0):(i.push(n),C(r[s+1])||(t.push(i.slice(0)),i.length=0))})}return e.paths}function Xn(r,e){return r[e]}function ot(r,e,t){return t=t||Xn,Zn(e.reduce(function i(n,s){return C(n)?n.map(o=>i(o,s)):n&&t(n,s)},r))}function Zn(r){return R(r)?C(r)?r.map(Zn):fi(Object.keys(r).sort(),e=>ot(r,e)):r}var hi=new he,es=new WeakMap;function Vt(r){let e=es.get(r);return e||es.set(r,e={vars:new Set,dep:kt()}),e}function pi(r){Vt(r).vars.forEach(e=>e.forgetCache(r))}function ts(r){Vt(r).vars.forEach(e=>e.attachCache(r))}function mi(r){let e=new Set,t=new Set,i=function(s){if(arguments.length>0){if(r!==s){r=s,e.forEach(a=>{Vt(a).dep.dirty(i),ra(a)});let o=Array.from(t);t.clear(),o.forEach(a=>a(r))}}else{let o=hi.getValue();o&&(n(o),Vt(o).dep(i))}return r};i.onNextChange=s=>(t.add(s),()=>{t.delete(s)});let n=i.attachCache=s=>(e.add(s),Vt(s).vars.add(i),i);return i.forgetCache=s=>e.delete(s),i}function ra(r){r.broadcastWatches&&r.broadcastWatches()}function di(r){return r.args!==void 0?r.args:r.field?Ie(r.field,r.variables):null}var ia=()=>{},rs=(r,e)=>e.fieldName,is=(r,e,{mergeObjects:t})=>t(r,e),ns=(r,e)=>e,fr=class{config;typePolicies={};toBeAdded={};supertypeMap=new Map;fuzzySubtypes=new Map;cache;rootIdsByTypename={};rootTypenamesById={};usingPossibleTypes=!1;constructor(e){this.config=e,this.config=d({dataIdFromObject:or},e),this.cache=this.config.cache,this.setRootTypename("Query"),this.setRootTypename("Mutation"),this.setRootTypename("Subscription"),e.possibleTypes&&this.addPossibleTypes(e.possibleTypes),e.typePolicies&&this.addTypePolicies(e.typePolicies)}identify(e,t){let i=this,n=t&&(t.typename||t.storeObject?.__typename)||e.__typename;if(n===this.rootTypenamesById.ROOT_QUERY)return["ROOT_QUERY"];let s=t&&t.storeObject||e,o=O(d({},t),{typename:n,storeObject:s,readField:t&&t.readField||((...h)=>{let u=hr(h,s);return i.readField(u,{store:i.cache.data,variables:u.variables})})}),a,c=n&&this.getTypePolicy(n),l=c&&c.keyFn||this.config.dataIdFromObject;return st.withValue(!0,()=>{for(;l;){let h=l(d(d({},e),s),o);if(C(h))l=li(h);else{a=h;break}}}),a=a?String(a):void 0,o.keyObject?[a,o.keyObject]:[a]}addTypePolicies(e){Object.keys(e).forEach(t=>{let a=e[t],{queryType:i,mutationType:n,subscriptionType:s}=a,o=B(a,["queryType","mutationType","subscriptionType"]);i&&this.setRootTypename("Query",t),n&&this.setRootTypename("Mutation",t),s&&this.setRootTypename("Subscription",t),L.call(this.toBeAdded,t)?this.toBeAdded[t].push(o):this.toBeAdded[t]=[o]})}updateTypePolicy(e,t,i){let n=this.getTypePolicy(e),{keyFields:s,fields:o}=t;function a(c,l){c.merge=typeof l=="function"?l:l===!0?is:l===!1?ns:c.merge}a(n,t.merge),n.keyFn=s===!1?ia:C(s)?li(s):typeof s=="function"?s:n.keyFn,o&&Object.keys(o).forEach(c=>{let l=i[c];(!l||l?.typename!==e)&&(l=i[c]={typename:e});let h=o[c];if(typeof h=="function")l.read=h;else{let{keyArgs:u,read:f,merge:m}=h;l.keyFn=u===!1?rs:C(u)?ui(u):typeof u=="function"?u:l.keyFn,typeof f=="function"&&(l.read=f),a(l,m)}l.read&&l.merge&&(l.keyFn=l.keyFn||rs)})}setRootTypename(e,t=e){let i="ROOT_"+e.toUpperCase(),n=this.rootTypenamesById[i];t!==n&&(v(!n||n===e,99,e),n&&delete this.rootIdsByTypename[n],this.rootIdsByTypename[t]=i,this.rootTypenamesById[i]=t)}addPossibleTypes(e){this.usingPossibleTypes=!0,Object.keys(e).forEach(t=>
55{this.getSupertypeSet(t,!0),e[t].forEach(i=>{this.getSupertypeSet(i,!0).add(t);let n=i.match(ei);(!n||n[0]!==i)&&this.fuzzySubtypes.set(i,new RegExp(i))})})}getTypePolicy(e){if(!L.call(this.typePolicies,e)){let i=this.typePolicies[e]={};i.fields={};let n=this.supertypeMap.get(e);!n&&this.fuzzySubtypes.size&&(n=this.getSupertypeSet(e,!0),this.fuzzySubtypes.forEach((s,o)=>{if(s.test(e)){let a=this.supertypeMap.get(o);a&&a.forEach(c=>n.add(c))}})),n&&n.size&&n.forEach(s=>{let c=this.getTypePolicy(s),{fields:o}=c,a=B(c,["fields"]);Object.assign(i,a),Object.assign(i.fields,o)})}let t=this.toBeAdded[e];return t&&t.length&&t.splice(0).forEach(i=>{this.updateTypePolicy(e,i,this.typePolicies[e].fields)}),this.typePolicies[e]}getFieldPolicy(e,t){if(e)return this.getTypePolicy(e).fields[t]}getSupertypeSet(e,t){let i=this.supertypeMap.get(e);return!i&&t&&this.supertypeMap.set(e,i=new Set),i}fragmentMatches(e,t,i,n){if(!e.typeCondition)return!0;if(!t)return!1;let s=e.typeCondition.name.value;if(t===s)return!0;if(this.usingPossibleTypes&&this.supertypeMap.has(s)){let o=this.getSupertypeSet(t,!0),a=[o],c=u=>{let f=this.getSupertypeSet(u,!1);f&&f.size&&a.indexOf(f)<0&&a.push(f)},l=!!(i&&this.fuzzySubtypes.size),h=!1;for(let u=0;u<a.length;++u){let f=a[u];if(f.has(s))return o.has(s)||(h&&!1&&v.warn(100,t,s),o.add(s)),!0;f.forEach(c),l&&u===a.length-1&&sr(e.selectionSet,i,n)&&(l=!1,h=!0,this.fuzzySubtypes.forEach((m,p)=>{let x=t.match(m);x&&x[0]===t&&c(p)}))}}return!1}hasKeyArgs(e,t){let i=this.getFieldPolicy(e,t);return!!(i&&i.keyFn)}getStoreFieldName(e){let{typename:t,fieldName:i}=e,n=this.getFieldPolicy(t,i),s,o=n&&n.keyFn;if(o&&t){let a={typename:t,fieldName:i,field:e.field||null,variables:e.variables},c=di(e);for(;o;){let l=o(c,a);if(C(l))o=ui(l);else{s=l||i;break}}}return s===void 0&&(s=e.field?Hr(e.field,e.variables):Ct(i,di(e))),s===!1?i:i===oe(s)?s:i+":"+s}readField(e,t){let i=e.from;if(!i||!(e.field||e.fieldName))return;if(e.typename===void 0){let h=t.store.getFieldValue(i,"__typename");h&&(e.typename=h)}let s=this.getStoreFieldName(e),o=oe(s),a=t.store.getFieldValue(i,s),c=this.getFieldPolicy(e.typename,o),l=c&&c.read;if(l){let h=ss(this,i,e,t,t.store.getStorage(F(i)?i.__ref:i,s));return hi.withValue(this.cache,l,[a,h])}return a}getReadFunction(e,t){let i=this.getFieldPolicy(e,t);return i&&i.read}getMergeFunction(e,t,i){let n=this.getFieldPolicy(e,t),s=n&&n.merge;return!s&&i&&(n=this.getTypePolicy(i),s=n&&n.merge),s}runMergeFunction(e,t,{field:i,typename:n,merge:s},o,a){return s===is?os(o.store)(e,t):s===ns?t:(o.overwrite&&(e=void 0),s(e,t,ss(this,void 0,{typename:n,fieldName:i.name.value,field:i,variables:o.variables},o,a||{})))}};function ss(r,e,t,i,n){let s=r.getStoreFieldName(t),o=oe(s),a=t.variables||i.variables,{toReference:c,canRead:l}=i.store;return{args:di(t),field:t.field||null,fieldName:o,storeFieldName:s,variables:a,isReference:F,toReference:c,storage:n,cache:r.cache,canRead:l,readField(...h){return r.readField(hr(h,e,a),i)},mergeObjects:os(i.store)}}function hr(r,e,t){let{0:i,1:n,length:s}=r,o;return typeof i=="string"?o={fieldName:i,from:s>1?n:e}:(o=d({},i),L.call(o,"from")||(o.from=e)),!1,o.variables===void 0&&(o.variables=t),o}function os(r){return function(t,i){if(C(t)||C(i))throw M(102);if(R(t)&&R(i)){let n=r.getFieldValue(t,"__typename"),s=r.getFieldValue(i,"__typename");if(n&&s&&n!==s)return i;if(F(t)&&Se(i))return r.merge(t.__ref,i),t;if(Se(t)&&F(i))return r.merge(t,i.__ref),i;if(Se(t)&&Se(i))return d(d({},t),i)}return i}}function as(r){return[r.selectionSet,r.objectOrReference,r.context]}var pr=class{executeSelectionSet;executeSubSelectedArray;config;knownResults=new WeakMap;constructor(e){this.config=e,this.executeSelectionSet=ie(t=>{let i=as(t),n=this.executeSelectionSet.peek(...i);return n||(si(t.context.store,t.enclosingRef.__ref),this.execSelectionSetImpl(t))},{max:q["inMemoryCache.executeSelectionSet"]||5e4,keyArgs:as,makeCacheKey(t,i,n){if(Pe(n.store))return n.store.makeCacheKey(t,F(i)?i.__ref:i,n.varString)}}),this.executeSubSelectedArray=ie(t=>(si(t.context.store,t.enclosingRef.__ref),this.execSubSelectedArrayImpl(t)),{max:q["inMemoryCache.executeSubSelectedArray"]||1e4,makeCacheKey({field:t,array:i,context:n}){if(Pe(n.store))return n.store.makeCacheKey(t,i,n.varString)}})}diffQueryAgainstStore({store:e,query:t,rootId:i="ROOT_QUERY",variables:n,returnPartialData:s=!0}){let o=this.config.cache.policies;n=d(d({},Ce(Nt(t))),n);let a=ce(i),c=this.executeSelectionSet({selectionSet:Ze(t).selectionSet,objectOrReference:a,enclosingRef:a,context:d({store:e,query:t,policies:o,variables:n,varString:W(n)},ar(t,this.config.fragments))}),l;c.missing&&(l=new Lt(na(c.missing),c.missing,t,n));let h=!l,{result:u}=c;return{result:h||s?Object.keys(u).length===0?null:u:null,complete:h,missing:l}}isFresh(e,t,i,n){if(Pe(n.store)&&this.knownResults.get(e)===i){let s=this.executeSelectionSet.peek(i,t,n);if(s&&e===s.result)return!0}return!1}execSelectionSetImpl({selectionSet:e,objectOrReference:t,enclosingRef:i,context:n}){if(F(t)&&!n.policies.rootTypenamesById[t.__ref]&&!n.store.has(t.__ref))return{result:{},missing:`Dangling reference to missing ${t.__ref} object`};let{variables:s,policies:o,store:a}=n,c=a.getFieldValue(t,"__typename"),l=[],h,u=new K;typeof c=="string"&&!o.rootIdsByTypename[c]&&l.push({__typename:c}
55);function f(E,S){return E.missing&&(h=u.merge(h,{[S]:E.missing})),E.result}let m=new Set(e.selections);m.forEach(E=>{if(me(E,s))if(ae(E)){let S=o.readField({fieldName:E.name.value,field:E,variables:n.variables,from:t},n),D=Y(E);S===void 0?Me.added(E)||(h=u.merge(h,{[D]:`Can't find field '${E.name.value}' on ${F(t)?t.__ref+" object":"object "+JSON.stringify(t,null,2)}`})):C(S)?S.length>0&&(S=f(this.executeSubSelectedArray({field:E,array:S,enclosingRef:i,context:n}),D)):E.selectionSet&&S!=null&&(S=f(this.executeSelectionSet({selectionSet:E.selectionSet,objectOrReference:S,enclosingRef:F(S)?S:i,context:n}),D)),S!==void 0&&l.push({[D]:S})}else{let S=ve(E,n.lookupFragment);if(!S&&E.kind===b.FRAGMENT_SPREAD)throw M(103,E.name.value);S&&o.fragmentMatches(S,c)&&S.selectionSet.selections.forEach(m.add,m)}});let x={result:Wr(l),missing:h},g=xe(x);return g.result&&this.knownResults.set(g.result,e),g}execSubSelectedArrayImpl({field:e,array:t,enclosingRef:i,context:n}){let s,o=new K;function a(c,l){return c.missing&&(s=o.merge(s,{[l]:c.missing})),c.result}return e.selectionSet&&(t=t.filter(n.store.canRead)),t=t.map((c,l)=>c===null?null:C(c)?a(this.executeSubSelectedArray({field:e,array:c,enclosingRef:i,context:n}),l):e.selectionSet?a(this.executeSelectionSet({selectionSet:e.selectionSet,objectOrReference:c,enclosingRef:F(c)?c:i,context:n}),l):(!1,c)),{result:t,missing:s}}};function na(r){try{JSON.stringify(r,(e,t)=>{if(typeof t=="string")throw t;return t})}catch(e){return e}}function sa(r,e,t){if(!e.selectionSet){let i=new Set([t]);i.forEach(n=>{R(n)&&(v(!F(n),104,Gn(r,n),e.name.value),Object.values(n).forEach(i.add,i))})}}function yi(r,e,t){let i=`${e}${t}`,n=r.flavors.get(i);return n||r.flavors.set(i,n=r.clientOnly===e&&r.deferred===t?r:O(d({},r),{clientOnly:e,deferred:t})),n}var mr=class{cache;reader;fragments;constructor(e,t,i){this.cache=e,this.reader=t,this.fragments=i}writeToStore(e,{query:t,result:i,dataId:n,variables:s,overwrite:o}){let a=z(t),c=$n();s=d(d({},Ce(a)),s);let l=O(d({store:e,written:{}
55,merge(u,f){return c.merge(u,f)},variables:s,varString:W(s)},ar(t,this.fragments)),{overwrite:!!o,incomingById:new Map,clientOnly:!1,deferred:!1,flavors:new Map}),h=this.processSelectionSet({result:i||{},dataId:n,selectionSet:a.selectionSet,mergeTree:{map:new Map},context:l});if(!F(h))throw M(105,i);return l.incomingById.forEach(({storeObject:u,mergeTree:f,fieldNodeSet:m},p)=>{let x=ce(p);if(f&&f.map.size){let g=this.applyMerges(f,x,u,l);if(F(g))return;u=g}if(!1){let g={};m.forEach(D=>{D.selectionSet&&(g[D.name.value]=!0)});let E=D=>g[oe(D)]===!0,S=D=>{let A=f&&f.map.get(D);return!!(A&&A.info&&A.info.merge)};Object.keys(u).forEach(D=>{E(D)&&!S(D)&&oa(x,u,D,l.store)})}e.merge(p,u)}),e.retain(h.__ref),h}processSelectionSet({dataId:e,result:t,selectionSet:i,context:n,mergeTree:s}){let{policies:o}=this.cache,a={},c=e&&o.rootTypenamesById[e]||bi(t,i,n.fragmentMap)||e&&n.store.get(e,"__typename");typeof c=="string"&&(a.__typename=c);let l=(...u)=>{let f=hr(u,a,n.variables);if(F(f.from)){let m=n.incomingById.get(f.from.__ref);if(m){let p=o.readField(O(d({},f),{from:m.storeObject}),n);if(p!==void 0)return p}}return o.readField(f,n)},h=new Set;this.flattenFields(i,t,n,c).forEach((u,f)=>{let m=Y(f),p=t[m];if(h.add(f),p!==void 0){let x=o.getStoreFieldName({typename:c,fieldName:f.name.value,field:f,variables:u.variables}),g=cs(s,x),E=this.processFieldValue(p,f,f.selectionSet?yi(u,!1,!1):u,g),S;f.selectionSet&&(F(E)||Se(E))&&(S=l("__typename",E));let D=o.getMergeFunction(c,f.name.value,S);D?g.info={field:f,typename:c,merge:D}:ls(s,x),a=u.merge(a,{[x]:E})}else!1});try{let[u,f]=o.identify(t,{typename:c,selectionSet:i,fragmentMap:n.fragmentMap,storeObject:a,readField:l});e=e||u,f&&(a=n.merge(a,f))}catch(u){if(!e)throw u}if(typeof e=="string"){let u=ce(e),f=n.written[e]||(n.written[e]=[]);if(f.indexOf(i)>=0||(f.push(i),this.reader&&this.reader.isFresh(t,u,i,n)))return u;let m=n.incomingById.get(e);return m?(m.storeObject=n.merge(m.storeObject,a),m.mergeTree=gi(m.mergeTree,s),h.forEach(p=>m.fieldNodeSet.add(p))):n.incomingById.set(e,{storeObject:a,mergeTree:dr(s)?void 0:s,fieldNodeSet:h}),u}return a}processFieldValue(e,t,i,n){return!t.selectionSet||e===null?e:C(e)?e.map((s,o)=>{let a=this.processFieldValue(s,t,i,cs(n,o));return ls(n,o),a}):this.processSelectionSet({result:e,selectionSet:t.selectionSet,context:i,mergeTree:n})}flattenFields(e,t,i,n=bi(t,e,i.fragmentMap)){let s=new Map,{policies:o}=this.cache,a=new H(!1);return(function c(l,h){let u=a.lookup(l,h.clientOnly,h.deferred);u.visited||(u.visited=!0,l.selections.forEach(f=>{if(!me(f,i.variables))return;let{clientOnly:m,deferred:p}=h;if(!(m&&p)&&_e(f.directives)&&f.directives.forEach(x=>{let g=x.name.value;if(g==="client"&&(m=!0),g==="defer"){let E=Ie(x,i.variables);(!E||E.if!==!1)&&(p=!0)}}),ae(f)){let x=s.get(f);x&&(m=m&&x.clientOnly,p=p&&x.deferred),s.set(f,yi(i,m,p))}else{let x=ve(f,i.lookupFragment);if(!x&&f.kind===b.FRAGMENT_SPREAD)throw M(107,f.name.value);x&&o.fragmentMatches(x,n,t,i.variables)&&c(x.selectionSet,yi(i,m,p))}}))})(e,i),s}applyMerges(e,t,i,n,s){if(e.map.size&&!F(i)){let o=!C(i)&&(F(t)||Se(t))?t:void 0,a=i;o&&!s&&(s=[F(o)?o.__ref:o]);let c,l=(h,u)=>C(h)?typeof u=="number"?h[u]:void 0:n.store.getFieldValue(h,String(u));e.map.forEach((h,u)=>{let f=l(o,u),m=l(a,u);if(m===void 0)return;s&&s.push(u);let p=this.applyMerges(h,f,m,n,s);p!==m&&(c=c||new Map,c.set(u,p)),s&&v(s.pop()===u)}),c&&(i=C(a)?a.slice(0):d({},a),c.forEach((h,u)=>{i[u]=h}))}return e.info?this.cache.policies.runMergeFunction(t,i,e.info,n,s&&n.store.getStorage(...s)):i}},fs=[];function cs({map:r},e){return r.has(e)||r.set(e,fs.pop()||{map:new Map}),r.get(e)}function gi(r,e){if(r===e||!e||dr(e))return r;if(!r||dr(r))return e;let t=r.info&&e.info?d(d({},r.info),e.info):r.info||e.info,i=r.map.size&&e.map.size,n=i?new Map:r.map.size?r.map:e.map,s={info:t,map:n};if(i){let o=new Set(e.map.keys());r.map.forEach((a,c)=>{s.map.set(c,gi(a,e.map.get(c))),o.delete(c)}),o.forEach(a=>{s.map.set(a,gi(e.map.get(a),r.map.get(a)))})}return s}function dr(r){return!r||!(r.info||r.map.size)}function ls({map:r},e){let t=r.get(e);t&&dr(t)&&(fs.push(t),r.delete(e))}var us=new Set;function oa(r,e,t,i){let n=u=>{let f=i.getFieldValue(u,t);return typeof f=="object"&&f},s=n(r);if(!s)return;let o=n(e);if(!o||F(s)||_(s,o)||Object.keys(s).every(u=>i.getFieldValue(o,u)!==void 0))return;let a=i.getFieldValue(r,"__typename")||i.getFieldValue(e,"__typename"),c=oe(t),l=`${a}.${c}`;if(us.has(l))return;us.add(l);let h=[];
55!C(s)&&!C(o)&&[s,o].forEach(u=>{let f=i.getFieldValue(u,"__typename");typeof f=="string"&&!h.includes(f)&&h.push(f)}),!1}function bi(r,e,t){let i;for(let n of e.selections)if(ae(n)){if(n.name.value==="__typename")return r[Y(n)]}else i?i.push(n):i=[n];if(typeof r.__typename=="string")return r.__typename;if(i)for(let n of i){let s=bi(r,ve(n,t).selectionSet,t);if(typeof s=="string")return s}}var jt=class extends nt{data;optimisticData;config;watches=new Set;storeReader;storeWriter;addTypenameTransform=new de(Me);maybeBroadcastWatch;assumeImmutableResults=!0;policies;makeVar=mi;constructor(e={}){super(),this.config=Wn(e),this.policies=new fr({cache:this,dataIdFromObject:this.config.dataIdFromObject,possibleTypes:this.config.possibleTypes,typePolicies:this.config.typePolicies}),this.init()}init(){let e=this.data=new Le.Root({policies:this.policies,resultCaching:this.config.resultCaching});this.optimisticData=e.stump,this.resetResultCache()}resetResultCache(){let{fragments:e}=this.config;this.addTypenameTransform.resetCache(),e?.resetCaches(),this.storeWriter=new mr(this,this.storeReader=new pr({cache:this,fragments:e}),e),this.maybeBroadcastWatch=ie((t,i)=>this.broadcastWatch(t,i),{max:q["inMemoryCache.maybeBroadcastWatch"]||5e3,makeCacheKey:t=>{let i=t.optimistic?this.optimisticData:this.data;if(Pe(i)){let{optimistic:n,id:s,variables:o}=t;return i.makeCacheKey(t.query,t.callback,W({optimistic:n,id:s,variables:o}))}}}),new Set([this.data.group,this.optimisticData.group]).forEach(t=>t.resetCaching())}restore(e){return this.init(),e&&this.data.replace(e),this}extract(e=!1){return(e?this.optimisticData:this.data).extract()}read(e){let{returnPartialData:t=!1}=e;return this.storeReader.diffQueryAgainstStore(O(d({},e),{store:e.optimistic?this.optimisticData:this.data,config:this.config,returnPartialData:t})).result}write(e){try{return++this.txCount,this.storeWriter.writeToStore(this.data,e)}finally{!--this.txCount&&e.broadcast!==!1&&this.broadcastWatches()}}modify(e){if(L.call(e,"id")&&!e.id)return!1;let t=e.optimistic?this.optimisticData:this.data;try{return++this.txCount,t.modify(e.id||"ROOT_QUERY",e.fields,!1)}finally{!--this.txCount&&e.broadcast!==!1&&this.broadcastWatches()}}diff(e){return this.storeReader.diffQueryAgainstStore(O(d({},e),{store:e.optimistic?this.optimisticData:this.data,rootId:e.id||"ROOT_QUERY",config:this.config}))}watch(e){return this.watches.size||ts(this),this.watches.add(e),e.immediate&&this.maybeBroadcastWatch(e),()=>{this.watches.delete(e)&&!this.watches.size&&pi(this),this.maybeBroadcastWatch.forget(e)}}gc(e){W.reset(),Oe.reset();let t=this.optimisticData.gc();return e&&!this.txCount&&e.resetResultCache&&this.resetResultCache(),t}retain(e,t){return(t?this.optimisticData:this.data).retain(e)}release(e,t){return(t?this.optimisticData:this.data).release(e)}identify(e){if(F(e))return e.__ref;try{return this.policies.identify(e)[0]}catch(t){!1}}evict(e){if(!e.id){if(L.call(e,"id"))return!1;e=O(d({},e),{id:"ROOT_QUERY"})}try{return++this.txCount,this.optimisticData.evict(e,this.data)}finally{!--this.txCount&&e.broadcast!==!1&&this.broadcastWatches()}}reset(e){return this.init(),W.reset(),e&&e.discardWatches?(this.watches.forEach(t=>this.maybeBroadcastWatch.forget(t)),this.watches.clear(),pi(this)):this.broadcastWatches(),Promise.resolve()}removeOptimistic(e){let t=this.optimisticData.removeLayer(e);t!==this.optimisticData&&(this.optimisticData=t,this.broadcastWatches())}txCount=0;batch(e){let{update:t,optimistic:i=!0,removeOptimistic:n,onWatchUpdated:s}=e,o,a=l=>{let{data:h,optimisticData:u}=this;++this.txCount,l&&(this.data=this.optimisticData=l);try{return o=t(this)}finally{--this.txCount,this.data=h,this.optimisticData=u}},c=new Set;return s&&!this.txCount&&this.broadcastWatches(O(d({},e),{onWatchUpdated(l){return c.add(l),!1}})),typeof i=="string"?this.optimisticData=this.optimisticData.addLayer(i,a):i===!1?a(this.data):a(),typeof n=="string"&&(this.optimisticData=this.optimisticData.removeLayer(n)),s&&c.size?(this.broadcastWatches(O(d({},e),{onWatchUpdated(l,h){let u=s.call(this,l,h);return u!==!1&&c.delete(l),u}}
55)),c.size&&c.forEach(l=>this.maybeBroadcastWatch.dirty(l))):this.broadcastWatches(e),o}performTransaction(e,t){return this.batch({update:e,optimistic:t||t!==null})}transformDocument(e){return this.addTypenameTransform.transformDocument(this.addFragmentsToDocument(e))}fragmentMatches(e,t){return this.policies.fragmentMatches(e,t)}lookupFragment(e){return this.config.fragments?.lookup(e)||null}broadcastWatches(e){this.txCount||this.watches.forEach(t=>this.maybeBroadcastWatch(t,e))}addFragmentsToDocument(e){let{fragments:t}=this.config;return t?t.transform(e):e}broadcastWatch(e,t){let{lastDiff:i}=e,n=this.diff(e);t&&(e.optimistic&&typeof t.optimistic=="string"&&(n.fromOptimisticTransaction=!0),t.onWatchUpdated&&t.onWatchUpdated.call(this,e,n,i)===!1)||(!i||!_(i.result,n.result))&&e.callback(e.lastDiff=n,i)}};!1;function at(r,e){return typeof r=="object"&&r!==null&&r[Symbol.for("apollo.error")]===e}function ct(r){Object.defineProperty(r,Symbol.for("apollo.error"),{value:r.name,enumerable:!1,writable:!1,configurable:!1})}function hs(r){return r.map(e=>e.message||"Error message not found.").join(`
56`)}var ps=(()=>{class r extends Error{static is(t){return at(t,"CombinedProtocolErrors")}static formatMessage=hs;errors;constructor(t){super(r.formatMessage(t,{defaultFormatMessage:hs})),this.name="CombinedProtocolErrors",this.errors=t,ct(this),Object.setPrototypeOf(this,r.prototype)}}return r})();function ms(r){return r!==null&&typeof r=="object"&&typeof r.message=="string"&&typeof r.name=="string"&&(typeof r.stack=="string"||typeof r.stack>"u")}var yr=class r extends Error{static is(e){return at(e,"UnconventionalError")}constructor(e){super("An error of unexpected shape occurred.",{cause:e}),this.name="UnconventionalError",ct(this),Object.setPrototypeOf(this,r.prototype)}};function ds(r){return r.filter(e=>e).map(e=>e.message||"Error message not found.").join(`
57`)}var Ve=(()=>{class r extends Error{static is(t){return at(t,"CombinedGraphQLErrors")}static formatMessage=ds;errors;data;extensions;constructor(t,i=t.errors||[]){super(r.formatMessage(i,{result:t,defaultFormatMessage:ds})),this.errors=i,this.data=t.data,this.extensions=t.extensions,this.name="CombinedGraphQLErrors",ct(this),Object.setPrototypeOf(this,r.prototype)}}return r})();var aa=new WeakSet;function vi(r){aa.add(r)}var gr=Symbol();function ys(r){return"extensions"in r?ps.is(r.extensions[gr]):!1}function gs(r){return ms(r)?r:typeof r=="string"?new Error(r,{cause:r}):new yr(r)}var I=(function(r){return r[r.loading=1]="loading",r[r.setVariables=2]="setVariables",r[r.fetchMore=3]="fetchMore",r[r.refetch=4]="refetch",r[r.poll=6]="poll",r[r.ready=7]="ready",r[r.error=8]="error",r[r.streaming=9]="streaming",r})(I||{});var{assign:bs,hasOwnProperty:ca}=Object,lt={loading:!0,networkStatus:I.loading,data:void 0,dataState:"empty",partial:!0},Ei={loading:!1,networkStatus:I.ready,data:void 0,dataState:"empty",partial:!0},ut=class{options;queryName;_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}constructor({queryManager:e,options:t,transformedQuery:i=e.transform(t.query)}){this.queryManager=e,this.waitForNetworkResult=t.fetchPolicy==="network-only",this.isTornDown=!1,this.subscribeToMore=this.subscribeToMore.bind(this),this.maskResult=this.maskResult.bind(this);let{watchQuery:{fetchPolicy:n="cache-first"}={}}=e.defaultOptions,{fetchPolicy:s=n,initialFetchPolicy:o=s==="standby"?n:s}=t;this.lastQuery=i,this.options=O(d({},t),{initialFetchPolicy:o,fetchPolicy:s,variables:this.getVariablesWithDefaults(t.variables)}),this.initializeObservablesQueue(),this["@@observable"]=()=>this,Symbol.observable&&(this[Symbol.observable]=()=>this);let a=z(this.query);this.queryName=a&&a.name&&a.name.value}initializeObservablesQueue(){this.subject=new Ut({query:this.query,variables:this.variables,result:lt,meta:{}});let e=this.subject.pipe(Qe({subscribe:()=>{this.subject.observed||(this.reobserve(),setTimeout(()=>this.updatePolling()))},unsubscribe:()=>{this.subject.observed||this.tearDownQuery()}}),tt(({query:t,variables:i,result:n,meta:s},o)=>{let{shouldEmit:a}=s;
57if(n===lt&&(o.previous=void 0,o.previousVariables=void 0),this.options.fetchPolicy==="standby"||a===2)return;if(a===1)return h();let{previous:c,previousVariables:l}=o;if(c){let u=this.queryManager.getDocumentInfo(t),f=this.queryManager.dataMasking,m=f?u.nonReactiveQuery:t;if((f||u.hasNonreactiveDirective?At(m,c,n,i):_(c,n))&&_(l,i))return}if(a===3&&(!this.options.notifyOnNetworkStatusChange||_(c,n)))return;return h();function h(){return o.previous=n,o.previousVariables=i,n}},()=>({})));this.pipe=e.pipe.bind(e),this.subscribe=e.subscribe.bind(e),this.input=new Bt,this.input.complete=()=>{},this.input.pipe(this.operator).subscribe(this.subject)}subscribe;pipe;[Symbol.observable];"@@observable";getCacheDiff({optimistic:e=!0}={}){return this.queryManager.cache.diff({query:this.query,variables:this.variables,returnPartialData:!0,optimistic:e})}getInitialResult(e){let t=this.queryManager.prioritizeCacheValues?"cache-first":e||this.options.fetchPolicy,i=()=>{let n=this.getCacheDiff(),s=this.options.returnPartialData||n.complete?n.result??void 0:void 0;return this.maskResult({data:s,dataState:n.complete?"complete":s===void 0?"empty":"partial",loading:!n.complete,networkStatus:n.complete?I.ready:I.loading,partial:!n.complete})};switch(t){case"cache-only":return O(d({},i()),{loading:!1,networkStatus:I.ready});case"cache-first":return i();case"cache-and-network":return O(d({},i()),{loading:!0,networkStatus:I.loading});case"standby":return Ei;default:return lt}}resubscribeCache(){let{variables:e,fetchPolicy:t}=this.options,i=this.query,n=t==="standby"||t==="no-cache"||this.waitForNetworkResult,s=!qt({query:i,variables:e},this.unsubscribeFromCache)&&!this.waitForNetworkResult;if((n||s)&&this.unsubscribeFromCache?.(),n||!s)return;let o={query:i,variables:e,optimistic:!0,watcher:this,callback:c=>{let l=this.queryManager.getDocumentInfo(i);if((l.hasClientExports||l.hasForcedResolvers)&&(o.lastDiff=void 0),o.lastOwnDiff===c)return;let{result:h}=this.subject.getValue();!c.complete&&(h.error||h===lt||h===Ei)||_(h.data,c.result)||this.scheduleNotify()}},a=this.queryManager.cache.watch(o);this.unsubscribeFromCache=Object.assign(()=>{this.unsubscribeFromCache=void 0,a()},{query:i,variables:e})}stableLastResult;getCurrentResult(){let{result:e}=this.subject.getValue(),t=e.networkStatus===I.error||this.hasObservers()||this.options.fetchPolicy==="no-cache"?e:this.getInitialResult();return t===lt&&(t=this.getInitialResult()),_(this.stableLastResult,t)||(this.stableLastResult=t),this.stableLastResult}refetch(e){let{fetchPolicy:t}=this.options,i={pollInterval:0};if(t==="no-cache"?i.fetchPolicy="no-cache":i.fetchPolicy="network-only",!1){let n=Nt(this.query),s=n.variableDefinitions;(!s||!s.some(o=>
57o.variable.name.value==="variables"))&&!1&&v.warn(77,e,n.name?.value||n)}return e&&!_(this.variables,e)&&(i.variables=this.options.variables=this.getVariablesWithDefaults(d(d({},this.variables),e))),this._lastWrite=void 0,this._reobserve(i,{newNetworkStatus:I.refetch})}fetchMore({query:e,variables:t,context:i,errorPolicy:n,updateQuery:s}){v(this.options.fetchPolicy!=="cache-only",78,Q(this.query,"(anonymous)"));let o=O(d({},X(this.options,{errorPolicy:"none"},{query:e,context:i,errorPolicy:n})),{variables:e?t:d(d({},this.variables),t),fetchPolicy:"no-cache",notifyOnNetworkStatusChange:this.options.notifyOnNetworkStatusChange});o.query=this.transformDocument(o.query),this.lastQuery=e?this.transformDocument(this.options.query):o.query;let a=!1,c=this.options.fetchPolicy!=="no-cache";c||v(s,79);let{finalize:l,pushNotification:h}=this.pushOperation(I.fetchMore);return h({source:"newNetworkStatus",kind:"N",value:{}},{shouldEmit:3}),this.queryManager.fetchQuery(o,I.fetchMore).then(u=>{if(l(),c){let f=this.getCacheDiff();this.queryManager.cache.batch({update:m=>{s?m.updateQuery({query:this.query,variables:this.variables,returnPartialData:!0,optimistic:!1},p=>s(p,{fetchMoreResult:u.data,variables:o.variables})):m.writeQuery({query:o.query,variables:o.variables,data:u.data})},onWatchUpdated:(m,p)=>{m.watcher===this&&!_(p.result,f.result)&&(a=!0)}})}else{let f=this.getCurrentResult(),m=s(f.data,{fetchMoreResult:u.data,variables:o.variables});h({kind:"N",value:O(d({},f),{networkStatus:I.ready,loading:!1,data:m,dataState:f.dataState==="streaming"?"streaming":"complete"}),source:"network"})}return this.maskResult(u)}).finally(()=>{l(),c&&!a&&h({kind:"N",source:"newNetworkStatus",value:{}},{shouldEmit:1})})}subscribeToMore(e){let t=this.queryManager.startGraphQLSubscription({query:e.document,variables:e.variables,context:e.context}).subscribe({next:i=>{let{updateQuery:n,onError:s}=e,{error:o}=i;if(o){s?s(o):v.error(80,o);return}n&&this.updateQuery((a,c)=>n(a,d({subscriptionData:i},c)))}});return this.subscriptions.add(t),()=>{this.subscriptions.delete(t)&&t.unsubscribe()}}applyOptions(e){let t=X(this.options,e||{});bs(this.options,t),this.updatePolling()}setVariables(e){return pt(this,null,function*(){return e=this.getVariablesWithDefaults(e),_(this.variables,e)?Ae(this.getCurrentResult()):(this.options.variables=e,this.hasObservers()?this._reobserve({fetchPolicy:this.options.initialFetchPolicy,variables:e},{newNetworkStatus:I.setVariables}):Ae(this.getCurrentResult()))})}updateQuery(e){let{queryManager:t}=this,{result:i,complete:n}=this.getCacheDiff({optimistic:!1}),s=e(i,{variables:this.variables,complete:!!n,previousData:i});s&&(t.cache.writeQuery({query:this.options.query,data:s,variables:this.variables}),t.broadcastQueries())}startPolling(e){this.options.pollInterval=e,this.updatePolling()}stopPolling(){this.options.pollInterval=0,this.updatePolling()}applyNextFetchPolicy(e,t){if(t.nextFetchPolicy){let{fetchPolicy:i="cache-first",initialFetchPolicy:n=i}=t;i==="standby"||(typeof t.nextFetchPolicy=="function"?t.fetchPolicy=t.nextFetchPolicy.call(t,i,{reason:e,options:t,observable:this,initialFetchPolicy:n}):e==="variables-changed"?t.fetchPolicy=n:t.fetchPolicy=t.nextFetchPolicy)}return t.fetchPolicy}fetch(e,t,i,n){let s=this.options.fetchPolicy;e.context??={};let o=!1,a=()=>{o=!0},c=g=>new ee(E=>{try{return g.subscribe({next(S){o=!0,E.next(S)},error:S=>E.error(S),complete:()=>E.complete()})}finally{o||(m.override=t,this.input.next({kind:"N",source:"newNetworkStatus",value:{resetError:!0},query:u,variables:f,meta:{shouldEmit:3,fetchPolicy:s}}))}}),{observable:l,fromLink:h}=this.queryManager.fetchObservableWithInfo(e,{networkStatus:t,query:i,onCacheHit:a,fetchQueryOperator:c,observableQuery:this}),{query:u,variables:f}=this,m={abort:()=>{x.unsubscribe()},query:u,variables:f};this.activeOperations.add(m);let p=t==I.refetch||t==I.setVariables;l=l.pipe(n,yt());let x=l.pipe(Qe({next:g=>{g.source==="newNetworkStatus"||g.kind==="N"&&g.value.loading?m.override=t:delete m.override},finalize:()=>this.activeOperations.delete(m)})).subscribe({next:g=>{let E={};p&&g.kind==="N"&&"loading"in g.value&&!g.value.loading&&(p=!1,E.shouldEmit=1),this.input.next(O(d({},g),{query:u,variables:f,meta:E}))}});return{fromLink:h,subscription:x,observable:l}}didWarnCacheOnlyPolling=!1;updatePolling(){if(this.queryManager.ssrMode)return;let{pollingInfo:e,options:{fetchPolicy:t,pollInterval:i}}=this;if(!i||!this.hasObservers()||t==="cache-only"){!1,this.cancelPolling();return}if(e?.interval===i)return;let n=e||(this.pollingInfo={});n.interval=i;let s=()=>{this.pollingInfo&&(!it(this.networkStatus)&&!this.options.skipPollAttempt?.()?this._reobserve({fetchPolicy:this.options.initialFetchPolicy==="no-cache"?"no-cache":"network-only"},{newNetworkStatus:I.poll}).then(o,o):o())},o=()=>{let a=this.pollingInfo;a&&(clearTimeout(a.timeout),a.timeout=setTimeout(s,a.interval))};o()}cancelPolling(){this.pollingInfo&&(clearTimeout(this.pollingInfo.timeout),delete this.pollingInfo)}reobserve(e){return this._reobserve(e)}_reobserve(e,t){this.isTornDown=!1;let{newNetworkStatus:i}=t||{};this.queryManager.obsQueries.add(this);let n=i===I.refetch||i===I.poll,s=this.variables,o=this.options.fetchPolicy,a=X(this.options,e||{}),c=n?a:bs(this.options,a),l=this.transformDocument(c.query);this.lastQuery=l,e&&"variables"in e&&(c.variables=this.getVariablesWithDefaults(e.variables)),n||(this.updatePolling(),e&&e.variables&&!_(e.variables,s)&&c.fetchPolicy!=="standby"&&(c.fetchPolicy===o||typeof c.nextFetchPolicy=="function")&&(this.applyNextFetchPolicy("variables-changed",c),i===void 0&&(i=I.setVariables)));let h=this.networkStatus;i||(i=I.loading,h!==I.loading&&e?.variables&&!_(e.variables,s)&&(i=I.setVariables),c.fetchPolicy==="standby"&&(i=I.ready)),c.fetchPolicy==="standby"&&this.cancelPolling(),this.resubscribeCache();let{promise:u,operator:f}=la(E=>{switch(E.kind){case"E":throw E.error;case"N":if(E.source!=="newNetworkStatus"&&!E.value.loading)return E.value}},c.fetchPolicy==="standby"?{data:void 0}:void 0),{subscription:m,observable:p,fromLink:x}=this.fetch(c,i,l,f);!n&&(x||!this.linkSubscription)&&(this.linkSubscription&&this.linkSubscription.unsubscribe(),this.linkSubscription=m);let g=Object.assign(Gr(u.then(E=>Ae(this.maskResult(E))).finally(()=>{!this.hasObservers()&&this.activeOperations.size===0&&this.tearDownQuery()})),{retain:()=>{let E=p.subscribe({}),S=()=>E.unsubscribe();return u.then(S,S),g}});return g}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(e
57=>e.unsubscribe()),this.subscriptions.clear(),this.queryManager.obsQueries.delete(this),this.isTornDown=!0,this.abortActiveOperations(),this._lastWrite=void 0)}transformDocument(e){return this.queryManager.transform(e)}maskResult(e){let t=this.queryManager.maskOperation({document:this.query,data:e.data,fetchPolicy:this.options.fetchPolicy,cause:this});return t===e.data?e:O(d({},e),{data:t})}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(e=!1){if(!e){let i=this.queryManager.getDocumentInfo(this.query);if(i.hasClientExports||i.hasForcedResolvers)return}let{dirty:t}=this;if(this.resetNotifications(),t&&(this.options.fetchPolicy=="cache-only"||this.options.fetchPolicy=="cache-and-network"||!this.activeOperations.size)){let i=this.getCacheDiff();_(i.result,this.getCacheDiff({optimistic:!1}).result)?this.reobserveCacheFirst():this.input.next({kind:"N",value:{data:i.result,dataState:i.complete?"complete":i.result?"partial":"empty",networkStatus:I.ready,loading:!1,error:void 0,partial:!i.complete},source:"cache",query:this.query,variables:this.variables,meta:{}})}}activeOperations=new Set;pushOperation(e){let t=!1,{query:i,variables:n}=this,s=()=>{this.activeOperations.delete(o)},o={override:e,abort:()=>{t=!0,s()},query:i,variables:n};return this.activeOperations.add(o),{finalize:s,pushNotification:(a,c)=>{t||this.input.next(O(d({},a),{query:i,variables:n,meta:d({},c)}))}}}calculateNetworkStatus(e){return e===I.streaming?e:Array.from(this.activeOperations.values()).findLast(i=>qt(i,this)&&i.override!==void 0)?.override??e}abortActiveOperations(){this.activeOperations.forEach(e=>e.abort())}reset(){let e=this.options.fetchPolicy==="cache-only";this.setResult(e?Ei:lt,{shouldEmit:e?1:2}),this.abortActiveOperations()}setResult(e,t){this.input.next({source:"setResult",kind:"N",value:e,query:this.query,variables:this.variables,meta:d({},t)})}operator=tt(e=>{let{query:t,variables:i,meta:n}=e;if(e.source==="setResult")return{query:t,variables:i,result:e.value,meta:n};if(e.kind==="C"||!qt(e,this))return;let s,o=this.subject.getValue();if(e.source==="cache"){if(s=e.value,s.networkStatus===I.ready&&s.partial&&(!this.options.returnPartialData||o.result.networkStatus===I.error)&&this.options.fetchPolicy!=="cache-only")return}else if(e.source==="network")this.waitForNetworkResult&&(this.waitForNetworkResult=!1,this.resubscribeCache()),s=e.kind==="E"?O(d({},qt(o,e)?o.result:{data:void 0,dataState:"empty",partial:!0}),{error:e.error,networkStatus:I.error,loading:!1}):e.value,e.kind==="E"&&s.dataState==="streaming"&&(s.dataState="complete"),s.error&&(n.shouldEmit=1);else if(e.source==="newNetworkStatus"){let a=qt(o,e)?o.result:this.getInitialResult(n.fetchPolicy),{resetError:c}=e.value,l=c?void 0:a.error,h=l?I.error:I.ready;s=O(d({},a),{error:l,networkStatus:h})}return v(s),s.error||delete s.error,s.networkStatus=this.calculateNetworkStatus(s.networkStatus),s.loading=it(s.networkStatus),s=this.maskResult(s),{query:t,variables:i,result:s,meta:n}});reobserveCacheFirst(){let{fetchPolicy:e,nextFetchPolicy:t}=this.options;e==="cache-and-network"||e==="network-only"?this.reobserve({fetchPolicy:"cache-first",nextFetchPolicy(i,n){return this.nextFetchPolicy=t,typeof this.nextFetchPolicy=="function"?this.nextFetchPolicy(i,n):e}}):this.reobserve()}getVariablesWithDefaults(e){return this.queryManager.getVariables(this.query,e)}};function vs(r){!1}function qt(r,e){return!!(r&&e&&r.query===e.query&&_(r.variables,e.variables))}function la(r,e){let t=e,i,n,s=new Promise((a,c)=>{i=a,n=c}),o=Qe({next(a){try{let c=r(a);c!==void 0&&(t=c)}catch(c){n(c)}},finalize:()=>{if(t)i(t);else{let a="The operation was aborted.",c="AbortError";n(typeof DOMException<"u"?new DOMException(a,c):Object.assign(new Error(a),{name:c}))}}});return{promise:s,operator:o}}var Es={},ft=new WeakMap;function xi(r,e){let t=r[e];typeof t=="function"&&(r[e]=function(){return ft.set(r,(ft.get(r)+1)%1e15),t.apply(this,arguments)})}var xs=new WeakMap,ht=class{lastRequestId=1;cache;queryManager;id;observableQuery;incremental;constructor(e,t){let i=this.cache=e.cache,n=(xs.get(e)||0)+1;xs.set(e,n),this.id=n+"",this.observableQuery=t,this.queryManager=e,ft.has(i)||(ft.set(i,0),xi(i,"evict"),xi(i,"modify"),xi(i,"reset"))}_lastWrite;get lastWrite(){return(this.observableQuery||this)._lastWrite}set lastWrite(e){(this.observableQuery||this)._lastWrite=e}resetLastWrite(){this.lastWrite=void 0}shouldWrite(e,t){let{lastWrite:i}=this;return!(i&&i.dmCount===ft.get(this.cache)&&_(t,i.variables)&&_(e.data,i.result.data))}get hasNext(){return this.incremental?this.incremental.hasNext:!1}maybeHandleIncrementalResult(e,t,i){let{incrementalHandler:n}=this.queryManager;return n.isIncrementalResult(t)?(this.incremental||=n.startRequest
57({query:i}),this.incremental.handle(e,t)):t}markQueryResult(e,{document:t,variables:i,errorPolicy:n,cacheWriteBehavior:s}){let o={query:t,variables:i,returnPartialData:!0,optimistic:!0};this.observableQuery?.resetNotifications();let a=s===0,c=a?void 0:this.cache.diff(o),l=this.maybeHandleIncrementalResult(c?.result,e,t);return a||(Oi(l,n)?this.cache.batch({onWatchUpdated:(h,u)=>{h.watcher===this.observableQuery&&(h.lastOwnDiff=u)},update:h=>{if(this.shouldWrite(l,i))h.writeQuery({query:t,data:l.data,variables:i,overwrite:s===1}),this.lastWrite={result:l,variables:i,dmCount:ft.get(this.cache)};else if(c&&c.complete){l=O(d({},l),{data:c.result});return}let u=h.diff(o);u.complete&&(l=O(d({},l),{data:u.result}))}}):this.lastWrite=void 0),l}markMutationResult(e,t,i=this.cache){let n=[],s=t.cacheWriteBehavior===0,o=this.maybeHandleIncrementalResult(s?void 0:i.diff({id:"ROOT_MUTATION",query:this.queryManager.getDocumentInfo(t.document).asQuery,variables:t.variables,optimistic:!1,returnPartialData:!0}).result,e,t.document);if(t.errorPolicy==="ignore"&&(o=O(d({},o),{errors:[]})),pe(o)&&t.errorPolicy==="none")return Promise.resolve(o);let a=()=>O(d({},o),{dataState:this.hasNext?"streaming":"complete"});if(!s&&Oi(o,t.errorPolicy)){n.push({result:o.data,dataId:"ROOT_MUTATION",query:t.document,variables:t.variables});let{updateQueries:l}=t;l&&this.queryManager.getObservableQueries("all").forEach(h=>{let u=h&&h.queryName;if(!u||!Object.hasOwnProperty.call(l,u))return;let f=l[u],{query:m,variables:p}=h,{result:x,complete:g}=h.getCacheDiff({optimistic:!1});if(g&&x){let E=f(x,{mutationResult:a(),queryName:m&&Q(m)||void 0,queryVariables:p});E&&n.push({result:E,dataId:"ROOT_QUERY",query:m,variables:p})}})}let c=t.refetchQueries;if(typeof c=="function"&&(c=c(a())),n.length>0||(c||"").length>0||t.update||t.onQueryUpdated||t.removeOptimistic){let l=[];if(this.queryManager.refetchQueries({updateCache:h=>{s||n.forEach(f=>h.write(f));let{update:u}=t;if(u){if(!s){let f=h.diff({id:"ROOT_MUTATION",query:this.queryManager.getDocumentInfo(t.document).asQuery,variables:t.variables,optimistic:!1,returnPartialData:!0});f.complete&&(o=O(d({},o),{data:f.result}))}this.hasNext||u(h,o,{context:t.context,variables:t.variables})}!s&&!t.keepRootFields&&!this.hasNext&&h.modify({id:"ROOT_MUTATION",fields(f,{fieldName:m,DELETE:p}){return m==="__typename"?f:p}})},include:c,optimistic:!1,removeOptimistic:t.removeOptimistic,onQueryUpdated:t.onQueryUpdated||null}).forEach(h=>l.push(h)),t.awaitRefetchQueries||t.onQueryUpdated)return Promise.all(l).then(()=>o)}return Promise.resolve(o)}markMutationOptimistic(e,t){let i=typeof e=="function"?e(t.variables,{IGNORE:Es}):e;return i===Es?!1:(this.cache.recordOptimisticTransaction(n=>{try{this.markMutationResult({data:i},t,n)}catch(s){v.error(s)}},this.id),!0)}markSubscriptionResult(e,{document:t,variables:i,errorPolicy:n,cacheWriteBehavior:s}){s!==0&&(Oi(e,n)&&this.cache.write({query:t,result:e.data,dataId:"ROOT_SUBSCRIPTION",variables:i}),this.queryManager.broadcastQueries())}};function Oi(r,e="none"){let t=e==="ignore"||e==="all",i=!pe(r);return!i&&t&&r.data&&(i=!0),i}var br=class{defaultOptions;client;clientOptions;assumeImmutableResults;documentTransform;ssrMode;defaultContext;dataMasking;incrementalHandler;localState;queryDeduplication;prioritizeCacheValues=!1;onBroadcast;mutationStore;obsQueries=new Set;fetchCancelFns=new Map;constructor(e){let t=new de(n=>this.cache.transformDocument(n),{cache:!1});this.client=e.client,this.defaultOptions=e.defaultOptions,this.queryDeduplication=e.queryDeduplication,this.clientOptions=e.clientOptions,this.ssrMode=e.ssrMode,this.assumeImmutableResults=e.assumeImmutableResults,this.dataMasking=e.dataMasking,this.localState=e.localState,this.incrementalHandler=e.incrementalHandler;let i=e.documentTransform;this.documentTransform=i?t.concat(i).concat(t):t,this.defaultContext=e.defaultContext||{},(this.onBroadcast=e.onBroadcast)&&(this.mutationStore={})}get link(){return this.client.link}get cache(){return this.client.cache}stop(){this.obsQueries.forEach(e=>e.stop()),this.cancelPendingFetches(M(83))}cancelPendingFetches(e){this.fetchCancelFns.forEach(t=>t(e)),this.fetchCancelFns.clear()}mutate(m){return pt(this,arguments,function*({mutation:e,variables:t,optimisticResponse:i,updateQueries:n,refetchQueries:s=[],awaitRefetchQueries:o=!1,update:a,onQueryUpdated:c,fetchPolicy:l,errorPolicy:h,keepRootFields:u,context:f}){let p=new ht(this);e=this.cache.transformForLink(this.transform(e));let{hasClientExports:x}=this.getDocumentInfo(e);t=this.getVariables(e,t),x&&(!1,t=yield this.localState.getExportedVariables({client:this.client,document:e,variables:t,context:f}));let g=this.mutationStore&&(this.mutationStore[p.id]={mutation:e,variables:t,loading:!0,error:null}),E=i&&p.markMutationOptimistic(i,{document:e,variables:t,cacheWriteBehavior:l==="no-cache"?0:2,errorPolicy:h,context:f,updateQueries:n,update:a,keepRootFields:u});return this.broadcastQueries(),new Promise((S,D)=>{let A={};return this.getObservableFromLink(e,O(d({},f),{optimisticResponse:E?i:void 0}),t,{},!1).observable.pipe(Os(),dt(N=>{let Z=d({},N);return ye(p.markMutationResult(Z,{document:e,variables:t,cacheWriteBehavior:l==="no-cache"?0:2,errorPolicy:h,context:f,update:a,updateQueries:n,awaitRefetchQueries:o,refetchQueries:s,removeOptimistic:E?p.id:void 0,onQueryUpdated:c,keepRootFields:u}))})).pipe(te(N=>{if(pe(N)&&h==="none")throw new Ve(N);return g&&(g.loading=!1,g.error=null),N})).subscribe({next:N=>{if(this.broadcastQueries(),!p.hasNext){let Z={data:this.maskOperation({document:e,data:N.data,fetchPolicy:l,cause:A})};pe(N)&&(Z.error=new Ve(N)),Object.keys(N.extensions||{}).length&&(Z.extensions=N.extensions),S(Z)}},error:N=>{if(g&&(g.loading=!1,g.error=N),E&&this.cache.removeOptimistic(p.id),this.broadcastQueries(),h==="ignore")return S({data:void 0});if(h==="all")return S({data:void 0,error:N});D(N)}})})})}fetchQuery(e,t){return $(e.query,G.QUERY),pt(this,null,function*(){return Ci(this.fetchObservableWithInfo(e,{networkStatus:t}).observable.pipe(tt(i=>{switch(i.kind){case"E":throw i.error;case"N":if(i.source!=="newNetworkStatus")return Ae(i.value)}})),{defaultValue:{data:void 0}})})}transform(e){return this.documentTransform.transformDocument(e)}transformCache=new wt(q["queryManager.getDocumentInfo"]||2e3);getDocumentInfo(e){let{transformCache:t}=this;if(!t.has(e)){let n=z(e),s={hasClientExports:Ee(["client","export"],e,!0),hasForcedResolvers:Ur(e),hasNonreactiveDirective:Ee(["nonreactive"],e),hasIncrementalDirective:Ee(["defer"],e),nonReactiveQuery:fa(e),clientQuery:Ee(["client"],e)?e:null,serverQuery:$r([{name:"client",remove:!0},{name:"connection"},{name:"nonreactive"},{name:"unmask"}],e),operationType:n?.operation,defaultVars:Ce(n),asQuery:O(d({},e),{definitions:e.definitions.map(o=>o.kind==="OperationDefinition"&&o.operation!=="query"?O(d({},o),{operation:"query"}):o)})};t.set(e,s)}let i=t.get(e);if(i.violation)throw i.violation;return i}getVariables(e,t){let i=this.getDocumentInfo(e).defaultVars,n=Object.entries(t??{}).map(([s,o])=>[s,o===void 0?i[s]:o]);return d(d({},i),Object.fromEntries(n))}watchQuery(e){$(e.query,G.QUERY);let t=this.transform(e.query);return e=O(d({},e),{variables:this.getVariables(t,e.variables)}),typeof e.notifyOnNetworkStatusChange>"u"&&(e.notifyOnNetworkStatusChange=!0),new ut({queryManager:this,options:e,transformedQuery:t})}query(e){let t=this.transform(e.query);return this.fetchQuery(O(d({},e),{query:t})).then(i=>O(d({},i),{data:this.maskOperation({document:t,data:i?.data,fetchPolicy:e.fetchPolicy})}))}requestIdCounter=1;generateRequestId(){return this.requestIdCounter++}clearStore(e={discardWatches:!0}){return this.cancelPendingFetches(M(85)),this.obsQueries.forEac
57h(t=>{t.reset()}),this.mutationStore&&(this.mutationStore={}),this.cache.reset(e)}getObservableQueries(e="active"){let t=new Set,i=new Map,n=new Map,s=new Set;return Array.isArray(e)&&e.forEach(o=>{if(typeof o=="string")i.set(o,o),n.set(o,!1);else if(zr(o)){let a=Oe(this.transform(o));i.set(a,Q(o)),n.set(a,!1)}else R(o)&&o.query&&s.add(o)}),this.obsQueries.forEach(o=>{let a=Oe(this.transform(o.options.query));if(e==="all"){t.add(o);return}let{queryName:c,options:{fetchPolicy:l}}=o;e==="active"&&l==="standby"||(e==="active"||c&&n.has(c)||a&&n.has(a))&&(t.add(o),c&&n.set(c,!0),a&&n.set(a,!0))}),s.size&&s.forEach(o=>{let a=new ut({queryManager:this,options:O(d({},o),{fetchPolicy:"network-only"})});t.add(a)}),!1,t}refetchObservableQueries(e=!1){let t=[];return this.getObservableQueries(e?"all":"active").forEach(i=>{let{fetchPolicy:n}=i.options;(e||n!=="standby")&&n!=="cache-only"&&t.push(i.refetch())}),this.broadcastQueries(),Promise.all(t)}startGraphQLSubscription(e){let{query:t,variables:i}=e,{fetchPolicy:n,errorPolicy:s="none",context:o={},extensions:a={}}=e;$(t,G.SUBSCRIPTION),t=this.transform(t),i=this.getVariables(t,i);let c;!1;let l=(this.getDocumentInfo(t).hasClientExports?ye(this.localState.getExportedVariables({client:this.client,document:t,variables:i,context:o})):ke(i)).pipe(dt(h=>{let{observable:u,restart:f}=this.getObservableFromLink(t,o,h,a),m=new ht(this);return c=f,u.pipe(te(p=>{m.markSubscriptionResult(p,{document:t,variables:h,errorPolicy:s,cacheWriteBehavior:n==="no-cache"?0:2});let x={data:p.data??void 0};return pe(p)?x.error=new Ve(p):ys(p)&&(x.error=p.extensions[gr],delete p.extensions[gr]),p.extensions&&Object.keys(p.extensions).length&&(x.extensions=p.extensions),x.error&&s==="none"&&(x.data=void 0),s==="ignore"&&delete x.error,x}),Wt(p=>s==="ignore"?ke({data:void 0}):ke({data:void 0,error:p})),Sr(p=>!!(p.data||p.error)))}));return Object.assign(l,{restart:()=>c?.()})}broadcastQueries(){this.onBroadcast&&this.onBroadcast(),this.obsQueries.forEach(e=>e.notify())}inFlightLinkObservables=new H(!1);getObservableFromLink(e,t,i,n,s=t?.queryDeduplication??this.queryDeduplication){let o={},{serverQuery:a,clientQuery:c,operationType:l,hasIncrementalDirective:h}=this.getDocumentInfo(e),u=Q(e),f={client:this.client};if(a){let{inFlightLinkObservables:p,link:x}=this;try{let E=function(S){return new ee(D=>{function A(){return S.subscribe({next:D.next.bind(D),complete:D.complete.bind(D),error:D.error.bind(D)})}let N=A();return o.restart||=()=>{N.unsubscribe(),N=A()},()=>{N.unsubscribe(),o.restart=void 0}})};var m=E;let g=this.incrementalHandler.prepareRequest({query:a,variables:i,context:O(d(d({},this.defaultContext),t),{queryDeduplication:s}),extensions:n});if(t=g.context,s){let S=Oe(a),D=W(i);o=p.lookup(S,D),o.observable||(o.observable=Re(x,g,f).pipe(E,_i(()=>{p.peek(S,D)===o&&p.remove(S,D)}),l===G.SUBSCRIPTION?yt():Ri({refCount:!0})))}else o.observable=Re(x,g,f).pipe(E)}catch(g){o.observable=Fi(()=>g)}}else o.observable=ke({data:{}});if(c){let{operation:p}=z(e);!1,v(!h,90,p[0].toUpperCase()+p.slice(1),u??"(anonymous)"),o.observable=o.observable.pipe(dt(x=>ye(this.localState.execute({client:this.client,document:c,remoteResult:x,context:t,variables:i}))))}return{restart:()=>o.restart?.(),observable:o.observable.pipe(Wt(p=>{throw p=gs(p),vi(p),p}))}}getResultsFromLink(e,{queryInfo:t,cacheWriteBehavior:i,observableQuery:n}){let s=t.lastRequestId=this.generateRequestId(),{errorPolicy:o}=e,a=this.cache.transformForLink(e.query);return this.getObservableFromLink(a,e.context,e.variables).observable.pipe(te(c=>{let l=t.markQueryResult(c,O(d({},e),{document:a,cacheWriteBehavior:i})),h=pe(l);if(h&&o==="none")throw t.resetLastWrite(),n?.resetNotifications(),new Ve(l);let u=d({data:l.data},t.hasNext?{loading:!0,networkStatus:I.streaming,dataState:"streaming",partial:!0}:{dataState:l.data?"complete":"empty",loading:!1,networkStatus:I.ready,partial:!l.data});return h&&(o==="none"&&(u.data=void 0,u.dataState="empty"),o!=="ignore"&&(u.error=new Ve(l),u.dataState!=="streaming"&&(u.networkStatus=I.error))),u}),Wt(c=>{if(s>=t.lastRequestId&&o==="none")throw t.resetLastWrite(),n?.resetNotifications(),c;let l={data:void 0,dataState:"empty",loading:!1,networkStatus:I.ready,partial:!0};return o!=="ignore"&&(l.error=c,l.networkStatus=I.error),ke(l)}))}fetchObservableWithInfo(e,{networkStatus:t=I.loading,query:i=e.query,fetchQueryOperator:n=a=>a,onCacheHit:s=()=>{},observableQuery:o}){let a=this.getVariables(i,e.variables),c=this.defaultOptions.watchQuery,{fetchPolicy:l=c&&c.fetchPolicy||"cache-first",errorPolicy:h=c&&c.errorPolicy||"none",returnPartialData:u=!1,notifyOnNetworkStatusChange:f=!0,context:m={}}=e;this.prioritizeCacheValues&&(l==="network-only"||l==="cache-and-network")&&(l="cache-first");let p=Object.assign({},e,{query:i,variables:a,fetchPolicy:l,errorPolicy:h,returnPartialData:u,notifyOnNetworkStatusChange:f,context:m}),x=new ht(this,o),g=N=>{p.variables=N;let Z=l==="no-cache"?0:t===I.refetch&&p.refetchWritePolicy!=="merge"?1:2,qe=this.fetchQueryByPolicy(p,{queryInfo:x,cacheWriteBehavior:Z,onCacheHit:s,observableQuery:o});return qe.observable=qe.observable.pipe(n),p.fetchPolicy!=="standby"&&o?.applyNextFetchPolicy("after-fetch",e),qe},E=()=>{this.fetchCancelFns.delete(x.id)};this.fetchCancelFns.set(x.id,N=>{S.next({kind:"E",error:N,source:"network"})});let S=new Bt,D,A;
57if(this.getDocumentInfo(p.query).hasClientExports)!1,D=ye(this.localState.getExportedVariables({client:this.client,document:p.query,variables:p.variables,context:p.context})).pipe(dt(N=>g(N).observable)),A=!0;else{let N=g(p.variables);A=N.fromLink,D=N.observable}return{observable:new ee(N=>{N.add(E),D.subscribe(N),S.subscribe(N)}).pipe(yt()),fromLink:A}}refetchQueries({updateCache:e,include:t,optimistic:i=!1,removeOptimistic:n=i?xt("refetchQueries"):void 0,onQueryUpdated:s}){let o=new Map;t&&this.getObservableQueries(t).forEach(c=>{if(c.options.fetchPolicy==="cache-only")return;let l=c.getCurrentResult();o.set(c,{oq:c,lastDiff:{result:l?.data,complete:!l?.partial}})});let a=new Map;if(e){let c=new Set;this.cache.batch({update:e,optimistic:i&&n||!1,removeOptimistic:n,onWatchUpdated(l,h,u){let f=l.watcher;if(f instanceof ut&&!c.has(f)){if(c.add(f),s){o.delete(f);let m=s(f,h,u);return m===!0&&(m=f.refetch().retain()),m!==!1&&a.set(f,m),m}s!==null&&f.options.fetchPolicy!=="cache-only"&&o.set(f,{oq:f,lastDiff:u,diff:h})}}})}return o.size&&o.forEach(({oq:c,lastDiff:l,diff:h})=>{let u;s&&(h||(h=c.getCacheDiff()),u=s(c,h,l)),(!s||u===!0)&&(u=c.refetch().retain()),u!==!1&&a.set(c,u)}),n&&this.cache.removeOptimistic(n),a}noCacheWarningsByCause=new WeakSet;maskOperation(e){let{document:t,data:i}=e;if(!1){let{fetchPolicy:n,cause:s={}}=e,o=z(t)?.operation;this.dataMasking&&n==="no-cache"&&!ua(t)&&!this.noCacheWarningsByCause.has(s)&&(this.noCacheWarningsByCause.add(s),!1)}return this.dataMasking?ai(i,t,this.cache):i}maskFragment(e){let{data:t,fragment:i,fragmentName:n}=e;return this.dataMasking?oi(t,i,this.cache,n):t}fetchQueryByPolicy({query:e,variables:t,fetchPolicy:i,errorPolicy:n,returnPartialData:s,context:o},{cacheWriteBehavior:a,onCacheHit:c,queryInfo:l,observableQuery:h}){let u=()=>this.cache.diff({query:e,variables:t,returnPartialData:!0,optimistic:!0}),f=(p,x)=>{let g=p.result;!1;let E=D=>(!p.complete&&!s&&(D=void 0),{data:D,dataState:p.complete?"complete":D?"partial":"empty",loading:it(x),networkStatus:x,partial:!p.complete}),S=D=>ke({kind:"N",value:E(D),source:"cache"});return(p.complete||s)&&this.getDocumentInfo(e).hasForcedResolvers?(!1,c(),ye(this.localState.execute({client:this.client,document:e,remoteResult:g?{data:g}:void 0,context:o,variables:t,onlyRunForcedResolvers:!0,returnPartialData:!0}).then(D=>({kind:"N",value:E(D.data||void 0),source:"cache"})))):n==="none"&&x===I.refetch&&p.missing?S(void 0):S(g||void 0)},m=()=>this.getResultsFromLink({query:e,variables:t,context:o,fetchPolicy:i,errorPolicy:n},{cacheWriteBehavior:a,queryInfo:l,observableQuery:h}).pipe(Os(),Ai(),te(p=>O(d({},p),{source:"network"})));switch(i){default:case"cache-first":{let p=u();return p.complete?{fromLink:!1,observable:f(p,I.ready)}:s?{fromLink:!0,observable:zt(f(p,I.loading),m())}:{fromLink:!0,observable:m()}}case"cache-and-network":{let p=u();return p.complete||s?{fromLink:!0,observable:zt(f(p,I.loading),m())}:{fromLink:!0,observable:m()}}case"cache-only":return{fromLink:!1,observable:zt(f(u(),I.ready))};case"network-only":return{fromLink:!0,observable:m()};case"no-cache":return{fromLink:!0,observable:m()};case"standby":return{fromLink:!1,observable:mt}}}};function Os(){let r=!1;return Qe({next(){r=!0},complete(){v(r,94)}})}function ua(r){let e=!0;return j(r,{FragmentSpread:t=>{if(e=!!t.directives&&t.directives.some(i=>i.name.value==="unmask"),!e)return ue}}),e}function fa(r){return j(r,{FragmentSpread:e=>{if(!e.directives?.some(t=>t.name.value==="unmask"))return O(d({},e),{directives:[...e.directives||[],{kind:b.DIRECTIVE,name:{kind:b.NAME,value:"nonreactive"}}
57]})}})}var Ss=!1,je=class{link;cache;disableNetworkFetches;set prioritizeCacheValues(e){this.queryManager.prioritizeCacheValues=e}get prioritizeCacheValues(){return this.queryManager.prioritizeCacheValues}version;queryDeduplication;defaultOptions;devtoolsConfig;queryManager;devToolsHookCb;resetStoreCallbacks=[];clearStoreCallbacks=[];constructor(e){!1;let{cache:t,documentTransform:i,ssrMode:n=!1,ssrForceFetchDelay:s=0,queryDeduplication:o=!0,defaultOptions:a,defaultContext:c,assumeImmutableResults:l=t.assumeImmutableResults,localState:h,devtools:u,dataMasking:f,link:m,incrementalHandler:p=new Rt}=e;this.link=m,this.cache=t,this.queryDeduplication=o,this.defaultOptions=a||{},this.devtoolsConfig=O(d({},u),{enabled:u?.enabled??!1}),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=Et,this.queryManager=new br({client:this,defaultOptions:this.defaultOptions,defaultContext:c,documentTransform:i,queryDeduplication:o,ssrMode:n,dataMasking:!!f,clientOptions:e,incrementalHandler:p,assumeImmutableResults:l,onBroadcast:this.devtoolsConfig.enabled?()=>{this.devToolsHookCb&&this.devToolsHookCb()}:void 0,localState:h}),this.prioritizeCacheValues=n||s>0,s&&setTimeout(()=>{this.prioritizeCacheValues=!1},s),this.devtoolsConfig.enabled&&this.connectToDevTools()}connectToDevTools(){if(typeof window>"u")return;let e=window,t=Symbol.for("apollo.devtools");(e[t]=e[t]||[]).push(this),e.__APOLLO_CLIENT__=this,!Ss&&!1&&(Ss=!0,window.document&&window.top===window.self&&/^(https?|file):$/.test(window.location.protocol)&&setTimeout(()=>{if(!window.__APOLLO_DEVTOOLS_GLOBAL_HOOK__){let i=window.navigator,n=i&&i.userAgent,s;typeof n=="string"&&(n.indexOf("Chrome/")>-1?s="https://chrome.google.com/webstore/detail/apollo-client-developer-t/jdkknkkbebbapilgoeccciglkfbmbnfm":n.indexOf("Firefox/")>-1&&(s="https://addons.mozilla.org/en-US/firefox/addon/apollo-developer-tools/")),s&&!1&&v.log("Download the Apollo DevTools for a better development experience: %s",s)}},1e4))}get documentTransform(){return this.queryManager.documentTransform}get localState(){return this.queryManager.localState}set localState(e){this.queryManager.localState=e}stop(){this.queryManager.stop()}watchQuery(e){return this.defaultOptions.watchQuery&&(e=_t(this.defaultOptions.watchQuery,e)),this.queryManager.watchQuery(e)}query(e){return this.defaultOptions.query&&(e=_t(this.defaultOptions.query,e)),!1,this.queryManager.query(e)}mutate(e){let t=_t(X({fetchPolicy:"network-only",errorPolicy:"none"},this.defaultOptions.mutate),e);return!1,$(t.mutation,G.MUTATION),this.queryManager.mutate(t)}subscribe(e){let t={},i=this.queryManager.startGraphQLSubscription(e),n=i.pipe(te(s=>O(d({},s),{data:this.queryManager.maskOperation({document:e.query,data:s.data,fetchPolicy:e.fetchPolicy,cause:t})})));return Object.assign(n,{restart:i.restart})}readQuery(e,t=!1){return this.cache.readQuery(O(d({},e),{query:this.transform(e.query)}),t)}watchFragment(e){let t=this.queryManager.dataMasking;return this.cache.watchFragment(O(d({},e),{fragment:this.transform(e.fragment,t)})).pipe(te(i=>{if(!1){let n=this.queryManager.maskFragment(O(d({},e),{data:i.data}));return O(d({},i),{data:n})}return i}))}readFragment(e,t=!1){return this.cache.readFragment(O(d({},e),{fragment:this.transform(e.fragment)}),t)}writeQuery(e){let t=this.cache.writeQuery(e);return e.broadcast!==!1&&this.queryManager.broadcastQueries(),t}writeFragment(e){let t=this.cache.writeFragment(e);return e.broadcast!==!1&&this.queryManager.broadcastQueries(),t}__actionHookForDevTools(e){this.devToolsHookCb=e}__requestRaw(e){return Re(this.link,e,{client:this})}resetStore(){return Promise.resolve().then(()=>this.queryManager.clearStore({discardWatches:!1})).then(()=>Promise.all(this.resetStoreCallbacks.map(e=>e()))).then(()=>this.refetchObservableQueries())}clearStore(){return Promise.resolve().then(()=>this.queryManager.clearStore({discardWatches:!0})).then(()=>Promise.all(this.clearStoreCallbacks.map(e=>e())))}onResetStore(e){return this.resetStoreCallbacks.push(e),()=>{this.resetStoreCallbacks=this.resetStoreCallbacks.filter(t=>t!==e)}}onClearStore(e){return this.clearStoreCallbacks.push(e),()=>{this.clearStoreCallbacks=this.clearStoreCallbacks.filter(t=>t!==e)}}reFetchObservableQueries;refetchObservableQueries(e){return this.queryManager.refetchObservableQueries(e)}refetchQueries(e){let t=this.queryManager.refetchQueries(e),i=[],n=[];t.forEach((o,a)=>{i.push(a),n.push(o)});let s=Promise.all(n);return s.queries=i,s.results=n,s.catch(o=>{!1}),s}getObservableQueries(e="active"){return this.queryManager.getObservableQueries(e)}extract(e){return this.cache.extract(e)}restore(e){return this.cache.restore(e)}setLink(e){this.link=e}get defaultContext(){return this.queryManager.defaultContext}maskedFragmentTransform=new de(Kr);transform(e,t=!1){let i=this.queryManager.transform(e);return t?this.maskedFragmentTransform.transformDocument(i):i}};!1;var vr=new Map,Si=new Map,Ts=!0,Er=!1;function ks(r){return r.replace(/[\s,]+/g," ").trim()}function ha(r){return ks(r.source.body.substring(r.start,r.end))}function pa(r){var e=new Set,t=[];return r.definitions.forEach(function(i){if(i.kind==="FragmentDefinition"){var n=i.name.value,s=ha(i.loc),o=Si.get(n);o&&!o.has(s)?Ts&&console.warn("Warning: fragment with name "+n+` already exists.
58graphql-tag enforces all fragment names across your application to be unique; read more about
59this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):o||Si.set(n,o=new Set),o.add(s),e.has(s)||(e.add(s),t.push(i))}else t.push(i)}),Or(Or({},r),{definitions:t})}function ma(r){var e=new Set(r.definitions);
59e.forEach(function(i){i.loc&&delete i.loc,Object.keys(i).forEach(function(n){var s=i[n];s&&typeof s=="object"&&e.add(s)})});var t=r.loc;return t&&(delete t.startToken,delete t.endToken),r}function da(r){var e=ks(r);if(!vr.has(e)){var t=er(r,{experimentalFragmentVariables:Er,allowLegacyFragmentVariables:Er});if(!t||t.kind!=="Document")throw new Error("Not a valid GraphQL document.");vr.set(e,ma(pa(t)))}return vr.get(e)}function Te(r){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];typeof r=="string"&&(r=[r]);var i=r[0];return e.forEach(function(n,s){n&&n.kind==="Document"?i+=n.loc.source.body:i+=n,i+=r[s+1]}),da(i)}function Ds(){vr.clear(),Si.clear()}function Ns(){Ts=!1}function ws(){Er=!0}function Is(){Er=!1}var Qt={gql:Te,resetCaches:Ds,disableFragmentWarnings:Ns,enableExperimentalFragmentVariables:ws,disableExperimentalFragmentVariables:Is};(function(r){r.gql=Qt.gql,r.resetCaches=Qt.resetCaches,r.disableFragmentWarnings=Qt.disableFragmentWarnings,r.enableExperimentalFragmentVariables=Qt.enableExperimentalFragmentVariables,r.disableExperimentalFragmentVariables=Qt.disableExperimentalFragmentVariables})(Te||(Te={}));Te.default=Te;function Fs(r){return new ee(e=>(r().then(t=>{e.closed||(e.next(t),e.complete())},t=>{e.closed||e.error(t)}),()=>e.unsubscribe()))}function ya(r,e){return e?r.pipe(te(t=>O(d({},t),{loading:!1})),Mi({data:void 0,loading:!0})):r.pipe(te(t=>O(d({},t),{loading:!1})))}var ki=class{zone;constructor(e){this.zone=e}now=Date.now;schedule(e,t=0,i){return this.zone.run(()=>wi.schedule(e,t,i))}};function Di(r,e){return r.pipe(Ii(new ki(e)))}var Ni=class{obsQuery;valueChanges;constructor(e,t){this.obsQuery=e,this.valueChanges=Di(ye(this.obsQuery),t)}get options(){return this.obsQuery.options}get variables(){return this.obsQuery.variables}getCurrentResult(){return this.obsQuery.getCurrentResult()}refetch(e){return this.obsQuery.refetch(e)}fetchMore(e){return this.obsQuery.fetchMore(e)}subscribeToMore(e){return this.obsQuery.subscribeToMore(e)}updateQuery(e){return this.obsQuery.updateQuery(e)}stopPolling(){return this.obsQuery.stopPolling()}startPolling(e){return this.obsQuery.startPolling(e)}setVariables(e){return this.obsQuery.setVariables(e)}reobserve(e){return this.obsQuery.reobserve(e)}},Cs=new Gt("APOLLO_FLAGS"),_s=new Gt("APOLLO_OPTIONS"),ga=new Gt("APOLLO_NAMED_OPTIONS"),xr=class{ngZone;flags;_client;useMutationLoading;constructor(e,t,i){this.ngZone=e,this.flags=t,this._client=i,this.useMutationLoading=t?.useMutationLoading??!1}watchQuery(e){return new Ni(this.ensureClient().watchQuery(d({},e)),this.ngZone)}query(e){return Fs(()=>this.ensureClient().query(d({},e)))}mutate(e){return ya(Fs(()=>this.ensureClient().mutate(d({},e))),e.useMutationLoading??this.useMutationLoading)}watchFragment(e){let s=e,{useZone:t}=s,i=B(s,["useZone"]),n=this.ensureClient().watchFragment(d({},i));return t!==!0?n:Di(n,this.ngZone)}subscribe(e){let s=e,{useZone:t}=s,i=B(s,["useZone"]),n=this.ensureClient().subscribe(d({},i));return t!==!0?n:Di(n,this.ngZone)}get client(){return this.ensureClient()}set client(e){if(this._client)throw new Error("Client has been already defined");this._client=e}ensureClient(){return this.checkInstance(),this._client}checkInstance(){if(this._client)return!0;throw new Error("Client has not been defined yet")}},ba=(()=>{class r extends xr{map=new Map;constructor(t,i,n,s){if(super(t,s),i&&this.createDefault(i),n&&typeof n=="object"){for(let o in n)if(n.hasOwnProperty(o)){let a=n[o];this.create(a,o)}}}create(t,i){Ti(i)?this.createNamed(i,t):this.createDefault(t)}default(){return this}use(t){return Ti(t)?this.map.get(t):this.default()}createDefault(t){if(this._client)throw new Error("Apollo has been already created.");this.client=this.ngZone.runOutsideAngular(()=>new je(t))}createNamed(t,i){if(this.map.has(t))throw new Error(`Client ${t} has been already created`);this.map.set(t,new xr(this.ngZone,this.flags,this.ngZone.runOutsideAngular(()=>new je(i))))}removeClient(t){Ti(t)?this.map.delete(t):this._client=void 0}static \u0275fac=function(i){return new(i||r)(gt(Pi),gt(_s,8),gt(ga,8),gt(Cs,8))};static \u0275prov=Be({token:r,factory:r.\u0275fac})}return r})();function Ti(r){return!!r&&r!=="default"}function wy(r,e={}){return[ba,{provide:_s,useFactory:r},{provide:Cs,useValue:e}]}var va=Te,Iy=va;export{rr as a,rt as b,jt as c,Ve as d,gr as e,ys as f,gs as g,ba as h,wy as i,Iy as j,ji as k,Qi as l};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.