text: var VueApollo=function(t,i){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function l(t,e,r){return e&&o(t.prototype,e),r&&o(t,r),t}function u(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function n(e,t){var r,i=Object.keys(e);return Object.getOwnPropertySymbols&&(r=Object.getOwnPropertySymbols(e),t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),i.push.apply(i,r)),i}function c(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach(function(t){u(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function e(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&s(t,e)}function h(t){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function s(t,e){return(s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function p(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function f(r){var i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=h(r);return t=i?(t=h(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),e=this,!(t=t)||"object"!=typeof t&&"function"!=typeof t?p(e):t}}function d(t,e,r){return(d="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){t=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=h(t)););return t}(t,e);if(t){e=Object.getOwnPropertyDescriptor(t,e);return e.get?e.get.call(r):e.value}})(t,e,r||t)}function v(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var r=[],i=!0,o=!1,n=void 0;try{for(var s,a=t[Symbol.iterator]();!(i=(s=a.next()).done)&&(r.push(s.value),!e||r.length!==e);i=!0);}catch(t){o=!0,n=t}finally{try{i||null==a.return||a.return()}finally{if(o)throw n}}return r}(t,e)||b(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function y(t){return function(t){if(Array.isArray(t))return g(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||b(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function b(t,e){if(t){if("string"==typeof t)return g(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Map"===(r="Object"===r&&t.constructor?t.constructor.name:r)||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?g(t,e):void 0}}function g(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=new Array(e);r<e;r++)i[r]=t[r];return i}i=i&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i;function m(t,e){return t(e={exports:{}},e.exports),e.exports}var $,k=m(function(t,e){function i(s,a,l,u){var c,h=!1,p=0;function f(){c&&clearTimeout(c)}function t(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var i=this,o=Date.now()-p;function n(){p=Date.now(),l.apply(i,e)}h||(u&&!c&&n(),f(),void 0===u&&s<o?n():!0!==a&&(c=setTimeout(u?function(){c=void 0}:n,void 0===u?s-o:s)))}return"boolean"!=typeof a&&(u=l,l=a,a=void 0),t.cancel=function(){f(),h=!0},t}(e=e).debounce=function(t,e,r){return void 0===r?i(t,e,!1):i(t,r,!1!==e)},e.throttle=i,Object.defineProperty(e,"__esModule",{value:!0})});($=k)&&$.__esModule&&Object.prototype.hasOwnProperty.call($,"default")&&$.default;var O=m(function(t,e){var r=e.Globals={};function i(r){return function(t,e){return r(e,t)}}e.throttle=i(k.throttle),e.debounce=i(k.debounce),e.getMergedDefinition=function(t){return r.Vue.util.mergeOptions({},t)},e.reapply=function(t,e){for(;"function"==typeof t;)t=t.call(e);return t},e.omit=function(t,e){return Object.entries(t).filter(function(t){t=v(t,1)[0];return!e.includes(t)}).reduce(function(t,e){var r=v(e,2),e=r[0],r=r[1];return t[e]=r,t},{})},e.addGqlError=function(t){t.graphQLErrors&&t.graphQLErrors.length&&(t.gqlError=t.graphQLErrors[0])},e.noop=function(){}}),w=O.Globals,S=O.throttle,A=O.debounce,_=(O.getMergedDefinition,O.reapply),j=O.omit,P=O.addGqlError,R=(O.noop,function(){function o(t,e,r){var i=!(3<arguments.length&&void 0!==arguments[3])||arguments[3];a(this,o),u(this,"type",null),u(this,"vueApolloSpecialKeys",[]),this.vm=t,this.key=e,this.initialOptions=r,this.options=Object.assign({},r),this._skip=!1,this._pollInterval=null,this._watchers=[],this._destroyed=!1,this.lastApolloOptions=null,i&&this.autostart()}return l(o,[{key:"autostart",value:function(){var t=this;"function"==typeof this.options.skip?this._skipWatcher=this.vm.$watch(function(){return t.options.skip.call(t.vm,t.vm,t.key)},this.skipChanged.bind(this),{immediate:!0,deep:this.options.deep}):this.options.skip?this._skip=!0:this.start(),"function"==typeof this.options.pollInterval&&(this._pollWatcher=this.vm.$watch(this.options.pollInterval.bind(this.vm),this.pollIntervalChanged.bind(this),{immediate:!0}))}},{key:"pollIntervalChanged",value:function(t,e){t!==e&&(null==(this.pollInterval=t)?this.stopPolling():this.startPolling(t))}},{key:"skipChanged",value:function(t,e){t!==e&&(this.skip=t)}},{key:"pollInterval",get:function(){return this._pollInterval},set:function(t){this._pollInterval=t}},{key:"skip",get:function(){return this._skip},set:function(t){t?this.stop():this.start(),this._skip=t}},{key:"refresh",value:function(){this._skip||(this.stop(),this.start())}},{key:"start",value:function(){var i=this;this.starting=!0;for(var t,e=0,r=["query","document","context"];e<r.length;e++)!function(t,e){var r=e[t];"function"==typeof i.initialOptions[r]&&(e=i.initialOptions[r].bind(i.vm),i.options[r]=e(),t=function(t){i.options[r]=t,i.refresh()},i.vm.$isServer||(t=i.options.throttle?S(t,i.options.throttle):t,t=i.options.debounce?A(t,i.options.debounce):t),i._watchers.push(i.vm.$watch(e,t,{deep:i.options.deep})))}(e,r);"function"==typeof this.options.variables?(t=this.executeApollo.bind(this),this.vm.$isServer||(t=this.options.throttle?S(t,this.options.throttle):t,t=this.options.debounce?A(t,this.options.debounce):t),this._watchers.push(this.vm.$watch(function(){return i.options.variables.call(i.vm)},t,{immediate:!0,deep:this.options.deep}))):this.executeApollo(this.options.variables)}},{key:"stop",value:function(){for(var t=0,e=this._watchers;t<e.length;t++)(0,e[t])();this.sub&&(this.sub.unsubscribe(),this.sub=null)}},{key:"generateApolloOptions",value:function(t){var e=j(this.options,this.vueApolloSpecialKeys);return e.variables=t,this.lastApolloOptions=e}},{key:"executeApollo",value:function(t){this.starting=!1}},{key:"nextResult",value:function(t){t=t.error;t&&P(t)}},{key:"callHandlers",value:function(t){for(var e=!1,r=arguments.length,i=new Array(1<r?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];for(var n=0;n<t.length;n++){var s=t[n];if(s){e=!0;s=s.apply(this.vm,i);if(void 0!==s&&!s)break}}return e}},{key:"errorHandler",value:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return this.callHandlers.apply(this,[[this.options.error,this.vm.$apollo.error,this.vm.$apollo.provider.errorHandler]].concat(e))}},{key:"catchError",value:function(t){var e;if(P(t),!this.errorHandler(t,this.vm,this.key,this.type,this.lastApolloOptions))if(t.graphQLErrors&&0!==t.graphQLErrors.length){console.error("GraphQL execution errors for ".concat(this.type," '").concat(this.key,"'"));for(var r=0,i=t.graphQLErrors;r<i.length;r++){var o=i[r];console.error(o)}}else t.networkError?console.error("Error sending the ".concat(this.type," '").concat(this.key,"'"),t.networkError):(console.error("[vue-apollo] An error has occurred for ".concat(this.type," '").concat(this.key,"'")),Array.isArray(t)?(e=console).error.apply(e,y(t)):console.error(t))}},{key:"destroy",value:function(){this._destroyed||(this._destroyed=!0,this.stop(),this._skipWatcher&&this._skipWatcher())}}]),o}()),D=["variables","watch","update","result","error","loadingKey","watchLoading","skip","throttle","debounce","subscribeToMore","prefetch","manual"],q=function(){e(s,R);var n=f(s);function s(t,e,r){var i,o=!(3<arguments.length&&void 0!==arguments[3])||arguments[3];return a(this,s),t.$data.$apolloData&&!t.$data.$apolloData.queries[e]&&t.$set(t.$data.$apolloData.queries,e,{loading:!1}),u(p(i=n.call(this,t,e,r,!1)),"type","query"),u(p(i),"vueApolloSpecialKeys",D),u(p(i),"_loading",!1),u(p(i),"_linkedSubscriptions",[]),t.$isServer&&(i.firstRun=new Promise(function(t,e){i._firstRunResolve=t,i._firstRunReject=e})),i.vm.$isServer&&(i.options.fetchPolicy="network-only"),r.manual||(i.hasDataField=Object.prototype.hasOwnProperty.call(i.vm.$data,e),i.hasDataField?Object.defineProperty(i.vm.$data.$apolloData.data,e,{get:function(){return i.vm.$data[e]},enumerable:!0,configurable:!0}):Object.defineProperty(i.vm.$data,e,{get:function(){return i.vm.$data.$apolloData.data[e]},enumerable:!0,configurable:!0})),o&&i.autostart(),i}return l(s,[{key:"client",get:function(){return this.vm.$apollo.getClient(this.options)}},{key:"loading",get:function(){return this.vm.$data.$apolloData&&this.vm.$data.$apolloData.queries[this.key]?this.vm.$data.$apolloData.queries[this.key].loading:this._loading},set:function(t){this._loading!==t&&(this._loading=t,this.vm.$data.$apolloData&&this.vm.$data.$apolloData.queries[this.key]&&(this.vm.$data.$apolloData.queries[this.key].loading=t,this.vm.$data.$apolloData.loading+=t?1:-1))}},{key:"stop",value:function(){d(h(s.prototype),"stop",this).call(this),this.loadingDone(),this.observer&&(this.observer.stopPolling(),this.observer=null)}},{key:"generateApolloOptions",value:function(t){t=d(h(s.prototype),"generateApolloOptions",this).call(this,t);return this.vm.$isServer&&delete t.pollInterval,t}},{key:"executeApollo",value:function(t){var e=JSON.stringify(t);if(this.sub){if(e===this.previousVariablesJson)return;this.sub.unsubscribe();for(var r=0,i=this._linkedSubscriptions;r<i.length;r++)i[r].stop()}this.previousVariablesJson=e,this.observer=this.vm.$apollo.watchQuery(this.generateApolloOptions(t)),this.startQuerySubscription(),"no-cache"===this.options.fetchPolicy&&!this.options.notifyOnNetworkStatusChange||(e=this.retrieveCurrentResult(),(this.options.notifyOnNetworkStatusChange||this.observer.getCurrentResult&&!e.loading)&&this.nextResult(e)),d(h(s.prototype),"executeApollo",this).call(this,t);for(var o=0,n=this._linkedSubscriptions;o<n.length;o++)n[o].start()}},{key:"startQuerySubscription",value:function(){this.sub&&!this.sub.closed||(this.sub=this.observer.subscribe({next:this.nextResult.bind(this),error:this.catchError.bind(this)}))}},{key:"retrieveCurrentResult",value:function(){var t=0<arguments.length&&void 0!==arguments[0]&&arguments[0],e=this.observer.getCurrentResult?this.observer.getCurrentResult():this.observer.currentResult();return(t||e.loading)&&(this.loading||this.applyLoadingModifier(1),this.loading=!0),e}},{key:"nextResult",value:function(t){d(h(s.prototype),"nextResult",this).call(this,t);var e=t.data,r=t.loading,i=t.error,o=t.errors,n=o&&o.length;(i||n)&&this.firstRunReject(i),r||this.loadingDone(),n&&(r=new Error("GraphQL error: ".concat(o.map(function(t){return t.message}).join(" | "))),Object.assign(r,{graphQLErrors:o,networkError:null}),d(h(s.prototype),"catchError",this).call(this,r)),"none"===this.observer.options.errorPolicy&&(i||n)||(n="function"==typeof this.options.result,null==e||(this.options.manual?n||console.error("".concat(this.key," query must have a 'result' hook in manual mode")):"function"==typeof this.options.update?this.setData(this.options.update.call(this.vm,e)):void 0===e[this.key]&&Object.keys(e).length?console.error("Missing ".concat(this.key," attribute on result"),e):this.setData(e[this.key])),n&&this.options.result.call(this.vm,t,this.key))}},{key:"setData",value:function(t){this.vm.$set(this.hasDataField?this.vm.$data:this.vm.$data.$apolloData.data,this.key,t)}},{key:"catchError",value:function(t){d(h(s.prototype),"catchError",this).call(this,t),this.firstRunReject(t),this.loadingDone(t),this.nextResult(this.observer.getCurrentResult?this.observer.getCurrentResult():this.observer.currentResult()),this.resubscribeToQuery()}},{key:"resubscribeToQuery",value:function(){var t=this.observer.getLastError(),e=this.observer.getLastResult();this.observer.resetLastResults(),this.startQuerySubscription(),Object.assign(this.observer,{lastError:t,lastResult:e})}},{key:"loadingKey",get:function(){return this.options.loadingKey||this.vm.$apollo.loadingKey}},{key:"watchLoading",value:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return this.callHandlers.apply(this,[[this.options.watchLoading,this.vm.$apollo.watchLoading,this.vm.$apollo.provider.watchLoading]].concat(e,[this]))}},{key:"applyLoadingModifier",value:function(t){var e=this.loadingKey;e&&"number"==typeof this.vm[e]&&(this.vm[e]+=t),this.watchLoading(1===t,t)}},{key:"loadingDone",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:null;this.loading&&this.applyLoadingModifier(-1),this.loading=!1,t||this.firstRunResolve()}},{key:"fetchMore",value:function(){var t,e=this;if(this.observer)return this.retrieveCurrentResult(!0),(t=this.observer).fetchMore.apply(t,arguments).then(function(t){return t.loading||e.loadingDone(),t})}},{key:"subscribeToMore",value:function(){var t;if(this.observer)return{unsubscribe:(t=this.observer).subscribeToMore.apply(t,arguments)}}},{key:"refetch",value:function(t){var e=this;if(t&&(this.options.variables=t),this.observer){t=this.observer.refetch(t).then(function(t){return t.loading||e.loadingDone(),t});return this.retrieveCurrentResult(),t}}},{key:"setVariables",value:function(t,e){if(this.options.variables=t,this.observer){e=this.observer.setVariables(t,e);return this.retrieveCurrentResult(),e}}},{key:"setOptions",value:function(t){if(Object.assign(this.options,t),this.observer){t=this.observer.setOptions(t);return this.retrieveCurrentResult(),t}}},{key:"startPolling",value:function(){var t;if(this.observer)return(t=this.observer).startPolling.apply(t,arguments)}},{key:"stopPolling",value:function(){var t;if(this.observer)return(t=this.observer).stopPolling.apply(t,arguments)}},{key:"firstRunResolve",value:function(){this._firstRunResolve&&(this._firstRunResolve(),this._firstRunResolve=null)}},{key:"firstRunReject",value:function(t){this._firstRunReject&&(this._firstRunReject(t),this._firstRunReject=null)}},{key:"destroy",value:function(){d(h(s.prototype),"destroy",this).call(this),this.loading&&this.watchLoading(!1,-1),this.loading=!1}}]),s}(),Q=function(){e(n,R);var o=f(n);function n(){var t;a(this,n);for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];return u(p(t=o.call.apply(o,[this].concat(r))),"type","subscription"),u(p(t),"vueApolloSpecialKeys",["variables","result","error","throttle","debounce","linkedQuery"]),t}return l(n,[{key:"executeApollo",value:function(t){var e=JSON.stringify(t);if(this.sub){if(e===this.previousVariablesJson)return;this.sub.unsubscribe()}this.previousVariablesJson=e;var r,i,e=this.generateApolloOptions(t);"function"==typeof e.updateQuery&&(e.updateQuery=e.updateQuery.bind(this.vm)),this.options.linkedQuery?("function"==typeof this.options.result&&(r=this.options.result.bind(this.vm),i=e.updateQuery&&e.updateQuery.bind(this.vm),e.updateQuery=function(){return r.apply(void 0,arguments),i&&i.apply(void 0,arguments)}),this.sub=this.options.linkedQuery.subscribeToMore(e)):(this.observer=this.vm.$apollo.subscribe(e),this.sub=this.observer.subscribe({next:this.nextResult.bind(this),error:this.catchError.bind(this)})),d(h(n.prototype),"executeApollo",this).call(this,t)}},{key:"nextResult",value:function(t){d(h(n.prototype),"nextResult",this).call(this,t),"function"==typeof this.options.result&&this.options.result.call(this.vm,t,this.key)}}]),n}(),E=function(){function e(t){a(this,e),this._apolloSubscriptions=[],this._watchers=[],this.vm=t,this.queries={},this.subscriptions={},this.client=void 0,this.loadingKey=void 0,this.error=void 0}return l(e,[{key:"provider",get:function(){return this.vm.$apolloProvider}},{key:"getClient",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:null;if(!t||!t.client){if("object"===r(this.client))return this.client;if(this.client){if(this.provider.clients){var e=this.provider.clients[this.client];if(!e)throw new Error("[vue-apollo] Missing client '".concat(this.client,"' in 'apolloProvider'"));return e}throw new Error("[vue-apollo] Missing 'clients' options in 'apolloProvider'")}return this.provider.defaultClient}e=this.provider.clients[t.client];if(!e)throw new Error("[vue-apollo] Missing client '".concat(t.client,"' in 'apolloProvider'"));return e}},{key:"query",value:function(t){return this.getClient(t).query(t)}},{key:"watchQuery",value:function(t){var e=this,t=this.getClient(t).watchQuery(t),r=t.subscribe.bind(t);return t.subscribe=function(t){t=r(t);return e._apolloSubscriptions.push(t),t},t}},{key:"mutate",value:function(t){return this.getClient(t).mutate(t)}},{key:"subscribe",value:function(t){var e=this;if(!this.vm.$isServer){var t=this.getClient(t).subscribe(t),r=t.subscribe.bind(t);return t.subscribe=function(t){t=r(t);return e._apolloSubscriptions.push(t),t},t}}},{key:"loading",get:function(){return 0!==this.vm.$data.$apolloData.loading}},{key:"data",get:function(){return this.vm.$data.$apolloData.data}},{key:"addSmartQuery",value:function(r,t){var i=this,e=_(t,this.vm);e.query||(e={query:e});var o,n=this.vm.$options.apollo,t=this.provider.defaultOptions;if(t&&t.$query&&(o=t.$query),o=n&&n.$query?c(c({},o||{}),n.$query):o)for(var s in o)void 0===e[s]&&(e[s]=o[s]);var a=this.queries[r]=new q(this.vm,r,e,!1);return this.vm.$isServer&&!1===e.prefetch||a.autostart(),this.vm.$isServer||(n=e.subscribeToMore)&&(Array.isArray(n)?n.forEach(function(t,e){i.addSmartSubscription("".concat(r).concat(e),c(c({},t),{},{linkedQuery:a}))}):this.addSmartSubscription(r,c(c({},n),{},{linkedQuery:a}))),a}},{key:"addSmartSubscription",value:function(t,e){if(!this.vm.$isServer){e=_(e,this.vm);t=this.subscriptions[t]=new Q(this.vm,t,e,!1);return t.autostart(),e.linkedQuery&&e.linkedQuery._linkedSubscriptions.push(t),t}}},{key:"defineReactiveSetter",value:function(e,t,r){var i=this;this._watchers.push(this.vm.$watch(t,function(t){i[e]=t},{immediate:!0,deep:r}))}},{key:"skipAllQueries",set:function(t){for(var e in this.queries)this.queries[e].skip=t}},{key:"skipAllSubscriptions",set:function(t){for(var e in this.subscriptions)this.subscriptions[e].skip=t}},{key:"skipAll",set:function(t){this.skipAllQueries=t,this.skipAllSubscriptions=t}},{key:"destroy",value:function(){for(var t,e,r=0,i=this._watchers;r<i.length;r++)(0,i[r])();for(t in this.queries)this.queries[t].destroy();for(e in this.subscriptions)this.subscriptions[e].destroy();this._apolloSubscriptions.forEach(function(t){t.unsubscribe()})}}]),e}(),C=function(){function e(t){if(a(this,e),!t)throw new Error("Options argument required");this.clients=t.clients||{},t.defaultClient&&(this.clients.defaultClient=this.defaultClient=t.defaultClient),this.defaultOptions=t.defaultOptions,this.watchLoading=t.watchLoading,this.errorHandler=t.errorHandler,this.prefetch=t.prefetch}return l(e,[{key:"provide",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"$apolloProvider";return console.warn("<ApolloProvider>.provide() is deprecated. Use the 'apolloProvider' option instead with the provider object directly."),u({},t,this)}}]),e}();var x={name:"ApolloQuery",provide:function(){return{getDollarApollo:this.getDollarApollo,getApolloQuery:this.getApolloQuery}},props:{query:{type:[Function,Object],required:!0},variables:{type:Object,default:void 0},fetchPolicy:{type:String,default:void 0},pollInterval:{type:Number,default:void 0},notifyOnNetworkStatusChange:{type:Boolean,default:void 0},context:{type:Object,default:void 0},update:{type:Function,default:function(t){return t}},skip:{type:Boolean,default:!1},debounce:{type:Number,default:0},throttle:{type:Number,default:0},clientId:{type:String,default:void 0},deep:{type:Boolean,default:void 0},tag:{type:String,default:"div"},prefetch:{type:Boolean,default:!0},options:{type:Object,default:function(){return{}}}},data:function(){return{result:{data:null,loading:!1,networkStatus:7,error:null},times:0}},watch:{fetchPolicy:function(t){this.$apollo.queries.query.setOptions({fetchPolicy:t})},pollInterval:function(t){this.$apollo.queries.query.setOptions({pollInterval:t})},notifyOnNetworkStatusChange:function(t){this.$apollo.queries.query.setOptions({notifyOnNetworkStatusChange:t})},"$data.$apolloData.loading":function(t){this.$emit("loading",!!t)}},apollo:{$client:function(){return this.clientId},query:function(){return c(c({query:function(){return"function"==typeof this.query?this.query(i):this.query},variables:function(){return this.variables},fetchPolicy:this.fetchPolicy,pollInterval:this.pollInterval,debounce:this.debounce,throttle:this.throttle,notifyOnNetworkStatusChange:this.notifyOnNetworkStatusChange,context:function(){return this.context},skip:function(){return this.skip},deep:this.deep,prefetch:this.prefetch},this.options),{},{manual:!0,result:function(t){var e=t.errors,r=t.loading,i=t.networkStatus,o=t.error;t=Object.assign({},t),e&&e.length&&((o=new Error("Apollo errors occurred (".concat(e.length,")"))).graphQLErrors=e);e={};r?Object.assign(e,this.$_previousData,t.data):o?Object.assign(e,this.$apollo.queries.query.observer.getLastResult()||{},t.data):(e=t.data,this.$_previousData=t.data);t=(t=e)&&0<Object.keys(t).length;this.result={data:t?this.update(e):void 0,fullData:t?e:void 0,loading:r,error:o,networkStatus:i},this.times=++this.$_times,this.$emit("result",this.result)},error:function(t){this.result.loading=!1,this.result.error=t,this.$emit("error",t)}})}},created:function(){this.$_times=0},methods:{getDollarApollo:function(){return this.$apollo},getApolloQuery:function(){return this.$apollo.queries.query}},render:function(t){var e=this.$scopedSlots.default({result:this.result,times:this.times,query:this.$apollo.queries.query,isLoading:this.$apolloData.loading,gqlError:this.result&&this.result.error&&this.result.error.gqlError}),e=(Array.isArray(e)?e:[e]).concat(this.$slots.default);return this.tag?t(this.tag,e):e[0]}},L=0,M={name:"ApolloSubscribeToMore",inject:["getDollarApollo","getApolloQuery"],props:{document:{type:[Function,Object],required:!0},variables:{type:Object,default:void 0},updateQuery:{type:Function,default:void 0}},watch:{document:"refresh",variables:"refresh"},created:function(){this.$_key="sub_component_".concat(L++)},mounted:function(){this.refresh()},beforeDestroy:function(){this.destroy()},methods:{destroy:function(){this.$_sub&&this.$_sub.destroy()},refresh:function(){this.destroy();var t=this.document;"function"==typeof t&&(t=t(i)),this.$_sub=this.getDollarApollo().addSmartSubscription(this.$_key,{document:t,variables:this.variables,updateQuery:this.updateQuery,linkedQuery:this.getApolloQuery()})}},render:function(t){return null}},I={props:{mutation:{type:[Function,Object],required:!0},variables:{type:Object,default:void 0},optimisticResponse:{type:Object,default:void 0},update:{type:Function,default:void 0},refetchQueries:{type:Function,default:void 0},clientId:{type:String,default:void 0},tag:{type:String,default:"div"},context:{type:Object,default:void 0}},data:function(){return{loading:!1,error:null}},watch:{loading:function(t){this.$emit("loading",t)}},methods:{mutate:function(t){var e=this;this.loading=!0,this.error=null;var r=this.mutation;return"function"==typeof r&&(r=r(i)),this.$apollo.mutate(c({mutation:r,client:this.clientId,variables:this.variables,optimisticResponse:this.optimisticResponse,update:this.update,refetchQueries:this.refetchQueries,context:this.context},t)).then(function(t){e.$emit("done",t),e.loading=!1}).catch(function(t){P(t),e.error=t,e.$emit("error",t),e.loading=!1})}},render:function(t){var e=this.$scopedSlots.default({mutate:this.mutate,loading:this.loading,error:this.error,gqlError:this.error&&this.error.gqlError}),e=(Array.isArray(e)?e:[e]).concat(this.$slots.default);return this.tag?t(this.tag,e):e[0]}};function T(t,e){return void 0!==t&&Object.prototype.hasOwnProperty.call(t,e)}function K(){var t=this.$options,e=t.apolloProvider;e?this.$apolloProvider="function"==typeof e?e():e:t.parent&&t.parent.$apolloProvider?this.$apolloProvider=t.parent.$apolloProvider:!t.provide||(t="function"==typeof t.provide?t.provide.call(this):t.provide)&&t.$apolloProvider&&(this.$apolloProvider=t.$apolloProvider)}function N(){var r=this;this.$_apolloInitData={};var t=this.$options.apollo;if(t)for(var e in t)!function(e){"$"!==e.charAt(0)&&(t[e].manual||T(r.$options.props,e)||T(r.$options.computed,e)||T(r.$options.methods,e)||Object.defineProperty(r,e,{get:function(){return r.$data.$apolloData.data[e]},set:function(t){return r.$_apolloInitData[e]=t},enumerable:!0,configurable:!0}))}(e)}function V(){var t=this,e=this.$apolloProvider;if(!this._apolloLaunched&&e){this._apolloLaunched=!0;var r,i,o=this.$options.apollo;if(o){for(var n in this.$_apolloPromises=[],o.$init||(o.$init=!0,e.defaultOptions&&(o=this.$options.apollo=Object.assign({},e.defaultOptions,o))),F(this.$apollo,"skipAll",o.$skipAll,o.$deep),F(this.$apollo,"skipAllQueries",o.$skipAllQueries,o.$deep),F(this.$apollo,"skipAllSubscriptions",o.$skipAllSubscriptions,o.$deep),F(this.$apollo,"client",o.$client,o.$deep),F(this.$apollo,"loadingKey",o.$loadingKey,o.$deep),F(this.$apollo,"error",o.$error,o.$deep),F(this.$apollo,"watchLoading",o.$watchLoading,o.$deep),Object.defineProperty(this,"$apolloData",{get:function(){return t.$data.$apolloData},enumerable:!0,configurable:!0}),o)"$"!==n.charAt(0)&&(r=o[n],i=this.$apollo.addSmartQuery(n,r),this.$isServer&&(r=_(r,this),!1===e.prefetch||!1===r.prefetch||!1===o.$prefetch||i.skip||this.$_apolloPromises.push(i.firstRun)));if(o.subscribe&&w.Vue.util.warn("vue-apollo -> `subscribe` option is deprecated. Use the `$subscribe` option instead."),o.$subscribe)for(var s in o.$subscribe)this.$apollo.addSmartSubscription(s,o.$subscribe[s])}}}function F(t,e,r,i){void 0!==r&&("function"==typeof r?t.defineReactiveSetter(e,r,i):t[e]=r)}function H(){this.$_apollo&&this.$_apollo.destroy()}var G=["$subscribe"];function J(t,e){var r,l,i;J.installed||(J.installed=!0,r=(w.Vue=t).version.substr(0,t.version.indexOf(".")),l=t.config.optionMergeStrategies.methods,t.config.optionMergeStrategies.apollo=function(t,e,r){if(!t)return e;if(!e)return t;for(var i=Object.assign({},j(t,G),t.data),o=Object.assign({},j(e,G),e.data),n={},s=0;s<G.length;s++){var a=G[s];n[a]=l(t[a],e[a])}return Object.assign(n,l(i,o))},Object.prototype.hasOwnProperty.call(t,"$apollo")||Object.defineProperty(t.prototype,"$apollo",{get:function(){return this.$_apollo||(this.$_apollo=new E(this)),this.$_apollo}}),i=r,t.mixin(c(c(c({},"1"===i?{init:K}:{}),"2"===i?{data:function(){return{$apolloData:{queries:{},loading:0,data:this.$_apolloInitData}}},beforeCreate:function(){K.call(this),N.call(this)},serverPrefetch:function(){var e=this;if(this.$_apolloPromises)return Promise.all(this.$_apolloPromises).then(function(){H.call(e)}).catch(function(t){return H.call(e),Promise.reject(t)})}}:{}),{},{created:V,destroyed:H})),"2"===r&&(t.component("ApolloQuery",x),t.component("ApolloQuery",x),t.component("ApolloSubscribeToMore",M),t.component("ApolloSubscribeToMore",M),t.component("ApolloMutation",I),t.component("ApolloMutation",I)))}C.install=J,C.version="3.0.7";var B=C,W=x,U=M,z=I,O=null;return"undefined"!=typeof window?O=window.Vue:"undefined"!=typeof global&&(O=global.Vue),O&&O.use(C),t.ApolloMutation=z,t.ApolloProvider=B,t.ApolloQuery=W,t.ApolloSubscribeToMore=U,t.default=C,t.install=J,t}({},gql);
  