react-relay 16.0.0 → 16.1.0
Sign up to get free protection for your applications and to get access to all the features.
- package/ReactRelayContext.js +1 -1
- package/hooks.js +1 -1
- package/index.js +1 -1
- package/legacy.js +1 -1
- package/lib/relay-hooks/HooksImplementation.js +1 -1
- package/lib/relay-hooks/{react-cache/readFragmentInternal_REACT_CACHE.js → experimental/readFragmentInternal_EXPERIMENTAL.js} +2 -2
- package/lib/relay-hooks/{react-cache/useFragmentInternal_REACT_CACHE.js → experimental/useFragmentInternal_EXPERIMENTAL.js} +2 -2
- package/lib/relay-hooks/{react-cache/useFragment_REACT_CACHE.js → experimental/useFragment_EXPERIMENTAL.js} +1 -1
- package/lib/relay-hooks/{react-cache/usePaginationFragment_REACT_CACHE.js → experimental/usePaginationFragment_EXPERIMENTAL.js} +1 -1
- package/lib/relay-hooks/{react-cache/useRefetchableFragmentInternal_REACT_CACHE.js → experimental/useRefetchableFragmentInternal_EXPERIMENTAL.js} +2 -2
- package/lib/relay-hooks/{react-cache/useRefetchableFragment_REACT_CACHE.js → experimental/useRefetchableFragment_EXPERIMENTAL.js} +1 -1
- package/lib/relay-hooks/useLazyLoadQueryNode.js +12 -2
- package/package.json +2 -2
- package/react-relay-hooks.js +2 -2
- package/react-relay-hooks.min.js +2 -2
- package/react-relay-legacy.js +2 -2
- package/react-relay-legacy.min.js +2 -2
- package/react-relay.js +2 -2
- package/react-relay.min.js +2 -2
- package/relay-hooks/EntryPointTypes.flow.js.flow +17 -19
- package/relay-hooks/HooksImplementation.js.flow +3 -1
- package/relay-hooks/{react-cache/readFragmentInternal_REACT_CACHE.js.flow → experimental/readFragmentInternal_EXPERIMENTAL.js.flow} +2 -2
- package/relay-hooks/{react-cache/useFragmentInternal_REACT_CACHE.js.flow → experimental/useFragmentInternal_EXPERIMENTAL.js.flow} +4 -4
- package/relay-hooks/{react-cache/useFragment_REACT_CACHE.js.flow → experimental/useFragment_EXPERIMENTAL.js.flow} +1 -1
- package/relay-hooks/{react-cache/usePaginationFragment_REACT_CACHE.js.flow → experimental/usePaginationFragment_EXPERIMENTAL.js.flow} +2 -2
- package/relay-hooks/{react-cache/useRefetchableFragmentInternal_REACT_CACHE.js.flow → experimental/useRefetchableFragmentInternal_EXPERIMENTAL.js.flow} +11 -11
- package/relay-hooks/{react-cache/useRefetchableFragment_REACT_CACHE.js.flow → experimental/useRefetchableFragment_EXPERIMENTAL.js.flow} +1 -1
- package/relay-hooks/useBlockingPaginationFragment.js.flow +9 -14
- package/relay-hooks/useLazyLoadQueryNode.js.flow +17 -1
- package/relay-hooks/usePaginationFragment.js.flow +5 -7
- package/relay-hooks/useRefetchableFragment.js.flow +13 -16
- package/relay-hooks/useRefetchableFragmentNode.js.flow +5 -7
- package/lib/relay-hooks/react-cache/RelayReactCache.js +0 -20
- package/lib/relay-hooks/react-cache/getQueryResultOrFetchQuery_REACT_CACHE.js +0 -255
- package/lib/relay-hooks/react-cache/useLazyLoadQuery_REACT_CACHE.js +0 -33
- package/lib/relay-hooks/react-cache/usePreloadedQuery_REACT_CACHE.js +0 -81
- package/relay-hooks/react-cache/RelayReactCache.js.flow +0 -40
- package/relay-hooks/react-cache/getQueryResultOrFetchQuery_REACT_CACHE.js.flow +0 -430
- package/relay-hooks/react-cache/useLazyLoadQuery_REACT_CACHE.js.flow +0 -70
- package/relay-hooks/react-cache/usePreloadedQuery_REACT_CACHE.js.flow +0 -150
package/react-relay-hooks.min.js
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
/**
|
2
|
-
* Relay v16.
|
2
|
+
* Relay v16.1.0
|
3
3
|
*
|
4
4
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
5
5
|
*
|
6
6
|
* This source code is licensed under the MIT license found in the
|
7
7
|
* LICENSE file in the root directory of this source tree.
|
8
8
|
*/
|
9
|
-
!function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r(require("react"),require("relay-runtime"),require("invariant"),require("@babel/runtime/helpers/interopRequireDefault"),require("fbjs/lib/warning"),require("@babel/runtime/helpers/objectSpread2"),require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/createForOfIteratorHelper"),require("@babel/runtime/helpers/toConsumableArray"),require("fbjs/lib/areEqual")):"function"==typeof define&&define.amd?define(["react","relay-runtime","invariant","@babel/runtime/helpers/interopRequireDefault","fbjs/lib/warning","@babel/runtime/helpers/objectSpread2","@babel/runtime/helpers/defineProperty","@babel/runtime/helpers/createForOfIteratorHelper","@babel/runtime/helpers/toConsumableArray","fbjs/lib/areEqual"],r):"object"==typeof exports?exports.ReactRelayHooks=r(require("react"),require("relay-runtime"),require("invariant"),require("@babel/runtime/helpers/interopRequireDefault"),require("fbjs/lib/warning"),require("@babel/runtime/helpers/objectSpread2"),require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/createForOfIteratorHelper"),require("@babel/runtime/helpers/toConsumableArray"),require("fbjs/lib/areEqual")):e.ReactRelayHooks=r(e.react,e["relay-runtime"],e.invariant,e["@babel/runtime/helpers/interopRequireDefault"],e["fbjs/lib/warning"],e["@babel/runtime/helpers/objectSpread2"],e["@babel/runtime/helpers/defineProperty"],e["@babel/runtime/helpers/createForOfIteratorHelper"],e["@babel/runtime/helpers/toConsumableArray"],e["fbjs/lib/areEqual"])}(window,(function(e,r,t,n,i,a,o,u,s,c){return function(e){var r={};function t(n){if(r[n])return r[n].exports;var i=r[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,t),i.l=!0,i.exports}return t.m=e,t.c=r,t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:n})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,r){if(1&r&&(e=t(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(t.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var i in e)t.d(n,i,function(r){return e[r]}.bind(null,i));return n},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},t.p="",t(t.s=27)}([function(r,t){r.exports=e},function(e,t){e.exports=r},function(e,r,t){"use strict";var n=t(16),i=t(3),a=t(0).useContext;e.exports=function(){var e=a(n);return null==e&&i(!1),e.environment}},function(e,r){e.exports=t},function(e,r){e.exports=n},function(e,r){e.exports=i},function(e,r,t){"use strict";var n=(0,t(4).default)(t(7)),i=t(3),a=t(0),o=t(1),u=o.__internal.fetchQueryDeduped,s=o.Observable,c=o.PreloadableQueryRegistry,l=o.RelayFeatureFlags,f=o.ReplaySubject,d=o.createOperationDescriptor,v=o.getRequest,p=o.getRequestIdentifier,h=(t(5),null),m=100001;e.exports={loadQuery:function(e,r,t,o,h){var y,g,_;null===(y=a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)||void 0===y||null===(g=y.ReactCurrentDispatcher)||void 0===g||g.current,m++;var b,E,R,P,C,S,k=null!==(_=null==o?void 0:o.fetchPolicy)&&void 0!==_?_:"store-or-network",D=(0,n.default)((0,n.default)({},null==o?void 0:o.networkCacheConfig),{},{force:!0}),A=!1,F=function(r,t){return A=!0,e.executeWithSource({operation:r,source:t})},N=new f,I=s.create((function(e){return N.subscribe(e)})),w=null,x=!1,q=function(r){var n;x=!0;var i=new f;if(!0===l.ENABLE_LOAD_QUERY_REQUEST_DEDUPING){var a="raw-network-request-"+p(r,t);n=u(e,a,(function(){return e.getNetwork().execute(r,t,D)}))}else{n=e.getNetwork().execute(r,t,D)}var o=n.subscribe({error:function(e){w=e,i.error(e)},next:function(e){i.next(e)},complete:function(){i.complete()}}).unsubscribe;return E=o,s.create((function(e){var r=i.subscribe(e);return function(){r.unsubscribe(),E()}}))},O=function(r,t){!0===l.ENABLE_LOAD_QUERY_REQUEST_DEDUPING&&(x=!0);var n=u(e,r.request.identifier,t).subscribe({error:function(e){N.error(e)},next:function(e){N.next(e)},complete:function(){N.complete()}});R=n.unsubscribe},Q=function(r){var n=d(r,t,D);(b=e.retain(n),"store-only"!==k)&&(("store-or-network"!==k||"available"!==e.check(n).status)&&O(n,(function(){var e=q(r.params);return F(n,e)})))};if("PreloadableConcreteRequest"===r.kind){null===(S=(P=r.params).id)&&i(!1);var L=c.get(S);if(null!=L)Q(L);else{var T="store-only"===k?null:q(P),M=c.onLoad(S,(function(r){C();var n=d(r,t,D);b=e.retain(n),null!=T&&O(n,(function(){return F(n,T)}))}));C=M.dispose}}else{var U=v(r);S=null!=(P=U.params).cacheID?P.cacheID:P.id,Q(U)}var j=!1,B=!1,K=!1,V=function(){B||(b&&b.dispose(),B=!0)},W=function(){K||(A?R&&R():E&&E(),C&&C(),K=!0)};return{kind:"PreloadedQuery",environment:e,environmentProviderOptions:h,dispose:function(){j||(V(),W(),j=!0)},releaseQuery:V,cancelNetworkRequest:W,fetchKey:m,id:S,get isDisposed(){return j||B},get networkError(){return w},name:P.name,networkCacheConfig:D,fetchPolicy:k,source:x?I:void 0,variables:t}},useTrackLoadQueryInRender:function(){var e,r;null===h&&(h=null===(e=a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)||void 0===e||null===(r=e.ReactCurrentDispatcher)||void 0===r?void 0:r.current)}}},function(e,r){e.exports=a},function(e,r,t){"use strict";var n=t(0),i=n.useEffect,a=n.useRef;e.exports=function(){var e=a(!0);return i((function(){return e.current=!0,function(){e.current=!1}}),[]),e}},function(e,r,t){"use strict";var n=t(0).createContext({wrapPrepareQueryResource:function(e){return e()}});e.exports=n},function(e,r,t){"use strict";t(5);var n=null;e.exports={inject:function(e){n=e},get:function(){return n}}},function(e,r,t){"use strict";var n=t(19).getFragmentResourceForEnvironment,i=t(2),a=t(14),o=t(0),u=o.useEffect,s=o.useState,c=t(1),l=c.RelayFeatureFlags,f=c.getFragmentIdentifier;t(5);e.exports=function(e,r,t){var o=i(),c=n(o),d=a(!1),v=s(0)[1],p=f(e,r),h=c.readWithIdentifier(e,r,p,t),m=a(!0);function y(){!1!==d.current&&!1!==m.current&&v((function(e){return e+1}))}return u((function(){d.current=!0;var e=c.subscribe(h,y);return function(){d.current=!1,e.dispose()}}),[o,p]),l.LOG_MISSING_RECORDS_IN_PROD&&null!=r&&(void 0===h.data||Array.isArray(h.data)&&h.data.length>0&&h.data.every((function(e){return void 0===e}))),{data:h.data,disableStoreUpdates:function(){m.current=!1},enableStoreUpdates:function(){m.current=!0,c.checkMissedUpdates(h)[0]&&y()}}}},function(e,r){e.exports=o},function(e,r,t){"use strict";var n=t(4).default,i=n(t(7)),a=n(t(12)),o=t(20),u=t(21),s=t(3),c=t(1).isPromise,l=(t(5),"function"==typeof WeakMap);function f(e){return void 0!==e.request.node.params.metadata.live}function d(e,r,t,n,i){var a=null!=t?t:f(r)?"store-and-network":"store-or-network",o=null!=n?n:e.UNSTABLE_getDefaultRenderPolicy(),u="".concat(a,"-").concat(o,"-").concat(r.request.identifier);return null!=i?"".concat(u,"-").concat(i):u}function v(e,r){var t={__id:e.fragment.dataID,__fragments:(0,a.default)({},e.fragment.node.name,e.request.variables),__fragmentOwner:e.request};return{cacheIdentifier:r,fragmentNode:e.request.node.fragment,fragmentRef:t,operation:e}}var p=2e5;function h(e,r,t,n,i,a){var o=f(r),s=n,c=i,l=new u((function(e){var t=e.retain(r);return{dispose:function(){o&&null!=c&&c.unsubscribe(),t.dispose(),a(d)}}})),d={cacheIdentifier:e,id:p++,processedPayloadsCount:0,operationAvailability:t,getValue:function(){return s},setValue:function(e){s=e},setNetworkSubscription:function(e){o&&null!=c&&c.unsubscribe(),c=e},temporaryRetain:function(e){return l.temporaryRetain(e)},permanentRetain:function(e){return l.permanentRetain(e)},releaseTemporaryRetain:function(){l.releaseTemporaryRetain()}};return d}var m=function(){function e(e){var r=this;(0,a.default)(this,"_clearCacheEntry",(function(e){r._cache.delete(e.cacheIdentifier)})),this._environment=e,this._cache=o.create(1e3)}var r=e.prototype;return r.prepare=function(e,r,t,n,i,a,o){var u=d(this._environment,e,t,n,a);return this.prepareWithIdentifier(u,e,r,t,n,i,o)},r.prepareWithIdentifier=function(e,r,t,n,a,o,u){var s=this._environment,l=null!=n?n:f(r)?"store-and-network":"store-or-network",d=null!=a?a:s.UNSTABLE_getDefaultRenderPolicy(),v=this._cache.get(e),p=null,h=null!=v;null==v&&(v=this._fetchAndSaveQuery(e,r,t,l,d,u,(0,i.default)((0,i.default)({},o),{},{unsubscribe:function(e){null!=p&&p.dispose();var r=null==o?void 0:o.unsubscribe;r&&r(e)}}))),p=v.temporaryRetain(s);var m=v.getValue();if(c(m))throw s.__log({name:"suspense.query",fetchPolicy:l,isPromiseCached:h,operation:r,queryAvailability:v.operationAvailability,renderPolicy:d}),m;if(m instanceof Error)throw m;return m},r.retain=function(e,r){var t=this._environment,n=e.cacheIdentifier,i=e.operation,a=this._getOrCreateCacheEntry(n,i,null,e,null),o=a.permanentRetain(t);return t.__log({name:"queryresource.retain",profilerContext:r,resourceID:a.id}),{dispose:function(){o.dispose()}}},r.releaseTemporaryRetain=function(e){var r=this._cache.get(e.cacheIdentifier);null!=r&&r.releaseTemporaryRetain()},r.TESTS_ONLY__getCacheEntry=function(e,r,t,n){var i=d(this._environment,e,r,t,n);return this._cache.get(i)},r._getOrCreateCacheEntry=function(e,r,t,n,i){var a=this._cache.get(e);return null==a&&(a=h(e,r,t,n,i,this._clearCacheEntry),this._cache.set(e,a)),a},r._fetchAndSaveQuery=function(e,r,t,n,a,o,u){var c,l,d=this,p=this._environment,m=p.check(r),y=m.status,g="available"===y,_=g||"partial"===a&&"stale"!==y,b=function(){};switch(n){case"store-only":c=!1,l=!0;break;case"store-or-network":c=!g,l=_;break;case"store-and-network":c=!0,l=_;break;case"network-only":default:c=!0,l=!1}if(l){var E=v(r,e),R=h(e,r,m,E,null,this._clearCacheEntry);this._cache.set(e,R)}if(c){var P,C=v(r,e);t.subscribe({start:function(t){P=t;var n=d._cache.get(e);n&&n.setNetworkSubscription(P);var a=null==u?void 0:u.start;a&&a((0,i.default)((0,i.default)({},t),{},{unsubscribe:function(){f(r)&&t.unsubscribe()}}))},next:function(){var t=d._getOrCreateCacheEntry(e,r,m,C,P);t.processedPayloadsCount+=1,t.setValue(C),b();var n=null==u?void 0:u.next;null!=n&&n(p.lookup(r.fragment))},error:function(t){var n=d._getOrCreateCacheEntry(e,r,m,t,P);0===n.processedPayloadsCount&&n.setValue(t),b(),P=null,n.setNetworkSubscription(null);var i=null==u?void 0:u.error;i&&i(t)},complete:function(){b(),P=null;var r=d._cache.get(e);r&&r.setNetworkSubscription(null);var t=null==u?void 0:u.complete;t&&t()},unsubscribe:null==u?void 0:u.unsubscribe});var S=this._cache.get(e);if(!S){var k=new Promise((function(e){b=e}));k.displayName="Relay("+r.fragment.node.name+")",S=h(e,r,m,k,P,this._clearCacheEntry),this._cache.set(e,S)}}else{var D=null==u?void 0:u.complete;D&&D()}var A=this._cache.get(e);return null==A&&s(!1),p.__log({name:"queryresource.fetch",resourceID:A.id,operation:r,profilerContext:o,fetchPolicy:n,renderPolicy:a,queryAvailability:m,shouldFetch:c}),A},e}();function y(e){return new m(e)}var g=l?new WeakMap:new Map;e.exports={createQueryResource:y,getQueryResourceForEnvironment:function(e){var r=g.get(e);if(r)return r;var t=y(e);return g.set(e,t),t},getQueryCacheIdentifier:d}},function(e,r,t){"use strict";var n=t(0).useMemo;e.exports=function(e){return n((function(){return{current:e}}),[])}},function(e,r,t){"use strict";t(14),t(5);e.exports=function(e,r){}},function(e,r,t){"use strict";var n=t(0),i=t(1).__internal.createRelayContext;e.exports=i(n)},function(e,r,t){"use strict";var n=t(6).loadQuery;e.exports=function e(r,t,i){var a=null;null==t.root.getModuleIfRequired()&&(a=t.root.load());var o=t.getPreloadProps(i),u=o.queries,s=o.entryPoints,c=o.extraProps,l={},f={};null!=u&&Object.keys(u).forEach((function(e){var t=u[e],i=t.environmentProviderOptions,a=t.options,o=t.parameters,s=t.variables,c=r.getEnvironment(i);l[e]=n(c,o,s,{fetchPolicy:null==a?void 0:a.fetchPolicy,networkCacheConfig:null==a?void 0:a.networkCacheConfig,__nameForWarning:"loadEntryPoint"},i)})),null!=s&&Object.keys(s).forEach((function(t){var n=s[t];if(null!=n){var i=n.entryPoint,a=n.entryPointParams;f[t]=e(r,i,a)}}));var d=!1;return{dispose:function(){d||(null!=l&&Object.values(l).forEach((function(e){(0,e.dispose)()})),null!=f&&Object.values(f).forEach((function(e){(0,e.dispose)()})),d=!0)},entryPoints:f,extraProps:null!=c?c:null,getComponent:function(){var e,r=t.root.getModuleIfRequired();if(null==r)throw a=null!==(e=a)&&void 0!==e?e:t.root.load();return null!=r.default?r.default:r},get isDisposed(){return d},queries:l,rootModuleID:t.root.getModuleId()}}},function(e,r){e.exports=u},function(e,r,t){"use strict";var n=t(4).default,i=n(t(7)),a=n(t(12)),o=n(t(32)),u=t(20),s=t(13).getQueryResourceForEnvironment,c=t(21),l=t(3),f=t(1),d=f.__internal,v=d.fetchQuery,p=d.getPromiseForActiveRequest,h=f.RelayFeatureFlags,m=f.createOperationDescriptor,y=f.getFragmentIdentifier,g=f.getPendingOperationsForFragment,_=f.getSelector,b=f.getVariablesFromFragment,E=f.handlePotentialSnapshotErrors,R=f.isPromise,P=f.recycleNodesInto,C="function"==typeof WeakMap,S=Object.freeze([]);function k(e){return Array.isArray(e)?e.some((function(e){return e.isMissingData})):e.isMissingData}function D(e){return Array.isArray(e)?e.map((function(e){return e.missingLiveResolverFields})).filter(Boolean).flat():e.missingLiveResolverFields}function A(e,r,t){return Array.isArray(r)?{cacheKey:e,snapshot:r,data:r.map((function(e){return e.data})),isMissingData:k(r),storeEpoch:t}:{cacheKey:e,snapshot:r,data:r.data,isMissingData:k(r),storeEpoch:t}}var F=function(){function e(e){(0,a.default)(this,"_cache",new Map),(0,a.default)(this,"_retainCounts",new Map),this._environment=e}var r=e.prototype;return r.get=function(e){var r,t;return null!==(r=null===(t=this._cache.get(e))||void 0===t?void 0:t[0])&&void 0!==r?r:void 0},r.recordQueryResults=function(e,r){var t=this,n=this._cache.get(e);if(n){var i=n[0],a=n[1];r.forEach((function(e){i.push(e)})),a.temporaryRetain(this._environment)}else{var o=new c((function(){return t._retain(e)}));this._cache.set(e,[r,o]),o.temporaryRetain(this._environment)}},r._retain=function(e){var r,t=this,n=(null!==(r=this._retainCounts.get(e))&&void 0!==r?r:0)+1;return this._retainCounts.set(e,n),{dispose:function(){var r,n=(null!==(r=t._retainCounts.get(e))&&void 0!==r?r:0)-1;n>0?t._retainCounts.set(e,n):(t._retainCounts.delete(e),t._cache.delete(e))}}},e}(),N=function(){function e(e){this._environment=e,this._cache=u.create(1e6),h.ENABLE_CLIENT_EDGES&&(this._clientEdgeQueryResultsCache=new F(e))}var r=e.prototype;return r.read=function(e,r,t,n){return this.readWithIdentifier(e,r,y(e,r),t,n)},r.readWithIdentifier=function(e,r,t,n,i){var a,u,c,f,d=this,v=this._environment;if(null==r)return{cacheKey:t,data:null,isMissingData:!1,snapshot:null,storeEpoch:0};var m=v.getStore().getEpoch();if(!0===(null==e||null===(a=e.metadata)||void 0===a?void 0:a.plural)&&(Array.isArray(r)||l(!1),0===r.length))return{cacheKey:t,data:S,isMissingData:!1,snapshot:S,storeEpoch:m};var y=this._cache.get(t);if(null!=y){var g;if("pending"===y.kind&&R(y.promise))throw v.__log({name:"suspense.fragment",data:y.result.data,fragment:e,isRelayHooks:!0,isMissingData:y.result.isMissingData,isPromiseCached:!0,pendingOperations:y.pendingOperations}),y.promise;if("done"===y.kind&&y.result.snapshot&&(null===(g=D(y.result.snapshot))||void 0===g||!g.length))return this._throwOrLogErrorsInSnapshot(y.result.snapshot),y.result.isMissingData&&v.__log({name:"fragmentresource.missing_data",data:y.result.data,fragment:e,isRelayHooks:!0,cached:!0}),y.result}var b=_(e,r);null==b&&l(!1);var E=null,P=null;if(h.ENABLE_RELAY_OPERATION_TRACKER_SUSPENSE&&null!=y&&"missing"===y.kind?(E=y.result,P=y.snapshot):E=A(t,P="PluralReaderSelector"===b.kind?b.selectors.map((function(e){return v.lookup(e)})):v.lookup(b),m),!E.isMissingData)return this._throwOrLogErrorsInSnapshot(P),this._cache.set(t,{kind:"done",result:E}),E;var C=null;if(h.ENABLE_CLIENT_EDGES&&!0===(null===(u=e.metadata)||void 0===u?void 0:u.hasClientEdges)&&function(e){var r,t;return Array.isArray(e)?e.some((function(e){var r,t;return(null!==(r=null===(t=e.missingClientEdges)||void 0===t?void 0:t.length)&&void 0!==r?r:0)>0})):(null!==(r=null===(t=e.missingClientEdges)||void 0===t?void 0:t.length)&&void 0!==r?r:0)>0}(P)){C=[];var k=s(this._environment),F=[];!function(e,r){Array.isArray(e)?e.forEach(r):r(e)}(P,(function(t){var n;null===(n=t.missingClientEdges)||void 0===n||n.forEach((function(t){var n,i=t.request,a=t.clientEdgeDestinationID,o=d._performClientEdgeQuery(k,e,r,i,a),u=o.queryResult,s=o.requestDescriptor;F.push(u),null===(n=C)||void 0===n||n.push(s)}))})),null==this._clientEdgeQueryResultsCache&&l(!1),this._clientEdgeQueryResultsCache.recordQueryResults(t,F)}var N=[];h.ENABLE_CLIENT_EDGES&&C&&(N=C.map((function(e){return p(d._environment,e)})).filter(Boolean));var I="PluralReaderSelector"===b.kind?b.selectors[0].owner:b.owner,w=this._getAndSavePromiseForFragmentRequestInFlight(t,e,I,E),x=null==w?void 0:w.promise,q=null!==(c=null===(f=D(P))||void 0===f?void 0:f.map((function(e){var r=e.liveStateID;return v.getStore().getLiveResolverPromise(r)})))&&void 0!==c?c:[];if(N.length||q.length||R(x)){var O,Q;v.__log({name:"suspense.fragment",data:E.data,fragment:e,isRelayHooks:!0,isPromiseCached:!1,isMissingData:E.isMissingData,pendingOperations:[].concat((0,o.default)(null!==(O=null==w?void 0:w.pendingOperations)&&void 0!==O?O:[]),(0,o.default)(null!==(Q=C)&&void 0!==Q?Q:[]))});var L=[];if(N.length>0&&(L=L.concat(N)),q.length>0&&(L=L.concat(q)),L.length>0)throw x&&L.push(x),Promise.all(L);if(x)throw x}return h.ENABLE_RELAY_OPERATION_TRACKER_SUSPENSE&&E.isMissingData&&this._cache.set(t,{kind:"done",result:E}),this._throwOrLogErrorsInSnapshot(P),v.__log({name:"fragmentresource.missing_data",data:E.data,fragment:e,isRelayHooks:!0,cached:!1}),A(t,P,m)},r._performClientEdgeQuery=function(e,r,t,n,a){var o=b(r,t),u=(0,i.default)((0,i.default)({},o),{},{id:a}),s=m(n,u,{}),c=v(this._environment,s),l=e.prepare(s,c);return{requestDescriptor:s.request,queryResult:l}},r._throwOrLogErrorsInSnapshot=function(e){var r=this;Array.isArray(e)?e.forEach((function(e){E(r._environment,e.missingRequiredFields,e.relayResolverErrors)})):E(this._environment,e.missingRequiredFields,e.relayResolverErrors)},r.readSpec=function(e,r,t){var n={};for(var i in e)n[i]=this.read(e[i],r[i],t,i);return n},r.subscribe=function(e,r){var t=this,n=this._environment,i=e.cacheKey,a=e.snapshot;if(!a)return{dispose:function(){}};var o=this.checkMissedUpdates(e),u=o[0],c=o[1];u&&r();var f=[];if(Array.isArray(a)?(Array.isArray(c)||l(!1),c.forEach((function(e,a){f.push(n.subscribe(e,(function(e){var o=n.getStore().getEpoch();t._updatePluralSnapshot(i,c,e,a,o),r()})))}))):((null==c||Array.isArray(c))&&l(!1),f.push(n.subscribe(c,(function(e){var a=n.getStore().getEpoch(),o=A(i,e,a);h.ENABLE_RELAY_OPERATION_TRACKER_SUSPENSE&&o.isMissingData?t._cache.set(i,{kind:"missing",result:o,snapshot:e}):t._cache.set(i,{kind:"done",result:A(i,e,a)}),r()})))),h.ENABLE_CLIENT_EDGES){var d,v,p=null!==(d=null===(v=this._clientEdgeQueryResultsCache)||void 0===v?void 0:v.get(i))&&void 0!==d?d:void 0;if(null!=p&&p.length){var m=s(this._environment);p.forEach((function(e){f.push(m.retain(e))}))}}return{dispose:function(){f.forEach((function(e){return e.dispose()})),t._cache.delete(i)}}},r.subscribeSpec=function(e,r){var t=this,n=Object.keys(e).map((function(n){return t.subscribe(e[n],r)}));return{dispose:function(){n.forEach((function(e){e.dispose()}))}}},r.checkMissedUpdates=function(e){var r=this._environment,t=e.snapshot;if(!t)return[!1,null];var n;if(n=r.getStore().getEpoch(),e.storeEpoch===n)return[!1,e.snapshot];var a=e.cacheKey;if(Array.isArray(t)){var o=!1,u=[];if(t.forEach((function(e,t){var n=r.lookup(e.selector),a=e.data,s=n.data,c=P(a,s);c!==a&&(n=(0,i.default)((0,i.default)({},n),{},{data:c}),o=!0),u[t]=n})),o){var s=A(a,u,n);h.ENABLE_RELAY_OPERATION_TRACKER_SUSPENSE&&s.isMissingData?this._cache.set(a,{kind:"missing",result:s,snapshot:u}):this._cache.set(a,{kind:"done",result:s})}return[o,u]}var c=r.lookup(t.selector),l=t.data,f=c.data,d=P(l,f),v={data:d,isMissingData:c.isMissingData,missingClientEdges:c.missingClientEdges,missingLiveResolverFields:c.missingLiveResolverFields,seenRecords:c.seenRecords,selector:c.selector,missingRequiredFields:c.missingRequiredFields,relayResolverErrors:c.relayResolverErrors};if(d!==l){var p=A(a,v,n);h.ENABLE_RELAY_OPERATION_TRACKER_SUSPENSE&&p.isMissingData?this._cache.set(a,{kind:"missing",result:p,snapshot:v}):this._cache.set(a,{kind:"done",result:p})}return[d!==l,v]},r.checkMissedUpdatesSpec=function(e){var r=this;return Object.keys(e).some((function(t){return r.checkMissedUpdates(e[t])[0]}))},r._getAndSavePromiseForFragmentRequestInFlight=function(e,r,t,n){var i=this,a=g(this._environment,r,t);if(null==a)return null;var o=a.promise,u=a.pendingOperations,s=o.then((function(){i._cache.delete(e)})).catch((function(r){i._cache.delete(e)}));return s.displayName=o.displayName,this._cache.set(e,{kind:"pending",pendingOperations:u,promise:s,result:n}),{promise:s,pendingOperations:u}},r._updatePluralSnapshot=function(e,r,t,n,i){var a,u=this._cache.get(e);if(R(u))I(t.selector.node.name);else{var s=null==u||null===(a=u.result)||void 0===a?void 0:a.snapshot;if(!s||Array.isArray(s)){var c=s?(0,o.default)(s):(0,o.default)(r);c[n]=t;var l=A(e,c,i);h.ENABLE_RELAY_OPERATION_TRACKER_SUSPENSE&&l.isMissingData?this._cache.set(e,{kind:"missing",result:l,snapshot:c}):this._cache.set(e,{kind:"done",result:l})}else I(t.selector.node.name)}},e}();function I(e){l(!1)}function w(e){return new N(e)}var x=C?new WeakMap:new Map;e.exports={createFragmentResource:w,getFragmentResourceForEnvironment:function(e){var r=x.get(e);if(r)return r;var t=w(e);return x.set(e,t),t}}},function(e,r,t){"use strict";var n=t(3),i=function(){function e(e){this._capacity=e,this._capacity>0||n(!1),this._map=new Map}var r=e.prototype;return r.set=function(e,r){if(this._map.delete(e),this._map.set(e,r),this._map.size>this._capacity){var t=this._map.keys().next();t.done||this._map.delete(t.value)}},r.get=function(e){var r=this._map.get(e);return null!=r&&(this._map.delete(e),this._map.set(e,r)),r},r.has=function(e){return this._map.has(e)},r.delete=function(e){this._map.delete(e)},r.size=function(){return this._map.size},r.capacity=function(){return this._capacity-this._map.size},r.clear=function(){this._map.clear()},e}();e.exports={create:function(e){return new i(e)}}},function(e,r,t){"use strict";var n=(0,t(4).default)(t(12)),i=t(3),a=function(){function e(e){var r=this;(0,n.default)(this,"_retainCount",0),(0,n.default)(this,"_retainDisposable",null),(0,n.default)(this,"_releaseTemporaryRetain",null),this._retain=function(t){return r._retainCount++,1===r._retainCount&&(r._retainDisposable=e(t)),{dispose:function(){r._retainCount=Math.max(0,r._retainCount-1),0===r._retainCount&&(null==r._retainDisposable&&i(!1),r._retainDisposable.dispose(),r._retainDisposable=null)}}}}var r=e.prototype;return r.temporaryRetain=function(e){var r,t=this;if(e.isServer())return{dispose:function(){}};var n=this._retain(e),i=null,a=function(){clearTimeout(i),i=null,t._releaseTemporaryRetain=null,n.dispose()};return i=setTimeout(a,3e5),null===(r=this._releaseTemporaryRetain)||void 0===r||r.call(this),this._releaseTemporaryRetain=a,{dispose:function(){var e;null===(e=t._releaseTemporaryRetain)||void 0===e||e.call(t)}}},r.permanentRetain=function(e){var r=this._retain(e);return this.releaseTemporaryRetain(),r},r.releaseTemporaryRetain=function(){var e;null===(e=this._releaseTemporaryRetain)||void 0===e||e.call(this),this._releaseTemporaryRetain=null},r.getRetainCount=function(){return this._retainCount},e}();e.exports=a},function(e,r,t){"use strict";var n=t(9),i=t(13),a=i.getQueryCacheIdentifier,o=i.getQueryResourceForEnvironment,u=t(23),s=t(11),c=t(2),l=t(0),f=l.useContext,d=l.useEffect,v=l.useState,p=l.useRef;e.exports=function(e){var r=e.query,t=e.componentDisplayName,i=e.fetchObservable,l=e.fetchPolicy,h=e.fetchKey,m=e.renderPolicy,y=c(),g=f(n),_=o(y),b=v(0),E=b[0],R=b[1],P=u(),C=P.startFetch,S=P.completeFetch,k="".concat(E,"-").concat(null!=h?h:""),D=a(y,r,l,m,k),A=g.wrapPrepareQueryResource((function(){return _.prepareWithIdentifier(D,r,i,l,m,{start:C,complete:S,error:S},g)})),F=p(!1);d((function(){return function(){F.current=!0}}),[]),d((function(){if(!0===F.current)return F.current=!1,void R((function(e){return e+1}));var e=_.retain(A,g);return function(){e.dispose()}}),[y,D]),d((function(){_.releaseTemporaryRetain(A)}));var N=A.fragmentNode,I=A.fragmentRef;return s(N,I,t).data}},function(e,r,t){"use strict";var n=t(14),i=t(0),a=i.useCallback,o=i.useEffect;e.exports=function(){var e=n(null),r=n(!1),t=a((function(){null!=e.current&&(e.current.unsubscribe(),e.current=null),r.current=!1}),[]),i=a((function(t){e.current=t,r.current=!0}),[]),u=a((function(){e.current=null,r.current=!1}),[]);return o((function(){return t}),[t]),{isFetchingRef:r,startFetch:i,disposeFetch:t,completeFetch:u}}},function(e,r,t){"use strict";var n=t(34),i=t(0),a=t(1),o=a.createOperationDescriptor,u=a.getRequest,s=i.useMemo;e.exports=function(e,r,t){var i=n(r),a=n(t||{});return s((function(){return o(u(e),i,a)}),[e,i,a])}},function(e,r,t){"use strict";var n=(0,t(4).default)(t(7)),i=t(19).getFragmentResourceForEnvironment,a=t(9),o=t(13).getQueryResourceForEnvironment,u=t(11),s=t(8),c=t(26),l=t(2),f=t(3),d=t(0),v=d.useCallback,p=d.useContext,h=d.useReducer,m=t(1),y=m.__internal.fetchQuery,g=m.createOperationDescriptor,_=m.getFragmentIdentifier,b=m.getRefetchMetadata,E=m.getSelector,R=m.getValueAtPath;t(5);function P(e,r){switch(r.type){case"refetch":var t;return(0,n.default)((0,n.default)({},e),{},{fetchPolicy:r.fetchPolicy,mirroredEnvironment:null!==(t=r.refetchEnvironment)&&void 0!==t?t:e.mirroredEnvironment,onComplete:r.onComplete,refetchEnvironment:r.refetchEnvironment,refetchQuery:r.refetchQuery,renderPolicy:r.renderPolicy});case"reset":return{fetchPolicy:void 0,mirroredEnvironment:r.environment,mirroredFragmentIdentifier:r.fragmentIdentifier,onComplete:void 0,refetchQuery:null,renderPolicy:void 0};default:throw r.type,new Error("useRefetchableFragmentNode: Unexpected action type")}}e.exports=function(e,r,t){var d=l(),m=b(e,t),C=m.refetchableRequest,S=m.fragmentRefPathInResponse,k=_(e,r),D=h(P,{fetchPolicy:void 0,mirroredEnvironment:d,mirroredFragmentIdentifier:k,onComplete:void 0,refetchEnvironment:null,refetchQuery:null,renderPolicy:void 0}),A=D[0],F=D[1],N=A.fetchPolicy,I=A.mirroredEnvironment,w=A.mirroredFragmentIdentifier,x=A.onComplete,q=A.refetchEnvironment,O=A.refetchQuery,Q=A.renderPolicy,L=null!=q?q:d,T=o(L),M=i(L),U=p(a),j=L!==I||k!==w,B=c(C),K=B[0],V=B[1],W=B[2],H=r,Y=b(e,t).identifierInfo;if(j)F({type:"reset",environment:L,fragmentIdentifier:k}),W();else if(null!=O&&null!=K){0;var G=function(e){x&&x(null!=e?e:null)},z=null!=K.source?K.source:y(L,O),X=U.wrapPrepareQueryResource((function(){return T.prepare(O,z,N,Q,{error:G,complete:function(){G()}},K.fetchKey,U)})),J=M.read(X.fragmentNode,X.fragmentRef,t).data;null==J&&f(!1),H=R(J,S)}var Z=u(e,H,t),$=Z.data,ee=Z.disableStoreUpdates,re=Z.enableStoreUpdates;return{fragmentData:$,fragmentRef:H,refetch:function(e,r,t,i,a,o,u,c,l,f,d){var p=s(),h=null!=(null==c?void 0:c.identifierField)&&null!=i&&"object"==typeof i?i[c.identifierField]:null;return v((function(e,i){if(!0!==p.current)return{dispose:function(){}};var a,u,s=null==i?void 0:i.__environment,v=null==i?void 0:i.fetchPolicy,m=null==i?void 0:i.UNSTABLE_renderPolicy,y=null==i?void 0:i.onComplete,_=E(o,f);if(null==_)a={},u={};else if("PluralReaderSelector"===_.kind){var b,R,P,C;a=null!==(b=null===(R=_.selectors[0])||void 0===R?void 0:R.owner.variables)&&void 0!==b?b:{},u=null!==(P=null===(C=_.selectors[0])||void 0===C?void 0:C.variables)&&void 0!==P?P:{}}else a=_.owner.variables,u=_.variables;var S=(0,n.default)((0,n.default)((0,n.default)({},a),u),e);null==c||e.hasOwnProperty(c.identifierQueryVariableName)||(S[c.identifierQueryVariableName]=h);var k=g(d,S,{force:!0});return l(k.request.variables,{fetchPolicy:v,__environment:s,__nameForWarning:"refetch"}),r({type:"refetch",fetchPolicy:v,onComplete:y,refetchEnvironment:s,refetchQuery:k,renderPolicy:m}),{dispose:t}}),[a,r,t,h,l])}(0,F,W,$,k,e,0,Y,V,r,C),disableStoreUpdates:ee,enableStoreUpdates:re}}},function(e,r,t){"use strict";var n=(0,t(4).default)(t(18)),i=t(6),a=i.loadQuery,o=i.useTrackLoadQueryInRender,u=t(8),s=t(2),c=t(0),l=c.useCallback,f=c.useEffect,d=c.useRef,v=c.useState,p=t(1).getRequest,h={kind:"NullQueryReference"};function m(e){return"PreloadableConcreteRequest"===e.kind?void 0!==e.params.metadata.live:void 0!==p(e).params.metadata.live}e.exports=function(e,r){var t=null!=r?r:h,i=s();o();var c=u(),p=d(new Set([t])),y=v((function(){return t})),g=y[0],_=y[1],b=v((function(){return t})),E=b[0],R=b[1];t!==E&&(p.current.add(t),R(t),_(t));var P=l((function(){c.current&&(p.current.add(h),_(h))}),[c]),C=l((function(r,t){var n=null!=t&&t.hasOwnProperty("__environment")?{fetchPolicy:t.fetchPolicy,networkCacheConfig:t.networkCacheConfig,__nameForWarning:t.__nameForWarning}:t;if(c.current){var o,u=a(null!==(o=null==t?void 0:t.__environment)&&void 0!==o?o:i,e,r,n);p.current.add(u),_(u)}}),[i,e,_,c]),S=d(!1);return f((function(){return function(){S.current=!0}}),[]),f((function(){if(!0===S.current)return S.current=!1,void("NullQueryReference"!==g.kind&&C(g.variables,{fetchPolicy:g.fetchPolicy,networkCacheConfig:g.networkCacheConfig}));var r=p.current;if(c.current){var t,i=(0,n.default)(r);try{for(i.s();!(t=i.n()).done;){var a=t.value;if(a===g)break;r.delete(a),"NullQueryReference"!==a.kind&&(m(e)?a.dispose&&a.dispose():a.releaseQuery&&a.releaseQuery())}}catch(e){i.e(e)}finally{i.f()}}}),[g,c,C,e]),f((function(){return function(){var r,t=(0,n.default)(p.current);try{for(t.s();!(r=t.n()).done;){var i=r.value;"NullQueryReference"!==i.kind&&(m(e)?i.dispose&&i.dispose():i.releaseQuery&&i.releaseQuery())}}catch(e){t.e(e)}finally{t.f()}}}),[e]),["NullQueryReference"===g.kind?null:g,C,P]}},function(e,r,t){"use strict";var n=t(28),i=t(17),a=t(6).loadQuery,o=t(9),u=t(29),s=t(30),c=t(31),l=t(33),f=t(36),d=t(37),v=t(40),p=t(26),h=t(41),m=t(2),y=t(42),g=t(43),_=t(1);e.exports={ConnectionHandler:_.ConnectionHandler,applyOptimisticMutation:_.applyOptimisticMutation,commitLocalUpdate:_.commitLocalUpdate,commitMutation:_.commitMutation,graphql:_.graphql,readInlineData:_.readInlineData,requestSubscription:_.requestSubscription,EntryPointContainer:n,RelayEnvironmentProvider:u,ProfilerContext:o,fetchQuery:_.fetchQuery,loadQuery:a,loadEntryPoint:i,useFragment:c,useLazyLoadQuery:l,useEntryPointLoader:s,useQueryLoader:p,useMutation:f,usePaginationFragment:d,usePreloadedQuery:v,useRefetchableFragment:h,useRelayEnvironment:m,useSubscribeToInvalidationState:y,useSubscription:g}},function(e,r,t){"use strict";var n=t(9),i=t(2),a=t(0),o=t(0),u=o.useContext,s=o.useEffect;t(5);e.exports=function(e){var r=e.entryPointReference,t=e.props,o=r.getComponent,c=r.queries,l=r.entryPoints,f=r.extraProps,d=r.rootModuleID,v=o(),p=u(n),h=i();return s((function(){h.__log({name:"entrypoint.root.consume",profilerContext:p,rootModuleID:d})}),[h,p,d]),a.createElement(v,{entryPoints:l,extraProps:f,props:t,queries:c})}},function(e,r,t){"use strict";var n=t(16),i=t(0),a=i.useMemo;e.exports=function(e){var r=e.children,t=e.environment,o=e.getEnvironmentForActor,u=a((function(){return{environment:t,getEnvironmentForActor:o}}),[t,o]);return i.createElement(n.Provider,{value:u},r)}},function(e,r,t){"use strict";var n=(0,t(4).default)(t(18)),i=t(17),a=t(6).useTrackLoadQueryInRender,o=t(8),u=t(0),s=u.useCallback,c=u.useEffect,l=u.useRef,f=u.useState,d={kind:"NullEntryPointReference"};e.exports=function(e,r,t){var u,v,p,h;a();var m=null!==(u=null==t||null===(v=t.TEST_ONLY__initialEntryPointData)||void 0===v?void 0:v.entryPointReference)&&void 0!==u?u:d,y=null!==(p=null==t||null===(h=t.TEST_ONLY__initialEntryPointData)||void 0===h?void 0:h.entryPointParams)&&void 0!==p?p:null,g=o(),_=l(new Set([m])),b=f(m),E=b[0],R=b[1],P=f(y),C=P[0],S=P[1],k=s((function(){if(g.current){var e={kind:"NullEntryPointReference"};_.current.add(e),R(e)}}),[R,g]),D=s((function(t){if(g.current){var n=i(e,r,t);_.current.add(n),R(n),S(t)}}),[e,r,R,g]),A=l(!1);return c((function(){return function(){A.current=!0}}),[]),c((function(){if(!0===A.current)return A.current=!1,void("NullEntryPointReference"!==E.kind&&null!=C&&D(C));var e=_.current;if(g.current){var r,t=(0,n.default)(e);try{for(t.s();!(r=t.n()).done;){var i=r.value;if(i===E)break;e.delete(i),"NullEntryPointReference"!==i.kind&&i.dispose()}}catch(e){t.e(e)}finally{t.f()}}}),[E,C,D,g]),c((function(){return function(){var e,r=(0,n.default)(_.current);try{for(r.s();!(e=r.n()).done;){var t=e.value;"NullEntryPointReference"!==t.kind&&t.dispose()}}catch(e){r.e(e)}finally{r.f()}}}),[]),["NullEntryPointReference"===E.kind?null:E,D,k]}},function(e,r,t){"use strict";var n=t(10),i=t(6).useTrackLoadQueryInRender,a=t(11),o=t(15),u=(t(0).useDebugValue,t(1).getFragment);e.exports=function(e,r){var t=n.get();return t?t.useFragment(e,r):function(e,r){i();var t=u(e);return o(t,"first argument of useFragment()"),a(t,r,"useFragment()").data}(e,r)}},function(e,r){e.exports=s},function(e,r,t){"use strict";var n=t(6).useTrackLoadQueryInRender,i=t(22),a=t(24),o=t(2),u=t(1).__internal.fetchQuery;e.exports=function(e,r,t){n();var s=o(),c=a(e,r,t&&t.networkCacheConfig?t.networkCacheConfig:{force:!0});return i({componentDisplayName:"useLazyLoadQuery()",fetchKey:null==t?void 0:t.fetchKey,fetchObservable:u(s,c),fetchPolicy:null==t?void 0:t.fetchPolicy,query:c,renderPolicy:null==t?void 0:t.UNSTABLE_renderPolicy})}},function(e,r,t){"use strict";var n=t(35),i=t(0).useState;e.exports=function(e){var r=i(e),t=r[0],a=r[1];return n(e,t)?t:(a(e),e)}},function(e,r){e.exports=c},function(e,r,t){"use strict";var n=(0,t(4).default)(t(7)),i=t(8),a=t(2),o=t(0),u=t(1).commitMutation,s=o.useState,c=o.useEffect,l=o.useRef,f=o.useCallback;e.exports=function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u,t=a(),o=i(),d=l(t),v=l(e),p=l(new Set),h=s(!1),m=h[0],y=h[1],g=f((function(r){d.current===t&&v.current===e&&(p.current.delete(r),o.current&&y(p.current.size>0))}),[t,o,e]);c((function(){d.current===t&&v.current===e||(p.current=new Set,o.current&&y(!1),d.current=t,v.current=e)}),[t,o,e]);var _=f((function(i){o.current&&y(!0);var a=r(t,(0,n.default)((0,n.default)({},i),{},{mutation:e,onCompleted:function(e,r){var t;g(a),null===(t=i.onCompleted)||void 0===t||t.call(i,e,r)},onError:function(e){var r;g(a),null===(r=i.onError)||void 0===r||r.call(i,e)},onUnsubscribe:function(){var e;g(a),null===(e=i.onUnsubscribe)||void 0===e||e.call(i)},onNext:function(){var e;null===(e=i.onNext)||void 0===e||e.call(i)}}));return p.current.add(a),a}),[g,r,t,o,e]);return[_,m]}},function(e,r,t){"use strict";var n=(0,t(4).default)(t(7)),i=t(10),a=t(38),o=t(25),u=t(15),s=t(0),c=s.useCallback,l=(s.useDebugValue,s.useState),f=t(1),d=f.getFragment,v=f.getFragmentIdentifier,p=f.getPaginationMetadata;function h(e){var r=l(!1),t=r[0],i=r[1],o={start:function(){return i(!0)},complete:function(){return i(!1)},error:function(){return i(!1)}},u=a((0,n.default)((0,n.default)({},e),{},{observer:o,onReset:function(){return i(!1)}}));return[u[0],u[1],t,u[2]]}e.exports=function(e,r){var t=i.get();return t?t.usePaginationFragment(e,r):function(e,r){var t=d(e);u(t,"first argument of usePaginationFragment()");var i=p(t,"usePaginationFragment()"),a=i.connectionPathInFragmentData,s=i.paginationRequest,l=i.paginationMetadata,f=o(t,r,"usePaginationFragment()"),m=f.fragmentData,y=f.fragmentRef,g=f.refetch,_=v(t,y),b=h({componentDisplayName:"usePaginationFragment()",connectionPathInFragmentData:a,direction:"backward",fragmentData:m,fragmentIdentifier:_,fragmentNode:t,fragmentRef:y,paginationMetadata:l,paginationRequest:s}),E=b[0],R=b[1],P=b[2],C=b[3],S=h({componentDisplayName:"usePaginationFragment()",connectionPathInFragmentData:a,direction:"forward",fragmentData:m,fragmentIdentifier:_,fragmentNode:t,fragmentRef:y,paginationMetadata:l,paginationRequest:s}),k=S[0],D=S[1],A=S[2],F=S[3];return{data:m,loadNext:k,loadPrevious:E,hasNext:D,hasPrevious:R,isLoadingNext:A,isLoadingPrevious:P,refetch:c((function(e,r){return F(),C(),g(e,(0,n.default)((0,n.default)({},r),{},{__environment:void 0}))}),[F,C,g])}}(e,r)}},function(e,r,t){"use strict";var n=(0,t(4).default)(t(7)),i=t(23),a=t(8),o=t(39),u=t(2),s=t(3),c=t(0),l=c.useCallback,f=c.useEffect,d=c.useState,v=t(1),p=v.__internal.fetchQuery,h=v.ConnectionInterface,m=v.createOperationDescriptor,y=v.getPaginationVariables,g=v.getRefetchMetadata,_=v.getSelector,b=v.getValueAtPath;t(5);e.exports=function(e){var r=e.direction,t=e.fragmentNode,c=e.fragmentRef,v=e.fragmentIdentifier,E=e.fragmentData,R=e.connectionPathInFragmentData,P=e.paginationRequest,C=e.paginationMetadata,S=e.componentDisplayName,k=e.observer,D=e.onReset,A=u(),F=i(),N=F.isFetchingRef,I=F.startFetch,w=F.disposeFetch,x=F.completeFetch,q=g(t,S).identifierInfo,O=null!=(null==q?void 0:q.identifierField)&&null!=E&&"object"==typeof E?E[q.identifierField]:null,Q=a(),L=d(A),T=L[0],M=L[1],U=d(v),j=U[0],B=U[1],K=o(t,c);(A!==T||v!==j)&&(w(),D(),M(A),B(v));var V=function(e,r,t,n){var i,a,o=h.get(),u=o.EDGES,c=o.PAGE_INFO,l=o.HAS_NEXT_PAGE,f=o.HAS_PREV_PAGE,d=o.END_CURSOR,v=o.START_CURSOR,p=b(t,n);if(null==p)return{cursor:null,hasMore:!1};"object"!=typeof p&&s(!1);var m=p[u],y=p[c];if(null==m||null==y)return{cursor:null,hasMore:!1};Array.isArray(m)||s(!1),"object"!=typeof y&&s(!1);var g,_="forward"===e?null!==(i=y[d])&&void 0!==i?i:null:null!==(a=y[v])&&void 0!==a?a:null;null!==_&&"string"!=typeof _&&s(!1),g="forward"===e?null!=_&&!0===y[l]:null!=_&&!0===y[f];return{cursor:_,hasMore:g}}(r,0,E,R),W=V.cursor,H=V.hasMore;return f((function(){return function(){w()}}),[w]),[l((function(e,i){var a=null==i?void 0:i.onComplete;if(!0!==Q.current)return{dispose:function(){}};var o=_(t,c);if(!0===N.current||null==E||K)return a&&a(null),{dispose:function(){}};(null==o||"PluralReaderSelector"===o.kind)&&s(!1);var u=o.owner.variables,l=o.variables,f=null==i?void 0:i.UNSTABLE_extraVariables,d=(0,n.default)((0,n.default)({},u),l),v=y(r,e,W,d,(0,n.default)({},f),C);null!=q&&(v[q.identifierQueryVariableName]=O);var h=m(P,v,{force:!0});return p(A,h).subscribe((0,n.default)((0,n.default)({},k),{},{start:function(e){I(e),k.start&&k.start(e)},complete:function(){x(),k.complete&&k.complete(),a&&a(null)},error:function(e){x(),k.error&&k.error(e),a&&a(e)}})),{dispose:w}}),[A,O,r,W,I,w,x,N,K,E,t.name,c,S]),H,w]}},function(e,r,t){"use strict";var n=t(2),i=t(3),a=t(0),o=t(1),u=o.__internal.getObservableForActiveRequest,s=o.getSelector,c=a.useEffect,l=a.useState,f=a.useMemo;e.exports=function(e,r){var t=n(),a=f((function(){var n=s(e,r);return null==n?null:("SingularReaderSelector"!==n.kind&&i(!1),u(t,n.owner))}),[t,e,r]),o=l(null!=a),d=o[0],v=o[1];return c((function(){var e;if(v(null!=a),null!=a){var r=function(){v(!1)};e=a.subscribe({complete:r,error:r})}return function(){e&&e.unsubscribe()}}),[a]),d}},function(e,r,t){"use strict";var n=t(6).useTrackLoadQueryInRender,i=t(22),a=t(24),o=t(2),u=t(3),s=(t(0).useDebugValue,t(1).__internal),c=s.fetchQueryDeduped,l=s.fetchQuery;t(5);e.exports=function(e,r,t){n();var s,f=o(),d=r.fetchKey,v=r.fetchPolicy,p=r.source,h=r.variables,m=r.networkCacheConfig,y=a(e,h,m);if("PreloadedQuery_DEPRECATED"===r.kind)y.request.node.params.name!==r.name&&u(!1),s={componentDisplayName:"usePreloadedQuery()",fetchKey:d,fetchObservable:c(f,y.request.identifier,(function(){return f===r.environment&&null!=p?f.executeWithSource({operation:y,source:p}):f.execute({operation:y})})),fetchPolicy:v,query:y,renderPolicy:null==t?void 0:t.UNSTABLE_renderPolicy};else{var g=l(f,y);s={componentDisplayName:"usePreloadedQuery()",fetchObservable:null!=p&&f===r.environment?p.ifEmpty(g):(r.environment,g),fetchKey:d,fetchPolicy:v,query:y,renderPolicy:null==t?void 0:t.UNSTABLE_renderPolicy}}return i(s)}},function(e,r,t){"use strict";var n=t(10),i=t(25),a=t(15),o=(t(0).useDebugValue,t(1).getFragment);e.exports=function(e,r){var t=n.get();return t?t.useRefetchableFragment(e,r):function(e,r){var t=o(e);a(t,"first argument of useRefetchableFragment()");var n=i(t,r,"useRefetchableFragment()");return[n.fragmentData,n.refetch]}(e,r)}},function(e,r,t){"use strict";var n=t(2),i=t(0),a=i.useEffect,o=i.useRef;e.exports=function(e,r){var t=n(),i=o(null),u=Array.from(e).sort().join("");return a((function(){var n=t.getStore(),a=n.lookupInvalidationState(e),o=n.subscribeToInvalidationState(a,r);return i.current=o,function(){return o.dispose()}}),[u,r,t]),{dispose:function(){null!=i.current&&i.current.dispose()}}}},function(e,r,t){"use strict";var n=t(2),i=t(0).useEffect,a=t(1).requestSubscription;e.exports=function(e,r){var t=null!=r?r:a,o=n();i((function(){return t(o,e).dispose}),[o,e,t])}}])}));
|
9
|
+
!function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r(require("@babel/runtime/helpers/createForOfIteratorHelper"),require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/interopRequireDefault"),require("@babel/runtime/helpers/objectSpread2"),require("@babel/runtime/helpers/toConsumableArray"),require("fbjs/lib/areEqual"),require("fbjs/lib/warning"),require("invariant"),require("react"),require("relay-runtime")):"function"==typeof define&&define.amd?define(["@babel/runtime/helpers/createForOfIteratorHelper","@babel/runtime/helpers/defineProperty","@babel/runtime/helpers/interopRequireDefault","@babel/runtime/helpers/objectSpread2","@babel/runtime/helpers/toConsumableArray","fbjs/lib/areEqual","fbjs/lib/warning","invariant","react","relay-runtime"],r):"object"==typeof exports?exports.ReactRelayHooks=r(require("@babel/runtime/helpers/createForOfIteratorHelper"),require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/interopRequireDefault"),require("@babel/runtime/helpers/objectSpread2"),require("@babel/runtime/helpers/toConsumableArray"),require("fbjs/lib/areEqual"),require("fbjs/lib/warning"),require("invariant"),require("react"),require("relay-runtime")):e.ReactRelayHooks=r(e["@babel/runtime/helpers/createForOfIteratorHelper"],e["@babel/runtime/helpers/defineProperty"],e["@babel/runtime/helpers/interopRequireDefault"],e["@babel/runtime/helpers/objectSpread2"],e["@babel/runtime/helpers/toConsumableArray"],e["fbjs/lib/areEqual"],e["fbjs/lib/warning"],e.invariant,e.react,e["relay-runtime"])}(self,((e,r,t,n,i,a,o,u,s,l)=>(()=>{"use strict";var c={888:(e,r,t)=>{var n=t(156),i=t(658).__internal.createRelayContext;e.exports=i(n)},651:(e,r,t)=>{var n=t(158),i=t(828),a=t(428).loadQuery,o=t(187),u=t(696),s=t(529),l=t(242),c=t(899),f=t(115),d=t(951),v=t(617),p=t(876),h=t(874),m=t(750),g=t(50),y=t(746),_=t(658);e.exports={ConnectionHandler:_.ConnectionHandler,applyOptimisticMutation:_.applyOptimisticMutation,commitLocalUpdate:_.commitLocalUpdate,commitMutation:_.commitMutation,graphql:_.graphql,readInlineData:_.readInlineData,requestSubscription:_.requestSubscription,EntryPointContainer:n,RelayEnvironmentProvider:u,ProfilerContext:o,fetchQuery:_.fetchQuery,loadQuery:a,loadEntryPoint:i,useFragment:l,useLazyLoadQuery:c,useEntryPointLoader:s,useQueryLoader:p,useMutation:f,usePaginationFragment:d,usePreloadedQuery:v,useRefetchableFragment:h,useRelayEnvironment:m,useSubscribeToInvalidationState:g,useSubscription:y}},158:(e,r,t)=>{var n=t(187),i=t(750),a=t(156),o=t(156),u=o.useContext,s=o.useEffect;t(446),e.exports=function(e){var r=e.entryPointReference,t=e.props,o=r.getComponent,l=r.queries,c=r.entryPoints,f=r.extraProps,d=r.rootModuleID,v=o(),p=u(n),h=i();return s((function(){h.__log({name:"entrypoint.root.consume",profilerContext:p,rootModuleID:d})}),[h,p,d]),a.createElement(v,{entryPoints:c,extraProps:f,props:t,queries:l})}},985:(e,r,t)=>{var n=t(275).default,i=n(t(175)),a=n(t(311)),o=n(t(642)),u=t(93),s=t(269).getQueryResourceForEnvironment,l=t(637),c=t(56),f=t(658),d=f.__internal,v=d.fetchQuery,p=d.getPromiseForActiveRequest,h=f.RelayFeatureFlags,m=f.createOperationDescriptor,g=f.getFragmentIdentifier,y=f.getPendingOperationsForFragment,_=f.getSelector,b=f.getVariablesFromFragment,E=f.handlePotentialSnapshotErrors,R=f.isPromise,P=f.recycleNodesInto,C="function"==typeof WeakMap,S=Object.freeze([]);function k(e){return Array.isArray(e)?e.some((function(e){return e.isMissingData})):e.isMissingData}function D(e){return Array.isArray(e)?e.map((function(e){return e.missingLiveResolverFields})).filter(Boolean).flat():e.missingLiveResolverFields}function A(e,r,t){return Array.isArray(r)?{cacheKey:e,snapshot:r,data:r.map((function(e){return e.data})),isMissingData:k(r),storeEpoch:t}:{cacheKey:e,snapshot:r,data:r.data,isMissingData:k(r),storeEpoch:t}}var N=function(){function e(e){(0,a.default)(this,"_cache",new Map),(0,a.default)(this,"_retainCounts",new Map),this._environment=e}var r=e.prototype;return r.get=function(e){var r,t;return null!==(r=null===(t=this._cache.get(e))||void 0===t?void 0:t[0])&&void 0!==r?r:void 0},r.recordQueryResults=function(e,r){var t=this,n=this._cache.get(e);if(n){var i=n[0],a=n[1];r.forEach((function(e){i.push(e)})),a.temporaryRetain(this._environment)}else{var o=new l((function(){return t._retain(e)}));this._cache.set(e,[r,o]),o.temporaryRetain(this._environment)}},r._retain=function(e){var r,t=this,n=(null!==(r=this._retainCounts.get(e))&&void 0!==r?r:0)+1;return this._retainCounts.set(e,n),{dispose:function(){var r,n=(null!==(r=t._retainCounts.get(e))&&void 0!==r?r:0)-1;n>0?t._retainCounts.set(e,n):(t._retainCounts.delete(e),t._cache.delete(e))}}},e}(),F=function(){function e(e){this._environment=e,this._cache=u.create(1e6),h.ENABLE_CLIENT_EDGES&&(this._clientEdgeQueryResultsCache=new N(e))}var r=e.prototype;return r.read=function(e,r,t,n){return this.readWithIdentifier(e,r,g(e,r),t,n)},r.readWithIdentifier=function(e,r,t,n,i){var a,u,l,f,d=this,v=this._environment;if(null==r)return{cacheKey:t,data:null,isMissingData:!1,snapshot:null,storeEpoch:0};var m=v.getStore().getEpoch();if(!0===(null==e||null===(a=e.metadata)||void 0===a?void 0:a.plural)&&(Array.isArray(r)||c(!1),0===r.length))return{cacheKey:t,data:S,isMissingData:!1,snapshot:S,storeEpoch:m};var g=this._cache.get(t);if(null!=g){var y;if("pending"===g.kind&&R(g.promise))throw v.__log({name:"suspense.fragment",data:g.result.data,fragment:e,isRelayHooks:!0,isMissingData:g.result.isMissingData,isPromiseCached:!0,pendingOperations:g.pendingOperations}),g.promise;if("done"===g.kind&&g.result.snapshot&&(null===(y=D(g.result.snapshot))||void 0===y||!y.length))return this._throwOrLogErrorsInSnapshot(g.result.snapshot),g.result.isMissingData&&v.__log({name:"fragmentresource.missing_data",data:g.result.data,fragment:e,isRelayHooks:!0,cached:!0}),g.result}var b=_(e,r);null==b&&c(!1);var E=null,P=null;if(h.ENABLE_RELAY_OPERATION_TRACKER_SUSPENSE&&null!=g&&"missing"===g.kind?(E=g.result,P=g.snapshot):E=A(t,P="PluralReaderSelector"===b.kind?b.selectors.map((function(e){return v.lookup(e)})):v.lookup(b),m),!E.isMissingData)return this._throwOrLogErrorsInSnapshot(P),this._cache.set(t,{kind:"done",result:E}),E;var C=null;if(h.ENABLE_CLIENT_EDGES&&!0===(null===(u=e.metadata)||void 0===u?void 0:u.hasClientEdges)&&function(e){var r,t;return Array.isArray(e)?e.some((function(e){var r,t;return(null!==(r=null===(t=e.missingClientEdges)||void 0===t?void 0:t.length)&&void 0!==r?r:0)>0})):(null!==(r=null===(t=e.missingClientEdges)||void 0===t?void 0:t.length)&&void 0!==r?r:0)>0}(P)){C=[];var k=s(this._environment),N=[];!function(e,r){Array.isArray(e)?e.forEach(r):r(e)}(P,(function(t){var n;null===(n=t.missingClientEdges)||void 0===n||n.forEach((function(t){var n,i=t.request,a=t.clientEdgeDestinationID,o=d._performClientEdgeQuery(k,e,r,i,a),u=o.queryResult,s=o.requestDescriptor;N.push(u),null===(n=C)||void 0===n||n.push(s)}))})),null==this._clientEdgeQueryResultsCache&&c(!1),this._clientEdgeQueryResultsCache.recordQueryResults(t,N)}var F=[];h.ENABLE_CLIENT_EDGES&&C&&(F=C.map((function(e){return p(d._environment,e)})).filter(Boolean));var I="PluralReaderSelector"===b.kind?b.selectors[0].owner:b.owner,x=this._getAndSavePromiseForFragmentRequestInFlight(t,e,I,E),q=null==x?void 0:x.promise,w=null!==(l=null===(f=D(P))||void 0===f?void 0:f.map((function(e){var r=e.liveStateID;return v.getStore().getLiveResolverPromise(r)})))&&void 0!==l?l:[];if(F.length||w.length||R(q)){var O,Q;v.__log({name:"suspense.fragment",data:E.data,fragment:e,isRelayHooks:!0,isPromiseCached:!1,isMissingData:E.isMissingData,pendingOperations:[].concat((0,o.default)(null!==(O=null==x?void 0:x.pendingOperations)&&void 0!==O?O:[]),(0,o.default)(null!==(Q=C)&&void 0!==Q?Q:[]))});var L=[];if(F.length>0&&(L=L.concat(F)),w.length>0&&(L=L.concat(w)),L.length>0)throw q&&L.push(q),Promise.all(L);if(q)throw q}return h.ENABLE_RELAY_OPERATION_TRACKER_SUSPENSE&&E.isMissingData&&this._cache.set(t,{kind:"done",result:E}),this._throwOrLogErrorsInSnapshot(P),v.__log({name:"fragmentresource.missing_data",data:E.data,fragment:e,isRelayHooks:!0,cached:!1}),A(t,P,m)},r._performClientEdgeQuery=function(e,r,t,n,a){var o=b(r,t),u=(0,i.default)((0,i.default)({},o),{},{id:a}),s=m(n,u,{}),l=v(this._environment,s),c=e.prepare(s,l);return{requestDescriptor:s.request,queryResult:c}},r._throwOrLogErrorsInSnapshot=function(e){var r=this;Array.isArray(e)?e.forEach((function(e){E(r._environment,e.missingRequiredFields,e.relayResolverErrors)})):E(this._environment,e.missingRequiredFields,e.relayResolverErrors)},r.readSpec=function(e,r,t){var n={};for(var i in e)n[i]=this.read(e[i],r[i],t,i);return n},r.subscribe=function(e,r){var t=this,n=this._environment,i=e.cacheKey,a=e.snapshot;if(!a)return{dispose:function(){}};var o=this.checkMissedUpdates(e),u=o[0],l=o[1];u&&r();var f=[];if(Array.isArray(a)?(Array.isArray(l)||c(!1),l.forEach((function(e,a){f.push(n.subscribe(e,(function(e){var o=n.getStore().getEpoch();t._updatePluralSnapshot(i,l,e,a,o),r()})))}))):((null==l||Array.isArray(l))&&c(!1),f.push(n.subscribe(l,(function(e){var a=n.getStore().getEpoch(),o=A(i,e,a);h.ENABLE_RELAY_OPERATION_TRACKER_SUSPENSE&&o.isMissingData?t._cache.set(i,{kind:"missing",result:o,snapshot:e}):t._cache.set(i,{kind:"done",result:A(i,e,a)}),r()})))),h.ENABLE_CLIENT_EDGES){var d,v,p=null!==(d=null===(v=this._clientEdgeQueryResultsCache)||void 0===v?void 0:v.get(i))&&void 0!==d?d:void 0;if(null!=p&&p.length){var m=s(this._environment);p.forEach((function(e){f.push(m.retain(e))}))}}return{dispose:function(){f.forEach((function(e){return e.dispose()})),t._cache.delete(i)}}},r.subscribeSpec=function(e,r){var t=this,n=Object.keys(e).map((function(n){return t.subscribe(e[n],r)}));return{dispose:function(){n.forEach((function(e){e.dispose()}))}}},r.checkMissedUpdates=function(e){var r,t=this._environment,n=e.snapshot;if(!n)return[!1,null];if(r=t.getStore().getEpoch(),e.storeEpoch===r)return[!1,e.snapshot];var a=e.cacheKey;if(Array.isArray(n)){var o=!1,u=[];if(n.forEach((function(e,r){var n=t.lookup(e.selector),a=e.data,s=n.data,l=P(a,s);l!==a&&(n=(0,i.default)((0,i.default)({},n),{},{data:l}),o=!0),u[r]=n})),o){var s=A(a,u,r);h.ENABLE_RELAY_OPERATION_TRACKER_SUSPENSE&&s.isMissingData?this._cache.set(a,{kind:"missing",result:s,snapshot:u}):this._cache.set(a,{kind:"done",result:s})}return[o,u]}var l=t.lookup(n.selector),c=n.data,f=l.data,d=P(c,f),v={data:d,isMissingData:l.isMissingData,missingClientEdges:l.missingClientEdges,missingLiveResolverFields:l.missingLiveResolverFields,seenRecords:l.seenRecords,selector:l.selector,missingRequiredFields:l.missingRequiredFields,relayResolverErrors:l.relayResolverErrors};if(d!==c){var p=A(a,v,r);h.ENABLE_RELAY_OPERATION_TRACKER_SUSPENSE&&p.isMissingData?this._cache.set(a,{kind:"missing",result:p,snapshot:v}):this._cache.set(a,{kind:"done",result:p})}return[d!==c,v]},r.checkMissedUpdatesSpec=function(e){var r=this;return Object.keys(e).some((function(t){return r.checkMissedUpdates(e[t])[0]}))},r._getAndSavePromiseForFragmentRequestInFlight=function(e,r,t,n){var i=this,a=y(this._environment,r,t);if(null==a)return null;var o=a.promise,u=a.pendingOperations,s=o.then((function(){i._cache.delete(e)})).catch((function(r){i._cache.delete(e)}));return s.displayName=o.displayName,this._cache.set(e,{kind:"pending",pendingOperations:u,promise:s,result:n}),{promise:s,pendingOperations:u}},r._updatePluralSnapshot=function(e,r,t,n,i){var a,u=this._cache.get(e);if(R(u))I(t.selector.node.name);else{var s=null==u||null===(a=u.result)||void 0===a?void 0:a.snapshot;if(!s||Array.isArray(s)){var l=s?(0,o.default)(s):(0,o.default)(r);l[n]=t;var c=A(e,l,i);h.ENABLE_RELAY_OPERATION_TRACKER_SUSPENSE&&c.isMissingData?this._cache.set(e,{kind:"missing",result:c,snapshot:l}):this._cache.set(e,{kind:"done",result:c})}else I(t.selector.node.name)}},e}();function I(e){c(!1)}function x(e){return new F(e)}var q=C?new WeakMap:new Map;e.exports={createFragmentResource:x,getFragmentResourceForEnvironment:function(e){var r=q.get(e);if(r)return r;var t=x(e);return q.set(e,t),t}}},914:(e,r,t)=>{t(446);var n=null;e.exports={inject:function(e){n=e},get:function(){return n}}},93:(e,r,t)=>{var n=t(56),i=function(){function e(e){this._capacity=e,this._capacity>0||n(!1),this._map=new Map}var r=e.prototype;return r.set=function(e,r){if(this._map.delete(e),this._map.set(e,r),this._map.size>this._capacity){var t=this._map.keys().next();t.done||this._map.delete(t.value)}},r.get=function(e){var r=this._map.get(e);return null!=r&&(this._map.delete(e),this._map.set(e,r)),r},r.has=function(e){return this._map.has(e)},r.delete=function(e){this._map.delete(e)},r.size=function(){return this._map.size},r.capacity=function(){return this._capacity-this._map.size},r.clear=function(){this._map.clear()},e}();e.exports={create:function(e){return new i(e)}}},187:(e,r,t)=>{var n=t(156).createContext({wrapPrepareQueryResource:function(e){return e()}});e.exports=n},269:(e,r,t)=>{var n=t(275).default,i=n(t(175)),a=n(t(311)),o=t(93),u=t(637),s=t(56),l=t(658).isPromise,c=(t(446),"store-or-network"),f="store-and-network",d="function"==typeof WeakMap;function v(e){return void 0!==e.request.node.params.metadata.live}function p(e,r,t,n,i){var a=null!=t?t:v(r)?f:c,o=null!=n?n:e.UNSTABLE_getDefaultRenderPolicy(),u="".concat(a,"-").concat(o,"-").concat(r.request.identifier);return null!=i?"".concat(u,"-").concat(i):u}function h(e,r){var t={__id:e.fragment.dataID,__fragments:(0,a.default)({},e.fragment.node.name,e.request.variables),__fragmentOwner:e.request};return{cacheIdentifier:r,fragmentNode:e.request.node.fragment,fragmentRef:t,operation:e}}var m=2e5;function g(e,r,t,n,i,a){var o=v(r),s=n,l=i,c=new u((function(e){var t=e.retain(r);return{dispose:function(){o&&null!=l&&l.unsubscribe(),t.dispose(),a(f)}}})),f={cacheIdentifier:e,id:m++,processedPayloadsCount:0,operationAvailability:t,getValue:function(){return s},setValue:function(e){s=e},setNetworkSubscription:function(e){o&&null!=l&&l.unsubscribe(),l=e},temporaryRetain:function(e){return c.temporaryRetain(e)},permanentRetain:function(e){return c.permanentRetain(e)},releaseTemporaryRetain:function(){c.releaseTemporaryRetain()}};return f}var y=function(){function e(e){var r=this;(0,a.default)(this,"_clearCacheEntry",(function(e){r._cache.delete(e.cacheIdentifier)})),this._environment=e,this._cache=o.create(1e3)}var r=e.prototype;return r.prepare=function(e,r,t,n,i,a,o){var u=p(this._environment,e,t,n,a);return this.prepareWithIdentifier(u,e,r,t,n,i,o)},r.prepareWithIdentifier=function(e,r,t,n,a,o,u){var s=this._environment,d=null!=n?n:v(r)?f:c,p=null!=a?a:s.UNSTABLE_getDefaultRenderPolicy(),h=this._cache.get(e),m=null,g=null!=h;null==h&&(h=this._fetchAndSaveQuery(e,r,t,d,p,u,(0,i.default)((0,i.default)({},o),{},{unsubscribe:function(e){null!=m&&m.dispose();var r=null==o?void 0:o.unsubscribe;r&&r(e)}}))),m=h.temporaryRetain(s);var y=h.getValue();if(l(y))throw s.__log({name:"suspense.query",fetchPolicy:d,isPromiseCached:g,operation:r,queryAvailability:h.operationAvailability,renderPolicy:p}),y;if(y instanceof Error)throw y;return y},r.retain=function(e,r){var t=this._environment,n=e.cacheIdentifier,i=e.operation,a=this._getOrCreateCacheEntry(n,i,null,e,null),o=a.permanentRetain(t);return t.__log({name:"queryresource.retain",profilerContext:r,resourceID:a.id}),{dispose:function(){o.dispose()}}},r.releaseTemporaryRetain=function(e){var r=this._cache.get(e.cacheIdentifier);null!=r&&r.releaseTemporaryRetain()},r.TESTS_ONLY__getCacheEntry=function(e,r,t,n){var i=p(this._environment,e,r,t,n);return this._cache.get(i)},r._getOrCreateCacheEntry=function(e,r,t,n,i){var a=this._cache.get(e);return null==a&&(a=g(e,r,t,n,i,this._clearCacheEntry),this._cache.set(e,a)),a},r._fetchAndSaveQuery=function(e,r,t,n,a,o,u){var l,c,f=this,d=this._environment,p=d.check(r),m=p.status,y="available"===m,_=y||"partial"===a&&"stale"!==m,b=function(){};switch(n){case"store-only":l=!1,c=!0;break;case"store-or-network":l=!y,c=_;break;case"store-and-network":l=!0,c=_;break;default:l=!0,c=!1}if(c){var E=h(r,e),R=g(e,r,p,E,null,this._clearCacheEntry);this._cache.set(e,R)}if(l){var P,C=h(r,e);t.subscribe({start:function(t){P=t;var n=f._cache.get(e);n&&n.setNetworkSubscription(P);var a=null==u?void 0:u.start;a&&a((0,i.default)((0,i.default)({},t),{},{unsubscribe:function(){v(r)&&t.unsubscribe()}}))},next:function(){var t=f._getOrCreateCacheEntry(e,r,p,C,P);t.processedPayloadsCount+=1,t.setValue(C),b();var n=null==u?void 0:u.next;null!=n&&n(d.lookup(r.fragment))},error:function(t){var n=f._getOrCreateCacheEntry(e,r,p,t,P);0===n.processedPayloadsCount&&n.setValue(t),b(),P=null,n.setNetworkSubscription(null);var i=null==u?void 0:u.error;i&&i(t)},complete:function(){b(),P=null;var r=f._cache.get(e);r&&r.setNetworkSubscription(null);var t=null==u?void 0:u.complete;t&&t()},unsubscribe:null==u?void 0:u.unsubscribe});var S=this._cache.get(e);if(!S){var k=new Promise((function(e){b=e}));k.displayName="Relay("+r.fragment.node.name+")",S=g(e,r,p,k,P,this._clearCacheEntry),this._cache.set(e,S)}}else{var D=null==u?void 0:u.complete;D&&D()}var A=this._cache.get(e);return null==A&&s(!1),d.__log({name:"queryresource.fetch",resourceID:A.id,operation:r,profilerContext:o,fetchPolicy:n,renderPolicy:a,queryAvailability:p,shouldFetch:l}),A},e}();function _(e){return new y(e)}var b=d?new WeakMap:new Map;e.exports={createQueryResource:_,getQueryResourceForEnvironment:function(e){var r=b.get(e);if(r)return r;var t=_(e);return b.set(e,t),t},getQueryCacheIdentifier:p}},696:(e,r,t)=>{var n=t(888),i=t(156),a=i.useMemo;e.exports=function(e){var r=e.children,t=e.environment,o=e.getEnvironmentForActor,u=a((function(){return{environment:t,getEnvironmentForActor:o}}),[t,o]);return i.createElement(n.Provider,{value:u},r)}},637:(e,r,t)=>{var n=(0,t(275).default)(t(311)),i=t(56),a=function(){function e(e){var r=this;(0,n.default)(this,"_retainCount",0),(0,n.default)(this,"_retainDisposable",null),(0,n.default)(this,"_releaseTemporaryRetain",null),this._retain=function(t){return r._retainCount++,1===r._retainCount&&(r._retainDisposable=e(t)),{dispose:function(){r._retainCount=Math.max(0,r._retainCount-1),0===r._retainCount&&(null==r._retainDisposable&&i(!1),r._retainDisposable.dispose(),r._retainDisposable=null)}}}}var r=e.prototype;return r.temporaryRetain=function(e){var r,t=this;if(e.isServer())return{dispose:function(){}};var n=this._retain(e),i=null,a=function(){clearTimeout(i),i=null,t._releaseTemporaryRetain=null,n.dispose()};return i=setTimeout(a,3e5),null===(r=this._releaseTemporaryRetain)||void 0===r||r.call(this),this._releaseTemporaryRetain=a,{dispose:function(){var e;null===(e=t._releaseTemporaryRetain)||void 0===e||e.call(t)}}},r.permanentRetain=function(e){var r=this._retain(e);return this.releaseTemporaryRetain(),r},r.releaseTemporaryRetain=function(){var e;null===(e=this._releaseTemporaryRetain)||void 0===e||e.call(this),this._releaseTemporaryRetain=null},r.getRetainCount=function(){return this._retainCount},e}();e.exports=a},828:(e,r,t)=>{var n=t(428).loadQuery;e.exports=function e(r,t,i){var a=null;null==t.root.getModuleIfRequired()&&(a=t.root.load());var o=t.getPreloadProps(i),u=o.queries,s=o.entryPoints,l=o.extraProps,c={},f={};null!=u&&Object.keys(u).forEach((function(e){var t=u[e],i=t.environmentProviderOptions,a=t.options,o=t.parameters,s=t.variables,l=r.getEnvironment(i);c[e]=n(l,o,s,{fetchPolicy:null==a?void 0:a.fetchPolicy,networkCacheConfig:null==a?void 0:a.networkCacheConfig,__nameForWarning:"loadEntryPoint"},i)})),null!=s&&Object.keys(s).forEach((function(t){var n=s[t];if(null!=n){var i=n.entryPoint,a=n.entryPointParams;f[t]=e(r,i,a)}}));var d=!1;return{dispose:function(){d||(null!=c&&Object.values(c).forEach((function(e){(0,e.dispose)()})),null!=f&&Object.values(f).forEach((function(e){(0,e.dispose)()})),d=!0)},entryPoints:f,extraProps:null!=l?l:null,getComponent:function(){var e,r=t.root.getModuleIfRequired();if(null==r)throw a=null!==(e=a)&&void 0!==e?e:t.root.load();return null!=r.default?r.default:r},get isDisposed(){return d},queries:c,rootModuleID:t.root.getModuleId()}}},428:(e,r,t)=>{var n=(0,t(275).default)(t(175)),i=t(56),a=t(156),o=t(658),u=o.__internal.fetchQueryDeduped,s=o.Observable,l=o.PreloadableQueryRegistry,c=o.RelayFeatureFlags,f=o.ReplaySubject,d=o.createOperationDescriptor,v=o.getRequest,p=o.getRequestIdentifier,h=(t(446),null),m=100001;e.exports={loadQuery:function(e,r,t,o,h){var g,y,_;null===(g=a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)||void 0===g||null===(y=g.ReactCurrentDispatcher)||void 0===y||y.current,m++;var b,E,R,P,C,S,k=null!==(_=null==o?void 0:o.fetchPolicy)&&void 0!==_?_:"store-or-network",D=(0,n.default)((0,n.default)({},null==o?void 0:o.networkCacheConfig),{},{force:!0}),A=!1,N=function(r,t){return A=!0,e.executeWithSource({operation:r,source:t})},F=new f,I=s.create((function(e){return F.subscribe(e)})),x=null,q=!1,w=function(r){var n;q=!0;var i=new f;if(!0===c.ENABLE_LOAD_QUERY_REQUEST_DEDUPING){var a="raw-network-request-"+p(r,t);n=u(e,a,(function(){return e.getNetwork().execute(r,t,D)}))}else n=e.getNetwork().execute(r,t,D);var o=n.subscribe({error:function(e){x=e,i.error(e)},next:function(e){i.next(e)},complete:function(){i.complete()}}).unsubscribe;return E=o,s.create((function(e){var r=i.subscribe(e);return function(){r.unsubscribe(),E()}}))},O=function(r,t){!0===c.ENABLE_LOAD_QUERY_REQUEST_DEDUPING&&(q=!0);var n=u(e,r.request.identifier,t).subscribe({error:function(e){F.error(e)},next:function(e){F.next(e)},complete:function(){F.complete()}});R=n.unsubscribe},Q=function(r){var n=d(r,t,D);b=e.retain(n),"store-only"!==k&&("store-or-network"!==k||"available"!==e.check(n).status)&&O(n,(function(){var e=w(r.params);return N(n,e)}))};if("PreloadableConcreteRequest"===r.kind){null===(S=(P=r.params).id)&&i(!1);var L=l.get(S);if(null!=L)Q(L);else{var T="store-only"===k?null:w(P),M=l.onLoad(S,(function(r){C();var n=d(r,t,D);b=e.retain(n),null!=T&&O(n,(function(){return N(n,T)}))}));C=M.dispose}}else{var U=v(r);S=null!=(P=U.params).cacheID?P.cacheID:P.id,Q(U)}var j=!1,B=!1,K=!1,V=function(){B||(b&&b.dispose(),B=!0)},W=function(){K||(A?R&&R():E&&E(),C&&C(),K=!0)};return{kind:"PreloadedQuery",environment:e,environmentProviderOptions:h,dispose:function(){j||(V(),W(),j=!0)},releaseQuery:V,cancelNetworkRequest:W,fetchKey:m,id:S,get isDisposed(){return j||B},get networkError(){return x},name:P.name,networkCacheConfig:D,fetchPolicy:k,source:q?I:void 0,variables:t}},useTrackLoadQueryInRender:function(){var e,r;null===h&&(h=null===(e=a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)||void 0===e||null===(r=e.ReactCurrentDispatcher)||void 0===r?void 0:r.current)}}},529:(e,r,t)=>{var n=(0,t(275).default)(t(765)),i=t(828),a=t(428).useTrackLoadQueryInRender,o=t(743),u=t(156),s=u.useCallback,l=u.useEffect,c=u.useRef,f=u.useState,d={kind:"NullEntryPointReference"};e.exports=function(e,r,t){var u,v,p,h;a();var m=null!==(u=null==t||null===(v=t.TEST_ONLY__initialEntryPointData)||void 0===v?void 0:v.entryPointReference)&&void 0!==u?u:d,g=null!==(p=null==t||null===(h=t.TEST_ONLY__initialEntryPointData)||void 0===h?void 0:h.entryPointParams)&&void 0!==p?p:null,y=o(),_=c(new Set([m])),b=f(m),E=b[0],R=b[1],P=f(g),C=P[0],S=P[1],k=s((function(){if(y.current){var e={kind:"NullEntryPointReference"};_.current.add(e),R(e)}}),[R,y]),D=s((function(t){if(y.current){var n=i(e,r,t);_.current.add(n),R(n),S(t)}}),[e,r,R,y]),A=c(!1);return l((function(){return function(){A.current=!0}}),[]),l((function(){if(!0===A.current)return A.current=!1,void("NullEntryPointReference"!==E.kind&&null!=C&&D(C));var e=_.current;if(y.current){var r,t=(0,n.default)(e);try{for(t.s();!(r=t.n()).done;){var i=r.value;if(i===E)break;e.delete(i),"NullEntryPointReference"!==i.kind&&i.dispose()}}catch(e){t.e(e)}finally{t.f()}}}),[E,C,D,y]),l((function(){return function(){var e,r=(0,n.default)(_.current);try{for(r.s();!(e=r.n()).done;){var t=e.value;"NullEntryPointReference"!==t.kind&&t.dispose()}}catch(e){r.e(e)}finally{r.f()}}}),[]),["NullEntryPointReference"===E.kind?null:E,D,k]}},863:(e,r,t)=>{var n=t(813),i=t(156),a=i.useCallback,o=i.useEffect;e.exports=function(){var e=n(null),r=n(!1),t=a((function(){null!=e.current&&(e.current.unsubscribe(),e.current=null),r.current=!1}),[]),i=a((function(t){e.current=t,r.current=!0}),[]),u=a((function(){e.current=null,r.current=!1}),[]);return o((function(){return t}),[t]),{isFetchingRef:r,startFetch:i,disposeFetch:t,completeFetch:u}}},242:(e,r,t)=>{var n=t(914),i=t(428).useTrackLoadQueryInRender,a=t(77),o=t(224),u=(t(156).useDebugValue,t(658).getFragment);e.exports=function(e,r){var t=n.get();return t?t.useFragment(e,r):function(e,r){i();var t=u(e);return o(t,"first argument of useFragment()"),a(t,r,"useFragment()").data}(e,r)}},77:(e,r,t)=>{var n=t(985).getFragmentResourceForEnvironment,i=t(750),a=t(813),o=t(156),u=o.useEffect,s=o.useState,l=t(658),c=l.RelayFeatureFlags,f=l.getFragmentIdentifier;t(446),e.exports=function(e,r,t){var o=i(),l=n(o),d=a(!1),v=s(0)[1],p=f(e,r),h=l.readWithIdentifier(e,r,p,t),m=a(!0);function g(){!1!==d.current&&!1!==m.current&&v((function(e){return e+1}))}return u((function(){d.current=!0;var e=l.subscribe(h,g);return function(){d.current=!1,e.dispose()}}),[o,p]),c.LOG_MISSING_RECORDS_IN_PROD&&null!=r&&(void 0===h.data||Array.isArray(h.data)&&h.data.length>0&&h.data.every((function(e){return void 0===e}))),{data:h.data,disableStoreUpdates:function(){m.current=!1},enableStoreUpdates:function(){m.current=!0,l.checkMissedUpdates(h)[0]&&g()}}}},743:(e,r,t)=>{var n=t(156),i=n.useEffect,a=n.useRef;e.exports=function(){var e=a(!0);return i((function(){return e.current=!0,function(){e.current=!1}}),[]),e}},233:(e,r,t)=>{var n=t(750),i=t(56),a=t(156),o=t(658),u=o.__internal.getObservableForActiveRequest,s=o.getSelector,l=a.useEffect,c=a.useState,f=a.useMemo;e.exports=function(e,r){var t=n(),a=f((function(){var n=s(e,r);return null==n?null:("SingularReaderSelector"!==n.kind&&i(!1),u(t,n.owner))}),[t,e,r]),o=c(null!=a),d=o[0],v=o[1];return l((function(){var e;if(v(null!=a),null!=a){var r=function(){v(!1)};e=a.subscribe({complete:r,error:r})}return function(){e&&e.unsubscribe()}}),[a]),d}},899:(e,r,t)=>{var n=t(428).useTrackLoadQueryInRender,i=t(734),a=t(61),o=t(750),u=t(658).__internal.fetchQuery;e.exports=function(e,r,t){n();var s=o(),l=a(e,r,t&&t.networkCacheConfig?t.networkCacheConfig:{force:!0});return i({componentDisplayName:"useLazyLoadQuery()",fetchKey:null==t?void 0:t.fetchKey,fetchObservable:u(s,l),fetchPolicy:null==t?void 0:t.fetchPolicy,query:l,renderPolicy:null==t?void 0:t.UNSTABLE_renderPolicy})}},734:(e,r,t)=>{var n=t(914),i=t(187),a=t(269),o=a.getQueryCacheIdentifier,u=a.getQueryResourceForEnvironment,s=t(863),l=t(77),c=t(750),f=t(156),d=f.useContext,v=f.useEffect,p=f.useState,h=f.useRef;e.exports=function(e){var r=e.query,t=e.componentDisplayName,a=e.fetchObservable,f=e.fetchPolicy,m=e.fetchKey,g=e.renderPolicy,y=c(),_=d(i),b=u(y),E=p(0),R=E[0],P=E[1],C=s(),S=C.startFetch,k=C.completeFetch,D="".concat(R,"-").concat(null!=m?m:""),A=o(y,r,f,g,D),N=_.wrapPrepareQueryResource((function(){return b.prepareWithIdentifier(A,r,a,f,g,{start:S,complete:k,error:k},_)})),F=h(!1);return v((function(){return function(){F.current=!0}}),[]),v((function(){if(!0===F.current)return F.current=!1,void P((function(e){return e+1}));var e=b.retain(N,_);return function(){e.dispose()}}),[y,A]),v((function(){b.releaseTemporaryRetain(N)})),function(e,r,t){var i=n.get();return i&&i.useFragment__internal?i.useFragment__internal(e,r,t):l(e,r,t).data}(N.fragmentNode,N.fragmentRef,t)}},601:(e,r,t)=>{var n=(0,t(275).default)(t(175)),i=t(863),a=t(743),o=t(233),u=t(750),s=t(56),l=t(156),c=l.useCallback,f=l.useEffect,d=l.useState,v=t(658),p=v.__internal.fetchQuery,h=v.ConnectionInterface,m=v.createOperationDescriptor,g=v.getPaginationVariables,y=v.getRefetchMetadata,_=v.getSelector,b=v.getValueAtPath;t(446),e.exports=function(e){var r=e.direction,t=e.fragmentNode,l=e.fragmentRef,v=e.fragmentIdentifier,E=e.fragmentData,R=e.connectionPathInFragmentData,P=e.paginationRequest,C=e.paginationMetadata,S=e.componentDisplayName,k=e.observer,D=e.onReset,A=u(),N=i(),F=N.isFetchingRef,I=N.startFetch,x=N.disposeFetch,q=N.completeFetch,w=y(t,S).identifierInfo,O=null!=(null==w?void 0:w.identifierField)&&null!=E&&"object"==typeof E?E[w.identifierField]:null,Q=a(),L=d(A),T=L[0],M=L[1],U=d(v),j=U[0],B=U[1],K=o(t,l);(A!==T||v!==j)&&(x(),D(),M(A),B(v));var V=function(e,r,t,n){var i,a,o=h.get(),u=o.EDGES,l=o.PAGE_INFO,c=o.HAS_NEXT_PAGE,f=o.HAS_PREV_PAGE,d=o.END_CURSOR,v=o.START_CURSOR,p=b(t,n);if(null==p)return{cursor:null,hasMore:!1};"object"!=typeof p&&s(!1);var m=p[u],g=p[l];if(null==m||null==g)return{cursor:null,hasMore:!1};Array.isArray(m)||s(!1),"object"!=typeof g&&s(!1);var y="forward"===e?null!==(i=g[d])&&void 0!==i?i:null:null!==(a=g[v])&&void 0!==a?a:null;return null!==y&&"string"!=typeof y&&s(!1),{cursor:y,hasMore:"forward"===e?null!=y&&!0===g[c]:null!=y&&!0===g[f]}}(r,0,E,R),W=V.cursor,H=V.hasMore;return f((function(){return function(){x()}}),[x]),[c((function(e,i){var a=null==i?void 0:i.onComplete;if(!0!==Q.current)return{dispose:function(){}};var o=_(t,l);if(!0===F.current||null==E||K)return a&&a(null),{dispose:function(){}};(null==o||"PluralReaderSelector"===o.kind)&&s(!1);var u=o.owner.variables,c=o.variables,f=null==i?void 0:i.UNSTABLE_extraVariables,d=(0,n.default)((0,n.default)({},u),c),v=g(r,e,W,d,(0,n.default)({},f),C);null!=w&&(v[w.identifierQueryVariableName]=O);var h=m(P,v,{force:!0});return p(A,h).subscribe((0,n.default)((0,n.default)({},k),{},{start:function(e){I(e),k.start&&k.start(e)},complete:function(){q(),k.complete&&k.complete(),a&&a(null)},error:function(e){q(),k.error&&k.error(e),a&&a(e)}})),{dispose:x}}),[A,O,r,W,I,x,q,F,K,E,t.name,l,S]),H,x]}},61:(e,r,t)=>{var n=t(925),i=t(156),a=t(658),o=a.createOperationDescriptor,u=a.getRequest,s=i.useMemo;e.exports=function(e,r,t){var i=n(r),a=n(t||{});return s((function(){return o(u(e),i,a)}),[e,i,a])}},925:(e,r,t)=>{var n=t(125),i=t(156).useState;e.exports=function(e){var r=i(e),t=r[0],a=r[1];return n(e,t)?t:(a(e),e)}},115:(e,r,t)=>{var n=(0,t(275).default)(t(175)),i=t(743),a=t(750),o=t(156),u=t(658).commitMutation,s=o.useState,l=o.useEffect,c=o.useRef,f=o.useCallback;e.exports=function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u,t=a(),o=i(),d=c(t),v=c(e),p=c(new Set),h=s(!1),m=h[0],g=h[1],y=f((function(r){d.current===t&&v.current===e&&(p.current.delete(r),o.current&&g(p.current.size>0))}),[t,o,e]);return l((function(){d.current===t&&v.current===e||(p.current=new Set,o.current&&g(!1),d.current=t,v.current=e)}),[t,o,e]),[f((function(i){o.current&&g(!0);var a=r(t,(0,n.default)((0,n.default)({},i),{},{mutation:e,onCompleted:function(e,r){var t;y(a),null===(t=i.onCompleted)||void 0===t||t.call(i,e,r)},onError:function(e){var r;y(a),null===(r=i.onError)||void 0===r||r.call(i,e)},onUnsubscribe:function(){var e;y(a),null===(e=i.onUnsubscribe)||void 0===e||e.call(i)},onNext:function(){var e;null===(e=i.onNext)||void 0===e||e.call(i)}}));return p.current.add(a),a}),[y,r,t,o,e]),m]}},951:(e,r,t)=>{var n=(0,t(275).default)(t(175)),i=t(914),a=t(601),o=t(691),u=t(224),s=t(156),l=s.useCallback,c=(s.useDebugValue,s.useState),f=t(658),d=f.getFragment,v=f.getFragmentIdentifier,p=f.getPaginationMetadata;function h(e){var r=c(!1),t=r[0],i=r[1],o={start:function(){return i(!0)},complete:function(){return i(!1)},error:function(){return i(!1)}},u=a((0,n.default)((0,n.default)({},e),{},{observer:o,onReset:function(){return i(!1)}}));return[u[0],u[1],t,u[2]]}e.exports=function(e,r){var t=i.get();return t?t.usePaginationFragment(e,r):function(e,r){var t=d(e);u(t,"first argument of usePaginationFragment()");var i="usePaginationFragment()",a=p(t,i),s=a.connectionPathInFragmentData,c=a.paginationRequest,f=a.paginationMetadata,m=o(t,r,i),g=m.fragmentData,y=m.fragmentRef,_=m.refetch,b=v(t,y),E=h({componentDisplayName:i,connectionPathInFragmentData:s,direction:"backward",fragmentData:g,fragmentIdentifier:b,fragmentNode:t,fragmentRef:y,paginationMetadata:f,paginationRequest:c}),R=E[0],P=E[1],C=E[2],S=E[3],k=h({componentDisplayName:i,connectionPathInFragmentData:s,direction:"forward",fragmentData:g,fragmentIdentifier:b,fragmentNode:t,fragmentRef:y,paginationMetadata:f,paginationRequest:c}),D=k[0],A=k[1],N=k[2],F=k[3];return{data:g,loadNext:D,loadPrevious:R,hasNext:A,hasPrevious:P,isLoadingNext:N,isLoadingPrevious:C,refetch:l((function(e,r){return F(),S(),_(e,(0,n.default)((0,n.default)({},r),{},{__environment:void 0}))}),[F,S,_])}}(e,r)}},617:(e,r,t)=>{var n=t(428).useTrackLoadQueryInRender,i=t(734),a=t(61),o=t(750),u=t(56),s=(t(156).useDebugValue,t(658).__internal),l=s.fetchQueryDeduped,c=s.fetchQuery;t(446),e.exports=function(e,r,t){n();var s,f=o(),d=r.fetchKey,v=r.fetchPolicy,p=r.source,h=r.variables,m=r.networkCacheConfig,g=a(e,h,m);if("PreloadedQuery_DEPRECATED"===r.kind)g.request.node.params.name!==r.name&&u(!1),s={componentDisplayName:"usePreloadedQuery()",fetchKey:d,fetchObservable:l(f,g.request.identifier,(function(){return f===r.environment&&null!=p?f.executeWithSource({operation:g,source:p}):f.execute({operation:g})})),fetchPolicy:v,query:g,renderPolicy:null==t?void 0:t.UNSTABLE_renderPolicy};else{var y=c(f,g);s={componentDisplayName:"usePreloadedQuery()",fetchObservable:null!=p&&f===r.environment?p.ifEmpty(y):(r.environment,y),fetchKey:d,fetchPolicy:v,query:g,renderPolicy:null==t?void 0:t.UNSTABLE_renderPolicy}}return i(s)}},876:(e,r,t)=>{var n=(0,t(275).default)(t(765)),i=t(428),a=i.loadQuery,o=i.useTrackLoadQueryInRender,u=t(743),s=t(750),l=t(156),c=l.useCallback,f=l.useEffect,d=l.useRef,v=l.useState,p=t(658).getRequest,h={kind:"NullQueryReference"};function m(e){return"PreloadableConcreteRequest"===e.kind?void 0!==e.params.metadata.live:void 0!==p(e).params.metadata.live}e.exports=function(e,r){var t=null!=r?r:h,i=s();o();var l=u(),p=d(new Set([t])),g=v((function(){return t})),y=g[0],_=g[1],b=v((function(){return t})),E=b[0],R=b[1];t!==E&&(p.current.add(t),R(t),_(t));var P=c((function(){l.current&&(p.current.add(h),_(h))}),[l]),C=c((function(r,t){var n=null!=t&&t.hasOwnProperty("__environment")?{fetchPolicy:t.fetchPolicy,networkCacheConfig:t.networkCacheConfig,__nameForWarning:t.__nameForWarning}:t;if(l.current){var o,u=a(null!==(o=null==t?void 0:t.__environment)&&void 0!==o?o:i,e,r,n);p.current.add(u),_(u)}}),[i,e,_,l]),S=d(!1);return f((function(){return function(){S.current=!0}}),[]),f((function(){if(!0===S.current)return S.current=!1,void("NullQueryReference"!==y.kind&&C(y.variables,{fetchPolicy:y.fetchPolicy,networkCacheConfig:y.networkCacheConfig}));var r=p.current;if(l.current){var t,i=(0,n.default)(r);try{for(i.s();!(t=i.n()).done;){var a=t.value;if(a===y)break;r.delete(a),"NullQueryReference"!==a.kind&&(m(e)?a.dispose&&a.dispose():a.releaseQuery&&a.releaseQuery())}}catch(e){i.e(e)}finally{i.f()}}}),[y,l,C,e]),f((function(){return function(){var r,t=(0,n.default)(p.current);try{for(t.s();!(r=t.n()).done;){var i=r.value;"NullQueryReference"!==i.kind&&(m(e)?i.dispose&&i.dispose():i.releaseQuery&&i.releaseQuery())}}catch(e){t.e(e)}finally{t.f()}}}),[e]),["NullQueryReference"===y.kind?null:y,C,P]}},874:(e,r,t)=>{var n=t(914),i=t(691),a=t(224),o=(t(156).useDebugValue,t(658).getFragment);e.exports=function(e,r){var t=n.get();return t?t.useRefetchableFragment(e,r):function(e,r){var t=o(e);a(t,"first argument of useRefetchableFragment()");var n=i(t,r,"useRefetchableFragment()");return[n.fragmentData,n.refetch]}(e,r)}},691:(e,r,t)=>{var n=(0,t(275).default)(t(175)),i=t(985).getFragmentResourceForEnvironment,a=t(187),o=t(269).getQueryResourceForEnvironment,u=t(77),s=t(743),l=t(876),c=t(750),f=t(56),d=t(156),v=d.useCallback,p=d.useContext,h=d.useReducer,m=t(658),g=m.__internal.fetchQuery,y=m.createOperationDescriptor,_=m.getFragmentIdentifier,b=m.getRefetchMetadata,E=m.getSelector,R=m.getValueAtPath;function P(e,r){switch(r.type){case"refetch":var t;return(0,n.default)((0,n.default)({},e),{},{fetchPolicy:r.fetchPolicy,mirroredEnvironment:null!==(t=r.refetchEnvironment)&&void 0!==t?t:e.mirroredEnvironment,onComplete:r.onComplete,refetchEnvironment:r.refetchEnvironment,refetchQuery:r.refetchQuery,renderPolicy:r.renderPolicy});case"reset":return{fetchPolicy:void 0,mirroredEnvironment:r.environment,mirroredFragmentIdentifier:r.fragmentIdentifier,onComplete:void 0,refetchQuery:null,renderPolicy:void 0};default:throw r.type,new Error("useRefetchableFragmentNode: Unexpected action type")}}t(446),e.exports=function(e,r,t){var d=c(),m=b(e,t),C=m.refetchableRequest,S=m.fragmentRefPathInResponse,k=_(e,r),D=h(P,{fetchPolicy:void 0,mirroredEnvironment:d,mirroredFragmentIdentifier:k,onComplete:void 0,refetchEnvironment:null,refetchQuery:null,renderPolicy:void 0}),A=D[0],N=D[1],F=A.fetchPolicy,I=A.mirroredEnvironment,x=A.mirroredFragmentIdentifier,q=A.onComplete,w=A.refetchEnvironment,O=A.refetchQuery,Q=A.renderPolicy,L=null!=w?w:d,T=o(L),M=i(L),U=p(a),j=L!==I||k!==x,B=l(C),K=B[0],V=B[1],W=B[2],H=r,Y=b(e,t).identifierInfo;if(j)N({type:"reset",environment:L,fragmentIdentifier:k}),W();else if(null!=O&&null!=K){var G=function(e){q&&q(null!=e?e:null)},z=null!=K.source?K.source:g(L,O),X=U.wrapPrepareQueryResource((function(){return T.prepare(O,z,F,Q,{error:G,complete:function(){G()}},K.fetchKey,U)})),J=M.read(X.fragmentNode,X.fragmentRef,t).data;null==J&&f(!1),H=R(J,S)}var Z=u(e,H,t),$=Z.data,ee=Z.disableStoreUpdates,re=Z.enableStoreUpdates,te=function(e,r,t,i,a,o,u,l,c,f,d){var p=s(),h=null!=(null==l?void 0:l.identifierField)&&null!=i&&"object"==typeof i?i[l.identifierField]:null;return v((function(e,i){if(!0!==p.current)return{dispose:function(){}};var a,u,s=null==i?void 0:i.__environment,v=null==i?void 0:i.fetchPolicy,m=null==i?void 0:i.UNSTABLE_renderPolicy,g=null==i?void 0:i.onComplete,_=E(o,f);if(null==_)a={},u={};else if("PluralReaderSelector"===_.kind){var b,R,P,C;a=null!==(b=null===(R=_.selectors[0])||void 0===R?void 0:R.owner.variables)&&void 0!==b?b:{},u=null!==(P=null===(C=_.selectors[0])||void 0===C?void 0:C.variables)&&void 0!==P?P:{}}else a=_.owner.variables,u=_.variables;var S=(0,n.default)((0,n.default)((0,n.default)({},a),u),e);null==l||e.hasOwnProperty(l.identifierQueryVariableName)||(S[l.identifierQueryVariableName]=h);var k=y(d,S,{force:!0});return c(k.request.variables,{fetchPolicy:v,__environment:s,__nameForWarning:"refetch"}),r({type:"refetch",fetchPolicy:v,onComplete:g,refetchEnvironment:s,refetchQuery:k,renderPolicy:m}),{dispose:t}}),[a,r,t,h,c])}(0,N,W,$,k,e,0,Y,V,r,C);return{fragmentData:$,fragmentRef:H,refetch:te,disableStoreUpdates:ee,enableStoreUpdates:re}}},750:(e,r,t)=>{var n=t(888),i=t(56),a=t(156).useContext;e.exports=function(){var e=a(n);return null==e&&i(!1),e.environment}},224:(e,r,t)=>{t(813),t(446),e.exports=function(e,r){}},50:(e,r,t)=>{var n=t(750),i=t(156),a=i.useEffect,o=i.useRef;e.exports=function(e,r){var t=n(),i=o(null),u=Array.from(e).sort().join("");return a((function(){var n=t.getStore(),a=n.lookupInvalidationState(e),o=n.subscribeToInvalidationState(a,r);return i.current=o,function(){return o.dispose()}}),[u,r,t]),{dispose:function(){null!=i.current&&i.current.dispose()}}}},746:(e,r,t)=>{var n=t(750),i=t(156).useEffect,a=t(658).requestSubscription;e.exports=function(e,r){var t=null!=r?r:a,o=n();i((function(){return t(o,e).dispose}),[o,e,t])}},813:(e,r,t)=>{var n=t(156).useMemo;e.exports=function(e){return n((function(){return{current:e}}),[])}},765:r=>{r.exports=e},311:e=>{e.exports=r},275:e=>{e.exports=t},175:e=>{e.exports=n},642:e=>{e.exports=i},125:e=>{e.exports=a},446:e=>{e.exports=o},56:e=>{e.exports=u},156:e=>{e.exports=s},658:e=>{e.exports=l}},f={};return function e(r){var t=f[r];if(void 0!==t)return t.exports;var n=f[r]={exports:{}};return c[r](n,n.exports,e),n.exports}(651)})()));
|
package/react-relay-legacy.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
1
|
/**
|
2
|
-
* Relay v16.
|
2
|
+
* Relay v16.1.0
|
3
3
|
*/
|
4
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("relay-runtime"),require("react"),require("@babel/runtime/helpers/interopRequireDefault"),require("@babel/runtime/helpers/objectSpread2"),require("@babel/runtime/helpers/defineProperty"),require("invariant"),require("fbjs/lib/areEqual"),require("@babel/runtime/helpers/assertThisInitialized"),require("@babel/runtime/helpers/inheritsLoose"),require("@babel/runtime/helpers/objectWithoutPropertiesLoose"),require("@babel/runtime/helpers/extends"),require("fbjs/lib/warning")):"function"==typeof define&&define.amd?define(["relay-runtime","react","@babel/runtime/helpers/interopRequireDefault","@babel/runtime/helpers/objectSpread2","@babel/runtime/helpers/defineProperty","invariant","fbjs/lib/areEqual","@babel/runtime/helpers/assertThisInitialized","@babel/runtime/helpers/inheritsLoose","@babel/runtime/helpers/objectWithoutPropertiesLoose","@babel/runtime/helpers/extends","fbjs/lib/warning"],t):"object"==typeof exports?exports.ReactRelayLegacy=t(require("relay-runtime"),require("react"),require("@babel/runtime/helpers/interopRequireDefault"),require("@babel/runtime/helpers/objectSpread2"),require("@babel/runtime/helpers/defineProperty"),require("invariant"),require("fbjs/lib/areEqual"),require("@babel/runtime/helpers/assertThisInitialized"),require("@babel/runtime/helpers/inheritsLoose"),require("@babel/runtime/helpers/objectWithoutPropertiesLoose"),require("@babel/runtime/helpers/extends"),require("fbjs/lib/warning")):e.ReactRelayLegacy=t(e["relay-runtime"],e.react,e["@babel/runtime/helpers/interopRequireDefault"],e["@babel/runtime/helpers/objectSpread2"],e["@babel/runtime/helpers/defineProperty"],e.invariant,e["fbjs/lib/areEqual"],e["@babel/runtime/helpers/assertThisInitialized"],e["@babel/runtime/helpers/inheritsLoose"],e["@babel/runtime/helpers/objectWithoutPropertiesLoose"],e["@babel/runtime/helpers/extends"],e["fbjs/lib/warning"])}(window,(function(e,t,r,n,o,a,s,i,u,l,c,h){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=19)}([function(t,r){t.exports=e},function(e,r){e.exports=t},function(e,t){e.exports=r},function(e,t,r){"use strict";var n=r(1),o=r(0).__internal.createRelayContext;e.exports=o(n)},function(e,t){e.exports=n},function(e,t){e.exports=o},function(e,t){e.exports=a},function(e,t){e.exports=s},function(e,t){e.exports=i},function(e,t){e.exports=u},function(e,t,r){"use strict";function n(e){return e.displayName||e.name||"Component"}e.exports={getComponentName:n,getContainerName:function(e){return"Relay("+n(e)+")"}}},function(e,t){e.exports=l},function(e,t,r){"use strict";var n=(0,r(2).default)(r(13)),o=r(21),a=r(10),s=a.getComponentName,i=a.getContainerName,u=r(3),l=r(14),c=r(6),h=r(1),f=r(0).getFragment,p=h.useContext;e.exports=function(e,t,r){var a=i(e);o(s(e),t);var d={};for(var v in t)d[v]=f(t[v]);var _=r(e,d);function y(e,t){var r,o=p(u);null==o&&c(!1,"`%s` tried to render a context that was not valid this means that `%s` was rendered outside of a query renderer.",a,a);var s=p(l);return h.createElement(_,(0,n.default)({},e,{__relayContext:o,__rootIsQueryRenderer:null!==(r=null==s?void 0:s.rootIsQueryRenderer)&&void 0!==r&&r,componentRef:e.componentRef||t}))}_.displayName=a,y.displayName=a;var b=h.forwardRef(y);return b.__ComponentClass=e,b.displayName=a,b}},function(e,t){e.exports=c},function(e,t,r){"use strict";var n=r(1);e.exports=n.createContext({rootIsQueryRenderer:!1})},function(e,t,r){"use strict";var n=r(22),o=r(6);function a(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)&&n(e.environment)}e.exports={assertRelayContext:function(e){return a(e)||o(!1,"RelayContext: Expected `context.relay` to be an object conforming to the `RelayContext` interface, got `%s`.",e),e},isRelayContext:a}},function(e,t,r){"use strict";var n=(0,r(2).default)(r(5)),o=r(6),a=r(0),s=a.__internal.fetchQuery,i=a.createOperationDescriptor,u=a.isRelayModernEnvironment,l=function(){function e(e){(0,n.default)(this,"_selectionReferences",[]),(0,n.default)(this,"_didFetchFinish",!1),null!=e&&(this._cacheSelectionReference=e.cacheSelectionReference,this._selectionReferences=e.selectionReferences)}var t=e.prototype;return t.getSelectionReferences=function(){return{cacheSelectionReference:this._cacheSelectionReference,selectionReferences:this._selectionReferences}},t.lookupInStore=function(e,t,r){return"store-and-network"!==r&&"store-or-network"!==r||"available"!==e.check(t).status?null:(this._retainCachedOperation(e,t),e.lookup(t.fragment))},t.getFetchResult=function(){return this._didFetchFinish?null!=this._error?{error:this._error}:null!=this._snapshot?{snapshot:this._snapshot}:void 0:null},t.execute=function(e){var t=this,r=e.environment,n=e.operation,o=e.preservePreviousReferences,a=void 0!==o&&o,i=r.retain(n),l=function(){t._selectionReferences=t._selectionReferences.concat(i)},c=function(){a||t.disposeSelectionReferences(),t._selectionReferences=t._selectionReferences.concat(i)},h=function(){t._selectionReferences=t._selectionReferences.concat(i)};return u(r)?s(r,n).do({error:l,complete:c,unsubscribe:h}):r.execute({operation:n}).do({error:l,complete:c,unsubscribe:h})},t.setOnDataChange=function(e){this._fetchOptions||o(!1,"ReactRelayQueryFetcher: `setOnDataChange` should have been called after having called `fetch`"),"function"==typeof e&&(this._fetchOptions.onDataChangeCallbacks=this._fetchOptions.onDataChangeCallbacks||[],this._fetchOptions.onDataChangeCallbacks.push(e),this._didFetchFinish&&(null!=this._error?e({error:this._error}):null!=this._snapshot&&e({snapshot:this._snapshot})))},t.fetch=function(e,t){var r,n=this,o=e.environment,a=e.operation,s=e.onDataChange,u=!1;this.disposeRequest();var l=this._fetchOptions&&this._fetchOptions.onDataChangeCallbacks;this._fetchOptions={environment:o,onDataChangeCallbacks:l||[],operation:a},s&&-1===this._fetchOptions.onDataChangeCallbacks.indexOf(s)&&this._fetchOptions.onDataChangeCallbacks.push(s);var c=t?i(a.request.node,a.request.variables,t):a,h=this.execute({environment:o,operation:c}).finally((function(){n._pendingRequest=null})).subscribe({next:function(){n._didFetchFinish=!0,n._error=null,n._onQueryDataAvailable({notifyFirstResult:u})},error:function(e){n._didFetchFinish=!0,n._error=e,n._snapshot=null;var t=n._fetchOptions&&n._fetchOptions.onDataChangeCallbacks;u?t&&t.forEach((function(t){t({error:e})})):r=e}});if(this._pendingRequest={dispose:function(){h.unsubscribe()}},u=!0,r)throw r;return this._snapshot},t.retry=function(e){return this._fetchOptions||o(!1,"ReactRelayQueryFetcher: `retry` should be called after having called `fetch`"),this.fetch({environment:this._fetchOptions.environment,operation:this._fetchOptions.operation,onDataChange:null},e)},t.dispose=function(){this.disposeRequest(),this.disposeSelectionReferences()},t.disposeRequest=function(){this._error=null,this._snapshot=null,this._pendingRequest&&this._pendingRequest.dispose(),this._rootSubscription&&(this._rootSubscription.dispose(),this._rootSubscription=null)},t._retainCachedOperation=function(e,t){this._disposeCacheSelectionReference(),this._cacheSelectionReference=e.retain(t)},t._disposeCacheSelectionReference=function(){this._cacheSelectionReference&&this._cacheSelectionReference.dispose(),this._cacheSelectionReference=null},t.disposeSelectionReferences=function(){this._disposeCacheSelectionReference(),this._selectionReferences.forEach((function(e){return e.dispose()})),this._selectionReferences=[]},t._onQueryDataAvailable=function(e){var t=this,r=e.notifyFirstResult;this._fetchOptions||o(!1,"ReactRelayQueryFetcher: `_onQueryDataAvailable` should have been called after having called `fetch`");var n=this._fetchOptions,a=n.environment,s=n.onDataChangeCallbacks,i=n.operation;if(!this._snapshot&&(this._snapshot=a.lookup(i.fragment),this._rootSubscription=a.subscribe(this._snapshot,(function(e){if(null!=t._fetchOptions){var r=t._fetchOptions.onDataChangeCallbacks;Array.isArray(r)&&r.forEach((function(t){return t({snapshot:e})}))}})),this._snapshot&&r&&Array.isArray(s))){var u=this._snapshot;s.forEach((function(e){return e({snapshot:u})}))}},e}();e.exports=l},function(e,t,r){"use strict";var n=(0,r(2).default)(r(4)),o=r(0).getSelector;e.exports=function(e,t){var r={};return Object.keys(e).forEach((function(a){var s,i,u,l=e[a],c=t[a],h=o(l,c),f=null!=h&&"PluralReaderSelector"===h.kind?null!==(s=null===(i=h.selectors[0])||void 0===i?void 0:i.owner.variables)&&void 0!==s?s:{}:null!==(u=null==h?void 0:h.owner.variables)&&void 0!==u?u:{};r=(0,n.default)((0,n.default)({},r),f)})),r}},function(e,t){e.exports=h},function(e,t,r){"use strict";var n=r(3),o=r(20),a=r(23),s=r(24),i=r(25),u=r(26),l=r(0);e.exports={ConnectionHandler:l.ConnectionHandler,QueryRenderer:i,LocalQueryRenderer:a,MutationTypes:l.MutationTypes,RangeOperations:l.RangeOperations,ReactRelayContext:n,applyOptimisticMutation:l.applyOptimisticMutation,commitLocalUpdate:l.commitLocalUpdate,commitMutation:l.commitMutation,createFragmentContainer:o.createContainer,createPaginationContainer:s.createContainer,createRefetchContainer:u.createContainer,fetchQuery_DEPRECATED:l.fetchQuery_DEPRECATED,graphql:l.graphql,readInlineData:l.readInlineData,requestSubscription:l.requestSubscription}},function(e,t,r){"use strict";var n=r(2).default,o=n(r(4)),a=n(r(11)),s=n(r(8)),i=n(r(9)),u=n(r(5)),l=["componentRef","__relayContext","__rootIsQueryRenderer"],c=r(12),h=r(10).getContainerName,f=r(15).assertRelayContext,p=r(7),d=r(1),v=r(0),_=v.createFragmentSpecResolver,y=v.getDataIDsFromObject,b=v.isScalarAndEqual;function m(e,t){var r,n=h(e);return r=function(r){function c(e){var o,a;a=r.call(this,e)||this,(0,u.default)((0,s.default)(a),"_handleFragmentDataUpdate",(function(){var e=a.state.resolver;a.setState((function(t){return e===t.resolver?{data:t.resolver.resolve(),relayProp:C(t.relayProp.environment)}:null}))}));var i=f(e.__relayContext),l=null!==(o=e.__rootIsQueryRenderer)&&void 0!==o&&o,c=_(i,n,t,e,l);return a.state={data:c.resolve(),prevProps:e,prevPropsContext:i,relayProp:C(i.environment),resolver:c},a}(0,i.default)(c,r),c.getDerivedStateFromProps=function(e,r){var o,a=r.prevProps,s=f(e.__relayContext),i=null!==(o=e.__rootIsQueryRenderer)&&void 0!==o&&o,u=y(t,a),l=y(t,e),c=r.resolver;if(r.prevPropsContext.environment!==s.environment||!p(u,l))return{data:(c=_(s,n,t,e,i)).resolve(),prevPropsContext:s,prevProps:e,relayProp:C(s.environment),resolver:c};c.setProps(e);var h=c.resolve();return h!==r.data?{data:h,prevProps:e,prevPropsContext:s,relayProp:C(s.environment)}:null};var h=c.prototype;return h.componentDidMount=function(){this._subscribeToNewResolverAndRerenderIfStoreHasChanged()},h.componentDidUpdate=function(e,t){this.state.resolver!==t.resolver?(t.resolver.dispose(),this._subscribeToNewResolverAndRerenderIfStoreHasChanged()):this._rerenderIfStoreHasChanged()},h.componentWillUnmount=function(){this.state.resolver.dispose()},h.shouldComponentUpdate=function(e,r){if(r.data!==this.state.data)return!0;for(var n=Object.keys(e),o=0;o<n.length;o++){var a=n[o];if("__relayContext"===a){if(r.prevPropsContext.environment!==this.state.prevPropsContext.environment)return!0}else if(!t.hasOwnProperty(a)&&!b(e[a],this.props[a]))return!0}return!1},h._rerenderIfStoreHasChanged=function(){var e=this.state,t=e.data,r=e.resolver.resolve();t!==r&&this.setState({data:r})},h._subscribeToNewResolverAndRerenderIfStoreHasChanged=function(){var e=this.state,t=e.data,r=e.resolver,n=r.resolve();r.setCallback(this.props,this._handleFragmentDataUpdate),t!==n&&this.setState({data:n})},h.render=function(){var t=this.props,r=t.componentRef,n=(t.__relayContext,t.__rootIsQueryRenderer,(0,a.default)(t,l));return d.createElement(e,(0,o.default)((0,o.default)((0,o.default)({},n),this.state.data),{},{ref:r,relay:this.state.relayProp}))},c}(d.Component),(0,u.default)(r,"displayName",n),r}function C(e){return{environment:e}}e.exports={createContainer:function(e,t){return c(e,t,m)}}},function(e,t,r){"use strict";var n=r(6);e.exports=function(e,t){for(var r in t&&"object"==typeof t||n(!1,"Could not create Relay Container for `%s`. Expected a set of GraphQL fragments, got `%s` instead.",e,t),t)if(t.hasOwnProperty(r)){var o=t[r];(!o||"object"!=typeof o&&"function"!=typeof o)&&n(!1,"Could not create Relay Container for `%s`. The value of fragment `%s` was expected to be a fragment, got `%s` instead.",e,r,o)}}},function(e,t,r){"use strict";e.exports=function(e){return"object"==typeof e&&null!==e&&"function"==typeof e.check&&"function"==typeof e.lookup&&"function"==typeof e.retain&&"function"==typeof e.execute&&"function"==typeof e.subscribe}},function(e,t,r){"use strict";var n=r(3),o=r(14),a=r(7),s=r(1),i=r(0),u=i.createOperationDescriptor,l=i.deepFreeze,c=i.getRequest,h=s.useLayoutEffect,f=s.useState,p=s.useRef,d=s.useMemo,v={rootIsQueryRenderer:!0};e.exports=function(e){var t,r,i=e.environment,_=e.query,y=e.variables,b=e.render,m=(t=y,r=s.useRef(t),a(r.current,t)||(l(t),r.current=t),r.current),C=d((function(){var e=c(_);return u(e,m)}),[_,m]),R=d((function(){return{environment:i}}),[i]),g=p(null),x=f(null)[1],P=p(null),S=d((function(){i.check(C);var e=i.lookup(C.fragment);g.current=e.data;var t=i.retain(C),r=i.subscribe(e,(function(e){g.current=e.data,x(g.current)})),n=!1;return P.current&&P.current(),P.current=function(){n||(n=!0,P.current=null,t.dispose(),r.dispose())},e}),[i,C]);return h((function(){var e=P.current;return function(){e&&e()}}),[S]),s.createElement(n.Provider,{value:R},s.createElement(o.Provider,{value:v},b({props:g.current})))}},function(e,t,r){"use strict";var n=r(2).default,o=n(r(13)),a=n(r(11)),s=n(r(8)),i=n(r(9)),u=n(r(5)),l=n(r(4)),c=["componentRef"],h=["componentRef","__relayContext","__rootIsQueryRenderer"],f=["componentRef","__relayContext","__rootIsQueryRenderer"],p=r(12),d=r(17),v=r(10),_=v.getComponentName,y=v.getContainerName,b=r(3),m=r(16),C=r(15).assertRelayContext,R=r(7),g=r(6),x=r(1),P=r(0),S=P.ConnectionInterface,q=P.Observable,F=P.RelayFeatureFlags,O=P.createFragmentSpecResolver,D=P.createOperationDescriptor,E=P.getDataIDsFromObject,I=P.getRequest,A=P.getVariablesFromObject,j=P.isScalarAndEqual,N=r(18);function w(e){return"function"==typeof e?{error:e,complete:e,unsubscribe:function(t){"function"==typeof e&&e()}}:e||{}}function U(e,t,r){var n,p=_(e),v=y(e),P=function(e){var t=null,r=!1;for(var n in e){var o=e[n],a=o.metadata&&o.metadata.connection;void 0!==o.metadata&&(r=!0),a&&(1!==a.length&&g(!1,"ReactRelayPaginationContainer: Only a single @connection is supported, `%s` has %s.",n,a.length),t&&g(!1,"ReactRelayPaginationContainer: Only a single fragment with @connection is supported."),t=(0,l.default)((0,l.default)({},a[0]),{},{fragmentName:n}))}return r&&null===t&&g(!1,"ReactRelayPaginationContainer: A @connection directive must be present."),t||{}}(t),U=r.getConnectionFromProps||function(e){var t=e.path;return t||g(!1,"ReactRelayPaginationContainer: Unable to synthesize a getConnectionFromProps function."),function(r){for(var n=r[e.fragmentName],o=0;o<t.length;o++){if(!n||"object"!=typeof n)return null;n=n[t[o]]}return n}}(P),k=r.direction||P.direction;k||g(!1,"ReactRelayPaginationContainer: Unable to infer direction of the connection, possibly because both first and last are provided.");var Q=r.getFragmentVariables||function(e){var t=e.count;return t||g(!1,"ReactRelayPaginationContainer: Unable to synthesize a getFragmentVariables function."),function(e,r){return(0,l.default)((0,l.default)({},e),{},(0,u.default)({},t,r))}}(P);return n=function(n){function _(e){var r,o;o=n.call(this,e)||this,(0,u.default)((0,s.default)(o),"_handleFragmentDataUpdate",(function(){o.setState({data:o._resolver.resolve()})})),(0,u.default)((0,s.default)(o),"_hasMore",(function(){var e=o._getConnectionData();return!!(e&&e.hasMore&&e.cursor)})),(0,u.default)((0,s.default)(o),"_isLoading",(function(){return!!o._refetchSubscription})),(0,u.default)((0,s.default)(o),"_refetchConnection",(function(e,t,r){if(!o._canFetchPage("refetchConnection"))return{dispose:function(){}};o._refetchVariables=r;var n={count:e,cursor:null,totalCount:e};return{dispose:o._fetchPage(n,w(t),{force:!0}).unsubscribe}})),(0,u.default)((0,s.default)(o),"_loadMore",(function(e,t,r){if(!o._canFetchPage("loadMore"))return{dispose:function(){}};var n=w(t),a=o._getConnectionData();if(!a)return q.create((function(e){return e.complete()})).subscribe(n),null;var s=a.edgeCount+e;if(r&&r.force)return o._refetchConnection(s,t);var i=S.get(),u=i.END_CURSOR,l=i.START_CURSOR,c=a.cursor;N(null!=c&&""!==c,"ReactRelayPaginationContainer: Cannot `loadMore` without valid `%s` (got `%s`)","forward"===k?u:l,c);var h={count:e,cursor:c,totalCount:s};return{dispose:o._fetchPage(h,n,r).unsubscribe}}));var a=C(e.__relayContext),i=null!==(r=e.__rootIsQueryRenderer)&&void 0!==r&&r;return o._isARequestInFlight=!1,o._refetchSubscription=null,o._refetchVariables=null,!0===F.ENABLE_CONTAINERS_SUBSCRIBE_ON_COMMIT?o._resolver=O(a,v,t,e,i):o._resolver=O(a,v,t,e,i,o._handleFragmentDataUpdate),o.state={data:o._resolver.resolve(),prevContext:a,contextForChildren:a,relayProp:o._buildRelayProp(a),resolverGeneration:0},o._isUnmounted=!1,o._hasFetched=!1,o}(0,i.default)(_,n);var y=_.prototype;return y.componentDidMount=function(){this._isUnmounted=!1,!0===F.ENABLE_CONTAINERS_SUBSCRIBE_ON_COMMIT&&this._subscribeToNewResolverAndRerenderIfStoreHasChanged()},y.componentDidUpdate=function(e,t){!0===F.ENABLE_CONTAINERS_SUBSCRIBE_ON_COMMIT&&(t.resolverGeneration!==this.state.resolverGeneration?this._subscribeToNewResolverAndRerenderIfStoreHasChanged():this._rerenderIfStoreHasChanged())},y.UNSAFE_componentWillReceiveProps=function(e){var r,n=this,o=C(e.__relayContext),a=null!==(r=e.__rootIsQueryRenderer)&&void 0!==r&&r,s=E(t,this.props),i=E(t,e),u=d(t,this.props),l=d(t,e);o.environment===this.state.prevContext.environment&&R(u,l)&&R(s,i)?this._hasFetched||this._resolver.setProps(e):(this._cleanup(),!0===F.ENABLE_CONTAINERS_SUBSCRIBE_ON_COMMIT?this._resolver=O(o,v,t,e,a):this._resolver=O(o,v,t,e,a,this._handleFragmentDataUpdate),this.setState((function(e){return{prevContext:o,contextForChildren:o,relayProp:n._buildRelayProp(o),resolverGeneration:e.resolverGeneration+1}})));var c=this._resolver.resolve();c!==this.state.data&&this.setState({data:c})},y.componentWillUnmount=function(){this._isUnmounted=!0,this._cleanup()},y.shouldComponentUpdate=function(e,r){if(r.data!==this.state.data||r.relayProp!==this.state.relayProp||r.resolverGeneration!==this.state.resolverGeneration)return!0;for(var n=Object.keys(e),o=0;o<n.length;o++){var a=n[o];if("__relayContext"===a){if(r.prevContext.environment!==this.state.prevContext.environment)return!0}else if(!t.hasOwnProperty(a)&&!j(e[a],this.props[a]))return!0}return!1},y._buildRelayProp=function(e){return{hasMore:this._hasMore,isLoading:this._isLoading,loadMore:this._loadMore,refetchConnection:this._refetchConnection,environment:e.environment}},y._rerenderIfStoreHasChanged=function(){var e=this.state.data,t=this._resolver.resolve();e!==t&&this.setState({data:t})},y._subscribeToNewResolverAndRerenderIfStoreHasChanged=function(){var e=this.state.data,t=this._resolver.resolve();this._resolver.setCallback(this.props,this._handleFragmentDataUpdate),e!==t&&this.setState({data:t})},y._getConnectionData=function(){var e=this.props,t=(e.componentRef,(0,a.default)(e,c)),r=(0,l.default)((0,l.default)({},t),this.state.data),n=U(r);if(null==n)return null;var o=S.get(),s=o.EDGES,i=o.PAGE_INFO,u=o.HAS_NEXT_PAGE,h=o.HAS_PREV_PAGE,f=o.END_CURSOR,d=o.START_CURSOR;"object"!=typeof n&&g(!1,"ReactRelayPaginationContainer: Expected `getConnectionFromProps()` in `%s`to return `null` or a plain object with %s and %s properties, got `%s`.",p,s,i,n);var v=n[s],_=n[i];if(null==v||null==_)return null;Array.isArray(v)||g(!1,"ReactRelayPaginationContainer: Expected `getConnectionFromProps()` in `%s`to return an object with %s: Array, got `%s`.",p,s,v),"object"!=typeof _&&g(!1,"ReactRelayPaginationContainer: Expected `getConnectionFromProps()` in `%s`to return an object with %s: Object, got `%s`.",p,i,_);var y="forward"===k?_[u]:_[h],b="forward"===k?_[f]:_[d];return"boolean"!=typeof y||0!==v.length&&void 0===b?(N(!1,"ReactRelayPaginationContainer: Cannot paginate without %s fields in `%s`. Be sure to fetch %s (got `%s`) and %s (got `%s`).",i,p,"forward"===k?u:h,y,"forward"===k?f:d,b),null):{cursor:b,edgeCount:v.length,hasMore:y}},y._getQueryFetcher=function(){return this._queryFetcher||(this._queryFetcher=new m),this._queryFetcher},y._canFetchPage=function(e){return!this._isUnmounted||(N(!1,"ReactRelayPaginationContainer: Unexpected call of `%s` on unmounted container `%s`. It looks like some instances of your container still trying to fetch data but they already unmounted. Please make sure you clear all timers, intervals, async calls, etc that may trigger `%s` call.",e,v,e),!1)},y._fetchPage=function(e,n,o){var s,i=this,u=C(this.props.__relayContext).environment,c=this.props,f=(c.componentRef,c.__relayContext,c.__rootIsQueryRenderer,(0,a.default)(c,h)),v=(0,l.default)((0,l.default)({},f),this.state.data),_=d(t,f);s=A(t,f),s=(0,l.default)((0,l.default)((0,l.default)({},_),s),this._refetchVariables);var y=r.getVariables(v,{count:e.count,cursor:e.cursor},s);("object"!=typeof y||null===y)&&g(!1,"ReactRelayPaginationContainer: Expected `getVariables()` to return an object, got `%s` in `%s`.",y,p),y=(0,l.default)((0,l.default)({},y),this._refetchVariables),s=(0,l.default)((0,l.default)({},y),s);var b=o?{force:!!o.force}:void 0;null!=b&&null!=(null==o?void 0:o.metadata)&&(b.metadata=null==o?void 0:o.metadata);var m=I(r.query),x=D(m,y,b),P=null;this._refetchSubscription&&this._refetchSubscription.unsubscribe(),this._hasFetched=!0;var S=function(){i._refetchSubscription===P&&(i._refetchSubscription=null,i._isARequestInFlight=!1)};return this._isARequestInFlight=!0,P=this._getQueryFetcher().execute({environment:u,operation:x,preservePreviousReferences:!0}).mergeMap((function(t){return q.create((function(t){!function(t,r){var n=i._resolver.resolve();i._resolver.setVariables(Q(s,e.totalCount),x.request.node);var o=i._resolver.resolve();R(n,o)?r():i.setState({data:o,contextForChildren:{environment:i.props.__relayContext.environment}},r)}(0,(function(){t.next(),t.complete()}))}))})).do({error:S,complete:S,unsubscribe:S}).subscribe(n||{}),this._refetchSubscription=this._isARequestInFlight?P:null,P},y._cleanup=function(){this._resolver.dispose(),this._refetchVariables=null,this._hasFetched=!1,this._refetchSubscription&&(this._refetchSubscription.unsubscribe(),this._refetchSubscription=null,this._isARequestInFlight=!1),this._queryFetcher&&this._queryFetcher.dispose()},y.render=function(){var t=this.props,r=t.componentRef,n=(t.__relayContext,t.__rootIsQueryRenderer,(0,a.default)(t,f));return x.createElement(b.Provider,{value:this.state.contextForChildren},x.createElement(e,(0,o.default)({},n,this.state.data,{ref:r,relay:this.state.relayProp})))},_}(x.Component),(0,u.default)(n,"displayName",v),n}e.exports={createContainer:function(e,t,r){return p(e,t,(function(e,t){return U(e,t,r)}))}}},function(e,t,r){"use strict";var n=r(2).default,o=n(r(4)),a=n(r(8)),s=n(r(9)),i=n(r(5)),u=r(3),l=r(16),c=r(14),h=r(7),f=r(1),p=r(0),d=p.createOperationDescriptor,v=p.deepFreeze,_=p.getRequest,y={},b={rootIsQueryRenderer:!0},m=function(e){function t(t){var r;r=e.call(this,t)||this,(0,i.default)((0,a.default)(r),"_handleDataChange",(function(e){var t=null==e.error?null:e.error,n=null==e.snapshot?null:e.snapshot;r.setState((function(e){var r=e.requestCacheKey;return r&&delete y[r],n===e.snapshot&&t===e.error?null:{renderProps:C(t,n,e.queryFetcher,e.retryCallbacks),snapshot:n,requestCacheKey:null}}))}));var n,s,u={handleDataChange:null,handleRetryAfterError:null};if(t.query){var c=t.query;s=R(_(c).params,t.variables),n=y[s]?y[s].queryFetcher:new l}else n=new l;return r._maybeHiddenOrFastRefresh=!1,r.state=(0,o.default)({prevPropsEnvironment:t.environment,prevPropsVariables:t.variables,prevQuery:t.query,queryFetcher:n,retryCallbacks:u},x(t,n,u,s)),r}(0,s.default)(t,e),t.getDerivedStateFromProps=function(e,t){return t.prevQuery===e.query&&t.prevPropsEnvironment===e.environment&&h(t.prevPropsVariables,e.variables)?null:g(e,t)};var r=t.prototype;return r.componentDidMount=function(){var e=this;if(!0===this._maybeHiddenOrFastRefresh)return this._maybeHiddenOrFastRefresh=!1,void this.setState((function(t){var r=g(e.props,t),n=r.requestCacheKey,o=r.queryFetcher;return null!=n&&null!=y[n]&&o.setOnDataChange(e._handleDataChange),r}));var t=this.state,r=t.retryCallbacks,n=t.queryFetcher,o=t.requestCacheKey;o&&delete y[o],r.handleDataChange=this._handleDataChange,r.handleRetryAfterError=function(t){return e.setState((function(e){var t=e.requestCacheKey;return t&&delete y[t],{renderProps:{error:null,props:null,retry:null},requestCacheKey:null}}))},this.props.query&&n.setOnDataChange(this._handleDataChange)},r.componentDidUpdate=function(e,t){var r=this.state,n=r.queryFetcher,o=r.requestCacheKey;o&&(delete y[o],delete this.state.requestCacheKey),this.props.query&&n!==t.queryFetcher&&n.setOnDataChange(this._handleDataChange)},r.componentWillUnmount=function(){this.state.queryFetcher.dispose(),this._maybeHiddenOrFastRefresh=!0},r.shouldComponentUpdate=function(e,t){return e.render!==this.props.render||t.renderProps!==this.state.renderProps},r.render=function(){var e=this.state,t=e.renderProps,r=e.relayContext;return v(t),f.createElement(u.Provider,{value:r},f.createElement(c.Provider,{value:b},this.props.render(t)))},t}(f.Component);function C(e,t,r,n){return{error:e||null,props:t?t.data:null,retry:function(t){var o=r.retry(t);o&&"function"==typeof n.handleDataChange?n.handleDataChange({snapshot:o}):e&&"function"==typeof n.handleRetryAfterError&&n.handleRetryAfterError(e)}}}function R(e,t){return JSON.stringify({id:e.cacheID?e.cacheID:e.id,variables:t})}function g(e,t){var r,n=e.query,a=t.queryFetcher.getSelectionReferences();if(t.queryFetcher.disposeRequest(),n){var s=R(_(n).params,e.variables);r=y[s]?y[s].queryFetcher:new l(a)}else r=new l(a);return(0,o.default)({prevQuery:e.query,prevPropsEnvironment:e.environment,prevPropsVariables:e.variables,queryFetcher:r},x(e,r,t.retryCallbacks))}function x(e,t,r,n){var o=e.environment,a=e.query,s=e.variables,i=e.cacheConfig,u=o;if(!a)return t.dispose(),{error:null,relayContext:{environment:u},renderProps:{error:null,props:{},retry:null},requestCacheKey:null};var l=_(a),c=d(l,s,i),h={environment:u};if("string"==typeof n&&y[n]){var f=y[n].snapshot;return f?{error:null,relayContext:h,renderProps:C(null,f,t,r),snapshot:f,requestCacheKey:n}:{error:null,relayContext:h,renderProps:{error:null,props:null,retry:null},snapshot:null,requestCacheKey:n}}try{var p=t.lookupInStore(u,c,e.fetchPolicy),v=t.fetch({environment:u,onDataChange:null,operation:c})||p;return n=n||R(l.params,e.variables),y[n]={queryFetcher:t,snapshot:v},v?{error:null,relayContext:h,renderProps:C(null,v,t,r),snapshot:v,requestCacheKey:n}:{error:null,relayContext:h,renderProps:{error:null,props:null,retry:null},snapshot:null,requestCacheKey:n}}catch(e){return{error:e,relayContext:h,renderProps:C(e,null,t,r),snapshot:null,requestCacheKey:n}}}e.exports=m},function(e,t,r){"use strict";var n=r(2).default,o=n(r(13)),a=n(r(11)),s=n(r(4)),i=n(r(8)),u=n(r(9)),l=n(r(5)),c=["componentRef","__relayContext","__rootIsQueryRenderer"],h=r(12),f=r(17),p=r(10).getContainerName,d=r(3),v=r(16),_=r(15).assertRelayContext,y=r(7),b=r(1),m=r(0),C=m.Observable,R=m.createFragmentSpecResolver,g=m.createOperationDescriptor,x=m.getDataIDsFromObject,P=m.getRequest,S=m.getVariablesFromObject,q=m.isScalarAndEqual,F=r(18);function O(e,t){return{environment:e,refetch:t}}e.exports={createContainer:function(e,t,r){return h(e,t,(function(e,t){return function(e,t,r){var n,h=p(e);return n=function(n){function p(e){var o,a;a=n.call(this,e)||this,(0,l.default)((0,i.default)(a),"_handleFragmentDataUpdate",(function(){var e=a.state.resolver;a.setState((function(t){return e===t.resolver?{data:t.resolver.resolve()}:null}))})),(0,l.default)((0,i.default)(a),"_refetch",(function(e,n,o,i){if(a._isUnmounted)return F(!1,"ReactRelayRefetchContainer: Unexpected call of `refetch` on unmounted container `%s`. It looks like some instances of your container still trying to refetch the data but they already unmounted. Please make sure you clear all timers, intervals, async calls, etc that may trigger `refetch`.",h),{dispose:function(){}};var u=_(a.props.__relayContext).environment,l=f(t,a.props),c="function"==typeof e?e(a._getFragmentVariables()):e;c=(0,s.default)((0,s.default)({},l),c);var p=n?(0,s.default)((0,s.default)({},c),n):c,d=i?{force:!!i.force}:void 0;null!=d&&null!=(null==i?void 0:i.metadata)&&(d.metadata=null==i?void 0:i.metadata);var v,y="function"==typeof o?{next:o,error:o}:o||{},b=P(r),m=g(b,c,d);return a.state.localVariables=c,a._refetchSubscription&&a._refetchSubscription.unsubscribe(),null!=a._getQueryFetcher().lookupInStore(u,m,null==i?void 0:i.fetchPolicy)?(a.state.resolver.setVariables(p,m.request.node),a.setState((function(e){return{data:e.resolver.resolve(),contextForChildren:{environment:a.props.__relayContext.environment}}}),(function(){y.next&&y.next(),y.complete&&y.complete()})),{dispose:function(){}}):(a._getQueryFetcher().execute({environment:u,operation:m,preservePreviousReferences:!0}).mergeMap((function(e){return a.state.resolver.setVariables(p,m.request.node),C.create((function(e){return a.setState((function(e){return{data:e.resolver.resolve(),contextForChildren:{environment:a.props.__relayContext.environment}}}),(function(){e.next(),e.complete()}))}))})).finally((function(){a._refetchSubscription===v&&(a._refetchSubscription=null)})).subscribe((0,s.default)((0,s.default)({},y),{},{start:function(e){a._refetchSubscription=v=e,y.start&&y.start(e)}})),{dispose:function(){v&&v.unsubscribe()}})}));var u=_(e.__relayContext),c=null!==(o=e.__rootIsQueryRenderer)&&void 0!==o&&o;a._refetchSubscription=null;var p=R(u,h,t,e,c);return a.state={data:p.resolve(),localVariables:null,prevProps:e,prevPropsContext:u,contextForChildren:u,relayProp:O(u.environment,a._refetch),resolver:p},a._isUnmounted=!1,a}(0,u.default)(p,n);var m=p.prototype;return m.componentDidMount=function(){this._isUnmounted=!1,this._subscribeToNewResolverAndRerenderIfStoreHasChanged()},m.componentDidUpdate=function(e,t){this.state.resolver!==t.resolver?(t.resolver.dispose(),this._queryFetcher&&this._queryFetcher.dispose(),this._refetchSubscription&&this._refetchSubscription.unsubscribe(),this._subscribeToNewResolverAndRerenderIfStoreHasChanged()):this._rerenderIfStoreHasChanged()},p.getDerivedStateFromProps=function(e,r){var n,o=r.prevProps,a=_(e.__relayContext),s=null!==(n=e.__rootIsQueryRenderer)&&void 0!==n&&n,i=x(t,o),u=x(t,e),l=f(t,o),c=f(t,e),p=r.resolver;if(r.prevPropsContext.environment!==a.environment||!y(l,c)||!y(i,u))return{data:(p=R(a,h,t,e,s)).resolve(),localVariables:null,prevProps:e,prevPropsContext:a,contextForChildren:a,relayProp:O(a.environment,r.relayProp.refetch),resolver:p};r.localVariables||p.setProps(e);var d=p.resolve();return d!==r.data?{data:d,prevProps:e}:null},m.componentWillUnmount=function(){this._isUnmounted=!0,this.state.resolver.dispose(),this._queryFetcher&&this._queryFetcher.dispose(),this._refetchSubscription&&this._refetchSubscription.unsubscribe()},m.shouldComponentUpdate=function(e,r){if(r.data!==this.state.data||r.relayProp!==this.state.relayProp)return!0;for(var n=Object.keys(e),o=0;o<n.length;o++){var a=n[o];if("__relayContext"===a){if(this.state.prevPropsContext.environment!==r.prevPropsContext.environment)return!0}else if(!t.hasOwnProperty(a)&&!q(e[a],this.props[a]))return!0}return!1},m._rerenderIfStoreHasChanged=function(){var e=this.state,t=e.data,r=e.resolver.resolve();t!==r&&this.setState({data:r})},m._subscribeToNewResolverAndRerenderIfStoreHasChanged=function(){var e=this.state,t=e.data,r=e.resolver,n=r.resolve();r.setCallback(this.props,this._handleFragmentDataUpdate),t!==n&&this.setState({data:n})},m._getFragmentVariables=function(){return S(t,this.props)},m._getQueryFetcher=function(){return this._queryFetcher||(this._queryFetcher=new v),this._queryFetcher},m.render=function(){var t=this.props,r=t.componentRef,n=(t.__relayContext,t.__rootIsQueryRenderer,(0,a.default)(t,c)),s=this.state,i=s.relayProp,u=s.contextForChildren;return b.createElement(d.Provider,{value:u},b.createElement(e,(0,o.default)({},n,this.state.data,{ref:r,relay:i})))},p}(b.Component),(0,l.default)(n,"displayName",h),n}(e,t,r)}))}}}])}));
|
4
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@babel/runtime/helpers/assertThisInitialized"),require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/extends"),require("@babel/runtime/helpers/inheritsLoose"),require("@babel/runtime/helpers/interopRequireDefault"),require("@babel/runtime/helpers/objectSpread2"),require("@babel/runtime/helpers/objectWithoutPropertiesLoose"),require("fbjs/lib/areEqual"),require("fbjs/lib/warning"),require("invariant"),require("react"),require("relay-runtime")):"function"==typeof define&&define.amd?define(["@babel/runtime/helpers/assertThisInitialized","@babel/runtime/helpers/defineProperty","@babel/runtime/helpers/extends","@babel/runtime/helpers/inheritsLoose","@babel/runtime/helpers/interopRequireDefault","@babel/runtime/helpers/objectSpread2","@babel/runtime/helpers/objectWithoutPropertiesLoose","fbjs/lib/areEqual","fbjs/lib/warning","invariant","react","relay-runtime"],t):"object"==typeof exports?exports.ReactRelayLegacy=t(require("@babel/runtime/helpers/assertThisInitialized"),require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/extends"),require("@babel/runtime/helpers/inheritsLoose"),require("@babel/runtime/helpers/interopRequireDefault"),require("@babel/runtime/helpers/objectSpread2"),require("@babel/runtime/helpers/objectWithoutPropertiesLoose"),require("fbjs/lib/areEqual"),require("fbjs/lib/warning"),require("invariant"),require("react"),require("relay-runtime")):e.ReactRelayLegacy=t(e["@babel/runtime/helpers/assertThisInitialized"],e["@babel/runtime/helpers/defineProperty"],e["@babel/runtime/helpers/extends"],e["@babel/runtime/helpers/inheritsLoose"],e["@babel/runtime/helpers/interopRequireDefault"],e["@babel/runtime/helpers/objectSpread2"],e["@babel/runtime/helpers/objectWithoutPropertiesLoose"],e["fbjs/lib/areEqual"],e["fbjs/lib/warning"],e.invariant,e.react,e["relay-runtime"])}(self,((e,t,r,n,o,a,s,i,l,u,c,h)=>(()=>{"use strict";var p={426:e=>{function t(e){return e.displayName||e.name||"Component"}e.exports={getComponentName:t,getContainerName:function(e){return"Relay("+t(e)+")"}}},888:(e,t,r)=>{var n=r(156),o=r(658).__internal.createRelayContext;e.exports=o(n)},362:(e,t,r)=>{var n=r(275).default,o=n(r(175)),a=n(r(264)),s=n(r(383)),i=n(r(296)),l=n(r(311)),u=["componentRef","__relayContext","__rootIsQueryRenderer"],c=r(89),h=r(426).getContainerName,p=r(827).assertRelayContext,f=r(125),d=r(156),v=r(658),_=v.createFragmentSpecResolver,y=v.getDataIDsFromObject,b=v.isScalarAndEqual;function m(e,t){var r,n=h(e);return r=function(r){function c(e){var o,a;a=r.call(this,e)||this,(0,l.default)((0,s.default)(a),"_handleFragmentDataUpdate",(function(){var e=a.state.resolver;a.setState((function(t){return e===t.resolver?{data:t.resolver.resolve(),relayProp:C(t.relayProp.environment)}:null}))}));var i=p(e.__relayContext),u=null!==(o=e.__rootIsQueryRenderer)&&void 0!==o&&o,c=_(i,n,t,e,u);return a.state={data:c.resolve(),prevProps:e,prevPropsContext:i,relayProp:C(i.environment),resolver:c},a}(0,i.default)(c,r),c.getDerivedStateFromProps=function(e,r){var o,a=r.prevProps,s=p(e.__relayContext),i=null!==(o=e.__rootIsQueryRenderer)&&void 0!==o&&o,l=y(t,a),u=y(t,e),c=r.resolver;if(r.prevPropsContext.environment!==s.environment||!f(l,u))return{data:(c=_(s,n,t,e,i)).resolve(),prevPropsContext:s,prevProps:e,relayProp:C(s.environment),resolver:c};c.setProps(e);var h=c.resolve();return h!==r.data?{data:h,prevProps:e,prevPropsContext:s,relayProp:C(s.environment)}:null};var h=c.prototype;return h.componentDidMount=function(){this._subscribeToNewResolverAndRerenderIfStoreHasChanged()},h.componentDidUpdate=function(e,t){this.state.resolver!==t.resolver?(t.resolver.dispose(),this._subscribeToNewResolverAndRerenderIfStoreHasChanged()):this._rerenderIfStoreHasChanged()},h.componentWillUnmount=function(){this.state.resolver.dispose()},h.shouldComponentUpdate=function(e,r){if(r.data!==this.state.data)return!0;for(var n=Object.keys(e),o=0;o<n.length;o++){var a=n[o];if("__relayContext"===a){if(r.prevPropsContext.environment!==this.state.prevPropsContext.environment)return!0}else if(!t.hasOwnProperty(a)&&!b(e[a],this.props[a]))return!0}return!1},h._rerenderIfStoreHasChanged=function(){var e=this.state,t=e.data,r=e.resolver.resolve();t!==r&&this.setState({data:r})},h._subscribeToNewResolverAndRerenderIfStoreHasChanged=function(){var e=this.state,t=e.data,r=e.resolver,n=r.resolve();r.setCallback(this.props,this._handleFragmentDataUpdate),t!==n&&this.setState({data:n})},h.render=function(){var t=this.props,r=t.componentRef,n=(t.__relayContext,t.__rootIsQueryRenderer,(0,a.default)(t,u));return d.createElement(e,(0,o.default)((0,o.default)((0,o.default)({},n),this.state.data),{},{ref:r,relay:this.state.relayProp}))},c}(d.Component),(0,l.default)(r,"displayName",n),r}function C(e){return{environment:e}}e.exports={createContainer:function(e,t){return c(e,t,m)}}},428:(e,t,r)=>{var n=r(888),o=r(239),a=r(125),s=r(156),i=r(658),l=i.createOperationDescriptor,u=i.deepFreeze,c=i.getRequest,h=s.useLayoutEffect,p=s.useState,f=s.useRef,d=s.useMemo,v={rootIsQueryRenderer:!0};e.exports=function(e){var t,r,i=e.environment,_=e.query,y=e.variables,b=e.render,m=(t=y,r=s.useRef(t),a(r.current,t)||(u(t),r.current=t),r.current),C=d((function(){var e=c(_);return l(e,m)}),[_,m]),R=d((function(){return{environment:i}}),[i]),g=f(null),x=p(null)[1],P=f(null),S=d((function(){i.check(C);var e=i.lookup(C.fragment);g.current=e.data;var t=i.retain(C),r=i.subscribe(e,(function(e){g.current=e.data,x(g.current)})),n=!1;return P.current&&P.current(),P.current=function(){n||(n=!0,P.current=null,t.dispose(),r.dispose())},e}),[i,C]);return h((function(){var e=P.current;return function(){e&&e()}}),[S]),s.createElement(n.Provider,{value:R},s.createElement(o.Provider,{value:v},b({props:g.current})))}},540:(e,t,r)=>{var n=r(275).default,o=n(r(924)),a=n(r(264)),s=n(r(383)),i=n(r(296)),l=n(r(311)),u=n(r(175)),c=["componentRef"],h=["componentRef","__relayContext","__rootIsQueryRenderer"],p=["componentRef","__relayContext","__rootIsQueryRenderer"],f=r(89),d=r(416),v=r(426),_=v.getComponentName,y=v.getContainerName,b=r(888),m=r(733),C=r(827).assertRelayContext,R=r(125),g=r(56),x=r(156),P=r(658),S=P.ConnectionInterface,q=P.Observable,F=P.RelayFeatureFlags,D=P.createFragmentSpecResolver,O=P.createOperationDescriptor,E=P.getDataIDsFromObject,I=P.getRequest,A=P.getVariablesFromObject,N=P.isScalarAndEqual,U=r(446),j="forward";function k(e){return"function"==typeof e?{error:e,complete:e,unsubscribe:function(t){"function"==typeof e&&e()}}:e||{}}e.exports={createContainer:function(e,t,r){return f(e,t,(function(e,t){return function(e,t,r){var n,f=_(e),v=y(e),P=function(e){var t=null,r=!1;for(var n in e){var o=e[n],a=o.metadata&&o.metadata.connection;void 0!==o.metadata&&(r=!0),a&&(1!==a.length&&g(!1,"ReactRelayPaginationContainer: Only a single @connection is supported, `%s` has %s.",n,a.length),t&&g(!1,"ReactRelayPaginationContainer: Only a single fragment with @connection is supported."),t=(0,u.default)((0,u.default)({},a[0]),{},{fragmentName:n}))}return r&&null===t&&g(!1,"ReactRelayPaginationContainer: A @connection directive must be present."),t||{}}(t),w=r.getConnectionFromProps||function(e){var t=e.path;return t||g(!1,"ReactRelayPaginationContainer: Unable to synthesize a getConnectionFromProps function."),function(r){for(var n=r[e.fragmentName],o=0;o<t.length;o++){if(!n||"object"!=typeof n)return null;n=n[t[o]]}return n}}(P),Q=r.direction||P.direction;Q||g(!1,"ReactRelayPaginationContainer: Unable to infer direction of the connection, possibly because both first and last are provided.");var M=r.getFragmentVariables||function(e){var t=e.count;return t||g(!1,"ReactRelayPaginationContainer: Unable to synthesize a getFragmentVariables function."),function(e,r){return(0,u.default)((0,u.default)({},e),{},(0,l.default)({},t,r))}}(P);return n=function(n){function _(e){var r,o;o=n.call(this,e)||this,(0,l.default)((0,s.default)(o),"_handleFragmentDataUpdate",(function(){o.setState({data:o._resolver.resolve()})})),(0,l.default)((0,s.default)(o),"_hasMore",(function(){var e=o._getConnectionData();return!!(e&&e.hasMore&&e.cursor)})),(0,l.default)((0,s.default)(o),"_isLoading",(function(){return!!o._refetchSubscription})),(0,l.default)((0,s.default)(o),"_refetchConnection",(function(e,t,r){if(!o._canFetchPage("refetchConnection"))return{dispose:function(){}};o._refetchVariables=r;var n={count:e,cursor:null,totalCount:e};return{dispose:o._fetchPage(n,k(t),{force:!0}).unsubscribe}})),(0,l.default)((0,s.default)(o),"_loadMore",(function(e,t,r){if(!o._canFetchPage("loadMore"))return{dispose:function(){}};var n=k(t),a=o._getConnectionData();if(!a)return q.create((function(e){return e.complete()})).subscribe(n),null;var s=a.edgeCount+e;if(r&&r.force)return o._refetchConnection(s,t);var i=S.get(),l=i.END_CURSOR,u=i.START_CURSOR,c=a.cursor;U(null!=c&&""!==c,"ReactRelayPaginationContainer: Cannot `loadMore` without valid `%s` (got `%s`)",Q===j?l:u,c);var h={count:e,cursor:c,totalCount:s};return{dispose:o._fetchPage(h,n,r).unsubscribe}}));var a=C(e.__relayContext),i=null!==(r=e.__rootIsQueryRenderer)&&void 0!==r&&r;return o._isARequestInFlight=!1,o._refetchSubscription=null,o._refetchVariables=null,!0===F.ENABLE_CONTAINERS_SUBSCRIBE_ON_COMMIT?o._resolver=D(a,v,t,e,i):o._resolver=D(a,v,t,e,i,o._handleFragmentDataUpdate),o.state={data:o._resolver.resolve(),prevContext:a,contextForChildren:a,relayProp:o._buildRelayProp(a),resolverGeneration:0},o._isUnmounted=!1,o._hasFetched=!1,o}(0,i.default)(_,n);var y=_.prototype;return y.componentDidMount=function(){this._isUnmounted=!1,!0===F.ENABLE_CONTAINERS_SUBSCRIBE_ON_COMMIT&&this._subscribeToNewResolverAndRerenderIfStoreHasChanged()},y.componentDidUpdate=function(e,t){!0===F.ENABLE_CONTAINERS_SUBSCRIBE_ON_COMMIT&&(t.resolverGeneration!==this.state.resolverGeneration?this._subscribeToNewResolverAndRerenderIfStoreHasChanged():this._rerenderIfStoreHasChanged())},y.UNSAFE_componentWillReceiveProps=function(e){var r,n=this,o=C(e.__relayContext),a=null!==(r=e.__rootIsQueryRenderer)&&void 0!==r&&r,s=E(t,this.props),i=E(t,e),l=d(t,this.props),u=d(t,e);o.environment===this.state.prevContext.environment&&R(l,u)&&R(s,i)?this._hasFetched||this._resolver.setProps(e):(this._cleanup(),!0===F.ENABLE_CONTAINERS_SUBSCRIBE_ON_COMMIT?this._resolver=D(o,v,t,e,a):this._resolver=D(o,v,t,e,a,this._handleFragmentDataUpdate),this.setState((function(e){return{prevContext:o,contextForChildren:o,relayProp:n._buildRelayProp(o),resolverGeneration:e.resolverGeneration+1}})));var c=this._resolver.resolve();c!==this.state.data&&this.setState({data:c})},y.componentWillUnmount=function(){this._isUnmounted=!0,this._cleanup()},y.shouldComponentUpdate=function(e,r){if(r.data!==this.state.data||r.relayProp!==this.state.relayProp||r.resolverGeneration!==this.state.resolverGeneration)return!0;for(var n=Object.keys(e),o=0;o<n.length;o++){var a=n[o];if("__relayContext"===a){if(r.prevContext.environment!==this.state.prevContext.environment)return!0}else if(!t.hasOwnProperty(a)&&!N(e[a],this.props[a]))return!0}return!1},y._buildRelayProp=function(e){return{hasMore:this._hasMore,isLoading:this._isLoading,loadMore:this._loadMore,refetchConnection:this._refetchConnection,environment:e.environment}},y._rerenderIfStoreHasChanged=function(){var e=this.state.data,t=this._resolver.resolve();e!==t&&this.setState({data:t})},y._subscribeToNewResolverAndRerenderIfStoreHasChanged=function(){var e=this.state.data,t=this._resolver.resolve();this._resolver.setCallback(this.props,this._handleFragmentDataUpdate),e!==t&&this.setState({data:t})},y._getConnectionData=function(){var e=this.props,t=(e.componentRef,(0,a.default)(e,c)),r=(0,u.default)((0,u.default)({},t),this.state.data),n=w(r);if(null==n)return null;var o=S.get(),s=o.EDGES,i=o.PAGE_INFO,l=o.HAS_NEXT_PAGE,h=o.HAS_PREV_PAGE,p=o.END_CURSOR,d=o.START_CURSOR;"object"!=typeof n&&g(!1,"ReactRelayPaginationContainer: Expected `getConnectionFromProps()` in `%s`to return `null` or a plain object with %s and %s properties, got `%s`.",f,s,i,n);var v=n[s],_=n[i];if(null==v||null==_)return null;Array.isArray(v)||g(!1,"ReactRelayPaginationContainer: Expected `getConnectionFromProps()` in `%s`to return an object with %s: Array, got `%s`.",f,s,v),"object"!=typeof _&&g(!1,"ReactRelayPaginationContainer: Expected `getConnectionFromProps()` in `%s`to return an object with %s: Object, got `%s`.",f,i,_);var y=Q===j?_[l]:_[h],b=Q===j?_[p]:_[d];return"boolean"!=typeof y||0!==v.length&&void 0===b?(U(!1,"ReactRelayPaginationContainer: Cannot paginate without %s fields in `%s`. Be sure to fetch %s (got `%s`) and %s (got `%s`).",i,f,Q===j?l:h,y,Q===j?p:d,b),null):{cursor:b,edgeCount:v.length,hasMore:y}},y._getQueryFetcher=function(){return this._queryFetcher||(this._queryFetcher=new m),this._queryFetcher},y._canFetchPage=function(e){return!this._isUnmounted||(U(!1,"ReactRelayPaginationContainer: Unexpected call of `%s` on unmounted container `%s`. It looks like some instances of your container still trying to fetch data but they already unmounted. Please make sure you clear all timers, intervals, async calls, etc that may trigger `%s` call.",e,v,e),!1)},y._fetchPage=function(e,n,o){var s,i=this,l=C(this.props.__relayContext).environment,c=this.props,p=(c.componentRef,c.__relayContext,c.__rootIsQueryRenderer,(0,a.default)(c,h)),v=(0,u.default)((0,u.default)({},p),this.state.data),_=d(t,p);s=A(t,p),s=(0,u.default)((0,u.default)((0,u.default)({},_),s),this._refetchVariables);var y=r.getVariables(v,{count:e.count,cursor:e.cursor},s);("object"!=typeof y||null===y)&&g(!1,"ReactRelayPaginationContainer: Expected `getVariables()` to return an object, got `%s` in `%s`.",y,f),y=(0,u.default)((0,u.default)({},y),this._refetchVariables),s=(0,u.default)((0,u.default)({},y),s);var b=o?{force:!!o.force}:void 0;null!=b&&null!=(null==o?void 0:o.metadata)&&(b.metadata=null==o?void 0:o.metadata);var m=I(r.query),x=O(m,y,b),P=null;this._refetchSubscription&&this._refetchSubscription.unsubscribe(),this._hasFetched=!0;var S=function(){i._refetchSubscription===P&&(i._refetchSubscription=null,i._isARequestInFlight=!1)};return this._isARequestInFlight=!0,P=this._getQueryFetcher().execute({environment:l,operation:x,preservePreviousReferences:!0}).mergeMap((function(t){return q.create((function(t){!function(t,r){var n=i._resolver.resolve();i._resolver.setVariables(M(s,e.totalCount),x.request.node);var o=i._resolver.resolve();R(n,o)?r():i.setState({data:o,contextForChildren:{environment:i.props.__relayContext.environment}},r)}(0,(function(){t.next(),t.complete()}))}))})).do({error:S,complete:S,unsubscribe:S}).subscribe(n||{}),this._refetchSubscription=this._isARequestInFlight?P:null,P},y._cleanup=function(){this._resolver.dispose(),this._refetchVariables=null,this._hasFetched=!1,this._refetchSubscription&&(this._refetchSubscription.unsubscribe(),this._refetchSubscription=null,this._isARequestInFlight=!1),this._queryFetcher&&this._queryFetcher.dispose()},y.render=function(){var t=this.props,r=t.componentRef,n=(t.__relayContext,t.__rootIsQueryRenderer,(0,a.default)(t,p));return x.createElement(b.Provider,{value:this.state.contextForChildren},x.createElement(e,(0,o.default)({},n,this.state.data,{ref:r,relay:this.state.relayProp})))},_}(x.Component),(0,l.default)(n,"displayName",v),n}(e,t,r)}))}}},733:(e,t,r)=>{var n=(0,r(275).default)(r(311)),o=r(56),a=r(658),s=a.__internal.fetchQuery,i=a.createOperationDescriptor,l=a.isRelayModernEnvironment,u=function(){function e(e){(0,n.default)(this,"_selectionReferences",[]),(0,n.default)(this,"_didFetchFinish",!1),null!=e&&(this._cacheSelectionReference=e.cacheSelectionReference,this._selectionReferences=e.selectionReferences)}var t=e.prototype;return t.getSelectionReferences=function(){return{cacheSelectionReference:this._cacheSelectionReference,selectionReferences:this._selectionReferences}},t.lookupInStore=function(e,t,r){return"store-and-network"!==r&&"store-or-network"!==r||"available"!==e.check(t).status?null:(this._retainCachedOperation(e,t),e.lookup(t.fragment))},t.getFetchResult=function(){return this._didFetchFinish?null!=this._error?{error:this._error}:null!=this._snapshot?{snapshot:this._snapshot}:void 0:null},t.execute=function(e){var t=this,r=e.environment,n=e.operation,o=e.preservePreviousReferences,a=void 0!==o&&o,i=r.retain(n),u=function(){t._selectionReferences=t._selectionReferences.concat(i)},c=function(){a||t.disposeSelectionReferences(),t._selectionReferences=t._selectionReferences.concat(i)},h=function(){t._selectionReferences=t._selectionReferences.concat(i)};return l(r)?s(r,n).do({error:u,complete:c,unsubscribe:h}):r.execute({operation:n}).do({error:u,complete:c,unsubscribe:h})},t.setOnDataChange=function(e){this._fetchOptions||o(!1,"ReactRelayQueryFetcher: `setOnDataChange` should have been called after having called `fetch`"),"function"==typeof e&&(this._fetchOptions.onDataChangeCallbacks=this._fetchOptions.onDataChangeCallbacks||[],this._fetchOptions.onDataChangeCallbacks.push(e),this._didFetchFinish&&(null!=this._error?e({error:this._error}):null!=this._snapshot&&e({snapshot:this._snapshot})))},t.fetch=function(e,t){var r,n=this,o=e.environment,a=e.operation,s=e.onDataChange,l=!1;this.disposeRequest();var u=this._fetchOptions&&this._fetchOptions.onDataChangeCallbacks;this._fetchOptions={environment:o,onDataChangeCallbacks:u||[],operation:a},s&&-1===this._fetchOptions.onDataChangeCallbacks.indexOf(s)&&this._fetchOptions.onDataChangeCallbacks.push(s);var c=t?i(a.request.node,a.request.variables,t):a,h=this.execute({environment:o,operation:c}).finally((function(){n._pendingRequest=null})).subscribe({next:function(){n._didFetchFinish=!0,n._error=null,n._onQueryDataAvailable({notifyFirstResult:l})},error:function(e){n._didFetchFinish=!0,n._error=e,n._snapshot=null;var t=n._fetchOptions&&n._fetchOptions.onDataChangeCallbacks;l?t&&t.forEach((function(t){t({error:e})})):r=e}});if(this._pendingRequest={dispose:function(){h.unsubscribe()}},l=!0,r)throw r;return this._snapshot},t.retry=function(e){return this._fetchOptions||o(!1,"ReactRelayQueryFetcher: `retry` should be called after having called `fetch`"),this.fetch({environment:this._fetchOptions.environment,operation:this._fetchOptions.operation,onDataChange:null},e)},t.dispose=function(){this.disposeRequest(),this.disposeSelectionReferences()},t.disposeRequest=function(){this._error=null,this._snapshot=null,this._pendingRequest&&this._pendingRequest.dispose(),this._rootSubscription&&(this._rootSubscription.dispose(),this._rootSubscription=null)},t._retainCachedOperation=function(e,t){this._disposeCacheSelectionReference(),this._cacheSelectionReference=e.retain(t)},t._disposeCacheSelectionReference=function(){this._cacheSelectionReference&&this._cacheSelectionReference.dispose(),this._cacheSelectionReference=null},t.disposeSelectionReferences=function(){this._disposeCacheSelectionReference(),this._selectionReferences.forEach((function(e){return e.dispose()})),this._selectionReferences=[]},t._onQueryDataAvailable=function(e){var t=this,r=e.notifyFirstResult;this._fetchOptions||o(!1,"ReactRelayQueryFetcher: `_onQueryDataAvailable` should have been called after having called `fetch`");var n=this._fetchOptions,a=n.environment,s=n.onDataChangeCallbacks,i=n.operation;if(!this._snapshot&&(this._snapshot=a.lookup(i.fragment),this._rootSubscription=a.subscribe(this._snapshot,(function(e){if(null!=t._fetchOptions){var r=t._fetchOptions.onDataChangeCallbacks;Array.isArray(r)&&r.forEach((function(t){return t({snapshot:e})}))}})),this._snapshot&&r&&Array.isArray(s))){var l=this._snapshot;s.forEach((function(e){return e({snapshot:l})}))}},e}();e.exports=u},701:(e,t,r)=>{var n=r(275).default,o=n(r(175)),a=n(r(383)),s=n(r(296)),i=n(r(311)),l=r(888),u=r(733),c=r(239),h=r(125),p=r(156),f=r(658),d=f.createOperationDescriptor,v=f.deepFreeze,_=f.getRequest,y={},b={rootIsQueryRenderer:!0},m=function(e){function t(t){var r;r=e.call(this,t)||this,(0,i.default)((0,a.default)(r),"_handleDataChange",(function(e){var t=null==e.error?null:e.error,n=null==e.snapshot?null:e.snapshot;r.setState((function(e){var r=e.requestCacheKey;return r&&delete y[r],n===e.snapshot&&t===e.error?null:{renderProps:C(t,n,e.queryFetcher,e.retryCallbacks),snapshot:n,requestCacheKey:null}}))}));var n,s,l={handleDataChange:null,handleRetryAfterError:null};if(t.query){var c=t.query;s=R(_(c).params,t.variables),n=y[s]?y[s].queryFetcher:new u}else n=new u;return r._maybeHiddenOrFastRefresh=!1,r.state=(0,o.default)({prevPropsEnvironment:t.environment,prevPropsVariables:t.variables,prevQuery:t.query,queryFetcher:n,retryCallbacks:l},x(t,n,l,s)),r}(0,s.default)(t,e),t.getDerivedStateFromProps=function(e,t){return t.prevQuery===e.query&&t.prevPropsEnvironment===e.environment&&h(t.prevPropsVariables,e.variables)?null:g(e,t)};var r=t.prototype;return r.componentDidMount=function(){var e=this;if(!0===this._maybeHiddenOrFastRefresh)return this._maybeHiddenOrFastRefresh=!1,void this.setState((function(t){var r=g(e.props,t),n=r.requestCacheKey,o=r.queryFetcher;return null!=n&&null!=y[n]&&o.setOnDataChange(e._handleDataChange),r}));var t=this.state,r=t.retryCallbacks,n=t.queryFetcher,o=t.requestCacheKey;o&&delete y[o],r.handleDataChange=this._handleDataChange,r.handleRetryAfterError=function(t){return e.setState((function(e){var t=e.requestCacheKey;return t&&delete y[t],{renderProps:{error:null,props:null,retry:null},requestCacheKey:null}}))},this.props.query&&n.setOnDataChange(this._handleDataChange)},r.componentDidUpdate=function(e,t){var r=this.state,n=r.queryFetcher,o=r.requestCacheKey;o&&(delete y[o],delete this.state.requestCacheKey),this.props.query&&n!==t.queryFetcher&&n.setOnDataChange(this._handleDataChange)},r.componentWillUnmount=function(){this.state.queryFetcher.dispose(),this._maybeHiddenOrFastRefresh=!0},r.shouldComponentUpdate=function(e,t){return e.render!==this.props.render||t.renderProps!==this.state.renderProps},r.render=function(){var e=this.state,t=e.renderProps,r=e.relayContext;return v(t),p.createElement(l.Provider,{value:r},p.createElement(c.Provider,{value:b},this.props.render(t)))},t}(p.Component);function C(e,t,r,n){return{error:e||null,props:t?t.data:null,retry:function(t){var o=r.retry(t);o&&"function"==typeof n.handleDataChange?n.handleDataChange({snapshot:o}):e&&"function"==typeof n.handleRetryAfterError&&n.handleRetryAfterError(e)}}}function R(e,t){return JSON.stringify({id:e.cacheID?e.cacheID:e.id,variables:t})}function g(e,t){var r,n=e.query,a=t.queryFetcher.getSelectionReferences();if(t.queryFetcher.disposeRequest(),n){var s=R(_(n).params,e.variables);r=y[s]?y[s].queryFetcher:new u(a)}else r=new u(a);return(0,o.default)({prevQuery:e.query,prevPropsEnvironment:e.environment,prevPropsVariables:e.variables,queryFetcher:r},x(e,r,t.retryCallbacks))}function x(e,t,r,n){var o=e.environment,a=e.query,s=e.variables,i=e.cacheConfig,l=o;if(!a)return t.dispose(),{error:null,relayContext:{environment:l},renderProps:{error:null,props:{},retry:null},requestCacheKey:null};var u=_(a),c=d(u,s,i),h={environment:l};if("string"==typeof n&&y[n]){var p=y[n].snapshot;return p?{error:null,relayContext:h,renderProps:C(null,p,t,r),snapshot:p,requestCacheKey:n}:{error:null,relayContext:h,renderProps:{error:null,props:null,retry:null},snapshot:null,requestCacheKey:n}}try{var f=t.lookupInStore(l,c,e.fetchPolicy),v=t.fetch({environment:l,onDataChange:null,operation:c})||f;return n=n||R(u.params,e.variables),y[n]={queryFetcher:t,snapshot:v},v?{error:null,relayContext:h,renderProps:C(null,v,t,r),snapshot:v,requestCacheKey:n}:{error:null,relayContext:h,renderProps:{error:null,props:null,retry:null},snapshot:null,requestCacheKey:n}}catch(e){return{error:e,relayContext:h,renderProps:C(e,null,t,r),snapshot:null,requestCacheKey:n}}}e.exports=m},239:(e,t,r)=>{var n=r(156);e.exports=n.createContext({rootIsQueryRenderer:!1})},427:(e,t,r)=>{var n=r(275).default,o=n(r(924)),a=n(r(264)),s=n(r(175)),i=n(r(383)),l=n(r(296)),u=n(r(311)),c=["componentRef","__relayContext","__rootIsQueryRenderer"],h=r(89),p=r(416),f=r(426).getContainerName,d=r(888),v=r(733),_=r(827).assertRelayContext,y=r(125),b=r(156),m=r(658),C=m.Observable,R=m.createFragmentSpecResolver,g=m.createOperationDescriptor,x=m.getDataIDsFromObject,P=m.getRequest,S=m.getVariablesFromObject,q=m.isScalarAndEqual,F=r(446);function D(e,t){return{environment:e,refetch:t}}e.exports={createContainer:function(e,t,r){return h(e,t,(function(e,t){return function(e,t,r){var n,h=f(e);return n=function(n){function f(e){var o,a;a=n.call(this,e)||this,(0,u.default)((0,i.default)(a),"_handleFragmentDataUpdate",(function(){var e=a.state.resolver;a.setState((function(t){return e===t.resolver?{data:t.resolver.resolve()}:null}))})),(0,u.default)((0,i.default)(a),"_refetch",(function(e,n,o,i){if(a._isUnmounted)return F(!1,"ReactRelayRefetchContainer: Unexpected call of `refetch` on unmounted container `%s`. It looks like some instances of your container still trying to refetch the data but they already unmounted. Please make sure you clear all timers, intervals, async calls, etc that may trigger `refetch`.",h),{dispose:function(){}};var l=_(a.props.__relayContext).environment,u=p(t,a.props),c="function"==typeof e?e(a._getFragmentVariables()):e;c=(0,s.default)((0,s.default)({},u),c);var f=n?(0,s.default)((0,s.default)({},c),n):c,d=i?{force:!!i.force}:void 0;null!=d&&null!=(null==i?void 0:i.metadata)&&(d.metadata=null==i?void 0:i.metadata);var v,y="function"==typeof o?{next:o,error:o}:o||{},b=P(r),m=g(b,c,d);return a.state.localVariables=c,a._refetchSubscription&&a._refetchSubscription.unsubscribe(),null!=a._getQueryFetcher().lookupInStore(l,m,null==i?void 0:i.fetchPolicy)?(a.state.resolver.setVariables(f,m.request.node),a.setState((function(e){return{data:e.resolver.resolve(),contextForChildren:{environment:a.props.__relayContext.environment}}}),(function(){y.next&&y.next(),y.complete&&y.complete()})),{dispose:function(){}}):(a._getQueryFetcher().execute({environment:l,operation:m,preservePreviousReferences:!0}).mergeMap((function(e){return a.state.resolver.setVariables(f,m.request.node),C.create((function(e){return a.setState((function(e){return{data:e.resolver.resolve(),contextForChildren:{environment:a.props.__relayContext.environment}}}),(function(){e.next(),e.complete()}))}))})).finally((function(){a._refetchSubscription===v&&(a._refetchSubscription=null)})).subscribe((0,s.default)((0,s.default)({},y),{},{start:function(e){a._refetchSubscription=v=e,y.start&&y.start(e)}})),{dispose:function(){v&&v.unsubscribe()}})}));var l=_(e.__relayContext),c=null!==(o=e.__rootIsQueryRenderer)&&void 0!==o&&o;a._refetchSubscription=null;var f=R(l,h,t,e,c);return a.state={data:f.resolve(),localVariables:null,prevProps:e,prevPropsContext:l,contextForChildren:l,relayProp:D(l.environment,a._refetch),resolver:f},a._isUnmounted=!1,a}(0,l.default)(f,n);var m=f.prototype;return m.componentDidMount=function(){this._isUnmounted=!1,this._subscribeToNewResolverAndRerenderIfStoreHasChanged()},m.componentDidUpdate=function(e,t){this.state.resolver!==t.resolver?(t.resolver.dispose(),this._queryFetcher&&this._queryFetcher.dispose(),this._refetchSubscription&&this._refetchSubscription.unsubscribe(),this._subscribeToNewResolverAndRerenderIfStoreHasChanged()):this._rerenderIfStoreHasChanged()},f.getDerivedStateFromProps=function(e,r){var n,o=r.prevProps,a=_(e.__relayContext),s=null!==(n=e.__rootIsQueryRenderer)&&void 0!==n&&n,i=x(t,o),l=x(t,e),u=p(t,o),c=p(t,e),f=r.resolver;if(r.prevPropsContext.environment!==a.environment||!y(u,c)||!y(i,l))return{data:(f=R(a,h,t,e,s)).resolve(),localVariables:null,prevProps:e,prevPropsContext:a,contextForChildren:a,relayProp:D(a.environment,r.relayProp.refetch),resolver:f};r.localVariables||f.setProps(e);var d=f.resolve();return d!==r.data?{data:d,prevProps:e}:null},m.componentWillUnmount=function(){this._isUnmounted=!0,this.state.resolver.dispose(),this._queryFetcher&&this._queryFetcher.dispose(),this._refetchSubscription&&this._refetchSubscription.unsubscribe()},m.shouldComponentUpdate=function(e,r){if(r.data!==this.state.data||r.relayProp!==this.state.relayProp)return!0;for(var n=Object.keys(e),o=0;o<n.length;o++){var a=n[o];if("__relayContext"===a){if(this.state.prevPropsContext.environment!==r.prevPropsContext.environment)return!0}else if(!t.hasOwnProperty(a)&&!q(e[a],this.props[a]))return!0}return!1},m._rerenderIfStoreHasChanged=function(){var e=this.state,t=e.data,r=e.resolver.resolve();t!==r&&this.setState({data:r})},m._subscribeToNewResolverAndRerenderIfStoreHasChanged=function(){var e=this.state,t=e.data,r=e.resolver,n=r.resolve();r.setCallback(this.props,this._handleFragmentDataUpdate),t!==n&&this.setState({data:n})},m._getFragmentVariables=function(){return S(t,this.props)},m._getQueryFetcher=function(){return this._queryFetcher||(this._queryFetcher=new v),this._queryFetcher},m.render=function(){var t=this.props,r=t.componentRef,n=(t.__relayContext,t.__rootIsQueryRenderer,(0,a.default)(t,c)),s=this.state,i=s.relayProp,l=s.contextForChildren;return b.createElement(d.Provider,{value:l},b.createElement(e,(0,o.default)({},n,this.state.data,{ref:r,relay:i})))},f}(b.Component),(0,u.default)(n,"displayName",h),n}(e,t,r)}))}}},827:(e,t,r)=>{var n=r(645),o=r(56);function a(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)&&n(e.environment)}e.exports={assertRelayContext:function(e){return a(e)||o(!1,"RelayContext: Expected `context.relay` to be an object conforming to the `RelayContext` interface, got `%s`.",e),e},isRelayContext:a}},74:(e,t,r)=>{var n=r(56);e.exports=function(e,t){for(var r in t&&"object"==typeof t||n(!1,"Could not create Relay Container for `%s`. Expected a set of GraphQL fragments, got `%s` instead.",e,t),t)if(t.hasOwnProperty(r)){var o=t[r];(!o||"object"!=typeof o&&"function"!=typeof o)&&n(!1,"Could not create Relay Container for `%s`. The value of fragment `%s` was expected to be a fragment, got `%s` instead.",e,r,o)}}},89:(e,t,r)=>{var n=(0,r(275).default)(r(924)),o=r(74),a=r(426),s=a.getComponentName,i=a.getContainerName,l=r(888),u=r(239),c=r(56),h=r(156),p=r(658).getFragment,f=h.useContext;e.exports=function(e,t,r){var a=i(e);o(s(e),t);var d={};for(var v in t)d[v]=p(t[v]);var _=r(e,d);function y(e,t){var r,o=f(l);null==o&&c(!1,"`%s` tried to render a context that was not valid this means that `%s` was rendered outside of a query renderer.",a,a);var s=f(u);return h.createElement(_,(0,n.default)({},e,{__relayContext:o,__rootIsQueryRenderer:null!==(r=null==s?void 0:s.rootIsQueryRenderer)&&void 0!==r&&r,componentRef:e.componentRef||t}))}_.displayName=a,y.displayName=a;var b=h.forwardRef(y);return b.__ComponentClass=e,b.displayName=a,b}},416:(e,t,r)=>{var n=(0,r(275).default)(r(175)),o=r(658).getSelector;e.exports=function(e,t){var r={};return Object.keys(e).forEach((function(a){var s,i,l,u=e[a],c=t[a],h=o(u,c),p=null!=h&&"PluralReaderSelector"===h.kind?null!==(s=null===(i=h.selectors[0])||void 0===i?void 0:i.owner.variables)&&void 0!==s?s:{}:null!==(l=null==h?void 0:h.owner.variables)&&void 0!==l?l:{};r=(0,n.default)((0,n.default)({},r),p)})),r}},645:e=>{e.exports=function(e){return"object"==typeof e&&null!==e&&"function"==typeof e.check&&"function"==typeof e.lookup&&"function"==typeof e.retain&&"function"==typeof e.execute&&"function"==typeof e.subscribe}},314:(e,t,r)=>{var n=r(888),o=r(362),a=r(428),s=r(540),i=r(701),l=r(427),u=r(658);e.exports={ConnectionHandler:u.ConnectionHandler,QueryRenderer:i,LocalQueryRenderer:a,MutationTypes:u.MutationTypes,RangeOperations:u.RangeOperations,ReactRelayContext:n,applyOptimisticMutation:u.applyOptimisticMutation,commitLocalUpdate:u.commitLocalUpdate,commitMutation:u.commitMutation,createFragmentContainer:o.createContainer,createPaginationContainer:s.createContainer,createRefetchContainer:l.createContainer,fetchQuery_DEPRECATED:u.fetchQuery_DEPRECATED,graphql:u.graphql,readInlineData:u.readInlineData,requestSubscription:u.requestSubscription}},383:t=>{t.exports=e},311:e=>{e.exports=t},924:e=>{e.exports=r},296:e=>{e.exports=n},275:e=>{e.exports=o},175:e=>{e.exports=a},264:e=>{e.exports=s},125:e=>{e.exports=i},446:e=>{e.exports=l},56:e=>{e.exports=u},156:e=>{e.exports=c},658:e=>{e.exports=h}},f={};return function e(t){var r=f[t];if(void 0!==r)return r.exports;var n=f[t]={exports:{}};return p[t](n,n.exports,e),n.exports}(314)})()));
|
@@ -1,9 +1,9 @@
|
|
1
1
|
/**
|
2
|
-
* Relay v16.
|
2
|
+
* Relay v16.1.0
|
3
3
|
*
|
4
4
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
5
5
|
*
|
6
6
|
* This source code is licensed under the MIT license found in the
|
7
7
|
* LICENSE file in the root directory of this source tree.
|
8
8
|
*/
|
9
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("relay-runtime"),require("react"),require("@babel/runtime/helpers/interopRequireDefault"),require("@babel/runtime/helpers/objectSpread2"),require("@babel/runtime/helpers/defineProperty"),require("invariant"),require("fbjs/lib/areEqual"),require("@babel/runtime/helpers/assertThisInitialized"),require("@babel/runtime/helpers/inheritsLoose"),require("@babel/runtime/helpers/objectWithoutPropertiesLoose"),require("@babel/runtime/helpers/extends"),require("fbjs/lib/warning")):"function"==typeof define&&define.amd?define(["relay-runtime","react","@babel/runtime/helpers/interopRequireDefault","@babel/runtime/helpers/objectSpread2","@babel/runtime/helpers/defineProperty","invariant","fbjs/lib/areEqual","@babel/runtime/helpers/assertThisInitialized","@babel/runtime/helpers/inheritsLoose","@babel/runtime/helpers/objectWithoutPropertiesLoose","@babel/runtime/helpers/extends","fbjs/lib/warning"],t):"object"==typeof exports?exports.ReactRelayLegacy=t(require("relay-runtime"),require("react"),require("@babel/runtime/helpers/interopRequireDefault"),require("@babel/runtime/helpers/objectSpread2"),require("@babel/runtime/helpers/defineProperty"),require("invariant"),require("fbjs/lib/areEqual"),require("@babel/runtime/helpers/assertThisInitialized"),require("@babel/runtime/helpers/inheritsLoose"),require("@babel/runtime/helpers/objectWithoutPropertiesLoose"),require("@babel/runtime/helpers/extends"),require("fbjs/lib/warning")):e.ReactRelayLegacy=t(e["relay-runtime"],e.react,e["@babel/runtime/helpers/interopRequireDefault"],e["@babel/runtime/helpers/objectSpread2"],e["@babel/runtime/helpers/defineProperty"],e.invariant,e["fbjs/lib/areEqual"],e["@babel/runtime/helpers/assertThisInitialized"],e["@babel/runtime/helpers/inheritsLoose"],e["@babel/runtime/helpers/objectWithoutPropertiesLoose"],e["@babel/runtime/helpers/extends"],e["fbjs/lib/warning"])}(window,(function(e,t,r,n,o,a,s,i,u,l,c,h){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=19)}([function(t,r){t.exports=e},function(e,r){e.exports=t},function(e,t){e.exports=r},function(e,t,r){"use strict";var n=r(1),o=r(0).__internal.createRelayContext;e.exports=o(n)},function(e,t){e.exports=n},function(e,t){e.exports=o},function(e,t){e.exports=a},function(e,t){e.exports=s},function(e,t){e.exports=i},function(e,t){e.exports=u},function(e,t,r){"use strict";function n(e){return e.displayName||e.name||"Component"}e.exports={getComponentName:n,getContainerName:function(e){return"Relay("+n(e)+")"}}},function(e,t){e.exports=l},function(e,t,r){"use strict";var n=(0,r(2).default)(r(13)),o=r(21),a=r(10),s=a.getComponentName,i=a.getContainerName,u=r(3),l=r(14),c=r(6),h=r(1),f=r(0).getFragment,p=h.useContext;e.exports=function(e,t,r){var a=i(e);o(s(e),t);var d={};for(var v in t)d[v]=f(t[v]);var _=r(e,d);function b(e,t){var r,o=p(u);null==o&&c(!1);var a=p(l);return h.createElement(_,(0,n.default)({},e,{__relayContext:o,__rootIsQueryRenderer:null!==(r=null==a?void 0:a.rootIsQueryRenderer)&&void 0!==r&&r,componentRef:e.componentRef||t}))}return _.displayName=a,b.displayName=a,h.forwardRef(b)}},function(e,t){e.exports=c},function(e,t,r){"use strict";var n=r(1);e.exports=n.createContext({rootIsQueryRenderer:!1})},function(e,t,r){"use strict";var n=r(22),o=r(6);function a(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)&&n(e.environment)}e.exports={assertRelayContext:function(e){return a(e)||o(!1),e},isRelayContext:a}},function(e,t,r){"use strict";var n=(0,r(2).default)(r(5)),o=r(6),a=r(0),s=a.__internal.fetchQuery,i=a.createOperationDescriptor,u=a.isRelayModernEnvironment,l=function(){function e(e){(0,n.default)(this,"_selectionReferences",[]),(0,n.default)(this,"_didFetchFinish",!1),null!=e&&(this._cacheSelectionReference=e.cacheSelectionReference,this._selectionReferences=e.selectionReferences)}var t=e.prototype;return t.getSelectionReferences=function(){return{cacheSelectionReference:this._cacheSelectionReference,selectionReferences:this._selectionReferences}},t.lookupInStore=function(e,t,r){return"store-and-network"!==r&&"store-or-network"!==r||"available"!==e.check(t).status?null:(this._retainCachedOperation(e,t),e.lookup(t.fragment))},t.getFetchResult=function(){return this._didFetchFinish?null!=this._error?{error:this._error}:null!=this._snapshot?{snapshot:this._snapshot}:void 0:null},t.execute=function(e){var t=this,r=e.environment,n=e.operation,o=e.preservePreviousReferences,a=void 0!==o&&o,i=r.retain(n),l=function(){t._selectionReferences=t._selectionReferences.concat(i)},c=function(){a||t.disposeSelectionReferences(),t._selectionReferences=t._selectionReferences.concat(i)},h=function(){t._selectionReferences=t._selectionReferences.concat(i)};return u(r)?s(r,n).do({error:l,complete:c,unsubscribe:h}):r.execute({operation:n}).do({error:l,complete:c,unsubscribe:h})},t.setOnDataChange=function(e){this._fetchOptions||o(!1),"function"==typeof e&&(this._fetchOptions.onDataChangeCallbacks=this._fetchOptions.onDataChangeCallbacks||[],this._fetchOptions.onDataChangeCallbacks.push(e),this._didFetchFinish&&(null!=this._error?e({error:this._error}):null!=this._snapshot&&e({snapshot:this._snapshot})))},t.fetch=function(e,t){var r,n=this,o=e.environment,a=e.operation,s=e.onDataChange,u=!1;this.disposeRequest();var l=this._fetchOptions&&this._fetchOptions.onDataChangeCallbacks;this._fetchOptions={environment:o,onDataChangeCallbacks:l||[],operation:a},s&&-1===this._fetchOptions.onDataChangeCallbacks.indexOf(s)&&this._fetchOptions.onDataChangeCallbacks.push(s);var c=t?i(a.request.node,a.request.variables,t):a,h=this.execute({environment:o,operation:c}).finally((function(){n._pendingRequest=null})).subscribe({next:function(){n._didFetchFinish=!0,n._error=null,n._onQueryDataAvailable({notifyFirstResult:u})},error:function(e){n._didFetchFinish=!0,n._error=e,n._snapshot=null;var t=n._fetchOptions&&n._fetchOptions.onDataChangeCallbacks;u?t&&t.forEach((function(t){t({error:e})})):r=e}});if(this._pendingRequest={dispose:function(){h.unsubscribe()}},u=!0,r)throw r;return this._snapshot},t.retry=function(e){return this._fetchOptions||o(!1),this.fetch({environment:this._fetchOptions.environment,operation:this._fetchOptions.operation,onDataChange:null},e)},t.dispose=function(){this.disposeRequest(),this.disposeSelectionReferences()},t.disposeRequest=function(){this._error=null,this._snapshot=null,this._pendingRequest&&this._pendingRequest.dispose(),this._rootSubscription&&(this._rootSubscription.dispose(),this._rootSubscription=null)},t._retainCachedOperation=function(e,t){this._disposeCacheSelectionReference(),this._cacheSelectionReference=e.retain(t)},t._disposeCacheSelectionReference=function(){this._cacheSelectionReference&&this._cacheSelectionReference.dispose(),this._cacheSelectionReference=null},t.disposeSelectionReferences=function(){this._disposeCacheSelectionReference(),this._selectionReferences.forEach((function(e){return e.dispose()})),this._selectionReferences=[]},t._onQueryDataAvailable=function(e){var t=this,r=e.notifyFirstResult;this._fetchOptions||o(!1);var n=this._fetchOptions,a=n.environment,s=n.onDataChangeCallbacks,i=n.operation;if(!this._snapshot&&(this._snapshot=a.lookup(i.fragment),this._rootSubscription=a.subscribe(this._snapshot,(function(e){if(null!=t._fetchOptions){var r=t._fetchOptions.onDataChangeCallbacks;Array.isArray(r)&&r.forEach((function(t){return t({snapshot:e})}))}})),this._snapshot&&r&&Array.isArray(s))){var u=this._snapshot;s.forEach((function(e){return e({snapshot:u})}))}},e}();e.exports=l},function(e,t,r){"use strict";var n=(0,r(2).default)(r(4)),o=r(0).getSelector;e.exports=function(e,t){var r={};return Object.keys(e).forEach((function(a){var s,i,u,l=e[a],c=t[a],h=o(l,c),f=null!=h&&"PluralReaderSelector"===h.kind?null!==(s=null===(i=h.selectors[0])||void 0===i?void 0:i.owner.variables)&&void 0!==s?s:{}:null!==(u=null==h?void 0:h.owner.variables)&&void 0!==u?u:{};r=(0,n.default)((0,n.default)({},r),f)})),r}},function(e,t){e.exports=h},function(e,t,r){"use strict";var n=r(3),o=r(20),a=r(23),s=r(24),i=r(25),u=r(26),l=r(0);e.exports={ConnectionHandler:l.ConnectionHandler,QueryRenderer:i,LocalQueryRenderer:a,MutationTypes:l.MutationTypes,RangeOperations:l.RangeOperations,ReactRelayContext:n,applyOptimisticMutation:l.applyOptimisticMutation,commitLocalUpdate:l.commitLocalUpdate,commitMutation:l.commitMutation,createFragmentContainer:o.createContainer,createPaginationContainer:s.createContainer,createRefetchContainer:u.createContainer,fetchQuery_DEPRECATED:l.fetchQuery_DEPRECATED,graphql:l.graphql,readInlineData:l.readInlineData,requestSubscription:l.requestSubscription}},function(e,t,r){"use strict";var n=r(2).default,o=n(r(4)),a=n(r(11)),s=n(r(8)),i=n(r(9)),u=n(r(5)),l=["componentRef","__relayContext","__rootIsQueryRenderer"],c=r(12),h=r(10).getContainerName,f=r(15).assertRelayContext,p=r(7),d=r(1),v=r(0),_=v.createFragmentSpecResolver,b=v.getDataIDsFromObject,y=v.isScalarAndEqual;function m(e,t){var r,n=h(e);return r=function(r){function c(e){var o,a;a=r.call(this,e)||this,(0,u.default)((0,s.default)(a),"_handleFragmentDataUpdate",(function(){var e=a.state.resolver;a.setState((function(t){return e===t.resolver?{data:t.resolver.resolve(),relayProp:C(t.relayProp.environment)}:null}))}));var i=f(e.__relayContext),l=null!==(o=e.__rootIsQueryRenderer)&&void 0!==o&&o,c=_(i,n,t,e,l);return a.state={data:c.resolve(),prevProps:e,prevPropsContext:i,relayProp:C(i.environment),resolver:c},a}(0,i.default)(c,r),c.getDerivedStateFromProps=function(e,r){var o,a=r.prevProps,s=f(e.__relayContext),i=null!==(o=e.__rootIsQueryRenderer)&&void 0!==o&&o,u=b(t,a),l=b(t,e),c=r.resolver;if(r.prevPropsContext.environment!==s.environment||!p(u,l))return{data:(c=_(s,n,t,e,i)).resolve(),prevPropsContext:s,prevProps:e,relayProp:C(s.environment),resolver:c};c.setProps(e);var h=c.resolve();return h!==r.data?{data:h,prevProps:e,prevPropsContext:s,relayProp:C(s.environment)}:null};var h=c.prototype;return h.componentDidMount=function(){this._subscribeToNewResolverAndRerenderIfStoreHasChanged()},h.componentDidUpdate=function(e,t){this.state.resolver!==t.resolver?(t.resolver.dispose(),this._subscribeToNewResolverAndRerenderIfStoreHasChanged()):this._rerenderIfStoreHasChanged()},h.componentWillUnmount=function(){this.state.resolver.dispose()},h.shouldComponentUpdate=function(e,r){if(r.data!==this.state.data)return!0;for(var n=Object.keys(e),o=0;o<n.length;o++){var a=n[o];if("__relayContext"===a){if(r.prevPropsContext.environment!==this.state.prevPropsContext.environment)return!0}else if(!t.hasOwnProperty(a)&&!y(e[a],this.props[a]))return!0}return!1},h._rerenderIfStoreHasChanged=function(){var e=this.state,t=e.data,r=e.resolver.resolve();t!==r&&this.setState({data:r})},h._subscribeToNewResolverAndRerenderIfStoreHasChanged=function(){var e=this.state,t=e.data,r=e.resolver,n=r.resolve();r.setCallback(this.props,this._handleFragmentDataUpdate),t!==n&&this.setState({data:n})},h.render=function(){var t=this.props,r=t.componentRef,n=(t.__relayContext,t.__rootIsQueryRenderer,(0,a.default)(t,l));return d.createElement(e,(0,o.default)((0,o.default)((0,o.default)({},n),this.state.data),{},{ref:r,relay:this.state.relayProp}))},c}(d.Component),(0,u.default)(r,"displayName",n),r}function C(e){return{environment:e}}e.exports={createContainer:function(e,t){return c(e,t,m)}}},function(e,t,r){"use strict";var n=r(6);e.exports=function(e,t){for(var r in t&&"object"==typeof t||n(!1),t)if(t.hasOwnProperty(r)){var o=t[r];(!o||"object"!=typeof o&&"function"!=typeof o)&&n(!1)}}},function(e,t,r){"use strict";e.exports=function(e){return"object"==typeof e&&null!==e&&"function"==typeof e.check&&"function"==typeof e.lookup&&"function"==typeof e.retain&&"function"==typeof e.execute&&"function"==typeof e.subscribe}},function(e,t,r){"use strict";var n=r(3),o=r(14),a=r(7),s=r(1),i=r(0),u=i.createOperationDescriptor,l=(i.deepFreeze,i.getRequest),c=s.useLayoutEffect,h=s.useState,f=s.useRef,p=s.useMemo,d={rootIsQueryRenderer:!0};e.exports=function(e){var t,r,i=e.environment,v=e.query,_=e.variables,b=e.render,y=(t=_,r=s.useRef(t),a(r.current,t)||(r.current=t),r.current),m=p((function(){var e=l(v);return u(e,y)}),[v,y]),C=p((function(){return{environment:i}}),[i]),R=f(null),g=h(null)[1],S=f(null),x=p((function(){i.check(m);var e=i.lookup(m.fragment);R.current=e.data;var t=i.retain(m),r=i.subscribe(e,(function(e){R.current=e.data,g(R.current)})),n=!1;return S.current&&S.current(),S.current=function(){n||(n=!0,S.current=null,t.dispose(),r.dispose())},e}),[i,m]);return c((function(){var e=S.current;return function(){e&&e()}}),[x]),s.createElement(n.Provider,{value:C},s.createElement(o.Provider,{value:d},b({props:R.current})))}},function(e,t,r){"use strict";var n=r(2).default,o=n(r(13)),a=n(r(11)),s=n(r(8)),i=n(r(9)),u=n(r(5)),l=n(r(4)),c=["componentRef"],h=["componentRef","__relayContext","__rootIsQueryRenderer"],f=["componentRef","__relayContext","__rootIsQueryRenderer"],p=r(12),d=r(17),v=r(10),_=v.getComponentName,b=v.getContainerName,y=r(3),m=r(16),C=r(15).assertRelayContext,R=r(7),g=r(6),S=r(1),x=r(0),q=x.ConnectionInterface,P=x.Observable,F=x.RelayFeatureFlags,O=x.createFragmentSpecResolver,D=x.createOperationDescriptor,I=x.getDataIDsFromObject,E=x.getRequest,A=x.getVariablesFromObject,N=x.isScalarAndEqual;r(18);function j(e){return"function"==typeof e?{error:e,complete:e,unsubscribe:function(t){"function"==typeof e&&e()}}:e||{}}function U(e,t,r){_(e);var n,p=b(e),v=function(e){var t=null,r=!1;for(var n in e){var o=e[n],a=o.metadata&&o.metadata.connection;void 0!==o.metadata&&(r=!0),a&&(1!==a.length&&g(!1),t&&g(!1),t=(0,l.default)((0,l.default)({},a[0]),{},{fragmentName:n}))}return r&&null===t&&g(!1),t||{}}(t),x=r.getConnectionFromProps||function(e){var t=e.path;return t||g(!1),function(r){for(var n=r[e.fragmentName],o=0;o<t.length;o++){if(!n||"object"!=typeof n)return null;n=n[t[o]]}return n}}(v),U=r.direction||v.direction;U||g(!1);var M=r.getFragmentVariables||function(e){var t=e.count;return t||g(!1),function(e,r){return(0,l.default)((0,l.default)({},e),{},(0,u.default)({},t,r))}}(v);return n=function(n){function v(e){var r,o;o=n.call(this,e)||this,(0,u.default)((0,s.default)(o),"_handleFragmentDataUpdate",(function(){o.setState({data:o._resolver.resolve()})})),(0,u.default)((0,s.default)(o),"_hasMore",(function(){var e=o._getConnectionData();return!!(e&&e.hasMore&&e.cursor)})),(0,u.default)((0,s.default)(o),"_isLoading",(function(){return!!o._refetchSubscription})),(0,u.default)((0,s.default)(o),"_refetchConnection",(function(e,t,r){if(!o._canFetchPage("refetchConnection"))return{dispose:function(){}};o._refetchVariables=r;var n={count:e,cursor:null,totalCount:e};return{dispose:o._fetchPage(n,j(t),{force:!0}).unsubscribe}})),(0,u.default)((0,s.default)(o),"_loadMore",(function(e,t,r){if(!o._canFetchPage("loadMore"))return{dispose:function(){}};var n=j(t),a=o._getConnectionData();if(!a)return P.create((function(e){return e.complete()})).subscribe(n),null;var s=a.edgeCount+e;if(r&&r.force)return o._refetchConnection(s,t);var i=q.get(),u=(i.END_CURSOR,i.START_CURSOR,{count:e,cursor:a.cursor,totalCount:s});return{dispose:o._fetchPage(u,n,r).unsubscribe}}));var a=C(e.__relayContext),i=null!==(r=e.__rootIsQueryRenderer)&&void 0!==r&&r;return o._isARequestInFlight=!1,o._refetchSubscription=null,o._refetchVariables=null,!0===F.ENABLE_CONTAINERS_SUBSCRIBE_ON_COMMIT?o._resolver=O(a,p,t,e,i):o._resolver=O(a,p,t,e,i,o._handleFragmentDataUpdate),o.state={data:o._resolver.resolve(),prevContext:a,contextForChildren:a,relayProp:o._buildRelayProp(a),resolverGeneration:0},o._isUnmounted=!1,o._hasFetched=!1,o}(0,i.default)(v,n);var _=v.prototype;return _.componentDidMount=function(){this._isUnmounted=!1,!0===F.ENABLE_CONTAINERS_SUBSCRIBE_ON_COMMIT&&this._subscribeToNewResolverAndRerenderIfStoreHasChanged()},_.componentDidUpdate=function(e,t){!0===F.ENABLE_CONTAINERS_SUBSCRIBE_ON_COMMIT&&(t.resolverGeneration!==this.state.resolverGeneration?this._subscribeToNewResolverAndRerenderIfStoreHasChanged():this._rerenderIfStoreHasChanged())},_.UNSAFE_componentWillReceiveProps=function(e){var r,n=this,o=C(e.__relayContext),a=null!==(r=e.__rootIsQueryRenderer)&&void 0!==r&&r,s=I(t,this.props),i=I(t,e),u=d(t,this.props),l=d(t,e);o.environment===this.state.prevContext.environment&&R(u,l)&&R(s,i)?this._hasFetched||this._resolver.setProps(e):(this._cleanup(),!0===F.ENABLE_CONTAINERS_SUBSCRIBE_ON_COMMIT?this._resolver=O(o,p,t,e,a):this._resolver=O(o,p,t,e,a,this._handleFragmentDataUpdate),this.setState((function(e){return{prevContext:o,contextForChildren:o,relayProp:n._buildRelayProp(o),resolverGeneration:e.resolverGeneration+1}})));var c=this._resolver.resolve();c!==this.state.data&&this.setState({data:c})},_.componentWillUnmount=function(){this._isUnmounted=!0,this._cleanup()},_.shouldComponentUpdate=function(e,r){if(r.data!==this.state.data||r.relayProp!==this.state.relayProp||r.resolverGeneration!==this.state.resolverGeneration)return!0;for(var n=Object.keys(e),o=0;o<n.length;o++){var a=n[o];if("__relayContext"===a){if(r.prevContext.environment!==this.state.prevContext.environment)return!0}else if(!t.hasOwnProperty(a)&&!N(e[a],this.props[a]))return!0}return!1},_._buildRelayProp=function(e){return{hasMore:this._hasMore,isLoading:this._isLoading,loadMore:this._loadMore,refetchConnection:this._refetchConnection,environment:e.environment}},_._rerenderIfStoreHasChanged=function(){var e=this.state.data,t=this._resolver.resolve();e!==t&&this.setState({data:t})},_._subscribeToNewResolverAndRerenderIfStoreHasChanged=function(){var e=this.state.data,t=this._resolver.resolve();this._resolver.setCallback(this.props,this._handleFragmentDataUpdate),e!==t&&this.setState({data:t})},_._getConnectionData=function(){var e=this.props,t=(e.componentRef,(0,a.default)(e,c)),r=(0,l.default)((0,l.default)({},t),this.state.data),n=x(r);if(null==n)return null;var o=q.get(),s=o.EDGES,i=o.PAGE_INFO,u=o.HAS_NEXT_PAGE,h=o.HAS_PREV_PAGE,f=o.END_CURSOR,p=o.START_CURSOR;"object"!=typeof n&&g(!1);var d=n[s],v=n[i];if(null==d||null==v)return null;Array.isArray(d)||g(!1),"object"!=typeof v&&g(!1);var _="forward"===U?v[u]:v[h],b="forward"===U?v[f]:v[p];return"boolean"!=typeof _||0!==d.length&&void 0===b?null:{cursor:b,edgeCount:d.length,hasMore:_}},_._getQueryFetcher=function(){return this._queryFetcher||(this._queryFetcher=new m),this._queryFetcher},_._canFetchPage=function(e){return!this._isUnmounted},_._fetchPage=function(e,n,o){var s,i=this,u=C(this.props.__relayContext).environment,c=this.props,f=(c.componentRef,c.__relayContext,c.__rootIsQueryRenderer,(0,a.default)(c,h)),p=(0,l.default)((0,l.default)({},f),this.state.data),v=d(t,f);s=A(t,f),s=(0,l.default)((0,l.default)((0,l.default)({},v),s),this._refetchVariables);var _=r.getVariables(p,{count:e.count,cursor:e.cursor},s);("object"!=typeof _||null===_)&&g(!1),_=(0,l.default)((0,l.default)({},_),this._refetchVariables),s=(0,l.default)((0,l.default)({},_),s);var b=o?{force:!!o.force}:void 0;null!=b&&null!=(null==o?void 0:o.metadata)&&(b.metadata=null==o?void 0:o.metadata);var y=E(r.query),m=D(y,_,b),S=null;this._refetchSubscription&&this._refetchSubscription.unsubscribe(),this._hasFetched=!0;var x=function(){i._refetchSubscription===S&&(i._refetchSubscription=null,i._isARequestInFlight=!1)};return this._isARequestInFlight=!0,S=this._getQueryFetcher().execute({environment:u,operation:m,preservePreviousReferences:!0}).mergeMap((function(t){return P.create((function(t){!function(t,r){var n=i._resolver.resolve();i._resolver.setVariables(M(s,e.totalCount),m.request.node);var o=i._resolver.resolve();R(n,o)?r():i.setState({data:o,contextForChildren:{environment:i.props.__relayContext.environment}},r)}(0,(function(){t.next(),t.complete()}))}))})).do({error:x,complete:x,unsubscribe:x}).subscribe(n||{}),this._refetchSubscription=this._isARequestInFlight?S:null,S},_._cleanup=function(){this._resolver.dispose(),this._refetchVariables=null,this._hasFetched=!1,this._refetchSubscription&&(this._refetchSubscription.unsubscribe(),this._refetchSubscription=null,this._isARequestInFlight=!1),this._queryFetcher&&this._queryFetcher.dispose()},_.render=function(){var t=this.props,r=t.componentRef,n=(t.__relayContext,t.__rootIsQueryRenderer,(0,a.default)(t,f));return S.createElement(y.Provider,{value:this.state.contextForChildren},S.createElement(e,(0,o.default)({},n,this.state.data,{ref:r,relay:this.state.relayProp})))},v}(S.Component),(0,u.default)(n,"displayName",p),n}e.exports={createContainer:function(e,t,r){return p(e,t,(function(e,t){return U(e,t,r)}))}}},function(e,t,r){"use strict";var n=r(2).default,o=n(r(4)),a=n(r(8)),s=n(r(9)),i=n(r(5)),u=r(3),l=r(16),c=r(14),h=r(7),f=r(1),p=r(0),d=p.createOperationDescriptor,v=(p.deepFreeze,p.getRequest),_={},b={rootIsQueryRenderer:!0},y=function(e){function t(t){var r;r=e.call(this,t)||this,(0,i.default)((0,a.default)(r),"_handleDataChange",(function(e){var t=null==e.error?null:e.error,n=null==e.snapshot?null:e.snapshot;r.setState((function(e){var r=e.requestCacheKey;return r&&delete _[r],n===e.snapshot&&t===e.error?null:{renderProps:m(t,n,e.queryFetcher,e.retryCallbacks),snapshot:n,requestCacheKey:null}}))}));var n,s,u={handleDataChange:null,handleRetryAfterError:null};if(t.query){var c=t.query;s=C(v(c).params,t.variables),n=_[s]?_[s].queryFetcher:new l}else n=new l;return r._maybeHiddenOrFastRefresh=!1,r.state=(0,o.default)({prevPropsEnvironment:t.environment,prevPropsVariables:t.variables,prevQuery:t.query,queryFetcher:n,retryCallbacks:u},g(t,n,u,s)),r}(0,s.default)(t,e),t.getDerivedStateFromProps=function(e,t){return t.prevQuery===e.query&&t.prevPropsEnvironment===e.environment&&h(t.prevPropsVariables,e.variables)?null:R(e,t)};var r=t.prototype;return r.componentDidMount=function(){var e=this;if(!0===this._maybeHiddenOrFastRefresh)return this._maybeHiddenOrFastRefresh=!1,void this.setState((function(t){var r=R(e.props,t),n=r.requestCacheKey,o=r.queryFetcher;return null!=n&&null!=_[n]&&o.setOnDataChange(e._handleDataChange),r}));var t=this.state,r=t.retryCallbacks,n=t.queryFetcher,o=t.requestCacheKey;o&&delete _[o],r.handleDataChange=this._handleDataChange,r.handleRetryAfterError=function(t){return e.setState((function(e){var t=e.requestCacheKey;return t&&delete _[t],{renderProps:{error:null,props:null,retry:null},requestCacheKey:null}}))},this.props.query&&n.setOnDataChange(this._handleDataChange)},r.componentDidUpdate=function(e,t){var r=this.state,n=r.queryFetcher,o=r.requestCacheKey;o&&(delete _[o],delete this.state.requestCacheKey),this.props.query&&n!==t.queryFetcher&&n.setOnDataChange(this._handleDataChange)},r.componentWillUnmount=function(){this.state.queryFetcher.dispose(),this._maybeHiddenOrFastRefresh=!0},r.shouldComponentUpdate=function(e,t){return e.render!==this.props.render||t.renderProps!==this.state.renderProps},r.render=function(){var e=this.state,t=e.renderProps,r=e.relayContext;return f.createElement(u.Provider,{value:r},f.createElement(c.Provider,{value:b},this.props.render(t)))},t}(f.Component);function m(e,t,r,n){return{error:e||null,props:t?t.data:null,retry:function(t){var o=r.retry(t);o&&"function"==typeof n.handleDataChange?n.handleDataChange({snapshot:o}):e&&"function"==typeof n.handleRetryAfterError&&n.handleRetryAfterError(e)}}}function C(e,t){return JSON.stringify({id:e.cacheID?e.cacheID:e.id,variables:t})}function R(e,t){var r,n=e.query,a=t.queryFetcher.getSelectionReferences();if(t.queryFetcher.disposeRequest(),n){var s=C(v(n).params,e.variables);r=_[s]?_[s].queryFetcher:new l(a)}else r=new l(a);return(0,o.default)({prevQuery:e.query,prevPropsEnvironment:e.environment,prevPropsVariables:e.variables,queryFetcher:r},g(e,r,t.retryCallbacks))}function g(e,t,r,n){var o=e.environment,a=e.query,s=e.variables,i=e.cacheConfig,u=o;if(!a)return t.dispose(),{error:null,relayContext:{environment:u},renderProps:{error:null,props:{},retry:null},requestCacheKey:null};var l=v(a),c=d(l,s,i),h={environment:u};if("string"==typeof n&&_[n]){var f=_[n].snapshot;return f?{error:null,relayContext:h,renderProps:m(null,f,t,r),snapshot:f,requestCacheKey:n}:{error:null,relayContext:h,renderProps:{error:null,props:null,retry:null},snapshot:null,requestCacheKey:n}}try{var p=t.lookupInStore(u,c,e.fetchPolicy),b=t.fetch({environment:u,onDataChange:null,operation:c})||p;return n=n||C(l.params,e.variables),_[n]={queryFetcher:t,snapshot:b},b?{error:null,relayContext:h,renderProps:m(null,b,t,r),snapshot:b,requestCacheKey:n}:{error:null,relayContext:h,renderProps:{error:null,props:null,retry:null},snapshot:null,requestCacheKey:n}}catch(e){return{error:e,relayContext:h,renderProps:m(e,null,t,r),snapshot:null,requestCacheKey:n}}}e.exports=y},function(e,t,r){"use strict";var n=r(2).default,o=n(r(13)),a=n(r(11)),s=n(r(4)),i=n(r(8)),u=n(r(9)),l=n(r(5)),c=["componentRef","__relayContext","__rootIsQueryRenderer"],h=r(12),f=r(17),p=r(10).getContainerName,d=r(3),v=r(16),_=r(15).assertRelayContext,b=r(7),y=r(1),m=r(0),C=m.Observable,R=m.createFragmentSpecResolver,g=m.createOperationDescriptor,S=m.getDataIDsFromObject,x=m.getRequest,q=m.getVariablesFromObject,P=m.isScalarAndEqual;r(18);function F(e,t){return{environment:e,refetch:t}}e.exports={createContainer:function(e,t,r){return h(e,t,(function(e,t){return function(e,t,r){var n,h=p(e);return n=function(n){function p(e){var o,a;a=n.call(this,e)||this,(0,l.default)((0,i.default)(a),"_handleFragmentDataUpdate",(function(){var e=a.state.resolver;a.setState((function(t){return e===t.resolver?{data:t.resolver.resolve()}:null}))})),(0,l.default)((0,i.default)(a),"_refetch",(function(e,n,o,i){if(a._isUnmounted)return{dispose:function(){}};var u=_(a.props.__relayContext).environment,l=f(t,a.props),c="function"==typeof e?e(a._getFragmentVariables()):e;c=(0,s.default)((0,s.default)({},l),c);var h=n?(0,s.default)((0,s.default)({},c),n):c,p=i?{force:!!i.force}:void 0;null!=p&&null!=(null==i?void 0:i.metadata)&&(p.metadata=null==i?void 0:i.metadata);var d,v="function"==typeof o?{next:o,error:o}:o||{},b=x(r),y=g(b,c,p);return a.state.localVariables=c,a._refetchSubscription&&a._refetchSubscription.unsubscribe(),null!=a._getQueryFetcher().lookupInStore(u,y,null==i?void 0:i.fetchPolicy)?(a.state.resolver.setVariables(h,y.request.node),a.setState((function(e){return{data:e.resolver.resolve(),contextForChildren:{environment:a.props.__relayContext.environment}}}),(function(){v.next&&v.next(),v.complete&&v.complete()})),{dispose:function(){}}):(a._getQueryFetcher().execute({environment:u,operation:y,preservePreviousReferences:!0}).mergeMap((function(e){return a.state.resolver.setVariables(h,y.request.node),C.create((function(e){return a.setState((function(e){return{data:e.resolver.resolve(),contextForChildren:{environment:a.props.__relayContext.environment}}}),(function(){e.next(),e.complete()}))}))})).finally((function(){a._refetchSubscription===d&&(a._refetchSubscription=null)})).subscribe((0,s.default)((0,s.default)({},v),{},{start:function(e){a._refetchSubscription=d=e,v.start&&v.start(e)}})),{dispose:function(){d&&d.unsubscribe()}})}));var u=_(e.__relayContext),c=null!==(o=e.__rootIsQueryRenderer)&&void 0!==o&&o;a._refetchSubscription=null;var p=R(u,h,t,e,c);return a.state={data:p.resolve(),localVariables:null,prevProps:e,prevPropsContext:u,contextForChildren:u,relayProp:F(u.environment,a._refetch),resolver:p},a._isUnmounted=!1,a}(0,u.default)(p,n);var m=p.prototype;return m.componentDidMount=function(){this._isUnmounted=!1,this._subscribeToNewResolverAndRerenderIfStoreHasChanged()},m.componentDidUpdate=function(e,t){this.state.resolver!==t.resolver?(t.resolver.dispose(),this._queryFetcher&&this._queryFetcher.dispose(),this._refetchSubscription&&this._refetchSubscription.unsubscribe(),this._subscribeToNewResolverAndRerenderIfStoreHasChanged()):this._rerenderIfStoreHasChanged()},p.getDerivedStateFromProps=function(e,r){var n,o=r.prevProps,a=_(e.__relayContext),s=null!==(n=e.__rootIsQueryRenderer)&&void 0!==n&&n,i=S(t,o),u=S(t,e),l=f(t,o),c=f(t,e),p=r.resolver;if(r.prevPropsContext.environment!==a.environment||!b(l,c)||!b(i,u))return{data:(p=R(a,h,t,e,s)).resolve(),localVariables:null,prevProps:e,prevPropsContext:a,contextForChildren:a,relayProp:F(a.environment,r.relayProp.refetch),resolver:p};r.localVariables||p.setProps(e);var d=p.resolve();return d!==r.data?{data:d,prevProps:e}:null},m.componentWillUnmount=function(){this._isUnmounted=!0,this.state.resolver.dispose(),this._queryFetcher&&this._queryFetcher.dispose(),this._refetchSubscription&&this._refetchSubscription.unsubscribe()},m.shouldComponentUpdate=function(e,r){if(r.data!==this.state.data||r.relayProp!==this.state.relayProp)return!0;for(var n=Object.keys(e),o=0;o<n.length;o++){var a=n[o];if("__relayContext"===a){if(this.state.prevPropsContext.environment!==r.prevPropsContext.environment)return!0}else if(!t.hasOwnProperty(a)&&!P(e[a],this.props[a]))return!0}return!1},m._rerenderIfStoreHasChanged=function(){var e=this.state,t=e.data,r=e.resolver.resolve();t!==r&&this.setState({data:r})},m._subscribeToNewResolverAndRerenderIfStoreHasChanged=function(){var e=this.state,t=e.data,r=e.resolver,n=r.resolve();r.setCallback(this.props,this._handleFragmentDataUpdate),t!==n&&this.setState({data:n})},m._getFragmentVariables=function(){return q(t,this.props)},m._getQueryFetcher=function(){return this._queryFetcher||(this._queryFetcher=new v),this._queryFetcher},m.render=function(){var t=this.props,r=t.componentRef,n=(t.__relayContext,t.__rootIsQueryRenderer,(0,a.default)(t,c)),s=this.state,i=s.relayProp,u=s.contextForChildren;return y.createElement(d.Provider,{value:u},y.createElement(e,(0,o.default)({},n,this.state.data,{ref:r,relay:i})))},p}(y.Component),(0,l.default)(n,"displayName",h),n}(e,t,r)}))}}}])}));
|
9
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@babel/runtime/helpers/assertThisInitialized"),require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/extends"),require("@babel/runtime/helpers/inheritsLoose"),require("@babel/runtime/helpers/interopRequireDefault"),require("@babel/runtime/helpers/objectSpread2"),require("@babel/runtime/helpers/objectWithoutPropertiesLoose"),require("fbjs/lib/areEqual"),require("fbjs/lib/warning"),require("invariant"),require("react"),require("relay-runtime")):"function"==typeof define&&define.amd?define(["@babel/runtime/helpers/assertThisInitialized","@babel/runtime/helpers/defineProperty","@babel/runtime/helpers/extends","@babel/runtime/helpers/inheritsLoose","@babel/runtime/helpers/interopRequireDefault","@babel/runtime/helpers/objectSpread2","@babel/runtime/helpers/objectWithoutPropertiesLoose","fbjs/lib/areEqual","fbjs/lib/warning","invariant","react","relay-runtime"],t):"object"==typeof exports?exports.ReactRelayLegacy=t(require("@babel/runtime/helpers/assertThisInitialized"),require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/extends"),require("@babel/runtime/helpers/inheritsLoose"),require("@babel/runtime/helpers/interopRequireDefault"),require("@babel/runtime/helpers/objectSpread2"),require("@babel/runtime/helpers/objectWithoutPropertiesLoose"),require("fbjs/lib/areEqual"),require("fbjs/lib/warning"),require("invariant"),require("react"),require("relay-runtime")):e.ReactRelayLegacy=t(e["@babel/runtime/helpers/assertThisInitialized"],e["@babel/runtime/helpers/defineProperty"],e["@babel/runtime/helpers/extends"],e["@babel/runtime/helpers/inheritsLoose"],e["@babel/runtime/helpers/interopRequireDefault"],e["@babel/runtime/helpers/objectSpread2"],e["@babel/runtime/helpers/objectWithoutPropertiesLoose"],e["fbjs/lib/areEqual"],e["fbjs/lib/warning"],e.invariant,e.react,e["relay-runtime"])}(self,((e,t,r,n,o,a,s,i,u,l,c,h)=>(()=>{"use strict";var p={426:e=>{function t(e){return e.displayName||e.name||"Component"}e.exports={getComponentName:t,getContainerName:function(e){return"Relay("+t(e)+")"}}},888:(e,t,r)=>{var n=r(156),o=r(658).__internal.createRelayContext;e.exports=o(n)},362:(e,t,r)=>{var n=r(275).default,o=n(r(175)),a=n(r(264)),s=n(r(383)),i=n(r(296)),u=n(r(311)),l=["componentRef","__relayContext","__rootIsQueryRenderer"],c=r(89),h=r(426).getContainerName,p=r(827).assertRelayContext,f=r(125),d=r(156),v=r(658),_=v.createFragmentSpecResolver,b=v.getDataIDsFromObject,y=v.isScalarAndEqual;function m(e,t){var r,n=h(e);return r=function(r){function c(e){var o,a;a=r.call(this,e)||this,(0,u.default)((0,s.default)(a),"_handleFragmentDataUpdate",(function(){var e=a.state.resolver;a.setState((function(t){return e===t.resolver?{data:t.resolver.resolve(),relayProp:C(t.relayProp.environment)}:null}))}));var i=p(e.__relayContext),l=null!==(o=e.__rootIsQueryRenderer)&&void 0!==o&&o,c=_(i,n,t,e,l);return a.state={data:c.resolve(),prevProps:e,prevPropsContext:i,relayProp:C(i.environment),resolver:c},a}(0,i.default)(c,r),c.getDerivedStateFromProps=function(e,r){var o,a=r.prevProps,s=p(e.__relayContext),i=null!==(o=e.__rootIsQueryRenderer)&&void 0!==o&&o,u=b(t,a),l=b(t,e),c=r.resolver;if(r.prevPropsContext.environment!==s.environment||!f(u,l))return{data:(c=_(s,n,t,e,i)).resolve(),prevPropsContext:s,prevProps:e,relayProp:C(s.environment),resolver:c};c.setProps(e);var h=c.resolve();return h!==r.data?{data:h,prevProps:e,prevPropsContext:s,relayProp:C(s.environment)}:null};var h=c.prototype;return h.componentDidMount=function(){this._subscribeToNewResolverAndRerenderIfStoreHasChanged()},h.componentDidUpdate=function(e,t){this.state.resolver!==t.resolver?(t.resolver.dispose(),this._subscribeToNewResolverAndRerenderIfStoreHasChanged()):this._rerenderIfStoreHasChanged()},h.componentWillUnmount=function(){this.state.resolver.dispose()},h.shouldComponentUpdate=function(e,r){if(r.data!==this.state.data)return!0;for(var n=Object.keys(e),o=0;o<n.length;o++){var a=n[o];if("__relayContext"===a){if(r.prevPropsContext.environment!==this.state.prevPropsContext.environment)return!0}else if(!t.hasOwnProperty(a)&&!y(e[a],this.props[a]))return!0}return!1},h._rerenderIfStoreHasChanged=function(){var e=this.state,t=e.data,r=e.resolver.resolve();t!==r&&this.setState({data:r})},h._subscribeToNewResolverAndRerenderIfStoreHasChanged=function(){var e=this.state,t=e.data,r=e.resolver,n=r.resolve();r.setCallback(this.props,this._handleFragmentDataUpdate),t!==n&&this.setState({data:n})},h.render=function(){var t=this.props,r=t.componentRef,n=(t.__relayContext,t.__rootIsQueryRenderer,(0,a.default)(t,l));return d.createElement(e,(0,o.default)((0,o.default)((0,o.default)({},n),this.state.data),{},{ref:r,relay:this.state.relayProp}))},c}(d.Component),(0,u.default)(r,"displayName",n),r}function C(e){return{environment:e}}e.exports={createContainer:function(e,t){return c(e,t,m)}}},428:(e,t,r)=>{var n=r(888),o=r(239),a=r(125),s=r(156),i=r(658),u=i.createOperationDescriptor,l=(i.deepFreeze,i.getRequest),c=s.useLayoutEffect,h=s.useState,p=s.useRef,f=s.useMemo,d={rootIsQueryRenderer:!0};e.exports=function(e){var t,r,i=e.environment,v=e.query,_=e.variables,b=e.render,y=(t=_,r=s.useRef(t),a(r.current,t)||(r.current=t),r.current),m=f((function(){var e=l(v);return u(e,y)}),[v,y]),C=f((function(){return{environment:i}}),[i]),R=p(null),g=h(null)[1],x=p(null),S=f((function(){i.check(m);var e=i.lookup(m.fragment);R.current=e.data;var t=i.retain(m),r=i.subscribe(e,(function(e){R.current=e.data,g(R.current)})),n=!1;return x.current&&x.current(),x.current=function(){n||(n=!0,x.current=null,t.dispose(),r.dispose())},e}),[i,m]);return c((function(){var e=x.current;return function(){e&&e()}}),[S]),s.createElement(n.Provider,{value:C},s.createElement(o.Provider,{value:d},b({props:R.current})))}},540:(e,t,r)=>{var n=r(275).default,o=n(r(924)),a=n(r(264)),s=n(r(383)),i=n(r(296)),u=n(r(311)),l=n(r(175)),c=["componentRef"],h=["componentRef","__relayContext","__rootIsQueryRenderer"],p=["componentRef","__relayContext","__rootIsQueryRenderer"],f=r(89),d=r(416),v=r(426),_=v.getComponentName,b=v.getContainerName,y=r(888),m=r(733),C=r(827).assertRelayContext,R=r(125),g=r(56),x=r(156),S=r(658),q=S.ConnectionInterface,P=S.Observable,F=S.RelayFeatureFlags,D=S.createFragmentSpecResolver,O=S.createOperationDescriptor,I=S.getDataIDsFromObject,E=S.getRequest,A=S.getVariablesFromObject,N=S.isScalarAndEqual,U=(r(446),"forward");function j(e){return"function"==typeof e?{error:e,complete:e,unsubscribe:function(t){"function"==typeof e&&e()}}:e||{}}e.exports={createContainer:function(e,t,r){return f(e,t,(function(e,t){return function(e,t,r){_(e);var n,f=b(e),v=function(e){var t=null,r=!1;for(var n in e){var o=e[n],a=o.metadata&&o.metadata.connection;void 0!==o.metadata&&(r=!0),a&&(1!==a.length&&g(!1),t&&g(!1),t=(0,l.default)((0,l.default)({},a[0]),{},{fragmentName:n}))}return r&&null===t&&g(!1),t||{}}(t),S=r.getConnectionFromProps||function(e){var t=e.path;return t||g(!1),function(r){for(var n=r[e.fragmentName],o=0;o<t.length;o++){if(!n||"object"!=typeof n)return null;n=n[t[o]]}return n}}(v),k=r.direction||v.direction;k||g(!1);var Q=r.getFragmentVariables||function(e){var t=e.count;return t||g(!1),function(e,r){return(0,l.default)((0,l.default)({},e),{},(0,u.default)({},t,r))}}(v);return n=function(n){function v(e){var r,o;o=n.call(this,e)||this,(0,u.default)((0,s.default)(o),"_handleFragmentDataUpdate",(function(){o.setState({data:o._resolver.resolve()})})),(0,u.default)((0,s.default)(o),"_hasMore",(function(){var e=o._getConnectionData();return!!(e&&e.hasMore&&e.cursor)})),(0,u.default)((0,s.default)(o),"_isLoading",(function(){return!!o._refetchSubscription})),(0,u.default)((0,s.default)(o),"_refetchConnection",(function(e,t,r){if(!o._canFetchPage("refetchConnection"))return{dispose:function(){}};o._refetchVariables=r;var n={count:e,cursor:null,totalCount:e};return{dispose:o._fetchPage(n,j(t),{force:!0}).unsubscribe}})),(0,u.default)((0,s.default)(o),"_loadMore",(function(e,t,r){if(!o._canFetchPage("loadMore"))return{dispose:function(){}};var n=j(t),a=o._getConnectionData();if(!a)return P.create((function(e){return e.complete()})).subscribe(n),null;var s=a.edgeCount+e;if(r&&r.force)return o._refetchConnection(s,t);var i=q.get(),u=(i.END_CURSOR,i.START_CURSOR,{count:e,cursor:a.cursor,totalCount:s});return{dispose:o._fetchPage(u,n,r).unsubscribe}}));var a=C(e.__relayContext),i=null!==(r=e.__rootIsQueryRenderer)&&void 0!==r&&r;return o._isARequestInFlight=!1,o._refetchSubscription=null,o._refetchVariables=null,!0===F.ENABLE_CONTAINERS_SUBSCRIBE_ON_COMMIT?o._resolver=D(a,f,t,e,i):o._resolver=D(a,f,t,e,i,o._handleFragmentDataUpdate),o.state={data:o._resolver.resolve(),prevContext:a,contextForChildren:a,relayProp:o._buildRelayProp(a),resolverGeneration:0},o._isUnmounted=!1,o._hasFetched=!1,o}(0,i.default)(v,n);var _=v.prototype;return _.componentDidMount=function(){this._isUnmounted=!1,!0===F.ENABLE_CONTAINERS_SUBSCRIBE_ON_COMMIT&&this._subscribeToNewResolverAndRerenderIfStoreHasChanged()},_.componentDidUpdate=function(e,t){!0===F.ENABLE_CONTAINERS_SUBSCRIBE_ON_COMMIT&&(t.resolverGeneration!==this.state.resolverGeneration?this._subscribeToNewResolverAndRerenderIfStoreHasChanged():this._rerenderIfStoreHasChanged())},_.UNSAFE_componentWillReceiveProps=function(e){var r,n=this,o=C(e.__relayContext),a=null!==(r=e.__rootIsQueryRenderer)&&void 0!==r&&r,s=I(t,this.props),i=I(t,e),u=d(t,this.props),l=d(t,e);o.environment===this.state.prevContext.environment&&R(u,l)&&R(s,i)?this._hasFetched||this._resolver.setProps(e):(this._cleanup(),!0===F.ENABLE_CONTAINERS_SUBSCRIBE_ON_COMMIT?this._resolver=D(o,f,t,e,a):this._resolver=D(o,f,t,e,a,this._handleFragmentDataUpdate),this.setState((function(e){return{prevContext:o,contextForChildren:o,relayProp:n._buildRelayProp(o),resolverGeneration:e.resolverGeneration+1}})));var c=this._resolver.resolve();c!==this.state.data&&this.setState({data:c})},_.componentWillUnmount=function(){this._isUnmounted=!0,this._cleanup()},_.shouldComponentUpdate=function(e,r){if(r.data!==this.state.data||r.relayProp!==this.state.relayProp||r.resolverGeneration!==this.state.resolverGeneration)return!0;for(var n=Object.keys(e),o=0;o<n.length;o++){var a=n[o];if("__relayContext"===a){if(r.prevContext.environment!==this.state.prevContext.environment)return!0}else if(!t.hasOwnProperty(a)&&!N(e[a],this.props[a]))return!0}return!1},_._buildRelayProp=function(e){return{hasMore:this._hasMore,isLoading:this._isLoading,loadMore:this._loadMore,refetchConnection:this._refetchConnection,environment:e.environment}},_._rerenderIfStoreHasChanged=function(){var e=this.state.data,t=this._resolver.resolve();e!==t&&this.setState({data:t})},_._subscribeToNewResolverAndRerenderIfStoreHasChanged=function(){var e=this.state.data,t=this._resolver.resolve();this._resolver.setCallback(this.props,this._handleFragmentDataUpdate),e!==t&&this.setState({data:t})},_._getConnectionData=function(){var e=this.props,t=(e.componentRef,(0,a.default)(e,c)),r=(0,l.default)((0,l.default)({},t),this.state.data),n=S(r);if(null==n)return null;var o=q.get(),s=o.EDGES,i=o.PAGE_INFO,u=o.HAS_NEXT_PAGE,h=o.HAS_PREV_PAGE,p=o.END_CURSOR,f=o.START_CURSOR;"object"!=typeof n&&g(!1);var d=n[s],v=n[i];if(null==d||null==v)return null;Array.isArray(d)||g(!1),"object"!=typeof v&&g(!1);var _=k===U?v[u]:v[h],b=k===U?v[p]:v[f];return"boolean"!=typeof _||0!==d.length&&void 0===b?null:{cursor:b,edgeCount:d.length,hasMore:_}},_._getQueryFetcher=function(){return this._queryFetcher||(this._queryFetcher=new m),this._queryFetcher},_._canFetchPage=function(e){return!this._isUnmounted},_._fetchPage=function(e,n,o){var s,i=this,u=C(this.props.__relayContext).environment,c=this.props,p=(c.componentRef,c.__relayContext,c.__rootIsQueryRenderer,(0,a.default)(c,h)),f=(0,l.default)((0,l.default)({},p),this.state.data),v=d(t,p);s=A(t,p),s=(0,l.default)((0,l.default)((0,l.default)({},v),s),this._refetchVariables);var _=r.getVariables(f,{count:e.count,cursor:e.cursor},s);("object"!=typeof _||null===_)&&g(!1),_=(0,l.default)((0,l.default)({},_),this._refetchVariables),s=(0,l.default)((0,l.default)({},_),s);var b=o?{force:!!o.force}:void 0;null!=b&&null!=(null==o?void 0:o.metadata)&&(b.metadata=null==o?void 0:o.metadata);var y=E(r.query),m=O(y,_,b),x=null;this._refetchSubscription&&this._refetchSubscription.unsubscribe(),this._hasFetched=!0;var S=function(){i._refetchSubscription===x&&(i._refetchSubscription=null,i._isARequestInFlight=!1)};return this._isARequestInFlight=!0,x=this._getQueryFetcher().execute({environment:u,operation:m,preservePreviousReferences:!0}).mergeMap((function(t){return P.create((function(t){!function(t,r){var n=i._resolver.resolve();i._resolver.setVariables(Q(s,e.totalCount),m.request.node);var o=i._resolver.resolve();R(n,o)?r():i.setState({data:o,contextForChildren:{environment:i.props.__relayContext.environment}},r)}(0,(function(){t.next(),t.complete()}))}))})).do({error:S,complete:S,unsubscribe:S}).subscribe(n||{}),this._refetchSubscription=this._isARequestInFlight?x:null,x},_._cleanup=function(){this._resolver.dispose(),this._refetchVariables=null,this._hasFetched=!1,this._refetchSubscription&&(this._refetchSubscription.unsubscribe(),this._refetchSubscription=null,this._isARequestInFlight=!1),this._queryFetcher&&this._queryFetcher.dispose()},_.render=function(){var t=this.props,r=t.componentRef,n=(t.__relayContext,t.__rootIsQueryRenderer,(0,a.default)(t,p));return x.createElement(y.Provider,{value:this.state.contextForChildren},x.createElement(e,(0,o.default)({},n,this.state.data,{ref:r,relay:this.state.relayProp})))},v}(x.Component),(0,u.default)(n,"displayName",f),n}(e,t,r)}))}}},733:(e,t,r)=>{var n=(0,r(275).default)(r(311)),o=r(56),a=r(658),s=a.__internal.fetchQuery,i=a.createOperationDescriptor,u=a.isRelayModernEnvironment,l=function(){function e(e){(0,n.default)(this,"_selectionReferences",[]),(0,n.default)(this,"_didFetchFinish",!1),null!=e&&(this._cacheSelectionReference=e.cacheSelectionReference,this._selectionReferences=e.selectionReferences)}var t=e.prototype;return t.getSelectionReferences=function(){return{cacheSelectionReference:this._cacheSelectionReference,selectionReferences:this._selectionReferences}},t.lookupInStore=function(e,t,r){return"store-and-network"!==r&&"store-or-network"!==r||"available"!==e.check(t).status?null:(this._retainCachedOperation(e,t),e.lookup(t.fragment))},t.getFetchResult=function(){return this._didFetchFinish?null!=this._error?{error:this._error}:null!=this._snapshot?{snapshot:this._snapshot}:void 0:null},t.execute=function(e){var t=this,r=e.environment,n=e.operation,o=e.preservePreviousReferences,a=void 0!==o&&o,i=r.retain(n),l=function(){t._selectionReferences=t._selectionReferences.concat(i)},c=function(){a||t.disposeSelectionReferences(),t._selectionReferences=t._selectionReferences.concat(i)},h=function(){t._selectionReferences=t._selectionReferences.concat(i)};return u(r)?s(r,n).do({error:l,complete:c,unsubscribe:h}):r.execute({operation:n}).do({error:l,complete:c,unsubscribe:h})},t.setOnDataChange=function(e){this._fetchOptions||o(!1),"function"==typeof e&&(this._fetchOptions.onDataChangeCallbacks=this._fetchOptions.onDataChangeCallbacks||[],this._fetchOptions.onDataChangeCallbacks.push(e),this._didFetchFinish&&(null!=this._error?e({error:this._error}):null!=this._snapshot&&e({snapshot:this._snapshot})))},t.fetch=function(e,t){var r,n=this,o=e.environment,a=e.operation,s=e.onDataChange,u=!1;this.disposeRequest();var l=this._fetchOptions&&this._fetchOptions.onDataChangeCallbacks;this._fetchOptions={environment:o,onDataChangeCallbacks:l||[],operation:a},s&&-1===this._fetchOptions.onDataChangeCallbacks.indexOf(s)&&this._fetchOptions.onDataChangeCallbacks.push(s);var c=t?i(a.request.node,a.request.variables,t):a,h=this.execute({environment:o,operation:c}).finally((function(){n._pendingRequest=null})).subscribe({next:function(){n._didFetchFinish=!0,n._error=null,n._onQueryDataAvailable({notifyFirstResult:u})},error:function(e){n._didFetchFinish=!0,n._error=e,n._snapshot=null;var t=n._fetchOptions&&n._fetchOptions.onDataChangeCallbacks;u?t&&t.forEach((function(t){t({error:e})})):r=e}});if(this._pendingRequest={dispose:function(){h.unsubscribe()}},u=!0,r)throw r;return this._snapshot},t.retry=function(e){return this._fetchOptions||o(!1),this.fetch({environment:this._fetchOptions.environment,operation:this._fetchOptions.operation,onDataChange:null},e)},t.dispose=function(){this.disposeRequest(),this.disposeSelectionReferences()},t.disposeRequest=function(){this._error=null,this._snapshot=null,this._pendingRequest&&this._pendingRequest.dispose(),this._rootSubscription&&(this._rootSubscription.dispose(),this._rootSubscription=null)},t._retainCachedOperation=function(e,t){this._disposeCacheSelectionReference(),this._cacheSelectionReference=e.retain(t)},t._disposeCacheSelectionReference=function(){this._cacheSelectionReference&&this._cacheSelectionReference.dispose(),this._cacheSelectionReference=null},t.disposeSelectionReferences=function(){this._disposeCacheSelectionReference(),this._selectionReferences.forEach((function(e){return e.dispose()})),this._selectionReferences=[]},t._onQueryDataAvailable=function(e){var t=this,r=e.notifyFirstResult;this._fetchOptions||o(!1);var n=this._fetchOptions,a=n.environment,s=n.onDataChangeCallbacks,i=n.operation;if(!this._snapshot&&(this._snapshot=a.lookup(i.fragment),this._rootSubscription=a.subscribe(this._snapshot,(function(e){if(null!=t._fetchOptions){var r=t._fetchOptions.onDataChangeCallbacks;Array.isArray(r)&&r.forEach((function(t){return t({snapshot:e})}))}})),this._snapshot&&r&&Array.isArray(s))){var u=this._snapshot;s.forEach((function(e){return e({snapshot:u})}))}},e}();e.exports=l},701:(e,t,r)=>{var n=r(275).default,o=n(r(175)),a=n(r(383)),s=n(r(296)),i=n(r(311)),u=r(888),l=r(733),c=r(239),h=r(125),p=r(156),f=r(658),d=f.createOperationDescriptor,v=(f.deepFreeze,f.getRequest),_={},b={rootIsQueryRenderer:!0},y=function(e){function t(t){var r;r=e.call(this,t)||this,(0,i.default)((0,a.default)(r),"_handleDataChange",(function(e){var t=null==e.error?null:e.error,n=null==e.snapshot?null:e.snapshot;r.setState((function(e){var r=e.requestCacheKey;return r&&delete _[r],n===e.snapshot&&t===e.error?null:{renderProps:m(t,n,e.queryFetcher,e.retryCallbacks),snapshot:n,requestCacheKey:null}}))}));var n,s,u={handleDataChange:null,handleRetryAfterError:null};if(t.query){var c=t.query;s=C(v(c).params,t.variables),n=_[s]?_[s].queryFetcher:new l}else n=new l;return r._maybeHiddenOrFastRefresh=!1,r.state=(0,o.default)({prevPropsEnvironment:t.environment,prevPropsVariables:t.variables,prevQuery:t.query,queryFetcher:n,retryCallbacks:u},g(t,n,u,s)),r}(0,s.default)(t,e),t.getDerivedStateFromProps=function(e,t){return t.prevQuery===e.query&&t.prevPropsEnvironment===e.environment&&h(t.prevPropsVariables,e.variables)?null:R(e,t)};var r=t.prototype;return r.componentDidMount=function(){var e=this;if(!0===this._maybeHiddenOrFastRefresh)return this._maybeHiddenOrFastRefresh=!1,void this.setState((function(t){var r=R(e.props,t),n=r.requestCacheKey,o=r.queryFetcher;return null!=n&&null!=_[n]&&o.setOnDataChange(e._handleDataChange),r}));var t=this.state,r=t.retryCallbacks,n=t.queryFetcher,o=t.requestCacheKey;o&&delete _[o],r.handleDataChange=this._handleDataChange,r.handleRetryAfterError=function(t){return e.setState((function(e){var t=e.requestCacheKey;return t&&delete _[t],{renderProps:{error:null,props:null,retry:null},requestCacheKey:null}}))},this.props.query&&n.setOnDataChange(this._handleDataChange)},r.componentDidUpdate=function(e,t){var r=this.state,n=r.queryFetcher,o=r.requestCacheKey;o&&(delete _[o],delete this.state.requestCacheKey),this.props.query&&n!==t.queryFetcher&&n.setOnDataChange(this._handleDataChange)},r.componentWillUnmount=function(){this.state.queryFetcher.dispose(),this._maybeHiddenOrFastRefresh=!0},r.shouldComponentUpdate=function(e,t){return e.render!==this.props.render||t.renderProps!==this.state.renderProps},r.render=function(){var e=this.state,t=e.renderProps,r=e.relayContext;return p.createElement(u.Provider,{value:r},p.createElement(c.Provider,{value:b},this.props.render(t)))},t}(p.Component);function m(e,t,r,n){return{error:e||null,props:t?t.data:null,retry:function(t){var o=r.retry(t);o&&"function"==typeof n.handleDataChange?n.handleDataChange({snapshot:o}):e&&"function"==typeof n.handleRetryAfterError&&n.handleRetryAfterError(e)}}}function C(e,t){return JSON.stringify({id:e.cacheID?e.cacheID:e.id,variables:t})}function R(e,t){var r,n=e.query,a=t.queryFetcher.getSelectionReferences();if(t.queryFetcher.disposeRequest(),n){var s=C(v(n).params,e.variables);r=_[s]?_[s].queryFetcher:new l(a)}else r=new l(a);return(0,o.default)({prevQuery:e.query,prevPropsEnvironment:e.environment,prevPropsVariables:e.variables,queryFetcher:r},g(e,r,t.retryCallbacks))}function g(e,t,r,n){var o=e.environment,a=e.query,s=e.variables,i=e.cacheConfig,u=o;if(!a)return t.dispose(),{error:null,relayContext:{environment:u},renderProps:{error:null,props:{},retry:null},requestCacheKey:null};var l=v(a),c=d(l,s,i),h={environment:u};if("string"==typeof n&&_[n]){var p=_[n].snapshot;return p?{error:null,relayContext:h,renderProps:m(null,p,t,r),snapshot:p,requestCacheKey:n}:{error:null,relayContext:h,renderProps:{error:null,props:null,retry:null},snapshot:null,requestCacheKey:n}}try{var f=t.lookupInStore(u,c,e.fetchPolicy),b=t.fetch({environment:u,onDataChange:null,operation:c})||f;return n=n||C(l.params,e.variables),_[n]={queryFetcher:t,snapshot:b},b?{error:null,relayContext:h,renderProps:m(null,b,t,r),snapshot:b,requestCacheKey:n}:{error:null,relayContext:h,renderProps:{error:null,props:null,retry:null},snapshot:null,requestCacheKey:n}}catch(e){return{error:e,relayContext:h,renderProps:m(e,null,t,r),snapshot:null,requestCacheKey:n}}}e.exports=y},239:(e,t,r)=>{var n=r(156);e.exports=n.createContext({rootIsQueryRenderer:!1})},427:(e,t,r)=>{var n=r(275).default,o=n(r(924)),a=n(r(264)),s=n(r(175)),i=n(r(383)),u=n(r(296)),l=n(r(311)),c=["componentRef","__relayContext","__rootIsQueryRenderer"],h=r(89),p=r(416),f=r(426).getContainerName,d=r(888),v=r(733),_=r(827).assertRelayContext,b=r(125),y=r(156),m=r(658),C=m.Observable,R=m.createFragmentSpecResolver,g=m.createOperationDescriptor,x=m.getDataIDsFromObject,S=m.getRequest,q=m.getVariablesFromObject,P=m.isScalarAndEqual;function F(e,t){return{environment:e,refetch:t}}r(446),e.exports={createContainer:function(e,t,r){return h(e,t,(function(e,t){return function(e,t,r){var n,h=f(e);return n=function(n){function f(e){var o,a;a=n.call(this,e)||this,(0,l.default)((0,i.default)(a),"_handleFragmentDataUpdate",(function(){var e=a.state.resolver;a.setState((function(t){return e===t.resolver?{data:t.resolver.resolve()}:null}))})),(0,l.default)((0,i.default)(a),"_refetch",(function(e,n,o,i){if(a._isUnmounted)return{dispose:function(){}};var u=_(a.props.__relayContext).environment,l=p(t,a.props),c="function"==typeof e?e(a._getFragmentVariables()):e;c=(0,s.default)((0,s.default)({},l),c);var h=n?(0,s.default)((0,s.default)({},c),n):c,f=i?{force:!!i.force}:void 0;null!=f&&null!=(null==i?void 0:i.metadata)&&(f.metadata=null==i?void 0:i.metadata);var d,v="function"==typeof o?{next:o,error:o}:o||{},b=S(r),y=g(b,c,f);return a.state.localVariables=c,a._refetchSubscription&&a._refetchSubscription.unsubscribe(),null!=a._getQueryFetcher().lookupInStore(u,y,null==i?void 0:i.fetchPolicy)?(a.state.resolver.setVariables(h,y.request.node),a.setState((function(e){return{data:e.resolver.resolve(),contextForChildren:{environment:a.props.__relayContext.environment}}}),(function(){v.next&&v.next(),v.complete&&v.complete()})),{dispose:function(){}}):(a._getQueryFetcher().execute({environment:u,operation:y,preservePreviousReferences:!0}).mergeMap((function(e){return a.state.resolver.setVariables(h,y.request.node),C.create((function(e){return a.setState((function(e){return{data:e.resolver.resolve(),contextForChildren:{environment:a.props.__relayContext.environment}}}),(function(){e.next(),e.complete()}))}))})).finally((function(){a._refetchSubscription===d&&(a._refetchSubscription=null)})).subscribe((0,s.default)((0,s.default)({},v),{},{start:function(e){a._refetchSubscription=d=e,v.start&&v.start(e)}})),{dispose:function(){d&&d.unsubscribe()}})}));var u=_(e.__relayContext),c=null!==(o=e.__rootIsQueryRenderer)&&void 0!==o&&o;a._refetchSubscription=null;var f=R(u,h,t,e,c);return a.state={data:f.resolve(),localVariables:null,prevProps:e,prevPropsContext:u,contextForChildren:u,relayProp:F(u.environment,a._refetch),resolver:f},a._isUnmounted=!1,a}(0,u.default)(f,n);var m=f.prototype;return m.componentDidMount=function(){this._isUnmounted=!1,this._subscribeToNewResolverAndRerenderIfStoreHasChanged()},m.componentDidUpdate=function(e,t){this.state.resolver!==t.resolver?(t.resolver.dispose(),this._queryFetcher&&this._queryFetcher.dispose(),this._refetchSubscription&&this._refetchSubscription.unsubscribe(),this._subscribeToNewResolverAndRerenderIfStoreHasChanged()):this._rerenderIfStoreHasChanged()},f.getDerivedStateFromProps=function(e,r){var n,o=r.prevProps,a=_(e.__relayContext),s=null!==(n=e.__rootIsQueryRenderer)&&void 0!==n&&n,i=x(t,o),u=x(t,e),l=p(t,o),c=p(t,e),f=r.resolver;if(r.prevPropsContext.environment!==a.environment||!b(l,c)||!b(i,u))return{data:(f=R(a,h,t,e,s)).resolve(),localVariables:null,prevProps:e,prevPropsContext:a,contextForChildren:a,relayProp:F(a.environment,r.relayProp.refetch),resolver:f};r.localVariables||f.setProps(e);var d=f.resolve();return d!==r.data?{data:d,prevProps:e}:null},m.componentWillUnmount=function(){this._isUnmounted=!0,this.state.resolver.dispose(),this._queryFetcher&&this._queryFetcher.dispose(),this._refetchSubscription&&this._refetchSubscription.unsubscribe()},m.shouldComponentUpdate=function(e,r){if(r.data!==this.state.data||r.relayProp!==this.state.relayProp)return!0;for(var n=Object.keys(e),o=0;o<n.length;o++){var a=n[o];if("__relayContext"===a){if(this.state.prevPropsContext.environment!==r.prevPropsContext.environment)return!0}else if(!t.hasOwnProperty(a)&&!P(e[a],this.props[a]))return!0}return!1},m._rerenderIfStoreHasChanged=function(){var e=this.state,t=e.data,r=e.resolver.resolve();t!==r&&this.setState({data:r})},m._subscribeToNewResolverAndRerenderIfStoreHasChanged=function(){var e=this.state,t=e.data,r=e.resolver,n=r.resolve();r.setCallback(this.props,this._handleFragmentDataUpdate),t!==n&&this.setState({data:n})},m._getFragmentVariables=function(){return q(t,this.props)},m._getQueryFetcher=function(){return this._queryFetcher||(this._queryFetcher=new v),this._queryFetcher},m.render=function(){var t=this.props,r=t.componentRef,n=(t.__relayContext,t.__rootIsQueryRenderer,(0,a.default)(t,c)),s=this.state,i=s.relayProp,u=s.contextForChildren;return y.createElement(d.Provider,{value:u},y.createElement(e,(0,o.default)({},n,this.state.data,{ref:r,relay:i})))},f}(y.Component),(0,l.default)(n,"displayName",h),n}(e,t,r)}))}}},827:(e,t,r)=>{var n=r(645),o=r(56);function a(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)&&n(e.environment)}e.exports={assertRelayContext:function(e){return a(e)||o(!1),e},isRelayContext:a}},74:(e,t,r)=>{var n=r(56);e.exports=function(e,t){for(var r in t&&"object"==typeof t||n(!1),t)if(t.hasOwnProperty(r)){var o=t[r];(!o||"object"!=typeof o&&"function"!=typeof o)&&n(!1)}}},89:(e,t,r)=>{var n=(0,r(275).default)(r(924)),o=r(74),a=r(426),s=a.getComponentName,i=a.getContainerName,u=r(888),l=r(239),c=r(56),h=r(156),p=r(658).getFragment,f=h.useContext;e.exports=function(e,t,r){var a=i(e);o(s(e),t);var d={};for(var v in t)d[v]=p(t[v]);var _=r(e,d);function b(e,t){var r,o=f(u);null==o&&c(!1);var a=f(l);return h.createElement(_,(0,n.default)({},e,{__relayContext:o,__rootIsQueryRenderer:null!==(r=null==a?void 0:a.rootIsQueryRenderer)&&void 0!==r&&r,componentRef:e.componentRef||t}))}return _.displayName=a,b.displayName=a,h.forwardRef(b)}},416:(e,t,r)=>{var n=(0,r(275).default)(r(175)),o=r(658).getSelector;e.exports=function(e,t){var r={};return Object.keys(e).forEach((function(a){var s,i,u,l=e[a],c=t[a],h=o(l,c),p=null!=h&&"PluralReaderSelector"===h.kind?null!==(s=null===(i=h.selectors[0])||void 0===i?void 0:i.owner.variables)&&void 0!==s?s:{}:null!==(u=null==h?void 0:h.owner.variables)&&void 0!==u?u:{};r=(0,n.default)((0,n.default)({},r),p)})),r}},645:e=>{e.exports=function(e){return"object"==typeof e&&null!==e&&"function"==typeof e.check&&"function"==typeof e.lookup&&"function"==typeof e.retain&&"function"==typeof e.execute&&"function"==typeof e.subscribe}},314:(e,t,r)=>{var n=r(888),o=r(362),a=r(428),s=r(540),i=r(701),u=r(427),l=r(658);e.exports={ConnectionHandler:l.ConnectionHandler,QueryRenderer:i,LocalQueryRenderer:a,MutationTypes:l.MutationTypes,RangeOperations:l.RangeOperations,ReactRelayContext:n,applyOptimisticMutation:l.applyOptimisticMutation,commitLocalUpdate:l.commitLocalUpdate,commitMutation:l.commitMutation,createFragmentContainer:o.createContainer,createPaginationContainer:s.createContainer,createRefetchContainer:u.createContainer,fetchQuery_DEPRECATED:l.fetchQuery_DEPRECATED,graphql:l.graphql,readInlineData:l.readInlineData,requestSubscription:l.requestSubscription}},383:t=>{t.exports=e},311:e=>{e.exports=t},924:e=>{e.exports=r},296:e=>{e.exports=n},275:e=>{e.exports=o},175:e=>{e.exports=a},264:e=>{e.exports=s},125:e=>{e.exports=i},446:e=>{e.exports=u},56:e=>{e.exports=l},156:e=>{e.exports=c},658:e=>{e.exports=h}},f={};return function e(t){var r=f[t];if(void 0!==r)return r.exports;var n=f[t]={exports:{}};return p[t](n,n.exports,e),n.exports}(314)})()));
|