/**
* Relay v2.0.0
*/
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("fbjs/lib/invariant"),require("fbjs/lib/warning"),require("fbjs/lib/ErrorUtils"),require("fbjs/lib/areEqual"),require("fbjs/lib/emptyFunction"),require("fbjs/lib/removeFromArray"),require("fbjs/lib/sprintf"),require("fbjs/lib/resolveImmediate"),require("fbjs/lib/mapObject")):"function"==typeof define&&define.amd?define(["fbjs/lib/invariant","fbjs/lib/warning","fbjs/lib/ErrorUtils","fbjs/lib/areEqual","fbjs/lib/emptyFunction","fbjs/lib/removeFromArray","fbjs/lib/sprintf","fbjs/lib/resolveImmediate","fbjs/lib/mapObject"],t):"object"==typeof exports?exports.RelayRuntime=t(require("fbjs/lib/invariant"),require("fbjs/lib/warning"),require("fbjs/lib/ErrorUtils"),require("fbjs/lib/areEqual"),require("fbjs/lib/emptyFunction"),require("fbjs/lib/removeFromArray"),require("fbjs/lib/sprintf"),require("fbjs/lib/resolveImmediate"),require("fbjs/lib/mapObject")):e.RelayRuntime=t(e["fbjs/lib/invariant"],e["fbjs/lib/warning"],e["fbjs/lib/ErrorUtils"],e["fbjs/lib/areEqual"],e["fbjs/lib/emptyFunction"],e["fbjs/lib/removeFromArray"],e["fbjs/lib/sprintf"],e["fbjs/lib/resolveImmediate"],e["fbjs/lib/mapObject"])}(window,function(e,t,r,n,o,i,a,s,c){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=45)}([function(e,t,r){"use strict";function n(e,t){var n={};return e.forEach(function(e){e.kind===r(3).VARIABLE?n[e.name]=function(e,t){return t.hasOwnProperty(e)||r(1)(!1,"getVariableValue(): Undefined variable `%s`.",e),r(21)(t[e])}(e.variableName,t):n[e.name]=e.value}),n}function o(e,t){if(!t)return e;var r=[];for(var n in t)if(t.hasOwnProperty(n)){var o=t[n];null!=o&&r.push(n+":"+JSON.stringify(o))}return 0===r.length?e:e+"(".concat(r.join(","),")")}var i={FRAGMENTS_KEY:"__fragments",FRAGMENT_OWNER_KEY:"__fragmentOwner",FRAGMENT_PROP_NAME_KEY:"__fragmentPropName",MATCH_COMPONENT_KEY:"__match_component",MATCH_FRAGMENT_KEY:"__match_fragment",ID_KEY:"__id",MODULE_KEY:"__module",REF_KEY:"__ref",REFS_KEY:"__refs",ROOT_ID:"client:root",ROOT_TYPE:"__Root",TYPENAME_KEY:"__typename",UNPUBLISH_RECORD_SENTINEL:Object.freeze({__UNPUBLISH_RECORD_SENTINEL:!0}),UNPUBLISH_FIELD_SENTINEL:Object.freeze({__UNPUBLISH_FIELD_SENTINEL:!0}),getArgumentValues:n,getHandleStorageKey:function(e,t){var i=e.handle,a=e.key,s=e.name,c=e.args,l=e.filters,u=r(26)(i,a,s);return c&&l&&0!==c.length&&0!==l.length?o(u,n(c.filter(function(e){return l.indexOf(e.name)>-1}),t)):u},getStorageKey:function(e,t){if(e.storageKey)return e.storageKey;var r=e.args,i=e.name;return r&&0!==r.length?o(i,n(r,t)):i},getStableStorageKey:function(e,t){return o(e,r(21)(t))}};e.exports=i},function(t,r){t.exports=e},function(e,t,r){"use strict";var n=r(6)(r(13));function o(e){return e[r(0).ID_KEY]}function i(e){return e[r(0).TYPENAME_KEY]}e.exports={clone:function(e){return(0,n.default)({},e)},copyFields:function(e,t){for(var n in e)e.hasOwnProperty(n)&&n!==r(0).ID_KEY&&n!==r(0).TYPENAME_KEY&&(t[n]=e[n])},create:function(e,t){var n={};return n[r(0).ID_KEY]=e,n[r(0).TYPENAME_KEY]=t,n},freeze:function(e){r(16)(e)},getDataID:o,getLinkedRecordID:function(e,t){var n=e[t];return null==n?n:("object"==typeof n&&n&&"string"==typeof n[r(0).REF_KEY]||r(1)(!1,"RelayModernRecord.getLinkedRecordID(): Expected `%s.%s` to be a linked ID, was `%s`.",e[r(0).ID_KEY],t,JSON.stringify(n)),n[r(0).REF_KEY])},getLinkedRecordIDs:function(e,t){var n=e[t];return null==n?n:("object"==typeof n&&Array.isArray(n[r(0).REFS_KEY])||r(1)(!1,"RelayModernRecord.getLinkedRecordIDs(): Expected `%s.%s` to contain an array of linked IDs, got `%s`.",e[r(0).ID_KEY],t,JSON.stringify(n)),n[r(0).REFS_KEY])},getType:i,getValue:function(e,t){var n=e[t];return n&&"object"==typeof n&&(n.hasOwnProperty(r(0).REF_KEY)||n.hasOwnProperty(r(0).REFS_KEY))&&r(1)(!1,"RelayModernRecord.getValue(): Expected a scalar (non-link) value for `%s.%s` but found %s.",e[r(0).ID_KEY],t,n.hasOwnProperty(r(0).REF_KEY)?"a linked record":"plural linked records"),n},merge:function(e,t){var n,a,s=o(e),c=o(t);r(4)(s===c,"RelayModernRecord: Invalid record merge, expected both versions of the record to have the same id, got `%s` and `%s`.",s,c);var l=null!==(n=i(e))&&void 0!==n?n:null,u=null!==(a=i(t))&&void 0!==a?a:null;return r(4)(l===u,"RelayModernRecord: Invalid record merge, expected both versions of record `%s` to have the same `%s` but got conflicting types `%s` and `%s`. The GraphQL server likely violated the globally unique id requirement by returning the same id for different objects.",s,r(0).TYPENAME_KEY,l,u),Object.assign({},e,t)},setValue:function(e,t,n){var a=o(e);if(t===r(0).ID_KEY)r(4)(a===n,"RelayModernRecord: Invalid field update, expected both versions of the record to have the same id, got `%s` and `%s`.",a,n);else if(t===r(0).TYPENAME_KEY){var s,c,l=null!==(s=i(e))&&void 0!==s?s:null,u=null!==(c=n)&&void 0!==c?c:null;r(4)(l===u,"RelayModernRecord: Invalid field update, expected both versions of record `%s` to have the same `%s` but got conflicting types `%s` and `%s`. The GraphQL server likely violated the globally unique id requirement by returning the same id for different objects.",a,r(0).TYPENAME_KEY,l,u)}e[t]=n},setLinkedRecordID:function(e,t,n){var o={};o[r(0).REF_KEY]=n,e[t]=o},setLinkedRecordIDs:function(e,t,n){var o={};o[r(0).REFS_KEY]=n,e[t]=o},update:function(e,t){var a,s,c=o(e),l=o(t);r(4)(c===l,"RelayModernRecord: Invalid record update, expected both versions of the record to have the same id, got `%s` and `%s`.",c,l);var u=null!==(a=i(e))&&void 0!==a?a:null,d=null!==(s=i(t))&&void 0!==s?s:null;r(4)(u===d,"RelayModernRecord: Invalid record update, expected both versions of record `%s` to have the same `%s` but got conflicting types `%s` and `%s`. The GraphQL server likely violated the globally unique id requirement by returning the same id for different objects.",c,r(0).TYPENAME_KEY,u,d);for(var f=null,p=Object.keys(t),h=0;h
3&&void 0!==arguments[3]?arguments[3]:{handleStrippedNulls:!1},i=new(r(12));i.set(r(0).ROOT_ID,r(2).create(r(0).ROOT_ID,r(0).ROOT_TYPE));var a=r(38).normalize(i,e,t,o);return{errors:n,fieldPayloads:a.fieldPayloads,matchPayloads:a.matchPayloads,source:i}}},function(e,t){e.exports=r},function(e,t,r){"use strict";var n=Object.freeze({RANGE_ADD:"RANGE_ADD",RANGE_DELETE:"RANGE_DELETE",NODE_DELETE:"NODE_DELETE",FIELDS_CHANGE:"FIELDS_CHANGE",REQUIRED_CHILDREN:"REQUIRED_CHILDREN"}),o=Object.freeze({APPEND:"append",IGNORE:"ignore",PREPEND:"prepend",REFETCH:"refetch",REMOVE:"remove"});function i(e){return e.fragment.selections&&e.fragment.selections.length>0&&"LinkedField"===e.fragment.selections[0].kind?e.fragment.selections[0].name:null}e.exports={MutationTypes:n,RangeOperations:o,convert:function(e,t,n,o){var a=n?[n]:[],s=o?[o]:[];return e.forEach(function(e){switch(e.type){case"NODE_DELETE":var n=function(e,t){var r=e.deletedIDFieldName,n=i(t);return n?function(e,t){var o=e.getRootField(n);if(o){var i=o.getValue(r),a=Array.isArray(i)?i:[i];a.forEach(function(t){t&&"string"==typeof t&&e.delete(t)})}}:null}(e,t);n&&(a.push(n),s.push(n));break;case"RANGE_ADD":var o=function(e,t){var n=e.parentID,o=e.connectionInfo,a=e.edgeName;if(!n)return r(4)(!1,"RelayDeclarativeMutationConfig: For mutation config RANGE_ADD to work you must include a parentID"),null;var s=i(t);return o&&s?function(e,t){var i=e.get(n);if(i){var c=e.getRootField(s);if(c){var l=c.getLinkedRecord(a),u=!0,d=!1,f=void 0;try{for(var p,h=o[Symbol.iterator]();!(u=(p=h.next()).done);u=!0){var _=p.value;if(l){var g=r(10).getConnection(i,_.key,_.filters);if(g){var v=r(10).buildConnectionEdge(e,g,l);if(v)switch(_.rangeBehavior){case"append":r(10).insertEdgeAfter(g,v);break;case"ignore":break;case"prepend":r(10).insertEdgeBefore(g,v);break;default:r(4)(!1,"RelayDeclarativeMutationConfig: RANGE_ADD range behavior `%s` will not work as expected in RelayModern, supported range behaviors are 'append', 'prepend', and 'ignore'.",_.rangeBehavior)}}}}}catch(e){d=!0,f=e}finally{try{u||null==h.return||h.return()}finally{if(d)throw f}}}}}:null}(e,t);o&&(a.push(o),s.push(o));break;case"RANGE_DELETE":var c=function(e,t){var n=e.parentID,o=e.connectionKeys,a=e.pathToConnection,s=e.deletedIDFieldName;if(!n)return r(4)(!1,"RelayDeclarativeMutationConfig: For mutation config RANGE_DELETE to work you must include a parentID"),null;var c=i(t);return c?function(e,t){if(t){var i=[],l=t[c];if(l&&Array.isArray(s)){var u=!0,d=!1,f=void 0;try{for(var p,h=s[Symbol.iterator]();!(u=(p=h.next()).done);u=!0){var _=p.value;l&&"object"==typeof l&&(l=l[_])}}catch(e){d=!0,f=e}finally{try{u||null==h.return||h.return()}finally{if(d)throw f}}Array.isArray(l)?l.forEach(function(e){e&&e.id&&"object"==typeof e&&"string"==typeof e.id&&i.push(e.id)}):l&&l.id&&"string"==typeof l.id&&i.push(l.id)}else l&&"string"==typeof s&&"object"==typeof l&&("string"==typeof(l=l[s])?i.push(l):Array.isArray(l)&&l.forEach(function(e){"string"==typeof e&&i.push(e)}));!function(e,t,n,o,i){r(4)(t,"RelayDeclarativeMutationConfig: RANGE_DELETE must provide a connectionKeys");var a=o.get(e);if(a)if(n.length<2)r(4)(!1,"RelayDeclarativeMutationConfig: RANGE_DELETE pathToConnection must include at least parent and connection");else{for(var s=a,c=1;c0,n=o.hasOwnProperty(e);if(n||r){for(var i,s=n&&r?o[e].concat(o["*"]):n?o[e]:o["*"],c=s.length-1;c>=0;c--){var l=(0,s[c])(e,t);(i=i||[]).unshift(l)}return{stop:function(e){i&&i.forEach(function(t){return t(e)})}}}return a},attachProfileHandler:function(e,t){o.hasOwnProperty(e)||(o[e]=[]),o[e].push(t)},detachProfileHandler:function(e,t){o.hasOwnProperty(e)&&r(32)(o[e],t)}};e.exports=s},function(e,t){e.exports=o},function(e,t){e.exports=i},function(e,t,r){"use strict";var n=function(){function e(e,t,r){this._recordSource=e,this._seenRecords={},this._isMissingData=!1,this._variables=t,this._owner=r}var t=e.prototype;return t.read=function(e,t){return{data:this._traverse(e,t,null),dataID:t,node:e,seenRecords:this._seenRecords,variables:this._variables,isMissingData:this._isMissingData,owner:this._owner}},t._traverse=function(e,t,r){var n=this._recordSource.get(t);if(this._seenRecords[t]=n,null==n)return void 0===n&&(this._isMissingData=!0),n;var o=r||{};return this._traverseSelections(e.selections,n,o),o},t._getVariableValue=function(e){return this._variables.hasOwnProperty(e)||r(1)(!1,"RelayReader(): Undefined variable `%s`.",e),this._variables[e]},t._traverseSelections=function(e,t,n){var o=this;e.forEach(function(e){if(e.kind===r(3).SCALAR_FIELD)o._readScalar(e,t,n);else if(e.kind===r(3).LINKED_FIELD)e.plural?o._readPluralLink(e,t,n):o._readLink(e,t,n);else if(e.kind===r(3).CONDITION){o._getVariableValue(e.condition)===e.passingValue&&o._traverseSelections(e.selections,t,n)}else if(e.kind===r(3).INLINE_FRAGMENT){var i=r(2).getType(t);null!=i&&i===e.type&&o._traverseSelections(e.selections,t,n)}else e.kind===r(3).FRAGMENT_SPREAD?o._createFragmentPointer(e,t,n,o._variables):e.kind===r(3).MATCH_FIELD?o._readMatchField(e,t,n):r(1)(!1,"RelayReader(): Unexpected ast kind `%s`.",e.kind)})},t._readScalar=function(e,t,n){var o,i=null!==(o=e.alias)&&void 0!==o?o:e.name,a=r(0).getStorageKey(e,this._variables),s=r(2).getValue(t,a);void 0===s&&(this._isMissingData=!0),n[i]=s},t._readLink=function(e,t,n){var o,i=null!==(o=e.alias)&&void 0!==o?o:e.name,a=r(0).getStorageKey(e,this._variables),s=r(2).getLinkedRecordID(t,a);if(null==s)return n[i]=s,void(void 0===s&&(this._isMissingData=!0));var c=n[i];null!=c&&"object"!=typeof c&&r(1)(!1,"RelayReader(): Expected data for field `%s` on record `%s` to be an object, got `%s`.",i,r(2).getDataID(t),c),n[i]=this._traverse(e,s,c)},t._readPluralLink=function(e,t,n){var o,i=this,a=null!==(o=e.alias)&&void 0!==o?o:e.name,s=r(0).getStorageKey(e,this._variables),c=r(2).getLinkedRecordIDs(t,s);if(null==c)return n[a]=c,void(void 0===c&&(this._isMissingData=!0));var l=n[a];null==l||Array.isArray(l)||r(1)(!1,"RelayReader(): Expected data for field `%s` on record `%s` to be an array, got `%s`.",a,r(2).getDataID(t),l);var u=l||[];c.forEach(function(n,o){if(null==n)return void 0===n&&(i._isMissingData=!0),void(u[o]=n);var s=u[o];null!=s&&"object"!=typeof s&&r(1)(!1,"RelayReader(): Expected data for field `%s` on record `%s` to be an object, got `%s`.",a,r(2).getDataID(t),s),u[o]=i._traverse(e,n,s)}),n[a]=u},t._readMatchField=function(e,t,n){var o,i=null!==(o=e.alias)&&void 0!==o?o:e.name,a=r(0).getStorageKey(e,this._variables),s=r(2).getLinkedRecordID(t,a);if(null==s)return n[i]=s,void(void 0===s&&(this._isMissingData=!0));var c=n[i];null!=c&&"object"!=typeof c&&r(1)(!1,"RelayReader(): Expected data for field `%s` on record `%s` to be an object, got `%s`.",i,r(2).getDataID(t),c);var l=this._recordSource.get(s);if(this._seenRecords[s]=l,null==l)return void 0===l&&(this._isMissingData=!0),void(n[i]=l);var u=r(2).getType(l);"string"!=typeof u&&r(1)(!1,"RelayReader(): Expected to be able to resolve concrete type for field `%s` on record `%s`",i,r(2).getDataID(l));var d=e.matchesByType[u];if(null!=d){var f=r(2).getValue(l,r(0).MATCH_COMPONENT_KEY);if(null==f)return void 0===f&&(this._isMissingData=!0),void(n[i]=null);var p={};this._createFragmentPointer({kind:"FragmentSpread",name:d.fragmentName,args:null},l,p,this._variables),p[r(0).FRAGMENT_PROP_NAME_KEY]=d.fragmentPropName,p[r(0).MODULE_KEY]=f,n[i]=p}else n[i]=null},t._createFragmentPointer=function(e,t,n,o){var i=n[r(0).FRAGMENTS_KEY];null==i&&(i=n[r(0).FRAGMENTS_KEY]={}),"object"==typeof i&&i||r(1)(!1,"RelayReader: Expected fragment spread data to be an object, got `%s`.",i),null==n[r(0).ID_KEY]&&(n[r(0).ID_KEY]=r(2).getDataID(t)),i[e.name]=e.args?r(0).getArgumentValues(e.args,o):{},n[r(0).FRAGMENT_OWNER_KEY]=this._owner},e}();e.exports={read:function(e,t,r){var o,i=t.dataID,a=t.node,s=t.variables;return new n(e,s,null!==(o=r)&&void 0!==o?o:null).read(a,i)}}},function(e,t,r){"use strict";e.exports=function(e){return Boolean(e&&e["@@RelayModernEnvironment"])}},function(e,t,r){"use strict";e.exports=function(e){switch(e){case"connection":return r(10);case"viewer":return r(37)}r(1)(!1,"RelayDefaultHandlerProvider: No handler provided for `%s`.",e)}},function(e,t,r){"use strict";e.exports={DEFAULT_HANDLE_KEY:""}},function(e,t,r){"use strict";var n=r(8)(r(0).ROOT_ID,"viewer"),o="Viewer";e.exports={VIEWER_ID:n,update:function(e,t){var r=e.get(t.dataID);if(r){var i=r.getLinkedRecord(t.fieldKey);if(i){if(i.getDataID()===n)return r.setValue(null,t.fieldKey),void r.setLinkedRecord(i,t.handleKey);var a=e.get(n)||e.create(n,o);a.copyFieldsFrom(i),r.setValue(null,t.fieldKey),r.setLinkedRecord(a,t.handleKey),e.getRoot().setLinkedRecord(a,t.handleKey)}}}}},function(e,t,r){"use strict";var n=r(6)(r(29));function o(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{handleStrippedNulls:!1},o=t.dataID,a=t.node,s=t.variables;return new i(e,s,n).normalizeResponse(a,o,r)}var i=function(){function e(e,t,r){this._handleFieldPayloads=[],this._handleStrippedNulls=r.handleStrippedNulls,this._incrementalPayloads=[],this._matchFieldPayloads=[],this._path=r.path?(0,n.default)(r.path):[],this._recordSource=e,this._variables=t}var t=e.prototype;return t.normalizeResponse=function(e,t,n){var o=this._recordSource.get(t);return o||r(1)(!1,"RelayResponseNormalizer(): Expected root record `%s` to exist.",t),this._traverseSelections(e,o,n),{incrementalPayloads:this._incrementalPayloads,fieldPayloads:this._handleFieldPayloads,matchPayloads:this._matchFieldPayloads}},t._getVariableValue=function(e){return this._variables.hasOwnProperty(e)||r(1)(!1,"RelayResponseNormalizer(): Undefined variable `%s`.",e),this._variables[e]},t._getRecordType=function(e){var t=e[r(0).TYPENAME_KEY];return null==t&&r(1)(!1,"RelayResponseNormalizer(): Expected a typename for record `%s`.",JSON.stringify(e,null,2)),t},t._traverseSelections=function(e,t,n){var o=this;e.selections.forEach(function(i){if(i.kind===r(3).SCALAR_FIELD||i.kind===r(3).LINKED_FIELD)o._normalizeField(e,i,t,n);else if(i.kind===r(3).CONDITION){o._getVariableValue(i.condition)===i.passingValue&&o._traverseSelections(i,t,n)}else if(i.kind===r(3).INLINE_FRAGMENT){r(2).getType(t)===i.type&&o._traverseSelections(i,t,n)}else if(i.kind===r(3).LINKED_HANDLE||i.kind===r(3).SCALAR_HANDLE){var a=i.args?r(0).getArgumentValues(i.args,o._variables):{},s=r(0).getStorageKey(i,o._variables),c=r(0).getHandleStorageKey(i,o._variables);o._handleFieldPayloads.push({args:a,dataID:r(2).getDataID(t),fieldKey:s,handle:i.handle,handleKey:c})}else i.kind===r(3).MATCH_FIELD?o._normalizeMatchField(e,i,t,n):i.kind===r(3).DEFER?o._normalizeDefer(i,t,n):i.kind===r(3).STREAM?o._normalizeStream(i,t,n):(i.kind===r(3).FRAGMENT||(i.kind,r(3).FRAGMENT_SPREAD),r(1)(!1,"RelayResponseNormalizer(): Unexpected ast kind `%s`.",i.kind))})},t._normalizeDefer=function(e,t,o){var i=null===e.if||this._getVariableValue(e.if);r(4)("boolean"==typeof i,"RelayResponseNormalizer: Expected value for @defer `if` argument to be a boolean, got `%s`.",i),!1===i?this._traverseSelections(e,t,o):this._incrementalPayloads.push({kind:"defer",label:e.label,path:(0,n.default)(this._path),selector:{dataID:r(2).getDataID(t),node:e,variables:this._variables}})},t._normalizeStream=function(e,t,o){this._traverseSelections(e,t,o);var i=null===e.if||this._getVariableValue(e.if);r(4)("boolean"==typeof i,"RelayResponseNormalizer: Expected value for @stream `if` argument to be a boolean, got `%s`.",i),!0===i&&this._incrementalPayloads.push({kind:"stream",label:e.label,path:(0,n.default)(this._path),selector:{dataID:r(2).getDataID(t),node:e,variables:this._variables}})},t._normalizeMatchField=function(e,t,o,i){"object"==typeof i&&i||r(1)(!1,"writeField(): Expected data for field `%s` to be an object.",t.name);var a=t.alias||t.name,s=r(0).getStorageKey(t,this._variables),c=i[a];if(null==c){if(void 0===c&&!this._handleStrippedNulls)return;return r(4)(e.kind===r(3).LINKED_FIELD&&null==e.concreteType||Object.prototype.hasOwnProperty.call(i,a),"RelayResponseNormalizer(): Payload did not contain a value for field `%s: %s`. Check that you are parsing with the same query that was used to fetch the payload.",a,s),void r(2).setValue(o,s,null)}"object"==typeof c&&c||r(1)(!1,"RelayResponseNormalizer: Expected data for field `%s` to be an object.",s);var l=this._getRecordType(c);if(null!=t.matchesByType[l]){var u=c.id||r(2).getLinkedRecordID(o,s)||r(8)(r(2).getDataID(o),s);"string"!=typeof u&&r(1)(!1,"RelayResponseNormalizer: Expected id on field `%s` to be a string.",s),r(2).setLinkedRecordID(o,s,u);var d=this._recordSource.get(u);d?this._validateRecordType(d,t,c):(d=r(2).create(u,l),this._recordSource.set(u,d));var f=c[r(0).MATCH_FRAGMENT_KEY];null!=f&&this._matchFieldPayloads.push({data:c,dataID:u,operationReference:f,path:(0,n.default)(this._path).concat([a]),typeName:l,variables:this._variables})}else r(2).setValue(o,s,null)},t._normalizeField=function(e,t,n,o){"object"==typeof o&&o||r(1)(!1,"writeField(): Expected data for field `%s` to be an object.",t.name);var i=t.alias||t.name,a=r(0).getStorageKey(t,this._variables),s=o[i];if(null==s){if(void 0===s&&!this._handleStrippedNulls)return;return r(4)(e.kind===r(3).LINKED_FIELD&&null==e.concreteType||Object.prototype.hasOwnProperty.call(o,i),"RelayResponseNormalizer(): Payload did not contain a value for field `%s: %s`. Check that you are parsing with the same query that was used to fetch the payload.",i,a),void r(2).setValue(n,a,null)}t.kind===r(3).SCALAR_FIELD?r(2).setValue(n,a,s):t.kind===r(3).LINKED_FIELD?(this._path.push(i),t.plural?this._normalizePluralLink(t,n,a,s):this._normalizeLink(t,n,a,s),this._path.pop()):(t.kind,r(3).MATCH_FIELD,r(1)(!1,"RelayResponseNormalizer(): Unexpected ast kind `%s` during normalization.",t.kind))},t._normalizeLink=function(e,t,n,o){"object"==typeof o&&o||r(1)(!1,"RelayResponseNormalizer: Expected data for field `%s` to be an object.",n);var i=o.id||r(2).getLinkedRecordID(t,n)||r(8)(r(2).getDataID(t),n);"string"!=typeof i&&r(1)(!1,"RelayResponseNormalizer: Expected id on field `%s` to be a string.",n),r(2).setLinkedRecordID(t,n,i);var a=this._recordSource.get(i);if(a)this._validateRecordType(a,e,o);else{var s=e.concreteType||this._getRecordType(o);a=r(2).create(i,s),this._recordSource.set(i,a)}this._traverseSelections(e,a,o)},t._normalizePluralLink=function(e,t,n,o){var i=this;Array.isArray(o)||r(1)(!1,"RelayResponseNormalizer: Expected data for field `%s` to be an array of objects.",n);var a=r(2).getLinkedRecordIDs(t,n),s=[];o.forEach(function(o,c){if(null!=o){i._path.push(String(c)),"object"!=typeof o&&r(1)(!1,"RelayResponseNormalizer: Expected elements for field `%s` to be objects.",n);var l=o.id||a&&a[c]||r(8)(r(2).getDataID(t),n,c);"string"!=typeof l&&r(1)(!1,"RelayResponseNormalizer: Expected id of elements of field `%s` to be strings.",n),s.push(l);var u=i._recordSource.get(l);if(u)i._validateRecordType(u,e,o);else{var d=e.concreteType||i._getRecordType(o);u=r(2).create(l,d),i._recordSource.set(l,u)}i._traverseSelections(e,u,o),i._path.pop()}else s.push(o)}),r(2).setLinkedRecordIDs(t,n,s)},t._validateRecordType=function(e,t,n){var o="LinkedField"===t.kind&&t.concreteType||this._getRecordType(n);r(4)(r(2).getType(e)===o,"RelayResponseNormalizer: Invalid record `%s`. Expected %s to be be consistent, but the record was assigned conflicting types `%s` and `%s`. The GraphQL server likely violated the globally unique id requirement by returning the same id for different objects.",r(2).getDataID(e),r(0).TYPENAME_KEY,r(2).getType(e),o)},e}();o=r(30).instrument("RelayResponseNormalizer.normalize",o),e.exports={normalize:o}},function(e,t,r){"use strict";e.exports=function(e,t){return e===t&&(null===e||"object"!=typeof e)}},function(e,t,r){"use strict";var n=function(){function e(e,t,n,o,i){var a;this._operationLoader=null!==(a=i)&&void 0!==a?a:null,this._handlers=o,this._mutator=new(r(22))(e,t),this._recordWasMissing=!1,this._source=e,this._variables=n,this._recordSourceProxy=new(r(23))(this._mutator)}var t=e.prototype;return t.check=function(e,t){return this._traverse(e,t),!this._recordWasMissing},t._getVariableValue=function(e){return this._variables.hasOwnProperty(e)||r(1)(!1,"RelayAsyncLoader(): Undefined variable `%s`.",e),this._variables[e]},t._handleMissing=function(){this._recordWasMissing=!0},t._getDataForHandlers=function(e,t){return{args:e.args?r(0).getArgumentValues(e.args,this._variables):{},record:this._source.get(t)}},t._handleMissingScalarField=function(e,t){var r=this._getDataForHandlers(e,t),n=r.args,o=r.record,i=!0,a=!1,s=void 0;try{for(var c,l=this._handlers[Symbol.iterator]();!(i=(c=l.next()).done);i=!0){var u=c.value;if("scalar"===u.kind){var d=u.handle(e,o,n,this._recordSourceProxy);if(void 0!==d)return d}}}catch(e){a=!0,s=e}finally{try{i||null==l.return||l.return()}finally{if(a)throw s}}this._handleMissing()},t._handleMissingLinkField=function(e,t){var n=this._getDataForHandlers(e,t),o=n.args,i=n.record,a=!0,s=!1,c=void 0;try{for(var l,u=this._handlers[Symbol.iterator]();!(a=(l=u.next()).done);a=!0){var d=l.value;if("linked"===d.kind){var f=d.handle(e,i,o,this._recordSourceProxy);if(null!=f&&this._mutator.getStatus(f)===r(5).EXISTENT)return f}}}catch(e){s=!0,c=e}finally{try{a||null==u.return||u.return()}finally{if(s)throw c}}this._handleMissing()},t._handleMissingPluralLinkField=function(e,t){var n=this,o=this._getDataForHandlers(e,t),i=o.args,a=o.record,s=!0,c=!1,l=void 0;try{for(var u,d=this._handlers[Symbol.iterator]();!(s=(u=d.next()).done);s=!0){var f=u.value;if("pluralLinked"===f.kind){var p=f.handle(e,a,i,this._recordSourceProxy);if(null!=p)return p.filter(function(e){return null!=e&&n._mutator.getStatus(e)===r(5).EXISTENT})}}}catch(e){c=!0,l=e}finally{try{s||null==d.return||d.return()}finally{if(c)throw l}}this._handleMissing()},t._traverse=function(e,t){var n=this._mutator.getStatus(t);n===r(5).UNKNOWN&&this._handleMissing(),n===r(5).EXISTENT&&this._traverseSelections(e.selections,t)},t._traverseSelections=function(e,t){var n=this;e.forEach(function(o){switch(o.kind){case r(3).SCALAR_FIELD:n._checkScalar(o,t);break;case r(3).LINKED_FIELD:o.plural?n._checkPluralLink(o,t):n._checkLink(o,t);break;case r(3).CONDITION:n._getVariableValue(o.condition)===o.passingValue&&n._traverseSelections(o.selections,t);break;case r(3).INLINE_FRAGMENT:var i=n._mutator.getType(t);null!=i&&i===o.type&&n._traverseSelections(o.selections,t);break;case r(3).LINKED_HANDLE:var a=r(41)(o,e,n._variables);a.plural?n._checkPluralLink(a,t):n._checkLink(a,t);break;case r(3).MATCH_FIELD:n._checkMatch(o,t);break;case r(3).DEFER:case r(3).STREAM:n._traverseSelections(o.selections,t);break;case r(3).SCALAR_HANDLE:case r(3).FRAGMENT_SPREAD:r(1)(!1,"RelayAsyncLoader(): Unexpected ast kind `%s`.",o.kind);break;default:r(1)(!1,"RelayAsyncLoader(): Unexpected ast kind `%s`.",o.kind)}})},t._checkMatch=function(e,t){var n=r(0).getStorageKey(e,this._variables),o=this._mutator.getLinkedRecordID(t,n);if(void 0===o)this._handleMissing();else if(null!==o){var i=this._mutator.getStatus(o);if(i===r(5).UNKNOWN)return void this._handleMissing();if(i!==r(5).EXISTENT)return;var a=this._mutator.getType(o);if(null!=(null!=a?e.matchesByType[a]:null)){var s=this._operationLoader;null===s&&r(1)(!1,"DataChecker: Expected an operationLoader to be configured when using `@match`.");var c=this._mutator.getValue(o,r(0).MATCH_FRAGMENT_KEY);if(void 0===c)return void this._handleMissing();if(null===c)return;var l=s.get(c);null!=l?this._traverse(l,o):this._handleMissing()}}},t._checkScalar=function(e,t){var n=r(0).getStorageKey(e,this._variables),o=this._mutator.getValue(t,n);void 0===o&&void 0!==(o=this._handleMissingScalarField(e,t))&&this._mutator.setValue(t,n,o)},t._checkLink=function(e,t){var n=r(0).getStorageKey(e,this._variables),o=this._mutator.getLinkedRecordID(t,n);void 0===o&&null!=(o=this._handleMissingLinkField(e,t))&&this._mutator.setLinkedRecordID(t,n,o),null!=o&&this._traverse(e,o)},t._checkPluralLink=function(e,t){var n=this,o=r(0).getStorageKey(e,this._variables),i=this._mutator.getLinkedRecordIDs(t,o);void 0===i&&null!=(i=this._handleMissingPluralLinkField(e,t))&&this._mutator.setLinkedRecordIDs(t,o,i),i&&i.forEach(function(t){null!=t&&n._traverse(e,t)})},e}();e.exports={check:function(e,t,r,o,i){var a=r.dataID,s=r.node,c=r.variables;return new n(e,t,c,o,i).check(s,a)}}},function(e,t,r){"use strict";var n=r(6)(r(13));e.exports=function(e,t,o){var i=t.find(function(t){return t.kind===r(3).LINKED_FIELD&&t.name===e.name&&t.alias===e.alias&&r(27)(t.args,e.args)});i&&i.kind===r(3).LINKED_FIELD||r(1)(!1,"cloneRelayHandleSourceField: Expected a corresponding source field for handle `%s`.",e.handle);var a=r(0).getHandleStorageKey(e,o);return(0,n.default)({},i,{args:null,name:a,storageKey:a})}},function(e,t,r){"use strict";e.exports=function(e,t){var n=t.data,o=t.errors;if(null!=n)return r(17)(e.root,n,o,{handleStrippedNulls:!0});var i=e.node,a=r(43).create("RelayNetwork","No data returned for operation `%s`, got error(s):\n%s\n\nSee the error `source` property for more information.",i.params?i.params.name:i.name,o?o.map(function(e){return e.message}).join("\n"):"(No errors)");throw a.source={errors:o,operation:e.node,variables:e.variables},a}},function(e,t,r){"use strict";var n=r(6)(r(29)),o={create:function(e,t){for(var r=arguments.length,n=new Array(r>2?r-2:0),o=2;o2?r-2:0),o=2;o0&&(this._publishQueue.commitSource(n),this._publishQueue.run()),o},n.execute=function(e){var t=e.operation,n=e.cacheConfig,o=e.updater;return r(55).execute({operation:t,cacheConfig:n,updater:o,network:this._network,operationLoader:this._operationLoader,publishQueue:this._publishQueue})},n.executeMutation=function(e){var t,n=this,o=e.operation,i=e.optimisticResponse,a=e.optimisticUpdater,s=e.updater,c=e.uploadables;(i||a)&&(t={operation:o,selectorStoreUpdater:a,response:i||null});var l=o.node;return this._network.execute(l.params,o.variables,{force:!0},c).do({start:function(){t&&(n._publishQueue.applyUpdate(t),n._publishQueue.run())},next:function(e){t&&(n._publishQueue.revertUpdate(t),t=void 0),n._publishQueue.commitPayload(o,r(42)(o,e),s),n._publishQueue.run()},error:function(e){function t(t){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(function(e){t&&(n._publishQueue.revertUpdate(t),t=void 0,n._publishQueue.run())}),unsubscribe:function(){t&&(n._publishQueue.revertUpdate(t),t=void 0,n._publishQueue.run())}})},n.sendQuery=function(e){var t=e.cacheConfig,n=e.onCompleted,o=e.onError,i=e.onNext,a=e.operation;return r(4)(!1,"environment.sendQuery() is deprecated. Update to the latest version of react-relay, and use environment.execute()."),this.execute({operation:a,cacheConfig:t}).subscribeLegacy({onNext:i,onError:o,onCompleted:n})},n.sendMutation=function(e){var t=e.onCompleted,n=e.onError,o=e.operation,i=e.optimisticResponse,a=e.optimisticUpdater,s=e.updater,c=e.uploadables;return r(4)(!1,"environment.sendMutation() is deprecated. Update to the latest version of react-relay, and use environment.executeMutation()."),this.executeMutation({operation:o,optimisticResponse:i,optimisticUpdater:a,updater:s,uploadables:c}).subscribeLegacy({onNext:function(e){t&&t(e.errors)},onError:n,onCompleted:t})},n.toJSON=function(){var e;return"RelayModernEnvironment(".concat(null!==(e=this.configName)&&void 0!==e?e:"",")")},e}();n.prototype["@@RelayModernEnvironment"]=!0,e.exports=n}).call(this,r(47))},function(e,t){var r;r=function(){return this}();try{r=r||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(r=window)}e.exports=r},function(e,t,r){"use strict";var n=function(){function e(e,t){this._backup=new(r(12)),this._handlerProvider=t||null,this._pendingBackupRebase=!1,this._pendingUpdaters=new Set,this._pendingData=new Set,this._pendingOptimisticUpdates=new Set,this._store=e,this._appliedOptimisticUpdates=new Set,this._gcHold=null}var t=e.prototype;return t.applyUpdate=function(e){(this._appliedOptimisticUpdates.has(e)||this._pendingOptimisticUpdates.has(e))&&r(1)(!1,"RelayPublishQueue: Cannot apply the same update function more than once concurrently."),this._pendingOptimisticUpdates.add(e)},t.revertUpdate=function(e){this._pendingOptimisticUpdates.has(e)?this._pendingOptimisticUpdates.delete(e):this._appliedOptimisticUpdates.has(e)&&(this._pendingBackupRebase=!0,this._appliedOptimisticUpdates.delete(e))},t.revertAll=function(){this._pendingBackupRebase=!0,this._pendingOptimisticUpdates.clear(),this._appliedOptimisticUpdates.clear()},t.commitPayload=function(e,t,r){var n=t.fieldPayloads,o=t.source;this._pendingBackupRebase=!0,this._pendingData.add({kind:"payload",payload:{fieldPayloads:n,operation:e,source:o,updater:r}})},t.commitRelayPayload=function(e){var t=e.fieldPayloads,r=e.source;this._pendingBackupRebase=!0,this._pendingData.add({kind:"payload",payload:{fieldPayloads:t,operation:null,source:r,updater:null}})},t.commitUpdate=function(e){this._pendingBackupRebase=!0,this._pendingUpdaters.add(e)},t.commitSource=function(e){this._pendingBackupRebase=!0,this._pendingData.add({kind:"source",source:e})},t.run=function(){this._pendingBackupRebase&&this._backup.size()&&(this._store.publish(this._backup),this._backup=new(r(12))),this._commitData(),this._commitUpdaters(),this._applyUpdates(),this._pendingBackupRebase=!1,this._appliedOptimisticUpdates.size>0?this._gcHold||(this._gcHold=this._store.holdGC()):this._gcHold&&(this._gcHold.dispose(),this._gcHold=null),this._store.notify()},t._getSourceFromPayload=function(e){var t=this,n=e.fieldPayloads,i=e.operation,a=e.source,s=e.updater,c=new(r(22))(this._store.getSource(),a),l=new(r(23))(c);if(n&&n.length&&n.forEach(function(e){var n=t._handlerProvider&&t._handlerProvider(e.handle);n||r(1)(!1,"RelayModernEnvironment: Expected a handler to be provided for handle `%s`.",e.handle),n.update(l,e)}),s){var u=null===i||void 0===i?void 0:i.fragment;null==u&&r(1)(!1,"RelayModernEnvironment: Expected a selector to be provided with updater function."),s(new(r(28))(l,u),o(a,u,i))}return a},t._commitData=function(){var e=this;this._pendingData.size&&(this._pendingData.forEach(function(t){var r;r="payload"===t.kind?e._getSourceFromPayload(t.payload):t.source,e._store.publish(r)}),this._pendingData.clear())},t._commitUpdaters=function(){var e=this;if(this._pendingUpdaters.size){var t=new(r(12));this._pendingUpdaters.forEach(function(n){var o=new(r(22))(e._store.getSource(),t),i=new(r(23))(o);r(18).applyWithGuard(n,null,[i],null,"RelayPublishQueue:commitUpdaters")}),this._store.publish(t),this._pendingUpdaters.clear()}},t._applyUpdates=function(){var e=this;if(this._pendingOptimisticUpdates.size||this._pendingBackupRebase&&this._appliedOptimisticUpdates.size){var t=new(r(12)),n=new(r(22))(this._store.getSource(),t,this._backup),i=new(r(23))(n,this._handlerProvider);this._pendingBackupRebase&&this._appliedOptimisticUpdates.size&&this._appliedOptimisticUpdates.forEach(function(e){if(e.operation){var t,n=e.selectorStoreUpdater,a=e.operation,s=e.response,c=i.commitPayload(a,s);if(s)t=o(r(17)(a.root,s).source,a.fragment,a);n&&r(18).applyWithGuard(n,null,[c,t],null,"RelayPublishQueue:applyUpdates")}else if(e.storeUpdater){var l=e.storeUpdater;r(18).applyWithGuard(l,null,[i],null,"RelayPublishQueue:applyUpdates")}else{var u=e.source,d=e.fieldPayloads;i.publishSource(u,d)}}),this._pendingOptimisticUpdates.size&&(this._pendingOptimisticUpdates.forEach(function(t){if(t.operation){var n,a=t.selectorStoreUpdater,s=t.operation,c=t.response,l=i.commitPayload(s,c);if(c)n=o(r(17)(s.root,c).source,s.fragment,s);a&&r(18).applyWithGuard(a,null,[l,n],null,"RelayPublishQueue:applyUpdates")}else if(t.storeUpdater){var u=t.storeUpdater;r(18).applyWithGuard(u,null,[i],null,"RelayPublishQueue:applyUpdates")}else{var d=t.source,f=t.fieldPayloads;i.publishSource(d,f)}e._appliedOptimisticUpdates.add(t)}),this._pendingOptimisticUpdates.clear()),this._store.publish(t)}},e}();function o(e,t,n){var o=r(33).read(e,t,n).data,i=r(16);return o&&i(o),o}e.exports=n},function(e,t){e.exports=function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);te.length;){this._resolvers.pop().dispose()}for(var t=0;t1&&void 0!==arguments[1]?arguments[1]:null,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,l=arguments.length>3&&void 0!==arguments[3]&&arguments[3],f=o.matchPayloads;f&&f.length&&(i||r(1)(!1,"RelayModernEnvironment: Expected an operationLoader to be configured when using `@match`."),f.forEach(function(n){(function(e,t,n){return r(15).from(new Promise(function(e,r){t.load(n.operationReference).then(e,r)})).map(function(t){if(null!=t){var o={dataID:n.dataID,variables:n.variables,node:t},i=new(r(12)),a=r(2).create(n.dataID,n.typeName);i.set(n.dataID,a);var s=r(38).normalize(i,o,n.data),c={errors:null,fieldPayloads:s.fieldPayloads,matchPayloads:s.matchPayloads,source:i};e(c)}})})(t,i,n).subscribe({complete:d,error:e.error,start:u})})),l?(null!==c&&r(1)(!1,"environment.execute: only support one optimistic response per execute."),c={source:o.source,fieldPayloads:o.fieldPayloads},n.applyUpdate(c),n.run()):(null!==c&&(n.revertUpdate(c),c=null),a&&s?n.commitPayload(a,o,s):n.commitRelayPayload(o),n.run())},p=o.node;return t.execute(p.params,o.variables,a||{}).subscribe({complete:d,next:function(t){var n,i=r(42)(o,t),a=!0===(null===(n=t.extensions)||void 0===n?void 0:n.isOptimistic);f(i,o,s,a),e.next(t)},error:e.error,start:u}),function(){0!==l.size&&(l.forEach(function(e){return e.unsubscribe()}),l.clear()),null!==c&&(n.revertUpdate(c),c=null,n.run())}})}}},function(e,t,r){"use strict";e.exports=function(e){return!!e&&"function"==typeof e.then}},function(e,t){e.exports=a},function(e,t,r){"use strict";e.exports={create:function(e,t){var n=r(25).convertFetch(e),o=t?r(25).convertSubscribe(t):void 0;return{execute:function(e,t,i,a){if("subscription"===e.operationKind)return o||r(1)(!1,"RelayNetwork: This network layer does not support Subscriptions. To use Subscriptions, provide a custom network layer."),a&&r(1)(!1,"RelayNetwork: Cannot provide uploadables while subscribing."),o(e,t,i);var s=i.poll;return null!=s?(a&&r(1)(!1,"RelayNetwork: Cannot provide uploadables while polling."),n(e,t,{force:!0}).poll(s)):n(e,t,i,a)}}}}},function(e,t,r){"use strict";var n=r(6)(r(13)),o=function(){function e(e){var t=e.size,n=e.ttl;t>0||r(1)(!1,"RelayQueryResponseCache: Expected the max cache size to be > 0, got `%s`.",t),n>0||r(1)(!1,"RelayQueryResponseCache: Expected the max ttl to be > 0, got `%s`.",n),this._responses=new Map,this._size=t,this._ttl=n}var t=e.prototype;return t.clear=function(){this._responses.clear()},t.get=function(e,t){var r=this,o=i(e,t);this._responses.forEach(function(e,t){(function(e,t){return e+t>=Date.now()})(e.fetchTime,r._ttl)||r._responses.delete(t)});var a=this._responses.get(o);return null!=a?(0,n.default)({},a.payload,{extensions:(0,n.default)({},a.payload.extensions,{cacheTimestamp:a.fetchTime})}):null},t.set=function(e,t,r){var n=Date.now(),o=i(e,t);if(this._responses.delete(o),this._responses.set(o,{fetchTime:n,payload:r}),this._responses.size>this._size){var a=this._responses.keys().next();a.done||this._responses.delete(a.value)}},e}();function i(e,t){return JSON.stringify(r(21)({queryID:e,variables:t}))}e.exports=o},function(e,t,r){"use strict";var n=r(6)(r(13)),o=function(){function e(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r(61),n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,o=e.getRecordIDs(),i=0;i0&&(e._gcHoldCounter--,0===e._gcHoldCounter&&e._shouldScheduleGC&&(e._scheduleGC(),e._shouldScheduleGC=!1))}}},t.toJSON=function(){return"RelayModernStore()"},t.__getUpdatedRecordIDs=function(){return this._updatedRecordIDs},t._updateSubscription=function(e){var t=e.callback,o=e.snapshot;if(r(62)(o,this._updatedRecordIDs)){var i=r(33).read(this._recordSource,o,o.owner),a=i.data,s=i.seenRecords,c=r(44)(o.data,a),l=(0,n.default)({},o,{data:c,seenRecords:s});r(16)(l),e.snapshot=l,l.data!==o.data&&t(l)}},t._scheduleGC=function(){var e=this;this._gcHoldCounter>0?this._shouldScheduleGC=!0:this._hasScheduledGC||(this._hasScheduledGC=!0,this._gcScheduler(function(){e.__gc(),e._hasScheduledGC=!1}))},t.__gc=function(){var e=this,t=new Set;if(this._roots.forEach(function(n){r(63).mark(e._recordSource,n,t,e._operationLoader)}),t.size)for(var n=this._recordSource.getRecordIDs(),o=0;o1?t-1:0),n=1;n