Comparing version 1.0.0-rc4 to 1.0.0
@@ -1,2 +0,2 @@ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("graphql")):"function"==typeof define&&define.amd?define(["exports","graphql"],t):t(e.blips={},e.GraphQL)}(this,function(e,t){"use strict";function r(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function n(e,t){return t={exports:{}},e(t,t.exports),t.exports}function o(){}function i(){i.init.call(this)}function u(e){return void 0===e._maxListeners?i.defaultMaxListeners:e._maxListeners}function s(e,t,r,n){var i,s,a;if("function"!=typeof r)throw new TypeError('"listener" argument must be a function');if((s=e._events)?(s.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),s=e._events),a=s[t]):(s=e._events=new o,e._eventsCount=0),a){if("function"==typeof a?a=s[t]=n?[r,a]:[a,r]:n?a.unshift(r):a.push(r),!a.warned&&(i=u(e))&&i>0&&a.length>i){a.warned=!0;var c=Error("Possible EventEmitter memory leak detected. "+a.length+" "+t+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=a.length,function(e){"function"==typeof console.warn?console.warn(e):console.log(e)}(c)}}else a=s[t]=r,++e._eventsCount;return e}function a(e,t,r){function n(){e.removeListener(t,n),o||(o=!0,r.apply(e,arguments))}var o=!1;return n.listener=r,n}function c(e){var t=this._events;if(t){var r=t[e];if("function"==typeof r)return 1;if(r)return r.length}return 0}function f(e,t){for(var r=Array(t);t--;)r[t]=e[t];return r}function l(e){return!!y(e)}function h(e){var t=null!=e&&e.length;return"number"==typeof t&&t>=0&&t%1==0}function p(e){var t=y(e);if(t)return t.call(e)}function y(e){if(null!=e){var t=K&&e[K]||e["@@iterator"];if("function"==typeof t)return t}}function d(e){if(null!=e){var t=p(e);if(t)return t;if(h(e))return new v(e)}}function v(e){this._o=e,this._i=0}function b(e){var t=m(e);if(t)return t.call(e)}function m(e){if(null!=e){var t=se&&e[se]||e["@@asyncIterator"];if("function"==typeof t)return t}}function w(e){if(null!=e){var t=b(e);if(t)return t;var r=d(e);if(r)return new g(r)}}function g(e){this._i=e}function O(e,t,r){var n=this,o=function(){if(e.length>0){var i=e.shift();i&&i.apply(n,[t,o])}else r(t)};o()}function _(e){void 0===e&&(e={});var t=e.constructOptions,r=e.customFetch,n=e.uri||"/graphql",o=[],i=[],u=[],s=[],a=function(e){var a,c={},f=Array.isArray(e);return function(e,t){return new Promise(function(r,n){t?O(i.slice(),e,r):O(o.slice(),e,r)})}(f?{requests:e,options:c}:{request:e,options:c},f).then(function(e){return(t||function(e,t){var r;try{r=JSON.stringify(e)}catch(e){throw Error("Network request failed. Payload is not serializable: "+e.message)}return _e({body:r,method:"POST"},t,{headers:_e({Accept:"*/*","Content-Type":"application/json"},t.headers||[])})})(e.request||e.requests,e.options)}).then(function(e){return c=_e({},e),(r||fetch)(n,c)}).then(function(e){return e.text().then(function(t){try{var r=JSON.parse(t);return e.raw=t,e.parsed=r,e}catch(r){return a=r,e.raw=t,e}})}).then(function(e){return function(e,t){return new Promise(function(r,n){t?O(s.slice(),e,r):O(u.slice(),e,r)})}({response:e,options:c},f)}).then(function(e){var t=e.response;if(t.parsed){if(!f)return _e({},t.parsed);if(Array.isArray(t.parsed))return t.parsed;!function(e){var t=Error("A batched Operation of responses for ");throw t.response=e,t}(t)}else!function(e,t){var r;throw r=Error(e&&e.status>=300?"Network request failed with status "+e.status+' - "'+e.statusText+'"':"Network request failed to return valid JSON"),r.response=e,r.parseError=t,r}(t,a)})};return a.use=function(e){if("function"!=typeof e)throw Error("Middleware must be a function");return o.push(e),a},a.useAfter=function(e){if("function"!=typeof e)throw Error("Afterware must be a function");return u.push(e),a},a.batchUse=function(e){if("function"!=typeof e)throw Error("Middleware must be a function");return i.push(e),a},a.batchUseAfter=function(e){if("function"!=typeof e)throw Error("Afterware must be a function");return s.push(e),a},a}function E(e,t,r,n){function o(e,t){return j(e,t,r.slice(),n.slice())}var i=Fe(e),u=Fe(t);return!qe(function(e,t){return!qe(o,t,e)},u,i)}function j(e,t,r,n){if(Be(e,t))return!0;var o=Qe(e);if(o!==Qe(t))return!1;if(null==e||null==t)return!1;if("function"==typeof e["fantasy-land/equals"]||"function"==typeof t["fantasy-land/equals"])return"function"==typeof e["fantasy-land/equals"]&&e["fantasy-land/equals"](t)&&"function"==typeof t["fantasy-land/equals"]&&t["fantasy-land/equals"](e);if("function"==typeof e.equals||"function"==typeof t.equals)return"function"==typeof e.equals&&e.equals(t)&&"function"==typeof t.equals&&t.equals(e);switch(o){case"Arguments":case"Array":case"Object":if("function"==typeof e.constructor&&"Promise"===Re(e.constructor))return e===t;break;case"Boolean":case"Number":case"String":if(typeof e!=typeof t||!Be(e.valueOf(),t.valueOf()))return!1;break;case"Date":if(!Be(e.valueOf(),t.valueOf()))return!1;break;case"Error":return e.name===t.name&&e.message===t.message;case"RegExp":if(e.source!==t.source||e.global!==t.global||e.ignoreCase!==t.ignoreCase||e.multiline!==t.multiline||e.sticky!==t.sticky||e.unicode!==t.unicode)return!1}for(var i=r.length-1;i>=0;){if(r[i]===e)return n[i]===t;i-=1}switch(o){case"Map":return e.size===t.size&&E(e.entries(),t.entries(),r.concat([e]),n.concat([t]));case"Set":return e.size===t.size&&E(e.values(),t.values(),r.concat([e]),n.concat([t]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var u=Ge(e);if(u.length!==Ge(t).length)return!1;var s=r.concat([e]),a=n.concat([t]);for(i=u.length-1;i>=0;){var c=u[i];if(!Te(c,t)||!j(t[c],e[c],s,a))return!1;i-=1}return!0}function x(e,t,r){for(var n=r.next();!n.done;){if((t=e["@@transducer/step"](t,n.value))&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}n=r.next()}return e["@@transducer/result"](t)}function A(e,t,r,n){return e["@@transducer/result"](r[n](Xe(e["@@transducer/step"],e),t))}function T(e){return function(e,t){var r=this[e];return gt(r,e),mt(r)?xe(t)?r:function(e,t){if(!wt(t))return[];var r=Object.entries(t)[0],n=r[0],o=r[1];return e.filter(function(e){return e[n]===o})}(r,t):xe(t)?r:function(e,t){if(wt(t)){var r=Object.entries(t)[0]||{},n=r[0],o=r[1];return Object.entries(e).filter(function(e){return e[1][n]===o}).reduce(function(e,t){var r;return _t({},e,(r={},r[t[0]]=t[1],r))},{})}return e[t]}(r,t)}}function P(e){return function(e,t,r){var n=this[e];return gt(n,e),mt(n)?function(e,t){return this[e]=[].concat(this[e]||[],[t]),t}.call(this,e,t):function(e,t,r){var n;return Ae(!xe(t),"You forgot to specify the payload"),Ae(!xe(r),"You are trying to post to a collection object but haven't specified an identifier. Try again with \"clerk.post('"+e+"', payload, identifier)\""),this[e]=jt({},this[e]||{},(n={},n[r]=t,n)),t}.call(this,e,t,r)}}function S(e){return function(e,t,r){var n=this[e];return gt(n,e),mt(n)?function(e,t,r){if(xe(r))return this[e]=[].concat(this[e],[t]),t;Ae(wt(r),"When updating a resource inside a list you have to specify an identifier object containing the key/value pair you want to match.");var n=Object.entries(r)[0],o=n[0],i=n[1],u=this[e].findIndex(function(e){return e[o]===i});return this[e]=[].concat(this[e].slice(0,u),[t],this[e].slice(u+1)),t}.call(this,e,t,r):function(e,t,r){var n;return Ae(!xe(r),"You are trying to update a resource but haven't specified the identifier. Try again with \"clerk.put('"+e+"', payload, identifier)\""),this[e]=At({},this[e]||{},(n={},n[r]=t,n)),t}.call(this,e,t,r)}}function k(e){return function(e,t,r){var n=this[e];return gt(n,e),Ae(!xe(r),"You are trying to patch a resource but haven't specified the identifier. Try again with \"clerk.patch('"+e+"', payload, key)\""),mt(n)?function(e,t,r){Ae(wt(r),"When patching a resource inside a list you have to specify an identifier object containing the key/value pair you want to match.");var n=Object.entries(r)[0],o=n[0],i=n[1],u=this[e].findIndex(function(e){return e[o]===i});if(u>=0){var s=St(this[e][u],Ot(t));return this[e]=[].concat(this[e].slice(0,u),[s],this[e].slice(u+1)),s}}.call(this,e,t,r):function(e,t,r){var n;if(Ae(!xe(r),"You are trying to update a resource but haven't specified the identifier. Try again with \"clerk.put('"+e+"', payload, identifier)\""),!xe(this[e][r])){var o=St(this[e][r],Ot(t));return this[e]=kt({},this[e]||{},(n={},n[r]=o,n)),o}}.call(this,e,t,r)}}function L(e){return function(e,t){if(!xe(t)){var r=this[e];return gt(r,e),mt(r)?function(e,t){if(wt(t)){var r=Object.entries(t)[0],n=r[0],o=r[1],i=this[e].findIndex(function(e){return e[n]===o});if(i>=0){var u=this[e][i];return this[e]=[].concat(this[e].slice(0,i),this[e].slice(i+1)),u}}}.call(this,e,t):function(e,t){var r=this[e][t];if(!xe(r))return this[e]=It([t],this[e]),r}.call(this,e,t)}}}function I(e,t,r){var n=!!e;return"function"==typeof e&&(n=!!e(r)),n?"function"==typeof t?t(r):t:r}function C(e,t){return null===t?"null"===e.toLowerCase():void 0===t?"undefined"===e.toLowerCase():e.toLowerCase()===function(e){return Object.prototype.toString.call(e).slice(8,-1)}(t).toLowerCase()}function F(e){return"string"==typeof e?!e:C("object",e)?!Object.values(e).length:C("array",e)?!e.length:C("Map",e)?!e.size:!!C("Set",e)&&!e.size}function q(e){var t=this;return new qt(function(r){return Ut(regeneratorRuntime.mark(function n(){var o,i,u,s,a,c,f;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:t.prev=0,o=!0,i=!1,u=void 0,t.prev=4,s=Bt(e);case 6:return t.next=8,s.next();case 8:return a=t.sent,o=a.done,t.next=12,a.value;case 12:if(c=t.sent,o){t.next=19;break}r.next(f=c);case 16:o=!0,t.next=6;break;case 19:t.next=25;break;case 21:t.prev=21,t.t0=t.catch(4),i=!0,u=t.t0;case 25:if(t.prev=25,t.prev=26,o||!s.return){t.next=30;break}return t.next=30,s.return();case 30:if(t.prev=30,!i){t.next=33;break}throw u;case 33:return t.finish(30);case 34:return t.finish(25);case 35:t.next=41;break;case 37:t.prev=37,t.t1=t.catch(0),e.return(),r.error(t.t1);case 41:case"end":return t.stop()}},n,t,[[0,37],[4,21,25,35],[26,,30,34]])}))(),function(){r.complete(),e.return()}})}function R(e,t){if(!t||"object"!==(void 0===t?"undefined":Rt(t))||t.hasOwnProperty("length")||t.hasOwnProperty("size"))return e;var r=t.store,n=Dt(t,["store"]);r&&console.warn(Mt);var o=Object.keys(n),i=Array.isArray(o),u=0;for(o=i?o:o[Symbol.iterator]();;){var s;if(i){if(u>=o.length)break;s=o[u++]}else{if((u=o.next()).done)break;s=u.value}var a=s;e.hasOwnProperty(a)&&console.warn(Gt(a))}return Nt({},e,n)}function B(e){return null==e}function U(e){for(var t=[],r=[],n=Array.isArray(i=e),o=0,i=n?i:i[Symbol.iterator]();;){var u;if(n){if(o>=i.length)break;u=i[o++]}else{if((o=i.next()).done)break;u=o.value}var s=u||{},a=s.data,c=s.errors;c&&(t=[].concat(t,c)),a&&(r=[].concat(r,[a]))}var f=function(e){return I(F,function(){},e.reduce(function(e,t){return C("object",t)&&!B(t)?Nt({},e,t):e},{}))}(r),l=function(e){return I(F,function(){},e.reduce(function(e,t){var r;if(B(t)||F(t))return e;var n=t.path?t.path[0]:C("object",t)?t.constructor.name:"Errors";return Nt({},e,(r={},r[n]=[].concat(e[n]||[],[t]),r))},{}))}(t);return Nt({},f?{data:f}:{},l?{errors:l}:{})}function N(e){return!(e.kind!==t.Kind.OPERATION_DEFINITION)}function D(e){if("subscription"===e.operation&&1!==e.selectionSet.selections.length)return new t.GraphQLError(function(e){return(e?'Subscription "'+e+'" ':"Anonymous Subscription ")+"must select only one top level field."}(e.name&&e.name.value),e.selectionSet.selections.slice(1))}function M(e,r){if(!e.name&&r>1)return new t.GraphQLError("This anonymous operation must be the only defined operation.",[e])}function G(e,r){if(function(e){return!(e.kind!==t.Kind.FRAGMENT_DEFINITION)}(e)){var n=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).name.value}(e);if(r[n])return new t.GraphQLError(function(e){return'There can be only one fragment named "'+e+'".'}(n),[r[n],e.name]);r[n]=e.name}}function Q(e){for(var t=function(e){return e.definitions.filter(N)}(e).length,r=Object.create(null),n=[],o=Array.isArray(u=e.definitions),i=0,u=o?u:u[Symbol.iterator]();;){var s;if(o){if(i>=u.length)break;s=u[i++]}else{if((i=u.next()).done)break;s=i.value}var a=s,c=M(a,t)||G(a,r)||D(a);c&&n.push(c)}return n}function z(){function e(e){var r=e;try{r=function(e){return"string"==typeof e?t.parse(e):e}(e)}catch(e){return{document:r,errors:[e]}}var n=w?t.validate(w,r):Q(r);return Nt({document:r},!F(n)&&{errors:n})}function r(e){return function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.variables,o=void 0===n?{}:n,i=r.context,u=arguments[2],s=arguments[3];return e(w,t,{},R(E,void 0===i?{}:i),Nt({},j,o),u,s)}}function n(e,t){if(e)if(C("function",e))x.use(e);else{if(!C("array",e))throw new TypeError(Vt(t));for(var r=Array.isArray(o=e),n=0,o=r?o:o[Symbol.iterator]();;){var i;if(r){if(n>=o.length)break;i=o[n++]}else{if((n=o.next()).done)break;i=n.value}x.use(i)}}}function o(t){return function(r,n,o,i){var u=e(r),s=u.document,a=u.errors;if(a)return Promise.resolve({errors:a});if(o)return A(s,n,o,i);var c=s.definitions.filter(function(e){return e.operation===t});return 1===c.length?A(s,n,o,i):function(e){return new Promise(function(t){for(var r=[],n=function(){if(o){if(i>=u.length)return"break";s=u[i++]}else{if((i=u.next()).done)return"break";s=i.value}var e=s;r.push(new Promise(function(t){e.then(function(e){return t(e)},function(e){return t({errors:[e]})})}))},o=Array.isArray(u=e),i=0,u=o?u:u[Symbol.iterator]();;){var s;if("break"===n())break}Promise.all(r).then(function(e){t(U(e))})})}(c.map(function(e){return A(s,n,e.name.value,i)}))}}var i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},u=i.typeDefs,s=i.resolvers,a=this,c=arguments[1],f=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},l=f.variables,h=void 0===l?{}:l,p=f.context,y=void 0===p?{}:p,d=f.fetch,v=void 0===d?{}:d,b=new ge,m=void 0,w=void 0,g=void 0,O=void 0,E=void 0,j=void 0,x=void 0,A=r(t.execute),T=r(t.subscribe);return m=Nt({},c)||{},O=new Ft(m),g=I("function"==typeof s,s({pubsub:b,withFilter:Oe}),s),w=H({typeDefs:u,resolvers:g}),j=h,E=R({store:Nt({},O)},y),v.uri&&(x=_({uri:v.uri}),n(v.middleware,"middleware"),n(v.afterware,"afterware")),{get state(){return m},get schema(){return w},query:o("query"),mutate:o("mutation"),subscribe:function(){var r=Ut(regeneratorRuntime.mark(function r(n,o,i,u){var s,c,f,l,h;return regeneratorRuntime.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:if(s=e(n),c=s.document,!(f=s.errors)){r.next=3;break}return r.abrupt("return",Promise.resolve({errors:f}));case 3:if((l=c.definitions.filter(function(e){return"subscription"===e.operation})).length>=1){r.next=8;break}return r.abrupt("return",Promise.resolve({errors:[new t.GraphQLError(Yt)]}));case 8:if(l.length<=1){r.next=10;break}return r.abrupt("return",Promise.resolve({errors:[new t.GraphQLError(Wt)]}));case 10:return r.next=12,T(c,o,i,u);case 12:return h=r.sent,r.abrupt("return",q(h));case 14:case"end":return r.stop()}},r,a)}));return function(e,t,n,o){return r.apply(this,arguments)}}(),fetch:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).variables,r=void 0===t?{}:t,n=arguments[2];if(!x||!C("function",x))throw Error($t);return x({query:e,variables:r,operationName:n})},graphql:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).variables,r=void 0===t?{}:t,n=arguments[2];if(Ht[Qt]||(console.warn(Qt),Ht[Qt]=!0),!x||!C("function",x))throw Error($t);return x({query:e,variables:r,operationName:n})}}}var $="default"in t?t.default:t,Y="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},W=n(function(e,t){function r(e,t,r,n,o){var i={};return function(){var u=((Error().stack||"").match(/(?:\s+at\s.+){2}\s+at\s(.+)/)||[void 0,""])[1];if(!((u=/\)$/.test(u)?u.match(/[^(]+(?=\)$)/)[0]:u.trim())in i)){i[u]=!0;var s;switch(e){case"class":s="Class";break;case"property":s="Property";break;case"method":s="Method";break;case"function":s="Function"}s+=" `"+t+"` has been deprecated",n&&(s+=" since version "+n),r&&(s+=", use `"+r+"` instead"),s+=".",u&&(s+="\n at "+u),o&&(s+="\nCheck out "+o+" for more information."),console.warn(s)}}}function n(e,n,o,i,u,s){var a=(t.options.getWarner||r)(e,n,i,u,s),c={enumerable:(o=o||{writable:!0,enumerable:!1,configurable:!0}).enumerable,configurable:o.configurable};if(o.get||o.set)o.get&&(c.get=function(){return a(),o.get.call(this)}),o.set&&(c.set=function(e){return a(),o.set.call(this,e)});else{var f=o.value;c.get=function(){return a(),f},o.writable&&(c.set=function(e){a(),f=e})}return c}function o(e,n,o,i,u){for(var s=(t.options.getWarner||r)(e,n.name,o,i,u),a=function(){return s(),n.apply(this,arguments)},c=0,f=Object.getOwnPropertyNames(n);f.length>c;c++){var l=f[c],h=Object.getOwnPropertyDescriptor(n,l);h.writable?a[l]=n[l]:h.configurable&&Object.defineProperty(a,l,h)}return a}function i(){for(var e=[],t=0;arguments.length>t;t++)e[t-0]=arguments[t];var r=e[e.length-1];r="function"==typeof r?e.pop():void 0;var i,u,s,a=e[0];return"string"==typeof a?(i=a,u=e[1],s=e[2]):a&&(i=a.alternative,u=a.version,s=a.url),r?o("function",r,i,u,s):function(e,t,r){if("string"==typeof t){return n(r&&"function"==typeof r.value?"method":"property",t,r,i,u,s)}if("function"==typeof e){for(var a=o("class",e,i,u,s),c=e.name,f=0,l=Object.getOwnPropertyNames(a);l.length>f;f++){var h=l[f],p=Object.getOwnPropertyDescriptor(a,h);(p=n("class",c,p,i,u,s)).writable?a[h]=e[h]:p.configurable&&Object.defineProperty(a,h,p)}return a}}}t.options={getWarner:void 0},t.deprecated=i,Object.defineProperty(t,"__esModule",{value:!0}),t.default=i});r(W);var V=n(function(e,t){function r(e){return void 0!==e.kind}function n(e,t){void 0===t&&(t=[]);var o=[];return e.forEach(function(e){if(r(e)&&(e=$.print(e)),"function"==typeof e)-1===t.indexOf(e)&&(t.push(e),o=o.concat(n(e(),t)));else{if("string"!=typeof e){throw new v("typeDef array must contain only strings and functions, got "+typeof e)}o.push(e.trim())}}),function(e){return e.reduce(function(e,t){return-1===e.indexOf(t)?e.concat([t]):e},[])}(o.map(function(e){return e.trim()})).join("\n")}function o(e){var t,o=e;if(r(e))t=e;else if("string"!=typeof o){if(!Array.isArray(o)){throw new v("typeDefs must be a string, array or schema AST, got "+typeof o)}o=n(o)}"string"==typeof o&&(t=$.parse(o));var u=$.buildASTSchema(t),s=i(t);return s.definitions.length>0&&(u=$.extendSchema(u,s)),u}function i(e){var t=e.definitions.filter(function(e){return e.kind===$.Kind.TYPE_EXTENSION_DEFINITION});return Object.assign({},e,{definitions:t})}function u(e,t){var r=e.getTypeMap();Object.keys(r).forEach(function(e){var n=r[e];if(!$.getNamedType(n).name.startsWith("__")&&n instanceof $.GraphQLObjectType){var o=n.getFields();Object.keys(o).forEach(function(r){t(o[r],e,r)})}})}function s(e,t){[e.getQueryType(),e.getMutationType(),e.getSubscriptionType()].filter(function(e){return!!e}).forEach(function(r){var n=function(e){var t,r=Math.random();return function(n,o,i,u){return u.operation.__runAtMostOnce||(u.operation.__runAtMostOnce={}),u.operation.__runAtMostOnce[r]||(u.operation.__runAtMostOnce[r]=!0,t=e(n,o,i,u)),t}}(t),o=r.getFields();Object.keys(o).forEach(function(i){o[i].resolve=r===e.getSubscriptionType()?p(o[i].resolve,t):p(o[i].resolve,n)})})}function a(e,t,r){void 0===r&&(r={});var n=r.allowResolversNotInSchema,o=void 0!==n&&n;Object.keys(t).forEach(function(r){var n=e.getType(r);if(!n&&"__schema"!==r){if(o)return;throw new v('"'+r+'" defined in resolvers, but not in schema')}Object.keys(t[r]).forEach(function(e){if(e.startsWith("__"))n[e.substring(2)]=t[r][e];else if(n instanceof $.GraphQLScalarType)n[e]=t[r][e];else if(n instanceof $.GraphQLEnumType){if(!n.isValidValue(e))throw new v(r+"."+e+" was defined in resolvers, but enum is not in schema");n.getValue(e).value=t[r][e]}else{var i=function(e){return e instanceof $.GraphQLObjectType||e instanceof $.GraphQLInterfaceType?e.getFields():void 0}(n);if(!i){if(o)return;throw new v(r+" was defined in resolvers, but it's not an object")}if(!i[e]){if(o)return;throw new v(r+"."+e+" defined in resolvers, but not in schema")}var u=i[e],s=t[r][e];if("function"==typeof s)c(u,{resolve:s});else{if("object"!=typeof s)throw new v("Resolver "+r+"."+e+" must be object or function");c(u,s)}}})})}function c(e,t){Object.keys(t).forEach(function(r){e[r]=t[r]})}function f(e,t){void 0===t&&(t={});var r=t.requireResolversForArgs,n=void 0!==r&&r,o=t.requireResolversForNonScalar,i=void 0!==o&&o,s=t.requireResolversForAllFields,a=void 0!==s&&s;if(a&&(n||i))throw new TypeError("requireResolversForAllFields takes precedence over the more specific assertions. Please configure either requireResolversForAllFields or requireResolversForArgs / requireResolversForNonScalar, but not a combination of them.");u(e,function(e,t,r){a&&l(e,t,r),n&&e.args.length>0&&l(e,t,r),!i||$.getNamedType(e.type)instanceof $.GraphQLScalarType||l(e,t,r)})}function l(e,t,r){if(e.resolve){if("function"!=typeof e.resolve)throw new v('Resolver "'+t+"."+r+'" must be a function')}else console.warn('Resolve function missing for "'+t+"."+r+'". To disable this warning check https://github.com/apollostack/graphql-tools/issues/131')}function h(e,t){if(!t)throw Error("Must provide a logger");if("function"!=typeof t.log)throw Error("Logger.log must be a function");u(e,function(e,r,n){e.resolve=function(e,t,r){void 0===e&&(e=$.defaultFieldResolver);var n=function(e){var n=Error();n.stack=e.stack,r&&(n.originalMessage=e.message,n.message="Error in resolver "+r+"\n"+e.message),t.log(n)};return function(t,r,o,i){try{var u=e(t,r,o,i);return u&&"function"==typeof u.then&&"function"==typeof u.catch&&u.catch(function(e){var t=e instanceof Error?e:Error(e);return n(t),e}),u}catch(e){throw n(e),e}}}(e.resolve,t,r+"."+n)})}function p(e,t){return function(r,n,o,i){return Promise.resolve(t(r,n,o,i)).then(function(t){return e?e(t,n,o,i):$.defaultFieldResolver(t,n,o,i)})}}function y(e){u(e,function(e,t,r){e.resolve=function(e,t){void 0===e&&(e=$.defaultFieldResolver);return function(r,n,o,i){var u=e(r,n,o,i);if(void 0===u)throw Error('Resolve function for "'+t+'" returned undefined');return u}}(e.resolve,t+"."+r)})}var d=Y&&Y.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0});var v=function(e){function t(t){var r=e.call(this,t)||this;return r.message=t,Error.captureStackTrace(r,r.constructor),r}return d(t,e),t}(Error);t.SchemaError=v,t.makeExecutableSchema=function(e){var t=e.resolvers,r=void 0===t?{}:t,n=e.connectors,i=e.allowUndefinedInResolve,u=e.resolverValidationOptions,c=function(e,t,r,n,i){if("object"!=typeof i)throw new v("Expected `resolverValidationOptions` to be an object");if(!e)throw new v("Must provide typeDefs");if(!t)throw new v("Must provide resolvers");var u=o(e);return a(u,t,i),f(u,i),n||y(u),r&&h(u,r),u}(e.typeDefs,r,e.logger,void 0===i||i,void 0===u?{}:u);return"function"==typeof r.__schema&&s(c,r.__schema),n&&b(c,n),c},t.concatenateTypeDefs=n,t.buildSchemaFromTypeDefinitions=o,t.extractExtensionDefinitions=i,t.forEachField=u;var b=W.deprecated({version:"0.7.0",url:"https://github.com/apollostack/graphql-tools/issues/140"},function(e,t){if(!(e&&e instanceof $.GraphQLSchema))throw Error("schema must be an instance of GraphQLSchema. This error could be caused by installing more than one version of GraphQL-JS");if("object"!=typeof t){throw Error("Expected connectors to be of type object, got "+typeof t)}if(0===Object.keys(t).length)throw Error("Expected connectors to not be an empty object");if(Array.isArray(t))throw Error("Expected connectors to be of type object, got Array");if(e._apolloConnectorsAttached)throw Error("Connectors already attached to context, cannot attach more than once");e._apolloConnectorsAttached=!0;s(e,function(e,r,n){if("object"!=typeof n)throw Error("Cannot attach connector because context is not an object: "+typeof n);return void 0===n.connectors&&(n.connectors={}),Object.keys(t).forEach(function(e){var r=t[e];if(!r.prototype)throw Error("Connector must be a function or an class");n.connectors[e]=new r(n)}),e})});t.attachConnectorsToContext=b,t.addSchemaLevelResolveFunction=s,t.addResolveFunctionsToSchema=a,t.assertResolveFunctionsPresent=f,t.addErrorLoggingToSchema=h,t.chainResolvers=function(e){return function(t,r,n,o){return e.reduce(function(e,t){return t?t(e,r,n,o):$.defaultFieldResolver(e,r,n,o)},t)}},t.addCatchUndefinedToSchema=y});r(V);var H=V.makeExecutableSchema;o.prototype=Object.create(null),i.EventEmitter=i,i.usingDomains=!1,i.prototype.domain=void 0,i.prototype._events=void 0,i.prototype._maxListeners=void 0,i.defaultMaxListeners=10,i.init=function(){this.domain=null,i.usingDomains&&(!(void 0).active||this instanceof(void 0).Domain||(this.domain=(void 0).active)),this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=new o,this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},i.prototype.setMaxListeners=function(e){if("number"!=typeof e||0>e||isNaN(e))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=e,this},i.prototype.getMaxListeners=function(){return u(this)},i.prototype.emit=function(e){var t,r,n,o,i,u,s,a="error"===e;if(u=this._events)a=a&&null==u.error;else if(!a)return!1;if(s=this.domain,a){if(t=arguments[1],!s){if(t instanceof Error)throw t;var c=Error('Uncaught, unspecified "error" event. ('+t+")");throw c.context=t,c}return t||(t=Error('Uncaught, unspecified "error" event')),t.domainEmitter=this,t.domain=s,t.domainThrown=!1,s.emit("error",t),!1}if(!(r=u[e]))return!1;var l="function"==typeof r;switch(n=arguments.length){case 1:!function(e,t,r){if(t)e.call(r);else for(var n=e.length,o=f(e,n),i=0;n>i;++i)o[i].call(r)}(r,l,this);break;case 2:!function(e,t,r,n){if(t)e.call(r,n);else for(var o=e.length,i=f(e,o),u=0;o>u;++u)i[u].call(r,n)}(r,l,this,arguments[1]);break;case 3:!function(e,t,r,n,o){if(t)e.call(r,n,o);else for(var i=e.length,u=f(e,i),s=0;i>s;++s)u[s].call(r,n,o)}(r,l,this,arguments[1],arguments[2]);break;case 4:!function(e,t,r,n,o,i){if(t)e.call(r,n,o,i);else for(var u=e.length,s=f(e,u),a=0;u>a;++a)s[a].call(r,n,o,i)}(r,l,this,arguments[1],arguments[2],arguments[3]);break;default:for(o=Array(n-1),i=1;n>i;i++)o[i-1]=arguments[i];!function(e,t,r,n){if(t)e.apply(r,n);else for(var o=e.length,i=f(e,o),u=0;o>u;++u)i[u].apply(r,n)}(r,l,this,o)}return!0},i.prototype.on=i.prototype.addListener=function(e,t){return s(this,e,t,!1)},i.prototype.prependListener=function(e,t){return s(this,e,t,!0)},i.prototype.once=function(e,t){if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');return this.on(e,a(this,e,t)),this},i.prototype.prependOnceListener=function(e,t){if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');return this.prependListener(e,a(this,e,t)),this},i.prototype.removeListener=function(e,t){var r,n,i,u,s;if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');if(!(n=this._events))return this;if(!(r=n[e]))return this;if(r===t||r.listener&&r.listener===t)0==--this._eventsCount?this._events=new o:(delete n[e],n.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(i=-1,u=r.length;u-- >0;)if(r[u]===t||r[u].listener&&r[u].listener===t){s=r[u].listener,i=u;break}if(0>i)return this;if(1===r.length){if(r[0]=void 0,0==--this._eventsCount)return this._events=new o,this;delete n[e]}else!function(e,t){for(var r=t,n=r+1,o=e.length;o>n;r+=1,n+=1)e[r]=e[n];e.pop()}(r,i);n.removeListener&&this.emit("removeListener",e,s||t)}return this},i.prototype.removeAllListeners=function(e){var t,r;if(!(r=this._events))return this;if(!r.removeListener)return 0===arguments.length?(this._events=new o,this._eventsCount=0):r[e]&&(0==--this._eventsCount?this._events=new o:delete r[e]),this;if(0===arguments.length){for(var n,i=Object.keys(r),u=0;i.length>u;++u)"removeListener"!==(n=i[u])&&this.removeAllListeners(n);return this.removeAllListeners("removeListener"),this._events=new o,this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(t)do{this.removeListener(e,t[t.length-1])}while(t[0]);return this},i.prototype.listeners=function(e){var t,r=this._events;return r&&(t=r[e])?"function"==typeof t?[t.listener||t]:function(e){for(var t=Array(e.length),r=0;t.length>r;++r)t[r]=e[r].listener||e[r];return t}(t):[]},i.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):c.call(e,t)},i.prototype.listenerCount=c,i.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]};var J=Object.freeze({default:i,EventEmitter:i}),K="function"==typeof Symbol&&Symbol.iterator,X=K||"@@iterator",Z=X,ee=l,te=h,re=function(e){return Object(e)===e&&(h(e)||l(e))},ne=p,oe=y,ie=d;v.prototype[X]=function(){return this},v.prototype.next=function(){return void 0!==this._o&&this._o.length>this._i?{value:this._o[this._i++],done:!1}:(this._o=void 0,{value:void 0,done:!0})};var ue=function(e,t,r){if(null!=e){if("function"==typeof e.forEach)return e.forEach(t,r);var n=0,o=p(e);if(o){for(var i;!(i=o.next()).done;)if(t.call(r,i.value,n++,e),n>9999999)throw new TypeError("Near-infinite iteration.")}else if(h(e))for(;e.length>n;n++)e.hasOwnProperty(n)&&t.call(r,e[n],n,e)}},se="function"==typeof Symbol&&Symbol.asyncIterator,ae=se||"@@asyncIterator",ce=ae,fe=function(e){return!!m(e)},le=b,he=m,pe=w;g.prototype[ae]=function(){return this},g.prototype.next=function(){var e=this._i.next();return Promise.resolve(e.value).then(function(t){return{value:t,done:e.done}})};var ye={$$iterator:Z,isIterable:ee,isArrayLike:te,isCollection:re,getIterator:ne,getIteratorMethod:oe,createIterator:ie,forEach:ue,$$asyncIterator:ce,isAsyncIterable:fe,getAsyncIterator:le,getAsyncIteratorMethod:he,createAsyncIterator:pe,forAwaitEach:function(e,t,r){var n=w(e);if(n){var o=0;return new Promise(function(i,u){function s(){return n.next().then(function(n){n.done?i():Promise.resolve(t.call(r,n.value,o++,e)).then(s).catch(u)}).catch(u)}s()})}}},de=n(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.eventEmitterAsyncIterator=function(e,t){var r=[],n=[],o="string"==typeof t?[t]:t,i=!0,u=function(e){0!==r.length?r.shift()({value:e,done:!1}):n.push(e)},s=function(){i&&(i=!1,a(),r.forEach(function(e){return e({value:void 0,done:!0})}),r.length=0,n.length=0)},a=function(){for(var t=0,r=o;r.length>t;t++)e.removeListener(r[t],u)};return function(){for(var t=0,r=o;r.length>t;t++)e.addListener(r[t],u)}(),c={next:function(){return i?new Promise(function(e){0!==n.length?e({value:n.shift(),done:!1}):r.push(e)}):this.return()},return:function(){return s(),Promise.resolve({value:void 0,done:!0})},throw:function(e){return s(),Promise.reject(e)}},c[ye.$$asyncIterator]=function(){return this},c;var c}});r(de);var ve=J&&i||J,be=n(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e){void 0===e&&(e={}),this.ee=e.eventEmitter||new ve.EventEmitter,this.subscriptions={},this.subIdCounter=0}return e.prototype.publish=function(e,t){return this.ee.emit(e,t),!0},e.prototype.subscribe=function(e,t){return this.ee.addListener(e,t),this.subIdCounter=this.subIdCounter+1,this.subscriptions[this.subIdCounter]=[e,t],Promise.resolve(this.subIdCounter)},e.prototype.unsubscribe=function(e){var t=this.subscriptions[e],r=t[0],n=t[1];delete this.subscriptions[e],this.ee.removeListener(r,n)},e.prototype.asyncIterator=function(e){return de.eventEmitterAsyncIterator(this.ee,e)},e}();t.PubSub=r});r(be);var me=n(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.withFilter=function(e,t){return function(r,n,o,i){var u=e(r,n,o,i),s=function(){return u.next().then(function(e){return Promise.all([e,Promise.resolve(t(e.value,n,o,i)).catch(function(){return!1})])}).then(function(e){var t=e[0];return!0===e[1]||!0===t.done?t:s()})};return a={next:function(){return s()},return:function(){return u.return()},throw:function(e){return u.throw(e)}},a[ye.$$asyncIterator]=function(){return this},a;var a}}});r(me);var we=n(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.PubSub=be.PubSub,t.withFilter=me.withFilter});r(we);var ge=we.PubSub,Oe=we.withFilter;!function(e){function t(e){if("string"!=typeof e&&(e+=""),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function r(e){return"string"!=typeof e&&(e+=""),e}function n(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return p.iterable&&(t[Symbol.iterator]=function(){return t}),t}function o(e){this.map={},e instanceof o?e.forEach(function(e,t){this.append(t,e)},this):Array.isArray(e)?e.forEach(function(e){this.append(e[0],e[1])},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}function i(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function u(e){return new Promise(function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}})}function s(e){var t=new FileReader,r=u(t);return t.readAsArrayBuffer(e),r}function a(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function c(){return this.bodyUsed=!1,this._initBody=function(e){if(this._bodyInit=e,e)if("string"==typeof e)this._bodyText=e;else if(p.blob&&Blob.prototype.isPrototypeOf(e))this._bodyBlob=e;else if(p.formData&&FormData.prototype.isPrototypeOf(e))this._bodyFormData=e;else if(p.searchParams&&URLSearchParams.prototype.isPrototypeOf(e))this._bodyText=""+e;else if(p.arrayBuffer&&p.blob&&d(e))this._bodyArrayBuffer=a(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer]);else{if(!p.arrayBuffer||!ArrayBuffer.prototype.isPrototypeOf(e)&&!v(e))throw Error("unsupported BodyInit type");this._bodyArrayBuffer=a(e)}else this._bodyText="";this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):p.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},p.blob&&(this.blob=function(){var e=i(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?i(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(s)}),this.text=function(){var e=i(this);if(e)return e;if(this._bodyBlob)return function(e){var t=new FileReader,r=u(t);return t.readAsText(e),r}(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),r=Array(t.length),n=0;t.length>n;n++)r[n]=String.fromCharCode(t[n]);return r.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},p.formData&&(this.formData=function(){return this.text().then(l)}),this.json=function(){return this.text().then(JSON.parse)},this}function f(e,t){var r=(t=t||{}).body;if(e instanceof f){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new o(e.headers)),this.method=e.method,this.mode=e.mode,r||null==e._bodyInit||(r=e._bodyInit,e.bodyUsed=!0)}else this.url=e+"";if(this.credentials=t.credentials||this.credentials||"omit",!t.headers&&this.headers||(this.headers=new o(t.headers)),this.method=function(e){var t=e.toUpperCase();return b.indexOf(t)>-1?t:e}(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&r)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(r)}function l(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var r=e.split("="),n=r.shift().replace(/\+/g," "),o=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(n),decodeURIComponent(o))}}),t}function h(e,t){t||(t={}),this.type="default",this.status="status"in t?t.status:200,this.ok=this.status>=200&&300>this.status,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new o(t.headers),this.url=t.url||"",this._initBody(e)}if(!e.fetch){var p={searchParams:"URLSearchParams"in e,iterable:"Symbol"in e&&"iterator"in Symbol,blob:"FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in e,arrayBuffer:"ArrayBuffer"in e};if(p.arrayBuffer)var y=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],d=function(e){return e&&DataView.prototype.isPrototypeOf(e)},v=ArrayBuffer.isView||function(e){return e&&y.indexOf(Object.prototype.toString.call(e))>-1};o.prototype.append=function(e,n){e=t(e),n=r(n);var o=this.map[e];this.map[e]=o?o+","+n:n},o.prototype.delete=function(e){delete this.map[t(e)]},o.prototype.get=function(e){return e=t(e),this.has(e)?this.map[e]:null},o.prototype.has=function(e){return this.map.hasOwnProperty(t(e))},o.prototype.set=function(e,n){this.map[t(e)]=r(n)},o.prototype.forEach=function(e,t){for(var r in this.map)this.map.hasOwnProperty(r)&&e.call(t,this.map[r],r,this)},o.prototype.keys=function(){var e=[];return this.forEach(function(t,r){e.push(r)}),n(e)},o.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),n(e)},o.prototype.entries=function(){var e=[];return this.forEach(function(t,r){e.push([r,t])}),n(e)},p.iterable&&(o.prototype[Symbol.iterator]=o.prototype.entries);var b=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];f.prototype.clone=function(){return new f(this,{body:this._bodyInit})},c.call(f.prototype),c.call(h.prototype),h.prototype.clone=function(){return new h(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new o(this.headers),url:this.url})},h.error=function(){var e=new h(null,{status:0,statusText:""});return e.type="error",e};var m=[301,302,303,307,308];h.redirect=function(e,t){if(-1===m.indexOf(t))throw new RangeError("Invalid status code");return new h(null,{status:t,headers:{location:e}})},e.Headers=o,e.Request=f,e.Response=h,e.fetch=function(e,t){return new Promise(function(r,n){var i=new f(e,t),u=new XMLHttpRequest;u.onload=function(){var e={status:u.status,statusText:u.statusText,headers:function(e){var t=new o;return e.split(/\r?\n/).forEach(function(e){var r=e.split(":"),n=r.shift().trim();if(n){var o=r.join(":").trim();t.append(n,o)}}),t}(u.getAllResponseHeaders()||"")};e.url="responseURL"in u?u.responseURL:e.headers.get("X-Request-URL");r(new h("response"in u?u.response:u.responseText,e))},u.onerror=function(){n(new TypeError("Network request failed"))},u.ontimeout=function(){n(new TypeError("Network request failed"))},u.open(i.method,i.url,!0),"include"===i.credentials&&(u.withCredentials=!0),"responseType"in u&&p.blob&&(u.responseType="blob"),i.headers.forEach(function(e,t){u.setRequestHeader(t,e)}),u.send(void 0===i._bodyInit?null:i._bodyInit)})},e.fetch.polyfill=!0}}("undefined"!=typeof self?self:Y);var _e=Object.assign||function(e){for(var t,r=1,n=arguments.length;n>r;r++){t=arguments[r];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},Ee=function(e){return null!=e&&"object"==typeof e&&!0===e["@@functional/placeholder"]},je=function(e){return function t(r){return 0===arguments.length||Ee(r)?t:e.apply(this,arguments)}},xe=je(function(e){return null==e}),Ae=function(e,t,r,n,o,i,u,s){if(!e){var a;if(void 0===t)a=Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[r,n,o,i,u,s],f=0;(a=Error(t.replace(/%s/g,function(){return c[f++]}))).name="Invariant Violation"}throw a.framesToPop=1,a}},Te=function(e,t){return Object.prototype.hasOwnProperty.call(t,e)},Pe=Object.prototype.toString,Se=function(){return"[object Arguments]"===Pe.call(arguments)?function(e){return"[object Arguments]"===Pe.call(e)}:function(e){return Te("callee",e)}},ke=Array.isArray||function(e){return null!=e&&e.length>=0&&"[object Array]"===Object.prototype.toString.call(e)},Le=function(e){return"[object Object]"===Object.prototype.toString.call(e)},Ie=function(e){return"[object String]"===Object.prototype.toString.call(e)},Ce=function(e){return function t(r,n){switch(arguments.length){case 0:return t;case 1:return Ee(r)?t:je(function(t){return e(r,t)});default:return Ee(r)&&Ee(n)?t:Ee(r)?je(function(t){return e(t,n)}):Ee(n)?je(function(t){return e(r,t)}):e(r,n)}}},Fe=function(e){for(var t,r=[];!(t=e.next()).done;)r.push(t.value);return r},qe=function(e,t,r){for(var n=0,o=r.length;o>n;){if(e(t,r[n]))return!0;n+=1}return!1},Re=function(e){var t=(e+"").match(/^function (\w*)/);return null==t?"":t[1]},Be=Ce(function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}),Ue=!{toString:null}.propertyIsEnumerable("toString"),Ne=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],De=function(){return arguments.propertyIsEnumerable("length")}(),Me=function(e,t){for(var r=0;e.length>r;){if(e[r]===t)return!0;r+=1}return!1},Ge=je("function"!=typeof Object.keys||De?function(e){if(Object(e)!==e)return[];var t,r,n=[],o=De&&Se(e);for(t in e)!Te(t,e)||o&&"length"===t||(n[n.length]=t);if(Ue)for(r=Ne.length-1;r>=0;)Te(t=Ne[r],e)&&!Me(n,t)&&(n[n.length]=t),r-=1;return n}:function(e){return Object(e)!==e?[]:Object.keys(e)}),Qe=je(function(e){return null===e?"Null":void 0===e?"Undefined":Object.prototype.toString.call(e).slice(8,-1)}),ze=j,$e=Ce(function(e,t){return ze(e,t,[],[])}),Ye=function(e,t){switch(e){case 0:return function(){return t.apply(this,arguments)};case 1:return function(e){return t.apply(this,arguments)};case 2:return function(e,r){return t.apply(this,arguments)};case 3:return function(e,r,n){return t.apply(this,arguments)};case 4:return function(e,r,n,o){return t.apply(this,arguments)};case 5:return function(e,r,n,o,i){return t.apply(this,arguments)};case 6:return function(e,r,n,o,i,u){return t.apply(this,arguments)};case 7:return function(e,r,n,o,i,u,s){return t.apply(this,arguments)};case 8:return function(e,r,n,o,i,u,s,a){return t.apply(this,arguments)};case 9:return function(e,r,n,o,i,u,s,a,c){return t.apply(this,arguments)};case 10:return function(e,r,n,o,i,u,s,a,c,f){return t.apply(this,arguments)};default:throw Error("First argument to _arity must be a non-negative integer no greater than ten")}},We=function(e,t){return function(){return t.call(this,e.apply(this,arguments))}},Ve=function(e){return function t(r,n,o){switch(arguments.length){case 0:return t;case 1:return Ee(r)?t:Ce(function(t,n){return e(r,t,n)});case 2:return Ee(r)&&Ee(n)?t:Ee(r)?Ce(function(t,r){return e(t,n,r)}):Ee(n)?Ce(function(t,n){return e(r,t,n)}):je(function(t){return e(r,n,t)});default:return Ee(r)&&Ee(n)&&Ee(o)?t:Ee(r)&&Ee(n)?Ce(function(t,r){return e(t,r,o)}):Ee(r)&&Ee(o)?Ce(function(t,r){return e(t,n,r)}):Ee(n)&&Ee(o)?Ce(function(t,n){return e(r,t,n)}):Ee(r)?je(function(t){return e(t,n,o)}):Ee(n)?je(function(t){return e(r,t,o)}):Ee(o)?je(function(t){return e(r,n,t)}):e(r,n,o)}}},He=je(function(e){return!!ke(e)||!!e&&("object"==typeof e&&(!Ie(e)&&(1===e.nodeType?!!e.length:0===e.length||e.length>0&&(e.hasOwnProperty(0)&&e.hasOwnProperty(e.length-1)))))}),Je=function(){function e(e){this.f=e}return e.prototype["@@transducer/init"]=function(){throw Error("init not implemented on XWrap")},e.prototype["@@transducer/result"]=function(e){return e},e.prototype["@@transducer/step"]=function(e,t){return this.f(e,t)},e}(),Ke=function(e){return new Je(e)},Xe=Ce(function(e,t){return Ye(e.length,function(){return e.apply(t,arguments)})}),Ze="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator",et=function(e,t,r){if("function"==typeof e&&(e=Ke(e)),He(r))return function(e,t,r){for(var n=0,o=r.length;o>n;){if((t=e["@@transducer/step"](t,r[n]))&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}n+=1}return e["@@transducer/result"](t)}(e,t,r);if("function"==typeof r["fantasy-land/reduce"])return A(e,t,r,"fantasy-land/reduce");if(null!=r[Ze])return x(e,t,r[Ze]());if("function"==typeof r.next)return x(e,t,r);if("function"==typeof r.reduce)return A(e,t,r,"reduce");throw new TypeError("reduce: list must be array or iterable")},tt=Ve(et),rt=function(e,t){return function(){var r=arguments.length;if(0===r)return t();var n=arguments[r-1];return ke(n)||"function"!=typeof n[e]?t.apply(this,arguments):n[e].apply(n,Array.prototype.slice.call(arguments,0,r-1))}},nt=je(rt("tail",Ve(rt("slice",function(e,t,r){return Array.prototype.slice.call(r,e,t)}))(1,1/0))),ot=function(){if(0===arguments.length)throw Error("pipe requires at least one argument");return Ye(arguments[0].length,tt(We,arguments[0],nt(arguments)))},it=je(function(e){return Ie(e)?e.split("").reverse().join(""):Array.prototype.slice.call(e,0).reverse()}),ut=function(){if(0===arguments.length)throw Error("compose requires at least one argument");return ot.apply(this,it(arguments))},st=function(e){return function(){return!e.apply(this,arguments)}},at=function(e){return"function"==typeof e["@@transducer/step"]},ct=function(e,t,r){return function(){if(0===arguments.length)return r();var n=Array.prototype.slice.call(arguments,0),o=n.pop();if(!ke(o)){for(var i=0;e.length>i;){if("function"==typeof o[e[i]])return o[e[i]].apply(o,n);i+=1}if(at(o))return t.apply(null,n)(o)}return r.apply(this,arguments)}},ft=function(e,t){for(var r=0,n=t.length,o=[];n>r;)e(t[r])&&(o[o.length]=t[r]),r+=1;return o},lt=function(){return this.xf["@@transducer/init"]()},ht=function(e){return this.xf["@@transducer/result"](e)},pt=function(){function e(e,t){this.xf=t,this.f=e}return e.prototype["@@transducer/init"]=lt,e.prototype["@@transducer/result"]=ht,e.prototype["@@transducer/step"]=function(e,t){return this.f(t)?this.xf["@@transducer/step"](e,t):e},e}(),yt=Ce(ct(["filter"],Ce(function(e,t){return new pt(e,t)}),function(e,t){return Le(t)?et(function(r,n){return e(t[n])&&(r[n]=t[n]),r},{},Ge(t)):ft(e,t)})),dt=Ce(function(e,t){return yt(st(e),t)}),vt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},bt=function(e){return ut($e(e),Qe)},mt=bt("Array"),wt=bt("Object"),gt=function(e,t){Ae(!xe(e),'The "'+t+"\" collection does not exist. You can create one using your clerk instance by running(clerk.addCollection('"+t+"'))"),Ae("object"===(void 0===e?"undefined":vt(e)),'"'+t+'" is not a collection. You can access it like any other property on the state object')},Ot=dt(bt("Undefined")),_t=Object.assign||function(e){for(var t=1;arguments.length>t;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Et=function(e){return T()},jt=Object.assign||function(e){for(var t=1;arguments.length>t;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},xt=function(e){return P()},At=Object.assign||function(e){for(var t=1;arguments.length>t;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Tt=function(e){return S()},Pt="function"==typeof Object.assign?Object.assign:function(e){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),r=1,n=arguments.length;n>r;){var o=arguments[r];if(null!=o)for(var i in o)Te(i,o)&&(t[i]=o[i]);r+=1}return t},St=Ce(function(e,t){return Pt({},e,t)}),kt=Object.assign||function(e){for(var t=1;arguments.length>t;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Lt=function(e){return k()},It=Ce(function(e,t){for(var r={},n={},o=0,i=e.length;i>o;)n[e[o]]=1,o+=1;for(var u in t)n.hasOwnProperty(u)||(r[u]=t[u]);return r}),Ct=function(e){return L()},Ft=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.state=t,this.get=Et(t).bind(t),this.post=xt(t).bind(t),this.put=Tt(t).bind(t),this.patch=Lt(t).bind(t),this.delete=Ct(t).bind(t)}return e.prototype.getCollection=function(e){return this.state[e]},e.prototype.addCollection=function(e){return this.state[e]=new(arguments.length>1&&void 0!==arguments[1]?arguments[1]:Object),this.state[e]},e.prototype.removeCollection=function(e){var t=this.state[e];return null!=t&&delete this.state[e],t},e}(),qt=n(function(e,t){!function(e,t){function r(e){return"function"==typeof Symbol&&!!Symbol[e]}function n(e){return r(e)?Symbol[e]:"@@"+e}function o(e,t){var r=e[t];if(null!=r){if("function"!=typeof r)throw new TypeError(r+" is not a function");return r}}function i(e){var t=e.constructor;return void 0!==t&&null===(t=t[n("species")])&&(t=void 0),void 0!==t?t:l}function u(e,t){Object.keys(t).forEach(function(r){var n=Object.getOwnPropertyDescriptor(t,r);n.enumerable=!1,Object.defineProperty(e,r,n)})}function s(e){var t=e._cleanup;t&&(e._cleanup=void 0,t())}function a(e){return void 0===e._observer}function c(e,t){if(Object(e)!==e)throw new TypeError("Observer must be an object");this._cleanup=void 0,this._observer=e;var r=o(e,"start");if(r&&r.call(e,this),!a(this)){e=new f(this);try{var n=t.call(void 0,e);if(null!=n){if("function"==typeof n.unsubscribe)n=function(e){return function(){e.unsubscribe()}}(n);else if("function"!=typeof n)throw new TypeError(n+" is not a function");this._cleanup=n}}catch(t){return void e.error(t)}a(this)&&s(this)}}function f(e){this._subscription=e}function l(e){if("function"!=typeof e)throw new TypeError("Observable initializer must be a function");this._subscriber=e}"function"!=typeof Symbol||Symbol.observable||(Symbol.observable=Symbol("observable"));u(c.prototype={},{get closed(){return a(this)},unsubscribe:function(){!function(e){if(a(e))return;e._observer=void 0,s(e)}(this)}});u(f.prototype={},{get closed(){return a(this._subscription)},next:function(e){var t=this._subscription;if(!a(t)){var r=t._observer,n=o(r,"next");if(n)return n.call(r,e)}},error:function(e){var t=this._subscription;if(a(t))throw e;var r=t._observer;t._observer=void 0;try{var n=o(r,"error");if(!n)throw e;e=n.call(r,e)}catch(e){try{s(t)}finally{throw e}}return s(t),e},complete:function(e){var t=this._subscription;if(!a(t)){var r=t._observer;t._observer=void 0;try{var n=o(r,"complete");e=n?n.call(r,e):void 0}catch(e){try{s(t)}finally{throw e}}return s(t),e}}});u(l.prototype,{subscribe:function(e){for(var t=[],r=1;arguments.length>r;++r)t.push(arguments[r]);return"function"==typeof e&&(e={next:e,error:t[0],complete:t[1]}),new c(e,this._subscriber)},forEach:function(e){var t=this;return new Promise(function(r,n){if("function"!=typeof e)return Promise.reject(new TypeError(e+" is not a function"));t.subscribe({_subscription:null,start:function(e){if(Object(e)!==e)throw new TypeError(e+" is not an object");this._subscription=e},next:function(t){var r=this._subscription;if(!r.closed)try{return e(t)}catch(e){n(e),r.unsubscribe()}},error:n,complete:r})})},map:function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");var r=i(this);return new r(function(r){return t.subscribe({next:function(t){if(!r.closed){try{t=e(t)}catch(e){return r.error(e)}return r.next(t)}},error:function(e){return r.error(e)},complete:function(e){return r.complete(e)}})})},filter:function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");var r=i(this);return new r(function(r){return t.subscribe({next:function(t){if(!r.closed){try{if(!e(t))return}catch(e){return r.error(e)}return r.next(t)}},error:function(e){return r.error(e)},complete:function(){return r.complete()}})})},reduce:function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");var r=i(this),n=arguments.length>1,o=!1,u=arguments[1],s=u;return new r(function(r){return t.subscribe({next:function(t){if(!r.closed){var i=!o;if(o=!0,!i||n)try{s=e(s,t)}catch(e){return r.error(e)}else s=t}},error:function(e){r.error(e)},complete:function(){o||n?(r.next(s),r.complete()):r.error(new TypeError("Cannot reduce an empty sequence"))}})})},flatMap:function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");var r=i(this);return new r(function(r){function n(){o&&0===i.length&&r.complete()}var o=!1,i=[],u=t.subscribe({next:function(t){if(e)try{t=e(t)}catch(e){return void r.error(e)}l.from(t).subscribe({_subscription:null,start:function(e){i.push(this._subscription=e)},next:function(e){r.next(e)},error:function(e){r.error(e)},complete:function(){var e=i.indexOf(this._subscription);0>e||i.splice(e,1),n()}})},error:function(e){return r.error(e)},complete:function(){o=!0,n()}});return function(){i.forEach(function(e){return e.unsubscribe()}),u.unsubscribe()}})}}),Object.defineProperty(l.prototype,n("observable"),{value:function(){return this},writable:!0,configurable:!0}),u(l,{from:function(e){var t="function"==typeof this?this:l;if(null==e)throw new TypeError(e+" is not an object");var i=o(e,n("observable"));if(i){var u=i.call(e);if(Object(u)!==u)throw new TypeError(u+" is not an object");return u.constructor===t?u:new t(function(e){return u.subscribe(e)})}if(r("iterator")&&(i=o(e,n("iterator"))))return new t(function(t){for(var r,n=i.call(e)[Symbol.iterator]();!(r=n.next()).done;){var o=r.value;if(t.next(o),t.closed)return}t.complete()});if(Array.isArray(e))return new t(function(t){for(var r=0;e.length>r;++r)if(t.next(e[r]),t.closed)return;t.complete()});throw new TypeError(e+" is not observable")},of:function(){for(var e=[],t=0;arguments.length>t;++t)e.push(arguments[t]);var r="function"==typeof this?this:l;return new r(function(t){for(var r=0;e.length>r;++r)if(t.next(e[r]),t.closed)return;t.complete()})}}),Object.defineProperty(l,n("species"),{get:function(){return this},configurable:!0}),e.Observable=l}(t)}).Observable,Rt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Bt=function(e){if("function"==typeof Symbol){if(Symbol.asyncIterator){var t=e[Symbol.asyncIterator];if(null!=t)return t.call(e)}if(Symbol.iterator)return e[Symbol.iterator]()}throw new TypeError("Object is not async iterable")},Ut=function(e){return function(){var t=e.apply(this,arguments);return new Promise(function(e,r){function n(o,i){try{var u=t[o](i),s=u.value}catch(e){return void r(e)}if(!u.done)return Promise.resolve(s).then(function(e){n("next",e)},function(e){n("throw",e)});e(s)}return n("next")})}},Nt=Object.assign||function(e){for(var t=1;arguments.length>t;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Dt=function(e,t){var r={};for(var n in e)0>t.indexOf(n)&&Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r},Mt='You cannot extend the context with an object containing a "store" prop. It will be omitted and the other props will be added',Gt=function(e){return'The "'+e+"\" property already exists in the context object. Make sure you haven't replaced anything important"},Qt=' The "graphql" method is deprecated and will be removed in the 1.0 release. Use the "fetch" method instead.',zt='The "createStore" method is deprecated and will be removed in the 1.0 release. Use "new BlipsClient(...)" instead',$t='You are trying to use "BlipsClient.fetch" without it being configured.',Yt="No subscription operation defined in query",Wt="Only one subscription operation is allowed per query",Vt=function(){return"The fetch "+(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"middleware/afterware")+" must be a function or an array of functions"},Ht={};e.BlipsClient=z,e.createStore=function(){Ht[zt]||(console.warn(zt),Ht[zt]=!0);for(var e=arguments.length,t=Array(e),r=0;e>r;r++)t[r]=arguments[r];return new(Function.prototype.bind.apply(z,[null].concat(t)))},Object.defineProperty(e,"__esModule",{value:!0})}); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("graphql")):"function"==typeof define&&define.amd?define(["exports","graphql"],t):t(e.blips={},e.GraphQL)}(this,function(e,t){"use strict";function r(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function n(e,t){return t={exports:{}},e(t,t.exports),t.exports}function o(){}function i(){i.init.call(this)}function u(e){return void 0===e._maxListeners?i.defaultMaxListeners:e._maxListeners}function s(e,t,r,n){var i,s,a;if("function"!=typeof r)throw new TypeError('"listener" argument must be a function');if((s=e._events)?(s.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),s=e._events),a=s[t]):(s=e._events=new o,e._eventsCount=0),a){if("function"==typeof a?a=s[t]=n?[r,a]:[a,r]:n?a.unshift(r):a.push(r),!a.warned&&(i=u(e))&&i>0&&a.length>i){a.warned=!0;var c=Error("Possible EventEmitter memory leak detected. "+a.length+" "+t+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=a.length,function(e){"function"==typeof console.warn?console.warn(e):console.log(e)}(c)}}else a=s[t]=r,++e._eventsCount;return e}function a(e,t,r){function n(){e.removeListener(t,n),o||(o=!0,r.apply(e,arguments))}var o=!1;return n.listener=r,n}function c(e){var t=this._events;if(t){var r=t[e];if("function"==typeof r)return 1;if(r)return r.length}return 0}function f(e,t){for(var r=Array(t);t--;)r[t]=e[t];return r}function l(e){return!!y(e)}function h(e){var t=null!=e&&e.length;return"number"==typeof t&&t>=0&&t%1==0}function p(e){var t=y(e);if(t)return t.call(e)}function y(e){if(null!=e){var t=K&&e[K]||e["@@iterator"];if("function"==typeof t)return t}}function d(e){if(null!=e){var t=p(e);if(t)return t;if(h(e))return new v(e)}}function v(e){this._o=e,this._i=0}function b(e){var t=m(e);if(t)return t.call(e)}function m(e){if(null!=e){var t=se&&e[se]||e["@@asyncIterator"];if("function"==typeof t)return t}}function w(e){if(null!=e){var t=b(e);if(t)return t;var r=d(e);if(r)return new g(r)}}function g(e){this._i=e}function O(e,t,r){var n=this,o=function(){if(e.length>0){var i=e.shift();i&&i.apply(n,[t,o])}else r(t)};o()}function _(e){void 0===e&&(e={});var t=e.constructOptions,r=e.customFetch,n=e.uri||"/graphql",o=[],i=[],u=[],s=[],a=function(e){var a,c={},f=Array.isArray(e);return function(e,t){return new Promise(function(r,n){O(t?i.slice():o.slice(),e,r)})}(f?{requests:e,options:c}:{request:e,options:c},f).then(function(e){return(t||function(e,t){var r;try{r=JSON.stringify(e)}catch(e){throw Error("Network request failed. Payload is not serializable: "+e.message)}return _e({body:r,method:"POST"},t,{headers:_e({Accept:"*/*","Content-Type":"application/json"},t.headers||[])})})(e.request||e.requests,e.options)}).then(function(e){return c=_e({},e),(r||fetch)(n,c)}).then(function(e){return e.text().then(function(t){try{var r=JSON.parse(t);return e.raw=t,e.parsed=r,e}catch(r){return a=r,e.raw=t,e}})}).then(function(e){return function(e,t){return new Promise(function(r,n){O(t?s.slice():u.slice(),e,r)})}({response:e,options:c},f)}).then(function(e){var t=e.response;if(t.parsed){if(!f)return _e({},t.parsed);if(Array.isArray(t.parsed))return t.parsed;!function(e){var t=Error("A batched Operation of responses for ");throw t.response=e,t}(t)}else!function(e,t){var r;throw r=Error(e&&e.status>=300?"Network request failed with status "+e.status+' - "'+e.statusText+'"':"Network request failed to return valid JSON"),r.response=e,r.parseError=t,r}(t,a)})};return a.use=function(e){if("function"!=typeof e)throw Error("Middleware must be a function");return o.push(e),a},a.useAfter=function(e){if("function"!=typeof e)throw Error("Afterware must be a function");return u.push(e),a},a.batchUse=function(e){if("function"!=typeof e)throw Error("Middleware must be a function");return i.push(e),a},a.batchUseAfter=function(e){if("function"!=typeof e)throw Error("Afterware must be a function");return s.push(e),a},a}function E(e,t,r,n){function o(e,t){return j(e,t,r.slice(),n.slice())}var i=Fe(e),u=Fe(t);return!qe(function(e,t){return!qe(o,t,e)},u,i)}function j(e,t,r,n){if(Be(e,t))return!0;var o=Qe(e);if(o!==Qe(t))return!1;if(null==e||null==t)return!1;if("function"==typeof e["fantasy-land/equals"]||"function"==typeof t["fantasy-land/equals"])return"function"==typeof e["fantasy-land/equals"]&&e["fantasy-land/equals"](t)&&"function"==typeof t["fantasy-land/equals"]&&t["fantasy-land/equals"](e);if("function"==typeof e.equals||"function"==typeof t.equals)return"function"==typeof e.equals&&e.equals(t)&&"function"==typeof t.equals&&t.equals(e);switch(o){case"Arguments":case"Array":case"Object":if("function"==typeof e.constructor&&"Promise"===Re(e.constructor))return e===t;break;case"Boolean":case"Number":case"String":if(typeof e!=typeof t||!Be(e.valueOf(),t.valueOf()))return!1;break;case"Date":if(!Be(e.valueOf(),t.valueOf()))return!1;break;case"Error":return e.name===t.name&&e.message===t.message;case"RegExp":if(e.source!==t.source||e.global!==t.global||e.ignoreCase!==t.ignoreCase||e.multiline!==t.multiline||e.sticky!==t.sticky||e.unicode!==t.unicode)return!1}for(var i=r.length-1;i>=0;){if(r[i]===e)return n[i]===t;i-=1}switch(o){case"Map":return e.size===t.size&&E(e.entries(),t.entries(),r.concat([e]),n.concat([t]));case"Set":return e.size===t.size&&E(e.values(),t.values(),r.concat([e]),n.concat([t]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var u=Ge(e);if(u.length!==Ge(t).length)return!1;var s=r.concat([e]),a=n.concat([t]);for(i=u.length-1;i>=0;){var c=u[i];if(!Te(c,t)||!j(t[c],e[c],s,a))return!1;i-=1}return!0}function x(e,t,r){for(var n=r.next();!n.done;){if((t=e["@@transducer/step"](t,n.value))&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}n=r.next()}return e["@@transducer/result"](t)}function A(e,t,r,n){return e["@@transducer/result"](r[n](Xe(e["@@transducer/step"],e),t))}function T(e){return function(e,t){var r=this[e];return gt(r,e),mt(r)?xe(t)?r:function(e,t){if(!wt(t))return[];var r=Object.entries(t)[0],n=r[0],o=r[1];return e.filter(function(e){return e[n]===o})}(r,t):xe(t)?r:function(e,t){if(wt(t)){var r=Object.entries(t)[0]||{},n=r[0],o=r[1];return Object.entries(e).filter(function(e){return e[1][n]===o}).reduce(function(e,t){var r;return _t({},e,(r={},r[t[0]]=t[1],r))},{})}return e[t]}(r,t)}}function P(e){return function(e,t,r){var n=this[e];return gt(n,e),mt(n)?function(e,t){return this[e]=[].concat(this[e]||[],[t]),t}.call(this,e,t):function(e,t,r){var n;return Ae(!xe(t),"You forgot to specify the payload"),Ae(!xe(r),"You are trying to post to a collection object but haven't specified an identifier. Try again with \"clerk.post('"+e+"', payload, identifier)\""),this[e]=jt({},this[e]||{},(n={},n[r]=t,n)),t}.call(this,e,t,r)}}function S(e){return function(e,t,r){var n=this[e];return gt(n,e),mt(n)?function(e,t,r){if(xe(r))return this[e]=[].concat(this[e],[t]),t;Ae(wt(r),"When updating a resource inside a list you have to specify an identifier object containing the key/value pair you want to match.");var n=Object.entries(r)[0],o=n[0],i=n[1],u=this[e].findIndex(function(e){return e[o]===i});return this[e]=[].concat(this[e].slice(0,u),[t],this[e].slice(u+1)),t}.call(this,e,t,r):function(e,t,r){var n;return Ae(!xe(r),"You are trying to update a resource but haven't specified the identifier. Try again with \"clerk.put('"+e+"', payload, identifier)\""),this[e]=At({},this[e]||{},(n={},n[r]=t,n)),t}.call(this,e,t,r)}}function k(e){return function(e,t,r){var n=this[e];return gt(n,e),Ae(!xe(r),"You are trying to patch a resource but haven't specified the identifier. Try again with \"clerk.patch('"+e+"', payload, key)\""),mt(n)?function(e,t,r){Ae(wt(r),"When patching a resource inside a list you have to specify an identifier object containing the key/value pair you want to match.");var n=Object.entries(r)[0],o=n[0],i=n[1],u=this[e].findIndex(function(e){return e[o]===i});if(u>=0){var s=St(this[e][u],Ot(t));return this[e]=[].concat(this[e].slice(0,u),[s],this[e].slice(u+1)),s}}.call(this,e,t,r):function(e,t,r){var n;if(Ae(!xe(r),"You are trying to update a resource but haven't specified the identifier. Try again with \"clerk.put('"+e+"', payload, identifier)\""),!xe(this[e][r])){var o=St(this[e][r],Ot(t));return this[e]=kt({},this[e]||{},(n={},n[r]=o,n)),o}}.call(this,e,t,r)}}function L(e){return function(e,t){if(!xe(t)){var r=this[e];return gt(r,e),mt(r)?function(e,t){if(wt(t)){var r=Object.entries(t)[0],n=r[0],o=r[1],i=this[e].findIndex(function(e){return e[n]===o});if(i>=0){var u=this[e][i];return this[e]=[].concat(this[e].slice(0,i),this[e].slice(i+1)),u}}}.call(this,e,t):function(e,t){var r=this[e][t];if(!xe(r))return this[e]=It([t],this[e]),r}.call(this,e,t)}}}function I(e,t,r){var n=!!e;return"function"==typeof e&&(n=!!e(r)),n?"function"==typeof t?t(r):t:r}function C(e,t){return null===t?"null"===e.toLowerCase():void 0===t?"undefined"===e.toLowerCase():e.toLowerCase()===function(e){return Object.prototype.toString.call(e).slice(8,-1)}(t).toLowerCase()}function F(e){return"string"==typeof e?!e:C("object",e)?!Object.values(e).length:C("array",e)?!e.length:C("Map",e)?!e.size:!!C("Set",e)&&!e.size}function q(e){var t=this;return new qt(function(r){return Ut(regeneratorRuntime.mark(function n(){var o,i,u,s,a,c;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:t.prev=0,o=!0,i=!1,u=void 0,t.prev=4,s=Bt(e);case 6:return t.next=8,s.next();case 8:return a=t.sent,o=a.done,t.next=12,a.value;case 12:if(c=t.sent,o){t.next=19;break}r.next(c);case 16:o=!0,t.next=6;break;case 19:t.next=25;break;case 21:t.prev=21,t.t0=t.catch(4),i=!0,u=t.t0;case 25:if(t.prev=25,t.prev=26,o||!s.return){t.next=30;break}return t.next=30,s.return();case 30:if(t.prev=30,!i){t.next=33;break}throw u;case 33:return t.finish(30);case 34:return t.finish(25);case 35:t.next=41;break;case 37:t.prev=37,t.t1=t.catch(0),e.return(),r.error(t.t1);case 41:case"end":return t.stop()}},n,t,[[0,37],[4,21,25,35],[26,,30,34]])}))(),function(){r.complete(),e.return()}})}function R(e,t){if(!t||"object"!==(void 0===t?"undefined":Rt(t))||t.hasOwnProperty("length")||t.hasOwnProperty("size"))return e;var r=t.store,n=Dt(t,["store"]);r&&console.warn(Mt);var o=Object.keys(n),i=Array.isArray(o),u=0;for(o=i?o:o[Symbol.iterator]();;){var s;if(i){if(u>=o.length)break;s=o[u++]}else{if((u=o.next()).done)break;s=u.value}var a=s;e.hasOwnProperty(a)&&console.warn(Gt(a))}return Nt({},e,n)}function B(e){return null==e}function U(e){for(var t=[],r=[],n=Array.isArray(i=e),o=0,i=n?i:i[Symbol.iterator]();;){var u;if(n){if(o>=i.length)break;u=i[o++]}else{if((o=i.next()).done)break;u=o.value}var s=u||{},a=s.data,c=s.errors;c&&(t=[].concat(t,c)),a&&(r=[].concat(r,[a]))}var f=function(e){return I(F,function(){},e.reduce(function(e,t){return C("object",t)&&!B(t)?Nt({},e,t):e},{}))}(r),l=function(e){return I(F,function(){},e.reduce(function(e,t){var r;if(B(t)||F(t))return e;var n=t.path?t.path[0]:C("object",t)?t.constructor.name:"Errors";return Nt({},e,(r={},r[n]=[].concat(e[n]||[],[t]),r))},{}))}(t);return Nt({},f?{data:f}:{},l?{errors:l}:{})}function N(e){return!(e.kind!==t.Kind.OPERATION_DEFINITION)}function D(e){if("subscription"===e.operation&&1!==e.selectionSet.selections.length)return new t.GraphQLError(function(e){return(e?'Subscription "'+e+'" ':"Anonymous Subscription ")+"must select only one top level field."}(e.name&&e.name.value),e.selectionSet.selections.slice(1))}function M(e,r){if(!e.name&&r>1)return new t.GraphQLError("This anonymous operation must be the only defined operation.",[e])}function G(e,r){if(function(e){return!(e.kind!==t.Kind.FRAGMENT_DEFINITION)}(e)){var n=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).name.value}(e);if(r[n])return new t.GraphQLError(function(e){return'There can be only one fragment named "'+e+'".'}(n),[r[n],e.name]);r[n]=e.name}}function Q(e){for(var t=function(e){return e.definitions.filter(N)}(e).length,r=Object.create(null),n=[],o=Array.isArray(u=e.definitions),i=0,u=o?u:u[Symbol.iterator]();;){var s;if(o){if(i>=u.length)break;s=u[i++]}else{if((i=u.next()).done)break;s=i.value}var a=s,c=M(a,t)||G(a,r)||D(a);c&&n.push(c)}return n}function z(){function e(e){var r=e;try{r=function(e){return"string"==typeof e?t.parse(e):e}(e)}catch(e){return{document:r,errors:[e]}}var n=w?t.validate(w,r):Q(r);return Nt({document:r},!F(n)&&{errors:n})}function r(e){return function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.variables,o=void 0===n?{}:n,i=r.context,u=arguments[2],s=arguments[3];return e(w,t,{},R(E,void 0===i?{}:i),Nt({},j,o),u,s)}}function n(e,t){if(e)if(C("function",e))x.use(e);else{if(!C("array",e))throw new TypeError(Vt(t));for(var r=Array.isArray(o=e),n=0,o=r?o:o[Symbol.iterator]();;){var i;if(r){if(n>=o.length)break;i=o[n++]}else{if((n=o.next()).done)break;i=n.value}x.use(i)}}}function o(t){return function(r,n,o,i){var u=e(r),s=u.document,a=u.errors;if(a)return Promise.resolve({errors:a});if(o)return A(s,n,o,i);var c=s.definitions.filter(function(e){return e.operation===t});return 1===c.length?A(s,n,o,i):function(e){return new Promise(function(t){for(var r=[],n=function(){if(o){if(i>=u.length)return"break";s=u[i++]}else{if((i=u.next()).done)return"break";s=i.value}var e=s;r.push(new Promise(function(t){e.then(function(e){return t(e)},function(e){return t({errors:[e]})})}))},o=Array.isArray(u=e),i=0,u=o?u:u[Symbol.iterator]();;){var s;if("break"===n())break}Promise.all(r).then(function(e){t(U(e))})})}(c.map(function(e){return A(s,n,e.name.value,i)}))}}var i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},u=i.typeDefs,s=i.resolvers,a=this,c=arguments[1],f=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},l=f.variables,h=void 0===l?{}:l,p=f.context,y=void 0===p?{}:p,d=f.fetch,v=void 0===d?{}:d,b=new ge,m=void 0,w=void 0,g=void 0,O=void 0,E=void 0,j=void 0,x=void 0,A=r(t.execute),T=r(t.subscribe);return m=Nt({},c)||{},O=new Ft(m),g=I("function"==typeof s,s({pubsub:b,withFilter:Oe}),s),w=H({typeDefs:u,resolvers:g}),j=h,E=R({store:Nt({},O)},y),v.uri&&(x=_({uri:v.uri}),n(v.middleware,"middleware"),n(v.afterware,"afterware")),{get state(){return m},get schema(){return w},query:o("query"),mutate:o("mutation"),subscribe:function(){var r=Ut(regeneratorRuntime.mark(function r(n,o,i,u){var s,c,f,l,h;return regeneratorRuntime.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:if(s=e(n),c=s.document,!(f=s.errors)){r.next=3;break}return r.abrupt("return",Promise.resolve({errors:f}));case 3:if((l=c.definitions.filter(function(e){return"subscription"===e.operation})).length>=1){r.next=8;break}return r.abrupt("return",Promise.resolve({errors:[new t.GraphQLError(Yt)]}));case 8:if(l.length<=1){r.next=10;break}return r.abrupt("return",Promise.resolve({errors:[new t.GraphQLError(Wt)]}));case 10:return r.next=12,T(c,o,i,u);case 12:return h=r.sent,r.abrupt("return",q(h));case 14:case"end":return r.stop()}},r,a)}));return function(e,t,n,o){return r.apply(this,arguments)}}(),fetch:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).variables,r=void 0===t?{}:t,n=arguments[2];if(!x||!C("function",x))throw Error($t);return x({query:e,variables:r,operationName:n})},graphql:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).variables,r=void 0===t?{}:t,n=arguments[2];if(Ht[Qt]||(console.warn(Qt),Ht[Qt]=!0),!x||!C("function",x))throw Error($t);return x({query:e,variables:r,operationName:n})}}}var $="default"in t?t.default:t,Y="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},W=n(function(e,t){function r(e,t,r,n,o){var i={};return function(){var u=((Error().stack||"").match(/(?:\s+at\s.+){2}\s+at\s(.+)/)||[void 0,""])[1];if(!((u=/\)$/.test(u)?u.match(/[^(]+(?=\)$)/)[0]:u.trim())in i)){i[u]=!0;var s;switch(e){case"class":s="Class";break;case"property":s="Property";break;case"method":s="Method";break;case"function":s="Function"}s+=" `"+t+"` has been deprecated",n&&(s+=" since version "+n),r&&(s+=", use `"+r+"` instead"),s+=".",u&&(s+="\n at "+u),o&&(s+="\nCheck out "+o+" for more information."),console.warn(s)}}}function n(e,n,o,i,u,s){var a=(t.options.getWarner||r)(e,n,i,u,s),c={enumerable:(o=o||{writable:!0,enumerable:!1,configurable:!0}).enumerable,configurable:o.configurable};if(o.get||o.set)o.get&&(c.get=function(){return a(),o.get.call(this)}),o.set&&(c.set=function(e){return a(),o.set.call(this,e)});else{var f=o.value;c.get=function(){return a(),f},o.writable&&(c.set=function(e){a(),f=e})}return c}function o(e,n,o,i,u){for(var s=(t.options.getWarner||r)(e,n.name,o,i,u),a=function(){return s(),n.apply(this,arguments)},c=0,f=Object.getOwnPropertyNames(n);f.length>c;c++){var l=f[c],h=Object.getOwnPropertyDescriptor(n,l);h.writable?a[l]=n[l]:h.configurable&&Object.defineProperty(a,l,h)}return a}function i(){for(var e=[],t=0;arguments.length>t;t++)e[t-0]=arguments[t];var r=e[e.length-1];r="function"==typeof r?e.pop():void 0;var i,u,s,a=e[0];return"string"==typeof a?(i=a,u=e[1],s=e[2]):a&&(i=a.alternative,u=a.version,s=a.url),r?o("function",r,i,u,s):function(e,t,r){if("string"==typeof t){return n(r&&"function"==typeof r.value?"method":"property",t,r,i,u,s)}if("function"==typeof e){for(var a=o("class",e,i,u,s),c=e.name,f=0,l=Object.getOwnPropertyNames(a);l.length>f;f++){var h=l[f],p=Object.getOwnPropertyDescriptor(a,h);(p=n("class",c,p,i,u,s)).writable?a[h]=e[h]:p.configurable&&Object.defineProperty(a,h,p)}return a}}}t.options={getWarner:void 0},t.deprecated=i,Object.defineProperty(t,"__esModule",{value:!0}),t.default=i});r(W);var V=n(function(e,t){function r(e){return void 0!==e.kind}function n(e,t){void 0===t&&(t=[]);var o=[];return e.forEach(function(e){if(r(e)&&(e=$.print(e)),"function"==typeof e)-1===t.indexOf(e)&&(t.push(e),o=o.concat(n(e(),t)));else{if("string"!=typeof e){throw new v("typeDef array must contain only strings and functions, got "+typeof e)}o.push(e.trim())}}),function(e){return e.reduce(function(e,t){return-1===e.indexOf(t)?e.concat([t]):e},[])}(o.map(function(e){return e.trim()})).join("\n")}function o(e){var t,o=e;if(r(e))t=e;else if("string"!=typeof o){if(!Array.isArray(o)){throw new v("typeDefs must be a string, array or schema AST, got "+typeof o)}o=n(o)}"string"==typeof o&&(t=$.parse(o));var u=$.buildASTSchema(t),s=i(t);return s.definitions.length>0&&(u=$.extendSchema(u,s)),u}function i(e){var t=e.definitions.filter(function(e){return e.kind===$.Kind.TYPE_EXTENSION_DEFINITION});return Object.assign({},e,{definitions:t})}function u(e,t){var r=e.getTypeMap();Object.keys(r).forEach(function(e){var n=r[e];if(!$.getNamedType(n).name.startsWith("__")&&n instanceof $.GraphQLObjectType){var o=n.getFields();Object.keys(o).forEach(function(r){t(o[r],e,r)})}})}function s(e,t){[e.getQueryType(),e.getMutationType(),e.getSubscriptionType()].filter(function(e){return!!e}).forEach(function(r){var n=function(e){var t,r=Math.random();return function(n,o,i,u){return u.operation.__runAtMostOnce||(u.operation.__runAtMostOnce={}),u.operation.__runAtMostOnce[r]||(u.operation.__runAtMostOnce[r]=!0,t=e(n,o,i,u)),t}}(t),o=r.getFields();Object.keys(o).forEach(function(i){o[i].resolve=r===e.getSubscriptionType()?p(o[i].resolve,t):p(o[i].resolve,n)})})}function a(e,t,r){void 0===r&&(r={});var n=r.allowResolversNotInSchema,o=void 0!==n&&n;Object.keys(t).forEach(function(r){var n=e.getType(r);if(!n&&"__schema"!==r){if(o)return;throw new v('"'+r+'" defined in resolvers, but not in schema')}Object.keys(t[r]).forEach(function(e){if(e.startsWith("__"))n[e.substring(2)]=t[r][e];else if(n instanceof $.GraphQLScalarType)n[e]=t[r][e];else if(n instanceof $.GraphQLEnumType){if(!n.isValidValue(e))throw new v(r+"."+e+" was defined in resolvers, but enum is not in schema");n.getValue(e).value=t[r][e]}else{var i=function(e){return e instanceof $.GraphQLObjectType||e instanceof $.GraphQLInterfaceType?e.getFields():void 0}(n);if(!i){if(o)return;throw new v(r+" was defined in resolvers, but it's not an object")}if(!i[e]){if(o)return;throw new v(r+"."+e+" defined in resolvers, but not in schema")}var u=i[e],s=t[r][e];if("function"==typeof s)c(u,{resolve:s});else{if("object"!=typeof s)throw new v("Resolver "+r+"."+e+" must be object or function");c(u,s)}}})})}function c(e,t){Object.keys(t).forEach(function(r){e[r]=t[r]})}function f(e,t){void 0===t&&(t={});var r=t.requireResolversForArgs,n=void 0!==r&&r,o=t.requireResolversForNonScalar,i=void 0!==o&&o,s=t.requireResolversForAllFields,a=void 0!==s&&s;if(a&&(n||i))throw new TypeError("requireResolversForAllFields takes precedence over the more specific assertions. Please configure either requireResolversForAllFields or requireResolversForArgs / requireResolversForNonScalar, but not a combination of them.");u(e,function(e,t,r){a&&l(e,t,r),n&&e.args.length>0&&l(e,t,r),!i||$.getNamedType(e.type)instanceof $.GraphQLScalarType||l(e,t,r)})}function l(e,t,r){if(e.resolve){if("function"!=typeof e.resolve)throw new v('Resolver "'+t+"."+r+'" must be a function')}else console.warn('Resolve function missing for "'+t+"."+r+'". To disable this warning check https://github.com/apollostack/graphql-tools/issues/131')}function h(e,t){if(!t)throw Error("Must provide a logger");if("function"!=typeof t.log)throw Error("Logger.log must be a function");u(e,function(e,r,n){e.resolve=function(e,t,r){void 0===e&&(e=$.defaultFieldResolver);var n=function(e){var n=Error();n.stack=e.stack,r&&(n.originalMessage=e.message,n.message="Error in resolver "+r+"\n"+e.message),t.log(n)};return function(t,r,o,i){try{var u=e(t,r,o,i);return u&&"function"==typeof u.then&&"function"==typeof u.catch&&u.catch(function(e){var t=e instanceof Error?e:Error(e);return n(t),e}),u}catch(e){throw n(e),e}}}(e.resolve,t,r+"."+n)})}function p(e,t){return function(r,n,o,i){return Promise.resolve(t(r,n,o,i)).then(function(t){return e?e(t,n,o,i):$.defaultFieldResolver(t,n,o,i)})}}function y(e){u(e,function(e,t,r){e.resolve=function(e,t){void 0===e&&(e=$.defaultFieldResolver);return function(r,n,o,i){var u=e(r,n,o,i);if(void 0===u)throw Error('Resolve function for "'+t+'" returned undefined');return u}}(e.resolve,t+"."+r)})}var d=Y&&Y.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0});var v=function(e){function t(t){var r=e.call(this,t)||this;return r.message=t,Error.captureStackTrace(r,r.constructor),r}return d(t,e),t}(Error);t.SchemaError=v,t.makeExecutableSchema=function(e){var t=e.resolvers,r=void 0===t?{}:t,n=e.connectors,i=e.allowUndefinedInResolve,u=e.resolverValidationOptions,c=function(e,t,r,n,i){if("object"!=typeof i)throw new v("Expected `resolverValidationOptions` to be an object");if(!e)throw new v("Must provide typeDefs");if(!t)throw new v("Must provide resolvers");var u=o(e);return a(u,t,i),f(u,i),n||y(u),r&&h(u,r),u}(e.typeDefs,r,e.logger,void 0===i||i,void 0===u?{}:u);return"function"==typeof r.__schema&&s(c,r.__schema),n&&b(c,n),c},t.concatenateTypeDefs=n,t.buildSchemaFromTypeDefinitions=o,t.extractExtensionDefinitions=i,t.forEachField=u;var b=W.deprecated({version:"0.7.0",url:"https://github.com/apollostack/graphql-tools/issues/140"},function(e,t){if(!(e&&e instanceof $.GraphQLSchema))throw Error("schema must be an instance of GraphQLSchema. This error could be caused by installing more than one version of GraphQL-JS");if("object"!=typeof t){throw Error("Expected connectors to be of type object, got "+typeof t)}if(0===Object.keys(t).length)throw Error("Expected connectors to not be an empty object");if(Array.isArray(t))throw Error("Expected connectors to be of type object, got Array");if(e._apolloConnectorsAttached)throw Error("Connectors already attached to context, cannot attach more than once");e._apolloConnectorsAttached=!0;s(e,function(e,r,n){if("object"!=typeof n)throw Error("Cannot attach connector because context is not an object: "+typeof n);return void 0===n.connectors&&(n.connectors={}),Object.keys(t).forEach(function(e){var r=t[e];if(!r.prototype)throw Error("Connector must be a function or an class");n.connectors[e]=new r(n)}),e})});t.attachConnectorsToContext=b,t.addSchemaLevelResolveFunction=s,t.addResolveFunctionsToSchema=a,t.assertResolveFunctionsPresent=f,t.addErrorLoggingToSchema=h,t.chainResolvers=function(e){return function(t,r,n,o){return e.reduce(function(e,t){return t?t(e,r,n,o):$.defaultFieldResolver(e,r,n,o)},t)}},t.addCatchUndefinedToSchema=y});r(V);var H=V.makeExecutableSchema;o.prototype=Object.create(null),i.EventEmitter=i,i.usingDomains=!1,i.prototype.domain=void 0,i.prototype._events=void 0,i.prototype._maxListeners=void 0,i.defaultMaxListeners=10,i.init=function(){this.domain=null,i.usingDomains&&(!(void 0).active||this instanceof(void 0).Domain||(this.domain=(void 0).active)),this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=new o,this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},i.prototype.setMaxListeners=function(e){if("number"!=typeof e||0>e||isNaN(e))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=e,this},i.prototype.getMaxListeners=function(){return u(this)},i.prototype.emit=function(e){var t,r,n,o,i,u,s,a="error"===e;if(u=this._events)a=a&&null==u.error;else if(!a)return!1;if(s=this.domain,a){if(t=arguments[1],!s){if(t instanceof Error)throw t;var c=Error('Uncaught, unspecified "error" event. ('+t+")");throw c.context=t,c}return t||(t=Error('Uncaught, unspecified "error" event')),t.domainEmitter=this,t.domain=s,t.domainThrown=!1,s.emit("error",t),!1}if(!(r=u[e]))return!1;var l="function"==typeof r;switch(n=arguments.length){case 1:!function(e,t,r){if(t)e.call(r);else for(var n=e.length,o=f(e,n),i=0;n>i;++i)o[i].call(r)}(r,l,this);break;case 2:!function(e,t,r,n){if(t)e.call(r,n);else for(var o=e.length,i=f(e,o),u=0;o>u;++u)i[u].call(r,n)}(r,l,this,arguments[1]);break;case 3:!function(e,t,r,n,o){if(t)e.call(r,n,o);else for(var i=e.length,u=f(e,i),s=0;i>s;++s)u[s].call(r,n,o)}(r,l,this,arguments[1],arguments[2]);break;case 4:!function(e,t,r,n,o,i){if(t)e.call(r,n,o,i);else for(var u=e.length,s=f(e,u),a=0;u>a;++a)s[a].call(r,n,o,i)}(r,l,this,arguments[1],arguments[2],arguments[3]);break;default:for(o=Array(n-1),i=1;n>i;i++)o[i-1]=arguments[i];!function(e,t,r,n){if(t)e.apply(r,n);else for(var o=e.length,i=f(e,o),u=0;o>u;++u)i[u].apply(r,n)}(r,l,this,o)}return!0},i.prototype.on=i.prototype.addListener=function(e,t){return s(this,e,t,!1)},i.prototype.prependListener=function(e,t){return s(this,e,t,!0)},i.prototype.once=function(e,t){if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');return this.on(e,a(this,e,t)),this},i.prototype.prependOnceListener=function(e,t){if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');return this.prependListener(e,a(this,e,t)),this},i.prototype.removeListener=function(e,t){var r,n,i,u,s;if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');if(!(n=this._events))return this;if(!(r=n[e]))return this;if(r===t||r.listener&&r.listener===t)0==--this._eventsCount?this._events=new o:(delete n[e],n.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(i=-1,u=r.length;u-- >0;)if(r[u]===t||r[u].listener&&r[u].listener===t){s=r[u].listener,i=u;break}if(0>i)return this;if(1===r.length){if(r[0]=void 0,0==--this._eventsCount)return this._events=new o,this;delete n[e]}else!function(e,t){for(var r=t,n=r+1,o=e.length;o>n;r+=1,n+=1)e[r]=e[n];e.pop()}(r,i);n.removeListener&&this.emit("removeListener",e,s||t)}return this},i.prototype.removeAllListeners=function(e){var t,r;if(!(r=this._events))return this;if(!r.removeListener)return 0===arguments.length?(this._events=new o,this._eventsCount=0):r[e]&&(0==--this._eventsCount?this._events=new o:delete r[e]),this;if(0===arguments.length){for(var n,i=Object.keys(r),u=0;i.length>u;++u)"removeListener"!==(n=i[u])&&this.removeAllListeners(n);return this.removeAllListeners("removeListener"),this._events=new o,this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(t)do{this.removeListener(e,t[t.length-1])}while(t[0]);return this},i.prototype.listeners=function(e){var t,r=this._events;return r&&(t=r[e])?"function"==typeof t?[t.listener||t]:function(e){for(var t=Array(e.length),r=0;t.length>r;++r)t[r]=e[r].listener||e[r];return t}(t):[]},i.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):c.call(e,t)},i.prototype.listenerCount=c,i.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]};var J=Object.freeze({default:i,EventEmitter:i}),K="function"==typeof Symbol&&Symbol.iterator,X=K||"@@iterator",Z=X,ee=l,te=h,re=function(e){return Object(e)===e&&(h(e)||l(e))},ne=p,oe=y,ie=d;v.prototype[X]=function(){return this},v.prototype.next=function(){return void 0!==this._o&&this._o.length>this._i?{value:this._o[this._i++],done:!1}:(this._o=void 0,{value:void 0,done:!0})};var ue=function(e,t,r){if(null!=e){if("function"==typeof e.forEach)return e.forEach(t,r);var n=0,o=p(e);if(o){for(var i;!(i=o.next()).done;)if(t.call(r,i.value,n++,e),n>9999999)throw new TypeError("Near-infinite iteration.")}else if(h(e))for(;e.length>n;n++)e.hasOwnProperty(n)&&t.call(r,e[n],n,e)}},se="function"==typeof Symbol&&Symbol.asyncIterator,ae=se||"@@asyncIterator",ce=ae,fe=function(e){return!!m(e)},le=b,he=m,pe=w;g.prototype[ae]=function(){return this},g.prototype.next=function(){var e=this._i.next();return Promise.resolve(e.value).then(function(t){return{value:t,done:e.done}})};var ye={$$iterator:Z,isIterable:ee,isArrayLike:te,isCollection:re,getIterator:ne,getIteratorMethod:oe,createIterator:ie,forEach:ue,$$asyncIterator:ce,isAsyncIterable:fe,getAsyncIterator:le,getAsyncIteratorMethod:he,createAsyncIterator:pe,forAwaitEach:function(e,t,r){var n=w(e);if(n){var o=0;return new Promise(function(i,u){function s(){return n.next().then(function(n){n.done?i():Promise.resolve(t.call(r,n.value,o++,e)).then(s).catch(u)}).catch(u)}s()})}}},de=n(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.eventEmitterAsyncIterator=function(e,t){var r=[],n=[],o="string"==typeof t?[t]:t,i=!0,u=function(e){0!==r.length?r.shift()({value:e,done:!1}):n.push(e)},s=function(){i&&(i=!1,a(),r.forEach(function(e){return e({value:void 0,done:!0})}),r.length=0,n.length=0)},a=function(){for(var t=0,r=o;r.length>t;t++)e.removeListener(r[t],u)};return function(){for(var t=0,r=o;r.length>t;t++)e.addListener(r[t],u)}(),c={next:function(){return i?new Promise(function(e){0!==n.length?e({value:n.shift(),done:!1}):r.push(e)}):this.return()},return:function(){return s(),Promise.resolve({value:void 0,done:!0})},throw:function(e){return s(),Promise.reject(e)}},c[ye.$$asyncIterator]=function(){return this},c;var c}});r(de);var ve=J&&i||J,be=n(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e){void 0===e&&(e={}),this.ee=e.eventEmitter||new ve.EventEmitter,this.subscriptions={},this.subIdCounter=0}return e.prototype.publish=function(e,t){return this.ee.emit(e,t),!0},e.prototype.subscribe=function(e,t){return this.ee.addListener(e,t),this.subIdCounter=this.subIdCounter+1,this.subscriptions[this.subIdCounter]=[e,t],Promise.resolve(this.subIdCounter)},e.prototype.unsubscribe=function(e){var t=this.subscriptions[e],r=t[0],n=t[1];delete this.subscriptions[e],this.ee.removeListener(r,n)},e.prototype.asyncIterator=function(e){return de.eventEmitterAsyncIterator(this.ee,e)},e}();t.PubSub=r});r(be);var me=n(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.withFilter=function(e,t){return function(r,n,o,i){var u=e(r,n,o,i),s=function(){return u.next().then(function(e){return Promise.all([e,Promise.resolve(t(e.value,n,o,i)).catch(function(){return!1})])}).then(function(e){var t=e[0];return!0===e[1]||!0===t.done?t:s()})};return a={next:function(){return s()},return:function(){return u.return()},throw:function(e){return u.throw(e)}},a[ye.$$asyncIterator]=function(){return this},a;var a}}});r(me);var we=n(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.PubSub=be.PubSub,t.withFilter=me.withFilter});r(we);var ge=we.PubSub,Oe=we.withFilter;!function(e){function t(e){if("string"!=typeof e&&(e+=""),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function r(e){return"string"!=typeof e&&(e+=""),e}function n(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return p.iterable&&(t[Symbol.iterator]=function(){return t}),t}function o(e){this.map={},e instanceof o?e.forEach(function(e,t){this.append(t,e)},this):Array.isArray(e)?e.forEach(function(e){this.append(e[0],e[1])},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}function i(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function u(e){return new Promise(function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}})}function s(e){var t=new FileReader,r=u(t);return t.readAsArrayBuffer(e),r}function a(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function c(){return this.bodyUsed=!1,this._initBody=function(e){if(this._bodyInit=e,e)if("string"==typeof e)this._bodyText=e;else if(p.blob&&Blob.prototype.isPrototypeOf(e))this._bodyBlob=e;else if(p.formData&&FormData.prototype.isPrototypeOf(e))this._bodyFormData=e;else if(p.searchParams&&URLSearchParams.prototype.isPrototypeOf(e))this._bodyText=""+e;else if(p.arrayBuffer&&p.blob&&d(e))this._bodyArrayBuffer=a(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer]);else{if(!p.arrayBuffer||!ArrayBuffer.prototype.isPrototypeOf(e)&&!v(e))throw Error("unsupported BodyInit type");this._bodyArrayBuffer=a(e)}else this._bodyText="";this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):p.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},p.blob&&(this.blob=function(){var e=i(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?i(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(s)}),this.text=function(){var e=i(this);if(e)return e;if(this._bodyBlob)return function(e){var t=new FileReader,r=u(t);return t.readAsText(e),r}(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),r=Array(t.length),n=0;t.length>n;n++)r[n]=String.fromCharCode(t[n]);return r.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},p.formData&&(this.formData=function(){return this.text().then(l)}),this.json=function(){return this.text().then(JSON.parse)},this}function f(e,t){var r=(t=t||{}).body;if(e instanceof f){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new o(e.headers)),this.method=e.method,this.mode=e.mode,r||null==e._bodyInit||(r=e._bodyInit,e.bodyUsed=!0)}else this.url=e+"";if(this.credentials=t.credentials||this.credentials||"omit",!t.headers&&this.headers||(this.headers=new o(t.headers)),this.method=function(e){var t=e.toUpperCase();return b.indexOf(t)>-1?t:e}(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&r)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(r)}function l(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var r=e.split("="),n=r.shift().replace(/\+/g," "),o=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(n),decodeURIComponent(o))}}),t}function h(e,t){t||(t={}),this.type="default",this.status="status"in t?t.status:200,this.ok=this.status>=200&&300>this.status,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new o(t.headers),this.url=t.url||"",this._initBody(e)}if(!e.fetch){var p={searchParams:"URLSearchParams"in e,iterable:"Symbol"in e&&"iterator"in Symbol,blob:"FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in e,arrayBuffer:"ArrayBuffer"in e};if(p.arrayBuffer)var y=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],d=function(e){return e&&DataView.prototype.isPrototypeOf(e)},v=ArrayBuffer.isView||function(e){return e&&y.indexOf(Object.prototype.toString.call(e))>-1};o.prototype.append=function(e,n){e=t(e),n=r(n);var o=this.map[e];this.map[e]=o?o+","+n:n},o.prototype.delete=function(e){delete this.map[t(e)]},o.prototype.get=function(e){return e=t(e),this.has(e)?this.map[e]:null},o.prototype.has=function(e){return this.map.hasOwnProperty(t(e))},o.prototype.set=function(e,n){this.map[t(e)]=r(n)},o.prototype.forEach=function(e,t){for(var r in this.map)this.map.hasOwnProperty(r)&&e.call(t,this.map[r],r,this)},o.prototype.keys=function(){var e=[];return this.forEach(function(t,r){e.push(r)}),n(e)},o.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),n(e)},o.prototype.entries=function(){var e=[];return this.forEach(function(t,r){e.push([r,t])}),n(e)},p.iterable&&(o.prototype[Symbol.iterator]=o.prototype.entries);var b=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];f.prototype.clone=function(){return new f(this,{body:this._bodyInit})},c.call(f.prototype),c.call(h.prototype),h.prototype.clone=function(){return new h(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new o(this.headers),url:this.url})},h.error=function(){var e=new h(null,{status:0,statusText:""});return e.type="error",e};var m=[301,302,303,307,308];h.redirect=function(e,t){if(-1===m.indexOf(t))throw new RangeError("Invalid status code");return new h(null,{status:t,headers:{location:e}})},e.Headers=o,e.Request=f,e.Response=h,e.fetch=function(e,t){return new Promise(function(r,n){var i=new f(e,t),u=new XMLHttpRequest;u.onload=function(){var e={status:u.status,statusText:u.statusText,headers:function(e){var t=new o;return e.split(/\r?\n/).forEach(function(e){var r=e.split(":"),n=r.shift().trim();if(n){var o=r.join(":").trim();t.append(n,o)}}),t}(u.getAllResponseHeaders()||"")};e.url="responseURL"in u?u.responseURL:e.headers.get("X-Request-URL");r(new h("response"in u?u.response:u.responseText,e))},u.onerror=function(){n(new TypeError("Network request failed"))},u.ontimeout=function(){n(new TypeError("Network request failed"))},u.open(i.method,i.url,!0),"include"===i.credentials&&(u.withCredentials=!0),"responseType"in u&&p.blob&&(u.responseType="blob"),i.headers.forEach(function(e,t){u.setRequestHeader(t,e)}),u.send(void 0===i._bodyInit?null:i._bodyInit)})},e.fetch.polyfill=!0}}("undefined"!=typeof self?self:Y);var _e=Object.assign||function(e){for(var t,r=1,n=arguments.length;n>r;r++){t=arguments[r];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},Ee=function(e){return null!=e&&"object"==typeof e&&!0===e["@@functional/placeholder"]},je=function(e){return function t(r){return 0===arguments.length||Ee(r)?t:e.apply(this,arguments)}},xe=je(function(e){return null==e}),Ae=function(e,t,r,n,o,i,u,s){if(!e){var a;if(void 0===t)a=Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[r,n,o,i,u,s],f=0;(a=Error(t.replace(/%s/g,function(){return c[f++]}))).name="Invariant Violation"}throw a.framesToPop=1,a}},Te=function(e,t){return Object.prototype.hasOwnProperty.call(t,e)},Pe=Object.prototype.toString,Se=function(){return"[object Arguments]"===Pe.call(arguments)?function(e){return"[object Arguments]"===Pe.call(e)}:function(e){return Te("callee",e)}},ke=Array.isArray||function(e){return null!=e&&e.length>=0&&"[object Array]"===Object.prototype.toString.call(e)},Le=function(e){return"[object Object]"===Object.prototype.toString.call(e)},Ie=function(e){return"[object String]"===Object.prototype.toString.call(e)},Ce=function(e){return function t(r,n){switch(arguments.length){case 0:return t;case 1:return Ee(r)?t:je(function(t){return e(r,t)});default:return Ee(r)&&Ee(n)?t:Ee(r)?je(function(t){return e(t,n)}):Ee(n)?je(function(t){return e(r,t)}):e(r,n)}}},Fe=function(e){for(var t,r=[];!(t=e.next()).done;)r.push(t.value);return r},qe=function(e,t,r){for(var n=0,o=r.length;o>n;){if(e(t,r[n]))return!0;n+=1}return!1},Re=function(e){var t=(e+"").match(/^function (\w*)/);return null==t?"":t[1]},Be=Ce(function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}),Ue=!{toString:null}.propertyIsEnumerable("toString"),Ne=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],De=function(){return arguments.propertyIsEnumerable("length")}(),Me=function(e,t){for(var r=0;e.length>r;){if(e[r]===t)return!0;r+=1}return!1},Ge=je("function"!=typeof Object.keys||De?function(e){if(Object(e)!==e)return[];var t,r,n=[],o=De&&Se(e);for(t in e)!Te(t,e)||o&&"length"===t||(n[n.length]=t);if(Ue)for(r=Ne.length-1;r>=0;)Te(t=Ne[r],e)&&!Me(n,t)&&(n[n.length]=t),r-=1;return n}:function(e){return Object(e)!==e?[]:Object.keys(e)}),Qe=je(function(e){return null===e?"Null":void 0===e?"Undefined":Object.prototype.toString.call(e).slice(8,-1)}),ze=j,$e=Ce(function(e,t){return ze(e,t,[],[])}),Ye=function(e,t){switch(e){case 0:return function(){return t.apply(this,arguments)};case 1:return function(e){return t.apply(this,arguments)};case 2:return function(e,r){return t.apply(this,arguments)};case 3:return function(e,r,n){return t.apply(this,arguments)};case 4:return function(e,r,n,o){return t.apply(this,arguments)};case 5:return function(e,r,n,o,i){return t.apply(this,arguments)};case 6:return function(e,r,n,o,i,u){return t.apply(this,arguments)};case 7:return function(e,r,n,o,i,u,s){return t.apply(this,arguments)};case 8:return function(e,r,n,o,i,u,s,a){return t.apply(this,arguments)};case 9:return function(e,r,n,o,i,u,s,a,c){return t.apply(this,arguments)};case 10:return function(e,r,n,o,i,u,s,a,c,f){return t.apply(this,arguments)};default:throw Error("First argument to _arity must be a non-negative integer no greater than ten")}},We=function(e,t){return function(){return t.call(this,e.apply(this,arguments))}},Ve=function(e){return function t(r,n,o){switch(arguments.length){case 0:return t;case 1:return Ee(r)?t:Ce(function(t,n){return e(r,t,n)});case 2:return Ee(r)&&Ee(n)?t:Ee(r)?Ce(function(t,r){return e(t,n,r)}):Ee(n)?Ce(function(t,n){return e(r,t,n)}):je(function(t){return e(r,n,t)});default:return Ee(r)&&Ee(n)&&Ee(o)?t:Ee(r)&&Ee(n)?Ce(function(t,r){return e(t,r,o)}):Ee(r)&&Ee(o)?Ce(function(t,r){return e(t,n,r)}):Ee(n)&&Ee(o)?Ce(function(t,n){return e(r,t,n)}):Ee(r)?je(function(t){return e(t,n,o)}):Ee(n)?je(function(t){return e(r,t,o)}):Ee(o)?je(function(t){return e(r,n,t)}):e(r,n,o)}}},He=je(function(e){return!!ke(e)||!!e&&("object"==typeof e&&(!Ie(e)&&(1===e.nodeType?!!e.length:0===e.length||e.length>0&&(e.hasOwnProperty(0)&&e.hasOwnProperty(e.length-1)))))}),Je=function(){function e(e){this.f=e}return e.prototype["@@transducer/init"]=function(){throw Error("init not implemented on XWrap")},e.prototype["@@transducer/result"]=function(e){return e},e.prototype["@@transducer/step"]=function(e,t){return this.f(e,t)},e}(),Ke=function(e){return new Je(e)},Xe=Ce(function(e,t){return Ye(e.length,function(){return e.apply(t,arguments)})}),Ze="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator",et=function(e,t,r){if("function"==typeof e&&(e=Ke(e)),He(r))return function(e,t,r){for(var n=0,o=r.length;o>n;){if((t=e["@@transducer/step"](t,r[n]))&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}n+=1}return e["@@transducer/result"](t)}(e,t,r);if("function"==typeof r["fantasy-land/reduce"])return A(e,t,r,"fantasy-land/reduce");if(null!=r[Ze])return x(e,t,r[Ze]());if("function"==typeof r.next)return x(e,t,r);if("function"==typeof r.reduce)return A(e,t,r,"reduce");throw new TypeError("reduce: list must be array or iterable")},tt=Ve(et),rt=function(e,t){return function(){var r=arguments.length;if(0===r)return t();var n=arguments[r-1];return ke(n)||"function"!=typeof n[e]?t.apply(this,arguments):n[e].apply(n,Array.prototype.slice.call(arguments,0,r-1))}},nt=je(rt("tail",Ve(rt("slice",function(e,t,r){return Array.prototype.slice.call(r,e,t)}))(1,1/0))),ot=function(){if(0===arguments.length)throw Error("pipe requires at least one argument");return Ye(arguments[0].length,tt(We,arguments[0],nt(arguments)))},it=je(function(e){return Ie(e)?e.split("").reverse().join(""):Array.prototype.slice.call(e,0).reverse()}),ut=function(){if(0===arguments.length)throw Error("compose requires at least one argument");return ot.apply(this,it(arguments))},st=function(e){return function(){return!e.apply(this,arguments)}},at=function(e){return"function"==typeof e["@@transducer/step"]},ct=function(e,t,r){return function(){if(0===arguments.length)return r();var n=Array.prototype.slice.call(arguments,0),o=n.pop();if(!ke(o)){for(var i=0;e.length>i;){if("function"==typeof o[e[i]])return o[e[i]].apply(o,n);i+=1}if(at(o))return t.apply(null,n)(o)}return r.apply(this,arguments)}},ft=function(e,t){for(var r=0,n=t.length,o=[];n>r;)e(t[r])&&(o[o.length]=t[r]),r+=1;return o},lt=function(){return this.xf["@@transducer/init"]()},ht=function(e){return this.xf["@@transducer/result"](e)},pt=function(){function e(e,t){this.xf=t,this.f=e}return e.prototype["@@transducer/init"]=lt,e.prototype["@@transducer/result"]=ht,e.prototype["@@transducer/step"]=function(e,t){return this.f(t)?this.xf["@@transducer/step"](e,t):e},e}(),yt=Ce(ct(["filter"],Ce(function(e,t){return new pt(e,t)}),function(e,t){return Le(t)?et(function(r,n){return e(t[n])&&(r[n]=t[n]),r},{},Ge(t)):ft(e,t)})),dt=Ce(function(e,t){return yt(st(e),t)}),vt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},bt=function(e){return ut($e(e),Qe)},mt=bt("Array"),wt=bt("Object"),gt=function(e,t){Ae(!xe(e),'The "'+t+"\" collection does not exist. You can create one using your clerk instance by running(clerk.addCollection('"+t+"'))"),Ae("object"===(void 0===e?"undefined":vt(e)),'"'+t+'" is not a collection. You can access it like any other property on the state object')},Ot=dt(bt("Undefined")),_t=Object.assign||function(e){for(var t=1;arguments.length>t;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Et=function(e){return T()},jt=Object.assign||function(e){for(var t=1;arguments.length>t;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},xt=function(e){return P()},At=Object.assign||function(e){for(var t=1;arguments.length>t;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Tt=function(e){return S()},Pt="function"==typeof Object.assign?Object.assign:function(e){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),r=1,n=arguments.length;n>r;){var o=arguments[r];if(null!=o)for(var i in o)Te(i,o)&&(t[i]=o[i]);r+=1}return t},St=Ce(function(e,t){return Pt({},e,t)}),kt=Object.assign||function(e){for(var t=1;arguments.length>t;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Lt=function(e){return k()},It=Ce(function(e,t){for(var r={},n={},o=0,i=e.length;i>o;)n[e[o]]=1,o+=1;for(var u in t)n.hasOwnProperty(u)||(r[u]=t[u]);return r}),Ct=function(e){return L()},Ft=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.state=t,this.get=Et(t).bind(t),this.post=xt(t).bind(t),this.put=Tt(t).bind(t),this.patch=Lt(t).bind(t),this.delete=Ct(t).bind(t)}return e.prototype.getCollection=function(e){return this.state[e]},e.prototype.addCollection=function(e){return this.state[e]=new(arguments.length>1&&void 0!==arguments[1]?arguments[1]:Object),this.state[e]},e.prototype.removeCollection=function(e){var t=this.state[e];return null!=t&&delete this.state[e],t},e}(),qt=n(function(e,t){!function(e,t){function r(e){return"function"==typeof Symbol&&!!Symbol[e]}function n(e){return r(e)?Symbol[e]:"@@"+e}function o(e,t){var r=e[t];if(null!=r){if("function"!=typeof r)throw new TypeError(r+" is not a function");return r}}function i(e){var t=e.constructor;return void 0!==t&&null===(t=t[n("species")])&&(t=void 0),void 0!==t?t:l}function u(e,t){Object.keys(t).forEach(function(r){var n=Object.getOwnPropertyDescriptor(t,r);n.enumerable=!1,Object.defineProperty(e,r,n)})}function s(e){var t=e._cleanup;t&&(e._cleanup=void 0,t())}function a(e){return void 0===e._observer}function c(e,t){if(Object(e)!==e)throw new TypeError("Observer must be an object");this._cleanup=void 0,this._observer=e;var r=o(e,"start");if(r&&r.call(e,this),!a(this)){e=new f(this);try{var n=t.call(void 0,e);if(null!=n){if("function"==typeof n.unsubscribe)n=function(e){return function(){e.unsubscribe()}}(n);else if("function"!=typeof n)throw new TypeError(n+" is not a function");this._cleanup=n}}catch(t){return void e.error(t)}a(this)&&s(this)}}function f(e){this._subscription=e}function l(e){if("function"!=typeof e)throw new TypeError("Observable initializer must be a function");this._subscriber=e}"function"!=typeof Symbol||Symbol.observable||(Symbol.observable=Symbol("observable"));u(c.prototype={},{get closed(){return a(this)},unsubscribe:function(){!function(e){if(a(e))return;e._observer=void 0,s(e)}(this)}});u(f.prototype={},{get closed(){return a(this._subscription)},next:function(e){var t=this._subscription;if(!a(t)){var r=t._observer,n=o(r,"next");if(n)return n.call(r,e)}},error:function(e){var t=this._subscription;if(a(t))throw e;var r=t._observer;t._observer=void 0;try{var n=o(r,"error");if(!n)throw e;e=n.call(r,e)}catch(e){try{s(t)}finally{throw e}}return s(t),e},complete:function(e){var t=this._subscription;if(!a(t)){var r=t._observer;t._observer=void 0;try{var n=o(r,"complete");e=n?n.call(r,e):void 0}catch(e){try{s(t)}finally{throw e}}return s(t),e}}});u(l.prototype,{subscribe:function(e){for(var t=[],r=1;arguments.length>r;++r)t.push(arguments[r]);return"function"==typeof e&&(e={next:e,error:t[0],complete:t[1]}),new c(e,this._subscriber)},forEach:function(e){var t=this;return new Promise(function(r,n){if("function"!=typeof e)return Promise.reject(new TypeError(e+" is not a function"));t.subscribe({_subscription:null,start:function(e){if(Object(e)!==e)throw new TypeError(e+" is not an object");this._subscription=e},next:function(t){var r=this._subscription;if(!r.closed)try{return e(t)}catch(e){n(e),r.unsubscribe()}},error:n,complete:r})})},map:function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");var r=i(this);return new r(function(r){return t.subscribe({next:function(t){if(!r.closed){try{t=e(t)}catch(e){return r.error(e)}return r.next(t)}},error:function(e){return r.error(e)},complete:function(e){return r.complete(e)}})})},filter:function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");var r=i(this);return new r(function(r){return t.subscribe({next:function(t){if(!r.closed){try{if(!e(t))return}catch(e){return r.error(e)}return r.next(t)}},error:function(e){return r.error(e)},complete:function(){return r.complete()}})})},reduce:function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");var r=i(this),n=arguments.length>1,o=!1,u=arguments[1],s=u;return new r(function(r){return t.subscribe({next:function(t){if(!r.closed){var i=!o;if(o=!0,!i||n)try{s=e(s,t)}catch(e){return r.error(e)}else s=t}},error:function(e){r.error(e)},complete:function(){o||n?(r.next(s),r.complete()):r.error(new TypeError("Cannot reduce an empty sequence"))}})})},flatMap:function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");var r=i(this);return new r(function(r){function n(){o&&0===i.length&&r.complete()}var o=!1,i=[],u=t.subscribe({next:function(t){if(e)try{t=e(t)}catch(e){return void r.error(e)}l.from(t).subscribe({_subscription:null,start:function(e){i.push(this._subscription=e)},next:function(e){r.next(e)},error:function(e){r.error(e)},complete:function(){var e=i.indexOf(this._subscription);0>e||i.splice(e,1),n()}})},error:function(e){return r.error(e)},complete:function(){o=!0,n()}});return function(){i.forEach(function(e){return e.unsubscribe()}),u.unsubscribe()}})}}),Object.defineProperty(l.prototype,n("observable"),{value:function(){return this},writable:!0,configurable:!0}),u(l,{from:function(e){var t="function"==typeof this?this:l;if(null==e)throw new TypeError(e+" is not an object");var i=o(e,n("observable"));if(i){var u=i.call(e);if(Object(u)!==u)throw new TypeError(u+" is not an object");return u.constructor===t?u:new t(function(e){return u.subscribe(e)})}if(r("iterator")&&(i=o(e,n("iterator"))))return new t(function(t){for(var r,n=i.call(e)[Symbol.iterator]();!(r=n.next()).done;){var o=r.value;if(t.next(o),t.closed)return}t.complete()});if(Array.isArray(e))return new t(function(t){for(var r=0;e.length>r;++r)if(t.next(e[r]),t.closed)return;t.complete()});throw new TypeError(e+" is not observable")},of:function(){for(var e=[],t=0;arguments.length>t;++t)e.push(arguments[t]);var r="function"==typeof this?this:l;return new r(function(t){for(var r=0;e.length>r;++r)if(t.next(e[r]),t.closed)return;t.complete()})}}),Object.defineProperty(l,n("species"),{get:function(){return this},configurable:!0}),e.Observable=l}(t)}).Observable,Rt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Bt=function(e){if("function"==typeof Symbol){if(Symbol.asyncIterator){var t=e[Symbol.asyncIterator];if(null!=t)return t.call(e)}if(Symbol.iterator)return e[Symbol.iterator]()}throw new TypeError("Object is not async iterable")},Ut=function(e){return function(){var t=e.apply(this,arguments);return new Promise(function(e,r){function n(o,i){try{var u=t[o](i),s=u.value}catch(e){return void r(e)}if(!u.done)return Promise.resolve(s).then(function(e){n("next",e)},function(e){n("throw",e)});e(s)}return n("next")})}},Nt=Object.assign||function(e){for(var t=1;arguments.length>t;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Dt=function(e,t){var r={};for(var n in e)0>t.indexOf(n)&&Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r},Mt='You cannot extend the context with an object containing a "store" prop. It will be omitted and the other props will be added',Gt=function(e){return'The "'+e+"\" property already exists in the context object. Make sure you haven't replaced anything important"},Qt=' The "graphql" method is deprecated and will be removed in the 1.0 release. Use the "fetch" method instead.',zt='The "createStore" method is deprecated and will be removed in the 1.0 release. Use "new BlipsClient(...)" instead',$t='You are trying to use "BlipsClient.fetch" without it being configured.',Yt="No subscription operation defined in query",Wt="Only one subscription operation is allowed per query",Vt=function(){return"The fetch "+(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"middleware/afterware")+" must be a function or an array of functions"},Ht={};e.BlipsClient=z,e.createStore=function(){Ht[zt]||(console.warn(zt),Ht[zt]=!0);for(var e=arguments.length,t=Array(e),r=0;e>r;r++)t[r]=arguments[r];return new(Function.prototype.bind.apply(z,[null].concat(t)))},Object.defineProperty(e,"__esModule",{value:!0})}); | ||
//# sourceMappingURL=blips.min.js.map |
{ | ||
"name": "blips", | ||
"version": "1.0.0-rc4", | ||
"version": "1.0.0", | ||
"description": "State management for the GraphQL heads", | ||
@@ -43,4 +43,4 @@ "repository": { | ||
"cross-env": "5.1.1", | ||
"eslint": "4.12.1", | ||
"eslint-config-standard": "10.2.1", | ||
"eslint": "4.13.1", | ||
"eslint-config-standard": "11.0.0-beta.0", | ||
"eslint-plugin-import": "2.8.0", | ||
@@ -47,0 +47,0 @@ "eslint-plugin-node": "5.2.1", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
2
888643