1var e,t=Object.defineProperty,r=(e,r,n)=>((e,r,n)=>r in e?t(e,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[r]=n)(e,"symbol"!=typeof r?r+"":r,n);!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"821ea7e147f045d2860a3e0d1e100e4ae59e5c20"};var t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="e4b5cc05-1bbe-48e0-b1c1-cd086a7ff8c6",e._sentryDebugIdIdentifier="sentry-dbid-e4b5cc05-1bbe-48e0-b1c1-cd086a7ff8c6")}catch(r){}}();import{R as n,r as i}from"./chunk-DbxBeaFY.js";import{K as s,v as o,B as a,p as c,O as u}from"./chunk-CtPuOAEL.js";function l(e){try{return e()}catch{}}const h=l(()=>globalThis)||l(()=>window)||l(()=>self)||l(()=>global)||l(function(){return l.constructor("return this")()}),f="4.1.4",d=new Map;function p(e){const t=d.get(e)||1;return d.set(e,t+1),`${e}:${t}:${Math.random().toString(36).slice(2)}`}const y="Invariant Violation";class m extends Error{constructor(e=y){super(e),this.name=y,Object.setPrototypeOf(this,m.prototype)}}const b=["debug","log","warn","error","silent"];let v=b.indexOf("silent");function g(e,...t){if(!e)throw k(...t)}function w(e){return function(t,...r){if(b.indexOf(e)>=v){const n=console[e]||console.log;if("number"==typeof t){const e=t;(t=O(e))||(t=_(e,r),r=[])}n(t,...r)}}}function k(e,...t){return new m(O(e,t)||_(e,t))}g.debug=w("debug"),g.log=w("log"),g.warn=w("warn"),g.error=w("error");const S=Symbol.for("ApolloErrorMessageHandler_"+f);function x(e){if("string"==typeof e)return e;try{return function(e,t=0){const r=p("stringifyForDisplay");return JSON.stringify(e,(e,t)=>void 0===t?r:t,t).split(JSON.stringify(r)).join("<undefined>")}(e,2).slice(0,1e3)}catch{return"<non-serializable>"}}function O(e,t=[]){if(e)return h[S]&&h[S](e,t.map(x))}function _(e,t=[]){if(e)return"string"==typeof e?t.reduce((e,t)=>e.replace(/%[sdfo]/,x(t)),e):`An error occurred! For more details, see the full error text at https://go.apollo.dev/c/err#${encodeURIComponent(JSON.stringify({version:f,message:e,args:t.map(x)}))}`}const E=Symbol.for("__APOLLO_CONTEXT__");function P(){g("createContext"in n,37);let e=i.createContext[E];return e||(Object.defineProperty(i.createContext,E,{value:e=i.createContext({}),enumerable:!1,writable:!1,configurable:!0}),e.displayName="ApolloContext"),e}const C=({client:e,children:t})=>{const r=P(),n=i.useContext(r),s=i.useMemo(()=>({...n,client:e||n.client}),[n,e]);return g(s.client,38),i.createElement(r.Provider,{value:s},t)};function R(e){const t=i.useContext(P()),r=e||t.client;return g(!!r,28),r}const{toString:I,hasOwnProperty:F}=Object.prototype,q=Function.prototype.toString,T=new Map;function j(e,t){try{return M(e,t)}finally{T.clear()}}function M(e,t){if(e===t)return!0;const r=I.call(e);if(r!==I.call(t))return!1;switch(r){case"[object Array]":if(e.length!==t.length)return!1;case"[object Object]":{if(Q(e,t))return!0;const r=N(e),n=N(t),i=r.length;if(i!==n.length)return!1;for(let e=0;e<i;++e)if(!F.call(t,r[e]))return!1;for(let s=0;s<i;++s){const n=r[s];if(!M(e[n],t[n]))return!1}return!0}case"[object Error]":return e.name===t.name&&e.message===t.message;case"[object Number]":if(e!=e)return t!=t;case"[object Boolean]":case"[object Date]":return+e===+t;case"[object RegExp]":case"[object String]":return e==`${t}`;case"[object Map]":case"[object Set]":{if(e.size!==t.size)return!1;if(Q(e,t))return!0;const n=e.entries(),i="[object Map]"===r;for(;;){const e=n.next();if(e.done)break;const[r,s]=e.value;if(!t.has(r))return!1;if(i&&!M(s,t.get(r)))return!1}return!0}case"[object Uint16Array]":case"[object Uint8Array]":case"[object Uint32Array]":case"[object Int32Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object ArrayBuffer]":e=new Uint8Array(e),t=new Uint8Array(t);case"[object DataView]":{let r=e.byteLength;if(r===t.byteLength)for(;r--&&e[r]===t[r];);return-1===r}case"[object AsyncFunction]":case"[object GeneratorFunction]":case"[object AsyncGeneratorFunction]":case"[object Function]":{const r=q.call(e);return r===q.call(t)&&!function(e,t){const r=e.length-t.length;return r>=0&&e.indexOf(t,r)===r}(r,A)}
1}return!1}function N(e){return Object.keys(e).filter(D,e)}function D(e){return void 0!==this[e]}const A="{ [native code] }";function Q(e,t){let r=T.get(e);if(r){if(r.has(t))return!0}else T.set(e,r=new Set);return r.add(t),!1}var z=function(e,t){return(z=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)};function W(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}z(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var V=function(){return V=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},V.apply(this,arguments)};function L(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r}function B(e,t){var r,n,i,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return o.next=a(0),o.throw=a(1),o.return=a(2),"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(c){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(r=1,n&&(i=2&a[0]?n.return:a[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;switch(n=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,n=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(c){a=[6,c],n=0}finally{r=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}}function U(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function $(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,s=r.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(n=s.next()).done;)o.push(n.value)}catch(a){i={error:a}}finally{try{n&&!n.done&&(r=s.return)&&r.call(s)}finally{if(i)throw i.error}}return o}function K(e,t,r){if(r||2===arguments.length)for(var n,i=0,s=t.length;i<s;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}function H(e){return this instanceof H?(this.v=e,this):new H(e)}function G(e){return"function"==typeof e}function J(e){var t=e(function(e){Error.call(e),e.stack=(new Error).stack});return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}"function"==typeof SuppressedError&&SuppressedError;var Y=J(function(e){return function(t){e(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map(function(e,t){return t+1+") "+e.toString()}).join("\n "):"",this.name="UnsubscriptionError",this.errors=t}});function Z(e,t){if(e){var r=e.indexOf(t);0<=r&&e.splice(r,1)}}var X=function(){function e(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}var t;return e.prototype.unsubscribe=function(){var e,t,r,n,i;if(!this.closed){this.closed=!0;var s=this._parentage;if(s)if(this._parentage=null,Array.isArray(s))try{for(var o=U(s),a=o.next();!a.done;a=o.next())a.value.remove(this)}catch(d){e={error:d}}finally{try{a&&!a.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}else s.remove(this);var c=this.initialTeardown;
1if(G(c))try{c()}catch(p){i=p instanceof Y?p.errors:[p]}var u=this._finalizers;if(u){this._finalizers=null;try{for(var l=U(u),h=l.next();!h.done;h=l.next()){var f=h.value;try{re(f)}catch(y){i=null!=i?i:[],y instanceof Y?i=K(K([],$(i)),$(y.errors)):i.push(y)}}}catch(m){r={error:m}}finally{try{h&&!h.done&&(n=l.return)&&n.call(l)}finally{if(r)throw r.error}}}if(i)throw new Y(i)}},e.prototype.add=function(t){var r;if(t&&t!==this)if(this.closed)re(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=null!==(r=this._finalizers)&&void 0!==r?r:[]).push(t)}},e.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},e.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},e.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&Z(t,e)},e.prototype.remove=function(t){var r=this._finalizers;r&&Z(r,t),t instanceof e&&t._removeParent(this)},e.EMPTY=((t=new e).closed=!0,t),e}(),ee=X.EMPTY;function te(e){return e instanceof X||e&&"closed"in e&&G(e.remove)&&G(e.add)&&G(e.unsubscribe)}function re(e){G(e)?e():e.unsubscribe()}function ne(e){!function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];setTimeout.apply(void 0,K([e,t],$(r)))}(function(){throw e})}function ie(){}function se(e){e()}var oe=function(e){function t(t){var r=e.call(this)||this;return r.isStopped=!1,t?(r.destination=t,te(t)&&t.add(r)):r.destination=le,r}return W(t,e),t.create=function(e,t,r){return new ce(e,t,r)},t.prototype.next=function(e){this.isStopped||this._next(e)},t.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(X),ae=function(){function e(e){this.partialObserver=e}return e.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(r){ue(r)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(r){ue(r)}else ue(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(t){ue(t)}},e}(),ce=function(e){function t(t,r,n){var i,s=e.call(this)||this;return i=G(t)||!t?{next:null!=t?t:void 0,error:null!=r?r:void 0,complete:null!=n?n:void 0}:t,s.destination=new ae(i),s}return W(t,e),t}(oe);function ue(e){ne(e)}var le={closed:!0,next:ie,error:function(e){throw e},complete:ie},he="function"==typeof Symbol&&Symbol.observable||"@@observable";function fe(e){return e}var de=function(){function e(e){e&&(this._subscribe=e)}return e.prototype.lift=function(t){var r=new e;return r.source=this,r.operator=t,r},e.prototype.subscribe=function(e,t,r){var n,i=this,s=(n=e)&&n instanceof oe||function(e){return e&&G(e.next)&&G(e.error)&&G(e.complete)}(n)&&te(n)?e:new ce(e,t,r);return se(function(){var e=i,t=e.operator,r=e.source;s.add(t?t.call(s,r):r?i._subscribe(s):i._trySubscribe(s))}),s},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},e.prototype.forEach=function(e,t){var r=this;return new(t=pe(t))(function(t,n){var i=new ce({next:function(t){try{e(t)}catch(r){n(r),i.unsubscribe()}},error:n,complete:t});r.subscribe(i)})},e.prototype._subscribe=function(e){var t;return null===(t=this.source)||void 0===t?void 0:t.subscribe(e)},e.prototype[he]=function(){return this},e.prototype.pipe=function(){for(var e,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return(0===(e=t).length?fe:1===e.length?e[0]:function(t){return e.reduce(function(e,t){return t(e)},t)})(this)},e.prototype.toPromise=function(e){var t=this;return new(e=pe(e))(function(e,r){var n;t.subscribe(function(e){return n=e},function(e){return r(e)},function(){return e(n)})})},e.create=function(t){return new e(t)},e}();function pe(e){var t;return null!==(t=null!=e?e:void 0)&&void 0!==t?t:Promise}function ye(e){return function(t){if(function(e){return G(null==e?void 0:e.lift)}(t))return t.lift(function(t){try{return e(t,this)}catch(r){this.error(r)}});throw new TypeError("Unable to lift unknown Observable type")}}function me(e,t,r,n,i){return new ve(e,t,r,n,i)}var be,ve=function(e){function t(t,r,n,i,s,o){var a=e.call(this,t)||this;return a.onFinalize=s,a.shouldUnsubscribe=o,a._next=r?function(e){try{r(e)}catch(n){t.error(n)}}:e.prototype._next,a._error=i?function(e){try{i(e)}catch(r){t.error(r)}finally{this.unsubscribe()}}:e.prototype._error,a._complete=n?function(){try{n()}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._complete,a}return W(t,e),t.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;e.prototype.unsubscribe.call(this),!r&&(null===(t=this.onFinalize)||void 0===t||t.call(this))}},t}(oe),ge=J(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),we=function(e){function t(){var t=e.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return W(t,e),t.prototype.lift=function(e){var t=new ke(this,this);return t.operator=e,t},t.prototype._throwIfClosed=function(){if(this.closed)throw new ge},t.prototype.next=function(e){var t=this;se(function(){var r,n;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||(t.currentObservers=Array.from(t.observers));try{for(var i=U(t.currentObservers),s=i.next();!s.done;s=i.next())s.value.next(e)}catch(o){r={error:o}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}}})},t.prototype.error=function(e){var t=this;se(function(){if(t._throwIfClosed(),!t.isStopped){t.hasError=t.isStopped=!0,t.thrownError=e;for(var r=t.observers;r.length;)r.shift().error(e)}})},t.prototype.complete=function(){var e=this;se(function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var t=e.observers;t.length;)t.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var e;return(null===(e=this.observers)||void 0===e?void 0:e.length)>0}
vendor: 3,190 bytes, line 1
1,enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(t){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var t=this,r=this,n=r.hasError,i=r.isStopped,s=r.observers;return n||i?ee:(this.currentObservers=null,s.push(e),new X(function(){t.currentObservers=null,Z(s,e)}))},t.prototype._checkFinalizedStatuses=function(e){var t=this,r=t.hasError,n=t.thrownError,i=t.isStopped;r?e.error(n):i&&e.complete()},t.prototype.asObservable=function(){var e=new de;return e.source=this,e},t.create=function(e,t){return new ke(e,t)},t}(de),ke=function(e){function t(t,r){var n=e.call(this)||this;return n.destination=t,n.source=r,n}return W(t,e),t.prototype.next=function(e){var t,r;null===(r=null===(t=this.destination)||void 0===t?void 0:t.next)||void 0===r||r.call(t,e)},t.prototype.error=function(e){var t,r;null===(r=null===(t=this.destination)||void 0===t?void 0:t.error)||void 0===r||r.call(t,e)},t.prototype.complete=function(){var e,t;null===(t=null===(e=this.destination)||void 0===e?void 0:e.complete)||void 0===t||t.call(e)},t.prototype._subscribe=function(e){var t,r;return null!==(r=null===(t=this.source)||void 0===t?void 0:t.subscribe(e))&&void 0!==r?r:ee},t}(we),Se=function(e){function t(t){var r=e.call(this)||this;return r._value=t,r}return W(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),t.prototype._subscribe=function(t){var r=e.prototype._subscribe.call(this,t);return!r.closed&&t.next(this._value),r},t.prototype.getValue=function(){var e=this,t=e.hasError,r=e.thrownError,n=e._value;if(t)throw r;return this._throwIfClosed(),n},t.prototype.next=function(t){e.prototype.next.call(this,this._value=t)},t}(we),xe={now:function(){return(xe.delegate||Date).now()},delegate:void 0},Oe=function(e){function t(t,r,n){void 0===t&&(t=1/0),void 0===r&&(r=1/0),void 0===n&&(n=xe);var i=e.call(this)||this;return i._bufferSize=t,i._windowTime=r,i._timestampProvider=n,i._buffer=[],i._infiniteTimeWindow=!0,i._infiniteTimeWindow=r===1/0,i._bufferSize=Math.max(1,t),i._windowTime=Math.max(1,r),i}return W(t,e),t.prototype.next=function(t){var r=this,n=r.isStopped,i=r._buffer,s=r._infiniteTimeWindow,o=r._timestampProvider,a=r._windowTime;n||(i.push(t),!s&&i.push(o.now()+a)),this._trimBuffer(),e.prototype.next.call(this,t)},t.prototype._subscribe=function(e){this._throwIfClosed(),this._trimBuffer();for(var t=this._innerSubscribe(e),r=this._infiniteTimeWindow,n=this._buffer.slice(),i=0;i<n.length&&!e.closed;i+=r?1:2)e.next(n[i]);return this._checkFinalizedStatuses(e),t},t.prototype._trimBuffer=function(){var e=this,t=e._bufferSize,r=e._timestampProvider,n=e._buffer,i=e._infiniteTimeWindow,s=(i?1:2)*t;if(t<1/0&&s<n.length&&n.splice(0,n.length-s),!i){for(var o=r.now(),a=0,c=1;c<n.length&&n[c]<=o;c+=2)a=c;a&&n.splice(0,a+1)}},t}(we),_e=function(e){function t(t,r){return e.call(this)||this}return W(t,e),t.prototype.schedule=function(e,t){return this},t}(X),Ee=function(e){function t(t,r){var n=e.call(this,t,r)||this;
1return n.scheduler=t,n.work=r,n.pending=!1,n}return W(t,e),t.prototype.schedule=function(e,t){var r;if(void 0===t&&(t=0),this.closed)return this;this.state=e;var n=this.id,i=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(i,n,t)),this.pending=!0,this.delay=t,this.id=null!==(r=this.id)&&void 0!==r?r:this.requestAsyncId(i,this.id,t),this},t.prototype.requestAsyncId=function(e,t,r){return void 0===r&&(r=0),function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];return setInterval.apply(void 0,K([e,t],$(r)))}(e.flush.bind(e,this),r)},t.prototype.recycleAsyncId=function(e,t,r){if(void 0===r&&(r=0),null!=r&&this.delay===r&&!1===this.pending)return t;null!=t&&clearInterval(t)},t.prototype.execute=function(e,t){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var r=this._execute(e,t);if(r)return r;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(e,t){var r,n=!1;try{this.work(e)}catch(i){n=!0,r=i||new Error("Scheduled action threw falsy error")}if(n)return this.unsubscribe(),r},t.prototype.unsubscribe=function(){if(!this.closed){var t=this.id,r=this.scheduler,n=r.actions;this.work=this.state=this.scheduler=null,this.pending=!1,Z(n,this),null!=t&&(this.id=this.recycleAsyncId(r,t,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},t}(_e),Pe=1,Ce={};function Re(e){return e in Ce&&(delete Ce[e],!0)}var Ie=function(e){var t=Pe++;return Ce[t]=!0,be||(be=Promise.resolve()),be.then(function(){return Re(t)&&e()}),t},Fe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Ie.apply(void 0,K([],$(e)))},qe=function(e){return function(e){Re(e)}(e)},Te=function(e){function t(t,r){var n=e.call(this,t,r)||this;
1return n.scheduler=t,n.work=r,n}return W(t,e),t.prototype.requestAsyncId=function(t,r,n){return void 0===n&&(n=0),null!==n&&n>0?e.prototype.requestAsyncId.call(this,t,r,n):(t.actions.push(this),t._scheduled||(t._scheduled=Fe(t.flush.bind(t,void 0))))},t.prototype.recycleAsyncId=function(t,r,n){var i;if(void 0===n&&(n=0),null!=n?n>0:this.delay>0)return e.prototype.recycleAsyncId.call(this,t,r,n);var s=t.actions;null!=r&&(null===(i=s[s.length-1])||void 0===i?void 0:i.id)!==r&&(qe(r),t._scheduled===r&&(t._scheduled=void 0))},t}(Ee),je=function(){function e(t,r){void 0===r&&(r=e.now),this.schedulerActionCtor=t,this.now=r}return e.prototype.schedule=function(e,t,r){return void 0===t&&(t=0),new this.schedulerActionCtor(this,e).schedule(r,t)},e.now=xe.now,e}(),Me=function(e){function t(t,r){void 0===r&&(r=je.now);var n=e.call(this,t,r)||this;return n.actions=[],n._active=!1,n}return W(t,e),t.prototype.flush=function(e){var t=this.actions;if(this._active)t.push(e);else{var r;this._active=!0;do{if(r=e.execute(e.state,e.delay))break}while(e=t.shift());if(this._active=!1,r){for(;e=t.shift();)e.unsubscribe();throw r}}},t}(je),Ne=new(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return W(t,e),t.prototype.flush=function(e){this._active=!0;var t=this._scheduled;this._scheduled=void 0;var r,n=this.actions;e=e||n.shift();do{if(r=e.execute(e.state,e.delay))break}while((e=n[0])&&e.id===t&&n.shift());if(this._active=!1,r){for(;(e=n[0])&&e.id===t&&n.shift();)e.unsubscribe();throw r}},t}(Me))(Te),De=new Me(Ee),Ae=new de(function(e){return e.complete()});function Qe(e){return(t=(r=e)[r.length-1])&&G(t.schedule)?e.pop():void 0;var t,r}var ze=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e};function We(e){return G(null==e?void 0:e.then)}function Ve(e){return G(e[he])}function Le(e){return Symbol.asyncIterator&&G(null==e?void 0:e[Symbol.asyncIterator])}function Be(e){return new TypeError("You provided "+(null!==e&&"object"==typeof e?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}var Ue,$e,Ke="function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator";function He(e){return G(null==e?void 0:e[Ke])}function Ge(e){return function(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,i=r.apply(e,t||[]),s=[];return n=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),o("next"),o("throw"),o("return",function(e){return function(t){return Promise.resolve(t).then(e,u)}}),n[Symbol.asyncIterator]=function(){return this},n;function o(e,t){i[e]&&(n[e]=function(t){return new Promise(function(r,n){
vendor: 4,626 bytes, line 1
1s.push([e,t,r,n])>1||a(e,t)})},t&&(n[e]=t(n[e])))}function a(e,t){try{(r=i[e](t)).value instanceof H?Promise.resolve(r.value.v).then(c,u):l(s[0][2],r)}catch(n){l(s[0][3],n)}var r}function c(e){a("next",e)}function u(e){a("throw",e)}function l(e,t){e(t),s.shift(),s.length&&a(s[0][0],s[0][1])}}(this,arguments,function(){var t,r,n;return B(this,function(i){switch(i.label){case 0:t=e.getReader(),i.label=1;case 1:i.trys.push([1,,9,10]),i.label=2;case 2:return[4,H(t.read())];case 3:return r=i.sent(),n=r.value,r.done?[4,H(void 0)]:[3,5];case 4:return[2,i.sent()];case 5:return[4,H(n)];case 6:return[4,i.sent()];case 7:return i.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}})})}function Je(e){return G(null==e?void 0:e.getReader)}function Ye(e){if(e instanceof de)return e;if(null!=e){if(Ve(e))return i=e,new de(function(e){var t=i[he]();if(G(t.subscribe))return t.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")});if(ze(e))return n=e,new de(function(e){for(var t=0;t<n.length&&!e.closed;t++)e.next(n[t]);e.complete()});if(We(e))return r=e,new de(function(e){r.then(function(t){e.closed||(e.next(t),e.complete())},function(t){return e.error(t)}).then(null,ne)});if(Le(e))return Ze(e);if(He(e))return t=e,new de(function(e){var r,n;try{for(var i=U(t),s=i.next();!s.done;s=i.next()){var o=s.value;if(e.next(o),e.closed)return}}catch(a){r={error:a}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}e.complete()});if(Je(e))return Ze(Ge(e))}var t,r,n,i;throw Be(e)}function Ze(e){return new de(function(t){(function(e,t){var r,n,i,s,o,a,c,u;return o=this,a=void 0,u=function(){var o,a;return B(this,function(c){switch(c.label){case 0:c.trys.push([0,5,6,11]),r=function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=U(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise(function(n,i){!function(e,t,r,n){Promise.resolve(n).then(function(t){e({value:t,done:r})},t)}(n,i,(t=e[r](t)).done,t.value)})}}}(e),c.label=1;case 1:return[4,r.next()];case 2:if((n=c.sent()).done)return[3,4];if(o=n.value,t.next(o),t.closed)return[2];c.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return a=c.sent(),i={error:a},[3,11];case 6:return c.trys.push([6,,9,10]),n&&!n.done&&(s=r.return)?[4,s.call(r)]:[3,8];case 7:c.sent(),c.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}})},new((c=void 0)||(c=Promise))(function(e,t){function r(e){try{i(u.next(e))}catch(r){t(r)}}function n(e){try{i(u.throw(e))}catch(r){t(r)}}function i(t){var i;t.done?e(t.value):(i=t.value,i instanceof c?i:new c(function(e){e(i)})).then(r,n)}i((u=u.apply(o,a||[])).next())})})(e,t).catch(function(e){return t.error(e)})})}function Xe(e,t,r,n,i){void 0===n&&(n=0),void 0===i&&(i=!1);var s=t.schedule(function(){r(),i?e.add(this.schedule(null,n)):this.unsubscribe()},n);if(e.add(s),!i)return s}function et(e,t){return void 0===t&&(t=0),ye(function(r,n){r.subscribe(me(n,function(r){return Xe(n,e,function(){return n.next(r)},t)},function(){return Xe(n,e,function(){return n.complete()},t)},function(r){return Xe(n,e,function(){return n.error(r)},t)}))})}function tt(e,t){return void 0===t&&(t=0),ye(function(r,n){n.add(e.schedule(function(){return r.subscribe(n)},t))})}function rt(e,t){if(!e)throw new Error("Iterable cannot be null");return new de(function(r){Xe(r,t,function(){var n=e[Symbol.asyncIterator]();Xe(r,t,function(){n.next().then(function(e){e.done?r.complete():r.next(e.value)})},0,!0)})})}function nt(e,t){return t?function(e,t){if(null!=e){if(Ve(e))return function(e,t){return Ye(e).pipe(tt(t),et(t))}(e,t);if(ze(e))return function(e,t){return new de(function(r){var n=0;return t.schedule(function(){n===e.length?r.complete():(r.next(e[n++]),r.closed||this.schedule())})})}(e,t);if(We(e))return function(e,t){return Ye(e).pipe(tt(t),et(t))}(e,t);if(Le(e))return rt(e,t);if(He(e))return function(e,t){return new de(function(r){var n;return Xe(r,t,function(){n=e[Ke](),Xe(r,t,function(){var e,t,i;try{t=(e=n.next()).value,i=e.done}catch(s){return void r.error(s)}i?r.complete():r.next(t)},0,!0)}),function(){return G(null==n?void 0:n.return)&&n.return()}})}(e,t);if(Je(e))return function(e,t){return rt(Ge(e),t)}(e,t)}throw Be(e)}(e,t):Ye(e)}function it(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return nt(e,Qe(e))}function st(e,t){var r=G(e)?e:function(){return e};
1return new de(function(e){return e.error(r())})}($e=Ue||(Ue={})).NEXT="N",$e.ERROR="E",$e.COMPLETE="C";var ot=function(){function e(e,t,r){this.kind=e,this.value=t,this.error=r,this.hasValue="N"===e}return e.prototype.observe=function(e){return function(e,t){var r,n,i,s=e,o=s.kind,a=s.value,c=s.error;if("string"!=typeof o)throw new TypeError('Invalid notification, missing "kind"');"N"===o?null===(r=t.next)||void 0===r||r.call(t,a):"E"===o?null===(n=t.error)||void 0===n||n.call(t,c):null===(i=t.complete)||void 0===i||i.call(t)}(this,e)},e.prototype.do=function(e,t,r){var n=this,i=n.kind,s=n.value,o=n.error;return"N"===i?null==e?void 0:e(s):"E"===i?null==t?void 0:t(o):null==r?void 0:r()},e.prototype.accept=function(e,t,r){var n;return G(null===(n=e)||void 0===n?void 0:n.next)?this.observe(e):this.do(e,t,r)},e.prototype.toObservable=function(){var e=this,t=e.kind,r=e.value,n=e.error,i="N"===t?it(r):"E"===t?st(function(){return n}):"C"===t?Ae:0;if(!i)throw new TypeError("Unexpected notification kind "+t);return i},e.createNext=function(t){return new e("N",t)},e.createError=function(t){return new e("E",void 0,t)},e.createComplete=function(){return e.completeNotification},e.completeNotification=new e("C"),e}(),at=J(function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}});function ct(e,t){return ye(function(r,n){var i=0;r.subscribe(me(n,function(r){n.next(e.call(t,r,i++))}))})}function ut(e,t,r){return void 0===r&&(r=1/0),G(t)?ut(function(r,n){return ct(function(e,i){return t(r,e,n,i)})(Ye(e(r,n)))},r):("number"==typeof t&&(r=t),ye(function(t,n){return function(e,t,r,n){var i=[],s=0,o=0,a=!1,c=function(){!a||i.length||s||t.complete()},u=function(e){s++;var a=!1;Ye(r(e,o++)).subscribe(me(t,function(e){t.next(e)},function(){a=!0},void 0,function(){if(a)try{s--;for(var e=function(){var e=i.shift();u(e)};i.length&&s<n;)e();c()}catch(r){t.error(r)}}))};return e.subscribe(me(t,function(e){return s<n?u(e):i.push(e)},function(){a=!0,c()})),function(){}}(t,n,e,r)}))}function lt(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return ut(fe,1)(nt(e,Qe(e)))}function ht(e,t){return ye(function(r,n){var i=0;r.subscribe(me(n,function(r){return e.call(t,r,i++)&&n.next(r)}))})}function ft(e){return ye(function(t,r){var n,i=null,s=!1;i=t.subscribe(me(r,void 0,void 0,function(o){n=Ye(e(o,ft(e)(t))),i?(i.unsubscribe(),i=null,n.subscribe(r)):s=!0})),s&&(i.unsubscribe(),i=null,n.subscribe(r))})}function dt(e,t){return e===t}function pt(e){void 0===e&&(e={});var t=e.connector,r=void 0===t?function(){return new we}:t,n=e.resetOnError,i=void 0===n||n,s=e.resetOnComplete,o=void 0===s||s,a=e.resetOnRefCountZero,c=void 0===a||a;return function(e){var t,n,s,a=0,u=!1,l=!1,h=function(){null==n||n.unsubscribe(),n=void 0},f=function(){h(),t=s=void 0,u=l=!1},d=function(){var e=t;f(),null==e||e.unsubscribe()};return ye(function(e,p){a++,l||u||h();var y=s=null!=s?s:r();p.add(function(){0!==--a||l||u||(n=yt(d,c))}),y.subscribe(p),!t&&a>0&&(t=new ce({next:function(e){return y.next(e)},error:function(e){l=!0,h(),n=yt(f,i,e),y.error(e)},complete:function(){u=!0,h(),n=yt(f,o),y.complete()}}),Ye(e).subscribe(t))})(e)}}function yt(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];if(!0!==t){if(!1!==t){var i=new ce({next:function(){i.unsubscribe(),e()}});return Ye(t.apply(void 0,K([],$(r)))).subscribe(i)}}else e()}function mt(e,t,r){var n,i,s,o,a=!1;return e&&"object"==typeof e?(n=e.bufferSize,o=void 0===n?1/0:n,i=e.windowTime,t=void 0===i?1/0:i,a=void 0!==(s=e.refCount)&&s,r=e.scheduler):o=null!=e?e:1/0,pt({connector:function(){return new Oe(o,t,r)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:a})}function bt(e,t,r){var n=G(e)||t||r?{next:e,error:t,complete:r}:e;return n?ye(function(e,t){var r;null===(r=n.subscribe)||void 0===r||r.call(n);var i=!0;e.subscribe(me(t,function(e){var r;null===(r=n.next)||void 0===r||r.call(n,e),t.next(e)},function(){var e;i=!1,null===(e=n.complete)||void 0===e||e.call(n),t.complete()},function(e){var r;i=!1,null===(r=n.error)||void 0===r||r.call(n,e),t.error(e)},function(){var e,t;i&&(null===(e=n.unsubscribe)||void 0===e||e.call(n)),null===(t=n.finalize)||void 0===t||t.call(n)}))}):fe}function vt(e,t,r,n){if(r.kind===s.INT||r.kind===s.FLOAT)e[t.value]=Number(r.value);else if(r.kind===s.BOOLEAN||r.kind===s.STRING)e[t.value]=r.value;else if(r.kind===s.OBJECT){const i={};r.fields.map(e=>vt(i,e.name,e.value,n)),e[t.value]=i}else if(r.kind===s.VARIABLE){const i=(n||{})[r.name.value];e[t.value]=i}else if(r.kind===s.LIST)e[t.value]=r.values.map(e=>{const r={};return vt(r,t,e,n),r[t.value]});else if(r.kind===s.ENUM)e[t.value]=r.value;else{if(r.kind!==s.NULL)throw k(19,t.value,r.kind);e[t.value]=null}}function gt(e,t){if(e.arguments&&e.arguments.length){const r={};
1return e.arguments.forEach(({name:e,value:n})=>vt(r,e,n,t)),r}return null}const wt="function"==typeof l(()=>window.document.createElement),kt={...h[Symbol.for("apollo.cacheSize")]};function St(e,t){return e.definitions.find(e=>"OperationDefinition"===e.kind&&!!e.name)?.name.value??t}const xt=()=>Object.create(null),{forEach:Ot,slice:_t}=Array.prototype,{hasOwnProperty:Et}=Object.prototype;class Pt{constructor(e=!0,t=xt){this.weakness=e,this.makeData=t}lookup(){return this.lookupArray(arguments)}lookupArray(e){let t=this;return Ot.call(e,e=>t=t.getChildTrie(e)),Et.call(t,"data")?t.data:t.data=this.makeData(_t.call(e))}peek(){return this.peekArray(arguments)}peekArray(e){let t=this;for(let r=0,n=e.length;t&&r<n;++r){const n=t.mapFor(e[r],!1);t=n&&n.get(e[r])}return t&&t.data}remove(){return this.removeArray(arguments)}removeArray(e){let t;if(e.length){const r=e[0],n=this.mapFor(r,!1),i=n&&n.get(r);i&&(t=i.removeArray(_t.call(e,1)),i.data||i.weak||i.strong&&i.strong.size||n.delete(r))}else t=this.data,delete this.data;return t}getChildTrie(e){const t=this.mapFor(e,!0);let r=t.get(e);return r||t.set(e,r=new Pt(this.weakness,this.makeData)),r}mapFor(e,t){return this.weakness&&function(e){switch(typeof e){case"object":if(null===e)break;case"function":return!0}return!1}(e)?this.weak||(t?this.weak=new WeakMap:void 0):this.strong||(t?this.strong=new Map:void 0)}}function Ct(){}class Rt{constructor(e=1/0,t=Ct){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){const t=this.getNode(e);return t&&t.value}get size(){return this.map.size}getNode(e){const t=this.map.get(e);if(t&&t!==this.newest){const{older:e,newer:r}=t;r&&(r.older=e),e&&(e.newer=r),t.older=this.newest,t.older.newer=t,t.newer=null,this.newest=t,t===this.oldest&&(this.oldest=r)}return t}set(e,t){let r=this.getNode(e);return r?r.value=t:(r={key:e,value:t,newer:null,older:this.newest},this.newest&&(this.newest.newer=r),this.newest=r,this.oldest=this.oldest||r,this.map.set(e,r),r.value)}clean(){for(;this.oldest&&this.map.size>this.max;)this.delete(this.oldest.key)}delete(e){const 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)}}function It(){}const Ft=It,qt="undefined"!=typeof WeakRef?WeakRef:function(e){return{deref:()=>e}},Tt="undefined"!=typeof WeakMap?WeakMap:Map,jt="undefined"!=typeof FinalizationRegistry?FinalizationRegistry:function(){return{register:It,unregister:It}};class Mt{constructor(e=1/0,t=Ft){this.max=e,this.dispose=t,this.map=new Tt,this.newest=null,this.oldest=null,this.unfinalizedNodes=new Set,this.finalizationScheduled=!1,this.size=0,this.finalize=()=>{const e=this.unfinalizedNodes.values();for(let t=0;t<10024;t++){const t=e.next().value;if(!t)break;this.unfinalizedNodes.delete(t);const r=t.key;delete t.key,t.keyRef=new qt(r),this.registry.register(r,t,t)}this.unfinalizedNodes.size>0?queueMicrotask(this.finalize):this.finalizationScheduled=!1},this.registry=new jt(this.deleteNode.bind(this))}has(e){return this.map.has(e)}get(e){const t=this.getNode(e);return t&&t.value}getNode(e){const t=this.map.get(e);if(t&&t!==this.newest){const{older:e,newer:r}=t;r&&(r.older=e),e&&(e.newer=r),t.older=this.newest,t.older.newer=t,t.newer=null,this.newest=t,t===this.oldest&&(this.oldest=r)}return t}set(e,t){let r=this.getNode(e);return r?r.value=t:(r={key:e,value:t,newer:null,older:this.newest},this.newest&&(this.newest.newer=r),this.newest=r,this.oldest=this.oldest||r,this.scheduleFinalization(r),this.map.set(e,r),this.size++,r.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--;const 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){const t=this.map.get(e);return!!t&&(this.deleteNode(t),!0)}scheduleFinalization(e){this.unfinalizedNodes.add(e),this.finalizationScheduled||(this.finalizationScheduled=!0,queueMicrotask(this.finalize))}}
1const Nt=new WeakSet;function Dt(e){e.size<=(e.max||-1)||Nt.has(e)||(Nt.add(e),setTimeout(()=>{e.clean(),Nt.delete(e)},100))}const At=function(e,t){const r=new Mt(e,t);return r.set=function(e,t){const r=Mt.prototype.set.call(this,e,t);return Dt(this),r},r},Qt=function(e,t){const r=new Rt(e,t);return r.set=function(e,t){const r=Rt.prototype.set.call(this,e,t);return Dt(this),r},r};function zt(e,{max:t,makeCacheKey:r=e=>e}){const n=new Pt(!0),i=new At(t);return(...t)=>{const s=n.lookupArray(r(t)),o=i.get(s);if(o){if(o.error)throw o.error;return o.result}const a=i.set(s,{});try{return a.result=e(...t)}catch(c){throw a.error=c,c}}}const Wt=zt((e,t)=>{g(e&&"Document"===e.kind,1);const r=e.definitions.filter(e=>"OperationDefinition"===e.kind);t&&g(1==r.length&&r[0].operation===t,4,t,t,r[0].operation),o(e,{Field(t,n,i,o){if(t.alias&&("__typename"===t.alias.value||t.alias.value.startsWith("__ac_"))&&t.alias.value!==t.name.value){let n=e,i=[];for(const e of o)n=n[e],n.kind===s.FIELD&&i.push(n.alias?.value||n.name.value);throw i.splice(-1,1,t.name.value),k(5,t.alias.value,i.join("."),r[0].operation,St(e,"(anonymous)"))}}})},{max:kt.checkDocument||2e3});function Vt(...e){const t={};return e.forEach(e=>{e&&Reflect.ownKeys(e).forEach(r=>{const n=e[r];void 0!==n&&(t[r]=n)})}),t}function Lt(e=[]){const t={};return e.forEach(e=>{t[e.name.value]=e}),t}function Bt(e){return null!==e&&"object"==typeof e}const{hasOwnProperty:Ut}=Object.prototype,$t=function(e,t,r){return this.merge(e[r],t[r])},Kt=e=>isNaN(+e)?{}:[];class Ht{constructor(e={}){r(this,"options"),r(this,"reconciler"),r(this,"isObject",Bt),r(this,"pastCopies",new Set),this.options=e,this.reconciler=e.reconciler||$t}merge(e,t,r={}){const n=r.atPath;if(n?.length){const[i,...s]=n;void 0===e&&(e=Kt(i));let o=e[i];void 0===o&&s.length&&(o=Kt(s[0]));const a=this.merge(o,t,{...r,atPath:s});return o!==a&&((e=this.shallowCopyForMerge(e))[i]=a),e}return Array.isArray(e)&&Array.isArray(t)&&"truncate"===this.options.arrayMerge&&e.length>t.length&&(e=e.slice(0,t.length),this.pastCopies.add(e)),Bt(t)&&Bt(e)?(Object.keys(t).forEach(r=>{if(Ut.call(e,r)){const n=e[r];if(t[r]!==n){const i=this.reconciler(e,t,r);i!==n&&((e=this.shallowCopyForMerge(e))[r]=i)}}else(e=this.shallowCopyForMerge(e))[r]=t[r]}),e):t}shallowCopyForMerge(e){return Bt(e)&&(this.pastCopies.has(e)||(e=Array.isArray(e)?e.slice(0):{__proto__:Object.getPrototypeOf(e),...e},this.pastCopies.add(e))),e}}function Gt(e){const t={},r=e&&e.variableDefinitions;return r&&r.length&&r.forEach(e=>{e.defaultValue&&vt(t,e.variable.name,e.defaultValue)}),t}function Jt(e,t){switch(e.kind){case"InlineFragment":return e;case"FragmentSpread":{const r=e.name.value;if("function"==typeof t)return t(r);const n=t&&t[r];return g(n,9,r),n||null}default:return null}}function Yt(e,t){let r=t;const n=[];return e.definitions.forEach(e=>{if("OperationDefinition"===e.kind)throw k(10,e.operation,e.name?` named '${e.name.value}'`:"");"FragmentDefinition"===e.kind&&n.push(e)}),void 0===r&&(g(1===n.length,11,n.length),r=n[0].name.value),{...e,definitions:[{kind:"OperationDefinition",operation:"query",selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:r}}]}},...e.definitions]}}function Zt(e){return e.definitions.filter(e=>"FragmentDefinition"===e.kind)}function Xt(e){let t;Wt(e);for(let r of e.definitions){if("OperationDefinition"===r.kind)return r;"FragmentDefinition"!==r.kind||t||(t=r)}if(t)return t;throw k(12)}function er(e){return Wt(e),e.definitions.filter(e=>"OperationDefinition"===e.kind)[0]}function tr(e){const t=er(e);return g(t&&"query"===t.operation,13),t}const rr=Object.assign(function(e){return JSON.stringify(e,ir)},{reset(){nr=new Qt(kt.canonicalStringify||1e3)}});let nr;function ir(e,t){if(t&&"object"==typeof t){const e=Object.getPrototypeOf(t);if(e===Object.prototype||null===e){const r=Object.keys(t);if(r.every(sr))return t;const n=JSON.stringify(r);let i=nr.get(n);if(!i){r.sort();const e=JSON.stringify(r);i=nr.get(e)||r,nr.set(n,i),nr.set(e,i)}const s=Object.create(e);return i.forEach(e=>{s[e]=t[e]}),s}}return t}function sr(e,t,r){return 0===t||r[t-1]<=e}rr.reset();const or=["connection","include","skip","client","rest","export","nonreactive","stream"];let ar=rr;const cr=Object.assign(function(e,t,r){if(t&&r&&r.connection&&r.connection.key){if(r.connection.filter&&r.connection.filter.length>0){const e=r.connection.filter?r.connection.filter:[];e.sort();const n={};
1e.forEach(e=>{n[e]=t[e]});const i=ar(n);if("{}"!==i)return`${r.connection.key}(${i})`}return r.connection.key}let n=e;if(t){const e=ar(t);"{}"!==e&&(n+=`(${e})`)}return r&&Object.keys(r).forEach(e=>{-1===or.indexOf(e)&&(r[e]&&Object.keys(r[e]).length?n+=`@${e}(${ar(r[e])})`:n+=`@${e}`)}),n},{setStringify(e){const t=ar;return ar=e,t}});function ur(e){return!!e.errors?.length}function lr(e,t,r){const n=new Set(e),i=n.size;return o(t,{Directive(e){if(n.delete(e.name.value)&&(!r||!n.size))return a}}),r?!n.size:n.size<i}function hr(e){let t=!1;return o(e,{Directive:{enter(e){if("client"===e.name.value&&e.arguments&&(t=e.arguments.some(e=>"always"===e.name.value&&"BooleanValue"===e.value.kind&&!0===e.value.value),t))return a}}}),t}const fr=Array.isArray;function dr(e){return"Field"===e.kind}function pr(e){return Array.isArray(e)&&e.length>0}function yr(e){return{__ref:String(e)}}function mr(e,t){return Vt(e,t,t.variables&&{variables:Vt({...e&&e.variables,...t.variables})})}function br(e){return e.catch(()=>{}),e}function vr(e,t){Wt(t);const r=gr(""),n=gr(""),i=e=>{for(let t,i=0;i<e.length&&(t=e[i]);++i)if(!fr(t)){if(t.kind===s.OPERATION_DEFINITION)return r(t.name&&t.name.value);if(t.kind===s.FRAGMENT_DEFINITION)return n(t.name.value)}return g.error(14),null};let a=0;for(let o=t.definitions.length-1;o>=0;--o)t.definitions[o].kind===s.OPERATION_DEFINITION&&++a;const c=function(e){const t=new Map,r=new Map;return e.forEach(e=>{e&&(e.name?t.set(e.name,e):e.test&&r.set(e.test,e))}),e=>{let n=t.get(e.name.value);return!n&&r.size&&r.forEach((t,r)=>{r(e)&&(n=t)}),n}}(e),u=e=>pr(e)&&e.map(c).some(e=>e&&e.remove),l=new Map;let h=!1;const f={enter(e){if(u(e.directives))return h=!0,null}},d=o(t,{Field:f,InlineFragment:f,VariableDefinition:{enter:()=>!1},Variable:{enter(e,t,r,n,s){const o=i(s);o&&o.variables.add(e.name.value)}},FragmentSpread:{enter(e,t,r,n,s){if(u(e.directives))return h=!0,null;const o=i(s);o&&o.fragmentSpreads.add(e.name.value)}},FragmentDefinition:{enter(e,t,r,n){l.set(JSON.stringify(n),e)},leave:(e,t,r,i)=>e===l.get(JSON.stringify(i))?e:a>0&&e.selectionSet.selections.every(e=>e.kind===s.FIELD&&"__typename"===e.name.value)?(n(e.name.value).removed=!0,h=!0,null):void 0},Directive:{leave(e){if(c(e))return h=!0,null}}});if(!h)return t;const p=e=>(e.transitiveVars||(e.transitiveVars=new Set(e.variables),e.removed||e.fragmentSpreads.forEach(t=>{p(n(t)).transitiveVars.forEach(t=>{e.transitiveVars.add(t)})})),e),y=new Set;d.definitions.forEach(e=>{e.kind===s.OPERATION_DEFINITION?p(r(e.name&&e.name.value)).fragmentSpreads.forEach(e=>{y.add(e)}):e.kind!==s.FRAGMENT_DEFINITION||0!==a||n(e.name.value).removed||y.add(e.name.value)}),y.forEach(e=>{p(n(e)).fragmentSpreads.forEach(e=>{y.add(e)})});const m={enter(e){if(t=e.name.value,!y.has(t)||n(t).removed)return null;var t}};return function(e){return wr(er(e)||function(e){g("Document"===e.kind,6),g(e.definitions.length<=1,7);const t=e.definitions[0];return g("FragmentDefinition"===t.kind,8),t}(e),Lt(Zt(e)))?null:e}(o(d,{FragmentSpread:m,FragmentDefinition:m,OperationDefinition:{leave(e){if(e.variableDefinitions){const t=p(r(e.name&&e.name.value)).transitiveVars;if(t.size<e.variableDefinitions.length)return{...e,variableDefinitions:e.variableDefinitions.filter(e=>t.has(e.variable.name.value))}}}}}))}function gr(e){const t=new Map;return function(r=e){let n=t.get(r);return n||t.set(r,n={variables:new Set,fragmentSpreads:new Set}),n}}function wr(e,t){return!e||e.selectionSet.selections.every(e=>e.kind===s.FRAGMENT_SPREAD&&wr(t[e.name.value],t))}function kr(e){return o(e,{FragmentSpread(e){if(!e.directives?.some(({name:e})=>"unmask"===e.value))return null}})}function Sr(e){return e.alias?e.alias.value:e.name.value}function xr({directives:e},t){return!e||!e.length||function(e){const t=[];return e&&e.length&&e.forEach(e=>{if(!function({name:{value:e}}){return"skip"===e||"include"===e}(e))return;const r=e.arguments,n=e.name.value;g(r&&1===r.length,16,n);const i=r[0];g(i.name&&"if"===i.name.value,17,n);const s=i.value;g(s&&("Variable"===s.kind||"BooleanValue"===s.kind),18,n),t.push({directive:e,ifArgument:i})}),t}(e).every(({directive:e,ifArgument:r})=>{let n=!1;return"Variable"===r.value.kind?(n=t&&t[r.value.name.value],g(void 0!==n,15,e.name.value)):n=r.value.value,"skip"===e.name.value?!n:n})}function Or(e){const t={data:e.data};return e.error&&(t.error=e.error),t}function _r(e,t=()=>{}){return r=>new de(n=>{let i=t();return r.subscribe({next(t){let r;try{r=e(t,i)}catch(s){n.error(s)}void 0!==r&&n.next(r)},error(e){n.error(e)},complete(){n.complete()}})})}function Er(e,{data:t,...r},{data:n,...i},s){return j(r,i)&&Pr(Xt(e).selectionSet,t,n,{fragmentMap:Lt(Zt(e)),variables:s})}function Pr(e,t,r,n){if(t===r)return!0;const i=new Set;return e.selections.every(e=>{if(i.has(e))return!0;
1if(i.add(e),!xr(e,n.variables))return!0;if(Cr(e))return!0;if(dr(e)){const i=Sr(e),s=t&&t[i],o=r&&r[i],a=e.selectionSet;if(!a)return j(s,o);const c=Array.isArray(s),u=Array.isArray(o);if(c!==u)return!1;if(c&&u){const e=s.length;if(o.length!==e)return!1;for(let t=0;t<e;++t)if(!Pr(a,s[t],o[t],n))return!1;return!0}return Pr(a,s,o,n)}{const i=Jt(e,n.fragmentMap);if(i)return!!Cr(i)||Pr(i.selectionSet,t,r,n)}})}function Cr(e){return!!e.directives&&e.directives.some(Rr)}function Rr(e){return"nonreactive"===e.name.value}const Ir=zt(function(e,t,r){return function(e,t){let r,n;function i(e){return e!==r&&(r=e,n=t(r)),n}return Object.assign(e.pipe(ct(i),mt({bufferSize:1,refCount:!0})),{getCurrentResult:()=>i(e.getCurrentResult())})}(e,r)},{max:1,makeCacheKey:e=>e.slice(0,2)}),Fr=Symbol.for("apollo.result.extensions"),qr=Symbol.for("apollo.result.streamInfo"),Tr=Symbol.for("apollo.observableQuery.variablesUnknown");let jr=null;const Mr={};let Nr=1;function Dr(e){try{return e()}catch(t){}}const Ar="@wry/context:Slot",Qr=Dr(()=>globalThis)||Dr(()=>global)||Object.create(null),zr=Qr[Ar]||Array[Ar]||function(e){try{Object.defineProperty(Qr,Ar,{value:e,enumerable:!1,writable:!1,configurable:!0})}finally{return e}}(class{constructor(){this.id=["slot",Nr++,Date.now(),Math.random().toString(36).slice(2)].join(":")}hasValue(){for(let e=jr;e;e=e.parent)if(this.id in e.slots){const t=e.slots[this.id];if(t===Mr)break;return e!==jr&&(jr.slots[this.id]=t),!0}return jr&&(jr.slots[this.id]=Mr),!1}getValue(){if(this.hasValue())return jr.slots[this.id]}withValue(e,t,r,n){const i={__proto__:null,[this.id]:e},s=jr;jr={parent:s,slots:i};try{return t.apply(n,r)}finally{jr=s}}static bind(e){const t=jr;return function(){const r=jr;try{return jr=t,e.apply(this,arguments)}finally{jr=r}}}static noContext(e,t,r){if(!jr)return e.apply(r,t);{const n=jr;try{return jr=null,e.apply(r,t)}finally{jr=n}}}}),{bind:Wr,noContext:Vr}=zr,Lr=new zr,{hasOwnProperty:Br}=Object.prototype,Ur=Array.from||function(e){const t=[];return e.forEach(e=>t.push(e)),t};function $r(e){const{unsubscribe:t}=e;"function"==typeof t&&(e.unsubscribe=void 0,t())}const Kr=[];function Hr(e,t){if(!e)throw new Error(t||"assertion failure")}function Gr(e,t){const r=e.length;return r>0&&r===t.length&&e[r-1]===t[r-1]}function Jr(e){switch(e.length){case 0:throw new Error("unknown value");case 1:return e[0];case 2:throw e[1]}}function Yr(e){return e.slice(0)}class Zr{constructor(e){this.fn=e,this.parents=new Set,this.childValues=new Map,this.dirtyChildren=null,this.dirty=!0,this.recomputing=!1,this.value=[],this.deps=null,++Zr.count}peek(){if(1===this.value.length&&!tn(this))return Xr(this),this.value[0]}recompute(e){return Hr(!this.recomputing,"already recomputing"),Xr(this),tn(this)?function(e,t){return un(e),Lr.withValue(e,en,[e,t]),function(e,t){if("function"==typeof e.subscribe)try{$r(e),e.unsubscribe=e.subscribe.apply(null,t)}catch(r){return e.setDirty(),!1}return!0}(e,t)&&function(e){e.dirty=!1,tn(e)||nn(e)}(e),Jr(e.value)}(this,e):Jr(this.value)}setDirty(){this.dirty||(this.dirty=!0,rn(this),$r(this))}dispose(){this.setDirty(),un(this),sn(this,(e,t)=>{e.setDirty(),ln(e,this)})}forget(){this.dispose()}dependOn(e){e.add(this),this.deps||(this.deps=Kr.pop()||new Set),this.deps.add(e)}forgetDeps(){this.deps&&(Ur(this.deps).forEach(e=>e.delete(this)),this.deps.clear(),Kr.push(this.deps),this.deps=null)}}function Xr(e){const t=Lr.getValue();if(t)return e.parents.add(t),t.childValues.has(e)||t.childValues.set(e,[]),tn(e)?on(t,e):an(t,e),t}function en(e,t){e.recomputing=!0;const{normalizeResult:r}=e;let n;r&&1===e.value.length&&(n=Yr(e.value)),e.value.length=0;try{if(e.value[0]=e.fn.apply(null,t),r&&n&&!Gr(n,e.value))try{e.value[0]=r(e.value[0],n[0])}catch(i){}}catch(s){e.value[1]=s}e.recomputing=!1}function tn(e){return e.dirty||!(!e.dirtyChildren||!e.dirtyChildren.size)}function rn(e){sn(e,on)}function nn(e){sn(e,an)}function sn(e,t){const r=e.parents.size;if(r){const n=Ur(e.parents);for(let i=0;i<r;++i)t(n[i],e)}}function on(e,t){Hr(e.childValues.has(t)),Hr(tn(t));const r=!tn(e);if(e.dirtyChildren){if(e.dirtyChildren.has(t))return}else e.dirtyChildren=Kr.pop()||new Set;e.dirtyChildren.add(t),r&&rn(e)}function an(e,t){Hr(e.childValues.has(t)),Hr(!tn(t));const r=e.childValues.get(t);0===r.length?e.childValues.set(t,Yr(t.value)):Gr(r,t.value)||e.setDirty(),cn(e,t),tn(e)||nn(e)}function cn(e,t){const r=e.dirtyChildren;r&&(r.delete(t),0===r.size&&(Kr.length<100&&Kr.push(r),e.dirtyChildren=null))}function un(e){e.childValues.size>
10&&e.childValues.forEach((t,r)=>{ln(e,r)}),e.forgetDeps(),Hr(null===e.dirtyChildren)}function ln(e,t){t.parents.delete(e),e.childValues.delete(t),cn(e,t)}Zr.count=0;const hn={setDirty:!0,dispose:!0,forget:!0};function fn(e){const t=new Map;function r(e){const r=Lr.getValue();if(r){let n=t.get(e);n||t.set(e,n=new Set),r.dependOn(n)}}return r.dirty=function(e,r){const n=t.get(e);if(n){const i=r&&Br.call(hn,r)?r:"setDirty";Ur(n).forEach(e=>e[i]()),t.delete(e),$r(n)}},r}let dn;function pn(...e){return(dn||(dn=new Pt("function"==typeof WeakMap))).lookupArray(e)}const yn=new Set;function mn(e,{max:t=Math.pow(2,16),keyArgs:r,makeCacheKey:n=pn,normalizeResult:i,subscribe:s,cache:o=Rt}=Object.create(null)){const a="function"==typeof o?new o(t,e=>e.dispose()):o,c=function(){const t=n.apply(null,r?r.apply(null,arguments):arguments);if(void 0===t)return e.apply(null,arguments);let o=a.get(t);o||(a.set(t,o=new Zr(e)),o.normalizeResult=i,o.subscribe=s,o.forget=()=>a.delete(t));const c=o.recompute(Array.prototype.slice.call(arguments));return a.set(t,o),yn.add(a),Lr.hasValue()||(yn.forEach(e=>e.clean()),yn.clear()),c};function u(e){const t=e&&a.get(e);t&&t.setDirty()}function l(e){const t=e&&a.get(e);if(t)return t.peek()}function h(e){return!!e&&a.delete(e)}return Object.defineProperty(c,"size",{get:()=>a.size,configurable:!1,enumerable:!1}),Object.freeze(c.options={max:t,keyArgs:r,makeCacheKey:n,normalizeResult:i,subscribe:s,cache:a}),c.dirtyKey=u,c.dirty=function(){u(n.apply(null,arguments))},c.peekKey=l,c.peek=function(){return l(n.apply(null,arguments))},c.forgetKey=h,c.forget=function(){return h(n.apply(null,arguments))},c.makeCacheKey=n,c.getKey=r?function(){return n.apply(null,r.apply(null,arguments))}:n,Object.freeze(c)}function bn(...e){return pn.bind(null,...e)}class vn{constructor(){r(this,"startRequest")}isIncrementalResult(e){return!1}prepareRequest(e){return g(!lr(["defer","stream"],e.query),67),e}extractErrors(){}}class gn{constructor(e){r(this,"left"),r(this,"right"),e&&(this.request=e)}static empty(){return new gn(()=>Ae)}static from(e){if(0===e.length)return gn.empty();const[t,...r]=e;return t.concat(...r)}static split(e,t,r=new gn((e,t)=>t(e))){const n=new gn((n,i)=>e(n)?t.request(n,i):r.request(n,i));return Object.assign(n,{left:t,right:r})}static execute(e,t,r){return e.request(function(e,{client:t}){const r={query:e.query,variables:e.variables||{},extensions:e.extensions||{},operationName:St(e.query),operationType:er(e.query).operation};let n={...e.context};const i=()=>Object.freeze({...n});return Object.defineProperty(r,"setContext",{enumerable:!1,value:e=>{n="function"==typeof e?{...n,...e(i())}:{...n,...e}}}),Object.defineProperty(r,"getContext",{enumerable:!1,value:i}),Object.defineProperty(r,"client",{enumerable:!1,value:t}),r}(t,r),()=>Ae)}static concat(...e){return gn.from(e)}split(e,t,r){return this.concat(gn.split(e,t,r))}concat(...e){return 0===e.length?this:e.reduce(this.combine.bind(this),this)}combine(e,t){const r=new gn((r,n)=>e.request(r,e=>t.request(e,n)));return Object.assign(r,{left:e,right:t})}request(e,t){throw k(65)}}const wn=gn.split,kn=gn.execute;function Sn(e){return e}class xn{constructor(e,t={}){r(this,"transform"),r(this,"cached"),r(this,"resultCache",new WeakSet),r(this,"left"),r(this,"right"),this.transform=e,t.getCacheKey&&(this.getCacheKey=t.getCacheKey),this.cached=!1!==t.cache,this.resetCache()}getCacheKey(e){return[e]}static identity(){return new xn(Sn,{cache:!1})}static split(e,t,r=xn.identity()){return Object.assign(new xn(n=>(e(n)?t:r).transformDocument(n),{cache:!1}),{left:t,right:r})}resetCache(){if(this.cached){const e=new Pt;this.performWork=mn(xn.prototype.performWork.bind(this),{makeCacheKey:t=>{const r=this.getCacheKey(t);if(r)return g(Array.isArray(r),20),e.lookupArray(r)},max:kt["documentTransform.cache"],cache:Mt})}}performWork(e){return Wt(e),this.transform(e)}transformDocument(e){if(this.resultCache.has(e))return e;const t=this.performWork(e);return this.resultCache.add(t),t}concat(e){return Object.assign(new xn(t=>e.transformDocument(this.transformDocument(t)),{cache:!1}),{left:this,right:e})}}let On;const _n=Object.assign(e=>{let t=On.get(e);return t||(t=c(e),On.set(e,t)),t},{reset(){On=new At(kt.print||2e3)}});function En(e){return Boolean(e&&"object"==typeof e&&"string"==typeof e.__ref)}_n.reset();const Pn={kind:s.FIELD,name:{kind:s.NAME,value:"__typename"}},Cn=Object.assign(function(e){return o(e,{SelectionSet:{enter(e,t,r){if(r&&r.kind===s.OPERATION_DEFINITION)return;const{selections:n}=e;if(!n)return;if(n.some(e=>e.kind===s.FIELD&&("__typename"===e.name.value||0===e.name.value.lastIndexOf("__",0))))return;const i=r;return i.kind===s.FIELD&&i.directives&&i.directives.some(e=>"export"===e.name.value)?void 0:{...e,selections:[...n,Pn]}}}})},{added:e=>e===Pn});function Rn(e,t){return er(e)?.operation===t}function In(e){return 7===e||8===e}function Fn(e){return!In(e)}class qn{constructor(){r(this,"assumeImmutableResults",!1),r(this,"fragmentWatches",new Pt(!0)),r(this,"onAfterBroadcast",e=>e()),r(this,"getFragmentDoc",mn(Yt,{max:kt["cache.fragmentQueryDocuments"]||1e3,cache:Mt,makeCacheKey:bn(this)}))}lookupFragment(e){return null}
1batch(e){const t="string"==typeof e.optimistic?e.optimistic:!1===e.optimistic?null:void 0;let r;return this.performTransaction(()=>r=e.update(this),t),r}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({...e,rootId:e.id||"ROOT_QUERY",optimistic:t})}watchFragment(e){const{fragment:t,fragmentName:r,from:n}=e,i=this.getFragmentDoc(t,r),s=(Array.isArray(n)?n:[n]).map(e=>null==e?e:this.toCacheId(e));if(!Array.isArray(n)){const t=this.watchSingleFragment(s[0],i,e);return null===n?t:Ir(t,Symbol.for("apollo.transform.individualResult"),e=>({...e,data:e.data??{}}))}let o;function a(e){const t=e.reduce((e,t,r)=>(e.data.push(t.data),e.complete&&(e.complete=t.complete),e.dataState=e.complete?"complete":"partial",t.missing&&(e.missing||(e.missing={}),e.missing[r]=t.missing),e),{data:[],dataState:"complete",complete:!0});return j(o,t)||(o=t),o}if(0===s.length)return Nn;let c=!1;const u=s.map(t=>this.watchSingleFragment(t,i,e)),l=function(e){return 0===e.length?Ae:new de(t=>{const{length:r}=e,n=new Array(r),i=new Map;e.forEach((e,t)=>{i.has(e)||i.set(e,new Set),i.get(e).add(t)});let s,o=i.size,a=i.size;i.forEach((r,i)=>{let c=!1;const u=i.subscribe({next:o=>{r.forEach(e=>n[e]=o),c||(c=!0,a--),a||(s||(s=new Set(e.filter(e=>e.dirty))),s.delete(i),s.size||(t.next(n.slice()),s=void 0))},complete:()=>{o--,o||t.complete()},error:t.error.bind(t)});t.add(u)})})}(u).pipe(ct(a),bt({subscribe:()=>c=!0,unsubscribe:()=>c=!1}),mt({bufferSize:1,refCount:!0}));return Object.assign(l,{getCurrentResult:()=>c&&o?o:a(u.map(e=>e.getCurrentResult()))})}watchSingleFragment(e,t,r){if(null===e)return jn;const{optimistic:n=!0,variables:i}=r,s=[t,rr({id:e,optimistic:n,variables:i})],o=this.fragmentWatches.lookupArray(s);if(!o.observable){let u,l=function(e){const n=e.result;return u&&Er(t,{data:u.data},{data:n},r.variables)||(u={data:n,dataState:e.complete?"complete":"partial",complete:e.complete},e.missing&&(u.missing=e.missing.missing)),u},h=!1;const f=new de(r=>{h=!0;const o=this.watch({variables:i,returnPartialData:!0,id:e,query:t,optimistic:n,immediate:!0,callback:e=>{f.dirty=!0,this.onAfterBroadcast(()=>{r.next(l(e)),f.dirty=!1})}});return()=>{h=!1,o(),this.fragmentWatches.removeArray(s)}}).pipe((void 0===c&&(c=fe),a=null!=a?a:dt,ye(function(e,t){var r,n=!0;e.subscribe(me(t,function(e){var i=c(e);!n&&a(r,i)||(n=!1,r=i,t.next(e))}))})),pt({connector:()=>new Oe(1),resetOnRefCountZero:()=>{return e=0,void 0===t&&(t=De),new de(function(r){var n,i=(n=e)instanceof Date&&!isNaN(n)?+e-t.now():e;i<0&&(i=0);var s=0;return t.schedule(function(){r.closed||(r.next(s++),r.complete())},i)});var e,t}}));o.observable=Object.assign(f,{dirty:!1,getCurrentResult:()=>h&&u?u:l(this.diff({id:e,query:t,returnPartialData:!0,optimistic:n,variables:i}))})}var a,c;return o.observable}readFragment(e,t=!!e.optimistic){const r=void 0!==e.from?this.toCacheId(e.from):e.id;return this.read({...e,query:this.getFragmentDoc(e.fragment,e.fragmentName),rootId:r,optimistic:t})}writeQuery({id:e,data:t,...r}){return this.write(Object.assign(r,{dataId:e||"ROOT_QUERY",result:t}))}writeFragment({data:e,fragment:t,fragmentName:r,...n}){const i=void 0!==n.from?this.toCacheId(n.from):n.id;return this.write(Object.assign(n,{query:this.getFragmentDoc(t,r),dataId:i,result:e}))}updateQuery(e,t){return this.batch({update(r){const n=r.readQuery(e),i=t(n);return null==i?n:(r.writeQuery({...e,data:i}),i)}})}updateFragment(e,t){return this.batch({update(r){const n=r.readFragment(e),i=t(n);return null==i?n:(r.writeFragment({...e,data:i}),i)}})}toCacheId(e){return"string"==typeof e?e:this.identify(e)}}const Tn=Object.freeze({data:null,dataState:"complete",complete:!0}),jn=Object.assign(new de(e=>{e.next(Tn)}),{dirty:!1,getCurrentResult:()=>Tn}),Mn=Object.freeze({data:[],dataState:"complete",complete:!0}),Nn=Object.assign(new de(e=>{e.next(Mn)}),{getCurrentResult:()=>Mn});class Dn extends Error{constructor(e,t,n,i){if(super(e),r(this,"message"),r(this,"path"),r(this,"query"),r(this,"variables"),r(this,"missing"),this.message=e,this.path=t,this.query=n,this.variables=i,this.name="MissingFieldError",Array.isArray(this.path)){this.missing=this.message;for(let e=this.path.length-1;e>=0;--e)this.missing={[this.path[e]]:this.missing}}else this.missing=this.path;this.__proto__=Dn.prototype}}const{hasOwnProperty:An}=Object.prototype;function Qn({__typename:e,id:t,_id:r},n){if("string"==typeof e&&(n&&(n.keyObject=null!=t?{id:t}:null!=r?{_id:r}:void 0),null==t&&null!=r&&(t=r),null!=t))return`${e}:${"number"==typeof t||"string"==typeof t?t:JSON.stringify(t)}`}const zn={dataIdFromObject:Qn,resultCaching:!0},Wn=/^[_a-z][_0-9a-z]*/i;function Vn(e){const t=e.match(Wn);return t?t[0]:e}function Ln(e,t,r){return!!Bt(t)&&(fr(t)?t.every(t=>Ln(e,t,r)):e.selections.every(e=>{if(dr(e)&&xr(e,r)){const n=Sr(e);return An.call(t,n)&&(!e.selectionSet||Ln(e.selectionSet,t[n],r))}return!0}))}function Bn(e){return Bt(e)&&!En(e)&&!fr(e)}function Un(e,t){const r=Lt(Zt(e));return{fragmentMap:r,lookupFragment(e){let n=r[e];return!n&&t&&(n=t.lookup(e)),n||null}}}const $n={},Kn=()=>$n,Hn={};class Gn{constructor(e,t){r(this,"policies"),r(this,"group"),r(this,"data",{}),r(this,"rootIds",{}),r(this,"refs",{}),r(this,"getFieldValue",(e,t)=>En(e)?this.get(e.__ref,t):e&&e[t]),r(this,"canRead",e=>En(e)?this.has(e.__ref):"object"==typeof e),r(this,"toReference",(e,t)=>{if("string"==typeof e)return yr(e);if(En(e))return e;const[r]=this.policies.identify(e);if(r){const n=yr(r);
1return t&&this.merge(r,e),n}}),this.policies=e,this.group=t}toObject(){return{...this.data}}has(e){return void 0!==this.lookup(e,!0)}get(e,t){if(this.group.depend(e,t),An.call(this.data,e)){const r=this.data[e];if(r&&An.call(r,t))return r[t]}return"__typename"===t&&An.call(this.policies.rootTypenamesById,e)?this.policies.rootTypenamesById[e]:this instanceof Xn?this.parent.get(e,t):void 0}lookup(e,t){return t&&this.group.depend(e,"__exists"),An.call(this.data,e)?this.data[e]:this instanceof Xn?this.parent.lookup(e,t):this.policies.rootTypenamesById[e]?{}:void 0}merge(e,t){let r;En(e)&&(e=e.__ref),En(t)&&(t=t.__ref);const n="string"==typeof e?this.lookup(r=e):e,i="string"==typeof t?this.lookup(r=t):t;if(!i)return;g("string"==typeof r,99);const s=new Ht({reconciler:ti}).merge(n,i);if(this.data[r]=s,s!==n&&(delete this.refs[r],this.group.caching)){const e={};n||(e.__exists=1),Object.keys(i).forEach(t=>{if(!n||n[t]!==s[t]){e[t]=1;const r=Vn(t);r===t||this.policies.hasKeyArgs(s.__typename,r)||(e[r]=1),void 0!==s[t]||this instanceof Xn||delete s[t]}}),!e.__typename||n&&n.__typename||this.policies.rootTypenamesById[r]!==s.__typename||delete e.__typename,Object.keys(e).forEach(e=>this.group.dirty(r,e))}}modify(e,t,r){const n=this.lookup(e);if(n){const i={};let s=!1,o=!0;const a={DELETE:$n,INVALIDATE:Hn,isReference:En,toReference:this.toReference,canRead:this.canRead,readField:(t,r)=>this.policies.readField("string"==typeof t?{fieldName:t,from:r||yr(e)}:t,{store:this})};if(Object.keys(n).forEach(c=>{const u=Vn(c);let l=n[c];if(void 0===l)return;const h="function"==typeof t?t:t[c]||(r?void 0:t[u]);if(h){let t=h===Kn?$n:h(l,{...a,fieldName:u,storeFieldName:c,storage:this.getStorage(e,c)});t===Hn?this.group.dirty(e,c):(t===$n&&(t=void 0),t!==l&&(i[c]=t,s=!0,l=t))}void 0!==l&&(o=!1)}),s)return this.merge(e,i),o&&(this instanceof Xn?this.data[e]=void 0:delete this.data[e],this.group.dirty(e,"__exists")),!0}return!1}delete(e,t,r){const n=this.lookup(e);if(n){const i=this.getFieldValue(n,"__typename"),s=t&&r?this.policies.getStoreFieldName({typename:i,fieldName:t,args:r}):t;return this.modify(e,s?{[s]:Kn}:Kn,!!r)}return!1}evict(e,t){let r=!1;return e.id&&(An.call(this.data,e.id)&&(r=this.delete(e.id,e.fieldName,e.args)),this instanceof Xn&&this!==t&&(r=this.parent.evict(e,t)||r),(e.fieldName||r)&&this.group.dirty(e.id,e.fieldName||"__exists")),r}clear(){this.replace(null)}extract(){const e=this.toObject(),t=[];return this.getRootIdSet().forEach(e=>{An.call(this.policies.rootTypenamesById,e)||t.push(e)}),t.length&&(e.__META={extraRootIds:t.sort()}),e}replace(e){if(Object.keys(this.data).forEach(t=>{e&&An.call(e,t)||this.delete(t)}),e){const{__META:t,...r}=e;Object.keys(r).forEach(e=>{this.merge(e,r[e])}),t&&t.extraRootIds.forEach(this.retain,this)}}retain(e){return this.rootIds[e]=(this.rootIds[e]||0)+1}release(e){if(this.rootIds[e]>0){const 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 Xn?this.parent.getRootIdSet(e):Object.keys(this.policies.rootTypenamesById).forEach(e.add,e),e}gc(){const e=this.getRootIdSet(),t=this.toObject();e.forEach(r=>{An.call(t,r)&&(Object.keys(this.findChildRefIds(r)).forEach(e.add,e),delete t[r])});const r=Object.keys(t);if(r.length){let e=this;for(;e instanceof Xn;)e=e.parent;r.forEach(t=>e.delete(t))}return r}findChildRefIds(e){if(!An.call(this.refs,e)){const t=this.refs[e]={},r=this.data[e];if(!r)return t;const n=new Set([r]);n.forEach(e=>{En(e)&&(t[e.__ref]=!0),Bt(e)&&Object.keys(e).forEach(t=>{const r=e[t];Bt(r)&&n.add(r)})})}return this.refs[e]}makeCacheKey(){return this.group.keyMaker.lookupArray(arguments)}get supportsResultCaching(){return this.group.caching}}class Jn{constructor(e,t=null){r(this,"caching"),r(this,"parent"),r(this,"d",null),r(this,"keyMaker"),this.caching=e,this.parent=t,this.resetCaching()}resetCaching(){this.d=this.caching?fn():null,this.keyMaker=new Pt}depend(e,t){if(this.d){this.d(Yn(e,t));const r=Vn(t);r!==t&&this.d(Yn(e,r)),this.parent&&this.parent.depend(e,t)}}dirty(e,t){this.d&&this.d.dirty(Yn(e,t),"__exists"===t?"forget":"setDirty")}}function Yn(e,t){return t+"#"+e}function Zn(e,t){ri(e)&&e.group.depend(t,"__exists")}Gn.Root=class extends Gn{constructor({policies:e,resultCaching:t=!0,seed:n}){super(e,new Jn(t)),r(this,"stump",new ei(this)),r(this,"storageTrie",new Pt),n&&this.replace(n)}addLayer(e,t){return this.stump.addLayer(e,t)}removeLayer(){return this}getStorage(){return this.storageTrie.lookupArray(arguments)}};class Xn extends Gn{constructor(e,t,n,i){super(t.policies,i),r(this,"id"),r(this,"parent"),r(this,"replay"),r(this,"group"),this.id=e,this.parent=t,this.replay=n,this.group=i,n(this)}addLayer(e,t){return new Xn(e,this,t,this.group)}removeLayer(e){const t=this.parent.removeLayer(e);return e===this.id?(this.group.caching&&Object.keys(this.data).forEac
1h(e=>{const r=this.data[e],n=t.lookup(e);n?r?r!==n&&Object.keys(r).forEach(t=>{j(r[t],n[t])||this.group.dirty(e,t)}):(this.group.dirty(e,"__exists"),Object.keys(n).forEach(t=>{this.group.dirty(e,t)})):this.delete(e)}),t):t===this.parent?this:t.addLayer(this.id,this.replay)}toObject(){return{...this.parent.toObject(),...this.data}}findChildRefIds(e){const t=this.parent.findChildRefIds(e);return An.call(this.data,e)?{...t,...super.findChildRefIds(e)}:t}getStorage(...e){let t=this.parent;for(;t.parent;)t=t.parent;return t.getStorage(...e)}}class ei extends Xn{constructor(e){super("EntityStore.Stump",e,()=>{},new Jn(e.group.caching,e.group))}removeLayer(){return this}merge(e,t){return this.parent.merge(e,t)}}function ti(e,t,r){const n=e[r],i=t[r];return j(n,i)?n:i}function ri(e){return!(!e||!e.supportsResultCaching)}const ni=new zr;function ii(e){const t=e.directives?.find(({name:e})=>"unmask"===e.value);if(!t)return"mask";const r=t.arguments?.find(({name:e})=>"mode"===e.value);return r&&"value"in r.value&&"migrate"===r.value.value?"migrate":"unmask"}function si(e,t,r){return ni.withValue(!0,()=>oi(e,t,r,!1))}function oi(e,t,r,n,i){const{knownChanged:o}=r,a=function(e,t){if(t.has(e))return t.get(e);const r=Array.isArray(e)?[]:{};return t.set(e,r),r}(e,r.mutableTargets);if(Array.isArray(e)){for(const[i,s]of Array.from(e.entries())){if(null===s){a[i]=null;continue}const e=oi(s,t,r,n);o.has(e)&&o.add(a),a[i]=e}return o.has(a)?a:e}for(const c of t.selections){let t;if(n&&o.add(a),c.kind===s.FIELD){const i=Sr(c),s=c.selectionSet;if(t=a[i]||e[i],void 0===t)continue;if(s&&null!==t){const a=oi(e[i],s,r,n);o.has(a)&&(t=a)}a[i]=t}if(c.kind!==s.INLINE_FRAGMENT||c.typeCondition&&!r.cache.fragmentMatches(c,e.__typename)||(t=oi(e,c.selectionSet,r,n)),c.kind===s.FRAGMENT_SPREAD){const n=c.name.value,i=r.fragmentMap[n]||(r.fragmentMap[n]=r.cache.lookupFragment(n));g(i,39,n);const s=ii(c);"mask"!==s&&(t=oi(e,i.selectionSet,r,"migrate"===s))}o.has(t)&&o.add(a)}return"__typename"in e&&!("__typename"in a)&&(a.__typename=e.__typename),Object.keys(a).length!==Object.keys(e).length&&o.add(a),o.has(a)?a:e}const ai={};function ci(e){const t=JSON.stringify(e);return ai[t]||(ai[t]={})}function ui(e){const t=ci(e);return t.keyFieldsFn||(t.keyFieldsFn=(t,r)=>{const n=(e,t)=>r.readField(t,e),i=r.keyObject=hi(e,e=>{let i=pi(r.storeObject,e,n);return void 0===i&&t!==r.storeObject&&An.call(t,e[0])&&(i=pi(t,e,di)),g(void 0!==i,102,e.join("."),t),i});return`${r.typename}:${JSON.stringify(i)}`})}function li(e){const t=ci(e);return t.keyArgsFn||(t.keyArgsFn=(t,{field:r,variables:n,fieldName:i})=>{const s=hi(e,e=>{const i=e[0],s=i.charAt(0);if("@"!==s){if("$"===s){const t=i.slice(1);if(n&&An.call(n,t)){const r=e.slice(0);return r[0]=t,pi(n,r)}return}if(t)return pi(t,e)}else if(r&&pr(r.directives)){const t=i.slice(1),s=r.directives.find(e=>e.name.value===t),o=s&>(s,n);return o&&pi(o,e.slice(1))}}),o=JSON.stringify(s);return(t||"{}"!==o)&&(i+=":"+o),i})}function hi(e,t){const r=new Ht;return fi(e).reduce((e,n)=>{let i=t(n);if(void 0!==i){for(let e=n.length-1;e>=0;--e)i={[n[e]]:i};e=r.merge(e,i)}return e},{})}function fi(e){const t=ci(e);if(!t.paths){const r=t.paths=[],n=[];e.forEach((t,i)=>{fr(t)?(fi(t).forEach(e=>r.push(n.concat(e))),n.length=0):(n.push(t),fr(e[i+1])||(r.push(n.slice(0)),n.length=0))})}return t.paths}function di(e,t){return e[t]}function pi(e,t,r){return r=r||di,yi(t.reduce(function e(t,n){return fr(t)?t.map(t=>e(t,n)):t&&r(t,n)},e))}function yi(e){return Bt(e)?fr(e)?e.map(yi):hi(Object.keys(e).sort(),t=>pi(e,t)):e}const mi=new zr,bi=new WeakMap;function vi(e){let t=bi.get(e);return t||bi.set(e,t={vars:new Set,dep:fn()}),t}function gi(e){vi(e).vars.forEach(t=>t.forgetCache(e))}function wi(e){const t=new Set,r=new Set,n=function(s){if(arguments.length>0){if(e!==s){e=s,t.forEach(e=>{vi(e).dep.dirty(n),function(e){e.broadcastWatches&&e.broadcastWatches()}(e)});const i=Array.from(r);r.clear(),i.forEach(t=>t(e))}}else{const e=mi.getValue();e&&(i(e),vi(e).dep(n))}return e};n.onNextChange=e=>(r.add(e),()=>{r.delete(e)});const i=n.attachCache=e=>(t.add(e),vi(e).vars.add(n),n);return n.forgetCache=e=>t.delete(e),n}
1function ki(e){return void 0!==e.args?e.args:e.field?gt(e.field,e.variables):null}const Si=()=>{},xi=(e,t)=>t.fieldName,Oi=(e,t,{mergeObjects:r})=>r(e,t),_i=(e,t)=>t,Ei=(e,t,{streamFieldInfo:r,existingData:n})=>{if(!e&&!n)return t;const i=[],s=e??n,o=r?.isLastChunk?t.length:Math.max(s.length,t.length);for(let a=0;a<o;a++)i[a]=void 0===t[a]?s[a]:t[a];return i};class Pi{constructor(e){r(this,"config"),r(this,"typePolicies",{}),r(this,"toBeAdded",{}),r(this,"supertypeMap",new Map),r(this,"fuzzySubtypes",new Map),r(this,"cache"),r(this,"rootIdsByTypename",{}),r(this,"rootTypenamesById",{}),r(this,"usingPossibleTypes",!1),this.config=e,this.config={dataIdFromObject:Qn,...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){const r=this,n=t&&(t.typename||t.storeObject?.__typename)||e.__typename;if(n===this.rootTypenamesById.ROOT_QUERY)return["ROOT_QUERY"];const i=t&&t.storeObject||e,s={...t,typename:n,storeObject:i,readField:t&&t.readField||((...e)=>{const t=Ri(e,i);return r.readField(t,{store:r.cache.data,variables:t.variables})})};let o;const a=n&&this.getTypePolicy(n);let c=a&&a.keyFn||this.config.dataIdFromObject;return ni.withValue(!0,()=>{for(;c;){const t=c({...e,...i},s);if(!fr(t)){o=t;break}c=ui(t)}}),o=o?String(o):void 0,s.keyObject?[o,s.keyObject]:[o]}addTypePolicies(e){Object.keys(e).forEach(t=>{const{queryType:r,mutationType:n,subscriptionType:i,...s}=e[t];r&&this.setRootTypename("Query",t),n&&this.setRootTypename("Mutation",t),i&&this.setRootTypename("Subscription",t),An.call(this.toBeAdded,t)?this.toBeAdded[t].push(s):this.toBeAdded[t]=[s]})}updateTypePolicy(e,t,r){const n=this.getTypePolicy(e),{keyFields:i,fields:s}=t;function o(e,t){e.merge="function"==typeof t?t:!0===t?Oi:!1===t?_i:e.merge}o(n,t.merge),n.keyFn=!1===i?Si:fr(i)?ui(i):"function"==typeof i?i:n.keyFn,s&&Object.keys(s).forEach(t=>{let n=r[t];n&&n?.typename===e||(n=r[t]={typename:e});const i=s[t];if("function"==typeof i)n.read=i;else{const{keyArgs:e,read:t,merge:r}=i;n.keyFn=!1===e?xi:fr(e)?li(e):"function"==typeof e?e:n.keyFn,"function"==typeof t&&(n.read=t),o(n,r)}n.read&&n.merge&&(n.keyFn=n.keyFn||xi)})}setRootTypename(e,t=e){const r="ROOT_"+e.toUpperCase(),n=this.rootTypenamesById[r];t!==n&&(g(!n||n===e,103,e),n&&delete this.rootIdsByTypename[n],this.rootIdsByTypename[t]=r,this.rootTypenamesById[r]=t)}addPossibleTypes(e){this.usingPossibleTypes=!0,Object.keys(e).forEach(t=>{this.getSupertypeSet(t,!0),e[t].forEach(e=>{this.getSupertypeSet(e,!0).add(t);const r=e.match(Wn);r&&r[0]===e||this.fuzzySubtypes.set(e,new RegExp(e))})})}getTypePolicy(e){if(!An.call(this.typePolicies,e)){const t=this.typePolicies[e]={};t.fields={};let r=this.supertypeMap.get(e);!r&&this.fuzzySubtypes.size&&(r=this.getSupertypeSet(e,!0),this.fuzzySubtypes.forEach((t,n)=>{if(t.test(e)){const e=this.supertypeMap.get(n);e&&e.forEach(e=>r.add(e))}})),r&&r.size&&r.forEach(e=>{const{fields:r,...n}=this.getTypePolicy(e);Object.assign(t,n),Object.assign(t.fields,r)})}const t=this.toBeAdded[e];return t&&t.length&&t.splice(0).forEach(t=>{this.updateTypePolicy(e,t,this.typePolicies[e].fields)}),this.typePolicies[e]}getFieldPolicy(e,t){if(e)return this.getTypePolicy(e).fields[t]}getSupertypeSet(e,t){let r=this.supertypeMap.get(e);return!r&&t&&this.supertypeMap.set(e,r=new Set),r}fragmentMatches(e,t,r,n){if(!e.typeCondition)return!0;if(!t)return!1;const i=e.typeCondition.name.value;if(t===i)return!0;if(this.usingPossibleTypes&&this.supertypeMap.has(i)){const s=this.getSupertypeSet(t,!0),o=[s],a=e=>{const t=this.getSupertypeSet(e,!1);t&&t.size&&o.indexOf(t)<0&&o.push(t)};let c=!(!r||!this.fuzzySubtypes.size);for(let u=0;u<o.length;++u){const l=o[u];if(l.has(i))return s.has(i)||s.add(i),!0;l.forEach(a),c&&u===o.length-1&&Ln(e.selectionSet,r,n)&&(c=!1,this.fuzzySubtypes.forEach((e,r)=>{const n=t.match(e);n&&n[0]===t&&a(r)}))}}return!1}hasKeyArgs(e,t){const r=this.getFieldPolicy(e,t);return!(!r||!r.keyFn)}getStoreFieldName(e){const{typename:t,fieldName:r}=e,n=this.getFieldPolicy(t,r);let i,s=n&&n.keyFn;if(s&&t){const n={typename:t,fieldName:r,field:e.field||null,variables:e.variables},o=ki(e);for(;s;){const e=s(o,n);if(!fr(e)){i=e||r;break}s=li(e)}}return void 0===i&&(i=e.field?function(e,t){let r=null;e.directives&&(r={}
1,e.directives.forEach(e=>{r[e.name.value]={},e.arguments&&e.arguments.forEach(({name:n,value:i})=>vt(r[e.name.value],n,i,t))}));let n=null;return e.arguments&&e.arguments.length&&(n={},e.arguments.forEach(({name:e,value:r})=>vt(n,e,r,t))),cr(e.name.value,n,r)}(e.field,e.variables):cr(r,ki(e))),!1===i?r:r===Vn(i)?i:r+":"+i}readField(e,t){const r=e.from;if(!r)return;if(!e.field&&!e.fieldName)return;if(void 0===e.typename){const n=t.store.getFieldValue(r,"__typename");n&&(e.typename=n)}const n=this.getStoreFieldName(e),i=Vn(n),s=t.store.getFieldValue(r,n),o=this.getFieldPolicy(e.typename,i),a=o&&o.read;if(a){const i=Ci(this,r,e,t,t.store.getStorage(En(r)?r.__ref:r,n));return mi.withValue(this.cache,a,[s,i])}return s}getReadFunction(e,t){const r=this.getFieldPolicy(e,t);return r&&r.read}getMergeFunction(e,t,r){let n=this.getFieldPolicy(e,t),i=n&&n.merge;return!i&&r&&(n=this.getTypePolicy(r),i=n&&n.merge),i}runMergeFunction(e,t,{field:r,typename:n,merge:i,path:s},o,a){const c=e;if(i===Oi)return Ii(o.store)(e,t);if(i===_i)return t;o.overwrite&&(e=void 0);const u=o.extensions?.[qr]?.deref()?.peekArray(s);if(u){const{current:e,previous:r}=u;if(r&&j(r.incoming,t)&&j(r.streamFieldInfo,e))return r.result}const l=i(e,t,function(e,t,r,n,i,s){const o={...Ci(e,void 0,r,n,i),extensions:n.extensions,existingData:s},a=n.extensions;if(a&&qr in a){const{[qr]:e,...t}=a,n=e?.deref()?.peekArray(r.path);n&&(o.streamFieldInfo=n.current),o.extensions=0===Object.keys(t).length?void 0:t}return o}(this,0,{typename:n,fieldName:r.name.value,field:r,variables:o.variables,path:s},o,a||{},c));return u&&(u.previous={incoming:t,streamFieldInfo:u.current,result:l}),l}}function Ci(e,t,r,n,i){const s=e.getStoreFieldName(r),o=Vn(s),a=r.variables||n.variables,{toReference:c,canRead:u}=n.store;return{args:ki(r),field:r.field||null,fieldName:o,storeFieldName:s,variables:a,isReference:En,toReference:c,storage:i,cache:e.cache,canRead:u,readField:(...r)=>e.readField(Ri(r,t,a),n),mergeObjects:Ii(n.store)}}function Ri(e,t,r){const{0:n,1:i,length:s}=e;let o;return"string"==typeof n?o={fieldName:n,from:s>1?i:t}:(o={...n},An.call(o,"from")||(o.from=t)),void 0===o.variables&&(o.variables=r),o}function Ii(e){return function(t,r){if(fr(t)||fr(r))throw k(106);if(Bt(t)&&Bt(r)){const n=e.getFieldValue(t,"__typename"),i=e.getFieldValue(r,"__typename");if(n&&i&&n!==i)return r;if(En(t)&&Bn(r))return e.merge(t.__ref,r),t;if(Bn(t)&&En(r))return e.merge(t,r.__ref),r;if(Bn(t)&&Bn(r))return{...t,...r}}return r}}function Fi(e){return[e.selectionSet,e.objectOrReference,e.context]}class qi{constructor(e){r(this,"executeSelectionSet"),r(this,"executeSubSelectedArray"),r(this,"config"),r(this,"knownResults",new WeakMap),this.config=e,this.executeSelectionSet=mn(e=>{const t=Fi(e);return this.executeSelectionSet.peek(...t)||(Zn(e.context.store,e.enclosingRef.__ref),this.execSelectionSetImpl(e))},{max:kt["inMemoryCache.executeSelectionSet"]||5e4,keyArgs:Fi,makeCacheKey(e,t,r){if(ri(r.store))return r.store.makeCacheKey(e,En(t)?t.__ref:t,r.varString)}}),this.executeSubSelectedArray=mn(e=>(Zn(e.context.store,e.enclosingRef.__ref),this.execSubSelectedArrayImpl(e)),{max:kt["inMemoryCache.executeSubSelectedArray"]||1e4,makeCacheKey({field:e,array:t,context:r}){if(ri(r.store))return r.store.makeCacheKey(e,t,r.varString)}})}diffQueryAgainstStore({store:e,query:t,rootId:r="ROOT_QUERY",variables:n,returnPartialData:i=!0}){const s=this.config.cache.policies;n={...Gt(tr(t)),...n};const o=yr(r),a=this.executeSelectionSet({selectionSet:Xt(t).selectionSet,objectOrReference:o,enclosingRef:o,context:{store:e,query:t,policies:s,variables:n,varString:rr(n),...Un(t,this.config.fragments)}});let c;a.missing&&(c=new Dn(function(e){try{JSON.stringify(e,(e,t)=>{if("string"==typeof t)throw t;return t})}catch(l){return l}}(a.missing),a.missing,t,n));const u=!c,{result:l}=a;return{result:u?l:i?0===Object.keys(l).length?null:l:null,complete:u,missing:c}}isFresh(e,t,r,n){if(ri(n.store)&&this.knownResults.get(e)===r){const i=this.executeSelectionSet.peek(r,t,n);if(i&&e===i.result)return!0}return!1}execSelectionSetImpl({selectionSet:e,objectOrReference:t,enclosingRef:r,context:n}){if(En(t)&&!n.policies.rootTypenamesById[t.__ref]&&!n.store.has(t.__ref))return{result:{},missing:`Dangling reference to missing ${t.__ref} object`};const{variables:i,policies:o,store:a}=n,c=a.getFieldValue(t,"__typename"),u=[];let l;const h=new Ht;function f(e,t){return e.missing&&(l=h.merge(l,{[t]:e.missing})),e.result}"string"!=typeof c||o.rootIdsByTypename[c]||u.push({__typename:c}
1);const d=new Set(e.selections);d.forEach(e=>{if(xr(e,i))if(dr(e)){let i=o.readField({fieldName:e.name.value,field:e,variables:n.variables,from:t},n);const s=Sr(e);void 0===i?Cn.added(e)||(l=h.merge(l,{[s]:`Can't find field '${e.name.value}' on ${En(t)?t.__ref+" object":"object "+JSON.stringify(t,null,2)}`})):fr(i)?i.length>0&&(i=f(this.executeSubSelectedArray({field:e,array:i,enclosingRef:r,context:n}),s)):e.selectionSet&&null!=i&&(i=f(this.executeSelectionSet({selectionSet:e.selectionSet,objectOrReference:i,enclosingRef:En(i)?i:r,context:n}),s)),void 0!==i&&u.push({[s]:i})}else{const t=Jt(e,n.lookupFragment);if(!t&&e.kind===s.FRAGMENT_SPREAD)throw k(107,e.name.value);t&&o.fragmentMatches(t,c)&&t.selectionSet.selections.forEach(d.add,d)}});const p={result:function(e){let t=e[0]||{};const r=e.length;if(r>1){const n=new Ht;for(let i=1;i<r;++i)t=n.merge(t,e[i])}return t}(u),missing:l};return p.result&&this.knownResults.set(p.result,e),p}execSubSelectedArrayImpl({field:e,array:t,enclosingRef:r,context:n}){let i,s=new Ht;
1function o(e,t){return e.missing&&(i=s.merge(i,{[t]:e.missing})),e.result}return e.selectionSet&&(t=t.filter(e=>void 0===e||n.store.canRead(e))),{result:t=t.map((t,i)=>null===t?null:fr(t)?o(this.executeSubSelectedArray({field:e,array:t,enclosingRef:r,context:n}),i):e.selectionSet?o(this.executeSelectionSet({selectionSet:e.selectionSet,objectOrReference:t,enclosingRef:En(t)?t:r,context:n}),i):t),missing:i}}}function Ti(e,t,r){const n=`${t}${r}`;let i=e.flavors.get(n);return i||e.flavors.set(n,i=e.clientOnly===t&&e.deferred===r?e:{...e,clientOnly:t,deferred:r}),i}class ji{constructor(e,t,n){r(this,"cache"),r(this,"reader"),r(this,"fragments"),this.cache=e,this.reader=t,this.fragments=n}writeToStore(e,{query:t,result:r,dataId:n,variables:i,overwrite:s,extensions:o}){const a=er(t),c=new Ht;i={...Gt(a),...i};const u={store:e,written:{},merge:(e,t)=>c.merge(e,t),variables:i,varString:rr(i),...Un(t,this.fragments),overwrite:!!s,incomingById:new Map,clientOnly:!1,deferred:!1,flavors:new Map,extensions:o},l=this.processSelectionSet({result:r||{},dataId:n,selectionSet:a.selectionSet,mergeTree:{map:new Map},context:u,path:[]});if(!En(l))throw k(109,r);return u.incomingById.forEach(({storeObject:t,mergeTree:r,fieldNodeSet:n},i)=>{const s=yr(i);if(r&&r.map.size){const e=this.applyMerges(r,s,t,u);if(En(e))return;t=e}e.merge(i,t)}),e.retain(l.__ref),l}processSelectionSet({dataId:e,result:t,selectionSet:r,context:n,mergeTree:i,path:s}){const{policies:o}=this.cache;let a={};const c=e&&o.rootTypenamesById[e]||zi(t,r,n.fragmentMap)||e&&n.store.get(e,"__typename");"string"==typeof c&&(a.__typename=c);const u=(...e)=>{const t=Ri(e,a,n.variables);if(En(t.from)){const e=n.incomingById.get(t.from.__ref);if(e){const r=o.readField({...t,from:e.storeObject},n);if(void 0!==r)return r}}return o.readField(t,n)},l=new Set;this.flattenFields(r,t,n,c).forEach((e,r)=>{const n=Sr(r),h=t[n],f=[...s,r.name.value];if(l.add(r),void 0!==h){const t=o.getStoreFieldName({typename:c,fieldName:r.name.value,field:r,variables:e.variables}),n=Ni(i,t);let s,l=this.processFieldValue(h,r,r.selectionSet?Ti(e,!1,!1):e,n,f);r.selectionSet&&(En(l)||Bn(l))&&(s=u("__typename",l));const d=o.getMergeFunction(c,r.name.value,s);d?n.info={field:r,typename:c,merge:d,path:f}:lr(["stream"],r)&&Array.isArray(l)&&e.extensions?.[qr]?n.info={field:r,typename:c,merge:Ei,path:f}:Qi(i,t),a=e.merge(a,{[t]:l})}});try{const[i,s]=o.identify(t,{typename:c,selectionSet:r,fragmentMap:n.fragmentMap,storeObject:a,readField:u});e=e||i,s&&(a=n.merge(a,s))}catch(h){if(!e)throw h}if("string"==typeof e){const s=yr(e),o=n.written[e]||(n.written[e]=[]);if(o.indexOf(r)>=0)return s;if(o.push(r),this.reader&&this.reader.isFresh(t,s,r,n))return s;const c=n.incomingById.get(e);return c?(c.storeObject=n.merge(c.storeObject,a),c.mergeTree=Di(c.mergeTree,i),l.forEach(e=>c.fieldNodeSet.add(e))):n.incomingById.set(e,{storeObject:a,mergeTree:Ai(i)?void 0:i,fieldNodeSet:l}),s}return a}processFieldValue(e,t,r,n,i){return t.selectionSet&&null!==e?fr(e)?e.map((e,s)=>{const o=this.processFieldValue(e,t,r,Ni(n,s),[...i,s]);return Qi(n,s),o}):this.processSelectionSet({result:e,selectionSet:t.selectionSet,context:r,mergeTree:n,path:i}):e}flattenFields(e,t,r,n=zi(t,e,r.fragmentMap)){const i=new Map,{policies:o}=this.cache,a=new Pt(!1);return function e(c,u){const l=a.lookup(c,u.clientOnly,u.deferred);l.visited||(l.visited=!0,c.selections.forEach(a=>{if(!xr(a,r.variables))return;let{clientOnly:c,deferred:l}=u;if(c&&l||!pr(a.directives)||a.directives.forEach(e=>{const t=e.name.value;if("client"===t&&(c=!0),"defer"===t){const t=gt(e,r.variables);t&&!1===t.if||(l=!0)}}),dr(a)){const e=i.get(a);e&&(c=c&&e.clientOnly,l=l&&e.deferred),i.set(a,Ti(r,c,l))}else{const i=Jt(a,r.lookupFragment);if(!i&&a.kind===s.FRAGMENT_SPREAD)throw k(111,a.name.value);i&&o.fragmentMatches(i,n,t,r.variables)&&e(i.selectionSet,Ti(r,c,l))}}))}(e,r),i}applyMerges(e,t,r,n,i){if(e.map.size&&!En(r)){const s=fr(r)||!En(t)&&!Bn(t)?void 0:t,o=r;let a;s&&!i&&(i=[En(s)?s.__ref:s]);const c=(e,t)=>fr(e)?"number"==typeof t?e[t]:void 0:n.store.getFieldValue(e,String(t));
1e.map.forEach((e,t)=>{const r=c(s,t),u=c(o,t);if(void 0===u)return;i&&i.push(t);const l=this.applyMerges(e,r,u,n,i);l!==u&&(a=a||new Map,a.set(t,l)),i&&g(i.pop()===t)}),a&&(r=fr(o)?o.slice(0):{...o},a.forEach((e,t)=>{r[t]=e}))}return e.info?this.cache.policies.runMergeFunction(t,r,e.info,n,i&&n.store.getStorage(...i)):r}}const Mi=[];function Ni({map:e},t){return e.has(t)||e.set(t,Mi.pop()||{map:new Map}),e.get(t)}function Di(e,t){if(e===t||!t||Ai(t))return e;if(!e||Ai(e))return t;const r=e.info&&t.info?{...e.info,...t.info}:e.info||t.info,n=e.map.size&&t.map.size,i={info:r,map:n?new Map:e.map.size?e.map:t.map};if(n){const r=new Set(t.map.keys());e.map.forEach((e,n)=>{i.map.set(n,Di(e,t.map.get(n))),r.delete(n)}),r.forEach(r=>{i.map.set(r,Di(t.map.get(r),e.map.get(r)))})}return i}function Ai(e){return!e||!(e.info||e.map.size)}function Qi({map:e},t){const r=e.get(t);r&&Ai(r)&&(Mi.push(r),e.delete(t))}function zi(e,t,r){let n;for(const i of t.selections)if(dr(i)){if("__typename"===i.name.value)return e[Sr(i)]}else n?n.push(i):n=[i];if("string"==typeof e.__typename)return e.__typename;if(n)for(const i of n){const t=zi(e,Jt(i,r).selectionSet,r);if("string"==typeof t)return t}}class Wi extends qn{constructor(e={}){super(),r(this,"data"),r(this,"optimisticData"),r(this,"config"),r(this,"watches",new Set),r(this,"storeReader"),r(this,"storeWriter"),r(this,"addTypenameTransform",new xn(Cn)),r(this,"maybeBroadcastWatch"),r(this,"assumeImmutableResults",!0),r(this,"policies"),r(this,"makeVar",wi),r(this,"txCount",0),this.config=function(e){return Vt(zn,e)}(e),this.policies=new Pi({cache:this,dataIdFromObject:this.config.dataIdFromObject,possibleTypes:this.config.possibleTypes,typePolicies:this.config.typePolicies}),this.init()}init(){const e=this.data=new Gn.Root({policies:this.policies,resultCaching:this.config.resultCaching});this.optimisticData=e.stump,this.resetResultCache()}resetResultCache(){const{fragments:e}=this.config;this.addTypenameTransform.resetCache(),e?.resetCaches(),this.storeWriter=new ji(this,this.storeReader=new qi({cache:this,fragments:e}),e),this.maybeBroadcastWatch=mn((e,t)=>this.broadcastWatch(e,t),{max:kt["inMemoryCache.maybeBroadcastWatch"]||5e3,makeCacheKey:e=>{const t=e.optimistic?this.optimisticData:this.data;if(ri(t)){const{optimistic:r,id:n,variables:i}=e;return t.makeCacheKey(e.query,e.callback,rr({optimistic:r,id:n,variables:i}))}}}),new Set([this.data.group,this.optimisticData.group]).forEach(e=>e.resetCaching())}restore(e){return this.init(),e&&this.data.replace(e),this}extract(e=!1){return(e?this.optimisticData:this.data).extract()}read(e){const{returnPartialData:t=!1}=e;return this.storeReader.diffQueryAgainstStore({...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||!1===e.broadcast||this.broadcastWatches()}}modify(e){if(An.call(e,"id")&&!e.id)return!1;const t=e.optimistic?this.optimisticData:this.data;try{return++this.txCount,t.modify(e.id||"ROOT_QUERY",e.fields,!1)}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}}diff(e){return this.storeReader.diffQueryAgainstStore({...e,store:e.optimistic?this.optimisticData:this.data,rootId:e.id||"ROOT_QUERY",config:this.config})}watch(e){var t;return this.watches.size||vi(t=this).vars.forEach(e=>e.attachCache(t)),this.watches.add(e),e.immediate&&this.maybeBroadcastWatch(e),()=>{this.watches.delete(e)&&!this.watches.size&&gi(this),this.maybeBroadcastWatch.forget(e)}}gc(e){rr.reset(),_n.reset();const 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(En(e))return e.__ref;try{return this.policies.identify(e)[0]}catch(t){}}evict(e){if(!e.id){if(An.call(e,"id"))return!1;e={...e,id:"ROOT_QUERY"}}try{return++this.txCount,this.optimisticData.evict(e,this.data)}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}}reset(e){return this.init(),rr.reset(),e&&e.discardWatches?(this.watches.forEac
1h(e=>this.maybeBroadcastWatch.forget(e)),this.watches.clear(),gi(this)):this.broadcastWatches(),Promise.resolve()}removeOptimistic(e){const t=this.optimisticData.removeLayer(e);t!==this.optimisticData&&(this.optimisticData=t,this.broadcastWatches())}batch(e){const{update:t,optimistic:r=!0,removeOptimistic:n,onWatchUpdated:i}=e;let s;const o=e=>{const{data:r,optimisticData:n}=this;++this.txCount,e&&(this.data=this.optimisticData=e);try{return s=t(this)}finally{--this.txCount,this.data=r,this.optimisticData=n}},a=new Set;return i&&!this.txCount&&this.broadcastWatches({...e,onWatchUpdated:e=>(a.add(e),!1)}),"string"==typeof r?this.optimisticData=this.optimisticData.addLayer(r,o):!1===r?o(this.data):o(),"string"==typeof n&&(this.optimisticData=this.optimisticData.removeLayer(n)),i&&a.size?(this.broadcastWatches({...e,onWatchUpdated(e,t){const r=i.call(this,e,t);return!1!==r&&a.delete(e),r}}),a.size&&a.forEach(e=>this.maybeBroadcastWatch.dirty(e))):this.broadcastWatches(e),s}performTransaction(e,t){return this.batch({update:e,optimistic:t||null!==t})}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}resolvesClientField(e,t){return!!this.policies.getReadFunction(e,t)}broadcastWatches(e){if(!this.txCount){const t=this.onAfterBroadcast,r=new Set;this.onAfterBroadcast=e=>{r.add(e)};try{this.watches.forEach(t=>this.maybeBroadcastWatch(t,e)),r.forEach(e=>e())}finally{this.onAfterBroadcast=t}}}addFragmentsToDocument(e){const{fragments:t}=this.config;return t?t.transform(e):e}broadcastWatch(e,t){const{lastDiff:r}=e,n=this.diff(e);t&&(e.optimistic&&"string"==typeof t.optimistic&&(n.fromOptimisticTransaction=!0),t.onWatchUpdated&&!1===t.onWatchUpdated.call(this,e,n,r))||r&&j(r.result,n.result)||e.callback(e.lastDiff=n,r)}}function Vi(e,t){return"object"==typeof e&&null!==e&&e[Symbol.for("apollo.error")]===t}function Li(e){Object.defineProperty(e,Symbol.for("apollo.error"),{value:e.name,enumerable:!1,writable:!1,configurable:!1})}function Bi(e){return e.map(e=>e.message||"Error message not found.").join("\n")}const Ui=class e extends Error{constructor(t){super(e.formatMessage(t,{defaultFormatMessage:Bi})),r(this,"errors"),this.name="CombinedProtocolErrors",this.errors=t,Li(this),Object.setPrototypeOf(this,e.prototype)}static is(e){return Vi(e,"CombinedProtocolErrors")}};r(Ui,"formatMessage",Bi);let $i=Ui;
1class Ki extends Error{static is(e){return Vi(e,"UnconventionalError")}constructor(e){super("An error of unexpected shape occurred.",{cause:e}),this.name="UnconventionalError",Li(this),Object.setPrototypeOf(this,Ki.prototype)}}function Hi(e){return e.filter(e=>e).map(e=>e.message||"Error message not found.").join("\n")}const Gi=class e extends Error{constructor(t,n=t.errors||[]){super(e.formatMessage(n,{result:t,defaultFormatMessage:Hi})),r(this,"errors"),r(this,"data"),r(this,"extensions"),this.errors=n,this.data=t.data,this.extensions=t.extensions,this.name="CombinedGraphQLErrors",Li(this),Object.setPrototypeOf(this,e.prototype)}static is(e){return Vi(e,"CombinedGraphQLErrors")}};r(Gi,"formatMessage",Hi);let Ji=Gi;const Yi=new WeakSet;class Zi extends Error{constructor(e,t){super(e),r(this,"response"),r(this,"statusCode"),r(this,"bodyText"),this.name="ServerError",this.response=t.response,this.statusCode=t.response.status,this.bodyText=t.bodyText,Li(this),Object.setPrototypeOf(this,Zi.prototype)}static is(e){return Vi(e,"ServerError")}}class Xi extends Error{constructor(e,t){super(e instanceof Error?e.message:"Could not parse server response",{cause:e}),r(this,"response"),r(this,"statusCode"),r(this,"bodyText"),this.name="ServerParseError",this.response=t.response,this.statusCode=t.response.status,this.bodyText=t.bodyText,Li(this),Object.setPrototypeOf(this,Xi.prototype)}static is(e){return Vi(e,"ServerParseError")}}const es=Symbol();function ts(e){return"extensions"in e&&$i.is(e.extensions[es])}function rs(e){return function(e){return null!==e&&"object"==typeof e&&"string"==typeof e.message&&"string"==typeof e.name&&("string"==typeof e.stack||void 0===e.stack)}(e)?e:"string"==typeof e?new Error(e,{cause:e}):new Ki(e)}var ns,is;(is=ns||(ns={}))[is.loading=1]="loading",is[is.setVariables=2]="setVariables",is[is.fetchMore=3]="fetchMore",is[is.refetch=4]="refetch",is[is.poll=6]="poll",is[is.ready=7]="ready",is[is.error=8]="error",is[is.streaming=9]="streaming";const{assign:ss}=Object,os={loading:!0,networkStatus:ns.loading,data:void 0,dataState:"empty",partial:!0},as={loading:!1,networkStatus:ns.ready,data:void 0,dataState:"empty",partial:!0};e=Symbol.observable;class cs{constructor({queryManager:t,options:n,transformedQuery:i=t.transform(n.query)}){r(this,"options"),r(this,"queryName"),r(this,"variablesUnknown",!1),r(this,"_lastWrite"),r(this,"unsubscribeFromCache"),r(this,"input"),r(this,"subject"),r(this,"isTornDown"),r(this,"queryManager"),r(this,"subscriptions",new Set),r(this,"waitForNetworkResult"),r(this,"lastQuery"),r(this,"linkSubscription"),r(this,"pollingInfo"),r(this,"subscribe"),r(this,"pipe"),r(this,e),r(this,"@@observable"),r(this,"stableLastResult"),r(this,"didWarnCacheOnlyPolling",!1),r(this,"dirty",!1),r(this,"notifyTimeout"),r(this,"activeOperations",new Set),r(this,"operator",_r(e=>{const{query:t,variables:r,meta:n}=e;if("setResult"===e.source)return{query:t,variables:r,result:e.value,meta:n};if("C"===e.kind||!us(e,this))return;let i;const s=this.subject.getValue();if("cache"===e.source){if(i=e.value,i.networkStatus===ns.ready&&i.partial&&(!this.options.returnPartialData||s.result.networkStatus===ns.error)&&"cache-only"!==this.options.fetchPolicy)return}else if("network"===e.source)this.waitForNetworkResult&&(this.waitForNetworkResult=!1,this.resubscribeCache()),i="E"===e.kind?{...us(s,e)?s.result:{data:void 0,dataState:"empty",partial:!0},error:e.error,networkStatus:ns.error,loading:!1}:e.value,"E"===e.kind&&"streaming"===i.dataState&&(i.dataState="complete"),i.error&&(n.shouldEmit=1);else if("newNetworkStatus"===e.source){const t=us(s,e)?s.result:this.getInitialResult(n.fetchPolicy),{resetError:r}=e.value,o=r?void 0:t.error,a=o?ns.error:ns.ready;i={...t,error:o,networkStatus:a}}return g(i),i.error||delete i.error,i.networkStatus=this.calculateNetworkStatus(i.networkStatus),i.loading=Fn(i.networkStatus),i=this.maskResult(i),{query:t,variables:r,result:i,meta:n}})),this.queryManager=t,this.waitForNetworkResult="network-only"===n.fetchPolicy,this.isTornDown=!1,this.subscribeToMore=this.subscribeToMore.bind(this),this.maskResult=this.maskResult.bind(this);const{watchQuery:{fetchPolicy:s="cache-first"}={}}=t.defaultOptions,{fetchPolicy:o=s,initialFetchPolicy:a=("standby"===o?s:o)}=n;n[Tr]&&(g("standby"===o,80),this.variablesUnknown=!0),this.lastQuery=i,this.options={...n,initialFetchPolicy:a,fetchPolicy:o,variables:this.getVariablesWithDefaults(n.variables)},this.initializeObservablesQueue(),this["@@observable"]=()=>this,Symbol.observable&&(this[Symbol.observable]=()=>this);const c=er(this.query);this.queryName=c&&c.name&&c.name.value}get query(){return this.lastQuery}get variables(){return this.options.variables}get networkStatus(){return this.subject.getValue().result.networkStatus}get cache(){return this.queryManager.cache}
1initializeObservablesQueue(){this.subject=new Se({query:this.query,variables:this.variables,result:os,meta:{}});const e=this.subject.pipe(bt({subscribe:()=>{this.subject.observed||(this.reobserve(),setTimeout(()=>this.updatePolling()))},unsubscribe:()=>{this.subject.observed||this.tearDownQuery()}}),_r(({query:e,variables:t,result:r,meta:n},i)=>{const{shouldEmit:s}=n;if(r===os&&(i.previous=void 0,i.previousVariables=void 0),"standby"===this.options.fetchPolicy||2===s)return;if(1===s)return c();const{previous:o,previousVariables:a}=i;if(o){const n=this.queryManager.getDocumentInfo(e),i=this.queryManager.dataMasking,s=i?n.nonReactiveQuery:e;if((i||n.hasNonreactiveDirective?Er(s,o,r,t):j(o,r))&&j(a,t))return}if(3!==s||this.options.notifyOnNetworkStatusChange&&!j(o,r))return c();function c(){return i.previous=r,i.previousVariables=t,r}},()=>({})));this.pipe=e.pipe.bind(e),this.subscribe=e.subscribe.bind(e),this.input=new we,this.input.complete=()=>{},this.input.pipe(this.operator).subscribe(this.subject)}getCacheDiff({optimistic:e=!0}={}){return this.cache.diff({query:this.query,variables:this.variables,returnPartialData:!0,optimistic:e})}getInitialResult(e){let t=e||this.options.fetchPolicy;!this.queryManager.prioritizeCacheValues||"network-only"!==t&&"cache-and-network"!==t||(t="cache-first");const r=()=>{const e=this.getCacheDiff(),t=this.options.returnPartialData||e.complete?e.result??void 0:void 0;return this.maskResult({data:t,dataState:e.complete?"complete":void 0===t?"empty":"partial",loading:!e.complete,networkStatus:e.complete?ns.ready:ns.loading,partial:!e.complete})};switch(t){case"cache-only":return{...r(),loading:!1,networkStatus:ns.ready};case"cache-first":return r();case"cache-and-network":return{...r(),loading:!0,networkStatus:ns.loading};case"standby":return as;default:return os}}resubscribeCache(){const{variables:e,fetchPolicy:t}=this.options,r=this.query,n="standby"===t||"no-cache"===t||this.waitForNetworkResult,i=!us({query:r,variables:e},this.unsubscribeFromCache)&&!this.waitForNetworkResult;if((n||i)&&this.unsubscribeFromCache?.(),n||!i)return;const s={query:r,variables:e,optimistic:!0,watcher:this,callback:e=>{const t=this.queryManager.getDocumentInfo(r);if((t.hasClientExports||t.hasForcedResolvers)&&(s.lastDiff=void 0),s.lastOwnDiff===e)return;const{result:n}=this.subject.getValue();(e.complete||!n.error&&n!==os&&n!==as)&&(j(n.data,e.result)||this.scheduleNotify())}},o=this.cache.watch(s);this.unsubscribeFromCache=Object.assign(()=>{this.unsubscribeFromCache=void 0,o()},{query:r,variables:e})}getCurrentResult(){const{result:e}=this.subject.getValue();let t=e.networkStatus===ns.error||this.hasObservers()||"no-cache"===this.options.fetchPolicy?e:this.getInitialResult();return t===os&&(t=this.getInitialResult()),j(this.stableLastResult,t)||(this.stableLastResult=t),this.stableLastResult}refetch(e){const{fetchPolicy:t}=this.options,r={pollInterval:0};return r.fetchPolicy="no-cache"===t?"no-cache":"network-only",e&&!j(this.variables,e)&&(r.variables=this.options.variables=this.getVariablesWithDefaults({...this.variables,...e})),this._lastWrite=void 0,this._reobserve(r,{newNetworkStatus:ns.refetch})}fetchMore({query:e,variables:t,context:r,errorPolicy:n,updateQuery:i}){g("cache-only"!==this.options.fetchPolicy,82,St(this.query,"(anonymous)"));const s={...Vt(this.options,{errorPolicy:"none"},{query:e,context:r,errorPolicy:n}),variables:e?t:{...this.variables,...t},fetchPolicy:"no-cache",notifyOnNetworkStatusChange:this.options.notifyOnNetworkStatusChange};s.query=this.transformDocument(s.query),this.lastQuery=e?this.transformDocument(this.options.query):s.query;let o=!1;const a="no-cache"!==this.options.fetchPolicy;a||g(i,83);const{finalize:c,pushNotification:u}=this.pushOperation(ns.fetchMore);u({source:"newNetworkStatus",kind:"N",value:{}},{shouldEmit:3});const{promise:l,operator:h}=ls(),{observable:f}=this.queryManager.fetchObservableWithInfo(s,{networkStatus:ns.fetchMore,exposeExtensions:!0}),d=f.pipe(h,ht(e=>"N"===e.kind&&"network"===e.source)).subscribe({next:e=>{o=!1;const t=e.value,r=t[Fr];if(In(e.value.networkStatus)&&c(),a){const e=this.getCacheDiff();this.cache.batch({update:e=>{i?e.updateQuery({query:this.query,variables:this.variables,returnPartialData:!0,optimistic:!1,extensions:r},e=>i(e,{fetchMoreResult:t.data,variables:s.variables})):e.writeQuery({query:s.query,variables:s.variables,data:t.data,extensions:r})},onWatchUpdated:(r,n)=>{if(r.watcher===this&&!j(n.result,e.result)){o=!0;const e=this.getCurrentResult();Fn(t.networkStatus)&&u({kind:"N",source:"network",value:{...e,networkStatus:t.networkStatus===ns.error?ns.ready:t.networkStatus,loading:!1,data:n.result,dataState:"streaming"===t.dataState?"streaming":"complete"}})}}})}else{const e=this.getCurrentResult(),r=i(e.data,{fetchMoreResult:t.data,variables:s.variables});u({kind:"N",value:{...e,networkStatus:ns.ready,loading:!1,data:r,dataState:"streaming"===e.dataState?"streaming":"complete"},source:"network"})}}});return br(l.then(e=>Or(this.maskResult(e))).finally(()=>
1{if(d.unsubscribe(),c(),a&&!o){const e=this.getCurrentResult();"streaming"===e.dataState?u({kind:"N",source:"network",value:{...e,dataState:"complete",networkStatus:ns.ready}}):u({kind:"N",source:"newNetworkStatus",value:{}},{shouldEmit:1})}}))}subscribeToMore(e){const t=this.queryManager.startGraphQLSubscription({query:e.document,variables:e.variables,context:e.context}).subscribe({next:t=>{const{updateQuery:r,onError:n}=e,{error:i}=t;i?n?n(i):g.error(84,i):r&&this.updateQuery((e,n)=>r(e,{subscriptionData:t,...n}))}});return this.subscriptions.add(t),()=>{this.subscriptions.delete(t)&&t.unsubscribe()}}applyOptions(e){const t=Vt(this.options,e||{});ss(this.options,t),this.updatePolling()}async setVariables(e){return e=this.getVariablesWithDefaults(e),j(this.variables,e)?Or(this.getCurrentResult()):(this.options.variables=e,this.hasObservers()?this._reobserve({fetchPolicy:this.options.initialFetchPolicy,variables:e},{newNetworkStatus:ns.setVariables}):Or(this.getCurrentResult()))}updateQuery(e){const{queryManager:t}=this,{result:r,complete:n}=this.getCacheDiff({optimistic:!1}),i=e(r,{variables:this.variables,complete:!!n,previousData:r});i&&(this.cache.writeQuery({query:this.options.query,data:i,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){const{fetchPolicy:r="cache-first",initialFetchPolicy:n=r}=t;"standby"===r||("function"==typeof t.nextFetchPolicy?t.fetchPolicy=t.nextFetchPolicy.call(t,r,{reason:e,options:t,observable:this,initialFetchPolicy:n}):t.fetchPolicy="variables-changed"===e?n:t.nextFetchPolicy)}return t.fetchPolicy}fetch(e,t,r,n){const i=this.options.fetchPolicy;e.context??(e.context={});let s=!1,{observable:o,fromLink:a}=this.queryManager.fetchObservableWithInfo(e,{networkStatus:t,query:r,onCacheHit:()=>{s=!0},fetchQueryOperator:e=>new de(r=>{try{return e.subscribe({next(e){s=!0,r.next(e)},error:e=>r.error(e),complete:()=>r.complete()})}finally{s||(l.override=t,this.input.next({kind:"N",source:"newNetworkStatus",value:{resetError:!0},query:c,variables:u,meta:{shouldEmit:3,fetchPolicy:i}}))}}),observableQuery:this});const{query:c,variables:u}=this,l={abort:()=>{f.unsubscribe()},query:c,variables:u};this.activeOperations.add(l);let h=t==ns.refetch||t==ns.setVariables;o=o.pipe(n,pt());const f=o.pipe(bt({next:e=>{"newNetworkStatus"===e.source||"N"===e.kind&&e.value.loading?l.override=t:delete l.override},finalize:()=>this.activeOperations.delete(l)})).subscribe({next:e=>{const t={};h&&"N"===e.kind&&"loading"in e.value&&!e.value.loading&&(h=!1,t.shouldEmit=1),this.input.next({...e,query:c,variables:u,meta:t})}});return{fromLink:a,subscription:f,observable:o}}updatePolling(){if(this.queryManager.ssrMode)return;const{pollingInfo:e,options:{fetchPolicy:t,pollInterval:r}}=this;if(!r||!this.hasObservers()||"cache-only"===t)return void this.cancelPolling();if(e?.interval===r)return;(e||(this.pollingInfo={})).interval=r;const n=()=>{this.pollingInfo&&(Fn(this.networkStatus)||this.options.skipPollAttempt?.()?i():this._reobserve({fetchPolicy:"no-cache"===this.options.initialFetchPolicy?"no-cache":"network-only"},{newNetworkStatus:ns.poll}).then(i,i))},i=()=>{const e=this.pollingInfo;e&&(clearTimeout(e.timeout),e.timeout=setTimeout(n,e.interval))};i()}cancelPolling(){this.pollingInfo&&(clearTimeout(this.pollingInfo.timeout),delete this.pollingInfo)}reobserve(e){return this._reobserve(e)}_reobserve(e,t){this.isTornDown=!1;let{newNetworkStatus:r}=t||{};this.queryManager.obsQueries.add(this);const n=r===ns.refetch||r===ns.poll,i=this.variables,s=this.options.fetchPolicy,o=Vt(this.options,e||{});this.variablesUnknown&&(this.variablesUnknown="standby"===o.fetchPolicy);const a=n?o:ss(this.options,o),c=this.transformDocument(a.query);this.lastQuery=c,e&&"variables"in e&&(a.variables=this.getVariablesWithDefaults(e.variables)),n||(this.updatePolling(),!e||!e.variables||j(e.variables,i)||"standby"===a.fetchPolicy||a.fetchPolicy!==s&&"function"!=typeof a.nextFetchPolicy||(this.applyNextFetchPolicy("variables-changed",a),void 0===r&&(r=ns.setVariables)));const u=this.networkStatus;r||(r=ns.loading,u!==ns.loading&&e?.variables&&!j(e.variables,i)&&(r=ns.setVariables),"standby"===a.fetchPolicy&&(r=ns.ready)),"standby"===a.fetchPolicy&&this.cancelPolling(),this.resubscribeCache();const{promise:l,operator:h}=ls("standby"===a.fetchPolicy?{data:void 0}:void 0),{subscription:f,observable:d,fromLink:p}=this.fetch(a,r,c,h);n||!p&&this.linkSubscription||(this.linkSubscription&&this.linkSubscription.unsubscribe(),this.linkSubscription=f);const y=Object.assign(br(l.then(e=>Or(this.maskResult(e))).finally(()=>{this.hasObservers()||0!==this.activeOperations.size||this.tearDownQuery()})),{retain:()=>{const e=d.subscribe({}),t=()=>e.unsubscribe();return l.then(t,t),y}});return y}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
1=>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){const t=this.queryManager.maskOperation({document:this.query,data:e.data,fetchPolicy:this.options.fetchPolicy,cause:this});return t===e.data?e:{...e,data:t}}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){const e=this.queryManager.getDocumentInfo(this.query);if(e.hasClientExports||e.hasForcedResolvers)return}const{dirty:t}=this;if(this.resetNotifications(),t&&("cache-only"===this.options.fetchPolicy||"cache-and-network"===this.options.fetchPolicy||!this.activeOperations.size)){const e=this.getCacheDiff();j(e.result,this.getCacheDiff({optimistic:!1}).result)?this.reobserveCacheFirst():this.input.next({kind:"N",value:{data:e.result,dataState:e.complete?"complete":e.result?"partial":"empty",networkStatus:ns.ready,loading:!1,error:void 0,partial:!e.complete},source:"cache",query:this.query,variables:this.variables,meta:{}})}}pushOperation(e){let t=!1;const{query:r,variables:n}=this,i=()=>{this.activeOperations.delete(s)},s={override:e,abort:()=>{t=!0,i()},query:r,variables:n};return this.activeOperations.add(s),{finalize:i,pushNotification:(e,i)=>{t||this.input.next({...e,query:r,variables:n,meta:{...i}})}}}calculateNetworkStatus(e){if(e===ns.streaming)return e;const t=Array.from(this.activeOperations.values()).reverse().find(e=>us(e,this)&&void 0!==e.override);return t?.override??e}abortActiveOperations(){this.activeOperations.forEach(e=>e.abort())}reset(){const e="cache-only"===this.options.fetchPolicy;this.setResult(e?as:os,{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:{...t}})}reobserveCacheFirst(){const{fetchPolicy:e,nextFetchPolicy:t}=this.options;"cache-and-network"===e||"network-only"===e?this.reobserve({fetchPolicy:"cache-first",nextFetchPolicy(r,n){return this.nextFetchPolicy=t,"function"==typeof this.nextFetchPolicy?this.nextFetchPolicy(r,n):e}}):this.reobserve()}getVariablesWithDefaults(e){return this.queryManager.getVariables(this.query,e)}}function us(e,t){return!!(e&&t&&e.query===t.query&&j(e.variables,t.variables))}function ls(e){let t,r,n=e;return{promise:new Promise((e,n)=>{t=e,r=n}),operator:bt({next(e){if("E"===e.kind)return r(e.error);"N"!==e.kind||"newNetworkStatus"===e.source||e.value.loading||(n=e.value)},finalize:()=>{if(n)t(n);else{const e="The operation was aborted.",t="AbortError";r("undefined"!=typeof DOMException?new DOMException(e,t):Object.assign(new Error(e),{name:t}))}}})}}const hs={},fs=new WeakMap;function ds(e,t){const r=e[t];"function"==typeof r&&(e[t]=function(){return fs.set(e,(fs.get(e)+1)%1e15),r.apply(this,arguments)})}const ps=new WeakMap;class ys{constructor(e,t){r(this,"lastRequestId",1),r(this,"cache"),r(this,"queryManager"),r(this,"id"),r(this,"observableQuery"),r(this,"incremental"),r(this,"_lastWrite");const n=this.cache=e.cache,i=(ps.get(e)||0)+1;ps.set(e,i),this.id=i+"",this.observableQuery=t,this.queryManager=e,fs.has(n)||(fs.set(n,0),ds(n,"evict"),ds(n,"modify"),ds(n,"reset"))}get lastWrite(){return(this.observableQuery||this)._lastWrite}set lastWrite(e){(this.observableQuery||this)._lastWrite=e}resetLastWrite(){this.lastWrite=void 0}shouldWrite(e,t){const{lastWrite:r}=this;return!(r&&r.dmCount===fs.get(this.cache)&&j(t,r.variables)&&j(e.data,r.result.data)&&e.extensions?.[qr]===r.result.extensions?.[qr])}get hasNext(){return!!this.incremental&&this.incremental.hasNext}maybeHandleIncrementalResult(e,t,r){const{incrementalHandler:n}=this.queryManager;return n.isIncrementalResult(t)?(this.incremental||(this.incremental=n.startRequest({query:r})),this.incremental.handle(e,t)):t}markQueryResult(e,{document:t,variables:r,errorPolicy:n,cacheWriteBehavior:i}){const s={query:t,variables:r,returnPartialData:!0,optimistic:!0};this.observableQuery?.resetNotifications();const o=0===i,a=o?void 0:this.cache.diff(s);let c=this.maybeHandleIncrementalResult(a?.result,e,t);return o||(ms(c,n)?this.cache.batch({onWatchUpdated:(e,t)=>{e.watcher===this.observableQuery&&(e.lastOwnDiff=t)}
1,update:e=>{if(this.shouldWrite(c,r))e.writeQuery({query:t,data:c.data,variables:r,overwrite:1===i,extensions:c.extensions}),this.lastWrite={result:c,variables:r,dmCount:fs.get(this.cache)};else if(a&&a.complete)return void(c={...c,data:a.result});const n=e.diff(s);n.complete&&(c={...c,data:n.result})}}):this.lastWrite=void 0),c}markMutationResult(e,t,r=this.cache){const n=[],i=0===t.cacheWriteBehavior;let s=this.maybeHandleIncrementalResult(i?void 0:r.diff({id:"ROOT_MUTATION",query:this.queryManager.getDocumentInfo(t.document).asQuery,variables:t.variables,optimistic:!1,returnPartialData:!0}).result,e,t.document);if("ignore"===t.errorPolicy&&(s={...s,errors:[]}),ur(s)&&"none"===t.errorPolicy)return Promise.resolve(s);const o=()=>({...s,dataState:this.hasNext?"streaming":"complete"});if(!i&&ms(s,t.errorPolicy)){n.push({result:s.data,dataId:"ROOT_MUTATION",query:t.document,variables:t.variables,extensions:s.extensions});const{updateQueries:e}=t;e&&this.queryManager.getObservableQueries("all").forEach(t=>{const r=t&&t.queryName;if(!r||!Object.hasOwnProperty.call(e,r))return;const i=e[r],{query:s,variables:a}=t,{result:c,complete:u}=t.getCacheDiff({optimistic:!1});if(u&&c){const e=i(c,{mutationResult:o(),queryName:s&&St(s)||void 0,queryVariables:a});e&&n.push({result:e,dataId:"ROOT_QUERY",query:s,variables:a})}})}let a=t.refetchQueries;if("function"==typeof a&&(a=a(o())),n.length>0||(a||"").length>0||t.update||t.onQueryUpdated||t.removeOptimistic){const e=[];if(this.queryManager.refetchQueries({updateCache:e=>{i||n.forEach(t=>e.write(t));const{update:r}=t;if(r){if(!i){const r=e.diff({id:"ROOT_MUTATION",query:this.queryManager.getDocumentInfo(t.document).asQuery,variables:t.variables,optimistic:!1,returnPartialData:!0});r.complete&&(s={...s,data:r.result})}this.hasNext||r(e,s,{context:t.context,variables:t.variables})}i||t.keepRootFields||this.hasNext||e.modify({id:"ROOT_MUTATION",fields:(e,{fieldName:t,DELETE:r})=>"__typename"===t?e:r})},include:a,optimistic:!1,removeOptimistic:t.removeOptimistic,onQueryUpdated:t.onQueryUpdated||null}).forEach(t=>e.push(t)),t.awaitRefetchQueries||t.onQueryUpdated)return Promise.all(e).then(()=>s)}return Promise.resolve(s)}markMutationOptimistic(e,t){const r="function"==typeof e?e(t.variables,{IGNORE:hs}):e;return r!==hs&&(this.cache.recordOptimisticTransaction(e=>{try{this.markMutationResult({data:r},t,e)}catch(n){g.error(n)}},this.id),!0)}markSubscriptionResult(e,{document:t,variables:r,errorPolicy:n,cacheWriteBehavior:i}){0!==i&&(ms(e,n)&&this.cache.write({query:t,result:e.data,dataId:"ROOT_SUBSCRIPTION",variables:r,extensions:e.extensions}),this.queryManager.broadcastQueries())}}function ms(e,t="none"){const r="ignore"===t||"all"===t;let n=!ur(e);return!n&&r&&e.data&&(n=!0),n}class bs{constructor(e){r(this,"defaultOptions"),r(this,"client"),r(this,"clientOptions"),r(this,"assumeImmutableResults"),r(this,"documentTransform"),r(this,"ssrMode"),r(this,"defaultContext"),r(this,"dataMasking"),r(this,"incrementalHandler"),r(this,"localState"),r(this,"queryDeduplication"),r(this,"prioritizeCacheValues",!1),r(this,"onBroadcast"),r(this,"mutationStore"),r(this,"obsQueries",new Set),r(this,"fetchCancelFns",new Map),r(this,"transformCache",new At(kt["queryManager.getDocumentInfo"]||2e3)),r(this,"requestIdCounter",1),r(this,"inFlightLinkObservables",new Pt(!1)),r(this,"noCacheWarningsByCause",new WeakSet);const t=new xn(e=>this.cache.transformDocument(e),{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;const n=e.documentTransform;this.documentTransform=n?t.concat(n).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(k(87))}cancelPendingFetches(e){this.fetchCancelFns.forEach(t=>t(e)),this.fetchCancelFns.clear()}async mutate({mutation:e,variables:t,optimisticResponse:r,updateQueries:n,refetchQueries:i=[],awaitRefetchQueries:s=!1,update:o,onQueryUpdated:a,fetchPolicy:c,errorPolicy:u,keepRootFields:l,context:h}){const f=new ys(this);e=this.cache.transformForLink(this.transform(e));const{hasClientExports:d}=this.getDocumentInfo(e);t=this.getVariables(e,t),d&&(t=await this.localState.getExportedVariables({client:this.client,document:e,variables:t,context:h}));const p=this.mutationStore&&(this.mutationStore[f.id]={mutation:e,variables:t,loading:!0,error:null}),y=r&&f.markMutationOptimistic(r,{document:e,variables:t,cacheWriteBehavior:"no-cache"===c?0:2,errorPolicy:u,context:h,updateQueries:n,update:o,keepRootFields:l});return this.broadcastQueries(),new Promise((d,m)=>{const b={};return this.getObservableFromLink(e,{...h,optimisticResponse:y?r:void 0},t,c,{}
1,!1).observable.pipe(vs(),ut(r=>{const d={...r};return nt(f.markMutationResult(d,{document:e,variables:t,cacheWriteBehavior:"no-cache"===c?0:2,errorPolicy:u,context:h,update:o,updateQueries:n,awaitRefetchQueries:s,refetchQueries:i,removeOptimistic:y?f.id:void 0,onQueryUpdated:a,keepRootFields:l}))})).pipe(ct(e=>{if(ur(e)&&"none"===u)throw new Ji(ws(e));return p&&(p.loading=!1,p.error=null),e})).subscribe({next:t=>{if(this.broadcastQueries(),!f.hasNext){const r={data:this.maskOperation({document:e,data:t.data,fetchPolicy:c,cause:b})};ur(t)&&(r.error=new Ji(t)),Object.keys(t.extensions||{}).length&&(r.extensions=t.extensions),d(r)}},error:e=>(p&&(p.loading=!1,p.error=e),y&&this.cache.removeOptimistic(f.id),this.broadcastQueries(),"ignore"===u?d({data:void 0}):"all"===u?d({data:void 0,error:e}):void m(e))})})}fetchQuery(e,t){return Wt(e.query,u.QUERY),(async()=>{return r=this.fetchObservableWithInfo(e,{networkStatus:t}).observable.pipe(_r(e=>{switch(e.kind){case"E":throw e.error;case"N":if("newNetworkStatus"!==e.source)return Or(e.value)}})),i="object"==typeof(n={defaultValue:{data:void 0}}),new Promise(function(e,t){var s,o=!1;r.subscribe({next:function(e){s=e,o=!0},error:t,complete:function(){o?e(s):i?e(n.defaultValue):t(new at)}})});var r,n,i})()}transform(e){return this.documentTransform.transformDocument(e)}getDocumentInfo(e){const{transformCache:t}=this;if(!t.has(e)){const r=er(e),n={hasClientExports:lr(["client","export"],e,!0),hasForcedResolvers:hr(e),hasNonreactiveDirective:lr(["nonreactive"],e),hasIncrementalDirective:lr(["defer"],e),nonReactiveQuery:gs(e),clientQuery:lr(["client"],e)?e:null,serverQuery:vr([{name:"client",remove:!0},{name:"connection"},{name:"nonreactive"},{name:"unmask"}],e),operationType:r?.operation,defaultVars:Gt(r),asQuery:{...e,definitions:e.definitions.map(e=>"OperationDefinition"===e.kind&&"query"!==e.operation?{...e,operation:"query"}:e)}};t.set(e,n)}const r=t.get(e);if(r.violation)throw r.violation;return r}getVariables(e,t){const r=this.getDocumentInfo(e).defaultVars,n=Object.entries(t??{}).map(([e,t])=>[e,void 0===t?r[e]:t]);return{...r,...Object.fromEntries(n)}}watchQuery(e){Wt(e.query,u.QUERY);const t=this.transform(e.query);return void 0===(e={...e,variables:this.getVariables(t,e.variables)}).notifyOnNetworkStatusChange&&(e.notifyOnNetworkStatusChange=!0),new cs({queryManager:this,options:e,transformedQuery:t})}query(e){const t=this.transform(e.query);return this.fetchQuery({...e,query:t}).then(r=>({...r,data:this.maskOperation({document:t,data:r?.data,fetchPolicy:e.fetchPolicy})}))}generateRequestId(){return this.requestIdCounter++}clearStore(e={discardWatches:!0}){return this.cancelPendingFetches(k(89)),this.obsQueries.forEach(e=>{e.reset()}),this.mutationStore&&(this.mutationStore={}),this.cache.reset(e)}getObservableQueries(e="active"){const t=new Set,r=new Map,n=new Map,i=new Set;return Array.isArray(e)&&e.forEach(e=>{if("string"==typeof e)r.set(e,e),n.set(e,!1);else if(Bt(t=e)&&"Document"===t.kind&&Array.isArray(t.definitions)){const t=_n(this.transform(e));r.set(t,St(e)),n.set(t,!1)}else Bt(e)&&e.query&&i.add(e);var t}),this.obsQueries.forEach(r=>{const i=_n(this.transform(r.options.query));if("all"===e)return void t.add(r);const{queryName:s,options:{fetchPolicy:o}}=r;"active"===e&&"standby"===o||("active"===e||s&&n.has(s)||i&&n.has(i))&&(t.add(r),s&&n.set(s,!0),i&&n.set(i,!0))}),i.size&&i.forEach(e=>{const r=new cs({queryManager:this,options:{...e,fetchPolicy:"network-only"}});t.add(r)}),t}refetchObservableQueries(e=!1){const t=[];return this.getObservableQueries(e?"all":"active").forEach(r=>{const{fetchPolicy:n}=r.options;!e&&"standby"===n||"cache-only"===n||t.push(r.refetch())}),this.broadcastQueries(),Promise.all(t)}startGraphQLSubscription(e){let{query:t,variables:r}=e;const{fetchPolicy:n="cache-first",errorPolicy:i="none",context:s={},extensions:o={}}=e;let a;Wt(t,u.SUBSCRIPTION),t=this.transform(t),r=this.getVariables(t,r);const c=(this.getDocumentInfo(t).hasClientExports?nt(this.localState.getExportedVariables({client:this.client,document:t,variables:r,context:s})):it(r)).pipe(ut(e=>{const{observable:r,restart:c}=this.getObservableFromLink(t,s,e,n,o),u=new ys(this);return a=c,r.pipe(ct(r=>{u.markSubscriptionResult(r,{document:t,variables:e,errorPolicy:i,cacheWriteBehavior:"no-cache"===n?0:2});const s={data:r.data??void 0};return ur(r)?s.error=new Ji(r):ts(r)&&(s.error=r.extensions[es],delete r.extensions[es]),r.extensions&&Object.keys(r.extensions).length&&(s.extensions=r.extensions),s.error&&"none"===i&&(s.data=void 0),"ignore"===i&&delete s.error,s}),ft(e=>it("ignore"===i?{data:void 0}:{data:void 0,error:e})),ht(e=>!(!e.data&&!e.error)))}));return Object.assign(c,{restart:()=>a?.()})}broadcastQueries(){this.onBroadcast&&this.onBroadcast(),this.obsQueries.forEac
1h(e=>e.notify())}getObservableFromLink(e,t,r,n,i,s=t?.queryDeduplication??this.queryDeduplication){let o={};const{serverQuery:a,clientQuery:c,operationType:l,hasIncrementalDirective:h}=this.getDocumentInfo(e),f=St(e),d={client:this.client};if(a){const{inFlightLinkObservables:e,link:n}=this;try{let c=function(e){return new de(t=>{function r(){return e.subscribe({next:t.next.bind(t),complete:t.complete.bind(t),error:t.error.bind(t)})}let n=r();return o.restart||(o.restart=()=>{n.unsubscribe(),n=r()}),()=>{n.unsubscribe(),o.restart=void 0}})};const h=this.incrementalHandler.prepareRequest({query:a,variables:r,context:{...this.defaultContext,...t,queryDeduplication:s},extensions:i});if(t=h.context,s){const t=_n(a),i=rr(r);o=e.lookup(t,i),o.observable||(o.observable=kn(n,h,d).pipe(c,(p=()=>{e.peek(t,i)===o&&e.remove(t,i)},ye(function(e,t){try{e.subscribe(t)}finally{t.add(p)}})),l===u.SUBSCRIPTION?pt():mt({refCount:!0})))}else o.observable=kn(n,h,d).pipe(c)}catch(y){o.observable=st(()=>y)}}else o.observable=it({data:{}});var p;if(c){const{operation:i}=er(e);g(!h,94,i[0].toUpperCase()+i.slice(1),f??"(anonymous)"),o.observable=o.observable.pipe(ut(e=>nt(this.localState.execute({client:this.client,document:c,remoteResult:e,context:t,variables:r,fetchPolicy:n}))))}return{restart:()=>o.restart?.(),observable:o.observable.pipe(ft(e=>{throw function(e){Yi.add(e)}(e=rs(e)),e}))}}getResultsFromLink(e,{queryInfo:t,cacheWriteBehavior:r,observableQuery:n,exposeExtensions:i}){const s=t.lastRequestId=this.generateRequestId(),{errorPolicy:o}=e,a=this.cache.transformForLink(e.query);return this.getObservableFromLink(a,e.context,e.variables,e.fetchPolicy).observable.pipe(ct(s=>{const c=t.markQueryResult(s,{...e,document:a,cacheWriteBehavior:r}),u=ur(c);if(u&&"none"===o)throw t.resetLastWrite(),n?.resetNotifications(),new Ji(ws(c));const l={data:c.data,...t.hasNext?{loading:!0,networkStatus:ns.streaming,dataState:"streaming",partial:!0}:{dataState:c.data?"complete":"empty",loading:!1,networkStatus:ns.ready,partial:!c.data}};return i&&"extensions"in c&&(l[Fr]=c.extensions),u&&("none"===o&&(l.data=void 0,l.dataState="empty"),"ignore"!==o&&(l.error=new Ji(ws(c)),"streaming"!==l.dataState&&(l.networkStatus=ns.error))),l}),ft(e=>{if(s>=t.lastRequestId&&"none"===o)throw t.resetLastWrite(),n?.resetNotifications(),e;const r={data:void 0,dataState:"empty",loading:!1,networkStatus:ns.ready,partial:!0};return"ignore"!==o&&(r.error=e,r.networkStatus=ns.error),it(r)}))}fetchObservableWithInfo(e,{networkStatus:t=ns.loading,query:r=e.query,fetchQueryOperator:n=e=>e,onCacheHit:i=()=>{},observableQuery:s,exposeExtensions:o}){const a=this.getVariables(r,e.variables),c=this.defaultOptions.watchQuery;let{fetchPolicy:u=c&&c.fetchPolicy||"cache-first",errorPolicy:l=c&&c.errorPolicy||"none",returnPartialData:h=!1,notifyOnNetworkStatusChange:f=!0,context:d={}}=e;!this.prioritizeCacheValues||"network-only"!==u&&"cache-and-network"!==u||(u="cache-first");const p=Object.assign({},e,{query:r,variables:a,fetchPolicy:u,errorPolicy:l,returnPartialData:h,notifyOnNetworkStatusChange:f,context:d}),y=new ys(this,s),m=r=>{p.variables=r;const a="no-cache"===u?0:t===ns.refetch&&"merge"!==p.refetchWritePolicy?1:2,c=this.fetchQueryByPolicy(p,{queryInfo:y,cacheWriteBehavior:a,onCacheHit:i,observableQuery:s,exposeExtensions:o});return c.observable=c.observable.pipe(n),"standby"!==p.fetchPolicy&&s?.applyNextFetchPolicy("after-fetch",e),c},b=()=>{this.fetchCancelFns.delete(y.id)};this.fetchCancelFns.set(y.id,e=>{v.next({kind:"E",error:e,source:"network"})});const v=new we;let g,w;if(this.getDocumentInfo(p.query).hasClientExports)g=nt(this.localState.getExportedVariables({client:this.client,document:p.query,variables:p.variables,context:p.context})).pipe(ut(e=>m(e).observable)),w=!0;else{const e=m(p.variables);w=e.fromLink,g=e.observable}return{observable:new de(e=>{e.add(b),g.subscribe(e),v.subscribe(e)}).pipe(pt()),fromLink:w}}refetchQueries({updateCache:e,include:t,optimistic:r=!1,removeOptimistic:n=(r?p("refetchQueries"):void 0),onQueryUpdated:i}){const s=new Map;
1t&&this.getObservableQueries(t).forEach(e=>{if("cache-only"===e.options.fetchPolicy||e.variablesUnknown)return;const t=e.getCurrentResult();s.set(e,{oq:e,lastDiff:{result:t?.data,complete:!t?.partial}})});const o=new Map;if(e){const t=new Set;this.cache.batch({update:e,optimistic:r&&n||!1,removeOptimistic:n,onWatchUpdated(e,r,n){const a=e.watcher;if(a instanceof cs&&!t.has(a)){if(t.add(a),i){s.delete(a);let e=i(a,r,n);return!0===e&&(e=a.refetch().retain()),!1!==e&&o.set(a,e),e}null!==i&&"cache-only"!==a.options.fetchPolicy&&s.set(a,{oq:a,lastDiff:n,diff:r})}}})}return s.size&&s.forEach(({oq:e,lastDiff:t,diff:r})=>{let n;i&&(r||(r=e.getCacheDiff()),n=i(e,r,t)),i&&!0!==n||(n=e.refetch().retain()),!1!==n&&o.set(e,n)}),n&&this.cache.removeOptimistic(n),o}maskOperation(e){const{document:t,data:r}=e;return this.dataMasking?function(e,t,r){const n=er(t);return g(n,43),null==e?e:si(e,n.selectionSet,{operationType:n.operation,operationName:n.name?.value,fragmentMap:Lt(Zt(t)),cache:r,mutableTargets:new WeakMap,knownChanged:new WeakSet})}(r,t,this.cache):r}maskFragment(e){const{data:t,fragment:r,fragmentName:n}=e;return this.dataMasking?function(e,t,r,n){const i=t.definitions.filter(e=>e.kind===s.FRAGMENT_DEFINITION);void 0===n&&(g(1===i.length,41,i.length),n=i[0].name.value);const o=i.find(e=>e.name.value===n);return g(!!o,42,n),null==e||j(e,{})?e:si(e,o.selectionSet,{operationName:o.name.value,fragmentMap:Lt(Zt(t)),cache:r,mutableTargets:new WeakMap,knownChanged:new WeakSet})}(t,r,this.cache,n):t}fetchQueryByPolicy({query:e,variables:t,fetchPolicy:r,errorPolicy:n,returnPartialData:i,context:s},{cacheWriteBehavior:o,onCacheHit:a,queryInfo:c,observableQuery:u,exposeExtensions:l}){const h=()=>this.cache.diff({query:e,variables:t,returnPartialData:!0,optimistic:!0}),f=(o,c)=>{const u=o.result,l=e=>(o.complete||i||(e=void 0),{data:e,dataState:o.complete?"complete":e?"partial":"empty",loading:Fn(c),networkStatus:c,partial:!o.complete}),h=e=>it({kind:"N",value:l(e),source:"cache"});return(o.complete||i)&&this.getDocumentInfo(e).hasForcedResolvers?(a(),nt(this.localState.execute({client:this.client,document:e,remoteResult:u?{data:u}:void 0,context:s,variables:t,onlyRunForcedResolvers:!0,returnPartialData:!0,fetchPolicy:r}).then(e=>({kind:"N",value:l(e.data||void 0),source:"cache"})))):"none"===n&&c===ns.refetch&&o.missing?h(void 0):h(u||void 0)},d=()=>this.getResultsFromLink({query:e,variables:t,context:s,fetchPolicy:r,errorPolicy:n},{cacheWriteBehavior:o,queryInfo:c,observableQuery:u,exposeExtensions:l}).pipe(vs(),ye(function(e,t){e.subscribe(me(t,function(e){t.next(ot.createNext(e))},function(){t.next(ot.createComplete()),t.complete()},function(e){t.next(ot.createError(e)),t.complete()}))}),ct(e=>({...e,source:"network"})));switch(r){default:case"cache-first":{const e=h();return e.complete?{fromLink:!1,observable:f(e,ns.ready)}:i?{fromLink:!0,observable:lt(f(e,ns.loading),d())}:{fromLink:!0,observable:d()}}case"cache-and-network":{const e=h();return e.complete||i?{fromLink:!0,observable:lt(f(e,ns.loading),d())}:{fromLink:!0,observable:d()}}case"cache-only":return{fromLink:!1,observable:lt(f(h(),ns.ready))};case"network-only":case"no-cache":return{fromLink:!0,observable:d()};case"standby":return{fromLink:!1,observable:Ae}}}}function vs(){let e=!1;return bt({next(){e=!0},complete(){g(e,98)}})}function gs(e){return o(e,{FragmentSpread:e=>{if(!e.directives?.some(e=>"unmask"===e.name.value))return{...e,directives:[...e.directives||[],{kind:s.DIRECTIVE,name:{kind:s.NAME,value:"nonreactive"}}
1]}}})}function ws(e){if(null==e.extensions?.[qr])return e;const{extensions:{[qr]:t,...r},...n}=e;return Object.keys(r).length>0&&(n.extensions=r),n}class ks{constructor(e){r(this,"link"),r(this,"cache"),r(this,"disableNetworkFetches"),r(this,"version"),r(this,"queryDeduplication"),r(this,"defaultOptions"),r(this,"devtoolsConfig"),r(this,"queryManager"),r(this,"devToolsHookCb"),r(this,"resetStoreCallbacks",[]),r(this,"clearStoreCallbacks",[]),r(this,"reFetchObservableQueries"),r(this,"maskedFragmentTransform",new xn(kr));const{cache:t,documentTransform:n,ssrMode:i=!1,ssrForceFetchDelay:s=0,queryDeduplication:o=!0,defaultOptions:a,defaultContext:c,assumeImmutableResults:u=t.assumeImmutableResults,localState:l,devtools:h,dataMasking:d,link:p,incrementalHandler:y=new vn,experiments:m=[]}=e;this.link=p,this.cache=t,this.queryDeduplication=o,this.defaultOptions=a||{},this.devtoolsConfig={...h,enabled:h?.enabled??false},this.watchQuery=this.watchQuery.bind(this),this.query=this.query.bind(this),this.mutate=this.mutate.bind(this),this.watchFragment=this.watchFragment.bind(this),this.resetStore=this.resetStore.bind(this),this.reFetchObservableQueries=this.refetchObservableQueries=this.refetchObservableQueries.bind(this),this.version=f,this.queryManager=new bs({client:this,defaultOptions:this.defaultOptions,defaultContext:c,documentTransform:n,queryDeduplication:o,ssrMode:i,dataMasking:!!d,clientOptions:e,incrementalHandler:y,assumeImmutableResults:u,onBroadcast:this.devtoolsConfig.enabled?()=>{this.devToolsHookCb&&this.devToolsHookCb()}:void 0,localState:l}),this.prioritizeCacheValues=i||s>0,s&&setTimeout(()=>{this.prioritizeCacheValues=!1},s),this.devtoolsConfig.enabled&&this.connectToDevTools(),m.forEach(t=>t.call(this,e))}set prioritizeCacheValues(e){this.queryManager.prioritizeCacheValues=e}get prioritizeCacheValues(){return this.queryManager.prioritizeCacheValues}connectToDevTools(){if("undefined"==typeof window)return;const e=window,t=Symbol.for("apollo.devtools");(e[t]=e[t]||[]).push(this),e.__APOLLO_CLIENT__=this}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=mr(this.defaultOptions.watchQuery,e)),this.queryManager.watchQuery(e)}query(e){return this.defaultOptions.query&&(e=mr(this.defaultOptions.query,e)),this.queryManager.query(e)}mutate(e){const t=mr(Vt({fetchPolicy:"network-only",errorPolicy:"none"},this.defaultOptions.mutate),e);return Wt(t.mutation,u.MUTATION),this.queryManager.mutate(t)}subscribe(e){const t={},r=this.queryManager.startGraphQLSubscription(e),n=r.pipe(ct(r=>({...r,data:this.queryManager.maskOperation({document:e.query,data:r.data,fetchPolicy:e.fetchPolicy,cause:t})})));return Object.assign(n,{restart:r.restart})}readQuery(e,t=!1){return this.cache.readQuery({...e,query:this.transform(e.query)},t)}watchFragment(e){const t=this.queryManager.dataMasking;return this.cache.watchFragment({...e,fragment:this.transform(e.fragment,t)})}readFragment(e,t=!1){return this.cache.readFragment({...e,fragment:this.transform(e.fragment)},t)}writeQuery(e){const t=this.cache.writeQuery(e);return!1!==e.broadcast&&this.queryManager.broadcastQueries(),t}writeFragment(e){const t=this.cache.writeFragment(e);return!1!==e.broadcast&&this.queryManager.broadcastQueries(),t}__actionHookForDevTools(e){this.devToolsHookCb=e}__requestRaw(e){return kn(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(e){return this.queryManager.refetchObservableQueries(e)}refetchQueries(e){const t=this.queryManager.refetchQueries(e),r=[],n=[];t.forEach((e,t)=>{r.push(t),n.push(e)});const i=Promise.all(n);return i.queries=r,i.results=n,i.catch(e=>{}),i}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}transform(e,t=!1){const r=this.queryManager.transform(e);return t?this.maskedFragmentTransform.transformDocument(r):r}}const{hasOwnProperty:Ss}=Object.prototype;function xs(e){return Bt(e)&&"payload"in e}function Os(e){const t={};
1return e.split("\n").forEach(e=>{const r=e.indexOf(":");if(r>-1){const n=e.slice(0,r).trim().toLowerCase(),i=e.slice(r+1).trim();t[n]=i}}),t}function _s(e,t){if(e.status>=300)throw new Zi(`Response not successful: Received status code ${e.status}`,{response:e,bodyText:t});try{return JSON.parse(t)}catch(r){throw new Xi(r,{response:e,bodyText:t})}}const Es={http:{includeQuery:!0,includeExtensions:!0,preserveHeaderCase:!1},headers:{accept:"application/graphql-response+json,application/json;q=0.9","content-type":"application/json"},options:{method:"POST"}},Ps=(e,t)=>t(e);const Cs=l(()=>fetch);function Rs(){}class Is extends gn{constructor(e={}){let{uri:t="/graphql",fetch:r,print:n=Ps,includeExtensions:i,preserveHeaderCase:s,useGETForQueries:a,includeUnusedVariables:c=!1,...u}=e;const h={http:Vt({includeExtensions:i,preserveHeaderCase:s}),options:u.fetchOptions,credentials:u.credentials,headers:u.headers};super(e=>{let i=((e,t)=>e.getContext().uri||("function"==typeof t?t(e):t||"/graphql"))(e,t);const s=e.getContext(),u={...s.http};Rn(e.query,"subscription")&&(u.accept=["multipart/mixed;boundary=graphql;subscriptionSpec=1.0",...u.accept||[]]);const f={http:u,options:s.fetchOptions,credentials:s.credentials,headers:s.headers},{options:d,body:p}=function(e,t,...r){let n={},i={};r.forEach(e=>{n={...n,...e.options,headers:{...n.headers,...e.headers}},e.credentials&&(n.credentials=e.credentials),n.headers.accept=(e.http?.accept||[]).concat(n.headers.accept).join(","),i={...i,...e.http}}),n.headers=function(e,t){if(!t){const t={};
1return Object.keys(Object(e)).forEach(r=>{t[r.toLowerCase()]=e[r]}),t}const r={};Object.keys(Object(e)).forEach(t=>{r[t.toLowerCase()]={originalName:t,value:e[t]}});const n={};return Object.keys(r).forEach(e=>{n[r[e].originalName]=r[e].value}),n}(n.headers,i.preserveHeaderCase);const{operationName:s,extensions:o,variables:a,query:c}=e,u={operationName:s,variables:a};return i.includeExtensions&&Object.keys(o||{}).length&&(u.extensions=o),i.includeQuery&&(u.query=t(c,_n)),{options:n,body:u}}(e,n,Es,h,f);p.variables&&!c&&(p.variables=function(e,t){const r={...e},n=new Set(Object.keys(e));return o(t,{Variable(e,t,r){r&&"VariableDefinition"!==r.kind&&n.delete(e.name.value)}}),n.forEach(e=>{delete r[e]}),r}(p.variables,e.query));let y=new AbortController,m=()=>{y=void 0};if(d.signal){const e=d.signal,t=()=>{y?.abort(e.reason)};e.addEventListener("abort",t,{once:!0}),m=()=>{y?.signal.removeEventListener("abort",m),y=void 0,e.removeEventListener("abort",t),m=Rs},y.signal.addEventListener("abort",m,{once:!0})}return d.signal=y.signal,a&&!Rn(e.query,"mutation")&&(d.method="GET"),new de(t=>{if("GET"===d.method){const{newURI:e,parseError:t}=function(e,r){const n=[],i=(e,t)=>{n.push(`${e}=${encodeURIComponent(t)}`)};if("query"in r&&i("query",r.query),r.operationName&&i("operationName",r.operationName),r.variables){let e;try{e=JSON.stringify(r.variables)}catch(t){return{parseError:t}}i("variables",e)}if(r.extensions){let e;try{e=JSON.stringify(r.extensions)}catch(t){return{parseError:t}}i("extensions",e)}let s="",o=e;const a=e.indexOf("#");-1!==a&&(s=e.substr(a),o=e.substr(0,a));const c=-1===o.indexOf("?")?"?":"&";return{newURI:o+c+n.join("&")+s}}(i,p);if(t)throw t;i=e}else d.body=JSON.stringify(p);const n=r||l(()=>fetch)||Cs,s=t.next.bind(t);return n(i,d).then(t=>{e.setContext({response:t});const r=t.headers?.get("content-type");return null!==r&&/^multipart\/mixed/i.test(r)?async function(e,t){for await(const r of async function*(e){const t=new TextDecoder("utf-8"),r=e.headers?.get("content-type"),n=r?.match(/;\s*boundary=(?:'([^']+)'|"([^"]+)"|([^"'].+?))\s*(?:;|$)/i),i="\r\n--"+(n?n[1]??n[2]??n[3]??"-":"-");let s="";g(e.body&&"function"==typeof e.body.getReader,62);const o=e.body.getReader();let a,c=!1,u=!1;const l=()=>u&&"-"==s[0]&&"-"==s[1];try{for(;!c;){({value:a,done:c}=await o.read());const e="string"==typeof a?a:t.decode(a),r=s.length-i.length+1;s+=e;let n=s.indexOf(i,r);for(;n>-1&&!l();){let e;u=!0,[e,s]=[s.slice(0,n),s.slice(n+i.length)];const t=e.indexOf("\r\n\r\n"),r=Os(e.slice(0,t))["content-type"];if(r&&-1===r.toLowerCase().indexOf("application/json"))throw new Error("Unsupported patch content type: application/json is required.");const o=e.slice(t);o&&(yield o),n=s.indexOf(i)}if(l())return}throw new Error("premature end of multipart body")}finally{o.cancel()}}(e)){const n=_s(e,r);if(0!=Object.keys(n).length)if(xs(n)){if(1===Object.keys(n).length&&null===n.payload)return;let e={...n.payload};"errors"in n&&(e.extensions={...e.extensions,[es]:new $i(n.errors??[])}),t(e)}else t(n)}}(t,s):(n=e,e=>e.text().then(t=>{const r=function(e,t){const r=e.headers.get("content-type");return r?.includes("application/graphql-response+json")?function(e,t){try{return JSON.parse(t)}catch(r){throw new Xi(r,{response:e,bodyText:t})}}
1(e,t):_s(e,t)}(e,t);if(!Array.isArray(r)&&!Ss.call(r,"data")&&!Ss.call(r,"errors"))throw new Zi(`Server response was malformed for query '${Array.isArray(n)?n.map(e=>e.operationName):n.operationName}'.`,{response:e,bodyText:t});return r}))(t).then(s);var n}).then(()=>{m(),t.complete()}).catch(e=>{m(),t.error(e)}),()=>{y&&y.abort()}})})}}class Fs extends gn{constructor(e={}){super((t,r)=>{const n=t.client,i=n.queryManager.clientOptions,s=t.getContext();{const{name:r,version:n,transport:o="headers"}=Vt({},i.clientAwareness,e.clientAwareness,s.clientAwareness);"headers"===o&&t.setContext(({headers:e})=>({headers:Vt({"apollographql-client-name":r,"apollographql-client-version":n},e)}))}{const{transport:r="extensions"}=Vt({},i.enhancedClientAwareness,e.enhancedClientAwareness);"extensions"===r&&(t.extensions=Vt({clientLibrary:{name:"@apollo/client",version:n.version}},t.extensions)),"headers"===r&&t.setContext(({headers:e})=>({headers:Vt({"apollographql-library-name":"@apollo/client","apollographql-library-version":n.version},e)}))}return r(t)})}}class qs extends gn{constructor(e={}){const{left:t,right:r,request:n}=gn.from([new Fs(e),new Is(e)]);super(n),Object.assign(this,{left:t,right:r})}}function Ts(e,t){const r=i.useRef(void 0);return r.current&&j(r.current.deps,t)||(r.current={value:e(),deps:t}),r.current.value}let js;function Ms(){}const Ns=Symbol.for("apollo.skipToken"),Ds=Symbol.for("apollo.hook.wrappers"),As=wt?i.useLayoutEffect:i.useEffect,Qs=n.useSyncExternalStore,zs="ReactNative"==l(()=>navigator.product),Ws=l(()=>navigator.userAgent.indexOf("jsdom")>=0)||!1,Vs=(wt||zs)&&!Ws,Ls=Qs||((e,t,r)=>{const n=t(),[{inst:s},o]=i.useState({inst:{value:n,getSnapshot:t}});return Vs?i.useLayoutEffect(()=>{Object.assign(s,{value:n,getSnapshot:t}),Bs(s)&&o({inst:s})},[e,n,t]):Object.assign(s,{value:n,getSnapshot:t}),i.useEffect(()=>(Bs(s)&&o({inst:s}),e(function(){Bs(s)&&o({inst:s})})),[e]),n});function Bs({value:e,getSnapshot:t}){try{return e!==t()}catch{return!0}}const Us=["refetch","fetchMore","updateQuery","startPolling","stopPolling","subscribeToMore"];function $s(e,t){const r=R(t?.client),n=i.useRef(void 0),s=i.useRef(void 0),o=Ts(()=>t,[t]),a=(js||(js=i.createContext(null)),i.useCallback(()=>{const e=console.error;try{return console.error=Ms,i.useContext(js),!0}catch(t){return!1}finally{console.error=e}},[]));function c(){return r.watchQuery({...t,query:e,initialFetchPolicy:t?.fetchPolicy,fetchPolicy:"standby",[Tr]:!0})}const[u,l]=i.useState(r),[h,f]=i.useState(c);u!==r&&(l(r),f(c()));const d=i.useCallback((e,t)=>{const r=s.current?.data;r&&!j(r,e.data)&&(n.current=r),s.current=e,t()},[]),p=Ls(i.useCallback(e=>{const t=h.subscribe(t=>{j(s.current,t)||d(t,e)});return()=>{t.unsubscribe()}},[h,d]),()=>s.current||Ks,()=>Ks),y=i.useMemo(()=>{const e={};for(const t of Us)e[t]=function(...e){return g(s.current,29,t),h[t](...e)};return e},[h]);i.useEffect(()=>{const r={query:e,errorPolicy:o?.errorPolicy,refetchWritePolicy:o?.refetchWritePolicy,returnPartialData:o?.returnPartialData,notifyOnNetworkStatusChange:o?.notifyOnNetworkStatusChange,nextFetchPolicy:t?.nextFetchPolicy,skipPollAttempt:t?.skipPollAttempt};"standby"!==h.options.fetchPolicy&&o?.fetchPolicy&&(r.fetchPolicy=o.fetchPolicy),h.applyOptions(r)},[e,h,o,t?.nextFetchPolicy,t?.skipPollAttempt]);const m=i.useCallback((...e)=>{g(!a(),30);const[t]=e;let r=h.options.fetchPolicy;return"standby"===r&&(r=h.options.initialFetchPolicy),h.reobserve({fetchPolicy:r,variables:t?.variables,context:t?.context??{}})},[h,a]),b=i.useRef(m);return As(()=>{b.current=m}),[i.useCallback((...e)=>b.current(...e),[]),i.useMemo(()=>{const{partial:e,...t}=p;return{...y,...t,client:r,previousData:n.current,variables:h.variables,observable:h,called:!!s.current}},[r,p,y,h])]}const Ks={data:void 0,dataState:"empty",loading:!1,networkStatus:ns.ready,partial:!0};function Hs(e,t){const r=R(t?.client),[n,s]=i.useState(()=>Gs(r)),o=i.useRef({result:n,mutationId:0,isMounted:!0,client:r,mutation:e,options:t});As(()=>{Object.assign(o.current,{client:r,options:t,mutation:e})});const a=i.useCallback((e={})=>{const{options:t,mutation:r}=o.current,n={...t,mutation:r},i=e.client||o.current.client,a="function"==typeof e.context?e.context(t?.context):e.context;!o.current.result.loading&&o.current.isMounted&&s(o.current.result={loading:!0,error:void 0,data:void 0,called:!0,client:i});const c=++o.current.mutationId,u=mr(n,{...e,context:a});return br(i.mutate(u).then(t=>{const{data:r,error:n}=t,a=e.onError||o.current.options?.onError;if(n&&a&&a(n,u),c===o.current.mutationId){const e={called:!0,loading:!1,data:r,error:n,client:i};o.current.isMounted&&!j(o.current.result,e)&&s(o.current.result=e)}const l=e.onCompleted||o.current.options?.onCompleted;return n||l?.(t.data,u),t},t=>{if(c===o.current.mutationId&&o.current.isMounted){const e={loading:!1,error:t,data:void 0,called:!0,client:i};j(o.current.result,e)||s(o.current.result=e)}const r=e.onError||o.current.options?.onError;throw r&&r(t,u),t}))},[]),c=i.useCallback(()=>
1{if(o.current.isMounted){const e=Gs(o.current.client);Object.assign(o.current,{mutationId:0,result:e}),s(e)}},[]);return i.useEffect(()=>{const e=o.current;return e.isMounted=!0,()=>{e.isMounted=!1}},[]),[a,{reset:c,...n}]}function Gs(e){return{data:void 0,error:void 0,called:!1,loading:!1,client:e}}const Js=Symbol();function Ys(e,...[t]){return function(e,t,r){const n=[r.queryManager,e.startsWith("use")?i.useContext(P()):void 0];let s=t;for(const i of n){const t=i?.[Ds]?.[e];t&&(s=t(s))}return s}("useQuery",Zs,R("object"==typeof t?t.client:void 0))(e,t)}function Zs(e,t={}){const r=R("object"==typeof t?t.client:void 0),{ssr:n}="object"==typeof t?t:{},s=function(e,t,r){return Ts(()=>{if(t===Ns){const t={...mr(r,{query:e,fetchPolicy:"standby"}),[Tr]:!0};return t[Xs]=!0,t}const n=mr(r,{...t,query:e});return t.skip&&(n.initialFetchPolicy=t.initialFetchPolicy||t.fetchPolicy,n.fetchPolicy="standby"),n},[e,t,r])}(e,t,r.defaultOptions.watchQuery);function o(t){const n=r.watchQuery(s);return{client:r,query:e,observable:n,resultData:{current:n.getCurrentResult(),previousData:t?.resultData.current.data,variables:n.variables}}}let[a,c]=i.useState(o);r===a.client&&e===a.query||c(a=o(a));const{observable:u,resultData:l}=a;!function(e,t){e.fetchPolicy||(e.fetchPolicy=t.options.initialFetchPolicy)}(s,u),function(e,t,r){if(t[Js]&&!j(t[Js],r)){t[Js][Xs]&&!r.initialFetchPolicy&&(r.initialFetchPolicy=r.fetchPolicy),function(e,t){return e.query!==t.query||!j(e.variables,t.variables)||e.fetchPolicy!==t.fetchPolicy&&("standby"===t.fetchPolicy||"standby"===e.fetchPolicy)}(t[Js],r)?t.reobserve(r):t.applyOptions(r);const n=t.getCurrentResult();j(n.data,e.current.data)||(e.previousData=e.current.data||e.previousData),e.current=n,e.variables=t.variables}t[Js]=r}(l,u,s);const h=function(e,t,r){return Ls(i.useCallback(r=>{const n=e.pipe(et(Ne)).subscribe(n=>{const i=t.current;j(i,n)&&j(t.variables,e.variables)||(t.variables=e.variables,i.data&&!j(i.data,n.data)&&(t.previousData=i.data),t.current=n,r())});return()=>{setTimeout(()=>n.unsubscribe())}},[e,t]),()=>t.current,()=>!1===r?Ys.ssrDisabledResult:t.current)}(u,l,n),f=i.useMemo(()=>({refetch:u.refetch.bind(u),fetchMore:u.fetchMore.bind(u),updateQuery:u.updateQuery.bind(u),startPolling:u.startPolling.bind(u),stopPolling:u.stopPolling.bind(u),subscribeToMore:u.subscribeToMore.bind(u)}),[u]),d=l.previousData;return i.useMemo(()=>{const{partial:e,...t}=h;return{...t,client:r,observable:u,variables:u.variables,previousData:d,...f}},[h,r,u,d,f])}const Xs=Symbol();function eo(e,...[t={}]){const r=R(t.client),{skip:n,fetchPolicy:s,errorPolicy:o,shouldResubscribe:a,context:c,extensions:u,ignoreResults:l}=t,h=Ts(()=>t.variables,[t.variables]),f=()=>function(e,t,r,n,i,s,o){const a={query:t,variables:r,fetchPolicy:n,errorPolicy:i,context:s,extensions:o},c={...a,client:e,completed:!1,result:{loading:!0,data:void 0,error:void 0},setResult(e){c.result=e}};return Object.assign(e.subscribe(a),{__:c})}(r,e,h,s,o,c,u);let[d,p]=i.useState(t.skip?null:f);const y=i.useRef(f);As(()=>{y.current=f}),n?d&&p(d=null):d&&(r===d.__.client&&e===d.__.query&&s===d.__.fetchPolicy&&o===d.__.errorPolicy&&j(h,d.__.variables)||!1===("function"==typeof a?!!a(t):a))||p(d=f());const m=i.useRef(t);i.useEffect(()=>{m.current=t});const b=!n&&!l,v=i.useMemo(()=>({loading:b,error:void 0,data:void 0}),[b]),w=i.useRef(l);As(()=>{w.current=l});const k=Ls(i.useCallback(e=>{if(!d)return()=>{};let t=!1;const r=d.__.client,n=d.subscribe({next(n){if(t)return;const i={loading:!1,data:n.data,error:n.error};d.__.setResult(i),w.current||e(),i.error?m.current.onError?.(i.error):m.current.onData&&m.current.onData({client:r,data:i})},complete(){d.__.completed=!0,!t&&m.current.onComplete&&m.current.onComplete()}});return()=>{t=!0,setTimeout(()=>n.unsubscribe())}},[d]),()=>!d||n||l?v:d.__.result,()=>v),S=i.useCallback(()=>{g(!m.current.skip,33),d?.__.completed?p(y.current()):d?.restart()},[d,p,m,y]);return i.useMemo(()=>({...k,restart:S}),[k,S])}Ys.ssrDisabledResult={loading:!0,data:void 0,dataState:"empty",error:void 0,networkStatus:ns.loading,partial:!0};class to{constructor(e,t,n,i,s){r(this,"observer"),r(this,"operation"),r(this,"forward"),r(this,"delayFor"),r(this,"retryIf"),r(this,"retryCount",0),r(this,"currentSubscription",null),r(this,"timerId"),r(this,"onError",async(e,t)=>{this.retryCount+=1;const r=rs(e);await this.retryIf(this.retryCount,this.operation,r)?this.scheduleRetry(this.delayFor(this.retryCount,this.operation,r)):t()}),this.observer=e,this.operation=t,this.forward=n,this.delayFor=i,this.retryIf=s,this.try()}cancel(){this.currentSubscription&&this.currentSubscription.unsubscribe(),clearTimeout(this.timerId),this.timerId=void 0,this.currentSubscription=null}try(){this.currentSubscription=this.forward(this.operation).subscribe({next:e=>{if(ts(e))return this.onError(e.extensions[es],()=>this.observer.next(e)),void this.currentSubscription?.unsubscribe();this.observer.next(e)},error:e=>this.onError(e,()=>this.observer.error(e)),complete:this.observer.complete.bind(this.observer)})}scheduleRetry(e){if(this.timerId)throw new Error("RetryLink BUG! Encountered overlapping retries");this.timerId=setTimeout(()=>{this.timerId=void 0,this.try()},e)}}class ro extends gn{constructor(e){super(),r(this,"delayFor"),r(this,"retryIf");const{attempts:t,delay:n}=e||{};this.delayFor="function"==typeof n?n:function(e){const{initial:t=300,jitter:r=!0,max:n=1/0}=e||{},i=r?t:t/2;return function(e){let t=Math.min(n,i*2**e);return r&&(t=Math.random()*t),t}}(n),this.retryIf="function"==typeof t?t:function(e){const{retryIf:t,max:r=5}=e||{};return function(e,n,i){return!(e>=r)&&(t?t(i,n):!!i)}}(t)}request(e,t){return new de(r=>{const n=new to(r,e,t,this.delayFor,this.retryIf);return()=>{n.cancel()}})}}class no extends gn{constructor(e){super(),r(this,"client"),this.client=e}request(e){return new de(t=>{const{query:r,variables:n,operationName:i,extensions:s}=e;return this.client.subscribe({variables:n,operationName:i,extensions:s,query:_n(r)}
1,{next:t.next.bind(t),complete:t.complete.bind(t),error:e=>{if(e instanceof Error)return t.error(e);const r=Bt(n=e)&&"code"in n&&"reason"in n;var n;return r||function(e){return Bt(e)&&e.target?.readyState===WebSocket.CLOSED}(e)?t.error(new Error(`Socket closed${r?` with event ${e.code}`:""}${r?` ${e.reason}`:""}`)):t.error(new Ji({errors:Array.isArray(e)?e:[e]}))}})})}}export{gn as A,Ji as C,no as G,qs as H,Wi as I,de as O,ro as R,V as _,L as a,K as b,Hs as c,R as d,$s as e,eo as f,Xt as g,ks as h,C as i,wn as s,Ys as u};
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.